ngspice-26/0000755000265600020320000000000012356732615012234 5ustar andreasadminngspice-26/examples/0000755000265600020320000000000012356732615014052 5ustar andreasadminngspice-26/examples/snapshot/0000755000265600020320000000000012264261473015706 5ustar andreasadminngspice-26/examples/snapshot/adder_snload.script0000644000265600020320000000065212264261473021556 0ustar andreasadmin* SCRIPT: ADDER - 4 BIT BINARY * script to reload circuit and continue the simulation * begin with editing the file location * to be started with 'ngspice adder_snload.script' .control * cd to where all files are located cd D:\Spice_general\ngspice\examples\snapshot * load circuit and snpashot file snload adder_mos_circ.cir adder500.snap * continue simulation resume * plot some node voltages plot v(10) v(11) v(12) .endc ngspice-26/examples/snapshot/adder_mos_circ.cir0000644000265600020320000000336112264261473021345 0ustar andreasadmin* ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER *** SUBCIRCUIT DEFINITIONS .SUBCKT NAND in1 in2 out VDD * NODES: INPUT(2), OUTPUT, VCC M1 out in2 Vdd Vdd p1 W=3u L=1u M2 net.1 in2 0 0 n1 W=3u L=2u M3 out in1 Vdd Vdd p1 W=3u L=1u M4 out in1 net.1 0 n1 W=3u L=2u .ENDS NAND .SUBCKT ONEBIT 1 2 3 4 5 6 * NODES: INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC X1 1 2 7 6 NAND X2 1 7 8 6 NAND X3 2 7 9 6 NAND X4 8 9 10 6 NAND X5 3 10 11 6 NAND X6 3 11 12 6 NAND X7 10 11 13 6 NAND X8 12 13 4 6 NAND X9 11 7 5 6 NAND .ENDS ONEBIT .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 * NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1, * CARRY-IN, CARRY-OUT, VCC X1 1 2 7 5 10 9 ONEBIT X2 3 4 10 6 8 9 ONEBIT .ENDS TWOBIT .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2), * OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC X1 1 2 3 4 9 10 13 16 15 TWOBIT X2 5 6 7 8 11 12 16 14 15 TWOBIT .ENDS FOURBIT *** DEFINE NOMINAL CIRCUIT VCC 99 0 DC 3.3V VIN1A 1 0 PULSE(0 3 0 10NS 10NS 10NS 50NS) VIN1B 2 0 PULSE(0 3 0 10NS 10NS 20NS 100NS) VIN2A 3 0 PULSE(0 3 0 10NS 10NS 40NS 200NS) VIN2B 4 0 PULSE(0 3 0 10NS 10NS 80NS 400NS) VIN3A 5 0 PULSE(0 3 0 10NS 10NS 160NS 800NS) VIN3B 6 0 PULSE(0 3 0 10NS 10NS 320NS 1600NS) VIN4A 7 0 PULSE(0 3 0 10NS 10NS 640NS 3200NS) VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS) X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT *RBIT0 9 0 100K *RBIT1 10 0 100K *RBIT2 11 0 100K *RBIT3 12 0 100K *RCOUT 13 0 100K .TRAN 1NS 1000NS .model n1 nmos level=8 version=3.3.0 .model p1 pmos level=8 version=3.3.0 .END ngspice-26/examples/snapshot/adder_mos.cir0000644000265600020320000000107112264261473020341 0ustar andreasadmin Example: snsave * load a circuit (including transistor models and .tran command) * starts transient simulation until stop point * store intermediate data to file * begin with editing the file location * to be run with 'ngspice adder_mos.cir' .include adder_mos_circ.cir .control *cd to where all files are located cd D:\Spice_general\ngspice\examples\snapshot set noaskquit unset ngdebug set noinit save vcc#branch 10 iplot v(10) *interrupt condition for the simulation stop when time > 500n * simulate run * store snapshot to file snsave adder500.snap .endc .END ngspice-26/examples/adms/0000755000265600020320000000000012264261473014773 5ustar andreasadminngspice-26/examples/adms/hicum0/0000755000265600020320000000000012264261473016160 5ustar andreasadminngspice-26/examples/adms/hicum0/hic0_gum.sp0000644000265600020320000000050412264261473020216 0ustar andreasadminHICUM0 Gummel Test Ic=f(Vc,Vb) VB B 0 0.5 VC C 0 1.0 VS S 0 0.0 X1 C B 0 S DT hicumL0V1p1_c_sbt .control dc vb 0.2 1.4 0.01 run plot abs(i(vc)) abs(i(vb)) abs(i(vs)) ylimit 0.1e-12 100e-3 ylog plot abs(i(vc))/abs(i(vb)) vs abs(-i(vc)) xlog xlimit 1e-09 10e-3 ylimit 0 300 .endc .include model-card-hicumL0V1p11.lib .end ngspice-26/examples/adms/hicum0/model-card-hicumL0V1p11.lib0000644000265600020320000003660512264261473022721 0ustar andreasadmin******************************************************************************** ******************************************************************************** * HICUM Level0 Version 1.1 model cards for testing ******************************************************************************** ******************************************************************************** * 1D transistor: Isothermal Simulation and Temperature dependence ******************************************************************************** .subckt hicumL0V1p1_1D c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_1D ******************************************************************************** * 1D transistor: Electrothermal Simulation to test self-heating ******************************************************************************** .subckt hicumL0V1p1_1D_slh c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=1000.0 cth=1.0e-10 + tnom=27.0 dt=0.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_1D_slh ******************************************************************************** * 1D transistor: Isothermal Simulation with NQS Effect: future ******************************************************************************** .subckt hicumL0V1p1_1D_nqs c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_1D_nqs ******************************************************************************** * 1D transistor: Isothermal Simulation to test collector current spreading ******************************************************************************** .subckt hicumL0V1p1_1D_ccs c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_1D_ccs ******************************************************************************** * Internal transistor: Isothermal Simulation and Temperature dependence (Tunneling current at peripheral node:future) ******************************************************************************** .subckt hicumL0V1p1_i_tnp c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_i_tnp ******************************************************************************** * Internal transistor: Isothermal Simulation and Temperature dependence (Tunneling current at internal node:future) ******************************************************************************** .subckt hicumL0V1p1_i_tni c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 re=0.0 rcx=0.0 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=1.0e-20 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_i_tni ******************************************************************************** * Complete transistor: Isothermal Simulation and Temperature dependence ******************************************************************************** .subckt hicumL0V1p1_c c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c ******************************************************************************** * Complete transistor: Electrothermal Simulation to test self-heating ******************************************************************************** .subckt hicumL0V1p1_c_slh c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=1000.0 cth=1.0e-10 flsh=2 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c_slh ******************************************************************************** * Complete transistor: Isothermal Simulation with NQS Effect: future ******************************************************************************** .subckt hicumL0V1p1_c_nqs c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c_nqs ******************************************************************************** * Complete transistor: Isothermal Simulation to test collector current spreading ******************************************************************************** .subckt hicumL0V1p1_c_ccs c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=0.0 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=0.0 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c_ccs ******************************************************************************** * Complete transistor: Isothermal Simulation with substrate diode ******************************************************************************** .subckt hicumL0V1p1_c_sbt c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c_sbt ******************************************************************************** * Complete transistor: Isothermal Simulation with substrate network: future ******************************************************************************** .subckt hicumL0V1p1_c_sbn c b e s dt qhcm0 c b e s dt hic0_full .model hic0_full npn level=7 is=1.3525E-18 vef=8.0 iqf=3.0e-2 iqr=1e6 + iqfh=1e6 tfh=1e-8 ibes=1.16E-20 mbe=1.015 ires=1.16e-16 mre=2.0 ibcs=1.16e-20 + mbc=1.015 mcf=1.0 mcr=1 kavl=0.9488 eavl=11.96e10 alkav=0.825e-4 + aleav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 re=12.534 rcx=9.165 iscs=1.0e-17 msc=1.0 + cje0=8.11e-15 vde=0.95 ze=0.5 aje=1.8 cjci0=1.16e-15 vdci=0.8 zci=0.333 + vptci=46 cjcx0=5.4e-15 vdcx=0.7 zcx=0.333 vptcx=100 fbc=0.1526 vr0e=1.6 vr0c=8.0 + cjs0=3.64e-14 vds=0.6 zs=0.447 vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 + tef0=1.8e-12 gte=1.4 thcs=30.0e-12 ahc=0.75 tr=0.0 rci0=127.8 vlim=0.7 + vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 kf=1.43e-8 af=2.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 + zetarbx=0.206 zetarcx=0.223 zetare=0.0 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 rth=0.0 cth=0.0 + tnom=27.0 npn=1 pnp=0 *+ dt=0.0 .ends hicumL0V1p1_c_sbn ******************************************************************************** * Complete test transistor: default ******************************************************************************** .subckt hicumL0V11_default c b e s dt qhcm0 c b e s dt hic0_full .ends hicumL0V11_default ******************************************************************************** ngspice-26/examples/adms/hicum0/hic0_out.sp0000644000265600020320000000034112264261473020234 0ustar andreasadminHICUM0 Output Test Ic=f(Vc,Ib) IB 0 B 200n VC C 0 2.0 VS S 0 0.0 X1 C B 0 S DT hicumL0V1p1_c_slh .control dc vc 0.0 3.0 0.05 ib 10u 100u 10u run plot abs(i(vc)) plot v(dt) .endc .include model-card-hicumL0V1p11.lib .end ngspice-26/examples/adms/psp/0000755000265600020320000000000012264261473015575 5ustar andreasadminngspice-26/examples/adms/psp/psp_tran.sp0000644000265600020320000000671512264261473020000 0ustar andreasadminpsp nch transfer * vd d 0 dc 0.1 vg g 0 dc 0.0 vs s 0 dc 0.0 vb b 0 dc 0.0 m1 d g s b nch +l=1.0e-06 +w=10.0e-06 +sa=0.0e+00 +sb=0.0e+00 +absource=1.0e-12 +lssource=1.0e-06 +lgsource=1.0e-06 +abdrain=1.0e-12 +lsdrain=1.0e-06 +lgdrain=1.0e-06 +mult=1.0e+00 * .option temp=21 .control dc vg 0 3.5 0.02 vb -3 0 0.5 plot abs(i(vd)) dc vg 0 1.5 0.01 vb -3 0 0.5 plot abs(i(vd)) ylog ylimit 1e-12 1e-03 .endc * .model nch nmos level=45 +type=1.0e+00 +tr=21.0e+00 +swigate=0.0e+00 +swimpact=1.0e+00 +swgidl=0.0e+00 +swjuncap=0.0e+00 +lvaro=0.0e+00 +lvarl=0.0e+00 +lvarw=0.0e+00 +lap=0.0e+00 +wvaro=0.0e+00 +wvarl=0.0e+00 +wvarw=0.0e+00 +wot=0.0e+00 +vfbo=-1.0e+00 +vfbl=0.0e+00 +vfbw=0.0e+00 +vfblw=0.0e+00 +stvfbo=500.0e-06 +stvfbl=0.0e+00 +stvfbw=0.0e+00 +stvfblw=0.0e+00 +toxo=2.0e-09 +nsubo=300.0e+21 +nsubw=0.0e+00 +wseg=10.0e-09 +npck=1.0e+24 +npckw=0.0e+00 +wsegp=10.0e-09 +lpck=10.0e-09 +lpckw=0.0e+00 +vnsubo=0.0e+00 +nslpo=50.0e-03 +dnsubo=0.0e+00 +npo=100.0e+24 +npl=0.0e+00 +qmc=1.0e+00 +cto=0.0e+00 +ctl=0.0e+00 +ctlexp=1.0e+00 +ctw=0.0e+00 +toxovo=2.0e-09 +lov=0.0e+00 +novo=50.0e+24 +fol1=0.0e+00 +fol2=0.0e+00 +cfl=0.0e+00 +cflexp=2.0e+00 +cfw=0.0e+00 +cfbo=0.0e+00 +uo=50.0e-03 +fbet1=0.0e+00 +fbet1w=0.0e+00 +lp1=10.0e-09 +lp1w=0.0e+00 +fbet2=0.0e+00 +lp2=10.0e-09 +betw1=0.0e+00 +betw2=0.0e+00 +wbet=1.0e-09 +stbeto=1.0e+00 +stbetl=0.0e+00 +stbetw=0.0e+00 +stbetlw=0.0e+00 +mueo=500.0e-03 +muew=0.0e+00 +stmueo=0.0e+00 +themuo=1.5e+00 +stthemuo=1.5e+00 +cso=0.0e+00 +csw=0.0e+00 +stcso=0.0e+00 +xcoro=0.0e+00 +xcorl=0.0e+00 +xcorw=0.0e+00 +xcorlw=0.0e+00 +stxcoro=0.0e+00 +rsw1=2.5e+03 +rsw2=0.0e+00 +strso=1.0e+00 +rsbo=0.0e+00 +rsgo=0.0e+00 +thesato=0.0e+00 +thesatl=50.0e-03 +thesatlexp=1.0e+00 +thesatw=0.0e+00 +stthesato=1.0e+00 +stthesatl=0.0e+00 +stthesatw=0.0e+00 +stthesatlw=0.0e+00 +thesatbo=0.0e+00 +thesatgo=0.0e+00 +axo=18.0e+00 +axl=400.0e-03 +alpl=500.0e-06 +alplexp=1.0e+00 +alpw=0.0e+00 +alp1l1=0.0e+00 +alp1lexp=500.0e-03 +alp1l2=0.0e+00 +alp1w=0.0e+00 +alp2l1=0.0e+00 +alp2lexp=0.5e+00 +alp2l2=0.0e+00 +alp2w=0.0e+00 +vpo=50.0e-03 +a1o=1.0e+00 +a1l=0.0e+00 +a1w=0.0e+00 +a2o=10.0e+00 +sta2o=0.0e+00 +a3o=1.0e+00 +a3l=0.0e+00 +a3w=0.0e+00 +a4o=0.0e+00 +a4w=0.0e+00 +gcoo=0.0e+00 +iginvlw=0.0e+00 +igovw=0.0e+00 +stigo=2.0e+00 +gc2o=375.0e-03 +gc3o=63.0e-03 +chibo=3.1e+00 +agidlw=0.0e+00 +bgidlo=41.0e+00 +stbgidlo=0.0e+00 +cgidlo=0.0e+00 +cgbovl=0.0e+00 +cfrw=0.0e+00 +nfalw=80.0e+21 +nfblw=30.0e+06 +nfclw=0.0e+00 +saref=1.0e-06 +sbref=1.0e-06 +wlod=0.0e+00 +kuo=0.0e+00 +kvsat=0.0e+00 +tkuo=0.0e+00 +lkuo=0.0e+00 +wkuo=0.0e+00 +pkuo=0.0e+00 +llodkuo=0.0e+00 +wlodkuo=0.0e+00 +kvtho=0.0e+00 +lkvtho=0.0e+00 +wkvtho=0.0e+00 +pkvtho=0.0e+00 +llodvth=0.0e+00 +wlodvth=0.0e+00 +stetao=0.0e+00 +lodetao=1.0e+00 +trj=21.0e+00 +imax=1.0e+03 +cjorbot=1.0e-03 +cjorsti=1.0e-09 +cjorgat=1.0e-09 +vbirbot=1.0e+00 +vbirsti=1.0e+00 +vbirgat=1.0e+00 +pbot=500.0e-03 +psti=500.0e-03 +pgat=500.0e-03 +phigbot=1.16e+00 +phigsti=1.16e+00 +phiggat=1.16e+00 +idsatrbot=1.0e-12 +idsatrsti=1.0e-18 +idsatrgat=1.0e-18 +csrhbot=100.0e+00 +csrhsti=100.0e-06 +csrhgat=100.0e-06 +xjunsti=100.0e-09 +xjungat=100.0e-09 +ctatbot=100.0e+00 +ctatsti=100.0e-06 +ctatgat=100.0e-06 +mefftatbot=250.0e-03 +mefftatsti=250.0e-03 +mefftatgat=250.0e-03 +cbbtbot=1.0e-12 +cbbtsti=1.0e-18 +cbbtgat=1.0e-18 +fbbtrbot=1.0e+09 +fbbtrsti=1.0e+09 +fbbtrgat=1.0e+09 +stfbbtbot=-1.0e-03 +stfbbtsti=-1.0e-03 +stfbbtgat=-1.0e-03 +vbrbot=10.0e+00 +vbrsti=10.0e+00 +vbrgat=10.0e+00 +pbrbot=4.0e+00 +pbrsti=4.0e+00 +pbrgat=4.0e+00 +dta=0.0e+00 .end ngspice-26/examples/adms/psp/psp_out.sp0000644000265600020320000000665712264261473017650 0ustar andreasadminpsp nch output * vd d 0 dc 0.1 vg g 0 dc 0.0 vs s 0 dc 0.0 vb b 0 dc 0.0 m1 d g s b nch +l=1.0e-06 +w=10.0e-06 +sa=0.0e+00 +sb=0.0e+00 +absource=1.0e-12 +lssource=1.0e-06 +lgsource=1.0e-06 +abdrain=1.0e-12 +lsdrain=1.0e-06 +lgdrain=1.0e-06 +mult=1.0e+00 * .option temp=21 .control dc vd 0 3.5 0.05 vg 0.5 3 0.5 plot abs(i(vd)) plot abs(i(vb)) ylog ylimit 1e-12 1e-03 .endc * .model nch nmos level=45 +type=1.0e+00 +tr=21.0e+00 +swigate=0.0e+00 +swimpact=1.0e+00 +swgidl=0.0e+00 +swjuncap=0.0e+00 +lvaro=0.0e+00 +lvarl=0.0e+00 +lvarw=0.0e+00 +lap=0.0e+00 +wvaro=0.0e+00 +wvarl=0.0e+00 +wvarw=0.0e+00 +wot=0.0e+00 +vfbo=-1.0e+00 +vfbl=0.0e+00 +vfbw=0.0e+00 +vfblw=0.0e+00 +stvfbo=500.0e-06 +stvfbl=0.0e+00 +stvfbw=0.0e+00 +stvfblw=0.0e+00 +toxo=2.0e-09 +nsubo=300.0e+21 +nsubw=0.0e+00 +wseg=10.0e-09 +npck=1.0e+24 +npckw=0.0e+00 +wsegp=10.0e-09 +lpck=10.0e-09 +lpckw=0.0e+00 +vnsubo=0.0e+00 +nslpo=50.0e-03 +dnsubo=0.0e+00 +npo=100.0e+24 +npl=0.0e+00 +qmc=1.0e+00 +cto=0.0e+00 +ctl=0.0e+00 +ctlexp=1.0e+00 +ctw=0.0e+00 +toxovo=2.0e-09 +lov=0.0e+00 +novo=50.0e+24 +fol1=0.0e+00 +fol2=0.0e+00 +cfl=0.0e+00 +cflexp=2.0e+00 +cfw=0.0e+00 +cfbo=0.0e+00 +uo=50.0e-03 +fbet1=0.0e+00 +fbet1w=0.0e+00 +lp1=10.0e-09 +lp1w=0.0e+00 +fbet2=0.0e+00 +lp2=10.0e-09 +betw1=0.0e+00 +betw2=0.0e+00 +wbet=1.0e-09 +stbeto=1.0e+00 +stbetl=0.0e+00 +stbetw=0.0e+00 +stbetlw=0.0e+00 +mueo=500.0e-03 +muew=0.0e+00 +stmueo=0.0e+00 +themuo=1.5e+00 +stthemuo=1.5e+00 +cso=0.0e+00 +csw=0.0e+00 +stcso=0.0e+00 +xcoro=0.0e+00 +xcorl=0.0e+00 +xcorw=0.0e+00 +xcorlw=0.0e+00 +stxcoro=0.0e+00 +rsw1=0.5e+03 +rsw2=0.0e+00 +strso=1.0e+00 +rsbo=0.0e+00 +rsgo=0.0e+00 +thesato=0.0e+00 +thesatl=50.0e-03 +thesatlexp=1.0e+00 +thesatw=0.0e+00 +stthesato=1.0e+00 +stthesatl=0.0e+00 +stthesatw=0.0e+00 +stthesatlw=0.0e+00 +thesatbo=0.0e+00 +thesatgo=0.0e+00 +axo=18.0e+00 +axl=400.0e-03 +alpl=500.0e-06 +alplexp=1.0e+00 +alpw=0.0e+00 +alp1l1=0.0e+00 +alp1lexp=500.0e-03 +alp1l2=0.0e+00 +alp1w=0.0e+00 +alp2l1=0.0e+00 +alp2lexp=0.5e+00 +alp2l2=0.0e+00 +alp2w=0.0e+00 +vpo=50.0e-03 +a1o=1.0e+00 +a1l=0.0e+00 +a1w=0.0e+00 +a2o=10.0e+00 +sta2o=0.0e+00 +a3o=1.0e+00 +a3l=0.0e+00 +a3w=0.0e+00 +a4o=0.0e+00 +a4w=0.0e+00 +gcoo=0.0e+00 +iginvlw=0.0e+00 +igovw=0.0e+00 +stigo=2.0e+00 +gc2o=375.0e-03 +gc3o=63.0e-03 +chibo=3.1e+00 +agidlw=0.0e+00 +bgidlo=41.0e+00 +stbgidlo=0.0e+00 +cgidlo=0.0e+00 +cgbovl=0.0e+00 +cfrw=0.0e+00 +nfalw=80.0e+21 +nfblw=30.0e+06 +nfclw=0.0e+00 +saref=1.0e-06 +sbref=1.0e-06 +wlod=0.0e+00 +kuo=0.0e+00 +kvsat=0.0e+00 +tkuo=0.0e+00 +lkuo=0.0e+00 +wkuo=0.0e+00 +pkuo=0.0e+00 +llodkuo=0.0e+00 +wlodkuo=0.0e+00 +kvtho=0.0e+00 +lkvtho=0.0e+00 +wkvtho=0.0e+00 +pkvtho=0.0e+00 +llodvth=0.0e+00 +wlodvth=0.0e+00 +stetao=0.0e+00 +lodetao=1.0e+00 +trj=21.0e+00 +imax=1.0e+03 +cjorbot=1.0e-03 +cjorsti=1.0e-09 +cjorgat=1.0e-09 +vbirbot=1.0e+00 +vbirsti=1.0e+00 +vbirgat=1.0e+00 +pbot=500.0e-03 +psti=500.0e-03 +pgat=500.0e-03 +phigbot=1.16e+00 +phigsti=1.16e+00 +phiggat=1.16e+00 +idsatrbot=1.0e-12 +idsatrsti=1.0e-18 +idsatrgat=1.0e-18 +csrhbot=100.0e+00 +csrhsti=100.0e-06 +csrhgat=100.0e-06 +xjunsti=100.0e-09 +xjungat=100.0e-09 +ctatbot=100.0e+00 +ctatsti=100.0e-06 +ctatgat=100.0e-06 +mefftatbot=250.0e-03 +mefftatsti=250.0e-03 +mefftatgat=250.0e-03 +cbbtbot=1.0e-12 +cbbtsti=1.0e-18 +cbbtgat=1.0e-18 +fbbtrbot=1.0e+09 +fbbtrsti=1.0e+09 +fbbtrgat=1.0e+09 +stfbbtbot=-1.0e-03 +stfbbtsti=-1.0e-03 +stfbbtgat=-1.0e-03 +vbrbot=10.0e+00 +vbrsti=10.0e+00 +vbrgat=10.0e+00 +pbrbot=4.0e+00 +pbrsti=4.0e+00 +pbrgat=4.0e+00 +dta=0.0e+00 .end ngspice-26/examples/adms/mextram/0000755000265600020320000000000012264261473016450 5ustar andreasadminngspice-26/examples/adms/mextram/mex_gum.sp0000644000265600020320000000266512264261473020466 0ustar andreasadminMEXTRAM Gummel Test Ic,b,s=f(Vc,Ib) VB B 0 0.5 VC C 0 2.0 VS S 0 0.0 Q1 C B 0 S DT BJTRF1 .control dc vb 0.2 1.4 0.01 run plot abs(i(vc)) abs(i(vb)) abs(i(vs)) ylog xlimit 0.3 1.4 ylimit 1e-12 100e-3 plot abs(i(vc))/abs(i(vb)) vs abs(-i(vc)) xlog xlimit 1e-09 10e-3 ylimit 0 150 .endc .model BJTRF1 NPN LEVEL=6 +MULT=1.000E+00 +TREF=25.000E+00 +DTA=0.000E+00 +EXMOD=1.000E+00 +EXPHI=0.000E+00 +EXAVL=1.000E+00 +IS=23.571E-18 +IK=231.660E-03 +VER=2.100E+00 +VEF=36.001E+00 +BF=186.538E+00 +IBF=1.140E-15 +MLF=2.000E+00 +XIBI=0.000E+00 +BRI=9.231E+00 +IBR=61.600E-15 +VLR=400.000E-03 +XEXT=648.148E-03 +WAVL=1.064E-06 +VAVL=3.330E+00 +SFH=882.471E-03 +RE=949.668E-03 +RBC=27.769E+00 +RBV=32.004E+00 +RCBLX=1.0 +RCBLI=1.0 +RCC=18.026E+00 +RCV=237.417E+00 +SCRCV=882.839E+00 +IHC=3.370E-03 +AXI=300.000E-03 +CJE=55.566E-15 +VDE=900.000E-03 +PE=500.000E-03 +XCJE=52.478E-03 +CJC=25.153E-15 +VDC=660.000E-03 +PC=450.000E-03 +XP=310.000E-03 +MC=500.000E-03 +XCJC=122.100E-03 +MTAU=1.000E+00 +TAUE=6.200E-12 +TAUB=977.273E-15 +TEPI=7.980E-12 +TAUR=64.400E-12 +DEG=0.000E+00 +XREC=0.000E+00 +AQBO=701.246E-03 +AE=308.246E-03 +AB=846.000E-03 +AEPI=2.500E+00 +AEX=619.000E-03 +AC=1.580E+00 +DVGBF=52.000E-03 +DVGBR=0.000E+00 +VGB=1.197E+00 +VGC=1.200E+00 +VGJ=1.200E+00 +DVGTE=1.202E+00 +AF=2.350E+00 +KF=47.298E-09 +KFN=1.000E-09 +ISS=18.480E-18 +IKS=219.348E-06 +CJS=146.628E-15 +VDS=542.048E-03 +PS=314.095E-03 +VGS=1.221E+00 +AS=1.580E+00 +RTH=300 +CTH=3E-09 .end ngspice-26/examples/adms/mextram/mex_out.sp0000644000265600020320000000261012264261473020473 0ustar andreasadminMEXTRAM Output Test Ic=f(Vc,Ib) IB 0 b 1u VC C 0 2.0 VS S 0 0.0 Q1 C B 0 S DT BJTRF1 .control dc vc 0.0 6.0 0.05 ib 1u 8u 1u plot abs(i(vc)) xlabel Vce title Output-Characteristic plot v(dt) xlabel Vce ylabel grdC title Selfheating .endc .model BJTRF1 NPN LEVEL=6 +MULT=1.000E+00 +TREF=25.000E+00 +DTA=0.000E+00 +EXMOD=1.000E+00 +EXPHI=0.000E+00 +EXAVL=1.000E+00 +IS=23.571E-18 +IK=231.660E-03 +VER=2.100E+00 +VEF=36.001E+00 +BF=186.538E+00 +IBF=1.140E-15 +MLF=2.000E+00 +XIBI=0.000E+00 +BRI=9.231E+00 +IBR=61.600E-15 +VLR=400.000E-03 +XEXT=648.148E-03 +WAVL=1.064E-06 +VAVL=3.330E+00 +SFH=882.471E-03 +RE=949.668E-03 +RBC=27.769E+00 +RBV=32.004E+00 +RCBLX=10.0 +RCBLI=10.0 +RCC=18.026E+00 +RCV=237.417E+00 +SCRCV=882.839E+00 +IHC=3.370E-03 +AXI=300.000E-03 +CJE=55.566E-15 +VDE=900.000E-03 +PE=500.000E-03 +XCJE=52.478E-03 +CJC=25.153E-15 +VDC=660.000E-03 +PC=450.000E-03 +XP=310.000E-03 +MC=500.000E-03 +XCJC=122.100E-03 +MTAU=1.000E+00 +TAUE=6.200E-12 +TAUB=977.273E-15 +TEPI=7.980E-12 +TAUR=64.400E-12 +DEG=0.000E+00 +XREC=0.000E+00 +AQBO=701.246E-03 +AE=308.246E-03 +AB=846.000E-03 +AEPI=2.500E+00 +AEX=619.000E-03 +AC=1.580E+00 +DVGBF=52.000E-03 +DVGBR=0.000E+00 +VGB=1.197E+00 +VGC=1.200E+00 +VGJ=1.200E+00 +DVGTE=1.202E+00 +AF=2.350E+00 +KF=47.298E-09 +KFN=1.000E-09 +ISS=18.480E-18 +IKS=219.348E-06 +CJS=146.628E-15 +VDS=542.048E-03 +PS=314.095E-03 +VGS=1.221E+00 +AS=1.580E+00 +RTH=300 +CTH=3E-09 .end ngspice-26/examples/adms/hicum2/0000755000265600020320000000000012264261473016162 5ustar andreasadminngspice-26/examples/adms/hicum2/hic2_gum.sp0000644000265600020320000000052612264261473020226 0ustar andreasadminHICUM2v2.2 Gummel Test Ic,b,s=f(Vc,Ib) VB B 0 0.5 VC C 0 1.0 VS S 0 0.0 Q1 C B 0 S DT hicumL2V2p2_c_sbt .control dc vb 0.2 1.4 0.01 run plot abs(i(vc)) abs(i(vb)) abs(i(vs)) ylog xlimit 0.3 1.6 ylimit 1e-12 0.1 plot abs(i(vc))/abs(i(vb)) vs abs(-i(vc)) xlog xlimit 1e-09 10e-3 ylimit 0 120 .endc .include model-card-hicumL2V2p21.lib .end ngspice-26/examples/adms/hicum2/hic2_out.sp0000644000265600020320000000034312264261473020242 0ustar andreasadminHICUM2v2.2 Output Test Ic=f(Vc,Ib) IB 0 B 200n VC C 0 3.0 VS S 0 0.0 Q1 C B 0 S DT hicumL2V2p2_c_slh .control dc vc 0.0 2.0 0.05 ib 10u 50u 10u run plot abs(i(vc)) plot v(dt) .endc .include model-card-hicumL2V2p21.lib .end ngspice-26/examples/adms/hicum2/model-card-hicumL2V2p21.lib0000644000265600020320000004434112264261473022723 0ustar andreasadmin******************************************************************************** ******************************************************************************** * HICUM Level2 Version 2.2 model cards for testing ******************************************************************************** ******************************************************************************** * 1D transistor: Isothermal Simulation and Temperature dependence ******************************************************************************** .model hicumL2V2p2_1D npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=0.0 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * 1D transistor: Electrothermal Simulation to test self-heating ******************************************************************************** .model hicumL2V2p2_1D_slh npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=0.0 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=1.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * 1D transistor: Isothermal Simulation with NQS Effect: future ******************************************************************************** .model hicumL2V2p2_1D_nqs npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=0.0 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=1.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * 1D transistor: Isothermal Simulation to test collector current spreading ******************************************************************************** .model hicumL2V2p2_1D_ccs npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=0.0 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=0.0 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=3.765 latl=0.342 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Internal transistor (with Itun at peripheral node): Isothermal Simulation and Temperature dependence ******************************************************************************** .model hicumL2V2p2_i_tnp npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Internal transistor (with Itun at internal node): Isothermal Simulation and Temperature dependence ******************************************************************************** .model hicumL2V2p2_i_tni npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=0.0 + mbep=1.015 ireps=0.0 mrep=2.0 mcf=1.0 tbhrec=0.0 ibcis=1.16e-20 mbci=1.015 ibcxs=0.0 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=0.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=0.0 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=0.0 rcx=0.0 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=1.0e-20 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=1.0e-20 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=0.0 cbcpar=0.0 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Isothermal Simulation and Temperature dependence ******************************************************************************** .model hicumL2V2p2_c npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Electrothermal Simulation to test self-heating ******************************************************************************** .model hicumL2V2p2_c_slh npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=2.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Isothermal Simulation with NQS Effect: future ******************************************************************************** .model hicumL2V2p2_c_nqs npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=1.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Isothermal Simulation to test collector current spreading ******************************************************************************** .model hicumL2V2p2_c_ccs npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=0.0 msf=1.05 iscs=0.0 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=0.0 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=3.765 latl=0.342 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Isothermal Simulation with substrate transistor ******************************************************************************** .model hicumL2V2p2_c_sbt npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=1.0e-16 msf=1.05 iscs=1.0e-17 msc=1.0 tsf=1.05 rsu=0.0 + csu=0.0 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=3.64e-14 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=1.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete transistor: Isothermal Simulation with substrate network ******************************************************************************** .model hicumL2V2p2_c_sbn npn level=8 + c10=3.76E-32 qp0=2.78e-14 ich=2.09e-2 hfe=1.0 hfc=1.0 hjei=1.0 + hjci=1.0 tr=0.0 ibeis=1.16E-20 mbei=1.015 ireis=1.16e-16 mrei=2.0 ibeps=3.72e-21 + mbep=1.015 ireps=1.0e-30 mrep=2.0 mcf=1.0 tbhrec=250.0 ibcis=1.16e-20 mbci=1.015 ibcxs=4.39e-20 + mbcx=1.03 ibets=1.0e-20 abet=40.0 tunode=1.0 favl=1.186 qavl=11.1e-5 alfav=0.825e-4 + alqav=0.196e-3 rbi0=71.76 rbx=8.83 fgeo=0.73 fdqr0=0.2 fcrbi=0.0 flcomp=1 + fqi=1.0 re=12.534 rcx=9.165 itss=1.0e-16 msf=1.05 iscs=1.0e-17 msc=1.0 tsf=1.05 rsu=10.0 + csu=2.1e-15 cjei0=8.11e-15 vdei=0.95 zei=0.5 ajei=1.8 cjep0=2.07e-15 vdep=1.05 + zep=0.4 ajep=2.4 cjci0=1.16e-15 vdci=0.8 zci=0.333 vptci=46 cjcx0=5.4e-15 + vdcx=0.7 zcx=0.333 vptcx=100 fbcpar=0.1526 fbepar=0.5 cjs0=3.64e-14 vds=0.6 zs=0.447 + vpts=100 t0=4.75e-12 dt0h=2.1e-12 tbvl=4.0e-12 tef0=1.8e-12 gtfe=1.4 thcs=30.0e-12 + ahc=0.75 fthc=0.6 rci0=127.8 vlim=0.7 vces=0.1 vpt=5 cbepar=1.13e-15 cbcpar=2.97e-15 + alqf=0.225 alit=0.45 flnqs=0.0 kf=1.43e-8 af=2.0 latb=0.0 latl=0.0 vgb=1.17 + alt0=0.0 kt0=0.0 zetaci=1.6 alvs=1.0e-3 alces=0.4e-3 zetarbi=0.588 zetarbx=0.206 + zetarcx=0.223 zetare=0.0 zetacx=2.2 vge=1.1386 vgc=1.1143 vgs=1.15 f1vg=-1.02377e-4 + f2vg=4.3215e-4 zetact=3.5 zetabet=4.0 flsh=0.0 rth=1000.0 cth=1.0e-10 tnom=27.0 dt=0.0 ******************************************************************************** * Complete test transistor: default ******************************************************************************** .model hicumL2V2p2_default npn level=8 ******************************************************************************** ngspice-26/examples/adms/ekv/0000755000265600020320000000000012264261473015560 5ustar andreasadminngspice-26/examples/adms/ekv/ekv_tran.sp0000644000265600020320000000031312264261473017732 0ustar andreasadminEPFL-EKV version 2.6 nch .include ekv26_0u5.par * vd d 0 dc 0.1 vg g 0 dc 0.0 vs s 0 dc 0.0 vb b 0 dc 0.0 m1 d g s b nch * * Transfer .control dc vg 0 5 0.1 vb -5 0 1 plot abs(i(vd)) .endc * .end ngspice-26/examples/adms/ekv/ekv26_0u5.par0000644000265600020320000000720212264261473017713 0ustar andreasadmin********************************************************************** * EKV v2.6 parameters for 0.5um CMOS C. EPFL-LEG, 1999 * ---------------------------------- * * ELDO (LEVEL = 44) / PSPICE (LEVEL = 5) example parameter set * for the EKV v2.6 model is provided for NMOS and PMOS. * * * IMPORTANT NOTES: * ---------------- * * Parameters do not correspond to a particular technology but * have reasonable values for standard 0.5um CMOS. * Not intended for use in real design. * * Includes all intrinsic model parameters. An example set for * extrinsic model parameters is provided. * * Geometry range: W >= 0.8um, L >= 0.5um * Voltage range: |Vgb| < 3.3V, |Vdb| < 3.3V, |Vsb| < 2V * * For use with either simulator, comment/uncomment respective lines. * Use of extrinsic model parameters and models (series resistance, * junction currents/capacitances) is in general simulator-dependent. * ********************************************************************** * EKV v2.6 NMOS *--------------- .MODEL NCH NMOS + LEVEL = 44 *** Setup Parameters *+ UPDATE = 2.6 *+ XQC = 0.4 *** Process Related Model Parameters + COX = 3.45E-3 + XJ = 0.15E-6 *** Intrinsic Model Parameters + VTO = 0.6 + GAMMA = 0.71 + PHI = 0.97 + KP = 150E-6 + E0 = 88.0E6 + UCRIT = 4.5E6 + DL = -0.05E-6 + DW = -0.02E-6 + LAMBDA = 0.23 + LETA = 0.28 + WETA = 0.05 + Q0 = 280E-6 + LK = 0.5E-6 *** Substrate Current Parameters + IBN = 1.0 + IBA = 200E6 + IBB = 350E6 *** Intrinsic Model Temperature Parameters + TNOM = 25.0 + TCV = 1.5E-3 + BEX = -1.5 + UCEX = 1.7 + IBBT = 0.0 *** 1/f Noise Model Parameters + KF = 1E-27 + AF = 1 *** Short-Distance Matching Statistical Parameters (for MC simulation only) *+ AVTO = 0 DEV = 10.0E-3 ; ELDO v4.6 *+ AGAMMA = 0 DEV = 10.0E-3 ; ELDO v4.6 *+ AKP = 0 DEV = 25.0E-3 ; ELDO v4.6 *** Series Resistance and Area Calulation Parameters *+ RLEV = 3 + HDIF = 0.9E-6 + RSH = 510 *** Junction Current Parameters *+ ALEV = 3 + JS = 8.0E-6 + JSW = 1.5E-10 + XTI = 0 + N = 1.5 *** Junction Capacitances Parameters + CJ = 8.0E-4 + CJSW = 3.0E-10 + MJ = 0.5 + MJSW = 0.3 + PB = 0.9 + PBSW = 0.5 + FC = 0.5 *** Gate Overlap Capacitances + CGSO = 1.5E-10 + CGDO = 1.5E-10 + CGBO = 4.0E-10 * EKV v2.6 PMOS *--------------- .MODEL PCH PMOS + LEVEL = 44 *** Setup Parameters *+ UPDATE = 2.6 *+ XQC = 0.4 *** Process Related Model Parameters + COX = 3.45E-3 + XJ = 0.15E-6 *** Intrinsic Model Parameters + VTO = -0.55 + GAMMA = 0.69 + PHI = 0.87 + KP = 35.0E-6 + E0 = 51.0E6 + UCRIT = 18.0E6 + DL = -0.05E-6 + DW = -0.03E-6 + LAMBDA = 1.1 + LETA = 0.45 + WETA = 0.0 + Q0 = 200E-6 + LK = 0.6E-6 *** Substrate Current Parameters + IBN = 1.0 + IBA = 10E6 + IBB = 300E6 *** Intrinsic Model Temperature Parameters + TNOM = 25.0 + TCV = -1.4E-3 + BEX = -1.4 + UCEX = 2.0 + IBBT = 0.0 *** 1/f Noise Model Parameters + KF = 1.0E-28 + AF = 1 *** Short-Distance Matching Statistical Parameters (for MC simulation only) *+ AVTO = 0 DEV = 10.0E-3 ; ELDO v4.6 *+ AGAMMA = 0 DEV = 10.0E-3 ; ELDO v4.6 *+ AKP = 0 DEV = 25.0E-3 ; ELDO v4.6 *** Series Resistance and Area Calulation Parameters *+ RLEV = 3 + HDIF = 0.9E-6 + RSH = 990 *** Junction Current Parameters *+ ALEV = 3 + JS = 4.0E-5 + JSW = 7.0E-10 + XTI = 0 + N = 1.8 *** Junction Capacitances Parameters + CJ = 8.0E-4 + CJSW = 4.0E-10 + MJ = 0.5 + MJSW = 0.35 + PB = 0.9 + PBSW = 0.8 + FC = 0.5 *** Gate Overlap Capacitances + CGSO = 1.5E-10 + CGDO = 1.5E-10 + CGBO = 4.0E-10 ngspice-26/examples/adms/ekv/ekv_out.sp0000644000265600020320000000031112264261473017573 0ustar andreasadminEPFL-EKV version 2.6 nch .include ekv26_0u5.par vd d 0 dc 0.1 vg g 0 dc 0.0 vs s 0 dc 0.0 vb b 0 dc 0.0 m1 d g s b nch * * Transfer .control dc vd 0 5 0.01 vg 1 5 1 plot abs(i(vd)) .endc * .end ngspice-26/examples/cider/0000755000265600020320000000000012264261473015135 5ustar andreasadminngspice-26/examples/cider/diode/0000755000265600020320000000000012264261473016221 5ustar andreasadminngspice-26/examples/cider/diode/diotran.cir0000644000265600020320000000153312264261473020362 0ustar andreasadminDiode Reverse Recovery * This file simulates reverse recovery of a diode as it switched from an * on to off state. Vpp 1 0 0.7v (PWL 0ns 3.0v 0.1ns 3.0v 0.11ns -6.0v) (AC 1v) Vnn 2 0 0v R1 1 3 1k D1 3 2 M_PN area=100 .MODEL M_PN numd level=1 + *************************************** + *** One-Dimensional Numerical Diode *** + *************************************** + options defa=1p + x.mesh loc=0.0 n=1 + x.mesh loc=1.3 n=201 + domain num=1 material=1 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + doping gauss p.type conc=3e20 x.l=0.0 x.h=0.0 char.l=0.100 + doping unif n.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.l=0.100 + models bgn aval srh auger conctau concmob fieldmob + method ac=direct .option acct bypass=1 abstol=1e-15 itl2=100 .tran 0.001ns 1.0ns .print i(Vpp) .END ngspice-26/examples/cider/diode/diode.cir0000644000265600020320000000176412264261473020014 0ustar andreasadminOne-Dimensional Diode Simulation * Several simulations are performed by this file. * They are: * 1. An operating point at 0.7v forward bias. * 2. An ac analysis at 0.7v forward bias. * 3. The forward and reverse bias characteristics from -3v to 2v. Vpp 1 0 0.7v (PWL 0ns 3.0v 0.01ns -6.0v) (AC 1v) Vnn 2 0 0v D1 1 2 M_PN AREA=100 .model M_PN numd level=1 + *************************************** + *** One-Dimensional Numerical Diode *** + *************************************** + options defa=1p + x.mesh loc=0.0 n=1 + x.mesh loc=1.3 n=201 + domain num=1 material=1 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + doping gauss p.type conc=1e20 x.l=0.0 x.h=0.0 char.l=0.100 + doping unif n.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.l=0.100 + models bgn aval srh auger conctau concmob fieldmob + method ac=direct .option acct bypass=0 abstol=1e-18 itl2=100 .op .ac dec 10 100kHz 10gHz .dc Vpp -3.0v 2.0001v 50mv .print i(Vpp) .END ngspice-26/examples/cider/diode/pindiode.cir0000644000265600020320000000160112264261473020511 0ustar andreasadminTWO-DIMENSIONAL PIN-DIODE CIRCUIT VIN 1 0 0.0v (PWL 0ns 0.8v 1ns -50.0v) L1 1 2 0.5uH VD 2 3 0.0v D1 3 0 M_PIN AREA=200 IC.FILE="OP.0.d1" VRC 2 4 0.0v R1 4 5 100 C1 5 0 1.0nF .MODEL M_PIN NUMD LEVEL=2 + options defw=1000u + x.mesh n=1 l=0.0 + x.mesh n=2 l=0.2 + x.mesh n=4 l=0.4 + x.mesh n=8 l=0.6 + x.mesh n=13 l=1.0 + + y.mesh n=1 l=0.0 + y.mesh n=9 l=4.0 + y.mesh n=24 l=10.0 + y.mesh n=29 l=15.0 + y.mesh n=34 l=20.0 + + domain num=1 material=1 + material num=1 silicon tn=20ns tp=20ns + + electrode num=1 x.l=0.6 x.h=1.0 y.h=0.0 + electrode num=2 y.l=20.0 + + doping gauss p.type conc=1.0e20 char.len=1.076 x.l=0.75 x.h=1.1 y.h=0.0 + + lat.rotate ratio=0.1 + doping unif n.type conc=1.0e14 + doping gauss n.type conc=1.0e20 char.len=1.614 x.l=-0.1 x.h=1.1 y.l=20.0 + + models bgn srh auger conctau concmob fieldmob .OPTION ACCT BYPASS=1 .TRAN 1NS 100NS .PRINT TRAN v(3) I(VIN) .END ngspice-26/examples/cider/bjt/0000755000265600020320000000000012264261473015714 5ustar andreasadminngspice-26/examples/cider/bjt/ecp.cir0000644000265600020320000000307412264261473017166 0ustar andreasadminEmitter Coupled Pair VCC 1 0 5v VEE 2 0 0v RCP 1 11 10k RCN 1 21 10k VBBP 12 0 3v AC 1 VBBN 22 0 3v IEE 13 2 0.1mA Q1 11 12 13 M_NPN AREA=8 Q2 21 22 13 M_NPN AREA=8 .DC VBBP 2.75v 3.25001v 10mv .PRINT V(21) V(11) .MODEL M_NPN nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since, we are only simulating half of a device, we double the unit width + * 1.0 um emitter length + options defw=2.0u + + *x.mesh w=2.5 n=5 + x.mesh w=2.0 h.e=0.05 h.m=0.2 r=1.5 + x.mesh w=0.5 h.s=0.05 h.m=0.1 r=1.5 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.10 h.e=0.002 h.m=0.01 r=1.5 + y.mesh w=0.15 h.s=0.002 h.m=0.01 r=1.5 + y.mesh w=0.35 h.s=0.01 h.m=0.2 r=1.5 + y.mesh w=0.40 h.e=0.05 h.m=0.2 r=1.5 + y.mesh w=0.30 h.s=0.05 h.m=0.1 r=1.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss n.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss p.type conc=1e19 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.094 lat.rotate + doping unif n.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss n.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/bjt/pz.cir0000644000265600020320000000030612264261473017043 0ustar andreasadminPZ Analysis of a Common Emitter Amplifier Vcc 1 0 5v Vee 2 0 0v Vin 3 0 0.7838 AC 1 RS 3 4 1K Q1 5 4 2 M_NPN AREA=4 SAVE RL 1 5 2.5k CL 5 0 0.1pF .INCLUDE pebjt.lib .PZ 3 0 5 0 vol pz .END ngspice-26/examples/cider/bjt/astable.cir0000644000265600020320000000152412264261473020030 0ustar andreasadminAstable multivibrator vin 5 0 dc 0 pulse(0 5 0 1us 1us 100us 100us) vcc 6 0 5.0 rc1 6 1 1k rc2 6 2 1k rb1 6 3 30k rb2 5 4 30k c1 1 4 150pf c2 2 3 150pf q1 1 3 0 qmod area = 100p q2 2 4 0 qmod area = 100p .option acct bypass=1 .tran 0.05us 8us 0us 0.05us .print tran v(1) v(2) v(3) v(4) .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .end ngspice-26/examples/cider/bjt/pebjt.lib0000644000265600020320000000512212264261473017510 0ustar andreasadmin** * Numerical models for a * polysilicon emitter complementary bipolar process. * The default device size is 1um by 10um (LxW) ** .model M_NPN nbjt level=1 + title One-Dimensional Numerical Bipolar + options base.depth=0.15 base.area=0.1 base.length=1.0 defa=10p + x.mesh loc=-0.2 n=1 + x.mesh loc=0.0 n=51 + x.mesh wid=0.15 h.e=0.0001 h.m=.004 r=1.2 + x.mesh wid=1.15 h.s=0.0001 h.m=.004 r=1.2 + domain num=1 material=1 x.l=0.0 + domain num=2 material=2 x.h=0.0 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + material num=2 polysilicon + mobility mat=2 concmod=ct fieldmod=ct + doping gauss n.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 + doping gauss p.type conc=5e18 x.l=-0.2 x.h=0.0 char.len=0.100 + doping unif n.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + models bgn srh auger conctau concmob fieldmob ^aval + method devtol=1e-12 ac=direct itlim=15 .model M_NPSUB numd level=1 + title One-Dimensional Numerical Collector-Substrate Diode + options defa=10p + x.mesh loc=1.3 n=1 + x.mesh loc=2.0 n=101 + domain num=1 material=1 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + doping unif p.type conc=1e15 x.l=0.0 x.h=2.0 + models bgn srh auger conctau concmob fieldmob ^aval + method devtol=1e-12 itlim=10 .model M_PNP nbjt level=1 + title One-Dimensional Numerical Bipolar + options base.depth=0.2 base.area=0.1 base.length=1.0 defa=10p + x.mesh loc=-0.2 n=1 + x.mesh loc=0.0 n=51 + x.mesh wid=0.20 h.e=0.0001 h.m=.004 r=1.2 + x.mesh wid=1.10 h.s=0.0001 h.m=.004 r=1.2 + domain num=1 material=1 x.l=0.0 + domain num=2 material=2 x.h=0.0 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + material num=2 polysilicon + mobility mat=2 concmod=ct fieldmod=ct + doping gauss p.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 + doping gauss n.type conc=5e17 x.l=-0.2 x.h=0.0 char.len=0.200 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss p.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + models bgn srh auger conctau concmob fieldmob ^aval + method devtol=1e-12 ac=direct itlim=15 .model M_PNSUB numd level=1 + title One-Dimensional Numerical Collector-Substrate Diode + options defa=10p + x.mesh loc=1.3 n=1 + x.mesh loc=2.0 n=101 + domain num=1 material=1 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + doping gauss p.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + doping unif n.type conc=1e15 x.l=0.0 x.h=2.0 + models bgn srh auger conctau concmob fieldmob ^aval + method devtol=1e-12 itlim=10 ngspice-26/examples/cider/bjt/vco.cir0000644000265600020320000000172112264261473017203 0ustar andreasadminVoltage controlled oscillator rc1 7 5 1k rc2 7 6 1k q5 7 7 5 qmod area = 100p q6 7 7 6 qmod area = 100p q3 7 5 2 qmod area = 100p q4 7 6 1 qmod area = 100p ib1 2 0 .5ma ib2 1 0 .5ma cb1 2 0 1pf cb2 1 0 1pf q1 5 1 3 qmod area = 100p q2 6 2 4 qmod area = 100p c1 3 4 .1uf is1 3 0 dc 2.5ma pulse 2.5ma 0.5ma 0 1us 1us 50ms is2 4 0 1ma vcc 7 0 10 .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .option acct bypass=1 .tran 3us 600us 0 3us .print tran v(4) .end ngspice-26/examples/cider/bjt/colposc.cir0000644000265600020320000000142612264261473020060 0ustar andreasadminColpitt's Oscillator Circuit r1 1 0 1 q1 2 1 3 qmod area = 100p vcc 4 0 5 rl 4 2 750 c1 2 3 500p c2 4 3 4500p l1 4 2 5uH re 3 6 4.65k vee 6 0 dc -15 pwl 0 -15 1e-9 -10 .tran 30n 12u .print tran v(2) .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .options acct bypass=1 .end ngspice-26/examples/cider/bjt/invchain.cir0000644000265600020320000000162012264261473020211 0ustar andreasadmin4 Stage RTL Inverter Chain vin 1 0 dc 0v pwl 0ns 0v 1ns 5v vcc 12 0 dc 5.0v rc1 12 3 2.5k rb1 1 2 8k q1 3 2 0 qmod area = 100p rb2 3 4 8k rc2 12 5 2.5k q2 5 4 0 qmod area = 100p rb3 5 6 8k rc3 12 7 2.5k q3 7 6 0 qmod area = 100p rb4 7 8 8k rc4 12 9 2.5k q4 9 8 0 qmod area = 100p .print tran v(3) v(5) v(9) .tran 1e-9 10e-9 .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .option acct bypass=1 .end ngspice-26/examples/cider/bjt/rtlinv.cir0000644000265600020320000000133312264261473017731 0ustar andreasadminRTL inverter vin 1 0 dc 1 pwl 0 4 1ns 0 vcc 12 0 dc 5.0 rc1 12 3 2.5k rb1 1 2 8k q1 3 2 0 qmod area = 100p .option acct bypass=1 .tran 0.5n 5n .print tran v(2) v(3) .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .end ngspice-26/examples/cider/bjt/meclgate.cir0000644000265600020320000000274612264261473020205 0ustar andreasadminMotorola MECL III ECL gate *.dc vin -2.0 0 0.02 .tran 0.2ns 20ns vee 22 0 -6.0 vin 1 0 pulse -0.8 -1.8 0.2ns 0.2ns 0.2ns 10ns 20ns rs 1 2 50 q1 4 2 6 qmod area = 100p q2 4 3 6 qmod area = 100p q3 5 7 6 qmod area = 100p q4 0 8 7 qmod area = 100p d1 8 9 dmod d2 9 10 dmod rp1 3 22 50k rc1 0 4 100 rc2 0 5 112 re 6 22 380 r1 7 22 2k r2 0 8 350 r3 10 22 1958 q5 0 5 11 qmod area = 100p q6 0 4 12 qmod area = 100p rp2 11 22 560 rp3 12 22 560 q7 13 12 15 qmod area = 100p q8 14 16 15 qmod area = 100p re2 15 22 380 rc3 0 13 100 rc4 0 14 112 q9 0 17 16 qmod area = 100p r4 16 22 2k r5 0 17 350 d3 17 18 dmod d4 18 19 dmod r6 19 22 1958 q10 0 14 20 qmod area = 100p q11 0 13 21 qmod area = 100p rp4 20 22 560 rp5 21 22 560 .model dmod d rs=40 tt=0.1ns cjo=0.9pf n=1 is=1e-14 eg=1.11 vj=0.8 m=0.5 .model qmod nbjt level=1 + x.mesh node=1 loc=0.0 + x.mesh node=10 loc=0.9 + x.mesh node=20 loc=1.1 + x.mesh node=30 loc=1.4 + x.mesh node=40 loc=1.6 + x.mesh node=61 loc=3.0 + region num=1 material=1 + material num=1 silicon nbgnn=1e17 nbgnp=1e17 + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + doping unif n.type conc=1e17 x.l=0.0 x.h=1.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.5 + doping unif n.type conc=1e15 x.l=0.0 x.h=3.0 + models bgnw srh conctau auger concmob fieldmob + options base.length=1.0 base.depth=1.25 .options acct bypass=1 .print tran v(12) v(21) .end ngspice-26/examples/cider/serial/0000755000265600020320000000000012264261473016414 5ustar andreasadminngspice-26/examples/cider/serial/astable.cir0000644000265600020320000000132012264261473020522 0ustar andreasadminASTABLE MULTIVIBRATOR VIN 5 0 DC 0 PULSE(0 5 0 1US 1US 100US 100US) VCC 6 0 5.0 RC1 6 1 1K RC2 6 2 1K RB1 6 3 30K RB2 5 4 30K C1 1 4 150PF C2 2 3 150PF Q1 1 3 0 QMOD AREA = 100P Q2 2 4 0 QMOD AREA = 100P .OPTION ACCT BYPASS=1 .TRAN 0.05US 8US 0US 0.05US .PRINT TRAN V(1) V(2) V(3) V(4) .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .END ngspice-26/examples/cider/serial/charge.cir0000644000265600020320000000236612264261473020353 0ustar andreasadminMOS CHARGE PUMP VIN 4 0 DC 0V PULSE 0 5 15NS 5NS 5NS 50NS 100NS VDD 5 6 DC 0V PULSE 0 5 25NS 5NS 5NS 50NS 100NS VBB 0 7 DC 0V PULSE 0 5 0NS 5NS 5NS 50NS 100NS RD 6 2 10K M1 5 4 3 7 MMOD W=100UM VS 3 2 0 VC 2 1 0 C2 1 0 10PF .IC V(3)=1.0 .TRAN 2NS 200NS .OPTIONS ACCT BYPASS=1 .PRINT TRAN V(1) V(2) .MODEL MMOD NUMOS + X.MESH N=1 L=0 + X.MESH N=3 L=0.4 + X.MESH N=7 L=0.6 + X.MESH N=15 L=1.4 + X.MESH N=19 L=1.6 + X.MESH N=21 L=2.0 + + Y.MESH N=1 L=0 + Y.MESH N=4 L=0.015 + Y.MESH N=8 L=0.05 + Y.MESH N=12 L=0.25 + Y.MESH N=14 L=0.35 + Y.MESH N=17 L=0.5 + Y.MESH N=21 L=1.0 + + REGION NUM=1 MATERIAL=1 Y.L=0.015 + MATERIAL NUM=1 SILICON + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + + REGION NUM=2 MATERIAL=2 Y.H=0.015 X.L=0.5 X.H=1.5 + MATERIAL NUM=2 OXIDE + + ELEC NUM=1 IX.L=18 IX.H=21 IY.L=4 IY.H=4 + ELEC NUM=2 IX.L=5 IX.H=17 IY.L=1 IY.H=1 + ELEC NUM=3 IX.L=1 IX.H=4 IY.L=4 IY.H=4 + ELEC NUM=4 IX.L=1 IX.H=21 IY.L=21 IY.H=21 + + DOPING UNIF N.TYPE CONC=1E18 X.L=0.0 X.H=0.5 Y.L=0.015 Y.H=0.25 + DOPING UNIF N.TYPE CONC=1E18 X.L=1.5 X.H=2.0 Y.L=0.015 Y.H=0.25 + DOPING UNIF P.TYPE CONC=1E15 X.L=0.0 X.H=2.0 Y.L=0.015 Y.H=1.0 + DOPING UNIF P.TYPE CONC=1.3E17 X.L=0.5 X.H=1.5 Y.L=0.015 Y.H=0.05 + + MODELS CONCMOB FIELDMOB + METHOD ONEC .END ngspice-26/examples/cider/serial/readme0000644000265600020320000000023612264261473017575 0ustar andreasadminThis directory contains the CIDER serial-version benchmarks used in the thesis "Design-Oriented Mixed-Level Circuit and Device Simulation" by David A. Gates. ngspice-26/examples/cider/serial/pass.cir0000644000265600020320000000237512264261473020070 0ustar andreasadminTURNOFF TRANSIENT OF PASS TRANSISTOR M1 11 2 3 4 MMOD W=20UM CS 1 0 6.0PF CL 3 0 6.0PF R1 3 6 200K VIN 6 0 DC 0 VDRN 1 11 DC 0 VG 2 0 DC 5 PWL 0 5 0.1N 0 1 0 VB 4 0 DC 0.0 .TRAN 0.05NS 0.2NS 0.0NS 0.05NS .PRINT TRAN V(1) I(VDRN) .IC V(1)=0 V(3)=0 .OPTION ACCT BYPASS=1 .MODEL MMOD NUMOS + X.MESH L=0.0 N=1 + X.MESH L=0.6 N=4 + X.MESH L=0.7 N=5 + X.MESH L=1.0 N=7 + X.MESH L=1.2 N=11 + X.MESH L=3.2 N=21 + X.MESH L=3.4 N=25 + X.MESH L=3.7 N=27 + X.MESH L=3.8 N=28 + X.MESH L=4.4 N=31 + + Y.MESH L=-.05 N=1 + Y.MESH L=0.0 N=5 + Y.MESH L=.05 N=9 + Y.MESH L=0.3 N=14 + Y.MESH L=2.0 N=19 + + REGION NUM=1 MATERIAL=1 Y.L=0.0 + MATERIAL NUM=1 SILICON + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + + REGION NUM=2 MATERIAL=2 Y.H=0.0 X.L=0.7 X.H=3.7 + MATERIAL NUM=2 OXIDE + + ELEC NUM=1 X.L=3.8 X.H=4.4 Y.L=0.0 Y.H=0.0 + ELEC NUM=2 X.L=0.7 X.H=3.7 IY.L=1 IY.H=1 + ELEC NUM=3 X.L=0.0 X.H=0.6 Y.L=0.0 Y.H=0.0 + ELEC NUM=4 X.L=0.0 X.H=4.4 Y.L=2.0 Y.H=2.0 + + DOPING UNIF P.TYPE CONC=2.5E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=2.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=0.05 + DOPING UNIF N.TYPE CONC=1E20 X.L=0.0 X.H=1.1 Y.L=0.0 Y.H=0.2 + DOPING UNIF N.TYPE CONC=1E20 X.L=3.3 X.H=4.4 Y.L=0.0 Y.H=0.2 + + MODELS CONCMOB FIELDMOB + METHOD AC=DIRECT ONEC .END ngspice-26/examples/cider/serial/recovery.cir0000644000265600020320000000157012264261473020754 0ustar andreasadminDIODE REVERSE RECOVERY VPP 1 0 0.0V (PULSE 1.0V -1.0V 1NS 1PS 1PS 20NS 40NS) VNN 2 0 0.0V RS 1 3 1.0 LS 3 4 0.5UH DT 4 2 M_PIN AREA=1 .MODEL M_PIN NUMD LEVEL=2 + OPTIONS DEFW=100U + X.MESH N=1 L=0.0 + X.MESH N=2 L=0.2 + X.MESH N=4 L=0.4 + X.MESH N=8 L=0.6 + X.MESH N=13 L=1.0 + + Y.MESH N=1 L=0.0 + Y.MESH N=9 L=4.0 + Y.MESH N=24 L=10.0 + Y.MESH N=29 L=15.0 + Y.MESH N=34 L=20.0 + + DOMAIN NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON TN=20NS TP=20NS + + ELECTRODE NUM=1 X.L=0.6 X.H=1.0 Y.L=0.0 Y.H=0.0 + ELECTRODE NUM=2 X.L=-0.1 X.H=1.0 Y.L=20.0 Y.H=20.0 + + DOPING GAUSS P.TYPE CONC=1.0E19 CHAR.LEN=1.076 X.L=0.75 X.H=1.1 Y.H=0.0 + + LAT.ROTATE RATIO=0.1 + DOPING UNIF N.TYPE CONC=1.0E14 + DOPING GAUSS N.TYPE CONC=1.0E19 CHAR.LEN=1.614 X.L=-0.1 X.H=1.1 Y.L=20.0 + + MODELS BGN SRH AUGER CONCTAU CONCMOB FIELDMOB .OPTION ACCT BYPASS=1 .TRAN 0.1NS 10NS .PRINT TRAN V(3) I(VIN) .END ngspice-26/examples/cider/serial/vco.cir0000644000265600020320000000151512264261473017704 0ustar andreasadminVOLTAGE CONTROLLED OSCILLATOR RC1 7 5 1K RC2 7 6 1K Q5 7 7 5 QMOD AREA = 100P Q6 7 7 6 QMOD AREA = 100P Q3 7 5 2 QMOD AREA = 100P Q4 7 6 1 QMOD AREA = 100P IB1 2 0 .5MA IB2 1 0 .5MA CB1 2 0 1PF CB2 1 0 1PF Q1 5 1 3 QMOD AREA = 100P Q2 6 2 4 QMOD AREA = 100P C1 3 4 .1UF IS1 3 0 DC 2.5MA PULSE 2.5MA 0.5MA 0 1US 1US 50MS IS2 4 0 1MA VCC 7 0 10 .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .OPTION ACCT BYPASS=1 .TRAN 3US 600US 0 3US .PRINT TRAN V(4) .END ngspice-26/examples/cider/serial/colposc.cir0000644000265600020320000000122212264261473020552 0ustar andreasadminCOLPITT'S OSCILLATOR CIRCUIT R1 1 0 1 Q1 2 1 3 QMOD AREA = 100P VCC 4 0 5 RL 4 2 750 C1 2 3 500P C2 4 3 4500P L1 4 2 5UH RE 3 6 4.65K VEE 6 0 DC -15 PWL 0 -15 1E-9 -10 .TRAN 30N 12U .PRINT TRAN V(2) .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/serial/pullup.cir0000644000265600020320000000343312264261473020437 0ustar andreasadminBICMOS INVERTER PULLUP CIRCUIT VDD 1 0 5.0V VSS 2 0 0.0V VIN 3 0 0.75V VC 1 11 0.0V VB 5 15 0.0V Q1 11 15 4 M_NPN AREA=4 M1 5 3 1 1 M_PMOS W=20U L=2U AD=30P AS=30P PD=21U PS=21U CL 4 0 5.0PF .IC V(4)=0.75V V(5)=0.0V .MODEL M_PMOS PMOS VTO=-0.8 UO=250 TOX=25N NSUB=5E16 + UCRIT=10K UEXP=.15 VMAX=50K NEFF=2 XJ=.02U + LD=.15U CGSO=.1N CGDO=.1N CJ=.12M MJ=0.5 + CJSW=0.3N MJSW=0.5 LEVEL=2 .MODEL M_NPN NBJT LEVEL=2 + TITLE TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + $ SINCE ONLY HALF THE DEVICE IS SIMULATED, DOUBLE THE UNIT WIDTH TO GET + $ 1.0 UM EMITTER. + OPTIONS DEFW=2.0U + OUTPUT STATISTICS + + X.MESH W=2.0 H.E=0.02 H.M=0.5 R=2.0 + X.MESH W=0.5 H.S=0.02 H.M=0.2 R=2.0 + + Y.MESH L=-0.2 N=1 + Y.MESH L= 0.0 N=5 + Y.MESH W=0.10 H.E=0.004 H.M=0.05 R=2.5 + Y.MESH W=0.15 H.S=0.004 H.M=0.02 R=2.5 + Y.MESH W=1.05 H.S=0.02 H.M=0.1 R=2.5 + + DOMAIN NUM=1 MATERIAL=1 X.L=2.0 Y.H=0.0 + DOMAIN NUM=2 MATERIAL=2 X.H=2.0 Y.H=0.0 + DOMAIN NUM=3 MATERIAL=3 Y.L=0.0 + MATERIAL NUM=1 POLYSILICON + MATERIAL NUM=2 OXIDE + MATERIAL NUM=3 SILICON + + ELEC NUM=1 X.L=0.0 X.H=0.0 Y.L=1.1 Y.H=1.3 + ELEC NUM=2 X.L=0.0 X.H=0.5 Y.L=0.0 Y.H=0.0 + ELEC NUM=3 X.L=2.0 X.H=3.0 Y.L=-0.2 Y.H=-0.2 + + DOPING GAUSS N.TYPE CONC=3E20 X.L=2.0 X.H=3.0 Y.L=-0.2 Y.H=0.0 + + CHAR.L=0.047 LAT.ROTATE + DOPING GAUSS P.TYPE CONC=5E18 X.L=0.0 X.H=5.0 Y.L=-0.2 Y.H=0.0 + + CHAR.L=0.100 LAT.ROTATE + DOPING GAUSS P.TYPE CONC=1E20 X.L=0.0 X.H=0.5 Y.L=-0.2 Y.H=0.0 + + CHAR.L=0.100 LAT.ROTATE RATIO=0.7 + DOPING UNIF N.TYPE CONC=1E16 X.L=0.0 X.H=5.0 Y.L=0.0 Y.H=1.3 + DOPING GAUSS N.TYPE CONC=5E19 X.L=0.0 X.H=5.0 Y.L=1.3 Y.H=1.3 + + CHAR.L=0.100 LAT.ROTATE + + METHOD AC=DIRECT ITLIM=10 + MODELS BGN SRH AUGER CONCTAU CONCMOB FIELDMOB .TRAN 0.5NS 4.0NS .PRINT TRAN V(3) V(4) .OPTION ACCT BYPASS=1 .END ngspice-26/examples/cider/serial/invchain.cir0000644000265600020320000000141412264261473020712 0ustar andreasadmin4 STAGE RTL INVERTER CHAIN VIN 1 0 DC 0V PWL 0NS 0V 1NS 5V VCC 12 0 DC 5.0V RC1 12 3 2.5K RB1 1 2 8K Q1 3 2 0 QMOD AREA = 100P RB2 3 4 8K RC2 12 5 2.5K Q2 5 4 0 QMOD AREA = 100P RB3 5 6 8K RC3 12 7 2.5K Q3 7 6 0 QMOD AREA = 100P RB4 7 8 8K RC4 12 9 2.5K Q4 9 8 0 QMOD AREA = 100P .PRINT TRAN V(3) V(5) V(9) .TRAN 1E-9 10E-9 .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .OPTION ACCT BYPASS=1 .END ngspice-26/examples/cider/serial/nmosinv.cir0000644000265600020320000000226012264261473020604 0ustar andreasadminRESISTIVE LOAD NMOS INVERTER VIN 1 0 PWL 0 0.0 2NS 5 VDD 3 0 DC 5.0 RD 3 2 2.5K M1 2 1 4 5 MMOD W=10UM CL 2 0 2PF VB 5 0 0 VS 4 0 0 .MODEL MMOD NUMOS + X.MESH L=0.0 N=1 + X.MESH L=0.6 N=4 + X.MESH L=0.7 N=5 + X.MESH L=1.0 N=7 + X.MESH L=1.2 N=11 + X.MESH L=3.2 N=21 + X.MESH L=3.4 N=25 + X.MESH L=3.7 N=27 + X.MESH L=3.8 N=28 + X.MESH L=4.4 N=31 + + Y.MESH L=-.05 N=1 + Y.MESH L=0.0 N=5 + Y.MESH L=.05 N=9 + Y.MESH L=0.3 N=14 + Y.MESH L=2.0 N=19 + + REGION NUM=1 MATERIAL=1 Y.L=0.0 + MATERIAL NUM=1 SILICON + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + + REGION NUM=2 MATERIAL=2 Y.H=0.0 X.L=0.7 X.H=3.7 + MATERIAL NUM=2 OXIDE + + ELEC NUM=1 X.L=3.8 X.H=4.4 Y.L=0.0 Y.H=0.0 + ELEC NUM=2 X.L=0.7 X.H=3.7 IY.L=1 IY.H=1 + ELEC NUM=3 X.L=0.0 X.H=0.6 Y.L=0.0 Y.H=0.0 + ELEC NUM=4 X.L=0.0 X.H=4.4 Y.L=2.0 Y.H=2.0 + + DOPING UNIF P.TYPE CONC=2.5E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=2.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=0.05 + DOPING UNIF N.TYPE CONC=1E20 X.L=0.0 X.H=1.1 Y.L=0.0 Y.H=0.2 + DOPING UNIF N.TYPE CONC=1E20 X.L=3.3 X.H=4.4 Y.L=0.0 Y.H=0.2 + + MODELS CONCMOB FIELDMOB + METHOD AC=DIRECT ONEC .TRAN 0.2NS 30NS .OPTIONS ACCT BYPASS=1 .PRINT TRAN V(1) V(2) .END ngspice-26/examples/cider/serial/rtlinv.cir0000644000265600020320000000112712264261473020432 0ustar andreasadminRTL INVERTER VIN 1 0 DC 1 PWL 0 4 1NS 0 VCC 12 0 DC 5.0 RC1 12 3 2.5K RB1 1 2 8K Q1 3 2 0 QMOD AREA = 100P .OPTION ACCT BYPASS=1 .TRAN 0.5N 5N .PRINT TRAN V(2) V(3) .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .END ngspice-26/examples/cider/serial/meclgate.cir0000644000265600020320000000254212264261473020677 0ustar andreasadminMOTOROLA MECL III ECL GATE *.DC VIN -2.0 0 0.02 .TRAN 0.2NS 20NS VEE 22 0 -6.0 VIN 1 0 PULSE -0.8 -1.8 0.2NS 0.2NS 0.2NS 10NS 20NS RS 1 2 50 Q1 4 2 6 QMOD AREA = 100P Q2 4 3 6 QMOD AREA = 100P Q3 5 7 6 QMOD AREA = 100P Q4 0 8 7 QMOD AREA = 100P D1 8 9 DMOD D2 9 10 DMOD RP1 3 22 50K RC1 0 4 100 RC2 0 5 112 RE 6 22 380 R1 7 22 2K R2 0 8 350 R3 10 22 1958 Q5 0 5 11 QMOD AREA = 100P Q6 0 4 12 QMOD AREA = 100P RP2 11 22 560 RP3 12 22 560 Q7 13 12 15 QMOD AREA = 100P Q8 14 16 15 QMOD AREA = 100P RE2 15 22 380 RC3 0 13 100 RC4 0 14 112 Q9 0 17 16 QMOD AREA = 100P R4 16 22 2K R5 0 17 350 D3 17 18 DMOD D4 18 19 DMOD R6 19 22 1958 Q10 0 14 20 QMOD AREA = 100P Q11 0 13 21 QMOD AREA = 100P RP4 20 22 560 RP5 21 22 560 .MODEL DMOD D RS=40 TT=0.1NS CJO=0.9PF N=1 IS=1E-14 EG=1.11 VJ=0.8 M=0.5 .MODEL QMOD NBJT LEVEL=1 + X.MESH NODE=1 LOC=0.0 + X.MESH NODE=10 LOC=0.9 + X.MESH NODE=20 LOC=1.1 + X.MESH NODE=30 LOC=1.4 + X.MESH NODE=40 LOC=1.6 + X.MESH NODE=61 LOC=3.0 + REGION NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON NBGNN=1E17 NBGNP=1E17 + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + DOPING UNIF N.TYPE CONC=1E17 X.L=0.0 X.H=1.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=1.5 + DOPING UNIF N.TYPE CONC=1E15 X.L=0.0 X.H=3.0 + MODELS BGNW SRH CONCTAU AUGER CONCMOB FIELDMOB + OPTIONS BASE.LENGTH=1.0 BASE.DEPTH=1.25 .OPTIONS ACCT BYPASS=1 .PRINT TRAN V(12) V(21) .END ngspice-26/examples/cider/serial/dbridge.cir0000644000265600020320000000143212264261473020513 0ustar andreasadminDIODE BRIDGE RECTIFIER VLINE 3 4 0.0V SIN 0V 10V 60HZ VGRND 2 0 0.0V D1 3 1 M_PN AREA=100 D2 4 1 M_PN AREA=100 D3 2 3 M_PN AREA=100 D4 2 4 M_PN AREA=100 RL 1 2 1.0K .MODEL M_PN NUMD LEVEL=1 + *************************************** + *** ONE-DIMENSIONAL NUMERICAL DIODE *** + *************************************** + OPTIONS DEFA=1P + X.MESH LOC=0.0 N=1 + X.MESH LOC=30.0 N=201 + DOMAIN NUM=1 MATERIAL=1 + MATERIAL NUM=1 SILICON + MOBILITY MAT=1 CONCMOD=CT FIELDMOD=CT + DOPING GAUSS P.TYPE CONC=1E20 X.L=0.0 X.H=0.0 CHAR.L=1.0 + DOPING UNIF N.TYPE CONC=1E14 X.L=0.0 X.H=30.0 + DOPING GAUSS N.TYPE CONC=5E19 X.L=30.0 X.H=30.0 CHAR.L=2.0 + MODELS BGN ^AVAL SRH AUGER CONCTAU CONCMOB FIELDMOB + METHOD AC=DIRECT .OPTION ACCT BYPASS=1 METHOD=GEAR .TRAN 0.5MS 50MS .PRINT I(VLINE) .END ngspice-26/examples/cider/mos/0000755000265600020320000000000012264261473015733 5ustar andreasadminngspice-26/examples/cider/mos/charge.cir0000644000265600020320000000257212264261473017671 0ustar andreasadminMOS charge pump vin 4 0 dc 0v pulse 0 5 15ns 5ns 5ns 50ns 100ns vdd 5 6 dc 0v pulse 0 5 25ns 5ns 5ns 50ns 100ns vbb 0 7 dc 0v pulse 0 5 0ns 5ns 5ns 50ns 100ns rd 6 2 10k m1 5 4 3 7 mmod w=100um vs 3 2 0 vc 2 1 0 c2 1 0 10pf .ic v(3)=1.0 .tran 2ns 200ns .options acct bypass=1 .print tran v(1) v(2) .model mmod numos + x.mesh n=1 l=0 + x.mesh n=3 l=0.4 + x.mesh n=7 l=0.6 + x.mesh n=15 l=1.4 + x.mesh n=19 l=1.6 + x.mesh n=21 l=2.0 + + y.mesh n=1 l=0 + y.mesh n=4 l=0.015 + y.mesh n=8 l=0.05 + y.mesh n=12 l=0.25 + y.mesh n=14 l=0.35 + y.mesh n=17 l=0.5 + y.mesh n=21 l=1.0 + + region num=1 material=1 y.l=0.015 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.015 x.l=0.5 x.h=1.5 + material num=2 oxide + + elec num=1 ix.l=18 ix.h=21 iy.l=4 iy.h=4 + elec num=2 ix.l=5 ix.h=17 iy.l=1 iy.h=1 + elec num=3 ix.l=1 ix.h=4 iy.l=4 iy.h=4 + elec num=4 ix.l=1 ix.h=21 iy.l=21 iy.h=21 + + doping unif n.type conc=1e18 x.l=0.0 x.h=0.5 y.l=0.015 y.h=0.25 + doping unif n.type conc=1e18 x.l=1.5 x.h=2.0 y.l=0.015 y.h=0.25 + doping unif p.type conc=1e15 x.l=0.0 x.h=2.0 y.l=0.015 y.h=1.0 + doping unif p.type conc=1.3e17 x.l=0.5 x.h=1.5 y.l=0.015 y.h=0.05 + + models concmob fieldmob + method onec .end ngspice-26/examples/cider/mos/pass.cir0000644000265600020320000000260112264261473017377 0ustar andreasadminTurnoff transient of pass transistor M1 11 2 3 4 mmod w=20um Cs 1 0 6.0pF Cl 3 0 6.0pF R1 3 6 200k Vin 6 0 dc 0 Vdrn 1 11 dc 0 Vg 2 0 dc 5 pwl 0 5 0.1n 0 1 0 Vb 4 0 dc 0.0 .tran 0.05ns 0.2ns 0.0ns 0.05ns .print tran v(1) i(Vdrn) .ic v(1)=0 v(3)=0 .option acct bypass=1 .model mmod numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif p.type conc=2.5e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif n.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif n.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob + method ac=direct onec .end ngspice-26/examples/cider/mos/nmosinv.cir0000644000265600020320000000246412264261473020131 0ustar andreasadminResistive load NMOS inverter vin 1 0 pwl 0 0.0 2ns 5 vdd 3 0 dc 5.0 rd 3 2 2.5k m1 2 1 4 5 mmod w=10um cl 2 0 2pf vb 5 0 0 vs 4 0 0 .model mmod numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif p.type conc=2.5e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif n.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif n.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob + method ac=direct onec .tran 0.2ns 30ns .options acct bypass=1 .print tran v(1) v(2) .end ngspice-26/examples/cider/mos/ringosc.cir0000644000265600020320000000545212264261473020104 0ustar andreasadminCMOS Ring Oscillator Vdd 1 0 5.0v Vss 2 0 0.0v X1 1 2 3 4 INV X2 1 2 4 5 INV X3 1 2 5 3 INV *X4 1 2 6 7 INV *X5 1 2 7 8 INV *X6 1 2 8 9 INV *X7 1 2 9 3 INV .IC V(3)=0.0v V(4)=2.5v V(5)=5.0v * V(6)=0.0v V(7)=5.0v V(8)=0.0v V(9)=5.0v Vin 3 0 2.5v .SUBCKT INV 1 2 3 4 * Vdd Vss Vin Vout M1 14 13 15 16 M_PMOS w=6.0u M2 24 23 25 26 M_NMOS w=3.0u Vgp 3 13 0.0v Vdp 4 14 0.0v Vsp 1 15 0.0v Vbp 1 16 0.0v Vgn 3 23 0.0v Vdn 4 24 0.0v Vsn 2 25 0.0v Vbn 2 26 0.0v .ENDS INV .model M_NMOS numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif p.type conc=2.5e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif n.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif n.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob bgn srh conctau + method ac=direct onec .model M_PMOS numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif n.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=3e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif p.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif p.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob bgn srh conctau + method ac=direct onec .tran 0.1ns 5ns .print v(4) .options acct bypass=1 method=gear .end ngspice-26/examples/cider/mos/bootinv.cir0000644000265600020320000000274412264261473020121 0ustar andreasadminNMOS Enhancement-Load Bootstrap Inverter Vdd 1 0 5.0v Vss 2 0 0.0v Vin 5 0 0.0v PWL (0.0ns 5.0v) (1ns 0.0v) (10ns 0.0v) (11ns 5.0v) + (20ns 5.0v) (21ns 0.0v) (30ns 0.0v) (31ns 5.0v) M1 1 1 3 2 M_NMOS w=5u M2 1 3 4 4 M_NMOS w=5u M3 4 5 2 2 M_NMOS w=5u CL 4 0 0.1pf CB 3 4 0.1pf .model M_NMOS numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 init elec major + mobility material=1 init elec minor + mobility material=1 init hole major + mobility material=1 init hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif p.type conc=2.5e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif n.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif n.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob + method ac=direct onec .tran 0.2ns 40ns .print v(4) .options acct bypass=1 method=gear .end ngspice-26/examples/cider/mos/cmosinv.cir0000644000265600020320000000523012264261473020110 0ustar andreasadminCMOS Inverter Vdd 1 0 5.0v Vss 2 0 0.0v X1 1 2 3 4 INV Vin 3 0 2.5v .SUBCKT INV 1 2 3 4 * Vdd Vss Vin Vout M1 14 13 15 16 M_PMOS w=6.0u M2 24 23 25 26 M_NMOS w=3.0u Vgp 3 13 0.0v Vdp 4 14 0.0v Vsp 1 15 0.0v Vbp 1 16 0.0v Vgn 3 23 0.0v Vdn 4 24 0.0v Vsn 2 25 0.0v Vbn 2 26 0.0v .ENDS INV .model M_NMOS numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif p.type conc=2.5e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif n.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif n.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob bgn srh conctau + method ac=direct onec .model M_PMOS numos + x.mesh l=0.0 n=1 + x.mesh l=0.6 n=4 + x.mesh l=0.7 n=5 + x.mesh l=1.0 n=7 + x.mesh l=1.2 n=11 + x.mesh l=3.2 n=21 + x.mesh l=3.4 n=25 + x.mesh l=3.7 n=27 + x.mesh l=3.8 n=28 + x.mesh l=4.4 n=31 + + y.mesh l=-.05 n=1 + y.mesh l=0.0 n=5 + y.mesh l=.05 n=9 + y.mesh l=0.3 n=14 + y.mesh l=2.0 n=19 + + region num=1 material=1 y.l=0.0 + material num=1 silicon + mobility material=1 concmod=sg fieldmod=sg + mobility material=1 elec major + mobility material=1 elec minor + mobility material=1 hole major + mobility material=1 hole minor + + region num=2 material=2 y.h=0.0 x.l=0.7 x.h=3.7 + material num=2 oxide + + elec num=1 x.l=3.8 x.h=4.4 y.l=0.0 y.h=0.0 + elec num=2 x.l=0.7 x.h=3.7 iy.l=1 iy.h=1 + elec num=3 x.l=0.0 x.h=0.6 y.l=0.0 y.h=0.0 + elec num=4 x.l=0.0 x.h=4.4 y.l=2.0 y.h=2.0 + + doping unif n.type conc=1e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=2.0 + doping unif p.type conc=3e16 x.l=0.0 x.h=4.4 y.l=0.0 y.h=0.05 + doping unif p.type conc=1e20 x.l=0.0 x.h=1.1 y.l=0.0 y.h=0.2 + doping unif p.type conc=1e20 x.l=3.3 x.h=4.4 y.l=0.0 y.h=0.2 + + models concmob fieldmob bgn srh conctau + method ac=direct onec *.tran 0.1ns 5ns *.op .dc Vin 0.0v 5.001v 0.05v .print v(4) .options acct bypass=1 method=gear .end ngspice-26/examples/cider/parallel/0000755000265600020320000000000012264261473016731 5ustar andreasadminngspice-26/examples/cider/parallel/clkfeed.cir0000644000265600020320000000116412264261473021027 0ustar andreasadminSWITCHED CURRENT CELL - CLOCK FEEDTHROUGH VDD 1 0 5.0V VSS 2 0 0.0V IIN 13 0 0.0 VIN 13 3 0.0 VL 4 0 2.5V VCK 6 0 5.0V PULSE 5.0V 0.0V 5.0NS 5NS 5NS 20NS 50NS M1 3 3 2 2 M_NMOS_5 W=5U L=5U M2 4 5 2 2 M_NMOS_5 W=10U L=5U M3 23 26 25 22 M_NMOS_5 W=5U L=5U RLK1 3 0 100G RLK2 5 0 100G VD 3 23 0.0V VG 6 26 0.0V VS 5 25 0.0V VB 2 22 0.0V M4 7 7 1 1 M_PMOS_IDEAL W=100U L=1U M5 3 7 1 1 M_PMOS_IDEAL W=100U L=1U M6 4 7 1 1 M_PMOS_IDEAL W=200U L=1U IREF 7 0 50UA ****** MODELS ****** .MODEL M_PMOS_IDEAL PMOS VTO=-1.0V KP=100U .INCLUDE BICMOS.LIB .TRAN 0.1NS 50NS .OPTIONS ACCT BYPASS=1 METHOD=GEAR .END ngspice-26/examples/cider/parallel/ecpal.cir0000644000265600020320000000047312264261473020520 0ustar andreasadminEMITTER COUPLED PAIR WITH ACTIVE LOAD VCC 1 0 5V VEE 2 0 0V VINP 4 0 2.99925V AC 0.5V VINM 7 0 3V AC 0.5V 180 IEE 5 2 0.1MA Q1 3 4 5 M_NPNS AREA=8 Q2 6 7 5 M_NPNS AREA=8 Q3 3 3 1 M_PNPS AREA=8 Q4 6 3 1 M_PNPS AREA=8 .AC DEC 10 10K 100G .PLOT AC VDB(6) .INCLUDE BICMOS.LIB .OPTIONS ACCT RELTOL=1E-6 .END ngspice-26/examples/cider/parallel/foobar0000644000265600020320000000043012264261473020121 0ustar andreasadmin\section*{BICMPD Benchmark} \section*{BICMPU Benchmark} \section*{CLKFEED Benchmark} \section*{CMOSAMP Benchmark} \section*{ECLINV Benchmark} \section*{ECPAL Benchmark} \section*{GMAMP Benchmark} \section*{LATCH Benchmark} \section*{PPEF Benchmarks} \section*{RINGOSC Benchmarks} ngspice-26/examples/cider/parallel/latch.cir0000644000265600020320000000150512264261473020524 0ustar andreasadminSTATIC LATCH *** IC=1MA, RE6=3K *** SPICE ORIGINAL 1-7-80, CIDER REVISED 4-16-93 *** BIAS CIRCUIT *** RESISTORS RCC2 6 8 3.33K REE2 9 0 200 *** TRANSISTORS Q1 6 8 4 M_NPN1D AREA=8 Q2 8 4 9 M_NPN1D AREA=8 *** MODELS .INCLUDE BICMOS.LIB *** SOURCES VCC 6 0 5V VREF 3 0 2.5V VRSET 1 0 PULSE(2V 3V 0.1NS 0.1NS 0.1NS 0.9NS 4NS) VSET 7 0 PULSE(2V 3V 2.1NS 0.1NS 0.1NS 0.9NS 4NS) *** LATCH X1 1 2 3 4 5 6 ECLNOR2 X2 5 7 3 4 2 6 ECLNOR2 *** SUBCIRCUITS .SUBCKT ECLNOR2 1 2 3 4 5 6 ** RESISTORS RS 6 11 520 RC2 11 10 900 RE4 12 0 200 RE6 5 0 6K ** TRANSISTORS Q1 9 1 8 M_NPN1D AREA=8 Q2 9 2 8 M_NPN1D AREA=8 Q3 11 3 8 M_NPN1D AREA=8 Q4 8 4 12 M_NPN1D AREA=8 Q5 10 10 9 M_NPN1D AREA=8 Q6 6 9 5 M_NPN1D AREA=8 .ENDS ECLNOR2 *** CONTROL CARDS .TRAN 0.01NS 8NS .PRINT TRAN V(1) V(7) V(5) V(2) .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/parallel/bicmpu.cir0000644000265600020320000000044612264261473020713 0ustar andreasadminBICMOS INVERTER PULLUP CIRCUIT VDD 1 0 5.0V VSS 2 0 0.0V VIN 3 0 0.75V VC 1 11 0.0V VB 5 15 0.0V Q1 11 15 4 M_NPNS AREA=8 M1 5 3 1 1 M_PMOS_1 W=10U L=1U CL 4 0 5.0PF .IC V(4)=0.75V V(5)=0.0V .INCLUDE BICMOS.LIB .TRAN 0.5NS 4.0NS .PRINT TRAN V(3) V(4) .OPTION ACCT BYPASS=1 .END ngspice-26/examples/cider/parallel/readme0000644000265600020320000000025312264261473020111 0ustar andreasadminThis directory contains the additional CIDER parallel-version benchmarks used in the thesis "Design-Oriented Mixed-Level Circuit and Device Simulation" by David A. Gates. ngspice-26/examples/cider/parallel/BICMOS.LIB0000644000265600020320000007350412264261473020246 0ustar andreasadmin** * BICMOS.LIB: Library of models used in the 1.0 um CBiCMOS process * Contains CIDER input descriptions as well as matching * SPICE models for some of the CIDER models. ** ** * One-dimensional models for a * polysilicon emitter complementary bipolar process. * The default device size is 1um by 1um (LxW) ** .model M_NPN1D nbjt level=1 + title One-Dimensional Numerical Bipolar + options base.depth=0.15 base.area=0.1 base.length=0.5 defa=1p + x.mesh loc=-0.2 n=1 + x.mesh loc=0.0 n=51 + x.mesh wid=0.15 h.e=0.0001 h.m=.004 r=1.2 + x.mesh wid=1.15 h.s=0.0001 h.m=.004 r=1.2 + domain num=1 material=1 x.l=0.0 + domain num=2 material=2 x.h=0.0 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + material num=2 polysilicon + mobility mat=2 concmod=ct fieldmod=ct + doping gauss n.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 + doping gauss p.type conc=5e18 x.l=-0.2 x.h=0.0 char.len=0.100 + doping unif n.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss n.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + models bgn srh auger conctau concmob fieldmob + method devtol=1e-12 ac=direct itlim=15 .model M_PNP1D nbjt level=1 + title One-Dimensional Numerical Bipolar + options base.depth=0.2 base.area=0.1 base.length=0.5 defa=1p + x.mesh loc=-0.2 n=1 + x.mesh loc=0.0 n=51 + x.mesh wid=0.20 h.e=0.0001 h.m=.004 r=1.2 + x.mesh wid=1.10 h.s=0.0001 h.m=.004 r=1.2 + domain num=1 material=1 x.l=0.0 + domain num=2 material=2 x.h=0.0 + material num=1 silicon + mobility mat=1 concmod=ct fieldmod=ct + material num=2 polysilicon + mobility mat=2 concmod=ct fieldmod=ct + doping gauss p.type conc=3e20 x.l=-0.2 x.h=0.0 char.len=0.047 + doping gauss n.type conc=5e17 x.l=-0.2 x.h=0.0 char.len=0.200 + doping unif p.type conc=1e16 x.l=0.0 x.h=1.3 + doping gauss p.type conc=5e19 x.l=1.3 x.h=1.3 char.len=0.100 + models bgn srh auger conctau concmob fieldmob + method devtol=1e-12 ac=direct itlim=15 ** * Two-dimensional models for a * polysilicon emitter complementary bipolar process. * The default device size is 1um by 1um (LxW) ** .MODEL M_NPNS nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since half the device is simulated, double the unit width to get + * 1.0 um emitter. Use a small mesh for this model. + options defw=2.0u + output stat + + x.mesh w=2.0 h.e=0.02 h.m=0.5 r=2.0 + x.mesh w=0.5 h.s=0.02 h.m=0.2 r=2.0 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.10 h.e=0.004 h.m=0.05 r=2.5 + y.mesh w=0.15 h.s=0.004 h.m=0.02 r=2.5 + y.mesh w=1.05 h.s=0.02 h.m=0.1 r=2.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss n.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss p.type conc=5e18 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate + doping gauss p.type conc=1e20 x.l=0.0 x.h=0.5 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate ratio=0.7 + doping unif n.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss n.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob .MODEL M_NPN nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since half the device is simulated, double the unit width to get + * 1.0 um emitter length. Uses a finer mesh in the X direction. + options defw=2.0u + output stat + + x.mesh w=0.5 h.e=0.075 h.m=0.2 r=2.0 + x.mesh w=0.75 h.s=0.075 h.m=0.2 r=2.0 + x.mesh w=0.75 h.e=0.05 h.m=0.2 r=1.5 + x.mesh w=0.5 h.s=0.05 h.m=0.1 r=1.5 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.10 h.e=0.003 h.m=0.01 r=1.5 + y.mesh w=0.15 h.s=0.003 h.m=0.02 r=1.5 + y.mesh w=0.35 h.s=0.02 h.m=0.2 r=1.5 + y.mesh w=0.40 h.e=0.05 h.m=0.2 r=1.5 + y.mesh w=0.30 h.s=0.05 h.m=0.1 r=1.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss n.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss p.type conc=5e18 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate + doping gauss p.type conc=1e20 x.l=0.0 x.h=0.5 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate ratio=0.7 + doping unif n.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss n.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob .MODEL M_PNPS nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since half the device is simulated, double the unit width to get + * 1.0 um emitter length. Use a small mesh for this model. + options defw=2.0u + output stat + + x.mesh w=2.0 h.e=0.02 h.m=0.5 r=2.0 + x.mesh w=0.5 h.s=0.02 h.m=0.2 r=2.0 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.12 h.e=0.004 h.m=0.05 r=2.5 + y.mesh w=0.28 h.s=0.004 h.m=0.02 r=2.5 + y.mesh w=1.05 h.s=0.02 h.m=0.1 r=2.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss p.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss n.type conc=5e17 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.200 lat.rotate + doping gauss n.type conc=1e20 x.l=0.0 x.h=0.5 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate ratio=0.7 + doping unif p.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss p.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob .MODEL M_PNP nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since half the device is simulated, double the unit width to get + * 1.0 um emitter length. Uses a finer mesh in the X direction. + options defw=2.0u + output stat + + x.mesh w=0.5 h.e=0.075 h.m=0.2 r=2.0 + x.mesh w=0.75 h.s=0.075 h.m=0.2 r=2.0 + x.mesh w=0.75 h.e=0.05 h.m=0.2 r=1.5 + x.mesh w=0.5 h.s=0.05 h.m=0.1 r=1.5 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.12 h.e=0.003 h.m=0.01 r=1.5 + y.mesh w=0.28 h.s=0.003 h.m=0.02 r=1.5 + y.mesh w=0.20 h.s=0.02 h.m=0.2 r=1.5 + y.mesh w=0.40 h.e=0.05 h.m=0.2 r=1.5 + y.mesh w=0.30 h.s=0.05 h.m=0.1 r=1.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss p.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss n.type conc=5e17 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.200 lat.rotate + doping gauss n.type conc=1e20 x.l=0.0 x.h=0.5 y.l=-0.2 y.h=0.0 + + char.l=0.100 lat.rotate ratio=0.7 + doping unif p.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss p.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob ** * Two-dimensional models for a * complementary MOS process. * Device models for 1um, 2um, 3um, 4um, 5um, 10um and 50um are provided. ** .MODEL M_NMOS_1 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.4 h.s=0.005 h.m=0.1 r=2.0 + x.mesh w=0.4 h.e=0.005 h.m=0.1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=2 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=2.5 x.h=3.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=2 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=3.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=3.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=3.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=2 x.h=3.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=2.05 x.h=3.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_2 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.005 h.m=0.2 r=2.0 + x.mesh w=0.9 h.e=0.005 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=3 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=3.5 x.h=4.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=3 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=4.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=4.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=4.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=3 x.h=4.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=3.05 x.h=4.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_3 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=1.4 h.s=0.005 h.m=0.3 r=2.0 + x.mesh w=1.4 h.e=0.005 h.m=0.3 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=4 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=4.5 x.h=5.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=4 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=5.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=5.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=5.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=4 x.h=5.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=4.05 x.h=5.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_4 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=1.9 h.s=0.005 h.m=0.4 r=2.0 + x.mesh w=1.9 h.e=0.005 h.m=0.4 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=5 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=5.5 x.h=6.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=5 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=6.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=6.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=6.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=5 x.h=6.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=5.05 x.h=6.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_5 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=2.4 h.s=0.005 h.m=0.5 r=2.0 + x.mesh w=2.4 h.e=0.005 h.m=0.5 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=6 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=6.5 x.h=7.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=6 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=7.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=7.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=7.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=6 x.h=7.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=6.05 x.h=7.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_10 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=4.9 h.s=0.005 h.m=1 r=2.0 + x.mesh w=4.9 h.e=0.005 h.m=1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=11 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=11.5 x.h=12.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=11 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=12.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=12.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=12.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=11 x.h=12.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=11.05 x.h=12.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_NMOS_50 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=24.9 h.s=0.005 h.m=5 r=2.0 + x.mesh w=24.9 h.e=0.005 h.m=5 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=51 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=51.5 x.h=52.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=51 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=52.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=52.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=52.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=51 x.h=52.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=51.05 x.h=52.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_1 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.4 h.s=0.005 h.m=0.1 r=2.0 + x.mesh w=0.4 h.e=0.005 h.m=0.1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=2 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=2.5 x.h=3.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=2 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=3.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=3.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=3.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=2 x.h=3.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=2.05 x.h=3.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_2 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.005 h.m=0.2 r=2.0 + x.mesh w=0.9 h.e=0.005 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=3 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=3.5 x.h=4.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=3 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=4.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=4.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=4.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=3 x.h=4.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=3.05 x.h=4.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_3 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=1.4 h.s=0.005 h.m=0.3 r=2.0 + x.mesh w=1.4 h.e=0.005 h.m=0.3 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=4 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=4.5 x.h=5.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=4 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=5.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=5.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=5.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=4 x.h=5.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=4.05 x.h=5.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_4 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=1.9 h.s=0.005 h.m=0.4 r=2.0 + x.mesh w=1.9 h.e=0.005 h.m=0.4 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=5 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=5.5 x.h=6.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=5 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=6.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=6.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=6.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=5 x.h=6.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=5.05 x.h=6.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_5 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=2.4 h.s=0.005 h.m=0.5 r=2.0 + x.mesh w=2.4 h.e=0.005 h.m=0.5 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=6 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=6.5 x.h=7.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=6 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=7.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=7.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=7.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=6 x.h=7.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=6.05 x.h=7.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_10 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=4.9 h.s=0.005 h.m=1 r=2.0 + x.mesh w=4.9 h.e=0.005 h.m=1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=11 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=11.5 x.h=12.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=11 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=12.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=12.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=12.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=11 x.h=12.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=11.05 x.h=12.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec .MODEL M_PMOS_50 numos + output stat + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=24.9 h.s=0.005 h.m=5 r=2.0 + x.mesh w=24.9 h.e=0.005 h.m=5 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1 x.h=51 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=51.5 x.h=52.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1 x.h=51 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=52.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=52.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=52.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=51 x.h=52.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=51.05 x.h=52.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob surfmob transmob fieldmob srh auger conctau bgn + method ac=direct itlim=10 onec ** * BSIM1 NMOS and PMOS 1.0 \um models. * Gummel-Poon bipolar models. ** .model M_NSIM_1 nmos level=4 +vfb= -1.1908 +phi= .8399 +k1= 1.5329 +k2= 193.7322m +eta= 2m +muz= 746.0 +u0= 90.0m +x2mz= 10.1429 +x2e= -2.5m +x3e= 0.2m +x2u0= -10.0m +mus= 975.0 +u1= .20 +x2ms= 0.0 +x2u1= 0.0 +x3ms= 10 +x3u1= 5.0m +tox=2.00000e-02 +cgdo=2.0e-10 +cgso=2.0e-10 +cgbo=0.0 +temp= 27 +vdd= 7.0 +xpart +n0= 1.5686 +nb= 94.6392m +nd=0.00000e+00 +rsh=30.0 cj=7.000e-004 cjsw=4.20e-010 +js=1.00e-008 pb=0.700e000 +pbsw=0.8000e000 mj=0.5 mjsw=0.33 +wdf=0 dell=0.20u .model M_PSIM_1 pmos level=4 +vfb= -1.3674 +phi= .8414 +k1= 1.5686 +k2= 203m +eta= 2m +muz= 340.0 +u0= 35.0m +x2mz= 6.0 +x2e= 0.0 +x3e= -0.2m +x2u0= -15.0m +mus= 440.0 +u1= .38 +x2ms= 0.0 +x2u1= 0.0 +x3ms= -20 +x3u1= -10.0m +tox=2.00000e-02 +cgdo=2.0e-10 +cgso=2.0e-10 +cgbo=0.0 +temp= 27 +vdd= 5.0 +xpart +n0= 1.5686 +nb= 94.6392m +nd=0.00000e+00 +rsh=80.0 cj=7.000e-004 cjsw=4.20e-010 +js=1.00e-008 pb=0.700e000 +pbsw=0.8000e000 mj=0.5 mjsw=0.33 +wdf=0 dell=0.17u .model M_GNPN npn + is=1.3e-16 + nf=1.00 bf=262.5 ikf=25mA vaf=20v + nr=1.00 br=97.5 ikr=0.5mA var=1.8v + rc=20.0 + re=0.09 + rb=15.0 + ise=4.0e-16 ne=2.1 + isc=7.2e-17 nc=2.0 + tf=9.4ps itf=26uA xtf=0.5 + tr=10ns + cje=89.44fF vje=0.95 mje=0.5 + cjc=12.82fF vjc=0.73 mjc=0.49 .model M_GPNP pnp + is=5.8e-17 + nf=1.001 bf=96.4 ikf=12mA vaf=29v + nr=1.0 br=17.3 ikr=0.2mA var=2.0v + rc=50.0 + re=0.17 + rb=20.0 + ise=6.8e-17 ne=2.0 + isc=9.0e-17 nc=2.1 + tf=27.4ps itf=26uA xtf=0.5 + tr=10ns + cje=55.36fF vje=0.95 mje=0.58 + cjc=11.80fF vjc=0.72 mjc=0.46 ngspice-26/examples/cider/parallel/ppef.1d.cir0000644000265600020320000000064212264261473020667 0ustar andreasadminPUSH-PULL EMITTER FOLLOWER - ONE-DIMENSIONAL MODELS VCC 1 0 5.0V VEE 2 0 -5.0V VIN 3 0 0.0V (SIN 0.0V 0.1V 1KHZ) AC 1 VBU 13 3 0.7V VBL 3 23 0.7V RL 4 44 50 VLD 44 0 0V Q1 5 13 4 M_NPN1D AREA=40 Q2 4 5 1 M_PNP1D AREA=200 Q3 6 23 4 M_PNP1D AREA=100 Q4 4 6 2 M_NPN1D AREA=80 .INCLUDE BICMOS.LIB .TRAN 0.01MS 1.00001MS 0US 0.01MS .PLOT TRAN V(4) .OPTIONS ACCT BYPASS=1 TEMP=26.85OC RELTOL=1E-5 .END ngspice-26/examples/cider/parallel/ringosc.2u.cir0000644000265600020320000000511012264261473021416 0ustar andreasadminCMOS RING OSCILLATOR - 2UM DEVICES VDD 1 0 5.0V VSS 2 0 0.0V X1 1 2 3 4 INV X2 1 2 4 5 INV X3 1 2 5 6 INV X4 1 2 6 7 INV X5 1 2 7 8 INV X6 1 2 8 9 INV X7 1 2 9 3 INV .IC V(3)=0.0V V(4)=2.5V V(5)=5.0V V(6)=0.0V + V(7)=5.0V V(8)=0.0V V(9)=5.0V .SUBCKT INV 1 2 3 4 * VDD VSS VIN VOUT M1 14 13 15 16 M_PMOS W=6.0U M2 24 23 25 26 M_NMOS W=3.0U VGP 3 13 0.0V VDP 4 14 0.0V VSP 1 15 0.0V VBP 1 16 0.0V VGN 3 23 0.0V VDN 4 24 0.0V VSN 2 25 0.0V VBN 2 26 0.0V .ENDS INV .MODEL M_NMOS NUMOS + X.MESH L=0.0 N=1 + X.MESH L=0.6 N=4 + X.MESH L=0.7 N=5 + X.MESH L=1.0 N=7 + X.MESH L=1.2 N=11 + X.MESH L=3.2 N=21 + X.MESH L=3.4 N=25 + X.MESH L=3.7 N=27 + X.MESH L=3.8 N=28 + X.MESH L=4.4 N=31 + + Y.MESH L=-.05 N=1 + Y.MESH L=0.0 N=5 + Y.MESH L=.05 N=9 + Y.MESH L=0.3 N=14 + Y.MESH L=2.0 N=19 + + REGION NUM=1 MATERIAL=1 Y.L=0.0 + MATERIAL NUM=1 SILICON + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + + REGION NUM=2 MATERIAL=2 Y.H=0.0 X.L=0.7 X.H=3.7 + MATERIAL NUM=2 OXIDE + + ELEC NUM=1 X.L=3.8 X.H=4.4 Y.L=0.0 Y.H=0.0 + ELEC NUM=2 X.L=0.7 X.H=3.7 IY.L=1 IY.H=1 + ELEC NUM=3 X.L=0.0 X.H=0.6 Y.L=0.0 Y.H=0.0 + ELEC NUM=4 X.L=0.0 X.H=4.4 Y.L=2.0 Y.H=2.0 + + DOPING UNIF P.TYPE CONC=2.5E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=2.0 + DOPING UNIF P.TYPE CONC=1E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=0.05 + DOPING UNIF N.TYPE CONC=1E20 X.L=0.0 X.H=1.1 Y.L=0.0 Y.H=0.2 + DOPING UNIF N.TYPE CONC=1E20 X.L=3.3 X.H=4.4 Y.L=0.0 Y.H=0.2 + + MODELS CONCMOB FIELDMOB BGN SRH CONCTAU + METHOD AC=DIRECT ONEC + OUTPUT ^ALL.DEBUG .MODEL M_PMOS NUMOS + X.MESH L=0.0 N=1 + X.MESH L=0.6 N=4 + X.MESH L=0.7 N=5 + X.MESH L=1.0 N=7 + X.MESH L=1.2 N=11 + X.MESH L=3.2 N=21 + X.MESH L=3.4 N=25 + X.MESH L=3.7 N=27 + X.MESH L=3.8 N=28 + X.MESH L=4.4 N=31 + + Y.MESH L=-.05 N=1 + Y.MESH L=0.0 N=5 + Y.MESH L=.05 N=9 + Y.MESH L=0.3 N=14 + Y.MESH L=2.0 N=19 + + REGION NUM=1 MATERIAL=1 Y.L=0.0 + MATERIAL NUM=1 SILICON + MOBILITY MATERIAL=1 CONCMOD=SG FIELDMOD=SG + + REGION NUM=2 MATERIAL=2 Y.H=0.0 X.L=0.7 X.H=3.7 + MATERIAL NUM=2 OXIDE + + ELEC NUM=1 X.L=3.8 X.H=4.4 Y.L=0.0 Y.H=0.0 + ELEC NUM=2 X.L=0.7 X.H=3.7 IY.L=1 IY.H=1 + ELEC NUM=3 X.L=0.0 X.H=0.6 Y.L=0.0 Y.H=0.0 + ELEC NUM=4 X.L=0.0 X.H=4.4 Y.L=2.0 Y.H=2.0 + + DOPING UNIF N.TYPE CONC=1E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=2.0 + DOPING UNIF P.TYPE CONC=3E16 X.L=0.0 X.H=4.4 Y.L=0.0 Y.H=0.05 + DOPING UNIF P.TYPE CONC=1E20 X.L=0.0 X.H=1.1 Y.L=0.0 Y.H=0.2 + DOPING UNIF P.TYPE CONC=1E20 X.L=3.3 X.H=4.4 Y.L=0.0 Y.H=0.2 + + MODELS CONCMOB FIELDMOB BGN SRH CONCTAU + METHOD AC=DIRECT ONEC + OUTPUT ^ALL.DEBUG .TRAN 0.1NS 5.0NS .PRINT V(4) .OPTIONS ACCT BYPASS=1 METHOD=GEAR .END ngspice-26/examples/cider/parallel/ppef.2d.cir0000644000265600020320000000063612264261473020673 0ustar andreasadminPUSH-PULL EMITTER FOLLOWER - TWO-DIMENSIONAL MODELS VCC 1 0 5.0V VEE 2 0 -5.0V VIN 3 0 0.0V (SIN 0.0V 0.1V 1KHZ) AC 1 VBU 13 3 0.7V VBL 3 23 0.7V RL 4 44 50 VLD 44 0 0V Q1 5 13 4 M_NPNS AREA=40 Q2 4 5 1 M_PNPS AREA=200 Q3 6 23 4 M_PNPS AREA=100 Q4 4 6 2 M_NPNS AREA=80 .INCLUDE BICMOS.LIB .TRAN 0.01MS 1.00001MS 0US 0.01MS .PLOT TRAN V(4) .OPTIONS ACCT BYPASS=1 TEMP=26.85OC RELTOL=1E-5 .END ngspice-26/examples/cider/parallel/gmamp.cir0000644000265600020320000000106012264261473020526 0ustar andreasadminBICMOS 3-STAGE AMPLIFIER *** IN GRAY & MEYER, 3RD ED. P.266, PROB. 3.12, 8.19 VDD 1 0 5.0V VSS 2 0 0.0V *** VOLTAGE INPUT *VIN 13 0 0.0V AC 1V *CIN 13 3 1UF *** CURRENT INPUT IIN 3 0 0.0 AC 1.0 M1 4 3 2 2 M_NMOS_1 W=300U L=1U M2 7 7 2 2 M_NMOS_1 W=20U L=1U Q1 6 5 4 M_NPNS AREA=40 Q2 5 5 7 M_NPNS AREA=40 Q3 1 6 8 M_NPNS AREA=40 RL1 1 4 1K RL2 1 6 10K RB1 1 5 10K RL3 8 2 1K RF1 3 8 30K *** NUMERICAL MODEL LIBRARY *** .INCLUDE BICMOS.LIB .AC DEC 10 100KHZ 100GHZ .PLOT AC VDB(8) .OPTIONS ACCT BYPASS=1 KEEPOPINFO .END ngspice-26/examples/cider/parallel/eclinv.cir0000644000265600020320000000062612264261473020714 0ustar andreasadminECL INVERTER *** (FROM MEINERZHAGEN ET AL.) VCC 1 0 0.0V VEE 2 0 -5.2V VIN 3 0 -1.25V VRF 4 0 -1.25V *** INPUT STAGE Q1 5 3 9 M_NPNS AREA=8 Q2 6 4 9 M_NPNS AREA=8 R1 1 5 662 R2 1 6 662 R3 9 2 2.65K *** OUTPUT BUFFERS Q3 1 5 7 M_NPNS AREA=8 Q4 1 6 8 M_NPNS AREA=8 R4 7 2 4.06K R5 8 2 4.06K *** MODEL LIBRARY .INCLUDE BICMOS.LIB .DC VIN -2.00 0.001 0.05 .PLOT DC V(7) V(8) .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/parallel/ringosc.1u.cir0000644000265600020320000000112512264261473021417 0ustar andreasadminCMOS RING OSCILLATOR - 1UM DEVICES VDD 1 0 5.0V VSS 2 0 0.0V X1 1 2 3 4 INV X2 1 2 4 5 INV X3 1 2 5 6 INV X4 1 2 6 7 INV X5 1 2 7 8 INV X6 1 2 8 9 INV X7 1 2 9 3 INV .IC V(3)=0.0V V(4)=2.5V V(5)=5.0V + V(6)=0.0V V(7)=5.0V V(8)=0.0V V(9)=5.0V .SUBCKT INV 1 2 3 4 * VDD VSS VIN VOUT M1 14 13 15 16 M_PMOS_1 W=6.0U M2 24 23 25 26 M_NMOS_1 W=3.0U VGP 3 13 0.0V VDP 4 14 0.0V VSP 1 15 0.0V VBP 1 16 0.0V VGN 3 23 0.0V VDN 4 24 0.0V VSN 2 25 0.0V VBN 2 26 0.0V .ENDS INV .INCLUDE BICMOS.LIB .TRAN 0.1NS 1NS .PRINT TRAN V(3) V(4) V(5) .OPTIONS ACCT BYPASS=1 METHOD=GEAR .END ngspice-26/examples/cider/parallel/cmosamp.cir0000644000265600020320000000101012264261473021057 0ustar andreasadminCMOS 2-STAGE OPERATIONAL AMPLIFIER VDD 1 0 2.5V VSS 2 0 -2.5V IBIAS 9 0 100UA VPL 3 0 0.0V AC 0.5V VMI 4 0 0.0V AC 0.5V 180 M1 6 3 5 5 M_PMOS_1 W=15U L=1U M2 7 4 5 5 M_PMOS_1 W=15U L=1U M3 6 6 2 2 M_NMOS_1 W=7.5U L=1U M4 7 6 2 2 M_NMOS_1 W=7.5U L=1U M5 8 7 2 2 M_NMOS_1 W=15U L=1U M6 9 9 1 1 M_PMOS_1 W=15U L=1U M7 5 9 1 1 M_PMOS_1 W=15U L=1U M8 8 9 1 1 M_PMOS_1 W=15U L=1U *CC 7 8 0.1PF .INCLUDE BICMOS.LIB *.OP *.AC DEC 10 1K 100G .DC VPL -5MV 5MV 0.1MV .OPTIONS ACCT BYPASS=1 METHOD=GEAR .END ngspice-26/examples/cider/parallel/bicmpd.cir0000644000265600020320000000054712264261473020674 0ustar andreasadminBICMOS INVERTER PULLDOWN CIRCUIT VSS 2 0 0V VIN 3 2 0V (PULSE 0.0V 4.2V 0NS 1NS 1NS 9NS 20NS) M1 8 3 5 11 M_NMOS_1 W=4U L=1U VD 4 8 0V VBK 11 2 0V Q1 10 7 9 M_NPNS AREA=8 VC 4 10 0V VB 5 7 0V VE 9 2 0V CL 4 6 1PF VL 6 2 0V .IC V(10)=5.0V V(7)=0.0V .TRAN 0.1NS 5NS 0NS 0.1NS .PLOT TRAN I(VIN) .INCLUDE BICMOS.LIB .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/bicmos/0000755000265600020320000000000012264261473016411 5ustar andreasadminngspice-26/examples/cider/bicmos/bicmos.lib0000644000265600020320000001044612264261473020362 0ustar andreasadmin.MODEL M_NPN nbjt level=2 + title TWO-DIMENSIONAL NUMERICAL POLYSILICON EMITTER BIPOLAR TRANSISTOR + * Since, we are only simulating half of a device, we double the unit width + * 1.0 um emitter length + options defw=2.0u + output dc.debug stat + + *x.mesh w=2.5 n=5 + x.mesh w=2.0 h.e=0.05 h.m=0.2 r=1.5 + x.mesh w=0.5 h.s=0.05 h.m=0.1 r=1.5 + + y.mesh l=-0.2 n=1 + y.mesh l= 0.0 n=5 + y.mesh w=0.10 h.e=0.002 h.m=0.01 r=1.5 + y.mesh w=0.15 h.s=0.002 h.m=0.01 r=1.5 + y.mesh w=0.35 h.s=0.01 h.m=0.2 r=1.5 + y.mesh w=0.40 h.e=0.05 h.m=0.2 r=1.5 + y.mesh w=0.30 h.s=0.05 h.m=0.1 r=1.5 + + domain num=1 material=1 x.l=2.0 y.h=0.0 + domain num=2 material=2 x.h=2.0 y.h=0.0 + domain num=3 material=3 y.l=0.0 + material num=1 polysilicon + material num=2 oxide + material num=3 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=1.1 y.h=1.3 + elec num=2 x.l=0.0 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=-0.2 + + doping gauss n.type conc=3e20 x.l=2.0 x.h=3.0 y.l=-0.2 y.h=0.0 + + char.l=0.047 lat.rotate + doping gauss p.type conc=1e19 x.l=0.0 x.h=5.0 y.l=-0.2 y.h=0.0 + + char.l=0.094 lat.rotate + doping unif n.type conc=1e16 x.l=0.0 x.h=5.0 y.l=0.0 y.h=1.3 + doping gauss n.type conc=5e19 x.l=0.0 x.h=5.0 y.l=1.3 y.h=1.3 + + char.l=0.100 lat.rotate + + method ac=direct itlim=10 + models bgn srh auger conctau concmob fieldmob .MODEL M_NMOS_1 numos + output dc.debug stat + title 1.0um NMOS Device + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.4 h.s=0.005 h.m=0.1 r=2.0 + x.mesh w=0.4 h.e=0.005 h.m=0.1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1.0 x.h=2.0 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=2.5 x.h=3.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1.0 x.h=2.0 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=3.1 y.l=2.0 y.h=2.0 + + doping gauss p.type conc=1.0e17 x.l=-0.1 x.h=3.1 y.l=0.0 + + char.l=0.30 + doping unif p.type conc=5.0e15 x.l=-0.1 x.h=3.1 y.l=0.0 y.h=2.1 + doping gauss n.type conc=4e17 x.l=-0.1 x.h=1.0 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss n.type conc=4e17 x.l=2.0 x.h=3.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss n.type conc=1e20 x.l=2.05 x.h=3.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=4.10 + models concmob fieldmob surfmob srh auger conctau bgn ^aval + method ac=direct itlim=10 onec .MODEL M_PMOS_1 numos + title 1.0um PMOS Device + + x.mesh w=0.9 h.e=0.020 h.m=0.2 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.4 h.s=0.005 h.m=0.1 r=2.0 + x.mesh w=0.4 h.e=0.005 h.m=0.1 r=2.0 + x.mesh w=0.2 h.e=0.005 h.m=0.02 r=2.0 + x.mesh w=0.9 h.s=0.020 h.m=0.2 r=2.0 + + y.mesh l=-.0200 n=1 + y.mesh l=0.0 n=6 + y.mesh w=0.15 h.s=0.0001 h.max=.02 r=2.0 + y.mesh w=0.45 h.s=0.02 h.max=0.2 r=2.0 + y.mesh w=1.40 h.s=0.20 h.max=0.4 r=2.0 + + region num=1 material=1 y.h=0.0 + region num=2 material=2 y.l=0.0 + interface dom=2 nei=1 x.l=1.0 x.h=2.0 layer.width=0.0 + material num=1 oxide + material num=2 silicon + + elec num=1 x.l=2.5 x.h=3.1 y.l=0.0 y.h=0.0 + elec num=2 x.l=1.0 x.h=2.0 iy.l=1 iy.h=1 + elec num=3 x.l=-0.1 x.h=0.5 y.l=0.0 y.h=0.0 + elec num=4 x.l=-0.1 x.h=3.1 y.l=2.0 y.h=2.0 + + doping gauss n.type conc=1.0e17 x.l=-0.1 x.h=3.1 y.l=0.0 + + char.l=0.30 + doping unif n.type conc=5.0e15 x.l=-0.1 x.h=3.1 y.l=0.0 y.h=2.1 + doping gauss p.type conc=4e17 x.l=-0.1 x.h=1.0 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=-0.1 x.h=0.95 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + doping gauss p.type conc=4e17 x.l=2.0 x.h=3.1 y.l=0.0 y.h=0.0 + + char.l=0.16 lat.rotate ratio=0.65 + doping gauss p.type conc=1e20 x.l=2.05 x.h=3.1 y.l=0.0 y.h=0.08 + + char.l=0.03 lat.rotate ratio=0.65 + + contact num=2 workf=5.29 + models concmob fieldmob surfmob srh auger conctau bgn ^aval + method ac=direct itlim=10 onec ngspice-26/examples/cider/bicmos/bicmpd.cir0000644000265600020320000000053512264261473020351 0ustar andreasadminBiCMOS Pulldown Circuit VSS 2 0 0v VIN 3 2 0v (PULSE 0.0v 4.2v 0ns 1ns 1ns 9ns 20ns) M1 8 3 5 11 M_NMOS_1 W=4u L=1u VD 4 8 0v VBK 11 2 0v Q1 10 7 9 M_NPN AREA=8 VC 4 10 0v VB 5 7 0v VE 9 2 0v CL 4 6 1pF VL 6 2 0v .IC V(10)=5.0v V(7)=0.0v .TRAN 0.1ns 5ns 0ns 0.1ns .PLOT TRAN I(VIN) .include bicmos.lib .OPTIONS ACCT BYPASS=1 .END ngspice-26/examples/cider/jfet/0000755000265600020320000000000012264261473016065 5ustar andreasadminngspice-26/examples/cider/jfet/jfet.cir0000644000265600020320000000155112264261473017516 0ustar andreasadminTwo-dimensional Junction Field-Effect Transistor (JFET) VDD 1 0 0.5V VGG 2 0 -1.0v AC 1V VSS 3 0 0.0V QJ1 1 2 3 M_NJF AREA=1 .MODEL M_NJF NBJT LEVEL=2 + options jfet defw=10.0um + output dc.debug phin phip equ.psi vac.psi + x.mesh w=0.2 h.e=0.001 r=1.8 + x.mesh w=0.8 h.s=0.001 h.m=0.1 r=2.0 + x.mesh w=0.8 h.e=0.001 h.m=0.1 r=2.0 + x.mesh w=0.2 h.s=0.001 r=1.8 + y.mesh w=0.2 h.e=0.01 r=1.8 + y.mesh w=0.8 h.s=0.01 h.m=0.1 r=1.8 + + domain num=1 mat=1 + material num=1 silicon + + elec num=1 x.l=0.0 x.h=0.0 y.l=0.0 y.h=1.0 + elec num=2 x.l=0.5 x.h=1.5 y.l=0.0 y.h=0.0 + elec num=3 x.l=2.0 x.h=2.0 y.l=0.0 y.h=1.0 + + doping unif n.type conc=3.0e15 + doping unif p.type conc=2.0e17 x.l=0.2 x.h=1.8 y.h=0.2 + + models bgn srh auger conctau concmob fieldmob ^aval .option acct bypass=1 temp=27 *.op .dc vgg 0.0 -2.0001 -0.1 *.ac dec 10 1k 100g .print i(vnn) .end ngspice-26/examples/cider/resistor/0000755000265600020320000000000012264261473017007 5ustar andreasadminngspice-26/examples/cider/resistor/sires.cir0000644000265600020320000000105312264261473020632 0ustar andreasadminSilicon Resistor * This simulation demonstrates the effects of velocity saturation at * high lateral electric fields. VPP 1 0 10v PWL 0s 0.0v 100s 10v VNN 2 0 0.0v D1 1 2 M_RES AREA=1 .MODEL M_RES numd level=1 + options resistor defa=1p + x.mesh loc=0.0 num=1 + x.mesh loc=1.0 num=101 + domain num=1 material=1 + material num=1 silicon + doping unif n.type conc=2.5e16 + models bgn srh conctau auger concmob fieldmob + method ac=direct *.OP .DC VPP 0.0v 10.01v 0.1v *.TRAN 1s 100.001s 0s 0.2s .PRINT I(VPP) .OPTION ACCT BYPASS=1 RELTOL=1e-12 .END ngspice-26/examples/cider/resistor/gaasres.cir0000644000265600020320000000142212264261473021132 0ustar andreasadminGallium Arsenide Resistor * This transient simulation demonstrates the effects of velocity overshoot * and velocity saturation at high lateral electric fields. * Do not try to do DC analysis of this resistor. It will not converge * because of the peculiar characteristics of the GaAs velocity-field * relation. In some cases, problems can arise in transient simulation * as well. VPP 1 0 1v PWL 0s 0.0v 10s 1v VNN 2 0 0.0v D1 1 2 M_RES AREA=1 .MODEL M_RES numd level=1 + options resistor defa=1p + x.mesh loc=0.0 num=1 + x.mesh loc=1.0 num=101 + domain num=1 material=1 + material num=1 gaas + doping unif n.type conc=2.5e16 + models fieldmob srh auger conctau + method ac=direct *.OP *.DC VPP 0.0v 10.01v 0.1v .TRAN 1s 10.001s 0s 0.1s .PRINT I(VPP) .OPTION ACCT BYPASS=1 .END ngspice-26/examples/measure/0000755000265600020320000000000012264261473015510 5ustar andreasadminngspice-26/examples/measure/mos-meas-dc.sp0000644000265600020320000000152012264261473020157 0ustar andreasadmin***** Single NMOS Transistor .measure (Id-Vd) *** m1 d g s b nch L=0.6u W=10.0u vgs g 0 3.5 vds d 0 3.5 vs s 0 dc 0 vb b 0 dc 0 .dc vds 0 3.5 0.05 vgs 0.5 3.5 0.5 .print dc v(1) i(vs) * model binning .model nch.1 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model nch.2 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) .model pch.1 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch.2 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) .meas dc is_at FIND i(vs) AT=1 .meas dc is_max max i(vs) from=0 to=3.5 .meas dc vds_at2 when i(vs)=10m .meas dc vd_diff1 trig i(vs) val=0.005 rise=1 targ i(vs) val=0.01 rise=1 .meas dc vd_diff2 trig i(vs) val=0.005 rise=1 targ i(vs) val=0.01 rise=2 .control run *rusage all plot i(vs) .endc .end ngspice-26/examples/measure/simple-meas-tran.sp0000644000265600020320000000434412264261473021237 0ustar andreasadminFile: simple-meas-tran.sp * Simple .measurement examples * transient simulation of two sine signals with different frequencies vac1 1 0 DC 0 sin(0 1 1k 0 0) R1 1 0 100k vac2 2 0 DC 0 sin(0 1.2 0.9k 0 0) .tran 10u 5m * .measure tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 RISE=2 .measure tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 RISE=3 .measure tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 FALL=1 .measure tran tdiff TRIG v(1) VAL=0 FALL=3 TARG v(2) VAL=0 FALL=3 .measure tran tdiff TRIG v(1) VAL=-0.6 CROSS=1 TARG v(2) VAL=-0.8 CROSS=1 .measure tran tdiff TRIG AT=1m TARG v(2) VAL=-0.8 CROSS=3 .measure tran teval WHEN v(2)=0.7 CROSS=LAST .measure tran teval WHEN v(2)=v(1) FALL=LAST .measure tran teval WHEN v(1)=v(2) CROSS=LAST .measure tran yeval FIND v(2) WHEN v(1)=0.2 FALL=2 .measure tran yeval FIND v(2) AT=2m .measure tran ymax MAX v(2) from=2m to=3m .measure tran tymax MAX_AT v(2) from=2m to=3m .measure tran ypp PP v(1) from=2m to=4m .measure tran yrms RMS v(1) from=2m to=3.5m .measure tran yavg AVG v(1) from=2m to=4m .measure tran yint INTEG v(2) from=2m to=3m .param fval=5 .measure tran yadd param='fval + 7' .param vout_diff=50k .meas tran bw_chk param='(vout_diff < 100k) ? 1 : 0' .measure tran vtest find par('v(2)*v(1)') AT=2.3m * .control run plot v(1) v(2) gnuplot ttt i(vac1) meas tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 RISE=2 meas tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 RISE=3 meas tran tdiff TRIG v(1) VAL=0.5 RISE=1 TARG v(1) VAL=0.5 FALL=1 meas tran tdiff TRIG v(1) VAL=0 FALL=3 TARG v(2) VAL=0 FALL=3 meas tran tdiff TRIG v(1) VAL=-0.6 CROSS=1 TARG v(2) VAL=-0.8 CROSS=1 meas tran tdiff TRIG AT=1m TARG v(2) VAL=-0.8 CROSS=3 meas tran teval WHEN v(2)=0.7 CROSS=LAST meas tran teval WHEN v(2)=v(1) FALL=LAST meas tran teval WHEN v(1)=v(2) CROSS=LAST meas tran yeval FIND v(2) WHEN v(1)=0.2 FALL=2 meas tran yeval FIND v(2) AT=2m meas tran ymax MAX v(2) from=2m to=3m meas tran tymax MAX_AT v(2) from=2m to=3m meas tran ypp PP v(1) from=2m to=4m meas tran yrms RMS v(1) from=2m to=3.5m meas tran yavg AVG v(1) from=2m to=4m meas tran yint INTEG v(2) from=2m to=3m meas tran ymax MAX v(2) from=2m to=3m meas tran tmax WHEN v(2)=YMAX from=1m to=2m $ from..to.. not recognized! .endc .end ngspice-26/examples/measure/inv-meas-tran.sp0000644000265600020320000000607712264261473020547 0ustar andreasadminInverter example circuit * This netlist demonstrates the following: * global nodes (vdd, gnd) * autostop (.tran defines simulation end as 4ns but simulation stops at * 142.5ps when .measure statements are evaluated) * scale (all device units are in microns) * model binning (look in device.values file for which bin chosen) * * m.x1.mn: * model = nch.2 * * m.x1.mp: * model = pch.2 * * parameters * parameterized subckt * vsrc with repeat * .measure statements for delay and an example ternary operator * device listing and parameter listing * You can run the example circuit with this command: * * ngspice inverter3.sp * global nodes .global vdd gnd * autostop -- stop simulation early if .measure statements done * scale -- define scale factor for mosfet device parameters (l,w,area,perimeter) *.option autostop .option scale = 1e-6 * model binning .model nch.1 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model nch.2 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) .model pch.1 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch.2 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) * parameters .param vp = 1.0v .param lmin = 0.10 .param wmin = 0.12 .param plmin = 'lmin' .param nlmin = 'lmin' .param wpmin = 'wmin' .param wnmin = 'wmin' .param drise = 400ps .param dfall = 100ps .param trise = 100ps .param tfall = 100ps .param period = 1ns .param skew_meas = 'vp/2' * parameterized subckt .subckt inv in out pw='wpmin' pl='plmin' nw='wnmin' nl='nlmin' mp out in vdd vdd pch w='pw' l='pl' mn out in gnd gnd nch w='nw' l='nl' .ends v0 vdd gnd 'vp' * vsrc with repeat v1 in gnd pwl + 0ns 'vp' + 'dfall-0.8*tfall' 'vp' + 'dfall-0.4*tfall' '0.9*vp' + 'dfall+0.4*tfall' '0.1*vp' + 'dfall+0.8*tfall' 0v + 'drise-0.8*trise' 0v + 'drise-0.4*trise' '0.1*vp' + 'drise+0.4*trise' '0.9*vp' + 'drise+0.8*trise' 'vp' + 'period+dfall-0.8*tfall' 'vp' + r='dfall-0.8*tfall' x1 in out inv pw=60 nw=20 c1 out gnd 220fF .tran 1ps 4ns .meas tran inv_delay trig v(in) val='vp/2' fall=1 targ v(out) val='vp/2' rise=1 .meas tran inv_delay2 trig v(in) val='vp/2' td=1n fall=1 targ v(out) val='vp/2' rise=1 .meas tran test_data1 trig AT = 1n targ v(out) val='vp/2' rise=3 .meas tran out_slew trig v(out) val='0.2*vp' rise=2 targ v(out) val='0.8*vp' rise=2 .meas tran delay_chk param='(inv_delay < 100ps) ? 1 : 0' .meas tran skew when v(out)=0.6 .meas tran skew2 when v(out)=skew_meas .meas tran skew3 when v(out)=skew_meas fall=2 .meas tran skew4 when v(out)=skew_meas fall=LAST .meas tran skew5 FIND v(out) AT=2n .meas tran v0_min min i(v0) from='dfall' to='dfall+period' .meas tran i_v0_min min_at i(v0) from='dfall' to='dfall+period' .meas tran v0_avg avg i(v0) from='dfall' to='dfall+period' .meas tran v0_integ integ i(v0) from='dfall' to='dfall+period' .meas tran v0_rms rms i(v0) from='dfall' to='dfall+period' .control run rusage all plot v(in) v(out) .endc .end ngspice-26/examples/measure/mos-meas-dc-control.sp0000644000265600020320000000314412264261473021641 0ustar andreasadmin***** Single NMOS Transistor .measure (Id-Vd) *** * Altering device witdth leads to select new model due to binning limits. * New model has artificially thick gate oxide (changed from default 3n to 4n) * to demonstrate the effect. m1 d g s b nch L=0.6u W=9.99u ; W is slightly below binning limit vgs g 0 3.5 vds d 0 3.5 vs s 0 dc 0 vb b 0 dc 0 * model binning * uses default parameters, except toxe .model nch.1 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u toxe=3n ) .model nch.2 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u toxe=4n) .control dc vds 0 3.5 0.05 vgs 3.5 0.5 -0.5 meas dc is_at FIND i(vs) AT=1 meas dc is_max max i(vs) meas dc vds_at2 when i(vs)=10m * starting with branches in descending order of vgs * trig ist the first branch which crosses 5mA * Targ is the first branch crossing 10mA meas dc vd_diff1 trig i(vs) val=0.005 rise=1 targ i(vs) val=0.01 rise=1 * trig ist the first branch which crosses 5mA * Targ is the second branch crossing 10mA meas dc vd_diff2 trig i(vs) val=0.005 rise=2 targ i(vs) val=0.01 rise=2 alter @m1[w]=10.01u ; W is slightly above binning limit dc vds 0 3.5 0.05 vgs 3.5 0.5 -0.5 meas dc is_at FIND i(vs) AT=1 meas dc is_max max i(vs) meas dc vds_at2 when i(vs)=10m meas dc vd_diff1 trig i(vs) val=0.005 rise=1 targ i(vs) val=0.01 rise=1 * there is only one branch crossing 10mA, so this second meas fails with targ out of interval echo echo The next one will fail (no two branches crossing 10 mA): meas dc vd_diff2 trig i(vs) val=0.005 rise=2 targ i(vs) val=0.01 rise=2 *rusage all plot dc1.i(vs) i(vs) .endc .end ngspice-26/examples/measure/inv-meas-tran-auto.sp0000644000265600020320000000601512264261473021505 0ustar andreasadminInverter example circuit * This netlist demonstrates the following: * global nodes (vdd, gnd) * autostop (.tran defines simulation end as 4ns but simulation stops at * 142.5ps when .measure statements are evaluated) * scale (all device units are in microns) * model binning (look in device.values file for which bin chosen) * * m.x1.mn: * model = nch.2 * * m.x1.mp: * model = pch.2 * * parameters * parameterized subckt * vsrc with repeat * .measure statements for delay and an example ternary operator * device listing and parameter listing * You can run the example circuit with this command: * * ngspice inverter3.sp * global nodes .global vdd gnd * autostop -- stop simulation early if .measure statements done * scale -- define scale factor for mosfet device parameters (l,w,area,perimeter) .option autostop .option scale = 1e-6 * model binning .model nch.1 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model nch.2 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) .model pch.1 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch.2 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) * parameters .param vp = 1.0v .param lmin = 0.10 .param wmin = 0.12 .param plmin = 'lmin' .param nlmin = 'lmin' .param wpmin = 'wmin' .param wnmin = 'wmin' .param drise = 400ps .param dfall = 100ps .param trise = 100ps .param tfall = 100ps .param period = 1ns .param skew_meas = 'vp/2' * parameterized subckt .subckt inv in out pw='wpmin' pl='plmin' nw='wnmin' nl='nlmin' mp out in vdd vdd pch w='pw' l='pl' mn out in gnd gnd nch w='nw' l='nl' .ends v0 vdd gnd 'vp' * vsrc with repeat v1 in gnd pwl + 0ns 'vp' + 'dfall-0.8*tfall' 'vp' + 'dfall-0.4*tfall' '0.9*vp' + 'dfall+0.4*tfall' '0.1*vp' + 'dfall+0.8*tfall' 0v + 'drise-0.8*trise' 0v + 'drise-0.4*trise' '0.1*vp' + 'drise+0.4*trise' '0.9*vp' + 'drise+0.8*trise' 'vp' + 'period+dfall-0.8*tfall' 'vp' + r='dfall-0.8*tfall' x1 in out inv pw=60 nw=20 c1 out gnd 220fF .tran 1ps 4ns .meas tran inv_delay trig v(in) val='vp/2' fall=1 targ v(out) val='vp/2' rise=1 .meas tran inv_delay2 trig v(in) val='vp/2' td=1n fall=1 targ v(out) val='vp/2' rise=1 .meas tran test_data1 trig AT = 1n targ v(out) val='vp/2' rise=3 .meas tran out_slew trig v(out) val='0.2*vp' rise=2 targ v(out) val='0.8*vp' rise=2 .meas tran delay_chk param='(inv_delay < 100ps) ? 1 : 0' .meas tran skew when v(out)=0.6 .meas tran skew2 when v(out)=skew_meas .meas tran skew3 when v(out)=skew_meas fall=2 .meas tran skew4 when v(out)=skew_meas fall=LAST .meas tran skew5 FIND v(out) AT=2n *.measure tran v0_min min i(v0) from='dfall' to='dfall+period' *.measure tran v0_avg avg i(v0) from='dfall' to='dfall+period' *.measure tran v0_integ integ i(v0) from='dfall' to='dfall+period' *.measure tran v0_rms rms i(v0) from='dfall' to='dfall+period' .control run rusage all plot v(in) v(out) .endc .end ngspice-26/examples/measure/rc-meas-ac.sp0000644000265600020320000000243412264261473017767 0ustar andreasadminRC band pass example circuit * This netlist demonstrates the following: * global nodes (vdd, gnd) * .measure statements for delay and an example ternary operator * You can run the example circuit with this command: * * ngspice rc-meas-ac.sp * global nodes .global vdd gnd * autostop -- stop simulation early if .measure statements done *.option autostop vin in gnd dc 0 ac 1 R1 in mid1 1k c1 mid1 gnd 1n C2 mid1 out 500p R2 out gnd 1k .ac DEC 10 1k 10MEG .meas ac vout_at FIND v(out) AT=1MEG .meas ac vout_atr FIND vr(out) AT=1MEG .meas ac vout_ati FIND vi(out) AT=1MEG .meas ac vout_atm FIND vm(out) AT=1MEG .meas ac vout_atp FIND vp(out) AT=1MEG .meas ac vout_atd FIND vdb(out) AT=1MEG .meas ac vout_max max v(out) from=1k to=10MEG .meas ac freq_at when v(out)=0.1 .meas ac vout_diff trig v(out) val=0.1 rise=1 targ v(out) val=0.1 fall=1 .meas ac fixed_diff trig AT = 10k targ v(out) val=0.1 rise=1 .meas ac vout_avg avg v(out) from=10k to=1MEG .meas ac vout_integ integ v(out) from=20k to=500k .meas ac freq_at2 when v(out)=0.1 fall=LAST .meas ac bw_chk param='(vout_diff < 100k) ? 1 : 0' .meas ac bw_chk2 param='(vout_diff > 500k) ? 1 : 0' .meas ac vout_rms rms v(out) from=10 to=1G .control run *rusage all plot v(out) plot ph(v(out)) plot mag(v(out)) plot db(v(out)) .endc .end ngspice-26/examples/measure/rc-meas-ac-control.sp0000644000265600020320000000271112264261473021443 0ustar andreasadminRC band pass example circuit * This netlist demonstrates the following: * global nodes (vdd, gnd) * .measure statements for delay and an example ternary operator * You can run the example circuit with this command: * * ngspice rc-meas-ac.sp * global nodes .global vdd gnd * autostop -- stop simulation early if .measure statements done *.option autostop vin in gnd dc 0 ac 1 R1 in mid1 1k c1 mid1 gnd 1n C2 mid1 out 500p R2 out gnd 1k .control ac DEC 10 1k 10MEG meas ac vout_at FIND v(out) AT=1MEG meas ac vout_atr FIND vr(out) AT=1MEG meas ac vout_ati FIND vi(out) AT=1MEG meas ac vout_atm FIND vm(out) AT=1MEG meas ac vout_atp FIND vp(out) AT=1MEG meas ac vout_atd FIND vdb(out) AT=1MEG meas ac vout_max max v(out) from=1k to=10MEG meas ac freq_at when v(out)=0.1 meas ac vout_diff trig v(out) val=0.1 rise=1 targ v(out) val=0.1 fall=1 meas ac fixed_diff trig AT = 10k targ v(out) val=0.1 rise=1 meas ac vout_avg avg v(out) from=10k to=1MEG meas ac vout_integ integ v(out) from=20k to=500k meas ac freq_at2 when v(out)=0.1 fall=LAST *meas ac bw_chk param='(vout_diff < 100k) ? 1 : 0' if (vout_diff < 100k) let bw_chk = 1 else let bw_chk = 0 end echo bw_chk = "$&bw_chk" *meas ac bw_chk2 param='(vout_diff > 500k) ? 1 : 0' if (vout_diff > 500k) let bw_chk2 = 1 else let bw_chk2 = 0 end echo bw_chk2 = "$&bw_chk2" meas ac vout_rms rms v(out) from=10 to=1G *rusage all plot v(out) plot ph(v(out)) plot mag(v(out)) plot db(v(out)) .endc .end ngspice-26/examples/measure/inv-meas-tran-control.sp0000644000265600020320000000624412264261473022221 0ustar andreasadminInverter example circuit * This netlist demonstrates the following: * global nodes (vdd, gnd) * autostop (.tran defines simulation end as 4ns but simulation stops at * 142.5ps when .measure statements are evaluated) * scale (all device units are in microns) * model binning (look in device.values file for which bin chosen) * * m.x1.mn: * model = nch.2 * * m.x1.mp: * model = pch.2 * * parameters * parameterized subckt * vsrc with repeat * .measure statements for delay and an example ternary operator * device listing and parameter listing * You can run the example circuit with this command: * * ngspice inverter3.sp * global nodes .global vdd gnd * autostop -- stop simulation early if .measure statements done * scale -- define scale factor for mosfet device parameters (l,w,area,perimeter) *.option autostop .option scale = 1e-6 * model binning .model nch.1 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model nch.2 nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) .model pch.1 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch.2 pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=10u wmax=100u ) * parameters .param vp = 1.0v .param lmin = 0.10 .param wmin = 0.12 .param plmin = 'lmin' .param nlmin = 'lmin' .param wpmin = 'wmin' .param wnmin = 'wmin' .param drise = 400ps .param dfall = 100ps .param trise = 100ps .param tfall = 100ps .param period = 1ns .param skew_meas = 'vp/2' * parameterized subckt .subckt inv in out pw='wpmin' pl='plmin' nw='wnmin' nl='nlmin' mp out in vdd vdd pch w='pw' l='pl' mn out in gnd gnd nch w='nw' l='nl' .ends v0 vdd gnd 'vp' * vsrc with repeat v1 in gnd pwl + 0ns 'vp' + 'dfall-0.8*tfall' 'vp' + 'dfall-0.4*tfall' '0.9*vp' + 'dfall+0.4*tfall' '0.1*vp' + 'dfall+0.8*tfall' 0v + 'drise-0.8*trise' 0v + 'drise-0.4*trise' '0.1*vp' + 'drise+0.4*trise' '0.9*vp' + 'drise+0.8*trise' 'vp' + 'period+dfall-0.8*tfall' 'vp' + r='dfall-0.8*tfall' x1 in out inv pw=60 nw=20 c1 out gnd 220fF .control tran 1ps 4ns meas tran inv_delay trig v(in) val=0.5 fall=1 targ v(out) val=0.5 rise=1 meas tran inv_delay2 trig v(in) val=0.5 td=1n fall=1 targ v(out) val=0.5 rise=1 meas tran test_data1 trig AT = 1n targ v(out) val=0.5 rise=3 meas tran out_slew trig v(out) val=0.2 rise=2 targ v(out) val=0.8 rise=2 *.meas tran delay_chk param='(inv_delay < 100ps) ? 1 : 0' if ( inv_delay < 100ps ) let delay_chk = 1 else let delay_chk = 0 end echo delay_chk = "$&delay_chk" meas tran skew when v(out)=0.6 let skew_meas = 0.5 meas tran skew2 when v(out)=skew_meas meas tran skew3 when v(out)=skew_meas fall=2 meas tran skew4 when v(out)=skew_meas fall=LAST meas tran skew5 FIND v(out) AT=2n let dfall = 100p let period = 1n let delta = dfall+period meas tran v0_min min i(v0) from=dfall to=delta meas tran i_v0_min min_at i(v0) from=dfall to=delta meas tran v0_avg avg i(v0) from = dfall to = delta meas tran v0_integ integ i(v0) from=dfall to=delta meas tran v0_rms rms i(v0) from=dfall to=delta rusage all plot v(in) v(out) .endc .end ngspice-26/examples/measure/func_cap.sp0000644000265600020320000000037412264261473017636 0ustar andreasadmin* func_cap.sp .func icap_calc(A,B,C,D) '2*A*sqrt(B*C*D)' .param cap_val = 'max(icap_calc(1,2,3,4))' VDD 1 0 DC 1 C1 1 0 'cap_val' .measure tran capacitance param='cap_val' .measure tran capac2 param='max(icap_calc(1,2,3,4))' .tran 1ps 100ps .end ngspice-26/examples/various/0000755000265600020320000000000012264261473015537 5ustar andreasadminngspice-26/examples/various/modelcard.pmos0000644000265600020320000000163712264261473020400 0ustar andreasadmin.model P1 PMOS +Level= 8 version=3.3.0 +Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 +Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 +Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 +vgs_max=4 vds_max=4 vbs_max=4 ngspice-26/examples/various/agauss_test.cir0000644000265600020320000000246212264261473020564 0ustar andreasadmin* agauss test in ngspice * generate a sequence of gaussian distributed random numbers. * test the distribution by sorting the numbers into * a histogram (buckets) * chapt. 17.8.6 .control define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0)) let mc_runs = 200 let run = 0 let no_buck = 8 $ number of buckets let bucket = unitvec(no_buck) $ each element contains 1 let delta = 3e-11 $ width of each bucket, depends $ on avar and sig let lolimit = 1e-09 - 3*delta let hilimit = 1e-09 + 3*delta dowhile run < mc_runs let val = agauss(1e-09, 1e-10, 3) $ get the random number if (val < lolimit) let bucket[0] = bucket[0] + 1 $ 'lowest' bucket end let part = 1 dowhile part < (no_buck - 1) if ((val < (lolimit + part*delta)) & + (val > (lolimit + (part-1)*delta))) let bucket[part] = bucket[part] + 1 break end let part = part + 1 end if (val > hilimit) * 'highest' bucket let bucket[no_buck - 1] = bucket[no_buck - 1] + 1 end let run = run + 1 end let part = 0 dowhile part < no_buck let value = bucket[part] - 1 set value = "$&value" * print the buckets' contents echo $value let part = part + 1 end .endc .end ngspice-26/examples/various/param_sweep.cir0000644000265600020320000000075412264261473020547 0ustar andreasadminparameter sweep * resistive divider, R1 swept from start_r to stop_r * replaces .STEP R1 1k 10k 1k * chapter 16.13.4.2 R1 1 2 1k R2 2 0 1k VDD 1 0 DC 1 .dc VDD 0 1 .1 .control let start_r = 1k let stop_r = 10k let delta_r = 1k let r_act = start_r * loop while r_act le stop_r alter r1 r_act run write dc-sweep.out v(2) set appendwrite let r_act = r_act + delta_r end plot dc1.v(2) dc2.v(2) dc3.v(2) dc4.v(2) dc5.v(2) + dc6.v(2) dc7.v(2) dc8.v(2) dc9.v(2) dc10.v(2) .endc .end ngspice-26/examples/various/FFT_Leakage.cir0000644000265600020320000000404712264261473020273 0ustar andreasadminFFT_Leakage_tests http://www.idea2ic.com/ *=========Create_Signal================== VTime VTime 0 DC 0 PWL( 0 0 1 1) Vfreq Vfreq 0 DC 5.5k BVAC IN 0 V = sin( 6.283185307179586*V(VFreq)*V(VTime)) .control *TRAN TSTEP TSTOP TSTART TMAX ?UIC? tran 1u .999m 0 1u set pensize = 2 linearize let numb2 = length(in) print numb2 *=========Do_FFT_and_Plot_As_dB_Freq================== let ac = in +j(0) let ac_fft=fft(ac) let numb_f2 = (numb2)/2 -1 compose freq start = 1 stop = $&numb_f2 step =1 compose vreal start = 1 stop = $&numb_f2 step =1 compose vimag start = 1 stop = $&numb_f2 step =1 let j = 0 repeat $&numb_f2 let freq[j] = freq[j] let vreal[j] = 2*real(ac_fft[j+1]) let vimag[j] = 2*imag(ac_fft[j+1]) let j = j +1 end plot dB(abs(vreal+1f)) dB(abs(vimag+1f)) vs freq xlog *=========Extract_Error_Signal========================= let funBin = 5k/1000 let unvect = unitvec(numb2) let fundspec = unvect*0 +j(0) let fundspec[funBin] = real(ac_fft[funBin]) +j(imag(ac_fft[funBin] )) let fundspec[numb2-funBin] = real(ac_fft[numb2-funBin]) +j(imag(ac_fft[numb2-funBin] )) let fund = ifft(fundspec) let dc_ofset = real(ac_fft[0]) let thdspec = ac_fft let thdspec[0] = 0 +j(0) let thdspec[funBin] = 0 +j(0) let thdspec[numb2-funBin] = 0 +j(0) let thd = ifft(thdspec) plot norm(in) norm(fund) norm(thd)/2 *=========Calc_Values========================= let rms_Fund = sqrt(mean(fund*fund)) let rms_THD = sqrt(mean(thd*thd)) let THD_percent = 100*rms_THD/rms_Fund let FREQ_Hz = VFreq[0] echo "Freq_Hz=$&FREQ_Hz THD_percent=$&THD_percent Fund_rms=$&rms_Fund THD_rms=$&rms_THD " .endc .end ngspice-26/examples/various/FFT_tests.cir0000644000265600020320000000572412264261473020107 0ustar andreasadminFFT_tests http://www.idea2ic.com/ .control set units=degrees let a = vector(16) *plot a vs a set pensize = 2 *=========Need_a_complex_input==================== let ac = a+j(0) print a ac *plot fft(a) vs a *plot real(fft(ac)) imag(fft(ac)) vs a * fft(a) fft(ac) *=========DC_Works==================== let b = unitvec(16) let bc = b+j(0) *plot fft(b) vs a title DC_WORKS *print fft(b) fft(bc) *=========DC_Plus_cos_Remove_AC==================== let numb = length(b) print numb let indx = 0 repeat $&numb let ac[indx]= cos(indx*360/8)+1 +j(0) let indx = indx +1 end let fftac=fft(ac) plot real(fftac) imag(fftac) vs a title DC_Plus_COS let fftac[2]=(0,0) let fftac[14]=(0,0) let ifftac = ifft(fftac) plot ifftac ac vs a title COS_REMOVED *=========DC_Plus_cos_Remove_DC==================== let indx = 0 repeat $&numb let ac[indx]= cos(indx*360/8)+1 +j(0) let indx = indx +1 end let fftac=fft(ac) let fftac[0]=(0,0) let ifftac = ifft(fftac) plot ifftac ac vs a title COS_With_DC_REMOVED *=========DC_Plus_sin_Remove_AC==================== let indx = 0 repeat $&numb let ac[indx]= sin(indx*360/8)+1 +j(0) let indx = indx +1 end let fftac=fft(ac) plot real(fftac) imag(fftac) vs a title DC_Plus_SIN let fftac[2]=(0,0) let fftac[14]=(0,0) let ifftac = ifft(fftac) plot ifft(fftac) ac vs a title SIN_REMOVED *=========DC_Plus_sin_Remove_DC==================== let indx = 0 repeat $&numb let ac[indx]= sin(indx*360/8)+1 +j(0) let indx = indx +1 end let fftac=fft(ac) let fftac[0]=(0,0) let ifftac = ifft(fftac) plot ifft(fftac) ac vs a title SIN_With_DC_REMOVED *=========DC_Plus_cos_Nyqusit_Remove_DC==================== let indx = 0 repeat $&numb let ac[indx]= cos(indx*360/2)+1 +j(0) let indx = indx +1 end plot ac vs a title Nyq_COS let fftac=fft(ac) plot real(fftac) imag(fftac) vs a title Nyq_FREQ_COS let fftac[0]=(0,0) let ifftac = ifft(fftac) plot ifft(fftac) ac vs a title COS_With_DC_REMOVED *=========DC_Plus_sin_Nyqusit_Remove_DC==================== let indx = 0 repeat $&numb let ac[indx]= sin(indx*360/2)+1 +j(0) let indx = indx +1 end plot ac vs a title Nyq_SIN let fftac=fft(ac) plot real(fftac) imag(fftac) vs a title Nyq_FREQ_SIN let fftac[0]=(0,0) let ifftac = ifft(fftac) plot ifft(fftac) ac vs a title COS_With_DC_REMOVED *=========DC_Plus_COS_Remove_One_BIN==================== let indx = 0 repeat $&numb let ac[indx]= cos(indx*360/8)+1 +j(0) let indx = indx +1 end let fftac=fft(ac) let fftac[2]=(0,0) plot real(fftac) imag(fftac) vs a title DC_Plus_Cos let ifftac = ifft(fftac) plot ifft(fftac) ac vs a title ONE_BIN_REMOVED plot real(ifft(fftac)) imag(ifft(fftac)) vs a title ONE_BIN_REMOVED .endc .end ngspice-26/examples/various/modelcard.nmos0000644000265600020320000000215612264261473020373 0ustar andreasadmin.model N1 NMOS +Level= 8 version=3.3.0 +Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 +Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 +Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 +Wl = 0 Ww = -1.420242E-09 Wwl = 0 +Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 +Lw = 0 Lwl = 0 Lln = .316394 +Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 +vgs_max=4 vds_max=4 vbs_max=4 ngspice-26/examples/various/nic_soa.cir0000644000265600020320000000136112264261473017652 0ustar andreasadminCMOS NIC * .subckt osc_cmos ib_osz lc ra vdd vss m16 ib_osz ib_osz vss vss n1 w=20u l=1u m=8 m15 ra ib_osz vss vss n1 w=20u l=1u m=2 m8 net99 net95 ra ra n1 w=20u l=1u m=2 m1 net95 net95 net93 net93 n1 w=20u l=1u m=2 m25 net99 net99 vdd vdd p1 w=3.3u l=0.5u m=1 m5 net99 net99 vdd vdd p1 w=20u l=1u m=5 m4 net95 net99 vdd vdd p1 w=20u l=1u m=5 r23 net99 vss r=38K r18 net93 lc r=10 .ends osc_cmos * .subckt psens LC R1 LC P001 40K L1 LC P002 14.9u R2 P002 0 0.55 L2 P001 0 1.4m .ends psens * xi36 bias lc ra vdd 0 osc_cmos v39 vdd 0 dc=3.5 pulse ( 0 3.5 10u 10n 10n 1 2 ) r4 ra 0 3.972K c23 lc 0 1.8n i37 vdd bias dc=1u * xi18 lc psens * .option warn=1 .control tran 1u 1m 0 50n plot v(LC) .endc * .include modelcard.nmos .include modelcard.pmos * .end ngspice-26/examples/various/adder_mos.cir0000644000265600020320000000464212264261473020201 0ustar andreasadmin ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER *** SUBCIRCUIT DEFINITIONS .SUBCKT NAND in1 in2 out VDD * NODES: INPUT(2), OUTPUT, VCC M1 out in2 Vdd Vdd p1 W=7.5u L=0.35u pd=13.5u ad=22.5p ps=13.5u as=22.5p M2 net.1 in2 0 0 n1 W=3u L=0.35u pd=9u ad=9p ps=9u as=9p M3 out in1 Vdd Vdd p1 W=7.5u L=0.35u pd=13.5u ad=22.5p ps=13.5u as=22.5p M4 out in1 net.1 0 n1 W=3u L=0.35u pd=9u ad=9p ps=9u as=9p .ENDS NAND .SUBCKT ONEBIT 1 2 3 4 5 6 * NODES: INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC X1 1 2 7 6 NAND X2 1 7 8 6 NAND X3 2 7 9 6 NAND X4 8 9 10 6 NAND X5 3 10 11 6 NAND X6 3 11 12 6 NAND X7 10 11 13 6 NAND X8 12 13 4 6 NAND X9 11 7 5 6 NAND .ENDS ONEBIT .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 * NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1, * CARRY-IN, CARRY-OUT, VCC X1 1 2 7 5 10 9 ONEBIT X2 3 4 10 6 8 9 ONEBIT .ENDS TWOBIT .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2), * OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC X1 1 2 3 4 9 10 13 16 15 TWOBIT X2 5 6 7 8 11 12 16 14 15 TWOBIT .ENDS FOURBIT *** POWER VCC 99 0 DC 3.3V *** ALL INPUTS VIN1A 1 0 DC 0 PULSE(0 3 0 5NS 5NS 20NS 50NS) VIN1B 2 0 DC 0 PULSE(0 3 0 5NS 5NS 30NS 100NS) VIN2A 3 0 DC 0 PULSE(0 3 0 5NS 5NS 50NS 200NS) VIN2B 4 0 DC 0 PULSE(0 3 0 5NS 5NS 90NS 400NS) VIN3A 5 0 DC 0 PULSE(0 3 0 5NS 5NS 170NS 800NS) VIN3B 6 0 DC 0 PULSE(0 3 0 5NS 5NS 330NS 1600NS) VIN4A 7 0 DC 0 PULSE(0 3 0 5NS 5NS 650NS 3200NS) VIN4B 8 0 DC 0 PULSE(0 3 0 5NS 5NS 1290NS 6400NS) *** DEFINE NOMINAL CIRCUIT X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT .option noinit acct .TRAN 500p 6400NS * save inputs .save V(1) V(2) V(3) V(4) V(5) V(6) V(7) V(8) * use BSIM3 model with default parameters .model n1 nmos level=49 version=3.3.0 .model p1 pmos level=49 version=3.3.0 *.include ./Modelcards/modelcard32.nmos *.include ./Modelcards/modelcard32.pmos .control pre_set strict_errorhandling unset ngdebug *save outputs and specials save x1.x1.x1.7 V(9) V(10) V(11) V(12) V(13) run display * plot the inputs, use offset to plot on top of each other plot v(1) v(2)+4 v(3)+8 v(4)+12 v(5)+16 v(6)+20 v(7)+24 v(8)+28 * plot the outputs, use offset to plot on top of each other plot v(9) v(10)+4 v(11)+8 v(12)+12 v(13)+16 .endc .END ngspice-26/examples/various/gain_stage.cir0000644000265600020320000000224212264261473020337 0ustar andreasadmin** MOSFET Gain Stage (AC): Benchmarking Implementation of BSIM4.0.0 ** by Weidong Liu 5/16/2000. ** output redirection into file ** chapter 17.8.8 M1 3 2 0 0 N1 L=1u W=4u Rsource 1 2 100k Rload 3 vdd 25k Vdd vdd 0 1.8 Vin 1 0 1.2 ac 0.1 .control ac dec 10 100 1000Meg plot v(2) v(3) let flen = length(frequency) $ length of the vector let loopcounter = 0 echo output test > text.txt $ start new file test.txt * loop while loopcounter lt flen let vout2 = v(2)[loopcounter] $ generate a single point complex vector let vout2re = real(vout2) $ generate a single point real vector let vout2im = imag(vout2) $ generate a single point imaginary vector let vout3 = v(3)[loopcounter] $ generate a single point complex vector let vout3re = real(vout3) $ generate a single point real vector let vout3im = imag(vout3) $ generate a single point imaginary vector let freq = frequency[loopcounter] $ generate a single point vector echo bbb "$&freq" "$&vout2re" "$&vout2im" "$&vout3re" "$&vout3im" >> +text.txt $ append text and data to file (continued fromm line above) let loopcounter = loopcounter + 1 end .endc .MODEL N1 NMOS LEVEL=14 VERSION=4.3.0 TNOM=27 .end ngspice-26/examples/Monte_Carlo/0000755000265600020320000000000012264261473016251 5ustar andreasadminngspice-26/examples/Monte_Carlo/MC_2_circ.sp0000644000265600020320000000642112264261473020340 0ustar andreasadminCircuit to perform Monte Carlo simulation in ngspice * 25 stage Ring-Osc. using inverters with BSIM3 vin in out dc 0.5 pulse 0.5 0 0.1n 5n 1 1 1 vdd dd 0 dc 3.3 vss ss 0 dc 0 ve sub 0 dc 0 vpe well 0 dc 3.3 .subckt inv1 dd ss sub well in out mn1 out in ss sub n1 w=2u l=0.35u as=3p ad=3p ps=4u pd=4u mp1 out in dd well p1 w=4u l=0.35u as=7p ad=7p ps=6u pd=6u .ends inv1 .subckt inv5 dd ss sub well in out xinv1 dd ss sub well in 1 inv1 xinv2 dd ss sub well 1 2 inv1 xinv3 dd ss sub well 2 3 inv1 xinv4 dd ss sub well 3 4 inv1 xinv5 dd ss sub well 4 out inv1 .ends inv5 xinv1 dd ss sub well in out5 inv5 xinv2 dd ss sub well out5 out10 inv5 xinv3 dd ss sub well out10 out15 inv5 xinv4 dd ss sub well out15 out20 inv5 xinv5 dd ss sub well out20 out inv5 xinv11 dd 0 sub well out buf inv1 * output is buf cout buf ss 0.2pF * .options noacct * The following model parameters are varying statistically: * vth0, u0, tox * see the AGAUSS function used to define the parameter * the deviation is 10%, just for example, not measured ******************************************************************************** .model n1 nmos +level=8 +version=3.3.0 +tnom=27.0 +nch=2.498e+17 tox=AGAUSS(9e-09, 9e-09, 10) xj=1.00000e-07 +lint=9.36e-8 wint=1.47e-7 +vth0=AGAUSS(.6322,.6322,10) k1=.756 k2=-3.83e-2 k3=-2.612 +dvt0=2.812 dvt1=0.462 dvt2=-9.17e-2 +nlx=3.52291e-08 w0=1.163e-6 +k3b=2.233 +vsat=86301.58 ua=6.47e-9 ub=4.23e-18 uc=-4.706281e-11 +rdsw=650 u0=AGAUSS(388.3203,388.3203,10) wr=1 +a0=.3496967 ags=.1 b0=0.546 b1=1 +dwg=-6.0e-09 dwb=-3.56e-09 prwb=-.213 +keta=-3.605872e-02 a1=2.778747e-02 a2=.9 +voff=-6.735529e-02 nfactor=1.139926 cit=1.622527e-04 +cdsc=-2.147181e-05 +cdscb=0 dvt0w=0 dvt1w=0 dvt2w=0 +cdscd=0 prwg=0 +eta0=1.0281729e-02 etab=-5.042203e-03 +dsub=.31871233 +pclm=1.114846 pdiblc1=2.45357e-03 pdiblc2=6.406289e-03 +drout=.31871233 pscbe1=5000000 pscbe2=5e-09 pdiblcb=-.234 +pvag=0 delta=0.01 +wl=0 ww=-1.420242e-09 wwl=0 +wln=0 wwn=.2613948 ll=1.300902e-10 +lw=0 lwl=0 lln=.316394 lwn=0 +kt1=-.3 kt2=-.051 +at=22400 +ute=-1.48 +ua1=3.31e-10 ub1=2.61e-19 uc1=-3.42e-10 +kt1l=0 prt=764.3 +noimod=2 +af=1.075e+00 kf=9.670e-28 ef=1.056e+00 +noia=1.130e+20 noib=7.530e+04 noic=-8.950e-13 **** PMOS *** .model p1 pmos +level=8 +version=3.3.0 +tnom=27.0 +nch=3.533024e+17 tox=AGAUSS(9e-09,9e-09,10) xj=1.00000e-07 +lint=6.23e-8 wint=1.22e-7 +vth0=AGAUSS(-.6732829,-.6732829,10) k1=.8362093 k2=-8.606622e-02 k3=1.82 +dvt0=1.903801 dvt1=.5333922 dvt2=-.1862677 +nlx=1.28e-8 w0=2.1e-6 +k3b=-0.24 prwg=-0.001 prwb=-0.323 +vsat=103503.2 ua=1.39995e-09 ub=1.e-19 uc=-2.73e-11 +rdsw=460 u0=AGAUSS(138.7609,138.7609,10) +a0=.4716551 ags=0.12 +keta=-1.871516e-03 a1=.3417965 a2=0.83 +voff=-.074182 nfactor=1.54389 cit=-1.015667e-03 +cdsc=8.937517e-04 +cdscb=1.45e-4 cdscd=1.04e-4 +dvt0w=0.232 dvt1w=4.5e6 dvt2w=-0.0023 +eta0=6.024776e-02 etab=-4.64593e-03 +dsub=.23222404 +pclm=.989 pdiblc1=2.07418e-02 pdiblc2=1.33813e-3 +drout=.3222404 pscbe1=118000 pscbe2=1e-09 +pvag=0 +kt1=-0.25 kt2=-0.032 prt=64.5 +at=33000 +ute=-1.5 +ua1=4.312e-9 ub1=6.65e-19 uc1=0 +kt1l=0 +noimod=2 +af=9.970e-01 kf=2.080e-29 ef=1.015e+00 +noia=1.480e+18 noib=3.320e+03 noic=1.770e-13 .end .end ngspice-26/examples/Monte_Carlo/MC_ring.sp0000644000265600020320000002265012264261473020140 0ustar andreasadminPerform Monte Carlo simulation in ngspice * 25 stage Ring-Osc. BSIM3 vin in out dc 0.5 pulse 0.5 0 0.1n 5n 1 1 1 vdd dd 0 dc 3.3 vss ss 0 dc 0 ve sub 0 dc 0 vpe well 0 dc 3.3 .subckt inv1 dd ss sub well in out mn1 out in ss sub n1 w=2u l=0.35u as=3p ad=3p ps=4u pd=4u mp1 out in dd well p1 w=4u l=0.35u as=7p ad=7p ps=6u pd=6u .ends inv1 .subckt inv5 dd ss sub well in out xinv1 dd ss sub well in 1 inv1 xinv2 dd ss sub well 1 2 inv1 xinv3 dd ss sub well 2 3 inv1 xinv4 dd ss sub well 3 4 inv1 xinv5 dd ss sub well 4 out inv1 .ends inv5 xinv1 dd ss sub well in out5 inv5 xinv2 dd ss sub well out5 out10 inv5 xinv3 dd ss sub well out10 out15 inv5 xinv4 dd ss sub well out15 out20 inv5 xinv5 dd ss sub well out20 out inv5 xinv11 dd 0 sub well out buf inv1 cout buf ss 0.2pF * .options noacct .control save buf $ we just need buf, save memory by more than 10x let mc_runs = 10 $ number of runs for monte carlo let run = 0 $ number of actual run set curplot = new $ create a new plot set curplottitle = "Transient outputs" set plot_out = $curplot $ store its name to 'plot_out' set curplot = new $ create a new plot set curplottitle = "FFT outputs" set plot_fft = $curplot $ store its name to 'plot_fft' set curplot = new $ create a new plot set curplottitle = "Oscillation frequency" set max_fft = $curplot $ store its name to 'max_fft' let mc_runsp = mc_runs + 1 let maxffts = unitvec(mc_runsp) $ vector for storing max measure results let halfffts = unitvec(mc_runsp)$ vector for storing measure results at -40dB rising * * define distributions for random numbers: * unif: uniform distribution, deviation relativ to nominal value * aunif: uniform distribution, deviation absolut * gauss: Gaussian distribution, deviation relativ to nominal value * agauss: Gaussian distribution, deviation absolut define unif(nom, var) (nom + (nom*var) * sunif(0)) define aunif(nom, avar) (nom + avar * sunif(0)) define gauss(nom, var, sig) (nom + (nom*var)/sig * sgauss(0)) define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0)) * * We want to vary the model parameters vth0, u0, tox, lint, and wint * of the BSIM3 model for the NMOS and PMOS transistors. * We may obtain the nominal values (nom) by manually extracting them from * the parameter set. Here we get them automatically and store them into * variables. This has the advantage that you may change the parameter set * without having to look up the values again. set n1vth0=@n1[vth0] set n1u0=@n1[u0] set n1tox=@n1[tox] set n1lint=@n1[lint] set n1wint=@n1[wint] set p1vth0=@p1[vth0] set p1u0=@p1[u0] set p1tox=@p1[tox] set p1lint=@p1[lint] set p1wint=@p1[wint] * * run the simulation loop dowhile run <= mc_runs * without the reset switch there is some strange drift * towards lower and lower frequencies reset * run=0 simulates with nominal parameters if run > 0 altermod @n1[vth0]=gauss($n1vth0, 0.1, 3) altermod @n1[u0]=gauss($n1u0, 0.05, 3) altermod @n1[tox]=gauss($n1tox, 0.1, 3) altermod @n1[lint]=gauss($n1lint, 0.1, 3) altermod @n1[wint]=gauss($n1wint, 0.1, 3) altermod @p1[vth0]=gauss($p1vth0, 0.1, 3) altermod @p1[u0]=gauss($p1u0, 0.1, 3) altermod @p1[tox]=gauss($p1tox, 0.1, 3) altermod @p1[lint]=gauss($p1lint, 0.1, 3) altermod @p1[wint]=gauss($p1wint, 0.1, 3) end tran 15p 50n 0 * select stop and step so that number of data points after linearization is not too * close to 8192, which would yield varying number of line length and thus scale for fft. * * We have to figure out what to do if a single simulation will not converge. * Is there a variable which may be set if there is no convergence? * Then we might skip this run and continue with a new run. It does not exist for now. * So we have to rely on the robustness of the following steps not leading * to a seg fault if the tran data are missing. * set run ="$&run" $ create a variable from the vector set mc_runs ="$&mc_runs" $ create a variable from the vector echo simulation run no. $run of $mc_runs * save the linearized data for having equal time scales for all runs linearize buf $ linearize only buf, no other vectors needed set dt = $curplot $ store the current plot to dt (tran i+1) setplot $plot_out $ make 'plt_out' the active plot * firstly save the time scale once to become the default scale if run=0 let time={$dt}.time end let vout{$run}={$dt}.buf $ store the output vector to plot 'plot_out' setplot $dt $ go back to the previous plot (tran i+1) fft buf $ run fft on vector buf let buf2=db(mag(buf)) * find the frequency where buf has its maximum of the fft signal meas sp fft_max MAX_AT buf2 from=0.1G to=0.7G * find the frequency where buf is -40dB at rising fft signal meas sp fft_40 WHEN buf2=-40 RISE=1 from=0.1G to=0.7G * store the fft vector set dt = $curplot $ store the current plot to dt (spec i) setplot $plot_fft $ make 'plot_fft' the active plot if run=0 let frequency={$dt}.frequency end let fft{$run}={$dt}.buf $ store the output vector to plot 'plot_fft' * store the measured value setplot $max_fft $ make 'max_fft' the active plot let maxffts[{$run}]={$dt}.fft_max let halfffts[{$run}]={$dt}.fft_40 * setplot $plot_out * The following command does not work here. Why not? Probably not a real copy. * destroy $dt $ save memory, we don't need this plot (spec) any more setplot $dt $ go back to the previous plot let run = run + 1 end ***** plotting ********************************************************** * plot {$plot_out}.allv plot {$plot_out}.vout0 $ just plot the tran output with nominal parameters * setplot $plot_fft * plot db(mag(ally)) xlimit .1G 1G ylimit -80 10 plot db(mag({$plot_fft}.ally)) xlimit .1G 1G ylimit -80 10 * * create a histogram from vector maxffts setplot $max_fft $ make 'max_fft' the active plot set startfreq=400MEG set bin_size=5MEG set bin_count=20 compose xvec start=$startfreq step=$bin_size lin=$bin_count $ requires variables as parameters settype frequency xvec let bin_count=$bin_count $ create a vector from the variable let yvec=unitvec(bin_count) $ requires vector as parameter let startfreq=$startfreq let bin_size=$bin_size * put data into the correct bins let run = 0 dowhile run < mc_runs set run = "$&run" $ create a variable from the vector let val = maxffts[{$run}] let part = 0 * Check if val fits into a bin. If yes, raise bin by 1 dowhile part < bin_count if ((val < (startfreq + (part+1)*bin_size)) & (val > (startfreq + part*bin_size))) let yvec[part] = yvec[part] + 1 break end let part = part + 1 end let run = run + 1 end * plot the histogram set plotstyle=combplot plot yvec-1 vs xvec $ subtract 1 because with started with unitvec containing ones * calculate jitter let diff40 = (vecmax(halfffts) - vecmin(halfffts))*1e-6 echo echo Max. jitter is "$&diff40" MHz rusage .endc ******************************************************************************** .model n1 nmos +level=8 +version=3.3.0 +tnom=27.0 +nch=2.498e+17 tox=9e-09 xj=1.00000e-07 +lint=9.36e-8 wint=1.47e-7 +vth0=.6322 k1=.756 k2=-3.83e-2 k3=-2.612 +dvt0=2.812 dvt1=0.462 dvt2=-9.17e-2 +nlx=3.52291e-08 w0=1.163e-6 +k3b=2.233 +vsat=86301.58 ua=6.47e-9 ub=4.23e-18 uc=-4.706281e-11 +rdsw=650 u0=388.3203 wr=1 +a0=.3496967 ags=.1 b0=0.546 b1=1 +dwg=-6.0e-09 dwb=-3.56e-09 prwb=-.213 +keta=-3.605872e-02 a1=2.778747e-02 a2=.9 +voff=-6.735529e-02 nfactor=1.139926 cit=1.622527e-04 +cdsc=-2.147181e-05 +cdscb=0 dvt0w=0 dvt1w=0 dvt2w=0 +cdscd=0 prwg=0 +eta0=1.0281729e-02 etab=-5.042203e-03 +dsub=.31871233 +pclm=1.114846 pdiblc1=2.45357e-03 pdiblc2=6.406289e-03 +drout=.31871233 pscbe1=5000000 pscbe2=5e-09 pdiblcb=-.234 +pvag=0 delta=0.01 +wl=0 ww=-1.420242e-09 wwl=0 +wln=0 wwn=.2613948 ll=1.300902e-10 +lw=0 lwl=0 lln=.316394 lwn=0 +kt1=-.3 kt2=-.051 +at=22400 +ute=-1.48 +ua1=3.31e-10 ub1=2.61e-19 uc1=-3.42e-10 +kt1l=0 prt=764.3 +noimod=2 +af=1.075e+00 kf=9.670e-28 ef=1.056e+00 +noia=1.130e+20 noib=7.530e+04 noic=-8.950e-13 **** PMOS *** .model p1 pmos +level=8 +version=3.3.0 +tnom=27.0 +nch=3.533024e+17 tox=9e-09 xj=1.00000e-07 +lint=6.23e-8 wint=1.22e-7 +vth0=-.6732829 k1=.8362093 k2=-8.606622e-02 k3=1.82 +dvt0=1.903801 dvt1=.5333922 dvt2=-.1862677 +nlx=1.28e-8 w0=2.1e-6 +k3b=-0.24 prwg=-0.001 prwb=-0.323 +vsat=103503.2 ua=1.39995e-09 ub=1.e-19 uc=-2.73e-11 +rdsw=460 u0=138.7609 +a0=.4716551 ags=0.12 +keta=-1.871516e-03 a1=.3417965 a2=0.83 +voff=-.074182 nfactor=1.54389 cit=-1.015667e-03 +cdsc=8.937517e-04 +cdscb=1.45e-4 cdscd=1.04e-4 +dvt0w=0.232 dvt1w=4.5e6 dvt2w=-0.0023 +eta0=6.024776e-02 etab=-4.64593e-03 +dsub=.23222404 +pclm=.989 pdiblc1=2.07418e-02 pdiblc2=1.33813e-3 +drout=.3222404 pscbe1=118000 pscbe2=1e-09 +pvag=0 +kt1=-0.25 kt2=-0.032 prt=64.5 +at=33000 +ute=-1.5 +ua1=4.312e-9 ub1=6.65e-19 uc1=0 +kt1l=0 +noimod=2 +af=9.970e-01 kf=2.080e-29 ef=1.015e+00 +noia=1.480e+18 noib=3.320e+03 noic=1.770e-13 .end ngspice-26/examples/Monte_Carlo/MC_2_control.sp0000644000265600020320000000323112264261473021074 0ustar andreasadmin* Perform Monte Carlo simulation in ngspice * script for use with 25 stage Ring-Osc. BSIM3 * circuit is in MC_2_circ.sp * edit 'set sourcepath' for your path to circuit file * start script by 'ngspice -o MC_2_control.log MC_2_control.sp' * .control save buf $ we just need output vector buf, save memory by more than 10x let mc_runs = 100 $ number of runs for monte carlo let run = 1 $ number of the actual run * Where to find the circuit netlist file MC_2_circ.sp set sourcepath = ( D:\Spice_general\ngspice\examples\Monte_Carlo ) * create file for frequency information echo Monte Carlo, frequency of R.O. > MC_frequ.log * run the simulation loop dowhile run <= mc_runs * without the reset switch there is some strange drift * towards lower and lower frequencies reset set run ="$&run" $ create a variable from the vector set rndseed = $run $ set the rnd seed value to the loop index source MC_2_circ.sp $ load the circuit, including model data tran 15p 200n 0 write mc_ring{$run}.out buf $ write each sim output to its own rawfile linearize buf $ lienarize buf to allow fft fft buf $ run fft on vector buf let buf2=db(mag(buf)) * find the frequency where buf has its maximum of the fft signal meas sp fft_max MAX_AT buf2 from=0.1G to=0.7G print fft_max >> MC_frequ.log $ print frequency to file destroy all $ delete all output vectors remcirc $ delete circuit let run = run + 1 $ increase loop counter end quit .endc .end ngspice-26/examples/Monte_Carlo/OpWien.sp0000644000265600020320000000374712264261473020031 0ustar andreasadminOPWIEN.CIR - OPAMP WIEN-BRIDGE OSCILLATOR * http://www.ecircuitcenter.com/circuits/opwien/opwien.htm * single simulation run * 2 resistors and 2 capacitors of Wien bridge a varied statistically * number of variations: varia * Simulation time .param ttime=12000m .param varia=100 .param ttime10 = 'ttime/varia' * nominal resistor and capacitor values .param res = 10k .param cn = 16NF * CURRENT PULSE TO START OSCILLATIONS IS 0 3 dc 0 PWL(0US 0MA 10US 0.1MA 40US 0.1MA 50US 0MA 10MS 0MA) * * RC TUNING VR2 r2 0 dc 0 trrandom (2 'ttime10' 0 1) $ Gauss controlling voltage * *VR2 r2 0 dc 0 trrandom (1 'ttime10' 0 3) $ Uniform within -3 3 * * If Gauss, factor 0.033 is 10% equivalent to 3 sigma * if uniform, uniform between +/- 10% R2 4 6 R = 'res + 0.033 * res*V(r2)' $ behavioral resistor *R2 4 6 'res' $ constant R VC2 c2 0 dc 0 trrandom (2 'ttime10' 0 1) *C2 6 3'cn' $ constant C C2 6 3 C = 'cn + 0.033 * cn*V(c2)' $ behavioral capacitor VR1 r1 0 dc 0 trrandom (2 'ttime10' 0 1) *VR1 r1 0 dc 0 trrandom (1 'ttime10' 0 3) R1 3 0 R = 'res + 0.033 * res*V(r1)' *R1 3 0 'res' VC1 c1 0 dc 0 trrandom (2 'ttime10' 0 1) C1 3 0 C = 'cn + 0.033 * cn*V(c2)' *C1 3 0 'cn' * NON-INVERTING OPAMP R10 0 2 10K R11 2 5 18K XOP 3 2 4 OPAMP1 * AMPLITUDE STABILIZATION R12 5 4 5K D1 5 4 D1N914 D2 4 5 D1N914 * .model D1N914 D(Is=0.1p Rs=16 CJO=2p Tt=12n Bv=100 Ibv=0.4n) * * OPAMP MACRO MODEL, SINGLE-POLE * connections: non-inverting input * | inverting input * | | output * | | | .SUBCKT OPAMP1 1 2 6 * INPUT IMPEDANCE RIN 1 2 10MEG * DC GAIN (100K) AND POLE 1 (100HZ) EGAIN 3 0 1 2 100K RP1 3 4 1K CP1 4 0 1.5915UF * OUTPUT BUFFER AND RESISTANCE EBUFFER 5 0 4 0 1 ROUT 5 6 10 .ENDS * * ANALYSIS .TRAN 0.05MS 'ttime' * * VIEW RESULTS .control option noinit run plot V(4) 5*V(r1) 5*V(r2) 5*V(c1) 5*V(c2) linearize v(4) fft v(4) let v4mag = mag(v(4)) plot v4mag plot v4mag xlimit 500 1500 *wrdata histo v4mag rusage .endc .END ngspice-26/examples/Monte_Carlo/MonteCarlo.sp0000644000265600020320000000437212264261473020666 0ustar andreasadmin* Effecting a Monte Carlo calculation in ngspice V1 N001 0 AC 1 DC 0 R1 N002 N001 141 * C1 OUT 0 1e-09 L1 OUT 0 10e-06 C2 N002 0 1e-09 L2 N002 0 10e-06 L3 N003 N002 40e-06 C3 OUT N003 250e-12 * R2 0 OUT 141 .control let mc_runs = 5 let run = 0 set curplot=new $ create a new plot set scratch=$curplot $ store its name to 'scratch' setplot $scratch $ make 'scratch' the active plot let bwh=unitvec(mc_runs) $ create a vector in plot 'scratch' to store bandwidth data * define distributions for random numbers: * unif: uniform distribution, deviation relativ to nominal value * aunif: uniform distribution, deviation absolut * gauss: Gaussian distribution, deviation relativ to nominal value * agauss: Gaussian distribution, deviation absolut * limit: if unif. distributed value >=0 then add +avar to nom, else -avar define unif(nom, rvar) (nom + (nom*rvar) * sunif(0)) define aunif(nom, avar) (nom + avar * sunif(0)) define gauss(nom, rvar, sig) (nom + (nom*rvar)/sig * sgauss(0)) define agauss(nom, avar, sig) (nom + avar/sig * sgauss(0)) * define limit(nom, avar) (nom + ((sgauss(0) ge 0) ? avar : -avar)) define limit(nom, avar) (nom + ((sgauss(0) >= 0) ? avar : -avar)) * * dowhile run < mc_runs $ loop starts here * * alter c1 = unif(1e-09, 0.1) * alter c1 = aunif(1e-09, 100e-12) * alter c1 = gauss(1e-09, 0.1, 3) * alter c1 = agauss(1e-09, 100e-12, 3) * alter c1 = unif(1e-09, 0.1) alter l1 = unif(10e-06, 0.1) alter c2 = unif(1e-09, 0.1) alter l2 = unif(10e-06, 0.1) alter l3 = unif(40e-06, 0.1) alter c3 = limit(250e-12, 25e-12) * ac oct 100 250K 10Meg * * measure bandwidth at -10 dB meas ac bw trig vdb(out) val=-10 rise=1 targ vdb(out) val=-10 fall=1 * set run ="$&run" $ create a variable from the vector set dt = $curplot $ store the current plot to dt setplot $scratch $ make 'scratch' the active plot let vout{$run}={$dt}.v(out) $ store the output vector to plot 'scratch' let bwh[run]={$dt}.bw $ store bw to vector bwh in plot 'scratch' setplot $dt $ go back to the previous plot let run = run + 1 end $ loop ends here * plot db({$scratch}.allv) echo print {$scratch}.bwh .endc .end ngspice-26/examples/TransmissionLines/0000755000265600020320000000000012264261473017533 5ustar andreasadminngspice-26/examples/TransmissionLines/ltra5_1_line.sp0000644000265600020320000002070612264261473022362 0ustar andreasadmin Example 3 for interconnect simulation * From neug1, Mosaic aluminum lines. 2um thick, 11um wide. Assuming * 10um above the ground. * Material: aluminum; resistivity (sigma) = 2.74uohm-cm = 2.74e-8 ohm-m * Dielectric: SiO2, dielectric constant (epsilon) =3.7 * epsilon0 = 8.85e-12 MKS units * mu0 = 4e-7*PI * speed of light in free space = 1/sqrt(mu0*epsilon0) = 2.9986e8 MKS units * * Line parameter calculations: * capacitance: parallel plate * C = epsilon*epsilon0 * A / l * C = 3.7*8.85e-12 * 11e-6 * 1(metre) / 10e-6 = 36.02e-12 F/m * + 30% = 46.8e-12 F/m = 0.468pF/cm * * C_freespace = 46.8e-12/epsilon = 12.65e-12 F/m * speed of light in free space v0 = 2.9986e8 = 1/sqrt(L0*C0) * => L0 = 1/C0*v0^2 * L0 = 1/(12.65e-12 * 8.9916e16) = 1/113.74e4 = 0.008792e-4 H/m * = 0.8792 uH/m = 8.792nH/cm * * R = rho * l / A = 2.74e-8 * 1 / (11e-6*2e-6) = 1245.45 ohms/m * = 12.45ohms/cm * * transmission line parameters: * nominal z0 = sqrt(L/C) = 137 ohms * td = sqrt(LC) = 64.14e-12 secs/cm = 0.064ns/cm * * vcc vcc 0 5 v1 1 0 0v pulse(0 5 0.1ns 0.1ns 0.1ns 1ns 100ns) rs 1 2 10 xdrv 1 2 vcc bjtdrvr xrcv 3 4 vcc bjtdrvr xrcv 3 4 vcc dioload d1 3 vcc diod d2 0 3 diod cl 3 0 1pF o1 2 0 3 0 lline *x1 2 3 sixteencm x1 2 3 xonecm .model diod d .model lline ltra rel=1.8 r=12.45 g=0 l=8.792e-9 c=0.468e-12 len=16 steplimit .control * 1cm * 2cm * 4cm * 6cm * 8cm * 10cm * 12cm *tran 0.001ns 15ns 0 0.1ns * 24cm tran 0.001ns 10ns 0 0.1ns * onecm10 *tran 0.001ns 10ns 0 0.01ns plot v(1) v(2) v(3) .endc * 1. define the subckt r10 to be one tenth of the resistance per cm. * 2. define the subckt onecm to be one of onecm10 (modelled using * 10 segments), onecm8, onecm4, onecm2 and lump1. Then use * the subckts onecm, fourcm, fivecm, tencm, twelvecm, * twentyfourcm in the circuit. The line is modelled as rlc segments. * 3. define the subckt xonecm to be one of xonecm10, xonecm8, * xonecm4, xonecm2 and xlump1. Use the subckts xonecm, * xfourcm, xfivecm, xtencm, xtwelvecm, xtwentyfourcm in the * circuit. The line will be modelled as r-lossless lumps. .subckt xonecm 1 2 *x1 1 2 xlump1 x1 1 2 xonecm4 .ends xonecm .subckt onecm 1 2 *x1 1 2 lump1 x1 1 2 onecm4 .ends onecm .subckt r10 1 2 r1 1 2 1.245 .ends r10 * ECL driver and diode receiver models - from Raytheon .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn q10 268 17 0 qmodpdmine *q10 268 17 0 qmodpd q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 4 5 c1 28 0 5pF r503 0 4 5.55 r400 0 28 120k r500 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * End ECL driver and Diode receiver models from Raytheon *10 segments per cm .subckt lump10 1 2 l1 1 3 0.0.8792nH c1 2 0 0.0468pF x1 3 2 r10 .ends lump10 *1 segment per cm .subckt lump1 1 2 l1 1 3 8.792nH c1 2 0 0.468pF x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 8 r10 x6 8 9 r10 x7 9 10 r10 x8 10 11 r10 x9 11 12 r10 x10 12 2 r10 .ends lump1 *2 segments per cm .subckt lump2 1 2 l1 1 3 4.396nH c1 2 0 0.234pF x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 2 r10 .ends lump2 *4 segments per cm .subckt lump4 1 2 l1 1 3 2.198nH c1 2 0 0.117pF x1 3 4 r10 x2 4 5 r10 x3 5 2 r10 x4 5 2 r10 .ends lump4 *8 segments per cm .subckt lump8 1 2 l1 1 3 1.099nH c1 2 0 0.0585pF x1 3 4 r10 x2 4 2 r10 x3 4 2 r10 x4 4 2 r10 x5 4 2 r10 .ends lump8 .subckt onecm10 1 2 x1 1 3 lump10 x2 3 4 lump10 x3 4 5 lump10 x4 5 6 lump10 x5 6 7 lump10 x6 7 8 lump10 x7 8 9 lump10 x8 9 10 lump10 x9 10 11 lump10 x10 11 2 lump10 .ends onecm10 .subckt onecm8 1 2 x1 1 3 lump8 x2 3 4 lump8 x3 4 5 lump8 x4 5 6 lump8 x5 6 7 lump8 x6 7 8 lump8 x7 8 9 lump8 x8 9 2 lump8 .ends onecm8 .subckt onecm4 1 2 x1 1 3 lump4 x2 3 4 lump4 x3 4 5 lump4 x4 5 2 lump4 .ends onecm4 .subckt onecm2 1 2 x1 1 3 lump2 x2 3 2 lump2 .ends onecm2 .subckt twocm 1 2 x1 1 3 onecm x2 3 2 onecm .ends twocm .subckt threecm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 2 onecm .ends threecm .subckt fourcm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 5 onecm x4 5 2 onecm .ends fourcm .subckt fivecm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 5 onecm x4 5 6 onecm x5 6 2 onecm .ends fivecm .subckt sixcm 1 2 x1 1 3 fivecm x2 3 2 onecm .ends sixcm .subckt sevencm 1 2 x1 1 3 sixcm x2 3 2 onecm .ends sevencm .subckt eightcm 1 2 x1 1 3 sevencm x2 3 2 onecm .ends eightcm .subckt ninecm 1 2 x1 1 3 eightcm x2 3 2 onecm .ends ninecm .subckt tencm 1 2 x1 1 3 fivecm x2 3 2 fivecm .ends tencm .subckt elevencm 1 2 x1 1 3 tencm x2 3 2 onecm .ends elevencm .subckt twelvecm 1 2 x1 1 3 tencm x2 3 4 onecm x3 4 2 onecm .ends twelvecm .subckt sixteencm 1 2 x1 1 3 eightcm x2 3 2 eightcm .ends sixteencm .subckt twentyfourcm 1 2 x1 1 3 twelvecm x2 3 2 twelvecm .ends twentyfourcm *modelling using R and lossless lines * 10 segments per cm .model lless10 ltra nocontrol rel=10 r=0 g=0 l=8.792e-9 +c=0.468e-12 len=0.1 steplimit quadinterp * 8 segments per cm .model lless8 ltra nocontrol rel=10 r=0 g=0 l=8.792e-9 +c=0.468e-12 len=0.125 steplimit quadinterp * 4 segments per cm .model lless4 ltra nocontrol rel=10 r=0 g=0 l=8.792e-9 +c=0.468e-12 len=0.25 steplimit quadinterp * 2 segments per cm .model lless2 ltra nocontrol rel=10 r=0 g=0 l=8.792e-9 +c=0.468e-12 len=0.5 steplimit quadinterp * 1 segment per cm .model lless1 ltra nocontrol rel=10 r=0 g=0 l=8.792e-9 +c=0.468e-12 len=1 steplimit quadinterp *10 segments per cm .subckt xlump10 1 2 o1 1 0 3 0 lless10 x1 3 2 r10 .ends xlump10 *1 segment per cm .subckt xlump1 1 2 o1 1 0 3 0 lless1 x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 8 r10 x6 8 9 r10 x7 9 10 r10 x8 10 11 r10 x9 11 12 r10 x10 12 2 r10 .ends xlump1 *2 segments per cm .subckt xlump2 1 2 o1 1 0 3 0 lless2 x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 2 r10 .ends xlump2 *4 segments per cm .subckt xlump4 1 2 o1 1 0 3 0 lless4 x1 3 4 r10 x2 4 5 r10 x3 5 2 r10 x4 5 2 r10 .ends xlump4 *8 segments per cm .subckt xlump8 1 2 o1 1 0 3 0 lless8 x1 3 4 r10 x2 4 2 r10 x3 4 2 r10 x4 4 2 r10 x5 4 2 r10 .ends xlump8 .subckt xonecm10 1 2 x1 1 3 xlump10 x2 3 4 xlump10 x3 4 5 xlump10 x4 5 6 xlump10 x5 6 7 xlump10 x6 7 8 xlump10 x7 8 9 xlump10 x8 9 10 xlump10 x9 10 11 xlump10 x10 11 2 xlump10 .ends xonecm10 .subckt xonecm8 1 2 x1 1 3 xlump8 x2 3 4 xlump8 x3 4 5 xlump8 x4 5 6 xlump8 x5 6 7 xlump8 x6 7 8 xlump8 x7 8 9 xlump8 x8 9 2 xlump8 .ends xonecm8 .subckt xonecm4 1 2 x1 1 3 xlump4 x2 3 4 xlump4 x3 4 5 xlump4 x4 5 2 xlump4 .ends xonecm4 .subckt xonecm2 1 2 x1 1 3 xlump2 x2 3 2 xlump2 .ends xonecm2 .subckt xtwocm 1 2 x1 1 3 xonecm x2 3 2 xonecm .ends xtwocm .subckt xthreecm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 2 xonecm .ends xthreecm .subckt xfourcm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 5 xonecm x4 5 2 xonecm .ends xfourcm .subckt xfivecm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 5 xonecm x4 5 6 xonecm x5 6 2 xonecm .ends xfivecm .subckt xsixcm 1 2 x1 1 3 xfivecm x2 3 2 xonecm .ends xsixcm .subckt xsevencm 1 2 x1 1 3 xsixcm x2 3 2 xonecm .ends xsevencm .subckt xeightcm 1 2 x1 1 3 xsevencm x2 3 2 xonecm .ends xeightcm .subckt xninecm 1 2 x1 1 3 xeightcm x2 3 2 xonecm .ends xninecm .subckt xtencm 1 2 x1 1 3 xfivecm x2 3 2 xfivecm .ends xtencm .subckt xelevencm 1 2 x1 1 3 xtencm x2 3 2 xonecm .ends xelevencm .subckt xtwelvecm 1 2 x1 1 3 xtencm x2 3 4 xonecm x3 4 2 xonecm .ends xtwelvecm .subckt xsixteencm 1 2 x1 1 3 xeightcm x2 3 2 xeightcm .ends xsixteencm .subckt xtwentyfourcm 1 2 x1 1 3 xtwelvecm x2 3 2 xtwelvecm .ends xtwentyfourcm .end ngspice-26/examples/TransmissionLines/cpl4_txl_2_line.sp0000644000265600020320000001706312264261473023067 0ustar andreasadminBJTdriver -- 2in st. lin -- 20in coupled line CPL -- 2in st line -- DiodeCircuit * This unclassified circuit is from Raytheon, courtesy Gerry Marino. * * _______ * -------- 2in _________________ 2in | | * | BJT |______| |______|Diode| * | |------| |------| | * | Drvr | line | 2-wire | line |rcvr.| * -------- | coupled | |_____| * | transmission | * |-/\/\/\/\----| line |-------\/\/\/\/\----| * | 50ohms | | 50ohms | * | | | | * Ground ----------------- Ground * * * Each inch of the lossy line is modelled by 10 LRC lumps in the * Raytheon model. * The line parameters (derived from the Raytheon input file) are: * L = 9.13nH per inch * C = 3.65pF per inch * R = 0.2 ohms per inch * K = 0.482 [coupling coefficient; K = M/sqrt(L1*L2)] * Cc = 1.8pF per inch * * coupled ltra model generated using the standalone program * multi_decomp * the circuit *tran 0.1ns 60ns v1 1 0 0v pulse(0 4 1ns 1ns 1ns 20ns 40ns) *v1 1 0 4v pulse(4 0 1ns 1ns 1ns 20ns 40ns) vcc 10 0 5v * series termination *x1 1 oof 10 bjtdrvr *rseries oof 2 50 x1 1 2 10 bjtdrvr rt1 3 0 50 * convolution model x2 2 3 4 5 conv2wetcmodel * rlc segments model *x2 2 3 4 5 rlc2wetcmodel x3 4 dioload rt2 5 0 50 .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) .options acct reltol=1e-3 abstol=1e-12 .control tran 0.1ns 60ns 0 0.35N plot v(2) v(4) v(5) .endc * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn *q10 268 17 0 qmodpd q10 268 17 0 qmodpdmine q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 *comment out everything in dioload except d5 and r503, and watch * the difference in results obtained between a tran 0.1ns 20ns and * a tran 0.01ns 20ns vccint 5 0 5v c1 28 0 5pF r503 0 4 5.55 r4 0 28 120k r5 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * subckt rlclump - one RLC lump of the lossy line .subckt rlclump 1 2 *r1 1 3 0.02 *c1 3 0 0.365pF *l1 3 2 0.913nH l1 1 3 0.913nH c1 2 0 0.365pF r1 3 2 0.02 *r1 1 3 0.01 *c1 3 0 0.1825pF *l1 3 4 0.4565nH *r2 4 5 0.01 *c2 5 0 0.1825pF *l2 5 2 0.4565nH *c1 1 0 0.365pF *l1 1 2 0.913nH .ends lump .subckt rlconeinch 1 2 x1 1 3 rlclump x2 3 4 rlclump x3 4 5 rlclump x4 5 6 rlclump x5 6 7 rlclump x6 7 8 rlclump x7 8 9 rlclump x8 9 10 rlclump x9 10 11 rlclump x10 11 2 rlclump .ends rlconeinch .subckt rlctwoinch 1 2 x1 1 3 rlconeinch x2 3 2 rlconeinch .ends rlctwoinch .subckt rlcfourinch 1 2 x1 1 3 rlconeinch x2 3 4 rlconeinch x3 4 5 rlconeinch x4 5 2 rlconeinch .ends rlcfourinch .subckt rlcfiveinch 1 2 x1 1 3 rlconeinch x2 3 4 rlconeinch x3 4 5 rlconeinch x4 5 6 rlconeinch x5 6 2 rlconeinch .ends rlcfiveinch .subckt rlctwentyrlcfourinch 1 2 x1 1 3 rlcfiveinch x2 3 4 rlcfiveinch x3 4 5 rlcfiveinch x4 5 6 rlcfiveinch x5 6 2 rlcfourinch .ends rlctwentyrlcfourinch .subckt rlclumpstub A B C D x1 A int1 rlcfiveinch x2 int1 int2 rlcfiveinch x3 int2 1 rlcfiveinch x4 1 2 rlcfourinch x5 1 int3 rlcfiveinch x6 int3 B rlconeinch x7 2 C rlcfiveinch x8 2 D rlcfourinch .ends rlclumpstub .subckt ltrastub A B C D yy1 A 0 1 0 ylline15in yy2 1 0 B 0 ylline6in yy3 1 0 2 0 ylline4in yy4 2 0 C 0 ylline5in yy5 2 0 D 0 ylline4in .ends ltrastub *modelling using R and lossless lines *5 segments per inch .model yllfifth txl r=0 g=0 l=9.13e-9 c=3.65e-12 length=0.2 .subckt xlump 1 2 y1 1 0 3 0 yllfifth r1 2 3 0.04 .ends xlump .subckt xoneinch 1 2 x1 1 3 xlump x2 3 4 xlump x3 4 5 xlump x4 5 6 xlump x5 6 2 xlump *x5 6 7 xlump *x6 7 8 xlump *x7 8 9 xlump *x8 9 10 xlump *x9 10 11 xlump *x10 11 2 xlump .ends xoneinch .subckt xFourinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 2 xoneinch .ends xfourinch .subckt xfiveinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 6 xoneinch x5 6 2 xoneinch .ends xfiveinch .subckt xlumpstub A B C D x1 A int1 xfiveinch x2 int1 int2 xfiveinch x3 int2 1 xfiveinch x4 1 2 xfourinch x5 1 int3 xfiveinch x6 int3 B xoneinch x7 2 C xfiveinch x8 2 D xfourinch .ends xlumpstub * modelling a 2 wire coupled system using RLC lumps * 10 segments per inch * * 1---xxxxx----2 * 3---xxxxx----4 .subckt rlc2wlump 1 3 2 4 l1 1 5 0.913nH c1 2 0 0.365pF r1 5 2 0.02 l2 3 6 0.913nH c2 4 0 0.365pF r2 6 4 0.02 cmut 2 4 0.18pF k12 l1 l2 0.482 .ends rlc2wlump .subckt rlc2woneinch 1 2 3 4 x1 1 2 5 6 rlc2wlump x2 5 6 7 8 rlc2wlump x3 7 8 9 10 rlc2wlump x4 9 10 11 12 rlc2wlump x5 11 12 13 14 rlc2wlump x6 13 14 15 16 rlc2wlump x7 15 16 17 18 rlc2wlump x8 17 18 19 20 rlc2wlump x9 19 20 21 22 rlc2wlump x10 21 22 3 4 rlc2wlump .ends rlc2woneinch .subckt rlc2wfiveinch 1 2 3 4 x1 1 2 5 6 rlc2woneinch x2 5 6 7 8 rlc2woneinch x3 7 8 9 10 rlc2woneinch x4 9 10 11 12 rlc2woneinch x5 11 12 3 4 rlc2woneinch .ends rlc2wfiveinch .subckt rlc2wtwentyinch 1 2 3 4 x1 1 2 5 6 rlc2wfiveinch x2 5 6 7 8 rlc2wfiveinch x3 7 8 9 10 rlc2wfiveinch x4 9 10 3 4 rlc2wfiveinch .ends rlc2wtwentyinch .subckt rlc2wetcmodel 1 2 3 4 x1 1 5 rlctwoinch x2 5 2 6 4 rlc2wtwentyinch x3 6 3 rlctwoinch .ends rlc2wetcmodel * Subcircuit conv2wtwentyinch * conv2wtwentyinch is a subcircuit that models a 2-conductor transmission line with * the following parameters: l=9.13e-09, c=3.65e-12, r=0.2, g=0, * inductive_coeff_of_coupling k=0.482, inter-line capacitance cm=1.8e-12, * length=20. Derived parameters are: lm=4.40066e-09, ctot=5.45e-12. * * It is important to note that the model is a simplified one - the * following assumptions are made: 1. The self-inductance l, the * self-capacitance ctot (note: not c), the series resistance r and the * parallel capacitance g are the same for all lines, and 2. Each line * is coupled only to the two lines adjacent to it, with the same * coupling parameters cm and lm. The first assumption imply that edge * effects have to be neglected. The utility of these assumptions is * that they make the sL+R and sC+G matrices symmetric, tridiagonal and * Toeplitz, with useful consequences. * * It may be noted that a symmetric two-conductor line will be * accurately represented by this model. * swec model .model plines cpl +R=0.2 0 + 0.2 +L=9.13e-9 4.4e-9 + 9.13e-9 +G=0 0 0 +C=5.45e-12 -1.8e-12 + 5.45e-12 +length=20 .model yconvtwoinch txl r=0.2 g=0 l=9.13e-9 c=3.65e-12 length=2.0 .subckt conv2wetcmodel 1 2 3 4 y1 1 0 5 0 yconvtwoinch p2 5 2 0 6 4 0 plines y2 6 0 3 0 yconvtwoinch .ends conv2wetcmodel .end ngspice-26/examples/TransmissionLines/ltra7_4_line.sp0000644000265600020320000000711312264261473022364 0ustar andreasadmin6.3inch 4 lossy lines LTRA model -- R load Ra 1 2 1K Rb 0 3 1K Rc 0 4 1K Rd 0 5 1K Re 6 0 1Meg Rf 7 0 1Meg Rg 8 0 1Meg Rh 9 0 1Meg * * Subcircuit test * test is a subcircuit that models a 4-conductor transmission line with * the following parameters: l=9e-09, c=2.9e-13, r=0.3, g=0, * inductive_coeff_of_coupling k=0.6, inter-line capacitance cm=3e-14, * length=6.3. Derived parameters are: lm=5.4e-09, ctot=3.5e-13. * * It is important to note that the model is a simplified one - the * following assumptions are made: 1. The self-inductance l, the * self-capacitance ctot (note: not c), the series resistance r and the * parallel capacitance g are the same for all lines, and 2. Each line * is coupled only to the two lines adjacent to it, with the same * coupling parameters cm and lm. The first assumption implies that edge * effects have to be neglected. The utility of these assumptions is * that they make the sL+R and sC+G matrices symmetric, tridiagonal and * Toeplitz, with useful consequences (see "Efficient Transient * Simulation of Lossy Interconnect", by J.S. Roychowdhury and * D.O Pederson, Proc. DAC 91). * It may be noted that a symmetric two-conductor line is * represented accurately by this model. * Subckt node convention: * * |--------------------------| * 1-----| |-----n+1 * 2-----| |-----n+2 * : | n-wire multiconductor | : * : | line | : * n-1-----|(node 0=common gnd plane) |-----2n-1 * n-----| |-----2n * |--------------------------| * Lossy line models .model mod1_test ltra rel=1.2 nocontrol r=0.3 l=2.62616456193e-10 g=0 c=3.98541019688e-13 len=6.3 .model mod2_test ltra rel=1.2 nocontrol r=0.3 l=5.662616446e-09 g=0 c=3.68541019744e-13 len=6.3 .model mod3_test ltra rel=1.2 nocontrol r=0.3 l=1.23373835171e-08 g=0 c=3.3145898046e-13 len=6.3 .model mod4_test ltra rel=1.2 nocontrol r=0.3 l=1.7737383521e-08 g=0 c=3.01458980439e-13 len=6.3 * subcircuit m_test - modal transformation network for test .subckt m_test 1 2 3 4 5 6 7 8 v1 9 0 0v v2 10 0 0v v3 11 0 0v v4 12 0 0v f1 0 5 v1 0.371748033738 f2 0 5 v2 -0.601500954587 f3 0 5 v3 0.601500954587 f4 0 5 v4 -0.371748036544 f5 0 6 v1 0.60150095443 f6 0 6 v2 -0.371748035044 f7 0 6 v3 -0.371748030937 f8 0 6 v4 0.601500957402 f9 0 7 v1 0.601500954079 f10 0 7 v2 0.37174803072 f11 0 7 v3 -0.371748038935 f12 0 7 v4 -0.601500955482 f13 0 8 v1 0.371748035626 f14 0 8 v2 0.601500956073 f15 0 8 v3 0.601500954504 f16 0 8 v4 0.371748032386 e1 13 9 5 0 0.371748033909 e2 14 13 6 0 0.601500954587 e3 15 14 7 0 0.601500955639 e4 1 15 8 0 0.371748036664 e5 16 10 5 0 -0.60150095443 e6 17 16 6 0 -0.371748035843 e7 18 17 7 0 0.371748032386 e8 2 18 8 0 0.601500957319 e9 19 11 5 0 0.601500955131 e10 20 19 6 0 -0.371748032169 e11 21 20 7 0 -0.371748037896 e12 3 21 8 0 0.601500954513 e13 22 12 5 0 -0.371748035746 e14 23 22 6 0 0.60150095599 e15 24 23 7 0 -0.601500953534 e16 4 24 8 0 0.371748029317 .ends m_test * Subckt test .subckt test 1 2 3 4 5 6 7 8 x1 1 2 3 4 9 10 11 12 m_test o1 9 0 13 0 mod1_test o2 10 0 14 0 mod2_test o3 11 0 15 0 mod3_test o4 12 0 16 0 mod4_test x2 5 6 7 8 13 14 15 16 m_test .ends test * x1 2 3 4 5 6 7 8 9 test * * VS1 1 0 PWL(15.9NS 0.0 16.1Ns 5.0 31.9Ns 5.0 32.1Ns 0.0) .control TRAN 0.2NS 50NS plot v(1) v(2) v(6) v(7) v(8) v(9) .endc * .END ngspice-26/examples/TransmissionLines/txl3_1_line.sp0000644000265600020320000001004112264261473022214 0ustar andreasadmin BJTdriver -- 24inch lossy line TXL model -- DiodeCircuit * This unclassified circuit is from Raytheon, courtesy Gerry Marino. * It consists of a BJT driver connected by a 24 inch lossy line to a * passive load consisting mostly of diodes. Each inch * of the lossy line is modelled by 10 LRC lumps in the Raytheon * model. * The line parameters (derived from the Raytheon input file) are: * L = 9.13nH per inch * C = 3.65pF per inch * R = 0.2 ohms per inch * the circuit v1 1 0 0v pulse(0 4 1ns 1ns 1ns 20ns 40ns) vcc 10 0 5v *rseries 1 2 5 x1 1 2 10 bjtdrvr *t1 2 0 3 0 z0=50.0136 td=4.38119ns rel=10 y2 2 0 3 0 ymod1 *x2 2 3 oneinch *x2 100 101 twentyfourinch *x2 100 101 xtwentyfourinch vtest1 2 100 0 vtest2 101 3 0 x3 3 4 10 dioload *rl 3 0 5 *dl 0 3 diod2 .model ymod1 txl r=0.2 g=0 l=9.13e-9 c=3.65e-12 length=24 .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) .options acct +reltol=1e-3 abstol=1e-14 .control tran 0.1ns 60ns 0 0.5ns plot v(1) v(2) v(3) .endc * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn q10 268 17 0 qmodpdmine *q10 268 17 0 qmodpd q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 4 5 *comment out everything in dioload except d5 and r503, and watch * the difference in results obtained between a tran 0.1ns 20ns and * a tran 0.01ns 20ns c1 28 0 5pF r503 0 4 5.55 r4 0 28 120k r5 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * subckt lump - one RLC lump of the lossy line *10 segments per inch .subckt lump 1 2 *r1 1 3 0.02 *c1 3 0 0.365pF *l1 3 2 0.913nH l1 1 3 0.913nH c1 2 0 0.365pF r1 3 2 0.02 *r1 1 3 0.01 *c1 3 0 0.1825pF *l1 3 4 0.4565nH *r2 4 5 0.01 *c2 5 0 0.1825pF *l2 5 2 0.4565nH *c1 1 0 0.365pF *l1 1 2 0.913nH .ends lump .subckt oneinch 1 2 x1 1 3 lump x2 3 4 lump x3 4 5 lump x4 5 6 lump x5 6 7 lump x6 7 8 lump x7 8 9 lump x8 9 10 lump x9 10 11 lump x10 11 2 lump .ends oneinch .subckt fourinch 1 2 x1 1 3 oneinch x2 3 4 oneinch x3 4 5 oneinch x4 5 2 oneinch .ends fourinch .subckt fiveinch 1 2 x1 1 3 oneinch x2 3 4 oneinch x3 4 5 oneinch x4 5 6 oneinch x5 6 2 oneinch .ends fiveinch .subckt twentyfourinch 1 2 x1 1 3 fiveinch x2 3 4 fiveinch x3 4 5 fiveinch x4 5 6 fiveinch x5 6 2 fourinch .ends twentyfourinch *modelling using R and lossless lines *5 segments per inch .model ymod2 txl r=0 g=0 l=9.13e-9 c=3.65e-12 length=0.2 .subckt xlump 1 2 y1 1 0 3 0 ymod2 r1 2 3 0.04 .ends xlump .subckt xoneinch 1 2 x1 1 3 xlump x2 3 4 xlump x3 4 5 xlump x4 5 6 xlump x5 6 2 xlump *x5 6 7 xlump *x6 7 8 xlump *x7 8 9 xlump *x8 9 10 xlump *x9 10 11 xlump *x10 11 2 xlump .ends xoneinch .subckt xfourinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 2 xoneinch .ends xfourinch .subckt xfiveinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 6 xoneinch x5 6 2 xoneinch .ends xfiveinch .subckt xtwentyfourinch 1 2 x1 1 3 xfiveinch x2 3 4 xfiveinch x3 4 5 xfiveinch x4 5 6 xfiveinch x5 6 2 xfourinch .ends xtwentyfourinch .end ngspice-26/examples/TransmissionLines/txl4_1_line.sp0000644000265600020320000002040512264261473022222 0ustar andreasadmin Example 3 for interconnect simulation * From neug1, Mosaic aluminum lines. 2um thick, 11um wide. Assuming * 10um above the ground. * Material: aluminum; resistivity (sigma) = 2.74uohm-cm = 2.74e-8 ohm-m * Dielectric: SiO2, dielectric constant (epsilon) =3.7 * epsilon0 = 8.85e-12 MKS units * mu0 = 4e-7*PI * speed of light in free space = 1/sqrt(mu0*epsilon0) = 2.9986e8 MKS units * * Line parameter calculations: * capacitance: parallel plate * C = epsilon*epsilon0 * A / l * C = 3.7*8.85e-12 * 11e-6 * 1(metre) / 10e-6 = 36.02e-12 F/m * + 30% = 46.8e-12 F/m = 0.468pF/cm * * C_freespace = 46.8e-12/epsilon = 12.65e-12 F/m * speed of light in free space v0 = 2.9986e8 = 1/sqrt(L0*C0) * => L0 = 1/C0*v0^2 * L0 = 1/(12.65e-12 * 8.9916e16) = 1/113.74e4 = 0.008792e-4 H/m * = 0.8792 uH/m = 8.792nH/cm * * R = rho * l / A = 2.74e-8 * 1 / (11e-6*2e-6) = 1245.45 ohms/m * = 12.45ohms/cm * * transmission line parameters: * nominal z0 = sqrt(L/C) = 137 ohms * td = sqrt(LC) = 64.14e-12 secs/cm = 0.064ns/cm * * vcc vcc 0 5 v1 1 0 0v pulse(0 5 0.1ns 0.1ns 0.1ns 1ns 100ns) rs 1 2 10 xdrv 1 2 vcc bjtdrvr xrcv 3 4 vcc bjtdrvr xrcv 3 4 vcc dioload d1 3 vcc diod d2 0 3 diod cl 3 0 1pF y1 2 0 3 0 yline *x1 2 3 sixteencm x1 2 3 xonecm .model diod d .model yline txl r=12.45 g=0 l=8.792e-9 c=0.468e-12 length=16 .control * 1cm * 2cm * 4cm * 6cm * 8cm * 10cm * 12cm *tran 0.001ns 15ns 0 0.1ns * 24cm tran 0.001ns 10ns 0 0.1ns * onecm10 *tran 0.001ns 10ns 0 0.01ns plot v(1) v(2) v(3) .endc * 1. define the subckt r10 to be one tenth of the resistance per cm. * 2. define the subckt onecm to be one of onecm10 (modelled using * 10 segments), onecm8, onecm4, onecm2 and lump1. Then use * the subckts onecm, fourcm, fivecm, tencm, twelvecm, * twentyfourcm in the circuit. The line is modelled as rlc segments. * 3. define the subckt xonecm to be one of xonecm10, xonecm8, * xonecm4, xonecm2 and xlump1. Use the subckts xonecm, * xfourcm, xfivecm, xtencm, xtwelvecm, xtwentyfourcm in the * circuit. The line will be modelled as r-lossless lumps. .subckt xonecm 1 2 *x1 1 2 xlump1 x1 1 2 xonecm4 .ends xonecm .subckt onecm 1 2 *x1 1 2 lump1 x1 1 2 onecm4 .ends onecm .subckt r10 1 2 r1 1 2 1.245 .ends r10 * ECL driver and diode receiver models - from Raytheon .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn q10 268 17 0 qmodpdmine *q10 268 17 0 qmodpd q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 4 5 c1 28 0 5pF r503 0 4 5.55 r400 0 28 120k r500 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * End ECL driver and Diode receiver models from Raytheon *10 segments per cm .subckt lump10 1 2 l1 1 3 0.0.8792nH c1 2 0 0.0468pF x1 3 2 r10 .ends lump10 *1 segment per cm .subckt lump1 1 2 l1 1 3 8.792nH c1 2 0 0.468pF x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 8 r10 x6 8 9 r10 x7 9 10 r10 x8 10 11 r10 x9 11 12 r10 x10 12 2 r10 .ends lump1 *2 segments per cm .subckt lump2 1 2 l1 1 3 4.396nH c1 2 0 0.234pF x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 2 r10 .ends lump2 *4 segments per cm .subckt lump4 1 2 l1 1 3 2.198nH c1 2 0 0.117pF x1 3 4 r10 x2 4 5 r10 x3 5 2 r10 x4 5 2 r10 .ends lump4 *8 segments per cm .subckt lump8 1 2 l1 1 3 1.099nH c1 2 0 0.0585pF x1 3 4 r10 x2 4 2 r10 x3 4 2 r10 x4 4 2 r10 x5 4 2 r10 .ends lump8 .subckt onecm10 1 2 x1 1 3 lump10 x2 3 4 lump10 x3 4 5 lump10 x4 5 6 lump10 x5 6 7 lump10 x6 7 8 lump10 x7 8 9 lump10 x8 9 10 lump10 x9 10 11 lump10 x10 11 2 lump10 .ends onecm10 .subckt onecm8 1 2 x1 1 3 lump8 x2 3 4 lump8 x3 4 5 lump8 x4 5 6 lump8 x5 6 7 lump8 x6 7 8 lump8 x7 8 9 lump8 x8 9 2 lump8 .ends onecm8 .subckt onecm4 1 2 x1 1 3 lump4 x2 3 4 lump4 x3 4 5 lump4 x4 5 2 lump4 .ends onecm4 .subckt onecm2 1 2 x1 1 3 lump2 x2 3 2 lump2 .ends onecm2 .subckt twocm 1 2 x1 1 3 onecm x2 3 2 onecm .ends twocm .subckt threecm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 2 onecm .ends threecm .subckt fourcm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 5 onecm x4 5 2 onecm .ends fourcm .subckt fivecm 1 2 x1 1 3 onecm x2 3 4 onecm x3 4 5 onecm x4 5 6 onecm x5 6 2 onecm .ends fivecm .subckt sixcm 1 2 x1 1 3 fivecm x2 3 2 onecm .ends sixcm .subckt sevencm 1 2 x1 1 3 sixcm x2 3 2 onecm .ends sevencm .subckt eightcm 1 2 x1 1 3 sevencm x2 3 2 onecm .ends eightcm .subckt ninecm 1 2 x1 1 3 eightcm x2 3 2 onecm .ends ninecm .subckt tencm 1 2 x1 1 3 fivecm x2 3 2 fivecm .ends tencm .subckt elevencm 1 2 x1 1 3 tencm x2 3 2 onecm .ends elevencm .subckt twelvecm 1 2 x1 1 3 tencm x2 3 4 onecm x3 4 2 onecm .ends twelvecm .subckt sixteencm 1 2 x1 1 3 eightcm x2 3 2 eightcm .ends sixteencm .subckt twentyfourcm 1 2 x1 1 3 twelvecm x2 3 2 twelvecm .ends twentyfourcm *modelling using R and lossless lines * 10 segments per cm .model yless10 txl r=0 g=0 l=8.792e-9 c=0.468e-12 length=0.1 * 8 segments per cm .model yless8 txl r=0 g=0 l=8.792e-9 c=0.468e-12 length=0.125 * 4 segments per cm .model yless4 txl r=0 g=0 l=8.792e-9 c=0.468e-12 length=0.25 * 2 segments per cm .model yless2 txl r=0 g=0 l=8.792e-9 c=0.468e-12 length=0.5 * 1 segment per cm .model yless1 txl r=0 g=0 l=8.792e-9 c=0.468e-12 length=1 *10 segments per cm .subckt xlump10 1 2 y1 1 0 3 0 yless10 x1 3 2 r10 .ends xlump10 *1 segment per cm .subckt xlump1 1 2 y1 1 0 3 0 yless1 x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 8 r10 x6 8 9 r10 x7 9 10 r10 x8 10 11 r10 x9 11 12 r10 x10 12 2 r10 .ends xlump1 *2 segments per cm .subckt xlump2 1 2 y1 1 0 3 0 yless2 x1 3 4 r10 x2 4 5 r10 x3 5 6 r10 x4 6 7 r10 x5 7 2 r10 .ends xlump2 *4 segments per cm .subckt xlump4 1 2 y1 1 0 3 0 yless4 x1 3 4 r10 x2 4 5 r10 x3 5 2 r10 x4 5 2 r10 .ends xlump4 *8 segments per cm .subckt xlump8 1 2 y1 1 0 3 0 yless8 x1 3 4 r10 x2 4 2 r10 x3 4 2 r10 x4 4 2 r10 x5 4 2 r10 .ends xlump8 .subckt xonecm10 1 2 x1 1 3 xlump10 x2 3 4 xlump10 x3 4 5 xlump10 x4 5 6 xlump10 x5 6 7 xlump10 x6 7 8 xlump10 x7 8 9 xlump10 x8 9 10 xlump10 x9 10 11 xlump10 x10 11 2 xlump10 .ends xonecm10 .subckt xonecm8 1 2 x1 1 3 xlump8 x2 3 4 xlump8 x3 4 5 xlump8 x4 5 6 xlump8 x5 6 7 xlump8 x6 7 8 xlump8 x7 8 9 xlump8 x8 9 2 xlump8 .ends xonecm8 .subckt xonecm4 1 2 x1 1 3 xlump4 x2 3 4 xlump4 x3 4 5 xlump4 x4 5 2 xlump4 .ends xonecm4 .subckt xonecm2 1 2 x1 1 3 xlump2 x2 3 2 xlump2 .ends xonecm2 .subckt xtwocm 1 2 x1 1 3 xonecm x2 3 2 xonecm .ends xtwocm .subckt xthreecm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 2 xonecm .ends xthreecm .subckt xfourcm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 5 xonecm x4 5 2 xonecm .ends xfourcm .subckt xfivecm 1 2 x1 1 3 xonecm x2 3 4 xonecm x3 4 5 xonecm x4 5 6 xonecm x5 6 2 xonecm .ends xfivecm .subckt xsixcm 1 2 x1 1 3 xfivecm x2 3 2 xonecm .ends xsixcm .subckt xsevencm 1 2 x1 1 3 xsixcm x2 3 2 xonecm .ends xsevencm .subckt xeightcm 1 2 x1 1 3 xsevencm x2 3 2 xonecm .ends xeightcm .subckt xninecm 1 2 x1 1 3 xeightcm x2 3 2 xonecm .ends xninecm .subckt xtencm 1 2 x1 1 3 xfivecm x2 3 2 xfivecm .ends xtencm .subckt xelevencm 1 2 x1 1 3 xtencm x2 3 2 xonecm .ends xelevencm .subckt xtwelvecm 1 2 x1 1 3 xtencm x2 3 4 xonecm x3 4 2 xonecm .ends xtwelvecm .subckt xsixteencm 1 2 x1 1 3 xeightcm x2 3 2 xeightcm .ends xsixteencm .subckt xtwentyfourcm 1 2 x1 1 3 xtwelvecm x2 3 2 xtwelvecm .ends xtwentyfourcm .end ngspice-26/examples/TransmissionLines/cpl3_4_line.sp0000644000265600020320000000177312264261473022202 0ustar andreasadmin6.3inch 4 lossy lines CPL model -- R load Ra 1 2 1K Rb 0 3 1K Rc 0 4 1K Rd 0 5 1K Re 6 0 1Meg Rf 7 0 1Meg Rg 8 0 1Meg Rh 9 0 1Meg * P1 2 3 4 5 0 6 7 8 9 0 LOSSYMODE * * VS1 1 0 PWL(15.9NS 0.0 16.1Ns 5.0 31.9Ns 5.0 32.1Ns 0.0) * .control TRAN 0.2NS 50NS 0 0.05N PLOT V(1) V(2) V(6) V(7) V(8) V(9) .endc .MODEL LOSSYMODE CPL +R=0.3 0 0 0 + 0.3 0 0 + 0.3 0 + 0.3 +L=9e-9 5.4e-9 0 0 + 9e-9 5.4e-9 0 + 9e-9 5.4e-9 + 9e-9 +G=0 0 0 0 0 0 0 0 0 0 +C=3.5e-13 -3e-14 0 0 + 3.5e-13 -3e-14 0 + 3.5e-13 -3e-14 + 3.5e-13 +length=6.3 .END ngspice-26/examples/TransmissionLines/ltra4_1_line.sp0000644000265600020320000001013312264261473022352 0ustar andreasadmin BJTdriver -- 24inch lossy line LTRA model -- DiodeCircuit * This unclassified circuit is from Raytheon, courtesy Gerry Marino. * It consists of a BJT driver connected by a 24 inch lossy line to a * passive load consisting mostly of diodes. Each inch * of the lossy line is modelled by 10 LRC lumps in the Raytheon * model. * The line parameters (derived from the Raytheon input file) are: * L = 9.13nH per inch * C = 3.65pF per inch * R = 0.2 ohms per inch * the circuit v1 1 0 0v pulse(0 4 1ns 1ns 1ns 20ns 40ns) vcc 10 0 5v *rseries 1 2 5 x1 1 2 10 bjtdrvr *t1 2 0 3 0 z0=50.0136 td=4.38119ns rel=10 o2 2 0 3 0 lline1 *x2 2 3 oneinch *x2 100 101 twentyfourinch *x2 100 101 xtwentyfourinch vtest1 2 100 0 vtest2 101 3 0 x3 3 4 10 dioload *rl 3 0 5 *dl 0 3 diod2 .model lline1 ltra rel=1 r=0.2 g=0 l=9.13e-9 c=3.65e-12 len=24 steplimit .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) .options acct +reltol=1e-3 abstol=1e-14 .control tran 0.1ns 60ns plot v(1) v(2) v(3) .endc * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn q10 268 17 0 qmodpdmine *q10 268 17 0 qmodpd q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 4 5 *comment out everything in dioload except d5 and r503, and watch * the difference in results obtained between a tran 0.1ns 20ns and * a tran 0.01ns 20ns c1 28 0 5pF r503 0 4 5.55 r4 0 28 120k r5 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * subckt lump - one RLC lump of the lossy line *10 segments per inch .subckt lump 1 2 *r1 1 3 0.02 *c1 3 0 0.365pF *l1 3 2 0.913nH l1 1 3 0.913nH c1 2 0 0.365pF r1 3 2 0.02 *r1 1 3 0.01 *c1 3 0 0.1825pF *l1 3 4 0.4565nH *r2 4 5 0.01 *c2 5 0 0.1825pF *l2 5 2 0.4565nH *c1 1 0 0.365pF *l1 1 2 0.913nH .ends lump .subckt oneinch 1 2 x1 1 3 lump x2 3 4 lump x3 4 5 lump x4 5 6 lump x5 6 7 lump x6 7 8 lump x7 8 9 lump x8 9 10 lump x9 10 11 lump x10 11 2 lump .ends oneinch .subckt fourinch 1 2 x1 1 3 oneinch x2 3 4 oneinch x3 4 5 oneinch x4 5 2 oneinch .ends fourinch .subckt fiveinch 1 2 x1 1 3 oneinch x2 3 4 oneinch x3 4 5 oneinch x4 5 6 oneinch x5 6 2 oneinch .ends fiveinch .subckt twentyfourinch 1 2 x1 1 3 fiveinch x2 3 4 fiveinch x3 4 5 fiveinch x4 5 6 fiveinch x5 6 2 fourinch .ends twentyfourinch *modelling using R and lossless lines *5 segments per inch .model llfifth ltra nocontrol noprint rel=10 r=0 g=0 l=9.13e-9 +c=3.65e-12 len=0.2 steplimit quadinterp .subckt xlump 1 2 o1 1 0 3 0 llfifth r1 2 3 0.04 .ends xlump .subckt xoneinch 1 2 x1 1 3 xlump x2 3 4 xlump x3 4 5 xlump x4 5 6 xlump x5 6 2 xlump *x5 6 7 xlump *x6 7 8 xlump *x7 8 9 xlump *x8 9 10 xlump *x9 10 11 xlump *x10 11 2 xlump .ends xoneinch .subckt xfourinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 2 xoneinch .ends xfourinch .subckt xfiveinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 6 xoneinch x5 6 2 xoneinch .ends xfiveinch .subckt xtwentyfourinch 1 2 x1 1 3 xfiveinch x2 3 4 xfiveinch x3 4 5 xfiveinch x4 5 6 xfiveinch x5 6 2 xfourinch .ends xtwentyfourinch .end ngspice-26/examples/TransmissionLines/cpl_ibm1.sp0000644000265600020320000000454212264261473021572 0ustar andreasadmin6-line coupled multiconductor with ECL drivers vemm mm 0 DC -0.4 vepp pp 0 DC 0.4 vein_left lin 0 PULSE (-0.4 0.4 0N 1N 1N 7N 200N) vein_right rin 0 PULSE (-0.4 0.4 2N 1N 1N 7N 200N) * upper 2 lines x1 lin 0 1 1outn ECL x2 mm 0 2 2outn ECL x7 7 0 7r 7routn ECL x8 8 0 8r 8routn ECL c7r 7r 0 0.1P c8r 8r 0 0.1P * lower 2 lines x11 pp 0 11 11outn ECL x12 rin 0 12 12outn ECL x5 5 0 5l 5loutn ECL x6 6 0 6l 6loutn ECL c5l 5l 0 0.1P c6l 6l 0 0.1P p1 1 2 3 4 5 6 0 7 8 9 10 11 12 0 pline .model pline cpl +C = 0.900000P -0.657947P -0.0767356P -0.0536544P -0.0386514P -0.0523990P + 1.388730P -0.607034P -0.0597635P -0.0258851P -0.0273442P + 1.39328P -0.625675P -0.0425551P -0.0319791P + 1.07821P -0.255048P -0.0715824P + 1.06882P -0.692091P + 0.900000P +L = 0.868493E-7 0.781712E-7 0.748428E-7 0.728358E-7 0.700915E-7 0.692178E-7 + 0.866074E-7 0.780613E-7 0.748122E-7 0.711591E-7 0.701023E-7 + 0.865789E-7 0.781095E-7 0.725431E-7 0.711986E-7 + 0.867480E-7 0.744242E-7 0.725826E-7 + 0.868022E-7 0.782377E-7 + 0.868437E-7 +R = 0.2 0 0 0 0 0 + 0.2 0 0 0 0 + 0.2 0 0 0 + 0.2 0 0 + 0.2 0 + 0.2 +G = 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 + +length = 2 *XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX .SUBCKT ECL EIN GND 9 8 * Input-GND-OUTP-OUTN RIN 1 2 0.077K REF 5 6 0.077K R1 7 N 1.0K R2 P 3 0.4555K R3 P 4 0.4555K R4 8 N 0.615K R5 9 N 0.615K RL1 8 GND 0.093K RL2 9 GND 0.093K LIN EIN 1 0.01U LREF 5 GND 0.01U CIN 1 GND 0.68P CL1 8 GND 1P CL2 9 GND 1P Q1 3 2 7 JCTRAN Q2 4 6 7 JCTRAN Q3 P 3 8 JCTRAN Q4 P 4 9 JCTRAN VEP P GND DC 1.25 VEN N GND DC -3 .ENDS ECL .control TRAN 0.1N 20N plot V(3) V(5) V(8) V(11) V(12) .endc .MODEL JCTRAN NPN BF=150 VAF=20 IS=4E-17 RB=300 RC=100 CJE=30F CJC=30F + CJS=40F VJE=0.6 VJC=0.6 VJS=0.6 MJE=0.5 MJC=0.5 + MJS=0.5 TF=16P TR=1N .END ngspice-26/examples/TransmissionLines/ltra6_2_line.sp0000644000265600020320000002023512264261473022361 0ustar andreasadminBJTdriver -- 2in st. lin -- 20in coupled line LTRA -- 2in st line -- DiodeCircuit * This unclassified circuit is from Raytheon, courtesy Gerry Marino. * * _______ * -------- 2in _________________ 2in | | * | BJT |______| |______|Diode| * | |------| |------| | * | Drvr | line | 2-wire | line |rcvr.| * -------- | coupled | |_____| * | transmission | * |-/\/\/\/\----| line |-------\/\/\/\/\----| * | 50ohms | | 50ohms | * | | | | * Ground ----------------- Ground * * * Each inch of the lossy line is modelled by 10 LRC lumps in the * Raytheon model. * The line parameters (derived from the Raytheon input file) are: * L = 9.13nH per inch * C = 3.65pF per inch * R = 0.2 ohms per inch * K = 0.482 [coupling coefficient; K = M/sqrt(L1*L2)] * Cc = 1.8pF per inch * * coupled ltra model generated using the standalone program * multi_decomp * the circuit v1 1 0 0v pulse(0 4 1ns 1ns 1ns 20ns 40ns) vcc 10 0 5v * series termination *x1 1 oof 10 bjtdrvr *rseries oof 2 50 x1 1 2 10 bjtdrvr rt1 3 0 50 * convolution model x2 2 3 4 5 conv2wetcmodel * rlc segments model *x2 2 3 4 5 rlc2wetcmodel x3 4 dioload rt2 5 0 50 .model qmodn npn(bf=100 rb=100 cje=0.09375pF cjc=0.28125pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpd npn(bf=100 rb=100 cje=0.08187pF cjc=0.2525pF is=1e-12 +pe=0.5 pc=0.5) .model qmodpdmine npn(bf=100 rb=100 cje=0.08187pF cjc=0.05pF is=1e-12 +pe=0.5 pc=0.5) .model dmod1 d(n=2.25 is=1.6399e-4 bv=10) .model dmod2 d .model dmod d(vj=0.3v) .model diod1 d(tt=0.75ns vj=0.6 rs=909 bv=10) .model diod2 d(tt=0.5ns vj=0.3 rs=100 bv=10) .options acct reltol=1e-3 abstol=1e-12 .control tran 0.1ns 60ns plot v(2) v(4) v(5) .endc * bjt driver - 19=input, 268=output, 20=vcc; wierd node numbers from * the Raytheon file .subckt bjtdrvr 19 268 20 q1 22 18 13 qmodn q2 18 16 13 qmodn qd2 21 9 0 qmodn q4 14 14 0 qmodn q3 16 15 14 qmodpd q5 8 13 17 qmodn q6 25 12 0 qmodn q7 6 17 0 qmodpd qd1 26 10 0 qmodn q8 7 11 10 qmodn *q10 268 17 0 qmodpd q10 268 17 0 qmodpdmine q9 7 10 268 qmodn d1 0 19 dmod1 d2 18 19 dmod2 d3 13 19 dmod dq1 18 22 dmod dq2 16 18 dmod d502 9 21 dmod dq3 15 16 dmod d10 24 8 dmod d4 15 6 dmod dq6 12 25 dmod dq7 17 6 dmod dd1 17 10 dmod d7 11 6 dmod dd2 17 26 dmod d9 23 6 dmod dq8 11 7 dmod d501 17 268 dmod dq9 10 7 dmod d14 20 27 dmod d8 0 268 dmod r1 18 20 6k r2 22 20 2.2k r4 0 13 7k rd1 9 13 2k rd2 21 13 3k r3 16 20 10k r5 15 20 15k r9 0 17 4k r6 24 20 750 r10 12 17 2k r12 24 11 1.5k r11 25 17 3k r15 23 20 10k r13 0 10 15k r14 7 27 12 .ends bjtdrvr * subckt dioload - diode load: input=28, output=4, vcc=5 .subckt dioload 28 *comment out everything in dioload except d5 and r503, and watch * the difference in results obtained between a tran 0.1ns 20ns and * a tran 0.01ns 20ns vccint 5 0 5v c1 28 0 5pF r503 0 4 5.55 r4 0 28 120k r5 1 5 7.5k d5 4 28 diod2 d1 1 28 diod1 d4 2 0 diod1 d3 3 2 diod1 d2 1 3 diod1 .ends dioload * subckt rlclump - one RLC lump of the lossy line .subckt rlclump 1 2 *r1 1 3 0.02 *c1 3 0 0.365pF *l1 3 2 0.913nH l1 1 3 0.913nH c1 2 0 0.365pF r1 3 2 0.02 *r1 1 3 0.01 *c1 3 0 0.1825pF *l1 3 4 0.4565nH *r2 4 5 0.01 *c2 5 0 0.1825pF *l2 5 2 0.4565nH *c1 1 0 0.365pF *l1 1 2 0.913nH .ends lump .subckt rlconeinch 1 2 x1 1 3 rlclump x2 3 4 rlclump x3 4 5 rlclump x4 5 6 rlclump x5 6 7 rlclump x6 7 8 rlclump x7 8 9 rlclump x8 9 10 rlclump x9 10 11 rlclump x10 11 2 rlclump .ends rlconeinch .subckt rlctwoinch 1 2 x1 1 3 rlconeinch x2 3 2 rlconeinch .ends rlctwoinch .subckt rlcfourinch 1 2 x1 1 3 rlconeinch x2 3 4 rlconeinch x3 4 5 rlconeinch x4 5 2 rlconeinch .ends rlcfourinch .subckt rlcfiveinch 1 2 x1 1 3 rlconeinch x2 3 4 rlconeinch x3 4 5 rlconeinch x4 5 6 rlconeinch x5 6 2 rlconeinch .ends rlcfiveinch .subckt rlctwentyrlcfourinch 1 2 x1 1 3 rlcfiveinch x2 3 4 rlcfiveinch x3 4 5 rlcfiveinch x4 5 6 rlcfiveinch x5 6 2 rlcfourinch .ends rlctwentyrlcfourinch .subckt rlclumpstub A B C D x1 A int1 rlcfiveinch x2 int1 int2 rlcfiveinch x3 int2 1 rlcfiveinch x4 1 2 rlcfourinch x5 1 int3 rlcfiveinch x6 int3 B rlconeinch x7 2 C rlcfiveinch x8 2 D rlcfourinch .ends rlclumpstub .subckt ltrastub A B C D o1 A 0 1 0 lline15in o2 1 0 B 0 lline6in o3 1 0 2 0 lline4in o4 2 0 C 0 lline5in o5 2 0 D 0 lline4in .ends ltrastub *modelling using R and lossless lines *5 segments per inch .model llfifth ltra nocontrol rel=10 r=0 g=0 l=9.13e-9 +c=3.65e-12 len=0.2 steplimit quadinterp .subckt xlump 1 2 o1 1 0 3 0 llfifth r1 2 3 0.04 .ends xlump .subckt xoneinch 1 2 x1 1 3 xlump x2 3 4 xlump x3 4 5 xlump x4 5 6 xlump x5 6 2 xlump *x5 6 7 xlump *x6 7 8 xlump *x7 8 9 xlump *x8 9 10 xlump *x9 10 11 xlump *x10 11 2 xlump .ends xoneinch .subckt xFourinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 2 xoneinch .ends xfourinch .subckt xfiveinch 1 2 x1 1 3 xoneinch x2 3 4 xoneinch x3 4 5 xoneinch x4 5 6 xoneinch x5 6 2 xoneinch .ends xfiveinch .subckt xlumpstub A B C D x1 A int1 xfiveinch x2 int1 int2 xfiveinch x3 int2 1 xfiveinch x4 1 2 xfourinch x5 1 int3 xfiveinch x6 int3 B xoneinch x7 2 C xfiveinch x8 2 D xfourinch .ends xlumpstub * modelling a 2 wire coupled system using RLC lumps * 10 segments per inch * * 1---xxxxx----2 * 3---xxxxx----4 .subckt rlc2wlump 1 3 2 4 l1 1 5 0.913nH c1 2 0 0.365pF r1 5 2 0.02 l2 3 6 0.913nH c2 4 0 0.365pF r2 6 4 0.02 cmut 2 4 0.18pF k12 l1 l2 0.482 .ends rlc2wlump .subckt rlc2woneinch 1 2 3 4 x1 1 2 5 6 rlc2wlump x2 5 6 7 8 rlc2wlump x3 7 8 9 10 rlc2wlump x4 9 10 11 12 rlc2wlump x5 11 12 13 14 rlc2wlump x6 13 14 15 16 rlc2wlump x7 15 16 17 18 rlc2wlump x8 17 18 19 20 rlc2wlump x9 19 20 21 22 rlc2wlump x10 21 22 3 4 rlc2wlump .ends rlc2woneinch .subckt rlc2wfiveinch 1 2 3 4 x1 1 2 5 6 rlc2woneinch x2 5 6 7 8 rlc2woneinch x3 7 8 9 10 rlc2woneinch x4 9 10 11 12 rlc2woneinch x5 11 12 3 4 rlc2woneinch .ends rlc2wfiveinch .subckt rlc2wtwentyinch 1 2 3 4 x1 1 2 5 6 rlc2wfiveinch x2 5 6 7 8 rlc2wfiveinch x3 7 8 9 10 rlc2wfiveinch x4 9 10 3 4 rlc2wfiveinch .ends rlc2wtwentyinch .subckt rlc2wetcmodel 1 2 3 4 x1 1 5 rlctwoinch x2 5 2 6 4 rlc2wtwentyinch x3 6 3 rlctwoinch .ends rlc2wetcmodel * Subcircuit conv2wtwentyinch * conv2wtwentyinch is a subcircuit that models a 2-conductor transmission line with * the following parameters: l=9.13e-09, c=3.65e-12, r=0.2, g=0, * inductive_coeff_of_coupling k=0.482, inter-line capacitance cm=1.8e-12, * length=20. Derived parameters are: lm=4.40066e-09, ctot=5.45e-12. * * It is important to note that the model is a simplified one - the * following assumptions are made: 1. The self-inductance l, the * self-capacitance ctot (note: not c), the series resistance r and the * parallel capacitance g are the same for all lines, and 2. Each line * is coupled only to the two lines adjacent to it, with the same * coupling parameters cm and lm. The first assumption imply that edge * effects have to be neglected. The utility of these assumptions is * that they make the sL+R and sC+G matrices symmetric, tridiagonal and * Toeplitz, with useful consequences. * * It may be noted that a symmetric two-conductor line will be * accurately represented by this model. * Lossy line models .model mod1_conv2wtwentyinch ltra rel=1.2 nocontrol r=0.2 l=4.72933999088e-09 g=0 c=7.25000000373e-12 len=20 .model mod2_conv2wtwentyinch ltra rel=1.2 nocontrol r=0.2 l=1.35306599818e-08 g=0 c=3.65000000746e-12 len=20 * subcircuit m_conv2wtwentyinch - modal transformation network for conv2wtwentyinch .subckt m_conv2wtwentyinch 1 2 3 4 v1 5 0 0v v2 6 0 0v f1 0 3 v1 0.707106779721 f2 0 3 v2 -0.707106782652 f3 0 4 v1 0.707106781919 f4 0 4 v2 0.707106780454 e1 7 5 3 0 0.707106780454 e2 1 7 4 0 0.707106782652 e3 8 6 3 0 -0.707106781919 e4 2 8 4 0 0.707106779721 .ends m_conv2wtwentyinch * Subckt conv2wtwentyinch .subckt conv2wtwentyinch 1 2 3 4 x1 1 2 5 6 m_conv2wtwentyinch o1 5 0 7 0 mod1_conv2wtwentyinch o2 6 0 8 0 mod2_conv2wtwentyinch x2 3 4 7 8 m_conv2wtwentyinch .ends conv2wtwentyinch .model convtwoinch ltra r=0.2 l=9.13e-9 c=3.65e-12 len=2.0 rel=1.2 nocontrol .subckt conv2wetcmodel 1 2 3 4 o1 1 0 5 0 convtwoinch x1 5 2 6 4 conv2wtwentyinch o2 6 0 3 0 convtwoinch .ends conv2wetcmodel .end ngspice-26/examples/TransmissionLines/cpl1_4_line.sp0000644000265600020320000000362712264261473022200 0ustar andreasadminMOSdriver -- 6.3inch 4 lossy line CPL model -- C load m1 1 2 6 1 mp1p0 w = 36.0u l=1.0u m2 1 3 7 1 mp1p0 w = 36.0u l=1.0u m3 1 4 8 1 mp1p0 w = 36.0u l=1.0u m4 1 10 5 1 mp1p0 w = 36.0u l=1.0u m5 1 11 13 1 mp1p0 w = 36.0u l=1.0u m6 1 12 13 1 mp1p0 w = 36.0u l=1.0u m7 0 2 6 0 mn0p9 w = 18.0u l=0.9u m8 0 3 7 0 mn0p9 w = 18.0u l=0.9u m9 0 4 8 0 mn0p9 w = 18.0u l=0.9u m10 0 10 5 0 mn0p9 w = 18.0u l=0.9u m11 14 11 13 0 mn0p9 w = 18.0u l=0.9u m12 0 12 14 0 mn0p9 w = 18.0u l=0.9u * CN5 5 0 0.025398e-12 CN6 6 0 0.007398e-12 CN7 7 0 0.007398e-12 CN8 8 0 0.007398e-12 CN9 9 0 0.097398e-12 CN10 10 0 0.007398e-12 CN11 11 0 0.003398e-12 CN12 12 0 0.004398e-12 CN13 13 0 0.008398e-12 CN14 14 0 0.005398e-12 * P1 5 6 7 8 0 9 10 11 12 0 pline * * vdd 1 0 DC 5.0 v3 3 0 DC 5.0 * VS1 2 0 PULSE ( 0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS) VS2 4 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) * .control TRAN 0.2N 47.9N 0 0.05N plot V(5) V(6) V(7) V(8) V(9) V(10) V(11) V(12) .endc .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 LAMBDA=0.00 CGSO=0 CGDO=0 +CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 LAMBDA=0.00 CGSO=0 CGDO=0 +CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL PLINE cpl +R=0.03 0 0 0 + 0.03 0 0 + 0.03 0 + 0.03 +L=9e-9 5.4e-9 0 0 + 9e-9 5.4e-9 0 + 9e-9 5.4e-9 + 9e-9 +G=0 0 0 0 0 0 0 0 0 0 +C=3.5e-13 -3e-14 0 0 + 3.5e-13 -3e-14 0 + 3.5e-13 -3e-14 + 3.5e-13 +length=6.3 .END ngspice-26/examples/TransmissionLines/ltra2_2_line.sp0000644000265600020320000000155612264261473022362 0ustar andreasadminMOSdriver -- 2 lossy lines LTRA model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u m1 0 3 4 0 mn0p9 w = 18.0u l=0.9u m2 1 3 4 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 CN4 4 0 0.025398e-12 CN5 5 0 0.007398e-12 o1 2 0 3 0 lline o2 4 0 5 0 lline vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .control TRAN 0.2N 47N 0 0.1N plot v(2) v(3) v(4) v(5) .endc .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .model lline ltra rel=1 r=12.45 g=0 l=8.972e-9 c=0.468e-12 +len=16 steplimit compactrel=1.0e-3 compactabs=1.0e-14 .end ngspice-26/examples/TransmissionLines/cpl_ibm3.sp0000644000265600020320000000243712264261473021575 0ustar andreasadminMixed single and coupled transmission lines c1g 1 0 1P l11a 1 1a 6e-9 r1a7 1a 7 0.025K rin6 in 6 0.075K l67 6 7 10e-9 c7g 7 0 1P P2 1 7 0 2 8 0 PLINE .MODEL PLINE CPL +R = 2.25 0 + 2.25 +L = 0.6e-6 0.05e-6 + 0.6e-6 +G = 0 0 0 +C = 1.2e-9 -0.11e-9 + 1.2e-9 +length = 0.03 c2g 2 0 0.5P r2g 2 0 0.05K r23 2 3 0.025K l34 3 4 5e-9 c4g 4 0 2P l89 8 9 10e-9 c9g 9 0 1P Y1 9 0 10 0 txline .model txline txl R = 1 L =0.6e-6 G = 0 C= 1.0e-9 length=0.04 l1011 10 11 10e-9 c11g 11 0 0.5P r11g 11 0 0.05K r1112 11 12 0.025K l1213 12 13 5e-9 c13g 13 0 2P r1116 11 16 0.025K l1617 16 17 5e-9 c17g 17 0 2P P1 4 2 13 17 0 5 14 15 18 0 PLINE1 .MODEL PLINE1 CPL +R = 3.5 0 0 0 + 3.5 0 0 + 3.5 0 + 3.5 +L = +1e-6 0.11e-6 0.03e-6 0 + 1e-6 0.11e-6 0.03e-6 + 1e-6 0.11e-6 + 1e-6 +G = 0 0 0 0 0 0 0 0 0 0 +C = +1.5e-9 -0.17e-9 -0.03e-9 0 + 1.5e-9 -0.17e-9 -0.03e-9 + 1.5e-9 -0.17e-9 + 1.5e-9 +length = 0.02 D1 5 0 dmod D2 14 0 dmod D3 15 0 dmod D4 18 0 dmod .model dmod d VES in 0 PULSE (0 5 0 1.1ns 0.1ns 0.9ns 200ns) .control TRAN 0.2N 10.0N plot v(3) v(6) v(7) v(8) v(11) v(15) .endc .END ngspice-26/examples/TransmissionLines/cpl2_2_line.sp0000644000265600020320000000254412264261473022174 0ustar andreasadminMOSdriver -- 24inch 2 lossy lines CPL model -- C load m1 0 268 299 0 mn0p9 w = 18.0u l=1.0u m2 299 267 748 0 mn0p9 w = 18.0u l=1.0u m3 0 168 648 0 mn0p9 w = 18.0u l=0.9u m4 1 268 748 1 mp1p0 w = 36.0u l=1.0u m5 1 267 748 1 mp1p0 w = 36.0u l=1.0u m6 1 168 648 1 mp1p0 w = 36.0u l=1.0u * CN648 648 0 0.025398e-12 CN651 651 0 0.007398e-12 CN748 748 0 0.025398e-12 CN751 751 0 0.009398e-12 CN299 299 0 0.005398e-12 * P1 648 748 0 651 751 0 PLINE * vdd 1 0 DC 5.0 VK 267 0 DC 5.0 * *VS 168 0 PWL 4 15.9N 0.0 16.1n 5.0 31.9n 5.0 32.1n 0.0 *VS 268 0 PWL 4 15.9N 0.0 16.1n 5.0 31.9n 5.0 32.1n 0.0 * VS1 168 0 PULSE (0 5 15.9N 0.2N 0.2N 15.8N 60N) VS2 268 0 PULSE (0 5 15.9N 0.2N 0.2N 15.8N 60N) * .control TRAN 0.2N 47.9NS 0 1N plot v(648) v(651) v(751) .endc * .MODEL PLINE CPL +R=0.2 0 + 0.2 +L=9.13e-9 3.3e-9 + 9.13e-9 +G=0 0 0 +C=3.65e-13 -9e-14 + 3.65e-13 +length=24 ******************* MODEL SPECIFICATION ********************** .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 LAMBDA=0.00 CGSO=0 CGDO=0 + CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 LAMBDA=0.00 CGSO=0 CGDO=0 + CJ=0 CJSW=0 TOX=18000N LD=0.0U .END ngspice-26/examples/TransmissionLines/cpl_ibm2.sp0000644000265600020320000000062412264261473021570 0ustar andreasadminSimple coupled transmissionlines VES IN 0 PULSE (0 1 0N 1.5N 1.5N 4.5N 200N) R1 IN V1 50 R2 V2 0 10 p1 V1 V2 0 V3 V4 0 cpl1 .model cpl1 cpl +R = 0.5 0 + 0.5 +L = 247.3e-9 31.65e-9 + 247.3e-9 +C = 31.4e-12 -2.45e-12 + 31.4e-12 +G = 0 0 0 +length = 0.3048 *length = 0.6096 R3 V3 0 100 R4 V4 0 100 .control TRAN 0.1N 20N plot v(in) v(v1) v(v3) .endc .END ngspice-26/examples/TransmissionLines/ltra1_1_line.sp0000644000265600020320000000130312264261473022346 0ustar andreasadminMOSdriver -- lossy line LTRA model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 o1 2 0 3 0 lline vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .control TRAN 0.2N 47N 0 0.1N plot v(2) v(3) ylimit -0.5 5 .endc .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .model lline ltra rel=1 r=12.45 g=0 l=8.972e-9 c=0.468e-12 +len=16 steplimit compactrel=1.0e-3 compactabs=1.0e-14 .end ngspice-26/examples/TransmissionLines/ltra1_4_line.sp0000644000265600020320000001135612264261473022362 0ustar andreasadminMOSdriver -- 6.3inch 4 lossy line LTRA model -- C load m1 1 2 6 1 mp1p0 w = 36.0u l=1.0u m2 1 3 7 1 mp1p0 w = 36.0u l=1.0u m3 1 4 8 1 mp1p0 w = 36.0u l=1.0u m4 1 10 5 1 mp1p0 w = 36.0u l=1.0u m5 1 11 13 1 mp1p0 w = 36.0u l=1.0u m6 1 12 13 1 mp1p0 w = 36.0u l=1.0u m7 0 2 6 0 mn0p9 w = 18.0u l=0.9u m8 0 3 7 0 mn0p9 w = 18.0u l=0.9u m9 0 4 8 0 mn0p9 w = 18.0u l=0.9u m10 0 10 5 0 mn0p9 w = 18.0u l=0.9u m11 14 11 13 0 mn0p9 w = 18.0u l=0.9u m12 0 12 14 0 mn0p9 w = 18.0u l=0.9u * CN5 5 0 0.025398e-12 CN6 6 0 0.007398e-12 CN7 7 0 0.007398e-12 CN8 8 0 0.007398e-12 CN9 9 0 0.097398e-12 CN10 10 0 0.007398e-12 CN11 11 0 0.003398e-12 CN12 12 0 0.004398e-12 CN13 13 0 0.008398e-12 CN14 14 0 0.005398e-12 * * Subcircuit test * test is a subcircuit that models a 4-conductor transmission line with * the following parameters: l=9e-09, c=2.9e-13, r=0.3, g=0, * inductive_coeff_of_coupling k=0.6, inter-line capacitance cm=3e-14, * length=6.3. Derived parameters are: lm=5.4e-09, ctot=3.5e-13. * * It is important to note that the model is a simplified one - the * following assumptions are made: 1. The self-inductance l, the * self-capacitance ctot (note: not c), the series resistance r and the * parallel capacitance g are the same for all lines, and 2. Each line * is coupled only to the two lines adjacent to it, with the same * coupling parameters cm and lm. The first assumption implies that edge * effects have to be neglected. The utility of these assumptions is * that they make the sL+R and sC+G matrices symmetric, tridiagonal and * Toeplitz, with useful consequences (see "Efficient Transient * Simulation of Lossy Interconnect", by J.S. Roychowdhury and * D.O Pederson, Proc. DAC 91). * It may be noted that a symmetric two-conductor line is * represented accurately by this model. * Subckt node convention: * * |--------------------------| * 1-----| |-----n+1 * 2-----| |-----n+2 * : | n-wire multiconductor | : * : | line | : * n-1-----|(node 0=common gnd plane) |-----2n-1 * n-----| |-----2n * |--------------------------| * Lossy line models .model mod1_test ltra rel=1.2 nocontrol r=0.3 l=2.62616456193e-10 g=0 c=3.98541019688e-13 len=6.3 .model mod2_test ltra rel=1.2 nocontrol r=0.3 l=5.662616446e-09 g=0 c=3.68541019744e-13 len=6.3 .model mod3_test ltra rel=1.2 nocontrol r=0.3 l=1.23373835171e-08 g=0 c=3.3145898046e-13 len=6.3 .model mod4_test ltra rel=1.2 nocontrol r=0.3 l=1.7737383521e-08 g=0 c=3.01458980439e-13 len=6.3 * subcircuit m_test - modal transformation network for test .subckt m_test 1 2 3 4 5 6 7 8 v1 9 0 0v v2 10 0 0v v3 11 0 0v v4 12 0 0v f1 0 5 v1 0.371748033738 f2 0 5 v2 -0.601500954587 f3 0 5 v3 0.601500954587 f4 0 5 v4 -0.371748036544 f5 0 6 v1 0.60150095443 f6 0 6 v2 -0.371748035044 f7 0 6 v3 -0.371748030937 f8 0 6 v4 0.601500957402 f9 0 7 v1 0.601500954079 f10 0 7 v2 0.37174803072 f11 0 7 v3 -0.371748038935 f12 0 7 v4 -0.601500955482 f13 0 8 v1 0.371748035626 f14 0 8 v2 0.601500956073 f15 0 8 v3 0.601500954504 f16 0 8 v4 0.371748032386 e1 13 9 5 0 0.371748033909 e2 14 13 6 0 0.601500954587 e3 15 14 7 0 0.601500955639 e4 1 15 8 0 0.371748036664 e5 16 10 5 0 -0.60150095443 e6 17 16 6 0 -0.371748035843 e7 18 17 7 0 0.371748032386 e8 2 18 8 0 0.601500957319 e9 19 11 5 0 0.601500955131 e10 20 19 6 0 -0.371748032169 e11 21 20 7 0 -0.371748037896 e12 3 21 8 0 0.601500954513 e13 22 12 5 0 -0.371748035746 e14 23 22 6 0 0.60150095599 e15 24 23 7 0 -0.601500953534 e16 4 24 8 0 0.371748029317 .ends m_test * Subckt test .subckt test 1 2 3 4 5 6 7 8 x1 1 2 3 4 9 10 11 12 m_test o1 9 0 13 0 mod1_test o2 10 0 14 0 mod2_test o3 11 0 15 0 mod3_test o4 12 0 16 0 mod4_test x2 5 6 7 8 13 14 15 16 m_test .ends test * x1 5 6 7 8 9 10 11 12 test * * vdd 1 0 PULSE (0 5 0Ns 0.1Ns 0.1Ns 600Ns 800Ns) v3 3 0 PULSE (0 5 0Ns 0.1Ns 0.1Ns 600Ns 800Ns) .model mn0p9 nmos LEVEL=1 vto=0.8V kp=48u gamma=0.3 phi=0.55 lambda=0.00 + PHI=0.55 LAMBDA=0.00 CGSO=0 CGDO=0 CGBO=0 + CJ=0 CJSW=0 TOX=18000N NSUB=1E16 LD=0.0U .model mp1p0 pmos vto=-0.8V kp=21u gamma=0.45 phi=0.61 lambda=0.00 + PHI=0.61 LAMBDA=0.00 CGSO=0 CGDO=0 CGBO=0 + CJ=0 CJSW=0 TOX=18000N NSUB=3E16 LD=0.0U VS1 2 0 PULSE (0 5 15.9Ns 0.2Ns 0.2Ns 15.8Ns 32Ns) VS2 4 0 PULSE (0 5 15.9Ns 0.2Ns 0.2Ns 15.8Ns 32Ns) .control TRAN 0.1N 47.9N plot v(5) v(6) v(7) v(8) v(9) v(10) v(11) v(12) .endc * .END ngspice-26/examples/TransmissionLines/txl2_3_line.sp0000644000265600020320000000160212264261473022220 0ustar andreasadminMOSdriver -- 3 lossy lines TXL model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u m1 0 3 4 0 mn0p9 w = 18.0u l=0.9u m2 1 3 4 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 CN4 4 0 0.025398e-12 CN5 5 0 0.007398e-12 CN6 6 0 0.007398e-12 CN7 168 0 0.007398e-12 y1 2 0 3 0 ymod y2 4 0 5 0 ymod y3 6 0 168 0 ymod vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .control TRAN 0.2N 47N 0 0.1N plot v(2) v(3) v(4) v(5) v(6) .endc .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL ymod txl R=12.45 L=8.972e-9 G=0 C=0.468e-12 length=16 .end ngspice-26/examples/TransmissionLines/txl1_1_line.sp0000644000265600020320000000121312264261473022213 0ustar andreasadminMOSdriver -- lossy line TXL model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 y1 2 0 3 0 ymod vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .control TRAN 0.2N 47N 0 0.1N plot v(2) v(3) ylimit -0.5 5 .endc .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL ymod txl R=12.45 L=8.972e-9 G=0 C=0.468e-12 length=16 .end ngspice-26/examples/TransmissionLines/ltra3_2_line.sp0000644000265600020320000000642612264261473022364 0ustar andreasadminMOSdriver -- 24inch 2 lossy lines LTRA model -- C load m1 0 268 299 0 mn0p9 w = 18.0u l=1.0u m2 299 267 748 0 mn0p9 w = 18.0u l=1.0u m3 0 168 648 0 mn0p9 w = 18.0u l=0.9u m4 1 268 748 1 mp1p0 w = 36.0u l=1.0u m5 1 267 748 1 mp1p0 w = 36.0u l=1.0u m6 1 168 648 1 mp1p0 w = 36.0u l=1.0u * CN648 648 0 0.025398e-12 CN651 651 0 0.007398e-12 CN748 748 0 0.025398e-12 CN751 751 0 0.009398e-12 CN299 299 0 0.005398e-12 * * Subcircuit test * test is a subcircuit that models a 2-conductor transmission line with * the following parameters: l=9.13e-09, c=2.75e-13, r=0.2, g=0, * inductive_coeff_of_coupling k=0.36144, inter-line capacitance cm=9e-14, * length=24. Derived parameters are: lm=3.29995e-09, ctot=3.65e-13. * * It is important to note that the model is a simplified one - the * following assumptions are made: 1. The self-inductance l, the * self-capacitance ctot (note: not c), the series resistance r and the * parallel capacitance g are the same for all lines, and 2. Each line * is coupled only to the two lines adjacent to it, with the same * coupling parameters cm and lm. The first assumption implies that edge * effects have to be neglected. The utility of these assumptions is * that they make the sL+R and sC+G matrices symmetric, tridiagonal and * Toeplitz, with useful consequences (see "Efficient Transient * Simulation of Lossy Interconnect", by J.S. Roychowdhury and * D.O Pederson, Proc. DAC 91). * It may be noted that a symmetric two-conductor line is * represented accurately by this model. * Subckt node convention: * * |--------------------------| * 1-----| |-----n+1 * 2-----| |-----n+2 * : | n-wire multiconductor | : * : | line | : * n-1-----|(node 0=common gnd plane) |-----2n-1 * n-----| |-----2n * |--------------------------| * Lossy line models .model mod1_test ltra rel=1.2 nocontrol r=0.2 l=5.83005279316e-09 g=0 c=4.55000000187e-13 len=24 .model mod2_test ltra rel=1.2 nocontrol r=0.2 l=1.24299471863e-08 g=0 c=2.75000000373e-13 len=24 * subcircuit m_test - modal transformation network for test .subckt m_test 1 2 3 4 v1 5 0 0v v2 6 0 0v f1 0 3 v1 0.707106779721 f2 0 3 v2 -0.707106782652 f3 0 4 v1 0.707106781919 f4 0 4 v2 0.707106780454 e1 7 5 3 0 0.707106780454 e2 1 7 4 0 0.707106782652 e3 8 6 3 0 -0.707106781919 e4 2 8 4 0 0.707106779721 .ends m_test * Subckt test .subckt test 1 2 3 4 x1 1 2 5 6 m_test o1 5 0 7 0 mod1_test o2 6 0 8 0 mod2_test x2 3 4 7 8 m_test .ends test * x1 648 748 651 751 test * * vdd 1 0 DC 5.0 VK 267 0 DC 5.0 * VS1 168 0 PULSE (0 5 15.9N 0.2N 0.2N 15.8N 60N) VS2 268 0 PULSE (0 5 15.9N 0.2N 0.2N 15.8N 60N) * .control TRAN 0.2N 47.9NS PLOT v(648) v(651) v(751) .endc * .model mn0p9 nmos LEVEL=1 vto=0.8V kp=48u gamma=0.3 phi=0.55 lambda=0.0 + PHI=0.55 LAMBDA=0.00 CGSO=0 CGDO=0 CGBO=0 + CJ=0 CJSW=0 TOX=18000N NSUB=1E16 LD=0.0U .model mp1p0 pmos LEVEL=1 vto=-0.8V kp=21u gamma=0.45 phi=0.61 lambda=0.0 + PHI=0.61 LAMBDA=0.00 CGSO=0 CGDO=0 CGBO=0 + CJ=0 CJSW=0 TOX=18000N NSUB=3E16 LD=0.0U .END ngspice-26/examples/xspice/0000755000265600020320000000000012264261473015342 5ustar andreasadminngspice-26/examples/xspice/fstest.sp0000644000265600020320000000107712264261473017223 0ustar andreasadmin* filesource Test * two differential ports 1 0 and 3 0 are used, so your input file * has to have three columns (time, port_value 1, portvalue 2) AFILESRC %vd([1 0 3 0]) filesrc .model filesrc filesource (file="sine.m" amploffset=[0 0] amplscale=[1 1] timerelative=false amplstep=false) V2 2 0 0.0 SIN(0 1 1MEG 0 0 0.0) V4 4 0 0.0 SIN(0 1 1MEG 0 0 90.0) .tran 1n 1.0u .control run *listing param wrdata vspice V(1) V(2) V(3) V(4) plot V(1) V(2) V(3) V(4) * error between interpolation and sine source * should be less than 1mV up to 1us plot V(1,2) V(3,4) .endc .end ngspice-26/examples/xspice/pll/0000755000265600020320000000000012264261473016131 5ustar andreasadminngspice-26/examples/xspice/pll/test_vco.cir0000644000265600020320000001023412264261473020456 0ustar andreasadmin* Test of VCO: frequency versus control voltage * 7 stage Ring-Osc. made of gain cells BSIM3 * P.-H. Hsieh, J. Maxey, C.-K. K. Yang, IEEE JSSC, Sept. 2009, pp. 2488 - 2495 * alternatively use d_osc code model * measure frequency of R.O. by fft .param vcc=3.3 .csparam simtime=500n vdd dd 0 dc 'vcc' vco cont 0 dc 2.5 * vco * buf: analog out * d_digout: digital out * cont: analog control voltage * dd: analog supply voltage *.include vco_sub.cir *xvco buf d_digout cont dd ro_vco .include vco_sub_new.cir xvco buf d_digout cont dd d_osc_vco .option noacct .control set xtrtol=2 set dt = $curplot set curplot = new set curplottitle = "Frequency versus voltage" set freq_volt = $curplot $ store its name to 'freq_volt' setplot $freq_volt let vcovec=vector(5) let foscvec=vector(5) setplot $dt alter vco 0.5 tran 0.1n $&simtime 0 let {$freq_volt}.vcovec[0]=v(cont) linearize buf fft buf * start meas at freq > 0 to skip large dc part meas sp fosc MAX_AT buf from=1e3 to=1e9 let {$freq_volt}.foscvec[0]=fosc plot d_digout xlimit 140n 160n reset alter vco 1 tran 0.1n $&simtime 0 let {$freq_volt}.vcovec[1]=v(cont) linearize buf fft buf meas sp fosc MAX_AT buf from=1e3 to=1e9 let {$freq_volt}.foscvec[1]=fosc plot d_digout xlimit 140n 160n reset alter vco 1.5 tran 0.1n $&simtime 0 let {$freq_volt}.vcovec[2]=v(cont) linearize buf fft buf meas sp fosc MAX_AT buf from=1e3 to=1e9 let {$freq_volt}.foscvec[2]=fosc plot d_digout xlimit 140n 160n reset alter vco 2 tran 0.1n $&simtime 0 let {$freq_volt}.vcovec[3]=v(cont) linearize buf fft buf meas sp fosc MAX_AT buf from=1e3 to=1e9 let {$freq_volt}.foscvec[3]=fosc plot d_digout xlimit 140n 160n reset alter vco 2.5 tran 0.1n $&simtime 0 let {$freq_volt}.vcovec[4]=v(cont) linearize buf fft buf meas sp fosc MAX_AT buf from=1e3 to=1e9 let {$freq_volt}.foscvec[4]=fosc plot d_digout xlimit 140n 160n plot tran1.buf tran3.buf tran5.buf tran7.buf tran9.buf xlimit 140n 160n plot mag(sp2.buf) mag(sp4.buf) mag(sp6.buf) mag(sp8.buf) mag(sp10.buf) xlimit 100e6 1100e6 setplot $freq_volt settype frequency foscvec settype voltage vcovec plot foscvec vs vcovec print vcovec foscvec rusage .endc *model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 .model P1 PMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 .end ngspice-26/examples/xspice/pll/f-p-det-d-sub.cir0000644000265600020320000000073412264261473021100 0ustar andreasadmin* frequency-phase detector according to * http://www.uwe-kerwien.de/pll/pll-phasenvergleich.htm .subckt f-p-det d_R d_V d_U d_U_ d_D d_D_ aa1 [d_U d_D] d_rset and1 .model and1 d_and(rise_delay = 1e-10 fall_delay = 0.1e-9 + input_load = 0.5e-12) ad1 d_d1 d_R d_d0 d_rset d_U d_U_ flop1 ad2 d_d1 d_V d_d0 d_rset d_D d_D_ flop1 .model flop1 d_dff(clk_delay = 1.0e-10 set_delay = 1.0e-10 + reset_delay = 1.0e-10 ic = 2 rise_delay = 1.0e-10 + fall_delay = 1e-10) .ends f-p-det ngspice-26/examples/xspice/pll/pll-xspice-fstep.cir0000644000265600020320000001066412264261473022036 0ustar andreasadmin* pll circuit using xspice code models * three frequencies generate steps in control voltage v(cont) .param vcc=3.3 .param divisor=40 .param fref=10e6 .param fref2=9e6 .param fref3=11e6 .csparam simtime=45u .csparam f2='fref2' .csparam f3='fref3' * digital zero and one .global d_d0 d_d1 vdd dd 0 dc 'vcc' * 10 MHz reference frequency * PULSE(V1 V2 TD TR TF PW PER) vref ref 0 dc 0 pulse(0 'vcc' 10n 1n 1n '1/fref/2' '1/fref') abridgeref [ref] [d_ref] adc_vbuf .model adc_vbuf adc_bridge(in_low = 0.5 in_high = 0.5) *digital zero vzero z 0 dc 0 abridgev3 [z] [d_d0] adc_vbuf .model adc_vbuf adc_bridge(in_low = 'vcc*0.5' in_high = 'vcc*0.5') *digital one ainv1 d_d0 d_d1 invd1 .model invd1 d_inverter(rise_delay = 1e-10 fall_delay = 1e-10) * vco * buf: analog out * d_digout: digital out * cont: analog control voltage * dd: analog supply voltage *.include vco_sub.cir *xvco buf d_digout cont dd ro_vco .include vco_sub_new.cir xvco buf d_digout cont dd d_osc_vco * digital divider adiv1 d_digout d_divout divider .model divider d_fdiv(div_factor = 'divisor' high_cycles = 'divisor/2' + i_count = 4 rise_delay = 1e-10 + fall_delay = 1e-10) * frequency phase detector .include f-p-det-d-sub.cir Xfpdet d_divout d_ref d_U d_Un d_D d_Dn f-p-det * loop filter *2nd or 3rd order, transistors as switches .include loop-filter-2.cir Xlf d_Un d_D cont loopf * 2nd order, Exxxx voltage controlled current sources as 'switches' * loop filter current sources as charge pump *.include loop-filter.cir *Xlf d_U d_D cont loopfe * d to a for plotting abridge-w1 [d_divout d_ref d_Un d_D] [s1 s2 u1 d1] dac1 ; change to d_u or d_Un .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) .control save cont s1 s2 u1 d1 iplot cont * calculate breakpoint for switching frequency let t1_3 = simtime/3 set ti1_3 ="$&t1_3" let t2_3 = simtime/3*2 set ti2_3 ="$&t2_3" stop when time=$ti1_3 stop when time=$ti2_3 * calculate new periods for f2 let per2=1/f2 let pw2 = per2/2 let per3=1/f3 let pw3 = per3/2 *simulate tran 0.1n $&simtime uic *change frequency after stopping * first pair of [] without spaces, second pair with spaces alter @vref[pulse] = [ 0 3.3 10n 1n 1n $&pw2 $&per2 ] resume *another change after second stop alter @vref[pulse] = [ 0 3.3 10n 1n 1n $&pw3 $&per3 ] resume rusage plot cont s1 s2+1.2 u1+2.4 d1+3.6 xlimit 15u 16u *plot cont .endc *model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 .model P1 PMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 .end ngspice-26/examples/xspice/pll/vco_sub.cir0000644000265600020320000000454512264261473020300 0ustar andreasadmin* VCO: 7 stage Ring-Osc. made of gain cells BSIM3 * P.-H. Hsieh, J. Maxey, C.-K. K. Yang, IEEE JSSC, Sept. 2009, pp. 2488 - 2495 * 150 MHz to 900 MHz with control voltage 2.5 to 0.5 V at 3.3 V supply * BSIM 3 model data for transistors in main file pll-xspice.cir ***** ring oscillator as voltage controlled oscillator *************** * name: ro_vco * aout analog out * dout digital out * cont control voltage * dd supply voltage .subckt ro_vco aout dout cont dd * ignition circuit (not needed) * feedback between in and out, pulse to help start oscillation vin inm1 outp7 dc 0 *vin inm1 outp7 dc 2.5 pulse 2.5 0 0.1n 5n 1 1 1 *vin2 inp1 outp7 dc -0.5 pulse -0.5 0 0.1n 5n 1 1 1 vin2 inp1 outm7 dc 0 vss ss 0 dc 0 ve sub 0 dc 0 vpe well 0 dc 3.3 * gain cell .subckt gaincell dd ss sub well co in- in+ out- out+ mn1 out- in+ ss sub n1 w=2u l=0.35u AS=3p AD=3p PS=4u PD=4u mn2 out- out+ ss sub n1 w=2u l=0.35u AS=3p AD=3p PS=4u PD=4u mn3 out+ out- ss sub n1 w=2u l=0.35u AS=3p AD=3p PS=4u PD=4u mn4 out+ in- ss sub n1 w=2u l=0.35u AS=3p AD=3p PS=4u PD=4u mp1 out- co dd well p1 w=4u l=0.35u AS=7p AD=7p PS=6u PD=6u mp2 out+ co dd well p1 w=4u l=0.35u AS=7p AD=7p PS=6u PD=6u .ends gaincell * inverter .subckt inv2 dd ss sub well in out mn1 out in ss sub n1 w=6u l=0.35u AS=12p AD=12p PS=16u PD=16u mp1 out in dd well p1 w=12u l=0.35u AS=24p AD=24p PS=28u PD=28u .ends inv2 * inverter .subckt inv1 dd ss sub well in out mn1 out in ss sub n1 w=2u l=0.35u AS=3p AD=3p PS=4u PD=4u mp1 out in dd well p1 w=4u l=0.35u AS=7p AD=7p PS=6u PD=6u .ends inv1 * chain of 25 inverters + output buffer xinv1 dd ss sub well cont inm1 inp1 outm1 outp1 gaincell xinv2 dd ss sub well cont outp1 outm1 outm2 outp2 gaincell xinv3 dd ss sub well cont outp2 outm2 outm3 outp3 gaincell xinv4 dd ss sub well cont outp3 outm3 outm4 outp4 gaincell xinv5 dd ss sub well cont outp4 outm4 outm5 outp5 gaincell xinv6 dd ss sub well cont outp5 outm5 outm6 outp6 gaincell xinv7 dd ss sub well cont outp6 outm6 outm7 outp7 gaincell * analog out (two stage buffer) xinv11 dd 0 sub well outm1 outm2 inv1 xinv12 dd 0 sub well outm2 aout inv2 cout aout 0 0.2pF *digital out abridge1 [aout] [dout] adc_buff .model adc_buff adc_bridge(in_low = 'vcc*0.5' in_high = 'vcc*0.5') .ends ro_vco ****************************************************************** ngspice-26/examples/xspice/pll/README0000644000265600020320000000211212264261473017005 0ustar andreasadminThis directory contains a mixed mode pll, combining ngspice and XSPICE circuit blocks. The pll consists of the following blocks: ** voltage controlled oscillator: vco_sub.cir 7 stage ring oscillator with gain cells, CMOS devices or vco_sub_new.cir vco made from code model d_osc, cntl_array/freq_array data are gained by running test-vco.cir with vco_sub.cir ** digital divider and frequency reference: pll-xspice.cir ** phase frequency detector: f-p-det-d-sub.cir ** loop filter: loop-filter.cir switched current sources as charge pump, 2nd order passive RC filter or loop-filter-2.cir transistors as switches for charge pump, 2nd or 3rd order passive RC filters ** main simulation control: pll-xspice.cir Two test files are included: test-vco.cir simulates vco frequency versus control voltage test-f-p-det.cir simulates the phase frequency detector and the loop filter. The main building blocks are organised as subcircuits. main simulation control with three reference frequencies: pll-xspice-fstep.cir simulates two steps of the reference in one simulation run ngspice-26/examples/xspice/pll/loop-filter-2.cir0000644000265600020320000000243312264261473021225 0ustar andreasadmin* loop filter for pll * in: d_up d_down digital data * out: vout, vco control voltage * using transistors to switch current * according to http://www.uwe-kerwien.de/pll/pll-schleifenfilter.htm * digital input d_Un d_D * anlog output vout .subckt loopf d_Un d_D vout .param initcond=2.5 vdd dd 0 dc 'vcc' vss ss 0 dc 0 * "driver" circuit, digital in, analog out abridge-f1 [d_Un d_D] [u1n d1] dac1 .model dac1 dac_bridge(out_low = 0 out_high = 'vcc' out_undef = 'vcc/2' + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) * uses BSIM3 model parameters from pll-xspice_2.cir * transistors as switches mnd dra d1 ss ss n1 w=12u l=0.35u AS=24p AD=24p PS=28u PD=28u mpd dra u1n dd dd p1 w=24u l=0.35u AS=48p AD=48p PS=52u PD=52u *** passive filter elements *** *third order filter *parameters absolutely _not_ optimised *better check * http://www.national.com/assets/en/boards/deansbook4.pdf *to do so .ic v(vout)='initcond' v(c1)='initcond' v(dra)='initcond' v(int1)='initcond' v(u1n)='vcc' v(d1)=0 R1 dra int1 300 R2 int1 c1 200 C1 c1 0 10n C2 int1 0 5n R3 int1 vout 50 C3 vout 0 0.5n *second order filter *parameters not optimized *.ic v(vout)='initcond' v(c1)='initcond' v(dra)='initcond' v(u1n)='vcc' v(d1)=0 *R1 dra vout 300 *R2 vout c1 200 *C1 c1 0 10n *C2 vout 0 5n .ends loopf ngspice-26/examples/xspice/pll/vco_sub_new.cir0000644000265600020320000000173212264261473021144 0ustar andreasadmin***** XSPICE digital controlled oscillator d_osc as vco *************** * 150 MHz to 900 MHz * name: d_osc_vco * aout analog out * dout digital out * cont control voltage * dd supply voltage .subckt d_osc_vco aout dout cont dd * curve fitting to ro_vco 'measured' data Bfit fitted 0 v = (-58256685.71*v(cont)*v(cont) - 186386142.9*v(cont) + 988722980)/10. *a5 fitted dout var_clock *.model var_clock d_osc(cntl_array = [1.0e7 5.0e7 9.0e7] *+ freq_array = [1.0e8 5.0e8 9.0e8] * linear interpolation, input data from measured ro vco a5 cont dout var_clock .model var_clock d_osc(cntl_array = [0.5 1 1.5 2 2.5] + freq_array = [8.790820e+008 7.472197e+008 5.799500e+008 3.772727e+008 1.611650e+008] + duty_cycle = 0.5 init_phase = 180.0 + rise_delay = 1e-10 fall_delay=1e-10) *generate an analog output for plotting abridge-fit [dout] [aout] dac1 .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) .ends d_osc_vco ngspice-26/examples/xspice/pll/loop-filter.cir0000644000265600020320000000123512264261473021065 0ustar andreasadmin* loop filter for pll * in: d_up d_down digital data * out: vout, vco control voltage * according to http://www.uwe-kerwien.de/pll/pll-schleifenfilter.htm .subckt loopfe d_U d_D vout .param loadcur=5m .param initcond=2.5 v1 vtop 0 1 v2 vbot 0 -1 abridge-f1 [d_U d_D] [u1 d1] dac1 .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) *top switched current source Gtop vtop vout cur='loadcur*v(u1)' *bottom switched current source Gbot vout vbot cur='loadcur*v(d1)' *passive filter elements .ic v(vout)='initcond' v(c1)='initcond' R2 vout c1 200 C1 c1 0 5n C2 vout 0 5n Rshunt vout 0 10000k .ends ngspice-26/examples/xspice/pll/test-f-p-det.cir0000644000265600020320000000615112264261473021044 0ustar andreasadmin* test frequency-phase detector similar to 12040 .param vcc=3.3 .global d_d0 d_d1 *PULSE(V1 V2 TD TR TF PW PER) v1 1 0 dc 0 pulse(0 'vcc' 10n 1n 1n 10n 20n) v2 2 0 dc 0 pulse(0 'vcc' 8n 1n 1n 10n 20n) *digital zero v3 3 0 dc 0 abridgev1 [1 2 3] [d_sig1 d_sig2 d_d0] adc_vbuf .model adc_vbuf adc_bridge(in_low = 'vcc*0.5' in_high = 'vcc*0.5') *digital one ainv1 d_d0 d_d1 invd1 .model invd1 d_inverter(rise_delay = 1e-10 fall_delay = 1e-10) Xfpdet d_sig1 d_sig2 d_U d_Un d_D d_Dn f-p-det *.include f-p-det-sub.cir .include f-p-det-d-sub.cir * d to a for plotting abridge-w1 [d_sig1 d_sig2 d_U d_D] [s1 s2 u1 d1] dac1 .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) * loop filters *2nd or 3rd order, transistors as switches .include loop-filter-2.cir Xlf d_Un d_D cont loopf * 2nd order, Exxxx voltage controlled current sources as 'switches' * loop filter current sources as charge pump *.include loop-filter.cir *Xlf d_U d_D cont loopfe .control set xtrtol=2 tran 0.1n 1000n plot s1 s2+1.2 u1+2.4 d1+3.6 xlimit 140n 200n .endc *model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 .model P1 PMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 .end ngspice-26/examples/xspice/pll/pll-xspice.cir0000644000265600020320000000773012264261473020717 0ustar andreasadmin* pll circuit using xspice code models * output frequency 400 MHz * locked to a 1 or 10 MHz reference .param vcc=3.3 .param divisor=40 .param fref=10e6 .csparam simtime=25u .global d_d0 d_d1 vdd dd 0 dc 'vcc' *vco cont 0 dc 1.9 *PULSE(V1 V2 TD TR TF PW PER) * reference frequency selected by param fref * PULSE(V1 V2 TD TR TF PW PER) vref ref 0 dc 0 pulse(0 'vcc' 10n 1n 1n '1/fref/2' '1/fref') abridgeref [ref] [d_ref] adc_vbuf .model adc_vbuf adc_bridge(in_low = 0.5 in_high = 0.5) *digital zero vzero z 0 dc 0 abridgev3 [z] [d_d0] adc_vbuf .model adc_vbuf adc_bridge(in_low = 'vcc*0.5' in_high = 'vcc*0.5') *digital one ainv1 d_d0 d_d1 invd1 .model invd1 d_inverter(rise_delay = 1e-10 fall_delay = 1e-10) * vco * buf: analog out * d_digout: digital out * cont: analog control voltage * dd: analog supply voltage *.include vco_sub.cir *xvco buf d_digout cont dd ro_vco .include vco_sub_new.cir xvco buf d_digout cont dd d_osc_vco * digital divider adiv1 d_digout d_divout divider .model divider d_fdiv(div_factor = 'divisor' high_cycles = 'divisor/2' + i_count = 4 rise_delay = 1e-10 + fall_delay = 1e-10) * frequency phase detector .include f-p-det-d-sub.cir Xfpdet d_divout d_ref d_U d_Un d_D d_Dn f-p-det * loop filters *2nd or 3rd order, transistors as switches .include loop-filter-2.cir Xlf d_Un d_D cont loopf * 2nd order, Exxxx voltage controlled current sources as 'switches' * loop filter current sources as charge pump *.include loop-filter.cir *Xlf d_U d_D cont loopfe * d to a for plotting abridge-w1 [d_divout d_ref d_Un d_D] [s1 s2 u1n d1] dac1 ; change to d_u or d_Un .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-10 + t_fall = 1e-10) .control save cont s1 s2 u1n d1 v.xlf.vdd#branch; to save memory iplot cont tran 0.1n $&simtime uic rusage plot cont s1 s2+1.2 u1n+2.4 d1+3.6 xlimit 4u 5u plot v.xlf.vdd#branch xlimit 4u 5u ylimit -8m 2m *plot cont .endc *model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 .model P1 PMOS *+version = 3.2.4 +version = 3.3.0 +Level= 8 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 .end ngspice-26/examples/xspice/xspice_c1.cir0000644000265600020320000000072512264261473017723 0ustar andreasadminA Berkeley SPICE3 compatible circuit * * This circuit contains only Berkeley SPICE3 components. * * The circuit is an AC coupled transistor amplifier with * a sinewave input at node "1", a gain of approximately -3.9, * and output on node "coll". * .tran 1e-5 2e-3 * vcc vcc 0 12.0 vin 1 0 0.0 ac 1.0 sin(0 1 1k) ccouple 1 base 10uF rbias1 vcc base 100k rbias2 base 0 24k q1 coll base emit generic rcollector vcc coll 3.9k remitter emit 0 1k * .model generic npn * .end ngspice-26/examples/xspice/analog_models1_transient.sp0000644000265600020320000000230112264261473022656 0ustar andreasadminCode Model Test - Transient: gain, summer, mult, divide, pwl * * *** analysis type *** .control tran .1s 10s plot v(1) v(10) v(20) v(30) v(40) v(50) .endc * *** input sources *** * v1 1 0 DC PWL(0 0 10 10) * v2 2 0 DC 2 * *** gain block *** a1 1 10 gain1 .model gain1 gain (in_offset=0.0 gain=2.0 out_offset=0.0) * * *** summer block *** a2 [1 2] 20 summer1 .model summer1 summer (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** mult block *** a3 [1 1] 30 mult1 .model mult1 mult (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=0.1 out_offset=0.0) * * *** divider block *** a4 2 1 40 divide1 .model divide1 divide (num_offset=0.0 num_gain=1.0 den_offset=0.0 den_gain=1.0 + den_lower_limit=0.1 den_domain=1.0e-16 + fraction=false out_gain=1.0 out_offset=0.0) * * *** pwl block *** a5 1 50 pwl1 .model pwl1 pwl (x_array=[-1.0 0.0 1.0 2.0 3.0 4.0 5.0] + y_array=[ 0.0 0.0 1.0 4.0 4.5 5.0 5.0] + input_domain=0.01 fraction=TRUE) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k r3 3 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/examples/xspice/xspice_c2.cir0000644000265600020320000000042212264261473017716 0ustar andreasadminA transistor amplifier circuit * .tran 1e-5 2e-3 * vin 1 0 0.0 ac 1.0 sin(0 1 1k) * ccouple 1 in 10uF rzin in 0 19.35k * aamp in aout gain_block .model gain_block gain (gain = -3.9 out_offset = 7.003) * rzout aout coll 3.9k rbig coll 0 1e12 * .end ngspice-26/examples/xspice/xspice_c3.cir0000644000265600020320000000433012264261473017721 0ustar andreasadminMixed IO types * This circuit contains a mixture of IO types, including * analog, digital, user-defined (real), and 'null'. * * The circuit demonstrates the use of the digital and * user-defined node capability to model system-level designs * such as sampled-data filters. The simulated circuit * contains a digital oscillator enabled after 100us. The * square wave oscillator output is divided by 8 with a * ripple counter. The result is passed through a digital * filter to convert it to a sine wave. * .tran 1e-5 1e-3 .save all * v1 1 0 0.0 pulse(0 1 1e-4 1e-6) r1 1 0 1k * abridge1 [1] [enable] atod .model atod adc_bridge * aclk [enable clk] clk nand .model nand d_nand (rise_delay=1e-5 fall_delay=1e-5) * adiv2 div2_out clk NULL NULL NULL div2_out dff adiv4 div4_out div2_out NULL NULL NULL div4_out dff adiv8 div8_out div4_out NULL NULL NULL div8_out dff .model dff d_dff * abridge2 div8_out enable filt_in node_bridge2 .model node_bridge2 d_to_real (zero=-1 one=1) * xfilter filt_in clk filt_out dig_filter * abridge3 filt_out a_out node_bridge3 .model node_bridge3 real_to_v * rlpf1 a_out oa_minus 10k * xlpf 0 oa_minus lpf_out opamp * rlpf2 oa_minus lpf_out 10k clpf lpf_out oa_minus 0.01uF * * .subckt dig_filter filt_in clk filt_out * .model n0 real_gain (gain=1.0) .model n1 real_gain (gain=2.0) .model n2 real_gain (gain=1.0) .model g1 real_gain (gain=0.125) .model zm1 real_delay .model d0a real_gain (gain=-0.75) .model d1a real_gain (gain=0.5625) .model d0b real_gain (gain=-0.3438) .model d1b real_gain (gain=1.0) * an0a filt_in x0a n0 an1a filt_in x1a n1 an2a filt_in x2a n2 * az0a x0a clk x1a zm1 az1a x1a clk x2a zm1 * ad0a x2a x0a d0a ad1a x2a x1a d1a * az2a x2a filt1_out g1 az3a filt1_out clk filt2_in zm1 * an0b filt2_in x0b n0 an1b filt2_in x1b n1 an2b filt2_in x2b n2 * az0b x0b clk x1b zm1 az1b x1b clk x2b zm1 * ad0 x2b x0b d0b ad1 x2b x1b d1b * az2b x2b clk filt_out zm1 * .ends dig_filter * * .subckt opamp plus minus out * r1 plus minus 300k a1 %vd (plus minus) outint lim .model lim limit (out_lower_limit = -12 out_upper_limit = 12 + fraction = true limit_range = 0.2 gain=300e3) r3 outint out 50.0 r2 out 0 1e12 * .ends opamp * .end ngspice-26/examples/xspice/delta-sigma/0000755000265600020320000000000012264261473017531 5ustar andreasadminngspice-26/examples/xspice/delta-sigma/mod1-ct-test.cir0000644000265600020320000000235512264261473022456 0ustar andreasadmin* first-order delta sigma modulator * continuous time * according to Schreier, Temes: Understanding Delta-Sigma Data Converters, 2005 * Fig. 2.13, p. 31 ** signal .param infreq=13k inampl=0.3 ** clock .param clkfreq=5Meg ** simulation time .param simtime = 5m .csparam simtime = 'simtime' ** input signal *SIN(VO VA FREQ TD THETA) vin in+ in- dc 0 sin(0 'inampl' 'infreq' 0 0) * clock generation * PULSE(V1 V2 TD TR TF PW PER) vclk aclk 0 dc 0 pulse(0 1 0.1u 2n 2n '1/clkfreq/2' '1/clkfreq') * digital one * digital zero vone aone 0 dc 1 vzero azero 0 dc 0 abridge1 [aone azero] [done dzero] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) * digital clock abridge2 [aclk] [dclk] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) Xmod in+ in- dclk dv dvb mod1 * load mod1 subcircuit .include mod1-ct.cir .control save xmod.adffq in+ in- xmod.outintp xmod.outintn tran 0.01u $&simtime * digit density vs input plot xmod.adffq "v(in+) - v(in-)" xlimit 0.1m 0.2m * modulator integrator out, digital out plot xmod.outintp-xmod.outintn xmod.adffq xlimit 0.140m 0.148m *eprint dv dclk > digi1.txt linearize xmod.adffq fft xmod.adffq * noise shaping 20dB/decade plot db(xmod.adffq) xlimit 10k 1Meg xlog ylimit -20 -120 .endc .end ngspice-26/examples/xspice/delta-sigma/delta-sigma-1.cir0000644000265600020320000000712512264261473022562 0ustar andreasadmin* delta sigma A/D converter 9 bit * first-order continuous time delta sigma modulator * sinc filter with counter * according to Schreier, Temes: Understanding Delta-Sigma Data Converters, 2005 * Fig. 2.13, p. 31; Fig. 2.27, p.58 ** sine input signal parameters .param infreq=500 inampl=0.5 ** clock .param clkfreq=5Meg ** simulation time .param simtime = 2m .csparam simtime = 'simtime' ** sample clock cycles .param samples=500 .global dzero done ** input signal * SIN(VO VA FREQ TD THETA) vin inp inm dc 0 sin(0 'inampl' 'infreq' 0 0) * steps from -0.5 to 0.4 *vin inp inm dc 0 pwl(0 -0.5 0.2m -0.5 0.201m -0.4 0.4m -0.4 0.401m -0.3 0.6m -0.3 *+ 0.601m -0.2 0.8m -0.2 0.801m -0.1 1.0m -0.1 1.001m 0.0 1.2m 0.0 1.201m 0.1 1.4m 0.1 *+ 1.401m 0.2 1.6m 0.2 1.601m 0.3 1.8m 0.3 1.801m 0.4 2m 0.4) ** clock and constant logic levels * PULSE(V1 V2 TD TR TF PW PER) vclk aclk 0 dc 0 pulse(0 1 0.1u 2n 2n '1/clkfreq/2' '1/clkfreq') * digital one * digital zero vone aone 0 dc 1 vzero azero 0 dc 0 abridge1 [aone azero] [done dzero] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) * digital clock abridge2 [aclk] [dclk] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) ****** delta-sigma converter**************************************************************** * modulator * inp inm: analog in + - * dclk digital clock in * dv, dvb: modulator non-inverting/inverting out Xmod inp inm dclk dv dvb mod1 * sinc filter, decimator * dlout1 ..dlout10: converter 10 bit digital out xsinc dv dvb dclk dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 sinc1 ******************************************************************************************** ** DACs for measuring and plotting * converter output Xdac_latch dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 adaclout dac10 * counter inside of sinc filter Xdac_counter xsinc.dout1 xsinc.dout2 xsinc.dout3 xsinc.dout4 xsinc.dout5 + xsinc.dout6 xsinc.dout7 xsinc.dout8 xsinc.dout9 xsinc.dout10 adaccout dac10 * load modulator mod1 subcircuit .include mod1-ct.cir * load counter, d-latch and 10 bit DAC .include count-latch-dac.cir ** sinc filter 1st order subcircuit .subckt sinc1 din dinb dclk dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 XCounter din dinb dclk ddivndel2 dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 count10 Xlatch dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 + dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 ddivndel1 + latch10 * digital divider dclk/samples adivn dclk ddivn divider .model divider d_fdiv(div_factor = 'samples' high_cycles = 1 + i_count = 0 rise_delay = 1e-9 fall_delay = 1e-9) * clock delays adelay ddivn ddivndel1 buff1 ; set latch adelay2 ddivndel1 ddivndel2 buff1 ; reset counter .model buff1 d_buffer(rise_delay = '1/clkfreq/8' fall_delay = '1/clkfreq/8' + input_load = 0.5e-12) .ends sinc1 ** for plotting abridge22 [dclk xsinc.ddivndel1 xsinc.ddivndel2 dv] [acclk acset acres acin] dac1 .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-9 + t_fall = 1e-9) .control save inp inm adaclout adaccout ; save memory space tran 0.1u $&simtime * analog out, scaled 'manually'; sinc filter counter; analog differential in plot 4.1*(adaclout-0.486) adaccout v(inp)-v(inm) ylimit -0.6 0.6 * modulator dig out * eprint dv > digi1.txt * *eprint dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 *+ xsinc.dout1 xsinc.dout2 xsinc.dout3 xsinc.dout4 xsinc.dout5 *+ xsinc.dout6 xsinc.dout7 xsinc.dout8 xsinc.dout9 xsinc.dout10 > digi4b.txt .endc .end ngspice-26/examples/xspice/delta-sigma/mod1-ct.cir0000644000265600020320000000242412264261473021476 0ustar andreasadmin* delta sigma modulator * first order, continuous time .subckt mod1 ainp ainn dclk ddffq ddffqb * integrator and summer Ri1 ainn inintn 500 Rf1 adffq inintn 500 Cint1 outintp inintn 1n .IC v(outintp) = 0 v(inintp) = 0 * Rshunt1 outintp 0 100Meg Rshunt2 initn 0 100Meg * Ri2 ainp inintp 500 Rf2 adffqb inintp 500 Cint2 outintn inintp 1n .IC v(outintn) = 0 v(inintn) = 0 * Rshunt3 outintn 0 100Meg Rshunt4 inintp 0 100Meg * aint %vd(inintp inintn) %vd(outintp outintn) amp .model amp gain ( in_offset =0.0 gain =100000 + out_offset = 0) * latched comparator (code model or B source, analog in, digital out) *acomp %vd(outintp outintn) acompout limit5 *.model limit5 limit(in_offset=0 gain=100000 out_lower_limit=-1.0 *+ out_upper_limit=1.0 limit_range=0.10 fraction=FALSE) * BComp acompout 0 V = (V(outintp) - V(outintn)) >= 0 ? 1 : -1 * abridge2 [acompout] [dcompout] adc_buff .model adc_buff adc_bridge(in_low = 0 in_high = 0) * * D flip flop: data clk set reset out nout adff1 dcompout dclk ds drs ddffq ddffqb flop2 .model flop2 d_dff(clk_delay = 1e-9 set_delay = 1.0e-9 + reset_delay = 1.0e-9 ic = 0 rise_delay = 1.0e-9 + fall_delay = 1e-9) abridge1 [ddffq ddffqb dclk] [adffq adffqb aclk] dac1 .model dac1 dac_bridge(out_low = -1 out_high = 1 out_undef = 0 + input_load = 5.0e-12 .ends mod1 ngspice-26/examples/xspice/delta-sigma/count-latch-dac.cir0000644000265600020320000000560112264261473023200 0ustar andreasadmin* counter, latch DAC * 10 bit synchronous digital counter * inhibit at overflow, no revolving .subckt count10 din dinb dclk drs dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 * j k clk set reset out nout ajk1 din dinb diclk ds1 drs dout1 dnout1 jkflop ajk2 dout1 dout1 diclk ds2 drs dout2 dnout2 jkflop ajk3 djk3 djk3 diclk ds3 drs dout3 dnout3 jkflop ajk4 djk4 djk4 diclk ds4 drs dout4 dnout4 jkflop ajk5 djk5 djk5 diclk ds1 drs dout5 dnout5 jkflop ajk6 djk6 djk6 diclk ds2 drs dout6 dnout6 jkflop ajk7 djk7 djk7 diclk ds3 drs dout7 dnout8 jkflop ajk8 djk8 djk8 diclk ds4 drs dout8 dnout8 jkflop ajk9 djk9 djk9 diclk ds3 drs dout9 dnout9 jkflop ajk10 djk10 djk10 diclk ds4 drs dout10 dnout10 jkflop aand1 [dout1 dout2] djk3 and1 aand2 [dout1 dout2 dout3] djk4 and1 aand3 [dout1 dout2 dout3 dout4] djk5 and1 aand4 [dout1 dout2 dout3 dout4 dout5] djk6 and1 aand5 [dout1 dout2 dout3 dout4 dout5 dout6] djk7 and1 aand6 [dout1 dout2 dout3 dout4 dout5 dout6 dout7] djk8 and1 aand7 [dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8] djk9 and1 aand8 [dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9] djk10 and1 * inhibit revolving of counter, just let it saturate * (footnote p. 57) aand_all [dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10] dinhibit nand1 aandclk [dclk dinhibit] diclk and1 .model nand1 d_nand(rise_delay = 1e-9 fall_delay = 1e-9 + input_load = 0.5e-12) .model and1 d_and(rise_delay = 1e-9 fall_delay = 1e-9 + input_load = 0.5e-12) .model jkflop d_jkff(clk_delay = 1.0e-9 set_delay = 1e-9 + reset_delay = 1e-9 ic = 0 rise_delay = 1.0e-9 + fall_delay = 1e-9) .ends count 10 ** 10 bit edge triggered latch .subckt latch10 din1 din2 din3 din4 din5 din6 din7 din8 din9 din10 + dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 dclk *data clk set reset out nout aff1 din1 dclk dzero dzero dout1 dnout1 flop1 aff2 din2 dclk dzero dzero dout2 dnout2 flop1 aff3 din3 dclk dzero dzero dout3 dnout3 flop1 aff4 din4 dclk dzero dzero dout4 dnout4 flop1 aff5 din5 dclk dzero dzero dout5 dnout5 flop1 aff6 din6 dclk dzero dzero dout6 dnout6 flop1 aff7 din7 dclk dzero dzero dout7 dnout7 flop1 aff8 din8 dclk dzero dzero dout8 dnout8 flop1 aff9 din9 dclk dzero dzero dout9 dnout9 flop1 aff10 din10 dclk dzero dzero dout10 dnout10 flop1 .model flop1 d_dff(clk_delay = 1e-9 set_delay = 0 + reset_delay = 0 ic = 0 rise_delay = 1e-9 + fall_delay = 1e-9) .ends latch10 ** emulation of 10 bit DAC .subckt dac10 din1 din2 din3 din4 din5 din6 din7 din8 din9 din10 aout .param vref=1 abridge1 [din1 din2 din3 din4 din5 din6 din7 din8 din9 din10] + [ain1 ain2 ain3 ain4 ain5 ain6 ain7 ain8 ain9 ain10] dac1 BVout aout 0 V = 'vref'*(v(ain10)/2 + v(ain9)/4 + v(ain8)/8 + v(ain7)/16 + v(ain6)/32 + + v(ain5)/64 + v(ain4)/128 + v(ain3)/256 + v(ain2)/512 + v(ain1)/1024) .model dac1 dac_bridge(out_low = 0 out_high = 1 out_undef = 0.5 + input_load = 5.0e-12 t_rise = 1e-9 + t_fall = 1e-9) .ends dac10 ngspice-26/examples/xspice/delta-sigma/README0000644000265600020320000000114312264261473020410 0ustar andreasadminA simple delta sigma converter using XSPICE according to Schreier, Temes: Understanding Delta-Sigma Data Converters, 2005 Fig. 2.13, p. 31; Fig. 2.27, p.58 delta-sigma-1.cir converter complete, tested against sine input mod1-ct.cir first order modulator consists of analog continuous time integrator and digitally latched comparator count-latch-dac.cir contains subcircuits of 10 bit digital latch 10 bit counter, non-revolving, saturating simple 10 bit DAC with analog B source mod1-ct-test.cir test of modulator with sine input, shows noise shaping 20dB/decade counter-test.cir simple test with reset ngspice-26/examples/xspice/delta-sigma/counter-test.cir0000644000265600020320000000241412264261473022665 0ustar andreasadmin* 10 bit synchronous digital counter * inhibit at overflow, no revolving * according to Schreier, Temes: Understanding Delta-Sigma Data Converters, 2005 * Fig. 2.27, p. 58 * clock generation * PULSE(V1 V2 TD TR TF PW PER) vclk aclk 0 dc 0 pulse(0 1 1u 2n 2n 1u 2u) * reset generation * single pulse, actual value stored in latch and read by DAC vres ars 0 dc 0 pulse(0 1 1.1m 2n 2n 1u 2.2m) vone aone 0 dc 1 vzero azero 0 dc 0 * digital one * digital zero abridge1 [aone azero] [done dzero] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) * digital clock * digital reset abridge2 [aclk ars] [dclk dreset] adc_buff .model adc_buff adc_bridge(in_low = 0.5 in_high = 0.5) XCounter done done dclk dreset dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 count10 Xlatch dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 + dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 dreset + latch10 Xdac dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 adacout dac10 .include count-latch-dac.cir .control tran 1u 2.5m eprint dout1 dout2 dout3 dout4 dout5 dout6 dout7 dout8 dout9 dout10 > digi4b.txt eprint dlout1 dlout2 dlout3 dlout4 dlout5 dlout6 dlout7 dlout8 dlout9 dlout10 >> digi4b.txt plot adacout .endc .end ngspice-26/examples/xspice/sine.m0000644000265600020320000003332212264261473016461 0ustar andreasadmin# Created by Octave 3.4.0, Mon Jun 06 10:16:19 2011 CEST # name: x # type: matrix # rows: 257 # columns: 3 0 0 1 3.90625e-09 0.02454122852291229 0.9996988186962042 7.8125e-09 0.04906767432741801 0.9987954562051724 1.171875e-08 0.07356456359966743 0.9972904566786902 1.5625e-08 0.0980171403295606 0.9951847266721969 1.953125e-08 0.1224106751992162 0.99247953459871 2.34375e-08 0.1467304744553617 0.989176509964781 2.734375e-08 0.1709618887603012 0.9852776423889412 3.125e-08 0.1950903220161282 0.9807852804032304 3.515625e-08 0.2191012401568698 0.9757021300385286 3.90625e-08 0.2429801799032639 0.970031253194544 4.296875e-08 0.2667127574748984 0.9637760657954398 4.6875e-08 0.2902846772544623 0.9569403357322088 5.078125e-08 0.3136817403988915 0.9495281805930367 5.46875e-08 0.3368898533922201 0.9415440651830208 5.859374999999999e-08 0.3598950365349881 0.932992798834739 6.25e-08 0.3826834323650898 0.9238795325112867 6.640625e-08 0.4052413140049899 0.9142097557035307 7.03125e-08 0.4275550934302821 0.9039892931234433 7.421874999999999e-08 0.4496113296546065 0.8932243011955153 7.812499999999999e-08 0.4713967368259976 0.881921264348355 8.203125e-08 0.492898192229784 0.8700869911087115 8.59375e-08 0.5141027441932217 0.8577286100002721 8.984375e-08 0.5349976198870972 0.8448535652497071 9.375e-08 0.5555702330196022 0.8314696123025452 9.765624999999999e-08 0.5758081914178453 0.8175848131515837 1.015625e-07 0.5956993044924334 0.8032075314806449 1.0546875e-07 0.6152315905806268 0.7883464276266063 1.09375e-07 0.6343932841636455 0.773010453362737 1.1328125e-07 0.6531728429537768 0.7572088465064846 1.171875e-07 0.6715589548470183 0.7409511253549591 1.2109375e-07 0.6895405447370668 0.724247082951467 1.25e-07 0.7071067811865475 0.7071067811865476 1.2890625e-07 0.7242470829514669 0.6895405447370669 1.328125e-07 0.7409511253549591 0.6715589548470183 1.3671875e-07 0.7572088465064845 0.6531728429537768 1.40625e-07 0.773010453362737 0.6343932841636455 1.4453125e-07 0.7883464276266062 0.6152315905806268 1.484375e-07 0.8032075314806448 0.5956993044924335 1.5234375e-07 0.8175848131515837 0.5758081914178453 1.5625e-07 0.8314696123025452 0.5555702330196023 1.6015625e-07 0.844853565249707 0.5349976198870973 1.640625e-07 0.8577286100002721 0.5141027441932217 1.6796875e-07 0.8700869911087113 0.4928981922297841 1.71875e-07 0.8819212643483549 0.4713967368259978 1.7578125e-07 0.8932243011955153 0.4496113296546066 1.796875e-07 0.9039892931234433 0.4275550934302822 1.8359375e-07 0.9142097557035307 0.4052413140049899 1.875e-07 0.9238795325112867 0.3826834323650898 1.9140625e-07 0.9329927988347388 0.3598950365349883 1.953125e-07 0.9415440651830208 0.3368898533922201 1.9921875e-07 0.9495281805930367 0.3136817403988916 2.03125e-07 0.9569403357322089 0.2902846772544623 2.0703125e-07 0.9637760657954398 0.2667127574748984 2.109375e-07 0.970031253194544 0.242980179903264 2.1484375e-07 0.9757021300385286 0.2191012401568698 2.1875e-07 0.9807852804032304 0.1950903220161283 2.2265625e-07 0.9852776423889412 0.1709618887603014 2.265625e-07 0.989176509964781 0.1467304744553617 2.3046875e-07 0.99247953459871 0.1224106751992163 2.34375e-07 0.9951847266721968 0.09801714032956077 2.3828125e-07 0.9972904566786902 0.07356456359966745 2.421875e-07 0.9987954562051724 0.04906767432741813 2.4609375e-07 0.9996988186962042 0.02454122852291226 2.5e-07 1 6.123233995736766e-17 2.5390625e-07 0.9996988186962042 -0.02454122852291214 2.578125e-07 0.9987954562051724 -0.04906767432741801 2.6171875e-07 0.9972904566786902 -0.07356456359966733 2.65625e-07 0.9951847266721969 -0.09801714032956065 2.6953125e-07 0.99247953459871 -0.1224106751992162 2.734375e-07 0.989176509964781 -0.1467304744553616 2.7734375e-07 0.9852776423889412 -0.1709618887603012 2.8125e-07 0.9807852804032304 -0.1950903220161282 2.8515625e-07 0.9757021300385286 -0.2191012401568697 2.890625e-07 0.970031253194544 -0.2429801799032639 2.9296875e-07 0.9637760657954398 -0.2667127574748983 2.96875e-07 0.9569403357322089 -0.2902846772544622 3.0078125e-07 0.9495281805930367 -0.3136817403988914 3.046875e-07 0.9415440651830208 -0.3368898533922199 3.0859375e-07 0.9329927988347388 -0.3598950365349882 3.125e-07 0.9238795325112867 -0.3826834323650897 3.1640625e-07 0.9142097557035307 -0.4052413140049897 3.203125e-07 0.9039892931234434 -0.4275550934302819 3.2421875e-07 0.8932243011955152 -0.4496113296546067 3.28125e-07 0.881921264348355 -0.4713967368259977 3.3203125e-07 0.8700869911087115 -0.492898192229784 3.359375e-07 0.8577286100002721 -0.5141027441932217 3.3984375e-07 0.8448535652497072 -0.534997619887097 3.4375e-07 0.8314696123025455 -0.555570233019602 3.4765625e-07 0.8175848131515837 -0.5758081914178453 3.515625e-07 0.8032075314806449 -0.5956993044924334 3.5546875e-07 0.7883464276266063 -0.6152315905806267 3.59375e-07 0.7730104533627371 -0.6343932841636454 3.6328125e-07 0.7572088465064847 -0.6531728429537765 3.671875e-07 0.740951125354959 -0.6715589548470184 3.7109375e-07 0.7242470829514669 -0.6895405447370669 3.75e-07 0.7071067811865476 -0.7071067811865475 3.7890625e-07 0.6895405447370671 -0.7242470829514668 3.828125e-07 0.6715589548470186 -0.7409511253549589 3.8671875e-07 0.6531728429537766 -0.7572088465064846 3.90625e-07 0.6343932841636455 -0.773010453362737 3.9453125e-07 0.6152315905806269 -0.7883464276266062 3.984375e-07 0.5956993044924335 -0.8032075314806448 4.0234375e-07 0.5758081914178454 -0.8175848131515836 4.0625e-07 0.5555702330196022 -0.8314696123025453 4.1015625e-07 0.5349976198870972 -0.8448535652497071 4.140625e-07 0.5141027441932218 -0.857728610000272 4.1796875e-07 0.4928981922297841 -0.8700869911087113 4.21875e-07 0.4713967368259979 -0.8819212643483549 4.2578125e-07 0.4496113296546069 -0.8932243011955152 4.296875e-07 0.427555093430282 -0.9039892931234433 4.3359375e-07 0.4052413140049899 -0.9142097557035307 4.375e-07 0.3826834323650899 -0.9238795325112867 4.4140625e-07 0.3598950365349883 -0.9329927988347388 4.453125e-07 0.3368898533922203 -0.9415440651830207 4.4921875e-07 0.3136817403988914 -0.9495281805930367 4.53125e-07 0.2902846772544624 -0.9569403357322088 4.5703125e-07 0.2667127574748985 -0.9637760657954398 4.609375e-07 0.2429801799032641 -0.970031253194544 4.6484375e-07 0.21910124015687 -0.9757021300385285 4.6875e-07 0.1950903220161286 -0.9807852804032304 4.7265625e-07 0.1709618887603012 -0.9852776423889412 4.765625e-07 0.1467304744553618 -0.989176509964781 4.804687499999999e-07 0.1224106751992163 -0.99247953459871 4.84375e-07 0.09801714032956083 -0.9951847266721968 4.8828125e-07 0.07356456359966773 -0.9972904566786902 4.921875e-07 0.04906767432741797 -0.9987954562051724 4.9609375e-07 0.02454122852291233 -0.9996988186962042 5e-07 1.224646799147353e-16 -1 5.0390625e-07 -0.02454122852291208 -0.9996988186962042 5.078125e-07 -0.04906767432741772 -0.9987954562051724 5.117187499999999e-07 -0.0735645635996675 -0.9972904566786902 5.156249999999999e-07 -0.09801714032956059 -0.9951847266721969 5.1953125e-07 -0.1224106751992161 -0.99247953459871 5.234375e-07 -0.1467304744553616 -0.989176509964781 5.2734375e-07 -0.170961888760301 -0.9852776423889413 5.3125e-07 -0.1950903220161284 -0.9807852804032304 5.3515625e-07 -0.2191012401568698 -0.9757021300385286 5.390625e-07 -0.2429801799032638 -0.970031253194544 5.4296875e-07 -0.2667127574748983 -0.96377606579544 5.46875e-07 -0.2902846772544621 -0.9569403357322089 5.507812499999999e-07 -0.3136817403988912 -0.9495281805930368 5.546874999999999e-07 -0.3368898533922201 -0.9415440651830208 5.5859375e-07 -0.3598950365349881 -0.932992798834739 5.625e-07 -0.3826834323650897 -0.9238795325112868 5.6640625e-07 -0.4052413140049897 -0.9142097557035307 5.703125e-07 -0.4275550934302818 -0.9039892931234434 5.7421875e-07 -0.4496113296546067 -0.8932243011955153 5.78125e-07 -0.4713967368259976 -0.881921264348355 5.8203125e-07 -0.4928981922297839 -0.8700869911087115 5.859374999999999e-07 -0.5141027441932216 -0.8577286100002721 5.898437499999999e-07 -0.5349976198870969 -0.8448535652497072 5.937499999999999e-07 -0.555570233019602 -0.8314696123025455 5.9765625e-07 -0.5758081914178453 -0.8175848131515837 6.015625e-07 -0.5956993044924332 -0.8032075314806449 6.0546875e-07 -0.6152315905806267 -0.7883464276266063 6.09375e-07 -0.6343932841636453 -0.7730104533627371 6.1328125e-07 -0.6531728429537765 -0.7572088465064848 6.171875e-07 -0.6715589548470184 -0.7409511253549591 6.2109375e-07 -0.6895405447370668 -0.724247082951467 6.249999999999999e-07 -0.7071067811865475 -0.7071067811865477 6.289062499999999e-07 -0.7242470829514668 -0.6895405447370671 6.328124999999999e-07 -0.7409511253549589 -0.6715589548470187 6.3671875e-07 -0.7572088465064842 -0.6531728429537771 6.40625e-07 -0.7730104533627367 -0.6343932841636459 6.4453125e-07 -0.7883464276266059 -0.6152315905806273 6.484375e-07 -0.8032075314806451 -0.5956993044924331 6.5234375e-07 -0.8175848131515838 -0.5758081914178452 6.5625e-07 -0.8314696123025452 -0.5555702330196022 6.6015625e-07 -0.844853565249707 -0.5349976198870973 6.640624999999999e-07 -0.857728610000272 -0.5141027441932218 6.679687499999999e-07 -0.8700869911087113 -0.4928981922297842 6.718749999999999e-07 -0.8819212643483549 -0.4713967368259979 6.7578125e-07 -0.8932243011955152 -0.4496113296546069 6.796875e-07 -0.9039892931234431 -0.4275550934302825 6.8359375e-07 -0.9142097557035305 -0.4052413140049904 6.875e-07 -0.9238795325112865 -0.3826834323650903 6.9140625e-07 -0.932992798834739 -0.3598950365349879 6.953125e-07 -0.9415440651830208 -0.3368898533922199 6.992187499999999e-07 -0.9495281805930367 -0.3136817403988915 7.031249999999999e-07 -0.9569403357322088 -0.2902846772544624 7.070312499999999e-07 -0.9637760657954398 -0.2667127574748985 7.109374999999999e-07 -0.970031253194544 -0.2429801799032641 7.1484375e-07 -0.9757021300385285 -0.2191012401568701 7.1875e-07 -0.9807852804032303 -0.1950903220161287 7.2265625e-07 -0.9852776423889411 -0.1709618887603017 7.265625e-07 -0.9891765099647809 -0.1467304744553623 7.3046875e-07 -0.9924795345987101 -0.122410675199216 7.34375e-07 -0.9951847266721969 -0.09801714032956045 7.382812499999999e-07 -0.9972904566786902 -0.07356456359966736 7.421874999999999e-07 -0.9987954562051724 -0.04906767432741803 7.460937499999999e-07 -0.9996988186962042 -0.02454122852291239 7.5e-07 -1 -1.83697019872103e-16 7.5390625e-07 -0.9996988186962042 0.02454122852291202 7.578125e-07 -0.9987954562051724 0.04906767432741766 7.6171875e-07 -0.9972904566786902 0.07356456359966698 7.65625e-07 -0.9951847266721969 0.09801714032956009 7.6953125e-07 -0.9924795345987101 0.1224106751992156 7.734375e-07 -0.9891765099647809 0.1467304744553619 7.773437499999999e-07 -0.9852776423889412 0.1709618887603013 7.812499999999999e-07 -0.9807852804032304 0.1950903220161283 7.851562499999999e-07 -0.9757021300385286 0.2191012401568697 7.890625e-07 -0.970031253194544 0.2429801799032638 7.9296875e-07 -0.96377606579544 0.2667127574748982 7.96875e-07 -0.9569403357322089 0.2902846772544621 8.0078125e-07 -0.9495281805930368 0.3136817403988911 8.046875e-07 -0.9415440651830209 0.3368898533922196 8.0859375e-07 -0.9329927988347391 0.3598950365349876 8.124999999999999e-07 -0.9238795325112866 0.38268343236509 8.164062499999999e-07 -0.9142097557035306 0.40524131400499 8.203124999999999e-07 -0.9039892931234433 0.4275550934302821 8.242187499999999e-07 -0.8932243011955153 0.4496113296546066 8.28125e-07 -0.881921264348355 0.4713967368259976 8.3203125e-07 -0.8700869911087115 0.4928981922297839 8.359375e-07 -0.8577286100002722 0.5141027441932216 8.3984375e-07 -0.8448535652497072 0.5349976198870969 8.4375e-07 -0.8314696123025455 0.5555702330196018 8.4765625e-07 -0.817584813151584 0.5758081914178449 8.515624999999999e-07 -0.8032075314806453 0.5956993044924329 8.554687499999999e-07 -0.7883464276266061 0.615231590580627 8.593749999999999e-07 -0.7730104533627369 0.6343932841636456 8.632812499999999e-07 -0.7572088465064846 0.6531728429537768 8.671875e-07 -0.7409511253549591 0.6715589548470183 8.7109375e-07 -0.724247082951467 0.6895405447370668 8.75e-07 -0.7071067811865477 0.7071067811865474 8.7890625e-07 -0.6895405447370672 0.7242470829514667 8.828125e-07 -0.6715589548470187 0.7409511253549589 8.8671875e-07 -0.6531728429537771 0.7572088465064842 8.906249999999999e-07 -0.6343932841636459 0.7730104533627367 8.945312499999999e-07 -0.6152315905806274 0.7883464276266059 8.984374999999999e-07 -0.5956993044924332 0.8032075314806451 9.023437499999999e-07 -0.5758081914178452 0.8175848131515837 9.0625e-07 -0.5555702330196022 0.8314696123025452 9.1015625e-07 -0.5349976198870973 0.844853565249707 9.140625e-07 -0.5141027441932219 0.857728610000272 9.1796875e-07 -0.4928981922297843 0.8700869911087113 9.21875e-07 -0.4713967368259979 0.8819212643483548 9.2578125e-07 -0.449611329654607 0.8932243011955151 9.296874999999999e-07 -0.4275550934302825 0.9039892931234431 9.335937499999999e-07 -0.4052413140049904 0.9142097557035305 9.374999999999999e-07 -0.3826834323650904 0.9238795325112865 9.414062499999999e-07 -0.359895036534988 0.932992798834739 9.453125e-07 -0.33688985339222 0.9415440651830208 9.4921875e-07 -0.3136817403988915 0.9495281805930367 9.53125e-07 -0.2902846772544625 0.9569403357322088 9.5703125e-07 -0.2667127574748986 0.9637760657954398 9.609374999999999e-07 -0.2429801799032642 0.970031253194544 9.648437499999999e-07 -0.2191012401568702 0.9757021300385285 9.6875e-07 -0.1950903220161287 0.9807852804032303 9.726562499999999e-07 -0.1709618887603018 0.9852776423889411 9.765625e-07 -0.1467304744553624 0.9891765099647809 9.804687499999999e-07 -0.122410675199216 0.99247953459871 9.84375e-07 -0.09801714032956051 0.9951847266721969 9.882812499999999e-07 -0.07356456359966741 0.9972904566786902 9.921875e-07 -0.04906767432741809 0.9987954562051724 9.960937499999999e-07 -0.02454122852291245 0.9996988186962042 1e-06 -2.449293598294706e-16 1 ngspice-26/examples/numparam/0000755000265600020320000000000012264261473015667 5ustar andreasadminngspice-26/examples/numparam/pin.mod0000644000265600020320000000161012264261473017154 0ustar andreasadmin* PIN model * line 2 * line 3 * -- Summary ------------------------------- * This is a simple spice model of a PIN diode. * * -- Description --------------------------- * It is a three node device; one input node (relative to ground) and two * output nodes (cathode and anode) * * -- Model ---------------------------------- .subckt SIMPLE_PIN input cathode anode resp=0.5 * Input photocurrent is modled by a voltage * This generates a current using a linear voltage-controlled current source Gin dk da input 0 {resp} Rin input 0 1G Cin input 0 {resp} * The pn-junction that generates this photocurrent in the real device is modelled * here by a simple diode Dpn da dk pndiode * terminal resistances Ra anode da 0.001ohm Rk cathode dk 0.001ohm * subsircuit models: .MODEL pndiode D IS=0.974p RS=0.1 N=1.986196 BV=7.1 IBV=0.1n + CJO=99.2p VJ=0.455536 M=0.418717 TT=500n .ends ngspice-26/examples/numparam/pintest.cir0000644000265600020320000000075312264261473020061 0ustar andreasadmin* Test circuit for pin.mod *.include C:\Spice\tests\numparam\pin.mod .include pin.mod * Photodiode supply Vbias psu 0 10V * Light input is modeled by a voltage source that we can vary Vlight input 0 2mW * The pin diode Xpin input cathode anode SIMPLE_PIN resp=0.7 * monitor resistor Rmon anode 0 1ohm * Quench restistor Rq psu cathode 1k *.dc vlight 0 5mW 0.01mW .dc vlight 0 10mW 0.01mW .control dc vlight 0 10mW 0.01mW *write pintest.raw all plot V(anode) .endc .end ngspice-26/examples/numparam/example.cir0000644000265600020320000000043712264261473020025 0ustar andreasadmin* Param-example .param amplitude= 1V .subckt myfilter in out rval=100k cval=100nF Ra in p1 {2*rval} Rb p1 out {2*rval} C1 p1 0 {2*cval} Ca in p2 {cval} Cb p2 out {cval} R1 p2 0 {rval} .ends myfilter X1 input output myfilter rval=1k cval=1n V1 input 0 AC {amplitude} .end ngspice-26/examples/memristor/0000755000265600020320000000000012264261473016070 5ustar andreasadminngspice-26/examples/memristor/memristor_x.sp0000644000265600020320000000563612264261473021016 0ustar andreasadminMemristor with threshold as XSPICE code model * Y. V. Pershin, M. Di Ventra: "SPICE model of memristive devices with threshold", * arXiv:1204.2600v1 [physics.comp-ph] 12 Apr 2012, * http://arxiv.org/pdf/1204.2600.pdf * XSPICE code model, parameter selection and plotting by * Holger Vogt 2012 * ac and op (dc) simulation just use start resistance rinit! .param stime=10n .param vmax = 4.2 * send parameters to the .control section .csparam stime={stime} .csparam vmax={vmax} *Xmem 1 0 memristor * triangular sweep (you have to adapt the parameters to 'alter' command in the .control section) *V1 1 0 DC 0 PWL(0 0 '0.25*stime' 'vmax' '0.5*stime' 0 '0.75*stime' '-vmax' 'stime' 0) * sinusoidal sweep for transient, dc for op, ac V1 0 1 DC 0.1 ac 1 sin(0 'vmax' '1/stime') Rl 1 11 1k * memristor model with limits and threshold * "artificial" parameters alpha, beta, and vt. beta and vt adapted to basic programming frequency * just to obtain nice results! * You have to care for the physics and set real values! amen 11 2 memr .model memr memristor (rmin=1k rmax=10k rinit=7k alpha=0 beta='20e3/stime' vt=1.6) vgnd 2 0 dc 0 * This is the original subcircuit model .subckt memristor plus minus PARAMS: Ron=1K Roff=10K Rinit=7.0K alpha=0 beta=20e3/stime Vt=1.6 Bx 0 x I='((f1(V(plus)-V(minus))> 0) && (V(x) < Roff)) ? {f1(V(plus)-V(minus))}: ((((f1(V(plus)-V(minus)) < 0) && (V(x)>Ron)) ? {f1(V(plus)-V(minus))}: 0)) ' Vx x x1 dc 0 Cx x1 0 1 IC={Rinit} Rmem plus minus r={V(x)} .func f1(y)={beta*y+0.5*(alpha-beta)*(abs(y+Vt)-abs(y-Vt))} .ends * transient simulation same programming voltage but rising frequencies .control *** first simulation *** op print all ac lin 101 1 100k plot v(11) * approx. 100 simulation points let deltime = stime/100 tran $&deltime $&stime uic * plot i(v1) vs v(1) *** you may just stop here *** * raise the frequency let newfreq = 1.2/stime let newstime = stime/1.2 let deltime = newstime/100 alter @V1[sin] [ 0 $&vmax $&newfreq ] tran $&deltime $&newstime uic * raise the frequency even more let newfreq = 1.4/stime let newstime = stime/1.4 let deltime = newstime/100 alter @V1[sin] [ 0 $&vmax $&newfreq ] tran $&deltime $&newstime uic * the resistor currents plot tran1.alli tran2.alli alli title 'Memristor with threshold: currents' * calculate resistance (avoid dividing by zero) let res = v(1)/(I(v1) + 1e-16) let res1 = tran1.v(1)/(tran1.I(v1) + 1e-16) let res2 = tran2.v(1)/(tran2.I(v1) + 1e-16) * resistance versus time plot settype impedance res res1 res2 plot res vs time res1 vs tran1.time res2 vs tran2.time title 'Memristor with threshold: resistance' * resistance versus voltage (change occurs only above threshold!) plot res vs v(1) res1 vs tran1.v(1) res2 vs tran2.v(1) title 'Memristor with threshold: resistance' * current through resistor for all plots versus voltage plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) title 'Memristor with threshold: external current loops' .endc .end ngspice-26/examples/memristor/memristor.sp0000644000265600020320000000472012264261473020460 0ustar andreasadminMemristor with threshold * Y. V. Pershin, M. Di Ventra: "SPICE model of memristive devices with threshold", * arXiv:1204.2600v1 [physics.comp-ph] 12 Apr 2012, * http://arxiv.org/pdf/1204.2600.pdf * Parameter selection and plotting by * Holger Vogt 2012 .param stime=10n .param vmax = 3 * send parameters to the .control section .csparam stime={stime} .csparam vmax={vmax} Xmem 1 0 memristor * triangular sweep (you have to adapt the parameters to 'alter' command in the .control section) *V1 1 0 DC 0 PWL(0 0 '0.25*stime' 'vmax' '0.5*stime' 0 '0.75*stime' '-vmax' 'stime' 0) * sinusoidal sweep V1 0 1 DC 0 sin(0 'vmax' '1/stime') * memristor model with limits and threshold * "artificial" parameters alpha, beta, and vt. beta and vt adapted to basic programming frequency * just to obtain nice results! * You have to care for the physics and set real values! .subckt memristor plus minus PARAMS: Ron=1K Roff=10K Rinit=7.0K alpha=0 beta=20e3/stime Vt=1.6 Bx 0 x I='((f1(V(plus)-V(minus))> 0) && (V(x) < Roff)) ? {f1(V(plus)-V(minus))}: ((((f1(V(plus)-V(minus)) < 0) && (V(x)>Ron)) ? {f1(V(plus)-V(minus))}: 0)) ' Vx x x1 dc 0 Cx x1 0 1 IC={Rinit} Rmem plus minus r={V(x)} .func f1(y)={beta*y+0.5*(alpha-beta)*(abs(y+Vt)-abs(y-Vt))} .ends * transient simulation same programming voltage but rising frequencies .control *** first simulation *** * approx. 100 simulation points let deltime = stime/100 tran $&deltime $&stime uic * plot i(v1) vs v(1) *** you may just stop here *** * raise the frequency let newfreq = 1.1/stime let newstime = stime/1.1 let deltime = newstime/100 alter @V1[sin] [ 0 $&vmax $&newfreq ] tran $&deltime $&newstime uic * raise the frequency even more let newfreq = 1.4/stime let newstime = stime/1.4 let deltime = newstime/100 alter @V1[sin] [ 0 $&vmax $&newfreq ] tran $&deltime $&newstime uic * the 'programming' currents plot tran1.alli tran2.alli alli title 'Memristor with threshold: Internal Programming currents' * resistance versus time plot settype impedance xmem.x1 tran1.xmem.x1 tran2.xmem.x1 plot xmem.x1 tran1.xmem.x1 tran2.xmem.x1 title 'Memristor with threshold: resistance' * resistance versus voltage (change occurs only above threshold!) plot xmem.x1 vs v(1) tran1.xmem.x1 vs tran1.v(1) tran2.xmem.x1 vs tran2.v(1) title 'Memristor with threshold: resistance' * current through resistor for all plots versus voltage plot i(v1) vs v(1) tran1.i(v1) vs tran1.v(1) tran2.i(v1) vs tran2.v(1) title 'Memristor with threshold: external current loops' .endc .end ngspice-26/examples/tclspice/0000755000265600020320000000000012264261473015655 5ustar andreasadminngspice-26/examples/tclspice/tcl-testbench2/0000755000265600020320000000000012264261473020476 5ustar andreasadminngspice-26/examples/tclspice/tcl-testbench2/tcl-testbench2.tcl0000755000265600020320000000201212264261473024021 0ustar andreasadmin#!/bin/sh # WishFix \ exec wish -f "$0" ${1+"$@"} ### package require BLT load ../../../src/.libs/libspice.so namespace import blt::* wm title . "Vector Test script" wm geometry . 800x600+40+40 pack propagate . false stripchart .chart pack .chart -side top -fill both -expand true .chart axis configure x -title "Time" # Create a vector (and call it $vector) #vector create v1 spice::source example.cir spice::bg run after 1000 vector create a0 vector create b0 vector create a1 vector create b1 vector create stime proc bltupdate {} { #puts [spice::spice_data] spice::spicetoblt a0 a0 spice::spicetoblt b0 b0 spice::spicetoblt a1 a1 spice::spicetoblt b1 b1 spice::spicetoblt time stime #puts $spice::lastitercount after 100 bltupdate } bltupdate .chart element create a0 -color red -xdata stime -ydata a0 .chart element create b0 -color blue -xdata stime -ydata b0 .chart element create a1 -color yellow -xdata stime -ydata a1 .chart element create b1 -color black -xdata stime -ydata b1 ngspice-26/examples/tclspice/tcl-testbench2/example.cir0000644000265600020320000007145612264261473022645 0ustar andreasadminTITLE: proj1.cir.cir - Rotary Traveling Wave Oscillator .control set filetype=ascii .endc VDD0 VDD0 VDD DC 0 VSS0 VSS0 0 DC 0 VDD_A0 VDD_A0 VDD0 DC 0 VSS_A0 VSS_A0 VSS0 DC 0 VDD_B0 VDD_B0 VDD0 DC 0 VSS_B0 VSS_B0 VSS0 DC 0 LA0 A0 LCA0 3.69030941553353e-11 RA0 LCA0 A1 0.266535044422507 LB0 B0 LCB0 3.69030941553353e-11 RB0 LCB0 B1 0.266535044422507 C0 A1 B1 2.50418376625721e-14 MNA0 B0 A0 VSS_B0 VSS_B0 Nmod L=2.53696435353243e-07 W= +4.24857778403814e-05 AD=3.125e-11 AS=3.125e-11 PD= +8.49715556807627e-05 PS=8.49715556807627e-05 NQSMOD=1 MPA0 B0 A0 VDD_B0 VDD_B0 Pmod L=2.55343565546106e-07 W= +0.000101772203908557 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203544407817114 PS=0.000203544407817114 NQSMOD=1 MNB0 A0 B0 VSS_A0 VSS_A0 Nmod L=2.53941602497219e-07 W= +4.10652659629401e-05 AD=3.125e-11 AS=3.125e-11 PD= +8.21305319258802e-05 PS=8.21305319258802e-05 NQSMOD=1 MPB0 A0 B0 VDD_A0 VDD_A0 Pmod L=2.52010168145607e-07 W= +0.000103533977891464 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207067955782928 PS=0.000207067955782928 NQSMOD=1 LA1 A1 LCA1 3.69030941553353e-11 RA1 LCA1 A2 0.266535044422507 LB1 B1 LCB1 3.69030941553353e-11 RB1 LCB1 B2 0.266535044422507 C1 A2 B2 2.50418376625721e-14 MNA1 B1 A1 0 0 Nmod L=2.52370578161099e-07 W=4.12246995102289e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.24493990204578e-05 PS= +8.24493990204578e-05 NQSMOD=1 MPA1 B1 A1 VDD VDD Pmod L=2.45709468983316e-07 W=0.000103710764679465 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207421529358929 PS= +0.000207421529358929 NQSMOD=1 MNB1 A1 B1 0 0 Nmod L=2.48115895523017e-07 W=4.26306134285554e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.52612268571108e-05 PS= +8.52612268571108e-05 NQSMOD=1 MPB1 A1 B1 VDD VDD Pmod L=2.55265156192223e-07 W=0.000102043840486507 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000204087680973014 PS= +0.000204087680973014 NQSMOD=1 LA2 A2 LCA2 3.69030941553353e-11 RA2 LCA2 A3 0.266535044422507 LB2 B2 LCB2 3.69030941553353e-11 RB2 LCB2 B3 0.266535044422507 C2 A3 B3 2.50418376625721e-14 MNA2 B2 A2 0 0 Nmod L=2.53484220592882e-07 W=4.16915225420459e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.33830450840917e-05 PS= +8.33830450840917e-05 NQSMOD=1 MPA2 B2 A2 VDD VDD Pmod L=2.44256748076514e-07 W=0.00010549295960702 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000210985919214039 PS= +0.000210985919214039 NQSMOD=1 MNB2 A2 B2 0 0 Nmod L=2.48805892712811e-07 W=4.15734692647458e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.31469385294916e-05 PS= +8.31469385294916e-05 NQSMOD=1 MPB2 A2 B2 VDD VDD Pmod L=2.54004987710956e-07 W=0.00010229621219808 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020459242439616 PS= +0.00020459242439616 NQSMOD=1 LA3 A3 LCA3 3.69030941553353e-11 RA3 LCA3 A4 0.266535044422507 LB3 B3 LCB3 3.69030941553353e-11 RB3 LCB3 B4 0.266535044422507 C3 A4 B4 2.50418376625721e-14 MNA3 B3 A3 0 0 Nmod L=2.54307430347219e-07 W=4.11339076756089e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22678153512179e-05 PS= +8.22678153512179e-05 NQSMOD=1 MPA3 B3 A3 VDD VDD Pmod L=2.52369109463781e-07 W=0.000103371681055656 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206743362111311 PS= +0.000206743362111311 NQSMOD=1 MNB3 A3 B3 0 0 Nmod L=2.4960708801709e-07 W=4.21794611046917e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.43589222093833e-05 PS= +8.43589222093833e-05 NQSMOD=1 MPB3 A3 B3 VDD VDD Pmod L=2.53834779766428e-07 W=0.000105556314711602 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000211112629423204 PS= +0.000211112629423204 NQSMOD=1 LA4 A4 LCA4 3.69030941553353e-11 RA4 LCA4 A5 0.266535044422507 LB4 B4 LCB4 3.69030941553353e-11 RB4 LCB4 B5 0.266535044422507 C4 A5 B5 2.50418376625721e-14 MNA4 B4 A4 0 0 Nmod L=2.48091656083177e-07 W=4.11207568141106e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22415136282211e-05 PS= +8.22415136282211e-05 NQSMOD=1 MPA4 B4 A4 VDD VDD Pmod L=2.47723605289033e-07 W=0.000103463392309261 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206926784618522 PS= +0.000206926784618522 NQSMOD=1 MNB4 A4 B4 0 0 Nmod L=2.49254771880382e-07 W=4.25122425012226e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.50244850024452e-05 PS= +8.50244850024452e-05 NQSMOD=1 MPB4 A4 B4 VDD VDD Pmod L=2.49689766979065e-07 W=0.000103227993619608 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206455987239216 PS= +0.000206455987239216 NQSMOD=1 LA5 A5 LCA5 3.69030941553353e-11 RA5 LCA5 A6 0.266535044422507 LB5 B5 LCB5 3.69030941553353e-11 RB5 LCB5 B6 0.266535044422507 C5 A6 B6 2.50418376625721e-14 MNA5 B5 A5 0 0 Nmod L=2.53960031106522e-07 W=4.1129961792588e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22599235851759e-05 PS= +8.22599235851759e-05 NQSMOD=1 MPA5 B5 A5 VDD VDD Pmod L=2.47418707088064e-07 W=0.000101621693062467 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000203243386124935 PS= +0.000203243386124935 NQSMOD=1 MNB5 A5 B5 0 0 Nmod L=2.49659687529522e-07 W=4.2524931640785e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.50498632815701e-05 PS= +8.50498632815701e-05 NQSMOD=1 MPB5 A5 B5 VDD VDD Pmod L=2.46328059754468e-07 W=0.000102061546065548 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000204123092131096 PS= +0.000204123092131096 NQSMOD=1 LA6 A6 LCA6 3.69030941553353e-11 RA6 LCA6 A7 0.266535044422507 LB6 B6 LCB6 3.69030941553353e-11 RB6 LCB6 B7 0.266535044422507 C6 A7 B7 2.50418376625721e-14 MNA6 B6 A6 0 0 Nmod L=2.54326804653788e-07 W=4.17332976706085e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.34665953412171e-05 PS= +8.34665953412171e-05 NQSMOD=1 MPA6 B6 A6 VDD VDD Pmod L=2.48727427835127e-07 W=0.000103244611103459 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206489222206918 PS= +0.000206489222206918 NQSMOD=1 MNB6 A6 B6 0 0 Nmod L=2.49697035135609e-07 W=4.23570035518e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.47140071036001e-05 PS= +8.47140071036001e-05 NQSMOD=1 MPB6 A6 B6 VDD VDD Pmod L=2.48995485890626e-07 W=0.000103695454759978 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207390909519956 PS= +0.000207390909519956 NQSMOD=1 LA7 A7 LCA7 3.69030941553353e-11 RA7 LCA7 A8 0.266535044422507 LB7 B7 LCB7 3.69030941553353e-11 RB7 LCB7 B8 0.266535044422507 C7 A8 B8 2.50418376625721e-14 MNA7 B7 A7 0 0 Nmod L=2.53418975114981e-07 W=4.06421756574473e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.12843513148946e-05 PS= +8.12843513148946e-05 NQSMOD=1 MPA7 B7 A7 VDD VDD Pmod L=2.4471861043622e-07 W=0.000104600862141835 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020920172428367 PS= +0.00020920172428367 NQSMOD=1 MNB7 A7 B7 0 0 Nmod L=2.50159056393584e-07 W=4.06845582724173e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.13691165448345e-05 PS= +8.13691165448345e-05 NQSMOD=1 MPB7 A7 B7 VDD VDD Pmod L=2.55032245177227e-07 W=0.000106482118141681 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000212964236283363 PS= +0.000212964236283363 NQSMOD=1 LA8 A8 LCA8 3.69030941553353e-11 RA8 LCA8 A9 0.266535044422507 LB8 B8 LCB8 3.69030941553353e-11 RB8 LCB8 B9 0.266535044422507 C8 A9 B9 2.50418376625721e-14 MNA8 B8 A8 0 0 Nmod L=2.45729547191971e-07 W=4.18266198665335e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.3653239733067e-05 PS=8.3653239733067e-05 +NQSMOD=1 MPA8 B8 A8 VDD VDD Pmod L=2.45156004861421e-07 W=0.000101593205477244 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000203186410954489 PS= +0.000203186410954489 NQSMOD=1 MNB8 A8 B8 0 0 Nmod L=2.49014342219656e-07 W=4.14314219478801e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.28628438957603e-05 PS= +8.28628438957603e-05 NQSMOD=1 MPB8 A8 B8 VDD VDD Pmod L=2.50396673007567e-07 W=0.000103029640740115 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020605928148023 PS= +0.00020605928148023 NQSMOD=1 LA9 A9 LCA9 3.69030941553353e-11 RA9 LCA9 A10 0.266535044422507 LB9 B9 LCB9 3.69030941553353e-11 RB9 LCB9 B10 0.266535044422507 C9 A10 B10 2.50418376625721e-14 MNA9 B9 A9 0 0 Nmod L=2.51066307645916e-07 W=4.17044186844862e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.34088373689724e-05 PS= +8.34088373689724e-05 NQSMOD=1 MPA9 B9 A9 VDD VDD Pmod L=2.4945438501494e-07 W=0.000104601836030031 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000209203672060063 PS= +0.000209203672060063 NQSMOD=1 MNB9 A9 B9 0 0 Nmod L=2.56178041422984e-07 W=4.17990098329256e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.35980196658511e-05 PS= +8.35980196658511e-05 NQSMOD=1 MPB9 A9 B9 VDD VDD Pmod L=2.5274010042983e-07 W=0.000103578149162769 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207156298325537 PS= +0.000207156298325537 NQSMOD=1 LA10 A10 LCA10 3.69030941553353e-11 RA10 LCA10 A11 0.266535044422507 LB10 B10 LCB10 3.69030941553353e-11 RB10 LCB10 B11 0.266535044422507 C10 A11 B11 2.50418376625721e-14 MNA10 B10 A10 0 0 Nmod L=2.45772611943267e-07 W=4.24345922952649e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.48691845905299e-05 PS= +8.48691845905299e-05 NQSMOD=1 MPA10 B10 A10 VDD VDD Pmod L=2.55544710347746e-07 W= +0.000105625826497323 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211251652994645 PS=0.000211251652994645 NQSMOD=1 MNB10 A10 B10 0 0 Nmod L=2.55886308364338e-07 W=4.0850956346516e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.17019126930321e-05 PS= +8.17019126930321e-05 NQSMOD=1 MPB10 A10 B10 VDD VDD Pmod L=2.44778614470725e-07 W= +0.000105511594248206 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211023188496411 PS=0.000211023188496411 NQSMOD=1 LA11 A11 LCA11 3.69030941553353e-11 RA11 LCA11 A12 0.266535044422507 LB11 B11 LCB11 3.69030941553353e-11 RB11 LCB11 B12 0.266535044422507 C11 A12 B12 2.50418376625721e-14 MNA11 B11 A11 0 0 Nmod L=2.4768739676619e-07 W=4.14724461551725e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.29448923103449e-05 PS= +8.29448923103449e-05 NQSMOD=1 MPA11 B11 A11 VDD VDD Pmod L=2.46276216123912e-07 W= +0.000101782633723501 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203565267447002 PS=0.000203565267447002 NQSMOD=1 MNB11 A11 B11 0 0 Nmod L=2.54985612770668e-07 W=4.24608643314108e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.49217286628216e-05 PS= +8.49217286628216e-05 NQSMOD=1 MPB11 A11 B11 VDD VDD Pmod L=2.45772463970764e-07 W= +0.000106109588792745 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00021221917758549 PS=0.00021221917758549 NQSMOD=1 LA12 A12 LCA12 3.69030941553353e-11 RA12 LCA12 A13 0.266535044422507 LB12 B12 LCB12 3.69030941553353e-11 RB12 LCB12 B13 0.266535044422507 C12 A13 B13 2.50418376625721e-14 MNA12 B12 A12 0 0 Nmod L=2.45480481009462e-07 W=4.20858793029857e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.41717586059714e-05 PS= +8.41717586059714e-05 NQSMOD=1 MPA12 B12 A12 VDD VDD Pmod L=2.48462320158069e-07 W= +0.00010650127744954 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00021300255489908 PS=0.00021300255489908 NQSMOD=1 MNB12 A12 B12 0 0 Nmod L=2.51992945030792e-07 W=4.17981435096244e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.35962870192489e-05 PS= +8.35962870192489e-05 NQSMOD=1 MPB12 A12 B12 VDD VDD Pmod L=2.49941922576661e-07 W= +0.0001044851795426 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208970359085199 PS=0.000208970359085199 NQSMOD=1 LA13 A13 LCA13 3.69030941553353e-11 RA13 LCA13 A14 0.266535044422507 LB13 B13 LCB13 3.69030941553353e-11 RB13 LCB13 B14 0.266535044422507 C13 A14 B14 2.50418376625721e-14 MNA13 B13 A13 0 0 Nmod L=2.51146190542173e-07 W=4.23276196447018e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.46552392894035e-05 PS= +8.46552392894035e-05 NQSMOD=1 MPA13 B13 A13 VDD VDD Pmod L=2.46359362747576e-07 W= +0.00010249565409785 AD=7.8125e-11 AS=7.8125e-11 PD= +0.0002049913081957 PS=0.0002049913081957 NQSMOD=1 MNB13 A13 B13 0 0 Nmod L=2.44656485453628e-07 W=4.11044634633624e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.22089269267248e-05 PS= +8.22089269267248e-05 NQSMOD=1 MPB13 A13 B13 VDD VDD Pmod L=2.56119611942636e-07 W= +0.0001064085618438 AD=7.8125e-11 AS=7.8125e-11 PD=0.0002128171236876 +PS=0.0002128171236876 NQSMOD=1 LA14 A14 LCA14 3.69030941553353e-11 RA14 LCA14 A15 0.266535044422507 LB14 B14 LCB14 3.69030941553353e-11 RB14 LCB14 B15 0.266535044422507 C14 A15 B15 2.50418376625721e-14 MNA14 B14 A14 0 0 Nmod L=2.47663439668801e-07 W=4.20889991075918e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.41779982151835e-05 PS= +8.41779982151835e-05 NQSMOD=1 MPA14 B14 A14 VDD VDD Pmod L=2.51252450429323e-07 W= +0.000103622229824819 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207244459649638 PS=0.000207244459649638 NQSMOD=1 MNB14 A14 B14 0 0 Nmod L=2.5044796612668e-07 W=4.24685059762319e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.49370119524638e-05 PS= +8.49370119524638e-05 NQSMOD=1 MPB14 A14 B14 VDD VDD Pmod L=2.4786360459861e-07 W= +0.000104258615459431 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208517230918863 PS=0.000208517230918863 NQSMOD=1 LA15 A15 LCA15 3.69030941553353e-11 RA15 LCA15 A16 0.266535044422507 LB15 B15 LCB15 3.69030941553353e-11 RB15 LCB15 B16 0.266535044422507 C15 A16 B16 2.50418376625721e-14 MNA15 B15 A15 0 0 Nmod L=2.5213362488047e-07 W=4.26610931467994e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.53221862935989e-05 PS= +8.53221862935989e-05 NQSMOD=1 MPA15 B15 A15 VDD VDD Pmod L=2.44411053097269e-07 W= +0.000104344399065411 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208688798130821 PS=0.000208688798130821 NQSMOD=1 MNB15 A15 B15 0 0 Nmod L=2.44947739168727e-07 W=4.18061319080677e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.36122638161354e-05 PS= +8.36122638161354e-05 NQSMOD=1 MPB15 A15 B15 VDD VDD Pmod L=2.45133067349567e-07 W= +0.000103673770597555 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00020734754119511 PS=0.00020734754119511 NQSMOD=1 LA16 A16 LCA16 3.69030941553353e-11 RA16 LCA16 A17 0.266535044422507 LB16 B16 LCB16 3.69030941553353e-11 RB16 LCB16 B17 0.266535044422507 C16 A17 B17 2.50418376625721e-14 MNA16 B16 A16 0 0 Nmod L=2.5558903414348e-07 W=4.23651981762607e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.47303963525215e-05 PS= +8.47303963525215e-05 NQSMOD=1 MPA16 B16 A16 VDD VDD Pmod L=2.46968507923118e-07 W= +0.000101577430536373 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203154861072746 PS=0.000203154861072746 NQSMOD=1 MNB16 A16 B16 0 0 Nmod L=2.52441475326891e-07 W=4.0963445615255e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.192689123051e-05 PS= +8.192689123051e-05 NQSMOD=1 MPB16 A16 B16 VDD VDD Pmod L=2.49958772476576e-07 W= +0.000102341104143712 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204682208287424 PS=0.000204682208287424 NQSMOD=1 LA17 A17 LCA17 3.69030941553353e-11 RA17 LCA17 A18 0.266535044422507 LB17 B17 LCB17 3.69030941553353e-11 RB17 LCB17 B18 0.266535044422507 C17 A18 B18 2.50418376625721e-14 MNA17 B17 A17 0 0 Nmod L=2.46623947628415e-07 W=4.07033737509309e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.14067475018618e-05 PS= +8.14067475018618e-05 NQSMOD=1 MPA17 B17 A17 VDD VDD Pmod L=2.52274212428759e-07 W= +0.000105423152156798 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000210846304313596 PS=0.000210846304313596 NQSMOD=1 MNB17 A17 B17 0 0 Nmod L=2.51233452024547e-07 W=4.12815452669714e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.25630905339429e-05 PS= +8.25630905339429e-05 NQSMOD=1 MPB17 A17 B17 VDD VDD Pmod L=2.49324495416238e-07 W= +0.000104142717459091 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208285434918183 PS=0.000208285434918183 NQSMOD=1 LA18 A18 LCA18 3.69030941553353e-11 RA18 LCA18 A19 0.266535044422507 LB18 B18 LCB18 3.69030941553353e-11 RB18 LCB18 B19 0.266535044422507 C18 A19 B19 2.50418376625721e-14 MNA18 B18 A18 0 0 Nmod L=2.52038203439398e-07 W=4.17044670825126e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.34089341650252e-05 PS= +8.34089341650252e-05 NQSMOD=1 MPA18 B18 A18 VDD VDD Pmod L=2.46465042965348e-07 W= +0.000102305682920291 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204611365840582 PS=0.000204611365840582 NQSMOD=1 MNB18 A18 B18 0 0 Nmod L=2.45695550122768e-07 W=4.2510656912981e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.50213138259621e-05 PS= +8.50213138259621e-05 NQSMOD=1 MPB18 A18 B18 VDD VDD Pmod L=2.56212134001568e-07 W= +0.000101696358889307 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203392717778614 PS=0.000203392717778614 NQSMOD=1 LA19 A19 LCA19 3.69030941553353e-11 RA19 LCA19 A20 0.266535044422507 LB19 B19 LCB19 3.69030941553353e-11 RB19 LCB19 B20 0.266535044422507 C19 A20 B20 2.50418376625721e-14 MNA19 B19 A19 0 0 Nmod L=2.46298724559332e-07 W=4.26183323927543e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.52366647855085e-05 PS= +8.52366647855085e-05 NQSMOD=1 MPA19 B19 A19 VDD VDD Pmod L=2.53903413760174e-07 W= +0.000103580270078538 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207160540157077 PS=0.000207160540157077 NQSMOD=1 MNB19 A19 B19 0 0 Nmod L=2.4541336381424e-07 W=4.1471197163819e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.2942394327638e-05 PS=8.2942394327638e-05 +NQSMOD=1 MPB19 A19 B19 VDD VDD Pmod L=2.51953325753565e-07 W= +0.0001019745929959 AD=7.8125e-11 AS=7.8125e-11 PD=0.0002039491859918 +PS=0.0002039491859918 NQSMOD=1 LA20 A20 LCA20 3.69030941553353e-11 RA20 LCA20 A21 0.266535044422507 LB20 B20 LCB20 3.69030941553353e-11 RB20 LCB20 B21 0.266535044422507 C20 A21 B21 2.50418376625721e-14 MNA20 B20 A20 0 0 Nmod L=2.55318350883171e-07 W=4.2257523363596e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.4515046727192e-05 PS= +8.4515046727192e-05 NQSMOD=1 MPA20 B20 A20 VDD VDD Pmod L=2.50733395598687e-07 W= +0.000105848300738233 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211696601476467 PS=0.000211696601476467 NQSMOD=1 MNB20 A20 B20 0 0 Nmod L=2.53961238224852e-07 W=4.07467605160825e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.1493521032165e-05 PS= +8.1493521032165e-05 NQSMOD=1 MPB20 A20 B20 VDD VDD Pmod L=2.52173406118976e-07 W= +0.000104205251139887 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208410502279773 PS=0.000208410502279773 NQSMOD=1 LA21 A21 LCA21 3.69030941553353e-11 RA21 LCA21 A22 0.266535044422507 LB21 B21 LCB21 3.69030941553353e-11 RB21 LCB21 B22 0.266535044422507 C21 A22 B22 2.50418376625721e-14 MNA21 B21 A21 0 0 Nmod L=2.46323292867561e-07 W=4.1601573531982e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.32031470639639e-05 PS= +8.32031470639639e-05 NQSMOD=1 MPA21 B21 A21 VDD VDD Pmod L=2.54613442115316e-07 W= +0.000104931161465525 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00020986232293105 PS=0.00020986232293105 NQSMOD=1 MNB21 A21 B21 0 0 Nmod L=2.55836584454404e-07 W=4.10424160274173e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.20848320548346e-05 PS= +8.20848320548346e-05 NQSMOD=1 MPB21 A21 B21 VDD VDD Pmod L=2.54709741956022e-07 W= +0.000102062091080516 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204124182161031 PS=0.000204124182161031 NQSMOD=1 LA22 A22 LCA22 3.69030941553353e-11 RA22 LCA22 A23 0.266535044422507 LB22 B22 LCB22 3.69030941553353e-11 RB22 LCB22 B23 0.266535044422507 C22 A23 B23 2.50418376625721e-14 MNA22 B22 A22 0 0 Nmod L=2.54430620981417e-07 W=4.19307535657001e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.38615071314001e-05 PS= +8.38615071314001e-05 NQSMOD=1 MPA22 B22 A22 VDD VDD Pmod L=2.46694525572975e-07 W= +0.000103108817734331 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000206217635468663 PS=0.000206217635468663 NQSMOD=1 MNB22 A22 B22 0 0 Nmod L=2.4991048194413e-07 W=4.12343575509987e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.24687151019974e-05 PS= +8.24687151019974e-05 NQSMOD=1 MPB22 A22 B22 VDD VDD Pmod L=2.53435790976082e-07 W= +0.000105540213369592 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211080426739185 PS=0.000211080426739185 NQSMOD=1 LA23 A23 LCA23 3.69030941553353e-11 RA23 LCA23 A24 0.266535044422507 LB23 B23 LCB23 3.69030941553353e-11 RB23 LCB23 B24 0.266535044422507 C23 A24 B24 2.50418376625721e-14 MNA23 B23 A23 0 0 Nmod L=2.47985427798248e-07 W=4.14939059451511e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.29878118903023e-05 PS= +8.29878118903023e-05 NQSMOD=1 MPA23 B23 A23 VDD VDD Pmod L=2.50625862917368e-07 W= +0.000104857443713713 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000209714887427425 PS=0.000209714887427425 NQSMOD=1 MNB23 A23 B23 0 0 Nmod L=2.48906363214973e-07 W=4.09072154111792e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.18144308223583e-05 PS= +8.18144308223583e-05 NQSMOD=1 MPB23 A23 B23 VDD VDD Pmod L=2.544246792556e-07 W= +0.000106667496188909 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000213334992377817 PS=0.000213334992377817 NQSMOD=1 RCROSS1 A0 B24 0.001 RCROSS2 B0 A24 0.001 .SAVE VDD0 .SAVE VSS0 .SAVE VDD_A0 .SAVE VSS_A0 .SAVE VDD_B0 .SAVE VSS_B0 .SAVE A0 B0 LA0#branch LB0#branch A1 B1 LA1#branch LB1#branch A2 B2 +LA2#branch LB2#branch A3 B3 LA3#branch LB3#branch A4 B4 LA4#branch +LB4#branch A5 B5 LA5#branch LB5#branch A6 B6 LA6#branch LB6#branch +A7 B7 LA7#branch LB7#branch A8 B8 LA8#branch LB8#branch A9 B9 +LA9#branch LB9#branch A10 B10 LA10#branch LB10#branch A11 B11 +LA11#branch LB11#branch A12 B12 LA12#branch LB12#branch A13 B13 +LA13#branch LB13#branch A14 B14 LA14#branch LB14#branch A15 B15 +LA15#branch LB15#branch A16 B16 LA16#branch LB16#branch A17 B17 +LA17#branch LB17#branch A18 B18 LA18#branch LB18#branch A19 B19 +LA19#branch LB19#branch A20 B20 LA20#branch LB20#branch A21 B21 +LA21#branch LB21#branch A22 B22 LA22#branch LB22#branch A23 B23 +LA23#branch LB23#branch ** **INCLUDING FILE: ./proj1/process.models.... * * Typical N Typical P - from process corners (taken from tsmc025_corners.bsim3 fron NCSU) * * TSMC 0.25u 5M 1P process. 2.5V transistor models .MODEL Nmod NMOS LEVEL=8 +TNOM = 25 +VERSION = 3.2.2 TOX = 5.8e-9 +XJ = 1E-07 NCH = 2.354946E+17 LLN = 1 +LWN = 1 WLN = 1 WWN = 1 +LINT = 1.76E-08 WINT = 6.75E-09 MOBMOD = 1 +BINUNIT = 2 DWG = 0 DWB = 0 +VTH0 = 0.4321336 LVTH0 = 2.081814E-08 WVTH0 = -5.470342E-11 +PVTH0 = -6.721795E-16 K1 = 0.3281252 LK1 = 9.238362E-08 +WK1 = 2.878255E-08 PK1 = -2.426481E-14 K2 = 0.0402824 +LK2 = -3.208392E-08 WK2 = -1.154091E-08 PK2 = 9.192045E-15 +K3 = 0 DVT0 = 0 DVT1 = 0 +DVT2 = 0 DVT0W = 0 DVT1W = 0 +DVT2W = 0 NLX = 0 W0 = 0 +K3B = 0 VSAT = 7.586954E+04 LVSAT = 3.094656E-03 +WVSAT = -1.747416E-03 PVSAT = 8.820956E-10 UA = 8.924498E-10 +LUA = -1.511745E-16 WUA = -3.509821E-17 PUA = -3.08778E-23 +UB = 8.928832E-21 LUB = -1.655745E-27 WUB = -2.03282E-27 +PUB = 3.4578E-34 UC = -1.364265E-11 LUC = 1.170473E-17 +WUC = -1.256705E-18 PUC = -6.249644E-24 RDSW = 447.8871 +PRWB = 0 PRWG = 0 WR = 0.99 +U0 = 0.06005258 LU0 = -6.31976E-09 WU0 = -8.819531E-09 +PU0 = 3.57209E-15 A0 = -1.468837 LA0 = 6.419548E-07 +WA0 = 5.512414E-07 PA0 = -9.222928E-14 KETA = -0.04922795 +LKETA = 2.360844E-08 WKETA = 1.560385E-08 PKETA = -5.98377E-15 +A1 = 0.02659908 LA1 = -6.511454E-09 A2 = 1 +AGS = -4.01637 LAGS = 1.090294E-06 WAGS = 1.162021E-06 +PAGS = -3.108579E-13 B0 = 0 B1 = 0 +VOFF = -0.1829426 LVOFF = 9.941631E-09 WVOFF = 1.568082E-08 +PVOFF = -2.832958E-15 NFACTOR = 0.6790636 LNFACTOR= 3.454948E-08 +WNFACTOR= 1.501016E-07 PNFACTOR= -2.955591E-14 CIT = 2.218499E-04 +LCIT = -1.076934E-10 WCIT = -3.286884E-10 PCIT = 1.658928E-16 +CDSC = 0 CDSCB = 0 CDSCD = 0 +ETA0 = 1.215578E-04 LETA0 = -1.037758E-11 WETA0 = -3.030225E-11 +PETA0 = 1.529658E-17 ETAB = 3.548681E-03 LETAB = -1.791374E-09 +WETAB = -6.897268E-10 PETAB = 3.481742E-16 DSUB = 0 +PCLM = 3.583838 PDIBLC1 = 0 PDIBLC2 = 5.379674E-03 +LPDIBLC2= 7.808481E-09 WPDIBLC2= 5.516945E-10 PPDIBLC2= -2.784957E-16 +PDIBLCB = -0.1229374 LPDIBLCB= 4.956215E-08 WPDIBLCB= 3.299946E-08 +PPDIBLCB= -9.624918E-15 DROUT = 0 PSCBE1 = 4.472639E+08 +LPSCBE1 = 28.64041 WPSCBE1 = 15.7154 PPSCBE1 = -7.933138E-06 +PSCBE2 = 1.842585E-06 LPSCBE2 = 2.871008E-12 WPSCBE2 = 2.579183E-12 +PPSCBE2 = -1.301972E-18 PVAG = -2.015254E-03 LPVAG = 1.017757E-09 +WPVAG = 3.07622E-10 PPVAG = -1.55418E-16 DELTA = -0.02862256 +LDELTA = 1.492454E-08 WDELTA = -6.71663E-09 PDELTA = 3.407521E-15 +ALPHA0 = 0 BETA0 = 30 KT1 = -0.2579945 +LKT1 = -1.664895E-08 WKT1 = -1.633463E-08 PKT1 = 3.755864E-15 +KT2 = -0.05347481 LKT2 = 8.244731E-09 WKT2 = 1.13705E-09 +PKT2 = -1.240924E-15 AT = -1.132632E+04 LAT = 6.469047E-03 +WAT = 6.829220E-04 PAT = -4.154249E-10 UTE = -2.309089 +LUTE = 1.662427E-07 WUTE = 1.244801E-07 PUTE = -5.627924E-14 +UA1 = -3.461758E-10 LUA1 = 1.747495E-16 WUA1 = -1.42065E-16 +PUA1 = 7.171442E-23 UB1 = 0 UC1 = -2.38157E-12 +LUC1 = -2.895726E-18 WUC1 = -1.990052E-17 PUC1 = 1.004497E-23 +KT1L = 0 PRT = -1E-18 CJ = 2.024128E-3 +MJ = 0.4960069 PB = 0.9173808 CJSW = 2.751528E-10 +MJSW = 0.443145 PBSW = 0.9173808 CJSWG = 2.135064E-10 +MJSWG = 0.443145 PBSWG = 0.9173808 +RSH = 4.5 +XTI = 3 +CGDO = 3.11E-10 CGSO = 3.11E-10 CAPMOD = 2 +XPART = 1 CF = 0 +JS = 1E-06 +JSW = 5E-11 .MODEL Pmod PMOS LEVEL=8 +VERSION = 3.2.2 +TNOM = 25 TOX = 5.8e-9 +XJ = 1E-7 NCH = 4.1589E17 +LLN = 1 LWN = 1 WLN = 1 +WWN = 1 LINT = 1.2365E-8 WINT = 7.8E-9 +MOBMOD = 1 BINUNIT = 2 DWG = 0 +DWB = 0 VTH0 = -0.6236538 LVTH0 = 2.649834E-8 +WVTH0 = 3.214189E-8 PVTH0 = -3.22268E-15 K1 = 0.4198155 +LK1 = 5.770498E-8 WK1 = 5.577151E-8 PK1 = -2.81684E-14 +K2 = 0.0429467 LK2 = -2.296405E-8 WK2 = -1.355302E-8 +PK2 = 6.848271E-15 K3 = 0 DVT0 = 0 +DVT1 = 0 DVT2 = 0 DVT0W = 0 +DVT1W = 0 DVT2W = 0 NLX = 0 +W0 = 0 K3B = 0 VSAT = 1.443912E5 +LVSAT = -7.688012E-4 WVSAT = -6.083648E-3 PVSAT = 2.186471E-10 +UA = 1.846811E-9 LUA = -3.27694E-16 WUA = -2.82106E-16 +PUA = 7.180233E-23 UB = -7.84535E-19 LUB = 4.772849E-25 +WUB = 2.599205E-25 PUB = -1.46530E-31 UC = -1.75560E-10 +LUC = 3.360832E-17 WUC = 1.504425E-17 PUC = -1.30556E-23 +RDSW = 1.03E3 PRWB = 0 PRWG = 0 +WR = 1 U0 = 0.0136443 LU0 = -7.22084E-10 +WU0 = -1.088554E-9 PU0 = 2.730854E-16 A0 = 0.1071803 +LA0 = 4.64252E-7 WA0 = 5.383179E-7 PA0 = -1.32033E-13 +KETA = -4.943762E-3 LKETA = -3.565304E-9 WKETA = -5.226247E-9 +PKETA = 2.640665E-15 A1 = 0 A2 = 0.4 +AGS = 0.1664005 LAGS = 1.19106E-7 WAGS = 5.29237E-8 +PAGS = -2.67304E-14 B0 = 0 B1 = 0 +VOFF = -0.0592623 LVOFF = -1.96686E-8 WVOFF = -1.486398E-8 +PVOFF = 7.510321E-15 NFACTOR = 0.8588103 LNFACTOR= -1.158881E-7 +WNFACTOR= 1.210664E-8 PNFACTOR= -6.11712E-15 CIT = 6.439495E-5 +LCIT = 2.916437E-10 WCIT = -3.11284E-11 PCIT = 1.572825E-17 +CDSC = 0 CDSCB = 0 CDSCD = 0 +ETA0 = -3.819468E-3 LETA0 = 2.155422E-9 WETA0 = 8.235612E-10 +PETA0 = -4.16037E-16 ETAB = 1.334637E-3 LETAB = -7.93631E-10 +WETAB = 5.284657E-11 PETAB = -2.68353E-17 DSUB = 0 +PCLM = 0.1098002 LPCLM = 6.874263E-7 WPCLM = 6.724724E-7 +PPCLM = -1.97766E-13 PDIBLC1 = 0 PDIBLC2 = 5.801323E-3 +LPDIBLC2= -1.81964E-9 WPDIBLC2= -5.853396E-9 PPDIBLC2= 2.957545E-15 +PDIBLCB = 0.1921199 DROUT = 0 PSCBE1 = 7.19E8 +PSCBE2 = 1E-20 PVAG = 0 DELTA = 0.01 +ALPHA0 = 0 BETA0 = 30 KT1 = -0.3248987 +LKT1 = -1.160393E-8 WKT1 = 4.153356E-8 PKT1 = -4.62347E-15 +KT2 = -0.0367632 AT = 1E4 UTE = -1.04 +UA1 = 3.992421E-10 UB1 = -9.23294E-19 LUB1 = -5.28718E-26 +WUB1 = -6.13069E-26 PUB1 = 1.503674E-32 UC1 = -1.00699E-12 +KT1L = 0 PRT = 0 CJ = 1.931092e-3 +MJ = 0.4812153 PB = 0.9134669 CJSW = 2.232277e-10 +MJSW = 0.3237595 PBSW = 0.9134669 CJSWG = 1.607088e-10 +MJSWG = 0.3237595 PBSWG = 0.9134669 +RSH = 3.5 +CGDO = 2.68e-10 CGSO = 2.68e-10 +CAPMOD = 2 +XPART = 1 +CF = 0 XTI = 3 +JS = 3E-7 +JSW = 5E-12 **.... FINISHED INCLUDING: ./proj1/process.models ** .OPTIONS TEMP=25 VSLEW_CONTROL VSLEW 0 (PULSE 0 1 0 1e-09) EVLOGIC VRAMP 0 VSLEW 0 2.5 VDDPOWER VDD VRAMP DC 0 VARACTOR_V VARACTOR_V 0 DC 2.5 .SAVE vddpower#branch .SAVE vdd .SAVE varactor_v .TRAN 0.02n 3000n 0n 0.5n .END ngspice-26/examples/tclspice/tcl-testbench1/0000755000265600020320000000000012264261473020475 5ustar andreasadminngspice-26/examples/tclspice/tcl-testbench1/capa.cir0000644000265600020320000000072512264261473022104 0ustar andreasadmin* Capa variable sur la base de la thèse de Marc KODRNJA .SUBCKT capa 4 6 5 7 8 0 Vref1 26 0 DC 3 Vref2 16 0 DC 3 Vdp 7 0 DC 7 I0 3 0 DC 0.07 Ia1 15 0 DC 0.01 Ia2 25 0 DC 0.01 Ib1 14 0 DC 0.01 Ib2 24 0 DC 0.01 .INCLUDE PN2222.mod Qv1 4 16 14 PN2222 Qv2 4 26 24 PN2222 Q1 11 14 3 PN2222 Q2 21 24 3 PN2222 Qp1 5 8 11 PN2222 Qm1 6 7 11 PN2222 Qp2 6 8 21 PN2222 Qm2 5 7 21 PN2222 Qc1 4 5 15 PN2222 Qc2 4 6 25 PN2222 R1 4 5 100 R2 4 6 100 C1 15 14 10n C2 25 24 10n .ENDS ngspice-26/examples/tclspice/tcl-testbench1/tcl-testbench1.tcl0000755000265600020320000000263112264261473024026 0ustar andreasadmin#!/bin/sh # WishFix \ exec wish -f "$0" ${1+"$@"} ### # old name: analyse-20070504-0.tcl package require BLT load ../../../src/.libs/libspice.so # Test of virtual capacitore circuit # Vary the control voltage and log the resulting capacitance spice::source "testCapa.cir" set n 30 set dv 0.2 set vmax [expr $dv/2] set vmin [expr -1 * $dv/2] set pas [expr $dv/ $n] blt::vector create Ctmp blt::vector create Cim blt::vector create check blt::vector create Vcmd blt::graph .cimvd -title "Cim = f(Vd)" blt::graph .checkvd -title "Rim = f(Vd)" blt::vector create Iex blt::vector create freq blt::graph .freqanal -title "Analyse frequentielle" set v [expr {$vmin + $n * $pas / 4}] spice::alter vd = $v spice::op spice::ac dec 10 100 100k spice::vectoblt {Vex#branch} Iex spice::vectoblt {frequency} freq pack .freqanal .freqanal element create line1 -xdata freq -ydata Iex for {set i 0} {[expr $n - $i]} {incr i } { set v [expr {$vmin + $i * $pas}] spice::alter vd = $v spice::op spice::ac dec 10 100 100k spice::let Cim = real(mean(Vex#branch/(2*Pi*i*frequency*(V(5)-V(6))))) spice::vectoblt Cim Ctmp Cim append $Ctmp(0:end) spice::let err = real(mean(sqrt((Vex#branch-(2*Pi*i*frequency*Cim*V(5)-V(6)))^2))) spice::vectoblt err Ctmp check append $Ctmp(0:end) Vcmd append $v } pack .cimvd .cimvd element create line1 -xdata Vcmd -ydata Cim pack .checkvd .checkvd element create line1 -xdata Vcmd -ydata check ngspice-26/examples/tclspice/tcl-testbench1/testCapa.cir0000644000265600020320000000026012264261473022736 0ustar andreasadminBanc de test pour la Capa variable sur la base de la thèse de Marc KODRNJA .INCLUDE capa.cir Valim 4 0 DC 12 Vex 6 5 DC 0 AC 0.01 0 Vd 7 8 DC 0.0 xcapa 4 6 5 7 8 0 capa .END ngspice-26/examples/tclspice/tcl-testbench1/PN2222.mod0000644000265600020320000000054112264261473022023 0ustar andreasadmin.model PN2222 NPN(Is=14.34f Xti=3 Eg=1.11 Vaf=74.03 Bf=255.9 Ne=1.307 + Ise=14.34f Ikf=.2847 Xtb=1.5 Br=6.092 Nc=2 Isc=0 Ikr=0 Rc=1 + Cjc=7.306p Mjc=.3416 Vjc=.75 Fc=.5 Cje=22.01p Mje=.377 Vje=.75 + Tr=46.91n Tf=411.1p Itf=.6 Vtf=1.7 Xtf=3 Rb=10) * Fairchild pid=19 case=TO92 * 88-09-07 bam creation ngspice-26/examples/tclspice/tcl-testbench4/0000755000265600020320000000000012264261473020500 5ustar andreasadminngspice-26/examples/tclspice/tcl-testbench4/tcl-testbench4.tcl0000755000265600020320000000010112264261473024022 0ustar andreasadmin#!/bin/sh # WishFix \ exec wish vspicechart.tcl example.cir ### ngspice-26/examples/tclspice/tcl-testbench4/selectfromlist.tcl0000644000265600020320000000306612264261473024250 0ustar andreasadminnamespace eval selectionwindow { variable selectionvalue variable selectionwindow } proc selectionwindow::selectfromlist { window title selectionlist args } { variable selectionvalue variable selectionwindow if { [winfo exists $window] } { raise $window; return [lindex $selectionlist 0] } set selectionwindow $window toplevel $selectionwindow wm geometry $selectionwindow +200+200 focus -force $selectionwindow wm title $selectionwindow $title set maxstrlength [expr [string length $title]+12] if { [llength $selectionlist]==0 } { destroy $selectionwindow; return {} } foreach elem $selectionlist { if { [string length $elem]>$maxstrlength } { set maxstrlength [string length $elem] } } scrollbar $selectionwindow.scroll -command "$selectionwindow.listbox yview" eval "listbox $selectionwindow.listbox -yscroll \"$selectionwindow.scroll set\" \ -width $maxstrlength -height 10 -setgrid 1 $args" pack $selectionwindow.listbox $selectionwindow.scroll -side left -fill y -expand 1 foreach elem $selectionlist { $selectionwindow.listbox insert end $elem } bind $selectionwindow.listbox { namespace eval selectionwindow { set selectionvalue [selection get] destroy $selectionwindow } } tkwait window $selectionwindow if { [info exists selectionvalue] } { return $selectionvalue } else { if { [llength $selectionlist] != 0 } { return [lindex $selectionlist 0] } else { return "" } } } # puts [selectionwindow::selectfromlist .demo "Wähle Frucht" { Apfel Birne Zitrone dsfsdfdsfdsfdsfsdfds}] ngspice-26/examples/tclspice/tcl-testbench4/vspicechart.tcl0000644000265600020320000001414012264261473023517 0ustar andreasadmin############ spice chart program ########### ############ programmer: stephan thiel ########### ############ thiel@mikro.ee.tu-berlin.de ########### ############ (c) 2008 Berlin, Germany ########### ############ Don't trust any version ########### ############ before 1.0 ########### package require BLT load "../../../src/.libs/libspice.so" source selectfromlist.tcl source bltGraph.tcl namespace import blt::* wm title . "vspicechart 0.01" wm geometry . 800x450+40+40 pack propagate . false set globals(colors) { red green blue orange yellow white gray lightblue pink darkblue \ lightred lightgray darkgray darkblue darkgreen darkred violet salmon \ gray100 gold SeaGreen RoyalBlue RosyBrown orchid MintCream magenta LimeGreen \ gray33 DeepSkyBlue DarkGoldenrod chocolate gray77 aquamarine brown coral \ DarkOliveGreen DarkOrange DarkSlateGray gray99 HotPink IndianRed LemonChiffon \ LightSteelBlue PaleGreen peru sienna seashell SpringGreen tomato wheat WhiteSmoke} proc replacechar { str pat pat1} { set erg "" for { set i 0 } { $i < [string length $str] } {incr i 1 } { if { [ string index $str $i ] == $pat } { append erg $pat1 } else { append erg [string index $str $i ] } } return $erg } proc realtostr { r } { set b [ expr abs($r) ] set mul 1e-18 set prefix a if { $b > 9.9999999999e-16 } { set mul 1e15 set prefix f } if { $b > 9.9999999999e-13 } { set mul 1e12 set prefix p } if { $b > 9.9999999999e-10 } { set mul 1e9 set prefix n } if { $b > 9.9999999999e-7 } { set mul 1e6 set prefix u } if { $b > 9.9999999999e-4 } { set mul 1e3 set prefix m } if { $b > 0.999999999999999 } { set mul 1 set prefix "" } if { $b > 999 } { set mul 1e-3 set prefix K } if { $b > 9.999999999e5 } { set mul 1e-6 set prefix MEG } if { $b > 9.9999999999e8 } { set mul 1e-9 set prefix G } if { $b > 9.99999999999e11 } { set mul 1e-12 set prefix T } set str [ format "%1.8g$prefix" [expr $r*$mul] ] if { $str=="0a" } { set str "0" } return $str } proc realtostr1 { elem r } { scan $r "%f" erg return [ realtostr $erg ] } set globals(signals) {}; proc readconfigfile { } { global globals global const if { [file exists $globals(CONFIGFILE)] } { set fid [open $globals(CONFIGFILE) r] while { ![eof $fid] } { gets $fid tempstring if { [string first "PACK-PATH=" $tempstring]==0 } { scan $tempstring "PACK-PATH=%s" globals(PACK-PATH) } if { [string first "SIMULATOR=" $tempstring]==0 } { scan $tempstring "SIMULATOR=%s" globals(SIMULATOR) } } close $fid } else { set globals(PACK-PATH) "" set globals(SIMULATOR) "INTERNAL" } } proc select_vector { } { global globals set thissignals [spice::spice_data] set signals {} foreach sig $thissignals { if { [lindex $sig 0] != "time" } { lappend signals [lindex $sig 0] } } set selectedsignal [selectionwindow::selectfromlist .select "Select Signal" $signals ] if { ( [string trim $selectedsignal] != "") && ([lsearch -exact $globals(signals) $selectedsignal] == -1) } { eval "$globals(LSELECTEDSIGNALS) insert end $selectedsignal" vector create [replacechar $selectedsignal "\#" "_"] } } proc start_new_sel { } { global globals set elemlist [ eval "$globals(chart0) element show" ] for { set j 0 } {$j < [llength $elemlist] } {incr j 1} { $globals(chart0) element delete [lindex $elemlist $j ] } set i 0 foreach sig $globals(signals) { set nsig [replacechar $sig "\#" "_"] vector create $nsig spice::spicetoblt $sig $nsig $globals(chart0) element create $sig -color [lindex $globals(colors) $i] -xdata stime -ydata $nsig -symbol none incr i 1 } } proc delete_selected { } { global globals set elem [$globals(LSELECTEDSIGNALS) curselection] if { $elem != "" } { $globals(LSELECTEDSIGNALS) delete $elem } } set filename [ lindex $argv 0] if { [file exists $filename ] } { spice::source $filename spice::bg run after 1000 frame .f1 pack .f1 -side left -expand true -fill both listbox .f1.blistbox -listvariable globals(signals) pack .f1.blistbox -side top -fill both -expand true set globals(LSELECTEDSIGNALS) .f1.blistbox button .f1.baddvec -text "Select Vector" -command "select_vector" pack .f1.baddvec -side top -fill x -expand true button .f1.bdelvec -text "Delete Vector" -command "delete_selected" pack .f1.bdelvec -side top -fill x -expand true button .f1.bstartsel -text "Start with new selection" -command start_new_sel pack .f1.bstartsel -side top -fill x -expand true button .f1.simstop -text "Simulation Stop" -command "spice::stop" pack .f1.simstop -side top -fill x -expand true button .f1.simresume -text "Simulation Resume" -command "spice::bg resume" pack .f1.simresume -side top -fill x -expand true button .f1.bexit -text "Exit" -command "exit" pack .f1.bexit -side top -fill x -expand true frame .f2 pack .f2 -side left -expand true -fill both stripchart .f2.chart pack .f2.chart -side top -fill both -expand true .f2.chart axis configure x -title "Time in s" .f2.chart grid configure -hide no Blt_ZoomStack .f2.chart Blt_Crosshairs .f2.chart Blt_ClosestPoint .f2.chart Blt_PrintKey .f2.chart Blt_ActiveLegend .f2.chart .f2.chart crosshairs configure -color lightblue .f2.chart axis configure x -command realtostr1 .f2.chart axis configure y -command realtostr1 set globals(chart0) .f2.chart vector create stime proc bltupdate {} { global globals spice::spicetoblt time stime foreach sig $globals(signals) { set nsig [replacechar $sig "\#" "_"] spice::spicetoblt $sig $nsig } after 100 bltupdate } bltupdate } else { exit; } ngspice-26/examples/tclspice/tcl-testbench4/example.cir0000644000265600020320000007132212264261473022637 0ustar andreasadminTITLE: proj1 - Rotary Traveling Wave Oscillator VDD0 VDD0 VDD DC 0 VSS0 VSS0 0 DC 0 VDD_A0 VDD_A0 VDD0 DC 0 VSS_A0 VSS_A0 VSS0 DC 0 VDD_B0 VDD_B0 VDD0 DC 0 VSS_B0 VSS_B0 VSS0 DC 0 LA0 A0 LCA0 3.69030941553353e-11 RA0 LCA0 A1 0.266535044422507 LB0 B0 LCB0 3.69030941553353e-11 RB0 LCB0 B1 0.266535044422507 C0 A1 B1 2.50418376625721e-14 MNA0 B0 A0 VSS_B0 VSS_B0 Nmod L=2.53696435353243e-07 W= +4.24857778403814e-05 AD=3.125e-11 AS=3.125e-11 PD= +8.49715556807627e-05 PS=8.49715556807627e-05 NQSMOD=1 MPA0 B0 A0 VDD_B0 VDD_B0 Pmod L=2.55343565546106e-07 W= +0.000101772203908557 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203544407817114 PS=0.000203544407817114 NQSMOD=1 MNB0 A0 B0 VSS_A0 VSS_A0 Nmod L=2.53941602497219e-07 W= +4.10652659629401e-05 AD=3.125e-11 AS=3.125e-11 PD= +8.21305319258802e-05 PS=8.21305319258802e-05 NQSMOD=1 MPB0 A0 B0 VDD_A0 VDD_A0 Pmod L=2.52010168145607e-07 W= +0.000103533977891464 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207067955782928 PS=0.000207067955782928 NQSMOD=1 LA1 A1 LCA1 3.69030941553353e-11 RA1 LCA1 A2 0.266535044422507 LB1 B1 LCB1 3.69030941553353e-11 RB1 LCB1 B2 0.266535044422507 C1 A2 B2 2.50418376625721e-14 MNA1 B1 A1 0 0 Nmod L=2.52370578161099e-07 W=4.12246995102289e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.24493990204578e-05 PS= +8.24493990204578e-05 NQSMOD=1 MPA1 B1 A1 VDD VDD Pmod L=2.45709468983316e-07 W=0.000103710764679465 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207421529358929 PS= +0.000207421529358929 NQSMOD=1 MNB1 A1 B1 0 0 Nmod L=2.48115895523017e-07 W=4.26306134285554e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.52612268571108e-05 PS= +8.52612268571108e-05 NQSMOD=1 MPB1 A1 B1 VDD VDD Pmod L=2.55265156192223e-07 W=0.000102043840486507 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000204087680973014 PS= +0.000204087680973014 NQSMOD=1 LA2 A2 LCA2 3.69030941553353e-11 RA2 LCA2 A3 0.266535044422507 LB2 B2 LCB2 3.69030941553353e-11 RB2 LCB2 B3 0.266535044422507 C2 A3 B3 2.50418376625721e-14 MNA2 B2 A2 0 0 Nmod L=2.53484220592882e-07 W=4.16915225420459e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.33830450840917e-05 PS= +8.33830450840917e-05 NQSMOD=1 MPA2 B2 A2 VDD VDD Pmod L=2.44256748076514e-07 W=0.00010549295960702 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000210985919214039 PS= +0.000210985919214039 NQSMOD=1 MNB2 A2 B2 0 0 Nmod L=2.48805892712811e-07 W=4.15734692647458e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.31469385294916e-05 PS= +8.31469385294916e-05 NQSMOD=1 MPB2 A2 B2 VDD VDD Pmod L=2.54004987710956e-07 W=0.00010229621219808 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020459242439616 PS= +0.00020459242439616 NQSMOD=1 LA3 A3 LCA3 3.69030941553353e-11 RA3 LCA3 A4 0.266535044422507 LB3 B3 LCB3 3.69030941553353e-11 RB3 LCB3 B4 0.266535044422507 C3 A4 B4 2.50418376625721e-14 MNA3 B3 A3 0 0 Nmod L=2.54307430347219e-07 W=4.11339076756089e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22678153512179e-05 PS= +8.22678153512179e-05 NQSMOD=1 MPA3 B3 A3 VDD VDD Pmod L=2.52369109463781e-07 W=0.000103371681055656 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206743362111311 PS= +0.000206743362111311 NQSMOD=1 MNB3 A3 B3 0 0 Nmod L=2.4960708801709e-07 W=4.21794611046917e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.43589222093833e-05 PS= +8.43589222093833e-05 NQSMOD=1 MPB3 A3 B3 VDD VDD Pmod L=2.53834779766428e-07 W=0.000105556314711602 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000211112629423204 PS= +0.000211112629423204 NQSMOD=1 LA4 A4 LCA4 3.69030941553353e-11 RA4 LCA4 A5 0.266535044422507 LB4 B4 LCB4 3.69030941553353e-11 RB4 LCB4 B5 0.266535044422507 C4 A5 B5 2.50418376625721e-14 MNA4 B4 A4 0 0 Nmod L=2.48091656083177e-07 W=4.11207568141106e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22415136282211e-05 PS= +8.22415136282211e-05 NQSMOD=1 MPA4 B4 A4 VDD VDD Pmod L=2.47723605289033e-07 W=0.000103463392309261 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206926784618522 PS= +0.000206926784618522 NQSMOD=1 MNB4 A4 B4 0 0 Nmod L=2.49254771880382e-07 W=4.25122425012226e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.50244850024452e-05 PS= +8.50244850024452e-05 NQSMOD=1 MPB4 A4 B4 VDD VDD Pmod L=2.49689766979065e-07 W=0.000103227993619608 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206455987239216 PS= +0.000206455987239216 NQSMOD=1 LA5 A5 LCA5 3.69030941553353e-11 RA5 LCA5 A6 0.266535044422507 LB5 B5 LCB5 3.69030941553353e-11 RB5 LCB5 B6 0.266535044422507 C5 A6 B6 2.50418376625721e-14 MNA5 B5 A5 0 0 Nmod L=2.53960031106522e-07 W=4.1129961792588e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.22599235851759e-05 PS= +8.22599235851759e-05 NQSMOD=1 MPA5 B5 A5 VDD VDD Pmod L=2.47418707088064e-07 W=0.000101621693062467 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000203243386124935 PS= +0.000203243386124935 NQSMOD=1 MNB5 A5 B5 0 0 Nmod L=2.49659687529522e-07 W=4.2524931640785e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.50498632815701e-05 PS= +8.50498632815701e-05 NQSMOD=1 MPB5 A5 B5 VDD VDD Pmod L=2.46328059754468e-07 W=0.000102061546065548 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000204123092131096 PS= +0.000204123092131096 NQSMOD=1 LA6 A6 LCA6 3.69030941553353e-11 RA6 LCA6 A7 0.266535044422507 LB6 B6 LCB6 3.69030941553353e-11 RB6 LCB6 B7 0.266535044422507 C6 A7 B7 2.50418376625721e-14 MNA6 B6 A6 0 0 Nmod L=2.54326804653788e-07 W=4.17332976706085e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.34665953412171e-05 PS= +8.34665953412171e-05 NQSMOD=1 MPA6 B6 A6 VDD VDD Pmod L=2.48727427835127e-07 W=0.000103244611103459 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000206489222206918 PS= +0.000206489222206918 NQSMOD=1 MNB6 A6 B6 0 0 Nmod L=2.49697035135609e-07 W=4.23570035518e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.47140071036001e-05 PS= +8.47140071036001e-05 NQSMOD=1 MPB6 A6 B6 VDD VDD Pmod L=2.48995485890626e-07 W=0.000103695454759978 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207390909519956 PS= +0.000207390909519956 NQSMOD=1 LA7 A7 LCA7 3.69030941553353e-11 RA7 LCA7 A8 0.266535044422507 LB7 B7 LCB7 3.69030941553353e-11 RB7 LCB7 B8 0.266535044422507 C7 A8 B8 2.50418376625721e-14 MNA7 B7 A7 0 0 Nmod L=2.53418975114981e-07 W=4.06421756574473e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.12843513148946e-05 PS= +8.12843513148946e-05 NQSMOD=1 MPA7 B7 A7 VDD VDD Pmod L=2.4471861043622e-07 W=0.000104600862141835 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020920172428367 PS= +0.00020920172428367 NQSMOD=1 MNB7 A7 B7 0 0 Nmod L=2.50159056393584e-07 W=4.06845582724173e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.13691165448345e-05 PS= +8.13691165448345e-05 NQSMOD=1 MPB7 A7 B7 VDD VDD Pmod L=2.55032245177227e-07 W=0.000106482118141681 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000212964236283363 PS= +0.000212964236283363 NQSMOD=1 LA8 A8 LCA8 3.69030941553353e-11 RA8 LCA8 A9 0.266535044422507 LB8 B8 LCB8 3.69030941553353e-11 RB8 LCB8 B9 0.266535044422507 C8 A9 B9 2.50418376625721e-14 MNA8 B8 A8 0 0 Nmod L=2.45729547191971e-07 W=4.18266198665335e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.3653239733067e-05 PS=8.3653239733067e-05 +NQSMOD=1 MPA8 B8 A8 VDD VDD Pmod L=2.45156004861421e-07 W=0.000101593205477244 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000203186410954489 PS= +0.000203186410954489 NQSMOD=1 MNB8 A8 B8 0 0 Nmod L=2.49014342219656e-07 W=4.14314219478801e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.28628438957603e-05 PS= +8.28628438957603e-05 NQSMOD=1 MPB8 A8 B8 VDD VDD Pmod L=2.50396673007567e-07 W=0.000103029640740115 +AD=7.8125e-11 AS=7.8125e-11 PD=0.00020605928148023 PS= +0.00020605928148023 NQSMOD=1 LA9 A9 LCA9 3.69030941553353e-11 RA9 LCA9 A10 0.266535044422507 LB9 B9 LCB9 3.69030941553353e-11 RB9 LCB9 B10 0.266535044422507 C9 A10 B10 2.50418376625721e-14 MNA9 B9 A9 0 0 Nmod L=2.51066307645916e-07 W=4.17044186844862e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.34088373689724e-05 PS= +8.34088373689724e-05 NQSMOD=1 MPA9 B9 A9 VDD VDD Pmod L=2.4945438501494e-07 W=0.000104601836030031 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000209203672060063 PS= +0.000209203672060063 NQSMOD=1 MNB9 A9 B9 0 0 Nmod L=2.56178041422984e-07 W=4.17990098329256e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.35980196658511e-05 PS= +8.35980196658511e-05 NQSMOD=1 MPB9 A9 B9 VDD VDD Pmod L=2.5274010042983e-07 W=0.000103578149162769 +AD=7.8125e-11 AS=7.8125e-11 PD=0.000207156298325537 PS= +0.000207156298325537 NQSMOD=1 LA10 A10 LCA10 3.69030941553353e-11 RA10 LCA10 A11 0.266535044422507 LB10 B10 LCB10 3.69030941553353e-11 RB10 LCB10 B11 0.266535044422507 C10 A11 B11 2.50418376625721e-14 MNA10 B10 A10 0 0 Nmod L=2.45772611943267e-07 W=4.24345922952649e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.48691845905299e-05 PS= +8.48691845905299e-05 NQSMOD=1 MPA10 B10 A10 VDD VDD Pmod L=2.55544710347746e-07 W= +0.000105625826497323 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211251652994645 PS=0.000211251652994645 NQSMOD=1 MNB10 A10 B10 0 0 Nmod L=2.55886308364338e-07 W=4.0850956346516e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.17019126930321e-05 PS= +8.17019126930321e-05 NQSMOD=1 MPB10 A10 B10 VDD VDD Pmod L=2.44778614470725e-07 W= +0.000105511594248206 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211023188496411 PS=0.000211023188496411 NQSMOD=1 LA11 A11 LCA11 3.69030941553353e-11 RA11 LCA11 A12 0.266535044422507 LB11 B11 LCB11 3.69030941553353e-11 RB11 LCB11 B12 0.266535044422507 C11 A12 B12 2.50418376625721e-14 MNA11 B11 A11 0 0 Nmod L=2.4768739676619e-07 W=4.14724461551725e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.29448923103449e-05 PS= +8.29448923103449e-05 NQSMOD=1 MPA11 B11 A11 VDD VDD Pmod L=2.46276216123912e-07 W= +0.000101782633723501 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203565267447002 PS=0.000203565267447002 NQSMOD=1 MNB11 A11 B11 0 0 Nmod L=2.54985612770668e-07 W=4.24608643314108e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.49217286628216e-05 PS= +8.49217286628216e-05 NQSMOD=1 MPB11 A11 B11 VDD VDD Pmod L=2.45772463970764e-07 W= +0.000106109588792745 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00021221917758549 PS=0.00021221917758549 NQSMOD=1 LA12 A12 LCA12 3.69030941553353e-11 RA12 LCA12 A13 0.266535044422507 LB12 B12 LCB12 3.69030941553353e-11 RB12 LCB12 B13 0.266535044422507 C12 A13 B13 2.50418376625721e-14 MNA12 B12 A12 0 0 Nmod L=2.45480481009462e-07 W=4.20858793029857e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.41717586059714e-05 PS= +8.41717586059714e-05 NQSMOD=1 MPA12 B12 A12 VDD VDD Pmod L=2.48462320158069e-07 W= +0.00010650127744954 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00021300255489908 PS=0.00021300255489908 NQSMOD=1 MNB12 A12 B12 0 0 Nmod L=2.51992945030792e-07 W=4.17981435096244e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.35962870192489e-05 PS= +8.35962870192489e-05 NQSMOD=1 MPB12 A12 B12 VDD VDD Pmod L=2.49941922576661e-07 W= +0.0001044851795426 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208970359085199 PS=0.000208970359085199 NQSMOD=1 LA13 A13 LCA13 3.69030941553353e-11 RA13 LCA13 A14 0.266535044422507 LB13 B13 LCB13 3.69030941553353e-11 RB13 LCB13 B14 0.266535044422507 C13 A14 B14 2.50418376625721e-14 MNA13 B13 A13 0 0 Nmod L=2.51146190542173e-07 W=4.23276196447018e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.46552392894035e-05 PS= +8.46552392894035e-05 NQSMOD=1 MPA13 B13 A13 VDD VDD Pmod L=2.46359362747576e-07 W= +0.00010249565409785 AD=7.8125e-11 AS=7.8125e-11 PD= +0.0002049913081957 PS=0.0002049913081957 NQSMOD=1 MNB13 A13 B13 0 0 Nmod L=2.44656485453628e-07 W=4.11044634633624e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.22089269267248e-05 PS= +8.22089269267248e-05 NQSMOD=1 MPB13 A13 B13 VDD VDD Pmod L=2.56119611942636e-07 W= +0.0001064085618438 AD=7.8125e-11 AS=7.8125e-11 PD=0.0002128171236876 +PS=0.0002128171236876 NQSMOD=1 LA14 A14 LCA14 3.69030941553353e-11 RA14 LCA14 A15 0.266535044422507 LB14 B14 LCB14 3.69030941553353e-11 RB14 LCB14 B15 0.266535044422507 C14 A15 B15 2.50418376625721e-14 MNA14 B14 A14 0 0 Nmod L=2.47663439668801e-07 W=4.20889991075918e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.41779982151835e-05 PS= +8.41779982151835e-05 NQSMOD=1 MPA14 B14 A14 VDD VDD Pmod L=2.51252450429323e-07 W= +0.000103622229824819 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207244459649638 PS=0.000207244459649638 NQSMOD=1 MNB14 A14 B14 0 0 Nmod L=2.5044796612668e-07 W=4.24685059762319e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.49370119524638e-05 PS= +8.49370119524638e-05 NQSMOD=1 MPB14 A14 B14 VDD VDD Pmod L=2.4786360459861e-07 W= +0.000104258615459431 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208517230918863 PS=0.000208517230918863 NQSMOD=1 LA15 A15 LCA15 3.69030941553353e-11 RA15 LCA15 A16 0.266535044422507 LB15 B15 LCB15 3.69030941553353e-11 RB15 LCB15 B16 0.266535044422507 C15 A16 B16 2.50418376625721e-14 MNA15 B15 A15 0 0 Nmod L=2.5213362488047e-07 W=4.26610931467994e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.53221862935989e-05 PS= +8.53221862935989e-05 NQSMOD=1 MPA15 B15 A15 VDD VDD Pmod L=2.44411053097269e-07 W= +0.000104344399065411 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208688798130821 PS=0.000208688798130821 NQSMOD=1 MNB15 A15 B15 0 0 Nmod L=2.44947739168727e-07 W=4.18061319080677e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.36122638161354e-05 PS= +8.36122638161354e-05 NQSMOD=1 MPB15 A15 B15 VDD VDD Pmod L=2.45133067349567e-07 W= +0.000103673770597555 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00020734754119511 PS=0.00020734754119511 NQSMOD=1 LA16 A16 LCA16 3.69030941553353e-11 RA16 LCA16 A17 0.266535044422507 LB16 B16 LCB16 3.69030941553353e-11 RB16 LCB16 B17 0.266535044422507 C16 A17 B17 2.50418376625721e-14 MNA16 B16 A16 0 0 Nmod L=2.5558903414348e-07 W=4.23651981762607e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.47303963525215e-05 PS= +8.47303963525215e-05 NQSMOD=1 MPA16 B16 A16 VDD VDD Pmod L=2.46968507923118e-07 W= +0.000101577430536373 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203154861072746 PS=0.000203154861072746 NQSMOD=1 MNB16 A16 B16 0 0 Nmod L=2.52441475326891e-07 W=4.0963445615255e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.192689123051e-05 PS= +8.192689123051e-05 NQSMOD=1 MPB16 A16 B16 VDD VDD Pmod L=2.49958772476576e-07 W= +0.000102341104143712 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204682208287424 PS=0.000204682208287424 NQSMOD=1 LA17 A17 LCA17 3.69030941553353e-11 RA17 LCA17 A18 0.266535044422507 LB17 B17 LCB17 3.69030941553353e-11 RB17 LCB17 B18 0.266535044422507 C17 A18 B18 2.50418376625721e-14 MNA17 B17 A17 0 0 Nmod L=2.46623947628415e-07 W=4.07033737509309e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.14067475018618e-05 PS= +8.14067475018618e-05 NQSMOD=1 MPA17 B17 A17 VDD VDD Pmod L=2.52274212428759e-07 W= +0.000105423152156798 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000210846304313596 PS=0.000210846304313596 NQSMOD=1 MNB17 A17 B17 0 0 Nmod L=2.51233452024547e-07 W=4.12815452669714e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.25630905339429e-05 PS= +8.25630905339429e-05 NQSMOD=1 MPB17 A17 B17 VDD VDD Pmod L=2.49324495416238e-07 W= +0.000104142717459091 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208285434918183 PS=0.000208285434918183 NQSMOD=1 LA18 A18 LCA18 3.69030941553353e-11 RA18 LCA18 A19 0.266535044422507 LB18 B18 LCB18 3.69030941553353e-11 RB18 LCB18 B19 0.266535044422507 C18 A19 B19 2.50418376625721e-14 MNA18 B18 A18 0 0 Nmod L=2.52038203439398e-07 W=4.17044670825126e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.34089341650252e-05 PS= +8.34089341650252e-05 NQSMOD=1 MPA18 B18 A18 VDD VDD Pmod L=2.46465042965348e-07 W= +0.000102305682920291 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204611365840582 PS=0.000204611365840582 NQSMOD=1 MNB18 A18 B18 0 0 Nmod L=2.45695550122768e-07 W=4.2510656912981e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.50213138259621e-05 PS= +8.50213138259621e-05 NQSMOD=1 MPB18 A18 B18 VDD VDD Pmod L=2.56212134001568e-07 W= +0.000101696358889307 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000203392717778614 PS=0.000203392717778614 NQSMOD=1 LA19 A19 LCA19 3.69030941553353e-11 RA19 LCA19 A20 0.266535044422507 LB19 B19 LCB19 3.69030941553353e-11 RB19 LCB19 B20 0.266535044422507 C19 A20 B20 2.50418376625721e-14 MNA19 B19 A19 0 0 Nmod L=2.46298724559332e-07 W=4.26183323927543e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.52366647855085e-05 PS= +8.52366647855085e-05 NQSMOD=1 MPA19 B19 A19 VDD VDD Pmod L=2.53903413760174e-07 W= +0.000103580270078538 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000207160540157077 PS=0.000207160540157077 NQSMOD=1 MNB19 A19 B19 0 0 Nmod L=2.4541336381424e-07 W=4.1471197163819e-05 AD= +3.125e-11 AS=3.125e-11 PD=8.2942394327638e-05 PS=8.2942394327638e-05 +NQSMOD=1 MPB19 A19 B19 VDD VDD Pmod L=2.51953325753565e-07 W= +0.0001019745929959 AD=7.8125e-11 AS=7.8125e-11 PD=0.0002039491859918 +PS=0.0002039491859918 NQSMOD=1 LA20 A20 LCA20 3.69030941553353e-11 RA20 LCA20 A21 0.266535044422507 LB20 B20 LCB20 3.69030941553353e-11 RB20 LCB20 B21 0.266535044422507 C20 A21 B21 2.50418376625721e-14 MNA20 B20 A20 0 0 Nmod L=2.55318350883171e-07 W=4.2257523363596e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.4515046727192e-05 PS= +8.4515046727192e-05 NQSMOD=1 MPA20 B20 A20 VDD VDD Pmod L=2.50733395598687e-07 W= +0.000105848300738233 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211696601476467 PS=0.000211696601476467 NQSMOD=1 MNB20 A20 B20 0 0 Nmod L=2.53961238224852e-07 W=4.07467605160825e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.1493521032165e-05 PS= +8.1493521032165e-05 NQSMOD=1 MPB20 A20 B20 VDD VDD Pmod L=2.52173406118976e-07 W= +0.000104205251139887 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000208410502279773 PS=0.000208410502279773 NQSMOD=1 LA21 A21 LCA21 3.69030941553353e-11 RA21 LCA21 A22 0.266535044422507 LB21 B21 LCB21 3.69030941553353e-11 RB21 LCB21 B22 0.266535044422507 C21 A22 B22 2.50418376625721e-14 MNA21 B21 A21 0 0 Nmod L=2.46323292867561e-07 W=4.1601573531982e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.32031470639639e-05 PS= +8.32031470639639e-05 NQSMOD=1 MPA21 B21 A21 VDD VDD Pmod L=2.54613442115316e-07 W= +0.000104931161465525 AD=7.8125e-11 AS=7.8125e-11 PD= +0.00020986232293105 PS=0.00020986232293105 NQSMOD=1 MNB21 A21 B21 0 0 Nmod L=2.55836584454404e-07 W=4.10424160274173e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.20848320548346e-05 PS= +8.20848320548346e-05 NQSMOD=1 MPB21 A21 B21 VDD VDD Pmod L=2.54709741956022e-07 W= +0.000102062091080516 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000204124182161031 PS=0.000204124182161031 NQSMOD=1 LA22 A22 LCA22 3.69030941553353e-11 RA22 LCA22 A23 0.266535044422507 LB22 B22 LCB22 3.69030941553353e-11 RB22 LCB22 B23 0.266535044422507 C22 A23 B23 2.50418376625721e-14 MNA22 B22 A22 0 0 Nmod L=2.54430620981417e-07 W=4.19307535657001e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.38615071314001e-05 PS= +8.38615071314001e-05 NQSMOD=1 MPA22 B22 A22 VDD VDD Pmod L=2.46694525572975e-07 W= +0.000103108817734331 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000206217635468663 PS=0.000206217635468663 NQSMOD=1 MNB22 A22 B22 0 0 Nmod L=2.4991048194413e-07 W=4.12343575509987e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.24687151019974e-05 PS= +8.24687151019974e-05 NQSMOD=1 MPB22 A22 B22 VDD VDD Pmod L=2.53435790976082e-07 W= +0.000105540213369592 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000211080426739185 PS=0.000211080426739185 NQSMOD=1 LA23 A23 LCA23 3.69030941553353e-11 RA23 LCA23 A24 0.266535044422507 LB23 B23 LCB23 3.69030941553353e-11 RB23 LCB23 B24 0.266535044422507 C23 A24 B24 2.50418376625721e-14 MNA23 B23 A23 0 0 Nmod L=2.47985427798248e-07 W=4.14939059451511e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.29878118903023e-05 PS= +8.29878118903023e-05 NQSMOD=1 MPA23 B23 A23 VDD VDD Pmod L=2.50625862917368e-07 W= +0.000104857443713713 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000209714887427425 PS=0.000209714887427425 NQSMOD=1 MNB23 A23 B23 0 0 Nmod L=2.48906363214973e-07 W=4.09072154111792e-05 +AD=3.125e-11 AS=3.125e-11 PD=8.18144308223583e-05 PS= +8.18144308223583e-05 NQSMOD=1 MPB23 A23 B23 VDD VDD Pmod L=2.544246792556e-07 W= +0.000106667496188909 AD=7.8125e-11 AS=7.8125e-11 PD= +0.000213334992377817 PS=0.000213334992377817 NQSMOD=1 RCROSS1 A0 B24 0.001 RCROSS2 B0 A24 0.001 .SAVE VDD0 .SAVE VSS0 .SAVE VDD_A0 .SAVE VSS_A0 .SAVE VDD_B0 .SAVE VSS_B0 .SAVE A0 B0 LA0#branch LB0#branch A1 B1 LA1#branch LB1#branch A2 B2 +LA2#branch LB2#branch A3 B3 LA3#branch LB3#branch A4 B4 LA4#branch +LB4#branch A5 B5 LA5#branch LB5#branch A6 B6 LA6#branch LB6#branch +A7 B7 LA7#branch LB7#branch A8 B8 LA8#branch LB8#branch A9 B9 +LA9#branch LB9#branch A10 B10 LA10#branch LB10#branch A11 B11 +LA11#branch LB11#branch A12 B12 LA12#branch LB12#branch A13 B13 +LA13#branch LB13#branch A14 B14 LA14#branch LB14#branch A15 B15 +LA15#branch LB15#branch A16 B16 LA16#branch LB16#branch A17 B17 +LA17#branch LB17#branch A18 B18 LA18#branch LB18#branch A19 B19 +LA19#branch LB19#branch A20 B20 LA20#branch LB20#branch A21 B21 +LA21#branch LB21#branch A22 B22 LA22#branch LB22#branch A23 B23 +LA23#branch LB23#branch ** **INCLUDING FILE: ./proj1/process.models.... * * Typical N Typical P - from process corners (taken from tsmc025_corners.bsim3 fron NCSU) * * TSMC 0.25u 5M 1P process. 2.5V transistor models .MODEL Nmod NMOS LEVEL=8 +TNOM = 25 +VERSION = 3.2.2 TOX = 5.8e-9 +XJ = 1E-07 NCH = 2.354946E+17 LLN = 1 +LWN = 1 WLN = 1 WWN = 1 +LINT = 1.76E-08 WINT = 6.75E-09 MOBMOD = 1 +BINUNIT = 2 DWG = 0 DWB = 0 +VTH0 = 0.4321336 LVTH0 = 2.081814E-08 WVTH0 = -5.470342E-11 +PVTH0 = -6.721795E-16 K1 = 0.3281252 LK1 = 9.238362E-08 +WK1 = 2.878255E-08 PK1 = -2.426481E-14 K2 = 0.0402824 +LK2 = -3.208392E-08 WK2 = -1.154091E-08 PK2 = 9.192045E-15 +K3 = 0 DVT0 = 0 DVT1 = 0 +DVT2 = 0 DVT0W = 0 DVT1W = 0 +DVT2W = 0 NLX = 0 W0 = 0 +K3B = 0 VSAT = 7.586954E+04 LVSAT = 3.094656E-03 +WVSAT = -1.747416E-03 PVSAT = 8.820956E-10 UA = 8.924498E-10 +LUA = -1.511745E-16 WUA = -3.509821E-17 PUA = -3.08778E-23 +UB = 8.928832E-21 LUB = -1.655745E-27 WUB = -2.03282E-27 +PUB = 3.4578E-34 UC = -1.364265E-11 LUC = 1.170473E-17 +WUC = -1.256705E-18 PUC = -6.249644E-24 RDSW = 447.8871 +PRWB = 0 PRWG = 0 WR = 0.99 +U0 = 0.06005258 LU0 = -6.31976E-09 WU0 = -8.819531E-09 +PU0 = 3.57209E-15 A0 = -1.468837 LA0 = 6.419548E-07 +WA0 = 5.512414E-07 PA0 = -9.222928E-14 KETA = -0.04922795 +LKETA = 2.360844E-08 WKETA = 1.560385E-08 PKETA = -5.98377E-15 +A1 = 0.02659908 LA1 = -6.511454E-09 A2 = 1 +AGS = -4.01637 LAGS = 1.090294E-06 WAGS = 1.162021E-06 +PAGS = -3.108579E-13 B0 = 0 B1 = 0 +VOFF = -0.1829426 LVOFF = 9.941631E-09 WVOFF = 1.568082E-08 +PVOFF = -2.832958E-15 NFACTOR = 0.6790636 LNFACTOR= 3.454948E-08 +WNFACTOR= 1.501016E-07 PNFACTOR= -2.955591E-14 CIT = 2.218499E-04 +LCIT = -1.076934E-10 WCIT = -3.286884E-10 PCIT = 1.658928E-16 +CDSC = 0 CDSCB = 0 CDSCD = 0 +ETA0 = 1.215578E-04 LETA0 = -1.037758E-11 WETA0 = -3.030225E-11 +PETA0 = 1.529658E-17 ETAB = 3.548681E-03 LETAB = -1.791374E-09 +WETAB = -6.897268E-10 PETAB = 3.481742E-16 DSUB = 0 +PCLM = 3.583838 PDIBLC1 = 0 PDIBLC2 = 5.379674E-03 +LPDIBLC2= 7.808481E-09 WPDIBLC2= 5.516945E-10 PPDIBLC2= -2.784957E-16 +PDIBLCB = -0.1229374 LPDIBLCB= 4.956215E-08 WPDIBLCB= 3.299946E-08 +PPDIBLCB= -9.624918E-15 DROUT = 0 PSCBE1 = 4.472639E+08 +LPSCBE1 = 28.64041 WPSCBE1 = 15.7154 PPSCBE1 = -7.933138E-06 +PSCBE2 = 1.842585E-06 LPSCBE2 = 2.871008E-12 WPSCBE2 = 2.579183E-12 +PPSCBE2 = -1.301972E-18 PVAG = -2.015254E-03 LPVAG = 1.017757E-09 +WPVAG = 3.07622E-10 PPVAG = -1.55418E-16 DELTA = -0.02862256 +LDELTA = 1.492454E-08 WDELTA = -6.71663E-09 PDELTA = 3.407521E-15 +ALPHA0 = 0 BETA0 = 30 KT1 = -0.2579945 +LKT1 = -1.664895E-08 WKT1 = -1.633463E-08 PKT1 = 3.755864E-15 +KT2 = -0.05347481 LKT2 = 8.244731E-09 WKT2 = 1.13705E-09 +PKT2 = -1.240924E-15 AT = -1.132632E+04 LAT = 6.469047E-03 +WAT = 6.829220E-04 PAT = -4.154249E-10 UTE = -2.309089 +LUTE = 1.662427E-07 WUTE = 1.244801E-07 PUTE = -5.627924E-14 +UA1 = -3.461758E-10 LUA1 = 1.747495E-16 WUA1 = -1.42065E-16 +PUA1 = 7.171442E-23 UB1 = 0 UC1 = -2.38157E-12 +LUC1 = -2.895726E-18 WUC1 = -1.990052E-17 PUC1 = 1.004497E-23 +KT1L = 0 PRT = -1E-18 CJ = 2.024128E-3 +MJ = 0.4960069 PB = 0.9173808 CJSW = 2.751528E-10 +MJSW = 0.443145 PBSW = 0.9173808 CJSWG = 2.135064E-10 +MJSWG = 0.443145 PBSWG = 0.9173808 +RSH = 4.5 +XTI = 3 +CGDO = 3.11E-10 CGSO = 3.11E-10 CAPMOD = 2 +XPART = 1 CF = 0 +JS = 1E-06 +JSW = 5E-11 .MODEL Pmod PMOS LEVEL=8 +VERSION = 3.2.2 +TNOM = 25 TOX = 5.8e-9 +XJ = 1E-7 NCH = 4.1589E17 +LLN = 1 LWN = 1 WLN = 1 +WWN = 1 LINT = 1.2365E-8 WINT = 7.8E-9 +MOBMOD = 1 BINUNIT = 2 DWG = 0 +DWB = 0 VTH0 = -0.6236538 LVTH0 = 2.649834E-8 +WVTH0 = 3.214189E-8 PVTH0 = -3.22268E-15 K1 = 0.4198155 +LK1 = 5.770498E-8 WK1 = 5.577151E-8 PK1 = -2.81684E-14 +K2 = 0.0429467 LK2 = -2.296405E-8 WK2 = -1.355302E-8 +PK2 = 6.848271E-15 K3 = 0 DVT0 = 0 +DVT1 = 0 DVT2 = 0 DVT0W = 0 +DVT1W = 0 DVT2W = 0 NLX = 0 +W0 = 0 K3B = 0 VSAT = 1.443912E5 +LVSAT = -7.688012E-4 WVSAT = -6.083648E-3 PVSAT = 2.186471E-10 +UA = 1.846811E-9 LUA = -3.27694E-16 WUA = -2.82106E-16 +PUA = 7.180233E-23 UB = -7.84535E-19 LUB = 4.772849E-25 +WUB = 2.599205E-25 PUB = -1.46530E-31 UC = -1.75560E-10 +LUC = 3.360832E-17 WUC = 1.504425E-17 PUC = -1.30556E-23 +RDSW = 1.03E3 PRWB = 0 PRWG = 0 +WR = 1 U0 = 0.0136443 LU0 = -7.22084E-10 +WU0 = -1.088554E-9 PU0 = 2.730854E-16 A0 = 0.1071803 +LA0 = 4.64252E-7 WA0 = 5.383179E-7 PA0 = -1.32033E-13 +KETA = -4.943762E-3 LKETA = -3.565304E-9 WKETA = -5.226247E-9 +PKETA = 2.640665E-15 A1 = 0 A2 = 0.4 +AGS = 0.1664005 LAGS = 1.19106E-7 WAGS = 5.29237E-8 +PAGS = -2.67304E-14 B0 = 0 B1 = 0 +VOFF = -0.0592623 LVOFF = -1.96686E-8 WVOFF = -1.486398E-8 +PVOFF = 7.510321E-15 NFACTOR = 0.8588103 LNFACTOR= -1.158881E-7 +WNFACTOR= 1.210664E-8 PNFACTOR= -6.11712E-15 CIT = 6.439495E-5 +LCIT = 2.916437E-10 WCIT = -3.11284E-11 PCIT = 1.572825E-17 +CDSC = 0 CDSCB = 0 CDSCD = 0 +ETA0 = -3.819468E-3 LETA0 = 2.155422E-9 WETA0 = 8.235612E-10 +PETA0 = -4.16037E-16 ETAB = 1.334637E-3 LETAB = -7.93631E-10 +WETAB = 5.284657E-11 PETAB = -2.68353E-17 DSUB = 0 +PCLM = 0.1098002 LPCLM = 6.874263E-7 WPCLM = 6.724724E-7 +PPCLM = -1.97766E-13 PDIBLC1 = 0 PDIBLC2 = 5.801323E-3 +LPDIBLC2= -1.81964E-9 WPDIBLC2= -5.853396E-9 PPDIBLC2= 2.957545E-15 +PDIBLCB = 0.1921199 DROUT = 0 PSCBE1 = 7.19E8 +PSCBE2 = 1E-20 PVAG = 0 DELTA = 0.01 +ALPHA0 = 0 BETA0 = 30 KT1 = -0.3248987 +LKT1 = -1.160393E-8 WKT1 = 4.153356E-8 PKT1 = -4.62347E-15 +KT2 = -0.0367632 AT = 1E4 UTE = -1.04 +UA1 = 3.992421E-10 UB1 = -9.23294E-19 LUB1 = -5.28718E-26 +WUB1 = -6.13069E-26 PUB1 = 1.503674E-32 UC1 = -1.00699E-12 +KT1L = 0 PRT = 0 CJ = 1.931092e-3 +MJ = 0.4812153 PB = 0.9134669 CJSW = 2.232277e-10 +MJSW = 0.3237595 PBSW = 0.9134669 CJSWG = 1.607088e-10 +MJSWG = 0.3237595 PBSWG = 0.9134669 +RSH = 3.5 +CGDO = 2.68e-10 CGSO = 2.68e-10 +CAPMOD = 2 +XPART = 1 +CF = 0 XTI = 3 +JS = 3E-7 +JSW = 5E-12 **.... FINISHED INCLUDING: ./proj1/process.models ** .OPTIONS TEMP=25 VSLEW_CONTROL VSLEW 0 (PULSE 0 1 0 1e-09) EVLOGIC VRAMP 0 VSLEW 0 2.5 VDDPOWER VDD VRAMP DC 0 VARACTOR_V VARACTOR_V 0 DC 2.5 .TRAN 0.02n 3000n 0n 0.5n .END ngspice-26/examples/tclspice/tcl-testbench4/bltGraph.tcl0000644000265600020320000003345312264261473022757 0ustar andreasadmin proc Blt_ActiveLegend { graph } { $graph legend bind all [list blt::ActivateLegend $graph ] $graph legend bind all [list blt::DeactivateLegend $graph] $graph legend bind all [list blt::HighlightLegend $graph] } proc Blt_Crosshairs { graph } { blt::Crosshairs $graph } proc Blt_ZoomStack { graph } { blt::ZoomStack $graph } proc Blt_PrintKey { graph } { blt::PrintKey $graph } proc Blt_ClosestPoint { graph } { blt::ClosestPoint $graph } # # The following procedures that reside in the "blt" namespace are # supposed to be private. # proc blt::ActivateLegend { graph } { set elem [$graph legend get current] $graph legend activate $elem } proc blt::DeactivateLegend { graph } { set elem [$graph legend get current] $graph legend deactivate $elem } proc blt::HighlightLegend { graph } { set elem [$graph legend get current] set relief [$graph element cget $elem -labelrelief] if { $relief == "flat" } { $graph element configure $elem -labelrelief raised $graph element activate $elem } else { $graph element configure $elem -labelrelief flat $graph element deactivate $elem } } proc blt::Crosshairs { graph { event "Any-Motion" } } { $graph crosshairs on bind bltCrosshairs <$event> { %W crosshairs configure -position @%x,%y } $graph crosshairs configure -color red blt::AddBindTag $graph bltCrosshairs } proc blt::InitStack { graph } { global zoomInfo set zoomInfo($graph,interval) 100 set zoomInfo($graph,afterId) 0 set zoomInfo($graph,A,x) {} set zoomInfo($graph,A,y) {} set zoomInfo($graph,B,x) {} set zoomInfo($graph,B,y) {} set zoomInfo($graph,stack) {} set zoomInfo($graph,corner) A } proc blt::ZoomStack { graph {start "ButtonPress-1"} {reset "ButtonPress-3"} } { global zoomInfo zoomMod blt::InitStack $graph if { [info exists zoomMod] } { set modifier $zoomMod } else { set modifier "" } bind bltZoomGraph <${modifier}${start}> { blt::SetZoomPoint %W %x %y } bind bltZoomGraph <${modifier}${reset}> { if { [%W inside %x %y] } { blt::ResetZoom %W } } blt::AddBindTag $graph bltZoomGraph } proc blt::PrintKey { graph {event "Shift-ButtonRelease-3"} } { bind bltPrintGraph <$event> { Blt_PostScriptDialog %W } blt::AddBindTag $graph bltPrintGraph } proc blt::ClosestPoint { graph {event "Control-ButtonPress-2"} } { bind bltClosestPoint <$event> { blt::FindElement %W %x %y } blt::AddBindTag $graph bltClosestPoint } proc blt::AddBindTag { graph name } { set oldtags [bindtags $graph] if { [lsearch $oldtags $name] < 0 } { bindtags $graph [concat $name $oldtags] } } proc blt::FindElement { graph x y } { if ![$graph element closest $x $y info -interpolate yes] { beep return } # -------------------------------------------------------------- # find(name) - element Id # find(index) - index of closest point # find(x) find(y) - coordinates of closest point # or closest point on line segment. # find(dist) - distance from sample coordinate # -------------------------------------------------------------- set markerName "bltClosest_$info(name)" catch { $graph marker delete $markerName } $graph marker create text -coords { $info(x) $info(y) } \ -name $markerName \ -text "$info(name): $info(dist)\nindex $info(index)" \ -font *lucida*-r-*-10-* \ -anchor center -justify left \ -yoffset 0 -bg {} set coords [$graph invtransform $x $y] set nx [lindex $coords 0] set ny [lindex $coords 1] $graph marker create line -coords "$nx $ny $info(x) $info(y)" \ -name line.$markerName blt::FlashPoint $graph $info(name) $info(index) 10 blt::FlashPoint $graph $info(name) [expr $info(index) + 1] 10 } proc blt::FlashPoint { graph name index count } { if { $count & 1 } { $graph element deactivate $name } else { $graph element activate $name $index } incr count -1 if { $count > 0 } { after 200 blt::FlashPoint $graph $name $index $count update } else { eval $graph marker delete [$graph marker names "bltClosest_*"] } } proc blt::GetCoords { graph x y index } { global zoomInfo if { [$graph cget -invertxy] } { set zoomInfo($graph,$index,x) $y set zoomInfo($graph,$index,y) $x } else { set zoomInfo($graph,$index,x) $x set zoomInfo($graph,$index,y) $y } } proc blt::MarkPoint { graph index } { global zoomInfo set x [$graph xaxis invtransform $zoomInfo($graph,$index,x)] set y [$graph yaxis invtransform $zoomInfo($graph,$index,y)] set marker "zoomText_$index" set text [format "x=%.4g\ny=%.4g" $x $y] if [$graph marker exists $marker] { $graph marker configure $marker -coords { $x $y } -text $text } else { $graph marker create text -coords { $x $y } -name $marker \ -font *lucida*-r-*-10-* \ -text $text -anchor center -bg {} -justify left } } proc blt::DestroyZoomTitle { graph } { global zoomInfo if { $zoomInfo($graph,corner) == "A" } { catch { $graph marker delete "zoomTitle" } } } proc blt::PopZoom { graph } { global zoomInfo set zoomStack $zoomInfo($graph,stack) if { [llength $zoomStack] > 0 } { set cmd [lindex $zoomStack 0] set zoomInfo($graph,stack) [lrange $zoomStack 1 end] eval $cmd blt::ZoomTitleLast $graph busy hold $graph update after 2000 "blt::DestroyZoomTitle $graph" busy release $graph } else { catch { $graph marker delete "zoomTitle" } } } # Push the old axis limits on the stack and set the new ones proc blt::PushZoom { graph } { global zoomInfo eval $graph marker delete [$graph marker names "zoom*"] if { [info exists zoomInfo($graph,afterId)] } { after cancel $zoomInfo($graph,afterId) } set x1 $zoomInfo($graph,A,x) set y1 $zoomInfo($graph,A,y) set x2 $zoomInfo($graph,B,x) set y2 $zoomInfo($graph,B,y) if { ($x1 == $x2) || ($y1 == $y2) } { # No delta, revert to start return } set cmd {} foreach margin { xaxis yaxis x2axis y2axis } { foreach axis [$graph $margin use] { set min [$graph axis cget $axis -min] set max [$graph axis cget $axis -max] set c [list $graph axis configure $axis -min $min -max $max] append cmd "$c\n" } } set zoomInfo($graph,stack) [linsert $zoomInfo($graph,stack) 0 $cmd] busy hold $graph # This update lets the busy cursor take effect. update foreach margin { xaxis x2axis } { foreach axis [$graph $margin use] { set min [$graph axis invtransform $axis $x1] set max [$graph axis invtransform $axis $x2] if { $min!=$max } { if { $min > $max } { $graph axis configure $axis -min $max -max $min } else { $graph axis configure $axis -min $min -max $max } } } } foreach margin { yaxis y2axis } { foreach axis [$graph $margin use] { set min [$graph axis invtransform $axis $y1] set max [$graph axis invtransform $axis $y2] if { $min!=$max } { if { $min > $max } { $graph axis configure $axis -min $max -max $min } else { $graph axis configure $axis -min $min -max $max } } } } # This "update" forces the graph to be redrawn update busy release $graph } # # This routine terminates either an existing zoom, or pops back to # the previous zoom level (if no zoom is in progress). # proc blt::ResetZoom { graph } { global zoomInfo if { ![info exists zoomInfo($graph,corner)] } { blt::InitStack $graph } eval $graph marker delete [$graph marker names "zoom*"] if { $zoomInfo($graph,corner) == "A" } { # Reset the whole axis blt::PopZoom $graph } else { global zoomMod if { [info exists zoomMod] } { set modifier $zoomMod } else { set modifier "Any-" } set zoomInfo($graph,corner) A bind $graph <${modifier}Motion> { } } } option add *zoomTitle.font -*-helvetica-medium-R-*-*-18-*-*-*-*-*-*-* option add *zoomTitle.shadow yellow4 option add *zoomTitle.foreground yellow1 option add *zoomTitle.coords "-Inf Inf" proc blt::ZoomTitleNext { graph } { global zoomInfo set level [expr [llength $zoomInfo($graph,stack)] + 1] if { [$graph cget -invertxy] } { set coords "-Inf -Inf" } else { set coords "-Inf Inf" } $graph marker create text -name "zoomTitle" -text "Zoom #$level" \ -coords $coords -bindtags "" -anchor nw } proc blt::ZoomTitleLast { graph } { global zoomInfo set level [llength $zoomInfo($graph,stack)] if { $level > 0 } { $graph marker create text -name "zoomTitle" -anchor nw \ -text "Zoom #$level" } } proc blt::SetZoomPoint { graph x y } { global zoomInfo zoomMod if { ![info exists zoomInfo($graph,corner)] } { blt::InitStack $graph } blt::GetCoords $graph $x $y $zoomInfo($graph,corner) if { [info exists zoomMod] } { set modifier $zoomMod } else { set modifier "Any-" } if { $zoomInfo($graph,corner) == "A" } { if { ![$graph inside $x $y] } { return } # First corner selected, start watching motion events #blt::MarkPoint $graph A blt::ZoomTitleNext $graph bind $graph <${modifier}Motion> { blt::GetCoords %W %x %y B #blt::MarkPoint $graph B blt::Box %W } set zoomInfo($graph,corner) B } else { # Delete the modal binding bind $graph <${modifier}Motion> { } blt::PushZoom $graph set zoomInfo($graph,corner) A } } option add *zoomOutline.dashes 4 option add *zoomTitle.anchor nw option add *zoomOutline.lineWidth 2 option add *zoomOutline.xor yes proc blt::MarchingAnts { graph offset } { global zoomInfo incr offset if { [$graph marker exists zoomOutline] } { $graph marker configure zoomOutline -dashoffset $offset set interval $zoomInfo($graph,interval) set id [after $interval [list blt::MarchingAnts $graph $offset]] set zoomInfo($graph,afterId) $id } } proc blt::Box { graph } { global zoomInfo if { $zoomInfo($graph,A,x) > $zoomInfo($graph,B,x) } { set x1 [$graph xaxis invtransform $zoomInfo($graph,B,x)] set y1 [$graph yaxis invtransform $zoomInfo($graph,B,y)] set x2 [$graph xaxis invtransform $zoomInfo($graph,A,x)] set y2 [$graph yaxis invtransform $zoomInfo($graph,A,y)] } else { set x1 [$graph xaxis invtransform $zoomInfo($graph,A,x)] set y1 [$graph yaxis invtransform $zoomInfo($graph,A,y)] set x2 [$graph xaxis invtransform $zoomInfo($graph,B,x)] set y2 [$graph yaxis invtransform $zoomInfo($graph,B,y)] } set coords { $x1 $y1 $x2 $y1 $x2 $y2 $x1 $y2 $x1 $y1 } if { [$graph marker exists "zoomOutline"] } { $graph marker configure "zoomOutline" -coords $coords } else { set X [lindex [$graph xaxis use] 0] set Y [lindex [$graph yaxis use] 0] $graph marker create line -coords $coords -name "zoomOutline" \ -mapx $X -mapy $Y set interval $zoomInfo($graph,interval) set id [after $interval [list blt::MarchingAnts $graph 0]] set zoomInfo($graph,afterId) $id } } proc Blt_PostScriptDialog { graph } { global POSTSCRIPTWINDOW global POSTSCRIPTGRAPH set top $graph.top toplevel $top wm title $top "Postscript out" set POSTSCRIPTWINDOW $top set POSTSCRIPTGRAPH $graph foreach var { center landscape maxpect preview decorations padx pady paperwidth paperheight width height colormode } { global $graph.$var set $graph.$var [$graph postscript cget -$var] } set row 1 set col 0 label $top.title -text "PostScript Options" blt::table $top $top.title -cspan 7 foreach bool { center landscape maxpect preview decorations } { set w $top.$bool-label label $w -text "-$bool" -font *courier*-r-*12* blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 } set w $top.$bool-yes global $graph.$bool radiobutton $w -text "yes" -variable $graph.$bool -value 1 blt::table $top $row,$col+1 $w -anchor w set w $top.$bool-no radiobutton $w -text "no" -variable $graph.$bool -value 0 blt::table $top $row,$col+2 $w -anchor w incr row } label $top.modes -text "-colormode" -font *courier*-r-*12* blt::table $top $row,0 $top.modes -anchor e -pady { 2 0 } -padx { 0 4 } set col 1 foreach m { color greyscale } { set w $top.$m radiobutton $w -text $m -variable $graph.colormode -value $m blt::table $top $row,$col $w -anchor w incr col } set row 1 frame $top.sep -width 2 -bd 1 -relief sunken blt::table $top $row,3 $top.sep -fill y -rspan 6 set col 4 foreach value { padx pady paperwidth paperheight width height } { set w $top.$value-label label $w -text "-$value" -font *courier*-r-*12* blt::table $top $row,$col $w -anchor e -pady { 2 0 } -padx { 0 4 } set w $top.$value-entry global $graph.$value entry $w -textvariable $graph.$value -width 8 blt::table $top $row,$col+1 $w -cspan 2 -anchor w -padx 8 incr row } blt::table configure $top c3 -width .125i button $top.cancel -text "Cancel" -command "destroy $top" blt::table $top $row,0 $top.cancel -width 1i -pady 2 -cspan 3 button $top.reset -text "Reset" -command "destroy $top" #blt::table $top $row,1 $top.reset -width 1i button $top.print -text "Print" -command {blt::ResetPostScript $POSTSCRIPTGRAPH; destroy $POSTSCRIPTWINDOW } blt::table $top $row,4 $top.print -width 1i -pady 2 -cspan 2 } proc blt::ResetPostScript { graph } { foreach var { center landscape maxpect preview decorations padx pady paperwidth paperheight width height colormode } { global $graph.$var set old [$graph postscript cget -$var] if { [catch {$graph postscript configure -$var [set $graph.$var]}] != 0 } { $graph postscript configure -$var $old set $graph.$var $old } } set types {{"Postscript File" {.ps} } {"Encapsulated Postscript File" {.eps} }}; set PSFILE [tk_getSaveFile -filetypes $types -parent . -initialfile Untitled -defaultextension .ps] if {[string length $PSFILE]!=0} { $graph postscript output $PSFILE } } ngspice-26/examples/tclspice/tcl-testbench3/0000755000265600020320000000000012264261473020477 5ustar andreasadminngspice-26/examples/tclspice/tcl-testbench3/tcl-testbench3.tcl0000755000265600020320000000645712264261473024044 0ustar andreasadmin#!/bin/sh # WishFix \ exec wish -f "$0" ${1+"$@"} ### package require BLT load ../../../src/.libs/libspice.so source differentiate.tcl spice::codemodel ../../../src/xspice/icm/spice2poly/spice2poly.cm proc temperatures_calc {temp_inf temp_sup points} { set tstep [ expr " ( $temp_sup - $temp_inf ) / $points " ] set t $temp_inf set temperatures "" for { set i 0 } { $i < $points } { incr i } { set t [ expr { $t + $tstep } ] set temperatures "$temperatures $t" } return $temperatures } proc thermistance_calc { res B points } { set tzero 273.15 set tref 25 set thermistance "" foreach t $points { set res_temp [expr " $res * exp ( $B * ( 1 / ($tzero + $t) - 1 / ( $tzero + $tref ) ) ) " ] set thermistance "$thermistance $res_temp" } return $thermistance } proc tref_calc { points } { set tref "" foreach t $points { set tref " $tref [ expr " 6 * (2.275-0.005*($t - 20) ) - 9 " ] " } return $tref } proc iteration { t } { set tzero 273.15 spice::alter r11=[ thermistance_calc 10000 3900 $t ] #spice::set temp = [ expr " $tzero + $t " ] spice::op spice::vectoblt vref_temp tref_tmp spice::destroy all return [ tref_tmp range 0 0 ] } proc cost_square { r10 r12 } { tref_blt length 0 spice::alter r10=$r10 spice::alter r12=$r12 foreach point [ temperatures_blt range 0 [ expr " [temperatures_blt length ] - 1" ] ] { tref_blt append [ iteration $point ] } set result [ blt::vector expr " sum(( tref_blt - expected_blt )^2 )" ] puts "result square : r10 = $r10 r12 = $r12 gives $result" return $result } proc cost_sup { r10 r12 } { tref_blt length 0 spice::alter r10=$r10 spice::alter r12=$r12 foreach point [ temperatures_blt range 0 [ expr " [temperatures_blt length ] - 1" ] ] { tref_blt append [ iteration $point ] } set result [ blt::vector expr " max(sqrt(( tref_blt - expected_blt )^2 ))" ] puts "result sup : $result" puts "result sup : r10 = $r10 r12 = $r12 gives $result" return $result } proc disp_curve { r10 r12 } { .g configure -title "Valeurs optimales: R10 = $r10 R12 = $r12" } # # Optimisation # blt::vector create tref_tmp blt::vector create tref_blt blt::vector create expected_blt blt::vector create temperatures_blt temperatures_blt append [ temperatures_calc -25 75 30 ] expected_blt append [ tref_calc [temperatures_blt range 0 [ expr " [ temperatures_blt length ] - 1" ] ] ] blt::graph .g pack .g -side top -fill both -expand true .g element create real -pixels 4 -xdata temperatures_blt -ydata tref_blt .g element create expected -fill red -pixels 0 -dashes dot -xdata temperatures_blt -ydata expected_blt spice::source FB14.cir # point1 max iteration is the last argument set r10r12 [ ::math::optimize::minimumSteepestDescent cost_square { 10000 10000 } 1.9 20 ] puts "$r10r12 " regexp {([0-9.]*) ([0-9.]*)} $r10r12 r10r12 r10 r12 puts "result square with : r10 = $r10 r12 = $r12 " set r10r12 [ ::math::optimize::minimumSteepestDescent cost_sup " $r10 $r12 " 0.05 20 ] puts "$r10r12 " regexp {([0-9.]*) ([0-9.]*)} $r10r12 r10r12 r10 r12 puts "result sup with : r10 = $r10 r12 = $r12 " # # Results # spice::alter r10=$r10 spice::alter r12=$r12 foreach point [ temperatures_blt range 0 [ expr " [temperatures_blt length ] - 1" ] ] { tref_blt append [ iteration $point ] } disp_curve $r10 $r12 ngspice-26/examples/tclspice/tcl-testbench3/FB14.cir0000644000265600020320000002664512264261473021647 0ustar andreasadmin* gnetlist -g spice-sdb -o tmp.lst FB14_batterie.sch ********************************************************* * Spice file generated by gnetlist * * spice-sdb version 12.27.2005 by SDB -- * * provides advanced spice netlisting capability. * * Documentation at http://www.brorson.com/gEDA/SPICE/ * ********************************************************* *vvvvvvvv Included SPICE model from models/tl431.cir vvvvvvvv * modele du TL431 .subckt TL431-R REFIN ANODE CATHODE Q8 Q2_C Q2_C R4_N 0 P1 Q9 CATHODE Q7_C Q9_E 0 n1 R8 Q4_E ANODE 800 R9 Q2_E R9_N 4k Q10 CATHODE R6_P ANODE 0 n1 5 Q11 Q7_C R10_P ANODE 0 n1 *.nodeset R3_N 1 C2 R9_N C2_N 20p R10 R10_P R1_N 1k C1 CATHODE Q7_C 20p D1 ANODE Q7_C DIODE D2 ANODE CATHODE DIODE R4 CATHODE R4_N 800 Q2 Q2_C Q1_E Q2_E 0 n1 Q3 R9_N C2_N ANODE 0 n1 R5 CATHODE R5_N 800 R6 R6_P Q9_E 150 Q1 CATHODE REFIN Q1_E 0 n1 R7 ANODE R6_P 10k Q6 Q7_C Q7_C REFIN 0 n1 Q7 Q7_C Q2_C R5_N 0 P1 R1 R3_N R1_N 2.4k R2 R3_N C2_N 7.2k Q4 C2_N R1_N Q4_E 0 n1 Q5 R1_N R1_N ANODE 0 n1 R3 Q1_E R3_N 3.28k .model p1 pnp bf=50 .model n1 npn bf=100 tf=2n cjc=1p is=5e-18 NF=1.07 .model diode d rs=1 cjo=2p .ends *^^^^^^^^ End of included SPICE model from models/tl431.cir ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/irf4905.spi vvvvvvvv .SUBCKT irf4905 1 2 3 ************************************** * Model Generated by MODPEX * *Copyright(c) Symmetry Design Systems* * All Rights Reserved * * UNPUBLISHED LICENSED SOFTWARE * * Contains Proprietary Information * * Which is The Property of * * SYMMETRY OR ITS LICENSORS * *Commercial Use or Resale Restricted * * by Symmetry License Agreement * ************************************** * Model generated on Jun 19, 96 * Model format: SPICE3 * Symmetry POWER MOS Model (Version 1.0) * External Node Designations * Node 1 -> Drain * Node 2 -> Gate * Node 3 -> Source M1 9 7 8 8 MM L=100u W=100u * Default values used in MM: * The voltage-dependent capacitances are * not included. Other default values are: * RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0 .MODEL MM PMOS LEVEL=1 IS=1e-32 +VTO=-3.53713 LAMBDA=0.00549383 KP=23.3701 +CGSO=2.84439e-05 CGDO=1e-11 RS 8 3 0.0101265 D1 1 3 MD .MODEL MD D IS=1.29014e-08 RS=0.00297795 N=1.46717 BV=55 +IBV=0.00025 EG=1.2 XTI=4 TT=0 +CJO=3.56968e-09 VJ=1.17553 M=0.500933 FC=0.5 RDS 3 1 2.2e+06 RD 9 1 0.0001 RG 2 7 6 D2 5 4 MD1 * Default values used in MD1: * RS=0 EG=1.11 XTI=3.0 TT=0 * BV=infinite IBV=1mA .MODEL MD1 D IS=1e-32 N=50 +CJO=4.83772e-09 VJ=0.625334 M=0.543532 FC=1e-08 D3 5 0 MD2 * Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA .MODEL MD2 D IS=1e-10 N=0.4 RS=3e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 6.08035e-09 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 6 0 MD3 * Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA .MODEL MD3 D IS=1e-10 N=0.4 .ENDS *^^^^^^^^ End of included SPICE model from models/irf4905.spi ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/LM2902.MOD vvvvvvvv *////////////////////////////////////////////////////////////////////// * (C) National Semiconductor, Inc. * Models developed and under copyright by: * National Semiconductor, Inc. *///////////////////////////////////////////////////////////////////// * Legal Notice: This material is intended for free software support. * The file may be copied, and distributed; however, reselling the * material is illegal *//////////////////////////////////////////////////////////////////// * For ordering or technical information on these models, contact: * National Semiconductor's Customer Response Center * 7:00 A.M.--7:00 P.M. U.S. Central Time * (800) 272-9959 * For Applications support, contact the Internet address: * amps-apps@galaxy.nsc.com *////////////////////////////////////////////////////////// *LM2902 QUAD OPERATIONAL AMPLIFIER MACRO-MODEL *////////////////////////////////////////////////////////// * * connections: non-inverting input * | inverting input * | | positive power supply * | | | negative power supply * | | | | output * | | | | | * | | | | | .SUBCKT LM2902/NS 1 2 99 50 28 * *Features: *Eliminates need for dual supplies *Large DC voltage gain = 100dB *High bandwidth = 1MHz *Low input offset voltage = 2mV *Wide supply range = +-1.5V to +-16V * *NOTE: Model is for single device only and simulated * supply current is 1/4 of total device current. * Output crossover distortion with dual supplies * is not modeled. * ****************INPUT STAGE************** * IOS 2 1 5N *^Input offset current R1 1 3 500K R2 3 2 500K I1 99 4 100U R3 5 50 517 R4 6 50 517 Q1 5 2 4 QX Q2 6 7 4 QX *Fp2=1.2 MHz C4 5 6 128.27P * ***********COMMON MODE EFFECT*********** * I2 99 50 75U *^Quiescent supply current EOS 7 1 POLY(1) 16 49 2E-3 1 *Input offset voltage.^ R8 99 49 60K R9 49 50 60K * *********OUTPUT VOLTAGE LIMITING******** V2 99 8 1.63 D1 9 8 DX D2 10 9 DX V3 10 50 .635 * **************SECOND STAGE************** * EH 99 98 99 49 1 G1 98 9 POLY(1) 5 6 0 9.8772E-4 0 .3459 *Fp1=7.86 Hz R5 98 9 101.2433MEG C3 98 9 200P * ***************POLE STAGE*************** * *Fp=2 MHz G3 98 15 9 49 1E-6 R12 98 15 1MEG C5 98 15 7.9577E-14 * *********COMMON-MODE ZERO STAGE********* * *Fpcm=10 KHz G4 98 16 3 49 5.6234E-8 L2 98 17 15.9M R13 17 16 1K * **************OUTPUT STAGE************** * F6 50 99 POLY(1) V6 300U 1 E1 99 23 99 15 1 R16 24 23 17.5 D5 26 24 DX V6 26 22 .63V R17 23 25 17.5 D6 25 27 DX V7 22 27 .63V V5 22 21 0.27V D4 21 15 DX V4 20 22 0.27V D3 15 20 DX L3 22 28 500P RL3 22 28 100K * ***************MODELS USED************** * .MODEL DX D(IS=1E-15) .MODEL QX PNP(BF=1.111E3) * .ENDS *$ *^^^^^^^^ End of included SPICE model from models/LM2902.MOD ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/bas70.mod vvvvvvvv * .SUBCKT BAS70 1 3 * The Resistor R1 does not reflect * a physical device. Instead it * improves modeling in the reverse * mode of operation. R1 1 3 1.409E+09 D1 1 3 modBAS70 .MODEL modBAS70 D( + IS = 3.22E-09 + N = 1.018 + BV = 77 *+ IBV = 1.67E-07 + IBV = 10E-06 + RS = 20.89 + CJO = 1.655E-12 + VJ = 0.349 + M = 0.3583 + FC = 0.5 + TT = 0 + EG = 0.69 + XTI = 2) .ENDS * *^^^^^^^^ End of included SPICE model from models/bas70.mod ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/BC547B.spi vvvvvvvv * .MODEL QBC547B NPN( + IS=2.39E-14 + NF=1.008 + ISE=3.545E-15 + NE=1.541 + BF=294.3 + IKF=0.1357 + VAF=63.2 + NR=1.004 + ISC=6.272E-14 + NC=1.243 + BR=7.946 + IKR=0.1144 + VAR=25.9 + RB=1 + IRB=1E-06 + RBM=1 + RE=0.4683 + RC=0.85 + XTB=0 + EG=1.11 + XTI=3 + CJE=1.358E-11 + VJE=0.65 + MJE=0.3279 + TF=4.391E-10 + XTF=120 + VTF=2.643 + ITF=0.7495 + PTF=0 + CJC=3.728E-12 + VJC=0.3997 + MJC=0.2955 + XCJC=0.6193 + TR=1E-32 + CJS=0 + VJS=0.75 + MJS=0.333 + FC=0.9579 ) * *^^^^^^^^ End of included SPICE model from models/BC547B.spi ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/LM293.5_1 vvvvvvvv * LM293 VOLTAGE COMPARATOR "MACROMODEL" SUBCIRCUIT * CREATED USING PARTS VERSION 4.03 ON 03/07/90 AT 14:17 * REV (N/A) * CONNECTIONS: NON-INVERTING INPUT * | INVERTING INPUT * | | POSITIVE POWER SUPPLY * | | | NEGATIVE POWER SUPPLY * | | | | OPEN COLLECTOR OUTPUT * | | | | | .SUBCKT LM293 1 2 3 4 5 * F1 9 3 V1 1 IEE 3 7 DC 100.0E-6 VI1 21 1 DC .75 VI2 22 2 DC .75 Q1 9 21 7 QIN Q2 8 22 7 QIN Q3 9 8 4 QMO Q4 8 8 4 QMI .MODEL QIN PNP(IS=800.0E-18 BF=2.000E3) .MODEL QMI NPN(IS=800.0E-18 BF=1002) .MODEL QMO NPN(IS=800.0E-18 BF=1000 CJC=1E-15 TR=807.4E-9) E1 10 4 9 4 1 V1 10 11 DC 0 Q5 5 11 4 QOC .MODEL QOC NPN(IS=800.0E-18 BF=20.29E3 CJC=1E-15 TF=942.6E-12 TR=543.8E-9) DP 4 3 modDX RP 3 4 46.3E3 .MODEL modDX D(IS=800.0E-18) * .ENDS *^^^^^^^^ End of included SPICE model from models/LM293.5_1 ^^^^^^^^ * *vvvvvvvv Included SPICE model from models/NTD18N06L.REV0.SP3 vvvvvvvv .SUBCKT ntd18n06l 1 2 3 ************************************** * Model Generated by MODPEX * *Copyright(c) Symmetry Design Systems* * All Rights Reserved * * UNPUBLISHED LICENSED SOFTWARE * * Contains Proprietary Information * * Which is The Property of * * SYMMETRY OR ITS LICENSORS * *Commercial Use or Resale Restricted * * by Symmetry License Agreement * ************************************** * Model generated on Aug 3, 04 * MODEL FORMAT: SPICE3 * Symmetry POWER MOS Model (Version 1.0) * External Node Designations * Node 1 -> Drain * Node 2 -> Gate * Node 3 -> Source M1 9 7 8 8 MM L=100u W=100u * Default values used in MM: * The voltage-dependent capacitances are * not included. Other default values are: * RS=0 RD=0 LD=0 CBD=0 CBS=0 CGBO=0 .MODEL MM NMOS LEVEL=1 IS=1e-32 +VTO=1.98948 LAMBDA=0 KP=21.272 +CGSO=4.18085e-06 CGDO=8.56633e-08 RS 8 3 0.0375073 D1 3 1 MD .MODEL MD D IS=8.82716e-09 RS=0.00616994 N=1.5 BV=60 +IBV=0.00025 EG=1 XTI=2.2423 TT=0 +CJO=5.77207e-10 VJ=0.656334 M=0.448458 FC=0.5 RDS 3 1 2.4e+11 RD 9 1 0.0001 RG 2 7 17.1584 D2 4 5 MD1 * Default values used in MD1: * RS=0 EG=1.11 XTI=3.0 TT=0 * BV=infinite IBV=1mA .MODEL MD1 D IS=1e-32 N=50 +CJO=6.54462e-10 VJ=1.69471 M=0.891807 FC=1e-08 D3 0 5 MD2 * Default values used in MD2: * EG=1.11 XTI=3.0 TT=0 CJO=0 * BV=infinite IBV=1mA .MODEL MD2 D IS=1e-10 N=0.400114 RS=3e-06 RL 5 10 1 FI2 7 9 VFI2 -1 VFI2 4 0 0 EV16 10 0 9 7 1 CAP 11 10 6.54462e-10 FI1 7 9 VFI1 -1 VFI1 11 6 0 RCAP 6 10 1 D4 0 6 MD3 * Default values used in MD3: * EG=1.11 XTI=3.0 TT=0 CJO=0 * RS=0 BV=infinite IBV=1mA .MODEL MD3 D IS=1e-10 N=0.400114 .ENDS ntd18n06l *^^^^^^^^ End of included SPICE model from models/NTD18N06L.REV0.SP3 ^^^^^^^^ * *============== Begin SPICE netlist of main design ============ X10 iimage vertsup Vcc 0 ledverte LM293 R20 vmbatm 1 10k *.INCLUDE models/NTD18N06L.REV0.SP3 *.INCLUDE models/LM293.5_1 R33 Imbat V9p 100 *.INCLUDE models/BC547B.spi R32 V9p 0 10k *.INCLUDE models/bas70.mod R31 ledverte Vcc 22k *.INCLUDE models/LM2902.MOD R30 ledrouge Vcc 22k *.INCLUDE models/irf4905.spi *.INCLUDE models/tl431.cir Vbat 2 vmbatm DC 9V V3 3 0 DC 6V R? 0 Vcc 2.2k R19 vmbat Vs2 22k V1 Vcc 0 DC 26V R18 Vs2 Vcc 2.2k R17 vref2 0 430 R16 v7m Vs2 100k X9 V9p V9m Vcc 0 Iimage LM2902/NS R15 iimage v7m 100 R14 vmbat imbat 0.1 X8 vcc 1 BAS70 R9 Vcc vref1 2.2k R29 0 vertsup 1K X7 vref2 v7m Vcc 0 Vs2 LM293 R8 V2p Vs2 100k R13 Vcc vref_temp 2.2k R28 vertsup ledrouge 22k X6 Vcc Vs2 imbat ntd18n06l R7 V2p Vimage 1k R12 0 Vtest_temp 6.05k R27 rougesup rougeinf 20k X5 0 1 vmbatm ntd18n06l R6 vref2 Vtest1 660 R11 Vtest_temp vref_temp 10k R26 0 rougeinf 2.2k R10 Vtest_temp vref_temp 9.387k X4 Vtest1 0 vref1 TL431-R R5 Vtest1 vref1 2.83k R25 3 rougesup 2.2k X3 Vtest_temp 0 vref_temp TL431-R R4 0 v1p 22k Vvcc cmd_buck 0 DC 0V R24 V9m Iimage 10k X2 vref_temp V2p Vcc 0 Vs2 LM293 R3 V1m Vimage 22k X13 ledrouge 4 BAS70 R23 Vmbat V9m 100 X1 v1p V1m Vcc 0 Vimage LM2902/NS R2 vref1 V1m 22k Rbat 2 vmbat 100 X12 vimage rougeinf Vcc 0 4 LM293 R22 Vmbatm V1m 22k R1 vmbat v1p 22k X11 rougesup vimage Vcc 0 4 LM293 R21 0 v1p 22k .end ngspice-26/examples/tclspice/tcl-testbench3/differentiate.tcl0000644000265600020320000001253512264261473024022 0ustar andreasadmin# differentiate.tcl -- # Numerical differentiation # namespace eval ::math::calculus { } namespace eval ::math::optimize { } # deriv -- # Return the derivative of a function at a given point # Arguments: # func Name of a procedure implementing the function # point Coordinates of the point # scale (Optional) the scale of the coordinates # Result: # List representing the gradient vector at the given point # Note: # The scale is necessary to create a proper step in the # coordinates. The derivative is estimated using central # differences. # The function may have an arbitrary number of arguments, # for each the derivative is determined - this results # in a list of derivatives rather than a single value. # (No provision is made for the function to be a # vector function! So, second derivatives are not # possible) # proc ::math::calculus::deriv {func point {scale {}} } { set epsilon 1.0e-12 set eps2 [expr {sqrt($epsilon)}] # # Determine a scale # foreach c $point { if { $scale == {} } { set scale [expr {abs($c)}] } else { if { $scale < abs($c) } { set scale [expr {abs($c)}] } } } if { $scale == 0.0 } { set scale 1.0 } # # Check the number of coordinates # if { [llength $point] == 1 } { set v1 [$func [expr {$point+$eps2*$scale}]] set v2 [$func [expr {$point-$eps2*$scale}]] return [expr {($v1-$v2)/(2.0*$eps2*$scale)}] } else { set result {} set idx 0 foreach c $point { set c1 [expr {$c+$eps2*$scale}] set c2 [expr {$c-$eps2*$scale}] set v1 [eval $func [lreplace $point $idx $idx $c1]] set v2 [eval $func [lreplace $point $idx $idx $c2]] lappend result [expr {($v1-$v2)/(2.0*$eps2*$scale)}] incr idx } return $result } } # auxiliary functions -- # proc ::math::optimize::unitVector {vector} { set length 0.0 foreach c $vector { set length [expr {$length+$c*$c}] } scaleVector $vector [expr {1.0/sqrt($length)}] } proc ::math::optimize::scaleVector {vector scale} { set result {} foreach c $vector { lappend result [expr {$c*$scale}] } return $result } proc ::math::optimize::addVector {vector1 vector2} { set result {} foreach c1 $vector1 c2 $vector2 { lappend result [expr {$c1+$c2}] } return $result } # minimumSteepestDescent -- # Find the minimum of a function via steepest descent # (unconstrained!) # Arguments: # func Name of a procedure implementing the function # point Coordinates of the starting point # eps (Optional) measure for the accuracy # maxsteps (Optional) maximum number of steps # Result: # Coordinates of a point near the minimum # proc ::math::optimize::minimumSteepestDescent {func point {eps 1.0e-5} {maxsteps 100} } { set factor 100 set nosteps 0 if { [llength $point] == 1 } { while { $nosteps < $maxsteps } { set fvalue [$func $point] set gradient [::math::calculus::deriv $func $point] if { $gradient < 0.0 } { set gradient -1.0 } else { set gradient 1.0 } set found 0 set substeps 0 while { $found == 0 && $substeps < 3 } { set newpoint [expr {$point-$factor*$gradient}] set newfval [$func $newpoint] #puts "factor: $factor - point: $point" # # Check that the new point has a lower value for the # function. Can we increase the factor? # # if { $newfval < $fvalue } { set point $newpoint # # This failed with sin(x), x0 = 1.0 # set newpoint2 [expr {$newpoint-$factor*$gradient}] # set newfval2 [$func $newpoint2] # if { $newfval2 < $newfval } { # set factor [expr {2.0*$factor}] # set point $newpoint2 # } set found 1 } else { set factor [expr {$factor/2.0}] } incr substeps } # # Have we reached convergence? # if { abs($factor*$gradient) < $eps } { break } incr nosteps } } else { while { $nosteps < $maxsteps } { set fvalue [eval $func $point] set gradient [::math::calculus::deriv $func $point] set gradient [unitVector $gradient] set found 0 set substeps 0 while { $found == 0 && $nosteps < $maxsteps } { set newpoint [addVector $point [scaleVector $gradient -$factor]] set newfval [eval $func $newpoint] #puts "factor: $factor - point: $point" # # Check that the new point has a lower value for the # function. Can we increase the factor? # # if { $newfval < $fvalue } { set point $newpoint set found 1 } else { set factor [expr {$factor/2.0}] } incr nosteps } # # Have we reached convergence? # if { abs($factor) < $eps } { break } incr nosteps } } return $point } ngspice-26/examples/tclspice/tcl/0000755000265600020320000000000012264261473016437 5ustar andreasadminngspice-26/examples/tclspice/tcl/diffpair.cir0000644000265600020320000000101012264261473020712 0ustar andreasadminsimple differential pair - CM and DM dc sensitivity * Models: .model qnl npn(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) .model qnr npn(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) * Circuit description: q1 4 2 6 qnr q2 5 3 6 qnl rs1 11 2 1k rs2 3 1 1k rc1 4 8 10k rc2 5 8 10k q3 7 7 9 qnl q4 6 7 9 qnr rbias 7 8 20k * Inputs/Supplies: vcm 1 0 dc 0 sin(0 0.1 5meg) ac 1 vdm 1 11 dc 0 sin(0 0.1 5meg) ac 1 vcc 8 0 12 vee 9 0 -12 * Analysys: .tf v(5) vcm .tf v(5) vdm .sens v(5,4) .end ngspice-26/examples/tclspice/tcl/test_vectoblt.tcl0000755000265600020320000001067312264261473022036 0ustar andreasadmin#!/bin/sh # WishFix \ exec wish -f "$0" ${1+"$@"} ### package require BLT load ../../../src/.libs/libspice.so spice::source "diffpair.cir" spice::op spice::let Vd = V(5) - V(4) blt::vector imag blt::vector real set ok 0 ################### puts " Vd is a real vector of length 1" ################### #too many arguments if {[catch {spice::vectoblt raul ibrahim ector karim} erreur] != 0} {puts "ERROR EXPECTED: TEST 1 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 1 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable argument if {[catch {spice::vectoblt raul ibrahim ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 2 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 2 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable blt vector if {[catch {spice::vectoblt Vd ibrahim} erreur] != 0} {puts "ERROR EXPECTED: TEST 3 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 3 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #real part affectation if {[catch {spice::vectoblt Vd real} erreur] == 0} {puts "NO ERROR IN AFFECTATION. TEST 4 OK:\n\t (Blank line)"; set ok [expr {$ok + 1}]} else {puts "TEST 4 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable blt vector (2 vectors) if {[catch {spice::vectoblt Vd ibrahim ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 5 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 5 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable imaginary vector if {[catch {spice::vectoblt Vd real ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 6 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 6 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #real and imaginary part affectation if {[catch {spice::vectoblt Vd real imag} erreur] == 0} {puts "NO ERROR IN AFFECTATION. TEST 7 OK:\n\t (Blank line)"; set ok [expr {$ok + 1}]} else {puts "TEST 7 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #all good vectors, but another argument invited himself if {[catch {spice::vectoblt Vd real imag karim} erreur] != 0} {puts "ERROR EXPECTED: TEST 8 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 8 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} ################### puts " Vd is a complex vector of length 10" ################### spice::op spice::ac dec 10 100 1000 spice::let Vd = V(5) - V(4) #too many arguments if {[catch {spice::vectoblt raul ibrahim ector karim} erreur] != 0} {puts "ERROR EXPECTED: TEST 1 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 1 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable argument if {[catch {spice::vectoblt raul ibrahim ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 2 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 2 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable blt vector if {[catch {spice::vectoblt Vd ibrahim} erreur] != 0} {puts "ERROR EXPECTED: TEST 3 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 3 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #real part affectation if {[catch {spice::vectoblt Vd real} erreur] == 0} {puts "NO ERROR IN AFFECTATION. TEST 4 OK:\n\t (Blank line)"; set ok [expr {$ok + 1}]} else {puts "TEST 4 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable blt vector (2 vectors) if {[catch {spice::vectoblt Vd ibrahim ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 5 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 5 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #no acceptable imaginary vector if {[catch {spice::vectoblt Vd real ector} erreur] != 0} {puts "ERROR EXPECTED: TEST 6 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 6 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #real and imaginary part affectation if {[catch {spice::vectoblt Vd real imag} erreur] == 0} {puts "NO ERROR IN AFFECTATION. TEST 7 OK:\n\t (Blank line)"; set ok [expr {$ok + 1}]} else {puts "TEST 7 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} #all good vectors, but another argument invited himself if {[catch {spice::vectoblt Vd real imag karim} erreur] != 0} {puts "ERROR EXPECTED: TEST 8 OK:\n\t$erreur"; set ok [expr {$ok + 1}]} else {puts "TEST 8 ERROR\n\t Test 1 should return TCL_ERROR, but it does not"} puts "\n\n" if {$ok == 16} {puts "spice::vectoblt OK ($ok/16 tests ok)"} else {puts "spice::vectoblt KO:\n\t$ok/16 tests ok"} ngspice-26/examples/proc2mod/0000755000265600020320000000000012264261473015574 5ustar andreasadminngspice-26/examples/proc2mod/process.pro0000644000265600020320000001303012264261473017771 0ustar andreasadminNM1 PM1 NM2 PM2 NM3 PY1 ML1 ML2 DU1 DU2 * * Example process file * *PROCESS=BSIM *RUN= *WAFER= *XPOS=6 *YPOS=5 *OPERATOR=Min-Chie *DATE=July-16-85 * * NMOS-1 PARAMETERS (07-16-85) * -1.0087E+000,-2.1402E-001,3.44354E-001 7.96434E-001,0.00000E+000,0.00000E+000 1.31191E+000,3.23395E-001,-5.7698E-001 1.46640E-001,1.68585E-001,-1.8796E-001 -1.0027E-003,-9.4847E-003,1.47316E-002 5.34334E+002,7.9799E-001,4.7740E-001 4.38497E-002,6.38105E-002,-6.1053E-002 -5.7332E-002,1.01174E+000,1.62706E-002 8.25434E+000,-2.4197E+001,1.95696E+001 -7.6911E-004,9.62411E-003,-3.7951E-003 7.86777E-004,7.35448E-004,-1.7796E-003 1.06821E-003,-8.0958E-003,4.03379E-003 -1.9209E-002,-7.4573E-002,1.47520E-002 5.40612E+002,6.21401E+002,-1.9190E+002 -1.2992E+001,-6.4900E+001,4.29043E+001 -9.4035E+000,1.18239E+002,-2.9747E+001 0.0000E-002,0.00000E-001,0.0000E-002 3.00000E-002,2.70000E+001,5.00000E+000 ** 2.70000E-010,2.70000E-010,1.40000E-010 ** remove the overlap capacitances !! 0.00000E-000,0.00000E-000,0.00000E-000 1.0 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 * *PROCESS=BSIM *RUN= *WAFER= *XPOS=6 *YPOS=5 *OPERATOR= TRANSLATED FROM NM1 * (BY SCALING THE MOBILITY PARAMETERS) *DATE=July-16-85 * * PMOS-1 PARAMETERS (07-16-85) * -1.0087E+000,-2.1402E-001,3.44354E-001 7.96434E-001,0.00000E+000,0.00000E+000 1.31191E+000,3.23395E-001,-5.7698E-001 1.46640E-001,1.68585E-001,-1.8796E-001 -1.0027E-003,-9.4847E-003,1.47316E-002 1.82193E+002,2.7226E-001,1.6288E-001 4.38497E-002,6.38105E-002,-6.1053E-002 -5.7332E-002,1.01174E+000,1.62706E-002 2.81626E+000,-0.8255E+001,0.66768E+001 -7.6911E-004,9.62411E-003,-3.7951E-003 7.86777E-004,7.35448E-004,-1.7796E-003 1.06821E-003,-8.0958E-003,4.03379E-003 -1.9209E-002,-7.4573E-002,1.47520E-002 1.84449E+002,2.12012E+002,-0.6547E+002 -0.4433E+001,-2.2143E+001,1.46383E+001 -3.2083E+000,0.40341E+002,-1.0149E+001 0.0000E-002,0.00000E-001,0.0000E-002 3.00000E-002,2.70000E+001,5.00000E+000 ** 2.70000E-010,2.70000E-010,1.40000E-010 ** remove the overlap capacitances !! 0.00000E-000,0.00000E-000,0.00000E-000 1.0 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 * * *PROCESS=BSIM *RUN=6,8 *WAFER=1 *XPOS=6 *YPOS=5 *OPERATOR=joey & min *DATE=3/8/'85 * * NMOS-2 PARAMETERS (03-08-85) * -1.0682E+000,-6.7765E-002,4.15888E-001 7.93602E-001,0.00000E+000,0.00000E+000 1.38210E+000,1.56889E-001,-6.3435E-001 1.60163E-001,1.41849E-001,-2.0333E-001 -1.1885E-002,1.33579E-002,2.13053E-002 5.44582E+002,9.4444E-001,4.4423E-001 4.02955E-002,5.36003E-002,-5.1224E-002 2.01256E-001,4.30621E-001,-1.5909E-001 -1.1522E+000,-2.5360E+000,2.48135E+001 -3.0525E-003,1.40355E-002,-2.1259E-003 2.33703E-003,-1.9621E-003,-3.0147E-003 -1.5014E-003,-1.7938E-003,5.04494E-003 -9.6961E-002,9.68463E-002,6.56404E-002 5.95572E+002,4.75833E+002,-2.3062E+002 -7.7819E+001,7.75110E+001,8.19963E+001 -1.8177E+001,1.23358E+002,-1.9316E+001 0.0000E-003,0.00000E-002,0.0000E-002 3.20000E-002,2.70000E+001,5.00000E+000 2.69000E-010,2.69000E-010,2.34000E-010 1.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 * * PMOS-2 PARAMETERS (03-08-85) * -2.1389E-001,3.36471E-002,2.20237E-001 6.97239E-001,0.00000E+000,0.00000E+000 5.95618E-001,-9.7957E-002,-8.1902E-002 -2.0029E-002,1.97751E-002,-4.0038E-002 -1.4030E-002,3.62814E-002,1.44720E-002 1.82193E+002,8.6560E-001,5.7444E-001 1.12067E-001,9.28463E-002,-8.8985E-002 2.39431E-002,8.89483E-002,1.05634E-002 7.51914E+000,-1.8327E+000,3.98658E+000 -1.3199E-003,4.00836E-003,1.97847E-004 5.70255E-004,-1.2309E-003,-2.3082E-003 5.07623E-003,-1.8537E-004,1.76966E-003 -1.2781E-002,1.14420E-002,6.36308E-003 1.89043E+002,8.64555E+001,-3.4304E+001 4.09098E+000,3.51921E+000,4.49145E+000 6.71879E-001,7.66627E+000,-1.5826E+000 0.0000E-003,0.00000E-003,0.0000E-003 3.20000E-002,2.70000E+001,5.00000E+000 4.39000E-010,4.39000E-010,2.34000E-010 1.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 * *PROCESS=BSIM *RUN= *WAFER= *XPOS=6 *YPOS=5 *OPERATOR= TRANSLATED FROM NM1 * (BY SHIFTING VFB --- THE SIZE-INDEP. TERM ONLY) *DATE=July-16-85 * * NMOS-3 PARAMETERS (DEPLETION-MODE) (07-16-85) * -5.6087E+000,-2.1402E-001,3.44354E-001 +** -1.0087E+000,-2.1402E-001,3.44354E-001 7.96434E-001,0.00000E+000,0.00000E+000 1.31191E+000,3.23395E-001,-5.7698E-001 1.46640E-001,1.68585E-001,-1.8796E-001 -1.0027E-003,-9.4847E-003,1.47316E-002 5.34334E+002,7.9799E-001,4.7740E-001 4.38497E-002,6.38105E-002,-6.1053E-002 -5.7332E-002,1.01174E+000,1.62706E-002 8.25434E+000,-2.4197E+001,1.95696E+001 -7.6911E-004,9.62411E-003,-3.7951E-003 7.86777E-004,7.35448E-004,-1.7796E-003 1.06821E-003,-8.0958E-003,4.03379E-003 -1.9209E-002,-7.4573E-002,1.47520E-002 5.40612E+002,6.21401E+002,-1.9190E+002 -1.2992E+001,-6.4900E+001,4.29043E+001 -9.4035E+000,1.18239E+002,-2.9747E+001 0.0000E-002,0.00000E-001,0.0000E-002 3.00000E-002,2.70000E+001,5.00000E+000 ** 2.70000E-010,2.70000E-010,1.40000E-010 ** remove the overlap capacitances !! 0.00000E-000,0.00000E-000,0.00000E-000 1.0 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 0.0, 0.0, 0.0 * ************************************** ************************************** * * poly layer-1 * 30.0, 7.0E-5, 0, 0, 0 0, 0, 0, 0, 0 * * metal layer-1 * 0.040, 2.60E-5, 0, 0, 0 0, 0, 0, 0, 0 * * metal layer-2 (top metal) * 0.030, 1.3E-5, 0, 0, 0 0, 0, 0, 0, 0 * * n+ diffusion layer * 35.0, 2.75E-4, 1.90E-10, 1.0E-5, 0.7 0.8, 0.5, 0.33, 0, 0 * * p+ diffusion layer * 120.0, 3.1E-4, 3.0E-010, 1.0E-5, 0.7 0.8, 0.5, 0.33, 0, 0 ngspice-26/examples/pss/0000755000265600020320000000000012264261473014654 5ustar andreasadminngspice-26/examples/pss/colpitt_osc_pss.cir0000644000265600020320000000076112264261473020566 0ustar andreasadminColpitt's Oscillator Circuit * Colpitt is an harmonic oscillator (LC based) which use * a capacitive partition of resonator to feed the single * active device. * Predicted frequency is about 3.30435e+06 Hz. * Models: .model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) r1 1 0 1 q1 2 1 3 qnl vcc 4 0 5 rl 4 2 750 c1 2 3 500p c2 4 3 4500p l1 4 2 5uH re 3 6 4.65k vee 6 0 dc -10 pwl 0 0 1e-9 -10 *.tran 30n 12u .pss 3.1e6 500e-6 3 256 10 50 5e-3 ngspice-26/examples/pss/hartley_osc_pss.cir0000644000265600020320000000075512264261473020563 0ustar andreasadminHartley's Oscillator Circuit * Hartley is an harmonic oscillator (LC based) which use * an inductive partition of resonator to feed the single * active device. Output is taken on node 2. * Prediceted frequency is about 121.176 Hz. * * PLOT V(3) * Models: .model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) vcc 1 0 5 pwl 0 0 1e-5 5 r1 1 2 0.2k q1 2 3 0 qnl c1 3 4 633n l1 3 0 1.5 l2 0 4 500m r2 4 2 100 *.tran 300n 50m .pss 50 200e-3 2 1024 11 10 5e-3 uic ngspice-26/examples/pss/vdp_osc_pss.cir0000644000265600020320000000060212264261473017673 0ustar andreasadminVan Der Pol Oscillator * Prediceted frequency is about 4.54167e+06 Hz. * Third harmonic is high as the first one Ba gib 0 I=-1e-2*v(gib,0)+1e-2*v(gib,0)^3 * Q is about 10 La gib 0 1.2e-6 Ra gib 0 158.113 Ca gib 0 1e-9 ic=0.5 *La gib 0 1e-9 *Ra gib 0 474.6 *Ca gib 0 1e-9 ic=0.5 * Ghost node... Test for my PSS! Rb bad 0 1k *.tran 1e-9 150e-6 uic .pss 0.8e6 130e-6 1 50 10 50 5e-3 uic ngspice-26/examples/pss/vackar_osc_pss.cir0000644000265600020320000000071712264261473020360 0ustar andreasadminVackar's Oscillator Circuit * Vackar is a derivation of Colpitt's oscillator (LC based). * Oscillation is taken on node 4. * Predicted frequency is 1.91803e+06Hz. * Models: .model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) vcc 1 0 5 pwl 0 10 1e-9 5 lrfc 1 2 100u cdec 2 0 7n q1 3 2 0 qnl rb 3 0 4700 c1 3 4 100p c2 3 0 600p c0 4 0 1n l1 4 1 6.2u *.tran 30n 12u *.plot tran v(4) .pss 1e6 10e-6 4 1024 10 50 5e-3 uic ngspice-26/examples/pss/compl_cross_quad_osc_pss.cir0000644000265600020320000000165312264261473022446 0ustar andreasadminComplimentary Cross Quad CMOS Oscillator * Predicted frequency is 5.61224e+08 Hz. * * PLOT i1 * Supply vdd vdd gnd 1.2 pwl 0 1.2 1e-9 1.2 rdd vdd vdd_ana 70m rgnd gnd gnd_ana 70m * Cross quad mpsx v_plus v_minus vdd_ana vdd_ana pch w=10u l=0.1u mnsx v_plus v_minus gnd_ana gnd_ana nch w=10u l=0.1u mpdx v_minus v_plus vdd_ana vdd_ana pch w=10u l=0.1u mndx v_minus v_plus gnd_ana gnd_ana nch w=10u l=0.1u * Lumped elements model of real inductor ls v_plus i1 19.462n ic=0.06 rs i1 v_minus 7.789 cs v_plus v_minus 443f coxs v_plus is 2.178p coxd v_minus id 2.178p rsis is gnd_ana 308 rsid id gnd_ana 308 csis is gnd_ana 51f csid id gnd_ana 51f * Parallel capacitor to determine leading resonance cp v_plus v_minus 3.4p .model nch nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) *.tran 0.05n 1u uic .pss 500e6 1u 1 1024 10 10 5e-3 uic ngspice-26/examples/pss/ring_osc_pss.cir0000644000265600020320000000151212264261473020042 0ustar andreasadminRing CMOS Oscillator * Oscillation is taken on node "bout". * Predicted frequency is 3.8e+09 Hz. * * PLOT bout * Supply vdd vdd gnd 1.2 pwl 0 1.2 1e-9 1.2 rdd vdd vdd_ana 70m rgnd gnd gnd_ana 70m * Inverter mp1 inv1 inv3 vdd_ana vdd_ana pch w=10u l=0.18u mn1 inv1 inv3 gnd_ana gnd_ana nch w=10u l=0.18u mp2 inv2 inv1 vdd_ana vdd_ana pch w=10u l=0.18u mn2 inv2 inv1 gnd_ana gnd_ana nch w=10u l=0.18u mp3 inv3 inv2 vdd_ana vdd_ana pch w=10u l=0.18u mn3 inv3 inv2 gnd_ana gnd_ana nch w=10u l=0.18u * Buffer out mp4 bout inv3 vdd_ana vdd_ana pch w=10u l=0.18u mn4 bout inv3 gnd_ana gnd_ana nch w=10u l=0.18u .model nch nmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) .model pch pmos ( version=4.4 level=54 lmin=0.1u lmax=20u wmin=0.1u wmax=10u ) *.tran 0.005n 100n *.plot tran v(4) .pss 624e6 500n 1 1024 10 5 5e-3 uic ngspice-26/examples/control_structs/0000755000265600020320000000000012264261473017316 5ustar andreasadminngspice-26/examples/control_structs/new-check-3.sp0000644000265600020320000000277412264261473021700 0ustar andreasadminnew ft_getpnames parser check 3, try ternary * (compile (concat "tmp-1/ng-spice-rework/src/ngspice " buffer-file-name) t) VIN 1 0 DC=0 .control dc VIN 0 10 5 * trying the ternary let checks = 0 let const0 = 0 let const5 = 5 let const6 = 6 let tmp = const0 ? const5 : const6 if tmp eq const6 let checks = checks + 1 else echo "ERROR:" end let tmp = const6 ? const5 : const6 if tmp eq const5 let checks = checks + 1 else echo "ERROR:" end define foo(a,b,d) a ? b : d if foo(const0,const5,const6) eq const6 let checks = checks + 1 else echo "ERROR:" end if foo(const6,const5,const6) eq const5 let checks = checks + 1 else echo "ERROR:" end let vec7 = 7*unitvec(7) let vec8 = 8*unitvec(8) if length(const5 ? vec7 : vec8) eq 7 let checks = checks + 1 else echo "ERROR:" end if length(const0 ? vec7 : vec8) eq 8 let checks = checks + 1 else echo "ERROR:" end * FIXME, "1 ? 1:1" (without spaces around of ':') doesnt work, * "1:1" is a lexem, WHY !!! * ist that an old artifact, (ancient hierarchical name separator ':') * *print length(1?1:1) *if (1 ? 1:1) eq 1 if (1 ? 1 : 1) eq 1 let checks = checks + 1 else echo "ERROR:" end print @vin[dc] * '"' survives, and will be processed in the ft_getpnames() lexer, that is PPlex() * where the string will be unqoted * thats used vor weired variable names, for example "zero(1)" let foo = "vec8" if foo eq vec8 let checks = checks + 1 else echo "ERROR:" end if checks eq 8 echo "INFO: ok" else echo "ERROR:" end .endc .end ngspice-26/examples/control_structs/s-param.cir0000644000265600020320000000620312264261473021356 0ustar andreasadminTest for Scattering Parameters ** Two ports ** Examples: Bipolar, Tschebyschef, RC .param Rbase=50 Vbias_in=0 Vbias_out=0 *** The two-port circuit: ** port 1: in 0 ** port 2: out 0 ** Bias on both ports through resistor Rbase (to obtain operating point) ** Example RF Bipolar mrf5711 ** VCE 1 V, IE = 5mA ** QXXXXXXX nc nb ne ** model obtained from ** http://141.69.160.32/~krausg/Spice_Model_CD/Vendor%20List/Motorola/Spice/RFBJT/ *.include MRF5711.lib *XMRF5711 out in e MRF5711 *Ie e 0 5m *Ce e 0 1 ** Example Tschebyschef Low Pass filter C1 in 0 33.2p L1 in 2 99.2n C2 2 0 57.2p L2 2 out 99.2n C3 out 0 33.2p ** Example RC ** see ** http://www.allenhollister.com/allen/files/scatteringparameters.pdf *R2 in out 10 *C1 out int5 30p *R1 int5 0 10 *** End of circuit ** The following subcircuit to be changed only by an experienced user! *** Driver and readout X1 in out S22 S12 S_PARAM .SUBCKT S_PARAM 22 66 5 7 * Resistors emulate switches with Ron=0.001 and Roff=1e12 * to switch driver to input and readout to output (and vice versa, see below) RS1 22 2 0.001 RS2 66 6 0.001 RS3 22 6 1e12 RS4 66 2 1e12 *Driver Vacdc 1 0 DC 'Vbias_in' AC 1 $ ac voltage and dc bias at input (applied through load resistor) R1 1 2 'Rbase' E1 3 0 2 0 2 $ amplify in port ac voltage by 2 Vac 3 4 DC 0 AC 1 $ subtract driving ac voltage R_loop 4 5 0.001 R3 5 0 1 $ ground return for measure node 5 *Readout E2 7 0 6 0 2 $ amplify out port ac voltage by 2 R4 6 8 'Rbase' $ load resistor at output (ac) Vdc 8 0 DC 'Vbias_out' AC 0 $ dc bias at output (applied through load resistor) .ends ** Check the two ac lines below for being equal! .control set noaskquit set filetype=ascii *** measurement for s11 and s21 op ** save bias voltages to vector let Vdcnew=V(X1.1) $ former Vacdc let Vacdcnew=v(X1.8) $ former Vdc ** first ac measurement (change this line only together with following ac line) *ac lin 20 0.1G 2G $ use for bip transistor ac lin 100 2.5MEG 250MEG $ use for Tschebyschef *ac lin 101 1k 10G $ use for RC ** ** switch input and output alter R.X1.RS1=1e12 alter R.X1.RS2=1e12 alter R.X1.RS3=0.001 alter R.X1.RS4=0.001 ** switch bias voltages between in and out alter V.X1.Vacdc DC=op1.Vacdcnew alter V.X1.Vdc DC=op1.Vdcnew *** measurement for s12 and s22 op ** second ac measurement (change this line only together with ac line above) *ac lin 20 0.1G 2G $ use for bip transistor ac lin 100 2.5MEG 250MEG $ use for Tschebyschef *ac lin 101 1 10G $ use for RC ** let s11=ac1.s22 let s21=ac1.s12 settype s-param S11 S21 S22 S12 let S11db = db(s11) let S12db = db(s12) let S21db = db(s21) let S22db = db(s22) settype decibel S11db S21db S22db S12db let P11=180*ph(s11)/pi let P21=180*ph(s21)/pi let P22=180*ph(S22)/pi let P12=180*ph(S12)/pi settype phase P11 P21 P22 P12 let Rbase=@R.X1.R4[Resistance] settype impedance Rbase *plot s11db s21db S22db S12db ylimit -50 0 xlog $ used with RC plot s11db s21db S22db S12db ylimit -0.5 0 $ used with Tschebyschef plot P11 P21 P22 P12 plot smithgrid S11 S12 *wrdata s3046 mag(S11) P11 mag(S21) P21 mag(S22) P22 mag(S12) P12 $ write simple table wrs2p s3046.s2p $ write touchstone vers. 1 file s3046.s2p .endc .end ngspice-26/examples/control_structs/foreach_bjt_ft.sp0000644000265600020320000000251612264261473022625 0ustar andreasadminBJT ft Test vce 1 0 dc 3.0 vgain 1 c dc 0.0 f 0 2 vgain -1000 l 2 b 1g c 2 0 1g ib 0 b dc 0.0 ac 1.0 ic 0 c 0.01 q1 c b 0 bfs17 .control foreach myic 0.5e-3 1e-3 5e-3 10e-3 50e-3 100e-3 alter ic = $myic ac dec 10 10k 5g end *foreach mytf 50p 100p 150p 200p 250p 300p * altermod q.x1.q1 tf = $mytf * ac dec 10 10k 5g *end plot abs(ac1.vgain#branch) abs(ac2.vgain#branch) abs(ac3.vgain#branch) abs(ac4.vgain#branch) abs(ac5.vgain#branch) abs(ac6.vgain#branch) ylimit 0.1 100 loglog .endc ***************************************************************** * SPICE2G6 MODEL OF THE NPN BIPOLAR TRANSISTOR BFS17 (SOT-23) * * REV: 98.1 DANALYSE GMBH BERLIN (27.07.1998) * ***************************************************************** .SUBCKT BFS17C 1 2 3 Q1 6 5 7 BFS17 1.000 LC 1 6 0.350N L1 2 4 0.400N LB 4 5 0.500N L2 3 8 0.400N LE 8 7 0.600N CGBC 4 6 70.00F CGBE 4 8 0.150P CGCE 6 8 15.00F .ENDS .MODEL BFS17 NPN (level=1 IS=0.480F NF=1.008 BF=99.655 VAF=90.000 IKF=0.190 + ISE=7.490F NE=1.762 NR=1.010 BR=38.400 VAR=7.000 IKR=93.200M + ISC=0.200F NC=1.042 + RB=1.500 IRB=0.100M RBM=1.200 + RE=0.500 RC=2.680 + CJE=1.325P VJE=0.700 MJE=0.220 FC=0.890 + CJC=1.050P VJC=0.610 MJC=0.240 XCJC=0.400 + TF=56.940P TR=1.000N PTF=21.000 + XTF=68.398 VTF=0.600 ITF=0.700 + XTB=1.600 EG=1.110 XTI=3.000 + KF=1.000F AF=1.000) .end ngspice-26/examples/control_structs/new-check-4.sp0000644000265600020320000000351312264261473021671 0ustar andreasadmindemonstrate < etc in ft_getpnames * (compile (concat "tmp-1/ng-spice-rework/src/ngspice " buffer-file-name) t) VIN 1 0 DC=0 .control dc VIN 0 10 5 let checks = 0 let const0 = 0 let const5 = 5 let const6 = 6 * check some relational operators, which are in danger to mixed up * with csh semantic, that is IO redirection if const5 < const6 let checks = checks + 1 else echo "ERROR:" end if const6 > const5 let checks = checks + 1 else echo "ERROR:" end if const5 >= const5 let checks = checks + 1 else echo "ERROR:" end if const5 <= const5 let checks = checks + 1 else echo "ERROR:" end if const5 = const5 let checks = checks + 1 else echo "ERROR:" end * check some wired non-equality operators * note: there are some awkward tranformations ahead of the ft_getpnames lexer * transforming "><" into "> <" * and "<>" into "< >" * note: "!=" would have been in serious danger to be fooled up within * csh history mechanism if const6 <> const5 let checks = checks + 1 else echo "ERROR:" end if const6 >< const5 let checks = checks + 1 else echo "ERROR:" end * check some boolean operators, which are in danger to be mixed up * with csh semantic, `&' background '|' pipe '~' homedirectory if const5 & const5 let checks = checks + 1 else echo "ERROR:" end if const0 | const5 let checks = checks + 1 else echo "ERROR:" end if ~ const0 let checks = checks + 1 else echo "ERROR:" end * note: * "!=" would be in danger, '!' triggers the csh history mechanism *if const5 != const6 * echo "just trying" *end * Note: csh semantics swallows the '>' and '<' operators * on most of the com lines * witnessed by let tmp = const5 > unwanted_output_file_1 define foo(a,b) a > unwanted_output_file_2 print const0 > unwanted_output_file_3 if checks eq 10 echo "INFO: ok" end .endc .end ngspice-26/examples/control_structs/repeat3.sp0000644000265600020320000000564312264261473021235 0ustar andreasadminTest sequences for ngspice control structures *vectors are used (except foreach) *start in interactive mode .control * test for while, repeat, if, break let loop = 0 while loop < 4 let index = 0 repeat let index = index + 1 if index > 4 break end end echo index "$&index" loop "$&loop" let loop = loop + 1 end * test sequence for while, dowhile let loop = 0 echo echo enter loop with "$&loop" dowhile loop < 3 echo within dowhile loop "$&loop" let loop = loop + 1 end echo after dowhile loop "$&loop" echo let loop = 0 while loop < 3 echo within while loop "$&loop" let loop = loop + 1 end echo after while loop "$&loop" let loop = 3 echo echo enter loop with "$&loop" dowhile loop < 3 echo within dowhile loop "$&loop" $ output expected let loop = loop + 1 end echo after dowhile loop "$&loop" echo let loop = 3 while loop < 3 echo within while loop "$&loop" $ no output expected let loop = loop + 1 end echo after while loop "$&loop" * test sequence for foreach echo foreach outvar 0 0.5 1 1.5 echo parameters: $outvar $ foreach parameters are variables, not vectors! end * test for if ... else ... end echo let loop = 0 let index = 1 dowhile loop < 10 let index = index * 2 if index < 128 echo "$&index" lt 128 else echo "$&index" ge 128 end let loop = loop + 1 end * simple test for label, goto echo let loop = 0 label starthere echo start "$&loop" let loop = loop + 1 if loop < 3 goto starthere end echo end "$&loop" * test for label, nested goto echo let loop = 0 label starthere1 echo start nested "$&loop" let loop = loop + 1 if loop < 3 if loop < 3 goto starthere1 end end echo end "$&loop" * test for label, goto echo let index = 0 label starthere2 let loop = 0 echo We are at start with index "$&index" and loop "$&loop" if index < 6 label inhere let index = index + 1 if loop < 3 let loop = loop + 1 if index > 1 echo jump2 goto starthere2 end end echo jump goto inhere end echo We are at end with index "$&index" and loop "$&loop" * test goto in while loop echo let loop = 0 if 1 $ outer loop to allow nested forward label 'endlabel' while loop < 10 if loop > 5 echo jump goto endlabel end let loop = loop + 1 end echo before $ never reached label endlabel echo after "$&loop" end *test for using variables * simple test for label, goto echo set loop = 0 label starthe echo start $loop let loop = $loop + 1 $ expression needs vector at lhs set loop = "$&loop" $ convert vector contents to variable if $loop < 3 goto starthe end echo end $loop .endc ngspice-26/examples/transient-noise/0000755000265600020320000000000012264261473017171 5ustar andreasadminngspice-26/examples/transient-noise/modelcard.pmos0000644000265600020320000000156312264261473022030 0ustar andreasadmin.model P1 PMOS +Level= 8 version=3.3.0 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 ngspice-26/examples/transient-noise/noi-sc-tr.cir0000644000265600020320000000166112264261473021507 0ustar andreasadmin* simple sample & hold, transient noise * switch control * PULSE(V1 V2 TD TR TF PW PER) vgate1 ga1 0 dc 0 pulse (0 1 0 10n 10n 90n 200n) Switch1 1 2 ga1 0 smodel1 * noisy input * rms value white, time step, exponent < 2, rms value 1/f vin 1 0 dc 0 trnoise 0.1m 0.2n 1 0.1m *vin 1 0 dc 0 trnoise 0.1m 0.2n 0 0.1m * output c2 2 0 10p * second S&H vgate2 ga2 0 dc 0 pulse (0 1 140n 10n 10n 30n 200n) *Buffer EXXXXXXX N+ N- NC+ NC- VALUE e1 4 0 2 0 1 Switch2 4 3 ga2 0 smodel2 c3 3 0 10p .option itl1=500 gmin=1e-15 itl4=10 acct .model smodel1 sw vt=0.5 ron=100 .model smodel2 sw vt=0.5 ron=100 .tran 0.4n 100u .control unset ngdebug set filetype=ascii rusage run rusage all write noi_test.out v(1) plot v(2) v(3) xlimit 4u 5u plot v(ga1) v(ga2) xlimit 4u 5u linearize *rms v(1) fft v(3) plot mag(v(3)) loglog xlimit 1e4 1e8 ylimit 1e-10 1e-4 setplot tran1 linearize psd 101 v(3) plot mag(v(3)) xlimit 0 3e7 ylimit 0 10u .endc .end ngspice-26/examples/transient-noise/noi-ring51-demo.cir0000644000265600020320000000207712264261473022510 0ustar andreasadmin* 51 stage Ring-Osc. BSIM3, transient noise * will need 45 min on a i7 860 with 4 threads * closes the loop between inverters xinv1 and xinv5 vin in out dc 0.5 pulse 0.5 0 0.1n 5n 1 1 1 vdd dd 0 dc 0 pulse 0 2.2 0 1n 1 1 1 vss ss 0 dc 0 ve sub 0 dc 0 vpe well 0 2.2 * noisy inverters xiinv2 dd ss sub well out25 out50 inv253 xiinv1 dd ss sub well in out25 inv253 *very noisy inverter xiinv5 dd ss sub well out50 out inv1_2 *output amplifier xiinv11 dd ss sub well out25 bufout inv1 cout bufout ss 0.2pF .option itl1=500 gmin=1e-15 itl4=10 noacct * .dc vdd 0 2 0.01 .tran 0.01n 500n .save in bufout v(t1) .include modelcard.nmos .include modelcard.pmos .include noilib-demo.h .control unset ngdebug * first run save bufout $ needed for restricting memory usage rusage tran 8p 10000n rusage plot bufout xlimit 90n 95n linearize fft bufout * next run reset save bufout alter @v.xiinv5.vn1[trnoise] = [ 0 0 0 0 ] $ no noise tran 8p 10000n rusage plot bufout xlimit 90n 95n linearize fft bufout plot mag(bufout) mag(sp2.bufout) xlimit 0 2G ylimit 1e-11 0.1 ylog .endc .end ngspice-26/examples/transient-noise/shot_ng.cir0000644000265600020320000000132312264261473021330 0ustar andreasadmin* Shot noise test with B source, diode * voltage on device (diode, forward) Vdev out 0 DC 0 PULSE(0.4 0.45 10u) * diode, forward direction, to be modeled with noise D1 mess 0 DMOD .model DMOD D IS=1e-14 N=1 X1 0 mess out ishot * device between 1 and 2 * new output terminals of device including noise: 1 and 3 .subckt ishot 1 2 3 * white noise source with rms 1V VNG 0 11 DC 0 TRNOISE(1 1n 0 0) *measure the current i(v1) V1 2 3 DC 0 * calculate the shot noise * sqrt(2*current*q*bandwidth) BI 1 3 I=sqrt(2*abs(i(v1))*1.6e-19*1e7)*v(11) .ends ishot * 20000 sample points .tran 1n 20u .control run plot (-1)*i(vdev) meas tran vdev_rms avg i(vdev) from=0u to=9.9u meas tran vdev_rms avg i(vdev) from=10.1u to=20u .endc .end ngspice-26/examples/transient-noise/README0000644000265600020320000000041012264261473020044 0ustar andreasadmin* noi-ring51-demo ring oszillator with one noisy inverter (requires 45min on a i7 860) * noi-sc-tr noise source sampled * noise_vnoi just a few 1/f and white noise sources * shot_ng emulation of shot noise in a diode * rts-1.cir random telegraph signals noise ngspice-26/examples/transient-noise/noise_vnoi.cir0000644000265600020320000000134212264261473022040 0ustar andreasadmin* Random noise test * internal noise source * one over f VNOI1 1 0 DC 0 TRNOISE(0n 1n 1.7 1n) VNOI2 2 0 DC 0 TRNOISE(0n 1n 1.4 1n) VNOI3 3 0 DC 0 TRNOISE(0n 1n 1.0 1n) VNOI4 4 0 DC 0 TRNOISE(0n 1n 0.5 1n) * white VNOI5 5 0 DC 0 TRNOISE(1n 1n 0 0) * both VNOI6 6 0 DC 0 TRNOISE(1n 1n 1 1n) * 250000 sample points .tran 1n 250u .control run plot v(1) v(2) v(3) v(4) v(5) v(6) plot v(1) v(2) v(3) v(4) v(5) v(6) xlimit 102.0u 102.01u ylimit -3n 3n linearize meas tran vavg5 AVG v(5) from=0 to=250u meas tran vpp5 PP v(5) from=0 to=250u meas tran vrms5 RMS v(5) from=0 to=250u fft v(1) v(2) v(3) v(4) v(5) v(6) plot mag(v(1)) mag(v(2)) mag(v(3)) mag(v(4)) mag(v(5)) loglog xlimit 1e3 1e9 plot mag(v(6)) loglog xlimit 1e3 1e9 .endc .end ngspice-26/examples/transient-noise/noilib-demo.h0000644000265600020320000000345312264261473021545 0ustar andreasadmin * standard inverter made noisy *.subckt inv1 dd ss sub well in out *vn1 out outi dc 0 noise 0.1 0.3n 1.0 0.1 *mn1 outi in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u *mp1 outi in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u *.ends inv1 * standard inverter .subckt inv1 dd ss sub well in out mn1 out in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u mp1 out in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u .ends inv1 * very noisy inverter (noise on vdd and well) .subckt inv1_1 dd ss sub well in out vn1 dd idd dc 0 trnoise 0.05 0.05n 1 0.05 vn2 well iwell dc 0 trnoise 0.05 0.05n 1 0.05 mn1 out in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u mp1 out in idd iwell p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u *Cout out 0 0.1p .ends inv1_1 * another very noisy inverter .subckt inv1_2 dd ss sub well in out vn1 out outi dc 0 trnoise 0.05 8p 1.0 0.001 mn1 outi in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u mp1 outi in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u *Cout out 0 0.1p .ends inv1_2 * another very noisy inverter with current souces parallel to transistor .subckt inv13 dd ss sub well in outi in1 ss outi dc 0 noise 200u 0.05n 1.0 50u mn1 outi in ss sub n1 w=2u l=0.25u AS=3p AD=3p PS=4u PD=4u in2 dd outi dc 0 noise 200u 0.05n 1.0 50u mp1 outi in dd well p1 w=4u l=0.25u AS=7p AD=7p PS=6u PD=6u *Cout out 0 0.1p .ends inv13 .subckt inv53 dd ss sub well in out xinv1 dd ss sub well in 1 inv1 xinv2 dd ss sub well 1 2 inv1 xinv3 dd ss sub well 2 3 inv1 xinv4 dd ss sub well 3 4 inv1 xinv5 dd ss sub well 4 out inv1 .ends inv53 .subckt inv253 dd ss sub well in out xinv1 dd ss sub well in 1 inv53 xinv2 dd ss sub well 1 2 inv53 xinv3 dd ss sub well 2 3 inv53 xinv4 dd ss sub well 3 4 inv53 xinv5 dd ss sub well 4 out inv53 .ends inv253 ngspice-26/examples/transient-noise/modelcard.nmos0000644000265600020320000000224512264261473022024 0ustar andreasadmin*model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS +Level= 8 version=3.3.0 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 ngspice-26/examples/transient-noise/rts-1.cir0000644000265600020320000000105412264261473020636 0ustar andreasadmin* white noise, 1/f noise, RTS noise * voltage source VRTS2 13 12 DC 0 trnoise(0 0 0 0 5m 18u 30u) VRTS3 11 0 DC 0 trnoise(0 0 0 0 10m 20u 40u) VALL 12 11 DC 0 trnoise(1m 1u 1.0 0.1m 15m 22u 50u) VW1of 21 0 DC trnoise(1m 1u 1.0 0.1m) * current source IRTS2 10 0 DC 0 trnoise(0 0 0 0 5m 18u 30u) IRTS3 10 0 DC 0 trnoise(0 0 0 0 10m 20u 40u) IALL 10 0 DC 0 trnoise(1m 1u 1.0 0.1m 15m 22u 50u) R10 10 0 1 IW1of 9 0 DC trnoise(1m 1u 1.0 0.1m) Rall 9 0 1 * 500000 sample points .tran 1u 500u .control run plot v(13) v(21) plot v(10) v(9) .endc .end ngspice-26/aclocal.m40000644000265600020320000125455012264261532014101 0ustar andreasadmin# generated automatically by aclocal 1.11.6 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, # Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.6], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.6])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # Copyright (C) 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_AR([ACT-IF-FAIL]) # ------------------------- # Try to determine the archiver interface, and trigger the ar-lib wrapper # if it is needed. If the detection of archiver interface fails, run # ACT-IF-FAIL (default is to abort configure with a proper error message). AC_DEFUN([AM_PROG_AR], [AC_BEFORE([$0], [LT_INIT])dnl AC_BEFORE([$0], [AC_PROG_LIBTOOL])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([ar-lib])dnl AC_CHECK_TOOLS([AR], [ar lib "link -lib"], [false]) : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], [am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a ]) ]) case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) m4_default([$1], [AC_MSG_ERROR([could not determine $AR interface])]) ;; esac AC_SUBST([AR])dnl ]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, # 2010, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 12 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, # 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, # Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software # Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2009, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # (`yes' being less verbose, `no' or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [ --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0')]) case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few `make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using `$V' instead of `$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 1 # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 3 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR ngspice-26/compile_min.sh0000644000265600020320000000636712264261473015074 0ustar andreasadmin#!/bin/bash # ngspice build script for MINGW-w64, release version, 32 or 64 bit # compile_min.sh #Procedure: # Install MSYS, plus bison, flex, auto tools, perl, libiconv, libintl # Install MINGW-w64, activate OpenMP support # See either http://mingw-w64.sourceforge.net/ or http://tdm-gcc.tdragon.net/ # (allows to generate either 32 or 64 bit executables by setting flag -m32 or -m64) # set path to compiler in msys/xx/etc/fstab (e.g. c:/MinGW64 /mingw) # start compiling with # './compile_min.sh' or './compile_min.sh 64' # Options: # --adms and --enable-adms will install extra HICUM, EKV and MEXTRAM models via the # adms interface. # Please see http://ngspice.sourceforge.net/admshowto.html for more info on adms. # CIDER, XSPICE, and OpenMP may be selected at will. # --disable-debug will give O2 optimization (versus O0 for debug) and removes all debugging info. if test "$1" = "64"; then if [ ! -d "release64" ]; then mkdir release64 if [ $? -ne 0 ]; then echo "mkdir release64 failed"; exit 1 ; fi fi else if [ ! -d "release" ]; then mkdir release if [ $? -ne 0 ]; then echo "mkdir release failed"; exit 1 ; fi fi fi # If compiling sources from git, you may need to uncomment the following two lines: #./autogen.sh #if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi # Alternatively, if compiling sources from git, and want to add adms created devices, # you may need to uncomment the following two lines (and don't forget to add adms option # to the ../configure statement): #./autogen.sh --adms #if [ $? -ne 0 ]; then echo "./autogen.sh failed"; exit 1 ; fi # In the following ../configure commands you will find an additional entry to the CFLAGS # '-fno-omit-frame-pointer'. This entry compensates for a compiler bug of actual mingw gcc 4.6.1. echo if test "$1" = "64"; then cd release64 if [ $? -ne 0 ]; then echo "cd release64 failed"; exit 1 ; fi echo "configuring for 64 bit" echo # You may add --enable-adms to the following command for adding adms generated devices ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp --disable-debug prefix="C:/Spice64" CFLAGS="-m64 -fno-omit-frame-pointer" LDFLAGS="-m64" else cd release if [ $? -ne 0 ]; then echo "cd release failed"; exit 1 ; fi echo "configuring for 32 bit" echo # You may add --enable-adms to the following command for adding adms generated devices ../configure --with-wingui --enable-xspice --enable-cider --enable-openmp --disable-debug prefix="C:/Spice" CFLAGS="-m32 -fno-omit-frame-pointer" LDFLAGS="-m32" fi if [ $? -ne 0 ]; then echo "../configure failed"; exit 1 ; fi echo # make clean is required for properly making the code models echo "cleaning (see make_clean.log)" make clean 2>&1 | tee make_clean.log exitcode=${PIPESTATUS[0]} if [ $exitcode -ne 0 ]; then echo "make clean failed"; exit 1 ; fi echo "compiling (see make.log)" make 2>&1 | tee make.log exitcode=${PIPESTATUS[0]} if [ $exitcode -ne 0 ]; then echo "make failed"; exit 1 ; fi # 32 bit: Install to C:\Spice # 64 bit: Install to C:\Spice64 echo "installing (see make_install.log)" make install 2>&1 | tee make_install.log exitcode=${PIPESTATUS[0]} if [ $exitcode -ne 0 ]; then echo "make install failed"; exit 1 ; fi echo "success" exit 0 ngspice-26/ar-lib0000755000265600020320000001330312264261533013322 0ustar andreasadmin#! /bin/sh # Wrapper for Microsoft lib.exe me=ar-lib scriptversion=2012-03-01.08; # UTC # Copyright (C) 2010, 2012 Free Software Foundation, Inc. # Written by Peter Rosin . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # func_error message func_error () { echo "$me: $1" 1>&2 exit 1 } file_conv= # func_file_conv build_file # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv in mingw) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin) file=`cygpath -m "$file" || echo "$file"` ;; wine) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_at_file at_file operation archive # Iterate over all members in AT_FILE performing OPERATION on ARCHIVE # for each of them. # When interpreting the content of the @FILE, do NOT use func_file_conv, # since the user would need to supply preconverted file names to # binutils ar, at least for MinGW. func_at_file () { operation=$2 archive=$3 at_file_contents=`cat "$1"` eval set x "$at_file_contents" shift for member do $AR -NOLOGO $operation:"$member" "$archive" || exit $? done } case $1 in '') func_error "no command. Try '$0 --help' for more information." ;; -h | --h*) cat <&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ngspice-26/.gitignore0000644000265600020320000000151412264261473014222 0ustar andreasadmin# NOTE! Please use 'git ls-files -i --exclude-standard' # command after changing this file, to see if there are # any tracked files which get ignored after the change. # # (compile "git ls-files -i --exclude-standard") Makefile Makefile.in .deps *.o *.lo *.la .libs *.orig *~ \#*# /autom4te.cache /compile /config.guess /config.log /config.status /config.sub /configure /depcomp /install-sh /libtool /ltmain.sh /aclocal.m4 /m4 /missing /ylwrap /ar-lib /src/include/ngspice/config.h.in /src/include/ngspice/config.h /src/include/ngspice/stamp-h1 /src/maths/cmaths/test_cx_cph /src/maths/cmaths/test_cx_j /src/maths/cmaths/test_cx_mag /src/maths/cmaths/test_cx_ph /src/ngmakeidx /src/ngmultidec /src/ngnutmeg /src/ngproc2mod /src/ngsconvert /src/ngspice /src/ngspice.idx /src/spinit !/xgraph/Makefile.in /release* /debug* /visualc-tcl* ngspice-26/NEWS0000644000265600020320000005136712264261473012744 0ustar andreasadminNgspice-26, Jan 4th, 2014 ============ - New features: + fft command may (optionally) use fftw3 library + add nint() rounding function + usage of 'temper' in behavioral devices + check for soa (safe operating area) in several device models + library processing rewritten completely to enhance ngspice compatibility (.lib) + include file processing rewritten to allow nesting and various absolute and relative path names (.inc) + asinh, acosh, atanh functions + shared ngspice option added: ngspice optionally compiles as a shared object or dynamic link library + use a hash table to massively speed up parsing the netlist + implement a very basic .if/.else block + implement a signed power function `pwr' for controlled sources + implement multiplier `m' in F, G source + apply Area Calculation Method (ACM) to the bsim3v3.3 model + implement `tc1', `tc2' instance parameters - Bug fixes: + many, many ... please see http://sourceforge.net/p/ngspice/ngspice/ci/master/tree/ and check the 'history' button on the upper right. + removed memory leaks Ngspice-25, Jan 4th, 2013 ============ - New features: + add temperature coefficients for B source + commands "mdump", "mrdump" to dump matrix to file + allow `time', `temper', and `hertz' in expressions with behavioral R, L, C + Enable ctrl-c to interrupt a simulation also for Windows GUI + tests/bsim4: use the standard CMC model qa check + implement exit code for command "quit" + .nodeset all = value + memristor code model in extradev + new scalable diode model including tunnel component + variable xtrtol may override the XSPICE reduction of trtol + XSPICE example: delta-sigma converter + XSPICE: new d_source model + new option noopac + bsim3: make additonal parameters accessible with @mxx[par] + enable Mac OS X compilation + option reseries = val + commands "snsave", "snload" + update hisim to version 2.7.0, new qa tests + hisimhv update to version 1.2.3, new qa tests + allow Ctrl-d to quit + jfet model temperature extension, tcv and bex parameter + speed up vector handling by hash table for vector address storage and retrieval + update PSS code - Bug fixes: + many, many ... please see http://ngspice.git.sourceforge.net/git/gitweb.cgi?p=ngspice/ngspice;a=shortlog;pg=0 + remove memory leaks + update tclspice for MS Windows + adms3 removed due to licensing issues Ngspice-24, Jan 29th, 2012 ============ - New features: + .csparam allows to tranfer a param into a vector in .control ... .endc + functions floor and ceil + syntax Gxxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2) + syntax Gxxx n1 n2 value={equation} or Exxx n1 n2 value={equation} + variable strict_errorhandling to exit ngspice with exit code 1 if any error occurs during circuit parsing + command altermod allows reading from file + command "devhelp" to show available devices and describe device parameters + command "inventory" to print the number of istances of each device. + function cph(vec) delivers phase from a vector without jumps at +-PI + enable 64 bit compilation in MS Visual Studio + --adms3 flag to compile with (experimental) adms code + still very experimental pss code + command 'remcirc' to remove a circuit from the list + command 'wrdata' aknowledges appendwrite and prints complex variables + allow comment lines inside of command files + path variable NGSPICE_INPUT + 'Filesource' code model - Bug fixes: + More on prototypes, type casts, reordering of functions, compiler warnings + fix a numerical problem in the hisim2 and hisimhv models + plot i(vdd) from a loaded rawfile + fix the guard for device generated internal nodes (via CKTmkVolt()) + reduce memory leaks for command 'reset' + parameter processing for nested .subckt + bsim4/b4noi.c: correct init the correlated noise slot in noiseDens and lnNdens vector + Many small bugs Ngspice-23, June 5th, 2011 ============ - New features: + Reduction of trtol to 1 only if 'A' devices in the circuit and xspice is enabled + command wrs2p to write a s-parameter file using Touchstone vers. 1 format + d_source d_state d_ram, test cases for those xspice codemodels + transient noise simulation added to independent voltage and current sources + Random telegraph noise added to independent voltage and current sources + 'time = nnn' in stop command added + random voltage generator option trrandom to independent voltage and current sources + ngspice build possible in a separate directory (e.g. in ng-spice-rework/release) + update FIND .. WHEN measurements + diode & bjt temperature model update with tlev and tlevc + merge bsim3v1a code with bsim3v0 and bsim3v1s code with bsim3v1 + bjt2: removed - all GP extensions of this model are now in the bjt model + HiSIM_HV model vers. 1.2.1 added + bsim3v32: delvto and mulu0 as instance parameters + Replace HiSIM1 by HiSIM_2.5.1_Release_20110407 - Bug fixes: + More on prototypes, type casts, reordering of functions, compiler warnings + allow models like 2N2904 or 2SK136 also in subcircuits + fix sensitvity calculation (for the dc-2+.cir testcase) + allow multiple call to setup w/ correct node collapsing + Many small bugs Ngspice-22, Sept 26th, 2010 ============ - New features: + OpenMP multicore support for BSIM3, BSIM4, and BSIMSOI4 + reinstate {$var} expansion in interactive interpreter + .TITLE line added + update to 'spectrum' script + par('expression') in .four, .plot, .print, .meas, .save commands + command 'option' for use in spinit, .spiceinit, and in scripts + adms procedure updated + new random number generator, random functions sunif() and sgauss() + ngspice manual updated - Bug fixes: + Major code cleanup to reduce compiler/linker warnings: ansi function prototypes, void/char pointers to named pointers, explicit type casts and many more + Many small bugs Ng-spice-rework-21, Jun3, 13th 2010 ============ - Updated Devices: BSIMSOI 4.3.1 - New features: + Compatibility: C, L, R, devices and E, G sources with expressions Variables HERTZ, TIME, TEMPER added + E, G sources with pwl function + New manual + Plotting with Gnuplot, + Writing wrdata for simple text table to file + .measure improved + transmission line models improved - Bug fixes: + Many small bugs, memory leaks, memory overflows Ng-spice-rework-20, November, 16th 2009 ============ Ngspice release 20 is the second release of the simulator in 2009. - Fixes: model names starting with a number (1n4001) are now correctly parsed. The .global command has been reinstated (it was previously disabled) and error messages now display the corresponding line numberin the input deck. - New Features: .measure command for transient, ac and dc analyses (still not complete, e.g. DERIV is missing). - Devices: Updated BISM4 model to revision 4.6.5. Added PWL (PieceWise Linear) functionality for B (arbitrary generator) sources. Ng-spice-rework-19, April, 23rd 2009 ============ Ngspice release 19 came early after release 18. It reveals an important work in compile scripts, many bug fixes in memory management, interface, and work in device models. - Compile scripts: tclspice and ADMS compiling fixes. Architecture compiling fixes for SunOS, MS Visual Studio, MINGW, Cygwin. - Memory management: fixed memory leaks, modifies memory management for MS Windows, integration of espice bugfixes and enhancements, bug fixes in plots and cli interface. - Rework of BSim models, integration of EPFL-EKV model V2.63, ADMS models mextram, hicum0, hicum2. Ng-spice-rework-18 ============ Rework-18 is introduces several new features into ngspice. This is a major release that comes after more than three years. During the silent years ngspice developers worked in CVS to stabilize and introduce new features into the simulator. - Tclspice simulator library has been merged with ngspice. Now you can compile ngapice or tclspice by asserting a configure switch. See README.tcl - New options have been introduced: brief, listing, autostop and scale - Support for .lib file has been introduced. This allows the use of third party model libraries in ngspice. - .measure statements: avg, integ, rms, max, min, delay, param - .global statements t support for global nodes whose name is not expanded when flattening the netlist. - .func macros for inlining functions into netlists. - Improved the numparam library to support fully parametrized netlists. - BSIM model binning. - new multi-input gate VCVS using XSPICE extensions. Ng-spice-rework-17 ============ This is a bug fix release. Previous release tarball did not included an include file necessary for compiling numparam library. Ng-spice-rework-16 ============ Rework-16 comes out after almost one year of CVS development (from 15-fixedRC3). This release improves ngspice in three ways: - Bug fixing: most of the bugs that affected rework-15 have been fixed, thus ngspice is more stable, especially the xspice extension, the subcircuit (X devices) handling and the numparam library. - New features: netlist syntax has been expandend allowing for end-of-line comments. A ".global" card has beed added to define global nodes, i.e. nodes that are not expanded in subcircuits. It is possible to define TC for resistors on the instance line. The editline library can be used instead of readline (no more GPL license violation). - Porting: ngspice now works (with xspice extension) on Windows using MINGW/MSYS. Ng-spice-rework-15 ============ Rework-15 release is a giant leap forward for ngspice. It incorporates many (read most) of the improvements implemented in tclspice during the two years long "sleep" of ngspice and adds many others. The incomplete list of new features incorporated are: - Xspice simulator (with codemodel dynamic loading support): a mixed signal simulator built upon spice3. - Cider simulator: a mixed level simulator built upon spice3. - Numparam library: a library that allows for parameter substitution at netlist level. - Improved models: Diode model includes periphery effects and high level of injection effects, BJT and BJT2 enhanced. BSIM3 now includes ACM. BSIM4 implementation corrected. -New models: VBIC (3 Terminals, no excess phase and thermal network), HiSIM. - Frontend leaks closed. Now frontend works as it should. - Many new example file. - Xgraph plotting program included. Ng-spice-rework-14 ============ This is a major release in terms of bug-fixes. Some enhancements have been included: BSIM4 model and support for EKV model. The source code for the latter must be obtained from EKV web site (see DEVICE for more info). To enable EKV support you have to obtain the code first and then use the configure switch "--enable-ekv". The spice code contains an option to debug frontend code, now this is available in configure as "--enable-ftedebug". Ng-spice-rework-13 ============ This is a major release in terms of fixes and enhancements. A garbage collector support has been added. If the configuration script detects that you have installed GC (Bohem-Weiser conservative garbage collector), it will use it. Some memory leaks have been fixed too. Enhancements to the code comes from Alan's contribute code, a description of improvements follows (extracted form Alan's mail): Output File Format Changes - (NOTE: Do not rely on this, we may revert to the old format in the next release). Text mode .OP results even though "rawfile" written. Internal device nodes are not saved to "rawfile" (reduces file size). Optionally, these internal nodes can be replaced by device currents and saved. DC Convergence Enhancements - "Source-Stepping" algorithm modified with a "Dynamic" step size. After each successful step, the node voltages are saved, the source-factor is increased by the step-factor, and the step-factor is increased (for the next step). If the step fails, i.e. the circuit does not converge, the source-factor is set to the value from the previous successful step, the previously stored node voltages are restored, the step-factor is reduced, the source factor is increased by this smaller step-factor, and convergence is attempted again. Same thing done for "Gmin-stepping" algorithm. "Gshunt" option added. This sets the "diagGmin" variable used in the gmin-stepping algorithm to a non-zero value for the final solution. (Normally this is set to zero for the final solution). This helps for circuits with floating nodes (and for some others too). The Gmin implementation across the substrate diodes of MOS1, MOS2, MOS3, MOS6 and BSIM3 devices, and across BJT base-emitter and base-collector diodes, was incorrect. Correcting this dramatically improved DC convergence. (I think this also affects BSIM1 and 2 but I haven't fixed them yet !) The gm, gmb and gds calculations in the MOS3 model were all wrong. The device equations were fixed, leading to much improved convergence. The Vcrit value used for diode voltage limiting was calculated without taking into account the device area (and in some cases without using the temperature corrected saturation current). This could cause floating point overflows, especially in device models designed to be scaled by a small area, e.g. 2u by 2u diodes (area=4e-12). This is now fixed for Diode, BJT, MOS1, MOS2, and MOS3 models. The diode voltage limiting was modified to add negative voltage limiting. Negative diode voltages are now limited to 3*Vdp-10, where Vdp is the voltage from the previous iteration. If Vdp is positive, then the voltage is limited to -10V. This prevents some more floating point overflows. (Actually, I'm still playing with the best values for this). The Spice3 "fix" for the MOS3 gds discontinuity between the linear and saturated regions only works if the VMAX parameter is non-zero. A "tweak" has been added for the VMAX=0 case. Transient Convergence Enhancements - Temperature correction of various diode capacitances was implemented slightly incorrectly, leading to capacitance discontinuities in simulations at temperatures other than nominal. This affected the Diode and MOS3 models. A mistake in the implementation of the MOS3 source-bulk capacitance model resulted in a charge storage discontinuity. This has been fixed. The level 2 MOSFET model seems to calculate Von and Vth values for the threshold and subthreshold values respectively, but then uses Vbin to calculate the Vdsat voltage used to find the drain current. However, a jump statement uses Von to decide that the device is in the "cutoff" region, which means that when this jump allows the drain current to be calculated, Vdsat can already be well above zero. This leads to a discontinuity of drain current with respect to gate voltage. The code is now modified to use Vbin for the jump decision. It looks like the code should actually use Vth as the threshold voltage, but since other SPICE simulators follow the original Berkeley code, this was left alone. New Model Parameters - A device multiplier instance parameter "M" (i.e. M devices in parallel) was added to the MOS1,2,3 and BSIM3 mosfet models. Input Read-in and Checking - Numbers beginning with a + sign got the input routine confused. Fixed now. Attempts to nodeset (or .IC) non-existent nodes are flagged with a warning. PWL statements on Voltage or Current sources are now checked for "non-increasing" time-points at the start of the simulation. Previously each time-point was checked as it was reached during the simulation, which could be very annoying if you made a mistake which caused the simulation to fail after hours of run-time. A check which was performed at the end of each sub-circuit expansion was moved to the top level. This check makes sure that all sub-circuits have been defined, but in its original position, it meant that if a sub-circuit included ANY .MODEL statements at all, then ALL the models called in that sub-circuit must also be defined within that sub-circuit. Now SPICE behaves as expected, i.e. a subcircuit may define its own models, but may also use models defined at any level above. Miscellaneous Fixes/Enhancements - MOS devices reported only half of the Meyer capacitances, and did not include overlap capacitances, when reporting to the .OP printout, or when storing device capacitances to the "rawfile". The ideal switch devices had no time-step control to stop their controlling voltages/currents overshooting the switching thresholds. The time-step control has been modified to use the last two time points to estimate if the next one will move the controlling voltage/current past a switching threshold. If this looks likely, then the time-step is reduced. The "rawfile" writing routines have been modified to print the "reference value" to the console during the simulation. This lets the user see exactly how far and how fast the simulation is proceeding. .OP printout tidied up a lot to make the printout clearer. Analysis order changed to fix a "feature" where, if you ask for a .OP and a .TRAN in the same simulation, the node voltages printed out correspond to the .OP, but the device data was from the last timepoint of the .TRAN Etc. - There are other minor bug fixes, and changes to reduce compiler warnings. There are probably some more significant fixes which I've forgotten :-) Ng-spice-rework-12 ============ Arno did a great work this summer! The pole-zero analysis has been corrected. The error was introduced in an attempt to eliminate compiler warnings. The source has been reworked and info file have been updated. As you may see, a new dir called "spicelib" has been created, another step toward the separation of the simulator from the frontend. Ng-spice-rework-11 ============ Resistor code (device) has been modified to conform to spice3 device coding standard. A new step function (U2) has been introduced. Documentation updated. Ng-spice-rework-10 ============ Added BSIM4 model and closed a couple of serious bugs. Added DEVICES file to distribution. This file contains the status of device models in this simulator. Read it, this file can save you a lot of time. Ng-spice-rework-9 ============ Thanks to Arno Peters now all device models are dynamically loaded on demand. They are linked as shared libraries. The next step is the dlopen() one which will make possible to link devices without any recompilation. Ng-spice-rework-8 ============ Applied Arno's patch. From his mail message: Hi Paolo, I have prepared a source cleaning patch. Features: + patches don't get polluted with differences between automatically generated Makefile.am files. Usually these make up the biggest part of the patches. This allows me to read the patch on the mailing list instead of sifting through 90% redundant and irrelevant changes. + the shell script autogen.sh automatically regenerates the required files if the user has automake, autoconf and libtool installed. + this feature is only valuable to developers, not to end users. Usage of this patch, once incorporated: # create a working tree to work from cp -a ng-spice-rework-x ng-spice [ Changes made to ng-spice ] # clean up all the automatically generated files cd ng-spice; make maintainer-clean # extract the differences diff -ruN ng-spice-rework-x ng-spice > my.patch [ Patch sent to ng-spice mailing list or you ] # incorporate changes into the tree cd ng-spice-rework-x; patch -p1 < my.patch # update the automatically generated files cd ng-spice-rework-x; sh autogen.sh Ng-spice-rework-7 (22 Mar 2000) ============ Bug fix release Ng-spice-rework-6 (29 Jan 2000) ============ This porting includes: 1) BSIM3V3.1 model as level 49. This is the version modified by Serban Popescu which understands the M parameter and implements HDIF. 2) BSIM3V3.2 model al Level 50. This is the standard Berkeley version. 3) Now the resistor model can accepts two different values for DC and AC resistance. Ng-spice-rework-5 and 5_2 (Jan 2000) ============ Internal development release, buggy and not working. Ng-spice-rework-4 (22/12/99) ============ This porting includes a new feature: 1) dynamically loading of some device code as an experimental feature for the future GPL simulator. Thanks to Arno Peters and Manu Rouat. 2) Patched the following bug (thanks to Andrew Tuckey for having supplied the patch). * Wsw (current controlled switch) in subckt, parsing bug. * scale factor in arbitrary source. * bug in noise analysis. * save segmentation faults. ngspice-26/contrib/0000755000265600020320000000000012264261473013671 5ustar andreasadminngspice-26/contrib/vbic/0000755000265600020320000000000012264261473014614 5ustar andreasadminngspice-26/contrib/vbic/README0000644000265600020320000000030312264261473015470 0ustar andreasadminTwo scripts from Colin McAndrew for vbic model. sgp2vbic - converts a Spice Gummel-Poon model card to a vbic model card. vbis2sgb - converts a vbic model card to a Spice Gummel-Poom model card. ngspice-26/contrib/vbic/sgp2vbic0000644000265600020320000001750512264261473016266 0ustar andreasadmin#!/bin/bash -- # perl eval 'exec perl -S -x -w $0 ${1+"$@"}' if 0; # # sgp2vbic: program to convert an SGP .model card to VBIC # # Vers Date Who Comments # ==== ========== ============= ======== # 2.0 06/01/00 Colin McAndrew translated from shell/nawk version # sub usage() { print " $prog: convert SGP .model card to VBIC .model card Usage: $prog [options] modelFile Files: modelFile file with SGP .model card Options: -d debug mode -h print this help message -i print detailed information -v verbose mode -vbeif Vbe do fwd Early voltage map at Vbe ($Vbeif) -vceif Vce do fwd Early voltage map at Vce ($Vceif) -vbcir Vbc do rev Early voltage map at Vbc ($Vbcir) -vecir Vec do rev Early voltage map at Vec ($Vecir) "; } # End of: sub usage sub info() { print " This program maps an SGP .model card into a VBIC .model card. For many parameters there is a 1-to-1 mapping between the two, and the default VBIC parameters are such that the model extensions that are not part of SGP are turned off. There are two fundamental and non-mappable differences between the two models. First, the IRB emitter crowding based resistance modulation model is not supported in VBIC. This parameter is ignored. Second, the Early effect model is different, the bias dependence is substantially better in VBIC than in SGP. This means the models can be made to match only at specific biases. These biases can be specified by the -vxxi[fr] flags. "; } # End of: sub info # # Set program names and variables. # $\="\n"; $,=" "; $Debug=""; $Verbose=""; $Number='([+-]?[0-9]+[.]?[0-9]*|[+-]?[0-9]+[.]?[0-9]*[eE][+-]?[0-9]+|[+-]?[.][0-9]+|[+-]?[.][0-9]+[eE][+-]?[0-9]+)'; @prog=split("/",$0); $prog=$prog[$#prog]; $Pi=atan2(0,-1); $Vbeif=0.6; $Vceif=2.5; $Vbcir=0.5; $Vecir=2.5; # # Parse command line arguments, allow argument # flags to be any case. # for (;;){ if ($#ARGV < 0) { last; } elsif ($ARGV[0] =~ /^-d/i) { $Debug="-d";$Verbose="-v"; } elsif ($ARGV[0] =~ /^-h/i) { &usage();exit(0); } elsif ($ARGV[0] =~ /^-i/i) { &info();exit(0); } elsif ($ARGV[0] =~ /^-v$/i) { $Verbose="-v"; } elsif ($ARGV[0] =~ /^-vbeif$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vbeif flag, stopped"); } $Vbeif=$ARGV[0]; if ($Vbeif !~ /$Number/) { die("ERROR: value for -vbeif flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vceif$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vceif flag, stopped"); } $Vceif=$ARGV[0]; if ($Vceif !~ /$Number/) { die("ERROR: value for -vceif flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vbcir$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vbcir flag, stopped"); } $Vbcir=$ARGV[0]; if ($Vbcir !~ /$Number/) { die("ERROR: value for -vbcir flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vecir$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vecir flag, stopped"); } $Vecir=$ARGV[0]; if ($Vecir !~ /$Number/) { die("ERROR: value for -vecir flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-/) { &usage(); die("ERROR: unknown flag $ARGV[0], stopped"); } else { last; } shift(@ARGV); } if ($#ARGV < 0) { &usage();exit(1); # exit if no file name is specified } $ModelFile=$ARGV[0]; sub QCDEPL { my($vj,$p,$m,$f)=@_; my($w,$xx,$cj,$qj); $w=1.0-$vj/$p; if($w>=1.0-$f){ $cj=$w**(-$m); $qj=$p*(1.0-$w*$cj)/(1.0-$m); } else { $xx=(1.0-$f)**(-(1.0+$m)); $cj=$xx*(1.0-$f*(1.0+$m)+$m*$vj/$p); $qj=$xx*((1.0-$f*(1.0+$m))*($vj-$f*$p)+0.5*$m*($vj*$vj-$f*$f*$p*$p)/$p)+$p*(1.0-$xx*(1.0-$f)**2)/(1.0-$m); } return($qj,$cj); } # # Parse model file # open(IF,"$ModelFile") || die("ERROR: cannot open file $ModelFile, stopped"); $inModel="no"; while () { chomp;tr/A-Z/a-z/; if ($_ =~ /^\s*$/) {next;} if ($_ =~ /^\s*\*/) {next;} last if ($_ !~ /^\+/ && $inModel eq "yes"); if ($_ =~ /^\s*\.mod/) { $inModel="yes";$model=$_;next; } if ($inModel eq "yes") { $_=~s/^\+\s*/ /;$model.=$_;next; } } close(IF); $model=~s/\s*=\s*/=/g; # # Set SGP parameters from .model card # $val{"is"}=1.0e-16; $val{"bf"}=100.0; $val{"nf"}=1.0; $val{"vaf"}=0.0; $val{"ikf"}=0.0; $val{"ise"}=0.0; $val{"ne"}=1.5; $val{"br"}=1.0; $val{"nr"}=1.0; $val{"var"}=0.0; $val{"ikr"}=0.0; $val{"isc"}=0.0; $val{"nc"}=2.0; $val{"rb"}=0.0; $val{"rbm"}=0.0; $val{"re"}=0.0; $val{"rc"}=0.0; $val{"cje"}=0.0; $val{"vje"}=0.75; $val{"mje"}=0.33; $val{"cjc"}=0.0; $val{"vjc"}=0.75; $val{"mjc"}=0.33; $val{"xcjc"}=1.0; $val{"cjs"}=0.0; $val{"vjs"}=0.75; $val{"mjs"}=0.0; $val{"fc"}=0.5; $val{"tf"}=0.0; $val{"xtf"}=0.0; $val{"vtf"}=0.0; $val{"itf"}=0.0; $val{"ptf"}=0.0; $val{"tr"}=0.0; $val{"kf"}=0.0; $val{"af"}=1.0; $val{"eg"}=1.11; $val{"xtb"}=0.0; $val{"xti"}=3.0; $alias{"va"}="vaf"; $alias{"ik"}="ikf"; $alias{"c2"}="ise"; $alias{"vb"}="var"; $alias{"c4"}="isc"; $alias{"pe"}="vje"; $alias{"me"}="mje"; $alias{"pc"}="vjc"; $alias{"mc"}="mjc"; $alias{"ccs"}="cjs"; $alias{"ps"}="vjs"; $alias{"ms"}="mjs"; $alias{"pt"}="xti"; @Field=split(/\s+/,$model); $name=$Field[1]; for ($i=3;$i<=$#Field;++$i) { die("ERROR: term $Field[$i] is not in name=value format, stopped") if ($Field[$i] !~ /=/); ($param,$value)=split(/=/,$Field[$i]); die("ERROR: parameter $param must be a number, stopped") if ($value !~ /$Number/); if (defined($alias{$param})) {$param=$alias{$param};} if ($param eq "irb") { print STDERR "* WARNING: IRB parameter is not supported in vbic"; next; } if (!defined($val{$param})) { print STDERR "* WARNING: parameter $param is not supported in vbic"; next; } $val{$param}=$value; if ($param eq "rbm") {$done{"rbm"}="yes";} } if (!defined($done{"rbm"})) {$val{"rbm"}=$val{"rb"};} if($val{"ise"}>1) {$val{"ise"}=$val{"ise"}*$val{"is"};} if($val{"isc"}>1) {$val{"isc"}=$val{"isc"}*$val{"is"};} $Vbcif=$Vbeif-$Vceif; $Vbeir=$Vbcir-$Vecir; ($qjbef,$cj )=&QCDEPL($Vbeif,$val{"vje"},$val{"mje"},$val{"fc"}); ($qjbcf,$cjbcf)=&QCDEPL($Vbcif,$val{"vjc"},$val{"mjc"},$val{"fc"}); ($qjber,$cjber)=&QCDEPL($Vbeir,$val{"vje"},$val{"mje"},$val{"fc"}); ($qjbcr,$cj )=&QCDEPL($Vbcir,$val{"vjc"},$val{"mjc"},$val{"fc"}); $ivaf=$val{"vaf"};if($ivaf>0){$ivaf=1/$ivaf;} $ivar=$val{"var"};if($ivar>0){$ivar=1/$ivar;} $godIf=$ivaf/(1-$Vbeif*$ivar-$Vbcif*$ivaf); if($godIf<1e-10) {$godIf=1e-10;} $godIr=$ivar/(1-$Vbeir*$ivar-$Vbcir*$ivaf); if($godIr<1e-10) {$godIr=1e-10;} $a11=$qjbcf-$cjbcf/$godIf; $a12=$qjbef; $r1=-1.0; $a21=$qjbcr; $a22=$qjber-$cjber/$godIr; $r2=-1.0; $det=$a11*$a22-$a12*$a21; $ivef=($r1*$a22-$r2*$a12)/$det; $iver=($r2*$a11-$r1*$a21)/$det; $vef=1/$ivef;$ver=1/$iver; print '.model '.$name.' vbic + rcx = '.$val{"rc"}.' + rci = '."0.0".' + rbx = '.$val{"rbm"}.' + rbi = '.($val{"rb"}-$val{"rbm"}).' + re = '.$val{"re"}.' + is = '.$val{"is"}.' + nf = '.$val{"nf"}.' + nr = '.$val{"nr"}.' + fc = '.$val{"fc"}.' + cje = '.$val{"cje"}.' + pe = '.$val{"vje"}.' + me = '.$val{"mje"}.' + cjc = '.($val{"cjc"}*$val{"xcjc"}).' + cjep = '.($val{"cjc"}*(1.0-$val{"xcjc"})).' + pc = '.$val{"vjc"}.' + mc = '.$val{"mjc"}.' + cjcp = '.$val{"cjs"}.' + ps = '.$val{"vjs"}.' + ms = '.$val{"mjs"}.' + ibei = '.($val{"is"}/$val{"bf"}).' + nei = '.$val{"nf"}.' + iben = '.$val{"ise"}.' + nen = '.$val{"ne"}.' + ibci = '.($val{"is"}/$val{"br"}).' + nci = '.$val{"nr"}.' + ibcn = '.$val{"isc"}.' + ncn = '.$val{"nc"}.' + vef = '.$vef.' + ver = '.$ver.' + ikf = '.$val{"ikf"}.' + ikr = '.$val{"ikr"}.' + tf = '.$val{"tf"}.' + xtf = '.$val{"xtf"}.' + vtf = '.$val{"vtf"}.' + itf = '.$val{"itf"}.' + tr = '.$val{"tr"}.' + td = '.($val{"tf"}*$val{"ptf"}*$Pi/180.0).' + ea = '.$val{"eg"}.' + eaie = '.$val{"eg"}.' + eaic = '.$val{"eg"}.' + eane = '.$val{"eg"}.' + eanc = '.$val{"eg"}.' + xis = '.$val{"xti"}.' + xii = '.($val{"xti"}-$val{"xtb"}).' + xin = '.($val{"xti"}-$val{"ne"}*$val{"xtb"}).' + kfn = '.$val{"kf"}.' + afn = '.$val{"af"}; ngspice-26/contrib/vbic/vbic2sgp0000644000265600020320000001705512264261473016266 0ustar andreasadmin#!/bin/bash -- # perl eval 'exec perl -S -x -w $0 ${1+"$@"}' if 0; # # vbic2sgp: program to convert a VBIC .model card to SGP # # Vers Date Who Comments # ==== ========== ============= ======== # 1.0 07/17/00 Colin McAndrew modified sgp2vbic # sub usage() { print " $prog: convert VBIC .model card to SGP .model card Usage: $prog [options] modelFile Files: modelFile file with VBIC .model card Options: -d debug mode -h print this help message -i print detailed information -v verbose mode -vbeif Vbe do fwd Early voltage map at Vbe ($Vbeif) -vceif Vce do fwd Early voltage map at Vce ($Vceif) -vbcir Vbc do rev Early voltage map at Vbc ($Vbcir) -vecir Vec do rev Early voltage map at Vec ($Vecir) "; } # End of: sub usage sub info() { print " This program maps a VBIC .model card into an SGP .model card. For many parameters there is a 1-to-1 mapping between the two, and the default VBIC parameters are such that the model extensions that are not part of SGP are turned off. However if the extensions in VBIC are used, clearly they are not translated into SGP. In particular, note that using the separate ideality coefficients for base current in VBIC will give a model that will NOT translate into SGP properly. A simple calculation of BF(SGP)=IS(VBIC)/IBEI(VBIC) is done, that will not be accurate if NEI(VBIC) is not equal to NF(VBIC). The Early effect model is different between VBIC and SGP, the bias dependence is substantially better in VBIC than in SGP. This means the models can be made to match only at specific biases. These biases can be specified by the -vxxi[fr] flags. "; } # End of: sub info # # Set program names and variables. # $\="\n"; $,=" "; $Debug=""; $Verbose=""; $Number='([+-]?[0-9]+[.]?[0-9]*|[+-]?[0-9]+[.]?[0-9]*[eE][+-]?[0-9]+|[+-]?[.][0-9]+|[+-]?[.][0-9]+[eE][+-]?[0-9]+)'; @prog=split("/",$0); $prog=$prog[$#prog]; $Pi=atan2(0,-1); $Vbeif=0.6; $Vceif=2.5; $Vbcir=0.5; $Vecir=2.5; # # Parse command line arguments, allow argument # flags to be any case. # for (;;){ if ($#ARGV < 0) { last; } elsif ($ARGV[0] =~ /^-d/i) { $Debug="-d";$Verbose="-v"; } elsif ($ARGV[0] =~ /^-h/i) { &usage();exit(0); } elsif ($ARGV[0] =~ /^-i/i) { &info();exit(0); } elsif ($ARGV[0] =~ /^-v$/i) { $Verbose="-v"; } elsif ($ARGV[0] =~ /^-vbeif$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vbeif flag, stopped"); } $Vbeif=$ARGV[0]; if ($Vbeif !~ /$Number/) { die("ERROR: value for -vbeif flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vceif$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vceif flag, stopped"); } $Vceif=$ARGV[0]; if ($Vceif !~ /$Number/) { die("ERROR: value for -vceif flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vbcir$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vbcir flag, stopped"); } $Vbcir=$ARGV[0]; if ($Vbcir !~ /$Number/) { die("ERROR: value for -vbcir flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-vecir$/i) { shift(@ARGV); if (!defined($ARGV[0])) { die("ERROR: no value specified for -vecir flag, stopped"); } $Vecir=$ARGV[0]; if ($Vecir !~ /$Number/) { die("ERROR: value for -vecir flag must be a number, stopped"); } } elsif ($ARGV[0] =~ /^-/) { &usage(); die("ERROR: unknown flag $ARGV[0], stopped"); } else { last; } shift(@ARGV); } if ($#ARGV < 0) { &usage();exit(1); # exit if no file name is specified } $ModelFile=$ARGV[0]; sub QCDEPL { my($vj,$p,$m,$f)=@_; my($w,$xx,$cj,$qj); $w=1.0-$vj/$p; if($w>=1.0-$f){ $cj=$w**(-$m); $qj=$p*(1.0-$w*$cj)/(1.0-$m); } else { $xx=(1.0-$f)**(-(1.0+$m)); $cj=$xx*(1.0-$f*(1.0+$m)+$m*$vj/$p); $qj=$xx*((1.0-$f*(1.0+$m))*($vj-$f*$p)+0.5*$m*($vj*$vj-$f*$f*$p*$p)/$p)+$p*(1.0-$xx*(1.0-$f)**2)/(1.0-$m); } return($qj,$cj); } # # Parse model file # open(IF,"$ModelFile") || die("ERROR: cannot open file $ModelFile, stopped"); $inModel="no"; while () { chomp;tr/A-Z/a-z/; if ($_ =~ /^\s*$/) {next;} if ($_ =~ /^\s*\*/) {next;} last if ($_ !~ /^\+/ && $inModel eq "yes"); if ($_ =~ /^\s*\.mod/) { $inModel="yes";$model=$_;next; } if ($inModel eq "yes") { $_=~s/^\+\s*/ /;$model.=$_;next; } } close(IF); $model=~s/\s*=\s*/=/g; # # Set VBIC parameters from .model card # $val{"is"}=1.0e-16; $val{"nf"}=1.0; $val{"nr"}=1.0; $val{"ibei"}=1.0e-18; $val{"nei"}=1.0; $val{"vef"}=0.0; $val{"ikf"}=0.0; $val{"iben"}=0.0; $val{"nen"}=1.5; $val{"ibci"}=1.0e-16; $val{"nci"}=1.0; $val{"ver"}=0.0; $val{"ikr"}=0.0; $val{"ibcn"}=0.0; $val{"ncn"}=2.0; $val{"rbx"}=0.0; $val{"rbi"}=0.0; $val{"re"}=0.0; $val{"rcx"}=0.0; $val{"rci"}=0.0; $val{"cje"}=0.0; $val{"vje"}=0.75; $val{"mje"}=0.33; $val{"fc"}=0.9; $val{"cjc"}=0.0; $val{"cjep"}=0.0; $val{"vjc"}=0.75; $val{"mjc"}=0.33; $val{"cjcp"}=0.0; $val{"vjs"}=0.75; $val{"mjs"}=0.0; $val{"tf"}=0.0; $val{"xtf"}=0.0; $val{"vtf"}=0.0; $val{"itf"}=0.0; $val{"tr"}=0.0; $val{"td"}=0.0; $val{"kfn"}=0.0; $val{"afn"}=1.0; $val{"ea"}=1.12; $val{"eaie"}=1.12; $val{"eaic"}=1.12; $val{"eane"}=1.12; $val{"eanc"}=1.12; $val{"xis"}=3; $val{"xii"}=3; $val{"xin"}=3; $alias{"ik"}="ikf"; $alias{"pe"}="vje"; $alias{"me"}="mje"; $alias{"pc"}="vjc"; $alias{"mc"}="mjc"; $alias{"ps"}="vjs"; $alias{"ms"}="mjs"; @Field=split(/\s+/,$model); $name=$Field[1]; for ($i=3;$i<=$#Field;++$i) { die("ERROR: term $Field[$i] is not in name=value format, stopped") if ($Field[$i] !~ /=/); ($param,$value)=split(/=/,$Field[$i]); die("ERROR: parameter $param must be a number, stopped") if ($value !~ /$Number/); if (defined($alias{$param})) {$param=$alias{$param};} if (!defined($val{$param})) { print STDERR "* WARNING: parameter $param is not supported in sgp"; next; } $val{$param}=$value; } $Vbcif=$Vbeif-$Vceif; $Vbeir=$Vbcir-$Vecir; ($qjbef,$cj )=&QCDEPL($Vbeif,$val{"vje"},$val{"mje"},$val{"fc"}); ($qjbcf,$cjbcf)=&QCDEPL($Vbcif,$val{"vjc"},$val{"mjc"},$val{"fc"}); ($qjber,$cjber)=&QCDEPL($Vbeir,$val{"vje"},$val{"mje"},$val{"fc"}); ($qjbcr,$cj )=&QCDEPL($Vbcir,$val{"vjc"},$val{"mjc"},$val{"fc"}); $ivef=$val{"vef"};if($ivef>0){$ivef=1/$ivef;} $iver=$val{"ver"};if($iver>0){$iver=1/$iver;} $godIf=$cjbcf*$ivef/(1+$qjbef*$iver+$qjbcf*$ivef); if($godIf<1e-10) {$godIf=1e-10;} $godIr=$cjber*$iver/(1+$qjber*$iver+$qjbcr*$ivef); if($godIr<1e-10) {$godIr=1e-10;} $a11=-$Vbcif-1.0/$godIf; $a12=-$Vbeif; $r1 =-1.0; $a21=-$Vbcir; $a22=-$Vbeir-1.0/$godIr; $r2 =-1.0; $det=$a11*$a22-$a12*$a21; $ivaf=($r1*$a22-$r2*$a12)/$det; $ivar=($r2*$a11-$r1*$a21)/$det; $vaf=1/$ivaf;$var=1/$ivar; print '.model '.$name.' sgp + rc = '.($val{"rcx"}+$val{"rci"}).' + rbm = '.$val{"rbx"}.' + rb = '.($val{"rbx"}+$val{"rbi"}).' + re = '.$val{"re"}.' + is = '.$val{"is"}.' + nf = '.$val{"nf"}.' + nr = '.$val{"nr"}.' + fc = '.$val{"fc"}.' + cje = '.$val{"cje"}.' + vje = '.$val{"vje"}.' + mje = '.$val{"mje"}.' + cjc = '.($val{"cjc"}+$val{"cjep"}).' + xcjc = '.($val{"cjc"}/($val{"cjc"}+$val{"cjep"})).' + pjc = '.$val{"vjc"}.' + mjc = '.$val{"mjc"}.' + cjs = '.$val{"cjcp"}.' + pjs = '.$val{"vjs"}.' + mjs = '.$val{"mjs"}.' + bf = '.($val{"is"}/$val{"ibei"}).' + ise = '.$val{"iben"}.' + ne = '.$val{"nen"}.' + br = '.($val{"is"}/$val{"ibci"}).' + isc = '.$val{"ibcn"}.' + nc = '.$val{"ncn"}.' + vaf = '.$vaf.' + var = '.$var.' + ikf = '.$val{"ikf"}.' + ikr = '.$val{"ikr"}.' + tf = '.$val{"tf"}.' + xtf = '.$val{"xtf"}.' + vtf = '.$val{"vtf"}.' + itf = '.$val{"itf"}.' + tr = '.$val{"tr"}.' + ptf = '.($val{"td"}*180.0/($val{"tf"}*$Pi)).' + eg = '.$val{"ea"}.' + xti = '.$val{"xis"}.' + xtb = '.($val{"xis"}-$val{"xii"}).' + kf = '.$val{"kfn"}.' + af = '.$val{"afn"}; ngspice-26/contrib/scripts/0000755000265600020320000000000012264261473015360 5ustar andreasadminngspice-26/contrib/scripts/libprm0000755000265600020320000000170612264261473016577 0ustar andreasadmin#!/bin/bash #set -x -v # MW. Lip / Param parsing program for spice # -n normal, -f full (keep everything), -r replace original file export TMPLP=/tmp/LibPrm.$$- function trapper() { echo User break! echo Exiting . . . rm -f -v ${TMPLP}* unset TMPLP exit 1 } trap trapper SIGINT SIGQUIT function operror() { echo Incorrect parameters: $*, $# unset TMPLP exit 2 } function repnormpl() { mslib $1 ${TMPLP}1 sed -n -e 'p' -e "1r ${TMPLP}1" $1 >${TMPLP}2 spiceprm ${TMPLP}2 $2 } function keepall() { mslib $1 sed -n -e 'p' -e "1r $1.lib" $1 >${TMPLP}2 spiceprm ${TMPLP}2 $2 } # Main body if test $# -lt 2 -o $# -gt 3; then operror $*; fi case $1$# in -r3) operror $*;; -n2) repnormpl $2 ${2%.cir}.ckt;; -n3) repnormpl $2 $3;; -r2) repnormpl $2 $2;; -f2) keepall $2 ${2%.cir}.ckt;; -f3) keepall $2 $3;; esac rm -f ${TMPLP}* unset TMPLP exit 0 ngspice-26/contrib/scripts/libprm_readme0000644000265600020320000000142312264261473020105 0ustar andreasadminSo, this is my idea of using parametrized subckts with spice. First I create an input file like foo.cir and I include commands for mslib (*MOD, *SUB, *LIB) in it. Then I run "libprm -n foo.cir". Libprm then runs mslib first to get all models and subckts form given libraries and then runs spiceprm to evaluate all used parameters. This works quite right for me, and I hope that You will find my idea useful. Spiceprm is not my program (I get it from Internet), but I think that it will better to enclose all used programs in this packet. Spiceprm has it's own directory with very good readme and examples. If You want to find out more about libprm or mslib look for the source code. These are rather short and easy programs - they are all that I could write in quite short time. ngspice-26/contrib/scripts/liblook_readme0000644000265600020320000000052212264261473020252 0ustar andreasadminLiblook is a script that can show specified model or sub-circuit entry in spice library. Common use look like this: liblook lib_name [text_to_find] [lines_before] [lines_after] lines_before and lines_after are used when you want to specify how many lines you want to see before or after given text. Look to he source for more details. ngspice-26/contrib/scripts/liblook0000755000265600020320000000302012264261473016734 0ustar andreasadmin#!/bin/bash #set -x -v # MW. Lib search / show program # usage liblook libname [text_to_find] [l_before] [l_after] LIBPATH=/usr/local/lib function trapper() { echo User break! echo Exiting . . . unset LIBPATH exit 1 } trap trapper SIGINT SIGQUIT function operror() { echo Incorrect parameters: $*, $# echo Usage: liblook libname [text_to_find] [l_before] [l_after] unset LIBPATH exit 2 } function showlib() { if test -f $LIBPATH/$1; then less $LIBPATH/$1; exit 0; fi if test -f [C./$1; then less ./$1; exit 0; fi echo Searching $1 in ~/ . . . less $(find ~/ -name $1) } function searchlib() { if test -f $LIBPATH/$1; then echo File: $LIBNMAE; echo; grep -B"$3" -A"$4" --ignore-case -e "$2" $LIBPATH/$LIBNAME1; echo; exit 0; fi if test -f ./$1; then echo File: $1; echo; grep -B"$3" -A"$4" --ignore-case -e "$2" ./$1; echo; exit 0; fi #if *.lib or sth like this echo Searching $1 in ~/ . . .;echo; if (grep -B"$3" -A"$4" --ignore-case -e "$2" $(find ~/ -name $1)); then echo; exit 0; fi echo Searching $1 in $LIBPATH;echo; if (grep -B"$3" -A"$4" --ignore-case -e "$2" $(find $LIBPATH -name $1)); then echo; exit 0; fi } # Main body if test $# -lt 1 -o $# -gt 4; then operror $*; fi case $# in 1) showlib $*;; 2) searchlib $1 $2 2 2;; 3) searchlib $1 $2 $3 2;; 4) searchlib $1 $2 $3 $4;; esac unset LIBPATH exit 0 ngspice-26/contrib/scripts/COPYING0000644000265600020320000000024612264261473016415 0ustar andreasadminThese scripts are free for everyone who think that they might by useful for him. If someone makes them better please e-mail me. Michael Widlok widlok@uci.agh.edu.pl ngspice-26/contrib/spiceprm/0000755000265600020320000000000012264261473015513 5ustar andreasadminngspice-26/contrib/spiceprm/EXAMPLES0000644000265600020320000001240412264261473016655 0ustar andreasadmin**************************************************************** * Pi attenuator pad. * Parameters: R0 = impedance * DB = attenuation in dB (positive) .SUBCKT PIPAD 1 2 { R0 DB } R1 1 0 {R0*(1+2/(10**(DB/20)-1))} R2 1 2 {(R0/2)*(10**(DB/20)-10**(DB/-20))} R3 2 0 {R0*(1+2/(10**(DB/20)-1))} .ENDS **************************************************************** * PCB Via inductance + extra L. * H = substrate height in inches * D = via diameter in inches * L = extra inductance in henries. .SUBCKT VIA 1 2 { H D L } LV 1 2 {L+ + 5.08E-9*H*(log((2+sqrt(4+D*D/(H*H)))*H/D)+ + .75*(D/H-sqrt(4+D*D/(H*H))))} .ENDS **************************************************************** * Voltage-controlled oscillator. * Parameters: F = frequency @ Vc = 0 in Hz * KV = tuning sensitivity in Hz/volt * A = peak output amplitude * RO = output port resistance * Connections: Vc Out .SUBCKT VCO 20 2 { F KV A RO } RIN1 20 0 1E12 VSW 30 0 DC 0 PULSE 0 1 RSW 30 0 1E12 BIN 3 0 V=(V(20)+{F/KV})*V(30) R3 3 0 1E6 GSIN 2 0 22 0 {1/RO} RSIN 2 0 {RO} B1 1 0 I=-(V(22)*V(3)) B2 22 0 I=V(1)*V(3) R2 1 0 1E9 I1 0 1 PULSE {1E-9*A} 0 C2 1 0 {.159154943/KV} C1 22 0 {.159154943/KV} R1 22 0 1E9 .ENDS **************************************************************** * Ideal Frequency converter. * Parameters: F = Oscillator frequency * RI = input port resistance * RO = output port resistance * Connections: In Out .SUBCKT FCNVT 1 2 { F RI RO } RIN 1 0 {RI} VLO 3 0 DC 0 SIN 0 1 {F} RLO 3 0 1E12 BMIX 0 2 I=(V(1)*V(3))/{RO} RO 2 0 {RO} .ENDS **************************************************************** * Sine wave RF power source. * Parameters: F = Frequency * R = Output resistance * P = Power in dBm * V = DC (EMF) .SUBCKT RFGEN 1 2 { F R P V } * + - Is 2 1 DC {V/R} SIN {V/R} {sqrt((10**(P/10))/(125*R))} {F} Ro 1 2 {R} .ENDS **************************************************************** * Sine wave 2-tone RF power source. * Parameters: F1 = 1st tone frequency * F2 = 2nd tone frequency * R = output resistance * P = power per tone in dBm * V = DC (EMF) .SUBCKT 2TGEN 1 2 { F1 F2 R P V } * + - I1 2 1 DC {V/R} SIN {V/R} {sqrt((10**(P/10))/(125*R))} {F1} I2 2 1 DC 0 SIN 0 {sqrt((10**(P/10))/(125*R))} {F2} Ro 1 2 {R} .ENDS **************************************************************** * Transmission lines * All ports must have external connections. * Parameters: Z0 = impedance * L = length in inches * VP = velocity-of-propagation rel. to air * Connections: 1+ 1- 2+ 2- .SUBCKT TXL 1 2 3 4 { Z0 L VP } T1 1 2 3 4 Z0={Z0} TD={L/(1.180315E10*VP)} .ENDS **************************************************************** * Lossy transmission line. * All ports must have external connections. * Parameters: Z0 = impedance * L = length in inches * VP = velocity-of-propagation rel. to air * A = loss in dB/inch * Connections: 1+ 1- 2+ 2- .SUBCKT LTXL 1 2 3 4 { Z0 L VP A } O1 1 2 3 4 LOSSY .MODEL LOSSY LTRA LEN={L} + R={5.848492e-3*A*Z0} + L={Z0/(1.180315E10*VP)} + C={1/(1.180315E10*VP*Z0)} .ENDS **************************************************************** * 2 coupled transmission lines * All ports must have external connections. * Parameters: Z0E = even-mode impedance * Z0O = odd-mode impedance * L = length in inches * VP = velocity-of-propagation rel. to air * Connections: 1+ 1- 2+ 2- { Z0E Z0O L VP } .SUBCKT CPL2 1 2 3 4 T1 1 0 3 0 Z0={Z0E} TD={L/(1.180315E10*VP)} T2 1 2 3 4 Z0={2*Z0E*Z0O/(Z0E-Z0O)} TD={L/(1.180315E10*VP)} T3 2 0 4 0 Z0={Z0E} TD={L/(1.180315E10*VP)} .ENDS **************************************************************** * Generic Bipolar OpAmp - linear model * Parameters: G = open-loop gain in dB * FT = unity gain frequency in Hz * IOS = input offset current in amps * VOS = input offset voltage * IB = input bias current in amps .SUBCKT BIPOPA 2 3 6 7 4 { G FT IOS VOS IB } * - In + Out Vcc Vee RP 4 7 10K RXX 4 0 10MEG IBP 3 0 {IB-IOS} RIP 3 0 10MEG CIP 3 0 1.4PF IBN 2 0 {IB} RIN 2 0 10MEG CIN 2 0 1.4PF VOFST 2 10 {VOS} RID 10 3 200K EA 11 0 10 3 1 R1 11 12 5K R2 12 13 50K C1 12 0 {13E-6/FT} GA 0 14 0 13 {0.0135*(10**(G/20))} C2 13 14 {2.7E-6/FT} RO 14 0 75 L 14 6 {30/FT} RL 14 6 1000 CL 6 0 3PF .ENDS **************************************************************** * Generic FET OpAmp - linear model * Parameters: G = open-loop gain in dB * FT = unity gain frequency in Hz * VOS = input offset voltage .SUBCKT FETOPA 2 3 6 7 4 { G FT VOS } * - In + Out Vcc Vee RP 4 7 6K RXX 4 0 10MEG IBP 3 0 33E-12 RIP 3 0 1E12 CIP 3 0 3PF IBN 2 0 30E-12 RIN 2 0 1E12 CIN 2 0 3PF VOFST 2 10 {VOS} RID 10 3 1E12 EA 11 0 10 3 1 R1 11 12 5K R2 12 13 50K C1 12 0 {24E-6/FT} GA 0 14 0 13 {0.0135*(10**(G/20))} C2 13 14 {2.33E-6/FT} RO 14 0 75 L 14 6 {4E-6/FT} RL 14 6 100 CL 6 0 3PF .ENDS **************************************************************** ngspice-26/contrib/spiceprm/CHANGES0000644000265600020320000000133112264261473016504 0ustar andreasadmin------------------------------- MW. 01-10-2000 Bugs Fixes - ----------- .subckt inside another parametrized .subckt works right now. ---------------------------------------------------------------------- Version 0.11 January 2, 1996 ---------------------------------------------------------------------- No new features. Bug Fixes - ----------- 1. Duplicate name clash problem with parameterized subckt calls from within a .subckt....ends block. 2. Writing continuation lines to the output file occaisionally choked. ---------------------------------------------------------------------- Version 0.10 October 10, 1996 ---------------------------------------------------------------------- Original release. ngspice-26/contrib/spiceprm/spiceprm0000755000265600020320000002414112264261473017265 0ustar andreasadmin#! /usr/bin/perl # spiceprm # Pass parameters to spice subcircuits. # Usage: spiceprm infile [outfile] # infile and outfile must be different. # Output written to STDOUT if outfile not given. $BANNER = "Spiceprm version 0.11, Copyright (C) 1996 Andrew J. Borsa"; # NOTES: # 1. Units not recognized inside .subckt {} expressions. # 2. Perl exponent operator: "**", Spice exp op: "^". # 3. "-" as part of subckt name doesn't work but "_" does. # Netlist convention # Xname n1 n2 n3 ... ni subname {p1 = val1 ... pj = valj} # p1 thru pj are the parameters to be passed to the subcircuit. # val is any valid spice value. # # .subckt name n1 n2 ... ni {p1 p2 ... pj} # parameter expressions must be enclosed in {}. # After substitution - # Xname n1 n2 n3 ... ni subname#k # *{p1 = val1 ... pj = valj} # .subckt subname#k n1 n2 n3 ... ni # ... listing with parameters substituted # .ends # %subckt: key = subname # value = startline, endline, listing(.subckt ... .ends) # Only for .subckts with parameters. # %subprm: key = subname # value = parameter name list # %subcall: key = Xname[#subname0#subname1...] # value = subname#k # NOTE: IF Xname is called from within a .subckt, it will have calling # .subckt names appended, delimited by #'s. # %sub: key = subname#k # value = p1 val1 ... pj valj, where val is a pure # numeric with no units. $MAXLEN = 70; # Max output file line length. $DMAXLEN = 10; # Amount to increment if necessary. $linenum = 0; %units = ('f','1e-15','p','1e-12','n','1e-9','u','1e-6','mil','25.4e-6', 'm','1e-3','k','1e3','meg','1e6','g','1e9','t','1e12'); $* = 1; # Pattern match with multi-line strings. ($infile, $outfile) = @ARGV; print "\n$BANNER\ninfile: $infile\noutfile: $outfile\n\n"; $#ARGV && ($infile eq $outfile) && die "Input and Output filenames must be different\n"; open(INFILE, $infile) || die "Can't open source file: $infile\n"; $hasprm = $depth = 0; &prm_scan; close(INFILE); open(INFILE, $infile) || die "Can't open source file: $infile\n"; unlink $outfile if $#ARGV; open(OUTFILE, $#ARGV ? ">$outfile" : ">-") || die "Can't open output file: $outfile\n"; $depth = 0; &prm_wr; close(INFILE); close(OUTFILE); # Get a line from the input file, combining any continuation lines into # one long line. Skip comment and blank lines. sub prm_getline { local($line); chop($line = defined($nxtline) ? $nxtline : ); $linenum = $.; while ($nxtline = ) { if ($line =~ /^\*|^\s/) { $line = ''; } if ($line eq '' || $nxtline =~ s/^(\+)/ /) { chop($nxtline); $line .= $nxtline; } else { last; } } $line; } # Scan the input file looking for subcircuit calls with parameter list and # any subcircuits with defined parameters. sub prm_scan { local(@w, @tmp, @list); local($xnm, $subnm, $i, $max, $m, $s, $n, $tmp, $start); local($sublist) = ''; PRM_SCAN: while ($_ = &prm_getline) { # skip .control - .endc blocks if (/^\.control/i) { while ($_ = &prm_getline) { next PRM_SCAN if (/^\.endc/i); } } tr/A-Z/a-z/; PRM_TST: { if (/^x/ && s/(\{([^\}]+)\})//) { @w = split(' '); @tmp = @w[0 .. $#w-1]; $xnm = $w[0] . $sublist; $subnm = $w[$#w]; $_ = $2; $i = 0; while (/(\w+)\s*\=\s*([+-]?\d*(\.\d*)?([Ee][+-]?\d+)?)([a-z]\w*)?/) { # 1 2 3 4 5 $prmval{$1} = $2*($5 ? &unit2mult($5) : 1); $_ = $'; $i += 2; } $max = -1; $m = ''; CHKDUP: foreach $s (keys %sub) { $s =~ /(\w+)\#(\d+)/; if ($subnm eq $1) { if ($max < $2) { $max = $2; } $n = (@w = split(' ', $sub{$s})); if ($n == $i) { for ($i = 0; $i < $n; $i += 2) { last if $w[$i+1] ne $prmval{$w[$i]}; } if ($i >= $n) { $m = 1; $subcall{$xnm} = $s; last CHKDUP; } } } } if ($m eq '') { foreach $n (keys %prmval) { $m = join(' ', $m, $n, $prmval{$n}); } $sub{($s = join('', $subnm, '#', $max+1))} = $m; $subcall{$xnm} = $s; } push(@list, join(' ', @tmp, $subcall{$xnm})) if $depth; undef %prmval; last PRM_TST; } if (/^\.subckt\s+(\w+)/) { $depth++; $tmp = $1; $sublist .= '#' . $1; if (s/(\{([^\}]+)\})//) { if ($hasprm) { print "Line $linenum: ", "Nested parameterized subckt definitions not permitted\n\n"; } else { $hasprm = 1; $start = $.; $subprm{$psubnm = $tmp} = $2; } } push(@list, $_); # With {} parameter defs removed. last PRM_TST; } if (/^\.ends/) { $sublist =~ s/(\#\w+)$//; if (--$depth == 0) { if ($hasprm) { $subckt{$psubnm} = join("\n",join(' ',$start,$.),@list,$_); } $hasprm = 0; undef @list; $sublist = ''; last PRM_TST; } # MW. 'last PRM_TST' should be inside 'if' loop to allow nestle subckts. } if ($depth) { push(@list, $_); last PRM_TST; } } } } # Write the output file. sub prm_wr { local(@w, @pnms, @list, @line); local($xnm, $subnm, $n, $m, $i, $s); local($sublist) = ''; PRMWR_SCAN: while ($_ = &prm_getline) { # write .control - .endc blocks if (/^\.control/i) { print OUTFILE "$_\n"; while ($_ = &prm_getline) { prm_wrline($_); next PRMWR_SCAN if (/^\.endc/i); } } tr/A-Z/a-z/; if (/^x/ && s/(\{([^\}]+)\})//) { @w = split(' '); $subnm = pop(@w); $xnm = $w[0] . $sublist; prm_wrline(join(' ', @w, $subcall{$xnm})); print OUTFILE "* $1\n"; if (!defined($subprm{$subnm})) { print "Line $linenum: Subckt \"$subnm\" has no defined parameters\n\n"; next PRMWR_SCAN; } $n = @pnms = sort(split(' ', $subprm{$subnm})); $m = (@w = split(' ', $sub{$subcall{$xnm}})); if ($n == $m/2) { for ($i = 0, undef(@list); $i < $m; $i += 2) { push(@list, $w[$i]); } for ($i = 0, @w = sort(@list); $i < $n; ++$i) { if ($pnms[$i] ne $w[$i]) { print "Line $linenum: ", "Undefined parameter \"$w[$i]\"", "in subckt \"$subnm\" call\n\n"; next PRMWR_SCAN; } } } else { print "Line $linenum: ", "Incorrect number of parameters in subckt \"$subnm\" call\n\n"; } next PRMWR_SCAN; } if (/^\.subckt\s+(\w+)/) { if ($s = $subckt{$1}) { $s =~ /\d+\s+(\d+)/; $n = $1; &prm_getline until $. == $n; } else { $depth++; $sublist .= '#' . $1; prm_wrline($_); } next PRMWR_SCAN; } if (/^\.end\b/) { foreach $s (keys %sub) { ($subnm = $s) =~ s/\#\d+//; @line = split(/\n/, $subckt{$subnm}); shift(@line); $line[0] =~ s/$subnm/$s/; %prmval = split(' ', $sub{$s}); foreach (@line) { s/\{([^\}]+)\}/&prm_eval($1, %prmval)/eg; prm_wrline($_); } } print OUTFILE ".end\n"; last PRMWR_SCAN; } if (/^\.ends/) { if (--$depth == 0) { $sublist = ''; } else { $sublist =~ s/(\#\w+)$//; } } prm_wrline($_); } } # Translate a possible unit into a multiplier factor. # Parameter is the unit letter string assumed lower case. sub unit2mult { local($u) = shift; $u = ($u =~ /^(mil|meg)/ ? $1 : substr($u, 0, 1)); $u = defined($units{$u}) ? $units{$u} : 1; } # Evaluate a parameter expression. # Arguments: expression, parameter & value assoc. array. sub prm_eval { local($x,%prm) = @_; foreach $key (keys %prm) { $x =~ s/\b$key\b/$prm{$key}/eg; } eval($x . ';'); } # Write an output file line with a max length. The line is split on # whitespace or '=' at a point less than or equal to the max length # and output as a spice continuation line. # If a splitting delimiter is not found within $MAXLEN, then allowable # length is increased, potentially up to the actual line length. # NOTE: outputs '\n'. # $MAXLEN sets the max value, $DMAXLEN the increment. # File handle = OUTFILE. sub prm_wrline { local($line) = shift; local($max, $s, $m); $max = $MAXLEN; until ($line eq '') { if (length($line) > $max) { $m = substr($line, 0, $max); if ($m =~ /((\s|\=)[^(\s|\=)]*)$/) { $s = $` . $2; $line = '+' . substr($line, length($s)); } else { $max += $DMAXLEN; next; } } else { $s = $line; $line = ''; } print OUTFILE "$s\n"; $max = $MAXLEN; } } ngspice-26/contrib/spiceprm/README0000644000265600020320000002150712264261473016400 0ustar andreasadmin------------------------------------------------------------------------ SPICEPRM - A Spice preprocessor for parameterized subcircuits (v 0.11) Copyright (C) 1996 Andrew J. Borsa ------------------------------------------------------------------------ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. ------------------------------------------------------------------------ Spiceprm was written in the course of moving my engineering activities to the Linux operating system. My previous MSDOS spice package permitted passing parameters to subcircuits. The raw Berkely Spice doesn't. Anyone used to this feature knows the frustration of trying to use a simulator without it. This script is the result of my desperation. It translates a circuit file containing parameterized subcircuits with math expressions into another circuit file meeting raw spice requirements. You then run spice on the translated output file. This is an alpha version. It probably has some bugs I haven't caught. But I have used it in a work environment enough to feel comfortable about releasing it for comments and improvement suggestions. What's So Great About Subcircuits With Parameters? -------------------------------------------------- 1. You can generalize a model once and then use it without having to recalculate values of it's internal elements every time. 2. Many electronic devices can be modelled by using mathematical expressions. The independent variables can be passed to the model as parameters, evaluated in equations, and used to set the behavior of a particular model instance. 3. They save mucho time and minimize human calculation error. Installation ------------ 1. Copy the executable script to an accessible directory. I keep mine in $HOME/bin so it's on my path. 2. Modify the top line if necessary to reflect the path to your Perl interpreter. For ex., #! /usr/bin/perl may have to become #! /usr/local/bin/perl or wherever the perl binary is located. Usage ----- spiceprm infile [outfile] infile: Circuit file name containing parameterized subcircuits. outfile: Transformed file meeting raw spice netlist conventions. Optional. If not given, output is produced on standard output (stdout). My file name convention: infile = *.cir, outfile = *.ckt infile == outfile isn't permitted for a coupla good reasons, the best being you don't want to trash your original source. Now source outfile from spice. I always check the output from a new infile just to make sure. This version only checks for a few obvious errors, so scanning outfile for reasonable looking values and netlist correctness is wise. Note that comment and blank lines are discarded in outfile and alphabetic characters are transformed to lower case. Parameterized Subcircuit Netlist Convention ------------------------------------------- Calling a parameterized subcircuit works similarly to a normal spice call except for the addition of a {} delimited list of parameter value assignments - Xname n1 n2 n3 ... ni subname {p1 = val1 ... pj = valj} p1 thru pj are the parameter assignments to be passed to the subcircuit. val is any valid spice value. {} (braces) must enclose the parameter assignment sequence. After running the preprocessor on this file, each call in the netlist will be replaced by the following - Xname n1 n2 n3 ... ni subname#k *{p1 = val1 ... pj = valj} where k is a digit or digits representing a subcircuit with that specific set of parameter substitutions. k will be incremented for each unique set of parameters and matched by a new .subckt listing named subname#k as follows - .subckt subname#k n1 n2 n3 ... ni ... listing with parameters substituted and equations evaluated .ends Creating Parameterized Subcircuits ---------------------------------- Below is a simple example. See the EXAMPLES file for a number of illustrative and useful models for Spice3. This model creates an RF power source specified using the natural output power units of dBm (dB referenced to 1 milliwatt). Note that the model parameters must be declared on the ".subckt" definition line inside curly braces {}. **************************************************************** * Sine wave RF power source. * Parameters: F = Frequency * R = Output resistance * P = Power in dBm * V = DC (EMF) .SUBCKT RFGEN 1 2 {F R P V} * + - Is 2 1 DC {V/R} SIN {V/R} {sqrt((10**(P/10))/(125*R))} {F} Ro 1 2 {R} .ENDS **************************************************************** Note that independent current source Is has it's literal spice parameters replaced by equations that calculate the required values from the passed parameters. Each equation must be enclosed by {} to inform the preprocessor that a substitution and calculation must be performed for whatever appears between the braces. Equations may span multiple lines by using the spice line continuation symbol "+" as the first character of the following line. .MODEL statements inside subcircuits may also use passed parameters. In fact, anything between {} inside a subcircuit will be evaluated and replaced with a result. Be careful in situations like the following: Bx 3 0 v = {v(1)*sgn(v(2))*frick/frack} WRONG!!! The Spice3 nonlinear source element "B" also accepts equations describing it's output dependency on functions of circuit voltages and currents. If "frick" and "frack" are parameters, you must separate them from the element's equation as follows - Bx 3 0 v = v(1)*sgn(v(2))*{frick/frack} Just remember that preprocessor equations and spice functions must never meld. The parameter substitution first replaces all parameters between any {} with their numerical values and then uses Perl's eval() function to produce a final numerical value. Theoretically at least, you could execute a Perl program within those braces. I haven't explored this yet so feel free. Realize though, that whatever's inside the braces gets a ";" appended at the end to make a valid Perl statement from the usual equation. Also, Perl's block delimiters are braces, so extra one's could confuse the current parsing which is simply oriented to equations. Ah well. Known Bugs, Anomalies, and Perl Gotcha's ---------------------------------------- 1. Minimal error checking! Be forewarned! 2. Don't use ".ends subckt_name" with parameters. Use ".ends" only. The preprocessor modifies subckt_name to subckt_name#k. 3. Spice unit representations like "k", "meg", etc, are not recognized inside the {} equation sections of .subckt listings. They may, however, be used in the parameter assignment section of a .subckt call. 4. "-" as part of .subckt name doesn't work but "_" does. Stick to alphanumeric names with optional underscore characters. 5. Equations must use Perl math operators and functions. The following lists operator differences I'm aware of - Exponentiation - Perl : ** Spice3 : ^ Logical AND, OR - Perl : &&, || Spice3 : &, | Equality, Inequality - Perl : ==, != Spice3 : =, <> These operators are the same for Perl and Spice3 - + - * / % ! < > <= >= These operators are unique to Perl - & | ^ ~ : bitwise AND, OR, exclusive OR, complement Perl math functions - abs(EXPR) : absolute value of EXPR atan2(Y,X) : arctangent of Y/X in the range of -pi to +pi cos(EXPR) : cosine of EXPR in radians exp(EXPR) : e raised to EXPR int(EXPR) : integer portion of EXPR log(EXPR) : natural logarithm (base e) of EXPR rand[(EXPR)]: returns a random fractional number between 0 and the value of EXPR. If EXPR is omitted, returns a value between 0 and 1. sin(EXPR) : sine of EXPR in radians sqrt(EXPR) : square root of EXPR Finally, if you could make use of a language allowing you to do neat things like this with minimal pain, give Perl a try. It's naturally suited for text processing and transformation tasks like pre and post processors, along with any math manipulation required. ngspice-26/contrib/spiceprm/COPYING0000644000265600020320000004307012264261473016552 0ustar andreasadmin GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ngspice-26/contrib/spiceprm/spiceprm-0.11.lsm0000644000265600020320000000136012264261473020427 0ustar andreasadminBegin3 Title: spiceprm-0.11.tar.gz Version: 0.11 Entered-date: 02JAN97 Description: A Perl script preprocessor adding parameterized subcircuit capability to the Berkeley Spice circuit simulator. Should also work with any spice lacking this feature. Keywords: spice cad simulation preprocessor perl script Author: andy@moose.mv.com (Andy Borsa) Maintained-by: Primary-site: sunsite.unc.edu /pub/Linux/apps/circuits 15.6kB spiceprm-0.11.tar.gz Alternate-site: Original-site: Platforms: Linux or most any unix, Perl 4 or greater. Tested with Linux and Perl 5. Copying-policy: GNU General Public License. See file COPYING. End ngspice-26/contrib/ChangeLog0000644000265600020320000000060612264261473015445 0ustar andreasadmin2000-10-10 Arno W. Peters * mslib, spiceprm: Michael Widlok released new version of his programs. 2000-03-22 Paolo Nenzi * mslib: Major update. M. Widlok sent the new version of it's programs. * spiceprm: Major update. See above line. 1999-09-14 Arno W. Peters * mslib: Added. * spiceprm: Added. ngspice-26/contrib/mslib/0000755000265600020320000000000012264261473014777 5ustar andreasadminngspice-26/contrib/mslib/datadef.h0000644000265600020320000000332112264261473016537 0ustar andreasadmin/* * MW. Include for spice */ #ifndef ngspice_DATADEF_H #define ngspice_DATADEF_H /* * Program defaults * * *Directory for input file and input libraries */ #define DECKPATH "./" #define LIBPATH "/usr/local/lib/" /* * Name for output library file */ #define TMPLIBNAME ".lib" /* * * * * actual name is "deck.TMPLIBNAME" */ /* * Command for libraries, subckts and models declaration */ #define LIBINVL "*LIB" #define SUBINVL "*SUB" #define MODINVL "*MOD" /* * Keywords for subckt start, end and model */ #define SUBLINE ".SUBCKT" #define SUBEND ".ENDS" #define MODLINE ".MODEL" #define MODEND #define LIBMESSAGE "* MW Library include for Spice" #define BSIZE 255 #define MODDLINE 1 #define SUBDLINE 4 #define LIBDLINE 8 #define SUBLLINE 16 #define MODLLINE 32 #define ENDSLLINE 64 #define CONTLLINE 128 #define NORMLINE 0 #define WRITESUB 0xffff #define WRITEMOD 0x1111 #define NOWRITE 0x0 #define FAILED 0xffffff #define SUCCESS 0 #define IS_LIB 0x1 #define LIB_OPEN 0x2 #define IS_MOD 0x10 #define IS_SUB 0x100 #define FINDED 0x400 #define DUPLICATE 0x800 #define DECK_OPEN 0x20000 #define TLIB_OPEN 0x100000 #define NAMEVALID 0xfff #define NAMENOTV 0x0 struct LSData { char name[BSIZE]; FILE *filedes; int flag; struct LSData *prevLS; struct LSData *nextLS; }; struct LSData *LSinsert(struct LSData *LS, struct LSData *where); struct LSData *LSclear(struct LSData *LS); struct LSData *Backfree(struct LSData *LS); int readdeck(FILE * tdeck, struct LSData *lib, \ struct LSData *sub, struct LSData *mod); int readlib(struct LSData *lib, FILE * tlib, \ struct LSData *firstSUB, struct LSData *firstMOD); int checkname(struct LSData *smp, char *name); #endif ngspice-26/contrib/mslib/libprm0000755000265600020320000000235412264261473016216 0ustar andreasadmin#!/bin/bash #set -x -v # MW. Lip / Param parsing program for spice # -n normal, -f full (keep everything), -r replace original file # -e new addition start with editor, then like normal export TMPLP=/tmp/LibPrm.$$- function trapper() { echo User break! echo Exiting . . . rm -f -v ${TMPLP}* unset TMPLP exit 1 } trap trapper SIGINT SIGQUIT function operror() { echo Incorrect parameters: $*, $# unset TMPLP exit 2 } function repnormpl() { mslib $1 ${TMPLP}1 sed -n -e 'p' -e "1r ${TMPLP}1" $1 >${TMPLP}2 spiceprm ${TMPLP}2 $2 } function keepall() { mslib $1 sed -n -e 'p' -e "1r $1.lib" $1 >${TMPLP}2 spiceprm ${TMPLP}2 $2 } function withedit() { joe $1 mslib $1 ${TMPLP}1 sed -n -e 'p' -e "1r ${TMPLP}1" $1 >${TMPLP}2 spiceprm ${TMPLP}2 $2 } # Main body if test $# -lt 2 -o $# -gt 3; then operror $*; fi if !(test -f $2); then operror $*; fi case $1$# in -r3) operror $*;; -n2) repnormpl $2 ${2%.cir}.ckt;; -n3) repnormpl $2 $3;; -r2) repnormpl $2 $2;; -f2) keepall $2 ${2%.cir}.ckt;; -f3) keepall $2 $3;; -e2) withedit $2 ${2%.cir}.ckt;; -e3) withedit $2 $3;; esac rm -f ${TMPLP}* unset TMPLP exit 0 ngspice-26/contrib/mslib/inc_inp.c0000644000265600020320000000720612264261473016567 0ustar andreasadmin/* * MW. Include for spice */ #include #include #include #include #include "datadef.h" static int whatdline(char *tbuf, char *firstname); static int whatlline(char *tbuf, char *name); extern int bsizer; extern char buf[BSIZE]; /* * Read deck and search for *MOD, *LIB, *SUB commands */ int readdeck(FILE * tdeck, struct LSData *lib, \ struct LSData *sub, struct LSData *mod) { char firstname[BSIZE]; char *names, *smlp; struct LSData *which; while (fgets(buf, bsizer, tdeck)) { smlp = buf; /* * Ignore control chars at the end of line */ do { smlp++; } while ((!(iscntrl(*smlp))) && (*smlp != '\0')); *smlp = '\0'; switch (whatdline(buf, firstname)) { case LIBDLINE: lib->flag = IS_LIB; which = lib; break; case SUBDLINE: sub->flag = IS_SUB; which = sub; break; case MODDLINE: mod->flag = IS_MOD; which = mod; break; default: which = NULL; } /* * If we finded something */ if (which) { names = buf; strsep(&names, " "); while (smlp = strsep(&names, " ")) { if (*smlp) { which = LSinsert(NULL, which); strcpy(which->name, smlp); } } } } return ((lib->flag != IS_LIB) && (mod->flag != IS_MOD) \ &&(sub->flag != IS_SUB)) ? FAILED : SUCCESS; } /* * Read library and write specififed models/subckts to tmplib */ int readlib(struct LSData *lib, FILE * tlib, \ struct LSData *sub, struct LSData *mod) { char name[BSIZE]; int numi, wflag, nextsub; numi = 0; wflag = NOWRITE; nextsub = 0; while (fgets(buf, bsizer, lib->filedes)) { /* * Now we must check what line is it and if it should be written to tmplib */ switch (whatlline(buf, name)) { case (MODLLINE): if (wflag == WRITESUB) fputs(buf, tlib); else { if (mod) { if (checkname(mod, name)) { wflag = WRITEMOD; numi++; fprintf(tlib, "* Model: %s, from: %s.\n", \ name, lib->name); fputs(buf, tlib); } } } break; case (SUBLLINE): if (sub) { if (wflag==WRITESUB) { /* subckt inside subckt not so funny */ nextsub++; fputs(buf, tlib); break; } if (checkname(sub, name)) { wflag = WRITESUB; numi++; fprintf(tlib, "* Subckt: %s, from: %s.\n", \ name, lib->name); fputs(buf, tlib); } } break; case (NORMLINE): if (wflag == WRITEMOD) { wflag = NOWRITE; fputs("\n* End Model.\n\n", tlib); } if (wflag == WRITESUB) fputs(buf, tlib); break; case (ENDSLLINE): if (nextsub) { nextsub--; fputs(buf, tlib); break; } else { if (wflag == WRITESUB) { fprintf(tlib, "%s\n* End Subckt\n\n", buf); } wflag = NOWRITE; break; } case (CONTLLINE): if (wflag != NOWRITE) fputs(buf, tlib); } } return numi; } /* * Check what line in deck it is */ int whatdline(char *tbuf, char *firstname) { if (sscanf(tbuf, "*LIB %s", firstname) == 1) return LIBDLINE; if (sscanf(tbuf, "*SUB %s", firstname) == 1) return SUBDLINE; if (sscanf(tbuf, "*MOD %s", firstname) == 1) return MODDLINE; return NORMLINE; } /* * Check what line it is. If we have model or subckt line we also read its name */ int whatlline(char *tbuf, char *name) { if (sscanf(tbuf, ".SUBCKT %s %*s", name) == 1) return SUBLLINE; if (sscanf(tbuf, ".MODEL %s %*s", name) == 1) return MODLLINE; if (sscanf(tbuf, ".ENDS%c", name) == 1) return ENDSLLINE; if (sscanf(tbuf, "+%s", name) == 1) return CONTLLINE; return NORMLINE; } ngspice-26/contrib/mslib/libprm_readme0000644000265600020320000000142612264261473017527 0ustar andreasadminSo, this is my idea of using parametrized subckts with spice3f4. First I create an input file like foo.cir and I include commands for mslib (*MOD, *SUB, *LIB) in it. Then I run "libprm -n foo.cir". Libprm then runs mslib first to get all models and subckts form given libraries and then runs spiceprm to evaluate all used parameters. This works quite right for me, and I hope that You will find my idea useful. Spiceprm is not my program (I get it from Internet), but I think that it will better to enclose all used programs in this packet. Spiceprm has it's own directory with very good readme and examples. If You want to find out more about libprm or mslib look for the source code. These are rather short and easy programs - they are all that I could write in quite short time. ngspice-26/contrib/mslib/makefile0000644000265600020320000000036412264261473016502 0ustar andreasadmin# MW. Include libs for Spice CFLAGS= -O2 -s LDFLAGS= -s OBJS= inc_main.o inc_inp.o inc_LSD.o HDRS= datadef.h SRCC= inc_main.c inc_inp.c inc_LSD.c mslib: $(OBJS) $(CC) $(LDFLAGS) -o $@ $(OBJS) clean: $(RM) $(OBJS) mslib $(OBJS): $(HDRS) ngspice-26/contrib/mslib/inc_LSD.c0000644000265600020320000000306412264261473016421 0ustar andreasadmin/* * MW. Include for spice - LSData functions */ #include #include #include #include #include "datadef.h" char *Message = "Michael Widlok, all rights reserved \n" "mslib - MW include for Spice models/subckts\n"; /* * Add or cretate new LS structure just after where pointer */ struct LSData * LSinsert(struct LSData *LS, struct LSData *where) { if (!(LS)) { LS = (struct LSData *) malloc(sizeof(struct LSData)); if (!(LS)) { fprintf(stderr, "LSinsert: Can't allocate LSData srtucture.\n"); exit(FAILED); } LS->filedes = NULL; } /* * If where is given we must set nextLS and prevLS correctly */ if (where) { LS->prevLS = where; if (LS->nextLS = where->nextLS) where->nextLS->prevLS = LS; where->nextLS = LS; } else LS->nextLS = LS->prevLS = NULL; return LS; } /* * Clear all LS list from end. This also closes opened files */ struct LSData * LSclear(struct LSData *LS) { while (LS->nextLS) LS = LS->nextLS; return Backfree(LS); } /* * Used by LSclear */ struct LSData * Backfree(struct LSData *LS) { if (LS->filedes) fclose(LS->filedes); return (LS->prevLS) ? Backfree(LS->prevLS) : free(LS), LS; } /* * Check if sub/mod name should by included */ int checkname(struct LSData *smp, char *name) { do { if (!(strcmp(smp->name, name))) { if (smp->flag != FINDED) { smp->flag = FINDED; return NAMEVALID; } else { smp->flag = DUPLICATE; return NAMEVALID; } } smp = smp->nextLS; } while (smp); return NAMENOTV; } ngspice-26/contrib/mslib/mslib_readme0000644000265600020320000000302612264261473017346 0ustar andreasadminMslib can create a small tmp library which can be .include to spice deck or used as tmp file with libprm. You invoke it like this: mslib deck_name [tmp_lib_name]. If second argument is not given mslib uses deck_name.lib. Mslib then reads deck and looks for special commands in it. This commands are: *SUB name1 name2 ... - what subckts are used *MOD name1 name2 ... - what models are used *LIB name1 name2 ... - what libraries should be searched You can give full path for libraries or just the name. Mslib tries to find them in current directory and then in directory specified in datadef.h file. There are also some other default options defined there. Check them After all a tmp. library for the deck is created. It consist only the models and subckts that were specified in *MOD and *SUB commands. This is all. Mslib is _NOT_ a good program. It should automatically recognize what models or subckts were used and it should be written with flex or bison. Now it just indicates what is my level of programming in C. There are some options that You can set for mslib in datadef.h. I tried to document all of them there, so when want to know more look to the sources. And one more thing. There is a perl program "spiceprm" that lets You use parameters in subckts. Many Intusoft's libraries use this feature. To use parameters I have written a small shell script "libprm". This program automatic runs spiceprm and mslib on Your's deck to give a working spice input file. To see how this all works please read "libprm_readme" and spiceprm readme. ngspice-26/contrib/mslib/liblook0000755000265600020320000000300312264261473016354 0ustar andreasadmin#!/bin/bash #set -x -v # MW. Lib search / show program # usage liblook libname [text_to_find] [l_before] [l_after] LIBPATH=/usr/local/lib function trapper() { echo User break! echo Exiting . . . unset LIBPATH exit 1 } trap trapper SIGINT SIGQUIT function operror() { echo Incorrect parameters: $*, $# echo Usage: liblook libname [text_to_find] [l_before] [l_after] unset LIBPATH exit 2 } function showlib() { if test -f $LIBPATH/$1; then less $LIBPATH/$1; exit 0; fi if test -f [C./$1; then less ./$1; exit 0; fi echo Searching $1 in ~/ . . . less $(find ~/ -name $1) } function searchlib() { if test -f $LIBPATH/$1; then echo File: $1; echo; grep -B"$3" -A"$4" --ignore-case -e "$2" $LIBPATH/$1; echo; exit 0; fi if test -f ./$1; then echo File: $1; echo; grep -B"$3" -A"$4" --ignore-case -e "$2" ./$1; echo; exit 0; fi #if *.lib or sth like this echo Searching $1 in ~/ . . .;echo; if (grep -B"$3" -A"$4" --ignore-case -e "$2" $(find ~/ -name $1)); then echo; exit 0; fi echo Searching $1 in $LIBPATH;echo; if (grep -B"$3" -A"$4" --ignore-case -e "$2" $(find $LIBPATH -name $1)); then echo; exit 0; fi } # Main body if test $# -lt 1 -o $# -gt 4; then operror $*; fi case $# in 1) showlib $*;; 2) searchlib $1 $2 2 2;; 3) searchlib $1 $2 $3 2;; 4) searchlib $1 $2 $3 $4;; esac unset LIBPATH exit 0 ngspice-26/contrib/mslib/COPYING0000644000265600020320000000023112264261473016026 0ustar andreasadminMslib is free for everyone who think that it might by useful for him. If someone makes it better please e-mail me. Michael Widlok widlok@uci.agh.edu.pl ngspice-26/contrib/mslib/inc_main.c0000644000265600020320000000740112264261473016722 0ustar andreasadmin/* * MW. Include - main functions */ #include #include #include #include #include "datadef.h" struct LSData *firstLIB; struct LSData *firstSUB; struct LSData *firstMOD; struct LSData *deck; struct LSData *tmplib; int bsize, bsizer; char buf[BSIZE]; int main(int argc, char *argv[]) { /* * Initialize everything */ struct LSData *subp, *libp, *modp; char tch[BSIZE]; int mswritten; tmplib = LSinsert(NULL, NULL); deck = LSinsert(NULL, NULL); *tch = '\0'; mswritten = 0; switch (argc) { case 3: strcpy(tmplib->name, argv[--argc]); strcpy(tch, tmplib->name); case 2: strcpy(deck->name, argv[--argc]); if (!(*tch)) { sprintf(tmplib->name, "%s%s", deck->name, TMPLIBNAME); strcpy(tch, tmplib->name); } break; case 1: fprintf(stdout, "Usage: mslib deck [tmplib]\n"); return FAILED; default: fprintf(stderr, "mslib: Incorrect parameters count.\n"); return FAILED; } /* * Open deck */ if (!(deck->filedes = fopen(deck->name, "r"))) { sprintf(deck->name, "%s%s", DECKPATH, argv[1]); sprintf(tmplib->name, "%s%s", DECKPATH, tch); if (!(deck->filedes = fopen(deck->name, "r"))) { fprintf(stderr, "mslib: Can't open deck %s.\n", deck->name); LSclear(deck); LSclear(tmplib); return FAILED; } } bsizer = BSIZE; bsize = bsizer--; deck->flag = DECK_OPEN; /* * Create tmplib and write first line to it */ if (!(tmplib->filedes = fopen(tmplib->name, "w"))) { fprintf(stderr, "mslib: Can't creat tmplib %s.\n", tmplib->name); LSclear(tmplib); LSclear(deck); return FAILED; } tmplib->flag = TLIB_OPEN; fprintf(tmplib->filedes, "%s\n* Tmp library: %s,\n* For deck: %s.\n\n", \ LIBMESSAGE, tmplib->name, deck->name); firstLIB = LSinsert(NULL, NULL); firstSUB = LSinsert(NULL, NULL); firstMOD = LSinsert(NULL, NULL); /* * Find commands in deck */ readdeck(deck->filedes, firstLIB, firstSUB, firstMOD); if (firstLIB->flag = IS_LIB) { libp = firstLIB->nextLS; do { if (!(libp->filedes = fopen(libp->name, "r"))) { strcpy(tch, libp->name); sprintf(libp->name, "%s%s", LIBPATH, tch); if (!(libp->filedes = fopen(libp->name, "r"))) { libp->flag = FAILED; } } /* * Read libraries if everything is OK */ if (libp->flag != FAILED) { libp->flag = LIB_OPEN; modp = (firstMOD->flag == IS_MOD) ? firstMOD->nextLS : NULL; subp = (firstSUB->flag == IS_SUB) ? firstSUB->nextLS : NULL; mswritten += readlib(libp, tmplib->filedes, subp, modp); } libp = libp->nextLS; } while (libp); } fprintf(stdout, "mslib: Written %d items to tmplib %s.\n", \ mswritten, tmplib->name); if (libp = firstLIB->nextLS) { do { if (libp->flag != LIB_OPEN) fprintf(stderr, " Can't open lib %s.\n", libp->name); libp = libp->nextLS; } while (libp); } /* * Check is models or subckts were find and * * are not duplicated */ if (modp = firstMOD->nextLS) { do { switch (modp->flag) { case DUPLICATE: fprintf(stderr, " Model duplicated %s.\n", \ modp->name); break; default: fprintf(stderr, " Can't find model %s.\n", \ modp->name); break; case FINDED: } modp = modp->nextLS; } while (modp); } if (subp = firstSUB->nextLS) { do { switch (subp->flag) { case DUPLICATE: fprintf(stderr, " Subckt duplicated %s.\n", \ subp->name); break; default: fprintf(stderr, " Can't find subckt %s.\n", \ subp->name); break; case FINDED: } subp = subp->nextLS; } while (subp); } /* * Clear all data and close files */ LSclear(tmplib); LSclear(deck); LSclear(firstLIB); LSclear(firstSUB); return SUCCESS; } ngspice-26/compile0000755000265600020320000001615212264261533013611 0ustar andreasadmin#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-03-05.13; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free # Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ngspice-26/src/0000755000265600020320000000000012264261713013015 5ustar andreasadminngspice-26/src/tclspice.c0000644000265600020320000021453312264261473015002 0ustar andreasadmin/* Copyright 2003-2008 Multigig Ltd * * Copied and written by Stefan Jones (stefan.jones@multigig.com) at Multigig Ltd * * Code based on and copied from ScriptEDA ( http://www-cad.eecs.berkeley.edu/~pinhong/scriptEDA ) * * Under LGPLv2 licence since 2008, December 1st */ /*******************/ /* Defines */ /*******************/ #define TCLSPICE_name "spice" #define TCLSPICE_prefix "spice::" #define TCLSPICE_namespace "spice" #ifdef _MSC_VER #define TCLSPICE_version "25.1" #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #endif /**********************************************************************/ /* Header files for C functions */ /**********************************************************************/ #include "ngspice/ngspice.h" #include "misc/misc_time.h" #include /*Use Tcl threads if on W32 without pthreads*/ #ifndef HAVE_LIBPTHREAD #if defined(__MINGW32__) || defined(_MSC_VER) #define mutex_lock(a) Tcl_MutexLock(a) #define mutex_unlock(a) Tcl_MutexUnlock(a) #define thread_self() Tcl_GetCurrentThread() typedef Tcl_Mutex mutexType; typedef Tcl_ThreadId threadId_t; #define TCL_THREADS #define THREADS #endif #else #include #define mutex_lock(a) pthread_mutex_lock(a) #define mutex_unlock(a) pthread_mutex_unlock(a) #define thread_self() pthread_self() typedef pthread_mutex_t mutexType; typedef pthread_t threadId_t; #define THREADS #endif /* Copied from main.c in ngspice*/ #include #if defined(__MINGW32__) #include /* remove type incompatibility with winnt.h*/ #undef BOOLEAN #include #include /* Sleep */ #elif defined(_MSC_VER) #include /* remove type incompatibility with winnt.h*/ #undef BOOLEAN #include /* Sleep */ #include /* _getpid */ #define dup _dup #define dup2 _dup2 #define open _open #define close _close #else #include /* usleep */ #endif /* __MINGW32__ */ #include "ngspice/iferrmsg.h" #include "ngspice/ftedefs.h" #include "ngspice/devdefs.h" #include #include #include #include #include #ifdef _MSC_VER #include #define snprintf _snprintf #endif #include #include "ngspice/memory.h" #include #ifndef HAVE_GETRUSAGE #ifdef HAVE_FTIME #include #endif #endif /* To interupt a spice run */ #include typedef void (*sighandler)(int); #include #include "frontend/signal_handler.h" /*Included for the module to access data*/ #include "ngspice/dvec.h" #include "ngspice/plot.h" #ifdef __CYGWIN__ #undef WIN32 #endif #include #include "ngspice/sim.h" /* defines for Tcl support * Tcl 8.3 and Tcl 8.4 support, * suggested by http://mini.net/tcl/3669, 07.03.03 */ #ifndef CONST84 #define CONST84 #endif /* Arguments of Tcl_CmpProc for Tcl/Tk 8.4.x */ #define TCL_CMDPROCARGS(clientData, interp, argc, argv) \ (ClientData clientData, Tcl_Interp *interp, int argc, CONST84 char *argv[]) /*For get_output*/ #include #include #ifdef _MSC_VER #define S_IRWXU _S_IWRITE #endif #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif extern IFfrontEnd nutmeginfo; extern struct comm spcp_coms[ ]; extern void DevInit(void); extern int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator); extern wordlist *cp_varwl(struct variable *var); /*For blt spice to use*/ typedef struct { char *name; #ifdef THREADS mutexType mutex; /*lock for this vector*/ #endif double *data; /* vector data*/ int size; /*data it can store*/ int length; /*actual amount of data*/ } vector; /*The current run (to get variable names, etc)*/ static runDesc *cur_run; static vector *vectors; static int ownVectors; /* save this each time called */ static Tcl_Interp *spice_interp; #define save_interp() \ do { \ spice_interp = interp; \ } while(0) void tcl_stdflush(FILE *f); int tcl_vfprintf(FILE *f, const char *fmt, va_list args); #if defined(__MINGW32__) || defined(_MSC_VER) __declspec(dllexport) #endif int Spice_Init(Tcl_Interp *interp); int Tcl_ExecutePerLoop(void); void triggerEventCheck(ClientData clientData, int flags); void triggerEventSetup(ClientData clientData, int flags); int triggerEventHandler(Tcl_Event *evPtr, int flags); void stepEventCheck(ClientData clientData, int flags); int stepEventHandler(Tcl_Event *evPtr, int flags); void stepEventSetup(ClientData clientData, int flags); int sp_Tk_Update(void); int sp_Tk_SetColor(int colorid); int sp_Tk_SetLinestyle(int linestyleid); int sp_Tk_DefineLinestyle(int linestyleid, int mask); int sp_Tk_DefineColor(int colorid, double red, double green, double blue); int sp_Tk_Text(char *text, int x, int y); int sp_Tk_Arc(int x0, int y0, int radius, double theta, double delta_theta); int sp_Tk_DrawLine(int x1, int y1, int x2, int y2); int sp_Tk_Clear(void); int sp_Tk_Close(void); int sp_Tk_NewViewport(GRAPH *graph); int sp_Tk_Init(void); int get_mod_param TCL_CMDPROCARGS(clientData, interp, argc, argv); void sighandler_tclspice(int num); void blt_relink(int index, void *tmp); void blt_lockvec(int index); void blt_add(int index, double value); void blt_init(void *run); int blt_plot(struct dvec *y, struct dvec *x, int new); /****************************************************************************/ /* BLT and data routines */ /****************************************************************************/ /*helper function*/ /*inline*/ static struct plot * get_plot(int plot) { struct plot *pl; pl = plot_list; for (; 0 < plot; plot--) { pl = pl->pl_next; if (!pl) return NULL; } return pl; } /*this holds the number of time points done (altered by spice)*/ int steps_completed; /* number of bltvectors*/ static int blt_vnum; /*Native Tcl functions */ static int spice_header TCL_CMDPROCARGS(clientData, interp, argc, argv) { char buf[256]; char *date, *name, *title; NG_IGNORE(clientData); NG_IGNORE(argv); if (argc != 1) { Tcl_SetResult(interp, "Wrong # args. spice::spice_header", TCL_STATIC); return TCL_ERROR; } if (cur_run) { Tcl_ResetResult(interp); date = datestring(); title = cur_run->name; name = cur_run->type; sprintf(buf, "{title \"%s\"} {name \"%s\"} {date \"%s\"} {variables %u}", title, name, date, cur_run->numData); Tcl_AppendResult(interp, buf, TCL_STATIC); return TCL_OK; } else { return TCL_ERROR; } } static int spice_data TCL_CMDPROCARGS(clientData, interp, argc, argv) { char buf[256]; int i, type; char *name; NG_IGNORE(clientData); if (argc > 2) { Tcl_SetResult(interp, "Wrong # args. spice::spice_data ?plot?", TCL_STATIC); return TCL_ERROR; } if (argc == 1) { if (blt_vnum) { Tcl_ResetResult(interp); for (i = 0; i < blt_vnum; i++) { name = vectors[i].name; if (substring("#branch", name)) type = SV_CURRENT; else if (cieq(name, "time")) type = SV_TIME; else if (cieq(name, "frequency")) type = SV_FREQUENCY; else type = SV_VOLTAGE; sprintf(buf, "{%s %s} ", name, ft_typenames(type)); Tcl_AppendResult(interp, buf, TCL_STATIC); } return TCL_OK; } else { return TCL_ERROR; } } else { struct plot *pl; struct dvec *v; if (!(pl = get_plot(atoi(argv[1])))) { Tcl_SetResult(interp, "Bad plot number", TCL_STATIC); return TCL_ERROR; } for (v = pl->pl_dvecs; v; v = v->v_next) { name = v->v_name; if (substring("#branch", name)) type = SV_CURRENT; else if (cieq(name, "time")) type = SV_TIME; else if (cieq(name, "frequency")) type = SV_FREQUENCY; else type = SV_VOLTAGE; sprintf(buf, "{%s %s} ", name, ft_typenames(type)); Tcl_AppendResult(interp, buf, TCL_STATIC); } return TCL_OK; } } static int resetTriggers(void); /*Creates and registers the blt vectors, used by spice*/ void blt_init(void *run) { int i; cur_run = NULL; /* reset varaibles and free*/ if (vectors) { resetTriggers(); for (i = blt_vnum-1, blt_vnum = 0 /*stops vector access*/; i >= 0; i--) { if (ownVectors) FREE(vectors[i].data); FREE(vectors[i].name); #ifdef HAVE_LIBPTHREAD pthread_mutex_destroy(&vectors[i].mutex); #endif } FREE(vectors); } /* initilise */ cur_run = (runDesc *)run; vectors = TMALLOC(vector, cur_run->numData); for (i = 0; i < cur_run->numData; i++) { vectors[i].name = copy((cur_run->data[i]).name); #ifdef HAVE_LIBPTHREAD pthread_mutex_init(&vectors[i].mutex, NULL); #endif vectors[i].data = NULL; vectors[i].size = 0; vectors[i].length = 0; } ownVectors = cur_run->writeOut; blt_vnum = i; /*allows access to vectors*/ return; } /*Adds data to the stored vector*/ void blt_add(int index, double value) { vector *v; v = &vectors[index]; #ifdef THREADS mutex_lock(&vectors[index].mutex); #endif if (!(v->length < v->size)) { v->size += 100; v->data = TREALLOC(double, v->data, v->size); } v->data[v->length] = value; v->length ++; #ifdef THREADS mutex_unlock(&vectors[index].mutex); #endif return; } /* Locks the vector data to stop conflicts*/ void blt_lockvec(int index) { #ifdef THREADS mutex_lock(&vectors[index].mutex); #else NG_IGNORE(index); #endif return; } /*links a dvec to a blt vector, used to stop duplication of data when writing to a plot, but makes BLT vectors more unsafe */ void blt_relink(int index, void *tmp) { struct dvec *v = (struct dvec *)tmp; vectors[index].data = v->v_realdata; vectors[index].length = v->v_length; vectors[index].size = v->v_length; /*silly spice doesn't use v_rlength*/ #ifdef THREADS mutex_unlock(&vectors[index].mutex); #endif return; } /* Tcl functions to access spice data */ /* This copys the last Spice state vector to the given blt_vector * arg1: blt_vector */ static int lastVector TCL_CMDPROCARGS(clientData, interp, argc, argv) { Blt_Vector *vec; char *blt; int i; double *V; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::lastVector vecName", TCL_STATIC); return TCL_ERROR; } Tcl_SetResult(interp, "test2", TCL_STATIC); return TCL_ERROR; blt = (char *)argv[1]; if (Blt_GetVector(interp, blt, &vec)) { Tcl_SetResult(interp, "Bad blt vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)blt, TCL_STATIC); return TCL_ERROR; } if (!(V = TMALLOC(double, blt_vnum))) { Tcl_SetResult(interp, "Out of Memory", TCL_STATIC); return TCL_ERROR; } Tcl_SetResult(interp, "test1", TCL_STATIC); return TCL_ERROR; for (i = 0; i < blt_vnum; i++) { #ifdef THREADS mutex_lock(&vectors[i].mutex); #endif V[i] = vectors[i].data[vectors[i].length-1]; #ifdef THREADS mutex_unlock(&vectors[i].mutex); #endif } Blt_ResetVector(vec, V, blt_vnum, blt_vnum, TCL_VOLATILE); txfree(V); return TCL_OK; } /*agr1: spice variable name *arg2: index */ static int get_value TCL_CMDPROCARGS(clientData, interp, argc, argv) { char *var; int i, vindex, j; double val = 0; NG_IGNORE(clientData); if (argc != 3) { Tcl_SetResult(interp, "Wrong # args. spice::get_value spice_variable index", TCL_STATIC); return TCL_ERROR; } var = (char *)argv[1]; for (i = 0; i < blt_vnum && strcmp(var, vectors[i].name); i++) ; if (i == blt_vnum) { Tcl_SetResult(interp, "Bad spice variable ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } else { vindex = i; } j = atoi(argv[2]); #ifdef THREADS mutex_lock(&vectors[vindex].mutex); #endif if (j < 0 || j >= vectors[vindex].length) { i = 1; } else { i = 0; val = vectors[vindex].data[j]; } #ifdef THREADS mutex_unlock(&vectors[vindex].mutex); #endif if (i) { Tcl_SetResult(interp, "Index out of range", TCL_STATIC); return TCL_ERROR; } else { Tcl_SetObjResult(interp, Tcl_NewDoubleObj(val)); return TCL_OK; } } /* * arg1: spice vector name * arg2: real data blt vector * arg3: Optional: imaginary data blt vector*/ static int vectoblt TCL_CMDPROCARGS(clientData, interp, argc, argv) { Blt_Vector *real_BltVector, *imag_BltVector; char *realBlt, *imagBlt, *var; struct dvec *var_dvec; double *realData, *compData; int compIndex; //index to loop inside the vectors' data NG_IGNORE(clientData); if (argc < 3 || argc > 4) { Tcl_SetResult(interp, "Wrong # args. spice::vectoblt spice_variable real_bltVector [imag_bltVector]", TCL_STATIC); return TCL_ERROR; } real_BltVector = NULL; imag_BltVector = NULL; var = (char *)argv[1]; var_dvec = vec_get(var); if (var_dvec == NULL) { Tcl_SetResult(interp, "Bad spice vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } realBlt = (char *)argv[2]; if (Blt_GetVector(interp, realBlt, &real_BltVector)) { Tcl_SetResult(interp, "Bad real blt vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)realBlt, TCL_STATIC); return TCL_ERROR; } if (argc == 4) { imagBlt = (char *)argv[3]; if (Blt_GetVector(interp, imagBlt, &imag_BltVector)) { Tcl_SetResult(interp, "Bad imag blt vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)imagBlt, TCL_STATIC); return TCL_ERROR; } } /*If data is complex, it is harder (more complex :) to export...*/ // int compIndex; //index to loop inside the vectors' data if (var_dvec->v_realdata == NULL) { if (var_dvec->v_compdata == NULL) { Tcl_SetResult(interp, "The vector contains no data", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); } else { realData = TMALLOC(double, var_dvec->v_length); for (compIndex = 0; compIndex < var_dvec->v_length; compIndex++) realData[compIndex] = ((var_dvec->v_compdata+compIndex)->cx_real); Blt_ResetVector(real_BltVector, realData, var_dvec->v_length, var_dvec->v_length, TCL_VOLATILE); if (imag_BltVector != NULL) { compData = TMALLOC(double, var_dvec->v_length); for (compIndex = 0; compIndex < var_dvec->v_length; compIndex++) compData[compIndex] = ((var_dvec->v_compdata+compIndex)->cx_imag); Blt_ResetVector(imag_BltVector, compData, var_dvec->v_length, var_dvec->v_length, TCL_VOLATILE); } } } else { Blt_ResetVector(real_BltVector, var_dvec->v_realdata, var_dvec->v_length, var_dvec->v_length, TCL_VOLATILE); if (imag_BltVector != NULL) { compData = TMALLOC(double, var_dvec->v_length); for (compIndex = 0; compIndex < var_dvec->v_length; compIndex++) compData[compIndex] = 0; Blt_ResetVector(imag_BltVector, compData, var_dvec->v_length, var_dvec->v_length, TCL_VOLATILE); } } Tcl_SetResult(interp, "finished!", TCL_STATIC); return TCL_OK; } /*agr1: spice variable name *arg2: blt_vector *arg3: start copy index, optional *arg4: end copy index. optional */ static int spicetoblt TCL_CMDPROCARGS(clientData, interp, argc, argv) { Blt_Vector *vec; int j, i; char *blt, *var; int start = 0, end = -1, len; NG_IGNORE(clientData); if (argc < 3 || argc > 5) { Tcl_SetResult(interp, "Wrong # args. spice::spicetoblt spice_variable vecName ?start? ?end?", TCL_STATIC); return TCL_ERROR; } var = (char *)argv[1]; blt = (char *)argv[2]; for (i = 0; i < blt_vnum && strcmp(var, vectors[i].name); i++) ; if (i == blt_vnum) { Tcl_SetResult(interp, "Bad spice variable ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } else { j = i; } if (Blt_GetVector(interp, blt, &vec)) { Tcl_SetResult(interp, "Bad blt vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)blt, TCL_STATIC); return TCL_ERROR; } if (argc >= 4) start = atoi(argv[3]); if (argc == 5) end = atoi(argv[4]); if (vectors[j].length) { #ifdef THREADS mutex_lock(&vectors[j].mutex); #endif len = vectors[j].length; if (start) { start = start % len; if (start < 0) start += len; } end = end % len; if (end < 0) end += len; len = abs(end - start + 1); Blt_ResetVector(vec, (vectors[j].data + start), len, len, TCL_VOLATILE); #ifdef THREADS mutex_unlock(&vectors[j].mutex); #endif } return TCL_OK; } /******************************************************************/ /* Main spice command executions and thread control */ /*****************************************************************/ #ifdef THREADS static threadId_t tid, bgtid = (threadId_t) 0; static bool fl_running = FALSE; static bool fl_exited = TRUE; #if defined(__MINGW32__) || defined(_MSC_VER) #define EXPORT_FLAVOR WINAPI #else #define EXPORT_FLAVOR #endif static void * EXPORT_FLAVOR _thread_run(void *string) { fl_exited = FALSE; bgtid = thread_self(); cp_evloop((char *)string); FREE(string); bgtid = (threadId_t)0; fl_exited = TRUE; return NULL; } /*Stops a running thread, hopefully */ static int EXPORT_FLAVOR _thread_stop(void) { int timeout = 0; if (fl_running) { while (!fl_exited && timeout < 100) { ft_intrpt = TRUE; timeout++; #if defined(__MINGW32__) || defined(_MSC_VER) Sleep(100); /* va: windows native */ #else usleep(10000); #endif } if (!fl_exited) { fprintf(stderr, "Couldn't stop tclspice\n"); return TCL_ERROR; } #ifdef HAVE_LIBPTHREAD pthread_join(tid, NULL); #endif fl_running = FALSE; ft_intrpt = FALSE; return TCL_OK; } else { fprintf(stderr, "Spice not running\n"); } return TCL_OK; } void sighandler_tclspice(int num) { NG_IGNORE(num); if (fl_running) _thread_stop(); return; } #endif /*THREADS*/ static int _run(int argc, char **argv) { char buf[1024] = ""; int i; sighandler oldHandler; #ifdef THREADS char *string; bool fl_bg = FALSE; /* run task in background if preceeded by "bg"*/ if (!strcmp(argv[0], "bg")) { argc--; argv = &argv[1]; fl_bg = TRUE; } #endif /* Catch Ctrl-C to break simulations */ #ifndef _MSC_VER_ oldHandler = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (SETJMP(jbuf, 1) != 0) { ft_sigintr_cleanup(); signal(SIGINT, oldHandler); return TCL_OK; } #else oldHandler = SIG_IGN; #endif /*build a char * to pass to cp_evloop */ for (i = 0; i < argc; i++) { strcat(buf, argv[i]); strcat(buf, " "); } #ifdef THREADS /* run in the background */ if (fl_bg) { if (fl_running) _thread_stop(); fl_running = TRUE; string = copy(buf); /*as buf gets freed fairly quickly*/ #ifdef HAVE_LIBPTHREAD pthread_create(&tid, NULL, _thread_run, (void *)string); #else Tcl_CreateThread(&tid, (Tcl_ThreadCreateProc *)_thread_run, string, TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS); #endif } else /* halt (pause) a bg run */ if (!strcmp(argv[0], "halt")) { signal(SIGINT, oldHandler); return _thread_stop(); } else /* backwards compatability with old command */ if (!strcmp(argv[0], "stop")) if (argc > 1) { cp_evloop(buf); } else { _thread_stop(); cp_evloop(buf); } else { /* cannot do anything if spice is running in the bg*/ if (fl_running) { if (fl_exited) { _thread_stop(); cp_evloop(buf); } else { fprintf(stderr, "type \"spice stop\" first\n"); } } else { /*do the command*/ cp_evloop(buf); } } #else cp_evloop(buf); #endif /*THREADS*/ signal(SIGINT, oldHandler); return TCL_OK; } static int _tcl_dispatch TCL_CMDPROCARGS(clientData, interp, argc, argv) { int i; NG_IGNORE(clientData); save_interp(); /* Looks backwards through the first command and strips the :: part */ for (i = strlen(argv[0])-1; i > 0; i--) if (argv[0][i] == *":") argv[0] += i + 1; return _run(argc, (char **)argv); } /* Runs the spice command given in spice */ static int _spice_dispatch TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); save_interp(); if (argc == 1) return TCL_OK; return _run(argc-1, (char **)&argv[1]); } #ifdef THREADS /*Checks if spice is runnuing in the background */ static int running TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); NG_IGNORE(argc); NG_IGNORE(argv); Tcl_SetObjResult(interp, Tcl_NewIntObj((long) (fl_running && !fl_exited))); return TCL_OK; } #endif /**************************************/ /* plot manipulation functions */ /* only usefull if plots are saved */ /**************************************/ /*Outputs the names of all variables in the plot */ static int plot_variables TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; struct dvec *v; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_variables plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot given", TCL_STATIC); return TCL_ERROR; } for (v = pl->pl_dvecs; v; v = v->v_next) Tcl_AppendElement(interp, v->v_name); return TCL_OK; } static int plot_variablesInfo TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; struct dvec *v; char buf[256]; char *name; int length; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_variablesInfo plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot given", TCL_STATIC); return TCL_ERROR; } Tcl_ResetResult(interp); for (v = pl->pl_dvecs; v; v = v->v_next) { name = v->v_name; length = v->v_length; sprintf(buf, "{%s %s %i} ", name, ft_typenames(v->v_type), length); Tcl_AppendResult(interp, (char *)buf, TCL_STATIC); } return TCL_OK; } /*returns the value of a variable */ static int plot_get_value TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; struct dvec *v; char *name; int plot, index; NG_IGNORE(clientData); if (argc != 4) { Tcl_SetResult(interp, "Wrong # args. spice::plot_get_value name plot index", TCL_STATIC); return TCL_ERROR; } name = (char *)argv[1]; plot = atoi(argv[2]); index = atoi(argv[3]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } for (v = pl->pl_dvecs; v; v = v->v_next) if (!strcmp(v->v_name, name)) { if (index < v->v_length) { Tcl_SetObjResult(interp, Tcl_NewDoubleObj((double) v->v_realdata[index])); return TCL_OK; } else { Tcl_SetResult(interp, "Bad index", TCL_STATIC); return TCL_ERROR; } } Tcl_SetResult(interp, "variable not found", TCL_STATIC); return TCL_ERROR; } /*The length of the first vector in a plot*/ static int plot_datapoints TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; struct dvec *v; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_datapoints plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } v = pl->pl_dvecs; Tcl_SetObjResult(interp, Tcl_NewIntObj((long) v->v_length)); // could be very dangeous return TCL_OK; } /*These functions give you infomation about a plot*/ static int plot_title TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_title plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewStringObj(pl->pl_title, -1)); return TCL_OK; } static int plot_date TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_date plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewStringObj(pl->pl_date, -1)); return TCL_OK; } static int plot_name TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_name plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewStringObj(pl->pl_name, -1)); return TCL_OK; } static int plot_typename TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_typename plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } Tcl_SetObjResult(interp, Tcl_NewStringObj(pl->pl_typename, -1)); return TCL_OK; } /*number of variables in a plot*/ static int plot_nvars TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; struct dvec *v; int plot; int i = 0; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_nvars plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } for (v = pl->pl_dvecs; v; v = v->v_next) i++; Tcl_SetObjResult(interp, Tcl_NewIntObj((long) i)); return TCL_OK; } static int plot_defaultscale TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct plot *pl; int plot; NG_IGNORE(clientData); if (argc != 2) { Tcl_SetResult(interp, "Wrong # args. spice::plot_defaultscale plot", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } if (pl->pl_scale) Tcl_SetObjResult(interp, Tcl_NewStringObj(pl->pl_scale->v_name, -1)); return TCL_OK; } /*agr1: plot index *agr2: spice variable name *arg3: blt_vector *arg4: start copy index, optional *arg5: end copy index. optional */ static int plot_getvector TCL_CMDPROCARGS(clientData, interp, argc, argv) { Blt_Vector *vec; char *blt, *var; int start = 0, end = -1, len; int plot; struct dvec *v; struct plot *pl; NG_IGNORE(clientData); if (argc < 4 || argc > 6) { Tcl_SetResult(interp, "Wrong # args. spice::plot_getvector plot spice_variable vecName ?start? ?end?", TCL_STATIC); return TCL_ERROR; } plot = atoi(argv[1]); if (!(pl = get_plot(plot))) { Tcl_SetResult(interp, "Bad plot", TCL_STATIC); return TCL_ERROR; } var = (char *)argv[2]; blt = (char *)argv[3]; for (v = pl->pl_dvecs; v; v = v->v_next) if (!strcmp(v->v_name, var)) break; if (v == NULL) { Tcl_SetResult(interp, "variable not found: ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } if (Blt_GetVector(interp, blt, &vec)) { Tcl_SetResult(interp, "Bad blt vector ", TCL_STATIC); Tcl_AppendResult(interp, (char *)blt, TCL_STATIC); return TCL_ERROR; } if (argc >= 5) start = atoi(argv[4]); if (argc == 6) end = atoi(argv[5]); if (v->v_length) { len = v->v_length; if (start) { start = start % len; if (start < 0) start += len; } end = end % len; if (end < 0) end += len; len = abs(end - start + 1); Blt_ResetVector(vec, (v->v_realdata + start), len, len, TCL_VOLATILE); } return TCL_OK; } static int plot_getplot TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); NG_IGNORE(argc); NG_IGNORE(argv); if (plot_cur) Tcl_SetObjResult(interp, Tcl_NewStringObj(plot_cur->pl_typename, -1)); return TCL_OK; } /*******************************************/ /* Misc functions */ /*******************************************/ /*Runs a tcl script and returns the output*/ static int get_output TCL_CMDPROCARGS(clientData, interp, argc, argv) { FILE *pipein; int tmp_1, tmp_2 = 0; char buf[1024]; int outfd, outfd2 = 0; NG_IGNORE(clientData); save_interp(); if ((argc < 2) || (argc > 3)) { Tcl_SetResult(interp, "Wrong # args. spice::get_output script ?var_for_stderr?", TCL_STATIC); return TCL_ERROR; } tmp_1 = dup(1); outfd = open("/tmp/tclspice.tmp_out", O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU); if (argc == 3) { tmp_2 = dup(2); outfd2 = open("/tmp/tclspice.tmp_err", O_WRONLY|O_CREAT|O_TRUNC, S_IRWXU); } freopen("/tmp/tclspice.tmp_out", "w", stdout); if (argc == 3) freopen("/tmp/tclspice.tmp_err", "w", stderr); dup2(outfd, 1); if (argc == 3) dup2(outfd2, 2); Tcl_Eval(interp, argv[1]); fclose(stdout); close(outfd); if (argc == 3) { fclose(stderr); close(outfd2); } dup2(tmp_1, 1); close(tmp_1); if (argc == 3) { dup2(tmp_2, 2); close(tmp_2); } freopen("/dev/fd/1", "w", stdout); if (argc == 3) freopen("/dev/fd/2", "w", stderr); pipein = fopen("/tmp/tclspice.tmp_out", "r"); if (pipein == NULL) fprintf(stderr, "pipein==NULL\n"); Tcl_ResetResult(interp); while (fgets(buf, 1024, pipein) != NULL) Tcl_AppendResult(interp, (char *)buf, TCL_STATIC); fclose(pipein); if (argc == 3) { pipein = fopen("/tmp/tclspice.tmp_err", "r"); Tcl_SetVar(interp, argv[2], "", 0); while (fgets(buf, 1024, pipein) != NULL) Tcl_SetVar(interp, argv[2], buf, TCL_APPEND_VALUE); fclose(pipein); } return TCL_OK; } /* Returns the current value of a parameter * has lots of memory leaks */ static int get_param TCL_CMDPROCARGS(clientData, interp, argc, argv) { wordlist *wl = NULL; char *device, *param; struct variable *v; char buf[128]; NG_IGNORE(clientData); if (argc != 3) { Tcl_SetResult(interp, "Wrong # args. spice::get_param device param", TCL_STATIC); return TCL_ERROR; } if (!ft_curckt) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } device = (char *)argv[1]; param = (char *)argv[2]; /* copied from old_show(wordlist *) */ v = if_getparam (ft_curckt->ci_ckt, &device, param, 0, 0); if (!v) v = if_getparam (ft_curckt->ci_ckt, &device, param, 0, 1); if (v) { wl = cp_varwl(v); Tcl_SetResult(interp, wl->wl_word, TCL_VOLATILE); wl_free(wl); tfree(v); return TCL_OK; } else { sprintf(buf, "%s in %s not found", param, device); Tcl_AppendResult(interp, buf, TCL_STATIC); } return TCL_ERROR; } /* va - added call: s. errormessage returns: param == all: list of all model parameters of device/model param == name: description of given model parameter */ int get_mod_param TCL_CMDPROCARGS(clientData, interp, argc, argv) { char *name; char *paramname; GENinstance *devptr = NULL; GENmodel *modptr = NULL; IFdevice *device; IFparm *opt; IFvalue pv; int i, err, typecode = -1; char buf[128]; bool found; NG_IGNORE(clientData); if (argc < 2 || argc >3) { Tcl_SetResult(interp, "Wrong # args. spice::get_mod_param device|model [all|param]", TCL_STATIC); return TCL_ERROR; } if (ft_curckt == NULL) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } name = (char *)argv[1]; if (argc > 2) paramname = (char *)argv[2]; else paramname = "all"; if (name == NULL || name[0] == '\0') { Tcl_SetResult(interp, "No model or device name provided.", TCL_STATIC); return TCL_ERROR; } /* get the unique IFuid for name (device/model) */ INPretrieve(&name, ft_curckt->ci_symtab); devptr = ft_sim->findInstance (ft_curckt->ci_ckt, name); if (devptr) { typecode = devptr->GENmodPtr->GENmodType; } else { modptr = ft_sim->findModel (ft_curckt->ci_ckt, name); if (modptr) { typecode = modptr->GENmodType; } else { sprintf(buf, "No such device or model name %s", name); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_ERROR; } } device = ft_sim->devices[typecode]; found = FALSE; for (i = 0; i < *(device->numModelParms); i++) { opt = &device->modelParms[i]; if (opt->dataType != (IF_SET|IF_ASK|IF_REAL)) continue; /* only real IO-parameter */ if (strcmp(paramname, "all") == 0) { Tcl_AppendElement(interp, opt->keyword); found = TRUE; } else if (strcmp(paramname, opt->keyword) == 0) { if (devptr) err = ft_sim->askInstanceQuest (ft_curckt->ci_ckt, devptr, opt->id, &pv, NULL); else err = ft_sim->askModelQuest (ft_curckt->ci_ckt, modptr, opt->id, &pv, NULL); if (err == OK) { sprintf(buf, "%g", pv.rValue); /* dataType is here always real */ Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_OK; } } } if (found != TRUE) { sprintf(buf, "unknown parameter %s", paramname); Tcl_SetResult(interp, buf, TCL_VOLATILE); return TCL_ERROR; } return TCL_OK; } /* Direct control over the step size * Spice will still adjust it to keep accuracy wuithin reltol and abstol */ static int delta TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); if (argc < 1 ||argc > 2) { Tcl_SetResult(interp, "Wrong # args. spice::delta ?value?", TCL_STATIC); return TCL_ERROR; } if (ft_curckt == NULL) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } if (argc == 2) (ft_curckt->ci_ckt)->CKTdelta = atof(argv[1]); Tcl_SetObjResult(interp, Tcl_NewDoubleObj((ft_curckt->ci_ckt)->CKTdelta)); return TCL_OK; } #include "ngspice/trandefs.h" /* Direct control over the maximum stepsize * Spice will still adjust it to keep accuracy wuithin reltol and abstol */ static int maxstep TCL_CMDPROCARGS(clientData, interp, argc, argv) { TRANan *job; NG_IGNORE(clientData); if (argc < 1 ||argc > 2) { Tcl_SetResult(interp, "Wrong # args. spice::maxstep ?value?", TCL_STATIC); return TCL_ERROR; } if (ft_curckt == NULL) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob; if (argc == 2) job->TRANmaxStep = atof(argv[1]); Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANmaxStep)); return TCL_OK; } /* obtain the initial time of a transient analysis */ static int get_initTime TCL_CMDPROCARGS(clientData, interp, argc, argv) { TRANan *job; NG_IGNORE(argv); NG_IGNORE(clientData); if (argc < 1 ||argc > 1) { Tcl_SetResult(interp, "Wrong # args. spice::get_initTime", TCL_STATIC); return TCL_ERROR; } if (ft_curckt == NULL) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob; Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANinitTime)); return TCL_OK; } /* obtain the final time of a transient analysis */ static int get_finalTime TCL_CMDPROCARGS(clientData, interp, argc, argv) { TRANan *job; NG_IGNORE(argv); NG_IGNORE(clientData); if (argc < 1 ||argc > 1) { Tcl_SetResult(interp, "Wrong # args. spice::get_finalTime", TCL_STATIC); return TCL_ERROR; } if (ft_curckt == NULL) { Tcl_SetResult(interp, "No circuit loaded ", TCL_STATIC); return TCL_ERROR; } job = (TRANan*)(ft_curckt->ci_ckt)->CKTcurJob; Tcl_SetObjResult(interp, Tcl_NewDoubleObj(job->TRANfinalTime)); return TCL_OK; } /****************************************/ /* The Tk frontend for plot */ /****************************************/ /* Use Tcl_GetStringResult to get canvas size etc. from Tcl */ #include "ngspice/ftedev.h" int sp_Tk_Init(void) { /* This is hard coded in C at the mo, use X11 values */ dispdev->numlinestyles = 8; dispdev->numcolors = 20; dispdev->width = 1280; dispdev->height = 1024; return 0; } #include "ngspice/graph.h" int sp_Tk_NewViewport(GRAPH *graph) { const char *result; int width, height, fontwidth, fontheight; graph->devdep = NULL; if (Tcl_GlobalEval(spice_interp, "spice_gr_NewViewport") != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } result = Tcl_GetStringResult(spice_interp); if (sscanf(result, "%i %i %i %i", &width, &height, &fontwidth, &fontheight) != 4) { Tcl_ResetResult(spice_interp); return 1; } graph->absolute.xpos = 0; /* these always seem sensible, let Tcl adjust coods */ graph->absolute.ypos = 0; graph->absolute.width = width; graph->absolute.height = height; graph->fontwidth = fontwidth; graph->fontheight = fontheight; Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_Close(void) { if (Tcl_Eval(spice_interp, "spice_gr_Close") != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_Clear(void) { if (Tcl_Eval(spice_interp, "spice_gr_Clear") != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_DrawLine(int x1, int y1, int x2, int y2) { char buf[1024]; sprintf(buf, "spice_gr_DrawLine %i %i %i %i", x1, y1, x2, y2); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_Arc(int x0, int y0, int radius, double theta, double delta_theta) { char buf[1024]; sprintf(buf, "spice_gr_Arc %i %i %i %f %f", x0, y0, radius, theta, delta_theta); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_Text(char *text, int x, int y) { char buf[1024]; sprintf(buf, "spice_gr_Text \"%s\" %i %i", text, x, y); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_DefineColor(int colorid, double red, double green, double blue) { char buf[1024]; sprintf(buf, "spice_gr_DefineColor %i %g %g %g", colorid, red, green, blue); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_DefineLinestyle(int linestyleid, int mask) { char buf[1024]; sprintf(buf, "spice_gr_DefineLinestyle %i %i", linestyleid, mask); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_SetLinestyle(int linestyleid) { char buf[1024]; sprintf(buf, "spice_gr_SetLinestyle %i", linestyleid); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_SetColor(int colorid) { char buf[1024]; sprintf(buf, "spice_gr_SetColor %i", colorid); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } int sp_Tk_Update(void) { if (Tcl_Eval(spice_interp, "spice_gr_Update") != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } /********************************************************/ /* The Blt method for plotting */ /********************************************************/ static void dvecToBlt(Blt_Vector *Data, struct dvec *x) { if (x->v_flags & VF_REAL) { Blt_ResetVector (Data, x->v_realdata , x->v_length, x->v_length, TCL_VOLATILE); } else { double *data; int i; data = TMALLOC(double, x->v_length); for (i = 0; i < x->v_length; i++) data[i] = realpart(x->v_compdata[i]); Blt_ResetVector (Data, data, x->v_length, x->v_length, TCL_VOLATILE); tfree(data); } return; } static void escape_brackets(char *string) { int printed = strlen(string), i; for (i = 0; i < printed; i++) { if (string[i] == ']' || string[i] == '[') { int j; for (j = printed; j >= i; j--) string[j+3] = string[j]; string[i] = '\\'; string[i+1] = '\\'; string[i+2] = '\\'; i += 3; printed += 3; } } return; } int blt_plot(struct dvec *y, struct dvec *x, int new) { static int ctr = -1; Blt_Vector *X_Data = NULL, *Y_Data = NULL; char buf[1024]; /* A bug in these functions? , crashes if used so make vectors in Tcl Blt_CreateVector(spice_interp, "::spice::X_Data", 1, &X_Data); Blt_CreateVector(spice_interp, "::spice::Y_Data", 1, &Y_Data); */ Blt_GetVector(spice_interp, "::spice::X_Data", &X_Data); Blt_GetVector(spice_interp, "::spice::Y_Data", &Y_Data); if (!X_Data || !Y_Data) { fprintf(stderr, "Error: Blt vector X_Data or Y_Data not created\n"); return 1; } dvecToBlt(X_Data, x); dvecToBlt(Y_Data, y); if (new) ctr++; sprintf(buf, "spice_gr_Plot %s %s %s %s %s %s %d", x->v_name, ft_typenames(x->v_type), ft_typabbrev(x->v_type), y->v_name, ft_typenames(y->v_type), ft_typabbrev(y->v_type), ctr); escape_brackets(buf); if (Tcl_Eval(spice_interp, buf) != TCL_OK) { Tcl_ResetResult(spice_interp); return 1; } Tcl_ResetResult(spice_interp); return 0; } /********************************************************/ /* Triggering stuff */ /********************************************************/ struct triggerEvent { struct triggerEvent *next; int vector; int type; int stepNumber; double time; double voltage; char ident[16]; }; struct triggerEvent *eventQueue; struct triggerEvent *eventQueueEnd; #ifdef THREADS mutexType triggerMutex; #endif struct watch { struct watch *next; char name[16]; int vector; /* index of vector to watch */ int type; /* +ive or -ive trigger */ int state; /* pretriggered or not */ double Vmin; /* the boundaries */ double Vmax; /* To get the exact trigger time */ double Vavg; double oT; double oV; }; struct watch *watches; char *triggerCallback; unsigned int triggerPollTime = 1; char *stepCallback; unsigned int stepPollTime = 1; unsigned int stepCount = 1; int stepCallbackPending; void stepEventSetup(ClientData clientData, int flags) { Tcl_Time t; NG_IGNORE(clientData); NG_IGNORE(flags); if (stepCallbackPending) { t.sec = 0; t.usec = 0; } else { t.sec = stepPollTime / 1000; t.usec = (stepPollTime % 1000) * 1000; } Tcl_SetMaxBlockTime(&t); } int stepEventHandler(Tcl_Event *evPtr, int flags) { NG_IGNORE(evPtr); NG_IGNORE(flags); if (stepCallbackPending) { stepCallbackPending = 0; Tcl_Preserve((ClientData)spice_interp); Tcl_Eval(spice_interp, stepCallback); Tcl_ResetResult(spice_interp); Tcl_Release((ClientData)spice_interp); } return TCL_OK; } void stepEventCheck(ClientData clientData, int flags) { NG_IGNORE(clientData); NG_IGNORE(flags); if (stepCallbackPending) { Tcl_Event *tclEvent; tclEvent = (Tcl_Event *) ckalloc(sizeof(Tcl_Event)); tclEvent->proc = stepEventHandler; Tcl_QueueEvent(tclEvent, TCL_QUEUE_TAIL); } } int triggerEventHandler(Tcl_Event *evPtr, int flags) { static char buf[512]; int rtn = TCL_OK; NG_IGNORE(evPtr); NG_IGNORE(flags); Tcl_Preserve((ClientData)spice_interp); #ifdef THREADS mutex_lock(&triggerMutex); #endif while (eventQueue) { struct triggerEvent *event = eventQueue; eventQueue = eventQueue->next; snprintf(buf, 512, "%s %s %g %d %d %g %s", triggerCallback, vectors[event->vector].name, event->time, event->stepNumber, event->type, event->voltage, event->ident); rtn = Tcl_Eval(spice_interp, buf); FREE(event); if (rtn) goto quit; } eventQueueEnd = NULL; quit: #ifdef THREADS mutex_unlock(&triggerMutex); #endif Tcl_ResetResult(spice_interp); Tcl_Release((ClientData)spice_interp); return TCL_OK; } void triggerEventSetup(ClientData clientData, int flags) { Tcl_Time t; NG_IGNORE(clientData); NG_IGNORE(flags); if (eventQueue) { t.sec = 0; t.usec = 0; } else { t.sec = triggerPollTime / 1000; t.usec = (triggerPollTime % 1000) * 1000; } Tcl_SetMaxBlockTime(&t); } void triggerEventCheck(ClientData clientData, int flags) { NG_IGNORE(clientData); NG_IGNORE(flags); #ifdef THREADS mutex_lock(&triggerMutex); #endif if (eventQueue) { Tcl_Event *tclEvent; tclEvent = (Tcl_Event *) ckalloc(sizeof(Tcl_Event)); tclEvent->proc = triggerEventHandler; Tcl_QueueEvent(tclEvent, TCL_QUEUE_TAIL); } #ifdef THREADS mutex_unlock(&triggerMutex); #endif } int Tcl_ExecutePerLoop(void) { struct watch *current; #ifdef THREADS mutex_lock(&vectors[0].mutex); mutex_lock(&triggerMutex); #endif for (current = watches; current; current = current->next) { vector *v; v = &vectors[current->vector]; #ifdef THREADS mutex_lock(&v->mutex); #endif if ((current->type > 0 && current->state && v->data[v->length-1] > current->Vmax) || (current->type < 0 && current->state && v->data[v->length-1] < current->Vmin)) { struct triggerEvent *tmp = TMALLOC(struct triggerEvent, 1); tmp->next = NULL; if (eventQueue) { eventQueueEnd->next = tmp; eventQueueEnd = tmp; } else { eventQueue = tmp; } eventQueueEnd = tmp; tmp->vector = current->vector; tmp->type = current->type; tmp->stepNumber = vectors[0].length; { double T = vectors[0].data[vectors[0].length-1]; double V = v->data[v->length-1]; tmp->time = current->oT + (current->Vavg - current->oV) * (T - current->oT) / (V - current->oV); tmp->voltage = current->Vavg; } strcpy(tmp->ident, current->name); current->state = 0; } else if ((current->type > 0 && v->data[v->length-1] < current->Vmin) || (current->type < 0 && v->data[v->length-1] > current->Vmax)) current->state = 1; current->oT = vectors[0].data[vectors[0].length-1]; current->oV = v->data[v->length-1]; #ifdef THREADS mutex_unlock(&v->mutex); #endif } if (stepCallback && vectors[0].length % stepCount == 0) stepCallbackPending = 1; #ifdef THREADS mutex_unlock(&triggerMutex); mutex_unlock(&vectors[0].mutex); if (triggerCallback && eventQueue && bgtid != thread_self()) triggerEventHandler(NULL, 0); if (stepCallback && stepCallbackPending && bgtid != thread_self()) stepEventHandler(NULL, 0); #else if (triggerCallback && eventQueue) triggerEventHandler(NULL, 0); if (stepCallback && stepCallbackPending) triggerEventHandler(NULL, 0); #endif return 0; } static int resetTriggers(void) { #ifdef THREADS mutex_lock(&triggerMutex); #endif while (watches) { struct watch *tmp = watches; watches = tmp->next; FREE(tmp); } while (eventQueue) { struct triggerEvent *tmp = eventQueue; eventQueue = tmp->next; FREE(tmp); } eventQueueEnd = NULL; #ifdef THREADS mutex_unlock(&triggerMutex); #endif return 0; } /* Registers a watch for a trigger *arg0: Callback function (optional - none removes callback) *arg1: Poll interval usec (optional - defaults to 500000 ) */ static int registerTriggerCallback TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); if (argc > 3) { Tcl_SetResult(interp, "Wrong # args. spice::registerTriggerCallback ?proc? ?ms?", TCL_STATIC); return TCL_ERROR; } if (triggerCallback) { Tcl_DeleteEventSource(triggerEventSetup, triggerEventCheck, NULL); free(triggerCallback); triggerCallback = NULL; } if (argc == 1) return TCL_OK; triggerCallback = strdup(argv[1]); Tcl_CreateEventSource(triggerEventSetup, triggerEventCheck, NULL); if (argc == 3) { triggerPollTime = atoi(argv[2]); if (triggerPollTime == 0) triggerPollTime = 500; } return TCL_OK; } /* Registers step counter callback *arg0: Callback function (optional - none removes callback) *arg1: Number of steps per Callback *arg2: Poll interval usec (optional - defaults to 500000 ) */ static int registerStepCallback TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); if (argc > 4) { Tcl_SetResult(interp, "Wrong # args. spice::registerStepCallback ?proc? ?steps? ?ms?", TCL_STATIC); return TCL_ERROR; } if (stepCallback) { Tcl_DeleteEventSource(stepEventSetup, stepEventCheck, NULL); free(stepCallback); stepCallback = NULL; } if (argc == 1) return TCL_OK; stepCallback = strdup(argv[1]); Tcl_CreateEventSource(stepEventSetup, stepEventCheck, NULL); if (argc >= 3) { stepCount = atoi(argv[2]); if (stepCount == 0) stepCount = 1; } if (argc == 4) { stepPollTime = atoi(argv[3]); if (stepPollTime == 0) stepPollTime = 50; } return TCL_OK; } /* Registers a watch for a trigger *arg0: Vector Name to watch *arg1: Vmin *arg2: Vmax *arg3: 1 / -1 for +ive(voltage goes +ive) or -ive trigger */ static int registerTrigger TCL_CMDPROCARGS(clientData, interp, argc, argv) { int i, index; const char *var; char ident[16]; struct watch *tmp; int type; double Vavg, Vmin, Vmax; NG_IGNORE(clientData); if (argc < 4 && argc > 6) { Tcl_SetResult(interp, "Wrong # args. spice::registerTrigger vecName Vmin Vmax ?type? ?string?", TCL_STATIC); return TCL_ERROR; } var = argv[1]; for (i = 0; i < blt_vnum && strcmp(var, vectors[i].name); i++) ; if (i == blt_vnum) { Tcl_SetResult(interp, "Bad spice variable ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } else { index = i; } if (argc >= 5) type = atoi(argv[4]); else type = 1; if (argc >= 6) { strncpy(ident, argv[5], sizeof(ident)); ident[sizeof(ident)-1] = '\0'; } else { ident[0] = '\0'; } Vmin = atof(argv[2]); Vmax = atof(argv[3]); Vavg = (Vmin + Vmax) / 2 ; #ifdef THREADS mutex_lock(&triggerMutex); #endif for (tmp = watches; tmp != NULL; tmp = tmp->next) if (ident[0] != '\0') { if (strcmp(ident, tmp->name) == 0) { watches->vector = index; watches->type = type; strcpy(watches->name, ident); watches->state = 0; watches->Vmin = Vmin; watches->Vmax = Vmax; watches->Vavg = Vavg; break; } } else { if (tmp->vector == index && tmp->type == type && tmp->Vavg == Vavg) { tmp->Vmin = Vmin; tmp->Vmax = Vmax; break; } } if (tmp == NULL) { tmp = TMALLOC(struct watch, 1); tmp->next = watches; watches = tmp; watches->vector = index; watches->type = type; strcpy(watches->name, ident); watches->state = 0; watches->Vmin = Vmin; watches->Vmax = Vmax; watches->Vavg = Vavg; } #ifdef THREADS mutex_unlock(&triggerMutex); #endif return TCL_OK; } /*unregisters a trigger *arg0: Vector name *arg1: type */ static int unregisterTrigger TCL_CMDPROCARGS(clientData, interp, argc, argv) { int i, index, type; char *var; struct watch *tmp; struct watch **cut; NG_IGNORE(clientData); if (argc != 2 && argc != 3) { Tcl_SetResult(interp, "Wrong # args. spice::unregisterTrigger vecName ?type?", TCL_STATIC); return TCL_ERROR; } var = (char *)argv[1]; for (i = 0; i < blt_vnum && strcmp(var, vectors[i].name); i++) ; if (i == blt_vnum) index = -1; else index = i; if (argc == 3) type = atoi(argv[4]); else type = 1; #ifdef THREADS mutex_lock(&triggerMutex); #endif cut = &watches; tmp = watches; while (tmp) if ((tmp->vector == index && tmp->type == type) || strcmp(var, tmp->name) == 0) { *cut = tmp->next; txfree(tmp); break; } else { cut = &tmp->next; tmp = tmp->next; } #ifdef THREADS mutex_unlock(&triggerMutex); #endif if (tmp == NULL) { Tcl_SetResult(interp, "Could not find trigger ", TCL_STATIC); Tcl_AppendResult(interp, (char *)var, TCL_STATIC); return TCL_ERROR; } return TCL_OK; } /* returns: "vecName" "time" "stepNumber" "type" */ static int popTriggerEvent TCL_CMDPROCARGS(clientData, interp, argc, argv) { NG_IGNORE(clientData); NG_IGNORE(argv); if (argc != 1) { Tcl_SetResult(interp, "Wrong # args. spice::popTriggerEvent", TCL_STATIC); return TCL_ERROR; } if (eventQueue) { struct triggerEvent *popedEvent; Tcl_Obj *list; #ifdef THREADS mutex_lock(&triggerMutex); #endif popedEvent = eventQueue; eventQueue = popedEvent->next; if (eventQueue == NULL) eventQueueEnd = NULL; list = Tcl_NewListObj(0, NULL); Tcl_ListObjAppendElement(interp, list, Tcl_NewStringObj(vectors[popedEvent->vector].name, strlen(vectors[popedEvent->vector].name))); Tcl_ListObjAppendElement(interp, list, Tcl_NewDoubleObj(popedEvent->time)); Tcl_ListObjAppendElement(interp, list, Tcl_NewIntObj(popedEvent->stepNumber)); Tcl_ListObjAppendElement(interp, list, Tcl_NewIntObj(popedEvent->type)); Tcl_ListObjAppendElement(interp, list, Tcl_NewDoubleObj(popedEvent->voltage)); Tcl_ListObjAppendElement(interp, list, Tcl_NewStringObj(popedEvent->ident, strlen(popedEvent->ident))); Tcl_SetObjResult(interp, list); FREE(popedEvent); #ifdef THREADS mutex_unlock(&triggerMutex); #endif } return TCL_OK; } static int listTriggers TCL_CMDPROCARGS(clientData, interp, argc, argv) { struct watch *tmp; Tcl_Obj *list; NG_IGNORE(clientData); NG_IGNORE(argv); if (argc != 1) { Tcl_SetResult(interp, "Wrong # args. spice::listTriggers", TCL_STATIC); return TCL_ERROR; } list = Tcl_NewListObj(0, NULL); #ifdef THREADS mutex_lock(&triggerMutex); #endif for (tmp = watches; tmp; tmp = tmp->next) Tcl_ListObjAppendElement(interp, list, Tcl_NewStringObj(vectors[tmp->vector].name, strlen(vectors[tmp->vector].name))); #ifdef THREADS mutex_unlock(&triggerMutex); #endif Tcl_SetObjResult(interp, list); return TCL_OK; } static int tmeasure TCL_CMDPROCARGS(clientData, interp, argc, argv) { wordlist *wl = NULL; double mvalue; NG_IGNORE(clientData); if (argc <= 2) { Tcl_SetResult(interp, "Wrong # args. spice::listTriggers", TCL_STATIC); return TCL_ERROR; } wl = wl_build((char **)argv); get_measure2(wl, &mvalue, NULL, FALSE); printf(" %e \n", mvalue); Tcl_ResetResult(spice_interp); Tcl_SetObjResult(interp, Tcl_NewDoubleObj((double) mvalue)); return TCL_OK; } /*******************************************************/ /* Initialise spice and setup native methods */ /*******************************************************/ #if defined(__MINGW32__) || defined(_MSC_VER) __declspec(dllexport) #endif int Spice_Init(Tcl_Interp *interp) { if (interp == 0) return TCL_ERROR; #ifdef USE_TCL_STUBS if (Tcl_InitStubs(interp, (char *)"8.1", 0) == NULL) return TCL_ERROR; #endif Tcl_PkgProvide(interp, (char*) TCLSPICE_name, (char*) TCLSPICE_version); Tcl_Eval(interp, "namespace eval " TCLSPICE_namespace " { }"); save_interp(); { int i; char *key; Tcl_CmdInfo infoPtr; char buf[256]; sighandler old_sigint; ft_rawfile = NULL; ivars(NULL); cp_in = stdin; cp_out = stdout; cp_err = stderr; /*timer*/ init_time(); /*IFsimulator struct initilised*/ SIMinit(&nutmeginfo, &ft_sim); /* program name*/ cp_program = ft_sim->simulator; srand((unsigned int) getpid()); TausSeed(); /*parameter fetcher, used in show*/ if_getparam = spif_getparam_special; /* Get startup system limits */ init_rlimits(); /*Command prompt stuff */ ft_cpinit(); /* Read the user config files */ /* To catch interrupts during .spiceinit... */ old_sigint = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (SETJMP(jbuf, 1) == 1) { ft_sigintr_cleanup(); fprintf(cp_err, "Warning: error executing .spiceinit.\n"); goto bot; } #ifdef HAVE_PWD_H /* Try to source either .spiceinit or ~/.spiceinit. */ if (access(".spiceinit", 0) == 0) { inp_source(".spiceinit"); } else { char *s; struct passwd *pw; pw = getpwuid(getuid()); #ifdef HAVE_ASPRINTF asprintf(&s, "%s%s", pw->pw_dir, INITSTR); #else s = TMALLOC(char, 1 + strlen(pw->pw_dir) + strlen(INITSTR)); sprintf(s, "%s%s", pw->pw_dir, INITSTR); #endif if (access(s, 0) == 0) inp_source(s); } #else /* ~ HAVE_PWD_H */ { FILE *fp; /* Try to source the file "spice.rc" in the current directory. */ if ((fp = fopen("spice.rc", "r")) != NULL) { (void) fclose(fp); inp_source("spice.rc"); } } #endif /* ~ HAVE_PWD_H */ bot: signal(SIGINT, old_sigint); /* initilise Tk display */ DevInit(); /* init the mutex */ #ifdef HAVE_LIBPTHREAD pthread_mutex_init(&triggerMutex, NULL); #endif #ifdef THREADS signal(SIGINT, sighandler_tclspice); #endif /*register functions*/ for (i = 0; (key = cp_coms[i].co_comname); i++) { sprintf(buf, "%s%s", TCLSPICE_prefix, key); if (Tcl_GetCommandInfo(interp, buf, &infoPtr) != 0) printf("Command '%s' can not be registered!\n", buf); else Tcl_CreateCommand(interp, buf, _tcl_dispatch, NULL, NULL); } Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_header", spice_header, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "spice_data", spice_data, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "spicetoblt", spicetoblt, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "vectoblt", vectoblt, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "lastVector", lastVector, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_value", get_value, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "spice", _spice_dispatch, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_output", get_output, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_param", get_param, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_mod_param", get_mod_param, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "delta", delta, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "maxstep", maxstep, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_initTime", get_initTime, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "get_finalTime", get_finalTime, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variables", plot_variables, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_variablesInfo", plot_variablesInfo, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_get_value", plot_get_value, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_datapoints", plot_datapoints, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_title", plot_title, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_date", plot_date, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_name", plot_name, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_typename", plot_typename, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_nvars", plot_nvars, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_defaultscale", plot_defaultscale, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "plot_getvector", plot_getvector, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "getplot", plot_getplot, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTrigger", registerTrigger, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerTriggerCallback", registerTriggerCallback, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "popTriggerEvent", popTriggerEvent, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "unregisterTrigger", unregisterTrigger, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "listTriggers", listTriggers, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerTriggerCallback, NULL, NULL); #ifdef THREADS Tcl_CreateCommand(interp, TCLSPICE_prefix "bg", _tcl_dispatch, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "halt", _tcl_dispatch, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "running", running, NULL, NULL); #endif Tcl_CreateCommand(interp, TCLSPICE_prefix "tmeasure", tmeasure, NULL, NULL); Tcl_CreateCommand(interp, TCLSPICE_prefix "registerStepCallback", registerStepCallback, NULL, NULL); Tcl_LinkVar(interp, TCLSPICE_prefix "steps_completed", (char *)&steps_completed, TCL_LINK_READ_ONLY|TCL_LINK_INT); Tcl_LinkVar(interp, TCLSPICE_prefix "blt_vnum", (char *)&blt_vnum, TCL_LINK_READ_ONLY|TCL_LINK_INT); } return TCL_OK; } /***************************************/ /* printf wrappers to redirect to puts */ /***************************************/ /* Contributed by Tim Edwards (tim@stravinsky.jhuapl.edu), 2003 */ /*------------------------------------------------------*/ /* Redefine the vfprintf() functions for use with tkcon */ /*------------------------------------------------------*/ int tcl_vfprintf(FILE *f, const char *fmt, va_list args) { char buf[1024]; char *p, *s; int size, nchars, escapes, result; const char * const escape_chars = "$[]\"\\"; const char * const prolog = (f == stderr) ? "puts -nonewline stderr \"" : "puts -nonewline stdout \""; const char * const epilog = "\""; const int prolog_len = strlen(prolog); const int epilog_len = strlen(epilog); if ((fileno(f) != STDOUT_FILENO && fileno(f) != STDERR_FILENO && f != stderr && f != stdout) #ifdef THREADS || (fl_running && bgtid == thread_self()) #endif ) return vfprintf(f, fmt, args); p = buf; // size: how much ist left for chars and terminating '\0' size = sizeof(buf) - prolog_len - epilog_len; // assert(size > 0); for (;;) { nchars = vsnprintf(p + prolog_len, size, fmt, args); if(nchars == -1) { /* compatibility to old implementations */ size *= 2; } else if (size < nchars + 1) { size = nchars + 1; } else { break; } if(p == buf) p = Tcl_Alloc(prolog_len + size + epilog_len); else p = Tcl_Realloc(p, prolog_len + size + epilog_len); } strncpy(p, prolog, prolog_len); s = p + prolog_len; for (escapes = 0; ; escapes++) { s = strpbrk(s, escape_chars); if (!s) break; s++; } if (escapes) { int new_size = prolog_len + nchars + escapes + epilog_len + 1; char *src, *dst; if (p != buf) { p = Tcl_Realloc(p, new_size); } else if (new_size > sizeof(buf)) { p = Tcl_Alloc(new_size); strcpy(p, buf); } src = p + prolog_len + nchars; dst = src + escapes; while (dst > src) { char c = *--src; *--dst = c; if (strchr(escape_chars, c)) *--dst = '\\'; } } strcpy(p + prolog_len + nchars + escapes, epilog); result = Tcl_Eval(spice_interp, p); if (p != buf) Tcl_Free(p); return nchars; } /*----------------------------------------------------------------------*/ /* Reimplement fprintf() as a call to Tcl_Eval(). */ /*----------------------------------------------------------------------*/ int tcl_fprintf(FILE *f, const char *format, ...) { va_list args; int rtn; va_start (args, format); rtn = tcl_vfprintf(f, format, args); va_end(args); return rtn; } /*----------------------------------------------------------------------*/ /* Reimplement printf() as a call to Tcl_Eval(). */ /*----------------------------------------------------------------------*/ int tcl_printf(const char *format, ...) { va_list args; int rtn; va_start (args, format); rtn = tcl_vfprintf(stdout, format, args); va_end(args); return rtn; } /*------------------------------------------------------*/ /* Console output flushing which goes along with the */ /* routine tcl_vprintf() above. */ /*------------------------------------------------------*/ void tcl_stdflush(FILE *f) { Tcl_SavedResult state; static char stdstr[] = "flush stdxxx"; char *stdptr = stdstr + 9; #ifdef THREADS if (fl_running && bgtid == thread_self()) return; #endif Tcl_SaveResult(spice_interp, &state); strcpy(stdptr, (f == stderr) ? "err" : "out"); Tcl_Eval(spice_interp, stdstr); Tcl_RestoreResult(spice_interp, &state); } ngspice-26/src/unsupported/0000755000265600020320000000000012264261713015405 5ustar andreasadminngspice-26/src/unsupported/cktsnset.c0000644000265600020320000000202512264261473017411 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * CKTsenSetup(ckt) * this is a driver program to iterate through all the various * sensitivity setup functions provided for the circuit elements * in the given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" int CKTsenSetup(CKTcircuit *ckt) { int i; int error; SENstruct *info; #ifdef SENSDEBUG printf("CKTsenSetup\n"); #endif info = ckt->CKTsenInfo; info->SENparms = 0; for (i = 0; i < DEVmaxnum; i++) if (DEVices[i] && DEVices[i]->DEVsenSetup && ckt->CKThead[i]) { error = DEVices[i]->DEVsenSetup (info, ckt->CKThead[i]); if (error) return error; } #ifdef SENSDEBUG printf("CKTsenSetup end\n"); #endif return OK; } ngspice-26/src/unsupported/snaskq.c0000644000265600020320000000104112264261473017050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/sen2defs.h" #include "ngspice/cktdefs.h" #include "ngspice/suffix.h" int SENaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NG_IGNORE(ckt); NG_IGNORE(anal); NG_IGNORE(value); switch(which) { default: break; } return E_BADPARM; } ngspice-26/src/unsupported/snstart.c0000644000265600020320000000307112264261473017253 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* This is a routine to initialize the sensitivity * data structure */ int SENstartup(CKTcircuit *ckt, int restart) { int i; int err; IFvalue parmtemp; int type; GENinstance *fast; if (restart) { fprintf(stdout, "Sensitivity-2 analysis: unsupported code\n"); } #ifdef SENSDEBUG printf("SENstartup\n"); #endif ckt->CKTsenInfo->SENstatus = NORMAL; ckt->CKTsenInfo->SENpertfac = 1e-4; ckt->CKTsenInfo->SENinitflag = ON; /* allocate memory in NIsenReinit */ parmtemp.rValue = 1.0; for (i = 0; i < ckt->CKTsenInfo->SENnumVal; i++) { fast = CKTfndDev(ckt, ckt->CKTsenInfo->SENdevices[i]); if (!fast) return E_NODEV; type = fast->GENmodPtr->GENmodType; #ifdef SENSDEBUG printf("SENstartup Instance: %s Design parameter: %s\n", ckt->CKTsenInfo->SENdevices[i], ckt->CKTsenInfo->SENparmNames[i]); #endif err = CKTpName( ckt->CKTsenInfo->SENparmNames[i], &parmtemp, ckt, type, ckt->CKTsenInfo->SENdevices[i], &fast); if (err != OK) return err; } #ifdef SENSDEBUG printf("SENstartup end\n"); #endif return OK; } ngspice-26/src/unsupported/cktsnld.c0000644000265600020320000000336712264261473017227 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * CKTsenLoad(ckt) * this is a driver program to iterate through all the various * sensitivity load functions provided for the circuit elements * in the given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" int CKTsenLoad(CKTcircuit *ckt) { int i; int size,row,col; int error; size = SMPmatSize(ckt->CKTmatrix); #ifdef SENSDEBUG printf("CKTsenLoad\n"); #endif if ((ckt->CKTsenInfo->SENmode == DCSEN) || (ckt->CKTsenInfo->SENmode == TRANSEN)) { for (col = 0; col <= ckt->CKTsenInfo->SENparms; col++) for (row = 0; row <= size; row++) ckt->CKTsenInfo->SEN_RHS[row][col] = 0; for (i = 0; i < DEVmaxnum; i++) if (DEVices[i] && DEVices[i]->DEVsenLoad && ckt->CKThead[i]) { error = DEVices[i]->DEVsenLoad (ckt->CKThead[i], ckt); if (error) return error; } } else { for (col = 0; col <= ckt->CKTsenInfo->SENparms; col++) for (row = 0; row <= size; row++) { ckt->CKTsenInfo->SEN_RHS[row][col] = 0; ckt->CKTsenInfo->SEN_iRHS[row][col] = 0; } for (i = 0; i < DEVmaxnum; i++) if (DEVices[i] && DEVices[i]->DEVsenAcLoad && ckt->CKThead[i]) { error = DEVices[i]->DEVsenAcLoad (ckt->CKThead[i], ckt); if (error) return error; } } return OK; } ngspice-26/src/unsupported/cktsnprt.c0000644000265600020320000000135712264261473017432 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" /* CKTsenPrint(ckt) * this is a driver program to iterate through all the * various sensitivity print functions provided for * the circuit elements in the given circuit */ void CKTsenPrint(CKTcircuit *ckt) { int i; for (i = 0; i < DEVmaxnum; i++) if (DEVices[i] && DEVices[i]->DEVsenPrint && ckt->CKThead[i]) DEVices[i]->DEVsenPrint (ckt->CKThead[i], ckt); } ngspice-26/src/unsupported/sen2dest.c0000644000265600020320000000275612264261473017315 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* SENdestroy(ckt) * this is a driver program to iterate through all the various * destroy functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void SENdestroy(SENstruct *info) { int i; int size; size = info->SENsize; #ifdef SENSDEBUG printf("size = %d\n", size); printf("freeing sensitivity structure in SENdestroy\n"); #endif /* if (info->SENdevices) FREE(info->SENdevices); if (info->SENparmNames) FREE(info->SENparmNames); */ if (info->SEN_Sap) { #ifdef SENSDEBUG printf("freeing SEN_Sap in SENdestroy\n"); #endif for (i = 0; i <= size; i++) if (info->SEN_Sap[i]) FREE(info->SEN_Sap[i]); FREE(info->SEN_Sap); } if (info->SEN_RHS) { for (i = 0; i <= size; i++) if (info->SEN_RHS[i]) FREE(info->SEN_RHS[i]); FREE(info->SEN_RHS); } if (info->SEN_iRHS) { for (i = 0; i <= size; i++) if (info->SEN_iRHS[i]) FREE(info->SEN_iRHS[i]); FREE(info->SEN_Sap); } /* FREE(info); */ #ifdef SENSDEBUG printf("SENdestroy end\n"); #endif return; } ngspice-26/src/unsupported/readme0000644000265600020320000000023312264261473016566 0ustar andreasadmin This directory contains code for an old, unsupported sensitivity analysis. It is not used in the current distribution and will be removed in the future. ngspice-26/src/unsupported/spiced.c0000644000265600020320000001473712264261473017037 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Do remote spice jobs. The first line transmitted will be of the * format: "user host program". The program field may be left out, * in which case it defaults to SPICE_PATH. The program is then * executed, with the single argument "-S". The remote host should * wait for a response from spiced before sending any data -- so * far the only response sent is "ok". * Eventually we will want to deal with load-balancing * of spice jobs. */ #include "spice.h" #include #include "strext.h" #include #include #ifdef HAS_BSDSOCKETS #include #include #include #ifdef HAS_BSDRUSAGE #include #include #else #ifdef HAS_SYSVRUSAGE #include #include #endif #endif #include #include /* Better have #ifdef HAS_UNIX_SIGS XXX */ #include /* Better have #ifdef HAS_WAIT XXX */ #include #include "ngspice/suffix.h" #define MAXJOBS 2 int nrunning = 0; int maxjobs = MAXJOBS; extern int errno; extern char *sys_errlist[]; extern char **environ; /* ARGSUSED */ void main(ac, av) char **av; { int s, inetd = 0; struct servent *sp; struct protoent *pp; struct sockaddr_in from, sin; int g, i, len = sizeof (struct sockaddr_in); void dostuff(); int sigchild(); FILE *fp; char *datestring(); /* Process arguments. */ ivars(NULL); av++; while (*av) { if (!strcmp(*av, "-i")) inetd++; else maxjobs = atoi(av[1]); av++; } if (inetd == 0) { /* Find out who we are. */ sp = getservbyname("spice", "tcp"); if (sp == NULL) { fprintf(stderr, "Error: spice/tcp: unknown service\n"); exit(1); } pp = getprotobyname("tcp"); if (pp == NULL) { fprintf(stderr, "Error: tcp: unknown protocol\n"); exit(1); } /* Create the socket. */ s = socket(AF_INET, SOCK_STREAM, pp->p_proto); if (s < 0) { perror("spiced: socket"); exit(1); } sin.sin_port = sp->s_port; if (bind(s, (struct sockaddr *) &sin, sizeof (struct sockaddr_in)) < 0) { perror("spiced: bind"); exit(1); } #ifndef DEBUG /* Disconnect from the controlling terminal. */ if (fork()) exit(0); for (i = 0; i < 10; i++) if (i != s) (void) close(i); (void) open("/", O_RDONLY); (void) dup2(0, 1); (void) dup2(0, 2); i = open("/dev/tty", O_RDWR); if (i > 0) { (void) ioctl(i, TIOCNOTTY, NULL); (void) close(i); } #endif #ifdef SIGCHLD (void) signal(SIGCHLD, sigchild); #else #ifdef SIGCLD (void) signal(SIGCLD, sigchild); #endif #endif fp = fopen(Spiced_Log, "a"); fprintf(fp, "\n-- new daemon, pid = %d, date = %s\n\n", getpid(), datestring()); (void) fclose(fp); /* Start (void) listening for requests. */ (void) listen(s, 5); for (;;) { g = accept(s, (struct sockaddr *) &from, &len); if (g < 0) { if (errno != EINTR) { fp = fopen(Spiced_Log, "a"); fprintf(fp, "\n>>> accept: %s\n\n", sys_errlist[errno]); exit(1); } continue; } if (!fork()) { (void) close(s); #ifdef SIGCHLD (void) signal(SIGCHLD, SIG_IGN); #else #ifdef SIGCLD (void) signal(SIGCLD, SIG_IGN); #endif #endif dostuff(g); } nrunning++; (void) close(g); } } else { /* All this is already done for us. */ dostuff(0); } } void dostuff(s) { FILE *fp; char *datestring(); char buf[BUFSIZ], user[16], host[32], program[128]; char *argv[3], *t; int i, rc; #ifdef HAS_INTWAITSTATUS int stats; #else union wait stats; #endif #ifdef HAS_BSDRUSAGE struct rusage ru; #endif /* Should do some sort of verification */ i = read(s, buf, BUFSIZ); if (i < 0) { perror("spiced: read"); exit(1); } i = sscanf(buf, "%s %s %s", user, host, program); if (i < 2) { fprintf(stderr, "Error: bad init line: %s\n", buf); exit(1); } if (i == 2) (void) strcpy(program, tilde_expand(Spice_Path)); if (nrunning > maxjobs - 1) { /* Too many people. */ (void) write(s, "toomany", 8); fp = fopen(Spiced_Log, "a"); fprintf(fp, "%s: %s@%s: turned down - %d jobs now\n", datestring(), user, host, nrunning); (void) fclose(fp); exit(0); } (void) write(s, "ok", 3); if ((i = fork()) == 0) { (void) dup2(s, 0); (void) dup2(s, 1); (void) dup2(s, 2); argv[0] = program; argv[1] = "-S"; argv[2] = NULL; (void) execve(program, argv, environ); perror(program); exit(1); } #ifdef HAS_BSDRUSAGE /* Assume BSDRUSAGE -> wait3( ) XXX */ if (wait3(&stats, 0, &ru) != i) { perror("wait"); exit(1); } #else #ifdef HAS_WAIT wait(&stats); rc = 0; rc = WEXITSTATUS(stats); #endif #endif /* Write a log entry. */ #ifdef HAS_BSDRUSAGE (void) sprintf(buf, "%d:%d.%6d", ru.ru_utime.tv_sec / 60, ru.ru_utime.tv_sec % 60, ru.ru_utime.tv_usec); for (t = buf; *t; t++) ; for (t--; *t == '0'; *t-- = '\0') ; #else (void) strcpy(buf, "unknown"); #endif fp = fopen(Spiced_Log, "a"); fprintf(fp, "%s: %s@%s: %s - \n\texit %d, time %s\n", datestring(), user, host, program, rc, buf); (void) fclose(fp); exit(0); } /* Don't care what happens to the child */ int sigchild() { int pid; FILE *fp; pid = wait(NULL); if (pid == -1) { fp = fopen(Spiced_Log, "a"); fprintf(fp, "\n>>>spiced: wait: %s\n\n", sys_errlist[errno]); (void) fclose(fp); } else nrunning--; return; } #else /* not HAS_BSDSOCKETS */ main( ) { fprintf(stderr, "The program \"spiced\" is not available on this system.\n"); exit(1); } #endif /* HAS_BSDSOCKETS */ ngspice-26/src/unsupported/cktsenac.c0000644000265600020320000000144112264261473017347 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" /* CKTsenAC(ckt) * this is a routine for AC sensitivity calculations */ int CKTsenAC(CKTcircuit *ckt) { int error; #ifdef SENSDEBUG printf("CKTsenAC\n"); #endif error = CKTsenLoad(ckt); if (error) return error; #ifdef SENSDEBUG printf("after CKTsenLoad\n"); #endif error = CKTsenComp(ckt); if (error) return error; #ifdef SENSDEBUG printf("after CKTsenComp\n"); #endif return OK; } ngspice-26/src/unsupported/cktsenup.c0000644000265600020320000000153312264261473017412 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTsenUpdate(ckt) * this is a driver program to iterate through all the various * sensitivity update functions provided for the circuit elements * in the given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" int CKTsenUpdate(CKTcircuit *ckt) { int i; int error; for (i = 0; i < DEVmaxnum; i++) if (DEVices[i] && DEVices[i]->DEVsenUpdate && ckt->CKThead[i]) { error = DEVices[i]->DEVsenUpdate (ckt->CKThead[i], ckt); if (error) return error; } return OK; } ngspice-26/src/unsupported/sen2setp.c0000644000265600020320000000471412264261473017325 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/sen2defs.h" #include "ngspice/cktdefs.h" #include "ngspice/suffix.h" #include "../spicelib/analysis/analysis.h" int SENsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { SENstruct *job = (SENstruct *) anal; NG_IGNORE(ckt); switch(which) { case SEN_DC: if (value->iValue) job->SENmode |= DCSEN; break; case SEN_AC: if (value->iValue) job->SENmode |= ACSEN; break; case SEN_TRAN: if (value->iValue) job->SENmode |= TRANSEN; break; case SEN_DEV: job->SENnumVal += 1; if (!job->SENdevices) { job->SENdevices = TMALLOC(char *, job->SENnumVal); if (job->SENdevices == NULL) return E_NOMEM; job->SENparmNames = TMALLOC(char *, job->SENnumVal); if (job->SENparmNames == NULL) return E_NOMEM; } else { job->SENdevices = TREALLOC(char *, job->SENdevices, job->SENnumVal); if (job->SENdevices == NULL) return E_NOMEM; job->SENparmNames = TREALLOC(char *, job->SENparmNames, job->SENnumVal); if (job->SENparmNames == NULL) return E_NOMEM; } job->SENdevices [job->SENnumVal - 1] = value->sValue; break; case SEN_PARM: job->SENparmNames [job->SENnumVal - 1] = value->sValue; break; default: return E_BADPARM; } return OK; } static IFparm SENparms[] = { { "dc", SEN_DC, IF_SET|IF_FLAG, "sensitivity in DC analysis" }, { "op", SEN_DC, IF_SET|IF_FLAG, "sensitivity in DCop analysis" }, { "ac", SEN_AC, IF_SET|IF_FLAG, "sensitivity in AC analysis" }, { "tran", SEN_TRAN, IF_SET|IF_FLAG, "sensitivity in transient analysis"}, { "dev", SEN_DEV, IF_SET|IF_INSTANCE, "instance with design param." }, { "parm", SEN_PARM, IF_SET|IF_STRING, "name of design parameter" }, }; SPICEanalysis SEN2info = { { "SENS2", "Sensitivity analysis", NUMELEMS(SENparms), SENparms }, sizeof(SENstruct), NODOMAIN, 0, SENsetParm, SENaskQuest, NULL, SENstartup }; ngspice-26/src/unsupported/cktsncom.c0000644000265600020320000001271612264261473017404 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTsenComp(ckt) * this is a program to solve the sensitivity equation * of the given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" // #include "../maths/sparse/spdefs.h" // // this include file from `sparse' is incompatible // with the rest of ngspice // so we can unfortunatly not include here // instead we cheat a bit and // introduce the opaque struct MatrixElement here // (only the first struct members which are of importance to us) struct MatrixElement { double Real; double Imag; // ... }; int CKTsenComp(CKTcircuit *ckt) { int size; int row; int col; SENstruct *info; #ifdef SENSDEBUG char *rowe; SMPelement *elt; #endif #ifdef SENSDEBUG printf("CKTsenComp\n"); #endif size = SMPmatSize(ckt->CKTmatrix); info = ckt->CKTsenInfo; if ((info->SENmode == DCSEN) || (info->SENmode == TRANSEN)) { /* loop throgh all the columns of RHS matrix - each column corresponding to a design parameter */ for (col = 1; col <= info->SENparms; col++) { for (row = 1; row <= size; row++) { ckt->CKTsenRhs[row] = info->SEN_RHS[row][col]; } /* solve for the sensitivity values */ SMPsolve(ckt->CKTmatrix, ckt->CKTsenRhs, ckt->CKTrhsSpare); /* store the sensitivity values */ for (row = 1; row <= size; row++) { info->SEN_Sap[row][col] = ckt->CKTsenRhs[row]; info->SEN_RHS[row][col] = ckt->CKTsenRhs[row]; } } #ifdef SENSDEBUG printf("\n"); printf("Sensitivity matrix :\n"); for (row = 1; row <= size; row++) { rowe = CKTnodName(ckt, row); // if (strcmp("4", rowe) == 0) { for (col = 1; col <= info->SENparms; col++) { printf("\t"); printf("Sap(%s,%d) = %.5e\t", rowe, col, info->SEN_Sap[row][col]); } printf("\n\n"); // } } printf(" RHS matrix :\n"); for (row = 1; row <= size; row++) { for (col = 1; col <= info->SENparms; col++) { printf(" "); printf("RHS(%d,%d) = %.7e ", row, col, info->SEN_RHS[row][col]); } printf("\n"); } printf(" Jacobian matrix :\n"); for (row = 1; row <= size; row++) { for (col = 1; col <= size; col++) { elt = SMPfindElt(ckt->CKTmatrix, row , col , 0); if (elt) printf("%.7e ", elt->Real); else printf("0.0000000e+00 "); } printf("\n"); } #endif } if (info->SENmode == ACSEN) { /* loop throgh all the columns of RHS matrix - each column corresponding to a design parameter */ for (col = 1; col <= info->SENparms; col++) { for (row = 1; row <= size; row++) { ckt->CKTsenRhs[row] = info->SEN_RHS[row][col]; ckt->CKTseniRhs[row] = info->SEN_iRHS[row][col]; } /* solve for the sensitivity values ( both real and imag parts)*/ SMPcSolve(ckt->CKTmatrix, ckt->CKTsenRhs, ckt->CKTseniRhs, ckt->CKTrhsSpare, ckt->CKTirhsSpare); /* store the sensitivity values ( both real and imag parts)*/ for (row = 1; row <= size; row++) { info->SEN_RHS[row][col] = ckt->CKTsenRhs[row]; info->SEN_iRHS[row][col] = ckt->CKTseniRhs[row]; } } #ifdef SENSDEBUG printf("\n"); printf("CKTomega = %.7e rad/sec\t\n", ckt->CKTomega); printf("Sensitivity matrix :\n"); for (row = 1; row <= size; row++) { rowe = CKTnodName(ckt, row); for (col = 1; col <= info->SENparms; col++) { printf("\t"); printf("RHS(%s,%d) = %.5e", rowe, col, info->SEN_RHS[row][col]); printf(" + j %.5e\t", info->SEN_iRHS[row][col]); printf("\n\n"); } printf("\n"); } printf("CKTomega = %.7e rad/sec\t\n", ckt->CKTomega); printf(" RHS matrix :\n"); for (row = 1; row <= size; row++) { for (col = 1; col <= info->SENparms; col++) { printf(" "); printf("RHS(%d,%d) = %.7e ", row, col, info->SEN_RHS[row][col]); printf("+j %.7e ", info->SEN_iRHS[row][col]); } printf("\n"); } printf(" Jacobian matrix for AC :\n"); for (row = 1; row <= size; row++) { for (col = 1; col <= size; col++) { elt = SMPfindElt(ckt->CKTmatrix, row , col , 0); if (elt) { printf("%.7e ", elt->Real); printf("+j%.7e\t", elt->Imag); } else{ printf("0.0000000e+00 "); printf("+j0.0000000e+00\t"); } } printf("\n\n"); } #endif } return OK; } ngspice-26/src/unsupported/Makefile.am0000644000265600020320000000066012264261473017446 0ustar andreasadmin## Process this file with automake to produce Makefile.in EXTRA_DIST = readme spiced.c noinst_LTLIBRARIES = libunsupported.la libunsupported_la_SOURCES = \ cktsenac.c \ cktsenup.c \ cktsncom.c \ cktsndct.c \ cktsnset.c \ cktsnld.c \ cktsnprt.c \ sen2dest.c \ sen2setp.c \ snaskq.c \ snstart.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/unsupported/Makefile.in0000644000265600020320000004167612264261540017466 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/unsupported DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libunsupported_la_LIBADD = am_libunsupported_la_OBJECTS = cktsenac.lo cktsenup.lo cktsncom.lo \ cktsndct.lo cktsnset.lo cktsnld.lo cktsnprt.lo sen2dest.lo \ sen2setp.lo snaskq.lo snstart.lo libunsupported_la_OBJECTS = $(am_libunsupported_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libunsupported_la_SOURCES) DIST_SOURCES = $(libunsupported_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = readme spiced.c noinst_LTLIBRARIES = libunsupported.la libunsupported_la_SOURCES = \ cktsenac.c \ cktsenup.c \ cktsncom.c \ cktsndct.c \ cktsnset.c \ cktsnld.c \ cktsnprt.c \ sen2dest.c \ sen2setp.c \ snaskq.c \ snstart.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/unsupported/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/unsupported/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libunsupported.la: $(libunsupported_la_OBJECTS) $(libunsupported_la_DEPENDENCIES) $(EXTRA_libunsupported_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libunsupported_la_OBJECTS) $(libunsupported_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsenac.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsenup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsncom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsndct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsnld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsnprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsnset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sen2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sen2setp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snstart.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/unsupported/cktsndct.c0000644000265600020320000000322112264261473017367 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * This routine performs the DC and Transient sensitivity * calculations */ #include "ngspice/ngspice.h" #include #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/suffix.h" int CKTsenDCtran(CKTcircuit *ckt) { int error; #ifdef SENSDEBUG printf("time = %.7e\n", ckt->CKTtime); printf("CKTsenDCtran\n"); #endif if (ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { error = CKTsenLoad(ckt); if (error) return error; #ifdef SENSDEBUG printf("after inittran senload\n"); #endif error = CKTsenUpdate(ckt); if (error) return error; #ifdef SENSDEBUG printf("after inittran senupdate\n"); #endif } if (ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) && !(ckt->CKTmode & MODETRANOP)) { ckt->CKTmode = (ckt->CKTmode & (~INITF)) | MODEINITFLOAT; } error = CKTsenLoad(ckt); if (error) return error; #ifdef SENSDEBUG printf("after CKTsenLoad\n"); #endif error = CKTsenComp(ckt); if (error) return error; #ifdef SENSDEBUG printf("after CKTsenComp\n"); #endif if (ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)) { error = CKTsenUpdate(ckt); if (error) return error; #ifdef SENSDEBUG printf("after CKTsenUpdate\n"); #endif } return OK; } ngspice-26/src/makeidx.c0000644000265600020320000000310012264261473014600 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* from FILENAME.txt, make FILENAME.idx */ #include #include #include #include "ngspice/cpdefs.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" #define BSIZE_SP 512 static void makeidx(const char *dst, const char *src) { FILE *fp; FILE *wfp; char buf[BSIZE_SP]; long fpos; char subject[BSIZE_SP]; struct hlp_index indexitem; if (!(fp = fopen(src, "r"))) { perror(src); return; } if (!(wfp = fopen(dst, "wb"))) { perror(dst); return; } fpos = 0; while (fgets(buf, sizeof(buf), fp)) { if (!strncmp(buf, "SUBJECT: ", 9)) { strcpy(subject, &buf[9]); subject[strlen(subject) - 1] = '\0'; /* get rid of '\n' */ strncpy(indexitem.subject, subject, 64); /* zero out end */ indexitem.fpos = fpos; fwrite(&indexitem, sizeof(struct hlp_index), 1, wfp); } fpos = ftell(fp); } } int main(int argc, char **argv) { if(argc == 4 && !strcmp(argv[1], "-o")) { makeidx(argv[2], argv[3]); exit(0); } while (--argc) { char buf[BSIZE_SP]; char *pos; strcpy(buf, argv[argc]); if (!(pos = strrchr(buf, '.')) || strcmp(pos, ".txt")) { fprintf(stderr, "%s does not end in .txt\n", buf); continue; } *++pos = 'i'; *++pos = 'd'; *++pos = 'x'; makeidx(buf, argv[argc]); } exit(0); } ngspice-26/src/conf.h0000644000265600020320000000054112264261473014116 0ustar andreasadmin#ifndef ngspice_CONF_H #define ngspice_CONF_H extern char Spice_Version[]; extern char Spice_Notice[]; extern char Spice_Build_Date[]; extern char Spice_Manual[]; extern char *Spice_Exec_Dir; extern char *Spice_Lib_Dir; extern char *Def_Editor; extern int AsciiRawFile; extern char *Bug_Addr; extern char *Spice_Host; extern char *Spiced_Log; #endif ngspice-26/src/ciderlib/0000755000265600020320000000000012264261713014572 5ustar andreasadminngspice-26/src/ciderlib/support/0000755000265600020320000000000012264261713016306 5ustar andreasadminngspice-26/src/ciderlib/support/mater.c0000644000265600020320000003447012264261473017575 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/material.h" #include "ngspice/cidersupt.h" /* * Set material info values to their defaults. */ void MATLdefaults(MaterialInfo *info) { if ((info->material == OXIDE) || (info->material == INSULATOR)) { info->type = INSULATOR; info->eps = EPS_OX; info->affin = AFFIN_OX; info->eg0 = EGAP300_OX; } else if (info->material == NITRIDE) { info->type = INSULATOR; info->eps = EPS_NI; info->affin = AFFIN_NI; info->eg0 = EGAP300_NI; } else if (info->material == POLYSILICON) { info->type = SEMICON; info->eps = EPS_SI; info->affin = AFFIN_SI; info->nc0 = 0.0; info->nv0 = 0.0; info->eg0 = EGAP300_SI; info->dEgDt = DGAPDT_SI; info->trefBGN = TREF_EG_SI; info->dEgDn[ELEC] = DGAPDN_N; info->dEgDn[HOLE] = DGAPDN_P; info->nrefBGN[ELEC] = NBGN_N; info->nrefBGN[HOLE] = NBGN_P; info->tau0[ELEC] = TAU0_N_SI; info->tau0[HOLE] = TAU0_P_SI; info->nrefSRH[ELEC] = NSRH_N_SI; info->nrefSRH[HOLE] = NSRH_P_SI; info->cAug[ELEC] = C_AUG_N_SI; info->cAug[HOLE] = C_AUG_P_SI; info->aRich[ELEC] = A_RICH_N_SI; info->aRich[HOLE] = A_RICH_P_SI; info->eDon = E_DON_SI; info->eAcc = E_ACC_SI; info->gDon = G_DON_SI; info->gAcc = G_ACC_SI; info->concModel = CT; info->muMax[ELEC][MAJOR] = 0.07 * AR_MUMAX_N; info->muMin[ELEC][MAJOR] = 0.07 * AR_MUMIN_N; info->ntRef[ELEC][MAJOR] = AR_NTREF_N; info->ntExp[ELEC][MAJOR] = AR_NTEXP_N; info->muMax[HOLE][MAJOR] = 0.07 * AR_MUMAX_P; info->muMin[HOLE][MAJOR] = 0.07 * AR_MUMIN_P; info->ntRef[HOLE][MAJOR] = AR_NTREF_P; info->ntExp[HOLE][MAJOR] = AR_NTEXP_P; info->muMax[ELEC][MINOR] = 0.07 * UF_MUMAX_N; info->muMin[ELEC][MINOR] = 0.07 * UF_MUMIN_N; info->ntRef[ELEC][MINOR] = UF_NTREF_N; info->ntExp[ELEC][MINOR] = UF_NTEXP_N; info->muMax[HOLE][MINOR] = 0.07 * UF_MUMAX_P; info->muMin[HOLE][MINOR] = 0.07 * UF_MUMIN_P; info->ntRef[HOLE][MINOR] = UF_NTREF_P; info->ntExp[HOLE][MINOR] = UF_NTEXP_P; info->fieldModel = CT; info->vSat[ELEC] = AR_VSAT_N; info->vSat[HOLE] = AR_VSAT_P; info->vWarm[ELEC] = SG_VWARM_N; info->vWarm[HOLE] = SG_VWARM_P; info->mus[ELEC] = 0.07 * MUS_N; info->thetaA[ELEC] = THETAA_N; info->thetaB[ELEC] = THETAB_N; info->mus[HOLE] = 0.07 * MUS_P; info->thetaA[HOLE] = THETAA_P; info->thetaB[HOLE] = THETAB_P; } else if ((info->material == SILICON) || (info->material == SEMICON)) { info->type = SEMICON; info->eps = EPS_SI; info->affin = AFFIN_SI; info->nc0 = 0.0; info->nv0 = 0.0; info->eg0 = EGAP300_SI; info->dEgDt = DGAPDT_SI; info->trefBGN = TREF_EG_SI; info->dEgDn[ELEC] = DGAPDN_N; info->dEgDn[HOLE] = DGAPDN_P; info->nrefBGN[ELEC] = NBGN_N; info->nrefBGN[HOLE] = NBGN_P; info->tau0[ELEC] = TAU0_N_SI; info->tau0[HOLE] = TAU0_P_SI; info->nrefSRH[ELEC] = NSRH_N_SI; info->nrefSRH[HOLE] = NSRH_P_SI; info->cAug[ELEC] = C_AUG_N_SI; info->cAug[HOLE] = C_AUG_P_SI; info->aRich[ELEC] = A_RICH_N_SI; info->aRich[HOLE] = A_RICH_P_SI; info->eDon = E_DON_SI; info->eAcc = E_ACC_SI; info->gDon = G_DON_SI; info->gAcc = G_ACC_SI; info->concModel = CT; info->muMax[ELEC][MAJOR] = AR_MUMAX_N; info->muMin[ELEC][MAJOR] = AR_MUMIN_N; info->ntRef[ELEC][MAJOR] = AR_NTREF_N; info->ntExp[ELEC][MAJOR] = AR_NTEXP_N; info->muMax[HOLE][MAJOR] = AR_MUMAX_P; info->muMin[HOLE][MAJOR] = AR_MUMIN_P; info->ntRef[HOLE][MAJOR] = AR_NTREF_P; info->ntExp[HOLE][MAJOR] = AR_NTEXP_P; info->muMax[ELEC][MINOR] = UF_MUMAX_N; info->muMin[ELEC][MINOR] = UF_MUMIN_N; info->ntRef[ELEC][MINOR] = UF_NTREF_N; info->ntExp[ELEC][MINOR] = UF_NTEXP_N; info->muMax[HOLE][MINOR] = UF_MUMAX_P; info->muMin[HOLE][MINOR] = UF_MUMIN_P; info->ntRef[HOLE][MINOR] = UF_NTREF_P; info->ntExp[HOLE][MINOR] = UF_NTEXP_P; info->fieldModel = CT; info->vSat[ELEC] = AR_VSAT_N; info->vSat[HOLE] = AR_VSAT_P; info->vWarm[ELEC] = SG_VWARM_N; info->vWarm[HOLE] = SG_VWARM_P; info->mus[ELEC] = MUS_N; info->thetaA[ELEC] = THETAA_N; info->thetaB[ELEC] = THETAB_N; info->mus[HOLE] = MUS_P; info->thetaA[HOLE] = THETAA_P; info->thetaB[HOLE] = THETAB_P; } else if (info->material == GAAS) { info->type = SEMICON; info->eps = EPS_GA; info->affin = AFFIN_GA; info->nc0 = NCV_NOM * pow(M_N_GA, 1.5); info->nv0 = NCV_NOM * pow(M_P_GA, 1.5); info->eg0 = EGAP300_GA; info->dEgDt = DGAPDT_GA; info->trefBGN = TREF_EG_GA; info->dEgDn[ELEC] = DGAPDN_N; info->dEgDn[HOLE] = DGAPDN_P; info->nrefBGN[ELEC] = NBGN_N; info->nrefBGN[HOLE] = NBGN_P; info->tau0[ELEC] = TAU0_N_GA; info->tau0[HOLE] = TAU0_P_GA; info->nrefSRH[ELEC] = NSRH_N_GA; info->nrefSRH[HOLE] = NSRH_P_GA; info->cAug[ELEC] = C_AUG_N_GA; info->cAug[HOLE] = C_AUG_P_GA; info->aRich[ELEC] = A_RICH_N_GA; info->aRich[HOLE] = A_RICH_P_GA; info->eDon = E_DON_GA; info->eAcc = E_ACC_GA; info->gDon = G_DON_GA; info->gAcc = G_ACC_GA; info->concModel = GA; info->muMax[ELEC][MAJOR] = GA_MUMAX_N; info->muMin[ELEC][MAJOR] = GA_MUMIN_N; info->ntRef[ELEC][MAJOR] = GA_NTREF_N; info->ntExp[ELEC][MAJOR] = GA_NTEXP_N; info->muMax[HOLE][MAJOR] = GA_MUMAX_P; info->muMin[HOLE][MAJOR] = GA_MUMIN_P; info->ntRef[HOLE][MAJOR] = GA_NTREF_P; info->ntExp[HOLE][MAJOR] = GA_NTEXP_P; info->muMax[ELEC][MINOR] = GA_MUMAX_N; info->muMin[ELEC][MINOR] = GA_MUMIN_N; info->ntRef[ELEC][MINOR] = GA_NTREF_N; info->ntExp[ELEC][MINOR] = GA_NTEXP_N; info->muMax[HOLE][MINOR] = GA_MUMAX_P; info->muMin[HOLE][MINOR] = GA_MUMIN_P; info->ntRef[HOLE][MINOR] = GA_NTREF_P; info->ntExp[HOLE][MINOR] = GA_NTEXP_P; info->fieldModel = GA; info->vSat[ELEC] = GA_VSAT_N; info->vSat[HOLE] = GA_VSAT_P; info->vWarm[ELEC] = GA_VWARM_N; info->vWarm[HOLE] = GA_VWARM_P; info->mus[ELEC] = MUS_N; info->thetaA[ELEC] = THETAA_N; info->thetaB[ELEC] = THETAB_N; info->mus[HOLE] = MUS_P; info->thetaA[HOLE] = THETAA_P; info->thetaB[HOLE] = THETAB_P; } } /* * Compute the temperature-dependent physical parameters of materials * Normalize physical constants Actual Instance Temperature is passed in thru * the global var 'Temp' */ void MATLtempDep(MaterialInfo *info, double tnom) /* double tnom Nominal Parameter Temperature */ { double tmp1; double relTemp, perRelTemp; double eg0; if (info->type == INSULATOR) { info->refPsi = RefPsi - (info->affin + 0.5 * info->eg0) / VNorm; } else if (info->type == SEMICON) { /* compute temperature dependent semiconductor parameters */ relTemp = Temp / tnom; perRelTemp = 1.0 / relTemp; tmp1 = pow(relTemp, 1.5); /* Bandgap and intrinsic concentration */ eg0 = info->eg0 + (info->dEgDt * tnom * tnom) / (tnom + info->trefBGN); info->eg0 = eg0 - (info->dEgDt * Temp * Temp) / (Temp + info->trefBGN); if (info->nc0 > 0.0) { info->mass[ELEC] = pow(info->nc0 / NCV_NOM / tmp1, 2.0 / 3.0); } else { info->mass[ELEC] = 1.039 + 5.477e-4 * Temp - 2.326e-7 * Temp * Temp; } if (info->nv0 > 0.0) { info->mass[HOLE] = pow(info->nv0 / NCV_NOM / tmp1, 2.0 / 3.0); } else { info->mass[HOLE] = 0.262 * log(0.259 * Temp); } info->nc0 = NCV_NOM * pow(info->mass[ELEC], 1.5) * tmp1; info->nv0 = NCV_NOM * pow(info->mass[HOLE], 1.5) * tmp1; info->ni0 = sqrt(info->nc0) * sqrt(info->nv0) * exp(-0.5 * info->eg0 / Vt); info->refPsi = RefPsi - (info->affin + 0.5 * (info->eg0 + Vt * log(info->nc0 / info->nv0))) / VNorm; /* Impurity energies */ info->eDon /= VNorm; info->eAcc /= VNorm; /* SRH lifetimes */ tmp1 = sqrt(perRelTemp) * exp(3.8667 * (perRelTemp - 1.0)); info->tau0[ELEC] *= tmp1 / TNorm; info->tau0[HOLE] *= tmp1 / TNorm; /* Auger recombination coefficients */ info->cAug[ELEC] *= pow(relTemp, 0.14) * NNorm * NNorm * TNorm; info->cAug[HOLE] *= pow(relTemp, 0.18) * NNorm * NNorm * TNorm; /* Avalanche generation parameters */ info->aii[ELEC] = AII_N * LNorm; info->bii[ELEC] = BII_N / ENorm; info->aii[HOLE] = AII_P * LNorm; info->bii[HOLE] = BII_P / ENorm; /* Effective recombination velocities */ info->vRich[ELEC] = info->aRich[ELEC] * Temp * Temp / (CHARGE * info->nc0 * ENorm); info->vRich[HOLE] = info->aRich[HOLE] * Temp * Temp / (CHARGE * info->nv0 * ENorm); /* Mobility Temperature Dependence */ MOBtempDep(info, Temp); /* Velocity Saturation Parameters */ info->vSat[ELEC] /= ENorm; info->vWarm[ELEC] /= ENorm; info->vSat[HOLE] /= ENorm; info->vWarm[HOLE] /= ENorm; /* Normal Field Mobility Degradation Parameters */ info->thetaA[ELEC] *= ENorm; info->thetaB[ELEC] *= ENorm * ENorm; info->thetaA[HOLE] *= ENorm; info->thetaB[HOLE] *= ENorm * ENorm; } } void printMaterialInfo(MaterialInfo *info) { static const char tabformat[] = "%12s: % .4e %-12s\t"; static const char newformat[] = "%12s: % .4e %-12s\n"; char *name; if (info == NULL) { fprintf(stderr, "Error: tried to print NIL MaterialInfo\n"); exit(-1); } /* Find material name. */ switch (info->material) { case OXIDE: name = "OXIDE"; break; case NITRIDE: name = "NITRIDE"; break; case INSULATOR: name = "INSULATOR"; break; case SILICON: name = "SILICON"; break; case POLYSILICON: name = "POLYSILICON"; break; case GAAS: name = "GAAS"; break; case SEMICON: name = "SEMICONDUCTOR"; break; default: name = "MATERIAL"; break; } if (info->type == INSULATOR) { fprintf(stdout, "***** %s PARAMETERS AT %g deg K\n", name, Temp); fprintf(stdout, "*** Poisson Equation Parameters -\n"); fprintf(stdout, tabformat, "Eps", info->eps, "F/cm"); fprintf(stdout, newformat, "Affin", info->affin, "eV"); fprintf(stdout, tabformat, "Egap", info->eg0, "eV"); fprintf(stdout, newformat, "PsiB", -info->refPsi * VNorm, "V"); } else if (info->type == SEMICON) { fprintf(stdout, "***** %s PARAMETERS AT %g deg K\n", name, Temp); fprintf(stdout, "*** Poisson Equation\n"); fprintf(stdout, tabformat, "Eps", info->eps, "F/cm"); fprintf(stdout, newformat, "Affin", info->affin, "eV"); fprintf(stdout, tabformat, "Vt", Vt, "V"); fprintf(stdout, newformat, "Ni", info->ni0, "/cm^3"); fprintf(stdout, tabformat, "Nc", info->nc0, "/cm^3"); fprintf(stdout, newformat, "Nv", info->nv0, "/cm^3"); fprintf(stdout, tabformat, "MnSi", info->mass[ELEC], "*m0 kg"); fprintf(stdout, newformat, "MpSi", info->mass[HOLE], "*m0 kg"); fprintf(stdout, tabformat, "Egap", info->eg0, "eV"); fprintf(stdout, newformat, "PsiB", -info->refPsi * VNorm, "V"); fprintf(stdout, tabformat, "dEg/dT", info->dEgDt, "eV"); fprintf(stdout, newformat, "Tref", info->trefBGN, "deg K"); fprintf(stdout, tabformat, "dEg/dN", info->dEgDn[ELEC], "eV"); fprintf(stdout, newformat, "Nref", info->nrefBGN[ELEC], "/cm^3"); fprintf(stdout, tabformat, "dEg/dP", info->dEgDn[HOLE], "eV"); fprintf(stdout, newformat, "Pref", info->nrefBGN[HOLE], "/cm^3"); fprintf(stdout, tabformat, "Edon", info->eDon * VNorm, "eV"); fprintf(stdout, newformat, "Eacc", info->eAcc * VNorm, "eV"); fprintf(stdout, tabformat, "Gdon", info->gDon, ""); fprintf(stdout, newformat, "Gacc", info->gAcc, ""); fprintf(stdout, "*** Generation - Recombination\n"); fprintf(stdout, tabformat, "Tn0", info->tau0[ELEC] * TNorm, "s"); fprintf(stdout, newformat, "Tp0", info->tau0[HOLE] * TNorm, "s"); fprintf(stdout, tabformat, "CnAug", info->cAug[ELEC] / (NNorm * NNorm * TNorm), "cm^6/s"); fprintf(stdout, newformat, "CpAug", info->cAug[HOLE] / (NNorm * NNorm * TNorm), "cm^6/s"); fprintf(stdout, tabformat, "Aiin", info->aii[ELEC] / LNorm, "/cm"); fprintf(stdout, newformat, "Aiip", info->aii[HOLE] / LNorm, "/cm"); fprintf(stdout, tabformat, "Biin", info->bii[ELEC] * ENorm, "V/cm"); fprintf(stdout, newformat, "Biip", info->bii[HOLE] * ENorm, "V/cm"); fprintf(stdout, "*** Thermionic Emission\n"); fprintf(stdout, tabformat, "Arichn", info->aRich[ELEC], "A/cm^2/oK^2"); fprintf(stdout, newformat, "Arichp", info->aRich[HOLE], "A/cm^2/oK^2"); fprintf(stdout, tabformat, "Vrichn", info->vRich[ELEC] * ENorm, "cm/s"); fprintf(stdout, newformat, "Vrichp", info->vRich[HOLE] * ENorm, "cm/s"); fprintf(stdout, "*** Majority Carrier Mobility\n"); fprintf(stdout, tabformat, "MunMax", info->muMax[ELEC][MAJOR], "cm^2/V-s"); fprintf(stdout, newformat, "MupMax", info->muMax[HOLE][MAJOR], "cm^2/V-s"); fprintf(stdout, tabformat, "MunMin", info->muMin[ELEC][MAJOR], "cm^2/V-s"); fprintf(stdout, newformat, "MupMin", info->muMin[HOLE][MAJOR], "cm^2/V-s"); fprintf(stdout, "*** Minority Carrier Mobility\n"); fprintf(stdout, tabformat, "MunMax", info->muMax[ELEC][MINOR], "cm^2/V-s"); fprintf(stdout, newformat, "MupMax", info->muMax[HOLE][MINOR], "cm^2/V-s"); fprintf(stdout, tabformat, "MunMin", info->muMin[ELEC][MINOR], "cm^2/V-s"); fprintf(stdout, newformat, "MupMin", info->muMin[HOLE][MINOR], "cm^2/V-s"); fprintf(stdout, "*** Surface Mobility\n"); fprintf(stdout, tabformat, "Muns", info->mus[ELEC], "cm^2/V-s"); fprintf(stdout, newformat, "Mups", info->mus[HOLE], "cm^2/V-s"); fprintf(stdout, tabformat, "ThetaAN", info->thetaA[ELEC] / ENorm, "cm/V"); fprintf(stdout, newformat, "ThetaAP", info->thetaA[HOLE] / ENorm, "cm/V"); fprintf(stdout, tabformat, "ThetaBN", info->thetaB[ELEC] / ENorm / ENorm, "cm^2/V^2"); fprintf(stdout, newformat, "ThetaBP", info->thetaB[HOLE] / ENorm / ENorm, "cm^2/V^2"); fprintf(stdout, "*** Velocity Saturation\n"); fprintf(stdout, tabformat, "VsatN", info->vSat[ELEC] * ENorm, "cm/s"); fprintf(stdout, newformat, "VsatP", info->vSat[HOLE] * ENorm, "cm/s"); if (info->fieldModel == SG || info->fieldModel == GA) { fprintf(stdout, tabformat, "VwarmN", info->vWarm[ELEC] * ENorm, "cm/s"); fprintf(stdout, newformat, "VwarmP", info->vWarm[HOLE] * ENorm, "cm/s"); } } return; } ngspice-26/src/ciderlib/support/readme0000644000265600020320000000072412264261473017474 0ustar andreasadminDirectory: support ------------------ This directory contains the files that support the device simulators and their interfaces to the circuit simulators. They fall into four basic areas: 1. Numerical algorithms: integration, accuracy limits, special functions 2. Semiconductor device physics: material properties, recombination, mobility 3. File access for input: doping profiles from SUPREMIII, saved states 4. Miscellaneous: diagnstic I/O, string routines ngspice-26/src/ciderlib/support/suprmitf.c0000644000265600020320000002404512264261473020333 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Translated FORTRAN subroutine to read the SUPREM-3 binary file * the data is read and stored in two arrays x and conc */ #include "ngspice/ngspice.h" #include "ngspice/cidersupt.h" #define MAXMAT 10 #define MAXIMP 4 #define MAXLAYER 10 #define MAXGRID 500 #define GFREAD( fp, ptr, type, num ) if (num && (fread( ptr,\ sizeof(type), (unsigned)num, fp ) != (unsigned)num)) {\ return;\ } #define DEBUG if (0) void SUPbinRead(char *inFile, float *x, float *conc, int *impId, int *numNod) { int idata, recordMark; int ldata; int i, j; float rdata; char cdata[21]; int numLay, numImp, numGrid; int impTyp[4], matTyp[10], topNod[10], siIndex, offset; float xStart; float layerTh[10]; float con[500]; FILE *fpSuprem; /* Clear Concentration Array */ for ( i=0; i < MAXGRID; i++ ) { conc[i] = 0.0; } /* Open Input File */ if ((fpSuprem = fopen( inFile, "r" )) == NULL) { perror(inFile); return; } /* * The first record contains the number of layers (I4), the number of * impurities (I4), and the number of nodes (I4) present in the structure. */ GFREAD( fpSuprem, &recordMark, int, 1 ); GFREAD( fpSuprem, &numLay, int, 1 ); GFREAD( fpSuprem, &numImp, int, 1 ); GFREAD( fpSuprem, &numGrid, int, 1 ); DEBUG fprintf(stderr,"rec 1: %d %d %d\n", numLay, numImp, numGrid); GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The second record contains, for each layer, the material type (I4), the * layer thickness (R4), and the pointer to the top node of the layer (I4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numLay; i++ ) { GFREAD( fpSuprem, &matTyp[i], int, 1 ); GFREAD( fpSuprem, &layerTh[i], float, 1 ); GFREAD( fpSuprem, &topNod[i], int, 1 ); DEBUG fprintf(stderr,"rec 2: %d %f %d\n", matTyp[i], layerTh[i], topNod[i] ); } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The third record contains, for each layer, the material name (A20). */ /* Put a null at the end */ cdata[20] = '\0'; GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numLay; i++ ) { GFREAD( fpSuprem, cdata, char, 20 ); DEBUG fprintf(stderr,"rec 3: %s\n", cdata ); } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The fourth record contains, for each layer, the crystalline orientation * (I4), and the poly-crystalline grain size in microns (R4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numLay; i++ ) { GFREAD( fpSuprem, &idata, int, 1 ); GFREAD( fpSuprem, &rdata, float, 1 ); DEBUG fprintf(stderr,"rec 4: %d %f\n", idata, rdata ); } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The fifth record contains, for each impurity, the type of impurity (I4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numImp; i++ ) { GFREAD( fpSuprem, &impTyp[i], int, 1 ); DEBUG fprintf(stderr,"rec 5: %d\n", impTyp[i] ); } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The sixth record contains, for each impurity, the impurity name (A20). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numImp; i++ ) { GFREAD( fpSuprem, cdata, char, 20 ); DEBUG fprintf(stderr,"rec 6: %s\n", cdata ); } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The seventh record contains, for each layer by each impurity, the * integrated dopant (R4), and the interior concentration of the * polysilicon grains (R4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( j=0; j < numLay; j++ ) { for ( i=0; i < numImp; i++ ) { GFREAD( fpSuprem, &rdata, float, 1 ); DEBUG fprintf(stderr,"rec 7: %e", rdata ); GFREAD( fpSuprem, &rdata, float, 1 ); DEBUG fprintf(stderr," %e\n", rdata ); } } GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The eighth record contains, for each node in the structure, the distance * to the next deepest node (R4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); for ( i=0; i < numGrid; i++ ) { GFREAD( fpSuprem, &rdata, float, 1 ); } DEBUG fprintf(stderr,"rec 8: %f\n", rdata ); GFREAD( fpSuprem, &recordMark, int, 1 ); /* * The ninth record contains, for each node in the structure, the distance * from the surface (R4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); GFREAD( fpSuprem, &x[1], float, numGrid ); DEBUG fprintf(stderr,"rec 9: %f\n", x[1] ); GFREAD( fpSuprem, &recordMark, int, 1 ); /* * Next, for each impurity there is a record containing the impurity's * chemical concentration at each node (R4) and a record containing the * impurity's active concentration at each node (R4). */ for ( j=0; j < numImp; j++ ) { /* chemical concentration - not required */ GFREAD( fpSuprem, &recordMark, int, 1 ); GFREAD( fpSuprem, &con[1], float, numGrid ); DEBUG fprintf(stderr,"rec 10: %e\n", con[1] ); GFREAD( fpSuprem, &recordMark, int, 1 ); /* store active concentration */ GFREAD( fpSuprem, &recordMark, int, 1 ); GFREAD( fpSuprem, &con[1], float, numGrid ); DEBUG fprintf(stderr,"rec 11: %e\n", con[1] ); GFREAD( fpSuprem, &recordMark, int, 1 ); if (impTyp[j] == *impId) { /*...Boron...*/ if (impTyp[j] == 1) { for ( i=1; i <= numGrid; i++ ) conc[i] = - con[i]; } else { /*...All Other Impurities: P, As, Sb ...*/ for ( i=1; i <= numGrid; i++ ) conc[i] = con[i]; } } } /* * The last record in the file contains some random stuff that might be * useful to some people, the temperature in degrees Kelvin of the last * diffusion step (R4), the phosphorus implant dose (R4), the arsenic * implant flag (L4). */ GFREAD( fpSuprem, &recordMark, int, 1 ); GFREAD( fpSuprem, &rdata, float, 1 ); DEBUG fprintf(stderr,"rec 12: %f", rdata ); GFREAD( fpSuprem, &rdata, float, 1 ); DEBUG fprintf(stderr," %e", rdata ); GFREAD( fpSuprem, &ldata, int, 1 ); DEBUG fprintf(stderr," %d\n", ldata ); GFREAD( fpSuprem, &recordMark, int, 1 ); fclose( fpSuprem ); /* shift silicon layer to beginning of array */ for ( j=numLay; --j >= 0; ) if (matTyp[ j ] == 1) break; if(j < 0) { fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__); exit(1); } siIndex = j; offset = topNod[ siIndex ] - 1; numGrid -= offset; xStart = x[1 + offset]; for ( i=1; i <= numGrid; i++ ) { x[i] = x[i + offset] - xStart; conc[i] = conc[i + offset]; } /* Store number of valid nodes using pointer */ *numNod = numGrid; return; } void SUPascRead(char *inFile, float *x, float *conc, int *impId, int *numNod) { int idata; int i, j; float rdata; char cdata[21]; int numLay, numImp, numGrid; int impTyp[4], matTyp[10], topNod[10], siIndex, offset; float xStart; float layerTh[10]; float con[500]; FILE *fpSuprem; /* Clear Concentration Array */ for ( i=0; i < MAXGRID; i++ ) { conc[i] = 0.0; } /* Open Input File */ if ((fpSuprem = fopen( inFile, "r" )) == NULL) { perror(inFile); return; } /* * The first line contains the number of layers (I4), the number of * impurities (I4), and the number of nodes (I4) present in the structure. */ fscanf( fpSuprem, "%d %d %d\n", &numLay, &numImp, &numGrid ); DEBUG fprintf( stderr, "set 1: %d %d %d\n", numLay, numImp, numGrid); /* * The second set of lines contains, for each layer, the material name (A20), * the material type (I4), the layer thickness (R4), and the pointer to * the top node of the layer (I4), and an unknown int and unknown float. * The material type code: * 1 - Si * 2 - SiO2 * 3 - Poly * 4 - Si3N4 * 5 - Alum */ for ( i=0; i < numLay; i++ ) { fscanf( fpSuprem, "%s\n %d %e %d %d %e\n", cdata, &matTyp[i], &layerTh[i], &topNod[i], &idata, &rdata ); DEBUG fprintf(stderr,"set 2: %s: %d %f %d\n", cdata, matTyp[i], layerTh[i], topNod[i] ); } /* * The third set of lines contains, for each impurity, the name of the * impurity (A20) and the type of impurity (I4). */ for ( i=0; i < numImp; i++ ) { fscanf( fpSuprem, "%s\n %d\n", cdata, &impTyp[i] ); DEBUG fprintf(stderr,"set 3: %s: %d\n", cdata, impTyp[i] ); } /* * The fourth set of lines contains, for each layer by each impurity, the * integrated dopant (R4), and the interior concentration of the * polysilicon grains (R4). */ for ( j=0; j < numLay; j++ ) { for ( i=0; i < numImp; i++ ) { fscanf( fpSuprem, "%e", &rdata ); fscanf( fpSuprem, "%e", &rdata ); } } DEBUG fprintf(stderr,"set 4:\n" ); /* * The fifth set of lines contains, for each node in the structure, * the distance to the next deepest node (R4), the distance from the * surface (R4), and, for each impurity type, the impurity's * chemical concentration (R4) and the impurity's active concentration (R4). */ for ( i=1; i <= numGrid; i++ ) { fscanf( fpSuprem, "%e %e", &rdata, &x[i] ); for ( j=0; j < numImp; j++ ) { /* chemical concentration - not required */ fscanf( fpSuprem, "%e", &con[i] ); /* store active concentration */ fscanf( fpSuprem, "%e", &con[i] ); /* orient sign properly */ if (impTyp[j] == *impId) { /*...Boron...*/ if (impTyp[j] == 1) { conc[i] = - con[i]; } else { /*...All Other Impurities: P, As, Sb ...*/ conc[i] = con[i]; } } } } DEBUG fprintf( stderr, "set 5: %e %e\n", x[1], conc[1] ); /* * The last line in the file contains some random stuff that might be * useful to some people, the temperature in degrees Kelvin of the last * diffusion step (R4), the phosphorus implant dose (R4), the arsenic * implant flag (L4). However, we can just ignore that stuff. */ fclose( fpSuprem ); /* shift silicon layer to beginning of array */ for ( j=numLay; --j >= 0; ) if (matTyp[ j ] == 1) break; if(j < 0) { fprintf(stderr, "internal error in %s, bye !\n", __FUNCTION__); exit(1); } siIndex = j; offset = topNod[ siIndex ] - 1; numGrid -= offset; xStart = x[1 + offset]; for ( i=1; i <= numGrid; i++ ) { x[i] = x[i + offset] - xStart; conc[i] = conc[i + offset]; } /* Store number of valid nodes using pointer */ *numNod = numGrid; return; } ngspice-26/src/ciderlib/support/integset.c0000644000265600020320000000622512264261473020304 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numenum.h" #include "ngspice/cidersupt.h" /* compute the coefficient for the integration and predictor methods */ /* based on the Lagrange polynomial method in Liniger et. al. */ void computeIntegCoeff(int method, int order, double *intCoeff, double *delta) { int i, j, k; double sum, temp, preMult; double num, denom, prod; switch( method ) { case BDF: /* determine coeff[0] first */ sum = 0.0; temp = 0.0; for( j = 0 ; j < order; j++ ) { temp += delta[ j ]; sum += 1.0 / temp; } intCoeff[ 0 ] = sum; /* now compute the higher order coefficients */ for( j = 1; j <= order ; j++ ) { /* compute the pre multiplier */ temp = 0.0; for( i = 0; i < j; i++ ) { temp += delta[ i ]; } preMult = 1.0 / temp; prod = 1.0; /* now compute the product */ for( i = 1; i <= order; i++ ) { /* product loop */ if( i != j ) { num = 0.0; for( k = 0; k < i; k++ ) { /* first the numerator */ num += delta[ k ]; } if( i > j ) { /* denom is positive */ denom = 0.0; for( k = j; k < i; k++ ) { denom += delta[ k ]; } } else { /* i < j */ denom = 0.0; for( k = i; k < j; k++ ) { denom += delta[ k ]; } denom = -denom; } prod *= num / denom ; } } intCoeff[ j ] = -preMult * prod; } break; case TRAPEZOIDAL: default: switch( order ) { case 1: temp = 1.0 / delta[ 0 ]; intCoeff[ 0 ] = temp; intCoeff[ 1 ] = -temp; break; case 2: temp = 2.0 / delta[ 0 ]; intCoeff[ 0 ] = temp; intCoeff[ 1 ] = -temp; intCoeff[ 2 ] = -1.0; break; } break; } } void computePredCoeff(int method, int order, double *predCoeff, double *delta) { int i, j, k; double num, denom, prod; if( method == TRAPEZOIDAL && order > 2 ) { printf("\n computePredCoeff: order > 2 for trapezoidal"); exit( -1 ); } for( j = 1; j <= order+1 ; j++ ) { prod = 1.0; /* now compute the product */ for( i = 1; i <= order+1; i++ ) { /* product loop */ if( i != j ) { num = 0.0; for( k = 0; k < i; k++ ) { /* first the numerator */ num += delta[ k ]; } if( i > j ) { /* denom is positive */ denom = 0.0; for( k = j; k < i; k++ ) { denom += delta[ k ]; } } else { /* i < j */ denom = 0.0; for( k = i; k < j; k++ ) { denom += delta[ k ]; } denom = -denom; } prod *= num / denom ; } } predCoeff[ j - 1 ] = prod; } } /* main program to check the coefficients main() { double intCoeff[ 7 ], predCoeff[ 7 ]; double delta[ 7 ]; int order = 1; int i; for( i = 0; i <= 6; i++ ) { delta[ i ] = 1.0; } computeIntegCoeff(TRAPEZOIDAL, order, intCoeff, delta ); computePredCoeff(TRAPEZOIDAL, order, predCoeff, delta ); for(i = 0; i <= order; i++ ) { printf("\n IntCoeff[ %d ] = %e PredCoeff[ %d ] = %e ", i, intCoeff[ i ], i, predCoeff[ i ] ); } } */ ngspice-26/src/ciderlib/support/database.c0000644000265600020320000000270412264261473020224 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/fteext.h" /* #include "ftedata.h" */ #include "ngspice/cidersupt.h" struct plot * DBread( char *fileName ) { struct plot *plot; plot = raw_read( fileName ); return(plot); } double * DBgetData(struct plot *plot, char *name, int lengthWanted) { struct dvec *v; double *data; int i; v = vec_fromplot(name,plot); if (!v) { fprintf( stderr, "Error: cannot locate variable '%s'\n", name ); return(NULL); } if (v->v_length != lengthWanted ) { fprintf( stderr, "Error: vector '%s' has incorrect length\n", name ); return(NULL); } data = TMALLOC(double, v->v_length); if (isreal(v)) { bcopy(v->v_realdata, data, sizeof (double) * (size_t) v->v_length); } else { for (i=0; i < v->v_length; i++) { data[i] = realpart(v->v_compdata[i]); } } return(data); } void DBfree(struct plot *plot) { struct dvec *v, *nextv; struct plot *pl, *nextpl; for (pl = plot; pl; pl = nextpl) { nextpl = pl->pl_next; tfree( pl->pl_title ); tfree( pl->pl_date ); tfree( pl->pl_name ); tfree( pl->pl_typename ); for (v = pl->pl_dvecs; v; v = nextv) { nextv = v->v_next; vec_free( v ); } wl_free( pl->pl_commands ); /* XXX Environment variables (pl->pl_env) will leak. */ } } ngspice-26/src/ciderlib/support/devprint.c0000644000265600020320000000522712264261473020316 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* Device-type Dependent Printing Routines */ #include "ngspice/ngspice.h" #include "ngspice/optndefs.h" #include "ngspice/cidersupt.h" void printVoltages(FILE *file, char *mName, char *iName, int devType, int numVolt, double v1, double delV1, double v2, double delV2, double v3, double delV3 ) /* FILE *file output filestream */ /* char *mName name of model */ /* char *iName name of instance */ { fprintf( file, "\n" ); switch ( devType ) { case OPTN_RESISTOR: fprintf( file, "RES %s:%s voltage:\n", mName, iName ); fprintf( file, " Vpn =% .4e delVpn =% .4e\n", v1, delV1 ); break; case OPTN_CAPACITOR: fprintf( file, "CAP %s:%s voltage:\n", mName, iName ); fprintf( file, " Vpn =% .4e delVpn =% .4e\n", v1, delV1 ); break; case OPTN_DIODE: fprintf( file, "DIO %s:%s voltage:\n", mName, iName ); fprintf( file, " Vpn =% .4e delVpn =% .4e\n", v1, delV1 ); break; case OPTN_MOSCAP: fprintf( file, "MOS %s:%s voltage:\n", mName, iName ); fprintf( file, " Vgb =% .4e delVgb =% .4e\n", v1, delV1 ); break; case OPTN_BIPOLAR: fprintf( file, "BJT %s:%s voltages:\n", mName, iName ); if ( numVolt == 3 ) { fprintf( file, " Vce =% .4e delVce =% .4e\n", v1 - v3, delV1 - delV3 ); fprintf( file, " Vbe =% .4e delVbe =% .4e\n", v2 - v3, delV2 - delV3 ); fprintf( file, " Vcs =% .4e delVcs =% .4e\n", v1, delV1 ); } else { fprintf( file, " Vce =% .4e delVce =% .4e\n", v1, delV1 ); fprintf( file, " Vbe =% .4e delVbe =% .4e\n", v2, delV2 ); } break; case OPTN_MOSFET: fprintf( file, "MOS %s:%s voltages:\n", mName, iName ); fprintf( file, " Vdb =% .4e delVdb =% .4e\n", v1, delV1 ); fprintf( file, " Vgb =% .4e delVgb =% .4e\n", v2, delV2 ); fprintf( file, " Vsb =% .4e delVsb =% .4e\n", v3, delV3 ); break; case OPTN_JFET: if ( numVolt == 3 ) { fprintf( file, "JFET %s:%s voltages:\n", mName, iName ); fprintf( file, " Vdb =% .4e delVdb =% .4e\n", v1, delV1 ); fprintf( file, " Vgb =% .4e delVgb =% .4e\n", v2, delV2 ); fprintf( file, " Vsb =% .4e delVsb =% .4e\n", v3, delV3 ); } else { fprintf( file, "JFET %s:%s voltages:\n", mName, iName ); fprintf( file, " Vds =% .4e delVds =% .4e\n", v1, delV1 ); fprintf( file, " Vgs =% .4e delVgs =% .4e\n", v2, delV2 ); } break; case OPTN_SOIBJT: case OPTN_SOIMOS: case OPTN_MESFET: default: break; } } ngspice-26/src/ciderlib/support/logfile.c0000644000265600020320000000154112264261473020077 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cidersupt.h" static char *LogFileName = "cider.log"; static int LogError = 0; void LOGmakeEntry(char *name, char *description) { int procStamp; FILE *fpLog; #ifdef HAS_GETPID procStamp = getpid(); #else procStamp = 0; #endif /* Want to make sure that multiple processes can access the log file * without stepping on each other. */ #ifdef ultrix if ((fpLog = fopen(LogFileName, "A")) == NULL) { #else if ((fpLog = fopen(LogFileName, "a")) == NULL) { #endif if (!LogError) perror(LogFileName); LogError = 1; } else { fprintf(fpLog, "<%05d> %s: %s\n", procStamp, name, description); fclose(fpLog); LogError = 0; } } ngspice-26/src/ciderlib/support/mobil.c0000644000265600020320000002612612264261473017566 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/macros.h" #include "ngspice/material.h" #include "ngspice/cidersupt.h" void MOBdefaults(MaterialInfo *info , int carrier, int type, int concmodel, int fieldmodel ) { switch (concmodel) { case CT: info->concModel = CT; if (carrier == ELEC) { info->muMax[ELEC][type] = CT_MUMAX_N; info->muMin[ELEC][type] = CT_MUMIN_N; info->ntRef[ELEC][type] = CT_NTREF_N; info->ntExp[ELEC][type] = CT_NTEXP_N; } else { info->muMax[HOLE][type] = CT_MUMAX_P; info->muMin[HOLE][type] = CT_MUMIN_P; info->ntRef[HOLE][type] = CT_NTREF_P; info->ntExp[HOLE][type] = CT_NTEXP_P; } break; case AR: info->concModel = AR; if (carrier == ELEC) { info->muMax[ELEC][type] = AR_MUMAX_N; info->muMin[ELEC][type] = AR_MUMIN_N; info->ntRef[ELEC][type] = AR_NTREF_N; info->ntExp[ELEC][type] = AR_NTEXP_N; } else { info->muMax[HOLE][type] = AR_MUMAX_P; info->muMin[HOLE][type] = AR_MUMIN_P; info->ntRef[HOLE][type] = AR_NTREF_P; info->ntExp[HOLE][type] = AR_NTEXP_P; } break; case UF: info->concModel = UF; if (carrier == ELEC) { info->muMax[ELEC][type] = UF_MUMAX_N; info->muMin[ELEC][type] = UF_MUMIN_N; info->ntRef[ELEC][type] = UF_NTREF_N; info->ntExp[ELEC][type] = UF_NTEXP_N; } else { info->muMax[HOLE][type] = UF_MUMAX_P; info->muMin[HOLE][type] = UF_MUMIN_P; info->ntRef[HOLE][type] = UF_NTREF_P; info->ntExp[HOLE][type] = UF_NTEXP_P; } break; case GA: info->concModel = GA; if (carrier == ELEC) { info->muMax[ELEC][type] = GA_MUMAX_N; info->muMin[ELEC][type] = GA_MUMIN_N; info->ntRef[ELEC][type] = GA_NTREF_N; info->ntExp[ELEC][type] = GA_NTEXP_N; } else { info->muMax[HOLE][type] = GA_MUMAX_P; info->muMin[HOLE][type] = GA_MUMIN_P; info->ntRef[HOLE][type] = GA_NTREF_P; info->ntExp[HOLE][type] = GA_NTEXP_P; } break; case SG: default: info->concModel = SG; if (carrier == ELEC) { info->muMax[ELEC][type] = SG_MUMAX_N; info->muMin[ELEC][type] = SG_MUMIN_N; info->ntRef[ELEC][type] = SG_NTREF_N; info->ntExp[ELEC][type] = SG_NTEXP_N; } else { info->muMax[HOLE][type] = SG_MUMAX_P; info->muMin[HOLE][type] = SG_MUMIN_P; info->ntRef[HOLE][type] = SG_NTREF_P; info->ntExp[HOLE][type] = SG_NTEXP_P; } break; } if (type == MAJOR) { switch (fieldmodel) { case CT: info->fieldModel = CT; if (carrier == ELEC) { info->vSat[ELEC] = CT_VSAT_N; } else { info->vSat[HOLE] = CT_VSAT_P; } break; case AR: case UF: info->fieldModel = AR; if (carrier == ELEC) { info->vSat[ELEC] = AR_VSAT_N; } else { info->vSat[HOLE] = AR_VSAT_P; } break; case GA: info->fieldModel = GA; if (carrier == ELEC) { info->vSat[ELEC] = GA_VSAT_N; info->vWarm[ELEC] = GA_VWARM_N; } else { info->vSat[HOLE] = GA_VSAT_P; info->vWarm[HOLE] = GA_VWARM_P; } break; case SG: default: info->fieldModel = SG; if (carrier == ELEC) { info->vSat[ELEC] = SG_VSAT_N; info->vWarm[ELEC] = SG_VWARM_N; } else { info->vSat[HOLE] = SG_VSAT_P; info->vWarm[HOLE] = SG_VWARM_P; } break; } } } void MOBtempDep (MaterialInfo *info, double temp) { double relTemp = temp / 300.0; double factor, muMin, mu0; /* Modify if necessary. */ if (TempDepMobility) { /* Do concentration dependence parameters */ muMin = info->muMin[ELEC][MAJOR]; mu0 = info->muMax[ELEC][MAJOR] - muMin; factor = pow(relTemp, TD_EXPMUMIN_N); muMin *= factor; factor = pow(relTemp, TD_EXPMUMAX_N); mu0 *= factor; info->muMin[ELEC][MAJOR] = muMin; info->muMax[ELEC][MAJOR] = mu0 + muMin; factor = pow(relTemp, TD_EXPNTREF_N); info->ntRef[ELEC][MAJOR] *= factor; factor = pow(relTemp, TD_EXPNTEXP_N); info->ntExp[ELEC][MAJOR] *= factor; muMin = info->muMin[ELEC][MINOR]; mu0 = info->muMax[ELEC][MINOR] - muMin; factor = pow(relTemp, TD_EXPMUMIN_N); muMin *= factor; factor = pow(relTemp, TD_EXPMUMAX_N); mu0 *= factor; info->muMin[ELEC][MINOR] = muMin; info->muMax[ELEC][MINOR] = mu0 + muMin; factor = pow(relTemp, TD_EXPNTREF_N); info->ntRef[ELEC][MINOR] *= factor; factor = pow(relTemp, TD_EXPNTEXP_N); info->ntExp[ELEC][MINOR] *= factor; muMin = info->muMin[HOLE][MAJOR]; mu0 = info->muMax[HOLE][MAJOR] - muMin; factor = pow(relTemp, TD_EXPMUMIN_P); muMin *= factor; factor = pow(relTemp, TD_EXPMUMAX_P); mu0 *= factor; info->muMin[HOLE][MAJOR] = muMin; info->muMax[HOLE][MAJOR] = mu0 + muMin; factor = pow(relTemp, TD_EXPNTREF_P); info->ntRef[HOLE][MAJOR] *= factor; factor = pow(relTemp, TD_EXPNTEXP_P); info->ntExp[HOLE][MAJOR] *= factor; muMin = info->muMin[HOLE][MINOR]; mu0 = info->muMax[HOLE][MINOR] - muMin; factor = pow(relTemp, TD_EXPMUMIN_P); muMin *= factor; factor = pow(relTemp, TD_EXPMUMAX_P); mu0 *= factor; info->muMin[HOLE][MINOR] = muMin; info->muMax[HOLE][MINOR] = mu0 + muMin; factor = pow(relTemp, TD_EXPNTREF_P); info->ntRef[HOLE][MINOR] *= factor; factor = pow(relTemp, TD_EXPNTEXP_P); info->ntExp[HOLE][MINOR] *= factor; /* Modify field dependence parameters */ /* Assume warm carrier reference velocity has same temperature dep. */ factor = sqrt( tanh( TD_TREFVS_N / Temp ) ); info->vSat[ELEC] *= factor; info->vWarm[ELEC] *= factor; factor = sqrt( tanh( TD_TREFVS_P / Temp ) ); info->vSat[HOLE] *= factor; info->vWarm[HOLE] *= factor; } } void MOBconcDep (MaterialInfo *info, double conc, double *pMun, double *pMup) { double s; /* We have to check sign of conc even when concentration dependence * is not used because it affects whether carriers are majority or * minority carriers. Ideally, the minority/majority carrier models * should agree at 0.0 concentration, but often they'll be inconsistent. */ if (conc >= 0.0) { /* N type */ if (ConcDepMobility) { switch (info->concModel) { case CT: case AR: case UF: case GA: *pMun = info->muMin[ELEC][MAJOR] + (info->muMax[ELEC][MAJOR] - info->muMin[ELEC][MAJOR]) / (1.0 + pow(conc / info->ntRef[ELEC][MAJOR], info->ntExp[ELEC][MAJOR])); *pMup = info->muMin[HOLE][MINOR] + (info->muMax[HOLE][MINOR] - info->muMin[HOLE][MINOR]) / (1.0 + pow(conc / info->ntRef[HOLE][MINOR], info->ntExp[HOLE][MINOR])); break; case SG: default: s = info->muMax[ELEC][MAJOR] / info->muMin[ELEC][MAJOR]; s = pow(s, 1.0 / info->ntExp[ELEC][MAJOR]) - 1; *pMun = info->muMax[ELEC][MAJOR] / pow(1.0 + conc / (conc / s + info->ntRef[ELEC][MAJOR]), info->ntExp[ELEC][MAJOR]); s = info->muMax[HOLE][MINOR] / info->muMin[HOLE][MINOR]; s = pow(s, 1.0 / info->ntExp[HOLE][MINOR]) - 1; *pMup = info->muMax[HOLE][MINOR] / pow(1.0 + conc / (conc / s + info->ntRef[HOLE][MINOR]), info->ntExp[HOLE][MINOR]); break; } } else { *pMun = info->muMax[ELEC][MAJOR]; *pMup = info->muMax[HOLE][MINOR]; } } else { /* P type */ if (ConcDepMobility) { conc = -conc; /* Take absolute value. */ switch (info->concModel) { case CT: case AR: case UF: case GA: *pMun = info->muMin[ELEC][MINOR] + (info->muMax[ELEC][MINOR] - info->muMin[ELEC][MINOR]) / (1.0 + pow(conc / info->ntRef[ELEC][MINOR], info->ntExp[ELEC][MINOR])); *pMup = info->muMin[HOLE][MAJOR] + (info->muMax[HOLE][MAJOR] - info->muMin[HOLE][MAJOR]) / (1.0 + pow(conc / info->ntRef[HOLE][MAJOR], info->ntExp[HOLE][MAJOR])); break; case SG: default: s = info->muMax[ELEC][MINOR] / info->muMin[ELEC][MINOR]; s = pow(s, 1.0 / info->ntExp[ELEC][MINOR]) - 1; *pMun = info->muMax[ELEC][MINOR] / pow(1.0 + conc / (conc / s + info->ntRef[ELEC][MINOR]), info->ntExp[ELEC][MINOR]); s = info->muMax[HOLE][MAJOR] / info->muMin[HOLE][MAJOR]; s = pow(s, 1.0 / info->ntExp[HOLE][MAJOR]) - 1; *pMup = info->muMax[HOLE][MAJOR] / pow(1.0 + conc / (conc / s + info->ntRef[HOLE][MAJOR]), info->ntExp[HOLE][MAJOR]); break; } } else { *pMun = info->muMax[ELEC][MINOR]; *pMup = info->muMax[HOLE][MAJOR]; } } return; } void MOBfieldDep (MaterialInfo *info, int carrier, double field, double *pMu, double *pDMu) { double eLateral, mu; double sgnL; double temp1, temp2, temp3, temp4, temp5, temp6; double dMuDEl; /* Lateral Field Derivative */ /* Quick check to make sure we really belong here. */ if (!FieldDepMobility) /* XXX Global */ return; sgnL = SGN (field); eLateral = ABS (field); mu = *pMu; /* Grab temp. and conc.-dep. mobility */ if (carrier == ELEC) { switch (info->fieldModel) { case CT: case AR: case UF: temp1 = mu / info->vSat[ELEC]; temp2 = temp1 * eLateral; temp3 = 1.0 / (1.0 + temp2 * temp2); mu *= sqrt(temp3); dMuDEl = -sgnL * mu * temp3 * temp2 * temp1; break; case GA: temp1 = info->vSat[ELEC] / info->vWarm[ELEC]; /* Vsat / Vwarm */ temp2 = mu / info->vWarm[ELEC]; temp3 = temp2 * eLateral; /* Vdrift / Vwarm */ temp4 = temp3 * temp3 * temp3; temp5 = 1.0 + temp1 * temp4; temp6 = 1.0 / (1.0 + temp3 * temp4); mu *= temp5 * temp6; dMuDEl = - sgnL * mu * temp2 * (4.0 * temp4 * temp6 - 3.0 * temp1 * temp3 * temp3 / temp5 ); /* dMuDEl = 0.0; */ break; case SG: default: temp1 = mu / info->vSat[ELEC]; temp2 = temp1 * eLateral;/* Vdrift / Vsat */ temp3 = mu / info->vWarm[ELEC]; temp4 = temp3 * eLateral;/* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_N); temp6 = 1.0 / (1.0 + temp4 * temp5 + temp2 * temp2); mu *= sqrt(temp6); dMuDEl = -sgnL * 0.5 * mu * temp6 * (temp5 * (2.0 - temp5) * temp3 + (2.0 * temp2 * temp1)); break; } } else { /* Hole Mobility */ switch (info->fieldModel) { case CT: case AR: case UF: temp1 = mu / info->vSat[HOLE]; temp2 = temp1 * eLateral; temp3 = 1.0 / (1.0 + temp2); mu *= temp3; dMuDEl = -sgnL * mu * temp3 * temp1; break; case GA: temp1 = info->vSat[HOLE] / info->vWarm[HOLE]; /* Vsat / Vwarm */ temp2 = mu / info->vWarm[HOLE]; temp3 = temp2 * eLateral; /* Vdrift / Vwarm */ temp4 = temp3 * temp3 * temp3; temp5 = 1.0 + temp1 * temp4; temp6 = 1.0 / (1.0 + temp3 * temp4); mu *= temp5 * temp6; dMuDEl = - sgnL * mu * temp2 * (4.0 * temp4 * temp6 - 3.0 * temp1 * temp3 * temp3 / temp5 ); /* dMuDEl = 0.0; */ break; case SG: default: temp1 = mu / info->vSat[HOLE]; temp2 = temp1 * eLateral;/* Vdrift / Vsat */ temp3 = mu / info->vWarm[HOLE]; temp4 = temp3 * eLateral;/* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_P); temp6 = 1.0 / (1.0 + temp4 * temp5 + temp2 * temp2); mu *= sqrt(temp6); dMuDEl = -sgnL * 0.5 * mu * temp6 * (temp5 * (2.0 - temp5) * temp3 + (2.0 * temp2 * temp1)); break; } } *pMu = mu; *pDMu = dMuDEl; return; } ngspice-26/src/ciderlib/support/geominfo.c0000644000265600020320000000636312264261473020270 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/gendev.h" #include "ngspice/macros.h" #include "ngspice/memory.h" #include "ngspice/cidersupt.h" void printCoordInfo(CoordInfo *pFirstCoord) { CoordInfo *pCoord; for ( pCoord = pFirstCoord; pCoord != NULL; pCoord = pCoord->next ) { fprintf(stderr, "mesh number=%4d location=%11.4e\n", pCoord->number, pCoord->location ); } } void killCoordInfo(CoordInfo *pFirstCoord) { CoordInfo *pCoord, *pKill; for ( pCoord = pFirstCoord; pCoord != NULL; ) { pKill = pCoord; pCoord = pCoord->next; FREE( pKill ); } } void ONEprintDomainInfo(DomainInfo *pFirstDomain) { DomainInfo *pDomain; for ( pDomain = pFirstDomain; pDomain != NULL; pDomain = pDomain->next ) { fprintf( stderr, "domain id=%4d mat=%4d ixLo=%4d ixHi=%4d\n", pDomain->id, pDomain->material, pDomain->ixLo, pDomain->ixHi ); } } void TWOprintDomainInfo(DomainInfo *pFirstDomain) { DomainInfo *pDomain; for ( pDomain = pFirstDomain; pDomain != NULL; pDomain = pDomain->next ) { fprintf( stderr, "domain id=%4d mat=%4d ixLo=%4d ixHi=%4d iyLo=%4d iyHi=%4d\n", pDomain->id, pDomain->material, pDomain->ixLo, pDomain->ixHi, pDomain->iyLo, pDomain->iyHi); } } void killDomainInfo(DomainInfo *pFirstDomain) { DomainInfo *pDomain, *pKill; for ( pDomain = pFirstDomain; pDomain != NULL; ) { pKill = pDomain; pDomain = pDomain->next; FREE( pKill ); } } void ONEprintBoundaryInfo(BoundaryInfo *pFirstBoundary) { BoundaryInfo *pBoundary; for ( pBoundary = pFirstBoundary; pBoundary != NULL; pBoundary = pBoundary->next ) { fprintf( stderr, "boundary dom=%4d nbr=%4d ixLo=%4d ixHi=%4d\n", pBoundary->domain, pBoundary->neighbor, pBoundary->ixLo, pBoundary->ixHi ); } } void TWOprintBoundaryInfo(BoundaryInfo *pFirstBoundary) { BoundaryInfo *pBoundary; for ( pBoundary = pFirstBoundary; pBoundary != NULL; pBoundary = pBoundary->next ) { fprintf( stderr, "boundary dom=%4d nbr=%4d ixLo=%4d ixHi=%4d iyLo=%4d iyHi=%4d\n", pBoundary->domain, pBoundary->neighbor, pBoundary->ixLo, pBoundary->ixHi, pBoundary->iyLo, pBoundary->iyHi); } } void killBoundaryInfo(BoundaryInfo *pFirstBoundary) { BoundaryInfo *pBoundary, *pKill; for ( pBoundary = pFirstBoundary; pBoundary != NULL; ) { pKill = pBoundary; pBoundary = pBoundary->next; FREE( pKill ); } } void TWOprintElectrodeInfo(ElectrodeInfo *pFirstElectrode) { ElectrodeInfo *pElectrode; for ( pElectrode = pFirstElectrode; pElectrode != NULL; pElectrode = pElectrode->next ) { fprintf( stderr, "electrode id=%4d ixLo=%4d ixHi=%4d iyLo=%4d iyHi=%4d\n", pElectrode->id, pElectrode->ixLo, pElectrode->ixHi, pElectrode->iyLo, pElectrode->iyHi ); } } void killElectrodeInfo(ElectrodeInfo *pFirstElectrode) { ElectrodeInfo *pElectrode, *pKill; for ( pElectrode = pFirstElectrode; pElectrode != NULL; ) { pKill = pElectrode; pElectrode = pElectrode->next; FREE( pKill ); } } ngspice-26/src/ciderlib/support/suprem.c0000644000265600020320000001233112264261473017770 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* Functions to read SUPREM (Binary or Ascii) & ASCII input files */ #include "ngspice/ngspice.h" #include "ngspice/profile.h" #include "ngspice/cidersupt.h" void readAsciiData( char *fileName, int impType, DOPtable **ppTable ) { FILE *fpAscii; int index; double x, y; int numPoints; DOPtable *tmpTable; double **profileData; double sign; /* Open Input File */ if ((fpAscii = fopen( fileName, "r" )) == NULL) { perror( fileName ); exit(-1); } /* Get sign of concentrations */ if (impType == IMP_P_TYPE) { sign = -1.0; } else { sign = 1.0; } /* read the number of points */ fscanf( fpAscii, "%d", &numPoints ); /* allocate 2-D array to read in data of x-coordinate and N(x) */ XCALLOC( profileData, double *, 2 ); for( index = 0; index <= 1; index++ ) { XCALLOC( profileData[ index ], double, 1 + numPoints ); } /* the number of points is stored as profileData[0][0] */ profileData[0][0] = numPoints; for( index = 1; index <= numPoints; index++ ) { fscanf( fpAscii, "%lf %lf ", &x, &y ); profileData[ 0 ][ index ] = x; profileData[ 1 ][ index ] = sign * ABS(y); } /* Now create a new lookup table */ XCALLOC( tmpTable, DOPtable, 1 ); if ( *ppTable == NULL ) { /* First Entry */ tmpTable->impId = 1; tmpTable->dopData = profileData; tmpTable->next = NULL; *ppTable = tmpTable; } else { tmpTable->impId = (*ppTable)->impId + 1; tmpTable->dopData = profileData; tmpTable->next = *ppTable; *ppTable = tmpTable; } /* for debugging print the data that has been just read */ /* for( index = 1; index <= numPoints; index++ ) { printf("\n %e %e", profileData[ 0 ][ index ], profileData[ 1 ][ index ]); } */ fclose(fpAscii); return; } /* interface routine based on notes provided by Steve Hansen of Stanford */ /* * The material types are: * 1 = single crystal silicon * 2 = silicon dioxide * 3 = poly-crystalline silicon * 4 = silicon nitride * 5 = aluminum * The impurity types are: * 1 = boron * 2 = phosphorus * 3 = arsenic * 4 = antimony * The crystalline orientations are: * 1 = <111> * 2 = <100> * 3 = <110> * The layer thinkness, poly-crystalline grain size, node spacing and * distance from the surface are all in microns. * The integrated dopant concentration and the phophorus implant dose are * in atoms per square centimeter. * The interior polycrystalline grain concentration and the impurity * concentrations at each node are in atoms per cubic centimeter. */ void readSupremData(char *fileName, int fileType, int impType, DOPtable **ppTable) { #define MAX_GRID 500 float x[ MAX_GRID ], conc[ MAX_GRID ]; int index; DOPtable *tmpTable; double **profileData; int numNodes; /* read the Suprem data file */ if ( fileType == 0 ) { /* BINARY FILE */ SUPbinRead( fileName, x, conc, &impType, &numNodes ); } else { SUPascRead( fileName, x, conc, &impType, &numNodes ); } /* allocate 2-D array to read in data of x-coordinate and N(x) */ XCALLOC( profileData, double *, 2 ); for( index = 0; index <= 1; index++ ) { XCALLOC( profileData[ index ], double, 1 + numNodes ); } /* the number of points is stored as profileData[0][0] */ profileData[0][0] = numNodes; for( index = 1; index <= numNodes; index++ ) { profileData[ 0 ][ index ] = x[ index ]; profileData[ 1 ][ index ] = conc[ index ]; } /* Now create a new lookup table */ XCALLOC( tmpTable, DOPtable, 1 ); if ( *ppTable == NULL ) { /* First Entry */ tmpTable->impId = 1; tmpTable->dopData = profileData; tmpTable->next = NULL; *ppTable = tmpTable; } else { tmpTable->impId = (*ppTable)->impId + 1; tmpTable->dopData = profileData; tmpTable->next = *ppTable; *ppTable = tmpTable; } /* for debugging print the data that has been just read */ /* for( index = 1; index <= numNodes; index++ ) { printf("%e %e\n", profileData[ 0 ][ index ], profileData[ 1 ][ index ]); } */ return; } /* main program to debug readSupremData */ /* main(ac, av) char **av; { void readSupremData(); DOPtable *supTable = NULL; double **supInput; int numPoints, index; char *impName; int impType; switch (ac) { case 1: printf( "Usage: %s suprem-file ...\n", av[0] ); exit(-1); break; default: break; } for ( index = 1; index < ac; index++ ) { for ( impType=1; impType <= 4; impType++ ) { readSupremData( av[index], 1, impType, &supTable ); } } for ( ; supTable ISNOT NULL; supTable = supTable->next ) { fprintf( stdout, "\"Impurity Number: %d\n", supTable->impId ); supInput = supTable->dopData; numPoints = supInput[0][0]; for( index = 1; index <= numPoints; index++ ) { printf("%e\t%e\n", supInput[ 0 ][ index ], ABS(supInput[ 1 ][ index ]) + 1e-20 ); } fprintf( stdout, "\n" ); } } */ ngspice-26/src/ciderlib/support/Makefile.am0000644000265600020320000000067212264261473020352 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcidersuprt.la libcidersuprt_la_SOURCES = \ database.c \ devprint.c \ geominfo.c \ globals.c \ integset.c \ integuse.c \ logfile.c \ mater.c \ misc.c \ mobil.c \ recomb.c \ suprem.c \ suprmitf.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = readme ngspice-26/src/ciderlib/support/Makefile.in0000644000265600020320000004213612264261534020362 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ciderlib/support DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcidersuprt_la_LIBADD = am_libcidersuprt_la_OBJECTS = database.lo devprint.lo geominfo.lo \ globals.lo integset.lo integuse.lo logfile.lo mater.lo misc.lo \ mobil.lo recomb.lo suprem.lo suprmitf.lo libcidersuprt_la_OBJECTS = $(am_libcidersuprt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcidersuprt_la_SOURCES) DIST_SOURCES = $(libcidersuprt_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcidersuprt.la libcidersuprt_la_SOURCES = \ database.c \ devprint.c \ geominfo.c \ globals.c \ integset.c \ integuse.c \ logfile.c \ mater.c \ misc.c \ mobil.c \ recomb.c \ suprem.c \ suprmitf.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = readme all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ciderlib/support/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ciderlib/support/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcidersuprt.la: $(libcidersuprt_la_OBJECTS) $(libcidersuprt_la_DEPENDENCIES) $(EXTRA_libcidersuprt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcidersuprt_la_OBJECTS) $(libcidersuprt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/database.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/geominfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/globals.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/integuse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mater.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mobil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/recomb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suprem.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suprmitf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/ciderlib/support/misc.c0000644000265600020320000001034412264261473017412 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Miscellaneous routines culled from the oned directory so that the twod * code will run without having to compile the oned code */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/spmatrix.h" #include "ngspice/cidersupt.h" /* Used in Solution Projection Calculations */ double guessNewConc(double conc, double delta) { BOOLEAN acceptable = FALSE; double fib, newConc, lambda, fibn, fibp; lambda = 1.0; fibn = 1.0; fibp = 1.0; newConc = 0.0; for ( ; !acceptable ; ) { fib = fibp; fibp = fibn; fibn += fib; lambda *= fibp / fibn; newConc = conc + delta * lambda; if( newConc > 0.0 ) { acceptable = TRUE; } else { /* newConc is still negative but fibp and fibn are large */ if ( (fibp > 1e6) || (fibn > 1e6) ) { acceptable = TRUE; newConc = conc; } } } return( newConc ); } /* Used in Doping Calculation */ /* compute the concentration at x given an array of data. * The data is stored in a two-dimensional array x, N(x). * x is assumed to be in ascending order. given an x * a search is performed to determine the data points closest * to it and linear interpolation is performed to generate N(x) */ /* #define LOGSUPREM */ double lookup(double **dataTable, double x) { double conc=0.0, x0, x1, y0, y1; #ifdef LOGSUPREM double lnconc, lny0, lny1; #endif int index, numPoints; BOOLEAN done = FALSE; numPoints = (int)dataTable[ 0 ][ 0 ]; for( index = 2; index <= numPoints && (!done); index++ ) { x1 = dataTable[ 0 ][ index ]; /* check if x1 > x */ if( x1 >= x ) { /* found an x1 larger than x, so linear interpolate */ x0 = dataTable[ 0 ][ index - 1 ]; y0 = dataTable[ 1 ][ index - 1 ]; y1 = dataTable[ 1 ][ index ]; #ifdef LOGSUPREM /* Ignore concentrations below 1.0 */ if ( ABS(y0) < 1.0 ) lny0 = 0.0; else lny0 = SGN(y0) * log( ABS(y0) ); if ( ABS(y1) < 1.0 ) lny1 = 0.0; else lny1 = SGN(y0) * log( ABS(y0) ); lnconc = lny0 + (lny1 - lny0) * (x - x0) / (x1 - x0); conc = SGN(lnconc) * exp( ABS(lnconc) ); #else conc = y0 + (y1 - y0) * (x - x0) / (x1 - x0); #endif /* LOGSUPREM */ done = TRUE; } else { if( index == numPoints ) { /* set to concentration of last node - due to roundoff errors */ conc = dataTable[ 1 ][ numPoints ]; } } } return ( conc ); } /* Used in admittance calculations */ /* this function returns TRUE is SOR iteration converges otherwise FALSE */ BOOLEAN hasSORConverged(double *oldSolution, double *newSolution, int numEqns) { BOOLEAN converged = TRUE; int index; double xOld, xNew, tol; double absTol = 1e-12; double relTol = 1e-3; for( index = 1 ; index <= numEqns ; index++ ) { xOld = oldSolution[ index ]; xNew = newSolution[ index ]; tol = absTol + relTol * MAX( ABS( xOld ), ABS( xNew )); if( ABS( xOld - xNew ) > tol ) { converged = FALSE; printf("hasSORconverged failed\n"); break; } } return( converged ); } /* Used to Check Sparse Matrix Errors */ BOOLEAN foundError(int error) { BOOLEAN matrixError; switch( error ) { /* Removed for Spice3e1 Compatibility case spSMALL_PIVOT: printf( "Warning: LU Decomposition Problem - SMALL PIVOT\n" ); matrixError = FALSE; break; */ case spPANIC: printf( "Error: LU Decomposition Failed - PANIC\n" ); matrixError = TRUE; break; case spSINGULAR: printf( "Error: LU Decomposition Failed - SINGULAR\n" ); matrixError = TRUE; break; /* Removed for Spice3e1 Compatibility case spZERO_DIAG: printf( "Error: LU Decomposition Failed - ZERO PIVOT\n" ); matrixError = TRUE; break; */ case spNO_MEMORY: printf( "Error: LU Decomposition Failed - NO MEMORY\n" ); matrixError = TRUE; break; default: matrixError = FALSE; break; } return( matrixError ); } ngspice-26/src/ciderlib/support/globals.c0000644000265600020320000001064612264261473020107 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/cidersupt.h" /* Global Variable Declarations char *LogFileName = "cider.log"; int BandGapNarrowing; int TempDepMobility, ConcDepMobility, FieldDepMobility, TransDepMobility; int SurfaceMobility, MatchingMobility, MobDeriv; int CCScattering; int Srh, Auger, ConcDepLifetime, AvalancheGen; int FreezeOut = FALSE; int OneCarrier; int MaxIterations = 100; int AcAnalysisMethod = DIRECT; double Temp, RelTemp, Vt, RefPsi; double EpsNorm, VNorm, NNorm, LNorm, TNorm, JNorm, GNorm, ENorm; RefPsi is the potential at Infinity */ /* * Compute global values for this device. */ void GLOBcomputeGlobals(GLOBvalues *pGlobals, double temp) /* GLOBvalues *pGlobals Global Parameter Data Structure */ /* double temp Instance Temperature */ { double tmp1; double mnSi, mpSi; /* electron and hole conduction mass */ double eg0; /* band gap */ double nc0, nv0; /* conduction/valence band states */ /* compute temp. dependent global parameters */ Temp = temp; RelTemp = Temp / 300.0; tmp1 = pow( RelTemp, 1.5 ); Vt = BOLTZMANN_CONSTANT * Temp / CHARGE; eg0 = EGAP300_SI + DGAPDT_SI * ( (300.0 * 300.0) / (300.0 + TREF_EG_SI) - (Temp * Temp) / (Temp + TREF_EG_SI) ); mnSi = 1.039 + 5.477e-4 * Temp - 2.326e-7 * Temp * Temp; mpSi = 0.262 * log( 0.259 * Temp ); nc0 = NCV_NOM * pow( mnSi, 1.5 ) * tmp1; nv0 = NCV_NOM * pow( mpSi, 1.5 ) * tmp1; RefPsi = 0.0; /* set up the normalization factors */ EpsNorm = EPS_SI; VNorm = Vt; NNorm = sqrt( nc0 ) * sqrt( nv0 ); /* this way no overflow */ LNorm = sqrt( ( VNorm * EpsNorm ) / ( CHARGE * NNorm ) ); TNorm = LNorm * LNorm / VNorm; JNorm = CHARGE * NNorm * VNorm / LNorm; GNorm = JNorm / VNorm; ENorm = VNorm / LNorm; RefPsi /= VNorm; /* Save Globals */ GLOBputGlobals( pGlobals ); /* * GLOBprnGlobals( stdout, pGlobals ); */ } void GLOBputGlobals(GLOBvalues *values) { if ( values == NULL ) { fprintf( stderr, "Error: tried to get from NIL GLOBvalues\n"); exit(-1); } /* Temperature-related globals */ values->Temp = Temp; values->RelTemp = RelTemp; values->Vt = Vt; values->RefPsi = RefPsi; /* Normalization Factors */ values->EpsNorm = EpsNorm; values->VNorm = VNorm; values->NNorm = NNorm; values->LNorm = LNorm; values->TNorm = TNorm; values->JNorm = JNorm; values->GNorm = GNorm; values->ENorm = ENorm; return; } /* * Reload all globals needed during DEV loading routines * and DEV output routines */ void GLOBgetGlobals(GLOBvalues *values) { if ( values == NULL ) { fprintf( stderr, "Error: tried to get from NIL GLOBvalues\n"); exit(-1); } /* Temperature-related globals */ Temp = values->Temp; RelTemp = values->RelTemp; Vt = values->Vt; RefPsi = values->RefPsi; /* Normalization Factors */ EpsNorm = values->EpsNorm; VNorm = values->VNorm; NNorm = values->NNorm; LNorm = values->LNorm; TNorm = values->TNorm; JNorm = values->JNorm; GNorm = values->GNorm; ENorm = values->ENorm; return; } void GLOBprnGlobals(FILE *file, GLOBvalues *values) { static const char tabformat[] = "%12s: % .4e %-12s\t"; static const char newformat[] = "%12s: % .4e %-12s\n"; if ( values == NULL ) { fprintf( stderr, "Error: tried to print NIL GLOBvalues\n"); exit(-1); } fprintf( file, "*** GLOBAL PARAMETERS AT %g deg K\n", values->Temp ); fprintf( file, "****** Temperature-Dependent Voltages\n" ); fprintf( file, tabformat, "Vt", values->Vt, "V" ); fprintf( file, newformat, "RefPsi", values->RefPsi * values->VNorm, "V" ); fprintf( file, "****** Normalization Factors\n" ); fprintf( file, newformat, "EpsNorm", values->EpsNorm, "F/cm" ); fprintf( file, newformat, "VNorm", values->VNorm, "V" ); fprintf( file, newformat, "NNorm", values->NNorm, "/cm^3" ); fprintf( file, newformat, "LNorm", values->LNorm, "cm" ); fprintf( file, newformat, "TNorm", values->TNorm, "s" ); fprintf( file, newformat, "JNorm", values->JNorm, "A/cm^2" ); fprintf( file, newformat, "GNorm", values->GNorm, "A/V" ); fprintf( file, newformat, "ENorm", values->ENorm, "V/cm" ); return; } ngspice-26/src/ciderlib/support/integuse.c0000644000265600020320000001645612264261473020314 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/gendev.h" #include "ngspice/cidersupt.h" /* function to compute the integrated variables discretization */ #define ccap qcap+1 double integrate(double **devStates, TranInfo *info, int qcap ) { double value; double *coeff = info->intCoeff; switch ( info->method ) { case BDF: switch( info->order ) { case 1: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap]; break; case 2: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap]; break; case 3: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap]; break; case 4: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap]; break; case 5: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap] + coeff[5] * devStates[5][qcap]; break; case 6: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap] + coeff[5] * devStates[5][qcap] + coeff[6] * devStates[6][qcap]; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); } break; case TRAPEZOIDAL: default: switch( info->order ) { case 1: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap]; devStates[0][ccap] = value; break; case 2: value = coeff[0] * devStates[0][qcap] + coeff[1] * devStates[1][qcap] + coeff[2] * devStates[1][ccap]; devStates[0][ccap] = value; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); } break; } return( value ); } /* function to predict the value of the variables */ double predict(double **devStates, TranInfo *info, int qcap ) { double value; double *coeff = info->predCoeff; switch ( info->method ) { case BDF: switch( info->order ) { case 1: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap]; break; case 2: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap]; break; case 3: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap] + coeff[3] * devStates[4][qcap]; break; case 4: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap] + coeff[3] * devStates[4][qcap] + coeff[4] * devStates[5][qcap]; break; case 5: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap] + coeff[3] * devStates[4][qcap] + coeff[4] * devStates[5][qcap] + coeff[5] * devStates[6][qcap]; break; case 6: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap] + coeff[3] * devStates[4][qcap] + coeff[4] * devStates[5][qcap] + coeff[5] * devStates[6][qcap] + coeff[6] * devStates[7][qcap]; break; default: printf( "\n prediction order %d !! STOP \n", info->order ); exit( 0 ); } break; case TRAPEZOIDAL: default: switch( info->order ) { case 1: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap]; break; case 2: value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[3][qcap]; /* value = coeff[0] * devStates[1][qcap] + coeff[1] * devStates[2][qcap] + coeff[2] * devStates[1][ccap]; */ break; default: printf( "\n prediction order %d !! STOP \n", info->order ); exit( 0 ); } break; } return( value ); } double computeLTECoeff( TranInfo *info ) { double *delta = info->delta; double temp, denom, lteCoeff; switch ( info->method ) { case BDF: switch( info->order ) { case 1: denom = delta[ 0 ] + delta[ 1 ]; break; case 2: denom = delta[ 0 ] + delta[ 1 ] + delta[ 2 ]; break; case 3: denom = delta[ 0 ] + delta[ 1 ] + delta[ 2 ] + delta[ 3 ]; break; case 4: denom = delta[ 0 ] + delta[ 1 ] + delta[ 2 ] + delta[ 3 ] + delta[ 4 ]; break; case 5: denom = delta[ 0 ] + delta[ 1 ] + delta[ 2 ] + delta[ 3 ] + delta[ 4 ] + delta[ 5 ]; break; case 6: denom = delta[ 0 ] + delta[ 1 ] + delta[ 2 ] + delta[ 3 ] + delta[ 4 ] + delta[ 5 ] + delta[ 6 ]; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); break; } break; case TRAPEZOIDAL: default: switch( info->order ) { case 1: denom = delta[ 0 ] + delta[ 1 ]; break; case 2: /* denom = delta[ 0 ] + delta[ 1 ]; */ temp = delta[ 0 ] + delta [ 1 ]; denom = 2.0 * temp * (temp + delta[ 2 ]) / delta[ 0 ]; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); break; } break; } lteCoeff = delta[ 0 ] / denom; return( lteCoeff ); } /* function to integrate a linear DAE */ double integrateLin(double **devStates, TranInfo *info, int qcap ) { double value; double *coeff = info->intCoeff; switch ( info->method ) { case BDF: switch( info->order ) { case 1: value = coeff[1] * devStates[1][qcap]; break; case 2: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap]; break; case 3: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap]; break; case 4: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap]; break; case 5: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap] + coeff[5] * devStates[5][qcap]; break; case 6: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[2][qcap] + coeff[3] * devStates[3][qcap] + coeff[4] * devStates[4][qcap] + coeff[5] * devStates[5][qcap] + coeff[6] * devStates[6][qcap]; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); } break; case TRAPEZOIDAL: default: switch( info->order ) { case 1: value = coeff[1] * devStates[1][qcap]; break; case 2: value = coeff[1] * devStates[1][qcap] + coeff[2] * devStates[1][ccap]; break; default: printf( "\n integration order %d !! STOP \n", info->order ); exit( 0 ); } break; } return( value ); } ngspice-26/src/ciderlib/support/recomb.c0000644000265600020320000000265612264261473017735 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/cidersupt.h" /* * function recomb calculates the recobination rates and the * derivatives with respect to n and p. SRH recombination is * always assumed. Auger recombination is specified by the flag * 'Auger' which by default is false. */ void recomb (double ni, double pi, double tn, double tp, double cn, double cp, double nie, double *pUnet, double *pDuDn, double *pDuDp) { double uSrh, uSrhNum, uSrhDen, perUdenSq, duSrhDn, duSrhDp; double cncp, uAug, duAugDn, duAugDp, uNet, duDn, duDp; uSrhNum = ni * pi - nie * nie; uSrhDen = tp * (ni + nie) + tn * (pi + nie); uSrh = uSrhNum / uSrhDen; perUdenSq = 1.0 / (uSrhDen * uSrhDen); duSrhDn = (pi * uSrhDen - uSrhNum * tp) * perUdenSq; duSrhDp = (ni * uSrhDen - uSrhNum * tn) * perUdenSq; if (Auger && uSrhNum >= 0.0) { /* XXX Auger Global */ cncp = cn * ni + cp * pi; uAug = cncp * uSrhNum; duAugDn = cn * uSrhNum + cncp * pi; duAugDp = cp * uSrhNum + cncp * ni; uNet = uSrh + uAug; duDn = duSrhDn + duAugDn; duDp = duSrhDp + duAugDp; } else { uNet = uSrh; duDn = duSrhDn; duDp = duSrhDp; } /* return uNet duDn duDp */ *pUnet = uNet; *pDuDn = duDn; *pDuDp = duDp; } ngspice-26/src/ciderlib/input/0000755000265600020320000000000012264261713015731 5ustar andreasadminngspice-26/src/ciderlib/input/modlset.c0000644000265600020320000000417412264261473017555 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/modldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int MODLcheck( MODLcard * ); extern int MODLsetup( MODLcard * ); /* * Name: MODLcheck * Purpose: checks a list of MODLcards for input errors, sets defaults * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int MODLcheck(MODLcard *cardList) { MODLcard *card; int cardNum = 0; for ( card = cardList; card != NULL; card = card->MODLnextCard ) { cardNum++; if ( !card->MODLbandGapNarrowingGiven ) { card->MODLbandGapNarrowing = FALSE; } if ( !card->MODLtempDepMobilityGiven ) { card->MODLtempDepMobility = FALSE; } if ( !card->MODLconcDepMobilityGiven ) { card->MODLconcDepMobility = FALSE; } if ( !card->MODLfieldDepMobilityGiven ) { card->MODLfieldDepMobility = FALSE; } if ( !card->MODLtransDepMobilityGiven ) { card->MODLtransDepMobility = FALSE; } if ( !card->MODLsurfaceMobilityGiven ) { card->MODLsurfaceMobility = FALSE; } if ( !card->MODLmatchingMobilityGiven ) { card->MODLmatchingMobility = FALSE; } if ( !card->MODLsrhGiven ) { card->MODLsrh = FALSE; } if ( !card->MODLconcDepLifetimeGiven ) { card->MODLconcDepLifetime = FALSE; } if ( !card->MODLaugerGiven ) { card->MODLauger = FALSE; } if ( !card->MODLavalancheGenGiven ) { card->MODLavalancheGen = FALSE; } } return(OK); } /* * Name: MODLsetup * Purpose: setup the physical models used * Formals: cardList: list of cards to setup * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: MODLcheck */ int MODLsetup(MODLcard *cardList) { int error; /* Check the card list */ if ((error = MODLcheck( cardList )) != 0) return( error ); /* Nothing else to do. */ return( OK ); } ngspice-26/src/ciderlib/input/contact.c0000644000265600020320000000617712264261473017546 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/contdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int CONTnewCard(GENcard**,GENmodel*); extern int CONTparam(int,IFvalue*,GENcard*); IFparm CONTpTable[] = { IP("neutral", CONT_NEUTRAL, IF_FLAG, "Charge neutral"), IP("aluminum", CONT_ALUMINUM, IF_FLAG, "Aluminum contact"), IP("p.polysilicon", CONT_P_POLY, IF_FLAG, "P poly contact"), IP("n.polysilicon", CONT_N_POLY, IF_FLAG, "N poly contact"), IP("workfunction", CONT_WORKFUN, IF_REAL, "Metal work function"), IP("number", CONT_NUMBER, IF_INTEGER, "Electrode ID number") }; IFcardInfo CONTinfo = { "contact", "Properties of a contact to the device", NUMELEMS(CONTpTable), CONTpTable, CONTnewCard, CONTparam, NULL }; int CONTnewCard(GENcard **inCard, GENmodel *inModel) { CONTcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( CONTcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->CONTnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENcontacts; if (!tmpCard) { /* First in list */ model->GENcontacts = newCard; } else { /* Go to end of list */ while (tmpCard->CONTnextCard) tmpCard = tmpCard->CONTnextCard; /* And add new card */ tmpCard->CONTnextCard = newCard; } return(OK); } int CONTparam(int param, IFvalue *value, GENcard *inCard) { CONTcard *card = (CONTcard *)inCard; switch (param) { case CONT_NEUTRAL: if ( value->iValue ) { card->CONTtype = CONT_NEUTRAL; card->CONTtypeGiven = TRUE; } else { if ( card->CONTtype == CONT_NEUTRAL ) { card->CONTtype = -1; card->CONTtypeGiven = FALSE; } } break; case CONT_ALUMINUM: if ( value->iValue ) { card->CONTtype = CONT_ALUMINUM; card->CONTtypeGiven = TRUE; } else { if ( card->CONTtype == CONT_ALUMINUM ) { card->CONTtype = -1; card->CONTtypeGiven = FALSE; } } break; case CONT_P_POLY: if ( value->iValue ) { card->CONTtype = CONT_P_POLY; card->CONTtypeGiven = TRUE; } else { if ( card->CONTtype == CONT_P_POLY ) { card->CONTtype = -1; card->CONTtypeGiven = FALSE; } } break; case CONT_N_POLY: if ( value->iValue ) { card->CONTtype = CONT_N_POLY; card->CONTtypeGiven = TRUE; } else { if ( card->CONTtype == CONT_N_POLY ) { card->CONTtype = -1; card->CONTtypeGiven = FALSE; } } break; case CONT_WORKFUN: card->CONTtype = CONT_WORKFUN; card->CONTtypeGiven = TRUE; card->CONTworkfun = value->rValue; card->CONTworkfunGiven = TRUE; break; case CONT_NUMBER: card->CONTnumber = value->iValue; card->CONTnumberGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/mesh.c0000644000265600020320000000715312264261473017042 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/meshdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int XMSHnewCard(GENcard**,GENmodel*); extern int YMSHnewCard(GENcard**,GENmodel*); extern int MESHparam(int,IFvalue*,GENcard*); IFparm MESHpTable[] = { IP("location",MESH_LOCATION, IF_REAL, "Meshline location"), IP("width", MESH_WIDTH, IF_REAL, "Distance to next line"), IP("number", MESH_NUMBER, IF_INTEGER, "Meshline number"), IP("node", MESH_NUMBER, IF_INTEGER, "Meshline number"), IP("ratio", MESH_RATIO, IF_REAL, "Suggested spacing ratio"), IP("h.start", MESH_H_START, IF_REAL, "Spacing at start of interval"), IP("h1", MESH_H_START, IF_REAL, "Spacing at start of interVal"), IP("h.end", MESH_H_END, IF_REAL, "Spacing at end of interval"), IP("h2", MESH_H_END, IF_REAL, "Spacing at end of interval"), IP("h.max", MESH_H_MAX, IF_REAL, "Max spacing during interval"), IP("h3", MESH_H_MAX, IF_REAL, "Max spacing during interval") }; IFcardInfo XMSHinfo = { "x.mesh", "Location of mesh lines", NUMELEMS(MESHpTable), MESHpTable, XMSHnewCard, MESHparam, NULL }; IFcardInfo YMSHinfo = { "y.mesh", "Location of mesh lines", NUMELEMS(MESHpTable), MESHpTable, YMSHnewCard, MESHparam, NULL }; int XMSHnewCard(GENcard **inCard, GENmodel *inModel) { MESHcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( MESHcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->MESHnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENxMeshes; if (!tmpCard) { /* First in list */ model->GENxMeshes = newCard; } else { /* Go to end of list */ while (tmpCard->MESHnextCard) tmpCard = tmpCard->MESHnextCard; /* And add new card */ tmpCard->MESHnextCard = newCard; } return(OK); } int YMSHnewCard(GENcard **inCard, GENmodel *inModel) { MESHcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( MESHcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->MESHnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENyMeshes; if (!tmpCard) { /* First in list */ model->GENyMeshes = newCard; } else { /* Go to end of list */ while (tmpCard->MESHnextCard) tmpCard = tmpCard->MESHnextCard; /* And add new card */ tmpCard->MESHnextCard = newCard; } return(OK); } int MESHparam(int param, IFvalue *value, GENcard *inCard) { MESHcard *card = (MESHcard *)inCard; switch (param) { case MESH_LOCATION: card->MESHlocation = value->rValue; card->MESHlocationGiven = TRUE; break; case MESH_WIDTH: card->MESHwidth = value->rValue; card->MESHwidthGiven = TRUE; break; case MESH_H_START: card->MESHhStart = value->rValue; card->MESHhStartGiven = TRUE; break; case MESH_H_END: card->MESHhEnd = value->rValue; card->MESHhEndGiven = TRUE; break; case MESH_H_MAX: card->MESHhMax = value->rValue; card->MESHhMaxGiven = TRUE; break; case MESH_RATIO: card->MESHratio = value->rValue; card->MESHratioGiven = TRUE; break; case MESH_NUMBER: card->MESHnumber = value->iValue; card->MESHnumberGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/readme0000644000265600020320000000041512264261473017114 0ustar andreasadminDirectory: input ---------------- The files in this directory serve two purposes: 1. Serve as collection point for numerical model parameters. 2. Translate data structures containing raw input into a form usable by the one- and two-dimensional device simulators. ngspice-26/src/ciderlib/input/meshset.c0000644000265600020320000010544612264261473017562 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ /********** Mesh Setup & Query Routines. **********/ /* Imports */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/meshdefs.h" #include "ngspice/meshext.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Local Constants */ #define CMP_TOL 1.0e-9 /* Tolerance on (double) comparisons */ #define RAT_TOL 1.0e-6 /* Error allowed in ratio calc's */ #define RAT_LIM 50 /* Maximum number of ratio iterations */ #define UM_TO_CM 1.0e-4 /* Micron to centimeter conversion */ /* Forward Declarations */ static int oneSideSpacing( double, double, double, double *, int * ); static int twoSideSpacing( double, double, double, double, double *, double *, int *, int * ); static int maxLimSpacing( double, double, double, double, double *, int *, int * ); static int oneSideRatio( double, double, double *, int ); static int twoSideRatio( double, double, double, double *, int, int ); static int MESHspacing( MESHcard *, double *, double *, int *, int *, int * ); /* END OF HEADER */ /* * Name: MESHmkArray * Purpose: Turn a coordinate list into a coordinate array. * Formals: < I > coordList: a sorted list of all the coordinates * < I > numCoords: the length of the listi, if 0 find it * Returns: a (double) array of those coordinates, with length in a[0] * Users: routines used to create the final mesh * Calls: (none) */ double * MESHmkArray(MESHcoord *coordList, int numCoords) { double *array = NULL; MESHcoord *coord; if ( numCoords <= 0 ) { numCoords = 0; for ( coord = coordList; coord != NULL; coord = coord->next ) { numCoords++; } } if ( numCoords != 0 ) { XALLOC( array, double, 1 + numCoords ); numCoords = 0; array[ 0 ] = (double) numCoords; numCoords = 1; for ( coord = coordList; coord != NULL; coord = coord->next ) { array[ numCoords++ ] = coord->location; } return array; } else { return NULL; } /* NOTREACHED */ } /* * Name: MESHiBounds * Purpose: Find the minimum and maximum indices in a mesh list. * Formals: < I > coordList: a sorted list of all the coordinates * < O > ixMin: the minimum index * < O > ixMax: the maximum index * Returns: (none) * Users: routines wanting to fine the ends of a mesh * Calls: (none) */ void MESHiBounds(MESHcoord *coordList, int *ixMin, int *ixMax) { MESHcoord *last; if (coordList) { *ixMin = coordList->number; for ( last = coordList; last->next != NULL; last = last->next ) ; *ixMax = last->number; } else { *ixMin = *ixMax = -1; } } /* * Name: MESHlBounds * Purpose: Find the minimum and maximum locations in a mesh list. * Formals: < I > coordList: a sorted list of all the coordinates * < O > lcMin: the minimum location * < O > lcMax: the maximum location * Returns: (none) * Users: routines wanting to find the ends of a mesh * Calls: (none) */ void MESHlBounds(MESHcoord *coordList, double *lcMin, double *lcMax) { MESHcoord *last; if (coordList) { *lcMin = coordList->location; for ( last = coordList; last->next != NULL; last = last->next ) ; *lcMax = last->location; } else { *lcMin = *lcMax = 0.0; } } /* * Name: MESHlocate * Purpose: Finds the index of the MESHcoord nearest to a location. * Formals: < I > coordList: a sorted list of all available coordinates * < I > location: the location to find * Returns: index / -1 (list empty) * Users: routines that convert distances to indices * Calls: (none) */ int MESHlocate(MESHcoord *coordList, double location) { MESHcoord *coord, *prevCoord = NULL; int index; /* Find the coordinates which flank the location. */ for ( coord = coordList; coord != NULL; coord = coord->next ) { if ( coord->location > location ) break; prevCoord = coord; } /* Get the index. */ if (prevCoord && coord) { if ( location <= (prevCoord->location + coord->location) / 2.0 ) { index = prevCoord->number; } else { index = coord->number; } } else if ( coord ) { index = coord->number; } else if ( prevCoord ) { index = prevCoord->number; } else { index = -1; } return( index ); } /* * Name: MESHcheck * Purpose: Checks a list of mesh cards for input errors. * Formals: cardList: pointer to head of linked list of MESHcard's * < I > dim: 'x', 'y' or 'z' dimension * Returns: OK / E_PRIVATE * Users: setup routines * Calls: error-message handler */ int MESHcheck(char dim, MESHcard *cardList) { MESHcard *card; int cardNum = 0; double locStart = 0.0, locEnd; double ratio; int error = OK; char errBuf[512]; if ( cardList == NULL ) { sprintf( errBuf, "%c.mesh card list is empty", dim ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); locEnd = locStart; return( E_PRIVATE ); } for ( card = cardList; card != NULL; card = card->MESHnextCard ) { cardNum++; /* Am I trying to find number of nodes directly & indirectly? */ if (card->MESHnumberGiven && card->MESHratioGiven) { sprintf( errBuf, "%c.mesh card %d uses both number and ratio - number ignored", dim, cardNum ); SPfrontEnd->IFerror( ERR_INFO, errBuf, NULL ); card->MESHnumberGiven = FALSE; } /* Will I be able to locate endpoints? */ if (!card->MESHlocationGiven && !card->MESHwidthGiven) { sprintf( errBuf, "%c.mesh card %d has no distances", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); locEnd = locStart; error = E_PRIVATE; } else if (card->MESHlocationGiven && card->MESHwidthGiven) { sprintf( errBuf, "%c.mesh card %d uses both location and width - location ignored", dim, cardNum ); SPfrontEnd->IFerror( ERR_INFO, errBuf, NULL ); card->MESHlocationGiven = FALSE; locEnd = locStart + card->MESHwidth; } else if (card->MESHlocationGiven) { locEnd = card->MESHlocation; if (cardNum == 1) locStart = locEnd; } else { locEnd = locStart + card->MESHwidth; } /* Are the endpoints in the wrong order? */ if ( locEnd - locStart < - CMP_TOL ) { sprintf( errBuf, "%c.mesh card %d uses negative width", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } /* Are the endpoints too close together? */ else if ( (locEnd - locStart <= CMP_TOL) ) { if ( !(cardNum == 1 && locStart == locEnd) ) { sprintf( errBuf, "%c.mesh card %d has negligible width - ignored", dim, cardNum ); SPfrontEnd->IFerror( ERR_INFO, errBuf, NULL ); locStart = locEnd; } } /* Is the ratio out of the acceptable range? */ if (card->MESHratioGiven) { ratio = card->MESHratio; } else { ratio = 1.0; } if ((ratio < 1.0) || (ratio > 10.0)) { sprintf( errBuf, "%c.mesh card %d has ratio out of range - reset to 1.0", dim, cardNum ); SPfrontEnd->IFerror( ERR_INFO, errBuf, NULL ); ratio = 1.0; } /* Check sizes of h.start, h.end and h.max. */ if ((card->MESHhStartGiven && (card->MESHhStart <= 0.0)) || (card->MESHhEndGiven && (card->MESHhEnd <= 0.0)) || (card->MESHhMaxGiven && (card->MESHhMax <= 0.0))) { sprintf( errBuf, "%c.mesh card %d wants to use a non-positive spacing", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } /* Is the max spacing being used improperly? */ if (card->MESHhMaxGiven && ( ( card->MESHhStartGiven && card->MESHhEndGiven) || (!card->MESHhStartGiven && !card->MESHhEndGiven))) { sprintf( errBuf, "%c.mesh card %d needs to use one of h.start or h.end with h.max", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } else if (card->MESHhMaxGiven && card->MESHhStartGiven) { if (card->MESHhStart > card->MESHhMax) { sprintf( errBuf, "%c.mesh card %d wants h.start > h.max", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } else { card->MESHhEnd = card->MESHhMax; } } else if (card->MESHhMaxGiven && card->MESHhEndGiven) { if (card->MESHhEnd > card->MESHhMax) { sprintf( errBuf, "%c.mesh card %d wants h.end > h.max", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } else { card->MESHhStart = card->MESHhMax; } } /* Return now if anything has failed. */ if (error) return(error); /* Note: at this point we still aren't sure whether node numbers are OK. */ /* Fill-in newly computed information. */ card->MESHlocStart = locStart; card->MESHlocEnd = locEnd; card->MESHratio = ratio; /* Advance current location. */ locStart = locEnd; } return(OK); } /* * Name: geomSum * Purpose: Computes the sum of n terms of a geometric series. * Formals: < I > r: ratio of one term to the next * < I > n: number of terms to sum * Returns: sum / 0.0 * Users: spacing routines * Calls: pow */ static double geomSum(double r, double n) { double sum; if ((r < 0.0) || (n <= 0.0)) { sum = 0.0; } else if (r == 0.0) { sum = 1.0; } else { if (ABS(r - 1.0) < 1.0e-4) { sum = n * (1.0 + (n - 1.0)*(r - 1.0)/2.0); } else { sum = (1.0 - pow(r,n))/(1.0 - r); } } return( sum ); } /* * Name: addCoord * Purpose: add a new coordinate to the tail of a linked list * Formals: head: head of linked list * tail: tail of linked list * < I > number: node number of coordinate * < I > location: location of coordinate * Returns: OK / E_NOMEM * Users: MESHsetup * Calls: memory allocator */ static int addCoord(MESHcoord **head, MESHcoord **tail, int number, double location) { MESHcoord *newCoord; if (*head == NULL) { RALLOC( *tail, MESHcoord, 1 ); newCoord = *head = *tail; } else { RALLOC( (*tail)->next, MESHcoord, 1 ); newCoord = *tail = (*tail)->next; } newCoord->next = NULL; newCoord->number = number; newCoord->location = location * UM_TO_CM; return(OK); } /* * Name: MESHsetup * Purpose: Converts a list of input MESHcard's to a list of MESHcoord's. * Expansion is performed so that node numbers in the final list * increase by one from coordinate to coordinate. The list * will grow until the input ends or a bad card is found. * Formals: < I > dim: 'x', 'y', or 'z' dimension * cardList: the list of input cards * < O > coordList: the final list of coordinates * < O > numCoords: the number of coords in coordList * Returns: OK / E_PRIVATE * Users: numerical device setup routines * Calls: MESHcheck, MESHspacing, error-message handler */ int MESHsetup(char dim, MESHcard *cardList, MESHcoord **coordList, int *numCoords) { MESHcard *card; MESHcoord *endCoord; int cardNum = 0; int i, totCoords, numStart=1, numEnd = 0, nspStart, nspEnd, nspMax, nspLeft; double locStart, locEnd = 0.0, location, space; double hStart, hEnd, hMax, hBig; double ratStart, ratEnd; int error = OK; char errBuf[512]; /* Initialize list of coordinates. */ *coordList = endCoord = NULL; *numCoords = totCoords = 0; /* Check the card list. */ if ((error = MESHcheck( dim, cardList )) != 0) return( error ); /* Print info header. */ #ifdef NOTDEF fprintf( stdout, " %c.Mesh Card Information\n", toupper(dim) ); fprintf( stdout, "-------------------------\n" ); fprintf( stdout, " %3s %3s %3s %9s %9s %9s %9s %9s %9s\n", "n.s", "n.m", "n.e", "l.e", "h.s", "h.e", "h.m", "r.s", "r.e" ); #endif for ( card = cardList; card != NULL; card = card->MESHnextCard ) { cardNum++; locStart = card->MESHlocStart; locEnd = card->MESHlocEnd; if (locEnd == locStart) { /* This card has no width. */ /* First update the node number. */ if (card->MESHnumberGiven) { if (card->MESHlocationGiven) { /* Absolute node number given */ numEnd = card->MESHnumber; if (cardNum == 1) numStart = numEnd; } else { /* Number of spaces instead */ numEnd = numStart + card->MESHnumber; } } /* Are node numbers in the wrong order? */ if ( numEnd < numStart ) { sprintf( errBuf, "%c.mesh card %d has out-of-order node numbers ( %d > %d )", dim, cardNum, numStart, numEnd ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } } else { /* This card has some width. */ /* First update the node number. */ if (card->MESHnumberGiven) { /* Uniform mesh */ if (card->MESHlocationGiven) { /* Absolute node number given */ numEnd = card->MESHnumber; if (cardNum == 1) numStart = numEnd; nspStart = numEnd - numStart; } else { /* Number of spaces instead */ nspStart = card->MESHnumber; numEnd = numStart + nspStart; } ratStart = 1.0; ratEnd = 0.0; nspEnd = 0; nspMax = 0; if ( nspStart > 0 ) { card->MESHhStart = (locEnd - locStart) / (double)nspStart; card->MESHhEnd = 0.0; } } else { /* Nonuniform mesh */ error = MESHspacing( card, &ratStart, &ratEnd, &nspStart, &nspMax, &nspEnd ); if (error) { sprintf( errBuf, "%c.mesh card %d can't be spaced automatically", dim, cardNum ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); return( error ); } else { numEnd = numStart + nspStart + nspMax + nspEnd; } } /* Are the node numbers properly ordered? */ if ( numEnd <= numStart ) { sprintf( errBuf, "%c.mesh card %d results in out-of-order node numbers ( %d > %d )", dim, cardNum, numStart, numEnd ); SPfrontEnd->IFerror( ERR_FATAL, errBuf, NULL ); error = E_PRIVATE; } else { /* Create the new MESHcoord's. */ hStart = card->MESHhStart; hEnd = card->MESHhEnd; hMax = card->MESHhMax; hBig = 0.0; /* Generate the first coord in this section */ location = locStart; error = addCoord( coordList, &endCoord, ++totCoords, location ); if (error) return(error); /* Generate new coords for the starting section. */ nspLeft = nspStart + nspMax + nspEnd; if ( nspStart != 0 ) { hBig = MAX( hBig, hStart*pow( ratStart, (double) (nspStart - 1) ) ); space = hStart; for ( i = 0; (i < nspStart)&&(nspLeft > 1); i++, nspLeft-- ) { location += space; space *= ratStart; error = addCoord( coordList, &endCoord, ++totCoords, location ); if (error) return(error); } } /* Generate new coords for the maximum section. */ if ( nspMax != 0 ) { hBig = MAX( hBig, hMax ); space = hMax; for ( i = 0; (i < nspMax)&&(nspLeft > 1); i++, nspLeft-- ) { location += space; error = addCoord( coordList, &endCoord, ++totCoords, location ); if (error) return(error); } } /* Generate new coords for the ending section. */ if ( nspEnd != 0 ) { hBig = MAX( hBig, hEnd*pow( ratEnd, (double) (nspEnd - 1) ) ); space = hEnd * pow( ratEnd, (double) (nspEnd - 1) ); for ( i = 0; (i < nspEnd)&&(nspLeft > 1); i++, nspLeft-- ) { location += space; space /= ratEnd; error = addCoord( coordList, &endCoord, ++totCoords, location ); if (error) return(error); } } #ifdef NOTDEF fprintf( stdout, " %9.5f\n", locStart ); fprintf( stdout, " %3d %3d %3d %9.5f %9.5f %9.5f %9.5f %9.5f\n", nspStart, nspMax, nspEnd, hStart, hEnd, hBig, ratStart, ratEnd ); #endif } } /* Return now if anything has failed. */ if (error) return(error); /* Advance the node number. */ numStart = numEnd; } /* * If the mesh is not empty, then the loop above has exited before * adding the final coord to the list. So we need to do that now. */ if (*coordList != NULL) { error = addCoord( coordList, &endCoord, ++totCoords, locEnd ); if (error) return(error); #ifdef NOTDEF fprintf( stdout, " %9.5f\n", locEnd ); #endif } #ifdef NOTDEF fprintf( stdout, "\n" ); #endif *numCoords = totCoords; return(OK); } /* * Name: MESHspacing * Purpose: Find ratios, spacings, and node numbers for a mesh span. * Formals: < I > card: the input card for this span * < O > rS: ratio found for spacings at start of span * < O > rE: ratio found for spacings at end of span * < O > nS: number of start spaces * < O > nM: number of max spaces * < O > nE: number of end spaces * Returns: OK / E_PRIVATE * Users: MESHsetup * Calls: oneSideSpacing, twoSideSpacing, maxLimSpacing */ static int MESHspacing(MESHcard *card, double *rS, double *rE, int *nS, int *nM, int *nE) { int error = OK; int hStartGiven = card->MESHhStartGiven; int hEndGiven = card->MESHhEndGiven; int hMaxGiven = card->MESHhMaxGiven; double hS = card->MESHhStart; double hE = card->MESHhEnd; double hM = card->MESHhMax; double rW = card->MESHratio; /* The ratio wanted */ double width; width = card->MESHlocEnd - card->MESHlocStart; /* Call subsidiary routine depending on how flags are set. */ if (!hStartGiven && hEndGiven && !hMaxGiven ) { /* End section only */ error = oneSideSpacing( width, hE, rW, rE, nE ); *nM = *nS = 0; *rS = 0.0; } else if ( hStartGiven && !hEndGiven && !hMaxGiven ) { /* Start section only */ error = oneSideSpacing( width, hS, rW, rS, nS ); *nM = *nE = 0; *rE = 0.0; } else if ( hStartGiven && hEndGiven && !hMaxGiven ) { /* Both a start and an end section */ error = twoSideSpacing( width, hS, hE, rW, rS, rE, nS, nE ); *nM = 0; } else if ( hStartGiven && !hEndGiven && hMaxGiven ) { /* Limited size in end section */ error = maxLimSpacing( width, hS, hM, rW, rS, nS, nM ); *nE = 0; *rE = 1.0; } else if (!hStartGiven && hEndGiven && hMaxGiven ) { /* Limited size in start section */ error = maxLimSpacing( width, hE, hM, rW, rE, nE, nM ); *nS = 0; *rS = 1.0; } else if ( hStartGiven && hEndGiven && hMaxGiven ) { /* Limited size somewhere in the middle */ /* NOT IMPLEMENTED */ /* error = midLimSpacing( width, hS, hE, hM, rW, rS, rE, nS, nE, nM ); */ error = E_PRIVATE; } else { /* Illegal situations */ error = E_PRIVATE; } return( error ); } /* * Name: stepsInSpan * Purpose: Finds the number of steps needed to go a given distance * while increasing each step by a given ratio. * Formals: < I > width: size of total distance * < I > spacing: size of initial step * < O > ratio: increase with each step * Returns: number of steps * Users: spacing routines * Calls: log */ static double stepsInSpan(double width, double spacing, double ratio) { double nSpaces; /* Handle ratios near 1.0 specially. */ if ( ABS(ratio - 1.0) < 1.0e-4 ) { nSpaces = (width/spacing); } else { nSpaces = (log(1.0-width*(1.0-ratio)/spacing)/log(ratio)); } return(nSpaces); } /* * Name: oneSideSpacing * Purpose: Find compatible number of spaces and ratio when the spacing * is constrained at one end of a span. * Formals: < I > width: width of the span * < I > spacing: spacing constraint * < I > rWanted: ideal ratio of one spacing to the next * < O > rFound: actual ratio discovered * < O > nFound: number of spaces found * Returns: OK / E_PRIVATE * Users: MESHspacing * Calls: oneSideRatio, stepsInSpan */ static int oneSideSpacing(double width, double spacing, double rWanted, double *rFound, int *nFound) { int nSpaces; /* Number of spaces */ double rTemp1, rTemp2; /* For temporarily calc'ed ratios */ char errBuf[80]; /* Make sure we can take at least one step. */ if ( width < spacing ) { sprintf( errBuf, "one-sided spacing can't find an acceptable solution\n"); SPfrontEnd->IFerror( ERR_WARNING, errBuf, NULL ); *rFound = 0.0; *nFound = 0; return(E_PRIVATE); } nSpaces = (int)stepsInSpan( width, spacing, rWanted ); /* Check to see whether a flat span is acceptable. */ if ( ABS(nSpaces*spacing - width) < 1.0e-3*spacing ) { *rFound = 1.0; *nFound = nSpaces; return( OK ); } else if ( ABS((nSpaces+1)*spacing - width) < 1.0e-3*spacing ) { *rFound = 1.0; *nFound = nSpaces + 1; return( OK ); } /* Too much error involved in flat span means we have to ramp up. */ rTemp1 = rTemp2 = rWanted; oneSideRatio( width, spacing, &rTemp1, nSpaces ); oneSideRatio( width, spacing, &rTemp2, nSpaces+1 ); if ( (rTemp1 == 0.0) && (rTemp2 == 0.0) ) { sprintf( errBuf, "one-sided spacing can't find an acceptable solution\n"); SPfrontEnd->IFerror( ERR_WARNING, errBuf, NULL ); *rFound = 0.0; *nFound = 0; return(E_PRIVATE); } else if (rTemp1 == 0.0) { *rFound = rTemp2; *nFound = nSpaces + 1; } else if (rTemp2 == 0.0) { *rFound = rTemp1; *nFound = nSpaces; } else if (ABS(rWanted-rTemp2) < 4.0*ABS(rWanted-rTemp1)) { *rFound = rTemp2; *nFound = nSpaces + 1; } else { *rFound = rTemp1; *nFound = nSpaces; } return(OK); } /* * Name: oneSideRatio * Purpose: Compute the unique ratio 'r' which satisfies the following * constraint: w = hs*(1-r^ns)/(1-r) * Formals: < I > w : width of a span * < I > hs: step at one end of the span * argRatio: ratio found, contains initial guess at entry * < I > ns: number of spaces to use in the span * Returns: OK / E_PRIVATE * Users: oneSideSpacing, maxLimSpacing * Calls: error-message handler */ static int oneSideRatio(double w, double hs, double *argRatio, int ns) { double funcLow, funcUpp, func; double ratLow, ratUpp, ratio = *argRatio; double dns = (double)ns; int i; /* Get lower bound on solution. */ ratLow = 0.0; funcLow = hs - w; if ((funcLow > 0.0) || ((funcLow < 0.0)&&(ns <= 1))) { *argRatio = 0.0; return(E_PRIVATE); } /* Find upper bound on solution. */ ratUpp = ratio; do { ratUpp += 0.2; funcUpp = hs*geomSum(ratUpp, dns) - w; } while (funcUpp < 0.0); /* Do bisections to find new ratio. */ for ( i=0; i < RAT_LIM; i++ ) { ratio = ratLow + 0.5 * (ratUpp - ratLow); func = hs*geomSum(ratio, dns) - w; if ((func == 0.0) || (ratUpp - ratLow < RAT_TOL)) break; funcLow = hs*geomSum(ratLow, dns) - w; if (funcLow*func > 0.0) { ratLow = ratio; } else { ratUpp = ratio; } } if (i == RAT_LIM) { /* No solution found */ *argRatio = 0.0; return(E_PRIVATE); } else { *argRatio = ratio; return(OK); } } /* Name: quadRoots * Purpose: Find real roots of a quadratic equation if they exist. * Formals: < I > a, b, c: coefficients in ax^2+bx+c * < O > rp: the root using the positive sqrt value * < O > rn: the root using the negative sqrt value * Returns: TRUE / FALSE * Users: general * Calls: sqrt */ static int quadRoots(double a, double b, double c, double *rp, double *rn) { double d; /* Discriminant */ double f; /* Root factor */ if (a == 0.0) return(FALSE); if (b == 0.0) { d = -c/a; if (d >= 0.0) { *rn = - (*rp = sqrt(d)); } else { return(FALSE); } } else { d = 1.0 - 4*a*c/(b*b); if (d >= 0.0) { f = (1.0 + sqrt(d))/2.0; *rp = - (b*f)/a; *rn = - c/(b*f); } else { return(FALSE); } } return(TRUE); } /* * Name: twoSideSpacing * Purpose: Find a compatible set of ratios and node numbers when the * spacing is constrained at both ends of a span. * Formals: < I > width: size the span * < I > hStart: spacing at start of span * < I > hEnd: spacing at end of span * < I > rWanted: desired ratio of spacings * < O > rSfound: ratio found for start of span * < O > rEfound: ratio found for end of span * < O > nSfound: number of start spaces * < O > nEfound: number of end spaces * Returns: OK / E_PRIVATE * Users: MESHspacing * Calls: twoSideRatio, error-message handler */ static int twoSideSpacing(double width, double hStart, double hEnd, double rWanted, double *rSfound, double *rEfound, int *nSfound, int *nEfound) { int nSpaceS; /* Number of spaces at the start */ int nSpaceE; /* Number of spaces at the end */ int nSpaceT; /* Number of spaces total */ double dSpaceS; /* Exact value of nSpaceS */ double dSpaceE; /* Exact value of nSpaceE */ double dSpaceT; /* Exact value of nSpaceT */ double dDiff; /* Difference between dSpaceS & dSpaceE */ double remaining; /* Length of span between hs and he */ double rTempS, rTempE; /* For temporarily calc'ed ratios */ double hsLast, heLast; /* Used to ensure ratio is valid */ double rConnect; /* " */ double hMax, hMin; /* Max and min between hStart and hEnd */ double tmp; int i; /* Indices for searching for best ratio */ int solnFound; /* For partial search termination */ int solnError; /* For partial search termination */ int nSaveS = 0; /* Saves best solution so far */ int nSaveE = 0; /* " */ double rSaveS = 0.0; /* " */ double rSaveE = 0.0; /* " */ char errBuf[80]; /* * It's an error if there isn't enough width to fit in both spaces. */ remaining = width - (hStart + hEnd); if (remaining < 0.0) { sprintf( errBuf, "two-sided spacing can't find an acceptable solution\n"); SPfrontEnd->IFerror( ERR_WARNING, errBuf, NULL ); *rSfound = *rEfound = 0.0; *nSfound = *nEfound = 0; return(E_PRIVATE); } /* Adjust ratio wanted to acceptable limits, and find number of extra spaces * needed to bring the smaller ratio up to the size of the bigger one. */ hMax = MAX( hStart, hEnd ); hMin = MIN( hStart, hEnd ); if ( hMax == hMin ) { dDiff = 0.0; } else { /* Does a solution exist if we allow the number of spaces to take on * a non-integral value? * If not, then adjust the ratio to lie within acceptable bounds. * Since the choice of whether or not to require a peak in the plot * of "spacing vs number" is arbitrary, both cases are checked, and * the one that gives the closest answer to the original ratio * is chosen. The function quadRoots is used to find limits for the * ratio in the peaked case. The unpeaked case can find a lower * bound more easily. */ if (quadRoots( hMax, hMax - width, remaining, &rTempS, &rTempE )) { rWanted = MIN(rWanted, rTempS); rTempS = 1.0 + (hMax - hMin)/(width - hMax); rWanted = MAX(rWanted, rTempS); if ((rWanted != rTempS) && (rTempE > rWanted)) { if (ABS(rWanted - rTempE) < 4.0*ABS(rWanted - rTempS)) { rWanted = rTempE; } else { rWanted = rTempS; } } } else { /* Complex roots */ rTempS = 1.0 + (hMax - hMin)/(width - hMax); rWanted = MAX(rWanted, rTempS); } dDiff = log(hMax/hMin)/log(rWanted); dDiff *= ( hStart < hEnd ) ? -1.0 : 1.0; } /* Find the number of spaces at the start and at the end. */ /* Handle ratio near 1.0 carefully. */ if ( ABS(rWanted - 1.0) < 1.0e-4 ) { dSpaceS = (width - dDiff*hEnd)/(hStart+hEnd); } else { tmp = (hStart+hEnd-width+width*rWanted)/ (hStart+hEnd*pow(rWanted,dDiff)); dSpaceS = log(tmp)/log(rWanted); } dSpaceE = dSpaceS + dDiff; dSpaceT = dSpaceS + dSpaceE; /* Search until an acceptable solution is found. Some * cases may be repeated, but no harm is done. */ for (i = 0; i <= 1; i++) { nSpaceT = (int)dSpaceT + i; /* Guess a starting point which is guaranteed to have a solution. */ nSpaceS = MIN( nSpaceT - 1, MAX( 4, (int) dSpaceS) ); nSpaceE = nSpaceT - nSpaceS; solnFound = solnError = FALSE; while ( !solnFound ) { /* Take care of special cases first. */ if ((nSpaceE <= 0) || (nSpaceS <= 0)) { solnError = TRUE; } else if (nSpaceT == 2) { /* Check for exact fit */ if (ABS(remaining) < 1.0e-3*hMax ) { rTempS = hEnd / hStart; rTempE = 1.0 / rTempS; nSpaceS = nSpaceE = 1; } else { solnError = TRUE; } } else if (nSpaceT == 3) { /* Trivial to solve */ if (remaining > 0.0) { rTempS = remaining / hStart; rTempE = remaining / hEnd; nSpaceS = 2; /* Always put middle space at start */ nSpaceE = 1; } else { solnError = TRUE; } } else { /* Finally, the general case */ if (remaining > 0.0) { rTempS = rWanted; twoSideRatio( width, hStart, hEnd, &rTempS, nSpaceS, nSpaceE ); rTempE = rTempS; } else { solnError = TRUE; } } if ( solnError ) break; /* while loop */ /* Check whether the ratio discovered is good or not. */ hsLast = hStart*pow(rTempS, (double)nSpaceS-1.0); heLast = hEnd*pow(rTempE, (double)nSpaceE-1.0); rConnect = heLast/hsLast; if ( rConnect < 1.0/rTempE - RAT_TOL ) { nSpaceS--; nSpaceE++; } else if ( rConnect > rTempS + RAT_TOL ) { nSpaceS++; nSpaceE--; } else { solnFound = TRUE; /* Save if this solution is better than the previous one. */ if (ABS(rWanted - rTempS) <= ABS(rWanted - rSaveS)) { rSaveS = rTempS; rSaveE = rTempE; nSaveS = nSpaceS; nSaveE = nSpaceE; } } } } /* Prepare return values. */ if (rSaveS == 0.0) { sprintf( errBuf, "two-sided spacing can't find an acceptable solution\n"); SPfrontEnd->IFerror( ERR_WARNING, errBuf, NULL ); *rSfound = *rEfound = 0.0; *nSfound = *nEfound = 0; return(E_PRIVATE); } else { *rSfound = rSaveS; *rEfound = rSaveE; *nSfound = nSaveS; *nEfound = nSaveE; return(OK); } } /* * Name: twoSideRatio * Purpose: Finds the unique ratio 'r' which satisfies the * constraint: * w = hs*(1-r^ns)/(1-r) + he*(1-r^ne)/(1-r) * Formals: < I > w: size of a span * < I > hs: spacing at start of span * < I > he: spacing at end of span * argRatio: returns r, contains initial guess for r * < I > ns: number of steps to take at start * < I > ne: number of steps to take at end * Returns: OK / E_PRIVATE * Users: twoSideSpacing * Calls: error-message handler */ static int twoSideRatio(double w, double hs, double he, double *argRatio, int ns, int ne) { double funcLow, funcUpp, func; double ratLow, ratUpp, ratio = *argRatio; double dns = (double)ns; double dne = (double)ne; int i; /* Get lower bound on solution. */ ratLow = 0.0; funcLow = hs + he - w; if ((funcLow > 0.0) || ((funcLow < 0.0) && (MAX(ns,ne) <= 1))) { *argRatio = 0.0; return(E_PRIVATE); } /* Find upper bound on solution. */ ratUpp = ratio; do { ratUpp += 0.2; funcUpp = hs*geomSum(ratUpp, dns) + he*geomSum(ratUpp, dne) - w; } while (funcUpp < 0.0); /* Do bisections to find new ratio. */ for ( i=0; i < RAT_LIM; i++ ) { ratio = ratLow + 0.5 * (ratUpp - ratLow); func = hs*geomSum(ratio, dns) + he*geomSum(ratio, dne) - w; if ((func == 0.0) || (ratUpp - ratLow < RAT_TOL)) break; funcLow = hs*geomSum(ratLow, dns) + he*geomSum(ratLow, dne) - w; if (funcLow*func > 0.0) { ratLow = ratio; } else { ratUpp = ratio; } } if (i == RAT_LIM) { /* No solution found */ *argRatio = 0.0; return(E_PRIVATE); } else { *argRatio = ratio; return(OK); } } /* * Name: maxLimSpacing * Purpose: Find compatible number of spaces and ratio when the spacing * is constrained at start of a span, and has to be smaller * than a user-specified maximum at the end. * Formals: < I > width: width of the span * < I > hStart: spacing constraint at one end * < I > hMax: maximum spacing allowable * < I > rWanted: ideal ratio of one spacing to the next * < O > rFound: actual ratio discovered * < O > nSfound: number of start spaces * < O > nMfound: number of maximum spaces * Returns: OK / E_PRIVATE * Users: MESHspacing * Calls: oneSideRatio, stepsInSpan */ static int maxLimSpacing(double width, double hStart, double hMax, double rWanted, double *rFound, int *nSfound, int *nMfound) { int nSpaceS; /* Number of spaces at the start */ int nSpaceM; /* Number of spaces with maximum size */ int nSpaceT; /* Total number of spaces */ double dSpaceS; /* Exact number of start spaces needed */ double dSpaceM; /* Exact number of max spaces needed */ double dSpaceT; /* Exact total number of spaces */ double rTempS; /* For temporarily calc'ed ratio */ double remaining; /* Width taken up by start spaces */ double rConnect, hBiggest = 0.0; /* Used to ensure ratio is valid */ double rSaveS = 0.0; /* Saves best solution so far */ int nSaveS = 0; /* " */ int nSaveM = 0; /* " */ int i; /* Searching indices */ int solnFound; /* For partial search termination */ int solnError; /* For partial search termination */ char errBuf[80]; /* Compute the ratio needed to exactly go from hStart to hMax * in the given width. If hMax is really big, then we know * the spaces can't exceed it. */ if ( width > hMax ) { rTempS = 1.0 + (hMax - hStart)/(width - hMax); } else { rTempS = 1.0e6; /* an impossibly large value */ } if (rWanted <= rTempS) { /* Spacings stay below maximum allowed */ dSpaceS = stepsInSpan( width, hStart, rWanted ); dSpaceM = 0.0; } else { /* Find number of spaces needed to increase hStart to hMax. */ dSpaceS = log(hMax/hStart)/log(rWanted); remaining = hStart*geomSum(rWanted, dSpaceS); dSpaceM = (width - remaining)/hMax; } dSpaceT = dSpaceS + dSpaceM; /* Search until an acceptable solution is found. Some * cases may be repeated, but no harm is done. */ for (i = 0; i <= 1; i++) { nSpaceT = (int)dSpaceT + i; /* Guess a starting point which is guaranteed to have a solution. */ nSpaceS = MIN( nSpaceT, MAX( 3, (int) dSpaceS) ); nSpaceM = nSpaceT - nSpaceS; solnFound = solnError = FALSE; while ( !solnFound ) { remaining = width - hMax*nSpaceM; /* Test for the various special cases first. */ if ( nSpaceM < 0 || nSpaceS <= 0 ) { solnError = TRUE; } else if (nSpaceS == 1) { /* check for exact fit */ if ( ABS(remaining - hStart) < 1.0e-3*hStart ) { hBiggest = hStart; if (nSpaceM == 0) { rTempS = 1.0; } else { rTempS = hMax / hStart; } } else { solnError = TRUE; } } else if (nSpaceS == 2) { /* Easy to solve */ if (remaining > hStart) { hBiggest = remaining - hStart; rTempS = hBiggest / hStart; } else { solnError = TRUE; } } else { if (remaining > hStart) { rTempS = rWanted; oneSideRatio( remaining, hStart, &rTempS, nSpaceS ); hBiggest = hStart*pow(rTempS, (double)nSpaceS - 1.0); } else { solnError = TRUE; } } if ( solnError ) break; /* while loop */ rConnect = hMax / hBiggest; if ( rConnect < 1.0 - RAT_TOL ) { nSpaceS--; nSpaceM++; } else if ( (rConnect > rTempS + RAT_TOL) && nSpaceM != 0 ) { nSpaceS++; nSpaceM--; } else { solnFound = TRUE; /* Save solution if it's better. */ if ( (rTempS >= 1.0 - RAT_TOL) && ABS(rWanted - rTempS) <= ABS(rWanted - rSaveS)) { rSaveS = rTempS; nSaveS = nSpaceS; nSaveM = nSpaceM; } } } } /* Prepare return values. */ if (rSaveS == 0.0) { sprintf( errBuf, "max-limited spacing can't find an acceptable solution\n"); SPfrontEnd->IFerror( ERR_WARNING, errBuf, NULL ); *rFound = 0.0; *nSfound = *nMfound = 0; return(E_PRIVATE); } else { *rFound = rSaveS; *nSfound = nSaveS; *nMfound = nSaveM; return(OK); } } ngspice-26/src/ciderlib/input/contset.c0000644000265600020320000000414612264261473017564 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/contdefs.h" #include "ngspice/meshext.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int CONTcheck( CONTcard * ); extern int CONTsetup( CONTcard *, ELCTelectrode * ); /* * Name: CONTcheck * Purpose: checks a list of CONTcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int CONTcheck(CONTcard *cardList) { CONTcard *card; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->CONTnextCard ) { cardNum++; if (!card->CONTnumberGiven) { sprintf( ebuf, "contact card %d is missing an electrode index", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: CONTsetup * Purpose: copies information from list of CONTcard's to ELCTelectrode's * Formals: cardList: list of cards to setup * electrodeList: previously built list of ELCTelectrode's * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: CONTcheck */ int CONTsetup(CONTcard *cardList, ELCTelectrode *electrodeList) { CONTcard *card; ELCTelectrode *electrode; int error; /* Check the card list */ if ((error = CONTcheck( cardList )) != 0) return( error ); for ( card = cardList; card != NULL; card = card->CONTnextCard ) { /* Copy workfunction to all matching electrodes */ for ( electrode = electrodeList; electrode != NULL; electrode = electrode->next ) { if ( card->CONTnumber == electrode->id ) { if ( card->CONTworkfunGiven ) { electrode->workf = card->CONTworkfun; } else { electrode->workf = 4.10 /* electron volts */; } } } } return( OK ); } ngspice-26/src/ciderlib/input/output.c0000644000265600020320000001732612264261473017451 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/numenum.h" #include "ngspice/outpdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "../misc/tilde.h" extern int OUTPnewCard(GENcard**,GENmodel*); extern int OUTPparam(int,IFvalue*,GENcard*); IFparm OUTPpTable[] = { /* Debugging Flags */ IP("all.debug",OUTP_ALL_DEBUG,IF_FLAG, "Debug All Analyses"), IP("op.debug",OUTP_DC_DEBUG, IF_FLAG, "Debug DC/OP Analyses"), IP("dc.debug",OUTP_DC_DEBUG, IF_FLAG, "Debug DC/OP Analyses"), IP("tran.debug",OUTP_TRAN_DEBUG,IF_FLAG, "Debug TRAN Analysis"), IP("ac.debug",OUTP_AC_DEBUG, IF_FLAG, "Debug AC/PZ Analyses"), IP("pz.debug",OUTP_AC_DEBUG, IF_FLAG, "Debug AC/PZ Analyses"), /* General Information */ IP("geometry",OUTP_GEOM, IF_FLAG, "Geometric information"), IP("mesh", OUTP_MESH, IF_FLAG, "Mesh information"), IP("material",OUTP_MATERIAL, IF_FLAG, "Material information"), IP("globals", OUTP_GLOBALS, IF_FLAG, "Global information"), IP("statistics", OUTP_STATS, IF_FLAG, "Resource usage information"), IP("resources", OUTP_STATS, IF_FLAG, "Resource usage information"), /* Solution Information */ IP("rootfile", OUTP_ROOTFILE, IF_STRING, "Root of output file names"), IP("rawfile", OUTP_RAWFILE, IF_FLAG, "SPICE rawfile data format"), IP("hdf", OUTP_HDF, IF_FLAG, "HDF data format"), IP("doping", OUTP_DOPING, IF_FLAG, "Net doping"), IP("psi", OUTP_PSI, IF_FLAG, "Potential"), IP("equ.psi", OUTP_EQU_PSI, IF_FLAG, "Equilibrium potential"), IP("vac.psi", OUTP_VAC_PSI, IF_FLAG, "Vacuum potential"), IP("n.conc", OUTP_N_CONC, IF_FLAG, "Electron concentration"), IP("electrons", OUTP_N_CONC, IF_FLAG, "Electron concentration"), IP("p.conc", OUTP_P_CONC, IF_FLAG, "Hole concentration"), IP("holes", OUTP_P_CONC, IF_FLAG, "Hole concentration"), IP("phin", OUTP_PHIN, IF_FLAG, "Electron quasi-fermi potential"), IP("qfn", OUTP_PHIN, IF_FLAG, "Electron quasi-fermi potential"), IP("phip", OUTP_PHIP, IF_FLAG, "Hole quasi-fermi potential"), IP("qfp", OUTP_PHIP, IF_FLAG, "Hole quasi-fermi potential"), IP("phic", OUTP_PHIC, IF_FLAG, "Conduction band potential"), IP("band.con",OUTP_PHIC, IF_FLAG, "Conduction band potential"), IP("phiv", OUTP_PHIV, IF_FLAG, "Valence band potential"), IP("band.val",OUTP_PHIV, IF_FLAG, "Valence band potential"), IP("e.field", OUTP_E_FIELD, IF_FLAG, "Electric field"), IP("jc", OUTP_J_C, IF_FLAG, "Conduction current density"), IP("j.conduc",OUTP_J_C, IF_FLAG, "Conduction current density"), IP("jd", OUTP_J_D, IF_FLAG, "Displacement current density"), IP("j.disp", OUTP_J_D, IF_FLAG, "Displacement current density"), IP("jn", OUTP_J_N, IF_FLAG, "Electron current density"), IP("j.electr",OUTP_J_N, IF_FLAG, "Electron current density"), IP("jp", OUTP_J_P, IF_FLAG, "Hole current density"), IP("j.hole", OUTP_J_P, IF_FLAG, "Hole current density"), IP("jt", OUTP_J_T, IF_FLAG, "Total current density"), IP("j.total", OUTP_J_T, IF_FLAG, "Total current density"), IP("unet", OUTP_U_NET, IF_FLAG, "Net recombination"), IP("recomb", OUTP_U_NET, IF_FLAG, "Net recombination"), IP("mun", OUTP_MUN, IF_FLAG, "Elctron mobility"), IP("mob.elec",OUTP_MUN, IF_FLAG, "Electron mobility"), IP("mup", OUTP_MUP, IF_FLAG, "Hole mobility"), IP("mob.hole",OUTP_MUP, IF_FLAG, "Hole mobility") }; IFcardInfo OUTPinfo = { "output", "Identify information to be output to user", NUMELEMS(OUTPpTable), OUTPpTable, OUTPnewCard, OUTPparam, NULL }; int OUTPnewCard(GENcard **inCard, GENmodel *inModel) { OUTPcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; tmpCard = model->GENoutputs; if (!tmpCard) { /* First in list */ newCard = NEW( OUTPcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->OUTPnextCard = NULL; *inCard = (GENcard *) newCard; model->GENoutputs = newCard; } else { /* Only one card of this type allowed */ *inCard = (GENcard *) tmpCard; } return(OK); } int OUTPparam(int param, IFvalue *value, GENcard *inCard) { OUTPcard *card = (OUTPcard *)inCard; switch (param) { case OUTP_ALL_DEBUG: card->OUTPdcDebug = value->iValue; card->OUTPdcDebugGiven = TRUE; card->OUTPtranDebug = value->iValue; card->OUTPtranDebugGiven = TRUE; card->OUTPacDebug = value->iValue; card->OUTPacDebugGiven = TRUE; break; case OUTP_DC_DEBUG: card->OUTPdcDebug = value->iValue; card->OUTPdcDebugGiven = TRUE; break; case OUTP_TRAN_DEBUG: card->OUTPtranDebug = value->iValue; card->OUTPtranDebugGiven = TRUE; break; case OUTP_AC_DEBUG: card->OUTPacDebug = value->iValue; card->OUTPacDebugGiven = TRUE; break; case OUTP_GEOM: card->OUTPgeom = value->iValue; card->OUTPgeomGiven = TRUE; break; case OUTP_MESH: card->OUTPmesh = value->iValue; card->OUTPmeshGiven = TRUE; break; case OUTP_MATERIAL: card->OUTPmaterial = value->iValue; card->OUTPmaterialGiven = TRUE; break; case OUTP_GLOBALS: card->OUTPglobals = value->iValue; card->OUTPglobalsGiven = TRUE; break; case OUTP_STATS: card->OUTPstats = value->iValue; card->OUTPstatsGiven = TRUE; break; case OUTP_ROOTFILE: card->OUTProotFile = tildexpand(value->sValue); /*xxx*/ card->OUTProotFileGiven = TRUE; break; case OUTP_RAWFILE: card->OUTPfileType = RAWFILE; card->OUTPfileTypeGiven = TRUE; break; case OUTP_HDF: return(E_UNSUPP); break; case OUTP_DOPING: card->OUTPdoping = value->iValue; card->OUTPdopingGiven = TRUE; break; case OUTP_PSI: card->OUTPpsi = value->iValue; card->OUTPpsiGiven = TRUE; break; case OUTP_EQU_PSI: card->OUTPequPsi = value->iValue; card->OUTPequPsiGiven = TRUE; break; case OUTP_VAC_PSI: card->OUTPvacPsi = value->iValue; card->OUTPvacPsiGiven = TRUE; break; case OUTP_N_CONC: card->OUTPnConc = value->iValue; card->OUTPnConcGiven = TRUE; break; case OUTP_P_CONC: card->OUTPpConc = value->iValue; card->OUTPpConcGiven = TRUE; break; case OUTP_PHIN: card->OUTPphin = value->iValue; card->OUTPphinGiven = TRUE; break; case OUTP_PHIP: card->OUTPphip = value->iValue; card->OUTPphipGiven = TRUE; break; case OUTP_PHIC: card->OUTPphic = value->iValue; card->OUTPphicGiven = TRUE; break; case OUTP_PHIV: card->OUTPphiv = value->iValue; card->OUTPphivGiven = TRUE; break; case OUTP_J_C: card->OUTPjc = value->iValue; card->OUTPjcGiven = TRUE; break; case OUTP_J_D: card->OUTPjd = value->iValue; card->OUTPjdGiven = TRUE; break; case OUTP_J_N: card->OUTPjn = value->iValue; card->OUTPjnGiven = TRUE; break; case OUTP_J_P: card->OUTPjp = value->iValue; card->OUTPjpGiven = TRUE; break; case OUTP_J_T: card->OUTPjt = value->iValue; card->OUTPjtGiven = TRUE; break; case OUTP_U_NET: card->OUTPuNet = value->iValue; card->OUTPuNetGiven = TRUE; break; case OUTP_MUN: card->OUTPmun = value->iValue; card->OUTPmunGiven = TRUE; break; case OUTP_MUP: card->OUTPmup = value->iValue; card->OUTPmupGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/dopset.c0000644000265600020320000002367212264261473017410 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modifed: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/numenum.h" #include "ngspice/dopdefs.h" #include "ngspice/meshext.h" #include "ngspice/profile.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cidersupt.h" #include "ngspice/carddefs.h" #include "ngspice/ciderinp.h" /* * Name: DOPcheck * Purpose: checks a list of DOPcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int DOPcheck(DOPcard *cardList, MESHcoord *xMeshList, MESHcoord *yMeshList) { DOPcard *card; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->DOPnextCard ) { cardNum++; if (!card->DOPdomainsGiven) { card->DOPnumDomains = 0; card->DOPdomains = NULL; } if (!card->DOPprofileTypeGiven) { sprintf( ebuf, "doping card %d does not specify profile type", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } else switch (card->DOPprofileType) { case DOP_UNIF: if (!card->DOPconcGiven) { sprintf( ebuf, "doping card %d needs conc of uniform distribution", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_LINEAR: if (!card->DOPconcGiven) { sprintf( ebuf, "doping card %d needs peak conc of linear distribution", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_GAUSS: if (!card->DOPconcGiven) { sprintf( ebuf, "doping card %d needs peak conc of gaussian distribution", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_ERFC: if (!card->DOPconcGiven) { sprintf( ebuf, "doping card %d needs peak conc of error-function distribution", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_EXP: if (!card->DOPconcGiven) { sprintf( ebuf, "doping card %d needs peak conc of exponential distribution", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_SUPREM3: case DOP_SUPASCII: if (!card->DOPinFileGiven) { sprintf( ebuf, "doping card %d needs input-file name of suprem3 data", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; case DOP_ASCII: if (!card->DOPinFileGiven) { sprintf( ebuf, "doping card %d needs input-file name of ascii data", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } break; default: sprintf( ebuf, "doping card %d has unrecognized profile type", cardNum ); SPfrontEnd->IFerror( ERR_FATAL, ebuf, NULL ); error = E_NOTFOUND; break; } if (!card->DOProtateLatGiven) { card->DOProtateLat = FALSE; } if (!card->DOPlatProfileTypeGiven || card->DOProtateLat) { card->DOPlatProfileType = card->DOPprofileType; } if (!card->DOPratioLatGiven) { card->DOPratioLat = 1.0; } if (!card->DOPcharLenGiven) { card->DOPcharLen = 1.0e-4; /* 1um in centimeters */ } if (!card->DOPlocationGiven) { card->DOPlocation = 0.0; } if (!card->DOPimpurityTypeGiven) { card->DOPimpurityType = IMP_N_TYPE; } else switch (card->DOPimpurityType) { case DOP_BORON: card->DOPimpurityType = IMP_BORON; break; case DOP_PHOSP: card->DOPimpurityType = IMP_PHOSPHORUS; break; case DOP_ARSEN: card->DOPimpurityType = IMP_ARSENIC; break; case DOP_ANTIM: card->DOPimpurityType = IMP_ANTIMONY; break; case DOP_N_TYPE: card->DOPimpurityType = IMP_N_TYPE; break; case DOP_P_TYPE: card->DOPimpurityType = IMP_P_TYPE; break; default: break; } if (!card->DOPaxisTypeGiven) { if ( xMeshList && yMeshList ) { /* both lists are non-empty */ card->DOPaxisType = DOP_Y_AXIS; } else if ( xMeshList ) { /* x-mesh list is non-empty */ card->DOPaxisType = DOP_X_AXIS; } else if ( yMeshList ) { /* y-mesh list is non-empty */ card->DOPaxisType = DOP_Y_AXIS; } } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: DOPsetup * Purpose: convert a list of DOPcard's to DOPprofile's * Formals: cardList: list of cards to setup * profileList: returns the list of DOPprofile's * xMeshList: list of coordinates in the x mesh * yMeshList: list of coordinates in the y mesh * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: DOPcheck */ int DOPsetup(DOPcard *cardList, DOPprofile **profileList, DOPtable **tableList, MESHcoord *xMeshList, MESHcoord *yMeshList) { DOPcard *card; DOPprofile *newProfile = NULL, *endProfile; int impurityId = 0; double xMin, xMax, yMin, yMax; double sign; int error, xProfUnif, yProfUnif; /* Initialize list of profiles */ *profileList = endProfile = NULL; /* Check the card list */ if ((error = DOPcheck( cardList, xMeshList, yMeshList )) != 0) return( error ); /* Find the limits on locations */ MESHlBounds( xMeshList, &xMin, &xMax ); MESHlBounds( yMeshList, &yMin, &yMax ); for ( card = cardList; card != NULL; card = card->DOPnextCard ) { if (*profileList == NULL) { RALLOC( newProfile, DOPprofile, 1 ); *profileList = newProfile; } else { RALLOC( newProfile->next, DOPprofile, 1 ); newProfile = newProfile->next; } newProfile->next = NULL; newProfile->numDomains = card->DOPnumDomains; if ( newProfile->numDomains > 0 ) { int i; RALLOC( newProfile->domains, int, newProfile->numDomains ); for ( i=0; i < newProfile->numDomains; i++ ) { newProfile->domains[i] = card->DOPdomains[i]; } } else { newProfile->domains = NULL; } if ( card->DOPimpurityType == IMP_P_TYPE ) { sign = -1.0; } else { sign = 1.0; } switch( card->DOPprofileType ) { case DOP_UNIF: newProfile->type = UNIF; newProfile->CONC = sign * card->DOPconc; break; case DOP_LINEAR: newProfile->type = LIN; newProfile->CONC = sign * card->DOPconc; break; case DOP_GAUSS: newProfile->type = GAUSS; newProfile->CONC = sign * card->DOPconc; break; case DOP_ERFC: newProfile->type = ERRFC; newProfile->CONC = sign * card->DOPconc; break; case DOP_EXP: newProfile->type = EXP; newProfile->CONC = sign * card->DOPconc; break; case DOP_SUPREM3: newProfile->type = LOOKUP; readSupremData( card->DOPinFile, 0, card->DOPimpurityType, tableList ); newProfile->IMPID = ++impurityId; break; case DOP_SUPASCII: newProfile->type = LOOKUP; readSupremData( card->DOPinFile, 1, card->DOPimpurityType, tableList ); newProfile->IMPID = ++impurityId; break; case DOP_ASCII: newProfile->type = LOOKUP; readAsciiData( card->DOPinFile, card->DOPimpurityType, tableList ); newProfile->IMPID = ++impurityId; break; default: break; } switch( card->DOPlatProfileType ) { case DOP_UNIF: newProfile->latType = UNIF; break; case DOP_LINEAR: newProfile->latType = LIN; break; case DOP_GAUSS: newProfile->latType = GAUSS; break; case DOP_ERFC: newProfile->latType = ERRFC; break; case DOP_EXP: newProfile->latType = EXP; break; case DOP_SUPREM3: case DOP_SUPASCII: newProfile->latType = LOOKUP; break; case DOP_ASCII: newProfile->latType = LOOKUP; break; default: break; } newProfile->rotate = card->DOProtateLat; newProfile->LOCATION = card->DOPlocation; newProfile->CHAR_LENGTH = card->DOPcharLen; newProfile->LAT_RATIO = card->DOPratioLat; xProfUnif = yProfUnif = FALSE; if (card->DOPaxisType == DOP_X_AXIS) { newProfile->DIRECTION = X; if (newProfile->type == UNIF) xProfUnif = TRUE; if (newProfile->latType == UNIF) yProfUnif = TRUE; } else { newProfile->DIRECTION = Y; if (newProfile->type == UNIF) yProfUnif = TRUE; if (newProfile->latType == UNIF) xProfUnif = TRUE; } /* Fill in x coordinates. Use defaults if necessary */ if (card->DOPxLowGiven && card->DOPxHighGiven) { newProfile->X_LOW = card->DOPxLow; newProfile->X_HIGH = card->DOPxHigh; } else if (card->DOPxLowGiven) { newProfile->X_LOW = card->DOPxLow; if (xProfUnif) { newProfile->X_HIGH = xMax; } else { newProfile->X_HIGH = newProfile->X_LOW; } } else if (card->DOPxHighGiven) { newProfile->X_HIGH = card->DOPxHigh; if (xProfUnif) { newProfile->X_LOW = xMin; } else { newProfile->X_LOW = newProfile->X_HIGH; } } else { if (xProfUnif) { newProfile->X_LOW = xMin; newProfile->X_HIGH = xMax; } else { newProfile->X_LOW = 0.5 * (xMin + xMax); newProfile->X_HIGH = 0.5 * (xMin + xMax); } } /* Fill in y coordinates. Use defaults if necessary */ if (card->DOPyLowGiven && card->DOPyHighGiven) { newProfile->Y_LOW = card->DOPyLow; newProfile->Y_HIGH = card->DOPyHigh; } else if (card->DOPyLowGiven) { newProfile->Y_LOW = card->DOPyLow; if (yProfUnif) { newProfile->Y_HIGH = yMax; } else { newProfile->Y_HIGH = newProfile->Y_LOW; } } else if (card->DOPyHighGiven) { newProfile->Y_HIGH = card->DOPyHigh; if (xProfUnif) { newProfile->Y_LOW = yMin; } else { newProfile->Y_LOW = newProfile->Y_HIGH; } } else { if (yProfUnif) { newProfile->Y_LOW = yMin; newProfile->Y_HIGH = yMax; } else { newProfile->Y_LOW = 0.5 * (yMin + yMax); newProfile->Y_HIGH = 0.5 * (yMin + yMax); } } } return( OK ); } ngspice-26/src/ciderlib/input/optionsc.c0000644000265600020320000001141012264261473017733 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/optndefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define M_TO_CM 1.0e2 #define M2_TO_CM2 (M_TO_CM * M_TO_CM) #define UM_TO_CM 1.0e-4 #define UM2_TO_CM2 (UM_TO_CM * UM_TO_CM) extern int OPTNnewCard(GENcard**,GENmodel*); extern int OPTNparam(int,IFvalue*,GENcard*); IFparm OPTNpTable[] = { /* Supported Types of Devices. Ideally should be automatically extracted */ IP("resistor",OPTN_RESISTOR, IF_FLAG, "Resistor"), IP("capacitor",OPTN_CAPACITOR, IF_FLAG, "Capacitor"), IP("diode", OPTN_DIODE, IF_FLAG, "Diode"), IP("bipolar", OPTN_BIPOLAR, IF_FLAG, "Bipolar Transistor"), IP("bjt", OPTN_BIPOLAR, IF_FLAG, "Bipolar Transistor"), IP("soibjt", OPTN_SOIBJT, IF_FLAG, "SOI Bipolar"), IP("moscap", OPTN_MOSCAP, IF_FLAG, "MOS Capacitor"), IP("mosfet", OPTN_MOSFET, IF_FLAG, "MOSFET"), IP("soimos", OPTN_SOIMOS, IF_FLAG, "SOI MOSFET"), IP("jfet", OPTN_JFET, IF_FLAG, "Junction FET"), IP("mesfet", OPTN_MESFET, IF_FLAG, "MESFET"), /* Various layout dimensions */ IP("defa", OPTN_DEFA, IF_REAL, "Default Mask Area"), IP("defw", OPTN_DEFW, IF_REAL, "Default Mask Width"), IP("defl", OPTN_DEFL, IF_REAL, "Default Mask Length"), IP("base.area",OPTN_BASE_AREA, IF_REAL, "1D BJT Base Area"), IP("base.length",OPTN_BASE_LENGTH,IF_REAL, "1D BJT Base Length"), IP("base.depth",OPTN_BASE_DEPTH, IF_REAL, "1D BJT Base Depth"), /* Values */ IP("tnom", OPTN_TNOM, IF_REAL, "Nominal Temperature"), /* Device Initial Condition File */ IP("ic.file", OPTN_IC_FILE, IF_STRING, "Initial condition file"), IP("unique", OPTN_UNIQUE, IF_FLAG, "Generate unique filename") }; IFcardInfo OPTNinfo = { "options", "Provide optional information and hints", NUMELEMS(OPTNpTable), OPTNpTable, OPTNnewCard, OPTNparam, NULL }; int OPTNnewCard(GENcard **inCard, GENmodel *inModel) { OPTNcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; tmpCard = model->GENoptions; if (!tmpCard) { /* First in list */ newCard = NEW( OPTNcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->OPTNnextCard = NULL; *inCard = (GENcard *) newCard; model->GENoptions = newCard; } else { /* Only one card of this type allowed */ *inCard = (GENcard *) tmpCard; } return(OK); } int OPTNparam(int param, IFvalue *value, GENcard *inCard) { OPTNcard *card = (OPTNcard *)inCard; switch (param) { case OPTN_RESISTOR: card->OPTNdeviceType = OPTN_RESISTOR; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_CAPACITOR: card->OPTNdeviceType = OPTN_CAPACITOR; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_DIODE: card->OPTNdeviceType = OPTN_DIODE; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_MOSCAP: card->OPTNdeviceType = OPTN_MOSCAP; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_BIPOLAR: case OPTN_SOIBJT: /* XXX Treat SOI as normal */ card->OPTNdeviceType = OPTN_BIPOLAR; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_MOSFET: case OPTN_SOIMOS: /* XXX Treat SOI as normal */ card->OPTNdeviceType = OPTN_MOSFET; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_JFET: case OPTN_MESFET: /* XXX Treat MES as junction */ card->OPTNdeviceType = OPTN_JFET; card->OPTNdeviceTypeGiven = TRUE; break; case OPTN_DEFA: card->OPTNdefa = value->rValue * M2_TO_CM2; card->OPTNdefaGiven = TRUE; break; case OPTN_DEFW: card->OPTNdefw = value->rValue * M_TO_CM; card->OPTNdefwGiven = TRUE; break; case OPTN_DEFL: card->OPTNdefl = value->rValue * M_TO_CM; card->OPTNdeflGiven = TRUE; break; case OPTN_BASE_AREA: card->OPTNbaseArea = value->rValue; card->OPTNbaseAreaGiven = TRUE; break; case OPTN_BASE_LENGTH: card->OPTNbaseLength = value->rValue * UM_TO_CM; card->OPTNbaseLengthGiven = TRUE; break; case OPTN_BASE_DEPTH: card->OPTNbaseDepth = value->rValue * UM_TO_CM; card->OPTNbaseDepthGiven = TRUE; break; case OPTN_TNOM: card->OPTNtnom = value->rValue; card->OPTNtnomGiven = TRUE; break; case OPTN_IC_FILE: card->OPTNicFile = value->sValue; card->OPTNicFileGiven = TRUE; break; case OPTN_UNIQUE: card->OPTNunique = value->iValue; card->OPTNuniqueGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/boundary.c0000644000265600020320000001037012264261473017724 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/bdrydefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define UM_TO_CM 1.0e-4 extern int BDRYnewCard(GENcard**,GENmodel*); extern int BDRYparam(int,IFvalue*,GENcard*); IFparm BDRYpTable[] = { IP("domain", BDRY_DOMAIN, IF_INTEGER, "Primary domain"), IP("neighbor",BDRY_NEIGHBOR, IF_INTEGER, "Neighboring domain"), IP("x.low", BDRY_X_LOW, IF_REAL, "Location of left edge"), IP("x.high", BDRY_X_HIGH, IF_REAL, "Location of right edge"), IP("y.low", BDRY_Y_LOW, IF_REAL, "Location of top edge"), IP("y.high", BDRY_Y_HIGH, IF_REAL, "Location of bottom edge"), IP("ix.low", BDRY_IX_LOW, IF_INTEGER, "Index of left edge"), IP("ix.high", BDRY_IX_HIGH, IF_INTEGER, "Index of right edge"), IP("iy.low", BDRY_IY_LOW, IF_INTEGER, "Index of top edge"), IP("iy.high", BDRY_IY_HIGH, IF_INTEGER, "Index of bottom edge"), IP("nss", BDRY_QF, IF_REAL, "Fixed charge"), IP("qss", BDRY_QF, IF_REAL, "Fixed charge"), IP("qf", BDRY_QF, IF_REAL, "Fixed charge"), IP("sn", BDRY_SN, IF_REAL, "Electron recomb velocity"), IP("srvn", BDRY_SN, IF_REAL, "Electron recomb velocity"), IP("vsrfn", BDRY_SN, IF_REAL, "Electron recomb velocity"), IP("sp", BDRY_SP, IF_REAL, "Hole recomb velocity"), IP("srvp", BDRY_SP, IF_REAL, "Hole recomb velocity"), IP("vsrfp", BDRY_SP, IF_REAL, "Hole recomb velocity"), IP("layer.width",BDRY_LAYER, IF_REAL, "Width of surface charge layer") }; IFcardInfo BDRYinfo = { "boundary", "Specify properties of a domain boundary", NUMELEMS(BDRYpTable), BDRYpTable, BDRYnewCard, BDRYparam, NULL }; IFcardInfo INTFinfo = { "interface", "Specify properties of an interface between two domains", NUMELEMS(BDRYpTable), BDRYpTable, BDRYnewCard, BDRYparam, NULL }; int BDRYnewCard(GENcard **inCard, GENmodel *inModel) { BDRYcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( BDRYcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->BDRYnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENboundaries; if (!tmpCard) { /* First in list */ model->GENboundaries = newCard; } else { /* Go to end of list */ while (tmpCard->BDRYnextCard) tmpCard = tmpCard->BDRYnextCard; /* And add new card */ tmpCard->BDRYnextCard = newCard; } return(OK); } int BDRYparam(int param, IFvalue *value, GENcard *inCard) { BDRYcard *card = (BDRYcard *)inCard; switch (param) { case BDRY_DOMAIN: card->BDRYdomain = value->iValue; card->BDRYdomainGiven = TRUE; break; case BDRY_NEIGHBOR: card->BDRYneighbor = value->iValue; card->BDRYneighborGiven = TRUE; break; case BDRY_X_LOW: card->BDRYxLow = value->rValue * UM_TO_CM; card->BDRYxLowGiven = TRUE; break; case BDRY_X_HIGH: card->BDRYxHigh = value->rValue * UM_TO_CM; card->BDRYxHighGiven = TRUE; break; case BDRY_Y_LOW: card->BDRYyLow = value->rValue * UM_TO_CM; card->BDRYyLowGiven = TRUE; break; case BDRY_Y_HIGH: card->BDRYyHigh = value->rValue * UM_TO_CM; card->BDRYyHighGiven = TRUE; break; case BDRY_IX_LOW: card->BDRYixLow = value->iValue; card->BDRYixLowGiven = TRUE; break; case BDRY_IX_HIGH: card->BDRYixHigh = value->iValue; card->BDRYixHighGiven = TRUE; break; case BDRY_IY_LOW: card->BDRYiyLow = value->iValue; card->BDRYiyLowGiven = TRUE; break; case BDRY_IY_HIGH: card->BDRYiyHigh = value->iValue; card->BDRYiyHighGiven = TRUE; break; case BDRY_QF: card->BDRYqf = value->rValue; card->BDRYqfGiven = TRUE; break; case BDRY_SN: card->BDRYsn = value->rValue; card->BDRYsnGiven = TRUE; break; case BDRY_SP: card->BDRYsp = value->rValue; card->BDRYspGiven = TRUE; break; case BDRY_LAYER: card->BDRYlayer = value->rValue; card->BDRYlayerGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/domain.c0000644000265600020320000000653612264261473017361 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group\ Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/numenum.h" #include "ngspice/domndefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define UM_TO_CM 1.0e-4 extern int DOMNnewCard(GENcard**,GENmodel*); extern int DOMNparam(int,IFvalue*,GENcard*); IFparm DOMNpTable[] = { IP("x.low", DOMN_X_LOW, IF_REAL, "Location of left edge"), IP("x.high", DOMN_X_HIGH, IF_REAL, "Location of right edge"), IP("y.low", DOMN_Y_LOW, IF_REAL, "Location of top edge"), IP("y.high", DOMN_Y_HIGH, IF_REAL, "Location of bottom edge"), IP("ix.low", DOMN_IX_LOW, IF_INTEGER, "Index of left edge"), IP("ix.high", DOMN_IX_HIGH, IF_INTEGER, "Index of right edge"), IP("iy.low", DOMN_IY_LOW, IF_INTEGER, "Index of top edge"), IP("iy.high", DOMN_IY_HIGH, IF_INTEGER, "Index of bottom edge"), IP("number", DOMN_NUMBER, IF_INTEGER, "Domain ID number"), IP("material",DOMN_MATERIAL, IF_INTEGER, "Material ID number") }; IFcardInfo DOMNinfo = { "domain", "Identify material-type for portion of a device", NUMELEMS(DOMNpTable), DOMNpTable, DOMNnewCard, DOMNparam, NULL }; IFcardInfo REGNinfo = { "region", "Identify material-type for portion of a device", NUMELEMS(DOMNpTable), DOMNpTable, DOMNnewCard, DOMNparam, NULL }; int DOMNnewCard(GENcard **inCard, GENmodel *inModel) { DOMNcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( DOMNcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->DOMNnextCard = NULL; *inCard = (GENcard *)newCard; tmpCard = model->GENdomains; if (!tmpCard) { /* First in list */ model->GENdomains = newCard; } else { /* Go to end of list */ while (tmpCard->DOMNnextCard) tmpCard = tmpCard->DOMNnextCard; /* And add new card */ tmpCard->DOMNnextCard = newCard; } return(OK); } int DOMNparam(int param, IFvalue *value, GENcard *inCard) { DOMNcard *card = (DOMNcard *)inCard; switch (param) { case DOMN_X_LOW: card->DOMNxLow = value->rValue * UM_TO_CM; card->DOMNxLowGiven = TRUE; break; case DOMN_X_HIGH: card->DOMNxHigh = value->rValue * UM_TO_CM; card->DOMNxHighGiven = TRUE; break; case DOMN_Y_LOW: card->DOMNyLow = value->rValue * UM_TO_CM; card->DOMNyLowGiven = TRUE; break; case DOMN_Y_HIGH: card->DOMNyHigh = value->rValue * UM_TO_CM; card->DOMNyHighGiven = TRUE; break; case DOMN_IX_LOW: card->DOMNixLow = value->iValue; card->DOMNixLowGiven = TRUE; break; case DOMN_IX_HIGH: card->DOMNixHigh = value->iValue; card->DOMNixHighGiven = TRUE; break; case DOMN_IY_LOW: card->DOMNiyLow = value->iValue; card->DOMNiyLowGiven = TRUE; break; case DOMN_IY_HIGH: card->DOMNiyHigh = value->iValue; card->DOMNiyHighGiven = TRUE; break; case DOMN_NUMBER: card->DOMNnumber = value->iValue; card->DOMNnumberGiven = TRUE; break; case DOMN_MATERIAL: card->DOMNmaterial = value->iValue; card->DOMNmaterialGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/elctset.c0000644000265600020320000001203712264261473017546 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/elctdefs.h" #include "ngspice/meshext.h" #include "ngspice/twomesh.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int ELCTcheck( ELCTcard * ); extern int ELCTsetup( ELCTcard *, ELCTelectrode **, MESHcoord *, MESHcoord * ); /* * Name: ELCTcheck * Purpose: checks a list of ELCTcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int ELCTcheck(ELCTcard *cardList) { ELCTcard *card; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->ELCTnextCard ) { cardNum++; if (card->ELCTxLowGiven && card->ELCTixLowGiven) { sprintf( ebuf, "electrode card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->ELCTxLowGiven = FALSE; } if (card->ELCTxHighGiven && card->ELCTixHighGiven) { sprintf( ebuf, "electrode card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->ELCTxHighGiven = FALSE; } if (card->ELCTyLowGiven && card->ELCTiyLowGiven) { sprintf( ebuf, "electrode card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->ELCTyLowGiven = FALSE; } if (card->ELCTyHighGiven && card->ELCTiyHighGiven) { sprintf( ebuf, "electrode card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->ELCTyHighGiven = FALSE; } if (!card->ELCTnumberGiven) { card->ELCTnumber = -1; } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: ELCTsetup * Purpose: convert a list of ELCTcard's to ELCTelectrode's * Formals: cardList: list of cards to setup * electrodeList: returns the list of ELCTelectrode's * xMeshList: list of coordinates in the x mesh * yMeshList: list of coordinates in the y mesh * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: ELCTcheck */ int ELCTsetup(ELCTcard *cardList, ELCTelectrode **electrodeList, MESHcoord *xMeshList, MESHcoord *yMeshList) { ELCTcard *card; ELCTelectrode *newElectrode = NULL; int ixMin, ixMax, iyMin, iyMax; int cardNum = 0; int error; char ebuf[512]; /* error message buffer */ /* Initialize list of electrodes */ *electrodeList = NULL; /* Check the card list */ if ((error = ELCTcheck( cardList )) != 0) return( error ); /* Find the limits on the indices */ MESHiBounds( xMeshList, &ixMin, &ixMax ); MESHiBounds( yMeshList, &iyMin, &iyMax ); error = OK; for ( card = cardList; card != NULL; card = card->ELCTnextCard ) { cardNum++; if (*electrodeList == NULL) { RALLOC( newElectrode, ELCTelectrode, 1 ); *electrodeList = newElectrode; } else { RALLOC( newElectrode->next, ELCTelectrode, 1 ); newElectrode = newElectrode->next; } newElectrode->next = NULL; newElectrode->id = card->ELCTnumber; newElectrode->workf = 4.10 /* electron volts */; if (card->ELCTixLowGiven) { newElectrode->ixLo = MAX(card->ELCTixLow, ixMin); } else if (card->ELCTxLowGiven) { newElectrode->ixLo = MESHlocate( xMeshList, card->ELCTxLow ); } else { newElectrode->ixLo = ixMin; } if (card->ELCTixHighGiven) { newElectrode->ixHi = MIN(card->ELCTixHigh, ixMax); } else if (card->ELCTxHighGiven) { newElectrode->ixHi = MESHlocate( xMeshList, card->ELCTxHigh ); } else { newElectrode->ixHi = ixMax; } if (newElectrode->ixLo > newElectrode->ixHi) { sprintf( ebuf, "electrode card %d has low x index (%d) > high x index (%d)", cardNum, newElectrode->ixLo, newElectrode->ixHi ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } if (card->ELCTiyLowGiven) { newElectrode->iyLo = MAX(card->ELCTiyLow, iyMin); } else if (card->ELCTyLowGiven) { newElectrode->iyLo = MESHlocate( yMeshList, card->ELCTyLow ); } else { newElectrode->iyLo = iyMin; } if (card->ELCTiyHighGiven) { newElectrode->iyHi = MIN(card->ELCTiyHigh, iyMax); } else if (card->ELCTyHighGiven) { newElectrode->iyHi = MESHlocate( yMeshList, card->ELCTyHigh ); } else { newElectrode->iyHi = iyMax; } if (newElectrode->iyLo > newElectrode->iyHi) { sprintf( ebuf, "electrode card %d has low y index (%d) > high y index (%d)", cardNum, newElectrode->iyLo, newElectrode->iyHi ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } return( error ); } ngspice-26/src/ciderlib/input/outpset.c0000644000265600020320000000636112264261473017611 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/numenum.h" #include "ngspice/outpdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int OUTPcheck( OUTPcard * ); extern int OUTPsetup( OUTPcard * ); /* * Name: OUTPcheck * Purpose: checks a list of OUTPcards for input errors, sets defaults * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines, output routines * Calls: error message handler */ int OUTPcheck(OUTPcard *cardList) { OUTPcard *card; int cardNum = 0; for ( card = cardList; card != NULL; card = card->OUTPnextCard ) { cardNum++; card->OUTPnumVars = -1; if ( !card->OUTPdcDebugGiven ) { card->OUTPdcDebug = FALSE; } if ( !card->OUTPtranDebugGiven ) { card->OUTPtranDebug = FALSE; } if ( !card->OUTPacDebugGiven ) { card->OUTPacDebug = FALSE; } if ( !card->OUTPgeomGiven ) { card->OUTPgeom = FALSE; } if ( !card->OUTPmeshGiven ) { card->OUTPmesh = FALSE; } if ( !card->OUTPmaterialGiven ) { card->OUTPmaterial = FALSE; } if ( !card->OUTPglobalsGiven ) { card->OUTPglobals = FALSE; } if ( !card->OUTPstatsGiven ) { card->OUTPstats = TRUE; } if ( !card->OUTProotFileGiven ) { card->OUTProotFile = copy(""); } if ( !card->OUTPfileTypeGiven ) { card->OUTPfileType = RAWFILE; } if ( !card->OUTPdopingGiven ) { card->OUTPdoping = TRUE; } if ( !card->OUTPpsiGiven ) { card->OUTPpsi = TRUE; } if ( !card->OUTPequPsiGiven ) { card->OUTPequPsi = FALSE; } if ( !card->OUTPvacPsiGiven ) { card->OUTPvacPsi = FALSE; } if ( !card->OUTPnConcGiven ) { card->OUTPnConc = TRUE; } if ( !card->OUTPpConcGiven ) { card->OUTPpConc = TRUE; } if ( !card->OUTPphinGiven ) { card->OUTPphin = FALSE; } if ( !card->OUTPphipGiven ) { card->OUTPphip = FALSE; } if ( !card->OUTPphicGiven ) { card->OUTPphic = FALSE; } if ( !card->OUTPphivGiven ) { card->OUTPphiv = FALSE; } if ( !card->OUTPeFieldGiven ) { card->OUTPeField = TRUE; } if ( !card->OUTPjcGiven ) { card->OUTPjc = FALSE; } if ( !card->OUTPjdGiven ) { card->OUTPjd = TRUE; } if ( !card->OUTPjnGiven ) { card->OUTPjn = TRUE; } if ( !card->OUTPjpGiven ) { card->OUTPjp = TRUE; } if ( !card->OUTPjtGiven ) { card->OUTPjt = FALSE; } if ( !card->OUTPuNetGiven ) { card->OUTPuNet = FALSE; } if ( !card->OUTPmunGiven ) { card->OUTPmun = FALSE; } if ( !card->OUTPmupGiven ) { card->OUTPmup = FALSE; } } return(OK); } /* * Name: OUTPsetup * Purpose: setup the output card * Formals: cardList: list of cards to setup * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: OUTPcheck */ int OUTPsetup(OUTPcard *cardList) { int error; /* Check the card list */ if ((error = OUTPcheck( cardList )) != 0) return( error ); return( OK ); } ngspice-26/src/ciderlib/input/cards.c0000644000265600020320000000175112264261473017200 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" extern IFcardInfo CONTinfo; extern IFcardInfo DOPinfo; extern IFcardInfo ELCTinfo; extern IFcardInfo BDRYinfo; extern IFcardInfo INTFinfo; extern IFcardInfo XMSHinfo; extern IFcardInfo YMSHinfo; extern IFcardInfo METHinfo; extern IFcardInfo MOBinfo; extern IFcardInfo MODLinfo; extern IFcardInfo PHYSinfo; extern IFcardInfo MATLinfo; extern IFcardInfo DOMNinfo; extern IFcardInfo REGNinfo; extern IFcardInfo OPTNinfo; extern IFcardInfo OUTPinfo; IFcardInfo *INPcardTab[] = { &CONTinfo, &DOPinfo, &ELCTinfo, &BDRYinfo, &INTFinfo, &XMSHinfo, &YMSHinfo, &METHinfo, &MOBinfo, &MODLinfo, &PHYSinfo, &MATLinfo, &DOMNinfo, ®Ninfo, &OPTNinfo, &OUTPinfo }; int INPnumCards = NUMELEMS(INPcardTab); ngspice-26/src/ciderlib/input/matlset.c0000644000265600020320000001141612264261473017554 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/matldefs.h" #include "ngspice/material.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cidersupt.h" extern int MATLcheck( MATLcard * ); extern int MATLsetup( MATLcard *, MaterialInfo ** ); /* * Name: MATLcheck * Purpose: checks a list of MATLcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int MATLcheck(MATLcard *cardList) { MATLcard *card, *card2; int cardNum = 0, cardNum2; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->MATLnextCard ) { cardNum++; if( !card->MATLmaterialGiven ) { card->MATLmaterial = SILICON; } if (!card->MATLnumberGiven) { sprintf( ebuf, "material card %d is missing an id number", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } /* Return now if anything has failed */ if (error) return(error); /* Make sure this id is different from all previous ones. */ cardNum2 = 0; for ( card2 = cardList; card2 != card; card2 = card2->MATLnextCard ) { cardNum2++; if (card2->MATLnumber == card->MATLnumber) { sprintf( ebuf, "material cards %d and %d use same id %d", cardNum2, cardNum, card->MATLnumber ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: MATLsetup * Purpose: setup the physical model parameters * Formals: cardList: list of cards to setup * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: MATLcheck */ int MATLsetup(MATLcard *cardList, MaterialInfo **materialList) { MATLcard *card; MATLmaterial *newMaterial = NULL; int error; /* Initialize list of electrodes */ *materialList = NULL; /* Check the card list */ if ((error = MATLcheck( cardList )) != 0) return( error ); for ( card = cardList; card != NULL; card = card->MATLnextCard ) { if (*materialList == NULL) { RALLOC( newMaterial, MATLmaterial, 1 ); *materialList = newMaterial; } else { RALLOC( newMaterial->next, MATLmaterial, 1 ); newMaterial = newMaterial->next; } newMaterial->next = NULL; newMaterial->id = card->MATLnumber; newMaterial->material = card->MATLmaterial; /* Fill in default values */ MATLdefaults( newMaterial ); /* Now override with parameters set on the card */ if ( card->MATLpermittivityGiven ) { newMaterial->eps = card->MATLpermittivity; /* Multiply by permittivity of free space if relative epsilon given. */ if (newMaterial->eps > 0.1) { newMaterial->eps *= EPS0; } } if ( card->MATLaffinityGiven ) { newMaterial->affin = card->MATLaffinity; } if ( card->MATLnc0Given ) { newMaterial->nc0 = card->MATLnc0; } if ( card->MATLnv0Given ) { newMaterial->nv0 = card->MATLnv0; } if ( card->MATLeg0Given ) { newMaterial->eg0 = card->MATLeg0; } if ( card->MATLdEgdTGiven ) { newMaterial->dEgDt = card->MATLdEgdT; } if ( card->MATLtrefEgGiven ) { newMaterial->trefBGN = card->MATLtrefEg; } if ( card->MATLdEgdNGiven ) { newMaterial->dEgDn[ELEC] = card->MATLdEgdN; } if ( card->MATLnrefEgGiven ) { newMaterial->nrefBGN[ELEC] = card->MATLnrefEg; } if ( card->MATLdEgdPGiven ) { newMaterial->dEgDn[HOLE] = card->MATLdEgdP; } if ( card->MATLprefEgGiven ) { newMaterial->nrefBGN[HOLE] = card->MATLprefEg; } if ( card->MATLtaup0Given ) { newMaterial->tau0[HOLE] = card->MATLtaup0; } if ( card->MATLtaun0Given ) { newMaterial->tau0[ELEC] = card->MATLtaun0; } if ( card->MATLtaup0Given ) { newMaterial->tau0[HOLE] = card->MATLtaup0; } if ( card->MATLnrefSRHnGiven ) { newMaterial->nrefSRH[ELEC] = card->MATLnrefSRHn; } if ( card->MATLnrefSRHpGiven ) { newMaterial->nrefSRH[HOLE] = card->MATLnrefSRHp; } if ( card->MATLcnAugGiven ) { newMaterial->cAug[ELEC] = card->MATLcnAug; } if ( card->MATLcpAugGiven ) { newMaterial->cAug[HOLE] = card->MATLcpAug; } if ( card->MATLaRichNGiven ) { newMaterial->aRich[ELEC] = card->MATLaRichN; } if ( card->MATLaRichPGiven ) { newMaterial->aRich[HOLE] = card->MATLaRichP; } } return( OK ); } ngspice-26/src/ciderlib/input/material.c0000644000265600020320000002256412264261473017707 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/numenum.h" #include "ngspice/matldefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int MATLnewCard(GENcard**,GENmodel *); extern int MATLparam(int,IFvalue*,GENcard *); IFparm MATLpTable[] = { IP("number", MATL_NUMBER, IF_INTEGER, "Material ID number"), IP("insulator",MATL_INSULATOR,IF_FLAG, "Insulator"), IP("oxide", MATL_OXIDE, IF_FLAG, "Oxide"), IP("sio2", MATL_OXIDE, IF_FLAG, "Oxide"), IP("nitride", MATL_NITRIDE, IF_FLAG, "Nitride"), IP("si3n4", MATL_NITRIDE, IF_FLAG, "Nitride"), IP("semiconductor",MATL_SEMICON,IF_FLAG, "Semiconductor"), IP("silicon", MATL_SILICON, IF_FLAG, "Silicon"), IP("polysilicon",MATL_POLYSIL,IF_FLAG, "Polysilicon"), IP("gaas", MATL_GAAS, IF_FLAG, "Gallium-Arsenide"), IP("nc", MATL_NC0, IF_REAL, "Conduction band density"), IP("nc0", MATL_NC0, IF_REAL, "Conduction band density"), IP("nc300", MATL_NC0, IF_REAL, "Conduction band density"), IP("nv", MATL_NV0, IF_REAL, "Valence band density"), IP("nv0", MATL_NV0, IF_REAL, "Valence band density"), IP("nv300", MATL_NV0, IF_REAL, "Valence band density"), IP("eg", MATL_EG0, IF_REAL, "Energy gap"), IP("eg0", MATL_EG0, IF_REAL, "Energy gap"), IP("eg300", MATL_EG0, IF_REAL, "Energy gap"), IP("deg.dt", MATL_DEGDT, IF_REAL, "Bandgap narrowing w/ temp"), IP("egalpha", MATL_DEGDT, IF_REAL, "Bandgap narrowing w/ temp"), IP("eg.tref", MATL_TREF_EG, IF_REAL, "E-gap reference temperature"), IP("egbeta", MATL_TREF_EG, IF_REAL, "E-gap reference temperature"), IP("deg.dc", MATL_DEGDC, IF_REAL, "Bandgap narrowing w/ N&P doping"), IP("eg.cref", MATL_CREF_EG, IF_REAL, "E-gap reference conc (N&P type)"), IP("nbgn", MATL_CREF_EG, IF_REAL, "E-gap reference conc (N&P type)"), IP("deg.dn", MATL_DEGDN, IF_REAL, "Bandgap narrowing w/ N doping"), IP("eg.nref", MATL_NREF_EG, IF_REAL, "E-gap reference conc (N type)"), IP("nbgnn", MATL_NREF_EG, IF_REAL, "E-gap reference conc (N type)"), IP("deg.dp", MATL_DEGDP, IF_REAL, "Bandgap narrowing w/ P doping"), IP("eg.pref", MATL_PREF_EG, IF_REAL, "E-gap reference conc (P type)"), IP("nbgnp", MATL_PREF_EG, IF_REAL, "E-gap reference conc (P type)"), IP("affinity",MATL_AFFIN, IF_REAL, "Electron affinity"), IP("permittivity",MATL_PERMIT,IF_REAL, "Dielectric permittivity"), IP("epsilon", MATL_PERMIT, IF_REAL, "Dielectric permittivity"), IP("tn", MATL_TAUN0, IF_REAL, "SRH electron lifetime"), IP("tn0", MATL_TAUN0, IF_REAL, "SRH electron lifetime"), IP("taun0", MATL_TAUN0, IF_REAL, "SRH electron lifetime"), IP("tp", MATL_TAUP0, IF_REAL, "SRH hole lifetime"), IP("tp0", MATL_TAUP0, IF_REAL, "SRH hole lifetime"), IP("taup0", MATL_TAUP0, IF_REAL, "SRH hole lifetime"), IP("nsrhn", MATL_NSRHN, IF_REAL, "SRH reference conc (electrons)"), IP("srh.nref",MATL_NSRHN, IF_REAL, "SRH reference conc (electrons)"), IP("nsrhp", MATL_NSRHP, IF_REAL, "SRH reference conc (holes)"), IP("srh.pref",MATL_NSRHP, IF_REAL, "SRH reference conc (holes)"), IP("cn", MATL_CNAUG, IF_REAL, "Auger coefficient (electrons)"), IP("cnaug", MATL_CNAUG, IF_REAL, "Auger coefficient (electrons)"), IP("augn", MATL_CNAUG, IF_REAL, "Auger coefficient (electrons)"), IP("cp", MATL_CPAUG, IF_REAL, "Auger coefficient (holes)"), IP("cpaug", MATL_CPAUG, IF_REAL, "Auger coefficient (holes)"), IP("augp", MATL_CPAUG, IF_REAL, "Auger coefficient (holes)"), IP("arichn", MATL_ARICHN, IF_REAL, "Richardson constant (electrons)"), IP("arichp", MATL_ARICHP, IF_REAL, "Richardson constant (holes)") }; IFcardInfo MATLinfo = { "material", "Specify physical properties of a material", NUMELEMS(MATLpTable), MATLpTable, MATLnewCard, MATLparam, NULL }; IFcardInfo PHYSinfo = { "physics", "Specify physical properties of a material", NUMELEMS(MATLpTable), MATLpTable, MATLnewCard, MATLparam, NULL }; int MATLnewCard(GENcard **inCard, GENmodel *inModel) { MATLcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( MATLcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->MATLnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENmaterials; if (!tmpCard) { /* First in list */ model->GENmaterials = newCard; } else { /* Go to end of list */ while (tmpCard->MATLnextCard) tmpCard = tmpCard->MATLnextCard; /* And add new card */ tmpCard->MATLnextCard = newCard; } return(OK); } int MATLparam(int param, IFvalue *value, GENcard *inCard) { MATLcard *card = (MATLcard *)inCard; switch (param) { case MATL_NUMBER: card->MATLnumber = value->iValue; card->MATLnumberGiven = TRUE; break; case MATL_NC0: card->MATLnc0 = value->rValue; card->MATLnc0Given = TRUE; break; case MATL_NV0: card->MATLnv0 = value->rValue; card->MATLnv0Given = TRUE; break; case MATL_EG0: card->MATLeg0 = value->rValue; card->MATLeg0Given = TRUE; break; case MATL_DEGDT: card->MATLdEgdT = value->rValue; card->MATLdEgdTGiven = TRUE; break; case MATL_TREF_EG: card->MATLtrefEg = value->rValue; card->MATLtrefEgGiven = TRUE; break; case MATL_DEGDC: card->MATLdEgdN = value->rValue; card->MATLdEgdNGiven = TRUE; card->MATLdEgdP = value->rValue; card->MATLdEgdPGiven = TRUE; break; case MATL_CREF_EG: card->MATLnrefEg = value->rValue; card->MATLnrefEgGiven = TRUE; card->MATLprefEg = value->rValue; card->MATLprefEgGiven = TRUE; break; case MATL_DEGDN: card->MATLdEgdN = value->rValue; card->MATLdEgdNGiven = TRUE; break; case MATL_NREF_EG: card->MATLnrefEg = value->rValue; card->MATLnrefEgGiven = TRUE; break; case MATL_DEGDP: card->MATLdEgdP = value->rValue; card->MATLdEgdPGiven = TRUE; break; case MATL_PREF_EG: card->MATLprefEg = value->rValue; card->MATLprefEgGiven = TRUE; break; case MATL_AFFIN: card->MATLaffinity = value->rValue; card->MATLaffinityGiven = TRUE; break; case MATL_PERMIT: card->MATLpermittivity = value->rValue; card->MATLpermittivityGiven = TRUE; break; case MATL_TAUN0: card->MATLtaun0 = value->rValue; card->MATLtaun0Given = TRUE; break; case MATL_TAUP0: card->MATLtaup0 = value->rValue; card->MATLtaup0Given = TRUE; break; case MATL_NSRHN: card->MATLnrefSRHn = value->rValue; card->MATLnrefSRHnGiven = TRUE; break; case MATL_NSRHP: card->MATLnrefSRHp = value->rValue; card->MATLnrefSRHpGiven = TRUE; break; case MATL_CNAUG: card->MATLcnAug = value->rValue; card->MATLcnAugGiven = TRUE; break; case MATL_CPAUG: card->MATLcpAug = value->rValue; card->MATLcpAugGiven = TRUE; break; case MATL_ARICHN: card->MATLaRichN = value->rValue; card->MATLaRichNGiven = TRUE; break; case MATL_ARICHP: card->MATLaRichP = value->rValue; card->MATLaRichPGiven = TRUE; break; case MATL_INSULATOR: if ( value->iValue ) { card->MATLmaterial = INSULATOR; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == INSULATOR ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_OXIDE: if ( value->iValue ) { card->MATLmaterial = OXIDE; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == OXIDE ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_NITRIDE: if ( value->iValue ) { card->MATLmaterial = NITRIDE; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == NITRIDE ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_SEMICON: if ( value->iValue ) { card->MATLmaterial = SEMICON; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == SEMICON ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_SILICON: if ( value->iValue ) { card->MATLmaterial = SILICON; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == SILICON ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_POLYSIL: if ( value->iValue ) { card->MATLmaterial = POLYSILICON; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == POLYSILICON ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; case MATL_GAAS: if ( value->iValue ) { card->MATLmaterial = GAAS; card->MATLmaterialGiven = TRUE; } else { if ( card->MATLmaterial == GAAS ) { card->MATLmaterial = -1; card->MATLmaterialGiven = FALSE; } } break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/Makefile.am0000644000265600020320000000110112264261473017761 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libciderinput.la libciderinput_la_SOURCES = \ bdryset.c \ boundary.c \ cards.c \ contact.c \ contset.c \ domain.c \ domnset.c \ doping.c \ dopset.c \ elctset.c \ electrod.c \ material.c \ matlset.c \ mesh.c \ meshset.c \ method.c \ mobility.c \ mobset.c \ models.c \ modlset.c \ optionsc.c \ outpset.c \ output.c EXTRA_DIST = readme AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/ciderlib/input/Makefile.in0000644000265600020320000004403312264261534020003 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ciderlib/input DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libciderinput_la_LIBADD = am_libciderinput_la_OBJECTS = bdryset.lo boundary.lo cards.lo \ contact.lo contset.lo domain.lo domnset.lo doping.lo dopset.lo \ elctset.lo electrod.lo material.lo matlset.lo mesh.lo \ meshset.lo method.lo mobility.lo mobset.lo models.lo \ modlset.lo optionsc.lo outpset.lo output.lo libciderinput_la_OBJECTS = $(am_libciderinput_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libciderinput_la_SOURCES) DIST_SOURCES = $(libciderinput_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libciderinput.la libciderinput_la_SOURCES = \ bdryset.c \ boundary.c \ cards.c \ contact.c \ contset.c \ domain.c \ domnset.c \ doping.c \ dopset.c \ elctset.c \ electrod.c \ material.c \ matlset.c \ mesh.c \ meshset.c \ method.c \ mobility.c \ mobset.c \ models.c \ modlset.c \ optionsc.c \ outpset.c \ output.c EXTRA_DIST = readme AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ciderlib/input/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ciderlib/input/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libciderinput.la: $(libciderinput_la_OBJECTS) $(libciderinput_la_DEPENDENCIES) $(EXTRA_libciderinput_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libciderinput_la_OBJECTS) $(libciderinput_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bdryset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/boundary.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cards.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contact.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/contset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/domnset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/doping.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dopset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elctset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/electrod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/material.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matlset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/meshset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/method.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mobility.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mobset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/models.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modlset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/optionsc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outpset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/ciderlib/input/mobility.c0000644000265600020320000001346312264261473017737 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/numenum.h" #include "ngspice/mobdefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" extern int MOBnewCard(GENcard**,GENmodel*); extern int MOBparam(int,IFvalue*,GENcard*); IFparm MOBpTable[] = { IP("material",MOB_MATERIAL, IF_INTEGER, "Material index"), IP("electron",MOB_ELEC, IF_FLAG, "Electron mobility flag"), IP("hole", MOB_HOLE, IF_FLAG, "Hole mobility flag"), IP("majority",MOB_MAJOR, IF_FLAG, "Majority carrier flag"), IP("minority",MOB_MINOR, IF_FLAG, "Minority carrier flag"), IP("mumax", MOB_MUMAX, IF_REAL, "Maximum bulk mobility"), IP("mumin", MOB_MUMIN, IF_REAL, "Minimum bulk mobility"), IP("ntref", MOB_NTREF, IF_REAL, "Ionized impurity ref. conc."), IP("ntexp", MOB_NTEXP, IF_REAL, "Ionized impurity exponent"), IP("vsat", MOB_VSAT, IF_REAL, "Saturation velocity"), IP("vwarm", MOB_VWARM, IF_REAL, "Warm carrier ref. velocity"), IP("mus", MOB_MUS, IF_REAL, "Initial surface mobility"), IP("ec.a", MOB_EC_A, IF_REAL, "Surf. mobility critical field"), IP("ec.b", MOB_EC_B, IF_REAL, "Surf. mobility critical field #2"), IP("concmodel",MOB_CONC_MOD, IF_STRING, "Concentration dep. model"), IP("fieldmodel",MOB_FIELD_MOD,IF_STRING, "Driving field dep. model"), IP("init", MOB_INIT, IF_FLAG, "Initialize with defaults") }; IFcardInfo MOBinfo = { "mobility", "Specify parameters and types of mobility models", NUMELEMS(MOBpTable), MOBpTable, MOBnewCard, MOBparam, NULL }; int MOBnewCard(GENcard **inCard, GENmodel *inModel) { MOBcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( MOBcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->MOBnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENmobility; if (!tmpCard) { /* First in list */ model->GENmobility = newCard; } else { /* Go to end of list */ while (tmpCard->MOBnextCard) tmpCard = tmpCard->MOBnextCard; /* And add new card */ tmpCard->MOBnextCard = newCard; } return(OK); } int MOBparam(int param, IFvalue *value, GENcard *inCard) { MOBcard *card = (MOBcard *)inCard; switch (param) { case MOB_MATERIAL: card->MOBmaterial = value->iValue; card->MOBmaterialGiven = TRUE; break; case MOB_ELEC: if ( value->iValue ) { card->MOBcarrier = ELEC; card->MOBcarrierGiven = TRUE; } else { if ( card->MOBcarrier == ELEC ) { card->MOBcarrier = -1; card->MOBcarrierGiven = FALSE; } } break; case MOB_HOLE: if ( value->iValue ) { card->MOBcarrier = HOLE; card->MOBcarrierGiven = TRUE; } else { if ( card->MOBcarrier == HOLE ) { card->MOBcarrier = -1; card->MOBcarrierGiven = FALSE; } } break; case MOB_MAJOR: if ( value->iValue ) { card->MOBcarrType = MAJOR; card->MOBcarrTypeGiven = TRUE; } else { if ( card->MOBcarrType == MAJOR ) { card->MOBcarrType = -1; card->MOBcarrTypeGiven = FALSE; } } break; case MOB_MINOR: if ( value->iValue ) { card->MOBcarrType = MINOR; card->MOBcarrTypeGiven = TRUE; } else { if ( card->MOBcarrType == MINOR ) { card->MOBcarrType = -1; card->MOBcarrTypeGiven = FALSE; } } break; case MOB_MUMAX: card->MOBmuMax = value->rValue; card->MOBmuMaxGiven = TRUE; break; case MOB_MUMIN: card->MOBmuMin = value->rValue; card->MOBmuMinGiven = TRUE; break; case MOB_NTREF: card->MOBntRef = value->rValue; card->MOBntRefGiven = TRUE; break; case MOB_NTEXP: card->MOBntExp = value->rValue; card->MOBntExpGiven = TRUE; break; case MOB_VSAT: card->MOBvSat = value->rValue; card->MOBvSatGiven = TRUE; break; case MOB_VWARM: card->MOBvWarm = value->rValue; card->MOBvWarmGiven = TRUE; break; case MOB_MUS: card->MOBmus = value->rValue; card->MOBmusGiven = TRUE; break; case MOB_EC_A: card->MOBecA = value->rValue; card->MOBecAGiven = TRUE; break; case MOB_EC_B: card->MOBecB = value->rValue; card->MOBecBGiven = TRUE; break; case MOB_CONC_MOD: if ( cinprefix( value->sValue, "ct", 1 ) ) { card->MOBconcModel = CT; card->MOBconcModelGiven = TRUE; } else if ( cinprefix( value->sValue, "ar", 1 ) ) { card->MOBconcModel = AR; card->MOBconcModelGiven = TRUE; } else if ( cinprefix( value->sValue, "uf", 1 ) ) { card->MOBconcModel = UF; card->MOBconcModelGiven = TRUE; } else if ( cinprefix( value->sValue, "sg", 1 ) ) { card->MOBconcModel = SG; card->MOBconcModelGiven = TRUE; } else if ( cinprefix( value->sValue, "ga", 1 ) ) { card->MOBconcModel = GA; card->MOBconcModelGiven = TRUE; } break; case MOB_FIELD_MOD: if ( cinprefix( value->sValue, "ct", 1 ) ) { card->MOBfieldModel = CT; card->MOBfieldModelGiven = TRUE; } else if ( cinprefix( value->sValue, "ar", 1 ) ) { card->MOBfieldModel = AR; card->MOBfieldModelGiven = TRUE; } else if ( cinprefix( value->sValue, "sg", 1 ) ) { card->MOBfieldModel = SG; card->MOBfieldModelGiven = TRUE; } else if ( cinprefix( value->sValue, "ga", 1 ) ) { card->MOBfieldModel = GA; card->MOBfieldModelGiven = TRUE; } break; case MOB_INIT: card->MOBinit = value->iValue; card->MOBinitGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/models.c0000644000265600020320000000772512264261473017376 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/modldefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int MODLnewCard(GENcard**,GENmodel*); extern int MODLparam(int,IFvalue*,GENcard*); IFparm MODLpTable[] = { IP("bgn", MODL_BGNW, IF_FLAG, "Bandgap narrowing"), IP("bgnw", MODL_BGNW, IF_FLAG, "Bandgap narrowing"), IP("tmpmob", MODL_TEMPMOB, IF_FLAG, "Temp-dependent mobility"), IP("tempmob", MODL_TEMPMOB, IF_FLAG, "Temp-dependent mobility"), IP("conmob", MODL_CONCMOB, IF_FLAG, "Conc-dependent mobility"), IP("concmob", MODL_CONCMOB, IF_FLAG, "Conc-dependent mobility"), IP("fldmob", MODL_FIELDMOB, IF_FLAG, "Lateral-field-dependent mobility"), IP("fieldmob",MODL_FIELDMOB, IF_FLAG, "Lateral-field-dependent mobility"), IP("trfmob",MODL_TRANSMOB, IF_FLAG, "Transverse-field-dependent surface mobility"), IP("transmob",MODL_TRANSMOB, IF_FLAG, "Transverse-field-dependent surface mobility"), IP("srfmob", MODL_SURFMOB, IF_FLAG, "Activate surface mobility"), IP("surfmob", MODL_SURFMOB, IF_FLAG, "Activate surface mobility"), IP("matchmob",MODL_MATCHMOB, IF_FLAG, "Matching low-field surface/bulk mobilities"), IP("srh", MODL_SRH, IF_FLAG, "SRH recombination"), IP("consrh", MODL_CONCTAU, IF_FLAG, "Conc-dependent SRH recomb"), IP("conctau", MODL_CONCTAU, IF_FLAG, "Conc-dependent SRH recomb"), IP("auger", MODL_AUGER, IF_FLAG, "Auger recombination"), IP("avalanche",MODL_AVAL, IF_FLAG, "Local avalanche generation") }; IFcardInfo MODLinfo = { "models", "Specify which physical models should be simulated", NUMELEMS(MODLpTable), MODLpTable, MODLnewCard, MODLparam, NULL }; int MODLnewCard(GENcard **inCard, GENmodel *inModel) { MODLcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; tmpCard = model->GENmodels; if (!tmpCard) { /* First in list */ newCard = NEW( MODLcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->MODLnextCard = NULL; *inCard = (GENcard *) newCard; model->GENmodels = newCard; } else { /* Only one card of this type allowed */ *inCard = (GENcard *) tmpCard; } return(OK); } int MODLparam(int param, IFvalue *value, GENcard *inCard) { MODLcard *card = (MODLcard *)inCard; switch (param) { case MODL_BGNW: card->MODLbandGapNarrowing = value->iValue; card->MODLbandGapNarrowingGiven = TRUE; break; case MODL_TEMPMOB: card->MODLtempDepMobility = value->iValue; card->MODLtempDepMobilityGiven = TRUE; break; case MODL_CONCMOB: card->MODLconcDepMobility = value->iValue; card->MODLconcDepMobilityGiven = TRUE; break; case MODL_TRANSMOB: card->MODLtransDepMobility = value->iValue; card->MODLtransDepMobilityGiven = TRUE; break; case MODL_FIELDMOB: card->MODLfieldDepMobility = value->iValue; card->MODLfieldDepMobilityGiven = TRUE; break; case MODL_SURFMOB: card->MODLsurfaceMobility = value->iValue; card->MODLsurfaceMobilityGiven = TRUE; break; case MODL_MATCHMOB: card->MODLmatchingMobility = value->iValue; card->MODLmatchingMobilityGiven = TRUE; break; case MODL_SRH: card->MODLsrh = value->iValue; card->MODLsrhGiven = TRUE; break; case MODL_CONCTAU: card->MODLconcDepLifetime = value->iValue; card->MODLconcDepLifetimeGiven = TRUE; break; case MODL_AUGER: card->MODLauger = value->iValue; card->MODLaugerGiven = TRUE; break; case MODL_AVAL: card->MODLavalancheGen = value->iValue; card->MODLavalancheGenGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/domnset.c0000644000265600020320000001336012264261473017554 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modifed: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/numenum.h" #include "ngspice/domndefs.h" #include "ngspice/material.h" #include "ngspice/meshext.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern int DOMNcheck( DOMNcard *, MATLmaterial * ); extern int DOMNsetup( DOMNcard *, DOMNdomain **, MESHcoord *, MESHcoord *, MATLmaterial * ); /* * Name: DOMNcheck * Purpose: checks a list of DOMNcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int DOMNcheck(DOMNcard *cardList, MaterialInfo *matlList) { DOMNcard *card; MATLmaterial *matl; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->DOMNnextCard ) { cardNum++; if (card->DOMNxLowGiven && card->DOMNixLowGiven) { sprintf( ebuf, "domain card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->DOMNxLowGiven = FALSE; } if (card->DOMNxHighGiven && card->DOMNixHighGiven) { sprintf( ebuf, "domain card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->DOMNxHighGiven = FALSE; } if (card->DOMNyLowGiven && card->DOMNiyLowGiven) { sprintf( ebuf, "domain card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->DOMNyLowGiven = FALSE; } if (card->DOMNyHighGiven && card->DOMNiyHighGiven) { sprintf( ebuf, "domain card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->DOMNyHighGiven = FALSE; } if (!card->DOMNmaterialGiven) { sprintf( ebuf, "domain card %d is missing a material index", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } else { /* Make sure the material exists */ for ( matl = matlList; matl != NULL; matl = matl->next ) { if ( card->DOMNmaterial == matl->id ) { break; } } if (matl == NULL) { sprintf( ebuf, "domain card %d specifies a non-existent material", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } if (!card->DOMNnumberGiven) { sprintf( ebuf, "domain card %d is missing an ID number", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: DOMNsetup * Purpose: convert a list of DOMNcard's to DOMNdomain's * Formals: cardList: list of cards to setup * domainList: returns the list of DOMNdomain's * xMeshList: list of coordinates in the x mesh * yMeshList: list of coordinates in the y mesh * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: DOMNcheck */ int DOMNsetup(DOMNcard *cardList, DOMNdomain **domainList, MESHcoord *xMeshList, MESHcoord *yMeshList, MaterialInfo *materialList) { DOMNcard *card; DOMNdomain *newDomain = NULL; int ixMin, ixMax, iyMin, iyMax; int cardNum = 0; int error; char ebuf[512]; /* error message buffer */ /* Initialize list of domains */ *domainList = NULL; /* Check the card list */ if ((error = DOMNcheck( cardList, materialList )) != 0) return( error ); /* Find the limits on the indices */ MESHiBounds( xMeshList, &ixMin, &ixMax ); MESHiBounds( yMeshList, &iyMin, &iyMax ); error = OK; for ( card = cardList; card != NULL; card = card->DOMNnextCard ) { cardNum++; if (*domainList == NULL) { RALLOC( newDomain, DOMNdomain, 1 ); *domainList = newDomain; } else { RALLOC( newDomain->next, DOMNdomain, 1 ); newDomain = newDomain->next; } newDomain->id = card->DOMNnumber; newDomain->material = card->DOMNmaterial; newDomain->next = NULL; if (card->DOMNixLowGiven) { newDomain->ixLo = MAX(card->DOMNixLow, ixMin); } else if (card->DOMNxLowGiven) { newDomain->ixLo = MESHlocate( xMeshList, card->DOMNxLow ); } else { newDomain->ixLo = ixMin; } if (card->DOMNixHighGiven) { newDomain->ixHi = MIN(card->DOMNixHigh, ixMax); } else if (card->DOMNxHighGiven) { newDomain->ixHi = MESHlocate( xMeshList, card->DOMNxHigh ); } else { newDomain->ixHi = ixMax; } if (newDomain->ixLo > newDomain->ixHi) { sprintf( ebuf, "domain card %d has low x index (%d) > high x index (%d)", cardNum, newDomain->ixLo, newDomain->ixHi ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } if (card->DOMNiyLowGiven) { newDomain->iyLo = MAX(card->DOMNiyLow, iyMin); } else if (card->DOMNyLowGiven) { newDomain->iyLo = MESHlocate( yMeshList, card->DOMNyLow ); } else { newDomain->iyLo = iyMin; } if (card->DOMNiyHighGiven) { newDomain->iyHi = MIN(card->DOMNiyHigh, iyMax); } else if (card->DOMNyHighGiven) { newDomain->iyHi = MESHlocate( yMeshList, card->DOMNyHigh ); } else { newDomain->iyHi = iyMax; } if (newDomain->iyLo > newDomain->iyHi) { sprintf( ebuf, "domain card %d has low y index (%d) > high y index (%d)", cardNum, newDomain->iyLo, newDomain->iyHi ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } return( error ); } ngspice-26/src/ciderlib/input/method.c0000644000265600020320000000624212264261473017364 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/numenum.h" #include "ngspice/methdefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" extern int METHnewCard(GENcard**,GENmodel*); extern int METHparam(int,IFvalue*,GENcard*); IFparm METHpTable[] = { IP("devtol", METH_DABSTOL, IF_REAL, "Absolute tolerance on device equations"), IP("dabstol", METH_DABSTOL, IF_REAL, "Absolute tolerance on device equations"), IP("dreltol", METH_DRELTOL, IF_REAL, "Relative tolerance on device equations"), IP("onecarrier",METH_ONEC, IF_FLAG, "Solve for majority carriers only"), IP("ac.analysis",METH_ACANAL, IF_STRING, "AC solution technique"), IP("frequency",METH_OMEGA, IF_REAL, "AC default frequency"), IP("nomobderiv",METH_NOMOBDERIV,IF_FLAG, "Ignore mobility derivatives"), IP("itlim", METH_ITLIM, IF_INTEGER, "Iteration limit"), IP("voltpred",METH_VOLTPRED, IF_FLAG, "Perform DC voltage prediction") }; IFcardInfo METHinfo = { "method", "Specify parameters and types of simulation methods", NUMELEMS(METHpTable), METHpTable, METHnewCard, METHparam, NULL }; int METHnewCard(GENcard **inCard, GENmodel *inModel) { METHcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; tmpCard = model->GENmethods; if (!tmpCard) { /* First in list */ newCard = NEW( METHcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->METHnextCard = NULL; *inCard = (GENcard *) newCard; model->GENmethods = newCard; } else { /* Only one card of this type allowed */ *inCard = (GENcard *)tmpCard; } return(OK); } int METHparam(int param, IFvalue *value, GENcard *inCard) { METHcard *card = (METHcard *)inCard; switch (param) { case METH_DABSTOL: card->METHdabstol = value->rValue; card->METHdabstolGiven = TRUE; break; case METH_DRELTOL: card->METHdreltol = value->rValue; card->METHdreltolGiven = TRUE; break; case METH_OMEGA: card->METHomega = 2.0 * M_PI * value->rValue; card->METHomegaGiven = TRUE; break; case METH_ONEC: card->METHoneCarrier = value->iValue; card->METHoneCarrierGiven = TRUE; break; case METH_NOMOBDERIV: card->METHmobDeriv = !(value->iValue); card->METHmobDerivGiven = TRUE; break; case METH_ACANAL: if ( cinprefix( value->sValue, "direct", 1 ) ) { card->METHacAnalysisMethod = DIRECT; card->METHacAnalysisMethodGiven = TRUE; } else if ( cinprefix( value->sValue, "sor", 1 ) ) { card->METHacAnalysisMethod = SOR; card->METHacAnalysisMethodGiven = TRUE; } break; case METH_ITLIM: card->METHitLim = value->iValue; card->METHitLimGiven = TRUE; break; case METH_VOLTPRED: card->METHvoltPred = value->iValue; card->METHvoltPredGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/electrod.c0000644000265600020320000000575512264261473017715 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/elctdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define UM_TO_CM 1.0e-4 extern int ELCTnewCard(GENcard**,GENmodel*); extern int ELCTparam(int,IFvalue*,GENcard*); IFparm ELCTpTable[] = { IP("x.low", ELCT_X_LOW, IF_REAL, "Location of left edge"), IP("x.high", ELCT_X_HIGH, IF_REAL, "Location of right edge"), IP("y.low", ELCT_Y_LOW, IF_REAL, "Location of top edge"), IP("y.high", ELCT_Y_HIGH, IF_REAL, "Location of bottom edge"), IP("ix.low", ELCT_IX_LOW, IF_INTEGER, "Index of left edge"), IP("ix.high", ELCT_IX_HIGH, IF_INTEGER, "Index of right edge"), IP("iy.low", ELCT_IY_LOW, IF_INTEGER, "Index of top edge"), IP("iy.high", ELCT_IY_HIGH, IF_INTEGER, "Index of bottom edge"), IP("number", ELCT_NUMBER, IF_INTEGER, "Electrode ID number") }; IFcardInfo ELCTinfo = { "electrode", "Location of a contact to the device", NUMELEMS(ELCTpTable), ELCTpTable, ELCTnewCard, ELCTparam, NULL }; int ELCTnewCard(GENcard **inCard, GENmodel *inModel) { ELCTcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( ELCTcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->ELCTnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENelectrodes; if (!tmpCard) { /* First in list */ model->GENelectrodes = newCard; } else { /* Go to end of list */ while (tmpCard->ELCTnextCard) tmpCard = tmpCard->ELCTnextCard; /* And add new card */ tmpCard->ELCTnextCard = newCard; } return(OK); } int ELCTparam(int param, IFvalue *value, GENcard *inCard) { ELCTcard *card = (ELCTcard *)inCard; switch (param) { case ELCT_X_LOW: card->ELCTxLow = value->rValue * UM_TO_CM; card->ELCTxLowGiven = TRUE; break; case ELCT_X_HIGH: card->ELCTxHigh = value->rValue * UM_TO_CM; card->ELCTxHighGiven = TRUE; break; case ELCT_Y_LOW: card->ELCTyLow = value->rValue * UM_TO_CM; card->ELCTyLowGiven = TRUE; break; case ELCT_Y_HIGH: card->ELCTyHigh = value->rValue * UM_TO_CM; card->ELCTyHighGiven = TRUE; break; case ELCT_IX_LOW: card->ELCTixLow = value->iValue; card->ELCTixLowGiven = TRUE; break; case ELCT_IX_HIGH: card->ELCTixHigh = value->iValue; card->ELCTixHighGiven = TRUE; break; case ELCT_IY_LOW: card->ELCTiyLow = value->iValue; card->ELCTiyLowGiven = TRUE; break; case ELCT_IY_HIGH: card->ELCTiyHigh = value->iValue; card->ELCTiyHighGiven = TRUE; break; case ELCT_NUMBER: card->ELCTnumber = value->iValue; card->ELCTnumberGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/input/mobset.c0000644000265600020320000001021112264261473017364 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/mobdefs.h" #include "ngspice/material.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cidersupt.h" extern int MOBcheck( MOBcard *, MaterialInfo * ); extern int MOBsetup( MOBcard *, MaterialInfo * ); /* * Name: MOBcheck * Purpose: checks a list of MOBcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int MOBcheck(MOBcard *cardList, MaterialInfo *matlList) { MOBcard *card; MATLmaterial *matl; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->MOBnextCard ) { cardNum++; if (!card->MOBmaterialGiven) { sprintf( ebuf, "mobility card %d is missing a material index", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } else { /* Make sure the material exists */ for ( matl = matlList; matl != NULL; matl = matl->next ) { if ( card->MOBmaterial == matl->id ) { break; } } if (matl == NULL) { sprintf( ebuf, "mobility card %d specifies a non-existent material", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } if (!card->MOBcarrierGiven) { card->MOBcarrier = ELEC; } if (!card->MOBcarrTypeGiven) { card->MOBcarrType = MAJOR; } if (!card->MOBinitGiven) { card->MOBinit = FALSE; } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: MOBsetup * Purpose: setup the mobility model parameters * Formals: cardList: list of cards to setup * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: MOBcheck */ int MOBsetup(MOBcard *cardList, MaterialInfo *materialList) { MOBcard *card; MATLmaterial *matl; int error; /* Check the card list */ if ((error = MOBcheck( cardList, materialList )) != 0) return( error ); for ( card = cardList; card != NULL; card = card->MOBnextCard ) { /* Find the right material */ for ( matl = materialList; matl != NULL; matl = matl->next ) { if ( card->MOBmaterial == matl->id ) { break; } } /* Default models depend on previous value */ if (!card->MOBconcModelGiven) { card->MOBconcModel = matl->concModel; } if (!card->MOBfieldModelGiven) { card->MOBfieldModel = matl->fieldModel; } /* Load in default values if desired */ if ( card->MOBinitGiven ) { MOBdefaults( matl, card->MOBcarrier, card->MOBcarrType, card->MOBconcModel, card->MOBfieldModel ); } /* Override defaults */ if ( card->MOBconcModelGiven ) { matl->concModel = card->MOBconcModel; } if ( card->MOBfieldModelGiven ) { matl->fieldModel = card->MOBfieldModel; } if ( card->MOBmuMaxGiven ) { matl->muMax[card->MOBcarrier][card->MOBcarrType] = card->MOBmuMax; } if ( card->MOBmuMinGiven ) { matl->muMin[card->MOBcarrier][card->MOBcarrType] = card->MOBmuMin; } if ( card->MOBntRefGiven ) { matl->ntRef[card->MOBcarrier][card->MOBcarrType] = card->MOBntRef; } if ( card->MOBntExpGiven ) { matl->ntExp[card->MOBcarrier][card->MOBcarrType] = card->MOBntExp; } if ( card->MOBvSatGiven ) { matl->vSat[card->MOBcarrier] = card->MOBvSat; } if ( card->MOBvWarmGiven ) { matl->vWarm[card->MOBcarrier] = card->MOBvWarm; } if ( card->MOBmusGiven ) { matl->mus[card->MOBcarrier] = card->MOBmus; } if ( card->MOBecAGiven ) { matl->thetaA[card->MOBcarrier] = 1.0 / MAX( card->MOBecA, 1e-20 ); } if ( card->MOBecBGiven ) { matl->thetaB[card->MOBcarrier] = 1.0 / MAX( ABS(card->MOBecB), 1e-20 ); matl->thetaB[card->MOBcarrier] *= matl->thetaB[card->MOBcarrier]; matl->thetaB[card->MOBcarrier] *= SGN( card->MOBecB ); } } return( OK ); } ngspice-26/src/ciderlib/input/bdryset.c0000644000265600020320000001326112264261473017557 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/bdrydefs.h" #include "ngspice/meshext.h" #include "ngspice/gendev.h" #include "ngspice/sperror.h" extern int BDRYcheck( BDRYcard *, DOMNdomain * ); extern int BDRYsetup( BDRYcard *, MESHcoord *, MESHcoord *, DOMNdomain * ); /* * Name: BDRYcheck * Purpose: checks a list of BDRYcards for input errors * Formals: cardList: the list to check * Returns: OK/E_PRIVATE * Users: numerical device setup routines * Calls: error message handler */ int BDRYcheck(BDRYcard *cardList, DOMNdomain *domnList) { BDRYcard *card; DOMNdomain *domn; int cardNum = 0; int error = OK; char ebuf[512]; /* error message buffer */ for ( card = cardList; card != NULL; card = card->BDRYnextCard ) { cardNum++; if (card->BDRYxLowGiven && card->BDRYixLowGiven) { sprintf( ebuf, "boundary card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->BDRYxLowGiven = FALSE; } if (card->BDRYxHighGiven && card->BDRYixHighGiven) { sprintf( ebuf, "boundary card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->BDRYxHighGiven = FALSE; } if (card->BDRYyLowGiven && card->BDRYiyLowGiven) { sprintf( ebuf, "boundary card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->BDRYyLowGiven = FALSE; } if (card->BDRYyHighGiven && card->BDRYiyHighGiven) { sprintf( ebuf, "boundary card %d uses both location and index - location ignored", cardNum ); SPfrontEnd->IFerror( ERR_INFO, ebuf, NULL ); card->BDRYyHighGiven = FALSE; } if (!card->BDRYdomainGiven) { sprintf( ebuf, "boundary card %d is missing a domain index", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } else { /* Make sure the domain exists */ for ( domn = domnList; domn != NULL; domn = domn->next ) { if ( card->BDRYdomain == domn->id ) { break; } } if (domn == NULL) { sprintf( ebuf, "boundary card %d specifies a non-existent domain", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } if (!card->BDRYneighborGiven) { card->BDRYneighbor = card->BDRYdomain; } else { /* Make sure the neighbor exists */ for ( domn = domnList; domn != NULL; domn = domn->next ) { if ( card->BDRYneighbor == domn->id ) { break; } } if (domn == NULL) { sprintf( ebuf, "interface card %d specifies a non-existent domain", cardNum ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } if (!card->BDRYqfGiven) { card->BDRYqf = 0.0; } if (!card->BDRYsnGiven) { card->BDRYsn = 0.0; } if (!card->BDRYspGiven) { card->BDRYsp = 0.0; } if (!card->BDRYlayerGiven) { card->BDRYlayer = 0.0; } /* Return now if anything has failed */ if (error) return(error); } return(OK); } /* * Name: BDRYsetup * Purpose: Checks BDRY cards and then sets the indices * Formals: cardList: list of cards to setup, returns with indices set * xMeshList: list of coordinates in the x mesh * yMeshList: list of coordinates in the y mesh * Returns: OK/E_PRIVATE * Users: numerical devices * Calls: BDRYcheck */ int BDRYsetup(BDRYcard *cardList, MESHcoord *xMeshList, MESHcoord *yMeshList,DOMNdomain *domnList) { BDRYcard *card; int ixMin, ixMax, iyMin, iyMax; int cardNum = 0; int error; char ebuf[512]; /* error message buffer */ /* Check the card list */ if ((error = BDRYcheck( cardList, domnList )) != 0) return( error ); /* Find the limits on the indices */ MESHiBounds( xMeshList, &ixMin, &ixMax ); MESHiBounds( yMeshList, &iyMin, &iyMax ); error = OK; for ( card = cardList; card != NULL; card = card->BDRYnextCard ) { cardNum++; if (card->BDRYixLowGiven) { card->BDRYixLow = MAX(card->BDRYixLow, ixMin); } else if (card->BDRYxLowGiven) { card->BDRYixLow = MESHlocate( xMeshList, card->BDRYxLow ); } else { card->BDRYixLow = ixMin; } if (card->BDRYixHighGiven) { card->BDRYixHigh = MIN(card->BDRYixHigh, ixMax); } else if (card->BDRYxHighGiven) { card->BDRYixHigh = MESHlocate( xMeshList, card->BDRYxHigh ); } else { card->BDRYixHigh = ixMax; } if (card->BDRYixLow > card->BDRYixHigh) { sprintf( ebuf, "boundary card %d has low x index (%d) > high x index (%d)", cardNum, card->BDRYixHigh, card->BDRYixLow ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } if (card->BDRYiyLowGiven) { card->BDRYiyLow = MAX(card->BDRYiyLow, iyMin); } else if (card->BDRYyLowGiven) { card->BDRYiyLow = MESHlocate( yMeshList, card->BDRYyLow ); } else { card->BDRYiyLow = iyMin; } if (card->BDRYiyHighGiven) { card->BDRYiyHigh = MIN(card->BDRYiyHigh, iyMax); } else if (card->BDRYyHighGiven) { card->BDRYiyHigh = MESHlocate( yMeshList, card->BDRYyHigh ); } else { card->BDRYiyHigh = iyMax; } if (card->BDRYiyLow > card->BDRYiyHigh) { sprintf( ebuf, "boundary card %d has low y index (%d) > high y index (%d)", cardNum, card->BDRYiyHigh, card->BDRYiyLow ); SPfrontEnd->IFerror( ERR_WARNING, ebuf, NULL ); error = E_PRIVATE; } } return( error ); } ngspice-26/src/ciderlib/input/doping.c0000644000265600020320000002103512264261473017361 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/numcards.h" #include "ngspice/numgen.h" #include "ngspice/dopdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define UM_TO_CM 1.0e-4 extern int DOPnewCard(GENcard**,GENmodel*); extern int DOPparam(int,IFvalue*,GENcard*); IFparm DOPpTable[] = { IP("domains", DOP_DOMAIN, IF_INTVEC, "Domain(s) to dope"), IP("uniform", DOP_UNIF, IF_FLAG, "Uniform doping"), IP("linear", DOP_LINEAR, IF_FLAG, "Linear graded doping"), IP("gaussian",DOP_GAUSS, IF_FLAG, "Gaussian doping"), IP("gdiff", DOP_GAUSS, IF_FLAG, "Gaussian diffusion"), IP("gimp", DOP_GAUSS, IF_FLAG, "Gaussian implantation"), IP("erfc", DOP_ERFC, IF_FLAG, "Error-function doping"), IP("errfc", DOP_ERFC, IF_FLAG, "Error-function doping"), IP("exponential",DOP_EXP, IF_FLAG, "Exponential doping"), IP("suprem3", DOP_SUPREM3, IF_FLAG, "Suprem3 doping"), IP("ascii", DOP_ASCII, IF_FLAG, "Ascii-input doping"), IP("infile", DOP_INFILE, IF_STRING, "Input-file name"), IP("lat.rotate",DOP_ROTATE_LAT,IF_FLAG, "Rotate principal profile"), IP("lat.unif",DOP_UNIF_LAT, IF_FLAG, "Uniform lateral falloff"), IP("lat.linf",DOP_LINEAR_LAT, IF_FLAG, "Linear lateral falloff"), IP("lat.gauss",DOP_GAUSS_LAT, IF_FLAG, "Gaussian lateral falloff"), IP("lat.erfc",DOP_ERFC_LAT, IF_FLAG, "Erfc lateral falloff"), IP("lat.exp", DOP_EXP_LAT, IF_FLAG, "Exponential lateral falloff"), IP("boron", DOP_BORON, IF_FLAG, "Boron impurities"), IP("phosphorus",DOP_PHOSP, IF_FLAG, "Phosphorus impurities"), IP("arsenic", DOP_ARSEN, IF_FLAG, "Arsenic impurities"), IP("antimony",DOP_ANTIM, IF_FLAG, "Antimony impurities"), IP("p.type", DOP_P_TYPE, IF_FLAG, "P-type impurities"), IP("acceptor",DOP_P_TYPE, IF_FLAG, "Acceptor impurities"), IP("n.type", DOP_N_TYPE, IF_FLAG, "N-type impurities"), IP("donor", DOP_N_TYPE, IF_FLAG, "Donor impurities"), IP("x.axis", DOP_X_AXIS, IF_FLAG, "X principal axis"), IP("y.axis", DOP_Y_AXIS, IF_FLAG, "Y principal axis"), IP("x.low", DOP_X_LOW, IF_REAL, "Low X edge"), IP("x.high", DOP_X_HIGH, IF_REAL, "High X edge"), IP("y.low", DOP_Y_LOW, IF_REAL, "Low Y edge"), IP("y.high", DOP_Y_HIGH, IF_REAL, "High Y edge"), IP("conc", DOP_CONC, IF_REAL, "Concentration"), IP("peak.conc",DOP_CONC, IF_REAL, "Peak concentration"), IP("location",DOP_LOCATION, IF_REAL, "Peak location"), IP("range", DOP_LOCATION, IF_REAL, "Peak location"), IP("char.length",DOP_CHAR_LEN,IF_REAL, "Characteristic length"), IP("ratio.lat",DOP_RATIO_LAT, IF_REAL, "Lateral ratio") }; IFcardInfo DOPinfo = { "doping", "Add dopant to domains of a device", NUMELEMS(DOPpTable), DOPpTable, DOPnewCard, DOPparam, NULL }; int DOPnewCard(GENcard **inCard, GENmodel *inModel) { DOPcard *tmpCard, *newCard; GENnumModel *model = (GENnumModel *)inModel; newCard = NEW( DOPcard ); if (!newCard) { *inCard = NULL; return(E_NOMEM); } newCard->DOPnextCard = NULL; *inCard = (GENcard *) newCard; tmpCard = model->GENdopings; if (!tmpCard) { /* First in list */ model->GENdopings = newCard; } else { /* Go to end of list */ while (tmpCard->DOPnextCard) tmpCard = tmpCard->DOPnextCard; /* And add new card */ tmpCard->DOPnextCard = newCard; } return(OK); } int DOPparam(int param, IFvalue *value, GENcard *inCard) { int i; DOPcard *card = (DOPcard *)inCard; switch (param) { case DOP_DOMAIN: if ( !card->DOPdomainsGiven ) { card->DOPnumDomains = value->v.numValue; card->DOPdomains = TMALLOC(int, value->v.numValue); for ( i=0; i < card->DOPnumDomains; i++ ) { card->DOPdomains[i] = value->v.vec.iVec[i]; } card->DOPdomainsGiven = TRUE; } /* else: do nothing, can only define domains once */ break; case DOP_ROTATE_LAT: card->DOProtateLat = TRUE; card->DOProtateLatGiven = TRUE; break; case DOP_UNIF: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_UNIF; card->DOPprofileTypeGiven = TRUE; } break; case DOP_UNIF_LAT: if ( !card->DOPlatProfileTypeGiven ) { card->DOPlatProfileType = DOP_UNIF; card->DOPlatProfileTypeGiven = TRUE; } break; case DOP_LINEAR: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_LINEAR; card->DOPprofileTypeGiven = TRUE; } break; case DOP_LINEAR_LAT: if ( !card->DOPlatProfileTypeGiven ) { card->DOPlatProfileType = DOP_LINEAR_LAT; card->DOPlatProfileTypeGiven = TRUE; } break; case DOP_GAUSS: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_GAUSS; card->DOPprofileTypeGiven = TRUE; } break; case DOP_GAUSS_LAT: if ( !card->DOPlatProfileTypeGiven ) { card->DOPlatProfileType = DOP_GAUSS; card->DOPlatProfileTypeGiven = TRUE; } break; case DOP_ERFC: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_ERFC; card->DOPprofileTypeGiven = TRUE; } break; case DOP_ERFC_LAT: if ( !card->DOPlatProfileTypeGiven ) { card->DOPlatProfileType = DOP_ERFC; card->DOPlatProfileTypeGiven = TRUE; } break; case DOP_EXP: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_EXP; card->DOPprofileTypeGiven = TRUE; } break; case DOP_EXP_LAT: if ( !card->DOPlatProfileTypeGiven ) { card->DOPlatProfileType = DOP_EXP; card->DOPlatProfileTypeGiven = TRUE; } break; case DOP_SUPREM3: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_SUPREM3; card->DOPprofileTypeGiven = TRUE; } else if ( card->DOPprofileType == DOP_ASCII ) { card->DOPprofileType = DOP_SUPASCII; } break; case DOP_ASCII: if ( !card->DOPprofileTypeGiven ) { card->DOPprofileType = DOP_ASCII; card->DOPprofileTypeGiven = TRUE; } else if ( card->DOPprofileType == DOP_SUPREM3 ) { card->DOPprofileType = DOP_SUPASCII; } break; case DOP_BORON: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_BORON; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_PHOSP: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_PHOSP; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_ARSEN: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_ARSEN; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_ANTIM: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_ANTIM; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_P_TYPE: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_P_TYPE; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_N_TYPE: if ( !card->DOPimpurityTypeGiven ) { card->DOPimpurityType = DOP_N_TYPE; card->DOPimpurityTypeGiven = TRUE; } break; case DOP_X_AXIS: if ( !card->DOPaxisTypeGiven ) { card->DOPaxisType = DOP_X_AXIS; card->DOPaxisTypeGiven = TRUE; } break; case DOP_Y_AXIS: if ( !card->DOPaxisTypeGiven ) { card->DOPaxisType = DOP_Y_AXIS; card->DOPaxisTypeGiven = TRUE; } break; case DOP_INFILE: card->DOPinFile = value->sValue; card->DOPinFileGiven = TRUE; break; case DOP_X_LOW: card->DOPxLow = value->rValue * UM_TO_CM; card->DOPxLowGiven = TRUE; break; case DOP_X_HIGH: card->DOPxHigh = value->rValue * UM_TO_CM; card->DOPxHighGiven = TRUE; break; case DOP_Y_LOW: card->DOPyLow = value->rValue * UM_TO_CM; card->DOPyLowGiven = TRUE; break; case DOP_Y_HIGH: card->DOPyHigh = value->rValue * UM_TO_CM; card->DOPyHighGiven = TRUE; break; case DOP_CONC: card->DOPconc = fabs(value->rValue); card->DOPconcGiven = TRUE; break; case DOP_LOCATION: card->DOPlocation = value->rValue * UM_TO_CM; card->DOPlocationGiven = TRUE; break; case DOP_CHAR_LEN: card->DOPcharLen = value->rValue * UM_TO_CM; card->DOPcharLenGiven = TRUE; break; case DOP_RATIO_LAT: card->DOPratioLat = value->rValue; card->DOPratioLatGiven = TRUE; break; default: return(E_BADPARM); break; } return(OK); } ngspice-26/src/ciderlib/twod/0000755000265600020320000000000012264261713015547 5ustar andreasadminngspice-26/src/ciderlib/twod/twocurr.c0000644000265600020320000001166312264261473017432 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" void nodeCurrents(TWOelem *pElem, TWOnode *pNode, double *mun, double *mup, double *jnx, double *jny, double *jpx, double *jpy, double *jdx, double *jdy) { TWOelem *pElemTL, *pElemTR, *pElemBL, *pElemBR; TWOedge *pEdgeT, *pEdgeB, *pEdgeL, *pEdgeR; int materT = 0, materB = 0, materL = 0, materR = 0; int numFound = 0; double dxL = 0.0, dxR = 0.0, dyT = 0.0, dyB = 0.0; double epsL = 0.0, epsR = 0.0, epsT = 0.0, epsB = 0.0; double coeff1, coeff2; NG_IGNORE(pElem); /* Find all four neighboring elements */ pElemTL = pNode->pTLElem; pElemTR = pNode->pTRElem; pElemBL = pNode->pBLElem; pElemBR = pNode->pBRElem; /* Null edge pointers */ pEdgeT = pEdgeB = pEdgeL = pEdgeR = NULL; /* Zero mobilities */ *mun = *mup = 0.0; /* Find edges next to node */ if (pElemTL != NULL) { numFound++; *mun += pElemTL->mun0; *mup += pElemTL->mup0; if (pElemTL->evalEdges[1]) { pEdgeT = pElemTL->pRightEdge; materT = pElemTL->elemType; dyT = pElemTL->dy; epsT = pElemTL->epsRel; } if (pElemTL->evalEdges[2]) { pEdgeL = pElemTL->pBotEdge; materL = pElemTL->elemType; dxL = pElemTL->dx; epsL = pElemTL->epsRel; } } if (pElemTR != NULL) { numFound++; *mun += pElemTR->mun0; *mup += pElemTR->mup0; if (pElemTR->evalEdges[3]) { pEdgeT = pElemTR->pLeftEdge; materT = pElemTR->elemType; epsT = pElemTR->epsRel; } if (pElemTR->evalEdges[2]) { pEdgeR = pElemTR->pBotEdge; materR = pElemTR->elemType; dxR = pElemTR->dx; epsR = pElemTR->epsRel; } } if (pElemBR != NULL) { numFound++; *mun += pElemBR->mun0; *mup += pElemBR->mup0; if (pElemBR->evalEdges[3]) { pEdgeB = pElemBR->pLeftEdge; materB = pElemBR->elemType; dyB = pElemBR->dy; epsB = pElemBR->epsRel; } if (pElemBR->evalEdges[0]) { pEdgeR = pElemBR->pTopEdge; materR = pElemBR->elemType; dxR = pElemBR->dx; epsR = pElemBR->epsRel; } } if (pElemBL != NULL) { numFound++; *mun += pElemBL->mun0; *mup += pElemBL->mup0; if (pElemBL->evalEdges[1]) { pEdgeB = pElemBL->pRightEdge; materB = pElemBL->elemType; dyB = pElemBL->dy; epsB = pElemBL->epsRel; } if (pElemBL->evalEdges[0]) { pEdgeL = pElemBL->pTopEdge; materL = pElemBL->elemType; dxL = pElemBL->dx; epsL = pElemBL->epsRel; } } *mun /= (double) numFound; *mup /= (double) numFound; /* compute horizontal vector components */ /* No more than one of Left Edge or Right Edge is absent */ /* If one is absent the other is guaranteed to be from silicon */ if (pEdgeL == NULL) { if (pNode->nodeType == CONTACT) { *jnx = pEdgeR->jn; *jpx = pEdgeR->jp; *jdx = pEdgeR->jd; } else { *jnx = 0.0; *jpx = 0.0; *jdx = 0.0; } } else if (pEdgeR == NULL) { if (pNode->nodeType == CONTACT) { *jnx = pEdgeL->jn; *jpx = pEdgeL->jp; *jdx = pEdgeL->jd; } else { *jnx = 0.0; *jpx = 0.0; *jdx = 0.0; } } else { /* Both edges are present */ coeff1 = dxL / (dxL + dxR); coeff2 = dxR / (dxL + dxR); if ((materL == INSULATOR) || (materR == INSULATOR)) { *jnx = 0.0; *jpx = 0.0; *jdx = coeff2 * epsL * pEdgeL->jd + coeff1 * epsR * pEdgeR->jd; } else { *jnx = coeff2 * pEdgeL->jn + coeff1 * pEdgeR->jn; *jpx = coeff2 * pEdgeL->jp + coeff1 * pEdgeR->jp; *jdx = coeff2 * pEdgeL->jd + coeff1 * pEdgeR->jd; } } /* compute vertical vector components */ /* No more than one of Top Edge or Bottom Edge is absent */ /* If one is absent the other is guaranteed to be from silicon */ if (pEdgeT == NULL) { if (pNode->nodeType == CONTACT) { *jny = pEdgeB->jn; *jpy = pEdgeB->jp; *jdy = pEdgeB->jd; } else { *jny = 0.0; *jpy = 0.0; *jdy = 0.0; } } else if (pEdgeB == NULL) { if (pNode->nodeType == CONTACT) { *jny = pEdgeT->jn; *jpy = pEdgeT->jp; *jdy = pEdgeT->jd; } else { *jny = 0.0; *jpy = 0.0; *jdy = 0.0; } } else { /* Both edges are present */ coeff1 = dyT / (dyT + dyB); coeff2 = dyB / (dyT + dyB); if ((materT == INSULATOR) || (materB == INSULATOR)) { *jny = 0.0; *jpy = 0.0; *jdy = coeff2 * epsT * pEdgeT->jd + coeff1 * epsB * pEdgeB->jd; } else { *jny = coeff2 * pEdgeT->jn + coeff1 * pEdgeB->jn; *jpy = coeff2 * pEdgeT->jp + coeff1 * pEdgeB->jp; *jdy = coeff2 * pEdgeT->jd + coeff1 * pEdgeB->jd; } } } ngspice-26/src/ciderlib/twod/twoprint.c0000644000265600020320000004122012264261473017603 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/carddefs.h" #include "ngspice/spmatrix.h" #include "ngspice/bool.h" #include "twoddefs.h" #include "twodext.h" #include void TWOprnSolution(FILE *file, TWOdevice *pDevice, OUTPcard *output) { int index, xIndex, yIndex; int numVars = 0; TWOnode ***nodeArray = NULL; TWOnode *pNode; TWOmaterial *info; double data[50]; double ex, ey, refPsi = 0.0, eGap, dGap; double mun, mup; double jcx, jdx, jnx, jpx, jtx; double jcy, jdy, jny, jpy, jty; double *xScale = pDevice->xScale; double *yScale = pDevice->yScale; if (output->OUTPnumVars == -1) { /* First pass. Need to count number of variables in output. */ numVars += 2; /* For the X & Y scales */ if (output->OUTPdoping) { numVars++; } if (output->OUTPpsi) { numVars++; } if (output->OUTPequPsi) { numVars++; } if (output->OUTPvacPsi) { numVars++; } if (output->OUTPnConc) { numVars++; } if (output->OUTPpConc) { numVars++; } if (output->OUTPphin) { numVars++; } if (output->OUTPphip) { numVars++; } if (output->OUTPphic) { numVars++; } if (output->OUTPphiv) { numVars++; } if (output->OUTPeField) { numVars += 2; } if (output->OUTPjc) { numVars += 2; } if (output->OUTPjd) { numVars += 2; } if (output->OUTPjn) { numVars += 2; } if (output->OUTPjp) { numVars += 2; } if (output->OUTPjt) { numVars += 2; } if (output->OUTPuNet) { numVars++; } if (output->OUTPmun) { numVars++; } if (output->OUTPmup) { numVars++; } output->OUTPnumVars = numVars; } /* generate the work array for printing node info */ XCALLOC(nodeArray, TWOnode **, 1 + pDevice->numXNodes); for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { XCALLOC(nodeArray[xIndex], TWOnode *, 1 + pDevice->numYNodes); } /* store the nodes in this work array and print out later */ for (xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) { for (yIndex = 1; yIndex < pDevice->numYNodes; yIndex++) { TWOelem *pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { if (refPsi == 0.0 && pElem->matlInfo->type == SEMICON) { refPsi = pElem->matlInfo->refPsi; } for (index = 0; index < 4; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; nodeArray[pNode->nodeI][pNode->nodeJ] = pNode; } } } } } /* Initialize rawfile */ numVars = output->OUTPnumVars; fprintf(file, "Title: Device %s internal state\n", pDevice->name); fprintf(file, "Plotname: Device Cross Section\n"); fprintf(file, "Flags: real\n"); fprintf(file, "Command: deftype p xs cross\n"); fprintf(file, "Command: deftype v distance m\n"); fprintf(file, "Command: deftype v concentration cm^-3\n"); fprintf(file, "Command: deftype v electric_field V/cm\n"); fprintf(file, "Command: deftype v current_density A/cm^2\n"); fprintf(file, "Command: deftype v concentration/time cm^-3/s\n"); fprintf(file, "Command: deftype v mobility cm^2/Vs\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: %d\n", pDevice->numXNodes * pDevice->numYNodes); fprintf(file, "Dimensions: %d,%d\n", pDevice->numXNodes, pDevice->numYNodes); numVars = 0; fprintf(file, "Variables:\n"); fprintf(file, "\t%d y distance\n", numVars++); fprintf(file, "\t%d x distance\n", numVars++); if (output->OUTPpsi) { fprintf(file, "\t%d psi voltage\n", numVars++); } if (output->OUTPequPsi) { fprintf(file, "\t%d equ.psi voltage\n", numVars++); } if (output->OUTPvacPsi) { fprintf(file, "\t%d vac.psi voltage\n", numVars++); } if (output->OUTPphin) { fprintf(file, "\t%d phin voltage\n", numVars++); } if (output->OUTPphip) { fprintf(file, "\t%d phip voltage\n", numVars++); } if (output->OUTPphic) { fprintf(file, "\t%d phic voltage\n", numVars++); } if (output->OUTPphiv) { fprintf(file, "\t%d phiv voltage\n", numVars++); } if (output->OUTPdoping) { fprintf(file, "\t%d dop concentration\n", numVars++); } if (output->OUTPnConc) { fprintf(file, "\t%d n concentration\n", numVars++); } if (output->OUTPpConc) { fprintf(file, "\t%d p concentration\n", numVars++); } if (output->OUTPeField) { fprintf(file, "\t%d ex electric_field\n", numVars++); fprintf(file, "\t%d ey electric_field\n", numVars++); } if (output->OUTPjc) { fprintf(file, "\t%d jcx current_density\n", numVars++); fprintf(file, "\t%d jcy current_density\n", numVars++); } if (output->OUTPjd) { fprintf(file, "\t%d jdx current_density\n", numVars++); fprintf(file, "\t%d jdy current_density\n", numVars++); } if (output->OUTPjn) { fprintf(file, "\t%d jnx current_density\n", numVars++); fprintf(file, "\t%d jny current_density\n", numVars++); } if (output->OUTPjp) { fprintf(file, "\t%d jpx current_density\n", numVars++); fprintf(file, "\t%d jpy current_density\n", numVars++); } if (output->OUTPjt) { fprintf(file, "\t%d jtx current_density\n", numVars++); fprintf(file, "\t%d jty current_density\n", numVars++); } if (output->OUTPuNet) { fprintf(file, "\t%d unet concentration/time\n", numVars++); } if (output->OUTPmun) { fprintf(file, "\t%d mun mobility\n", numVars++); } if (output->OUTPmup) { fprintf(file, "\t%d mup mobility\n", numVars++); } fprintf(file, "Binary:\n"); for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { for (yIndex = 1; yIndex <= pDevice->numYNodes; yIndex++) { pNode = nodeArray[xIndex][yIndex]; if (pNode != NULL) { TWOelem *pElem = NULL; /* Find the element to which this node belongs. */ for (index = 0; index < 4; index++) { pElem = pNode->pElems[index]; if (pElem != NULL && pElem->evalNodes[(index + 2) % 4]) break; } nodeFields(pElem, pNode, &ex, &ey); nodeCurrents(pElem, pNode, &mun, &mup, &jnx, &jny, &jpx, &jpy, &jdx, &jdy); jcx = jnx + jpx; jcy = jny + jpy; jtx = jcx + jdx; jty = jcy + jdy; info = pElem->matlInfo; eGap = pNode->eg * VNorm; dGap = 0.5 * (info->eg0 - eGap); /* Now fill in the data array */ numVars = 0; data[numVars++] = yScale[yIndex] * 1e-2; data[numVars++] = xScale[xIndex] * 1e-2; if (output->OUTPpsi) { data[numVars++] = (pNode->psi - refPsi) * VNorm; } if (output->OUTPequPsi) { data[numVars++] = (pNode->psi0 - refPsi) * VNorm; } if (output->OUTPvacPsi) { data[numVars++] = pNode->psi * VNorm; } if (output->OUTPphin) { if (info->type != INSULATOR) { data[numVars++] = (pNode->psi - refPsi - log(pNode->nConc / pNode->nie)) * VNorm; } else { data[numVars++] = 0.0; } } if (output->OUTPphip) { if (info->type != INSULATOR) { data[numVars++] = (pNode->psi - refPsi + log(pNode->pConc / pNode->nie)) * VNorm; } else { data[numVars++] = 0.0; } } if (output->OUTPphic) { data[numVars++] = (pNode->psi + pNode->eaff) * VNorm + dGap; } if (output->OUTPphiv) { data[numVars++] = (pNode->psi + pNode->eaff) * VNorm + dGap + eGap; } if (output->OUTPdoping) { data[numVars++] = pNode->netConc * NNorm; } if (output->OUTPnConc) { data[numVars++] = pNode->nConc * NNorm; } if (output->OUTPpConc) { data[numVars++] = pNode->pConc * NNorm; } if (output->OUTPeField) { data[numVars++] = ex * ENorm; data[numVars++] = ey * ENorm; } if (output->OUTPjc) { data[numVars++] = jcx * JNorm; data[numVars++] = jcy * JNorm; } if (output->OUTPjd) { data[numVars++] = jdx * JNorm; data[numVars++] = jdy * JNorm; } if (output->OUTPjn) { data[numVars++] = jnx * JNorm; data[numVars++] = jny * JNorm; } if (output->OUTPjp) { data[numVars++] = jpx * JNorm; data[numVars++] = jpy * JNorm; } if (output->OUTPjt) { data[numVars++] = jtx * JNorm; data[numVars++] = jty * JNorm; } if (output->OUTPuNet) { data[numVars++] = pNode->uNet * NNorm / TNorm; } if (output->OUTPmun) { data[numVars++] = mun; } if (output->OUTPmup) { data[numVars++] = mup; } fwrite(data, sizeof(double), (size_t) numVars, file); } else { for (index = 0; index < output->OUTPnumVars; index++) { data[index] = 0.0; } data[0] = yScale[yIndex] * 1e-2; data[1] = xScale[xIndex] * 1e-2; fwrite(data, sizeof(double), (size_t) numVars, file); } } } /* Delete work array. */ for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { FREE(nodeArray[xIndex]); } FREE(nodeArray); } /* XXX This is what the SPARSE element structure looks like. * We can't take it from its definition because the include * file redefines all sorts of things. Note that we are * violating data encapsulation to find out the size of this * thing. */ struct MatrixElement { spREAL Real; spREAL Imag; int Row; int Col; struct MatrixElement *NextInRow; struct MatrixElement *NextInCol; }; void TWOmemStats(FILE *file, TWOdevice *pDevice) { const char memFormat[] = "%-20s" "%10d" "%10" PRIuPTR "\n"; /* static const char sumFormat[] = "%20s %-10d\n"; */ int size; size_t memory; TWOmaterial *pMaterial; TWOcontact *pContact; TWOchannel *pChannel; int numContactNodes; fprintf(file, "----------------------------------------\n"); fprintf(file, "Device %s Memory Usage:\n", pDevice->name ); fprintf(file, "Item Count Bytes\n"); fprintf(file, "----------------------------------------\n"); size = 1; memory = (size_t) size * sizeof(TWOdevice); fprintf( file, memFormat, "Device", size, memory ); size = pDevice->numElems; memory = (size_t) size * sizeof(TWOelem); fprintf( file, memFormat, "Elements", size, memory ); size = pDevice->numNodes; memory = (size_t) size * sizeof(TWOnode); fprintf( file, memFormat, "Nodes", size, memory ); size = pDevice->numEdges; memory = (size_t) size * sizeof(TWOedge); fprintf( file, memFormat, "Edges", size, memory ); size = pDevice->numXNodes; memory = (size_t) size * sizeof(TWOelem **); size = (pDevice->numXNodes-1) * pDevice->numYNodes; memory += (size_t) size * sizeof(TWOelem *); size = pDevice->numElems + 1; memory += (size_t) size * sizeof(TWOelem *); size = pDevice->numXNodes + pDevice->numYNodes; memory += (size_t) size * sizeof(double); size = 0; for (pMaterial = pDevice->pMaterials; pMaterial; pMaterial = pMaterial->next) size++; memory += (size_t) size * sizeof(TWOmaterial); size = numContactNodes = 0; for (pContact = pDevice->pFirstContact; pContact; pContact = pContact->next) { numContactNodes += pContact->numNodes; size++; } memory += (size_t) size * sizeof(TWOcontact); size = numContactNodes; memory += (size_t) size * sizeof(TWOnode *); size = 0; for (pChannel = pDevice->pChannel; pChannel; pChannel = pChannel->next) size++; memory += (size_t) size * sizeof(TWOchannel); fprintf(file, "%-20s%10s%10" PRIuPTR "\n", "Misc Mesh", "n/a", memory); size = pDevice->numOrigEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Equil Orig NZ", size, memory ); size = pDevice->numFillEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Equil Fill NZ", size, memory ); size = pDevice->numOrigEquil + pDevice->numFillEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Equil Tot NZ", size, memory ); size = pDevice->dimEquil; memory = (size_t) size * 4 * sizeof(double); fprintf( file, memFormat, "Equil Vectors", size, memory ); size = pDevice->numOrigBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Bias Orig NZ", size, memory ); size = pDevice->numFillBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Bias Fill NZ", size, memory ); size = pDevice->numOrigBias + pDevice->numFillBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf( file, memFormat, "Bias Tot NZ", size, memory ); size = pDevice->dimBias; memory = (size_t) size * 5 * sizeof(double); fprintf( file, memFormat, "Bias Vectors", size, memory ); size = pDevice->numEdges * TWOnumEdgeStates + pDevice->numNodes * TWOnumNodeStates; memory = (size_t) size * sizeof(double); fprintf( file, memFormat, "State Vector", size, memory ); } void TWOcpuStats(FILE *file, TWOdevice *pDevice) { static const char cpuFormat[] = "%-20s%10g%10g%10g%10g%10g\n"; TWOstats *pStats = pDevice->pStats; double total; int iTotal; fprintf(file, "----------------------------------------------------------------------\n"); fprintf(file, "Device %s Time Usage:\n", pDevice->name); fprintf(file, "Item SETUP DC TRAN AC TOTAL\n"); fprintf(file, "----------------------------------------------------------------------\n"); total = pStats->setupTime[STAT_SETUP] + pStats->setupTime[STAT_DC] + pStats->setupTime[STAT_TRAN] + pStats->setupTime[STAT_AC]; fprintf(file, cpuFormat, "Setup Time", pStats->setupTime[STAT_SETUP], pStats->setupTime[STAT_DC], pStats->setupTime[STAT_TRAN], pStats->setupTime[STAT_AC], total); total = pStats->loadTime[STAT_SETUP] + pStats->loadTime[STAT_DC] + pStats->loadTime[STAT_TRAN] + pStats->loadTime[STAT_AC]; fprintf(file, cpuFormat, "Load Time", pStats->loadTime[STAT_SETUP], pStats->loadTime[STAT_DC], pStats->loadTime[STAT_TRAN], pStats->loadTime[STAT_AC], total); total = pStats->orderTime[STAT_SETUP] + pStats->orderTime[STAT_DC] + pStats->orderTime[STAT_TRAN] + pStats->orderTime[STAT_AC]; fprintf(file, cpuFormat, "Order Time", pStats->orderTime[STAT_SETUP], pStats->orderTime[STAT_DC], pStats->orderTime[STAT_TRAN], pStats->orderTime[STAT_AC], total); total = pStats->factorTime[STAT_SETUP] + pStats->factorTime[STAT_DC] + pStats->factorTime[STAT_TRAN] + pStats->factorTime[STAT_AC]; fprintf(file, cpuFormat, "Factor Time", pStats->factorTime[STAT_SETUP], pStats->factorTime[STAT_DC], pStats->factorTime[STAT_TRAN], pStats->factorTime[STAT_AC], total); total = pStats->solveTime[STAT_SETUP] + pStats->solveTime[STAT_DC] + pStats->solveTime[STAT_TRAN] + pStats->solveTime[STAT_AC]; fprintf(file, cpuFormat, "Solve Time", pStats->solveTime[STAT_SETUP], pStats->solveTime[STAT_DC], pStats->solveTime[STAT_TRAN], pStats->solveTime[STAT_AC], total); total = pStats->updateTime[STAT_SETUP] + pStats->updateTime[STAT_DC] + pStats->updateTime[STAT_TRAN] + pStats->updateTime[STAT_AC]; fprintf(file, cpuFormat, "Update Time", pStats->updateTime[STAT_SETUP], pStats->updateTime[STAT_DC], pStats->updateTime[STAT_TRAN], pStats->updateTime[STAT_AC], total); total = pStats->checkTime[STAT_SETUP] + pStats->checkTime[STAT_DC] + pStats->checkTime[STAT_TRAN] + pStats->checkTime[STAT_AC]; fprintf(file, cpuFormat, "Check Time", pStats->checkTime[STAT_SETUP], pStats->checkTime[STAT_DC], pStats->checkTime[STAT_TRAN], pStats->checkTime[STAT_AC], total); total = pStats->setupTime[STAT_SETUP] + pStats->setupTime[STAT_DC] + pStats->setupTime[STAT_TRAN] + pStats->setupTime[STAT_AC]; fprintf(file, cpuFormat, "Misc Time", pStats->miscTime[STAT_SETUP], pStats->miscTime[STAT_DC], pStats->miscTime[STAT_TRAN], pStats->miscTime[STAT_AC], total); fprintf(file, "%-40s%10g%10s%10g\n", "LTE Time", pStats->lteTime, "", pStats->lteTime); total = pStats->totalTime[STAT_SETUP] + pStats->totalTime[STAT_DC] + pStats->totalTime[STAT_TRAN] + pStats->totalTime[STAT_AC]; fprintf(file, cpuFormat, "Total Time", pStats->totalTime[STAT_SETUP], pStats->totalTime[STAT_DC], pStats->totalTime[STAT_TRAN], pStats->totalTime[STAT_AC], total); iTotal = pStats->numIters[STAT_SETUP] + pStats->numIters[STAT_DC] + pStats->numIters[STAT_TRAN] + pStats->numIters[STAT_AC]; fprintf(file, "%-20s%10d%10d%10d%10d%10d\n", "Iterations", pStats->numIters[STAT_SETUP], pStats->numIters[STAT_DC], pStats->numIters[STAT_TRAN], pStats->numIters[STAT_AC], iTotal); } ngspice-26/src/ciderlib/twod/twoddefs.h0000644000265600020320000000236212264261473017545 0ustar andreasadmin/* * 2001 Paolo Nenzi */ #ifndef ngspice_TWODDEFS_H #define ngspice_TWODDEFS_H /* Debug statements */ extern BOOLEAN TWOacDebug; extern BOOLEAN TWOdcDebug; extern BOOLEAN TWOtranDebug; extern BOOLEAN TWOjacDebug; /* Now some defines for the two dimensional simulator * library. * Theese defines were gathered from all the code in * oned directory. */ /* Temporary hack to remove NUMOS gate special case */ #ifdef NORMAL_GATE #define GateTypeAdmittance oxideAdmittance #else #define GateTypeAdmittance contactAdmittance #endif /* NORMAL_GATE */ /* Temporary hack to remove NUMOS gate special case */ #ifdef NORMAL_GATE #define GateTypeConductance oxideConductance #define GateTypeCurrent oxideCurrent #else #define GateTypeConductance contactConductance #define GateTypeCurrent contactCurrent #endif /* NORMAL_GATE */ /* This structure was moved up from twoadmit.c */ struct mosAdmittances { SPcomplex yIdVdb; SPcomplex yIdVsb; SPcomplex yIdVgb; SPcomplex yIsVdb; SPcomplex yIsVsb; SPcomplex yIsVgb; SPcomplex yIgVdb; SPcomplex yIgVsb; SPcomplex yIgVgb; }; #define MAXTERMINALS 5 /* One more than max number of terminals */ #define ELCT_ID poiEqn #define MIN_DELV 1e-3 #define NORM_RED_MAXITERS 10 #endif ngspice-26/src/ciderlib/twod/twocond.c0000644000265600020320000004404712264261473017404 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* Functions to compute terminal conductances & currents. */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" void NUMD2conductance(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *gd) { TWOcontact *pContact = pDevice->pFirstContact; double *incVpn; BOOLEAN deltaVContact = FALSE; /* * store the new rhs for computing the incremental quantities * with the second to last node. solve the system of equations */ incVpn = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pDevice->pLastContact ); spSolve( pDevice->matrix, pDevice->rhs, incVpn, NULL, NULL); incVpn = pDevice->dcDeltaSolution; *gd = contactConductance( pDevice, pContact, deltaVContact, incVpn, tranAnalysis, intCoeff ); *gd *= - GNorm * pDevice->width * LNorm; } void NBJT2conductance(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *dIeDVce, double *dIcDVce, double *dIeDVbe, double *dIcDVbe) { TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; double width = pDevice->width; double *incVce, *incVbe; /* * store the new rhs for computing the incremental quantities * incVce (dcDeltaSolution) and incVbe (copiedSolution) are used to * store the incremental quantities associated with Vce and Vbe */ incVce = pDevice->dcDeltaSolution; incVbe = pDevice->copiedSolution; storeNewRhs( pDevice, pColContact ); spSolve( pDevice->matrix, pDevice->rhs, incVce, NULL, NULL); storeNewRhs( pDevice, pBaseContact ); spSolve( pDevice->matrix, pDevice->rhs, incVbe, NULL, NULL); *dIeDVce = contactConductance( pDevice, pEmitContact, FALSE, incVce, tranAnalysis, intCoeff ); *dIeDVbe = contactConductance( pDevice, pEmitContact, FALSE, incVbe, tranAnalysis, intCoeff ); *dIcDVce = contactConductance( pDevice, pColContact, TRUE, incVce, tranAnalysis, intCoeff ); *dIcDVbe = contactConductance( pDevice, pColContact, FALSE, incVbe, tranAnalysis, intCoeff ); *dIeDVce *= GNorm * width * LNorm; *dIcDVce *= GNorm * width * LNorm; *dIeDVbe *= GNorm * width * LNorm; *dIcDVbe *= GNorm * width * LNorm; } void NUMOSconductance(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, struct mosConductances *dIdV) { TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; double width = pDevice->width; double *incVdb, *incVsb, *incVgb; /* * store the new rhs for computing the incremental quantities * incVdb (dcDeltaSolution) */ incVdb = pDevice->dcDeltaSolution; incVsb = pDevice->copiedSolution; incVgb = pDevice->rhsImag; storeNewRhs( pDevice, pDContact ); spSolve( pDevice->matrix, pDevice->rhs, incVdb, NULL, NULL); storeNewRhs( pDevice, pSContact ); spSolve( pDevice->matrix, pDevice->rhs, incVsb, NULL, NULL); storeNewRhs( pDevice, pGContact ); spSolve( pDevice->matrix, pDevice->rhs, incVgb, NULL, NULL); dIdV->dIdDVdb = contactConductance( pDevice, pDContact, TRUE, incVdb, tranAnalysis, intCoeff ); dIdV->dIsDVdb = contactConductance( pDevice, pSContact, FALSE, incVdb, tranAnalysis, intCoeff ); dIdV->dIgDVdb = GateTypeConductance( pDevice, pGContact, FALSE, incVdb, tranAnalysis, intCoeff ); dIdV->dIdDVsb = contactConductance( pDevice, pDContact, FALSE, incVsb, tranAnalysis, intCoeff ); dIdV->dIsDVsb = contactConductance( pDevice, pSContact, TRUE, incVsb, tranAnalysis, intCoeff ); dIdV->dIgDVsb = GateTypeConductance( pDevice, pGContact, FALSE, incVsb, tranAnalysis, intCoeff ); dIdV->dIdDVgb = contactConductance( pDevice, pDContact, FALSE, incVgb, tranAnalysis, intCoeff ); dIdV->dIsDVgb = contactConductance( pDevice, pSContact, FALSE, incVgb, tranAnalysis, intCoeff ); dIdV->dIgDVgb = GateTypeConductance( pDevice, pGContact, TRUE, incVgb, tranAnalysis, intCoeff ); dIdV->dIdDVdb *= GNorm * width * LNorm; dIdV->dIdDVsb *= GNorm * width * LNorm; dIdV->dIdDVgb *= GNorm * width * LNorm; dIdV->dIsDVdb *= GNorm * width * LNorm; dIdV->dIsDVsb *= GNorm * width * LNorm; dIdV->dIsDVgb *= GNorm * width * LNorm; dIdV->dIgDVdb *= GNorm * width * LNorm; dIdV->dIgDVsb *= GNorm * width * LNorm; dIdV->dIgDVgb *= GNorm * width * LNorm; } double contactCurrent(TWOdevice *pDevice, TWOcontact *pContact) { /* computes the current through the contact given in pContact */ int index, i, numContactNodes; TWOnode *pNode; TWOelem *pElem; TWOedge *pHEdge, *pVEdge; double dx, dy; double jTotal = 0.0; numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL ) { dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; switch ( i ) { case 0: /* Bottom Right node */ pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; jTotal += pElem->epsRel * ( -dy * pHEdge->jd - dx * pVEdge->jd ); if ( pElem->elemType == SEMICON ) { jTotal += -dy * (pHEdge->jn + pHEdge->jp) -dx * (pVEdge->jn + pVEdge->jp); } break; case 1: /* Bottom Left node */ pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; jTotal += pElem->epsRel * ( dy * pHEdge->jd - dx * pVEdge->jd ); if ( pElem->elemType == SEMICON ) { jTotal += dy * (pHEdge->jn + pHEdge->jp) -dx * (pVEdge->jn + pVEdge->jp); } break; case 2: /* Top Left node */ pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; jTotal += pElem->epsRel * ( dy * pHEdge->jd + dx * pVEdge->jd ); if ( pElem->elemType == SEMICON ) { jTotal += dy * (pHEdge->jn + pHEdge->jp) + dx * (pVEdge->jn + pVEdge->jp); } break; case 3: /* Top Right Node */ pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; jTotal += pElem->epsRel * ( -dy * pHEdge->jd + dx * pVEdge->jd ); if ( pElem->elemType == SEMICON ) { jTotal += -dy * (pHEdge->jn + pHEdge->jp) + dx * (pVEdge->jn + pVEdge->jp); } break; } } } } return( jTotal * pDevice->width * LNorm * JNorm ); } double oxideCurrent(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN tranAnalysis) { /* computes the current through the contact given in pContact */ int index, i, numContactNodes; TWOnode *pNode; TWOelem *pElem; TWOedge *pHEdge, *pVEdge; double dx, dy; double jTotal = 0.0; if ( !tranAnalysis ) { return( jTotal ); } numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL ) { dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; switch ( i ) { case 0: /* Bottom Right node */ pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; jTotal += pElem->epsRel * ( -dy * pHEdge->jd - dx * pVEdge->jd ); break; case 1: /* Bottom Left node */ pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; jTotal += pElem->epsRel * ( dy * pHEdge->jd - dx * pVEdge->jd ); break; case 2: /* Top Left node */ pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; jTotal += pElem->epsRel * ( dy * pHEdge->jd + dx * pVEdge->jd ); break; case 3: /* Top Right Node */ pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; jTotal += pElem->epsRel * ( -dy * pHEdge->jd + dx * pVEdge->jd ); break; } } } } return( jTotal * pDevice->width * LNorm * JNorm ); } double contactConductance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, double *dxDv, BOOLEAN tranAnalysis, double *intCoeff) { /* computes the conductance of the contact given in pContact */ int index, i, numContactNodes; TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOelem *pElem; TWOedge *pHEdge = NULL, *pVEdge = NULL; double dPsiDv, dnDv, dpDv; double gTotal = 0.0; int nInc, pInc; NG_IGNORE(pDevice); /* for one carrier the rest of this code relies on appropriate current derivative term to be zero */ if ( !OneCarrier ) { nInc = 1; pInc = 2; } else { nInc = 1; pInc = 1; } numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL ) { switch ( i ) { case 0: /* the TL element */ pHNode = pElem->pBLNode; pVNode = pElem->pTRNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; if ( pElem->elemType == SEMICON ) { /* compute the derivatives with n,p */ if ( pHNode->nodeType != CONTACT ) { dnDv = dxDv[ pHNode->nEqn ]; dpDv = dxDv[ pHNode->pEqn ]; gTotal -= 0.5 * pElem->dy * (pHEdge->dJnDn * dnDv + pHEdge->dJpDp * dpDv); } if ( pVNode->nodeType != CONTACT ) { dnDv = dxDv[ pVNode->nEqn ]; dpDv = dxDv[ pVNode->pEqn ]; gTotal -= 0.5 * pElem->dx * (pVEdge->dJnDn * dnDv + pVEdge->dJpDp * dpDv); } } break; case 1: /* the TR element */ pHNode = pElem->pBRNode; pVNode = pElem->pTLNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; if ( pElem->elemType == SEMICON ) { /* compute the derivatives with n,p */ if ( pHNode->nodeType != CONTACT ) { dnDv = dxDv[ pHNode->nEqn ]; dpDv = dxDv[ pHNode->pEqn ]; gTotal += 0.5 * pElem->dy * (pHEdge->dJnDnP1 * dnDv + pHEdge->dJpDpP1 * dpDv); } if ( pVNode->nodeType != CONTACT ) { dnDv = dxDv[ pVNode->nEqn ]; dpDv = dxDv[ pVNode->pEqn ]; gTotal -= 0.5 * pElem->dx * (pVEdge->dJnDn * dnDv + pVEdge->dJpDp * dpDv); } } break; case 2: /* the BR element*/ pHNode = pElem->pTRNode; pVNode = pElem->pBLNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; if ( pElem->elemType == SEMICON ) { /* compute the derivatives with n,p */ if ( pHNode->nodeType != CONTACT ) { dnDv = dxDv[ pHNode->nEqn ]; dpDv = dxDv[ pHNode->pEqn ]; gTotal += 0.5 * pElem->dy * (pHEdge->dJnDnP1 * dnDv + pHEdge->dJpDpP1 * dpDv); } if ( pVNode->nodeType != CONTACT ) { dnDv = dxDv[ pVNode->nEqn ]; dpDv = dxDv[ pVNode->pEqn ]; gTotal += 0.5 * pElem->dx * (pVEdge->dJnDnP1 * dnDv + pVEdge->dJpDpP1 * dpDv); } } break; case 3: /* the BL element */ pHNode = pElem->pTLNode; pVNode = pElem->pBRNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; if ( pElem->elemType == SEMICON ) { /* compute the derivatives with n,p */ if ( pHNode->nodeType != CONTACT ) { dnDv = dxDv[ pHNode->nEqn ]; dpDv = dxDv[ pHNode->pEqn ]; gTotal -= 0.5 * pElem->dy * (pHEdge->dJnDn * dnDv + pHEdge->dJpDp * dpDv); } if ( pVNode->nodeType != CONTACT ) { dnDv = dxDv[ pVNode->nEqn ]; dpDv = dxDv[ pVNode->pEqn ]; gTotal += 0.5 * pElem->dx * (pVEdge->dJnDnP1 * dnDv + pVEdge->dJpDpP1 * dpDv); } } break; } if ( pElem->elemType == SEMICON ) { if ( pHNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pHNode->psiEqn ]; gTotal += 0.5 * pElem->dy * dPsiDv * (pHEdge->dJnDpsiP1 + pHEdge->dJpDpsiP1 ); if ( delVContact ) { gTotal -= 0.5 * pElem->dy * (pHEdge->dJnDpsiP1 + pHEdge->dJpDpsiP1 ); } } if ( pVNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pVNode->psiEqn ]; gTotal += 0.5 * pElem->dx * dPsiDv * (pVEdge->dJnDpsiP1 + pVEdge->dJpDpsiP1 ); if ( delVContact ) { gTotal -= 0.5 * pElem->dx * (pVEdge->dJnDpsiP1 + pVEdge->dJpDpsiP1 ); } } } if ( tranAnalysis ) { /* add the displacement current terms */ if ( pHNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pHNode->psiEqn ]; gTotal -= intCoeff[0] * pElem->epsRel * 0.5 * pElem->dyOverDx * dPsiDv; if ( delVContact ) { gTotal += intCoeff[0] * pElem->epsRel * 0.5 * pElem->dyOverDx; } } if ( pVNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pVNode->psiEqn ]; gTotal -= intCoeff[0] * pElem->epsRel * 0.5 * pElem->dxOverDy * dPsiDv; if ( delVContact ) { gTotal += intCoeff[0] * pElem->epsRel * 0.5 * pElem->dxOverDy; } } } } } } return( gTotal ); } double oxideConductance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, double *dxDv, BOOLEAN tranAnalysis, double *intCoeff) { /* computes the conductance of the contact given in pContact */ int index, i, numContactNodes; TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOelem *pElem; double dPsiDv; double gTotal = 0.0; NG_IGNORE(pDevice); if ( !tranAnalysis ) { return( gTotal ); } numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL ) { switch ( i ) { case 0: /* the TL element */ pHNode = pElem->pBLNode; pVNode = pElem->pTRNode; break; case 1: /* the TR element */ pHNode = pElem->pBRNode; pVNode = pElem->pTLNode; break; case 2: /* the BR element*/ pHNode = pElem->pTRNode; pVNode = pElem->pBLNode; break; case 3: /* the BL element */ pHNode = pElem->pTLNode; pVNode = pElem->pBRNode; break; } /* add the displacement current terms */ if ( pHNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pHNode->psiEqn ]; gTotal -= intCoeff[0] * pElem->epsRel * 0.5 * pElem->dyOverDx * dPsiDv; if ( delVContact ) { gTotal += intCoeff[0] * pElem->epsRel * 0.5 * pElem->dyOverDx; } } if ( pVNode->nodeType != CONTACT ) { dPsiDv = dxDv[ pVNode->psiEqn ]; gTotal -= intCoeff[0] * pElem->epsRel * 0.5 * pElem->dxOverDy * dPsiDv; if ( delVContact ) { gTotal += intCoeff[0] * pElem->epsRel * 0.5 * pElem->dxOverDy; } } } } } return( gTotal ); } /* these functions are used for solving the complete system of * equations directly using LU decomposition 1/22/88 */ void NUMD2current(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *id) { TWOcontact *pPContact = pDevice->pFirstContact; /* TWOcontact *pNContact = pDevice->pLastContact; */ double ip, ipPrime, *solution; /* double in;*/ BOOLEAN deltaVContact = FALSE; solution = pDevice->dcDeltaSolution; ip = contactCurrent( pDevice, pPContact ); /* in = contactCurrent( pDevice, pNContact ); fprintf(stdout, "DIO current: ( %11.4e error )\n", ip+in ); fprintf(stdout, " Ip = %11.4e In = %11.4e\n", ip, in ); */ /* * for the additional contribution to id will make use of * contactConductance. This function will be called * with the dcDeltaSolution vector instead of the incremental quantities */ ipPrime = contactConductance( pDevice, pPContact, deltaVContact, solution, tranAnalysis, intCoeff ); ipPrime *= JNorm * pDevice->width * LNorm; ip += ipPrime; *id = ip; } void NBJT2current(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *ie, double *ic) { TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; /* TWOcontact *pBaseContact = pDevice->pFirstContact->next; */ double *solution, iePrime, icPrime; /* double ib; */ solution = pDevice->dcDeltaSolution; *ie = contactCurrent( pDevice, pEmitContact ); *ic = contactCurrent( pDevice, pColContact ); /* ib = contactCurrent( pDevice, pBaseContact ); fprintf(stdout, "BJT current: ( %11.4e error )\n", *ic+ib+*ie ); fprintf(stdout, " Ic = %11.4e Ib = %11.4e\n", *ic, ib ); fprintf(stdout, " Ie = %11.4e\n", *ie ); */ iePrime = contactConductance( pDevice, pEmitContact, FALSE, solution, tranAnalysis, intCoeff ); icPrime = contactConductance( pDevice, pColContact, FALSE, solution, tranAnalysis, intCoeff ); iePrime *= JNorm * pDevice->width * LNorm; icPrime *= JNorm * pDevice->width * LNorm; *ie += iePrime; *ic += icPrime; } void NUMOScurrent(TWOdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *id, double *is, double *ig) { TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; /* TWOcontact *pBContact = pDevice->pLastContact; */ double *solution, idPrime, isPrime, igPrime; /* double ib; */ solution = pDevice->dcDeltaSolution; *id = contactCurrent( pDevice, pDContact ); /* * This is a terrible hack */ #ifdef NORMAL_GATE *ig = GateTypeCurrent( pDevice, pGContact, tranAnalysis ); #else *ig = GateTypeCurrent( pDevice, pGContact); #endif *is = contactCurrent( pDevice, pSContact ); /* ib = contactCurrent( pDevice, pBContact ); fprintf(stdout, "MOS current: ( %11.4e error )\n", *id+*ig+*is+ib ); fprintf(stdout, " Id = %11.4e Is = %11.4e\n", *id, *is ); fprintf(stdout, " Ig = %11.4e Ib = %11.4e\n", *ig, ib ); */ idPrime = contactConductance( pDevice, pDContact, FALSE, solution, tranAnalysis, intCoeff ); isPrime = contactConductance( pDevice, pSContact, FALSE, solution, tranAnalysis, intCoeff ); igPrime = GateTypeConductance( pDevice, pGContact, FALSE, solution, tranAnalysis, intCoeff ); idPrime *= JNorm * pDevice->width * LNorm; isPrime *= JNorm * pDevice->width * LNorm; igPrime *= JNorm * pDevice->width * LNorm; *id += idPrime; *is += isPrime; *ig += igPrime; } ngspice-26/src/ciderlib/twod/twoaval.c0000644000265600020320000001351312264261473017376 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1990 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" double TWOavalanche(TWOelem *pElem, TWOnode *pNode) { TWOelem *pElemTL, *pElemTR, *pElemBL, *pElemBR; TWOedge *pEdgeT, *pEdgeB, *pEdgeL, *pEdgeR; int materT = 0 , materB = 0, materL = 0 , materR = 0; double dxL = 0.0, dxR = 0.0, dyT = 0.0, dyB = 0.0; double ef1, ef2, coeff1, coeff2; double enx, eny, epx, epy, jnx, jny, jpx, jpy; double current, eField; double generation = 0.0; double eiip2 = 4.0e5 / ENorm; double aiip2 = 6.71e5 * LNorm; double biip2 = 1.693e6 / ENorm; TWOmaterial *info = pElem->matlInfo; /* Find all four neighboring elements */ pElemTL = pNode->pTLElem; pElemTR = pNode->pTRElem; pElemBL = pNode->pBLElem; pElemBR = pNode->pBRElem; /* Null edge pointers */ pEdgeT = pEdgeB = pEdgeL = pEdgeR = NULL; /* Find edges next to node */ if ( pElemTL != NULL ) { if (pElemTL->evalEdges[1]) { pEdgeT = pElemTL->pRightEdge; materT = pElemTL->elemType; dyT = pElemTL->dy; } if (pElemTL->evalEdges[2]) { pEdgeL = pElemTL->pBotEdge; materL = pElemTL->elemType; dxL = pElemTL->dx; } } if ( pElemTR != NULL ) { if (pElemTR->evalEdges[3]) { pEdgeT = pElemTR->pLeftEdge; materT = pElemTR->elemType; dyT = pElemTR->dy; } if (pElemTR->evalEdges[2]) { pEdgeR = pElemTR->pBotEdge; materR = pElemTR->elemType; dxR = pElemTR->dx; } } if ( pElemBR != NULL ) { if (pElemBR->evalEdges[3]) { pEdgeB = pElemBR->pLeftEdge; materB = pElemBR->elemType; dyB = pElemBR->dy; } if (pElemBR->evalEdges[0]) { pEdgeR = pElemBR->pTopEdge; materR = pElemBR->elemType; dxR = pElemBR->dx; } } if ( pElemBL != NULL ) { if (pElemBL->evalEdges[1]) { pEdgeB = pElemBL->pRightEdge; materB = pElemBL->elemType; dyB = pElemBL->dy; } if (pElemBL->evalEdges[0]) { pEdgeL = pElemBL->pTopEdge; materL = pElemBL->elemType; dxL = pElemBL->dx; } } /* compute horizontal vector components */ /* No more than one of Left Edge or Right Edge is absent */ /* If one is absent the other is guaranteed to be from silicon */ if (pEdgeL == NULL) { if ( pNode->nodeType == CONTACT ) { enx = -(pEdgeR->dPsi + pEdgeR->dCBand) / dxR; epx = -(pEdgeR->dPsi - pEdgeR->dVBand) / dxR; jnx = pEdgeR->jn; jpx = pEdgeR->jp; } else { enx = 0.0; epx = 0.0; jnx = 0.0; jpx = 0.0; } } else if (pEdgeR == NULL) { if ( pNode->nodeType == CONTACT ) { enx = -(pEdgeL->dPsi + pEdgeL->dCBand) / dxL; epx = -(pEdgeL->dPsi - pEdgeL->dVBand) / dxL; jnx = pEdgeL->jn; jpx = pEdgeL->jp; } else { enx = 0.0; epx = 0.0; jnx = 0.0; jpx = 0.0; } } else { /* Both edges are present */ coeff1 = dxL / (dxL + dxR); coeff2 = dxR / (dxL + dxR); ef1 = -(pEdgeL->dPsi + pEdgeL->dCBand) / dxL; ef2 = -(pEdgeR->dPsi + pEdgeR->dCBand) / dxR; enx = coeff2 * ef1 + coeff1 * ef2; ef1 = -(pEdgeL->dPsi - pEdgeL->dVBand) / dxL; ef2 = -(pEdgeR->dPsi - pEdgeR->dVBand) / dxR; epx = coeff2 * ef1 + coeff1 * ef2; if ( (materL == INSULATOR) || (materR == INSULATOR) ) { jnx = 0.0; jpx = 0.0; } else { jnx = coeff2 * pEdgeL->jn + coeff1 * pEdgeR->jn; jpx = coeff2 * pEdgeL->jp + coeff1 * pEdgeR->jp; } } /* compute vertical vector components */ /* No more than one of Top Edge or Bottom Edge is absent */ /* If one is absent the other is guaranteed to be from silicon */ if (pEdgeT == NULL) { if ( pNode->nodeType == CONTACT ) { eny = -(pEdgeB->dPsi + pEdgeB->dCBand) / dyB; epy = -(pEdgeB->dPsi - pEdgeB->dVBand) / dyB; jny = pEdgeB->jn; jpy = pEdgeB->jp; } else { eny = 0.0; epy = 0.0; jny = 0.0; jpy = 0.0; } } else if (pEdgeB == NULL) { if ( pNode->nodeType == CONTACT ) { eny = -(pEdgeT->dPsi + pEdgeT->dCBand) / dyT; epy = -(pEdgeT->dPsi - pEdgeT->dVBand) / dyT; jny = pEdgeT->jn; jpy = pEdgeT->jp; } else { eny = 0.0; epy = 0.0; jny = 0.0; jpy = 0.0; } } else { /* Both edges are present */ coeff1 = dyT / (dyT + dyB); coeff2 = dyB / (dyT + dyB); ef1 = -(pEdgeT->dPsi + pEdgeT->dCBand) / dyT; ef2 = -(pEdgeB->dPsi + pEdgeB->dCBand) / dyB; eny = coeff2 * ef1 + coeff1 * ef2; ef1 = -(pEdgeT->dPsi - pEdgeT->dVBand) / dyT; ef2 = -(pEdgeB->dPsi - pEdgeB->dVBand) / dyB; epy = coeff2 * ef1 + coeff1 * ef2; if ( (materT == INSULATOR) || (materB == INSULATOR) ) { jny = 0.0; jpy = 0.0; } else { jny = coeff2 * pEdgeT->jn + coeff1 * pEdgeB->jn; jpy = coeff2 * pEdgeT->jp + coeff1 * pEdgeB->jp; } } /* fprintf(stderr,"%% en = (%9.2e,%9.2e), jn = (%9.2e,%9.2e)\n", enx,eny,jnx,jny); fprintf(stderr,"%% ep = (%9.2e,%9.2e), jp = (%9.2e,%9.2e)\n", epx,epy,jpx,jpy); */ /* now calculate the avalanche generation rate */ current = sqrt( jnx * jnx + jny * jny ); if ( current != 0.0 ) { eField = (enx * jnx + eny * jny) / current; if ( (eField > 0) && ( info->bii[ELEC] / eField <= 80.0) ) { generation += current * info->aii[ELEC] * exp( - info->bii[ELEC] / eField ); } } current = sqrt( jpx * jpx + jpy * jpy ); if ( current != 0.0 ) { eField = (epx * jpx + epy * jpy) / current; if ( eField > eiip2 ) { generation += current * aiip2 * exp( - biip2 / eField ); } else if ( (eField > 0) && ( info->bii[HOLE] / eField <= 80.0) ) { generation += current * info->aii[HOLE] * exp( - info->bii[HOLE] / eField ); } } return( generation ); } ngspice-26/src/ciderlib/twod/twosetup.c0000644000265600020320000002247112264261473017616 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /********** Two-Dimensional Numerical Device Setup Routines **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/carddefs.h" /* XXX Not really modular if we need this. */ #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" /* compute node parameters */ void TWOsetup(TWOdevice *pDevice) { double temp1, deltaEg, avgConc, totalConc, absNetConc; double ncv0, dBand, dNie, psiBand[4]; double *xScale = pDevice->xScale; double *yScale = pDevice->yScale; int index, eIndex; int numContactNodes; TWOnode *pNode; TWOelem *pElem; TWOedge *pEdge; TWOcontact *pC; TWOmaterial *info; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; info = pElem->matlInfo; pElem->dx = xScale[ pElem->pTRNode->nodeI ]-xScale[ pElem->pTLNode->nodeI ]; pElem->dy = yScale[ pElem->pBLNode->nodeJ ]-yScale[ pElem->pTLNode->nodeJ ]; pElem->epsRel = info->eps; if ( pElem->elemType == INSULATOR ) { for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if (pNode->nodeType == CONTACT) { pNode->eaff = PHI_METAL; pNode->eg = 0.0; } else { pNode->eaff = info->affin; pNode->eg = info->eg0; } } } } else if ( pElem->elemType == SEMICON ) { ncv0 = sqrt( info->nc0 ) * sqrt( info->nv0 ); for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; /* Narrowing of Energy-Band Gap */ if (BandGapNarrowing) { absNetConc = ABS( pNode->netConc ); if ( pNode->netConc > 0.0 ) { temp1 = log( absNetConc / info->nrefBGN[ELEC] ); deltaEg = - info->dEgDn[ELEC] * (temp1 + sqrt(temp1*temp1 + 0.5)); pNode->eg = info->eg0 + deltaEg; } else if ( pNode->netConc < 0.0 ) { temp1 = log( absNetConc / info->nrefBGN[HOLE] ); deltaEg = - info->dEgDn[HOLE] * (temp1 + sqrt(temp1*temp1 + 0.5)); pNode->eg = info->eg0 + deltaEg; } else { pNode->eg = info->eg0; } } else { pNode->eg = info->eg0; } pNode->nie = ncv0 * exp ( -0.5 * pNode->eg / Vt ); pNode->eaff = info->affin; /* Save band structure parameter. */ psiBand[ index ] = - info->refPsi; /* Ionized-Impurity-Scattering Reduction of Carrier Lifetime */ if (ConcDepLifetime) { totalConc = pNode->totalConc; temp1 = 1.0 / ( 1.0 + totalConc / info->nrefSRH[ELEC] ); pNode->tn = info->tau0[ELEC] * temp1; temp1 = 1.0 / ( 1.0 + totalConc / info->nrefSRH[HOLE] ); pNode->tp = info->tau0[HOLE] * temp1; } else { pNode->tn = info->tau0[ELEC]; pNode->tp = info->tau0[HOLE]; } } } for ( index = 0; index <= 3; index++ ) { if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; /* Fixed Interface Charge */ pEdge->qf = 0.0; /* Variable Band Built-In Potential */ if ( index <= 1 ) { dBand = psiBand[index+1] - psiBand[index]; dNie = log( pElem->pNodes[index+1]->nie / pElem->pNodes[index]->nie ); pEdge->dCBand = dBand + dNie; pEdge->dVBand = - dBand + dNie; } else { dBand = psiBand[index] - psiBand[(index+1)%4]; dNie = log( pElem->pNodes[index]->nie / pElem->pNodes[(index+1)%4]->nie ); pEdge->dCBand = dBand + dNie; pEdge->dVBand = - dBand + dNie; } } } /* Evaluate conc.-dep. mobility. */ /* Average conc of all four nodes. */ avgConc = 0.25*(pElem->pTLNode->totalConc + pElem->pTRNode->totalConc + pElem->pBRNode->totalConc + pElem->pBLNode->totalConc); MOBconcDep( info, avgConc, &pElem->mun0, &pElem->mup0 ); } } for ( pC = pDevice->pFirstContact; pC != NULL; pC = pC->next ) { numContactNodes = pC->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pC->pNodes[ index ]; pNode->eaff = pC->workf; /* Affinity aka work function */ } } } /* Transfer BC info from card to nodes and edges. */ static void TWOcopyBCinfo(TWOdevice *pDevice, TWOelem *pElem, BDRYcard *card, int index ) { TWOnode *pNode; TWOelem *pNElem; TWOedge *pEdge; TWOmaterial *info; TWOchannel *newChannel; int eIndex, nIndex; int direction = index%2; double length, area, width, layerWidth; double dop, na = 0.0, nd = 0.0; /* First add fixed charge. */ pEdge = pElem->pEdges[index]; pEdge->qf += card->BDRYqf; /* Now add surface recombination. */ if ( direction == 0 ) { /* Horizontal Edge */ length = 0.5 * pElem->dx; } else { length = 0.5 * pElem->dy; } for (nIndex = 0; nIndex <= 1; nIndex++) { pNode = pElem->pNodes[ (index+nIndex)%4 ]; /* Compute semiconductor area around this node. */ area = 0.0; for (eIndex = 0; eIndex <= 3; eIndex++) { pNElem = pNode->pElems[eIndex]; if (pNElem != NULL && pElem->elemType == SEMICON) { area += 0.25 * pElem->dx * pElem->dy; } } if (card->BDRYsnGiven) { pNode->tn = pNode->tn / (1.0 + ((card->BDRYsn * TNorm)*length*pNode->tn) / area); } if (card->BDRYspGiven) { pNode->tp = pNode->tp / (1.0 + ((card->BDRYsp * TNorm)*length*pNode->tp) / area); } /* Compute doping just in case we need it later. */ na += 0.5 * pNode->na; nd += 0.5 * pNode->nd; } /* Finally do surface layer. */ pNElem = pElem->pElems[index]; if (card->BDRYlayerGiven && SurfaceMobility && pElem->elemType == SEMICON && pElem->channel == 0 && pNElem && pNElem->elemType == INSULATOR && pElem->pNodes[index]->nodeType != CONTACT && pElem->pNodes[(index+1)%4]->nodeType != CONTACT ) { /* Find the layer width. */ layerWidth = card->BDRYlayer; if (card->BDRYlayer <= 0.0) { /* Need to compute extrinsic Debye length */ info = pElem->matlInfo; dop = MAX(MAX(na,nd),info->ni0); layerWidth = sqrt((Vt * info->eps) / (CHARGE * dop)); } /* Add a channel to the list of channels. */ XCALLOC( newChannel, TWOchannel, 1); newChannel->pSeed = pElem; newChannel->pNElem = pNElem; newChannel->type = index; if (pDevice->pChannel != NULL) { newChannel->id = pDevice->pChannel->id + 1; newChannel->next = pDevice->pChannel; } else { newChannel->id = 1; newChannel->next = NULL; } pDevice->pChannel = newChannel; /* Now add elements to channel until we're more than layerWidth away * from the interface. If we encounter a missing element or an * element that's already part of a different channel, quit. * The seed element is at the surface. */ width = 0.0; eIndex = (index+2)%4; pElem->surface = TRUE; while (width < layerWidth && pElem && pElem->channel == 0) { pElem->channel = newChannel->id; pElem->direction = direction; /* * Surface mobility is normally concentration-independent in * the default model. Overwrite concentration-dependent value * calculated earlier unless matching of low-field surface * and bulk mobilities is requested. */ if (!MatchingMobility) { pElem->mun0 = pElem->matlInfo->mus[ELEC]; pElem->mup0 = pElem->matlInfo->mus[HOLE]; } if ( direction == 0 ) { width += pElem->dy; } else { width += pElem->dx; } pElem = pElem->pElems[ eIndex ]; } } } /* Compute boundary condition parameters. */ void TWOsetBCparams(TWOdevice *pDevice, BDRYcard *cardList) { int index, xIndex, yIndex; /* Need to access in X/Y order. */ TWOelem *pElem, *pNElem; BDRYcard *card; for ( card = cardList; card != NULL; card = card->BDRYnextCard ) { for (xIndex = card->BDRYixLow; xIndex < card->BDRYixHigh; xIndex++) { for (yIndex = card->BDRYiyLow; yIndex < card->BDRYiyHigh; yIndex++) { pElem = pDevice->elemArray[ xIndex ][ yIndex ]; if (pElem != NULL) { if (pElem->domain == card->BDRYdomain) { for (index = 0; index <= 3; index++) { if (pElem->evalEdges[index]) { pNElem = pElem->pElems[index]; if (card->BDRYneighborGiven) { if (pNElem && pNElem->domain == card->BDRYneighbor) { /* Found an interface edge. */ TWOcopyBCinfo( pDevice, pElem, card, index ); } } else { if (!pNElem || pNElem->domain != pElem->domain) { /* Found a boundary edge. */ TWOcopyBCinfo( pDevice, pElem, card, index ); } } } } } } } } } } void TWOnormalize(TWOdevice *pDevice) { int index, eIndex; TWOelem *pElem; TWOnode *pNode; TWOedge *pEdge; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; pElem->dx /= LNorm; pElem->dy /= LNorm; pElem->epsRel /= EpsNorm; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; pNode->netConc /= NNorm; pNode->nd /= NNorm; pNode->na /= NNorm; pNode->nie /= NNorm; pNode->eg /= VNorm; pNode->eaff /= VNorm; } if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; pEdge->qf /= NNorm*LNorm; } } } } ngspice-26/src/ciderlib/twod/twofield.c0000644000265600020320000000635312264261473017542 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" void nodeFields(TWOelem *pElem, TWOnode *pNode, double *ex, double *ey) { TWOelem *pElemTL, *pElemTR, *pElemBL, *pElemBR; TWOedge *pEdgeT, *pEdgeB, *pEdgeL, *pEdgeR; int materT, materB, materL, materR; double dxL = 0.0, dxR = 0.0, dyT = 0.0, dyB = 0.0; double ef1, ef2, coeff1, coeff2; NG_IGNORE(pElem); /* Find all four neighboring elements */ pElemTL = pNode->pTLElem; pElemTR = pNode->pTRElem; pElemBL = pNode->pBLElem; pElemBR = pNode->pBRElem; /* Null edge pointers */ pEdgeT = pEdgeB = pEdgeL = pEdgeR = NULL; /* Find edges next to node */ if (pElemTL != NULL) { if (pElemTL->evalEdges[1]) { pEdgeT = pElemTL->pRightEdge; materT = pElemTL->elemType; dyT = pElemTL->dy; } if (pElemTL->evalEdges[2]) { pEdgeL = pElemTL->pBotEdge; materL = pElemTL->elemType; dxL = pElemTL->dx; } } if (pElemTR != NULL) { if (pElemTR->evalEdges[3]) { pEdgeT = pElemTR->pLeftEdge; materT = pElemTR->elemType; dyT = pElemTR->dy; } if (pElemTR->evalEdges[2]) { pEdgeR = pElemTR->pBotEdge; materR = pElemTR->elemType; dxR = pElemTR->dx; } } if (pElemBR != NULL) { if (pElemBR->evalEdges[3]) { pEdgeB = pElemBR->pLeftEdge; materB = pElemBR->elemType; dyB = pElemBR->dy; } if (pElemBR->evalEdges[0]) { pEdgeR = pElemBR->pTopEdge; materR = pElemBR->elemType; dxR = pElemBR->dx; } } if (pElemBL != NULL) { if (pElemBL->evalEdges[1]) { pEdgeB = pElemBL->pRightEdge; materB = pElemBL->elemType; dyB = pElemBL->dy; } if (pElemBL->evalEdges[0]) { pEdgeL = pElemBL->pTopEdge; materL = pElemBL->elemType; dxL = pElemBL->dx; } } /* compute horizontal vector components */ /* No more than one of Left Edge or Right Edge is absent */ if (pEdgeL == NULL) { if (pNode->nodeType == CONTACT) { *ex = -pEdgeR->dPsi / dxR; } else { *ex = 0.0; } } else if (pEdgeR == NULL) { if (pNode->nodeType == CONTACT) { *ex = -pEdgeL->dPsi / dxL; } else { *ex = 0.0; } } else { /* Both edges are present */ coeff1 = dxL / (dxL + dxR); coeff2 = dxR / (dxL + dxR); ef1 = -pEdgeL->dPsi / dxL; ef2 = -pEdgeR->dPsi / dxR; *ex = coeff2 * ef1 + coeff1 * ef2; } /* compute vertical vector components */ /* No more than one of Top Edge or Bottom Edge is absent */ if (pEdgeT == NULL) { if (pNode->nodeType == CONTACT) { *ey = -pEdgeB->dPsi / dyB; } else { *ey = 0.0; } } else if (pEdgeB == NULL) { if (pNode->nodeType == CONTACT) { *ey = -pEdgeT->dPsi / dyT; } else { *ey = 0.0; } } else { /* Both edges are present */ coeff1 = dyT / (dyT + dyB); coeff2 = dyB / (dyT + dyB); ef1 = -pEdgeT->dPsi / dyT; ef2 = -pEdgeB->dPsi / dyB; *ey = coeff2 * ef1 + coeff1 * ef2; } } ngspice-26/src/ciderlib/twod/twoncont.c0000644000265600020320000006745112264261473017606 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/bernoull.h" /* * Functions to setup and solve the continuity equations. * Both continuity equations are solved. * Separate functions are used for one continuity equation. */ /* * Setup matrix pointers to Jacobian entries and * store direct pointers with the nodes. */ void TWONjacBuild(TWOdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; TWOelem *pElem; TWOnode *pNode; TWOchannel *pCh; int eIndex, nIndex; int nextIndex; /* index of node to find next element */ int psiEqn, nEqn; /* scratch for deref'd eqn numbers */ int psiEqnTL = 0, nEqnTL = 0; int psiEqnTR = 0, nEqnTR = 0; int psiEqnBR = 0, nEqnBR = 0; int psiEqnBL = 0, nEqnBL = 0; int psiEqnInM = 0, psiEqnInP = 0; /* scratch for deref'd surface eqns */ int psiEqnOxM = 0, psiEqnOxP = 0; /* M= more negative, P= more positive */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; /* first the self terms */ for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; /* get poisson-only pointer */ psiEqn = pNode->psiEqn; pNode->fPsiPsi = spGetElement( matrix, psiEqn, psiEqn ); if ( pElem->elemType == SEMICON ) { /* get continuity-coupling terms */ nEqn = pNode->nEqn; pNode->pEqn = 0; /* Throw pEqn number into garbage. */ /* pointers for additional terms */ pNode->fPsiN = spGetElement( matrix, psiEqn, nEqn ); pNode->fNPsi = spGetElement( matrix, nEqn, psiEqn ); pNode->fNN = spGetElement( matrix, nEqn, nEqn ); } else { nEqn = 0; } /* save equation indices */ switch ( nIndex ) { case 0: /* TL Node */ psiEqnTL = psiEqn; nEqnTL = nEqn; break; case 1: /* TR Node */ psiEqnTR = psiEqn; nEqnTR = nEqn; break; case 2: /* BR Node */ psiEqnBR = psiEqn; nEqnBR = nEqn; break; case 3: /* BL Node */ psiEqnBL = psiEqn; nEqnBL = nEqn; break; default: break; } } /* now terms to couple to adjacent nodes */ pNode = pElem->pTLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnTL, psiEqnTR ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTL, psiEqnBL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiP1 = spGetElement( matrix, nEqnTL, psiEqnTR ); pNode->fNNiP1 = spGetElement( matrix, nEqnTL, nEqnTR ); pNode->fNPsijP1 = spGetElement( matrix, nEqnTL, psiEqnBL ); pNode->fNNjP1 = spGetElement( matrix, nEqnTL, nEqnBL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiP1jP1 = spGetElement( matrix, nEqnTL, psiEqnBR ); pNode->fNNiP1jP1 = spGetElement( matrix, nEqnTL, nEqnBR ); } } pNode = pElem->pTRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnTR, psiEqnTL ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTR, psiEqnBR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiM1 = spGetElement( matrix, nEqnTR, psiEqnTL ); pNode->fNNiM1 = spGetElement( matrix, nEqnTR, nEqnTL ); pNode->fNPsijP1 = spGetElement( matrix, nEqnTR, psiEqnBR ); pNode->fNNjP1 = spGetElement( matrix, nEqnTR, nEqnBR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiM1jP1 = spGetElement( matrix, nEqnTR, psiEqnBL ); pNode->fNNiM1jP1 = spGetElement( matrix, nEqnTR, nEqnBL ); } } pNode = pElem->pBRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnBR, psiEqnBL ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBR, psiEqnTR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiM1 = spGetElement( matrix, nEqnBR, psiEqnBL ); pNode->fNNiM1 = spGetElement( matrix, nEqnBR, nEqnBL ); pNode->fNPsijM1 = spGetElement( matrix, nEqnBR, psiEqnTR ); pNode->fNNjM1 = spGetElement( matrix, nEqnBR, nEqnTR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiM1jM1 = spGetElement( matrix, nEqnBR, psiEqnTL ); pNode->fNNiM1jM1 = spGetElement( matrix, nEqnBR, nEqnTL ); } } pNode = pElem->pBLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnBL, psiEqnBR ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBL, psiEqnTL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiP1 = spGetElement( matrix, nEqnBL, psiEqnBR ); pNode->fNNiP1 = spGetElement( matrix, nEqnBL, nEqnBR ); pNode->fNPsijM1 = spGetElement( matrix, nEqnBL, psiEqnTL ); pNode->fNNjM1 = spGetElement( matrix, nEqnBL, nEqnTL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiP1jM1 = spGetElement( matrix, nEqnBL, psiEqnTR ); pNode->fNNiP1jM1 = spGetElement( matrix, nEqnBL, nEqnTR ); } } } /* * Add terms for surface-field of inversion-layer mobility model. * Elements MUST be made from silicon for this to work. * No empty elements are allowed. * Don't need these pointers if SurfaceMobility isn't set. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: psiEqnInM = pElem->pBLNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pTRNode->psiEqn; break; case 1: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pBLNode->psiEqn; psiEqnOxM = pElem->pTRNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 2: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pTRNode->psiEqn; psiEqnOxM = pElem->pBLNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 3: psiEqnInM = pElem->pTRNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pBLNode->psiEqn; break; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; psiEqn = pNode->psiEqn; nEqn = pNode->nEqn; if ( pCh->type % 2 == 0 ) { /* Vertical Slice */ if ( nIndex == 0 || nIndex == 3 ) { /* Left Side */ pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOxP1 = spGetElement( matrix, nEqn, psiEqnOxP ); } else { /* Right Side */ pNode->fNPsiInM1 = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOxM1 = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP ); } } else { /* Horizontal Slice */ if ( nIndex <= 1 ) { /* Top Side */ pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOxP1 = spGetElement( matrix, nEqn, psiEqnOxP ); } else { /* Bottom Side */ pNode->fNPsiInM1 = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOxM1 = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP ); } } } /* endfor nIndex */ pElem = pElem->pElems[ nextIndex ]; } /* endwhile pElem */ } /* endfor pCh */ } /* endif SurfaceMobility */ } /* * The Jacobian and Rhs are loaded by the following function. * Inputs are the transient analysis flag and the transient * information structure */ void TWONsysLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsN; double nConc, pConc; double perTime = 0.0; /* first compute the currents and derivatives */ TWONcommonTerms( pDevice, FALSE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; *(pNode->fPsiN) += dxdy; *(pNode->fPsiPsi) += dxdy * pConc; *(pNode->fNPsi) -= dy * pHEdge->dJnDpsiP1 + dx * pVEdge->dJnDpsiP1; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ *(pNode->fNN) -= dxdy * pNode->dUdN; *(pNode->fNPsi) += dxdy * pNode->dUdP * pConc; rhsN = - dxdy * pNode->uNet; pRhs[ pNode->nEqn ] -= rhsN; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { *(pNode->fNN) -= dxdy * perTime; pRhs[ pNode->nEqn ] += dxdy * pNode->dNdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pTEdge->jn + dx * pLEdge->jn; *(pNode->fNN) += dy * pTEdge->dJnDn + dx * pLEdge->dJnDn; *(pNode->fNPsiiP1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pTEdge->dJnDnP1; *(pNode->fNPsijP1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pLEdge->dJnDnP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pTEdge->jn + dx * pREdge->jn; *(pNode->fNN) += -dy * pTEdge->dJnDnP1 + dx * pREdge->dJnDn; *(pNode->fNPsiiM1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pTEdge->dJnDn; *(pNode->fNPsijP1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pREdge->dJnDnP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pBEdge->jn - dx * pREdge->jn; *(pNode->fNN) += -dy * pBEdge->dJnDnP1 - dx * pREdge->dJnDnP1; *(pNode->fNPsiiM1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pBEdge->dJnDn; *(pNode->fNPsijM1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pREdge->dJnDn; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pBEdge->jn - dx * pLEdge->jn; *(pNode->fNN) += dy * pBEdge->dJnDn - dx * pLEdge->dJnDnP1; *(pNode->fNPsiiP1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pBEdge->dJnDnP1; *(pNode->fNPsijM1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pLEdge->dJnDn; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWONmobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* * This function used only for direct method ac analysis. * Used to load only the dc Jacobian matrix. Rhs is unaffected */ void TWONjacLoad(TWOdevice *pDevice) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; double pConc; /* first compute the currents and derivatives */ TWONcommonTerms( pDevice, FALSE, FALSE, NULL ); /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( pElem->elemType == SEMICON ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } pConc = pDevice->devState0 [pNode->nodeP]; *(pNode->fPsiN) += dxdy; *(pNode->fPsiPsi) += dxdy * pConc; *(pNode->fNPsi) -= dy * pHEdge->dJnDpsiP1 + dx * pVEdge->dJnDpsiP1; /* Handle generation terms */ *(pNode->fNN) -= dxdy * pNode->dUdN; *(pNode->fNPsi) += dxdy * pNode->dUdP * pConc; } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += dy * pTEdge->dJnDn + dx * pLEdge->dJnDn; *(pNode->fNPsiiP1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pTEdge->dJnDnP1; *(pNode->fNPsijP1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pLEdge->dJnDnP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += -dy * pTEdge->dJnDnP1 + dx * pREdge->dJnDn; *(pNode->fNPsiiM1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pTEdge->dJnDn; *(pNode->fNPsijP1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pREdge->dJnDnP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += -dy * pBEdge->dJnDnP1 - dx * pREdge->dJnDnP1; *(pNode->fNPsiiM1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pBEdge->dJnDn; *(pNode->fNPsijM1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pREdge->dJnDn; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += dy * pBEdge->dJnDn - dx * pLEdge->dJnDnP1; *(pNode->fNPsiiP1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pBEdge->dJnDnP1; *(pNode->fNPsijM1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pLEdge->dJnDn; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWONmobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* load only the Rhs vector */ void TWONrhsLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsN; double nConc, pConc; double perTime; /* first compute the currents */ TWONcommonTerms( pDevice, TRUE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ rhsN = - dxdy * pNode->uNet; pRhs[ pNode->nEqn ] -= rhsN; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { pRhs[ pNode->nEqn ] += dxdy * pNode->dNdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pTEdge->jn + dx * pLEdge->jn; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pTEdge->jn + dx * pREdge->jn; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pBEdge->jn - dx * pREdge->jn; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pBEdge->jn - dx * pLEdge->jn; } } } } /* * computation of current densities, recombination rates, * mobilities and their derivatives */ void TWONcommonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; int nextIndex; /* index of node to find next element */ double psi1, psi2, refPsi, nC, nP1; double dPsiN; double bPsiN, dbPsiN, bMPsiN, dbMPsiN; double muN, dMuN, rDx, rDy; double psi, nConc = 0.0, pConc = 0.0; double cnAug, cpAug; double eSurf = 0.0; /* For channel mobilities */ double qInt = 0.0; TWOchannel *pCh; /* evaluate all node (including recombination) and edge quantities */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; refPsi = pElem->matlInfo->refPsi; cnAug = pElem->matlInfo->cAug[ELEC]; cpAug = pElem->matlInfo->cAug[HOLE]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi = pDevice->dcSolution[ pNode->psiEqn ]; if ( pElem->elemType == SEMICON ) { nConc = pDevice->dcSolution[ pNode->nEqn ]; pConc = pNode->nie * exp( - psi + refPsi ); if ( Srh ) { recomb(nConc, pConc, pNode->tn, pNode->tp, cnAug, cpAug, pNode->nie, &pNode->uNet, &pNode->dUdN, &pNode->dUdP); } else { pNode->uNet = 0.0; pNode->dUdN = 0.0; pNode->dUdP = 0.0; } } } else { /* a contact node */ psi = pNode->psi; if ( pElem->elemType == SEMICON ) { nConc = pNode->nConc; pConc = pNode->pConc; } } /* store info in the state tables */ pDevice->devState0 [pNode->nodePsi] = psi; if ( pElem->elemType == SEMICON ) { pDevice->devState0 [pNode->nodeN] = nConc; pDevice->devState0 [pNode->nodeP] = pConc; if ( tranAnalysis && pNode->nodeType != CONTACT ) { pNode->dNdT = integrate( pDevice->devStates, info, pNode->nodeN ); } } } } for ( index = 0; index <= 3; index++ ) { if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi1 = pDevice->dcSolution[pNode->psiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pNodes[ (index + 1) % 4 ]; if ( pNode->nodeType != CONTACT ) { psi2 = pDevice->dcSolution[pNode->psiEqn]; } else { psi2 = pNode->psi; } if ( index <= 1 ) { pEdge->dPsi = psi2 - psi1; } else { pEdge->dPsi = psi1 - psi2; } pDevice->devState0 [pEdge->edgeDpsi] = pEdge->dPsi; if ( pElem->elemType == SEMICON ) { /* Calculate weighted driving forces - wdfn & wdfp for the edge */ dPsiN = pEdge->dPsi + pEdge->dCBand; bernoulli( dPsiN, &bPsiN, &dbPsiN, &bMPsiN, &dbMPsiN, !currentOnly ); if ( index <= 1 ) { nC = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeN); nP1 = *(pDevice->devState0 + pElem->pNodes[ index+1 ]->nodeN); } else { nC = *(pDevice->devState0 + pElem->pNodes[(index+1)%4]->nodeN); nP1 = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeN); } pEdge->wdfn = bPsiN * nP1 - bMPsiN * nC; pEdge->jn = 0.0; if ( !currentOnly ) { pEdge->dWnDpsiP1 = dbPsiN * nP1 - dbMPsiN * nC; pEdge->dWnDn = - bMPsiN; pEdge->dWnDnP1 = bPsiN; pEdge->dJnDpsiP1 = 0.0; pEdge->dJnDn = 0.0; pEdge->dJnDnP1 = 0.0; } } } } } /* DAG: calculate mobilities for channel elems */ if ( SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pBotEdge->qf; break; case 1: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pLeftEdge->qf; break; case 2: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pTopEdge->qf; break; case 3: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pRightEdge->qf; break; } eSurf += qInt; pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWONmobility( pElem, eSurf ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCH != NULL */ } /* endif SurfaceMobility */ /* calculate the current densities assuming mobility value depend on Ex,Ey*/ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; rDx = 1.0 / pElem->dx; rDy = 1.0 / pElem->dy; for ( index = 0; index <= 3; index++ ) { pEdge = pElem->pEdges[ index ]; /* calculate conductive currents */ if ( pElem->elemType == SEMICON ) { /* get mobility for this edge */ if ( !pElem->channel ) { /* Calculate mobility for non-channel elements */ muN = pElem->mun0; dMuN = 0.0; dPsiN = pEdge->dPsi + pEdge->dCBand; if ( index%2 == 0 ) { MOBfieldDep( pElem->matlInfo, ELEC, - dPsiN * rDx, &muN, &dMuN ); } else { MOBfieldDep( pElem->matlInfo, ELEC, - dPsiN * rDy, &muN, &dMuN ); } } else { /* Retrieve previously calculated value. */ muN = pElem->mun; dMuN = 0.0; } switch ( index ) { case 0: muN *= pEdge->kPos * rDx; dMuN *= pEdge->kPos * rDx * rDx; break; case 1: muN *= pEdge->kNeg * rDy; dMuN *= pEdge->kNeg * rDy * rDy; break; case 2: muN *= pEdge->kNeg * rDx; dMuN *= pEdge->kNeg * rDx * rDx; break; case 3: muN *= pEdge->kPos * rDy; dMuN *= pEdge->kPos * rDy * rDy; break; } /* Now that the mobility for this edge is known, do current */ pEdge->jn += muN * pEdge->wdfn; if ( !currentOnly ) { pEdge->dJnDpsiP1 += muN * pEdge->dWnDpsiP1; pEdge->dJnDn += muN * pEdge->dWnDn; pEdge->dJnDnP1 += muN * pEdge->dWnDnP1; if ( MobDeriv && (!pElem->channel) ) { pEdge->dJnDpsiP1 -= dMuN * pEdge->wdfn; } } } /* calculate displacement current only once */ if ( pElem->evalEdges[ index ] ) { if ( tranAnalysis ) { if ( index == 0 || index == 2 ) { /* horizontal edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDx; } else { /* vertical edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDy; } } } } } } ngspice-26/src/ciderlib/twod/readme0000644000265600020320000000163312264261473016735 0ustar andreasadminDirectory: twod --------------- This directory contains the files that are primarily responsible for implementing the 2D device simulator. It also contains files that help interface the circuit simulator to the device simulator. Most functions that are common to all 2D device simulations start with the prefix TWO, e.g. TWObiasSolve. The device-specific routines start with either NUMD2, NBJT2 or NUMOS, e.g. NUMD2admittance, NBJTproject or NUMOSconductance. The simulator contains a Poisson Solver for equilibrium, and a Two-carrier solver and One-carrier solvers for bias solutions. An attempt has been made to keep the function names parallel in the four portions. Poisson routines are identified with a 'Q' (for charge only) after the TWO, Full solver routines are identified with an underscore '_', Electron-current-only routines are identified with an 'N', and Hole-current-only routines are identified with a 'P'. ngspice-26/src/ciderlib/twod/twoadmit.c0000644000265600020320000013071612264261473017556 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* Functions to compute the ac admittances of a device. */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/numconst.h" #include "ngspice/twodev.h" #include "ngspice/twomesh.h" #include "ngspice/complex.h" #include "ngspice/spmatrix.h" #include "ngspice/bool.h" #include "ngspice/macros.h" #include "ngspice/ifsim.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" extern IFfrontEnd *SPfrontEnd; /* * mmhhh this may cause troubles * Paolo Nenzi 2002 */ SPcomplex yTotal; int NUMD2admittance(TWOdevice *pDevice, double omega, SPcomplex *yd) { TWOnode *pNode; TWOelem *pElem; int index, eIndex; double dxdy; double *solnReal, *solnImag; double *rhsReal, *rhsImag; SPcomplex yAc, cOmega, *y; BOOLEAN deltaVContact = FALSE; BOOLEAN SORFailed; double startTime; /* Each time we call this counts as one AC iteration. */ pDevice->pStats->numIters[STAT_AC] += 1; /* * change context names of solution vectors for ac analysis dcDeltaSolution * stores the real part and copiedSolution stores the imaginary part of the * ac solution vector */ pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ omega *= TNorm; CMPLX_ASSIGN_VALUE(cOmega, 0.0, omega); if ((AcAnalysisMethod == SOR) || (AcAnalysisMethod == SOR_ONLY)) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* zero the rhsImag */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* store the new rhs vector */ storeNewRhs(pDevice, pDevice->pLastContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yd, 0.0, 0.0); return (AcAnalysisMethod); } } if (AcAnalysisMethod == DIRECT) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* solve the system of equations directly */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } storeNewRhs(pDevice, pDevice->pLastContact); spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } else if (OneCarrier == N_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); } else if (OneCarrier == P_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } } } } } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR */ startTime = SPfrontEnd->IFseconds(); spFactor(pDevice->matrix); pDevice->pStats->factorTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDevice->pFirstContact, deltaVContact, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc, -y->real, -y->imag); CMPLX_ASSIGN(*yd, yAc); CMPLX_MULT_SELF_SCALAR(*yd, GNorm * pDevice->width * LNorm); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; return (AcAnalysisMethod); } int NBJT2admittance(TWOdevice *pDevice, double omega, SPcomplex *yIeVce, SPcomplex *yIcVce, SPcomplex *yIeVbe, SPcomplex *yIcVbe) { TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; TWOnode *pNode; TWOelem *pElem; int index, eIndex; double width = pDevice->width; double dxdy; double *solnReal, *solnImag; double *rhsReal, *rhsImag; BOOLEAN SORFailed; SPcomplex *y; SPcomplex pIeVce, pIcVce, pIeVbe, pIcVbe; SPcomplex cOmega; double startTime; /* Each time we call this counts as one AC iteration. */ pDevice->pStats->numIters[STAT_AC] += 1; pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ omega *= TNorm; CMPLX_ASSIGN_VALUE(cOmega, 0.0, omega); CMPLX_ASSIGN_VALUE(pIeVce, NAN, NAN); CMPLX_ASSIGN_VALUE(pIcVce, NAN, NAN); if ((AcAnalysisMethod == SOR) || (AcAnalysisMethod == SOR_ONLY)) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pColContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yIeVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIeVbe, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVbe, 0.0, 0.0); return (AcAnalysisMethod); } else { /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pEmitContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, y->real, y->imag); y = contactAdmittance(pDevice, pColContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* load in the base contribution to the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pBaseContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yIeVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIeVbe, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVbe, 0.0, 0.0); return (AcAnalysisMethod); } } } if (AcAnalysisMethod == DIRECT) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* solve the system of equations directly */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } storeNewRhs(pDevice, pColContact); spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } else if (OneCarrier == N_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); } else if (OneCarrier == P_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } } } } } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR */ startTime = SPfrontEnd->IFseconds(); spFactor(pDevice->matrix); pDevice->pStats->factorTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pEmitContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, y->real, y->imag); y = contactAdmittance(pDevice, pColContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pBaseContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR: already done, no need to repeat. */ /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pEmitContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVbe, y->real, y->imag); y = contactAdmittance(pDevice, pColContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVbe, y->real, y->imag); CMPLX_ASSIGN(*yIeVce, pIeVce); CMPLX_ASSIGN(*yIeVbe, pIeVbe); CMPLX_ASSIGN(*yIcVce, pIcVce); CMPLX_ASSIGN(*yIcVbe, pIcVbe); CMPLX_MULT_SELF_SCALAR(*yIeVce, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIeVbe, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIcVce, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIcVbe, GNorm * width * LNorm); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; return (AcAnalysisMethod); } int NUMOSadmittance(TWOdevice *pDevice, double omega, struct mosAdmittances *yAc) { TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; /* TWOcontact *pBContact = pDevice->pLastContact; */ TWOnode *pNode; TWOelem *pElem; int index, eIndex; double width = pDevice->width; double dxdy; double *solnReal, *solnImag; double *rhsReal, *rhsImag; BOOLEAN SORFailed; SPcomplex *y, cOmega; double startTime; /* Each time we call this counts as one AC iteration. */ pDevice->pStats->numIters[STAT_AC] += 1; pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ omega *= TNorm; CMPLX_ASSIGN_VALUE(cOmega, 0.0, omega); if ((AcAnalysisMethod == SOR) || (AcAnalysisMethod == SOR_ONLY)) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pDContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVgb, 0.0, 0.0); return (AcAnalysisMethod); } else { /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* load in the source contribution to the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pSContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVgb, 0.0, 0.0); return (AcAnalysisMethod); } else { /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* load in the gate contribution to the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pGContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = TWOsorSolve(pDevice, solnReal, solnImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIdVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIsVgb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, 0.0, 0.0); CMPLX_ASSIGN_VALUE(yAc->yIgVgb, 0.0, 0.0); return (AcAnalysisMethod); } } } } if (AcAnalysisMethod == DIRECT) { /* solve the system of equations directly */ /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pDContact); /* Need to load & factor jacobian once. */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } else if (OneCarrier == N_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -dxdy * omega); } else if (OneCarrier == P_TYPE) { spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, dxdy * omega); } } } } } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR */ startTime = SPfrontEnd->IFseconds(); spFactor(pDevice->matrix); pDevice->pStats->factorTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pSContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR: already done, no need to repeat. */ /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, y->real, y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pGContact); pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR: already done, no need to repeat. */ /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } /* MISC */ startTime = SPfrontEnd->IFseconds(); y = contactAdmittance(pDevice, pDContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVgb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVgb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVgb, y->real, y->imag); CMPLX_MULT_SELF_SCALAR(yAc->yIdVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIdVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIdVgb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVgb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVgb, GNorm * width * LNorm); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; return (AcAnalysisMethod); } BOOLEAN TWOsorSolve(TWOdevice *pDevice, double *xReal, double *xImag, double omega) { double dxdy; double wRelax = 1.0; /* SOR relaxation parameter */ double *rhsReal = pDevice->rhs; double *rhsSOR = pDevice->rhsImag; BOOLEAN SORConverged = FALSE; BOOLEAN SORFailed = FALSE; int numEqns = pDevice->numEqns; int iterationNum; int indexN, indexP; int index, eIndex; TWOnode *pNode; TWOelem *pElem; /* clear xReal and xImag arrays */ for (index = 1; index <= numEqns; index++) { xReal[index] = 0.0; xImag[index] = 0.0; } iterationNum = 1; for (; (!SORConverged) &&(!SORFailed); iterationNum++) { for (index = 1; index <= numEqns; index++) { rhsSOR[index] = 0.0; } for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { if (!OneCarrier) { indexN = pNode->nEqn; indexP = pNode->pEqn; rhsSOR[indexN] -= dxdy * omega * xImag[indexN]; rhsSOR[indexP] += dxdy * omega * xImag[indexP]; } else if (OneCarrier == N_TYPE) { indexN = pNode->nEqn; rhsSOR[indexN] -= dxdy * omega * xImag[indexN]; } else if (OneCarrier == P_TYPE) { indexP = pNode->pEqn; rhsSOR[indexP] += dxdy * omega * xImag[indexP]; } } } } /* now add the terms from rhs to rhsImag */ for (index = 1; index <= numEqns; index++) { rhsSOR[index] += rhsReal[index]; } /* compute xReal(k+1). solution stored in rhsImag */ spSolve(pDevice->matrix, rhsSOR, rhsSOR, NULL, NULL); /* modify solution when wRelax is not 1 */ if (wRelax != 1) { for (index = 1; index <= numEqns; index++) { rhsSOR[index] = (1 - wRelax) * xReal[index] + wRelax * rhsSOR[index]; } } if (iterationNum > 1) { SORConverged = hasSORConverged(xReal, rhsSOR, numEqns); } /* copy real solution into xReal */ for (index = 1; index <= numEqns; index++) { xReal[index] = rhsSOR[index]; } /* now compute the imaginary part of the solution xImag */ for (index = 1; index <= numEqns; index++) { rhsSOR[index] = 0.0; } for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { if (!OneCarrier) { indexN = pNode->nEqn; indexP = pNode->pEqn; rhsSOR[indexN] += dxdy * omega * xReal[indexN]; rhsSOR[indexP] -= dxdy * omega * xReal[indexP]; } else if (OneCarrier == N_TYPE) { indexN = pNode->nEqn; rhsSOR[indexN] += dxdy * omega * xReal[indexN]; } else if (OneCarrier == P_TYPE) { indexP = pNode->pEqn; rhsSOR[indexP] -= dxdy * omega * xReal[indexP]; } } } } /* compute xImag(k+1) */ spSolve(pDevice->matrix, rhsSOR, rhsSOR, NULL, NULL); /* modify solution when wRelax is not 1 */ if (wRelax != 1) { for (index = 1; index <= numEqns; index++) { rhsSOR[index] = (1 - wRelax) * xImag[index] + wRelax * rhsSOR[index]; } } if (iterationNum > 1) { SORConverged = SORConverged && hasSORConverged(xImag, rhsSOR, numEqns); } /* copy imag solution into xImag */ for (index = 1; index <= numEqns; index++) { xImag[index] = rhsSOR[index]; } if ((iterationNum > 4) && !SORConverged) { SORFailed = TRUE; } if (TWOacDebug) printf("SOR iteration number = %d\n", iterationNum); } return (SORFailed); } SPcomplex * contactAdmittance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, double *xReal, double *xImag, SPcomplex *cOmega) { TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOedge *pHEdge = NULL, *pVEdge = NULL; int index, i, indexPsi, indexN, indexP, numContactNodes; TWOelem *pElem; SPcomplex psiAc, nAc, pAc; SPcomplex prod1, prod2, sum; double temp; NG_IGNORE(pDevice); CMPLX_ASSIGN_VALUE(yTotal, 0.0, 0.0); numContactNodes = pContact->numNodes; for (index = 0; index < numContactNodes; index++) { pNode = pContact->pNodes[index]; for (i = 0; i <= 3; i++) { pElem = pNode->pElems[i]; if (pElem != NULL) { switch (i) { case 0: /* the TL element */ pHNode = pElem->pBLNode; pVNode = pElem->pTRNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; if (pElem->elemType == SEMICON) { /* compute the derivatives with n,p */ if (pHNode->nodeType != CONTACT) { indexN = pHNode->nEqn; indexP = pHNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pHEdge->dJnDn); CMPLX_MULT_SCALAR(prod2, pAc, pHEdge->dJpDp); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dy); CMPLX_SUBT_ASSIGN(yTotal, prod1); } if (pVNode->nodeType != CONTACT) { indexN = pVNode->nEqn; indexP = pVNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pVEdge->dJnDn); CMPLX_MULT_SCALAR(prod2, pAc, pVEdge->dJpDp); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dx); CMPLX_SUBT_ASSIGN(yTotal, prod1); } } break; case 1: /* the TR element */ pHNode = pElem->pBRNode; pVNode = pElem->pTLNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; if (pElem->elemType == SEMICON) { /* compute the derivatives with n,p */ if (pHNode->nodeType != CONTACT) { indexN = pHNode->nEqn; indexP = pHNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pHEdge->dJnDnP1); CMPLX_MULT_SCALAR(prod2, pAc, pHEdge->dJpDpP1); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dy); CMPLX_ADD_ASSIGN(yTotal, prod1); } if (pVNode->nodeType != CONTACT) { indexN = pVNode->nEqn; indexP = pVNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pVEdge->dJnDn); CMPLX_MULT_SCALAR(prod2, pAc, pVEdge->dJpDp); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dx); CMPLX_SUBT_ASSIGN(yTotal, prod1); } } break; case 2: /* the BR element */ pHNode = pElem->pTRNode; pVNode = pElem->pBLNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; if (pElem->elemType == SEMICON) { /* compute the derivatives with n,p */ if (pHNode->nodeType != CONTACT) { indexN = pHNode->nEqn; indexP = pHNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pHEdge->dJnDnP1); CMPLX_MULT_SCALAR(prod2, pAc, pHEdge->dJpDpP1); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dy); CMPLX_ADD_ASSIGN(yTotal, prod1); } if (pVNode->nodeType != CONTACT) { indexN = pVNode->nEqn; indexP = pVNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pVEdge->dJnDnP1); CMPLX_MULT_SCALAR(prod2, pAc, pVEdge->dJpDpP1); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dx); CMPLX_ADD_ASSIGN(yTotal, prod1); } } break; case 3: /* the BL element */ pHNode = pElem->pTLNode; pVNode = pElem->pBRNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; if (pElem->elemType == SEMICON) { /* compute the derivatives with n,p */ if (pHNode->nodeType != CONTACT) { indexN = pHNode->nEqn; indexP = pHNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pHEdge->dJnDn); CMPLX_MULT_SCALAR(prod2, pAc, pHEdge->dJpDp); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dy); CMPLX_SUBT_ASSIGN(yTotal, prod1); } if (pVNode->nodeType != CONTACT) { indexN = pVNode->nEqn; indexP = pVNode->pEqn; CMPLX_ASSIGN_VALUE(nAc, xReal[indexN], xImag[indexN]); CMPLX_ASSIGN_VALUE(pAc, xReal[indexP], xImag[indexP]); CMPLX_MULT_SCALAR(prod1, nAc, pVEdge->dJnDnP1); CMPLX_MULT_SCALAR(prod2, pAc, pVEdge->dJpDpP1); CMPLX_ADD(sum, prod1, prod2); CMPLX_MULT_SCALAR(prod1, sum, 0.5 * pElem->dx); CMPLX_ADD_ASSIGN(yTotal, prod1); } } break; } if (pElem->elemType == SEMICON) { if (pHNode->nodeType != CONTACT) { indexPsi = pHNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); temp = 0.5 * pElem->dy * (pHEdge->dJnDpsiP1 + pHEdge->dJpDpsiP1); CMPLX_MULT_SCALAR(prod1, psiAc, temp); CMPLX_ADD_ASSIGN(yTotal, prod1); if (delVContact) { CMPLX_ADD_SELF_SCALAR(yTotal, -temp); } } if (pVNode->nodeType != CONTACT) { indexPsi = pVNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); temp = 0.5 * pElem->dx * (pVEdge->dJnDpsiP1 + pVEdge->dJpDpsiP1); CMPLX_MULT_SCALAR(prod1, psiAc, temp); CMPLX_ADD_ASSIGN(yTotal, prod1); if (delVContact) { CMPLX_ADD_SELF_SCALAR(yTotal, -temp); } } } /* displacement current terms */ if (pHNode->nodeType != CONTACT) { indexPsi = pHNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * 0.5 * pElem->dyOverDx); CMPLX_MULT(prod2, prod1, psiAc); CMPLX_SUBT_ASSIGN(yTotal, prod2); if (delVContact) { CMPLX_ADD_ASSIGN(yTotal, prod1); } } if (pVNode->nodeType != CONTACT) { indexPsi = pVNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * 0.5 * pElem->dxOverDy); CMPLX_MULT(prod2, prod1, psiAc); CMPLX_SUBT_ASSIGN(yTotal, prod2); if (delVContact) { CMPLX_ADD_ASSIGN(yTotal, prod1); } } } } } return (&yTotal); /* XXX */ } SPcomplex * oxideAdmittance(TWOdevice *pDevice, TWOcontact *pContact, BOOLEAN delVContact, double *xReal, double *xImag, SPcomplex *cOmega) { TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOedge *pHEdge, *pVEdge; int index, i, indexPsi, numContactNodes; TWOelem *pElem; SPcomplex psiAc; SPcomplex prod1, prod2; NG_IGNORE(pDevice); CMPLX_ASSIGN_VALUE(yTotal, 0.0, 0.0); numContactNodes = pContact->numNodes; for (index = 0; index < numContactNodes; index++) { pNode = pContact->pNodes[index]; for (i = 0; i <= 3; i++) { pElem = pNode->pElems[i]; if (pElem != NULL) { switch (i) { case 0: /* the TL element */ pHNode = pElem->pBLNode; pVNode = pElem->pTRNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; break; case 1: /* the TR element */ pHNode = pElem->pBRNode; pVNode = pElem->pTLNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; break; case 2: /* the BR element */ pHNode = pElem->pTRNode; pVNode = pElem->pBLNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; break; case 3: /* the BL element */ pHNode = pElem->pTLNode; pVNode = pElem->pBRNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; break; } /* displacement current terms */ if (pHNode->nodeType != CONTACT) { indexPsi = pHNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * 0.5 * pElem->dyOverDx); CMPLX_MULT(prod2, prod1, psiAc); CMPLX_SUBT_ASSIGN(yTotal, prod2); if (delVContact) { CMPLX_ADD_ASSIGN(yTotal, prod1); } } if (pVNode->nodeType != CONTACT) { indexPsi = pVNode->psiEqn; CMPLX_ASSIGN_VALUE(psiAc, xReal[indexPsi], xImag[indexPsi]); CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * 0.5 * pElem->dxOverDy); CMPLX_MULT(prod2, prod1, psiAc); CMPLX_SUBT_ASSIGN(yTotal, prod2); if (delVContact) { CMPLX_ADD_ASSIGN(yTotal, prod1); } } } } } return (&yTotal); } void NUMD2ys(TWOdevice *pDevice, SPcomplex *s, SPcomplex *yIn) { TWOnode *pNode; TWOelem *pElem; int index, eIndex; double dxdy; double *solnReal, *solnImag; double *rhsReal, *rhsImag; SPcomplex yAc, *y; BOOLEAN deltaVContact = FALSE; SPcomplex temp, cOmega; /* * change context names of solution vectors for ac analysis dcDeltaSolution * stores the real part and copiedSolution stores the imaginary part of the * ac solution vector */ pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ CMPLX_MULT_SCALAR(cOmega, *s, TNorm); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* solve the system of equations directly */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } storeNewRhs(pDevice, pDevice->pLastContact); spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } else if (OneCarrier == N_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); } else if (OneCarrier == P_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } } } } } spFactor(pDevice->matrix); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pDevice->pFirstContact, deltaVContact, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc, y->real, y->imag); CMPLX_ASSIGN(*yIn, yAc); CMPLX_NEGATE_SELF(*yIn); CMPLX_MULT_SELF_SCALAR(*yIn, GNorm * pDevice->width * LNorm); } void NBJT2ys(TWOdevice *pDevice, SPcomplex *s, SPcomplex *yIeVce, SPcomplex *yIcVce, SPcomplex *yIeVbe, SPcomplex *yIcVbe) { TWOcontact *pEmitContact = pDevice->pLastContact; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; TWOnode *pNode; TWOelem *pElem; int index, eIndex; double width = pDevice->width; double dxdy; double *solnReal, *solnImag; double *rhsReal, *rhsImag; SPcomplex *y; SPcomplex pIeVce, pIcVce, pIeVbe, pIcVbe; SPcomplex temp, cOmega; pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ CMPLX_MULT_SCALAR(cOmega, *s, TNorm); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* solve the system of equations directly */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } storeNewRhs(pDevice, pColContact); spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } else if (OneCarrier == N_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); } else if (OneCarrier == P_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } } } } } spFactor(pDevice->matrix); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pEmitContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, y->real, y->imag); y = contactAdmittance(pDevice, pColContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, y->real, y->imag); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pBaseContact); /* don't need to LU factor the jacobian since it exists */ spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pEmitContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVbe, y->real, y->imag); y = contactAdmittance(pDevice, pColContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVbe, y->real, y->imag); CMPLX_ASSIGN(*yIeVce, pIeVce); CMPLX_ASSIGN(*yIeVbe, pIeVbe); CMPLX_ASSIGN(*yIcVce, pIcVce); CMPLX_ASSIGN(*yIcVbe, pIcVbe); CMPLX_MULT_SELF_SCALAR(*yIeVce, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIeVbe, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIcVce, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(*yIcVbe, GNorm * width * LNorm); } void NUMOSys(TWOdevice *pDevice, SPcomplex *s, struct mosAdmittances *yAc) { TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; /* TWOcontact *pBContact = pDevice->pLastContact; */ TWOnode *pNode; TWOelem *pElem; int index, eIndex; double width = pDevice->width; double dxdy; double *rhsReal, *rhsImag; double *solnReal, *solnImag; SPcomplex *y; SPcomplex temp, cOmega; pDevice->solverType = SLV_SMSIG; rhsReal = pDevice->rhs; rhsImag = pDevice->rhsImag; solnReal = pDevice->dcDeltaSolution; solnImag = pDevice->copiedSolution; /* use a normalized radian frequency */ CMPLX_MULT_SCALAR(cOmega, *s, TNorm); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } /* solve the system of equations directly */ if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } storeNewRhs(pDevice, pDContact); spSetComplex(pDevice->matrix); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; if (pElem->elemType == SEMICON) { dxdy = 0.25 * pElem->dx * pElem->dy; for (index = 0; index <= 3; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { if (!OneCarrier) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } else if (OneCarrier == N_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); } else if (OneCarrier == P_TYPE) { CMPLX_MULT_SCALAR(temp, cOmega, dxdy); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } } } } } spFactor(pDevice->matrix); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pDContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVdb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVdb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVdb, y->real, y->imag); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pSContact); /* don't need to LU factor the jacobian since it exists */ spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pDContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVsb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVsb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVsb, y->real, y->imag); for (index = 1; index <= pDevice->numEqns; index++) { rhsImag[index] = 0.0; } storeNewRhs(pDevice, pGContact); spSolve(pDevice->matrix, rhsReal, solnReal, rhsImag, solnImag); y = contactAdmittance(pDevice, pDContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIdVgb, y->real, y->imag); y = contactAdmittance(pDevice, pSContact, FALSE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIsVgb, y->real, y->imag); y = GateTypeAdmittance(pDevice, pGContact, TRUE, solnReal, solnImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc->yIgVgb, y->real, y->imag); CMPLX_MULT_SELF_SCALAR(yAc->yIdVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIdVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIdVgb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIsVgb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVdb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVsb, GNorm * width * LNorm); CMPLX_MULT_SELF_SCALAR(yAc->yIgVgb, GNorm * width * LNorm); } ngspice-26/src/ciderlib/twod/twodopng.c0000644000265600020320000001227512264261473017566 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/profile.h" #include "ngspice/macros.h" #include "ngspice/bool.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" /* functions in this file are used to calculate the conc */ double TWOdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x, double y) { double argX, argY, argP, argL, value = 0.0; /* Find the appropriate lookup table if necessary */ if (pProfile->type == LOOKUP) { while ( pTable != NULL ) { if (pTable->impId == pProfile->IMPID) { /* Found it */ break; } else { pTable = pTable->next; } } if ( pTable == NULL ) { fprintf( stderr, "Error: unknown impurity profile %d\n", ((int)pProfile->IMPID) ); exit(1); } } /* Find distances */ if ( pProfile->Y_LOW > y ) { argY = pProfile->Y_LOW - y; } else if ( y > pProfile->Y_HIGH ) { argY = y - pProfile->Y_HIGH; } else { argY = 0.0; } if ( pProfile->X_LOW > x ) { argX = pProfile->X_LOW - x; } else if ( x > pProfile->X_HIGH ) { argX = x - pProfile->X_HIGH; } else { argX = 0.0; } if ( pProfile->DIRECTION == Y ) { argP = argY; argL = argX / pProfile->LAT_RATIO; } else { argP = argX; argL = argY / pProfile->LAT_RATIO; } if ( pProfile->rotate ) { argP = sqrt(argP*argP + argL*argL); argL = 0.0; } /* Transform to coordinates of profile peak */ argP -= pProfile->LOCATION; argP /= pProfile->CHAR_LENGTH; argL -= pProfile->LOCATION; argL /= pProfile->CHAR_LENGTH; switch (pProfile->type) { case UNIF: if (argP > 0.0) { value = 0.0; } else { value = pProfile->CONC; } break; case LIN: argP = ABS(argP); if (argP > 1.0) { value = 0.0; } else { value = pProfile->CONC * ( 1.0 - argP ); } break; case GAUSS: argP *= argP; if ( argP > 80.0 ) { value = 0.0; } else { value = pProfile->PEAK_CONC * exp( -argP ); } case EXP: argP = ABS(argP); if ( argP > 80.0 ) { value = 0.0; } else { value = pProfile->PEAK_CONC * exp( -argP ); } break; case ERRFC: argP = ABS(argP); if ( argP > 10.0 ) { value = 0.0; } else { value = pProfile->PEAK_CONC * erfc( -argP ); } break; case LOOKUP: argP = ABS(argP); value = lookup( pTable->dopData, argP ); break; default: break; } if (!pProfile->rotate) { /* Tensor product in lateral direction */ switch (pProfile->latType) { case UNIF: if (argL > 0.0) { value = 0.0; } break; case LIN: argL = ABS(argL); if (argL > 1.0) { value = 0.0; } else { value *= ( 1.0 - argL ); } break; case GAUSS: argL *= argL; if ( argL > 80.0 ) { value = 0.0; } else { value *= exp( -argL ); } case EXP: argL = ABS(argL); if ( argL > 80.0 ) { value = 0.0; } else { value *= exp( -argL ); } break; case ERRFC: argL = ABS(argL); if ( argP > 10.0 ) { value = 0.0; } else { value *= erfc( -argL ); } break; case LOOKUP: argL = ABS(argL); value *= lookup( pTable->dopData, argL ) / lookup( pTable->dopData, 0.0 ); break; default: break; } } /* end: not rotated */ return( value ); } void TWOsetDoping(TWOdevice *pDevice, DOPprofile *pProfile, DOPtable *pTable) { TWOnode *pNode; TWOelem *pElem; DOPprofile *pP; double conc; int index, eIndex; BOOLEAN dopeMe; /* Clear doping info for all nodes. */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; pNode->na = 0.0; pNode->nd = 0.0; pNode->netConc = 0.0; pNode->totalConc = 0.0; } } } /* Now compute the contribution to the total doping from each profile. */ for ( pP = pProfile; pP != NULL; pP = pP->next ) { for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; if ( pElem->elemType == SEMICON ) { if ( pP->numDomains > 0 ) { dopeMe = FALSE; for ( index = 0; index < pP->numDomains; index++ ) { if ( pElem->domain == pP->domains[ index ] ) { dopeMe = TRUE; break; } } } else { /* domains not given, so dope all */ dopeMe = TRUE; } if ( dopeMe ) { for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; conc = TWOdopingValue( pP, pTable, pDevice->xScale[ pNode->nodeI ], pDevice->yScale[ pNode->nodeJ ] ); pNode->netConc += conc; if ( conc < 0.0 ) { pNode->totalConc -= conc; pNode->na -= conc; } else { pNode->totalConc += conc; pNode->nd += conc; } } } } } } } } ngspice-26/src/ciderlib/twod/twopcont.c0000644000265600020320000006747512264261473017616 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/bernoull.h" /* * Functions to setup and solve the continuity equations. * Both continuity equations are solved. * Separate functions are used for one continuity equation. */ /* * setup matrix pointers to Jacobian values and * store direct pointers with the nodes */ void TWOPjacBuild(TWOdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; TWOelem *pElem; TWOnode *pNode; TWOchannel *pCh; int eIndex, nIndex; int nextIndex; /* index of node to find next element */ int psiEqn, pEqn; /* scratch for deref'd eqn numbers */ int psiEqnTL = 0, pEqnTL = 0; int psiEqnTR = 0, pEqnTR = 0; int psiEqnBR = 0, pEqnBR = 0; int psiEqnBL = 0, pEqnBL = 0; int psiEqnInM = 0, psiEqnInP = 0; /* scratch for deref'd surface eqns */ int psiEqnOxM = 0, psiEqnOxP = 0; /* M= more negative, P= more positive */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; /* first the self terms */ for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; /* get poisson-only pointer */ psiEqn = pNode->psiEqn; pNode->fPsiPsi = spGetElement( matrix, psiEqn, psiEqn ); if ( pElem->elemType == SEMICON ) { /* get continuity-coupling terms */ pEqn = pNode->pEqn; pNode->nEqn = 0; /* pointers for additional terms */ pNode->fPsiP = spGetElement( matrix, psiEqn, pEqn ); pNode->fPPsi = spGetElement( matrix, pEqn, psiEqn ); pNode->fPP = spGetElement( matrix, pEqn, pEqn ); } else { pEqn = 0; } /* save equation indices */ switch ( nIndex ) { case 0: /* TL Node */ psiEqnTL = psiEqn; pEqnTL = pEqn; break; case 1: /* TR Node */ psiEqnTR = psiEqn; pEqnTR = pEqn; break; case 2: /* BR Node */ psiEqnBR = psiEqn; pEqnBR = pEqn; break; case 3: /* BL Node */ psiEqnBL = psiEqn; pEqnBL = pEqn; break; default: break; } } /* now terms to couple to adjacent nodes */ pNode = pElem->pTLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnTL, psiEqnTR ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTL, psiEqnBL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fPPsiiP1 = spGetElement( matrix, pEqnTL, psiEqnTR ); pNode->fPPiP1 = spGetElement( matrix, pEqnTL, pEqnTR ); pNode->fPPsijP1 = spGetElement( matrix, pEqnTL, psiEqnBL ); pNode->fPPjP1 = spGetElement( matrix, pEqnTL, pEqnBL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fPPsiiP1jP1 = spGetElement( matrix, pEqnTL, psiEqnBR ); pNode->fPPiP1jP1 = spGetElement( matrix, pEqnTL, pEqnBR ); } } pNode = pElem->pTRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnTR, psiEqnTL ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTR, psiEqnBR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fPPsiiM1 = spGetElement( matrix, pEqnTR, psiEqnTL ); pNode->fPPiM1 = spGetElement( matrix, pEqnTR, pEqnTL ); pNode->fPPsijP1 = spGetElement( matrix, pEqnTR, psiEqnBR ); pNode->fPPjP1 = spGetElement( matrix, pEqnTR, pEqnBR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fPPsiiM1jP1 = spGetElement( matrix, pEqnTR, psiEqnBL ); pNode->fPPiM1jP1 = spGetElement( matrix, pEqnTR, pEqnBL ); } } pNode = pElem->pBRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnBR, psiEqnBL ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBR, psiEqnTR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fPPsiiM1 = spGetElement( matrix, pEqnBR, psiEqnBL ); pNode->fPPiM1 = spGetElement( matrix, pEqnBR, pEqnBL ); pNode->fPPsijM1 = spGetElement( matrix, pEqnBR, psiEqnTR ); pNode->fPPjM1 = spGetElement( matrix, pEqnBR, pEqnTR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fPPsiiM1jM1 = spGetElement( matrix, pEqnBR, psiEqnTL ); pNode->fPPiM1jM1 = spGetElement( matrix, pEqnBR, pEqnTL ); } } pNode = pElem->pBLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnBL, psiEqnBR ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBL, psiEqnTL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fPPsiiP1 = spGetElement( matrix, pEqnBL, psiEqnBR ); pNode->fPPiP1 = spGetElement( matrix, pEqnBL, pEqnBR ); pNode->fPPsijM1 = spGetElement( matrix, pEqnBL, psiEqnTL ); pNode->fPPjM1 = spGetElement( matrix, pEqnBL, pEqnTL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fPPsiiP1jM1 = spGetElement( matrix, pEqnBL, psiEqnTR ); pNode->fPPiP1jM1 = spGetElement( matrix, pEqnBL, pEqnTR ); } } } /* * Add terms for surface-field of inversion-layer mobility model. * Elements MUST be made from silicon for this to work. * No empty elements are allowed. * Don't need these pointers if SurfaceMobility isn't set. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: psiEqnInM = pElem->pBLNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pTRNode->psiEqn; break; case 1: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pBLNode->psiEqn; psiEqnOxM = pElem->pTRNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 2: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pTRNode->psiEqn; psiEqnOxM = pElem->pBLNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 3: psiEqnInM = pElem->pTRNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pBLNode->psiEqn; break; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; psiEqn = pNode->psiEqn; pEqn = pNode->pEqn; if ( pCh->type % 2 == 0 ) { /* Vertical Slice */ if ( nIndex == 0 || nIndex == 3 ) { /* Left Side */ pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOxP1 = spGetElement( matrix, pEqn, psiEqnOxP ); } else { /* Right Side */ pNode->fPPsiInM1 = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOxM1 = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); } } else { /* Horizontal Slice */ if ( nIndex <= 1 ) { /* Top Side */ pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOxP1 = spGetElement( matrix, pEqn, psiEqnOxP ); } else { /* Bottom Side */ pNode->fPPsiInM1 = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOxM1 = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); } } } /* endfor nIndex */ pElem = pElem->pElems[ nextIndex ]; } /* endwhile pElem */ } /* endfor pCh */ } /* endif SurfaceMobility */ } /* * The Jacobian and Rhs are loaded by the following function. * Inputs are the transient analysis flag and the transient * information structure */ void TWOPsysLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsP; double nConc, pConc; double perTime = 0.0; /* first compute the currents and derivatives */ TWOPcommonTerms( pDevice, FALSE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( pElem->elemType == SEMICON ) { nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; *(pNode->fPsiPsi) += dxdy * nConc; *(pNode->fPsiP) -= dxdy; *(pNode->fPPsi) -= dy * pHEdge->dJpDpsiP1 + dx * pVEdge->dJpDpsiP1; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ *(pNode->fPP) += dxdy * pNode->dUdP; *(pNode->fPPsi) += dxdy * pNode->dUdN * nConc; rhsP = dxdy * pNode->uNet; pRhs[ pNode->pEqn ] -= rhsP; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { *(pNode->fPP) += dxdy * perTime; pRhs[ pNode->pEqn ] -= dxdy * pNode->dPdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= dy * pTEdge->jp + dx * pLEdge->jp; *(pNode->fPP) += dy * pTEdge->dJpDp + dx * pLEdge->dJpDp; *(pNode->fPPsiiP1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pTEdge->dJpDpP1; *(pNode->fPPsijP1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pLEdge->dJpDpP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= -dy * pTEdge->jp + dx * pREdge->jp; *(pNode->fPP) += -dy * pTEdge->dJpDpP1 + dx * pREdge->dJpDp; *(pNode->fPPsiiM1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pTEdge->dJpDp; *(pNode->fPPsijP1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pREdge->dJpDpP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= -dy * pBEdge->jp - dx * pREdge->jp; *(pNode->fPP) += -dy * pBEdge->dJpDpP1 - dx * pREdge->dJpDpP1; *(pNode->fPPsiiM1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pBEdge->dJpDp; *(pNode->fPPsijM1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pREdge->dJpDp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= dy * pBEdge->jp - dx * pLEdge->jp; *(pNode->fPP) += dy * pBEdge->dJpDp - dx * pLEdge->dJpDpP1; *(pNode->fPPsiiP1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pBEdge->dJpDpP1; *(pNode->fPPsijM1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pLEdge->dJpDp; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWOPmobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* this function used only for direct method ac analysis Used to load only the dc Jacobian matrix. Rhs is unaffected */ void TWOPjacLoad(TWOdevice *pDevice) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; double nConc; /* first compute the currents and derivatives */ TWOPcommonTerms( pDevice, FALSE, FALSE, NULL ); /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( pElem->elemType == SEMICON ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } nConc = pDevice->devState0 [pNode->nodeN]; *(pNode->fPsiPsi) += dxdy * nConc; *(pNode->fPsiP) -= dxdy; *(pNode->fPPsi) -= dy * pHEdge->dJpDpsiP1 + dx * pVEdge->dJpDpsiP1; /* Handle generation terms */ *(pNode->fPP) += dxdy * pNode->dUdP; *(pNode->fPPsi) += dxdy * pNode->dUdN * nConc; } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fPP) += dy * pTEdge->dJpDp + dx * pLEdge->dJpDp; *(pNode->fPPsiiP1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pTEdge->dJpDpP1; *(pNode->fPPsijP1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pLEdge->dJpDpP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fPP) += -dy * pTEdge->dJpDpP1 + dx * pREdge->dJpDp; *(pNode->fPPsiiM1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pTEdge->dJpDp; *(pNode->fPPsijP1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pREdge->dJpDpP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fPP) += -dy * pBEdge->dJpDpP1 - dx * pREdge->dJpDpP1; *(pNode->fPPsiiM1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pBEdge->dJpDp; *(pNode->fPPsijM1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pREdge->dJpDp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fPP) += dy * pBEdge->dJpDp - dx * pLEdge->dJpDpP1; *(pNode->fPPsiiP1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pBEdge->dJpDpP1; *(pNode->fPPsijM1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pLEdge->dJpDp; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWOPmobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* load only the Rhs vector */ void TWOPrhsLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsP; double nConc, pConc; double perTime; /* first compute the currents */ TWOPcommonTerms( pDevice, TRUE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ rhsP = dxdy * pNode->uNet; pRhs[ pNode->pEqn ] -= rhsP; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { pRhs[ pNode->pEqn ] -= dxdy * pNode->dPdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= dy * pTEdge->jp + dx * pLEdge->jp; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= -dy * pTEdge->jp + dx * pREdge->jp; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= -dy * pBEdge->jp - dx * pREdge->jp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->pEqn ] -= dy * pBEdge->jp - dx * pLEdge->jp; } } } } /* * computation of current densities, recombination rates, * mobilities and their derivatives */ void TWOPcommonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; int nextIndex; /* index of node to find next element */ double psi1, psi2, refPsi, pC, pP1; double dPsiP; double bPsiP, dbPsiP, bMPsiP, dbMPsiP; double muP, dMuP, rDx, rDy; double psi, nConc = 0.0, pConc = 0.0; double cnAug, cpAug; double eSurf = 0.0; /* For channel mobilities */ double qInt = 0.0; TWOchannel *pCh; /* evaluate all node (including recombination) and edge quantities */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; refPsi = pElem->matlInfo->refPsi; cnAug = pElem->matlInfo->cAug[ELEC]; cpAug = pElem->matlInfo->cAug[HOLE]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi = pDevice->dcSolution[ pNode->psiEqn ]; if ( pElem->elemType == SEMICON ) { nConc = pNode->nie * exp( psi - refPsi ); pConc = pDevice->dcSolution[ pNode->pEqn ]; if ( Srh ) { recomb(nConc, pConc, pNode->tn, pNode->tp, cnAug, cpAug, pNode->nie, &pNode->uNet, &pNode->dUdN, &pNode->dUdP); } else { pNode->uNet = 0.0; pNode->dUdN = 0.0; pNode->dUdP = 0.0; } } } else { /* a contact node */ psi = pNode->psi; if ( pElem->elemType == SEMICON ) { nConc = pNode->nConc; pConc = pNode->pConc; } } /* store info in the state tables */ pDevice->devState0 [pNode->nodePsi] = psi; if ( pElem->elemType == SEMICON ) { pDevice->devState0 [pNode->nodeN] = nConc; pDevice->devState0 [pNode->nodeP] = pConc; if ( tranAnalysis && pNode->nodeType != CONTACT ) { pNode->dNdT = integrate( pDevice->devStates, info, pNode->nodeN ); pNode->dPdT = integrate( pDevice->devStates, info, pNode->nodeP ); } } } } for ( index = 0; index <= 3; index++ ) { if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi1 = pDevice->dcSolution[pNode->psiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pNodes[ (index + 1) % 4 ]; if ( pNode->nodeType != CONTACT ) { psi2 = pDevice->dcSolution[pNode->psiEqn]; } else { psi2 = pNode->psi; } if ( index <= 1 ) { pEdge->dPsi = psi2 - psi1; } else { pEdge->dPsi = psi1 - psi2; } pDevice->devState0 [pEdge->edgeDpsi] = pEdge->dPsi; if ( pElem->elemType == SEMICON ) { /* Calculate weighted driving forces - wdfn & wdfp for the edge */ dPsiP = pEdge->dPsi - pEdge->dVBand; bernoulli( dPsiP, &bPsiP, &dbPsiP, &bMPsiP, &dbMPsiP, !currentOnly); if ( index <= 1 ) { pC = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeP); pP1 = *(pDevice->devState0 + pElem->pNodes[ index+1 ]->nodeP); } else { pC = *(pDevice->devState0 + pElem->pNodes[(index+1)%4]->nodeP); pP1 = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeP); } pEdge->wdfp = bPsiP * pC - bMPsiP * pP1; pEdge->jp = 0.0; if ( !currentOnly ) { pEdge->dWpDpsiP1 = dbPsiP * pC - dbMPsiP * pP1; pEdge->dWpDp = bPsiP; pEdge->dWpDpP1 = - bMPsiP; pEdge->dJpDpsiP1 = 0.0; pEdge->dJpDp = 0.0; pEdge->dJpDpP1 = 0.0; } } } } } /* DAG: calculate mobilities for channel elems */ if ( SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pBotEdge->qf; break; case 1: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pLeftEdge->qf; break; case 2: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pTopEdge->qf; break; case 3: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pRightEdge->qf; break; } eSurf += qInt; pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWOPmobility( pElem, eSurf ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCH != NULL */ } /* endif SurfaceMobility */ /* calculate the current densities assuming mobility value depend on Ex,Ey*/ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; rDx = 1.0 / pElem->dx; rDy = 1.0 / pElem->dy; for ( index = 0; index <= 3; index++ ) { pEdge = pElem->pEdges[ index ]; /* calculate conductive currents */ if ( pElem->elemType == SEMICON ) { /* get mobility for this edge */ if ( !pElem->channel ) { /* Calculate mobility for non-channel elements */ muP = pElem->mup0; dMuP = 0.0; dPsiP = pEdge->dPsi - pEdge->dVBand; if ( index%2 == 0 ) { MOBfieldDep( pElem->matlInfo, HOLE, - dPsiP * rDx, &muP, &dMuP ); } else { MOBfieldDep( pElem->matlInfo, HOLE, - dPsiP * rDy, &muP, &dMuP ); } } else { /* Retrieve previously calculated value. */ muP = pElem->mup; dMuP = 0.0; } switch ( index ) { case 0: muP *= pEdge->kPos * rDx; dMuP *= pEdge->kPos * rDx * rDx; break; case 1: muP *= pEdge->kNeg * rDy; dMuP *= pEdge->kNeg * rDy * rDy; break; case 2: muP *= pEdge->kNeg * rDx; dMuP *= pEdge->kNeg * rDx * rDx; break; case 3: muP *= pEdge->kPos * rDy; dMuP *= pEdge->kPos * rDy * rDy; break; } /* Now that the mobility for this edge is known, do current */ pEdge->jp += muP * pEdge->wdfp; if ( !currentOnly ) { pEdge->dJpDpsiP1 += muP * pEdge->dWpDpsiP1; pEdge->dJpDp += muP * pEdge->dWpDp; pEdge->dJpDpP1 += muP * pEdge->dWpDpP1; if ( MobDeriv && (!pElem->channel) ) { pEdge->dJpDpsiP1 -= dMuP * pEdge->wdfp; } } } /* calculate displacement current only once */ if ( pElem->evalEdges[ index ] ) { if ( tranAnalysis ) { if ( index == 0 || index == 2 ) { /* horizontal edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDx; } else { /* vertical edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDy; } } } } } } ngspice-26/src/ciderlib/twod/twoelect.c0000644000265600020320000001210512264261473017543 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "twoddefs.h" #include "twodext.h" /* Use list-sorting header file to create electrode sorter */ #define TYPE TWOelectrode #define NEXT next #define SORT TWOssortElectrodes #define SORT1 TWOsortElectrodes #include "ngspice/lsort.h" #define ARG_MIN(a,b,c) ((a) > (b) ? 1 : ((a) < (b) ? -1 : (c))) int TWOcmpElectrode(TWOelectrode *a, TWOelectrode *b) { return ARG_MIN(a->id, b->id, 0); } /* * checkElectrodes * debug list of electrodes for errors, exit on any error: * 1. list doesn't have only contiguous id's from 1 to idHigh * 2. electrodes with box shapes * 3. order of node numbers is correct */ void checkElectrodes(TWOelectrode *pElectrode, int idHigh) { TWOelectrode *pE; int id; BOOLEAN error = FALSE; /* * order the electrodes * assign electrode numbers to uninitialized electrodes ( id == -1 ) * uninit electrodes are in reverse order from order in input file * resort electrodes */ pElectrode = TWOsortElectrodes( pElectrode, TWOcmpElectrode ); id = 1; for (pE = pElectrode; pE != NULL; pE = pE->next) { if (pE->id == -1) pE->id = id++; } pElectrode = TWOsortElectrodes( pElectrode, TWOcmpElectrode ); for (pE = pElectrode, id = 1; pE != NULL; pE = pE->next) { /* Check id's */ if ( pE->id < 1 || pE->id > idHigh) { fprintf(stderr, "Error: electrode %d out of range\n",pE->id); error = TRUE; } else if ( pE->id != id ) { if ( pE->id != ++id ) { fprintf(stderr, "Error: electrode(s) %d to %d missing\n",id,pE->id-1); id = pE->id; error = TRUE; } } } /* Make sure total number of distinct electrodes is correct */ if ( id != idHigh ) { fprintf(stderr, "Error: %d electrode%s not equal to %d required\n", id, (id != 1) ? "s are" : " is", idHigh); error = TRUE; } if (error) { exit(-1); } } /* * setupContacts * go through each set of electrode segments, find its size and find nodes */ void setupContacts(TWOdevice *pDevice, TWOelectrode *pElectrode, TWOnode ***nodeArray) { TWOelectrode *pE; TWOcontact *pNew = NULL, *pTail; TWOnode *pNode; int xIndex, yIndex, nIndex = 0; int id = 0, electrodeSize[MAXTERMINALS], electrodeType; int error = FALSE; /* INITIALIZATION * 0. Assume ELCT_ID's are initialized to 0 before setup is called * 1. Add a node only once to only one electrode * 2. Compute number of nodes in each electrode * 3. Overwrite SEMICON or INSULATOR nodeType at electrodes */ for ( pE = pElectrode; pE != NULL; pE = pE->next ) { if (pE->id != id) { /* Found the next electrode */ id = pE->id; electrodeSize[id] = 0; electrodeType = 0; } for ( xIndex = pE->ixLo; xIndex <= pE->ixHi; xIndex++ ) { for ( yIndex = pE->iyLo; yIndex <= pE->iyHi; yIndex++ ) { pNode = nodeArray[ xIndex ][ yIndex ]; if ( pNode != NULL ) { pNode->nodeType = CONTACT; /* Assign each node to an electrode only once */ if (pNode->ELCT_ID == 0) { /* Is this a new node? */ pNode->ELCT_ID = id; /* Mark electrode ownership */ electrodeSize[id]++; /* Increase electrode size */ } else if (pNode->ELCT_ID != id) { /* Node already owned by another electrode */ fprintf(stderr, "Error: electrodes %d and %d overlap at (%d,%d)\n", pNode->ELCT_ID, id, xIndex, yIndex); error = TRUE; } } } } } if (error) { exit(-1); } /* ALLOCATION AND NODE GRABBING * 1. For each electrode, create a new contact structure for the electrode. * 2. Fill in entries of contact structure * 3. Update First and Last Contact pointers of device */ /* printElectrodes( pDevice->pFirstContact ); */ id = 0; pDevice->pFirstContact = pTail = NULL; for ( pE = pElectrode; pE != NULL; pE = pE->next ) { if (pE->id != id) { /* Found the next electrode */ if ( pDevice->pFirstContact == NULL ) { XCALLOC( pNew, TWOcontact, 1 ); pDevice->pFirstContact = pTail = pNew; } else { XCALLOC( pNew->next, TWOcontact, 1 ); pTail = pNew = pNew->next; } pNew->next = NULL; id = pNew->id = pE->id; pNew->workf = pE->workf; pNew->numNodes = electrodeSize[id]; nIndex = 0; XCALLOC( pNew->pNodes, TWOnode *, electrodeSize[id] ); } for ( xIndex = pE->ixLo; xIndex <= pE->ixHi; xIndex++ ) { for ( yIndex = pE->iyLo; yIndex <= pE->iyHi; yIndex++ ) { pNode = nodeArray[ xIndex ][ yIndex ]; if ( pNode != NULL ) { /* Make sure node belongs to this electrode, then * clear ELCT_ID so that it is not grabbed again. */ if (pNode->ELCT_ID == id) { pNew->pNodes[ nIndex++ ] = pNode; pNode->ELCT_ID = 0; } } } } } pDevice->pLastContact = pTail; } ngspice-26/src/ciderlib/twod/twosetbc.c0000644000265600020320000000454012264261473017553 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "twoddefs.h" #include "twodext.h" /* Forward declarations */ static void setDirichlet(TWOcontact *, double); void NUMD2setBCs(TWOdevice *pDevice, double vd) { TWOcontact *pContact = pDevice->pLastContact; setDirichlet( pContact, - vd ); } void NBJT2setBCs(TWOdevice *pDevice, double vce, double vbe) { TWOcontact *pCollContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; setDirichlet( pCollContact, vce ); setDirichlet( pBaseContact, vbe ); } void NUMOSsetBCs(TWOdevice *pDevice, double vdb, double vsb, double vgb) { TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; setDirichlet( pDContact, vdb ); setDirichlet( pSContact, vsb ); setDirichlet( pGContact, vgb ); } static void setDirichlet(TWOcontact *pContact, double voltage) { int index, numContactNodes, i; TWOelem *pElem = NULL; TWOnode *pNode; double psi, ni, pi, nie; double conc, sign, absConc; voltage /= VNorm; numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; /* Find this node's owner element. */ for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL && pElem->evalNodes[ (i+2)%4 ] ) { break; /* got it */ } } if (pElem->elemType == INSULATOR) { pNode->psi = RefPsi - pNode->eaff; pNode->nConc = 0.0; pNode->pConc = 0.0; } else if (pElem->elemType == SEMICON) { nie = pNode->nie; conc = pNode->netConc / nie; sign = SGN( conc ); absConc = ABS( conc ); if ( conc != 0.0 ) { psi = sign * log( 0.5 * absConc + sqrt( 1.0 + 0.25*absConc*absConc )); ni = nie * exp( psi ); pi = nie * exp( - psi ); } else { psi = 0.0; ni = nie; pi = nie; } pNode->psi = pElem->matlInfo->refPsi + psi; pNode->nConc = ni; pNode->pConc = pi; } pNode->psi += voltage; } } ngspice-26/src/ciderlib/twod/twomobdv.c0000644000265600020320000014563312264261473017573 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/twomesh.h" #include "ngspice/bool.h" #include "twoddefs.h" #include "twodext.h" /* * Load the derivatives of the current with respect to changes in * the mobility, for all edges of a silicon element. * It is known a priori that the element is made of semiconductor. * These routines work for both channel and bulk elements. */ void TWO_mobDeriv( TWOelem* pElem, int chanType, double ds ) /* TWOelem *pElem: channel or bulk element */ /* int chanType: flag for direction of channel */ /* double ds: normalized hgt (len) of interface element */ { TWOnode *pNode; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; BOOLEAN channel = pElem->channel; double dx, dy, rDx, rDy; double coeffHx, coeffHy, coeffHs = 0.0; double coeffVx, coeffVy, coeffVs = 0.0; double dFnxDMun, dFnyDMun, dFnDEs = 0.0; double dFpxDMup, dFpyDMup, dFpDEs = 0.0; double dMnDEs, dMnDEx, dMnDEy, dMnDWx, dMnDWy; double dMpDEs, dMpDEx, dMpDEy, dMpDWx, dMpDWy; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 1.0 / dx; rDy = 1.0 / dy; /* compute length-dependent parameters */ coeffHx = 0.25 * dy * rDx; /* For horizontal edges */ coeffHy = 0.25; coeffVx = 0.25; /* For vertical edges */ coeffVy = 0.25 * dx * rDy; switch ( chanType ) { case 0: case 3: coeffHs = 0.25 * dy / ds; coeffVs = 0.25 * dx / ds; break; case 1: case 2: coeffHs = - 0.25 * dy / ds; coeffVs = - 0.25 * dx / ds; break; } /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Get element mobility derivatives for fast access later */ dMnDEs = pElem->dMunDEs; dMnDEx = pElem->dMunDEx; dMnDEy = pElem->dMunDEy; dMnDWx = pElem->dMunDWx; dMnDWy = pElem->dMunDWy; dMpDEs = pElem->dMupDEs; dMpDEx = pElem->dMupDEx; dMpDEy = pElem->dMupDEy; dMpDWx = pElem->dMupDWx; dMpDWy = pElem->dMupDWy; /* Add mobility derivatives due to Top Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffHx * (pTEdge->wdfn * rDx); dFnyDMun = coeffHy * (pTEdge->wdfn * rDx); dFpxDMup = coeffHx * (pTEdge->wdfp * rDx); dFpyDMup = coeffHy * (pTEdge->wdfp * rDx); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffHs * (pTEdge->wdfn * rDx) * dMnDEs; dFpDEs = coeffHs * (pTEdge->wdfp * rDx) * dMpDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1jP1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1jP1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNjP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1jP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPjP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1jP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } /* Add mobility derivatives due to Bottom Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffHx * (pBEdge->wdfn * rDx); dFnyDMun = coeffHy * (pBEdge->wdfn * rDx); dFpxDMup = coeffHx * (pBEdge->wdfp * rDx); dFpyDMup = coeffHy * (pBEdge->wdfp * rDx); /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsijM1) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jM1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsijM1) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jM1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNjM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1jM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNN) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPjM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1jM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPP) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if (channel ) { dFnDEs = coeffHs * (pBEdge->wdfn * rDx) * dMnDEs; dFpDEs = coeffHs * (pBEdge->wdfp * rDx) * dMpDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1jM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsijM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1jM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsijM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } /* Add mobility derivatives due to Left Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffVx * (pLEdge->wdfn * rDy); dFnyDMun = coeffVy * (pLEdge->wdfn * rDy); dFpxDMup = coeffVx * (pLEdge->wdfp * rDy); dFpyDMup = coeffVy * (pLEdge->wdfp * rDy); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffVs * (pLEdge->wdfn * rDy) * dMnDEs; dFpDEs = coeffVs * (pLEdge->wdfp * rDy) * dMpDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsijM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsijM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiInP1) += dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; *(pNode->fNPsiOxP1) -= dFnDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiInP1) += dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; *(pNode->fPPsiOxP1) -= dFpDEs; } /* Add mobility derivatives due to Right Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffVx * (pREdge->wdfn * rDy); dFnyDMun = coeffVy * (pREdge->wdfn * rDy); dFpxDMup = coeffVx * (pREdge->wdfp * rDy); dFpyDMup = coeffVy * (pREdge->wdfp * rDy); /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsi) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1jP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsi) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1jP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffVs * (pREdge->wdfn * rDy) * dMnDEs; dFpDEs = coeffVs * (pREdge->wdfp * rDy) * dMpDEs; *(pNode->fNPsiInM1) -= dFnDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiOxM1) += dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fPPsiInM1) -= dFpDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiOxM1) += dFpDEs; *(pNode->fPPsiOx) += dFpDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1jM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsijM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1jM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsijM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } return; } void TWONmobDeriv(TWOelem *pElem, int chanType, double ds) /* TWOelem *pElem: channel or bulk element */ /* int chanType: flag for direction of channel */ /* double ds: normalized hgt (len) of interface element */ { TWOnode *pNode; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; BOOLEAN channel = pElem->channel; double dx, dy, rDx, rDy; double coeffHx, coeffHy, coeffHs = 0.0; double coeffVx, coeffVy, coeffVs = 0.0; double dFnxDMun, dFnyDMun, dFnDEs = 0.0; double dMnDEs, dMnDEx, dMnDEy, dMnDWx, dMnDWy; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 1.0 / dx; rDy = 1.0 / dy; /* compute length-dependent parameters */ coeffHx = 0.25 * dy * rDx; /* For horizontal edges */ coeffHy = 0.25; coeffVx = 0.25; /* For vertical edges */ coeffVy = 0.25 * dx * rDy; switch ( chanType ) { case 0: case 3: coeffHs = 0.25 * dy / ds; coeffVs = 0.25 * dx / ds; break; case 1: case 2: coeffHs = - 0.25 * dy / ds; coeffVs = - 0.25 * dx / ds; break; } /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Get element mobility derivatives for fast access later */ dMnDEs = pElem->dMunDEs; dMnDEx = pElem->dMunDEx; dMnDEy = pElem->dMunDEy; dMnDWx = pElem->dMunDWx; dMnDWy = pElem->dMunDWy; /* Add mobility derivatives due to Top Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffHx * (pTEdge->wdfn * rDx); dFnyDMun = coeffHy * (pTEdge->wdfn * rDx); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffHs * (pTEdge->wdfn * rDx) * dMnDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; } /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1jP1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNjP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1jP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; } /* Add mobility derivatives due to Bottom Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffHx * (pBEdge->wdfn * rDx); dFnyDMun = coeffHy * (pBEdge->wdfn * rDx); /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsijM1) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jM1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNjM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1jM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNN) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if (channel ) { dFnDEs = coeffHs * (pBEdge->wdfn * rDx) * dMnDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1jM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsijM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; } /* Add mobility derivatives due to Left Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffVx * (pLEdge->wdfn * rDy); dFnyDMun = coeffVy * (pLEdge->wdfn * rDy); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsi) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffVs * (pLEdge->wdfn * rDy) * dMnDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiInP1) -= dFnDEs; *(pNode->fNPsiOx) += dFnDEs; *(pNode->fNPsiOxP1) += dFnDEs; } /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsijM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsiiP1jM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiP1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNiP1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNiP1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiInP1) += dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; *(pNode->fNPsiOxP1) -= dFnDEs; } /* Add mobility derivatives due to Right Edge */ /* First compute derivatives of cont. eqn's */ dFnxDMun = coeffVx * (pREdge->wdfn * rDy); dFnyDMun = coeffVy * (pREdge->wdfn * rDy); /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1) += dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsi) += - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsijP1) += - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1jP1) += dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1) += dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNN) += dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNNjP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1jP1) += dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFnDEs = coeffVs * (pREdge->wdfn * rDy) * dMnDEs; *(pNode->fNPsiInM1) -= dFnDEs; *(pNode->fNPsiIn) -= dFnDEs; *(pNode->fNPsiOxM1) += dFnDEs; *(pNode->fNPsiOx) += dFnDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* n continuity wrto potential derivatives */ *(pNode->fNPsiiM1jM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); *(pNode->fNPsijM1) -= - dFnxDMun * ( dMnDEx - dMnDWx * pTEdge->dWnDpsiP1 ) + dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsi) -= - dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pREdge->dWnDpsiP1 ); *(pNode->fNPsiiM1) -= dFnxDMun * ( dMnDEx - dMnDWx * pBEdge->dWnDpsiP1 ) - dFnyDMun * ( dMnDEy - dMnDWy * pLEdge->dWnDpsiP1 ); /* n continuity wrto n derivatives */ *(pNode->fNNiM1jM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDn ); *(pNode->fNNjM1) -= dFnxDMun * ( dMnDWx * pTEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDn ); *(pNode->fNN) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDnP1 ) + dFnyDMun * ( dMnDWy * pREdge->dWnDnP1 ); *(pNode->fNNiM1) -= dFnxDMun * ( dMnDWx * pBEdge->dWnDn ) + dFnyDMun * ( dMnDWy * pLEdge->dWnDnP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fNPsiInM1) += dFnDEs; *(pNode->fNPsiIn) += dFnDEs; *(pNode->fNPsiOxM1) -= dFnDEs; *(pNode->fNPsiOx) -= dFnDEs; } return; } void TWOPmobDeriv( TWOelem *pElem, int chanType, double ds ) /* TWOelem *pElem: channel or bulk element */ /*int chanType: flag for direction of channel */ /*double ds: normalized hgt (len) of interface element */ { TWOnode *pNode; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; BOOLEAN channel = pElem->channel; double dx, dy, rDx, rDy; double coeffHx, coeffHy, coeffHs = 0.0; double coeffVx, coeffVy, coeffVs = 0.0; double dFpxDMup, dFpyDMup, dFpDEs = 0.0; double dMpDEs, dMpDEx, dMpDEy, dMpDWx, dMpDWy; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 1.0 / dx; rDy = 1.0 / dy; /* compute length-dependent parameters */ coeffHx = 0.25 * dy * rDx; /* For horizontal edges */ coeffHy = 0.25; coeffVx = 0.25; /* For vertical edges */ coeffVy = 0.25 * dx * rDy; switch ( chanType ) { case 0: case 3: coeffHs = 0.25 * dy / ds; coeffVs = 0.25 * dx / ds; break; case 1: case 2: coeffHs = - 0.25 * dy / ds; coeffVs = - 0.25 * dx / ds; break; } /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Get element mobility derivatives for fast access later */ dMpDEs = pElem->dMupDEs; dMpDEx = pElem->dMupDEx; dMpDEy = pElem->dMupDEy; dMpDWx = pElem->dMupDWx; dMpDWy = pElem->dMupDWy; /* Add mobility derivatives due to Top Edge */ /* First compute derivatives of cont. eqn's */ dFpxDMup = coeffHx * (pTEdge->wdfp * rDx); dFpyDMup = coeffHy * (pTEdge->wdfp * rDx); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFpDEs = coeffHs * (pTEdge->wdfp * rDx) * dMpDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1jP1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPjP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1jP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } /* Add mobility derivatives due to Bottom Edge */ /* First compute derivatives of cont. eqn's */ dFpxDMup = coeffHx * (pBEdge->wdfp * rDx); dFpyDMup = coeffHy * (pBEdge->wdfp * rDx); /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsijM1) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jM1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPjM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1jM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPP) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if (channel ) { dFpDEs = coeffHs * (pBEdge->wdfp * rDx) * dMpDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1jM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsijM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } /* Add mobility derivatives due to Left Edge */ /* First compute derivatives of cont. eqn's */ dFpxDMup = coeffVx * (pLEdge->wdfp * rDy); dFpyDMup = coeffVy * (pLEdge->wdfp * rDy); /* Do Top-Left (TL) Node of Element */ pNode = pElem->pTLNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsi) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFpDEs = coeffVs * (pLEdge->wdfp * rDy) * dMpDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiInP1) -= dFpDEs; *(pNode->fPPsiOx) += dFpDEs; *(pNode->fPPsiOxP1) += dFpDEs; } /* Do Bottom-Left (BL) Node of Element */ pNode = pElem->pBLNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsijM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsiiP1jM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiP1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPiP1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPiP1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiInP1) += dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; *(pNode->fPPsiOxP1) -= dFpDEs; } /* Add mobility derivatives due to Right Edge */ /* First compute derivatives of cont. eqn's */ dFpxDMup = coeffVx * (pREdge->wdfp * rDy); dFpyDMup = coeffVy * (pREdge->wdfp * rDy); /* Do Top-Right (TR) Node of Element */ pNode = pElem->pTRNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1) += dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsi) += - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsijP1) += - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1jP1) += dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1) += dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPP) += dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPPjP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1jP1) += dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { dFpDEs = coeffVs * (pREdge->wdfp * rDy) * dMpDEs; *(pNode->fPPsiInM1) -= dFpDEs; *(pNode->fPPsiIn) -= dFpDEs; *(pNode->fPPsiOxM1) += dFpDEs; *(pNode->fPPsiOx) += dFpDEs; } /* Do Bottom-Right (BR) Node of Element */ pNode = pElem->pBRNode; /* p continuity wrto potential derivatives */ *(pNode->fPPsiiM1jM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); *(pNode->fPPsijM1) -= - dFpxDMup * ( dMpDEx - dMpDWx * pTEdge->dWpDpsiP1 ) + dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsi) -= - dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pREdge->dWpDpsiP1 ); *(pNode->fPPsiiM1) -= dFpxDMup * ( dMpDEx - dMpDWx * pBEdge->dWpDpsiP1 ) - dFpyDMup * ( dMpDEy - dMpDWy * pLEdge->dWpDpsiP1 ); /* p continuity wrto p derivatives */ *(pNode->fPPiM1jM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDp ); *(pNode->fPPjM1) -= dFpxDMup * ( dMpDWx * pTEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDp ); *(pNode->fPP) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDpP1 ) + dFpyDMup * ( dMpDWy * pREdge->dWpDpP1 ); *(pNode->fPPiM1) -= dFpxDMup * ( dMpDWx * pBEdge->dWpDp ) + dFpyDMup * ( dMpDWy * pLEdge->dWpDpP1 ); /* both continuity wrto surface potential derivatives */ if ( channel ) { *(pNode->fPPsiInM1) += dFpDEs; *(pNode->fPPsiIn) += dFpDEs; *(pNode->fPPsiOxM1) -= dFpDEs; *(pNode->fPPsiOx) -= dFpDEs; } return; } ngspice-26/src/ciderlib/twod/twopoiss.c0000644000265600020320000002111412264261473017604 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" /* functions to setup and solve the 2D poisson equation */ void TWOQjacBuild(TWOdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; TWOelem *pElem; TWOnode *pNode, *pNode1; int eIndex, nIndex; /* set up matrix pointers */ /* establish main diagonal first */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( nIndex = 0; nIndex <= 3; nIndex++ ) { if ( pElem->evalNodes[ nIndex ] ) { pNode = pElem->pNodes[ nIndex ]; pNode->fPsiPsi = spGetElement( matrix, pNode->poiEqn, pNode->poiEqn ); } } } for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; pNode = pElem->pTLNode; pNode1 = pElem->pTRNode; pNode->fPsiPsiiP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pBLNode; pNode->fPsiPsijP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pTRNode; pNode1 = pElem->pTLNode; pNode->fPsiPsiiM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pBRNode; pNode->fPsiPsijP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pBRNode; pNode1 = pElem->pBLNode; pNode->fPsiPsiiM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pTRNode; pNode->fPsiPsijM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pBLNode; pNode1 = pElem->pBRNode; pNode->fPsiPsiiP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pTLNode; pNode->fPsiPsijM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); } /* for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; pNode = pElem->pTLNode; pNode->fPsiPsi = spGetElement( matrix, pNode->poiEqn, pNode->poiEqn ); pNode1 = pElem->pTRNode; pNode->fPsiPsiiP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pBLNode; pNode->fPsiPsijP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pTRNode; pNode->fPsiPsi = spGetElement( matrix, pNode->poiEqn, pNode->poiEqn ); pNode1 = pElem->pTLNode; pNode->fPsiPsiiM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pBRNode; pNode->fPsiPsijP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pBRNode; pNode->fPsiPsi = spGetElement( matrix, pNode->poiEqn, pNode->poiEqn ); pNode1 = pElem->pBLNode; pNode->fPsiPsiiM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pTRNode; pNode->fPsiPsijM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode = pElem->pBLNode; pNode->fPsiPsi = spGetElement( matrix, pNode->poiEqn, pNode->poiEqn ); pNode1 = pElem->pBRNode; pNode->fPsiPsiiP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); pNode1 = pElem->pTLNode; pNode->fPsiPsijM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn ); } */ } void TWOQsysLoad(TWOdevice *pDevice) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dyOverDx, dxOverDy, dPsiT, dPsiB, dPsiL, dPsiR; TWOQcommonTerms( pDevice ); /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; dPsiT = pElem->pTopEdge->dPsi; dPsiB = pElem->pBotEdge->dPsi; dPsiL = pElem->pLeftEdge->dPsi; dPsiR = pElem->pRightEdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( index <= 1 ) { pHEdge = pElem->pTopEdge; } else { pHEdge = pElem->pBotEdge; } if ( index == 0 || index == 3 ) { pVEdge = pElem->pLeftEdge; } else { pVEdge = pElem->pRightEdge; } /* add surface state charges */ pRhs[ pNode->poiEqn ] += 0.5 * pElem->dx * pHEdge->qf; pRhs[ pNode->poiEqn ] += 0.5 * pElem->dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { *(pNode->fPsiPsi) += 0.25 * pElem->dx * pElem->dy * (pNode->nConc + pNode->pConc); pRhs[ pNode->poiEqn ] += 0.25 * pElem->dx * pElem->dy * (pNode->netConc + pNode->pConc - pNode->nConc); } } } pNode = pElem->pTLNode; pRhs[ pNode->poiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; pNode = pElem->pTRNode; pRhs[ pNode->poiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; pNode = pElem->pBRNode; pRhs[ pNode->poiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; pNode = pElem->pBLNode; pRhs[ pNode->poiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; } } void TWOQrhsLoad(TWOdevice *pDevice) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dyOverDx, dxOverDy, dPsiT, dPsiB, dPsiL, dPsiR; TWOQcommonTerms( pDevice ); /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; dPsiT = pElem->pTopEdge->dPsi; dPsiB = pElem->pBotEdge->dPsi; dPsiL = pElem->pLeftEdge->dPsi; dPsiR = pElem->pRightEdge->dPsi; /* load nodal terms */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( (pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON) ) { pRhs[ pNode->poiEqn ] += 0.25 * pElem->dx * pElem->dy * (pNode->netConc + pNode->pConc - pNode->nConc); } if ( index <= 1 ) { pHEdge = pElem->pTopEdge; } else { pHEdge = pElem->pBotEdge; } if ( index == 0 || index == 3 ) { pVEdge = pElem->pLeftEdge; } else { pVEdge = pElem->pRightEdge; } /* add surface state charges */ pRhs[ pNode->poiEqn ] += 0.5 * pElem->dx * pHEdge->qf; pRhs[ pNode->poiEqn ] += 0.5 * pElem->dy * pVEdge->qf; } /* load edge terms */ pNode = pElem->pTLNode; pRhs[ pNode->poiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; pNode = pElem->pTRNode; pRhs[ pNode->poiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; pNode = pElem->pBRNode; pRhs[ pNode->poiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; pNode = pElem->pBLNode; pRhs[ pNode->poiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; } } void TWOQcommonTerms(TWOdevice *pDevice) { TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; double psi1, psi2, refPsi; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; refPsi = pElem->matlInfo->refPsi; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { pNode->psi = pDevice->dcSolution[ pNode->poiEqn ]; if ( pElem->elemType == SEMICON ) { pNode->nConc = pNode->nie * exp( pNode->psi - refPsi ); pNode->pConc = pNode->nie * exp( - pNode->psi + refPsi ); } } } if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi1 = pDevice->dcSolution[pNode->poiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pNodes[ (index + 1) % 4 ]; if ( pNode->nodeType != CONTACT ) { psi2 = pDevice->dcSolution[pNode->poiEqn]; } else { psi2 = pNode->psi; } if ( index <= 1 ) { pEdge->dPsi = psi2 - psi1; } else { pEdge->dPsi = psi1 - psi2; } } } } } ngspice-26/src/ciderlib/twod/tworead.c0000644000265600020320000000616012264261473017366 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Functions needed to read solutions for 2D devices. */ #include "ngspice/ngspice.h" #include "ngspice/plot.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twodev.h" #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" int TWOreadState(TWOdevice *pDevice, char *fileName, int numVolts, double *pV1, double *pV2, double *pV3) /* char *fileName: File containing raw data */ /* int numVolts: Number of voltage differences */ /* double *pV1, *pV2, *pV3: Pointer to return them in */ { int dataLength; int i, index, xIndex, yIndex; TWOnode ***nodeArray = NULL; TWOnode *pNode; TWOelem *pElem; double refPsi = 0.0; double *psiData, *nData, *pData; double *vData[3]; struct plot *stateDB; struct plot *voltsDB; char voltName[80]; stateDB = DBread( fileName ); if (stateDB == NULL) return (-1); voltsDB = stateDB->pl_next; if (voltsDB == NULL) return (-1); for (i=0; i < numVolts; i++ ) { sprintf( voltName, "v%d%d", i+1, numVolts+1 ); vData[i] = DBgetData( voltsDB, voltName, 1 ); if (vData[i] == NULL) return (-1); } dataLength = pDevice->numXNodes * pDevice->numYNodes; psiData = DBgetData( stateDB, "psi", dataLength ); nData = DBgetData( stateDB, "n", dataLength ); pData = DBgetData( stateDB, "p", dataLength ); if (psiData == NULL || nData == NULL || pData == NULL) return (-1); if (pV1 != NULL) { *pV1 = vData[0][0]; FREE( vData[0] ); } if (pV2 != NULL) { *pV2 = vData[1][0]; FREE( vData[1] ); } if (pV3 != NULL) { *pV3 = vData[2][0]; FREE( vData[2] ); } /* generate the work array for copying node info */ XCALLOC(nodeArray, TWOnode **, 1 + pDevice->numXNodes); for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { XCALLOC(nodeArray[xIndex], TWOnode *, 1 + pDevice->numYNodes); } /* store the nodes in this work array and use later */ for (xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) { for (yIndex = 1; yIndex < pDevice->numYNodes; yIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { if (refPsi == 0.0 && pElem->matlInfo->type == SEMICON) { refPsi = pElem->matlInfo->refPsi; } for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; nodeArray[pNode->nodeI][pNode->nodeJ] = pNode; } } } } } index = 0; for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { for (yIndex = 1; yIndex <= pDevice->numYNodes; yIndex++) { pNode = nodeArray[xIndex][yIndex]; index++; if (pNode != NULL) { pNode->psi = psiData[index-1]/VNorm + refPsi; pNode->nConc = nData[index-1]/NNorm; pNode->pConc = pData[index-1]/NNorm; } } } /* Delete work array. */ for (xIndex = 1; xIndex <= pDevice->numXNodes; xIndex++) { FREE(nodeArray[xIndex]); } FREE(nodeArray); FREE(psiData); FREE(nData); FREE(pData); return (0); } ngspice-26/src/ciderlib/twod/twosolve.c0000644000265600020320000010705412264261473017607 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twodev.h" #include "ngspice/twomesh.h" #include "ngspice/spmatrix.h" #include "ngspice/bool.h" #include "ngspice/macros.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/norm.h" #include "ngspice/ifsim.h" extern IFfrontEnd *SPfrontEnd; /* functions to calculate the 2D solutions */ /* the iteration driving loop and convergence check */ void TWOdcSolve(TWOdevice *pDevice, int iterationLimit, BOOLEAN newSolver, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOnode *pNode; TWOelem *pElem; int size = pDevice->numEqns; int index, eIndex, error; int timesConverged = 0; BOOLEAN quitLoop; BOOLEAN debug; BOOLEAN negConc = FALSE; double *rhs = pDevice->rhs; double *solution = pDevice->dcSolution; double *delta = pDevice->dcDeltaSolution; double poissNorm, contNorm; double startTime, totalStartTime; double totalTime, loadTime, factorTime, solveTime, updateTime, checkTime; double orderTime = 0.0; totalTime = loadTime = factorTime = solveTime = updateTime = checkTime = 0.0; totalStartTime = SPfrontEnd->IFseconds(); quitLoop = FALSE; debug = (!tranAnalysis && TWOdcDebug) || (tranAnalysis && TWOtranDebug); pDevice->iterationNumber = 0; pDevice->converged = FALSE; if (debug) { if (pDevice->poissonOnly) { fprintf(stdout, "Equilibrium Solution:\n"); } else { fprintf(stdout, "Bias Solution:\n"); } fprintf(stdout, "Iteration RHS Norm\n"); } while (!(pDevice->converged || (pDevice->iterationNumber > iterationLimit) || quitLoop)) { pDevice->iterationNumber++; if ((!pDevice->poissonOnly) && (iterationLimit > 0) &&(!tranAnalysis)) { TWOjacCheck(pDevice, tranAnalysis, info); } /* LOAD */ startTime = SPfrontEnd->IFseconds(); if (pDevice->poissonOnly) { TWOQsysLoad(pDevice); } else if (!OneCarrier) { TWO_sysLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONsysLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPsysLoad(pDevice, tranAnalysis, info); } pDevice->rhsNorm = maxNorm(rhs, size); loadTime += SPfrontEnd->IFseconds() - startTime; if (debug) { fprintf(stdout, "%7d %11.4e%s\n", pDevice->iterationNumber - 1, pDevice->rhsNorm, negConc ? " negative conc encountered" : ""); negConc = FALSE; } /* FACTOR */ startTime = SPfrontEnd->IFseconds(); error = spFactor(pDevice->matrix); factorTime += SPfrontEnd->IFseconds() - startTime; if (newSolver) { if (pDevice->iterationNumber == 1) { orderTime = factorTime; } else if (pDevice->iterationNumber == 2) { orderTime -= factorTime - orderTime; factorTime -= orderTime; if (pDevice->poissonOnly) { pDevice->pStats->orderTime[STAT_SETUP] += orderTime; } else { pDevice->pStats->orderTime[STAT_DC] += orderTime; } newSolver = FALSE; } } if (foundError(error)) { if (error == spSINGULAR) { int badRow, badCol; spWhereSingular(pDevice->matrix, &badRow, &badCol); printf("***** singular at (%d,%d)\n", badRow, badCol); } pDevice->converged = FALSE; quitLoop = TRUE; continue; } /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhs, delta, NULL, NULL); solveTime += SPfrontEnd->IFseconds() - startTime; /* UPDATE */ startTime = SPfrontEnd->IFseconds(); /* Use norm reducing Newton method for DC bias solutions only. */ if ((!pDevice->poissonOnly) && (iterationLimit > 0) && (!tranAnalysis) && (pDevice->rhsNorm > 1e-1)) { error = TWOnewDelta(pDevice, tranAnalysis, info); if (error) { pDevice->converged = FALSE; quitLoop = TRUE; updateTime += SPfrontEnd->IFseconds() - startTime; continue; } } for (index = 1; index <= size; index++) { solution[index] += delta[index]; } updateTime += SPfrontEnd->IFseconds() - startTime; /* CHECK CONVERGENCE */ startTime = SPfrontEnd->IFseconds(); /* Check if updates have gotten sufficiently small. */ if (pDevice->iterationNumber != 1) { pDevice->converged = TWOdeltaConverged(pDevice); } /* Check if the residual is smaller than abstol. */ if (pDevice->converged && (!pDevice->poissonOnly) && (!tranAnalysis)) { if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } pDevice->rhsNorm = maxNorm(rhs, size); if (pDevice->rhsNorm > pDevice->abstol) { pDevice->converged = FALSE; } if ((++timesConverged >= 2) && (pDevice->rhsNorm < 1e3 * pDevice->abstol)) { pDevice->converged = TRUE; } else if (timesConverged >= 5) { pDevice->converged = FALSE; quitLoop = TRUE; continue; } } else if (pDevice->converged && pDevice->poissonOnly) { TWOQrhsLoad(pDevice); pDevice->rhsNorm = maxNorm(rhs, size); if (pDevice->rhsNorm > pDevice->abstol) { pDevice->converged = FALSE; } if (++timesConverged >= 5) { pDevice->converged = TRUE; } } /* Check if the carrier concentrations are negative. */ if (pDevice->converged && (!pDevice->poissonOnly)) { /* Clear garbage entry since carrier-free elements reference it. */ solution[0] = 0.0; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (solution[pNode->nEqn] < 0.0) { pDevice->converged = FALSE; negConc = TRUE; if (tranAnalysis) { quitLoop = TRUE; } else { solution[pNode->nEqn] = 0.0; } } if (solution[pNode->pEqn] < 0.0) { pDevice->converged = FALSE; negConc = TRUE; if (tranAnalysis) { quitLoop = TRUE; } else { solution[pNode->pEqn] = 0.0; } } } } } if (!pDevice->converged) { if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } pDevice->rhsNorm = maxNorm(rhs, size); } } checkTime += SPfrontEnd->IFseconds() - startTime; } totalTime += SPfrontEnd->IFseconds() - totalStartTime; if (tranAnalysis) { pDevice->pStats->loadTime[STAT_TRAN] += loadTime; pDevice->pStats->factorTime[STAT_TRAN] += factorTime; pDevice->pStats->solveTime[STAT_TRAN] += solveTime; pDevice->pStats->updateTime[STAT_TRAN] += updateTime; pDevice->pStats->checkTime[STAT_TRAN] += checkTime; pDevice->pStats->numIters[STAT_TRAN] += pDevice->iterationNumber; } else if (pDevice->poissonOnly) { pDevice->pStats->loadTime[STAT_SETUP] += loadTime; pDevice->pStats->factorTime[STAT_SETUP] += factorTime; pDevice->pStats->solveTime[STAT_SETUP] += solveTime; pDevice->pStats->updateTime[STAT_SETUP] += updateTime; pDevice->pStats->checkTime[STAT_SETUP] += checkTime; pDevice->pStats->numIters[STAT_SETUP] += pDevice->iterationNumber; } else { pDevice->pStats->loadTime[STAT_DC] += loadTime; pDevice->pStats->factorTime[STAT_DC] += factorTime; pDevice->pStats->solveTime[STAT_DC] += solveTime; pDevice->pStats->updateTime[STAT_DC] += updateTime; pDevice->pStats->checkTime[STAT_DC] += checkTime; pDevice->pStats->numIters[STAT_DC] += pDevice->iterationNumber; } if (debug) { if (!tranAnalysis) { pDevice->rhsNorm = maxNorm(rhs, size); fprintf(stdout, "%7d %11.4e%s\n", pDevice->iterationNumber, pDevice->rhsNorm, negConc ? " negative conc in solution" : ""); } if (pDevice->converged) { if (!pDevice->poissonOnly) { poissNorm = contNorm = 0.0; rhs[0] = 0.0; /* Make sure garbage entry is clear. */ for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; poissNorm = MAX(poissNorm,ABS(rhs[pNode->psiEqn])); contNorm = MAX(contNorm,ABS(rhs[pNode->nEqn])); contNorm = MAX(contNorm,ABS(rhs[pNode->pEqn])); } } } fprintf(stdout, "Residual: %11.4e C/um poisson, %11.4e A/um continuity\n", poissNorm * EpsNorm * VNorm * 1e-4, contNorm * JNorm * LNorm * 1e-4); } else { fprintf(stdout, "Residual: %11.4e C/um poisson\n", pDevice->rhsNorm * EpsNorm * VNorm * 1e-4); } } } } BOOLEAN TWOdeltaConverged(TWOdevice *pDevice) { /* This function returns a TRUE if converged else a FALSE. */ int index; BOOLEAN converged = TRUE; double xOld, xNew, tol; for (index = 1; index <= pDevice->numEqns; index++) { xOld = pDevice->dcSolution[index]; xNew = xOld + pDevice->dcDeltaSolution[index]; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xOld - xNew) > tol) { converged = FALSE; break; } } return (converged); } BOOLEAN TWOdeviceConverged(TWOdevice *pDevice) { int index, eIndex; BOOLEAN converged = TRUE; double *solution = pDevice->dcSolution; TWOnode *pNode; TWOelem *pElem; double startTime; /* If the update is sufficiently small, and the carrier concentrations * are all positive, then return TRUE, else return FALSE. */ /* CHECK CONVERGENCE */ startTime = SPfrontEnd->IFseconds(); if ((converged = TWOdeltaConverged(pDevice)) == TRUE) { for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nEqn != 0 && solution[pNode->nEqn] < 0.0) { converged = FALSE; solution[pNode->nEqn] = pNode->nConc = 0.0; } if (pNode->pEqn != 0 && solution[pNode->pEqn] < 0.0) { converged = FALSE; solution[pNode->pEqn] = pNode->pConc = 0.0; } } } } } pDevice->pStats->checkTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; return (converged); } void TWOresetJacobian(TWOdevice *pDevice) { int error; if (!OneCarrier) { TWO_jacLoad(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacLoad(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacLoad(pDevice); } else { printf("TWOresetJacobian: unknown carrier type\n"); exit(-1); } error = spFactor(pDevice->matrix); if (foundError(error)) { exit(-1); } } /* * Compute the device state assuming charge neutrality exists everywhere in * the device. In insulators, where there is no charge, assign the potential * at half the insulator band gap (refPsi). */ void TWOstoreNeutralGuess(TWOdevice *pDevice) { int nIndex, eIndex; TWOelem *pElem; TWOnode *pNode; double nie, conc, absConc, refPsi, psi, ni, pi, sign; /* assign the initial guess for Poisson's equation */ for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; refPsi = pElem->matlInfo->refPsi; if (pElem->elemType == INSULATOR) { for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType == CONTACT) { /* * a metal contact to insulator domain so use work function * difference as the value of psi */ pNode->psi = RefPsi - pNode->eaff; } else { pNode->psi = refPsi; } } } } if (pElem->elemType == SEMICON) { for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; /* silicon nodes */ nie = pNode->nie; conc = pNode->netConc / pNode->nie; psi = 0.0; ni = nie; pi = nie; sign = SGN(conc); absConc = ABS(conc); if (conc != 0.0) { psi = sign * log(0.5 * absConc + sqrt(1.0 + 0.25 * absConc * absConc)); ni = nie * exp(psi); pi = nie * exp(-psi); } pNode->psi = refPsi + psi; pNode->nConc = ni; pNode->pConc = pi; /* store the initial guess in the dc solution vector */ if (pNode->nodeType != CONTACT) { pDevice->dcSolution[pNode->poiEqn] = pNode->psi; } } } } } } /* computing the equilibrium solution; solution of Poisson's eqn */ /* the solution is used as an initial starting point for bias conditions */ void TWOequilSolve(TWOdevice *pDevice) { BOOLEAN newSolver = FALSE; int error; int nIndex, eIndex; TWOelem *pElem; TWOnode *pNode; double startTime, setupTime, miscTime; setupTime = miscTime = 0.0; /* SETUP */ startTime = SPfrontEnd->IFseconds(); switch (pDevice->solverType) { case SLV_SMSIG: case SLV_BIAS: /* free up memory allocated for the bias solution */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); FREE(pDevice->rhsImag); spDestroy(pDevice->matrix); case SLV_NONE: pDevice->poissonOnly = TRUE; pDevice->numEqns = pDevice->dimEquil - 1; XCALLOC(pDevice->dcSolution, double, pDevice->dimEquil); XCALLOC(pDevice->dcDeltaSolution, double, pDevice->dimEquil); XCALLOC(pDevice->copiedSolution, double, pDevice->dimEquil); XCALLOC(pDevice->rhs, double, pDevice->dimEquil); pDevice->matrix = spCreate(pDevice->numEqns, 0, &error); if (error == spNO_MEMORY) { printf("TWOequilSolve: Out of Memory\n"); exit(-1); } newSolver = TRUE; spSetReal(pDevice->matrix); TWOQjacBuild(pDevice); pDevice->numOrigEquil = spElementCount(pDevice->matrix); pDevice->numFillEquil = 0; case SLV_EQUIL: pDevice->solverType = SLV_EQUIL; break; default: fprintf(stderr, "Panic: Unknown solver type in equil solution.\n"); exit(-1); break; } TWOstoreNeutralGuess(pDevice); setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ TWOdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); if (newSolver) { pDevice->numFillEquil = spFillinCount(pDevice->matrix); } if (pDevice->converged) { TWOQcommonTerms(pDevice); /* save equilibrium potential */ for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi0 = pNode->psi; } } } } else { printf("TWOequilSolve: No Convergence\n"); } miscTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->setupTime[STAT_SETUP] += setupTime; pDevice->pStats->miscTime[STAT_SETUP] += miscTime; } /* compute the solution under an applied bias */ /* the equilibrium solution is taken as an initial guess */ void TWObiasSolve(TWOdevice *pDevice, int iterationLimit, BOOLEAN tranAnalysis, TWOtranInfo *info) { BOOLEAN newSolver = FALSE; int error; int index, eIndex; TWOelem *pElem; TWOnode *pNode; double refPsi; double startTime, setupTime, miscTime; setupTime = miscTime = 0.0; /* SETUP */ startTime = SPfrontEnd->IFseconds(); switch (pDevice->solverType) { case SLV_EQUIL: /* free up the vectors allocated in the equilibrium solution */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); spDestroy(pDevice->matrix); case SLV_NONE: pDevice->poissonOnly = FALSE; pDevice->numEqns = pDevice->dimBias - 1; XCALLOC(pDevice->dcSolution, double, pDevice->dimBias); XCALLOC(pDevice->dcDeltaSolution, double, pDevice->dimBias); XCALLOC(pDevice->copiedSolution, double, pDevice->dimBias); XCALLOC(pDevice->rhs, double, pDevice->dimBias); XCALLOC(pDevice->rhsImag, double, pDevice->dimBias); pDevice->matrix = spCreate(pDevice->numEqns, 1, &error); if (error == spNO_MEMORY) { printf("TWObiasSolve: Out of Memory\n"); exit(-1); } newSolver = TRUE; if (!OneCarrier) { TWO_jacBuild(pDevice); } else if (OneCarrier == N_TYPE) { TWONjacBuild(pDevice); } else if (OneCarrier == P_TYPE) { TWOPjacBuild(pDevice); } pDevice->numOrigBias = spElementCount(pDevice->matrix); pDevice->numFillBias = 0; TWOstoreInitialGuess(pDevice); case SLV_SMSIG: spSetReal(pDevice->matrix); case SLV_BIAS: pDevice->solverType = SLV_BIAS; break; default: fprintf(stderr, "Panic: Unknown solver type in bias solution.\n"); exit(-1); break; } setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ TWOdcSolve(pDevice, iterationLimit, newSolver, tranAnalysis, info); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); if (newSolver) { pDevice->numFillBias = spFillinCount(pDevice->matrix); } if ((!pDevice->converged) && iterationLimit > 1) { printf("TWObiasSolve: No Convergence\n"); } else if (pDevice->converged) { /* update the nodal quantities */ for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; refPsi = pElem->matlInfo->refPsi; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { pNode->psi = pDevice->dcSolution[pNode->psiEqn]; if (pElem->elemType == SEMICON) { if (!OneCarrier) { pNode->nConc = pDevice->dcSolution[pNode->nEqn]; pNode->pConc = pDevice->dcSolution[pNode->pEqn]; } else if (OneCarrier == N_TYPE) { pNode->nConc = pDevice->dcSolution[pNode->nEqn]; pNode->pConc = pNode->nie * exp(-pNode->psi + refPsi); } else if (OneCarrier == P_TYPE) { pNode->pConc = pDevice->dcSolution[pNode->pEqn]; pNode->nConc = pNode->nie * exp(pNode->psi - refPsi); } } } } } } /* update the current terms */ if (!OneCarrier) { TWO_commonTerms(pDevice, FALSE, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONcommonTerms(pDevice, FALSE, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPcommonTerms(pDevice, FALSE, tranAnalysis, info); } } else if (iterationLimit <= 1) { for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; refPsi = pElem->matlInfo->refPsi; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { pNode->psi = pDevice->dcSolution[pNode->psiEqn]; pDevice->devState0 [pNode->nodePsi] = pNode->psi; if (pElem->elemType == SEMICON) { if (!OneCarrier) { pNode->nConc = pDevice->dcSolution[pNode->nEqn]; pNode->pConc = pDevice->dcSolution[pNode->pEqn]; } else if (OneCarrier == N_TYPE) { pNode->nConc = pDevice->dcSolution[pNode->nEqn]; pNode->pConc = pNode->nie * exp(-pNode->psi + refPsi); } else if (OneCarrier == P_TYPE) { pNode->pConc = pDevice->dcSolution[pNode->pEqn]; pNode->nConc = pNode->nie * exp(pNode->psi - refPsi); } pDevice->devState0 [pNode->nodeN] = pNode->nConc; pDevice->devState0 [pNode->nodeP] = pNode->pConc; } } } } } } miscTime += SPfrontEnd->IFseconds() - startTime; if (tranAnalysis) { pDevice->pStats->setupTime[STAT_TRAN] += setupTime; pDevice->pStats->miscTime[STAT_TRAN] += miscTime; } else { pDevice->pStats->setupTime[STAT_DC] += setupTime; pDevice->pStats->miscTime[STAT_DC] += miscTime; } } /* Copy the device's equilibrium state into the solution vector. */ void TWOstoreEquilibGuess(TWOdevice *pDevice) { int nIndex, eIndex; double *solution = pDevice->dcSolution; double refPsi; TWOelem *pElem; TWOnode *pNode; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; refPsi = pElem->matlInfo->refPsi; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { pDevice->dcSolution[pNode->psiEqn] = pNode->psi0; if (pElem->elemType == SEMICON) { if (!OneCarrier) { solution[pNode->nEqn] = pNode->nie * exp(pNode->psi0 - refPsi); solution[pNode->pEqn] = pNode->nie * exp(-pNode->psi0 + refPsi); } else if (OneCarrier == N_TYPE) { solution[pNode->nEqn] = pNode->nie * exp(pNode->psi0 - refPsi); } else if (OneCarrier == P_TYPE) { solution[pNode->pEqn] = pNode->nie * exp(-pNode->psi0 + refPsi); } } } } } } } /* Copy the device's internal state into the solution vector. */ void TWOstoreInitialGuess(TWOdevice *pDevice) { int nIndex, eIndex; double *solution = pDevice->dcSolution; TWOelem *pElem; TWOnode *pNode; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { solution[pNode->psiEqn] = pNode->psi; if (pElem->elemType == SEMICON) { if (!OneCarrier) { solution[pNode->nEqn] = pNode->nConc; solution[pNode->pEqn] = pNode->pConc; } else if (OneCarrier == N_TYPE) { solution[pNode->nEqn] = pNode->nConc; } else if (OneCarrier == P_TYPE) { solution[pNode->pEqn] = pNode->pConc; } } } } } } } /* * function computeNewDelta computes an acceptable delta */ void oldTWOnewDelta(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { int index; double newNorm, fib, lambda, fibn, fibp; BOOLEAN acceptable = FALSE; lambda = 1.0; fibn = 1.0; fibp = 1.0; /* * copy the contents of dcSolution into copiedSolution and modify * dcSolution by adding the deltaSolution */ for (index = 1; index <= pDevice->numEqns; ++index) { pDevice->copiedSolution[index] = pDevice->dcSolution[index]; pDevice->dcSolution[index] += pDevice->dcDeltaSolution[index]; } /* compute L2 norm of the deltaX vector */ pDevice->rhsNorm = l2Norm(pDevice->dcDeltaSolution, pDevice->numEqns); if (pDevice->poissonOnly) { TWOQrhsLoad(pDevice); } else if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } newNorm = TWOnuNorm(pDevice); if (newNorm <= pDevice->rhsNorm) { acceptable = TRUE; } else { /* chop the step size so that deltax is acceptable */ for (; !acceptable;) { fib = fibp; fibp = fibn; fibn += fib; lambda *= (fibp / fibn); for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index] + lambda * pDevice->dcDeltaSolution[index]; } if (pDevice->poissonOnly) { TWOQrhsLoad(pDevice); } else if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } newNorm = TWOnuNorm(pDevice); if (newNorm <= pDevice->rhsNorm) { acceptable = TRUE; } } } /* restore the previous dcSolution and the new deltaSolution */ pDevice->rhsNorm = newNorm; for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index]; pDevice->dcDeltaSolution[index] *= lambda; } } int TWOnewDelta(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { int index, iterNum = 0; double newNorm; double fib, lambda, fibn, fibp; BOOLEAN acceptable = FALSE, error = FALSE; lambda = 1.0; fibn = 1.0; fibp = 1.0; /* * copy the contents of dcSolution into copiedSolution and modify * dcSolution by adding the deltaSolution */ for (index = 1; index <= pDevice->numEqns; ++index) { pDevice->copiedSolution[index] = pDevice->dcSolution[index]; pDevice->dcSolution[index] += pDevice->dcDeltaSolution[index]; } if (pDevice->poissonOnly) { TWOQrhsLoad(pDevice); } else if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } newNorm = maxNorm(pDevice->rhs, pDevice->numEqns); if (pDevice->rhsNorm <= pDevice->abstol) { lambda = 0.0; newNorm = pDevice->rhsNorm; } else if (newNorm < pDevice->rhsNorm) { acceptable = TRUE; } else { /* chop the step size so that deltax is acceptable */ if (TWOdcDebug) { fprintf(stdout, " %11.4e %11.4e\n", newNorm, lambda); } while (!acceptable) { iterNum++; if (iterNum > NORM_RED_MAXITERS) { error = TRUE; lambda = 0.0; /* Don't break out until after we've reset the device. */ } fib = fibp; fibp = fibn; fibn += fib; lambda *= (fibp / fibn); for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index] + lambda * pDevice->dcDeltaSolution[index]; } if (pDevice->poissonOnly) { TWOQrhsLoad(pDevice); } else if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } newNorm = maxNorm(pDevice->rhs, pDevice->numEqns); if (error) { break; } if (newNorm <= pDevice->rhsNorm) { acceptable = TRUE; } if (TWOdcDebug) { fprintf(stdout, " %11.4e %11.4e\n", newNorm, lambda); } } } /* restore the previous dcSolution and the new deltaSolution */ pDevice->rhsNorm = newNorm; for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index]; pDevice->dcDeltaSolution[index] *= lambda; } return (error); } /* Predict the values of the internal variables at the next timepoint. */ /* Needed for Predictor-Corrector LTE estimation */ void TWOpredict(TWOdevice *pDevice, TWOtranInfo *info) { int nIndex, eIndex; TWOnode *pNode; TWOelem *pElem; double startTime, miscTime = 0.0; /* TRANSIENT MISC */ startTime = SPfrontEnd->IFseconds(); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi = pDevice->devState1 [pNode->nodePsi]; if ((pElem->elemType == SEMICON) && (pNode->nodeType != CONTACT)) { if (!OneCarrier) { pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); } else if (OneCarrier == N_TYPE) { pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); pNode->pPred = pDevice->devState1 [pNode->nodeP]; } else if (OneCarrier == P_TYPE) { pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); pNode->nPred = pDevice->devState1 [pNode->nodeN]; } pNode->nConc = pNode->nPred; pNode->pConc = pNode->pPred; } } } } miscTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->miscTime[STAT_TRAN] += miscTime; } /* Estimate the device's overall truncation error. */ double TWOtrunc(TWOdevice *pDevice, TWOtranInfo *info, double delta) { int nIndex, eIndex; TWOelem *pElem; TWOnode *pNode; double tolN, tolP, lte, relError, temp; double lteCoeff = info->lteCoeff; double mult = 10.0; double reltol; double startTime, lteTime = 0.0; /* TRANSIENT LTE */ startTime = SPfrontEnd->IFseconds(); relError = 0.0; reltol = pDevice->reltol * mult; /* need to get the predictor for the current order */ /* the scheme currently used is very dumb. need to fix later */ computePredCoeff(info->method, info->order, info->predCoeff, info->delta); for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if ((pElem->elemType == SEMICON) && (pNode->nodeType != CONTACT)) { if (!OneCarrier) { tolN = pDevice->abstol + reltol * ABS(pNode->nConc); tolP = pDevice->abstol + reltol * ABS(pNode->pConc); pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); lte = lteCoeff * (pNode->nConc - pNode->nPred); temp = lte / tolN; relError += temp * temp; lte = lteCoeff * (pNode->pConc - pNode->pPred); temp = lte / tolP; relError += temp * temp; } else if (OneCarrier == N_TYPE) { tolN = pDevice->abstol + reltol * ABS(pNode->nConc); pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); lte = lteCoeff * (pNode->nConc - pNode->nPred); temp = lte / tolN; relError += temp * temp; } else if (OneCarrier == P_TYPE) { tolP = pDevice->abstol + reltol * ABS(pNode->pConc); pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); lte = lteCoeff * (pNode->pConc - pNode->pPred); temp = lte / tolP; relError += temp * temp; } } } } } relError = MAX(pDevice->abstol, relError); /* make sure it is non zero */ /* the total relative error has been calculated norm-2 squared */ relError = sqrt(relError / pDevice->numEqns); /* depending on the order of the integration method compute new delta */ temp = delta / pow(relError, 1.0 / (info->order + 1)); lteTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->lteTime += lteTime; /* return the new delta (stored as temp) */ return (temp); } /* Save info from state table into the internal state. */ void TWOsaveState(TWOdevice *pDevice) { int nIndex, eIndex; TWOnode *pNode; TWOelem *pElem; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi = pDevice->devState1 [pNode->nodePsi]; if ((pElem->elemType == SEMICON) && (pNode->nodeType != CONTACT)) { pNode->nConc = pDevice->devState1 [pNode->nodeN]; pNode->pConc = pDevice->devState1 [pNode->nodeP]; } } } } } /* * A function that checks convergence based on the convergence of the quasi * Fermi levels. This should be better since we are looking at potentials in * all (psi, phin, phip) */ BOOLEAN TWOpsiDeltaConverged(TWOdevice *pDevice) { int index, nIndex, eIndex; TWOnode *pNode; TWOelem *pElem; double xOld, xNew, xDelta, tol; double psi, newPsi, nConc, pConc, newN, newP; double phiN, phiP, newPhiN, newPhiP; BOOLEAN converged = TRUE; /* equilibrium solution */ if (pDevice->poissonOnly) { for (index = 1; index <= pDevice->numEqns; index++) { xOld = pDevice->dcSolution[index]; xDelta = pDevice->dcDeltaSolution[index]; xNew = xOld + xDelta; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xDelta) > tol) { converged = FALSE; goto done; } } return (converged); } /* bias solution. check convergence on psi, phin, phip */ for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (nIndex = 0; nIndex <= 3; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { /* check convergence on psi */ xOld = pDevice->dcSolution[pNode->psiEqn]; xDelta = pDevice->dcDeltaSolution[pNode->psiEqn]; xNew = xOld + xDelta; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xDelta) > tol) { converged = FALSE; goto done; } } /* check convergence on phin and phip */ if ((pElem->elemType == SEMICON) && (pNode->nodeType != CONTACT)) { psi = pDevice->dcSolution[pNode->psiEqn]; nConc = pDevice->dcSolution[pNode->nEqn]; pConc = pDevice->dcSolution[pNode->pEqn]; newPsi = psi + pDevice->dcDeltaSolution[pNode->psiEqn]; newN = nConc + pDevice->dcDeltaSolution[pNode->nEqn]; newP = pConc + pDevice->dcDeltaSolution[pNode->pEqn]; phiN = psi - log(nConc / pNode->nie); phiP = psi + log(pConc / pNode->nie); newPhiN = newPsi - log(newN / pNode->nie); newPhiP = newPsi + log(newP / pNode->nie); tol = pDevice->abstol + pDevice->reltol * MAX(ABS(phiN), ABS(newPhiN)); if (ABS(newPhiN - phiN) > tol) { converged = FALSE; goto done; } tol = pDevice->abstol + pDevice->reltol * MAX(ABS(phiP), ABS(newPhiP)); if (ABS(newPhiP - phiP) > tol) { converged = FALSE; goto done; } } } } } done: return (converged); } /* Function to compute Nu norm of the rhs vector. */ /* nu-Norm calculation based upon work done at Stanford. */ double TWOnuNorm(TWOdevice *pDevice) { double norm = 0.0; double temp; int index; /* the LU Decomposed matrix is available. use it to calculate x */ spSolve(pDevice->matrix, pDevice->rhs, pDevice->rhsImag, NULL, NULL); /* the solution is in the rhsImag vector */ /* compute L2-norm of the rhsImag vector */ for (index = 1; index <= pDevice->numEqns; index++) { temp = pDevice->rhsImag[index]; norm += temp * temp; } norm = sqrt(norm); return (norm); } /* * Check for numerical errors in the Jacobian. Useful debugging aid when new * models are being incorporated. */ void TWOjacCheck(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { int index, rIndex; double del, diff, tol, *dptr; if (TWOjacDebug) { if (!OneCarrier) { TWO_sysLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONsysLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPsysLoad(pDevice, tranAnalysis, info); } /* * spPrint( pDevice->matrix, 0, 1, 1 ); */ pDevice->rhsNorm = maxNorm(pDevice->rhs, pDevice->numEqns); for (index = 1; index <= pDevice->numEqns; index++) { if (1e3 * ABS(pDevice->rhs[index]) > pDevice->rhsNorm) { fprintf(stderr, "eqn %d: res %11.4e, norm %11.4e\n", index, pDevice->rhs[index], pDevice->rhsNorm); } } for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhsImag[index] = pDevice->rhs[index]; } for (index = 1; index <= pDevice->numEqns; index++) { pDevice->copiedSolution[index] = pDevice->dcSolution[index]; del = 1e-4 * pDevice->abstol + 1e-6 * ABS(pDevice->dcSolution[index]); pDevice->dcSolution[index] += del; if (!OneCarrier) { TWO_rhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == N_TYPE) { TWONrhsLoad(pDevice, tranAnalysis, info); } else if (OneCarrier == P_TYPE) { TWOPrhsLoad(pDevice, tranAnalysis, info); } pDevice->dcSolution[index] = pDevice->copiedSolution[index]; for (rIndex = 1; rIndex <= pDevice->numEqns; rIndex++) { diff = (pDevice->rhsImag[rIndex] - pDevice->rhs[rIndex]) / del; dptr = spFindElement(pDevice->matrix, rIndex, index); if (dptr != NULL) { tol = (1e-4 * pDevice->abstol) + (1e-2 * MAX(ABS(diff), ABS(*dptr))); if ((diff != 0.0) && (ABS(diff - *dptr) > tol)) { fprintf(stderr, "Mismatch[%d][%d]: FD = %11.4e, AJ = %11.4e\n\t FD-AJ = %11.4e vs. %11.4e\n", rIndex, index, diff, *dptr, ABS(diff - *dptr), tol); } } else { if (diff != 0.0) { fprintf(stderr, "Missing [%d][%d]: FD = %11.4e, AJ = 0.0\n", rIndex, index, diff); } } } } } } ngspice-26/src/ciderlib/twod/Makefile.am0000644000265600020320000000114012264261473017602 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcidertwod.la libcidertwod_la_SOURCES = \ twoadmit.c \ twoaval.c \ twocond.c \ twocont.c \ twocurr.c \ twoddefs.h \ twodest.c \ twodext.h \ twodopng.c \ twoelect.c \ twofield.c \ twomesh.c \ twomobdv.c \ twomobfn.c \ twomobil.c \ twoncont.c \ twopcont.c \ twopoiss.c \ twoprint.c \ twoproj.c \ tworead.c \ twosetbc.c \ twosetup.c \ twosolve.c EXTRA_DIST = readme AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/ciderlib/twod/twodest.c0000644000265600020320000000346312264261473017415 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twodev.h" #include "ngspice/twomesh.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" void TWOdestroy(TWOdevice *pDevice) { int index, eIndex; TWOelem *pElem; TWOnode *pNode; TWOedge *pEdge; if ( !pDevice ) return; switch ( pDevice->solverType ) { case SLV_SMSIG: case SLV_BIAS: /* free up memory allocated for the bias solution */ FREE( pDevice->dcSolution ); FREE( pDevice->dcDeltaSolution ); FREE( pDevice->copiedSolution ); FREE( pDevice->rhs ); FREE( pDevice->rhsImag ); spDestroy( pDevice->matrix ); break; case SLV_EQUIL: /* free up the vectors allocated in the equilibrium solution */ FREE( pDevice->dcSolution ); FREE( pDevice->dcDeltaSolution ); FREE( pDevice->copiedSolution ); FREE( pDevice->rhs ); spDestroy( pDevice->matrix ); break; case SLV_NONE: break; default: fprintf( stderr, "Panic: Unknown solver type in TWOdestroy.\n" ); exit( -1 ); break; } /* destroy the mesh */ if ( pDevice->elements ) { for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; FREE( pNode ); } if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; FREE( pEdge ); } } FREE( pElem ); } FREE( pDevice->elements ); FREE( pDevice->elemArray ); } /* destroy the contacts & channels */ /* NOT IMPLEMENTED */ FREE( pDevice ); } ngspice-26/src/ciderlib/twod/Makefile.in0000644000265600020320000004400312264261534017616 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ciderlib/twod DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcidertwod_la_LIBADD = am_libcidertwod_la_OBJECTS = twoadmit.lo twoaval.lo twocond.lo \ twocont.lo twocurr.lo twodest.lo twodopng.lo twoelect.lo \ twofield.lo twomesh.lo twomobdv.lo twomobfn.lo twomobil.lo \ twoncont.lo twopcont.lo twopoiss.lo twoprint.lo twoproj.lo \ tworead.lo twosetbc.lo twosetup.lo twosolve.lo libcidertwod_la_OBJECTS = $(am_libcidertwod_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcidertwod_la_SOURCES) DIST_SOURCES = $(libcidertwod_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcidertwod.la libcidertwod_la_SOURCES = \ twoadmit.c \ twoaval.c \ twocond.c \ twocont.c \ twocurr.c \ twoddefs.h \ twodest.c \ twodext.h \ twodopng.c \ twoelect.c \ twofield.c \ twomesh.c \ twomobdv.c \ twomobfn.c \ twomobil.c \ twoncont.c \ twopcont.c \ twopoiss.c \ twoprint.c \ twoproj.c \ tworead.c \ twosetbc.c \ twosetup.c \ twosolve.c EXTRA_DIST = readme AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ciderlib/twod/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ciderlib/twod/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcidertwod.la: $(libcidertwod_la_OBJECTS) $(libcidertwod_la_DEPENDENCIES) $(EXTRA_libcidertwod_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcidertwod_la_OBJECTS) $(libcidertwod_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoadmit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoaval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twocond.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twocont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twocurr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twodest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twodopng.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoelect.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twofield.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twomesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twomobdv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twomobfn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twomobil.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoncont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twopcont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twopoiss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twoproj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tworead.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twosetbc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twosetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twosolve.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/ciderlib/twod/twoproj.c0000644000265600020320000004743412264261473017436 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Functions for projecting the next solution point for use with the modified * two-level Newton scheme */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" /* Forward Declarations */ void NUMD2project(TWOdevice *pDevice, double delV) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pContact = pDevice->pLastContact; double *incVpn, *solution = pDevice->dcSolution; double delPsi, delN, delP, newN, newP; delV = -delV / VNorm; /* update the boundary condition for the last contact */ numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; pNode->psi += delV; } /* * store the new rhs for computing the incremental quantities * with the second to last node. solve the system of equations */ if ( ABS(delV) < MIN_DELV ) { TWOstoreInitialGuess( pDevice ); return; } incVpn = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pContact ); spSolve( pDevice->matrix, pDevice->rhs, incVpn, NULL, NULL ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVpn[ pNode->psiEqn ] * delV; solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVpn[ pNode->nEqn ] * delV; newN = pNode->nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( pNode->nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVpn[ pNode->pEqn ] * delV; newP = pNode->pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pNode->pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } void NBJT2project(TWOdevice *pDevice, double delVce, double delVbe) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; double *incVce, *incVbe, *solution = pDevice->dcSolution; double delPsi, delN, delP, newN, newP; double nConc, pConc; /* Normalize the voltages for calculations. */ if ( delVce != 0.0 ) { delVce = delVce / VNorm; numContactNodes = pColContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pColContact->pNodes[ index ]; pNode->psi += delVce; } } if ( delVbe != 0.0 ) { delVbe = delVbe / VNorm; numContactNodes = pBaseContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pBaseContact->pNodes[ index ]; pNode->psi += delVbe; } } /* * store the new rhs for computing the incremental quantities * incVce (dcDeltaSolution) and incVbe (copiedSolution) are used to * store the incremental quantities associated with Vce and Vbe */ /* set incVce = dcDeltaSolution; incVbe = copiedSolution */ if ( ABS( delVce ) > MIN_DELV ) { incVce = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pColContact ); spSolve( pDevice->matrix, pDevice->rhs, incVce, NULL, NULL); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVce[ pNode->psiEqn ] * delVce; solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVce[ pNode->nEqn ] * delVce; newN = pNode->nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( pNode->nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier | (OneCarrier == P_TYPE)) ) { delP = incVce[ pNode->pEqn ] * delVce; newP = pNode->pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pNode->pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } else { TWOstoreInitialGuess( pDevice ); } if ( ABS( delVbe ) > MIN_DELV ) { incVbe = pDevice->copiedSolution; storeNewRhs( pDevice, pBaseContact ); spSolve( pDevice->matrix, pDevice->rhs, incVbe, NULL, NULL); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVbe[ pNode->psiEqn ] * delVbe; solution[ pNode->psiEqn ] += delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVbe[ pNode->nEqn ] * delVbe; nConc = solution[ pNode->nEqn ]; newN = nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVbe[ pNode->pEqn ] * delVbe; pConc = solution[ pNode->pEqn ]; newP = pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } } void NUMOSproject(TWOdevice *pDevice, double delVdb, double delVsb, double delVgb) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; double *incVdb, *incVsb, *incVgb, *solution = pDevice->dcSolution; double delPsi, delN, delP, newN, newP; double nConc, pConc; /* normalize the voltages for calculations */ if ( delVdb != 0.0 ) { delVdb = delVdb / VNorm; numContactNodes = pDContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pDContact->pNodes[ index ]; pNode->psi += delVdb; } } if ( delVsb != 0.0 ) { delVsb = delVsb / VNorm; numContactNodes = pSContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pSContact->pNodes[ index ]; pNode->psi += delVsb; } } if ( delVgb != 0.0 ) { delVgb = delVgb / VNorm; numContactNodes = pGContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pGContact->pNodes[ index ]; pNode->psi += delVgb; } } /* * store the new rhs for computing the incremental quantities * incVdb (dcDeltaSolution), incVsb, incVgb */ if ( ABS( delVdb ) > MIN_DELV ) { incVdb = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pDContact ); spSolve( pDevice->matrix, pDevice->rhs, incVdb, NULL, NULL); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVdb[ pNode->psiEqn ] * delVdb; solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVdb[ pNode->nEqn ] * delVdb; newN = pNode->nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( pNode->nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVdb[ pNode->pEqn ] * delVdb; newP = pNode->pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pNode->pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } else { TWOstoreInitialGuess( pDevice ); } if ( ABS( delVsb ) > MIN_DELV ) { incVsb = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pSContact ); spSolve( pDevice->matrix, pDevice->rhs, incVsb, NULL, NULL); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVsb[ pNode->psiEqn ] * delVsb; solution[ pNode->psiEqn ] += delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVsb[ pNode->nEqn ] * delVsb; nConc = solution[ pNode->nEqn ]; newN = nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVsb[ pNode->pEqn ] * delVsb; pConc = solution[ pNode->pEqn ]; newP = pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } if ( ABS( delVgb ) > MIN_DELV ) { incVgb = pDevice->dcDeltaSolution; storeNewRhs( pDevice, pGContact ); spSolve( pDevice->matrix, pDevice->rhs, incVgb, NULL, NULL); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVgb[ pNode->psiEqn ] * delVgb; solution[ pNode->psiEqn ] += delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVgb[ pNode->nEqn ] * delVgb; nConc = solution[ pNode->nEqn ]; newN = nConc + delN; if ( newN <= 0.0 ) { solution[ pNode->nEqn ] = guessNewConc( nConc, delN ); } else { solution[ pNode->nEqn ] = newN; } } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVgb[ pNode->pEqn ] * delVgb; pConc = solution[ pNode->pEqn ]; newP = pConc + delP; if ( newP <= 0.0 ) { solution[ pNode->pEqn ] = guessNewConc( pConc, delP ); } else { solution[ pNode->pEqn ] = newP; } } } } } } } } /* functions to update the solution for the full-LU and modified two-level Newton methods */ void NUMD2update(TWOdevice *pDevice, double delV, BOOLEAN updateBoundary) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pContact = pDevice->pLastContact; double delPsi, delN, delP, *incVpn, *solution = pDevice->dcSolution; delV = -delV / VNorm; if ( updateBoundary ) { /* update the boundary condition for the last contact */ numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; pNode->psi += delV; } } /* the equations have been solved while computing the conductances */ /* solution is in dcDeltaSolution, so use it */ incVpn = pDevice->dcDeltaSolution; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = incVpn[ pNode->psiEqn ] * delV; solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = incVpn[ pNode->nEqn ] * delV; solution[ pNode->nEqn ] = pNode->nConc + delN; } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = incVpn[ pNode->pEqn ] * delV; solution[ pNode->pEqn ] = pNode->pConc + delP; } } } } } } void NBJT2update(TWOdevice *pDevice, double delVce, double delVbe, BOOLEAN updateBoundary) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pColContact = pDevice->pFirstContact; TWOcontact *pBaseContact = pDevice->pFirstContact->next; double delPsi, delN, delP, *incVce, *incVbe, *solution = pDevice->dcSolution; /* normalize the voltages for calculations */ if ( delVce != 0.0 ) { delVce = delVce / VNorm; if ( updateBoundary ) { numContactNodes = pColContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pColContact->pNodes[ index ]; pNode->psi += delVce; } } } if ( delVbe != 0.0 ) { delVbe = delVbe / VNorm; if ( updateBoundary ) { numContactNodes = pBaseContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pBaseContact->pNodes[ index ]; pNode->psi += delVbe; } } } /* use solution from computeConductance to do update */ /* set incVce = dcDeltaSolution; incVbe = copiedSolution */ incVce = pDevice->dcDeltaSolution; incVbe = pDevice->copiedSolution; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = (incVce[ pNode->psiEqn ] * delVce + incVbe[ pNode->psiEqn ] * delVbe); solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = (incVce[ pNode->nEqn ] * delVce + incVbe[ pNode->nEqn ] * delVbe); solution[ pNode->nEqn ] = pNode->nConc + delN; } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = (incVce[ pNode->pEqn ] * delVce + incVbe[ pNode->pEqn ] * delVbe); solution[ pNode->pEqn ] = pNode->pConc + delP; } } } } } } void NUMOSupdate(TWOdevice *pDevice, double delVdb, double delVsb, double delVgb, BOOLEAN updateBoundary) { TWOnode *pNode; TWOelem *pElem; int index, eIndex, numContactNodes; TWOcontact *pDContact = pDevice->pFirstContact; TWOcontact *pGContact = pDevice->pFirstContact->next; TWOcontact *pSContact = pDevice->pFirstContact->next->next; double delPsi, delN, delP; double *incVdb, *incVsb, *incVgb, *solution = pDevice->dcSolution; /* normalize the voltages for calculations */ if ( delVdb != 0.0 ) { delVdb = delVdb / VNorm; if ( updateBoundary ) { numContactNodes = pDContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pDContact->pNodes[ index ]; pNode->psi += delVdb; } } } if ( delVsb != 0.0 ) { delVsb = delVsb / VNorm; if ( updateBoundary ) { numContactNodes = pSContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pSContact->pNodes[ index ]; pNode->psi += delVsb; } } } if ( delVgb != 0.0 ) { delVgb = delVgb / VNorm; if ( updateBoundary ) { numContactNodes = pGContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pGContact->pNodes[ index ]; pNode->psi += delVgb; } } } /* use solution from computeConductance to do update */ incVdb = pDevice->dcDeltaSolution; incVsb = pDevice->copiedSolution; incVgb = pDevice->rhsImag; for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { delPsi = (incVdb[ pNode->psiEqn ] * delVdb + incVsb[ pNode->psiEqn ] * delVsb + incVgb[ pNode->psiEqn ] * delVgb); solution[ pNode->psiEqn ] = pNode->psi + delPsi; if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == N_TYPE)) ) { delN = (incVdb[ pNode->nEqn ] * delVdb + incVsb[ pNode->nEqn ] * delVsb + incVgb[ pNode->nEqn ] * delVgb); solution[ pNode->nEqn ] = pNode->nConc + delN; } if ( pElem->elemType == SEMICON && (!OneCarrier || (OneCarrier == P_TYPE)) ) { delP = (incVdb[ pNode->pEqn ] * delVdb + incVsb[ pNode->pEqn ] * delVsb + incVgb[ pNode->pEqn ] * delVgb); solution[ pNode->pEqn ] = pNode->pConc + delP; } } } } } } void storeNewRhs(TWOdevice *pDevice, TWOcontact *pContact) { int index, i, numContactNodes; TWOelem *pElem; TWOnode *pNode, *pHNode = NULL, *pVNode = NULL; TWOedge *pHEdge = NULL, *pVEdge = NULL; double *rhs = pDevice->rhs; /* zero the rhs before loading in the new rhs */ for ( index = 1; index <= pDevice->numEqns ; index++ ) { rhs[ index ] = 0.0; } numContactNodes = pContact->numNodes; for ( index = 0; index < numContactNodes; index++ ) { pNode = pContact->pNodes[ index ]; for ( i = 0; i <= 3; i++ ) { pElem = pNode->pElems[ i ]; if ( pElem != NULL) { /* found an element to which this node belongs */ switch ( i ) { case 0: /* the TL element of this node */ pHNode = pElem->pBLNode; pVNode = pElem->pTRNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pRightEdge; break; case 1: /* the TR element */ pHNode = pElem->pBRNode; pVNode = pElem->pTLNode; pHEdge = pElem->pBotEdge; pVEdge = pElem->pLeftEdge; break; case 2: /* the BR element */ pHNode = pElem->pTRNode; pVNode = pElem->pBLNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pLeftEdge; break; case 3: /* the BL element */ pHNode = pElem->pTLNode; pVNode = pElem->pBRNode; pHEdge = pElem->pTopEdge; pVEdge = pElem->pRightEdge; break; default: printf( "storeNewRhs: shouldn't be here\n"); break; } if ( pHNode->nodeType != CONTACT ) { /* contribution to the x nodes */ rhs[ pHNode->psiEqn ] += pElem->epsRel * 0.5 * pElem->dyOverDx; if ( pElem->elemType == SEMICON ) { if ( !OneCarrier ) { rhs[ pHNode->nEqn ] -= 0.5 * pElem->dy * pHEdge->dJnDpsiP1; rhs[ pHNode->pEqn ] -= 0.5 * pElem->dy * pHEdge->dJpDpsiP1; } else if ( OneCarrier == N_TYPE ) { rhs[ pHNode->nEqn ] -= 0.5 * pElem->dy * pHEdge->dJnDpsiP1; } else if ( OneCarrier == P_TYPE ) { rhs[ pHNode->pEqn ] -= 0.5 * pElem->dy * pHEdge->dJpDpsiP1; } } } if ( pVNode->nodeType != CONTACT ) { /* contribution to the y nodes */ rhs[ pVNode->psiEqn ] += pElem->epsRel * 0.5 * pElem->dxOverDy; if ( pElem->elemType == SEMICON ) { if ( !OneCarrier ) { rhs[ pVNode->nEqn ] -= 0.5 * pElem->dx * pVEdge->dJnDpsiP1; rhs[ pVNode->pEqn ] -= 0.5 * pElem->dx * pVEdge->dJpDpsiP1; } else if ( OneCarrier == N_TYPE ) { rhs[ pVNode->nEqn ] -= 0.5 * pElem->dx * pVEdge->dJnDpsiP1; } else if ( OneCarrier == P_TYPE ) { rhs[ pVNode->pEqn ] -= 0.5 * pElem->dx * pVEdge->dJpDpsiP1; } } } } } } } ngspice-26/src/ciderlib/twod/twodext.h0000644000265600020320000001506312264261473017426 0ustar andreasadmin/* * 2001 Paolo Nenzi */ /* External symbols for Two Dimensional simulator */ #ifndef ngspice_TWODEXT_H #define ngspice_TWODEXT_H #include "ngspice/profile.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/carddefs.h" #include "ngspice/bool.h" #include "ngspice/complex.h" /* twoadmit.c */ extern int NUMD2admittance(TWOdevice *, double, SPcomplex *); extern int NBJT2admittance(TWOdevice *, double, SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *); extern int NUMOSadmittance(TWOdevice *, double, struct mosAdmittances *); extern BOOLEAN TWOsorSolve(TWOdevice *, double *, double *, double); extern SPcomplex *contactAdmittance(TWOdevice *, TWOcontact *, BOOLEAN, double *, double *, SPcomplex *); extern SPcomplex *oxideAdmittance(TWOdevice *, TWOcontact *,BOOLEAN, double *, double *, SPcomplex *); extern void NUMD2ys(TWOdevice *, SPcomplex *, SPcomplex *); extern void NBJT2ys(TWOdevice *,SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *); extern void NUMOSys(TWOdevice *, SPcomplex *, struct mosAdmittances *); /* twoaval.c */ extern double TWOavalanche(TWOelem *, TWOnode *); /* twocond.c */ extern void NUMD2conductance(TWOdevice *, BOOLEAN, double *, double *); extern void NBJT2conductance(TWOdevice *, BOOLEAN, double *, double *, double *, double *, double *); extern void NUMOSconductance(TWOdevice *, BOOLEAN, double *, struct mosConductances *); extern double contactCurrent(TWOdevice *, TWOcontact *); extern double oxideCurrent(TWOdevice *, TWOcontact *, BOOLEAN); extern double contactConductance(TWOdevice *, TWOcontact *, BOOLEAN, double *, BOOLEAN, double *); extern double oxideConductance(TWOdevice *, TWOcontact *, BOOLEAN, double *, BOOLEAN, double *); extern void NUMD2current(TWOdevice *, BOOLEAN, double *, double *); extern void NBJT2current(TWOdevice *, BOOLEAN, double *, double *, double *); extern void NUMOScurrent(TWOdevice *, BOOLEAN , double *, double *, double *, double *); /* twocont */ extern void TWO_jacBuild(TWOdevice *); extern void TWO_sysLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWO_jacLoad(TWOdevice *); extern void TWO_rhsLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWO_commonTerms(TWOdevice *, BOOLEAN, BOOLEAN, TWOtranInfo *); /* twocurr.c */ extern void nodeCurrents(TWOelem *, TWOnode *, double *, double *, double *, double *, double *, double *, double *, double *); /* twodest */ extern void TWOdestroy(TWOdevice *); /* twodopng.c */ extern double TWOdopingValue(DOPprofile *, DOPtable *, double, double); extern void TWOsetDoping(TWOdevice *, DOPprofile *, DOPtable *); /* twoelect.c */ extern int TWOcmpElectrode(TWOelectrode *, TWOelectrode *); extern void checkElectrodes(TWOelectrode *, int); extern void setupContacts(TWOdevice *, TWOelectrode *, TWOnode ***); /* twofield.c */ extern void nodeFields(TWOelem *, TWOnode *, double *, double *); /* twomesh.c */ extern void TWObuildMesh(TWOdevice *, TWOdomain *, TWOelectrode *, TWOmaterial *); extern void TWOprnMesh(TWOdevice *); extern void TWOgetStatePointers(TWOdevice *, int *); /* twomobdv.c */ extern void TWO_mobDeriv(TWOelem *, int, double); extern void TWONmobDeriv(TWOelem *, int, double); extern void TWOPmobDeriv(TWOelem *, int, double); /* twomobfn.c */ extern void MOBsurfElec(TWOmaterial *, TWOelem *, double, double, double, double, double, double); extern void MOBsurfHole(TWOmaterial *, TWOelem *, double, double, double, double, double, double); /* twomobil.c */ extern void TWO_mobility(TWOelem *, double); extern void TWONmobility(TWOelem *, double); extern void TWOPmobility(TWOelem *, double); /* twoncont.c */ extern void TWONjacBuild(TWOdevice *); extern void TWONsysLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWONjacLoad(TWOdevice *); extern void TWONrhsLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWONcommonTerms(TWOdevice *, BOOLEAN, BOOLEAN, TWOtranInfo *); /* twopcont.c */ extern void TWOPjacBuild(TWOdevice *); extern void TWOPsysLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWOPjacLoad(TWOdevice *); extern void TWOPrhsLoad(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWOPcommonTerms(TWOdevice *, BOOLEAN, BOOLEAN, TWOtranInfo *); /* twopoiss.c */ extern void TWOQjacBuild(TWOdevice *); extern void TWOQsysLoad(TWOdevice *); extern void TWOQrhsLoad(TWOdevice *); extern void TWOQcommonTerms(TWOdevice *); /*twoprint.c */ extern void TWOprnSolution(FILE *, TWOdevice *, OUTPcard *); extern void TWOmemStats(FILE *, TWOdevice *); extern void TWOcpuStats(FILE *, TWOdevice *); /* twoproj.c */ extern void NUMD2project(TWOdevice *, double); extern void NBJT2project(TWOdevice *, double, double); extern void NUMOSproject(TWOdevice *, double, double, double); extern void NUMD2update(TWOdevice *,double, BOOLEAN); extern void NBJT2update(TWOdevice *, double, double, BOOLEAN); extern void NUMOSupdate(TWOdevice *, double, double, double, BOOLEAN); extern void storeNewRhs(TWOdevice *, TWOcontact *); /* tworead.c */ extern int TWOreadState(TWOdevice *, char *, int, double *, double *, double *); /*twosetbc.c */ extern void NUMD2setBCs(TWOdevice *, double); extern void NBJT2setBCs(TWOdevice *, double, double); extern void NUMOSsetBCs(TWOdevice *, double, double, double); /*twosetup.c */ extern void TWOsetup(TWOdevice *); extern void TWOsetBCparams(TWOdevice *, BDRYcard *); extern void TWOnormalize(TWOdevice *); /* twosolve.c */ extern void TWOdcSolve(TWOdevice *, int, BOOLEAN, BOOLEAN, TWOtranInfo *); extern BOOLEAN TWOdeltaConverged(TWOdevice *); extern BOOLEAN TWOdeviceConverged(TWOdevice *); extern void TWOresetJacobian(TWOdevice *); extern void TWOstoreNeutralGuess(TWOdevice *); extern void TWOequilSolve(TWOdevice *); extern void TWObiasSolve(TWOdevice *, int, BOOLEAN, TWOtranInfo *); extern void TWOstoreEquilibGuess(TWOdevice *); extern void TWOstoreInitialGuess(TWOdevice *); extern void oldTWOnewDelta(TWOdevice *, BOOLEAN, TWOtranInfo *); extern int TWOnewDelta(TWOdevice *, BOOLEAN, TWOtranInfo *); extern void TWOpredict(TWOdevice *, TWOtranInfo *); extern double TWOtrunc(TWOdevice *, TWOtranInfo *, double); extern void TWOsaveState(TWOdevice *); extern BOOLEAN TWOpsiDeltaConverged(TWOdevice *); extern double TWOnuNorm(TWOdevice *); extern void TWOjacCheck(TWOdevice *, BOOLEAN, TWOtranInfo *); #endif ngspice-26/src/ciderlib/twod/twomesh.c0000644000265600020320000004037012264261473017410 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "twoddefs.h" #include "twodext.h" static void doMobCoeffs(TWOelem *, int); static void resetEvalFlag(TWOdevice *pDevice); void TWObuildMesh(TWOdevice *pDevice, TWOdomain *pDomain, TWOelectrode *pElectrode, TWOmaterial *pMaterial) { int xIndex, yIndex, eIndex, index; int elemType; TWOelem *pElem, *pElem1; TWOnode *pNode, *pNode1, *pNextHNode, *pNextVNode, *pNextDNode; TWOnode ***nodeArray = NULL; TWOedge *pEdge; TWOedge ***edgeArrayH = NULL, ***edgeArrayV = NULL; TWOdomain *pD; TWOelectrode *pE; TWOmaterial *pM; BOOLEAN interiorNode; int poiEqn, numEqn, numElem, numNodes, numEdges; int numXNodes = pDevice->numXNodes; int numYNodes = pDevice->numYNodes; double *xScale = pDevice->xScale; double *yScale = pDevice->yScale; #ifdef NOTDEF FILE *meshFile; #endif /* Generate work arrays. */ XCALLOC(nodeArray, TWOnode **, 1 + numXNodes); for (xIndex = 1; xIndex <= numXNodes; xIndex++) { XCALLOC(nodeArray[xIndex], TWOnode *, 1 + numYNodes); } /* Generate the nodes. */ for (xIndex = 1; xIndex <= numXNodes; xIndex++) { for (yIndex = 1; yIndex <= numYNodes; yIndex++) { XCALLOC(pNode, TWOnode, 1); pNode->nodeI = xIndex; pNode->nodeJ = yIndex; pNode->poiEqn = 0; nodeArray[xIndex][yIndex] = pNode; } } /* Mark the semiconductor/insulator domains. */ if (pDomain == NULL) { fprintf(stderr, "Error: domains not defined for device\n"); exit(-1); } for (pD = pDomain; pD != NULL; pD = pD->next) { for (pM = pMaterial; pM != NULL; pM = pM->next) { if (pD->material == pM->id) { break; } } elemType = pM->type; for (xIndex = pD->ixLo; xIndex <= pD->ixHi; xIndex++) { for (yIndex = pD->iyLo; yIndex <= pD->iyHi; yIndex++) { pNode = nodeArray[xIndex][yIndex]; pNode->nodeType = elemType; } } } /* Now mark all the metallic domains */ for (pE = pElectrode; pE != NULL; pE = pE->next) { for (xIndex = pE->ixLo; xIndex <= pE->ixHi; xIndex++) { for (yIndex = pE->iyLo; yIndex <= pE->iyHi; yIndex++) { pNode = nodeArray[xIndex][yIndex]; pNode->nodeType = CONTACT; } } } /* * Now mark as NULL any node in the interior of an electrode, i.e. none of * its neighbors is a different material. */ for (xIndex = 1; xIndex <= numXNodes; xIndex++) { for (yIndex = 1; yIndex <= numYNodes; yIndex++) { pNode = nodeArray[xIndex][yIndex]; if (pNode->nodeType == CONTACT) { interiorNode = TRUE; if (xIndex > 1) { pNode1 = nodeArray[xIndex - 1][yIndex]; if (pNode1->nodeType != 0 && pNode1->nodeType != CONTACT) { interiorNode = FALSE; } } if (interiorNode && xIndex < numXNodes) { pNode1 = nodeArray[xIndex + 1][yIndex]; if (pNode1->nodeType != 0 && pNode1->nodeType != CONTACT) { interiorNode = FALSE; } } if (interiorNode && yIndex > 1) { pNode1 = nodeArray[xIndex][yIndex - 1]; if (pNode1->nodeType != 0 && pNode1->nodeType != CONTACT) { interiorNode = FALSE; } } if (interiorNode && yIndex < numYNodes) { pNode1 = nodeArray[xIndex][yIndex + 1]; if (pNode1->nodeType != 0 && pNode1->nodeType != CONTACT) { interiorNode = FALSE; } } if (interiorNode) { pNode->nodeType = 0; } } } } /* Delete nodes that do not belong to any domain. */ numNodes = 0; for (yIndex = 1; yIndex <= numYNodes; yIndex++) { for (xIndex = 1; xIndex <= numXNodes; xIndex++) { pNode = nodeArray[xIndex][yIndex]; if (pNode->nodeType == 0) { /* This node doesn't belong to a domain so delete it. */ nodeArray[xIndex][yIndex] = NULL; FREE(pNode); } else { numNodes++; } } } pDevice->numNodes = numNodes; /* Now relabel any remaining nodes that are part of electrodes. */ setupContacts(pDevice, pElectrode, nodeArray); /* Done with the nodes. Now construct the elements and the edges. */ numEdges = 0; /* Generate the horizontal edges and store in a work array. */ XCALLOC(edgeArrayH, TWOedge **, numXNodes); for (xIndex = 1; xIndex < numXNodes; xIndex++) { XCALLOC(edgeArrayH[xIndex], TWOedge *, 1 + numYNodes); } for (yIndex = 1; yIndex <= numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pNode = nodeArray[xIndex][yIndex]; pNextHNode = nodeArray[xIndex + 1][yIndex]; if (pNode != NULL && pNextHNode != NULL) { XCALLOC(pEdge, TWOedge, 1); numEdges++; edgeArrayH[xIndex][yIndex] = pEdge; } } } /* Generate the vertical edges and store in a work array. */ XCALLOC(edgeArrayV, TWOedge **, 1 + numXNodes); for (xIndex = 1; xIndex <= numXNodes; xIndex++) { XCALLOC(edgeArrayV[xIndex], TWOedge *, numYNodes); } for (xIndex = 1; xIndex <= numXNodes; xIndex++) { for (yIndex = 1; yIndex < numYNodes; yIndex++) { pNode = nodeArray[xIndex][yIndex]; pNextVNode = nodeArray[xIndex][yIndex + 1]; if (pNode != NULL && pNextVNode != NULL) { XCALLOC(pEdge, TWOedge, 1); numEdges++; edgeArrayV[xIndex][yIndex] = pEdge; } } } pDevice->numEdges = numEdges; /* Now construct and count the elements and store the node/edge pointers. */ numElem = 1; for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pNode = nodeArray[xIndex][yIndex]; pNextHNode = nodeArray[xIndex + 1][yIndex]; pNextVNode = nodeArray[xIndex][yIndex + 1]; pNextDNode = nodeArray[xIndex + 1][yIndex + 1]; if (pNode != NULL && pNextHNode != NULL && pNextVNode != NULL && pNextDNode != NULL) { numElem++; XCALLOC(pElem, TWOelem, 1); pElem->pTLNode = pNode; pElem->pTRNode = pNextHNode; pElem->pBLNode = pNextVNode; pElem->pBRNode = pNextDNode; pElem->pTopEdge = edgeArrayH[xIndex][yIndex]; pElem->pBotEdge = edgeArrayH[xIndex][yIndex + 1]; pElem->pLeftEdge = edgeArrayV[xIndex][yIndex]; pElem->pRightEdge = edgeArrayV[xIndex + 1][yIndex]; pDevice->elemArray[xIndex][yIndex] = pElem; } else { pDevice->elemArray[xIndex][yIndex] = NULL; } } } /* Create and pack the 1D element array. */ pDevice->numElems = numElem - 1; XCALLOC(pDevice->elements, TWOelem *, 1 + numElem); numElem = 1; for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { pDevice->elements[numElem++] = pElem; } } } /* Now create back links from elements to nodes. */ for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { pElem->pTLNode->pBRElem = pElem; pElem->pTRNode->pBLElem = pElem; pElem->pBLNode->pTRElem = pElem; pElem->pBRNode->pTLElem = pElem; if (xIndex > 1) { pElem->pLeftElem = pDevice->elemArray[xIndex-1][yIndex]; } if (xIndex < numXNodes - 1) { pElem->pRightElem = pDevice->elemArray[xIndex+1][yIndex]; } if (yIndex > 1) { pElem->pTopElem = pDevice->elemArray[xIndex][yIndex-1]; } if (yIndex < numYNodes - 1) { pElem->pBotElem = pDevice->elemArray[xIndex][yIndex+1]; } } } } /* Establish the element types using domain info. */ for (pD = pDomain; pD != NULL; pD = pD->next) { for (pM = pMaterial; pM != NULL; pM = pM->next) { if (pD->material == pM->id) { break; } } elemType = pM->type; for (yIndex = pD->iyLo; yIndex < pD->iyHi; yIndex++) { for (xIndex = pD->ixLo; xIndex < pD->ixHi; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { pElem->domain = pD->id; pElem->elemType = elemType; pElem->matlInfo = pM; } } } } /* Establish the edge types. */ for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { for (index = 0; index <= 3; index++) { pEdge = pElem->pEdges[index]; pNode = pElem->pNodes[index]; pNode1 = pElem->pNodes[(index + 1) % 4]; pElem1 = pNode1->pElems[index]; if (pNode->nodeType == CONTACT && pNode1->nodeType == CONTACT) { /* Contact edge */ pEdge->edgeType = CONTACT; } else if (pNode->nodeType == SCHOTTKY && pNode1->nodeType == SCHOTTKY) { /* Schottky edge */ pEdge->edgeType = SCHOTTKY; } else if (pElem1 == NULL) { /* Neumann edge */ pEdge->edgeType = pElem->elemType; } else if (pElem->elemType != pElem1->elemType) { /* Interface edge */ pEdge->edgeType = INTERFACE; } else { /* Ignore heterojnxns for now */ /* Heterojunction or Homojunction edge */ pEdge->edgeType = pElem->elemType; } } } } } resetEvalFlag(pDevice); /* Set evaluation flags on nodes and edges. */ /* Assign the dx and dy terms in the elements while we're at it. */ for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { pElem->dx = xScale[xIndex + 1] - xScale[xIndex]; pElem->dy = yScale[yIndex + 1] - yScale[yIndex]; pElem->dxOverDy = pElem->dx / pElem->dy; pElem->dyOverDx = pElem->dy / pElem->dx; /* * Semiconductor elements take precedence over Insulator elements, so * set them up first. */ for (index = 0; index <= 3; index++) { if (pElem->elemType == SEMICON) { pNode = pElem->pNodes[index]; if (!pNode->evaluated) { pNode->evaluated = TRUE; pElem->evalNodes[index] = TRUE; } else { pElem->evalNodes[index] = FALSE; } pEdge = pElem->pEdges[index]; if (!pEdge->evaluated) { pEdge->evaluated = TRUE; pElem->evalEdges[index] = TRUE; } else { pElem->evalEdges[index] = FALSE; } } } } } } /* Do a second setup pass for Insulator elements */ /* Do mobility coefficients now, because we set up dx and dy * in the previous pass */ for (yIndex = 1; yIndex < numYNodes; yIndex++) { for (xIndex = 1; xIndex < numXNodes; xIndex++) { pElem = pDevice->elemArray[xIndex][yIndex]; if (pElem != NULL) { pElem->direction = 0; pElem->channel = 0; pElem->surface = FALSE; for (index = 0; index <= 3; index++) { if (pElem->elemType == SEMICON) { doMobCoeffs( pElem, index ); } else if (pElem->elemType == INSULATOR) { pNode = pElem->pNodes[index]; if (!pNode->evaluated) { pNode->evaluated = TRUE; pElem->evalNodes[index] = TRUE; } else { pElem->evalNodes[index] = FALSE; } pEdge = pElem->pEdges[index]; if (!pEdge->evaluated) { pEdge->evaluated = TRUE; pElem->evalEdges[index] = TRUE; } else { pElem->evalEdges[index] = FALSE; } } } } } } /* Set up the equation numbers for nodes. */ poiEqn = numEqn = 1; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { /* First assign potential equation numbers */ if (pNode->nodeType != SCHOTTKY) { pNode->poiEqn = poiEqn++; pNode->psiEqn = numEqn++; } /* Now assign carrier-concentration equation numbers */ if (pElem->elemType == INSULATOR) { pNode->nEqn = 0; pNode->pEqn = 0; } else { if (OneCarrier) { /* n and p get same number */ pNode->nEqn = numEqn; pNode->pEqn = numEqn++; } else { pNode->nEqn = numEqn++; pNode->pEqn = numEqn++; } } } else { /* This is a contact node. */ pNode->poiEqn = 0; pNode->psiEqn = 0; pNode->nEqn = 0; pNode->pEqn = 0; } } } } pDevice->dimEquil = poiEqn; pDevice->dimBias = numEqn; /* Open and Print Mesh Output File for Debugging */ /* Nuked from release version */ #ifdef NOTDEF if (!(meshFile = fopen("mesh.out", "w"))) { perror("mesh.out"); exit(-1); } for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; fprintf(meshFile, "node: %5d %5d %5d %5d\n", pNode->nodeI, pNode->nodeJ, pNode->poiEqn, pNode->psiEqn); } } } fflush(meshFile); fclose(meshFile); #endif /* Delete work arrays. */ for (xIndex = 1; xIndex <= numXNodes; xIndex++) { FREE(nodeArray[xIndex]); FREE(edgeArrayV[xIndex]); } for (xIndex = 1; xIndex < numXNodes; xIndex++) { FREE(edgeArrayH[xIndex]); } FREE(nodeArray); FREE(edgeArrayV); FREE(edgeArrayH); /* * TWOprnMesh( pDevice ); */ } void TWOprnMesh(TWOdevice *pDevice) { int eIndex, index; TWOelem *pElem; TWOnode *pNode; TWOedge *pEdge; char *name; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; fprintf(stderr, "elem %5d:\n", eIndex); for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; switch (pNode->nodeType) { case SEMICON: name = "semiconductor"; break; case INSULATOR: name = "insulator"; break; case CONTACT: name = "contact"; break; case SCHOTTKY: name = "schottky"; break; case INTERFACE: name = "interface"; break; default: name = "unknown"; break; } fprintf(stderr, "node %5d: %s %5d %5d\n", index, name, pNode->nodeI, pNode->nodeJ); } if (pElem->evalEdges[index]) { pEdge = pElem->pEdges[index]; switch (pEdge->edgeType) { case SEMICON: name = "semiconductor"; break; case INSULATOR: name = "insulator"; break; case CONTACT: name = "contact"; break; case SCHOTTKY: name = "schottky"; break; case INTERFACE: name = "interface"; break; default: name = "unknown"; break; } fprintf(stderr, "edge %5d: %s\n", index, name); } } } } /* * We have a separate function for this, so that the setup routines can * reset the state pointers without rebuilding the entire mesh. */ void TWOgetStatePointers(TWOdevice *pDevice, int *numStates) { int eIndex, index; TWOelem *pElem; TWOnode *pNode; TWOedge *pEdge; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; pNode->nodeState = *numStates; *numStates += TWOnumNodeStates; } if (pElem->evalEdges[index]) { pEdge = pElem->pEdges[index]; pEdge->edgeState = *numStates; *numStates += TWOnumEdgeStates; } } } } /* * This function computes the percentages of the total semiconductor * width of an edge on the negative and positive sides of the edge */ static void doMobCoeffs(TWOelem *pElem, int index) { TWOelem *pNElem; TWOedge *pEdge; double dl1 = 0.0, dl2 = 0.0; pNElem = pElem->pElems[ index ]; pEdge = pElem->pEdges[ index ]; /* If neighbor is not SEMICON, assign and return */ if ( (pNElem == NULL) || (pNElem->elemType == INSULATOR) ) { if ( index == 0 || index == 3 ) { pEdge->kNeg = 0.0; pEdge->kPos = 1.0; } else { pEdge->kNeg = 1.0; pEdge->kPos = 0.0; } return; } /* Find appropriate dimensions of the elements */ switch ( index ) { case 0: dl1 = pNElem->dy; dl2 = pElem->dy; break; case 1: dl1 = pElem->dx; dl2 = pNElem->dx; break; case 2: dl1 = pElem->dy; dl2 = pNElem->dy; break; case 3: dl1 = pNElem->dx; dl2 = pElem->dx; break; } /* Assign coefficients */ pEdge->kNeg = dl1 / (dl1 + dl2); pEdge->kPos = dl2 / (dl1 + dl2); } static void resetEvalFlag(TWOdevice *pDevice) { int index, eIndex; TWOelem *pElem; for (eIndex = 1; eIndex <= pDevice->numElems; eIndex++) { pElem = pDevice->elements[eIndex]; for (index = 0; index <= 3; index++) { pElem->pNodes[index]->evaluated = FALSE; pElem->pEdges[index]->evaluated = FALSE; } } } ngspice-26/src/ciderlib/twod/twomobfn.c0000644000265600020320000003046312264261473017557 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1990 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/material.h" #include "twoddefs.h" #include "twodext.h" /* * These functions calculate the variable-dependence * of the surface mobilities */ void MOBsurfElec(TWOmaterial *info, TWOelem *pElem, double ex, double ey, double es, double wx, double wy, double totalConc) { double thetaA = info->thetaA[ELEC]; double thetaB = info->thetaB[ELEC]; double eL, eN, eD, e0, mun; double temp1, temp2, temp3, temp4, temp5; double temp6, temp7, temp8, temp9; double sgnN, sgnL; double dMunDEs; /* Surface Field Derivative */ double dMunDEn; /* (Local) Normal Field Derivative */ double dMunDEl; /* Tangent Field Derivative */ double muHC, muSR, muLV; double dMuSRDEn; double d2MuSRDEn2; double dMuHCDEl; double dMuHCDMuSR; double d2MuHCDMuSR2; double d2MuHCDElDMuSR; double dEnDEx; /* Normal Derivative x Component */ double dEnDEy; /* Normal Derivative y Component */ double dEnDWx; /* Normal Derivative x Component */ double dEnDWy; /* Normal Derivative y Component */ double dElDEx; /* Lateral Derivative x Component */ double dElDEy; /* Lateral Derivative y Component */ double dElDWx; /* Lateral Derivative x Component */ double dElDWy; /* Lateral Derivative y Component */ NG_IGNORE(wx); NG_IGNORE(wy); NG_IGNORE(totalConc); if ( pElem->surface ) { /* replace one field component with surface field */ if ( pElem->direction == 0 ) { ey = es; } else { ex = es; } } e0 = 1.0 / ENorm; if ( pElem->direction == 0 ) { eN = ABS( SALPHA_N*ey + SBETA_N*es ); sgnN = SGN( SALPHA_N*ey + SBETA_N*es ); eD = SALPHA_N*( es - ey ); dEnDEx = 0.0; dEnDEy = 1.0; dEnDWx = 0.0; dEnDWy = 0.0; eL = ABS( ex ); sgnL = SGN( ex ); dElDEx = 1.0; dElDEy = 0.0; dElDWx = 0.0; dElDWy = 0.0; } else { /* pElem->direction == Y */ eN = ABS( SALPHA_N*ex + SBETA_N*es ); sgnN = SGN( SALPHA_N*ex + SBETA_N*es ); eD = SALPHA_N*( es - ex ); dEnDEx = 1.0; dEnDEy = 0.0; dEnDWx = 0.0; dEnDWy = 0.0; eL = ABS( ey ); sgnL = SGN( ey ); dElDEx = 0.0; dElDEy = 1.0; dElDWx = 0.0; dElDWy = 0.0; } /* fprintf(stderr,"En = %e, Ep = %e, Ey = %e, Es= %e\n",eN,eL,ey,es); */ muLV = pElem->mun0; if ( TransDepMobility ) { /* Compute various partial derivatives of muSR */ temp1 = 1.0 / ( 1.0 + thetaA*eN + thetaB*eN*eN ); temp2 = (thetaA + 2.0*thetaB*eN); muSR = muLV * temp1; dMuSRDEn = - muSR * temp1 * temp2; d2MuSRDEn2 = - 2.0 * (dMuSRDEn * temp1 * temp2 + muSR * temp1 * thetaB); if ( FieldDepMobility ) { /* Compute various partial derivatives of muHC */ switch ( info->fieldModel ) { case CT: case AR: case UF: temp1 = 1.0 / info->vSat[ELEC]; temp2 = muSR * temp1; temp3 = eL * temp1; temp4 = eL * temp2; temp5 = 1.0 / ( 1.0 + temp4 * temp4 ); temp6 = sqrt( temp5 ); muHC = muSR * temp6; dMuHCDMuSR = temp5 * temp6; temp7 = temp4 * dMuHCDMuSR; temp8 = - 3.0 * temp7 * temp5; dMuHCDEl = - muSR * temp7 * temp2; d2MuHCDMuSR2 = temp8 * temp3; d2MuHCDElDMuSR = temp8 * temp2; break; case SG: default: temp1 = 1.0 / info->vSat[ELEC]; temp2 = muSR * eL * temp1; /* Vdrift / Vsat */ temp3 = 1.0 / info->vWarm[ELEC]; temp4 = muSR * eL * temp3; /* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_N); temp6 = 1.0 / (1.0 + temp5*temp4 + temp2*temp2); temp7 = sqrt(temp6); muHC = muSR * temp7; temp7 *= temp6; temp8 = (2.0 - temp5)*temp5*temp3 + 2.0*temp2*temp1; dMuHCDEl = - 0.5*muSR*temp7*temp8 * muSR; temp9 = temp5*temp5; dMuHCDMuSR = (1.0 + 0.5*temp9*temp4) * temp7; temp9 = (1.5 - temp5)*temp9*temp3 * temp7; temp9 -= 1.5 * dMuHCDMuSR * temp6 * temp8; d2MuHCDMuSR2 = temp9 * eL; d2MuHCDElDMuSR = temp9 * muSR; break; } /* Now compute total derivatives */ temp1 = dMuHCDMuSR * dMuSRDEn * sgnN; temp2 = d2MuHCDMuSR2 * dMuSRDEn * dMuSRDEn + dMuHCDMuSR * d2MuSRDEn2; temp3 = temp1 - temp2 * eD; mun = muHC - temp1 * eD; dMunDEn = (temp3 + temp1) * SALPHA_N; dMunDEs = temp3 * SBETA_N - temp1 * SALPHA_N; dMunDEl = (dMuHCDEl - d2MuHCDElDMuSR * dMuSRDEn * sgnN * eD) * sgnL; } else { /* Now compute total derivatives */ temp1 = dMuSRDEn * sgnN; temp3 = temp1 - d2MuSRDEn2 * eD; mun = muSR - temp1 * eD; dMunDEn = (temp3 + temp1) * SALPHA_N; dMunDEs = temp3 * SBETA_N - temp1 * SALPHA_N; dMunDEl = 0.0; } } else { if ( FieldDepMobility ) { /* Compute various partial derivatives of muHC */ switch ( info->fieldModel ) { case CT: case AR: case UF: temp1 = muLV / info->vSat[ELEC]; temp2 = eL * temp1; temp3 = 1.0 / ( 1.0 + temp2 * temp2 ); temp4 = sqrt( temp3 ); muHC = muLV * temp4; dMuHCDEl = - muHC*temp2*temp3 * temp1; break; case SG: default: temp1 = 1.0 / info->vSat[ELEC]; temp2 = muLV * eL * temp1; /* Vdrift / Vsat */ temp3 = 1.0 / info->vWarm[ELEC]; temp4 = muLV * eL * temp3; /* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_N); temp6 = 1.0 / (1.0 + temp5*temp4 + temp2*temp2); temp7 = sqrt(temp6); muHC = muLV * temp7; temp8 = (2.0 - temp5)*temp5*temp3 + 2.0*temp2*temp1; dMuHCDEl = - 0.5*muHC*temp6*temp8 * muLV; break; } /* Now compute total derivatives */ mun = muHC; dMunDEn = 0.0; dMunDEs = 0.0; dMunDEl = dMuHCDEl * sgnL; } else { mun = muLV; dMunDEn = 0.0; dMunDEs = 0.0; dMunDEl = 0.0; } } pElem->mun = mun; pElem->dMunDEs = dMunDEs; pElem->dMunDEx = dMunDEn * dEnDEx + dMunDEl * dElDEx; pElem->dMunDEy = dMunDEn * dEnDEy + dMunDEl * dElDEy; pElem->dMunDWx = dMunDEn * dEnDWx + dMunDEl * dElDWx; pElem->dMunDWy = dMunDEn * dEnDWy + dMunDEl * dElDWy; if ( pElem->surface ) { /* replace one field component with surface field */ if ( pElem->direction == 0 ) { pElem->dMunDEs += pElem->dMunDEy; pElem->dMunDEy = 0.0; } else { pElem->dMunDEs += pElem->dMunDEx; pElem->dMunDEx = 0.0; } } return; } void MOBsurfHole(TWOmaterial *info, TWOelem *pElem, double ex, double ey, double es, double wx, double wy, double totalConc) { double thetaA = info->thetaA[HOLE]; double thetaB = info->thetaB[HOLE]; double eL, eN, eD, mup; double temp1, temp2, temp3, temp4, temp5; double temp6, temp7, temp8, temp9; double sgnN, sgnL; double dMupDEs; /* Surface Field Derivative */ double dMupDEn; /* (Local) Normal Field Derivative */ double dMupDEl; /* Tangent Field Derivative */ double muHC, muSR, muLV; double dMuSRDEn; double d2MuSRDEn2; double dMuHCDEl; double dMuHCDMuSR; double d2MuHCDMuSR2; double d2MuHCDElDMuSR; double dEnDEx; /* Normal Derivative x Component */ double dEnDEy; /* Normal Derivative y Component */ double dEnDWx; /* Normal Derivative x Component */ double dEnDWy; /* Normal Derivative y Component */ double dElDEx; /* Lateral Derivative x Component */ double dElDEy; /* Lateral Derivative y Component */ double dElDWx; /* Lateral Derivative x Component */ double dElDWy; /* Lateral Derivative y Component */ NG_IGNORE(wx); NG_IGNORE(wy); NG_IGNORE(totalConc); if ( pElem->surface ) { /* replace one field component with surface field */ if ( pElem->direction == 0 ) { ey = es; } else { ex = es; } } if ( pElem->direction == 0 ) { eN = ABS( SALPHA_P*ey + SBETA_P*es ); sgnN = SGN( SALPHA_P*ey + SBETA_P*es ); eD = SALPHA_P*( es - ey ); dEnDEx = 0.0; dEnDEy = 1.0; dEnDWx = 0.0; dEnDWy = 0.0; eL = ABS( ex ); sgnL = SGN( ex ); dElDEx = 1.0; dElDEy = 0.0; dElDWx = 0.0; dElDWy = 0.0; } else { /* pElem->direction == Y */ eN = ABS( SALPHA_P*ex + SBETA_P*es ); sgnN = SGN( SALPHA_P*ex + SBETA_P*es ); eD = SALPHA_P*( es - ex ); dEnDEx = 1.0; dEnDEy = 0.0; dEnDWx = 0.0; dEnDWy = 0.0; eL = ABS( ey ); sgnL = SGN( ey ); dElDEx = 0.0; dElDEy = 1.0; dElDWx = 0.0; dElDWy = 0.0; } muLV = pElem->mup0; if ( TransDepMobility ) { /* Compute various partial derivatives of muSR */ temp1 = 1.0 / ( 1.0 + thetaA*eN + thetaB*eN*eN ); temp2 = thetaA + 2.0*thetaB*eN; muSR = muLV * temp1; dMuSRDEn = - muSR * temp1 * temp2; d2MuSRDEn2 = - 2.0 * (dMuSRDEn * temp1 * temp2 + muSR * temp1 * thetaB); if ( FieldDepMobility ) { /* Compute various partial derivatives of muHC */ switch ( info->fieldModel ) { case CT: case AR: case UF: temp1 = 1.0 / info->vSat[HOLE]; temp2 = muSR * temp1; temp3 = eL * temp1; temp4 = eL * temp2; temp5 = 1.0 / ( 1.0 + temp4 ); muHC = muSR * temp5; dMuHCDMuSR = temp5 * temp5; dMuHCDEl = - muSR * dMuHCDMuSR * temp2; temp6 = - 2.0 * dMuHCDMuSR * temp5; d2MuHCDMuSR2 = temp6 * temp3; d2MuHCDElDMuSR = temp6 * temp2; break; case SG: default: temp1 = 1.0 / info->vSat[HOLE]; temp2 = muSR * eL * temp1; /* Vdrift / Vsat */ temp3 = 1.0 / info->vWarm[HOLE]; temp4 = muSR * eL * temp3; /* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_P); temp6 = 1.0 / (1.0 + temp5*temp4 + temp2*temp2); temp7 = sqrt(temp6); muHC = muSR * temp7; temp7 *= temp6; temp8 = (2.0 - temp5)*temp5*temp3 + 2.0*temp2*temp1; dMuHCDEl = - 0.5*muSR*temp7*temp8 * muSR; temp9 = temp5*temp5; dMuHCDMuSR = (1.0 + 0.5*temp9*temp4) * temp7; temp9 = (1.5 - temp5)*temp9*temp3 * temp7; temp9 -= 1.5 * dMuHCDMuSR * temp6 * temp8; d2MuHCDMuSR2 = temp9 * eL; d2MuHCDElDMuSR = temp9 * muSR; break; } /* Now compute total derivatives */ temp1 = dMuHCDMuSR * dMuSRDEn * sgnN; temp2 = d2MuHCDMuSR2 * dMuSRDEn * dMuSRDEn + dMuHCDMuSR * d2MuSRDEn2; temp3 = temp1 - temp2 * eD; mup = muHC - temp1 * eD; dMupDEn = (temp3 + temp1) * SALPHA_P; dMupDEs = temp3 * SBETA_P - temp1 * SALPHA_P; dMupDEl = (dMuHCDEl - d2MuHCDElDMuSR * dMuSRDEn * sgnN * eD ) * sgnL; } else { /* Now compute total derivatives */ temp1 = dMuSRDEn * sgnN; temp3 = temp1 - d2MuSRDEn2 * eD; mup = muSR - temp1 * eD; dMupDEn = (temp3 + temp1) * SALPHA_P; dMupDEs = temp3 * SBETA_P - temp1 * SALPHA_P; dMupDEl = 0.0; } } else { if ( FieldDepMobility ) { /* Compute various partial derivatives of muHC */ switch ( info->fieldModel ) { case CT: case AR: case UF: temp1 = muLV / info->vSat[HOLE]; temp2 = eL * temp1; temp3 = 1.0 / ( 1.0 + temp2 ); muHC = muLV * temp3; dMuHCDEl = - muHC * temp3 * temp1; break; case SG: default: temp1 = 1.0 / info->vSat[HOLE]; temp2 = muLV * eL * temp1; /* Vdrift / Vsat */ temp3 = 1.0 / info->vWarm[HOLE]; temp4 = muLV * eL * temp3; /* Vdrift / Vwarm */ temp5 = temp4 / (temp4 + SG_FIT_P); temp6 = 1.0 / (1.0 + temp5*temp4 + temp2*temp2); temp7 = sqrt(temp6); muHC = muLV * temp7; temp8 = (2.0 - temp5)*temp5*temp3 + 2.0*temp2*temp1; dMuHCDEl = - 0.5*muHC*temp6*temp8 * muLV; break; } /* Now compute total derivatives */ mup = muHC; dMupDEn = 0.0; dMupDEs = 0.0; dMupDEl = dMuHCDEl * sgnL; } else { mup = muLV; dMupDEn = 0.0; dMupDEs = 0.0; dMupDEl = 0.0; } } pElem->mup = mup; pElem->dMupDEs = dMupDEs; pElem->dMupDEx = dMupDEn * dEnDEx + dMupDEl * dElDEx; pElem->dMupDEy = dMupDEn * dEnDEy + dMupDEl * dElDEy; pElem->dMupDWx = dMupDEn * dEnDWx + dMupDEl * dElDWx; pElem->dMupDWy = dMupDEn * dEnDWy + dMupDEl * dElDWy; if ( pElem->surface ) { /* replace one field component with surface field */ if ( pElem->direction == 0 ) { pElem->dMupDEs += pElem->dMupDEy; pElem->dMupDEy = 0.0; } else { pElem->dMupDEs += pElem->dMupDEx; pElem->dMupDEx = 0.0; } } return; } ngspice-26/src/ciderlib/twod/twomobil.c0000644000265600020320000001072112264261473017553 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1990 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/twomesh.h" #include "twoddefs.h" #include "twodext.h" /* * Compute the 2-D field-dependent mobility at the center of an element. * It is known a priori that the element belongs to a semiconductor domain. */ void TWO_mobility(TWOelem *pElem, double eSurf) { TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; double dx, dy, rDx, rDy; double enx, eny, wnx, wny, concav; double epx, epy, wpx, wpy; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 0.5 / dx; /* Includes averaging factor of 0.5 */ rDy = 0.5 / dy; /* Includes averaging factor of 0.5 */ /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Calculate electric field at element center */ enx = -rDx *(pTEdge->dPsi + pTEdge->dCBand + pBEdge->dPsi + pBEdge->dCBand); epx = -rDx *(pTEdge->dPsi - pTEdge->dVBand + pBEdge->dPsi - pBEdge->dVBand); eny = -rDy *(pLEdge->dPsi + pLEdge->dCBand + pREdge->dPsi + pREdge->dCBand); epy = -rDy *(pLEdge->dPsi - pLEdge->dVBand + pREdge->dPsi - pREdge->dVBand); /* Calculate weighted carrier driving force at element center */ wnx = rDx * (pTEdge->wdfn + pBEdge->wdfn); wpx = rDx * (pTEdge->wdfp + pBEdge->wdfp); wny = rDy * (pLEdge->wdfn + pREdge->wdfn); wpy = rDy * (pLEdge->wdfp + pREdge->wdfp); /* compute the mobility for the element */ /* Average concentrations at the four corners */ concav = 0.25 * ( pElem->pTLNode->totalConc + pElem->pTRNode->totalConc + pElem->pBLNode->totalConc + pElem->pBRNode->totalConc ); MOBsurfElec(pElem->matlInfo, pElem, enx, eny, eSurf, wnx, wny, concav); MOBsurfHole(pElem->matlInfo, pElem, epx, epy, eSurf, wpx, wpy, concav); return; } void TWONmobility(TWOelem *pElem, double eSurf) { TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; double dx, dy, rDx, rDy; double enx, eny, wnx, wny, concav; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 0.5 / dx; /* Includes averaging factor of 0.5 */ rDy = 0.5 / dy; /* Includes averaging factor of 0.5 */ /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Calculate electric field at element center */ enx = -rDx *(pTEdge->dPsi + pTEdge->dCBand + pBEdge->dPsi + pBEdge->dCBand); eny = -rDy *(pLEdge->dPsi + pLEdge->dCBand + pREdge->dPsi + pREdge->dCBand); /* Calculate weighted carrier driving force at element center */ wnx = rDx * (pTEdge->wdfn + pBEdge->wdfn); wny = rDy * (pLEdge->wdfn + pREdge->wdfn); /* compute the mobility for the element */ /* Average concentrations at the four corners */ concav = 0.25 * ( pElem->pTLNode->totalConc + pElem->pTRNode->totalConc + pElem->pBLNode->totalConc + pElem->pBRNode->totalConc ); MOBsurfElec(pElem->matlInfo, pElem, enx, eny, eSurf, wnx, wny, concav); return; } void TWOPmobility(TWOelem *pElem, double eSurf) { TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; double dx, dy, rDx, rDy; double epx, epy, wpx, wpy, concav; /* Initialize various quantities */ dx = pElem->dx; dy = pElem->dy; rDx = 0.5 / dx; /* Includes averaging factor of 0.5 */ rDy = 0.5 / dy; /* Includes averaging factor of 0.5 */ /* Get pointers to element's edges */ pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* Calculate electric field at element center */ epx = -rDx *(pTEdge->dPsi - pTEdge->dVBand + pBEdge->dPsi - pBEdge->dVBand); epy = -rDy *(pLEdge->dPsi - pLEdge->dVBand + pREdge->dPsi - pREdge->dVBand); /* Calculate weighted carrier driving force at element center */ wpx = rDx * (pTEdge->wdfp + pBEdge->wdfp); wpy = rDy * (pLEdge->wdfp + pREdge->wdfp); /* compute the mobility for the element */ /* Average concentrations at the four corners */ concav = 0.25 * ( pElem->pTLNode->totalConc + pElem->pTRNode->totalConc + pElem->pBLNode->totalConc + pElem->pBRNode->totalConc ); MOBsurfHole(pElem->matlInfo, pElem, epx, epy, eSurf, wpx, wpy, concav); return; } ngspice-26/src/ciderlib/twod/twocont.c0000644000265600020320000010651312264261473017421 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/bool.h" #include "ngspice/spmatrix.h" #include "twoddefs.h" #include "twodext.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/bernoull.h" /* * Functions to setup and solve the continuity equations. * Both continuity equations are solved. * Separate functions are used for one continuity equation. */ /* * setup matrix pointers to Jacobian values and * store direct pointers with the nodes */ void TWO_jacBuild(TWOdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; TWOelem *pElem; TWOnode *pNode; TWOchannel *pCh; int eIndex, nIndex; int nextIndex; /* index of node to find next element */ int psiEqn, nEqn, pEqn; /* scratch for deref'd eqn numbers */ int psiEqnTL = 0, nEqnTL = 0, pEqnTL = 0; int psiEqnTR = 0, nEqnTR = 0, pEqnTR = 0; int psiEqnBR = 0, nEqnBR = 0, pEqnBR = 0; int psiEqnBL = 0, nEqnBL = 0, pEqnBL = 0; int psiEqnInM = 0, psiEqnInP = 0; /* scratch for deref'd surface eqns */ int psiEqnOxM = 0, psiEqnOxP = 0; /* M= more negative, P= more positive */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; /* first the self terms */ for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; /* get poisson-only pointer */ psiEqn = pNode->psiEqn; pNode->fPsiPsi = spGetElement( matrix, psiEqn, psiEqn ); if ( pElem->elemType == SEMICON ) { /* get continuity-coupling terms */ nEqn = pNode->nEqn; pEqn = pNode->pEqn; /* pointers for additional terms */ pNode->fPsiN = spGetElement( matrix, psiEqn, nEqn ); pNode->fPsiP = spGetElement( matrix, psiEqn, pEqn ); pNode->fNPsi = spGetElement( matrix, nEqn, psiEqn ); pNode->fNN = spGetElement( matrix, nEqn, nEqn ); pNode->fNP = spGetElement( matrix, nEqn, pEqn ); pNode->fPPsi = spGetElement( matrix, pEqn, psiEqn ); pNode->fPN = spGetElement( matrix, pEqn, nEqn ); pNode->fPP = spGetElement( matrix, pEqn, pEqn ); } else { nEqn = 0; pEqn = 0; } /* save equation indices */ switch ( nIndex ) { case 0: /* TL Node */ psiEqnTL = psiEqn; nEqnTL = nEqn; pEqnTL = pEqn; break; case 1: /* TR Node */ psiEqnTR = psiEqn; nEqnTR = nEqn; pEqnTR = pEqn; break; case 2: /* BR Node */ psiEqnBR = psiEqn; nEqnBR = nEqn; pEqnBR = pEqn; break; case 3: /* BL Node */ psiEqnBL = psiEqn; nEqnBL = nEqn; pEqnBL = pEqn; break; default: break; } } /* now terms to couple to adjacent nodes */ pNode = pElem->pTLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnTL, psiEqnTR ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTL, psiEqnBL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiP1 = spGetElement( matrix, nEqnTL, psiEqnTR ); pNode->fNNiP1 = spGetElement( matrix, nEqnTL, nEqnTR ); pNode->fNPsijP1 = spGetElement( matrix, nEqnTL, psiEqnBL ); pNode->fNNjP1 = spGetElement( matrix, nEqnTL, nEqnBL ); pNode->fPPsiiP1 = spGetElement( matrix, pEqnTL, psiEqnTR ); pNode->fPPiP1 = spGetElement( matrix, pEqnTL, pEqnTR ); pNode->fPPsijP1 = spGetElement( matrix, pEqnTL, psiEqnBL ); pNode->fPPjP1 = spGetElement( matrix, pEqnTL, pEqnBL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiP1jP1 = spGetElement( matrix, nEqnTL, psiEqnBR ); pNode->fNNiP1jP1 = spGetElement( matrix, nEqnTL, nEqnBR ); pNode->fPPsiiP1jP1 = spGetElement( matrix, pEqnTL, psiEqnBR ); pNode->fPPiP1jP1 = spGetElement( matrix, pEqnTL, pEqnBR ); } } pNode = pElem->pTRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnTR, psiEqnTL ); pNode->fPsiPsijP1 = spGetElement(matrix, psiEqnTR, psiEqnBR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiM1 = spGetElement( matrix, nEqnTR, psiEqnTL ); pNode->fNNiM1 = spGetElement( matrix, nEqnTR, nEqnTL ); pNode->fNPsijP1 = spGetElement( matrix, nEqnTR, psiEqnBR ); pNode->fNNjP1 = spGetElement( matrix, nEqnTR, nEqnBR ); pNode->fPPsiiM1 = spGetElement( matrix, pEqnTR, psiEqnTL ); pNode->fPPiM1 = spGetElement( matrix, pEqnTR, pEqnTL ); pNode->fPPsijP1 = spGetElement( matrix, pEqnTR, psiEqnBR ); pNode->fPPjP1 = spGetElement( matrix, pEqnTR, pEqnBR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiM1jP1 = spGetElement( matrix, nEqnTR, psiEqnBL ); pNode->fNNiM1jP1 = spGetElement( matrix, nEqnTR, nEqnBL ); pNode->fPPsiiM1jP1 = spGetElement( matrix, pEqnTR, psiEqnBL ); pNode->fPPiM1jP1 = spGetElement( matrix, pEqnTR, pEqnBL ); } } pNode = pElem->pBRNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnBR, psiEqnBL ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBR, psiEqnTR ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiM1 = spGetElement( matrix, nEqnBR, psiEqnBL ); pNode->fNNiM1 = spGetElement( matrix, nEqnBR, nEqnBL ); pNode->fNPsijM1 = spGetElement( matrix, nEqnBR, psiEqnTR ); pNode->fNNjM1 = spGetElement( matrix, nEqnBR, nEqnTR ); pNode->fPPsiiM1 = spGetElement( matrix, pEqnBR, psiEqnBL ); pNode->fPPiM1 = spGetElement( matrix, pEqnBR, pEqnBL ); pNode->fPPsijM1 = spGetElement( matrix, pEqnBR, psiEqnTR ); pNode->fPPjM1 = spGetElement( matrix, pEqnBR, pEqnTR ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiM1jM1 = spGetElement( matrix, nEqnBR, psiEqnTL ); pNode->fNNiM1jM1 = spGetElement( matrix, nEqnBR, nEqnTL ); pNode->fPPsiiM1jM1 = spGetElement( matrix, pEqnBR, psiEqnTL ); pNode->fPPiM1jM1 = spGetElement( matrix, pEqnBR, pEqnTL ); } } pNode = pElem->pBLNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnBL, psiEqnBR ); pNode->fPsiPsijM1 = spGetElement(matrix, psiEqnBL, psiEqnTL ); if ( pElem->elemType == SEMICON ) { /* continuity equation pointers */ pNode->fNPsiiP1 = spGetElement( matrix, nEqnBL, psiEqnBR ); pNode->fNNiP1 = spGetElement( matrix, nEqnBL, nEqnBR ); pNode->fNPsijM1 = spGetElement( matrix, nEqnBL, psiEqnTL ); pNode->fNNjM1 = spGetElement( matrix, nEqnBL, nEqnTL ); pNode->fPPsiiP1 = spGetElement( matrix, pEqnBL, psiEqnBR ); pNode->fPPiP1 = spGetElement( matrix, pEqnBL, pEqnBR ); pNode->fPPsijM1 = spGetElement( matrix, pEqnBL, psiEqnTL ); pNode->fPPjM1 = spGetElement( matrix, pEqnBL, pEqnTL ); /* Surface Mobility Model depends on diagonal node values */ if ( MobDeriv && SurfaceMobility && pElem->channel ) { pNode->fNPsiiP1jM1 = spGetElement( matrix, nEqnBL, psiEqnTR ); pNode->fNNiP1jM1 = spGetElement( matrix, nEqnBL, nEqnTR ); pNode->fPPsiiP1jM1 = spGetElement( matrix, pEqnBL, psiEqnTR ); pNode->fPPiP1jM1 = spGetElement( matrix, pEqnBL, pEqnTR ); } } } /* * Add terms for surface-field of inversion-layer mobility model. * Elements MUST be made from silicon for this to work. * No empty elements are allowed. * Don't need these pointers if SurfaceMobility isn't set. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: psiEqnInM = pElem->pBLNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pTRNode->psiEqn; break; case 1: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pBLNode->psiEqn; psiEqnOxM = pElem->pTRNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 2: psiEqnInM = pElem->pTLNode->psiEqn; psiEqnInP = pElem->pTRNode->psiEqn; psiEqnOxM = pElem->pBLNode->psiEqn; psiEqnOxP = pElem->pBRNode->psiEqn; break; case 3: psiEqnInM = pElem->pTRNode->psiEqn; psiEqnInP = pElem->pBRNode->psiEqn; psiEqnOxM = pElem->pTLNode->psiEqn; psiEqnOxP = pElem->pBLNode->psiEqn; break; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { for ( nIndex = 0; nIndex <= 3; nIndex++ ) { pNode = pElem->pNodes[ nIndex ]; psiEqn = pNode->psiEqn; nEqn = pNode->nEqn; pEqn = pNode->pEqn; if ( pCh->type % 2 == 0 ) { /* Vertical Slice */ if ( nIndex == 0 || nIndex == 3 ) { /* Left Side */ pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOxP1 = spGetElement( matrix, nEqn, psiEqnOxP ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOxP1 = spGetElement( matrix, pEqn, psiEqnOxP ); } else { /* Right Side */ pNode->fNPsiInM1 = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOxM1 = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP ); pNode->fPPsiInM1 = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOxM1 = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); } } else { /* Horizontal Slice */ if ( nIndex <= 1 ) { /* Top Side */ pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiInP1 = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOxP1 = spGetElement( matrix, nEqn, psiEqnOxP ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiInP1 = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOxP1 = spGetElement( matrix, pEqn, psiEqnOxP ); } else { /* Bottom Side */ pNode->fNPsiInM1 = spGetElement( matrix, nEqn, psiEqnInM ); pNode->fNPsiIn = spGetElement( matrix, nEqn, psiEqnInP ); pNode->fNPsiOxM1 = spGetElement( matrix, nEqn, psiEqnOxM ); pNode->fNPsiOx = spGetElement( matrix, nEqn, psiEqnOxP ); pNode->fPPsiInM1 = spGetElement( matrix, pEqn, psiEqnInM ); pNode->fPPsiIn = spGetElement( matrix, pEqn, psiEqnInP ); pNode->fPPsiOxM1 = spGetElement( matrix, pEqn, psiEqnOxM ); pNode->fPPsiOx = spGetElement( matrix, pEqn, psiEqnOxP ); } } } /* endfor nIndex */ pElem = pElem->pElems[ nextIndex ]; } /* endwhile pElem */ } /* endfor pCh */ } /* endif SurfaceMobility */ } /* * The Jacobian and Rhs are loaded by the following function. * Inputs are the transient analysis flag and the transient * information structure */ void TWO_sysLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsN, rhsP; double generation; double nConc, pConc; double perTime = 0.0; /* first compute the currents and derivatives */ TWO_commonTerms( pDevice, FALSE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { *(pNode->fPsiN) += dxdy; *(pNode->fPsiP) -= dxdy; *(pNode->fNPsi) -= dy * pHEdge->dJnDpsiP1 + dx * pVEdge->dJnDpsiP1; *(pNode->fPPsi) -= dy * pHEdge->dJpDpsiP1 + dx * pVEdge->dJpDpsiP1; nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ *(pNode->fNN) -= dxdy * pNode->dUdN; *(pNode->fNP) -= dxdy * pNode->dUdP; *(pNode->fPP) += dxdy * pNode->dUdP; *(pNode->fPN) += dxdy * pNode->dUdN; rhsN = - dxdy * pNode->uNet; rhsP = dxdy * pNode->uNet; if ( AvalancheGen ) { generation = TWOavalanche( pElem, pNode ); rhsN += dxdy * generation; rhsP -= dxdy * generation; } pRhs[ pNode->nEqn ] -= rhsN; pRhs[ pNode->pEqn ] -= rhsP; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { *(pNode->fNN) -= dxdy * perTime; *(pNode->fPP) += dxdy * perTime; pRhs[ pNode->nEqn ] += dxdy * pNode->dNdT; pRhs[ pNode->pEqn ] -= dxdy * pNode->dPdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pTEdge->jn + dx * pLEdge->jn; pRhs[ pNode->pEqn ] -= dy * pTEdge->jp + dx * pLEdge->jp; *(pNode->fNN) += dy * pTEdge->dJnDn + dx * pLEdge->dJnDn; *(pNode->fPP) += dy * pTEdge->dJpDp + dx * pLEdge->dJpDp; *(pNode->fNPsiiP1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pTEdge->dJnDnP1; *(pNode->fPPsiiP1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pTEdge->dJpDpP1; *(pNode->fNPsijP1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pLEdge->dJnDnP1; *(pNode->fPPsijP1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pLEdge->dJpDpP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pTEdge->jn + dx * pREdge->jn; pRhs[ pNode->pEqn ] -= -dy * pTEdge->jp + dx * pREdge->jp; *(pNode->fNN) += -dy * pTEdge->dJnDnP1 + dx * pREdge->dJnDn; *(pNode->fPP) += -dy * pTEdge->dJpDpP1 + dx * pREdge->dJpDp; *(pNode->fNPsiiM1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pTEdge->dJnDn; *(pNode->fPPsiiM1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pTEdge->dJpDp; *(pNode->fNPsijP1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pREdge->dJnDnP1; *(pNode->fPPsijP1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pREdge->dJpDpP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pBEdge->jn - dx * pREdge->jn; pRhs[ pNode->pEqn ] -= -dy * pBEdge->jp - dx * pREdge->jp; *(pNode->fNN) += -dy * pBEdge->dJnDnP1 - dx * pREdge->dJnDnP1; *(pNode->fPP) += -dy * pBEdge->dJpDpP1 - dx * pREdge->dJpDpP1; *(pNode->fNPsiiM1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pBEdge->dJnDn; *(pNode->fPPsiiM1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pBEdge->dJpDp; *(pNode->fNPsijM1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pREdge->dJnDn; *(pNode->fPPsijM1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pREdge->dJpDp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pBEdge->jn - dx * pLEdge->jn; pRhs[ pNode->pEqn ] -= dy * pBEdge->jp - dx * pLEdge->jp; *(pNode->fNN) += dy * pBEdge->dJnDn - dx * pLEdge->dJnDnP1; *(pNode->fPP) += dy * pBEdge->dJpDp - dx * pLEdge->dJpDpP1; *(pNode->fNPsiiP1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pBEdge->dJnDnP1; *(pNode->fPPsiiP1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pBEdge->dJpDpP1; *(pNode->fNPsijM1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pLEdge->dJnDn; *(pNode->fPPsijM1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pLEdge->dJpDp; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWO_mobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* this function used only for direct method ac analysis Used to load only the dc Jacobian matrix. Rhs is unaffected */ void TWO_jacLoad(TWOdevice *pDevice) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; TWOchannel *pCh; int index, eIndex; int nextIndex; /* index of node to find next element */ double dx, dy, dxdy, dyOverDx, dxOverDy; double ds; /* first compute the currents and derivatives */ TWO_commonTerms( pDevice, FALSE, FALSE, NULL ); /* zero the matrix */ spClear( pDevice->matrix ); for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsi) += dyOverDx + dxOverDy; if ( pElem->elemType == SEMICON ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } *(pNode->fPsiN) += dxdy; *(pNode->fPsiP) -= dxdy; *(pNode->fNPsi) -= dy * pHEdge->dJnDpsiP1 + dx * pVEdge->dJnDpsiP1; *(pNode->fPPsi) -= dy * pHEdge->dJpDpsiP1 + dx * pVEdge->dJpDpsiP1; /* Handle generation terms */ *(pNode->fNN) -= dxdy * pNode->dUdN; *(pNode->fNP) -= dxdy * pNode->dUdP; *(pNode->fPP) += dxdy * pNode->dUdP; *(pNode->fPN) += dxdy * pNode->dUdN; } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += dy * pTEdge->dJnDn + dx * pLEdge->dJnDn; *(pNode->fPP) += dy * pTEdge->dJpDp + dx * pLEdge->dJpDp; *(pNode->fNPsiiP1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pTEdge->dJnDnP1; *(pNode->fPPsiiP1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pTEdge->dJpDpP1; *(pNode->fNPsijP1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pLEdge->dJnDnP1; *(pNode->fPPsijP1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pLEdge->dJpDpP1; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijP1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += -dy * pTEdge->dJnDnP1 + dx * pREdge->dJnDn; *(pNode->fPP) += -dy * pTEdge->dJpDpP1 + dx * pREdge->dJpDp; *(pNode->fNPsiiM1) += dy * pTEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pTEdge->dJnDn; *(pNode->fPPsiiM1) += dy * pTEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pTEdge->dJpDp; *(pNode->fNPsijP1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjP1) += dx * pREdge->dJnDnP1; *(pNode->fPPsijP1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjP1) += dx * pREdge->dJpDpP1; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiM1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += -dy * pBEdge->dJnDnP1 - dx * pREdge->dJnDnP1; *(pNode->fPP) += -dy * pBEdge->dJpDpP1 - dx * pREdge->dJpDpP1; *(pNode->fNPsiiM1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiM1) -= dy * pBEdge->dJnDn; *(pNode->fPPsiiM1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiM1) -= dy * pBEdge->dJpDp; *(pNode->fNPsijM1) += dx * pREdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pREdge->dJnDn; *(pNode->fPPsijM1) += dx * pREdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pREdge->dJpDp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { *(pNode->fPsiPsiiP1) -= dyOverDx; *(pNode->fPsiPsijM1) -= dxOverDy; if ( pElem->elemType == SEMICON ) { *(pNode->fNN) += dy * pBEdge->dJnDn - dx * pLEdge->dJnDnP1; *(pNode->fPP) += dy * pBEdge->dJpDp - dx * pLEdge->dJpDpP1; *(pNode->fNPsiiP1) += dy * pBEdge->dJnDpsiP1; *(pNode->fNNiP1) += dy * pBEdge->dJnDnP1; *(pNode->fPPsiiP1) += dy * pBEdge->dJpDpsiP1; *(pNode->fPPiP1) += dy * pBEdge->dJpDpP1; *(pNode->fNPsijM1) += dx * pLEdge->dJnDpsiP1; *(pNode->fNNjM1) -= dx * pLEdge->dJnDn; *(pNode->fPPsijM1) += dx * pLEdge->dJpDpsiP1; *(pNode->fPPjM1) -= dx * pLEdge->dJpDp; } } } /* Calculate the Inversion-Layer Mobility Dependent Terms in Jac. */ if ( MobDeriv && SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { /* Find effective height of oxide element at interface. */ if ( pCh->type%2 == 0 ) { /* Vertical slice */ ds = pCh->pNElem->dy / pCh->pNElem->epsRel; } else { /* Horizontal slice */ ds = pCh->pNElem->dx / pCh->pNElem->epsRel; } pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWO_mobDeriv( pElem, pCh->type, ds ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCh != NULL */ } /* endif MobDeriv and SurfaceMobility */ } /* load only the Rhs vector */ void TWO_rhsLoad(TWOdevice *pDevice, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOnode *pNode; TWOedge *pHEdge, *pVEdge; TWOedge *pTEdge, *pBEdge, *pLEdge, *pREdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, dy, dxdy, dyOverDx, dxOverDy; double dPsiT, dPsiB, dPsiL, dPsiR; double rhsN, rhsP; double generation; double nConc, pConc; double perTime; /* first compute the currents */ TWO_commonTerms( pDevice, TRUE, tranAnalysis, info ); /* find reciprocal timestep */ if ( tranAnalysis ) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for ( index = 1 ; index <= pDevice->numEqns ; index++ ) { pRhs[ index ] = 0.0; } for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; dx = 0.5 * pElem->dx; dy = 0.5 * pElem->dy; dxdy = dx * dy; dxOverDy = 0.5 * pElem->epsRel * pElem->dxOverDy; dyOverDx = 0.5 * pElem->epsRel * pElem->dyOverDx; pTEdge = pElem->pTopEdge; pBEdge = pElem->pBotEdge; pLEdge = pElem->pLeftEdge; pREdge = pElem->pRightEdge; dPsiT = pTEdge->dPsi; dPsiB = pBEdge->dPsi; dPsiL = pLEdge->dPsi; dPsiR = pREdge->dPsi; /* load for all i,j */ for ( index = 0; index <= 3; index++ ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { if ( index <= 1 ) { pHEdge = pTEdge; } else { pHEdge = pBEdge; } if ( index == 0 || index == 3 ) { pVEdge = pLEdge; } else { pVEdge = pREdge; } /* Add surface state charges. */ pRhs[ pNode->psiEqn ] += dx * pHEdge->qf; pRhs[ pNode->psiEqn ] += dy * pVEdge->qf; if ( pElem->elemType == SEMICON ) { nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; pRhs[ pNode->psiEqn ] += dxdy * (pNode->netConc + pConc - nConc); /* Handle generation terms */ rhsN = - dxdy * pNode->uNet; rhsP = dxdy * pNode->uNet; if ( AvalancheGen ) { generation = TWOavalanche( pElem, pNode ); rhsN += dxdy * generation; rhsP -= dxdy * generation; } pRhs[ pNode->nEqn ] -= rhsN; pRhs[ pNode->pEqn ] -= rhsP; /* Handle dXdT continuity terms */ if ( tranAnalysis ) { pRhs[ pNode->nEqn ] += dxdy * pNode->dNdT; pRhs[ pNode->pEqn ] -= dxdy * pNode->dPdT; } } } } /* Handle neighbor and edge dependent terms */ pNode = pElem->pTLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiT - dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pTEdge->jn + dx * pLEdge->jn; pRhs[ pNode->pEqn ] -= dy * pTEdge->jp + dx * pLEdge->jp; } } pNode = pElem->pTRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiT - dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pTEdge->jn + dx * pREdge->jn; pRhs[ pNode->pEqn ] -= -dy * pTEdge->jp + dx * pREdge->jp; } } pNode = pElem->pBRNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= dyOverDx * dPsiB + dxOverDy * dPsiR; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= -dy * pBEdge->jn - dx * pREdge->jn; pRhs[ pNode->pEqn ] -= -dy * pBEdge->jp - dx * pREdge->jp; } } pNode = pElem->pBLNode; if ( pNode->nodeType != CONTACT ) { pRhs[ pNode->psiEqn ] -= -dyOverDx * dPsiB + dxOverDy * dPsiL; if ( pElem->elemType == SEMICON ) { pRhs[ pNode->nEqn ] -= dy * pBEdge->jn - dx * pLEdge->jn; pRhs[ pNode->pEqn ] -= dy * pBEdge->jp - dx * pLEdge->jp; } } } } /* * computation of current densities, recombination rates, * mobilities and their derivatives */ void TWO_commonTerms(TWOdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, TWOtranInfo *info) { TWOelem *pElem; TWOedge *pEdge; TWOnode *pNode; int index, eIndex; int nextIndex; /* index of node to find next element */ double psi1, psi2, nC, pC, nP1, pP1; double dPsiN, dPsiP; double bPsiN, dbPsiN, bMPsiN, dbMPsiN; double bPsiP, dbPsiP, bMPsiP, dbMPsiP; double muN, dMuN, muP, dMuP, rDx, rDy; double psi, nConc = 0.0, pConc = 0.0; double cnAug, cpAug; double eSurf = 0.0; /* For channel mobilities */ double qInt = 0.0; TWOchannel *pCh; /* evaluate all node (including recombination) and edge quantities */ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; cnAug = pElem->matlInfo->cAug[ELEC]; cpAug = pElem->matlInfo->cAug[HOLE]; for ( index = 0; index <= 3; index++ ) { if ( pElem->evalNodes[ index ] ) { pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi = pDevice->dcSolution[ pNode->psiEqn ]; if ( pElem->elemType == SEMICON ) { nConc = pDevice->dcSolution[ pNode->nEqn ]; pConc = pDevice->dcSolution[ pNode->pEqn ]; if ( Srh ) { recomb(nConc, pConc, pNode->tn, pNode->tp, cnAug, cpAug, pNode->nie, &pNode->uNet, &pNode->dUdN, &pNode->dUdP); } else { pNode->uNet = 0.0; pNode->dUdN = 0.0; pNode->dUdP = 0.0; } } } else { /* a contact node */ psi = pNode->psi; if ( pElem->elemType == SEMICON ) { nConc = pNode->nConc; pConc = pNode->pConc; } } /* store info in the state tables */ pDevice->devState0 [pNode->nodePsi] = psi; if ( pElem->elemType == SEMICON ) { pDevice->devState0 [pNode->nodeN] = nConc; pDevice->devState0 [pNode->nodeP] = pConc; if ( tranAnalysis && (pNode->nodeType != CONTACT) ) { pNode->dNdT = integrate( pDevice->devStates, info, pNode->nodeN ); pNode->dPdT = integrate( pDevice->devStates, info, pNode->nodeP ); } } } } for ( index = 0; index <= 3; index++ ) { if ( pElem->evalEdges[ index ] ) { pEdge = pElem->pEdges[ index ]; pNode = pElem->pNodes[ index ]; if ( pNode->nodeType != CONTACT ) { psi1 = pDevice->dcSolution[pNode->psiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pNodes[ (index + 1) % 4 ]; if ( pNode->nodeType != CONTACT ) { psi2 = pDevice->dcSolution[pNode->psiEqn]; } else { psi2 = pNode->psi; } if ( index <= 1 ) { pEdge->dPsi = psi2 - psi1; } else { pEdge->dPsi = psi1 - psi2; } pDevice->devState0 [pEdge->edgeDpsi] = pEdge->dPsi; if ( pElem->elemType == SEMICON ) { /* Calculate weighted driving forces - wdfn & wdfp for the edge */ dPsiN = pEdge->dPsi + pEdge->dCBand; dPsiP = pEdge->dPsi - pEdge->dVBand; bernoulli( dPsiN, &bPsiN, &dbPsiN, &bMPsiN, &dbMPsiN, !currentOnly ); bernoulli( dPsiP, &bPsiP, &dbPsiP, &bMPsiP, &dbMPsiP, !currentOnly); if ( index <= 1 ) { nC = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeN); nP1 = *(pDevice->devState0 + pElem->pNodes[ index+1 ]->nodeN); pC = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeP); pP1 = *(pDevice->devState0 + pElem->pNodes[ index+1 ]->nodeP); } else { nC = *(pDevice->devState0 + pElem->pNodes[(index+1)%4]->nodeN); nP1 = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeN); pC = *(pDevice->devState0 + pElem->pNodes[(index+1)%4]->nodeP); pP1 = *(pDevice->devState0 + pElem->pNodes[ index ]->nodeP); } pEdge->wdfn = bPsiN * nP1 - bMPsiN * nC; pEdge->wdfp = bPsiP * pC - bMPsiP * pP1; pEdge->jn = 0.0; pEdge->jp = 0.0; if ( !currentOnly ) { pEdge->dWnDpsiP1 = dbPsiN * nP1 - dbMPsiN * nC; pEdge->dWnDn = - bMPsiN; pEdge->dWnDnP1 = bPsiN; pEdge->dWpDpsiP1 = dbPsiP * pC - dbMPsiP * pP1; pEdge->dWpDp = bPsiP; pEdge->dWpDpP1 = - bMPsiP; pEdge->dJnDpsiP1 = 0.0; pEdge->dJnDn = 0.0; pEdge->dJnDnP1 = 0.0; pEdge->dJpDpsiP1 = 0.0; pEdge->dJpDp = 0.0; pEdge->dJpDpP1 = 0.0; } } } } } /* DAG: calculate mobilities for channel elems */ if ( SurfaceMobility ) { for ( pCh = pDevice->pChannel; pCh != NULL; pCh = pCh->next ) { pElem = pCh->pNElem; switch (pCh->type) { case 0: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pBotEdge->qf; break; case 1: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pLeftEdge->qf; break; case 2: eSurf = - 0.5 * (pElem->pLeftEdge->dPsi + pElem->pRightEdge->dPsi ) * pElem->epsRel / pElem->dy; qInt = 0.5 * pElem->pTopEdge->qf; break; case 3: eSurf = - 0.5 * (pElem->pTopEdge->dPsi + pElem->pBotEdge->dPsi ) * pElem->epsRel / pElem->dx; qInt = 0.5 * pElem->pRightEdge->qf; break; } eSurf += qInt; pElem = pCh->pSeed; nextIndex = (pCh->type + 2)%4; while (pElem && pElem->channel == pCh->id) { TWO_mobility( pElem, eSurf ); pElem = pElem->pElems[ nextIndex ]; } } /* endfor pCH != NULL */ } /* endif SurfaceMobility */ /* calculate the current densities assuming mobility value depend on Ex,Ey*/ for ( eIndex = 1; eIndex <= pDevice->numElems; eIndex++ ) { pElem = pDevice->elements[ eIndex ]; rDx = 1.0 / pElem->dx; rDy = 1.0 / pElem->dy; for ( index = 0; index <= 3; index++ ) { pEdge = pElem->pEdges[ index ]; /* calculate conductive currents */ if ( pElem->elemType == SEMICON ) { /* get mobility for this edge */ if ( !pElem->channel ) { /* Calculate mobility for non-channel elements */ muN = pElem->mun0; dMuN = 0.0; muP = pElem->mup0; dMuP = 0.0; dPsiN = pEdge->dPsi + pEdge->dCBand; dPsiP = pEdge->dPsi - pEdge->dVBand; if ( index%2 == 0 ) { MOBfieldDep( pElem->matlInfo, ELEC, - dPsiN * rDx, &muN, &dMuN ); MOBfieldDep( pElem->matlInfo, HOLE, - dPsiP * rDx, &muP, &dMuP ); } else { MOBfieldDep( pElem->matlInfo, ELEC, - dPsiN * rDy, &muN, &dMuN ); MOBfieldDep( pElem->matlInfo, HOLE, - dPsiP * rDy, &muP, &dMuP ); } } else { /* Retrieve previously calculated value. */ muN = pElem->mun; dMuN = 0.0; muP = pElem->mup; dMuP = 0.0; } switch ( index ) { case 0: muN *= pEdge->kPos * rDx; dMuN *= pEdge->kPos * rDx * rDx; muP *= pEdge->kPos * rDx; dMuP *= pEdge->kPos * rDx * rDx; break; case 1: muN *= pEdge->kNeg * rDy; dMuN *= pEdge->kNeg * rDy * rDy; muP *= pEdge->kNeg * rDy; dMuP *= pEdge->kNeg * rDy * rDy; break; case 2: muN *= pEdge->kNeg * rDx; dMuN *= pEdge->kNeg * rDx * rDx; muP *= pEdge->kNeg * rDx; dMuP *= pEdge->kNeg * rDx * rDx; break; case 3: muN *= pEdge->kPos * rDy; dMuN *= pEdge->kPos * rDy * rDy; muP *= pEdge->kPos * rDy; dMuP *= pEdge->kPos * rDy * rDy; break; } /* Now that the mobility for this edge is known, do current */ pEdge->jn += muN * pEdge->wdfn; pEdge->jp += muP * pEdge->wdfp; if ( !currentOnly ) { pEdge->dJnDpsiP1 += muN * pEdge->dWnDpsiP1; pEdge->dJnDn += muN * pEdge->dWnDn; pEdge->dJnDnP1 += muN * pEdge->dWnDnP1; pEdge->dJpDpsiP1 += muP * pEdge->dWpDpsiP1; pEdge->dJpDp += muP * pEdge->dWpDp; pEdge->dJpDpP1 += muP * pEdge->dWpDpP1; if ( MobDeriv && (!pElem->channel) ) { pEdge->dJnDpsiP1 -= dMuN * pEdge->wdfn; pEdge->dJpDpsiP1 -= dMuP * pEdge->wdfp; } } } /* calculate displacement current only once */ if ( pElem->evalEdges[ index ] ) { if ( tranAnalysis ) { if ( index == 0 || index == 2 ) { /* horizontal edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDx; } else { /* vertical edges */ pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * rDy; } } } } } } ngspice-26/src/ciderlib/Makefile.am0000644000265600020320000000017612264261473016635 0ustar andreasadmin## Process this file with automake EXTRA_DIST = notes SUBDIRS = input support oned twod MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/ciderlib/Makefile.in0000644000265600020320000004360512264261534016650 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ciderlib DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = notes SUBDIRS = input support oned twod MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ciderlib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ciderlib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/ciderlib/notes0000644000265600020320000000075012264261473015652 0ustar andreasadmin1. Crucial Difference between Spice3f1 and Spice3e2: The 'states' field in the ***instance structured has been moved. Belongs below the node id's in Spice3e2. 2. Crucial Differences between Spice3f2 and Spice3f1: Addition of DEVunSetup call to ***itf.h files The 3f2 input parser can't handle arithmetic operators in strings. A special call has been added in spiceitf/inpgval.c to specially parse strings. Quotes (either "foobar" or 'foobar') are stripped from the string. ngspice-26/src/ciderlib/oned/0000755000265600020320000000000012264261713015517 5ustar andreasadminngspice-26/src/ciderlib/oned/onecont.c0000644000265600020320000004560212264261473017342 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/spmatrix.h" #include "ngspice/macros.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/bernoull.h" /* functions to setup and solve the continuity equations */ /* Both continuity equations are solved */ void ONE_jacBuild(ONEdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; ONEelem *pElem; ONEnode *pNode; int index, eIndex; int psiEqn, nEqn, pEqn; /* scratch for deref'd eqn numbers */ int psiEqnL=0, nEqnL=0, pEqnL=0; int psiEqnR=0, nEqnR=0, pEqnR=0; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; /* first the self terms */ for (index = 0; index <= 1; index++) { pNode = pElem->pNodes[index]; /* get poisson pointer */ psiEqn = pNode->psiEqn; pNode->fPsiPsi = spGetElement(matrix, psiEqn, psiEqn); if (pElem->elemType == SEMICON) { /* get continuity-coupling terms */ nEqn = pNode->nEqn; pEqn = pNode->pEqn; /* pointers for additional terms */ pNode->fPsiN = spGetElement(matrix, psiEqn, nEqn); pNode->fPsiP = spGetElement(matrix, psiEqn, pEqn); pNode->fNPsi = spGetElement(matrix, nEqn, psiEqn); pNode->fNN = spGetElement(matrix, nEqn, nEqn); pNode->fNP = spGetElement(matrix, nEqn, pEqn); pNode->fPPsi = spGetElement(matrix, pEqn, psiEqn); pNode->fPP = spGetElement(matrix, pEqn, pEqn); pNode->fPN = spGetElement(matrix, pEqn, nEqn); } else { nEqn = 0; pEqn = 0; } /* save indices */ if (index == 0) { /* left node */ psiEqnL = psiEqn; nEqnL = nEqn; pEqnL = pEqn; } else { psiEqnR = psiEqn; nEqnR = nEqn; pEqnR = pEqn; } } /* now terms to couple to adjacent nodes */ pNode = pElem->pLeftNode; pNode->fPsiPsiiP1 = spGetElement(matrix, psiEqnL, psiEqnR); if (pElem->elemType == SEMICON) { /* pointers for additional terms */ pNode->fNPsiiP1 = spGetElement(matrix, nEqnL, psiEqnR); pNode->fNNiP1 = spGetElement(matrix, nEqnL, nEqnR); pNode->fPPsiiP1 = spGetElement(matrix, pEqnL, psiEqnR); pNode->fPPiP1 = spGetElement(matrix, pEqnL, pEqnR); if (AvalancheGen) { pNode->fNPiP1 = spGetElement(matrix, nEqnL, pEqnR); pNode->fPNiP1 = spGetElement(matrix, pEqnL, nEqnR); } } pNode = pElem->pRightNode; pNode->fPsiPsiiM1 = spGetElement(matrix, psiEqnR, psiEqnL); if (pElem->elemType == SEMICON) { /* pointers for additional terms */ pNode->fNPsiiM1 = spGetElement(matrix, nEqnR, psiEqnL); pNode->fNNiM1 = spGetElement(matrix, nEqnR, nEqnL); pNode->fPPsiiM1 = spGetElement(matrix, pEqnR, psiEqnL); pNode->fPPiM1 = spGetElement(matrix, pEqnR, pEqnL); if (AvalancheGen) { pNode->fNPiM1 = spGetElement(matrix, nEqnR, pEqnL); pNode->fPNiM1 = spGetElement(matrix, pEqnR, nEqnL); } } } } void ONE_sysLoad(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, rDx, dPsi; double generation; double perTime = 0.0; double fNd, fNa, fdNd, fdNa; double netConc, dNd, dNa, psi, nConc, pConc; /* first compute the currents and their derivatives */ ONE_commonTerms(pDevice, FALSE, tranAnalysis, info); /* find reciprocal timestep */ if (tranAnalysis) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for (index = 1; index <= pDevice->numEqns; index++) { pRhs[index] = 0.0; } /* zero the matrix */ spClear(pDevice->matrix); for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; dx = 0.5 * pElem->dx; rDx = pElem->epsRel * pElem->rDx; /* load for all i */ for (index = 0; index <= 1; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { *(pNode->fPsiPsi) += rDx; pRhs[pNode->psiEqn] += pNode->qf; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; netConc = pNode->netConc; dNd = 0.0; dNa = 0.0; psi = pDevice->devState0 [pNode->nodePsi]; nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; if (FreezeOut) { ONE_freezeOut(pNode, nConc, pConc, &fNd, &fNa, &fdNd, &fdNa); netConc = pNode->nd * fNd - pNode->na * fNa; dNd = pNode->nd * fdNd; dNa = pNode->na * fdNa; } *(pNode->fPsiN) += dx * (1.0 - dNd); *(pNode->fPsiP) -= dx * (1.0 - dNa); *(pNode->fNPsi) -= pEdge->dJnDpsiP1; *(pNode->fPPsi) -= pEdge->dJpDpsiP1; pRhs[pNode->psiEqn] += dx * (netConc + pConc - nConc); /* Handle generation terms */ *(pNode->fNN) -= dx * pNode->dUdN; *(pNode->fNP) -= dx * pNode->dUdP; *(pNode->fPP) += dx * pNode->dUdP; *(pNode->fPN) += dx * pNode->dUdN; pRhs[pNode->nEqn] -= -dx * pNode->uNet; pRhs[pNode->pEqn] -= dx * pNode->uNet; /* Handle dXdT continuity terms */ if (tranAnalysis) { *(pNode->fNN) -= dx * perTime; *(pNode->fPP) += dx * perTime; pRhs[pNode->nEqn] += dx * pNode->dNdT; pRhs[pNode->pEqn] -= dx * pNode->dPdT; } /* Take care of base contact if necessary */ /* eg holds the base edge mu/dx */ if (pNode->baseType == N_TYPE) { pRhs[pNode->nEqn] += 0.5 * pNode->eg * nConc * (pNode->vbe - psi + log(nConc / pNode->nie)); *(pNode->fNPsi) += 0.5 * pNode->eg * nConc; *(pNode->fNN) -= 0.5 * pNode->eg * (pNode->vbe - psi + log(nConc / pNode->nie) + 1.0); } else if (pNode->baseType == P_TYPE) { pRhs[pNode->pEqn] += 0.5 * pNode->eg * pConc * (pNode->vbe - psi - log(pConc / pNode->nie)); *(pNode->fPPsi) += 0.5 * pNode->eg * pConc; *(pNode->fPP) -= 0.5 * pNode->eg * (pNode->vbe - psi - log(pConc / pNode->nie) - 1.0); } } } } pEdge = pElem->pEdge; dPsi = pEdge->dPsi; pNode = pElem->pLeftNode; if (pNode->nodeType != CONTACT) { pRhs[pNode->psiEqn] += rDx * dPsi; *(pNode->fPsiPsiiP1) -= rDx; if (pElem->elemType == SEMICON) { pRhs[pNode->nEqn] -= pEdge->jn; pRhs[pNode->pEqn] -= pEdge->jp; *(pNode->fNN) += pEdge->dJnDn; *(pNode->fPP) += pEdge->dJpDp; *(pNode->fNPsiiP1) += pEdge->dJnDpsiP1; *(pNode->fNNiP1) += pEdge->dJnDnP1; *(pNode->fPPsiiP1) += pEdge->dJpDpsiP1; *(pNode->fPPiP1) += pEdge->dJpDpP1; } } pNode = pElem->pRightNode; if (pNode->nodeType != CONTACT) { pRhs[pNode->psiEqn] -= rDx * dPsi; *(pNode->fPsiPsiiM1) -= rDx; if (pElem->elemType == SEMICON) { pRhs[pNode->nEqn] += pEdge->jn; pRhs[pNode->pEqn] += pEdge->jp; *(pNode->fNN) -= pEdge->dJnDnP1; *(pNode->fPP) -= pEdge->dJpDpP1; *(pNode->fNPsiiM1) += pEdge->dJnDpsiP1; *(pNode->fNNiM1) -= pEdge->dJnDn; *(pNode->fPPsiiM1) += pEdge->dJpDpsiP1; *(pNode->fPPiM1) -= pEdge->dJpDp; } } } if (AvalancheGen) { /* add the generation terms */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { generation = ONEavalanche(FALSE, pDevice, pNode); pRhs[pNode->nEqn] -= generation; pRhs[pNode->pEqn] += generation; } } } } } } void ONE_jacLoad(ONEdevice *pDevice) { /* used only for ac analysis */ ONEelem *pElem; ONEnode *pNode, *pNode1; ONEedge *pEdge; int index, eIndex; double dx, rDx, dPsi; double generation; double fNd, fNa, fdNd, fdNa; double dNd, dNa, psi, nConc, pConc; /* first compute the currents and their derivatives */ ONE_commonTerms(pDevice, FALSE, FALSE, NULL); /* zero the matrix */ spClear(pDevice->matrix); for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; dx = 0.5 * pElem->dx; rDx = pElem->epsRel * pElem->rDx; /* load for all i */ for (index = 0; index <= 1; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { *(pNode->fPsiPsi) += rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; dNd = 0.0; dNa = 0.0; psi = pDevice->devState0 [pNode->nodePsi]; nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; if (FreezeOut) { ONE_freezeOut(pNode, nConc, pConc, &fNd, &fNa, &fdNd, &fdNa); dNd = pNode->nd * fdNd; dNa = pNode->na * fdNa; } *(pNode->fPsiN) += dx * (1.0 - dNd); *(pNode->fPsiP) -= dx * (1.0 - dNa); *(pNode->fNPsi) -= pEdge->dJnDpsiP1; *(pNode->fPPsi) -= pEdge->dJpDpsiP1; if (pNode->baseType == N_TYPE) { *(pNode->fNPsi) += 0.5 * nConc * pNode->eg; *(pNode->fNN) -= 0.5 * pNode->eg * (pNode->vbe - psi + log(nConc / pNode->nie) + 1.0); } if (pNode->baseType == P_TYPE) { *(pNode->fPPsi) += 0.5 * pConc * pNode->eg; *(pNode->fPP) -= 0.5 * pNode->eg * (pNode->vbe - psi - log(pConc / pNode->nie) - 1.0); } } } } pNode = pElem->pLeftNode; if (pNode->nodeType != CONTACT) { pEdge = pElem->pEdge; dPsi = pEdge->dPsi; if (pElem->elemType == SEMICON) { *(pNode->fNN) += pEdge->dJnDn - dx * pNode->dUdN; *(pNode->fNP) -= dx * pNode->dUdP; *(pNode->fPP) += pEdge->dJpDp + dx * pNode->dUdP; *(pNode->fPN) += dx * pNode->dUdN; } pNode1 = pElem->pRightNode; if (pNode1->nodeType != CONTACT) { *(pNode->fPsiPsiiP1) -= rDx; if (pElem->elemType == SEMICON) { *(pNode->fNPsiiP1) += pEdge->dJnDpsiP1; *(pNode->fNNiP1) += pEdge->dJnDnP1; *(pNode->fPPsiiP1) += pEdge->dJpDpsiP1; *(pNode->fPPiP1) += pEdge->dJpDpP1; } } } pNode = pElem->pRightNode; if (pNode->nodeType != CONTACT) { pEdge = pElem->pEdge; dPsi = pEdge->dPsi; if (pElem->elemType == SEMICON) { *(pNode->fNN) += -pEdge->dJnDnP1 - dx * pNode->dUdN; *(pNode->fNP) -= dx * pNode->dUdP; *(pNode->fPP) += -pEdge->dJpDpP1 + dx * pNode->dUdP; *(pNode->fPN) += dx * pNode->dUdN; } pNode1 = pElem->pLeftNode; if (pNode1->nodeType != CONTACT) { *(pNode->fPsiPsiiM1) -= rDx; if (pElem->elemType == SEMICON) { *(pNode->fNPsiiM1) += pEdge->dJnDpsiP1; *(pNode->fNNiM1) -= pEdge->dJnDn; *(pNode->fPPsiiM1) += pEdge->dJpDpsiP1; *(pNode->fPPiM1) -= pEdge->dJpDp; } } } } if (AvalancheGen) { /* add the generation terms */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { generation = ONEavalanche(FALSE, pDevice, pNode); } } } } } } void ONE_rhsLoad(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; int index, eIndex; double *pRhs = pDevice->rhs; double dx, rDx, dPsi; double generation; double perTime; double fNd, fNa, fdNd, fdNa; double netConc, dNd, dNa, psi, nConc, pConc; /* first compute the currents and their derivatives */ ONE_commonTerms(pDevice, FALSE, tranAnalysis, info); /* find reciprocal timestep */ if (tranAnalysis) { perTime = info->intCoeff[0]; } /* zero the rhs vector */ for (index = 1; index <= pDevice->numEqns; index++) { pRhs[index] = 0.0; } for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; dx = 0.5 * pElem->dx; rDx = pElem->epsRel * pElem->rDx; /* load for all i */ for (index = 0; index <= 1; index++) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { pRhs[pNode->psiEqn] += pNode->qf; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; netConc = pNode->netConc; dNd = 0.0; dNa = 0.0; psi = pDevice->devState0 [pNode->nodePsi]; nConc = pDevice->devState0 [pNode->nodeN]; pConc = pDevice->devState0 [pNode->nodeP]; if (FreezeOut) { ONE_freezeOut(pNode, nConc, pConc, &fNd, &fNa, &fdNd, &fdNa); netConc = pNode->nd * fNd - pNode->na * fNa; dNd = pNode->nd * fdNd; dNa = pNode->na * fdNa; } pRhs[pNode->psiEqn] += dx * (netConc + pConc - nConc); /* Handle generation terms */ pRhs[pNode->nEqn] -= -dx * pNode->uNet; pRhs[pNode->pEqn] -= dx * pNode->uNet; /* Handle dXdT continuity terms */ if (tranAnalysis) { pRhs[pNode->nEqn] += dx * pNode->dNdT; pRhs[pNode->pEqn] -= dx * pNode->dPdT; } /* Take care of base contact if necessary */ /* eg holds the base edge mu/dx */ if (pNode->baseType == N_TYPE) { pRhs[pNode->nEqn] += 0.5 * pNode->eg * nConc * (pNode->vbe - psi + log(nConc / pNode->nie)); } else if (pNode->baseType == P_TYPE) { pRhs[pNode->pEqn] += 0.5 * pNode->eg * pConc * (pNode->vbe - psi - log(pConc / pNode->nie)); } } } } pEdge = pElem->pEdge; dPsi = pEdge->dPsi; pNode = pElem->pLeftNode; if (pNode->nodeType != CONTACT) { pRhs[pNode->psiEqn] += rDx * dPsi; if (pElem->elemType == SEMICON) { pRhs[pNode->nEqn] -= pEdge->jn; pRhs[pNode->pEqn] -= pEdge->jp; } } pNode = pElem->pRightNode; if (pNode->nodeType != CONTACT) { pRhs[pNode->psiEqn] -= rDx * dPsi; if (pElem->elemType == SEMICON) { pRhs[pNode->nEqn] += pEdge->jn; pRhs[pNode->pEqn] += pEdge->jp; } } } if (AvalancheGen) { /* add the generation terms */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { generation = ONEavalanche(TRUE, pDevice, pNode); pRhs[pNode->nEqn] -= generation; pRhs[pNode->pEqn] += generation; } } } } } } void ONE_commonTerms(ONEdevice *pDevice, BOOLEAN currentOnly, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEelem *pElem; ONEedge *pEdge; ONEnode *pNode; int index, eIndex; double psi1, psi2, psi, nConc=0.0, pConc=0.0, nC, pC, nP1, pP1; double dPsiN, dPsiP; double bPsiN, dbPsiN, bMPsiN, dbMPsiN; double bPsiP, dbPsiP, bMPsiP, dbMPsiP; double mun, dMun, mup, dMup; double conc1, conc2; double cnAug, cpAug; /* evaluate all node (including recombination) and edge quantities */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; cnAug = pElem->matlInfo->cAug[ELEC]; cpAug = pElem->matlInfo->cAug[HOLE]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { psi = pDevice->dcSolution[pNode->psiEqn]; if (pElem->elemType == SEMICON) { nConc = pDevice->dcSolution[pNode->nEqn]; pConc = pDevice->dcSolution[pNode->pEqn]; if (Srh) { recomb(nConc, pConc, pNode->tn, pNode->tp, cnAug, cpAug, pNode->nie, &pNode->uNet, &pNode->dUdN, &pNode->dUdP); } else { pNode->uNet = 0.0; pNode->dUdN = 0.0; pNode->dUdP = 0.0; } if (pNode->baseType == P_TYPE && pConc <= 0.0) { pConc = pNode->na; } else if (pNode->baseType == N_TYPE && nConc <= 0.0) { nConc = pNode->nd; } } } else { /* a contact node */ psi = pNode->psi; if (pElem->elemType == SEMICON) { nConc = pNode->nConc; pConc = pNode->pConc; } } /* store info in the state tables */ pDevice->devState0 [pNode->nodePsi] = psi; if (pElem->elemType == SEMICON) { pDevice->devState0 [pNode->nodeN] = nConc; pDevice->devState0 [pNode->nodeP] = pConc; if (tranAnalysis && pNode->nodeType != CONTACT) { pNode->dNdT = integrate(pDevice->devStates, info, pNode->nodeN); pNode->dPdT = integrate(pDevice->devStates, info, pNode->nodeP); } } } } pEdge = pElem->pEdge; pNode = pElem->pLeftNode; if (pNode->nodeType != CONTACT) { psi1 = pDevice->dcSolution[pNode->psiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pRightNode; if (pNode->nodeType != CONTACT) { psi2 = pDevice->dcSolution[pNode->psiEqn]; } else { psi2 = pNode->psi; } pEdge->dPsi = psi2 - psi1; pDevice->devState0 [pEdge->edgeDpsi] = pEdge->dPsi; } /* calculate the current densities and mobility values */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; pEdge = pElem->pEdge; if (pElem->elemType == SEMICON) { dPsiN = pEdge->dPsi + pEdge->dCBand; dPsiP = pEdge->dPsi - pEdge->dVBand; bernoulli(dPsiN, &bPsiN, &dbPsiN, &bMPsiN, &dbMPsiN, !currentOnly); bernoulli(dPsiP, &bPsiP, &dbPsiP, &bMPsiP, &dbMPsiP, !currentOnly); nC = pDevice->devState0 [pElem->pLeftNode->nodeN]; nP1 = pDevice->devState0 [pElem->pRightNode->nodeN]; pC = pDevice->devState0 [pElem->pLeftNode->nodeP]; pP1 = pDevice->devState0 [pElem->pRightNode->nodeP]; conc1 = pElem->pLeftNode->totalConc; conc2 = pElem->pRightNode->totalConc; pEdge->jn = (bPsiN * nP1 - bMPsiN * nC); pEdge->jp = (bPsiP * pC - bMPsiP * pP1); mun = pEdge->mun; dMun = 0.0; mup = pEdge->mup; dMup = 0.0; MOBfieldDep(pElem->matlInfo, ELEC, dPsiN * pElem->rDx, &mun, &dMun); MOBfieldDep(pElem->matlInfo, HOLE, dPsiP * pElem->rDx, &mup, &dMup); mun *= pElem->rDx; dMun *= pElem->rDx * pElem->rDx; mup *= pElem->rDx; dMup *= pElem->rDx * pElem->rDx; /* * The base continuity equation makes use of mu/dx in eg. The base * length has already been calculated and converted to normalized, * reciprocal form during setup. The name should be changed, but that's * a big hassle. */ for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->baseType == N_TYPE) { pNode->eg = pEdge->mun * pDevice->baseLength; } else if (pNode->baseType == P_TYPE) { pNode->eg = pEdge->mup * pDevice->baseLength; } } } pEdge->jn *= mun; pEdge->jp *= mup; if (!currentOnly) { if (dMun == 0.0) { pEdge->dJnDpsiP1 = mun * (dbPsiN * nP1 - dbMPsiN * nC); } else { pEdge->dJnDpsiP1 = dMun * (bPsiN * nP1 - bMPsiN * nC) + mun * (dbPsiN * nP1 - dbMPsiN * nC); } pEdge->dJnDn = -mun * bMPsiN; pEdge->dJnDnP1 = mun * bPsiN; if (dMup == 0.0) { pEdge->dJpDpsiP1 = mup * (dbPsiP * pC - dbMPsiP * pP1); } else { pEdge->dJpDpsiP1 = dMup * (bPsiP * pC - bMPsiP * pP1) + mup * (dbPsiP * pC - dbMPsiP * pP1); } pEdge->dJpDp = mup * bPsiP; pEdge->dJpDpP1 = -mup * bMPsiP; } } if (tranAnalysis) { pEdge->jd = -integrate(pDevice->devStates, info, pEdge->edgeDpsi) * pElem->rDx; } } } ngspice-26/src/ciderlib/oned/onemesh.c0000644000265600020320000002241012264261473017323 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/macros.h" #include "onedext.h" #include "oneddefs.h" /* Forward Declarations */ /* static void ONEresetEvalFlag(ONEdevice *); sjb - not used */ void ONEbuildMesh(ONEdevice *pDevice, ONEcoord *pCoord, ONEdomain *pDomain, ONEmaterial *pMaterial) { int index, i; int elemType; double xPos; ONEcoord *pC; ONEnode *pNode; ONEdomain *pD; ONEelem *pElem; ONEmaterial *pM; int poiEqn, numEqn; ONEedge *pEdge; ONEnode **nodeArray=NULL; BOOLEAN error = FALSE; /* generate the work array for setting up nodes and elements */ XCALLOC(nodeArray, ONEnode *, 1 + pDevice->numNodes); for (pC = pCoord; pC != NULL; pC = pC->next) { xPos = pC->location; XCALLOC(pNode, ONEnode, 1); pNode->x = xPos; pNode->nodeI = pC->number; nodeArray[pNode->nodeI] = pNode; } /* mark the domain info on the nodes */ if (pDomain == NULL) { fprintf(stderr, "Error: domains not defined for device\n"); exit(-1); } for (pD = pDomain; pD != NULL; pD = pD->next) { for (pM = pMaterial; pM != NULL; pM = pM->next) { if (pD->material == pM->id) { break; } } elemType = pM->type; for (index = pD->ixLo; index <= pD->ixHi; index++) { pNode = nodeArray[index]; if (!pNode->nodeType) { pNode->nodeType = elemType; } } } /* * check to see if a domain has been defined for all nodes. if not flag an * error message */ for (index = 2; index < pDevice->numNodes; index++) { pNode = nodeArray[index]; if (!pNode->nodeType) { printf("Error: No domain defined for node %d\n", pNode->nodeI); error = TRUE; } } if (error) { /* nodes with undefined domains -- exit */ exit(-1); } /* mark the first and last nodes to be contact nodes */ nodeArray[1]->nodeType = CONTACT; nodeArray[pDevice->numNodes]->nodeType = CONTACT; /* generate the elements and the edges */ for (index = 1; index < pDevice->numNodes; index++) { XCALLOC(pElem, ONEelem, 1); XCALLOC(pEdge, ONEedge, 1); pElem->pEdge = pEdge; pElem->pLeftNode = nodeArray[index]; pElem->pRightNode = nodeArray[index + 1]; pDevice->elemArray[index] = pElem; } /* now setup the nodes to which an element belongs */ for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; pElem->pLeftNode->pRightElem = pElem; pElem->pRightNode->pLeftElem = pElem; if (index > 1) { pElem->pLeftElem = pDevice->elemArray[index - 1]; } if (index < pDevice->numNodes - 1) { pElem->pRightElem = pDevice->elemArray[index + 1]; } } /* mark the domain info on the elements */ for (pD = pDomain; pD != NULL; pD = pD->next) { for (pM = pMaterial; pM != NULL; pM = pM->next) { if (pD->material == pM->id) { break; } } elemType = pM->type; for (index = pD->ixLo; index < pD->ixHi; index++) { pElem = pDevice->elemArray[index]; pElem->domain = pD->id; pElem->elemType = elemType; pElem->matlInfo = pM; } } /* identify the interface nodes */ for (index = 2; index < pDevice->numNodes; index++) { pNode = nodeArray[index]; if (pNode->pLeftElem->elemType != pNode->pRightElem->elemType) { /* an interface node */ pNode->nodeType = INTERFACE; } } /* now mark the nodes to be evaluated */ /* all interface nodes marked in silicon elements */ for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; pElem->dx = pElem->pRightNode->x - pElem->pLeftNode->x; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; pElem->evalNodes[i] = FALSE; if (pElem->elemType == INSULATOR) { if ((!pNode->evaluated) && (pNode->nodeType != INTERFACE)) { /* a non interface node in oxide domain */ pNode->evaluated = TRUE; pElem->evalNodes[i] = TRUE; } } if (pElem->elemType == SEMICON) { if (!pNode->evaluated) { pNode->evaluated = TRUE; pElem->evalNodes[i] = TRUE; } } } } /* set up the equation number for the nodes */ poiEqn = numEqn = 1; for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { pNode->poiEqn = poiEqn++; pNode->psiEqn = numEqn; if (pElem->elemType == INSULATOR) { numEqn += 1; /* only poisson's equation */ } else { pNode->nEqn = numEqn + 1; pNode->pEqn = numEqn + 2; numEqn += 3; } } else { /* this is a contact node */ pNode->poiEqn = 0; pNode->psiEqn = 0; pNode->nEqn = 0; pNode->pEqn = 0; } /* * fprintf(stdout,"NODE: %d %d\n",pNode->nodeI,pNode->poiEqn); */ } } } pDevice->dimEquil = poiEqn; pDevice->dimBias = numEqn; /* * ONEprnMesh( pDevice ); */ } /* * We have a separate function for this, so that the setup routines can reset * the state pointers without rebuilding the entire mesh. */ void ONEgetStatePointers(ONEdevice *pDevice, int *numStates) { int eIndex, nIndex; ONEelem *pElem; ONEnode *pNode; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->nodeState = *numStates; *numStates += ONEnumNodeStates; } } pElem->pEdge->edgeState = *numStates; *numStates += ONEnumEdgeStates; } } /* adjust the base contact to be the position of maximum density */ /* index EB and BC are the indexes for the eb, bc junctions */ void adjustBaseContact(ONEdevice *pDevice, int indexEB, int indexBC) { int index, i, newBaseIndex, midPoint; double maxDensity; ONEnode *pNode; ONEelem *pElem; ONEnode *pBaseNode = pDevice->elemArray[pDevice->baseIndex]->pNodes[0]; /* Initialize the base contact to be the center of the two junctions */ /* This should take care of uniform dopings. */ midPoint = (indexEB + indexBC) / 2; newBaseIndex = midPoint; if (pBaseNode->baseType == P_TYPE) { maxDensity = pDevice->elemArray[midPoint]->pNodes[0]->pConc; for (index = indexEB; index < indexBC; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->pConc > maxDensity) { maxDensity = pNode->pConc; newBaseIndex = index; } } } } else if (pBaseNode->baseType == N_TYPE) { maxDensity = pDevice->elemArray[midPoint]->pNodes[0]->nConc; for (index = indexEB; index < indexBC; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nConc > maxDensity) { maxDensity = pNode->nConc; newBaseIndex = index; } } } } else { printf("adjustBaseContact: unknown base type %d\n", pBaseNode->baseType); } /* at the conclusion of this loop have the point of max density */ if (pDevice->baseIndex != newBaseIndex) { /* so change the position */ pNode = pDevice->elemArray[newBaseIndex]->pNodes[0]; pNode->baseType = pBaseNode->baseType; pNode->vbe = pBaseNode->vbe; pBaseNode->baseType = FALSE; pBaseNode->vbe = 0.0; pDevice->baseIndex = newBaseIndex; } } void NBJTjunctions(ONEdevice *pDevice, int *indexEB, int *indexBC) { int index; double conc1, conc2; BOOLEAN findFirstJunction = TRUE; BOOLEAN notFound = TRUE; for (index = 1; (index < pDevice->numNodes) && (notFound); index++) { conc1 = pDevice->elemArray[index]->pNodes[0]->netConc; conc2 = pDevice->elemArray[index]->pNodes[1]->netConc; if ((conc1 * conc2 < 0.0) && (findFirstJunction)) { *indexEB = index; findFirstJunction = FALSE; } else if ((conc1 * conc2 < 0.0) && (!findFirstJunction)) { *indexBC = index; notFound = FALSE; } } if (notFound) { fprintf(stderr, "BJT: Device does not have two junctions!\n"); exit(-1); } } void ONEprnMesh(ONEdevice *pDevice) { int eIndex, index; ONEelem *pElem; ONEnode *pNode; char *name; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; fprintf(stderr, "elem %5d:\n", eIndex); for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; switch (pNode->nodeType) { case SEMICON: name = "semiconductor"; break; case INSULATOR: name = "insulator"; break; case CONTACT: name = "contact"; break; case SCHOTTKY: name = "schottky"; break; case INTERFACE: name = "interface"; break; default: name = "unknown"; break; } fprintf(stderr, "node %5d: %s %5d\n", index, name, pNode->nodeI); } } } } /* sjb - not used static void ONEresetEvalFlag(ONEdevice *pDevice) { int index, eIndex; ONEelem *pElem; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { pElem->pNodes[index]->evaluated = FALSE; } pElem->pEdge->evaluated = FALSE; } } */ ngspice-26/src/ciderlib/oned/oneread.c0000644000265600020320000000472712264261473017315 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Functions needed to read solutions for 1D devices. */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onedev.h" #include "ngspice/onemesh.h" #include "ngspice/plot.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" int ONEreadState(ONEdevice *pDevice, char *fileName, int numVolts, double *pV1, double *pV2 ) /* fileName | File containing raw data */ /* int numVolts | Number of voltage differences */ /* double *pV1, *pV2 | Pointer to return them in */ { int dataLength; int index, i; ONEnode **nodeArray=NULL; ONEnode *pNode; ONEelem *pElem; double refPsi = 0.0; double *psiData, *nData, *pData; double *vData[2]; struct plot *stateDB; struct plot *voltsDB; char voltName[80]; stateDB = DBread( fileName ); if (stateDB == NULL) return (-1); voltsDB = stateDB->pl_next; if (voltsDB == NULL) return (-1); for (i=0; i < numVolts; i++ ) { sprintf( voltName, "v%d%d", i+1, numVolts+1 ); vData[i] = DBgetData( voltsDB, voltName, 1 ); if (vData[i] == NULL) return (-1); } dataLength = pDevice->numNodes; psiData = DBgetData( stateDB, "psi", dataLength ); nData = DBgetData( stateDB, "n", dataLength ); pData = DBgetData( stateDB, "p", dataLength ); if (psiData == NULL || nData == NULL || pData == NULL) return (-1); if (pV1 != NULL) { *pV1 = vData[0][0]; FREE( vData[0] ); } if (pV2 != NULL) { *pV2 = vData[1][0]; FREE( vData[1] ); } /* generate the work array for copying node info */ XCALLOC(nodeArray, ONEnode *, 1 + pDevice->numNodes); /* store the nodes in this work array and print out later */ for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (refPsi == 0.0 && pElem->matlInfo->type == SEMICON) { refPsi = pElem->matlInfo->refPsi; } for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; nodeArray[pNode->nodeI] = pNode; } } } for (index = 1; index <= pDevice->numNodes; index++) { pNode = nodeArray[index]; pNode->psi = psiData[index-1]/VNorm + refPsi; pNode->nConc = nData[index-1]/NNorm; pNode->pConc = pData[index-1]/NNorm; } FREE(nodeArray); FREE(psiData); FREE(nData); FREE(pData); return (0); } ngspice-26/src/ciderlib/oned/onepoiss.c0000644000265600020320000001101412264261473017522 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/spmatrix.h" /* Functions to setup and solve the 1D poisson equation. */ void ONEQjacBuild(ONEdevice *pDevice) { SMPmatrix *matrix = pDevice->matrix; ONEelem *pElem; ONEnode *pNode, *pNode1; int index; for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; pNode = pElem->pLeftNode; pNode->fPsiPsi = spGetElement(matrix, pNode->poiEqn, pNode->poiEqn); pNode1 = pElem->pRightNode; pNode->fPsiPsiiP1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn); pNode = pElem->pRightNode; pNode->fPsiPsi = spGetElement(matrix, pNode->poiEqn, pNode->poiEqn); pNode1 = pElem->pLeftNode; pNode->fPsiPsiiM1 = spGetElement(matrix, pNode->poiEqn, pNode1->poiEqn); } } void ONEQsysLoad(ONEdevice *pDevice) { ONEelem *pElem; ONEnode *pNode; int index, i; double *pRhs = pDevice->rhs; double rDx, dPsi; double netConc, dNetConc; double fNd, fdNd, fNa, fdNa; ONEQcommonTerms(pDevice); /* zero the rhs vector */ for (index = 1; index <= pDevice->numEqns; index++) { pRhs[index] = 0.0; } /* zero the matrix */ spClear(pDevice->matrix); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; rDx = pElem->epsRel * pElem->rDx; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { *(pNode->fPsiPsi) += rDx; pRhs[pNode->poiEqn] += pNode->qf; if (pElem->elemType == SEMICON) { netConc = pNode->netConc; dNetConc = 0.0; if (FreezeOut) { ONEQfreezeOut(pNode, &fNd, &fNa, &fdNd, &fdNa); netConc = pNode->nd * fNd - pNode->na * fNa; dNetConc = pNode->nd * fdNd - pNode->na * fdNa; } *(pNode->fPsiPsi) += 0.5 * pElem->dx * (pNode->nConc + pNode->pConc - dNetConc); pRhs[pNode->poiEqn] += 0.5 * pElem->dx * (netConc + pNode->pConc - pNode->nConc); } } } dPsi = pElem->pEdge->dPsi; pNode = pElem->pLeftNode; pRhs[pNode->poiEqn] += rDx * dPsi; *(pNode->fPsiPsiiP1) -= rDx; pNode = pElem->pRightNode; pRhs[pNode->poiEqn] -= rDx * dPsi; *(pNode->fPsiPsiiM1) -= rDx; } } void ONEQrhsLoad(ONEdevice *pDevice) { ONEelem *pElem; ONEnode *pNode; int index, i; double *pRhs = pDevice->rhs; double rDx, dPsi; double fNd, fNa, fdNd, fdNa; double netConc; ONEQcommonTerms(pDevice); /* zero the rhs vector */ for (index = 1; index <= pDevice->numEqns; index++) { pRhs[index] = 0.0; } for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; rDx = pElem->epsRel * pElem->rDx; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { pRhs[pNode->poiEqn] += pNode->qf; if (pElem->elemType == SEMICON) { netConc = pNode->netConc; if (FreezeOut) { ONEQfreezeOut(pNode, &fNd, &fNa, &fdNd, &fdNa); netConc = pNode->nd * fNd - pNode->na * fNa; } pRhs[pNode->poiEqn] += 0.5 * pElem->dx * (netConc + pNode->pConc - pNode->nConc); } } } dPsi = pElem->pEdge->dPsi; pNode = pElem->pLeftNode; pRhs[pNode->poiEqn] += rDx * dPsi; pNode = pElem->pRightNode; pRhs[pNode->poiEqn] -= rDx * dPsi; } } void ONEQcommonTerms(ONEdevice *pDevice) { ONEelem *pElem; ONEedge *pEdge; ONEnode *pNode; int i, index; double psi1, psi2, refPsi; for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; refPsi = pElem->matlInfo->refPsi; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { pNode->psi = pDevice->dcSolution[pNode->poiEqn]; if (pElem->elemType == SEMICON) { pNode->nConc = pNode->nie * exp(pNode->psi - refPsi); pNode->pConc = pNode->nie * exp(-pNode->psi + refPsi); } } } } pEdge = pElem->pEdge; pNode = pElem->pNodes[0]; if (pNode->nodeType != CONTACT) { psi1 = pDevice->dcSolution[pNode->poiEqn]; } else { psi1 = pNode->psi; } pNode = pElem->pNodes[1]; if (pNode->nodeType != CONTACT) { psi2 = pDevice->dcSolution[pNode->poiEqn]; } else { psi2 = pNode->psi; } pEdge->dPsi = psi2 - psi1; } } ngspice-26/src/ciderlib/oned/oneproj.c0000644000265600020320000002446312264261473017353 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/macros.h" #include "ngspice/spmatrix.h" #include "ngspice/bool.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" /* * Functions for projecting the next solution point for modified two-level * newton scheme */ void NUMDproject(ONEdevice *pDevice, double delV) { ONEelem *pElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEnode *pNode; ONEedge *pEdge; double delPsi, delN, delP, newN, newP; double *incVpn; int i, index; delV = - delV / VNorm; pElem->pRightNode->psi += delV; if (ABS(delV) < MIN_DELV) { ONEstoreInitialGuess(pDevice); return; } /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } /* compute incremental changes due to N contact */ pNode = pElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pElem->epsRel * pElem->rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; pDevice->rhs[pNode->nEqn] = -pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] = -pEdge->dJpDpsiP1; } incVpn = pDevice->dcDeltaSolution; spSolve(pDevice->matrix, pDevice->rhs, incVpn, NULL, NULL); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { delPsi = incVpn[pNode->psiEqn] * delV; pDevice->dcSolution[pNode->psiEqn] = pNode->psi + delPsi; if (pElem->elemType == SEMICON) { delN = incVpn[pNode->nEqn] * delV; delP = incVpn[pNode->pEqn] * delV; newN = pNode->nConc + delN; newP = pNode->pConc + delP; /* if new conc less than 0.0 then use a fraction of the guess */ if (newN <= 0.0) { pDevice->dcSolution[pNode->nEqn] = guessNewConc(pNode->nConc, delN); } else { pDevice->dcSolution[pNode->nEqn] = newN; } if (newP <= 0.0) { pDevice->dcSolution[pNode->pEqn] = guessNewConc(pNode->pConc, delP); } else { pDevice->dcSolution[pNode->pEqn] = newP; } } } } } } } void NBJTproject(ONEdevice *pDevice, double delVce, double delVbe, double vbe) { ONEelem *pLastElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; double delPsi, delN, delP, newN, newP, *incVce, *incVbe; double baseConc=0.0; int i, index; double nConc, pConc; /* normalize the voltages for calculations */ delVce = delVce / VNorm; delVbe = delVbe / VNorm; pLastElem->pRightNode->psi += delVce; pBaseElem->pRightNode->vbe = vbe / VNorm + pBaseElem->matlInfo->refPsi; pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { baseConc = pNode->nConc; } else if (pNode->baseType == P_TYPE) { baseConc = pNode->pConc; } if (ABS(delVce) > MIN_DELV) { /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } /* store the new rhs for computing the incremental quantities */ pNode = pLastElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pLastElem->epsRel * pLastElem->rDx; if (pLastElem->elemType == SEMICON) { pEdge = pLastElem->pEdge; pDevice->rhs[pNode->nEqn] = -pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] = -pEdge->dJpDpsiP1; } incVce = pDevice->dcDeltaSolution; spSolve(pDevice->matrix, pDevice->rhs, incVce, NULL, NULL); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { delPsi = incVce[pNode->psiEqn] * delVce; pDevice->dcSolution[pNode->psiEqn] = pNode->psi + delPsi; if (pElem->elemType == SEMICON) { delN = incVce[pNode->nEqn] * delVce; delP = incVce[pNode->pEqn] * delVce; newN = pNode->nConc + delN; newP = pNode->pConc + delP; /* if new conc less than 0.0 then use a fraction of the guess */ if (newN <= 0.0) { pDevice->dcSolution[pNode->nEqn] = guessNewConc(pNode->nConc, delN); } else { pDevice->dcSolution[pNode->nEqn] = newN; } if (newP <= 0.0) { pDevice->dcSolution[pNode->pEqn] = guessNewConc(pNode->pConc, delP); } else { pDevice->dcSolution[pNode->pEqn] = newP; } } } } } } } else { ONEstoreInitialGuess(pDevice); } if (ABS(delVbe) > MIN_DELV) { /* zero the rhs before loading in the new rhs base contribution */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { pDevice->rhs[pNode->nEqn] = baseConc * pNode->eg; } else if (pNode->baseType == P_TYPE) { pDevice->rhs[pNode->pEqn] = baseConc * pNode->eg; } incVbe = pDevice->copiedSolution; spSolve(pDevice->matrix, pDevice->rhs, incVbe, NULL, NULL); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { delPsi = incVbe[pNode->psiEqn] * delVbe; pDevice->dcSolution[pNode->psiEqn] += delPsi; if (pElem->elemType == SEMICON) { delN = incVbe[pNode->nEqn] * delVbe; delP = incVbe[pNode->pEqn] * delVbe; nConc = pDevice->dcSolution[pNode->nEqn]; pConc = pDevice->dcSolution[pNode->pEqn]; newN = nConc + delN; newP = pConc + delP; /* if new conc less than 0.0 then use a fraction of the guess */ if (newN <= 0.0) { pDevice->dcSolution[pNode->nEqn] = guessNewConc(nConc, delN); } else { pDevice->dcSolution[pNode->nEqn] = newN; } if (newP <= 0.0) { pDevice->dcSolution[pNode->pEqn] = guessNewConc(pConc, delP); } else { pDevice->dcSolution[pNode->pEqn] = newP; } } } } } } } } /* functions to update device states for full-LU algorithm */ void NUMDupdate(ONEdevice *pDevice, double delV, BOOLEAN updateBoundary) { ONEelem *pElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEnode *pNode; double delPsi, delN, delP; int i, index; delV = - delV / VNorm; if (updateBoundary) { pElem->pRightNode->psi += delV; } for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { delPsi = pDevice->dcDeltaSolution[pNode->psiEqn] * delV; pDevice->dcSolution[pNode->psiEqn] = pNode->psi + delPsi; if (pElem->elemType == SEMICON) { delN = pDevice->dcDeltaSolution[pNode->nEqn] * delV; delP = pDevice->dcDeltaSolution[pNode->pEqn] * delV; pDevice->dcSolution[pNode->nEqn] = pNode->nConc + delN; pDevice->dcSolution[pNode->pEqn] = pNode->pConc + delP; } } } } } } void NBJTupdate(ONEdevice *pDevice, double delVce, double delVbe, double vbe, BOOLEAN updateBoundary) { ONEelem *pLastElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; ONEelem *pElem; ONEnode *pNode; double delPsi, delN, delP, *incVce, *incVbe; int i, index; /* normalize the voltages for calculations */ delVce = delVce / VNorm; delVbe = delVbe / VNorm; if (updateBoundary) { pLastElem->pRightNode->psi += delVce; pBaseElem->pRightNode->vbe = vbe / VNorm + pBaseElem->matlInfo->refPsi; } /* * The incremental quantities are available from NBJTconductance. incVce * (dcDeltaSolution) and incVbe (copiedSolution) are used to store the * incremental quantities associated with Vce and Vbe */ /* set incVce = dcDeltaSolution; incVbe = copiedSolution */ incVce = pDevice->dcDeltaSolution; incVbe = pDevice->copiedSolution; for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { delPsi = incVce[pNode->psiEqn] * delVce + incVbe[pNode->psiEqn] * delVbe; pDevice->dcSolution[pNode->psiEqn] = pNode->psi + delPsi; if (pElem->elemType == SEMICON) { delN = incVce[pNode->nEqn] * delVce + incVbe[pNode->nEqn] * delVbe; delP = incVce[pNode->pEqn] * delVce + incVbe[pNode->pEqn] * delVbe; pDevice->dcSolution[pNode->nEqn] = pNode->nConc + delN; pDevice->dcSolution[pNode->pEqn] = pNode->pConc + delP; } } } } } } void NUMDsetBCs(ONEdevice *pDevice, double vpn) { ONEelem *pElem = pDevice->elemArray[pDevice->numNodes - 1]; /* normalize the voltage */ vpn = - vpn / VNorm; /* set the boundary conditions */ pElem->pRightNode->psi = vpn + pElem->pRightNode->psi0; } void NBJTsetBCs(ONEdevice *pDevice, double vce, double vbe) { ONEelem *pLastElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; /* ONEnode *pNode; double psi, conc, sign, absConc; double nie, ni, pi; */ /* normalize the voltages */ vce = vce / VNorm; vbe = vbe / VNorm; /* set the boundary conditions */ pBaseElem->pRightNode->vbe = vbe + pBaseElem->matlInfo->refPsi; pLastElem->pRightNode->psi = vce + pLastElem->pRightNode->psi0; /* * if (pLastElem->elemType IS INSULATOR) { pNode->psi = RefPsi - * pNode->eaff; pNode->nConc = 0.0; pNode->pConc = 0.0; } else if * (pLastElem->elemType IS SEMICON) { nie = pNode->nie; conc = * pNode->netConc / pNode->nie; psi = 0.0; ni = nie; pi = nie; sign = SGN( * conc ); absConc = ABS( conc ); if ( conc ISNOT 0.0 ) { psi = sign * log( * 0.5 * absConc + sqrt( 1.0 + 0.25*absConc*absConc )); ni = nie * exp( psi * ); pi = nie * exp( -psi ); } pNode->psi = pLastElem->matlInfo->refPsi + * psi; pNode->nConc = ni; pNode->pConc = pi; } pNode->psi = pNode->psi0; * pNode->psi += vce; */ } ngspice-26/src/ciderlib/oned/oneadmit.c0000644000265600020320000005726712264261473017507 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* Functions to compute small-signal parameters of 1D devices */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/numconst.h" #include "ngspice/onedev.h" #include "ngspice/onemesh.h" #include "ngspice/complex.h" #include "ngspice/spmatrix.h" #include "ngspice/ifsim.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" extern IFfrontEnd *SPfrontEnd; /* * mmhhh this may cause troubles * Paolo Nenzi 2002 */ SPcomplex yAc; int NUMDadmittance(ONEdevice *pDevice, double omega, SPcomplex *yd) { ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; int index, i; double yReal, yImag; double *solutionReal, *solutionImag; SPcomplex yAc, cOmega; SPcomplex *y; BOOLEAN SORFailed; double startTime; /* Each time we call this counts as one AC iteration. */ pDevice->pStats->numIters[STAT_AC] += 1; /* * Change context names of solution vectors for ac analysis. * dcDeltaSolution stores the real part and copiedSolution stores the * imaginary part of the ac solution vector. */ solutionReal = pDevice->dcDeltaSolution; solutionImag = pDevice->copiedSolution; pDevice->solverType = SLV_SMSIG; /* use a normalized radian frequency */ omega *= TNorm; CMPLX_ASSIGN_VALUE(cOmega, 0.0, omega); yReal = 0.0; yImag = 0.0; if ((AcAnalysisMethod == SOR) || (AcAnalysisMethod == SOR_ONLY)) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } /* store the new rhs vector */ pElem = pDevice->elemArray[pDevice->numNodes - 1]; pNode = pElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pElem->epsRel * pElem->rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = ONEsorSolve(pDevice, solutionReal, solutionImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && AcAnalysisMethod == SOR) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yd, 0.0, 0.0); return (AcAnalysisMethod); } } if (AcAnalysisMethod == DIRECT) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* solve the system of equations directly */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } pElem = pDevice->elemArray[pDevice->numNodes - 1]; pNode = pElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pElem->epsRel * pElem->rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } ONE_jacLoad(pDevice); spSetComplex(pDevice->matrix); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (pElem->elemType == SEMICON) { for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -0.5 * pElem->dx * omega); spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, 0.5 * pElem->dx * omega); } } } } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR */ startTime = SPfrontEnd->IFseconds(); spFactor(pDevice->matrix); pDevice->pStats->factorTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } /* MISC */ startTime = SPfrontEnd->IFseconds(); pNode = pDevice->elemArray[1]->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(yAc, -y->real, -y->imag); CMPLX_ASSIGN(*yd, yAc); CMPLX_MULT_SELF_SCALAR(*yd, GNorm * pDevice->area); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; return (AcAnalysisMethod); } int NBJTadmittance(ONEdevice *pDevice, double omega, SPcomplex *yIeVce, SPcomplex *yIcVce, SPcomplex *yIeVbe, SPcomplex *yIcVbe) { ONEelem *pCollElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; ONEelem *pElem; ONEedge *pEdge; ONEnode *pNode; int index, i; double area = pDevice->area; double *solutionReal, *solutionImag; BOOLEAN SORFailed; SPcomplex *y; SPcomplex cOmega, pIeVce, pIcVce, pIeVbe, pIcVbe; double startTime; /* Each time we call this counts as one AC iteration. */ pDevice->pStats->numIters[STAT_AC] += 1; /* * change context names of solution vectors for ac analysis dcDeltaSolution * stores the real part and copiedSolution stores the imaginary part of the * ac solution vector */ solutionReal = pDevice->dcDeltaSolution; solutionImag = pDevice->copiedSolution; pDevice->solverType = SLV_SMSIG; /* use a normalized radian frequency */ omega *= TNorm; CMPLX_ASSIGN_VALUE(cOmega, 0.0, omega); CMPLX_ASSIGN_VALUE(pIeVce, NAN, NAN); CMPLX_ASSIGN_VALUE(pIcVce, NAN, NAN); if ((AcAnalysisMethod == SOR) || (AcAnalysisMethod == SOR_ONLY)) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } /* store the new rhs vector */ pNode = pCollElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pCollElem->epsRel * pCollElem->rDx; if (pCollElem->elemType == SEMICON) { pEdge = pCollElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = ONEsorSolve(pDevice, solutionReal, solutionImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && (AcAnalysisMethod == SOR)) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yIeVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIeVbe, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVbe, 0.0, 0.0); return (AcAnalysisMethod); } else { /* MISC */ startTime = SPfrontEnd->IFseconds(); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, -y->real, -y->imag); pNode = pCollElem->pRightNode; y = computeAdmittance(pNode, TRUE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, -y->real, -y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* load in the base contribution to the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { pDevice->rhs[pNode->nEqn] = pNode->nConc * pNode->eg; } else if (pNode->baseType == P_TYPE) { pDevice->rhs[pNode->pEqn] = pNode->pConc * pNode->eg; } else { printf("projectBJTsolution: unknown base type\n"); } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); SORFailed = ONEsorSolve(pDevice, solutionReal, solutionImag, omega); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; if (SORFailed && (AcAnalysisMethod == SOR)) { AcAnalysisMethod = DIRECT; printf("SOR failed at %g Hz, switching to direct-method ac analysis.\n", omega / (TWO_PI * TNorm) ); } else if (SORFailed) { /* Told to only do SOR, so give up. */ printf("SOR failed at %g Hz, returning null admittance.\n", omega / (TWO_PI * TNorm) ); CMPLX_ASSIGN_VALUE(*yIeVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVce, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIeVbe, 0.0, 0.0); CMPLX_ASSIGN_VALUE(*yIcVbe, 0.0, 0.0); return (AcAnalysisMethod); } } } if (AcAnalysisMethod == DIRECT) { /* LOAD */ startTime = SPfrontEnd->IFseconds(); for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } /* solve the system of equations directly */ ONE_jacLoad(pDevice); pNode = pCollElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pCollElem->epsRel * pCollElem->rDx; if (pCollElem->elemType == SEMICON) { pEdge = pCollElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } spSetComplex(pDevice->matrix); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (pElem->elemType == SEMICON) { for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { spADD_COMPLEX_ELEMENT(pNode->fNN, 0.0, -0.5 * pElem->dx * omega); spADD_COMPLEX_ELEMENT(pNode->fPP, 0.0, 0.5 * pElem->dx * omega); } } } } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR */ startTime = SPfrontEnd->IFseconds(); spFactor(pDevice->matrix); pDevice->pStats->factorTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* MISC */ startTime = SPfrontEnd->IFseconds(); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, -y->real, -y->imag); pNode = pCollElem->pRightNode; y = computeAdmittance(pNode, TRUE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, -y->real, -y->imag); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* LOAD */ startTime = SPfrontEnd->IFseconds(); /* load in the base contribution in the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { pDevice->rhs[pNode->nEqn] = pNode->nConc * pNode->eg; } else if (pNode->baseType == P_TYPE) { pDevice->rhs[pNode->pEqn] = pNode->pConc * pNode->eg; } else { printf("\n BJTadmittance: unknown base type"); } pDevice->pStats->loadTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; /* FACTOR: already done, no need to repeat. */ /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pDevice->pStats->solveTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } /* MISC */ startTime = SPfrontEnd->IFseconds(); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVbe, -y->real, -y->imag); pNode = pCollElem->pRightNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVbe, -y->real, -y->imag); CMPLX_ASSIGN(*yIeVce, pIeVce); CMPLX_ASSIGN(*yIcVce, pIcVce); CMPLX_ASSIGN(*yIeVbe, pIeVbe); CMPLX_ASSIGN(*yIcVbe, pIcVbe); CMPLX_MULT_SELF_SCALAR(*yIeVce, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIeVbe, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIcVce, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIcVbe, GNorm * area); pDevice->pStats->miscTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; return (AcAnalysisMethod); } BOOLEAN ONEsorSolve(ONEdevice *pDevice, double *xReal, double *xImag, double omega) { ONEnode *pNode; ONEelem *pElem; double wRelax = 1.0; /* SOR relaxation parameter */ double *rhsSOR = pDevice->rhsImag; int numEqns = pDevice->numEqns; int numNodes = pDevice->numNodes; BOOLEAN SORConverged = FALSE; BOOLEAN SORFailed = FALSE; int i, index, indexN, indexP, iterationNum; double dx; /* clear xReal, xImag arrays */ for (index = 1; index <= numEqns; index++) { xReal[index] = 0.0; xImag[index] = 0.0; } iterationNum = 1; for (; (!SORConverged) &&(!SORFailed); iterationNum++) { /* first setup the rhs for the real part */ for (index = 1; index <= numEqns; index++) { rhsSOR[index] = 0.0; } for (index = 1; index < numNodes; index++) { pElem = pDevice->elemArray[index]; dx = 0.5 * pElem->dx; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { indexN = pNode->nEqn; indexP = pNode->pEqn; rhsSOR[indexN] -= dx * omega * xImag[indexN]; rhsSOR[indexP] += dx * omega * xImag[indexP]; } } } /* now setup the rhs for the SOR equations */ for (index = 1; index <= numEqns; index++) { rhsSOR[index] += pDevice->rhs[index]; } /* compute xReal(k+1). solution stored in rhsSOR */ spSolve(pDevice->matrix, rhsSOR, rhsSOR, NULL, NULL); /* modify solution when wRelax is not 1 */ if (wRelax != 1) { for (index = 1; index <= numEqns; index++) { rhsSOR[index] = (1 - wRelax) * xReal[index] + wRelax * rhsSOR[index]; } } if (iterationNum > 1) { SORConverged = hasSORConverged(xReal, rhsSOR, numEqns); } /* copy real solution into xReal */ for (index = 1; index <= numEqns; index++) { xReal[index] = rhsSOR[index]; } /* now compute the imaginary part of the solution, xImag */ for (index = 1; index <= numEqns; index++) { rhsSOR[index] = 0.0; } for (index = 1; index < numNodes; index++) { pElem = pDevice->elemArray[index]; dx = 0.5 * pElem->dx; for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if ((pNode->nodeType != CONTACT) && (pElem->elemType == SEMICON)) { indexN = pNode->nEqn; indexP = pNode->pEqn; rhsSOR[indexN] += dx * omega * xReal[indexN]; rhsSOR[indexP] -= dx * omega * xReal[indexP]; } } } /* compute xImag(k+1) */ spSolve(pDevice->matrix, rhsSOR, rhsSOR, NULL, NULL); /* modify solution when wRelax is not 1 */ if (wRelax != 1) { for (index = 1; index <= numEqns; index++) { rhsSOR[index] = (1 - wRelax) * xImag[index] + wRelax * rhsSOR[index]; } } if (iterationNum > 1) { SORConverged = SORConverged && hasSORConverged(xImag, rhsSOR, numEqns); } /* copy imag solution into xImag */ for (index = 1; index <= numEqns; index++) { xImag[index] = rhsSOR[index]; } if (ONEacDebug) printf("SOR iteration number = %d\n", iterationNum); if (iterationNum > 4) { SORFailed = TRUE; } } return (SORFailed); } void NUMDys(ONEdevice *pDevice, SPcomplex *s, SPcomplex *yd) { ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; int index, i; double *solutionReal, *solutionImag; SPcomplex temp, cOmega; SPcomplex *y; /* * change context names of solution vectors for ac analysis dcDeltaSolution * stores the real part and copiedSolution stores the imaginary part of the * ac solution vector */ solutionReal = pDevice->dcDeltaSolution; solutionImag = pDevice->copiedSolution; /* use a normalized radian frequency */ CMPLX_MULT_SCALAR(cOmega, *s, TNorm); /* solve the system of equations directly */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } ONE_jacLoad(pDevice); pElem = pDevice->elemArray[pDevice->numNodes - 1]; pNode = pElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pElem->epsRel * pElem->rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } spSetComplex(pDevice->matrix); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (pElem->elemType == SEMICON) { for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { CMPLX_MULT_SCALAR(temp, cOmega, 0.5 * pElem->dx); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } } } } spFactor(pDevice->matrix); spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(*yd, -y->real, -y->imag); CMPLX_MULT_SELF_SCALAR(*yd, GNorm * pDevice->area); } void NBJTys(ONEdevice *pDevice, SPcomplex *s, SPcomplex *yIeVce, SPcomplex *yIcVce, SPcomplex *yIeVbe, SPcomplex *yIcVbe) { ONEelem *pCollElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; int index, i; SPcomplex *y; double area = pDevice->area; double *solutionReal, *solutionImag; SPcomplex temp, cOmega; SPcomplex pIeVce, pIcVce, pIeVbe, pIcVbe; /* * change context names of solution vectors for ac analysis dcDeltaSolution * stores the real part and copiedSolution stores the imaginary part of the * ac solution vector */ solutionReal = pDevice->dcDeltaSolution; solutionImag = pDevice->copiedSolution; /* use a normalized radian frequency */ CMPLX_MULT_SCALAR(cOmega, *s, TNorm); for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; pDevice->rhsImag[index] = 0.0; } /* solve the system of equations directly */ ONE_jacLoad(pDevice); pNode = pCollElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pCollElem->epsRel * pCollElem->rDx; if (pCollElem->elemType == SEMICON) { pEdge = pCollElem->pEdge; pDevice->rhs[pNode->nEqn] -= pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] -= pEdge->dJpDpsiP1; } spSetComplex(pDevice->matrix); for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (pElem->elemType == SEMICON) { for (i = 0; i <= 1; i++) { pNode = pElem->pNodes[i]; if (pNode->nodeType != CONTACT) { CMPLX_MULT_SCALAR(temp, cOmega, 0.5 * pElem->dx); spADD_COMPLEX_ELEMENT(pNode->fNN, -temp.real, -temp.imag); spADD_COMPLEX_ELEMENT(pNode->fPP, temp.real, temp.imag); } } } } spFactor(pDevice->matrix); spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVce, -y->real, -y->imag); pNode = pCollElem->pRightNode; y = computeAdmittance(pNode, TRUE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVce, -y->real, -y->imag); /* load in the base contribution in the rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { pDevice->rhs[pNode->nEqn] = pNode->nConc * pNode->eg; } else if (pNode->baseType == P_TYPE) { pDevice->rhs[pNode->pEqn] = pNode->pConc * pNode->eg; } else { printf("\n BJTadmittance: unknown base type"); } /* don't need to LU factor the jacobian since it exists */ spSolve(pDevice->matrix, pDevice->rhs, solutionReal, pDevice->rhsImag, solutionImag); pElem = pDevice->elemArray[1]; pNode = pElem->pLeftNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIeVbe, -y->real, -y->imag); pNode = pCollElem->pRightNode; y = computeAdmittance(pNode, FALSE, solutionReal, solutionImag, &cOmega); CMPLX_ASSIGN_VALUE(pIcVbe, -y->real, -y->imag); CMPLX_ASSIGN(*yIeVce, pIeVce); CMPLX_ASSIGN(*yIcVce, pIcVce); CMPLX_ASSIGN(*yIeVbe, pIeVbe); CMPLX_ASSIGN(*yIcVbe, pIcVbe); CMPLX_MULT_SELF_SCALAR(*yIeVce, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIeVbe, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIcVce, GNorm * area); CMPLX_MULT_SELF_SCALAR(*yIcVbe, GNorm * area); } /* function to compute the admittance of a one-D device */ /* cOmega is the complex frequency */ SPcomplex * computeAdmittance(ONEnode *pNode, BOOLEAN delVContact, double *xReal, double *xImag, SPcomplex *cOmega) { ONEnode *pHNode; ONEedge *pEdge; ONEelem *pElem; SPcomplex psi, n, p; SPcomplex sum, prod1, prod2; /* SPcomplex yAc; */ int i; CMPLX_ASSIGN_VALUE(yAc, 0.0, 0.0); for (i = 0; i <= 1; i++) { pElem = pNode->pElems[i]; if (pElem != NULL) { switch (i) { case 0: /* the right node of the element */ pHNode = pElem->pLeftNode; pEdge = pElem->pEdge; CMPLX_ASSIGN_VALUE(psi, xReal[pHNode->psiEqn], xImag[pHNode->psiEqn]); if (pElem->elemType == SEMICON) { CMPLX_ASSIGN_VALUE(n, xReal[pHNode->nEqn], xImag[pHNode->nEqn]); CMPLX_ASSIGN_VALUE(p, xReal[pHNode->pEqn], xImag[pHNode->pEqn]); CMPLX_MULT_SCALAR(prod1, psi, -pEdge->dJnDpsiP1); CMPLX_MULT_SCALAR(prod2, n, pEdge->dJnDn); CMPLX_ADD(yAc, prod1, prod2); CMPLX_MULT_SCALAR(prod1, psi, -pEdge->dJpDpsiP1); CMPLX_MULT_SCALAR(prod2, p, pEdge->dJpDp); CMPLX_ADD(sum, prod1, prod2); CMPLX_ADD_ASSIGN(yAc, sum); if (delVContact) { CMPLX_ADD_SELF_SCALAR(yAc, pEdge->dJnDpsiP1 + pEdge->dJpDpsiP1); } } CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * pElem->rDx); CMPLX_MULT(prod2, prod1, psi) CMPLX_ADD_ASSIGN(yAc, prod2); if (delVContact) { CMPLX_SUBT_ASSIGN(yAc, prod1); } break; case 1: /* the left node of the element */ pHNode = pElem->pRightNode; pEdge = pElem->pEdge; CMPLX_ASSIGN_VALUE(psi, xReal[pHNode->psiEqn], xImag[pHNode->psiEqn]); if (pElem->elemType == SEMICON) { CMPLX_ASSIGN_VALUE(n, xReal[pHNode->nEqn], xImag[pHNode->nEqn]); CMPLX_ASSIGN_VALUE(p, xReal[pHNode->pEqn], xImag[pHNode->pEqn]); CMPLX_MULT_SCALAR(prod1, psi, pEdge->dJnDpsiP1); CMPLX_MULT_SCALAR(prod2, n, pEdge->dJnDnP1); CMPLX_ADD(yAc, prod1, prod2); CMPLX_MULT_SCALAR(prod1, psi, pEdge->dJpDpsiP1); CMPLX_MULT_SCALAR(prod2, p, pEdge->dJpDpP1); CMPLX_ADD(sum, prod1, prod2); CMPLX_ADD_ASSIGN(yAc, sum); if (delVContact) { CMPLX_ADD_SELF_SCALAR(yAc, -(pEdge->dJnDpsiP1 + pEdge->dJpDpsiP1)); } } CMPLX_MULT_SCALAR(prod1, *cOmega, pElem->epsRel * pElem->rDx); CMPLX_MULT(prod2, prod1, psi); CMPLX_SUBT_ASSIGN(yAc, prod2); if (delVContact) { CMPLX_ADD_ASSIGN(yAc, prod1); } break; default: /* should never be here. Error */ printf("computeAdmittance: Error - unknown element\n"); } } } return (&yAc); } ngspice-26/src/ciderlib/oned/readme0000644000265600020320000000140312264261473016700 0ustar andreasadminDirectory: oned --------------- This directory contains the files that are primarily responsible for implementing the 1D device simulator. It also contains files that help interface the circuit simulator to the device simulator. Most functions that are common to all 1D device simulations start with the prefix ONE, e.g. ONEbiasSolve. The device-specific routines start with either NUMD or NBJT, e.g. NUMDadmittance or NBJTproject. The simulator contains both a Poisson Solver for equilibrium and a three-equation solver for bias solutions. An attempt has been made to keep the function names parallel in the two portions. Poisson routines are identified with a 'Q' (for charge only) after the ONE, and Full solver routines are identified with an underscore '_'. ngspice-26/src/ciderlib/oned/oneprint.c0000644000265600020320000003765512264261473017544 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/carddefs.h" #include "ngspice/spmatrix.h" #include "onedext.h" #include "oneddefs.h" #include void ONEprnSolution(FILE *file, ONEdevice *pDevice, OUTPcard *output) { int index, i; int numVars = 0; ONEnode **nodeArray=NULL; ONEnode *pNode; ONEelem *pElem, *pPrevElem; ONEmaterial *info=NULL; double data[50]; double eField, refPsi = 0.0, eGap, dGap; double mun, mup, jc, jd, jn, jp, jt; double coeff1, coeff2; if (output->OUTPnumVars == -1) { /* First pass. Need to count number of variables in output. */ numVars++; /* For the X scale */ if (output->OUTPdoping) { numVars++; } if (output->OUTPpsi) { numVars++; } if (output->OUTPequPsi) { numVars++; } if (output->OUTPvacPsi) { numVars++; } if (output->OUTPnConc) { numVars++; } if (output->OUTPpConc) { numVars++; } if (output->OUTPphin) { numVars++; } if (output->OUTPphip) { numVars++; } if (output->OUTPphic) { numVars++; } if (output->OUTPphiv) { numVars++; } if (output->OUTPeField) { numVars++; } if (output->OUTPjc) { numVars++; } if (output->OUTPjd) { numVars++; } if (output->OUTPjn) { numVars++; } if (output->OUTPjp) { numVars++; } if (output->OUTPjt) { numVars++; } if (output->OUTPuNet) { numVars++; } if (output->OUTPmun) { numVars++; } if (output->OUTPmup) { numVars++; } output->OUTPnumVars = numVars; } /* generate the work array for printing node info */ XCALLOC(nodeArray, ONEnode *, 1 + pDevice->numNodes); /* store the nodes in this work array and print out later */ for (index = 1; index < pDevice->numNodes; index++) { pElem = pDevice->elemArray[index]; if (refPsi == 0.0 && pElem->matlInfo->type == SEMICON) { refPsi = pElem->matlInfo->refPsi; } for (i = 0; i <= 1; i++) { if (pElem->evalNodes[i]) { pNode = pElem->pNodes[i]; nodeArray[pNode->nodeI] = pNode; } } } /* Initialize rawfile */ numVars = output->OUTPnumVars; fprintf(file, "Title: Device %s internal state\n", pDevice->name); fprintf(file, "Plotname: Device Cross Section\n"); fprintf(file, "Flags: real\n"); fprintf(file, "Command: deftype p xs cross\n"); fprintf(file, "Command: deftype v distance m\n"); fprintf(file, "Command: deftype v concentration cm^-3\n"); fprintf(file, "Command: deftype v electric_field V/cm\n"); fprintf(file, "Command: deftype v current_density A/cm^2\n"); fprintf(file, "Command: deftype v concentration/time cm^-3/s\n"); fprintf(file, "Command: deftype v mobility cm^2/Vs\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: %d\n", pDevice->numNodes); numVars = 0; fprintf(file, "Variables:\n"); fprintf(file, "\t%d x distance\n", numVars++); if (output->OUTPpsi) { fprintf(file, "\t%d psi voltage\n", numVars++); } if (output->OUTPequPsi) { fprintf(file, "\t%d equ.psi voltage\n", numVars++); } if (output->OUTPvacPsi) { fprintf(file, "\t%d vac.psi voltage\n", numVars++); } if (output->OUTPphin) { fprintf(file, "\t%d phin voltage\n", numVars++); } if (output->OUTPphip) { fprintf(file, "\t%d phip voltage\n", numVars++); } if (output->OUTPphic) { fprintf(file, "\t%d phic voltage\n", numVars++); } if (output->OUTPphiv) { fprintf(file, "\t%d phiv voltage\n", numVars++); } if (output->OUTPdoping) { fprintf(file, "\t%d dop concentration\n", numVars++); } if (output->OUTPnConc) { fprintf(file, "\t%d n concentration\n", numVars++); } if (output->OUTPpConc) { fprintf(file, "\t%d p concentration\n", numVars++); } if (output->OUTPeField) { fprintf(file, "\t%d e electric_field\n", numVars++); } if (output->OUTPjc) { fprintf(file, "\t%d jc current_density\n", numVars++); } if (output->OUTPjd) { fprintf(file, "\t%d jd current_density\n", numVars++); } if (output->OUTPjn) { fprintf(file, "\t%d jn current_density\n", numVars++); } if (output->OUTPjp) { fprintf(file, "\t%d jp current_density\n", numVars++); } if (output->OUTPjt) { fprintf(file, "\t%d jt current_density\n", numVars++); } if (output->OUTPuNet) { fprintf(file, "\t%d unet concentration/time\n", numVars++); } if (output->OUTPmun) { fprintf(file, "\t%d mun mobility\n", numVars++); } if (output->OUTPmup) { fprintf(file, "\t%d mup mobility\n", numVars++); } fprintf(file, "Binary:\n"); for (index = 1; index <= pDevice->numNodes; index++) { pNode = nodeArray[index]; if ((index > 1) && (index < pDevice->numNodes)) { pElem = pNode->pRightElem; pPrevElem = pNode->pLeftElem; if (pElem->evalNodes[0]) { info = pElem->matlInfo; } else if (pPrevElem->evalNodes[1]) { info = pPrevElem->matlInfo; } coeff1 = pPrevElem->dx / (pPrevElem->dx + pElem->dx); coeff2 = pElem->dx / (pPrevElem->dx + pElem->dx); eField = -coeff1 * pElem->pEdge->dPsi * pElem->rDx - coeff2 * pPrevElem->pEdge->dPsi * pPrevElem->rDx; mun = coeff1 * pElem->pEdge->mun + coeff2 * pPrevElem->pEdge->mun; mup = coeff1 * pElem->pEdge->mup + coeff2 * pPrevElem->pEdge->mup; jn = coeff1 * pElem->pEdge->jn + coeff2 * pPrevElem->pEdge->jn; jp = coeff1 * pElem->pEdge->jp + coeff2 * pPrevElem->pEdge->jp; jd = coeff1 * pElem->pEdge->jd + coeff2 * pPrevElem->pEdge->jd; } else if (index == 1) { info = pNode->pRightElem->matlInfo; eField = 0.0; mun = pNode->pRightElem->pEdge->mun; mup = pNode->pRightElem->pEdge->mup; jn = pNode->pRightElem->pEdge->jn; jp = pNode->pRightElem->pEdge->jp; jd = pNode->pRightElem->pEdge->jd; } else { info = pNode->pLeftElem->matlInfo; eField = 0.0; mun = pNode->pLeftElem->pEdge->mun; mup = pNode->pLeftElem->pEdge->mup; jn = pNode->pLeftElem->pEdge->jn; jp = pNode->pLeftElem->pEdge->jp; jd = pNode->pLeftElem->pEdge->jd; } jc = jn + jp; jt = jc + jd; /* Crude hack to get around the fact that the base node wipes out 'eg' */ if (index == pDevice->baseIndex) { eGap = info->eg0; dGap = 0.0; } else { eGap = pNode->eg * VNorm; dGap = 0.5 * (info->eg0 - eGap); } /* Now fill in the data array */ numVars = 0; data[numVars++] = pNode->x * 1e-2; if (output->OUTPpsi) { data[numVars++] = (pNode->psi - refPsi) * VNorm; } if (output->OUTPequPsi) { data[numVars++] = (pNode->psi0 - refPsi) * VNorm; } if (output->OUTPvacPsi) { data[numVars++] = pNode->psi * VNorm; } if (output->OUTPphin) { if (info->type != INSULATOR) { data[numVars++] = (pNode->psi - refPsi - log(pNode->nConc / pNode->nie)) * VNorm; } else { data[numVars++] = 0.0; } } if (output->OUTPphip) { if (info->type != INSULATOR) { data[numVars++] = (pNode->psi - refPsi + log(pNode->pConc / pNode->nie)) * VNorm; } else { data[numVars++] = 0.0; } } if (output->OUTPphic) { data[numVars++] = (pNode->psi + pNode->eaff) * VNorm + dGap; } if (output->OUTPphiv) { data[numVars++] = (pNode->psi + pNode->eaff) * VNorm + dGap + eGap; } if (output->OUTPdoping) { data[numVars++] = pNode->netConc * NNorm; } if (output->OUTPnConc) { data[numVars++] = pNode->nConc * NNorm; } if (output->OUTPpConc) { data[numVars++] = pNode->pConc * NNorm; } if (output->OUTPeField) { data[numVars++] = eField * ENorm; } if (output->OUTPjc) { data[numVars++] = jc * JNorm; } if (output->OUTPjd) { data[numVars++] = jd * JNorm; } if (output->OUTPjn) { data[numVars++] = jn * JNorm; } if (output->OUTPjp) { data[numVars++] = jp * JNorm; } if (output->OUTPjt) { data[numVars++] = jt * JNorm; } if (output->OUTPuNet) { data[numVars++] = pNode->uNet * NNorm / TNorm; } if (output->OUTPmun) { data[numVars++] = mun; } if (output->OUTPmup) { data[numVars++] = mup; } fwrite(data, sizeof(double), (size_t) numVars, file); } FREE(nodeArray); } /* * XXX This is what the SPARSE element structure looks like. We can't take it * from its definition because the include file redefines all sorts of * things. Note that we are violating data encapsulation to find out the * size of this thing. */ struct MatrixElement { spREAL Real; spREAL Imag; int Row; int Col; struct MatrixElement *NextInRow; struct MatrixElement *NextInCol; }; void ONEmemStats(FILE *file, ONEdevice *pDevice) { const char memFormat[] = "%-20s" "%10d" "%10" PRIuPTR "\n"; /* static const char sumFormat[] = "%20s %-10d\n";*/ int size; size_t memory; ONEmaterial *pMaterial; ONEcontact *pContact; int numContactNodes; fprintf(file, "----------------------------------------\n"); fprintf(file, "Device %s Memory Usage:\n", pDevice->name); fprintf(file, "Item Count Bytes\n"); fprintf(file, "----------------------------------------\n"); size = 1; memory = (size_t) size * sizeof(ONEdevice); fprintf(file, memFormat, "Device", size, memory); size = pDevice->numNodes - 1; memory = (size_t) size * sizeof(ONEelem); fprintf(file, memFormat, "Elements", size, memory); size = pDevice->numNodes; memory = (size_t) size * sizeof(ONEnode); fprintf(file, memFormat, "Nodes", size, memory); size = pDevice->numNodes - 1; memory = (size_t) size * sizeof(ONEedge); fprintf(file, memFormat, "Edges", size, memory); size = pDevice->numNodes; memory = (size_t) size * sizeof(ONEelem *); size = 0; for (pMaterial = pDevice->pMaterials; pMaterial; pMaterial = pMaterial->next) size++; memory += (size_t) size * sizeof(ONEmaterial); size = numContactNodes = 0; for (pContact = pDevice->pFirstContact; pContact; pContact = pContact->next) { numContactNodes += pContact->numNodes; size++; } memory += (size_t) size * sizeof(ONEcontact); size = numContactNodes; memory += (size_t) size * sizeof(ONEnode *); size = 0; fprintf(file, "%-20s%10s%10" PRIuPTR "\n", "Misc Mesh", "n/a", memory); size = pDevice->numOrigEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Equil Orig NZ", size, memory); size = pDevice->numFillEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Equil Fill NZ", size, memory); size = pDevice->numOrigEquil + pDevice->numFillEquil; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Equil Tot NZ", size, memory); size = pDevice->dimEquil; memory = (size_t) size * 4 * sizeof(double); fprintf(file, memFormat, "Equil Vectors", size, memory); size = pDevice->numOrigBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Bias Orig NZ", size, memory); size = pDevice->numFillBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Bias Fill NZ", size, memory); size = pDevice->numOrigBias + pDevice->numFillBias; memory = (size_t) size * sizeof(struct MatrixElement); fprintf(file, memFormat, "Bias Tot NZ", size, memory); size = pDevice->dimBias; memory = (size_t) size * 5 * sizeof(double); fprintf(file, memFormat, "Bias Vectors", size, memory); size = (pDevice->numNodes - 1) * ONEnumEdgeStates + pDevice->numNodes * ONEnumNodeStates; memory = (size_t) size * sizeof(double); fprintf(file, memFormat, "State Vector", size, memory); } void ONEcpuStats(FILE *file, ONEdevice *pDevice) { static const char cpuFormat[] = "%-20s%10g%10g%10g%10g%10g\n"; ONEstats *pStats = pDevice->pStats; double total; int iTotal; fprintf(file, "----------------------------------------------------------------------\n"); fprintf(file, "Device %s Time Usage:\n", pDevice->name); fprintf(file, "Item SETUP DC TRAN AC TOTAL\n"); fprintf(file, "----------------------------------------------------------------------\n"); total = pStats->setupTime[STAT_SETUP] + pStats->setupTime[STAT_DC] + pStats->setupTime[STAT_TRAN] + pStats->setupTime[STAT_AC]; fprintf(file, cpuFormat, "Setup Time", pStats->setupTime[STAT_SETUP], pStats->setupTime[STAT_DC], pStats->setupTime[STAT_TRAN], pStats->setupTime[STAT_AC], total); total = pStats->loadTime[STAT_SETUP] + pStats->loadTime[STAT_DC] + pStats->loadTime[STAT_TRAN] + pStats->loadTime[STAT_AC]; fprintf(file, cpuFormat, "Load Time", pStats->loadTime[STAT_SETUP], pStats->loadTime[STAT_DC], pStats->loadTime[STAT_TRAN], pStats->loadTime[STAT_AC], total); total = pStats->orderTime[STAT_SETUP] + pStats->orderTime[STAT_DC] + pStats->orderTime[STAT_TRAN] + pStats->orderTime[STAT_AC]; fprintf(file, cpuFormat, "Order Time", pStats->orderTime[STAT_SETUP], pStats->orderTime[STAT_DC], pStats->orderTime[STAT_TRAN], pStats->orderTime[STAT_AC], total); total = pStats->factorTime[STAT_SETUP] + pStats->factorTime[STAT_DC] + pStats->factorTime[STAT_TRAN] + pStats->factorTime[STAT_AC]; fprintf(file, cpuFormat, "Factor Time", pStats->factorTime[STAT_SETUP], pStats->factorTime[STAT_DC], pStats->factorTime[STAT_TRAN], pStats->factorTime[STAT_AC], total); total = pStats->solveTime[STAT_SETUP] + pStats->solveTime[STAT_DC] + pStats->solveTime[STAT_TRAN] + pStats->solveTime[STAT_AC]; fprintf(file, cpuFormat, "Solve Time", pStats->solveTime[STAT_SETUP], pStats->solveTime[STAT_DC], pStats->solveTime[STAT_TRAN], pStats->solveTime[STAT_AC], total); total = pStats->updateTime[STAT_SETUP] + pStats->updateTime[STAT_DC] + pStats->updateTime[STAT_TRAN] + pStats->updateTime[STAT_AC]; fprintf(file, cpuFormat, "Update Time", pStats->updateTime[STAT_SETUP], pStats->updateTime[STAT_DC], pStats->updateTime[STAT_TRAN], pStats->updateTime[STAT_AC], total); total = pStats->checkTime[STAT_SETUP] + pStats->checkTime[STAT_DC] + pStats->checkTime[STAT_TRAN] + pStats->checkTime[STAT_AC]; fprintf(file, cpuFormat, "Check Time", pStats->checkTime[STAT_SETUP], pStats->checkTime[STAT_DC], pStats->checkTime[STAT_TRAN], pStats->checkTime[STAT_AC], total); total = pStats->setupTime[STAT_SETUP] + pStats->setupTime[STAT_DC] + pStats->setupTime[STAT_TRAN] + pStats->setupTime[STAT_AC]; fprintf(file, cpuFormat, "Misc Time", pStats->miscTime[STAT_SETUP], pStats->miscTime[STAT_DC], pStats->miscTime[STAT_TRAN], pStats->miscTime[STAT_AC], total); fprintf(file, "%-40s%10g%10s%10g\n", "LTE Time", pStats->lteTime, "", pStats->lteTime); total = pStats->totalTime[STAT_SETUP] + pStats->totalTime[STAT_DC] + pStats->totalTime[STAT_TRAN] + pStats->totalTime[STAT_AC]; fprintf(file, cpuFormat, "Total Time", pStats->totalTime[STAT_SETUP], pStats->totalTime[STAT_DC], pStats->totalTime[STAT_TRAN], pStats->totalTime[STAT_AC], total); iTotal = pStats->numIters[STAT_SETUP] + pStats->numIters[STAT_DC] + pStats->numIters[STAT_TRAN] + pStats->numIters[STAT_AC]; fprintf(file, "%-20s%10d%10d%10d%10d%10d\n", "Iterations", pStats->numIters[STAT_SETUP], pStats->numIters[STAT_DC], pStats->numIters[STAT_TRAN], pStats->numIters[STAT_AC], iTotal); } ngspice-26/src/ciderlib/oned/oneddefs.h0000644000265600020320000000075712264261473017473 0ustar andreasadmin/* * 2001 Paolo Nenzi */ #ifndef ngspice_ONEDDEFS_H #define ngspice_ONEDDEFS_H /* Debug statements */ extern BOOLEAN ONEacDebug; extern BOOLEAN ONEdcDebug; extern BOOLEAN ONEtranDebug; extern BOOLEAN ONEjacDebug; /* Now some defines for the one dimensional simulator * library. * Theese defines were gathered from all the code in * oned directory. */ #define LEVEL_ALPHA_SI 3.1e-8 /* From de Graaf & Klaasen, pg. 12 */ #define MIN_DELV 1e-3 #define NORM_RED_MAXITERS 10 #endif ngspice-26/src/ciderlib/oned/onefreez.c0000644000265600020320000000553512264261473017513 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/onemesh.h" #include "../../maths/misc/accuracy.h" #include "onedext.h" #include "oneddefs.h" void ONEQfreezeOut(ONEnode *pNode, double *ndFac, double *naFac, double *dNdFac, double *dNaFac) { double temp1, temp2; double eLev; ONEmaterial *info; if (pNode->pRightElem && pNode->pRightElem->evalNodes[0]) { info = pNode->pRightElem->matlInfo; } else { info = pNode->pLeftElem->matlInfo; } eLev = info->eDon; if (info->material != GAAS) { eLev -= LEVEL_ALPHA_SI * pow(pNode->nd * NNorm, 1.0 / 3.0); if (eLev < 0.0) eLev = 0.0; } if (eLev >= ExpLim) { *ndFac = 0.0; *dNdFac = 0.0; } else if (eLev <= -ExpLim) { *ndFac = 1.0; *dNdFac = 0.0; } else { temp1 = info->gDon * pNode->nConc * NNorm * exp(eLev) / info->nc0; temp2 = 1.0 / (1.0 + temp1); *ndFac = temp2; *dNdFac = -temp2 * temp2 * temp1; } eLev = info->eAcc; if (info->material != GAAS) { eLev -= LEVEL_ALPHA_SI * pow(pNode->na * NNorm, 1.0 / 3.0); if (eLev < 0.0) eLev = 0.0; } if (eLev >= ExpLim) { *naFac = 0.0; *dNaFac = 0.0; } else if (eLev <= -ExpLim) { *naFac = 1.0; *dNaFac = 0.0; } else { temp1 = info->gAcc * pNode->pConc * NNorm * exp(eLev) / info->nv0; temp2 = 1.0 / (1.0 + temp1); *naFac = temp2; *dNaFac = temp2 * temp2 * temp1; } } void ONE_freezeOut(ONEnode *pNode, double nConc, double pConc, double *ndFac, double *naFac, double *dNdFac, double *dNaFac) { double temp1, temp2; double eLev; ONEmaterial *info; if (pNode->pRightElem && pNode->pRightElem->evalNodes[0]) { info = pNode->pRightElem->matlInfo; } else { info = pNode->pLeftElem->matlInfo; } eLev = info->eDon; if (info->material != GAAS) { eLev -= LEVEL_ALPHA_SI * pow(pNode->nd * NNorm, 1.0 / 3.0); if (eLev < 0.0) eLev = 0.0; } if (eLev >= ExpLim) { *ndFac = 0.0; *dNdFac = 0.0; } else if (eLev <= -ExpLim) { *ndFac = 1.0; *dNdFac = 0.0; } else { temp1 = info->gDon * exp(eLev) * NNorm / info->nc0; temp2 = 1.0 / (1.0 + nConc * temp1); *ndFac = temp2; *dNdFac = -temp2 * temp2 * temp1; } eLev = info->eAcc; if (info->material != GAAS) { eLev -= LEVEL_ALPHA_SI * pow(pNode->na * NNorm, 1.0 / 3.0); if (eLev < 0.0) eLev = 0.0; } if (eLev >= ExpLim) { *naFac = 0.0; *dNaFac = 0.0; } else if (eLev <= -ExpLim) { *naFac = 1.0; *dNaFac = 0.0; } else { temp1 = info->gAcc * exp(eLev) * NNorm / info->nv0; temp2 = 1.0 / (1.0 + pConc * temp1); *naFac = temp2; *dNaFac = -temp2 * temp2 * temp1; } } ngspice-26/src/ciderlib/oned/onedext.h0000644000265600020320000001022312264261473017337 0ustar andreasadmin/* * 2001 Paolo Nenzi */ /* External symbols for ONE Dimensional simulator */ #ifndef ngspice_ONEDEXT_H #define ngspice_ONEDEXT_H #include "ngspice/profile.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/carddefs.h" #include "ngspice/bool.h" #include "ngspice/complex.h" /* oneadmit.c */ extern int NUMDadmittance(ONEdevice *, double, SPcomplex *); extern int NBJTadmittance(ONEdevice *, double, SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *); extern BOOLEAN ONEsorSolve(ONEdevice *, double *, double *, double omega); extern void NUMDys(ONEdevice *, SPcomplex *, SPcomplex *); extern void NBJTys(ONEdevice *,SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *, SPcomplex *); extern SPcomplex *computeAdmittance(ONEnode *, BOOLEAN, double *xReal, double *,SPcomplex *); /* oneaval.c */ extern double ONEavalanche(BOOLEAN, ONEdevice *, ONEnode *); /* onecond.c */ extern void NUMDconductance(ONEdevice *, BOOLEAN, double *, double *); extern void NBJTconductance(ONEdevice *, BOOLEAN, double *, double *, double *, double *, double *); extern void NUMDcurrent(ONEdevice *, BOOLEAN, double *, double *); extern void NBJTcurrent(ONEdevice *, BOOLEAN, double *, double *, double *); /* onecont */ extern void ONE_jacBuild(ONEdevice *); extern void ONE_sysLoad(ONEdevice *, BOOLEAN, ONEtranInfo *); extern void ONE_jacLoad(ONEdevice *); extern void ONE_rhsLoad(ONEdevice *, BOOLEAN, ONEtranInfo *); extern void ONE_commonTerms(ONEdevice *, BOOLEAN, BOOLEAN, ONEtranInfo *); /* onedest */ extern void ONEdestroy(ONEdevice *); /* onedopng.c */ extern double ONEdopingValue(DOPprofile *, DOPtable *, double ); extern void ONEsetDoping(ONEdevice *, DOPprofile *, DOPtable *); /* onefreez.c */ extern void ONEQfreezeOut(ONEnode *, double *, double *, double *, double *); extern void ONE_freezeOut(ONEnode *, double, double, double *, double*, double *, double *); /* onemesh.c */ extern void ONEbuildMesh(ONEdevice *, ONEcoord *, ONEdomain *, ONEmaterial *); extern void ONEgetStatePointers(ONEdevice *, int *); extern void adjustBaseContact(ONEdevice *, int, int); extern void NBJTjunctions(ONEdevice *, int *, int *); extern void ONEprnMesh(ONEdevice *); /* onepoiss.c */ extern void ONEQjacBuild(ONEdevice *); extern void ONEQsysLoad(ONEdevice *); extern void ONEQrhsLoad(ONEdevice *); extern void ONEQcommonTerms(ONEdevice *); /*oneprint.c */ extern void ONEprnSolution(FILE *, ONEdevice *, OUTPcard *); extern void ONEmemStats(FILE *, ONEdevice *); extern void ONEcpuStats(FILE *f, ONEdevice *); /* oneproj.c */ extern void NUMDproject(ONEdevice *, double); extern void NBJTproject(ONEdevice *, double, double, double); extern void NUMDupdate(ONEdevice *,double, BOOLEAN); extern void NBJTupdate(ONEdevice *, double, double, double, BOOLEAN); extern void NUMDsetBCs(ONEdevice *, double); extern void NBJTsetBCs(ONEdevice *, double, double); /* oneread.c */ extern int ONEreadState(ONEdevice *, char *, int, double *, double *); /*onesetup.c */ extern void ONEsetup(ONEdevice *); extern void ONEsetBCparams(ONEdevice *, BDRYcard *, CONTcard *); extern void ONEnormalize(ONEdevice *); /* onesolve.c */ extern void ONEdcSolve(ONEdevice *, int, BOOLEAN, BOOLEAN, ONEtranInfo *); extern BOOLEAN ONEpsiDeltaConverged(ONEdevice *, int *); extern BOOLEAN ONEdeltaConverged(ONEdevice *); extern void ONEresetJacobian(ONEdevice *); extern void ONEstoreNeutralGuess(ONEdevice *); extern void ONEequilSolve(ONEdevice *); extern void ONEbiasSolve(ONEdevice *, int, BOOLEAN, ONEtranInfo *); extern void ONEstoreEquilibGuess(ONEdevice *); extern void ONEstoreInitialGuess(ONEdevice *); extern int ONEnewDelta(ONEdevice *, BOOLEAN, ONEtranInfo *); extern double ONEtrunc(ONEdevice *, ONEtranInfo *, double); extern void ONEsaveState(ONEdevice *); extern double ONEnuNorm(ONEdevice *); extern void ONEjacCheck(ONEdevice *, BOOLEAN, ONEtranInfo *); extern void ONEpredict(ONEdevice *, ONEtranInfo *); extern BOOLEAN ONEdeviceConverged(ONEdevice *); #endif ngspice-26/src/ciderlib/oned/onesetup.c0000644000265600020320000001445212264261473017536 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /********** One-Dimensional Numerical Device Setup Routines **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/carddefs.h" /* XXX Not really modular if we need this. */ /* #include "material.h" */ #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" /* compute node parameters */ void ONEsetup(ONEdevice *pDevice) { double temp1, deltaEg, avgConc, totalConc, absNetConc; double ncv0, dBand, dNie, psiBand[2]; int index, eIndex; ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; ONEmaterial *info; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; info = pElem->matlInfo; pElem->dx = pElem->pRightNode->x - pElem->pLeftNode->x; pElem->epsRel = info->eps; if (pElem->elemType == INSULATOR) { for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType == CONTACT) { pNode->eaff = PHI_METAL; pNode->eg = 0.0; } else { pNode->eaff = info->affin; pNode->eg = info->eg0; } } } } else if (pElem->elemType == SEMICON) { ncv0 = sqrt(info->nc0) * sqrt(info->nv0); for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; /* Fixed Interface Charge */ pNode->qf = 0.0; /* Narrowing of Energy Band-Gap */ if (BandGapNarrowing) { absNetConc = ABS(pNode->netConc); if (pNode->netConc > 0.0) { temp1 = log(absNetConc / info->nrefBGN[ELEC]); deltaEg = -info->dEgDn[ELEC] * (temp1 + sqrt(temp1 * temp1 + 0.5)); pNode->eg = info->eg0 + deltaEg; } else if (pNode->netConc < 0.0) { temp1 = log(absNetConc / info->nrefBGN[HOLE]); deltaEg = -info->dEgDn[HOLE] * (temp1 + sqrt(temp1 * temp1 + 0.5)); pNode->eg = info->eg0 + deltaEg; } else { pNode->eg = info->eg0; } } else { pNode->eg = info->eg0; } pNode->nie = ncv0 * exp(-0.5 * pNode->eg / Vt); pNode->eaff = info->affin; /* Save band structure parameter. */ psiBand[index] = -info->refPsi; /* Ionized-Impurity-Scattering Reduction of Carrier Lifetime */ if (ConcDepLifetime) { totalConc = pNode->totalConc; temp1 = 1.0 / (1.0 + totalConc / info->nrefSRH[ELEC]); pNode->tn = info->tau0[ELEC] * temp1; temp1 = 1.0 / (1.0 + totalConc / info->nrefSRH[HOLE]); pNode->tp = info->tau0[HOLE] * temp1; } else { pNode->tn = info->tau0[ELEC]; pNode->tp = info->tau0[HOLE]; } } } pEdge = pElem->pEdge; /* Variable Band Built-In Potential */ dBand = psiBand[1] - psiBand[0]; dNie = log(pElem->pNodes[1]->nie / pElem->pNodes[0]->nie); pEdge->dCBand = dBand + dNie; pEdge->dVBand = -dBand + dNie; /* Evaluate conc.-dep. mobility. */ avgConc = 0.5 * (pElem->pRightNode->totalConc + pElem->pLeftNode->totalConc); MOBconcDep(info, avgConc, &pEdge->mun, &pEdge->mup); } } } /* Transfer BC info from bdry to nodes and edges. */ static void ONEcopyBCinfo(ONEdevice *pDevice, ONEelem *pElem, BDRYcard *bdry, int index) { ONEnode *pNode; ONEelem *pNElem; int eIndex; double length; NG_IGNORE(pDevice); /* First add fixed charge. */ pNode = pElem->pNodes[index]; pNode->qf += bdry->BDRYqf; /* Now add surface recombination. */ /* Compute semiconductor length around this node. */ length = 0.0; for (eIndex = 0; eIndex <= 3; eIndex++) { pNElem = pNode->pElems[eIndex]; if ((pNElem != NULL) && (pElem->elemType == SEMICON)) { length += 0.5 * pElem->dx; } } if (bdry->BDRYsnGiven) { pNode->tn = pNode->tn / (1.0 + ((bdry->BDRYsn * TNorm) * pNode->tn) / length); } if (bdry->BDRYspGiven) { pNode->tp = pNode->tp / (1.0 + ((bdry->BDRYsp * TNorm) * pNode->tp) / length); } /* Finally, surface layer is irrelevant for 1d devices. */ } /* Compute boundary condition parameters. */ void ONEsetBCparams(ONEdevice *pDevice, BDRYcard *bdryList, CONTcard *contList) { int index, xIndex; ONEelem *pElem, *pNElem; BDRYcard *bdry; CONTcard *cont; for (bdry = bdryList; bdry != NULL; bdry = bdry->BDRYnextCard) { for (xIndex = bdry->BDRYixLow; xIndex < bdry->BDRYixHigh; xIndex++) { pElem = pDevice->elemArray[xIndex]; if (pElem != NULL) { if (pElem->domain == bdry->BDRYdomain) { for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNElem = pElem->pElems[index]; if (bdry->BDRYneighborGiven) { if (pNElem && (pNElem->domain == bdry->BDRYneighbor)) { /* Found an interface node. */ ONEcopyBCinfo(pDevice, pElem, bdry, index); } } else { if ((!pNElem) || (pNElem->domain != pElem->domain)) { /* Found a boundary node. */ ONEcopyBCinfo(pDevice, pElem, bdry, index); } } } } } } } } for (cont = contList; cont != NULL; cont = cont->CONTnextCard) { if (!cont->CONTworkfunGiven) { cont->CONTworkfun = PHI_METAL; } /* * XXX This won't work right if someone tries to change the 1d BJT base * contact workfunction and doesn't want to change the emitter. But no * one will probably try to do that. */ if (cont->CONTnumber == 1) { pDevice->elemArray[1]->pNodes[0]->eaff = cont->CONTworkfun; } else if ((cont->CONTnumber == 2) || (cont->CONTnumber == 3)) { pDevice->elemArray[pDevice->numNodes - 1]->pNodes[1]->eaff = cont->CONTworkfun; } } } void ONEnormalize(ONEdevice *pDevice) { int index, eIndex; ONEelem *pElem; ONEnode *pNode; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; pElem->dx /= LNorm; pElem->rDx = 1.0 / pElem->dx; pElem->epsRel /= EpsNorm; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; pNode->netConc /= NNorm; pNode->nd /= NNorm; pNode->na /= NNorm; pNode->qf /= (NNorm * LNorm); pNode->nie /= NNorm; pNode->eg /= VNorm; pNode->eaff /= VNorm; } } } } ngspice-26/src/ciderlib/oned/onesolve.c0000644000265600020320000007543112264261473017532 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Functions needed to calculate solutions for 1D devices. */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onedev.h" #include "ngspice/onemesh.h" #include "ngspice/spmatrix.h" #include "ngspice/bool.h" #include "ngspice/macros.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" #include "../../maths/misc/norm.h" #include "ngspice/ifsim.h" extern IFfrontEnd *SPfrontEnd; /* The iteration driving loop and convergence check */ void ONEdcSolve(ONEdevice *pDevice, int iterationLimit, BOOLEAN newSolver, BOOLEAN tranAnalysis, ONEtranInfo *info) { ONEnode *pNode; ONEelem *pElem; int index, eIndex, error; int timesConverged = 0, negConc = FALSE; int size = pDevice->numEqns; BOOLEAN quitLoop; BOOLEAN debug = FALSE; double *rhs = pDevice->rhs; /* double *intermediate = pDevice->copiedSolution; */ double *solution = pDevice->dcSolution; double *delta = pDevice->dcDeltaSolution; double poissNorm, contNorm; double startTime, totalStartTime; double totalTime, loadTime, factorTime, solveTime, updateTime, checkTime; double orderTime = 0.0; quitLoop = FALSE; debug = (!tranAnalysis && ONEdcDebug) ||(tranAnalysis && ONEtranDebug); pDevice->iterationNumber = 0; pDevice->converged = FALSE; totalTime = loadTime = factorTime = solveTime = updateTime = checkTime = 0.0; totalStartTime = SPfrontEnd->IFseconds(); if (debug) { if (pDevice->poissonOnly) { fprintf(stdout, "Equilibrium Solution:\n"); } else { fprintf(stdout, "Bias Solution:\n"); } fprintf(stdout, "Iteration RHS Norm\n"); } while (! (pDevice->converged || pDevice->iterationNumber > iterationLimit || quitLoop)) { pDevice->iterationNumber++; if ((!pDevice->poissonOnly) && (iterationLimit > 0) &&(!tranAnalysis)) { ONEjacCheck(pDevice, tranAnalysis, info); } /* LOAD */ startTime = SPfrontEnd->IFseconds(); if (pDevice->poissonOnly) { ONEQsysLoad(pDevice); } else { ONE_sysLoad(pDevice, tranAnalysis, info); } pDevice->rhsNorm = maxNorm(rhs, size); loadTime += SPfrontEnd->IFseconds() - startTime; if (debug) { fprintf(stdout, "%7d %11.4e%s\n", pDevice->iterationNumber - 1, pDevice->rhsNorm, negConc ? " negative conc encountered" : ""); negConc = FALSE; } /* FACTOR */ startTime = SPfrontEnd->IFseconds(); error = spFactor(pDevice->matrix); factorTime += SPfrontEnd->IFseconds() - startTime; if (newSolver) { if (pDevice->iterationNumber == 1) { orderTime = factorTime; } else if (pDevice->iterationNumber == 2) { orderTime -= factorTime - orderTime; factorTime -= orderTime; if (pDevice->poissonOnly) { pDevice->pStats->orderTime[STAT_SETUP] += orderTime; } else { pDevice->pStats->orderTime[STAT_DC] += orderTime; } newSolver = FALSE; } } if (foundError(error)) { if (error == spSINGULAR) { int badRow, badCol; spWhereSingular(pDevice->matrix, &badRow, &badCol); printf("***** singular at (%d,%d)\n", badRow, badCol); } /* Should probably try to recover now, but we'll punt instead. */ exit(-1); } /* SOLVE */ startTime = SPfrontEnd->IFseconds(); spSolve(pDevice->matrix, rhs, delta, NULL, NULL); solveTime += SPfrontEnd->IFseconds() - startTime; /* UPDATE */ startTime = SPfrontEnd->IFseconds(); /* * Use norm reducing Newton method only for DC bias solutions. Since norm * reducing can get trapped by numerical errors, turn it off when we are * somewhat close to the solution. */ if ((!pDevice->poissonOnly) && (iterationLimit > 0) && (!tranAnalysis) && (pDevice->rhsNorm > 1e-6)) { error = ONEnewDelta(pDevice, tranAnalysis, info); if (error) { pDevice->converged = FALSE; quitLoop = TRUE; updateTime += SPfrontEnd->IFseconds() - startTime; continue; } } for (index = 1; index <= size; index++) { solution[index] += delta[index]; } updateTime += SPfrontEnd->IFseconds() - startTime; /* CHECK CONVERGENCE */ startTime = SPfrontEnd->IFseconds(); /* Check if updates have gotten sufficiently small. */ if (pDevice->iterationNumber != 1) { /* * pDevice->converged = ONEdeltaConverged(pDevice); */ pDevice->converged = ONEpsiDeltaConverged(pDevice, &negConc); } /* Check if the rhs residual is smaller than abstol. */ if (pDevice->converged &&(!pDevice->poissonOnly) &&(!tranAnalysis)) { ONE_rhsLoad(pDevice, tranAnalysis, info); pDevice->rhsNorm = maxNorm(rhs, size); if (pDevice->rhsNorm > pDevice->abstol) { pDevice->converged = FALSE; } if ((++timesConverged >= 2) &&(pDevice->rhsNorm < 1e3 * pDevice->abstol)) { pDevice->converged = TRUE; } else if (timesConverged >= 5) { pDevice->converged = FALSE; quitLoop = TRUE; } } else if (pDevice->converged && pDevice->poissonOnly) { ONEQrhsLoad(pDevice); pDevice->rhsNorm = maxNorm(rhs, size); if (pDevice->rhsNorm > pDevice->abstol) { pDevice->converged = FALSE; } if (++timesConverged >= 5) { pDevice->converged = TRUE; } } /* Check if any of the carrier concentrations are negative. */ if (pDevice->converged &&(!pDevice->poissonOnly)) { /* Clear garbage entry since carrier-free elements reference it */ solution[0] = 0.0; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (solution[pNode->nEqn] < 0.0) { pDevice->converged = FALSE; negConc = TRUE; if (tranAnalysis) { quitLoop = TRUE; } else { solution[pNode->nEqn] = 0.0; } } if (solution[pNode->pEqn] < 0.0) { pDevice->converged = FALSE; negConc = TRUE; if (tranAnalysis) { quitLoop = TRUE; } else { solution[pNode->pEqn] = 0.0; } } } } } /* Set to a consistent state if negative conc was encountered. */ if (!pDevice->converged) { ONE_rhsLoad(pDevice, tranAnalysis, info); pDevice->rhsNorm = maxNorm(rhs, size); } } checkTime += SPfrontEnd->IFseconds() - startTime; } totalTime += SPfrontEnd->IFseconds() - totalStartTime; if (tranAnalysis) { pDevice->pStats->loadTime[STAT_TRAN] += loadTime; pDevice->pStats->factorTime[STAT_TRAN] += factorTime; pDevice->pStats->solveTime[STAT_TRAN] += solveTime; pDevice->pStats->updateTime[STAT_TRAN] += updateTime; pDevice->pStats->checkTime[STAT_TRAN] += checkTime; pDevice->pStats->numIters[STAT_TRAN] += pDevice->iterationNumber; } else if (pDevice->poissonOnly) { pDevice->pStats->loadTime[STAT_SETUP] += loadTime; pDevice->pStats->factorTime[STAT_SETUP] += factorTime; pDevice->pStats->solveTime[STAT_SETUP] += solveTime; pDevice->pStats->updateTime[STAT_SETUP] += updateTime; pDevice->pStats->checkTime[STAT_SETUP] += checkTime; pDevice->pStats->numIters[STAT_SETUP] += pDevice->iterationNumber; } else { pDevice->pStats->loadTime[STAT_DC] += loadTime; pDevice->pStats->factorTime[STAT_DC] += factorTime; pDevice->pStats->solveTime[STAT_DC] += solveTime; pDevice->pStats->updateTime[STAT_DC] += updateTime; pDevice->pStats->checkTime[STAT_DC] += checkTime; pDevice->pStats->numIters[STAT_DC] += pDevice->iterationNumber; } if (debug) { if (!tranAnalysis) { pDevice->rhsNorm = maxNorm(rhs, size); fprintf(stdout, "%7d %11.4e%s\n", pDevice->iterationNumber, pDevice->rhsNorm, negConc ? " negative conc in solution" : ""); } if (pDevice->converged) { if (!pDevice->poissonOnly) { rhs[0] = 0.0; poissNorm = contNorm = 0.0; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; poissNorm = MAX(poissNorm, ABS(rhs[pNode->psiEqn])); contNorm = MAX(contNorm, ABS(rhs[pNode->nEqn])); contNorm = MAX(contNorm, ABS(rhs[pNode->pEqn])); } } } fprintf(stdout, "Residual: %11.4e C/um^2 poisson, %11.4e A/um^2 continuity\n", poissNorm * EpsNorm * ENorm * 1e-8, contNorm * JNorm * 1e-8); } else { fprintf(stdout, "Residual: %11.4e C/um^2 poisson\n", pDevice->rhsNorm * EpsNorm * ENorm * 1e-8); } } } } /* * A function that checks convergence based on the convergence of the quasi * Fermi levels. In theory, this should work better than the one currently * being used since we are always looking at potentials: (psi, phin, phip). */ BOOLEAN ONEpsiDeltaConverged(ONEdevice *pDevice, int *pNegConc) { int index, nIndex, eIndex; ONEnode *pNode; ONEelem *pElem; double xOld, xNew, xDelta, tol; double psi, newPsi, nConc, pConc, newN, newP; double phiN, phiP, newPhiN, newPhiP; BOOLEAN converged = TRUE; /* Equilibrium solution. */ if (pDevice->poissonOnly) { for (index = 1; index <= pDevice->numEqns; index++) { xOld = pDevice->dcSolution[index]; xDelta = pDevice->dcDeltaSolution[index]; xNew = xOld + xDelta; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xDelta) > tol) { converged = FALSE; goto done; } } return (converged); } /* Bias solution. Check convergence on psi, phin, phip. */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { /* check convergence on psi */ xOld = pDevice->dcSolution[pNode->psiEqn]; xDelta = pDevice->dcDeltaSolution[pNode->psiEqn]; xNew = xOld + xDelta; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xDelta) > tol) { converged = FALSE; goto done; } } /* check convergence on phin and phip */ if (pElem->elemType == SEMICON && pNode->nodeType != CONTACT) { psi = pDevice->dcSolution[pNode->psiEqn]; nConc = pDevice->dcSolution[pNode->nEqn]; pConc = pDevice->dcSolution[pNode->pEqn]; newPsi = psi + pDevice->dcDeltaSolution[pNode->psiEqn]; newN = nConc + pDevice->dcDeltaSolution[pNode->nEqn]; newP = pConc + pDevice->dcDeltaSolution[pNode->pEqn]; if (newN <= 0.0 || newP <= 0.0) { *pNegConc = TRUE; converged = FALSE; goto done; } phiN = psi - log(nConc / pNode->nie); phiP = psi + log(pConc / pNode->nie); newPhiN = newPsi - log(newN / pNode->nie); newPhiP = newPsi + log(newP / pNode->nie); tol = pDevice->abstol + pDevice->reltol * MAX(ABS(phiN), ABS(newPhiN)); if (ABS(newPhiN - phiN) > tol) { converged = FALSE; goto done; } tol = pDevice->abstol + pDevice->reltol * MAX(ABS(phiP), ABS(newPhiP)); if (ABS(newPhiP - phiP) > tol) { converged = FALSE; goto done; } } } } } done: return (converged); } /* * See if the update to the solution is small enough. Returns TRUE if it is. */ BOOLEAN ONEdeltaConverged(ONEdevice *pDevice) { int index; BOOLEAN converged = TRUE; double *solution = pDevice->dcSolution; double *delta = pDevice->dcDeltaSolution; double xOld, xNew, tol; for (index = 1; index <= pDevice->numEqns; index++) { xOld = solution[index]; xNew = xOld + delta[index]; tol = pDevice->abstol + pDevice->reltol * MAX(ABS(xOld), ABS(xNew)); if (ABS(xOld - xNew) > tol) { converged = FALSE; break; } } return (converged); } /* * See if the update to the solution is small enough and the solution is * physically reasonable. Returns TRUE if it is. */ BOOLEAN ONEdeviceConverged(ONEdevice *pDevice) { int index, eIndex; BOOLEAN converged = TRUE; double *solution = pDevice->dcSolution; ONEnode *pNode; ONEelem *pElem; double startTime; /* * If the update is sufficently small, and the carrier concentrations are * all positive, then return TRUE, else return FALSE. */ /* CHECK CONVERGENCE */ startTime = SPfrontEnd->IFseconds(); if ((converged = ONEdeltaConverged(pDevice)) == TRUE) { for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nEqn != 0 && solution[pNode->nEqn] < 0.0) { converged = FALSE; solution[pNode->nEqn] = pNode->nConc = 0.0; } if (pNode->pEqn != 0 && solution[pNode->pEqn] < 0.0) { converged = FALSE; solution[pNode->pEqn] = pNode->pConc = 0.0; } } } } } pDevice->pStats->checkTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; return (converged); } /* * Load and factor the Jacobian so that it is consistent with the current * solution. */ void ONEresetJacobian(ONEdevice *pDevice) { int error; ONE_jacLoad(pDevice); error = spFactor(pDevice->matrix); if (foundError(error)) { exit(-1); } } /* * Compute the device state assuming charge neutrality exists everywhere in * the device. In insulators, where there is no charge, assign the potential * at half the insulator band gap (refPsi). */ void ONEstoreNeutralGuess(ONEdevice *pDevice) { int nIndex, eIndex; ONEelem *pElem; ONEnode *pNode; double nie, conc, absConc, refPsi, psi, ni, pi, sign; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; refPsi = pElem->matlInfo->refPsi; if (pElem->elemType == INSULATOR) { for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType == CONTACT) { /* * A metal contact to insulating domain, so use work function * difference as the value of psi. */ pNode->psi = RefPsi - pNode->eaff; } else { pNode->psi = refPsi; } } } } if (pElem->elemType == SEMICON) { for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; nie = pNode->nie; conc = pNode->netConc / nie; psi = 0.0; ni = nie; pi = nie; sign = SGN(conc); absConc = ABS(conc); if (conc != 0.0) { psi = sign * log(0.5 * absConc + sqrt(1.0 + 0.25 * absConc * absConc)); ni = nie * exp(psi); pi = nie * exp(-psi); if (FreezeOut) { /* Use Newton's Method to solve for psi. */ int ctr, maxiter = 10; double rhs, deriv, fNa, fNd, fdNa, fdNd; for (ctr = 0; ctr < maxiter; ctr++) { pNode->nConc = ni; pNode->pConc = pi; ONEQfreezeOut(pNode, &fNd, &fNa, &fdNd, &fdNa); rhs = pi - ni + pNode->nd * fNd - pNode->na * fNa; deriv = pi + ni - pNode->nd * fdNd + pNode->na * fdNa; psi += rhs / deriv; ni = nie * exp(psi); pi = nie * exp(-psi); } } } pNode->psi = refPsi + psi; pNode->psi0 = pNode->psi; pNode->vbe = refPsi; pNode->nConc = ni; pNode->pConc = pi; /* Now store the initial guess in the dc solution vector. */ pDevice->dcSolution[pNode->poiEqn] = pNode->psi; } } } } } /* * Compute the device state at thermal equilibrium. This state is equal to * the solution of just Poisson's equation. The charge-neutral solution is * taken as an initial guess. */ void ONEequilSolve(ONEdevice *pDevice) { BOOLEAN newSolver = FALSE; int error; int nIndex, eIndex; ONEelem *pElem; ONEnode *pNode; double startTime, setupTime, miscTime; setupTime = miscTime = 0.0; /* SETUP */ startTime = SPfrontEnd->IFseconds(); switch (pDevice->solverType) { case SLV_SMSIG: case SLV_BIAS: /* free up memory allocated for the bias solution */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); FREE(pDevice->rhsImag); spDestroy(pDevice->matrix); /* FALLTHRU */ case SLV_NONE: pDevice->poissonOnly = TRUE; pDevice->numEqns = pDevice->dimEquil - 1; XCALLOC(pDevice->dcSolution, double, pDevice->dimEquil); XCALLOC(pDevice->dcDeltaSolution, double, pDevice->dimEquil); XCALLOC(pDevice->copiedSolution, double, pDevice->dimEquil); XCALLOC(pDevice->rhs, double, pDevice->dimEquil); pDevice->matrix = spCreate(pDevice->numEqns, 0, &error); if (error == spNO_MEMORY) { printf("ONEequilSolve: Out of Memory\n"); exit(-1); } newSolver = TRUE; spSetReal(pDevice->matrix); ONEQjacBuild(pDevice); pDevice->numOrigEquil = spElementCount(pDevice->matrix); pDevice->numFillEquil = 0; /* FALLTHRU */ case SLV_EQUIL: pDevice->solverType = SLV_EQUIL; break; default: fprintf(stderr, "Panic: Unknown solver type in equil solution.\n"); exit(-1); break; } ONEstoreNeutralGuess(pDevice); setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ ONEdcSolve(pDevice, MaxIterations, newSolver, FALSE, NULL); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); if (newSolver) { pDevice->numFillEquil = spFillinCount(pDevice->matrix); } if (pDevice->converged) { ONEQcommonTerms(pDevice); /* Save equilibrium potential. */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi0 = pNode->psi; } } } } else { printf("ONEequilSolve: No Convergence\n"); } miscTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->setupTime[STAT_SETUP] += setupTime; pDevice->pStats->miscTime[STAT_SETUP] += miscTime; } /* * Compute the device state under an applied bias. The equilibrium solution * is taken as an initial guess the first time this is called. */ void ONEbiasSolve(ONEdevice *pDevice, int iterationLimit, BOOLEAN tranAnalysis, ONEtranInfo *info) { BOOLEAN newSolver = FALSE; int error; int index, eIndex; double *solution; ONEelem *pElem; ONEnode *pNode; double startTime, setupTime, miscTime; setupTime = miscTime = 0.0; /* SETUP */ startTime = SPfrontEnd->IFseconds(); switch (pDevice->solverType) { case SLV_EQUIL: /* Free up the vectors allocated in the equilibrium solution. */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); spDestroy(pDevice->matrix); /* FALLTHRU */ case SLV_NONE: pDevice->poissonOnly = FALSE; pDevice->numEqns = pDevice->dimBias - 1; XCALLOC(pDevice->dcSolution, double, pDevice->dimBias); XCALLOC(pDevice->dcDeltaSolution, double, pDevice->dimBias); XCALLOC(pDevice->copiedSolution, double, pDevice->dimBias); XCALLOC(pDevice->rhs, double, pDevice->dimBias); XCALLOC(pDevice->rhsImag, double, pDevice->dimBias); pDevice->matrix = spCreate(pDevice->numEqns, 1, &error); if (error == spNO_MEMORY) { exit(-1); } newSolver = TRUE; ONE_jacBuild(pDevice); pDevice->numOrigBias = spElementCount(pDevice->matrix); pDevice->numFillBias = 0; ONEstoreInitialGuess(pDevice); /* FALLTHRU */ case SLV_SMSIG: spSetReal(pDevice->matrix); /* FALLTHRU */ case SLV_BIAS: pDevice->solverType = SLV_BIAS; break; default: fprintf(stderr, "Panic: Unknown solver type in bias solution.\n"); exit(-1); break; } setupTime += SPfrontEnd->IFseconds() - startTime; /* SOLVE */ ONEdcSolve(pDevice, iterationLimit, newSolver, tranAnalysis, info); /* MISCELLANEOUS */ startTime = SPfrontEnd->IFseconds(); if (newSolver) { pDevice->numFillBias = spFillinCount(pDevice->matrix); } solution = pDevice->dcSolution; if ((!pDevice->converged) && iterationLimit > 1) { } else if (pDevice->converged) { /* Update the nodal quantities. */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->psiEqn != 0) { pNode->psi = solution[pNode->psiEqn]; } if (pNode->nEqn != 0) { pNode->nConc = solution[pNode->nEqn]; } if (pNode->pEqn != 0) { pNode->pConc = solution[pNode->pEqn]; } } } } /* Update the current terms. */ ONE_commonTerms(pDevice, FALSE, tranAnalysis, info); } else if (iterationLimit <= 1) { for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; if (pNode->nodeType != CONTACT) { pNode->psi = solution[pNode->psiEqn]; pDevice->devState0 [pNode->nodePsi] = pNode->psi; if (pElem->elemType == SEMICON) { pNode->nConc = solution[pNode->nEqn]; pNode->pConc = solution[pNode->pEqn]; pDevice->devState0 [pNode->nodeN] = pNode->nConc; pDevice->devState0 [pNode->nodeP] = pNode->pConc; } } } } } } miscTime += SPfrontEnd->IFseconds() - startTime; if (tranAnalysis) { pDevice->pStats->setupTime[STAT_TRAN] += setupTime; pDevice->pStats->miscTime[STAT_TRAN] += miscTime; } else { pDevice->pStats->setupTime[STAT_DC] += setupTime; pDevice->pStats->miscTime[STAT_DC] += miscTime; } } /* Copy the device's equilibrium state into the solution vector. */ void ONEstoreEquilibGuess(ONEdevice *pDevice) { int nIndex, eIndex; double *solution = pDevice->dcSolution; double refPsi; ONEelem *pElem; ONEnode *pNode; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; refPsi = pElem->matlInfo->refPsi; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { solution[pNode->psiEqn] = pNode->psi0; if (pElem->elemType == SEMICON) { solution[pNode->nEqn] = pNode->nie * exp(pNode->psi0 - refPsi); solution[pNode->pEqn] = pNode->nie * exp(-pNode->psi0 + refPsi); } } } } } } /* Copy the device's internal state into the solution vector. */ void ONEstoreInitialGuess(ONEdevice *pDevice) { int nIndex, eIndex; double *solution = pDevice->dcSolution; ONEelem *pElem; ONEnode *pNode; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pNode->nodeType != CONTACT) { solution[pNode->psiEqn] = pNode->psi; if (pElem->elemType == SEMICON) { solution[pNode->nEqn] = pNode->nConc; solution[pNode->pEqn] = pNode->pConc; } } } } } } int ONEnewDelta(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { int index, iterNum; double newNorm, fib, lambda, fibn, fibp; BOOLEAN acceptable = FALSE, error = FALSE; iterNum = 0; lambda = 1.0; fibn = 1.0; fibp = 1.0; /* * Copy the contents of dcSolution into copiedSolution and modify * dcSolution by adding the deltaSolution. */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->copiedSolution[index] = pDevice->dcSolution[index]; pDevice->dcSolution[index] += pDevice->dcDeltaSolution[index]; } if (pDevice->poissonOnly) { ONEQrhsLoad(pDevice); } else { ONE_rhsLoad(pDevice, tranAnalysis, info); } newNorm = maxNorm(pDevice->rhs, pDevice->numEqns); if (pDevice->rhsNorm <= pDevice->abstol) { lambda = 0.0; newNorm = pDevice->rhsNorm; } else if (newNorm < pDevice->rhsNorm) { acceptable = TRUE; } else { /* chop the step size so that deltax is acceptable */ if (ONEdcDebug) { fprintf(stdout, " %11.4e %11.4e\n", newNorm, lambda); } while (!acceptable) { iterNum++; if (iterNum > NORM_RED_MAXITERS) { error = TRUE; lambda = 0.0; /* Don't break out until after we've reset the device. */ } fib = fibp; fibp = fibn; fibn += fib; lambda *= (fibp / fibn); for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index] + lambda * pDevice->dcDeltaSolution[index]; } if (pDevice->poissonOnly) { ONEQrhsLoad(pDevice); } else { ONE_rhsLoad(pDevice, tranAnalysis, info); } newNorm = maxNorm(pDevice->rhs, pDevice->numEqns); if (error) { break; } if (newNorm <= pDevice->rhsNorm) { acceptable = TRUE; } if (ONEdcDebug) { fprintf(stdout, " %11.4e %11.4e\n", newNorm, lambda); } } } /* Restore the previous dcSolution and store the new deltaSolution. */ pDevice->rhsNorm = newNorm; for (index = 1; index <= pDevice->numEqns; index++) { pDevice->dcSolution[index] = pDevice->copiedSolution[index]; pDevice->dcDeltaSolution[index] *= lambda; } return(error); } /* Predict the values of the internal variables at the next timepoint. */ /* Needed for Predictor-Corrector LTE estimation */ void ONEpredict(ONEdevice *pDevice, ONEtranInfo *info) { int nIndex, eIndex; ONEnode *pNode; ONEelem *pElem; double startTime, miscTime = 0.0; /* TRANSIENT MISC */ startTime = SPfrontEnd->IFseconds(); for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi = pDevice->devState1 [pNode->nodePsi]; if (pElem->elemType == SEMICON && pNode->nodeType != CONTACT) { pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); pNode->nConc = pNode->nPred; pNode->pConc = pNode->pPred; } } } } miscTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->miscTime[STAT_TRAN] += miscTime; } /* Estimate the device's overall truncation error. */ double ONEtrunc(ONEdevice *pDevice, ONEtranInfo *info, double delta) { int nIndex, eIndex; ONEelem *pElem; ONEnode *pNode; double tolN, tolP, lte, relError, temp; double lteCoeff = info->lteCoeff; double mult = 10.0; double reltol; double startTime, lteTime = 0.0; /* TRANSIENT LTE */ startTime = SPfrontEnd->IFseconds(); relError = 0.0; reltol = pDevice->reltol * mult; /* Need to get the predictor for the current order. */ /* The scheme currently used is very dumb. Need to fix later. */ /* XXX Why is the scheme dumb? Never understood this. */ computePredCoeff(info->method, info->order, info->predCoeff, info->delta); for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; if (pElem->elemType == SEMICON && pNode->nodeType != CONTACT) { tolN = pDevice->abstol + reltol * ABS(pNode->nConc); tolP = pDevice->abstol + reltol * ABS(pNode->pConc); pNode->nPred = predict(pDevice->devStates, info, pNode->nodeN); pNode->pPred = predict(pDevice->devStates, info, pNode->nodeP); lte = lteCoeff * (pNode->nConc - pNode->nPred); temp = lte / tolN; relError += temp * temp; lte = lteCoeff * (pNode->pConc - pNode->pPred); temp = lte / tolP; relError += temp * temp; } } } } /* Make sure error is non-zero. */ relError = MAX(pDevice->abstol, relError); /* The total relative error has been calculated norm-2 squared. */ relError = sqrt(relError / pDevice->numEqns); /* Use the order of the integration method to compute new delta. */ temp = delta / pow(relError, 1.0 / (info->order + 1)); lteTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->lteTime += lteTime; return (temp); } /* Save info from state table into the internal state. */ void ONEsaveState(ONEdevice *pDevice) { int nIndex, eIndex; ONEnode *pNode; ONEelem *pElem; for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (nIndex = 0; nIndex <= 1; nIndex++) { if (pElem->evalNodes[nIndex]) { pNode = pElem->pNodes[nIndex]; pNode->psi = pDevice->devState1 [pNode->nodePsi]; if (pElem->elemType == SEMICON && pNode->nodeType != CONTACT) { pNode->nConc = pDevice->devState1 [pNode->nodeN]; pNode->pConc = pDevice->devState1 [pNode->nodeP]; } } } } } /* Function to compute Nu norm of the rhs vector. */ /* Nu-norm calculation based upon work done at Stanford. */ double ONEnuNorm(ONEdevice *pDevice) { /* The LU Decomposed matrix is available. Use it to calculate x. */ spSolve(pDevice->matrix, pDevice->rhs, pDevice->rhsImag, NULL, NULL); /* Compute L2-norm of the solution vector (stored in rhsImag) */ return (l2Norm(pDevice->rhsImag, pDevice->numEqns)); } /* * Check for numerical errors in the Jacobian. Useful debugging aid when new * models are being incorporated. */ void ONEjacCheck(ONEdevice *pDevice, BOOLEAN tranAnalysis, ONEtranInfo *info) { int index, rIndex; double del, diff, tol, *dptr; if (ONEjacDebug) { ONE_sysLoad(pDevice, tranAnalysis, info); /* * spPrint( pDevice->matrix, 0, 1, 1 ); */ pDevice->rhsNorm = maxNorm(pDevice->rhs, pDevice->numEqns); for (index = 1; index <= pDevice->numEqns; index++) { if (1e3 * ABS(pDevice->rhs[index]) > pDevice->rhsNorm) { fprintf(stderr, "eqn %d: res %11.4e, norm %11.4e\n", index, pDevice->rhs[index], pDevice->rhsNorm); } } for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhsImag[index] = pDevice->rhs[index]; } for (index = 1; index <= pDevice->numEqns; index++) { pDevice->copiedSolution[index] = pDevice->dcSolution[index]; del = 1e-4 * pDevice->abstol + 1e-6 * ABS(pDevice->dcSolution[index]); pDevice->dcSolution[index] += del; ONE_rhsLoad(pDevice, tranAnalysis, info); pDevice->dcSolution[index] = pDevice->copiedSolution[index]; for (rIndex = 1; rIndex <= pDevice->numEqns; rIndex++) { diff = (pDevice->rhsImag[rIndex] - pDevice->rhs[rIndex]) / del; dptr = spFindElement(pDevice->matrix, rIndex, index); /* * if ( dptr ISNOT NULL ) { fprintf( stderr, "[%d][%d]: FD = * %11.4e, AJ = %11.4e\n", rIndex, index, diff, *dptr ); } else { * fprintf( stderr, "[%d][%d]: FD = %11.4e, AJ = %11.4e\n", rIndex, * index, diff, 0.0 ); } */ if (dptr != NULL) { tol = (1e-4 * pDevice->abstol) + (1e-2 * MAX(ABS(diff), ABS(*dptr))); if ((diff != 0.0) && (ABS(diff - *dptr) > tol)) { fprintf(stderr, "Mismatch[%d][%d]: FD = %11.4e, AJ = %11.4e\n\t FD-AJ = %11.4e vs. %11.4e\n", rIndex, index, diff, *dptr, ABS(diff - *dptr), tol); } } else { if (diff != 0.0) { fprintf(stderr, "Missing [%d][%d]: FD = %11.4e, AJ = 0.0\n", rIndex, index, diff); } } } } } } ngspice-26/src/ciderlib/oned/oneaval.c0000644000265600020320000001244312264261473017317 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/macros.h" #include "onedext.h" #include "oneddefs.h" double ONEavalanche(BOOLEAN rhsOnly, ONEdevice *pDevice, ONEnode *pNode) { ONEelem *pLElem, *pRElem; ONEedge *pLEdge, *pREdge; int numNodes = pDevice->numNodes; double dJnDpsiPrev, dJpDpsiPrev; double eField, temp, jn, jp; double signE, signN, signP, coeffR, coeffL, alphaN, alphaP; double generation = 0.0; double dAlphaNDpsiM1, dAlphaNDpsi, dAlphaNDpsiP1; double dAlphaPDpsiM1, dAlphaPDpsi, dAlphaPDpsiP1; ONEmaterial *info; pRElem = pNode->pRightElem; pLElem = pNode->pLeftElem; if (pRElem->evalNodes[0]) { info = pRElem->matlInfo; } else { info = pLElem->matlInfo; } pREdge = pRElem->pEdge; pLEdge = pLElem->pEdge; dJnDpsiPrev = pLEdge->dJnDpsiP1; dJpDpsiPrev = pLEdge->dJpDpsiP1; temp = pRElem->dx + pLElem->dx; coeffR = pLElem->dx / temp; coeffL = pRElem->dx / temp; eField = -(coeffR * pREdge->dPsi * pRElem->rDx + coeffL * pLEdge->dPsi * pLElem->rDx); jn = coeffR * pREdge->jn + coeffL * pLEdge->jn; jp = coeffR * pREdge->jp + coeffL * pLEdge->jp; signE = SGN(eField); eField = ABS(eField); if (eField == 0.0) { return (0.0); } signN = SGN(jn); if (signN * signE > 0.0) { /* field accelerates the carriers, hence avalanche */ if (info->bii[ELEC] / eField > 80.0) { alphaN = 0.0; } else { alphaN = info->aii[ELEC] * exp(-info->bii[ELEC] / eField); } } else { alphaN = 0.0; } signP = SGN(jp); if (signP * signE > 0.0) { /* field accelerates the carriers, hence avalanche */ if (info->bii[HOLE] / eField > 80.0) { alphaP = 0.0; } else { alphaP = info->aii[HOLE] * exp(-info->bii[HOLE] / eField); } } else { alphaP = 0.0; } if ((alphaN == 0.0) && (alphaP == 0.0)) { return (generation); } generation = (alphaN * ABS(jn) + alphaP * ABS(jp)) * 0.5 * (pRElem->dx + pLElem->dx); if (rhsOnly) { return (generation); } if (alphaN == 0.0) { dAlphaNDpsiM1 = 0.0; dAlphaNDpsiP1 = 0.0; dAlphaNDpsi = 0.0; } else { temp = alphaN * info->bii[ELEC] / (eField * eField); dAlphaNDpsiM1 = signE * temp * (coeffL * pLElem->rDx); dAlphaNDpsiP1 = -signE * temp * (coeffR * pRElem->rDx); dAlphaNDpsi = -(dAlphaNDpsiM1 + dAlphaNDpsiP1); } if (alphaP == 0.0) { dAlphaPDpsiM1 = 0.0; dAlphaPDpsiP1 = 0.0; dAlphaPDpsi = 0.0; } else { temp = alphaP * info->bii[HOLE] / (eField * eField); dAlphaPDpsiM1 = signE * temp * (coeffL * pLElem->rDx); dAlphaPDpsiP1 = -signE * temp * (coeffR * pRElem->rDx); dAlphaPDpsi = -(dAlphaPDpsiM1 + dAlphaPDpsiP1); } coeffR = 0.5 * pLElem->dx; coeffL = 0.5 * pRElem->dx; if (pNode->nodeI != 2) { *(pNode->fNPsiiM1) += signN * (-alphaN * coeffL * dJnDpsiPrev + coeffL * pLEdge->jn * dAlphaNDpsiM1) + signP * (-alphaP * coeffL * dJpDpsiPrev + coeffL * pLEdge->jp * dAlphaPDpsiM1); *(pNode->fNNiM1) += signN * alphaN * coeffL * pLEdge->dJnDn; *(pNode->fNPiM1) += signP * alphaP * coeffL * pLEdge->dJpDp; *(pNode->fPPsiiM1) -= signN * (-alphaN * coeffL * dJnDpsiPrev + coeffL * pLEdge->jn * dAlphaNDpsiM1) + signP * (-alphaP * coeffL * dJpDpsiPrev + coeffL * pLEdge->jp * dAlphaPDpsiM1); *(pNode->fPPiM1) -= signP * alphaP * coeffL * pLEdge->dJpDp; *(pNode->fPNiM1) -= signN * alphaN * coeffL * pLEdge->dJnDn; } if (pNode->nodeI != numNodes - 1) { *(pNode->fNPsiiP1) += signN * (alphaN * coeffR * pREdge->dJnDpsiP1 + coeffR * pREdge->jn * dAlphaNDpsiP1) + signP * (alphaP * coeffR * pREdge->dJpDpsiP1 + coeffR * pREdge->jp * dAlphaPDpsiP1); *(pNode->fNNiP1) += signN * alphaN * coeffR * pREdge->dJnDnP1; *(pNode->fNPiP1) += signP * alphaP * coeffR * pREdge->dJpDpP1; *(pNode->fPPsiiP1) -= signN * (alphaN * coeffR * pREdge->dJnDpsiP1 + coeffR * pREdge->jn * dAlphaNDpsiP1) + signP * (alphaP * coeffR * pREdge->dJpDpsiP1 + coeffR * pREdge->jp * dAlphaPDpsiP1); *(pNode->fPPiP1) -= signP * alphaP * coeffR * pREdge->dJpDpP1; *(pNode->fPNiP1) -= signN * alphaN * coeffR * pREdge->dJnDnP1; } *(pNode->fNPsi) += signN * (alphaN * (-coeffR * pREdge->dJnDpsiP1 + coeffL * dJnDpsiPrev) + (coeffR * pREdge->jn + coeffL * pLEdge->jn) * dAlphaNDpsi) + signP * (alphaP * (-coeffR * pREdge->dJpDpsiP1 + coeffL * dJpDpsiPrev) + (coeffR * pREdge->jp + coeffL * pLEdge->jp) * dAlphaPDpsi); *(pNode->fNN) += signN * alphaN * (coeffR * pREdge->dJnDn + coeffL * pLEdge->dJnDnP1); *(pNode->fNP) += signP * alphaP * (coeffR * pREdge->dJpDp + coeffL * pLEdge->dJpDpP1); *(pNode->fPPsi) -= signN * (alphaN * (-coeffR * pREdge->dJnDpsiP1 + coeffL * dJnDpsiPrev) + (coeffR * pREdge->jn + coeffL * pLEdge->jn) * dAlphaNDpsi) + signP * (alphaP * (-coeffR * pREdge->dJpDpsiP1 + coeffL * dJpDpsiPrev) + (coeffR * pREdge->jp + coeffL * pLEdge->jp) * dAlphaPDpsi); *(pNode->fPN) -= signN * alphaN * (coeffR * pREdge->dJnDn + coeffL * pLEdge->dJnDnP1); *(pNode->fPP) -= signP * alphaP * (coeffR * pREdge->dJpDp + coeffL * pLEdge->dJpDpP1); return (generation); } ngspice-26/src/ciderlib/oned/onecond.c0000644000265600020320000001676412264261473017331 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* Functions to compute device conductances and currents */ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/macros.h" #include "ngspice/spmatrix.h" #include "onedext.h" #include "oneddefs.h" void NUMDconductance(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *gd) { ONEelem *pElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEnode *pNode; ONEedge *pEdge; int index; double dPsiDv, dNDv, dPDv, *incVpn; *gd = 0.0; /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } /* compute incremental changes due to N contact */ pNode = pElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pElem->epsRel * pElem->rDx; if (pElem->elemType == SEMICON) { pEdge = pElem->pEdge; pDevice->rhs[pNode->nEqn] = -pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] = -pEdge->dJpDpsiP1; } incVpn = pDevice->dcDeltaSolution; spSolve(pDevice->matrix, pDevice->rhs, incVpn, NULL, NULL); pElem = pDevice->elemArray[1]; pNode = pElem->pRightNode; pEdge = pElem->pEdge; dPsiDv = incVpn[pNode->psiEqn]; if (pElem->elemType == SEMICON) { dNDv = incVpn[pNode->nEqn]; dPDv = incVpn[pNode->pEqn]; *gd += pEdge->dJnDpsiP1 * dPsiDv + pEdge->dJnDnP1 * dNDv + pEdge->dJpDpsiP1 * dPsiDv + pEdge->dJpDpP1 * dPDv; } /* For transient analysis, add the displacement term */ if (tranAnalysis) { *gd -= intCoeff[0] * pElem->epsRel * pElem->rDx * dPsiDv; } *gd *= -GNorm * pDevice->area; } void NBJTconductance(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *dIeDVce, double *dIcDVce, double *dIeDVbe, double *dIcDVbe) { ONEelem *pLastElem = pDevice->elemArray[pDevice->numNodes - 1]; ONEelem *pBaseElem = pDevice->elemArray[pDevice->baseIndex - 1]; ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; int index; double dPsiDVce, dPsiDVbe, dNDVce, dNDVbe, dPDVce, dPDVbe; double *incVce, *incVbe; double nConc, pConc; double area = pDevice->area; *dIeDVce = 0.0; *dIcDVce = 0.0; *dIeDVbe = 0.0; *dIcDVbe = 0.0; /* zero the rhs before loading in the new rhs */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } /* store the new rhs for computing CE incremental quantities */ pNode = pLastElem->pLeftNode; pDevice->rhs[pNode->psiEqn] = pLastElem->epsRel * pLastElem->rDx; if (pLastElem->elemType == SEMICON) { pEdge = pLastElem->pEdge; pDevice->rhs[pNode->nEqn] = -pEdge->dJnDpsiP1; pDevice->rhs[pNode->pEqn] = -pEdge->dJpDpsiP1; } incVce = pDevice->dcDeltaSolution; spSolve(pDevice->matrix, pDevice->rhs, incVce, NULL, NULL); /* zero the rhs before loading in the new rhs base contribution */ for (index = 1; index <= pDevice->numEqns; index++) { pDevice->rhs[index] = 0.0; } pNode = pBaseElem->pRightNode; if (pNode->baseType == N_TYPE) { nConc = pDevice->devState0 [pNode->nodeN]; pDevice->rhs[pNode->nEqn] = nConc * pNode->eg; } else if (pNode->baseType == P_TYPE) { pConc = pDevice->devState0 [pNode->nodeP]; pDevice->rhs[pNode->pEqn] = pConc * pNode->eg; } else { printf("NBJTconductance: unknown base type\n"); } incVbe = pDevice->copiedSolution; spSolve(pDevice->matrix, pDevice->rhs, incVbe, NULL, NULL); pElem = pDevice->elemArray[1];/* first element */ pEdge = pElem->pEdge; pNode = pElem->pRightNode; dPsiDVce = incVce[pNode->psiEqn]; dPsiDVbe = incVbe[pNode->psiEqn]; if (pElem->elemType == SEMICON) { dNDVce = incVce[pNode->nEqn]; dPDVce = incVce[pNode->pEqn]; dNDVbe = incVbe[pNode->nEqn]; dPDVbe = incVbe[pNode->pEqn]; *dIeDVce += pEdge->dJnDpsiP1 * dPsiDVce + pEdge->dJnDnP1 * dNDVce + pEdge->dJpDpsiP1 * dPsiDVce + pEdge->dJpDpP1 * dPDVce; *dIeDVbe += pEdge->dJnDpsiP1 * dPsiDVbe + pEdge->dJnDnP1 * dNDVbe + pEdge->dJpDpsiP1 * dPsiDVbe + pEdge->dJpDpP1 * dPDVbe; } /* For transient analysis add the displacement term */ if (tranAnalysis) { *dIeDVce -= intCoeff[0] * pElem->epsRel * dPsiDVce * pElem->rDx; *dIeDVbe -= intCoeff[0] * pElem->epsRel * dPsiDVbe * pElem->rDx; } pElem = pDevice->elemArray[pDevice->numNodes - 1]; /* last element */ pEdge = pElem->pEdge; pNode = pElem->pLeftNode; dPsiDVce = incVce[pNode->psiEqn]; dPsiDVbe = incVbe[pNode->psiEqn]; if (pElem->elemType == SEMICON) { dNDVce = incVce[pNode->nEqn]; dPDVce = incVce[pNode->pEqn]; dNDVbe = incVbe[pNode->nEqn]; dPDVbe = incVbe[pNode->pEqn]; *dIcDVce += -pEdge->dJnDpsiP1 * dPsiDVce + pEdge->dJnDn * dNDVce + -pEdge->dJpDpsiP1 * dPsiDVce + pEdge->dJpDp * dPDVce + /* add terms since adjacent to boundary */ pEdge->dJnDpsiP1 + pEdge->dJpDpsiP1; *dIcDVbe += -pEdge->dJnDpsiP1 * dPsiDVbe + pEdge->dJnDn * dNDVbe + -pEdge->dJpDpsiP1 * dPsiDVbe + pEdge->dJpDp * dPDVbe; } if (tranAnalysis) { *dIcDVce += intCoeff[0] * pElem->epsRel * (dPsiDVce - 1.0) * pElem->rDx; *dIcDVbe += intCoeff[0] * pElem->epsRel * dPsiDVbe * pElem->rDx; } *dIeDVce *= -GNorm * area; *dIcDVce *= -GNorm * area; *dIeDVbe *= -GNorm * area; *dIcDVbe *= -GNorm * area; } void NUMDcurrent(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *id) { ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; double *delta = pDevice->dcDeltaSolution; double dPsi, dN, dP; *id = 0.0; pElem = pDevice->elemArray[1]; pNode = pElem->pRightNode; pEdge = pElem->pEdge; dPsi = delta[pNode->psiEqn]; *id = pEdge->jn + pEdge->jp + pElem->epsRel * pEdge->jd; if (pElem->elemType == SEMICON) { dN = delta[pNode->nEqn]; dP = delta[pNode->pEqn]; *id += pEdge->dJnDpsiP1 * dPsi + pEdge->dJnDnP1 * dN + pEdge->dJpDpsiP1 * dPsi + pEdge->dJpDpP1 * dP; } /* for transient analysis add the displacement term */ if (tranAnalysis) { *id -= intCoeff[0] * pElem->epsRel * pElem->rDx * dPsi; } *id *= JNorm * pDevice->area; } void NBJTcurrent(ONEdevice *pDevice, BOOLEAN tranAnalysis, double *intCoeff, double *ie, double *ic) { ONEnode *pNode; ONEelem *pElem; ONEedge *pEdge; double dPsi, dN, dP; double *solution; solution = pDevice->dcDeltaSolution; /* first edge for calculating ie */ pElem = pDevice->elemArray[1]; pNode = pElem->pRightNode; pEdge = pElem->pEdge; dPsi = solution[pNode->psiEqn]; *ie = pEdge->jn + pEdge->jp + pElem->epsRel * pEdge->jd; if (pElem->elemType == SEMICON) { dN = solution[pNode->nEqn]; dP = solution[pNode->pEqn]; *ie += pEdge->dJnDpsiP1 * dPsi + pEdge->dJnDnP1 * dN + pEdge->dJpDpsiP1 * dPsi + pEdge->dJpDpP1 * dP; } /* for transient analysis add the displacement term */ if (tranAnalysis) { *ie -= intCoeff[0] * pElem->epsRel * dPsi * pElem->rDx; } /* last edge for calculating ic */ pElem = pDevice->elemArray[pDevice->numNodes - 1]; pNode = pElem->pLeftNode; pEdge = pElem->pEdge; dPsi = solution[pNode->psiEqn]; *ic = pEdge->jn + pEdge->jp + pElem->epsRel * pEdge->jd; if (pElem->elemType == SEMICON) { dN = solution[pNode->nEqn]; dP = solution[pNode->pEqn]; *ic += -pEdge->dJnDpsiP1 * dPsi + pEdge->dJnDn * dN + -pEdge->dJpDpsiP1 * dPsi + pEdge->dJpDp * dP; } if (tranAnalysis) { *ic += intCoeff[0] * pElem->epsRel * dPsi * pElem->rDx; } *ic *= -JNorm * pDevice->area; *ie *= -JNorm * pDevice->area; } ngspice-26/src/ciderlib/oned/Makefile.am0000644000265600020320000000075712264261473017567 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcideroned.la libcideroned_la_SOURCES = \ oneadmit.c \ oneaval.c \ onecond.c \ onecont.c \ oneddefs.h \ onedest.c \ onedext.h \ onedopng.c \ onefreez.c \ onemesh.c \ onepoiss.c \ oneprint.c \ oneproj.c \ oneread.c \ onesetup.c \ onesolve.c EXTRA_DIST = notes readme AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/ciderlib/oned/Makefile.in0000644000265600020320000004235112264261534017572 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/ciderlib/oned DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcideroned_la_LIBADD = am_libcideroned_la_OBJECTS = oneadmit.lo oneaval.lo onecond.lo \ onecont.lo onedest.lo onedopng.lo onefreez.lo onemesh.lo \ onepoiss.lo oneprint.lo oneproj.lo oneread.lo onesetup.lo \ onesolve.lo libcideroned_la_OBJECTS = $(am_libcideroned_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcideroned_la_SOURCES) DIST_SOURCES = $(libcideroned_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcideroned.la libcideroned_la_SOURCES = \ oneadmit.c \ oneaval.c \ onecond.c \ onecont.c \ oneddefs.h \ onedest.c \ onedext.h \ onedopng.c \ onefreez.c \ onemesh.c \ onepoiss.c \ oneprint.c \ oneproj.c \ oneread.c \ onesetup.c \ onesolve.c EXTRA_DIST = notes readme AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/ciderlib/oned/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/ciderlib/oned/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcideroned.la: $(libcideroned_la_OBJECTS) $(libcideroned_la_DEPENDENCIES) $(EXTRA_libcideroned_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcideroned_la_OBJECTS) $(libcideroned_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneadmit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneaval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onecond.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onecont.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onedest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onedopng.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onefreez.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onemesh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onepoiss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneproj.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/oneread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onesetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/onesolve.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/ciderlib/oned/onedopng.c0000644000265600020320000000720412264261473017502 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/profile.h" #include "ngspice/macros.h" #include "onedext.h" #include "oneddefs.h" #include "ngspice/cidersupt.h" /* functions in this file are used to calculate the conc */ double ONEdopingValue(DOPprofile *pProfile, DOPtable *pTable, double x) { double argX, argP, value=0.0; /* Find the appropriate lookup table if necessary */ if (pProfile->type == LOOKUP) { while (pTable != NULL) { if (pTable->impId == pProfile->IMPID) { /* Found it */ break; } else { pTable = pTable->next; } } if (pTable == NULL) { fprintf(stderr, "Error: unknown impurity profile %d\n", ((int)pProfile->IMPID)); exit(1); } } /* Find distances */ if (pProfile->X_LOW > x) { argX = pProfile->X_LOW - x; } else if (x > pProfile->X_HIGH) { argX = x - pProfile->X_HIGH; } else { argX = 0.0; } argP = argX; /* Transform to coordinates of profile peak */ argP -= pProfile->LOCATION; argP /= pProfile->CHAR_LENGTH; switch (pProfile->type) { case UNIF: if (argP > 0.0) { value = 0.0; } else { value = pProfile->CONC; } break; case LIN: argP = ABS(argP); if (argP > 1.0) { value = 0.0; } else { value = pProfile->CONC * (1.0 - argP); } break; case GAUSS: argP *= argP; if (argP > 80.0) { value = 0.0; } else { value = pProfile->PEAK_CONC * exp(-argP); } case EXP: argP = ABS(argP); if (argP > 80.0) { value = 0.0; } else { value = pProfile->PEAK_CONC * exp(-argP); } break; case ERRFC: argP = ABS(argP); if (argP > 10.0) { value = 0.0; } else { value = pProfile->PEAK_CONC * erfc(-argP); } break; case LOOKUP: argP = ABS(argP); value = lookup(pTable->dopData, argP); break; default: break; } return (value); } void ONEsetDoping(ONEdevice *pDevice, DOPprofile *pProfile, DOPtable *pTable) { ONEnode *pNode; ONEelem *pElem; DOPprofile *pP; double conc; int index, eIndex; BOOLEAN dopeMe; /* Clear doping info for all nodes. */ for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; pNode->na = 0.0; pNode->nd = 0.0; pNode->netConc = 0.0; pNode->totalConc = 0.0; } } } /* Now compute the contribution to the total doping from each profile. */ for (pP = pProfile; pP != NULL; pP = pP->next) { for (eIndex = 1; eIndex < pDevice->numNodes; eIndex++) { pElem = pDevice->elemArray[eIndex]; if (pElem->elemType == SEMICON) { if (pP->numDomains > 0) { dopeMe = FALSE; for (index = 0; index < pP->numDomains; index++) { if (pElem->domain == pP->domains[index]) { dopeMe = TRUE; break; } } } else { /* domains not given, so dope all */ dopeMe = TRUE; } if (dopeMe) { for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; conc = ONEdopingValue(pP, pTable, pNode->x); pNode->netConc += conc; if (conc < 0.0) { pNode->totalConc -= conc; pNode->na -= conc; } else { pNode->totalConc += conc; pNode->nd += conc; } } } } } } } } ngspice-26/src/ciderlib/oned/onedest.c0000644000265600020320000000325712264261473017336 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numglobs.h" #include "ngspice/numenum.h" #include "ngspice/onedev.h" #include "ngspice/onemesh.h" #include "ngspice/spmatrix.h" #include "onedext.h" #include "oneddefs.h" void ONEdestroy(ONEdevice *pDevice) { int index, eIndex; ONEelem *pElem; ONEnode *pNode; ONEedge *pEdge; if (!pDevice) return; switch (pDevice->solverType) { case SLV_SMSIG: case SLV_BIAS: /* free up memory allocated for the bias solution */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); FREE(pDevice->rhsImag); spDestroy(pDevice->matrix); break; case SLV_EQUIL: /* free up the vectors allocated in the equilibrium solution */ FREE(pDevice->dcSolution); FREE(pDevice->dcDeltaSolution); FREE(pDevice->copiedSolution); FREE(pDevice->rhs); spDestroy(pDevice->matrix); break; case SLV_NONE: break; default: fprintf(stderr, "Panic: Unknown solver type in ONEdestroy.\n"); exit(-1); break; } /* destroy the mesh */ if (pDevice->elemArray) { for (eIndex = 1; eIndex < pDevice->numNodes-1; eIndex++) { pElem = pDevice->elemArray[eIndex]; pEdge = pElem->pEdge; FREE(pEdge); for (index = 0; index <= 1; index++) { if (pElem->evalNodes[index]) { pNode = pElem->pNodes[index]; FREE(pNode); } } FREE(pElem); } FREE(pDevice->elemArray); } /* destroy any other lists */ /* NOT IMPLEMENTED */ FREE(pDevice); } ngspice-26/src/ciderlib/oned/notes0000644000265600020320000000226212264261473016577 0ustar andreasadminSome comments on keeping track of where the solution is: There are 3 places that the internal state variables can be hiding: 1. In the (psi,n,p) triple of a node (pNode). 2. In the solution vectors (dcSolution, copiedSolution). 3. In the state tables (pDevice->devStates[]). To access node variables use: pNode->psi pNode->nConc pNode->pConc To access solution vectors use: solution[ pNode->psiEqn ] solution[ pNode->nEqn ] solution[ pNode->pEqn ] To access state vector X (0,1,etc.) use: *(pDevice->devStateX + pNode->nodePsi) *(pDevice->devStateX + pNode->nodeN) *(pDevice->devStateX + pNode->nodeP) There are several functions that copy from one form of these to another: storeInitialGuess: dcSolution <- nodevars biasSolve: nodevars <- dcSolution (DC) state0 <- nodevars <- dcSolution (Transient) saveState: nodevars <- state1 (Transient) In addition the main device-level Newton iteration copies during the computation of currents and derivatives: state0 <- dcSolution and the function predict() does a forward prediction step using the previous state: nodevars <- predict(state1) (Transient) ngspice-26/src/nghelp.c0000644000265600020320000000433512264261473014446 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * The main routine for the help system in stand-alone mode. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/hlpdefs.h" #include "frontend/variable.h" #ifndef X_DISPLAY_MISSING Widget toplevel; #endif FILE *cp_in, *cp_out, *cp_err; /* dummy declaration so CP.a doesn't pull in lexical.o and other objects */ bool cp_interactive = FALSE; char *hlp_filelist[] = { "ngspice", 0 }; extern void ivars(char*); #ifdef HAS_WINGUI FILE *flogp; /* hvogt 15.12.2001 */ #endif /* HAS_WINGUI */ int #ifdef HAS_WINGUI xmain(int ac, char **av) #else main(int ac, char **av) #endif /* HAS_WINGUI */ { wordlist *wl = NULL; #ifndef X_DISPLAY_MISSING char *displayname; /* grrr, Xtk forced contortions */ char *argv[2]; int argc = 2; char buf[512]; #endif /* X_DISPLAY_MISSING */ ivars(NULL); cp_in = stdin; cp_out = stdout; cp_err = stderr; #ifndef X_DISPLAY_MISSING if (cp_getvar("display", CP_STRING, buf)) { displayname = buf; } else if (!(displayname = getenv("DISPLAY"))) { fprintf(stderr, "Can't open X display."); goto out; } argv[0] = "nutmeg"; argv[1] = displayname; /* initialize X toolkit */ toplevel = XtInitialize("nutmeg", "Nutmeg", NULL, 0, &argc, argv); out: #endif /* X_DISPLAY_MISSING */ if (ac > 1) wl = wl_build(av + 1); hlp_main(Help_Path, wl); #ifndef X_DISPLAY_MISSING if (hlp_usex) { printf("Hit control-C when done.\n"); /* sigh */ XtMainLoop(); } #endif /* X_DISPLAY_MISSING */ #ifdef HAS_WINGUI /* Keep window open untill a key is pressed */ printf("Press a key to quit\n"); while( getchar() == EOF) {} #endif /* HAS_WINGUI */ return EXIT_NORMAL; } /* void fatal(char *s) { fprintf(stderr, "fatal error: %s\n", s); exit(1); } There is a conflict with another cp_printword in cp/quote.c static void cp_printword(s) char *s; { printf("%s", s); return; } */ bool cp_getvar(char *n, enum cp_types type, void *r) { return (FALSE); } char * cp_tildexpand(char *s) { return tildexpand(s); } ngspice-26/src/frontend/0000755000265600020320000000000012264261704014634 5ustar andreasadminngspice-26/src/frontend/com_setscale.h0000644000265600020320000000021012264261473017442 0ustar andreasadmin#ifndef ngspice_COM_SETSCALE_H #define ngspice_COM_SETSCALE_H #include "ngspice/wordlist.h" void com_setscale(wordlist *wl); #endif ngspice-26/src/frontend/circuits.h0000644000265600020320000000032512264261473016635 0ustar andreasadmin/************* * Header file for circuits.c * 1999 E. Rouat ************/ #ifndef ngspice_CIRCUITS_H #define ngspice_CIRCUITS_H struct subcirc { char *sc_name; /* Whatever... */ }; #endif ngspice-26/src/frontend/display.h0000644000265600020320000000203612264261473016456 0ustar andreasadmin/************* * Header file for display.c * 1999 E. Rouat ************/ /* See if we have been already included */ #ifndef ngspice_DISPLAY_H #define ngspice_DISPLAY_H /* Include a bunch of other stuff to make display.h work */ #include "ngspice/ftedev.h" #include "ngspice/fteinput.h" #include "ngspice/graph.h" DISPDEVICE *FindDev(char *name); void DevInit(void); int NewViewport(GRAPH *pgraph); void DevClose(void); void DevClear(void); void DevDrawLine(int x1, int y1, int x2, int y2); void DevDrawArc(int x0, int y0, int radius, double theta, double delta_theta); void DevDrawText(char *text, int x, int y); void DefineColor(int colorid, double red, double green, double blue); void DefineLinestyle(int linestyleid, int mask); void SetLinestyle(int linestyleid); void SetColor(int colorid); void DevUpdate(void); void DatatoScreen(GRAPH *graph, double x, double y, int *screenx, int *screeny); void Input(REQUEST *request, RESPONSE *response); void SaveText(GRAPH *graph, char *text, int x, int y); int DevSwitch(char *devname); #endif ngspice-26/src/frontend/shyu.c0000644000265600020320000003101312264261473015771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* Do a run of the circuit, of the given type. Type "resume" is special -- * it means to resume whatever simulation that was in progress. The * return value of this routine is 0 if the exit was ok, and 1 if there was * a reason to interrupt the circuit (interrupt typed at the keyboard, * error in the simulation, etc). args should be the entire command line, * e.g. "tran 1 10 20 uic" */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteinp.h" #include "ngspice/sim.h" #include "ngspice/devdefs.h" #include "ngspice/inpdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/ifsim.h" #include "circuits.h" #include "shyu.h" int if_sens_run(CKTcircuit *ckt, wordlist *args, INPtables *tab) { JOB *senseJob; JOB *opJob; card *current; IFvalue ptemp; IFvalue *parm; char buf[BSIZE_SP]; int err; char *token; char *steptype; char *name; char *line; card deck; int error; int save; int flag = 0; int which = -1; (void) sprintf(buf, ".%s", wl_flatten(args)); deck.nextcard = NULL; deck.actualLine = NULL; deck.error = NULL; deck.linenum = 0; deck.linenum_orig = 0; deck.line = buf; current = (card *) &deck; line = current->line; INPgetTok(&line, &token, 1); if (ft_curckt->ci_specTask) { err = ft_sim->deleteTask (ft_curckt->ci_ckt, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "deleteTask"); return (0); /* temporary */ } } err = ft_sim->newTask (ft_curckt->ci_ckt, &(ft_curckt->ci_specTask), "special", & (ft_curckt->ci_defTask)); if (err) { ft_sperror(err, "newTask"); return (0); /* temporary */ } which = ft_find_analysis("options"); if (which == -1) { /* in DEEP trouble */ ft_sperror(err, "in DEEP trouble"); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "options", & (ft_curckt->ci_specOpt), ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createOptions"); return (0); /* temporary */ } ft_curckt->ci_curOpt = ft_curckt->ci_specOpt; ft_curckt->ci_curTask = ft_curckt->ci_specTask; which = ft_find_analysis("SEN"); if (which == -1) { current->error = INPerrCat( current->error, INPmkTemp("sensetivity analysis unsupported\n")); return (0); } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "sense", & senseJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createSense"); return (0); /* temporary */ } save = which; INPgetTok(&line, &token, 1); if (strcmp(token, "ac") == 0) { JOB *acJob; which = ft_find_analysis("AC"); if (which == -1) { current->error = INPerrCat (current->error, INPmkTemp("ac analysis unsupported\n")); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "acan", & acJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createAC"); /* or similar error message */ return (0); /* temporary */ } INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */ ptemp.iValue = 1; error = INPapName(ckt, which, acJob, steptype, &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab);/* number of points*/ error = INPapName(ckt, which, acJob, "numsteps", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */ error = INPapName(ckt, which, acJob, "start", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */ error = INPapName(ckt, which, acJob, "stop", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); } if (strcmp(token, "op") == 0) { which = ft_find_analysis("DCOP"); if (which == -1) { current->error = INPerrCat (current->error, INPmkTemp("DC operating point analysis unsupported\n")); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "dcop", & opJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createOP"); /* or similar error message */ return (0); } } if (strcmp(token, "dc") == 0) { JOB *dcJob; /* .dc SRC1NAME Vstart1 Vstop1 Vinc1 [SRC2NAME Vstart2 */ /* Vstop2 Vinc2 */ which = ft_find_analysis("DCTransfer"); if (which == -1) { current->error = INPerrCat (current->error, INPmkTemp("DC transfer curve analysis unsupported\n")); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "DCtransfer", & dcJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createOP"); /* or similar error message */ return (0); } INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; error = INPapName(ckt, which, dcJob, "name1", &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart1 */ error = INPapName(ckt, which, dcJob, "start1", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop1 */ error = INPapName(ckt, which, dcJob, "stop1", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc1 */ error = INPapName(ckt, which, dcJob, "step1", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); if (*line) { if (*line == 'd') goto next; INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; error = INPapName(ckt, which, dcJob, "name2", &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart1 */ error = INPapName(ckt, which, dcJob, "start2", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop1 */ error = INPapName(ckt, which, dcJob, "stop2", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc1 */ error = INPapName(ckt, which, dcJob, "step2", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); } } if (strcmp(token, "tran") == 0) { JOB *tranJob; which = ft_find_analysis("TRAN"); if (which == -1) { current->error = INPerrCat (current->error, INPmkTemp("transient analysis unsupported\n")); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "tranan", & tranJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createTRAN"); return (0); } parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstep */ error = INPapName(ckt, which, tranJob, "tstep", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstop*/ error = INPapName(ckt, which, tranJob, "tstop", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); if (*line) { if (*line == 'd') goto next; if (*line == 'u') goto uic; parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstart */ error = INPapName(ckt, which, tranJob, "tstart", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); if (*line == 'u') goto uic; parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tmax */ error = INPapName(ckt, which, tranJob, "tmax", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); uic: if (*line == 'u') { INPgetTok(&line, &name, 1); if (strcmp(name, "uic") == 0) { ptemp.iValue = 1; error = INPapName(ckt, which, tranJob, "tstart", &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); } } } } #ifdef WITH_PSS /* *********************** */ /* PSS - Spertica - 100910 */ /* *********************** */ if (strcmp(token, "pss") == 0) { JOB *pssJob; which = ft_find_analysis("PSS"); if (which == -1) { current->error = INPerrCat (current->error, INPmkTemp("periodic steady state analysis unsupported\n")); return (0); /* temporary */ } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, "pssan", & pssJob, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "createPSS"); return (0); } parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Guessed Frequency */ error = INPapName(ckt, which, pssJob, "fguess", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Stabilization time */ error = INPapName(ckt, which, pssJob, "stabtime", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */ error = INPapName(ckt, which, pssJob, "points", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */ error = INPapName(ckt, which, pssJob, "harmonics", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); } #endif next: while (*line) { /* read the entire line */ IFparm *if_parm; if (flag) INPgetTok(&line, &token, 1); else flag = 1; if_parm = ft_find_analysis_parm(save, token); if (!if_parm) { /* didn't find it! */ current->error = INPerrCat (current->error, INPmkTemp(" Error: unknown parameter on .sens - ignored \n")); continue; } /* found it, analysis which, parameter i */ if (if_parm->dataType & IF_FLAG) { /* one of the keywords! */ ptemp.iValue = 1; error = ft_sim->setAnalysisParm (ckt, senseJob, if_parm->id, &ptemp, NULL); if (error) current->error = INPerrCat(current->error, INPerror(error)); } else { parm = INPgetValue (ckt, &line, if_parm->dataType, tab); error = ft_sim->setAnalysisParm (ckt, senseJob, if_parm->id, parm, NULL); if (error) current->error = INPerrCat(current->error, INPerror(error)); } } if ((err = ft_sim->doAnalyses (ckt, 1, ft_curckt->ci_curTask)) != OK) { ft_sperror(err, "doAnalyses"); return (0); /* temporary */ } return (0); } ngspice-26/src/frontend/quote.c0000644000265600020320000000326112264261473016142 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * * Various things for quoting words. If this is not ascii, quote and * strip are no-ops, so '' and \ quoting won't work. To fix this, sell * your IBM machine and buy a vax. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "quote.h" /* Strip all the 8th bits from a string (destructively). */ void cp_wstrip(char *str) { char c, d; if (str) while ((c = *str) != '\0') { /* assign and test */ d = (char) strip(c); if (c != d) *str = d; str++; } } /* Quote all characters in a word. */ void cp_quoteword(char *str) { if (str) while (*str) { *str = (char) quote(*str); str++; } } /* Print a word (strip the word first). */ void cp_printword(char *string, FILE *fp) { char *s; if (string) for (s = string; *s; s++) (void) putc((strip(*s)), fp); } /* (Destructively) strip all the words in a wlist. */ void cp_striplist(wordlist *wlist) { wordlist *wl; for (wl = wlist; wl; wl = wl->wl_next) cp_wstrip(wl->wl_word); } /* Remove the "" from a string. */ char * cp_unquote(char *string) { char *s; size_t l; if (string) { l = strlen(string); s = TMALLOC(char, l + 1); if (l >= 2 && *string == '"' && string[l-1] == '"') { strncpy(s, string+1, l-2); s[l-2] = '\0'; } else { strcpy(s, string); } return (s); } else { return 0; } } ngspice-26/src/frontend/testcommands.c0000644000265600020320000000061212264261473017503 0ustar andreasadmin#include #include "commands.h" void print_struct_comm(struct comm coms[]) { int i; for (i = 0; coms[i].co_comname != NULL; i++) { printf("Command: %s\n" "help: %s\n\n", coms[i].co_comname, coms[i].co_help); } } int main(void) { print_struct_comm(nutcp_coms); print_struct_comm(spcp_coms); return 0; } ngspice-26/src/frontend/init.h0000644000265600020320000000007012264261473015750 0ustar andreasadmin#ifndef ngspice_INIT_H #define ngspice_INIT_H #endif ngspice-26/src/frontend/misccoms.c0000644000265600020320000002203512264261473016622 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ftehelp.h" #include "ngspice/hlpdefs.h" #include "misccoms.h" #include "postcoms.h" #include "circuits.h" #include "variable.h" #include "plotting/graf.h" #include "display.h" #include "../misc/ivars.h" #include "com_alias.h" #include "define.h" #include "runcoms2.h" #ifdef HAVE_GNUREADLINE #include #include extern char history_file[]; #endif #ifdef HAVE_BSDEDITLINE #include extern char history_file[]; #endif extern IFsimulator SIMinfo; extern void spice_destroy_devices(void); /* FIXME need a better place */ static void byemesg(void); static int confirm_quit(void); void com_quit(wordlist *wl) { int exitcode = EXIT_NORMAL; bool noask = (wl && wl->wl_word && 1 == sscanf(wl->wl_word, "%d", &exitcode)) || (wl && wl->wl_word && cieq(wl->wl_word, "noask")) || cp_getvar("noaskquit", CP_BOOL, NULL); /* update screen and reset terminal */ gr_clean(); cp_ccon(FALSE); /* Make sure the guy really wants to quit. */ if (!ft_nutmeg) if (!noask && !confirm_quit()) return; /* start to clean up the mess */ #ifdef SHARED_MODULE { wordlist all = { "all", NULL, NULL }; wordlist star = { "*", NULL, NULL }; // com_remcirc(NULL); com_destroy(&all); com_unalias(&star); com_undefine(&star); cp_remvar("history"); cp_remvar("noglob"); cp_remvar("brief"); cp_remvar("sourcepath"); cp_remvar("program"); cp_remvar("prompt"); } #endif #ifdef EXPERIMENTAL_CODE /* Destroy CKT when quit. Add by Gong Ding, gdiso@ustc.edu */ if (!ft_nutmeg) { struct circ *cc; for (cc = ft_circuits; cc; cc = cc->ci_next) if (SIMinfo.deleteCircuit) SIMinfo.deleteCircuit(cc->ci_ckt); } #endif #ifdef SHARED_MODULE /* Destroy CKT when quit. */ if (!ft_nutmeg) { while(ft_curckt) com_remcirc(NULL); } #endif DevSwitch(NULL); DevSwitch(NULL); /* then go away */ #ifdef SHARED_MODULE cp_destroy_keywords(); destroy_ivars(); #endif byemesg(); #ifdef SHARED_MODULE destroy_const_plot(); spice_destroy_devices(); #endif #ifdef SHARED_MODULE /* add 1000 to notify that we exit from 'quit' */ controlled_exit(1000 + exitcode); #else exit(exitcode); #endif } #ifdef SYSTEM_MAIL void com_bug(wordlist *wl) { char buf[BSIZE_SP]; NG_IGNORE(wl); if (!Bug_Addr || !*Bug_Addr) { fprintf(cp_err, "Error: No address to send bug reports to.\n"); return; } fprintf(cp_out, "Calling the mail program . . .(sending to %s)\n\n" "Please include the OS version number and machine architecture.\n" "If the problem is with a specific circuit, please include the\n" "input file.\n", Bug_Addr); (void) sprintf(buf, SYSTEM_MAIL, ft_sim->simulator, ft_sim->version, Bug_Addr); (void) system(buf); fprintf(cp_out, "Bug report sent. Thank you.\n"); } #else void com_bug(wordlist *wl) { NG_IGNORE(wl); fprintf(cp_out, "Please use the ngspice bug tracker at:\n" "http://sourceforge.net/p/ngspice/bugs/\n"); } #endif /* printout upon startup or 'version' command. options to version are -s (short) or -f (full). 'version' with options may also be used in ngspice pipe mode. */ void com_version(wordlist *wl) { if (!wl) { /* no printout in pipe mode (-p) */ if (ft_pipemode) return; fprintf(cp_out, "******\n" "** %s-%s : %s\n" "** The U. C. Berkeley CAD Group\n" "** Copyright 1985-1994, Regents of the University of California.\n" "** %s\n", ft_sim->simulator, ft_sim->version, ft_sim->description, Spice_Manual); if (Spice_Notice != NULL && *Spice_Notice != 0) fprintf(cp_out, "** %s\n", Spice_Notice); if (Spice_Build_Date != NULL && *Spice_Build_Date != 0) fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date); fprintf(cp_out, "******\n"); } else { char *s = wl_flatten(wl); if (!strncasecmp(s, "-s", 2)) { fprintf(cp_out, "******\n" "** %s-%s\n" "** %s\n", ft_sim->simulator, ft_sim->version, Spice_Manual); if (Spice_Notice != NULL && *Spice_Notice != 0) fprintf(cp_out, "** %s\n", Spice_Notice); if (Spice_Build_Date != NULL && *Spice_Build_Date != 0) fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date); fprintf(cp_out, "******\n"); } else if (!strncasecmp(s, "-f", 2)) { fprintf(cp_out, "******\n" "** %s-%s : %s\n" "** The U. C. Berkeley CAD Group\n" "** Copyright 1985-1994, Regents of the University of California.\n" "** %s\n", ft_sim->simulator, ft_sim->version, ft_sim->description, Spice_Manual); if (Spice_Notice != NULL && *Spice_Notice != 0) fprintf(cp_out, "** %s\n", Spice_Notice); if (Spice_Build_Date != NULL && *Spice_Build_Date != 0) fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date); fprintf(cp_out, "**\n"); #ifdef CIDER fprintf(cp_out, "** CIDER 1.b1 (CODECS simulator) included\n"); #endif #ifdef XSPICE fprintf(cp_out, "** XSPICE extensions included\n"); #endif fprintf(cp_out, "** Relevant compilation options (refer to user's manual):\n"); #ifdef NGDEBUG fprintf(cp_out, "** Debugging option (-g) enabled\n"); #endif #ifdef ADMS fprintf(cp_out, "** Adms interface enabled\n"); #endif #ifdef USE_OMP fprintf(cp_out, "** OpenMP multithreading for BSIM3, BSIM4 enabled\n"); #endif #if defined(X_DISPLAY_MISSING) && !defined(HAS_WINGUI) fprintf(cp_out, "** X11 interface not compiled into ngspice\n"); #endif #ifdef NOBYPASS fprintf(cp_out, "** --enable-nobypass\n"); #endif #ifdef CAPBYPASS fprintf(cp_out, "** --enable-capbypass\n"); #endif #ifdef NODELIMITING fprintf(cp_out, "** --enable-nodelimiting\n"); #endif #ifdef PREDICTOR fprintf(cp_out, "** --enable-predictor\n"); #endif #ifdef NEWTRUNC fprintf(cp_out, "** --enable-newtrunc\n"); #endif #ifdef WANT_SENSE2 fprintf(cp_out, "** --enable-sense2\n"); #endif fprintf(cp_out, "**\n"); #ifdef EXPERIMENTAL_CODE fprintf(cp_out, "** Experimental code enabled.\n"); #endif #ifdef EXP_DEV fprintf(cp_out, "** Experimental devices enabled.\n"); #endif fprintf(cp_out, "******\n"); } else if (!eq(ft_sim->version, s)) { fprintf(stderr, "Note: rawfile is version %s (current version is %s)\n", wl->wl_word, ft_sim->version); } tfree(s); } } static void byemesg(void) { #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) /* write out command history only when saying goodbye. */ if (cp_interactive && (cp_maxhistlength > 0)) { stifle_history(cp_maxhistlength); write_history(history_file); } #endif printf("%s-%s done\n", ft_sim->simulator, ft_sim->version); } static int confirm_quit(void) { struct circ *cc; struct plot *pl; int ncc = 0, npl = 0; char buf[64]; for (cc = ft_circuits; cc; cc = cc->ci_next) if (cc->ci_inprogress) ncc++; for (pl = plot_list; pl; pl = pl->pl_next) if (!pl->pl_written && pl->pl_dvecs) npl++; if (!ncc && !npl) return 1; fprintf(cp_out, "Warning: "); if (ncc) { fprintf(cp_out, "the following simulation%s still in progress:\n", (ncc > 1) ? "s are" : " is"); for (cc = ft_circuits; cc; cc = cc->ci_next) if (cc->ci_inprogress) fprintf(cp_out, "\t%s\n", cc->ci_name); } if (ncc && npl) fprintf(cp_out, "and "); if (npl) { fprintf(cp_out, "the following plot%s been saved:\n", (npl > 1) ? "s haven't" : " hasn't"); for (pl = plot_list; pl; pl = pl->pl_next) if (!pl->pl_written && pl->pl_dvecs) fprintf(cp_out, "%s\t%s, %s\n", pl->pl_typename, pl->pl_title, pl->pl_name); } fprintf(cp_out, "\nAre you sure you want to quit (yes)? "); (void) fflush(cp_out); if (!fgets(buf, sizeof(buf), stdin)) { clearerr(stdin); *buf = 'y'; } return ((*buf == 'y') || (*buf == 'Y') || (*buf == '\n')); } ngspice-26/src/frontend/com_cdump.h0000644000265600020320000000033112264261473016753 0ustar andreasadmin#ifndef ngspice_COM_CDUMP_H #define ngspice_COM_CDUMP_H void com_cdump(wordlist *wl); void com_mdump(wordlist *wl); void com_rdump(wordlist *wl); #define TABINDENT 2 /* CDHW */ /* The orginal value was 8 */ #endif ngspice-26/src/frontend/com_setscale.c0000644000265600020320000000170612264261473017450 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/dvec.h" #include "com_setscale.h" #include "quote.h" #include "ngspice/cpextern.h" #include "vectors.h" #include "plotting/plotting.h" #include "plotting/pvec.h" #include "ngspice/fteext.h" /* Set the default scale to the named vector. If no vector named, * find and print the default scale. */ void com_setscale(wordlist *wl) { struct dvec *d; char *s; if (plot_cur) { if (wl) { s = cp_unquote(wl->wl_word); d = vec_get(s); if (s) tfree(s);/*DG to avoid the cp_unquote memory leak */ if (d == NULL) fprintf(cp_err, "Error: no such vector as %s.\n", wl->wl_word); else plot_cur->pl_scale = d; } else if (plot_cur->pl_scale) { pvec(plot_cur->pl_scale); } } else { fprintf(cp_err, "Error: no current plot.\n"); } } ngspice-26/src/frontend/breakp2.c0000644000265600020320000000732512264261473016340 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Code to deal with breakpoints and tracing. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/ftedebug.h" #include "quote.h" #include "breakp2.h" /* global linked list to store .save data and breakpoint data */ struct dbcomm *dbs = NULL; /* export for iplot */ /* used in breakp.c and breakp2.c */ int debugnumber = 1; static char *copynode(char* s); /* Analyse the data given by the .save card or 'save' command. Store the data in the global dbs struct. */ /* Save a vector. */ void com_save(wordlist *wl) { settrace(wl, VF_ACCUM, NULL); } /* Save a vector with the analysis type given (name). */ void com_save2(wordlist *wl, char *name) { settrace(wl, VF_ACCUM, name); } void settrace(wordlist *wl, int what, char *name) { struct dbcomm *d, *td; char *s; while (wl) { s = cp_unquote(wl->wl_word); d = alloc(struct dbcomm); d->db_number = debugnumber++; d->db_analysis = name; if (eq(s, "all")) { switch (what) { case VF_PRINT: d->db_type = DB_TRACEALL; break; /* case VF_PLOT: d->db_type = DB_IPLOTALL; break; */ case VF_ACCUM: /* d->db_type = DB_SAVEALL; */ d->db_nodename1 = copy(s); d->db_type = DB_SAVE; break; } /* wrd_chtrace(NULL, TRUE, what); */ } else { switch (what) { case VF_PRINT: d->db_type = DB_TRACENODE; break; /* case VF_PLOT: d->db_type = DB_IPLOT; break; */ case VF_ACCUM: d->db_type = DB_SAVE; break; } /* v(2) --> 2, i(vds) --> vds#branch */ d->db_nodename1 = copynode(s); /* wrd_chtrace(s, TRUE, what); */ } tfree(s); /*DG avoid memoy leak */ if (dbs) { for (td = dbs; td->db_next; td = td->db_next) ; td->db_next = d; } else { ft_curckt->ci_dbs = dbs = d; } wl = wl->wl_next; } } /* retrieve the save nodes from dbs into an array */ int ft_getSaves(struct save_info **savesp) /* global variable: dbs */ { struct dbcomm *d; int count = 0, i = 0; struct save_info *array; for (d = dbs; d; d = d->db_next) if (d->db_type == DB_SAVE) count++; if (!count) return (0); *savesp = array = TMALLOC(struct save_info, count); for (d = dbs; d; d = d->db_next) if (d->db_type == DB_SAVE) { array[i].used = 0; if (d->db_analysis) array[i].analysis = copy(d->db_analysis); else array[i].analysis = NULL; array[i++].name = copy(d->db_nodename1); } return (count); } /* v(2) --> 2, i(vds) --> vds#branch, 3 --> 3, @mn1[vth0] --> @mn1[vth0] * derived from wordlist *gettoks(char *s) */ static char* copynode(char *s) { char *l, *r; char *ret = NULL; if (strstr(s, "(")) s = stripWhiteSpacesInsideParens(s); else s = copy(s); l = strrchr(s, '('/*)*/); if (!l) return s; r = strchr(s, /*(*/')'); *r = '\0'; if (*(l - 1) == 'i' || *(l - 1) == 'I') { char buf[513]; sprintf(buf, "%s#branch", l + 1); ret = copy(buf); } else ret = copy(l + 1); tfree(s); return ret; } ngspice-26/src/frontend/parse.c0000644000265600020320000004751212264261473016126 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * A simple operator-precedence parser for algebraic expressions. * This also handles relational and logical expressions. */ #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/fteparse.h" #include "ngspice/fteext.h" #include "ngspice/sim.h" #include "evaluate.h" #include "parse.h" static bool checkvalid(struct pnode *pn); static struct pnode *mkbnode(int opnum, struct pnode *arg1, struct pnode *arg2); static struct pnode *mkunode(int op, struct pnode *arg); static struct pnode *mkfnode(const char *func, struct pnode *arg); static struct pnode *mknnode(double number); static struct pnode *mksnode(const char *string); #include "parse-bison.c" void db_print_pnode_tree(struct pnode *p, char *print); struct pnode * ft_getpnames(wordlist *wl, bool check) { struct pnode *pn; char *xsbuf, *sbuf; int rv; if (!wl) { fprintf(cp_err, "Warning: NULL arithmetic expression\n"); return (NULL); } xsbuf = sbuf = wl_flatten(wl); rv = PPparse(&sbuf, &pn); tfree(xsbuf); if (rv) return (NULL); if (check && !checkvalid(pn)) return (NULL); return (pn); } /* See if there are any variables around which have length 0 and are * not named 'list'. There should really be another flag for this... */ static bool checkvalid(struct pnode *pn) { while (pn) { if (pn->pn_value) { if ((pn->pn_value->v_length == 0) && !eq(pn->pn_value->v_name, "list")) { if (eq(pn->pn_value->v_name, "all")) fprintf(cp_err, "Error: %s: no matching vectors.\n", pn->pn_value->v_name); else fprintf(cp_err, "Error(parse.c--checkvalid): %s: no such vector.\n", pn->pn_value->v_name); return (FALSE); } } else if (pn->pn_func || (pn->pn_op && (pn->pn_op->op_arity == 1))) { if (!checkvalid(pn->pn_left)) return (FALSE); } else if (pn->pn_op && (pn->pn_op->op_arity == 2)) { if (!checkvalid(pn->pn_left)) return (FALSE); if (!checkvalid(pn->pn_right)) return (FALSE); } else { fprintf(cp_err, "checkvalid: Internal Error: bad node\n"); } pn = pn->pn_next; } return (TRUE); } /* Some auxiliary functions for building the parse tree. */ static struct op ops[] = { { PT_OP_PLUS, "+", 2, {(void(*)(void)) op_plus} }, { PT_OP_MINUS, "-", 2, {(void(*)(void)) op_minus} }, { PT_OP_TIMES, "*", 2, {(void(*)(void)) op_times} }, { PT_OP_MOD, "%", 2, {(void(*)(void)) op_mod} }, { PT_OP_DIVIDE, "/", 2, {(void(*)(void)) op_divide} }, { PT_OP_COMMA, ",", 2, {(void(*)(void)) op_comma} }, { PT_OP_POWER, "^", 2, {(void(*)(void)) op_power} }, { PT_OP_EQ, "=", 2, {(void(*)(void)) op_eq} }, { PT_OP_GT, ">", 2, {(void(*)(void)) op_gt} }, { PT_OP_LT, "<", 2, {(void(*)(void)) op_lt} }, { PT_OP_GE, ">=", 2, {(void(*)(void)) op_ge} }, { PT_OP_LE, "<=", 2, {(void(*)(void)) op_le} }, { PT_OP_NE, "<>", 2, {(void(*)(void)) op_ne} }, { PT_OP_AND, "&", 2, {(void(*)(void)) op_and} }, { PT_OP_OR, "|", 2, {(void(*)(void)) op_or} }, { PT_OP_INDX, "[", 2, {(void(*)(void)) op_ind} }, { PT_OP_RANGE, "[[", 2, {(void(*)(void)) op_range} }, { PT_OP_TERNARY, "?:", 2, {NULL} }, { 0, NULL, 0, {NULL} } }; static struct op uops[] = { { PT_OP_UMINUS, "-", 1, {(void(*)(void)) op_uminus} }, { PT_OP_NOT, "~", 1, {(void(*)(void)) op_not} }, { 0, NULL, 0, {NULL} } }; /* We have 'v' declared as a function, because if we don't then the defines * we do for vm(), etc won't work. This is caught in evaluate(). Bad kludge. */ typedef void* cx_function_t(void*, short int, int, int*, short int*); struct func ft_funcs[] = { { "mag", cx_mag }, { "magnitude", cx_mag }, { "cph", cx_cph }, /* SJdV */ { "cphase", cx_cph }, /* SJdV Continious phase*/ { "unwrap", cx_unwrap }, { "ph", cx_ph }, { "phase", cx_ph }, { "j", cx_j }, { "real", cx_real }, { "re", cx_real }, { "imag", cx_imag }, { "im", cx_imag }, { "db", cx_db }, { "log", cx_log }, { "log10", cx_log }, { "ln", cx_ln }, { "exp", cx_exp }, { "abs", cx_mag }, { "sqrt", cx_sqrt }, { "sin", cx_sin }, { "cos", cx_cos }, { "tan", cx_tan }, { "sinh", cx_sinh }, { "cosh", cx_cosh }, { "tanh", cx_tanh }, { "atan", cx_atan }, { "sortorder", cx_sortorder }, { "norm", cx_norm }, { "rnd", cx_rnd }, { "sunif", cx_sunif }, { "poisson", cx_poisson }, { "exponential", cx_exponential }, { "sgauss", cx_sgauss }, { "pos", cx_pos }, { "floor", cx_floor }, { "ceil", cx_ceil }, { "mean", cx_mean }, { "avg", cx_avg }, /* A.Roldan 03/06/05 incremental average new function */ { "group_delay", (cx_function_t*) cx_group_delay }, /* A.Roldan 10/06/05 group delay new function */ { "vector", cx_vector }, { "unitvec", cx_unitvec }, { "length", cx_length }, { "vecmin", cx_min }, { "minimum", cx_min }, { "vecmax", cx_max }, { "maximum", cx_max }, { "vecd", cx_d }, { "interpolate", (cx_function_t*) cx_interpolate }, { "deriv", (cx_function_t*) cx_deriv }, { "fft", (cx_function_t*) cx_fft }, { "ifft", (cx_function_t*) cx_ifft }, { "v", NULL }, { NULL, NULL } }; struct func func_uminus = { "minus", cx_uminus }; struct func func_not = { "not", cx_not }; /* Binary operator node. */ static struct pnode * mkbnode(int opnum, struct pnode *arg1, struct pnode *arg2) { struct op *o; struct pnode *p; for (o = &ops[0]; o->op_name; o++) if (o->op_num == opnum) break; if (!o->op_name) fprintf(cp_err, "mkbnode: Internal Error: no such op num %d\n", opnum); p = alloc(struct pnode); p->pn_use = 0; p->pn_value = NULL; p->pn_name = NULL; /* sjb */ p->pn_func = NULL; p->pn_op = o; p->pn_left = arg1; if (p->pn_left) p->pn_left->pn_use++; p->pn_right = arg2; if (p->pn_right) p->pn_right->pn_use++; p->pn_next = NULL; return (p); } /* Unary operator node. */ static struct pnode * mkunode(int op, struct pnode *arg) { struct pnode *p; struct op *o; p = alloc(struct pnode); for (o = uops; o->op_name; o++) if (o->op_num == op) break; if (!o->op_name) fprintf(cp_err, "mkunode: Internal Error: no such op num %d\n", op); p->pn_op = o; p->pn_use = 0; p->pn_value = NULL; p->pn_name = NULL; /* sjb */ p->pn_func = NULL; p->pn_left = arg; if (p->pn_left) p->pn_left->pn_use++; p->pn_right = NULL; p->pn_next = NULL; return (p); } /* Function node. We have to worry about a lot of things here. Something * like f(a) could be three things -- a call to a standard function, which * is easiest to deal with, a variable name, in which case we do the * kludge with 0-length lists, or it could be a user-defined function, * in which case we have to figure out which one it is, substitute for * the arguments, and then return a copy of the expression that it was * defined to be. */ static struct pnode * mkfnode(const char *func, struct pnode *arg) { struct func *f; struct pnode *p, *q; struct dvec *d; char buf[BSIZE_SP]; (void) strcpy(buf, func); strtolower(buf); /* Make sure the case is ok. */ for (f = &ft_funcs[0]; f->fu_name; f++) if (eq(f->fu_name, buf)) break; if (f->fu_name == NULL) { /* Give the user-defined functions a try. */ q = ft_substdef(func, arg); if (q) return (q); } if ((f->fu_name == NULL) && arg->pn_value) { /* Kludge -- maybe it is really a variable name. */ (void) sprintf(buf, "%s(%s)", func, arg->pn_value->v_name); free_pnode(arg); d = vec_get(buf); if (d == NULL) { /* Well, too bad. */ fprintf(cp_err, "Error: no such function as %s.\n", func); return (NULL); } /* (void) strcpy(buf, d->v_name); XXX */ return (mksnode(buf)); } else if (f->fu_name == NULL) { fprintf(cp_err, "Error: no function as %s with that arity.\n", func); free_pnode(arg); return (NULL); } if (!f->fu_func && arg->pn_op && arg->pn_op->op_num == PT_OP_COMMA) { p = mkbnode(PT_OP_MINUS, mkfnode(func, arg->pn_left), mkfnode(func, arg->pn_right)); tfree(arg); return p; } p = alloc(struct pnode); p->pn_use = 0; p->pn_name = NULL; p->pn_value = NULL; p->pn_func = f; p->pn_op = NULL; p->pn_left = arg; if (p->pn_left) p->pn_left->pn_use++; p->pn_right = NULL; p->pn_next = NULL; return (p); } /* Number node. */ static struct pnode * mknnode(double number) { struct pnode *p; struct dvec *v; char buf[BSIZE_SP]; p = alloc(struct pnode); v = alloc(struct dvec); ZERO(v, struct dvec); p->pn_use = 0; p->pn_name = NULL; p->pn_value = v; p->pn_func = NULL; p->pn_op = NULL; p->pn_left = p->pn_right = NULL; p->pn_next = NULL; /* We don't use printnum because it screws up mkfnode above. We have * to be careful to deal properly with node numbers that are quite * large... */ if (number < MAXPOSINT) (void) sprintf(buf, "%d", (int) number); else (void) sprintf(buf, "%G", number); v->v_name = copy(buf); v->v_type = SV_NOTYPE; v->v_flags = VF_REAL; v->v_realdata = TMALLOC(double, 1); *v->v_realdata = number; v->v_length = 1; v->v_plot = NULL; vec_new(v); return (p); } /* String node. */ static struct pnode * mksnode(const char *string) { struct dvec *v, *nv, *vs, *newv = NULL, *end = NULL; struct pnode *p; p = alloc(struct pnode); p->pn_use = 0; p->pn_name = NULL; p->pn_func = NULL; p->pn_op = NULL; p->pn_left = p->pn_right = NULL; p->pn_next = NULL; v = vec_get(string); if (v == NULL) { nv = alloc(struct dvec); ZERO(nv, struct dvec); p->pn_value = nv; nv->v_name = copy(string); return (p); } p->pn_value = NULL; /* It's not obvious that we should be doing this, but... */ for (vs = v; vs; vs = vs->v_link2) { nv = vec_copy(vs); vec_new(nv); if (end) end->v_link2 = nv; else newv = end = nv; end = nv; } p->pn_value = newv; /* va: tfree v in case of @xxx[par], because vec_get created a new vec and nobody will free it elsewhere */ /*if (v && v->v_name && *v->v_name == '@' && isreal(v) && v->v_realdata) { vec_free(v); } */ /* The two lines above have been commented out to prevent deletion of @xxx[par] after execution of only a single command like plot @xxx[par] or write. We need to monitor if this will lead to excessive memory usage. h_vogt 090221 */ return (p); } /* Don't call this directly, always use the free_pnode() macro. The linked pnodes do not necessarily form a perfect tree as some nodes get reused. Hence, in this recursive walk trough the 'tree' we only free node that have their pn_use value at zero. Nodes that have pn_use values above zero have the link severed and their pn_use value decremented. In addition, we don't walk past nodes with pn_use values avoid zero, just in case we have a circular reference (this probable does not happen in practice, but it does no harm playing safe) */ void free_pnode_x(struct pnode *t) { if (!t) return; /* don't walk past nodes used elsewhere. We decrement the pn_use value here, but the link gets severed by the action of the free_pnode() macro */ if (t->pn_use > 1) { t->pn_use--; } else { /* pn_use is now 1, so its safe to free the pnode */ free_pnode(t->pn_left); free_pnode(t->pn_right); free_pnode(t->pn_next); tfree(t->pn_name); /* va: it is a copy() of original string, can be free'd */ if (t->pn_value && !(t->pn_value->v_flags & VF_PERMANENT)) vec_free(t->pn_value); /* patch by Stefan Jones */ tfree(t); } } static void db_print_func(FILE *fdst, struct func *f) { if (!f) { fprintf(fdst, "nil"); return; } fprintf(fdst, "(func :fu_name %s :fu_func %p)", f->fu_name, f->fu_func); } static void db_print_op(FILE *fdst, struct op *op) { if (!op) { fprintf(fdst, "nil"); return; } fprintf(fdst, "(op :op_num %d :op_name %s :op_arity %d :op_func %p)", op->op_num, op->op_name, op->op_arity, op->op_func.anonymous); } static void db_print_dvec(FILE *fdst, struct dvec *d) { if (!d) { fprintf(fdst, "nil"); return; } fprintf(fdst, "(dvec :v_name %s :v_type %d :v_flags %d :v_length %d ...)", d->v_name, d->v_type, d->v_flags, d->v_length); } static void db_print_pnode(FILE *fdst, struct pnode *p) { if (!p) { fprintf(fdst, "nil\n"); return; } if (!p->pn_name && p->pn_value && !p->pn_func && !p->pn_op && !p->pn_left && !p->pn_right && !p->pn_next) { fprintf(fdst, "(pnode-value :pn_use %d", p->pn_use); fprintf(fdst, " :pn_value "); db_print_dvec(fdst, p->pn_value); fprintf(fdst, ")\n"); return; } if (!p->pn_name && !p->pn_value && p->pn_func && !p->pn_op && !p->pn_right && !p->pn_next) { fprintf(fdst, "(pnode-func :pn_use %d", p->pn_use); fprintf(fdst, "\n :pn_func "); db_print_func(fdst, p->pn_func); fprintf(fdst, "\n :pn_left "); db_print_pnode(fdst, p->pn_left); fprintf(fdst, ")\n"); return; } if (!p->pn_name && !p->pn_value && !p->pn_func && p->pn_op && !p->pn_next) { fprintf(fdst, "(pnode-op :pn_use %d", p->pn_use); fprintf(fdst, "\n :pn_op "); db_print_op(fdst, p->pn_op); fprintf(fdst, "\n :pn_left "); db_print_pnode(fdst, p->pn_left); fprintf(fdst, "\n :pn_right "); db_print_pnode(fdst, p->pn_right); fprintf(fdst, ")\n"); return; } fprintf(fdst, "(pnode :pn_name \"%s\" pn_use %d", p->pn_name, p->pn_use); fprintf(fdst, "\n :pn_value "); db_print_dvec(fdst, p->pn_value); fprintf(fdst, "\n :pn_func "); db_print_func(fdst, p->pn_func); fprintf(fdst, "\n :pn_op "); db_print_op(fdst, p->pn_op); fprintf(fdst, "\n :pn_left "); db_print_pnode(fdst, p->pn_left); fprintf(fdst, "\n :pn_right "); db_print_pnode(fdst, p->pn_right); fprintf(fdst, "\n :pn_next "); db_print_pnode(fdst, p->pn_next); fprintf(fdst, "\n)\n"); } void db_print_pnode_tree(struct pnode *p, char *print) { #if 1 NG_IGNORE(print); db_print_pnode(stdout, p); #else char *buf; size_t buf_size; FILE *db_stream = open_memstream(&buf, &buf_size); db_print_pnode(db_stream, p); fclose(db_stream); if (print) printf("%s:%d: %s {%s}\n%s\n", __FILE__, __LINE__, __func__, print, buf); free(buf); #endif } int PPlex(YYSTYPE *lvalp, struct PPltype *llocp, char **line) { static char *specials = " \t%()-^+*,/|&<>~="; char *sbuf = *line; int token; while ((*sbuf == ' ') || (*sbuf == '\t')) sbuf++; llocp->start = sbuf; #define lexer_return(token_, length) \ do { token = token_; sbuf += length; goto done; } while(0) if ((sbuf[0] == 'g') && (sbuf[1] == 't') && strchr(specials, sbuf[2])) { lexer_return('>', 2); } else if ((sbuf[0] == 'l') && (sbuf[1] == 't') && strchr(specials, sbuf[2])) { lexer_return('<', 2); } else if ((sbuf[0] == 'g') && (sbuf[1] == 'e') && strchr(specials, sbuf[2])) { lexer_return(TOK_GE, 2); } else if ((sbuf[0] == 'l') && (sbuf[1] == 'e') && strchr(specials, sbuf[2])) { lexer_return(TOK_LE, 2); } else if ((sbuf[0] == 'n') && (sbuf[1] == 'e') && strchr(specials, sbuf[2])) { lexer_return(TOK_NE, 2); } else if ((sbuf[0] == 'e') && (sbuf[1] == 'q') && strchr(specials, sbuf[2])) { lexer_return('=', 2); } else if ((sbuf[0] == 'o') && (sbuf[1] == 'r') && strchr(specials, sbuf[2])) { lexer_return('|', 2); } else if ((sbuf[0] == 'a') && (sbuf[1] == 'n') && (sbuf[2] == 'd') && strchr(specials, sbuf[3])) { lexer_return('&', 3); } else if ((sbuf[0] == 'n') && (sbuf[1] == 'o') && (sbuf[2] == 't') && strchr(specials, sbuf[3])) { lexer_return('~', 3); } switch (*sbuf) { case '[': if (sbuf[1] == '[') { lexer_return(TOK_LRANGE, 2); } else { lexer_return(*sbuf, 1); } case ']': if (sbuf[1] == ']') { lexer_return(TOK_RRANGE, 2); } else { lexer_return(*sbuf, 1); } case '>': case '<': { /* Workaround, The Frontend makes "<>" into "< >" */ int j = 1; while (isspace(sbuf[j])) j++; if (((sbuf[j] == '<') || (sbuf[j] == '>')) && (sbuf[0] != sbuf[j])) { /* Allow both <> and >< for NE. */ lexer_return(TOK_NE, j+1); } else if (sbuf[1] == '=') { lexer_return((sbuf[0] == '>') ? TOK_GE : TOK_LE, 2); } else { lexer_return(*sbuf, 1); } } case '?': case ':': case ',': case '+': case '-': case '*': case '%': case '/': case '^': case '(': case ')': case '=': case '&': case '|': case '~': lexer_return(*sbuf, 1); case '\0': lexer_return(*sbuf, 0); case '"': { char *start = ++sbuf; while (*sbuf && (*sbuf != '"')) sbuf++; lvalp->str = copy_substring(start, sbuf); if (*sbuf) sbuf++; lexer_return(TOK_STR, 0); } default: { char *s = sbuf; double *td = ft_numparse(&s, FALSE); if ((!s || *s != ':') && td) { sbuf = s; lvalp->num = *td; lexer_return(TOK_NUM, 0); } else { int atsign = 0; char *start = sbuf; /* It is bad how we have to recognise '[' -- sometimes * it is part of a word, when it defines a parameter * name, and otherwise it isn't. * va, ']' too */ for (; *sbuf && !strchr(specials, *sbuf); sbuf++) if (*sbuf == '@') atsign = 1; else if (!atsign && (*sbuf == '[' || *sbuf == ']')) break; lvalp->str = copy_substring(start, sbuf); lexer_return(TOK_STR, 0); } } } done: if (ft_parsedb) { if (token == TOK_STR) fprintf(stderr, "lexer: TOK_STR, \"%s\"\n", lvalp->str); else if (token == TOK_NUM) fprintf(stderr, "lexer: TOK_NUM, %G\n", lvalp->num); else fprintf(stderr, "lexer: token %d\n", token); } *line = sbuf; llocp->stop = sbuf; return (token); } ngspice-26/src/frontend/interp.c0000644000265600020320000000225312264261473016306 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Polynomial interpolation code. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "interp.h" void lincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale) { struct dvec *v; double *nd; if (!isreal(ov)) { fprintf(cp_err, "Warning: %s is not real\n", ov->v_name); return; } if (ov->v_length < oldscale->v_length) { fprintf(cp_err, "Warning: %s is too short\n", ov->v_name); return; } v = alloc(struct dvec); v->v_name = copy(ov->v_name); v->v_type = ov->v_type; v->v_flags = ov->v_flags; v->v_flags |= VF_PERMANENT; v->v_length = newlen; nd = TMALLOC(double, newlen); if (!ft_interpolate(ov->v_realdata, nd, oldscale->v_realdata, oldscale->v_length, newscale, newlen, 1)) { fprintf(cp_err, "Error: can't interpolate %s\n", ov->v_name); return; } v->v_realdata = nd; vec_new(v); } ngspice-26/src/frontend/hpgl.h0000644000265600020320000000076112264261473015746 0ustar andreasadmin/************* * Header file for hpgl.c ************/ #ifndef ngspice_HPGL_H #define ngspice_HPGL_H disp_fn_Init_t GL_Init; disp_fn_NewViewport_t GL_NewViewport; disp_fn_Close_t GL_Close; disp_fn_Clear_t GL_Clear; disp_fn_DrawLine_t GL_DrawLine; disp_fn_Arc_t GL_Arc; disp_fn_Text_t GL_Text; disp_fn_SetLinestyle_t GL_SetLinestyle; disp_fn_SetColor_t GL_SetColor; disp_fn_Update_t GL_Update; #endif ngspice-26/src/frontend/inpcom.h0000644000265600020320000000020712264261473016274 0ustar andreasadmin/************* * Header file for inpcom.c * 1999 E. Rouat ************/ #ifndef ngspice_INPCOM_H #define ngspice_INPCOM_H #endif ngspice-26/src/frontend/com_display.h0000644000265600020320000000020412264261473017307 0ustar andreasadmin#ifndef ngspice_COM_DISPLAY_H #define ngspice_COM_DISPLAY_H #include "ngspice/wordlist.h" void com_display(wordlist *wl); #endif ngspice-26/src/frontend/com_chdir.h0000644000265600020320000000027212264261473016740 0ustar andreasadmin/************* * Header file for com_chdir.c ************/ #ifndef ngspice_COM_CHDIR_H #define ngspice_COM_CHDIR_H #include "ngspice/wordlist.h" void com_chdir(wordlist *wl); #endif ngspice-26/src/frontend/inp.h0000644000265600020320000000037612264261473015604 0ustar andreasadmin/************* * Header file for inp.c * 1999 E. Rouat ************/ #ifndef ngspice_INP_H #define ngspice_INP_H void com_listing(wordlist *wl); void com_edit(wordlist *wl); void com_source(wordlist *wl); void com_circbyline(wordlist *wl); #endif ngspice-26/src/frontend/evaluate.c0000644000265600020320000006543112264261473016622 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Convert a parse tree to a list of data vectors. */ #include "ngspice/ngspice.h" #include #include #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "evaluate.h" #include "ngspice/sim.h" /* To get SV_VOLTAGE definition */ static RETSIGTYPE sig_matherr(void); static struct dvec *apply_func(struct func *func, struct pnode *arg); static struct dvec *ft_ternary(struct pnode *node); static char *mkcname(char what, char *v1, char *v2); /* We are careful here to catch SIGILL and recognise them as math errors. * The only trouble is that the (void) signal handler we installed before will * be lost, but that's no great loss. */ static JMP_BUF matherrbuf; static RETSIGTYPE sig_matherr(void) { fprintf(cp_err, "Error: argument out of range for math function\n"); LONGJMP(matherrbuf, 1); } /* Note that ft_evaluate will return NULL on invalid expressions. */ /* va: NOTE: ft_evaluate returns a new vector for expressions (func, op, ...) and an existing vector (node->pn_value) when node->pn_value != NULL. For garbage collection caller must vec_free() expression-vector. */ struct dvec * ft_evaluate(struct pnode *node) { struct dvec *d = NULL; if (!node) d = NULL; else if (node->pn_value) d = node->pn_value; else if (node->pn_func) d = apply_func(node->pn_func, node->pn_left); else if (node->pn_op) { if (node->pn_op->op_arity == 1) d = node->pn_op->op_func.unary (node->pn_left); else if (node->pn_op->op_arity == 2) { if (node->pn_op->op_num == PT_OP_TERNARY) d = ft_ternary(node); else d = node->pn_op->op_func.binary (node->pn_left, node->pn_right); } } else { fprintf(cp_err, "ft_evaluate: Internal Error: bad node\n"); d = NULL; } if (d == NULL) return NULL; if (node->pn_name && !ft_evdb && d && !d->v_link2) { if (d->v_name) tfree(d->v_name); /* patch by Stefan Jones */ d->v_name = copy(node->pn_name); } if (!d->v_length) { fprintf(cp_err, "Error: no such vector %s\n", d->v_name); return (NULL); } else { return (d); } } static struct dvec * ft_ternary(struct pnode *node) { struct dvec *v, *d, *cond; struct pnode *arg; int c; if (!node->pn_right->pn_op || node->pn_right->pn_op->op_func.binary != op_comma) { fprintf(cp_err, "Error: ft_ternary(), daemons ...\n"); return NULL; } cond = ft_evaluate(node->pn_left); if (cond->v_link2) { fprintf(cp_err, "Error: ft_ternary(), whats that ?\n"); return NULL; } if (cond->v_numdims != 1) { fprintf(cp_err, "Error: ft_ternary(), condition must be scalar, but numdims=%d\n", cond->v_numdims); return NULL; } if (cond->v_length != 1) { fprintf(cp_err, "Error: ft_ternary(), condition must be scalar, but length=%d\n", cond->v_length); return NULL; } c = isreal(cond) ? (cond->v_realdata[0] != 0.0) : ((realpart(cond->v_compdata[0]) != 0.0) || (imagpart(cond->v_compdata[0]) != 0.0)); arg = c ? node->pn_right->pn_left : node->pn_right->pn_right; v = ft_evaluate(arg); d = vec_copy(v); vec_new(d); if (!arg->pn_value && v) vec_free(v); if (!node->pn_left->pn_value && cond) vec_free(cond); return d; } /* Operate on two vectors, and return a third with the data, length, and flags * fields filled in. Add it to the current plot and get rid of the two args. */ static void * doop_funcall( void * (*func) (void *data1, void *data2, short int datatype1, short int datatype2, int length), void *data1, void *data2, short int datatype1, short int datatype2, int length) { void *data; /* Some of the math routines generate SIGILL if the argument is * out of range. Catch this here. */ if (SETJMP(matherrbuf, 1)) { return (NULL); } (void) signal(SIGILL, (SIGNAL_FUNCTION) sig_matherr); data = func(data1, data2, datatype1, datatype2, length); /* Back to normal */ (void) signal(SIGILL, SIG_DFL); return data; } static struct dvec * doop(char what, void * (*func) (void *data1, void *data2, short int datatype1, short int datatype2, int length), struct pnode *arg1, struct pnode *arg2) { struct dvec *v1, *v2, *res; ngcomplex_t *c1 = NULL, *c2 = NULL, lc; double *d1 = NULL, *d2 = NULL, ld; int length = 0, i; void *data; bool free1 = FALSE, free2 = FALSE, relflag = FALSE; v1 = ft_evaluate(arg1); v2 = ft_evaluate(arg2); if (!v1 || !v2) return (NULL); /* Now the question is, what do we do when one or both of these * has more than one vector? This is definitely not a good * thing. For the time being don't do anything. */ if (v1->v_link2 || v2->v_link2) { fprintf(cp_err, "Warning: no operations on wildcards yet.\n"); if (v1->v_link2 && v2->v_link2) fprintf(cp_err, "\t(You couldn't do that one anyway)\n"); return (NULL); } /* How do we handle operations on multi-dimensional vectors? * For now, we only allow operations between one-D vectors, * equivalently shaped multi-D vectors, or a multi-D vector and * a one-D vector. It's not at all clear what to do in the other cases. * So only check shape requirement if it is an operation between two multi-D * arrays. */ if ((v1->v_numdims > 1) && (v2->v_numdims > 1)) { if (v1->v_numdims != v2->v_numdims) { fprintf(cp_err, "Warning: operands %s and %s have incompatible shapes.\n", v1->v_name, v2->v_name); return (NULL); } for (i = 1; i < v1->v_numdims; i++) if ((v1->v_dims[i] != v2->v_dims[i])) { fprintf(cp_err, "Warning: operands %s and %s have incompatible shapes.\n", v1->v_name, v2->v_name); return (NULL); } } /* This is a bad way to do this. */ switch (what) { case '=': case '>': case '<': case 'G': case 'L': case 'N': case '&': case '|': case '~': relflag = TRUE; } /* Type checking is done later */ /* Make sure we have data of the same length. */ length = ((v1->v_length > v2->v_length) ? v1->v_length : v2->v_length); if (v1->v_length < length) { free1 = TRUE; if (isreal(v1)) { ld = 0.0; d1 = TMALLOC(double, length); for (i = 0; i < v1->v_length; i++) d1[i] = v1->v_realdata[i]; if (i > 0) ld = v1->v_realdata[i - 1]; for (; i < length; i++) d1[i] = ld; } else { realpart(lc) = 0.0; imagpart(lc) = 0.0; c1 = TMALLOC(ngcomplex_t, length); for (i = 0; i < v1->v_length; i++) c1[i] = v1->v_compdata[i]; if (i > 0) lc = v1->v_compdata[i - 1]; for (; i < length; i++) c1[i] = lc; } } else { if (isreal(v1)) d1 = v1->v_realdata; else c1 = v1->v_compdata; } if (v2->v_length < length) { free2 = TRUE; if (isreal(v2)) { ld = 0.0; d2 = TMALLOC(double, length); for (i = 0; i < v2->v_length; i++) d2[i] = v2->v_realdata[i]; if (i > 0) ld = v2->v_realdata[i - 1]; for (; i < length; i++) d2[i] = ld; } else { realpart(lc) = 0.0; imagpart(lc) = 0.0; c2 = TMALLOC(ngcomplex_t, length); for (i = 0; i < v2->v_length; i++) c2[i] = v2->v_compdata[i]; if (i > 0) lc = v2->v_compdata[i - 1]; for (; i < length; i++) c2[i] = lc; } } else { if (isreal(v2)) d2 = v2->v_realdata; else c2 = v2->v_compdata; } /* Now pass the vectors to the appropriate function. */ data = doop_funcall (func, isreal(v1) ? (void *) d1 : (void *) c1, isreal(v2) ? (void *) d2 : (void *) c2, isreal(v1) ? VF_REAL : VF_COMPLEX, isreal(v2) ? VF_REAL : VF_COMPLEX, length); if (!data) return (NULL); /* Make up the new vector. */ res = alloc(struct dvec); ZERO(res, struct dvec); if (relflag || (isreal(v1) && isreal(v2) && (func != cx_comma))) { res->v_flags = (v1->v_flags | v2->v_flags | VF_REAL) & ~ VF_COMPLEX; res->v_realdata = (double *) data; } else { res->v_flags = (v1->v_flags | v2->v_flags | VF_COMPLEX) & ~ VF_REAL; res->v_compdata = (ngcomplex_t *) data; } res->v_name = mkcname(what, v1->v_name, v2->v_name); res->v_length = length; /* This is a non-obvious thing */ if (v1->v_scale != v2->v_scale) { fprintf(cp_err, "Warning: scales of %s and %s are different.\n", v1->v_name, v2->v_name); res->v_scale = NULL; } else { res->v_scale = v1->v_scale; } /* Copy a few useful things */ res->v_defcolor = v1->v_defcolor; res->v_gridtype = v1->v_gridtype; res->v_plottype = v1->v_plottype; /* Copy dimensions. */ if (v1->v_numdims > v2->v_numdims) { res->v_numdims = v1->v_numdims; for (i = 0; i < v1->v_numdims; i++) res->v_dims[i] = v1->v_dims[i]; } else { res->v_numdims = v2->v_numdims; for (i = 0; i < v2->v_numdims; i++) res->v_dims[i] = v2->v_dims[i]; } /* ** Type checking for multiplication and division of vectors ** * Determines the units resulting from the operation. * A.Roldán */ switch (what) { case '*': /* Multiplication of two vectors */ switch (v1->v_type) { case SV_VOLTAGE: switch (v2->v_type) { case SV_VOLTAGE: res->v_type = SV_VOLTAGE; break; case SV_CURRENT: res->v_type = SV_POWER; break; default: break; } break; case SV_CURRENT: switch (v2->v_type) { case SV_VOLTAGE: res->v_type = SV_POWER; break; case SV_CURRENT: res->v_type = SV_CURRENT; break; default: break; } break; default: break; } break; case '/': /* division of two vectors */ switch (v1->v_type) { case SV_VOLTAGE: switch (v2->v_type) { case SV_VOLTAGE: res->v_type = SV_NOTYPE; break; case SV_CURRENT: res->v_type = SV_IMPEDANCE; break; default: break; } break; case SV_CURRENT: switch (v2->v_type) { case SV_VOLTAGE: res->v_type = SV_ADMITTANCE; break; case SV_CURRENT: res->v_type = SV_NOTYPE; break; default: break; } break; default: break; } default: break; } vec_new(res); /* Free the temporary data areas we used, if we allocated any. */ if (free1) { if (isreal(v1)) tfree(d1); else tfree(c1); } if (free2) { if (isreal(v2)) tfree(d2); else tfree(c2); } /* va: garbage collection */ if (arg1->pn_value == NULL && v1 != NULL) vec_free(v1); if (arg2->pn_value == NULL && v2 != NULL) vec_free(v2); return (res); } /* The binary operations. */ struct dvec * op_plus(struct pnode *arg1, struct pnode *arg2) { return (doop('+', cx_plus, arg1, arg2)); } struct dvec * op_minus(struct pnode *arg1, struct pnode *arg2) { return (doop('-', cx_minus, arg1, arg2)); } struct dvec * op_comma(struct pnode *arg1, struct pnode *arg2) { return (doop(',', cx_comma, arg1, arg2)); } struct dvec * op_times(struct pnode *arg1, struct pnode *arg2) { return (doop('*', cx_times, arg1, arg2)); } struct dvec * op_mod(struct pnode *arg1, struct pnode *arg2) { return (doop('%', cx_mod, arg1, arg2)); } struct dvec * op_divide(struct pnode *arg1, struct pnode *arg2) { return (doop('/', cx_divide, arg1, arg2)); } struct dvec * op_power(struct pnode *arg1, struct pnode *arg2) { return (doop('^', cx_power, arg1, arg2)); } struct dvec * op_eq(struct pnode *arg1, struct pnode *arg2) { return (doop('=', cx_eq, arg1, arg2)); } struct dvec * op_gt(struct pnode *arg1, struct pnode *arg2) { return (doop('>', cx_gt, arg1, arg2)); } struct dvec * op_lt(struct pnode *arg1, struct pnode *arg2) { return (doop('<', cx_lt, arg1, arg2)); } struct dvec * op_ge(struct pnode *arg1, struct pnode *arg2) { return (doop('G', cx_ge, arg1, arg2)); } struct dvec * op_le(struct pnode *arg1, struct pnode *arg2) { return (doop('L', cx_le, arg1, arg2)); } struct dvec * op_ne(struct pnode *arg1, struct pnode *arg2) { return (doop('N', cx_ne, arg1, arg2)); } struct dvec * op_and(struct pnode *arg1, struct pnode *arg2) { return (doop('&', cx_and, arg1, arg2)); } struct dvec * op_or(struct pnode *arg1, struct pnode *arg2) { return (doop('|', cx_or, arg1, arg2)); } /* This is an odd operation. The first argument is the name of a vector, and * the second is a range in the scale, so that v(1)[[10, 20]] gives all the * values of v(1) for which the TIME value is between 10 and 20. If there is * one argument it picks out the values which have that scale value. * NOTE that we totally ignore multi-dimensionality here -- the result is * a 1-dim vector. */ struct dvec * op_range(struct pnode *arg1, struct pnode *arg2) { struct dvec *v, *ind, *res, *scale; double up, low, td; int len, i, j; bool rev = FALSE; v = ft_evaluate(arg1); ind = ft_evaluate(arg2); if (!v || !ind) return (NULL); scale = v->v_scale; if (!scale) scale = v->v_plot->pl_scale; if (!scale) { fprintf(cp_err, "Error: no scale for vector %s\n", v->v_name); return (NULL); } if (ind->v_length != 1) { fprintf(cp_err, "Error: strange range specification\n"); return (NULL); } if (isreal(ind)) { up = low = *ind->v_realdata; } else { up = imagpart(ind->v_compdata[0]); low = realpart(ind->v_compdata[0]); } if (up < low) { td = up; up = low; low = td; rev = TRUE; } for (i = len = 0; i < scale->v_length; i++) { td = isreal(scale) ? scale->v_realdata[i] : realpart(scale->v_compdata[i]); if ((td <= up) && (td >= low)) len++; } res = alloc(struct dvec); ZERO(res, struct dvec); res->v_name = mkcname('R', v->v_name, ind->v_name); res->v_type = v->v_type; res->v_flags = v->v_flags; res->v_gridtype = v->v_gridtype; res->v_plottype = v->v_plottype; res->v_defcolor = v->v_defcolor; res->v_length = len; res->v_scale = /* nscale; */ scale; /* Dave says get rid of this res->v_numdims = v->v_numdims; for (i = 0; i < v->v_numdims; i++) res->v_dims[i] = v->v_dims[i]; */ res->v_numdims = 1; res->v_dims[0] = len; if (isreal(res)) res->v_realdata = TMALLOC(double, len); else res->v_compdata = TMALLOC(ngcomplex_t, len); /* Toss in the data */ j = 0; for (i = (rev ? v->v_length - 1 : 0); i != (rev ? -1 : v->v_length); rev ? i-- : i++) { td = isreal(scale) ? scale->v_realdata[i] : realpart(scale->v_compdata[i]); if ((td <= up) && (td >= low)) { if (isreal(res)) { res->v_realdata[j] = v->v_realdata[i]; } else { realpart(res->v_compdata[j]) = realpart(v->v_compdata[i]); imagpart(res->v_compdata[j]) = imagpart(v->v_compdata[i]); } j++; } } if (j != len) fprintf(cp_err, "Error: something funny..\n"); /* Note that we DON'T do a vec_new, since we want this vector to be * invisible to everybody except the result of this operation. * Doing this will cause a lot of core leaks, though. XXX */ vec_new(res); /* va: garbage collection */ if (arg1->pn_value == NULL && v != NULL) vec_free(v); if (arg2->pn_value == NULL && ind != NULL) vec_free(ind); return (res); } /* This is another operation we do specially -- if the argument is a vector of * dimension n, n > 0, the result will be either a vector of dimension n - 1, * or a vector of dimension n with only a certain range of vectors present. */ struct dvec * op_ind(struct pnode *arg1, struct pnode *arg2) { struct dvec *v, *ind, *res; int length, newdim, i, j, k, up, down; int majsize, blocksize; bool rev = FALSE; v = ft_evaluate(arg1); ind = ft_evaluate(arg2); if (!v || !ind) return (NULL); /* First let's check to make sure that the vector is consistent */ if (v->v_numdims > 1) { for (i = 0, j = 1; i < v->v_numdims; i++) j *= v->v_dims[i]; if (v->v_length != j) { fprintf(cp_err, "op_ind: Internal Error: len %d should be %d\n", v->v_length, j); return (NULL); } } else { /* Just in case we were sloppy */ v->v_numdims = 1; v->v_dims[0] = v->v_length; if (v->v_length <= 1) { fprintf(cp_err, "Error: nostrchring on a scalar (%s)\n", v->v_name); return (NULL); } } if (ind->v_length != 1) { fprintf(cp_err, "Error:strchr %s is not of length 1\n", ind->v_name); return (NULL); } majsize = v->v_dims[0]; blocksize = v->v_length / majsize; /* Now figure out if we should put the dim down by one. Because of the * way we parse the strchr, we figure that if the value is complex * (e.g, "[1,2]"), the guy meant a range. This is sort of bad though. */ if (isreal(ind)) { newdim = v->v_numdims - 1; down = up = (int)floor(ind->v_realdata[0] + 0.5); } else { newdim = v->v_numdims; down = (int)floor(realpart(ind->v_compdata[0]) + 0.5); up = (int)floor(imagpart(ind->v_compdata[0]) + 0.5); } if (up < down) { i = up; up = down; down = i; rev = TRUE; } if (up < 0) { fprintf(cp_err, "Warning: upper limit %d should be 0\n", up); up = 0; } if (up >= majsize) { fprintf(cp_err, "Warning: upper limit %d should be %d\n", up, majsize - 1); up = majsize - 1; } if (down < 0) { fprintf(cp_err, "Warning: lower limit %d should be 0\n", down); down = 0; } if (down >= majsize) { fprintf(cp_err, "Warning: lower limit %d should be %d\n", down, majsize - 1); down = majsize - 1; } if (up == down) length = blocksize; else length = blocksize * (up - down + 1); /* Make up the new vector. */ res = alloc(struct dvec); ZERO(res, struct dvec); res->v_name = mkcname('[', v->v_name, ind->v_name); res->v_type = v->v_type; res->v_flags = v->v_flags; res->v_defcolor = v->v_defcolor; res->v_gridtype = v->v_gridtype; res->v_plottype = v->v_plottype; res->v_length = length; res->v_numdims = newdim; if (up != down) { for (i = 0; i < newdim; i++) res->v_dims[i] = v->v_dims[i]; res->v_dims[0] = up - down + 1; } else { for (i = 0; i < newdim; i++) res->v_dims[i] = v->v_dims[i + 1]; } if (isreal(res)) res->v_realdata = TMALLOC(double, length); else res->v_compdata = TMALLOC(ngcomplex_t, length); /* And toss in the new data */ for (j = 0; j < up - down + 1; j++) { if (rev) k = (up - down) - j; else k = j; for (i = 0; i < blocksize; i++) if (isreal(res)) { res->v_realdata[k * blocksize + i] = v->v_realdata[(down + j) * blocksize + i]; } else { realpart(res->v_compdata[k * blocksize + i]) = realpart(v->v_compdata[(down + j) * blocksize + i]); imagpart(res->v_compdata[k * blocksize + i]) = imagpart(v->v_compdata[(down + j) * blocksize + i]); } } /* This is a problem -- the old scale will be no good. I guess we * should make an altered copy of the old scale also. */ /* Even though the old scale is no good and we should somehow decide * on a new scale, using the vector as its own scale is not the * solution. */ /* * res->v_scale = res; */ vec_new(res); /* va: garbage collection */ if (arg1->pn_value == NULL && v != NULL) vec_free(v); if (arg2->pn_value == NULL && ind != NULL) vec_free(ind); return (res); } /* Apply a function to an argument. Complex functions are called as follows: * cx_something(data, type, length, &newlength, &newtype), * and returns a char * that is cast to complex or double. */ static void * apply_func_funcall(struct func *func, struct dvec *v, int *newlength, short int *newtype) { void *data; /* Some of the math routines generate SIGILL if the argument is * out of range. Catch this here. */ if (SETJMP(matherrbuf, 1)) { (void) signal(SIGILL, SIG_DFL); return (NULL); } (void) signal(SIGILL, (SIGNAL_FUNCTION) sig_matherr); /* Modified for passing necessary parameters to the derive function - A.Roldan */ if (eq(func->fu_name, "interpolate") || eq(func->fu_name, "deriv") || eq(func->fu_name, "group_delay") || eq(func->fu_name, "fft") || eq(func->fu_name, "ifft")) /* Ack */ { void * (*f) (void *data, short int type, int length, int *newlength, short int *newtype, struct plot *, struct plot *, int) = (void * (*) (void *, short int, int, int *, short int *, struct plot *, struct plot *, int)) func->fu_func; data = f (isreal(v) ? (void *) v->v_realdata : (void *) v->v_compdata, (short) (isreal(v) ? VF_REAL : VF_COMPLEX), v->v_length, newlength, newtype, v->v_plot, plot_cur, v->v_dims[0]); } else { data = func->fu_func (isreal(v) ? (void *) v->v_realdata : (void *) v->v_compdata, (short) (isreal(v) ? VF_REAL : VF_COMPLEX), v->v_length, newlength, newtype); } /* Back to normal */ (void) signal(SIGILL, SIG_DFL); return data; } static struct dvec * apply_func(struct func *func, struct pnode *arg) { struct dvec *v, *t, *newv = NULL, *end = NULL; int len, i; short type; void *data; /* Special case. This is not good -- happens when vm(), etc are used * and it gets caught as a user-definable function. Usually v() * is caught in the parser. */ if (!func->fu_func) { if (!arg->pn_value /* || (arg->pn_value->v_length != 1) XXX */) { fprintf(cp_err, "Error: bad v() syntax\n"); return (NULL); } t = vec_fromplot(arg->pn_value->v_name, plot_cur); if (!t) { fprintf(cp_err, "Error: no such vector %s\n", arg->pn_value->v_name); return (NULL); } t = vec_copy(t); vec_new(t); return (t); } v = ft_evaluate(arg); if (v == NULL) return (NULL); for (; v; v = v->v_link2) { data = apply_func_funcall(func, v, &len, &type); if (!data) return (NULL); t = alloc(struct dvec); ZERO(t, struct dvec); t->v_flags = (v->v_flags & ~VF_COMPLEX & ~VF_REAL & ~VF_PERMANENT & ~VF_MINGIVEN & ~VF_MAXGIVEN); t->v_flags |= type; #ifdef FTEDEBUG if (ft_evdb) fprintf(cp_err, "apply_func: func %s to %s len %d, type %d\n", func->fu_name, v->v_name, len, type); #endif if (isreal(t)) t->v_realdata = (double *) data; else t->v_compdata = (ngcomplex_t *) data; if (eq(func->fu_name, "minus")) t->v_name = mkcname('a', func->fu_name, v->v_name); else if (eq(func->fu_name, "not")) t->v_name = mkcname('c', func->fu_name, v->v_name); else t->v_name = mkcname('b', v->v_name, NULL); t->v_type = v->v_type; /* This is strange too. */ t->v_length = len; t->v_scale = v->v_scale; /* Copy a few useful things */ t->v_defcolor = v->v_defcolor; t->v_gridtype = v->v_gridtype; t->v_plottype = v->v_plottype; t->v_numdims = v->v_numdims; for (i = 0; i < t->v_numdims; i++) t->v_dims[i] = v->v_dims[i]; vec_new(t); if (end) end->v_link2 = t; else newv = t; end = t; } /* va: garbage collection */ if (arg->pn_value == NULL && v != NULL) vec_free(v); return (newv); } /* The unary minus operation. */ struct dvec * op_uminus(struct pnode *arg) { return (apply_func(&func_uminus, arg)); } struct dvec * op_not(struct pnode *arg) { return (apply_func(&func_not, arg)); } /* Create a reasonable name for the result of a function application, etc. * The what values 'a' and 'b' mean "make a function name" and "make a * unary minus", respectively. */ static char * mkcname(char what, char *v1, char *v2) { char buf[BSIZE_SP], *s; if (what == 'a') (void) sprintf(buf, "%s(%s)", v1, v2); else if (what == 'b') (void) sprintf(buf, "-(%s)", v1); else if (what == 'c') (void) sprintf(buf, "~(%s)", v1); else if (what == '[') (void) sprintf(buf, "%s[%s]", v1, v2); else if (what == 'R') (void) sprintf(buf, "%s[[%s]]", v1, v2); else (void) sprintf(buf, "(%s)%c(%s)", v1, what, v2); s = copy(buf); return (s); } ngspice-26/src/frontend/misccoms.h0000644000265600020320000000034712264261473016631 0ustar andreasadmin/************* * Header file for misccoms.c * 1999 E. Rouat ************/ #ifndef ngspice_MISCCOMS_H #define ngspice_MISCCOMS_H void com_quit(wordlist *wl); void com_bug(wordlist *wl); void com_version(wordlist *wl); #endif ngspice-26/src/frontend/dimens.c0000644000265600020320000001142512264261473016265 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Read and write dimension/index arrays via strings. */ #include "ngspice/ngspice.h" #include "ngspice/dvec.h" /* For MAXDIMS */ #include "dimens.h" /* * Create a string of the form "12,1,10". */ void dimstring(int *data, int length, char *retstring) { int i; char buf[BSIZE_SP]; if (!data || length < 1) retstring = ""; buf[0] = '\0'; for (i = 0; i < length; i++) sprintf(buf + strlen(buf), "%d%s", data[i], (i < length - 1) ? "," : ""); /* XXX Should I return a copy instead? */ /* qui ci devo fare una copia */ strcpy(retstring, buf); } /* * Create a string of the form "[12][1][10]". */ void indexstring(int *data, int length, char *retstring) { int i; char buf[BSIZE_SP]; if (!data || length < 1) retstring = ""; buf[0] = '\0'; for (i = 0; i < length; i++) sprintf(buf + strlen(buf), "[%d]", data[i]); strcpy(retstring, buf); } /* * Add one to anstrchr into an array with sizes in dims. * Return 1 when all counters overflow at once. */ int incindex(int *counts, int numcounts, int *dims, int numdims) { int i, start; if (!counts || numcounts < 1 || !dims || numdims < 1) return 0; start = numcounts - 1; for (i = start; i >= 0; i--) if (++counts[i] < dims[i]) break; /* This counter is not maxed out. */ else counts[i] = 0; if (i == 0) return (1); else return (0); } /* * Count number of empty dimensions in an array. */ int emptydims(int *data, int length) { int i, numempty = 0; for (i = 0; i < length; i++) if (data[i] == 0) numempty++; return (numempty); } /* * Read a string of one of the following forms into a dimensions array: * [12][1][10] * [12,1,10] * 12,1,10 * 12, 1, 10 * 12 , 1 , 10 * Basically, we require that all brackets be matched, that all numbers * be separated by commas or by "][", that all whitespace is ignored, and * the beginning [ and end ] are ignored if they exist. The only valid * characters in the string are brackets, commas, spaces, and digits. * If any dimension is blank, its entry in the array is set to 0. * * Return 0 on success, 1 on failure. */ int atodims(char *p, int *data, int *outlength) { int length = 0; int state = 0; int err = 0; int needbracket = 0; char sep = '\0'; if (!data || !outlength) return 1; if (!p) { *outlength = 0; return 0; } while (*p && isspace(*p)) p++; if (*p == '[') { p++; while (*p && isspace(*p)) p++; needbracket = 1; } while (*p && state != 3) { switch (state) { case 0: /* p just at or before a number */ if (length >= MAXDIMS) { if (length == MAXDIMS) printf("Error: maximum of %d dimensions allowed.\n", MAXDIMS); length += 1; } else if (!isdigit(*p)) { data[length++] = 0; /* This position was empty. */ } else { data[length++] = atoi(p); while (isdigit(*p)) p++; } state = 1; break; case 1: /* p after a number, looking for ',' or ']' */ if (sep == '\0') sep = *p; if (*p == ']' && *p == sep) { p++; state = 2; } else if (*p == ',' && *p == sep) { p++; state = 0; } else { /* Funny character following a # */ break; } break; case 2: /* p after a ']', either at the end or looking for '[' */ if (*p == '[') { p++; state = 0; } else { state = 3; } break; } while (*p && isspace(*p)) p++; } *outlength = length; if (length > MAXDIMS) return (1); if (state == 3) { /* We finished with a closing bracket */ err = !needbracket; } else if (*p) { /* We finished by hitting a bad character after a # */ err = 1; } else { /* We finished by exhausting the string */ err = needbracket; } if (err) *outlength = 0; return (err); } /* * Skip to the first character that cannot be part of a dimension string. */ char * skipdims(char *p) { if (!p) return NULL; while (*p && (*p == '[' || *p == ']' || *p == ',' || isspace(*p) || isdigit(*p))) p++; return (p); } ngspice-26/src/frontend/com_measure2.c0000644000265600020320000017444312264261473017401 0ustar andreasadmin/* New routines to evaluate the .measure cards. Entry point is function get_measure2(), called by fcn do_measure() from measure.c. Patches by Bill Swartz from 2009-05-18 and 2009-08-21 are included. */ #include "ngspice/ngspice.h" #include "ngspice/memory.h" #include "ngspice/fteext.h" #include "ngspice/wordlist.h" #include "vectors.h" #include #include "dotcards.h" #include "com_measure2.h" #include "breakp2.h" typedef enum { MEASUREMENT_OK = 0, MEASUREMENT_FAILURE = 1 } MEASURE_VAL_T; #define MEASURE_DEFAULT -1 #define MEASURE_LAST_TRANSITION -2 typedef struct measure { char *result; char *m_vec; // name of the output variable which determines the beginning of the measurement char *m_vec2; // second output variable to measure if applicable char *m_analysis; // analysis type (tran, dc or ac) char m_vectype; // type of vector m_vec (vm, vi, vr, vp, vdb) char m_vectype2; // type of vector m_vec2 (vm, vi, vr, vp, vdb) int m_rise; // count number of rise events int m_fall; // count number of fall events int m_cross; // count number of rise/fall aka cross events double m_val; // value of the m_ver at which the counter for crossing, rises or falls is incremented by one double m_td; // amount of delay before the measurement should start double m_from; // measure only in a time window - starting time of window double m_to; // measurement window - ending time double m_at; // measure at the specified time double m_measured; // what we measured double m_measured_at; // what we measured at the given time } MEASURE, *MEASUREPTR; typedef enum AnalysisType { AT_UNKNOWN, AT_DELAY, AT_TRIG, AT_FIND, AT_WHEN, AT_AVG, AT_MIN, AT_MAX, AT_RMS, AT_PP, AT_INTEG, AT_DERIV, AT_ERR, AT_ERR1, AT_ERR2, AT_ERR3, AT_MIN_AT, AT_MAX_AT } ANALYSIS_TYPE_T; /** return precision (either 5 or value of environment variable NGSPICE_MEAS_PRECISION) */ int measure_get_precision(void) { char *env_ptr; int precision = 5; if ((env_ptr = getenv("NGSPICE_MEAS_PRECISION")) != NULL) precision = atoi(env_ptr); return precision; } static void measure_errMessage(char *mName, char *mFunction, char *trigTarg, char *errMsg, int chk_only) { if (!chk_only) { printf("\nError: measure %s %s(%s) : ", mName, mFunction, trigTarg); printf("%s", errMsg); // printf("\tmeasure '%s' failed\n", mName); } } /* If you have a vector vm(out), extract 'm' to meas->m_vectype and v(out) to meas->m_vec (without 'm') */ static void correct_vec(MEASUREPTR meas) { char *vec, *vecfirst, newvec[BSIZE_SP]; char *vec2, newvec2[BSIZE_SP]; vec = meas->m_vec; /* return if not of type VM() etc */ if ((*vec != 'v') || (!strstr(vec, "("))) return; if (*(++vec) != '(') { vecfirst = copy(meas->m_vec); vecfirst[1] = '\0'; meas->m_vectype = *vec; sprintf(newvec, "%s%s", vecfirst, strstr(meas->m_vec, "(")); tfree(meas->m_vec); tfree(vecfirst); meas->m_vec = copy(newvec); } vec2 = meas->m_vec2; if (vec2 && (*(++vec2) != '(')) { vecfirst = copy(meas->m_vec); vecfirst[1] = '\0'; meas->m_vectype2 = *vec2; sprintf(newvec, "%s%s", vecfirst, strstr(meas->m_vec2, "(")); tfree(meas->m_vec2); tfree(vecfirst); meas->m_vec2 = copy(newvec2); } } /* Returns a value from a complex vector *values, depending on meas->m_vectype */ static double get_value( MEASUREPTR meas, /*in: pointer to mesurement structure */ struct dvec *values, /*in: vector of complex values */ int idx /*in: index of vector value to be read out */ ) { double ar, bi, tt; ar = values->v_compdata[idx].cx_real; bi = values->v_compdata[idx].cx_imag; if ((meas->m_vectype == 'm') || (meas->m_vectype == 'M')) { return sqrt(ar*ar + bi*bi); /* magnitude */ } else if ((meas->m_vectype == 'r') || (meas->m_vectype == 'R')) { return ar; /* real value */ } else if ((meas->m_vectype == 'i') || (meas->m_vectype == 'I')) { return bi; /* imaginary value */ } else if ((meas->m_vectype == 'p') || (meas->m_vectype == 'P')) { return radtodeg(atan2(bi, ar)); /* phase (in degrees) */ } else if ((meas->m_vectype == 'd') || (meas->m_vectype == 'D')) { tt = sqrt(ar*ar + bi*bi); /* dB of magnitude */ return 20.0 * log10(tt); } else { return ar; /* default: real value */ } } /* Returns interpolated value. If ac simulation, exploit vector type with complex data for y */ static double measure_interpolate( struct dvec *xScale, /* in: vector of independent variables, if ac: complex vector, but only real part used */ struct dvec *values, /* in: vector of dependent variables, if ac: complex vector */ int i, /* in: index of first interpolation value */ int j, /* in: index of second interpolation value */ double var_value, /* in: variable, whose counterpart is sought by interpolation */ char x_or_y , /* in: if 'x', then look for y, if 'y' then look for x */ MEASUREPTR meas /* pointer to measurement structure */ ) { double slope; double yint; double result; if (cieq (meas->m_analysis, "ac")) { /* get values from complex y vector according to meas->m_vectype, x vector uses only real part of complex data (frequency).*/ slope = (get_value(meas, values, j) - get_value(meas, values, i)) / (xScale->v_compdata[j].cx_real - xScale->v_compdata[i].cx_real); yint = get_value(meas, values, i) - slope*xScale->v_compdata[i].cx_real; } else { slope = (values->v_realdata[j] - values->v_realdata[i]) / (xScale->v_realdata[j] - xScale->v_realdata[i]); yint = values->v_realdata[i] - slope*xScale->v_realdata[i]; } if (x_or_y == 'x') result = (var_value - yint)/slope; else result = slope*var_value + yint; return result; } /* ----------------------------------------------------------------- * Function: Given an operation string returns back the measure type - * one of the enumerated type ANALSYS_TYPE_T. * ----------------------------------------------------------------- */ static ANALYSIS_TYPE_T measure_function_type(char *operation) { char *mFunction; /* operation */ ANALYSIS_TYPE_T mFunctionType; /* type of requested function */ mFunction = cp_unquote(operation); // Functions if (strcasecmp(mFunction, "DELAY") == 0) mFunctionType = AT_DELAY; else if (strcasecmp(mFunction, "TRIG") == 0) mFunctionType = AT_DELAY; else if (strcasecmp(mFunction, "TARG") == 0) mFunctionType = AT_DELAY; else if (strcasecmp(mFunction, "FIND") == 0) mFunctionType = AT_FIND; else if (strcasecmp(mFunction, "WHEN") == 0) mFunctionType = AT_WHEN; else if (strcasecmp(mFunction, "AVG") == 0) mFunctionType = AT_AVG; else if (strcasecmp(mFunction, "MIN") == 0) mFunctionType = AT_MIN; else if (strcasecmp(mFunction, "MAX") == 0) mFunctionType = AT_MAX; else if (strcasecmp(mFunction, "MIN_AT") == 0) mFunctionType = AT_MIN_AT; else if (strcasecmp(mFunction, "MAX_AT") == 0) mFunctionType = AT_MAX_AT; else if (strcasecmp(mFunction, "RMS") == 0) mFunctionType = AT_RMS; else if (strcasecmp(mFunction, "PP") == 0) mFunctionType = AT_PP; else if (strcasecmp(mFunction, "INTEG") == 0) mFunctionType = AT_INTEG; else if (strcasecmp(mFunction, "DERIV") == 0) mFunctionType = AT_DERIV; else if (strcasecmp(mFunction, "ERR") == 0) mFunctionType = AT_ERR; else if (strcasecmp(mFunction, "ERR1") == 0) mFunctionType = AT_ERR1; else if (strcasecmp(mFunction, "ERR2") == 0) mFunctionType = AT_ERR2; else if (strcasecmp(mFunction, "ERR3") == 0) mFunctionType = AT_ERR3; else mFunctionType = AT_UNKNOWN; tfree(mFunction); return (mFunctionType); } /* ----------------------------------------------------------------- * Function: Parse the measurement line and extract any variables in * the statement and call com_save2 to instantiate the variable as a * measurement vector in the transient analysis. * ----------------------------------------------------------------- */ int measure_extract_variables(char *line) { /* Various formats for measure statement: * .MEASURE {DC|AC|TRAN} result TRIG trig_variable VAL=val * + * + * + TARG targ_variable VAL=val * + * + * * .MEASURE {DC|AC|TRAN} result WHEN out_variable=val * + * + * * .MEASURE {DC|AC|TRAN} result WHEN out_variable=out_variable2 * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=val * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=out_variable3 * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable AT=val * + * * .MEASURE {DC|AC|TRAN} result {AVG|MIN|MAX|MIN_AT|MAX_AT|PP|RMS} out_variable * + * * .MEASURE {DC|AC|TRAN} result INTEG out_variable * + * * .MEASURE {DC|AC|TRAN} result DERIV out_variable AT=val * * .MEASURE {DC|AC|TRAN} result DERIV out_variable WHEN out_variable2=val * + * + * * .MEASURE {DC|AC|TRAN} result DERIV out_variable WHEN out_variable2=out_variable3 * + * + * ----------------------------------------------------------------- */ int status; /* return status */ char *item; /* parsing item */ char *measure; /* measure keyword */ char *analysis; /* analysis option */ char *variable, *variable2; /* variable to trace */ wordlist *measure_var; /* wordlist of measurable */ ANALYSIS_TYPE_T op; /* measure function type */ status = TRUE; measure = gettok(&line); if (!measure) return (status); analysis = gettok(&line); if (!analysis) return (status); if ((strcasecmp(analysis, "DC") == 0) || (strcasecmp(analysis, "AC") == 0) || (strcasecmp(analysis, "TRAN") == 0)) { analysis = copy(analysis); } else { /* sometimes operation is optional - for now just pick trans */ analysis = copy("TRAN"); } do { item = gettok(&line); if (item) { op = measure_function_type(item); if (op != AT_UNKNOWN) { /* We have a variable/complex variable coming next */ variable = gettok_iv(&line); variable2 = NULL; if (*line == '=') variable2 = gettok_iv(&line); if (variable) { size_t len = strlen(item); if (item[len-1] == '=') { } else { /* We may have something like V(n1)=1 or v(n1)=2 , same with i() */ measure_var = gettoks(variable); com_save2(measure_var, analysis); status = FALSE; } } if (variable2) { /* We may have something like v(n1)=v(n2) v(n2) is handled here, same with i() */ measure_var = gettoks(variable2); com_save2(measure_var, analysis); status = FALSE; } } } } while(line && *line); return (status); } /* ----------------------------------------------------------------- * Function: process a WHEN measurement statement which has been * parsed into a measurement structure. * ----------------------------------------------------------------- */ static void com_measure_when( MEASUREPTR meas /* in : parsed measurement structure */ ) { int i, first; int riseCnt = 0; int fallCnt = 0; int crossCnt = 0; int section = -1; int measurement_pending; int init_measured_value; bool ac_check = FALSE, sp_check = FALSE, dc_check = FALSE, tran_check = FALSE; bool has_d2 = FALSE; double value, prevValue, value2, prevValue2; double scaleValue, prevScaleValue; enum ValSide { S_ABOVE_VAL, S_BELOW_VAL }; enum ValEdge { E_RISING, E_FALLING }; struct dvec *d, *d2, *dScale; d = vec_get(meas->m_vec); if (meas->m_vec2) { d2 = vec_get(meas->m_vec2); has_d2 = TRUE; } else { d2 = NULL; } dScale = plot_cur->pl_scale; if (d == NULL) { fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec); return; } if (has_d2 && (d2 == NULL)) { fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec2); return; } if (dScale == NULL) { fprintf(cp_err, "Error: no scale vector.\n"); return; } prevValue = 0.; prevValue2 = 0.; prevScaleValue = 0.; first = 0; measurement_pending = 0; init_measured_value = 1; /* ----------------------------------------------------------------- * Take the string tests outside of the loop for speed. * ----------------------------------------------------------------- */ if (cieq (meas->m_analysis, "ac")) ac_check = TRUE; else if (cieq (meas->m_analysis, "sp")) sp_check = TRUE; else if (cieq (meas->m_analysis, "dc")) dc_check = TRUE; else tran_check = TRUE; for (i = 0; i < d->v_length; i++) { if (ac_check) { if (d->v_compdata) value = get_value(meas, d, i); //d->v_compdata[i].cx_real; else value = d->v_realdata[i]; scaleValue = dScale->v_compdata[i].cx_real; } else if (sp_check) { if (d->v_compdata) value = get_value(meas, d, i); //d->v_compdata[i].cx_real; else value = d->v_realdata[i]; scaleValue = dScale->v_realdata[i]; } else { value = d->v_realdata[i]; scaleValue = dScale->v_realdata[i]; } if (has_d2) { if (ac_check) { if (d2->v_compdata) value2 = get_value(meas, d2, i); //d->v_compdata[i].cx_real; else value2 = d2->v_realdata[i]; } else if (sp_check) { if (d2->v_compdata) value2 = get_value(meas, d2, i); //d->v_compdata[i].cx_real; else value2 = d2->v_realdata[i]; } else { value2 = d2->v_realdata[i]; } } else { value2 = NAN; } /* 'dc' is special: it may start at an arbitrary scale value. Use m_td to store this value, a delay TD does not make sense */ if (dc_check && (i == 0)) meas->m_td = scaleValue; /* if analysis tran, suppress values below TD */ if (tran_check && (scaleValue < meas->m_td)) continue; /* if analysis ac, sp, suppress values below 0 */ else if ((ac_check || sp_check) && (scaleValue < 0)) continue; /* if 'dc': reset first if scale jumps back to origin */ if ((first > 1) && (dc_check && (meas->m_td == scaleValue))) first = 1; if (first == 1) { if (has_d2) { // initialise crossCnt = 0; if (value < value2) { section = S_BELOW_VAL; if ((prevValue <= value2) && (value >= value2)) { fallCnt = 1; crossCnt = 1; } } else { section = S_ABOVE_VAL; if ((prevValue <= value2) && (value >= value2)) { riseCnt = 1; crossCnt = 1; } } fflush(stdout); } else { // initialise crossCnt = 0; if (value < meas->m_val) { section = S_BELOW_VAL; if ((prevValue <= meas->m_val) && (value >= meas->m_val)) { fallCnt = 1; crossCnt = 1; } } else { section = S_ABOVE_VAL; if ((prevValue <= meas->m_val) && (value >= meas->m_val)) { riseCnt = 1; crossCnt = 1; } } fflush(stdout); } } if (first > 1) { if (has_d2) { if ((section == S_BELOW_VAL) && (value >= value2)) { section = S_ABOVE_VAL; crossCnt++; riseCnt++; if (meas->m_fall != MEASURE_LAST_TRANSITION) { /* we can measure rise/cross transition if the user * has not requested a last fall transition */ measurement_pending = 1; } } else if ((section == S_ABOVE_VAL) && (value <= value2)) { section = S_BELOW_VAL; crossCnt++; fallCnt++; if (meas->m_rise != MEASURE_LAST_TRANSITION) { /* we can measure fall/cross transition if the user * has not requested a last rise transition */ measurement_pending = 1; } } if ((crossCnt == meas->m_cross) || (riseCnt == meas->m_rise) || (fallCnt == meas->m_fall)) { /* user requested an exact match of cross, rise, or fall * exit when we meet condition */ // meas->m_measured = prevScaleValue + (value2 - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue); meas->m_measured = prevScaleValue + (prevValue2 - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue - value2 + prevValue2); return; } if (measurement_pending) { if ((meas->m_cross == MEASURE_DEFAULT) && (meas->m_rise == MEASURE_DEFAULT) && (meas->m_fall == MEASURE_DEFAULT)) { /* user didn't request any option, return the first possible case */ meas->m_measured = prevScaleValue + (prevValue2 - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue - value2 + prevValue2); return; } else if ((meas->m_cross == MEASURE_LAST_TRANSITION) || (meas->m_rise == MEASURE_LAST_TRANSITION) || (meas->m_fall == MEASURE_LAST_TRANSITION)) { meas->m_measured = prevScaleValue + (prevValue2 - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue - value2 + prevValue2); /* no return - look for last */ init_measured_value = 0; } measurement_pending = 0; } } else { if ((section == S_BELOW_VAL) && (value >= meas->m_val)) { section = S_ABOVE_VAL; crossCnt++; riseCnt++; if (meas->m_fall != MEASURE_LAST_TRANSITION) { /* we can measure rise/cross transition if the user * has not requested a last fall transition */ measurement_pending = 1; } } else if ((section == S_ABOVE_VAL) && (value <= meas->m_val)) { section = S_BELOW_VAL; crossCnt++; fallCnt++; if (meas->m_rise != MEASURE_LAST_TRANSITION) { /* we can measure fall/cross transition if the user * has not requested a last rise transition */ measurement_pending = 1; } } if ((crossCnt == meas->m_cross) || (riseCnt == meas->m_rise) || (fallCnt == meas->m_fall)) { /* user requested an exact match of cross, rise, or fall * exit when we meet condition */ meas->m_measured = prevScaleValue + (meas->m_val - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue); return; } if (measurement_pending) { if ((meas->m_cross == MEASURE_DEFAULT) && (meas->m_rise == MEASURE_DEFAULT) && (meas->m_fall == MEASURE_DEFAULT)) { /* user didn't request any option, return the first possible case */ meas->m_measured = prevScaleValue + (meas->m_val - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue); return; } else if ((meas->m_cross == MEASURE_LAST_TRANSITION) || (meas->m_rise == MEASURE_LAST_TRANSITION) || (meas->m_fall == MEASURE_LAST_TRANSITION)) { meas->m_measured = prevScaleValue + (meas->m_val - prevValue) * (scaleValue - prevScaleValue) / (value - prevValue); /* no return - look for last */ init_measured_value = 0; } measurement_pending = 0; } } } first ++; prevValue = value; if (has_d2) prevValue2 = value2; prevScaleValue = scaleValue; } if (init_measured_value) meas->m_measured = NAN; } /* ----------------------------------------------------------------- * Function: process an AT measurement statement which has been * parsed into a measurement structure. We make sure to interpolate * the value when appropriate. * ----------------------------------------------------------------- */ static void measure_at( MEASUREPTR meas, /* in : parsed "at" data */ double at /* in: time to perform measurement */ ) { int i; double value, pvalue, svalue, psvalue; bool ac_check = FALSE, sp_check = FALSE, dc_check = FALSE, tran_check = FALSE; struct dvec *d, *dScale; psvalue = pvalue = 0; d = vec_get(meas->m_vec); dScale = plot_cur->pl_scale; if (d == NULL) { fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec); return; } if (dScale == NULL) { fprintf(cp_err, "Error: no such vector time, frequency or dc.\n"); return; } /* ----------------------------------------------------------------- * Take the string tests outside of the loop for speed. * ----------------------------------------------------------------- */ if (cieq (meas->m_analysis, "ac")) ac_check = TRUE; else if (cieq (meas->m_analysis, "sp")) sp_check = TRUE; else if (cieq (meas->m_analysis, "dc")) dc_check = TRUE; else tran_check = TRUE; for (i = 0; i < d->v_length; i++) { if (ac_check) { if (d->v_compdata) { value = get_value(meas, d, i); //d->v_compdata[i].cx_real; } else { value = d->v_realdata[i]; // fprintf(cp_err, "Warning: 'meas ac' input vector is real!\n"); } svalue = dScale->v_compdata[i].cx_real; } else if (sp_check) { if (d->v_compdata) value = get_value(meas, d, i); //d->v_compdata[i].cx_real; else value = d->v_realdata[i]; svalue = dScale->v_realdata[i]; } else { value = d->v_realdata[i]; svalue = dScale->v_realdata[i]; } if ((i > 0) && (psvalue <= at) && (svalue >= at)) { meas->m_measured = pvalue + (at - psvalue) * (value - pvalue) / (svalue - psvalue); return; } else if (dc_check && (i > 0) && (psvalue >= at) && (svalue <= at)) { meas->m_measured = pvalue + (at - psvalue) * (value - pvalue) / (svalue - psvalue); return; } psvalue = svalue; pvalue = value; } meas->m_measured = NAN; } /* ----------------------------------------------------------------- * Function: process an MIN, MAX, or AVG statement which has been * parsed into a measurement structure. We should make sure to interpolate * the value here when we have m_from and m_to constraints * so this * function is slightly wrong. Need to fix in future rev. * ----------------------------------------------------------------- */ static void measure_minMaxAvg( MEASUREPTR meas, /* in : parsed measurement data request */ ANALYSIS_TYPE_T mFunctionType /* in: one of AT_AVG, AT_MIN, AT_MAX, AT_MIN_AT, AT_MAX_AT */ ) { int i, avgCnt; struct dvec *d, *dScale; double value, svalue, mValue, mValueAt; int first; bool ac_check = FALSE, sp_check = FALSE, dc_check = FALSE, tran_check = FALSE; mValue = 0; mValueAt = svalue = 0; meas->m_measured = NAN; meas->m_measured_at = NAN; first = 0; avgCnt = 0; d = vec_get(meas->m_vec); if (d == NULL) { fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec); return; } /* ----------------------------------------------------------------- * Take the string tests outside of the loop for speed. * ----------------------------------------------------------------- */ if (cieq (meas->m_analysis, "ac")) ac_check = TRUE; else if (cieq (meas->m_analysis, "sp")) sp_check = TRUE; else if (cieq (meas->m_analysis, "dc")) dc_check = TRUE; else tran_check = TRUE; if (ac_check || sp_check) { dScale = vec_get("frequency"); } else if (tran_check) { dScale = vec_get("time"); } else if (dc_check) { dScale = vec_get("v-sweep"); } else { /* error */ fprintf(cp_err, "Error: no such analysis type as %s.\n", meas->m_analysis); return; } if (dScale == NULL) { fprintf(cp_err, "Error: no such vector as time, frquency or v-sweep.\n"); return; } for (i = 0; i < d->v_length; i++) { if (ac_check) { if (d->v_compdata) { value = get_value(meas, d, i); //d->v_compdata[i].cx_real; } else { value = d->v_realdata[i]; // fprintf(cp_err, "Warning: 'meas ac' input vector is real!\n"); } svalue = dScale->v_compdata[i].cx_real; } else if (sp_check) { if (d->v_compdata) value = get_value(meas, d, i); //d->v_compdata[i].cx_real; else value = d->v_realdata[i]; svalue = dScale->v_realdata[i]; } else { value = d->v_realdata[i]; svalue = dScale->v_realdata[i]; } if (dc_check) { /* dc: start from pos or neg scale value */ if ((svalue < meas->m_from) || (svalue > meas->m_to)) continue; } else { /* all others: start from neg scale value */ if (svalue < meas->m_from) continue; if ((meas->m_to != 0.0e0) && (svalue > meas->m_to)) break; } if (first == 0) { mValue = value; mValueAt = svalue; first = 1; } else { switch (mFunctionType) { case AT_MIN: case AT_MIN_AT: { if (value <= mValue) { mValue = value; mValueAt = svalue; } break; } case AT_MAX_AT: case AT_MAX: { if (value >= mValue) { mValue = value; mValueAt = svalue; } break; } case AT_AVG: { mValue = mValue + value; avgCnt ++; break; } default : fprintf(cp_err, "Error: improper min/max/avg call.\n"); } } } switch (mFunctionType) { case AT_AVG: { meas->m_measured = (mValue / avgCnt); meas->m_measured_at = svalue; break; } case AT_MIN: case AT_MAX: case AT_MIN_AT: case AT_MAX_AT: { meas->m_measured = mValue; meas->m_measured_at = mValueAt; break; } default : fprintf(cp_err, "Error: improper min/max/avg call.\n"); } } /* ----------------------------------------------------------------- * Function: process an RMS or INTEG statement which has been * parsed into a measurement structure. Here we do interpolate * the starting and stopping time window so the answer is correct. * ----------------------------------------------------------------- */ static void measure_rms_integral( MEASUREPTR meas, /* in : parsed measurement data request */ ANALYSIS_TYPE_T mFunctionType /* in: one of AT_RMS, or AT_INTEG */ ) { int i; /* counter */ int xy_size; /* # of temp array elements */ struct dvec *d, *xScale; /* value and indpendent (x-axis) vectors */ double value, xvalue; /* current value and independent value */ double *x; /* temp x array */ double *y; /* temp y array */ double toVal; /* to time value */ double *width; /* temp width array */ double sum1; /* first sum */ double sum2; /* second sum */ double sum3; /* third sum */ int first; bool ac_check = FALSE, sp_check = FALSE, dc_check = FALSE, tran_check = FALSE; xvalue = 0; meas->m_measured = NAN; meas->m_measured_at = NAN; first = 0; if (cieq (meas->m_analysis, "ac")) ac_check = TRUE; else if (cieq (meas->m_analysis, "sp")) sp_check = TRUE; else if (cieq (meas->m_analysis, "dc")) dc_check = TRUE; else tran_check = TRUE; d = vec_get(meas->m_vec); if (d == NULL) { fprintf(cp_err, "Error: no such vector as %s.\n", meas->m_vec); return; } if (ac_check || sp_check) { xScale = vec_get("frequency"); } else if (tran_check) { xScale = vec_get("time"); } else if (dc_check) { xScale = vec_get("v-sweep"); } else { /* error */ fprintf(cp_err, "Error: no such analysis type as %s.\n", meas->m_analysis); return; } if (xScale == NULL) { fprintf(cp_err, "Error: no such vector as time.\n"); return; } /* Allocate buffers for calculation. */ x = TMALLOC(double, xScale->v_length); y = TMALLOC(double, xScale->v_length); width = TMALLOC(double, xScale->v_length + 1); xy_size = 0; toVal = -1; /* create new set of values over interval [from, to] -- interpolate if necessary */ for (i = 0; i < d->v_length; i++) { if (ac_check) { if (d->v_compdata) { value = get_value(meas, d, i); //d->v_compdata[i].cx_real; } else { value = d->v_realdata[i]; // fprintf(cp_err, "Warning: 'meas ac' input vector is real!\n"); } xvalue = xScale->v_compdata[i].cx_real; } else { value = d->v_realdata[i]; xvalue = xScale->v_realdata[i]; } if (xvalue < meas->m_from) continue; if ((meas->m_to != 0.0e0) && (xvalue > meas->m_to)) { // interpolate ending value if necessary. if (!AlmostEqualUlps(xvalue, meas->m_to, 100)) { value = measure_interpolate(xScale, d, i-1, i, meas->m_to, 'y', meas); xvalue = meas->m_to; } x[xy_size] = xvalue; if (mFunctionType == AT_RMS) y[xy_size++] = value * value; else y[xy_size++] = value; toVal = xvalue; break; } if (first == 0) { if (meas->m_from != 0.0e0 && (i > 0)) { // interpolate starting value. if (!AlmostEqualUlps(xvalue, meas->m_from, 100)) { value = measure_interpolate(xScale, d, i-1, i, meas->m_from, 'y' , meas); xvalue = meas->m_from; } } meas->m_measured_at = xvalue; first = 1; } x[xy_size] = xvalue; if (mFunctionType == AT_RMS) y[xy_size++] = value * value; else y[xy_size++] = value; } // evaluate segment width for (i = 0; i < xy_size-1; i++) width[i] = x[i+1] - x[i]; width[i++] = 0; width[i++] = 0; // Compute Integral (area under curve) i = 0; sum1 = sum2 = sum3 = 0.0; while (i < xy_size-1) { // Simpson's 3/8 Rule if (AlmostEqualUlps(width[i], width[i+1], 100) && AlmostEqualUlps(width[i], width[i+2], 100)) { sum1 += 3*width[i] * (y[i] + 3*(y[i+1] + y[i+2]) + y[i+3]) / 8.0; i += 3; } // Simpson's 1/3 Rule else if (AlmostEqualUlps(width[i], width[i+1], 100)) { sum2 += width[i] * (y[i] + 4*y[i+1] + y[i+2]) / 3.0; i += 2; } // Trapezoidal Rule else if (!AlmostEqualUlps(width[i], width[i+1], 100)) { sum3 += width[i] * (y[i] + y[i+1]) / 2; i++; } } /* Now set the measurement values if not set */ if (toVal < 0.0) { if (ac_check) { if (d->v_compdata) { value = get_value(meas, d, i); //d->v_compdata[i].cx_real; } else { value = d->v_realdata[i]; // fprintf(cp_err, "Warning: 'meas ac' input vector is real!\n"); } xvalue = xScale->v_compdata[i].cx_real; toVal = xScale->v_compdata[d->v_length-1].cx_real; } else { toVal = xScale->v_realdata[d->v_length-1]; } } meas->m_from = meas->m_measured_at; meas->m_to = toVal; if (mFunctionType == AT_RMS) { meas->m_measured = (sum1 + sum2 + sum3)/ (toVal - meas->m_measured_at); meas->m_measured = sqrt(meas->m_measured); } else { meas->m_measured = (sum1 + sum2 + sum3); } txfree(x); txfree(y); txfree(width); } /* ----------------------------------------------------------------- * Function: Wrapper function to process a RMS measurement. * ----------------------------------------------------------------- */ #if 0 static void measure_rms( MEASUREPTR meas /* in : parsed measurement data request */ ) { // RMS (root mean squared): // Calculates the square root of the area under the 'out_var2' curve // divided be the period of interest measure_rms_integral(meas, AT_RMS); } #endif /* ----------------------------------------------------------------- * Function: Wrapper function to process a integration measurement. * ----------------------------------------------------------------- */ #if 0 static void measure_integ( MEASUREPTR meas /* in : parsed measurement data request */ ) { // INTEGRAL INTEG measure_rms_integral(meas, AT_INTEG); } #endif /* still some more work to do.... */ #if 0 static void measure_deriv(void) { // DERIVATIVE DERIV } #endif // ERR Equations #if 0 static void measure_ERR(void) { } static void measure_ERR1(void) { } static void measure_ERR2(void) { } static void measure_ERR3(void) { } #endif void com_dotmeasure(wordlist *wl) { NG_IGNORE(wl); /* simulation info */ // printf("*%s\n", plot_cur->pl_title); // printf("\t %s, %s\n", plot_cur->pl_name, plot_cur->pl_date); // missing temp } /* ----------------------------------------------------------------- * Function: Given a measurement variable name, see if the analysis * has generated a measure vector for it. Returns TRUE if it exists * or varname is NULL, Return FALSE otherwise * ----------------------------------------------------------------- */ static int measure_valid_vector( char *varname /* in: requested variable name */ ) { struct dvec *d; /* measurement vector */ if (varname == NULL) return TRUE; d = vec_get(varname); if (d == NULL) return FALSE; return TRUE; } /* ----------------------------------------------------------------- * Function: Given a wordlist and measurement structure, parse the * standard parameters such as RISE, FALL, VAL, TD, FROM, TO, etc. * in a measurement statement. We also check the appropriate * variables found in the measurement statement. * ----------------------------------------------------------------- */ static int measure_parse_stdParams( MEASUREPTR meas, /* in : measurement structure */ wordlist *wl, /* in : word list to parse */ wordlist *wlBreak, /* out: where we stopped parsing */ char *errbuf /* in/out: buffer where we write error messages */ ) { int pCnt; char *p, *pName, *pValue; double *engVal, engVal1; pCnt = 0; while (wl != wlBreak) { p = wl->wl_word; pName = strtok(p, "="); pValue = strtok(NULL, "="); if (pValue == NULL) { if (strcasecmp(pName, "LAST") == 0) { meas->m_cross = MEASURE_LAST_TRANSITION; meas->m_rise = -1; meas->m_fall = -1; pCnt ++; wl = wl->wl_next; continue; } else { sprintf(errbuf, "bad syntax of ??\n"); return 0; } } if (strcasecmp(pValue, "LAST") == 0) { engVal1 = MEASURE_LAST_TRANSITION; } else { if ((engVal = ft_numparse(&pValue, FALSE)) == NULL) { sprintf(errbuf, "bad syntax of ??\n"); return 0; } engVal1 = *engVal; // What is this ?? } if (strcasecmp(pName, "RISE") == 0) { meas->m_rise = (int)floor(engVal1 + 0.5); meas->m_fall = -1; meas->m_cross = -1; } else if (strcasecmp(pName, "FALL") == 0) { meas->m_fall = (int)floor(engVal1 + 0.5); meas->m_rise = -1; meas->m_cross = -1; } else if (strcasecmp(pName, "CROSS") == 0) { meas->m_cross = (int)floor(engVal1 + 0.5); meas->m_rise = -1; meas->m_fall = -1; } else if (strcasecmp(pName, "VAL") == 0) { meas->m_val = engVal1; } else if (strcasecmp(pName, "TD") == 0) { meas->m_td = engVal1; } else if (strcasecmp(pName, "FROM") == 0) { meas->m_from = engVal1; } else if (strcasecmp(pName, "TO") == 0) { meas->m_to = engVal1; } else if (strcasecmp(pName, "AT") == 0) { meas->m_at = engVal1; } else { sprintf(errbuf, "no such parameter as '%s'\n", pName); return 0; } pCnt ++; wl = wl->wl_next; } if (pCnt == 0) { sprintf(errbuf, "bad syntax of ??\n"); return 0; } // valid vector if (measure_valid_vector(meas->m_vec) == 0) { sprintf(errbuf, "no such vector as '%s'\n", meas->m_vec); return 0; } // valid vector2 if (meas->m_vec2 != NULL) if (measure_valid_vector(meas->m_vec2) == 0) { sprintf(errbuf, "no such vector as '%s'\n", meas->m_vec2); return 0; } /* dc: make m_from always less than m_to */ if (cieq("dc", meas->m_analysis)) if (meas->m_to < meas->m_from) { double tmp_val = meas->m_to; meas->m_to = meas->m_from; meas->m_from = tmp_val; } return 1; } /* ----------------------------------------------------------------- * Function: Given a wordlist and measurement structure, parse a * FIND measurement statement. Most of the work is done by calling * measure_parse_stdParams. * ----------------------------------------------------------------- */ static int measure_parse_find( MEASUREPTR meas, /* in : measurement structure */ wordlist *wl, /* in : word list to parse */ wordlist *wlBreak, /* out: where we stopped parsing */ char *errbuf /* in/out: buffer where we write error messages */ ) { int pCnt; char *p, *pName, *pVal; double *engVal, engVal1; meas->m_vec = NULL; meas->m_vec2 = NULL; meas->m_val = 1e99; meas->m_cross = -1; meas->m_fall = -1; meas->m_rise = -1; meas->m_td = 0; meas->m_from = 0.0e0; meas->m_to = 0.0e0; meas->m_at = 1e99; /* for DC, set new outer limits for 'from' and 'to' because 0.0e0 may be valid inside of range */ if (cieq("dc", meas->m_analysis)) { meas->m_to = 1.0e99; meas->m_from = -1.0e99; } pCnt = 0; while (wl != wlBreak) { p = wl->wl_word; if (pCnt == 0) { meas->m_vec = cp_unquote(wl->wl_word); /* correct for vectors like vm, vp etc. */ if (cieq("ac", meas->m_analysis) || cieq("sp", meas->m_analysis)) correct_vec(meas); } else if (pCnt == 1) { pName = strtok(p, "="); pVal = strtok(NULL, "="); if (pVal == NULL) { sprintf(errbuf, "bad syntax of WHEN\n"); return 0; } if (strcasecmp(pName, "AT") == 0) { if ((engVal = ft_numparse(&pVal, FALSE)) == NULL) { sprintf(errbuf, "bad syntax of WHEN\n"); return 0; } engVal1 = *engVal; meas->m_at = engVal1; } else { sprintf(errbuf, "bad syntax of WHEN\n"); return 0; } } else { if (measure_parse_stdParams(meas, wl, NULL, errbuf) == 0) return 0; } wl = wl->wl_next; pCnt ++; } return 1; } /* ----------------------------------------------------------------- * Function: Given a wordlist and measurement structure, parse a * WHEN measurement statement. Most of the work is done by calling * measure_parse_stdParams. * ----------------------------------------------------------------- */ static int measure_parse_when( MEASUREPTR meas, /* in : measurement structure */ wordlist *wl, /* in : word list to parse */ char *errBuf /* in/out: buffer where we write error messages */ ) { int pCnt, err = 0; char *p, *pVar1, *pVar2; meas->m_vec = NULL; meas->m_vec2 = NULL; meas->m_val = 1e99; meas->m_cross = -1; meas->m_fall = -1; meas->m_rise = -1; meas->m_td = 0; meas->m_from = 0.0e0; meas->m_to = 0.0e0; meas->m_at = 1e99; /* for DC, set new outer limits for 'from' and 'to' because 0.0e0 may be valid inside of range */ if (cieq("dc", meas->m_analysis)) { meas->m_to = 1.0e99; meas->m_from = -1.0e99; } pCnt = 0; while (wl) { p = wl->wl_word; if (pCnt == 0) { pVar1 = strtok(p, "="); pVar2 = strtok(NULL, "="); if (pVar2 == NULL) { sprintf(errBuf, "bad syntax\n"); return 0; } meas->m_vec = copy(pVar1); /* correct for vectors like vm, vp etc. */ if (cieq("ac", meas->m_analysis) || cieq("sp", meas->m_analysis)) correct_vec(meas); if (measure_valid_vector(pVar2) == 1) { meas->m_vec2 = copy(pVar2); /* correct for vectors like vm, vp etc. */ if (cieq("ac", meas->m_analysis) || cieq("sp", meas->m_analysis)) correct_vec(meas); } else { meas->m_val = INPevaluate(&pVar2, &err, 1); } } else { if (measure_parse_stdParams(meas, wl, NULL, errBuf) == 0) return 0; break; } wl = wl->wl_next; pCnt ++; } return 1; } /* ----------------------------------------------------------------- * Function: Given a wordlist and measurement structure, parse a * TRIGGER or TARGET clause of a measurement statement. Most of the * work is done by calling measure_parse_stdParams. * ----------------------------------------------------------------- */ static int measure_parse_trigtarg( MEASUREPTR meas, /* in : measurement structure */ wordlist *words, /* in : word list to parse */ wordlist *wlTarg, /* out : where we stopped parsing target clause */ char *trigTarg, /* in : type of clause */ char *errbuf /* in/out: buffer where we write error messages */ ) { int pcnt; char *p; meas->m_vec = NULL; meas->m_vec2 = NULL; meas->m_cross = -1; meas->m_fall = -1; meas->m_rise = -1; meas->m_td = 0; meas->m_from = 0.0e0; meas->m_to = 0.0e0; meas->m_at = 1e99; /* for DC, set new outer limits for 'from' and 'to' because 0.0e0 may be valid inside of range */ if (cieq("dc", meas->m_analysis)) { meas->m_to = 1.0e99; meas->m_from = -1.0e99; } pcnt = 0; while (words != wlTarg) { p = words->wl_word; if ((pcnt == 0) && !ciprefix("at", p)) { meas->m_vec = cp_unquote(words->wl_word); /* correct for vectors like vm, vp etc. */ if (cieq("ac", meas->m_analysis) || cieq("sp", meas->m_analysis)) correct_vec(meas); } else if (ciprefix("at", p)) { if (measure_parse_stdParams(meas, words, wlTarg, errbuf) == 0) return 0; } else { if (measure_parse_stdParams(meas, words, wlTarg, errbuf) == 0) return 0; break; } words = words->wl_next; pcnt ++; } if (pcnt == 0) { sprintf(errbuf, "bad syntax of '%s'\n", trigTarg); return 0; } // valid vector if (measure_valid_vector(meas->m_vec) == 0) { sprintf(errbuf, "no such vector as '%s'\n", meas->m_vec); return 0; } return 1; } /* ----------------------------------------------------------------- * Function: Given a wordlist, extract the measurement statement, * process it, and return a result. If out_line is furnished, we * format and copy the result it this string buffer. The autocheck * variable allows us to check for "autostop". This function is * called from measure.c. We use the functions in this file because * the parsing is much more complete and thorough. * ----------------------------------------------------------------- */ int get_measure2( wordlist *wl, /* in: a word list for us to process */ double *result, /* out : the result of the measurement */ char *out_line, /* out: formatted result - may be NULL */ bool autocheck /* in: TRUE if checking for "autostop"; FALSE otherwise */ ) { wordlist *words, *wlTarg, *wlWhen; char errbuf[100]; char *mAnalysis = NULL; // analysis type char *mName = NULL; // name given to the measured output char *mFunction = ""; int precision; // measurement precision ANALYSIS_TYPE_T mFunctionType = AT_UNKNOWN; int wl_cnt; char *p; int ret_val = MEASUREMENT_FAILURE; *result = 0.0e0; /* default result */ if (!wl) { printf("usage: measure .....\n"); return MEASUREMENT_FAILURE; } if (!plot_cur || !plot_cur->pl_dvecs || !plot_cur->pl_scale) { fprintf(cp_err, "Error: no vectors available\n"); return MEASUREMENT_FAILURE; } if (!ciprefix("tran", plot_cur->pl_typename) && !ciprefix("ac", plot_cur->pl_typename) && !ciprefix("dc", plot_cur->pl_typename) && !ciprefix("sp", plot_cur->pl_typename)) { fprintf(cp_err, "Error: measure limited to tran, dc, sp, or ac analysis\n"); return MEASUREMENT_FAILURE; } words = wl; wlTarg = NULL; wlWhen = NULL; if (!words) { fprintf(cp_err, "Error: no assignment found.\n"); return MEASUREMENT_FAILURE; } precision = measure_get_precision(); wl_cnt = 0; while (words) { switch (wl_cnt) { case 0: mAnalysis = cp_unquote(words->wl_word); break; case 1: mName = cp_unquote(words->wl_word); break; case 2: { mFunctionType = measure_function_type(words->wl_word); if (mFunctionType == AT_UNKNOWN) { if (!autocheck) { printf("\tmeasure '%s' failed\n", mName); printf("Error: measure %s :\n", mName); printf("\tno such function as '%s'\n", words->wl_word); } return MEASUREMENT_FAILURE; } break; } default: { p = words->wl_word; if (strcasecmp(p, "targ") == 0) wlTarg = words; if (strcasecmp(p, "when") == 0) wlWhen = words; break; } } wl_cnt ++; words = words->wl_next; } if (wl_cnt < 3) { printf("\tmeasure '%s' failed\n", mName); printf("Error: measure %s :\n", mName); printf("\tinvalid num params\n"); return MEASUREMENT_FAILURE; } //------------------------ words = wl; if (words) words = words->wl_next; // skip if (words) words = words->wl_next; // skip results name if (words) words = words->wl_next; // Function // switch here switch (mFunctionType) { case AT_DELAY: case AT_TRIG: { // trig parameters MEASUREPTR measTrig, measTarg; measTrig = TMALLOC(struct measure, 1); measTarg = TMALLOC(struct measure, 1); measTrig->m_analysis = measTarg->m_analysis = mAnalysis; if (measure_parse_trigtarg(measTrig, words , wlTarg, "trig", errbuf) == 0) { measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret1; } if ((measTrig->m_rise == -1) && (measTrig->m_fall == -1) && (measTrig->m_cross == -1) && (measTrig->m_at == 1e99)) { sprintf(errbuf, "at, rise, fall or cross must be given\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret1; } while (words != wlTarg) words = words->wl_next; // hack if (words) words = words->wl_next; // skip targ if (measure_parse_trigtarg(measTarg, words , NULL, "targ", errbuf) == 0) { measure_errMessage(mName, mFunction, "TARG", errbuf, autocheck); goto err_ret1; } if ((measTarg->m_rise == -1) && (measTarg->m_fall == -1) && (measTarg->m_cross == -1)&& (measTarg->m_at == 1e99)) { sprintf(errbuf, "at, rise, fall or cross must be given\n"); measure_errMessage(mName, mFunction, "TARG", errbuf, autocheck); goto err_ret1; } // measure trig if (measTrig->m_at == 1e99) com_measure_when(measTrig); else measTrig->m_measured = measTrig->m_at; if (isnan(measTrig->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret1; } // measure targ com_measure_when(measTarg); if (isnan(measTarg->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TARG", errbuf, autocheck); goto err_ret1; } // print results if (out_line) sprintf(out_line, "%-20s= %e targ= %e trig= %e\n", mName, (measTarg->m_measured - measTrig->m_measured), measTarg->m_measured, measTrig->m_measured); else printf("%-20s= %e targ= %e trig= %e\n", mName, (measTarg->m_measured - measTrig->m_measured), measTarg->m_measured, measTrig->m_measured); *result = (measTarg->m_measured - measTrig->m_measured); ret_val = MEASUREMENT_OK; err_ret1: tfree(mAnalysis); tfree(mName); tfree(measTarg->m_vec); tfree(measTarg); tfree(measTrig->m_vec); tfree(measTrig); return ret_val; } case AT_FIND: { MEASUREPTR meas, measFind; meas = TMALLOC(struct measure, 1); measFind = TMALLOC(struct measure, 1); meas->m_analysis = measFind->m_analysis = mAnalysis; if (measure_parse_find(meas, words, wlWhen, errbuf) == 0) { measure_errMessage(mName, mFunction, "FIND", errbuf, autocheck); goto err_ret2; } if (meas->m_at == 1e99) { // find .. when statment while (words != wlWhen) words = words->wl_next; // hack if (words) words = words->wl_next; // skip targ if (measure_parse_when(measFind, words, errbuf) == 0) { measure_errMessage(mName, mFunction, "WHEN", errbuf, autocheck); goto err_ret2; } com_measure_when(measFind); if (isnan(measFind->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "AT", errbuf, autocheck); goto err_ret2; } measure_at(meas, measFind->m_measured); meas->m_at = measFind->m_measured; } else { measure_at(meas, meas->m_at); } if (isnan(meas->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "AT", errbuf, autocheck); goto err_ret2; } // print results if (out_line) sprintf(out_line, "%-20s= %e\n", mName, meas->m_measured); else printf("%-20s= %e\n", mName, meas->m_measured); *result = meas->m_measured; ret_val = MEASUREMENT_OK; err_ret2: tfree(mAnalysis); tfree(mName); tfree(meas->m_vec); tfree(meas); tfree(measFind->m_vec); tfree(measFind); return ret_val; } case AT_WHEN: { MEASUREPTR meas; meas = TMALLOC(struct measure, 1); meas->m_analysis = mAnalysis; if (measure_parse_when(meas, words, errbuf) == 0) { measure_errMessage(mName, mFunction, "WHEN", errbuf, autocheck); goto err_ret3; } com_measure_when(meas); if (isnan(meas->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "WHEN", errbuf, autocheck); goto err_ret3; } // print results if (out_line) sprintf(out_line, "%-20s= %.*e\n", mName, precision, meas->m_measured); else printf("%-20s= %e\n", mName, meas->m_measured); *result = meas->m_measured; ret_val = MEASUREMENT_OK; err_ret3: tfree(mAnalysis); tfree(mName); tfree(meas->m_vec); tfree(meas); return ret_val; } case AT_RMS: case AT_INTEG: { // trig parameters MEASUREPTR meas; meas = TMALLOC(struct measure, 1); meas->m_analysis = mAnalysis; if (measure_parse_trigtarg(meas, words , NULL, "trig", errbuf) == 0) { measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret4; } // measure measure_rms_integral(meas, mFunctionType); if (isnan(meas->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); // ?? goto err_ret4; } if (meas->m_at == 1e99) meas->m_at = 0.0e0; // print results if (out_line) sprintf(out_line, "%-20s= %.*e from= %.*e to= %.*e\n", mName, precision, meas->m_measured, precision, meas->m_from, precision, meas->m_to); else printf("%-20s= %.*e from= %.*e to= %.*e\n", mName, precision, meas->m_measured, precision, meas->m_from, precision, meas->m_to); *result = meas->m_measured; ret_val = MEASUREMENT_OK; err_ret4: tfree(mAnalysis); tfree(mName); tfree(meas->m_vec); tfree(meas); return ret_val; } case AT_AVG: { // trig parameters MEASUREPTR meas; meas = TMALLOC(struct measure, 1); meas->m_analysis = mAnalysis; if (measure_parse_trigtarg(meas, words , NULL, "trig", errbuf) == 0) { measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret5; } // measure measure_minMaxAvg(meas, mFunctionType); if (isnan(meas->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); // ?? goto err_ret5; } if (meas->m_at == 1e99) meas->m_at = meas->m_from; // print results if (out_line) sprintf(out_line, "%-20s= %e from= %e to= %e\n", mName, meas->m_measured, meas->m_at, meas->m_measured_at); else printf("%-20s= %e from= %e to= %e\n", mName, meas->m_measured, meas->m_at, meas->m_measured_at); *result = meas->m_measured; ret_val = MEASUREMENT_OK; err_ret5: tfree(mAnalysis); tfree(mName); tfree(meas->m_vec); tfree(meas); return ret_val; } case AT_MIN: case AT_MAX: case AT_MIN_AT: case AT_MAX_AT: { // trig parameters MEASUREPTR measTrig; measTrig = TMALLOC(struct measure, 1); measTrig->m_analysis = mAnalysis; if (measure_parse_trigtarg(measTrig, words , NULL, "trig", errbuf) == 0) { measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret6; } // measure if ((mFunctionType == AT_MIN) || (mFunctionType == AT_MIN_AT)) measure_minMaxAvg(measTrig, AT_MIN); else measure_minMaxAvg(measTrig, AT_MAX); if (isnan(measTrig->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); // ?? goto err_ret6; } if ((mFunctionType == AT_MIN) || (mFunctionType == AT_MAX)) { // print results if (out_line) sprintf(out_line, "%-20s= %e at= %e\n", mName, measTrig->m_measured, measTrig->m_measured_at); else printf("%-20s= %e at= %e\n", mName, measTrig->m_measured, measTrig->m_measured_at); *result = measTrig->m_measured; } else { // print results if (out_line) sprintf(out_line, "%-20s= %e with= %e\n", mName, measTrig->m_measured_at, measTrig->m_measured); else printf("%-20s= %e with= %e\n", mName, measTrig->m_measured_at, measTrig->m_measured); *result = measTrig->m_measured_at; } ret_val = MEASUREMENT_OK; err_ret6: tfree(mAnalysis); tfree(mName); tfree(measTrig->m_vec); tfree(measTrig); return ret_val; } case AT_PP: { double minValue, maxValue; MEASUREPTR measTrig; measTrig = TMALLOC(struct measure, 1); measTrig->m_analysis = mAnalysis; if (measure_parse_trigtarg(measTrig, words , NULL, "trig", errbuf) == 0) { measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); goto err_ret7; } // measure min measure_minMaxAvg(measTrig, AT_MIN); if (isnan(measTrig->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); // ?? goto err_ret7; } minValue = measTrig->m_measured; // measure max measure_minMaxAvg(measTrig, AT_MAX); if (isnan(measTrig->m_measured)) { sprintf(errbuf, "out of interval\n"); measure_errMessage(mName, mFunction, "TRIG", errbuf, autocheck); // ?? goto err_ret7; } maxValue = measTrig->m_measured; // print results if (out_line) sprintf(out_line, "%-20s= %e from= %e to= %e\n", mName, (maxValue - minValue), measTrig->m_from, measTrig->m_to); else printf("%-20s= %e from= %e to= %e\n", mName, (maxValue - minValue), measTrig->m_from, measTrig->m_to); *result = (maxValue - minValue); ret_val = MEASUREMENT_OK; err_ret7: tfree(mAnalysis); tfree(mName); tfree(measTrig->m_vec); tfree(measTrig); return ret_val; } case AT_DERIV: case AT_ERR: case AT_ERR1: case AT_ERR2: case AT_ERR3: { printf("\tmeasure '%s' failed\n", mName); printf("Error: measure %s :\n", mName); printf("\tfunction '%s' currently not supported\n", mFunction); break; } default: { fprintf(stderr, "ERROR: enumeration value `AT_UNKNOWN' not handled in get_measure2\nAborting...\n"); controlled_exit(EXIT_FAILURE); } } return MEASUREMENT_FAILURE; } ngspice-26/src/frontend/com_dump.c0000644000265600020320000000070612264261473016611 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/inpdefs.h" #include "circuits.h" #include "com_dump.h" #include "ngspice/cpextern.h" #include "ngspice/fteext.h" #include "spiceif.h" void com_dump(wordlist *wl) { NG_IGNORE(wl); if (!ft_curckt || !ft_curckt->ci_ckt) { fprintf(cp_err, "Error: no circuit loaded.\n"); return; } if_dump(ft_curckt->ci_ckt, cp_out); } ngspice-26/src/frontend/com_alias.h0000644000265600020320000000031612264261473016737 0ustar andreasadmin/************* * Header file for com_alias.c * 1999 E. Rouat ************/ #ifndef ngspice_COM_ALIAS_H #define ngspice_COM_ALIAS_H void com_alias(wordlist *wl); void com_unalias(wordlist *wl); #endif ngspice-26/src/frontend/com_gnuplot.h0000644000265600020320000000021112264261473017330 0ustar andreasadmin#ifndef ngspice_COM_GNUPLOT_H #define ngspice_COM_GNUPLOT_H void com_gnuplot(wordlist *wl); void com_write_simple(wordlist *wl); #endif ngspice-26/src/frontend/runcoms.h0000644000265600020320000000116112264261473016475 0ustar andreasadmin/************* * Header file for runcoms.c * 1999 E. Rouat ************/ #ifndef ngspice_RUNCOMS_H #define ngspice_RUNCOMS_H void com_scirc(wordlist *wl); void com_pz(wordlist *wl); void com_op(wordlist *wl); void com_dc(wordlist *wl); void com_ac(wordlist *wl); void com_tf(wordlist *wl); void com_tran(wordlist *wl); /* SP: Stady State Analysis */ void com_pss(wordlist *wl); /* SP */ void com_sens(wordlist *wl); void com_disto(wordlist *wl); void com_noise(wordlist *wl); void com_run(wordlist *wl); extern FILE *rawfileFp; extern bool rawfileBinary; extern char *last_used_rawfile; extern bool resumption; #endif ngspice-26/src/frontend/com_dump.h0000644000265600020320000000013412264261473016611 0ustar andreasadmin#ifndef ngspice_COM_DUMP_H #define ngspice_COM_DUMP_H void com_dump(wordlist *wl); #endif ngspice-26/src/frontend/aspice.h0000644000265600020320000000034412264261473016255 0ustar andreasadmin/************* * Header file for aspice.c * 1999 E. Rouat ************/ #ifndef ngspice_ASPICE_H #define ngspice_ASPICE_H void com_aspice(wordlist *wl); void com_jobs(wordlist *wl); void com_rspice(wordlist *wl); #endif ngspice-26/src/frontend/dotcards.c0000644000265600020320000004421412264261473016613 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * Spice-2 compatibility stuff for .plot, .print, .four, and .width. */ #include "ngspice/ngspice.h" #include #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "ngspice/sim.h" #include "circuits.h" #include "dotcards.h" #include "variable.h" #include "fourier.h" #include "breakp2.h" #include "com_measure2.h" #include "com_commands.h" #include "com_asciiplot.h" #include "resource.h" #include "postcoms.h" /* Extract all the .save lines */ static void fixdotplot(wordlist *wl); static void fixdotprint(wordlist *wl); static char *fixem(char *string); void ft_savemeasure(void); static struct plot * setcplot(char *name) { struct plot *pl; for (pl = plot_list; pl; pl = pl->pl_next) if (ciprefix(name, pl->pl_typename)) return pl; return NULL; } /* All lines with .width, .plot, .print, .save, .op, .meas, .tf have been assembled into a wordlist (wl_first) in inp.c:inp_spsource(), and then stored to ci_commands in inp.c:inp_dodeck(). The .save lines are selected, com_save will put the commands into dbs. */ void ft_dotsaves(void) { wordlist *iline, *wl = NULL; char *s, *fr; if (!ft_curckt) /* Shouldn't happen. */ return; for (iline = ft_curckt->ci_commands; iline; iline = iline->wl_next) if (ciprefix(".save", iline->wl_word)) { s = iline->wl_word; /* skip .save */ fr = gettok(&s); tfree(fr); wl = wl_append(wl, gettoks(s)); } com_save(wl); wl_free(wl); } /* Go through the dot lines given and make up a big "save" command with * all the node names mentioned. Note that if a node is requested for * one analysis, it is saved for all of them. */ static char *plot_opts[ ] = { "linear", "xlog", "ylog", "loglog" }; int ft_savedotargs(void) { wordlist *w, *wl = NULL, *iline, **prev_wl, *w_next; char *name; char *s; int some = 0; static wordlist all = { "all", NULL, NULL }; int isaplot; int i; int status; if (!ft_curckt) /* Shouldn't happen. */ return 0; for (iline = ft_curckt->ci_commands; iline; iline = iline->wl_next) { s = iline->wl_word; if (ciprefix(".plot", s)) isaplot = 1; else isaplot = 0; if (isaplot || ciprefix(".print", s)) { (void) gettok(&s); name = gettok(&s); if ((w = gettoks(s)) == NULL) { fprintf(cp_err, "Warning: no nodes given: %s\n", iline->wl_word); } else { if (isaplot) { prev_wl = &w; for (wl = w; wl; wl = w_next) { w_next = wl->wl_next; for (i = 0; (size_t) i < NUMELEMS(plot_opts); i++) { if (!strcmp(wl->wl_word, plot_opts[i])) { /* skip it */ *prev_wl = w_next; tfree(wl); break; } } if (i == NUMELEMS(plot_opts)) prev_wl = &wl->wl_next; } } some = 1; com_save2(w, name); } } else if (ciprefix(".four", s)) { (void) gettok(&s); (void) gettok(&s); if ((w = gettoks(s)) == NULL) { fprintf(cp_err, "Warning: no nodes given: %s\n", iline->wl_word); } else { some = 1; com_save2(w, "TRAN"); /* A hack */ } } else if (ciprefix(".meas", s)) { status = measure_extract_variables(s); if (!(status)) { some = 1; } } else if (ciprefix(".op", s)) { some = 1; com_save2(&all, "OP"); } else if (ciprefix(".tf", s)) { some = 1; com_save2(&all, "TF"); } } return some; } void ft_savemeasure(void) { char *s; wordlist *iline; if (!ft_curckt) /* Shouldn't happen. */ return; for (iline = ft_curckt->ci_commands; iline; iline = iline->wl_next) { s = iline->wl_word; if (ciprefix(".measure", s)) { (void) measure_extract_variables(s); } } } /* Execute the .whatever lines found in the deck, after we are done running. * We'll be cheap and use cp_lexer to get the words... This should make us * spice-2 compatible. If terse is TRUE then there was a rawfile, so don't * print lots of junk. */ int ft_cktcoms(bool terse) { wordlist *coms, *command, all; char *plottype, *s; struct dvec *v; static wordlist twl = { "col", NULL, NULL }; struct plot *pl; int i, found; char numbuf[BSIZE_SP]; /* For printnum*/ all.wl_next = NULL; all.wl_word = "all"; if (!ft_curckt) return 1; plot_cur = setcplot("op"); if (!ft_curckt->ci_commands && !plot_cur) goto nocmds; coms = ft_curckt->ci_commands; cp_interactive = FALSE; /* Listing */ if (ft_listprint) { if (terse) fprintf(cp_err, ".options: no listing, rawfile was generated.\n"); else inp_list(cp_out, ft_curckt->ci_deck, ft_curckt->ci_options, LS_DECK); } /* If there was a .op line, then we have to do the .op output. */ plot_cur = setcplot("op"); if (plot_cur != NULL) { assert(plot_cur->pl_dvecs != NULL); if (plot_cur->pl_dvecs->v_realdata != NULL) { if (terse) { fprintf(cp_out, "OP information in rawfile.\n"); } else { fprintf(cp_out, "\t%-30s%15s\n", "Node", "Voltage"); fprintf(cp_out, "\t%-30s%15s\n", "----", "-------"); fprintf(cp_out, "\t----\t-------\n"); for (v = plot_cur->pl_dvecs; v; v = v->v_next) { if (!isreal(v)) { fprintf(cp_err, "Internal error: op vector %s not real\n", v->v_name); continue; } if ((v->v_type == SV_VOLTAGE) && (*(v->v_name) != '@')) { printnum(numbuf, v->v_realdata[0]); fprintf(cp_out, "\t%-30s%15s\n", v->v_name, numbuf); } } fprintf(cp_out, "\n\tSource\tCurrent\n"); fprintf(cp_out, "\t------\t-------\n\n"); for (v = plot_cur->pl_dvecs; v; v = v->v_next) if (v->v_type == SV_CURRENT) { printnum(numbuf, v->v_realdata[0]); fprintf(cp_out, "\t%-30s%15s\n", v->v_name, numbuf); } fprintf(cp_out, "\n"); if (!ft_nomod) com_showmod(&all); com_show(&all); } } } for (pl = plot_list; pl; pl = pl->pl_next) if (ciprefix("tf", pl->pl_typename)) { if (terse) { fprintf(cp_out, "TF information in rawfile.\n"); break; } plot_cur = pl; fprintf(cp_out, "Transfer function information:\n"); com_print(&all); fprintf(cp_out, "\n"); } /* Now all the '.' lines */ while (coms) { command = cp_lexer(coms->wl_word); if (!command) goto bad; if (eq(command->wl_word, ".width")) { do command = command->wl_next; while (command && !ciprefix("out", command->wl_word)); if (command) { s = strchr(command->wl_word, '='); if (!s || !s[1]) { fprintf(cp_err, "Error: bad line %s\n", coms->wl_word); coms = coms->wl_next; continue; } i = atoi(++s); cp_vset("width", CP_NUM, &i); } } else if (eq(command->wl_word, ".print")) { if (terse) { fprintf(cp_out, ".print line ignored since rawfile was produced.\n"); } else { command = command->wl_next; if (!command) { fprintf(cp_err, "Error: bad line %s\n", coms->wl_word); coms = coms->wl_next; continue; } plottype = command->wl_word; command = command->wl_next; fixdotprint(command); twl.wl_next = command; found = 0; for (pl = plot_list; pl; pl = pl->pl_next) if (ciprefix(plottype, pl->pl_typename)) { plot_cur = pl; com_print(&twl); fprintf(cp_out, "\n"); found = 1; } if (!found) fprintf(cp_err, "Error: .print: no %s analysis found.\n", plottype); } } else if (eq(command->wl_word, ".plot")) { if (terse) { fprintf(cp_out, ".plot line ignored since rawfile was produced.\n"); } else { command = command->wl_next; if (!command) { fprintf(cp_err, "Error: bad line %s\n", coms->wl_word); coms = coms->wl_next; continue; } plottype = command->wl_word; command = command->wl_next; fixdotplot(command); found = 0; for (pl = plot_list; pl; pl = pl->pl_next) if (ciprefix(plottype, pl->pl_typename)) { plot_cur = pl; com_asciiplot(command); fprintf(cp_out, "\n"); found = 1; } if (!found) fprintf(cp_err, "Error: .plot: no %s analysis found.\n", plottype); } } else if (ciprefix(".four", command->wl_word)) { if (terse) { fprintf(cp_out, ".fourier line ignored since rawfile was produced.\n"); } else { int err; plot_cur = setcplot("tran"); err = fourier(command->wl_next, plot_cur); if (!err) fprintf(cp_out, "\n\n"); else fprintf(cp_err, "No transient data available for " "fourier analysis"); } } else if (!eq(command->wl_word, ".save") && !eq(command->wl_word, ".op") && // !eq(command->wl_word, ".measure") && !ciprefix(".meas", command->wl_word) && !eq(command->wl_word, ".tf")) { goto bad; } coms = coms->wl_next; } nocmds: /* Now the node table if (ft_nodesprint) ; */ /* The options */ if (ft_optsprint) { fprintf(cp_out, "Options:\n\n"); cp_vprint(); (void) putc('\n', cp_out); } /* And finally the accounting info. */ if (ft_acctprint) { static wordlist ww = { "everything", NULL, NULL }; com_rusage(&ww); } else if ((!ft_noacctprint) && (!ft_acctprint)) { com_rusage(NULL); } /* absolutely no accounting if noacct is given */ putc('\n', cp_out); return 0; bad: fprintf(cp_err, "Internal Error: ft_cktcoms: bad commands\n"); return 1; } /* These routines make sure that the arguments to .plot and .print in * spice2 decks are acceptable to spice3. The things we look for are: * trailing (a,b) in .plot -> xlimit a b * vm(x) -> mag(v(x)) * vp(x) -> ph(v(x)) * v(x,0) -> v(x) * v(0,x) -> -v(x) */ static void fixdotplot(wordlist *wl) { char *s; char numbuf[128]; /* Printnum Fix */ double *d, d1, d2; while (wl) { wl->wl_word = fixem(wl->wl_word); /* Is this a trailing (a,b) ? Note that we require it to be * one word. */ if (!wl->wl_next && (*wl->wl_word == '(')) /*)*/ { s = wl->wl_word + 1; d = ft_numparse(&s, FALSE); if (*s != ',') { fprintf(cp_err, "Error: bad limits \"%s\"\n", wl->wl_word); return; } d1 = *d; s++; d = ft_numparse(&s, FALSE); if ((*s != /*(*/ ')') || s[1]) { fprintf(cp_err, "Error: bad limits \"%s\"\n", wl->wl_word); return; } d2 = *d; tfree(wl->wl_word); wl->wl_word = copy("xlimit"); printnum(numbuf, d1); wl_append_word(NULL, &wl, copy(numbuf)); printnum(numbuf, d2); wl_append_word(NULL, &wl, copy(numbuf)); } wl = wl->wl_next; } } static void fixdotprint(wordlist *wl) { while (wl) { wl->wl_word = fixem(wl->wl_word); wl = wl->wl_next; } } static char * fixem(char *string) { char buf[BSIZE_SP], *s, *t; char *ss = string; /* Get rid of ss ? */ if (ciprefix("v(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "v(%s)", string + 2); else if (eq(string + 2, "0")) (void) sprintf(buf, "-v(%s)", s); else (void) sprintf(buf, "v(%s)-v(%s)", string + 2, s); } else if (ciprefix("vm(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "mag(v(%s))", string + 3); else if (eq(string + 3, "0")) (void) sprintf(buf, "mag(-v(%s))", s); else (void) sprintf(buf, "mag(v(%s)-v(%s))", string + 3, s); } else if (ciprefix("vp(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "ph(v(%s))", string + 3); else if (eq(string + 3, "0")) (void) sprintf(buf, "ph(-v(%s))", s); else (void) sprintf(buf, "ph(v(%s)-v(%s))", string + 3, s); } else if (ciprefix("vi(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "imag(v(%s))", string + 3); else if (eq(string + 3, "0")) (void) sprintf(buf, "imag(-v(%s))", s); else (void) sprintf(buf, "imag(v(%s)-v(%s))", string + 3, s); } else if (ciprefix("vr(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "real(v(%s))", string + 3); else if (eq(string + 3, "0")) (void) sprintf(buf, "real(-v(%s))", s); else (void) sprintf(buf, "real(v(%s)-v(%s))", string + 3, s); } else if (ciprefix("vdb(", string) &&strchr(string, ',')) { for (s = string; *s && (*s != ','); s++) ; *s++ = '\0'; for (t = s; *t && (*t != ')'); t++) ; *t = '\0'; if (eq(s, "0")) (void) sprintf(buf, "db(v(%s))", string + 4); else if (eq(string + 4, "0")) (void) sprintf(buf, "db(-v(%s))", s); else (void) sprintf(buf, "db(v(%s)-v(%s))", string + 4, s); } else if (ciprefix("i(", string)) { for (s = string; *s && (*s != ')'); s++) ; *s = '\0'; string += 2; (void) sprintf(buf, "%s#branch", string); } else { return (string); } tfree(ss); string = copy(buf); return (string); } wordlist * gettoks(char *s) { char *t, *s0; char *l, *r, *c; /* left, right, center/comma */ wordlist *wl, *list, **prevp; list = NULL; prevp = &list; /* stripWhite.... uses copy() to return a malloc'ed s, so we have to free it, using s0 as its starting address */ if (strstr(s, "(")) s0 = s = stripWhiteSpacesInsideParens(s); else s0 = s = copy(s); while ((t = gettok(&s)) != NULL) { if (*t == '(') { /* gettok uses copy() to return a malloc'ed t, so we have to free it */ tfree(t); continue; } l = strrchr(t, '('/*)*/); if (!l) { wl = wl_cons(copy(t), NULL); *prevp = wl; prevp = &wl->wl_next; tfree(t); continue; } r = strchr(t, /*(*/')'); c = strchr(t, ','); if (!c) c = r; if (c) *c = 0; wl = wl_cons(NULL, NULL); *prevp = wl; prevp = &wl->wl_next; if (*(l - 1) == 'i' || *(l - 1) == 'I') { char buf[513]; sprintf(buf, "%s#branch", l + 1); wl->wl_word = copy(buf); c = r = NULL; } else { wl->wl_word = copy(l + 1); } if (c != r) { *r = 0; wl = wl_cons(copy(c + 1), NULL); *prevp = wl; prevp = &wl->wl_next; } tfree(t); } tfree(s0); return list; } ngspice-26/src/frontend/runcoms.c0000644000265600020320000002411412264261473016473 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * Circuit simulation commands. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/ftedev.h" #include "ngspice/ftedebug.h" #include "ngspice/dvec.h" #include "circuits.h" #include "completion.h" #include "runcoms.h" #include "variable.h" #include "spiceif.h" #include "runcoms2.h" #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - include ipc stuff */ #include "ngspice/ipctiein.h" /* gtri - end - 12/12/90 */ #endif static int dosim(char *what, wordlist *wl); extern struct INPmodel *modtab; extern struct dbcomm *dbs; /* Routines for the commands op, tran, ac, dc, listing, device, state, * resume, stop, trace, run, end. Op, tran, ac, and dc cause the action * to be performed immediately, and run causes whatever actions were * present in the deck to be carried out. End has the effect of stopping * any simulations in progress, as opposed to ending the input deck as * the .end line does. */ FILE *rawfileFp; bool rawfileBinary; #define RAWBUF_SIZE 32768 char rawfileBuf[RAWBUF_SIZE]; /*To tell resume the rawfile name saj*/ char *last_used_rawfile = NULL; /*end saj */ /* command "setcirc" */ void com_scirc(wordlist *wl) { struct circ *p; int i, j = 0; char buf[BSIZE_SP]; if (ft_circuits == NULL) { fprintf(cp_err, "Error: there aren't any circuits loaded.\n"); return; } if (wl == NULL) { fprintf(cp_out, "\tType the number of the desired circuit:\n\n"); for (p = ft_circuits; p; p = p->ci_next) { if (ft_curckt == p) fprintf(cp_out, "Current"); fprintf(cp_out, "\t%d\t%s\n", ++j, p->ci_name); } fprintf(cp_out, "? "); (void) fflush(cp_out); (void) fgets(buf, BSIZE_SP, cp_in); clearerr(cp_in); if ((sscanf(buf, " %d ", &i) != 1) || (i < 0) || (i > j)) return; for (p = ft_circuits; --i > 0; p = p->ci_next) ; } else { for (p = ft_circuits; p; p = p->ci_next) j++; p = NULL; if ((sscanf(wl->wl_word, " %d ", &i) != 1) || (i < 0) || (i > j)) ; else for (p = ft_circuits; --i > 0; p = p->ci_next) ; /* for (p = ft_circuits; p; p = p->ci_next) * if (ciprefix(wl->wl_word, p->ci_name)) * break; */ if (p == NULL) { fprintf(cp_err, "Warning: no such circuit \"%s\"\n", wl->wl_word); return; } fprintf(cp_out, "\t%s\n", p->ci_name); } if (ft_curckt) { /* Actually this can't be FALSE */ ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, p->ci_devices); ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, p->ci_nodes); } ft_curckt = p; /* get the model table for the current circuit, store it in the global variable modtab */ modtab = ft_curckt->ci_modtab; /* get the database for save, iplot, stop */ dbs = ft_curckt->ci_dbs; } void com_pz(wordlist *wl) { dosim("pz", wl); } void com_op(wordlist *wl) { dosim("op", wl); } void com_dc(wordlist *wl) { dosim("dc", wl); } void com_ac(wordlist *wl) { dosim("ac", wl); } void com_tf(wordlist *wl) { dosim("tf", wl); } void com_tran(wordlist *wl) { dosim("tran", wl); } void com_sens(wordlist *wl) { dosim("sens", wl); } void com_disto(wordlist *wl) { dosim("disto", wl); } void com_noise(wordlist *wl) { dosim("noise", wl); } #ifdef WITH_PSS /* SP: Steady State Analysis */ void com_pss(wordlist *wl) { dosim("pss", wl); } /* SP */ #endif static int dosim( char *what, /* in: command (pz,op,dc,ac,tf,tran,sens,disto,noise,run) */ wordlist *wl /* in: command option */ /* global variables in: ft_curckt, ft_circuits, out: ft_setflag, ft_intrpt, rawfileFp, rawfileBinary, last_used_rawfile */ ) { wordlist *ww = NULL; bool dofile = FALSE; char buf[BSIZE_SP]; struct circ *ct; int err = 0; /* set file type to binary or to what is given by environmental variable SPICE_ASCIIRAWFILE in ivars.c */ bool ascii = AsciiRawFile; if (eq(what, "run") && wl) dofile = TRUE; /* add "what" to beginning of wordlist wl, except "what" equals "run" and a rawfile name is given (in wl) */ if (!dofile) { ww = wl_cons(copy(what), wl); } /* reset output file type according to variable given in spinit */ if (cp_getvar("filetype", CP_STRING, buf)) { if (eq(buf, "binary")) ascii = FALSE; else if (eq(buf, "ascii")) ascii = TRUE; else { fprintf(cp_err, "Warning: strange file type \"%s\" (using \"ascii\")\n", buf); ascii = TRUE; } } if (!ft_curckt) { fprintf(cp_err, "Error: there aren't any circuits loaded.\n"); return 1; } else if (ft_curckt->ci_ckt == NULL) { /* Set noparse? */ fprintf(cp_err, "Error: circuit not parsed.\n"); return 1; } for (ct = ft_circuits; ct; ct = ct->ci_next) if (ct->ci_inprogress && (ct != ft_curckt)) { fprintf(cp_err, "Warning: losing old state for circuit '%s'\n", ct->ci_name); ct->ci_inprogress = FALSE; } /* "resume" will never occur in ngspice */ if (ft_curckt->ci_inprogress && eq(what, "resume")) { ft_setflag = TRUE; /* don't allow abort upon interrupt during run */ ft_intrpt = FALSE; fprintf(cp_err, "Warning: resuming run in progress.\n"); com_resume(NULL); ft_setflag = FALSE; /* Now allow aborts again */ return 0; } /* From now on until the next prompt, an interrupt will just * set a flag and let spice finish up, then control will be * passed back to the user. */ ft_setflag = TRUE; /* Don't allow abort upon interrupt during run. */ ft_intrpt = FALSE; /* command "run" is given with rawfile name in wl */ if (dofile) { if (!*wl->wl_word) rawfileFp = stdout; #if defined(__MINGW32__) || defined(_MSC_VER) /* ask if binary or ASCII, open file with wb or w */ else if (ascii) { if ((rawfileFp = fopen(wl->wl_word, "w")) == NULL) { perror(wl->wl_word); ft_setflag = FALSE; return 1; } fprintf(cp_out, "ASCII raw file\n"); } else if (!ascii) { if ((rawfileFp = fopen(wl->wl_word, "wb")) == NULL) { perror(wl->wl_word); ft_setflag = FALSE; return 1; } fprintf(cp_out, "binary raw file\n"); } /*---------------------------------------------------------------------------*/ #else else if (!(rawfileFp = fopen(wl->wl_word, "w"))) { setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); perror(wl->wl_word); ft_setflag = FALSE; return 1; } #endif /* __MINGW32__ */ rawfileBinary = !ascii; } else { rawfileFp = NULL; } /*save rawfile name */ if (last_used_rawfile) tfree(last_used_rawfile); if (rawfileFp) last_used_rawfile = copy(wl->wl_word); else last_used_rawfile = NULL; ft_curckt->ci_inprogress = TRUE; /* "sens2" not used in ngspice */ if (eq(what, "sens2")) { if (if_sens_run(ft_curckt->ci_ckt, ww, ft_curckt->ci_symtab) == 1) { /* The circuit was interrupted somewhere. */ fprintf(cp_err, "%s simulation interrupted\n", what); #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - record error and return errchk */ g_ipc.run_error = IPC_TRUE; if (g_ipc.enabled) ipc_send_errchk(); /* gtri - end - 12/12/90 */ #endif } else { ft_curckt->ci_inprogress = FALSE; } /* Do a run of the circuit */ } else { err = if_run(ft_curckt->ci_ckt, what, ww, ft_curckt->ci_symtab); if (err == 1) { /* The circuit was interrupted somewhere. */ fprintf(cp_err, "%s simulation interrupted\n", what); #ifdef XSPICE /* record error and return errchk */ g_ipc.run_error = IPC_TRUE; if (g_ipc.enabled) ipc_send_errchk(); /* gtri - end - 12/12/90 */ #endif err = 0; } else if (err == 2) { fprintf(cp_err, "%s simulation(s) aborted\n", what); ft_curckt->ci_inprogress = FALSE; err = 1; } else { ft_curckt->ci_inprogress = FALSE; } } /* close the rawfile */ if (rawfileFp) { if (ftell(rawfileFp) == 0) { (void) fclose(rawfileFp); (void) unlink(wl->wl_word); } else { (void) fclose(rawfileFp); } } ft_curckt->ci_runonce = TRUE; ft_setflag = FALSE; /* va: garbage collection: unlink first word (inserted here) and tfree it */ if (!dofile) { tfree(ww->wl_word); if (wl) wl->wl_prev = NULL; tfree(ww); } /* execute the .measure statements */ if (!err && ft_curckt->ci_last_an && ft_curckt->ci_meas) do_measure(ft_curckt->ci_last_an, FALSE); return err; } /* Usage is run [filename] */ void com_run(wordlist *wl) { /* ft_getsaves(); */ dosim("run", wl); } int ft_dorun(char *file) { static wordlist wl = { NULL, NULL, NULL }; wl.wl_word = file; if (file) return dosim("run", &wl); else return dosim("run", NULL); } /* ARGSUSED */ /* until the else clause gets put back */ bool ft_getOutReq(FILE **fpp, struct plot **plotp, bool *binp, char *name, char *title) { NG_IGNORE(title); NG_IGNORE(name); NG_IGNORE(plotp); if (rawfileFp) { *fpp = rawfileFp; *binp = rawfileBinary; return (TRUE); } else { return (FALSE); } } ngspice-26/src/frontend/nutinp.c0000644000265600020320000002031612264261473016322 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher **********/ /* * For dealing with nutmeg input decks and command scripts */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "nutinp.h" #include "variable.h" #include "../misc/mktemp.h" #include "subckt.h" /* The routine to source a spice input deck. We read the deck in, take out * the front-end commands, and create a CKT structure. Also we filter out * the following lines: .save, .width, .four, .print, and .plot, to perform * after the run is over. */ void inp_nutsource(FILE *fp, bool comfile, char *filename) { struct line *deck, *dd, *ld; struct line *realdeck, *options = NULL; char *tt = NULL, name[BSIZE_SP], *s, *t; bool commands = FALSE; wordlist *wl = NULL, *end = NULL; wordlist *controls = NULL; FILE *lastin, *lastout, *lasterr; deck = inp_readall(fp, NULL, comfile, FALSE); /* still to check if . or filename instead of NULL */ if (!deck) return; realdeck = inp_deckcopy(deck); if (!comfile) { /* Save the title before INPgetTitle gets it. */ tt = copy(deck->li_line); if (!deck->li_next) fprintf(cp_err, "Warning: no lines in deck...\n"); } (void) fclose(fp); /* Now save the IO context and start a new control set... After * we are done with the source we'll put the old file descriptors * back. I guess we could use a FILE stack, but since this routine * is recursive anyway... */ lastin = cp_curin; lastout = cp_curout; lasterr = cp_curerr; cp_curin = cp_in; cp_curout = cp_out; cp_curerr = cp_err; cp_pushcontrol(); /* We should now go through the deck and execute front-end * commands and remove them. Front-end commands are enclosed by * the lines .control and .endc, unless comfile * is TRUE, in which case every line must be a front-end command. * There are too many problems with matching the first word on * the line. */ ld = deck; if (comfile) { /* This is easy. */ for (dd = deck; dd; dd = ld) { ld = dd->li_next; if ((dd->li_line[0] == '*') && (dd->li_line[1] != '#')) continue; if (!ciprefix(".control", dd->li_line) && !ciprefix(".endc", dd->li_line)) { if (dd->li_line[0] == '*') (void) cp_evloop(dd->li_line + 2); else (void) cp_evloop(dd->li_line); } tfree(dd->li_line); tfree(dd); } } else { for (dd = deck->li_next; dd; dd = ld->li_next) { if ((dd->li_line[0] == '*') && (dd->li_line[1] != '#')) { ld = dd; continue; } (void) strncpy(name, dd->li_line, BSIZE_SP); for (s = name; *s && isspace(*s); s++) ; for (t = s; *t && !isspace(*t); t++) ; *t = '\0'; if (ciprefix(".control", dd->li_line)) { ld->li_next = dd->li_next; tfree(dd->li_line); tfree(dd); if (commands) fprintf(cp_err, "Warning: redundant .control line\n"); else commands = TRUE; } else if (ciprefix(".endc", dd->li_line)) { ld->li_next = dd->li_next; tfree(dd->li_line); tfree(dd); if (commands) commands = FALSE; else fprintf(cp_err, "Warning: misplaced .endc line\n"); } else if (commands || prefix("*#", dd->li_line)) { controls = wl_cons(NULL, controls); wl = controls; if (prefix("*#", dd->li_line)) wl->wl_word = copy(dd->li_line + 2); else wl->wl_word = dd->li_line; ld->li_next = dd->li_next; tfree(dd); } else if (!*dd->li_line) { /* So blank lines in com files don't get * considered as circuits. */ ld->li_next = dd->li_next; tfree(dd->li_line); tfree(dd); } else { inp_casefix(s); inp_casefix(dd->li_line); if (eq(s, ".width") || ciprefix(".four", s) || eq(s, ".plot") || eq(s, ".print") || eq(s, ".save")) { wl_append_word(&wl, &end, copy(dd->li_line)); ld->li_next = dd->li_next; tfree(dd->li_line); tfree(dd); } else { ld = dd; } } } if (deck->li_next) { /* There is something left after the controls. */ fprintf(cp_out, "\nCircuit: %s\n\n", tt); fprintf(stderr, "\nCircuit: %s\n\n", tt); /* Now expand subcircuit macros. Note that we have to * fix the case before we do this but after we * deal with the commands. */ if (!cp_getvar("nosubckt", CP_BOOL, NULL)) deck->li_next = inp_subcktexpand(deck->li_next); deck->li_actual = realdeck; nutinp_dodeck(deck, tt, wl, FALSE, options, filename); } /* Now that the deck is loaded, do the commands... */ controls = wl_reverse(controls); for (wl = controls; wl; wl = wl->wl_next) (void) cp_evloop(wl->wl_word); wl_free(controls); } /* Now reset everything. Pop the control stack, and fix up the IO * as it was before the source. */ cp_popcontrol(); cp_curin = lastin; cp_curout = lastout; cp_curerr = lasterr; tfree(tt); } void nutcom_source(wordlist *wl) { FILE *fp, *tp; char buf[BSIZE_SP]; bool inter; char *tempfile = NULL; wordlist *owl = wl; size_t n; inter = cp_interactive; cp_interactive = FALSE; if (wl->wl_next) { /* There are several files -- put them into a temp file... */ tempfile = smktemp("sp"); if ((fp = inp_pathopen(tempfile, "w+")) == NULL) { perror(tempfile); cp_interactive = TRUE; return; } while (wl) { if ((tp = inp_pathopen(wl->wl_word, "r")) == NULL) { perror(wl->wl_word); (void) fclose(fp); cp_interactive = TRUE; (void) unlink(tempfile); return; } while ((n = fread(buf, 1, BSIZE_SP, tp)) > 0) (void) fwrite(buf, 1, n, fp); (void) fclose(tp); wl = wl->wl_next; } (void) fseek(fp, 0L, SEEK_SET); } else { fp = inp_pathopen(wl->wl_word, "r"); } if (fp == NULL) { perror(wl->wl_word); cp_interactive = TRUE; return; } /* Don't print the title if this is a .spiceinit file. */ if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) { inp_nutsource(fp, TRUE, tempfile ? NULL : wl->wl_word); } else { inp_nutsource(fp, FALSE, tempfile ? NULL : wl->wl_word); } cp_interactive = inter; if (tempfile) (void) unlink(tempfile); } void nutinp_source(char *file) { static struct wordlist wl = { NULL, NULL, NULL }; wl.wl_word = file; nutcom_source(&wl); } /* This routine is cut in half here because com_rset has to do what follows * also. End is the list of commands we execute when the job is finished: * we only bother with this if we might be running in batch mode, since * it isn't much use otherwise. */ void nutinp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, struct line *options, char *filename) { NG_IGNORE(filename); NG_IGNORE(options); NG_IGNORE(reuse); NG_IGNORE(end); NG_IGNORE(tt); NG_IGNORE(deck); /* This was "ifdef notdef"-ed out, so I tossed it */ } ngspice-26/src/frontend/subckt.h0000644000265600020320000000035112264261473016302 0ustar andreasadmin/************* * Header file for subckt.c * 1999 E. Rouat ************/ #ifndef ngspice_SUBCKT_H #define ngspice_SUBCKT_H struct line * inp_subcktexpand(struct line *deck); struct line * inp_deckcopy(struct line *deck); #endif ngspice-26/src/frontend/device.c0000644000265600020320000013175312264261473016254 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * Routines to query and alter devices. */ #include "ngspice/ngspice.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dgen.h" #include "circuits.h" #include "device.h" #include "variable.h" #include "com_commands.h" #include "../misc/util.h" /* ngdirname() */ #include "gens.h" /* wl_forall */ static wordlist *devexpand(char *name); static void all_show(wordlist *wl, int mode); static void all_show_old(wordlist *wl, int mode); static void com_alter_mod(wordlist *wl); static void if_set_binned_model(CKTcircuit *, char *, char *, struct dvec *); /* * devhelp: lists available devices and information on parameters * devhelp : shows all available devices * devhelp devname : shows all parameters of that model/instance * devhelp devname parname : shows parameter meaning * Options: -csv (comma separated value for generating docs) * */ void com_devhelp(wordlist *wl) { /* Just a simple driver now */ devhelp(wl); } void devhelp(wordlist *wl) { int i, k = 0; int devindex = -1, devInstParNo = 0 , devModParNo = 0; bool found = FALSE; bool csv = FALSE; wordlist *wlist; IFparm *plist; /*First copy the base pointer */ wlist = wl; /* If there are no arguments output the list of available devices */ if (!wlist) { out_init(); out_printf("\nDevices available in the simulator\n\n"); for (k = 0; k < ft_sim->numDevices; k++) if (ft_sim->devices[k]) out_printf("%-*s:\t%s\n", DEV_WIDTH, ft_sim->devices[k]->name, ft_sim->devices[k]->description); out_send("\n"); return; } /* The first argument must be the csv option or a device name */ if (wlist && wlist->wl_word && eq(wlist->wl_word, "-csv")) { csv = TRUE; if (wlist->wl_next) wlist = wlist->wl_next; else return; } /* This argument, if exists, must be the device name */ if (wlist && wlist->wl_word) { while (k < ft_sim->numDevices && !found) { if (ft_sim->devices[k]) if (strcasecmp(ft_sim->devices[k]->name, wlist->wl_word) == 0) { devindex = k; if (ft_sim->devices[devindex]->numInstanceParms) devInstParNo = *(ft_sim->devices[devindex]->numInstanceParms); else devInstParNo = 0; if (ft_sim->devices[devindex]->numModelParms) devModParNo = *(ft_sim->devices[devindex]->numModelParms); else devModParNo = 0; wlist = wlist->wl_next; found = TRUE; } k++; } if (!found) { fprintf(cp_out, "Error: Device %s not found\n", wlist->wl_word); return; } } /* At this point, found is TRUE and we have found the device. * Now we have to scan the model and instance parameters to print * the string */ found = FALSE; if (wlist && wlist->wl_word) { plist = ft_sim->devices[devindex]->modelParms; for (i = 0; i < devModParNo; i++) { /* Scan model parameters first */ if (strcasecmp(plist[i].keyword, wlist->wl_word) == 0) { found = TRUE; out_init(); out_printf("Model Parameters\n"); if (csv) out_printf("id#, Name, Dir, Description\n"); else out_printf("%5s\t %-10s\t Dir\t Description\n", "id#", "Name"); printdesc(plist[i], csv); out_send("\n"); } } if (!found) { plist = ft_sim->devices[devindex]->instanceParms; for (i = 0; i < devInstParNo; i++) { /* Scan instance parameters then */ if (strcasecmp(plist[i].keyword, wlist->wl_word) == 0) { found = TRUE; out_init(); out_printf("Instance Parameters\n"); if (csv) out_printf("id#, Name, Dir, Description\n"); else out_printf("%5s\t %-10s\t Dir\t Description\n", "id#", "Name"); printdesc(plist[i], csv); out_send("\n"); } } } if (!found) fprintf(cp_out, "Error: Parameter %s not found\n", wlist->wl_word); return; } /* No arguments - we want all the parameters*/ out_init(); out_printf("%s - %s\n\n", ft_sim->devices[devindex]->name, ft_sim->devices[devindex]->description); out_printf("Model Parameters\n"); if (csv) out_printf("id#, Name, Dir, Description\n"); else out_printf("%5s\t %-10s\t Dir\t Description\n", "id#", "Name"); plist = ft_sim->devices[devindex]->modelParms; for (i = 0; i < devModParNo; i++) printdesc(plist[i], csv); out_printf("\n"); out_printf("Instance Parameters\n"); if (csv) out_printf("id#, Name, Dir, Description\n"); else out_printf("%5s\t %-10s\t Dir\t Description\n", "id#", "Name"); plist = ft_sim->devices[devindex]->instanceParms; for (i = 0; i < devInstParNo; i++) printdesc(plist[i], csv); out_send("\n"); } /* * Pretty print parameter descriptions * This function prints description of device parameters */ void printdesc(IFparm p, bool csv) { char sep; int spacer1, spacer2; /* First we indentify the separator */ if (csv) { sep = ','; spacer1 = 0; spacer2 = 0; } else { sep = '\t'; spacer1 = 5; spacer2 = 10; } out_printf("%*d%c %-*s%c ", spacer1, p.id, sep, spacer2, p.keyword, sep); if (p.dataType & IF_SET) if (p.dataType & IF_ASK) out_printf("inout%c ", sep); else out_printf("in%c ", sep); else out_printf("out%c ", sep); if (p.description) out_printf("%s\n", p.description); else out_printf("n.a.\n"); } /* * show: list device operating point info * show * show devs : params * show devs : params ; devs : params * show dev dev dev : param param param , dev dev : param param * show t : param param param, t : param param * */ static int count; void com_showmod(wordlist *wl) { if (cp_getvar("altshow", CP_BOOL, NULL)) all_show(wl, 1); else all_show_old(wl, 1); } void com_show(wordlist *wl) { if (cp_getvar("altshow", CP_BOOL, NULL)) all_show(wl, 0); else all_show_old(wl, 0); } static void all_show(wordlist *wl, int mode) { wordlist *params, *nextgroup, *thisgroup; wordlist *prev, *next, *w; int screen_width; dgen *dg; int instances; int i, j, n; int param_flag, dev_flag; if (!ft_curckt) { fprintf(cp_err, "Error: no circuit loaded\n"); return; } if (wl && wl->wl_word && eq(wl->wl_word, "-v")) { old_show(wl->wl_next); return; } if (!cp_getvar("width", CP_NUM, &screen_width)) screen_width = DEF_WIDTH; count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1); count = 1; n = 0; do { prev = NULL; params = NULL; nextgroup = NULL; thisgroup = wl; param_flag = 0; dev_flag = 0; /* find the parameter list and the nextgroup */ for (w = wl; w && !nextgroup; w = next) { next = w->wl_next; if (eq(w->wl_word, "*")) { tfree(w->wl_word); w->wl_word = strdup("all"); } if (eq(w->wl_word, "++") || eq(w->wl_word, "all")) { if (params) { param_flag = DGEN_ALLPARAMS; if (prev) prev->wl_next = w->wl_next; else params = next; } else { dev_flag = DGEN_ALLDEVS; if (prev) prev->wl_next = w->wl_next; else thisgroup = next; } /* w must not be freed here */ w = NULL; } else if (eq(w->wl_word, "+")) { if (params) { param_flag = DGEN_DEFPARAMS; if (prev) prev->wl_next = w->wl_next; else params = next; } else { dev_flag = DGEN_DEFDEVS; if (prev) prev->wl_next = w->wl_next; else thisgroup = next; } /* w must not be freed here */ w = NULL; } else if (eq(w->wl_word, ":")) { /* w must not be freed here */ w = NULL; if (!params) { params = next; if (prev) prev->wl_next = NULL; else thisgroup = NULL; } else { if (prev) prev->wl_next = next; else params = next; } } else if (eq(w->wl_word, ";") || eq(w->wl_word, ",")) { nextgroup = next; /* w must not be freed here */ w = NULL; if (prev) prev->wl_next = NULL; break; } prev = w; } instances = 0; for (dg = dgen_init(ft_curckt->ci_ckt, thisgroup, 1, dev_flag, mode); dg; dgen_nth_next(&dg, count)) { instances = 1; if (dg->flags & DGEN_INSTANCE) { instances = 2; n += 1; fprintf(cp_out, "%s:\n", dg->instance->GENname); fprintf(cp_out, " %-19s= %s\n", "model", dg->model->GENmodName); if (param_flag) param_forall(dg, param_flag); else if (!params) param_forall(dg, DGEN_DEFPARAMS); if (params) wl_forall(params, listparam, dg); } else if (ft_sim->devices[dg->dev_type_no]->numModelParms) { fprintf(cp_out, " %s models (%s)\n", ft_sim->devices[dg->dev_type_no]->name, ft_sim->devices[dg->dev_type_no]->description); n += 1; i = 0; do { fprintf(cp_out, "%*s", LEFT_WIDTH, "model"); j = dgen_for_n(dg, count, printstr_m, NULL, i); i += 1; fprintf(cp_out, "\n"); } while (j); fprintf(cp_out, "\n"); if (param_flag) param_forall(dg, param_flag); else if (!params) param_forall(dg, DGEN_DEFPARAMS); if (params) wl_forall(params, listparam, dg); fprintf(cp_out, "\n"); } } wl = nextgroup; } while (wl); if (!n) { if (instances == 0) printf("No matching instances or models\n"); else if (instances == 1) printf("No matching models\n"); else printf("No matching elements\n"); } } static void all_show_old(wordlist *wl, int mode) { wordlist *params, *nextgroup, *thisgroup; wordlist *prev, *next, *w; int screen_width; dgen *dg; int instances; int i, j, n; int param_flag, dev_flag; if (!ft_curckt) { fprintf(cp_err, "Error: no circuit loaded\n"); return; } if (wl && wl->wl_word && eq(wl->wl_word, "-v")) { old_show(wl->wl_next); return; } if (!cp_getvar("width", CP_NUM, &screen_width)) screen_width = DEF_WIDTH; count = (screen_width - LEFT_WIDTH) / (DEV_WIDTH + 1); n = 0; do { prev = NULL; params = NULL; nextgroup = NULL; thisgroup = wl; param_flag = 0; dev_flag = 0; /* find the parameter list and the nextgroup */ for (w = wl; w && !nextgroup; w = next) { next = w->wl_next; if (eq(w->wl_word, "*")) { tfree(w->wl_word); w->wl_word = strdup("all"); } if (eq(w->wl_word, "++") || eq(w->wl_word, "all")) { if (params) { param_flag = DGEN_ALLPARAMS; if (prev) prev->wl_next = w->wl_next; else params = next; } else { dev_flag = DGEN_ALLDEVS; if (prev) prev->wl_next = w->wl_next; else thisgroup = next; } /* w must not be freed here */ w = NULL; } else if (eq(w->wl_word, "+")) { if (params) { param_flag = DGEN_DEFPARAMS; if (prev) prev->wl_next = w->wl_next; else params = next; } else { dev_flag = DGEN_DEFDEVS; if (prev) prev->wl_next = w->wl_next; else thisgroup = next; } /* w must not be freed here */ w = NULL; } else if (eq(w->wl_word, ":")) { /* w must not be freed here */ w = NULL; if (!params) { params = next; if (prev) prev->wl_next = NULL; else thisgroup = NULL; } else { if (prev) prev->wl_next = next; else params = next; } } else if (eq(w->wl_word, ";") || eq(w->wl_word, ",")) { nextgroup = next; /* w must not be freed here */ w = NULL; if (prev) prev->wl_next = NULL; break; } prev = w; } instances = 0; for (dg = dgen_init(ft_curckt->ci_ckt, thisgroup, 1, dev_flag, mode); dg; dgen_nth_next(&dg, count)) { instances = 1; if (dg->flags & DGEN_INSTANCE) { instances = 2; fprintf(cp_out, " %s: %s\n", ft_sim->devices[dg->dev_type_no]->name, ft_sim->devices[dg->dev_type_no]->description); n += 1; i = 0; do { fprintf(cp_out, "%*s", LEFT_WIDTH, "device"); j = dgen_for_n(dg, count, printstr_n, NULL, i); i += 1; fprintf(cp_out, "\n"); } while (j); if (ft_sim->devices[dg->dev_type_no]->numModelParms) { i = 0; do { fprintf(cp_out, "%*s", LEFT_WIDTH, "model"); j = dgen_for_n(dg, count, printstr_m, NULL, i); i += 1; fprintf(cp_out, "\n"); } while (j); } if (param_flag) param_forall_old(dg, param_flag); else if (!params) param_forall_old(dg, DGEN_DEFPARAMS); if (params) wl_forall(params, listparam, dg); fprintf(cp_out, "\n"); } else if (ft_sim->devices[dg->dev_type_no]->numModelParms) { fprintf(cp_out, " %s models (%s)\n", ft_sim->devices[dg->dev_type_no]->name, ft_sim->devices[dg->dev_type_no]->description); n += 1; i = 0; do { fprintf(cp_out, "%*s", LEFT_WIDTH, "model"); j = dgen_for_n(dg, count, printstr_m, NULL, i); i += 1; fprintf(cp_out, "\n"); } while (j); fprintf(cp_out, "\n"); if (param_flag) param_forall_old(dg, param_flag); else if (!params) param_forall_old(dg, DGEN_DEFPARAMS); if (params) wl_forall(params, listparam, dg); fprintf(cp_out, "\n"); } } wl = nextgroup; } while (wl); if (!n) { if (instances == 0) printf("No matching instances or models\n"); else if (instances == 1) printf("No matching models\n"); else printf("No matching elements\n"); } } int printstr_n(dgen *dg, IFparm *p, int i) { NG_IGNORE(p); NG_IGNORE(i); if (dg->instance) fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, dg->instance->GENname); else fprintf(cp_out, " %*s", DEV_WIDTH, "<\?\?\?\?\?\?\?>"); return 0; } int printstr_m(dgen *dg, IFparm *p, int i) { NG_IGNORE(p); NG_IGNORE(i); if (dg->model) fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, dg->model->GENmodName); else fprintf(cp_out, " %*s", DEV_WIDTH, "<\?\?\?\?\?\?\?>"); return 0; } void param_forall(dgen *dg, int flags) { int i, j, k; int xcount; IFparm *plist; if (dg->flags & DGEN_INSTANCE) { xcount = *ft_sim->devices[dg->dev_type_no]->numInstanceParms; plist = ft_sim->devices[dg->dev_type_no]->instanceParms; } else { xcount = *ft_sim->devices[dg->dev_type_no]->numModelParms; plist = ft_sim->devices[dg->dev_type_no]->modelParms; } for (i = 0; i < xcount; i++) if (plist[i].dataType & IF_ASK) if ((((CKTcircuit *) (dg->ckt))->CKTrhsOld || (plist[i].dataType & IF_SET)) && (!(plist[i].dataType & (IF_REDUNDANT | IF_UNINTERESTING)) || (flags == DGEN_ALLPARAMS && !(plist[i].dataType & IF_REDUNDANT)))) { j = 0; do { fprintf(cp_out, " %-19s=", plist[i].keyword); k = dgen_for_n(dg, count, printvals, (plist + i), j); fprintf(cp_out, "\n"); j += 1; } while (k); } } void param_forall_old(dgen *dg, int flags) { int i, j, k; int xcount; IFparm *plist; if (dg->flags & DGEN_INSTANCE) { xcount = *ft_sim->devices[dg->dev_type_no]->numInstanceParms; plist = ft_sim->devices[dg->dev_type_no]->instanceParms; } else { xcount = *ft_sim->devices[dg->dev_type_no]->numModelParms; plist = ft_sim->devices[dg->dev_type_no]->modelParms; } for (i = 0; i < xcount; i++) if (plist[i].dataType & IF_ASK) if ((((CKTcircuit *) (dg->ckt))->CKTrhsOld || (plist[i].dataType & IF_SET)) && (!(plist[i].dataType & (IF_REDUNDANT | IF_UNINTERESTING)) || (flags == DGEN_ALLPARAMS && !(plist[i].dataType & IF_REDUNDANT)))) { j = 0; do { if (!j) fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, plist[i].keyword); else fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, " "); k = dgen_for_n(dg, count, printvals_old, (plist + i), j); fprintf(cp_out, "\n"); j += 1; } while (k); } } void listparam(wordlist *p, dgen *dg) { int i, j, k, found; int xcount; IFparm *plist; found = 0; if (dg->flags & DGEN_INSTANCE) { xcount = *ft_sim->devices[dg->dev_type_no]->numInstanceParms; plist = ft_sim->devices[dg->dev_type_no]->instanceParms; } else { xcount = *ft_sim->devices[dg->dev_type_no]->numModelParms; plist = ft_sim->devices[dg->dev_type_no]->modelParms; } for (i = 0; i < xcount; i++) if (eqc(p->wl_word, plist[i].keyword) && (plist[i].dataType & IF_ASK)) { found = 1; break; } if (found) { if ((((CKTcircuit *) (dg->ckt))->CKTrhsOld || (plist[i].dataType & IF_SET))) { j = 0; do { if (!j) fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, p->wl_word); else fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, " "); k = dgen_for_n(dg, count, printvals_old, (plist + i), j); printf("\n"); j += 1; } while (k > 0); } else { j = 0; do { if (!j) fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, p->wl_word); else fprintf(cp_out, "%*s", LEFT_WIDTH, " "); k = dgen_for_n(dg, count, bogus1, 0, j); fprintf(cp_out, "\n"); j += 1; } while (k > 0); } } else { j = 0; do { if (!j) fprintf(cp_out, "%*.*s", LEFT_WIDTH, LEFT_WIDTH, p->wl_word); else fprintf(cp_out, "%*s", LEFT_WIDTH, " "); k = dgen_for_n(dg, count, bogus2, 0, j); fprintf(cp_out, "\n"); j += 1; } while (k > 0); } } int bogus1(dgen *dg, IFparm *p, int i) { NG_IGNORE(dg); NG_IGNORE(p); NG_IGNORE(i); fprintf(cp_out, " %*s", DEV_WIDTH, "---------"); return 0; } int bogus2(dgen *dg, IFparm *p, int i) { NG_IGNORE(dg); NG_IGNORE(p); NG_IGNORE(i); fprintf(cp_out, " %*s", DEV_WIDTH, "?????????"); return 0; } int printvals(dgen *dg, IFparm *p, int i) { IFvalue val; int n; if (dg->flags & DGEN_INSTANCE) ft_sim->askInstanceQuest (ft_curckt->ci_ckt, dg->instance, p->id, &val, &val); else ft_sim->askModelQuest (ft_curckt->ci_ckt, dg->model, p->id, &val, &val); if (p->dataType & IF_VECTOR) n = val.v.numValue; else n = 1; if (((p->dataType & IF_VARTYPES) & ~IF_VECTOR) == IF_COMPLEX) n *= 2; if (i >= n) { if (i == 0) fprintf(cp_out, " -"); else fprintf(cp_out, " "); return 0; } if (p->dataType & IF_VECTOR) { /* va: ' ' is no flag for %s */ switch ((p->dataType & IF_VARTYPES) & ~IF_VECTOR) { case IF_FLAG: fprintf(cp_out, " %d", val.v.vec.iVec[i]); break; case IF_INTEGER: fprintf(cp_out, " %d", val.v.vec.iVec[i]); break; case IF_REAL: fprintf(cp_out, " %.6g", val.v.vec.rVec[i]); break; case IF_COMPLEX: if (!(i % 2)) fprintf(cp_out, " %.6g", val.v.vec.cVec[i / 2].real); else fprintf(cp_out, " %.6g", val.v.vec.cVec[i / 2].imag); break; case IF_STRING: fprintf(cp_out, " %s", val.v.vec.sVec[i]); break; case IF_INSTANCE: fprintf(cp_out, " %s", val.v.vec.uVec[i]); break; default: fprintf(cp_out, " %s", " ******** "); } } else { switch ((p->dataType & IF_VARTYPES) & ~IF_VECTOR) { case IF_FLAG: fprintf(cp_out, " %d", val.iValue); break; case IF_INTEGER: fprintf(cp_out, " %d", val.iValue); break; case IF_REAL: fprintf(cp_out, " %.6g", val.rValue); break; case IF_COMPLEX: if (i % 2) fprintf(cp_out, " %.6g", val.cValue.real); else fprintf(cp_out, " %.6g", val.cValue.imag); break; case IF_STRING: fprintf(cp_out, " %s", val.sValue); break; case IF_INSTANCE: fprintf(cp_out, " %s", val.uValue); break; default: fprintf(cp_out, " %s", " ******** "); } } return n - 1; } int printvals_old(dgen *dg, IFparm *p, int i) { IFvalue val; int n, error; if (dg->flags & DGEN_INSTANCE) error = ft_sim->askInstanceQuest (ft_curckt->ci_ckt, dg->instance, p->id, &val, &val); else error = ft_sim->askModelQuest (ft_curckt->ci_ckt, dg->model, p->id, &val, &val); if (p->dataType & IF_VECTOR) n = val.v.numValue; else n = 1; if (((p->dataType & IF_VARTYPES) & ~IF_VECTOR) == IF_COMPLEX) n *= 2; if (i >= n) { if (i == 0) fprintf(cp_out, " -"); else fprintf(cp_out, " "); return 0; } if (error) { fprintf(cp_out, " <>", error); } else if (p->dataType & IF_VECTOR) { /* va: ' ' is no flag for %s */ switch ((p->dataType & IF_VARTYPES) & ~IF_VECTOR) { case IF_FLAG: fprintf(cp_out, " % *d", DEV_WIDTH, val.v.vec.iVec[i]); break; case IF_INTEGER: fprintf(cp_out, " % *d", DEV_WIDTH, val.v.vec.iVec[i]); break; case IF_REAL: fprintf(cp_out, " % *.6g", DEV_WIDTH, val.v.vec.rVec[i]); break; case IF_COMPLEX: if (!(i % 2)) fprintf(cp_out, " % *.6g", DEV_WIDTH, val.v.vec.cVec[i / 2].real); else fprintf(cp_out, " % *.6g", DEV_WIDTH, val.v.vec.cVec[i / 2].imag); break; case IF_STRING: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, val.v.vec.sVec[i]); break; case IF_INSTANCE: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, val.v.vec.uVec[i]); break; default: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, " ******** "); } } else { switch ((p->dataType & IF_VARTYPES) & ~IF_VECTOR) { case IF_FLAG: fprintf(cp_out, " % *d", DEV_WIDTH, val.iValue); break; case IF_INTEGER: fprintf(cp_out, " % *d", DEV_WIDTH, val.iValue); break; case IF_REAL: fprintf(cp_out, " % *.6g", DEV_WIDTH, val.rValue); break; case IF_COMPLEX: if (i % 2) fprintf(cp_out, " % *.6g", DEV_WIDTH, val.cValue.real); else fprintf(cp_out, " % *.6g", DEV_WIDTH, val.cValue.imag); break; case IF_STRING: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, val.sValue); break; case IF_INSTANCE: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, val.uValue); break; default: fprintf(cp_out, " %*.*s", DEV_WIDTH, DEV_WIDTH, " ******** "); } } return n - 1; } /* (old "show" command) * Display various device parameters. The syntax of this command is * show devicelist : parmlist * where devicelist can be "all", the name of a device, a string like r*, * which means all devices with names that begin with 'r', repeated one * or more times. The parms are names of parameters that are (hopefully) * valid for all the named devices, or "all". */ void old_show(wordlist *wl) { wordlist *devs, *parms, *tw, *ww; struct variable *v; char *nn; devs = wl; wl = wl_find(":", wl); if (!wl) { parms = NULL; } else { if (wl->wl_prev) wl->wl_prev->wl_next = NULL; parms = wl->wl_next; if (parms) parms->wl_prev = NULL; } /* Now expand the devicelist... */ for (tw = NULL; devs; devs = devs->wl_next) { inp_casefix(devs->wl_word); tw = wl_append(tw, devexpand(devs->wl_word)); } devs = tw; tw = wl_find("all", parms); if (tw) parms = NULL; /* This is a crock... */ if (!devs) devs = cp_cctowl(ft_curckt->ci_devices); out_init(); while (devs) { out_printf("%s:\n", devs->wl_word); if (parms) { for (tw = parms; tw; tw = tw->wl_next) { nn = copy(devs->wl_word); v = if_getparam(ft_curckt->ci_ckt, &nn, tw->wl_word, 0, 0); if (!v) v = if_getparam(ft_curckt->ci_ckt, &nn, tw->wl_word, 0, 1); if (v) { out_printf("\t%s =", tw->wl_word); for (ww = cp_varwl(v); ww; ww = ww->wl_next) out_printf(" %s", ww->wl_word); out_send("\n"); } } } else { nn = copy(devs->wl_word); v = if_getparam(ft_curckt->ci_ckt, &nn, "all", 0, 0); if (!v) v = if_getparam(ft_curckt->ci_ckt, &nn, "all", 0, 1); while (v) { out_printf("\t%s =", v->va_name); for (ww = cp_varwl(v); ww; ww = ww->wl_next) out_printf(" %s", ww->wl_word); out_send("\n"); v = v->va_next; } } devs = devs->wl_next; } } /* Alter a device parameter. The new syntax here is * alter @device[parameter] = expr * alter device = expr * alter device parameter = expr * expr must be real (complex isn't handled right now, integer is fine though, * but no strings ... for booleans, use 0/1). */ static void com_alter_common(wordlist *wl, int do_model); void com_alter(wordlist *wl) { if (!wl) { fprintf(cp_err, "usage: alter dev param = expression\n"); fprintf(cp_err, " or alter @dev[param] = expression\n"); fprintf(cp_err, " or alter dev = expression\n"); return; } com_alter_common(wl, 0); } void com_altermod(wordlist *wl) { wordlist *fileword; bool newfile = FALSE; fileword = wl; while (fileword) { if (ciprefix("file", fileword->wl_word)) newfile = TRUE; fileword = fileword->wl_next; } if (newfile) com_alter_mod(wl); else com_alter_common(wl, 1); } static void if_set_binned_model(CKTcircuit *ckt, char *devname, char *param, struct dvec *val) { char *width_length; double w = 0.0, l = 0.0; struct variable *v; v = if_getparam(ckt, &devname, "w", 0, 0); if (!v) { fprintf(cp_err, "Error: Can't access width instance parameter.\n"); return; } w = v->va_V.vV_real; v = if_getparam(ckt, &devname, "l", 0, 0); if (!v) { fprintf(cp_err, "Error: Can't access length instance parameter.\n"); return; } l = v->va_V.vV_real; if (param[0] == 'w') w = *val->v_realdata; /* overwrite the width with the alter param */ else l = *val->v_realdata; /* overwrite the length with the alter param */ width_length = TMALLOC(char, 36); (void) sprintf(width_length, "w=%15.7e l=%15.7e", w, l); if_setparam_model(ft_curckt->ci_ckt, &devname, width_length); FREE(width_length); } static void com_alter_common(wordlist *wl, int do_model) { wordlist *eqword = NULL, *words; char *dev, *p; char *param; struct dvec *dv; struct pnode *names; /* DIE 2009_02_06 */ char *argument; char **arglist; int i = 0, step = 0, n, wlen, maxelem = 3; wordlist *wl2 = NULL, *wlin, *rhs; bool eqfound = FALSE; if (!ft_curckt) { fprintf(cp_err, "Error: no circuit loaded\n"); return; } /* wordlist 'wl' will be splitted into a wordlist wl2 with three elements, containing 1) '@dev[param]' string (i.e.: the substring before '=' char); 2) '=' string; 3) 'expression' string. Spaces around the '=' sign have to be removed. This is provided by inp_remove_excess_ws(). But take care if command is entered manually! If the 'altermod' argument is 'altermod m1 vth0=0.7', 'm1' has to be kept as the element in wl2 before splitting inserts the three new elements. If 'expression' is a vector (e.g. [ 1.0 1.2 1.4 ] ), its elements in wl2 have to follow the splitting. wl_splice() will take care of this. */ wlin = wl; while (wl) { argument = wl->wl_word; /* searching for '=' ... */ i = 0; while (argument[i] != '=' && argument[i] != '\0') i++; /* argument may be '=', then do nothing or =token or token= or token1=token2 ...and if found split argument into three chars and make a new wordlist */ if (argument[i] != '\0') { /* We found '=' */ eqfound = TRUE; if (strlen(argument) == 1) { wl = wl->wl_next; step = -1; wl2 = wlin; } else if (strlen(argument) > 1) { arglist = TMALLOC(char*, 4); arglist[3] = NULL; arglist[0] = TMALLOC(char, i + 1); arglist[2] = TMALLOC(char, strlen(&argument[i + 1]) + 1); /* copy argument */ strncpy(arglist[0], argument, (size_t) i); arglist[0][i] = '\0'; /* copy equal sign */ arglist[1] = copy("="); /* copy expression */ strncpy(arglist[2], &argument[i+1], strlen(&argument[i+1])+1); /* create a new wordlist from array arglist */ wl2 = wl_build(arglist); /* combine wordlists into wl2, free wl */ wl_splice(wl, wl2); wl = NULL; /* free arglist */ for (n = 0; n < 3; n++) tfree(arglist[n]); tfree(arglist); } } else { /* deal with 'altermod m1 vth0=0.7' by moving forward beyond 'm1' */ wl = wl->wl_next; step++; } } if (eqfound) { /* step back in the wordlist, if we have moved forward, to catch 'm1' */ for (n = step; n > 0; n--) wl2 = wl2->wl_prev; } else { /* no equal sign found, probably a pre3f4 input format 'alter device value' 'alter device parameter value' are supported, 'alter device parameter value parameter value [ parameter value ]' multiple param value pairs are not supported! */ wl2 = wlin; wlen = wl_length(wlin); /* Return the last element of wlin */ wlin = wl_nthelem(100, wlin); /* no more than 100 vector elements */ if (eq(wlin->wl_word, "]")) /* we have a vector */ for (n = 0; n < 100; n++) { /* no more than 100 vector elements */ wlin = wlin->wl_prev; maxelem++; if (eq(wlin->wl_word, "[")) { break; } if (wlin->wl_prev == NULL) { fprintf(cp_err, "Error: '[' is missing.\n"); fprintf(cp_err, "Cannot alter parameters.\n"); return; } } if (wlen > maxelem) { fprintf(cp_err, "Error: Only a single param - value pair supported.\n"); fprintf(cp_err, "Cannot alter parameters.\n"); return; } /* add the '=' */ wlin = wlin->wl_prev; rhs = wl_chop_rest(wlin); wlin = wl_append(wlin, wl_cons(copy("="), rhs)); /* step back until 'alter' or 'altermod' is found, then move one step forward */ while (!ciprefix("alter", wlin->wl_word)) //while (!ciprefix(wlin->wl_word, "alter")) wlin = wlin->wl_prev; wlin = wlin->wl_next; wl2 = wlin; } /* Everything is ready, parsing of the wordlist starts here. */ words = wl2; while (words) { p = words->wl_word; eqword = words; words = words->wl_next; if (eq(p, "=")) break; } if (!words) { fprintf(cp_err, "Error: no assignment found.\n"); fprintf(cp_err, "Cannot alter parameters.\n"); return; } /* device parameter = expr device = expr @dev[param] = expr */ dev = NULL; param = NULL; words = wl2; while (words != eqword) { p = words->wl_word; if (param) { fprintf(cp_err, "Warning: excess parameter name \"%s\" ignored.\n", p); } else if (dev) { param = words->wl_word; } else if (*p == '@' || *p == '#') { dev = p + 1; p = strchr(p, '['); if (p) { *p++ = 0; param = p; p = strchr(p, ']'); if (p) *p = 0; } } else { dev = p; } words = words->wl_next; } if (!dev) { fprintf(cp_err, "Error: no model or device name provided.\n"); fprintf(cp_err, "Cannot alter parameters.\n"); return; } words = eqword->wl_next; /* skip next line if words is a vector */ if (!eq(words->wl_word, "[")) names = ft_getpnames(words, FALSE); else names = NULL; if (!names) { /* Put this to try to resolve the case of alter @vin[pulse] = [ 0 5 10n 10n 10n 50n 100n ] */ char *xsbuf, *rem_xsbuf; int type = IF_REALVEC, i = 0; double *list; double tmp; int error; /* move beyond '[' to allow INPevaluate() */ if (eq(words->wl_word, "[")) words = words->wl_next; xsbuf = rem_xsbuf = wl_flatten(words); /* fprintf(cp_err, "Chain converted %s \n", xsbuf); */ dv = TMALLOC(struct dvec, 1); dv->v_name = copy("real vector"); type &= IF_VARTYPES; if (type == IF_REALVEC) { list = TMALLOC(double, 1); tmp = INPevaluate(&xsbuf, &error, 1); while (error == 0) { /*printf(" returning vector value %g\n", tmp); */ i++; list = TREALLOC(double, list, i); list[i-1] = tmp; tmp = INPevaluate(&xsbuf, &error, 1); } dv->v_realdata = list; } dv->v_length = i; if (!dv) return; if (dv->v_length < 1) { fprintf(cp_err, "Error: cannot evaluate new parameter value.\n"); return; } /* Here I was, to change the inclusion in the circuit. * will have to revise that dv is right for its insertion. */ if_setparam(ft_curckt->ci_ckt, &dev, param, dv, do_model); tfree(rem_xsbuf); vec_free(dv); return; } dv = ft_evaluate(names); if (!dv) goto done; if (dv->v_length < 1) { fprintf(cp_err, "Error: cannot evaluate new parameter value.\n"); goto done; } /* If we want alter the geometry of a MOS device we have to ensure that we are in the valid model bin. */ if ((dev[0] == 'm') && ((param[0] == 'w') || (param[0] == 'l'))) if_set_binned_model(ft_curckt->ci_ckt, dev, param, dv); if_setparam(ft_curckt->ci_ckt, &dev, param, dv, do_model); /* va: garbage collection for dv, if pnode names is no simple value */ if (names->pn_value == NULL && dv != NULL) vec_free(dv); done: free_pnode(names); /* free also dv, if pnode names is simple value */ } /* Given a device name, possibly with wildcards, return the matches. */ static wordlist * devexpand(char *name) { wordlist *wl, *devices; if (strchr(name, '*') || strchr(name, '[') || strchr(name, '?')) { devices = cp_cctowl(ft_curckt->ci_devices); for (wl = NULL; devices; devices = devices->wl_next) if (cp_globmatch(name, devices->wl_word)) wl = wl_cons(devices->wl_word, wl); } else if (cieq(name, "all")) { wl = cp_cctowl(ft_curckt->ci_devices); } else { wl = wl_cons(name, NULL); } wl_sort(wl); return (wl); } /* altermod mod_1 [mod_nn] file=modelparam.mod load model file and overwrite models mod_1 till mod_nn with all new parameters (limited to 16 models) */ static void com_alter_mod(wordlist *wl) { #define MODLIM 16 /* max number of models */ FILE *modfile; char *modellist[MODLIM] = {NULL}, *modellines[MODLIM] = {NULL}, *newmodelname, *newmodelline; char *filename = NULL, *eqword, *input, *modelline = NULL, *inptoken; int modno = 0, molineno = 0, i, j; wordlist *newcommand; struct line *modeldeck, *tmpdeck; char *readmode = "r"; char **arglist; bool modelfound = FALSE; int ij[MODLIM]; /* initialize */ for (i = 0; i < MODLIM; i++) ij[i] = -1; /* read all model names */ while (!ciprefix("file", wl->wl_word)) { if (modno == MODLIM) { fprintf(cp_err, "Error: too many model names in altermod command\n"); controlled_exit(1); } modellist[modno] = copy(wl->wl_word); modno++; wl = wl->wl_next; } input = wl_flatten(wl); /* get the file name */ eqword = strstr(input, "="); if (eqword) { eqword++; while (*eqword == ' ') eqword++; if (eqword == '\0') { fprintf(cp_err, "Error: no filename given\n"); controlled_exit(1); } filename = copy(eqword); } else { eqword = strstr(input, "file"); eqword += 4; while (*eqword == ' ') eqword++; if (eqword == '\0') { fprintf(cp_err, "Error: no filename given\n"); controlled_exit(1); } filename = copy(eqword); } modfile = inp_pathopen(filename, readmode); { char *dir_name = ngdirname(filename); modeldeck = inp_readall(modfile, dir_name, 0, 0); free(dir_name); } tfree(input); tfree(filename); /* get all lines starting with *model */ for (tmpdeck = modeldeck; tmpdeck; tmpdeck = tmpdeck->li_next) if (ciprefix("*model", tmpdeck->li_line)) { if (molineno == MODLIM) { fprintf(cp_err, "Error: more than %d models in deck, rest ignored\n", molineno); break; } modellines[molineno] = tmpdeck->li_line; molineno++; } /* Check if all models named in altermod command are to be found in input deck. Exit if not successfull */ for (i = 0; i < modno; i++) { for (j = 0; j < molineno; j++) { newmodelline = modellines[j]; /* get model name from model line */ inptoken = gettok(&newmodelline); /* *model */ tfree(inptoken); newmodelname = gettok(&newmodelline); /* modelname */ if (cieq(newmodelname, modellist[i])) { modelfound = TRUE; tfree(newmodelname); break; } tfree(newmodelname); } if (modelfound) { modelfound = FALSE; ij[i] = j; /* model in altermod, found in model line */ continue; } else { fprintf(cp_err, "Error: could not find model %s in input deck\n", modellist[i]); controlled_exit(1); } } /* read the model line, generate the altermod commands as a wordlist, and call com_alter_common() */ arglist = TMALLOC(char*, 4); arglist[0] = copy("altermod"); arglist[3] = NULL; /* for each model name of altermod command */ for (i = 0; i < modno; i++) { /* model name */ arglist[1] = copy(modellist[i]); /* parse model line from deck */ modelline = modellines[ij[i]]; inptoken = gettok(&modelline); /* skip *model */ tfree(inptoken); inptoken = gettok(&modelline); /* skip modelname */ tfree(inptoken); inptoken = gettok(&modelline); /* skip model type */ tfree(inptoken); while ((inptoken = gettok(&modelline)) != NULL) { /* exclude level and version */ if (ciprefix("version", inptoken) || ciprefix("level", inptoken)) { tfree(inptoken); continue; } arglist[2] = inptoken; /* create a new wordlist from array arglist */ newcommand = wl_build(arglist); com_alter_common(newcommand->wl_next, 1); wl_free(newcommand); tfree(inptoken); } tfree(arglist[1]); } tfree(arglist[0]); tfree(arglist[3]); } ngspice-26/src/frontend/spiceif.c0000644000265600020320000014755712264261473016450 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * Interface routines. These are specific to spice. The only changes to FTE * that should be needed to make FTE work with a different simulator is * to rewrite this file. What each routine is expected to do can be * found in the programmer's manual. This file should be the only one * that includes ngspice.header files. */ /*CDHW Notes: I have never really understood the way Berkeley intended the six pointers to default values (ci_defOpt/Task ci_specOpt/Task ci_curOpt/Task) to work, as there only see to be two data blocks to point at, or I've missed something clever elsewhere. Anyway, in the original 3f4 the interactive command 'set temp = 10' set temp for its current task and clobbered the default values as a side effect. When an interactive is run it created specTask using the spice application default values, not the circuit defaults affected by 'set temp = 10'. The fix involves two changes 1. Make 'set temp = 10' change the values in the 'default' block, not whatever the 'current' pointer happens to be pointing at (which is usually the default block except when one interactive is run immediately after another). 2. Hack CKTnewTask() so that it looks to see whether it is creating a 'special' task, in which case it copies the values from ft_curckt->ci_defTask providing everything looks sane, otherwise it uses the hard-coded 'application defaults'. These are fairly minor changes, and as they don't change the data structures they should be fairly 'safe'. However, ... CDHW*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/cpdefs.h" #include "ngspice/tskdefs.h" /* Is really needed ? */ #include "ngspice/ftedefs.h" #include "ngspice/fteinp.h" #include "ngspice/inpdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/ifsim.h" #include "circuits.h" #include "spiceif.h" #include "variable.h" #ifdef XSPICE /* gtri - add - wbk - 11/9/90 - include MIF function prototypes */ #include "ngspice/mifproto.h" /* gtri - end - wbk - 11/9/90 */ /* gtri - evt - wbk - 5/20/91 - Add stuff for user-defined nodes */ #include "ngspice/evtproto.h" #include "ngspice/evtudn.h" /* gtri - end - wbk - 5/20/91 - Add stuff for user-defined nodes */ #include "ngspice/mif.h" #endif extern INPmodel *modtab; static struct variable *parmtovar(IFvalue *pv, IFparm *opt); static IFparm *parmlookup(IFdevice *dev, GENinstance **inptr, char *param, int do_model, int inout); static IFvalue *doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *opt, int ind); static int doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *opt, struct dvec *val); static int finddev(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr); /* espice fix integration */ static int finddev_special(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr, int *device_or_model); /* Input a single deck, and return a pointer to the circuit. */ CKTcircuit * if_inpdeck(struct line *deck, INPtables **tab) { CKTcircuit *ckt; int err, i; struct line *ll; IFuid taskUid; IFuid optUid; int which = -1; for (i = 0, ll = deck; ll; ll = ll->li_next) i++; *tab = INPtabInit(i); ft_curckt->ci_symtab = *tab; err = ft_sim->newCircuit (&ckt); if (err != OK) { ft_sperror(err, "CKTinit"); return (NULL); } /*CDHW Create a task DDD with a new UID. ci_defTask will point to it CDHW*/ err = IFnewUid(ckt, &taskUid, NULL, "default", UID_TASK, NULL); if (err) { ft_sperror(err, "newUid"); return (NULL); } #if (0) err = ft_sim->newTask (ckt, &(ft_curckt->ci_defTask), taskUid); #else /*CDHW*/ err = ft_sim->newTask (ckt, &(ft_curckt->ci_defTask), taskUid, NULL); #endif if (err) { ft_sperror(err, "newTask"); return (NULL); } /*CDHW which options available for this simulator? CDHW*/ which = ft_find_analysis("options"); if (which != -1) { err = IFnewUid(ckt, &optUid, NULL, "options", UID_ANALYSIS, NULL); if (err) { ft_sperror(err, "newUid"); return (NULL); } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, optUid, &(ft_curckt->ci_defOpt), ft_curckt->ci_defTask); /*CDHW ci_defTask and ci_defOpt point to parameters DDD CDHW*/ if (err) { ft_sperror(err, "createOptions"); return (NULL); } ft_curckt->ci_curOpt = ft_curckt->ci_defOpt; /*CDHW ci_curOpt and ci_defOpt point to DDD CDHW*/ } ft_curckt->ci_curTask = ft_curckt->ci_defTask; /* reset the model table, will be filled in anew in INPpas1() */ modtab = NULL; INPpas1(ckt, (card *) deck->li_next, *tab); /* store the new model table in the current circuit */ ft_curckt->ci_modtab = modtab; INPpas2(ckt, (card *) deck->li_next, *tab, ft_curckt->ci_defTask); /* INPpas2 has been modified to ignore .NODESET and .IC * cards. These are left till INPpas3 so that we can check for * nodeset/ic of non-existant nodes. */ INPpas3(ckt, (card *) deck->li_next, *tab, ft_curckt->ci_defTask, ft_sim->nodeParms, ft_sim->numNodeParms); #ifdef XSPICE /* gtri - begin - wbk - 6/6/91 - Finish initialization of event driven structures */ err = EVTinit(ckt); if (err) { ft_sperror(err, "EVTinit"); return (NULL); } /* gtri - end - wbk - 6/6/91 - Finish initialization of event driven structures */ #endif return (ckt); } /* Do a run of the circuit, of the given type. Type "resume" is * special -- it means to resume whatever simulation that was in * progress. The return value of this routine is 0 if the exit was ok, * and 1 if there was a reason to interrupt the circuit (interrupt * typed at the keyboard, error in the simulation, etc). args should * be the entire command line, e.g. "tran 1 10 20 uic" */ int if_run(CKTcircuit *ckt, char *what, wordlist *args, INPtables *tab) { int err; struct line deck; char buf[BSIZE_SP]; int which = -1; IFuid specUid, optUid; char *s; /* First parse the line... */ /*CDHW Look for an interactive task CDHW*/ if (eq(what, "tran") || eq(what, "ac") || eq(what, "dc") || eq(what, "op") || eq(what, "pz") || eq(what, "disto") || eq(what, "adjsen") || eq(what, "sens") || eq(what, "tf") || eq(what, "noise") #ifdef WITH_PSS /* SP: Steady State Analysis */ || eq(what, "pss") /* SP */ #endif ) { s = wl_flatten(args); /* va: tfree char's tmalloc'ed in wl_flatten */ (void) sprintf(buf, ".%s", s); tfree(s); deck.li_next = deck.li_actual = NULL; deck.li_error = NULL; deck.li_linenum = 0; deck.li_line = buf; /*CDHW Delete any previous special task CDHW*/ if (ft_curckt->ci_specTask) { if (ft_curckt->ci_specTask == ft_curckt->ci_defTask) /*CDHW*/ printf("Oh dear...something bad has happened to the options.\n"); err = ft_sim->deleteTask (ft_curckt->ci_ckt, ft_curckt->ci_specTask); if (err) { ft_sperror(err, "deleteTask"); return (2); } ft_curckt->ci_specTask = NULL; ft_curckt->ci_specOpt = NULL; /*CDHW*/ } /*CDHW Create an interactive task AAA with a new UID. ci_specTask will point to it CDHW*/ err = IFnewUid(ft_curckt->ci_ckt, &specUid, NULL, "special", UID_TASK, NULL); if (err) { ft_sperror(err, "newUid"); return (2); } #if (0) err = ft_sim->newTask (ft_curckt->ci_ckt, &(ft_curckt->ci_specTask), specUid); #else /*CDHW*/ err = ft_sim->newTask (ft_curckt->ci_ckt, &(ft_curckt->ci_specTask), specUid, &(ft_curckt->ci_defTask)); #endif if (err) { ft_sperror(err, "newTask"); return (2); } /*CDHW which options available for this simulator? CDHW*/ which = ft_find_analysis("options"); if (which != -1) { /*CDHW options are available CDHW*/ err = IFnewUid(ft_curckt->ci_ckt, &optUid, NULL, "options", UID_ANALYSIS, NULL); if (err) { ft_sperror(err, "newUid"); return (2); } err = ft_sim->newAnalysis (ft_curckt->ci_ckt, which, optUid, &(ft_curckt->ci_specOpt), ft_curckt->ci_specTask); /*CDHW 'options' ci_specOpt points to AAA in this case CDHW*/ if (err) { ft_sperror(err, "createOptions"); return (2); } ft_curckt->ci_curOpt = ft_curckt->ci_specOpt; /*CDHW ci_specTask ci_specOpt and ci_curOpt all point to AAA CDHW*/ } ft_curckt->ci_curTask = ft_curckt->ci_specTask; /*CDHW ci_curTask and ci_specTask point to the interactive task AAA CDHW*/ INPpas2(ckt, (card *) &deck, tab, ft_curckt->ci_specTask); if (deck.li_error) { fprintf(cp_err, "Warning: %s\n", deck.li_error); return 2; } } /*CDHW ** if the task is to 'run' the deck, change ci_curTask and ** ci_curOpt to point to DDD ** created by if_inpdeck(), otherwise they point to AAA. CDHW*/ if (eq(what, "run")) { ft_curckt->ci_curTask = ft_curckt->ci_defTask; ft_curckt->ci_curOpt = ft_curckt->ci_defOpt; } /* -- Find out what we are supposed to do. */ if ((eq(what, "tran")) || (eq(what, "ac")) || (eq(what, "dc")) || (eq(what, "op")) || (eq(what, "pz")) || (eq(what, "disto")) || (eq(what, "noise")) || (eq(what, "adjsen")) || (eq(what, "sens")) || (eq(what, "tf")) || #ifdef WITH_PSS /* SP: Steady State Analysis */ (eq(what, "pss")) || /* SP */ #endif (eq(what, "run"))) { /*CDHW Run the analysis pointed to by ci_curTask CDHW*/ ft_curckt->ci_curOpt = ft_curckt->ci_defOpt; if ((err = ft_sim->doAnalyses (ckt, 1, ft_curckt->ci_curTask)) != OK) { ft_sperror(err, "doAnalyses"); /* wrd_end(); */ if (err == E_PAUSE) return (1); else return (2); } } else if (eq(what, "resume")) { if ((err = ft_sim->doAnalyses (ckt, 0, ft_curckt->ci_curTask)) != OK) { ft_sperror(err, "doAnalyses"); /* wrd_end(); */ if (err == E_PAUSE) return (1); else return (2); } } else { fprintf(cp_err, "if_run: Internal Error: bad run type %s\n", what); return (2); } return (0); } /* Set an option in the circuit. Arguments are option name, type, and * value (the last a char *), suitable for casting to whatever needed... */ static char *unsupported[] = { "itl3", "itl5", "lvltim", "maxord", "method", NULL }; static char *obsolete[] = { "limpts", "limtim", "lvlcod", NULL }; int if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value) { IFvalue pval; int err; char **vv; int which = -1; IFparm *if_parm; if (eq(name, "acct")) { ft_acctprint = TRUE; return 0; } else if (eq(name, "noacct")) { ft_noacctprint = TRUE; return 0; } else if (eq(name, "noinit")) { ft_noinitprint = TRUE; return 0; } else if (eq(name, "list")) { ft_listprint = TRUE; return 0; } else if (eq(name, "node")) { ft_nodesprint = TRUE; return 0; } else if (eq(name, "opts")) { ft_optsprint = TRUE; return 0; } else if (eq(name, "nopage")) { ft_nopage = TRUE; return 0; } else if (eq(name, "nomod")) { ft_nomod = TRUE; return 0; } which = ft_find_analysis("options"); if (which == -1) { fprintf(cp_err, "Warning: .options line unsupported\n"); return 0; } if_parm = ft_find_analysis_parm(which, name); if (!if_parm || !(if_parm->dataType & IF_SET)) { /* See if this is unsupported or obsolete. */ for (vv = unsupported; *vv; vv++) if (eq(name, *vv)) { fprintf(cp_err, "Warning: option %s is currently unsupported.\n", name); return 1; } for (vv = obsolete; *vv; vv++) if (eq(name, *vv)) { fprintf(cp_err, "Warning: option %s is obsolete.\n", name); return 1; } return 0; } switch (if_parm->dataType & IF_VARTYPES) { case IF_REAL: if (type == CP_REAL) pval.rValue = *((double *) value); else if (type == CP_NUM) pval.rValue = *((int *) value); else goto badtype; break; case IF_INTEGER: if (type == CP_NUM) pval.iValue = *((int *) value); else if (type == CP_REAL) pval.iValue = (int)floor((*(double *)value) + 0.5); else goto badtype; break; case IF_STRING: if (type == CP_STRING) pval.sValue = copy((char*) value); else goto badtype; break; case IF_FLAG: if (type == CP_BOOL) pval.iValue = *((bool *) value) ? 1 : 0; else if (type == CP_NUM) /* FIXME, shall we allow this ? */ pval.iValue = *((int *) value); else goto badtype; break; default: fprintf(cp_err, "if_option: Internal Error: bad option type %d.\n", if_parm->dataType); } if (!ckt) { /* XXX No circuit loaded */ fprintf(cp_err, "Simulation parameter \"%s\" can't be set until\n", name); fprintf(cp_err, "a circuit has been loaded.\n"); return 1; } #if (0) if ((err = ft_sim->setAnalysisParm (ckt, ft_curckt->ci_curOpt, if_parm->id, &pval, NULL)) != OK) ft_sperror(err, "setAnalysisParm(options) ci_curOpt"); #else /*CDHW*/ if ((err = ft_sim->setAnalysisParm (ckt, ft_curckt->ci_defOpt, if_parm->id, &pval, NULL)) != OK) ft_sperror(err, "setAnalysisParm(options) ci_curOpt"); return 1; #endif badtype: fprintf(cp_err, "Error: bad type given for option %s --\n", name); fprintf(cp_err, "\ttype given was "); switch (type) { case CP_BOOL: fputs("boolean", cp_err); break; case CP_NUM: fputs("integer", cp_err); break; case CP_REAL: fputs("real", cp_err); break; case CP_STRING: fputs("string", cp_err); break; case CP_LIST: fputs("list", cp_err); break; default: fputs("something strange", cp_err); break; } fprintf(cp_err, ", type expected was "); switch (if_parm->dataType & IF_VARTYPES) { case IF_REAL: fputs("real.\n", cp_err); break; case IF_INTEGER: fputs("integer.\n", cp_err); break; case IF_STRING: fputs("string.\n", cp_err); break; case IF_FLAG: fputs("flag.\n", cp_err); break; default: fputs("something strange.\n", cp_err); break; } if (type == CP_BOOL) fputs("\t(Note that you must use an = to separate option name and value.)\n", cp_err); return 0; } void if_dump(CKTcircuit *ckt, FILE *file) { NG_IGNORE(ckt); fprintf(file, "diagnostic output dump unavailable."); } void if_cktfree(CKTcircuit *ckt, INPtables *tab) { ft_sim->deleteCircuit (ckt); INPtabEnd(tab); } /* Return a string describing an error code. */ /* BLOW THIS AWAY.... */ char * if_errstring(int code) { return (INPerror(code)); } /* Get pointers to a device, its model, and its type number given the name. If * there is no such device, try to find a model with that name * device_or_model says if we are referencing a device or a model. * finddev_special(ck, name, devptr, modptr, device_or_model): * Introduced to look for correct reference in expression like print @BC107 [is] * and find out whether a model or a device parameter is referenced and properly * call the spif_getparam_special (ckt, name, param, ind, do_model) function in * vector.c - A. Roldan (espice). */ static int finddev_special( CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr, int *device_or_model) { *devptr = ft_sim->findInstance (ckt, name); if (*devptr) { *device_or_model = 0; return (*devptr)->GENmodPtr->GENmodType; } *modptr = ft_sim->findModel (ckt, name); if (*modptr) { *device_or_model = 1; return (*modptr)->GENmodType; } *device_or_model = 2; return (-1); } /* Get a parameter value from the circuit. If name is left unspecified, * we want a circuit parameter. Now works both for devices and models. * A.Roldan (espice) */ struct variable * spif_getparam_special(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) { struct variable *vv = NULL, *tv; IFvalue *pv; IFparm *opt; int typecode, i, modelo_dispositivo; GENinstance *dev = NULL; GENmodel *mod = NULL; IFdevice *device; NG_IGNORE(do_model); /* fprintf(cp_err, "Calling if_getparam(%s, %s)\n", *name, param); */ if (!param || (param && eq(param, "all"))) { INPretrieve(name, ft_curckt->ci_symtab); typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return (NULL); } device = ft_sim->devices[typecode]; if (!modelo_dispositivo) { /* It is a device */ for (i = 0; i < *(device->numInstanceParms); i++) { opt = &device->instanceParms[i]; if (opt->dataType & IF_REDUNDANT || !opt->description) continue; if (!(opt->dataType & IF_ASK)) continue; pv = doask(ckt, typecode, dev, mod, opt, ind); if (pv) { tv = parmtovar(pv, opt); /* With the following we pack the name and the acronym of the parameter */ { char auxiliar[70], *aux_pointer; sprintf(auxiliar, "%s [%s]", tv->va_name, device->instanceParms[i].keyword); aux_pointer = tv->va_name; free(aux_pointer); tv->va_name = copy(auxiliar); } if (vv) tv->va_next = vv; vv = tv; } else { fprintf(cp_err, "Internal Error: no parameter '%s' on device '%s'\n", device->instanceParms[i].keyword, device->name); } } return (vv); } else { /* Is it a model or a device ? */ /* It is a model */ for (i = 0; i < *(device->numModelParms); i++) { opt = &device->modelParms[i]; if (opt->dataType & IF_REDUNDANT || !opt->description) continue; /* We check that the parameter is interesting and therefore is * implemented in the corresponding function ModelAsk. Originally * the argument of "if" was: || (opt->dataType & IF_STRING)) continue; * so, a model parameter defined like OP("type", MOS_SGT_MOD_TYPE, * IF_STRING, N-channel or P-channel MOS") would not be printed. */ /* if (!(opt->dataType & IF_ASK) || (opt->dataType & IF_UNINTERESTING) || (opt->dataType & IF_STRING)) continue; */ if (!(opt->dataType & IF_ASK) || (opt->dataType & IF_UNINTERESTING)) continue; pv = doask(ckt, typecode, dev, mod, opt, ind); if (pv) { tv = parmtovar(pv, opt); /* Inside parmtovar: * 1. tv->va_name = copy(opt->description); * 2. Copy the type of variable of IFparm into a variable (thus parm-to-var) * vv->va_type = opt->dataType * The long description of the parameter: * IFparm MOS_SGTmPTable[] = { // model parameters // * OP("type", MOS_SGT_MOD_TYPE, IF_STRING, "N-channel or P-channel MOS") * goes into tv->va_name to put braces around the parameter of the model * tv->va_name += device->modelParms[i].keyword; */ { char auxiliar[70], *aux_pointer; sprintf(auxiliar, "%s [%s]", tv->va_name, device->modelParms[i].keyword); aux_pointer = tv->va_name; free(aux_pointer); tv->va_name = copy(auxiliar); /* strcpy(aux_pointer, auxiliar); */ } /* tv->va_string = device->modelParms[i].keyword; Put the name of the variable */ if (vv) tv->va_next = vv; vv = tv; } else { fprintf(cp_err, "Internal Error: no parameter '%s' on device '%s'\n", device->modelParms[i].keyword, device->name); } } return (vv); } } else if (param) { INPretrieve(name, ft_curckt->ci_symtab); typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return (NULL); } device = ft_sim->devices[typecode]; opt = parmlookup(device, &dev, param, modelo_dispositivo, 0); if (!opt) { fprintf(cp_err, "Error: no such parameter %s.\n", param); return (NULL); } pv = doask(ckt, typecode, dev, mod, opt, ind); if (pv) vv = parmtovar(pv, opt); return (vv); } else { return (if_getstat(ckt, *name)); } } /* Get a parameter value from the circuit. If name is left unspecified, * we want a circuit parameter. */ struct variable * spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) { struct variable *vv = NULL, *tv; IFvalue *pv; IFparm *opt; int typecode, i; GENinstance *dev = NULL; GENmodel *mod = NULL; IFdevice *device; /* fprintf(cp_err, "Calling if_getparam(%s, %s)\n", *name, param); */ if (param && eq(param, "all")) { /* MW. My "special routine here" */ INPretrieve(name, ft_curckt->ci_symtab); typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return (NULL); } device = ft_sim->devices[typecode]; for (i = 0; i < *(device->numInstanceParms); i++) { opt = &device->instanceParms[i]; if (opt->dataType & IF_REDUNDANT || !opt->description) continue; if (!(opt->dataType & IF_ASK)) continue; pv = doask(ckt, typecode, dev, mod, opt, ind); if (pv) { tv = parmtovar(pv, opt); if (vv) tv->va_next = vv; vv = tv; } else { fprintf(cp_err, "Internal Error: no parameter '%s' on device '%s'\n", device->instanceParms[i].keyword, device->name); } } return (vv); } else if (param) { /* MW. */ INPretrieve(name, ft_curckt->ci_symtab); typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return (NULL); } device = ft_sim->devices[typecode]; opt = parmlookup(device, &dev, param, do_model, 0); if (!opt) { fprintf(cp_err, "Error: no such parameter %s.\n", param); return (NULL); } pv = doask(ckt, typecode, dev, mod, opt, ind); if (pv) vv = parmtovar(pv, opt); return (vv); } else { return (if_getstat(ckt, *name)); } } /* 9/26/03 PJB : function to allow setting model of device */ void if_setparam_model(CKTcircuit *ckt, char **name, char *val) { GENinstance *dev = NULL; GENinstance *prevDev = NULL; GENmodel *curMod = NULL; GENmodel *newMod = NULL; INPmodel *inpmod = NULL; GENinstance *iter; GENmodel *mods, *prevMod; int typecode; char *modname; /* retrieve device name from symbol table */ INPretrieve(name, ft_curckt->ci_symtab); /* find the specified device */ typecode = finddev(ckt, *name, &dev, &curMod); if (typecode == -1) { fprintf(cp_err, "Error: no such device name %s\n", *name); return; } curMod = dev->GENmodPtr; modname = copy(dev->GENmodPtr->GENmodName); modname = strtok(modname, "."); /* want only have the parent model name */ /* retrieve the model from the global model table; also add the model to 'ckt' and indicate model is being used */ INPgetMod(ckt, modname, &inpmod, ft_curckt->ci_symtab); /* check if using model binning -- pass in line since need 'l' and 'w' */ if (inpmod == NULL) INPgetModBin(ckt, modname, &inpmod, ft_curckt->ci_symtab, val); tfree(modname); if (inpmod == NULL) { fprintf(cp_err, "Error: no model available for %s.\n", val); return; } newMod = inpmod->INPmodfast; /* see if new model name same as current model name */ if (newMod->GENmodName != curMod->GENmodName) printf("Notice: model has changed from %s to %s.\n", curMod->GENmodName, newMod->GENmodName); if (newMod->GENmodType != curMod->GENmodType) { fprintf(cp_err, "Error: new model %s must be same type as current model.\n", val); return; } /* fix current model linked list */ prevDev = NULL; for (iter = curMod->GENinstances; iter; iter = iter->GENnextInstance) { if (iter->GENname == dev->GENname) { /* see if at beginning of linked list */ if (prevDev == NULL) curMod->GENinstances = iter->GENnextInstance; else prevDev->GENnextInstance = iter->GENnextInstance; /* update model for device */ dev->GENmodPtr = newMod; dev->GENnextInstance = newMod->GENinstances; newMod->GENinstances = dev; break; } prevDev = iter; } /* see if any devices remaining that reference current model */ if (curMod->GENinstances == NULL) { prevMod = NULL; for (mods = ckt->CKThead[typecode]; mods; mods = mods->GENnextModel) { if (mods->GENmodName == curMod->GENmodName) { /* see if at beginning of linked list */ if (prevMod == NULL) ckt->CKThead[typecode] = mods->GENnextModel; else prevMod->GENnextModel = mods->GENnextModel; INPgetMod(ckt, mods->GENmodName, &inpmod, ft_curckt->ci_symtab); if (curMod != nghash_delete(ckt->MODnameHash, curMod->GENmodName)) fprintf(stderr, "ERROR, ouch nasal daemons ...\n"); FREE(mods); inpmod->INPmodfast = NULL; break; } prevMod = mods; } } } void if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_model) { IFparm *opt; IFdevice *device; GENmodel *mod = NULL; GENinstance *dev = NULL; int typecode; /* PN */ INPretrieve(name, ft_curckt->ci_symtab); typecode = finddev(ckt, *name, &dev, &mod); if (typecode == -1) { fprintf(cp_err, "Error: no such device or model name %s\n", *name); return; } device = ft_sim->devices[typecode]; opt = parmlookup(device, &dev, param, do_model, 1); if (!opt) { if (param) fprintf(cp_err, "Error: no such parameter %s.\n", param); else fprintf(cp_err, "Error: no default parameter.\n"); return; } if (do_model && !mod) { mod = dev->GENmodPtr; dev = NULL; } doset(ckt, typecode, dev, mod, opt, val); /* Call to CKTtemp(ckt) will be invoked here only by 'altermod' commands, to set internal model parameters pParam of each instance for immediate use, otherwise e.g. model->BSIM3vth0 will be set, but not pParam of any BSIM3 instance. Call only if CKTtime > 0 to avoid conflict with previous 'reset' command. May contain side effects because called from many places. h_vogt 110101 */ if (do_model && (ckt->CKTtime > 0)) { int error = 0; error = CKTtemp(ckt); if (error) fprintf(stderr, "Error during changing a device model parameter!\n"); if (error) controlled_exit(1); } } static struct variable * parmtovar(IFvalue *pv, IFparm *opt) { struct variable *vv = alloc(struct variable); struct variable *nv; int i = 0; switch (opt->dataType & IF_VARTYPES) { case IF_INTEGER: vv->va_type = CP_NUM; vv->va_num = pv->iValue; break; case IF_REAL: case IF_COMPLEX: vv->va_type = CP_REAL; vv->va_real = pv->rValue; break; case IF_STRING: vv->va_type = CP_STRING; vv->va_string = pv->sValue; break; case IF_FLAG: vv->va_type = CP_BOOL; vv->va_bool = pv->iValue ? TRUE : FALSE; break; case IF_REALVEC: vv->va_type = CP_LIST; for (i = 0; i < pv->v.numValue; i++) { nv = alloc(struct variable); nv->va_next = vv->va_vlist; vv->va_vlist = nv; nv->va_type = CP_REAL; /* Change this so that the values are printed in order and * not in inverted order as happens in the conversion process. * Originally was nv->va_real = pv->v.vec.rVec[i]; */ nv->va_real = pv->v.vec.rVec[pv->v.numValue-i-1]; } /* It is a linked list where the first node is a variable * pointing to the different values of the variables. * * To access the values of the real variable vector must be * vv->va_V.vV_real = valor node ppal that is of no use. * * In the case of Vin_sin 1 0 sin (0 2 2000) * and of print @vin_sin[sin] * * vv->va_V.vV_list->va_V.vV_real = 2000 * vv->va_V.vV_list->va_next->va_V.vV_real = 2 * vv->va_V.vV_list->va_next->va_next->va_V.vV_real = 0 * So the list is starting from behind, but no problem * This works fine */ break; default: fprintf(cp_err, "parmtovar: Internal Error: bad PARM type %d.\n", opt->dataType); return (NULL); } /* It's not clear whether we want the keyword or the desc here... */ vv->va_name = copy(opt->description); vv->va_next = NULL; return (vv); } /* Extract the parameter (IFparm structure) from the device or device's model. * If do_mode is TRUE then look in the device's parameters * If do_mode is FALSE then look in the device model's parameters * If inout equals 1 then look only for parameters with the IF_SET type flag * if inout equals 0 then look only for parameters with the IF_ASK type flag */ static IFparm * parmlookup(IFdevice *dev, GENinstance **inptr, char *param, int do_model, int inout) { int i; NG_IGNORE(inptr); /* First try the device questions... */ if (!do_model && dev->numInstanceParms) { for (i = 0; i < *(dev->numInstanceParms); i++) { if (!param && (dev->instanceParms[i].dataType & IF_PRINCIPAL)) return (&dev->instanceParms[i]); else if (!param) continue; else if ((((dev->instanceParms[i].dataType & IF_SET) && inout == 1) || ((dev->instanceParms[i].dataType & IF_ASK) && inout == 0)) && cieq(dev->instanceParms[i].keyword, param)) { if (dev->instanceParms[i].dataType & IF_REDUNDANT) i -= 1; return (&dev->instanceParms[i]); } } return NULL; } if (dev->numModelParms) for (i = 0; i < *(dev->numModelParms); i++) if ((((dev->modelParms[i].dataType & IF_SET) && inout == 1) || ((dev->modelParms[i].dataType & IF_ASK) && inout == 0)) && eq(dev->modelParms[i].keyword, param)) { if (dev->modelParms[i].dataType & IF_REDUNDANT) i -= 1; return (&dev->modelParms[i]); } return (NULL); } /* Perform the CKTask call. We have both 'fast' and 'modfast', so the other * parameters aren't necessary. */ static IFvalue * doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *opt, int ind) { static IFvalue pv; int err; NG_IGNORE(typecode); pv.iValue = ind; /* Sometimes this will be junk and ignored... */ /* fprintf(cp_err, "Calling doask(%d, %x, %x, %x)\n", typecode, dev, mod, opt); */ if (dev) err = ft_sim->askInstanceQuest (ckt, dev, opt->id, &pv, NULL); else err = ft_sim->askModelQuest (ckt, mod, opt->id, &pv, NULL); if (err != OK) { ft_sperror(err, "if_getparam"); return (NULL); } return (&pv); } /* Perform the CKTset call. We have both 'fast' and 'modfast', so the other * parameters aren't necessary. */ static int doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *opt, struct dvec *val) { IFvalue nval; int err; int n; int *iptr; double *dptr; int i; NG_IGNORE(typecode); /* Count items */ if (opt->dataType & IF_VECTOR) { n = nval.v.numValue = val->v_length; dptr = val->v_realdata; /* XXXX compdata!!! */ switch (opt->dataType & (IF_VARTYPES & ~IF_VECTOR)) { case IF_FLAG: case IF_INTEGER: iptr = nval.v.vec.iVec = NEWN(int, n); for (i = 0; i < n; i++) *iptr++ = (int)floor(*dptr++ + 0.5); break; case IF_REAL: nval.v.vec.rVec = val->v_realdata; break; default: fprintf(cp_err, "Can't assign value to \"%s\" (unsupported vector type)\n", opt->keyword); return E_UNSUPP; } } else { switch (opt->dataType & IF_VARTYPES) { case IF_FLAG: case IF_INTEGER: nval.iValue = (int)floor(*val->v_realdata + 0.5); break; case IF_REAL: /*kensmith don't blow up with NULL dereference*/ if (!val->v_realdata) { fprintf(cp_err, "Unable to determine the value\n"); return E_UNSUPP; } nval.rValue = *val->v_realdata; break; default: fprintf(cp_err, "Can't assign value to \"%s\" (unsupported type)\n", opt->keyword); return E_UNSUPP; } } /* fprintf(cp_err, "Calling doask(%d, %x, %x, %x)\n", typecode, dev, mod, opt); */ if (dev) err = ft_sim->setInstanceParm (ckt, dev, opt->id, &nval, NULL); else err = ft_sim->setModelParm (ckt, mod, opt->id, &nval, NULL); return err; } /* Get pointers to a device, its model, and its type number given the name. If * there is no such device, try to find a model with that name. */ static int finddev(CKTcircuit *ckt, char *name, GENinstance **devptr, GENmodel **modptr) { *devptr = ft_sim->findInstance (ckt, name); if (*devptr) return (*devptr)->GENmodPtr->GENmodType; *modptr = ft_sim->findModel (ckt, name); if (*modptr) return (*modptr)->GENmodType; return (-1); } /* get an analysis parameter by name instead of id */ int if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm) { IFparm *if_parm = ft_find_analysis_parm(which, name); if (!if_parm) return (E_BADPARM); return (ft_sim->askAnalysisQuest (ckt, anal, if_parm->id, parm, NULL)); } /* Get the parameters tstart, tstop, and tstep from the CKT struct. */ /* BLOW THIS AWAY TOO */ bool if_tranparams(struct circ *ci, double *start, double *stop, double *step) { IFvalue tmp; int err; int which = -1; JOB *anal; IFuid tranUid; if (!ci->ci_curTask) return (FALSE); which = ft_find_analysis("TRAN"); if (which == -1) return (FALSE); err = IFnewUid(ci->ci_ckt, &tranUid, NULL, "Transient Analysis", UID_ANALYSIS, NULL); if (err != OK) return (FALSE); err = ft_sim->findAnalysis (ci->ci_ckt, &which, &anal, tranUid, ci->ci_curTask, NULL); if (err != OK) return (FALSE); err = if_analQbyName(ci->ci_ckt, which, anal, "tstart", &tmp); if (err != OK) return (FALSE); *start = tmp.rValue; err = if_analQbyName(ci->ci_ckt, which, anal, "tstop", &tmp); if (err != OK) return (FALSE); *stop = tmp.rValue; err = if_analQbyName(ci->ci_ckt, which, anal, "tstep", &tmp); if (err != OK) return (FALSE); *step = tmp.rValue; return (TRUE); } /* Get the statistic called 'name'. If this is NULL get all statistics * available. */ struct variable * if_getstat(CKTcircuit *ckt, char *name) { int options_idx, i; IFanalysis *options; IFvalue parm; IFparm *if_parm; options_idx = ft_find_analysis("options"); if (options_idx == -1) { fprintf(cp_err, "Warning: statistics unsupported\n"); return (NULL); } options = ft_sim->analyses[options_idx]; if (name) { if_parm = ft_find_analysis_parm(options_idx, name); if (!if_parm) return (NULL); if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions), if_parm->id, &parm, NULL) == -1) { fprintf(cp_err, "if_getstat: Internal Error: can't get %s\n", name); return (NULL); } return (parmtovar(&parm, if_parm)); } else { struct variable *vars = NULL, **v = &vars; for (i = 0; i < options->numParms; i++) { if_parm = &(options->analysisParms[i]); if (!(if_parm->dataType & IF_ASK)) continue; if (ft_sim->askAnalysisQuest (ckt, &(ft_curckt->ci_curTask->taskOptions), if_parm->id, &parm, NULL) == -1) { fprintf(cp_err, "if_getstat: Internal Error: can't get %s\n", name); return (NULL); } *v = parmtovar(&parm, if_parm); v = &((*v)->va_next); } return (vars); } } /* Some small updates to make it work, h_vogt, Feb. 2012 Still very experimental ! It is now possible to save a state during transient simulation, reload it later into a new ngspice run and resume simulation. XSPICE code models probably will not do. LTRA transmission line will not do. Many others are not tested. */ #include "ngspice/cktdefs.h" #include "ngspice/trandefs.h" /* arg0: circuit file, arg1: data file */ void com_snload(wordlist *wl) { int error = 0; FILE *file; int tmpI, i, size; CKTcircuit *my_ckt, *ckt; /* Pseudo code: source(file_name); This should setup all the device structs, voltage nodes, etc. call cktsetup; This is needed to setup vector mamory allocation for vectors and branch nodes load_binary_data(info); Overwrite the allocated numbers, rhs etc, with saved data */ if (ft_curckt && !strstr(ft_curckt->ci_name, "script")) { /* Circuit, not a script */ fprintf(cp_err, "Error: there is already a circuit loaded.\n"); return; } /* source the circuit */ inp_source(wl->wl_word); if (!ft_curckt) return; /* allocate all the vectors, with luck! */ if (!error) error = CKTsetup(ft_curckt->ci_ckt); if (!error) error = CKTtemp(ft_curckt->ci_ckt); if (error) { fprintf(cp_err, "Some error in the CKT setup fncts!\n"); return; } /* so it resumes ... */ ft_curckt->ci_inprogress = TRUE; /* now load the binary file */ ckt = ft_curckt->ci_ckt; file = fopen(wl->wl_next->wl_word, "rb"); if (!file) { fprintf(cp_err, "Error: Couldn't open \"%s\" for reading\n", wl->wl_next->wl_word); return; } fread(&tmpI, sizeof(int), 1, file); if (tmpI != sizeof(CKTcircuit)) { fprintf(cp_err, "loaded num: %d, expected num: %ld\n", tmpI, (long)sizeof(CKTcircuit)); fprintf(cp_err, "Error: snapshot saved with different version of spice\n"); fclose(file); return; } my_ckt = TMALLOC(CKTcircuit, 1); fread(my_ckt, sizeof(CKTcircuit), 1, file); #define _t(name) ckt->name = my_ckt->name #define _ta(name, size) \ do { int __i; for (__i = 0; __i < size; __i++) _t(name[__i]); } while(0) _t(CKTtime); _t(CKTdelta); _ta(CKTdeltaOld, 7); _t(CKTtemp); _t(CKTnomTemp); _t(CKTvt); _ta(CKTag, 7); _t(CKTorder); _t(CKTmaxOrder); _t(CKTintegrateMethod); _t(CKTniState); _t(CKTmaxEqNum); _t(CKTcurrentAnalysis); _t(CKTnumStates); _t(CKTmode); _t(CKTbypass); _t(CKTdcMaxIter); _t(CKTdcTrcvMaxIter); _t(CKTtranMaxIter); _t(CKTbreakSize); _t(CKTbreak); _t(CKTsaveDelta); _t(CKTminBreak); _t(CKTabstol); _t(CKTpivotAbsTol); _t(CKTpivotRelTol); _t(CKTreltol); _t(CKTchgtol); _t(CKTvoltTol); _t(CKTgmin); _t(CKTgshunt); _t(CKTdelmin); _t(CKTtrtol); _t(CKTfinalTime); _t(CKTstep); _t(CKTmaxStep); _t(CKTinitTime); _t(CKTomega); _t(CKTsrcFact); _t(CKTdiagGmin); _t(CKTnumSrcSteps); _t(CKTnumGminSteps); _t(CKTgminFactor); _t(CKTnoncon); _t(CKTdefaultMosM); _t(CKTdefaultMosL); _t(CKTdefaultMosW); _t(CKTdefaultMosAD); _t(CKTdefaultMosAS); _t(CKThadNodeset); _t(CKTfixLimit); _t(CKTnoOpIter); _t(CKTisSetup); #ifdef XSPICE _t(CKTadevFlag); #endif _t(CKTtimeListSize); _t(CKTtimeIndex); _t(CKTsizeIncr); _t(CKTtryToCompact); _t(CKTbadMos3); _t(CKTkeepOpInfo); _t(CKTcopyNodesets); _t(CKTnodeDamping); _t(CKTabsDv); _t(CKTrelDv); _t(CKTtroubleNode); #undef _foo #define _foo(name, type, _size) \ do { \ int __i; \ fread(&__i, sizeof(int), 1, file); \ if (__i) { \ if (name) \ tfree(name); \ name = (type *)tmalloc((size_t) __i); \ fread(name, 1, (size_t) __i, file); \ } else { \ fprintf(cp_err, "size for vector " #name " is 0\n"); \ } \ if ((_size) != -1 && __i != (_size) * (int)sizeof(type)) { \ fprintf(cp_err, "expected %ld, but got %d for "#name"\n", (_size)*(long)sizeof(type), __i); \ } \ } while(0) for (i = 0; i <= ckt->CKTmaxOrder+1; i++) _foo(ckt->CKTstates[i], double, ckt->CKTnumStates); size = SMPmatSize(ckt->CKTmatrix) + 1; _foo(ckt->CKTrhs, double, size); _foo(ckt->CKTrhsOld, double, size); _foo(ckt->CKTrhsSpare, double, size); _foo(ckt->CKTirhs, double, size); _foo(ckt->CKTirhsOld, double, size); _foo(ckt->CKTirhsSpare, double, size); // _foo(ckt->CKTrhsOp, double, size); // _foo(ckt->CKTsenRhs, double, size); // _foo(ckt->CKTseniRhs, double, size); // _foo(ckt->CKTtimePoints, double, -1); // _foo(ckt->CKTdeltaList, double, -1); _foo(ckt->CKTbreaks, double, ckt->CKTbreakSize); { /* avoid invalid lvalue assignment errors in the macro _foo() */ TSKtask *lname = NULL; _foo(lname, TSKtask, 1); ft_curckt->ci_curTask = lname; } /* To stop the Free */ ft_curckt->ci_curTask->TSKname = NULL; ft_curckt->ci_curTask->jobs = NULL; _foo(ft_curckt->ci_curTask->TSKname, char, -1); { TRANan *lname = NULL; _foo(lname, TRANan, -1); ft_curckt->ci_curTask->jobs = (JOB *)lname; } ft_curckt->ci_curTask->jobs->JOBname = NULL; _foo(ft_curckt->ci_curTask->jobs->JOBname, char, -1); ft_curckt->ci_curTask->jobs->JOBnextJob = NULL; ckt->CKTcurJob = ft_curckt->ci_curTask->jobs; ((TRANan *)ft_curckt->ci_curTask->jobs)->TRANplot = NULL; _foo(ckt->CKTstat, STATistics, 1); ckt->CKTstat->STATdevNum = NULL; _foo(ckt->CKTstat->STATdevNum, STATdevList, -1); #ifdef XSPICE _foo(ckt->evt, Evt_Ckt_Data_t, 1); _foo(ckt->enh, Enh_Ckt_Data_t, 1); g_mif_info.breakpoint.current = ckt->enh->breakpoint.current; g_mif_info.breakpoint.last = ckt->enh->breakpoint.last; #endif tfree(my_ckt); fclose(file); /* Finally to resume the plot in some fashion */ /* a worked out version of this should be enough */ { IFuid *nameList; int numNames; IFuid timeUid; error = CKTnames(ckt, &numNames, &nameList); if (error) { fprintf(cp_err, "error in CKTnames\n"); return; } SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, timeUid, IF_REAL, numNames, nameList, IF_REAL, &(((TRANan*)ckt->CKTcurJob)->TRANplot)); if (error) { fprintf(cp_err, "error in CKTnames\n"); return; } } } void com_snsave(wordlist *wl) { FILE *file; int i, size; CKTcircuit *ckt; TSKtask *task; if (!ft_curckt) { fprintf(cp_err, "Error: there is no circuit loaded.\n"); return; } else if (!ft_curckt->ci_ckt) { /* Set noparse? */ fprintf(cp_err, "Error: circuit not parsed.\n"); return; } /* save the data */ ckt = ft_curckt->ci_ckt; #ifdef XSPICE if (ckt->CKTadevFlag == 1) { fprintf(cp_err, "Warning: snsave not implemented for XSPICE A devices.\n"); fprintf(cp_err, " Command 'snsave' will be ingnored!\n"); return; } #endif task = ft_curckt->ci_curTask; if (task->jobs->JOBtype != 4) { fprintf(cp_err, "Only saving of tran analysis is implemented\n"); return; } file = fopen(wl->wl_word, "wb"); if (!file) { fprintf(cp_err, "Error: Couldn't open \"%s\" for writing\n", wl->wl_word); return; } #undef _foo #define _foo(name, type, num) \ do { \ int __i; \ if (name) { \ __i = (num) * (int)sizeof(type); fwrite(&__i, sizeof(int), 1, file); \ if ((num)) \ fwrite(name, sizeof(type), (size_t)(num), file); \ } else { \ __i = 0; \ fprintf(cp_err, #name " is NULL, zero written\n"); \ fwrite(&__i, sizeof(int), 1, file); \ } \ } while(0) _foo(ckt, CKTcircuit, 1); /* To save list double *(CKTstates[8]); double *CKTrhs; double *CKTrhsOld; double *CKTrhsSpare; double *CKTirhs; double *CKTirhsOld; double *CKTirhsSpare; double *CKTrhsOp; double *CKTsenRhs; double *CKTseniRhs; double *CKTtimePoints; list of all accepted timepoints in the current transient simulation double *CKTdeltaList; list of all timesteps in the current transient simulation */ for (i = 0; i <= ckt->CKTmaxOrder+1; i++) _foo(ckt->CKTstates[i], double, ckt->CKTnumStates); size = SMPmatSize(ckt->CKTmatrix) + 1; _foo(ckt->CKTrhs, double, size); _foo(ckt->CKTrhsOld, double, size); _foo(ckt->CKTrhsSpare, double, size); _foo(ckt->CKTirhs, double, size); _foo(ckt->CKTirhsOld, double, size); _foo(ckt->CKTirhsSpare, double, size); // _foo(ckt->CKTrhsOp, double, size); // _foo(ckt->CKTsenRhs, double, size); // _foo(ckt->CKTseniRhs, double, size); // _foo(ckt->CKTtimePoints, double, ckt->CKTtimeListSize); // _foo(ckt->CKTdeltaList, double, ckt->CKTtimeListSize); /* need to save the breakpoints, or something */ _foo(ckt->CKTbreaks, double, ckt->CKTbreakSize); /* now save the TSK struct, ft_curckt->ci_curTask*/ _foo(task, TSKtask, 1); _foo(task->TSKname, char, ((int)strlen(task->TSKname)+1)); /* now save the JOB struct task->jobs */ /* lol, only allow one job, tough! */ /* Note that JOB is a base class, need to save actual type!! */ _foo(task->jobs, TRANan, 1); _foo(task->jobs->JOBname, char, ((int)strlen(task->jobs->JOBname)+1)); /* Finally the stats */ _foo(ckt->CKTstat, STATistics, 1); _foo(ckt->CKTstat->STATdevNum, STATdevList, 1); #ifdef XSPICE /* FIXME struct ckt->evt->data and others are not stored thus snsave, snload not compatible with XSPICE code models*/ _foo(ckt->evt, Evt_Ckt_Data_t, 1); _foo(ckt->enh, Enh_Ckt_Data_t, 1); #endif fclose(file); fprintf(stdout, "Snapshot saved to %s.\n", wl->wl_word); } int ft_find_analysis(char *name) { int j; for (j = 0; j < ft_sim->numAnalyses; j++) if (strcmp(ft_sim->analyses[j]->name, name) == 0) return j; return -1; } IFparm * ft_find_analysis_parm(int which, char *name) { int i; for (i = 0; i < ft_sim->analyses[which]->numParms; i++) if (!strcmp(ft_sim->analyses[which]->analysisParms[i].keyword, name)) return &(ft_sim->analyses[which]->analysisParms[i]); return NULL; } ngspice-26/src/frontend/outitf.h0000644000265600020320000000425412264261473016327 0ustar andreasadmin/************* * Header file for outitf.c * 1999 E. Rouat ************/ #ifndef ngspice_OUTITF_H #define ngspice_OUTITF_H #include "ngspice/typedefs.h" typedef struct dataDesc { char *name; /* The name of the vector. */ int type; /* The type. */ GRIDTYPE gtype; /* default plot scale */ bool regular; /* Is this given to us? */ int outIndex; /* If regular then the index. */ char *specName; /* The device name if special. */ char *specParamName; /* The parameter name if special. */ int specIndex; /* For sensitivity, if special. */ int specType; GENinstance *specFast; int refIndex; /* The index of our ref vector. */ struct dvec *vec; } dataDesc; struct runDesc { void *analysis; CKTcircuit *circuit; char *name; char *type; int numData; int refIndex; dataDesc *data; bool writeOut; bool windowed; bool binary; struct plot *runPlot; FILE *fp; long pointPos; /* where to write pointCount */ int pointCount; int isComplex; int windowCount; }; int OUTpBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, runDesc **plotPtr); int OUTwBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, runDesc **plotPtr); int OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr); int OUTwReference(void *plotPtr, IFvalue *valuePtr, void **refPtr); int OUTwData(runDesc *plotPtr, int dataIndex, IFvalue *valuePtr, void *refPtr); int OUTwEnd(runDesc *plotPtr); int OUTendPlot(runDesc *plotPtr); int OUTbeginDomain(runDesc *plotPtr, IFuid refName, int refType, IFvalue *outerRefValue); int OUTendDomain(runDesc *plotPtr); int OUTattributes(runDesc *plotPtr, IFuid varName, int param, IFvalue *value); int OUTstopnow(void); void OUTerror(int flags, char *format, IFuid *names); #endif ngspice-26/src/frontend/breakp.c0000644000265600020320000003652112264261473016256 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Code to deal with breakpoints and tracing. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/ftedebug.h" #include "breakp.h" #include "breakp2.h" #include "runcoms2.h" #include "completion.h" static bool satisfied(struct dbcomm *d, struct plot *plot); static void printcond(struct dbcomm *d, FILE *fp); static int howmanysteps = 0; static int steps = 0; /* Set a breakpoint. Possible commands are: * stop after n * stop when var cond val * * If more than one is given on a command line, then this is a conjunction. */ void com_stop(wordlist *wl) { struct dbcomm *thisone = NULL; struct dbcomm *d = NULL; char *s, buf[64]; int i; double *val; while (wl) { if (thisone == NULL) { thisone = d = alloc(struct dbcomm); } else { d->db_also = alloc(struct dbcomm); d = d->db_also; } /* Figure out what the first condition is. */ d->db_analysis = NULL; if (eq(wl->wl_word, "after") && wl->wl_next) { d->db_type = DB_STOPAFTER; d->db_number = debugnumber; if (!wl->wl_next->wl_word) { i = 0; } else { #ifdef HAVE_CTYPE_H for (s = wl->wl_next->wl_word, i = 0; *s; s++) if (!isdigit(*s)) goto bad; else i = i * 10 + (*s - '0'); #else i = atoi(wl->wl_next->wl_word); /* etoi ??? */ #endif } d->db_iteration = i; wl = wl->wl_next->wl_next; } else if (eq(wl->wl_word, "when") && wl->wl_next) { /* cp_lexer(string) will not discriminate '=', so we have to do it here */ if (strstr(wl->wl_next->wl_word, "=") && (!(wl->wl_next->wl_next) || strstr(wl->wl_next->wl_next->wl_word, "when") || strstr(wl->wl_next->wl_next->wl_word, "after"))) { /* we have vec=val in a single word */ wordlist *wln; char **charr = TMALLOC(char*, 4); char *tok = copy(wl->wl_next->wl_word); char *tokeq = strstr(tok, "="); char *tokafter = copy(tokeq + 1); *tokeq = '\0'; charr[0] = tok; charr[1] = copy("eq"); charr[2] = tokafter; charr[3] = NULL; wln = wl_build(charr); wl_splice(wl->wl_next, wln); } /* continue with parsing the enhanced wordlist */ if (wl->wl_next->wl_next && wl->wl_next->wl_next->wl_next) { wl = wl->wl_next; d->db_number = debugnumber; d->db_type = DB_STOPWHEN; s = wl->wl_word; val = ft_numparse(&s, FALSE); if (val) d->db_value1 = *val; else d->db_nodename1 = copy(wl->wl_word); wl = wl->wl_next; /* Now get the condition */ if (eq(wl->wl_word, "eq") || eq(wl->wl_word, "=")) d->db_op = DBC_EQU; else if (eq(wl->wl_word, "ne") || eq(wl->wl_word, "<>")) d->db_op = DBC_NEQ; else if (eq(wl->wl_word, "gt") || eq(wl->wl_word, ">")) d->db_op = DBC_GT; else if (eq(wl->wl_word, "lt") || eq(wl->wl_word, "<")) d->db_op = DBC_LT; else if (eq(wl->wl_word, "ge") || eq(wl->wl_word, ">=")) d->db_op = DBC_GTE; else if (eq(wl->wl_word, "le") || eq(wl->wl_word, "<=")) d->db_op = DBC_LTE; else goto bad; wl = wl->wl_next; /* Now see about the second one. */ s = wl->wl_word; val = ft_numparse(&s, FALSE); if (val) d->db_value2 = *val; else d->db_nodename2 = copy(wl->wl_word); wl = wl->wl_next; } else { goto bad; } } } if (thisone) { if (dbs) { for (d = dbs; d->db_next; d = d->db_next) ; d->db_next = thisone; } else { ft_curckt->ci_dbs = dbs = thisone; } (void) sprintf(buf, "%d", debugnumber); cp_addkword(CT_DBNUMS, buf); debugnumber++; } return; bad: fprintf(cp_err, "Syntax error parsing breakpoint specification.\n"); } /* Trace a node (have wrd_point print it). Usage is "trace node ..."*/ void com_trce(wordlist *wl) { settrace(wl, VF_PRINT, 0); } /* Incrementally plot a value. This is just like trace. */ void com_iplot(wordlist *wl) { /* settrace(wl, VF_PLOT); */ struct dbcomm *d, *td, *currentdb = NULL; char *s; /* We use a modified ad-hoc algorithm here where db_also denotes vectors on the same command line and db_next denotes separate iplot commands. */ while (wl) { s = cp_unquote(wl->wl_word); d = alloc(struct dbcomm); d->db_analysis = NULL; d->db_number = debugnumber++; if (eq(s, "all")) { d->db_type = DB_IPLOTALL; } else { d->db_type = DB_IPLOT; d->db_nodename1 = copy(s); } tfree(s);/*DG: avoid memory leak */ d->db_also = currentdb; currentdb = d; wl = wl->wl_next; } if (dbs) { for (td = dbs; td->db_next; td = td->db_next) ; td->db_next = currentdb; } else { ft_curckt->ci_dbs = dbs = currentdb; } } /* Step a number of iterations. */ void com_step(wordlist *wl) { if (wl) steps = howmanysteps = atoi(wl->wl_word); else steps = howmanysteps = 1; com_resume(NULL); } /* Print out the currently active breakpoints and traces. If we are printing * to a file, assume that the file will be used for a later source and leave * off the event numbers (with UNIX, that is). -- I don't like this. */ #undef isatty #define isatty(xxxx) 1 void com_sttus(wordlist *wl) { struct dbcomm *d, *dc; NG_IGNORE(wl); for (d = dbs; d; d = d->db_next) { if (d->db_type == DB_TRACENODE) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d trace %s", d->db_number, d->db_nodename1); else fprintf(cp_out, "trace %s", d->db_nodename1); } else if (d->db_type == DB_IPLOT) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d iplot %s", d->db_number, d->db_nodename1); else fprintf(cp_out, "iplot %s", d->db_nodename1); for (dc = d->db_also; dc; dc = dc->db_also) fprintf(cp_out, " %s", dc->db_nodename1); } else if (d->db_type == DB_SAVE) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d save %s", d->db_number, d->db_nodename1); else fprintf(cp_out, "save %s", d->db_nodename1); } else if (d->db_type == DB_TRACEALL) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d trace all", d->db_number); else fprintf(cp_out, "trace all"); } else if (d->db_type == DB_IPLOTALL) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d iplot all", d->db_number); else fprintf(cp_out, "iplot all"); } else if (d->db_type == DB_SAVEALL) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d save all", d->db_number); else fprintf(cp_out, "save all"); } else if ((d->db_type == DB_STOPAFTER) || (d->db_type == DB_STOPWHEN)) { if (isatty(fileno(cp_out))) fprintf(cp_out, "%-4d stop", d->db_number); else fprintf(cp_out, "stop"); printcond(d, cp_out); } else if ((d->db_type == DB_DEADIPLOT)) { if (isatty(fileno(cp_out))) { fprintf(cp_out, "%-4d exiting iplot %s", d->db_number, d->db_nodename1); } else { fprintf(cp_out, "exiting iplot %s", d->db_nodename1); } for (dc = d->db_also; dc; dc = dc->db_also) fprintf(cp_out, " %s", dc->db_nodename1); } else { fprintf(cp_err, "com_sttus: Internal Error: bad db %d\n", d->db_type); } (void) putc('\n', cp_out); } } /* free the dbcomm structure which has been defined in * function settrace() in breakp2.c */ void dbfree(struct dbcomm *db) { struct dbcomm *dd, *dn; for (dd = db; dd; dd = dn) { dn = dd->db_next; tfree(dd->db_nodename1); tfree(dd->db_nodename2); if (dd->db_also) { dbfree(dd->db_also); dd->db_also = NULL; } tfree(dd); } } /* Delete breakpoints and traces. Usage is delete [number ...] */ void com_delete(wordlist *wl) { int i; char *s, buf[64]; struct dbcomm *d, *dt; if (wl && eq(wl->wl_word, "all")) { for (dt = dbs; dt; dt = d) { d = dt->db_next; dbfree(dt); } ft_curckt->ci_dbs = dbs = NULL; return; } else if (!wl) { if (!dbs) { fprintf(cp_err, "Error: no debugs in effect\n"); return; } } while (wl) { if (wl->wl_word) { #ifdef HAVE_CTYPE_H for (s = wl->wl_word, i = 0; *s; s++) if (!isdigit(*s)) { fprintf(cp_err, "Error: %s isn't a number.\n", wl->wl_word); goto bad; } else { i = i * 10 + (*s - '0'); } #else i = atoi(wl->wl_next->wl_word); /* etoi ??? */ #endif } else { i = 0; } for (d = dbs, dt = NULL; d; d = d->db_next) { if (d->db_number == i) { if (dt) dt->db_next = d->db_next; else ft_curckt->ci_dbs = dbs = d->db_next; dbfree(d); (void) sprintf(buf, "%d", i); cp_remkword(CT_DBNUMS, buf); break; } dt = d; } bad: wl = wl->wl_next; } } /* Writedata calls this routine to see if it should keep going. If it * returns TRUE, then the run should resume. */ bool ft_bpcheck(struct plot *runplot, int iteration) { struct dbcomm *d, *dt; if ((howmanysteps > 0) && (--howmanysteps == 0)) { if (steps > 1) fprintf(cp_err, "Stopped after %d steps.\n", steps); return (FALSE); } /* Check the debugs set. */ for (d = dbs; d; d = d->db_next) { for (dt = d; dt; dt = dt->db_also) { switch (dt->db_type) { case DB_TRACENODE: case DB_TRACEALL: case DB_IPLOT: case DB_DEADIPLOT: case DB_IPLOTALL: case DB_SAVE: case DB_SAVEALL: goto more; case DB_STOPAFTER: if (iteration == dt->db_iteration) break; else goto more; case DB_STOPWHEN: /* See if the condition is TRUE. */ if (satisfied(dt, runplot)) break; else goto more; default: fprintf(cp_err, "ft_bpcheck: Internal Error: bad db %d\n", dt->db_type); } } if (dt == NULL) { /* It made it */ fprintf(cp_err, "%-2d: condition met: stop ", d->db_number); printcond(d, cp_err); (void) putc('\n', cp_err); return (FALSE); } more: /* Just continue */ ; } return (TRUE); } /* This is called to determine whether a STOPWHEN is TRUE. */ static bool satisfied(struct dbcomm *d, struct plot *plot) { struct dvec *v1 = NULL, *v2 = NULL; double d1, d2; if (d->db_nodename1) { if ((v1 = vec_fromplot(d->db_nodename1, plot)) == NULL) { fprintf(cp_err, "Error: %s: no such node\n", d->db_nodename1); return (FALSE); } if (isreal(v1)) d1 = v1->v_realdata[v1->v_length - 1]; else d1 = realpart((v1->v_compdata[v1->v_length - 1])); } else { d1 = d->db_value1; } if (d->db_nodename2) { if ((v2 = vec_fromplot(d->db_nodename2, plot)) == NULL) { fprintf(cp_err, "Error: %s: no such node\n", d->db_nodename2); return (FALSE); } if (isreal(v2)) d2 = v2->v_realdata[v2->v_length - 1]; else d2 = realpart((v2->v_compdata[v2->v_length - 1])); } else { d2 = d->db_value2; } switch (d->db_op) { case DBC_EQU: return (AlmostEqualUlps(d1, d2, 3) ? TRUE : FALSE); // return ((d1 == d2) ? TRUE : FALSE); case DBC_NEQ: return ((d1 != d2) ? TRUE : FALSE); case DBC_GTE: return ((d1 >= d2) ? TRUE : FALSE); case DBC_LTE: return ((d1 <= d2) ? TRUE : FALSE); case DBC_GT: return ((d1 > d2) ? TRUE : FALSE); case DBC_LT: return ((d1 < d2) ? TRUE : FALSE); default: fprintf(cp_err, "satisfied: Internal Error: bad cond %d\n", d->db_op); return (FALSE); } } /* Writedata calls this before it starts a run, to set the proper flags * on the dvecs. If a change is made during a break, then the routine * wrd_chtrace is used from these routines. We have to be clever with save: * if there was no save given, then save everything. Unfortunately you * can't stop in the middle, do a save, and have the rest then discarded. */ void ft_trquery(void) { } static void printcond(struct dbcomm *d, FILE *fp) { struct dbcomm *dt; for (dt = d; dt; dt = dt->db_also) { if (dt->db_type == DB_STOPAFTER) { fprintf(fp, " after %d", dt->db_iteration); } else { if (dt->db_nodename1) fprintf(fp, " when %s", dt->db_nodename1); else fprintf(fp, " when %g", dt->db_value1); switch (dt->db_op) { case DBC_EQU: fputs(" =", fp); break; case DBC_NEQ: fputs(" <>", fp); break; case DBC_GT: fputs(" >", fp); break; case DBC_LT: fputs(" <", fp); break; case DBC_GTE: fputs(" >=", fp); break; case DBC_LTE: fputs(" <=", fp); break; default: fprintf(cp_err, "printcond: Internal Error: bad cond %d", dt->db_op); } if (dt->db_nodename2) fprintf(fp, " %s", dt->db_nodename2); else fprintf(fp, " %g", dt->db_value2); } } } ngspice-26/src/frontend/com_echo.h0000644000265600020320000000027112264261473016564 0ustar andreasadmin/************* * Header file for com_echo.c ************/ #ifndef ngspice_COM_ECHO_H #define ngspice_COM_ECHO_H #include "ngspice/wordlist.h" void com_echo(wordlist *wlist); #endif ngspice-26/src/frontend/com_shift.c0000644000265600020320000000202512264261473016755 0ustar andreasadmin/************* * com_shift.c ************/ #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "com_shift.h" #include "variable.h" #include "ngspice/cpextern.h" /* Shift a list variable, by default argv, one to the left (or more if * a second argument is given. */ void com_shift(wordlist *wl) { struct variable *v, *vv; char *n = "argv"; int num = 1; if (wl) { n = wl->wl_word; wl = wl->wl_next; } if (wl) num = scannum(wl->wl_word); for (v = variables; v; v = v->va_next) if (eq(v->va_name, n)) break; if (!v) { fprintf(cp_err, "Error: %s: no such variable\n", n); return; } if (v->va_type != CP_LIST) { fprintf(cp_err, "Error: %s not of type list\n", n); return; } for (vv = v->va_vlist; vv && (num > 0); num--) vv = vv->va_next; if (num) { fprintf(cp_err, "Error: variable %s not long enough\n", n); return; } v->va_vlist = vv; } ngspice-26/src/frontend/error.c0000644000265600020320000000336712264261473016145 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Print out in more detail what a floating point error was. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include #ifdef HAS_WINGUI void winmessage(char *new_msg); #elif defined SHARED_MODULE extern void shared_exit(int status); #endif /* global error message buffer */ char ErrorMessage[1024]; void controlled_exit(int status) { #ifdef HAS_WINGUI if (status) winmessage("Fatal error in NGSPICE"); exit(status); #elif defined SHARED_MODULE /* do not exit, if shared ngspice, but call back */ shared_exit(status); #else if (status) fprintf(stderr, "\nERROR: fatal error in ngspice, exit(%d)\n", status); exit(status); #endif } void fperror(char *mess, int code) { NG_IGNORE(code); fprintf(cp_err, "%s: floating point exception.\n", mess); } /* Print a spice error message. */ void ft_sperror(int code, char *mess) { fprintf(cp_err, "%s: %s\n", mess, if_errstring(code)); } void fatal(void) { cp_ccon(FALSE); #if defined(FTEDEBUG) && defined(SIGQUIT) (void) signal(SIGQUIT, SIG_DFL); (void) kill(getpid(), SIGQUIT); #endif #if defined SHARED_MODULE /* do not exit, if shared ngspice, but call back */ shared_exit(EXIT_BAD); #else exit(EXIT_BAD); #endif } /* These error messages are from internal consistency checks. */ void internalerror(char *message) { fprintf(stderr, "ERROR: (internal) %s\n", message); } /* These errors are from external routines like fopen. */ void externalerror(char *message) { fprintf(stderr, "ERROR: (external) %s\n", message); } ngspice-26/src/frontend/com_ghelp.c0000644000265600020320000000516212264261473016744 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include "variable.h" #include "ngspice/cpextern.h" #include "ngspice/cpextern.h" #include "ngspice/hlpdefs.h" #include "com_ghelp.h" #include "com_help.h" void com_ghelp(wordlist *wl) { char *npath; char *path = Help_Path; char buf[BSIZE_SP]; #ifndef X_DISPLAY_MISSING int i; #endif /* X_DISPLAY_MISSING 1 */ #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) || defined(X_DISPLAY_MISSING) printf("Internal help is no longer avaialable!\n"); printf("Please check for the actual ngspice manual at\n"); printf("http://ngspice.sourceforge.net/docs/ngspice-manual.pdf\n"); printf("or for help on spice3 at\n"); printf("http://newton.ex.ac.uk/teaching/CDHW/Electronics2/userguide/\n"); return; #else if (cp_getvar("helppath", CP_STRING, buf)) path = copy(buf); if (!path) { fprintf(cp_err, "Note: defaulting to old help.\n\n"); com_help(wl); return; } if ((npath = cp_tildexpand(path)) == NULL) { fprintf(cp_err, "Note: can't find help dir %s\n", path); fprintf(cp_err, "Defaulting to old help.\n\n"); com_help(wl); return; } #ifndef X_DISPLAY_MISSING /* 1 */ path = npath; if (cp_getvar("helpregfont", CP_STRING, buf)) hlp_regfontname = copy(buf); if (cp_getvar("helpboldfont", CP_STRING, buf)) hlp_boldfontname = copy(buf); if (cp_getvar("helpitalicfont", CP_STRING, buf)) hlp_italicfontname = copy(buf); if (cp_getvar("helptitlefont", CP_STRING, buf)) hlp_titlefontname = copy(buf); if (cp_getvar("helpbuttonfont", CP_STRING, buf)) hlp_buttonfontname = copy(buf); if (cp_getvar("helpinitxpos", CP_NUM, &i)) hlp_initxpos = i; if (cp_getvar("helpinitypos", CP_NUM, &i)) hlp_initypos = i; if (cp_getvar("helpbuttonstyle", CP_STRING, buf)) { if (cieq(buf, "left")) hlp_buttonstyle = BS_LEFT; else if (cieq(buf, "center")) hlp_buttonstyle = BS_CENTER; else if (cieq(buf, "unif")) hlp_buttonstyle = BS_UNIF; else fprintf(cp_err, "Warning: no such button style %s\n", buf); } if (cp_getvar("width", CP_NUM, &i)) hlp_width = i; if (cp_getvar("display", CP_STRING, buf)) hlp_displayname = copy(buf); else if (cp_getvar("device", CP_STRING, buf)) hlp_displayname = copy(buf); else hlp_displayname = NULL; hlp_main(path, wl); return; #else com_help(wl); #endif /* X_DISPLAY_MISSING 1 */ #endif } ngspice-26/src/frontend/init.c0000644000265600020320000000200312264261473015741 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* Initialize io, cp_chars[], variable "history". */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "init.h" #include "variable.h" char cp_chars[128]; /* used in fcn cp_lexer() from lexical.c */ static char *singlec = "<>;&"; void cp_init(void) /* called from ft_cpinit() in cpitf.c. Uses global variables: cp_chars[128] cp_maxhistlength (set to 10000 in com_history.c) cp_curin, cp_curout, cp_curerr (defined in streams.c) */ { char *s; bzero(cp_chars, 128); for (s = singlec; *s; s++) /* break word to right or left of characters <>;&*/ cp_chars[(int) *s] = (CPC_BRR | CPC_BRL); cp_vset("history", CP_NUM, &cp_maxhistlength); cp_curin = stdin; cp_curout = stdout; cp_curerr = stderr; /* io redirection in streams.c: cp_in set to cp_curin etc. */ cp_ioreset(); } ngspice-26/src/frontend/breakp2.h0000644000265600020320000000047112264261473016340 0ustar andreasadmin/************* * Header file for breakp2.c * 1999 E. Rouat ************/ #ifndef ngspice_BREAKP2_H #define ngspice_BREAKP2_H void com_save(wordlist *wl); void com_save2(wordlist *wl, char *name); void settrace(wordlist *wl, int what, char *name); extern struct dbcomm *dbs; extern int debugnumber; #endif ngspice-26/src/frontend/points.c0000644000265600020320000000474312264261473016327 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "points.h" /* Returns the minimum and maximum values of a dvec. Returns a pointer * to static data. If real is TRUE look at the real parts, otherwise * the imag parts. */ double * ft_minmax(struct dvec *v, bool real) { static double res[2]; register int i; double d; res[0] = HUGE; res[1] = - res[0]; for (i = 0; i < v->v_length; i++) { if (isreal(v)) d = v->v_realdata[i]; else if (real) d = realpart(v->v_compdata[i]); else d = imagpart(v->v_compdata[i]); if (d < res[0]) res[0] = d; if (d > res[1]) res[1] = d; } return (res); } /* Figure out where a point should go, given the limits of the plotting * area and the type of scale (log or linear). */ int ft_findpoint(double pt, double *lims, int maxp, int minp, bool islog) { double tl, th; if (pt < lims[0]) pt = lims[0]; if (pt > lims[1]) pt = lims[1]; if (islog) { tl = mylog10(lims[0]); th = mylog10(lims[1]); return (int)(((mylog10(pt) - tl) / (th - tl)) * (maxp - minp) + minp); } else { return (int)(((pt - lims[0]) / (lims[1] - lims[0])) * (maxp - minp) + minp); } } /* Will report the minimum and maximum in "reflection coefficient" space */ double * ft_SMITHminmax(struct dvec *v, bool yval) { static double res[2]; register int i; double d, d2; res[0] = HUGE; res[1] = - res[0]; for (i = 0; i < v->v_length; i++) { if (isreal(v)) SMITH_tfm(v->v_realdata[i], 0.0, &d, &d2); else SMITH_tfm(realpart(v->v_compdata[i]), imagpart(v->v_compdata[i]), &d, &d2); /* Are we are looking for min/max X or Y ralue */ if (yval) d = d2; if (d < res[0]) res[0] = d; if (d > res[1]) res[1] = d; } return (res); } int SMITH_tfm(double re, double im, double *x, double *y) { double dnom; dnom = (re + 1) * (re + 1) + im * im; *x = (re * re + im * im - 1) / dnom; *y = 2 * im / dnom; return 0; } ngspice-26/src/frontend/com_state.c0000644000265600020320000000144112264261473016761 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/ftedefs.h" #include "ngspice/inpdefs.h" #include "circuits.h" #include "com_state.h" #include "ngspice/cpextern.h" #include "plotting/plotting.h" void com_state(wordlist *wl) { NG_IGNORE(wl); if (!ft_curckt) { fprintf(cp_err, "Error: no circuit loaded.\n"); return; } fprintf(cp_out, "Current circuit: %s\n", ft_curckt->ci_name); if (!ft_curckt->ci_inprogress) { fprintf(cp_out, "No run in progress.\n"); return; } fprintf(cp_out, "Type of run: %s\n", plot_cur->pl_name); fprintf(cp_out, "Number of points so far: %d\n", plot_cur->pl_scale->v_length); fprintf(cp_out, "(That's all this command does so far)\n"); } ngspice-26/src/frontend/arg.c0000644000265600020320000000451412264261473015560 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Jeffrey M. Hsu **********/ /* This files contains the routines to evalute arguments to a command and prompt the user if necessary. */ #include "ngspice/ngspice.h" #include "ngspice/fteinput.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "arg.h" #include "variable.h" static void common(char *string, struct wordlist *wl, struct comm *command); /* returns a private copy of the string */ char * prompt(FILE *fp) { char buf[100]; char *p; size_t n; if (!fgets(buf, sizeof(buf), fp)) return NULL; n = strlen(buf) - 1; buf[n] = '\0'; /* fgets leaves the \n */ p = TMALLOC(char, n + 1); strcpy(p, buf); return p; } int countargs(wordlist *wl) { int number = 0; wordlist *w; for (w = wl; w; w = w->wl_next) number++; return (number); } wordlist * process(wordlist *wlist) { wlist = cp_variablesubst(wlist); wlist = cp_bquote(wlist); wlist = cp_doglob(wlist); return (wlist); } void arg_print(wordlist *wl, struct comm *command) { common("which variable", wl, command); } void arg_plot(wordlist *wl, struct comm *command) { common("which variable", wl, command); } void arg_load(wordlist *wl, struct comm *command) { /* just call com_load */ command->co_func(wl); } void arg_let(wordlist *wl, struct comm *command) { common("which vector", wl, command); } void arg_set(wordlist *wl, struct comm *command) { common("which variable", wl, command); } void arg_display(wordlist *wl, struct comm *command) { NG_IGNORE(wl); NG_IGNORE(command); /* just return; display does the right thing */ } /* a common prompt routine */ static void common(char *string, struct wordlist *wl, struct comm *command) { struct wordlist *w; char *buf; if (!countargs(wl)) { outmenuprompt(string); if ((buf = prompt(cp_in)) == NULL) /* prompt aborted */ return; /* don't execute command */ /* do something with the wordlist */ w = wl_cons(buf, NULL); w = process(w); /* O.K. now call fn */ command->co_func(w); } } void outmenuprompt(char *string) { fprintf(cp_out, "%s: ", string); fflush(cp_out); return; } ngspice-26/src/frontend/fourier.c0000644000265600020320000002622712264261473016467 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Code to do fourier transforms on data. Note that we do interpolation * to get a uniform grid. Note that if polydegree is 0 then no interpolation * is done. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "ngspice/sperror.h" #include "ngspice/const.h" #include "ngspice/sim.h" #include "fourier.h" #include "variable.h" static char *pnum(double num); static int CKTfour(int ndata, int numFreq, double *thd, double *Time, double *Value, double FundFreq, double *Freq, double *Mag, double *Phase, double *nMag, double *nPhase); #define DEF_FOURGRIDSIZE 200 /* CKTfour(ndata, numFreq, thd, Time, Value, FundFreq, Freq, Mag, Phase, nMag, nPhase) * len 10 ? inp inp inp out out out out out */ int fourier(wordlist *wl, struct plot *current_plot) { struct dvec *time, *vec; struct pnode *pn, *names; double *ff, fundfreq, *data = NULL; int nfreqs, fourgridsize, polydegree; double *freq, *mag, *phase, *nmag, *nphase; /* Outputs from CKTfour */ double thd, *timescale = NULL; char *s; int i, err, fw; char xbuf[20]; int shift; int rv = 1; char newvecname[32]; struct dvec *n; int newveccount = 1; static int callstof = 1; if (!current_plot) return 1; sprintf(xbuf, "%1.1e", 0.0); shift = (int) strlen(xbuf) - 7; if (!current_plot || !current_plot->pl_scale) { fprintf(cp_err, "Error: no vectors loaded.\n"); return 1; } if (!cp_getvar("nfreqs", CP_NUM, &nfreqs) || nfreqs < 1) nfreqs = 10; if (!cp_getvar("polydegree", CP_NUM, &polydegree) || polydegree < 0) polydegree = 1; if (!cp_getvar("fourgridsize", CP_NUM, &fourgridsize) || fourgridsize < 1) fourgridsize = DEF_FOURGRIDSIZE; time = current_plot->pl_scale; if (!isreal(time)) { fprintf(cp_err, "Error: fourier needs real time scale\n"); return 1; } s = wl->wl_word; if ((ff = ft_numparse(&s, FALSE)) == NULL || (*ff <= 0.0)) { fprintf(cp_err, "Error: bad fund freq %s\n", wl->wl_word); return 1; } fundfreq = *ff; freq = TMALLOC(double, nfreqs); mag = TMALLOC(double, nfreqs); phase = TMALLOC(double, nfreqs); nmag = TMALLOC(double, nfreqs); nphase = TMALLOC(double, nfreqs); wl = wl->wl_next; names = ft_getpnames(wl, TRUE); for (pn = names; pn; pn = pn->pn_next) { vec = ft_evaluate(pn); for (; vec; vec = vec->v_link2) { if (vec->v_length != time->v_length) { fprintf(cp_err, "Error: lengths don't match: %d, %d\n", vec->v_length, time->v_length); continue; } if (!isreal(vec)) { fprintf(cp_err, "Error: %s isn't real!\n", vec->v_name); continue; } if (polydegree) { double *dp, d; /* Build the grid... */ timescale = TMALLOC(double, fourgridsize); data = TMALLOC(double, fourgridsize); dp = ft_minmax(time, TRUE); /* Now get the last fund freq... */ d = 1 / fundfreq; /* The wavelength... */ if (dp[1] - dp[0] < d) { fprintf(cp_err, "Error: wavelength longer than time span\n"); goto done; } else if (dp[1] - dp[0] > d) { dp[0] = dp[1] - d; } d = (dp[1] - dp[0]) / fourgridsize; for (i = 0; i < fourgridsize; i++) timescale[i] = dp[0] + i * d; /* Now interpolate the data... */ if (!ft_interpolate(vec->v_realdata, data, time->v_realdata, vec->v_length, timescale, fourgridsize, polydegree)) { fprintf(cp_err, "Error: can't interpolate\n"); goto done; } } else { fourgridsize = vec->v_length; data = vec->v_realdata; timescale = time->v_realdata; } err = CKTfour(fourgridsize, nfreqs, &thd, timescale, data, fundfreq, freq, mag, phase, nmag, nphase); if (err != OK) { ft_sperror(err, "fourier"); goto done; } fprintf(cp_out, "Fourier analysis for %s:\n", vec->v_name); fprintf(cp_out, " No. Harmonics: %d, THD: %g %%, Gridsize: %d, Interpolation Degree: %d\n\n", nfreqs, thd, fourgridsize, polydegree); /* Each field will have width cp_numdgt + 6 (or 7 * with HP-UX) + 1 if there is a - sign. */ fw = ((cp_numdgt > 0) ? cp_numdgt : 6) + 5 + shift; fprintf(cp_out, "Harmonic %-*s %-*s %-*s %-*s %-*s\n", fw, "Frequency", fw, "Magnitude", fw, "Phase", fw, "Norm. Mag", fw, "Norm. Phase"); fprintf(cp_out, "-------- %-*s %-*s %-*s %-*s %-*s\n", fw, "---------", fw, "---------", fw, "-----", fw, "---------", fw, "-----------"); for (i = 0; i < nfreqs; i++) { char *pnumfr, *pnumma, *pnumph, *pnumnm, *pnumnp; pnumfr = pnum(freq[i]); pnumma = pnum(mag[i]); pnumph = pnum(phase[i]); pnumnm = pnum(nmag[i]); pnumnp = pnum(nphase[i]); fprintf(cp_out, " %-4d %-*s %-*s %-*s %-*s %-*s\n", i, fw, pnumfr, fw, pnumma, fw, pnumph, fw, pnumnm, fw, pnumnp); tfree(pnumfr); tfree(pnumma); tfree(pnumph); tfree(pnumnm); tfree(pnumnp); } fputs("\n", cp_out); /* generate name for new vector, using vec->name */ sprintf(newvecname, "fourier%d%d", callstof, newveccount); /* create and assign a new vector n */ /* with size 3 * nfreqs in current plot */ n = alloc(struct dvec); ZERO(n, struct dvec); n->v_name = copy(newvecname); n->v_type = SV_NOTYPE; n->v_flags = (VF_REAL | VF_PERMANENT); n->v_length = 3 * nfreqs; n->v_numdims = 2; n->v_dims[0] = 3; n->v_dims[1] = nfreqs; n->v_realdata = TMALLOC(double, n->v_length); vec_new(n); /* store data in vector: freq, mag, phase */ for (i = 0; i < nfreqs; i++) { n->v_realdata[i] = freq[i]; n->v_realdata[i + nfreqs] = mag[i]; n->v_realdata[i + 2 * nfreqs] = phase[i]; } newveccount++; if (polydegree) { tfree(timescale); tfree(data); } timescale = NULL; data = NULL; } } callstof++; rv = 0; done: free_pnode(names); tfree(freq); tfree(mag); tfree(phase); tfree(nmag); tfree(nphase); if (polydegree) { tfree(timescale); tfree(data); } return rv; } void com_fourier(wordlist *wl) { fourier(wl, plot_cur); } static char * pnum(double num) { char buf[BSIZE_SP]; int i = cp_numdgt; if (i < 1) i = 6; if (num < 0.0) sprintf(buf, "%.*g", i - 1, num); else sprintf(buf, "%.*g", i, num); return (copy(buf)); } /* CKTfour() - perform fourier analysis of an output vector. * * Due to the construction of the program which places all the output * data in the post-processor, the fourier analysis can not be done * directly. This function allows the post processor to hand back * vectors of time and data values to have the fourier analysis * performed on them. */ static int CKTfour(int ndata, /* number of entries in the Time and Value arrays */ int numFreq, /* number of harmonics to calculate */ double *thd, /* total harmonic distortion (percent) to be returned */ double *Time, /* times at which the voltage/current values were measured*/ double *Value, /* voltage or current vector whose transform is desired */ double FundFreq, /* the fundamental frequency of the analysis */ double *Freq, /* the frequency value of the various harmonics */ double *Mag, /* the Magnitude of the fourier transform */ double *Phase, /* the Phase of the fourier transform */ double *nMag, /* the normalized magnitude of the transform: nMag(fund)=1*/ double *nPhase) /* the normalized phase of the transform: Nphase(fund)=0 */ { /* Note: we can consider these as a set of arrays. The sizes are: * Time[ndata], Value[ndata], Freq[numFreq], Mag[numfreq], * Phase[numfreq], nMag[numfreq], nPhase[numfreq] * * The arrays must all be allocated by the caller. * The Time and Value array must be reasonably distributed over at * least one full period of the fundamental Frequency for the * fourier transform to be useful. The function will take the * last period of the frequency as data for the transform. * * We are assuming that the caller has provided exactly one period * of the fundamental frequency. */ int i; int j; double tmp; NG_IGNORE(Time); /* clear output/computation arrays */ for (i = 0; i < numFreq; i++) { Mag[i] = 0; Phase[i] = 0; } for (i = 0; i < ndata; i++) for (j = 0; j < numFreq; j++) { Mag[j] += Value[i] * sin(j*2.0*M_PI*i/((double)ndata)); Phase[j] += Value[i] * cos(j*2.0*M_PI*i/((double)ndata)); } Mag[0] = Phase[0]/ndata; Phase[0] = nMag[0] = nPhase[0] = Freq[0] = 0; *thd = 0; for (i = 1; i < numFreq; i++) { tmp = Mag[i] * 2.0 / ndata; Phase[i] *= 2.0 / ndata; Freq[i] = i * FundFreq; Mag[i] = sqrt(tmp*tmp + Phase[i]*Phase[i]); Phase[i] = atan2(Phase[i], tmp) * 180.0/M_PI; nMag[i] = Mag[i] / Mag[1]; nPhase[i] = Phase[i] - Phase[1]; if (i > 1) *thd += nMag[i] * nMag[i]; } *thd = 100*sqrt(*thd); return (OK); } ngspice-26/src/frontend/com_history.c0000644000265600020320000003422012264261473017343 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* Do history substitutions. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "com_history.h" #ifdef HAVE_GNUREADLINE /* Added GNU Readline Support -- Andrew Veliath */ #include #include #endif #ifdef HAVE_BSDEDITLINE /* SJB added edit line support 2005-05-05 */ #include #endif static wordlist *dohsubst(char *string); static wordlist *dohmod(char **string, wordlist *wl); static wordlist *hpattern(char *buf); static wordlist *hprefix(char *buf); static wordlist *getevent(int num); #if !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) static void freehist(int num); #endif static char *dohs(char *pat, char *str); struct histent *cp_lastone = NULL; int cp_maxhistlength = 10000; /* Chris Inbody */ char cp_hat = '^'; char cp_bang = '!'; bool cp_didhsubst; static struct histent *histlist = NULL; static int histlength = 0; /* First check for a ^ at the beginning of the line, and then search * each word for !. Following this can be any of string, number, * ?string, -number ; then there may be a word specifier, the same as * csh, and then the : modifiers. For the :s modifier, the syntax is * :sXoooXnnnX, where X is any character, and ooo and nnn are strings * not containing X. */ wordlist * cp_histsubst(wordlist *wlist) { wordlist *nwl, *w, *n; char buf[BSIZE_SP], *s, *b; /* Replace ^old^new with !:s^old^new. */ cp_didhsubst = FALSE; if (*wlist->wl_word == cp_hat) { (void) sprintf(buf, "%c%c:s%s", cp_bang, cp_bang, wlist->wl_word); tfree(wlist->wl_word); wlist->wl_word = copy(buf); } for (w = wlist; w; w = w->wl_next) { b = w->wl_word; for (s = b; *s; s++) if (*s == cp_bang) { cp_didhsubst = TRUE; n = dohsubst(s + 1); if (!n) { wlist->wl_word = NULL; return (wlist); } if (b < s) { (void) sprintf(buf, "%.*s%s", (int)(s-b), b, n->wl_word); tfree(n->wl_word); n->wl_word = copy(buf); } nwl = wl_splice(w, n); if (wlist == w) wlist = n; w = nwl; break; } } return (wlist); } /* Do a history substitution on one word. Figure out which event is * being referenced, then do word selections and modifications, and * then stick anything left over on the end of the last word. */ static wordlist * dohsubst(char *string) { wordlist *wl, *nwl; char buf[BSIZE_SP], *s, *r = NULL, *t; if (*string == cp_bang) { if (cp_lastone) { wl = cp_lastone->hi_wlist; string++; } else { fprintf(cp_err, "0: event not found.\n"); return (NULL); } } else { switch (*string) { case '-': wl = getevent(cp_event - scannum(++string)); if (!wl) return (NULL); while (isdigit(*string)) string++; break; case '?': (void) strcpy(buf, string + 1); if ((s = strchr(buf, '?')) != NULL) *s = '\0'; wl = hpattern(buf); if (!wl) return (NULL); if (s == NULL) /* No modifiers on this one. */ return (wl_copy(wl)); break; case '\0': /* Maybe this should be cp_event. */ wl = wl_cons(copy("!"), NULL); cp_didhsubst = FALSE; return (wl); default: if (isdigit(*string)) { wl = getevent(scannum(string)); if (!wl) return (NULL); while (isdigit(*string)) string++; } else { (void) strcpy(buf, string); for (s = ":^$*-%"; *s; s++) { t = strchr(buf, *s); if (t && ((t < r) || !r)) { r = t; string += r - buf; } } if (r) *r = '\0'; else while (*string) string++; if ((buf[0] == '\0') && cp_lastone) wl = cp_lastone->hi_wlist; else wl = hprefix(buf); if (!wl) return (NULL); } } } if (wl == NULL) { /* Shouldn't happen. */ fprintf(cp_err, "Event not found.\n"); return (NULL); } nwl = dohmod(&string, wl_copy(wl)); if (!nwl) return (NULL); if (*string) { for (wl = nwl; wl->wl_next; wl = wl->wl_next) ; (void) sprintf(buf, "%s%s", wl->wl_word, string); tfree(wl->wl_word); wl->wl_word = copy(buf); } return (nwl); } static wordlist * dohmod(char **string, wordlist *wl) { wordlist *w; char *s; char *r = NULL, *t; int numwords, eventlo, eventhi, i; bool globalsubst; anothermod: numwords = wl_length(wl); globalsubst = FALSE; eventlo = 0; eventhi = numwords - 1; /* Now we know what wordlist we want. Take care of modifiers now. */ r = NULL; for (s = ":^$*-%"; *s; s++) { t = strchr(*string, *s); if (t && ((t < r) || (r == NULL))) r = t; } if (!r) /* No more modifiers. */ return (wl); *string = r; if (**string == ':') (*string)++; switch (**string) { case '$': /* Last word. */ eventhi = eventlo = numwords - 1; break; case '*': /* Words 1 through $ */ if (numwords == 1) return (NULL); eventlo = 1; eventhi = numwords - 1; break; case '-': /* Words 0 through ... */ eventlo = 0; if (*(*string + 1)) eventhi = scannum(*string + 1); else eventhi = numwords - 1; if (eventhi > numwords - 1) eventhi = numwords - 1; break; case 'p': /* Print the command and don't execute it. * This doesn't work quite like csh. */ wl_print(wl, cp_out); (void) putc('\n', cp_out); return (NULL); case 's': /* Do a substitution. */ for (w = wl; w; w = w->wl_next) { s = dohs(*string + 1, w->wl_word); if (s) { tfree(w->wl_word); w->wl_word = s; if (globalsubst == FALSE) { while (**string) (*string)++; break; } } } /* In case globalsubst is TRUE... */ while (**string) (*string)++; break; default: if (!isdigit(**string)) { fprintf(cp_err, "Error: %s: bad modifier.\n", *string); return (NULL); } i = scannum(*string); if (i > eventhi) { fprintf(cp_err, "Error: bad event number %d\n", i); return (NULL); } eventhi = eventlo = i; while (isdigit(**string)) (*string)++; if (**string == '*') eventhi = numwords - 1; if (**string == '-') { if (!isdigit(*(*string + 1))) { eventhi = numwords - 1; } else { eventhi = scannum(++*string); while (isdigit(**string)) (*string)++; } } } /* Now change the word list accordingly and make another pass * if there is more of the substitute left. */ wl = wl_range(wl, eventlo, eventhi); numwords = wl_length(wl); if (**string && *++*string) goto anothermod; return (wl); } /* Look for an event with a pattern in it... */ static wordlist * hpattern(char *buf) { struct histent *hi; wordlist *wl; if (*buf == '\0') { fprintf(cp_err, "Bad pattern specification.\n"); return (NULL); } for (hi = cp_lastone; hi; hi = hi->hi_prev) for (wl = hi->hi_wlist; wl; wl = wl->wl_next) if (substring(buf, wl->wl_word)) return (hi->hi_wlist); fprintf(cp_err, "%s: event not found.\n", buf); return (NULL); } static wordlist * hprefix(char *buf) { struct histent *hi; if (*buf == '\0') { fprintf(cp_err, "Bad pattern specification.\n"); return (NULL); } for (hi = cp_lastone; hi; hi = hi->hi_prev) if (hi->hi_wlist && prefix(buf, hi->hi_wlist->wl_word)) return (hi->hi_wlist); fprintf(cp_err, "%s: event not found.\n", buf); return (NULL); } /* Add a wordlist to the history list. (Done after the first parse.) Note * that if event numbers are given in a random order that's how they'll * show up in the history list. */ void cp_addhistent(int event, wordlist *wlist) { /* MW. This test is not needed if everything works right if (cp_lastone && !cp_lastone->hi_wlist) fprintf(cp_err, "Internal error: bad history list\n"); */ if (cp_lastone == NULL) { /* MW. the begging - initialize histlength */ histlength = 1; cp_lastone = histlist = alloc(struct histent); cp_lastone->hi_prev = NULL; } else { cp_lastone->hi_next = alloc(struct histent); cp_lastone->hi_next->hi_prev = cp_lastone; cp_lastone = cp_lastone->hi_next; } cp_lastone->hi_next = NULL; cp_lastone->hi_event = event; cp_lastone->hi_wlist = wl_copy(wlist); #if !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) freehist(histlength - cp_maxhistlength); histlength++; #endif } /* Get a copy of the wordlist associated with an event. Error if out * of range. */ static wordlist * getevent(int num) { struct histent *hi; for (hi = histlist; hi; hi = hi->hi_next) if (hi->hi_event == num) break; if (hi == NULL) { fprintf(cp_err, "%d: event not found.\n", num); return (NULL); } return (wl_copy(hi->hi_wlist)); } /* Print out history between eventhi and eventlo. * This doesn't remember quoting, so 'hodedo' prints as hodedo. */ void cp_hprint(int eventhi, int eventlo, bool rev) { struct histent *hi; if (rev) { for (hi = histlist; hi->hi_next; hi = hi->hi_next) ; for (; hi; hi = hi->hi_prev) if ((hi->hi_event <= eventhi) && (hi->hi_event >= eventlo) && hi->hi_wlist) { fprintf(cp_out, "%d\t", hi->hi_event); wl_print(hi->hi_wlist, cp_out); (void) putc('\n', cp_out); } } else { for (hi = histlist; hi; hi = hi->hi_next) if ((hi->hi_event <= eventhi) && (hi->hi_event >= eventlo) && hi->hi_wlist) { fprintf(cp_out, "%d\t", hi->hi_event); wl_print(hi->hi_wlist, cp_out); (void) putc('\n', cp_out); } } } #if !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) /* This just gets rid of the first num entries on the history list, and * decrements histlength. */ static void freehist(int num) { struct histent *hi; if (num < 1) return; histlength -= num; hi = histlist; while (num-- && histlist->hi_next) histlist = histlist->hi_next; if (histlist->hi_prev) { histlist->hi_prev->hi_next = NULL; histlist->hi_prev = NULL; } else { fprintf(cp_err, "Internal error: history list mangled\n"); exit(0); /* Chris Inbody */ } while (hi->hi_next) { wl_free(hi->hi_wlist); hi = hi->hi_next; tfree(hi->hi_prev); } wl_free(hi->hi_wlist); tfree(hi); } #endif /* !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) */ /* Do a :s substitution. */ static char * dohs(char *pat, char *str) { char schar, *s, *p, buf[BSIZE_SP]; int i = 0, plen; bool ok = FALSE; pat = copy(pat); /* Don't want to mangle anything. */ schar = *pat++; s = strchr(pat, schar); if (s == NULL) { fprintf(cp_err, "Bad substitute.\n"); return (NULL); } *s++ = '\0'; p = strchr(s, schar); if (p) *p = '\0'; plen = (int) strlen(pat) - 1; for (i = 0; *str; str++) { if ((*str == *pat) && prefix(pat, str) && (ok == FALSE)) { for (p = s; *p; p++) buf[i++] = *p; str += plen; ok = TRUE; } else { buf[i++] = *str; } } buf[i] = '\0'; if (ok) return (copy(buf)); else return (NULL); } /* The "history" command. history [-r] [number] */ void com_history(wordlist *wl) { bool rev = FALSE; if (wl && eq(wl->wl_word, "-r")) { wl = wl->wl_next; rev = TRUE; } #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) /* Added GNU Readline Support -- Andrew Veliath */ { HIST_ENTRY *he; int i, N; N = (wl == NULL) ? history_length : atoi(wl->wl_word); if (N < 0) N = 0; if (N > history_length) N = history_length; if (rev) for (i = history_length; i > 0 && N; --i, --N) { he = history_get(i); if (!he) return; fprintf(cp_out, "%d\t%s\n", i, he->line); } else for (i = history_length - N + 1; i <= history_length; ++i) { he = history_get(i); if (!he) return; fprintf(cp_out, "%d\t%s\n", i, he->line); } } #else if (wl == NULL) cp_hprint(cp_event - 1, cp_event - histlength, rev); else cp_hprint(cp_event - 1, cp_event - 1 - atoi(wl->wl_word), rev); #endif } ngspice-26/src/frontend/com_plot.c0000644000265600020320000000055212264261473016621 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "plotting/plotit.h" #include "com_plot.h" /* plot name ... [xl[imit]] xlo xhi] [yl[imit ylo yhi] [vs xname] */ void com_plot(wordlist *wl) { plotit(wl, NULL, NULL); } #ifdef TCL_MODULE void com_bltplot(wordlist *wl) { plotit(wl, NULL, "blt"); } #endif ngspice-26/src/frontend/newcoms.c0000644000265600020320000001362712264261473016467 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. **********/ /* * Some new post-processor commands having to do with vectors. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteparse.h" #include "ngspice/dvec.h" #include "newcoms.h" #include "quote.h" /* * reshape v(1) vxx#branch [10] * reshape v(1) vxx#branch [10,4] * reshape v(1) [,4] */ void com_reshape(wordlist *wl) { wordlist *w, *w2, *wlast, *wsave; char *p; struct dvec *dv, *d; int numdims; int *dims; int local_dims[MAXDIMS]; int state; int empty; int err; int missing, nprod, prod; char *vname; int i; do { if (!wl) return; /* find the first '[' */ p = NULL; for (w = wl; w; w = w->wl_next) { if ((p = strchr(w->wl_word, '[')) != NULL) break; } if (p && *p) { if (p != w->wl_word) w = w->wl_next; wlast = w; *p++ = 0; } else { wlast = NULL; } /* get the dimensions */ dims = local_dims; numdims = 0; state = 0; empty = -1; err = 0; wsave = NULL; do { if (!p || !*p) { if (!wlast) break; p = wlast->wl_word; if (state == 2) wsave = wlast; else wsave = NULL; wlast = wlast->wl_next; } while (*p && isspace(*p)) p++; switch (state) { case 0: /* p just at or before a number */ if (numdims >= MAXDIMS) { if (numdims == MAXDIMS) printf("Maximum of %d dimensions possible\n", MAXDIMS); numdims += 1; } else if (!isdigit(*p)) { if (empty > -1) { printf("dimensions underspecified at dimension %d\n", numdims++); err = 1; } else { empty = numdims; dims[numdims++] = 1; } } else { dims[numdims++] = atoi(p); while (isdigit(*p)) p++; } state = 1; break; case 1: /* p after a number, looking for ',' or ']' */ if (*p == ']') { p++; state = 2; } else if (*p == ',') { p++; state = 0; } else if (isdigit(*p)) { state = 0; break; } else if (!isspace(*p)) { /* error */ state = 4; } break; case 2: /* p after a ']', either at the end or looking for '[' */ if (*p == '[') { p++; state = 0; } else { state = 3; } } while (*p && isspace(*p)) p++; } while (state < 3); if (state == 2) { wlast = wsave; } else if ((state == 4 || state < 2) && ((state != 0 || p) && *p)) { printf("syntax error specifying dimensions\n"); return; } if (numdims > MAXDIMS) continue; if (err) continue; /* Copy dimensions from the first item if none are explicitly given */ if (!numdims) { /* Copy from the first */ vname = cp_unquote(wl->wl_word); dv = vec_get(vname); if (!dv) { printf("'%s' dimensions vector not found\n", vname); return; } numdims = dv->v_numdims; dims = dv->v_dims; wl = wl->wl_next; empty = -1; /* just in case */ } prod = 1; for (i = 0; i < numdims; i++) prod *= dims[i]; /* resize each vector */ for (w2 = wl; w2 && w2 != w; w2 = w2->wl_next) { vname = cp_unquote(w2->wl_word); dv = vec_get(vname); if (!dv) { printf("'%s' vector not found\n", vname); continue; } /* The name may expand to several vectors */ for (d = dv; d; d = d->v_link2) { nprod = 1; for (i = 0; i < d->v_numdims; i++) nprod *= d->v_dims[i]; if (nprod != d->v_length) { printf("dimensions of \"%s\" were inconsistent\n", d->v_name); nprod = d->v_length; } missing = nprod / prod; if (missing * prod != nprod) { printf("dimensions don't fit \"%s\" (total size = %d)\n", d->v_name, nprod); continue; } if (missing > 1 && empty < 0) { /* last dimension unspecified */ d->v_numdims = numdims + 1; d->v_dims[numdims] = missing; } else { d->v_numdims = numdims; } /* fill in dimensions */ for (i = 0; i < numdims; i++) { if (i == empty) d->v_dims[i] = missing; else d->v_dims[i] = dims[i]; } } if (vname) tfree(vname); } } while ((wl = wlast) != NULL); } ngspice-26/src/frontend/com_compose.c0000644000265600020320000003755412264261473017324 0ustar andreasadmin/* The 'compose' command. This is a more powerful and convenient form * of the 'let' command. */ #include "ngspice/ngspice.h" #include "ngspice/complex.h" #include "ngspice/dvec.h" #include "ngspice/bool.h" #include "ngspice/sim.h" #include "ngspice/pnode.h" #include "ngspice/fteext.h" #include "ngspice/cpextern.h" #include "quote.h" #include "com_compose.h" #include "completion.h" /* Copy the data from a vector into a buffer with larger dimensions. */ static void dimxpand(struct dvec *v, int *newdims, double *data) { ngcomplex_t *cdata = (ngcomplex_t *) data; bool realflag = isreal(v); int i, j, o, n, t, u; int ncount[MAXDIMS], ocount[MAXDIMS]; for (i = 0; i < MAXDIMS; i++) ncount[i] = ocount[i] = 0; for (;;) { for (o = n = i = 0; i < v->v_numdims; i++) { for (j = i, t = u = 1; j < v->v_numdims; j++) { t *= v->v_dims[j]; u *= newdims[j]; } o += ocount[i] * t; n += ncount[i] * u; } if (realflag) { data[n] = v->v_realdata[o]; } else { realpart(cdata[n]) = realpart(v->v_compdata[o]); imagpart(cdata[n]) = imagpart(v->v_compdata[o]); } /* Now find the nextstrchr element... */ for (i = v->v_numdims - 1; i >= 0; i--) if ((ocount[i] < v->v_dims[i] - 1) && (ncount[i] < newdims[i] - 1)) { ocount[i]++; ncount[i]++; break; } else { ocount[i] = ncount[i] = 0; } if (i < 0) break; } } /* The general syntax is 'compose name parm = val ...' * The possible parms are: * start The value at which the vector should start. * stop The value at which the vector should end. * step The difference between sucessive elements. * lin The number of points, linearly spaced. * log The number of points, logarithmically spaced. * dec The number of points per decade, logarithmically spaced. * center Where to center the range of points. * span The size of the range of points. * unif ?? * gauss The number of points in the gaussian distribution. * mean The mean value for the gaussian dist. * sd The standard deviation for the gauss. dist. * random The number of randomly selected points. * pool The name of a vector (must be already defined) to get * random values -- default is 'unitvec(npoints)' * * The case 'compose name values val val ...' takes the values and creates a * new vector -- the vals may be arbitrary expressions. * * NOTE: most of this doesn't work -- there will be plenty of unused variable * lint messages... */ void com_compose(wordlist *wl) { double start = 0.0; double stop = 0.0; double step = 0.0; double lin = 0.0; double center; double span; double mean, sd; bool startgiven = FALSE, stopgiven = FALSE, stepgiven = FALSE; bool lingiven = FALSE; bool loggiven = FALSE, decgiven = FALSE, gaussgiven = FALSE; bool randmgiven = FALSE; bool spangiven = FALSE; bool centergiven = FALSE; bool meangiven = FALSE; bool poolgiven = FALSE; bool sdgiven = FALSE; int log, dec, gauss, randm; char *pool; int i; char *s, *var, *val; double *td, tt; double *data = NULL; ngcomplex_t *cdata = NULL; int length = 0; int dim, type = SV_NOTYPE, blocksize; bool realflag = TRUE; int dims[MAXDIMS]; struct dvec *result, *vecs = NULL, *v, *lv = NULL; struct pnode *pn, *names = NULL; bool reverse = FALSE; char *resname = cp_unquote(wl->wl_word); vec_remove(resname); wl = wl->wl_next; if (eq(wl->wl_word, "values")) { /* Build up the vector from the rest of the line... */ wl = wl->wl_next; names = ft_getpnames(wl, TRUE); if (!names) goto done; for (pn = names; pn; pn = pn->pn_next) { if ((v = ft_evaluate(pn)) == NULL) goto done; if (!vecs) vecs = lv = v; else lv->v_link2 = v; for (lv = v; lv->v_link2; lv = lv->v_link2) ; } /* Now make sure these are all of the same dimensionality. We * can coerce the sizes... */ dim = vecs->v_numdims; if (dim < 2) dim = (vecs->v_length > 1) ? 1 : 0; if (dim == MAXDIMS) { fprintf(cp_err, "Error: max dimensionality is %d\n", MAXDIMS); goto done; } for (v = vecs; v; v = v->v_link2) if (v->v_numdims < 2) v->v_dims[0] = v->v_length; for (v = vecs->v_link2, length = 1; v; v = v->v_link2) { i = v->v_numdims; if (i < 2) i = (v->v_length > 1) ? 1 : 0; if (i != dim) { fprintf(cp_err, "Error: all vectors must be of the same dimensionality\n"); goto done; } length++; if (iscomplex(v)) realflag = FALSE; } for (i = 0; i < dim; i++) { dims[i] = vecs->v_dims[i]; for (v = vecs->v_link2; v; v = v->v_link2) if (v->v_dims[i] > dims[i]) dims[i] = v->v_dims[i]; } dim++; dims[dim - 1] = length; for (i = 0, blocksize = 1; i < dim - 1; i++) blocksize *= dims[i]; if (realflag) data = TMALLOC(double, length * blocksize); else cdata = TMALLOC(ngcomplex_t, length * blocksize); /* Now copy all the data over... If the sizes are too small * then the extra elements are left as 0. */ for (v = vecs, i = 0; v; v = v->v_link2) { if (dim == 1) { if (realflag && isreal(v)) { data[i] = v->v_realdata[0]; } else if (isreal(v)) { realpart(cdata[i]) = realpart(v->v_compdata[0]); imagpart(cdata[i]) = 0.0; } else { realpart(cdata[i]) = realpart(v->v_compdata[0]); imagpart(cdata[i]) = imagpart(v->v_compdata[0]); } i++; continue; } dimxpand(v, dims, (realflag ? (data + i * blocksize) : (double *) (cdata + i * blocksize))); } length *= blocksize; } else { /* Parse the line... */ while (wl) { if ((s = strchr(wl->wl_word, '=')) != NULL && s[1]) { /* This is var=val. */ *s = '\0'; var = wl->wl_word; val = s + 1; wl = wl->wl_next; } else if (strchr(wl->wl_word, '=')) { /* This is var= val. */ *s = '\0'; var = wl->wl_word; wl = wl->wl_next; if (wl) { val = wl->wl_word; wl = wl->wl_next; } else { fprintf(cp_err, "Error: bad syntax\n"); goto done; } } else { /* This is var =val or var = val. */ var = wl->wl_word; wl = wl->wl_next; if (wl) { val = wl->wl_word; if (*val != '=') { fprintf(cp_err, "Error: bad syntax\n"); goto done; } val++; if (!*val) { wl = wl->wl_next; if (wl) { val = wl->wl_word; } else { fprintf(cp_err, "Error: bad syntax\n"); goto done; } } wl = wl->wl_next; } else { fprintf(cp_err, "Error: bad syntax\n"); goto done; } } if (cieq(var, "start")) { startgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } start = *td; } else if (cieq(var, "stop")) { stopgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } stop = *td; } else if (cieq(var, "step")) { stepgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } step = *td; } else if (cieq(var, "center")) { centergiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } center = *td; } else if (cieq(var, "span")) { spangiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } span = *td; } else if (cieq(var, "mean")) { meangiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } mean = *td; } else if (cieq(var, "sd")) { sdgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } sd = *td; } else if (cieq(var, "lin")) { lingiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } lin = *td; } else if (cieq(var, "log")) { loggiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } log = (int)(*td); } else if (cieq(var, "dec")) { decgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } dec = (int)(*td); } else if (cieq(var, "gauss")) { gaussgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } gauss = (int)(*td); } else if (cieq(var, "random")) { randmgiven = TRUE; if ((td = ft_numparse(&val, FALSE)) == NULL) { fprintf(cp_err, "Error: bad parm %s = %s\n", var, val); goto done; } randm = (int)(*td); } else if (cieq(var, "pool")) { poolgiven = TRUE; pool = val; } } #ifdef LINT /* XXX Now, doesn't this look just a little suspicious */ if (centergiven || spangiven || meangiven || sdgiven || poolgiven) j = k = l = m = q = inds = center + span + mean + sd + log + dec + gauss + randm + pool; #endif /* Now see what we have... start and stop are pretty much * compatible with everything... */ if (stepgiven && (step == 0.0)) { fprintf(cp_err, "Error: step cannot = 0.0\n"); goto done; } if (startgiven && stopgiven && (start > stop)) { tt = start; start = stop; stop = tt; reverse = TRUE; } if (lingiven + loggiven + decgiven + randmgiven + gaussgiven > 1) { fprintf(cp_err, "Error: can have at most one of (lin, log, dec, random, gauss)\n"); goto done; } else if (lingiven + loggiven + decgiven + randmgiven + gaussgiven == 0) { /* Hmm, if we have a start, stop, and step we're ok. */ if (startgiven && stopgiven && stepgiven) { lingiven = TRUE; lin = (stop - start) / step + 1; stepgiven = FALSE; /* Problems below... */ } else { fprintf(cp_err, "Error: either one of (lin, log, dec, random, gauss) must be given, or all\n"); fprintf(cp_err, "\tof (start, stop, and step) must be given.\n"); goto done; } } if (lingiven) { /* Create a linear sweep... */ data = TMALLOC(double, (int) lin); if (stepgiven && startgiven && stopgiven) { if (step != (stop - start) / lin * (reverse ? -1 : 1)) { fprintf(cp_err, "Warning: bad step -- should be %g\n", (stop - start) / lin * (reverse ? -1 : 1)); stepgiven = FALSE; } } if (!startgiven) { if (stopgiven && stepgiven) start = stop - step * lin; else if (stopgiven) start = stop - lin; else start = 0; startgiven = TRUE; } if (!stopgiven) { if (stepgiven) stop = start + lin * step; else stop = start + lin; stopgiven = TRUE; } if (!stepgiven) { step = (stop - start) / lin; } if (reverse) for (i = 0, tt = stop; i < lin; i++, tt -= step) data[i] = tt; else for (i = 0, tt = start; i < lin; i++, tt += step) data[i] = tt; length = (int)lin; } else if (loggiven || decgiven) { /* Create a log sweep... */ } else if (randmgiven) { /* Create a set of random values... */ } else if (gaussgiven) { /* Create a gaussian distribution... */ } } result = alloc(struct dvec); ZERO(result, struct dvec); result->v_name = resname; resname = NULL; /* resname storage has been consumed */ result->v_type = type; if (realflag) { result->v_flags = VF_REAL | VF_PERMANENT; result->v_realdata = data; } else { result->v_flags = VF_COMPLEX | VF_PERMANENT; result->v_compdata = cdata; } result->v_length = length; result->v_numdims = 1; result->v_dims[0] = length; vec_new(result); cp_addkword(CT_VECTOR, result->v_name); done: free_pnode(names); tfree(resname); } ngspice-26/src/frontend/com_shift.h0000644000265600020320000000023312264261473016761 0ustar andreasadmin/************* * Header file for com_shift.c ************/ #ifndef ngspice_COM_SHIFT_H #define ngspice_COM_SHIFT_H void com_shift(wordlist *wl); #endif ngspice-26/src/frontend/signal_handler.c0000644000265600020320000000742212264261473017762 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * The signal routines for spice 3 and nutmeg. */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/ftedev.h" #include #include #include "signal_handler.h" #include "plotting/graf.h" #ifdef HAS_WINGUI void winmessage(char* new_msg); #endif #ifdef HAVE_GNUREADLINE /* Added GNU Readline Support 11/3/97 -- Andrew Veliath */ /* from spice3f4 patch to ng-spice. jmr */ #include #include #endif #ifdef HAVE_BSDEDITLINE /* SJB added edit line support 2005-05-05 */ #include #endif /* HAVE_BSDEDITLINE */ JMP_BUF jbuf; /* The (void) signal handlers... SIGINT is the only one that gets reset (by * cshpar) so it is global. They are ifdef BSD because of the sigmask * stuff in sigstop. We set the interrupt flag and return if ft_setflag * is TRUE. */ /* The purpose of ft_sigintr_cleanup() is to handle all processing of asynchronous * signals which require user process context. Some kernel services are not * allowed to be called from asynchronous signal handlers. (e.g. mutexes) */ void ft_sigintr_cleanup(void) { gr_clean(); /* Clean up plot window */ /* sjb - what to do for editline??? The following are not supported in editline */ #if defined(HAVE_GNUREADLINE) /* Clean up readline after catching signals */ /* One or all of these might be superfluous */ (void) rl_free_line_state(); (void) rl_cleanup_after_signal(); (void) rl_reset_after_signal(); #endif /* defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) */ /* To restore screen after an interrupt to a plot for instance */ cp_interactive = TRUE; cp_resetcontrol(); } /* invoke this function upon keyboard interrupt */ RETSIGTYPE ft_sigintr(void) { /* fprintf(cp_err, "Received interrupt. Handling it . . . . .\n"); */ /* Reinstall ft_signintr as the signal handler. */ (void) signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (ft_intrpt) { /* check to see if we're being interrupted repeatedly */ fprintf(cp_err, "\nInterrupted again (ouch)\n"); } else { fprintf(cp_err, "\nInterrupted once . . .\n"); ft_intrpt = TRUE; } if (ft_setflag) { return; /* just return without aborting simulation if ft_setflag = TRUE */ } /* here we jump to the start of command processing in main() after resetting everything. */ LONGJMP(jbuf, 1); } RETSIGTYPE sigfloat(int sig, int code) { NG_IGNORE(sig); fperror("Error", code); rewind(cp_out); (void) signal(SIGFPE, (SIGNAL_FUNCTION) sigfloat); LONGJMP(jbuf, 1); } /* This should give a new prompt if cshpar is waiting for input. */ #ifdef SIGTSTP RETSIGTYPE sigstop(void) { gr_clean(); cp_ccon(FALSE); (void) signal(SIGTSTP, SIG_DFL); (void) kill(getpid(), SIGTSTP); /* This should stop us */ } RETSIGTYPE sigcont(void) { (void) signal(SIGTSTP, (SIGNAL_FUNCTION) sigstop); if (cp_cwait) LONGJMP(jbuf, 1); } #endif /* Special (void) signal handlers. */ RETSIGTYPE sigill(void) { fprintf(cp_err, "\ninternal error -- illegal instruction\n"); fatal(); } RETSIGTYPE sigbus(void) { fprintf(cp_err, "\ninternal error -- bus error\n"); fatal(); } RETSIGTYPE sigsegv(void) { fprintf(cp_err, "\ninternal error -- segmentation violation\n"); #ifdef HAS_WINGUI winmessage("Fatal error in NGSPICE"); #endif fatal(); } RETSIGTYPE sig_sys(void) { fprintf(cp_err, "\ninternal error -- bad argument to system call\n"); fatal(); } ngspice-26/src/frontend/runcoms2.h0000644000265600020320000000035112264261473016557 0ustar andreasadmin/************* * Header file for runcoms2.c * 1999 E. Rouat ************/ #ifndef ngspice_RUNCOMS2_H #define ngspice_RUNCOMS2_H void com_resume(wordlist *wl); void com_rset(wordlist *wl); void com_remcirc(wordlist *wl); #endif ngspice-26/src/frontend/newcoms.h0000644000265600020320000000025312264261473016463 0ustar andreasadmin/************* * Header file for newcoms.c * 1999 E. Rouat ************/ #ifndef ngspice_NEWCOMS_H #define ngspice_NEWCOMS_H void com_reshape(wordlist *wl); #endif ngspice-26/src/frontend/com_fft.c0000644000265600020320000003250012264261473016420 0ustar andreasadmin/********** Copyright 2008 Holger Vogt. All rights reserved. Author: 2008 Holger Vogt **********/ /* * Code to do fast fourier transform on data. */ #include "ngspice/ngspice.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/sim.h" #include "com_fft.h" #include "variable.h" #include "parse.h" #include "../misc/misc_time.h" #include "ngspice/fftext.h" #ifdef HAVE_LIBFFTW3 #include "fftw3.h" #endif void com_fft(wordlist *wl) { ngcomplex_t **fdvec = NULL; double **tdvec = NULL; double *freq, *win = NULL, *time; double span; int fpts, i, j, length, ngood; struct dvec *f, *vlist, *lv = NULL, *vec; struct pnode *pn, *names = NULL; char window[BSIZE_SP]; double maxt; double *in = NULL; #ifdef HAVE_LIBFFTW3 fftw_complex *out = NULL; fftw_plan plan_forward = NULL; #else int N, M; #endif int order; double scale; if (!plot_cur || !plot_cur->pl_scale) { fprintf(cp_err, "Error: no vectors loaded.\n"); goto done; } if (!isreal(plot_cur->pl_scale) || ((plot_cur->pl_scale)->v_type != SV_TIME)) { fprintf(cp_err, "Error: fft needs real time scale\n"); goto done; } length = (plot_cur->pl_scale)->v_length; time = (plot_cur->pl_scale)->v_realdata; span = time[length-1] - time[0]; #ifdef HAVE_LIBFFTW3 fpts = length/2 + 1; #else /* size of fft input vector is power of two and larger or equal than spice vector */ N = 1; M = 0; while (N < length) { N <<= 1; M++; } fpts = N/2 + 1; #endif win = TMALLOC(double, length); maxt = time[length-1]; if (!cp_getvar("specwindow", CP_STRING, window)) strcpy(window, "hanning"); if (!cp_getvar("specwindoworder", CP_NUM, &order)) order = 2; if (order < 2) order = 2; if (fft_windows(window, win, time, length, maxt, span, order) == 0) goto done; names = ft_getpnames(wl, TRUE); vlist = NULL; ngood = 0; for (pn = names; pn; pn = pn->pn_next) { vec = ft_evaluate(pn); for (; vec; vec = vec->v_link2) { if (vec->v_length != length) { fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %d\n", vec->v_name, vec->v_length, length); continue; } if (!isreal(vec)) { fprintf(cp_err, "Error: %s isn't real!\n", vec->v_name); continue; } if (vec->v_type == SV_TIME) { continue; } if (!vlist) vlist = vec; else lv->v_link2 = vec; lv = vec; ngood++; } } if (!ngood) goto done; plot_cur = plot_alloc("spectrum"); plot_cur->pl_next = plot_list; plot_list = plot_cur; plot_cur->pl_title = copy((plot_cur->pl_next)->pl_title); plot_cur->pl_name = copy("Spectrum"); plot_cur->pl_date = copy(datestring()); freq = TMALLOC(double, fpts); f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = copy("frequency"); f->v_type = SV_FREQUENCY; f->v_flags = (VF_REAL | VF_PERMANENT | VF_PRINT); f->v_length = fpts; f->v_realdata = freq; vec_new(f); for (i = 0; iv_realdata; /* real input data */ fdvec[i] = TMALLOC(ngcomplex_t, fpts); /* complex output data */ f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = vec_basename(vec); f->v_type = SV_NOTYPE; f->v_flags = (VF_COMPLEX | VF_PERMANENT); f->v_length = fpts; f->v_compdata = fdvec[i]; vec_new(f); vec = vec->v_link2; } #ifdef HAVE_LIBFFTW3 printf("FFT: Time span: %g s, input length: %d\n", span, length); printf("FFT: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, fpts); for (i = 0; ipl_scale) { fprintf(cp_err, "Error: no vectors loaded.\n"); goto done; } if (!isreal(plot_cur->pl_scale) || ((plot_cur->pl_scale)->v_type != SV_TIME)) { fprintf(cp_err, "Error: fft needs real time scale\n"); goto done; } length = (plot_cur->pl_scale)->v_length; time = (plot_cur->pl_scale)->v_realdata; span = time[length-1] - time[0]; // get filter length from parameter input s = wl->wl_word; ave = ft_numparse(&s, FALSE); if (!ave || (*ave < 1.0)) { fprintf(cp_out, "Number of averaged data points: %d\n", 1); smooth = 1; } else { smooth = (int)(*ave); } wl = wl->wl_next; #ifdef HAVE_LIBFFTW3 fpts = length/2 + 1; #else /* size of fft input vector is power of two and larger or equal than spice vector */ N = 1; M = 0; while (N < length) { N <<= 1; M++; } fpts = N/2 + 1; #endif win = TMALLOC(double, length); maxt = time[length-1]; if (!cp_getvar("specwindow", CP_STRING, window)) strcpy(window, "hanning"); if (!cp_getvar("specwindoworder", CP_NUM, &order)) order = 2; if (order < 2) order = 2; if (fft_windows(window, win, time, length, maxt, span, order) == 0) goto done; names = ft_getpnames(wl, TRUE); vlist = NULL; ngood = 0; for (pn = names; pn; pn = pn->pn_next) { vec = ft_evaluate(pn); for (; vec; vec = vec->v_link2) { if (vec->v_length != (int)length) { fprintf(cp_err, "Error: lengths of %s vectors don't match: %d, %d\n", vec->v_name, vec->v_length, length); continue; } if (!isreal(vec)) { fprintf(cp_err, "Error: %s isn't real!\n", vec->v_name); continue; } if (vec->v_type == SV_TIME) { continue; } if (!vlist) vlist = vec; else lv->v_link2 = vec; lv = vec; ngood++; } } if (!ngood) goto done; plot_cur = plot_alloc("spectrum"); plot_cur->pl_next = plot_list; plot_list = plot_cur; plot_cur->pl_title = copy((plot_cur->pl_next)->pl_title); plot_cur->pl_name = copy("PSD"); plot_cur->pl_date = copy(datestring()); freq = TMALLOC(double, fpts); f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = copy("frequency"); f->v_type = SV_FREQUENCY; f->v_flags = (VF_REAL | VF_PERMANENT | VF_PRINT); f->v_length = fpts; f->v_realdata = freq; vec_new(f); #ifdef HAVE_LIBFFTW3 for (i = 0; i <= fpts; i++) freq[i] = i*1./span; #else for (i = 0; i <= fpts; i++) freq[i] = i*1./span*length/N; #endif tdvec = TMALLOC(double*, ngood); fdvec = TMALLOC(ngcomplex_t*, ngood); for (i = 0, vec = vlist; iv_realdata; /* real input data */ fdvec[i] = TMALLOC(ngcomplex_t, fpts); /* complex output data */ f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = vec_basename(vec); f->v_type = SV_NOTYPE; //vec->v_type; f->v_flags = (VF_COMPLEX | VF_PERMANENT); f->v_length = fpts; f->v_compdata = fdvec[i]; vec_new(f); vec = vec->v_link2; } #ifdef HAVE_LIBFFTW3 printf("PSD: Time span: %g s, input length: %d\n", span, length); printf("PSD: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, fpts); reald = TMALLOC(double, fpts); in = fftw_malloc(sizeof(double) * (unsigned int) length); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) fpts); for (i = 0; i>1; for (j = 0; j < hsmooth; j++) { sum = 0.; for (jj = 0; jj < hsmooth + j; jj++) sum += fdvec[i][jj].cx_real; sum /= (hsmooth + j); reald[j] = (sqrt(sum)/scaling); } for (j = hsmooth; j < fpts-hsmooth; j++) { sum = 0.; for (jj = 0; jj < smooth; jj++) sum += fdvec[i][j-hsmooth+jj].cx_real; sum /= smooth; reald[j] = (sqrt(sum)/scaling); } for (j = fpts-hsmooth; j < fpts; j++) { sum = 0.; for (jj = 0; jj < smooth; jj++) sum += fdvec[i][j-hsmooth+jj].cx_real; sum /= (fpts - j + hsmooth - 1); reald[j] = (sqrt(sum)/scaling); } for (j = 0; j < fpts; j++) fdvec[i][j].cx_real = reald[j]; } done: #ifdef HAVE_LIBFFTW3 fftw_free(in); fftw_free(out); fftw_destroy_plan(plan_forward); #endif tfree(tdvec); tfree(fdvec); tfree(win); free(reald); free_pnode(names); } ngspice-26/src/frontend/com_chdir.c0000644000265600020320000000211712264261473016733 0ustar andreasadmin/************* * com_chdir.c ************/ #include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #ifdef HAVE_PWD_H #include #endif #include "com_chdir.h" #include "quote.h" #include "ngspice/cpextern.h" void com_chdir(wordlist *wl) { char *s; #ifdef HAVE_PWD_H struct passwd *pw; #endif #ifdef HAVE_GETCWD char localbuf[257]; #endif int copied = 0; s = NULL; if (wl == NULL) { s = getenv("HOME"); #ifdef HAVE_PWD_H if (s == NULL) { pw = getpwuid(getuid()); if (pw == NULL) { fprintf(cp_err, "Can't get your password entry\n"); return; } s = pw->pw_dir; } #endif } else { s = cp_unquote(wl->wl_word); copied = 1; } if (s != NULL) if (chdir(s) == -1) perror(s); if (copied) tfree(s); #ifdef HAVE_GETCWD s = getcwd(localbuf, sizeof(localbuf)); if (s) printf("Current directory: %s\n", s); else fprintf(cp_err, "Can't get current working directory.\n"); #endif } ngspice-26/src/frontend/com_strcmp.c0000644000265600020320000000075312264261473017156 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "com_strcmp.h" #include "quote.h" #include "variable.h" /* This is a truly evil thing */ void com_strcmp(wordlist *wl) { char *var, *s1, *s2; int i; var = wl->wl_word; s1 = cp_unquote(wl->wl_next->wl_word); s2 = cp_unquote(wl->wl_next->wl_next->wl_word); i = strcmp(s1, s2); tfree(s1);/*DG cp_unquote memory leak*/ tfree(s2); cp_vset(var, CP_NUM, &i); } ngspice-26/src/frontend/com_let.c0000644000265600020320000001452212264261473016431 0ustar andreasadmin#include #include "ngspice/dvec.h" #include "ngspice/ngspice.h" #include "ngspice/fteext.h" #include "ngspice/cpextern.h" #include "com_let.h" #include "com_display.h" #include "completion.h" void com_let(wordlist *wl) { char *p, *q, *s; int indices[MAXDIMS]; int numdims; wordlist fake_wl; int need_open; int offset, length; struct pnode *names; struct dvec *n, *t; int i, cube; int j, depth; int newvec; char *rhs; fake_wl.wl_next = NULL; if (!wl) { com_display(NULL); return; } p = wl_flatten(wl); /* extract indices */ numdims = 0; if ((rhs = strchr(p, '=')) != NULL) { *rhs++ = 0; } else { fprintf(cp_err, "Error: bad let syntax\n"); tfree(p); return; } if ((s = strchr(p, '[')) != NULL) { need_open = 0; *s++ = 0; while (!need_open || *s == '[') { depth = 0; if (need_open) s++; for (q = s; *q && (*q != ']' && (*q != ',' || depth > 0)); q++) { switch (*q) { case '[': depth += 1; break; case ']': depth -= 1; break; } } if (depth != 0 || !*q) { printf("syntax error specifying index\n"); tfree(p); return; } if (*q == ']') need_open = 1; else need_open = 0; if (*q) *q++ = 0; /* evaluate expression between s and q */ /* va, indexing */ fake_wl.wl_word = s; names = ft_getpnames(&fake_wl, TRUE); if (!names) { /* XXX error message */ tfree(p); return; } t = ft_evaluate(names); if (!t) { fprintf(cp_err, "Error: Can't evaluate %s\n", s); free_pnode(names); tfree(p); return; } if (!isreal(t) || t->v_link2 || t->v_length != 1 || !t->v_realdata) { fprintf(cp_err, "Error: index is not a scalar.\n"); goto quit; } j = (int)floor(t->v_realdata[0]+0.5); /* ignore sanity checks for now, va, which checks? */ if (j < 0) { printf("negative index (%d) is not allowed\n", j); goto quit; } indices[numdims++] = j; /* va: garbage collection for t, if pnode `names' is no simple value */ if (names != NULL && names->pn_value == NULL && t != NULL) vec_free(t); free_pnode(names); /* frees also t, if pnode `names' is simple value */ for (s = q; *s && isspace(*s); s++) ; } } /* vector name at p */ for (q = p + strlen(p) - 1; *q <= ' ' && p <= q; q--) ; *++q = 0; /* sanity check */ if (eq(p, "all") ||strchr(p, '@')) { fprintf(cp_err, "Error: bad variable name %s\n", p); tfree(p); return; } /* evaluate rhs */ fake_wl.wl_word = rhs; names = ft_getpnames(&fake_wl, TRUE); if (names == NULL) { /* XXX error message */ tfree(p); return; } t = ft_evaluate(names); if (!t) { fprintf(cp_err, "Error: Can't evaluate %s\n", rhs); free_pnode(names); tfree(p); return; } if (t->v_link2) fprintf(cp_err, "Warning: extra wildcard values ignored\n"); n = vec_get(p); if (n) { /* re-allocate? */ /* vec_free(n); */ newvec = 0; } else { if (numdims) { fprintf(cp_err, "Can't assign into a subindex of a new vector\n"); goto quit; } /* create and assign a new vector */ n = alloc(struct dvec); ZERO(n, struct dvec); n->v_name = copy(p); n->v_type = t->v_type; n->v_flags = (t->v_flags | VF_PERMANENT); n->v_length = t->v_length; if ((t->v_numdims) <= 1) { // changed from "!t->v_numdims" by Friedrich Schmidt n->v_numdims = 1; n->v_dims[0] = n->v_length; } else { n->v_numdims = t->v_numdims; for (i = 0; i < t->v_numdims; i++) n->v_dims[i] = t->v_dims[i]; } if (isreal(t)) n->v_realdata = TMALLOC(double, n->v_length); else n->v_compdata = TMALLOC(ngcomplex_t, n->v_length); newvec = 1; vec_new(n); } /* fix-up dimensions; va, also for v_dims */ if (n->v_numdims < 1 || n->v_dims[0] == 0 ) { n->v_numdims = 1; n->v_dims[0] = n->v_length; } /* Compare dimensions */ offset = 0; length = n->v_length; cube = 1; for (i = n->v_numdims - 1; i >= numdims; i--) cube *= n->v_dims[i]; for (i = numdims - 1; i >= 0; i--) { offset += cube * indices[i]; if (i < n->v_numdims) { cube *= n->v_dims[i]; length /= n->v_dims[i]; } } /* length is the size of the unit refered to */ /* cube ends up being the length */ if (length > t->v_length) { fprintf(cp_err, "left-hand expression is too small (need %d)\n", length * cube); if (newvec) n->v_flags &= ~VF_PERMANENT; goto quit; } if (isreal(t) != isreal(n)) { fprintf(cp_err, "Types of vectors are not the same (real vs. complex)\n"); if (newvec) n->v_flags &= ~VF_PERMANENT; goto quit; } else if (isreal(t)) { bcopy(t->v_realdata, n->v_realdata + offset, (size_t) length * sizeof(double)); } else { bcopy(t->v_compdata, n->v_compdata + offset, (size_t) length * sizeof(ngcomplex_t)); } n->v_minsignal = 0.0; /* How do these get reset ??? */ n->v_maxsignal = 0.0; n->v_scale = t->v_scale; if (newvec) cp_addkword(CT_VECTOR, n->v_name); quit: /* va: garbage collection for t, if pnode `names' is no simple value */ if (names != NULL && names->pn_value == NULL && t != NULL) vec_free(t); free_pnode(names); /* frees also t, if pnode `names' is simple value */ tfree(p); } ngspice-26/src/frontend/com_hardcopy.c0000644000265600020320000001315112264261473017453 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/defines.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/cpdefs.h" #include "ngspice/fteinput.h" #include "ngspice/ftedev.h" #include "ngspice/ftedbgra.h" #include "plotting/plotit.h" #include "plotting/graphdb.h" #include "plotting/graf.h" #include "../misc/mktemp.h" #include "arg.h" #include "display.h" #include "com_hardcopy.h" #include "variable.h" /* hardcopy file plotargs, or 'hardcopy file' -- with no other args * this prompts the user for a window to dump to a plot file. XXX no * it doesn't. */ void com_hardcopy(wordlist *wl) { char *fname; char buf[BSIZE_SP], device[BSIZE_SP]; bool tempf = FALSE; char *devtype; #if defined(SYSTEM_PLOT5LPR) || defined(SYSTEM_PSLPR) char format[513]; #endif int printed; int hc_button; int foundit; if (!cp_getvar("hcopydev", CP_STRING, device)) *device = '\0'; if (wl) { hc_button = 0; fname = wl->wl_word; wl = wl->wl_next; } else { hc_button = 1; fname = smktemp("hc"); tempf = TRUE; } if (!cp_getvar("hcopydevtype", CP_STRING, buf)) devtype = "postscript"; else devtype = buf; /* enable screen plot selection for these display types */ foundit = 0; // PushGraphContext(currentgraph); #ifdef HAS_WINGUI if (!wl && hc_button) { char *psfname; GRAPH *tempgraph; if (DevSwitch(devtype)) return; tempgraph = CopyGraph(currentgraph); /* change .tmp to .ps */ psfname = strchr(fname, '.'); if (psfname) { psfname[1] = 'p'; psfname[2] = 's'; psfname[3] = '\0'; } else { fname = realloc(fname, strlen(fname)+4); strcat(fname, ".ps"); } tempgraph->devdep = fname; if (NewViewport(tempgraph)) { DevSwitch(NULL); return; } gr_resize(tempgraph); gr_redraw(tempgraph); DestroyGraph(tempgraph->graphid); DevSwitch(NULL); foundit = 1; } #endif #ifndef X_DISPLAY_MISSING if (!wl && hc_button) { REQUEST request; RESPONSE response; GRAPH *tempgraph; request.option = click_option; Input(&request, &response); if (response.option == error_option) return; if (response.reply.graph) { if (DevSwitch(devtype)) return; tempgraph = CopyGraph(response.reply.graph); tempgraph->devdep = fname; if (NewViewport(tempgraph)) { DevSwitch(NULL); return; } /* save current graphics context */ PushGraphContext(currentgraph); currentgraph = tempgraph; /* some operations in gr_resize, gr_redraw, and DevSwitch will be done on currentgraph, not only on tempgraph */ gr_resize(tempgraph); gr_redraw(tempgraph); DevSwitch(NULL); /* retrieve current graphics context */ PopGraphContext(); DestroyGraph(tempgraph->graphid); foundit = 1; } } #endif /* save current graphics context, because plotit() will create a new currentgraph */ PushGraphContext(currentgraph); if (!foundit) { if (!wl) { char *buf2; outmenuprompt("which variable ? "); buf2 = prompt(cp_in); if (!buf2) return; wl = wl_cons(buf2, NULL); wl = process(wl); } if (DevSwitch(devtype)) return; if (!wl || !plotit(wl, fname, NULL)) { printf("com_hardcopy: graph not defined\n"); DevSwitch(NULL); /* remember to switch back */ return; } DevSwitch(NULL); } printed = 0; if (*device) { #ifdef SYSTEM_PLOT5LPR if (!strcmp(devtype, "plot5") || !strcmp(devtype, "MFB")) { if (!cp_getvar("lprplot5", CP_STRING, format)) strcpy(format, SYSTEM_PLOT5LPR); (void) sprintf(buf, format, device, fname); fprintf(cp_out, "Printing %s on the %s printer.\n", fname, device); (void) system(buf); printed = 1; } #endif #ifdef SYSTEM_PSLPR if (!printed && !strcmp(devtype, "postscript")) { /* note: check if that was a postscript printer XXX */ if (!cp_getvar("lprps", CP_STRING, format)) strcpy(format, SYSTEM_PSLPR); (void) sprintf(buf, format, device, fname); fprintf(cp_out, "Printing %s on the %s printer.\n", fname, device); (void) system(buf); printed = 1; } #endif } if (!printed) { if (!strcmp(devtype, "plot5")) { fprintf(cp_out, "The file \"%s\" may be printed with the Unix \"plot\" command,\n", fname); fprintf(cp_out, "\tor by using the '-g' flag to the Unix lpr command.\n"); } else if (!strcmp(devtype, "postscript")) { fprintf(cp_out, "\nThe file \"%s\" may be printed on a postscript printer.\n", fname); } else if (!strcmp(devtype, "MFB")) { fprintf(cp_out, "The file \"%s\" may be printed on a MFB device.\n", fname); } } if (tempf && *device) (void) unlink(fname); /* restore previous graphics context by retrieving the previous currentgraph */ PopGraphContext(); } ngspice-26/src/frontend/com_rehash.h0000644000265600020320000000027512264261473017124 0ustar andreasadmin/************* * Header file for com_rehsh.c ************/ #ifndef ngspice_COM_REHASH_H #define ngspice_COM_REHASH_H #include "ngspice/wordlist.h" void com_rehash(wordlist *wl); #endif ngspice-26/src/frontend/where.h0000644000265600020320000000024312264261473016121 0ustar andreasadmin/************* * Header file for where.c * 1999 E. Rouat ************/ #ifndef ngspice_WHERE_H #define ngspice_WHERE_H void com_where(wordlist *wl); #endif ngspice-26/src/frontend/com_measure2.h0000644000265600020320000000043612264261473017374 0ustar andreasadmin#ifndef ngspice_COM_MEASURE2_H #define ngspice_COM_MEASURE2_H extern int measure_get_precision(void); extern int get_measure2(wordlist *wl, double *result, char *out_line, bool auto_check); extern int measure_extract_variables(char *line); void com_dotmeasure(wordlist *wl); #endif ngspice-26/src/frontend/define.c0000644000265600020320000003075112264261473016243 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * User-defined functions. The user defines the function with * define func(arg1, arg2, arg3) * Then when he types "func(1, 2, 3)", the commas are interpreted as * binary operations of the lowest priority by the parser, and ft_substdef() * below is given a chance to fill things in and return what the parse tree * would have been had the entire thing been typed. * Note that we have to take some care to distinguish between functions * with the same name and different arities. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "define.h" #include "completion.h" static void savetree(struct pnode *pn); static void prdefs(char *name); static void prtree(struct udfunc *ud); static void prtree1(struct pnode *pn, FILE *fp); static struct pnode *trcopy(struct pnode *tree, char *args, struct pnode *nn); static struct pnode *ntharg(int num, struct pnode *args); static struct udfunc *udfuncs = NULL; /* Set up a function definition. */ void com_define(wordlist *wlist) { int arity = 0, i; char buf[BSIZE_SP], tbuf[BSIZE_SP], *s, *t, *b; wordlist *wl; struct pnode *names; struct udfunc *udf; /* If there's nothing then print all the definitions. */ if (wlist == NULL) { prdefs(NULL); return; } /* Accumulate the function head in the buffer, w/out spaces. A * useful thing here would be to check to make sure that there * are no formal parameters here called "list". But you have * to try really hard to break this here. */ buf[0] = '\0'; for (wl = wlist; wl && (strchr(wl->wl_word, /* ( */ ')') == NULL); wl = wl->wl_next) (void) strcat(buf, wl->wl_word); if (wl) { for (t = buf; *t; t++) ; for (s = wl->wl_word; *s && (*s != /* ( */ ')'); s++, t++) *t = *s; *t++ = /* ( */ ')'; *t = '\0'; if (*++s) wl->wl_word = copy(s); else wl = wl->wl_next; } /* If that's all, then print the definition. */ if (wl == NULL) { prdefs(buf); return; } /* Now check to see if this is a valid name for a function (i.e, * there isn't a predefined function of the same name). */ (void) strcpy(tbuf, buf); for (b = tbuf; *b; b++) if (isspace(*b) || (*b == '(' /* ) */)) { *b = '\0'; break; } for (i = 0; ft_funcs[i].fu_name; i++) if (eq(ft_funcs[i].fu_name, tbuf)) { fprintf(cp_err, "Error: %s is a predefined function.\n", tbuf); return; } /* Parse the rest of it. We can't know if there are the right * number of undefined variables in the expression. */ if ((names = ft_getpnames(wl, FALSE)) == NULL) return; /* This is a pain -- when things are garbage-collected, any * vectors that may have been mentioned here will be thrown * away. So go down the tree and save any vectors that aren't * formal parameters. */ savetree(names); /* Format the name properly and add to the list. */ b = copy(buf); for (s = b; *s; s++) { if (*s == '(') { /*)*/ *s = '\0'; if (s[1] != /*(*/ ')') arity++; /* It will have been 0. */ } else if (*s == /*(*/ ')') { *s = '\0'; } else if (*s == ',') { *s = '\0'; arity++; } } for (udf = udfuncs; udf; udf = udf->ud_next) if (prefix(b, udf->ud_name) && (arity == udf->ud_arity)) break; if (udf == NULL) { udf = alloc(struct udfunc); if (udfuncs == NULL) { udfuncs = udf; udf->ud_next = NULL; } else { udf->ud_next = udfuncs; udfuncs = udf; } } udf->ud_text = names; udf->ud_name = b; udf->ud_arity = arity; cp_addkword(CT_UDFUNCS, b); } /* Kludge. */ static void savetree(struct pnode *pn) { struct dvec *d; if (pn->pn_value) { /* We specifically don't add this to the plot list * so it won't get gc'ed. */ d = pn->pn_value; if ((d->v_length != 0) || eq(d->v_name, "list")) { pn->pn_value = alloc(struct dvec); ZERO(pn->pn_value, struct dvec); pn->pn_value->v_name = copy(d->v_name); pn->pn_value->v_length = d->v_length; pn->pn_value->v_type = d->v_type; pn->pn_value->v_flags = d->v_flags; pn->pn_value->v_plot = NULL; /* this dvec isn't member of any plot */ if (isreal(d)) { pn->pn_value->v_realdata = TMALLOC(double, d->v_length); bcopy(d->v_realdata, pn->pn_value->v_realdata, sizeof(double) * (size_t) d->v_length); } else { pn->pn_value->v_compdata = TMALLOC(ngcomplex_t, d->v_length); bcopy(d->v_compdata, pn->pn_value->v_compdata, sizeof(ngcomplex_t) * (size_t) d->v_length); } } } else if (pn->pn_op) { savetree(pn->pn_left); if (pn->pn_op->op_arity == 2) savetree(pn->pn_right); } else if (pn->pn_func) { savetree(pn->pn_left); } } /* A bunch of junk to print out nodes. */ static void prdefs(char *name) { struct udfunc *udf; char *s; if (name) { s = strchr(name, '(' /* ) */); if (s) *s = '\0'; } if (name && *name) { /* You never know what people will do */ for (udf = udfuncs; udf; udf = udf->ud_next) if (eq(name, udf->ud_name)) prtree(udf); } else { for (udf = udfuncs; udf; udf = udf->ud_next) prtree(udf); } } /* Print out one definition. */ static void prtree(struct udfunc *ud) { char *s, buf[BSIZE_SP]; /* Print the head. */ buf[0] = '\0'; (void) strcat(buf, ud->ud_name); for (s = ud->ud_name; *s; s++) ; (void) strcat(buf, " ("); s++; while (*s) { (void) strcat(buf, s); while (*s) s++; if (s[1]) (void) strcat(buf, ", "); s++; } (void) strcat(buf, ") = "); fputs(buf, cp_out); prtree1(ud->ud_text, cp_out); (void) putc('\n', cp_out); } static void prtree1(struct pnode *pn, FILE *fp) { if (pn->pn_value) { fputs(pn->pn_value->v_name, fp); } else if (pn->pn_func) { fprintf(fp, "%s (", pn->pn_func->fu_name); prtree1(pn->pn_left, fp); fputs(")", fp); } else if (pn->pn_op && (pn->pn_op->op_arity == 2)) { fputs("(", fp); prtree1(pn->pn_left, fp); fprintf(fp, ")%s(", pn->pn_op->op_name); prtree1(pn->pn_right, fp); fputs(")", fp); } else if (pn->pn_op && (pn->pn_op->op_arity == 1)) { fprintf(fp, "%s(", pn->pn_op->op_name); prtree1(pn->pn_left, fp); fputs(")", fp); } else { fputs("", fp); } } struct pnode * ft_substdef(const char *name, struct pnode *args) { struct udfunc *udf; struct pnode *tp; char *s; int arity = 0, rarity = 0; bool found = FALSE; if (args) arity = 1; for (tp = args; tp && tp->pn_op && (tp->pn_op->op_num == PT_OP_COMMA); tp = tp->pn_right) arity++; for (udf = udfuncs; udf; udf = udf->ud_next) if (eq(name, udf->ud_name)) { if (arity == udf->ud_arity) { break; } else { found = TRUE; rarity = udf->ud_arity; } } if (udf == NULL) { if (found) fprintf(cp_err, "Warning: the user-defined function %s has %d args\n", name, rarity); return (NULL); } for (s = udf->ud_name; *s; s++) ; s++; /* Now we have to traverse the tree and copy it over, * substituting args. */ return (trcopy(udf->ud_text, s, args)); } /* Copy the tree and replace formal args with the right stuff. The way * we know that something might be a formal arg is when it is a dvec * with length 0 and a name that isn't "list". I hope nobody calls their * formal parameters "list". */ static struct pnode * trcopy(struct pnode *tree, char *args, struct pnode *nn) { struct pnode *pn; struct dvec *d; char *s; int i; if (tree->pn_value) { d = tree->pn_value; if ((d->v_length == 0) && strcmp(d->v_name, "list")) { /* Yep, it's a formal parameter. Substitute for it. * IMPORTANT: we never free parse trees, so we * needn't worry that they aren't trees here. */ s = args; i = 1; while (*s) { if (eq(s, d->v_name)) break; else i++; while (*s++) /* Get past the last '\0'. */ ; } if (*s) return (ntharg(i, nn)); else return (tree); } else { return (tree); } } else if (tree->pn_func) { pn = alloc(struct pnode); pn->pn_use = 0; pn->pn_name = NULL; pn->pn_value = NULL; /* pn_func are pointers to a global constant struct */ pn->pn_func = tree->pn_func; pn->pn_op = NULL; pn->pn_left = trcopy(tree->pn_left, args, nn); pn->pn_left->pn_use++; pn->pn_right = NULL; pn->pn_next = NULL; } else if (tree->pn_op) { pn = alloc(struct pnode); pn->pn_use = 0; pn->pn_name = NULL; pn->pn_value = NULL; pn->pn_func = NULL; /* pn_op are pointers to a global constant struct */ pn->pn_op = tree->pn_op; pn->pn_left = trcopy(tree->pn_left, args, nn); pn->pn_left->pn_use++; if (pn->pn_op->op_arity == 2) { pn->pn_right = trcopy(tree->pn_right, args, nn); pn->pn_right->pn_use++; } else { pn->pn_right = NULL; } pn->pn_next = NULL; } else { fprintf(cp_err, "trcopy: Internal Error: bad parse node\n"); return (NULL); } return (pn); } /* Find the n'th arg in the arglist, returning NULL if there isn't one. * Since comma has such a low priority and associates to the right, * we can just follow the right branch of the tree num times. * Note that we start at 1 when numbering the args. */ static struct pnode * ntharg(int num, struct pnode *args) { struct pnode *ptry; ptry = args; if (num > 1) while (--num > 0) { if (ptry && ptry->pn_op && (ptry->pn_op->op_num != PT_OP_COMMA)) { if (num == 1) break; else return (NULL); } ptry = ptry->pn_right; } if (ptry && ptry->pn_op && (ptry->pn_op->op_num == PT_OP_COMMA)) ptry = ptry->pn_left; return (ptry); } void com_undefine(wordlist *wlist) { struct udfunc *udf, *ludf; if (!wlist) return; if (*wlist->wl_word == '*') { for (udf = udfuncs; udf;) { struct udfunc *next = udf->ud_next; cp_remkword(CT_UDFUNCS, udf->ud_name); free_pnode(udf->ud_text); free(udf->ud_name); free(udf); udf = next; } udfuncs = NULL; return; } for (; wlist; wlist = wlist->wl_next) { ludf = NULL; for (udf = udfuncs; udf;) { struct udfunc *next = udf->ud_next; if (eq(wlist->wl_word, udf->ud_name)) { if (ludf) ludf->ud_next = udf->ud_next; else udfuncs = udf->ud_next; cp_remkword(CT_UDFUNCS, wlist->wl_word); free_pnode(udf->ud_text); free(udf->ud_name); free(udf); } else { ludf = udf; } udf = next; } } } #ifndef LINT /* Watch out, this is not at all portable. It's only here so I can * call it from dbx with an int value (all you can give with "call")... */ void ft_pnode(struct pnode *pn) { prtree1(pn, cp_err); } #endif ngspice-26/src/frontend/com_history.h0000644000265600020320000000026412264261473017351 0ustar andreasadmin/************* * Header file for history.c * 1999 E. Rouat ************/ #ifndef ngspice_COM_HISTORY_H #define ngspice_COM_HISTORY_H void com_history(wordlist *wl); #endif ngspice-26/src/frontend/com_xgraph.c0000644000265600020320000000130312264261473017127 0ustar andreasadmin#include #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "plotting/plotit.h" #include "../misc/mktemp.h" #include "com_xgraph.h" /* xgraph file plotargs */ void com_xgraph(wordlist *wl) { char *fname = NULL; bool tempf = FALSE; if (wl) { fname = wl->wl_word; wl = wl->wl_next; } if (!wl) return; if (cieq(fname, "temp") || cieq(fname, "tmp")) { fname = smktemp("xg"); tempf = TRUE; } (void) plotit(wl, fname, "xgraph"); #if 0 /* Leave temp file sitting around so xgraph can grab it from background. */ if (tempf) (void) unlink(fname); #endif } ngspice-26/src/frontend/typesdef.c0000644000265600020320000001355612264261473016640 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Stuff to deal with nutmeg "types" for vectors and plots. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "typesdef.h" #define NUMTYPES 128+4 /* If this is too little we can use a list. */ #define NUMPLOTTYPES 512 /* Since there may be more than 1 pat/type. */ struct type { char *t_name; char *t_abbrev; }; /* The stuff for plot names. */ struct plotab { char *p_name; char *p_pattern; }; /* note: This should correspond to SV_ defined in sim.h */ struct type types[NUMTYPES] = { { "notype", NULL } , { "time", "s" } , { "frequency", "Hz" } , { "voltage", "V" } , { "current", "A" } , { "onoise-spectrum", "(V or A)^2/Hz" } , { "onoise-integrated", "V or A" } , { "inoise-spectrum", "(V or A)^2/Hz" } , { "inoise-integrated", "V or A" } , { "pole", NULL } , { "zero", NULL } , { "s-param", NULL } , { "temp-sweep", "Celsius" } , /* Added by HT */ { "res-sweep", "Ohms" } , /* Added by HT */ { "impedance", "Ohms" } , /* Added by A.Roldan */ { "admittance", "Mhos" } , /* Added by A.Roldan */ { "power", "W" } , /* Added by A.Roldan */ { "phase", "Degree" } , /* Added by A.Roldan */ { "decibel", "dB" } , /* Added by A.Roldan */ { "capacitance", "F" } , { "charge", "C" } , }; /* The stuff for plot names. */ struct plotab plotabs[NUMPLOTTYPES] = { { "tran", "transient" } , { "op", "op" } , { "tf", "function" }, { "dc", "d.c." } , { "dc", "dc" } , { "dc", "transfer" } , { "ac", "a.c." } , { "ac", "ac" } , { "pz", "pz" } , { "pz", "p.z." } , { "pz", "pole-zero"} , { "disto", "disto" } , { "dist", "dist" } , { "noise", "noise" } , { "sens", "sens" } , { "sens", "sensitivity" } , { "sens2", "sens2" } , { "sp", "s.p." } , { "sp", "sp" } , { "harm", "harm" }, { "spect", "spect" }, { "pss", "periodic" }, }; int notypes = 19; int noplotabs = 22; /* A command to define types for vectors and plots. This will generally * be used in the Command: field of the rawfile. * The syntax is "deftype v typename abbrev", where abbrev will be used to * parse things like abbrev(name) and to label axes with M, instead * of numbers. It may be ommitted. * Also, the command "deftype p plottype pattern ..." will assign plottype as * the name to any plot with one of the patterns in its Name: field. */ void com_dftype(wordlist *wl) { char *name, *abb; int i; switch (*wl->wl_word) { case 'v': case 'V': wl = wl->wl_next; name = copy(wl->wl_word); wl = wl->wl_next; abb = copy(wl->wl_word); for (i = 0; i < notypes; i++) if (cieq(types[i].t_name, name)) { types[i].t_abbrev = abb; return; } if (notypes >= NUMTYPES - 1) { fprintf(cp_err, "Error: too many types defined\n"); return; } types[notypes].t_name = name; types[notypes].t_abbrev = abb; notypes++; break; case 'p': case 'P': wl = wl->wl_next; name = copy(wl->wl_word); wl = wl->wl_next; while (wl) { for (i = 0; i < noplotabs; i++) if (cieq(plotabs[i].p_pattern, wl->wl_word)) { plotabs[i].p_name = name; wl = wl->wl_next; break; } if (i != noplotabs) continue; if (noplotabs >= NUMPLOTTYPES - 1) { fprintf(cp_err, "Error: too many plot abs\n"); return; } plotabs[noplotabs].p_name = name; plotabs[noplotabs].p_pattern = copy(wl->wl_word); wl = wl->wl_next; noplotabs++; } break; default: fprintf(cp_err, "Error: missing 'p' or 'v' argument\n"); break; } } /* Return the abbreviation associated with a number. */ char * ft_typabbrev(int typenum) { if ((typenum < NUMTYPES) && (typenum >= 0)) return (types[typenum].t_abbrev); else return (NULL); } /* Return the typename associated with a number. */ char * ft_typenames(int typenum) { if ((typenum < NUMTYPES) && (typenum >= 0)) return (types[typenum].t_name); else return (NULL); } /* Return the type number associated with the name. */ int ft_typnum(char *name) { int i; if (eq(name, "none")) name = "notype"; for (i = 0; (i < NUMTYPES) && types[i].t_name; i++) if (cieq(name, types[i].t_name)) return (i); return (0); } /* For plots... */ char * ft_plotabbrev(char *string) { char buf[128]; int i; if (!string) return (NULL); strncpy(buf, string, sizeof(buf)); buf[sizeof(buf) - 1] = '\0'; strtolower(buf); for (i = 0; plotabs[i].p_name; i++) if (substring(plotabs[i].p_pattern, buf)) return (plotabs[i].p_name); return (NULL); } /* Change the type of a vector. */ void com_stype(wordlist *wl) { char *type = wl->wl_word; int tt; struct dvec *v, *vv; char *s; for (tt = 0; ; tt++) if ((s = ft_typenames(tt)) == NULL || eq(type, s)) break; if (!s) { fprintf(cp_err, "Error: no such type as '%s'\n", type); return; } for (wl = wl->wl_next; wl; wl = wl->wl_next) { v = vec_get(wl->wl_word); if (!v) fprintf(cp_err, "Error: no such vector %s.\n", wl->wl_word); else for (vv = v; vv; vv = vv->v_link2) if (vv->v_flags & VF_PERMANENT) vv->v_type = tt; } } ngspice-26/src/frontend/variable.c0000644000265600020320000006606312264261473016603 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/defines.h" #include "ngspice/macros.h" #include "ngspice/cpdefs.h" #include "ngspice/memory.h" #include "ngspice/inpdefs.h" #include "ngspice/fteext.h" #include "circuits.h" #include "com_history.h" #include "quote.h" #include "ngspice/cpextern.h" #include "variable.h" bool cp_noglob = TRUE; bool cp_nonomatch = FALSE; bool cp_noclobber = FALSE; bool cp_ignoreeof = FALSE; bool cp_echo = FALSE; /* CDHW */ struct variable *variables = NULL; wordlist * cp_varwl(struct variable *var) { wordlist *wl = NULL, *w, *wx = NULL; char buf[BSIZE_SP], *copystring; struct variable *vt; switch (var->va_type) { case CP_BOOL: /* Can't ever be FALSE. */ sprintf(buf, "%s", var->va_bool ? "TRUE" : "FALSE"); break; case CP_NUM: sprintf(buf, "%d", var->va_num); break; case CP_REAL: /* This is a case where printnum isn't too good... */ sprintf(buf, "%G", var->va_real); break; case CP_STRING: /*strcpy(buf, cp_unquote(var->va_string)); DG: memory leak here*/ copystring = cp_unquote(var->va_string); /*DG*/ strcpy(buf, copystring); tfree(copystring); break; case CP_LIST: /* The tricky case. */ for (vt = var->va_vlist; vt; vt = vt->va_next) { w = cp_varwl(vt); if (wl == NULL) { wl = wx = w; } else { wx->wl_next = w; w->wl_prev = wx; wx = w; } } return (wl); default: fprintf(cp_err, "cp_varwl: Internal Error: bad variable type %d\n", var->va_type); return (NULL); } wl = wl_cons(copy(buf), NULL); return (wl); } /* Set a variable. */ void cp_vset(char *varname, enum cp_types type, void *value) { struct variable *v, *u, *w; int i; bool alreadythere = FALSE, v_free = FALSE; char *copyvarname; /* varname = cp_unquote(varname); DG: Memory leak old varname is lost*/ copyvarname = cp_unquote(varname); w = NULL; for (v = variables; v; v = v->va_next) { if (eq(copyvarname, v->va_name)) { alreadythere = TRUE; break; } w = v; } if (alreadythere) { if (v->va_type == CP_LIST) free_struct_variable(v->va_vlist); if (v->va_type == CP_STRING) tfree(v->va_string); } if (!v) { v = alloc(struct variable); v->va_name = copy(copyvarname); v->va_next = NULL; v_free = TRUE; } switch (type) { case CP_BOOL: if (* ((bool *) value) == FALSE) { cp_remvar(copyvarname); if (v_free) { tfree(v->va_name); tfree(v); } tfree(copyvarname); return; } else { v->va_bool = TRUE; } break; case CP_NUM: v->va_num = * (int *) value; break; case CP_REAL: v->va_real = * (double *) value; break; case CP_STRING: v->va_string = copy((char*) value); break; case CP_LIST: v->va_vlist = (struct variable *) value; break; default: fprintf(cp_err, "cp_vset: Internal Error: bad variable type %d.\n", type); tfree(copyvarname); return; } v->va_type = type; /* Now, see if there is anything interesting going on. We * recognise these special variables: noglob, nonomatch, history, * echo, noclobber, prompt, and verbose. cp_remvar looks for these * variables too. The host program will get any others. */ if (eq(copyvarname, "noglob")) cp_noglob = TRUE; else if (eq(copyvarname, "nonomatch")) cp_nonomatch = TRUE; else if (eq(copyvarname, "history") && (type == CP_NUM)) cp_maxhistlength = v->va_num; else if (eq(copyvarname, "history") && (type == CP_REAL)) cp_maxhistlength = (int)floor(v->va_real + 0.5); else if (eq(copyvarname, "noclobber")) cp_noclobber = TRUE; else if (eq(varname, "echo")) /*CDHW*/ cp_echo = TRUE; /*CDHW*/ else if (eq(copyvarname, "prompt") && (type == CP_STRING)) cp_promptstring = v->va_string; else if (eq(copyvarname, "ignoreeof")) cp_ignoreeof = TRUE; else if (eq(copyvarname, "cpdebug")) { cp_debug = TRUE; #ifndef CPDEBUG fprintf(cp_err, "Warning: program not compiled with cshpar debug messages\n"); #endif } switch (i = cp_usrset(v, TRUE)) { case US_OK: /* Normal case. */ if (!alreadythere) { v->va_next = variables; variables = v; } break; case US_DONTRECORD: /* Do nothing... */ if (alreadythere) { fprintf(cp_err, "cp_vset: Internal Error: " "%s already there, but 'dont record'\n", v->va_name); } break; case US_READONLY: fprintf(cp_err, "Error: %s is a read-only variable.\n", v->va_name); if (alreadythere) fprintf(cp_err, "cp_vset: Internal Error: " "it was already there too!!\n"); break; case US_SIMVAR: if (alreadythere) { /* somehow it got into the front-end list of variables */ if (w) { w->va_next = v->va_next; } else { variables = v->va_next; } } alreadythere = FALSE; if (ft_curckt) { for (u = ft_curckt->ci_vars; u; u = u->va_next) if (eq(copyvarname, u->va_name)) { alreadythere = TRUE; break; } if (!alreadythere) { v->va_next = ft_curckt->ci_vars; ft_curckt->ci_vars = v; } else { /* va: avoid memory leak within bcopy */ if (u->va_type == CP_STRING) tfree(u->va_string); else if (u->va_type == CP_LIST) tfree(u->va_vlist); u->va_V = v->va_V; /* va_name is the same string */ u->va_type = v->va_type; /* va_next left unchanged */ // tfree(v->va_name); tfree(v); /* va: old version with memory leaks w = u->va_next; bcopy(v, u, sizeof(*u)); u->va_next = w; */ } } break; case US_NOSIMVAR: /* What do you do? */ tfree(v->va_name); tfree(v); break; default: fprintf(cp_err, "cp_vset: Internal Error: bad US val %d\n", i); break; } /* if (v_free) { tfree(v->va_name); tfree(v); } */ tfree(copyvarname); } /*CDHW This needs leak checking carefully CDHW*/ struct variable * cp_setparse(wordlist *wl) { char *name = NULL, *val, *copyval, *s, *ss; double *td; struct variable *listv = NULL, *vv, *lv = NULL; struct variable *vars = NULL; int balance; while (wl) { if (name) tfree(name); name = cp_unquote(wl->wl_word); wl = wl->wl_next; if ((!wl || (*wl->wl_word != '=')) && !strchr(name, '=')) { vv = alloc(struct variable); vv->va_name = copy(name); vv->va_type = CP_BOOL; vv->va_bool = TRUE; vv->va_next = vars; vars = vv; tfree(name); /*DG: cp_unquote Memory leak*/ continue; } if (wl && eq(wl->wl_word, "=")) { wl = wl->wl_next; if (wl == NULL) { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /*DG: cp_unquote Memory leak*/ if (ft_stricterror) controlled_exit(EXIT_BAD); return (NULL); } val = wl->wl_word; wl = wl->wl_next; } else if (wl && (*wl->wl_word == '=')) { val = wl->wl_word + 1; wl = wl->wl_next; } else if ((s = strchr(name, '=')) != NULL) { val = s + 1; *s = '\0'; if (*val == '\0') { if (!wl) { fprintf(cp_err, "Error: %s equals what?.\n", name); tfree(name); /*DG: cp_unquote Memory leak: free name before exiting*/ if (ft_stricterror) controlled_exit(EXIT_BAD); return (NULL); } else { val = wl->wl_word; wl = wl->wl_next; } } } else { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /*DG: cp_unquote Memory leak: free name befor exiting */ if (ft_stricterror) controlled_exit(EXIT_BAD); return (NULL); } /* val = cp_unquote(val); DG: bad old val is lost*/ copyval = cp_unquote(val); /*DG*/ strcpy(val, copyval); tfree(copyval); if (eq(val, "(")) { /* ) */ /* The beginning of a list... We have to walk down the * list until we find a close paren... If there are nested * ()'s, treat them as tokens... */ balance = 1; while (wl && wl->wl_word) { if (eq(wl->wl_word, "(")) { balance++; } else if (eq(wl->wl_word, ")")) { if (!--balance) break; } vv = alloc(struct variable); vv->va_next = NULL; copyval = ss = cp_unquote(wl->wl_word); td = ft_numparse(&ss, FALSE); if (td) { vv->va_type = CP_REAL; vv->va_real = *td; } else { vv->va_type = CP_STRING; vv->va_string = copy(ss); } tfree(copyval); /*DG: must free ss any way to avoid cp_unquote memory leak*/ if (listv) { lv->va_next = vv; lv = vv; } else { listv = lv = vv; } wl = wl->wl_next; } if (balance && !wl) { fprintf(cp_err, "Error: bad set form.\n"); tfree(name); /* va: cp_unquote memory leak: free name before exiting */ if (ft_stricterror) controlled_exit(EXIT_BAD); return (NULL); } vv = alloc(struct variable); vv->va_name = copy(name); vv->va_type = CP_LIST; vv->va_vlist = listv; vv->va_next = vars; vars = vv; wl = wl->wl_next; continue; } copyval = ss = cp_unquote(val); td = ft_numparse(&ss, FALSE); vv = alloc(struct variable); vv->va_name = copy(name); vv->va_next = vars; vars = vv; if (td) { /*** We should try to get CP_NUM's... */ vv->va_type = CP_REAL; vv->va_real = *td; } else { vv->va_type = CP_STRING; vv->va_string = copy(val); } tfree(copyval); /*DG: must free ss any way to avoid cp_unquote memory leak */ tfree(name); /* va: cp_unquote memory leak: free name for every loop */ } if (name) tfree(name); return (vars); } /* free the struct variable. The type of the union is given by va_type */ void free_struct_variable(struct variable *v) { while (v) { struct variable *next_v = v->va_next; if (v->va_type == CP_LIST) free_struct_variable(v->va_vlist); if (v->va_type == CP_STRING) tfree(v->va_string); tfree(v); v = next_v; } } void cp_remvar(char *varname) { struct variable *v, *u, *lv = NULL; struct variable *uv1, *uv2; bool found = TRUE; int i, var_index = 0; cp_usrvars(&uv1, &uv2); for (v = variables; v; v = v->va_next) { var_index = 0; if (eq(v->va_name, varname)) break; lv = v; } if (v == NULL) { var_index = 1; lv = NULL; for (v = uv1; v; v = v->va_next) { if (eq(v->va_name, varname)) break; lv = v; } } if (v == NULL) { var_index = 2; lv = NULL; for (v = uv2; v; v = v->va_next) { if (eq(v->va_name, varname)) break; lv = v; } } if (!v) { /* Gotta make up a var struct for cp_usrset()... */ v = alloc(struct variable); ZERO(v, struct variable); v->va_name = copy(varname); v->va_type = CP_NUM; v->va_num = 0; found = FALSE; } /* Note that 'unset history' doesn't do anything here... Causes * trouble... */ if (eq(varname, "noglob")) cp_noglob = FALSE; else if (eq(varname, "nonomatch")) cp_nonomatch = FALSE; else if (eq(varname, "noclobber")) cp_noclobber = FALSE; else if (eq(varname, "echo")) /*CDHW*/ cp_echo = FALSE; /*CDHW*/ else if (eq(varname, "prompt")) cp_promptstring = NULL; else if (eq(varname, "cpdebug")) cp_debug = FALSE; else if (eq(varname, "ignoreeof")) cp_ignoreeof = FALSE; else if (eq(varname, "program")) cp_program = ""; switch (i = cp_usrset(v, FALSE)) { case US_OK: /* Normal case. */ if (found) { if (lv) lv->va_next = v->va_next; else if (var_index == 0) { variables = v->va_next; } else if (var_index == 1) { uv1 = v->va_next; } else { ft_curckt->ci_vars = v->va_next; } } break; case US_DONTRECORD: /* Do nothing... */ if (found) fprintf(cp_err, "cp_remvar: Internal Error: var %d\n", *varname); break; case US_READONLY: /* Badness... */ fprintf(cp_err, "Error: %s is read-only.\n", v->va_name); if (found) fprintf(cp_err, "cp_remvar: Internal Error: var %d\n", *varname); break; case US_SIMVAR: fprintf(stderr, "it's a US_SIMVAR!\n"); lv = NULL; if (ft_curckt) { for (u = ft_curckt->ci_vars; u; u = u->va_next) { if (eq(varname, u->va_name)) break; lv = u; } if (u) { if (lv) lv->va_next = u->va_next; else ft_curckt->ci_vars = u->va_next; tfree(u); } } break; default: fprintf(cp_err, "cp_remvar: Internal Error: US val %d\n", i); break; } v->va_next = NULL; tfree(v->va_name); free_struct_variable(v); free_struct_variable(uv1); } /* Determine the value of a variable. Fail if the variable is unset, * and if the type doesn't match, try and make it work... */ bool cp_getvar(char *name, enum cp_types type, void *retval) { struct variable *v; struct variable *uv1, *uv2; cp_usrvars(&uv1, &uv2); #ifdef TRACE /* SDB debug statement */ fprintf(stderr, "in cp_getvar, trying to get value of variable %s.\n", name); #endif for (v = variables; v && !eq(name, v->va_name); v = v->va_next) ; if (v == NULL) for (v = uv1; v && !eq(name, v->va_name); v = v->va_next) ; if (v == NULL) for (v = uv2; v && !eq(name, v->va_name); v = v->va_next) ; if (v == NULL) { if (type == CP_BOOL && retval) * (bool *) retval = FALSE; free_struct_variable(uv1); return (FALSE); } if (v->va_type == type) { switch (type) { case CP_BOOL: if (retval) * (bool *) retval = TRUE; break; case CP_NUM: { int *i; i = (int *) retval; *i = v->va_num; break; } case CP_REAL: { double *d; d = (double *) retval; *d = v->va_real; break; } case CP_STRING: { /* Gotta be careful to have room. */ char *s; s = cp_unquote(v->va_string); cp_wstrip(s); (void) strcpy((char*) retval, s); tfree(s);/*DG*/ break; } case CP_LIST: { /* Funny case... */ struct variable **tv; tv = (struct variable **) retval; *tv = v->va_vlist; break; } default: fprintf(cp_err, "cp_getvar: Internal Error: bad var type %d.\n", type); break; } free_struct_variable(uv1); // tfree(uv2); return (TRUE); } else { /* Try to coerce it.. */ if ((type == CP_NUM) && (v->va_type == CP_REAL)) { int *i; i = (int *) retval; *i = (int) v->va_real; free_struct_variable(uv1); return (TRUE); } else if ((type == CP_REAL) && (v->va_type == CP_NUM)) { double *d; d = (double *) retval; *d = (double) v->va_num; free_struct_variable(uv1); return (TRUE); } else if ((type == CP_STRING) && (v->va_type == CP_NUM)) { (void) sprintf((char*) retval, "%d", v->va_num); free_struct_variable(uv1); return (TRUE); } else if ((type == CP_STRING) && (v->va_type == CP_REAL)) { (void) sprintf((char*) retval, "%f", v->va_real); free_struct_variable(uv1); return (TRUE); } free_struct_variable(uv1); return (FALSE); } } /* A variable substitution is indicated by a $, and the variable name * is the following string of non-special characters. All variable * values are inserted as a single word, except for lists, which are a * list of words. A routine cp_usrset must be supplied by the host * program to deal with variables that aren't used by cshpar -- it * should be cp_usrset(var, isset), where var is a variable *, and * isset is TRUE if the variable is being set, FALSE if unset. Also * required is a routine cp_enqvar(name) which returns a struct * variable *, which allows the host program to provide values for * non-cshpar variables. */ char cp_dol = '$'; /* Non-alphanumeric characters that may appear in variable names. < is very * special... */ #define VALIDCHARS "$-_<#?@.()[]&" char * span_var_expr(char *t) { int parenthesis = 0; int brackets = 0; while (*t && (isalphanum(*t) || strchr(VALIDCHARS, *t))) switch (*t++) { case '[': brackets++; break; case '(': parenthesis++; break; case ']': if (brackets <= 0) return t-1; if (--brackets <= 0) return t; break; case ')': if (parenthesis <= 0) return t-1; if (--parenthesis <= 0) return t; break; default: break; } return t; } /* Substitute variable name by its value and restore to wordlist */ wordlist * cp_variablesubst(wordlist *wlist) { wordlist *wl, *nwl; char *s, *t, buf[BSIZE_SP], wbuf[BSIZE_SP], tbuf[BSIZE_SP]; /* tbuf holds current word after wl_splice() calls free() on it */ int i; for (wl = wlist; wl; wl = wl->wl_next) { t = wl->wl_word; i = 0; while ((s = strchr(t, cp_dol)) != NULL) { while (t < s) wbuf[i++] = *t++; wbuf[i] = '\0'; t++; s = buf; /* Get s and t past the end of the var name. */ { char *end = span_var_expr(t); while (t < end) *s++ = *t++; } *s = '\0'; nwl = vareval(buf); if (i) { (void) strcpy(buf, wbuf); if (nwl) { (void) strcat(buf, nwl->wl_word); tfree(nwl->wl_word); nwl->wl_word = copy(buf); } else { nwl = wl_cons(copy(buf), NULL); } } (void) strcpy(tbuf, t); /* Save t*/ if ((wl = wl_splice(wl, nwl)) == NULL) {/* this frees wl */ wl_free(nwl); return (NULL); } /* Go back to beginning of wlist */ for (wlist = wl; wlist->wl_prev; wlist = wlist->wl_prev) ; /* limit copying to buffer of size BSIZE_SP */ (void) strncpy(buf, wl->wl_word, BSIZE_SP - 1 - strlen(tbuf)); i = (int) strlen(buf); if (i == BSIZE_SP - 1) fprintf(stderr, "\nWarning: output truncated to %d characters!\n\n", i); (void) strcat(buf, tbuf); /* tbuf is used here only */ tfree(wl->wl_word); wl->wl_word = copy(buf); t = &wl->wl_word[i]; s = wl->wl_word; for (i = 0; s < t; s++) wbuf[i++] = *s; } } return (wlist); } /* Evaluate a variable. */ wordlist * vareval(char *string) { struct variable *v; wordlist *wl; char buf[BSIZE_SP], *s; char *oldstring = copy(string); char *range = NULL; int i, up, low; cp_wstrip(string); if ((s = strchr(string, '[')) != NULL) { *s = '\0'; range = s + 1; } switch (*string) { case '$': (void) sprintf(buf, "%d", getpid()); wl = wl_cons(copy(buf), NULL); tfree(oldstring); return (wl); case '<': (void) fflush(cp_out); if (!fgets(buf, BSIZE_SP, cp_in)) { clearerr(cp_in); (void) strcpy(buf, "EOF"); } for (s = buf; *s && (*s != '\n'); s++) ; *s = '\0'; wl = cp_lexer(buf); /* This is a hack. */ if (!wl->wl_word) wl->wl_word = copy(""); tfree(oldstring); return (wl); case '?': string++; for (v = variables; v; v = v->va_next) if (eq(v->va_name, string)) break; if (!v) v = cp_enqvar(string); wl = wl_cons(copy(v ? "1" : "0"), NULL); tfree(oldstring); return (wl); case '#': string++; for (v = variables; v; v = v->va_next) if (eq(v->va_name, string)) break; if (!v) v = cp_enqvar(string); if (!v) { fprintf(cp_err, "Error: %s: no such variable.\n", string); tfree(oldstring); return (NULL); } if (v->va_type == CP_LIST) for (v = v->va_vlist, i = 0; v; v = v->va_next) i++; else i = (v->va_type != CP_BOOL); (void) sprintf(buf, "%d", i); wl = wl_cons(copy(buf), NULL); tfree(oldstring); return (wl); case '\0': wl = wl_cons(copy("$"), NULL); tfree(oldstring); return (wl); } /* The notation var[stuff] has two meanings... If this is a real * variable, then the [] denotes range, but if this is a strange * (e.g, device parameter) variable, it could be anything... */ for (v = variables; v; v = v->va_next) if (eq(v->va_name, string)) break; if (!v && isdigit(*string)) { for (v = variables; v; v = v->va_next) if (eq(v->va_name, "argv")) break; range = string; } if (!v) { range = NULL; string = oldstring; v = cp_enqvar(string); } if (!v && (s = getenv(string)) != NULL) { wl = wl_cons(copy(s), NULL); tfree(oldstring); return (wl); } if (!v) { fprintf(cp_err, "Error: %s: no such variable.\n", string); tfree(oldstring); return (NULL); } wl = cp_varwl(v); /* Now parse and deal with 'range' ... */ if (range) { /* rather crude fix when range itself is a $expression */ wordlist *r = NULL; if (*range == '$') { char *t = ++range; if (*t == '&') t++; while (isalphanum(*t)) t++; *t = '\0'; r = vareval(range); if (!r || r->wl_next) { fprintf(cp_err, "Error: %s: illegal index.\n", string); tfree(oldstring); wl_free(r); return NULL; } range = r->wl_word; } for (low = 0; isdigit(*range); range++) low = low * 10 + *range - '0'; if ((*range == '-') && isdigit(range[1])) for (up = 0, range++; isdigit(*range); range++) up = up * 10 + *range - '0'; else if (*range == '-') up = wl_length(wl); else up = low; up--, low--; wl = wl_range(wl, low, up); wl_free(r); } tfree(oldstring); return (wl); } static int vcmp(const void *a, const void *b) { int i; struct xxx *v1 = (struct xxx *) a; struct xxx *v2 = (struct xxx *) b; if ((i = strcmp(v1->x_v->va_name, v2->x_v->va_name)) != 0) return (i); else return (v1->x_char - v2->x_char); } /* Print the values of currently defined variables. */ void cp_vprint(void) { struct variable *v; struct variable *uv1, *uv2; wordlist *wl; int i, j; char *s; struct xxx *vars; cp_usrvars(&uv1, &uv2); for (v = uv1, i = 0; v; v = v->va_next) i++; for (v = uv2; v; v = v->va_next) i++; for (v = variables; v; v = v->va_next) i++; vars = TMALLOC(struct xxx, i); out_init(); for (v = variables, i = 0; v; v = v->va_next, i++) { vars[i].x_v = v; vars[i].x_char = ' '; } for (v = uv1; v; v = v->va_next, i++) { vars[i].x_v = v; vars[i].x_char = '*'; } for (v = uv2; v; v = v->va_next, i++) { vars[i].x_v = v; vars[i].x_char = '+'; } qsort(vars, (size_t) i, sizeof(*vars), vcmp); for (j = 0; j < i; j++) { if (j && eq(vars[j].x_v->va_name, vars[j-1].x_v->va_name)) continue; v = vars[j].x_v; if (v->va_type == CP_BOOL) { out_printf("%c %s\n", vars[j].x_char, v->va_name); } else { out_printf("%c %s\t", vars[j].x_char, v->va_name); wl = vareval(v->va_name); s = wl_flatten(wl); if (v->va_type == CP_LIST) out_printf("( %s )\n", s); else out_printf("%s\n", s); } } tfree(vars); } ngspice-26/src/frontend/com_unset.h0000644000265600020320000000027212264261473017005 0ustar andreasadmin/************* * Header file for com_unset.c ************/ #ifndef ngspice_COM_UNSET_H #define ngspice_COM_UNSET_H #include "ngspice/wordlist.h" void com_unset(wordlist *wl); #endif ngspice-26/src/frontend/streams.c0000644000265600020320000001130112264261473016455 0ustar andreasadmin/************* * streams.c ************/ #include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include "variable.h" #include "terminal.h" #include "quote.h" #include "ngspice/cpextern.h" #include "streams.h" bool cp_debug = FALSE; char cp_gt = '>'; char cp_lt = '<'; char cp_amp = '&'; FILE *cp_in = NULL; FILE *cp_out = NULL; FILE *cp_err = NULL; /* These are the fps that cp_ioreset resets the cp_* to. They are * changed by the source routines. */ FILE *cp_curin = NULL; FILE *cp_curout = NULL; FILE *cp_curerr = NULL; static bool fileexists(char *name) { #ifdef HAVE_ACCESS if (access(name, 0) == 0) return (TRUE); #endif return (FALSE); } /* This routine sets the cp_{in,out,err} pointers and takes the io * directions out of the command line. */ wordlist * cp_redirect(wordlist *wl) { int gotinput = 0, gotoutput = 0, goterror = 0, append = 0; wordlist *w; char *fname; FILE *fp; w = wl->wl_next; /* Don't consider empty commands. */ while (w) { if (*w->wl_word == cp_lt) { wordlist *beg = w; if (gotinput++) { fprintf(cp_err, "Error: ambiguous input redirect.\n"); goto error; } w = w->wl_next; if (w && *w->wl_word == cp_lt) { fprintf(cp_err, "Error: `<<' redirection is not implemented.\n"); goto error; } if (!w) { fprintf(cp_err, "Error: missing name for input.\n"); return (NULL); } fname = cp_unquote(w->wl_word); w = w->wl_next; #ifdef CPDEBUG if (cp_debug) fprintf(cp_err, "Input file is %s...\n", fname); #endif fp = fopen(fname, "r"); tfree(fname); if (!fp) { perror(fname); goto error; } cp_in = fp; wl_delete_slice(beg, w); } else if (*w->wl_word == cp_gt) { wordlist *beg = w; if (gotoutput++) { fprintf(cp_err, "Error: ambiguous output redirect.\n"); goto error; } w = w->wl_next; if (w && *w->wl_word == cp_gt) { append++; w = w->wl_next; } if (w && *w->wl_word == cp_amp) { if (goterror++) { fprintf(cp_err, "Error: ambiguous error redirect.\n"); return (NULL); } w = w->wl_next; } if (!w) { fprintf(cp_err, "Error: missing name for output.\n"); return (NULL); } fname = cp_unquote(w->wl_word); w = w->wl_next; #ifdef CPDEBUG if (cp_debug) fprintf(cp_err, "Output file is %s... %s\n", fname, append ? "(append)" : ""); #endif if (cp_noclobber && fileexists(fname)) { fprintf(stderr, "Error: %s: file exists\n", fname); goto error; } fp = fopen(fname, append ? "a" : "w+"); tfree(fname); if (!fp) { perror(fname); goto error; } cp_out = fp; if (goterror) cp_err = fp; out_isatty = FALSE; wl_delete_slice(beg, w); } else { w = w->wl_next; } } return (wl); error: wl_free(wl); /* FIXME, Ouch !! */ return (NULL); } /* Reset the cp_* FILE pointers to the standard ones. This is tricky, * since if we are sourcing a command file, and io has been redirected * from inside the file, we have to reset it back to what it was for * the source, not for the top level. That way if you type "foo > * bar" where foo is a script, and it has redirections of its own * inside of it, none of the output from foo will get sent to * stdout... */ void cp_ioreset(void) { if (cp_in != cp_curin) if (cp_in) fclose(cp_in); if (cp_out != cp_curout) if (cp_out) fclose(cp_out); if (cp_err != cp_curerr) if (cp_err && cp_err != cp_out) fclose(cp_err); cp_in = cp_curin; cp_out = cp_curout; cp_err = cp_curerr; /*** Minor bug here... */ out_isatty = TRUE; } /* Do this only right before an exec, since we lose the old std*'s. */ void fixdescriptors(void) { if (cp_in != stdin) dup2(fileno(cp_in), fileno(stdin)); if (cp_out != stdout) dup2(fileno(cp_out), fileno(stdout)); if (cp_err != stderr) dup2(fileno(cp_err), fileno(stderr)); } ngspice-26/src/frontend/hpgl.c0000644000265600020320000001551612264261473015745 0ustar andreasadmin/********** Author: Jim Groves **********/ /* HPGL driver */ /* 1000 plotter units / inch - 1pu = 0.025mm 1pu = 1mil SP - select pen PU - pen up (PU x,y) PD - pen down (PD x,y) LT - line type 0 dots only at plotted points 1 . . . . . 2 ___ ___ ___ ___ 3 ---- ---- ---- ---- 4 ----- . ----- . ----- . -----. 5 ---- - ---- - ---- - 6 --- - - --- - - --- - - --- - - null - solid line IN - initialize DF - default values (PA, solid line, set 0) PA - plot absolute SI - absolute character size (SI width, height) in cm */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "ngspice/ftedev.h" #include "ngspice/fteinput.h" #include "ngspice/fteext.h" #include "variable.h" #include "plotting/graphdb.h" #include "hpgl.h" #define RAD_TO_DEG (180.0 / M_PI) #define DEVDEP(g) (*((GLdevdep *) (g)->devdep)) #define MAX_GL_LINES 9999 #define SOLID 0 #define DOTTED 1 #define gtype graph->grid.gridtype #define xoff dispdev->minx #define yoff dispdev->miny #define XOFF 25 /* printer left margin */ #define YOFF 28 /* printer bottom margin */ #define XTADJ 0 /* printer text adjustment x */ #define YTADJ 0 /* printer text adjustment y */ #define DELXMAX 360 /* printer gridsize divisible by 10, [7-2] */ #define DELYMAX 360 /* printer gridsize divisible by [10-8], [6-2] */ #define FONTWIDTH 6 /* printer default fontwidth */ #define FONTHEIGHT 8 /* printer default fontheight */ typedef struct { int lastlinestyle; /* initial invalid value */ int lastx, lasty, linecount; } GLdevdep; static char *linestyle[] = { "", /* solid */ "1", /* was 1 - dotted */ "", /* longdashed */ "3", /* shortdashed */ "4", /* longdotdashed */ "5", /* shortdotdashed */ "1" }; static FILE *plotfile; extern char psscale[32]; static int fontwidth = FONTWIDTH; static int fontheight = FONTHEIGHT; static int jgmult = 10; static int screenflag = 0; static double tocm = 0.0025; static double scale; /* Used for fine tuning */ static int hcopygraphid; int GL_Init(void) { if (!cp_getvar("hcopyscale", CP_STRING, psscale)) { scale = 1.0; } else { sscanf(psscale, "%lf", &scale); if ((scale <= 0) || (scale > 10)) scale = 1.0; } dispdev->numlinestyles = NUMELEMS(linestyle); dispdev->numcolors = 6; dispdev->width = (int)(DELXMAX * scale); dispdev->height = (int)(DELYMAX * scale); screenflag = 0; dispdev->minx = (int)(XOFF * 1.0); dispdev->miny = (int)(YOFF * 1.0); return (0); } /* devdep initially contains name of output file */ int GL_NewViewport(GRAPH *graph) { hcopygraphid = graph->graphid; if ((plotfile = fopen((char*) graph->devdep, "w")) == NULL) { perror((char*) graph->devdep); graph->devdep = NULL; return (1); } if (graph->absolute.width) { /* hardcopying from the screen */ screenflag = 1; /* scale to fit on 8 1/2 square */ } /* reasonable values, used in gr_ for placement */ graph->fontwidth = (int)(fontwidth * scale); /* was 12, p.w.h. */ graph->fontheight = (int)(fontheight * scale); /* was 24, p.w.h. */ graph->absolute.width = dispdev->width; graph->absolute.height = dispdev->height; /* Also done in gr_init, if called . . . */ graph->viewportxoff = 16 * fontwidth; graph->viewportyoff = 8 * fontheight; xoff = XOFF; yoff = YOFF; /* start file off with a % */ fprintf(plotfile, "IN;DF;PA;"); fprintf(plotfile, "SI %f,%f;", tocm*jgmult*fontwidth*scale, tocm*jgmult*fontheight*scale); #ifdef notdef if (!screenflag) #endif graph->devdep = TMALLOC(GLdevdep, 1); DEVDEP(graph).lastlinestyle = -1; DEVDEP(graph).lastx = -1; DEVDEP(graph).lasty = -1; DEVDEP(graph).linecount = 0; graph->linestyle = -1; return 0; } int GL_Close(void) { /* in case GL_Close is called as part of an abort, w/o having reached GL_NewViewport */ if (plotfile) { if (DEVDEP(currentgraph).lastlinestyle != -1) { DEVDEP(currentgraph).linecount = 0; } fclose(plotfile); plotfile = NULL; } /* In case of hardcopy command destroy the hardcopy graph * and reset currentgraph to graphid 1, if possible */ if (!screenflag) { DestroyGraph(hcopygraphid); currentgraph = FindGraph(1); } return 0; } int GL_Clear(void) { /* do nothing */ return 0; } int GL_DrawLine(int x1, int y1, int x2, int y2) { /* note: this is not extendible to more than one graph => will have to give NewViewport a writeable graph XXX */ if (DEVDEP(currentgraph).linecount == 0 || x1 != DEVDEP(currentgraph).lastx || y1 != DEVDEP(currentgraph).lasty) { fprintf(plotfile, "PU;PA %d , %d ;", jgmult*(x1 + xoff), jgmult*(y1 + yoff)); } if (x1 != x2 || y1 != y2) { fprintf(plotfile, "PD;PA %d , %d ;", jgmult*(x2 + xoff), jgmult*(y2 + yoff)); DEVDEP(currentgraph).linecount += 1; } DEVDEP(currentgraph).lastx = x2; DEVDEP(currentgraph).lasty = y2; DEVDEP(currentgraph).lastlinestyle = currentgraph->linestyle; return 0; } /* ARGSUSED */ int GL_Arc(int x0, int y0, int r, double theta, double delta_theta) { int x1, y1, angle; x1 = x0 + (int)(r * cos(theta)); y1 = y0 + (int)(r * sin(theta)); angle = (int)(RAD_TO_DEG * delta_theta); fprintf(plotfile, "PU;PA %d , %d;", jgmult*(x1+xoff+XTADJ), jgmult*(y1+yoff+YTADJ)); fprintf(plotfile, "PD;AA %d , %d, %d;", jgmult*(x0+xoff+XTADJ), jgmult*(y0+yoff+YTADJ), angle); DEVDEP(currentgraph).linecount = 0; return 0; } int GL_Text(char *text, int x, int y) { /* move to (x, y) */ fprintf(plotfile, "PU;PA %d , %d;", jgmult*(x+xoff+XTADJ), jgmult*(y+yoff+YTADJ)); fprintf(plotfile, "LB %s \x03", text); DEVDEP(currentgraph).lastx = -1; DEVDEP(currentgraph).lasty = -1; return 0; } int GL_SetLinestyle(int linestyleid) { /* special case get it when GL_Text restores a -1 linestyle */ if (linestyleid == -1) { currentgraph->linestyle = -1; return 0; } if (linestyleid < 0 || linestyleid > dispdev->numlinestyles) { internalerror("bad linestyleid"); return 0; } if (currentgraph->linestyle != linestyleid) { fprintf(plotfile, "LT %s ;", linestyle[linestyleid]); currentgraph->linestyle = linestyleid; } return 0; } /* ARGSUSED */ int GL_SetColor(int colorid) { fprintf(plotfile, "SP %d;", colorid); return 0; } int GL_Update(void) { fflush(plotfile); return 0; } ngspice-26/src/frontend/com_ghelp.h0000644000265600020320000000014112264261473016741 0ustar andreasadmin#ifndef ngspice_COM_GHELP_H #define ngspice_COM_GHELP_H void com_ghelp(wordlist *wl); #endif ngspice-26/src/frontend/inventory.c0000644000265600020320000000213312264261473017037 0ustar andreasadmin/********** Copyright 2010 Paolo Nenzi. All rights reserved. Author: 2010 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/optdefs.h" #include "ngspice/dvec.h" #include "ftehelp.h" #include "ngspice/hlpdefs.h" #include "circuits.h" #include "where.h" /* The inventory command shows the number of instances for each device in the current circuit. */ void com_inventory(wordlist *wl) { CKTcircuit *circuit = NULL; STATistics *stat = NULL; STATdevList *devList = NULL; int k; NG_IGNORE(wl); if (!ft_curckt) { fprintf(cp_err, "There is no current circuit\n"); return; } circuit = ft_curckt->ci_ckt; stat = circuit->CKTstat; devList = stat->STATdevNum; out_init(); out_send("Circuit Inventory\n\n"); for (k = 0; k < ft_sim->numDevices; k++) if (ft_sim->devices[k]) out_printf("%s: %d\n", ft_sim->devices[k]->name, devList[k].instNum); out_send("\n"); } ngspice-26/src/frontend/rawfile.h0000644000265600020320000000021412264261473016436 0ustar andreasadmin/************* * Header file for rawfile.c * 1999 E. Rouat ************/ #ifndef ngspice_RAWFILE_H #define ngspice_RAWFILE_H #endif ngspice-26/src/frontend/com_compose.h0000644000265600020320000000020612264261473017311 0ustar andreasadmin #ifndef ngspice_COM_COMPOSE_H #define ngspice_COM_COMPOSE_H #include "ngspice/wordlist.h" void com_compose(wordlist *wl); #endif ngspice-26/src/frontend/shyu.h0000644000265600020320000000020212264261473015772 0ustar andreasadmin/************* * Header file for shyu.c * 1999 E. Rouat ************/ #ifndef ngspice_SHYU_H #define ngspice_SHYU_H #endif ngspice-26/src/frontend/diff.c0000644000265600020320000002472112264261473015721 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi (printnum) Patched: 2010/2012 by Bill Swartz (hash table for vectors) **********/ /* * Do a 'diff' of two plots. */ #include "ngspice/ngspice.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/sim.h" #include "diff.h" #include #include #include "variable.h" static char * cannonical_name(char *name, SPICE_DSTRINGPTR dbuf_p) { char *tmp; /* position in string */ char *ptr; /* current position in string */ spice_dstring_reinit(dbuf_p); if (ciprefix("i(",name)) { tmp = name; while (*tmp != '(') tmp++; tmp++; for (ptr = tmp; *ptr; ptr++) if (isupper(*ptr)) tmp = spice_dstring_append_char(dbuf_p, (char)tolower(*ptr)); else tmp = spice_dstring_append_char(dbuf_p, *ptr); while (*tmp != ')') tmp++; *tmp = '\0'; tmp = spice_dstring_append(dbuf_p, "#branch", -1); } else if (isdigit(*name)) { spice_dstring_append(dbuf_p, "v(", -1); spice_dstring_append(dbuf_p, name, -1); tmp = spice_dstring_append_char(dbuf_p, ')'); } else { tmp = spice_dstring_append(dbuf_p, name, -1); } return(tmp); } /* Determine if two vectors have the 'same' name. */ static bool nameeq(char *n1, char *n2) { char buf1[BSIZE_SP], buf2[BSIZE_SP]; char *tmp; if (eq(n1, n2)) return (TRUE); /* n1 or n2 is in the form i(...) or I(...) * This happens in the saved rawfile */ if (ciprefix("i(", n1)) { tmp = n1; while (*tmp != '(') tmp++; tmp++; (void) strcpy(buf1, tmp); tmp = buf1; while (*tmp != ')') tmp++; *tmp = '\0'; (void) strcat(buf1, "#branch"); } else if (isdigit(*n1)) { (void) sprintf(buf1, "v(%s)", n1); } else { (void) strcpy(buf1, n1); } if (ciprefix("i(", n2)) { tmp = n2; while (*tmp != '(') tmp++; tmp++; (void) strcpy(buf2, tmp); tmp = buf2; while (*tmp != ')') tmp++; *tmp = '\0'; (void) strcat(buf2, "#branch"); } else if (isdigit(*n2)) { (void) sprintf(buf2, "v(%s)", n2); } else { (void) strcpy(buf2, n2); } return (cieq(buf1, buf2) ? TRUE : FALSE); } void com_diff(wordlist *wl) { double vntol, abstol, reltol, tol, cmax, cm1, cm2; struct plot *p1, *p2 = NULL; struct dvec *v1, *v2; double d1, d2; ngcomplex_t c1, c2, c3; int i, j; char *v1_name; /* cannonical v1 name */ char *v2_name; /* cannonical v2 name */ NGHASHPTR crossref_p; /* cross reference hash table */ SPICE_DSTRING ibuf; /* used to build cannonical name */ wordlist *tw; char numbuf[BSIZE_SP], numbuf2[BSIZE_SP], numbuf3[BSIZE_SP], numbuf4[BSIZE_SP]; /* For printnum */ if (!cp_getvar("diff_vntol", CP_REAL, &vntol)) vntol = 1.0e-6; if (!cp_getvar("diff_abstol", CP_REAL, &abstol)) abstol = 1.0e-12; if (!cp_getvar("diff_reltol", CP_REAL, &reltol)) reltol = 0.001; /* Let's try to be clever about defaults. This code is ugly. */ if (!wl || !wl->wl_next) { if (plot_list && plot_list->pl_next && !plot_list->pl_next->pl_next) { p1 = plot_list; p2 = plot_list->pl_next; if (wl && !eq(wl->wl_word, p1->pl_typename) && !eq(wl->wl_word, p2->pl_typename)) { fprintf(cp_err, "Error: no such plot \"%s\"\n", wl->wl_word); return; } fprintf(cp_err, "Plots are \"%s\" and \"%s\"\n", plot_list->pl_typename, plot_list->pl_next->pl_typename); if (wl) wl = NULL; } else { fprintf(cp_err, "Error: plot names not given.\n"); return; } } else { for (p1 = plot_list; p1; p1 = p1->pl_next) if (eq(wl->wl_word, p1->pl_typename)) break; if (!p1) { fprintf(cp_err, "Error: no such plot %s\n", wl->wl_word); return; } wl = wl->wl_next; } if (!p2) { for (p2 = plot_list; p2; p2 = p2->pl_next) if (eq(wl->wl_word, p2->pl_typename)) break; if (!p2) { fprintf(cp_err, "Error: no such plot %s\n", wl->wl_word); return; } wl = wl->wl_next; } /* Now do some tests to make sure these plots are really the * same type, etc. */ if (!eq(p1->pl_name, p2->pl_name)) fprintf(cp_err, "Warning: plots %s and %s seem to be of different types\n", p1->pl_typename, p2->pl_typename); if (!eq(p1->pl_title, p2->pl_title)) fprintf(cp_err, "Warning: plots %s and %s seem to be from different circuits\n", p1->pl_typename, p2->pl_typename); /* This may not be the best way to do this. It wasn't :). The original * was O(n2) - not good. Now use a hash table to reduce it to O(n). */ for (v1 = p1->pl_dvecs; v1; v1 = v1->v_next) v1->v_link2 = NULL; spice_dstring_init(&ibuf); crossref_p = nghash_init(NGHASH_MIN_SIZE); nghash_unique(crossref_p, FALSE); for (v2 = p2->pl_dvecs; v2; v2 = v2->v_next) { v2->v_link2 = NULL; v2_name = cannonical_name(v2->v_name, &ibuf); nghash_insert(crossref_p, v2_name, v2); } for (v1 = p1->pl_dvecs; v1; v1 = v1->v_next) { v1_name = cannonical_name(v1->v_name, &ibuf); for (v2 = nghash_find(crossref_p, v1_name); v2; v2 = nghash_find_again(crossref_p, v1_name)) { if (!v2->v_link2 && ((v1->v_flags & (VF_REAL | VF_COMPLEX)) == (v2->v_flags & (VF_REAL | VF_COMPLEX))) && (v1->v_type == v2->v_type)) { v1->v_link2 = v2; v2->v_link2 = v1; break; } } } spice_dstring_free(&ibuf); nghash_free(crossref_p, NULL, NULL); for (v1 = p1->pl_dvecs; v1; v1 = v1->v_next) if (!v1->v_link2) fprintf(cp_err, ">>> %s vector %s in %s not in %s, or of wrong type\n", isreal(v1) ? "real" : "complex", v1->v_name, p1->pl_typename, p2->pl_typename); for (v2 = p2->pl_dvecs; v2; v2 = v2->v_next) if (!v2->v_link2) fprintf(cp_err, ">>> %s vector %s in %s not in %s, or of wrong type\n", isreal(v2) ? "real" : "complex", v2->v_name, p2->pl_typename, p1->pl_typename); /* Throw out the ones that aren't in the arg list */ if (wl && !eq(wl->wl_word, "all")) { /* Just in case */ for (v1 = p1->pl_dvecs; v1; v1 = v1->v_next) if (v1->v_link2) { for (tw = wl; tw; tw = tw->wl_next) if (nameeq(v1->v_name, tw->wl_word)) break; if (!tw) v1->v_link2 = NULL; } for (v2 = p2->pl_dvecs; v2; v2 = v2->v_next) if (v2->v_link2) { for (tw = wl; tw; tw = tw->wl_next) if (nameeq(v2->v_name, tw->wl_word)) break; if (!tw) v2->v_link2 = NULL; } } /* Now we have all the vectors linked to their twins. Travel * down each one and print values that differ enough. */ for (v1 = p1->pl_dvecs; v1; v1 = v1->v_next) { if (!v1->v_link2) continue; v2 = v1->v_link2; if (v1->v_type == SV_VOLTAGE) tol = vntol; else tol = abstol; j = MAX(v1->v_length, v2->v_length); for (i = 0; i < j; i++) { if (v1->v_length <= i) { fprintf(cp_out, ">>> %s is %d long in %s and %d long in %s\n", v1->v_name, v1->v_length, p1->pl_typename, v2->v_length, p2->pl_typename); break; } else if (v2->v_length <= i) { fprintf(cp_out, ">>> %s is %d long in %s and %d long in %s\n", v2->v_name, v2->v_length, p2->pl_typename, v1->v_length, p1->pl_typename); break; } else { if (isreal(v1)) { d1 = v1->v_realdata[i]; d2 = v2->v_realdata[i]; if (MAX(fabs(d1), fabs(d2)) * reltol + tol < fabs(d1 - d2)) { printnum(numbuf, d1); fprintf(cp_out, "%s.%s[%d] = %-15s ", p1->pl_typename, v1->v_name, i, numbuf); printnum(numbuf, d2); fprintf(cp_out, "%s.%s[%d] = %s\n", p2->pl_typename, v2->v_name, i, numbuf); } } else { c1 = v1->v_compdata[i]; c2 = v2->v_compdata[i]; realpart(c3) = realpart(c1) - realpart(c2); imagpart(c3) = imagpart(c1) - imagpart(c2); /* Stupid evil PC compilers */ cm1 = cmag(c1); cm2 = cmag(c2); cmax = MAX(cm1, cm2); if (cmax * reltol + tol < cmag(c3)) { printnum(numbuf, realpart(c1)); printnum(numbuf2, imagpart(c1)); printnum(numbuf3, realpart(c2)); printnum(numbuf4, imagpart(c2)); fprintf(cp_out, "%s.%s[%d] = %-10s, %-10s %s.%s[%d] = %-10s, %s\n", p1->pl_typename, v1->v_name, i, numbuf, numbuf2, p2->pl_typename, v2->v_name, i, numbuf3, numbuf4); } } } } } } ngspice-26/src/frontend/quote.h0000644000265600020320000000020612264261473016143 0ustar andreasadmin/************* * Header file for quote.c * 1999 E. Rouat ************/ #ifndef ngspice_QUOTE_H #define ngspice_QUOTE_H #endif ngspice-26/src/frontend/arg.h0000644000265600020320000000105612264261473015563 0ustar andreasadmin/************* * Header file for arg.c * 1999 E. Rouat ************/ #ifndef ngspice_ARG_H #define ngspice_ARG_H char *prompt(FILE *fp); int countargs(wordlist *wl); wordlist *process(wordlist *wlist); void arg_print(wordlist *wl, struct comm *command); void arg_plot(wordlist *wl, struct comm *command); void arg_load(wordlist *wl, struct comm *command); void arg_let(wordlist *wl, struct comm *command); void arg_set(wordlist *wl, struct comm *command); void arg_display(wordlist *wl, struct comm *command); void outmenuprompt(char *string); #endif ngspice-26/src/frontend/postcoms.c0000644000265600020320000006705612264261473016670 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Various post-processor commands having to do with vectors. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/sim.h" #include "ngspice/plot.h" #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "com_display.h" #include "completion.h" #include "postcoms.h" #include "quote.h" #include "variable.h" #include "parser/complete.h" /* va: throwaway */ #include "plotting/plotting.h" static void killplot(struct plot *pl); static void DelPlotWindows(struct plot *pl); void com_unlet(wordlist *wl) { while (wl) { vec_remove(wl->wl_word); wl = wl->wl_next; } } /* Load in a file. */ void com_load(wordlist *wl) { char *copypath; if (!wl) ft_loadfile(ft_rawfile); else while (wl) { /*ft_loadfile(cp_unquote(wl->wl_word)); DG: bad memory leak*/ copypath = cp_unquote(wl->wl_word);/*DG*/ ft_loadfile(copypath); tfree(copypath); wl = wl->wl_next; } /* note: default is to display the vectors in the last (current) plot */ com_display(NULL); } /* Print out the value of an expression. When we are figuring out what to * print, link the vectors we want with v_link2... This has to be done * because of the way temporary vectors are linked together with permanent * ones under the plot. */ void com_print(wordlist *wl) { struct dvec *v, *lv = NULL, *bv, *nv, *vecs = NULL; int i, j, ll, width = DEF_WIDTH, height = DEF_HEIGHT, npoints, lineno; struct pnode *pn, *names; struct plot *p; bool col = TRUE, nobreak = FALSE, noprintscale, plotnames = FALSE; bool optgiven = FALSE; char *s, *buf, *buf2; /*, buf[BSIZE_SP], buf2[BSIZE_SP];*/ char numbuf[BSIZE_SP], numbuf2[BSIZE_SP]; /* Printnum buffers */ int ngood; if (wl == NULL) return; buf = TMALLOC(char, BSIZE_SP); buf2 = TMALLOC(char, BSIZE_SP); if (eq(wl->wl_word, "col")) { col = TRUE; optgiven = TRUE; wl = wl->wl_next; } else if (eq(wl->wl_word, "line")) { col = FALSE; optgiven = TRUE; wl = wl->wl_next; } ngood = 0; names = ft_getpnames(wl, TRUE); for (pn = names; pn; pn = pn->pn_next) { if ((v = ft_evaluate(pn)) == NULL) continue; if (!vecs) vecs = lv = v; else lv->v_link2 = v; for (lv = v; lv->v_link2; lv = lv->v_link2) ; ngood += 1; } if (!ngood) goto done; /* See whether we really have to print plot names. */ for (v = vecs; v; v = v->v_link2) if (vecs->v_plot != v->v_plot) { plotnames = TRUE; break; } if (!optgiven) { /* Figure out whether col or line should be used... */ col = FALSE; for (v = vecs; v; v = v->v_link2) if (v->v_length > 1) { col = TRUE; /* Improvement made to print cases @[sin] = (0 12 13 100K) */ if ((v->v_plot->pl_scale && v->v_length != v->v_plot->pl_scale->v_length) && (*(v->v_name) == '@')) { col = FALSE; } break; } /* With this I have found that the vector has less elements than the SCALE vector * in the linked PLOT. But now I must make sure in case of a print @vin[sin] or * @vin[pulse] * for it appear that the v->v_name begins with '@' * And then be in this case. */ } out_init(); if (!col) { for (v = vecs; v; v = v->v_link2) { char *basename = vec_basename(v); if (plotnames) (void) sprintf(buf, "%s.%s", v->v_plot->pl_typename, basename); else (void) strcpy(buf, basename); tfree(basename); for (s = buf; *s; s++) ; s--; while (isspace(*s)) { *s = '\0'; s--; } ll = 10; /* v->v_rlength = 1 when it comes to make a print @ M1 and does not want to come out on screen * Multiplier factor [m]=1 * @M1 = 0,00e+00 * In any other case rlength not used for anything and only applies in the copy of the vectors. */ if (v->v_rlength == 0) { if (v->v_length == 1) { if (isreal(v)) { printnum(numbuf, *v->v_realdata); out_printf("%s = %s\n", buf, numbuf); } else { printnum(numbuf, realpart(v->v_compdata[0])); printnum(numbuf2, imagpart(v->v_compdata[0])); out_printf("%s = %s,%s\n", buf, numbuf, numbuf2); } } else { out_printf("%s = ( ", buf); for (i = 0; i < v->v_length; i++) if (isreal(v)) { printnum(numbuf, v->v_realdata[i]); (void) strcpy(buf, numbuf); out_send(buf); ll += (int) strlen(buf); ll = (ll + 7) / 8; ll = ll * 8 + 1; if (ll > 60) { out_send("\n\t"); ll = 9; } else { out_send("\t"); } } else { /*DG*/ printnum(numbuf, realpart(v->v_compdata[i])); printnum(numbuf2, imagpart(v->v_compdata[i])); (void) sprintf(buf, "%s,%s", numbuf, numbuf2); out_send(buf); ll += (int) strlen(buf); ll = (ll + 7) / 8; ll = ll * 8 + 1; if (ll > 60) { out_send("\n\t"); ll = 9; } else { out_send("\t"); } } out_send(")\n"); } //end if (v->v_length == 1) } //end if (v->v_rlength == 1) } } else { /* Print in columns. */ if (cp_getvar("width", CP_NUM, &i)) width = i; if (width < 40) width = 40; if (width > BSIZE_SP - 2) { buf = TREALLOC(char, buf, width + 1); buf2 = TREALLOC(char, buf2, width + 1); } if (cp_getvar("height", CP_NUM, &i)) height = i; if (height < 20) height = 20; nobreak = cp_getvar("nobreak", CP_BOOL, NULL); if (!nobreak && !ft_nopage) nobreak = FALSE; else nobreak = TRUE; noprintscale = cp_getvar("noprintscale", CP_BOOL, NULL); bv = vecs; nextpage: /* Make the first vector of every page be the scale... */ /* XXX But what if there is no scale? e.g. op, pz */ if (!noprintscale && bv->v_plot->pl_ndims) if (bv->v_plot->pl_scale && !vec_eq(bv, bv->v_plot->pl_scale)) { nv = vec_copy(bv->v_plot->pl_scale); vec_new(nv); nv->v_link2 = bv; bv = nv; } ll = 8; for (lv = bv; lv; lv = lv->v_link2) { if (isreal(lv)) ll += 16; /* Two tabs for real, */ else ll += 32; /* 4 for complex. */ /* Make sure we have at least 2 vectors per page... */ if ((ll > width) && (lv != bv) && (lv != bv->v_link2)) break; } /* Print the header on the first page only. */ p = bv->v_plot; j = (width - (int) strlen(p->pl_title)) / 2; /* Yes, keep "(int)" */ if (j < 0) j = 0; for (i = 0; i < j; i++) buf2[i] = ' '; buf2[j] = '\0'; out_send(buf2); out_send(p->pl_title); out_send("\n"); out_send(buf2); (void) sprintf(buf, "%s %s", p->pl_name, p->pl_date); j = (width - (int) strlen(buf)) / 2; out_send(buf); out_send("\n"); for (i = 0; i < width; i++) buf2[i] = '-'; buf2[width] = '\n'; buf2[width+1] = '\0'; out_send(buf2); (void) sprintf(buf, "Index "); for (v = bv; v && (v != lv); v = v->v_link2) { if (isreal(v)) { (void) sprintf(buf2, "%-16.15s", v->v_name); } else { /* The frequency vector is complex but often with imaginary part = 0, * this prevents to print two columns. */ if (eq(v->v_name, "frequency")) { if (imagpart(v->v_compdata[0]) == 0.0) (void) sprintf(buf2, "%-16.15s", v->v_name); else (void) sprintf(buf2, "%-32.31s", v->v_name); } else { (void) sprintf(buf2, "%-32.31s", v->v_name); } } (void) strcat(buf, buf2); } lineno = 3; j = 0; npoints = 0; for (v = bv; (v && (v != lv)); v = v->v_link2) if (v->v_length > npoints) npoints = v->v_length; pbreak: /* New page. */ out_send(buf); out_send("\n"); for (i = 0; i < width; i++) buf2[i] = '-'; buf2[width] = '\n'; buf2[width+1] = '\0'; out_send(buf2); lineno += 2; loop: while ((j < npoints) && (lineno < height)) { out_printf("%d\t", j); for (v = bv; (v && (v != lv)); v = v->v_link2) { if (v->v_length <= j) { if (isreal(v)) out_send("\t\t"); else out_send("\t\t\t\t"); } else { if (isreal(v)) { printnum(numbuf, v->v_realdata[j]); out_printf("%s\t", numbuf); } else { /* In case of a single frequency and have a real part avoids print imaginary part equals 0. */ if (eq(v->v_name, "frequency") && imagpart(v->v_compdata[j]) == 0.0) { printnum(numbuf, realpart(v->v_compdata[j])); out_printf("%s\t", numbuf); } else { printnum(numbuf, realpart(v->v_compdata[j])); printnum(numbuf2, imagpart(v->v_compdata[j])); out_printf("%s,\t%s\t", numbuf, numbuf2); } } } } out_send("\n"); j++; lineno++; } if ((j == npoints) && (lv == NULL)) /* No more to print. */ goto done; if (j == npoints) { /* More vectors to print. */ bv = lv; out_send("\f\n"); /* Form feed. */ goto nextpage; } /* Otherwise go to a new page. */ lineno = 0; if (nobreak) goto loop; else out_send("\f\n"); /* Form feed. */ goto pbreak; } done: /* Get rid of the vectors. */ free_pnode(names); tfree(buf); tfree(buf2); } /* Write out some data. write filename expr ... Some cleverness here is * required. If the user mentions a few vectors from various plots, * probably he means for them to be written out seperate plots. In any * case, we have to be sure to write out the scales for everything we * write... */ void com_write(wordlist *wl) { char *file, buf[BSIZE_SP]; struct pnode *pn; struct dvec *d, *vecs = NULL, *lv = NULL, *end, *vv; static wordlist all = { "all", NULL, NULL }; struct pnode *names; bool ascii = AsciiRawFile; bool scalefound, appendwrite; struct plot *tpl, newplot; if (wl) { file = wl->wl_word; wl = wl->wl_next; } else { file = ft_rawfile; } if (cp_getvar("filetype", CP_STRING, buf)) { if (eq(buf, "binary")) ascii = FALSE; else if (eq(buf, "ascii")) ascii = TRUE; else fprintf(cp_err, "Warning: strange file type %s\n", buf); } appendwrite = cp_getvar("appendwrite", CP_BOOL, NULL); if (wl) names = ft_getpnames(wl, TRUE); else names = ft_getpnames(&all, TRUE); if (names == NULL) return; for (pn = names; pn; pn = pn->pn_next) { d = ft_evaluate(pn); if (!d) goto done; if (vecs) lv->v_link2 = d; else vecs = d; for (lv = d; lv->v_link2; lv = lv->v_link2) ; } /* Now we have to write them out plot by plot. */ while (vecs) { tpl = vecs->v_plot; tpl->pl_written = TRUE; end = NULL; bcopy(tpl, &newplot, sizeof(struct plot)); scalefound = FALSE; /* Figure out how many vectors are in this plot. Also look * for the scale, or a copy of it, which may have a different * name. */ for (d = vecs; d; d = d->v_link2) { if (d->v_plot == tpl) { char *basename = vec_basename(d); vv = vec_copy(d); /* Note that since we are building a new plot * we don't want to vec_new this one... */ tfree(vv->v_name); vv->v_name = basename; if (end) end->v_next = vv; else end = newplot.pl_dvecs = vv; end = vv; if (vec_eq(d, tpl->pl_scale)) { newplot.pl_scale = vv; scalefound = TRUE; } } } end->v_next = NULL; /* Maybe we shouldn't make sure that the default scale is * present if nobody uses it. */ if (!scalefound) { newplot.pl_scale = vec_copy(tpl->pl_scale); newplot.pl_scale->v_next = newplot.pl_dvecs; newplot.pl_dvecs = newplot.pl_scale; } /* Now let's go through and make sure that everything that * has its own scale has it in the plot. */ for (;;) { scalefound = FALSE; for (d = newplot.pl_dvecs; d; d = d->v_next) { if (d->v_scale) { for (vv = newplot.pl_dvecs; vv; vv = vv->v_next) if (vec_eq(vv, d->v_scale)) break; /* We have to grab it... */ vv = vec_copy(d->v_scale); vv->v_next = newplot.pl_dvecs; newplot.pl_dvecs = vv; scalefound = TRUE; } } if (!scalefound) break; /* Otherwise loop through again... */ } if (ascii) raw_write(file, &newplot, appendwrite, FALSE); else raw_write(file, &newplot, appendwrite, TRUE); for (vv = newplot.pl_dvecs; vv;) { struct dvec *next_vv = vv->v_next; vv->v_plot = NULL; vec_free(vv); vv = next_vv; } /* Now throw out the vectors we have written already... */ for (d = vecs, lv = NULL; d; d = d->v_link2) if (d->v_plot == tpl) { if (lv) { lv->v_link2 = d->v_link2; d = lv; } else { vecs = d->v_link2; } } else { lv = d; } /* If there are more plots we want them appended... */ appendwrite = TRUE; } done: free_pnode(names); } /* Write scattering parameters into a file with Touchstone File Format Version 1 with command wrs2p file . Format info from http://www.eda.org/ibis/touchstone_ver2.0/touchstone_ver2_0.pdf See example 13 on page 15: Two port, ASCII, real-imaginary Check if S11, S21, S12, S22 and frequency vectors are available Check if vector Rbase is available Call spar_write() */ void com_write_sparam(wordlist *wl) { char *file; char *sbuf[6]; wordlist *wl_sparam; struct pnode *pn; struct dvec *d, *vecs = NULL, *lv = NULL, *end, *vv, *Rbasevec = NULL; struct pnode *names; bool scalefound, appendwrite = FALSE; struct plot *tpl, newplot; double Rbaseval; if (wl) file = wl->wl_word; else file = "s_param.s2p"; /* generate wordlist with all vectors required*/ sbuf[0] = "frequency"; sbuf[1] = "S11"; sbuf[2] = "S21"; sbuf[3] = "S12"; sbuf[4] = "S22"; sbuf[5] = NULL; wl_sparam = wl_build(sbuf); names = ft_getpnames(wl_sparam, TRUE); if (names == NULL) goto done; for (pn = names; pn; pn = pn->pn_next) { d = ft_evaluate(pn); if (!d) goto done; if (vecs) lv->v_link2 = d; else vecs = d; for (lv = d; lv->v_link2; lv = lv->v_link2) ; } Rbasevec = vec_get("Rbase"); if (Rbasevec) { Rbaseval = Rbasevec->v_realdata[0]; } else { fprintf(stderr, "Error: No Rbase vector given\n"); goto done; } /* Now we have to write them out plot by plot. */ while (vecs) { tpl = vecs->v_plot; tpl->pl_written = TRUE; end = NULL; bcopy(tpl, &newplot, sizeof(struct plot)); scalefound = FALSE; /* Figure out how many vectors are in this plot. Also look * for the scale, or a copy of it, which may have a different * name. */ for (d = vecs; d; d = d->v_link2) { if (d->v_plot == tpl) { char *basename = vec_basename(d); vv = vec_copy(d); /* Note that since we are building a new plot * we don't want to vec_new this one... */ tfree(vv->v_name); vv->v_name = basename; if (end) end->v_next = vv; else end = newplot.pl_dvecs = vv; end = vv; if (vec_eq(d, tpl->pl_scale)) { newplot.pl_scale = vv; scalefound = TRUE; } } } end->v_next = NULL; /* Maybe we shouldn't make sure that the default scale is * present if nobody uses it. */ if (!scalefound) { newplot.pl_scale = vec_copy(tpl->pl_scale); newplot.pl_scale->v_next = newplot.pl_dvecs; newplot.pl_dvecs = newplot.pl_scale; } /* Now let's go through and make sure that everything that * has its own scale has it in the plot. */ for (;;) { scalefound = FALSE; for (d = newplot.pl_dvecs; d; d = d->v_next) { if (d->v_scale) { for (vv = newplot.pl_dvecs; vv; vv = vv->v_next) if (vec_eq(vv, d->v_scale)) break; /* We have to grab it... */ vv = vec_copy(d->v_scale); vv->v_next = newplot.pl_dvecs; newplot.pl_dvecs = vv; scalefound = TRUE; } } if (!scalefound) break; /* Otherwise loop through again... */ } spar_write(file, &newplot, Rbaseval); for (vv = newplot.pl_dvecs; vv;) { struct dvec *next_vv = vv->v_next; vv->v_plot = NULL; vec_free(vv); vv = next_vv; } /* Now throw out the vectors we have written already... */ for (d = vecs, lv = NULL; d; d = d->v_link2) if (d->v_plot == tpl) { if (lv) { lv->v_link2 = d->v_link2; d = lv; } else { vecs = d->v_link2; } } else { lv = d; } /* If there are more plots we want them appended... */ appendwrite = TRUE; } done: free_pnode(names); wl_free(wl_sparam); } /* If the named vectors have more than 1 dimension, then consider * to be a collection of one or more matrices. This command transposes * each named matrix. */ void com_transpose(wordlist *wl) { struct dvec *d; char *s; while (wl) { s = cp_unquote(wl->wl_word); d = vec_get(s); tfree(s); /*DG: Avoid Memory Leak */ if (d == NULL) fprintf(cp_err, "Error: no such vector as %s.\n", wl->wl_word); else while (d) { vec_transpose(d); d = d->v_link2; } if (wl->wl_next == NULL) return; wl = wl->wl_next; } } /* Take a set of vectors and form a new vector of the nth elements of each. */ void com_cross(wordlist *wl) { char *newvec, *s; struct dvec *n, *v, *vecs = NULL, *lv = NULL; struct pnode *pn, *names; int i, ind; bool comp = FALSE; double *d; newvec = wl->wl_word; wl = wl->wl_next; s = wl->wl_word; if ((d = ft_numparse(&s, FALSE)) == NULL) { fprintf(cp_err, "Error: bad number %s\n", wl->wl_word); return; } if ((ind = (int)*d) < 0) { fprintf(cp_err, "Error: badstrchr %d\n", ind); return; } wl = wl->wl_next; names = ft_getpnames(wl, TRUE); for (pn = names; pn; pn = pn->pn_next) { if ((n = ft_evaluate(pn)) == NULL) goto done; if (!vecs) vecs = lv = n; else lv->v_link2 = n; for (lv = n; lv->v_link2; lv = lv->v_link2) ; } for (n = vecs, i = 0; n; n = n->v_link2) { if (iscomplex(n)) comp = TRUE; i++; } vec_remove(newvec); v = alloc(struct dvec); v->v_name = copy(newvec); v->v_type = vecs ? vecs->v_type : SV_NOTYPE; v->v_length = i; if (comp) { v->v_flags = VF_COMPLEX; v->v_compdata = TMALLOC(ngcomplex_t, i); } else { v->v_flags = VF_REAL; v->v_realdata = TMALLOC(double, i); } /* Now copy the ind'ths elements into this one. */ for (n = vecs, i = 0; n; n = n->v_link2, i++) if (n->v_length > ind) { if (comp) { realpart(v->v_compdata[i]) = realpart(n->v_compdata[ind]); imagpart(v->v_compdata[i]) = imagpart(n->v_compdata[ind]); } else { v->v_realdata[i] = n->v_realdata[ind]; } } else { if (comp) { realpart(v->v_compdata[i]) = 0.0; imagpart(v->v_compdata[i]) = 0.0; } else { v->v_realdata[i] = 0.0; } } vec_new(v); v->v_flags |= VF_PERMANENT; cp_addkword(CT_VECTOR, v->v_name); done: free_pnode(names); } void com_destroy(wordlist *wl) { struct plot *pl, *npl = NULL; if (!wl) { DelPlotWindows(plot_cur); killplot(plot_cur); } else if (eq(wl->wl_word, "all")) { for (pl = plot_list; pl; pl = npl) { npl = pl->pl_next; if (!eq(pl->pl_typename, "const")) { DelPlotWindows(pl); killplot(pl); } else { plot_num = 1; } } } else { while (wl) { for (pl = plot_list; pl; pl = pl->pl_next) if (eq(pl->pl_typename, wl->wl_word)) break; if (pl) { DelPlotWindows(pl); killplot(pl); } else { fprintf(cp_err, "Error: no such plot %s\n", wl->wl_word); } wl = wl->wl_next; } } } static void killplot(struct plot *pl) { struct dvec *v, *nv = NULL; struct plot *op; if (eq(pl->pl_typename, "const")) { fprintf(cp_err, "Error: can't destroy the constant plot\n"); return; } /* pl_dvecs, pl_scale */ for (v = pl->pl_dvecs; v; v = nv) { nv = v->v_next; vec_free(v); } /* unlink from plot_list (linked via pl_next) */ if (pl == plot_list) { plot_list = pl->pl_next; if (pl == plot_cur) plot_cur = plot_list; } else { for (op = plot_list; op; op = op->pl_next) if (op->pl_next == pl) break; if (!op) fprintf(cp_err, "Internal Error: kill plot -- not in list\n"); op->pl_next = pl->pl_next; if (pl == plot_cur) plot_cur = op; } tfree(pl->pl_title); tfree(pl->pl_name); tfree(pl->pl_typename); wl_free(pl->pl_commands); tfree(pl->pl_date); /* va: also tfree (memory leak) */ if (pl->pl_ccom) /* va: also tfree (memory leak) */ throwaway(pl->pl_ccom); if (pl->pl_env) { /* The 'environment' for this plot. */ /* va: HOW to do? */ printf("va: killplot should tfree pl->pl_env=(%p)\n", pl->pl_env); fflush(stdout); } tfree(pl); /* va: also tfree pl itself (memory leak) */ } void destroy_const_plot(void) { struct dvec *v, *nv = NULL; struct plot *pl = &constantplot; /* pl_dvecs, pl_scale */ for (v = pl->pl_dvecs; v; v = nv) { nv = v->v_next; vec_free(v); } wl_free(pl->pl_commands); if (pl->pl_ccom) /* va: also tfree (memory leak) */ throwaway(pl->pl_ccom); if (pl->pl_env) { /* The 'environment' for this plot. */ /* va: HOW to do? */ printf("va: killplot should tfree pl->pl_env=(%p)\n", pl->pl_env); fflush(stdout); } } /* delete all windows with graphs dedrived from a given plot */ static void DelPlotWindows(struct plot *pl) { /* do this only if windows or X11 is defined */ #if defined(HAS_WINGUI) || !defined(X_DISPLAY_MISSING) GRAPH *dgraph; int n; /* find and remove all graph structures derived from a given plot */ for (n = 1; n < 100; n++) { /* should be no more than 100 */ dgraph = FindGraph(n); if (dgraph) { if (ciprefix(pl->pl_typename, dgraph->plotname)) RemoveWindow(dgraph); } /* We have to run through all potential graph ids. If some numbers are already missing, 'else break;' might miss the plotwindow to be removed. */ /* else break; */ } #else NG_IGNORE(pl); #endif } void com_splot(wordlist *wl) { struct plot *pl; char buf[BSIZE_SP], *s, *t; if (wl) { plot_setcur(wl->wl_word); return; } fprintf(cp_out, "\tType the name of the desired plot:\n\n"); fprintf(cp_out, "\tnew\tNew plot\n"); for (pl = plot_list; pl; pl = pl->pl_next) fprintf(cp_out, "%s%s\t%s (%s)\n", (pl == plot_cur) ? "Current " : "\t", pl->pl_typename, pl->pl_title, pl->pl_name); fprintf(cp_out, "? "); if (!fgets(buf, BSIZE_SP, cp_in)) { clearerr(cp_in); return; } t = buf; if ((s = gettok(&t)) == NULL) return; plot_setcur(s); } ngspice-26/src/frontend/com_let.h0000644000265600020320000000017012264261473016430 0ustar andreasadmin#ifndef ngspice_COM_LET_H #define ngspice_COM_LET_H #include "ngspice/wordlist.h" void com_let(wordlist *wl); #endif ngspice-26/src/frontend/typesdef.h0000644000265600020320000000031312264261473016630 0ustar andreasadmin/************* * Header file for typesdef.c * 1999 E. Rouat ************/ #ifndef ngspice_TYPESDEF_H #define ngspice_TYPESDEF_H void com_dftype(wordlist *wl); void com_stype(wordlist *wl); #endif ngspice-26/src/frontend/points.h0000644000265600020320000000037012264261473016324 0ustar andreasadmin/************* * Header file for points.c * 1999 E. Rouat ************/ #ifndef ngspice_POINTS_H #define ngspice_POINTS_H double * ft_SMITHminmax(struct dvec *v, bool yval); int SMITH_tfm(double re, double im, double *x, double *y); #endif ngspice-26/src/frontend/gens.c0000644000265600020320000001743712264261473015753 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/cpstd.h" #include "ngspice/ftedefs.h" #include "ngspice/fteext.h" #include "ngspice/devdefs.h" #include "ngspice/dgen.h" #include "gens.h" static void dgen_next(dgen **dgx); void wl_forall(wordlist *wl, void (*fn)(wordlist*, dgen*), dgen *data) { while (wl) { fn (wl, data); wl = wl->wl_next; } } dgen * dgen_init(GENcircuit *ckt, wordlist *wl, int nomix, int flag, int model) { dgen *dg, *dg_save; NG_IGNORE(nomix); dg = NEW(dgen); dg->ckt = ckt; dg->instance = NULL; dg->model = NULL; dg->dev_type_no = -1; dg->dev_list = wl; dg->flags = 0; dg_save = dg; /* va: save, to avoid memory leak */ if (model) dg->flags = (DGEN_ALL & ~ DGEN_INSTANCE) | DGEN_INIT; else dg->flags = DGEN_ALL | DGEN_INIT; if (wl) dg->flags |= flag; else dg->flags |= DGEN_DEFDEVS | flag; dgen_next(&dg); /* va: it might be too much tests, but safer is better... */ if (dg != dg_save && dg == NULL && dg_save != NULL) tfree(dg_save); return dg; } int dgen_for_n(dgen *dg, int n, int (*fn) (dgen*, IFparm*, int), IFparm *data, int subindex) { dgen dgx, *dgxp; int dnum, i, j, k; dgxp = &dgx; bcopy(dg, dgxp, sizeof(dgx)); /* va: compatible pointer types */ dnum = dgxp->dev_type_no; k = 0; for (i = 0; dgxp && dgxp->dev_type_no == dnum && i < n; i++) { /*printf("Loop at %d\n", i);*/ j = fn (dgxp, data, subindex); if (j > k) k = j; dgen_next(&dgxp); } return k - subindex; } void dgen_nth_next(dgen **p_dg, int n) { int i, dnum; dgen *dg_save = *p_dg; /* va: save, to avoid memory leak */ dnum = (*p_dg)->dev_type_no; for (i = 0; *p_dg && (*p_dg)->dev_type_no == dnum && i < n; i++) { dgen_next(p_dg); /* va: it might be too much tests, but safer is better... */ if (*p_dg != dg_save && *p_dg == NULL && dg_save != NULL) tfree(dg_save); } } static void dgen_next(dgen **dgx) { int done; dgen *dg; char *p; int need; wordlist *w; char type, *subckt, *device, *model; char *Top_Level = "\001"; int subckt_len; int head_match; char *word, *dev_name, *mod_name; dg = *dgx; if (!dg) return; /* Prime the "model only" or "device type only" iteration, * required because the filtering (below) may request additional * detail. */ if (!(dg->flags & DGEN_INSTANCE)) { if (!(dg->flags & DGEN_MODEL)) dg->model = NULL; dg->instance = NULL; } need = dg->flags; done = 0; while (!done) { if (dg->instance) { /* next instance */ dg->instance = dg->instance->GENnextInstance; } else if (dg->model) { dg->model = dg->model->GENnextModel; if (dg->model) dg->instance = dg->model->GENinstances; } else if (dg->dev_type_no < DEVmaxnum) { dg->dev_type_no += 1; if (dg->dev_type_no < DEVmaxnum) { dg->model = ((CKTcircuit *)(dg->ckt))->CKThead[dg->dev_type_no]; if (dg->model) dg->instance = dg->model->GENinstances; } else { done = 2; break; } } else { done = 2; break; } if (need & DGEN_INSTANCE && !dg->instance) continue; if (need & DGEN_MODEL && !dg->model) continue; /* Filter */ if (!dg->dev_list) { if ((dg->flags & DGEN_ALLDEVS) || ((dg->flags & DGEN_DEFDEVS) && (ft_sim->devices[dg->dev_type_no]->flags & DEV_DEFAULT))) { done = 1; } else { done = 0; } continue; } done = 0; for (w = dg->dev_list; w && !done; w = w->wl_next) { /* assume a match (have to reset done every time * through */ done = 1; word = w->wl_word; if (!word || !*word) { break; } /* Break up word into type, subcircuit, model, device, * must be nodestructive to "word" */ /* type */ if (*word == ':' || *word == '#') type = '\0'; else type = *word++; /* subcircuit */ subckt = word; /* look for last ":" or "#" in word */ for (p = word + strlen(word) /* do '\0' first time */; p != word && *p != ':' && *p != '#'; p--) { ; } if (*p != ':' && *p != '#') { /* No subcircuit name specified */ subckt = NULL; subckt_len = 0; } else { if (p[-1] == ':') { head_match = 1; subckt_len = (int)(p - word) - 1; } else { head_match = 0; subckt_len = (int)(p - word); } if (subckt_len == 0) { /* Top level only */ if (head_match) subckt = NULL; else subckt = Top_Level; } word = p + 1; } /* model or device */ if (*p == '#') { model = word; device = NULL; } else { model = NULL; device = word; } /* Now compare */ if (dg->instance) dev_name = dg->instance->GENname; else dev_name = NULL; if (dg->model) mod_name = dg->model->GENmodName; else mod_name = NULL; if (type) { if (!dev_name) { done = 0; /*printf("No device.\n");*/ need |= DGEN_MODEL; continue; } else if (type != *dev_name) { done = 0; /*printf("Wrong type.\n");*/ /* Bleh ... plan breaks down here */ /* need = DGEN_TYPE; */ continue; } } if (subckt == Top_Level) { if (dev_name && dev_name[1] == ':') { need |= DGEN_INSTANCE; done = 0; /*printf("Wrong level.\n");*/ continue; } } else if (subckt && (!dev_name || !ciprefix(subckt, dev_name + 1))) { need |= DGEN_INSTANCE; done = 0; /*printf("Wrong subckt.\n"); */ continue; } if (device && *device) { need |= DGEN_INSTANCE | DGEN_MODEL; if (!dev_name) { done = 0; /*printf("Didn't get dev name.\n");*/ continue; } else if (strcmp(device, dev_name + 1 + subckt_len)) { done = 0; /*printf("Wrong name.\n");*/ continue; } } else if (model && *model) { if (strcmp(model, mod_name)) { done = 0; need |= DGEN_MODEL; /*printf("Wrong model name.\n");*/ continue; } } break; } } if (done == 2) *dgx = NULL; } ngspice-26/src/frontend/postsc.c0000644000265600020320000003677712264261473016342 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* Postscript driver */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "ngspice/ftedev.h" #include "ngspice/fteinput.h" #include "ngspice/fteext.h" #include "postsc.h" #include "variable.h" #include "plotting/graphdb.h" #define RAD_TO_DEG (180.0 / M_PI) #define DEVDEP(g) (*((PSdevdep *) (g)->devdep)) #define MAX_PS_LINES 1000 #define SOLID 0 #define DOTTED 1 #define gtype graph->grid.gridtype #define xoff dispdev->minx #define yoff dispdev->miny #define XOFF 48 /* printer left margin */ #define YOFF 48 /* printer bottom margin */ #define XTADJ 0 /* printer text adjustment x */ #define YTADJ 4 /* printer text adjustment y */ #define GRIDSIZE 420 /* printer gridsize divisible by 10, [7-2] */ #define GRIDSIZES 360 /* printer gridsize divisible by [10-8], [6-2] */ #define FONTSIZE 10 /* printer default fontsize */ #define FONTWIDTH 6 /* printer default fontwidth */ #define FONTHEIGHT 14 /* printer default fontheight */ typedef struct { int lastlinestyle, lastcolor; /* initial invalid value */ int lastx, lasty, linecount; } PSdevdep; static char *linestyle[] = { "[]", /* solid */ "[1 2]", /* dotted */ "[7 7]", /* longdashed */ "[3 3]", /* shortdashed */ "[7 2 2 2]", /* longdotdashed */ "[3 2 1 2]", /* shortdotdashed */ "[8 3 2 3]", "[14 2]", "[3 5 1 5]" /* dotdashed */ }; static FILE *plotfile; char psfont[128], psfontsize[32], psscale[32], pscolor[32]; static int fontsize = FONTSIZE; static int fontwidth = FONTWIDTH; static int fontheight = FONTHEIGHT; static int screenflag = 0; static int colorflag = 0; static int setbgcolor = 0; static int settxcolor = -1; static double scale; /* Used for fine tuning */ static int xtadj; /* text adjustment x */ static int ytadj; /* text adjustment y */ static int hcopygraphid; void PS_LinestyleColor(int linestyleid, int colorid); void PS_SelectColor(int colorid); void PS_Stroke(void); /* Set scale, color and size of the plot */ int PS_Init(void) { char pswidth[30], psheight[30]; if (!cp_getvar("hcopyscale", CP_STRING, psscale)) { scale = 1.0; } else { sscanf(psscale, "%lf", &scale); if ((scale <= 0) || (scale > 10)) scale = 1.0; } dispdev->numlinestyles = NUMELEMS(linestyle); /* plot color */ if (!cp_getvar("hcopypscolor", CP_NUM, &setbgcolor)) { /* if not set, set plot to b&w and use line styles */ colorflag = 0; dispdev->numcolors = 2; } else { /* get backgroung color and set plot to color */ colorflag = 1; dispdev->numcolors = 21; /* don't know what the maximum should be */ cp_getvar("hcopypstxcolor", CP_NUM, &settxcolor); } /* plot size */ if (!cp_getvar("hcopywidth", CP_STRING, pswidth)) { dispdev->width = (int)(7.75 * 72.0 * scale); /* (8 1/2 - 3/4) * 72 */ } else { sscanf(pswidth, "%d", &(dispdev->width)); if (dispdev->width <= 100) dispdev->width = 100; if (dispdev->width >= 10000) dispdev->width = 10000; } if (!cp_getvar("hcopyheight", CP_STRING, psheight)) { dispdev->height = dispdev->width; } else { sscanf(psheight, "%d", &(dispdev->height)); if (dispdev->height <= 100) dispdev->height = 100; if (dispdev->height >= 10000) dispdev->height = 10000; } /* The following side effects have to be considered * when the printer is called by com_hardcopy ! * gr_init: * viewportxoff = 8 * fontwidth * viewportyoff = 4 * fontheight * gr_resize_internal: * viewport.width = absolute.width - 2 * viewportxoff * viewport.height = absolute.height - 2 * viewportyoff */ if (!cp_getvar("hcopyfont", CP_STRING, psfont)) strcpy(psfont, "Helvetica"); if (!cp_getvar("hcopyfontsize", CP_STRING, psfontsize)) { fontsize = 10; fontwidth = 6; fontheight = 14; xtadj = (int)(XTADJ * scale); ytadj = (int)(YTADJ * scale); } else { sscanf(psfontsize, "%d", &fontsize); if ((fontsize < 10) || (fontsize > 14)) fontsize = 10; fontwidth = (int)(0.5 + 0.6 * fontsize); fontheight = (int)(2.5 + 1.2 * fontsize); xtadj = (int)(XTADJ * scale * fontsize / 10); ytadj = (int)(YTADJ * scale * fontsize / 10); } screenflag = 0; dispdev->minx = (int)(XOFF / scale); dispdev->miny = (int)(YOFF / scale); return (0); } /* Plot and fill bounding box */ int PS_NewViewport(GRAPH *graph) { int x1, x2, y1, y2; hcopygraphid = graph->graphid; /* devdep initially contains name of output file */ if ((plotfile = fopen((char*)graph->devdep, "w")) == NULL) { perror((char*)graph->devdep); graph->devdep = NULL; return (1); } if (graph->absolute.width) { /* hardcopying from the screen */ screenflag = 1; } /* reasonable values, used in gr_ for placement */ graph->fontwidth = (int)(fontwidth * scale); /* was 12, p.w.h. */ graph->fontheight = (int)(fontheight * scale); /* was 24, p.w.h. */ graph->absolute.width = dispdev->width; graph->absolute.height = dispdev->height; /* Also done in gr_init, if called . . . */ graph->viewportxoff = 8 * fontwidth; graph->viewportyoff = 4 * fontheight; xoff = (int)(scale * XOFF); yoff = (int)(scale * YOFF); x1 = (int)(0.75 * 72); y1 = x1; x2 = (int)(graph->absolute.width + .75 * 72); y2 = (int)(graph->absolute.height + .75 * 72); /* start file off with a % */ fprintf(plotfile, "%%!PS-Adobe-3.0 EPSF-3.0\n"); fprintf(plotfile, "%%%%Creator: nutmeg\n"); fprintf(plotfile, "%%%%BoundingBox: %d %d %d %d\n", x1, y1, x2, y2); fprintf(plotfile, "%g %g scale\n", 1.0 / scale, 1.0 / scale); if (colorflag == 1) { /* set the background to color given in spinit (or 0) */ PS_SelectColor(setbgcolor); fprintf(plotfile, "%s setrgbcolor\n", pscolor); fprintf(plotfile, "newpath\n"); fprintf(plotfile, "%d %d moveto %d %d lineto\n", x1, y1, x2, y1); fprintf(plotfile, "%d %d lineto %d %d lineto\n", x2, y2, x1, y2); fprintf(plotfile, "closepath fill\n"); } /* set up a reasonable font */ fprintf(plotfile, "/%s findfont %d scalefont setfont\n\n", psfont, (int) (fontsize * scale)); graph->devdep = TMALLOC(PSdevdep, 1); DEVDEP(graph).lastlinestyle = -1; DEVDEP(graph).lastcolor = -1; DEVDEP(graph).lastx = -1; DEVDEP(graph).lasty = -1; DEVDEP(graph).linecount = 0; PS_SelectColor(0); graph->linestyle = -1; return 0; } int PS_Close(void) { /* in case PS_Close is called as part of an abort, w/o having reached PS_NewViewport */ if (plotfile) { PS_Stroke(); fprintf(plotfile, "showpage\n%%%%EOF\n"); fclose(plotfile); plotfile = NULL; } /* In case of hardcopy command destroy the hardcopy graph * and reset currentgraph to graphid 1, if possible */ if (!screenflag) { DestroyGraph(hcopygraphid); currentgraph = FindGraph(1); } return 0; } int PS_Clear(void) { /* do nothing */ return 0; } int PS_DrawLine(int x1, int y1, int x2, int y2) { /* note: this is not extendible to more than one graph => will have to give NewViewport a writeable graph XXX */ if (DEVDEP(currentgraph).linecount > MAX_PS_LINES || DEVDEP(currentgraph).linecount == 0 || x1 != DEVDEP(currentgraph).lastx || y1 != DEVDEP(currentgraph).lasty) { PS_Stroke(); fprintf(plotfile, "newpath\n"); fprintf(plotfile, "%d %d moveto\n", x1 + xoff, y1 + yoff); DEVDEP(currentgraph).linecount += 1; } if (x1 != x2 || y1 != y2) { fprintf(plotfile, "%d %d lineto\n", x2 + xoff, y2 + yoff); DEVDEP(currentgraph).linecount += 1; } DEVDEP(currentgraph).lastx = x2; DEVDEP(currentgraph).lasty = y2; return 0; } int PS_Arc(int x0, int y0, int r, double theta, double delta_theta) { double x1, y1; double angle1, angle2; PS_Stroke(); angle1 = (double) (RAD_TO_DEG * theta); angle2 = (double) (RAD_TO_DEG * (theta + delta_theta)); x1 = (double) x0 + r * cos(theta); y1 = (double) y0 + r * sin(theta); fprintf(plotfile, "%f %f moveto ", x1+(double)xoff, y1+(double)yoff); fprintf(plotfile, "%d %d %d %f %f arc\n", x0+xoff, y0+yoff, r, angle1, angle2); fprintf(plotfile, "stroke\n"); DEVDEP(currentgraph).linecount = 0; return 0; } int PS_Text(char *text, int x, int y) { int savedlstyle, savedcolor; /* set linestyle to solid or may get funny color text on some plotters */ savedlstyle = currentgraph->linestyle; savedcolor = currentgraph->currentcolor; PS_SetLinestyle(SOLID); /* set text color to black if background is not white */ if (setbgcolor > 0) PS_SetColor(0); else PS_SetColor(1); /* if color is given by set hcopytxpscolor=settxcolor, give it a try */ if (settxcolor >= 0) PS_SetColor(settxcolor); /* stroke the path if there's an open one */ PS_Stroke(); /* move to (x, y) */ fprintf(plotfile, "%d %d moveto\n", x + xoff + xtadj, y + yoff + ytadj); fprintf(plotfile, "(%s) show\n", text); DEVDEP(currentgraph).lastx = -1; DEVDEP(currentgraph).lasty = -1; /* restore old linestyle */ PS_SetColor(savedcolor); PS_SetLinestyle(savedlstyle); return 0; } /* PS_DefineColor */ /* PS_DefineLinestyle */ int PS_SetLinestyle(int linestyleid) { /* special case get it when PS_Text restores a -1 linestyle */ if (linestyleid == -1) { currentgraph->linestyle = -1; return 0; } if (linestyleid < 0 || linestyleid > dispdev->numlinestyles) { internalerror("bad linestyleid inside PS_SetLinestyle"); fprintf(cp_err, "linestyleid is: %d\n", linestyleid); return 0; } PS_LinestyleColor(linestyleid, currentgraph->currentcolor); return 0; } int PS_SetColor(int colorid) { PS_LinestyleColor(currentgraph->linestyle, colorid); return 0; } int PS_Update(void) { fflush(plotfile); return 0; } /**************** PRIVAT FUNCTIONS OF PS FRONTEND *****************************/ void PS_SelectColor(int colorid) /* should be replaced by PS_DefineColor */ { char colorN[30] = "", colorstring[30] = ""; char rgb[30], s_red[30] = "0x", s_green[30] = "0x", s_blue[30] = "0x"; int red = 0, green = 0, blue = 0, scale = 1; int i; typedef struct { int red, green, blue;} COLOR; /* duplicated colors from src/frontend/plotting/x11.c in rgb-style */ const COLOR colors[] = {{ 0, 0, 0}, /*0: black */ {255, 255, 255}, /*1: white */ {255, 0, 0}, /*2: red */ { 0, 0, 255}, /*3: blue */ {255, 165, 0}, /*4: orange */ { 0, 255, 0}, /*5: green */ {255, 192, 203}, /*6: pink */ {165, 42, 42}, /*7: brown */ {240, 230, 140}, /*8: khaki */ {221, 160, 221}, /*9: plum */ {218, 112, 214}, /*10: orchid */ {238, 130, 238}, /*11: violet */ {176, 48, 96}, /*12: maroon */ { 64, 224, 208}, /*13: turqoise */ {160, 82, 45}, /*14: sienna */ {255, 127, 80}, /*15: coral */ { 0, 255, 255}, /*16: cyan */ {255, 0, 255}, /*17: magenta */ /*{255, 215, 0}, 18: gold */ { 96, 96, 96}, /*18: gray for smith grid */ /*{255, 255, 0}, 19: yello */ {150, 150, 150}, /*19: gray for smith grid */ {128, 128, 128}}; /*20: gray for normal grid */ /* Extract the rgbcolor, format is: "rgb://" */ sprintf(colorN, "color%d", colorid); if (cp_getvar(colorN, CP_STRING, colorstring)) { for (i = 0; colorstring[i]; i++) if (colorstring[i] == '/' || colorstring[i] == ':') colorstring[i] = ' '; sscanf(colorstring, "%s %s %s %s", rgb, &(s_red[2]), &(s_green[2]), &(s_blue[2])); if ((strlen(s_blue) == strlen(s_red) && strlen(s_green) == strlen(s_red)) && (strlen(s_blue) > 2) && (strlen(s_blue) < 7)) { sscanf(s_red, "%x", &red); sscanf(s_green, "%x", &green); sscanf(s_blue, "%x", &blue); scale = (1 << (strlen(s_blue) - 2) * 4) - 1; sprintf(colorstring, "%1.3f %1.3f %1.3f", (double) red/scale, (double) green/scale, (double) blue/scale); strcpy(pscolor, colorstring); } } if (colorid < 0 || colorid > 20) { internalerror("bad colorid inside PS_SelectColor"); } else if (scale == 1) { /* colorN is not an rgbstring, use default color */ sprintf(colorstring, "%1.3f %1.3f %1.3f", colors[colorid].red/255.0, colors[colorid].green/255.0, colors[colorid].blue/255.0); strcpy(pscolor, colorstring); } } void PS_LinestyleColor(int linestyleid, int colorid) { /* we have some different linestyles and colors: - color and linestyle we got via function call - color and linestyle we used last time for drawing - generated color and linestyle we'll use for drawing this time */ /* these are the rules: DOTTED and colored ps -> color20 (used for grid) and SOLID color18 or 19 and black-white -> linestyle is DOTTED */ int gencolor = 0, genstyle = 0; if (colorflag == 1) { genstyle = SOLID; if (linestyleid == DOTTED) gencolor = 20; else gencolor = colorid; } else { /* colorflag == 0 -> mono*/ if ((colorid == 18) || (colorid == 19)) genstyle = DOTTED; else if (linestyleid == -1) genstyle = 0; else genstyle = linestyleid; } /* change color if nessecary */ if (colorflag == 1 && gencolor != DEVDEP(currentgraph).lastcolor) { /* if background is white, set all white line colors to black */ if ((setbgcolor == 1) && (gencolor == 1)) PS_SelectColor(0); else PS_SelectColor(gencolor); PS_Stroke(); fprintf(plotfile, "%s setrgbcolor\n", pscolor); DEVDEP(currentgraph).lastcolor = gencolor; } currentgraph->currentcolor = colorid; /* change linestyle if nessecary */ if (colorflag == 0 && genstyle != DEVDEP(currentgraph).lastlinestyle) { PS_Stroke(); fprintf(plotfile, "%s 0 setdash\n", linestyle[genstyle]); DEVDEP(currentgraph).lastlinestyle = genstyle; } currentgraph->linestyle = linestyleid; } void PS_Stroke(void) { /* strokes an open path */ if (DEVDEP(currentgraph).linecount > 0) { fprintf(plotfile, "stroke\n"); DEVDEP(currentgraph).linecount = 0; } } ngspice-26/src/frontend/com_alias.c0000644000265600020320000001316512264261473016740 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* Do alias substitution. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "com_alias.h" struct alias *cp_aliases = NULL; /* Return NULL if no alias was found. We can get away with just * calling cp_histsubst now because the line will have gone onto the * history list by now and cp_histsubst will look in the right place. */ static wordlist * asubst(wordlist *wlist) { struct alias *al; wordlist *wl; char *word; word = wlist->wl_word; if (*word == '\\') { wlist->wl_word++; /* FIXME !!!, free() will fail !!! */ return (NULL); } for (al = cp_aliases; al; al = al->al_next) if (eq(word, al->al_name)) break; if (!al) return (NULL); wl = cp_histsubst(wl_copy(al->al_text)); if (cp_didhsubst) { /* Make sure that we have an up-to-date last history entry. */ wl_free(cp_lastone->hi_wlist); cp_lastone->hi_wlist = wl_copy(wl); } else { /* If it had no history args, then append the rest of the wl */ wl_append(wl, wl_copy(wlist->wl_next)); } return (wl); } /* MW. This function should not use cp_lastone, see cp_parse in cpshar.c * Many things are deleted here and memory leak closed */ wordlist * cp_doalias(wordlist *wlist) { wordlist *comm; /* The alias process is going to modify the "last" line typed, so * save a copy of what it really is and restore it after aliasing * is done. We have to do tricky things do get around the problems * with ; ... */ comm = wlist; while (comm) { int ntries; wordlist *end, *nextc; nextc = wl_find(cp_csep, comm); if (nextc == comm) { /* skip leading `;' */ comm = comm->wl_next; continue; } /* Temporarily hide the rest of the command... */ end = comm->wl_prev; wl_chop(comm); wl_chop(nextc); for (ntries = 21; ntries; ntries--) { wordlist *nwl = asubst(comm); if (nwl == NULL) break; if (eq(nwl->wl_word, comm->wl_word)) { /* Just once through... */ wl_free(comm); comm = nwl; break; } else { wl_free(comm); comm = nwl; } } if (!ntries) { fprintf(cp_err, "Error: alias loop.\n"); wlist->wl_word = NULL; return (wlist); } wl_append(end, comm); wl_append(comm, nextc); if (!end) wlist = comm; comm = nextc; } return (wlist); } /* If we use this, aliases will be in alphabetical order. */ void cp_setalias(char *word, wordlist *wlist) { struct alias *al, *ta; cp_unalias(word); cp_addkword(CT_ALIASES, word); if (cp_aliases == NULL) { al = cp_aliases = alloc(struct alias); al->al_next = NULL; al->al_prev = NULL; } else { for (al = cp_aliases; al->al_next; al = al->al_next) { if (strcmp(al->al_name, word) > 0) break; } /* The new one goes before al */ if (al->al_prev) { al = al->al_prev; ta = al->al_next; al->al_next = alloc(struct alias); al->al_next->al_prev = al; al = al->al_next; al->al_next = ta; ta->al_prev = al; } else { cp_aliases = alloc(struct alias); cp_aliases->al_next = al; cp_aliases->al_prev = NULL; al->al_prev = cp_aliases; al = cp_aliases; } } al->al_name = copy(word); al->al_text = wl_copy(wlist); cp_striplist(al->al_text); /* We can afford to not worry about the bits, because before the * keyword lookup is done the alias is evaluated. Make everything * file completion, just in case... */ cp_addcomm(word, (long) 1, (long) 1, (long) 1, (long) 1); } void cp_unalias(char *word) { struct alias *al; cp_remkword(CT_ALIASES, word); for (al = cp_aliases; al; al = al->al_next) if (eq(word, al->al_name)) break; if (al == NULL) return; if (al->al_next) al->al_next->al_prev = al->al_prev; if (al->al_prev) { al->al_prev->al_next = al->al_next; } else { al->al_next->al_prev = NULL; cp_aliases = al->al_next; } wl_free(al->al_text); tfree(al->al_name); tfree(al); cp_remcomm(word); } void cp_paliases(char *word) { struct alias *al; for (al = cp_aliases; al; al = al->al_next) if ((word == NULL) || eq(al->al_name, word)) { if (!word) fprintf(cp_out, "%s\t", al->al_name); wl_print(al->al_text, cp_out); (void) putc('\n', cp_out); } } /* The routine for the "alias" command. */ void com_alias(wordlist *wl) { if (wl == NULL) cp_paliases(NULL); else if (wl->wl_next == NULL) cp_paliases(wl->wl_word); else cp_setalias(wl->wl_word, wl->wl_next); } void com_unalias(wordlist *wl) { struct alias *al, *na; if (eq(wl->wl_word, "*")) { for (al = cp_aliases; al; al = na) { na = al->al_next; wl_free(al->al_text); tfree(al->al_name); tfree(al); } cp_aliases = NULL; wl = wl->wl_next; } while (wl != NULL) { cp_unalias(wl->wl_word); wl = wl->wl_next; } } ngspice-26/src/frontend/outitf.c0000644000265600020320000010652512264261473016326 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * This module replaces the old "writedata" routines in nutmeg. * Unlike the writedata routines, the OUT routines are only called by * the simulator routines, and only call routines in nutmeg. The rest * of nutmeg doesn't deal with OUT at all. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/plot.h" #include "ngspice/sim.h" #include "ngspice/inpdefs.h" /* for INPtables */ #include "ngspice/ifsim.h" #include "ngspice/jobdefs.h" #include "ngspice/iferrmsg.h" #include "circuits.h" #include "outitf.h" #include "variable.h" #include #include "ngspice/cktdefs.h" #include "ngspice/inpdefs.h" #include "breakp2.h" #include "runcoms.h" #include "plotting/graf.h" #include "../misc/misc_time.h" extern char *spice_analysis_get_name(int index); extern char *spice_analysis_get_description(int index); static int beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analName, char *refName, int refType, int numNames, char **dataNames, int dataType, bool windowed, runDesc **runp); static int addDataDesc(runDesc *run, char *name, int type, int ind); static int addSpecialDesc(runDesc *run, char *name, char *devname, char *param, int depind); static void fileInit(runDesc *run); static void fileInit_pass2(runDesc *run); static void fileStartPoint(FILE *fp, bool bin, int num); static void fileAddRealValue(FILE *fp, bool bin, double value); static void fileAddComplexValue(FILE *fp, bool bin, IFcomplex value); static void fileEndPoint(FILE *fp, bool bin); static void fileEnd(runDesc *run); static void plotInit(runDesc *run); static void plotAddRealValue(dataDesc *desc, double value); static void plotAddComplexValue(dataDesc *desc, IFcomplex value); static void plotEnd(runDesc *run); static bool parseSpecial(char *name, char *dev, char *param, char *ind); static bool name_eq(char *n1, char *n2); static bool getSpecial(dataDesc *desc, runDesc *run, IFvalue *val); static void freeRun(runDesc *run); /*Output data to spice module*/ #ifdef TCL_MODULE #include "ngspice/tclspice.h" #elif defined SHARED_MODULE extern int sh_ExecutePerLoop(void); extern void sh_vecinit(runDesc *run); #endif /*Suppressing progress info in -o option */ #ifndef HAS_WINGUI extern bool orflag; #endif #define DOUBLE_PRECISION 15 static clock_t lastclock, currclock; static double *rowbuf; static size_t column, rowbuflen; static bool shouldstop = FALSE; /* Tell simulator to stop next time it asks. */ /* The two "begin plot" routines share all their internals... */ int OUTpBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, runDesc **plotPtr) { char *name; if (ft_curckt->ci_ckt == circuitPtr) name = ft_curckt->ci_name; else name = "circuit name"; return (beginPlot(analysisPtr, circuitPtr, name, analName, refName, refType, numNames, dataNames, dataType, FALSE, plotPtr)); } int OUTwBeginPlot(CKTcircuit *circuitPtr, JOB *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, runDesc **plotPtr) { return (beginPlot(analysisPtr, circuitPtr, "circuit name", analName, refName, refType, numNames, dataNames, dataType, TRUE, plotPtr)); } static int beginPlot(JOB *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analName, char *refName, int refType, int numNames, char **dataNames, int dataType, bool windowed, runDesc **runp) { runDesc *run; struct save_info *saves; bool *savesused = NULL; int numsaves; int i, j, depind = 0; char namebuf[BSIZE_SP], parambuf[BSIZE_SP], depbuf[BSIZE_SP]; char *ch, tmpname[BSIZE_SP]; bool saveall = TRUE; bool savealli = FALSE; char *an_name; /*to resume a run saj *All it does is reassign the file pointer and return (requires *runp to be NULL if this is not needed) */ if (dataType == 666 && numNames == 666) { run = *runp; run->writeOut = ft_getOutReq(&run->fp, &run->runPlot, &run->binary, run->type, run->name); } else { /*end saj*/ /* Check to see if we want to print informational data. */ if (cp_getvar("printinfo", CP_BOOL, NULL)) fprintf(cp_err, "(debug printing enabled)\n"); *runp = run = alloc(struct runDesc); /* First fill in some general information. */ run->analysis = analysisPtr; run->circuit = circuitPtr; run->name = copy(cktName); run->type = copy(analName); run->windowed = windowed; run->numData = 0; an_name = spice_analysis_get_name(analysisPtr->JOBtype); ft_curckt->ci_last_an = an_name; /* Now let's see which of these things we need. First toss in the * reference vector. Then toss in anything that getSaves() tells * us to save that we can find in the name list. Finally unpack * the remaining saves into parameters. */ numsaves = ft_getSaves(&saves); if (numsaves) { savesused = TMALLOC(bool, numsaves); saveall = FALSE; for (i = 0; i < numsaves; i++) { if (saves[i].analysis && !cieq(saves[i].analysis, an_name)) { /* ignore this one this time around */ savesused[i] = TRUE; continue; } /* Check for ".save all" and new synonym ".save allv" */ if (cieq(saves[i].name, "all") || cieq(saves[i].name, "allv")) { saveall = TRUE; savesused[i] = TRUE; saves[i].used = 1; continue; } /* And now for the new ".save alli" option */ if (cieq(saves[i].name, "alli")) { savealli = TRUE; savesused[i] = TRUE; saves[i].used = 1; continue; } } } /* Pass 0. */ if (refName) { addDataDesc(run, refName, refType, -1); for (i = 0; i < numsaves; i++) if (!savesused[i] && name_eq(saves[i].name, refName)) { savesused[i] = TRUE; saves[i].used = 1; } } else { run->refIndex = -1; } /* Pass 1. */ if (numsaves && !saveall) { for (i = 0; i < numsaves; i++) if (!savesused[i]) for (j = 0; j < numNames; j++) if (name_eq(saves[i].name, dataNames[j])) { addDataDesc(run, dataNames[j], dataType, j); savesused[i] = TRUE; saves[i].used = 1; break; } } else { for (i = 0; i < numNames; i++) if (!refName || !name_eq(dataNames[i], refName)) /* Save the node as long as it's an internal device node */ if (!strstr(dataNames[i], "#internal") && !strstr(dataNames[i], "#source") && !strstr(dataNames[i], "#drain") && !strstr(dataNames[i], "#collector") && !strstr(dataNames[i], "#emitter") && !strstr(dataNames[i], "#base")) { addDataDesc(run, dataNames[i], dataType, i); } } /* Pass 1 and a bit. This is a new pass which searches for all the internal device nodes, and saves the terminal currents instead */ if (savealli) { depind = 0; for (i = 0; i < numNames; i++) { if (strstr(dataNames[i], "#internal") || strstr(dataNames[i], "#source") || strstr(dataNames[i], "#drain") || strstr(dataNames[i], "#collector") || strstr(dataNames[i], "#emitter") || strstr(dataNames[i], "#base")) { tmpname[0] = '@'; tmpname[1] = '\0'; strncat(tmpname, dataNames[i], BSIZE_SP-1); ch = strchr(tmpname, '#'); if (strstr(ch, "#collector")) { strcpy(ch, "[ic]"); } else if (strstr(ch, "#base")) { strcpy(ch, "[ib]"); } else if (strstr(ch, "#emitter")) { strcpy(ch, "[ie]"); if (parseSpecial(tmpname, namebuf, parambuf, depbuf)) addSpecialDesc(run, tmpname, namebuf, parambuf, depind); strcpy(ch, "[is]"); } else if (strstr(ch, "#drain")) { strcpy(ch, "[id]"); if (parseSpecial(tmpname, namebuf, parambuf, depbuf)) addSpecialDesc(run, tmpname, namebuf, parambuf, depind); strcpy(ch, "[ig]"); } else if (strstr(ch, "#source")) { strcpy(ch, "[is]"); if (parseSpecial(tmpname, namebuf, parambuf, depbuf)) addSpecialDesc(run, tmpname, namebuf, parambuf, depind); strcpy(ch, "[ib]"); } else if (strstr(ch, "#internal") && (tmpname[1] == 'd')) { strcpy(ch, "[id]"); } else { fprintf(cp_err, "Debug: could output current for %s\n", tmpname); continue; } if (parseSpecial(tmpname, namebuf, parambuf, depbuf)) { if (*depbuf) { fprintf(stderr, "Warning : unexpected dependent variable on %s\n", tmpname); } else { addSpecialDesc(run, tmpname, namebuf, parambuf, depind); } } } } } /* Pass 2. */ for (i = 0; i < numsaves; i++) { if (savesused[i]) continue; if (!parseSpecial(saves[i].name, namebuf, parambuf, depbuf)) { if (saves[i].analysis) fprintf(cp_err, "Warning: can't parse '%s': ignored\n", saves[i].name); continue; } /* Now, if there's a dep variable, do we already have it? */ if (*depbuf) { for (j = 0; j < run->numData; j++) if (name_eq(depbuf, run->data[j].name)) break; if (j == run->numData) { /* Better add it. */ for (j = 0; j < numNames; j++) if (name_eq(depbuf, dataNames[j])) break; if (j == numNames) { fprintf(cp_err, "Warning: can't find '%s': value '%s' ignored\n", depbuf, saves[i].name); continue; } addDataDesc(run, dataNames[j], dataType, j); savesused[i] = TRUE; saves[i].used = 1; depind = j; } else { depind = run->data[j].outIndex; } } addSpecialDesc(run, saves[i].name, namebuf, parambuf, depind); } if (numsaves) { for (i = 0; i < numsaves; i++) { tfree(saves[i].analysis); tfree(saves[i].name); } tfree(saves); tfree(savesused); } if (numNames && ((run->numData == 1 && run->refIndex != -1) || (run->numData == 0 && run->refIndex == -1))) { fprintf(cp_err, "Error: no data saved for %s; analysis not run\n", spice_analysis_get_description(analysisPtr->JOBtype)); return E_NOTFOUND; } /* Now that we have our own data structures built up, let's see what * nutmeg wants us to do. */ run->writeOut = ft_getOutReq(&run->fp, &run->runPlot, &run->binary, run->type, run->name); if (run->writeOut) { fileInit(run); } else { plotInit(run); if (refName) run->runPlot->pl_ndims = 1; } } /*Start BLT, initilises the blt vectors saj*/ #ifdef TCL_MODULE blt_init(run); #elif defined SHARED_MODULE sh_vecinit(run); #endif return (OK); } static int addDataDesc(runDesc *run, char *name, int type, int ind) { dataDesc *data; if (!run->numData) run->data = TMALLOC(dataDesc, 1); else run->data = TREALLOC(dataDesc, run->data, run->numData + 1); data = &run->data[run->numData]; /* so freeRun will get nice NULL pointers for the fields we don't set */ bzero(data, sizeof(dataDesc)); data->name = copy(name); data->type = type; data->gtype = GRID_LIN; data->regular = TRUE; data->outIndex = ind; /* It's the reference vector. */ if (ind == -1) run->refIndex = run->numData; run->numData++; return (OK); } static int addSpecialDesc(runDesc *run, char *name, char *devname, char *param, int depind) { dataDesc *data; char *unique; /* unique char * from back-end */ if (!run->numData) run->data = TMALLOC(dataDesc, 1); else run->data = TREALLOC(dataDesc, run->data, run->numData + 1); data = &run->data[run->numData]; /* so freeRun will get nice NULL pointers for the fields we don't set */ bzero(data, sizeof(dataDesc)); data->name = copy(name); unique = copy(devname); /* MW. My "special" routine here */ INPinsertNofree(&unique, ft_curckt->ci_symtab); data->specName = unique; data->specParamName = copy(param); data->specIndex = depind; data->specType = -1; data->specFast = NULL; data->regular = FALSE; run->numData++; return (OK); } int OUTpData(runDesc *plotPtr, IFvalue *refValue, IFvalue *valuePtr) { runDesc *run = plotPtr; // FIXME int i; run->pointCount++; #ifdef TCL_MODULE steps_completed = run->pointCount; #endif if (run->writeOut) { if (run->pointCount == 1) fileInit_pass2(run); fileStartPoint(run->fp, run->binary, run->pointCount); if (run->refIndex != -1) { if (run->isComplex) { fileAddComplexValue(run->fp, run->binary, refValue->cValue); /* While we're looking at the reference value, print it to the screen every quarter of a second, to give some feedback without using too much CPU time */ #ifndef HAS_WINGUI if (!orflag) { currclock = clock(); if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) { fprintf(stderr, " Reference value : % 12.5e\r", refValue->cValue.real); lastclock = currclock; } } #endif } else { /* And the same for a non-complex value */ fileAddRealValue(run->fp, run->binary, refValue->rValue); #ifndef HAS_WINGUI if (!orflag) { currclock = clock(); if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) { fprintf(stderr, " Reference value : % 12.5e\r", refValue->rValue); lastclock = currclock; } } #endif } } for (i = 0; i < run->numData; i++) { /* we've already printed reference vec first */ if (run->data[i].outIndex == -1) continue; #ifdef TCL_MODULE blt_add(i, refValue ? refValue->rValue : NAN); #endif if (run->data[i].regular) { if (run->data[i].type == IF_REAL) fileAddRealValue(run->fp, run->binary, valuePtr->v.vec.rVec [run->data[i].outIndex]); else if (run->data[i].type == IF_COMPLEX) fileAddComplexValue(run->fp, run->binary, valuePtr->v.vec.cVec [run->data[i].outIndex]); else fprintf(stderr, "OUTpData: unsupported data type\n"); } else { IFvalue val; /* should pre-check instance */ if (!getSpecial(&run->data[i], run, &val)) { /* If this is the first data point, print a warning for any unrecognized variables, since this has not already been checked */ if (run->pointCount == 1) fprintf(stderr, "Warning: unrecognized variable - %s\n", run->data[i].name); if (run->isComplex) { val.cValue.real = 0; val.cValue.imag = 0; fileAddComplexValue(run->fp, run->binary, val.cValue); } else { val.rValue = 0; fileAddRealValue(run->fp, run->binary, val.rValue); } continue; } if (run->data[i].type == IF_REAL) fileAddRealValue(run->fp, run->binary, val.rValue); else if (run->data[i].type == IF_COMPLEX) fileAddComplexValue(run->fp, run->binary, val.cValue); else fprintf(stderr, "OUTpData: unsupported data type\n"); } #ifdef TCL_MODULE blt_add(i, valuePtr->v.vec.rVec [run->data[i].outIndex]); #endif } fileEndPoint(run->fp, run->binary); /* Check that the write to disk completed successfully, otherwise abort */ if (ferror(run->fp)) { fprintf(stderr, "Warning: rawfile write error !!\n"); shouldstop = TRUE; } } else { /* This is interactive mode. Update the screen with the reference variable just the same */ #ifndef HAS_WINGUI if (!orflag) { currclock = clock(); if ((currclock-lastclock) > (0.25*CLOCKS_PER_SEC)) { if (run->isComplex) { fprintf(stderr, " Reference value : % 12.5e\r", refValue ? refValue->cValue.real : NAN); } else { fprintf(stderr, " Reference value : % 12.5e\r", refValue ? refValue->rValue : NAN); } lastclock = currclock; } } #endif for (i = 0; i < run->numData; i++) { #ifdef TCL_MODULE /*Locks the blt vector to stop access*/ blt_lockvec(i); #endif if (run->data[i].outIndex == -1) { if (run->data[i].type == IF_REAL) plotAddRealValue(&run->data[i], refValue->rValue); else if (run->data[i].type == IF_COMPLEX) plotAddComplexValue(&run->data[i], refValue->cValue); } else if (run->data[i].regular) { if (run->data[i].type == IF_REAL) plotAddRealValue(&run->data[i], valuePtr->v.vec.rVec[run->data[i].outIndex]); else if (run->data[i].type == IF_COMPLEX) plotAddComplexValue(&run->data[i], valuePtr->v.vec.cVec[run->data[i].outIndex]); } else { IFvalue val; /* should pre-check instance */ if (!getSpecial(&run->data[i], run, &val)) continue; if (run->data[i].type == IF_REAL) plotAddRealValue(&run->data[i], val.rValue); else if (run->data[i].type == IF_COMPLEX) plotAddComplexValue(&run->data[i], val.cValue); else fprintf(stderr, "OUTpData: unsupported data type\n"); } #ifdef TCL_MODULE /*relinks and unlocks vector*/ blt_relink(i, (run->data[i]).vec); #endif } gr_iplot(run->runPlot); } if (ft_bpcheck(run->runPlot, run->pointCount) == FALSE) shouldstop = TRUE; #ifdef TCL_MODULE Tcl_ExecutePerLoop(); #elif defined SHARED_MODULE sh_ExecutePerLoop(); #endif return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTwReference(void *plotPtr, IFvalue *valuePtr, void **refPtr) { NG_IGNORE(refPtr); NG_IGNORE(valuePtr); NG_IGNORE(plotPtr); return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTwData(runDesc *plotPtr, int dataIndex, IFvalue *valuePtr, void *refPtr) { NG_IGNORE(refPtr); NG_IGNORE(valuePtr); NG_IGNORE(dataIndex); NG_IGNORE(plotPtr); return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTwEnd(runDesc *plotPtr) { NG_IGNORE(plotPtr); return (OK); } int OUTendPlot(runDesc *plotPtr) { runDesc *run = plotPtr; // FIXME if (run->writeOut) { fileEnd(run); } else { gr_end_iplot(); plotEnd(run); } freeRun(run); return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTbeginDomain(runDesc *plotPtr, IFuid refName, int refType, IFvalue *outerRefValue) { NG_IGNORE(outerRefValue); NG_IGNORE(refType); NG_IGNORE(refName); NG_IGNORE(plotPtr); return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTendDomain(runDesc *plotPtr) { NG_IGNORE(plotPtr); return (OK); } /* ARGSUSED */ /* until some code gets written */ int OUTattributes(runDesc *plotPtr, IFuid varName, int param, IFvalue *value) { runDesc *run = plotPtr; // FIXME GRIDTYPE type; struct dvec *d; NG_IGNORE(value); if (param == OUT_SCALE_LIN) type = GRID_LIN; else if (param == OUT_SCALE_LOG) type = GRID_XLOG; else return E_UNSUPP; if (run->writeOut) { if (varName) { int i; for (i = 0; i < run->numData; i++) if (!strcmp(varName, run->data[i].name)) run->data[i].gtype = type; } else { run->data[run->refIndex].gtype = type; } } else { if (varName) { for (d = run->runPlot->pl_dvecs; d; d = d->v_next) if (!strcmp(varName, d->v_name)) d->v_gridtype = type; } else if (param == PLOT_COMB) { for (d = run->runPlot->pl_dvecs; d; d = d->v_next) d->v_plottype = PLOT_COMB; } else { run->runPlot->pl_scale->v_gridtype = type; } } return (OK); } /* The file writing routines. */ static void fileInit(runDesc *run) { char buf[513]; int i; size_t n; lastclock = clock(); /* This is a hack. */ run->isComplex = FALSE; for (i = 0; i < run->numData; i++) if (run->data[i].type == IF_COMPLEX) run->isComplex = TRUE; n = 0; sprintf(buf, "Title: %s\n", run->name); n += strlen(buf); fputs(buf, run->fp); sprintf(buf, "Date: %s\n", datestring()); n += strlen(buf); fputs(buf, run->fp); sprintf(buf, "Plotname: %s\n", run->type); n += strlen(buf); fputs(buf, run->fp); sprintf(buf, "Flags: %s\n", run->isComplex ? "complex" : "real"); n += strlen(buf); fputs(buf, run->fp); sprintf(buf, "No. Variables: %d\n", run->numData); n += strlen(buf); fputs(buf, run->fp); sprintf(buf, "No. Points: "); n += strlen(buf); fputs(buf, run->fp); fflush(run->fp); /* Gotta do this for LATTICE. */ if (run->fp == stdout || (run->pointPos = ftell(run->fp)) <= 0) run->pointPos = (long) n; fprintf(run->fp, "0 \n"); /* Save 8 spaces here. */ /*fprintf(run->fp, "Command: version %s\n", ft_sim->version);*/ fprintf(run->fp, "Variables:\n"); printf("No. of Data Columns : %d \n", run->numData); } static void fileInit_pass2(runDesc *run) { int i, type; for (i = 0; i < run->numData; i++) { char *name = run->data[i].name; if (substring("#branch", name)) type = SV_CURRENT; else if (cieq(name, "time")) type = SV_TIME; else if (cieq(name, "frequency")) type = SV_FREQUENCY; else if (cieq(name, "temp-sweep")) type = SV_TEMP; else if (cieq(name, "res-sweep")) type = SV_RES; else if ((*name == '@') && (substring("[g", name))) type = SV_ADMITTANCE; else if ((*name == '@') && (substring("[c", name))) type = SV_CAPACITANCE; else if ((*name == '@') && (substring("[i", name))) type = SV_CURRENT; else if ((*name == '@') && (substring("[q", name))) type = SV_CHARGE; else type = SV_VOLTAGE; if (type == SV_CURRENT) { char *branch = strstr(name, "#branch"); if (branch) *branch = '\0'; fprintf(run->fp, "\t%d\ti(%s)\t%s", i, name, ft_typenames(type)); if (branch) *branch = '#'; } else if (type == SV_VOLTAGE) { fprintf(run->fp, "\t%d\tv(%s)\t%s", i, name, ft_typenames(type)); } else { fprintf(run->fp, "\t%d\t%s\t%s", i, name, ft_typenames(type)); } if (run->data[i].gtype == GRID_XLOG) fprintf(run->fp, "\tgrid=3"); fprintf(run->fp, "\n"); } fprintf(run->fp, "%s:\n", run->binary ? "Binary" : "Values"); fflush(run->fp); /* Allocate Row buffer */ if (run->binary) { rowbuflen = (size_t) (run->numData); if (run->isComplex) rowbuflen *= 2; rowbuf = TMALLOC(double, rowbuflen); } else { // fIXME rowbuflen = 0; rowbuf = NULL; } } static void fileStartPoint(FILE *fp, bool bin, int num) { if (!bin) fprintf(fp, "%d\t", num - 1); /* reset buffer pointer to zero */ column = 0; } static void fileAddRealValue(FILE *fp, bool bin, double value) { if (bin) rowbuf[column++] = value; else fprintf(fp, "\t%.*e\n", DOUBLE_PRECISION, value); } static void fileAddComplexValue(FILE *fp, bool bin, IFcomplex value) { if (bin) { rowbuf[column++] = value.real; rowbuf[column++] = value.imag; } else { fprintf(fp, "\t%.*e,%.*e\n", DOUBLE_PRECISION, value.real, DOUBLE_PRECISION, value.imag); } } /* ARGSUSED */ /* until some code gets written */ static void fileEndPoint(FILE *fp, bool bin) { /* write row buffer to file */ /* otherwise the data has already been written */ if (bin) fwrite(rowbuf, sizeof(double), rowbuflen, fp); } /* Here's the hack... Run back and fill in the number of points. */ static void fileEnd(runDesc *run) { if (run->fp != stdout) { long place = ftell(run->fp); fseek(run->fp, run->pointPos, SEEK_SET); fprintf(run->fp, "%d", run->pointCount); fprintf(stdout, "\nNo. of Data Rows : %d\n", run->pointCount); fseek(run->fp, place, SEEK_SET); } else { /* Yet another hack-around */ fprintf(stderr, "@@@ %ld %d\n", run->pointPos, run->pointCount); } fflush(run->fp); if (run->binary) { /* deallocate row buffer */ tfree(rowbuf); } } /* The plot maintenance routines. */ static void plotInit(runDesc *run) { struct plot *pl = plot_alloc(run->type); char buf[100]; struct dvec *v; dataDesc *dd; int i; pl->pl_title = copy(run->name); pl->pl_name = copy(run->type); pl->pl_date = copy(datestring()); pl->pl_ndims = 0; plot_new(pl); plot_setcur(pl->pl_typename); run->runPlot = pl; /* This is a hack. */ /* if any of them complex, make them all complex */ run->isComplex = FALSE; for (i = 0; i < run->numData; i++) if (run->data[i].type == IF_COMPLEX) run->isComplex = TRUE; for (i = 0; i < run->numData; i++) { dd = &run->data[i]; v = alloc(struct dvec); if (isdigit(*dd->name)) { (void) sprintf(buf, "V(%s)", dd->name); v->v_name = copy(buf); } else { v->v_name = copy(dd->name); } if (substring("#branch", v->v_name)) v->v_type = SV_CURRENT; else if (cieq(v->v_name, "time")) v->v_type = SV_TIME; else if (cieq(v->v_name, "frequency")) v->v_type = SV_FREQUENCY; else if (cieq(v->v_name, "onoise_spectrum")) v->v_type = SV_OUTPUT_N_DENS; else if (cieq(v->v_name, "onoise_integrated")) v->v_type = SV_OUTPUT_NOISE; else if (cieq(v->v_name, "inoise_spectrum")) v->v_type = SV_INPUT_N_DENS; else if (cieq(v->v_name, "inoise_integrated")) v->v_type = SV_INPUT_NOISE; else if (cieq(v->v_name, "temp-sweep")) v->v_type = SV_TEMP; else if (cieq(v->v_name, "res-sweep")) v->v_type = SV_RES; else if ((*(v->v_name) == '@') && (substring("[g", v->v_name))) v->v_type = SV_ADMITTANCE; else if ((*(v->v_name) == '@') && (substring("[c", v->v_name))) v->v_type = SV_CAPACITANCE; else if ((*(v->v_name) == '@') && (substring("[i", v->v_name))) v->v_type = SV_CURRENT; else if ((*(v->v_name) == '@') && (substring("[q", v->v_name))) v->v_type = SV_CHARGE; else v->v_type = SV_VOLTAGE; v->v_length = 0; v->v_scale = NULL; if (!run->isComplex) { v->v_flags = VF_REAL; v->v_realdata = NULL; } else { v->v_flags = VF_COMPLEX; v->v_compdata = NULL; } v->v_flags |= VF_PERMANENT; vec_new(v); dd->vec = v; } } static void plotAddRealValue(dataDesc *desc, double value) { struct dvec *v = desc->vec; if (isreal(v)) { v->v_realdata = TREALLOC(double, v->v_realdata, v->v_length + 1); v->v_realdata[v->v_length] = value; } else { /* a real parading as a VF_COMPLEX */ v->v_compdata = TREALLOC(ngcomplex_t, v->v_compdata, v->v_length + 1); v->v_compdata[v->v_length].cx_real = value; v->v_compdata[v->v_length].cx_imag = 0.0; } v->v_length++; v->v_dims[0] = v->v_length; /* va, must be updated */ } static void plotAddComplexValue(dataDesc *desc, IFcomplex value) { struct dvec *v = desc->vec; v->v_compdata = TREALLOC(ngcomplex_t, v->v_compdata, v->v_length + 1); v->v_compdata[v->v_length].cx_real = value.real; v->v_compdata[v->v_length].cx_imag = value.imag; v->v_length++; v->v_dims[0] = v->v_length; /* va, must be updated */ } /* ARGSUSED */ /* until some code gets written */ static void plotEnd(runDesc *run) { fprintf(stderr, "\n"); fprintf(stdout, "\nNo. of Data Rows : %d\n", run->pointCount); } /* ParseSpecial takes something of the form "@name[param,index]" and rips * out name, param, andstrchr. */ static bool parseSpecial(char *name, char *dev, char *param, char *ind) { char *s; *dev = *param = *ind = '\0'; if (*name != '@') return FALSE; name++; s = dev; while (*name && (*name != '[')) *s++ = *name++; *s = '\0'; if (!*name) return TRUE; name++; s = param; while (*name && (*name != ',') && (*name != ']')) *s++ = *name++; *s = '\0'; if (*name == ']') return (!name[1] ? TRUE : FALSE); else if (!*name) return FALSE; name++; s = ind; while (*name && (*name != ']')) *s++ = *name++; *s = '\0'; if (*name && !name[1]) return TRUE; else return FALSE; } /* This routine must match two names with or without a V() around them. */ static bool name_eq(char *n1, char *n2) { char buf1[BSIZE_SP], buf2[BSIZE_SP], *s; if ((s = strchr(n1, '(')) != NULL) { strcpy(buf1, s); if ((s = strchr(buf1, ')')) == NULL) return FALSE; *s = '\0'; n1 = buf1; } if ((s = strchr(n2, '(')) != NULL) { strcpy(buf2, s); if ((s = strchr(buf2, ')')) == NULL) return FALSE; *s = '\0'; n2 = buf2; } return (strcmp(n1, n2) ? FALSE : TRUE); } static bool getSpecial(dataDesc *desc, runDesc *run, IFvalue *val) { IFvalue selector; struct variable *vv; selector.iValue = desc->specIndex; if (INPaName(desc->specParamName, val, run->circuit, &desc->specType, desc->specName, &desc->specFast, ft_sim, &desc->type, &selector) == OK) { desc->type &= (IF_REAL | IF_COMPLEX); /* mask out other bits */ return TRUE; } if ((vv = if_getstat(run->circuit, &desc->name[1])) != NULL) { /* skip @ sign */ desc->type = IF_REAL; if (vv->va_type == CP_REAL) val->rValue = vv->va_real; else if (vv->va_type == CP_NUM) val->rValue = vv->va_num; else if (vv->va_type == CP_BOOL) val->rValue = (vv->va_bool ? 1.0 : 0.0); else return FALSE; /* not a real */ tfree(vv); return TRUE; } return FALSE; } static void freeRun(runDesc *run) { int i; for (i = 0; i < run->numData; i++) { tfree(run->data[i].name); tfree(run->data[i].specParamName); } tfree(run->data); tfree(run->type); tfree(run->name); tfree(run); } int OUTstopnow(void) { if (ft_intrpt || shouldstop) { ft_intrpt = shouldstop = FALSE; return (1); } return (0); } /* Print out error messages. */ static struct mesg { char *string; long flag; } msgs[] = { { "Warning", ERR_WARNING } , { "Fatal error", ERR_FATAL } , { "Panic", ERR_PANIC } , { "Note", ERR_INFO } , { NULL, 0 } }; void OUTerror(int flags, char *format, IFuid *names) { struct mesg *m; char buf[BSIZE_SP], *s, *bptr; int nindex = 0; if ((flags == ERR_INFO) && cp_getvar("printinfo", CP_BOOL, NULL)) return; for (m = msgs; m->flag; m++) if (flags & m->flag) fprintf(cp_err, "%s: ", m->string); for (s = format, bptr = buf; *s; s++) { if (*s == '%' && (s == format || s[-1] != '%') && s[1] == 's') { if (names[nindex]) strcpy(bptr, names[nindex]); else strcpy(bptr, "(null)"); bptr += strlen(bptr); s++; nindex++; } else { *bptr++ = *s; } } *bptr = '\0'; fprintf(cp_err, "%s\n", buf); fflush(cp_err); } ngspice-26/src/frontend/com_shell.h0000644000265600020320000000023312264261473016753 0ustar andreasadmin/************* * Header file for com_shell.c ************/ #ifndef ngspice_COM_SHELL_H #define ngspice_COM_SHELL_H void com_shell(wordlist *wl); #endif ngspice-26/src/frontend/linear.c0000644000265600020320000000572712264261473016270 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "circuits.h" #include "linear.h" #include "interp.h" /* Interpolate all the vectors in a plot to a linear time scale, which * we determine by looking at the transient parameters in the CKT struct. */ void com_linearize(wordlist *wl) { double tstart, tstop, tstep, d; struct plot *new, *old; struct dvec *newtime, *v; struct dvec *oldtime; int len, i; char buf[BSIZE_SP]; if (!ft_curckt || !ft_curckt->ci_ckt || !if_tranparams(ft_curckt, &tstart, &tstop, &tstep)) { fprintf(cp_err, "Error: can't get transient parameters from circuit\n"); return; } if (((tstop - tstart) * tstep <= 0.0) || ((tstop - tstart) < tstep)) { fprintf(cp_err, "Error: bad parameters -- start = %G, stop = %G, step = %G\n", tstart, tstop, tstep); return; } if (!plot_cur || !plot_cur->pl_dvecs || !plot_cur->pl_scale) { fprintf(cp_err, "Error: no vectors available\n"); return; } if (!isreal(plot_cur->pl_scale)) { fprintf(cp_err, "Error: non-real time scale for %s\n", plot_cur->pl_typename); return; } if (!ciprefix("tran", plot_cur->pl_typename)) { fprintf(cp_err, "Error: plot must be a transient analysis\n"); return; } old = plot_cur; oldtime = old->pl_scale; new = plot_alloc("transient"); (void) sprintf(buf, "%s (linearized)", old->pl_name); new->pl_name = copy(buf); new->pl_title = copy(old->pl_title); new->pl_date = copy(old->pl_date); new->pl_next = plot_list; plot_new(new); plot_setcur(new->pl_typename); plot_list = new; len = (int)((tstop - tstart) / tstep + 1.5); newtime = alloc(struct dvec); newtime->v_name = copy(oldtime->v_name); newtime->v_type = oldtime->v_type; newtime->v_flags = oldtime->v_flags; newtime->v_flags |= VF_PERMANENT; newtime->v_length = len; newtime->v_plot = new; newtime->v_realdata = TMALLOC(double, len); for (i = 0, d = tstart; i < len; i++, d += tstep) newtime->v_realdata[i] = d; new->pl_scale = new->pl_dvecs = newtime; if (wl) { while (wl) { v = vec_fromplot(wl->wl_word, old); if (!v) { fprintf(cp_err, "Error: no such vector %s\n", wl->wl_word); wl = wl->wl_next; continue; } lincopy(v, newtime->v_realdata, len, oldtime); wl = wl->wl_next; } } else { for (v = old->pl_dvecs; v; v = v->v_next) { if (v == old->pl_scale) continue; lincopy(v, newtime->v_realdata, len, oldtime); } } } ngspice-26/src/frontend/runcoms2.c0000644000265600020320000001625612264261473016565 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Circuit simulation commands. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/ftedev.h" #include "ngspice/ftedebug.h" #include "ngspice/dvec.h" #include "ngspice/trandefs.h" #include "circuits.h" #include "runcoms2.h" #include "runcoms.h" #include "variable.h" #include "breakp2.h" #include "plotting/graf.h" #include "spiceif.h" #include "outitf.h" #include "numparam/numpaif.h" #include "ngspice/inpdefs.h" #define RAWBUF_SIZE 32768 extern char rawfileBuf[RAWBUF_SIZE]; extern void line_free_x(struct line * deck, bool recurse); extern INPmodel *modtab; #define line_free(line, flag) \ do { \ line_free_x(line, flag); \ line = NULL; \ } while(0) /* Continue a simulation. If there is non in progress, this is the * equivalent of "run". */ /* This is a hack to tell iplot routine to redraw the grid and initialize the display device */ bool resumption = FALSE; void com_resume(wordlist *wl) { struct dbcomm *db; int err; /*rawfile output saj*/ bool dofile = FALSE; char buf[BSIZE_SP]; bool ascii = AsciiRawFile; /*end saj*/ NG_IGNORE(wl); /*saj fix segment*/ if (!ft_curckt) { fprintf(cp_err, "Error: there aren't any circuits loaded.\n"); return; } else if (ft_curckt->ci_ckt == NULL) { /* Set noparse? */ fprintf(cp_err, "Error: circuit not parsed.\n"); return; } /*saj*/ if (ft_curckt->ci_inprogress == FALSE) { fprintf(cp_err, "Note: run starting\n"); com_run(NULL); return; } ft_curckt->ci_inprogress = TRUE; ft_setflag = TRUE; reset_trace(); for (db = dbs, resumption = FALSE; db; db = db->db_next) if (db->db_type == DB_IPLOT || db->db_type == DB_IPLOTALL) resumption = TRUE; /*rawfile output saj*/ if (last_used_rawfile) dofile = TRUE; if (cp_getvar("filetype", CP_STRING, buf)) { if (eq(buf, "binary")) ascii = FALSE; else if (eq(buf, "ascii")) ascii = TRUE; else fprintf(cp_err, "Warning: strange file type \"%s\" (using \"ascii\")\n", buf); } if (dofile) { if (!last_used_rawfile) rawfileFp = stdout; #if defined(__MINGW32__) || defined(_MSC_VER) /* ask if binary or ASCII, open file with w or wb hvogt 15.3.2000 */ else if (ascii) { if ((rawfileFp = fopen(last_used_rawfile, "a")) == NULL) { setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); perror(last_used_rawfile); ft_setflag = FALSE; return; } } else if (!ascii) { if ((rawfileFp = fopen(last_used_rawfile, "ab")) == NULL) { setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); perror(last_used_rawfile); ft_setflag = FALSE; return; } } /*---------------------------------------------------------------------------*/ #else else if (!(rawfileFp = fopen(last_used_rawfile, "a"))) { setvbuf(rawfileFp, rawfileBuf, _IOFBF, RAWBUF_SIZE); perror(last_used_rawfile); ft_setflag = FALSE; return; } #endif rawfileBinary = !ascii; } else { rawfileFp = NULL; } /* if dofile */ /*end saj*/ err = if_run(ft_curckt->ci_ckt, "resume", NULL, ft_curckt->ci_symtab); /*close rawfile saj*/ if (rawfileFp) { if (ftell(rawfileFp) == 0) { (void) fclose(rawfileFp); (void) unlink(last_used_rawfile); } else { (void) fclose(rawfileFp); } } /*end saj*/ if (err == 1) { /* The circuit was interrupted somewhere. */ fprintf(cp_err, "simulation interrupted\n"); } else if (err == 2) { fprintf(cp_err, "simulation aborted\n"); ft_curckt->ci_inprogress = FALSE; } else { ft_curckt->ci_inprogress = FALSE; } } /* Throw out the circuit struct and recreate it from the deck. This command * should be obsolete. */ void com_rset(wordlist *wl) { struct variable *v, *next; NG_IGNORE(wl); if (ft_curckt == NULL) { fprintf(cp_err, "Error: there is no circuit loaded.\n"); return; } INPkillMods(); if_cktfree(ft_curckt->ci_ckt, ft_curckt->ci_symtab); for (v = ft_curckt->ci_vars; v; v = next) { next = v->va_next; tfree(v); } ft_curckt->ci_vars = NULL; inp_dodeck(ft_curckt->ci_deck, ft_curckt->ci_name, NULL, TRUE, ft_curckt->ci_options, ft_curckt->ci_filename); } /* Clears ckt and removes current circuit from database */ void com_remcirc(wordlist *wl) { struct variable *v, *next; struct line *dd; /*in: the spice deck */ struct circ *p, *prev = NULL; #ifdef SHARED_MODULE /* This may happen only with shared ngspice during transient analysis, if simulation is stopped with 'bg_halt' and then circuit shall be removed prematurely. */ TRANan *job = (TRANan *) ft_curckt->ci_ckt->CKTcurJob; if ((job->JOBtype == 4) && (job->TRANplot)) SPfrontEnd->OUTendPlot (job->TRANplot); #endif NG_IGNORE(wl); if (ft_curckt == NULL) { fprintf(cp_err, "Error: there is no circuit loaded.\n"); return; } /* delete numparam data structure dicoS */ nupa_del_dicoS(); dbfree(ft_curckt->ci_dbs); ft_curckt->ci_dbs = NULL; dbs = NULL; /* The next lines stem from com_rset */ INPkillMods(); if_cktfree(ft_curckt->ci_ckt, ft_curckt->ci_symtab); for (v = ft_curckt->ci_vars; v; v = next) { next = v->va_next; tfree(v->va_name); tfree(v); } ft_curckt->ci_vars = NULL; /* delete the deck, parameter list, and options list in ft_curckt */ dd = ft_curckt->ci_deck; line_free(dd, TRUE); dd = ft_curckt->ci_param; line_free(dd, TRUE); dd = ft_curckt->ci_options; line_free(dd, TRUE); wl_free(ft_curckt->ci_commands); tfree(ft_curckt->FTEstats); ft_sim->deleteTask (ft_curckt->ci_ckt, ft_curckt->ci_defTask); if (ft_curckt->ci_name) tfree(ft_curckt->ci_name); if (ft_curckt->ci_filename) tfree(ft_curckt->ci_filename); /* delete the actual circuit entry from ft_circuits */ for (p = ft_circuits; p; p = p->ci_next) { if (ft_curckt == p) { if (prev == NULL) { ft_circuits = p->ci_next; tfree(p); p = NULL; break; } else { prev->ci_next = p->ci_next; tfree(p); p = NULL; break; } } prev = p; } /* make first entry in ft_circuits the actual circuit (or NULL) */ ft_curckt = ft_circuits; if (ft_curckt) { modtab = ft_curckt->ci_modtab; dbs = ft_curckt->ci_dbs; } } ngspice-26/src/frontend/com_asciiplot.c0000644000265600020320000000032412264261473017627 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "plotting/plotit.h" #include "com_asciiplot.h" void com_asciiplot(wordlist *wl) { plotit(wl, NULL, "lpr"); } ngspice-26/src/frontend/plotting/0000755000265600020320000000000012264261704016474 5ustar andreasadminngspice-26/src/frontend/plotting/plotcurv.c0000644000265600020320000002430212264261473020522 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Curve plotting routines and general (non-graphics) plotting things. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/graph.h" #include "graf.h" #include "ngspice/ftedbgra.h" #include "plotcurv.h" static void plotinterval(struct dvec *v, double lo, double hi, register double *coeffs, int degree, bool rotated); /* Plot the vector v, with scale xs. If we are doing curve-fitting, then * do some tricky stuff. */ void ft_graf(struct dvec *v, struct dvec *xs, bool nostart) { int degree, gridsize, length; register int i, j, l; double *scratch, *result, *gridbuf, *mm; register double *xdata, *ydata; bool rot, increasing = FALSE; double dx = 0.0, dy = 0.0, lx = 0.0, ly = 0.0; int dir; /* if already started, use saved degree */ if (nostart) { degree = currentgraph->degree; } else { if (!cp_getvar("polydegree", CP_NUM, °ree)) degree = 1; currentgraph->degree = degree; } if (degree > v->v_length) degree = v->v_length; if (degree < 1) { fprintf(cp_err, "Error: polydegree is %d, can't plot...\n", degree); return; } if (!cp_getvar("gridsize", CP_NUM, &gridsize)) gridsize = 0; if ((gridsize < 0) || (gridsize > 10000)) { fprintf(cp_err, "Error: bad grid size %d\n", gridsize); return; } if (gridsize && xs) { if (isreal(xs)) { increasing = (xs->v_realdata[0] < xs->v_realdata[1]); for (i = 0; i < xs->v_length - 1; i++) if (increasing != (xs->v_realdata[i] < xs->v_realdata[i + 1])) { fprintf(cp_err, "Warning: scale not monotonic, gridsize not relevant.\n"); gridsize = 0; break; } } else { increasing = (realpart(xs->v_compdata[0]) < realpart(xs->v_compdata[1])); for (i = 0; i < xs->v_length - 1; i++) if (increasing != (realpart(xs->v_compdata[i]) < realpart(xs->v_compdata[i + 1]))) { fprintf(cp_err, "Warning: scale not monotonic, gridsize not relevant.\n"); gridsize = 0; break; } } } if (!nostart) gr_start(v); /* Do the one value case */ if (!xs) { for (i = 0; i < v->v_length; i++) { /* We should do the one - point case too! * Important for pole-zero for example */ if (v->v_length == 1) { j = 0; } else { j = i-1; if (i == 0) continue; } if (isreal(v)) { /* This isn't good but we may as well do * something useful. */ gr_point(v, v->v_realdata[i], 0.0, /* v->v_realdata[i], */ v->v_realdata[j], 0.0, /* v->v_realdata[j], */ (j == i ? 1 : i)); } else { gr_point(v, realpart(v->v_compdata[i]), imagpart(v->v_compdata[i]), realpart(v->v_compdata[j]), imagpart(v->v_compdata[j]), (j == i ? 1 : i)); } } gr_end(v); return; } xs->v_flags |= VF_PERMANENT; /* First check the simple case, where we don't have to do any * interpolation. */ if ((degree == 1) && (gridsize == 0)) { dir = 0; for (i = 0, j = v->v_length; i < j; i++) { dx = isreal(xs) ? xs->v_realdata[i] : realpart(xs->v_compdata[i]); dy = isreal(v) ? v->v_realdata[i] : realpart(v->v_compdata[i]); if ((i == 0 || (dir > 0 ? lx > dx : dir < 0 ? lx < dx : 0)) && xs->v_plot && xs->v_plot->pl_scale == xs) { gr_point(v, dx, dy, lx, ly, 0); } else { gr_point(v, dx, dy, lx, ly, i); if (!dir) dir = lx > dx ? -1 : lx < dx ? 1 : 0; } lx = dx; ly = dy; } if (v->v_length == 1) gr_point(v, dx, dy, lx, ly, 1); gr_end(v); return; } if (gridsize < degree + 1) gridsize = 0; if (gridsize) { /* This is done quite differently from what we do below... */ gridbuf = TMALLOC(double, gridsize); result = TMALLOC(double, gridsize); if (isreal(v)) { ydata = v->v_realdata; } else { ydata = TMALLOC(double, v->v_length); for (i = 0; i < v->v_length; i++) ydata[i] = realpart(v->v_compdata[i]); } if (isreal(xs)) { xdata = xs->v_realdata; } else { xdata = TMALLOC(double, xs->v_length); for (i = 0; i < xs->v_length; i++) xdata[i] = realpart(xs->v_compdata[i]); } mm = ft_minmax(xs, TRUE); dx = (mm[1] - mm[0]) / gridsize; if (increasing) for (i = 0, dy = mm[0]; i < gridsize; i++, dy += dx) gridbuf[i] = dy; else for (i = 0, dy = mm[1]; i < gridsize; i++, dy -= dx) gridbuf[i] = dy; if (!ft_interpolate(ydata, result, xdata, v->v_length, gridbuf, gridsize, degree)) { fprintf(cp_err, "Error: can't put %s on gridsize %d\n", v->v_name, gridsize); return; } /* Now this is a problem. There's no way that we can * figure out where to put the tic marks to correspond with * the actual data... */ for (i = 0; i < gridsize; i++) gr_point(v, gridbuf[i], result[i], gridbuf[i ? (i - 1) : i], result[i ? (i - 1) : i], -1); gr_end(v); tfree(gridbuf); tfree(result); if (!isreal(v)) tfree(ydata); if (!isreal(xs)) tfree(xdata); return; } /* We need to do curve fitting now. First get some scratch * space */ scratch = TMALLOC(double, (degree + 1) * (degree + 2)); result = TMALLOC(double, degree + 1); xdata = TMALLOC(double, degree + 1); ydata = TMALLOC(double, degree + 1); /* Plot the first degree segments... */ if (isreal(v)) bcopy(v->v_realdata, ydata, (size_t)(degree + 1) * sizeof(double)); else for (i = 0; i <= degree; i++) ydata[i] = realpart(v->v_compdata[i]); if (isreal(xs)) bcopy(xs->v_realdata, xdata, (size_t)(degree + 1) * sizeof(double)); else for (i = 0; i <= degree; i++) xdata[i] = realpart(xs->v_compdata[i]); rot = FALSE; while (!ft_polyfit(xdata, ydata, result, degree, scratch)) { /* Rotate the coordinate system 90 degrees and try again. * If it doesn't work this time, bump the interpolation * degree down by one... */ if (ft_polyfit(ydata, xdata, result, degree, scratch)) { rot = TRUE; break; } if (--degree == 0) { fprintf(cp_err, "plotcurve: Internal Error: ack...\n"); return; } } /* Plot this part of the curve... */ for (i = 0; i < degree; i++) if (rot) plotinterval(v, ydata[i], ydata[i + 1], result, degree, TRUE); else plotinterval(v, xdata[i], xdata[i + 1], result, degree, FALSE); /* Now plot the rest, piece by piece... l is the * last element under consideration. */ length = v->v_length; for (l = degree + 1; l < length; l++) { /* Shift the old stuff by one and get another value. */ for (i = 0; i < degree; i++) { xdata[i] = xdata[i + 1]; ydata[i] = ydata[i + 1]; } if (isreal(v)) ydata[i] = v->v_realdata[l]; else ydata[i] = realpart(v->v_compdata[l]); if (isreal(xs)) xdata[i] = xs->v_realdata[l]; else xdata[i] = realpart(xs->v_compdata[l]); rot = FALSE; while (!ft_polyfit(xdata, ydata, result, degree, scratch)) { if (ft_polyfit(ydata, xdata, result, degree, scratch)) { rot = TRUE; break; } if (--degree == 0) { fprintf(cp_err, "plotcurve: Internal Error: ack...\n"); return; } } if (rot) plotinterval(v, ydata[degree - 1], ydata[degree], result, degree, TRUE); else plotinterval(v, xdata[degree - 1], xdata[degree], result, degree, FALSE); } tfree(scratch); tfree(xdata); tfree(ydata); tfree(result); gr_end(v); } #define GRANULARITY 10 static void plotinterval(struct dvec *v, double lo, double hi, register double *coeffs, int degree, bool rotated) { double incr, dx, dy, lx, ly; register int i; int steps; /* fprintf(cp_err, "plotinterval(%s, %G, %G, [ ", v->v_name, lo, hi); for (i = 0; i <= degree; i++) fprintf(cp_err, "%G ", coeffs[i]); fprintf(cp_err, "], %d, %s)\n\r", degree, rotated ? "TRUE" : "FALSE"); */ /* This is a problem -- how do we know what granularity to use? If * the guy cares about this he will use gridsize. */ if (!cp_getvar("polysteps", CP_NUM, &steps)) steps = GRANULARITY; incr = (hi - lo) / (double) (steps + 1); dx = lo + incr; lx = lo; ly = ft_peval(lo, coeffs, degree); for (i = 0; i <= steps; i++, dx += incr) { dy = ft_peval(dx, coeffs, degree); if (rotated) gr_point(v, dy, dx, ly, lx, -1); else gr_point(v, dx, dy, lx, ly, -1); lx = dx; ly = dy; /* fprintf(cp_err, "plot (%G, %G)\n\r", dx, dy); */ } } ngspice-26/src/frontend/plotting/clip.c0000644000265600020320000001440612264261473017577 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopyher, U. C. Berkeley CAD Group Author: 1982 Giles Billingsley **********/ /* * Some routines to do clipping of polygons, etc to boxes. Most of this code * was rescued from MFB: * sccsid "@(#)mfbclip.c 1.2 12/21/83" */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "clip.h" #define POLYGONBUFSIZE 512 /* XXX */ #define CODEMINX 1 #define CODEMINY 2 #define CODEMAXX 4 #define CODEMAXY 8 #define CODE(x, y, c) \ do { \ c = 0; \ if (x < l) \ c = CODEMINX; \ else if (x > r) \ c = CODEMAXX; \ if (y < b) \ c |= CODEMINY; \ else if (y > t) \ c |= CODEMAXY; \ } while(0) #define SWAPINT(a, b) \ do { \ int xxxx = (a); \ (a) = (b); \ (b) = xxxx; \ } while(0) /* clip_line will clip a line to a rectangular area. The returned * value is 'TRUE' if the line is out of the AOI (therefore does not * need to be displayed) and 'FALSE' if the line is in the AOI. */ bool clip_line(int *pX1, int *pY1, int *pX2, int *pY2, int l, int b, int r, int t) { int x1 = *pX1; int y1 = *pY1; int x2 = *pX2; int y2 = *pY2; int x = 0, y = 0; int c, c1, c2; CODE(x1, y1, c1); CODE(x2, y2, c2); while (c1 || c2) { if (c1 & c2) return (TRUE); /* Line is invisible. */ if ((c = c1) == 0) c = c2; if (c & CODEMINX) { y = y1+(y2-y1)*(l-x1)/(x2-x1); x = l; } else if (c & CODEMAXX) { y = y1+(y2-y1)*(r-x1)/(x2-x1); x = r; } else if (c & CODEMINY) { x = x1+(x2-x1)*(b-y1)/(y2-y1); y = b; } else if (c & CODEMAXY) { x = x1+(x2-x1)*(t-y1)/(y2-y1); y = t; } if (c == c1) { x1 = x; y1 = y; CODE(x, y, c1); } else { x2 = x; y2 = y; CODE(x, y, c2); } } *pX1 = x1; *pY1 = y1; *pX2 = x2; *pY2 = y2; return (FALSE); /* Line is at least partially visible.*/ } /* This routine will clip a line to a circle, returning TRUE if the line * is entirely outside the circle. Note that we have to be careful not * to switch the points around, since in grid.c we need to know which is * the outer point for putting the label on. */ bool clip_to_circle(int *x1, int *y1, int *x2, int *y2, int cx, int cy, int rad) { double perplen, a, b, c; double tx, ty, dt; double dtheta; double theta1, theta2, tt, alpha, beta, gamma; bool flip = FALSE; int i; /* Get the angles between the origin and the endpoints. */ if ((*x1-cx) || (*y1-cy)) theta1 = atan2((double) *y1 - cy, (double) *x1 - cx); else theta1 = M_PI; if ((*x2-cx) || (*y2-cy)) theta2 = atan2((double) *y2 - cy, (double) *x2 - cx); else theta2 = M_PI; if (theta1 < 0.0) theta1 = 2 * M_PI + theta1; if (theta2 < 0.0) theta2 = 2 * M_PI + theta2; dtheta = theta2 - theta1; if (dtheta > M_PI) dtheta = dtheta - 2 * M_PI; else if (dtheta < - M_PI) dtheta = 2 * M_PI - dtheta; /* Make sure that p1 is the first point */ if (dtheta < 0) { tt = theta1; theta1 = theta2; theta2 = tt; i = *x1; *x1 = *x2; *x2 = i; i = *y1; *y1 = *y2; *y2 = i; flip = TRUE; dtheta = -dtheta; } /* Figure out the distances between the points */ a = sqrt((double) ((*x1 - cx) * (*x1 - cx) + (*y1 - cy) * (*y1 - cy))); b = sqrt((double) ((*x2 - cx) * (*x2 - cx) + (*y2 - cy) * (*y2 - cy))); c = sqrt((double) ((*x1 - *x2) * (*x1 - *x2) + (*y1 - *y2) * (*y1 - *y2))); /* We have three cases now -- either the midpoint of the line is * closest to the origon, or point 1 or point 2 is. Actually the * midpoint won't in general be the closest, but if a point besides * one of the endpoints is closest, the midpoint will be closer than * both endpoints. */ tx = (*x1 + *x2) / 2; ty = (*y1 + *y2) / 2; dt = sqrt((double) ((tx - cx) * (tx - cx) + (ty - cy) * (ty - cy))); if ((dt < a) && (dt < b)) { /* This is wierd -- round-off errors I guess. */ tt = (a * a + c * c - b * b) / (2 * a * c); if (tt > 1.0) tt = 1.0; else if (tt < -1.0) tt = -1.0; alpha = acos(tt); perplen = a * sin(alpha); } else if (a < b) { perplen = a; } else { perplen = b; } /* Now we should see if the line is outside of the circle */ if (perplen >= rad) return (TRUE); /* It's at least partially inside */ if (a > rad) { tt = (a * a + c * c - b * b) / (2 * a * c); if (tt > 1.0) tt = 1.0; else if (tt < -1.0) tt = -1.0; alpha = acos(tt); gamma = asin(sin(alpha) * a / rad); if (gamma < M_PI / 2) gamma = M_PI - gamma; beta = M_PI - alpha - gamma; *x1 = (int)(cx + rad * cos(theta1 + beta)); *y1 = (int)(cy + rad * sin(theta1 + beta)); } if (b > rad) { tt = (c * c + b * b - a * a) / (2 * b * c); if (tt > 1.0) tt = 1.0; else if (tt < -1.0) tt = -1.0; alpha = acos(tt); gamma = asin(sin(alpha) * b / rad); if (gamma < M_PI / 2) gamma = M_PI - gamma; beta = M_PI - alpha - gamma; *x2 = (int)(cx + rad * cos(theta2 - beta)); *y2 = (int)(cy + rad * sin(theta2 - beta)); } if (flip) { i = *x1; *x1 = *x2; *x2 = i; i = *y1; *y1 = *y2; *y2 = i; } return (FALSE); } ngspice-26/src/frontend/plotting/pvec.c0000644000265600020320000000371612264261473017607 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/dvec.h" #include "ngspice/plot.h" #include "ngspice/fteext.h" #include "pvec.h" #include "dimens.h" void pvec(struct dvec *d) { char buf[BSIZE_SP], buf2[BSIZE_SP], buf3[BSIZE_SP]; sprintf(buf, " %-20s: %s, %s, %d long", d->v_name, ft_typenames(d->v_type), isreal(d) ? "real" : "complex", d->v_length); if (d->v_flags & VF_MINGIVEN) { sprintf(buf2, ", min = %g", d->v_minsignal); strcat(buf, buf2); } if (d->v_flags & VF_MAXGIVEN) { sprintf(buf2, ", max = %g", d->v_maxsignal); strcat(buf, buf2); } switch (d->v_gridtype) { case GRID_LOGLOG: strcat(buf, ", grid = loglog"); break; case GRID_XLOG: strcat(buf, ", grid = xlog"); break; case GRID_YLOG: strcat(buf, ", grid = ylog"); break; case GRID_POLAR: strcat(buf, ", grid = polar"); break; case GRID_SMITH: strcat(buf, ", grid = smith (xformed)"); break; case GRID_SMITHGRID: strcat(buf, ", grid = smithgrid (not xformed)"); break; default: /* va: GRID_NONE or GRID_LIN */ break; } switch (d->v_plottype) { case PLOT_COMB: strcat(buf, ", plot = comb"); break; case PLOT_POINT: strcat(buf, ", plot = point"); break; default: /* va: PLOT_LIN, */ break; } if (d->v_defcolor) { sprintf(buf2, ", color = %s", d->v_defcolor); strcat(buf, buf2); } if (d->v_scale) { sprintf(buf2, ", scale = %s", d->v_scale->v_name); strcat(buf, buf2); } if (d->v_numdims > 1) { dimstring(d->v_dims, d->v_numdims, buf3); sprintf(buf2, ", dims = [%s]", buf3); strcat(buf, buf2); } if (d->v_plot->pl_scale == d) strcat(buf, " [default scale]\n"); else strcat(buf, "\n"); out_send(buf); } ngspice-26/src/frontend/plotting/plotting.h0000644000265600020320000000017312264261473020511 0ustar andreasadmin#ifndef ngspice_PLOTTING_H #define ngspice_PLOTTING_H #include "ngspice/plot.h" extern struct plot constantplot; #endif ngspice-26/src/frontend/plotting/plot5.h0000644000265600020320000000103212264261473017707 0ustar andreasadmin/************* * Header file for plot5.c * 1999 E. Rouat ************/ #ifndef ngspice_PLOT5_H #define ngspice_PLOT5_H disp_fn_Init_t Plt5_Init; disp_fn_NewViewport_t Plt5_NewViewport; disp_fn_Close_t Plt5_Close; disp_fn_Clear_t Plt5_Clear; disp_fn_DrawLine_t Plt5_DrawLine; disp_fn_Arc_t Plt5_Arc; disp_fn_Text_t Plt5_Text; disp_fn_SetLinestyle_t Plt5_SetLinestyle; disp_fn_SetColor_t Plt5_SetColor; disp_fn_Update_t Plt5_Update; #endif ngspice-26/src/frontend/plotting/plotit.h0000644000265600020320000000016212264261473020162 0ustar andreasadmin#ifndef ngspice_PLOTIT_H #define ngspice_PLOTIT_H bool plotit(wordlist *wl, char *hcopy, char *devname); #endif ngspice-26/src/frontend/plotting/gnuplot.h0000644000265600020320000000102612264261473020337 0ustar andreasadmin/************* * Header file for gnuplot.c * 2008 Stefano Pedretti ************/ #ifndef ngspice_GNUPLOT_H #define ngspice_GNUPLOT_H void ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs); void ft_writesimple(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs); #endif ngspice-26/src/frontend/plotting/xgraph.h0000644000265600020320000000050512264261473020141 0ustar andreasadmin/************* * Header file for xgraph.c * 1999 E. Rouat ************/ #ifndef ngspice_XGRAPH_H #define ngspice_XGRAPH_H void ft_xgraph(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs); #endif ngspice-26/src/frontend/plotting/agraf.c0000644000265600020320000002413412264261473017727 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Line-printer (ASCII) plots. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "agraf.h" #define FUDGE 7 #define MARGIN_BASE 11 #define LCHAR '.' #define MCHAR 'X' #define PCHARS "+*=$%!0123456789" /* We should really deal with the xlog and delta arguments. This routine is * full of magic numbers that make the formatting correct. */ void ft_agraf(double *xlims, double *ylims, struct dvec *xscale, struct plot *plot, struct dvec *vecs, double xdel, double ydel, bool xlog, bool ylog, bool nointerp) { int height; bool nobreakp, novalue; int maxx, maxy, omaxy; /* The size of the plotting area. */ bool /* xlogscale = FALSE, */ ylogscale = FALSE; char *field, buf[BSIZE_SP]; char *line1, *line2, c, cb; double xrange[2], yrange[2], x1, x2, yy1, y2, x, y; int mag, hmt, lmt, dst, spacing, nsp, ypt, upper, lower, curline; double tenpowmag, diff; double *values = NULL; struct dvec *v; int margin = MARGIN_BASE; int omargin; int i, j, k; int shift; NG_IGNORE(xdel); NG_IGNORE(ydel); NG_IGNORE(ylog); /* ANSI C does not specify how many digits are in an exponent for %c * We assumed it was 2. If it's more, shift starting position over. */ sprintf(buf, "%1.1e", 0.0); /* expect 0.0e+00 */ shift = (int) strlen(buf) - 7; margin += shift; /* Make sure the margin is correct */ omargin = margin; novalue = cp_getvar("noasciiplotvalue", CP_BOOL, NULL); if (!novalue && !vec_eq(xscale, vecs)) margin *= 2; else novalue = TRUE; if ((xscale->v_gridtype == GRID_YLOG) || (xscale->v_gridtype == GRID_LOGLOG)) ylogscale = TRUE; if (!cp_getvar("width", CP_NUM, &maxy)) maxy = DEF_WIDTH; if (!cp_getvar("height", CP_NUM, &height)) height = DEF_HEIGHT; if (ft_nopage) nobreakp = TRUE; else nobreakp = cp_getvar("nobreak", CP_BOOL, NULL); maxy -= (margin + FUDGE); maxx = xscale->v_length; xrange[0] = xlims[0]; xrange[1] = xlims[1]; yrange[0] = ylims[0]; yrange[1] = ylims[1]; if (maxx < 2) { fprintf(cp_err, "Error: asciiplot can't handle scale with length < 2\n"); return; } if (maxx <= 0) { fprintf(cp_err, "Note: no points to plot\n"); return; } for (v = vecs, i = 0; v; v = v->v_link2) v->v_linestyle = (PCHARS[i] ? PCHARS[i++] : '#'); /* Now allocate the field and stuff. */ field = TMALLOC(char, (maxy + 1) * (maxx + 1)); line1 = TMALLOC(char, maxy + margin + FUDGE + 1); line2 = TMALLOC(char, maxy + margin + FUDGE + 1); if (!novalue) values = TMALLOC(double, maxx); /* Clear the field, put the lines in the right places, and create * the headers. */ for (i = 0, j = (maxx + 1) * (maxy + 1); i < j; i++) field[i] = ' '; for (i = 0, j = maxy + margin + FUDGE; i < j; i++) { line1[i] = '-'; line2[i] = ' '; } line1[j] = line2[j] = '\0'; /* The following is similar to the stuff in grid.c */ if ((xrange[0] > xrange[1]) || (yrange[0] > yrange[1])) { fprintf(cp_err, "ft_agraf: Internal Error: bad limits %g, %g, %g, %g\n", xrange[0], xrange[1], yrange[0], yrange[1]); return; } /* gcc doesn't like !double */ if (ylims[1] == 0.0) { mag = (int) floor(mylog10(- ylims[0])); tenpowmag = pow(10.0, (double) mag); } else if (ylims[0] == 0.0) { mag = (int) floor(mylog10(ylims[1])); tenpowmag = pow(10.0, (double) mag); } else { diff = ylims[1] - ylims[0]; mag = (int) floor(mylog10(diff)); tenpowmag = pow(10.0, (double) mag); } lmt = (int) floor(ylims[0] / tenpowmag); yrange[0] = ylims[0] = lmt * tenpowmag; hmt = (int) ceil(ylims[1] / tenpowmag); yrange[1] = ylims[1] = hmt * tenpowmag; dst = hmt - lmt; /* This is a strange case; I don't know why it's here. */ if (dst == 11) { dst = 12; } else if (dst == 1) { dst = 10; mag++; hmt *= 10; lmt *= 10; } else if (dst == 0) { dst = 2; lmt -= 1; hmt += 1; } for (nsp = 4; nsp < 8; nsp++) if (!(dst % nsp)) break; if (nsp == 8) for (nsp = 2; nsp < 4; nsp++) if (!(dst % nsp)) break; spacing = maxy / nsp; /* Reset the max X coordinate to deal with round-off error. */ omaxy = maxy + 1; maxy = spacing * nsp; for (i = 0, j = lmt; j <= hmt; i += spacing, j += dst / nsp) { for (k = 0; k < maxx; k++) field[k * omaxy + i] = LCHAR; line1[i + margin + 2 * shift] = '|'; (void) sprintf(buf, "%.2e", j * pow(10.0, (double) mag)); bcopy(buf, &line2[i + margin - ((j < 0) ? 2 : 1) - shift], strlen(buf)); } line1[i - spacing + margin + 1] = '\0'; for (i = 1; i < omargin - 1 && xscale->v_name[i - 1]; i++) line2[i] = xscale->v_name[i - 1]; if (!novalue) for (i = omargin + 1; i < margin - 2 && (vecs->v_name[i - omargin - 1]); i++) line2[i] = vecs->v_name[i - omargin - 1]; /* Now the buffers are all set up properly. Plot points for each * vector using interpolation. For each point on the x-axis, find the * two bracketing points in xscale, and then interpolate their * y values for each vector. */ upper = lower = 0; for (i = 0; i < maxx; i++) { if (nointerp) x = isreal(xscale) ? xscale->v_realdata[i] : realpart(xscale->v_compdata[i]); else if (xlog && xrange[0] > 0.0 && xrange[1] > 0.0) x = xrange[0] * pow(10.0, mylog10(xrange[1]/xrange[0]) * i / (maxx - 1)); else x = xrange[0] + (xrange[1] - xrange[0]) * i / (maxx - 1); while ((isreal(xscale) ? (xscale->v_realdata[upper] < x) : (realpart(xscale->v_compdata[upper]) < x)) && (upper < xscale->v_length - 1)) upper++; while ((isreal(xscale) ? (xscale->v_realdata[lower] < x) : (realpart(xscale->v_compdata[lower]) < x)) && (lower < xscale->v_length - 1)) lower++; if ((isreal(xscale) ? (xscale->v_realdata[lower] > x) : (realpart(xscale->v_compdata[lower]) > x)) && (lower > 0)) lower--; x1 = (isreal(xscale) ? xscale->v_realdata[lower] : realpart(xscale->v_compdata[lower])); x2 = (isreal(xscale) ? xscale->v_realdata[upper] : realpart(xscale->v_compdata[upper])); if (x1 > x2) { fprintf(cp_err, "Error: X scale (%s) not monotonic\n", xscale->v_name); return; } for (v = vecs; v; v = v->v_link2) { yy1 = (isreal(v) ? v->v_realdata[lower] : realpart(v->v_compdata[lower])); y2 = (isreal(v) ? v->v_realdata[upper] : realpart(v->v_compdata[upper])); if (x1 == x2) y = yy1; else y = yy1 + (y2 - yy1) * (x - x1) / (x2 - x1); if (!novalue && (v == vecs)) values[i] = y; ypt = ft_findpoint(y, yrange, maxy, 0, ylogscale); c = field[omaxy * i + ypt]; if ((c == ' ') || (c == LCHAR)) field[omaxy * i + ypt] = (char) v->v_linestyle; else field[omaxy * i + ypt] = MCHAR; } } out_init(); for (i = 0; i < omaxy + margin; i++) out_send("-"); out_send("\n"); i = (omaxy + margin - (int) strlen(plot->pl_title)) / 2; while (i-- > 0) out_send(" "); (void) strcpy(buf, plot->pl_title); buf[maxy + margin] = '\0'; /* Cut off if too wide */ out_send(buf); out_send("\n"); (void) sprintf(buf, "%s %s", plot->pl_name, plot->pl_date); buf[maxy + margin] = '\0'; i = (omaxy + margin - (int) strlen(buf)) / 2; while (i-- > 0) out_send(" "); out_send(buf); out_send("\n\n"); curline = 7; out_send("Legend: "); i = 0; j = (maxx + margin - 8) / 20; if (j == 0) j = 1; for (v = vecs; v; v = v->v_link2) { out_printf("%c = %-17s", (char) v->v_linestyle, v->v_name); if (!(++i % j) && v->v_link2) { out_send("\n "); curline++; } } out_send("\n"); for (i = 0; i < omaxy + margin; i++) out_send("-"); out_send("\n"); i = 0; out_printf("%s\n%s\n", line2, line1); curline += 2; for (i = 0; i < maxx; i++) { if (nointerp) x = isreal(xscale) ? xscale->v_realdata[i] : realpart(xscale->v_compdata[i]); else if (xlog && xrange[0] > 0.0 && xrange[1] > 0.0) x = xrange[0] * pow(10.0, mylog10(xrange[1]/xrange[0]) * i / (maxx - 1)); else x = xrange[0] + (xrange[1] - xrange[0]) * i / (maxx - 1); if (x < 0.0) out_printf("%.3e ", x); else out_printf(" %.3e ", x); if (!novalue) { if (values[i] < 0.0) out_printf("%.3e ", values[i]); else out_printf(" %.3e ", values[i]); } cb = field[(i + 1) * omaxy]; field[(i + 1) * omaxy] = '\0'; out_send(&field[i * omaxy]); field[(i + 1) * omaxy] = cb; out_send("\n"); if (((curline++ % height) == 0) && (i < maxx - 1) && !nobreakp) { out_printf("%s\n%s\n\014\n%s\n%s\n", line1, line2, line2, line1); curline += 5; } } out_printf("%s\n%s\n", line1, line2); tfree(field); tfree(line1); tfree(line2); if (!novalue) tfree(values); } ngspice-26/src/frontend/plotting/clip.h0000644000265600020320000000020212264261473017571 0ustar andreasadmin/************* * Header file for clip.c * 1999 E. Rouat ************/ #ifndef ngspice_CLIP_H #define ngspice_CLIP_H #endif ngspice-26/src/frontend/plotting/plotit.c0000644000265600020320000007272712264261473020175 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/graph.h" #include "ngspice/cpdefs.h" #include "ngspice/pnode.h" #include "ngspice/sim.h" #include "ngspice/fteext.h" #include #include "plotit.h" #include "agraf.h" #include "xgraph.h" #include "gnuplot.h" #include "graf.h" static bool sameflag; #ifdef TCL_MODULE #include "ngspice/tclspice.h" #endif /* This routine gets parameters from the command line, which are of * the form "name number ..." It returns a pointer to the parameter * values. */ static double * getlims(wordlist *wl, char *name, int number) { double *d; wordlist *beg, *wk; int n; if (number < 1) return NULL; beg = wl_find(name, wl->wl_next); if (!beg) return NULL; wk = beg->wl_next; d = TMALLOC(double, number); for (n = 0; n < number; n++) { char *ss; double *td; if (!wk) { fprintf(cp_err, "Syntax error: not enough parameters for \"%s\".\n", name); txfree(d); return NULL; } ss = wk->wl_word; td = ft_numparse(&ss, FALSE); if (!td) { fprintf(cp_err, "Syntax error: bad parameters for \"%s\".\n", name); txfree(d); return NULL; } d[n] = *td; wk = wk->wl_next; } wl_delete_slice(beg, wk); return d; } /* Extend a data vector to length by replicating the last element, or * truncate it if it is too long. */ static void xtend(struct dvec *v, int length) { int i; ngcomplex_t c, *oc; double d, *od; if (v->v_length == length) return; if (v->v_length > length) { v->v_length = length; return; } if (isreal(v)) { od = v->v_realdata; v->v_realdata = TMALLOC(double, length); for (i = 0; i < v->v_length; i++) v->v_realdata[i] = od[i]; d = od[--i]; while (i < length) v->v_realdata[i++] = d; tfree(od); } else { oc = v->v_compdata; v->v_compdata = TMALLOC(ngcomplex_t, length); for (i = 0; i < v->v_length; i++) { realpart(v->v_compdata[i]) = realpart(oc[i]); imagpart(v->v_compdata[i]) = imagpart(oc[i]); } realpart(c) = realpart(oc[--i]); imagpart(c) = imagpart(oc[i]); while (i < length) { realpart(v->v_compdata[i]) = realpart(c); imagpart(v->v_compdata[i++]) = imagpart(c); tfree(oc); } } v->v_length = length; } /* Collapse every *xcomp elements into one, and use only the elements * between xind[0] and xind[1]. */ static void compress(struct dvec *d, double *xcomp, double *xind) { int cfac, ihi, ilo, newlen, i; if (xind) { ilo = (int) xind[0]; ihi = (int) xind[1]; if ((ihi >= ilo) && (ilo > 0) && (ilo < d->v_length) && (ihi > 1) && (ihi <= d->v_length)) { newlen = ihi - ilo; if (isreal(d)) { double *dd = TMALLOC(double, newlen); bcopy(d->v_realdata + ilo, dd, (size_t) newlen * sizeof(double)); tfree(d->v_realdata); d->v_realdata = dd; } else { ngcomplex_t *cc = TMALLOC(ngcomplex_t, newlen); bcopy(d->v_compdata + ilo, cc, (size_t) newlen * sizeof(ngcomplex_t)); tfree(d->v_compdata); d->v_compdata = cc; } d->v_length = newlen; } } if (xcomp) { cfac = (int) *xcomp; if ((cfac > 1) && (cfac < d->v_length)) { for (i = 0; i * cfac < d->v_length; i++) if (isreal(d)) d->v_realdata[i] = d->v_realdata[i * cfac]; else d->v_compdata[i] = d->v_compdata[i * cfac]; d->v_length = i; } } } /* Check for and remove a one-word keyword. */ static bool getflag(wordlist *wl, char *name) { wl = wl_find(name, wl->wl_next); if (!wl) return FALSE; wl_delete_slice(wl, wl->wl_next); return TRUE; } /* Return a parameter of the form "xlabel foo" */ static char * getword(wordlist *wl, char *name) { wordlist *beg; char *s; beg = wl_find(name, wl->wl_next); if (!beg) return NULL; if (!beg->wl_next) { fprintf(cp_err, "Syntax error: looking for plot keyword at \"%s\".\n", name); return NULL; } s = copy(beg->wl_next->wl_word); wl_delete_slice(beg, beg->wl_next->wl_next); return s; } /* The common routine for all plotting commands. This does hardcopy * and graphics plotting. */ bool plotit(wordlist *wl, char *hcopy, char *devname) { /* All these things are static so that "samep" will work. */ static double *xcompress = NULL, *xindices = NULL; static double *xlim = NULL, *ylim = NULL, *xynull; static double *xdelta = NULL, *ydelta = NULL; static char *xlabel = NULL, *ylabel = NULL, *title = NULL; static bool nointerp = FALSE; static GRIDTYPE gtype = GRID_LIN; static PLOTTYPE ptype = PLOT_LIN; bool gfound = FALSE, pfound = FALSE, oneval = FALSE; double *dd, ylims[2], xlims[2]; struct pnode *pn, *names; struct dvec *dv, *d = NULL, *vecs = NULL, *lv, *lastvs = NULL; char *xn; int i, j, xt; double tt; wordlist *wwl; char cline[BSIZE_SP], buf[BSIZE_SP], *pname; char *nxlabel = NULL, *nylabel = NULL, *ntitle = NULL; double tstep, tstart, tstop, ttime; /* return value, error by default */ bool rtn = FALSE; if (!wl) return rtn; /* * we need a preceding element here, * and we will destructively modify the wordlist in stupid ways, * thus lets make our own copy which fits our purpose */ wl = wl_cons(NULL, wl_copy(wl)); /* First get the command line, without the limits. Wii be used for zoomed windows */ wwl = wl_copy(wl); xynull = getlims(wwl, "xl", 2); tfree(xynull); xynull = getlims(wwl, "xlimit", 2); tfree(xynull); xynull = getlims(wwl, "yl", 2); tfree(xynull); xynull = getlims(wwl, "ylimit", 2); tfree(xynull); /* remove tile, xlabel, ylabel */ nxlabel = getword(wwl, "xlabel"); nylabel = getword(wwl, "ylabel"); ntitle = getword(wwl, "title"); pname = wl_flatten(wwl->wl_next); (void) sprintf(cline, "plot %s", pname); tfree(pname); wl_free(wwl); /* add title, xlabel or ylabel, if available, with quotes '' */ if (nxlabel) { sprintf(cline, "%s xlabel '%s'", cline, nxlabel); tfree(nxlabel); } if (nylabel) { sprintf(cline, "%s ylabel '%s'", cline, nylabel); tfree(nylabel); } if (ntitle) { sprintf(cline, "%s title '%s'", cline, ntitle); tfree(ntitle); } /* Now extract all the parameters. */ sameflag = getflag(wl, "samep"); if (!sameflag || !xlim) { xlim = getlims(wl, "xl", 2); if (!xlim) xlim = getlims(wl, "xlimit", 2); } else { txfree(getlims(wl, "xl", 2)); txfree(getlims(wl, "xlimit", 2)); } if (!sameflag || !ylim) { ylim = getlims(wl, "yl", 2); if (!ylim) ylim = getlims(wl, "ylimit", 2); } else { txfree(getlims(wl, "yl", 2)); txfree(getlims(wl, "ylimit", 2)); } if (!sameflag || !xcompress) { xcompress = getlims(wl, "xcompress", 1); if (!xcompress) xcompress = getlims(wl, "xcomp", 1); } else { txfree(getlims(wl, "xcompress", 1)); txfree(getlims(wl, "xcomp", 1)); } if (!sameflag || !xindices) { xindices = getlims(wl, "xindices", 2); if (!xindices) xindices = getlims(wl, "xind", 2); } else { txfree(getlims(wl, "xindices", 2)); txfree(getlims(wl, "xind", 2)); } if (!sameflag || !xdelta) { xdelta = getlims(wl, "xdelta", 1); if (!xdelta) xdelta = getlims(wl, "xdel", 1); } else { txfree(getlims(wl, "xdelta", 1)); txfree(getlims(wl, "xdel", 1)); } if (!sameflag || !ydelta) { ydelta = getlims(wl, "ydelta", 1); if (!ydelta) ydelta = getlims(wl, "ydel", 1); } else { txfree(getlims(wl, "ydelta", 1)); txfree(getlims(wl, "ydel", 1)); } /* Get the grid type and the point type. Note we can't do if-else * here because we want to catch all the grid types. */ if (getflag(wl, "lingrid")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_LIN; gfound = TRUE; } } if (getflag(wl, "loglog")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_LOGLOG; gfound = TRUE; } } if (getflag(wl, "nogrid")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_NONE; gfound = TRUE; } } if (getflag(wl, "linear")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_LIN; gfound = TRUE; } } if (getflag(wl, "xlog")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_XLOG; gfound = TRUE; } } if (getflag(wl, "ylog")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_YLOG; gfound = TRUE; } } if (getflag(wl, "polar")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_POLAR; gfound = TRUE; } } if (getflag(wl, "smith")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_SMITH; gfound = TRUE; } } if (getflag(wl, "smithgrid")) { if (gfound) { fprintf(cp_err, "Warning: too many grid types given\n"); } else { gtype = GRID_SMITHGRID; gfound = TRUE; } } if (!sameflag && !gfound) { if (cp_getvar("gridstyle", CP_STRING, buf)) { if (eq(buf, "lingrid")) gtype = GRID_LIN; else if (eq(buf, "loglog")) gtype = GRID_LOGLOG; else if (eq(buf, "xlog")) gtype = GRID_XLOG; else if (eq(buf, "ylog")) gtype = GRID_YLOG; else if (eq(buf, "smith")) gtype = GRID_SMITH; else if (eq(buf, "smithgrid")) gtype = GRID_SMITHGRID; else if (eq(buf, "polar")) gtype = GRID_POLAR; else if (eq(buf, "nogrid")) gtype = GRID_NONE; else { fprintf(cp_err, "Warning: strange grid type %s\n", buf); gtype = GRID_LIN; } gfound = TRUE; } else { gtype = GRID_LIN; } } /* Now get the point type. */ if (getflag(wl, "linplot")) { if (pfound) { fprintf(cp_err, "Warning: too many plot types given\n"); } else { ptype = PLOT_LIN; pfound = TRUE; } } if (getflag(wl, "combplot")) { if (pfound) { fprintf(cp_err, "Warning: too many plot types given\n"); } else { ptype = PLOT_COMB; pfound = TRUE; } } if (getflag(wl, "pointplot")) { if (pfound) { fprintf(cp_err, "Warning: too many plot types given\n"); } else { ptype = PLOT_POINT; pfound = TRUE; } } if (!sameflag && !pfound) { if (cp_getvar("plotstyle", CP_STRING, buf)) { if (eq(buf, "linplot")) ptype = PLOT_LIN; else if (eq(buf, "combplot")) ptype = PLOT_COMB; else if (eq(buf, "pointplot")) ptype = PLOT_POINT; else { fprintf(cp_err, "Warning: strange plot type %s\n", buf); ptype = PLOT_LIN; } pfound = TRUE; } else { ptype = PLOT_LIN; } } if (!sameflag || !xlabel) xlabel = getword(wl, "xlabel"); else txfree(getword(wl, "xlabel")); if (!sameflag || !ylabel) ylabel = getword(wl, "ylabel"); else txfree(getword(wl, "ylabel")); if (!sameflag || !title) title = getword(wl, "title"); else txfree(getword(wl, "title")); if (!sameflag) nointerp = getflag(wl, "nointerp"); else if (getflag(wl, "nointerp")) nointerp = TRUE; if (!wl->wl_next) { fprintf(cp_err, "Error: no vectors given\n"); goto quit1; } /* Now parse the vectors. We have a list of the form * "a b vs c d e vs f g h". Since it's a bit of a hassle for * us to parse the vector boundaries here, we do this -- call * ft_getpnames() without the check flag, and then look for 0-length * vectors with the name "vs"... This is a sort of a gross hack, * since we have to check for 0-length vectors ourselves after * evaulating the pnodes... */ names = ft_getpnames(wl->wl_next, FALSE); if (names == NULL) goto quit1; /* Now evaluate the names. */ for (pn = names, lv = NULL; pn; pn = pn->pn_next) if (pn->pn_value && (pn->pn_value->v_length == 0) && eq(pn->pn_value->v_name, "vs")) { if (!lv) { fprintf(cp_err, "Error: misplaced vs arg\n"); goto quit; } if ((pn = pn->pn_next) == NULL) { fprintf(cp_err, "Error: missing vs arg\n"); goto quit; } dv = ft_evaluate(pn); if (!dv) goto quit; if (lastvs) lv = lastvs->v_link2; else lv = vecs; while (lv) { lv->v_scale = dv; lastvs = lv; lv = lv->v_link2; } } else { dv = ft_evaluate(pn); if (!dv) goto quit; if (!d) vecs = dv; else d->v_link2 = dv; for (d = dv; d->v_link2; d = d->v_link2) ; lv = dv; } /* free_pnode(names); pn:really should be commented out ? */ d->v_link2 = NULL; /* Now check for 0-length vectors. */ for (d = vecs; d; d = d->v_link2) if (!d->v_length) { fprintf(cp_err, "Error(plotit.c--plotit): %s: no such vector\n", d->v_name); goto quit; } /* If there are higher dimensional vectors, transform them into a * family of vectors. */ for (d = vecs, lv = NULL; d; d = d->v_link2) if (d->v_numdims > 1) { if (lv) lv->v_link2 = vec_mkfamily(d); else vecs = lv = vec_mkfamily(d); while (lv->v_link2) lv = lv->v_link2; lv->v_link2 = d->v_link2; d = lv; } else { lv = d; } /* Now fill in the scales for vectors who aren't already fixed up. */ for (d = vecs; d; d = d->v_link2) if (!d->v_scale) { if (d->v_plot->pl_scale) d->v_scale = d->v_plot->pl_scale; else d->v_scale = d; } /* The following line displays the unit at the time of temp-sweep and res-sweep. This may not be a so good solution. by H.T */ if (strcmp(vecs->v_scale->v_name, "temp-sweep") == 0) vecs->v_scale->v_type = SV_TEMP; if (strcmp(vecs->v_scale->v_name, "res-sweep") == 0) vecs->v_scale->v_type = SV_RES; /* See if the log flag is set anywhere... */ if (!gfound) { for (d = vecs; d; d = d->v_link2) if (d->v_scale && (d->v_scale->v_gridtype == GRID_XLOG)) gtype = GRID_XLOG; for (d = vecs; d; d = d->v_link2) if (d->v_gridtype == GRID_YLOG) { if ((gtype == GRID_XLOG) || (gtype == GRID_LOGLOG)) gtype = GRID_LOGLOG; else gtype = GRID_YLOG; } for (d = vecs; d; d = d->v_link2) if (d->v_gridtype == GRID_SMITH || d->v_gridtype == GRID_SMITHGRID || d->v_gridtype == GRID_POLAR) { gtype = d->v_gridtype; break; } } /* See if there are any default plot types... Here, like above, we * don't do entirely the best thing when there is a mixed set of * default plot types... */ if (!sameflag && !pfound) { ptype = PLOT_LIN; for (d = vecs; d; d = d->v_link2) if (d->v_plottype != PLOT_LIN) { ptype = d->v_plottype; break; } } /* Check and see if this is pole zero stuff. */ if ((vecs->v_type == SV_POLE) || (vecs->v_type == SV_ZERO)) oneval = TRUE; for (d = vecs; d; d = d->v_link2) if (((d->v_type == SV_POLE) || (d->v_type == SV_ZERO)) != oneval ? 1 : 0) { fprintf(cp_err, "Error: plot must be either all pole-zero or contain no poles or zeros\n"); goto quit; } if ((gtype == GRID_POLAR) || (gtype == GRID_SMITH || gtype == GRID_SMITHGRID)) oneval = TRUE; /* If we are plotting scalars, make sure there is enough * data to fit on the screen. */ for (d = vecs; d; d = d->v_link2) if (d->v_length == 1) xtend(d, d->v_scale->v_length); /* Now patch up each vector with the compression and thestrchr * selection. */ if (xcompress || xindices) for (d = vecs; d; d = d->v_link2) { compress(d, xcompress, xindices); d->v_scale = vec_copy(d->v_scale); compress(d->v_scale, xcompress, xindices); } /* Transform for smith plots */ if (gtype == GRID_SMITH) { double re, im, rex, imx; double r; struct dvec **prevvp, *n; int j; prevvp = &vecs; for (d = vecs; d; d = d->v_link2) { if (d->v_flags & VF_PERMANENT) { n = vec_copy(d); n->v_flags &= ~VF_PERMANENT; n->v_link2 = d->v_link2; d = n; *prevvp = d; } prevvp = &d->v_link2; if (isreal(d)) { fprintf(cp_err, "Warning: plotting real data \"%s\" on a smith grid\n", d->v_name); for (j = 0; j < d->v_length; j++) { r = d->v_realdata[j]; d->v_realdata[j] = (r - 1) / (r + 1); } } else { for (j = 0; j < d->v_length; j++) { /* (re - 1, im) / (re + 1, im) */ re = realpart(d->v_compdata[j]); im = imagpart(d->v_compdata[j]); rex = re + 1; imx = im; re = re - 1; /* (re, im) / (rex, imx) */ /* x = 1 - (imx / rex) * (imx / rex); * r = re / rex + im / rex * imx / rex; * i = im / rex - re / rex * imx / rex; * * * realpart(d->v_compdata[j]) = r / x; * imagpart(d->v_compdata[j]) = i / x; */ realpart(d->v_compdata[j]) = (rex*re+imx*imx) / (rex*rex+imx*imx); imagpart(d->v_compdata[j]) = (2*imx) / (rex*rex+imx*imx); } } } } /* Figure out the proper x- and y-axis limits. */ if (ylim) { ylims[0] = ylim[0]; ylims[1] = ylim[1]; } else if (oneval) { ylims[0] = HUGE; ylims[1] = - ylims[0]; for (d = vecs; d; d = d->v_link2) { /* dd = ft_minmax(d, TRUE); */ /* With this we seek the maximum and minimum of imaginary part * that will go to Y axis */ dd = ft_minmax(d, FALSE); if (ylims[0] > dd[0]) ylims[0] = dd[0]; if (ylims[1] < dd[1]) ylims[1] = dd[1]; } } else { ylims[0] = HUGE; ylims[1] = - ylims[0]; for (d = vecs; d; d = d->v_link2) { dd = ft_minmax(d, TRUE); if (ylims[0] > dd[0]) ylims[0] = dd[0]; if (ylims[1] < dd[1]) ylims[1] = dd[1]; } /* XXX */ for (d = vecs; d; d = d->v_link2) { if (d->v_flags & VF_MINGIVEN) if (ylims[0] < d->v_minsignal) ylims[0] = d->v_minsignal; if (d->v_flags & VF_MAXGIVEN) if (ylims[1] > d->v_maxsignal) ylims[1] = d->v_maxsignal; } } if (xlim) { xlims[0] = xlim[0]; xlims[1] = xlim[1]; } else if (oneval) { xlims[0] = HUGE; xlims[1] = - xlims[0]; for (d = vecs; d; d = d->v_link2) { /* dd = ft_minmax(d, FALSE); */ /* With this we seek the maximum and minimum of imaginary part * that will go to Y axis */ dd = ft_minmax(d, TRUE); if (xlims[0] > dd[0]) xlims[0] = dd[0]; if (xlims[1] < dd[1]) xlims[1] = dd[1]; } } else { xlims[0] = HUGE; xlims[1] = - xlims[0]; for (d = vecs; d; d = d->v_link2) { dd = ft_minmax(d->v_scale, TRUE); if (xlims[0] > dd[0]) xlims[0] = dd[0]; if (xlims[1] < dd[1]) xlims[1] = dd[1]; } for (d = vecs; d; d = d->v_link2) { if (d->v_scale->v_flags & VF_MINGIVEN) if (xlims[0] < d->v_scale->v_minsignal) xlims[0] = d->v_scale->v_minsignal; if (d->v_scale->v_flags & VF_MAXGIVEN) if (xlims[1] > d->v_scale->v_maxsignal) xlims[1] = d->v_scale->v_maxsignal; } } /* Do some coercion of the limits to make them reasonable. */ if ((xlims[0] == 0) && (xlims[1] == 0)) { xlims[0] = -1.0; xlims[1] = 1.0; } if ((ylims[0] == 0) && (ylims[1] == 0)) { ylims[0] = -1.0; ylims[1] = 1.0; } if (xlims[0] > xlims[1]) { tt = xlims[1]; xlims[1] = xlims[0]; xlims[0] = tt; } if (ylims[0] > ylims[1]) { tt = ylims[1]; ylims[1] = ylims[0]; ylims[0] = tt; } if (AlmostEqualUlps(xlims[0], xlims[1], 10)) { xlims[0] *= (xlims[0] > 0) ? 0.9 : 1.1; xlims[1] *= (xlims[1] > 0) ? 1.1 : 0.9; } if (AlmostEqualUlps(ylims[0], ylims[1], 10)) { ylims[0] *= (ylims[0] > 0) ? 0.9 : 1.1; ylims[1] *= (ylims[1] > 0) ? 1.1 : 0.9; } if ((xlims[0] <= 0.0) && ((gtype == GRID_XLOG) || (gtype == GRID_LOGLOG))) { fprintf(cp_err, "Error: X values must be > 0 for log scale\n"); goto quit; } if ((ylims[0] <= 0.0) && ((gtype == GRID_YLOG) || (gtype == GRID_LOGLOG))) { fprintf(cp_err, "Error: Y values must be > 0 for log scale\n"); goto quit; } /* Fix the plot limits for smith and polar grids. */ if ((!xlim || !ylim) && (gtype == GRID_POLAR)) { double mx, my, rad; /* (0,0) must be in the center of the screen. */ mx = (fabs(xlims[0]) > fabs(xlims[1])) ? fabs(xlims[0]) : fabs(xlims[1]); my = (fabs(ylims[0]) > fabs(ylims[1])) ? fabs(ylims[0]) : fabs(ylims[1]); /* rad = (mx > my) ? mx : my; */ /* AM.Roldán * Change this reason that this was discussed, as in the case of 1 + i want to plot point * is outside the drawing area so I'll stay as the maximum size of the hypotenuse of * the complex value */ rad = sqrt(mx * mx + my * my); xlims[0] = - rad; xlims[1] = rad; ylims[0] = - rad; ylims[1] = rad; } else if ((!xlim || !ylim) && (gtype == GRID_SMITH || gtype == GRID_SMITHGRID)) { xlims[0] = -1.0; xlims[1] = 1.0; ylims[0] = -1.0; ylims[1] = 1.0; } if (xlim) tfree(xlim); if (ylim) tfree(ylim); /* We don't want to try to deal with smith plots for asciiplot. */ if (devname && eq(devname, "lpr")) { /* check if we should (can) linearize */ if (ft_curckt && ft_curckt->ci_ckt && (strcmp(ft_curckt->ci_name, plot_cur->pl_title) == 0) && if_tranparams(ft_curckt, &tstart, &tstop, &tstep) && ((tstop - tstart) * tstep > 0.0) && ((tstop - tstart) >= tstep) && plot_cur && plot_cur->pl_dvecs && plot_cur->pl_scale && isreal(plot_cur->pl_scale) && ciprefix("tran", plot_cur->pl_typename)) { int newlen = (int)((tstop - tstart) / tstep + 1.5); double *newscale = TMALLOC(double, newlen); struct dvec *newv_scale = alloc(struct dvec); struct dvec *v; newv_scale->v_flags = vecs->v_scale->v_flags; newv_scale->v_type = vecs->v_scale->v_type; newv_scale->v_gridtype = vecs->v_scale->v_gridtype; newv_scale->v_length = newlen; newv_scale->v_name = copy(vecs->v_scale->v_name); newv_scale->v_realdata = newscale; for (i = 0, ttime = tstart; i < newlen; i++, ttime += tstep) newscale[i] = ttime; for (v = vecs; v; v = v->v_link2) { double *newdata = TMALLOC(double, newlen); if (!ft_interpolate(v->v_realdata, newdata, v->v_scale->v_realdata, v->v_scale->v_length, newscale, newlen, 1)) { fprintf(cp_err, "Error: can't interpolate %s\n", v->v_name); goto quit; } tfree(v->v_realdata); v->v_realdata = newdata; /* Why go to all this trouble if agraf ignores it? */ nointerp = TRUE; } vecs->v_scale = newv_scale; } ft_agraf(xlims, ylims, vecs->v_scale, vecs->v_plot, vecs, xdelta ? *xdelta : 0.0, ydelta ? *ydelta : 0.0, ((gtype == GRID_XLOG) || (gtype == GRID_LOGLOG)), ((gtype == GRID_YLOG) || (gtype == GRID_LOGLOG)), nointerp); rtn = TRUE; goto quit; } /* See if there is one type we can give for the y scale... */ for (j = vecs->v_type, d = vecs->v_link2; d; d = d->v_link2) if (d->v_type != j) { j = SV_NOTYPE; break; } #ifndef X_DISPLAY_MISSING if (devname && eq(devname, "xgraph")) { /* Interface to XGraph-11 Plot Program */ ft_xgraph(xlims, ylims, hcopy, title ? title : vecs->v_plot->pl_title, xlabel ? xlabel : ft_typabbrev(vecs->v_scale->v_type), ylabel ? ylabel : ft_typabbrev(j), gtype, ptype, vecs); rtn = TRUE; goto quit; } #endif if (devname && eq(devname, "gnuplot")) { /* Interface to Gnuplot Plot Program */ ft_gnuplot(xlims, ylims, hcopy, title ? title : vecs->v_plot->pl_title, xlabel ? xlabel : ft_typabbrev(vecs->v_scale->v_type), ylabel ? ylabel : ft_typabbrev(j), gtype, ptype, vecs); rtn = TRUE; goto quit; } if (devname && eq(devname, "writesimple")) { /* Interface to simple write output */ ft_writesimple(xlims, ylims, hcopy, title ? title : vecs->v_plot->pl_title, xlabel ? xlabel : ft_typabbrev(vecs->v_scale->v_type), ylabel ? ylabel : ft_typabbrev(j), gtype, ptype, vecs); rtn = TRUE; goto quit; } #ifdef TCL_MODULE if (devname && eq(devname, "blt")) { /* Just send the pairs to Tcl/Tk */ for (d = vecs; d; d = d->v_link2) blt_plot(d, oneval ? NULL : d->v_scale, (d == vecs) ? 1 : 0); rtn = TRUE; goto quit; } #endif for (d = vecs, i = 0; d; d = d->v_link2) i++; /* Figure out the X name and the X type. This is sort of bad... */ xn = vecs->v_scale->v_name; xt = vecs->v_scale->v_type; pname = plot_cur->pl_typename; if (!gr_init(xlims, ylims, (oneval ? NULL : xn), title ? title : vecs->v_plot->pl_title, hcopy, i, xdelta ? *xdelta : 0.0, ydelta ? *ydelta : 0.0, gtype, ptype, xlabel, ylabel, xt, j, pname, cline)) goto quit; /* Now plot all the graphs. */ for (d = vecs; d; d = d->v_link2) ft_graf(d, oneval ? NULL : d->v_scale, FALSE); gr_clean(); rtn = TRUE; quit: free_pnode(names); FREE(title); quit1: wl_free(wl); return rtn; } ngspice-26/src/frontend/plotting/graphdb.c0000644000265600020320000001456212264261473020262 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* Manage graph data structure. */ #include "ngspice/ngspice.h" #include "ngspice/graph.h" #include "ngspice/ftedebug.h" #include "ngspice/fteext.h" #include "ngspice/ftedbgra.h" #include "graphdb.h" #include "../breakp2.h" #include "../display.h" /* invariant: currentgraph contains the current graph */ GRAPH *currentgraph; /* * We use a linked list rather than a circular one because we * expect few links per list and we don't need to add at the * end of a list (we can add at the beginning). */ /* linked list of graphs */ typedef struct listgraph { /* we use GRAPH here instead of a pointer to save a tmalloc */ GRAPH graph; struct listgraph *next; } LISTGRAPH; #define NEWLISTGRAPH TMALLOC(LISTGRAPH, 1) #define NUMGBUCKETS 16 typedef struct gbucket { LISTGRAPH *list; } GBUCKET; static GBUCKET GBucket[NUMGBUCKETS]; /* note: Zero is not a valid id. This is used in plot() in graf.c. */ static int RunningId = 1; /* initialize graph structure */ #define SETGRAPH(pgraph, id) \ do { \ (pgraph)->graphid = (id); \ (pgraph)->degree = 1; \ (pgraph)->linestyle = -1; \ } while(0) /* returns NULL on error */ GRAPH * NewGraph(void) { GRAPH *pgraph; LISTGRAPH *list; int BucketId = RunningId % NUMGBUCKETS; if ((list = NEWLISTGRAPH) == NULL) { internalerror("can't allocate a listgraph"); return (NULL); } pgraph = &list->graph; SETGRAPH(pgraph, RunningId); if (!GBucket[BucketId].list) { GBucket[BucketId].list = list; } else { /* insert at front of current list */ list->next = GBucket[BucketId].list; GBucket[BucketId].list = list; } RunningId++; return (pgraph); } /* Given graph id, return graph */ GRAPH * FindGraph(int id) { LISTGRAPH *list; for (list = GBucket[id % NUMGBUCKETS].list; list && list->graph.graphid != id; list = list->next) ; if (list) return (&list->graph); else return (NULL); } GRAPH * CopyGraph(GRAPH *graph) { GRAPH *ret; struct _keyed *k; struct dveclist *link, *newlink; ret = NewGraph(); bcopy(graph, ret, sizeof(GRAPH)); /* va: compatible pointer types */ ret->graphid = RunningId - 1; /* restore id */ /* copy keyed */ for (ret->keyed = NULL, k = graph->keyed; k; k = k->next) SaveText(ret, k->text, k->x, k->y); /* copy dvecs */ ret->plotdata = NULL; for (link = graph->plotdata; link; link = link->next) { newlink = TMALLOC(struct dveclist, 1); newlink->next = ret->plotdata; newlink->vector = vec_copy(link->vector); /* vec_copy doesn't set v_color or v_linestyle */ newlink->vector->v_color = link->vector->v_color; newlink->vector->v_linestyle = link->vector->v_linestyle; newlink->vector->v_flags |= VF_PERMANENT; ret->plotdata = newlink; } ret->commandline = copy(graph->commandline); ret->plotname = copy(graph->plotname); return (ret); } int DestroyGraph(int id) { LISTGRAPH *list, *lastlist; struct _keyed *k, *nextk; struct dveclist *d, *nextd; struct dbcomm *db; list = GBucket[id % NUMGBUCKETS].list; lastlist = NULL; while (list) { if (list->graph.graphid == id) { /* found it */ /* Fix the iplot/trace dbs list */ for (db = dbs; db && db->db_graphid != id; db = db->db_next) ; if (db && (db->db_type == DB_IPLOT || db->db_type == DB_IPLOTALL)) { db->db_type = DB_DEADIPLOT; /* Delete this later */ return (0); } /* adjust bucket pointers */ if (lastlist) lastlist->next = list->next; else GBucket[id % NUMGBUCKETS].list = list->next; /* run through and de-allocate dynamically allocated keyed list */ k = list->graph.keyed; while (k) { nextk = k->next; tfree(k->text); tfree(k); k = nextk; } /* de-allocate dveclist */ d = list->graph.plotdata; while (d) { nextd = d->next; tfree(d->vector->v_name); if (isreal(d->vector)) tfree(d->vector->v_realdata); else tfree(d->vector->v_compdata); tfree(d->vector); tfree(d); d = nextd; } tfree(list->graph.commandline); tfree(list->graph.plotname); /* If device dependent space allocated, free it. */ if (list->graph.devdep) tfree(list->graph.devdep); tfree(list); return (1); } lastlist = list; list = list->next; } internalerror("tried to destroy non-existent graph"); return (0); } /* free up all dynamically allocated data structures */ void FreeGraphs(void) { GBUCKET *gbucket; LISTGRAPH *list, *deadl; for (gbucket = GBucket; gbucket < &GBucket[NUMGBUCKETS]; gbucket++) { list = gbucket->list; while (list) { deadl = list; list = list->next; tfree(deadl); } } } void SetGraphContext(int graphid) { currentgraph = FindGraph(graphid); } typedef struct gcstack { GRAPH *pgraph; struct gcstack *next; } GCSTACK; GCSTACK *gcstacktop; #define NEWGCSTACK TMALLOC(GCSTACK, 1) /* note: This Push and Pop has tricky semantics. Push(graph) will push the currentgraph onto the stack and set currentgraph to graph. Pop() simply sets currentgraph to the top of the stack and pops stack. */ void PushGraphContext(GRAPH *graph) { GCSTACK *gcstack = NEWGCSTACK; if (!gcstacktop) { gcstacktop = gcstack; } else { gcstack->next = gcstacktop; gcstacktop = gcstack; } gcstacktop->pgraph = currentgraph; currentgraph = graph; } void PopGraphContext(void) { GCSTACK *dead; currentgraph = gcstacktop->pgraph; dead = gcstacktop; gcstacktop = gcstacktop->next; tfree(dead); } ngspice-26/src/frontend/plotting/graf.h0000644000265600020320000000207512264261473017573 0ustar andreasadmin/************* * Header file for graf.c * 1999 E. Rouat ************/ #ifndef ngspice_GRAF_H #define ngspice_GRAF_H #include "ngspice/graph.h" int gr_init(double *xlims, double *ylims, char *xname, char *plotname, char *hcopy, int nplots, double xdelta, double ydelta, GRIDTYPE gridtype, PLOTTYPE plottype, char *xlabel, char *ylabel, int xtype, int ytype, char *pname, char *commandline); void gr_point(struct dvec *dv, double newx, double newy, double oldx, double oldy, int np); void gr_start(struct dvec *dv); void gr_relinestyle(GRAPH *graph); void drawlegend(GRAPH *graph, int plotno, struct dvec *dv); void gr_end(struct dvec *dv); void gr_pmsg(char *text); void gr_clean(void); void gr_resize(GRAPH *graph); void gr_resize_internal(GRAPH *graph); void gr_redraw(GRAPH *graph); void gr_restoretext(GRAPH *graph); void reset_trace(void); void gr_iplot(struct plot *plot); void gr_end_iplot(void); double *readtics(char *string); #endif ngspice-26/src/frontend/plotting/xgraph.c0000644000265600020320000001040612264261473020135 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ /* * Xgraph-11 plots. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "xgraph.h" #define XG_MAXVECTORS 64 void ft_xgraph(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs) { FILE *file; struct dvec *v, *scale; double xval, yval; int i, numVecs, linewidth; bool xlog, ylog, nogrid, markers; char buf[BSIZE_SP], pointstyle[BSIZE_SP], *text; /* Sanity checking. */ for (v = vecs, numVecs = 0; v; v = v->v_link2) numVecs++; if (numVecs == 0) { return; } else if (numVecs > XG_MAXVECTORS) { fprintf(cp_err, "Error: too many vectors for Xgraph.\n"); return; } if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth)) linewidth = 1; if (linewidth < 1) linewidth = 1; if (!cp_getvar("pointstyle", CP_STRING, pointstyle)) { markers = FALSE; } else { if (cieq(pointstyle, "markers")) markers = TRUE; else markers = FALSE; } /* Make sure the gridtype is supported. */ switch (gridtype) { case GRID_LIN: nogrid = xlog = ylog = FALSE; break; case GRID_XLOG: xlog = TRUE; nogrid = ylog = FALSE; break; case GRID_YLOG: ylog = TRUE; nogrid = xlog = FALSE; break; case GRID_LOGLOG: xlog = ylog = TRUE; nogrid = FALSE; break; case GRID_NONE: nogrid = TRUE; xlog = ylog = FALSE; break; default: fprintf(cp_err, "Error: grid type unsupported by Xgraph.\n"); return; } /* Open the output file. */ if ((file = fopen(filename, "w")) == NULL) { perror(filename); return; } /* Set up the file header. */ if (title) { text = cp_unquote(title); fprintf(file, "TitleText: %s\n", text); tfree(text); } if (xlabel) { text = cp_unquote(xlabel); fprintf(file, "XUnitText: %s\n", text); tfree(text); } if (ylabel) { text = cp_unquote(ylabel); fprintf(file, "YUnitText: %s\n", text); tfree(text); } if (nogrid) { fprintf(file, "Ticks: True\n"); } if (xlog) { fprintf(file, "LogX: True\n"); if (xlims) { fprintf(file, "XLowLimit: % e\n", log10(xlims[0])); fprintf(file, "XHighLimit: % e\n", log10(xlims[1])); } } else { if (xlims) { fprintf(file, "XLowLimit: % e\n", xlims[0]); fprintf(file, "XHighLimit: % e\n", xlims[1]); } } if (ylog) { fprintf(file, "LogY: True\n"); if (ylims) { fprintf(file, "YLowLimit: % e\n", log10(ylims[0])); fprintf(file, "YHighLimit: % e\n", log10(ylims[1])); } } else { if (ylims) { fprintf(file, "YLowLimit: % e\n", ylims[0]); fprintf(file, "YHighLimit: % e\n", ylims[1]); } } fprintf(file, "LineWidth: %d\n", linewidth); fprintf(file, "BoundBox: True\n"); if (plottype == PLOT_COMB) { fprintf(file, "BarGraph: True\n"); fprintf(file, "NoLines: True\n"); } else if (plottype == PLOT_POINT) { if (markers) fprintf(file, "Markers: True\n"); else fprintf(file, "LargePixels: True\n"); fprintf(file, "NoLines: True\n"); } /* Write out the data. */ for (v = vecs; v; v = v->v_link2) { scale = v->v_scale; if (v->v_name) fprintf(file, "\"%s\"\n", v->v_name); for (i = 0; i < scale->v_length; i++) { xval = isreal(scale) ? scale->v_realdata[i] : realpart(scale->v_compdata[i]); yval = isreal(v) ? v->v_realdata[i] : realpart(v->v_compdata[i]); fprintf(file, "% e % e\n", xval, yval); } fprintf(file, "\n"); } (void) fclose(file); (void) sprintf(buf, "xgraph %s &", filename); (void) system(buf); } ngspice-26/src/frontend/plotting/plot5.c0000644000265600020320000001013212264261473017703 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/graph.h" #include "ngspice/ftedev.h" #include "plot5.h" #include "graf.h" #include "ngspice/fteext.h" static FILE *plotfile; #define putsi(a) \ do { \ putc((char) (a), plotfile); \ putc((char) ((a) >> 8), plotfile); \ } while(0) #define SOLID 0 static char *linestyle[] = { "solid", "dotted", "longdashed", "shortdashed", "dotdashed" }; static int currentlinestyle = SOLID; int Plt5_Init(void) { dispdev->numlinestyles = 4; dispdev->numcolors = 2; /* arbitrary */ dispdev->width = 1000; dispdev->height = 1000; return (0); } int Plt5_NewViewport(GRAPH *graph) { if ((plotfile = fopen((char*) graph->devdep, "w")) == NULL) { graph->devdep = NULL; perror((char*) graph->devdep); return (1); } if (graph->absolute.width) { /* hardcopying from the scree, ie, we are passed a copy of an existing graph */ putc('s', plotfile); putsi(0); putsi(0); putsi(graph->absolute.width); putsi(graph->absolute.height); /* re-scale linestyles */ gr_relinestyle(graph); } else { /* scale space */ putc('s', plotfile); putsi(0); putsi(0); putsi(dispdev->width); putsi(dispdev->height); /* reasonable values, used in gr_ for placement */ graph->fontwidth = 12; graph->fontheight = 24; graph->absolute.width = dispdev->width; graph->absolute.height = dispdev->height; } /* set to NULL so graphdb doesn't incorrectly de-allocate it */ graph->devdep = NULL; return (0); } int Plt5_Close(void) { /* in case Plt5_Close is called as part of an abort, w/o having reached Plt5_NewViewport */ if (plotfile) fclose(plotfile); return 0; } int Plt5_Clear(void) { /* do nothing */ return 0; } int Plt5_DrawLine(int x1, int y1, int x2, int y2) { putc('l', plotfile); putsi(x1); putsi(y1); putsi(x2); putsi(y2); return 0; } int Plt5_Arc(int xc, int yc, int radius, double theta, double delta_theta) { int x0, y0, x1, y1; if (delta_theta < 0) { theta += delta_theta; delta_theta = -delta_theta; } if ((2*M_PI - delta_theta)*radius < 0.5) { putc('c', plotfile); putsi(xc); putsi(yc); putsi(radius); return 0; } while (delta_theta*radius > 0.5) { double delta_phi = M_PI/2; if (delta_phi > delta_theta) delta_phi = delta_theta; x0 = xc + (int)(radius * cos(theta)); y0 = yc + (int)(radius * sin(theta)); x1 = xc + (int)(radius * cos(theta + delta_phi)); y1 = yc + (int)(radius * sin(theta + delta_phi)); putc('a', plotfile); putsi(xc); putsi(yc); putsi(x0); putsi(y0); putsi(x1); putsi(y1); delta_theta -= delta_phi; theta += delta_phi; } return 0; } int Plt5_Text(char *text, int x, int y) { int savedlstyle; /* set linestyle to solid or may get funny color text on some plotters */ savedlstyle = currentlinestyle; Plt5_SetLinestyle(SOLID); /* move to (x, y) */ putc('m', plotfile); putsi(x); putsi(y); /* use the label option */ fprintf(plotfile, "t%s\n", text); /* restore old linestyle */ Plt5_SetLinestyle(savedlstyle); return 0; } int Plt5_SetLinestyle(int linestyleid) { if (linestyleid < 0 || linestyleid > dispdev->numlinestyles) { internalerror("bad linestyleid"); return 0; } putc('f', plotfile); fprintf(plotfile, "%s\n", linestyle[linestyleid]); currentlinestyle = linestyleid; return 0; } /* ARGSUSED */ int Plt5_SetColor(int colorid) { NG_IGNORE(colorid); /* do nothing */ return 0; } int Plt5_Update(void) { fflush(plotfile); return 0; } ngspice-26/src/frontend/plotting/agraf.h0000644000265600020320000000064412264261473017734 0ustar andreasadmin/************* * Header file for agraf.c * 1999 E. Rouat ************/ #ifndef ngspice_AGRAF_H #define ngspice_AGRAF_H #include "ngspice/dvec.h" #include "ngspice/bool.h" #include "ngspice/plot.h" void ft_agraf(double *xlims, double *ylims, struct dvec *xscale, struct plot *plot, struct dvec *vecs, double xdel, double ydel, bool xlog, bool ylog, bool nointerp); #endif ngspice-26/src/frontend/plotting/x11.c0000644000265600020320000007762512264261473017275 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* X11 drivers. */ #include "ngspice/ngspice.h" #ifndef X_DISPLAY_MISSING # include # include /* PN */ # include /* PN */ # include "ngspice/graph.h" # include "ngspice/ftedbgra.h" # include "ngspice/ftedev.h" # include "ngspice/fteinput.h" # include "ngspice/cpdefs.h" # include "ngspice/ftedefs.h" # include # include "../com_hardcopy.h" /* Added X11/ prefix to the next includes - ER */ # include # include # include # include # include # include # include # include # include # include # ifdef DEBUG # include /* for _Xdebug */ # endif #include "x11.h" #include "graphdb.h" #include "display.h" #include "graf.h" #define RAD_TO_DEG (180.0 / M_PI) /* X dependent default parameters */ #define DEF_FONT "10x14" #define NUMLINESTYLES 8 #define MW_LINEWIDTH 2 /* MW. I want larger lines */ #define NXPLANES 5 /* note: What is this used for? */ #define BOXSIZE 30 /* initial size of bounding box for zoomin */ #define NUMCOLORS 20 typedef struct x11info { Window window; int isopen; Widget shell, form, view, buttonbox, buttons[2]; XFontStruct *font; GC gc; int lastx, lasty; /* used in X_DrawLine */ int lastlinestyle; /* used in X_DrawLine */ Pixel colors[NUMCOLORS]; } X11devdep; #define DEVDEP(g) (*((X11devdep *) (g)->devdep)) static Display *display; static GC xorgc; static char *xlinestyles[NUMLINESTYLES] = { /* test patterns XXX */ "\001\001\001\001", /* solid */ "\001\002\001\002", /* dots */ "\007\007\007\007", /* longdash */ "\003\003\003\003", /* shortdash */ "\007\002\002\002", /* dots longdash */ "\003\002\001\002", /* dots shortdash */ "\003\003\007\003", /* short/longdash */ }; /* atoms for catching window delet by WM x-button */ static Atom atom_wm_delete_window; static Atom atom_wm_protocols; static Widget toplevel; static Bool noclear = False; static GRAPH *lasthardcopy; /* graph user selected */ static int X11_Open = 0; static int numdispplanes; /* static functions */ static void initlinestyles(void); static void initcolors(GRAPH *graph); static void X_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy); static void linear_arc(int x0, int y0, int radius, double theta, double delta_theta); static void slopelocation(GRAPH *graph, int x0, int y0); static void zoomin(GRAPH *graph); //XtEventHandler static void handlekeypressed(Widget w, XtPointer clientdata, XEvent *ev, Boolean *continue_dispatch); static void handlebuttonev(Widget w, XtPointer graph, XEvent *ev, Boolean *continue_dispatch); static void redraw(Widget w, XtPointer client_data, XEvent *ev, Boolean *continue_dispatch); static void resize(Widget w, XtPointer client_data, XEvent *ev, Boolean *continue_dispatch); //XtCallbackProc static void hardcopy(Widget w, XtPointer client_data, XtPointer call_data); static void killwin(Widget w, XtPointer client_data, XtPointer call_data); static int errorhandler(Display *display, XErrorEvent *errorev) { XGetErrorText(display, errorev->error_code, ErrorMessage, 1024); externalerror(ErrorMessage); return 0; } int X11_Init(void) { char buf[512]; char *displayname; XGCValues gcvalues; /* grrr, Xtk forced contortions */ char *argv[2]; int argc = 2; if (cp_getvar("display", CP_STRING, buf)) { displayname = buf; } else if (!(displayname = getenv("DISPLAY"))) { internalerror("Can't open X display."); return (1); } # ifdef DEBUG _Xdebug = 1; # endif argv[0] = "ngspice"; argv[1] = displayname; /* argv[2] = "-geometry"; argv[3] = "=1x1+2+2"; */ /* initialize X toolkit */ toplevel = XtInitialize("ngspice", "Nutmeg", NULL, 0, &argc, argv); display = XtDisplay(toplevel); X11_Open = 1; /* "invert" works better than "xor" for B&W */ /* xor gc should be a function of the pixels that are written on */ /* gcvalues.function = GXxor; */ /* this patch makes lines visible on true color displays Guenther Roehrich 22-Jan-99 */ gcvalues.function = GXinvert; gcvalues.line_width = 1; gcvalues.foreground = 1; gcvalues.background = 0; xorgc = XCreateGC(display, DefaultRootWindow(display), GCLineWidth | GCFunction | GCForeground | GCBackground, &gcvalues); /* set correct information */ dispdev->numlinestyles = NUMLINESTYLES; dispdev->numcolors = NUMCOLORS; dispdev->width = DisplayWidth(display, DefaultScreen(display)); dispdev->height = DisplayHeight(display, DefaultScreen(display)); /* we don't want non-fatal X errors to call exit */ XSetErrorHandler(errorhandler); numdispplanes = DisplayPlanes(display, DefaultScreen(display)); return (0); } static void initlinestyles(void) { int i; if (numdispplanes > 1) /* Dotted lines are a distraction when we have colors. */ for (i = 2; i < NUMLINESTYLES; i++) xlinestyles[i] = xlinestyles[0]; } static void initcolors(GRAPH *graph) { int i; static char *colornames[] = { "black", /* white */ "white", "red", "blue", "orange", "green", "pink", "brown", "khaki", "plum", "orchid", "violet", "maroon", "turquoise", "sienna", "coral", "cyan", "magenta", "gold", "yellow", "" }; XColor visualcolor, exactcolor; char buf[BSIZE_SP], colorstring[BSIZE_SP]; int xmaxcolors = NUMCOLORS; /* note: can we get rid of this? */ if (numdispplanes == 1) { /* black and white */ xmaxcolors = 2; DEVDEP(graph).colors[0] = DEVDEP(graph).view->core.background_pixel; if (DEVDEP(graph).colors[0] == WhitePixel(display, DefaultScreen(display))) DEVDEP(graph).colors[1] = BlackPixel(display, DefaultScreen(display)); else DEVDEP(graph).colors[1] = WhitePixel(display, DefaultScreen(display)); } else { if (numdispplanes < NXPLANES) xmaxcolors = 1 << numdispplanes; for (i = 0; i < xmaxcolors; i++) { (void) sprintf(buf, "color%d", i); if (!cp_getvar(buf, CP_STRING, colorstring)) (void) strcpy(colorstring, colornames[i]); if (!XAllocNamedColor(display, DefaultColormap(display, DefaultScreen(display)), colorstring, &visualcolor, &exactcolor)) { (void) sprintf(ErrorMessage, "can't get color %s\n", colorstring); externalerror(ErrorMessage); DEVDEP(graph).colors[i] = i ? BlackPixel(display, DefaultScreen(display)) : WhitePixel(display, DefaultScreen(display)); continue; } DEVDEP(graph).colors[i] = visualcolor.pixel; /* MW. I don't need this, everyone must know what he is doing if (i > 0 && DEVDEP(graph).colors[i] == DEVDEP(graph).view->core.background_pixel) { DEVDEP(graph).colors[i] = DEVDEP(graph).colors[0]; } */ } /* MW. Set Beackgroound here */ XSetWindowBackground(display, DEVDEP(graph).window, DEVDEP(graph).colors[0]); /* if (DEVDEP(graph).colors[0] != DEVDEP(graph).view->core.background_pixel) { DEVDEP(graph).colors[0] = DEVDEP(graph).view->core.background_pixel; } */ } for (i = xmaxcolors; i < NUMCOLORS; i++) { DEVDEP(graph).colors[i] = DEVDEP(graph).colors[i + 1 - xmaxcolors]; } } static void handlekeypressed(Widget w, XtPointer client_data, XEvent *ev, Boolean *continue_dispatch) { XKeyEvent *keyev = & ev->xkey; GRAPH *graph = (GRAPH *) client_data; char text[4]; int nbytes; NG_IGNORE(w); NG_IGNORE(continue_dispatch); nbytes = XLookupString(keyev, text, 4, NULL, NULL); if (!nbytes) return; /* write it */ PushGraphContext(graph); text[nbytes] = '\0'; SetColor(1); DevDrawText(text, keyev->x, graph->absolute.height - keyev->y); /* save it */ SaveText(graph, text, keyev->x, graph->absolute.height - keyev->y); /* warp mouse so user can type in sequence */ XWarpPointer(display, None, DEVDEP(graph).window, 0, 0, 0, 0, keyev->x + XTextWidth(DEVDEP(graph).font, text, nbytes), keyev->y); PopGraphContext(); } static void handlebuttonev(Widget w, XtPointer client_data, XEvent *ev, Boolean *continue_dispatch) { GRAPH *graph = (GRAPH *) client_data; NG_IGNORE(w); NG_IGNORE(continue_dispatch); switch (ev->xbutton.button) { case Button1: slopelocation(graph, ev->xbutton.x, ev->xbutton.y); break; case Button3: zoomin(graph); break; } } /* callback function for catching window deletion by WM x-button */ static void handle_wm_messages(Widget w, XtPointer client_data, XEvent *ev, Boolean *cont) { GRAPH *graph = (GRAPH *) client_data; NG_IGNORE(w); NG_IGNORE(cont); if (ev->type == ClientMessage && ev->xclient.message_type == atom_wm_protocols && (Atom) ev->xclient.data.l[0] == atom_wm_delete_window) { RemoveWindow(graph); } } /* Recover from bad NewViewPort call. */ #define RECOVERNEWVIEWPORT() \ do { \ tfree(graph); \ graph = NULL; \ } while(0) /* need to do this or else DestroyGraph will free it again */ /* NewViewport is responsible for filling in graph->viewport */ int X11_NewViewport(GRAPH *graph) { char fontname[513]; /* who knows . . . */ char *p, *q; Cursor cursor; XSetWindowAttributes w_attrs; XGCValues gcvalues; static Arg formargs[ ] = { { XtNleft, (XtArgVal) XtChainLeft }, { XtNresizable, (XtArgVal) TRUE } }; static Arg bboxargs[ ] = { { XtNfromHoriz, (XtArgVal) NULL }, { XtNbottom, (XtArgVal) XtChainTop }, { XtNtop, (XtArgVal) XtChainTop }, { XtNleft, (XtArgVal) XtChainRight }, { XtNright, (XtArgVal) XtChainRight } }; static Arg buttonargs[ ] = { { XtNlabel, (XtArgVal) NULL }, { XtNfromVert, (XtArgVal) NULL }, { XtNbottom, (XtArgVal) XtChainTop }, { XtNtop, (XtArgVal) XtChainTop }, { XtNleft, (XtArgVal) XtRubber }, { XtNright, (XtArgVal) XtRubber }, { XtNresizable, (XtArgVal) TRUE } }; static Arg viewargs[] = { { XtNresizable, (XtArgVal) TRUE }, { XtNwidth, (XtArgVal) 300 }, { XtNheight, (XtArgVal) 300 }, { XtNright, (XtArgVal) XtChainRight } }; int trys; graph->devdep = TMALLOC(X11devdep, 1); /* set up new shell */ DEVDEP(graph).shell = XtCreateApplicationShell ("shell", topLevelShellWidgetClass, NULL, 0); XtVaSetValues(DEVDEP(graph).shell, XtNtitle, graph->plotname, NULL); /* set up form widget */ DEVDEP(graph).form = XtCreateManagedWidget ("form", formWidgetClass, DEVDEP(graph).shell, formargs, XtNumber(formargs)); /* set up viewport */ DEVDEP(graph).view = XtCreateManagedWidget ("viewport", widgetClass, DEVDEP(graph).form, viewargs, XtNumber(viewargs)); XtAddEventHandler(DEVDEP(graph).view, ButtonPressMask, FALSE, handlebuttonev, graph); XtAddEventHandler(DEVDEP(graph).view, KeyPressMask, FALSE, handlekeypressed, graph); XtAddEventHandler(DEVDEP(graph).view, StructureNotifyMask, FALSE, resize, graph); XtAddEventHandler(DEVDEP(graph).view, ExposureMask, FALSE, redraw, graph); /* set up button box */ XtSetArg(bboxargs[1], XtNfromHoriz, DEVDEP(graph).view); DEVDEP(graph).buttonbox = XtCreateManagedWidget ("buttonbox", boxWidgetClass, DEVDEP(graph).form, bboxargs, XtNumber(bboxargs)); /* set up buttons */ XtSetArg(buttonargs[0], XtNlabel, "quit"); XtSetArg(bboxargs[1], XtNfromVert, NULL); DEVDEP(graph).buttons[0] = XtCreateManagedWidget ("quit", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); XtAddCallback(DEVDEP(graph).buttons[0], XtNcallback, killwin, graph); XtSetArg(buttonargs[0], XtNlabel, "hardcopy"); XtSetArg(bboxargs[1], XtNfromVert, DEVDEP(graph).buttons[0]); DEVDEP(graph).buttons[1] = XtCreateManagedWidget ("hardcopy", commandWidgetClass, DEVDEP(graph).buttonbox, buttonargs, 1); XtAddCallback(DEVDEP(graph).buttons[1], XtNcallback, hardcopy, graph); /* set up fonts */ if (!cp_getvar("font", CP_STRING, fontname)) (void) strcpy(fontname, DEF_FONT); for (p = fontname; *p && *p <= ' '; p++) ; if (p != fontname) { for (q = fontname; *p; *q++ = *p++) ; *q = 0; } trys = 1; while (!(DEVDEP(graph).font = XLoadQueryFont(display, fontname))) { sprintf(ErrorMessage, "can't open font %s", fontname); strcpy(fontname, "fixed"); if (trys > 1) { internalerror(ErrorMessage); RECOVERNEWVIEWPORT(); return (1); } trys += 1; } graph->fontwidth = DEVDEP(graph).font->max_bounds.rbearing - DEVDEP(graph).font->min_bounds.lbearing + 1; graph->fontheight = DEVDEP(graph).font->max_bounds.ascent + DEVDEP(graph).font->max_bounds.descent + 1; XtRealizeWidget(DEVDEP(graph).shell); DEVDEP(graph).window = XtWindow(DEVDEP(graph).view); DEVDEP(graph).isopen = 0; w_attrs.bit_gravity = ForgetGravity; XChangeWindowAttributes(display, DEVDEP(graph).window, CWBitGravity, &w_attrs); /* have to note font and set mask GCFont in XCreateGC, p.w.h. */ gcvalues.font = DEVDEP(graph).font->fid; gcvalues.line_width = MW_LINEWIDTH; gcvalues.cap_style = CapNotLast; gcvalues.function = GXcopy; DEVDEP(graph).gc = XCreateGC(display, DEVDEP(graph).window, GCFont | GCLineWidth | GCCapStyle | GCFunction, &gcvalues); /* should absolute.positions really be shell.pos? */ graph->absolute.xpos = DEVDEP(graph).view->core.x; graph->absolute.ypos = DEVDEP(graph).view->core.y; graph->absolute.width = DEVDEP(graph).view->core.width; graph->absolute.height = DEVDEP(graph).view->core.height; initlinestyles(); initcolors(graph); /* set up cursor */ cursor = XCreateFontCursor(display, XC_left_ptr); XDefineCursor(display, DEVDEP(graph).window, cursor); /* WM_DELETE_WINDOW protocol */ atom_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False); atom_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False); XtAddEventHandler(DEVDEP(graph).shell, NoEventMask, True, handle_wm_messages, graph); XSetWMProtocols(display, XtWindow(DEVDEP(graph).shell), &atom_wm_delete_window, 1); return (0); } /* This routine closes the X connection. It is not to be called for finishing a graph. */ int X11_Close(void) { // don't, this has never been mapped, there is no window ... // XtUnmapWidget(toplevel); XtDestroyWidget(toplevel); XtAppContext app = XtDisplayToApplicationContext(display); XtDestroyApplicationContext(app); // don't, XtDestroyApplicationContext(app) seems to have done that // XCloseDisplay(display); return 0; } int X11_DrawLine(int x1, int y1, int x2, int y2) { if (DEVDEP(currentgraph).isopen) XDrawLine(display, DEVDEP(currentgraph).window, DEVDEP(currentgraph).gc, x1, currentgraph->absolute.height - y1, x2, currentgraph->absolute.height - y2); return 0; } int X11_Arc(int x0, int y0, int radius, double theta, double delta_theta) { int t1, t2; if (0 && !cp_getvar("x11lineararcs", CP_BOOL, NULL)) linear_arc(x0, y0, radius, theta, delta_theta); if (DEVDEP(currentgraph).isopen) { t1 = (int) (64 * (180.0 / M_PI) * theta); t2 = (int) (64 * (180.0 / M_PI) * delta_theta); if (t2 == 0) return 0; XDrawArc(display, DEVDEP(currentgraph).window, DEVDEP(currentgraph).gc, x0 - radius, currentgraph->absolute.height - radius - y0, (Dimension) (2 * radius), (Dimension) (2 * radius), t1, t2); } return 0; } /* note: x and y are the LOWER left corner of text */ int X11_Text(char *text, int x, int y) { /* We specify text position by lower left corner, so have to adjust for X11's font nonsense. */ if (DEVDEP(currentgraph).isopen) XDrawString(display, DEVDEP(currentgraph).window, DEVDEP(currentgraph).gc, x, currentgraph->absolute.height - (y + DEVDEP(currentgraph).font->max_bounds.descent), text, (int) strlen(text)); /* note: unlike before, we do not save any text here */ return 0; } int X11_DefineColor(int colorid, double red, double green, double blue) { NG_IGNORE(blue); NG_IGNORE(green); NG_IGNORE(red); NG_IGNORE(colorid); internalerror("X11_DefineColor not implemented."); return 0; } int X11_DefineLinestyle(int linestyleid, int mask) { NG_IGNORE(mask); NG_IGNORE(linestyleid); internalerror("X11_DefineLinestyle not implemented."); return 0; } int X11_SetLinestyle(int linestyleid) { XGCValues values; if (currentgraph->linestyle != linestyleid) { if ((linestyleid == 0 || numdispplanes > 1) && linestyleid != 1) { /* solid if linestyle 0 or if has color, allow only one * dashed linestyle */ values.line_style = LineSolid; } else { values.line_style = LineOnOffDash; } XChangeGC(display, DEVDEP(currentgraph).gc, GCLineStyle, &values); currentgraph->linestyle = linestyleid; XSetDashes(display, DEVDEP(currentgraph).gc, 0, xlinestyles[linestyleid], 4); } return 0; } int X11_SetColor(int colorid) { currentgraph->currentcolor = colorid; XSetForeground(display, DEVDEP(currentgraph).gc, DEVDEP(currentgraph).colors[colorid]); return 0; } int X11_Update(void) { if (X11_Open) XSync(display, 0); return 0; } int X11_Clear(void) { if (!noclear) /* hack so exposures look like they're handled nicely */ XClearWindow(display, DEVDEP(currentgraph).window); return 0; } static void X_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy) { double lmin, lmax; if (graph->grid.gridtype == GRID_XLOG || graph->grid.gridtype == GRID_LOGLOG) { lmin = log10(graph->datawindow.xmin); lmax = log10(graph->datawindow.xmax); *fx = exp(((x - graph->viewportxoff) * (lmax - lmin) / graph->viewport.width + lmin) * M_LN10); } else { *fx = (x - graph->viewportxoff) * graph->aspectratiox + graph->datawindow.xmin; } if (graph->grid.gridtype == GRID_YLOG || graph->grid.gridtype == GRID_LOGLOG) { lmin = log10(graph->datawindow.ymin); lmax = log10(graph->datawindow.ymax); *fy = exp(((graph->absolute.height - y - graph->viewportxoff) * (lmax - lmin) / graph->viewport.height + lmin) * M_LN10); } else { *fy = ((graph->absolute.height - y) - graph->viewportyoff) * graph->aspectratioy + graph->datawindow.ymin; } } static void slopelocation(GRAPH *graph, int x0, int y0) /* initial position of mouse */ { int x1, y1; int x, y; Window rootwindow, childwindow; int rootx, rooty; unsigned int state; double fx0, fx1, fy0, fy1; double angle; x1 = x0; y1 = y0; XQueryPointer(display, DEVDEP(graph).window, &rootwindow, &childwindow, &rootx, &rooty, &x, &y, &state); XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y0, x0, y1-1); XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y1, x1, y1); while (state & Button1Mask) { if (x != x1 || y != y1) { XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y0, x0, y1-1); XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y1, x1, y1); x1 = x; y1 = y; XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y0, x0, y1-1); XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y1, x1, y1); } XQueryPointer(display, DEVDEP(graph).window, &rootwindow, &childwindow, &rootx, &rooty, &x, &y, &state); } XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y0, x0, y1-1); XDrawLine(display, DEVDEP(graph).window, xorgc, x0, y1, x1, y1); X_ScreentoData(graph, x0, y0, &fx0, &fy0); X_ScreentoData(graph, x1, y1, &fx1, &fy1); /* print it out */ if (x1 == x0 && y1 == y0) { /* only one location */ fprintf(stdout, "\nx0 = %g, y0 = %g\n", fx0, fy0); if (graph->grid.gridtype == GRID_POLAR || graph->grid.gridtype == GRID_SMITH || graph->grid.gridtype == GRID_SMITHGRID) { angle = RAD_TO_DEG * atan2(fy0, fx0); fprintf(stdout, "r0 = %g, a0 = %g\n", sqrt(fx0*fx0 + fy0*fy0), (angle>0)?angle:360.0+angle); } } else { /* need to print info about two points */ fprintf(stdout, "\nx0 = %g, y0 = %g x1 = %g, y1 = %g\n", fx0, fy0, fx1, fy1); fprintf(stdout, "dx = %g, dy = %g\n", fx1-fx0, fy1 - fy0); if (x1 != x0 && y1 != y0) { /* add slope info if both dx and dy are zero, because otherwise either dy/dx or dx/dy is zero, which is uninteresting */ fprintf(stdout, "dy/dx = %g dx/dy = %g\n", (fy1-fy0)/(fx1-fx0), (fx1-fx0)/(fy1-fy0)); } } } /* should be able to do this by sleight of hand on graph parameters */ static void zoomin(GRAPH *graph) { /* note: need to add circular boxes XXX */ int x0, y0, x1, y1; double fx0, fx1, fy0, fy1, ftemp; char buf[BSIZE_SP]; char buf2[128]; char *t; Window rootwindow, childwindow; int rootx, rooty; unsigned int state; int x, y, upperx, uppery; unsigned width, height; /* open box and get area to zoom in on */ XQueryPointer(display, DEVDEP(graph).window, &rootwindow, &childwindow, &rootx, &rooty, &x0, &y0, &state); x = x1 = x0 + BOXSIZE; y = y1 = y0 + BOXSIZE; upperx = x0; uppery = y0; width = BOXSIZE; height = BOXSIZE; XDrawRectangle(display, DEVDEP(graph).window, xorgc, upperx, uppery, width, height); XWarpPointer(display, None, DEVDEP(graph).window, 0, 0, 0, 0, x1, y1); while (state & Button3Mask) { if (x != x1 || y != y1) { x1 = x; y1 = y; XDrawRectangle(display, DEVDEP(graph).window, xorgc, upperx, uppery, width, height); upperx = MIN(x1, x0); uppery = MIN(y1, y0); width = (unsigned) ABS(x1 - x0); height = (unsigned) ABS(y1 - y0); XDrawRectangle(display, DEVDEP(graph).window, xorgc, upperx, uppery, width, height); } XQueryPointer(display, DEVDEP(graph).window, &rootwindow, &childwindow, &rootx, &rooty, &x, &y, &state); } XDrawRectangle(display, DEVDEP(graph).window, xorgc, upperx, uppery, width, height); X_ScreentoData(graph, x0, y0, &fx0, &fy0); X_ScreentoData(graph, x1, y1, &fx1, &fy1); if (fx0 > fx1) { ftemp = fx0; fx0 = fx1; fx1 = ftemp; } if (fy0 > fy1) { ftemp = fy0; fy0 = fy1; fy1 = ftemp; } strncpy(buf2, graph->plotname, sizeof(buf2)); if ((t = strchr(buf2, ':')) != NULL) *t = 0; if (!eq(plot_cur->pl_typename, buf2)) { (void) sprintf(buf, "setplot %s; %s xlimit %.20e %.20e ylimit %.20e %.20e; setplot $curplot\n", buf2, graph->commandline, fx0, fx1, fy0, fy1); } else { (void) sprintf(buf, "%s xlimit %e %e ylimit %e %e\n", graph->commandline, fx0, fx1, fy0, fy1); } /* don't use the following if using GNU Readline or BSD EditLine */ #if !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) { wordlist *wl; /* hack for Gordon Jacobs */ /* add to history list if plothistory is set */ if (cp_getvar("plothistory", CP_BOOL, NULL)) { wl = cp_parse(buf); (void) cp_addhistent(cp_event++, wl); } } #endif /* !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) */ (void) cp_evloop(buf); } static void hardcopy(Widget w, XtPointer client_data, XtPointer call_data) { NG_IGNORE(call_data); NG_IGNORE(w); /* com_hardcopy() -> gr_resize() -> setcolor() dirung postscript printing will act on currentgraph with a DEVDEP inherited from PSdevdep. But currentgraph had not changed its devdep, which was derived from incompatible X11devdep, thus overwriting some variables. Here you find a temporary remedy, until there will be a cleanup of graph handling. E.g. CopyGraph() does not make a copy of its devdep, but just copies the pointer, so keeping the old devdep. */ lasthardcopy = (GRAPH *) client_data; /* FIXME #1: this should print currentgraph with * currentgraph dynamically bound to client_data * FIXME #2: the !currentgraphs case, * don't bother do call com_hardcopy */ if (currentgraph) { void *devdep = currentgraph->devdep; com_hardcopy(NULL); currentgraph->devdep = devdep; } else { com_hardcopy(NULL); } } static void killwin(Widget w, XtPointer client_data, XtPointer call_data) { GRAPH *graph = (GRAPH *) client_data; NG_IGNORE(call_data); NG_IGNORE(w); RemoveWindow(graph); } /* called from postcoms.c In the command 'destroy ac2' Will remove window associated with the plot (e.g. ac2) just before data of the plot are deleted.*/ void RemoveWindow(GRAPH *graph) { if (graph->devdep) { /* Iplots are done asynchronously */ DEVDEP(graph).isopen = 0; /* MW. Not sure but DestroyGraph might free() to much - try Xt...() first */ XtUnmapWidget(DEVDEP(graph).shell); XtDestroyWidget(DEVDEP(graph).shell); XFreeFont(display, DEVDEP(graph).font); XFreeGC(display, DEVDEP(graph).gc); } if (graph == currentgraph) currentgraph = NULL; DestroyGraph(graph->graphid); } /* call higher gr_redraw routine */ static void redraw(Widget w, XtPointer client_data, XEvent *event, Boolean *continue_dispatch) { GRAPH *graph = (GRAPH *) client_data; XExposeEvent *pev = & event->xexpose; XEvent ev; XRectangle rects[30]; int n = 1; NG_IGNORE(w); NG_IGNORE(continue_dispatch); DEVDEP(graph).isopen = 1; rects[0].x = (Position) pev->x; rects[0].y = (Position) pev->y; rects[0].width = (Dimension) pev->width; rects[0].height = (Dimension) pev->height; /* XXX */ /* pull out all other expose regions that need to be redrawn */ while (n < 30 && XCheckWindowEvent(display, DEVDEP(graph).window, ExposureMask, &ev)) { pev = (XExposeEvent *) &ev; rects[n].x = (Position) pev->x; rects[n].y = (Position) pev->y; rects[n].width = (Dimension) pev->width; rects[n].height = (Dimension) pev->height; n++; } XSetClipRectangles(display, DEVDEP(graph).gc, 0, 0, rects, n, Unsorted); noclear = True; { GRAPH *tmp = currentgraph; currentgraph = graph; gr_redraw(graph); currentgraph = tmp; } noclear = False; XSetClipMask(display, DEVDEP(graph).gc, None); } static void resize(Widget w, XtPointer client_data, XEvent *call_data, Boolean *continue_dispatch) { GRAPH *graph = (GRAPH *) client_data; XEvent ev; NG_IGNORE(call_data); NG_IGNORE(continue_dispatch); /* pull out all other exposure events Also, get rid of other StructureNotify events on this window. */ while (XCheckWindowEvent(display, DEVDEP(graph).window, /* ExposureMask | */ StructureNotifyMask, &ev)) ; XClearWindow(display, DEVDEP(graph).window); graph->absolute.width = w->core.width; graph->absolute.height = w->core.height; { GRAPH *tmp = currentgraph; currentgraph = graph; gr_resize(graph); currentgraph = tmp; } } int X11_Input(REQUEST *request, RESPONSE *response) { XEvent ev; int nfds; fd_set rfds; switch (request->option) { case char_option: nfds = ConnectionNumber(display) > fileno(request->fp) ? ConnectionNumber(display) : fileno(request->fp); for (;;) { /* first read off the queue before doing the select */ while (XtPending()) { XtNextEvent(&ev); XtDispatchEvent(&ev); } /* block on ConnectionNumber and request->fp */ /* PN: added fd_set * casting */ FD_ZERO(&rfds); FD_SET(fileno(request->fp), &rfds); FD_SET(ConnectionNumber(display), &rfds); select (nfds + 1, &rfds, NULL, NULL, NULL); /* handle X events first */ if (FD_ISSET (ConnectionNumber(display), &rfds)) /* handle ALL X events */ while (XtPending()) { XtNextEvent(&ev); XtDispatchEvent(&ev); } if (FD_ISSET (fileno(request->fp), &rfds)) goto out; } break; case click_option: /* let's fake this */ response->reply.graph = lasthardcopy; break; case button_option: /* sit and handle events until get a button selection */ internalerror("button_option not implemented"); response->option = error_option; return 1; break; case checkup_option: /* first read off the queue before doing the select */ while (XtPending()) { XtNextEvent(&ev); XtDispatchEvent(&ev); } break; default: internalerror("unrecognized input type"); response->option = error_option; return 1; break; } out: if (response) response->option = request->option; return 0; } static void linear_arc(int x0, int y0, int radius, double theta, double delta_theta) /* x coordinate of center */ /* y coordinate of center */ /* radius of arc */ /* initial angle ( +x axis = 0 rad ) */ /* delta angle */ /* * Notes: * Draws an arc of radius and center at (x0,y0) beginning at * angle theta (in rad) and ending at theta + delta_theta */ { int x1, y1, x2, y2; int i, s = 60; double dphi; x2 = x0 + (int) (radius * cos(theta)); y2 = y0 + (int) (radius * sin(theta)); dphi = delta_theta / s; for (i = 1; i <= s; i++) { x1 = x2; y1 = y2; x2 = x0 + (int)(radius * cos(theta + i*dphi)); y2 = y0 + (int)(radius * sin(theta + i*dphi)); X11_DrawLine(x1, y1, x2, y2); } } #else int x11_dummy_symbol; /* otherwise, some linkers get upset */ #endif /* X_DISPLAY_MISSING */ ngspice-26/src/frontend/plotting/ChangeLog0000644000265600020320000000053612264261473020255 0ustar andreasadmin2002-01-03 Paolo Nenzi * graf.c: Added code to support Windows (Holger Vogt patch). 2000-10-10 Arno W. Peters * graf.c: Removed need to press return after resizing the plot window. 2000-05-22 Paolo Nenzi * x11.c: Applied Widlok patch and reintroduced some #ifdef notdef code. ngspice-26/src/frontend/plotting/graf.c0000644000265600020320000007764612264261473017606 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* * Most of the gr_ module resides here, in particular, gr_init * and gr_point, expect for the gr_ grid routines. * */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" /* for CP_ */ #include "ngspice/cpextern.h" #include "ngspice/plot.h" #include "ngspice/ftedebug.h" /* for iplot */ #include "ngspice/dvec.h" /* for struct dvec */ #include "ngspice/ftedefs.h" /* for FTEextern.h and IPOINT{MIN,MAX} */ #include "ngspice/fteinput.h" #include "ngspice/graph.h" #include "ngspice/ftedbgra.h" #include "ngspice/ftedev.h" #include #include "graf.h" #include "graphdb.h" #include "ngspice/grid.h" #include "../terminal.h" #include "../breakp2.h" #include "../display.h" #include "../runcoms.h" static void gr_start_internal(struct dvec *dv, bool copyvec); static int iplot(struct plot *pl, int id); static void set(struct plot *plot, struct dbcomm *db, bool unset, short mode); static char *getitright(char *buf, double num); /* for legends, set in gr_start, reset in gr_iplot and gr_init */ static int plotno; static int curcolor = 1; /* for assigning unique colors */ static int curlst = 0; /* for assigning line styles */ /* invariant: currentgraph contains the current graph */ /* These are what gets plotted as points when you specify point plots */ static char pointchars[128]; #define DEFPOINTCHARS "ox+#*abcdefhgijklmnpqrstuvwyz" /* Buffer for ticmarks if given a list */ static char ticbuf[1024]; static char *ticlist = ticbuf; #define MAXTICS 100 #define XFACTOR 1 /* How much to expand the X scale during iplot. */ #define YFACTOR 0.2 /* How much to expand the Y scale during iplot. */ /* * Start of a new graph. * Fill in the data that gets displayed. * Difference from old gr_init * we don't try to determine the look of the screen from here * leave to lower level routines * */ int gr_init(double *xlims, double *ylims, /* The size of the screen. */ char *xname, char *plotname, /* What to label things. */ char *hcopy, /* The raster file. */ int nplots, /* How many plots there will be. */ double xdelta, double ydelta, /* Line increments for the scale. */ GRIDTYPE gridtype, /* The grid type */ PLOTTYPE plottype, /* and the plot type. */ char *xlabel, char *ylabel, /* Labels for axes. */ int xtype, int ytype, /* The types of the data graphed. */ char *pname, char *commandline) /* For xi_zoomdata() */ { GRAPH *graph; wordlist *wl; char *comb_title; NG_IGNORE(nplots); if ((graph = NewGraph()) == NULL) return (FALSE); /* The global currentgraph will always be the current graph. */ SetGraphContext(graph->graphid); graph->onevalue = (xname ? FALSE : TRUE); /* communicate filename to plot 5 driver */ if (hcopy) graph->devdep = hcopy; plotno = 0; /* note: should do only once, maybe in gr_init_once */ if (!cp_getvar("pointchars", CP_STRING, pointchars)) (void) strcpy(pointchars, DEFPOINTCHARS); if (!cp_getvar("ticmarks", CP_NUM, &graph->ticmarks)) { if (cp_getvar("ticmarks", CP_BOOL, NULL)) graph->ticmarks = 10; else graph->ticmarks = 0; } if (cp_getvar("ticlist", CP_LIST, ticlist)) { wl = vareval("ticlist"); ticlist = wl_flatten(wl); graph->ticdata = readtics(ticlist); } else { graph->ticdata = NULL; } if (!xlims || !ylims) { internalerror("gr_init: no range specified"); return (FALSE); } /* save upper and lower limits */ graph->data.xmin = xlims[0]; graph->data.xmax = xlims[1]; graph->data.ymin = ylims[0]; graph->data.ymax = ylims[1]; /* get title into plot window */ if (!pname) pname = "(unknown)"; if (!plotname) plotname = "(unknown)"; comb_title = TMALLOC(char, strlen(plotname) + strlen(pname) + 3); sprintf(comb_title, "%s: %s", pname, plotname); graph->plotname = comb_title; /* note: have enum here or some better convention */ if (NewViewport(graph) == 1) { /* note: where is the error message generated? */ /* note: undo tmallocs */ fprintf(cp_err, "Can't open viewport for graphics.\n"); return (FALSE); } /* layout decisions */ /* note: have to do before gr_fixgrid and after NewViewport */ graph->viewportxoff = graph->fontwidth * 8; /* 8 lines on left */ graph->viewportyoff = graph->fontheight * 4; /* 4 on bottom */ DevClear(); graph->grid.gridtype = gridtype; graph->plottype = plottype; graph->grid.xdatatype = xtype; graph->grid.ydatatype = ytype; graph->grid.xdelta = xdelta; graph->grid.ydelta = ydelta; graph->grid.ysized = 0; graph->grid.xsized = 0; if (!graph->onevalue) { if (xlabel) graph->grid.xlabel = xlabel; else graph->grid.xlabel = xname; if (ylabel) graph->grid.ylabel = ylabel; } else { if (xlabel) graph->grid.xlabel = xlabel; else graph->grid.xlabel = "real"; if (ylabel) graph->grid.ylabel = ylabel; else graph->grid.ylabel = "imag"; } gr_resize_internal(graph); gr_redrawgrid(graph); /* Set up colors and line styles. */ if (dispdev->numlinestyles == 1) curlst = 0; /* Use the same one all the time. */ else curlst = 1; /* XXX Special exception for SMITH */ if (dispdev->numcolors > 2 && (graph->grid.gridtype == GRID_SMITH || graph->grid.gridtype == GRID_SMITHGRID)) { curcolor = 3; } else { curcolor = 1; } graph->commandline = copy(commandline); return (TRUE); } /* * Add a point to the curve we're currently drawing. * Should be in between a gr_init() and a gr_end() * expect when iplotting, very bad hack * Differences from old gr_point: * We save points here, instead of in lower levels. * Assume we are in right context * Save points in data space (not screen space). * We pass two points in so we can multiplex plots. * */ void gr_point(struct dvec *dv, double newx, double newy, double oldx, double oldy, int np) { int oldtox, oldtoy; /* value before clipping */ char pointc[2]; int fromx, fromy, tox, toy; int ymin, dummy; DatatoScreen(currentgraph, oldx, oldy, &fromx, &fromy); DatatoScreen(currentgraph, newx, newy, &tox, &toy); /* note: we do not particularly want to clip here */ oldtox = tox; oldtoy = toy; if (!currentgraph->grid.circular) { if (clip_line(&fromx, &fromy, &tox, &toy, currentgraph->viewportxoff, currentgraph->viewportyoff, currentgraph->viewport.width + currentgraph->viewportxoff, currentgraph->viewport.height + currentgraph->viewportyoff)) return; } else { if (clip_to_circle(&fromx, &fromy, &tox, &toy, currentgraph->grid.xaxis.circular.center, currentgraph->grid.yaxis.circular.center, currentgraph->grid.xaxis.circular.radius)) return; } if (currentgraph->plottype != PLOT_POINT) { SetLinestyle(dv->v_linestyle); } else { /* if PLOT_POINT, don't want to plot an endpoint which have been clipped */ if (tox != oldtox || toy != oldtoy) return; } SetColor(dv->v_color); switch (currentgraph->plottype) { double *tics; case PLOT_LIN: /* If it's a linear plot, ignore first point since we don't want to connect with oldx and oldy. */ if (np) DevDrawLine(fromx, fromy, tox, toy); if ((tics = (double *) currentgraph->ticdata) != NULL) { for (; *tics < HUGE; tics++) if (*tics == (double) np) { DevDrawText("x", (int) (tox - currentgraph->fontwidth / 2), (int) (toy - currentgraph->fontheight / 2)); /* gr_redraw will redraw this w/o our having to save it Guenther Roehrich 22-Jan-99 */ /* SaveText(currentgraph, "x", (int) (tox - currentgraph->fontwidth / 2), (int) (toy - currentgraph->fontheight / 2)); */ break; } } else if ((currentgraph->ticmarks >0) && (np > 0) && (np % currentgraph->ticmarks == 0)) { /* Draw an 'x' */ DevDrawText("x", (int) (tox - currentgraph->fontwidth / 2), (int) (toy - currentgraph->fontheight / 2)); /* gr_redraw will redraw this w/o our having to save it Guenther Roehrich 22-Jan-99 */ /* SaveText(currentgraph, "x", (int) (tox - currentgraph->fontwidth / 2), (int) (toy - currentgraph->fontheight / 2)); */ } break; case PLOT_COMB: DatatoScreen(currentgraph, 0.0, currentgraph->datawindow.ymin, &dummy, &ymin); DevDrawLine(tox, ymin, tox, toy); break; case PLOT_POINT: /* Here, gi_linestyle is the character used for the point. */ pointc[0] = (char) dv->v_linestyle; pointc[1] = '\0'; DevDrawText(pointc, (int) (tox - currentgraph->fontwidth / 2), (int) (toy - currentgraph->fontheight / 2)); default: break; } } static void gr_start_internal(struct dvec *dv, bool copyvec) { struct dveclist *link; char *s; /* Do something special with poles and zeros. Poles are 'x's, and * zeros are 'o's. */ s = ft_typenames(dv->v_type); if (eq(s, "pole")) { dv->v_linestyle = 'x'; return; } else if (eq(s, "zero")) { dv->v_linestyle = 'o'; return; } /* Find a (hopefully) new line style and color. */ if (currentgraph->plottype == PLOT_POINT) { if (pointchars[curlst - 1]) curlst++; else curlst = 2; } else if ((curlst > 0) && (++curlst == dispdev->numlinestyles)) { curlst = 2; } if ((curcolor > 0) && (++curcolor == dispdev->numcolors)) curcolor = (((currentgraph->grid.gridtype == GRID_SMITH || currentgraph->grid.gridtype == GRID_SMITHGRID) && (dispdev->numcolors > 3)) ? 4 : 2); if (currentgraph->plottype == PLOT_POINT) dv->v_linestyle = pointchars[curlst - 2]; else dv->v_linestyle = curlst; dv->v_color = curcolor; /* save the data so we can refresh */ link = TMALLOC(struct dveclist, 1); link->next = currentgraph->plotdata; if (copyvec) { link->vector = vec_copy(dv); /* vec_copy doesn't set v_color or v_linestyle */ link->vector->v_color = dv->v_color; link->vector->v_linestyle = dv->v_linestyle; link->vector->v_flags |= VF_PERMANENT; } else { link->vector = dv; } currentgraph->plotdata = link; /* Put the legend entry on the screen. */ drawlegend(currentgraph, plotno, dv); plotno++; } /* start one plot of a graph */ void gr_start(struct dvec *dv) { gr_start_internal(dv, TRUE); } /* make sure the linestyles in this graph don't exceed the number of linestyles available in the current display device */ void gr_relinestyle(GRAPH *graph) { struct dveclist *link; for (link = graph->plotdata; link; link = link->next) { if (graph->plottype == PLOT_POINT) continue; if (!(link->vector->v_linestyle < dispdev->numlinestyles)) link->vector->v_linestyle %= dispdev->numlinestyles; if (!(link->vector->v_color < dispdev->numcolors)) link->vector->v_color %= dispdev->numcolors; } } /* PN static */ void drawlegend(GRAPH *graph, int plotno, struct dvec *dv) { int x, y, i; char buf[16]; x = ((plotno % 2) ? graph->viewportxoff : ((graph->viewport.width) / 2)); y = graph->absolute.height - graph->fontheight - ((plotno + 2) / 2) * (graph->fontheight); i = y + graph->fontheight / 2 + 1; SetColor(dv->v_color); if (graph->plottype == PLOT_POINT) { (void) sprintf(buf, "%c : ", dv->v_linestyle); DevDrawText(buf, x + graph->viewport.width / 20 - 3 * graph->fontwidth, y); } else { SetLinestyle(dv->v_linestyle); DevDrawLine(x, i, x + graph->viewport.width / 20, i); } SetColor(1); DevDrawText(dv->v_name, x + graph->viewport.width / 20 + graph->fontwidth, y); } /* end one plot of a graph */ void gr_end(struct dvec *dv) { NG_IGNORE(dv); DevUpdate(); } /* Print text in the bottom line. */ void gr_pmsg(char *text) { char buf[BSIZE_SP]; buf[0] = 0; DevUpdate(); if (cp_getvar("device", CP_STRING, buf) && !(strcmp("/dev/tty", buf) == 0)) fprintf(cp_err, "%s", text); else if (currentgraph->grid.xlabel) /* MW. grid.xlabel may be NULL */ DevDrawText(text, currentgraph->viewport.width - (int) (strlen(currentgraph->grid.xlabel) + 3) * currentgraph->fontwidth, currentgraph->absolute.height - currentgraph->fontheight); else fprintf(cp_err, " %s \n", text); DevUpdate(); } void gr_clean(void) { DevUpdate(); } /* call this routine after viewport size changes */ void gr_resize(GRAPH *graph) { double oldxratio, oldyratio; double scalex, scaley; struct _keyed *k; oldxratio = graph->aspectratiox; oldyratio = graph->aspectratioy; graph->grid.xsized = 0; graph->grid.ysized = 0; gr_resize_internal(graph); /* scale keyed text */ scalex = oldxratio / graph->aspectratiox; scaley = oldyratio / graph->aspectratioy; for (k = graph->keyed; k; k = k->next) { k->x = (int)((k->x - graph->viewportxoff) * scalex + graph->viewportxoff); k->y = (int)((k->y - graph->viewportyoff) * scaley + graph->viewportyoff); } /* X also generates an expose after a resize. This is handled in X10 by not redrawing on resizes and waiting for the expose event to redraw. In X11, the expose routine tries to be clever and only redraws the region specified in an expose event, which does not cover the entire region of the plot if the resize was from a small window to a larger window. So in order to keep the clever X11 expose event handling, we have the X11 resize routine pull out expose events for that window, and we redraw on resize also. */ #ifdef X_DISPLAY_MISSING gr_redraw(graph); #endif } /* PN static */ void gr_resize_internal(GRAPH *graph) { if (!graph->grid.xsized) graph->viewport.width = (int)(graph->absolute.width - 1.4 * graph->viewportxoff); if (!graph->grid.ysized) graph->viewport.height = graph->absolute.height - 2 * graph->viewportyoff; gr_fixgrid(graph, graph->grid.xdelta, graph->grid.ydelta, graph->grid.xdatatype, graph->grid.ydatatype); /* cache width and height info to make DatatoScreen go fast */ /* note: XXX see if this is actually used anywhere */ graph->datawindow.width = graph->datawindow.xmax - graph->datawindow.xmin; graph->datawindow.height = graph->datawindow.ymax - graph->datawindow.ymin; /* cache (datawindow size) / (viewport size) */ graph->aspectratiox = graph->datawindow.width / graph->viewport.width; graph->aspectratioy = graph->datawindow.height / graph->viewport.height; } /* redraw everything in struct graph */ void gr_redraw(GRAPH *graph) { struct dveclist *link; /* establish current graph so default graphic calls will work right */ PushGraphContext(graph); DevClear(); /* redraw grid */ gr_redrawgrid(graph); for (link = graph->plotdata, plotno = 0; link; link = link->next, plotno++) { /* redraw legend */ drawlegend(graph, plotno, link->vector); /* replot data if onevalue, pass it a NULL scale otherwise, if vec has its own scale, pass that else pass vec's plot's scale */ ft_graf(link->vector, graph->onevalue ? NULL : (link->vector->v_scale ? link->vector->v_scale : link->vector->v_plot->pl_scale), TRUE); } gr_restoretext(graph); PopGraphContext(); } void gr_restoretext(GRAPH *graph) { struct _keyed *k; /* restore text */ for (k = graph->keyed; k; k = k->next) { SetColor(k->colorindex); DevDrawText(k->text, k->x, k->y); } } /* Do some incremental plotting. There are 3 cases: * * First, if length < IPOINTMIN, don't do anything. * * Second, if length = IPOINTMIN, plot what we have so far. * * Third, if length > IPOINTMIN, plot the last points and resize if * needed. * * Note we don't check for pole / zero because they are of length 1. * * FIXME: there is a problem with multiple iplots that use the same * vector, namely, that vector has the same color throughout. This is * another reason why we need to pull color and linestyle out of dvec * XXX Or maybe even something more drastic ?? */ static int iplot(struct plot *pl, int id) { int len = pl->pl_scale->v_length; struct dvec *v, *xs = pl->pl_scale; double *lims, dy; double start, stop, step; register int j; bool changed = FALSE; int yt; char *yl = NULL; double xlims[2], ylims[2]; static REQUEST reqst = { checkup_option, 0 }; int inited = 0; char commandline[513]; for (j = 0, v = pl->pl_dvecs; v; v = v->v_next) if (v->v_flags & VF_PLOT) j++; if (!j) return (0); if (ft_grdb) fprintf(cp_err, "Entering iplot, len = %d\n", len); if (len < IPOINTMIN) { /* Nothing yet */ return (0); } else if (len == IPOINTMIN || !id) { resumption = FALSE; /* Draw the grid for the first time, and plot everything. */ lims = ft_minmax(xs, TRUE); xlims[0] = lims[0]; xlims[1] = lims[1]; ylims[0] = HUGE; ylims[1] = - ylims[0]; for (v = pl->pl_dvecs; v; v = v->v_next) if (v->v_flags & VF_PLOT) { lims = ft_minmax(v, TRUE); if (lims[0] < ylims[0]) ylims[0] = lims[0]; if (lims[1] > ylims[1]) ylims[1] = lims[1]; if (!yl) yl = v->v_name; } /* generate a small difference between ymin and ymax to catch the y=const case */ if (ylims[0] == ylims[1]) ylims[1] += 1e-9; if (ft_grdb) fprintf(cp_err, "iplot: after 5, xlims = %G, %G, ylims = %G, %G\n", xlims[0], xlims[1], ylims[0], ylims[1]); for (yt = pl->pl_dvecs->v_type, v = pl->pl_dvecs->v_next; v; v = v->v_next) if ((v->v_flags & VF_PLOT) && (v->v_type != yt)) { yt = 0; break; } /* note: have command options for iplot to specify xdelta, etc. So don't need static variables hack. Assume default values for now. */ sprintf(commandline, "plot %s", yl); (void) gr_init(xlims, ylims, xs->v_name, pl->pl_title, NULL, j, 0.0, 0.0, GRID_LIN, PLOT_LIN, xs->v_name, yl, xs->v_type, yt, plot_cur->pl_typename, commandline); for (v = pl->pl_dvecs; v; v = v->v_next) if (v->v_flags & VF_PLOT) { gr_start_internal(v, FALSE); ft_graf(v, xs, TRUE); } inited = 1; } else { /* plot the last points and resize if needed */ Input(&reqst, 0); /* First see if we have to make the screen bigger */ dy = (isreal(xs) ? xs->v_realdata[len - 1] : realpart(xs->v_compdata[len - 1])); if (ft_grdb) fprintf(cp_err, "x = %G\n", dy); if (!if_tranparams(ft_curckt, &start, &stop, &step) || !ciprefix("tran", pl->pl_typename)) { stop = HUGE; start = - stop; } /* checking for x lo */ while (dy < currentgraph->data.xmin) { changed = TRUE; if (ft_grdb) fprintf(cp_err, "resize: xlo %G -> %G\n", currentgraph->data.xmin, currentgraph->data.xmin - (currentgraph->data.xmax - currentgraph->data.xmin) * XFACTOR); /* set the new x lo value */ currentgraph->data.xmin -= (currentgraph->data.xmax - currentgraph->data.xmin) * XFACTOR; if (currentgraph->data.xmin < start) { currentgraph->data.xmin = start; break; } } if (currentgraph->data.xmax < currentgraph->data.xmin) currentgraph->data.xmax = currentgraph->data.xmin; /* checking for x hi */ while (dy > currentgraph->data.xmax) { changed = TRUE; if (ft_grdb) fprintf(cp_err, "resize: xhi %G -> %G\n", currentgraph->data.xmax, currentgraph->data.xmax + (currentgraph->data.xmax - currentgraph->data.xmin) * XFACTOR); /* set the new x hi value */ currentgraph->data.xmax += (currentgraph->data.xmax - currentgraph->data.xmin) * XFACTOR; if (currentgraph->data.xmax > stop) { currentgraph->data.xmax = stop; break; } } /* checking for all y values */ for (v = pl->pl_dvecs; v; v = v->v_next) { if (!(v->v_flags & VF_PLOT)) continue; dy = (isreal(v) ? v->v_realdata[len - 1] : realpart(v->v_compdata[len - 1])); if (ft_grdb) fprintf(cp_err, "y = %G\n", dy); /* checking for y lo */ while (dy < currentgraph->data.ymin) { changed = TRUE; if (ft_grdb) fprintf(cp_err, "resize: ylo %G -> %G\n", currentgraph->data.ymin, currentgraph->data.ymin - (currentgraph->data.ymax - currentgraph->data.ymin) * YFACTOR); /* set the new y lo value */ currentgraph->data.ymin -= (currentgraph->data.ymax - currentgraph->data.ymin) * YFACTOR; /* currentgraph->data.ymin += (dy - currentgraph->data.ymin) * YFACTOR;*/ /* currentgraph->data.ymin = dy; currentgraph->data.ymin *= (1 + YFACTOR); */ } if (currentgraph->data.ymax < currentgraph->data.ymin) currentgraph->data.ymax = currentgraph->data.ymin; /* checking for y hi */ while (dy > currentgraph->data.ymax) { changed = TRUE; if (ft_grdb) fprintf(cp_err, "resize: yhi %G -> %G\n", currentgraph->data.ymax, currentgraph->data.ymax + (currentgraph->data.ymax - currentgraph->data.ymin) * YFACTOR); /* set the new y hi value */ currentgraph->data.ymax += (currentgraph->data.ymax - currentgraph->data.ymin) * YFACTOR; /* currentgraph->data.ymax += (dy - currentgraph->data.ymax) * YFACTOR;*/ /* currentgraph->data.ymax = dy; currentgraph->data.ymax *= (1 + YFACTOR); */ } } if (changed) { /* Redraw everything. */ gr_pmsg("Resizing screen"); gr_resize(currentgraph); #ifndef X_DISPLAY_MISSING gr_redraw(currentgraph); #endif } else { /* Just connect the last two points. This won't be done * with curve interpolation, so it might look funny. */ for (v = pl->pl_dvecs; v; v = v->v_next) if (v->v_flags & VF_PLOT) { gr_point(v, (isreal(xs) ? xs->v_realdata[len - 1] : realpart(xs->v_compdata[len - 1])), (isreal(v) ? v->v_realdata[len - 1] : realpart(v->v_compdata[len - 1])), (isreal(xs) ? xs->v_realdata[len - 2] : realpart(xs->v_compdata[len - 2])), (isreal(v) ? v->v_realdata[len - 2] : realpart(v->v_compdata[len - 2])), len - 1); } } } DevUpdate(); return (inited); } static void set(struct plot *plot, struct dbcomm *db, bool unset, short mode) { struct dvec *v; struct dbcomm *dc; if (db->db_type == DB_IPLOTALL || db->db_type == DB_TRACEALL) { for (v = plot->pl_dvecs; v; v = v->v_next) if (unset) v->v_flags &= (short) ~mode; else v->v_flags |= mode; return; } for (dc = db; dc; dc = dc->db_also) { v = vec_fromplot(dc->db_nodename1, plot); if (!v || v->v_plot != plot) { if (!eq(dc->db_nodename1, "0") && !unset) { fprintf(cp_err, "Warning: node %s non-existent in %s.\n", dc->db_nodename1, plot->pl_name); /* note: XXX remove it from dbs, so won't get further errors */ } continue; } if (unset) v->v_flags &= (short) ~mode; else v->v_flags |= mode; } } static char * getitright(char *buf, double num) { char *p; int k; sprintf(buf, " % .5g", num); p = strchr(buf, '.'); if (p) { return p - 4; } else { k = (int) strlen(buf); if (k > 8) return buf + 4; else /* k >= 4 */ return buf + k - 4; } } static int hit, hit2; void reset_trace(void) { hit = -1; hit2 = -1; } void gr_iplot(struct plot *plot) { struct dbcomm *db; int dontpop; /* So we don't pop w/o push. */ char buf[30]; hit = 0; for (db = dbs; db; db = db->db_next) { if (db->db_type == DB_IPLOT || db->db_type == DB_IPLOTALL) { if (db->db_graphid) PushGraphContext(FindGraph(db->db_graphid)); set(plot, db, FALSE, VF_PLOT); dontpop = 0; if (iplot(plot, db->db_graphid)) { /* graph just assigned */ db->db_graphid = currentgraph->graphid; dontpop = 1; } set(plot, db, TRUE, VF_PLOT); if (!dontpop && db->db_graphid) PopGraphContext(); } else if (db->db_type == DB_TRACENODE || db->db_type == DB_TRACEALL) { struct dvec *v, *u; int len; set(plot, db, FALSE, VF_PRINT); len = plot->pl_scale->v_length; dontpop = 0; for (v = plot->pl_dvecs; v; v = v->v_next) { if (v->v_flags & VF_PRINT) { u = plot->pl_scale; if (len <= 1 || hit <= 0 || hit2 < 0) { if (len <= 1 || hit2 < 0) term_clear(); else term_home(); hit = 1; hit2 = 1; printf( "\tExecution trace (remove with the \"delete\" command)"); term_cleol(); printf("\n"); if (u) { printf("%12s:", u->v_name); if (isreal(u)) { printf("%s", getitright(buf, u->v_realdata[len - 1])); } else { /* MW. Complex data here, realdata is NULL (why someone use realdata here again) */ printf("%s", getitright(buf, u->v_compdata[len - 1].cx_real)); printf(", %s", getitright(buf, u->v_compdata[len - 1].cx_imag)); } term_cleol(); printf("\n"); } } if (v == u) continue; printf("%12s:", v->v_name); if (isreal(v)) { printf("%s", getitright(buf, v->v_realdata[len - 1])); } else { /* MW. Complex data again */ printf("%s", getitright(buf, v->v_compdata[len - 1].cx_real)); printf(", %s", getitright(buf, v->v_compdata[len - 1].cx_imag)); } term_cleol(); printf("\n"); } } set(plot, db, TRUE, VF_PRINT); } } } /* This gets called after iplotting is done. We clear out the * db_graphid fields. Copy the dvecs, which we referenced by * reference, so DestroyGraph gets to free its own copy. * * Note: This is a clear case for separating the linestyle and color * fields from dvec. */ void gr_end_iplot(void) { struct dbcomm *db, *prev, *next; GRAPH *graph; struct dveclist *link; struct dvec *dv; prev = NULL; for (db = dbs; db; prev = db, db = next) { next = db->db_next; if (db->db_type == DB_DEADIPLOT) { if (db->db_graphid) { DestroyGraph(db->db_graphid); if (prev) prev->db_next = next; else ft_curckt->ci_dbs = dbs = next; dbfree(db); } } else if (db->db_type == DB_IPLOT || db->db_type == DB_IPLOTALL) { if (db->db_graphid) { /* get private copy of dvecs */ graph = FindGraph(db->db_graphid); link = graph->plotdata; while (link) { dv = link->vector; link->vector = vec_copy(dv); /* vec_copy doesn't set v_color or v_linestyle */ link->vector->v_color = dv->v_color; link->vector->v_linestyle = dv->v_linestyle; link->vector->v_flags |= VF_PERMANENT; link = link->next; } db->db_graphid = 0; } else { /* warn that this wasn't plotted */ fprintf(cp_err, "Warning: iplot %d was not executed.\n", db->db_number); } } } } double * readtics(char *string) { int k; char *words, *worde; double *tics, *ticsk; tics = TMALLOC(double, MAXTICS); ticsk = tics; words = string; for (k = 0; *words && k < MAXTICS; words = worde) { while (isspace(*words)) words++; worde = words; while (isalpha(*worde) || isdigit(*worde)) worde++; if (*worde) *worde++ = '\0'; sscanf(words, "%lf", ticsk++); k++; } *ticsk = HUGE; return (tics); } ngspice-26/src/frontend/plotting/plotting.c0000644000265600020320000000064512264261473020510 0ustar andreasadmin#include "ngspice/ngspice.h" #include "plotting.h" /* Where 'constants' go when defined on initialization. */ struct plot constantplot = { "Constant values", Spice_Build_Date, "constants", "const", NULL, NULL, NULL, NULL, NULL, NULL, NULL, TRUE, FALSE, 0 }; struct plot *plot_cur = &constantplot; struct plot *plot_list = &constantplot; int plotl_changed; /* TRUE after a load */ int plot_num = 1; ngspice-26/src/frontend/plotting/Makefile.am0000644000265600020320000000106012264261473020530 0ustar andreasadminnoinst_LTLIBRARIES = libplotting.la libplotting_la_SOURCES = \ plotting.c \ plotting.h \ agraf.c \ agraf.h \ clip.c \ clip.h \ gnuplot.c \ gnuplot.h \ graf.c \ graf.h \ graphdb.c \ graphdb.h \ grid.c \ pvec.c \ pvec.h \ plot5.c \ plot5.h \ plotcurv.c \ plotcurv.h \ plotit.c \ plotit.h if !NO_X libplotting_la_SOURCES += \ x11.c \ x11.h \ xgraph.c \ xgraph.h endif AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend @X_CFLAGS@ AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/plotting/gnuplot.c0000644000265600020320000002124112264261473020333 0ustar andreasadmin/********** * From xgraph.c: * Copyright 1992 Regents of the University of California. All rights reserved. * Author: 1992 David A. Gates, U. C. Berkeley CAD Group * * Author: 2008 Stefano Pedretti **********/ /* * gnuplot plots. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "gnuplot.h" #define GP_MAXVECTORS 64 void ft_gnuplot(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs) { FILE *file, *file_data; struct dvec *v, *scale = NULL; double xval, yval, extrange; int i, numVecs, linewidth, err, terminal_type; bool xlog, ylog, nogrid, markers; char buf[BSIZE_SP], pointstyle[BSIZE_SP], *text, plotstyle[BSIZE_SP], terminal[BSIZE_SP]; char filename_data[128]; char filename_plt[128]; sprintf(filename_data, "%s.data", filename); sprintf(filename_plt, "%s.plt", filename); /* Sanity checking. */ for (v = vecs, numVecs = 0; v; v = v->v_link2) numVecs++; if (numVecs == 0) { return; } else if (numVecs > GP_MAXVECTORS) { fprintf(cp_err, "Error: too many vectors for gnuplot.\n"); return; } if (fabs((ylims[1]-ylims[0])/ylims[0]) < 1.0e-6) { fprintf(cp_err, "Error: range min ... max too small for using gnuplot.\n"); fprintf(cp_err, " Consider plotting with offset %g.\n", ylims[0]); return; } extrange = 0.05 * (ylims[1] - ylims[0]); if (!cp_getvar("gnuplot_terminal", CP_STRING, terminal)) { terminal_type = 1; } else { terminal_type = 1; if (cieq(terminal,"png")) terminal_type = 2; } if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth)) linewidth = 1; if (linewidth < 1) linewidth = 1; if (!cp_getvar("pointstyle", CP_STRING, pointstyle)) { markers = FALSE; } else { if (cieq(pointstyle,"markers")) markers = TRUE; else markers = FALSE; } /* Make sure the gridtype is supported. */ switch (gridtype) { case GRID_LIN: nogrid = xlog = ylog = FALSE; break; case GRID_XLOG: xlog = TRUE; nogrid = ylog = FALSE; break; case GRID_YLOG: ylog = TRUE; nogrid = xlog = FALSE; break; case GRID_LOGLOG: xlog = ylog = TRUE; nogrid = FALSE; break; case GRID_NONE: nogrid = TRUE; xlog = ylog = FALSE; break; default: fprintf(cp_err, "Error: grid type unsupported by gnuplot.\n"); return; } /* Open the output gnuplot file. */ if ((file = fopen(filename_plt, "w")) == NULL) { perror(filename); return; } /* Set up the file header. */ #if !defined(__MINGW__) && !defined(_MSC_VER) fprintf(file, "set terminal X11\n"); #endif if (title) { text = cp_unquote(title); fprintf(file, "set title \"%s\"\n", text); tfree(text); } if (xlabel) { text = cp_unquote(xlabel); fprintf(file, "set xlabel \"%s\"\n", text); tfree(text); } if (ylabel) { text = cp_unquote(ylabel); fprintf(file, "set ylabel \"%s\"\n", text); tfree(text); } if (!nogrid) { if (linewidth > 1) fprintf(file, "set grid lw %d \n" , linewidth); else fprintf(file, "set grid\n"); } if (xlog) { fprintf(file, "set logscale x\n"); if (xlims) fprintf(file, "set xrange [%1.0e:%1.0e]\n", pow(10, floor(log10(xlims[0]))), pow(10, ceil(log10(xlims[1])))); fprintf(file, "set xrange [%e:%e]\n", xlims[0], xlims[1]); fprintf(file, "set mxtics 10\n"); fprintf(file, "set grid mxtics\n"); } else { fprintf(file, "unset logscale x \n"); if (xlims) fprintf(file, "set xrange [%e:%e]\n", xlims[0], xlims[1]); } if (ylog) { fprintf(file, "set logscale y \n"); if (ylims) fprintf(file, "set yrange [%1.0e:%1.0e]\n", pow(10, floor(log10(ylims[0]))), pow(10, ceil(log10(ylims[1])))); fprintf(file, "set mytics 10\n"); fprintf(file, "set grid mytics\n"); } else { fprintf(file, "unset logscale y \n"); if (ylims) fprintf(file, "set yrange [%e:%e]\n", ylims[0] - extrange, ylims[1] + extrange); } fprintf(file, "#set xtics 1\n"); fprintf(file, "#set x2tics 1\n"); fprintf(file, "#set ytics 1\n"); fprintf(file, "#set y2tics 1\n"); if (linewidth > 1) fprintf(file, "set border lw %d\n", linewidth); if (plottype == PLOT_COMB) { strcpy(plotstyle, "boxes"); } else if (plottype == PLOT_POINT) { if (markers) { // fprintf(file, "Markers: True\n"); } else { // fprintf(file, "LargePixels: True\n"); } strcpy(plotstyle, "points"); } else { strcpy(plotstyle, "lines"); } /* Open the output gnuplot data file. */ if ((file_data = fopen(filename_data, "w")) == NULL) { perror(filename); return; } fprintf(file, "set format y \"%%g\"\n"); fprintf(file, "set format x \"%%g\"\n"); fprintf(file, "plot "); i = 0; /* Write out the gnuplot command */ for (v = vecs; v; v = v->v_link2) { scale = v->v_scale; if (v->v_name) { i = i + 2; if (i > 2) fprintf(file, ",\\\n"); fprintf(file, "\'%s\' using %d:%d with %s lw %d title \"%s\" ", filename_data, i-1, i, plotstyle, linewidth, v->v_name); } } fprintf(file, "\n"); fprintf(file, "set terminal push\n"); if (terminal_type == 1) { fprintf(file, "set terminal postscript eps color\n"); fprintf(file, "set out \'%s.eps\'\n", filename); } else { fprintf(file, "set terminal png\n"); fprintf(file, "set out \'%s.png\'\n", filename); } fprintf(file, "replot\n"); fprintf(file, "set term pop\n"); fprintf(file, "replot\n"); (void) fclose(file); /* Write out the data and setup arrays */ for (i = 0; i < scale->v_length; i++) { for (v = vecs; v; v = v->v_link2) { scale = v->v_scale; xval = isreal(scale) ? scale->v_realdata[i] : realpart(scale->v_compdata[i]); yval = isreal(v) ? v->v_realdata[i] : realpart(v->v_compdata[i]); fprintf(file_data, "%e %e ", xval, yval); } fprintf(file_data, "\n"); } (void) fclose(file_data); #if defined(__MINGW32__) || defined(_MSC_VER) /* for external fcn system() */ // (void) sprintf(buf, "start /B wgnuplot %s -" , filename_plt); (void) sprintf(buf, "start /B wgnuplot -persist %s " , filename_plt); _flushall(); #else /* for external fcn system() from LINUX environment */ (void) sprintf(buf, "xterm -e gnuplot %s - &", filename_plt); #endif err = system(buf); } /* simple printout of data into a file, similar to data table in ft_gnuplot command: wrsimple file vecs */ void ft_writesimple(double *xlims, double *ylims, char *filename, char *title, char *xlabel, char *ylabel, GRIDTYPE gridtype, PLOTTYPE plottype, struct dvec *vecs) { FILE *file_data; struct dvec *v, *scale = NULL; double xval; int i, numVecs; bool appendwrite; char filename_data[128]; NG_IGNORE(xlims); NG_IGNORE(ylims); NG_IGNORE(title); NG_IGNORE(xlabel); NG_IGNORE(ylabel); NG_IGNORE(gridtype); NG_IGNORE(plottype); sprintf(filename_data, "%s.data", filename); appendwrite = cp_getvar("appendwrite", CP_BOOL, NULL); /* Sanity checking. */ for (v = vecs, numVecs = 0; v; v = v->v_link2) numVecs++; if (numVecs == 0) return; /* Open the output data file. */ if ((file_data = fopen(filename_data, appendwrite ? "a" : "w")) == NULL) { perror(filename); return; } i = 0; for (v = vecs; v; v = v->v_link2) scale = v->v_scale; /* Write out the data as simple arrays */ for (i = 0; i < scale->v_length; i++) { for (v = vecs; v; v = v->v_link2) { scale = v->v_scale; xval = isreal(scale) ? scale->v_realdata[i] : realpart(scale->v_compdata[i]); if (isreal(v)) fprintf(file_data, "% e % e ", xval, v->v_realdata[i]); else fprintf(file_data, "% e % e % e ", xval, realpart(v->v_compdata[i]), imagpart(v->v_compdata[i])); } fprintf(file_data, "\n"); } (void) fclose(file_data); } ngspice-26/src/frontend/plotting/Makefile.in0000644000265600020320000004301312264261534020543 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @NO_X_FALSE@am__append_1 = \ @NO_X_FALSE@ x11.c \ @NO_X_FALSE@ x11.h \ @NO_X_FALSE@ xgraph.c \ @NO_X_FALSE@ xgraph.h subdir = src/frontend/plotting DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libplotting_la_LIBADD = am__libplotting_la_SOURCES_DIST = plotting.c plotting.h agraf.c \ agraf.h clip.c clip.h gnuplot.c gnuplot.h graf.c graf.h \ graphdb.c graphdb.h grid.c pvec.c pvec.h plot5.c plot5.h \ plotcurv.c plotcurv.h plotit.c plotit.h x11.c x11.h xgraph.c \ xgraph.h @NO_X_FALSE@am__objects_1 = x11.lo xgraph.lo am_libplotting_la_OBJECTS = plotting.lo agraf.lo clip.lo gnuplot.lo \ graf.lo graphdb.lo grid.lo pvec.lo plot5.lo plotcurv.lo \ plotit.lo $(am__objects_1) libplotting_la_OBJECTS = $(am_libplotting_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libplotting_la_SOURCES) DIST_SOURCES = $(am__libplotting_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend @X_CFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libplotting.la libplotting_la_SOURCES = plotting.c plotting.h agraf.c agraf.h clip.c \ clip.h gnuplot.c gnuplot.h graf.c graf.h graphdb.c graphdb.h \ grid.c pvec.c pvec.h plot5.c plot5.h plotcurv.c plotcurv.h \ plotit.c plotit.h $(am__append_1) AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/plotting/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/plotting/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libplotting.la: $(libplotting_la_OBJECTS) $(libplotting_la_DEPENDENCIES) $(EXTRA_libplotting_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libplotting_la_OBJECTS) $(libplotting_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/agraf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clip.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnuplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/graphdb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/grid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plot5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plotcurv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plotit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plotting.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pvec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x11.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xgraph.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/plotting/plotcurv.h0000644000265600020320000000021612264261473020525 0ustar andreasadmin/************* * Header file for plotcurv.c * 1999 E. Rouat ************/ #ifndef ngspice_PLOTCURV_H #define ngspice_PLOTCURV_H #endif ngspice-26/src/frontend/plotting/pvec.h0000644000265600020320000000015512264261473017606 0ustar andreasadmin#ifndef ngspice_PVEC_H #define ngspice_PVEC_H #include "ngspice/dvec.h" void pvec(struct dvec *d); #endif ngspice-26/src/frontend/plotting/x11.h0000644000265600020320000000127712264261473017270 0ustar andreasadmin/************* * Header file for x11.c * 1999 E. Rouat ************/ #ifndef ngspice_X11_H #define ngspice_X11_H #ifndef X_DISPLAY_MISSING disp_fn_Init_t X11_Init; disp_fn_NewViewport_t X11_NewViewport; disp_fn_Close_t X11_Close; disp_fn_DrawLine_t X11_DrawLine; disp_fn_Arc_t X11_Arc; disp_fn_Text_t X11_Text; disp_fn_DefineColor_t X11_DefineColor; disp_fn_DefineLinestyle_t X11_DefineLinestyle; disp_fn_SetLinestyle_t X11_SetLinestyle; disp_fn_SetColor_t X11_SetColor; disp_fn_Update_t X11_Update; disp_fn_Clear_t X11_Clear; int X11_Input(REQUEST *request, RESPONSE *response); #endif #endif ngspice-26/src/frontend/plotting/graphdb.h0000644000265600020320000000043712264261473020263 0ustar andreasadmin/************* * Header file for graphdb.c * 1999 E. Rouat ************/ #ifndef ngspice_GRAPHDB_H #define ngspice_GRAPHDB_H int DestroyGraph(int id); void FreeGraphs(void); void SetGraphContext(int graphid); void PushGraphContext(GRAPH *graph); void PopGraphContext(void); #endif ngspice-26/src/frontend/plotting/grid.c0000644000265600020320000014051012264261473017571 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Modified: 2001 AlansFixes **********/ /* Routines to draw the various sorts of grids -- linear, log, polar. */ #include "ngspice/ngspice.h" #include "ngspice/graph.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/grid.h" #include "../display.h" #define RAD_TO_DEG (180.0 / M_PI) #define LABEL_CHARS 20 typedef enum { x_axis, y_axis } Axis; static double *lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis); static double *loggrid(GRAPH *graph, double lo, double hi, int type, Axis axis); static void polargrid(GRAPH *graph); static void drawpolargrid(GRAPH *graph); static void adddeglabel(GRAPH *graph, int deg, int x, int y, int cx, int cy, int lx, int ly); static void addradlabel(GRAPH *graph, int lab, double theta, int x, int y); static void smithgrid(GRAPH *graph); static void drawsmithgrid(GRAPH *graph); static void arcset(GRAPH *graph, double rad, double prevrad, double irad, double iprevrad, double radoff, int maxrad, int centx, int centy, int xoffset, int yoffset, char *plab, char *nlab, int pdeg, int ndeg, int pxmin, int pxmax); static double cliparc(double cx, double cy, double rad, double start, double end, int iclipx, int iclipy, int icliprad, int flag); static void drawlingrid(GRAPH *graph, char *units, int spacing, int nsp, double dst, double lmt, double hmt, bool onedec, int mult, double mag, int digits, Axis axis); static void drawloggrid(GRAPH *graph, char *units, int hmt, int lmt, int decsp, int subs, int pp, Axis axis); /* note: scaleunits is static and never changed in this file ie, can get rid of it */ static bool scaleunits = TRUE; void gr_fixgrid(GRAPH *graph, double xdelta, double ydelta, int xtype, int ytype) { double *dd; if (graph->grid.gridtype == GRID_NONE) graph->grid.gridtype = GRID_LIN; SetColor(1); SetLinestyle(1); if ((graph->data.xmin > graph->data.xmax) || (graph->data.ymin > graph->data.ymax)) { fprintf(cp_err, "gr_fixgrid: Internal Error - bad limits: %g, %g, %g, %g\n", graph->data.xmin, graph->data.xmax, graph->data.ymin, graph->data.ymax); return; } if (graph->grid.gridtype == GRID_POLAR) { graph->grid.circular = TRUE; polargrid(graph); return; } else if (graph->grid.gridtype == GRID_SMITH || graph->grid.gridtype == GRID_SMITHGRID) { graph->grid.circular = TRUE; smithgrid(graph); return; } graph->grid.circular = FALSE; if ((graph->grid.gridtype == GRID_YLOG) || (graph->grid.gridtype == GRID_LOGLOG)) { dd = loggrid(graph, graph->data.ymin, graph->data.ymax, ytype, y_axis); } else { dd = lingrid(graph, graph->data.ymin, graph->data.ymax, ydelta, ytype, y_axis); } graph->datawindow.ymin = dd[0]; graph->datawindow.ymax = dd[1]; if ((graph->grid.gridtype == GRID_XLOG) || (graph->grid.gridtype == GRID_LOGLOG)) { dd = loggrid(graph, graph->data.xmin, graph->data.xmax, xtype, x_axis); } else { dd = lingrid(graph, graph->data.xmin, graph->data.xmax, xdelta, xtype, x_axis); } graph->datawindow.xmin = dd[0]; graph->datawindow.xmax = dd[1]; /* do we really need this? */ /* SetLinestyle(0); DevDrawLine(graph->viewportxoff, graph->viewportyoff, graph->viewport.width + graph->viewportxoff, graph->viewportyoff); DevDrawLine(graph->viewportxoff, graph->viewportyoff, graph->viewportxoff, graph->viewport.height + graph->viewportyoff); SetLinestyle(1); */ } void gr_redrawgrid(GRAPH *graph) { SetColor(1); SetLinestyle(1); /* draw labels */ if (graph->grid.xlabel) { DevDrawText(graph->grid.xlabel, (int) (graph->absolute.width * 0.35), graph->fontheight); } if (graph->grid.ylabel) { if (graph->grid.gridtype == GRID_POLAR || graph->grid.gridtype == GRID_SMITH || graph->grid.gridtype == GRID_SMITHGRID) { DevDrawText(graph->grid.ylabel, graph->fontwidth, (graph->absolute.height * 3) / 4); } else { DevDrawText(graph->grid.ylabel, graph->fontwidth, graph->absolute.height / 2); } } switch (graph->grid.gridtype) { case GRID_POLAR: drawpolargrid(graph); break; case GRID_SMITH: drawsmithgrid(graph); break; case GRID_SMITHGRID: drawsmithgrid(graph); break; case GRID_XLOG: case GRID_LOGLOG: drawloggrid(graph, graph->grid.xaxis.log.units, graph->grid.xaxis.log.hmt, graph->grid.xaxis.log.lmt, graph->grid.xaxis.log.decsp, graph->grid.xaxis.log.subs, graph->grid.xaxis.log.pp, x_axis); break; default: drawlingrid(graph, graph->grid.xaxis.lin.units, graph->grid.xaxis.lin.spacing, graph->grid.xaxis.lin.numspace, graph->grid.xaxis.lin.distance, graph->grid.xaxis.lin.lowlimit, graph->grid.xaxis.lin.highlimit, graph->grid.xaxis.lin.onedec, graph->grid.xaxis.lin.mult, graph->grid.xaxis.lin.tenpowmag / graph->grid.xaxis.lin.tenpowmagx, graph->grid.xaxis.lin.digits, x_axis); break; } switch (graph->grid.gridtype) { case GRID_POLAR: case GRID_SMITH: case GRID_SMITHGRID: break; case GRID_YLOG: case GRID_LOGLOG: drawloggrid(graph, graph->grid.yaxis.log.units, graph->grid.yaxis.log.hmt, graph->grid.yaxis.log.lmt, graph->grid.yaxis.log.decsp, graph->grid.yaxis.log.subs, graph->grid.yaxis.log.pp, y_axis); break; default: drawlingrid(graph, graph->grid.yaxis.lin.units, graph->grid.yaxis.lin.spacing, graph->grid.yaxis.lin.numspace, graph->grid.yaxis.lin.distance, graph->grid.yaxis.lin.lowlimit, graph->grid.yaxis.lin.highlimit, graph->grid.yaxis.lin.onedec, graph->grid.yaxis.lin.mult, graph->grid.yaxis.lin.tenpowmag / graph->grid.yaxis.lin.tenpowmagx, graph->grid.yaxis.lin.digits, y_axis); break; } } /* Plot a linear grid. Returns the new hi and lo limits. */ static double * lingrid(GRAPH *graph, double lo, double hi, double delta, int type, Axis axis) { int mag, mag2, mag3; double hmt, lmt, dst; int nsp; double tenpowmag = 0.0, tenpowmag2, spacing; bool onedec = FALSE; int margin; int max; static double dd[2]; int mult = 1; char buf[LABEL_CHARS], *s; int slim, digits; if (axis == y_axis && graph->grid.ysized) { lmt = graph->grid.yaxis.lin.lowlimit; hmt = graph->grid.yaxis.lin.highlimit; tenpowmag = graph->grid.yaxis.lin.tenpowmag; dd[0] = lmt * tenpowmag; dd[1] = hmt * tenpowmag; return dd; } if (axis == x_axis && graph->grid.xsized) { lmt = graph->grid.xaxis.lin.lowlimit; hmt = graph->grid.xaxis.lin.highlimit; tenpowmag = graph->grid.xaxis.lin.tenpowmag; dd[0] = lmt * tenpowmag; dd[1] = hmt * tenpowmag; return dd; } if (delta < 0.0) { fprintf(cp_err, "Warning: %cdelta is negative -- reversed\n", (axis == x_axis) ? 'x' : 'y'); delta = -delta; } mag2 = (int)floor(log10(fabs(hi - lo))); tenpowmag2 = pow(10.0, (double) mag2); /* Round lo down, and hi up */ /* First, round lo _up_ and hi _down_ out to the 3rd digit of accuracy */ lmt = (ceil(1000 * lo / tenpowmag2)) / 1000.0; hmt = (floor(1000 * hi / tenpowmag2 + 0.9)) / 1000.0; lmt = floor(10.0 * lmt) / 10.0; hmt = ceil(10.0 * hmt) / 10.0; lo = lmt * tenpowmag2; hi = hmt * tenpowmag2; if (fabs(hi) > fabs(lo)) mag = (int)floor(log10(fabs(hi))); else mag = (int)floor(log10(fabs(lo))); if (mag >= 0) mag3 = ((int) (mag / 3)) * 3; else mag3 = - ((int) ((2 - mag) / 3)) * 3; if (scaleunits) { digits = mag3 - mag2; } else { digits = mag - mag2; mag3 = mag; } if (digits < 1) digits = 0; if (digits > 15) { dd[0] = 1; dd[1] = 1; fprintf(cp_err, "Error: Plot resolution limit of 15 digits exceeded.\n"); fprintf(cp_err, " Consider plotting with offset.\n"); return dd; } if (axis == x_axis) { margin = graph->viewportxoff; /*max = graph->viewport.width + graph->viewportxoff;*/ max = graph->absolute.width - graph->viewportxoff; } else { graph->viewportxoff = (digits + 5 + mag - mag3) * graph->fontwidth; margin = graph->viewportyoff; /*max = graph->viewport.height + graph->viewportyoff;*/ max = graph->absolute.height - graph->viewportyoff; } /* Express the difference between the high and low values as * diff = d * 10^mag. We know diff >= 0.0. If scaleunits is * set then make sure that mag is modulo 3. */ dst = hmt - lmt; /* We have to go from lmt to hmt, so think of some useful places * to put grid lines. We will have a total of nsp lines, one * every spacing pixels, which is every dst / nsp units. */ if (scaleunits) { static char scaleletters[ ] = "afpnum\0kMGT"; char *p; int i, j; tenpowmag = pow(10.0, (double) mag3); i = (mag3 + 18) / 3; if (i < 0) i = 6; /* No scale units */ else if (i >= (int) sizeof(scaleletters) - 1) { /* sizeof includes '\0' at end, which is useless */ /* i = sizeof(scaleletters) - 2; */ i = 6; /* No scale units */ } j = mag3 - i * 3 + 18; if (j == 1) (void) sprintf(buf, "x10 "); else if (j == 2) (void) sprintf(buf, "x100 "); else if (j) (void) snprintf(buf, sizeof(buf) - 1, "x10^%d ", j); else buf[0] = '\0'; if (scaleletters[i]) { for (p = buf; *p; p++) ; *p++ = scaleletters[i]; *p++ = '\0'; } } else if (mag > 1) { tenpowmag = pow(10.0, (double) mag); (void) snprintf(buf, sizeof(buf), "x10^%d ", mag); } else { buf[0] = '\0'; } if ((s = ft_typabbrev(type)) != NULL) (void) strncat(buf, s, sizeof(buf) - 1); else (void) strncat(buf, "Units", sizeof(buf) - 1); if (delta == 0.0) { int i; double step; static struct { double div_lim, step; } div_list[] = { { 100.0, 10.0 }, { 50.0, 5.0 }, { 20.0, 2.0 }, { 6.0, 1.0 }, { 3.0, 0.5 }, { 1.0, 0.2 }, { 0.5, 0.1 }, { 0.0, 0.05 }, { 0.0, 0.01 } }; for (i = 0; (size_t) i < NUMELEMS(div_list); i++) if (dst > div_list[i].div_lim) break; if ((size_t) i == NUMELEMS(div_list)) i--; do { step = div_list[i].step; nsp = (int)((dst + step - 0.0001) / step); spacing = (max - margin) / nsp; i += 1; } while ((size_t) i < NUMELEMS(div_list) && spacing > 50); if (axis == x_axis) { slim = digits + 5 + mag - mag3; slim = graph->fontwidth * (slim + 1); } else { slim = graph->fontheight * 3; } while (i > 0 && spacing < slim + 3) { i -= 1; step = div_list[i].step; nsp = (int)((dst + step - 0.0001) / step); spacing = (max - margin) / nsp; } if (lmt < 0) lmt = - ceil(-lmt / step) * step; else lmt = floor(lmt / step) * step; if (hmt < 0) hmt = - floor(-hmt / step) * step; else hmt = ceil(hmt / step) * step; dst = hmt - lmt; lo = lmt * tenpowmag2; hi = hmt * tenpowmag2; nsp = (int)((dst + step - 0.0001) / step); } else { /* The user told us where to put the grid lines. They will * not be equally spaced in this case (i.e, the right edge * won't be a line). */ nsp = (int)((hi - lo) / delta); if (nsp > 100) nsp = 100; } spacing = (max - margin) / nsp; dd[0] = lo; dd[1] = hi; /* Reset the max coordinate to deal with round-off error. */ if (nsp && (delta == 0.0)) { if (axis == x_axis) graph->viewport.width = (int)(spacing * nsp); else graph->viewport.height = (int)(spacing * nsp); } else if (!nsp) { nsp = 1; } /* have to save non-intuitive variables left over from old algorithms for redraws */ if (axis == x_axis) { graph->grid.xsized = 1; graph->grid.xaxis.lin.onedec = onedec; graph->grid.xaxis.lin.mult = mult; graph->grid.xaxis.lin.tenpowmag = tenpowmag2; graph->grid.xaxis.lin.tenpowmagx = tenpowmag; graph->grid.xaxis.lin.digits = digits; (void) strcpy(graph->grid.xaxis.lin.units, buf); graph->grid.xaxis.lin.distance = dst; graph->grid.xaxis.lin.lowlimit = lmt; graph->grid.xaxis.lin.highlimit = hmt; graph->grid.xaxis.lin.spacing = (int)spacing; graph->grid.xaxis.lin.numspace = nsp; } else { graph->grid.ysized = 1; graph->grid.yaxis.lin.onedec = onedec; graph->grid.yaxis.lin.mult = mult; graph->grid.yaxis.lin.tenpowmag = tenpowmag2; graph->grid.yaxis.lin.tenpowmagx = tenpowmag; graph->grid.yaxis.lin.digits = digits; (void) strcpy(graph->grid.yaxis.lin.units, buf); graph->grid.yaxis.lin.distance = dst; graph->grid.yaxis.lin.lowlimit = lmt; graph->grid.yaxis.lin.highlimit = hmt; graph->grid.yaxis.lin.spacing = (int)spacing; graph->grid.yaxis.lin.numspace = nsp; } return (dd); } /* PN static */ void drawlingrid(GRAPH *graph, char *units, int spacing, int nsp, double dst, double lmt, double hmt, bool onedec, int mult, double mag, int digits, Axis axis) { int i, j; double m, step; char buf[LABEL_CHARS]; NG_IGNORE(onedec); NG_IGNORE(mult); /* i counts how many pixels we have drawn, and j counts which unit * we are at. */ SetLinestyle(1); step = floor((double) dst / nsp * 100.0 + 0.000001); for (i = 0, m = lmt * 100.0; m - 0.001 <= hmt * 100.0; i += spacing, m += step) { j = (int)m; if (j == 0) SetLinestyle(0); if (graph->grid.gridtype != GRID_NONE) { if (axis == x_axis) DevDrawLine(graph->viewportxoff + i, graph->viewportyoff, graph->viewportxoff + i, graph->viewport.height + graph->viewportyoff); else DevDrawLine(graph->viewportxoff, graph->viewportyoff + i, graph->viewport.width + graph->viewportxoff, graph->viewportyoff + i); } if (j == 0) SetLinestyle(1); (void) sprintf(buf, "%.*f", digits + 1, m * mag / 100.0); if (axis == x_axis) DevDrawText(buf, graph->viewportxoff + i - ((int) strlen(buf) * graph->fontwidth) / 2, (int) (graph->fontheight * 2.5)); else DevDrawText(buf, graph->viewportxoff - graph->fontwidth * (int) strlen(buf), graph->viewportyoff + i - graph->fontheight / 2); /* This is to make sure things work when delta > hi - lo. */ if (nsp == 1) j += 1000; } if (axis == x_axis) DevDrawText(units, (int) (graph->absolute.width * 0.6), graph->fontheight); else DevDrawText(units, graph->fontwidth, (int) (graph->absolute.height - 2 * graph->fontheight)); DevUpdate(); } /* Plot a log grid. Note that we pay no attention to x- and y-delta here. */ static double * loggrid(GRAPH *graph, double lo, double hi, int type, Axis axis) { static double dd[2]; int margin; int max; int subs, pp, decsp, lmt, hmt; int i, j; double k; double decs; char buf[LABEL_CHARS], *s; if (axis == x_axis && graph->grid.xsized) { lmt = graph->grid.xaxis.log.lmt; hmt = graph->grid.xaxis.log.hmt; dd[0] = pow(10.0, (double) lmt); dd[1] = pow(10.0, (double) hmt); return dd; } else if (axis == y_axis && graph->grid.ysized) { lmt = graph->grid.yaxis.log.lmt; hmt = graph->grid.yaxis.log.hmt; dd[0] = pow(10.0, (double) lmt); dd[1] = pow(10.0, (double) hmt); return dd; } if (axis == x_axis) { margin = graph->viewportxoff; max = graph->absolute.width - graph->viewportxoff; } else { margin = graph->viewportyoff; max = graph->absolute.height - graph->viewportyoff; } /* How many orders of magnitude. We are already guaranteed that hi * and lo are positive. */ lmt = (int)floor(mylog10(lo)); hmt = (int)ceil(mylog10(hi)); decs = hmt - lmt; pp = 1; decsp = (int)((max - margin) / decs); if (decsp < 20) { pp = (int)ceil(20.0 / decsp); decsp *= pp; subs = 1; } else if (decsp > 50) { static int divs[ ] = { 20, 10, 5, 4, 2, 1 }; k = 5.0 / decsp; for (i = 0; (size_t) i < NUMELEMS(divs) - 1; i++) { j = divs[i]; if (-log10(((double) j - 1.0) / j) > k) break; } subs = divs[i]; } else { subs = 1; } /* Start at a line */ lmt = (int)(floor((double) lmt / pp) * pp); decs = hmt - lmt; decsp = (int)((max - margin) / decs); dd[0] = pow(10.0, (double) lmt); dd[1] = pow(10.0, (double) hmt); if ((s = ft_typabbrev(type)) != NULL) (void) strcpy(buf, s); else (void) strcpy(buf, "Units"); if (axis == x_axis) { (void) strcpy(graph->grid.xaxis.log.units, buf); graph->viewport.width = (int)(decs * decsp); graph->grid.xaxis.log.hmt = hmt; graph->grid.xaxis.log.lmt = lmt; graph->grid.xaxis.log.decsp = decsp; graph->grid.xaxis.log.subs = subs; graph->grid.xaxis.log.pp = pp; graph->grid.xsized = 1; } else { (void) strcpy(graph->grid.yaxis.log.units, buf); graph->viewport.height = (int)(decs * decsp); graph->grid.yaxis.log.hmt = hmt; graph->grid.yaxis.log.lmt = lmt; graph->grid.yaxis.log.decsp = decsp; graph->grid.yaxis.log.subs = subs; graph->grid.yaxis.log.pp = pp; graph->grid.ysized = 1; } return (dd); } /* PN static */ void drawloggrid(GRAPH *graph, char *units, int hmt, int lmt, int decsp, int subs, int pp, Axis axis) { int i, j, k, m; double t; char buf[LABEL_CHARS]; /* Now plot every pp'th decade line, with subs lines between them. */ if (subs > 1) SetLinestyle(0); for (i = 0, j = lmt; j <= hmt; i += decsp * pp, j += pp) { /* Draw the decade line */ if (graph->grid.gridtype != GRID_NONE) { if (axis == x_axis) DevDrawLine(graph->viewportxoff + i, graph->viewportyoff, graph->viewportxoff + i, graph->viewport.height +graph->viewportyoff); else DevDrawLine(graph->viewportxoff, graph->viewportyoff + i, graph->viewport.width + graph->viewportxoff, graph->viewportyoff + i); } if (j == -2) (void) sprintf(buf, "0.01"); else if (j == -1) (void) sprintf(buf, "0.1"); else if (j == 0) (void) sprintf(buf, "1"); else if (j == 1) (void) sprintf(buf, "10"); else if (j == 2) (void) sprintf(buf, "100"); else (void) sprintf(buf, "10^%d", j); if (axis == x_axis) DevDrawText(buf, graph->viewportxoff + i - ((int) strlen(buf) * graph->fontwidth) / 2, (int) (graph->fontheight * 2.5)); else DevDrawText(buf, graph->viewportxoff - graph->fontwidth * (int) (strlen(buf) + 1), graph->viewportyoff + i - graph->fontheight / 2); if (j >= hmt) break; /* Now draw the subdivision lines */ if (subs > 1) { SetLinestyle(1); t = 10.0 / subs; for (k = (int)ceil(subs / 10.0) + 1; k < subs; k++) { m = (int)(i + decsp * log10((double) t * k)); if (graph->grid.gridtype != GRID_NONE) { if (axis == x_axis) DevDrawLine(graph->viewportxoff + m, graph->viewportyoff, graph->viewportxoff + m, graph->viewport.height + graph->viewportyoff); else DevDrawLine(graph->viewportxoff, graph->viewportyoff + m, graph->viewport.width + graph->viewportxoff, graph->viewportyoff + m); } } SetLinestyle(0); } } if (axis == x_axis) DevDrawText(units, (int) (graph->absolute.width * 0.6), graph->fontheight); else DevDrawText(units, graph->fontwidth, (int) (graph->absolute.height - 2 * graph->fontheight)); DevUpdate(); } /* Polar grids */ static void polargrid(GRAPH *graph) { double d, mx, my, tenpowmag; int hmt, lmt, mag; double minrad, maxrad; /* Make sure that our area is square. */ if (graph->viewport.width > graph->viewport.height) graph->viewport.width = graph->viewport.height; else graph->viewport.height = graph->viewport.width; /* Make sure that the borders are even */ if (graph->viewport.width & 1) { graph->viewport.width += 1; graph->viewport.height += 1; } graph->grid.xaxis.circular.center = graph->viewport.width / 2 + graph->viewportxoff; graph->grid.yaxis.circular.center = graph->viewport.height / 2 + graph->viewportyoff; graph->grid.xaxis.circular.radius = graph->viewport.width / 2; /* Figure out the minimum and maximum radii we're dealing with. */ mx = (graph->data.xmin + graph->data.xmax) / 2; my = (graph->data.ymin + graph->data.ymax) / 2; d = sqrt(mx * mx + my * my); maxrad = d + (graph->data.xmax - graph->data.xmin) / 2; minrad = d - (graph->data.xmax - graph->data.xmin) / 2; if (maxrad == 0.0) { fprintf(cp_err, "Error: 0 radius in polargrid\n"); return; } if ((graph->data.xmin < 0) && (graph->data.ymin < 0) && (graph->data.xmax > 0) && (graph->data.ymax > 0)) minrad = 0; mag = (int)floor(mylog10(maxrad)); tenpowmag = pow(10.0, (double) mag); hmt = (int)(maxrad / tenpowmag); lmt = (int)(minrad / tenpowmag); if (hmt * tenpowmag < maxrad) hmt++; if (lmt * tenpowmag > minrad) lmt--; maxrad = hmt * tenpowmag; minrad = lmt * tenpowmag; /* Make sure that the range is square */ mx = graph->data.xmax - graph->data.xmin; my = graph->data.ymax - graph->data.ymin; graph->datawindow.xmin = graph->data.xmin; graph->datawindow.xmax = graph->data.xmax; graph->datawindow.ymin = graph->data.ymin; graph->datawindow.ymax = graph->data.ymax; if (mx > my) { graph->datawindow.ymin -= (mx - my) / 2; graph->datawindow.ymax += (mx - my) / 2; } else if (mx < my) { graph->datawindow.xmin -= (my - mx) / 2; graph->datawindow.xmax += (my - mx) / 2; } /* Range is square with upper bound maxrad */ graph->grid.xaxis.circular.hmt = hmt; graph->grid.xaxis.circular.lmt = lmt; graph->grid.xaxis.circular.mag = mag; } static void drawpolargrid(GRAPH *graph) { double tenpowmag, theta; int hmt, lmt, i, step, mag; int relcx, relcy, relrad, dist, degs; int x1, y1, x2, y2; double minrad, pixperunit; char buf[64]; hmt = graph->grid.xaxis.circular.hmt; lmt = graph->grid.xaxis.circular.lmt; mag = graph->grid.xaxis.circular.mag; tenpowmag = pow(10.0, (double) mag); minrad = lmt * tenpowmag; if ((minrad == 0) && ((hmt - lmt) > 5)) { if (!((hmt - lmt) % 2)) step = 2; else if (!((hmt - lmt) % 3)) step = 3; else step = 1; } else { step = 1; } pixperunit = graph->grid.xaxis.circular.radius * 2 / (graph->datawindow.xmax - graph->datawindow.xmin); relcx = - (int)((graph->datawindow.xmin + graph->datawindow.xmax) / 2 * pixperunit); relcy = - (int)((graph->datawindow.ymin + graph->datawindow.ymax) / 2 * pixperunit); /* The distance from the center of the plotting area to the center of * the logical area. */ dist = (int)sqrt((double) (relcx * relcx + relcy * relcy)); SetLinestyle(0); DevDrawArc(graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center, graph->grid.xaxis.circular.radius, 0.0, 2*M_PI); SetLinestyle(1); /* Now draw the circles. */ for (i = lmt; (relrad = (int)(i * tenpowmag * pixperunit)) <= dist + graph->grid.xaxis.circular.radius; i += step) { cliparc((double) graph->grid.xaxis.circular.center + relcx, (double) graph->grid.yaxis.circular.center + relcy, (double) relrad, 0.0, 2*M_PI, graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center, graph->grid.xaxis.circular.radius, 0); /* Toss on the label */ if (relcx || relcy) theta = atan2((double) relcy, (double) relcx); else theta = M_PI; if (i && (relrad > dist - graph->grid.xaxis.circular.radius)) addradlabel(graph, i, theta, (int) (graph->grid.xaxis.circular.center - (relrad - dist) * cos(theta)), (int) (graph->grid.yaxis.circular.center - (relrad - dist) * sin(theta))); } /* Now draw the spokes. We have two possible cases -- first, the * origin may be inside the area -- in this case draw 12 spokes. * Otherwise, draw several spokes at convenient places. */ if ((graph->datawindow.xmin <= 0.0) && (graph->datawindow.xmax >= 0.0) && (graph->datawindow.ymin <= 0.0) && (graph->datawindow.ymax >= 0.0)) { for (i = 0; i < 12; i++) { x1 = graph->grid.xaxis.circular.center + relcx; y1 = graph->grid.yaxis.circular.center + relcy; x2 = (int)(x1 + graph->grid.xaxis.circular.radius * 2 * cos(i * M_PI / 6)); y2 = (int)(y1 + graph->grid.xaxis.circular.radius * 2 * sin(i * M_PI / 6)); if (!clip_to_circle(&x1, &y1, &x2, &y2, graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center, graph->grid.xaxis.circular.radius)) { DevDrawLine(x1, y1, x2, y2); /* Add a label here */ /*XXXX*/ adddeglabel(graph, i * 30, x2, y2, x1, y1, graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center); } } } else { /* Figure out the angle that we have to fill up */ theta = 2 * asin((double) graph->grid.xaxis.circular.radius / dist); theta = theta * 180 / M_PI; /* Convert to degrees. */ /* See if we should put lines at 30, 15, 5, or 1 degree * increments. */ if (theta / 30 > 3) degs = 30; else if (theta / 15 > 3) degs = 15; else if (theta / 5 > 3) degs = 5; else degs = 1; /* We'll be cheap */ for (i = 0; i < 360; i += degs) { x1 = graph->grid.xaxis.circular.center + relcx; y1 = graph->grid.yaxis.circular.center + relcy; x2 = (int)(x1 + dist * 2 * cos(i * M_PI / 180)); y2 = (int)(y1 + dist * 2 * sin(i * M_PI / 180)); if (!clip_to_circle(&x1, &y1, &x2, &y2, graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center, graph->grid.xaxis.circular.radius)) { DevDrawLine(x1, y1, x2, y2); /* Put on the label */ adddeglabel(graph, i, x2, y2, x1, y1, graph->grid.xaxis.circular.center, graph->grid.yaxis.circular.center); } } } (void) sprintf(buf, "e%d", mag); DevDrawText(buf, graph->grid.xaxis.circular.center + graph->grid.xaxis.circular.radius, graph->grid.yaxis.circular.center - graph->grid.xaxis.circular.radius); DevUpdate(); } /* Put a degree label on the screen, with 'deg' as the label, near point (x, y) * such that the perpendicular to (cx, cy) and (x, y) doesn't overwrite the * label. If the distance between the center and the point is * too small, don't put the label on. */ #define LOFF 5 #define MINDIST 10 static void adddeglabel(GRAPH *graph, int deg, int x, int y, int cx, int cy, int lx, int ly) { char buf[8]; int d, w, h; double angle; if (sqrt((double) (x - cx) * (x - cx) + (y - cy) * (y - cy)) < MINDIST) return; (void) sprintf(buf, "%d", deg); w = graph->fontwidth * (int) (strlen(buf) + 1); h = (int)(graph->fontheight * 1.5); angle = atan2((double) (y - ly), (double) (x - lx)); d = (int)(fabs(cos(angle)) * w / 2 + fabs(sin(angle)) * h / 2 + LOFF); x = (int)(x + d * cos(angle) - w / 2); y = (int)(y + d * sin(angle) - h / 2); DevDrawText(buf, x, y); DevDrawText("o", x + (int) strlen(buf) * graph->fontwidth, y + graph->fontheight / 2); } /* This is kind of wierd. If dist = 0, then this is the normal case, where * the labels should go along the positive X-axis. Otherwise, to make * sure that all circles drawn have labels, put the label near the circle * along the line from the logical center to the physical center. */ static void addradlabel(GRAPH *graph, int lab, double theta, int x, int y) { char buf[32]; (void) sprintf(buf, "%d", lab); if (theta == M_PI) { y -= graph->fontheight + 2; x -= graph->fontwidth * (int) strlen(buf) + 3; } else { x -= graph->fontwidth * (int) strlen(buf) + 3; } DevDrawText(buf, x, y); } /* Smith charts. */ #define gr_xcenter graph->grid.xaxis.circular.center #define gr_ycenter graph->grid.yaxis.circular.center #define gr_radius graph->grid.xaxis.circular.radius #define gi_fntwidth graph->fontwidth #define gi_fntheight graph->fontheight #define gi_maxx graph->viewport.width+graph->viewportxoff #define gr_xmargin graph->viewportxoff #define gr_ymargin graph->viewportyoff static void smithgrid(GRAPH *graph) { double mx, my; SetLinestyle(0); /* Make sure that our area is square. */ if (graph->viewport.width > graph->viewport.height) graph->viewport.width = graph->viewport.height; else graph->viewport.height = graph->viewport.width; /* Make sure that the borders are even */ if (graph->viewport.width & 1) { graph->viewport.width += 1; graph->viewport.height += 1; } graph->grid.xaxis.circular.center = graph->viewport.width / 2 + graph->viewportxoff; graph->grid.yaxis.circular.center = graph->viewport.height / 2 + graph->viewportyoff; graph->grid.xaxis.circular.radius = graph->viewport.width / 2; /* We have to make sure that the range is square. */ graph->datawindow.xmin = graph->data.xmin; graph->datawindow.xmax = graph->data.xmax; graph->datawindow.ymin = graph->data.ymin; graph->datawindow.ymax = graph->data.ymax; if (graph->datawindow.ymin > 0) graph->datawindow.ymin *= -1; if (graph->datawindow.xmin > 0) graph->datawindow.xmin *= -1; if (graph->datawindow.ymax < 0) graph->datawindow.ymax *= -1; if (graph->datawindow.xmax < 0) graph->datawindow.xmax *= -1; if (fabs(graph->datawindow.ymin) > fabs(graph->datawindow.ymax)) graph->datawindow.ymax = - graph->datawindow.ymin; else graph->datawindow.ymin = - graph->datawindow.ymax; if (fabs(graph->datawindow.xmin) > fabs(graph->datawindow.xmax)) graph->datawindow.xmax = - graph->datawindow.xmin; else graph->datawindow.xmin = - graph->datawindow.xmax; mx = graph->datawindow.xmax - graph->datawindow.xmin; my = graph->datawindow.ymax - graph->datawindow.ymin; if (mx > my) { graph->datawindow.ymin -= (mx - my) / 2; graph->datawindow.ymax += (mx - my) / 2; } else if (mx < my) { graph->datawindow.xmin -= (my - mx) / 2; graph->datawindow.xmax += (my - mx) / 2; } /* Issue a warning if our data range is not normalized */ if (graph->datawindow.ymax > 1.1) { printf("\nwarning: exceeding range for smith chart"); printf("\nplease normalize your data to -1 < r < +1\n"); } } /* maximum number of circles */ #define CMAX 50 static void drawsmithgrid(GRAPH *graph) { double mx, my, d, dphi[CMAX], maxrad, rnorm[CMAX]; double pixperunit; int mag, i = 0, j = 0, k; double ir[CMAX], rr[CMAX], ki[CMAX], kr[CMAX], ks[CMAX]; int xoff, yoff, zheight; int basemag, plen; char buf[64], plab[32], nlab[32]; /* Figure out the minimum and maximum radii we're dealing with. */ mx = (graph->datawindow.xmin + graph->datawindow.xmax) / 2; my = (graph->datawindow.ymin + graph->datawindow.ymax) / 2; d = sqrt(mx * mx + my * my); maxrad = d + (graph->datawindow.xmax - graph->datawindow.xmin) / 2; mag = (int)floor(mylog10(maxrad)); pixperunit = graph->viewport.width / (graph->datawindow.xmax - graph->datawindow.xmin); xoff = - (int)(pixperunit * (graph->datawindow.xmin + graph->datawindow.xmax) / 2); yoff = - (int)(pixperunit * (graph->datawindow.ymin + graph->datawindow.ymax) / 2); /* Sweep the range from 10e-20 to 10e20. If any arcs fall into the * picture, plot the arc set. */ for (mag = -20; mag < 20; mag++) { i = (int)(gr_radius * pow(10.0, (double) mag) / maxrad); if (i > 10) { j = 1; break; } else if (i > 5) { j = 2; break; } else if (i > 2) { j = 5; break; } } k = 1; /* SetLinestyle(1); takes too long */ /* Problems with Suns on very large radii && linestyle */ SetLinestyle(0); /* Now plot all the arc sets. Go as high as 5 times the radius that * will fit on the screen. The base magnitude is one more than * the least magnitude that will fit... */ if (i > 20) basemag = mag; else basemag = mag + 1; /* Go back one order of magnitude and have a closer look */ mag -= 2; j *= 10; while (mag < 20) { i = (int)(j * pow(10.0, (double) mag) * pixperunit / 2); if (i / 5 > gr_radius + ((xoff > 0) ? xoff : - xoff)) break; rnorm[k] = j * pow(10.0, (double) (mag - basemag)); dphi[k] = 2.0 * atan(rnorm[k]); ir[k] = pixperunit * (1 + cos(dphi[k])) / sin(dphi[k]); rr[k] = pixperunit * 0.5 * (((1 - rnorm[k]) / (1 + rnorm[k])) + 1); (void) sprintf(plab, "%g", rnorm[k]); plen = (int) strlen(plab); /* See if the label will fit on the upper xaxis */ /* wait for some k, so we don't get fooled */ if (k > 6) { if ((int) (gr_radius - xoff - pixperunit + 2 * rr[k]) < plen * gi_fntwidth + 2) break; } /* See if the label will fit on the lower xaxis */ /* First look at the leftmost circle possible*/ if ((int) (pixperunit - 2 * rr[k] + gr_radius + xoff + fabs((double) yoff)) < plen * gi_fntwidth + 4) { if (j == 95) { j = 10; mag++; } else { if (j < 20) j += 1; else j += 5; } continue; } /* Then look at the circles following in the viewport */ if (k>1 && (int) 2 * (rr[k-1] - rr[k]) < plen * gi_fntwidth + 4) { if (j == 95) { j = 10; mag++; } else { if (j < 20) j += 1; else j += 5; } continue; } if (j == 95) { j = 10; mag++; } else { if (j < 20) j += 1; else j += 5; } ki[k-1] = ir[k]; kr[k-1] = rr[k]; k++; if (k == CMAX) { printf("drawsmithgrid: grid too complex\n"); break; } } k--; /* Now adjust the clipping radii */ for (i = 0; i < k; i++) ks[i] = ki[i]; for (i = k-1, j = k-1; i >= 0; i -= 2, j--) { ki[i] = ks[j]; if (i > 0) ki[i-1] = ks[j]; } for (i = 0; i < k; i++) ks[i] = kr[i]; for (i = k-1, j = k-1; (i >= 0) && (dphi[i] > M_PI / 2); i -= 2, j--) { kr[i] = ks[j]; if (i > 0) kr[i-1] = ks[j]; } for (; i >= 0; i--, j--) kr[i] = ks[j]; if ((yoff > - gr_radius) && (yoff < gr_radius)) { zheight = (int)(gr_radius * cos(asin((double) yoff / gr_radius))); zheight = (zheight > 0) ? zheight : - zheight; } else { zheight = gr_radius; } for (ki[k] = kr[k] = 0.0; k > 0; k--) { (void) sprintf(plab, "%g", rnorm[k]); (void) sprintf(nlab, "-%g", rnorm[k]); arcset(graph, rr[k], kr[k], ir[k], ki[k], pixperunit, gr_radius, gr_xcenter, gr_ycenter, xoff, yoff, plab, nlab, (int) (0.5 + RAD_TO_DEG * (M_PI - dphi[k])), (int) (0.5 + RAD_TO_DEG * (M_PI + dphi[k])), gr_xcenter - zheight, gr_xcenter + zheight); } if (mag == 20) { fprintf(cp_err, "smithgrid: Internal Error: screwed up\n"); return; } SetLinestyle(0); DevDrawArc(gr_xcenter, gr_ycenter, gr_radius, 0.0, 2*M_PI); /* * if ((xoff > - gr_radius) && (xoff < gr_radius)) { * zheight = gr_radius * sin(acos((double) xoff / gr_radius)); * if (zheight < 0) * zheight = - zheight; * DevDrawLine(gr_xcenter + xoff, gr_ycenter - zheight, * gr_xcenter + xoff, gr_ycenter + zheight); * } */ if ((yoff > - gr_radius) && (yoff < gr_radius)) { zheight = (int)(gr_radius * cos(asin((double) yoff / gr_radius))); if (zheight < 0) zheight = - zheight; DevDrawLine(gr_xcenter - zheight, gr_ycenter + yoff, gr_xcenter + zheight, gr_ycenter + yoff); DevDrawText("0", gr_xcenter + zheight + gi_fntwidth, gr_ycenter + yoff - gi_fntheight / 2); DevDrawText("o", gr_xcenter + zheight + gi_fntwidth * 2, gr_ycenter + yoff); DevDrawText("180", gr_xcenter - zheight - gi_fntwidth * 5, gr_ycenter + yoff - gi_fntheight / 2); DevDrawText("o", gr_xcenter - zheight - gi_fntwidth * 2, gr_ycenter + yoff); } /* (void) sprintf(buf, "e%d", basemag); */ (void) sprintf(buf, "e%d", 0); DevDrawText(buf, gr_xcenter + gr_radius, gr_ycenter - gr_radius); DevUpdate(); } /* Draw one arc set. The arcs should have radius rad. The outermost circle is * described by (centx, centy) and maxrad, and the distance from the right side * of the bounding circle to the logical center of the other circles in pixels * is xoffset (positive brings the negative plane into the picture). * plab and nlab are the labels to put on the positive and negative X-arcs, * respectively... If the X-axis isn't on the screen, then we have to be * clever... */ static void arcset(GRAPH *graph, double rad, double prevrad, double irad, double iprevrad, double radoff, int maxrad, int centx, int centy, int xoffset, int yoffset, char *plab, char *nlab, int pdeg, int ndeg, int pxmin, int pxmax) { double aclip; double angle = atan2((double) iprevrad, (double) rad); double iangle = atan2((double) prevrad, (double) irad); int x, xlab, ylab; NG_IGNORE(nlab); /* Let's be lazy and just draw everything -- we won't get called too * much and the circles get clipped anyway... */ SetColor(18); cliparc((double) (centx + xoffset + radoff - rad), (double) (centy + yoffset), rad, 2*angle, 2 * M_PI - 2 * angle, centx, centy, maxrad, 0); /* These circles are not part of the smith chart * Let's draw them anyway */ cliparc((double) (centx + xoffset + radoff + rad), (double) (centy + yoffset), rad, M_PI + 2 * angle, M_PI - 2 * angle, centx, centy, maxrad, 0); /* Draw the upper and lower circles. */ SetColor(19); aclip = cliparc((double) (centx + xoffset + radoff), (double) (centy + yoffset + irad), irad, (double) (M_PI * 1.5 + 2 * iangle), (double) (M_PI * 1.5 - 2 * iangle), centx, centy, maxrad, 1); if ((aclip > M_PI / 180) && (pdeg > 1)) { xlab = (int)(centx + xoffset + radoff + irad * cos(aclip)); ylab = (int)(centy + yoffset + irad * (1 + sin(aclip))); if ((ylab - gr_ycenter) > graph->fontheight) { SetColor(1); adddeglabel(graph, pdeg, xlab, ylab, gr_xcenter, gr_ycenter, gr_xcenter, gr_ycenter); /* ylab = centy + yoffset - irad * (1 + sin(aclip)); adddeglabel(graph, ndeg, xlab, ylab, gr_xcenter, gr_ycenter, gr_xcenter, gr_ycenter); */ SetColor(19); } } aclip = cliparc((double) (centx + xoffset + radoff), (double) (centy + yoffset - irad), irad, (double) (M_PI / 2 + 2 * iangle), (double) (M_PI / 2 - 2 * iangle), centx, centy, maxrad, (iangle == 0) ? 2 : 0); if ((aclip >= 0 && aclip < 2*M_PI - M_PI/180) && (pdeg < 359)) { xlab = (int)(centx + xoffset + radoff + irad * cos(aclip)); ylab = (int)(centy + yoffset + irad * (sin(aclip) - 1)); SetColor(1); adddeglabel(graph, ndeg, xlab, ylab, gr_xcenter, gr_ycenter, gr_xcenter, gr_ycenter); SetColor(19); } /* Now toss the labels on... */ SetColor(1); x = centx + xoffset + (int)radoff - 2 * (int)rad - gi_fntwidth * (int) strlen(plab) - 2; if ((x > pxmin) && (x < pxmax)) { if ((yoffset > - gr_radius) && (yoffset < gr_radius)) DevDrawText(plab, x, centy + yoffset - gi_fntheight - 1); else DevDrawText(plab, x, gr_ymargin - 3 * gi_fntheight - 2); } /* * x = centx + xoffset + (int) radoff + 2 * (int)rad - * gi_fntwidth * strlen(nlab) - 2; * if ((x > gr_xmargin) && (x < gi_maxx)) * DevDrawText(nlab, x, centy + yoffset - gi_fntheight - 1); */ } /* This routine draws an arc and clips it to a circle. It's hard to figure * out how it works without looking at the piece of scratch paaper I have * in front of me, so let's hope it doesn't break... * Converted to all doubles for CRAYs */ static double cliparc(double cx, double cy, double rad, double start, double end, int iclipx, int iclipy, int icliprad, int flag) { double clipx, clipy, cliprad; double sclip = 0.0, eclip = 0.0; double x, y, tx, ty, dist; double alpha, theta, phi, a1, a2, d, l; bool in; clipx = (double) iclipx; clipy = (double) iclipy; cliprad = (double) icliprad; x = cx - clipx; y = cy - clipy; dist = sqrt((double) (x * x + y * y)); if (!rad || !cliprad) return (-1); if (dist + rad < cliprad) { /* The arc is entirely in the boundary. */ DevDrawArc((int)cx, (int)cy, (int)rad, start, end-start); return (flag?start:end); } else if ((dist - rad >= cliprad) || (rad - dist >= cliprad)) { /* The arc is outside of the boundary. */ return (-1); } /* Now let's figure out the angles at which the arc crosses the * circle. We know dist != 0. */ if (x) phi = atan2((double) y, (double) x); else if (y > 0) phi = M_PI * 1.5; else phi = M_PI / 2; if (cx > clipx) theta = M_PI + phi; else theta = phi; alpha = (double) (dist * dist + rad * rad - cliprad * cliprad) / (2 * dist * rad); /* Sanity check */ if (alpha > 1.0) alpha = 0.0; else if (alpha < -1.0) alpha = M_PI; else alpha = acos(alpha); a1 = theta + alpha; a2 = theta - alpha; while (a1 < 0) a1 += M_PI * 2; while (a2 < 0) a2 += M_PI * 2; while (a1 >= M_PI * 2) a1 -= M_PI * 2; while (a2 >= M_PI * 2) a2 -= M_PI * 2; tx = cos(start) * rad + x; ty = sin(start) * rad + y; d = sqrt((double) tx * tx + ty * ty); in = (d > cliprad) ? FALSE : TRUE; /* Now begin with start. If the point is in, draw to either end, a1, * or a2, whichever comes first. */ d = M_PI * 3; if ((end < d) && (end > start)) d = end; if ((a1 < d) && (a1 > start)) d = a1; if ((a2 < d) && (a2 > start)) d = a2; if (d == M_PI * 3) { d = end; if (a1 < d) d = a1; if (a2 < d) d = a2; } if (in) { if (start > d) { double tmp; tmp = start; start = d; d = tmp; } DevDrawArc((int)cx, (int)cy, (int)rad, start, d-start); sclip = start; eclip = d; } if (d == end) return (flag?sclip:eclip); if (a1 != a2) in = in ? FALSE : TRUE; /* Now go from here to the next point. */ l = d; d = M_PI * 3; if ((end < d) && (end > l)) d = end; if ((a1 < d) && (a1 > l)) d = a1; if ((a2 < d) && (a2 > l)) d = a2; if (d == M_PI * 3) { d = end; if (a1 < d) d = a1; if (a2 < d) d = a2; } if (in) { DevDrawArc((int)cx, (int)cy, (int)rad, l, d-l); sclip = l; eclip = d; } if (d == end) return (flag?sclip:eclip); in = in ? FALSE : TRUE; /* And from here to the end. */ if (in) { DevDrawArc((int)cx, (int)cy, (int)rad, d, end-d); /* special case */ if (flag != 2) { sclip = d; eclip = end; } } return (flag % 2 ? sclip : eclip); } ngspice-26/src/frontend/com_state.h0000644000265600020320000000014012264261473016761 0ustar andreasadmin#ifndef ngspice_COM_STATE_H #define ngspice_COM_STATE_H void com_state(wordlist *wl); #endif ngspice-26/src/frontend/com_gnuplot.c0000644000265600020320000000237212264261473017335 0ustar andreasadmin#include #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "plotting/plotit.h" #include "../misc/mktemp.h" #include "com_gnuplot.h" /* gnuplot file plotargs */ void com_gnuplot(wordlist *wl) { char *fname = NULL; bool tempf = FALSE; if (wl) { fname = wl->wl_word; wl = wl->wl_next; } if (!wl) return; if (cieq(fname, "temp") || cieq(fname, "tmp")) { fname = smktemp("gp"); /* Is this the correct name ? */ tempf = TRUE; } (void) plotit(wl, fname, "gnuplot"); /* Leave temp file sitting around so gnuplot can grab it from background. */ if (tempf) tfree(fname); } /* data printout to file plotargs */ void com_write_simple(wordlist *wl) { char *fname = NULL; bool tempf = FALSE; if (wl) { fname = wl->wl_word; wl = wl->wl_next; } if (!wl) return; if (cieq(fname, "temp") || cieq(fname, "tmp")) { fname = smktemp("gp"); /* Is this the correct name ? */ tempf = TRUE; } (void) plotit(wl, fname, "writesimple"); /* Leave temp file sitting around so gnuplot can grab it from background. */ if (tempf) tfree(fname); } ngspice-26/src/frontend/com_option.h0000644000265600020320000000014212264261473017153 0ustar andreasadmin#ifndef ngspice_COM_OPTION_H #define ngspice_COM_OPTION_H void com_option(wordlist *wl); #endif ngspice-26/src/frontend/parse-bison.c0000644000265600020320000016664512264261704017244 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ #define yyparse PPparse #define yylex PPlex #define yyerror PPerror #define yylval PPlval #define yychar PPchar #define yydebug PPdebug #define yynerrs PPnerrs #define yylloc PPlloc /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "./parse-bison.y" /* * (compile (concat "bison " (file-relative-name buffer-file-name))) */ #include #include struct PPltype { const char *start, *stop; }; # define YYLTYPE struct PPltype # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) { \ (Current).start = YYRHSLOC(Rhs, 1).start; \ (Current).stop = YYRHSLOC(Rhs, N).stop; \ } else { \ (Current).start = (Current).stop = YYRHSLOC(Rhs, 0).stop; \ } \ while (0) #include "parse-bison.h" extern int PPlex (YYSTYPE *lvalp, struct PPltype *llocp, char **line); extern int PPdebug; static void PPerror (YYLTYPE *locp, char **line, struct pnode **retval, char const *); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif /* Line 268 of yacc.c */ #line 118 "parse-bison.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 1 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_NUM = 258, TOK_STR = 259, TOK_LE = 260, TOK_GE = 261, TOK_NE = 262, TOK_LRANGE = 263, TOK_RRANGE = 264, NEG = 265 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 53 "./parse-bison.y" double num; const char *str; struct pnode *pnode; /* Line 293 of yacc.c */ #line 172 "parse-bison.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 197 "parse-bison.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 14 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 248 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 30 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 5 /* YYNRULES -- Number of rules. */ #define YYNRULES 30 /* YYNRULES -- Number of states. */ #define YYNSTATES 59 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 265 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 13, 2, 28, 29, 21, 20, 18, 19, 2, 22, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 11, 2, 15, 14, 16, 10, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 26, 2, 27, 25, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 17, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 24 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 6, 8, 11, 13, 15, 17, 21, 25, 29, 33, 37, 41, 45, 49, 52, 55, 60, 64, 68, 72, 76, 80, 84, 88, 92, 97, 102 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 31, 0, -1, -1, 32, -1, 33, -1, 33, 32, -1, 34, -1, 3, -1, 4, -1, 34, 18, 34, -1, 34, 20, 34, -1, 34, 19, 34, -1, 34, 21, 34, -1, 34, 23, 34, -1, 34, 22, 34, -1, 34, 25, 34, -1, 28, 34, 29, -1, 19, 34, -1, 17, 34, -1, 4, 28, 34, 29, -1, 34, 14, 34, -1, 34, 7, 34, -1, 34, 16, 34, -1, 34, 15, 34, -1, 34, 6, 34, -1, 34, 5, 34, -1, 34, 13, 34, -1, 34, 12, 34, -1, 34, 26, 34, 27, -1, 34, 8, 34, 9, -1, 34, 10, 34, 11, 34, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 117, 117, 118, 122, 123, 127, 134, 135, 137, 138, 139, 140, 141, 142, 143, 145, 147, 148, 150, 156, 157, 158, 159, 160, 161, 163, 164, 166, 167, 168 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "TOK_NUM", "TOK_STR", "TOK_LE", "TOK_GE", "TOK_NE", "TOK_LRANGE", "TOK_RRANGE", "'?'", "':'", "'|'", "'&'", "'='", "'<'", "'>'", "'~'", "','", "'-'", "'+'", "'*'", "'/'", "'%'", "NEG", "'^'", "'['", "']'", "'('", "')'", "$accept", "expression", "exp_list", "one_exp", "exp", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 63, 58, 124, 38, 61, 60, 62, 126, 44, 45, 43, 42, 47, 37, 265, 94, 91, 93, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 30, 31, 31, 32, 32, 33, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 1, 1, 2, 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, 3, 2, 2, 4, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 5 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 7, 8, 0, 0, 0, 0, 3, 4, 6, 0, 18, 17, 0, 1, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16, 25, 24, 21, 0, 0, 27, 26, 20, 23, 22, 9, 11, 10, 12, 14, 13, 15, 0, 19, 29, 0, 28, 30 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 6, 7, 8, 9 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -26 static const yytype_int16 yypact[] = { 28, -26, -25, 28, 28, 28, 4, -26, 28, 169, 28, 222, 200, 52, -26, -26, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 77, -26, 222, 222, 222, 125, 147, 191, 213, 222, 222, 222, 222, 29, 29, 200, 200, 200, 200, 102, -26, -26, 28, -26, 169 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -26, -26, -2, -26, -3 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 11, 12, 13, 10, 14, 0, 15, 34, 0, 0, 0, 0, 0, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 1, 2, 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, 3, 0, 4, 0, 0, 29, 30, 31, 58, 32, 33, 5, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 0, 0, 35, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 0, 0, 54, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 57, 16, 17, 18, 19, 55, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 16, 17, 18, 19, 0, 20, 56, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 0, 26, 27, 28, 29, 30, 31, 0, 32, 33, 16, 17, 18, 19, 0, 0, 0, 0, 22, 23, 24, 25, 19, 26, 27, 28, 29, 30, 31, 0, 32, 33, 16, 17, 18, 19, 0, 0, 0, 32, 33, 23, 24, 25, 19, 26, 27, 28, 29, 30, 31, 0, 32, 33, 26, 27, 28, 29, 30, 31, 0, 32, 33 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-26)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 3, 4, 5, 28, 0, -1, 8, 10, -1, -1, -1, -1, -1, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 3, 4, -1, -1, -1, -1, 8, -1, -1, -1, -1, -1, -1, -1, 17, -1, 19, -1, -1, 21, 22, 23, 56, 25, 26, 28, 5, 6, 7, 8, -1, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, -1, -1, 29, 5, 6, 7, 8, -1, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, -1, -1, 29, 5, 6, 7, 8, -1, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, 27, 5, 6, 7, 8, 9, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, 5, 6, 7, 8, -1, 10, 11, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, 5, 6, 7, 8, -1, 10, -1, 12, 13, 14, 15, 16, -1, 18, 19, 20, 21, 22, 23, -1, 25, 26, 5, 6, 7, 8, -1, -1, -1, -1, 13, 14, 15, 16, 8, 18, 19, 20, 21, 22, 23, -1, 25, 26, 5, 6, 7, 8, -1, -1, -1, 25, 26, 14, 15, 16, 8, 18, 19, 20, 21, 22, 23, -1, 25, 26, 18, 19, 20, 21, 22, 23, -1, 25, 26 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 17, 19, 28, 31, 32, 33, 34, 28, 34, 34, 34, 0, 32, 5, 6, 7, 8, 10, 12, 13, 14, 15, 16, 18, 19, 20, 21, 22, 23, 25, 26, 34, 29, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 29, 9, 11, 27, 34 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (&yylloc, line, retval, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else # define YYLEX yylex (&yylval, &yylloc, line) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, Location, line, retval); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **line, struct pnode **retval) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; char **line; struct pnode **retval; #endif { if (!yyvaluep) return; YYUSE (yylocationp); YYUSE (line); YYUSE (retval); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **line, struct pnode **retval) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; char **line; struct pnode **retval; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, char **line, struct pnode **retval) #else static void yy_reduce_print (yyvsp, yylsp, yyrule, line, retval) YYSTYPE *yyvsp; YYLTYPE *yylsp; int yyrule; char **line; struct pnode **retval; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) , line, retval); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, yylsp, Rule, line, retval); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, char **line, struct pnode **retval) #else static void yydestruct (yymsg, yytype, yyvaluep, yylocationp, line, retval) const char *yymsg; int yytype; YYSTYPE *yyvaluep; YYLTYPE *yylocationp; char **line; struct pnode **retval; #endif { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (line); YYUSE (retval); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (char **line, struct pnode **retval); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (char **line, struct pnode **retval) #else int yyparse (line, retval) char **line; struct pnode **retval; #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls; YYLTYPE *yylsp; /* The locations where the error started and ended. */ YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yyls = yylsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; yylsp = yyls; #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; #endif /* User initialization code. */ /* Line 1590 of yacc.c */ #line 105 "./parse-bison.y" { yylval.num = 0.0; yylloc.start = yylloc.stop = NULL; } /* Line 1590 of yacc.c */ #line 1380 "parse-bison.c" yyvsp[0] = yylval; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; *++yylsp = yylloc; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1806 of yacc.c */ #line 117 "./parse-bison.y" { *retval = NULL; } break; case 3: /* Line 1806 of yacc.c */ #line 118 "./parse-bison.y" { *retval = (yyvsp[(1) - (1)].pnode); } break; case 5: /* Line 1806 of yacc.c */ #line 123 "./parse-bison.y" { (yyvsp[(1) - (2)].pnode)->pn_next = (yyvsp[(2) - (2)].pnode); (yyvsp[(2) - (2)].pnode)->pn_use ++; (yyval.pnode) = (yyvsp[(1) - (2)].pnode); } break; case 6: /* Line 1806 of yacc.c */ #line 127 "./parse-bison.y" { (yyvsp[(1) - (1)].pnode)->pn_name = copy_substring((yylsp[(1) - (1)]).start, (yylsp[(1) - (1)]).stop); (yyval.pnode) = (yyvsp[(1) - (1)].pnode); } break; case 7: /* Line 1806 of yacc.c */ #line 134 "./parse-bison.y" { (yyval.pnode) = mknnode((yyvsp[(1) - (1)].num)); } break; case 8: /* Line 1806 of yacc.c */ #line 135 "./parse-bison.y" { (yyval.pnode) = mksnode((yyvsp[(1) - (1)].str)); txfree((void*)(yyvsp[(1) - (1)].str)); } break; case 9: /* Line 1806 of yacc.c */ #line 137 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_COMMA, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 10: /* Line 1806 of yacc.c */ #line 138 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_PLUS, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 11: /* Line 1806 of yacc.c */ #line 139 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_MINUS, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 12: /* Line 1806 of yacc.c */ #line 140 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_TIMES, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 13: /* Line 1806 of yacc.c */ #line 141 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_MOD, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 14: /* Line 1806 of yacc.c */ #line 142 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_DIVIDE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 15: /* Line 1806 of yacc.c */ #line 143 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_POWER, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 16: /* Line 1806 of yacc.c */ #line 145 "./parse-bison.y" { (yyval.pnode) = (yyvsp[(2) - (3)].pnode); } break; case 17: /* Line 1806 of yacc.c */ #line 147 "./parse-bison.y" { (yyval.pnode) = mkunode(PT_OP_UMINUS, (yyvsp[(2) - (2)].pnode)); } break; case 18: /* Line 1806 of yacc.c */ #line 148 "./parse-bison.y" { (yyval.pnode) = mkunode(PT_OP_NOT, (yyvsp[(2) - (2)].pnode)); } break; case 19: /* Line 1806 of yacc.c */ #line 150 "./parse-bison.y" { (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); txfree((void*)(yyvsp[(1) - (4)].str)); if(!(yyval.pnode)) YYABORT; } break; case 20: /* Line 1806 of yacc.c */ #line 156 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_EQ, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 21: /* Line 1806 of yacc.c */ #line 157 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_NE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 22: /* Line 1806 of yacc.c */ #line 158 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_GT, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 23: /* Line 1806 of yacc.c */ #line 159 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_LT, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 24: /* Line 1806 of yacc.c */ #line 160 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_GE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 25: /* Line 1806 of yacc.c */ #line 161 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_LE, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 26: /* Line 1806 of yacc.c */ #line 163 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_AND, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 27: /* Line 1806 of yacc.c */ #line 164 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_OR, (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 28: /* Line 1806 of yacc.c */ #line 166 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_INDX, (yyvsp[(1) - (4)].pnode), (yyvsp[(3) - (4)].pnode)); } break; case 29: /* Line 1806 of yacc.c */ #line 167 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_RANGE, (yyvsp[(1) - (4)].pnode), (yyvsp[(3) - (4)].pnode)); } break; case 30: /* Line 1806 of yacc.c */ #line 168 "./parse-bison.y" { (yyval.pnode) = mkbnode(PT_OP_TERNARY,(yyvsp[(1) - (5)].pnode), mkbnode(PT_OP_COMMA,(yyvsp[(3) - (5)].pnode),(yyvsp[(5) - (5)].pnode))); } break; /* Line 1806 of yacc.c */ #line 1772 "parse-bison.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (&yylloc, line, retval, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (&yylloc, line, retval, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } yyerror_range[1] = yylloc; if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc, line, retval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, line, retval); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, line, retval, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, line, retval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, yylsp, line, retval); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 172 "./parse-bison.y" /* Called by yyparse on error. */ static void PPerror (YYLTYPE *locp, char **line, struct pnode **retval, char const *s) { NG_IGNORE(locp); NG_IGNORE(line); NG_IGNORE(retval); fprintf (stderr, "%s: %s\n", __func__, s); } ngspice-26/src/frontend/com_set.c0000644000265600020320000000253112264261473016435 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "variable.h" #include "com_set.h" /* The set command. Syntax is set [opt ...] [opt = val ...]. Val may * be a string, an int, a float, or a list of the form (elt1 elt2 * ...). */ void com_set(wordlist *wl) { struct variable *vars, *oldvar; if (wl == NULL) { cp_vprint(); return; } vars = cp_setparse(wl); /* This is sort of a hassle... */ while (vars) { void *s; switch (vars->va_type) { case CP_BOOL: s = &vars->va_bool; break; case CP_NUM: s = &vars->va_num; break; case CP_REAL: s = &vars->va_real; break; case CP_STRING: s = vars->va_string; break; case CP_LIST: s = vars->va_vlist; break; default: s = NULL; } cp_vset(vars->va_name, vars->va_type, s); oldvar = vars; vars = vars->va_next; /* va: avoid memory leak: free oldvar carefully */ tfree(oldvar->va_name); if (oldvar->va_type == CP_STRING) tfree(oldvar->va_string); /* copied in cp_vset */ /* don't free oldvar->va_list! This structure is used furthermore! */ tfree(oldvar); } } ngspice-26/src/frontend/define.h0000644000265600020320000000031612264261473016242 0ustar andreasadmin/************* * Header file for define.c * 1999 E. Rouat ************/ #ifndef ngspice_DEFINE_H #define ngspice_DEFINE_H void com_define(wordlist *wlist); void com_undefine(wordlist *wlist); #endif ngspice-26/src/frontend/com_plot.h0000644000265600020320000000022412264261473016622 0ustar andreasadmin#ifndef ngspice_COM_PLOT_H #define ngspice_COM_PLOT_H void com_plot(wordlist *wl); #ifdef TCL_MODULE void com_bltplot(wordlist *wl); #endif #endif ngspice-26/src/frontend/README0000644000265600020320000000040312264261473015514 0ustar andreasadminThis directory contains the code that is behind the commands of the interactive frontend. Note that every command has a source file associated with it. The source file is prefixed with `com_' to distinguish command source files from other supporting code. ngspice-26/src/frontend/com_dl.c0000644000265600020320000000140512264261473016240 0ustar andreasadmin#include "ngspice/ngspice.h" /* for wl */ #include "ngspice/ftedefs.h" #include "ngspice/devdefs.h" /* solve deps in dev.h*/ #include "../spicelib/devices/dev.h" /* for load library commands */ #include "com_dl.h" #ifdef XSPICE void com_codemodel(wordlist *wl) { wordlist *ww; for (ww = wl; ww; ww = ww->wl_next) if (load_opus(wl->wl_word)) { fprintf(cp_err, "Error: Library %s couldn't be loaded!\n", ww->wl_word); if (ft_stricterror) controlled_exit(EXIT_BAD); } } #endif #ifdef DEVLIB void com_use(wordlist *wl) { wordlist *ww; for (ww = wl; ww; ww = ww->wl_next) if (load_dev(wl->wl_word)) fprintf(cp_err, "Error: Library %s couldn't be loaded!\n", ww->wl_word); } #endif ngspice-26/src/frontend/circuits.c0000644000265600020320000000123212264261473016626 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* Routines for dealing with the circuit database. This is currently * unimplemented. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "circuits.h" struct circ *ft_curckt = NULL; /* The default active circuit. */ struct circ *ft_circuits = NULL; /* Now stuff to deal with circuits */ /* Add a circuit to the circuit list */ void ft_newcirc(struct circ *ckt) { ckt->ci_next = ft_circuits; ft_circuits = ckt; } ngspice-26/src/frontend/com_unset.c0000644000265600020320000000105312264261473016776 0ustar andreasadmin/************* * com_unset.c ************/ #include "ngspice/ngspice.h" #include "ngspice/macros.h" #include "ngspice/bool.h" #include "com_unset.h" #include "variable.h" void com_unset(wordlist *wl) { char *name; struct variable *var, *nv; if (eq(wl->wl_word, "*")) { for (var = variables; var; var = nv) { nv = var->va_next; cp_remvar(var->va_name); } wl = wl->wl_next; } while (wl != NULL) { name = wl->wl_word; cp_remvar(name); wl = wl->wl_next; } } ngspice-26/src/frontend/where.c0000644000265600020320000000176412264261473016125 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ftehelp.h" #include "ngspice/hlpdefs.h" #include "circuits.h" #include "where.h" void com_where(wordlist *wl) { char *msg; NG_IGNORE(wl); /*CDHW typing where with no current circuit caused crashes CDHW*/ if (!ft_curckt) { fprintf(cp_err, "There is no current circuit\n"); return; } else if (ft_curckt->ci_ckt != NULL) { fprintf(cp_err, "No unconverged node found.\n"); return; } msg = ft_sim->nonconvErr (ft_curckt->ci_ckt, 0); printf("%s", msg); /* if (ft_curckt) { msg = ft_sim->nonconvErr (ft_curckt->ci_ckt, 0); fprintf(cp_out, "%s", msg); } else { fprintf(cp_err, "Error: no circuit loaded.\n"); } */ } ngspice-26/src/frontend/numparam/0000755000265600020320000000000012264261704016454 5ustar andreasadminngspice-26/src/frontend/numparam/ngconfig.sh0000644000265600020320000000076512264261473020615 0ustar andreasadmin#!/bin/sh # ngconfig.sh # configure options for ngspice with numparam add-on # run this in ngspice's top-level directory # specify your Numparam directory HACK=/home/post/spice3f5/hack # over-write the original subckt.c cp -biv $HACK/ngsubckt.c src/frontend/subckt.c # my box needs CFLAGS on 1st run, else 'terminal.c' wont find 'termcap.h' ? CFLAGS=-I/usr/include/ncurses \ LIBS=$HACK/libnupa.a \ ./configure --without-x --prefix=/usr/local/ngsp #### end of sample script #### ngspice-26/src/frontend/numparam/xpressn.c0000644000265600020320000015164212264261473020336 0ustar andreasadmin/* xpressn.c Copyright (C) 2002 Georg Post This file is part of Numparam, see: readme.txt Free software under the terms of the GNU Lesser General Public License */ #include "ngspice/ngspice.h" #include "general.h" #include "numparam.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "../frontend/variable.h" #include "ngspice/compatmode.h" /* random numbers in /maths/misc/randnumb.c */ extern double gauss0(void); extern double drand(void); /************ keywords ************/ extern char *nupa_inst_name; /* see spicenum.c */ extern long dynsubst; /* see inpcom.c */ #define ACT_CHARACTS 25 /* actual string length to be inserted and replaced */ #define S_init 0 #define S_atom 1 #define S_binop 2 #define S_unop 3 #define S_stop 4 static double ternary_fcn(double conditional, double if_value, double else_value) { if (conditional != 0.0) return if_value; else return else_value; } static double agauss(double nominal_val, double abs_variation, double sigma) { double stdvar; stdvar = abs_variation / sigma; return (nominal_val + stdvar * gauss0()); } static double gauss(double nominal_val, double rel_variation, double sigma) { double stdvar; stdvar = nominal_val * rel_variation / sigma; return (nominal_val + stdvar * gauss0()); } static double unif(double nominal_val, double rel_variation) { return (nominal_val + nominal_val * rel_variation * drand()); } static double aunif(double nominal_val, double abs_variation) { return (nominal_val + abs_variation * drand()); } static double limit(double nominal_val, double abs_variation) { return (nominal_val + (drand() > 0 ? abs_variation : -1. * abs_variation)); } static const char *fmathS = /* all math functions */ "SQR SQRT SIN COS EXP LN ARCTAN ABS POW PWR MAX MIN INT LOG SINH COSH" " TANH TERNARY_FCN AGAUSS SGN GAUSS UNIF AUNIF LIMIT CEIL FLOOR" " ASIN ACOS ATAN ASINH ACOSH ATANH TAN NINT"; enum { XFU_SQR = 1, XFU_SQRT, XFU_SIN, XFU_COS, XFU_EXP, XFU_LN, XFU_ARCTAN, XFU_ABS, XFU_POW, XFU_PWR, XFU_MAX, XFU_MIN, XFU_INT, XFU_LOG, XFU_SINH, XFU_COSH, XFU_TANH, XFU_TERNARY_FCN, XFU_AGAUSS, XFU_SGN, XFU_GAUSS, XFU_UNIF, XFU_AUNIF, XFU_LIMIT, XFU_CEIL, XFU_FLOOR, XFU_ASIN, XFU_ACOS, XFU_ATAN, XFU_ASINH, XFU_ACOSH, XFU_ATANH, XFU_TAN, XFU_NINT }; static double mathfunction(int f, double z, double x) /* the list of built-in functions. Patch 'fmath', here and near line 888 to get more ...*/ { double y; switch (f) { case XFU_SQR: y = x * x; break; case XFU_SQRT: y = sqrt(x); break; case XFU_SIN: y = sin(x); break; case XFU_COS: y = cos(x); break; case XFU_EXP: y = exp(x); break; case XFU_LN: y = log(x); break; case XFU_ARCTAN: y = atan(x); break; case XFU_ABS: y = fabs(x); break; case XFU_POW: y = pow(z, x); break; case XFU_PWR: y = pow(fabs(z), x); break; case XFU_MAX: y = MAX(x, z); break; case XFU_MIN: y = MIN(x, z); break; case XFU_INT: y = trunc(x); break; case XFU_NINT: /* round to "nearest integer", * round half-integers to the nearest even integer * rely on default rounding mode of IEEE 754 to do so */ y = nearbyint(x); break; case XFU_LOG: y = log(x); break; case XFU_SINH: y = sinh(x); break; case XFU_COSH: y = cosh(x); break; case XFU_TANH: y = tanh(x); break; case XFU_SGN: if (x > 0) y = 1.; else if (x == 0) y = 0.; else y = -1.; break; case XFU_CEIL: y = ceil(x); break; case XFU_FLOOR: y = floor(x); break; case XFU_ASIN: y = asin(x); break; case XFU_ACOS: y = acos(x); break; case XFU_ATAN: y = atan(x); break; case XFU_ASINH: y = asinh(x); break; case XFU_ACOSH: y = acosh(x); break; case XFU_ATANH: y = atanh(x); break; case XFU_TAN: y = tan(x); break; default: y = x; break; } return y; } #ifdef __GNUC__ static bool message(tdico *dic, const char *fmt, ...) __attribute__ ((format (__printf__, 2, 3))); #endif static bool message(tdico *dic, const char *fmt, ...) { va_list ap; char *srcfile = spice_dstring_value(&(dic->srcfile)); if (srcfile && *srcfile) fprintf(stderr, "%s:", srcfile); if (dic->srcline >= 0) fprintf (stderr, "Original line no.: %d, new internal line no.: %d:\n", dic->oldline, dic->srcline); va_start(ap, fmt); vfprintf(stderr, fmt, ap); va_end(ap); fprintf(stderr, "\n"); dic->errcount++; return 1; /* error! */ } /************ the input text symbol table (dictionary) *************/ void initdico(tdico *dico) { int asize; /* default allocation size */ COMPATMODE_T compat_mode; spice_dstring_init(&(dico->option)); spice_dstring_init(&(dico->srcfile)); dico->srcline = -1; dico->errcount = 0; dico->global_symbols = nghash_init(NGHASH_MIN_SIZE); nghash_unique(dico->global_symbols, TRUE); /* no rewrite of global symbols */ spice_dstring_init(&(dico->lookup_buf)); dico->stack_depth = 0; /* top of the stack */ asize = dico->symbol_stack_alloc = 10;/* expected stack depth - no longer limited */ asize++; /* account for zero */ dico->local_symbols = TMALLOC(NGHASHPTR, asize); dico->inst_name = TMALLOC(char*, asize); dico->inst_symbols = NULL; /* instance qualified are lazily allocated */ compat_mode = ngspice_compat_mode(); if (compat_mode == COMPATMODE_HS) dico->hs_compatibility = 1; else dico->hs_compatibility = 0; } void dico_free_entry(entry *entry_p) { if (entry_p->symbol) txfree(entry_p->symbol); txfree(entry_p); } /* local semantics for parameters inside a subckt */ /* arguments as wll as .param expressions */ /* to do: scope semantics ? "params:" and all new symbols should have local scope inside subcircuits. redefinition of old symbols gives a warning message. */ typedef enum {Push = 'u'} _nPush; typedef enum {Pop = 'o'} _nPop; static void dicostack(tdico *dico, char op) /* push or pop operation for nested subcircuit locals */ { int asize; /* allocation size */ char *inst_name; /* name of subcircuit instance */ char *param_p; /* qualified inst parameter name */ entry *entry_p; /* current entry */ NGHASHPTR htable_p; /* current hash table */ NGHASHITER iter; /* hash iterator - thread safe */ if (op == Push) { dico->stack_depth++; if (dico->stack_depth > dico->symbol_stack_alloc) { /* Just double the stack alloc */ dico->symbol_stack_alloc *= 2; asize = dico->symbol_stack_alloc + 1; /* account for zero */ dico->local_symbols = TREALLOC(NGHASHPTR, dico->local_symbols, asize); dico->inst_name = TREALLOC(char*, dico->inst_name, asize); } /* lazy allocation - don't allocate space if we can help it */ dico->local_symbols[dico->stack_depth] = NULL; dico->inst_name[dico->stack_depth] = nupa_inst_name; } else if (op == Pop) { if (dico->stack_depth > 0) { /* ----------------------------------------------------------------- * Keep instance parameters around by transferring current local * scope variables to an instance qualified hash table. * ----------------------------------------------------------------- */ inst_name = dico->inst_name[dico->stack_depth]; htable_p = dico->local_symbols[dico->stack_depth]; if (htable_p) { SPICE_DSTRING param_name; /* build a qualified name */ spice_dstring_init(¶m_name); NGHASH_FIRST(&iter); for (entry_p = (entry *) nghash_enumerateRE(htable_p, &iter); entry_p; entry_p = (entry *) nghash_enumerateRE(htable_p, &iter)) { spice_dstring_reinit(¶m_name); param_p = spice_dstring_print(¶m_name, "%s.%s", inst_name, entry_p->symbol); nupa_add_inst_param(param_p, entry_p->vl); dico_free_entry(entry_p); } nghash_free(htable_p, NULL, NULL); spice_dstring_free(¶m_name); } tfree(inst_name); dico->inst_name[dico->stack_depth] = NULL; dico->local_symbols[dico->stack_depth] = NULL; dico->stack_depth--; } else { message(dico, " Subckt Stack underflow."); } } } int donedico(tdico *dico) { int sze = nghash_get_size(dico->global_symbols); return sze; } /* ----------------------------------------------------------------- * Now entryb works on the given hash table hierarchy. First * look thru the stack of local symbols and then look at the global * symbols in that order. * ----------------------------------------------------------------- */ static entry * entrynb(tdico *d, char *s) { int depth; /* stack depth */ entry *entry_p; /* search hash table */ NGHASHPTR htable_p; /* hash table */ /* look at the current scope and then backup the stack */ for (depth = d->stack_depth; depth > 0; depth--) { htable_p = d->local_symbols[depth]; if (htable_p) { entry_p = (entry *) nghash_find(htable_p, s); if (entry_p) return (entry_p); } } /* No local symbols - try the global table */ entry_p = (entry *) nghash_find(d->global_symbols, s); return (entry_p); } char getidtype(tdico *d, char *s) /* test if identifier s is known. Answer its type, or '?' if not in table */ { entry *entry_p; /* hash table entry */ char itp = '?'; /* assume unknown */ entry_p = entrynb(d, s); if (entry_p) itp = entry_p->tp; return (itp); } static double fetchnumentry(tdico *dico, char *t, bool *perr) { bool err = *perr; double u; entry *entry_p; /* hash table entry */ entry_p = entrynb(dico, t); /* no keyword */ /*dbg -- if (k <= 0) { printf("Dico num lookup fails."); } */ while (entry_p && (entry_p->tp == 'P')) entry_p = entry_p->pointer; if (entry_p) if (entry_p->tp != 'R') entry_p = NULL; if (entry_p) { u = entry_p->vl; } else { err = message(dico, "Undefined number [%s]", t); u = 0.0; } *perr = err; return u; } /******* writing dictionary entries *********/ entry * attrib(tdico *dico_p, NGHASHPTR htable_p, char *t, char op) { /* seek or attribute dico entry number for string t. Option op='N' : force a new entry, if tos>level and old is valid. */ entry *entry_p; /* symbol table entry */ entry_p = (entry *) nghash_find(htable_p, t); if (entry_p && (op == 'N') && (entry_p->level < dico_p->stack_depth) && (entry_p->tp != '?')) { entry_p = NULL; } if (!entry_p) { entry_p = TMALLOC(entry, 1); entry_p->symbol = strdup(t); entry_p->tp = '?'; /* signal Unknown */ entry_p->level = dico_p->stack_depth; nghash_insert(htable_p, t, entry_p); } return entry_p; } /* user defined delete function: * free the dictionary entries malloc'ed above * will be called by nghash_free() in nupa_del_dicoS() */ void del_attrib(void *e_p) { entry *entry_p = (entry*)e_p; if(entry_p) { tfree(entry_p->symbol); tfree(entry_p); } } static bool define(tdico *dico, char *t, /* identifier to define */ char op, /* option */ char tpe, /* type marker */ double z, /* float value if any */ int w, /* integer value if any */ entry *pval, /* pointer value if any */ char *base) /* string pointer if any */ { /*define t as real or integer, opcode= 'N' impose a new item under local conditions. check for pointers, too, in full macrolanguage version: Call with 'N','P',0.0, ksymbol ... for VAR parameter passing. Overwrite warning, beware: During 1st pass (macro definition), we already make symbol entries which are dummy globals ! we mark each id with its subckt level, and warn if write at higher one. */ char c; bool err, warn; entry *entry_p; /* spice table entry */ NGHASHPTR htable_p; /* hash table */ NG_IGNORE(pval); if (dico->stack_depth > 0) { /* can't be lazy anymore */ if (!(dico->local_symbols[dico->stack_depth])) dico->local_symbols[dico->stack_depth] = nghash_init(NGHASH_MIN_SIZE); htable_p = dico->local_symbols[dico->stack_depth]; } else { /* global symbol */ htable_p = dico->global_symbols; } entry_p = attrib(dico, htable_p, t, op); err = 0; if (!entry_p) { err = message(dico, " Symbol table overflow"); } else { if (entry_p->tp == 'P') entry_p = entry_p->pointer; /* pointer indirection */ if (entry_p) c = entry_p->tp; else c = ' '; if ((c == 'R') || (c == 'S') || (c == '?')) { entry_p->vl = z; entry_p->tp = tpe; entry_p->ivl = w; entry_p->sbbase = base; /* if ((c != '?') && (i <= dico->stack[dico->tos])) { */ if (c == '?') entry_p->level = dico->stack_depth; /* promote! */ /* warn about re-write to a global scope! */ if (entry_p->level < dico->stack_depth) warn = message(dico, "%s:%d overwritten.", t, entry_p->level); } else { /* suppress error message, resulting from multiple definition of symbols (devices) in .model lines with same name, but in different subcircuits. Subcircuit expansion is o.k., we have to deal with this numparam behaviour later. (H. Vogt 090426) */ if (0) message(dico, "%s: cannot redefine", t); } } return err; } bool defsubckt(tdico *dico, char *s, int w, char categ) /* called on 1st pass of spice source code, to enter subcircuit (categ=U) and model (categ=O) names */ { bool err; int i, j, ls; ls = length(s); i = 0; while ((i < ls) && (s[i] != '.')) i++; /* skip 1st dotword */ while ((i < ls) && (s[i] > ' ')) i++; while ((i < ls) && (s[i] <= ' ')) i++; /* skip blank */ j = i; while ((j < ls) && (s[j] > ' ')) j++; if (j > i) { SPICE_DSTRING ustr; /* temp user string */ spice_dstring_init(&ustr); pscopy_up(&ustr, s, i, j - i); err = define(dico, spice_dstring_value(&ustr), ' ', categ, 0.0, w, NULL, NULL); spice_dstring_free(&ustr); } else { err = message(dico, "Subcircuit or Model without name."); } return err; } int findsubckt(tdico *dico, char *s, SPICE_DSTRINGPTR subname) /* input: s is a subcircuit invocation line. returns 0 if not found, else the stored definition line number value and the name in string subname */ { entry *entry_p; /* symbol table entry */ SPICE_DSTRING ustr; /* u= subckt name is last token in string s */ int j, k; int line; /* stored line number */ spice_dstring_init(&ustr); k = length(s); while ((k >= 0) && (s[k] <= ' ')) k--; j = k; while ((k >= 0) && (s[k] > ' ')) k--; pscopy_up(&ustr, s, k + 1, j - k); entry_p = entrynb(dico, spice_dstring_value(&ustr)); if (entry_p && (entry_p->tp == 'U')) { line = entry_p->ivl; scopyd(subname, &ustr); } else { line = 0; spice_dstring_reinit(subname); message(dico, "Cannot find subcircuit."); } return line; } #if 0 /* unused, from the full macro language... */ static int deffuma( /* define function or macro entry. */ tdico *dico, char *t, char tpe, unsigned short bufstart, unsigned char *pjumped, bool *perr) { unsigned char jumped = *pjumped; bool err = *perr; /* if not jumped, define new function or macro, returns index to buffferstart if jumped, return index to existing function */ int i, j; Strbig(Llen, v); i = attrib(dico, t, ' '); j = 0; if (i <= 0) { err = message(dico, " Symbol table overflow"); } else { if (dico->dat[i].tp != '?') { /* old item! */ if (jumped) j = dico->dat[i].ivl; else err = message(dico, "%s already defined", t); } else { dico->dat[i].tp = tpe; dico->nfms++; j = dico->nfms; dico->dat[i].ivl = j; dico->fms[j].start = bufstart; /* = ibf->bufaddr = start addr in buffer */ } } *pjumped = jumped; *perr = err; return j; } #endif /************ input scanner stuff **************/ static unsigned char keyword(const char *keys, const char *t) { /* return 0 if t not found in list keys, else the ordinal number */ unsigned char i, j, k; int lt, lk; bool ok; lt = (int) strlen(t); lk = (int) strlen(keys); k = 0; j = 0; do { j++; i = 0; ok = 1; do { i++; k++; ok = (k <= lk) && (t[i - 1] == keys[k - 1]); } while (ok && (i < lt)); if (ok) ok = (k == lk) || (keys[k] <= ' '); if (!ok && (k < lk)) /* skip to next item */ while ((k <= lk) && (keys[k - 1] > ' ')) k++; } while (!ok && (k < lk)); if (ok) return j; else return 0; } static double parseunit(const char *s) /* the Spice suffixes */ { switch (toupper(s[0])) { case 'T': return 1e12; case 'G': return 1e9; case 'K': return 1e3; case 'M': return ci_prefix("MEG", s) ? 1e6 : 1e-3; case 'U': return 1e-6; case 'N': return 1e-9; case 'P': return 1e-12; case 'F': return 1e-15; default : return 1; } } static const char * fetchid(SPICE_DSTRINGPTR t, const char *s_end, const char *iptr) /* copy next identifier from s into t, advance and return scan index i */ { char c; bool ok; c = *iptr++; while (!alfa(c) && (iptr < s_end)) c = *iptr++; spice_dstring_reinit(t); cadd(t, upcase(c)); do { c = *iptr++; if (iptr > s_end) c = '\0'; c = upcase(c); ok = alfanum(c) || c == '.'; if (ok) cadd(t, c); } while (ok); return iptr - 1; /* return updated iptr */ } static double fetchnumber(tdico *dico, const char **pi, bool *perror) /* parse a Spice number in string s */ { double u; int n = 0; const char *s = *pi; if (1 != sscanf(s, "%lG%n", &u, &n)) { *perror = message(dico, "Number format error: \"%s\"", s); return 0.0; /* FIXME return NaN */ } u *= parseunit(s + n); /* swallow unit * FIXME `100MegBaz42' should emit an error message * FIXME should we allow whitespace ? `100 MEG' ? */ while (s[n] && alfa(s[n])) n++; *pi += n; return u; } static char fetchoperator(tdico *dico, const char *s_end, const char **pi, unsigned char *pstate, unsigned char *plevel, bool *perror) /* grab an operator from string s and advance scan index pi. each operator has: one-char alias, precedence level, new interpreter state. */ { const char *iptr = *pi; unsigned char state = *pstate; unsigned char level = *plevel; bool error = *perror; char c, d; c = *iptr++; d = *iptr; if (iptr >= s_end) d = '\0'; if ((c == '!') && (d == '=')) { c = '#'; iptr++; } else if ((c == '<') && (d == '>')) { c = '#'; iptr++; } else if ((c == '<') && (d == '=')) { c = 'L'; iptr++; } else if ((c == '>') && (d == '=')) { c = 'G'; iptr++; } else if ((c == '*') && (d == '*')) { c = '^'; iptr++; } else if ((c == '=') && (d == '=')) { iptr++; } else if ((c == '&') && (d == '&')) { c = 'A'; iptr++; } else if ((c == '|') && (d == '|')) { c = 'O'; iptr++; } if ((c == '+') || (c == '-')) { state = S_binop; /* pending operator */ level = 4; } else if ((c == '*') || (c == '/') || (c == '%') || (c == '\\')) { state = S_binop; level = 3; } else if (c == '^') { state = S_binop; level = 2; } else if (cpos(c, "=<>#GL") >= 0) { state = S_binop; level = 5; } else if (c == 'A') { state = S_binop; level = 6; } else if (c == 'O') { state = S_binop; level = 7; } else if (c == '!') { state = S_unop; } else if (c == '?') { state = S_binop; level = 9; } else if (c == ':') { state = S_binop; level = 8; } else { state = S_init; if (c > ' ') error = message(dico, "Syntax error: letter [%c]", c); } *pi = iptr; *pstate = state; *plevel = level; *perror = error; return c; } static double operate(char op, double x, double y) { /* execute operator op on a pair of reals */ /* bug: x:=x op y or simply x:=y for empty op? No error signalling! */ double u = 1.0; double z = 0.0; double t; switch (op) { case ' ': x = y; /* problem here: do type conversions ?! */ break; case '+': x = x + y; break; case '-': x = x - y; break; case '*': x = x * y; break; case '/': // if (absf(y) > epsi) x = x / y; break; case '^': /* power */ x = pow(fabs(x), y); break; case 'A': /* && */ x = ((x != 0.0) && (y != 0.0)) ? 1.0 : 0.0; break; case 'O': /* || */ x = ((x != 0.0) || (y != 0.0)) ? 1.0 : 0.0; break; case '=': if (x == y) x = u; else x = z; break; case '#': /* <> */ if (x != y) x = u; else x = z; break; case '>': if (x > y) x = u; else x = z; break; case '<': if (x < y) x = u; else x = z; break; case 'G': /* >= */ if (x >= y) x = u; else x = z; break; case 'L': /* <= */ if (x <= y) x = u; else x = z; break; case '!': /* ! */ if (y == z) x = u; else x = z; break; case '%': /* % */ t = (double)(np_trunc(x / y)); x = x - y * t; break; case '\\': /* / */ x = (double)(np_trunc(absf(x / y))); break; } return x; } static double formula(tdico *dico, const char *s, const char *s_end, bool *perror) { /* Expression parser. s is a formula with parentheses and math ops +-* / ... State machine and an array of accumulators handle operator precedence. Parentheses handled by recursion. Empty expression is forbidden: must find at least 1 atom. Syntax error if no toggle between binoperator && (unop/state1) ! States : 1=atom, 2=binOp, 3=unOp, 4= stop-codon. Allowed transitions: 1->2->(3,1) and 3->(3,1). */ typedef enum {nprece = 9} _nnprece; /* maximal nb of precedence levels */ bool error = *perror; bool negate = 0; unsigned char state, oldstate, topop, ustack, level, fu; double u = 0.0; double accu[nprece + 1]; char oper[nprece + 1]; char uop[nprece + 1]; int i, natom; bool ok; SPICE_DSTRING tstr; const char *s_orig = s; spice_dstring_init(&tstr); for (i = 0; i <= nprece; i++) { accu[i] = 0.0; oper[i] = ' '; } /* trim trailing whitespace */ while ((s_end > s) && (s_end[-1] <= ' ')) s_end--; state = S_init; natom = 0; ustack = 0; topop = 0; oldstate = S_init; fu = 0; error = 0; level = 0; while ((s < s_end) && !error) { char c = *s; if (c == '(') { /* sub-formula or math function */ double v = 1.0, w = 0.0; /* new: must support multi-arg functions */ const char *kptr = ++s; const char *arg2 = NULL; const char *arg3 = NULL; char d; level = 1; do { d = *kptr++; if (kptr > s_end) d = '\0'; if (d == '(') level++; else if (d == ')') level--; if ((d == ',') && (level == 1)) { if (arg2 == NULL) arg2 = kptr; else arg3 = kptr; /* kludge for more than 2 args (ternary expression) */ } /* comma list? */ } while ((kptr <= s_end) && !((d == ')') && (level <= 0))); // fixme, here level = 0 !!!!! (almost) if (kptr > s_end) { error = message(dico, "Closing \")\" not found."); natom++; /* shut up other error message */ } else { if (arg2 > s) { v = formula(dico, s, arg2 - 1, &error); s = arg2; } if (arg3 > s) { w = formula(dico, s, arg3 - 1, &error); s = arg3; } u = formula(dico, s, kptr - 1, &error); state = S_atom; if (fu > 0) { if ((fu == XFU_TERNARY_FCN)) u = ternary_fcn(v, w, u); else if ((fu == XFU_AGAUSS)) u = agauss(v, w, u); else if ((fu == XFU_GAUSS)) u = gauss(v, w, u); else if ((fu == XFU_UNIF)) u = unif(v, u); else if ((fu == XFU_AUNIF)) u = aunif(v, u); else if ((fu == XFU_LIMIT)) u = limit(v, u); else u = mathfunction(fu, v, u); } } s = kptr; fu = 0; } else if (alfa(c)) { s = fetchid(&tstr, s_end, s); /* user id, but sort out keywords */ state = S_atom; { fu = keyword(fmathS, spice_dstring_value(&tstr)); /* numeric function? */ if (fu == 0) u = fetchnumentry(dico, spice_dstring_value(&tstr), &error); else state = S_init; /* S_init means: ignore for the moment */ } } else if (((c == '.') || ((c >= '0') && (c <= '9')))) { u = fetchnumber(dico, &s, &error); if (negate) { u = -1 * u; negate = 0; } state = S_atom; } else { c = fetchoperator(dico, s_end, &s, &state, &level, &error); } /* may change c to some other operator char! */ /* control chars <' ' ignored */ ok = (oldstate == S_init) || (state == S_init) || ((oldstate == S_atom) && (state == S_binop)) || ((oldstate != S_atom) && (state != S_binop)); if (oldstate == S_binop && state == S_binop && c == '-') { ok = 1; negate = 1; continue; } if (!ok) error = message(dico, " Misplaced operator"); if (state == S_unop) { /* push unary operator */ uop[++ustack] = c; } else if (state == S_atom) { /* atom pending */ natom++; if (s >= s_end) { state = S_stop; level = topop; } /* close all ops below */ while (ustack > 0) u = operate(uop[ustack--], u, u); accu[0] = u; /* done: all pending unary operators */ } if ((state == S_binop) || (state == S_stop)) { /* do pending binaries of priority Upto "level" */ for (i = 1; i <= level; i++) { if (i < level && oper[i] == ':' && (oper[i+1] == '?' || oper[i+1] == 'x')) { if (oper[i+1] == 'x') { /* this is a `first-of-triple' op */ accu[i+1] = accu[i+1]; c = 'x'; /* transform next '?' to 'first-of-triple' */ } else if (accu[i+1] != 0.0) { /* this is a `true' ternary */ accu[i+1] = accu[i]; c = 'x'; /* transform next '?' to `first-of-triple' */ } else { /* this is a `false' ternary */ accu[i+1] = accu[i-1]; } accu[i-1] = 0.0; oper[i] = ' '; /* reset intermediates */ i++; accu[i-1] = 0.0; oper[i] = ' '; /* reset intermediates */ } else { /* not yet speed optimized! */ accu[i] = operate(oper[i], accu[i], accu[i-1]); accu[i-1] = 0.0; oper[i] = ' '; /* reset intermediates */ } } oper[level] = c; if (topop < level) topop = level; } if (state != S_init) oldstate = state; } if ((natom == 0) || (oldstate != S_stop)) error = message(dico, " Expression err: %s", s_orig); if (negate == 1) error = message(dico, " Problem with formula eval -- wrongly determined negation!"); *perror = error; spice_dstring_free(&tstr); if (error) return 1.0; else return accu[topop]; } static bool evaluate(tdico *dico, SPICE_DSTRINGPTR qstr_p, char *t, unsigned char mode) { /* transform t to result q. mode 0: expression, mode 1: simple variable */ double u = 0.0; int j, lq; char dt; entry *entry_p; bool numeric, done, nolookup; bool err; spice_dstring_reinit(qstr_p); numeric = 0; err = 0; if (mode == 1) { /* string? */ stupcase(t); entry_p = entrynb(dico, t); nolookup = !entry_p; while (entry_p && (entry_p->tp == 'P')) entry_p = entry_p->pointer; /* follow pointer chain */ /* pointer chain */ if (entry_p) dt = entry_p->tp; else dt = ' '; /* data type: Real or String */ if (dt == 'R') { u = entry_p->vl; numeric = 1; } else if (dt == 'S') { /* suppose source text "..." at */ j = entry_p->ivl; lq = 0; do { j++; lq++; dt = /* ibf->bf[j]; */ entry_p->sbbase[j]; if (cpos('3', spice_dstring_value(&dico->option)) <= 0) dt = upcase(dt); /* spice-2 */ done = (dt == '\"') || (dt < ' ') || (lq > 99); if (!done) cadd(qstr_p, dt); } while (!done); } if (!entry_p) err = message(dico, "\"%s\" not evaluated.%s", t, nolookup ? " Lookup failure." : ""); } else { u = formula(dico, t, t + strlen(t), &err); numeric = 1; } if (numeric) { /* we want *exactly* 25 chars, we have * sign, leading digit, '.', 'e', sign, upto 3 digits exponent * ==> 8 chars, thus we have 17 left for precision * don't print a leading '+', something choked */ char buf[ACT_CHARACTS + 1]; if (snprintf(buf, sizeof(buf), "% 25.17e", u) != ACT_CHARACTS) { fprintf(stderr, "ERROR: xpressn.c, %s(%d)\n", __FUNCTION__, __LINE__); controlled_exit(1); } scopys(qstr_p, buf); } return err; } #if 0 static bool scanline(tdico *dico, char *s, char *r, bool err) /* scan host code line s for macro substitution. r=result line */ { int i, k, ls, level, nd, nnest; bool spice3; char c, d; Strbig(Llen, q); Strbig(Llen, t); Str(20, u); spice3 = cpos('3', dico->option) > 0; /* we had -3 on the command line */ i = 0; ls = length(s); scopy(r, ""); err = 0; pscopy(u, s, 1, 3); if ((ls > 7) && steq(u, "**&")) { /* special Comment **&AC #... */ pscopy(r, s, 1, 7); i = 7; } while ((i < ls) && !err) { i++; c = s[i - 1]; if (c == Psp) { /* try ps expression syntax */ k = i; nnest = 1; do { k++; d = s[k - 1]; if (d == '{') nnest++; else if (d == '}') nnest--; } while ((nnest != 0) && (d != '\0')); if (d == '\0') { err = message(dico, "Closing \"}\" not found."); } else { pscopy(t, s, i + 1, k - i - 1); if (dico->hs_compatibility && (strcasecmp(t, "LAST") == 0)) { strcpy(q, "last"); err = 0; } else { err = evaluate(dico, q, t, 0); } } i = k; if (!err) /* insert number */ sadd(r, q); else err = message(dico, "%s", s); } else if (c == Intro) { Inc(i); while ((i < ls) && (s[i - 1] <= ' ')) i++; k = i; if (s[k - 1] == '(') { /* sub-formula */ level = 1; do { k++; if (k > ls) d = '\0'; else d = s[k - 1]; if (d == '(') level++; else if (d == ')') level--; } while ((k <= ls) && !((d == ')') && (level <= 0))); if (k > ls) { err = message(dico, "Closing \")\" not found."); } else { pscopy(t, s, i + 1, k - i - 1); err = evaluate(dico, q, t, 0); } i = k; } else { /* simple identifier may also be string */ do { k++; if (k > ls) d = '\0'; else d = s[k - 1]; } while ((k <= ls) && (d > ' ')); pscopy(t, s, i, k - i); err = evaluate(dico, q, t, 1); i = k - 1; } if (!err) /* insert the number */ sadd(r, q); else message(dico, "%s", s); } else if (c == Nodekey) { /* follows: a node keyword */ do i++; while (s[i - 1] <= ' '); k = i; do k++; while ((k <= ls) && alfanum(s[k - 1])); pscopy(q, s, i, k - i); nd = parsenode(Addr(dico->nodetab), q); if (!spice3) stri(nd, q); /* substitute by number */ sadd(r, q); i = k - 1; } else { if (!spice3) c = upcase(c); cadd(r, c); /* c<>Intro */ } } return err; } #endif /********* interface functions for spice3f5 extension ***********/ static int insertnumber(tdico *dico, int i, char *s, SPICE_DSTRINGPTR ustr_p) /* insert u in string s in place of the next placeholder number */ { const char *u = spice_dstring_value(ustr_p); char buf[ACT_CHARACTS+1]; long id = 0; int n = 0; char *p = strstr(s+i, "numparm__________"); if (p && (1 == sscanf(p, "numparm__________%8lx%n", &id, &n)) && (n == ACT_CHARACTS) && (id > 0) && (id < dynsubst + 1) && (snprintf(buf, sizeof(buf), "%-25s", u) == ACT_CHARACTS)) { memcpy(p, buf, ACT_CHARACTS); return (int)(p - s) + ACT_CHARACTS; } message (dico, "insertnumber: fails.\n" " s+i = \"%s\" u=\"%s\" id=%ld", s+i, u, id); /* swallow everything on failure */ return i + (int) strlen(s+i); } bool nupa_substitute(tdico *dico, char *s, char *r, bool err) /* s: pointer to original source line. r: pointer to result line, already heavily modified wrt s anywhere we find a 10-char numstring in r, substitute it. bug: wont flag overflow! */ { int i, k, ls, level, nnest, ir; char c, d; SPICE_DSTRING qstr; /* temp result dynamic string */ SPICE_DSTRING tstr; /* temp dynamic string */ spice_dstring_init(&qstr); spice_dstring_init(&tstr); i = 0; ls = length(s); err = 0; ir = 0; while ((i < ls) && !err) { i++; c = s[i - 1]; if (c == Psp) { /* try ps expression syntax */ k = i; nnest = 1; do { k++; d = s[k - 1]; if (d == '{') nnest++; else if (d == '}') nnest--; } while ((nnest != 0) && (d != '\0')); if (d == '\0') { err = message(dico, "Closing \"}\" not found."); } else { pscopy(&tstr, s, i , k - i - 1); /* exeption made for .meas */ if (strcasecmp(spice_dstring_value(&tstr), "LAST") == 0) { spice_dstring_reinit(&qstr); sadd(&qstr, "last"); err = 0; } else { err = evaluate(dico, &qstr, spice_dstring_value(&tstr), 0); } } i = k; if (!err) ir = insertnumber(dico, ir, r, &qstr); else err = message(dico, "Cannot compute substitute"); } else if (c == Intro) { /* skip "&&" which may occur in B source */ if ((i + 1 < ls) && (s[i] == Intro)) { i++; continue; } i++; while ((i < ls) && (s[i - 1] <= ' ')) i++; k = i; if (s[k - 1] == '(') { /* sub-formula */ level = 1; do { k++; if (k > ls) d = '\0'; else d = s[k - 1]; if (d == '(') level++; else if (d == ')') level--; } while ((k <= ls) && !((d == ')') && (level <= 0))); if (k > ls) { err = message(dico, "Closing \")\" not found."); } else { pscopy(&tstr, s, i, k - i - 1); err = evaluate(dico, &qstr, spice_dstring_value(&tstr), 0); } i = k; } else { /* simple identifier may also be string? */ do { k++; if (k > ls) d = '\0'; else d = s[k - 1]; } while ((k <= ls) && (d > ' ')); pscopy(&tstr, s, i-1, k - i); err = evaluate(dico, &qstr, spice_dstring_value(&tstr), 1); i = k - 1; } if (!err) ir = insertnumber(dico, ir, r, &qstr); else message(dico, "Cannot compute &(expression)"); } } spice_dstring_free(&qstr); spice_dstring_free(&tstr); return err; } static void getword(char *s, SPICE_DSTRINGPTR tstr_p, int after, int *pi) /* isolate a word from s after position "after". return i= last read+1 */ { int i = *pi; int ls; i = after; ls = length(s); do i++; while ((i < ls) && !alfa(s[i - 1])); spice_dstring_reinit(tstr_p); while ((i <= ls) && (alfa(s[i - 1]) || num(s[i - 1]))) { cadd(tstr_p, upcase(s[i - 1])); i++; } *pi = i; } static char getexpress(char *s, SPICE_DSTRINGPTR tstr_p, int *pi) /* returns expression-like string until next separator Input i=position before expr, output i=just after expr, on separator. returns tpe=='R' if (numeric, 'S' if (string only */ { int i = *pi; int ia, ls, level; char c, d, tpe; bool comment = 0; ls = length(s); ia = i + 1; while ((ia < ls) && (s[ia - 1] <= ' ')) ia++; /*white space ? */ if (s[ia - 1] == '"') { /* string constant */ ia++; i = ia; while ((i < ls) && (s[i - 1] != '"')) i++; tpe = 'S'; do i++; while ((i <= ls) && (s[i - 1] <= ' ')); } else { if (s[ia - 1] == '{') ia++; i = ia - 1; do { i++; if (i > ls) c = ';'; else c = s[i - 1]; if (c == '(') { /* sub-formula */ level = 1; do { i++; if (i > ls) d = '\0'; else d = s[i - 1]; if (d == '(') level++; else if (d == ')') level--; } while ((i <= ls) && !((d == ')') && (level <= 0))); } /* buggy? */ if ((c == '/') || (c == '-')) comment = (s[i] == c); } while (!((cpos (c, ",;)}") >= 0) || comment)); /* legal separators */ tpe = 'R'; } pscopy(tstr_p, s, ia-1, i - ia); if (s[i - 1] == '}') i++; if (tpe == 'S') i++; /* beyond quote */ *pi = i; return tpe; } bool nupa_assignment(tdico *dico, char *s, char mode) /* is called for all 'Param' lines of the input file. is also called for the params: section of a subckt . mode='N' define new local variable, else global... bug: we cannot rely on the transformed line, must re-parse everything! */ { /* s has the format: ident = expression; ident= expression ... */ int i, j, ls; bool error, err; char dtype; int wval = 0; double rval = 0.0; char *t_p; /* dstring contents value */ SPICE_DSTRING tstr; /* temporary dstring */ SPICE_DSTRING ustr; /* temporary dstring */ spice_dstring_init(&tstr); spice_dstring_init(&ustr); ls = length(s); error = 0; i = 0; j = spos_("//", s); /* stop before comment if any */ if (j >= 0) ls = j; /* bug: doesnt work. need to revise getexpress ... !!! */ i = 0; while ((i < ls) && (s[i] <= ' ')) i++; if (s[i] == Intro) i++; if (s[i] == '.') /* skip any dot keyword */ while (s[i] > ' ') i++; while ((i < ls) && !error) { getword(s, &tstr, i, &i); t_p = spice_dstring_value(&tstr); if (t_p[0] == '\0') error = message(dico, " Identifier expected"); if (!error) { /* assignment expressions */ while ((i <= ls) && (s[i - 1] != '=')) i++; if (i > ls) error = message(dico, " = sign expected ."); dtype = getexpress(s, &ustr, &i); if (dtype == 'R') { const char *tmp = spice_dstring_value(&ustr); rval = formula(dico, tmp, tmp + strlen(tmp), &error); if (error) { message(dico, " Formula() error."); fprintf(stderr, " %s\n", s); } } else if (dtype == 'S') { wval = i; } err = define(dico, spice_dstring_value(&tstr), mode /* was ' ' */ , dtype, rval, wval, NULL, NULL); error = error || err; } if ((i < ls) && (s[i - 1] != ';')) error = message(dico, " ; sign expected."); /* else i++; */ } spice_dstring_free(&tstr); spice_dstring_free(&ustr); return error; } bool nupa_subcktcall(tdico *dico, char *s, char *x, bool err) /* s= a subckt define line, with formal params. x= a matching subckt call line, with actual params */ { int n, i, j, found_j, k, g, h, narg = 0, ls, nest; SPICE_DSTRING subname; SPICE_DSTRING tstr; SPICE_DSTRING ustr; SPICE_DSTRING vstr; SPICE_DSTRING idlist; SPICE_DSTRING parsebuf; char *buf, *token; char *t_p; char *u_p; bool found; spice_dstring_init(&subname); spice_dstring_init(&tstr); spice_dstring_init(&ustr); spice_dstring_init(&vstr); spice_dstring_init(&idlist); /* skip over instance name -- fixes bug where instance 'x1' is same name as subckt 'x1' */ while (*x != ' ') x++; /***** first, analyze the subckt definition line */ n = 0; /* number of parameters if any */ ls = length(s); j = spos_("//", s); if (j >= 0) pscopy_up(&tstr, s, 0, j); else scopy_up(&tstr, s); j = spos_("SUBCKT", spice_dstring_value(&tstr)); if (j >= 0) { j = j + 6; /* fetch its name - skip subckt */ t_p = spice_dstring_value(&tstr); while ((j < ls) && (t_p[j] <= ' ')) j++; while (t_p[j] != ' ') { cadd(&subname, t_p[j]); j++; } } else { err = message(dico, " ! a subckt line!"); } i = spos_("PARAMS:", spice_dstring_value(&tstr)); if (i >= 0) { const char *optr, *jptr; pscopy(&tstr, spice_dstring_value(&tstr), i + 7, spice_dstring_length(&tstr)); /* search identifier to the left of '=' assignments */ for (optr = spice_dstring_value(&tstr); (jptr = strchr(optr, '=')) != NULL; optr = jptr + 1) { const char *kptr, *hptr; /* skip "==" */ if (jptr[1] == '=') { jptr++; continue; } /* skip "<=" ">=" "!=" */ if (jptr > optr && strchr("<>!", jptr[-1])) continue; kptr = jptr; while (--kptr >= optr && isspace(*kptr)) ; hptr = kptr; while (hptr >= optr && alfanum(*hptr)) hptr--; if (hptr < kptr && alfa(hptr[1])) { while (hptr++ < kptr) cadd(&idlist, *hptr); sadd(&idlist, "=$;"); n++; } else { message(dico, "identifier expected."); } } } /***** next, analyze the circuit call line */ if (!err) { narg = 0; j = spos_("//", x); if (j >= 0) { pscopy_up(&tstr, x, 0, j); } else { scopy_up(&tstr, x); j = 0; } ls = spice_dstring_length(&tstr); spice_dstring_init(&parsebuf); scopyd(&parsebuf, &tstr); buf = spice_dstring_value(&parsebuf); found = found_j = 0; token = strtok(buf, " "); /* a bit more exact - but not sufficient everytime */ j = j + (int) strlen(token) + 1; if (strcmp(token, spice_dstring_value(&subname))) while ((token = strtok(NULL, " ")) != NULL) { if (!strcmp(token, spice_dstring_value(&subname))) { found = 1; found_j = j; } j = j + (int) strlen(token) + 1; } j = found_j; /* last occurence of subname in buf */ spice_dstring_free(&parsebuf); /* make sure that subname followed by space */ if (found) { j = j + spice_dstring_length(&subname) + 1; /* 1st position of arglist: j */ t_p = spice_dstring_value(&tstr); while ((j < ls) && ((t_p[j] <= ' ') || (t_p[j] == ','))) j++; while (j < ls) { /* try to fetch valid arguments */ k = j; spice_dstring_reinit(&ustr); if (t_p[k] == Intro) { /* handle historical syntax... */ if (alfa(t_p[k + 1])) { k++; } else if (t_p[k + 1] == '(') { /* transform to braces... */ k++; t_p[k] = '{'; g = k; nest = 1; while ((nest > 0) && (g < ls)) { g++; if (t_p[g] == '(') nest++; else if (t_p[g] == ')') nest--; } if ((g < ls) && (nest == 0)) t_p[g] = '}'; } } if (alfanum(t_p[k]) || t_p[k] == '.') { /* number, identifier */ h = k; while (t_p[k] > ' ') k++; pscopy(&ustr, spice_dstring_value(&tstr), h, k - h); j = k; } else if (t_p[k] == '{') { getexpress(spice_dstring_value(&tstr), &ustr, &j); j--; /* confusion: j was in Turbo Pascal convention */ } else { j++; if (t_p[k] > ' ') { spice_dstring_append(&vstr, "Subckt call, symbol ", -1); cadd(&vstr, t_p[k]); sadd(&vstr, " not understood"); message(dico, "%s", spice_dstring_value(&vstr)); } } u_p = spice_dstring_value(&ustr); if (u_p[0]) { narg++; k = cpos('$', spice_dstring_value(&idlist)); if (k >= 0) { /* replace dollar with expression string u */ pscopy(&vstr, spice_dstring_value(&idlist), 0, k); sadd(&vstr, spice_dstring_value(&ustr)); pscopy(&ustr, spice_dstring_value(&idlist), k+1, spice_dstring_length(&idlist)); scopyd(&idlist, &vstr); sadd(&idlist, spice_dstring_value(&ustr)); } } } } else { message(dico, "Cannot find called subcircuit"); } } /***** finally, execute the multi-assignment line */ dicostack(dico, Push); /* create local symbol scope */ if (narg != n) { err = message(dico, " Mismatch: %d formal but %d actual params.\n" "%s", n, narg, spice_dstring_value(&idlist)); /* ;} else { debugwarn(dico, idlist) */ } err = nupa_assignment(dico, spice_dstring_value(&idlist), 'N'); spice_dstring_free(&subname); spice_dstring_free(&tstr); spice_dstring_free(&ustr); spice_dstring_free(&vstr); spice_dstring_free(&idlist); return err; } void nupa_subcktexit(tdico *dico) { dicostack(dico, Pop); } ngspice-26/src/frontend/numparam/general.h0000644000265600020320000000327412264261473020253 0ustar andreasadmin/* general.h */ /* include beforehand the following: #include // NULL FILE fopen feof fgets fclose fputs fputc gets #include the function code is in 'mystring.c' . */ #include "ngspice/dstring.h" #include "ngspice/bool.h" typedef char string[258]; void sfix(SPICE_DSTRINGPTR dstr_p, int len); char *pscopy(SPICE_DSTRINGPTR s, const char *a, int i, int j); char *pscopy_up(SPICE_DSTRINGPTR s, const char *a, int i, int j); bool scopyd(SPICE_DSTRINGPTR a, SPICE_DSTRINGPTR b); bool scopys(SPICE_DSTRINGPTR a, const char *b); bool scopy_up(SPICE_DSTRINGPTR a, const char *str); bool scopy_lower(SPICE_DSTRINGPTR a, const char *str); bool ccopy(SPICE_DSTRINGPTR a, char c); bool sadd(SPICE_DSTRINGPTR s, const char *t); bool nadd(SPICE_DSTRINGPTR s, long n); bool cadd(SPICE_DSTRINGPTR s, char c); bool naddll(SPICE_DSTRINGPTR s, long long n); bool cins(SPICE_DSTRINGPTR s, char c); bool sins(SPICE_DSTRINGPTR s, const char *t); int cpos(char c, char *s); int spos_(char *sub, const char *s); bool ci_prefix(const char *p, const char *s); int length(const char *s); bool steq(const char *s, const char *t); bool stne(const char *s, const char *t); void stri(long n, SPICE_DSTRINGPTR s); char upcase(char c); char lowcase(char c); bool alfa(char c); bool num(char c); bool alfanum(char c); char *stupcase(char *s); /***** primitive input-output ***/ int yes_or_no(void); char rc(void); int freadstr(FILE *f, SPICE_DSTRINGPTR dstr_p); long np_round(double d); // sjb to avoid clash with round() in math.h long np_trunc(double x); // sjb to avoid clash with trunc() in math.h double absf(double x); /* abs */ long absi(long i); void *new(size_t sz); void dispose(void *p); ngspice-26/src/frontend/numparam/numparam.h0000644000265600020320000000547412264261473020462 0ustar andreasadmin/* * numparam.h */ /*** interface to spice frontend subckt.c ***/ #include "numpaif.h" #include "ngspice/hash.h" /***** numparam internals ********/ typedef enum {Nodekey = '#'} _nNodekey; /* Introduces node symbol */ typedef enum {Intro = '&'} _nIntro; /* Introduces preprocessor tokens */ typedef enum {Comment = '*'} _nComment; /* Spice Comment lines */ typedef enum {Psp = '{'} _nPsp; /* Ps expression */ typedef char *auxtable; /* dummy */ /* ----------------------------------------------------------------- * I believe the entry should be a union of type but I need more info. * ----------------------------------------------------------------- */ typedef struct _tentry { char tp; /* type: I)nt R)eal S)tring F)unction M)acro P)ointer */ char *symbol; int level; /* subckt nesting level */ double vl; /* float value if defined */ int ivl; /* int value or string buffer index */ char *sbbase; /* string buffer base address if any */ struct _tentry *pointer; /* pointer chain */ } entry; typedef struct _tfumas { /*function,macro,string*/ unsigned start; /*,stop*/ /* buffer index or location */ } fumas; typedef struct _ttdico { /* the input scanner data structure */ SPICE_DSTRING srcfile; /* last piece of source file name */ SPICE_DSTRING option; /* one-character translator options */ SPICE_DSTRING lookup_buf; /* useful temp buffer for quick symbol lookup */ int srcline; int oldline; int errcount; int symbol_stack_alloc; /* stack allocation */ int stack_depth; /* current depth of the symbol stack */ NGHASHPTR global_symbols; /* hash table of globally defined symbols for quick lookup */ NGHASHPTR *local_symbols; /* stack of locally defined symbols */ NGHASHPTR inst_symbols; /* instance qualified symbols - after a pop */ char **inst_name; /* name of subcircuit */ fumas fms[101]; int nfms; /* number of functions & macros */ auxtable nodetab; char **dynrefptr; char *dyncategory; int hs_compatibility; /* allow extra keywords */ } tdico; void initdico(tdico *dico); int donedico(tdico *dico); void dico_free_entry(entry *entry_p); bool defsubckt(tdico *dico, char *s, int w, char categ); int findsubckt(tdico *dico, char *s, SPICE_DSTRINGPTR subname); bool nupa_substitute(tdico *dico, char *s, char *r, bool err); bool nupa_assignment(tdico *dico, char *s, char mode); bool nupa_subcktcall(tdico *dico, char *s, char *x, bool err); void nupa_subcktexit(tdico *dico); tdico *nupa_fetchinstance(void); char getidtype(tdico *d, char *s); entry *attrib(tdico *d, NGHASHPTR htable, char *t, char op); void del_attrib(void *); ngspice-26/src/frontend/numparam/spicenum.c0000644000265600020320000006667312264261473020470 0ustar andreasadmin/* spicenum.c Copyright (C) 2002 Georg Post * * This file is part of Numparam, see: readme.txt * Free software under the terms of the GNU Lesser General Public License */ /* number parameter add-on for Spice. to link with mystring.o, xpressn.o (math formula interpreter), and with Spice frontend src/lib/fte.a . Interface function nupa_signal to tell us about automaton states. Buglist (some are 'features'): blank lines get category '*' inserts conditional blanks before or after braces between .control and .endc, flags all lines as 'category C', dont touch. there are reserved magic numbers (1e9 + n) as placeholders control lines must not contain {} . ignores the '.option numparam' line planned to trigger the actions operation of .include certainly doesnt work there are frozen maxima for source and expanded circuit size. Todo: add support for nested .if .elsif .else .endif controls. */ #include "ngspice/ngspice.h" #include "general.h" #include "numparam.h" #include "ngspice/fteext.h" /* controlled_exit() */ extern bool ft_batchmode; void dump_symbols(tdico *dico_p); char *nupa_inst_name; /* number of parameter substitutions, available only after the substitution */ extern long dynsubst; /* spicenum.c:144 */ /* number of lines in input deck */ extern int dynmaxline; /* inpcom.c:1529 */ /* Uncomment this line to allow debug tracing */ /* #define TRACE_NUMPARAMS */ /* the nupa_signal arguments sent from Spice: sig=1: Start of the subckt expansion. sig=2: Stop of the subckt expansion. sig=3: Stop of the evaluation phase. sig=0: Start of a deck copy operation After sig=1 until sig=2, nupa_copy does no transformations. At sig=2, we prepare for nupa_eval loop. After sig=3, we assume the initial state (clean). In Clean state, a lot of deckcopy operations come in and we overwrite any line pointers, or we start a new set after each sig=0 ? Anyway, we neutralize all & and .param lines (category[] array!) and we substitute all {} &() and &id placeholders by dummy identifiers. those look like numparm__________XXXXXXXX (8 hexadecimal digits) */ /********** string handling ***********/ static long placeholder = 0; static void stripsomespace(SPICE_DSTRINGPTR dstr_p, unsigned char incontrol) { /* if s starts with one of some markers, strip leading space */ int i, ls; char *sstr; /* string contained in s */ SPICE_DSTRING markers; spice_dstring_init(&markers); scopys(&markers, "*.&+#$"); if (!incontrol) sadd(&markers, "xX"); sstr = spice_dstring_value(dstr_p); ls = spice_dstring_length(dstr_p); i = 0; while ((i < ls) && (sstr[i] <= ' ')) i++; if ((i > 0) && (i < ls) && (cpos(sstr[i], spice_dstring_value(&markers)) >= 0)) pscopy(dstr_p, sstr, i, ls); } static int stripbraces(SPICE_DSTRINGPTR dstr_p) /* puts the funny placeholders. returns the number of {...} substitutions */ { int n, i, nest, ls, j; char *s; /* value of dynamic string */ char *t_p; /* value of t dynamic string */ SPICE_DSTRING tstr; /* temporary dynamic string */ n = 0; spice_dstring_init(&tstr); s = spice_dstring_value(dstr_p); ls = spice_dstring_length(dstr_p); i = 0; while (i < ls) { if (s[i] == '{') { /* something to strip */ j = i + 1; nest = 1; n++; while ((nest > 0) && (j < ls)) { if (s[j] == '{') nest++; else if (s[j] == '}') nest--; j++; } pscopy(&tstr, s, 0, i); placeholder++; t_p = spice_dstring_value(&tstr); if (t_p[i - 1] > ' ') cadd(&tstr, ' '); cadd(&tstr, ' '); { char buf[25+1]; sprintf(buf, "numparm__________%08lx", placeholder); sadd(&tstr, buf); } cadd(&tstr, ' '); if (s[j] >= ' ') cadd(&tstr, ' '); i = spice_dstring_length(&tstr); pscopy(dstr_p, s, j, ls); sadd(&tstr, s); scopyd(dstr_p, &tstr); s = spice_dstring_value(dstr_p); ls = spice_dstring_length(dstr_p); } else { i++; } } dynsubst = placeholder; spice_dstring_free(&tstr); return n; } static int findsubname(tdico *dico, SPICE_DSTRINGPTR dstr_p) /* truncate the parameterized subckt call to regular old Spice */ /* scan a string from the end, skipping non-idents and {expressions} */ /* then truncate s after the last subckt(?) identifier */ { SPICE_DSTRING name; /* extract a name */ char *s; /* current dstring */ int h, j, k, nest, ls; int found; h = 0; ls = spice_dstring_length(dstr_p); s = spice_dstring_value(dstr_p); k = ls - 1; /* now a C - string */ found = 0; spice_dstring_init(&name); while ((k >= 0) && (!found)) { /* skip space, then non-space */ while ((k >= 0) && (s[k] <= ' ')) k--; h = k + 1; /* at h: space */ while ((k >= 0) && (s[k] > ' ')) { if (s[k] == '}') { nest = 1; k--; while ((nest > 0) && (k >= 0)) { if (s[k] == '{') nest--; else if (s[k] == '}') nest++; k--; } h = k + 1; /* h points to '{' */ } else { k--; } } found = (k >= 0) && alfanum(s[k + 1]); /* suppose an identifier */ if (found) { /* check for known subckt name */ spice_dstring_reinit(&name); j = k + 1; while (alfanum(s[j])) { cadd(&name, upcase(s[j])); j++; } found = (getidtype(dico, spice_dstring_value(&name)) == 'U'); } } if (found && (h < ls)) pscopy(dstr_p, s, 0, h); return h; } static void modernizeex(SPICE_DSTRINGPTR dstr_p) /* old style expressions &(..) and &id --> new style with braces. */ { int i, state, ls; char c, d; char *s; /* current string */ SPICE_DSTRING t; /* temporary dyna string */ i = 0; state = 0; ls = spice_dstring_length(dstr_p); s = spice_dstring_value(dstr_p); /* check if string might need modernizing */ if (!memchr(s, Intro, (size_t) ls)) return; spice_dstring_init(&t); while (i < ls) { c = s[i]; d = s[i + 1]; if ((!state) && (c == Intro) && (i > 0)) { if (d == '(') { state = 1; i++; c = '{'; } else if (alfa(d)) { cadd(&t, '{'); i++; while (alfanum(s[i])) { cadd(&t, s[i]); i++; } c = '}'; i--; } } else if (state) { if (c == '(') state++; else if (c == ')') state--; if (!state) /* replace--) by terminator */ c = '}'; } cadd(&t, c); i++; } scopyd(dstr_p, &t); spice_dstring_free(&t); } static char transform(tdico *dico, SPICE_DSTRINGPTR dstr_p, unsigned char nostripping, SPICE_DSTRINGPTR u_p) /* line s is categorized and crippled down to basic Spice * returns in u control word following dot, if any * * any + line is copied as-is. * any & or .param line is commented-out. * any .subckt line has params section stripped off * any X line loses its arguments after sub-circuit name * any &id or &() or {} inside line gets a 10-digit substitute. * * strip the new syntax off the codeline s, and * return the line category as follows: * '*' comment line * '+' continuation line * ' ' other untouched netlist or command line * 'P' parameter line, commented-out; (name,linenr)-> symbol table. * 'S' subckt entry line, stripped; (name,linenr)-> symbol table. * 'U' subckt exit line * 'X' subckt call line, stripped * 'C' control entry line * 'E' control exit line * '.' any other dot line * 'B' netlist (or .model ?) line that had Braces killed */ { int k, a, n; char *s; /* dstring value of dstr_p */ char *t; /* dstring value of tstr */ char category; SPICE_DSTRING tstr; /* temporary string */ spice_dstring_init(&tstr); spice_dstring_reinit(u_p); stripsomespace(dstr_p, nostripping); modernizeex(dstr_p); /* required for stripbraces count */ s = spice_dstring_value(dstr_p); if (s[0] == '.') { /* check PS parameter format */ scopy_up(&tstr, spice_dstring_value(dstr_p)); k = 1; t = spice_dstring_value(&tstr); while (t[k] > ' ') { cadd(u_p, t[k]); k++; } if (ci_prefix(".PARAM", t) == 1) { /* comment it out */ /* s[0] = '*'; */ category = 'P'; } else if (ci_prefix(".SUBCKT", t) == 1) { /* split off any "params" tail */ a = spos_("PARAMS:", t); if (a >= 0) pscopy(dstr_p, s, 0, a); category = 'S'; } else if (ci_prefix(".CONTROL", t) == 1) { category = 'C'; } else if (ci_prefix(".ENDC", t) == 1) { category = 'E'; } else if (ci_prefix(".ENDS", t) == 1) { category = 'U'; } else { category = '.'; n = stripbraces(dstr_p); if (n > 0) category = 'B'; /* priority category ! */ } } else if (s[0] == Intro) { /* private style preprocessor line */ s[0] = '*'; category = 'P'; } else if (upcase(s[0]) == 'X') { /* strip actual parameters */ findsubname(dico, dstr_p); /* i= index following last identifier in s */ category = 'X'; } else if (s[0] == '+') { /* continuation line */ category = '+'; } else if (cpos(s[0], "*$#") < 0) { /* not a comment line! */ n = stripbraces(dstr_p); if (n > 0) category = 'B'; /* line that uses braces */ else category = ' '; /* ordinary code line */ } else { category = '*'; } spice_dstring_free(&tstr); return category; } /************ core of numparam **************/ /* some day, all these nasty globals will go into the tdico structure and everything will get hidden behind some "handle" ... For the time being we will rename this variable to end in S so we know they are statics within this file for easier reading of the code. */ static int linecountS = 0; /* global: number of lines received via nupa_copy */ static int evalcountS = 0; /* number of lines through nupa_eval() */ static int nblogS = 0; /* serial number of (debug) logfile */ static unsigned char inexpansionS = 0; /* flag subckt expansion phase */ static unsigned char incontrolS = 0; /* flag control code sections */ static unsigned char dologfileS = 0; /* for debugging */ static unsigned char firstsignalS = 1; static FILE *logfileS = NULL; static tdico *dicoS = NULL; /* already part of dico : */ /* Open ouput to a log file. takes no action if logging is disabled. Open the log if not already open. */ static void putlogfile(char c, int num, char *t) { SPICE_DSTRING fname; /* file name */ SPICE_DSTRING u; /* temp dynamic variable */ spice_dstring_init(&fname); spice_dstring_init(&u); if (dologfileS) { if ((logfileS == NULL)) { scopys(&fname, "logfile."); nblogS++; nadd(&fname, nblogS); logfileS = fopen(spice_dstring_value(&fname), "w"); } if ((logfileS != NULL)) { cadd(&u, c); nadd(&u, num); cadd(&u, ':'); cadd(&u, ' '); sadd(&u, t); cadd(&u, '\n'); fputs(spice_dstring_value(&u), logfileS); } } spice_dstring_free(&u); spice_dstring_free(&fname); } static void nupa_init(char *srcfile) { int i; /* init the symbol table and so on, before the first nupa_copy. */ evalcountS = 0; linecountS = 0; incontrolS = 0; placeholder = 0; dicoS = (tdico *) new(sizeof(tdico)); initdico(dicoS); dicoS->dynrefptr = TMALLOC(char*, dynmaxline + 1); dicoS->dyncategory = TMALLOC(char, dynmaxline + 1); for (i = 0; i <= dynmaxline; i++) { dicoS->dynrefptr[i] = NULL; dicoS->dyncategory[i] = '?'; } if (srcfile != NULL) scopys(&dicoS->srcfile, srcfile); } /* free dicoS (called from com_remcirc()) */ void nupa_del_dicoS(void) { int i; if(!dicoS) return; for (i = dynmaxline; i >= 0; i--) dispose(dicoS->dynrefptr[i]); dispose(dicoS->dynrefptr); dispose(dicoS->dyncategory); dispose(dicoS->inst_name); dispose(dicoS->local_symbols); nghash_free(dicoS->global_symbols, del_attrib, NULL); dispose(dicoS); dicoS = NULL; } static void nupa_done(void) { /* int i; not needed so far, see below */ SPICE_DSTRING rep; /* dynamic report */ int dictsize, nerrors; spice_dstring_init(&rep); if (logfileS != NULL) { fclose(logfileS); logfileS = NULL; } nerrors = dicoS->errcount; dictsize = donedico(dicoS); /* We cannot remove dicoS here because numparam is used by the .measure statements, which are invoked only after the simulation has finished. */ if (nerrors) { /* debug: ask if spice run really wanted */ sadd(&rep, " Copies="); nadd(&rep, linecountS); sadd(&rep, " Evals="); nadd(&rep, evalcountS); sadd(&rep, " Placeholders="); nadd(&rep, placeholder); sadd(&rep, " Symbols="); nadd(&rep, dictsize); sadd(&rep, " Errors="); nadd(&rep, nerrors); cadd(&rep, '\n'); printf("%s", spice_dstring_value(&rep)); if (ft_batchmode) controlled_exit(EXIT_FAILURE); for (;;) { int c; printf("Numparam expansion errors: Run Spice anyway? y/n ?\n"); c = yes_or_no(); if (c == 'n' || c == EOF) controlled_exit(EXIT_FAILURE); if (c == 'y') break; } } linecountS = 0; evalcountS = 0; placeholder = 0; /* release symbol table data */ } /* SJB - Scan the line for subcircuits */ void nupa_scan(char *s, int linenum, int is_subckt) { if (is_subckt) defsubckt(dicoS, s, linenum, 'U'); else defsubckt(dicoS, s, linenum, 'O'); } /* ----------------------------------------------------------------- * Dump the contents of a symbol table. * ----------------------------------------------------------------- */ static void dump_symbol_table(tdico *dico_p, NGHASHPTR htable_p, FILE *cp_out) { char *name; /* current symbol */ entry *entry_p; /* current entry */ NGHASHITER iter; /* hash iterator - thread safe */ NGHASH_FIRST(&iter); for (entry_p = (entry *) nghash_enumerateRE(htable_p, &iter); entry_p; entry_p = (entry *) nghash_enumerateRE(htable_p, &iter)) { if (entry_p->tp == 'R') { spice_dstring_reinit(& dico_p->lookup_buf); scopy_lower(& dico_p->lookup_buf, entry_p->symbol); name = spice_dstring_value(& dico_p->lookup_buf); fprintf(cp_out, " ---> %s = %g\n", name, entry_p->vl); spice_dstring_free(& dico_p->lookup_buf); } } } /* ----------------------------------------------------------------- * Dump the contents of the symbol table. * ----------------------------------------------------------------- */ void nupa_list_params(FILE *cp_out) { int depth; /* nested subcircit depth */ tdico *dico_p; /* local copy for speed */ NGHASHPTR htable_p; /* current hash table */ dico_p = dicoS; if (dico_p == NULL) { fprintf(cp_err, "\nWarning: No symbol table available for 'listing param'\n"); return; } fprintf(cp_out, "\n\n"); /* ----------------------------------------------------------------- * Print out the locally defined symbols from highest to lowest priority. * If there are no parameters, the hash table will not be allocated as * we use lazy allocation to save memory. * ----------------------------------------------------------------- */ for (depth = dico_p->stack_depth; depth > 0; depth--) { htable_p = dico_p->local_symbols[depth]; if (htable_p) { fprintf(cp_out, " local symbol definitions for:%s\n", dico_p->inst_name[depth]); dump_symbol_table(dico_p, htable_p, cp_out); } } /* ----------------------------------------------------------------- * Finally dump the global symbols. * ----------------------------------------------------------------- */ fprintf(cp_out, " global symbol definitions:\n"); dump_symbol_table(dico_p, dico_p->global_symbols, cp_out); } /* ----------------------------------------------------------------- * Lookup a parameter value in the symbol tables. This involves * multiple lookups in various hash tables in order to get the scope * correct. Each subcircuit instance will have its own local hash * table if it has parameters. We can return whenever we get a hit. * Otherwise, we have to exhaust all of the tables including the global * table. * ----------------------------------------------------------------- */ double nupa_get_param(char *param_name, int *found) { int depth; /* nested subcircit depth */ char *up_name; /* current parameter upper case */ entry *entry_p; /* current entry */ tdico *dico_p; /* local copy for speed */ NGHASHPTR htable_p; /* current hash table */ double result = 0; /* parameter value */ dico_p = dicoS; spice_dstring_reinit(& dico_p->lookup_buf); scopy_up(& dico_p->lookup_buf, param_name); up_name = spice_dstring_value(& dico_p->lookup_buf); *found = 0; for (depth = dico_p->stack_depth; depth > 0; depth--) { htable_p = dico_p->local_symbols[depth]; if (htable_p) { entry_p = (entry *) nghash_find(htable_p, up_name); if (entry_p) { result = entry_p->vl; *found = 1; break; } } } if (!(*found)) { /* No luck. Try the global table. */ entry_p = (entry *) nghash_find(dico_p->global_symbols, up_name); if (entry_p) { result = entry_p->vl; *found = 1; } } spice_dstring_free(& dico_p->lookup_buf); return result; } void nupa_add_param(char *param_name, double value) { char *up_name; /* current parameter upper case */ entry *entry_p; /* current entry */ tdico *dico_p; /* local copy for speed */ NGHASHPTR htable_p; /* hash table of interest */ dico_p = dicoS; /* ----------------------------------------------------------------- * We use a dynamic string here because most of the time we will * be using short names and no memory allocation will occur. * ----------------------------------------------------------------- */ spice_dstring_reinit(& dico_p->lookup_buf); scopy_up(& dico_p->lookup_buf, param_name); up_name = spice_dstring_value(& dico_p->lookup_buf); if (dico_p->stack_depth > 0) { /* can't be lazy anymore */ if (!(dico_p->local_symbols[dico_p->stack_depth])) dico_p->local_symbols[dico_p->stack_depth] = nghash_init(NGHASH_MIN_SIZE); htable_p = dico_p->local_symbols[dico_p->stack_depth]; } else { /* global symbol */ htable_p = dico_p->global_symbols; } entry_p = attrib(dico_p, htable_p, up_name, 'N'); if (entry_p) { entry_p->vl = value; entry_p->tp = 'R'; entry_p->ivl = 0; entry_p->sbbase = NULL; } spice_dstring_free(& dico_p->lookup_buf); } void nupa_add_inst_param(char *param_name, double value) { char *up_name; /* current parameter upper case */ entry *entry_p; /* current entry */ tdico *dico_p; /* local copy for speed */ dico_p = dicoS; spice_dstring_reinit(& dico_p->lookup_buf); scopy_up(& dico_p->lookup_buf, param_name); up_name = spice_dstring_value(& dico_p->lookup_buf); if (!(dico_p->inst_symbols)) dico_p->inst_symbols = nghash_init(NGHASH_MIN_SIZE); entry_p = attrib(dico_p, dico_p->inst_symbols, up_name, 'N'); if (entry_p) { entry_p->vl = value; entry_p->tp = 'R'; entry_p->ivl = 0; entry_p->sbbase = NULL; } spice_dstring_free(& dico_p->lookup_buf); } /* ----------------------------------------------------------------- * This function copies any definitions in the inst_symbols hash * table which are qualified symbols and makes them available at * the global level. Afterwards, the inst_symbols table is freed. * ----------------------------------------------------------------- */ void nupa_copy_inst_dico(void) { entry *entry_p; /* current entry */ tdico *dico_p; /* local copy for speed */ NGHASHITER iter; /* hash iterator - thread safe */ dico_p = dicoS; if (dico_p->inst_symbols) { /* We we perform this operation we should be in global scope */ if (dico_p->stack_depth > 0) fprintf(stderr, "stack depth should be zero.\n"); NGHASH_FIRST(&iter); for (entry_p = (entry *) nghash_enumerateRE(dico_p->inst_symbols, &iter); entry_p; entry_p = (entry *) nghash_enumerateRE(dico_p->inst_symbols, &iter)) { nupa_add_param(entry_p->symbol, entry_p->vl); dico_free_entry(entry_p); } nghash_free(dico_p->inst_symbols, NULL, NULL); dico_p->inst_symbols = NULL; } } char * nupa_copy(char *s, int linenum) /* returns a copy (not quite) of s in freshly allocated memory. linenum, for info only, is the source line number. origin pointer s is kept, memory is freed later in nupa_done. must abort all Spice if malloc() fails. :{ called for the first time sequentially for all spice deck lines. :{ then called again for all X invocation lines, top-down for subckts defined at the outer level, but bottom-up for local subcircuit expansion, but has no effect in that phase. we steal a copy of the source line pointer. - comment-out a .param or & line - substitute placeholders for all {..} --> 10-digit numeric values. */ { char *t; int ls; char c, d; SPICE_DSTRING u; SPICE_DSTRING keywd; spice_dstring_init(&u); spice_dstring_init(&keywd); ls = length(s); while ((ls > 0) && (s[ls - 1] <= ' ')) ls--; pscopy(&u, s, 0, ls); /* strip trailing space, CrLf and so on */ dicoS->srcline = linenum; if ((!inexpansionS) && (linenum >= 0) && (linenum <= dynmaxline)) { linecountS++; dicoS->dynrefptr[linenum] = s; c = transform(dicoS, &u, incontrolS, &keywd); if (c == 'C') incontrolS = 1; else if (c == 'E') incontrolS = 0; if (incontrolS) c = 'C'; /* force it */ d = dicoS->dyncategory[linenum]; /* warning if already some strategic line! */ if ((d == 'P') || (d == 'S') || (d == 'X')) fprintf(stderr, " Numparam warning: overwriting P,S or X line (linenum == %d).\n", linenum); dicoS->dyncategory[linenum] = c; } /* keep a local copy and mangle the string */ ls = spice_dstring_length(&u); t = strdup(spice_dstring_value(&u)); if (t == NULL) { fputs("Fatal: String malloc crash in nupa_copy()\n", stderr); controlled_exit(EXIT_FAILURE); } else { if (!inexpansionS) putlogfile(dicoS->dyncategory[linenum], linenum, t); } spice_dstring_free(&u); return t; } int nupa_eval(char *s, int linenum, int orig_linenum) /* s points to a partially transformed line. compute variables if linenum points to a & or .param line. if ( the original is an X line, compute actual params.; } else { substitute any &(expr) with the current values. All the X lines are preserved (commented out) in the expanded circuit. */ { int idef; /* subckt definition line */ char c, keep, *ptr; SPICE_DSTRING subname; /* dynamic string for subcircuit name */ bool err = 1; spice_dstring_init(&subname); dicoS->srcline = linenum; dicoS->oldline = orig_linenum; c = dicoS->dyncategory[linenum]; #ifdef TRACE_NUMPARAMS fprintf(stderr, "** SJB - in nupa_eval()\n"); fprintf(stderr, "** SJB - processing line %3d: %s\n", linenum, s); fprintf(stderr, "** SJB - category '%c'\n", c); #endif if (c == 'P') { /* evaluate parameters */ // err = nupa_substitute(dico, dico->dynrefptr[linenum], s, 0); nupa_assignment(dicoS, dicoS->dynrefptr[linenum], 'N'); } else if (c == 'B') { /* substitute braces line */ err = nupa_substitute(dicoS, dicoS->dynrefptr[linenum], s, 0); } else if (c == 'X') { /* compute args of subcircuit, if required */ ptr = s; while (!isspace(*ptr)) ptr++; keep = *ptr; *ptr = '\0'; nupa_inst_name = strdup(s); *nupa_inst_name = 'x'; *ptr = keep; strtoupper(nupa_inst_name); idef = findsubckt(dicoS, s, &subname); if (idef > 0) nupa_subcktcall(dicoS, dicoS->dynrefptr[idef], dicoS->dynrefptr[linenum], 0); else putlogfile('?', linenum, " illegal subckt call."); } else if (c == 'U') { /* release local symbols = parameters */ nupa_subcktexit(dicoS); } putlogfile('e', linenum, s); evalcountS++; #ifdef TRACE_NUMPARAMS fprintf(stderr, "** SJB - leaving nupa_eval(): %s %d\n", s, err); printf("** SJB - --> %s\n", s); printf("** SJB - leaving nupa_eval()\n\n"); #endif if (err) return 0; else return 1; } int nupa_signal(int sig, char *info) /* warning: deckcopy may come inside a recursion ! substart no! */ /* info is context-dependent string data */ { putlogfile('!', sig, " Nupa Signal"); if (sig == NUPADECKCOPY) { if (firstsignalS) { nupa_init(info); firstsignalS = 0; } } else if (sig == NUPASUBSTART) { inexpansionS = 1; } else if (sig == NUPASUBDONE) { inexpansionS = 0; nupa_inst_name = NULL; } else if (sig == NUPAEVALDONE) { nupa_done(); firstsignalS = 1; } return 1; } #ifdef USING_NUPATEST /* This is use only by the nupatest program */ tdico * nupa_fetchinstance(void) { return dico; } #endif void dump_symbols(tdico *dico_p) { NG_IGNORE(dico_p); fprintf(stderr, "Symbol table\n"); nupa_list_params(stderr); } ngspice-26/src/frontend/numparam/readme.txt0000644000265600020320000006761312264261473020472 0ustar andreasadmin******************************************************** README.TXT the minimal Numparam documentation ******************************************************** Numparam: an add-on library for electronic circuit analysis front-ends Copyright (C) 2002 Georg Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA CONTENTS A. The Numparam library B. Circuit description with Numparam (in lieu of a tutorial) C. Reference section D. Installation E. Theory of operation F. Files in this package G. Known bugs A. The Numparam library: The spice-3f(x) front end lacks some features of commercial derivatives, such as the ability to define numerical attributes of devices by symbols or by constant (at circuit-expansion time) numerical expressions. Numerical parameters - other than node names - for subcircuits are also commonly available in these non-free Spices. This library provides a retrofit to the Spice circuit description language to add these features. By design, the new code is organized as an independent library which does not import any Spice header files and whose only interface to Spice is a set of three function headers. The only place where these functions are called - if a new compile-time option for Spice is set - is the code file src/lib/fte/subckt.c. There are no patches anywhere else. The purpose of this minimal coupling was to freely license the additional code. It is distributed under the GNU-LGPL and thus can be linked to the original Spice which is open-source software but maintains a special license. (As I read somewhere, Berkeley Spice is reserved to people friendly to the USA). Due to GPL-type requirements, I cannot merge any lines from Spice with the new code, and I cannot avoid redundancies, such as one more symbol table manager and the umpteenth arithmetic expression parser. Coding style of my add-on is a bit personal. Using a set of keyword-hiding macros, it is closer to Pascal and/or Basic than to authentic C programs. Most of it originated from my initial Turbo Pascal preprocessors that have been translated to C. After all, I'm definitely not "friendly to the C language". Even in disguise, the code is pure Ansi-C and compiles without a warning under the severest settings of gcc (under GNU/Linux) or Turbo C++ (under MS-DOS). For C hardliners, I include the 'washprog' utility which downgrades the source code to the common C look-&-feel. Extreme purists might apply some appropriate "indent" utility, in addition. B. Circuit description with Numparam (in lieu of a tutorial). As we now know, all the text entry to Spice comes in two separate languages: - a circuit description language (CDL) which defines the electronic hardware. - an analysis job and data management language (JDML) which may be used as an interactive shell or in batch files. In the circuit description "CDL" file, the design is typically organized as a hierarchical set of subcircuits which are connected together in the 'main' circuit (they are "called", like procedures in a general-purpose programming language). CDL is line-oriented, with a recognizer role assigned to the first non-space character of a line. (In the ancient times of data processing, a line was called a "card".) For example, '*' introduces comment lines. 'C' places a capacitor device in the circuit, 'R' a resistor, 'L' an inductor, and so on. 'X' signals the "call" of a subcircuit. Character '+' introduces a continuation line (the way to split exceedingly long lines into pieces). A special class of lines that start with a dot '.' have control functions inside CDL: they do not add physical circuit elements. For instance, the control pair '.subckt' and '.ends' brackets a subcircuit definition section in CDL. In the old days of Spice-2, some of the functions now assigned to JDML were also inserted as dot cards. You can still insert pieces of JDML inside a CDL file, as a section enclosed within lines '.control' and '.endc' . Example CDL file, a netlist of some double T RC-filter: * First-example .subckt myfilter in out Ra in p1 2k Rb p1 out 2k C1 p1 0 2nF Ca in p2 1nF Cb p2 out 1nF R1 p2 0 1k .ends myfilter X1 input output myfilter V1 input 0 AC 1V .end Let us recall what the Spice "front-end" essentially does to your circuit-description (CDL) file whenever it is submitted, either at program start-up or after some interactive JDML commands like 'edit' or 'source'. First, all the JDML sections in the file are sorted out and kept for later use (unless the file is pure JDML and thus immediately executed). Next, the hierarchy of subcircuits is expanded and an internal representation of the flattened circuit is stored, i.e. a set of CDL lines without any more 'X' and '.subckt' lines. This flat circuit is also known as the "netlist". Then, the netlist is translated into the internal data structures of Spice, essentially a sparse matrix of elements indexed by pairs of circuit nodes. Finally, the mathematical analysis is carried out under the control of JDML, and output data may be stored, printed, plotted, compared, and so on. Analyses may be repeated under varying bias/frequency/time... conditions. But to change the circuit topology, the CDL must be edited and re-compiled. Numparam-specific features of CDL : The Numparam library is an enhancement of the Spice front-end which adds clarity and arithmetic functionality to the circuit description language. The most wanted feature of a language is to have word-like symbols that take the place of specific values or objects. The dot-line .param = defines such symbols. For example, to describe a triple RC filter with identical values of components, we do not need to explicitly repeat constant numbers. The CDL code may go like this: .param res= 1kohm // numparam allows comment tails like in C++ .param tau= 10ns // we want a time constant .param cap= tau/res // tau= RC, of course .subckt triplerc in out R1 in p1 {res} C1 p1 0 {cap} R2 p1 p2 {res} C2 p2 0 {cap} R3 p2 out {res} C3 out 0 {cap} .ends As you can see, the use of symbols anywhere in the circuit description requires the curly braces : { } This coding style is even more interesting if circuit elements have known fixed ratios (Butterworth filters and the like) and we only need to touch one value (a time constant) to tune the circuit. Only numerical constants such as '30pF' may be used without enclosing braces. It is the braces that tell our CDL front-end to look up symbols and to crunch arithmetic expressions inside. Obviously, it was restrictive that subcircuit definitions could only accept interface node names as symbolic parameters. With the following syntax of the .subckt line, we add numerical parameters: .subckt ... params: = = ... Example, a parameterized filter: .subckt triplerc2 in out params: res=1kohm cap=50pF * all the following lines as above. * the specified default values are always overridden with X lines. To call variants of such a subcircuit later on, we may write: X1 in out1 triplerc2 {r1} {c1} X2 in out2 triplerc2 {2*r1} {c1/2} X3 in out3 triplerc2 {3*r1} {c1/3} where the r1 and c1 symbols are defined in .param lines. So, we can use subcircuits with one or more parameters, the same way as Spice2 already allowed an area parameter for diodes and transistors. Here is the first example, rewritten with parameters: * Param-example .param amplitude= 1V .subckt myfilter in out + params: rval=100k cval= 100nF Ra in p1 {2*rval} Rb p1 out {2*rval} C1 p1 0 {2*cval} Ca in p2 {cval} Cb p2 out {cval} R1 p2 0 {rval} .ends myfilter X1 input output myfilter 1k 1nF V1 input 0 AC {amplitude} .end Note: Now, there is some possible confusion in Spice because of multiple numerical expression features. The .param lines and the braces expressions are evaluated in the front-end, that is, just after the subcircuit expansion. (Technically, the X lines are kept as comments in the expanded circuit so that the actual parameters can correctly be substituted ). So, after the netlist expansion and before the internal data setup, all number attributes in the circuit are known constants. However, there are some circuit elements in Spice which accept arithmetic expressions that are NOT evaluated at this point, but only later during circuit analysis. These are the arbitrary current and voltage sources. The syntactic difference is that "compile-time" expressions are within braces, but "run-time" expressions have no braces. To make things more complicated, the backend language JDML also accepts arithmetic/logic expressions that operate on its own scalar or vector data sets. It would be desirable to have the same expression syntax, operator and function set, and precedence rules, for the three contexts mentioned above. In the current Numparam implementation, that goal is not yet achieved... C. Reference section: The Numparam add-on supports the following elements in the circuit description language. 1. '.param' control lines to define symbolic numbers 2. arithmetic expressions in place of any numeric constant 3. formal and actual numeric parameters for subcircuit definition and 'call'. NOT YET IMPLEMENTED: To activate the additional functions, put a line near the top of the CDL file: .option numparam In the syntax description, means an alphanumeric identifier (<20 chars, starting with a letter) means an expression, composed of s, Spice numbers, and operators. 1. The .param line: Syntax: .param = ; = .... This line assigns numerical values to identifiers. More than one assignment per line is possible using the ';' separator. The .param lines inside subcircuits are copied per call, like any other line. All assignments are executed sequentially through the expanded circuit. Before its first use, a name must have been assigned a value. 2. Brace expressions in cicuit elements: Syntax: { } These are allowed in .model lines and in device lines, wherever only constant Spice numbers could be used in spice2/3. A Spice number is a floating point number with an optional scaling suffix, immediately glued to the numeric tokens (see below). Warning: {..} cannot be used to 'parameterize' node names or parts of names. ( We are not into obfuscated shell scripting ...) All identifiers used within an must have known values at the time when the line is evaluated, else an error is flagged. 3. Subcircuit parameters: The syntax of a subcircuit definition header is: .subckt node node ... params: = =... node is an integer number or an identifier, for one of the external nodes. The 'params:' keyword introduces an optional section of the line. Each is a formal parameter, and each is either a Spice number or a brace expression. Inside the '.subckt' ... '.ends' context, each formal parameter may be used like any identifier that was defined on a .param control line. The parts are supposed to be default values of the parameters. However, in the current version of Numparam, they are not used and each invocation of the subcircuit must supply the _exact_ number of actual parameters. The syntax of a subcircuit call (invocation) is: X node node ... .... Here is the symbolic name given to that instance of the subcircuit, is the name of a subcircuit defined beforehand. node node ... is the list of actual nodes where the subcircuit is connected. is either a Spice number or a brace expression { } . The sequence of items on the X line must exactly match the number and the order of formal parameters of the subcircuit. 4. Symbol scope All Subcircuit and Model names are considered global and must be unique. The .param symbols that are defined outside of any '.subckt' ... '.ends' section are global. Inside such a section, the pertaining 'params:' symbols and any .param assignments are considered local: they mask any global identical names, until the .ends line is encountered. You cannot reassign to a global number inside a .subckt, a local copy is created instead. Scope nesting now works up to any level. For example, if the main circuit calls A which has a formal parameter xx, A calls B which has a param. xx, and B calls C which also has a formal param. xx, there will be three versions of 'xx' in the symbol table but only the most local one - belonging to C - is visible. 5. Syntax of expressions ( optional parts within [ ...] ): An expression may be one of: where is either a Spice number or an identifier ( [ , ...] ) ( ) As expected, atoms, builtin function calls and stuff within parentheses are evaluated before the other operators. The operators are evaluated following a list of precedence close to the one of the C language. For equal precedence binary ops, evaluation goes left to right. Operators: Alias Internal symb. Precedence - - 1 (unary -) not ! ! 1 (unary not) ** ^ ^ 2 (power) * * 3 (multiply) / / 3 (divide) mod % % 3 (modulo) div \ \ 3 (integer divide) + + 4 (add) - - 4 (subtract) == = 5 (equality) <> != # 5 (un-equal) <= L 5 (less or equal) >= G 5 (greater or equal) < < 5 (less than) > > 5 (greater than) and && & 6 (and) or || | 7 (or) The result of logical operators is 1 or 0 , for True or False. Builtin functions: Internal ref. defined 0 (returns 1 if symbol is defined, else 0) sqr 1 sqrt 2 sin 3 cos 4 exp 5 ln 6 arctan 7 abs 8 pwr 9 Scaling suffixes (any decorative alphanum. string may follow ...) g 1e9 meg 1e6 k 1e3 m 1e-3 u 1e-6 n 1e-9 p 1e-12 f 1e-15 Note: there are intentional redundancies in expression syntax, e.g. x^y , x**y and pwr(x,y) all have nearly the same result. 6. Reserved words In addition to the above function names and to the verbose operators ( not and or div mod ), other words are reserved and cannot be used as parameter names. Historically, they come from a version of Numparam that was a full-blown macro language. I won't link that one to Spice, not before somebody proves to me that such a thing could be useful... and or not div mod if else end while macro funct defined include for to downto is var sqr sqrt sin cos exp ln arctan abs pwr 7. Alternative syntax the & sign is tolerated to provide some 'historical' parameter notation: & as the first character of a line is equivalent to: .param Inside a line, the notation &(....) is equivalent to {....}, and &identifier means the same thing as {identifier} . This notation exists a bit for the same reason as my macros which wipe the curly braces out of the C language: entering those signs is a pain in the neck on IBM French-type keyboards. You hit, among others, a vanishingly small AltGr key which is squeezed by superfluous buttons that show ugly office-software logos... Comments in the style of C++ line trailers (//) are detected and erased. Warning: this is NOT possible in embedded .control parts of a source file, these JDML lines are outside of Numparam's scope. DOS-style carriage returns at line ends are difficult for JDML, too. D. Installation There are two versions of Spice on which this library has been tried: a. a 1997 version spice3f5 that was arranged for Red Hat Linux b. the version 14 of ngspice (will now be privileged for development) On my system, the size of libnupa.a is about 47k, so this is the additional bloat that the spice3 and nutmeg binary programs will accumulate. ( The numparam source tarball weighs in for some 70k ) The common part to build the Numparam library is this: 0. choose any directory you like for Numparam, let's call it $HACK. 1. un-tar the .c and .h files and the rest, in Numparam's directory : tar xzvf numparam.tgz 2. compile the lib sources with gcc -c -Wall: gcc -c -ansi -pedantic -Wall spicenum.c nupatest.c xpressn.c mystring.c 3. pre-link together the library part to numparam.o and libnupa.a: ld -r -o numparam.o spicenum.o xpressn.o mystring.o ar -rcs libnupa.a spicenum.o xpressn.o mystring.o 4. make the test executable nupatest: gcc -o nupatest nupatest.o spicenum.o xpressn.o mystring.o -lm The script file 'mknumpar.sh' does all this (2-4). 5a. Link with the "third version of Spice3f5 for RedHat Linux 2.6" (1997) do the following in the spice3f5 top-level directory: 1. patch the file src/lib/fte/subckt.c : cp -biv $HACK/rhsubckt.c src/lib/fte/subckt.c 2. edit src/bin/makeops , to add $HACK/libnupa.a to LIBS and LIBN. 3. ./util/build linux 4. ./util/build linux install 5b. Link procedure for ngspice version 14 I haven't yet a working knowledge of the 'automake/autoconf' system, so I'll describe the pedestrian hacks to get Numparam in. That's evil; the right way would need a configuration flag that chooses to make and to link the library. Only the top level files 'configure.in' and 'Makefile.am' should be revised to process the numparam option. (?) Help! 1. replace the file src/frontend/subckt.c with Numparam's patched version : cp -biv $HACK/ngsubckt.c src/frontend/subckt.c 2. run ./configure with a "LIBS prefix" to include numparam (see below) 3. make 4. make install Here is one "prefixed" ngspice configure script that works on my system: #!/bin/sh # ngconfig.sh # configure options for ngspice with numparam add-on # run this in ngspice's top-level directory # specify your Numparam directory HACK=/home/post/spice3f5/hack # over-write the original subckt.c cp -biv $HACK/ngsubckt.c src/frontend/subckt.c # my box needs CFLAGS on 1st run, else 'terminal.c' wont find 'termcap.h' ? CFLAGS=-I/usr/include/ncurses \ LIBS=$HACK/libnupa.a \ ./configure --without-x --prefix=/usr/local/ngsp #### end of sample script #### E. Theory of operation Spice's front end does a lot of malloc/free type memory gymnastics and does not seem to care much about small leaks here and there. Numparam will do some malloc'ing in place of Spice (essentially the translated strings of the input deck) and rely on Spice to clean it up - or not - later on. My library will clean up its private space only (the symbol tables) and will make some assumptions about the interface function calls coming from Spice. Here is the scenario supposed to be followed by Spice and Numparam: 0. the patched codefile subckt.c imports the following header lines: #define NUPADECKCOPY 0 #define NUPASUBSTART 1 #define NUPASUBDONE 2 #define NUPAEVALDONE 3 extern char * nupa_copy(char *s, int linenum); extern int nupa_eval(char *s, int linenum); extern int nupa_signal(int sig); These are the three library functions called, i.e. - nupa_copy by inp_subcktexpand to preprocess all extended-syntax lines. - nupa_eval by inp_subcktexpand to do the parameter substitutions - nupa_signal with one of the 4 signals, from various places to send state information to the Numparam library. The only places with numparam patches are the functions inp_subcktexpand() and its recursive subroutine doit(), in the file subckt.c . At this stage, we suppose that: - any .control sections are filtered out - any .include are expanded - any + continuation line chunks are glued together 1. In the first phase, Numparam runs through the deck (whose .control sections have already been removed by Spice) to create copies of the lines without the extended syntax. Pointers to the original deck lines are kept and the copies are traditional Spice, with placeholders for symbols and expressions. Spice loses the originals and gets the bleached-out copies. 2. The "doit()" circuit expansions are modified to keep more information. Contrary to the initial Spice code, now the subcircuit invocation lines are preserved as comments, which allows Numparam to update symbolic subcircuit parameters a bit later. Subcircuit exit lines are also copied and out-commented, to keep track of identifier scopes during the final pass. If this seems waste of storage, just consider all those sloppy memory leaks in the circuit expansion code... 3. The final wash-up is a sequential call to the library (nupa_eval()) line-by-line through the expanded circuit. By using its pointers to the original lines, Numparam recovers the added syntax features. It triggers all the symbol value computations and inserts constant numbers into the circuit definition lines, whose length must not change! This option is a kludge to avoid memory reallocation [ my intuitive fear is that these free() malloc() realloc() and friends swallow a lot of CPU time ? ]. 4. The termination signal at the end of inp_subcktexpand() tells the Numparam library to clean up its mess, release its pointers to the original Spice circuit description text, and to get prepared for another run. Note: Numparam frees the storage related to the original lines whose pointers have been stolen in phase 1. In a future release, Numparam will be re-entrant, all its 'global' data being referenced via a handle which the client program should keep around. F. Files in this package The following Ansi C code files belong to Numparam: general.h header file with macros to disguise the C language. stuff for an 'overflow-safe' string library ( whose biggest bug is that it indexes strings from 1 like Pascal). numparam.h header file for numparam-specific symbols and functions mystring.c collection of 'safer' character string (and misc.) functions. beware of the nasty Turbo Pascal conventions. xpressn.c the interpreter of arithmetic/logical expressions spicenum.c the interface part, functions that are called by Spice. nupatest.c a stand-alone subcircuit expander, for test purpose. washprog.c a program that washes all the above C files, including itself, to recover the crude syntax of the True Language (see below). Patched versions of spice's subckt.c file incorporate the library calls and maybe try to repair some memory leaks (in rhsubckt.c, not yet tested). rhsubckt.c for spice3f5 1997 Red Hat (src/lib/fte/subckt.c) ngsubckt.c for ngspice version 14 (src/frontend/subckt.c) subckt.dif 'diff' between ngsubckt.c and ngspice frontend/subckt.c The following text, data and script files are also included: readme.txt this documentation file downgrad.txt the substitution rules required for washprog.c mknumpar.sh script to make the library binaries ngconfig.sh sample script to run ./configure for ngspice configure.in crappy ? Makefile.am crappy ? testfile.nup a test text (nonsense circuit) for Numparam ? So, if you are a Real Programmer, think that the Pascal amateurs confound programming with writing novels, and find those Basic greenhorns' style too childish, then execute the following two-liner first of all (should work on GNU/Linux, but it's not a speed monster) : gcc -o washprog washprog.c mystring.c ./washprog *.c You get all the *.c files in a version where the first character becomes an underbar, and the interior resembles to _code_. (although it lacks such powerful features as continue, break, goto, ?:-expressions, gets(), ... ) G. Known Bugs First of all, lots of size limits - incompatible with the Spirit of the Gnu, who wants that everything may grow as much as malloc() can grab ... - circuit source code line length: 80 chars - circuit '+' extended code lines: 250 chars - number of source lines: 1000 - number of lines in expanded circuit: 5000 - length of numparam identifiers: 20 chars - number of numparam identifiers: 200 - length of file names: 80 chars - significant digits in param results: 5 - nesting depth of parentheses 9 - nesting of subckt calls 10 All these constants should be in the header file but aren't. After each circuit expansion, numparam asks a silly question of the "Abort/Continue" type. A debugging feature, to be killed soon. The Numparam symbol table accumulates the following sets of names: subcircuits, models, global parameters, subcircuit arguments. Node names, however, are completely ignored. Call the following "bugs" or "features": - A model/subckt name cannot be defined twice, even if local to a subcircuit. - The same name cannot design a model here, and a parameter elsewhere. - A subcircuit argument masks any global parameter of same name, anytime the subckt is invoked. Inside a .subckt context, .param assignments also have local scope and override global identical names. It is wise to always use unique names for everything. While Numparam is in 'early beta stage', I strongly suggest to use 'nupatest' first, on any 'parameterized' Spice circuit file, before starting the enhanced circuit analyser. The command nupatest foobar.cir produces an output file 'foobar.out' which is the expanded and parameter-reduced flat netlist. By the way, it produces error messages whenever it chokes on the source file. If nupatest succeeds, the spice+numparam combo should swallow it, too. Big bug: Nupatest does not yet prefix and infix things inside v() and i(). Numparam comes with two very experimental files 'configure.in' and 'Makefile.am' as an exercise of the automake/autoconf mechanisms. I certainly got a lot of things wrong and had to do _eight_ steps to have it kind of work: 1. edit/create configure.in 2. edit/create Makefile.am 3. run autoheader --> config.h.in 4. run automake --foreign --add-missing --verbose --> Makefile.in 5. run aclocal --> aclocal.m4 6. run autoconf --> configure 7. run ./configure --> Makefile config.h 8. run make Do we need all this, and -worse- do we need to repeat it whenever we touch 'configure.in' and/or 'Makefile.am' ? Help! Please send your bug reports, improvements, flames etc. to the author: georg.post @ wanadoo.fr ngspice-26/src/frontend/numparam/Makefile.am0000644000265600020320000000055412264261473020517 0ustar andreasadmin## Process this file with automake to produce Makefile.in EXTRA_DIST = ngconfig.sh readme.txt nupatest.c noinst_LTLIBRARIES = libnumparam.la libnumparam_la_SOURCES = \ spicenum.c \ xpressn.c \ mystring.c \ general.h \ numpaif.h \ numparam.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/numparam/numpaif.h0000644000265600020320000000150112264261473020264 0ustar andreasadmin/* * numpaif.h * external interface to spice frontend subckt.c */ #ifndef ngspice_NUMPAIF_H #define ngspice_NUMPAIF_H #define NUPADECKCOPY 0 #define NUPASUBSTART 1 #define NUPASUBDONE 2 #define NUPAEVALDONE 3 extern char *nupa_copy(char *s, int linenum); extern int nupa_eval(char *s, int linenum, int orig_linenum); extern int nupa_signal(int sig, char *info); extern void nupa_scan(char * s, int linenum, int is_subckt); extern void nupa_list_params(FILE *cp_out); extern double nupa_get_param(char *param_name, int *found); extern void nupa_add_param(char *param_name, double value); extern void nupa_add_inst_param(char *param_name, double value); extern void nupa_copy_inst_dico(void); extern void nupa_del_dicoS(void); extern int dynMaxckt; /* number of lines in deck after expansion */ #endif ngspice-26/src/frontend/numparam/mystring.c0000644000265600020320000003365112264261473020507 0ustar andreasadmin/* mystring.c Copyright (C) 2002 Georg Post * * This file is part of Numparam, see: readme.txt * Free software under the terms of the GNU Lesser General Public License */ #include #include #include #include #include "ngspice/memory.h" #include #include #include "ngspice/config.h" #ifdef HAS_WINGUI #include "ngspice/wstdio.h" #endif #include "general.h" #include "ngspice/fteext.h" /* controlled_exit() */ /* * fetch a human answer to a y/n question from stdin * insist on a single non white-space char on a '\n' terminated line * return this char or '\n' or EOF * return '\0' if the answer doesn't fit this pattern */ int yes_or_no(void) { int first; do { first = getchar(); if (first == '\n' || first == EOF) return first; } while (isspace(first)); for (;;) { int c = getchar(); if (c == EOF) return c; if (c == '\n') return tolower(first); if (!isspace(c)) first = '\0'; } } bool ci_prefix(const char *p, const char *s) { while (*p) { if ((isupper(*p) ? tolower(*p) : *p) != (isupper(*s) ? tolower(*s) : *s)) return (0); p++; s++; } return (1); } /******* Strings ************ * are 0-terminated char arrays with a 2-byte trailer: max length. * the string mini-library is "overflow-safe" under these conditions: * use Str(n,s) macro: define and initialize a string s of maxlen n<255 * use sini() to initialize empty strings; sfix() for non-empty ones. * the Sini() macro does automatic sizing, for automatic char arrays * to allocate a string on the heap, use newstring(n). * use maxlen() and length() to retrieve string max and actual length * use: cadd, cins, sadd, sins, scopy, pscopy to manipulate them * never put '\x0' characters inside strings ! * * the 'killer idea' is the following: * on string overflow and/or on heap allocation failure, a program * MUST die. Now we only die on a heap failure as with dynamic * string we cannot have a string overflow. */ void sfix(SPICE_DSTRINGPTR dstr_p, int len) /* suppose s is allocated and filled with non-zero stuff */ { /* This function will now eliminate the max field. The length of * the string is going to be i-1 and a null is going to be added * at the ith position to be compatible with old codel. Also no * null characters will be present in the string leading up to the * NULL so this will make it a valid string. */ int j; char *s; spice_dstring_setlength(dstr_p, len); s = spice_dstring_value(dstr_p); for (j = 0; j < len; j++) /* eliminate null characters ! */ if (s[j] == 0) s[j] = 1; } int length(const char *s) { return (int) strlen(s); } /* ----------------------------------------------------------------- * Function: add string t to dynamic string dstr_p. * ----------------------------------------------------------------- */ bool sadd(SPICE_DSTRINGPTR dstr_p, const char *t) { spice_dstring_append(dstr_p, t, -1); return 1; } /* ----------------------------------------------------------------- * Function: add character c to dynamic string dstr_p. * ----------------------------------------------------------------- */ bool cadd(SPICE_DSTRINGPTR dstr_p, char c) { char tmp_str[2]; tmp_str[0] = c; tmp_str[1] = '\0'; spice_dstring_append(dstr_p, tmp_str, -1); return 1; } /* ----------------------------------------------------------------- * Function: insert character c at front of dynamic string dstr_p * ----------------------------------------------------------------- */ bool cins(SPICE_DSTRINGPTR dstr_p, char c) { int i; int ls; char *s_p; ls = spice_dstring_length(dstr_p); spice_dstring_setlength(dstr_p, ls+2); /* make sure we have space for char + EOS */ s_p = spice_dstring_value(dstr_p); for (i = ls + 1; i >= 0; i--) s_p[i + 1] = s_p[i]; s_p[0] = c; return 1; } /* ----------------------------------------------------------------- * Function: insert string t at front of dynamic string dstr_p * ----------------------------------------------------------------- */ bool sins(SPICE_DSTRINGPTR dstr_p, const char *t) { int i; int ls; int lt; char *s_p; ls = spice_dstring_length(dstr_p); lt = length(t); spice_dstring_setlength(dstr_p, ls+lt+1); /* make sure we have space for string + EOS */ s_p = spice_dstring_value(dstr_p); for (i = ls + 1; i >= 0; i--) s_p[i + lt] = s_p[i]; for (i = 0; i < lt; i++) s_p[i] = t[i]; return 1; } int cpos(char c, char *s) /* return position of c in s, or 0 if not found. * BUG, Pascal inherited: first char is at 1, not 0 ! * No longer! Now position is C-based to make life easier. */ { int i = 0; while ((s[i] != c) && (s[i] != '\0')) i++; if (s[i] == c) return i; else return -1; } char upcase(char c) { if ((c >= 'a') && (c <= 'z')) return (char) (c + 'A' - 'a'); else return c; } /* ----------------------------------------------------------------- * Create copy of the dynamic string. Dynamic strings are always NULL * terminated. * ----------------------------------------------------------------- */ bool scopyd(SPICE_DSTRINGPTR s, SPICE_DSTRINGPTR t) /* returns success flag */ { spice_dstring_reinit(s); spice_dstring_append(s, spice_dstring_value(t), -1); return 1; /* Dstrings expand to any length */ } /* ----------------------------------------------------------------- * Create copy of the string in the dynamic string. Dynamic strings * are always NULLterminated. * ----------------------------------------------------------------- */ bool scopys(SPICE_DSTRINGPTR s, const char *t) /* returns success flag */ { spice_dstring_reinit(s); spice_dstring_append(s, t, -1); return 1; /* Dstrings expand to any length */ } /* ----------------------------------------------------------------- * Create an upper case copy of a string and store it in a dynamic string. * Dynamic strings are always NULL * terminated. * ----------------------------------------------------------------- */ bool scopy_up(SPICE_DSTRINGPTR dstr_p, const char *str) /* returns success flag */ { char up[2]; /* short string */ const char *ptr; /* position in string */ spice_dstring_reinit(dstr_p); up[1] = '\0'; for (ptr = str; ptr && *ptr; ptr++) { up[0] = upcase(*ptr); spice_dstring_append(dstr_p, up, 1); } return 1; /* Dstrings expand to any length */ } /* ----------------------------------------------------------------- * Create a lower case copy of a string and store it in a dynamic string. * Dynamic strings are always NULL * terminated. * ----------------------------------------------------------------- */ bool scopy_lower(SPICE_DSTRINGPTR dstr_p, const char *str) /* returns success flag */ { char low[2]; /* short string */ const char *ptr; /* position in string */ spice_dstring_reinit(dstr_p); low[1] = '\0'; for (ptr = str; ptr && *ptr; ptr++) { low[0] = lowcase(*ptr); spice_dstring_append(dstr_p, low, 1); } return 1; /* Dstrings expand to any length */ } bool ccopy(SPICE_DSTRINGPTR dstr_p, char c) /* returns success flag */ { char *s_p; /* current string */ sfix(dstr_p, 1); s_p = spice_dstring_value(dstr_p); s_p[0] = c; return 1; } char * pscopy(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng) /* partial string copy, with C-based start - Because we now have a 0 based * start and string may copy outselves, we may need to restore the first * character of the original dstring because resetting string will wipe * out first character. */ { int i; /* counter */ int stop; /* stop value */ char *s_p; /* value of dynamic string */ stop = length(t); if (start < stop) { /* nothing! */ if ((start + leng - 1) > stop) { // leng = stop - start + 1; leng = stop - start; } _spice_dstring_setlength(dstr_p, leng); s_p = spice_dstring_value(dstr_p); for (i = 0; i < leng; i++) s_p[i] = t[start + i]; s_p[leng] = '\0'; } else { s_p = spice_dstring_reinit(dstr_p); } return s_p; } char * pscopy_up(SPICE_DSTRINGPTR dstr_p, const char *t, int start, int leng) /* partial string copy to upper case, with C convention for start. */ { int i; /* counter */ int stop; /* stop value */ char *s_p; /* value of dynamic string */ stop = length(t); if (start < stop) { /* nothing! */ if ((start + leng - 1) > stop) { // leng = stop - start + 1; leng = stop - start; } _spice_dstring_setlength(dstr_p, leng); s_p = spice_dstring_value(dstr_p); for (i = 0; i < leng; i++) s_p[i] = upcase(t[start + i]); s_p[leng] = '\0'; } else { s_p = spice_dstring_reinit(dstr_p); } return s_p; } bool nadd(SPICE_DSTRINGPTR dstr_p, long n) /* append a decimal integer to a string */ { int d[25]; int j, k; char sg; /* the sign */ char load_str[2]; /* used to load dstring */ k = 0; if (n < 0) { n = -n; sg = '-'; } else { sg = '+'; } while (n > 0) { d[k] = (int)(n % 10); k++; n = n / 10; } if (k == 0) { cadd(dstr_p, '0'); } else { load_str[1] = '\0'; if (sg == '-') { load_str[0] = sg; spice_dstring_append(dstr_p, load_str, 1); } for (j = k - 1; j >= 0; j--) { load_str[0] = (char) ('0' + d[j]); spice_dstring_append(dstr_p, load_str, 1); } } return 1; } bool naddll(SPICE_DSTRINGPTR dstr_p, long long n) /* append a decimal integer (but a long long) to a string */ { int d[25]; int j, k; char sg; /* the sign */ char load_str[2]; /* used to load dstring */ k = 0; if (n < 0) { n = -n; sg = '-'; } else { sg = '+'; } while (n > 0) { d[k] = (int) (n % 10); k++; n = n / 10; } if (k == 0) { cadd(dstr_p, '0'); } else { load_str[1] = '\0'; if (sg == '-') { load_str[0] = sg; spice_dstring_append(dstr_p, load_str, 1); } for (j = k - 1; j >= 0; j--) { load_str[0] = (char) ('0' + d[j]); spice_dstring_append(dstr_p, load_str, 1); } } return 1; } void stri(long n, SPICE_DSTRINGPTR dstr_p) /* convert integer to string */ { spice_dstring_reinit(dstr_p); nadd(dstr_p, n); } bool steq(const char *a, const char *b) /* string a==b test */ { return strcmp(a, b) == 0; } bool stne(const char *s, const char *t) { return strcmp(s, t) != 0; } char lowcase(char c) { if ((c >= 'A') && (c <= 'Z')) return (char) (c - 'A' + 'a'); else return c; } bool alfa(char c) { return ((c >= 'a') && (c <= 'z')) || ((c >= 'A') && (c <= 'Z')) || c == '_' || c == '[' || c == ']'; } bool num(char c) { return (c >= '0') && (c <= '9'); } bool alfanum(char c) { return alfa(c) || ((c >= '0') && (c <= '9')); } int freadstr(FILE * f, SPICE_DSTRINGPTR dstr_p) /* read a line from a file. was BUG: long lines truncated without warning, ctrl chars are dumped. Bug no more as we can only run out of memory. Removed max argument. */ { char c; char str_load[2]; int len = 0; str_load[0] = '\0'; str_load[1] = '\0'; spice_dstring_reinit(dstr_p); do { c = (char) fgetc(f); /* tab is the only control char accepted */ if (((c >= ' ') || (c < 0) || (c == '\t'))) { str_load[0] = c; spice_dstring_append(dstr_p, str_load, 1); } } while (!feof(f) && (c != '\n')); return len; } char * stupcase(char *s) { int i = 0; while (s[i] != '\0') { s[i] = upcase(s[i]); i++; } return s; } /***** pointer tricks: app won't use naked malloc(), free() ****/ void dispose(void *p) { if (p != NULL) free(p); } void * new(size_t sz) { void *p = tmalloc(sz); if (p == NULL) { /* fatal error */ printf(" new() failure. Program halted.\n"); controlled_exit(EXIT_FAILURE); } return p; } /***** elementary math *******/ double absf(double x) { if (x < 0.0) return -x; else return x; } long absi(long i) { if (i >= 0) return (i); else return (-i); } int spos_(char *sub, const char *s) /* equivalent to Turbo Pascal pos(). BUG: counts 1 ... length(s), not from 0 like C */ { char *ptr; if ((ptr = strstr(s, sub)) != NULL) return (int) (strlen(s) - strlen(ptr)); else return -1; } #ifndef HAVE_LIBM long np_round(double x) /* using , it would be simpler: floor(x+0.5), see below */ { double u; long z; int n; // Str (40, s); SPICE_DSTRING s; spice_dstring_init(&s); u = 2e9; if (x > u) x = u; else if (x < -u) x = -u; n = sprintf(s, "%-12.0f", x); s[n] = 0; sscanf(s, "%ld", &z); return z; } long np_trunc(double x) { long n = np_round(x); if ((n > x) && (x >= 0.0)) n--; else if ((n < x) && (x < 0.0)) n++; return n; } #else /* use floor() and ceil() */ long np_round(double r) { return (long) floor(r + 0.5); } long np_trunc(double r) { if (r >= 0.0) return (long) floor(r); else return (long) ceil(r); } #endif ngspice-26/src/frontend/numparam/Makefile.in0000644000265600020320000004030112264261534020520 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend/numparam DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnumparam_la_LIBADD = am_libnumparam_la_OBJECTS = spicenum.lo xpressn.lo mystring.lo libnumparam_la_OBJECTS = $(am_libnumparam_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnumparam_la_SOURCES) DIST_SOURCES = $(libnumparam_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = ngconfig.sh readme.txt nupatest.c noinst_LTLIBRARIES = libnumparam.la libnumparam_la_SOURCES = \ spicenum.c \ xpressn.c \ mystring.c \ general.h \ numpaif.h \ numparam.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/numparam/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/numparam/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnumparam.la: $(libnumparam_la_OBJECTS) $(libnumparam_la_DEPENDENCIES) $(EXTRA_libnumparam_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnumparam_la_OBJECTS) $(libnumparam_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mystring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spicenum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xpressn.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/numparam/nupatest.c0000644000265600020320000003072212264261473020472 0ustar andreasadmin/* nupatest.c Copyright (C) 2002 Georg Post * * This file is part of Numparam, see: readme.txt * Free software under the terms of the GNU Lesser General Public License */ /**** test executable for the numparam library ****/ /**** usage: nupatest ****/ #include #include "general.h" #include "numparam.h" Cconst(pfxsep,'_') /* official prefix separator is ':' not '_' ! */ Darray(buff, char *, Maxline) /* input lines */ Darray(buf2, char *, Maxline) /* stripped lines */ Darray(pxbuf, char *, Maxline) /* prefix for subnodes */ Darray(runbuf, int, Maxckt) /* index list of expanded circuit */ Darray(pindex, int, Maxckt) /* prefix index list */ int irunbuf= 0; /* count lines of runbuf */ int ipx=0; /* count prefixes in pxbuf */ /* this toy imitates the Spice subcircuit expansion. To ckeck against Genuine Spice, use the 'listing expand' JDML command Bug1: model or device call with parameters: incorrectly parsed needs a database about _optional_ model/device pars... better: Enter all .model identifiers in the symbol table ! Bug2: nested subckt declarations, local .models: might be dangerous. expanded circuit lines, device/node names: any line that starts with a letter (device): splice the prefix in any node that isnt a formal param: add the prefix any formal param node: substitute actual params and their prefixes Node and subdevice references for prefixing: deviceletter[n] is a device type prefix nbofnodes [n] is the number of "node-type" arguments that follow. nbsubdevice [n] is the number of "subdevices" for splice-in prefix. To solve the Q ambiguity, forbid any model identifiers as node names. Bug3: In arbitrary dependent sources, we must parse v(,) and i(,) expressions and substitute node/device name arguments. */ int runscript( tdico *dico, char * prefix, int istart, int istop, int maxnest) /* recursive top-down expansion: circuit --> list of line numbers */ /* keep it simple,stupid compared to Spice's code */ /* prefix: inherited string for node & device prefixing */ /* istart, istop: allowed interval in table buf[], buf2[]. */ /* return value: number of lines included */ { int i,j, idef, nnest, nline, dn, myipx; Strbig(Llen, subpfx); /* subckt prefix */ Str(80, subname); char c; unsigned char done= 0; i=istart; nline=0; Inc(ipx); myipx= ipx; /* local copy */ pxbuf[ipx]= newstring( length(prefix)); scopy( pxbuf[ipx], prefix); while ( (maxnest>0) && (icategory[i]; if ( c=='U' ) { done=1; /* subcircuit end. Keep as a comment? */ buf2[i][0]='#'; } if ( c=='S' ) { /* skip nested subcircuits */ nnest=1; do { Inc(i); c= dico->category[i]; if ( c=='S' ) { Inc(nnest); } else if ( c=='U' ) { Dec(nnest); } } while ( !( (nnest<=0) || (i>=istop) )); } else if ( c=='X' ) { /* recursion here ! */ runbuf[irunbuf]= i; pindex[irunbuf]= myipx; Inc(irunbuf); Inc(nline); /* keep out-commented X line for parameter passing */ idef = findsubckt( dico, buf2[i], subname); buf2[i][0]= '*'; if ( idef>0 ) { scopy(subpfx, prefix); cadd(subpfx, pfxsep); j=1; /* add the instance name from buf2[i] */ while ( buf2[i][j] > ' ' ) { cadd( subpfx, buf2[i][j]); Inc(j); } dn= runscript(dico, subpfx, idef+1, istop, maxnest-1); nline= nline+dn; } else { /* FIXME: error message here! */ printf("cannot find subckt %s\n", buf2[i]); } } else if ( (c != '?') && NotZ(buf2[i][0]) ) { /* keep any other valid non-empty line, and its prefix pointer */ runbuf[irunbuf]= i; pindex[irunbuf]= myipx; Inc(irunbuf); Inc(nline); } Inc(i); } return nline; } void gluepluslines( int imax) /* general sweep to eliminate continuation lines */ { int i,j,k, ls, p; Strbig(Llen,s); i=1; while ( i<= imax ) { if ( (buff[i][0]=='+') && (i>1) ) { j= i-1; while ( (i < imax) && (buff[i+1][0]=='+') ) { Inc(i) ;} /* the lines j+1 ... i are continuation lines to j */ for ( k=j; k<=i; Inc(k) ) { ls=length(s); sadd(s, buff[k]); p= spos("//",s); if ( p>0 ) { pscopy(s,s, 1,p-1) ;} if ( ls>0 ) { s[ls]=' ' ;} /* erase the + */; } ls= length(s); if ( ls> 80 ) { Dispose(buff[j]); buff[j]=newstring(ls); } scopy(buff[j], s); } Inc(i); } } void fwrites(FILE * f, char * s) { fputs(s,f); } void fwriteln(FILE * f) { fputc('\n',f); } static void freadln(FILE * f, char * s, int max) { int ls; freadstr(f,s,max); ls=length(s); if ( feof(f) && (ls>0) ) { pscopy(s,s,1,ls-1); } /* kill EOF character */; } void wordinsert(char * s, char * w, int i) /* insert w before s[i] */ { Strbig(Llen,t); int ls=length(s); pscopy(t,s,i+1,ls); pscopy(s,s,1,i); sadd(s,w); sadd(s,t); } int worddelete(char * s, int i) /* delete word starting at s[i] */ { Strbig(Llen,t); int ls= length(s); int j=i; while ( (j' ') ) { Inc(j) ;} pscopy(t,s,j+1,ls); pscopy(s,s,1,i); sadd(s,t); return j-i /* nb of chars deleted */; } int getnextword(char * s, char * u, int j) { int ls,k; ls= length(s); k=j; while ( (j ' ') ) { Inc(j) ;} /* skip current word */ pscopy(u, s, k+1, j-k); while ( (j0 ) { for ( k=0; k' ' ) { cadd(u,wl[i]); Inc(i); } } } char * deviceletter= "RLCVIBSGETOUWFHDQKJZM"; char * nbofnodes = "222222444443222240334"; char * nbsubdevice = "000000000000111002000"; void prefixing(char * s, char * p, char * formals, char * actuals, char categ, tdico *dic) /* s is a line in expanded subcircuit. p is the prefix to be glued anywhere . assume that everything except first and last word in s may be a node. formals: node parameter list of a subckt definition line actuals: substitutes from the last X... call line (commented-out) subdevices (L belonging to a K line, for example) must be within the same subckt, they get the same prefix splice-in. There is a kludge for Q lines (may have 3 or 4 nodes, you never know). Reminder on Numparam symbols: naming convention: subckt,model,numparam and node names must be unique. cannot re-use a model name as a param name elsewhere, for example. */ { int i,j,k,ls, jnext, dsize; int dtype, nodes, subdv; unsigned char done; char leadchar; Str(80,u); Str(80,v); Str(80,pfx); i=0; ls=length(s); while ( (i= 0 ) { nodes= nbofnodes[dtype] - '0'; subdv= nbsubdevice[dtype] - '0'; } else { nodes=999; subdv=0; } while ( ! done ) { jnext= getnextword(s,u,j); done=(jnext >= length(s)); /* was the last one, do not transform */ /* bug: are there semilocal nodes ? in nested subckt declarations ? */ if ( (leadchar=='Q') && (! done) ) { /* BJT: watch non-node name */ scopy(v,u); stupcase(v); done= getidtype(dic, v) == 'O'; /* a model name stops the node list */; } if ( (! done) && (nodes>0) ) { /* transform a node name */ k= inwordlist(u, formals); if ( (k>0) ) { /* parameter node */ dsize= - worddelete(s,j); takewordlist(u,k, actuals); wordinsert(s,u,j); dsize= dsize + length(u); } else if ( stne(u,"0") ) { /* local node */ wordinsert(s,pfx,j); dsize= length(pfx); } else { dsize=0 ;} } else if ( (! done) && (subdv >0) ) { /* splice a subdevice name */ wordinsert(s,p,j+1); dsize= length(p); } j= jnext + dsize; /* jnext did shift ...*/ if ( nodes >0 ) { Dec(nodes); } else if ( subdv >0 ) { Dec(subdv); } done= done || (Zero(nodes) && Zero(subdv)); } } } void getnodelist(char * form, char * act, char * s, tdico *dic, int k) /* the line s contains the actual node parameters, between 1st & last word */ { int j,ls, idef; Str(80,u); Strbig(Llen,t); ccopy(act,' '); ccopy(form,' '); j=0; ls= length(s); j= getnextword(s,u,j); while ( j */ if ( idef>0 ) { scopy(t, buf2[idef]); } else { printf("Subckt call error: %s\n", s); } j=0; ls= length(t); j= getnextword(t,u,j); j= getnextword(t,u,j); while ( jcategory[k], dic); if ( dic->category[k] == 'X' ) { if ( parstack< (10-1) ) { Inc(parstack) ;} getnodelist(formals[parstack], actuals[parstack], s, dic,k); /*dbg: printf("Form: %s\n", formals[parstack]); */ /*dbg: printf("Actu: %s\n", actuals[parstack]); */; } else if ( dic->category[k]=='U' ) { /* return from subckt */ if ( parstack>0 ) { Dec(parstack) ;} } if ( fout != NULL ) { fwrites(fout, s); fwriteln(fout); } } } if ( fout != NULL ) { fclose(fout) ;} nupa_signal(NUPAEVALDONE, NULL); /* frees the buff[i] */ for ( i= 10-1; i>=0; Dec(i) ) { Dispose(actuals[i]); Dispose(formals[i]); } for ( i= Maxline -1; i>=0; Dec(i) ) { Dispose(pxbuf[i]); Dispose(buf2[i]); /* Dispose(buff[i]) done elsewhere */; } } int main(int argc, char * argv[]) { Str(80,fname); if ( argc>1 ) { scopy(fname, argv[1]); } else { scopy(fname,"testfile.nup"); } nupa_test(fname, 'w'); return 0; } ngspice-26/src/frontend/ftesopt.c0000644000265600020320000000463512264261473016477 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 2010 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ftedefs.h" #include "ngspice/wordlist.h" #include "variable.h" #include "ngspice/sperror.h" struct FTEparm { char *keyword; int id; enum cp_types dataType; char *description; }; static struct FTEparm FTEOPTtbl[] = { { "decklineno", FTEOPT_NLDECK, CP_NUM, "Number of lines in the deck" }, { "netloadtime", FTEOPT_NLT, CP_REAL, "Netlist loading time" }, { "netparsetime", FTEOPT_NPT, CP_REAL, "Netlist parsing time" } }; static const int FTEOPTcount = sizeof(FTEOPTtbl)/sizeof(*FTEOPTtbl); static struct variable *getFTEstat(struct circ *, int); struct variable * ft_getstat(struct circ *ft_curckt, char *name) { int i; struct variable *v, *vars , *vv = NULL; if (name) { for (i = 0; i < FTEOPTcount; i++) if (eq(name, FTEOPTtbl[i].keyword)) { vv = getFTEstat(ft_curckt, FTEOPTtbl[i].id); if (vv) { vv->va_type = FTEOPTtbl[i].dataType; vv->va_name = copy(FTEOPTtbl[i].description); vv->va_next = NULL; return (vv); } else { return (NULL); } } return (NULL); } else { for (i = 0, v = vars = NULL; i < FTEOPTcount; i++) { if (v) { v->va_next = getFTEstat(ft_curckt, FTEOPTtbl[i].id); v = v->va_next; } else { vars = v = getFTEstat(ft_curckt, FTEOPTtbl[i].id); } v->va_type = FTEOPTtbl[i].dataType; v->va_name = copy(FTEOPTtbl[i].description); } return vars; } } /* This function fill the value field of the variable */ static struct variable * getFTEstat(struct circ *ft_curckt, int id) { struct variable *v = TMALLOC(struct variable, 1); switch (id) { case FTEOPT_NLDECK: v->va_num = ft_curckt->FTEstats->FTESTATdeckNumLines; break; case FTEOPT_NLT: v->va_real = ft_curckt->FTEstats->FTESTATnetLoadTime; break; case FTEOPT_NPT: v->va_real = ft_curckt->FTEstats->FTESTATnetParseTime; break; default: tfree(v); return (NULL); } return (v); } ngspice-26/src/frontend/com_sysinfo.c0000644000265600020320000003153312264261473017340 0ustar andreasadmin /* Provide system information LINUX: /proc file system Windows: GlobalMemoryStatusEx, GetSystemInfo, GetVersionExA, RegQueryValueExA Authors: Holger Vogt, Hendrik Vogt */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "com_commands.h" /* We might compile for Windows, but only as a console application (e.g. tcl) */ #if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER) #define HAVE_WIN32 #endif #ifdef HAVE_WIN32 #define WIN32_LEAN_AND_MEAN #ifdef __MINGW32__ /* access to GlobalMemoryStatusEx in winbase.h:1558 */ #define WINVER 0x0500 #endif #undef BOOLEAN #include "windows.h" #if defined(__MINGW32__) || (_MSC_VER > 1200) /* Exclude VC++ 6.0 from using the psapi */ #include #endif #endif #include "stdio.h" #include "stdlib.h" #include "string.h" #define tInt int #define TesError int #define TES_FAIL 1 #define TES_SUCCESS 0 #define TES_INVALID_PARAMS 1 /* system info */ typedef struct TSI { char *cpuModelName; unsigned numPhysicalProcessors; unsigned numLogicalProcessors; char *osName; } TesSystemInfo; /* memory info */ struct sys_memory { unsigned long long size_m; /* Total memory size */ unsigned long long free_m; /* Free memory */ unsigned long long swap_t; /* Swap total */ unsigned long long swap_f; /* Swap free */ }; static struct sys_memory mem_t_act; TesError tesCreateSystemInfo(TesSystemInfo *info); static int get_sysmem(struct sys_memory *memall); /* Print to stream the given memory size in a human friendly format */ static void fprintmem(FILE *stream, unsigned long long memory) { if (memory > 1048576) fprintf(stream, "%8.6f MB", (double)memory /1048576.); else if (memory > 1024) fprintf(stream, "%5.3f kB", (double)memory / 1024.); else fprintf(stream, "%u bytes", (unsigned)memory); } static void tesFreeSystemInfo(TesSystemInfo *info) { if (info != NULL) { free(info->cpuModelName); free(info->osName); } } /* print system info */ void com_sysinfo(wordlist *wl) { int errorcode; TesSystemInfo *info; NG_IGNORE(wl); info = TMALLOC(TesSystemInfo, 1); errorcode = tesCreateSystemInfo(info); if (errorcode) { fprintf(cp_err, "No system info available! \n"); } else { fprintf(cp_out, "\nOS: %s\n", info->osName); fprintf(cp_out, "CPU: %s\n", info->cpuModelName); if (info->numPhysicalProcessors > 0) fprintf(cp_out, "Physical processors: %u, ", info->numPhysicalProcessors); fprintf(cp_out, "Logical processors: %u\n", info->numLogicalProcessors); } #if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) get_sysmem(&mem_t_act); /* get_sysmem returns bytes */ fprintf(cp_out, "Total DRAM available = "); fprintmem(cp_out, mem_t_act.size_m); fprintf(cp_out, ".\n"); fprintf(cp_out, "DRAM currently available = "); fprintmem(cp_out, mem_t_act.free_m); fprintf(cp_out, ".\n\n"); #endif tesFreeSystemInfo(info); tfree(info); } #ifdef HAVE__PROC_MEMINFO /* Get memory information */ static int get_sysmem(struct sys_memory *memall) { FILE *fp; char buffer[2048]; size_t bytes_read; char *match; unsigned long mem_got; if ((fp = fopen("/proc/meminfo", "r")) == NULL) { perror("fopen(\"/proc/meminfo\")"); return 0; } bytes_read = fread(buffer, 1, sizeof(buffer), fp); fclose(fp); if (bytes_read == 0 || bytes_read == sizeof(buffer)) return 0; buffer[bytes_read] = '\0'; /* Search for string "MemTotal" */ match = strstr(buffer, "MemTotal"); if (match == NULL) /* not found */ return 0; sscanf(match, "MemTotal: %ld", &mem_got); memall->size_m = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "MemFree" */ match = strstr(buffer, "MemFree"); if (match == NULL) /* not found */ return 0; sscanf(match, "MemFree: %ld", &mem_got); memall->free_m = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "SwapTotal" */ match = strstr(buffer, "SwapTotal"); if (match == NULL) /* not found */ return 0; sscanf(match, "SwapTotal: %ld", &mem_got); memall->swap_t = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "SwapFree" */ match = strstr(buffer, "SwapFree"); if (match == NULL) /* not found */ return 0; sscanf(match, "SwapFree: %ld", &mem_got); memall->swap_f = mem_got*1024; /* 1MB = 1024KB */ return 1; } /* Return length of first line in a string */ static size_t getLineLength(const char *str) { const char *p = str; while (*p && (*p != '\n')) p++; return (size_t) (p - str); } /* Checks if number 'match' is found in a vector 'set' of size 'size' Returns 1 if yes, otherwise, 0 */ static tInt searchInSet(const tInt *set, unsigned size, tInt match) { unsigned index; for (index = 0; index < size; index++) if (match == set[index]) return 1; return 0; } /* Get system information */ TesError tesCreateSystemInfo(TesSystemInfo *info) { FILE *file; TesError error = TES_SUCCESS; if (info == NULL) return TES_INVALID_PARAMS; info->cpuModelName = NULL; info->osName = NULL; info->numLogicalProcessors = info->numPhysicalProcessors = 0; /* get kernel version string */ file = fopen("/proc/version", "rb"); if (file != NULL) { size_t size; /* read bytes and find end of file */ for (size = 0; ; size++) if (EOF == fgetc(file)) break; info->osName = TMALLOC(char, size); rewind(file); fread(info->osName, sizeof(char), size, file); fclose(file); info->osName[size-1] = '\0'; } else { error = TES_FAIL; } /* get cpu information */ file = fopen("/proc/cpuinfo", "rb"); if (file != NULL) { size_t size; char *inStr; /* read bytes and find end of file */ for (size = 0; ; size++) if (EOF == fgetc(file)) break; /* get complete string */ inStr = TMALLOC(char, size+1); rewind(file); fread(inStr, sizeof(char), size, file); inStr[size] = '\0'; { const char *matchStr = "model name"; /* pointer to first occurrence of model name*/ const char *modelStr = strstr(inStr, matchStr); if (modelStr != NULL) { /* search for ':' */ const char *modelPtr = strchr(modelStr, ':'); if (modelPtr != NULL) { /*length of string from ':' till end of line */ size_t numToEOL = getLineLength(modelPtr); if (numToEOL > 2) { /* skip ": "*/ numToEOL -= 2; info->cpuModelName = TMALLOC(char, numToEOL+1); memcpy(info->cpuModelName, modelPtr+2, numToEOL); info->cpuModelName[numToEOL] = '\0'; } } else { error = TES_FAIL; } } else { error = TES_FAIL; } } { const char *matchStrProc = "processor"; const char *matchStrPhys = "physical id"; char *strPtr = inStr; unsigned numProcs = 0; tInt *physIDs; /* get number of logical processors */ while ((strPtr = strstr(strPtr, matchStrProc)) != NULL) { // numProcs++; strPtr += strlen(matchStrProc); if (isblank(*strPtr)) numProcs++; } info->numLogicalProcessors = numProcs; physIDs = TMALLOC(tInt, numProcs); /* get number of physical CPUs */ numProcs = 0; strPtr = inStr; while ((strPtr = strstr(strPtr, matchStrProc)) != NULL) { /* search for first occurrence of physical id */ strPtr = strstr(strPtr, matchStrPhys); if (strPtr != NULL) { /* go to ';' */ strPtr = strchr(strPtr, ':'); if (strPtr != NULL) { tInt buffer = 0; /* skip ": " */ strPtr += 2; /* get number */ sscanf(strPtr, "%d", &buffer); /* If this physical id is unique, we have another physically available CPU */ if (searchInSet(physIDs, numProcs, buffer) == 0) { physIDs[numProcs] = buffer; numProcs++; } } else { // error = TES_FAIL; break; } } else { // error = TES_FAIL; break; } } info->numPhysicalProcessors = numProcs; free(physIDs); } /* another test to get number of logical processors * if (info->numLogicalProcessors == 0) { * char *token; * char *cpustr = copy(inStr); * while (cpustr && !*cpustr) * if (cieq(gettok(&cpustr), "processor")) { * gettok(&cpustr); * token = gettok(&cpustr); * } * * info->numLogicalProcessors = atoi(token) + 1; * tfree(cpustr); * } */ free(inStr); fclose(file); } else { error = TES_FAIL; } return error; } #elif defined(HAVE_WIN32) /* get memory information */ static int get_sysmem(struct sys_memory *memall) { #if (_WIN32_WINNT >= 0x0500) MEMORYSTATUSEX ms; ms.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&ms); memall->size_m = ms.ullTotalPhys; memall->free_m = ms.ullAvailPhys; memall->swap_t = ms.ullTotalPageFile; memall->swap_f = ms.ullAvailPageFile; #else MEMORYSTATUS ms; ms.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus(&ms); memall->size_m = ms.dwTotalPhys; memall->free_m = ms.dwAvailPhys; memall->swap_t = ms.dwTotalPageFile; memall->swap_f = ms.dwAvailPageFile; #endif return 1; } /* get system information */ TesError tesCreateSystemInfo(TesSystemInfo *info) { OSVERSIONINFOA version; char *versionStr = NULL, *procStr, *freeStr; DWORD major, minor; DWORD dwLen; HKEY hkBaseCPU; LONG lResult; SYSTEM_INFO sysinfo; GetSystemInfo(&sysinfo); info->numPhysicalProcessors = 0; info->numLogicalProcessors = sysinfo.dwNumberOfProcessors; //atoi(getenv("NUMBER_OF_PROCESSORS")); info->osName = NULL; version.dwOSVersionInfoSize = sizeof(OSVERSIONINFOA); if (GetVersionExA(&version) == 0) return TES_FAIL; major = version.dwMajorVersion; minor = version.dwMinorVersion; switch (major) { case 4: if (minor == 0) versionStr = "Windows 95/NT4.0"; else if (minor == 10) versionStr = "Windows 98"; else if (minor == 90) versionStr = "Windows ME"; break; case 5: if (minor == 0) versionStr = "Windows 2000"; else if (minor == 1) versionStr = "Windows XP"; else if (minor == 2) versionStr = "Windows Server 2003"; break; case 6: if (minor == 0) versionStr = "Windows Vista"; else if (minor == 1) versionStr = "Windows 7"; break; default: break; } if (versionStr != NULL) { size_t lengthCSD = strlen(version.szCSDVersion); size_t lengthVer = strlen(versionStr); info->osName = TMALLOC(char, lengthVer + lengthCSD + 2); memcpy(info->osName, versionStr, lengthVer); memcpy(info->osName + lengthVer + 1, version.szCSDVersion, lengthCSD); info->osName[lengthVer] = ' '; info->osName[lengthVer + lengthCSD + 1] = '\0'; } lResult = RegOpenKeyExA(HKEY_LOCAL_MACHINE, "HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", 0, KEY_READ, &hkBaseCPU); if (lResult != ERROR_SUCCESS) { info->cpuModelName = NULL; return TES_FAIL; } RegQueryValueExA(hkBaseCPU, "ProcessorNameString", 0, 0, NULL, &dwLen); freeStr = procStr = TMALLOC(char, dwLen + 1); RegQueryValueExA(hkBaseCPU, "ProcessorNameString", 0, 0, (LPBYTE)procStr, &dwLen); procStr[dwLen] = '\0'; while (*procStr == ' ') procStr++; info->cpuModelName = copy(procStr); tfree(freeStr); RegCloseKey(hkBaseCPU); return TES_SUCCESS; } #else /* no Windows OS, no proc info file system */ TesError tesCreateSystemInfo(TesSystemInfo *info) { return 1; } #endif ngspice-26/src/frontend/ChangeLog0000644000265600020320000003357112264261473016422 0ustar andreasadmin2003-07-08 Stefan Jones * quote.c: return the pointer to the start of malloced memory so it can be freeded 2003-05-02 Stuart Brorson * Major changes in subckt.c to handle POLY attributes in dependent sources. Added new case to switch in "translate" to handle E, F, G, H sources. Many other fixes. * Moved location of call to ENHtranslate_poly in inp.c. This was necessary to correctly process POLY attributes and the associated netlists and voltage sources. 2003-04-10 Stuart Brorson * modified inp_readall (inpcom.c) to ignore blank lines terminated by \r\n *and * \n. This fixes problems associated with importing files from Windozeland. * Added explanatory comments to many modules. 2002-01-03 Paolo Nenzi * wdisp: added an entire directory containing windows frontend code (Holger Vogt patch). Files in wdsip: ftegraf.h, makedefs, Makefile.am, windisp.c and winprint.c. * Makefile.am: Windows code compilation rules added to makefile. * display.c, outitf.c, rawfile.c, resource.c, runcoms.c: added defines for Windows (Holger Vogt patch). 2001-12-14 Paolo Nenzi * control.c, control.h, com_cdump.c, com_cdump.h, variable.c, variable.h: Patched the code with the one contributed by Charles Williams. The patches addresses some memory leaks. 2001-11-25 Emmanuel Rouat * circuits.h: transfered definition of structure 'circ' to ftedefs.h 2001-02-07 Paolo Nenzi * outitf.c: From a message Alan sento to the mailing list: ---------- Forwarded message ---------- Date: Tue, 6 Feb 2001 11:11:56 -0000 From: "Gillespie, Alan" Reply-To: ng-spice-devel@ieee.ing.uniroma1.it To: "Ng-Spice-Devel (E-mail)" Subject: [ng-spice-devel] Reference variable update in interactive mode I've tweaked outitf.c so that the reference variable value is updated to the screen in interactive mode. I forgot to save the old version first, though, so I couldn't do a diff, so I'm just attaching the whole new outitf.c file. Also, I've updated the documentation as follows :- Modifications to "outitf.c" --------------------------- A number of modifications have been applied to outitf.c in order to achieve the following "improvements" :- 1) Spice3, by default, saved all node voltages, including nodes internal to the devices. These extra nodes add dramatically to the amount of data saved, but don't add significantly to the useful information about the circuit. So, instead of saving these nodes, a "hack" has been introduced which checks a new spice option, and either discards the internal node, or saves some device currents instead. 2) During long simulations, spice would sit "staring back blankly", giving no clue as to how well the simulation was, or wasn't, proceeding. In order to give a little more feedback, another "hack", in the data writing routine, writes the value of the reference variable to the error stream, which is usually the screen. In order to minimize the CPU time "wasted" doing this, the routine will only reprint the value if more than a quarter of a second since the last screen update. The result is that this feedback adds no significant extra time to performance of the simulation. 3) The original file writing routines used to write each data value to the file individually. A buffering scheme was added, which collects each row of data in a buffer, and the writes the whole buffer in one call. This gave a significant performance improvement (up to 20%) on HPUX, with all currents saved in large circuits, although there was no significant difference on Windows 95. The improvement has not been measured on Linux. 4) A check was added to make sure the file write was successful. Spice3 could easily fill the hard disk, but would continue to churn away, producing no more useful data. Now it will exit gracefully. I can't remember why I thought this was important, but at least it means that a PC with power management will be able to power down after a long overnight simulation has ceased to produce any more useful data. Changes ------- The routine beginPlot is called at the beginning of the simulation to select which nodes and variables will be saved. The first modification is at the point where it checks the "save" list. This is the list of tokens attached to the .save lines read from the spice source file. The routine now checks for "allv" and "alli" as well as "all". "allv" is treated as a synonym for "all". If "all" or "allv" is found, then a saveall flag is set, and if "alli" is found then a new savealli flag is set. Next, the addDataDesc routine is called for every variable to be saved. This is done by stepping through an array called dataNames[]. I'm not quite sure where this array comes from, but it was quite easy to add an if statement to stop it calling addDataDesc if dataNames[i] points to a string containing any of the following - #internal #source #drain #collector #emitter #base That seems to catch all the internal device nodes. The next addition is a new pass through the dataNames[] array specifically looking for those strings. (This pass is only performed if the savealli flag has been set). When one of the strings is found, a bunch of if-then-else statements creates a corresponding string which is submitted to the add addSpecialDesc routine. This saves the relevant device current. Note that since mosfets have only two internal nodes, but four terminal currents, and bipolars have three internal nodes and four terminal currents, some internal nodes have to save more than one terminal current. This last change is a clumsy hack, and only works if the devices in question actually have internal nodes. Resistors and capacitors, for instance, never have internal nodes, and so their terminal currents will not cannot be saved with the .save alli card. Also, any bipolar, mosfet or diodes with zero valued parasitic resistances (rd, rs, rc, rb, re) will not be allocated internal nodes, and so their terminal currents will not be saved by this hack, either. Further down outitf.c, the OUTpData routine is called whenever a new row of data is ready to be written to file. Near the top of this, the reference variable is written to file separately from the rest of the variables. This is a convenient point for a couple of statements which check the elapsed time since the last update, and write the reference value to stderr if it's time. Slightly further down the routine is the section for writing data to a "plot", i.e. retaining it in memory. A similar statement or two writes the reference value to the screen for this case, i.e. interactive mode. At the end of the OUTpData routine, a new check has been added to see if there was an error writing to the rawfile. If so, the shouldstop flag is set to TRUE, and the simulation will abort. Scanning down outitf.c, the next modification is in the fileInit routine. The first statement initialises the lastclock variable. This is used later when deciding if it's time to write the reference value to the screen. Next, the fileInit_pass2 routine writes the name strings to the start of the rawfile. At the end of this routine there is now a statement which checks if this will be a binary rawfile, and if so, it allocates a row buffer of the correct length. The fileStartPoint routine seems to be called before each row of data is written, and so this is a convenient point to reset the buffer pointer to zero. The fileAddRealValue and fileAddComplexValue routines now simply write the relevant values to the buffer, and increment the buffer pointer. Previously they called the fwrite library routine to actually write the data. If the rawfile is not a binary one, however, they just write the text as before. The fileEndPoint routine was previously empty. Now it actually calls fwrite to write the whole buffer to the file (if it's a binary file). Finally the fileEnd routine prints the total number of data points to the screen, and de-allocates the row buffer (if it was a binary rawfile). Congratulations to whoever put these dummy routines in in the first place, since that allowed the buffering to be added very easily. 2001-01-23 Paolo Nenzi * subckt.c: added some code (very, very experimental) to support mos devices with variable number of nodes (5 to 7) in subcircuit expansion. This hack is necessary since SOI devices can have up to 7 nodes. 2000-11-07 Arno W. Peters * com_history, com_alias, parser/cshpar.c, parser/complete.c: Applied patch by Michael Widlok. It fixes command completion and history list. In the process, Michael also fixed a memory leak. 2000-09-09 Arno W. Peters * commands.c: Use fourier.h. * dotcards.c: Update to prevent segfault. * fourier.c, fourier.h: com_fourier is now calling fourier(), a function with more parameters. * dotcards.c: Added assertions to guard a double indirection, now ngspice will bomb out on an assertion instead of a segfault. 2000-07-18 Arno W. Peters * com_ahelp.c, com_help.c, com_plot.c, com_set.c, com_unset.c: Updated header file includes. * quote.c: Code formatting changes. 2000-07-16 Arno W. Peters * com_set.h: New header file. * com_state.c, com_state.h: Separated from debugcom.c. * com_dump.c, com_dump.h: Separated from debugcom.c. * debugcom.c, debugcom.h: Removed. * Makefile.am: Updates for added/removed files. 2000-03-22 Paolo Nenzi * rawfile.c: Applied Michael Widlok patch. * spiceif.c: Applied Michael Widlok patch. 2000-03-12 Paolo Nenzi * x11.c: Cleared the code. Rewmoved some empty return on void functions. 1999-12-20 Paolo Nenzi * outif.c: To fix various "save"-related segmentation faults, make this one-line patch to outitf.c: line 356, change unique = devname; to unique = copy(devname); 1999-12-20 Paolo Nenzi * subckt.c: Bug: Current controlled switch subcircuit does not expand the controlling source correctly: vsrc expands to name:vsrc, not to v:name:src. Fix: changed this file to indicate that w device has only 2 not 3 nodes and 1 not zero controlling sources. 1999-09-07 Emmanuel Rouat * *.c: put back static functions declarations back in the .c files (shouldn't be in .h files!) 1999-09-07 Arno * aspice.c: template to fprintf now conform to argument types. * cmath1.c: * cmath2.c: removed most warnings about possible use of uninitialized variables. Only two remain in cx_sqrt(). 1999-09-06 Arno Peters * dotcards.c: Put proper braces around an ambiguous if/else construct. * postcoms.c: * postsc.c: Removed unused variables. 1999-09-04 Emmanuel Rouat * Makefile.am (libfte_a_SOURCES): forgot display.h in list * typesdef.c: moved types.c to typesdef.c * signal_handler.c: moved signal.c to signal_handler.c * *.c: added header file for all .c files 1999-09-01 Emmanuel Rouat * *.c: removed lots of unnecessary HAS_XX tests and code * Makefile.am (libfte_a_SOURCES): removed mfb.c from sources * signal.c (ft_sigintr): removed HAS_MFB test 1999-08-30 Paolo Nenzi * Removed #include "suffix.h" and replaced GENERIC with void. 1999-08-28 Emmanuel Rouat * Makefile.am (libfte_a_SOURCES): removed x10.c from source files * clip.c: removed MAX/MIN #defines * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-19 Paolo Nenzi * Makefile.am: added spec.c. * spcmdtab.c: added code for spec command support. The original patch came from ftp.mpce.mq.edu.au. * spec.c: added this file containing the spec command code. 1999-08-08 Emmanuel Rouat * Makefile.am (DEFS): removed -DWANT_MFB (don't need it) * resource.c : removed HAS_RLIMIT_ tests * error.c: removed HAS_VAXFPERROR code * cmath3.c: removed HAS_SHORTMACRO code * display.c : removed HAS_X10 code * mfb.c (Mfb_Init): removed HAS_PCTERM code * resource.c: removed all code related to HAS_MEMAVL 1999-08-06 Emmanuel Rouat * resource.c: removed tests on HAS_UNIX_SEGMENT_HACK * xgraph.c (ft_xgraph), options.c (cp_usrset), misccoms.c: removed tests on HAS_SYSTEM * nutinp.c, inp.c (com_source, doedit): removed tests on HAS_SYSTEM (always true?) * doplot.c (com_hardcopy): removed tests on HAS_UNLINK (always true), removed tests on HAS_SYSTEM (always true?) * signal.c: * evaluate.c (doop): * error.c (fatal): * aspice.c: removed test on HAS_UNIX_SIGS (always true) * signal.c: * evaluate.c: removed test on HAS_LONGJUMP (always true) 1999-08-04 Emmanuel Rouat * aspice.c: changed HAS_WAIT into HAVE_SYS_WAIT_H * inpcom.c, breakp.c: changed HAS_CTYPE into HAVE_CTYPE_H 1999-08-03 Emmanuel Rouat * signal.c, resource.c, evaluate.c, aspice.c: changed SIGNAL_TYPE into RETSIGTYPE 1999-07-31 Emmanuel Rouat * Makefile.am: added @X_CFLAGS@ (X11 header files) to INCLUDES and removed unused LIBS list. 28-07-1999 emmanuel.rouat@wanadoo.fr (Manu Rouat) * graf.c, display.c, doplot.c, x11.c: changed HAS_X11 define to X_DISPLAY_MISSING, which is supplied by autoconf in config.h * Makefile.am: removed -DWANT_X11 ngspice-26/src/frontend/com_shell.c0000644000265600020320000000261612264261473016755 0ustar andreasadmin/************* * com_shell.c ************/ #include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #include "com_shell.h" #include "streams.h" #include "ngspice/cpextern.h" /* Fork a shell. */ void com_shell(wordlist *wl) { char *com, *shell = NULL; shell = getenv("SHELL"); if (shell == NULL) shell = "/bin/csh"; cp_ccon(FALSE); #ifdef HAVE_VFORK_H /* XXX Needs to switch process groups. Also, worry about suspend */ /* Only bother for efficiency */ pid = vfork(); if (pid == 0) { fixdescriptors(); if (wl == NULL) { execl(shell, shell, 0); _exit(99); } else { com = wl_flatten(wl); execl("/bin/sh", "sh", "-c", com, 0); } } else { /* XXX Better have all these signals */ svint = signal(SIGINT, SIG_DFL); svquit = signal(SIGQUIT, SIG_DFL); svtstp = signal(SIGTSTP, SIG_DFL); /* XXX Sig on proc group */ do r = wait(NULL); while ((r != pid) && pid != -1); signal(SIGINT, (SIGNAL_FUNCTION) svint); signal(SIGQUIT, (SIGNAL_FUNCTION) svquit); signal(SIGTSTP, (SIGNAL_FUNCTION) svtstp); } #else /* Easier to forget about changing the io descriptors. */ if (wl) { com = wl_flatten(wl); system(com); tfree(com); } else { system(shell); } #endif } ngspice-26/src/frontend/linear.h0000644000265600020320000000025212264261473016261 0ustar andreasadmin/************* * Header file for linear.c * 1999 E. Rouat ************/ #ifndef ngspice_LINEAR_H #define ngspice_LINEAR_H void com_linearize(wordlist *wl); #endif ngspice-26/src/frontend/variable.h0000644000265600020320000000173012264261473016576 0ustar andreasadmin/* variable.h */ #ifndef ngspice_VARIABLE_H #define ngspice_VARIABLE_H #include "ngspice/cpextern.h" /* Variables that are accessible to the parser via $varname * expansions. If the type is CP_LIST the value is a pointer to a * list of the elements. */ struct variable { enum cp_types va_type; char *va_name; union { bool vV_bool; int vV_num; double vV_real; char *vV_string; struct variable *vV_list; } va_V; struct variable *va_next; /* Link. */ }; #define va_bool va_V.vV_bool #define va_num va_V.vV_num #define va_real va_V.vV_real #define va_string va_V.vV_string #define va_vlist va_V.vV_list struct xxx { struct variable *x_v; char x_char; }; extern struct variable *variables; extern bool cp_echo; /* extern struct variable *variables; */ wordlist *cp_varwl(struct variable *var); wordlist *cp_variablesubst(wordlist *wlist); void free_struct_variable(struct variable *v); #endif ngspice-26/src/frontend/com_hardcopy.h0000644000265600020320000000015112264261473017454 0ustar andreasadmin#ifndef ngspice_COM_HARDCOPY_H #define ngspice_COM_HARDCOPY_H void com_hardcopy(wordlist *wl); #endif ngspice-26/src/frontend/completion.h0000644000265600020320000000127612264261473017167 0ustar andreasadmin#ifndef ngspice_COMPLETION_H #define ngspice_COMPLETION_H /* The types for command completion keywords. Note that these * constants are built into cmdtab.c, so DON'T change them unless you * want to change all of the bitmasks in cp_coms. Note that this is * spice- and nutmeg- dependent. */ #define CT_FILENAME 0 #define CT_CKTNAMES 2 #define CT_COMMANDS 3 #define CT_DBNUMS 4 #define CT_DEVNAMES 5 #define CT_LISTINGARGS 6 #define CT_NODENAMES 7 #define CT_PLOT 8 #define CT_PLOTKEYWORDS 9 #define CT_RUSEARGS 10 #define CT_STOPARGS 11 #define CT_UDFUNCS 12 #define CT_VARIABLES 13 #define CT_VECTOR 14 #define CT_TYPENAMES 16 #endif ngspice-26/src/frontend/options.h0000644000265600020320000000021312264261473016477 0ustar andreasadmin/************* * Header file for options.c * 1999 E. Rouat ************/ #ifndef ngspice_OPTIONS_H #define ngspice_OPTIONS_H #endif ngspice-26/src/frontend/vectors.h0000644000265600020320000000027412264261473016500 0ustar andreasadmin/************* * Header file for vectors.c * 1999 E. Rouat ************/ #ifndef ngspice_VECTORS_H #define ngspice_VECTORS_H #define vec_free(ptr) vec_free_x(ptr); ptr=NULL #endif ngspice-26/src/frontend/com_ahelp.c0000644000265600020320000000363212264261473016736 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/fteext.h" #include "variable.h" #include "com_help.h" #include "com_ahelp.h" #include "hcomp.h" #include "ftehelp.h" #include "plotting/plotting.h" void com_ahelp(wordlist *wl) { int i, n; /* assert: number of commands must be less than 512 */ struct comm *cc[512]; unsigned int env = 0; struct comm *com; unsigned int level; char slevel[256]; if (wl) { com_help(wl); return; } out_init(); /* determine environment */ if (plot_list->pl_next) /* plots load */ env |= E_HASPLOTS; else env |= E_NOPLOTS; /* determine level */ if (cp_getvar("level", CP_STRING, slevel)) { switch (*slevel) { case 'b': level = 1; break; case 'i': level = 2; break; case 'a': level = 4; break; default: level = 1; break; } } else { level = 1; } out_printf( "For a complete description read the Spice3 User's Manual manual.\n"); out_printf( "For a list of all commands type \"help all\", for a short\n"); out_printf( "description of \"command\", type \"help command\".\n"); /* sort the commands */ for (n = 0; cp_coms[n].co_func != NULL; n++) cc[n] = &cp_coms[n]; qsort(cc, (size_t) n, sizeof(struct comm *), hcomp); /* filter the commands */ for (i = 0; i < n; i++) { com = cc[i]; if ((com->co_env < (level << 13)) && (!(com->co_env & 4095) || (env & com->co_env))) { if ((com->co_spiceonly && ft_nutmeg) || (com->co_help == NULL)) continue; out_printf("%s ", com->co_comname); out_printf(com->co_help, cp_program); out_send("\n"); } } out_send("\n"); } ngspice-26/src/frontend/mw_coms.h0000644000265600020320000000025612264261473016457 0ustar andreasadmin/************* * Header file for mw_coms.c * 1999 E. Rouat ************/ #ifndef ngspice_MW_COMS_H #define ngspice_MW_COMS_H void com_removecirc(wordlist *wl); #endif ngspice-26/src/frontend/nutinp.h0000644000265600020320000000025112264261473016323 0ustar andreasadmin/************* * Header file for nutinp.c * 1999 E. Rouat ************/ #ifndef ngspice_NUTINP_H #define ngspice_NUTINP_H void nutinp_source(char *file); #endif ngspice-26/src/frontend/display.c0000644000265600020320000002614712264261473016462 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/graph.h" #include "ngspice/ftedev.h" #include "ngspice/fteinput.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #ifdef TCL_MODULE #include "ngspice/tclspice.h" #endif #include "display.h" #include "variable.h" static void gen_DatatoScreen(GRAPH *graph, double x, double y, int *screenx, int *screeny); static int gen_Input(REQUEST *request, RESPONSE *response); static int nop(void); static int nodev(void); #ifndef X_DISPLAY_MISSING #include "plotting/x11.h" #endif #ifdef HAS_WINGUI /* Graphic-IO under MS Windows */ #include "wdisp/windisp.h" //#include "wdisp/winprint.h" #endif #include "plotting/plot5.h" #include "postsc.h" #include "hpgl.h" DISPDEVICE device[] = { { "error", 0, 0, 0, 0, 0, 0, (disp_fn_Init_t *) nop, (disp_fn_NewViewport_t *) nop, (disp_fn_Close_t *) nop, (disp_fn_Clear_t *) nop, (disp_fn_DrawLine_t *) nop, (disp_fn_Arc_t *) nop, (disp_fn_Text_t *) nop, (disp_fn_DefineColor_t *) nop, (disp_fn_DefineLinestyle_t *) nop, (disp_fn_SetLinestyle_t *) nop, (disp_fn_SetColor_t *) nop, (disp_fn_Update_t *) nop, (disp_fn_Track_t *) nop, (disp_fn_MakeMenu_t *) nop, (disp_fn_MakeDialog_t *) nop, gen_Input, (disp_fn_DatatoScreen_t *) nop,}, #ifndef X_DISPLAY_MISSING { "X11", 0, 0, 1024, 864, 0, 0, X11_Init, X11_NewViewport, X11_Close, X11_Clear, X11_DrawLine, X11_Arc, X11_Text, X11_DefineColor, X11_DefineLinestyle, X11_SetLinestyle, X11_SetColor, X11_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, X11_Input, gen_DatatoScreen,}, #endif #ifdef HAS_WINGUI /* Graphic-IO under MS Windows */ { "Windows", 0, 0, 1000, 1000, 0, 0, WIN_Init, WIN_NewViewport, WIN_Close, WIN_Clear, WIN_DrawLine, WIN_Arc, WIN_Text, WIN_DefineColor, WIN_DefineLinestyle, WIN_SetLinestyle, WIN_SetColor, WIN_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, gen_Input, gen_DatatoScreen, }, /* WIN_DiagramReady */ /* Warning: name "WinPrint" do not change! */ { "WinPrint", 0, 0, 1000, 1000, 0, 0, WPRINT_Init, WPRINT_NewViewport, WPRINT_Close, WPRINT_Clear, WPRINT_DrawLine, WPRINT_Arc, WPRINT_Text, WPRINT_DefineColor, WPRINT_DefineLinestyle, WPRINT_SetLinestyle, WPRINT_SetColor, WPRINT_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, (disp_fn_Input_t *) nodev, gen_DatatoScreen, }, /* WPRINT_DiagramReady */ #endif #ifdef TCL_MODULE { "Tk", 0, 0, 1024, 864, 0, 0, sp_Tk_Init, sp_Tk_NewViewport, sp_Tk_Close, sp_Tk_Clear, sp_Tk_DrawLine, sp_Tk_Arc, sp_Tk_Text, sp_Tk_DefineColor, sp_Tk_DefineLinestyle, sp_Tk_SetLinestyle, sp_Tk_SetColor, sp_Tk_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, (disp_fn_Input_t *) nodev, gen_DatatoScreen, }, #endif { "plot5", 0, 0, 1000, 1000, 0, 0, Plt5_Init, Plt5_NewViewport, Plt5_Close, Plt5_Clear, Plt5_DrawLine, Plt5_Arc, Plt5_Text, (disp_fn_DefineColor_t *) nodev, (disp_fn_DefineLinestyle_t *) nodev, Plt5_SetLinestyle, Plt5_SetColor, Plt5_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, (disp_fn_Input_t *) nodev, gen_DatatoScreen, }, { "postscript", 0, 0, 1000, 1000, 0, 0, PS_Init, PS_NewViewport, PS_Close, PS_Clear, PS_DrawLine, PS_Arc, PS_Text, (disp_fn_DefineColor_t *) nodev, (disp_fn_DefineLinestyle_t *) nodev, PS_SetLinestyle, PS_SetColor, PS_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, (disp_fn_Input_t *) nodev, gen_DatatoScreen, }, { "hpgl", 0, 0, 1000, 1000, 0, 0, GL_Init, GL_NewViewport, GL_Close, GL_Clear, GL_DrawLine, GL_Arc, GL_Text, (disp_fn_DefineColor_t *) nodev, (disp_fn_DefineLinestyle_t *) nodev, GL_SetLinestyle, GL_SetColor, GL_Update, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, (disp_fn_Input_t *) nodev, gen_DatatoScreen, }, { "printf", 0, 0, 24, 80, 0, 0, (disp_fn_Init_t *) nodev, (disp_fn_NewViewport_t *) nodev, (disp_fn_Close_t *) nop, (disp_fn_Clear_t *) nodev, (disp_fn_DrawLine_t *) nodev, (disp_fn_Arc_t *) nodev, (disp_fn_Text_t *) nodev, (disp_fn_DefineColor_t *) nodev, (disp_fn_DefineLinestyle_t *) nodev, (disp_fn_SetLinestyle_t *) nodev, (disp_fn_SetColor_t *) nodev, (disp_fn_Update_t *) nop, (disp_fn_Track_t *) nodev, (disp_fn_MakeMenu_t *) nodev, (disp_fn_MakeDialog_t *) nodev, gen_Input, (disp_fn_DatatoScreen_t *) nodev, }, }; DISPDEVICE *dispdev = device + NUMELEMS(device) - 1; DISPDEVICE * FindDev(char *name) { size_t i; for (i = 0; i < NUMELEMS(device); i++) if (strcmp(name, device[i].name) == 0) return (device + i); sprintf(ErrorMessage, "Can't find device %s.", name); internalerror(ErrorMessage); return (device + 0); } void DevInit(void) { #ifndef X_DISPLAY_MISSING char buf[128]; #endif /* note: do better determination */ /* dumb tradition that got passed on from gi_interface to do compile time determination */ dispdev = NULL; #ifndef X_DISPLAY_MISSING /* determine display type */ if (getenv("DISPLAY") || cp_getvar("display", CP_STRING, buf)) dispdev = FindDev("X11"); #endif #ifdef HAS_WINGUI if (!dispdev) dispdev = FindDev("Windows"); #endif #ifdef TCL_MODULE dispdev = FindDev("Tk"); #endif if (!dispdev) { #if !defined(HAS_WINGUI) && !defined(TCL_MODULE) && !defined(SHARED_MODULE) && (defined(_MSC_VER) || defined(__MINGW32__)) /* console application under MS Windows */ fprintf (cp_err, "Warning: no graphics interface!\n" " You may use command 'gnuplot'\n" " if GnuPlot is installed.\n"); #elif !defined(X_DISPLAY_MISSING) externalerror ("no graphics interface;\n" " please check if X-server is running,\n" " or ngspice is compiled properly (see INSTALL)"); #endif dispdev = FindDev("error"); } else if (dispdev->Init()) { fprintf(cp_err, "Warning: can't initialize display device for graphics.\n"); dispdev = FindDev("error"); } } /* NewViewport is responsible for filling in graph->viewport */ int NewViewport(GRAPH *pgraph) { return dispdev->NewViewport (pgraph); } void DevClose(void) { dispdev->Close(); } void DevClear(void) { dispdev->Clear(); } void DevDrawLine(int x1, int y1, int x2, int y2) { dispdev->DrawLine (x1, y1, x2, y2); } void DevDrawArc(int x0, int y0, int radius, double theta, double delta_theta) { dispdev->DrawArc (x0, y0, radius, theta, delta_theta); } void DevDrawText(char *text, int x, int y) { dispdev->DrawText (text, x, y); } void DefineColor(int colorid, double red, double green, double blue) { dispdev->DefineColor (colorid, red, green, blue); } void DefineLinestyle(int linestyleid, int mask) { dispdev->DefineLinestyle (linestyleid, mask); } void SetLinestyle(int linestyleid) { dispdev->SetLinestyle (linestyleid); } void SetColor(int colorid) { dispdev->SetColor (colorid); } void DevUpdate(void) { if (dispdev) dispdev->Update(); } /* note: screen coordinates are relative to window so need to add viewport offsets */ static void gen_DatatoScreen(GRAPH *graph, double x, double y, int *screenx, int *screeny) { double low, high; /* note: may want to cache datawindowsize/viewportsize */ /* done */ /* note: think this out---Is 1 part of the viewport? Do we handle this correctly? */ /* have to handle several types of grids */ /* note: we can't compensate for X's demented y-coordinate system here since the grid routines use DevDrawLine w/o calling this routine */ if ((graph->grid.gridtype == GRID_LOGLOG) || (graph->grid.gridtype == GRID_YLOG)) { low = mylog10(graph->datawindow.ymin); high = mylog10(graph->datawindow.ymax); *screeny = (int)((mylog10(y) - low) / (high - low) * graph->viewport.height + 0.5 + graph->viewportyoff); } else { *screeny = (int)(((y - graph->datawindow.ymin) / graph->aspectratioy) + 0.5 + graph->viewportyoff); } if ((graph->grid.gridtype == GRID_LOGLOG) || (graph->grid.gridtype == GRID_XLOG)) { low = mylog10(graph->datawindow.xmin); high = mylog10(graph->datawindow.xmax); *screenx = (int)((mylog10(x) - low) / (high - low) * graph->viewport.width + 0.5 + graph ->viewportxoff); } else { *screenx = (int)((x - graph->datawindow.xmin) / graph->aspectratiox + 0.5 + graph ->viewportxoff); } } void DatatoScreen(GRAPH *graph, double x, double y, int *screenx, int *screeny) { dispdev->DatatoScreen (graph, x, y, screenx, screeny); } void Input(REQUEST *request, RESPONSE *response) { dispdev->Input (request, response); } static int gen_Input(REQUEST *request, RESPONSE *response) { switch (request->option) { case char_option: if (response) response->option = request->option; break; default: /* just ignore, since we don't want a million error messages */ if (response) response->option = error_option; break; } return (0); } /* no operation, do nothing */ static int nop(void) { return (1); /* so NewViewport will fail */ } static int nodev(void) { sprintf(ErrorMessage, "This operation is not defined for display type %s.", dispdev->name); internalerror(ErrorMessage); return (1); } void SaveText(GRAPH *graph, char *text, int x, int y) { struct _keyed *keyed = TMALLOC(struct _keyed, 1); if (!graph->keyed) { graph->keyed = keyed; } else { keyed->next = graph->keyed; graph->keyed = keyed; } keyed->text = TMALLOC(char, strlen(text) + 1); strcpy(keyed->text, text); keyed->x = x; keyed->y = y; keyed->colorindex = graph->currentcolor; } /* if given name of a hardcopy device, finds it and switches devices if given NULL, switches back */ int DevSwitch(char *devname) { static DISPDEVICE *lastdev = NULL; if (devname) { if (lastdev) { internalerror("DevSwitch w/o changing back"); return (1); } lastdev = dispdev; dispdev = FindDev(devname); if (!strcmp(dispdev->name, "error")) { internalerror("no hardcopy device"); /* undo */ dispdev = lastdev; lastdev = NULL; return (1); } dispdev->Init(); } else { if (dispdev) dispdev->Close(); dispdev = lastdev; lastdev = NULL; } return (0); } ngspice-26/src/frontend/com_strcmp.h0000644000265600020320000000014312264261473017154 0ustar andreasadmin#ifndef ngspice_COM_STRCMP_H #define ngspice_COM_STRCMP_H void com_strcmp(wordlist *wl); #endif ngspice-26/src/frontend/com_xgraph.h0000644000265600020320000000014212264261473017134 0ustar andreasadmin#ifndef ngspice_COM_XGRAPH_H #define ngspice_COM_XGRAPH_H void com_xgraph(wordlist *wl); #endif ngspice-26/src/frontend/trannoise/0000755000265600020320000000000012264261704016636 5ustar andreasadminngspice-26/src/frontend/trannoise/FastNorm3.c0000644000265600020320000006747612264261473020645 0ustar andreasadmin/* This is file FastNorm3.c */ /* SUPERCEDES FastNorm.c, FastNorm2.c. Use with FastNorm3.h */ /* 24 June 2003 */ /* A package containing a very fast generator of pseudo-random Unit NORMAL variates, and some fairly high-quality UNIFORM generators. It also contains a straightforward implementation of a ChiSquared and Gamma generator copied from Ahrens and Dieter. */ /* Version 3 with double transformations and controllable extension to repeat the double transformations for higher quality at lower speed. Dated 17 May 20003. Copyright Christopher Stewart Wallace. */ /* %A C. S. Wallace %T Fast Pseudo-Random Generators for Normal and Exponential Variates. %J ACM Trans. Math. Software %V 22 %N 1 %P 119-127 %M MAR %D 1996 %O TR 94/197, May 1994, Dept. Computer Science, Monash University %K CSW, CSWallace, Monash, pseudo random number generator, algorithm, jrnl, TOMS, numbers, normal, probability, distribution, PRNG, RNG, Gaussian, distribution, jrnl, ACM, TOMS, TR 94 197, TR197, c1996, c199x, c19xx */ /* Use of this package requires the file "FastNorm3.h" which must be #include-ed in any C files using this package. The main purpose of this package is to provide a very fast source of pseudo-random variates from the Unit Normal N(0,1) distribution, having the density function f(x) = (1/sqrt(2*PI)) * exp (-0.5 * x^2) Variates are obtained not by calling a function, but by use of a macro "FastNorm" defined in FastNorm3.h. In a C program, this macro may appear anywhere a (double) expression could appear, e.g in statements like z += FastNorm; if (FastNorm < 1.1) ..... q = fabs (FastNorm); etc. The revision history, and a reference to the method description, is given later in this file under the heading "Revision history Fastnorm". Major sections of this file, such as the revision history and the major subroutines, are all headed by a line containing a row of minus signs (-) and the name of the section or subroutine. The generators included are: a Uniform source of integers, unsigned integers and doubles. Chi-sq(N) (based on Ahrens and Dieter) Gamma(N) (= 0.5 * Chi-sq(2N)) Normal (a very fast routine) */ /* ----------------- inclusions and some definitions ------------ */ #ifndef NOSPICE #include "ngspice/ngspice.h" #endif #include #include #include "ngspice/FastNorm3.h" /* --------------- (Uniform) c7rand, irandm, urandm ---------- */ /* c A random number generator called as a function by c c7rand (iseed) or irandm (iseed) or urandm (iseed) c The parameter should be a pointer to a 2-element Sw vector. c The first call gives a double uniform in 0 .. 1. c The second gives an Sw integer uniform in 0 .. 2**31-1 c The third gives an Sw integer with 32 bits, so unif in c -2**31 .. 2**31-1 if used in 32-bit signed arithmetic. c All update iseed[] in exactly the same way. c iseed[] must be a 2-element Sw vector. c The initial value of iseed[1] may be any 32-bit integer. c The initial value of iseed[0] may be any 32-bit integer except -1. c c The period of the random sequence is 2**32 * (2**32-1) c Its quality is quite good. It is based on the mixed multiplicative c congruential (Lehmer) generator x[n+1] = (69069 * x[n] + odd constant) MOD 2^32 c but avoids most of the well-known defects of this type of generator c by, in effect, generating x[n+k] from x[n] as defined by the c sequence above, where k is chosen randomly in 1 ... 128 with the c help of a subsidiary Tauseworth-type generator. c For the positve integer generator irandm, the less c significant digits are more random than is usual for a Lehmer c generator. The last n<31 digits do not repeat with a period of 2^n. c This is also true of the unsigned integer generator urandm, but less c so. c This is an implementation in C of the algorithm described in c Technical Report "A Long-Period Pseudo-Random Generator" c TR89/123, Computer Science, Monash University, c Clayton, Vic 3168 AUSTRALIA c by c c C.S.Wallace csw@cs.monash.edu.au c The table mt[0:127] is defined by mt[i] = 69069 ** (128-i) */ #define MASK ((Sw) 0x12DD4922) /* or in decimal, 316492066 */ #define SCALE ((double) 1.0 / (1024.0 * 1024.0 * 1024.0 * 2.0)) /* i.e. 2 to power -31 */ static Sw mt [128] = { 902906369, 2030498053, -473499623, 1640834941, 723406961, 1993558325, -257162999, -1627724755, 913952737, 278845029, 1327502073, -1261253155, 981676113, -1785280363, 1700077033, 366908557, -1514479167, -682799163, 141955545, -830150595, 317871153, 1542036469, -946413879, -1950779155, 985397153, 626515237, 530871481, 783087261, -1512358895, 1031357269, -2007710807, -1652747955, -1867214463, 928251525, 1243003801, -2132510467, 1874683889, -717013323, 218254473, -1628774995, -2064896159, 69678053, 281568889, -2104168611, -165128239, 1536495125, -39650967, 546594317, -725987007, 1392966981, 1044706649, 687331773, -2051306575, 1544302965, -758494647, -1243934099, -75073759, 293132965, -1935153095, 118929437, 807830417, -1416222507, -1550074071, -84903219, 1355292929, -380482555, -1818444007, -204797315, 170442609, -1636797387, 868931593, -623503571, 1711722209, 381210981, -161547783, -272740131, -1450066095, 2116588437, 1100682473, 358442893, -1529216831, 2116152005, -776333095, 1265240893, -482278607, 1067190005, 333444553, 86502381, 753481377, 39000101, 1779014585, 219658653, -920253679, 2029538901, 1207761577, -1515772851, -236195711, 442620293, 423166617, -1763648515, -398436623, -1749358155, -538598519, -652439379, 430550625, -1481396507, 2093206905, -1934691747, -962631983, 1454463253, -1877118871, -291917555, -1711673279, 201201733, -474645415, -96764739, -1587365199, 1945705589, 1303896393, 1744831853, 381957665, 2135332261, -55996615, -1190135011, 1790562961, -1493191723, 475559465, 69069 }; double c7rand(Sw *is) { int32_t it, leh; it = is [0]; leh = is [1]; /* Do a 7-place right cyclic shift of it */ it = ((it >> 7) & 0x01FFFFFF) + ((it & 0x7F) << 25); if (it >= 0) it = it ^ MASK; leh = leh * mt[it & 127] + it; is [0] = it; is [1] = leh; if (leh < 0) leh = ~leh; return (SCALE * leh); } Sw irandm(Sw *is) { int32_t it, leh; it = is [0]; leh = is [1]; /* Do a 7-place right cyclic shift of it */ it = ((it >> 7) & 0x01FFFFFF) + ((it & 0x7F) << 25); if (it >= 0) it = it ^ MASK; leh = leh * mt[it & 127] + it; is [0] = it; is [1] = leh; if (leh < 0) leh = ~leh; return (leh); } unsigned int urandm(Sw *is) { int32_t it, leh; it = is [0]; leh = is [1]; /* Do a 7-place right cyclic shift of it */ it = ((it >> 7) & 0x01FFFFFF) + ((it & 0x7F) << 25); if (it >= 0) it = it ^ MASK; leh = leh * mt[it & 127] + it; is [0] = it; is [1] = leh; return (uint32_t) leh; } /* --------------- (Chi-squared) adchi ----------------------- */ /* Simple implementation of Ahrens and Dieter method for a chi-sq random variate of order a >> 1. Uses c7rand, maths library */ /* 13 July 1998 */ /* Slightly faster if 'a' is the same as on previous call */ /* This routine is no longer used in the fastnorm code, but is included because it may be useful */ static double gorder, gm, rt2gm, aold; double adchi(double a, int *is) { double x, y, z, sq; if (a != aold) { aold = a; gorder = 0.5 * a; gm = gorder - 1.0; rt2gm = sqrt (aold - 1.0); } polar: x = 2.0 * c7rand(is) - 1.0; z = c7rand(is); sq = x*x + z*z; if ((sq > 1.0) || (sq < 0.25)) goto polar; y = x / z; x = rt2gm * y + gm; if (x < 0.0) goto polar; z = (1.0 + y*y) * exp (gm * log(x/gm) - rt2gm * y); if (c7rand(is) > z) goto polar; return (2.0 * x); } /* -------------------- (Gamma) rgamma (g, is) ----------- */ double rgamma(double g, int *is) { double x, y, z, sq; if (g != gorder) { gorder = g; gm = gorder - 1.0; aold = 2.0 * gorder; rt2gm = sqrt (aold - 1.0); } polar: x = 2.0 * c7rand(is) - 1.0; z = c7rand(is); sq = x*x + z*z; if ((sq > 1.0) || (sq < 0.25)) goto polar; y = x / z; x = rt2gm * y + gm; if (x < 0.0) goto polar; z = (1.0 + y*y) * exp (gm * log(x/gm) - rt2gm * y); if (c7rand(is) > z) goto polar; return (x); } /* ------------------ Revision history Fastnorm ------------- */ /* Items in this revision history appear in chronological order, so the most recent revsion appears last. Revision items are separated by a line of '+' characters. ++++++++++++++++++++++++++++++++++++++++++++++++++++++ This is a revised version of the algorithm decribed in ACM Transactions on Mathematical Software, Vol 22, No 1 March 1996, pp 119-127. A fast generator of pseudo-random variates from the unit Normal distribution. It keeps a pool of about 1000 variates, and generates new ones by picking 4 from the pool, rotating the 4-vector with these as its components, and replacing the old variates with the components of the rotated vector. The program should initialize the generator by calling initnorm(seed) with seed a Sw integer seed value. Different seed values will give different sequences of Normals. Seed may be any 32-bit integer. BUT SEE REVISION of 17 May 2003 for initnorm() parameters. The revised initnorm requires two integer parameters, iseed and quoll, the latter specifying a tradeoff between speed and quality. Then, wherever the program needs a new Normal variate, it should use the macro FastNorm, e.g. in statements like: x = FastNorm; (Sets x to a random Normal value) or x += a + FastNorm * b; (Adds a normal with mean a, SD b, to x) +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Changed basic formula, which was: t = (p+q+r+s)*0.5; p = p-t; q = t-q; r = t-r; s = t-s; This gives sum of new p+q+r+s = 2p(old) which may not be a great choice. The new version is: t = (p+q+r+s)*0.5; p = p-t; q = q-t; r = t-r; s = t-s; which gives new p+q+r+s = p+q-r-s (old) which may be better. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Revision 14 November 1998 The older version "FastNorm" which was available via ftp was found to have a defect which could affect some applications. Dr Christine Rueb, (Max Planck Institut fur Infomatik, Im Stadtwald W 66123 Saabrucken, F.G.R., (rueb@mpi-sb.mpg.de) found that if a large number N of consecutive variates were summed to give a variate S with nominally N(0,N) distribution, the variance of S was in some cases too small. The effect was noticed with N=400, and was particularly strong for N=1023 if the first several (about 128) variates from FastNorm were discarded. Dr. Rueb traced the effect to an unexpected tendency of FastNorm to concentrate values with an anomolous correlation into the first 128 elements of the variate pool. With the help of her analysis, the algorithm has been revised in a way which appears to overcome the problem, at the cost of about a 19% reduction in speed (which still leaves the method very fast.) IT MUST BE RECOGNISED THAT THIS ALGORITHM IS NOVEL AND WHILE IT PASSES A NUMBER OF STANDARD TESTS FOR DISTRIBUTIONAL FORM, LACK OF SERIAL CORRELATION ETC., IT MAY STILL HAVE DEFECTS. RECALL THE NUMBER OF YEARS WHICH IT TOOK FOR THE LIMITATIONS OF THE LEHMER GENERATOR FOR UNIFORM VARIATES TO BECOME APPARENT !!! UNTIL MORE EXPERIENCE IS GAINED WITH THIS TYPE OF GENERATOR, IT WOULD BE WISE IN ANY CRITICAL APPLICATION TO COMPARE RESULTS OBTAINED USING IT WITH RESULTS OBTAINED USING A "STANDARD" FORM OF GENERATOR OF NORMAL VARIATES COUPLED WITH A WELL-DOCUMENTED GENERATOR OF UNIFORM VARIATES. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Revision 1 April 2003. Trying a scanning process proposed by R.P.Brent. It needs 2 pool vectors, as it cannot update in-situ, but may be more robust. It is a bit slower on a 133 Mhz PC but just as fast on a newer PC (moggie) at about 16 ns per call in the 'speed.c' test. The extreme-value defect is the same on old and new versions. If one finds a value 'A' such that a batch of B genuine Normal variates has probability 0.2 of containing a variate with abolute value greater than A, then the probability that both of two consecive batches of B will contain such a value should be 0.2 times 0.2, or 0.04. Instead, both versions give the extreme value prob. as 0.200 (over a million batches) but give the consective-pair prob as 0.050 for batch size B = 1024. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Revision 17 May 2003. The fundamental defect of the method, namely an inadequate 'mixing' of squared value ('energy') between one generation of the pool and the next, cannot readily be removed. In going from one pool to the next, the energy in an old variate is shared among just 4 variates in the new pool. Hence it takes many generations before the energy of some original variate can be distributed across the whole pool. The number of generations needed cannot be less than the log to base 4 of the pool size, or 5 for a pool size of 1024. In fact, the pseudo-random indexing of the pool means that rather more generations are needed on average. The defect is readily revealed by the following test. One picks a "batch size" comparable to the pool size, say 500 or 1000. One then computes a value A such that a batch will with probability 0.2 contain one or more variates with absolute value exceeding A. One then draws batches from FastNorm, and tests each batch to see if it contains such an extreme value. Over many batches, one counts the frequency of such 'extreme' batches, and finds (with FastNorm2) that it is indeed about 0.2. However, when one counts the frequency with which succesive batches are both extreme, one finds it to be higher than the proper value (0.2)^2 = 0.04. For batch sizes round the pool size, it can be as high as 0.05. That is, although the frequncy of extreme values is about right, their occurrence in the stream is correlated over a scale of the order of the pool size. The same correlation effect is seen in the average 4th moment of successive batches. Since this inter-generational correlation cannot be avoided, the this revision seeks to reduce it by performing at least two simple rotations of the pool at each generation. Obviously, some speed is lost, but the correlations are reduced. To allow the user to trade off speed and quality, the initialization function initnorm() now provides a QUALITY parameter 'quoll' which controls how many double-rotations are done for each generation. See the comments in initnorm() for more detail. ++++++++++ End of revision notes +++++++++ */ /* ----------------- Some test results ------------------------ */ /* General form: Some simple tests were conducted by transforming FastNorm variates in several ways to yield a variable nominally uniformly distributed in 0 ... 1. Uniformity of the derived variate was then tested by a ChiSquared test on a 100-cell histogram with cell counts around 10000. These tests are crude, but showed no untoward results on the present version. Transformations included: y = 0.5 * (1.0 + erf (n1 / sqrt(2)) y = 0.5 * (n1 / (n1^2 + n2^2 + n3^2) - 1) y = exp (-0.5 * (n1^2 + n2^2)) y = (n1^2 + n2^2) / (n1^2 + n2^2 + n3^2 + n4^2) where n1, n2 etc are successive Normal variates. It may be noted that some of these are sensitive to serial correlation if present. Fourth moment of batches: Extensive tests for correlation among the fourth moments of successive batches of variates were made, with batch sizes comparabe to or (worst case) equal to the size of the variate pool (4096 in this revision). With 'quality' 1, significant correlation appears after 10^6 batches of worst-case size. With quality 2, no significant correlation is evident after 10^7 batches. A just-significant correlation appears after 3.6*10^7 batches. As this requires some 1.4*10^11 deviates to be drawn, it may be irrelevent for many applications. The observed correlation coefficent was 0.0008. With quality 3, results are OK after 10^8 batches, or more than 4*10^11 variates. No tests have been done with quality 4 as yet. Speed: Speed tests were done on a PC running RedHat Linux, using "-O" compiler optimization. The test loop was for (i = 0; i < 500000000; i++) { a += FastNorm; a -= FastNorm; } Thus the test makes 10^9 uses of FastNorm. The time taken, (which includes time for a call in 'initnorm' and the loop overhead) depends on the 'quality' set by initnorm. Quality 1: 21.5 sec Quality 2: 32.1 sec Quality 3: 42.5 sec Quality 4: 53.1 sec By way of comparison, the same 10^9 call loop was timed with the Unix library "random()" routine substituted for FastNorm, and the variable 'a' defined as integer rather than double. Also, since most use of a Uniform generator such as "random()" requires that the returned integer be scaled into a floating- point number in 0 ... 1, the timing was repeated with "a += random" ('a' integer) replaced by "a += Scale*random()" where 'a' is double and Scale = 2^(-31). The times obtained were: Random (integer): 44.1 sec Random (double) : 47.7 sec It can be seen that FastNorm (even at quality 3) is faster than a commonly-used Uniform generator. To some extent, this result may vary on different computers and compilers. Since FastNorm (at least for qualities above 1) no doubt does more arithmetic per variate than "random()", much of its speed advantage must come from its replacement of a function call per variate by a macro which makes only one function call every 4095 variates. Computers with lower 'call' overheads than the PC used here might show differnt results. Incidently, the Uniform generator 'c7rand()' included in this package, which returns a double uniform in 0 ... 1, and is of fairly high quality, gives a time in the same test of 36.8 sec, a little faster than 'random()'. */ /* ----------------- globals ------------------------- */ /* A pool must have a length which is a multiple of 4. * During regeneration of a new pool, the pool is treated as 4 * consecutive vectors, each of length VL. */ #define VE 10 #define VL (1 << VE) #define VM (VL-1) #define WL (4*VL) #define WM (WL-1) Sw gaussfaze; Sf *gausssave; Sf GScale; /* GScale,fastnorm,gaussfaze, -save must be visible to callers */ static Sf chic1, chic2; /* Constants used in getting ChiSq_WL */ Sw gslew; /* Counts generations */ static Sw qual; /* Sets number of double transforms per generation. */ static Sw c7g [2]; /* seed values for c7rand */ Sf wk1 [WL], wk2 [WL]; /* Pools of variates. */ /* ------------------ regen ---------------------- */ /* Takes variates from wk1[], transforms to wk[2], then back to wk1[]. */ static void regen(void) { Sw i, j, k, m; Sf p, q, r, s, t; Sw topv[6], ord[4], *top; Sf *ppt[4], *ptn; /* Choose 4 random start points in the wk1[] vector I want them all different. */ top = topv + 1; /* Set limiting values in top[-1], top[4] */ top[-1] = VL; top[4] = 0; reran1: m = irandm (c7g); /* positive 32-bit random */ /* Extract two VE-sized randoms from m, which has 31 useable digits */ m = m >> (31 - 2*VE); top[0] = m & VM; m = m >> VE; top[1] = m & VM; m = irandm (c7g); /* positive 32-bit random */ /* Extract two VE-sized randoms from m, which has 31 useable digits */ m = m >> (31 - 2*VE); top[2] = m & VM; m = m >> VE; top[3] = m & VM; for (i = 0; i < 4; i++) ord[i] = i; /* Sort in decreasing size */ for (i = 2; i >= 0; i--) for (j = 0; j <= i; j++) if (top[j] < top[j+1]) { k = top[j]; top[j] = top[j+1]; top[j+1] = k; k = ord[j]; ord[j] = ord[j+1]; ord[j+1] = k; } /* Ensure all different */ for (i = 0; i < 3; i++) if (top[i] == top[i+1]) goto reran1; /* Set pt pointers to their start values for the first chunk. */ for (i = 0; i < 4; i++) { j = ord[i]; ppt[j] = wk2 + j * VL + top[i]; } /* Set ptn to point into wk1 */ ptn = wk1; /* Now ready to do five chunks. The length of chunk i is top[i-1] - top[i] (I hope) At the end of chunk i, pointer ord[i] should have reached the end of its part, and need to be wrapped down to the start of its part. */ i = 0; chunk: j = top[i] - top[i-1]; /* Minus the chunk length */ for (; j < 0; j++) { p = *ptn++; s = *ptn++; q = *ptn++; r = *ptn++; t = (p + q + r + s) * 0.5; *ppt[0]++ = t - p; *ppt[1]++ = t - q; *ppt[2]++ = r - t; *ppt[3]++ = s - t; } /* This should end the chunk. See if all done */ if (i == 4) goto passdone; /* The pointer for part ord[i] should have passed its end */ j = ord[i]; #ifdef dddd printf ("Chunk %1d done. Ptr %1d now %4d\n", i, j, ppt[j]-wk2); #endif ppt[j] -= VL; i++; goto chunk; passdone: /* wk1[] values have been transformed and placed in wk2[] Transform from wk2 to wk1 with a simple shuffle */ m = (irandm (c7g) >> (29 - VE)) & WM; j = 0; for (i = 0; i < 4; i++) ppt[i] = wk1 + i * VL; for (i = 0; i < VL; i++) { p = wk2[j^m]; j++; s = wk2[j^m]; j++; q = wk2[j^m]; j++; r = wk2[j^m]; j++; t = (p + q + r + s) * 0.5; *ppt[0]++ = t - p; *ppt[1]++ = q - t; *ppt[2]++ = t - r; *ppt[3]++ = s - t; } /* We have a new lot of variates in wk1 */ } /* ------------------- renormalize --------------------------- */ /* Rescales wk1[] so sum of squares = WL */ /* Returns the original sum-of-squares */ Sf renormalize(void) { Sf ts, vv; Sw i; ts = 0.0; for (i = 0; i < WL; i++) ts += wk1[i] * wk1[i]; vv = sqrt (WL / ts); for (i = 0; i < WL; i++) wk1[i] *= vv; return (ts); } /* ------------------------ BoxMuller ---------------------- */ /* Fills block gvec of length ll with proper normals */ static void boxmuller(Sf *gvec, Sw ll) { Sw i; Sf tx, ty, tr, tz; /* Here, replace the whole pool with conventional Normal variates */ i = 0; nextpair: tx = 2.0 * c7rand(c7g) - 1.0; /* Uniform in -1..1 */ ty = 2.0 * c7rand(c7g) - 1.0; /* Uniform in -1..1 */ tr = tx * tx + ty * ty; if ((tr > 1.0) || (tr < 0.25)) goto nextpair; tz = -2.0 * log (c7rand(c7g)); /* Sum of squares */ tz = sqrt(tz / tr); gvec [i++] = tx * tz; gvec [i++] = ty * tz; if (i < ll) goto nextpair; /* Horrid, but good enough */ } /* ------------------------- initnorm ---------------------- */ /* To initialize, given a seed integer and a quality level. The seed can be any integer. The quality level quoll should be between 1 and 4. Quoll = 1 gives high speed, but leaves some correlation between the 4th moments of successive batches of values. Higher values of quoll give lower speed but less correlation. If called with quoll = 0, initnorm performs a check that the most crucial routine (regen) is performing correctly. In this case, the value of 'iseed' is ignored. Initnorm will report the results of the test, which compares pool values with check17 and check98, which are defined below. When a check call is made, a proper call on initnorm must then be made before using the FastNorm macro. A check call does not properly initialize the routines even if it succeeds. */ static Sf check17 = 0.1255789; static Sf check98 = -0.7113293; void initnorm(Sw seed, Sw quoll) { Sw i; /* At one stage, we need to generate a random variable Z such that (WL * Z*Z) has a Chi-squared-WL density. Now, a var with an approximate Chi-sq-K distn can be got as (A + B*n)**2 where n has unit Normal distn, A**2 = K * sqrt (1 - 1/K), A**2 + B**2 = K. (For large K) So we form Z as (1/sqrt(WL)) * (A + B*n) or chic1 + chic2 * n where chic1 = A / sqrt(WL), chic2 = B / sqrt(WL). Hence chic1 = sqrt(A*A / WL) = sqrt(sqrt(1 - 1/WL)), chic2 = sqrt(1 - chic1*chic1) */ chic1 = sqrt(sqrt(1.0 - 1.0 / WL)); chic2 = sqrt(1.0 - chic1 * chic1); /* Set regen counter "gslew" which will affect renormalizations. Since pools are OK already, we wont't need to renorm for a while */ gslew = 1; /* Finally, set "gaussfaze" to return all of wk1 * except the last entry at WL-1 */ gaussfaze = WL-1; gausssave = wk1; /* If quoll = 0, do a check on installation */ if (quoll == 0) goto docheck; qual = quoll; /* Check sensible values for quoll, say 1 to 4 */ if ((quoll < 0) || (quoll > 4)) { printf ("From initnorm(): quoll parameter %d out of\ range 1 to 4\n", quoll); return; } c7g[0] = seed; c7g[1] = -3337792; /* Fill wk1[] with good normals */ boxmuller (wk1, WL); /* Scale so sum-of-squares = WL */ GScale = sqrt (renormalize () / WL); /* We have set GScale to restore the original ChiSq_WL sum-of-squares */ return; docheck: /* Set a simple pattern in wk1[] and test results of regen */ for (i = 0; i < WL; i++) wk1[i] = wk2[i] = 0.0; wk1[0] = sqrt ((double) WL); c7g[0] = 1234567; c7g[1] = 9876543; for (i = 0; i < 60; i++) regen(); /* Check a couple of values */ if ((fabs (wk1[17] - check17) > 0.00001) || (fabs (wk1[98] - check98) > 0.00001)) { printf ("\nInitnorm check failed.\n"); printf ("Expected %8.5f got %10.7f\n", check17, wk1[17]); printf ("Expected %8.5f got %10.7f\n", check98, wk1[98]); } else { printf ("\nInitnorm check OK\n"); } } /* ---------------------- fastnorm -------------------------- */ /* If gslew shows time is ripe, renormalizes the pool fastnorm() returns the value GScale*gausssave[0]. */ Sf fastnorm(void) { Sf sos; Sw n1; if (!(gslew & 0xFFFF)) sos = renormalize (); /* The last entry of gausssave, at WL-1, will not have been used. Use it to get an approx. to sqrt (ChiSq_WL / WL). See initnorm() code for details */ GScale = chic1 + chic2 * GScale * gausssave [WL-1]; for (n1 = 0; n1 < qual; n1++) regen (); gslew++; gaussfaze = WL - 1; return (GScale * gausssave [0]); } /* --------------------- (test) main ------------------------- */ #ifdef Main #include "ngspice/FastNorm3.h" int main() { Sf x; Sw i; initnorm (0, 0); initnorm (77, 2); printf ("SoS %20.6f\n", renormalize()); // for (i = 0; i < 2000000; i++) // x = FastNorm; for (i = 0; i < 200; i++) { x = FastNorm; printf("%d\t%f\n", i, x); } printf ("SoS %20.6f\n", renormalize()); exit (1); } #endif ngspice-26/src/frontend/trannoise/1-f-code.c0000644000265600020320000001371512264261473020307 0ustar andreasadmin/* Copyright: Holger Vogt, 2008 Generates 1/f noise values according to: "Discrete simulation of colored noise and stochastic processes and 1/fa power law noise generation" Kasdin, N.J.; Proceedings of the IEEE Volume 83, Issue 5, May 1995 Page(s):802 - 827 */ #include "ngspice/ngspice.h" #include "ngspice/cpextern.h" #include "ngspice/cktdefs.h" #include "ngspice/1-f-code.h" #include "ngspice/fftext.h" #include "ngspice/wallace.h" #ifdef HAVE_LIBFFTW3 #include "fftw3.h" #endif extern void controlled_exit(int status); void f_alpha(int n_pts, int n_exp, double X[], double Q_d, double alpha) { int i, length; double ha; double *hfa, *wfa; #ifdef HAVE_LIBFFTW3 fftw_complex *out = NULL; fftw_plan plan_forward = NULL; fftw_plan plan_backward = NULL; NG_IGNORE(n_exp); #endif ha = alpha/2.0; // Q_d = sqrt(Q_d); /* find the deviation of the noise */ #ifdef HAVE_LIBFFTW3 length = 2 * (n_pts/2 + 1); #else length = n_pts; #endif hfa = TMALLOC(double, length); wfa = TMALLOC(double, length); hfa[0] = 1.0; wfa[0] = Q_d * GaussWa; /* generate the coefficients hk */ for (i = 1; i < n_pts; i++) { /* generate the coefficients hk */ hfa[i] = hfa[i-1] * (ha + (double)(i-1)) / ((double)(i)); /* fill the sequence wk with white noise */ wfa[i] = Q_d * GaussWa; } #ifdef HAVE_LIBFFTW3 /* in-place transformation needs zero padding on the end */ hfa[n_pts] = 0.0; wfa[n_pts] = 0.0; hfa[n_pts+1] = 0.0; wfa[n_pts+1] = 0.0; /* perform the discrete Fourier transform */ plan_forward = fftw_plan_dft_r2c_1d(n_pts, hfa, (fftw_complex *)hfa, FFTW_ESTIMATE); fftw_execute(plan_forward); fftw_destroy_plan(plan_forward); plan_forward = fftw_plan_dft_r2c_1d(n_pts, wfa, (fftw_complex *)wfa, FFTW_ESTIMATE); fftw_execute(plan_forward); fftw_destroy_plan(plan_forward); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) (n_pts/2 + 1)); /* multiply the two complex vectors */ for (i = 0; i < n_pts/2 + 1; i++) { out[i][0] = hfa[i]*wfa[i] - hfa[i+1]*wfa[i+1]; out[i][1] = hfa[i]*wfa[i+1] + hfa[i+1]*wfa[i]; } /* inverse transform */ plan_backward = fftw_plan_dft_c2r_1d(n_pts, out, X, FFTW_ESTIMATE); fftw_execute(plan_backward); fftw_destroy_plan(plan_backward); for (i = 0; i < n_pts; i++) { X[i] = X[i] / (double) n_pts; } fftw_free(out); #else /* Green's FFT */ /* perform the discrete Fourier transform */ fftInit(n_exp); rffts(hfa, n_exp, 1); rffts(wfa, n_exp, 1); /* multiply the two complex vectors */ rspectprod(hfa, wfa, X, n_pts); /* inverse transform */ riffts(X, n_exp, 1); #endif free(hfa); free(wfa); /* fft tables will be freed in vsrcaccept.c and isrcaccept.c fftFree(); */ fprintf(stdout, "%d 1/f noise values in time domain created\n", n_pts); } /*-----------------------------------------------------------------------------*/ void trnoise_state_gen(struct trnoise_state *this, CKTcircuit *ckt) { if (this->top == 0) { if (cp_getvar("notrnoise", CP_BOOL, NULL)) this -> NA = this -> TS = this -> NALPHA = this -> NAMP = this -> RTSAM = this -> RTSCAPT = this -> RTSEMT = 0.0; if ((this->NALPHA > 0.0) && (this->NAMP > 0.0)) { // add 10 steps for start up sequence size_t nosteps = (size_t) (ckt->CKTfinalTime / this->TS) + 10; size_t newsteps = 1; int newexp = 0; #ifdef HAVE_LIBFFTW3 newsteps = nosteps; newexp = 1; #else // generate number of steps as power of 2 while (newsteps < nosteps) { newsteps <<= 1; newexp++; } #endif this->oneof = TMALLOC(double, newsteps); this->oneof_length = newsteps; f_alpha((int) newsteps, newexp, this -> oneof, this -> NAMP, this -> NALPHA); } trnoise_state_push(this, 0.0); /* first is deterministic */ return; } // make use of two random variables per call to rgauss() { double ra1, ra2; double NA = this -> NA; if (NA != 0.0) { #ifdef FastRand // use FastNorm3 ra1 = NA * FastNorm; ra2 = NA * FastNorm; #elif defined(WaGauss) // use WallaceHV ra1 = NA * GaussWa; ra2 = NA * GaussWa; #else rgauss(&ra1, &ra2); ra1 *= NA; ra2 *= NA; #endif } else { ra1 = 0.0; ra2 = 0.0; } if (this -> oneof) { if (this->top + 1 >= this->oneof_length) { fprintf(stderr, "ouch, noise data exhausted\n"); controlled_exit(1); } ra1 += this->oneof[this->top] - this->oneof[0]; ra2 += this->oneof[this->top + 1] - this->oneof[0]; } trnoise_state_push(this, ra1); trnoise_state_push(this, ra2); } } struct trnoise_state * trnoise_state_init(double NA, double TS, double NALPHA, double NAMP, double RTSAM, double RTSCAPT, double RTSEMT) { struct trnoise_state *this = TMALLOC(struct trnoise_state, 1); this->NA = NA; this->TS = TS; this->NALPHA = NALPHA; this->NAMP = NAMP; this->RTSAM = RTSAM; this->RTSCAPT = RTSCAPT; this->RTSEMT = RTSEMT; if (RTSAM > 0) { this->RTScapTime = exprand(RTSCAPT); this->RTSemTime = this->RTScapTime + exprand(RTSEMT); } this -> top = 0; this -> oneof = NULL; return this; } struct trrandom_state * trrandom_state_init(int rndtype, double TS, double TD, double PARAM1, double PARAM2) { struct trrandom_state *this = TMALLOC(struct trrandom_state, 1); this->rndtype = rndtype; this->TS = TS; this->TD = TD; this->PARAM1 = PARAM1; this->PARAM2 = PARAM2; this->value = 0.0; return this; } ngspice-26/src/frontend/trannoise/wallace.c0000644000265600020320000003517112264261473020424 0ustar andreasadmin/* Wallace generator for normally distributed random variates Copyright: Holger Vogt, 2008 */ //#define FASTNORM_ORIG #ifdef HasMain #include #else #ifndef NOSPICE #include "ngspice/ngspice.h" #endif #endif #ifdef _MSC_VER #include #define getpid _getpid #else #include #endif #include #include "ngspice/wallace.h" #include "ngspice/FastNorm3.h" #define POOLSIZE 4096 #define LPOOLSIZE 12 #define NOTRANS 3 /* number of (dual) transformations */ #define VE 10 #define VL (1 << VE) #define VM (VL-1) #define WL (4*VL) #define WM (WL-1) double *outgauss; /* output vector for user access */ unsigned int variate_used; /* actual index of variate called by user */ double ScaleGauss; static double *pool1; static double *pool2; static unsigned int *addrif, *addrib; static unsigned n = POOLSIZE; static double chi1, chi2; /* chi^2 correction values */ static unsigned int newpools; extern double drand(void); extern unsigned int CombLCGTausInt(void); extern void TausSeed(void); extern unsigned int CombLCGTausInt2(void); void PolarGauss(double* py1, double* py2) { double x1, x2, w; do { x1 = drand(); x2 = drand(); w = x1 * x1 + x2 * x2; } while ((w > 1.0) || (w < 0.25)); w = sqrt((-2.0 * log(w)) / w); *py1 = (double)(x1 * w); *py2 = (double)(x2 * w); } static void destroy_wallace(void) { tfree(pool1); tfree(pool2); tfree(addrif); tfree(addrib); } void initw(void) { unsigned i; double totsqr, nomsqr; unsigned long int coa, cob, s; /* initialize the uniform generator */ srand((unsigned int) getpid()); // srand(17); TausSeed(); ScaleGauss = 1.; newpools = 1; /* set up the two pools */ pool1 = TMALLOC(double, n); pool2 = TMALLOC(double, n); addrif = TMALLOC(unsigned int, (n + NOTRANS)); addrib = TMALLOC(unsigned int, (n + NOTRANS)); atexit(destroy_wallace); /* fill the first pool with normally distributed values */ PolarGauss(&pool1[0], &pool1[1]); for (i = 1; i < n>>1; i++) PolarGauss(&pool1[i<<1], &pool1[(i<<1) + 1]); /* normalize pool content */ /* totsqr = totsum = 0.0; * for (i = 0; i < n; i++) { * totsqr += pool1[i] * pool1[i]; * totsum += pool1[i]; * } * totsum = totsum/n; * for (i = 0; i < n; i++) { * totsqr += (pool1[i] - totsum) * (pool1[i] - totsum); * } * nomsqr = sqrt(n / totsqr); * for (i = 0; i < n; i++) * pool1[i] = (pool1[i] - totsum) * nomsqr; */ totsqr = 0.0; for (i = 0; i < n; i++) totsqr += pool1[i] * pool1[i]; nomsqr = sqrt(n / totsqr); for (i = 0; i < n; i++) pool1[i] *= nomsqr; /* calculate ch^2 value */ chi1 = sqrt(sqrt(1.0 - 1.0/n)); chi2 = sqrt(1.0 - chi1*chi1); /* first scaling, based on unused pool1[n-2] */ ScaleGauss = chi1 + chi2 * ScaleGauss * pool1[n-2]; /* access to first pool */ outgauss = pool1; /* set data counter, we return n-2 values here */ variate_used = n - 2; /* generate random reading addresses using a LCG */ s = 0; coa = 241; cob = 59; for (i = 0; i < (n + NOTRANS); i++) { // addrif[i] = s = (s * coa + cob) % (n); coa = CombLCGTausInt(); addrif[i] = coa >> (32 - LPOOLSIZE); // printf ("Random add:\t%ld\n" , s); } s = 0; coa = 193; cob = 15; for (i = 0; i < (n + NOTRANS); i++) { // addrib[i] = s = (s * coa + cob) % (n); coa = CombLCGTausInt(); addrib[i] = coa >> (32 - LPOOLSIZE); // printf ("Random add:\t%ld\n" , addrib[i]); } // printf("norm for orig. Gauss: %e, chi^2 scale: %e\n", nomsqr, ScaleGauss); // NewWa(); } /* original FastNorm3.c code */ #ifdef FASTNORM_ORIG float NewWa() { int i, j, k, m; float p, q, r, s, t; int topv[6], ord[4], *top; float *ppt[4], *ptn; float nulval, endval; float totsqr, nomsqr; nulval = ScaleGauss * pool1[0]; endval = pool1[n-1]; /* Choose 4 random start points in the wk1[] vector I want them all different. */ top = topv + 1; /* Set limiting values in top[-1], top[4] */ top[-1] = VL; top[4] = 0; reran1: m = CombLCGTausInt(); /* positive 32-bit random */ /* Extract two VE-sized randoms from m, which has 31 useable digits */ m = m >> (31 - 2*VE); top[0] = m & VM; m = m >> VE; top[1] = m & VM; m = CombLCGTausInt(); /* positive 32-bit random */ /* Extract two VE-sized randoms from m, which has 31 useable digits */ m = m >> (31 - 2*VE); top[2] = m & VM; m = m >> VE; top[3] = m & VM; for (i = 0; i < 4; i++) ord[i] = i; /* Sort in decreasing size */ for (i = 2; i >= 0; i--) for (j = 0; j <= i; j++) if (top[j] < top[j+1]) { k = top[j]; top[j] = top[j+1]; top[j+1] = k; k = ord[j]; ord[j] = ord[j+1]; ord[j+1] = k; } /* Ensure all different */ for (i = 0; i < 3; i++) if (top[i] == top[i+1]) goto reran1; /* Set pt pointers to their start values for the first chunk. */ for (i = 0; i < 4; i++) { j = ord[i]; ppt[j] = pool2 + j * VL + top[i]; } /* Set ptn to point into wk1 */ ptn = pool1; /* Now ready to do five chunks. The length of chunk i is top[i-1] - top[i] (I hope) At the end of chunk i, pointer ord[i] should have reached the end of its part, and need to be wrapped down to the start of its part. */ i = 0; chunk: j = top[i] - top[i-1]; /* Minus the chunk length */ for (; j < 0; j++) { p = *ptn++; s = *ptn++; q = *ptn++; r = *ptn++; t = (p + q + r + s) * 0.5; *ppt[0]++ = t - p; *ppt[1]++ = t - q; *ppt[2]++ = r - t; *ppt[3]++ = s - t; } /* This should end the chunk. See if all done */ if (i == 4) goto passdone; /* The pointer for part ord[i] should have passed its end */ j = ord[i]; #ifdef dddd printf ("Chunk %1d done. Ptr %1d now %4d\n", i, j, ppt[j]-pool2); #endif ppt[j] -= VL; i++; goto chunk; passdone: /* wk1[] values have been transformed and placed in wk2[] Transform from wk2 to wk1 with a simple shuffle */ m = (CombLCGTausInt2() >> (29 - VE)) & WM; j = 0; for (i = 0; i < 4; i++) ppt[i] = pool1 + i * VL; for (i = 0; i < VL; i++) { p = pool2[j^m]; j++; s = pool2[j^m]; j++; q = pool2[j^m]; j++; r = pool2[j^m]; j++; t = (p + q + r + s) * 0.5; *ppt[0]++ = t - p; *ppt[1]++ = q - t; *ppt[2]++ = t - r; *ppt[3]++ = s - t; } /* renormalize again if number of pools beyond limit */ if (!(newpools & 0xFFFF)) { totsqr = 0.0; for (i = 0; i < n; i++) totsqr += pool1[i] * pool1[i]; nomsqr = sqrt(n / totsqr); for (i = 0; i < n; i++) pool1[i] *= nomsqr; } outgauss = pool1; /* reset data counter */ variate_used = n - 1; /* set counter counting nomber of pools made */ newpools++; /* new scale factor using ch^2 correction, using pool1[n-1] from last pool */ ScaleGauss = chi1 + chi2 * ScaleGauss * endval; // printf("Pool number: %d, chi^2 scale: %e\n", newpools, ScaleGauss); return nulval; /* use old scale */ } #else /* Simplified code according to an algorithm published by C. S. Wallace: "Fast Pseudorandom Generators for Normal and Exponential Variates", ACM Transactions on Mathmatical Software, Vol. 22, No. 1, March 1996, pp. 119-127. Transform pool1 to pool2 and back to pool1 NOTRANS times by orthogonal 4 x 4 Hadamard-Matrix. Mixing of values is very important: Any value in the pool should contribute to every value in the new pools, at least after several passes (number of passes is set by NOTRANS to 2 or 3). 4 values are read in a continuous sequence from the total of POOLSIZE values. Values are stored in steps modulo POOLSIZE/4. During backward transformation the values are shuffled by a random number jj. */ double NewWa(void) { double nulval, endval; double bl1, bl2, bl3, bl4; /* the four values to be transformed */ double bsum; double totsqr, nomsqr; unsigned int i, j, jj, m, mm, mmm; nulval = ScaleGauss * pool1[0]; endval = pool1[n-1]; m = n >> 2; // printf("New pool after next value\n"); /* generate new pool by transformation Transformation is repeated NOTRANS times */ for (i = 0; i < NOTRANS; i++) { mm = m << 1; mmm = mm + m; /* forward transformation */ // for (j = 0; j < n; j += 4) { for (j = 0; j < m; j++) { bl1 = pool1[j]; bl2 = pool1[j+m]; bl3 = pool1[j+mm]; bl4 = pool1[j+mmm]; /* Hadamard-Matrix */ bsum = (bl1 + bl2 + bl3 + bl4) * 0.5f; jj = j<<2; pool2[jj] = bl1 - bsum; pool2[jj+1] = bl2 - bsum; pool2[jj+2] = bsum - bl3; pool2[jj+3] = bsum - bl4; } /* backward transformation */ jj = (CombLCGTausInt2() >> (31 - LPOOLSIZE)) & (n - 1); for (j = 0; j < m; j++) { bl1 = pool2[j^jj]; bl2 = pool2[(j+m)^jj]; bl3 = pool2[(j+mm)^jj]; bl4 = pool2[(j+mmm)^jj]; /* Hadamard-Matrix */ bsum = (bl1 + bl2 + bl3 + bl4) * 0.5f; jj = j<<2; pool1[jj] = bl1 - bsum; pool1[jj+1] = bl2 - bsum; pool1[jj+2] = bsum - bl3; pool1[jj+3] = bsum - bl4; } } /* renormalize again if number of pools beyond limit */ if (!(newpools & 0xFFFF)) { totsqr = 0.0; for (i = 0; i < n; i++) totsqr += pool1[i] * pool1[i]; nomsqr = sqrt(n / totsqr); for (i = 0; i < n; i++) pool1[i] *= nomsqr; } outgauss = pool1; /* reset data counter */ variate_used = n - 1; /* set counter counting nomber of pools made */ newpools++; /* new scale factor using ch^2 correction, using pool1[n-1] from previous pool */ ScaleGauss = chi1 + chi2 * ScaleGauss * endval; // printf("Pool number: %d, chi^2 scale: %e\n", newpools, ScaleGauss); return nulval; /* use old scale */ // return pool1[0]; /* use new scale */ } #endif #ifdef FASTNORMTEST float NewWa_not(void) { float nulval, endval; float bl1, bl2, bl3, bl4; /* the four values to be transformed */ float bsum; float totsqr, nomsqr; unsigned int i, j, jj; nulval = ScaleGauss * pool1[0]; endval = pool1[n-1]; // printf("New pool after next value\n"); /* generate new pool by transformation Transformation is repeated NOTRANS times */ for (i = 0; i < NOTRANS; i++) { /* forward transformation */ for (j = 0; j < n; j += 4) { jj = j + i; bl1 = pool1[addrif[jj]]; bl2 = pool1[addrif[jj+1]]; bl3 = pool1[addrif[jj+2]]; bl4 = pool1[addrif[jj+3]]; /* s = (s*coa + cob) & (n - 1); bl1 = pool1[s]; s = (s*coa + cob) & (n - 1); bl2 = pool1[s + 1]; s = (s*coa + cob) & (n - 1); bl3 = pool1[s + 2]; s = (s*coa + cob) & (n - 1); bl4 = pool1[s + 3]; */ /* jj = j + i; bl1 = pool1[addrif[jj]]; bl2 = pool1[addrif[jj+1]]; bl3 = pool1[addrif[jj+2]]; bl4 = pool1[addrif[jj+3]]; */ /* bl1 = pool1[j]; bl2 = pool1[j+1]; bl3 = pool1[j+2]; bl4 = pool1[j+3]; */ /* Hadamard-Matrix */ bsum = (bl1 + bl2 + bl3 + bl4) * 0.5; /* pool2[j] = bl1 - bsum; pool2[j+1] = bl2 - bsum; pool2[j+2] = bsum - bl3; pool2[j+3] = bsum - bl4; */ pool2[addrib[jj]] = bl1 - bsum; pool2[addrib[jj+1]] = bl2 - bsum; pool2[addrib[jj+2]] = bsum - bl3; pool2[addrib[jj+3]] = bsum - bl4; } /* backward transformation */ for (j = 0; j < n; j += 4) { bl1 = pool2[j]; bl2 = pool2[j+1]; bl3 = pool2[j+2]; bl4 = pool2[j+3]; /* bl1 = pool2[addrib[j]]; bl2 = pool2[addrib[j+1]]; bl3 = pool2[addrib[j+2]]; bl4 = pool2[addrib[j+3]]; */ /* Hadamard-Matrix */ bsum = (bl1 + bl2 + bl3 + bl4) * 0.5; pool1[j] = bl1 - bsum; pool1[j+1] = bl2 - bsum; pool1[j+2] = bsum - bl3; pool1[j+3] = bsum - bl4; } } /* renormalize again if number of pools beyond limit */ if (!(newpools & 0xFFFF)) { totsqr = 0.0; for (i = 0; i < n; i++) totsqr += pool1[i] * pool1[i]; nomsqr = sqrt(n / totsqr); for (i = 0; i < n; i++) pool1[i] *= nomsqr; } outgauss = pool1; /* reset data counter */ variate_used = n - 1; /* set counter counting nomber of pools made */ newpools++; /* new scale factor using ch^2 correction, using pool1[n-1] from last pool */ ScaleGauss = chi1 + chi2 * ScaleGauss * endval; // printf("Pool number: %d, chi^2 scale: %e\n", newpools, ScaleGauss); return nulval; /* use old scale */ // return pool1[0]; /* use new scale */ } #endif /* --------------------- (test) main ------------------------- */ /* gcc -Wall -g -DHasMain -I../../include wallace.c CombTaus.o -o watest.exe */ #ifdef HasMain #include "ngspice/wallace.h" struct timeb timenow; struct timeb timebegin; int sec, msec; void timediff(struct timeb *now, struct timeb *begin, int *sec, int *msec) { *msec = now->millitm - begin->millitm; *sec = now->time - begin->time; if (*msec < 0) { *msec += 1000; (*sec)--; } } int main() { float x; unsigned int i; long int count; initw(); ftime(&timebegin); count = 100000000; for (i = 0; i < count; i++) { x = GaussWa; // printf("%d\t%f\n", i, x); } ftime(&timenow); timediff(&timenow, &timebegin, &sec, &msec); printf("WallaceHV: %ld normal variates: %f s\n", count, sec + (float) msec / 1000.0); initnorm(0, 0); initnorm(77, 3); ftime(&timebegin); count = 100000000; for (i = 0; i < count; i++) { x = FastNorm; // printf("%d\t%f\n", i, x); } ftime(&timenow); timediff(&timenow, &timebegin, &sec, &msec); printf("FastNorm3: %ld normal variates: %f s\n", count, sec + (float) msec / 1000.0); return (1); } #endif ngspice-26/src/frontend/trannoise/Makefile.am0000644000265600020320000000037212264261473020677 0ustar andreasadminnoinst_LTLIBRARIES = libtrannoise.la libtrannoise_la_SOURCES = \ FastNorm3.c \ 1-f-code.c \ wallace.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/trannoise/Makefile.in0000644000265600020320000004023312264261534020706 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend/trannoise DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtrannoise_la_LIBADD = am_libtrannoise_la_OBJECTS = FastNorm3.lo 1-f-code.lo wallace.lo libtrannoise_la_OBJECTS = $(am_libtrannoise_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libtrannoise_la_SOURCES) DIST_SOURCES = $(libtrannoise_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libtrannoise.la libtrannoise_la_SOURCES = \ FastNorm3.c \ 1-f-code.c \ wallace.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/trannoise/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/trannoise/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libtrannoise.la: $(libtrannoise_la_OBJECTS) $(libtrannoise_la_DEPENDENCIES) $(EXTRA_libtrannoise_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtrannoise_la_OBJECTS) $(libtrannoise_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/1-f-code.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FastNorm3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wallace.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/ftehelp.h0000644000265600020320000000064212264261473016441 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Jeffrey M. Hsu **********/ /* Defines for help. */ #define E_HASPLOTS 1 #define E_NOPLOTS 2 #define E_HASGRAPHS 4 #define E_MENUMODE 8 #define E_BEGINNING 4096 #define E_INTERMED 8192 #define E_ADVANCED 16384 #define E_ALWAYS 32768 /* default is intermediate level */ #define E_DEFHMASK 8192 ngspice-26/src/frontend/com_option.c0000644000265600020320000000715412264261473017160 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/bool.h" #include "circuits.h" #include "ngspice/wordlist.h" #include "variable.h" #include "com_option.h" /* The option command. Syntax is option [opt ...] [opt = val ...]. * Val may be a string, an int, a float, or a list of the * form (elt1 elt2 ...). */ void com_option(wordlist *wl) { struct variable *vars; CKTcircuit *circuit = NULL; if (!ft_curckt) { fprintf(cp_err, "Error: no circuit loaded\n"); return; } circuit = (ft_curckt->ci_ckt); if (wl == NULL) { printf("******************************\n"); printf("* Current simulation options *\n"); printf("******************************\n\n"); printf("Temperatures:\n"); printf("temp = %f\n", circuit->CKTtemp); printf("tnom = %f\n", circuit->CKTnomTemp); printf("\nIntegration method summary:\n"); switch (circuit->CKTintegrateMethod) { case TRAPEZOIDAL: printf("Integration Method = TRAPEZOIDAL\n"); break; case GEAR: printf("Integration Method = GEAR\n"); break; default: printf("Unknown integration method\n"); } printf("MaxOrder = %d\n", circuit->CKTmaxOrder); printf("\nTolerances (absolute):\n"); printf("abstol (current) = %g\n", circuit->CKTabstol); printf("chgtol (charge) = %g\n", circuit->CKTchgtol); printf("vntol (voltage) = %g\n", circuit->CKTvoltTol); printf("pivtol (pivot) = %g\n", circuit->CKTpivotAbsTol); printf("\nTolerances (relative):\n"); printf("reltol (current) = %g\n", circuit->CKTreltol); printf("pivrel (pivot) = %g\n", circuit->CKTpivotRelTol); printf("\nIteration limits:\n"); printf("ITL1 = %d\n", circuit->CKTdcMaxIter); printf("ITL2 = %d\n", circuit->CKTdcTrcvMaxIter); printf("ITL4 = %d\n", circuit->CKTtranMaxIter); printf("\nTruncation error correction:\n"); printf("trtol = %f\n", circuit->CKTtrtol); #ifdef NEWTRUNC printf("ltereltol = %g\n", circuit->CKTlteReltol); printf("lteabstol = %g\n", circuit->CKTlteAbstol); #endif /* NEWTRUNC */ printf("\nConductances:\n"); printf("gmin (devices) = %g\n", circuit->CKTgmin); printf("diaggmin (stepping) = %g\n", circuit->CKTdiagGmin); printf("gshunt = %g\n", circuit->CKTgshunt); printf("delmin = %g\n", circuit->CKTdelmin); printf("\nDefault parameters for MOS devices\n"); printf("Default M: %f\n", circuit->CKTdefaultMosM); printf("Default L: %f\n", circuit->CKTdefaultMosL); printf("Default W: %f\n", circuit->CKTdefaultMosW); printf("Default AD: %f\n", circuit->CKTdefaultMosAD); printf("Default AS: %f\n", circuit->CKTdefaultMosAS); return; } vars = cp_setparse(wl); /* This is sort of a hassle... */ while (vars) { void *s; switch (vars->va_type) { case CP_BOOL: s = &vars->va_bool; break; case CP_NUM: s = &vars->va_num; break; case CP_REAL: s = &vars->va_real; break; case CP_STRING: s = vars->va_string; break; case CP_LIST: s = vars->va_vlist; break; default: s = NULL; } /* qui deve settare le opzioni di simulazione */ cp_vset(vars->va_name, vars->va_type, s); vars = vars->va_next; } } ngspice-26/src/frontend/com_rehash.c0000644000265600020320000000100112264261473017103 0ustar andreasadmin/************* * com_rehash.c ************/ #include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #include "com_rehash.h" #include "ngspice/cpextern.h" #include "control.h" #include "parser/unixcom.h" void com_rehash(wordlist *wl) { char *s; NG_IGNORE(wl); if (!cp_dounixcom) { fprintf(cp_err, "Error: unixcom not set.\n"); return; } s = getenv("PATH"); if (s) cp_rehash(s, TRUE); else fprintf(cp_err, "Error: no PATH in environment.\n"); } ngspice-26/src/frontend/breakp.h0000644000265600020320000000052312264261473016254 0ustar andreasadmin/************* * Header file for breakp.c * 1999 E. Rouat ************/ #ifndef ngspice_BREAKP_H #define ngspice_BREAKP_H void com_stop(wordlist *wl); void com_trce(wordlist *wl); void com_iplot(wordlist *wl); void com_step(wordlist *wl); void com_sttus(wordlist *wl); void com_delete(wordlist *wl); void ft_trquery(void); #endif ngspice-26/src/frontend/spec.h0000644000265600020320000000023612264261473015743 0ustar andreasadmin/************* * Header file for spec.c * 1999 E. Rouat ************/ #ifndef ngspice_SPEC_H #define ngspice_SPEC_H void com_spec(wordlist *wl); #endif ngspice-26/src/frontend/miscvars.c0000644000265600020320000000424412264261473016636 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "miscvars.h" bool ft_nomod = FALSE; bool ft_nopage = FALSE; bool ft_parsedb = FALSE; bool ft_vecdb = FALSE; bool ft_simdb = FALSE; bool ft_evdb = FALSE; bool ft_grdb = FALSE; bool ft_gidb = FALSE; bool ft_controldb = FALSE; bool ft_asyncdb = FALSE; char *ft_setkwords[] = { "acct", "addcontrol", "altshow", "appendwrite", "brief", "bypass", "chgtol", "color", "cpdebug", "cptime", "curplot", "curplotdate", "curplotname", "curplottitle", "debug", "defad", "defas", "defl", "defw", "device", "diff_abstol", "diff_reltol", "diff_vntol", "display", "dontplot", "dpolydegree", "editor", "filetype", "fourgridsize", "geometry", "geometry", "gmin", "gridsize", "hcopydev", "hcopydevtype", "hcopyfont", "hcopyfontsize", "hcopyscale", "height", "history", "ignoreeof", "itl1", "itl2", "itl3", "itl4", "itl5", "list", "lprplot5", "lprps", "maxwins", "modelcard", "modelline", "nfreqs", "noasciiplotvalue", "noaskquit", "nobjthack", "nobreak", "noclobber", "node", "noglob", "nogrid", "nomod", "nomoremode", "nonomatch", "nopadding", "nopage", "noparse", "noprintscale", "nosort", "nosubckt", "notrnoise", "numdgt", "opts", "pivrel", "pivtol", "plots", "pointchars", "polydegree", "polysteps", "program", "prompt", "rawfile", "rawfileprec", "renumber", "rhost", "rprogram", "slowplot", "sourcepath", "spicepath", "subend", "subinvoke", "substart", "term", "ticmarks", "tnom", "trtol", "units", "unixcom", "width", "x11lineararcs", "xbrushheight", "xbrushwidth", "xfont", NULL }; ngspice-26/src/frontend/interp.h0000644000265600020320000000033412264261473016311 0ustar andreasadmin/************* * Header file for interp.c * 1999 E. Rouat ************/ #ifndef ngspice_INTERP_H #define ngspice_INTERP_H void lincopy(struct dvec *ov, double *newscale, int newlen, struct dvec *oldscale); #endif ngspice-26/src/frontend/nutmegif.h0000644000265600020320000000021612264261473016625 0ustar andreasadmin/************* * Header file for nutmegif.c * 1999 E. Rouat ************/ #ifndef ngspice_NUTMEGIF_H #define ngspice_NUTMEGIF_H #endif ngspice-26/src/frontend/postcoms.h0000644000265600020320000000071012264261473016655 0ustar andreasadmin/************* * Header file for postcoms.c * 1999 E. Rouat ************/ #ifndef ngspice_POSTCOMS_H #define ngspice_POSTCOMS_H void com_unlet(wordlist *wl); void com_load(wordlist *wl); void com_print(wordlist *wl); void com_write(wordlist *wl); void com_write_sparam(wordlist *wl); void com_transpose(wordlist *wl); void com_cross(wordlist *wl); void com_destroy(wordlist *wl); void com_splot(wordlist *wl); void destroy_const_plot(void); #endif ngspice-26/src/frontend/com_fft.h0000644000265600020320000000030112264261473016417 0ustar andreasadmin/************* * Header file for com_fft.c * 2008 H. Vogt ************/ #ifndef ngspice_COM_FFT_H #define ngspice_COM_FFT_H void com_fft(wordlist *wl); void com_psd(wordlist *wl); #endif ngspice-26/src/frontend/resource.c0000644000265600020320000004536212264261473016644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Resource-related routines. * * New operation systems information options added: * Windows 2000 and newer: Use GlobalMemoryStatusEx and GetProcessMemoryInfo * LINUX (and maybe some others): Use the /proc virtual file information system * Others: Use original code with sbrk(0) and some "ugly hacks" */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "circuits.h" #include "quote.h" #include "resource.h" #include "variable.h" #include "ngspice/cktdefs.h" #include #include "../misc/misc_time.h" /* timediff */ #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - include ipc stuff */ #include "ngspice/ipctiein.h" /* gtri - end - 12/12/90 */ #endif /* We might compile for Windows, but only as a console application (e.g. tcl) */ #if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER) #define HAVE_WIN32 #endif #ifdef HAVE_WIN32 #define WIN32_LEAN_AND_MEAN #ifdef __MINGW32__ /* access to GlobalMemoryStatusEx in winbase.h:1558 */ #define WINVER 0x0500 #endif /* * The ngspice.h file included above defines BOOLEAN (via bool.h) and this * clashes with the definition obtained from windows.h (via winnt.h). * However, BOOLEAN is not used by this file so we can work round this problem * by undefining BOOLEAN before including windows.h * SJB - April 2005 */ #undef BOOLEAN #include /* At least Windows 2000 is needed * Undefine _WIN32_WINNT 0x0500 if you want to compile under Windows ME * and older (not tested under Windows ME or 98!) */ #if defined(__MINGW32__) || (_MSC_VER > 1200) /* Exclude VC++ 6.0 from using the psapi */ #include #endif #endif /* HAVE_WIN32 */ /* Uncheck the following definition if you want to get the old usage information #undef HAVE__PROC_MEMINFO */ static void printres(char *name); static void fprintmem(FILE *stream, unsigned long long memory); #if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) static int get_procm(struct proc_mem *memall); static int get_sysmem(struct sys_mem *memall); struct sys_mem mem_t, mem_t_act; struct proc_mem mem_ng, mem_ng_act; #else static RETSIGTYPE fault(void); static void *baseaddr(void); #endif char *startdata; char *enddata; void init_rlimits(void) { # if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) get_procm(&mem_ng); get_sysmem(&mem_t); # else startdata = (char *) baseaddr(); enddata = sbrk(0); # endif } void init_time(void) { #ifdef HAVE_GETRUSAGE #else # ifdef HAVE_TIMES # else # ifdef HAVE_FTIME ftime(&timebegin); # endif # endif #endif } void com_rusage(wordlist *wl) { char *copyword; /* Fill in the SPICE accounting structure... */ if (wl && (eq(wl->wl_word, "everything") || eq(wl->wl_word, "all"))) { printres(NULL); } else if (wl) { for (; wl; wl = wl->wl_next) { /* printres(cp_unquote(wl->wl_word)); DG: bad, memory leak*/ copyword = cp_unquote(wl->wl_word);/*DG*/ printres(copyword); tfree(copyword); if (wl->wl_next) (void) putc('\n', cp_out); } } else { printres("cputime"); (void) putc('\n', cp_out); printres("totalcputime"); (void) putc('\n', cp_out); printres("space"); } } /* Find out if the user is approaching his maximum data size. If usage is withing 90% of total available then a warning message is sent to the error stream (cp_err) */ void ft_ckspace(void) { unsigned long long usage, limit; #if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) get_procm(&mem_ng_act); usage = mem_ng_act.size; limit = mem_t.free; #else static size_t old_usage = 0; char *hi; #ifdef HAVE_GETRLIMIT struct rlimit rld; getrlimit(RLIMIT_DATA, &rld); if (rld.rlim_cur == RLIM_INFINITY) return; limit = rld.rlim_cur - (enddata - startdata); /* rlim_max not used */ #else /* HAVE_GETRLIMIT */ /* SYSVRLIMIT */ limit = ulimit(3, 0L) - (enddata - startdata); #endif /* HAVE_GETRLIMIT */ hi = sbrk(0); usage = (size_t) (hi - enddata); if (usage <= old_usage) return; old_usage = usage; #endif /* not HAS_WINGUI */ if ((double)usage > (double)limit * 0.9) { fprintf(cp_err, "Warning - approaching max data size: "); fprintf(cp_err, "current size = "); fprintmem(cp_err, usage); fprintf(cp_err, ", limit = "); fprintmem(cp_err, limit); fprintf(cp_err, "\n"); } } /* Print out one piece of resource usage information. */ static void printres(char *name) { #ifdef CIDER char *paramname = NULL; #endif bool yy = FALSE; static long lastsec = 0, lastusec = 0; struct variable *v, *vfree = NULL; char *cpu_elapsed; if (!name || eq(name, "totalcputime") || eq(name, "cputime")) { int total, totalu; #ifdef ipsc # define NO_RUDATA #else # ifdef HAVE_GETRUSAGE int ret; struct rusage ruse; memset(&ruse, 0, sizeof(ruse)); ret = getrusage(RUSAGE_SELF, &ruse); if (ret == -1) perror("getrusage(): "); total = ruse.ru_utime.tv_sec + ruse.ru_stime.tv_sec; totalu = (ruse.ru_utime.tv_usec + ruse.ru_stime.tv_usec) / 1000; cpu_elapsed = "CPU"; # else # ifdef HAVE_TIMES struct tms ruse; realt = times(&ruse); total = (ruse.tms_utime + ruse.tms_stime)/ HZ; totalu = (ruse.tms_utime + ruse.tms_utime) * 1000 / HZ; cpu_elapsed = "CPU"; # else # ifdef HAVE_FTIME struct timeb timenow; /* int sec, msec; sjb */ ftime(&timenow); timediff(&timenow, &timebegin, &total, &totalu); /* totalu /= 1000; hvogt */ cpu_elapsed = "elapsed"; # else # define NO_RUDATA # endif # endif # endif #endif #ifndef NO_RUDATA if (!name || eq(name, "totalcputime")) { total += totalu / 1000; totalu %= 1000; fprintf(cp_out, "Total %s time: %u.%03u seconds.\n", cpu_elapsed, total, totalu); } if (!name || eq(name, "cputime")) { lastusec = totalu - lastusec; lastsec = total - lastsec; while (lastusec < 0) { lastusec += 1000; lastsec -= 1; } while (lastusec > 1000) { lastusec -= 1000; lastsec += 1; } #ifndef HAVE_WIN32 fprintf(cp_out, "%s time since last call: %lu.%03lu seconds.\n", cpu_elapsed, lastsec, lastusec); #endif lastsec = total; lastusec = totalu; } #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - record cpu time used for ipc */ g_ipc.cpu_time = (double) lastusec; g_ipc.cpu_time /= 1.0e6; g_ipc.cpu_time += (double) lastsec; /* gtri - end - 12/12/90 */ #endif yy = TRUE; #else if (!name || eq(name, "totalcputime")) fprintf(cp_out, "Total CPU time: ??.??? seconds.\n"); if (!name || eq(name, "cputime")) fprintf(cp_out, "CPU time since last call: ??.??? seconds.\n"); yy = TRUE; #endif } if (!name || eq(name, "space")) { #ifdef ipsc size_t usage = 0, limit = 0; NXINFO cur = nxinfo, start = nxinfo_snap; usage = cur.dataend - cur.datastart; limit = start.availmem; #else /* ipsc */ # ifdef HAVE_GETRLIMIT size_t usage = 0, limit = 0; struct rlimit rld; char *hi; getrlimit(RLIMIT_DATA, &rld); limit = rld.rlim_cur - (size_t)(enddata - startdata); hi = (char*) sbrk(0); usage = (size_t) (hi - enddata); # else /* HAVE_GETRLIMIT */ # ifdef HAVE_ULIMIT size_t usage = 0, limit = 0; char *hi; limit = ulimit(3, 0L) - (size_t)(enddata - startdata); hi = sbrk(0); usage = (size_t) (hi - enddata); # endif /* HAVE_ULIMIT */ # endif /* HAVE_GETRLIMIT */ #endif /* ipsc */ #if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) get_procm(&mem_ng_act); get_sysmem(&mem_t_act); /* get_sysmem returns bytes */ fprintf(cp_out, "Total DRAM available = "); fprintmem(cp_out, mem_t_act.size); fprintf(cp_out, ".\n"); fprintf(cp_out, "DRAM currently available = "); fprintmem(cp_out, mem_t_act.free); fprintf(cp_out, ".\n"); /* get_procm returns Kilobytes */ fprintf(cp_out, "Total ngspice program size = "); fprintmem(cp_out, mem_ng_act.size*1024); fprintf(cp_out, ".\n"); #if defined(HAVE__PROC_MEMINFO) fprintf(cp_out, "Resident set size = "); fprintmem(cp_out, mem_ng_act.resident*1024); fprintf(cp_out, ".\n"); fprintf(cp_out, "Shared ngspice pages = "); fprintmem(cp_out, mem_ng_act.shared*1024); fprintf(cp_out, ".\n"); fprintf(cp_out, "Text (code) pages = "); fprintmem(cp_out, mem_ng_act.trs*1024); fprintf(cp_out, ".\n"); fprintf(cp_out, "Stack = "); fprintmem(cp_out, mem_ng_act.drs*1024); fprintf(cp_out, ".\n"); fprintf(cp_out, "Library pages = "); fprintmem(cp_out, mem_ng_act.lrs*1024); fprintf(cp_out, ".\n"); /* not used fprintf(cp_out, "Dirty pages = "); fprintmem(cp_out, all_memory.dt * 1024); fprintf(cp_out, ".\n"); */ #endif /* HAVE__PROC_MEMINFO */ #else /* HAS_WINGUI or HAVE__PROC_MEMINFO */ fprintf(cp_out, "Current dynamic memory usage = "); fprintmem(cp_out, usage); fprintf(cp_out, ",\n"); fprintf(cp_out, "Dynamic memory limit = "); fprintmem(cp_out, limit); fprintf(cp_out, ".\n"); #endif yy = TRUE; } if (!name || eq(name, "faults")) { #ifdef HAVE_GETRUSAGE int ret; struct rusage ruse; memset(&ruse, 0, sizeof(ruse)); ret = getrusage(RUSAGE_SELF, &ruse); if (ret == -1) perror("getrusage(): "); fprintf(cp_out, "%lu page faults, %lu vol + %lu invol = %lu context switches.\n", ruse.ru_majflt, ruse.ru_nvcsw, ruse.ru_nivcsw, ruse.ru_nvcsw + ruse.ru_nivcsw); yy = TRUE; #endif } /* PN Now get all the frontend resource stuff */ if (ft_curckt) { if (name && eq(name, "task")) vfree = v = ft_getstat(ft_curckt, NULL); else vfree = v = ft_getstat(ft_curckt, name); if (name && v) { fprintf(cp_out, "%s= ", v->va_name); wl_print(cp_varwl(v), cp_out); (void)putc('\n', cp_out); yy = TRUE; } else if (v) { (void) putc('\n', cp_out); while (v) { wordlist *wlpr = cp_varwl(v); fprintf(cp_out, "%s = ", v->va_name); wl_print(wlpr, cp_out); wl_free(wlpr); (void) putc('\n', cp_out); v = v->va_next; } yy = TRUE; } } if (vfree) free_struct_variable(vfree); /* Now get all the spice resource stuff. */ if (ft_curckt && ft_curckt->ci_ckt) { #ifdef CIDER /* begin cider integration */ if (!name || eq(name, "circuit") || eq(name, "task")) paramname = NULL; else paramname = name; vfree = v = if_getstat(ft_curckt->ci_ckt, paramname); if (paramname && v) { /* end cider integration */ #else /* ~CIDER */ if (name && eq(name, "task")) vfree = v = if_getstat(ft_curckt->ci_ckt, NULL); else vfree = v = if_getstat(ft_curckt->ci_ckt, name); if (name && v) { #endif fprintf(cp_out, "%s = ", v->va_name); wl_print(cp_varwl(v), cp_out); (void) putc('\n', cp_out); yy = TRUE; } else if (v) { (void) putc('\n', cp_out); while (v) { wordlist *wlpr = cp_varwl(v); fprintf(cp_out, "%s = ", v->va_name); wl_print(wlpr, cp_out); wl_free(wlpr); (void) putc('\n', cp_out); v = v->va_next; } yy = TRUE; } #ifdef CIDER /* begin cider integration */ /* Now print out interesting stuff about numerical devices. */ if (!name || eq(name, "devices")) { (void) NDEVacct(ft_curckt->ci_ckt, cp_out); yy = TRUE; } /* end cider integration */ #endif } if (!yy) { fprintf(cp_err, "Note: no resource usage information for '%s',\n", name); fprintf(cp_err, "\tor no active circuit available\n"); } if (vfree) free_struct_variable(vfree); } /* Print to stream the given memory size in a human friendly format */ static void fprintmem(FILE *stream, unsigned long long memory) { if (memory > 1048576) fprintf(stream, "%8.6f MB", (double)memory / 1048576.); else if (memory > 1024) fprintf(stream, "%5.3f kB", (double)memory / 1024.); else fprintf(stream, "%llu bytes", memory); } #if defined(HAVE_WIN32) || defined(HAVE__PROC_MEMINFO) static int get_procm(struct proc_mem *memall) { #if defined(_MSC_VER) || defined(__MINGW32__) #if (_WIN32_WINNT >= 0x0500) && defined(HAS_WINGUI) /* Use Windows API function to obtain size of memory - more accurate */ HANDLE hProcess; PROCESS_MEMORY_COUNTERS pmc; DWORD procid = GetCurrentProcessId(); hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, procid); if (NULL == hProcess) return 0; /* psapi library required */ if (GetProcessMemoryInfo(hProcess, &pmc, sizeof(pmc))) { memall->size = pmc.WorkingSetSize/1024; memall->resident = pmc.QuotaNonPagedPoolUsage/1024; memall->trs = pmc.QuotaPagedPoolUsage/1024; } else { CloseHandle(hProcess); return 0; } CloseHandle(hProcess); #else /* Use Windows GlobalMemoryStatus or /proc/memory to obtain size of memory - not accurate */ get_sysmem(&mem_t_act); /* size is the difference between free memory at start time and now */ if (mem_t.free > mem_t_act.free) /* it can happen that that ngspice is */ memall->size = (mem_t.free - mem_t_act.free)/1024; /* to small compared to os memory usage */ else memall->size = 0; /* sure, it is more */ memall->resident = 0; memall->trs = 0; #endif /* _WIN32_WINNT 0x0500 && HAS_WINGUI */ #else /* Use Linux/UNIX /proc//statm file information */ FILE *fp; char buffer[1024], fibuf[100]; size_t bytes_read; (void) sprintf(fibuf, "/proc/%d/statm", getpid()); if ((fp = fopen(fibuf, "r")) == NULL) { perror("fopen(\"/proc/%d/statm\")"); return 0; } bytes_read = fread(buffer, 1, sizeof(buffer), fp); fclose(fp); if (bytes_read == 0 || bytes_read == sizeof(buffer)) return 0; buffer[bytes_read] = '\0'; sscanf(buffer, "%llu %llu %llu %llu %llu %llu %llu", &memall->size, &memall->resident, &memall->shared, &memall->trs, &memall->drs, &memall->lrs, &memall->dt); #endif return 1; } static int get_sysmem(struct sys_mem *memall) { #ifdef HAVE_WIN32 #if (_WIN32_WINNT >= 0x0500) MEMORYSTATUSEX ms; ms.dwLength = sizeof(MEMORYSTATUSEX); GlobalMemoryStatusEx(&ms); memall->size = ms.ullTotalPhys; memall->free = ms.ullAvailPhys; memall->swap_t = ms.ullTotalPageFile; memall->swap_f = ms.ullAvailPageFile; #else MEMORYSTATUS ms; ms.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus(&ms); memall->size = ms.dwTotalPhys; memall->free = ms.dwAvailPhys; memall->swap_t = ms.dwTotalPageFile; memall->swap_f = ms.dwAvailPageFile; #endif /*_WIN32_WINNT 0x0500*/ #else FILE *fp; char buffer[2048]; size_t bytes_read; char *match; unsigned long long mem_got; if ((fp = fopen("/proc/meminfo", "r")) == NULL) { perror("fopen(\"/proc/meminfo\")"); return 0; } bytes_read = fread(buffer, 1, sizeof(buffer), fp); fclose(fp); if (bytes_read == 0 || bytes_read == sizeof(buffer)) return 0; buffer[bytes_read] = '\0'; /* Search for string "MemTotal" */ match = strstr(buffer, "MemTotal"); if (match == NULL) /* not found */ return 0; sscanf(match, "MemTotal: %llu", &mem_got); memall->size = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "MemFree" */ match = strstr(buffer, "MemFree"); if (match == NULL) /* not found */ return 0; sscanf(match, "MemFree: %llu", &mem_got); memall->free = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "SwapTotal" */ match = strstr(buffer, "SwapTotal"); if (match == NULL) /* not found */ return 0; sscanf(match, "SwapTotal: %llu", &mem_got); memall->swap_t = mem_got*1024; /* 1MB = 1024KB */ /* Search for string "SwapFree" */ match = strstr(buffer, "SwapFree"); if (match == NULL) /* not found */ return 0; sscanf(match, "SwapFree: %llu", &mem_got); memall->swap_f = mem_got*1024; /* 1MB = 1024KB */ #endif return 1; } #else #include #include /* * baseaddr() returns the base address of the data segment on most Unix * systems. It's an ugly hack for info that should be provided by the OS. */ /* Does anyone use a pagesize < 256 bytes?? I'll bet not; * too small doesn't hurt */ #define LOG2_PAGESIZE 8 static JMP_BUF env; static RETSIGTYPE fault(void) { signal(SIGSEGV, (SIGNAL_FUNCTION) fault); /* SysV style */ LONGJMP(env, 1); } static void * baseaddr(void) { #if defined(__CYGWIN__) || defined(__MINGW32__) || defined(HAVE_WIN32) || defined(__APPLE__) return 0; #else char *low, *high, *at; long x; RETSIGTYPE (*orig_signal)(); if (getenv("SPICE_NO_DATASEG_CHECK")) return 0; low = 0; high = (char *) ((unsigned long) sbrk(0) & ~((1 << LOG2_PAGESIZE) - 1)); orig_signal = signal(SIGSEGV, (SIGNAL_FUNCTION) fault); for (;;) { at = (char *) ((((long)low >> LOG2_PAGESIZE) + ((long)high >> LOG2_PAGESIZE)) << (LOG2_PAGESIZE - 1)); if (at == low || at == high) break; if (SETJMP(env, 1)) { low = at; continue; } else { x = *at; } if (SETJMP(env, 1)) { low = at; continue; } else { *at = x; } high = at; } (void) signal(SIGSEGV, (SIGNAL_FUNCTION) orig_signal); return (void *) high; #endif } #endif # ifdef notdef main() { printf("testing\n"); printf("baseaddr: %#8x topaddr: %#8x\n", baseaddr(), sbrk(0)); } # endif ngspice-26/src/frontend/fourier.h0000644000265600020320000000033312264261473016462 0ustar andreasadmin/************* * Header file for fourier.c * 1999 E. Rouat ************/ #ifndef ngspice_FOURIER_H #define ngspice_FOURIER_H void com_fourier(wordlist *wl); int fourier(wordlist *wl, struct plot *current); #endif ngspice-26/src/frontend/inpcom.c0000644000265600020320000070101712264261473016276 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher **********/ /* For dealing with spice input decks and command scripts Central function is inp_readall() */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteext.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "ngspice/compatmode.h" #include #include #include #include #if !defined(__MINGW32__) && !defined(_MSC_VER) #include #endif #include "inpcom.h" #include "variable.h" #include "subckt.h" #include "../misc/util.h" /* ngdirname() */ #include "ngspice/stringutil.h" #include "ngspice/wordlist.h" #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - include new stuff */ #include "ngspice/ipctiein.h" #include "ngspice/enh.h" /* gtri - end - 12/12/90 */ #endif /* SJB - Uncomment this line for debug tracing */ /*#define TRACE*/ /* globals -- wanted to avoid complicating inp_readall interface */ #define N_LIBRARIES 1000 #define N_SECTIONS 1000 #define N_PARAMS 1000 #define N_SUBCKT_W_PARAMS 4000 #define VALIDCHARS "!$%_#?@.[]&" static struct library { char *realpath; char *habitat; struct line *deck; } libraries[N_LIBRARIES]; static int num_libraries; struct names { char *names[N_SUBCKT_W_PARAMS]; int num_names; }; struct function_env { struct function_env *up; struct function { struct function *next; char *name; char *macro; char *params[N_PARAMS]; int num_parameters; } *functions; }; struct func_temper { char* funcname; int subckt_depth; int subckt_count; struct func_temper *next; }; extern void line_free_x(struct line *deck, bool recurse); static COMPATMODE_T inp_compat_mode; /* Collect information for dynamic allocation of numparam arrays */ /* number of lines in input deck */ int dynmaxline; /* inpcom.c 1529 */ /* number of lines in deck after expansion */ int dynMaxckt = 0; /* subckt.c 307 */ /* number of parameter substitutions */ long dynsubst; /* spicenum.c 221 */ /* Expression handling with 'temper' parameter required */ bool expr_w_temper = FALSE; static char *readline(FILE *fd); static int get_number_terminals(char *c); static void inp_stripcomments_deck(struct line *deck, bool cs); static void inp_stripcomments_line(char *s, bool cs); static void inp_fix_for_numparam(struct names *subckt_w_params, struct line *deck); static void inp_remove_excess_ws(struct line *deck); static void expand_section_references(struct line *deck, char *dir_name); static void inp_grab_func(struct function_env *, struct line *deck); static void inp_fix_inst_calls_for_numparam(struct names *subckt_w_params, struct line *deck); static void inp_expand_macros_in_func(struct function_env *); static struct line *inp_expand_macros_in_deck(struct function_env *, struct line *deck); static void inp_fix_param_values(struct line *deck); static void inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head, struct line *end); static int inp_split_multi_param_lines(struct line *deck, int line_number); static void inp_sort_params(struct line *start_card, struct line *end_card, struct line *card_bf_start, struct line *s_c, struct line *e_c); static char *inp_remove_ws(char *s); static void inp_compat(struct line *deck); static void inp_bsource_compat(struct line *deck); static void inp_temper_compat(struct line *card); static void inp_dot_if(struct line *deck); static char *inp_modify_exp(char* expression); static void inp_new_func(char *funcname, char *funcbody, struct line *card, struct func_temper **new_func, int *sub_count, int subckt_depth); static void inp_rem_func(struct func_temper **new_func); static bool chk_for_line_continuation(char *line); static void comment_out_unused_subckt_models(struct line *start_card, int no_of_lines); static void inp_fix_macro_param_func_paren_io(struct line *begin_card); static void inp_fix_gnd_name(struct line *deck); static void inp_chk_for_multi_in_vcvs(struct line *deck, int *line_number); static void inp_add_control_section(struct line *deck, int *line_number); static char *get_quoted_token(char *string, char **token); static void replace_token(char *string, char *token, int where, int total); static void inp_add_series_resistor(struct line *deck); static void subckt_params_to_param(struct line *deck); static void inp_fix_temper_in_param(struct line *deck); static char *skip_back_non_ws(char *d) { while (d[-1] && !isspace(d[-1])) d--; return d; } static char *skip_back_ws(char *d) { while (isspace(d[-1])) d--; return d; } static char *skip_non_ws(char *d) { while (*d && !isspace(*d)) d++; return d; } static char *skip_ws(char *d) { while (isspace(*d)) d++; return d; } static char *skip_back_non_ws_(char *d, char *start) { while (d > start && !isspace(d[-1])) d--; return d; } static char *skip_back_ws_(char *d, char *start) { while (d > start && isspace(d[-1])) d--; return d; } static char *inp_pathresolve(const char *name); static char *inp_pathresolve_at(char *name, char *dir); void tprint(struct line *deck); struct inp_read_t { struct line *cc; int line_number; }; static struct inp_read_t inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile); #ifndef XSPICE static void inp_poly_err(struct line *deck); #endif static struct line * xx_new_line(struct line *next, char *line, int linenum, int linenum_orig) { struct line *x = TMALLOC(struct line, 1); x->li_next = next; x->li_error = NULL; x->li_actual = NULL; x->li_line = line; x->li_linenum = linenum; x->li_linenum_orig = linenum_orig; return x; } static struct library * new_lib(void) { if (num_libraries >= N_LIBRARIES) { fprintf(stderr, "ERROR, N_LIBRARIES overflow\n"); controlled_exit(EXIT_FAILURE); } return & libraries[num_libraries++]; } static void delete_libs(void) { int i; for (i = 0; i < num_libraries; i++) { tfree(libraries[i].realpath); tfree(libraries[i].habitat); line_free_x(libraries[i].deck, TRUE); } } static struct library * find_lib(char *name) { int i; for (i = 0; i < num_libraries; i++) if (cieq(libraries[i].realpath, name)) return & libraries[i]; return NULL; } static struct line * find_section_definition(struct line *c, char *name) { for (; c; c = c->li_next) { char *line = c->li_line; if (ciprefix(".lib", line)) { char *s, *t, *y; s = skip_non_ws(line); while (isspace(*s) || isquote(*s)) s++; for (t = s; *t && !isspace(*t) && !isquote(*t); t++) ; y = t; while (isspace(*y) || isquote(*y)) y++; if (!*y) { /* library section definition: `.lib ' .. `.endl' */ char keep_char = *t; *t = '\0'; if (strcasecmp(name, s) == 0) { *t = keep_char; return c; } *t = keep_char; } } } return NULL; } static struct library * read_a_lib(char *y, char *dir_name) { char *yy, *y_resolved; struct library *lib; y_resolved = inp_pathresolve_at(y, dir_name); if (!y_resolved) { fprintf(cp_err, "Error: Could not find library file %s\n", y); return NULL; } #if defined(__MINGW32__) || defined(_MSC_VER) yy = _fullpath(NULL, y_resolved, 0); #else yy = realpath(y_resolved, NULL); #endif if (!yy) { fprintf(cp_err, "Error: Could not `realpath' library file %s\n", y); controlled_exit(EXIT_FAILURE); } lib = find_lib(yy); if (!lib) { FILE *newfp = fopen(y_resolved, "r"); if (!newfp) { fprintf(cp_err, "Error: Could not open library file %s\n", y); return NULL; } /* lib points to a new entry in global lib array libraries[N_LIBRARIES] */ lib = new_lib(); lib->realpath = strdup(yy); lib->habitat = ngdirname(yy); lib->deck = inp_read(newfp, 1 /*dummy*/, lib->habitat, FALSE, FALSE) . cc; fclose(newfp); } free(yy); free(y_resolved); return lib; } static struct names * new_names(void) { struct names *p = TMALLOC(struct names, 1); p -> num_names = 0; return p; } static void delete_names(struct names *p) { int i; for (i = 0; i < p->num_names; i++) tfree(p->names[i]); tfree(p); } /* line1 + line2 ----> line1 line 2 Proccedure: store regular card in prev, skip comment lines (*..) and some others */ static void inp_stitch_continuation_lines(struct line *working) { struct line *prev = NULL; while (working) { char *s, c, *buffer; for (s = working->li_line; (c = *s) != '\0' && c <= ' '; s++) ; #ifdef TRACE /* SDB debug statement */ printf("In inp_read, processing linked list element line = %d, s = %s . . . \n", working->li_linenum, s); #endif switch (c) { case '#': case '$': case '*': case '\0': /* skip these cards, and keep prev as the last regular card */ working = working->li_next; /* for these chars, go to next card */ break; case '+': /* handle continuation */ if (!prev) { working->li_error = copy("Illegal continuation line: ignored."); working = working->li_next; break; } /* We now may have lept over some comment lines, which are located among the continuation lines. We have to delete them here to prevent a memory leak */ while (prev->li_next != working) { struct line *tmpl = prev->li_next->li_next; line_free_x(prev->li_next, FALSE); prev->li_next = tmpl; } /* create buffer and write last and current line into it. */ buffer = TMALLOC(char, strlen(prev->li_line) + strlen(s) + 2); (void) sprintf(buffer, "%s %s", prev->li_line, s + 1); /* replace prev->li_line by buffer */ s = prev->li_line; prev->li_line = buffer; prev->li_next = working->li_next; working->li_next = NULL; /* add original line to prev->li_actual */ if (prev->li_actual) { struct line *end; for (end = prev->li_actual; end->li_next; end = end->li_next) ; end->li_next = working; tfree(s); } else { prev->li_actual = xx_new_line(working, s, prev->li_linenum, 0); } working = prev->li_next; break; default: /* regular one-line card */ prev = working; working = working->li_next; break; } } } /* * search for `=' assignment operator * take care of `!=' `<=' `==' and `>=' */ static char * find_assignment(char *str) { char *p = str; while ((p = strchr(p, '=')) != NULL) { // check for equality '==' if (p[1] == '=') { p += 2; continue; } // check for '!=', '<=', '>=' if (p > str) if (p[-1] == '!' || p[-1] == '<' || p[-1] == '>') { p += 1; continue; } return p; } return NULL; } /*------------------------------------------------------------------------- Read the entire input file and return a pointer to the first line of the linked list of 'card' records in data. The pointer is stored in *data. Called from fcn inp_spsource() in inp.c to load circuit or command files. Called from fcn com_alter_mod() in device.c to load model files. Called from here to load .library or .include files. Procedure: read in all lines & put them in the struct cc read next line process .TITLE line store contents in string new_title process .lib lines read file and library name, open file using fcn inp_pathopen() read file contents and put into struct libraries[].deck, one entry per .lib line process .inc lines read file and library name, open file using fcn inp_pathopen() read file contents and add lines to cc make line entry lower case allow for shell end of line continuation (\\) add '+' to beginning of next line add line entry to list cc add '.global gnd' add libraries find library section add lines add .end card strip end-of-line comments make continuation lines a single line *** end of processing for command files *** start preparation of input deck for numparam ... debug printout to debug-out.txt *-------------------------------------------------------------------------*/ struct line * inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile) { struct line *cc; struct inp_read_t rv; num_libraries = 0; inp_compat_mode = ngspice_compat_mode(); rv = inp_read(fp, 0, dir_name, comfile, intfile); cc = rv . cc; /* The following processing of an input file is not required for command files like spinit or .spiceinit, so return command files here. */ if (!comfile && cc) { unsigned int no_braces; /* number of '{' */ size_t max_line_length; /* max. line length in input deck */ struct line *tmp_ptr1, *end; struct names *subckt_w_params = new_names(); struct line *working = cc->li_next; delete_libs(); inp_fix_for_numparam(subckt_w_params, working); inp_remove_excess_ws(working); comment_out_unused_subckt_models(working, rv . line_number); subckt_params_to_param(working); rv . line_number = inp_split_multi_param_lines(working, rv . line_number); inp_fix_macro_param_func_paren_io(working); inp_fix_temper_in_param(working); inp_expand_macros_in_deck(NULL, working); inp_fix_param_values(working); for (end = cc; end->li_next; end = end->li_next) ; inp_reorder_params(subckt_w_params, working, cc, end); inp_fix_inst_calls_for_numparam(subckt_w_params, working); delete_names(subckt_w_params); subckt_w_params = NULL; inp_fix_gnd_name(working); inp_chk_for_multi_in_vcvs(working, &rv. line_number); if (cp_getvar("addcontrol", CP_BOOL, NULL)) inp_add_control_section(working, &rv . line_number); #ifndef XSPICE inp_poly_err(working); #endif if (inp_compat_mode != COMPATMODE_SPICE3) { /* Do all the compatibility stuff here */ working = cc->li_next; /* E, G, L, R, C compatibility transformations */ inp_compat(working); working = cc->li_next; /* B source numparam compatibility transformation */ inp_bsource_compat(working); inp_dot_if(working); inp_temper_compat(working); } inp_add_series_resistor(working); /* get max. line length and number of lines in input deck, and renumber the lines, count the number of '{' per line as an upper estimate of the number of parameter substitutions in a line*/ dynmaxline = 0; max_line_length = 0; no_braces = 0; for (tmp_ptr1 = cc; tmp_ptr1; tmp_ptr1 = tmp_ptr1->li_next) { char *s; unsigned int braces_per_line = 0; /* count number of lines */ dynmaxline++; /* renumber the lines of the processed input deck */ tmp_ptr1->li_linenum = dynmaxline; if (max_line_length < strlen(tmp_ptr1->li_line)) max_line_length = strlen(tmp_ptr1->li_line); /* count '{' */ for (s = tmp_ptr1->li_line; *s; s++) if (*s == '{') braces_per_line++; if (no_braces < braces_per_line) no_braces = braces_per_line; } if (ft_ngdebug) { /*debug: print into file*/ FILE *fd = fopen("debug-out.txt", "w"); struct line *t; fprintf(fd, "**************** uncommented deck **************\n\n"); /* always print first line */ fprintf(fd, "%6d %6d %s\n", cc->li_linenum_orig, cc->li_linenum, cc->li_line); /* here without out-commented lines */ for (t = cc->li_next; t; t = t->li_next) { if (*(t->li_line) == '*') continue; fprintf(fd, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); } fprintf(fd, "\n****************** complete deck ***************\n\n"); /* now completely */ for (t = cc; t; t = t->li_next) fprintf(fd, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); fclose(fd); fprintf(stdout, "max line length %d, max subst. per line %d, number of lines %d\n", (int) max_line_length, no_braces, dynmaxline); } } return cc; } struct inp_read_t inp_read(FILE *fp, int call_depth, char *dir_name, bool comfile, bool intfile) /* fp: in, pointer to file to be read, call_depth: in, nested call to fcn dir_name: in, name of directory of file to be read comfile: in, TRUE if command file (e.g. spinit, .spiceinit) intfile: in, TRUE if deck is generated from internal circarray */ { struct inp_read_t rv; struct line *end = NULL, *cc = NULL; char *buffer = NULL; /* segfault fix */ #ifdef XSPICE char big_buff[5000]; int line_count = 0; #endif char *new_title = NULL; int line_number = 1; /* sjb - renamed to avoid confusion with struct line */ int line_number_orig = 1; int cirlinecount = 0; /* length of circarray */ static int is_control = 0; /* We are reading from a .control section */ bool found_end = FALSE, shell_eol_continuation = FALSE; /* First read in all lines & put them in the struct cc */ for (;;) { /* derive lines from circarray */ if (intfile) { buffer = circarray[cirlinecount++]; if (!buffer) { tfree(circarray); break; } } /* read lines from file fp */ else { #ifdef XSPICE /* gtri - modify - 12/12/90 - wbk - read from mailbox if ipc enabled */ /* If IPC is not enabled, do equivalent of what SPICE did before */ if (! g_ipc.enabled) { if (call_depth == 0 && line_count == 0) { line_count++; if (fgets(big_buff, 5000, fp)) buffer = copy(big_buff); } else { buffer = readline(fp); if (!buffer) break; } } else { /* else, get the line from the ipc channel. */ /* We assume that newlines are not sent by the client */ /* so we add them here */ char ipc_buffer[1025]; /* Had better be big enough */ int ipc_len; Ipc_Status_t ipc_status = ipc_get_line(ipc_buffer, &ipc_len, IPC_WAIT); if (ipc_status == IPC_STATUS_END_OF_DECK) { buffer = NULL; break; } else if (ipc_status == IPC_STATUS_OK) { buffer = TMALLOC(char, strlen(ipc_buffer) + 3); strcpy(buffer, ipc_buffer); strcat(buffer, "\n"); } else { /* No good way to report this so just die */ controlled_exit(EXIT_FAILURE); } } /* gtri - end - 12/12/90 */ #else buffer = readline(fp); if(!buffer) break; #endif } #ifdef TRACE /* SDB debug statement */ printf("in inp_read, just read %s", buffer); #endif if (!buffer) continue; /* OK -- now we have loaded the next line into 'buffer'. Process it. */ /* If input line is blank, ignore it & continue looping. */ if ((strcmp(buffer, "\n") == 0) || (strcmp(buffer, "\r\n") == 0)) if (call_depth != 0 || (call_depth == 0 && cc != NULL)) { line_number_orig++; tfree(buffer); /* was allocated by readline() */ continue; } if (*buffer == '@') { tfree(buffer); /* was allocated by readline() */ break; } /* now check if we are in a .control section */ if (ciprefix(".control", buffer)) is_control++; else if (ciprefix(".endc", buffer)) is_control--; /* now handle .title statement */ if (ciprefix(".title", buffer)) { char *s; s = skip_non_ws(buffer); /* skip over .title */ s = skip_ws(s); /* advance past space chars */ /* only the last title line remains valid */ tfree(new_title); new_title = copy(s); if ((s = strchr(new_title, '\n')) != NULL) *s = ' '; *buffer = '*'; /* change .TITLE line to comment line */ } /* now handle old style .lib entries */ /* new style .lib entries handling is in expand_section_references() */ if (ciprefix(".lib", buffer)) if (inp_compat_mode == COMPATMODE_PS) { /* compatibility mode, * this is neither a libray section definition nor a reference * interpret as old style * .lib (no lib name given) */ char *s = skip_non_ws(buffer); /* skip over .lib */ fprintf(cp_err, " File included as: .inc %s\n", s); memcpy(buffer, ".inc", 4); } /* now handle .include statements */ if (ciprefix(".include", buffer) || ciprefix(".inc", buffer)) { char *y = NULL; char *s, *t; struct line *newcard; inp_stripcomments_line(buffer, FALSE); s = skip_non_ws(buffer); /* advance past non-space chars */ t = get_quoted_token(s, &y); if (!y) { fprintf(cp_err, "Error: .include filename missing\n"); tfree(buffer); /* was allocated by readline() */ controlled_exit(EXIT_FAILURE); } { char *y_resolved = inp_pathresolve_at(y, dir_name); char *y_dir_name; FILE *newfp; if (!y_resolved) { fprintf(cp_err, "Error: Could not find include file %s\n", y); rv . line_number = line_number; rv . cc = NULL; return rv; } newfp = fopen(y_resolved, "r"); if (!newfp) { fprintf(cp_err, "Error: .include statement failed.\n"); tfree(buffer); /* allocated by readline() above */ controlled_exit(EXIT_FAILURE); } y_dir_name = ngdirname(y_resolved); newcard = inp_read(newfp, call_depth+1, y_dir_name, FALSE, FALSE) . cc; /* read stuff in include file into netlist */ tfree(y_dir_name); tfree(y_resolved); (void) fclose(newfp); } /* Make the .include a comment */ *buffer = '*'; /* append `buffer' to the (cc, end) chain of decks */ { struct line *x = xx_new_line(NULL, copy(buffer), line_number, line_number); if (end) end->li_next = x; else cc = x; end = x; line_number++; } if (newcard) { int line_number_inc = 1; end->li_next = newcard; /* Renumber the lines */ for (end = newcard; end && end->li_next; end = end->li_next) { end->li_linenum = line_number++; end->li_linenum_orig = line_number_inc++; } end->li_linenum = line_number++; /* SJB - renumber the last line */ end->li_linenum_orig = line_number_inc++; /* SJB - renumber the last line */ } /* Fix the buffer up a bit. */ (void) strncpy(buffer + 1, "end of: ", 8); } /* end of .include handling */ /* loop through 'buffer' until end is reached. Then test for premature end. If premature end is reached, spew error and zap the line. */ { char *s; /* no lower case letters for lines beginning with: */ if ( !ciprefix("write", buffer) && !ciprefix("wrdata", buffer) && !ciprefix(".lib", buffer) && !ciprefix(".inc", buffer) && !ciprefix("codemodel", buffer) && !ciprefix("echo", buffer) && !ciprefix("source", buffer) && !ciprefix("load", buffer) ) { /* lower case for all lines (exceptions see above!) */ for (s = buffer; *s && (*s != '\n'); s++) *s = (char) tolower(*s); } else { /* exclude some commands to preserve filename case */ for (s = buffer; *s && (*s != '\n'); s++) ; } if (!*s) { // fprintf(cp_err, "Warning: premature EOF\n"); } *s = '\0'; /* Zap the newline. */ if ((s-1) >= buffer && *(s-1) == '\r') /* Zop the carriage return under windows */ *(s-1) = '\0'; } /* find the true .end command out of .endc, .ends, .endl, .end (comments may follow) */ if (ciprefix(".end", buffer)) if ((buffer[4] == '\0') || isspace(buffer[4])) { found_end = TRUE; *buffer = '*'; } if (shell_eol_continuation) { char *new_buffer = TMALLOC(char, strlen(buffer) + 2); sprintf(new_buffer, "+%s", buffer); tfree(buffer); buffer = new_buffer; } /* If \\ at end of line is found, next line in loop will get + (see code above) */ shell_eol_continuation = chk_for_line_continuation(buffer); { struct line *x = xx_new_line(NULL, copy(buffer), line_number++, line_number_orig++); if (end) end->li_next = x; else cc = x; end = x; } tfree(buffer); } /* end while ((buffer = readline(fp)) != NULL) */ if (!end) /* No stuff here */ { rv . line_number = line_number; rv . cc = NULL; return rv; } if (call_depth == 0 && !comfile) { cc->li_next = xx_new_line(cc->li_next, copy(".global gnd"), 1, 0); if (inp_compat_mode == COMPATMODE_ALL || inp_compat_mode == COMPATMODE_HS || inp_compat_mode == COMPATMODE_NATIVE) { /* process all library section references */ expand_section_references(cc, dir_name); } } /* add a terminal ".end" card */ if (call_depth == 0 && !comfile) { if (found_end == TRUE) { struct line *x = xx_new_line(NULL, copy(".end"), line_number++, line_number_orig++); end->li_next = x; end = x; } } /* Replace first line with the new title, if available */ if (call_depth == 0 && !comfile && new_title) { tfree(cc->li_line); cc->li_line = new_title; } /* Strip or convert end-of-line comments. Afterwards stitch the continuation lines. If the line only contains an end-of-line comment then it is converted into a normal comment with a '*' at the start. Some special handling if this is a command file or called from within a .control section. */ inp_stripcomments_deck(cc->li_next, comfile || is_control); inp_stitch_continuation_lines(cc->li_next); rv . line_number = line_number; rv . cc = cc; return rv; } static bool is_absolute_pathname(const char *p) { #if defined(__MINGW32__) || defined(_MSC_VER) /* /... or \... or D:\... or D:/... */ return p[0] == DIR_TERM || p[0] == DIR_TERM_LINUX || (isalpha(p[0]) && p[1] == ':' && (p[2] == DIR_TERM_LINUX || p[2] == DIR_TERM)); #else return p[0] == DIR_TERM; #endif } #if 0 static bool is_plain_filename(const char *p) { #if defined(__MINGW32__) || defined(_MSC_VER) return !strchr(p, DIR_TERM) && !strchr(p, DIR_TERM_LINUX); #else return !strchr(p, DIR_TERM); #endif } #endif FILE * inp_pathopen(char *name, char *mode) { char *path = inp_pathresolve(name); if (path) { FILE *fp = fopen(path, mode); tfree(path); return fp; } return NULL; } /*-------------------------------------------------------------------------* Look up the variable sourcepath and try everything in the list in order if the file isn't in . and it isn't an abs path name. *-------------------------------------------------------------------------*/ static char * inp_pathresolve(const char *name) { char buf[BSIZE_SP]; struct variable *v; struct stat st; #if defined(__MINGW32__) || defined(_MSC_VER) /* If variable 'mingwpath' is set: convert mingw /d/... to d:/... */ if (cp_getvar("mingwpath", CP_BOOL, NULL) && name[0] == DIR_TERM_LINUX && isalpha(name[1]) && name[2] == DIR_TERM_LINUX) { strcpy(buf, name); buf[0] = buf[1]; buf[1] = ':'; return inp_pathresolve(buf); } #endif /* just try it */ if (stat(name, &st) == 0) return copy(name); /* fail if this was an absolute filename or if there is no sourcepath var */ if (is_absolute_pathname(name) || !cp_getvar("sourcepath", CP_LIST, &v)) return NULL; for (; v; v = v->va_next) { switch (v->va_type) { case CP_STRING: cp_wstrip(v->va_string); (void) sprintf(buf, "%s%s%s", v->va_string, DIR_PATHSEP, name); break; case CP_NUM: (void) sprintf(buf, "%d%s%s", v->va_num, DIR_PATHSEP, name); break; case CP_REAL: /* This is foolish */ (void) sprintf(buf, "%g%s%s", v->va_real, DIR_PATHSEP, name); break; default: fprintf(stderr, "ERROR: enumeration value `CP_BOOL' or `CP_LIST' not handled in inp_pathresolve\nAborting...\n"); controlled_exit(EXIT_FAILURE); break; } if (stat(buf, &st) == 0) return copy(buf); } return (NULL); } static char * inp_pathresolve_at(char *name, char *dir) { char buf[BSIZE_SP], *end; /* if name is an absolute path name, * or if we haven't anything to prepend anyway */ if (is_absolute_pathname(name) || !dir || !dir[0]) return inp_pathresolve(name); if (name[0] == '~' && name[1] == '/') { char *y = cp_tildexpand(name); if (y) { char *r = inp_pathresolve(y); tfree(y); return r; } } /* concatenate them */ strcpy(buf, dir); end = strchr(buf, '\0'); if (end[-1] != DIR_TERM) *end++ = DIR_TERM; strcpy(end, name); return inp_pathresolve(buf); } /*-------------------------------------------------------------------------* * This routine reads a line (of arbitrary length), up to a '\n' or 'EOF' * * and returns a pointer to the resulting null terminated string. * * The '\n' if found, is included in the returned string. * * From: jason@ucbopal.BERKELEY.EDU (Jason Venner) * * Newsgroups: net.sources * *-------------------------------------------------------------------------*/ #define STRGROW 256 static char * readline(FILE *fd) { int c; int memlen; char *strptr; int strlen; strlen = 0; memlen = STRGROW; strptr = TMALLOC(char, memlen); memlen -= 1; /* Save constant -1's in while loop */ while ((c = getc(fd)) != EOF) { if (strlen == 0 && (c == '\t' || c == ' ')) /* Leading spaces away */ continue; strptr[strlen++] = (char) c; if (strlen >= memlen) { memlen += STRGROW; if ((strptr = TREALLOC(char, strptr, memlen + 1)) == NULL) return (NULL); } if (c == '\n') break; } if (!strlen) { tfree(strptr); return (NULL); } // strptr[strlen] = '\0'; /* Trim the string */ strptr = TREALLOC(char, strptr, strlen + 1); strptr[strlen] = '\0'; return (strptr); } /* replace "gnd" by " 0 " Delimiters of gnd may be ' ' or ',' or '(' or ')' */ static void inp_fix_gnd_name(struct line *c) { for (; c; c = c->li_next) { char *gnd = c->li_line; // if there is a comment or no gnd, go to next line if ((*gnd == '*') || !strstr(gnd, "gnd")) continue; // replace "?gnd?" by "? 0 ?", ? being a ' ' ',' '(' ')'. while ((gnd = strstr(gnd, "gnd")) != NULL) { if ((isspace(gnd[-1]) || gnd[-1] == '(' || gnd[-1] == ',') && (isspace(gnd[3]) || gnd[3] == ')' || gnd[3] == ',')) { memcpy(gnd, " 0 ", 3); } gnd += 3; } // now remove the extra white spaces around 0 c->li_line = inp_remove_ws(c->li_line); } } static void inp_chk_for_multi_in_vcvs(struct line *c, int *line_number) { int skip_control = 0; for (; c; c = c->li_next) { char *line = c->li_line; /* there is no e source inside .control ... .endc */ if (ciprefix(".control", line)) { skip_control ++; continue; } else if (ciprefix(".endc", line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (*line == 'e') { char *bool_ptr; if ((bool_ptr = strstr(line, "nand(")) != NULL || (bool_ptr = strstr(line, "and(")) != NULL || (bool_ptr = strstr(line, "nor(")) != NULL || (bool_ptr = strstr(line, "or(")) != NULL) { struct line *a_card, *model_card, *next_card; char *str_ptr1, *str_ptr2, keep, *comma_ptr, *xy_values1[5], *xy_values2[5]; char *node_str, *ctrl_node_str, *xy_str1, *model_name, *fcn_name; char big_buf[1000]; int xy_count1, xy_count2; str_ptr1 = skip_non_ws(line); model_name = copy_substring(line, str_ptr1); str_ptr1 = skip_ws(str_ptr1); str_ptr2 = skip_back_ws(bool_ptr); keep = *str_ptr2; *str_ptr2 = '\0'; node_str = strdup(str_ptr1); *str_ptr2 = keep; str_ptr1 = bool_ptr; while (*++str_ptr1 != '(') ; fcn_name = copy_substring(bool_ptr, str_ptr1); str_ptr1 = strchr(str_ptr1, ')'); comma_ptr = strchr(line, ','); if (!str_ptr1 || !comma_ptr) { fprintf(stderr, "ERROR: mal formed line: %s\n", line); controlled_exit(EXIT_FAILURE); } str_ptr1 = skip_ws(str_ptr1 + 1); xy_str1 = skip_back_ws(comma_ptr); if (xy_str1[-1] == '}') { while (*--xy_str1 != '{') ; } else { xy_str1 = skip_back_non_ws(xy_str1); } str_ptr2 = skip_back_ws(xy_str1); keep = *str_ptr2; *str_ptr2 = '\0'; ctrl_node_str = strdup(str_ptr1); *str_ptr2 = keep; str_ptr1 = skip_ws(comma_ptr + 1); if (*str_ptr1 == '{') { while (*str_ptr1++ != '}') ; } else { str_ptr1 = skip_non_ws(str_ptr1); } keep = *str_ptr1; *str_ptr1 = '\0'; xy_count1 = get_comma_separated_values(xy_values1, xy_str1); *str_ptr1 = keep; str_ptr1 = skip_ws(str_ptr1); xy_count2 = get_comma_separated_values(xy_values2, str_ptr1); // place restrictions on only having 2 point values; this can change later if (xy_count1 != 2 && xy_count2 != 2) fprintf(stderr, "ERROR: only expecting 2 pair values for multi-input vcvs!\n"); sprintf(big_buf, "%s %%vd[ %s ] %%vd( %s ) %s", model_name, ctrl_node_str, node_str, model_name); a_card = xx_new_line(NULL, copy(big_buf), *(line_number)++, 0); *a_card->li_line = 'a'; sprintf(big_buf, ".model %s multi_input_pwl ( x = [%s %s] y = [%s %s] model = \"%s\" )", model_name, xy_values1[0], xy_values2[0], xy_values1[1], xy_values2[1], fcn_name); model_card = xx_new_line(NULL, copy(big_buf), (*line_number)++, 0); tfree(model_name); tfree(node_str); tfree(fcn_name); tfree(ctrl_node_str); tfree(xy_values1[0]); tfree(xy_values1[1]); tfree(xy_values2[0]); tfree(xy_values2[1]); *c->li_line = '*'; next_card = c->li_next; c->li_next = a_card; a_card->li_next = model_card; model_card->li_next = next_card; } } } } static void inp_add_control_section(struct line *deck, int *line_number) { struct line *c, *prev_card = NULL; bool found_control = FALSE, found_run = FALSE; bool found_end = FALSE; char *op_line = NULL, rawfile[1000], *line; for (c = deck; c; c = c->li_next) { if (*c->li_line == '*') continue; if (ciprefix(".op ", c->li_line)) { *c->li_line = '*'; op_line = c->li_line + 1; } if (ciprefix(".end", c->li_line)) found_end = TRUE; if (found_control && ciprefix("run", c->li_line)) found_run = TRUE; if (ciprefix(".control", c->li_line)) found_control = TRUE; if (ciprefix(".endc", c->li_line)) { found_control = FALSE; if (!found_run) { prev_card->li_next = xx_new_line(c, copy("run"), (*line_number)++, 0); prev_card = prev_card->li_next; found_run = TRUE; } if (cp_getvar("rawfile", CP_STRING, rawfile)) { line = TMALLOC(char, strlen("write") + strlen(rawfile) + 2); sprintf(line, "write %s", rawfile); prev_card->li_next = xx_new_line(c, line, (*line_number)++, 0); prev_card = prev_card->li_next; } } prev_card = c; } // check if need to add control section if (!found_run && found_end) { deck->li_next = xx_new_line(deck->li_next, copy(".endc"), (*line_number)++, 0); if (cp_getvar("rawfile", CP_STRING, rawfile)) { line = TMALLOC(char, strlen("write") + strlen(rawfile) + 2); sprintf(line, "write %s", rawfile); deck->li_next = xx_new_line(deck->li_next, line, (*line_number)++, 0); } if (op_line) deck->li_next = xx_new_line(deck->li_next, copy(op_line), (*line_number)++, 0); deck->li_next = xx_new_line(deck->li_next, copy("run"), (*line_number)++, 0); deck->li_next = xx_new_line(deck->li_next, copy(".control"), (*line_number)++, 0); } } // look for shell-style end-of-line continuation '\\' static bool chk_for_line_continuation(char *line) { if (*line != '*' && *line != '$') { char *ptr = skip_back_ws_(strchr(line, '\0'), line); if ((ptr - 2 >= line) && (ptr[-1] == '\\') && (ptr[-2] == '\\')) { ptr[-1] = ' '; ptr[-2] = ' '; return TRUE; } } return FALSE; } // // change .macro --> .subckt // .eom --> .ends // .subckt name 1 2 3 params: w=9u l=180n --> .subckt name 1 2 3 w=9u l=180n // .subckt name (1 2 3) --> .subckt name 1 2 3 // x1 (1 2 3) --> x1 1 2 3 // .param func1(x,y) = {x*y} --> .func func1(x,y) {x*y} static void inp_fix_macro_param_func_paren_io(struct line *card) { char *str_ptr, *new_str; for (; card; card = card->li_next) { if (*card->li_line == '*') continue; if (ciprefix(".macro", card->li_line) || ciprefix(".eom", card->li_line)) { str_ptr = skip_non_ws(card->li_line); if (ciprefix(".macro", card->li_line)) { new_str = TMALLOC(char, strlen(".subckt") + strlen(str_ptr) + 1); sprintf(new_str, ".subckt%s", str_ptr); } else { new_str = TMALLOC(char, strlen(".ends") + strlen(str_ptr) + 1); sprintf(new_str, ".ends%s", str_ptr); } tfree(card->li_line); card->li_line = new_str; } if (ciprefix(".subckt", card->li_line) || ciprefix("x", card->li_line)) { /* remove () */ str_ptr = skip_non_ws(card->li_line); // skip over .subckt, instance name str_ptr = skip_ws(str_ptr); if (ciprefix(".subckt", card->li_line)) { str_ptr = skip_non_ws(str_ptr); // skip over subckt name str_ptr = skip_ws(str_ptr); } if (*str_ptr == '(') { *str_ptr = ' '; while (*str_ptr != '\0') { if (*str_ptr == ')') { *str_ptr = ' '; break; } str_ptr++; } card->li_line = inp_remove_ws(card->li_line); /* remove the extra white spaces just introduced */ } } if (ciprefix(".param", card->li_line)) { bool is_func = FALSE; str_ptr = skip_non_ws(card->li_line); // skip over .param str_ptr = skip_ws(str_ptr); while (!isspace(*str_ptr) && *str_ptr != '=') { if (*str_ptr == '(') is_func = TRUE; str_ptr++; } if (is_func) { str_ptr = strchr(card->li_line, '='); if (str_ptr) *str_ptr = ' '; str_ptr = card->li_line + 1; str_ptr[0] = 'f'; str_ptr[1] = 'u'; str_ptr[2] = 'n'; str_ptr[3] = 'c'; str_ptr[4] = ' '; } } } } static char * get_instance_subckt(char *line) { char *end_ptr, *inst_name_ptr; char *equal_ptr = strchr(line, '='); // see if instance has parameters if (equal_ptr) { end_ptr = skip_back_ws_(equal_ptr, line); end_ptr = skip_back_non_ws_(end_ptr, line); } else { end_ptr = strchr(line, '\0'); } end_ptr = skip_back_ws_(end_ptr, line); inst_name_ptr = skip_back_non_ws_(end_ptr, line); return copy_substring(inst_name_ptr, end_ptr); } static char* get_subckt_model_name(char *line) { char *name, *end_ptr; name = skip_non_ws(line); // eat .subckt|.model name = skip_ws(name); end_ptr = skip_non_ws(name); return copy_substring(name, end_ptr); } static char* get_model_name(char *line, int num_terminals) { char *beg_ptr, *end_ptr; int i = 0; beg_ptr = skip_non_ws(line); /* eat device name */ beg_ptr = skip_ws(beg_ptr); for (i = 0; i < num_terminals; i++) { /* skip the terminals */ beg_ptr = skip_non_ws(beg_ptr); beg_ptr = skip_ws(beg_ptr); } if (*line == 'r') /* special dealing for r models */ if ((*beg_ptr == '+') || (*beg_ptr == '-') || isdigit(*beg_ptr)) { /* looking for a value before model */ beg_ptr = skip_non_ws(beg_ptr); /* skip the value */ beg_ptr = skip_ws(beg_ptr); } end_ptr = skip_non_ws(beg_ptr); return copy_substring(beg_ptr, end_ptr); } static char* get_model_type(char *line) { char *beg_ptr; if (!ciprefix(".model", line)) return NULL; beg_ptr = skip_non_ws(line); /* eat .model */ beg_ptr = skip_ws(beg_ptr); beg_ptr = skip_non_ws(beg_ptr); /* eat model name */ beg_ptr = skip_ws(beg_ptr); return gettok(&beg_ptr); } static char * get_adevice_model_name(char *line) { char *ptr_end, *ptr_beg; ptr_end = skip_back_ws_(strchr(line, '\0'), line); ptr_beg = skip_back_non_ws_(ptr_end, line); return copy_substring(ptr_beg, ptr_end); } static void get_subckts_for_subckt(struct line *start_card, char *subckt_name, char *used_subckt_names[], int *num_used_subckt_names, char *used_model_names[], int *num_used_model_names, bool has_models) { struct line *card; char *curr_subckt_name, *inst_subckt_name, *model_name, *new_names[100]; bool found_subckt = FALSE, have_subckt = FALSE, found_model = FALSE; int i, num_terminals = 0, tmp_cnt = 0; for (card = start_card; card; card = card->li_next) { char *line = card->li_line; if (*line == '*') continue; if ((ciprefix(".ends", line) || ciprefix(".eom", line)) && found_subckt) break; if (ciprefix(".subckt", line) || ciprefix(".macro", line)) { curr_subckt_name = get_subckt_model_name(line); if (strcmp(curr_subckt_name, subckt_name) == 0) found_subckt = TRUE; tfree(curr_subckt_name); } if (found_subckt) { if (*line == 'x') { inst_subckt_name = get_instance_subckt(line); have_subckt = FALSE; for (i = 0; i < *num_used_subckt_names; i++) if (strcmp(used_subckt_names[i], inst_subckt_name) == 0) have_subckt = TRUE; if (!have_subckt) { new_names[tmp_cnt++] = used_subckt_names[*num_used_subckt_names] = inst_subckt_name; *num_used_subckt_names += 1; } else { tfree(inst_subckt_name); } } else if (*line == 'a') { model_name = get_adevice_model_name(line); found_model = FALSE; for (i = 0; i < *num_used_model_names; i++) if (strcmp(used_model_names[i], model_name) == 0) found_model = TRUE; if (!found_model) { used_model_names[*num_used_model_names] = model_name; *num_used_model_names += 1; } else { tfree(model_name); } } else if (has_models) { num_terminals = get_number_terminals(line); if (num_terminals != 0) { char *tmp_name, *tmp_name1; tmp_name1 = tmp_name = model_name = get_model_name(line, num_terminals); if (isalpha(*model_name) || /* first character is digit, second is alpha, third is digit, e.g. 1N4002 */ ((strlen(model_name) > 2) && isdigit(*tmp_name) && isalpha(*(++tmp_name)) && isdigit(*(++tmp_name))) || /* first character is is digit, second is alpha, third is alpha, fourth is digit e.g. 2SK456 */ ((strlen(model_name) > 3) && isdigit(*tmp_name1) && isalpha(*(++tmp_name1)) && isalpha(*(++tmp_name1)) && isdigit(*(++tmp_name1)))) { found_model = FALSE; for (i = 0; i < *num_used_model_names; i++) if (strcmp(used_model_names[i], model_name) == 0) found_model = TRUE; if (!found_model) { used_model_names[*num_used_model_names] = model_name; *num_used_model_names += 1; } else { tfree(model_name); } } else { tfree(model_name); } } } } } // now make recursive call on instances just found above for (i = 0; i < tmp_cnt; i++) get_subckts_for_subckt(start_card, new_names[i], used_subckt_names, num_used_subckt_names, used_model_names, num_used_model_names, has_models); } /* check if current token matches model bin name -- .[0-9]+ */ static bool model_bin_match(char *token, char *model_name) { char *dot_char; bool flag = FALSE; if (strncmp(model_name, token, strlen(token)) == 0) if ((dot_char = strchr(model_name, '.')) != NULL) { flag = TRUE; dot_char++; while (*dot_char != '\0') { if (!isdigit(*dot_char)) { flag = FALSE; break; } dot_char++; } } return flag; } /* iterate through the deck and comment out unused subckts, models (don't want to waste time processing everything) also comment out .param lines with no parameters defined */ static void comment_out_unused_subckt_models(struct line *start_card, int no_of_lines) { struct line *card; char **used_subckt_names, **used_model_names, *subckt_name, *model_name; int num_used_subckt_names = 0, num_used_model_names = 0, i = 0, num_terminals = 0, tmp_cnt = 0; bool processing_subckt = FALSE, found_subckt = FALSE, remove_subckt = FALSE, found_model = FALSE, has_models = FALSE; int skip_control = 0, nested_subckt = 0; /* generate arrays of *char for subckt or model names. Start with 1000, but increase, if number of lines in deck is larger */ if (no_of_lines < 1000) no_of_lines = 1000; used_subckt_names = TMALLOC(char*, no_of_lines); used_model_names = TMALLOC(char*, no_of_lines); for (card = start_card; card; card = card->li_next) { if (ciprefix(".model", card->li_line)) has_models = TRUE; if (ciprefix(".cmodel", card->li_line)) has_models = TRUE; if (ciprefix(".param", card->li_line) && !strchr(card->li_line, '=')) *card->li_line = '*'; } for (card = start_card; card; card = card->li_next) { char *line = card->li_line; if (*line == '*') continue; /* there is no .subckt, .model or .param inside .control ... .endc */ if (ciprefix(".control", line)) { skip_control ++; continue; } else if (ciprefix(".endc", line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (ciprefix(".subckt", line) || ciprefix(".macro", line)) processing_subckt = TRUE; if (ciprefix(".ends", line) || ciprefix(".eom", line)) processing_subckt = FALSE; if (!processing_subckt) { if (*line == 'x') { subckt_name = get_instance_subckt(line); found_subckt = FALSE; for (i = 0; i < num_used_subckt_names; i++) if (strcmp(used_subckt_names[i], subckt_name) == 0) found_subckt = TRUE; if (!found_subckt) { used_subckt_names[num_used_subckt_names++] = subckt_name; tmp_cnt++; } else { tfree(subckt_name); } } else if (*line == 'a') { model_name = get_adevice_model_name(line); found_model = FALSE; for (i = 0; i < num_used_model_names; i++) if (strcmp(used_model_names[i], model_name) == 0) found_model = TRUE; if (!found_model) used_model_names[num_used_model_names++] = model_name; else tfree(model_name); } else if (has_models) { /* This is a preliminary version, until we have found a reliable method to detect the model name out of the input line (Many options have to be taken into account.). */ num_terminals = get_number_terminals(line); if (num_terminals != 0) { bool model_ok = FALSE; char *tmp_name, *tmp_name1; tmp_name = tmp_name1 = model_name = get_model_name(line, num_terminals); /* first character of model name is character from alphabet */ if (isalpha(*model_name)) model_ok = TRUE; /* first character is digit, second is alpha, third is digit, e.g. 1N4002 */ else if ((strlen(model_name) > 2) && isdigit(*tmp_name) && isalpha(*(++tmp_name)) && isdigit(*(++tmp_name))) model_ok = TRUE; /* first character is is digit, second is alpha, third is alpha, fourth is digit e.g. 2SK456 */ else if ((strlen(model_name) > 3) && isdigit(*tmp_name1) && isalpha(*(++tmp_name1)) && isalpha(*(++tmp_name1)) && isdigit(*(++tmp_name1))) model_ok = TRUE; /* Check if model has already been recognized, if not, add its name to list used_model_names[i] */ if (model_ok) { found_model = FALSE; for (i = 0; i < num_used_model_names; i++) if (strcmp(used_model_names[i], model_name) == 0) found_model = TRUE; if (!found_model) used_model_names[num_used_model_names++] = model_name; else tfree(model_name); } else { tfree(model_name); } } } /* if (has_models) */ } /* if (!processing_subckt) */ } /* for loop through all cards */ for (i = 0; i < tmp_cnt; i++) get_subckts_for_subckt (start_card, used_subckt_names[i], used_subckt_names, &num_used_subckt_names, used_model_names, &num_used_model_names, has_models); /* comment out any unused subckts, currently only at top level */ for (card = start_card; card; card = card->li_next) { char *line = card->li_line; if (*line == '*') continue; if (ciprefix(".subckt", line) || ciprefix(".macro", line)) { nested_subckt++; subckt_name = get_subckt_model_name(line); if (nested_subckt == 1) { /* check if unused, only at top level */ remove_subckt = TRUE; for (i = 0; i < num_used_subckt_names; i++) if (strcmp(used_subckt_names[i], subckt_name) == 0) remove_subckt = FALSE; } tfree(subckt_name); } if (ciprefix(".ends", line) || ciprefix(".eom", line)) { nested_subckt--; if (remove_subckt) *line = '*'; if (nested_subckt == 0) remove_subckt = FALSE; } if (remove_subckt) *line = '*'; else if (has_models && (ciprefix(".model", line) || ciprefix(".cmodel", line))) { char *model_type = get_model_type(line); model_name = get_subckt_model_name(line); /* keep R, L, C models because in addition to no. of terminals the value may be given, as in RE1 1 2 800 newres dtemp=5, so model name may be token no. 4 or 5, and, if 5, will not be detected by get_subckt_model_name()*/ if (cieq(model_type, "c") || cieq(model_type, "l") || cieq(model_type, "r")) { found_model = TRUE; } else { found_model = FALSE; for (i = 0; i < num_used_model_names; i++) if (strcmp(used_model_names[i], model_name) == 0 || model_bin_match(used_model_names[i], model_name)) found_model = TRUE; } tfree(model_type); if (!found_model) *line = '*'; tfree(model_name); } } for (i = 0; i < num_used_subckt_names; i++) tfree(used_subckt_names[i]); for (i = 0; i < num_used_model_names; i++) tfree(used_model_names[i]); tfree(used_subckt_names); tfree(used_model_names); } #if 0 // find closing paren static char * inp_search_closing_paren(char *s) { int count = 0; // assert(*s == '(') while (*s) { if (*s == '(') count++; if (*s == ')') count--; if (count == 0) return s + 1; s++; } return NULL; } #endif #if 0 /* search backwards for opening paren */ static char * inp_search_opening_paren(char *s, char *start) { int count = 0; // assert(*s == ')') while (s >= start) { if (*s == '(') count--; if (*s == ')') count++; if (count == 0) return s; s--; } return NULL; } #endif /*-------------------------------------------------------------------------* removes " " quotes, returns lower case letters, replaces non-printable characterss with '_' * *-------------------------------------------------------------------------*/ void inp_casefix(char *string) { #ifdef HAVE_CTYPE_H if (string) while (*string) { #ifdef HAS_ASCII /* ((*string) & 0177): mask off all but the first seven bits, 0177: octal */ *string = (char) strip(*string); #endif if (*string == '"') { *string++ = ' '; while (*string && *string != '"') string++; if (*string == '\0') continue; /* needed if string is "something ! */ if (*string == '"') *string = ' '; } if (!isspace(*string) && !isprint(*string)) *string = '_'; if (isupper(*string)) *string = (char) tolower(*string); string++; } #endif } /* Strip all end-of-line comments from a deck For cf == TRUE (script files, command files like spinit, .spiceinit) and for .control sections only '$ ' is accepted as end-of-line comment, to avoid conflict with $variable definition, otherwise we accept '$'. */ static void inp_stripcomments_deck(struct line *c, bool cf) { bool found_control = FALSE; for (; c; c = c->li_next) { /* exclude lines between .control and .endc from removing white spaces */ if (ciprefix(".control", c->li_line)) found_control = TRUE; if (ciprefix(".endc", c->li_line)) found_control = FALSE; inp_stripcomments_line(c->li_line, found_control|cf); } } /* * Support for end-of-line comments that begin with any of the following: * ';' * '$' (only outside of a .control section) * '$ ' * '//' (like in c++ and as per the numparam code) * Any following text to the end of the line is ignored. * Note requirement for $ to be followed by a space, if we are inside of a * .control section or in a command file. This is to avoid conflict * with use of $ in front of a variable. * Comments on a continuation line (i.e. line begining with '+') are allowed * and are removed before lines are stitched. * Lines that contain only an end-of-line comment with or without leading white * space are also allowed. If there is only white space before the end-of-line comment the the whole line is converted to a normal comment line (i.e. one that begins with a '*'). BUG: comment characters in side of string literals are not ignored ('$' outside of .control section is o.k. however). */ static void inp_stripcomments_line(char *s, bool cs) { char c = ' '; /* anything other than a comment character */ char *d = s; if (*s == '\0') return; /* empty line */ if (*s == '*') return; /* line is already a comment */ /* look for comments */ while ((c = *d) != '\0') { d++; if (*d == ';') { break; } else if (!cs && (c == '$')) { /* outside of .control section */ /* The character before '&' has to be ',' or ' ' or tab. A valid numerical expression directly before '$' is not yet supported. */ if ((d - 2 >= s) && ((d[-2] == ' ') || (d[-2] == ',') || (d[-2] == '\t'))) { d--; break; } } else if (cs && (c == '$') && (*d == ' ')) {/* inside of .control section or command file */ d--; /* move d back to first comment character */ break; } else if ((c == '/') && (*d == '/')) { d--; /* move d back to first comment character */ break; } } /* d now points to the first comment character or the null at the string end */ /* check for special case of comment at start of line */ if (d == s) { *s = '*'; /* turn into normal comment */ return; } if (d > s) { d--; /* d now points to character just before comment */ /* eat white space at new end of line */ while (d >= s) { if ((*d != ' ') && (*d != '\t')) break; d--; } d++; /* d now points to the first white space character before the end-of-line or end-of-line comment, or it points to the first end-of-line comment character, or to the begining of the line */ } /* Check for special case of comment at start of line with or without preceeding white space */ if (d <= s) { *s = '*'; /* turn the whole line into normal comment */ return; } *d = '\0'; /* terminate line in new location */ } static void inp_change_quotes(char *s) { bool first_quote = FALSE; for (; *s; s++) if (*s == '\'') { if (first_quote == FALSE) { *s = '{'; first_quote = TRUE; } else { *s = '}'; first_quote = FALSE; } } } static void add_name(struct names *p, char *name) { if (p->num_names >= N_SUBCKT_W_PARAMS) { fprintf(stderr, "ERROR, N_SUBCKT_W_PARMS overflow\n"); controlled_exit(EXIT_FAILURE); } p->names[p->num_names++] = name; } static char ** find_name(struct names *p, char *name) { int i; for (i = 0; i < p->num_names; i++) if (strcmp(p->names[i], name) == 0) return & p->names[i]; return NULL; } static char* inp_fix_subckt(struct names *subckt_w_params, char *s) { struct line *head = NULL, *start_card = NULL, *end_card = NULL, *prev_card = NULL, *c = NULL; char *equal, *beg, *buffer, *ptr1, *ptr2, *new_str = NULL; char keep; int num_params = 0, i = 0, bracedepth = 0; /* find first '=' */ equal = strchr(s, '='); if (!strstr(s, "params:") && equal != NULL) { /* get subckt name (ptr1 will point to name) */ ptr1 = skip_non_ws(s); ptr1 = skip_ws(ptr1); for (ptr2 = ptr1; *ptr2 && !isspace(*ptr2) && !isquote(*ptr2); ptr2++) ; add_name(subckt_w_params, copy_substring(ptr1, ptr2)); /* go to beginning of first parameter word */ /* s will contain only subckt definition */ /* beg will point to start of param list */ beg = skip_back_ws_(equal, s); beg = skip_back_non_ws_(beg, s); beg[-1] = '\0'; /* fixme can be < s */ head = xx_new_line(NULL, NULL, 0, 0); /* create list of parameters that need to get sorted */ while (*beg && (ptr1 = strchr(beg, '=')) != NULL) { #ifndef NOBRACE /* alternative patch to cope with spaces: get expression between braces {...} */ ptr2 = skip_ws(ptr1 + 1); ptr1 = skip_back_ws_(ptr1, beg); ptr1 = skip_back_non_ws_(ptr1, beg); /* ptr1 points to beginning of parameter */ /* if parameter is an expression and starts with '{', find closing '}' Braces maybe nested (will they ever be ?). */ if (*ptr2 == '{') { bracedepth = 1; while (bracedepth > 0) { ptr2++; if (*ptr2 == '{') bracedepth++; else if (*ptr2 == '}') bracedepth--; else if (*ptr2 == '\0') { fprintf(stderr, "Error: Missing } in line %s\n", s); controlled_exit(EXIT_FAILURE); } } ptr2++;/* ptr2 points past end of parameter {...} */ } else /* take only the next token (separated by space) as the parameter */ ptr2 = skip_non_ws(ptr2); /* ptr2 points past end of parameter */ keep = *ptr2; if (keep == '\0') { /* End of string - don't go over end. */ beg = ptr2; } else { *ptr2 = '\0'; beg = ptr2 + 1; } end_card = xx_new_line(NULL, strdup(ptr1), 0, 0); if (start_card == NULL) head->li_next = start_card = end_card; else prev_card->li_next = end_card; prev_card = end_card; num_params++; #else /* patch provided by Ivan Riis Nielsen */ bool done = FALSE; int buf_len = 32, buf_idx = 0; char *buf = TMALLOC(char, buf_len), *p1 = beg, *p2 = beg; while (!done) { while (*p2 && !isspace(*p2)) { if (buf_idx >= buf_len) { buf_len *= 2; buf = TREALLOC(char, buf, buf_len); } buf[buf_idx++] = *(p2++); } p1 = skip_ws(p2); if (*p1 == '\0' || !(strchr("+-*/<>=(!,{", p2[-1]) || strchr("+-*/<>=()!,}", *p1))) { if (buf_idx >= buf_len) { buf_len *= 2; buf = TREALLOC(char, buf, buf_len); } buf[buf_idx++] = '\0'; beg = p1; end_card = xx_new_line(NULL, buf, 0, 0); if (start_card == NULL) head->li_next = start_card = end_card; else prev_card->li_next = end_card; prev_card = end_card; num_params++; done = TRUE; } else p2 = p1; } #endif } /* now sort parameters in order of dependencies */ inp_sort_params(start_card, end_card, head, start_card, end_card); /* create new ordered parameter string for subckt call */ c = head->li_next; tfree(head); for (i = 0; i < num_params && c != NULL; i++) { if (new_str == NULL) { new_str = strdup(c->li_line); } else { char *x = TMALLOC(char, strlen(new_str) + strlen(c->li_line) + 2); sprintf(x, "%s %s", new_str, c->li_line); tfree(new_str); new_str = x; } tfree(c->li_line); head = c; c = c->li_next; tfree(head); } /* create buffer and insert params: */ buffer = TMALLOC(char, strlen(s) + 9 + strlen(new_str) + 1); sprintf(buffer, "%s params: %s", s, new_str); tfree(s); tfree(new_str); s = buffer; } return s; } static char* inp_remove_ws(char *s) { char *big_buff; int big_buff_index = 0; char *buffer, *curr; bool is_expression = FALSE; big_buff = TMALLOC(char, strlen(s) + 2); curr = s; while (*curr != '\0') { if (*curr == '{') is_expression = TRUE; if (*curr == '}') is_expression = FALSE; big_buff[big_buff_index++] = *curr; if (*curr == '=' || (is_expression && (is_arith_char(*curr) || *curr == ','))) { curr = skip_ws(curr + 1); if (*curr == '{') is_expression = TRUE; if (*curr == '}') is_expression = FALSE; big_buff[big_buff_index++] = *curr; } if (*curr != '\0') curr++; if (isspace(*curr)) { curr = skip_ws(curr); if (is_expression) { if (*curr != '=' && !is_arith_char(*curr) && *curr != ',') big_buff[big_buff_index++] = ' '; } else { if (*curr != '=') big_buff[big_buff_index++] = ' '; } } } big_buff[big_buff_index] = '\0'; buffer = copy(big_buff); tfree(s); tfree(big_buff); return buffer; } /* change quotes from '' to {} .subckt name 1 2 3 params: l=1 w=2 --> .subckt name 1 2 3 l=1 w=2 x1 1 2 3 params: l=1 w=2 --> x1 1 2 3 l=1 w=2 modify .subckt lines by calling inp_fix_subckt() No changes to lines in .control section ! */ static void inp_fix_for_numparam(struct names *subckt_w_params, struct line *c) { bool found_control = FALSE; for (; c; c = c->li_next) { if (*(c->li_line) == '*' || ciprefix(".lib", c->li_line)) continue; /* exclude lines between .control and .endc from getting quotes changed */ if (ciprefix(".control", c->li_line)) found_control = TRUE; if (ciprefix(".endc", c->li_line)) found_control = FALSE; if (found_control) continue; inp_change_quotes(c->li_line); if ((inp_compat_mode == COMPATMODE_ALL) || (inp_compat_mode == COMPATMODE_PS)) if (ciprefix(".subckt", c->li_line) || ciprefix("x", c->li_line)) { /* remove params: */ char *str_ptr = strstr(c->li_line, "params:"); if (str_ptr) memcpy(str_ptr, " ", 7); } if (ciprefix(".subckt", c->li_line)) c->li_line = inp_fix_subckt(subckt_w_params, c->li_line); } } static void inp_remove_excess_ws(struct line *c) { bool found_control = FALSE; for (; c; c = c->li_next) { if (*c->li_line == '*') continue; /* exclude echo lines between .control and .endc from removing white spaces */ if (ciprefix(".control", c->li_line)) found_control = TRUE; if (ciprefix(".endc", c->li_line)) found_control = FALSE; if (found_control && ciprefix("echo", c->li_line)) continue; c->li_line = inp_remove_ws(c->li_line); /* freed in fcn */ } } static struct line * expand_section_ref(struct line *c, char *dir_name) { char *line = c->li_line; char *s, *t, *y; s = skip_non_ws(line); while (isspace(*s) || isquote(*s)) s++; for (t = s; *t && !isspace(*t) && !isquote(*t); t++) ; y = t; while (isspace(*y) || isquote(*y)) y++; if (*y) { /* library section reference: `.lib ' */ struct line *section_def; char keep_char1, keep_char2; char *z; struct library *lib; for (z = y; *z && !isspace(*z) && !isquote(*z); z++) ; keep_char1 = *t; keep_char2 = *z; *t = '\0'; *z = '\0'; lib = read_a_lib(s, dir_name); if (!lib) { fprintf(stderr, "ERROR, library file %s not found\n", s); controlled_exit(EXIT_FAILURE); } section_def = find_section_definition(lib->deck, y); if (!section_def) { fprintf(stderr, "ERROR, library file %s, section definition %s not found\n", s, y); controlled_exit(EXIT_FAILURE); } /* recursively expand the refered section itself */ { struct line *t = section_def; for (; t; t = t->li_next) { if (ciprefix(".endl", t->li_line)) break; if (ciprefix(".lib", t->li_line)) t = expand_section_ref(t, lib->habitat); } if (!t) { fprintf(stderr, "ERROR, .endl not found\n"); controlled_exit(EXIT_FAILURE); } } /* insert the library section definition into `c' */ { struct line *cend = NULL, *newl; struct line *rest = c->li_next; struct line *t = section_def; for (; t; t=t->li_next) { newl = xx_new_line(NULL, copy(t->li_line), t->li_linenum, t->li_linenum_orig); if (cend) cend->li_next = newl; else { c->li_next = newl; newl->li_line[0] = '*'; newl->li_line[1] = '<'; } cend = newl; if(ciprefix(".endl", t->li_line)) break; } if (!t) { fprintf(stderr, "ERROR, .endl not found\n"); controlled_exit(EXIT_FAILURE); } cend->li_line[0] = '*'; cend->li_line[1] = '>'; cend->li_next = rest; c = cend; } *line = '*'; /* comment out .lib line */ *t = keep_char1; *z = keep_char2; } return c; } /* * recursively expand library section references, * either * every library section reference (when the given section_name_ === NULL) * or * just those references occuring in the given library section definition */ static void expand_section_references(struct line *c, char *dir_name) { for (; c; c = c->li_next) if (ciprefix(".lib", c->li_line)) c = expand_section_ref(c, dir_name); } static char* inp_get_subckt_name(char *s) { char *subckt_name, *end_ptr = strchr(s, '='); if (end_ptr) { end_ptr = skip_back_ws_(end_ptr, s); end_ptr = skip_back_non_ws_(end_ptr, s); } else { end_ptr = strchr(s, '\0'); } end_ptr = skip_back_ws_(end_ptr, s); subckt_name = skip_back_non_ws_(end_ptr, s); return copy_substring(subckt_name, end_ptr); } static int inp_get_params(char *line, char *param_names[], char *param_values[]) { char *equal_ptr = strchr(line, '='); char *end, *name, *value; int num_params = 0; char tmp_str[1000]; char keep; bool is_expression = FALSE; while ((equal_ptr = find_assignment(line)) != NULL) { is_expression = FALSE; /* get parameter name */ end = skip_back_ws_(equal_ptr, line); name = skip_back_non_ws_(end, line); param_names[num_params++] = copy_substring(name, end); /* get parameter value */ value = skip_ws(equal_ptr + 1); if (*value == '{') is_expression = TRUE; end = value; if (is_expression) while (*end && *end != '}') end++; else end = skip_non_ws(end); if (is_expression) end++; keep = *end; *end = '\0'; if (*value != '{' && !(isdigit(*value) || (*value == '.' && isdigit(value[1])))) { sprintf(tmp_str, "{%s}", value); value = tmp_str; } param_values[num_params-1] = strdup(value); *end = keep; line = end; } return num_params; } static char* inp_fix_inst_line(char *inst_line, int num_subckt_params, char *subckt_param_names[], char *subckt_param_values[], int num_inst_params, char *inst_param_names[], char *inst_param_values[]) { char *end, *inst_name, *inst_name_end; char *curr_line = inst_line, *new_line = NULL; int i, j; inst_name_end = skip_non_ws(inst_line); inst_name = copy_substring(inst_line, inst_name_end); end = strchr(inst_line, '='); if (end) { end = skip_back_ws_(end, inst_line); end = skip_back_non_ws_(end, inst_line); end[-1] = '\0'; /* fixme can be < inst_line */ } for (i = 0; i < num_subckt_params; i++) for (j = 0; j < num_inst_params; j++) if (strcmp(subckt_param_names[i], inst_param_names[j]) == 0) { tfree(subckt_param_values[i]); subckt_param_values[i] = strdup(inst_param_values[j]); } for (i = 0; i < num_subckt_params; i++) { new_line = TMALLOC(char, strlen(curr_line) + strlen(subckt_param_values[i]) + 2); sprintf(new_line, "%s %s", curr_line, subckt_param_values[i]); tfree(curr_line); tfree(subckt_param_names[i]); tfree(subckt_param_values[i]); curr_line = new_line; } for (i = 0; i < num_inst_params; i++) { tfree(inst_param_names[i]); tfree(inst_param_values[i]); } tfree(inst_name); return curr_line; } /* If multiplier parameter 'm' is found on a X line, flag is set to TRUE. Function is called from inp_fix_inst_calls_for_numparam() */ static bool found_mult_param(int num_params, char *param_names[]) { int i; for (i = 0; i < num_params; i++) if (strcmp(param_names[i], "m") == 0) return TRUE; return FALSE; } /* If a subcircuit invocation (X-line) is found, which contains the multiplier parameter 'm', m is added to all lines inside the corresponding subcircuit except of some excluded in the code below (FIXME: It may be necessary to exclude more of them, at least for all devices that are not supporting the 'm' parameter). Function is called from inp_fix_inst_calls_for_numparam() */ static int inp_fix_subckt_multiplier(struct names *subckt_w_params, struct line *subckt_card, int num_subckt_params, char *subckt_param_names[], char *subckt_param_values[]) { struct line *card; char *new_str; subckt_param_names[num_subckt_params] = strdup("m"); subckt_param_values[num_subckt_params] = strdup("1"); num_subckt_params ++; if (!strstr(subckt_card->li_line, "params:")) { new_str = TMALLOC(char, strlen(subckt_card->li_line) + 13); sprintf(new_str, "%s params: m=1", subckt_card->li_line); add_name(subckt_w_params, get_subckt_model_name(subckt_card->li_line)); } else { new_str = TMALLOC(char, strlen(subckt_card->li_line) + 5); sprintf(new_str, "%s m=1", subckt_card->li_line); } tfree(subckt_card->li_line); subckt_card->li_line = new_str; for (card = subckt_card->li_next; card && !ciprefix(".ends", card->li_line); card = card->li_next) { /* no 'm' for B, V, E, H or comment line */ if ((*(card->li_line) == '*') || (*(card->li_line) == 'b') || (*(card->li_line) == 'v') || (*(card->li_line) == 'e') || (*(card->li_line) == 'h')) continue; /* no 'm' for model cards */ if (ciprefix(".model", card->li_line)) continue; new_str = TMALLOC(char, strlen(card->li_line) + 7); sprintf(new_str, "%s m={m}", card->li_line); tfree(card->li_line); card->li_line = new_str; } return num_subckt_params; } static void inp_fix_inst_calls_for_numparam(struct names *subckt_w_params, struct line *deck) { struct line *c; struct line *d, *p = NULL; char *subckt_name; char *subckt_param_names[1000]; char *subckt_param_values[1000]; char *inst_param_names[1000]; char *inst_param_values[1000]; char name_w_space[1000]; int num_subckt_params = 0; int num_inst_params = 0; int i, j, k; bool flag = FALSE; bool found_subckt = FALSE; bool found_param_match = FALSE; // first iterate through instances and find occurences where 'm' multiplier needs to be // added to the subcircuit -- subsequent instances will then need this parameter as well for (c = deck; c; c = c->li_next) { char *inst_line = c->li_line; if (*inst_line == '*') continue; if (ciprefix("x", inst_line)) { num_inst_params = inp_get_params(inst_line, inst_param_names, inst_param_values); subckt_name = inp_get_subckt_name(inst_line); if (found_mult_param(num_inst_params, inst_param_names)) { flag = FALSE; // iterate through the deck to find the subckt (last one defined wins) for (d = deck; d; d = d->li_next) { char *subckt_line = d->li_line; if (ciprefix(".subckt", subckt_line)) { subckt_line = skip_non_ws(subckt_line); subckt_line = skip_ws(subckt_line); sprintf(name_w_space, "%s ", subckt_name); if (strncmp(subckt_line, name_w_space, strlen(name_w_space)) == 0) { p = d; flag = TRUE; } } } if (flag) { num_subckt_params = inp_get_params(p->li_line, subckt_param_names, subckt_param_values); if (num_subckt_params == 0 || !found_mult_param(num_subckt_params, subckt_param_names)) inp_fix_subckt_multiplier(subckt_w_params, p, num_subckt_params, subckt_param_names, subckt_param_values); } } tfree(subckt_name); if (flag) for (i = 0; i < num_subckt_params; i++) { tfree(subckt_param_names[i]); tfree(subckt_param_values[i]); } for (i = 0; i < num_inst_params; i++) { tfree(inst_param_names[i]); tfree(inst_param_values[i]); } } } for (c = deck; c; c = c->li_next) { char *inst_line = c->li_line; if (*inst_line == '*') continue; if (ciprefix("x", inst_line)) { subckt_name = inp_get_subckt_name(inst_line); if (find_name(subckt_w_params, subckt_name)) { sprintf(name_w_space, "%s ", subckt_name); /* find .subckt line */ found_subckt = FALSE; d = deck; while (d != NULL) { char *subckt_line = d->li_line; if (ciprefix(".subckt", subckt_line)) { subckt_line = skip_non_ws(subckt_line); subckt_line = skip_ws(subckt_line); if (strncmp(subckt_line, name_w_space, strlen(name_w_space)) == 0) { num_subckt_params = inp_get_params(subckt_line, subckt_param_names, subckt_param_values); num_inst_params = inp_get_params(inst_line, inst_param_names, inst_param_values); // make sure that if have inst params that one matches subckt found_param_match = FALSE; if (num_inst_params == 0) { found_param_match = TRUE; } else { for (j = 0; j < num_inst_params; j++) { for (k = 0; k < num_subckt_params; k++) if (strcmp(subckt_param_names[k], inst_param_names[j]) == 0) { found_param_match = TRUE; break; } if (found_param_match) break; } } if (!found_param_match) { // comment out .subckt and continue while (d != NULL && !ciprefix(".ends", d->li_line)) { *(d->li_line) = '*'; d = d->li_next; } *(d->li_line) = '*'; d = d->li_next; continue; } c->li_line = inp_fix_inst_line(inst_line, num_subckt_params, subckt_param_names, subckt_param_values, num_inst_params, inst_param_names, inst_param_values); found_subckt = TRUE; for (i = 0; i < num_subckt_params; i++) { tfree(subckt_param_names[i]); tfree(subckt_param_values[i]); } for (i = 0; i < num_inst_params; i++) { tfree(inst_param_names[i]); tfree(inst_param_values[i]); } } } if (found_subckt) break; d = d->li_next; } } tfree(subckt_name); } } } static struct function * new_function(struct function_env *env, char *name) { struct function *f = TMALLOC(struct function, 1); f -> name = name; f -> num_parameters = 0; f -> next = env->functions; env -> functions = f; return f; } static struct function * find_function(struct function_env *env, char *name) { struct function *f; for (; env; env = env->up) for (f = env->functions; f; f = f->next) if (strcmp(f->name, name) == 0) return f; return NULL; } static void free_function(struct function *fcn) { int i; tfree(fcn->name); tfree(fcn->macro); for (i = 0; i < fcn->num_parameters; i++) tfree(fcn->params[i]); } static void new_function_parameter(struct function *fcn, char *parameter) { if (fcn->num_parameters >= N_PARAMS) { fprintf(stderr, "ERROR, N_PARAMS overflow\n"); controlled_exit(EXIT_FAILURE); } fcn->params[fcn->num_parameters++] = parameter; } static void inp_get_func_from_line(struct function_env *env, char *line) { char *end; char temp_buf[5000]; int str_len = 0; struct function *function; /* skip `.func' */ line = skip_non_ws(line); line = skip_ws(line); /* get function name */ end = line; while (*end && !isspace(*end) && *end != '(') end++; function = new_function(env, copy_substring(line, end)); while (*end && *end != '(') end++; /* get function parameters */ while (*end && *end != ')') { char *beg = skip_ws(end + 1); end = beg; while (*end && !isspace(*end) && *end != ',' && *end != ')') end++; if (end > beg) new_function_parameter(function, copy_substring(beg, end)); } /* skip to the beinning of the function body */ while (*end && *end++ != '{') ; /* get function body */ str_len = 0; while (*end && *end != '}') { if (!isspace(*end)) temp_buf[str_len++] = *end; end++; } temp_buf[str_len++] = '\0'; function->macro = strdup(temp_buf); } /* * grab functions at the current .subckt nesting level */ static void inp_grab_func(struct function_env *env, struct line *c) { int nesting = 0; for (; c; c = c->li_next) { if (*c->li_line == '*') continue; if (ciprefix(".subckt", c->li_line)) nesting++; if (ciprefix(".ends", c->li_line)) nesting--; if (nesting < 0) break; if (nesting > 0) continue; if (ciprefix(".func", c->li_line)) { inp_get_func_from_line(env, c->li_line); *c->li_line = '*'; } } } static char* inp_do_macro_param_replace(struct function *fcn, char *params[]) { char *param_ptr, *curr_ptr, *new_str, *curr_str = NULL, *search_ptr; char keep, before, after; int i; if (fcn->num_parameters == 0) return strdup(fcn->macro); for (i = 0; i < fcn->num_parameters; i++) { if (curr_str == NULL) { search_ptr = curr_ptr = strdup(fcn->macro); } else { search_ptr = curr_ptr = curr_str; curr_str = NULL; } while ((param_ptr = strstr(search_ptr, fcn->params[i])) != NULL) { char *op_ptr = NULL, *cp_ptr = NULL; int is_vi = 0; /* make sure actually have the parameter name */ if (param_ptr == search_ptr) /* no valid 'before' */ before = '\0'; else before = *(param_ptr-1); after = param_ptr [ strlen(fcn->params[i]) ]; if (!(is_arith_char(before) || isspace(before) || before == ',' || before == '=' || (param_ptr-1) < curr_ptr) || !(is_arith_char(after) || isspace(after) || after == ',' || after == '=' || after == '\0')) { search_ptr = param_ptr + 1; continue; } /* exclude v(nn, parameter), v(parameter, nn), v(parameter), and i(parameter) if here 'parameter' is also a node name */ if (before != '\0') { /* go backwards from 'parameter' and find '(' */ for (op_ptr = param_ptr-1; op_ptr > curr_ptr; op_ptr--) { if (*op_ptr == ')') { is_vi = 0; break; } if ((*op_ptr == '(') && (op_ptr - 2 > curr_ptr) && ((*(op_ptr - 1) == 'v') || (*(op_ptr - 1) == 'i')) && (is_arith_char(*(op_ptr - 2)) || isspace(*(op_ptr - 2)) || *(op_ptr - 2) == ',' || *(op_ptr - 2) == '=' )) { is_vi = 1; break; } } /* We have a true v( or i( */ if (is_vi) { cp_ptr = param_ptr; /* go forward and find closing ')' */ while (*cp_ptr) { cp_ptr++; if (*cp_ptr == '(') { is_vi = 0; break; } if (*cp_ptr == ')') break; } if (*cp_ptr == '\0') is_vi = 0; } /* We have a true v(...) or i(...), so skip it, and continue searching for new 'parameter' */ if (is_vi) { search_ptr = cp_ptr; continue; } } keep = *param_ptr; *param_ptr = '\0'; { size_t curr_str_len = curr_str ? strlen(curr_str) : 0; size_t len = strlen(curr_ptr) + strlen(params[i]) + 1; if (str_has_arith_char(params[i])) { curr_str = TREALLOC(char, curr_str, curr_str_len + len + 2); sprintf(curr_str + curr_str_len, "%s(%s)", curr_ptr, params[i]); } else { curr_str = TREALLOC(char, curr_str, curr_str_len + len); sprintf(curr_str + curr_str_len, "%s%s", curr_ptr, params[i]); } } *param_ptr = keep; search_ptr = curr_ptr = param_ptr + strlen(fcn->params[i]); } if (param_ptr == NULL) { if (curr_str == NULL) { curr_str = curr_ptr; } else { new_str = TMALLOC(char, strlen(curr_str) + strlen(curr_ptr) + 1); sprintf(new_str, "%s%s", curr_str, curr_ptr); tfree(curr_str); curr_str = new_str; } } } return curr_str; } static char* inp_expand_macro_in_str(struct function_env *env, char *str) { struct function *function; char *c; char *open_paren_ptr, *close_paren_ptr, *fcn_name, *params[1000]; char *curr_ptr, *macro_str, *curr_str = NULL; int num_parens, num_params; char *orig_ptr = str, *search_ptr = str, *orig_str = strdup(str); char keep; // printf("%s: enter(\"%s\")\n", __FUNCTION__, str); while ((open_paren_ptr = strchr(search_ptr, '(')) != NULL) { fcn_name = open_paren_ptr; while (--fcn_name >= search_ptr) /* function name consists of numbers, letters and special characters (VALIDCHARS) */ if (!isalnum(*fcn_name) && !strchr(VALIDCHARS, *fcn_name)) break; fcn_name++; search_ptr = open_paren_ptr + 1; if (open_paren_ptr == fcn_name) continue; *open_paren_ptr = '\0'; function = find_function(env, fcn_name); *open_paren_ptr = '('; if (!function) continue; /* find the closing paren */ num_parens = 1; for (c = open_paren_ptr + 1; *c; c++) { if (*c == '(') num_parens++; if (*c == ')' && --num_parens == 0) break; } if (num_parens) { fprintf(stderr, "ERROR: did not find closing parenthesis for function call in str: %s\n", orig_str); controlled_exit(EXIT_FAILURE); } close_paren_ptr = c; /* * if (ciprefix("v(", curr_ptr)) { * // look for any commas and change to ' ' * char *str_ptr = curr_ptr; * while (*str_ptr != '\0' && *str_ptr != ')') { * if (*str_ptr == ',' || *str_ptr == '(') * *str_ptr = ' '; str_ptr++; } * if (*str_ptr == ')') * *str_ptr = ' '; * } */ /* get the parameters */ curr_ptr = open_paren_ptr + 1; for (num_params = 0; curr_ptr < close_paren_ptr; curr_ptr++) { char *beg_parameter; int num_parens; if (isspace(*curr_ptr)) continue; beg_parameter = curr_ptr; num_parens = 0; for (; curr_ptr < close_paren_ptr; curr_ptr++) { if (*curr_ptr == '(') num_parens++; if (*curr_ptr == ')') num_parens--; if (*curr_ptr == ',' && num_parens == 0) break; } params[num_params++] = inp_expand_macro_in_str(env, copy_substring(beg_parameter, curr_ptr)); } if (function->num_parameters != num_params) { fprintf(stderr, "ERROR: parameter mismatch for function call in str: %s\n", orig_str); controlled_exit(EXIT_FAILURE); } macro_str = inp_do_macro_param_replace(function, params); macro_str = inp_expand_macro_in_str(env, macro_str); keep = *fcn_name; *fcn_name = '\0'; { size_t curr_str_len = curr_str ? strlen(curr_str) : 0; size_t len = strlen(str) + strlen(macro_str) + 3; curr_str = TREALLOC(char, curr_str, curr_str_len + len); sprintf(curr_str + curr_str_len, "%s(%s)", str, macro_str); } *fcn_name = keep; tfree(macro_str); search_ptr = str = close_paren_ptr + 1; } if (curr_str == NULL) { curr_str = orig_ptr; } else { if (str != NULL) { size_t curr_str_len = strlen(curr_str); size_t len = strlen(str) + 1; curr_str = TREALLOC(char, curr_str, curr_str_len + len); sprintf(curr_str + curr_str_len, "%s", str); } tfree(orig_ptr); } tfree(orig_str); // printf("%s: --> \"%s\"\n", __FUNCTION__, curr_str); return curr_str; } static void inp_expand_macros_in_func(struct function_env *env) { struct function *f; for (f = env->functions; f ; f = f->next) f->macro = inp_expand_macro_in_str(env, f->macro); } static struct function_env * new_function_env(struct function_env *up) { struct function_env *env = TMALLOC(struct function_env, 1); env -> up = up; env -> functions = NULL; return env; } static struct function_env * delete_function_env(struct function_env *env) { struct function_env *up = env -> up; struct function *f; for (f = env -> functions; f; ) { struct function *here = f; f = f -> next; free_function(here); tfree(here); } tfree(env); return up; } static struct line * inp_expand_macros_in_deck(struct function_env *env, struct line *c) { env = new_function_env(env); inp_grab_func(env, c); inp_expand_macros_in_func(env); for (; c; c = c->li_next) { if (*c->li_line == '*') continue; if (ciprefix(".subckt", c->li_line)) { c = inp_expand_macros_in_deck(env, c->li_next); continue; } if (ciprefix(".ends", c->li_line)) break; c->li_line = inp_expand_macro_in_str(env, c->li_line); } env = delete_function_env(env); return c; } /* Put {} around tokens for handling in numparam. Searches for the next '=' in the line to become active. Several exceptions (eg. no 'set' or 'b' lines, no .cmodel lines, no lines between .control and .endc, no .option lines). Special handling of vectors with [] and complex values with < > h_vogt 20 April 2008 * For xspice and num_pram compatibility .cmodel added * .cmodel will be replaced by .model in inp_fix_param_values() * and then the entire line is skipped (will not be changed by this function). * Usage of numparam requires {} around the parameters in the .cmodel line. * May be obsolete? */ static void inp_fix_param_values(struct line *c) { char *beg_of_str, *end_of_str, *old_str, *equal_ptr, *new_str; char *vec_str, *tmp_str, *natok, *buffer, *newvec, *whereisgt; bool control_section = FALSE; wordlist *nwl; int parens; for (; c; c = c->li_next) { char *line = c->li_line; if (*line == '*' || (ciprefix(".param", line) && strchr(line, '{'))) continue; if (ciprefix(".control", line)) { control_section = TRUE; continue; } if (ciprefix(".endc", line)) { control_section = FALSE; continue; } /* no handling of params in "option" lines */ if (control_section || ciprefix(".option", line)) continue; /* no handling of params in "set" lines */ if (ciprefix("set", line)) continue; /* no handling of params in B source lines */ if (*line == 'b') continue; /* for xspice .cmodel: replace .cmodel with .model and skip entire line) */ if (ciprefix(".cmodel", line)) { *(++line) = 'm'; *(++line) = 'o'; *(++line) = 'd'; *(++line) = 'e'; *(++line) = 'l'; *(++line) = ' '; continue; } /* exclude CIDER models */ if (ciprefix(".model", line) && (strstr(line, "numos") || strstr(line, "numd") || strstr(line, "nbjt") || strstr(line, "nbjt2") || strstr(line, "numd2"))) { continue; } /* exclude CIDER devices with ic.file parameter */ if (strstr(line, "ic.file")) continue; while ((equal_ptr = find_assignment(line)) != NULL) { // special case: .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=out_variable3 // no braces around out_variable3. out_variable3 may be v(...) or i(...) if (ciprefix(".meas", line)) if (((equal_ptr[1] == 'v') || (equal_ptr[1] == 'i')) && (equal_ptr[2] == '(')) { // find closing ')' and skip token v(...) or i(...) while (*equal_ptr != ')' && equal_ptr[1] != '\0') equal_ptr++; line = equal_ptr + 1; continue; } beg_of_str = skip_ws(equal_ptr + 1); /* all cases where no {} have to be put around selected token */ if (isdigit(*beg_of_str) || *beg_of_str == '{' || *beg_of_str == '.' || *beg_of_str == '"' || (*beg_of_str == '-' && isdigit(beg_of_str[1])) || (*beg_of_str == '-' && beg_of_str[1] == '.' && isdigit(beg_of_str[2])) || ciprefix("true", beg_of_str) || ciprefix("false", beg_of_str)) { line = equal_ptr + 1; } else if (*beg_of_str == '[') { /* A vector following the '=' token: code to put curly brackets around all params inside a pair of square brackets */ end_of_str = beg_of_str; while (*end_of_str != ']') end_of_str++; /* string xx yyy from vector [xx yyy] */ tmp_str = vec_str = copy_substring(beg_of_str + 1, end_of_str); /* work on vector elements inside [] */ nwl = NULL; for (;;) { natok = gettok(&vec_str); if (!natok) break; buffer = TMALLOC(char, strlen(natok) + 4); if (isdigit(*natok) || *natok == '{' || *natok == '.' || *natok == '"' || (*natok == '-' && isdigit(natok[1])) || ciprefix("true", natok) || ciprefix("false", natok) || eq(natok, "<") || eq(natok, ">")) { (void) sprintf(buffer, "%s", natok); /* A complex value found inside a vector [< x1 y1> ] */ /* < xx and yy > have been dealt with before */ /* */ } else if (strchr(natok, '>')) { if (isdigit(*natok) || (*natok == '-' && isdigit(natok[1]))) { (void) sprintf(buffer, "%s", natok); } else { whereisgt = strchr(natok, '>'); *whereisgt = '}'; (void) sprintf(buffer, "{%s>", natok); } /* all other tokens */ } else { (void) sprintf(buffer, "{%s}", natok); } tfree(natok); nwl = wl_cons(copy(buffer), nwl); tfree(buffer); } tfree(tmp_str); nwl = wl_reverse(nwl); /* new vector elements */ newvec = wl_flatten(nwl); wl_free(nwl); /* insert new vector into actual line */ *equal_ptr = '\0'; new_str = TMALLOC(char, strlen(c->li_line) + strlen(newvec) + strlen(end_of_str + 1) + 5); sprintf(new_str, "%s=[%s] %s", c->li_line, newvec, end_of_str+1); tfree(newvec); old_str = c->li_line; c->li_line = new_str; line = new_str + strlen(old_str) + 1; tfree(old_str); } else if (*beg_of_str == '<') { /* A complex value following the '=' token: code to put curly brackets around all params inside a pair < > */ end_of_str = beg_of_str; while (*end_of_str != '>') end_of_str++; /* string xx yyy from vector [xx yyy] */ vec_str = copy_substring(beg_of_str + 1, end_of_str); /* work on tokens inside <> */ nwl = NULL; for (;;) { natok = gettok(&vec_str); if (!natok) break; buffer = TMALLOC(char, strlen(natok) + 4); if (isdigit(*natok) || *natok == '{' || *natok == '.' || *natok == '"' || (*natok == '-' && isdigit(natok[1])) || ciprefix("true", natok) || ciprefix("false", natok)) { (void) sprintf(buffer, "%s", natok); } else { (void) sprintf(buffer, "{%s}", natok); } tfree(natok); nwl = wl_cons(copy(buffer), nwl); tfree(buffer); } nwl = wl_reverse(nwl); /* new elements of complex variable */ newvec = wl_flatten(nwl); wl_free(nwl); /* insert new complex value into actual line */ *equal_ptr = '\0'; new_str = TMALLOC(char, strlen(c->li_line) + strlen(newvec) + strlen(end_of_str + 1) + 5); sprintf(new_str, "%s=<%s> %s", c->li_line, newvec, end_of_str+1); tfree(newvec); old_str = c->li_line; c->li_line = new_str; line = new_str + strlen(old_str) + 1; tfree(old_str); } else { /* put {} around token to be accepted as numparam */ end_of_str = beg_of_str; parens = 0; while (*end_of_str != '\0' && (!isspace(*end_of_str) || (parens > 0))) { if (*end_of_str == '(') parens++; if (*end_of_str == ')') parens--; end_of_str++; } *equal_ptr = '\0'; if (*end_of_str == '\0') { new_str = TMALLOC(char, strlen(c->li_line) + strlen(beg_of_str) + 4); sprintf(new_str, "%s={%s}", c->li_line, beg_of_str); } else { *end_of_str = '\0'; new_str = TMALLOC(char, strlen(c->li_line) + strlen(beg_of_str) + strlen(end_of_str + 1) + 5); sprintf(new_str, "%s={%s} %s", c->li_line, beg_of_str, end_of_str+1); } old_str = c->li_line; c->li_line = new_str; line = new_str + strlen(old_str) + 1; tfree(old_str); } } } } static char* get_param_name(char *line) { char *beg; char *equal_ptr = strchr(line, '='); if (!equal_ptr) { fprintf(stderr, "ERROR: could not find '=' on parameter line '%s'!\n", line); controlled_exit(EXIT_FAILURE); return NULL; } equal_ptr = skip_back_ws_(equal_ptr, line); beg = skip_back_non_ws_(equal_ptr, line); return copy_substring(beg, equal_ptr); } static char* get_param_str(char *line) { char *equal_ptr = strchr(line, '='); if (equal_ptr) return skip_ws(equal_ptr + 1); else return line; } static int inp_get_param_level(int param_num, char ***depends_on, char **param_names, char **param_strs, int total_params, int *level) { int index1 = 0, comp_level = 0, temp_level = 0; int index2 = 0; if (level[param_num] != -1) return level[param_num]; while (depends_on[param_num][index1] != NULL) { index2 = 0; while (index2 <= total_params && param_names[index2] != depends_on[param_num][index1]) index2++; if (index2 > total_params) { fprintf(stderr, "ERROR: unable to find dependency parameter for %s!\n", param_names[param_num]); controlled_exit(EXIT_FAILURE); } temp_level = inp_get_param_level(index2, depends_on, param_names, param_strs, total_params, level); temp_level++; if (comp_level < temp_level) comp_level = temp_level; index1++; } level[param_num] = comp_level; return comp_level; } static int get_number_terminals(char *c) { int i, j, k; char *name[12]; char nam_buf[128]; bool area_found = FALSE; switch (*c) { case 'r': case 'c': case 'l': case 'k': case 'f': case 'h': case 'b': case 'v': case 'i': case 'd': return 2; break; case 'u': case 'j': case 'w': case 'z': return 3; break; case 't': case 'o': case 'g': case 'e': case 's': case 'y': return 4; break; case 'm': /* recognition of 4, 5, 6, or 7 nodes for SOI devices needed */ i = 0; /* find the first token with "off" or "=" in the line*/ while ((i < 20) && (*c != '\0')) { char *inst = gettok_instance(&c); strncpy(nam_buf, inst, sizeof(nam_buf) - 1); txfree(inst); if (strstr(nam_buf, "off") || strchr(nam_buf, '=')) break; i++; } return i-2; break; case 'p': /* recognition of up to 100 cpl nodes */ i = j = 0; /* find the last token in the line*/ while ((i < 100) && (*c != '\0')) { char *tmp_inst = gettok_instance(&c); strncpy(nam_buf, tmp_inst, 32); tfree(tmp_inst); if (strchr(nam_buf, '=')) j++; i++; } if (i == 100) return 0; return i - j - 2; break; case 'q': /* recognition of 3/4 terminal bjt's needed */ /* QXXXXXXX NC NB NE MNAME */ /* 12 tokens maximum */ i = j = 0; while ((i < 12) && (*c != '\0')) { char *comma; name[i] = gettok_instance(&c); if (strstr(name[i], "off") || strchr(name[i], '=')) j++; /* If we have IC=VBE, VCE instead of IC=VBE,VCE we need to inc j */ if ((comma = strchr(name[i], ',')) != NULL && (*(++comma) == '\0')) j++; /* If we have IC=VBE , VCE ("," is a token) we need to inc j */ if (eq(name[i], ",")) j++; i++; } i--; area_found = FALSE; for (k = i; k > i-j-1; k--) { bool only_digits = TRUE; char *nametmp = name[k]; /* MNAME has to contain at least one alpha character. AREA may be assumed if we have a token with only digits, and where the previous token does not end with a ',' */ while (*nametmp) { if (isalpha(*nametmp) || (*nametmp == ',')) only_digits = FALSE; nametmp++; } if (only_digits && (strchr(name[k-1], ',') == NULL)) area_found = TRUE; } for (k = i; k >= 0; k--) tfree(name[k]); if (area_found) { return i-j-2; } else { return i-j-1; } break; default: return 0; break; } } /* sort parameters based on parameter dependencies */ static void inp_sort_params(struct line *start_card, struct line *end_card, struct line *card_bf_start, struct line *s_c, struct line *e_c) { char *param_name = NULL, *param_str = NULL, *param_ptr = NULL; int i, j, num_params = 0, ind = 0, max_level = 0, num_terminals = 0, ioff = 1; bool in_control = FALSE; bool found_in_list = FALSE; struct line *ptr; char *str_ptr, *beg, *end, *new_str; int skipped = 0; int arr_size = 12000; int *level; int *param_skip; char **param_names; char **param_strs; char ***depends_on; struct line **ptr_array; struct line **ptr_array_ordered; NG_IGNORE(end_card); if (start_card == NULL) return; /* determine the number of lines with .param */ for (ptr = start_card; ptr; ptr = ptr->li_next) if (strchr(ptr->li_line, '=')) num_params++; arr_size = num_params; num_params = 0; /* This is just to keep the code in row 2907ff. */ // dynamic memory allocation level = TMALLOC(int, arr_size); param_skip = TMALLOC(int, arr_size); param_names = TMALLOC(char *, arr_size); param_strs = TMALLOC(char *, arr_size); /* array[row][column] -> depends_on[array_size][100] */ /* rows */ depends_on = TMALLOC(char **, arr_size); /* columns */ for (i = 0; i < arr_size; i++) depends_on[i] = TMALLOC(char *, 100); ptr_array = TMALLOC(struct line *, arr_size); ptr_array_ordered = TMALLOC(struct line *, arr_size); ptr = start_card; for (ptr = start_card; ptr; ptr = ptr->li_next) // ignore .param lines without '=' if (strchr(ptr->li_line, '=')) { depends_on[num_params][0] = NULL; level[num_params] = -1; param_names[num_params] = get_param_name(ptr->li_line); /* strdup in fcn */ param_strs[num_params] = strdup(get_param_str(ptr->li_line)); ptr_array[num_params++] = ptr; } // look for duplicately defined parameters and mark earlier one to skip // param list is ordered as defined in netlist for (i = 0; i < num_params; i++) param_skip[i] = 0; for (i = 0; i < num_params; i++) for (j = num_params-1; j >= 0 && !param_skip[i]; j--) if (i != j && i < j && strcmp(param_names[i], param_names[j]) == 0) { // skip earlier one in list param_skip[i] = 1; skipped++; } for (i = 0; i < num_params; i++) { if (param_skip[i] == 1) continue; param_name = param_names[i]; for (j = 0; j < num_params; j++) { // for (j = i + 1; j < num_params; j++) { /* FIXME: to be tested */ if (j == i) continue; param_str = param_strs[j]; while ((param_ptr = strstr(param_str, param_name)) != NULL) { ioff = (strchr(param_ptr, '}') != NULL ? 1 : 0); /* want prevent wrong memory access below */ /* looking for curly braces or other string limiter */ if ((!isalnum(param_ptr[-ioff]) && param_ptr[-ioff] != '_' && !isalnum(param_ptr[strlen(param_name)]) && param_ptr[strlen(param_name)] != '_') || strcmp(param_ptr, param_name) == 0) { /* this are cases without curly braces */ ind = 0; found_in_list = FALSE; while (depends_on[j][ind] != NULL) { if (strcmp(param_name, depends_on[j][ind]) == 0) { found_in_list = TRUE; break; } ind++; } if (!found_in_list) { depends_on[j][ind++] = param_name; depends_on[j][ind] = NULL; } break; } param_str = param_ptr + strlen(param_name); } } } for (i = 0; i < num_params; i++) { level[i] = inp_get_param_level(i, depends_on, param_names, param_strs, num_params, level); if (max_level < level[i]) max_level = level[i]; } /* look for unquoted parameters and quote them */ in_control = FALSE; for (ptr = s_c; ptr && ptr != e_c; ptr = ptr->li_next) { char *curr_line = ptr->li_line; if (ciprefix(".control", curr_line)) { in_control = TRUE; continue; } if (ciprefix(".endc", curr_line)) { in_control = FALSE; continue; } if (in_control || curr_line[0] == '.' || curr_line[0] == '*') continue; /* FIXME: useless and potentially buggy code, when called from line 2225: we check parameters like l={length}, but not complete lines: We just live from the fact, that there are device names for all characters of the alphabet */ num_terminals = get_number_terminals(curr_line); if (num_terminals <= 0) continue; for (i = 0; i < num_params; i++) { str_ptr = curr_line; /* FIXME: useless and potentially buggy code, when called from line 2225: we check parameters like l={length}, but not complete lines: this will always lead to str_ptr = "" */ for (j = 0; j < num_terminals+1; j++) { str_ptr = skip_non_ws(str_ptr); str_ptr = skip_ws(str_ptr); } /* FIXME: useless and potentially buggy code: we check parameters like l={length}, but the following will not work for such a parameter string. We just live from the fact that str_ptr = "". */ while ((str_ptr = strstr(str_ptr, param_names[i])) != NULL) { /* make sure actually have the parameter name */ char before = *(str_ptr-1); char after = *(str_ptr+strlen(param_names[i])); if (!(is_arith_char(before) || isspace(before) || (str_ptr-1) < curr_line) || !(is_arith_char(after) || isspace(after) || after == '\0')) { str_ptr ++; continue; } beg = str_ptr - 1; end = str_ptr + strlen(param_names[i]); if ((isspace(*beg) || *beg == '=') && (isspace(*end) || *end == '\0' || *end == ')')) { if (isspace(*beg)) { while (isspace(*beg)) beg--; if (*beg != '{') beg++; str_ptr = beg; } if (isspace(*end)) { /* possible case: "{ length }" -> {length} */ while (*end && isspace(*end)) end++; if (*end == '}') end++; else end--; } *str_ptr = '\0'; if (*end != '\0') { new_str = TMALLOC(char, strlen(curr_line) + strlen(param_names[i]) + strlen(end) + 3); sprintf(new_str, "%s{%s}%s", curr_line, param_names[i], end); } else { new_str = TMALLOC(char, strlen(curr_line) + strlen(param_names[i]) + 3); sprintf(new_str, "%s{%s}", curr_line, param_names[i]); } str_ptr = new_str + strlen(curr_line) + strlen(param_names[i]); tfree(ptr->li_line); curr_line = ptr->li_line = new_str; } str_ptr++; } } } ind = 0; for (i = 0; i <= max_level; i++) for (j = num_params-1; j >= 0; j--) if (level[j] == i) if (param_skip[j] == 0) ptr_array_ordered[ind++] = ptr_array[j]; num_params -= skipped; if (ind != num_params) { fprintf(stderr, "ERROR: found wrong number of parameters during levelization ( %d instead of %d parameter s)!\n", ind, num_params); controlled_exit(EXIT_FAILURE); } /* fix next ptrs */ ptr = card_bf_start->li_next; card_bf_start->li_next = ptr_array_ordered[0]; ptr_array_ordered[num_params-1]->li_next = ptr; for (i = 0; i < num_params-1; i++) ptr_array_ordered[i]->li_next = ptr_array_ordered[i+1]; // clean up memory for (i = 0; i < arr_size; i++) { tfree(param_names[i]); tfree(param_strs[i]); } tfree(level); tfree(param_skip); tfree(param_names); tfree(param_strs); for (i = 0; i< arr_size; i++) tfree(depends_on[i]); tfree(depends_on); tfree(ptr_array); tfree(ptr_array_ordered); } static void inp_add_params_to_subckt(struct names *subckt_w_params, struct line *subckt_card) { struct line *card = subckt_card->li_next; char *subckt_line = subckt_card->li_line; char *new_line, *param_ptr, *subckt_name, *end_ptr; for (; card; card = card->li_next) { char *curr_line = card->li_line; if (!ciprefix(".param", curr_line)) break; param_ptr = strchr(curr_line, ' '); param_ptr = skip_ws(param_ptr); if (!strstr(subckt_line, "params:")) { new_line = TMALLOC(char, strlen(subckt_line) + strlen("params: ") + strlen(param_ptr) + 2); sprintf(new_line, "%s params: %s", subckt_line, param_ptr); subckt_name = skip_non_ws(subckt_line); subckt_name = skip_ws(subckt_name); end_ptr = skip_non_ws(subckt_name); add_name(subckt_w_params, copy_substring(subckt_name, end_ptr)); } else { new_line = TMALLOC(char, strlen(subckt_line) + strlen(param_ptr) + 2); sprintf(new_line, "%s %s", subckt_line, param_ptr); } tfree(subckt_line); subckt_line = new_line; *curr_line = '*'; } subckt_card->li_line = subckt_line; } /* * process a sequence of decks * starting from a `.suckt' deck * upto the corresponding `.ends' deck * return a pointer to the terminating `.ends' deck * * recursivly descend * when another `.subckt' is found * * parameters are removed from the main list * and collected into a local list `first_param_card' * then processed and reinserted into the main list * */ static struct line * inp_reorder_params_subckt(struct names *subckt_w_params, struct line *subckt_card) { struct line *first_param_card = NULL; struct line *last_param_card = NULL; struct line *prev_card = subckt_card; struct line *c = subckt_card->li_next; /* move .param lines to beginning of deck */ while (c != NULL) { char *curr_line = c->li_line; if (*curr_line == '*') { prev_card = c; c = c->li_next; continue; } if (ciprefix(".subckt", curr_line)) { prev_card = inp_reorder_params_subckt(subckt_w_params, c); c = prev_card->li_next; continue; } if (ciprefix(".ends", curr_line)) { if (first_param_card) { inp_sort_params(first_param_card, last_param_card, subckt_card, subckt_card, c); inp_add_params_to_subckt(subckt_w_params, subckt_card); } return c; } if (ciprefix(".param", curr_line)) { if (first_param_card) last_param_card->li_next = c; else first_param_card = c; last_param_card = c; prev_card->li_next = c->li_next; c = c->li_next; last_param_card->li_next = NULL; continue; } prev_card = c; c = c->li_next; } /* the terminating `.ends' deck wasn't found */ controlled_exit(EXIT_FAILURE); return NULL; } static void inp_reorder_params(struct names *subckt_w_params, struct line *deck, struct line *list_head, struct line *end) { struct line *first_param_card = NULL; struct line *last_param_card = NULL; struct line *prev_card = list_head; struct line *c = deck; /* move .param lines to beginning of deck */ while (c != NULL) { char *curr_line = c->li_line; if (*curr_line == '*') { prev_card = c; c = c->li_next; continue; } if (ciprefix(".subckt", curr_line)) { prev_card = inp_reorder_params_subckt(subckt_w_params, c); c = prev_card->li_next; continue; } /* check for an unexpected extra `.ends' deck */ if (ciprefix(".ends", curr_line)) { fprintf(stderr, "Error: Unexpected extra .ends in line:\n %s.\n", curr_line); controlled_exit(EXIT_FAILURE); } if (ciprefix(".param", curr_line)) { if (first_param_card) last_param_card->li_next = c; else first_param_card = c; last_param_card = c; prev_card->li_next = c->li_next; c = c->li_next; last_param_card->li_next = NULL; continue; } prev_card = c; c = c->li_next; } inp_sort_params(first_param_card, last_param_card, list_head, deck, end); } // iterate through deck and find lines with multiply defined parameters // // split line up into multiple lines and place those new lines immediately // afetr the current multi-param line in the deck static int inp_split_multi_param_lines(struct line *card, int line_num) { for (; card; card = card->li_next) { char *curr_line = card->li_line; if (*curr_line == '*') continue; if (ciprefix(".param", curr_line)) { struct line *param_end, *param_beg; char *equal_ptr, **array; int i, counter = 0; while ((equal_ptr = find_assignment(curr_line)) != NULL) { counter++; curr_line = equal_ptr + 1; } if (counter <= 1) continue; array = TMALLOC(char *, counter); // need to split multi param line curr_line = card->li_line; counter = 0; while ((equal_ptr = find_assignment(curr_line)) != NULL) { char keep, *beg_param, *end_param, *new_line; bool get_expression = FALSE; bool get_paren_expression = FALSE; beg_param = skip_back_ws_(equal_ptr, curr_line); beg_param = skip_back_non_ws_(beg_param, curr_line); end_param = skip_ws(equal_ptr + 1); while (*end_param != '\0' && (!isspace(*end_param) || get_expression || get_paren_expression)) { if (*end_param == '{') get_expression = TRUE; if (*end_param == '(') get_paren_expression = TRUE; if (*end_param == '}') get_expression = FALSE; if (*end_param == ')') get_paren_expression = FALSE; end_param++; } keep = *end_param; *end_param = '\0'; new_line = TMALLOC(char, strlen(".param ") + strlen(beg_param) + 1); sprintf(new_line, ".param %s", beg_param); array[counter++] = new_line; *end_param = keep; curr_line = end_param; } param_beg = param_end = NULL; for (i = 0; i < counter; i++) { struct line *x = xx_new_line(NULL, array[i], line_num++, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } tfree(array); // comment out current multi-param line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; } } return line_num; } /* ps compatibility: ECOMP 3 0 TABLE {V(1,2)} = (-1 0V) (1, 10V) --> ECOMP 3 0 int3 int0 1 BECOMP int3 int0 V = pwl(V(1,2), -2, 0, -1, 0 , 1, 10V, 2, 10V) GD16 16 1 TABLE {V(16,1)} ((-100V,-1pV)(0,0)(1m,1u)(2m,1m)) --> GD16 16 1 int_16 int_1 1 BGD16 int_16 int_1 V = pwl (v(16,1) , -100V , -1pV , 0 , 0 , 1m , 1u , 2m , 1m) */ /* hs compatibility: Exxx n1 n2 VCVS n3 n4 gain --> Exxx n1 n2 n3 n4 gain Gxxx n1 n2 VCCS n3 n4 tr --> Gxxx n1 n2 n3 n4 tr Two step approach to keep the original names for reuse, i.e. for current measurements like i(Exxx): Exxx n1 n2 VOL = {equation} --> Exxx n1 n2 int1 0 1 BExxx int1 0 V = {equation} Gxxx n1 n2 CUR = {equation} --> Gxxx n1 n2 int1 0 1 BGxxx int1 0 V = {equation} Do the following transformations only if {equation} contains simulation output like v(node), v(node1, node2), i(branch). Otherwise let do numparam the substitutions (R=const is handled in inp2r.c). Rxxx n1 n2 R = {equation} or Rxxx n1 n2 {equation} --> BRxxx n1 n2 I = V(n1,n2)/{equation} Unfortunately the capability for ac noise calculation of resistance may be lost. Cxxx n1 n2 C = {equation} or Cxxx n1 n2 {equation} --> Exxx n-aux 0 n1 n2 1 Cxxx n-aux 0 1 Bxxx n2 n1 I = i(Exxx) * equation Lxxx n1 n2 L = {equation} or Lxxx n1 n2 {equation} --> Fxxx n-aux 0 Bxxx -1 Lxxx n-aux 0 1 Bxxx n1 n2 V = v(n-aux) * 1e-16 */ static void inp_compat(struct line *card) { char *str_ptr, *cut_line, *title_tok, *node1, *node2; char *out_ptr, *exp_ptr, *beg_ptr, *end_ptr, *copy_ptr, *del_ptr; char *xline; size_t xlen, i, pai = 0, paui = 0, ii; char *ckt_array[100]; struct line *new_line; struct line *param_end = NULL, *param_beg = NULL; int skip_control = 0; char *equation, *tc1_ptr = NULL, *tc2_ptr = NULL; double tc1 = 0.0, tc2 = 0.0; for (; card; card = card->li_next) { char *curr_line = card->li_line; /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (*curr_line == '*') continue; if (*curr_line == 'e') { /* Exxx n1 n2 VCVS n3 n4 gain --> Exxx n1 n2 n3 n4 gain remove vcvs */ replace_token(curr_line, "vcvs", 4, 7); /* Exxx n1 n2 value={equation} --> Exxx n1 n2 vol={equation} */ if ((str_ptr = strstr(curr_line, "value=")) != NULL) { str_ptr[0] = ' '; str_ptr[1] = ' '; str_ptr[2] = 'v'; str_ptr[3] = 'o'; str_ptr[4] = 'l'; } /* Exxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2) --> Exxx n1 n2 int1 0 1 BExxx int1 0 V = pwl (expression, x0-(x2-x0)/2, y0, x0, y0, x1, y1, x2, y2, x2+(x2-x0)/2, y2) */ if ((str_ptr = strstr(curr_line, "table")) != NULL) { char *expression, *firstno, *ffirstno, *secondno, *midline, *lastno, *lastlastno; double fnumber, lnumber, delta; int nerror; cut_line = curr_line; /* title and nodes */ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); // Exxx n1 n2 int1 0 1 xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 20 - 4*2 + 1; ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "%s %s %s %s_int1 0 1", title_tok, node1, node2, title_tok); // get the expression str_ptr = gettok(&cut_line); /* ignore 'table' */ if (!cieq(str_ptr, "table")) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } tfree(str_ptr); str_ptr = gettok_char(&cut_line, '{', FALSE, FALSE); expression = gettok_char(&cut_line, '}', TRUE, TRUE); /* expression */ if (!expression || !str_ptr) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } tfree(str_ptr); /* remove '{' and '}' from expression */ if ((str_ptr = strchr(expression, '{')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(expression, '}')) != NULL) *str_ptr = ' '; /* cut_line may now have a '=', if yes, it will have '{' and '}' (braces around token after '=') */ if ((str_ptr = strchr(cut_line, '=')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(cut_line, '{')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(cut_line, '}')) != NULL) *str_ptr = ' '; /* get first two numbers to establish extrapolation */ str_ptr = cut_line; ffirstno = gettok_node(&cut_line); if (!ffirstno) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } firstno = copy(ffirstno); fnumber = INPevaluate(&ffirstno, &nerror, TRUE); secondno = gettok_node(&cut_line); midline = cut_line; cut_line = strrchr(str_ptr, '('); if (!cut_line) { fprintf(stderr, "Error: bad syntax in line %d (missing parentheses)\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } /* replace '(' with ',' and ')' with ' ' */ for (; *str_ptr; str_ptr++) if (*str_ptr == '(') *str_ptr = ','; else if (*str_ptr == ')') *str_ptr = ' '; /* scan for last two numbers */ lastno = gettok_node(&cut_line); lnumber = INPevaluate(&lastno, &nerror, FALSE); /* check for max-min and take half the difference for delta */ delta = (lnumber-fnumber)/2.; lastlastno = gettok_node(&cut_line); if (!secondno || (*midline == 0) || (delta <= 0.) || !lastlastno) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } xlen = 2*strlen(title_tok) + strlen(expression) + 14 + strlen(firstno) + 2*strlen(secondno) + strlen(midline) + 14 + strlen(lastlastno) + 50; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 v = pwl(%s, %e, %s, %s, %s, %s, %e, %s)", title_tok, title_tok, expression, fnumber-delta, secondno, firstno, secondno, midline, lnumber + delta, lastlastno); // insert new B source line immediately after current line for (i = 0; i < 2; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable e line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(firstno); tfree(lastlastno); tfree(title_tok); tfree(node1); tfree(node2); } /* Exxx n1 n2 VOL = {equation} --> Exxx n1 n2 int1 0 1 BExxx int1 0 V = {equation} */ /* search for ' vol=' or ' vol =' */ if (((str_ptr = strchr(curr_line, '=')) != NULL) && prefix("vol", skip_back_non_ws(skip_back_ws(str_ptr)))) { cut_line = curr_line; /* title and nodes */ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); /* Find equation, starts with '{', till end of line */ str_ptr = strchr(cut_line, '{'); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed E line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } // Exxx n1 n2 int1 0 1 xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 20 - 4*2 + 1; ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "%s %s %s %s_int1 0 1", title_tok, node1, node2, title_tok); // BExxx int1 0 V = {equation} xlen = 2*strlen(title_tok) + strlen(str_ptr) + 20 - 3*2 + 1; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 v = %s", title_tok, title_tok, str_ptr); // insert new B source line immediately after current line for (i = 0; i < 2; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable e line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(node1); tfree(node2); } } else if (*curr_line == 'g') { /* Gxxx n1 n2 VCCS n3 n4 tr --> Gxxx n1 n2 n3 n4 tr remove vccs */ replace_token(curr_line, "vccs", 4, 7); /* Gxxx n1 n2 value={equation} --> Gxxx n1 n2 cur={equation} */ if ((str_ptr = strstr(curr_line, "value=")) != NULL) { str_ptr[0] = ' '; str_ptr[1] = ' '; str_ptr[2] = 'c'; str_ptr[3] = 'u'; str_ptr[4] = 'r'; } /* Gxxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2) --> Gxxx n1 n2 int1 0 1 BGxxx int1 0 V = pwl (expression, x0-(x2-x0)/2, y0, x0, y0, x1, y1, x2, y2, x2+(x2-x0)/2, y2) */ if ((str_ptr = strstr(curr_line, "table")) != NULL) { char *expression, *firstno, *ffirstno, *secondno, *midline, *lastno, *lastlastno; char *m_ptr, *m_token; double fnumber, lnumber, delta; int nerror; cut_line = curr_line; /* title and nodes */ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); // Gxxx n1 n2 int1 0 1 // or // Gxxx n1 n2 int1 0 m='expr' /* find multiplier m at end of line */ m_ptr = strstr(cut_line, "m="); if (m_ptr) { m_token = copy(m_ptr + 2); // get only the expression *m_ptr = '\0'; } else m_token = copy("1"); xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 20 - 4*2 + strlen(m_token); ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "%s %s %s %s_int1 0 %s", title_tok, node1, node2, title_tok, m_token); // get the expression str_ptr = gettok(&cut_line); /* ignore 'table' */ if (!cieq(str_ptr, "table")) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } tfree(str_ptr); str_ptr = gettok_char(&cut_line, '{', FALSE, FALSE); expression = gettok_char(&cut_line, '}', TRUE, TRUE); /* expression */ if (!expression || !str_ptr) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } tfree(str_ptr); /* remove '{' and '}' from expression */ if ((str_ptr = strchr(expression, '{')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(expression, '}')) != NULL) *str_ptr = ' '; /* cut_line may now have a '=', if yes, it will have '{' and '}' (braces around token after '=') */ if ((str_ptr = strchr(cut_line, '=')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(cut_line, '{')) != NULL) *str_ptr = ' '; if ((str_ptr = strchr(cut_line, '}')) != NULL) *str_ptr = ' '; /* get first two numbers to establish extrapolation */ str_ptr = cut_line; ffirstno = gettok_node(&cut_line); if (!ffirstno) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } firstno = copy(ffirstno); fnumber = INPevaluate(&ffirstno, &nerror, TRUE); secondno = gettok_node(&cut_line); midline = cut_line; cut_line = strrchr(str_ptr, '('); /* replace '(' with ',' and ')' with ' ' */ for (; *str_ptr; str_ptr++) if (*str_ptr == '(') *str_ptr = ','; else if (*str_ptr == ')') *str_ptr = ' '; /* scan for last two numbers */ lastno = gettok_node(&cut_line); lnumber = INPevaluate(&lastno, &nerror, FALSE); /* check for max-min and take half the difference for delta */ delta = (lnumber-fnumber)/2.; lastlastno = gettok_node(&cut_line); if (!secondno || (*midline == 0) || (delta <= 0.) || !lastlastno) { fprintf(stderr, "Error: bad syntax in line %d\n %s\n", card->li_linenum_orig, card->li_line); controlled_exit(EXIT_BAD); } /* BGxxx int1 0 V = pwl (expression, x0-(x2-x0)/2, y0, x0, y0, x1, y1, x2, y2, x2+(x2-x0)/2, y2) */ xlen = 2*strlen(title_tok) + strlen(expression) + 14 + strlen(firstno) + 2*strlen(secondno) + strlen(midline) + 14 + strlen(lastlastno) + 50; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 v = pwl(%s, %e, %s, %s, %s, %s, %e, %s)", title_tok, title_tok, expression, fnumber-delta, secondno, firstno, secondno, midline, lnumber + delta, lastlastno); // insert new B source line immediately after current line for (i = 0; i < 2; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable e line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(firstno); tfree(lastlastno); tfree(title_tok); tfree(node1); tfree(node2); tfree(m_token); } /* Gxxx n1 n2 CUR = {equation} --> Gxxx n1 n2 int1 0 1 BGxxx int1 0 V = {equation} */ /* search for ' cur=' or ' cur =' */ if (((str_ptr = strchr(curr_line, '=')) != NULL) && prefix("cur", skip_back_non_ws(skip_back_ws(str_ptr)))) { char *m_ptr, *m_token; cut_line = curr_line; /* title and nodes */ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); /* Find equation, starts with '{', till end of line */ str_ptr = strchr(cut_line, '{'); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed G line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } /* find multiplier m at end of line */ m_ptr = strstr(cut_line, "m="); if (m_ptr) { m_token = copy(m_ptr + 2); //get only the expression *m_ptr = '\0'; } else m_token = copy("1"); // Gxxx n1 n2 int1 0 1 // or // Gxxx n1 n2 int1 0 m='expr' xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 20 - 4*2 + strlen(m_token); ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "%s %s %s %s_int1 0 %s", title_tok, node1, node2, title_tok, m_token); // BGxxx int1 0 V = {equation} xlen = 2*strlen(title_tok) + strlen(str_ptr) + 20 - 3*2 + 1; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 v = %s", title_tok, title_tok, str_ptr); // insert new B source line immediately after current line for (i = 0; i < 2; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable g line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(m_token); tfree(node1); tfree(node2); } } /* F element compatibility */ else if (*curr_line == 'f') { char actchar, *beg_tstr, *equastr, *vnamstr; /* Fxxx n1 n2 CCCS vnam gain --> Fxxx n1 n2 vnam gain remove cccs */ replace_token(curr_line, "cccs", 4, 6); /* Deal with Fxxx n1 n2 vnam {equation} if equation contains the 'temper' token */ beg_tstr = curr_line; while ((beg_tstr = strstr(beg_tstr, "temper")) != NULL) { actchar = *(beg_tstr - 1); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '{')) { beg_tstr++; continue; } actchar = *(beg_tstr + 6); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '}')) { beg_tstr++; continue; } /* we have found a true 'temper' */ cut_line = curr_line; title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); vnamstr = gettok(&cut_line); equastr = gettok(&cut_line); /* Fxxx n1 n2 vnam {equation} --> Fxxx n1 n2 vbFxxx -1 bFxxx int1 0 i = i(vnam)*{equation} vbFxxx int1 0 0 */ xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 9; ckt_array[0] = TMALLOC(char, xlen); //Fxxx n1 n2 VBFxxx -1 sprintf(ckt_array[0], "%s %s %s vb%s -1", title_tok, node1, node2, title_tok); //BFxxx BFxxx_int1 0 I = I(vnam)*{equation} xlen = 2*strlen(title_tok) + strlen(vnamstr) + strlen(equastr) + 23; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 i = i(%s) * (%s)", title_tok, title_tok, vnamstr, equastr); //VBFxxx int1 0 0 xlen = 2*strlen(title_tok) + 16; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "vb%s %s_int1 0 dc 0", title_tok, title_tok); // insert new three lines immediately after current line for (i = 0; i < 3; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable f line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(vnamstr); tfree(equastr); tfree(node1); tfree(node2); break; } } /* H element compatibility */ else if (*curr_line == 'h') { char actchar, *beg_tstr, *equastr, *vnamstr; /* Hxxx n1 n2 CCVS vnam transres --> Hxxx n1 n2 vnam transres remove cccs */ replace_token(curr_line, "ccvs", 4, 6); /* Deal with Hxxx n1 n2 vnam {equation} if equation contains the 'temper' token */ beg_tstr = curr_line; while ((beg_tstr = strstr(beg_tstr, "temper")) != NULL) { actchar = *(beg_tstr - 1); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '{')) { beg_tstr++; continue; } actchar = *(beg_tstr + 6); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '}')) { beg_tstr++; continue; } /* we have found a true 'temper' */ cut_line = curr_line; title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); vnamstr = gettok(&cut_line); equastr = gettok(&cut_line); /* Hxxx n1 n2 vnam {equation} --> Hxxx n1 n2 vbHxxx -1 bHxxx int1 0 i = i(vnam)*{equation} vbHxxx int1 0 0 */ xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 9; ckt_array[0] = TMALLOC(char, xlen); //Hxxx n1 n2 VBHxxx -1 sprintf(ckt_array[0], "%s %s %s vb%s -1", title_tok, node1, node2, title_tok); //BHxxx BHxxx_int1 0 I = I(vnam)*{equation} xlen = 2*strlen(title_tok) + strlen(vnamstr) + strlen(equastr) + 23; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "b%s %s_int1 0 i = i(%s) * (%s)", title_tok, title_tok, vnamstr, equastr); //VBHxxx int1 0 0 xlen = 2*strlen(title_tok) + 16; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "vb%s %s_int1 0 dc 0", title_tok, title_tok); // insert new three lines immediately after current line for (i = 0; i < 3; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable h line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(vnamstr); tfree(equastr); tfree(node1); tfree(node2); break; } } /* Rxxx n1 n2 R = {equation} or Rxxx n1 n2 {equation} --> BRxxx pos neg I = V(pos, neg)/{equation} */ else if (*curr_line == 'r') { cut_line = curr_line; /* make BRxxx pos neg I = V(pos, neg)/{equation}*/ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); /* check only after skipping Rname and nodes, either may contain time (e.g. Rtime)*/ if ((!strstr(cut_line, "v(")) && (!strstr(cut_line, "i(")) && (!strstr(cut_line, "temper")) && (!strstr(cut_line, "hertz")) && (!strstr(cut_line, "time"))) { tfree(title_tok); tfree(node1); tfree(node2); continue; } /* Find equation, starts with '{', till end of line */ str_ptr = strchr(cut_line, '{'); if (str_ptr == NULL) { /* if not, equation may start with a '(' */ str_ptr = strchr(cut_line, '('); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed R line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } equation = gettok_char(&str_ptr, ')', TRUE, TRUE); } else equation = gettok_char(&str_ptr, '}', TRUE, TRUE); str_ptr = strstr(cut_line, "tc1"); if (str_ptr) { /* We need to have 'tc1=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc1_ptr = strchr(str_ptr, '='); if (tc1_ptr) tc1 = atof(tc1_ptr+1); } } str_ptr = strstr(cut_line, "tc2"); if (str_ptr) { /* We need to have 'tc2=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc2_ptr = strchr(str_ptr, '='); if (tc2_ptr) tc2 = atof(tc2_ptr+1); } } if ((tc1_ptr == NULL) && (tc2_ptr == NULL)) { xlen = strlen(title_tok) + strlen(node1) + strlen(node2) + strlen(node1) + strlen(node2) + strlen(equation) + 28 - 6*2 + 1; xline = TMALLOC(char, xlen); sprintf(xline, "b%s %s %s i = v(%s, %s)/(%s)", title_tok, node1, node2, node1, node2, equation); } else if (tc2_ptr == NULL) { xlen = strlen(title_tok) + strlen(node1) + strlen(node2) + strlen(node1) + strlen(node2) + strlen(equation) + 28 - 6*2 + 1 + 21 + 13; xline = TMALLOC(char, xlen); sprintf(xline, "b%s %s %s i = v(%s, %s)/(%s) tc1=%15.8e reciproctc=1", title_tok, node1, node2, node1, node2, equation, tc1); } else { xlen = strlen(title_tok) + strlen(node1) + strlen(node2) + strlen(node1) + strlen(node2) + strlen(equation) + 28 - 6*2 + 1 + 21 + 21 + 13; xline = TMALLOC(char, xlen); sprintf(xline, "b%s %s %s i = v(%s, %s)/(%s) tc1=%15.8e tc2=%15.8e reciproctc=1", title_tok, node1, node2, node1, node2, equation, tc1, tc2); } tc1_ptr = NULL; tc2_ptr = NULL; new_line = xx_new_line(card->li_next, xline, 0, 0); // comment out current old R line *(card->li_line) = '*'; // insert new B source line immediately after current line card->li_next = new_line; // point 'card' pointer to the new line card = new_line; tfree(title_tok); tfree(node1); tfree(node2); tfree(equation); } /* Cxxx n1 n2 C = {equation} or Cxxx n1 n2 {equation} --> Exxx n-aux 0 n1 n2 1 Cxxx n-aux 0 1 Bxxx n2 n1 I = i(Exxx) * equation */ else if (*curr_line == 'c') { cut_line = curr_line; title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); /* check only after skipping Cname and nodes, either may contain time (e.g. Ctime)*/ if ((!strstr(cut_line, "v(")) && (!strstr(cut_line, "i(")) && (!strstr(cut_line, "temper")) && (!strstr(cut_line, "hertz")) && (!strstr(cut_line, "time"))) { tfree(title_tok); tfree(node1); tfree(node2); continue; } /* Find equation, starts with '{', till end of line */ str_ptr = strchr(cut_line, '{'); if (str_ptr == NULL) { /* if not, equation may start with a '(' */ str_ptr = strchr(cut_line, '('); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed C line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } equation = gettok_char(&str_ptr, ')', TRUE, TRUE); } else equation = gettok_char(&str_ptr, '}', TRUE, TRUE); str_ptr = strstr(cut_line, "tc1"); if (str_ptr) { /* We need to have 'tc1=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc1_ptr = strchr(str_ptr, '='); if (tc1_ptr) tc1 = atof(tc1_ptr+1); } } str_ptr = strstr(cut_line, "tc2"); if (str_ptr) { /* We need to have 'tc2=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc2_ptr = strchr(str_ptr, '='); if (tc2_ptr) tc2 = atof(tc2_ptr+1); } } // Exxx n-aux 0 n1 n2 1 xlen = 2*strlen(title_tok) + strlen(node1) + strlen(node2) + 21 - 4*2 + 1; ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "e%s %s_int2 0 %s %s 1", title_tok, title_tok, node1, node2); // Cxxx n-aux 0 1 xlen = 2*strlen(title_tok) + 15 - 2*2 + 1; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "c%s %s_int2 0 1", title_tok, title_tok); // Bxxx n2 n1 I = i(Exxx) * equation if ((tc1_ptr == NULL) && (tc2_ptr == NULL)) { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 27 - 2*5 + 1; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s i = i(e%s) * (%s)", title_tok, node2, node1, title_tok, equation); } else if (tc2_ptr == NULL) { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 27 - 2*5 + 1 + 21 + 13; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s i = i(e%s) * (%s) tc1=%15.8e reciproctc=1", title_tok, node2, node1, title_tok, equation, tc1); } else { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 27 - 2*5 + 1 + 21 + 21 + 13; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s i = i(e%s) * (%s) tc1=%15.8e tc2=%15.8e reciproctc=1", title_tok, node2, node1, title_tok, equation, tc1, tc2); } tc1_ptr = NULL; tc2_ptr = NULL; // insert new B source line immediately after current line for (i = 0; i < 3; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable capacitor line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(node1); tfree(node2); tfree(equation); } /* Lxxx n1 n2 L = {equation} or Lxxx n1 n2 {equation} --> Fxxx n-aux 0 Bxxx -1 Lxxx n-aux 0 1 Bxxx n1 n2 V = v(n-aux) * equation */ else if (*curr_line == 'l') { cut_line = curr_line; /* title and nodes */ title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); if ((!strstr(cut_line, "v(")) && (!strstr(cut_line, "i(")) && (!strstr(cut_line, "temper")) && (!strstr(cut_line, "hertz")) && (!strstr(cut_line, "time"))) { tfree(title_tok); tfree(node1); tfree(node2); continue; } /* Find equation, starts with '{', till end of line */ str_ptr = strchr(cut_line, '{'); if (str_ptr == NULL) { /* if not, equation may start with a '(' */ str_ptr = strchr(cut_line, '('); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed L line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } equation = gettok_char(&str_ptr, ')', TRUE, TRUE); } else equation = gettok_char(&str_ptr, '}', TRUE, TRUE); str_ptr = strstr(cut_line, "tc1"); if (str_ptr) { /* We need to have 'tc1=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc1_ptr = strchr(str_ptr, '='); if (tc1_ptr) tc1 = atof(tc1_ptr+1); } } str_ptr = strstr(cut_line, "tc2"); if (str_ptr) { /* We need to have 'tc2=something */ if (str_ptr[3] && (isspace(str_ptr[3]) || (str_ptr[3] == '='))) { tc2_ptr = strchr(str_ptr, '='); if (tc2_ptr) tc2 = atof(tc2_ptr+1); } } // Fxxx n-aux 0 Bxxx 1 xlen = 3*strlen(title_tok) + 20 - 3*2 + 1; ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "f%s %s_int2 0 b%s -1", title_tok, title_tok, title_tok); // Lxxx n-aux 0 1 xlen = 2*strlen(title_tok) + 15 - 2*2 + 1; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "l%s %s_int2 0 1", title_tok, title_tok); // Bxxx n1 n2 V = v(n-aux) * equation if ((tc1_ptr == NULL) && (tc2_ptr == NULL)) { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 31 - 2*5 + 1; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s v = v(%s_int2) * (%s)", title_tok, node1, node2, title_tok, equation); } else if (tc2_ptr == NULL) { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 31 - 2*5 + 1 + 21 + 13; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s v = v(%s_int2) * (%s) tc1=%15.8e reciproctc=0", title_tok, node2, node1, title_tok, equation, tc1); } else { xlen = 2*strlen(title_tok) + strlen(node2) + strlen(node1) + strlen(equation) + 31 - 2*5 + 1 + 21 + 21 + 13; ckt_array[2] = TMALLOC(char, xlen); sprintf(ckt_array[2], "b%s %s %s v = v(%s_int2) * (%s) tc1=%15.8e tc2=%15.8e reciproctc=0", title_tok, node2, node1, title_tok, equation, tc1, tc2); } tc1_ptr = NULL; tc2_ptr = NULL; // insert new B source line immediately after current line for (i = 0; i < 3; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable inductor line *(card->li_line) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(node1); tfree(node2); tfree(equation); } /* .probe -> .save .print, .plot, .save, .four, An ouput vector may be replaced by the following: myoutput=par('expression') .meas A vector out_variable may be replaced by par('expression') */ else if (*curr_line == '.') { // replace .probe by .save if ((str_ptr = strstr(curr_line, ".probe")) != NULL) memcpy(str_ptr, ".save ", 6); /* Various formats for measure statement: * .MEASURE {DC|AC|TRAN} result WHEN out_variable=val * + * + * * .MEASURE {DC|AC|TRAN} result WHEN out_variable=out_variable2 * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=val * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=out_variable3 * + * + * * .MEASURE {DC|AC|TRAN} result FIND out_variable AT=val * + * * .MEASURE {DC|AC|TRAN} result {AVG|MIN|MAX|MIN_AT|MAX_AT|PP|RMS} out_variable * + * * .MEASURE {DC|AC|TRAN} result INTEG out_variable * + * * .MEASURE {DC|AC|TRAN} result DERIV out_variable AT=val * * .MEASURE {DC|AC|TRAN} result DERIV out_variable WHEN out_variable2=val * + * + * * .MEASURE {DC|AC|TRAN} result DERIV out_variable WHEN out_variable2=out_variable3 * + * + The user may set any out_variable to par(' expr '). We have to replace this by v(pa_xx) and generate a B source line. * ----------------------------------------------------------------- */ if (ciprefix(".meas", curr_line)) { if (strstr(curr_line, "par(") == NULL) continue; cut_line = curr_line; // search for 'par(' while ((str_ptr = strstr(cut_line, "par(")) != NULL) { if (pai > 99) { fprintf(stderr, "ERROR: More than 99 function calls to par()\n"); fprintf(stderr, " Limited to 99 per input file\n"); controlled_exit(EXIT_FAILURE); } // we have ' par({ ... })', the right delimeter is a ' ' or '=' if (ciprefix(" par({", (str_ptr-1))) { // find expression beg_ptr = end_ptr = str_ptr + 5; while ((*end_ptr != ' ') && (*end_ptr != '=') && (*end_ptr != '\0')) end_ptr++; exp_ptr = copy_substring(beg_ptr, end_ptr-2); cut_line = str_ptr; // generate node out_ptr = TMALLOC(char, 6); sprintf(out_ptr, "pa_%02d", (int)pai); // Bout_ptr out_ptr 0 V = v(expr_ptr) xlen = 2*strlen(out_ptr) + strlen(exp_ptr)+ 15 - 2*3 + 1; ckt_array[pai] = TMALLOC(char, xlen); sprintf(ckt_array[pai], "b%s %s 0 v = %s", out_ptr, out_ptr, exp_ptr); ckt_array[++pai] = NULL; // length of the replacement V(out_ptr) xlen = strlen(out_ptr) + 4; del_ptr = copy_ptr = TMALLOC(char, xlen); sprintf(copy_ptr, "v(%s)", out_ptr); // length of the replacement part in original line xlen = strlen(exp_ptr) + 7; // copy the replacement without trailing '\0' for (ii = 0; ii < xlen; ii++) if (*copy_ptr) *cut_line++ = *copy_ptr++; else *cut_line++ = ' '; tfree(del_ptr); tfree(exp_ptr); tfree(out_ptr); } // or we have '={par({ ... })}', the right delimeter is a ' ' else if (ciprefix("={par({", (str_ptr-2))) { // find expression beg_ptr = end_ptr = str_ptr + 5; while ((*end_ptr != ' ') && (*end_ptr != '\0')) end_ptr++; exp_ptr = copy_substring(beg_ptr, end_ptr-3); // generate node out_ptr = TMALLOC(char, 6); sprintf(out_ptr, "pa_%02d", (int)pai); // Bout_ptr out_ptr 0 V = v(expr_ptr) xlen = 2*strlen(out_ptr) + strlen(exp_ptr)+ 15 - 2*3 + 1; ckt_array[pai] = TMALLOC(char, xlen); sprintf(ckt_array[pai], "b%s %s 0 v = %s", out_ptr, out_ptr, exp_ptr); ckt_array[++pai] = NULL; // length of the replacement V(out_ptr) xlen = strlen(out_ptr) + 4; del_ptr = copy_ptr = TMALLOC(char, xlen); sprintf(copy_ptr, "v(%s)", out_ptr); // length of the replacement part in original line xlen = strlen(exp_ptr) + 9; // skip '=' cut_line++; // copy the replacement without trailing '\0' for (ii = 0; ii < xlen; ii++) if (*copy_ptr) *cut_line++ = *copy_ptr++; else *cut_line++ = ' '; tfree(del_ptr); tfree(exp_ptr); tfree(out_ptr); } else { // nothing to replace cut_line = str_ptr + 1; continue; } } // while 'par' // no replacement done, go to next line if (pai == paui) continue; // remove white spaces card->li_line = inp_remove_ws(curr_line); // insert new B source line immediately after current line for (ii = paui; ii < pai; ii++) { struct line *x = xx_new_line(NULL, ckt_array[ii], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; paui = pai; } else if ((ciprefix(".save", curr_line)) || (ciprefix(".four", curr_line)) || (ciprefix(".print", curr_line)) || (ciprefix(".plot", curr_line))) { if (strstr(curr_line, "par(") == NULL) continue; cut_line = curr_line; // search for 'par(' while ((str_ptr = strstr(cut_line, "par(")) != NULL) { if (pai > 99) { fprintf(stderr, "ERROR: More than 99 function calls to par()\n"); fprintf(stderr, " Limited to 99 per input file\n"); controlled_exit(EXIT_FAILURE); } // we have ' par({ ... })' if (ciprefix(" par({", (str_ptr-1))) { // find expression beg_ptr = end_ptr = str_ptr + 5; while ((*end_ptr != ' ') && (*end_ptr != '\0')) end_ptr++; exp_ptr = copy_substring(beg_ptr, end_ptr-2); cut_line = str_ptr; // generate node out_ptr = TMALLOC(char, 6); sprintf(out_ptr, "pa_%02d", (int)pai); // Bout_ptr out_ptr 0 V = v(expr_ptr) xlen = 2*strlen(out_ptr) + strlen(exp_ptr)+ 15 - 2*3 + 1; ckt_array[pai] = TMALLOC(char, xlen); sprintf(ckt_array[pai], "b%s %s 0 v = %s", out_ptr, out_ptr, exp_ptr); ckt_array[++pai] = NULL; // length of the replacement V(out_ptr) xlen = strlen(out_ptr) + 1; del_ptr = copy_ptr = TMALLOC(char, xlen); sprintf(copy_ptr, "%s", out_ptr); // length of the replacement part in original line xlen = strlen(exp_ptr) + 7; // copy the replacement without trailing '\0' for (ii = 0; ii < xlen; ii++) if (*copy_ptr) *cut_line++ = *copy_ptr++; else *cut_line++ = ' '; tfree(del_ptr); tfree(exp_ptr); tfree(out_ptr); } // or we have '={par({ ... })}' else if (ciprefix("={par({", (str_ptr-2))) { // find myoutput beg_ptr = end_ptr = str_ptr - 2; while (*beg_ptr != ' ') beg_ptr--; out_ptr = copy_substring(beg_ptr + 1, end_ptr); cut_line = beg_ptr + 1; // find expression beg_ptr = end_ptr = str_ptr + 5; while ((*end_ptr != ' ') && (*end_ptr != '\0')) end_ptr++; exp_ptr = copy_substring(beg_ptr, end_ptr-3); // Bout_ptr out_ptr 0 V = v(expr_ptr) xlen = 2*strlen(out_ptr) + strlen(exp_ptr)+ 15 - 2*3 + 1; ckt_array[pai] = TMALLOC(char, xlen); sprintf(ckt_array[pai], "b%s %s 0 v = %s", out_ptr, out_ptr, exp_ptr); ckt_array[++pai] = NULL; // length of the replacement V(out_ptr) xlen = strlen(out_ptr) + 1; del_ptr = copy_ptr = TMALLOC(char, xlen); sprintf(copy_ptr, "%s", out_ptr); // length of the replacement part in original line xlen = strlen(out_ptr) + strlen(exp_ptr) + 10; // copy the replacement without trailing '\0' for (ii = 0; ii < xlen; ii++) if (*copy_ptr) *cut_line++ = *copy_ptr++; else *cut_line++ = ' '; tfree(del_ptr); tfree(exp_ptr); tfree(out_ptr); } // nothing to replace else cut_line = str_ptr + 1; } // while 'par(' // no replacement done, go to next line if (pai == paui) continue; // remove white spaces card->li_line = inp_remove_ws(curr_line); // insert new B source line immediately after current line for (ii = paui; ii < pai; ii++) { struct line *x = xx_new_line(NULL, ckt_array[ii], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current variable capacitor line // *(ckt_array[0]) = '*'; // insert new param lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; paui = pai; // continue; } // if .print etc. } // if ('.') } } /* replace a token (length 4 char) in string by spaces, if it is found at the correct position and the total number of tokens is o.k. */ static void replace_token(char *string, char *token, int wherereplace, int total) { int count = 0, i; char *actstring = string; /* token to be replaced not in string */ if (strstr(string, token) == NULL) return; /* get total number of tokens */ while (*actstring) { txfree(gettok(&actstring)); count++; } /* If total number of tokens correct */ if (count == total) { actstring = string; for (i = 1; i < wherereplace; i++) txfree(gettok(&actstring)); /* If token to be replaced at right position */ if (ciprefix(token, actstring)) { actstring[0] = ' '; actstring[1] = ' '; actstring[2] = ' '; actstring[3] = ' '; } } } /* lines for B sources: no parsing in numparam code, just replacement of parameters. Parsing done in B source parser. To achive this, do the following: Remove all '{' and '}' --> no parsing of equations in numparam Place '{' and '}' directly around all potential parameters, but skip function names like exp (search for 'exp(' to detect fcn name), functions containing nodes like v(node), v(node1, node2), i(branch) and other keywords like TEMPER. --> Only parameter replacement in numparam */ static void inp_bsource_compat(struct line *card) { char *equal_ptr, *str_ptr, *tmp_char, *new_str, *final_str; char actchar; struct line *new_line; wordlist *wl = NULL, *wlist = NULL; char buf[512]; size_t i, xlen, ustate = 0; int skip_control = 0; int error1; for (; card; card = card->li_next) { char *curr_line = card->li_line; /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (*curr_line == 'b') { /* remove white spaces of everything inside {}*/ card->li_line = inp_remove_ws(card->li_line); curr_line = card->li_line; /* store starting point for later parsing, beginning of {expression} */ equal_ptr = strchr(curr_line, '='); /* check for errors */ if (equal_ptr == NULL) { fprintf(stderr, "ERROR: mal formed B line: %s\n", curr_line); controlled_exit(EXIT_FAILURE); } /* find the m={m} token and remove it */ if ((str_ptr = strstr(curr_line, "m={m}")) != NULL) memcpy(str_ptr, " ", 5); /* scan the line and remove all '{' and '}' */ str_ptr = curr_line; while (*str_ptr) { if ((*str_ptr == '{') || (*str_ptr == '}')) *str_ptr = ' '; str_ptr++; } /* scan the expression */ str_ptr = equal_ptr + 1; while (*str_ptr != '\0') { str_ptr = skip_ws(str_ptr); if (*str_ptr == '\0') break; actchar = *str_ptr; wl_append_word(&wlist, &wl, NULL); if ((actchar == ',') || (actchar == '(') || (actchar == ')') || (actchar == '*') || (actchar == '/') || (actchar == '^') || (actchar == '+') || (actchar == '?') || (actchar == ':')) { if ((actchar == '*') && (str_ptr[1] == '*')) { actchar = '^'; str_ptr++; } buf[0] = actchar; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; if (actchar == ')') ustate = 0; else ustate = 1; /* we have an operator */ } else if ((actchar == '>') || (actchar == '<') || (actchar == '!') || (actchar == '=')) { /* >=, <=, !=, ==, <>, ... */ char *beg = str_ptr++; if ((*str_ptr == '=') || (*str_ptr == '<') || (*str_ptr == '>')) str_ptr++; wl->wl_word = copy_substring(beg, str_ptr); ustate = 1; /* we have an operator */ } else if ((actchar == '|') || (actchar == '&')) { char *beg = str_ptr++; if ((*str_ptr == '|') || (*str_ptr == '&')) str_ptr++; wl->wl_word = copy_substring(beg, str_ptr); ustate = 1; /* we have an operator */ } else if ((actchar == '-') && (ustate == 0)) { buf[0] = actchar; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; ustate = 1; /* we have an operator */ } else if ((actchar == '-') && (ustate == 1)) { wl->wl_word = copy(""); str_ptr++; ustate = 2; /* place a '-' in front of token */ } else if (isalpha(actchar)) { /* unary -, change sign */ if (ustate == 2) { i = 1; buf[0] = '-'; } else { i = 0; } if (((actchar == 'v') || (actchar == 'i')) && (str_ptr[1] == '(')) { while (*str_ptr != ')') { buf[i] = *str_ptr; i++; str_ptr++; } buf[i] = *str_ptr; buf[i+1] = '\0'; wl->wl_word = copy(buf); str_ptr++; } else { while (isalnum(*str_ptr) || (*str_ptr == '!') || (*str_ptr == '#') || (*str_ptr == '$') || (*str_ptr == '%') || (*str_ptr == '_') || (*str_ptr == '[') || (*str_ptr == ']')) { buf[i] = *str_ptr; i++; str_ptr++; } buf[i] = '\0'; /* no parens {} around time, hertz, temper, the constants pi and e which are defined in inpptree.c, around pwl and temp. coeffs */ if ((*str_ptr == '(') || cieq(buf, "hertz") || cieq(buf, "temper") || cieq(buf, "time") || cieq(buf, "pi") || cieq(buf, "e") || cieq(buf, "pwl")) { /* special handling of pwl lines: Put braces around tokens and around expressions, use ',' as separator like: pwl(i(Vin), {x0-1},{y0}, {x0},{y0},{x1},{y1}, {x2},{y2},{x3},{y3}, {x3+1},{y3}) */ /* * if (cieq(buf, "pwl")) { * // go past i(Vin) * i = 3; * while (*str_ptr != ')') { * buf[i] = *str_ptr; * i++; * str_ptr++; * } * buf[i] = *str_ptr; * i++; * str_ptr++; * // find first ',' * while (*str_ptr != ',') { * buf[i] = *str_ptr; * i++; * str_ptr++; * } * buf[i] = *str_ptr; * i++; * buf[i] = '{'; * i++; * str_ptr++; * while (*str_ptr != ')') { * if (*str_ptr == ',') { * buf[i] = '}'; * i++; * buf[i] = ','; * i++; * buf[i] = '{'; * i++; * str_ptr++; * } * else { * buf[i] = *str_ptr; * i++; * str_ptr++; * } * } * buf[i] = '}'; * i++; * buf[i] = *str_ptr; * i++; * buf[i] = '\0'; * str_ptr++; * } */ wl->wl_word = copy(buf); } else if (cieq(buf, "tc1") || cieq(buf, "tc2") || cieq(buf, "reciproctc")) { str_ptr = skip_ws(str_ptr); /* no {} around tc1 = or tc2 = , these are temp coeffs. */ if (str_ptr[0] == '=' && str_ptr[1] != '=') { buf[i++] = '='; buf[i] = '\0'; str_ptr++; wl->wl_word = copy(buf); } else { xlen = strlen(buf); tmp_char = TMALLOC(char, xlen + 3); sprintf(tmp_char, "{%s}", buf); wl->wl_word = tmp_char; } } else { /* {} around all other tokens */ xlen = strlen(buf); tmp_char = TMALLOC(char, xlen + 3); sprintf(tmp_char, "{%s}", buf); wl->wl_word = tmp_char; } } ustate = 0; /* we have a number */ } else if (isdigit(actchar) || (actchar == '.')) { /* allow .5 format too */ /* allow 100p, 5MEG etc. */ double dvalue = INPevaluate(&str_ptr, &error1, 0); char cvalue[19]; /* unary -, change sign */ if (ustate == 2) dvalue *= -1; sprintf(cvalue, "%18.10e", dvalue); wl->wl_word = copy(cvalue); ustate = 0; /* we have a number */ /* skip the `unit', FIXME INPevaluate() should do this */ while (isalpha(*str_ptr)) str_ptr++; } else { /* strange char */ printf("Preparing B line for numparam\nWhat is this?\n%s\n", str_ptr); buf[0] = *str_ptr; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; } } new_str = wl_flatten(wlist); wl_free(wlist); wlist = NULL; wl = NULL; tmp_char = copy(curr_line); equal_ptr = strchr(tmp_char, '='); if (str_ptr == NULL) { fprintf(stderr, "ERROR: mal formed B line:\n %s\n", curr_line); controlled_exit(EXIT_FAILURE); } /* cut the tmp_char after the equal sign */ equal_ptr[1] = '\0'; xlen = strlen(tmp_char) + strlen(new_str) + 2; final_str = TMALLOC(char, xlen); sprintf(final_str, "%s %s", tmp_char, new_str); /* Copy old line numbers into new B source line */ new_line = xx_new_line(card->li_next, final_str, card->li_linenum, card->li_linenum_orig); // comment out current line (old B source line) *(card->li_line) = '*'; // insert new B source line immediately after current line card->li_next = new_line; // point 'card' pointer to the new line card = new_line; tfree(new_str); tfree(tmp_char); } /* end of if 'b' */ } /* end of for loop */ } /* Find all expressions containing the keyword 'temper', * except for B lines and some other exclusions. Prepare * these expressions by calling inp_modify_exp() and return * a modified card->li_line */ static void inp_temper_compat(struct line *card) { int skip_control = 0; char *beg_str, *end_str, *beg_tstr, *end_tstr, *exp_str; char actchar; for (; card; card = card->li_next) { char *new_str = NULL; char *curr_line = card->li_line; if (curr_line == NULL) continue; /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } /* exclude some elements */ if ((*curr_line == '*') || (*curr_line == 'v') || (*curr_line == 'b') || (*curr_line == 'i') || (*curr_line == 'e') || (*curr_line == 'g') || (*curr_line == 'f') || (*curr_line == 'h')) continue; /* exclude all dot commands except .model */ if ((*curr_line == '.') && (!prefix(".model", curr_line))) continue; /* exclude lines not containing 'temper' */ if (strstr(curr_line, "temper") == NULL) continue; /* now start processing of the remaining lines containing 'temper' */ /* remove white spaces of everything inside {}*/ card->li_line = inp_remove_ws(card->li_line); curr_line = card->li_line; /* now check if 'temper' is a token or just a substring of another string, e.g. mytempers */ /* we may have multiple temper and mytempers in multiple expressions in a line */ beg_str = beg_tstr = curr_line; while ((beg_tstr = strstr(beg_tstr, "temper")) != NULL) { actchar = *(beg_tstr - 1); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '{')) { beg_tstr++; continue; } actchar = *(beg_tstr + 6); if (!isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',') && !(actchar == '}')) { beg_tstr++; continue; } /* we have found a true 'temper' */ /* set the global variable */ expr_w_temper = TRUE; /* find the expression: first go back to the opening '{', then find the closing '}' */ while ((*beg_tstr) != '{') beg_tstr--; end_str = end_tstr = beg_tstr; exp_str = gettok_char(&end_tstr, '}', TRUE, TRUE); /* modify the expression string */ exp_str = inp_modify_exp(exp_str); /* add the intermediate string between previous and next expression to the new line */ new_str = INPstrCat(new_str, copy_substring(beg_str, end_str), " "); /* add the modified expression string to the new line */ new_str = INPstrCat(new_str, exp_str, " "); new_str = INPstrCat(new_str, copy(" "), " "); /* move on to the next intermediate string */ beg_str = beg_tstr = end_tstr; } if (*beg_str) new_str = INPstrCat(new_str, copy(beg_str), " "); tfree(card->li_line); card->li_line = inp_remove_ws(new_str); } } /* lines containing expressions with keyword 'temper': * no parsing in numparam code, just replacement of parameters. * Parsing done with B source parser in function inp_parse_temper * in inp.c. Evaluation is the done with fcn inp_evaluate_temper * from inp.c, taking the actual temperature into account. * To achive this, do the following here: * Remove all '{' and '}' --> no parsing of equations in numparam * Place '{' and '}' directly around all potential parameters, * but skip function names like exp (search for 'exp(' to detect fcn name), * functions containing nodes like v(node), v(node1, node2), i(branch) * and other keywords like TEMPER. --> Only parameter replacement in numparam */ static char * inp_modify_exp(char* expr) { char * str_ptr, *tmp_char, *new_str; char actchar; wordlist *wl = NULL, *wlist = NULL; char buf[512]; size_t i, xlen, ustate = 0; int error1; /* scan the expression and remove all '{' and '}' */ str_ptr = expr; while (*str_ptr) { if ((*str_ptr == '{') || (*str_ptr == '}')) *str_ptr = ' '; str_ptr++; } /* scan the expression */ str_ptr = expr; while (*str_ptr != '\0') { str_ptr = skip_ws(str_ptr); if (*str_ptr == '\0') break; actchar = *str_ptr; wl_append_word(&wlist, &wl, NULL); if ((actchar == ',') || (actchar == '(') || (actchar == ')') || (actchar == '*') || (actchar == '/') || (actchar == '^') || (actchar == '+') || (actchar == '?') || (actchar == ':')) { if ((actchar == '*') && (str_ptr[1] == '*')) { actchar = '^'; str_ptr++; } buf[0] = actchar; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; if (actchar == ')') ustate = 0; else ustate = 1; /* we have an operator */ } else if ((actchar == '>') || (actchar == '<') || (actchar == '!') || (actchar == '=')) { /* >=, <=, !=, ==, <>, ... */ char *beg = str_ptr++; if ((*str_ptr == '=') || (*str_ptr == '<') || (*str_ptr == '>')) str_ptr++; wl->wl_word = copy_substring(beg, str_ptr); ustate = 1; /* we have an operator */ } else if ((actchar == '|') || (actchar == '&')) { char *beg = str_ptr++; if ((*str_ptr == '|') || (*str_ptr == '&')) str_ptr++; wl->wl_word = copy_substring(beg, str_ptr); ustate = 1; /* we have an operator */ } else if ((actchar == '-') && (ustate == 0)) { buf[0] = actchar; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; ustate = 1; /* we have an operator */ } else if ((actchar == '-') && (ustate == 1)) { wl->wl_word = copy(""); str_ptr++; ustate = 2; /* place a '-' in front of token */ } else if (isalpha(actchar)) { /* unary -, change sign */ if (ustate == 2) { i = 1; buf[0] = '-'; } else { i = 0; } if (((actchar == 'v') || (actchar == 'i')) && (str_ptr[1] == '(')) { while (*str_ptr != ')') { buf[i] = *str_ptr; i++; str_ptr++; } buf[i] = *str_ptr; buf[i+1] = '\0'; wl->wl_word = copy(buf); str_ptr++; } else { while (isalnum(*str_ptr) || (*str_ptr == '!') || (*str_ptr == '#') || (*str_ptr == '$') || (*str_ptr == '%') || (*str_ptr == '_') || (*str_ptr == '[') || (*str_ptr == ']')) { buf[i] = *str_ptr; i++; str_ptr++; } buf[i] = '\0'; /* no parens {} around time, hertz, temper, the constants pi and e which are defined in inpptree.c, around pwl and temp. coeffs */ if ((*str_ptr == '(') || cieq(buf, "hertz") || cieq(buf, "temper") || cieq(buf, "time") || cieq(buf, "pi") || cieq(buf, "e") || cieq(buf, "pwl")) { wl->wl_word = copy(buf); } else if (cieq(buf, "tc1") || cieq(buf, "tc2") || cieq(buf, "reciproctc")) { str_ptr = skip_ws(str_ptr); /* no {} around tc1 = or tc2 = , these are temp coeffs. */ if (str_ptr[0] == '=' && str_ptr[1] != '=') { buf[i++] = '='; buf[i] = '\0'; str_ptr++; wl->wl_word = copy(buf); } else { xlen = strlen(buf); tmp_char = TMALLOC(char, xlen + 3); sprintf(tmp_char, "{%s}", buf); wl->wl_word = tmp_char; } } else { /* {} around all other tokens */ xlen = strlen(buf); tmp_char = TMALLOC(char, xlen + 3); sprintf(tmp_char, "{%s}", buf); wl->wl_word = tmp_char; } } ustate = 0; /* we have a number */ } else if (isdigit(actchar) || (actchar == '.')) { /* allow .5 format too */ /* allow 100p, 5MEG etc. */ double dvalue = INPevaluate(&str_ptr, &error1, 0); char cvalue[19]; /* unary -, change sign */ if (ustate == 2) dvalue *= -1; sprintf(cvalue, "%18.10e", dvalue); wl->wl_word = copy(cvalue); ustate = 0; /* we have a number */ /* skip the `unit', FIXME INPevaluate() should do this */ while (isalpha(*str_ptr)) str_ptr++; } else { /* strange char */ printf("Preparing expression for numparam\nWhat is this?\n%s\n", str_ptr); buf[0] = *str_ptr; buf[1] = '\0'; wl->wl_word = copy(buf); str_ptr++; } } new_str = wl_flatten(wlist); wl_free(wlist); wlist = NULL; wl = NULL; tfree(expr); return(new_str); } /* * destructively fetch a token from the input string * token is either quoted, or a plain nonwhitespace sequence * function will return the place from where to continue */ static char * get_quoted_token(char *string, char **token) { char *s = skip_ws(string); if (!*s) /* nothing found */ return string; if (isquote(*s)) { char *t = ++s; while (*t && !isquote(*t)) t++; if (!*t) { /* teriminator quote not found */ *token = NULL; return string; } *t++ = '\0'; *token = s; return t; } else { char *t = skip_non_ws(s); if (t == s) { /* nothing found */ *token = NULL; return string; } if (*t) *t++ = '\0'; *token = s; return t; } } /* Option RSERIES=rval * Lxxx n1 n2 Lval * --> * Lxxx n1 n2_intern__ Lval * RLxxx_n2_intern__ n2_intern__ n2 rval */ static void inp_add_series_resistor(struct line *deck) { size_t skip_control = 0, xlen, i; bool has_rseries = FALSE; struct line *card; char *tmp_p, *title_tok, *node1, *node2, *rval = NULL; char *ckt_array[10]; struct line *param_end = NULL, *param_beg = NULL; for (card = deck; card; card = card->li_next) { char *curr_line = card->li_line; if (*curr_line == '*') continue; if (strstr(curr_line, "option") && strstr(curr_line, "rseries")) has_rseries = TRUE; else continue; tmp_p = strstr(curr_line, "rseries"); tmp_p += 7; /* default to "1e-3" if no value given */ if (ciprefix("=", tmp_p)) { tmp_p = strchr(tmp_p, '=') + 1; rval = gettok(&tmp_p); } else rval = copy("1e-3"); } if (!has_rseries || !rval) return; fprintf(stdout, "\nOption rseries given: \n" "resistor %s Ohms added in series to each inductor L\n\n", rval); for (card = deck; card; card = card->li_next) { char *cut_line; char *curr_line = cut_line = card->li_line; /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (ciprefix("l", curr_line)) { title_tok = gettok(&cut_line); node1 = gettok(&cut_line); node2 = gettok(&cut_line); /* new L line */ xlen = strlen(curr_line) + 10; ckt_array[0] = TMALLOC(char, xlen); sprintf(ckt_array[0], "%s %s %s_intern__ %s", title_tok, node1, node2, cut_line); /* new R line */ xlen = strlen(curr_line) + 19; ckt_array[1] = TMALLOC(char, xlen); sprintf(ckt_array[1], "R%s_intern__ %s_intern__ %s %s", title_tok, node2, node2, rval); /* assemble new L and R lines */ for (i = 0; i < 2; i++) { struct line *x = xx_new_line(NULL, ckt_array[i], 0, 0); if (param_end) param_end->li_next = x; else param_beg = x; param_end = x; } // comment out current L line *(card->li_line) = '*'; // insert new new L and R lines immediately after current line param_end->li_next = card->li_next; card->li_next = param_beg; // point 'card' pointer to last in scalar list card = param_end; param_beg = param_end = NULL; tfree(title_tok); tfree(node1); tfree(node2); } } tfree(rval); } /* * rewrite * .subckt node1 node2 node3 name params: l={x} w={y} * to * .subckt node1 node2 node3 name * .param l={x} w={y} */ static void subckt_params_to_param(struct line *card) { for (; card; card = card->li_next) { char *curr_line = card->li_line; if (ciprefix(".subckt", curr_line)) { char *cut_line, *new_line; cut_line = strstr(curr_line, "params:"); if (!cut_line) continue; /* new_line starts with "params: " */ new_line = copy(cut_line); /* replace "params:" by ".param " */ memcpy(new_line, ".param ", 7); /* card->li_line ends with subcircuit name */ cut_line[-1] = '\0'; /* insert new_line after card->li_line */ card->li_next = xx_new_line(card->li_next, new_line, card->li_linenum + 1, 0); } } } /* If XSPICE option is not selected, run this function to alert and exit if the 'poly' option is found in e, g, f, or h controlled sources. */ #ifndef XSPICE static void inp_poly_err(struct line *card) { size_t skip_control = 0; for (; card; card = card->li_next) { char *curr_line = card->li_line; if (*curr_line == '*') continue; /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } /* get the fourth token in a controlled source line and exit, if it is 'poly' */ if ((ciprefix("e", curr_line)) || (ciprefix("g", curr_line)) || (ciprefix("f", curr_line)) || (ciprefix("h", curr_line))) { txfree(gettok(&curr_line)); txfree(gettok(&curr_line)); txfree(gettok(&curr_line)); if (ciprefix("poly", curr_line)) { fprintf(stderr, "\nError: XSPICE is required to run the 'poly' option in line %d\n", card->li_linenum_orig); fprintf(stderr, " %s\n", card->li_line); fprintf(stderr, "\nSee manual chapt. 31 for installation instructions\n"); controlled_exit(EXIT_BAD); } } } } #endif void tprint(struct line *t) { struct line *tmp; /*debug: print into file*/ FILE *fd = fopen("tprint-out.txt", "w"); for (tmp = t; tmp; tmp = tmp->li_next) if (*(tmp->li_line) != '*') fprintf(fd, "%6d %6d %s\n", tmp->li_linenum_orig, tmp->li_linenum, tmp->li_line); fprintf(fd, "\n*********************************************************************************\n"); fprintf(fd, "*********************************************************************************\n"); fprintf(fd, "*********************************************************************************\n\n"); for (tmp = t; tmp; tmp = tmp->li_next) fprintf(fd, "%6d %6d %s\n", tmp->li_linenum_orig, tmp->li_linenum, tmp->li_line); fprintf(fd, "\n*********************************************************************************\n"); fprintf(fd, "*********************************************************************************\n"); fprintf(fd, "*********************************************************************************\n\n"); for (tmp = t; tmp; tmp = tmp->li_next) if (*(tmp->li_line) != '*') fprintf(fd, "%s\n",tmp->li_line); fclose(fd); } /* prepare .if and .elseif for numparam .if(expression) --> .if{expression} */ static void inp_dot_if(struct line *card) { for (; card; card = card->li_next) { char *curr_line = card->li_line; if (*curr_line == '*') continue; if (ciprefix(".if", curr_line) || ciprefix(".elseif", curr_line)) { char *firstbr = strchr(curr_line, '('); char *lastbr = strrchr(curr_line, ')'); if ((!firstbr) || (!lastbr)) { fprintf(cp_err, "Error in netlist line %d\n", card->li_linenum_orig); fprintf(cp_err, " Bad syntax: %s\n\n", curr_line); controlled_exit(EXIT_BAD); } *firstbr = '{'; *lastbr = '}'; } } } /* Convert .param lines containing keyword 'temper' into .func lines: * .param xxx1 = 'temper + 25' ---> .func xxx1() 'temper + 25' * Add info about the functions (name, subcircuit depth, number of * subckt) to linked list new_func. * Then scan new_func, for each xxx1 scan all lines of deck, * find all xxx1 and convert them to a function: * xxx1 ---> xxx1() * If this happens to be in another .param line, convert it to .func, * add info to end of new_func and continue scanning. */ static void inp_fix_temper_in_param(struct line *deck) { int skip_control = 0, subckt_depth = 0, j, *sub_count; char *beg_pstr, *beg_tstr, *end_tstr, *funcbody, *funcname; char actchar; struct func_temper *new_func = NULL, *beg_func; struct line *card; sub_count = TMALLOC(int, 16); for(j = 0; j < 16; j++) sub_count[j] = 0; /* first pass: determine all .param with temper inside and replace by .func .param xxx1 = 'temper + 25' will become .func xxx1() 'temper + 25' */ card = deck; for (; card; card = card->li_next) { char *curr_line = card->li_line; if (*curr_line == '*') continue; /* determine nested depths of subcircuits */ if (ciprefix(".subckt", curr_line)) { subckt_depth ++; sub_count[subckt_depth]++; continue; } else if (ciprefix(".ends", curr_line)) { subckt_depth --; continue; } /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } if (ciprefix(".param", curr_line)) { /* check if we have a true 'temper' */ beg_tstr = curr_line; while ((end_tstr = beg_tstr = strstr(beg_tstr, "temper")) != NULL) { actchar = *(beg_tstr - 1); if (!(actchar == '{') && !isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',')) { beg_tstr++; continue; } actchar = *(beg_tstr + 6); if (actchar == '=') { fprintf(stderr, "Error: you cannot assign a value to TEMPER\n"); fprintf(stderr, " Line no. %d, %s\n", card->li_linenum, curr_line); controlled_exit(EXIT_BAD); } if (!(actchar == '}') && !isspace(actchar) && !is_arith_char(actchar) && !(actchar == ',')) { beg_tstr++; continue; } /* we have found a true 'temper', so start conversion */ /* find function name and function body: We may have multiple params in a linie! */ while ((*beg_tstr) != '=') beg_tstr--; beg_pstr = beg_tstr; /* go back over param name */ while(isspace(*beg_pstr)) beg_pstr--; while(!isspace(*beg_pstr)) beg_pstr--; /* get function name from parameter name */ funcname = copy_substring(beg_pstr + 1, beg_tstr); /* find end of function body */ while (((*end_tstr) != '\0') && ((*end_tstr) != '=')) end_tstr++; /* go back over next param name */ if (*end_tstr == '=') { end_tstr--; while(isspace(*end_tstr)) end_tstr--; while(!isspace(*end_tstr)) end_tstr--; } funcbody = copy_substring(beg_tstr + 1, end_tstr); inp_new_func(funcname, funcbody, card, &new_func, sub_count, subckt_depth); tfree(funcbody); beg_tstr = end_tstr; } } } /* second pass */ /* for each .func entry in new_func start the insertion operation: search each line from the deck, which has the suitable subcircuit nesting data, for tokens xxx equalling the funcname, replace xxx by xxx(). After insertion, remove the respective entry in new_fuc. If the replacement is done in a .param line, convert it to a .func line and add an entry to new_func. Continue until new_func is empty. */ beg_func = new_func; for (; new_func; new_func = new_func->next) { for(j = 0; j < 16; j++) sub_count[j] = 0; card = deck; for (; card; card = card->li_next) { char *new_str = NULL; /* string we assemble here */ char *curr_line = card->li_line; char * new_tmp_str, *tmp_str, *firsttok_str; /* Some new variables... */ char *chp; char *chp_start; char *var_name; char ch; int state; if (*curr_line == '*') continue; /* determine nested depths of subcircuits */ if (ciprefix(".subckt", curr_line)) { subckt_depth ++; sub_count[subckt_depth]++; continue; } else if (ciprefix(".ends", curr_line)) { subckt_depth --; continue; } /* exclude any command inside .control ... .endc */ if (ciprefix(".control", curr_line)) { skip_control ++; continue; } else if (ciprefix(".endc", curr_line)) { skip_control --; continue; } else if (skip_control > 0) { continue; } /* exclude lines which do not have the same subcircuit nesting depth and number as found in new_func */ if (subckt_depth != new_func->subckt_depth) continue; if (sub_count[subckt_depth] != new_func->subckt_count) continue; /* remove first token, ignore it here, restore it later */ firsttok_str = gettok(&curr_line); if (*curr_line == '\0') { tfree(firsttok_str); continue; } /* This is the new code - it finds each variable name and checks it against new_func->funcname */ for (state = 0, var_name = chp_start = chp = curr_line; ; chp++) { switch(state) { case 0: /* in state 0 we are looking for the first character of a variable name, which has to be an alphabetic character. */ if (isalpha(*chp)) { state = 1; var_name = chp; } break; case 1: /* In state 1 we are looking for the last character of a variable name. The variable name consists of alphanumeric characters and special characters, which are defined above as VALIDCHARS. */ state = (*chp) && (isalphanum(*chp) || strchr(VALIDCHARS, *chp)); if (!state) { ch = *chp; *chp = 0; if (strcmp(var_name, new_func->funcname) == 0 && ch != '(') { new_str = INPstrCat(new_str, copy(chp_start), ""); new_str = INPstrCat(new_str, copy("()"), ""); chp_start=chp; } *chp = ch; } break; } if (!(*chp)) break; } if (new_str) { /* add final part of line */ new_str = INPstrCat(new_str, copy(chp_start), ""); /* restore first part of the line */ new_str = INPstrCat(firsttok_str, new_str, " "); new_str = inp_remove_ws(new_str); } else continue; /* if we have inserted into a .param line, convert to .func */ new_tmp_str = new_str; if (prefix(".param", new_tmp_str)) { tmp_str = gettok(&new_tmp_str); tfree(tmp_str); funcname = gettok_char(&new_tmp_str, '=', FALSE, FALSE); funcbody = copy(new_tmp_str + 1); inp_new_func(funcname, funcbody, card, &new_func, sub_count, subckt_depth); tfree(new_str); tfree(funcbody); } else { /* Or just enter new line into deck */ card->li_next = xx_new_line(card->li_next, new_str, 0, card->li_linenum); *card->li_line = '*'; } } } /* final memory clearance */ tfree(sub_count); /* remove new_func */ inp_rem_func(&beg_func); } /* enter function name, nested .subckt depths, and * number of .subckt at given level into struct new_func * and add line to deck */ static void inp_new_func(char *funcname, char *funcbody, struct line *card, struct func_temper **new_func, int *sub_count, int subckt_depth) { struct func_temper *new_func_tmp; static struct func_temper *new_func_end; char *new_str; new_func_tmp = TMALLOC(struct func_temper, 1); new_func_tmp->funcname = funcname; new_func_tmp->next = NULL; new_func_tmp->subckt_depth = subckt_depth; new_func_tmp->subckt_count = sub_count[subckt_depth]; /* Insert at the back */ if (*new_func == NULL) { *new_func = new_func_end = new_func_tmp; } else { new_func_end->next = new_func_tmp; new_func_end = new_func_tmp; } /* replace line in deck */ new_str = TMALLOC(char, strlen(funcname) + strlen(funcbody) + 10); sprintf(new_str, ".func %s() %s", funcname, funcbody); card->li_next = xx_new_line(card->li_next, new_str, 0, card->li_linenum); *card->li_line = '*'; } static void inp_rem_func(struct func_temper **beg_func) { struct func_temper *next_func; for(; *beg_func; *beg_func = next_func) { next_func = (*beg_func)->next; tfree((*beg_func)->funcname); tfree((*beg_func)); } } ngspice-26/src/frontend/Makefile.am0000644000265600020320000000606212264261473016677 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = plotting help parser wdisp numparam trannoise DIST_SUBDIRS = plotting help parser wdisp numparam trannoise EXTRA_DIST = testcommands.c parse-bison.y ## For Windows with Visual Studio EXTRA_DIST += parse-bison.c parse-bison.h noinst_LTLIBRARIES = libfte.la libfte_la_SOURCES = \ com_measure2.c \ com_measure2.h \ commands.c \ commands.h \ com_ahelp.c \ com_ahelp.h \ com_alias.c \ com_alias.h \ com_asciiplot.c \ com_asciiplot.h \ com_cdump.c \ com_cdump.h \ com_chdir.c \ com_chdir.h \ com_compose.c \ com_compose.h \ com_commands.h \ com_dl.c \ com_dl.h \ com_display.c \ com_display.h \ com_dump.c \ com_dump.h \ com_echo.c \ com_echo.h \ com_ghelp.c \ com_ghelp.h \ com_gnuplot.h \ com_gnuplot.c \ com_hardcopy.c \ com_hardcopy.h \ com_help.c \ com_help.h \ com_history.c \ com_history.h \ com_let.c \ com_let.h \ com_option.c \ com_option.h \ com_plot.c \ com_plot.h \ com_rehash.c \ com_rehash.h \ com_set.c \ com_set.h \ com_setscale.c \ com_setscale.h \ com_shell.c \ com_shell.h \ com_shift.c \ com_shift.h \ com_fft.c \ com_fft.h \ com_state.c \ com_state.h \ com_strcmp.c \ com_strcmp.h \ com_sysinfo.c \ com_unset.c \ com_unset.h \ com_xgraph.c \ com_xgraph.h \ completion.h \ control.h \ control.c \ ftehelp.h \ ftesopt.c \ hcomp.c \ hcomp.h \ init.c \ init.h \ quote.c \ quote.h \ streams.h \ streams.c \ terminal.c \ terminal.h \ variable.c \ variable.h \ \ arg.c \ arg.h \ aspice.c \ aspice.h \ breakp.c \ breakp.h \ breakp2.c \ breakp2.h \ circuits.c \ circuits.h \ cpitf.c \ cpitf.h \ define.c \ define.h \ device.c \ device.h \ diff.c \ diff.h \ dimens.c \ dimens.h \ display.c \ display.h \ dotcards.c \ dotcards.h \ error.c \ evaluate.c \ evaluate.h \ fourier.c \ fourier.h \ gens.c \ gens.h \ hpgl.c \ hpgl.h \ inp.c \ inp.h \ inpcom.c \ inpcom.h \ interp.c \ interp.h \ inventory.c \ linear.c \ linear.h \ measure.c \ misccoms.c \ misccoms.h \ miscvars.c \ miscvars.h \ mw_coms.c \ mw_coms.h \ newcoms.c \ newcoms.h \ nutinp.c \ nutinp.h \ nutmegif.c \ nutmegif.h \ options.c \ options.h \ outitf.c \ outitf.h \ parse.c \ parse.h \ points.c \ points.h \ postcoms.c \ postcoms.h \ postsc.c \ postsc.h \ rawfile.c \ rawfile.h \ resource.c \ resource.h \ runcoms.c \ runcoms.h \ runcoms2.c \ runcoms2.h \ shyu.c \ shyu.h \ signal_handler.c \ signal_handler.h \ spec.c \ spec.h \ spiceif.c \ spiceif.h \ subckt.c \ subckt.h \ typesdef.c \ typesdef.h \ vectors.c \ vectors.h \ where.c \ where.h # TESTS = testcommands # # bin_PROGRAMS = testcommands # # testcommands_SOURCES = \ # testcommands.c \ # testcommands.h # # testcommands_LDADD = libfte.a plotting/libplotting.a ../misc/libmisc.a AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include @X_CFLAGS@ AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in parse-bison.c parse-bison.h : parse-bison.y bison $(srcdir)/parse-bison.y $(srcdir)/parse.c : parse-bison.c ngspice-26/src/frontend/cpitf.c0000644000265600020320000002744512264261473016124 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group ***********/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteparse.h" #include "cpitf.h" #include "com_let.h" #include "com_set.h" #include "define.h" #include "misccoms.h" #include "terminal.h" #include "completion.h" #include "variable.h" /* Set some standard variables and aliases, etc, and init the ccom stuff. Called by fcn main() */ void ft_cpinit(void) { bool found = FALSE, t = TRUE; char buf[BSIZE_SP], **x, *s, *r, *copys; struct comm *c; int i; FILE *fp; static char *predefs[] = { "yes", "1", "TRUE", "1", "no", "0", "FALSE", "0", "pi", "3.14159265358979323846", "e", "2.71828182844590452353", "c", "2.997925e8", "i", "0,1", "kelvin", "-273.15", "echarge", "1.60219e-19", "boltz", "1.38062e-23", "planck", "6.62620e-34" }; static char *udfs[] = { "max(x,y)", "(x gt y) * x + (x le y) * y", "min(x,y)", "(x lt y) * x + (x ge y) * y", "vdb(x)", "db(v(x))", "vdb(x,y)", "db(v(x) - v(y))", "vi(x)", "im(v(x))", "vi(x,y)", "im(v(x) - v(y))", "vm(x)", "mag(v(x))", "vm(x,y)", "mag(v(x) - v(y))", "vg(x)", "group_delay(v(x))", //A.Rroldan 10/06/05 group delay new function "gd(x)", "group_delay(v(x))", //A.Rroldan 10/06/05 group delay new function "vp(x)", "ph(v(x))", "vp(x,y)", "ph(v(x) - v(y))", "vr(x)", "re(v(x))", "vr(x,y)", "re(v(x) - v(y))" }; /* if TIOCSTI is defined (not available in MS Windows: Make escape the break character. So the user can type ahead... fcn defined in complete.c. */ cp_ccon(TRUE); /* Initialize io, cp_chars[], variable "history" in init.c. */ cp_init(); /* If command completion is available (global variable cp_nocc set in main.c by command line option -q) */ if (!cp_nocc) { /* Add commands... */ for (c = cp_coms; c->co_func; c++) { if (c->co_spiceonly && ft_nutmeg) continue; cp_addcomm(c->co_comname, c->co_cctypes[0], c->co_cctypes[1], c->co_cctypes[2], c->co_cctypes[3]); cp_addkword(CT_COMMANDS, c->co_comname); } /* And keywords... These are the ones that are constant... */ if (!ft_nutmeg) { cp_addkword(CT_LISTINGARGS, "deck"); cp_addkword(CT_LISTINGARGS, "logical"); cp_addkword(CT_LISTINGARGS, "physical"); cp_addkword(CT_LISTINGARGS, "expand"); cp_addkword(CT_STOPARGS, "when"); cp_addkword(CT_STOPARGS, "after"); } cp_addkword(CT_PLOT, "new"); cp_addkword(CT_PLOTKEYWORDS, "xlimit"); cp_addkword(CT_PLOTKEYWORDS, "ylimit"); cp_addkword(CT_PLOTKEYWORDS, "vs"); cp_addkword(CT_PLOTKEYWORDS, "xindices"); cp_addkword(CT_PLOTKEYWORDS, "xcompress"); cp_addkword(CT_PLOTKEYWORDS, "xdelta"); cp_addkword(CT_PLOTKEYWORDS, "ydelta"); cp_addkword(CT_PLOTKEYWORDS, "lingrid"); cp_addkword(CT_PLOTKEYWORDS, "loglog"); cp_addkword(CT_PLOTKEYWORDS, "linear"); cp_addkword(CT_PLOTKEYWORDS, "xlog"); cp_addkword(CT_PLOTKEYWORDS, "ylog"); cp_addkword(CT_PLOTKEYWORDS, "polar"); cp_addkword(CT_PLOTKEYWORDS, "smith"); cp_addkword(CT_PLOTKEYWORDS, "smithgrid"); cp_addkword(CT_PLOTKEYWORDS, "nointerp"); cp_addkword(CT_PLOTKEYWORDS, "title"); cp_addkword(CT_PLOTKEYWORDS, "xlabel"); cp_addkword(CT_PLOTKEYWORDS, "ylabel"); cp_addkword(CT_PLOTKEYWORDS, "linplot"); cp_addkword(CT_PLOTKEYWORDS, "combplot"); cp_addkword(CT_PLOTKEYWORDS, "pointplot"); cp_addkword(CT_RUSEARGS, "time"); cp_addkword(CT_RUSEARGS, "space"); cp_addkword(CT_RUSEARGS, "faults"); cp_addkword(CT_RUSEARGS, "elapsed"); cp_addkword(CT_RUSEARGS, "totiter"); cp_addkword(CT_RUSEARGS, "traniter"); cp_addkword(CT_RUSEARGS, "tranpoints"); cp_addkword(CT_RUSEARGS, "accept"); cp_addkword(CT_RUSEARGS, "rejected"); cp_addkword(CT_RUSEARGS, "time"); cp_addkword(CT_RUSEARGS, "trantime"); cp_addkword(CT_RUSEARGS, "lutime"); cp_addkword(CT_RUSEARGS, "solvetime"); cp_addkword(CT_RUSEARGS, "transolvetime"); cp_addkword(CT_RUSEARGS, "loadtime"); cp_addkword(CT_RUSEARGS, "all"); cp_addkword(CT_VECTOR, "all"); for (x = ft_setkwords; *x; x++) cp_addkword(CT_VARIABLES, *x); for (i = 0; ; i++) { if ((s = ft_typenames(i)) == NULL) break; cp_addkword(CT_TYPENAMES, s); } } cp_vset("program", CP_STRING, cp_program); /* Make the prompt use only the last component of the path... */ if (DIR_TERM) { for (s = cp_program; s && *s; s++) ; s--; while ((s > cp_program) && (*s != DIR_TERM)) s--; if (*s == DIR_TERM) s++; (void) strcpy(buf, s); for (s = buf; *s && (*s != '.'); s++) ; *s = '\0'; (void) strcat(buf, " ! -> "); } else { (void) sprintf(buf, "%s ! -> ", cp_program); } cp_vset("prompt", CP_STRING, buf); cp_vset("noglob", CP_BOOL, &t); cp_vset("brief", CP_BOOL, &t); /* Make vectors from values in predefs[] for the current plot. Define functions from entries in udfs[] (like user defined functions). */ { wordlist wl1, wl2, wl3; wl1.wl_next = &wl2; wl1.wl_prev = NULL; wl2.wl_next = NULL; wl2.wl_prev = &wl1; wl1.wl_word = "if"; wl2.wl_word = "1"; cp_setalias("begin", &wl1); wl1.wl_next = NULL; wl1.wl_word = "end"; cp_setalias("endif", &wl1); cp_setalias("endwhile", &wl1); cp_setalias("endforeach", &wl1); cp_setalias("endrepeat", &wl1); cp_setalias("enddowhile", &wl1); wl1.wl_word = "help"; cp_setalias("?", &wl1); wl1.wl_next = &wl2; wl2.wl_next = &wl3; wl2.wl_prev = &wl1; wl3.wl_prev = &wl2; wl3.wl_next = NULL; wl2.wl_word = "="; for (i = 0; (size_t) i < NUMELEMS(predefs); i += 2) { wl1.wl_word = predefs[i]; wl3.wl_word = predefs[i + 1]; com_let(&wl1); } wl2.wl_next = NULL; for (i = 0; (size_t) i < NUMELEMS(udfs); i += 2) { wl1.wl_word = udfs[i]; wl2.wl_word = udfs[i + 1]; com_define(&wl1); } } /* Reset this for the front end. */ cp_hash = '*'; /* NGSPICEDATADIR has been set to path "$dprefix/share/ngspice" in configure.ac, Spice_Lib_Dir has been set to NGSPICEDATADIR in conf.c, may be overridden by environmental variable SPICE_LIB_DIR in ivars(). Lib_Path has been set to Spice_Lib_Dir adding /scripts in ivars() */ if (Lib_Path && *Lib_Path) { /* set variable 'sourcepath' */ if (Inp_Path && *Inp_Path) (void) sprintf(buf, "sourcepath = ( %s %s %s )", DIR_CWD, Lib_Path, Inp_Path); else (void) sprintf(buf, "sourcepath = ( %s %s )", DIR_CWD, Lib_Path); { wordlist *wl; wl = cp_doglob(cp_lexer(buf)); cp_striplist(wl); com_set(wl); wl_free(wl); } /* Now source the standard startup file spinit or tclspinit. */ /* jump over leading spaces */ for (copys = s = cp_tildexpand(Lib_Path); copys && *copys; ) { while (isspace(*s)) s++; /* copy s into buf until space is seen, r is the actual position */ for (r = buf; *s && !isspace(*s); r++, s++) *r = *s; tfree(copys); /* add a path separator to buf at actual position */ (void) strcpy(r, DIR_PATHSEP); #ifdef TCL_MODULE /* add "tclspinit" to buf after actual position */ (void) strcat(r, "tclspinit"); #else /* add "spinit" to buf after actual position */ (void) strcat(r, "spinit"); #endif if ((fp = fopen(buf, "r")) != NULL) { cp_interactive = FALSE; inp_spsource(fp, TRUE, buf, FALSE); cp_interactive = TRUE; found = TRUE; break; #if defined(HAS_WINGUI) || defined(__MINGW32__) || defined(_MSC_VER) /* search in local directory where ngspice.exe resides */ #if defined TCL_MODULE } else if ((fp = fopen("./tclspinit", "r")) != NULL) { #else } else if ((fp = fopen("./spinit", "r")) != NULL) { #endif cp_interactive = FALSE; inp_spsource(fp, TRUE, buf, FALSE); cp_interactive = TRUE; found = TRUE; break; #endif } else if (ft_controldb) { fprintf(cp_err, "Note: can't open \"%s\".\n", buf); } } if (!found) fprintf(cp_err, "Note: can't find init file.\n"); } tcap_init(); } /* Decide whether a condition is TRUE or not. */ bool cp_istrue(wordlist *wl) { int i; struct dvec *v; struct pnode *names; /* First do all the csh-type stuff here... */ wl = wl_copy(wl); wl = cp_variablesubst(wl); wl = cp_bquote(wl); cp_striplist(wl); names = ft_getpnames(wl, TRUE); wl_free(wl); v = ft_evaluate(names); for (; v; v = v->v_link2) if (isreal(v)) { for (i = 0; i < v->v_length; i++) if (v->v_realdata[i] != 0.0) { free_pnode(names); return (TRUE); } } else { for (i = 0; i < v->v_length; i++) if ((realpart(v->v_compdata[i]) != 0.0) || (imagpart(v->v_compdata[i]) != 0.0)) { free_pnode(names); return (TRUE); } } free_pnode(names); return (FALSE); } /* This gets called before every command is executed... from fcns do_command() or do_block() in control.c */ void cp_periodic(void) { ft_setflag = FALSE; ft_intrpt = FALSE; ft_ckspace(); /* check for max. data size (resource.c) */ ft_checkkids(); /* check for jobs (only if OK_ASPICE is defined, apsice.c) */ vec_gc(); /* remove vectors which do not have permanent flag set (vectors.c) */ } void cp_doquit(void) { com_quit(NULL); } /* This is how we deal with emulation of commands by scripts... If the script * is found, then set the variables argc and argv and call the script. Note * that this also allows us to type a filename to load a spice deck... */ bool cp_oddcomm(char *s, wordlist *wl) { FILE *fp; if ((fp = inp_pathopen(s, "r")) != NULL) { char buf[BSIZE_SP]; wordlist *setarg; (void) fclose(fp); (void) sprintf(buf, "argc = %d argv = ( ", wl_length(wl)); while (wl) { (void) strcat(buf, wl->wl_word); (void) strcat(buf, " "); wl = wl->wl_next; } (void) strcat(buf, ")"); setarg = cp_lexer(buf); com_set(setarg); wl_free(setarg); inp_source(s); cp_remvar("argc"); cp_remvar("argv"); return (TRUE); } if (wl && eq(wl->wl_word, "=")) { wordlist *ww = wl_cons(copy(s), wl); com_let(ww); wl_delete_slice(ww, ww->wl_next); return (TRUE); } return (FALSE); } ngspice-26/src/frontend/hcomp.h0000644000265600020320000000014312264261473016114 0ustar andreasadmin#ifndef ngspice_HCOMP_H #define ngspice_HCOMP_H int hcomp(const void *a, const void *b); #endif ngspice-26/src/frontend/options.c0000644000265600020320000003047512264261473016507 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * The user-supplied routine to deal with variables. Most variables we * don't use often, so just call cp_getvar when they are needed. Spice * variables, though, and a few commonly used ones are dealt with here. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "circuits.h" #include "options.h" #include "variable.h" #include "control.h" #include "spiceif.h" static void setdb(char *str); bool ft_acctprint = FALSE, ft_noacctprint = FALSE, ft_listprint = FALSE; bool ft_nodesprint = FALSE, ft_optsprint = FALSE, ft_noinitprint = FALSE; bool ft_ngdebug = FALSE, ft_stricterror = FALSE; /* The user-supplied routine to query the values of variables. This * recognises the $&varname notation, and also searches the values of * plot and circuit environment variables. */ struct variable * cp_enqvar(char *word) { struct dvec *d; struct variable *vv, *tv; struct plot *pl; int i; if (*word == '&') { word++; d = vec_get(word); if (!d) return (NULL); if (d->v_length == 1) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = copy(word); vv->va_type = CP_REAL; if (isreal(d)) vv->va_real = d->v_realdata[0]; else vv->va_real = realpart(d->v_compdata[0]); } else { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = copy(word); vv->va_type = CP_LIST; vv->va_vlist = NULL; for (i = d->v_length - 1; i >= 0; i--) { tv = alloc(struct variable); tv->va_type = CP_REAL; if (isreal(d)) tv->va_real = d->v_realdata[i]; else tv->va_real = realpart(d->v_compdata[i]); tv->va_next = vv->va_vlist; vv->va_vlist = tv; } } if (d->v_link2) fprintf(cp_err, "Warning: only one vector may be accessed with the $& notation.\n"); return (vv); } if (plot_cur) { for (vv = plot_cur->pl_env; vv; vv = vv->va_next) if (eq(vv->va_name, word)) return (vv); if (eq(word, "curplotname")) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = word; vv->va_type = CP_STRING; vv->va_string = copy(plot_cur->pl_name); } else if (eq(word, "curplottitle")) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = word; vv->va_type = CP_STRING; vv->va_string = copy(plot_cur->pl_title); } else if (eq(word, "curplotdate")) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = word; vv->va_type = CP_STRING; vv->va_string = copy(plot_cur->pl_date); } else if (eq(word, "curplot")) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = word; vv->va_type = CP_STRING; vv->va_string = copy(plot_cur->pl_typename); } else if (eq(word, "plots")) { vv = alloc(struct variable); vv->va_next = NULL; vv->va_name = word; vv->va_type = CP_LIST; vv->va_vlist = NULL; for (pl = plot_list; pl; pl = pl->pl_next) { tv = alloc(struct variable); tv->va_type = CP_STRING; tv->va_string = copy(pl->pl_typename); tv->va_next = vv->va_vlist; vv->va_vlist = tv; } } if (vv) return (vv); } if (ft_curckt) for (vv = ft_curckt->ci_vars; vv; vv = vv->va_next) if (eq(vv->va_name, word)) return (vv); return (NULL); } /* Return the plot and ckt env vars, $plots, and $curplot{name,title,date,} */ void cp_usrvars(struct variable **v1, struct variable **v2) { struct variable *v, *tv; v = plot_cur ? plot_cur->pl_env : NULL; if ((tv = cp_enqvar("plots")) != NULL) { tv->va_next = v; v = tv; } if ((tv = cp_enqvar("curplot")) != NULL) { tv->va_next = v; v = tv; } if ((tv = cp_enqvar("curplottitle")) != NULL) { tv->va_next = v; v = tv; } if ((tv = cp_enqvar("curplotname")) != NULL) { tv->va_next = v; v = tv; } if ((tv = cp_enqvar("curplotdate")) != NULL) { tv->va_next = v; v = tv; } *v1 = v; *v2 = ft_curckt ? ft_curckt->ci_vars : NULL; } /* Extract the .option lines from the deck */ struct line * inp_getopts(struct line *deck) { struct line *last = NULL, *opts = NULL, *dd, *next = NULL; for (dd = deck->li_next; dd; dd = next) { next = dd->li_next; if (ciprefix(".opt", dd->li_line)) { inp_casefix(dd->li_line); if (last) last->li_next = dd->li_next; else deck->li_next = dd->li_next; dd->li_next = opts; opts = dd; } else { last = dd; } } return (opts); } /* Extract the option lines from a comfile (spinit, .spiceinit) */ struct line * inp_getoptsc(char *in_line, struct line *com_options) { struct line *next = NULL; char *line; line = TMALLOC(char, strlen(in_line) + 3); /* option -> .options */ /* skip option */ gettok(&in_line); sprintf(line, ".options %s", in_line); next = TMALLOC(struct line, 1); next->li_line = line; next->li_linenum = 0; next->li_error = NULL; next->li_actual = NULL; /* put new line in front */ if (com_options) next->li_next = com_options; return next; } /* The one variable that we consider read-only so far is plots. The ones * that are 'dontrecord' are curplottitle, curplotname, and curplotdate. * Also things already in the plot env are 'dontrecord'. */ int cp_usrset(struct variable *var, bool isset) { void *vv; struct variable *tv; int iv; double dv; bool bv; if (eq(var->va_name, "debug")) { if (var->va_type == CP_BOOL) { cp_debug = ft_simdb = ft_parsedb = ft_evdb = ft_vecdb = ft_grdb = ft_gidb = ft_controldb = isset; } else if (var->va_type == CP_LIST) { for (tv = var->va_vlist; tv; tv = tv->va_next) if (var->va_type == CP_STRING) setdb(tv->va_string); else fprintf(cp_err, "Error: bad type for debug var\n"); } else if (var->va_type == CP_STRING) { setdb(var->va_string); } else { fprintf(cp_err, "Error: bad type for debug var\n"); } #ifndef FTEDEBUG fprintf(cp_err, "Warning: %s compiled without debug messages\n", cp_program); #endif } else if (eq(var->va_name, "program")) { cp_program = var->va_string; } else if (eq(var->va_name, "rawfile")) { ft_rawfile = copy(var->va_string); } else if (eq(var->va_name, "acct")) { ft_acctprint = isset; } else if (eq(var->va_name, "noacct")) { ft_noacctprint = isset; } else if (eq(var->va_name, "ngdebug")) { ft_ngdebug = isset; } else if (eq(var->va_name, "noinit")) { ft_noinitprint = isset; } else if (eq(var->va_name, "list")) { ft_listprint = isset; } else if (eq(var->va_name, "nopage")) { ft_nopage = isset; } else if (eq(var->va_name, "nomod")) { ft_nomod = isset; } else if (eq(var->va_name, "node")) { ft_nodesprint = isset; } else if (eq(var->va_name, "opts")) { ft_optsprint = isset; } else if (eq(var->va_name, "strictnumparse")) { ft_strictnumparse = isset; } else if (eq(var->va_name, "strict_errorhandling")) { ft_stricterror = isset; } else if (eq(var->va_name, "rawfileprec")) { if ((var->va_type == CP_BOOL) && (isset == FALSE)) raw_prec = -1; else if (var->va_type == CP_REAL) raw_prec = (int)floor(var->va_real + 0.5); else if (var->va_type == CP_NUM) raw_prec = var->va_num; else fprintf(cp_err, "Bad 'rawfileprec' \"%s\"\n", var->va_name); } else if (eq(var->va_name, "numdgt")) { if ((var->va_type == CP_BOOL) && (isset == FALSE)) cp_numdgt = -1; else if (var->va_type == CP_REAL) cp_numdgt = (int)floor(var->va_real + 0.5); else if (var->va_type == CP_NUM) cp_numdgt = var->va_num; else fprintf(cp_err, "Excuse me??\n"); } else if (eq(var->va_name, "unixcom")) { cp_dounixcom = isset; if (isset) { char *s = getenv("PATH"); if (s) cp_rehash(s, TRUE); else fprintf(cp_err, "Warning: no PATH in environment.\n"); } } else if (eq(var->va_name, "units") && (var->va_type == CP_STRING)) { if (isset && ((*var->va_string == 'd') || (*var->va_string == 'D'))) cx_degrees = TRUE; else cx_degrees = FALSE; } else if (eq(var->va_name, "curplot")) { if (var->va_type == CP_STRING) plot_setcur(var->va_string); else fprintf(cp_err, "Error: plot name not a string\n"); return (US_DONTRECORD); } else if (eq(var->va_name, "curplotname")) { if (plot_cur && (var->va_type == CP_STRING)) plot_cur->pl_name = copy(var->va_string); else fprintf(cp_err, "Error: can't set plot name\n"); return (US_DONTRECORD); } else if (eq(var->va_name, "curplottitle")) { if (plot_cur && (var->va_type == CP_STRING)) plot_cur->pl_title = copy(var->va_string); else fprintf(cp_err, "Error: can't set plot title\n"); return (US_DONTRECORD); } else if (eq(var->va_name, "curplotdate")) { if (plot_cur && (var->va_type == CP_STRING)) plot_cur->pl_date = copy(var->va_string); else fprintf(cp_err, "Error: can't set plot date\n"); return (US_DONTRECORD); } else if (eq(var->va_name, "plots")) { return (US_READONLY); } if (plot_cur) for (tv = plot_cur->pl_env; tv; tv = tv->va_next) if (eq(tv->va_name, var->va_name)) return (US_READONLY); /* if (ft_curckt) for (tv = ft_curckt->ci_vars; tv; tv = tv->va_next) if (eq(tv->va_name, var->va_name)) return (US_READONLY); */ if (ft_nutmeg) return (US_OK); /* Now call the interface option routine. */ switch (var->va_type) { case CP_BOOL: bv = (var->va_bool) ? TRUE : FALSE; vv = &bv; break; case CP_STRING: vv = var->va_string; break; case CP_NUM: iv = var->va_num; vv = &iv; break; case CP_REAL: dv = var->va_real; vv = &dv; break; case CP_LIST: /* if_option can't handle lists anyway. */ vv = NULL; break; default: fprintf(cp_err, "cp_usrset: Internal Error: Bad var type %d\n", var->va_type); return (0); } if (ft_curckt) { if (if_option(ft_curckt->ci_ckt, var->va_name, var->va_type, vv)) return US_SIMVAR; } else { if (if_option(NULL, var->va_name, var->va_type, vv)) return US_NOSIMVAR; } return (US_OK); } static void setdb(char *str) { if (eq(str, "siminterface")) ft_simdb = TRUE; else if (eq(str, "cshpar")) cp_debug = TRUE; else if (eq(str, "parser")) ft_parsedb = TRUE; else if (eq(str, "eval")) ft_evdb = TRUE; else if (eq(str, "vecdb")) ft_vecdb = TRUE; else if (eq(str, "graf")) ft_grdb = TRUE; else if (eq(str, "ginterface")) ft_gidb = TRUE; else if (eq(str, "control")) ft_controldb = TRUE; else if (eq(str, "async")) ft_asyncdb = TRUE; else fprintf(cp_err, "Warning: no such debug class %s\n", str); } ngspice-26/src/frontend/resource.h0000644000265600020320000000153712264261473016645 0ustar andreasadmin/************* * Header file for resources.c * 1999 E. Rouat ************/ #ifndef ngspice_RESOURCE_H #define ngspice_RESOURCE_H void init_rlimits(void); void init_time(void); void com_rusage(wordlist *wl); struct proc_mem { unsigned long long size; /* Total ngspice program size */ unsigned long long resident;/* Resident set size */ unsigned long long shared; /* Shared ngspice pages */ unsigned long long trs; /* Text (code) pages */ unsigned long long drs; /* Stack */ unsigned long long lrs; /* Library pages */ unsigned long long dt; /* Dirty pages (not used in kernel 2.6) */ }; struct sys_mem { unsigned long long size; /* Total memory size */ unsigned long long free; /* Free memory */ unsigned long long swap_t; /* Swap total */ unsigned long long swap_f; /* Swap free */ }; #endif ngspice-26/src/frontend/device.h0000644000265600020320000000126212264261473016250 0ustar andreasadmin/************* * Header file for device.c * 1999 E. Rouat * Modified: 2000 AlansFixes ************/ #ifndef ngspice_DEVICE_H #define ngspice_DEVICE_H #define LEFT_WIDTH 11 #define DEV_WIDTH 21 int printstr_n(dgen *dg, IFparm *, int); int printstr_m(dgen *dg, IFparm *, int); void param_forall(dgen *dg, int flags); void param_forall_old(dgen *dg, int flags); void listparam(wordlist *p, dgen *dg); int bogus1(dgen *dg, IFparm *, int); int bogus2(dgen *dg, IFparm *, int); int printvals(dgen *dg, IFparm *p, int i); int printvals_old(dgen *dg, IFparm *p, int i); void old_show(wordlist *wl); /* DEVHELP*/ void devhelp(wordlist *wl); void printdesc(IFparm p, bool csv); #endif ngspice-26/src/frontend/streams.h0000644000265600020320000000031312264261473016463 0ustar andreasadmin/************* * Header file for streams.c ************/ #ifndef ngspice_STREAMS_H #define ngspice_STREAMS_H #include "ngspice/bool.h" #include "ngspice/wordlist.h" void fixdescriptors(void); #endif ngspice-26/src/frontend/dotcards.h0000644000265600020320000000025212264261473016612 0ustar andreasadmin/************* * Header file for dotcards.c * 1999 E. Rouat ************/ #ifndef ngspice_DOTCARDS_H #define ngspice_DOTCARDS_H wordlist *gettoks(char *s); #endif ngspice-26/src/frontend/Makefile.in0000644000265600020320000007556512264261534016724 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libfte_la_LIBADD = am_libfte_la_OBJECTS = com_measure2.lo commands.lo com_ahelp.lo \ com_alias.lo com_asciiplot.lo com_cdump.lo com_chdir.lo \ com_compose.lo com_dl.lo com_display.lo com_dump.lo \ com_echo.lo com_ghelp.lo com_gnuplot.lo com_hardcopy.lo \ com_help.lo com_history.lo com_let.lo com_option.lo \ com_plot.lo com_rehash.lo com_set.lo com_setscale.lo \ com_shell.lo com_shift.lo com_fft.lo com_state.lo \ com_strcmp.lo com_sysinfo.lo com_unset.lo com_xgraph.lo \ control.lo ftesopt.lo hcomp.lo init.lo quote.lo streams.lo \ terminal.lo variable.lo arg.lo aspice.lo breakp.lo breakp2.lo \ circuits.lo cpitf.lo define.lo device.lo diff.lo dimens.lo \ display.lo dotcards.lo error.lo evaluate.lo fourier.lo gens.lo \ hpgl.lo inp.lo inpcom.lo interp.lo inventory.lo linear.lo \ measure.lo misccoms.lo miscvars.lo mw_coms.lo newcoms.lo \ nutinp.lo nutmegif.lo options.lo outitf.lo parse.lo points.lo \ postcoms.lo postsc.lo rawfile.lo resource.lo runcoms.lo \ runcoms2.lo shyu.lo signal_handler.lo spec.lo spiceif.lo \ subckt.lo typesdef.lo vectors.lo where.lo libfte_la_OBJECTS = $(am_libfte_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libfte_la_SOURCES) DIST_SOURCES = $(libfte_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ # TESTS = testcommands # # bin_PROGRAMS = testcommands # # testcommands_SOURCES = \ # testcommands.c \ # testcommands.h # # testcommands_LDADD = libfte.a plotting/libplotting.a ../misc/libmisc.a AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include @X_CFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = plotting help parser wdisp numparam trannoise DIST_SUBDIRS = plotting help parser wdisp numparam trannoise EXTRA_DIST = testcommands.c parse-bison.y parse-bison.c parse-bison.h noinst_LTLIBRARIES = libfte.la libfte_la_SOURCES = \ com_measure2.c \ com_measure2.h \ commands.c \ commands.h \ com_ahelp.c \ com_ahelp.h \ com_alias.c \ com_alias.h \ com_asciiplot.c \ com_asciiplot.h \ com_cdump.c \ com_cdump.h \ com_chdir.c \ com_chdir.h \ com_compose.c \ com_compose.h \ com_commands.h \ com_dl.c \ com_dl.h \ com_display.c \ com_display.h \ com_dump.c \ com_dump.h \ com_echo.c \ com_echo.h \ com_ghelp.c \ com_ghelp.h \ com_gnuplot.h \ com_gnuplot.c \ com_hardcopy.c \ com_hardcopy.h \ com_help.c \ com_help.h \ com_history.c \ com_history.h \ com_let.c \ com_let.h \ com_option.c \ com_option.h \ com_plot.c \ com_plot.h \ com_rehash.c \ com_rehash.h \ com_set.c \ com_set.h \ com_setscale.c \ com_setscale.h \ com_shell.c \ com_shell.h \ com_shift.c \ com_shift.h \ com_fft.c \ com_fft.h \ com_state.c \ com_state.h \ com_strcmp.c \ com_strcmp.h \ com_sysinfo.c \ com_unset.c \ com_unset.h \ com_xgraph.c \ com_xgraph.h \ completion.h \ control.h \ control.c \ ftehelp.h \ ftesopt.c \ hcomp.c \ hcomp.h \ init.c \ init.h \ quote.c \ quote.h \ streams.h \ streams.c \ terminal.c \ terminal.h \ variable.c \ variable.h \ \ arg.c \ arg.h \ aspice.c \ aspice.h \ breakp.c \ breakp.h \ breakp2.c \ breakp2.h \ circuits.c \ circuits.h \ cpitf.c \ cpitf.h \ define.c \ define.h \ device.c \ device.h \ diff.c \ diff.h \ dimens.c \ dimens.h \ display.c \ display.h \ dotcards.c \ dotcards.h \ error.c \ evaluate.c \ evaluate.h \ fourier.c \ fourier.h \ gens.c \ gens.h \ hpgl.c \ hpgl.h \ inp.c \ inp.h \ inpcom.c \ inpcom.h \ interp.c \ interp.h \ inventory.c \ linear.c \ linear.h \ measure.c \ misccoms.c \ misccoms.h \ miscvars.c \ miscvars.h \ mw_coms.c \ mw_coms.h \ newcoms.c \ newcoms.h \ nutinp.c \ nutinp.h \ nutmegif.c \ nutmegif.h \ options.c \ options.h \ outitf.c \ outitf.h \ parse.c \ parse.h \ points.c \ points.h \ postcoms.c \ postcoms.h \ postsc.c \ postsc.h \ rawfile.c \ rawfile.h \ resource.c \ resource.h \ runcoms.c \ runcoms.h \ runcoms2.c \ runcoms2.h \ shyu.c \ shyu.h \ signal_handler.c \ signal_handler.h \ spec.c \ spec.h \ spiceif.c \ spiceif.h \ subckt.c \ subckt.h \ typesdef.c \ typesdef.h \ vectors.c \ vectors.h \ where.c \ where.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libfte.la: $(libfte_la_OBJECTS) $(libfte_la_DEPENDENCIES) $(EXTRA_libfte_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libfte_la_OBJECTS) $(libfte_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aspice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/breakp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/breakp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/circuits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_ahelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_alias.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_asciiplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_cdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_chdir.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_compose.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_dl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_dump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_echo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_fft.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_ghelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_gnuplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_hardcopy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_help.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_history.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_let.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_measure2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_option.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_plot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_rehash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_setscale.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_shell.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_shift.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_state.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_strcmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_sysinfo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_unset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/com_xgraph.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commands.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/control.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpitf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/define.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dimens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/display.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dotcards.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evaluate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fourier.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftesopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hcomp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hpgl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpcom.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inventory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linear.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/measure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misccoms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miscvars.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mw_coms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/newcoms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutinp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nutmegif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/options.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/outitf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/points.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postcoms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/postsc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runcoms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/runcoms2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/shyu.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signal_handler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spiceif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/streams.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/subckt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/terminal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/typesdef.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/variable.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vectors.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/where.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am parse-bison.c parse-bison.h : parse-bison.y bison $(srcdir)/parse-bison.y $(srcdir)/parse.c : parse-bison.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/evaluate.h0000644000265600020320000000245212264261473016621 0ustar andreasadmin/************* * Header file for evaluate.c * 1999 E. Rouat ************/ #ifndef ngspice_EVALUATE_H #define ngspice_EVALUATE_H #include "ngspice/dvec.h" #include "ngspice/pnode.h" struct dvec *op_plus(struct pnode *arg1, struct pnode *arg2); struct dvec *op_minus(struct pnode *arg1, struct pnode *arg2); struct dvec *op_comma(struct pnode *arg1, struct pnode *arg2); struct dvec *op_times(struct pnode *arg1, struct pnode *arg2); struct dvec *op_mod(struct pnode *arg1, struct pnode *arg2); struct dvec *op_divide(struct pnode *arg1, struct pnode *arg2); struct dvec *op_power(struct pnode *arg1, struct pnode *arg2); struct dvec *op_eq(struct pnode *arg1, struct pnode *arg2); struct dvec *op_gt(struct pnode *arg1, struct pnode *arg2); struct dvec *op_lt(struct pnode *arg1, struct pnode *arg2); struct dvec *op_ge(struct pnode *arg1, struct pnode *arg2); struct dvec *op_le(struct pnode *arg1, struct pnode *arg2); struct dvec *op_ne(struct pnode *arg1, struct pnode *arg2); struct dvec *op_and(struct pnode *arg1, struct pnode *arg2); struct dvec *op_or(struct pnode *arg1, struct pnode *arg2); struct dvec *op_range(struct pnode *arg1, struct pnode *arg2); struct dvec *op_ind(struct pnode *arg1, struct pnode *arg2); struct dvec *op_uminus(struct pnode *arg); struct dvec *op_not(struct pnode *arg); #endif ngspice-26/src/frontend/rawfile.c0000644000265600020320000006642712264261473016453 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Read and write the ascii and binary rawfile formats. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "dimens.h" #include "ngspice/dvec.h" #include "rawfile.h" #include "variable.h" #include "../misc/misc_time.h" static void fixdims(struct dvec *v, char *s); int raw_prec = -1; /* How many sigfigs to use, default 15 (max). */ #define DEFPREC 15 #ifdef HAS_WINGUI #undef fscanf /* redo I/O from WINMAIN.C here otherwise reading ASCII will not work */ #endif /* Write a raw file. We write everything in the plot pointed to. */ void raw_write(char *name, struct plot *pl, bool app, bool binary) { FILE *fp; bool realflag = TRUE, writedims; bool raw_padding; int length, numdims, dims[MAXDIMS]; int nvars, i, j, prec; struct dvec *v, *lv; wordlist *wl; struct variable *vv; double dd; char buf[BSIZE_SP]; char *branch; raw_padding = !cp_getvar("nopadding", CP_BOOL, NULL); /* Why bother printing out an empty plot? */ if (!pl->pl_dvecs) { fprintf(cp_err, "Error: plot is empty, nothing written.\n"); return; } if (raw_prec != -1) prec = raw_prec; else prec = DEFPREC; #if defined(__MINGW32__) || defined(_MSC_VER) /* - Binary file binary write - hvogt 15.03.2000 ---------------------*/ if (binary) { if ((fp = fopen(name, app ? "ab" : "wb")) == NULL) { perror(name); return; } fprintf(cp_out, "binary raw file\n"); } else { if ((fp = fopen(name, app ? "a" : "w")) == NULL) { perror(name); return; } fprintf(cp_out, "ASCII raw file\n"); } /* --------------------------------------------------------------------*/ #else if (!(fp = fopen(name, app ? "a" : "w"))) { perror(name); return; } #endif numdims = nvars = length = 0; for (v = pl->pl_dvecs; v; v = v->v_next) { if (iscomplex(v)) realflag = FALSE; nvars++; /* Find the length and dimensions of the longest vector * in the plot. * Be paranoid and assume somewhere we may have * forgotten to set the dimensions of 1-D vectors. */ if (v->v_numdims <= 1) { v->v_numdims = 1; v->v_dims[0] = v->v_length; } if (v->v_length > length) { length = v->v_length; numdims = v->v_numdims; for (j = 0; j < numdims; j++) { dims[j] = v->v_dims[j]; } } } fprintf(fp, "Title: %s\n", pl->pl_title); fprintf(fp, "Date: %s\n", pl->pl_date); fprintf(fp, "Plotname: %s\n", pl->pl_name); fprintf(fp, "Flags: %s%s\n", realflag ? "real" : "complex", raw_padding ? "" : " unpadded"); fprintf(fp, "No. Variables: %d\n", nvars); fprintf(fp, "No. Points: %d\n", length); if (numdims > 1) { dimstring(dims, numdims, buf); fprintf(fp, "Dimensions: %s\n", buf); } for (wl = pl->pl_commands; wl; wl = wl->wl_next) fprintf(fp, "Command: %s\n", wl->wl_word); for (vv = pl->pl_env; vv; vv = vv->va_next) { wl = cp_varwl(vv); if (vv->va_type == CP_BOOL) { fprintf(fp, "Option: %s\n", vv->va_name); } else { fprintf(fp, "Option: %s = ", vv->va_name); if (vv->va_type == CP_LIST) fprintf(fp, "( "); wl_print(wl, fp); if (vv->va_type == CP_LIST) fprintf(fp, " )"); (void) putc('\n', fp); } } /* Before we write the stuff out, make sure that the scale is the first * in the list. */ for (lv = NULL, v = pl->pl_dvecs; v != pl->pl_scale; v = v->v_next) lv = v; if (lv) { lv->v_next = v->v_next; v->v_next = pl->pl_dvecs; pl->pl_dvecs = v; } fprintf(fp, "Variables:\n"); for (i = 0, v = pl->pl_dvecs; v; v = v->v_next) { if (strcmp(ft_typenames(v->v_type), "current") == 0) { branch = NULL; if ((branch = strstr(v->v_name, "#branch")) != NULL) { *branch = '\0'; } fprintf(fp, "\t%d\ti(%s)\t%s", i++, v->v_name, ft_typenames(v->v_type)); if (branch != NULL) *branch = '#'; } else if (strcmp(ft_typenames(v->v_type), "voltage") == 0) { fprintf(fp, "\t%d\t%s\t%s", i++, v->v_name, ft_typenames(v->v_type)); } else { fprintf(fp, "\t%d\t%s\t%s", i++, v->v_name, ft_typenames(v->v_type)); } if (v->v_flags & VF_MINGIVEN) fprintf(fp, " min=%e", v->v_minsignal); if (v->v_flags & VF_MAXGIVEN) fprintf(fp, " max=%e", v->v_maxsignal); if (v->v_defcolor) fprintf(fp, " color=%s", v->v_defcolor); if (v->v_gridtype) fprintf(fp, " grid=%d", v->v_gridtype); if (v->v_plottype) fprintf(fp, " plot=%d", v->v_plottype); /* Only write dims if they are different from default. */ writedims = FALSE; if (v->v_numdims != numdims) { writedims = TRUE; } else { for (j = 0; j < numdims; j++) if (dims[j] != v->v_dims[j]) writedims = TRUE; } if (writedims) { dimstring(v->v_dims, v->v_numdims, buf); fprintf(fp, " dims=%s", buf); } (void) putc('\n', fp); } if (binary) { fprintf(fp, "Binary:\n"); for (i = 0; i < length; i++) { for (v = pl->pl_dvecs; v; v = v->v_next) { /* Don't run off the end of this vector's data. */ if (i < v->v_length) { if (realflag) { dd = (isreal(v) ? v->v_realdata[i] : realpart(v->v_compdata[i])); (void) fwrite(&dd, sizeof(double), 1, fp); } else if (isreal(v)) { dd = v->v_realdata[i]; (void) fwrite(&dd, sizeof(double), 1, fp); dd = 0.0; (void) fwrite(&dd, sizeof(double), 1, fp); } else { dd = realpart(v->v_compdata[i]); (void) fwrite(&dd, sizeof(double), 1, fp); dd = imagpart(v->v_compdata[i]); (void) fwrite(&dd, sizeof(double), 1, fp); } } else if (raw_padding) { dd = 0.0; if (realflag) { (void) fwrite(&dd, sizeof(double), 1, fp); } else { (void) fwrite(&dd, sizeof(double), 1, fp); (void) fwrite(&dd, sizeof(double), 1, fp); } } } } } else { fprintf(fp, "Values:\n"); for (i = 0; i < length; i++) { fprintf(fp, " %d", i); for (v = pl->pl_dvecs; v; v = v->v_next) { if (i < v->v_length) { if (realflag) fprintf(fp, "\t%.*e\n", prec, isreal(v) ? v->v_realdata[i] : realpart(v->v_compdata[i])); else if (isreal(v)) fprintf(fp, "\t%.*e,0.0\n", prec, v->v_realdata[i]); else fprintf(fp, "\t%.*e,%.*e\n", prec, realpart(v->v_compdata[i]), prec, imagpart(v->v_compdata[i])); } else if (raw_padding) { if (realflag) fprintf(fp, "\t%.*e\n", prec, 0.0); else fprintf(fp, "\t%.*e,%.*e\n", prec, 0.0, prec, 0.0); } } (void) putc('\n', fp); } } (void) fclose(fp); } /* Read a raw file. Returns a list of plot structures. This routine should be * very flexible about what it expects to see in the rawfile. Really all we * require is that there be one variables and one values section per plot * and that the variables precede the values. */ #define SKIP(s) \ do { \ while (*(s) && !isspace(*(s))) \ (s)++; \ while (isspace(*(s))) \ (s)++; \ } while(0) #define NONL(s) \ do { \ r = (s); \ while (*r && (*r != '\n')) \ r++; \ *r = '\0'; \ } while(0) #define GETOUT() \ do { \ fprintf(cp_err, \ "Error: bad rawfile\n" \ " point %d, var %s\n" \ " load aborted\n", \ i, v->v_name); \ return (NULL); \ } while(0) struct plot * raw_read(char *name) { char *title = "default title"; char *date = 0; struct plot *plots = NULL, *curpl = NULL; char buf[BSIZE_SP], buf2[BSIZE_SP], *s, *t, *r; int flags = 0, nvars = 0, npoints = 0, i, j; int ndimpoints, numdims = 0, dims[MAXDIMS]; bool raw_padded = TRUE, is_ascii = FALSE; double junk; struct dvec *v, *nv; struct variable *vv; wordlist *wl, *nwl; FILE *fp, *lastin, *lastout, *lasterr; if ((fp = fopen(name, "rb")) == NULL) { perror(name); controlled_exit(EXIT_FAILURE); } /* Since we call cp_evloop() from here, we have to do this junk. */ lastin = cp_curin; lastout = cp_curout; lasterr = cp_curerr; cp_curin = cp_in; cp_curout = cp_out; cp_curerr = cp_err; cp_pushcontrol(); while (fgets(buf, BSIZE_SP, fp)) { r = strchr(buf, '\n'); if (r && r > buf && r[-1] == '\r') { r[-1] = '\n'; r[0] = '\0'; } /* Figure out what this line is... */ if (ciprefix("title:", buf)) { s = buf; SKIP(s); NONL(s); title = copy(s); } else if (ciprefix("date:", buf)) { s = buf; SKIP(s); NONL(s); date = copy(s); } else if (ciprefix("plotname:", buf)) { s = buf; SKIP(s); NONL(s); if (curpl) { /* reverse commands list */ for (wl = curpl->pl_commands, curpl->pl_commands = NULL; wl && wl->wl_next; wl = nwl) { nwl = wl->wl_next; wl->wl_next = curpl->pl_commands; curpl->pl_commands = wl; } } curpl = alloc(struct plot); curpl->pl_next = plots; plots = curpl; curpl->pl_name = copy(s); if (!date) date = copy(datestring()); curpl->pl_date = date; curpl->pl_title = copy(title); flags = VF_PERMANENT; nvars = npoints = 0; } else if (ciprefix("flags:", buf)) { s = buf; SKIP(s); while ((t = gettok(&s)) != NULL) { if (cieq(t, "real")) flags |= VF_REAL; else if (cieq(t, "complex")) flags |= VF_COMPLEX; else if (cieq(t, "unpadded")) raw_padded = FALSE; else if (cieq(t, "padded")) raw_padded = TRUE; else fprintf(cp_err, "Warning: unknown flag %s\n", t); } } else if (ciprefix("no. variables:", buf)) { s = buf; SKIP(s); SKIP(s); nvars = scannum(s); } else if (ciprefix("no. points:", buf)) { s = buf; SKIP(s); SKIP(s); npoints = scannum(s); } else if (ciprefix("dimensions:", buf)) { if (npoints == 0) { fprintf(cp_err, "Error: misplaced Dimensions: line\n"); continue; } s = buf; SKIP(s); if (atodims(s, dims, &numdims)) { /* Something's wrong. */ fprintf(cp_err, "Warning: syntax error in dimensions, ignored.\n"); numdims = 0; continue; } if (numdims > MAXDIMS) { numdims = 0; continue; } /* Let's just make sure that the no. of points * and the dimensions are consistent. */ for (j = 0, ndimpoints = 1; j < numdims; j++) ndimpoints *= dims[j]; if (ndimpoints != npoints) { fprintf(cp_err, "Warning: dimensions inconsistent with no. of points, ignored.\n"); numdims = 0; } } else if (ciprefix("command:", buf)) { /* Note that we reverse these commands eventually... */ s = buf; SKIP(s); NONL(s); if (curpl) { curpl->pl_commands = wl_cons(copy(s), curpl->pl_commands); wl = curpl->pl_commands; } else { fprintf(cp_err, "Error: misplaced Command: line\n"); } /* Now execute the command if we can. */ (void) cp_evloop(s); } else if (ciprefix("option:", buf)) { s = buf; SKIP(s); NONL(s); if (curpl) { wl = cp_lexer(s); for (vv = curpl->pl_env; vv && vv->va_next; vv = vv->va_next) ; if (vv) vv->va_next = cp_setparse(wl); else curpl->pl_env = cp_setparse(wl); } else { fprintf(cp_err, "Error: misplaced Option: line\n"); } } else if (ciprefix("variables:", buf)) { /* We reverse the dvec list eventually... */ if (!curpl) { fprintf(cp_err, "Error: no plot name given\n"); plots = NULL; break; } s = buf; SKIP(s); if (!*s) { (void) fgets(buf, BSIZE_SP, fp); s = buf; } if (numdims == 0) { numdims = 1; dims[0] = npoints; } /* Now read all the variable lines in. */ for (i = 0; i < nvars; i++) { v = alloc(struct dvec); ZERO(v, struct dvec); v->v_next = curpl->pl_dvecs; curpl->pl_dvecs = v; if (!curpl->pl_scale) curpl->pl_scale = v; v->v_flags = (short)flags; v->v_plot = curpl; v->v_length = npoints; v->v_numdims = 0; /* Length and dims might be changed by options. */ if (!i) { curpl->pl_scale = v; } else { (void) fgets(buf, BSIZE_SP, fp); s = buf; } (void) gettok(&s); /* The strchr field. */ if ((t = gettok(&s)) != NULL) { v->v_name = t; } else { fprintf(cp_err, "Error: bad var line %s\n", buf); /* MW. v_name must be valid in the case that no. points = 0 */ v->v_name = "no vars\n"; } t = gettok(&s); /* The type name. */ if (t) v->v_type = ft_typnum(t); else fprintf(cp_err, "Error: bad var line %s\n", buf); /* Fix the name... */ if (isdigit(*v->v_name) && (r = ft_typabbrev(v ->v_type)) != NULL) { (void) sprintf(buf2, "%s(%s)", r, v->v_name); v->v_name = copy(buf2); } /* Now come the strange options... */ while ((t = gettok(&s)) != NULL) { if (ciprefix("min=", t)) { if (sscanf(t + 4, "%lf", &v->v_minsignal) != 1) fprintf(cp_err, "Error: bad arg %s\n", t); v->v_flags |= VF_MINGIVEN; } else if (ciprefix("max=", t)) { if (sscanf(t + 4, "%lf", &v->v_maxsignal) != 1) fprintf(cp_err, "Error: bad arg %s\n", t); v->v_flags |= VF_MAXGIVEN; } else if (ciprefix("color=", t)) { v->v_defcolor = copy(t + 6); } else if (ciprefix("scale=", t)) { // This cast is bad, but... v->v_scale = (struct dvec *) copy(t + 6); } else if (ciprefix("grid=", t)) { v->v_gridtype = (GRIDTYPE) scannum(t + 5); } else if (ciprefix("plot=", t)) { v->v_plottype = (PLOTTYPE) scannum(t + 5); } else if (ciprefix("dims=", t)) { fixdims(v, t + 5); } else { fprintf(cp_err, "Warning: bad var param %s\n", t); } } /* Now we default any missing dimensions. */ if (!v->v_numdims) { v->v_numdims = numdims; for (j = 0; j < numdims; j++) v->v_dims[j] = dims[j]; } /* And allocate the data array. We would use * the desired vector length, but this would * be dangerous if the file is invalid. */ if (isreal(v)) v->v_realdata = TMALLOC(double, npoints); else v->v_compdata = TMALLOC(ngcomplex_t, npoints); } } else if (ciprefix("values:", buf) || ciprefix("binary:", buf)) { if (!curpl) { fprintf(cp_err, "Error: no plot name given\n"); plots = NULL; break; } /* We'd better reverse the dvec list now... */ for (v = curpl->pl_dvecs, curpl->pl_dvecs = NULL; v; v = nv) { nv = v->v_next; v->v_next = curpl->pl_dvecs; curpl->pl_dvecs = v; } /* And fix the scale pointers. */ for (v = curpl->pl_dvecs; v; v = v->v_next) { if (v->v_scale) { for (nv = curpl->pl_dvecs; nv; nv = nv->v_next) // This cast is bad, but... if (cieq((char *) v->v_scale, nv->v_name)) { v->v_scale = nv; break; } if (!nv) { // This cast is bad, but... fprintf(cp_err, "Error: no such vector %s\n", (char *) v->v_scale); v->v_scale = NULL; } } } if ((*buf == 'v') || (*buf == 'V')) is_ascii = TRUE; else is_ascii = FALSE; for (i = 0; i < npoints; i++) { if (is_ascii) { /* It's an ASCII file. */ (void) fscanf(fp, " %d", &j); for (v = curpl->pl_dvecs; v; v = v->v_next) { if (i < v->v_length) { if (flags & VF_REAL) { if (fscanf(fp, " %lf", &v->v_realdata[i]) != 1) GETOUT(); } else { if (fscanf(fp, " %lf, %lf", &realpart(v->v_compdata[i]), &imagpart(v->v_compdata[i])) != 2) GETOUT(); } } else if (raw_padded) { if (flags & VF_REAL) { if (fscanf(fp, " %lf", &junk) != 1) GETOUT(); } else { if (fscanf(fp, " %lf, %lf", &junk, &junk) != 2) GETOUT(); } } } } else { /* It's a Binary file. */ for (v = curpl->pl_dvecs; v; v = v->v_next) { if (i < v->v_length) { if (flags & VF_REAL) { if (fread(&v->v_realdata[i], sizeof(double), 1, fp) != 1) GETOUT(); } else { if (fread(&v->v_compdata[i].cx_real, sizeof(double), 1, fp) != 1) GETOUT(); if (fread(&v->v_compdata[i].cx_imag, sizeof(double), 1, fp) != 1) GETOUT(); } } else if (raw_padded) { if (flags & VF_REAL) { if (fread(&junk, sizeof(double), 1, fp) != 1) GETOUT(); } else { if (fread(&junk, sizeof(double), 1, fp) != 1) GETOUT(); if (fread(&junk, sizeof(double), 1, fp) != 1) GETOUT(); } } } } } } else { s = buf; if (is_ascii) { SKIP(s); } if (*s) { fprintf(cp_err, "Error: strange line in rawfile:\n %s\n load aborted.\n", buf); return (NULL); } } } if (curpl) { /* reverse commands list */ for (wl = curpl->pl_commands, curpl->pl_commands = NULL; wl && wl->wl_next; wl = nwl) { nwl = wl->wl_next; wl->wl_next = curpl->pl_commands; curpl->pl_commands = wl; } } /* Fix everything up nicely again. */ cp_popcontrol(); cp_curin = lastin; cp_curout = lastout; cp_curerr = lasterr; (void) fclose(fp); return (plots); } /* s is a string of the form d1,d2,d3... */ static void fixdims(struct dvec *v, char *s) { int i, ndimpoints; if (atodims(s, v->v_dims, &(v->v_numdims))) { /* Something's wrong. */ fprintf(cp_err, "Warning: syntax error in dimensions, ignored.\n"); return; } else if (v->v_numdims > MAXDIMS) { return; } /* If the no. of points is less than the the total data length, * truncate the vector length. If it's greater in length, we * have serious problems with this vector. Try to fix * by setting to default dimensions when we return. */ for (i = 0, ndimpoints = 1; i < v->v_numdims; i++) ndimpoints *= v->v_dims[i]; if (ndimpoints > v->v_length) v->v_numdims = 0; else v->v_length = ndimpoints; } /* Write a s-param file according to format Touchstone Vers. 1. */ void spar_write(char *name, struct plot *pl, double Rbaseval) { FILE *fp; int length; int i, prec; struct dvec *v, *lv; /* Why bother printing out an empty plot? */ if (!pl->pl_dvecs) { fprintf(cp_err, "Error writing s2p: plot is empty, nothing written.\n"); return; } if (raw_prec != -1) prec = raw_prec; else prec = 6; length = 0; for (v = pl->pl_dvecs; v; v = v->v_next) { /* All vectors have to have same length, only dimension 1 is allowed */ if (length == 0) length = v->v_length; if (length != v->v_length) { fprintf(stderr, "Error writing s2p: lentgth of vector %s differs from length of vector 'frequency'\n", v->v_name); return; } if (v->v_numdims != 1) { fprintf(stderr, "Error writing s2p: Dimension of vector %s greater than 1\n", v->v_name); return; } /* Find the length and dimensions of the longest vector * in the plot. * Be paranoid and assume somewhere we may have * forgotten to set the dimensions of 1-D vectors. if (v->v_numdims <= 1) { v->v_numdims = 1; v->v_dims[0] = v->v_length; } if (v->v_length > length) { length = v->v_length; numdims = v->v_numdims; for (j = 0; j < numdims; j++) { dims[j] = v->v_dims[j]; } }*/ } if ((fp = fopen(name, "w")) == NULL) { perror(name); return; } fprintf(fp, "!2-port S-parameter file\n"); fprintf(fp, "!Title: %s\n", pl->pl_title); fprintf(fp, "!Generated by ngspice at %s\n", pl->pl_date); fprintf(fp, "# Hz S RI R %g\n", Rbaseval); fprintf(fp, "!%-*.5s %-*.5s %-*.5s %-*.5s %-*.5s %-*.5s %-*.5s %-*.5s %-*.5s\n", prec+8, "freq", prec+8, "ReS11", prec+8, "ImS11", prec+8, "ReS21", prec+8, "ImS21", prec+8, "ReS12", prec+8, "ImS12", prec+8, "ReS22", prec+8, "ImS22"); /* Before we write the stuff out, make sure that the scale is the first * in the list. */ for (lv = NULL, v = pl->pl_dvecs; v != pl->pl_scale; v = v->v_next) lv = v; if (lv) { lv->v_next = v->v_next; v->v_next = pl->pl_dvecs; pl->pl_dvecs = v; } /* print frequency first as real value, the real and imag part of S11, S21, S12, S22 respectively */ for (i = 0; i < length; i++) { for (v = pl->pl_dvecs; v; v = v->v_next) { if (i < v->v_length) { if (cieq(v->v_name, "frequency")) fprintf(fp, "% .*e ", prec, realpart(v->v_compdata[i])); else fprintf(fp, "% .*e % .*e ", prec, realpart(v->v_compdata[i]), prec, imagpart(v->v_compdata[i])); } } (void) putc('\n', fp); } (void) fclose(fp); } ngspice-26/src/frontend/com_dl.h0000644000265600020320000000024412264261473016245 0ustar andreasadmin#ifndef ngspice_COM_DL_H #define ngspice_COM_DL_H #ifdef XSPICE void com_codemodel(wordlist *wl); #endif #ifdef DEVLIB void com_use(wordlist *wl); #endif #endif ngspice-26/src/frontend/cpitf.h0000644000265600020320000000020512264261473016112 0ustar andreasadmin/************* * Header file for cpitf.c * 1999 E. Rouat ************/ #ifndef ngspice_CPITF_H #define ngspice_CPITF_H #endif ngspice-26/src/frontend/com_set.h0000644000265600020320000000013112264261473016434 0ustar andreasadmin#ifndef ngspice_COM_SET_H #define ngspice_COM_SET_H void com_set(wordlist *wl); #endif ngspice-26/src/frontend/spec.c0000644000265600020320000002134612264261473015743 0ustar andreasadmin/********** Copyright 1994 Macquarie University, Sydney Australia. All rights reserved. Author: 1994 Anthony E. Parker, Department of Electronics, Macquarie Uni. **********/ /* * Code to do fourier transforms on data. */ #include "ngspice/ngspice.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/sim.h" #include "spec.h" #include "parse.h" #include "variable.h" #include "ngspice/missing_math.h" #include "../misc/misc_time.h" void com_spec(wordlist *wl) { ngcomplex_t **fdvec = NULL; double **tdvec = NULL; double *freq, *win = NULL, *time, *dc = NULL; double startf, stopf, stepf, span; int fpts, i, j, k, tlen, ngood; bool trace; char *s; struct dvec *f, *vlist, *lv = NULL, *vec; struct pnode *pn, *names = NULL; if (!plot_cur || !plot_cur->pl_scale) { fprintf(cp_err, "Error: no vectors loaded.\n"); goto done; } if (!isreal(plot_cur->pl_scale) || ((plot_cur->pl_scale)->v_type != SV_TIME)) { fprintf(cp_err, "Error: spec needs real time scale\n"); goto done; } s = wl->wl_word; tlen = (plot_cur->pl_scale)->v_length; if ((freq = ft_numparse(&s, FALSE)) == NULL || (*freq < 0.0)) { fprintf(cp_err, "Error: bad start freq %s\n", wl->wl_word); goto done; } startf = *freq; wl = wl->wl_next; s = wl->wl_word; if ((freq = ft_numparse(&s, FALSE)) == NULL || (*freq <= startf)) { fprintf(cp_err, "Error: bad stop freq %s\n", wl->wl_word); goto done; } stopf = *freq; wl = wl->wl_next; s = wl->wl_word; if ((freq = ft_numparse(&s, FALSE)) == NULL || !(*freq <= (stopf-startf))) { fprintf(cp_err, "Error: bad step freq %s\n", wl->wl_word); goto done; } stepf = *freq; wl = wl->wl_next; time = (plot_cur->pl_scale)->v_realdata; span = time[tlen-1] - time[0]; if (stopf > 0.5*tlen/span) { fprintf(cp_err, "Error: nyquist limit exceeded, try stop freq less than %e Hz\n", tlen/2/span); goto done; } span = ((int)(span*stepf*1.000000000001))/stepf; if (span > 0) { startf = (int)(startf/stepf*1.000000000001) * stepf; fpts = (int)((stopf - startf)/stepf + 1.); if (stopf > startf + (fpts-1)*stepf) fpts++; } else { fprintf(cp_err, "Error: time span limits step freq to %1.1e Hz\n", 1/(time[tlen-1] - time[0])); goto done; } win = TMALLOC(double, tlen); { char window[BSIZE_SP]; double maxt = time[tlen-1]; if (!cp_getvar("specwindow", CP_STRING, window)) strcpy(window, "hanning"); if (eq(window, "none")) for (i = 0; i < tlen; i++) win[i] = 1; else if (eq(window, "rectangular")) for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1; } } else if (eq(window, "hanning") || eq(window, "cosine")) for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1 - cos(2*M_PI*(time[i]-maxt)/span); } } else if (eq(window, "hamming")) for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1 - 0.92/1.08*cos(2*M_PI*(time[i]-maxt)/span); } } else if (eq(window, "triangle") || eq(window, "bartlet")) for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 2 - fabs(2+4*(time[i]-maxt)/span); } } else if (eq(window, "blackman")) { int order; if (!cp_getvar("specwindoworder", CP_NUM, &order)) order = 2; if (order < 2) /* only order 2 supported here */ order = 2; for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1; win[i] -= 0.50/0.42*cos(2*M_PI*(time[i]-maxt)/span); win[i] += 0.08/0.42*cos(4*M_PI*(time[i]-maxt)/span); } } } else if (eq(window, "gaussian")) { int order; double scale; if (!cp_getvar("specwindoworder", CP_NUM, &order)) order = 2; if (order < 2) order = 2; scale = pow(2*M_PI/order, 0.5)*(0.5-erfc(pow(order, 0.5))); for (i = 0; i < tlen; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = exp(-0.5*order*(1-2*(maxt-time[i])/span) *(1-2*(maxt-time[i])/span))/scale; } } } else { fprintf(cp_err, "Warning: unknown window type %s\n", window); goto done; } } names = ft_getpnames(wl, TRUE); vlist = NULL; ngood = 0; for (pn = names; pn; pn = pn->pn_next) { vec = ft_evaluate(pn); for (; vec; vec = vec->v_link2) { if (vec->v_length != tlen) { fprintf(cp_err, "Error: lengths don't match: %d, %d\n", vec->v_length, tlen); continue; } if (!isreal(vec)) { fprintf(cp_err, "Error: %s isn't real!\n", vec->v_name); continue; } if (vec->v_type == SV_TIME) { continue; } if (!vlist) vlist = vec; else lv->v_link2 = vec; lv = vec; ngood++; } } if (!ngood) goto done; plot_cur = plot_alloc("spectrum"); plot_cur->pl_next = plot_list; plot_list = plot_cur; plot_cur->pl_title = copy((plot_cur->pl_next)->pl_title); plot_cur->pl_name = copy("Spectrum"); plot_cur->pl_date = copy(datestring()); freq = TMALLOC(double, fpts); f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = copy("frequency"); f->v_type = SV_FREQUENCY; f->v_flags = (VF_REAL | VF_PERMANENT | VF_PRINT); f->v_length = fpts; f->v_realdata = freq; vec_new(f); tdvec = TMALLOC(double *, ngood); fdvec = TMALLOC(ngcomplex_t *, ngood); for (i = 0, vec = vlist; i < ngood; i++) { tdvec[i] = vec->v_realdata; fdvec[i] = TMALLOC(ngcomplex_t, fpts); f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = vec_basename(vec); f->v_type = vec->v_type; f->v_flags = (VF_COMPLEX | VF_PERMANENT); f->v_length = fpts; f->v_compdata = fdvec[i]; vec_new(f); vec = vec->v_link2; } dc = TMALLOC(double, ngood); for (i = 0; i < ngood; i++) dc[i] = 0; for (k = 1; k < tlen; k++) { double amp = win[k]/(tlen-1); for (i = 0; i < ngood; i++) { dc[i] += tdvec[i][k]*amp; } } trace = cp_getvar("spectrace", CP_BOOL, NULL); for (j = (startf == 0 ? 1 : 0); j < fpts; j++) { freq[j] = startf + j*stepf; if (trace) fprintf(cp_err, "spec: %e Hz: \r", freq[j]); for (i = 0; i < ngood; i++) { fdvec[i][j].cx_real = 0; fdvec[i][j].cx_imag = 0; } for (k = 1; k < tlen; k++) { double amp = 2*win[k]/(tlen-1), rad = 2*M_PI*time[k]*freq[j], cosa = amp*cos(rad), sina = amp*sin(rad); for (i = 0; i < ngood; i++) { double value = tdvec[i][k]-dc[i]; fdvec[i][j].cx_real += value*cosa; fdvec[i][j].cx_imag += value*sina; } } #ifdef HAS_PROGREP SetAnalyse("spec", (int)(j * 1000./ fpts)); #endif } if (startf == 0) { freq[0] = 0; for (i = 0; i < ngood; i++) { fdvec[i][0].cx_real = dc[i]; fdvec[i][0].cx_imag = 0; } } if (trace) fprintf(cp_err, " \r"); #ifdef KEEPWINDOW f = alloc(struct dvec); ZERO(f, struct dvec); f->v_name = copy("win"); f->v_type = SV_NOTYPE; f->v_flags = (VF_REAL | VF_PERMANENT); f->v_length = tlen; f->v_realdata = win; win = NULL; vec_new(f); #endif done: tfree(dc); tfree(tdvec); tfree(fdvec); tfree(win); free_pnode(names); } ngspice-26/src/frontend/com_commands.h0000644000265600020320000000040012264261473017441 0ustar andreasadmin#ifndef ngspice_COM_COMMANDS_H #define ngspice_COM_COMMANDS_H void com_showmod(wordlist *wl); void com_show(wordlist *wl); void com_alter(wordlist *wl); void com_altermod(wordlist *wl); void com_meas(wordlist *wl); void com_sysinfo(wordlist *wl); #endif ngspice-26/src/frontend/parser/0000755000265600020320000000000012264261704016130 5ustar andreasadminngspice-26/src/frontend/parser/numparse.c0000644000265600020320000001017012264261473020130 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* This routine parses a number. */ #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/ftedefs.h" #include "numparse.h" static double power10(double num) /* Chris Inbody */ { double d = 1.0; while (num-- > 0) d *= 10.0; return (d); } bool ft_strictnumparse = FALSE; /* Parse a number. This will handle things like 10M, etc... If the number * must not end before the end of the string, then whole is TRUE. * If whole is FALSE and there is more left to the number, the argument * is advanced to the end of the word. Returns NULL * if no number can be found or if there are trailing characters when * whole is TRUE. * * If ft_strictnumparse is TRUE, and whole is FALSE, the first of the * trailing characters must be a '_'. */ double * ft_numparse(char **s, bool whole) { double mant = 0.0; int sign = 1, exsign = 1, p; double expo = 0.0; static double num; char *string = *s; /* See if the number begins with + or -. */ if (*string == '+') { string++; } else if (*string == '-') { string++; sign = -1; } /* We don't want to recognise "P" as 0P, or .P as 0.0P... */ if ((!isdigit(*string) && *string != '.') || ((*string == '.') && !isdigit(string[1]))) return (NULL); /* Now accumulate a number. Note ascii dependencies here... */ while (isdigit(*string)) mant = mant * 10.0 + (*string++ - '0'); /* Now maybe a decimal point. */ if (*string == '.') { string++; p = 1; while (isdigit(*string)) mant += (*string++ - '0') / power10(p++); } /* Now look for the scale factor or the exponent (can't have both). */ switch (*string) { case 'e': case 'E': /* Parse another number. */ string++; if (*string == '+') { exsign = 1; string++; } else if (*string == '-') { exsign = -1; string++; } while (isdigit(*string)) expo = expo * 10.0 + (*string++ - '0'); if (*string == '.') { string++; p = 1; while (isdigit(*string)) expo += (*string++ - '0') / power10(p++); } expo *= exsign; break; case 't': case 'T': expo = 12.0; string++; break; case 'g': case 'G': expo = 9.0; string++; break; case 'k': case 'K': expo = 3.0; string++; break; case 'u': case 'U': expo = -6.0; string++; break; case 'n': case 'N': expo = -9.0; string++; break; case 'p': case 'P': expo = -12.0; string++; break; case 'f': case 'F': expo = -15.0; string++; break; case 'm': case 'M': /* Can be either m, mil, or meg. */ if (string[1] && string[2] && ((string[1] == 'e') || (string[1] == 'E')) && ((string[2] == 'g') || (string[2] == 'G'))) { expo = 6.0; string += 3; } else if (string[1] && string[2] && ((string[1] == 'i') || (string[1] == 'I')) && ((string[2] == 'l') || (string[2] == 'L'))) { expo = -6.0; mant *= 25.4; string += 3; } else { expo = -3.0; string++; } break; } if (whole && *string != '\0') { return (NULL); } else if (ft_strictnumparse && *string && isdigit(string[-1])) { if (*string == '_') while (isalpha(*string) || (*string == '_')) string++; else return (NULL); } else { while (isalpha(*string) || (*string == '_')) string++; } *s = string; num = sign * mant * pow(10.0, expo); if (ft_parsedb) fprintf(cp_err, "numparse: got %e, left = %s\n", num, *s); return (&num); } ngspice-26/src/frontend/parser/backq.h0000644000265600020320000000020412264261473017361 0ustar andreasadmin/************* * Header file for backq.c * 1999 E. Rouat ************/ #ifndef ngspice_BACKQ_H #define ngspice_BACKQ_H #endif ngspice-26/src/frontend/parser/backq.c0000644000265600020320000000510512264261473017361 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Do backquote substitution on a word list. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "backq.h" static wordlist *backeval(char *string); char cp_back = '`'; wordlist * cp_bquote(wordlist *wlist) { wordlist *wl, *nwl; char *s, *t, buf[BSIZE_SP], wbuf[BSIZE_SP], tbuf[BSIZE_SP]; int i; for (wl = wlist; wl; wl = wl->wl_next) { t = wl->wl_word; if (!t) continue; i = 0; loop: s = strchr(t, cp_back); if (s == NULL) continue; while (t < s) wbuf[i++] = *t++; wbuf[i] = '\0'; t++; s = buf; /* Get s and t past the next backquote. */ while (*t && (*t != cp_back)) *s++ = *t++; /* What the heck, let "echo `foo" work... */ *s = '\0'; t++; /* Get past the second ` */ if ((nwl = backeval(buf)) == NULL) { wlist->wl_word = NULL; return (wlist); } (void) strcpy(buf, wbuf); if (nwl->wl_word) { (void) strcat(buf, nwl->wl_word); tfree(nwl->wl_word); } nwl->wl_word = copy(buf); (void) strcpy(tbuf, t); wl = wl_splice(wl, nwl); for (wlist = wl; wlist->wl_prev; wlist = wlist->wl_prev) ; /* MW. We must move to the begging of new wordlist. */ (void) strcpy(buf, wl->wl_word); i = (int) strlen(buf); (void) strcat(buf, tbuf); tfree(wl->wl_word); wl->wl_word = copy(buf); t = &wl->wl_word[i]; s = wl->wl_word; for (i = 0; s < t; s++) wbuf[i++] = *s; goto loop; } return (wlist); } /* Do a popen with the string, and then reset the file pointers so that * we can use the first pass of the parser on the output. */ static wordlist * backeval(char *string) { #ifdef HAVE_POPEN FILE *proc, *old; wordlist *wl; bool intv; proc = popen(string, "r"); if (proc == NULL) { fprintf(cp_err, "Error: can't evaluate %s.\n", string); return (NULL); } old = cp_inp_cur; cp_inp_cur = proc; intv = cp_interactive; cp_interactive = FALSE; cp_bqflag = TRUE; wl = cp_lexer(NULL); cp_bqflag = FALSE; cp_inp_cur = old; cp_interactive = intv; (void) pclose(proc); return (wl); #else wordlist *wl = wl_cons(copy(string), NULL); return (wl); #endif } ngspice-26/src/frontend/parser/cshpar.c0000644000265600020320000000422612264261473017563 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * The main entry point for cshpar. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include #include "cshpar.h" #ifdef HAVE_SGTTY_H #include #else #ifdef HAVE_TERMIO_H #include #else #ifdef HAVE_TERMIOS_H #include #endif #endif #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif /* Things go as follows: * (1) Read the line and do some initial quoting (by setting the 8th bit), * and command ignoring. Also deal with command completion. * (2) Do history substitutions. (!, ^) * (3) Do alias substitution. * * In front.c these things get done: * (4) Do variable substitution. ($varname) * (5) Do backquote substitution. (``) * (6) Do globbing. (*, ?, [], {}, ~) * (7) Do io redirection. */ static void pwlist(wordlist *wlist, char *name); wordlist * cp_parse(char *string) { wordlist *wlist; wlist = cp_lexer(string); if (!string) cp_event++; if (!wlist || !wlist->wl_word) return (wlist); pwlist(wlist, "Initial parse"); wlist = cp_histsubst(wlist); if (!wlist || !wlist->wl_word) return (wlist); pwlist(wlist, "After history substitution"); if (cp_didhsubst) { wl_print(wlist, stdout); putc('\n', stdout); } /* Add the word list to the history. */ /* MW. If string==NULL we do not have to do this, and then play * with cp_lastone is not needed, but watch out cp_doalias */ if ((*wlist->wl_word) && !(string)) cp_addhistent(cp_event - 1, wlist); wlist = cp_doalias(wlist); pwlist(wlist, "After alias substitution"); pwlist(wlist, "Returning "); return (wlist); } static void pwlist(wordlist *wlist, char *name) { wordlist *wl; if (!cp_debug) return; fprintf(cp_err, "%s : [ ", name); for (wl = wlist; wl; wl = wl->wl_next) fprintf(cp_err, "%s ", wl->wl_word); fprintf(cp_err, "]\n"); } ngspice-26/src/frontend/parser/complete.h0000644000265600020320000000175512264261473020124 0ustar andreasadmin/************* * Header file for complete.c * 1999 E. Rouat ************/ #ifndef ngspice_COMPLETE_H #define ngspice_COMPLETE_H /* The data structure for the commands is as follows: every node has a pointer * to its leftmost child, where the children of a node are those of which * the node is a prefix. This means that for a word like "ducks", there * must be nodes "d", "du", "duc", etc (which are all marked "invalid", * of course). This data structure is called a "trie". */ #define NARGS 4 struct ccom { char *cc_name; /* Command or keyword name. */ long cc_kwords[NARGS]; /* What this command takes. */ char cc_invalid; /* This node has been deleted. */ struct ccom *cc_child; /* Left-most child. */ struct ccom *cc_sibling; /* Right (alph. greater) sibling. */ struct ccom *cc_ysibling; /* Left (alph. less) sibling. */ struct ccom *cc_parent; /* Parent node. */ }; void throwaway(struct ccom *dbase); #endif ngspice-26/src/frontend/parser/lexical.h0000644000265600020320000000024112264261473017722 0ustar andreasadmin/************* * Header file for lexical.c * 1999 E. Rouat ************/ #ifndef ngspice_LEXICAL_H #define ngspice_LEXICAL_H int input(FILE *fp); #endif ngspice-26/src/frontend/parser/std.c0000644000265600020320000000063012264261473017070 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Standard utility routines. * Most moved to MISC/ */ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" /* This might not be around. If not then forget about sorting. */ #ifndef HAVE_QSORT #ifndef qsort qsort() {} #endif #endif ngspice-26/src/frontend/parser/cshpar.h0000644000265600020320000000020712264261473017563 0ustar andreasadmin/************* * Header file for cshpar.c * 1999 E. Rouat ************/ #ifndef ngspice_CSHPAR_H #define ngspice_CSHPAR_H #endif ngspice-26/src/frontend/parser/lexical.c0000644000265600020320000002305112264261473017721 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Initial lexer. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_PWD_H #include #include #endif /* MW. Linux has TIOCSTI, so we include all headers here */ #if !defined(__MINGW32__) && !defined(_MSC_VER) #include #endif #ifdef HAVE_SGTTY_H #include #include #else #ifdef HAVE_TERMIO_H #include #include #else #ifdef HAVE_TERMIOS_H #include #include #endif #endif #endif #define NEW_BSIZE_SP 2*BSIZE_SP #include "ngspice/fteinput.h" #include "lexical.h" static void prompt(void); extern bool cp_echo; /* For CDHW patches: defined in variable.c */ FILE *cp_inp_cur = NULL; int cp_event = 1; bool cp_interactive = TRUE; bool cp_bqflag = FALSE; char *cp_promptstring = NULL; char *cp_altprompt = NULL; char cp_hash = '#'; static int numeofs = 0; #define ESCAPE '\033' /* Return a list of words, with backslash quoting and '' quoting done. * Strings en(void) closed in "" or `` are made single words and returned, * but with the "" or `` still present. For the \ and '' cases, the * 8th bit is turned on (as in csh) to prevent them from being recognized, * and stripped off once all processing is done. We also have to deal with * command, filename, and keyword completion here. * If string is non-NULL, then use it instead of the fp. Escape and EOF * have no business being in the string. */ #define append(word) \ wl_append_word(&wlist, &cw, word) #define newword \ do { \ append(copy(buf)); \ bzero(buf, NEW_BSIZE_SP); \ i = 0; \ } while(0) /* CDHW Debug function */ /* CDHW used to perform function of set echo */ static void pwlist_echo(wordlist *wlist, char *name) { wordlist *wl; if (!cp_echo || cp_debug) return; fprintf(cp_err, "%s ", name); for (wl = wlist; wl; wl = wl->wl_next) fprintf(cp_err, "%s ", wl->wl_word); fprintf(cp_err, "\n"); } /* CDHW */ wordlist * cp_lexer(char *string) { int c, d; int i, j; wordlist *wlist = NULL, *cw = NULL; char buf[NEW_BSIZE_SP], linebuf[NEW_BSIZE_SP]; int paren; if (!cp_inp_cur) cp_inp_cur = cp_in; /* prompt for string if none is passed */ if (!string && cp_interactive) { cp_ccon(TRUE); prompt(); } nloop: wlist = cw = NULL; i = 0; j = 0; paren = 0; bzero(linebuf, NEW_BSIZE_SP); bzero(buf, NEW_BSIZE_SP); for (;;) { if (string) { c = *string++; if (c == '\0') c = '\n'; if (c == ESCAPE) c = '['; } else { c = input(cp_inp_cur); } gotchar: if ((c != EOF) && (c != ESCAPE)) linebuf[j++] = (char) c; if (c != EOF) numeofs = 0; if (i == NEW_BSIZE_SP - 1) { fprintf(cp_err, "Warning: word too long.\n"); c = ' '; } if (j == NEW_BSIZE_SP - 1) { fprintf(cp_err, "Warning: line too long.\n"); if (cp_bqflag) c = EOF; else c = '\n'; } if (c != EOF) /* Don't need to do this really. */ c = strip(c); if ((c == '\\' && DIR_TERM != '\\') || (c == '\026') /* ^V */ ) { c = quote(string ? *string++ : input(cp_inp_cur)); linebuf[j++] = (char) strip(c); } if ((c == '\n') && cp_bqflag) c = ' '; if ((c == EOF) && cp_bqflag) c = '\n'; if ((c == cp_hash) && !cp_interactive && (j == 1)) { wl_free(wlist); wlist = cw = NULL; if (string) return NULL; while (((c = input(cp_inp_cur)) != '\n') && (c != EOF)) ; goto nloop; } if ((c == '(') || (c == '[')) /* MW. Nedded by parse() */ paren++; else if ((c == ')') || (c == ']')) paren--; switch (c) { case ' ': case '\t': if (i > 0) newword; break; case '\n': if (i) { buf[i] = '\0'; newword; } if (!cw) append(NULL); goto done; case '\'': while (((c = (string ? *string++ : input(cp_inp_cur))) != '\'') && (i < NEW_BSIZE_SP - 1)) { if ((c == '\n') || (c == EOF) || (c == ESCAPE)) goto gotchar; buf[i++] = (char) quote(c); linebuf[j++] = (char) c; } linebuf[j++] = '\''; break; case '"': case '`': d = c; buf[i++] = (char) d; while (((c = (string ? *string++ : input(cp_inp_cur))) != d) && (i < NEW_BSIZE_SP - 2)) { if ((c == '\n') || (c == EOF) || (c == ESCAPE)) goto gotchar; if (c == '\\') { linebuf[j++] = (char) c; c = (string ? *string++ : input(cp_inp_cur)); buf[i++] = (char) quote(c); linebuf[j++] = (char) c; } else { buf[i++] = (char) c; linebuf[j++] = (char) c; } } buf[i++] = (char) d; linebuf[j++] = (char) d; break; case '\004': case EOF: if (cp_interactive && !cp_nocc && !string) { if (j == 0) { if (cp_ignoreeof && (numeofs++ < 23)) { fputs("Use \"quit\" to quit.\n", stdout); } else { fputs("quit\n", stdout); cp_doquit(); } append(NULL); goto done; } // cp_ccom doesn't mess wlist, read only access to wlist->wl_word cp_ccom(wlist, buf, FALSE); wl_free(wlist); (void) fputc('\r', cp_out); prompt(); for (j = 0; linebuf[j]; j++) #ifdef TIOCSTI (void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j); #else fputc(linebuf[j], cp_out); /* But you can't edit */ #endif wlist = cw = NULL; goto nloop; } /* EOF during a source */ if (cp_interactive) { fputs("quit\n", stdout); cp_doquit(); append(NULL); goto done; } wl_free(wlist); return NULL; case ESCAPE: if (cp_interactive && !cp_nocc) { fputs("\b\b \b\b\r", cp_out); prompt(); for (j = 0; linebuf[j]; j++) #ifdef TIOCSTI (void) ioctl(fileno(cp_out), TIOCSTI, linebuf + j); #else fputc(linebuf[j], cp_out); /* But you can't edit */ #endif // cp_ccom doesn't mess wlist, read only access to wlist->wl_word cp_ccom(wlist, buf, TRUE); wl_free(wlist); wlist = cw = NULL; goto nloop; } goto ldefault; case ',': if ((paren < 1) && (i > 0)) { newword; break; } goto ldefault; case ';': /* CDHW semicolon inside parentheses is part of expression */ if (paren > 0) { buf[i++] = (char) c; break; } goto ldefault; case '&': /* va: $&name is one word */ if ((i >= 1) && (buf[i-1] == '$') && (c == '&')) { buf[i++] = (char) c; break; } goto ldefault; case '<': case '>': /* va: <=, >= are unbreakable words */ if (string) if ((i == 0) && (*string == '=')) { buf[i++] = (char) c; break; } goto ldefault; default: /* We have to remember the special case $< * here */ ldefault: if ((cp_chars[c] & CPC_BRL) && (i > 0)) if ((c != '<') || (buf[i-1] != '$')) newword; buf[i++] = (char) c; if (cp_chars[c] & CPC_BRR) if ((c != '<') || (i < 2) || (buf[i-2] != '$')) newword; } } done: if (wlist->wl_word) pwlist_echo(wlist, "Command>"); return wlist; } static void prompt(void) { char *s; if (cp_interactive == FALSE) return; if (cp_altprompt) s = cp_altprompt; else if (cp_promptstring) s = cp_promptstring; else s = "-> "; while (*s) { switch (strip(*s)) { case '!': fprintf(cp_out, "%d", cp_event); break; case '\\': if (s[1]) (void) putc(strip(*++s), cp_out); default: (void) putc(strip(*s), cp_out); } s++; } (void) fflush(cp_out); } ngspice-26/src/frontend/parser/ChangeLog0000644000265600020320000000743112264261473017712 0ustar andreasadmin2002-01-03 Paolo Nenzi * complete.c: Double patch applied, code for Windows support (Holger Vogt) and rework of netBSD support (AMAKAWA Shuhei). * input.c, lexical.c: Windows support (Holger Vogt patch). 2001-12-14 Paolo Nenzi * lexical.c, complete.c, complete.h: Patched the code with the one contributed by Charles Williams. The patches addresses some memory leaks. 2000-07-18 Arno W. Peters * numparse.c: Updates of header file includes. Some formatting changes. * wlist.c: Moved this file to src/misc/wlist.c * Makefile.am: Removed wlist.c 2000-03-11 Paolo Nenzi * numparse.c: as wrote in Chris Inbody patch: In numparse.c line 17 changed the arg type of "num" to double. This (so far :) seems to have had no adverse effect. 2000-03-11 Paolo Nenzi * history.c: applied Chris Inbody patch. He wrote: I had some trouble running ng-spice in batch mode on a fairly repetitive job (probably 10 - 20 commands repeated 256 times in a single session :), it was giving me "mangled history" errors and then seg faulting. [...] In history.c line 425, added an exit(0) call to the else condition to prevent seg fault upon generation of the history list error. On line 25, changed cp_maxhistlength to 10000 vs 1000. The value of 10000 was enough to keep my task from crashing but there may be a better way to do this,.. I didn't try an arbitrarily high number because I'm not sure what effect it would have on memory usage or progam size or speed. Maybe that's the best answer, just bump the value to 1e6 or something that no one would ever approach. 1999-09-07 Arno * lexical.c: read() requires #include of unistd.h. * modify.c: removed warning about char subscript for array. * unixcom.h: removed prototypes for static tryexec(), hash(). * var2.c: added default case to remove warning. 1999-09-04 Emmanuel Rouat * *.c: added header files for .c files 1999-08-28 Emmanuel Rouat * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-27 Paolo Nenzi * Removed #include "suffix.h", replaced GENERIC with void and ansified the code with protoize. 1999-08-08 Emmanuel Rouat * Removed HAS_DOSDIRS and HAS_POW10 code in directory * Makefile.am (libcp_a_SOURCES): removed spawn.c (vms only) 1999-08-06 Emmanuel Rouat * unixcom.c (cp_unixcom): * cshpar.c: removed test on HAS_SYSTEM (always true on Unix?) * backq.c (backeval): changed HAS_POPEN in HAVE_POPEN * cshpar.c (fileexists): changed HAS_ACCESS in HAVE_ACCESS (com_chdir): removed test on HAS_CHDIR (always true on Unix) (com_shell): removed test on HAS_UNIX_SIGS (always true on Unix) * unixcom.c (cp_unixcom): changed HAS_INTSYSWAIT in HAVE_SYS_WAIT_H 1999-08-05 Emmanuel Rouat * cshpar.c (com_chdir): removed HAS_GETENV tests. * var2.c (vareval): removed test on HAS_GETPID * unixcom.c: changed HAS_GETCWD in HAVE_GETCWD and HAS_GETWD into HAVE_GETWD * lexical.c, gloc.c, cshpar.c: changed HAS_GETPW in HAVE_PWD_H (com_chdir): changed HAS_GETCWD in HAVE_GETCWD (and #included unistd.h) * std.c: changed HAS_QSORT in HAVE_QSORT 1999-08-04 Emmanuel Rouat * cshpar.c: changed HAS_WAIT2(??) into HAVE_SYS_WAIT_H 1999-08-03 Emmanuel Rouat * output.c: changed HAS_TERMCAP in HAVE_TERMCAP * unixcom.c: changed HAS_VFORK in HAVE_VORK_H * unixcom.c, complete.c, glob.c: HAVE_SYS_DIR_H and HAVE_DIRENT_H (instead of HAS_BSDDIRS and HAS_SYSVDIRS) * cshpar.c (com_shell): changed HAS_VFORK in HAVE_VORK_H ngspice-26/src/frontend/parser/input.h0000644000265600020320000000023312264261473017441 0ustar andreasadmin/************* * Header file for input.c * 1999 E. Rouat ************/ #ifndef ngspice_INPUT_H #define ngspice_INPUT_H int input(FILE *fp); #endif ngspice-26/src/frontend/parser/unixcom.h0000644000265600020320000000021212264261473017761 0ustar andreasadmin/************* * Header file for unixcom.c * 1999 E. Rouat ************/ #ifndef ngspice_UNIXCOM_H #define ngspice_UNIXCOM_H #endif ngspice-26/src/frontend/parser/glob.h0000644000265600020320000000020112264261473017220 0ustar andreasadmin/************* * Header file for glob.c * 1999 E. Rouat ************/ #ifndef ngspice_GLOB_H #define ngspice_GLOB_H #endif ngspice-26/src/frontend/parser/Makefile.am0000644000265600020320000000071512264261473020172 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libparser.la libparser_la_SOURCES = \ backq.c \ backq.h \ complete.c \ complete.h \ cshpar.c \ cshpar.h \ glob.c \ glob.h \ input.c \ input.h \ lexical.c \ lexical.h \ numparse.c \ numparse.h \ std.c \ unixcom.c \ unixcom.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/parser/Makefile.in0000644000265600020320000004135312264261534020204 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend/parser DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libparser_la_LIBADD = am_libparser_la_OBJECTS = backq.lo complete.lo cshpar.lo glob.lo \ input.lo lexical.lo numparse.lo std.lo unixcom.lo libparser_la_OBJECTS = $(am_libparser_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libparser_la_SOURCES) DIST_SOURCES = $(libparser_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libparser.la libparser_la_SOURCES = \ backq.c \ backq.h \ complete.c \ complete.h \ cshpar.c \ cshpar.h \ glob.c \ glob.h \ input.c \ input.h \ lexical.c \ lexical.h \ numparse.c \ numparse.h \ std.c \ unixcom.c \ unixcom.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/parser/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libparser.la: $(libparser_la_OBJECTS) $(libparser_la_DEPENDENCIES) $(EXTRA_libparser_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libparser_la_OBJECTS) $(libparser_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/backq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cshpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/glob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lexical.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numparse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/std.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unixcom.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/parser/glob.c0000644000265600020320000001174512264261473017232 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Expand global characters. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "glob.h" #ifdef HAVE_SYS_DIR_H #include #include #else #ifdef HAVE_DIRENT_H #include #include #ifndef direct #define direct dirent #endif #endif #endif #ifdef HAVE_PWD_H #include #endif char cp_comma = ','; char cp_ocurl = '{'; char cp_ccurl = '}'; char cp_til = '~'; static wordlist *bracexpand(char *string); static wordlist *brac1(char *string); static wordlist *brac2(char *string); /* For each word, go through two steps: expand the {}'s, and then do ?*[] * globbing in them. Sort after the second phase but not the first... */ /* MW. Now only tilde is supported, {}*? don't work */ wordlist * cp_doglob(wordlist *wlist) { wordlist *wl; char *s; /* Expand {a,b,c} */ for (wl = wlist; wl; wl = wl->wl_next) { wordlist *nwl, *w = bracexpand(wl->wl_word); if (!w) { wlist->wl_word = NULL; /* XXX */ return (wlist); } nwl = wl_splice(wl, w); if (wlist == wl) wlist = w; wl = nwl; } /* Do tilde expansion. */ for (wl = wlist; wl; wl = wl->wl_next) if (*wl->wl_word == cp_til) { s = cp_tildexpand(wl->wl_word); txfree(wl->wl_word); /* sjb - fix memory leak */ if (!s) *wl->wl_word = '\0'; /* MW. We Con't touch tmalloc addres */ else wl->wl_word = s; } return (wlist); } static wordlist * bracexpand(char *string) { wordlist *wl, *w; char *s; if (!string) return (NULL); wl = brac1(string); if (!wl) return (NULL); for (w = wl; w; w = w->wl_next) { s = w->wl_word; w->wl_word = copy(s); tfree(s); } return (wl); } /* Given a string, returns a wordlist of all the {} expansions. This is * called recursively by cp_brac2(). All the words here will be of size * BSIZE_SP, so it is a good idea to copy() and free() the old words. */ static wordlist * brac1(char *string) { wordlist *words, *wl, *w, *nw, *nwl, *newwl; char *s; int nb; words = wl_cons(TMALLOC(char, BSIZE_SP), NULL); words->wl_word[0] = '\0'; for (s = string; *s; s++) { if (*s == cp_ocurl) { nwl = brac2(s); nb = 0; for (;;) { if (*s == cp_ocurl) nb++; if (*s == cp_ccurl) nb--; if (*s == '\0') { /* { */ fprintf(cp_err, "Error: missing }.\n"); return (NULL); } if (nb == 0) break; s++; } /* Add nwl to the rest of the strings in words. */ newwl = NULL; for (wl = words; wl; wl = wl->wl_next) for (w = nwl; w; w = w->wl_next) { nw = wl_cons(TMALLOC(char, BSIZE_SP), NULL); (void) strcpy(nw->wl_word, wl->wl_word); (void) strcat(nw->wl_word, w->wl_word); newwl = wl_append(newwl, nw); } wl_free(words); words = newwl; } else { for (wl = words; wl; wl = wl->wl_next) appendc(wl->wl_word, *s); } } return (words); } /* Given a string starting with a {, return a wordlist of the expansions * for the text until the matching }. */ static wordlist * brac2(char *string) { wordlist *wlist = NULL, *nwl; char buf[BSIZE_SP], *s; int nb; bool eflag = FALSE; string++; /* Get past the first open brace... */ for (;;) { (void) strcpy(buf, string); nb = 0; s = buf; for (;;) { if ((*s == cp_ccurl) && (nb == 0)) { eflag = TRUE; break; } if ((*s == cp_comma) && (nb == 0)) break; if (*s == cp_ocurl) nb++; if (*s == cp_ccurl) nb--; if (*s == '\0') { /* { */ fprintf(cp_err, "Error: missing }.\n"); return (NULL); } s++; } *s = '\0'; nwl = brac1(buf); wlist = wl_append(wlist, nwl); string += s - buf + 1; if (eflag) return (wlist); } } /* Expand tildes. */ char * cp_tildexpand(char *string) { char *result; result = tildexpand(string); if (!result) { if (cp_nonomatch) return copy(string); else return NULL; } return result; } /* Say whether the pattern p can match the string s. */ /* MW. Now simply compare strings */ bool cp_globmatch(char *p, char *s) { return (!(strcmp(p, s))); } ngspice-26/src/frontend/parser/complete.c0000644000265600020320000004433312264261473020116 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 1999 Paolo Nenzi **********/ /* * Command completion code. We keep a data structure with information on each * command, to make lookups fast. We also keep NCLASSES (which is sort of * hardwired as 32) sets of keywords. Each command has an array of NARGS * bitmasks (also hardwired as 4), stating whether the command takes that * particular class of keywords in that position. Class 0 always means * filename completion. */ #include "ngspice/ngspice.h" #include "ngspice/fteext.h" #include "ngspice/cpdefs.h" #include "complete.h" #ifdef HAVE_SYS_DIR_H #include #include #else # ifdef HAVE_DIRENT_H # include # include # ifndef direct # define direct dirent # endif # endif #endif #ifdef HAVE_PWD_H #include #endif #if !defined(__MINGW32__) && !defined(_MSC_VER) /* MW. We also need ioctl.h here I think */ #include #endif /* Be sure the ioctls get included in the following */ #ifdef HAVE_SGTTY_H #include #else #ifdef HAVE_TERMIO_H #include #else #ifdef HAVE_TERMIOS_H #include #endif #endif #endif #define CNTRL_D '\004' #define ESCAPE '\033' #define NCLASSES 32 bool cp_nocc; /* Don't do command completion. */ static struct ccom *commands = NULL; /* The available commands. */ static struct ccom *keywords[NCLASSES]; /* Keywords. */ #ifdef TIOCSTI /* va, functions used in this branch only */ static struct ccom *getccom(char *first); static wordlist *ccfilec(char *buf); static wordlist *ccmatch(char *word, struct ccom **dbase); static void printem(wordlist *wl); #endif static wordlist *cctowl(struct ccom *cc, bool sib); static struct ccom *clookup(register char *word, struct ccom **dd, bool pref, bool create); /* MW. I need top node in cdelete */ static void cdelete(struct ccom *node, struct ccom **top); #ifdef TIOCSTI void cp_ccom(wordlist *wlist, char *buf, bool esc) { struct ccom *cc; wordlist *a, *pmatches = NULL; char wbuf[BSIZE_SP], *s; int i = 0; int j, arg; buf = cp_unquote(copy(buf)); cp_wstrip(buf); if (wlist) { /* Not the first word. */ cc = getccom(wlist->wl_word); if (cc && cc->cc_invalid) cc = NULL; arg = wl_length(wlist) - 1; if (arg > 3) arg = 3; /* First filenames. */ if (cc && (cc->cc_kwords[arg] & 1)) { pmatches = ccfilec(buf); s = strrchr(buf, '/'); i = (int) strlen(s ? s + 1 : buf); if ((*buf == '~') && !strchr(buf, '/')) i--; } /* The keywords. */ for (j = 1; j < NCLASSES; j++) if (cc && (cc->cc_kwords[arg] & (1 << j))) { /* Find all the matching keywords. */ a = ccmatch(buf, &keywords[j]); i = (int) strlen(buf); if (pmatches) pmatches = wl_append(pmatches, a); else pmatches = a; } wl_sort(pmatches); } else { pmatches = ccmatch(buf, &commands); i = (int) strlen(buf); } tfree(buf); /*CDHW*/ if (!esc) { printem(pmatches); wl_free(pmatches); return; } if (pmatches == NULL) { (void) putchar('\07'); (void) fflush(cp_out); return; } if (pmatches->wl_next == NULL) { (void) strcpy(wbuf, &pmatches->wl_word[i]); goto found; } /* Now we know which words might work. Extend the command as much * as possible, then TIOCSTI the characters out. */ for (j = 0;; j++, i++) { wbuf[j] = pmatches->wl_word[i]; for (a = pmatches->wl_next; a; a = a->wl_next) if (a->wl_word[i] != wbuf[j]) { (void) putchar('\07'); (void) fflush(cp_out); wbuf[j] = '\0'; goto found; } if (wbuf[j] == '\0') goto found; } found: for (i = 0; wbuf[i]; i++) (void) ioctl(fileno(cp_in), TIOCSTI, &wbuf[i]); wl_free(pmatches); } /* Figure out what the command is, given the name. Returns NULL if there * is no such command in the command list. This is tricky, because we have * to do a preliminary history and alias parse. (Or at least we should.) */ static struct ccom * getccom(char *first) { struct alias *al; int ntries = 21; /* First look for aliases. Just interested in the first word... * Don't bother doing history yet -- that might get complicated. */ while (ntries-- > 0) { for (al = cp_aliases; al; al = al->al_next) if (eq(first, al->al_name)) { first = al->al_text->wl_word; break; } if (al == NULL) break; } if (ntries == 0) { fprintf(cp_err, "\nError: alias loop.\n"); return (NULL); } return (clookup(first, &commands, FALSE, FALSE)); } /* Figure out what files match the prefix. */ static wordlist * ccfilec(char *buf) { DIR *wdir; char *lcomp, *dir; struct direct *de; wordlist *wl = NULL; struct passwd *pw; buf = copy(buf); /* Don't mangle anything... */ lcomp = strrchr(buf, '/'); if (lcomp == NULL) { dir = "."; lcomp = buf; if (*buf == cp_til) { /* User name completion... */ buf++; while ((pw = getpwent()) != NULL) if (prefix(buf, pw->pw_name)) wl = wl_cons(copy(pw->pw_name), wl); (void) endpwent(); return (wl); } } else { dir = buf; *lcomp = '\0'; lcomp++; if (*dir == cp_til) { dir = cp_tildexpand(dir); if (dir == NULL) return (NULL); } } if (!(wdir = opendir(dir))) return (NULL); while ((de = readdir(wdir)) != NULL) if ((prefix(lcomp, de->d_name)) && (*lcomp || (*de->d_name != '.'))) wl = wl_cons(copy(de->d_name), wl); (void) closedir(wdir); wl_sort(wl); return (wl); } /* See what keywords or commands match the prefix. Check extra also * for matches, if it is non-NULL. Return a wordlist which is in * alphabetical order. Note that we have to call this once for each * class. */ static wordlist * ccmatch(char *word, struct ccom **dbase) { wordlist *wl; register struct ccom *cc; cc = clookup(word, dbase, TRUE, FALSE); if (cc) { if (*word) /* This is a big drag. */ wl = cctowl(cc, FALSE); else wl = cctowl(cc, TRUE); } else { wl = NULL; } return (wl); } /* Print the words in the wordlist in columns. They are already * sorted... This is a hard thing to do with wordlists... */ static void printem(wordlist *wl) { wordlist *ww; int maxl = 0, num, i, j, k, width = 79, ncols, nlines; (void) putchar('\n'); if (wl == NULL) return; num = wl_length(wl); for (ww = wl; ww; ww = ww->wl_next) { j = (int) strlen(ww->wl_word); if (j > maxl) maxl = j; } if (++maxl % 8) maxl += 8 - (maxl % 8); ncols = width / maxl; if (ncols == 0) ncols = 1; nlines = num / ncols + (num % ncols ? 1 : 0); for (k = 0; k < nlines; k++) { for (i = 0; i < ncols; i++) { j = i * nlines + k; if (j < num) fprintf(cp_out, "%-*s", maxl, wl_nthelem(j, wl)->wl_word); else break; } (void) putchar('\n'); } } #else /* if not TIOCSTI */ void cp_ccom(wordlist *wlist, char *buf, bool esc) { NG_IGNORE(wlist); NG_IGNORE(buf); NG_IGNORE(esc); } #endif static wordlist * cctowl(struct ccom *cc, bool sib) { wordlist *wl; if (!cc) return (NULL); wl = cctowl(cc->cc_child, TRUE); if (!cc->cc_invalid) wl = wl_cons(copy(cc->cc_name), wl); if (sib) wl = wl_append(wl, cctowl(cc->cc_sibling, TRUE)); return (wl); } /* We use this in com_device... */ wordlist * cp_cctowl(struct ccom *stuff) { return (cctowl(stuff, TRUE)); } /* Turn on and off the escape break character and cooked mode. */ void cp_ccon(bool on) { #ifdef TIOCSTI #ifdef HAVE_SGTTY_H static bool ison = FALSE; struct tchars tbuf; struct sgttyb sbuf; if (cp_nocc || !cp_interactive || (ison == on)) return; ison = on; /* Set the terminal up -- make escape the break character, and * make sure we aren't in raw or cbreak mode. Hope the (void) * ioctl's won't fail. */ (void) ioctl(fileno(cp_in), TIOCGETC, &tbuf); if (on) tbuf.t_brkc = ESCAPE; else tbuf.t_brkc = '\0'; (void) ioctl(fileno(cp_in), TIOCSETC, &tbuf); (void) ioctl(fileno(cp_in), TIOCGETP, &sbuf); sbuf.sg_flags &= ~(RAW|CBREAK); (void) ioctl(fileno(cp_in), TIOCSETP, &sbuf); #else # ifdef HAVE_TERMIO_H # define TERM_GET TCGETA # define TERM_SET TCSETA static struct termio sbuf; static struct termio OS_Buf; # else # ifdef HAVE_TERMIOS_H # define TERM_GET TCGETS # define TERM_SET TCSETS static struct termios sbuf; static struct termios OS_Buf; # endif # endif #ifdef TERM_GET static bool ison = FALSE; if (cp_nocc || !cp_interactive || (ison == on)) return; ison = on; if (ison == TRUE) { #if HAVE_TCGETATTR tcgetattr(fileno(cp_in), &OS_Buf); #else (void) ioctl(fileno(cp_in), TERM_GET, &OS_Buf); #endif sbuf = OS_Buf; sbuf.c_cc[VEOF] = 0; sbuf.c_cc[VEOL] = ESCAPE; sbuf.c_cc[VEOL2] = CNTRL_D; #if HAVE_TCSETATTR tcsetattr(fileno(cp_in), TCSANOW, &sbuf); #else (void) ioctl(fileno(cp_in), TERM_SET, &sbuf); #endif } else { #ifdef HAVE_TCSETATTR tcsetattr(fileno(cp_in), TCSANOW, &OS_Buf); #else (void) ioctl(fileno(cp_in), TERM_SET, &OS_Buf); #endif } # endif #endif #else NG_IGNORE(on); #endif } /* The following routines deal with the command and keyword databases. * Say whether a given word exists in the command database. */ bool cp_comlook(char *word) { if (word && *word && clookup(word, &commands, FALSE, FALSE)) return (TRUE); else return (FALSE); } /* Add a command to the database, with the given keywords and filename * flag. */ void cp_addcomm(char *word, long int bits0, long int bits1, long int bits2, long int bits3) { struct ccom *cc; cc = clookup(word, &commands, FALSE, TRUE); cc->cc_invalid = 0; cc->cc_kwords[0] = bits0; cc->cc_kwords[1] = bits1; cc->cc_kwords[2] = bits2; cc->cc_kwords[3] = bits3; } /* Remove a command from the database. */ void cp_remcomm(char *word) { struct ccom *cc; cc = clookup(word, &commands, FALSE, FALSE); if (cc) cdelete(cc, &commands); } /* Add a keyword to the database. */ void cp_addkword(int kw_class, char *word) { struct ccom *cc; if ((kw_class < 1) || (kw_class >= NCLASSES)) { fprintf(cp_err, "cp_addkword: Internal Error: bad class %d\n", kw_class); return; } /* word = copy(word); va: not necessary, clookup copies itself (memory leak) */ cc = clookup(word, &keywords[kw_class], FALSE, TRUE); cc->cc_invalid = 0; } void cp_destroy_keywords(void) { int i; for (i = 0; i < NCLASSES; i++) throwaway(keywords[i]); throwaway(commands); } /* Remove a keyword from the database. */ void cp_remkword(int kw_class, char *word) { struct ccom *cc; if ((kw_class < 1) || (kw_class >= NCLASSES)) { fprintf(cp_err, "cp_remkword: Internal Error: bad class %d\n", kw_class); return; } cc = clookup(word, &keywords[kw_class], FALSE, FALSE); if (cc) cdelete(cc, &keywords[kw_class]); } /* This routine is used when there are several keyword sets that are * to be switched between rapidly. The return value is the old tree at * that position, and the keyword class given is set to the argument. */ struct ccom * cp_kwswitch(int kw_class, struct ccom *tree) { struct ccom *old; if ((kw_class < 1) || (kw_class >= NCLASSES)) { fprintf(cp_err, "cp_addkword: Internal Error: bad class %d\n", kw_class); return (NULL); } old = keywords[kw_class]; keywords[kw_class] = tree; return (old); } /* Throw away all the stuff and prepare to rebuild it from scratch... */ void cp_ccrestart(bool kwords) { NG_IGNORE(kwords); /* Ack. */ } void throwaway(struct ccom *dbase) { if (!dbase) return; /* va: security first */ if (dbase->cc_child) throwaway(dbase->cc_child); if (dbase->cc_sibling) throwaway(dbase->cc_sibling); tfree(dbase->cc_name); /* va: also tfree dbase->cc_name (memory leak) */ tfree(dbase); } /* Look up a word in the database. Because of the way the tree is set * up, this also works for looking up all words with a given prefix * (if the pref arg is TRUE). If create is TRUE, then the node is * created if it doesn't already exist. */ static struct ccom * clookup(register char *word, struct ccom **dd, bool pref, bool create) { register struct ccom *place = *dd, *tmpc; int ind = 0, i; char buf[BSIZE_SP]; if (!place) { /* This is the first time we were called. */ if (!create) { return (NULL); } else { *dd = place = alloc(struct ccom); ZERO(place, struct ccom); buf[0] = *word; buf[1] = '\0'; place->cc_name = copy(buf); if (word[0] == '\0') { fprintf(stderr, "ERROR, internal error, clookup() needs fixing to process the empty string\n"); controlled_exit(EXIT_FAILURE); } if (word[1]) place->cc_invalid = 1; } } while (word[ind]) { /* Walk down the sibling list until we find a node that * matches 'word' to 'ind' places. */ while ((place->cc_name[ind] < word[ind]) && place->cc_sibling) place = place->cc_sibling; if (place->cc_name[ind] < word[ind]) { /* This line doesn't go out that far... */ if (create) { place->cc_sibling = alloc(struct ccom); ZERO(place->cc_sibling, struct ccom); place->cc_sibling->cc_ysibling = place; place->cc_sibling->cc_parent = place->cc_parent; place = place->cc_sibling; place->cc_name = TMALLOC(char, ind + 2); for (i = 0; i < ind + 1; i++) place->cc_name[i] = word[i]; place->cc_name[ind + 1] = '\0'; place->cc_invalid = 1; } else { return (NULL); } } else if (place->cc_name[ind] > word[ind]) { if (create) { /* Put this one between place and its pred. */ tmpc = alloc(struct ccom); ZERO(tmpc, struct ccom); tmpc->cc_parent = place->cc_parent; tmpc->cc_sibling = place; tmpc->cc_ysibling = place->cc_ysibling; place->cc_ysibling = tmpc; place = tmpc; if (tmpc->cc_ysibling) tmpc->cc_ysibling->cc_sibling = tmpc; else if (tmpc->cc_parent) tmpc->cc_parent->cc_child = tmpc; else *dd = place; place->cc_name = TMALLOC(char, ind + 2); for (i = 0; i < ind + 1; i++) place->cc_name[i] = word[i]; place->cc_name[ind + 1] = '\0'; place->cc_invalid = 1; } else { return (NULL); } } /* place now points to that node that matches the word for * ind + 1 characters. */ if (word[ind + 1]) { /* More to go... */ if (!place->cc_child) { /* No children, maybe make one and go on. */ if (create) { tmpc = alloc(struct ccom); ZERO(tmpc, struct ccom); tmpc->cc_parent = place; place->cc_child = tmpc; place = tmpc; place->cc_name = TMALLOC(char, ind + 3); for (i = 0; i < ind + 2; i++) place->cc_name[i] = word[i]; place->cc_name[ind + 2] = '\0'; if (word[ind + 2]) place->cc_invalid = 1; } else { return (NULL); } } else { place = place->cc_child; } ind++; } else { break; } } if (!pref && !create && place->cc_invalid) { /* This is no good, we want a real word. */ return (NULL); } return (place); } /* Delete a node from the tree. Returns the new tree... */ /* MW. It is quite difficoult to free() everything right, but... * Anyway this could be more optimal, I think */ static void cdelete(struct ccom *node, struct ccom **top) { /* if cc_child exist only mark as deleted */ node->cc_invalid = 1; if (node->cc_child) return; /* fix cc_sibling */ if (node->cc_sibling) node->cc_sibling->cc_ysibling = node->cc_ysibling; if (node->cc_ysibling) node->cc_ysibling->cc_sibling = node->cc_sibling; /* if we have cc_parent, check if it should not be removed too */ if (node->cc_parent) { /* this node will be free() */ if (node->cc_parent->cc_child == node) { if (node->cc_ysibling) node->cc_parent->cc_child = node->cc_ysibling; else node->cc_parent->cc_child = node->cc_sibling; } /* free parent only if it is invalid */ if (node->cc_parent->cc_invalid == 1) cdelete(node->cc_parent, top); } /* now free() everything and check the top */ if (node == *top) *top = node->cc_sibling; tfree(node->cc_name); /* va: we should allways use tfree */ tfree(node); } ngspice-26/src/frontend/parser/unixcom.c0000644000265600020320000001337112264261473017766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to do execution of unix commands. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "unixcom.h" #include "../frontend/streams.h" #ifdef HAVE_VFORK_H /* The only reason this exists is efficiency */ # ifdef HAVE_SYS_DIR_H # include # include # else # ifdef HAVE_DIRENT_H # include # include # ifndef direct # define direct dirent # endif # endif # endif #ifdef HAVE_UNISTD_H #include #endif #include #include #include static bool tryexec(char *name, char *argv[]); static int hash(register char *str); struct hashent { char *h_name; char *h_path; struct hashent *h_next; }; #define HASHSIZE 256 static struct hashent *hashtab[HASHSIZE]; static char *dirbuffer; static int dirlength, dirpos; /* Create the hash table for the given search path. pathlist is a : seperated * list of directories. If docc is TRUE, then all the commands found are * added to the command completion lists. */ void cp_rehash(char *pathlist, bool docc) { register int i; struct hashent *hh, *ht; char buf[BSIZE_SP], pbuf[BSIZE_SP], *curpath; DIR *pdir; struct direct *entry; /* First clear out the old hash table. */ for (i = 0; i < HASHSIZE; i++) { for (hh = hashtab[i]; hh; hh = ht) { ht = hh->h_next; /* Don't free any of the other stuff -- it is too * strange. */ tfree(hh); } hashtab[i] = NULL; } while (pathlist && *pathlist) { /* Copy one path to buf. We have to make sure that the path * is a full path name. */ if (*pathlist == '/') { i = 0; } else { #ifdef HAVE_GETWD (void) getwd(buf); #else # ifdef HAVE_GETCWD (void) getcwd(buf, sizeof(buf)); # else *buf = 0; # endif #endif i = strlen(buf); } while (*pathlist && (*pathlist != ':')) buf[i++] = *pathlist++; while (*pathlist == ':') pathlist++; buf[i] = '\0'; curpath = copy(buf); if (!(pdir = opendir(curpath))) continue; while (entry = readdir(pdir)) { (void) strcpy(pbuf, curpath); (void) strcat(pbuf, "/"); (void) strcat(pbuf, entry->d_name); /* Now we could make sure that it is really an * executable, but that is too slow * (as if "we" really cared). */ hh = alloc(struct hashent); hh->h_name = copy(entry->d_name); hh->h_path = curpath; i = hash(entry->d_name); /* Make sure this goes at the end, with * possible duplications of names. */ if (hashtab[i]) { ht = hashtab[i]; while (ht->h_next) ht = ht->h_next; ht->h_next = hh; } else { hashtab[i] = hh; } if (docc) { /* Add to completion hash table. */ cp_addcomm(entry->d_name, (long) 0, (long) 0, (long) 0, (long) 0); } } closedir(pdir); } } /* The return value is FALSE if no command was found, and TRUE if it was. */ bool cp_unixcom(wordlist *wl) { int i; register struct hashent *hh; register char *name; char **argv; char buf[BSIZE_SP]; if (!wl) return (FALSE); name = wl->wl_word; argv = wl_mkvec(wl); if (cp_debug) { printf("name: %s, argv: ", name); wl_print(wl, stdout); printf(".\n"); } if (strchr(name, '/')) return (tryexec(name, argv)); i = hash(name); for (hh = hashtab[i]; hh; hh = hh->h_next) if (eq(name, hh->h_name)) { (void) sprintf(buf, "%s/%s", hh->h_path, hh->h_name); if (tryexec(buf, argv)) return (TRUE); } return (FALSE); } static bool tryexec(char *name, char *argv[]) { # ifdef HAVE_SYS_WAIT_H int status; # else union wait status; # endif int pid, j; RETSIGTYPE (*svint)(), (*svquit)(), (*svtstp)(); pid = vfork(); if (pid == 0) { fixdescriptors(); (void) execv(name, argv); (void) _exit(120); /* A random value. */ /* NOTREACHED */ } else { svint = signal(SIGINT, SIG_DFL); svquit = signal(SIGQUIT, SIG_DFL); svtstp = signal(SIGTSTP, SIG_DFL); do { j = wait(&status); } while (j != pid); (void) signal(SIGINT, (SIGNAL_FUNCTION) svint); (void) signal(SIGQUIT, (SIGNAL_FUNCTION) svquit); (void) signal(SIGTSTP, (SIGNAL_FUNCTION) svtstp); } if (WTERMSIG(status) == 0 && WEXITSTATUS(status) == 120) /*if ((status.w_termsig == 0) && (status.w_retcode == 120)) */ return (FALSE); else return (TRUE); } static int hash(register char *str) { register int i = 0; while (*str) i += *str++; return (i % HASHSIZE); } /* Debugging. */ void cp_hstat(void) { struct hashent *hh; int i; for (i = 0; i < HASHSIZE; i++) for (hh = hashtab[i]; hh; hh = hh->h_next) fprintf(cp_err, "i = %d, name = %s, path = %s\n", i, hh->h_name, hh->h_path); } #else void cp_rehash(char *pathlist, bool docc) { NG_IGNORE(docc); NG_IGNORE(pathlist); } bool cp_unixcom(wordlist *wl) { char *s = wl_flatten(wl); if (system(s)) return (FALSE); else return (TRUE); } #endif ngspice-26/src/frontend/parser/input.c0000644000265600020320000000242512264261473017441 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* * Stand-alone input routine. */ #include "ngspice/ngspice.h" #include #include "ngspice/fteinput.h" #include "input.h" #include "ngspice/cpextern.h" #include "../display.h" #ifdef _MSC_VER #include "BaseTsd.h" /* for SSIZE_T */ #define ssize_t SSIZE_T #ifndef HAS_WINGUI #define read _read /* only for console */ #endif #endif /* A special 'getc' so that we can deal with ^D properly. There is no way for * stdio to know if we have typed a ^D after some other characters, so * don't use buffering at all */ int inchar(FILE *fp) { #ifndef HAS_WINGUI char c; ssize_t i; if (cp_interactive && !cp_nocc) { do i = read(fileno(fp), &c, 1); while (i == -1 && errno == EINTR); if (i == 0 || c == '\004') { return (EOF); } else if (i == -1) { perror("read"); return (EOF); } else { return ((int) c); } } else #endif return (getc(fp)); } int input(FILE *fp) { REQUEST request; RESPONSE response; request.option = char_option; request.fp = fp; Input(&request, &response); return (inchar(fp)); } ngspice-26/src/frontend/parser/numparse.h0000644000265600020320000000021512264261473020134 0ustar andreasadmin/************* * Header file for numparse.c * 1999 E. Rouat ************/ #ifndef ngspice_NUMPARSE_H #define ngspice_NUMPARSE_H #endif ngspice-26/src/frontend/miscvars.h0000644000265600020320000000021712264261473016637 0ustar andreasadmin/************* * Header file for miscvars.c * 1999 E. Rouat ************/ #ifndef ngspice_MISCVARS_H #define ngspice_MISCVARS_H #endif ngspice-26/src/frontend/com_display.c0000644000265600020320000000402112264261473017303 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/fteext.h" #include "ngspice/cpextern.h" #include "com_display.h" #include "quote.h" #include "variable.h" #include "plotting/plotting.h" #include "plotting/pvec.h" /* For the sort in display. */ static int dcomp(const void *d1, const void *d2) { struct dvec **v1 = (struct dvec **) d1; struct dvec **v2 = (struct dvec **) d2; return (strcmp((*v1)->v_name, (*v2)->v_name)); } /* Display vector status, etc. Note that this only displays stuff * from the current plot, and you must do a setplot to see the rest of * it. */ void com_display(wordlist *wl) { struct dvec *d; struct dvec **dvs; int len = 0, i = 0; char *s; /* Maybe he wants to know about just a few vectors. */ out_init(); while (wl) { s = cp_unquote(wl->wl_word); d = vec_get(s); tfree(s); /*DG to avoid the cp_unquote memory leak */ if (d == NULL) fprintf(cp_err, "Error: no such vector as %s.\n", wl->wl_word); else while (d) { pvec(d); d = d->v_link2; } if (wl->wl_next == NULL) return; wl = wl->wl_next; } if (plot_cur) for (d = plot_cur->pl_dvecs; d; d = d->v_next) len++; if (len == 0) { fprintf(cp_out, "There are no vectors currently active.\n"); return; } out_printf("Here are the vectors currently active:\n\n"); dvs = TMALLOC(struct dvec *, len); for (d = plot_cur->pl_dvecs, i = 0; d; d = d->v_next, i++) dvs[i] = d; if (!cp_getvar("nosort", CP_BOOL, NULL)) qsort(dvs, (size_t) len, sizeof(struct dvec *), dcomp); out_printf("Title: %s\n", plot_cur->pl_title); out_printf("Name: %s (%s)\nDate: %s\n\n", plot_cur->pl_typename, plot_cur->pl_name, plot_cur->pl_date); for (i = 0; i < len; i++) { d = dvs[i]; pvec(d); } tfree(dvs); } ngspice-26/src/frontend/nutmegif.c0000644000265600020320000000106312264261473016621 0ustar andreasadmin /* * Dummy interface stuff, for nutmeg. This is the easiest way of * making sure that nutmeg doesn't try to load spice in also. */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteinp.h" #include "nutmegif.h" struct variable * nutif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model) { NG_IGNORE(do_model); NG_IGNORE(ind); NG_IGNORE(param); NG_IGNORE(name); NG_IGNORE(ckt); return (NULL); } ngspice-26/src/frontend/terminal.h0000644000265600020320000000031712264261473016624 0ustar andreasadmin#ifndef ngspice_TERMINAL_H #define ngspice_TERMINAL_H void outbufputc(void); void promptreturn(void); void term_clear(void); void term_home(void); void term_cleol(void); void tcap_init(void); #endif ngspice-26/src/frontend/vectors.c0000644000265600020320000007771612264261473016512 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines for dealing with the vector database. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/sim.h" #include "circuits.h" #include "completion.h" #include "variable.h" #include "dimens.h" #include "../misc/misc_time.h" #include "vectors.h" #include "ngspice/dstring.h" #include "plotting/plotting.h" #ifdef XSPICE /* gtri - begin - add function prototype for EVTfindvec */ struct dvec *EVTfindvec(char *node); /* gtri - end - add function prototype for EVTfindvec */ #endif static void vec_rebuild_lookup_table(struct plot *pl) { int cnt; /* count entries */ struct dvec *d; /* dynamic vector */ NGHASHPTR lookup_p; /* lookup table for speed */ SPICE_DSTRING dbuf; /* dynamic buffer */ char *lower_name; /* lower case name */ if (pl->pl_lookup_table) { nghash_empty(pl->pl_lookup_table, NULL, NULL); } else { cnt = 0; for (d = pl->pl_dvecs; d; d = d->v_next) cnt++; pl->pl_lookup_table = nghash_init(cnt); /* allow multiple entries */ nghash_unique(pl->pl_lookup_table, FALSE); } lookup_p = pl->pl_lookup_table; spice_dstring_init(&dbuf); for (d = pl->pl_dvecs; d; d = d->v_next) { spice_dstring_reinit(&dbuf); lower_name = spice_dstring_append_lower(&dbuf, d->v_name, -1); nghash_insert(lookup_p, lower_name, d); } spice_dstring_free(&dbuf); pl->pl_lookup_valid = TRUE; } /* Find a named vector in a plot. We are careful to copy the vector if * v_link2 is set, because otherwise we will get screwed up. */ static struct dvec * findvec(char *word, struct plot *pl) { SPICE_DSTRING dbuf; /* dynamic buffer */ char *lower_name; /* lower case name */ char *node_name; struct dvec *d, *newv = NULL, *end = NULL, *v; if (pl == NULL) return (NULL); if (cieq(word, "all")) { for (d = pl->pl_dvecs; d; d = d->v_next) { if (d->v_flags & VF_PERMANENT) { if (d->v_link2) { v = vec_copy(d); vec_new(v); } else { v = d; } if (end) end->v_link2 = v; else newv = v; end = v; } } return (newv); } if (cieq(word, "allv")) { for (d = pl->pl_dvecs; d; d = d->v_next) { if ((d->v_flags & VF_PERMANENT) && (d->v_type == SV_VOLTAGE)) { if (d->v_link2) { v = vec_copy(d); vec_new(v); } else { v = d; } if (end) end->v_link2 = v; else newv = v; end = v; } } return (newv); } if (cieq(word, "alli")) { for (d = pl->pl_dvecs; d; d = d->v_next) { if ((d->v_flags & VF_PERMANENT) && (d->v_type == SV_CURRENT)) { if (d->v_link2) { v = vec_copy(d); vec_new(v); } else { v = d; } if (end) end->v_link2 = v; else newv = v; end = v; } } return (newv); } if (cieq(word, "ally")) { for (d = pl->pl_dvecs; d; d = d->v_next) { if ((d->v_flags & VF_PERMANENT) && (!cieq(d->v_name, pl->pl_scale->v_name))) { if (d->v_link2) { v = vec_copy(d); vec_new(v); } else { v = d; } if (end) end->v_link2 = v; else newv = v; end = v; } } return (newv); } if (!pl->pl_lookup_valid) vec_rebuild_lookup_table(pl); spice_dstring_init(&dbuf); lower_name = spice_dstring_append_lower(&dbuf, word, -1); for (d = nghash_find(pl->pl_lookup_table, lower_name); d; d = nghash_find_again(pl->pl_lookup_table, lower_name)) { if (d->v_flags & VF_PERMANENT) break; } if (!d) { spice_dstring_reinit(&dbuf); spice_dstring_append(&dbuf, "v(", -1); spice_dstring_append_lower(&dbuf, word, -1); node_name = spice_dstring_append_char(&dbuf, ')'); for (d = nghash_find(pl->pl_lookup_table, node_name); d; d = nghash_find_again(pl->pl_lookup_table, node_name)) { if (d->v_flags & VF_PERMANENT) break; } } spice_dstring_free(&dbuf); #ifdef XSPICE /* gtri - begin - Add processing for getting event-driven vector */ if (!d) d = EVTfindvec(word); /* gtri - end - Add processing for getting event-driven vector */ #endif if (d && d->v_link2) { d = vec_copy(d); vec_new(d); } return (d); } /* If there are imbedded numeric strings, compare them numerically, not * alphabetically. */ static int namecmp(const void *a, const void *b) { int i, j; const char *s = (const char *) a; const char *t = (const char *) b; for (;;) { while ((*s == *t) && !isdigit(*s) && *s) s++, t++; if (!*s) return (0); if ((*s != *t) && (!isdigit(*s) || !isdigit(*t))) return (*s - *t); /* The beginning of a number... Grab the two numbers and then * compare them... */ for (i = 0; isdigit(*s); s++) i = i * 10 + *s - '0'; for (j = 0; isdigit(*t); t++) j = j * 10 + *t - '0'; if (i != j) return (i - j); } } static int veccmp(const void *a, const void *b) { int i; struct dvec **d1 = (struct dvec **) a; struct dvec **d2 = (struct dvec **) b; if ((i = namecmp((*d1)->v_plot->pl_typename, (*d2)->v_plot->pl_typename)) != 0) return (i); return (namecmp((*d1)->v_name, (*d2)->v_name)); } /* Sort all the vectors in d, first by plot name and then by vector * name. Do the right thing with numbers. */ static struct dvec * sortvecs(struct dvec *d) { struct dvec **array, *t; int i, j; for (t = d, i = 0; t; t = t->v_link2) i++; if (i < 2) return (d); array = TMALLOC(struct dvec *, i); for (t = d, i = 0; t; t = t->v_link2) array[i++] = t; qsort(array, (size_t) i, sizeof(struct dvec *), veccmp); /* Now string everything back together... */ for (j = 0; j < i - 1; j++) array[j]->v_link2 = array[j + 1]; array[j]->v_link2 = NULL; d = array[0]; tfree(array); return (d); } /* Load in a rawfile. */ void ft_loadfile(char *file) { struct plot *pl, *np, *pp; fprintf(cp_out, "Loading raw data file (\"%s\") . . . ", file); pl = raw_read(file); if (pl) fprintf(cp_out, "done.\n"); else fprintf(cp_out, "no data read.\n"); /* This is a minor annoyance -- we should reverse the plot list so * they get numbered in the correct order. */ for (pp = pl, pl = NULL; pp; pp = np) { np = pp->pl_next; pp->pl_next = pl; pl = pp; } for (; pl; pl = np) { np = pl->pl_next; plot_add(pl); /* Don't want to get too many "plot not written" messages. */ pl->pl_written = TRUE; } plot_num++; plotl_changed = TRUE; } void plot_add(struct plot *pl) { struct dvec *v; struct plot *tp; char *s, buf[BSIZE_SP]; fprintf(cp_out, "Title: %s\nName: %s\nDate: %s\n\n", pl->pl_title, pl->pl_name, pl->pl_date); if (plot_cur) plot_cur->pl_ccom = cp_kwswitch(CT_VECTOR, pl->pl_ccom); for (v = pl->pl_dvecs; v; v = v->v_next) cp_addkword(CT_VECTOR, v->v_name); cp_addkword(CT_VECTOR, "all"); if ((s = ft_plotabbrev(pl->pl_name)) == NULL) s = "unknown"; do { (void) sprintf(buf, "%s%d", s, plot_num); for (tp = plot_list; tp; tp = tp->pl_next) if (cieq(tp->pl_typename, buf)) { plot_num++; break; } } while (tp); pl->pl_typename = copy(buf); plot_new(pl); cp_addkword(CT_PLOT, buf); pl->pl_ccom = cp_kwswitch(CT_VECTOR, NULL); plot_setcur(pl->pl_typename); } /* Remove a vector from the database, if it is there. */ void vec_remove(char *name) { struct dvec *ov; for (ov = plot_cur->pl_dvecs; ov; ov = ov->v_next) if (cieq(name, ov->v_name) && (ov->v_flags & VF_PERMANENT)) break; if (!ov) return; ov->v_flags &= ~VF_PERMANENT; /* Remove from the keyword list. */ cp_remkword(CT_VECTOR, name); } /* Get a vector by name. This deals with v(1), etc. almost properly. Also, * it checks for pre-defined vectors. */ struct dvec * vec_fromplot(char *word, struct plot *plot) { struct dvec *d; char buf[BSIZE_SP], buf2[BSIZE_SP], cc, *s; d = findvec(word, plot); if (!d) { (void) strcpy(buf, word); strtolower(buf); d = findvec(buf, plot); } if (!d) { (void) strcpy(buf, word); strtoupper(buf); d = findvec(buf, plot); } /* scanf("%c(%s)" doesn't do what it should do. ) */ if (!d && (sscanf(word, "%c(%s", /* ) */ &cc, buf) == 2) && /* ( */ ((s = strrchr(buf, ')')) != NULL) && (s[1] == '\0')) { *s = '\0'; if (prefix("i(", /* ) */ word) || prefix("I(", /* ) */ word)) { /* Spice dependency... */ (void) sprintf(buf2, "%s#branch", buf); (void) strcpy(buf, buf2); } d = findvec(buf, plot); } return (d); } /* This is the main lookup routine for names. The possible types of names are: * name An ordinary vector. * plot.name A vector from a particular plot. * @device[parm] A device parameter. * @model[parm] A model parameter. * @param A circuit parameter. * For the @ cases, we construct a dvec with length 1 to hold the value. * In the other two cases, either the plot or the name can be "all", a * wildcard. * The vector name may have imbedded dots -- if the first component is a plot * name, it is considered the plot, otherwise the current plot is used. */ #define SPECCHAR '@' struct dvec * vec_get(const char *vec_name) { struct dvec *d, *end = NULL, *newv = NULL; struct plot *pl; char buf[BSIZE_SP], *s, *wd, *word, *whole, *name = NULL, *param; int i = 0; struct variable *vv; wd = word = copy(vec_name); /* Gets mangled below... */ if (strchr(word, '.')) { /* Snag the plot... */ for (i = 0, s = word; *s != '.'; i++, s++) buf[i] = *s; buf[i] = '\0'; if (cieq(buf, "all")) { word = ++s; pl = NULL; /* NULL pl signifies a wildcard. */ } else { for (pl = plot_list; pl && !plot_prefix(buf, pl->pl_typename); pl = pl->pl_next) ; if (pl) { word = ++s; } else { /* This used to be an error... */ pl = plot_cur; } } } else { pl = plot_cur; } if (pl) { d = vec_fromplot(word, pl); if (!d) d = vec_fromplot(word, &constantplot); } else { for (pl = plot_list; pl; pl = pl->pl_next) { if (cieq(pl->pl_typename, "const")) continue; d = vec_fromplot(word, pl); if (d) { if (end) end->v_link2 = d; else newv = d; for (end = d; end->v_link2; end = end->v_link2) ; } } d = newv; if (!d) { fprintf(cp_err, "Error: plot wildcard (name %s) matches nothing\n", word); tfree(wd); /* MW. I don't want core leaks here */ return (NULL); } } if (!d && (*word == SPECCHAR)) { /* This is a special quantity... */ if (ft_nutmeg) { fprintf(cp_err, "Error: circuit parameters only available with spice\n"); tfree(wd); /* MW. Memory leak fixed again */ return (NULL); /* va: use NULL */ } whole = copy(word); name = ++word; for (param = name; *param && (*param != '['); param++) ; if (*param) { *param++ = '\0'; for (s = param; *s && *s != ']'; s++) ; *s = '\0'; } else { param = NULL; } if (ft_curckt) { /* * This is what is done in case of "alter r1 resistance = 1234" * r1 resistance, 0 * if_setparam(ft_curckt->ci_ckt, &dev, param, dv, do_model); */ /* vv = if_getparam (ft_curckt->ci_ckt, &name, param, 0, 0); */ vv = if_getparam(ft_curckt->ci_ckt, &name, param, 0, 0); if (!vv) { tfree(whole); tfree(wd); return (NULL); } } else { fprintf(cp_err, "Error: No circuit loaded.\n"); tfree(whole); tfree(wd); return (NULL); } d = alloc(struct dvec); ZERO(d, struct dvec); d->v_name = copy(whole); /* MW. The same as word before */ d->v_type = SV_NOTYPE; d->v_flags |= VF_REAL; /* No complex values yet... */ d->v_realdata = TMALLOC(double, 1); d->v_length = 1; /* In case the represented variable is a REAL vector this takes * the actual value of the first element of the linked list which * does not make sense. * This is an error. */ /* This will copy the contents of the structure vv in another structure * dvec (FTEDATA.H) that do not have INTEGER so that those parameters * defined as IF_INTEGER are not given their value when using * print @pot[pos_node] * To fix this, it is necessary to define: * OPU( "pos_node", POT_QUEST_POS_NODE, IF_REAL,"Positive node of potenciometer"), * int POTnegNode; // number of negative node of potenciometer (Nodo_3) * case POT_QUEST_POS_NODE: * value->rValue = (double)fast->POTposNode; * return (OK); * Works but with the format 1.00000E0 */ /* We must make a change in format between the data that carries a variable to * put in a dvec. */ /* * #define va_bool va_V.vV_bool * #define va_num va_V.vV_num * #define va_real va_V.vV_real * #define va_string va_V.vV_string * #define va_vlist va_V.vV_list * enum cp_types { * CP_BOOL, * CP_NUM, * CP_REAL, * CP_STRING, * CP_LIST ° }; */ /* The variable is a vector */ if (vv->va_type == CP_LIST) { /* Compute the length of the vector, * used with the parameters of isrc and vsrc */ struct variable *nv; double *list; list = TMALLOC(double, 1); nv = alloc(struct variable); nv = vv->va_vlist; for (i = 1; ; i++) { list = TREALLOC(double, list, i); list[i-1] = nv->va_real; nv = nv->va_next; if (!nv) break; } d->v_realdata = list; d->v_length = i; /* To be able to identify the vector to represent * belongs to a special "conunto" and should be printed in a * special way. */ d->v_dims[1] = 1; } else if (vv->va_type == CP_NUM) { /* Variable is an integer */ *d->v_realdata = (double) vv->va_num; } else if (vv->va_type == CP_REAL) { /* Variable is a real */ if (!(vv->va_next)) { /* Only a real data * usually normal */ *d->v_realdata = vv->va_real; } else { /* Real data set * When you print a model @ [all] * Just print numerical values, not the string */ struct variable *nv; /* We go to print the list of values * nv->va_name = Parameter description * nv->va_string = Parameter * nv->va_real= Value */ nv = vv; for (i = 1; ; i++) { switch (nv->va_type) { case CP_REAL: fprintf(stdout, "%s=%g\n", nv->va_name, nv->va_real); break; case CP_STRING: fprintf(stdout, "%s=%s\n", nv->va_name, nv->va_string); break; case CP_NUM: fprintf(stdout, "%s=%d\n", nv->va_name, nv->va_num); break; default: { fprintf(stderr, "ERROR: enumeration value `CP_BOOL' or `CP_LIST' not handled in vec_get\nAborting...\n"); controlled_exit(EXIT_FAILURE); } } nv = nv->va_next; if (!nv) break; } /* To distinguish those does not take anything for print screen to * make a print or M1 @ @ M1 [all] leaving only the correct data * and not the last */ d->v_rlength = 1; } } tfree(vv->va_name); tfree(vv); /* va: tfree vv->va_name and vv (avoid memory leakages) */ tfree(wd); vec_new(d); tfree(whole); return (d); } tfree(wd); return (sortvecs(d)); } /* Execute the commands for a plot. This is done whenever a plot becomes * the current plot. */ void plot_docoms(wordlist *wl) { bool inter; inter = cp_interactive; cp_interactive = FALSE; while (wl) { (void) cp_evloop(wl->wl_word); wl = wl->wl_next; } cp_resetcontrol(); cp_interactive = inter; } /* Create a copy of a vector. */ struct dvec * vec_copy(struct dvec *v) { struct dvec *nv; int i; if (!v) return (NULL); nv = alloc(struct dvec); nv->v_name = copy(v->v_name); nv->v_type = v->v_type; nv->v_flags = v->v_flags & ~VF_PERMANENT; if (isreal(v)) { nv->v_realdata = TMALLOC(double, v->v_length); bcopy(v->v_realdata, nv->v_realdata, sizeof(double) * (size_t) v->v_length); nv->v_compdata = NULL; } else { nv->v_realdata = NULL; nv->v_compdata = TMALLOC(ngcomplex_t, v->v_length); bcopy(v->v_compdata, nv->v_compdata, sizeof(ngcomplex_t) * (size_t) v->v_length); } nv->v_minsignal = v->v_minsignal; nv->v_maxsignal = v->v_maxsignal; nv->v_gridtype = v->v_gridtype; nv->v_plottype = v->v_plottype; nv->v_length = v->v_length; /* Modified to copy the rlength of origin to destination vecor * instead of always putting it to 0. * As when it comes to make a print does not leave M1 @ @ M1 = 0.0, * to do so in the event that rlength = 0 not print anything on screen * nv-> v_rlength = 0; * Default -> v_rlength = 0 and only if you come from a print or M1 @ * @ M1 [all] rlength = 1, after control is one of * if (v-> v_rlength == 0) com_print (wordlist * wl) */ nv->v_rlength = v->v_rlength; nv->v_outindex = 0; /*XXX???*/ nv->v_linestyle = 0; /*XXX???*/ nv->v_color = 0; /*XXX???*/ nv->v_defcolor = v->v_defcolor; nv->v_numdims = v->v_numdims; for (i = 0; i < v->v_numdims; i++) nv->v_dims[i] = v->v_dims[i]; nv->v_plot = v->v_plot; nv->v_next = NULL; nv->v_link2 = NULL; nv->v_scale = v->v_scale; return (nv); } /* Create a new plot structure. This just fills in the typename and sets up * the ccom struct. */ struct plot * plot_alloc(char *name) { struct plot *pl = alloc(struct plot), *tp; char *s; struct ccom *ccom; char buf[BSIZE_SP]; ZERO(pl, struct plot); if ((s = ft_plotabbrev(name)) == NULL) s = "unknown"; do { (void) sprintf(buf, "%s%d", s, plot_num); for (tp = plot_list; tp; tp = tp->pl_next) if (cieq(tp->pl_typename, buf)) { plot_num++; break; } } while (tp); pl->pl_typename = copy(buf); cp_addkword(CT_PLOT, buf); /* va: create a new, empty keyword tree for class CT_VECTOR, s=old tree */ ccom = cp_kwswitch(CT_VECTOR, NULL); cp_addkword(CT_VECTOR, "all"); pl->pl_ccom = cp_kwswitch(CT_VECTOR, ccom); /* va: keyword tree is old tree again, new tree is linked to pl->pl_ccom */ return (pl); } /* Stick a new vector in the proper place in the plot list. */ void vec_new(struct dvec *d) { #ifdef FTEDEBUG if (ft_vecdb) fprintf(cp_err, "new vector %s\n", d->v_name); #endif /* Note that this can't happen. */ if (plot_cur == NULL) { fprintf(cp_err, "vec_new: Internal Error: no cur plot\n"); } plot_cur->pl_lookup_valid = FALSE; if ((d->v_flags & VF_PERMANENT) && (plot_cur->pl_scale == NULL)) plot_cur->pl_scale = d; if (!d->v_plot) d->v_plot = plot_cur; if (d->v_numdims < 1) { d->v_numdims = 1; d->v_dims[0] = d->v_length; } d->v_next = d->v_plot->pl_dvecs; d->v_plot->pl_dvecs = d; } /* Because of the way that all vectors, including temporary vectors, * are linked together under the current plot, they can often be * left lying around. This gets rid of all vectors that don't have * the permanent flag set. Also, for the remaining vectors, it * clears the v_link2 pointer. */ void vec_gc(void) { struct dvec *d, *nd; struct plot *pl; for (pl = plot_list; pl; pl = pl->pl_next) for (d = pl->pl_dvecs; d; d = nd) { nd = d->v_next; if (!(d->v_flags & VF_PERMANENT)) { if (ft_vecdb) fprintf(cp_err, "vec_gc: throwing away %s.%s\n", pl->pl_typename, d->v_name); vec_free(d); } } for (pl = plot_list; pl; pl = pl->pl_next) for (d = pl->pl_dvecs; d; d = d->v_next) d->v_link2 = NULL; } /* Free a dvector. This is sort of a pain because we also have to make sure * that it has been unlinked from its plot structure. If the name of the * vector is NULL, then we have already freed it so don't try again. (This * situation can happen with user-defined functions.) Note that this depends * on our having tfree set its argument to NULL. Note that if all the vectors * in a plot are gone it stays around... */ void vec_free_x(struct dvec *v) { struct plot *pl; if ((v == NULL) || (v->v_name == NULL)) return; pl = v->v_plot; /* Now we have to take this dvec out of the plot list. */ if (pl != NULL) { pl->pl_lookup_valid = FALSE; if (pl->pl_dvecs == v) { pl->pl_dvecs = v->v_next; } else { struct dvec *lv = pl->pl_dvecs; if (lv) for (; lv->v_next; lv = lv->v_next) if (lv->v_next == v) break; if (lv && lv->v_next) lv->v_next = v->v_next; else fprintf(cp_err, "vec_free: Internal Error: %s not in plot\n", v->v_name); } if (pl->pl_scale == v) { if (pl->pl_dvecs) pl->pl_scale = pl->pl_dvecs; /* Random one... */ else pl->pl_scale = NULL; } } if (v->v_name) tfree(v->v_name); if (v->v_realdata) tfree(v->v_realdata); if (v->v_compdata) tfree(v->v_compdata); tfree(v); } /* This is something we do in a few places... Since vectors get copied a lot, * we can't just compare pointers to tell if two vectors are 'really' the same. */ bool vec_eq(struct dvec *v1, struct dvec *v2) { char *s1, *s2; bool rtn; if (v1->v_plot != v2->v_plot) return (FALSE); s1 = vec_basename(v1); s2 = vec_basename(v2); if (cieq(s1, s2)) rtn = TRUE; else rtn = FALSE; tfree(s1); tfree(s2); return rtn; } /* Return the name of the vector with the plot prefix stripped off. This * is no longer trivial since '.' doesn't always mean 'plot prefix'. */ char * vec_basename(struct dvec *v) { char buf[BSIZE_SP], *t, *s; if (strchr(v->v_name, '.')) { if (cieq(v->v_plot->pl_typename, v->v_name)) (void) strcpy(buf, v->v_name + strlen(v->v_name) + 1); else (void) strcpy(buf, v->v_name); } else { (void) strcpy(buf, v->v_name); } strtolower(buf); for (t = buf; isspace(*t); t++) ; s = t; for (t = s; *t; t++) ; while ((t > s) && isspace(t[-1])) *--t = '\0'; return (copy(s)); } /* Make a plot the current one. This gets called by cp_usrset() when one * does a 'set curplot = name'. * va: ATTENTION: has unlinked old keyword-class-tree from keywords[CT_VECTOR] * (potentially memory leak) */ void plot_setcur(char *name) { struct plot *pl; if (cieq(name, "new")) { pl = plot_alloc("unknown"); pl->pl_title = copy("Anonymous"); pl->pl_name = copy("unknown"); pl->pl_date = copy(datestring()); plot_new(pl); plot_cur = pl; return; } for (pl = plot_list; pl; pl = pl->pl_next) if (plot_prefix(name, pl->pl_typename)) break; if (!pl) { fprintf(cp_err, "Error: no such plot named %s\n", name); return; } /* va: we skip cp_kwswitch, because it confuses the keyword-tree management for * repeated op-commands. When however cp_kwswitch is necessary for other * reasons, we should hold the original keyword table pointer in an * permanent variable, since it will lost here, and can never tfree'd. if (plot_cur) { plot_cur->pl_ccom = cp_kwswitch(CT_VECTOR, pl->pl_ccom); } */ plot_cur = pl; } /* Add a plot to the plot list. This is different from plot_add() in that * all this does is update the list and the variable $plots. */ void plot_new(struct plot *pl) { pl->pl_next = plot_list; plot_list = pl; } /* This routine takes a multi-dimensional vector, treats it as a * group of 2-dimensional matrices and transposes each matrix. * The data array is replaced with a new one that has the elements * in the proper order. Otherwise the transposition is done in place. */ void vec_transpose(struct dvec *v) { int dim0, dim1, nummatrices; int i, j, k, joffset, koffset, blocksize; double *newreal, *oldreal; ngcomplex_t *newcomp, *oldcomp; if (v->v_numdims < 2 || v->v_length <= 1) return; dim0 = v->v_dims[v->v_numdims-1]; dim1 = v->v_dims[v->v_numdims-2]; v->v_dims[v->v_numdims-1] = dim1; v->v_dims[v->v_numdims-2] = dim0; /* Assume length is a multiple of each dimension size. * This may not be safe, in which case a test should be * made that the length is the product of all the dimensions. */ blocksize = dim0*dim1; nummatrices = v->v_length / blocksize; /* Note: * olda[i,j] is at data[i*dim0+j] * newa[j,i] is at data[j*dim1+i] * where j is in [0, dim0-1] and i is in [0, dim1-1] * Since contiguous data in the old array is scattered in the new array * we can't use bcopy :(. There is probably a BLAS2 function for this * though. The formulation below gathers scattered old data into * consecutive new data. */ if (isreal(v)) { newreal = TMALLOC(double, v->v_length); oldreal = v->v_realdata; koffset = 0; for (k = 0; k < nummatrices; k++) { joffset = 0; for (j = 0; j < dim0; j++) { for (i = 0; i < dim1; i++) { newreal[ koffset + joffset + i ] = oldreal[ koffset + i*dim0 + j ]; } joffset += dim1; /* joffset = j*dim0 */ } koffset += blocksize; /* koffset = k*blocksize = k*dim0*dim1 */ } tfree(oldreal); v->v_realdata = newreal; } else { newcomp = TMALLOC(ngcomplex_t, v->v_length); oldcomp = v->v_compdata; koffset = 0; for (k = 0; k < nummatrices; k++) { joffset = 0; for (j = 0; j < dim0; j++) { for (i = 0; i < dim1; i++) { realpart(newcomp[ koffset + joffset + i ]) = realpart(oldcomp[ koffset + i*dim0 + j ]); imagpart(newcomp[ koffset + joffset + i ]) = imagpart(oldcomp[ koffset + i*dim0 + j ]); } joffset += dim1; /* joffset = j*dim0 */ } koffset += blocksize; /* koffset = k*blocksize = k*dim0*dim1 */ } tfree(oldcomp); v->v_compdata = newcomp; } } /* This routine takes a multi-dimensional vector and turns it into a family * of 1-d vectors, linked together with v_link2. It is here so that plot * can do intelligent things. */ struct dvec * vec_mkfamily(struct dvec *v) { int size, numvecs, i, j, count[MAXDIMS]; struct dvec *vecs, *d; char buf[BSIZE_SP], buf2[BSIZE_SP]; if (v->v_numdims < 2) return (v); size = v->v_dims[v->v_numdims - 1]; for (i = 0, numvecs = 1; i < v->v_numdims - 1; i++) numvecs *= v->v_dims[i]; for (i = 0, vecs = d = NULL; i < numvecs; i++) { if (vecs) { d = d->v_link2 = alloc(struct dvec); ZERO(d, struct dvec); } else { d = vecs = alloc(struct dvec); ZERO(d, struct dvec); } } for (i = 0; i < MAXDIMS; i++) count[i] = 0; for (d = vecs, j = 0; d; j++, d = d->v_link2) { indexstring(count, v->v_numdims - 1, buf2); (void) sprintf(buf, "%s%s", v->v_name, buf2); d->v_name = copy(buf); d->v_type = v->v_type; d->v_flags = v->v_flags; d->v_minsignal = v->v_minsignal; d->v_maxsignal = v->v_maxsignal; d->v_gridtype = v->v_gridtype; d->v_plottype = v->v_plottype; d->v_scale = v->v_scale; /* Don't copy the default color, since there will be many * of these things... */ d->v_numdims = 1; d->v_length = size; if (isreal(v)) { d->v_realdata = TMALLOC(double, size); bcopy(v->v_realdata + size*j, d->v_realdata, (size_t) size * sizeof(double)); } else { d->v_compdata = TMALLOC(ngcomplex_t, size); bcopy(v->v_compdata + size*j, d->v_compdata, (size_t) size * sizeof(ngcomplex_t)); } /* Add one to the counter. */ (void) incindex(count, v->v_numdims - 1, v->v_dims, v->v_numdims); } for (d = vecs; d; d = d->v_link2) vec_new(d); return (vecs); } /* This function will match "op" with "op1", but not "op1" with "op12". */ bool plot_prefix(char *pre, char *str) { if (!*pre) return (TRUE); while (*pre && *str) { if (*pre != *str) break; pre++; str++; } if (*pre || (*str && isdigit(pre[-1]))) return (FALSE); else return (TRUE); } ngspice-26/src/frontend/com_echo.c0000644000265600020320000000141012264261473016553 0ustar andreasadmin/************* * com_echo.c ************/ #include "ngspice/ngspice.h" #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include "com_echo.h" #include "quote.h" #include "ngspice/cpextern.h" void com_echo(wordlist *wlist) { char*copyword; bool nl = TRUE; if (wlist && eq(wlist->wl_word, "-n")) { wlist = wlist->wl_next; nl = FALSE; } while (wlist) { /* fputs(cp_unquote(wlist->wl_word), cp_out); very bad the string allocated by cp_unquote could not be freed: memory leak*/ copyword = cp_unquote(wlist->wl_word); fputs(copyword, cp_out); tfree(copyword); if (wlist->wl_next) fputs(" ", cp_out); wlist = wlist->wl_next; } if (nl) fputs("\n", cp_out); } ngspice-26/src/frontend/aspice.c0000644000265600020320000002526012264261473016254 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Stuff for asynchronous spice runs, and also rspice. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "aspice.h" #include "variable.h" #include "circuits.h" # ifdef HAVE_SYS_WAIT_H /* should be more tests here I think */ # define OK_ASPICE # endif #ifdef OK_ASPICE #ifdef HAVE_PWD_H # include #endif #include #include #include #include #include "ngspice/fteinp.h" #include "ngspice/dvec.h" #include "../misc/mktemp.h" /* This is required for the GCC pre-processor and might be needed for others Added to resolve ngspice bug 1293746 http://sourceforge.net/tracker/index.php?func=detail&aid=1293746&group_id=38962&atid=423915 */ #if !defined(SOLARIS) && defined(__SVR4) && defined(__sun) # define SOLARIS #endif #ifndef SEEK_SET # define SEEK_SET 0 #endif static RETSIGTYPE sigchild(void); struct proc { int pr_pid; /* The pid of the spice job. */ char *pr_rawfile; /* The temporary raw file. */ char *pr_name; /* The name of the spice run. */ char *pr_inpfile; /* The name of the input file. */ char *pr_outfile; /* The name of the (tmp) output file. */ bool pr_saveout; /* Don't (void) unlink the output file */ struct proc *pr_next; /* Link. */ }; static struct proc *running = NULL; static int numchanged = 0; /* How many children have changed in state. */ void com_aspice(wordlist *wl) { char *deck, *output = NULL, spicepath[BSIZE_SP], s[BSIZE_SP]; char *raw, *t; FILE *inp; struct proc *p; int pid; bool saveout = FALSE; deck = wl->wl_word; if (!cp_getvar("spicepath", CP_STRING, spicepath)) { if (!Spice_Path || !*Spice_Path) { fprintf(cp_err, "No spice-3 binary is available for the aspice command.\n"); return; } (void) strcpy(spicepath, Spice_Path); } if (wl->wl_next) { output = wl->wl_next->wl_word; saveout = TRUE; } else { output = smktemp("spout"); } if ((inp = fopen(deck, "r")) == NULL) { perror(deck); return; } if (!fgets(s, BSIZE_SP, inp)) { fprintf(cp_err, "Error: bad deck %s\n", deck); (void) fclose(inp); return; } for (t = s; *t && (*t != '\n'); t++) ; *t = '\0'; fprintf(cp_out, "Starting spice run for:\n%s\n", s); (void) fclose(inp); raw = smktemp("raw"); (void) fclose(fopen(raw, "w")); /* So there isn't a race condition. */ pid = fork(); if (pid == 0) { if (!(freopen(deck, "r", stdin))) { perror(deck); exit(EXIT_BAD); } if (!(freopen(output, "w", stdout))) { perror(output); exit(EXIT_BAD); } (void) dup2(fileno(stdout), fileno(stderr)); (void) execl(spicepath, spicepath, "-r", raw, (void*)0); /* Screwed up. */ perror(spicepath); exit(EXIT_BAD); } /* Add this one to the job list. */ p = alloc(struct proc); p->pr_pid = pid; p->pr_name = copy(s); p->pr_rawfile = copy(raw); p->pr_inpfile = copy(deck); p->pr_outfile = copy(output); p->pr_saveout = saveout; if (running) p->pr_next = running; running = p; # ifdef SIGCHLD (void) signal(SIGCHLD, (SIGNAL_FUNCTION) sigchild); # else # ifdef SIGCLD (void) signal(SIGCLD, (SIGNAL_FUNCTION) sigchild); # endif # endif } void com_jobs(wordlist *wl) { struct proc *p; NG_IGNORE(wl); for (p = running; p; p = p->pr_next) fprintf(cp_out, "%d\t%.70s\n", p->pr_pid, p->pr_name); } static RETSIGTYPE sigchild(void) { numchanged++; if (ft_asyncdb) fprintf(cp_err, "%d jobs done now\n", numchanged); if (cp_cwait) ft_checkkids(); } /* This gets called every once in a while, and checks to see if any * jobs have finished. If they have it gets the data. The problem is * that wait(0) is probably more portable, but it can't tell * whether the exit was normal or not. */ /* * On posix systems, wait() is: * pid_t wait(int *status); */ int status; void ft_checkkids(void) { struct proc *p = NULL, *lp = NULL; char buf[BSIZE_SP]; FILE *fp; pid_t pid = 0; static bool here = FALSE; /* Don't want to be re-entrant. */ if (!numchanged || here) return; here = TRUE; while (numchanged > 0) { pid = wait(&status); if (pid == -1) { fprintf(cp_err, "ft_checkkids: Internal Error: should be %d jobs done but there aren't any.\n", numchanged); numchanged = 0; running = NULL; here = FALSE; return; } for (p = running; p; p = p->pr_next) { if (p->pr_pid == pid) break; lp = p; } if (p == NULL) { fprintf(cp_err, "ft_checkkids: Internal Error: Process %d not a job!\n", (int) pid); here = FALSE; return; } if (p == running) running = p->pr_next; else lp->pr_next = p->pr_next; fprintf(cp_out, "Job finished: %.60s\n", p->pr_name); numchanged--; ft_loadfile(p->pr_rawfile); (void) unlink(p->pr_rawfile); out_init(); if (!(fp = fopen(p->pr_outfile, "r"))) { perror(p->pr_outfile); here = FALSE; return; } while (fgets(buf, BSIZE_SP, fp)) out_send(buf); (void) fclose(fp); if (!p->pr_saveout) (void) unlink(p->pr_outfile); printf("\n-----\n"); } printf("\n"); #ifdef TIOCSTI (void) ioctl(0, TIOCSTI, "\022"); /* Reprint the line. */ #endif here = FALSE; } /* Run a spice job remotely. See the description of the spice daemon for * the protocol. This is no longer 4.2 specific. */ void com_rspice(wordlist *wl) { char rhost[64], program[128], buf[BSIZE_SP]; char remote_shell[513]; char *outfile; FILE *inp, *serv, *out, *srv_input, *err_outp; struct plot *pl; size_t n; int to_serv[2], from_serv[2], err_serv[2]; int pid; long pos; int num; char *p; /* Figure out where the spicedaemon is and connect to it. */ if (!cp_getvar("rhost", CP_STRING, rhost)) (void) strcpy(rhost, Spice_Host); if (!cp_getvar("rprogram", CP_STRING, program)) *program = '\0'; if (!cp_getvar("remote_shell", CP_STRING, remote_shell)) strcpy(remote_shell, "rsh"); if (*rhost == '\0') { fprintf(cp_err, "Error: there is no remote ngspice.host for this site -- set \"rhost\".\n"); return; } if (*program == '\0') { fprintf(cp_err, "Error: there is no remote spice program for this site -- set \"rprogram\".\n"); return; } if (pipe(to_serv) < 0) { perror("pipe to server"); return; } if (pipe(from_serv) < 0) { perror("pipe from server"); return; } if (pipe(err_serv) < 0) { perror("2nd pipe from server"); return; } pid = fork(); if (pid == 0) { /* I am the "server" process */ close(to_serv[1]); close(from_serv[0]); close(err_serv[0]); fclose(stdin); fclose(stdout); fclose(stderr); dup2(to_serv[0], 0); /* stdin */ dup2(from_serv[1], 1); /* stdout */ dup2(err_serv[1], 2); /* stderr */ execlp(remote_shell, remote_shell, rhost, program, "-s", (void*)0); /* system(com_buf); */ perror(remote_shell); exit(-1); } else if (pid == -1) { perror("fork"); return; } /* I am the "client" side */ close(to_serv[0]); close(from_serv[1]); close(err_serv[1]); srv_input = fdopen(to_serv[1], "w"); serv = fdopen(from_serv[0], "r"); err_outp = fdopen(err_serv[0], "r"); /* Send the circuit over. */ if (wl) { while (wl) { if (!(inp = fopen(wl->wl_word, "r"))) { perror(wl->wl_word); wl = wl->wl_next; continue; /* Should be careful */ } while ((n = fread(buf, 1, BSIZE_SP, inp)) > 0) (void) fwrite(buf, 1, strlen(buf), srv_input); /* (void) write(s, buf, n); */ wl = wl->wl_next; fclose(inp); } /* (void) write(s, "@\n", 3);*/ } else { if (ft_nutmeg || !ft_curckt) { fprintf(cp_err, "Error: no circuits loaded\n"); fclose(srv_input); fclose(serv); return; } inp_list(srv_input, ft_curckt->ci_deck, ft_curckt->ci_options, LS_DECK); } fclose(srv_input); /* Now wait for things to come through */ while ((p = fgets(buf, BSIZE_SP, serv)) != NULL) { if (!strncmp(buf, "Title:", 6)) break; fputs(buf, cp_out); } outfile = smktemp("rsp"); if ((out = fopen(outfile, "w+")) == NULL) { perror(outfile); (void) fclose(serv); return; } if (p) fputs(buf, out); while ((n = fread(buf, 1, BSIZE_SP, serv)) != 0) (void) fwrite(buf, 1, n, out); /* We hope that positioning info + error messages < pipe size */ while (fgets(buf, BSIZE_SP, err_outp)) if (!strncmp("@@@", buf, 3)) { if (sscanf(buf, "@@@ %ld %d", &pos, &num) != 2) { fprintf(stderr, "Error reading rawdata: %s\n", buf); continue; } if (fseek(out, pos, SEEK_SET)) fprintf(stderr, "Error adjusting rawfile: write \"%d\" at %ld\n", num, pos); else fprintf(out, "%d", num); } else { fprintf(stderr, "%s", buf); } (void) fclose(out); (void) fclose(serv); (void) fclose(err_outp); pl = raw_read(outfile); if (pl) plot_add(pl); (void) unlink(outfile); fprintf(stderr, "done.\n"); } #else void com_aspice(wordlist *wl) { NG_IGNORE(wl); fprintf(cp_err, "Asynchronous spice jobs are not available.\n"); } void com_jobs(wordlist *wl) { NG_IGNORE(wl); fprintf(cp_err, "Asynchronous spice jobs are not available.\n"); } void ft_checkkids(void) { } void com_rspice(wordlist *wl) { NG_IGNORE(wl); fprintf(cp_err, "Remote spice jobs are not available.\n"); } #endif ngspice-26/src/frontend/inp.c0000644000265600020320000015122412264261473015576 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher **********/ /* * Stuff for dealing with spice input decks and command scripts, and * the listing routines. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/cpdefs.h" #include "ngspice/inpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "ngspice/fteinp.h" #include "inp.h" #include "runcoms.h" #include "inpcom.h" #include "circuits.h" #include "completion.h" #include "variable.h" #include "breakp2.h" #include "dotcards.h" #include "../misc/util.h" /* ngdirname() */ #include "../misc/mktemp.h" #include "../misc/misc_time.h" #include "subckt.h" #include "spiceif.h" #include "com_let.h" #include "com_commands.h" #ifdef XSPICE #include "ngspice/ipctiein.h" #include "ngspice/enh.h" #endif #include "numparam/numpaif.h" #define line_free(line, flag) \ do { \ line_free_x(line, flag); \ line = NULL; \ } while(0) static char *upper(register char *string); static bool doedit(char *filename); static struct line *com_options = NULL; static void cktislinear(CKTcircuit *ckt, struct line *deck); static void dotifeval(struct line *deck); static int inp_parse_temper(struct line *deck); static void inp_parse_temper_trees(void); void line_free_x(struct line *deck, bool recurse); void create_circbyline(char *line); void inp_evaluate_temper(void); extern bool ft_batchmode; /* structure used to save expression parse trees for .model and * device instance lines */ struct pt_temper { char *expression; wordlist *wl; wordlist *wlend; INPparseTree *pt; struct pt_temper *next; }; /* * create an unique artificial *unusable* FILE ptr * meant to be used with Xprintf() only to eventually * redirect output to the `out_vprintf()' family */ static FILE *cp_more; static FILE *cp_more = (FILE*) &cp_more; static void Xprintf(FILE *fdst, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (fdst == cp_more) out_vprintf(fmt, ap); else vfprintf(fdst, fmt, ap); va_end(ap); } /* Do a listing. Use is listing [expanded] [logical] [physical] [deck] */ void com_listing(wordlist *wl) { int type = LS_LOGICAL; bool expand = FALSE, do_param_listing = FALSE; char *s; if (ft_curckt) { /* if there is a current circuit . . . . */ while (wl) { s = wl->wl_word; if (strcmp(s, "param") == 0) { do_param_listing = TRUE; } else { switch (*s) { case 'l': case 'L': type = LS_LOGICAL; break; case 'p': case 'P': type = LS_PHYSICAL; break; case 'd': case 'D': type = LS_DECK; break; case 'e': case 'E': expand = TRUE; break; default: fprintf(cp_err, "Error: bad listing type %s\n", s); return; /* SJB - don't go on after an error */ } } wl = wl->wl_next; } if (do_param_listing) { nupa_list_params(cp_out); } else { if (type != LS_DECK) fprintf(cp_out, "\t%s\n\n", ft_curckt->ci_name); inp_list(cp_out, expand ? ft_curckt->ci_deck : ft_curckt->ci_origdeck, ft_curckt->ci_options, type); } } else { fprintf(cp_err, "Error: no circuit loaded.\n"); } } /* returns inp_casefix() or NULL */ static char * upper(char *string) { static char buf[BSIZE_SP]; if (string) { strncpy(buf, string, BSIZE_SP - 1); buf[BSIZE_SP - 1] = '\0'; inp_casefix(buf); } else { strcpy(buf, ""); } return buf; } /* Provide an input listing on the specified file of the given card * deck. The listing should be of either LS_PHYSICAL or LS_LOGICAL or * LS_DECK lines as specified by the type parameter. */ void inp_list(FILE *file, struct line *deck, struct line *extras, int type) { struct line *here; struct line *there; bool renumber; bool useout = (file == cp_out); int i = 1; /* gtri - wbk - 03/07/91 - Don't use 'more' type output if ipc enabled */ #ifdef XSPICE if (g_ipc.enabled) useout = FALSE; #endif /* gtri - end - 03/07/91 */ if (useout) { out_init(); file = cp_more; } renumber = cp_getvar("renumber", CP_BOOL, NULL); if (type == LS_LOGICAL) { top1: for (here = deck; here; here = here->li_next) { if (renumber) here->li_linenum = i; if (ciprefix(".end", here->li_line) && !isalpha(here->li_line[4])) continue; if (*here->li_line != '*') { Xprintf(file, "%6d : %s\n", here->li_linenum, upper(here->li_line)); if (here->li_error) Xprintf(file, "%s\n", here->li_error); } i++; } if (extras) { deck = extras; extras = NULL; goto top1; } Xprintf(file, "%6d : .end\n", i); } else if ((type == LS_PHYSICAL) || (type == LS_DECK)) { top2: for (here = deck; here; here = here->li_next) { if ((here->li_actual == NULL) || (here == deck)) { if (renumber) here->li_linenum = i; if (ciprefix(".end", here->li_line) && !isalpha(here->li_line[4])) continue; if (type == LS_PHYSICAL) Xprintf(file, "%6d : %s\n", here->li_linenum, upper(here->li_line)); else Xprintf(file, "%s\n", upper(here->li_line)); if (here->li_error && (type == LS_PHYSICAL)) Xprintf(file, "%s\n", here->li_error); } else { for (there = here->li_actual; there; there = there->li_next) { there->li_linenum = i++; if (ciprefix(".end", here->li_line) && isalpha(here->li_line[4])) continue; if (type == LS_PHYSICAL) Xprintf(file, "%6d : %s\n", there->li_linenum, upper(there->li_line)); else Xprintf(file, "%s\n", upper(there->li_line)); if (there->li_error && (type == LS_PHYSICAL)) Xprintf(file, "%s\n", there->li_error); } here->li_linenum = i; } i++; } if (extras) { deck = extras; extras = NULL; goto top2; } if (type == LS_PHYSICAL) Xprintf(file, "%6d : .end\n", i); else Xprintf(file, ".end\n"); } else { fprintf(cp_err, "inp_list: Internal Error: bad type %d\n", type); } } /* * Free memory used by a line. * If recurse is TRUE then recursively free all lines linked via the li_next field. * If recurse is FALSE free only this line. * All lines linked via the li_actual field are always recursivly freed. * SJB - 22nd May 2001 */ void line_free_x(struct line *deck, bool recurse) { while (deck) { struct line *next_deck = deck->li_next; line_free_x(deck->li_actual, TRUE); tfree(deck->li_line); tfree(deck->li_error); tfree(deck); if (!recurse) return; deck = next_deck; } } /* The routine to source a spice input deck. We read the deck in, take * out the front-end commands, and create a CKT structure. Also we * filter out the following cards: .save, .width, .four, .print, and * .plot, to perform after the run is over. * Then, we run dodeck, which parses up the deck. */ void inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile) /* arguments: * *fp = pointer to the input file * comfile = whether it is a command file. Values are TRUE/FALSE * *filename = name of input file * intfile = whether input is from internal array. Values are TRUE/FALSE */ { struct line *deck, *dd, *ld, *prev_param = NULL, *prev_card = NULL; struct line *realdeck = NULL, *options = NULL, *curr_meas = NULL; char *tt = NULL, name[BSIZE_SP], *s, *t, *temperature = NULL; double testemp = 0.0; bool commands = FALSE; wordlist *wl = NULL, *end = NULL, *wl_first = NULL; wordlist *controls = NULL, *pre_controls = NULL; FILE *lastin, *lastout, *lasterr; double temperature_value; double startTime, endTime; /* read in the deck from a file */ char *dir_name = ngdirname(filename ? filename : "."); startTime = seconds(); deck = inp_readall(fp, dir_name, comfile, intfile); endTime = seconds(); tfree(dir_name); /* if nothing came back from inp_readall, just close fp and return to caller */ if (!deck) { /* MW. We must close fp always when returning */ if (!intfile) fclose(fp); return; } if (!comfile) { options = inp_getopts(deck); realdeck = inp_deckcopy(deck); /* Save the title before INPgetTitle gets it. */ tt = copy(deck->li_line); if (!deck->li_next) fprintf(cp_err, "Warning: no lines in input\n"); } if (!intfile) fclose(fp); /* Now save the IO context and start a new control set. After we are done with the source we'll put the old file descriptors back. I guess we could use a FILE stack, but since this routine is recursive anyway. */ lastin = cp_curin; lastout = cp_curout; lasterr = cp_curerr; cp_curin = cp_in; cp_curout = cp_out; cp_curerr = cp_err; cp_pushcontrol(); /* We should now go through the deck and execute front-end * commands and remove them. Front-end commands are enclosed by * the cards .control and .endc, unless comfile is TRUE, in which * case every line must be a front-end command. There are too * many problems with matching the first word on the line. */ ld = deck; if (comfile) { /* Process each command, except 'option' which is assembled in a list and ingnored here */ for (dd = deck; dd; dd = ld) { ld = dd->li_next; if ((dd->li_line[0] == '*') && (dd->li_line[1] != '#')) continue; if (!ciprefix(".control", dd->li_line) && !ciprefix(".endc", dd->li_line)) { if (dd->li_line[0] == '*') cp_evloop(dd->li_line + 2); /* option line stored but not processed */ else if (ciprefix("option", dd->li_line)) com_options = inp_getoptsc(dd->li_line, com_options); else cp_evloop(dd->li_line); } } /* free the control deck */ line_free(deck, TRUE); /* set to NULL to allow generation of a new dbs */ /* do this here and in the 'else' branch of 'if (comfile)' */ dbs = NULL; ft_dotsaves(); } /* end if (comfile) */ else { /* must be regular deck . . . . */ /* loop through deck and handle control cards */ for (dd = deck->li_next; dd; dd = ld->li_next) { /* get temp from deck */ if (ciprefix(".temp", dd->li_line)) { s = dd->li_line + 5; while (isspace(*s)) s++; if (temperature) txfree(temperature); temperature = strdup(s); } /* Ignore comment lines, but not lines begining with '*#', but remove them, if they are in a .control ... .endc section */ s = dd->li_line; while (isspace(*s)) s++; if ((*s == '*') && ((s != dd->li_line) || (s[1] != '#'))) { if (commands) { /* Remove comment lines in control sections, so they don't * get considered as circuits. */ ld->li_next = dd->li_next; line_free(dd, FALSE); continue; } ld = dd; continue; } /* Put the first token from line into s */ strncpy(name, dd->li_line, BSIZE_SP); for (s = name; *s && isspace(*s); s++) ; for (t = s; *t && !isspace(*t); t++) ; *t = '\0'; if (ciprefix(".control", dd->li_line)) { ld->li_next = dd->li_next; line_free(dd, FALSE); /* SJB - free this line's memory */ if (commands) fprintf(cp_err, "Warning: redundant .control card\n"); else commands = TRUE; } else if (ciprefix(".endc", dd->li_line)) { ld->li_next = dd->li_next; line_free(dd, FALSE); /* SJB - free this line's memory */ if (commands) commands = FALSE; else fprintf(cp_err, "Warning: misplaced .endc card\n"); } else if (commands || prefix("*#", dd->li_line)) { /* assemble all commands starting with pre_ after stripping pre_, to be executed before circuit parsing */ if (ciprefix("pre_", dd->li_line)) { s = copy(dd->li_line + 4); pre_controls = wl_cons(s, pre_controls); } /* assemble all other commands to be executed after circuit parsing */ else { /* special control lines outside of .control section*/ if (prefix("*#", dd->li_line)) { s = copy(dd->li_line + 2); /* all commands from within .control section */ } else { s = dd->li_line; dd->li_line = 0; /* SJB - prevent line_free() freeing the string (now pointed at by wl->wl_word) */ } controls = wl_cons(s, controls); } ld->li_next = dd->li_next; line_free(dd, FALSE); } else if (!*dd->li_line) { /* So blank lines in com files don't get considered as circuits. */ ld->li_next = dd->li_next; line_free(dd, FALSE); } else { /* lines .width, .four, .plot, .print, .save added to wl_first, removed from deck */ /* lines .op, .meas, .tf added to wl_first */ inp_casefix(s); /* s: first token from line */ inp_casefix(dd->li_line); if (eq(s, ".width") || ciprefix(".four", s) || eq(s, ".plot") || eq(s, ".print") || eq(s, ".save") || eq(s, ".op") || ciprefix(".meas", s) || eq(s, ".tf")) { wl_append_word(&wl_first, &end, copy(dd->li_line)); if (!eq(s, ".op") && !eq(s, ".tf") && !ciprefix(".meas", s)) { ld->li_next = dd->li_next; line_free(dd, FALSE); } else { ld = dd; } } else { ld = dd; } } } /* end for (dd = deck->li_next . . . . */ /* Now that the deck is loaded, do the pre commands, if there are any, before the circuit structure is set up */ if (pre_controls) { pre_controls = wl_reverse(pre_controls); for (wl = pre_controls; wl; wl = wl->wl_next) cp_evloop(wl->wl_word); wl_free(pre_controls); } /* set temperature if defined to a preliminary variable which may be used in numparam evaluation */ if (temperature) { temperature_value = atof(temperature); cp_vset("pretemp", CP_REAL, &temperature_value); } if (ft_ngdebug) { cp_getvar("pretemp", CP_REAL, &testemp); printf("test temperature %f\n", testemp); } /* We are done handling the control stuff. Now process remainder of deck. Go on if there is something left after the controls.*/ if (deck->li_next) { fprintf(cp_out, "\nCircuit: %s\n\n", tt); #ifdef HAS_PROGREP SetAnalyse("Prepare Deck", 0); #endif /* Now expand subcircuit macros and substitute numparams.*/ if (!cp_getvar("nosubckt", CP_BOOL, NULL)) if ((deck->li_next = inp_subcktexpand(deck->li_next)) == NULL) { line_free(realdeck, TRUE); line_free(deck->li_actual, TRUE); tfree(tt); return; } /* Now handle translation of spice2c6 POLYs. */ #ifdef XSPICE /* Translate all SPICE 2G6 polynomial type sources */ deck->li_next = ENHtranslate_poly(deck->li_next); #endif line_free(deck->li_actual, FALSE); deck->li_actual = realdeck; /* print out the expanded deck into debug-out2.txt */ if (ft_ngdebug) { /*debug: print into file*/ FILE *fdo = fopen("debug-out2.txt", "w"); struct line *t = NULL; fprintf(fdo, "**************** uncommented deck **************\n\n"); /* always print first line */ fprintf(fdo, "%6d %6d %s\n", deck->li_linenum_orig, deck->li_linenum, deck->li_line); /* here without out-commented lines */ for (t = deck->li_next; t; t = t->li_next) { if (*(t->li_line) == '*') continue; fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); } fprintf(fdo, "\n****************** complete deck ***************\n\n"); /* now completely */ for (t = deck; t; t = t->li_next) fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); fclose(fdo); } for (dd = deck; dd; dd = dd->li_next) { /* get csparams and create vectors, being available in .control section, in plot 'const' */ if (ciprefix(".csparam", dd->li_line)) { wordlist *wlist = NULL; wordlist *wl = NULL; char *cstoken[3]; int i; s = dd->li_line; *s = '*'; s = dd->li_line + 8; while (isspace(*s)) s++; cstoken[0] = gettok_char(&s, '=', FALSE, FALSE); cstoken[1] = gettok_char(&s, '=', TRUE, FALSE); cstoken[2] = gettok(&s); for (i = 0; i < 3; i++) wl_append_word(&wlist, &wl, cstoken[i]); com_let(wlist); wl_free(wlist); } } /* handle .if ... .elseif ... .else ... .endif statements. */ dotifeval(deck); /*merge the two option line structs*/ if (!options && com_options) options = com_options; else if (options && com_options) { /* move to end of options struct line *tmp_options = options; while (tmp_options) { if (!tmp_options->li_next) break; tmp_options = tmp_options->li_next; } tmp_options->li_next = com_options;*/ /* move to end of com_options */ struct line *tmp_options = com_options; while (tmp_options) { if (!tmp_options->li_next) break; tmp_options = tmp_options->li_next; } tmp_options->li_next = options; } /* prepare parse trees from 'temper' expressions */ if (expr_w_temper) inp_parse_temper(deck); /* now load deck into ft_curckt -- the current circuit. */ inp_dodeck(deck, tt, wl_first, FALSE, options, filename); /* inp_dodeck did take ownership */ tt = NULL; } /* if (deck->li_next) */ /* look for and set temperature; also store param and .meas statements in circuit struct */ if (ft_curckt) { ft_curckt->ci_param = NULL; ft_curckt->ci_meas = NULL; /* PN add here stats*/ ft_curckt->FTEstats->FTESTATnetLoadTime = endTime - startTime; } for (dd = deck; dd; dd = dd->li_next) { /* all parameter lines should be sequentially ordered and placed at beginning of deck */ if (ciprefix(".param", dd->li_line)) { ft_curckt->ci_param = dd; /* find end of .param statements */ while (ciprefix(".param", dd->li_line)) { prev_param = dd; dd = dd->li_next; if (dd == NULL) break; // no line after .param line } prev_card->li_next = dd; prev_param->li_next = NULL; if (dd == NULL) { fprintf(cp_err, "Warning: Missing .end card!\n"); break; // no line after .param line } } if (ciprefix(".meas", dd->li_line)) { if (cp_getvar("autostop", CP_BOOL, NULL)) { if (strstr(dd->li_line, " max ") || strstr(dd->li_line, " min ") || strstr(dd->li_line, " avg ") || strstr(dd->li_line, " rms ") || strstr(dd->li_line, " integ ")) { printf("Warning: .OPTION AUTOSTOP will not be effective because one of 'max|min|avg|rms|integ' is used in .meas\n"); printf(" AUTOSTOP being disabled...\n"); cp_remvar("autostop"); } } if (curr_meas == NULL) { curr_meas = ft_curckt->ci_meas = dd; } else { curr_meas->li_next = dd; curr_meas = dd; } prev_card->li_next = dd->li_next; curr_meas->li_next = NULL; dd = prev_card; } prev_card = dd; } //end of for-loop /* set temperature, if defined, to new value. cp_vset will set the variable "temp" and also set CKTtemp, so we can do it only here because the circuit has to be already there */ if (temperature) { temperature_value = atof(temperature); cp_vset("temp", CP_REAL, &temperature_value); txfree(temperature); } #ifdef TRACE /* SDB debug statement */ printf("In inp_spsource, done with dodeck.\n"); #endif /* print out the expanded deck into debug-out3.txt */ if (ft_ngdebug) { /*debug: print into file*/ FILE *fdo = fopen("debug-out3.txt", "w"); struct line *t = NULL; fprintf(fdo, "**************** uncommented deck **************\n\n"); /* always print first line */ fprintf(fdo, "%6d %6d %s\n", deck->li_linenum_orig, deck->li_linenum, deck->li_line); /* here without out-commented lines */ for (t = deck->li_next; t; t = t->li_next) { if (*(t->li_line) == '*') continue; fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); } fprintf(fdo, "\n****************** complete deck ***************\n\n"); /* now completely */ for (t = deck; t; t = t->li_next) fprintf(fdo, "%6d %6d %s\n", t->li_linenum_orig, t->li_linenum, t->li_line); fclose(fdo); } if (expr_w_temper) { /* Now the circuit is defined, so generate the parse trees */ inp_parse_temper_trees(); /* Get the actual data for model and device instance parameters */ inp_evaluate_temper(); } /* linked list dbs is used to store the "save" or .save data (defined in breakp2.c), (When controls are executed later on, also stores TRACE, IPLOT, and STOP data) */ /* set to NULL to allow generation of a new dbs */ dbs = NULL; /* .save data stored in dbs. Do this here before controls are run: .save is thus recognized even if .control is used */ ft_dotsaves(); /* Now that the deck is loaded, do the commands, if there are any */ controls = wl_reverse(controls); for (wl = controls; wl; wl = wl->wl_next) cp_evloop(wl->wl_word); wl_free(controls); } /* Now reset everything. Pop the control stack, and fix up the IO * as it was before the source. */ cp_popcontrol(); cp_curin = lastin; cp_curout = lastout; cp_curerr = lasterr; tfree(tt); } /* This routine is cut in half here because com_rset has to do what * follows also. End is the list of commands we execute when the job * is finished: we only bother with this if we might be running in * batch mode, since it isn't much use otherwise. */ /*------------------------------------------------------------------ * It appears that inp_dodeck adds the circuit described by *deck * to the current circuit (ft_curckt). *-----------------------------------------------------------------*/ void inp_dodeck( struct line *deck, /*in: the spice deck */ char *tt, /*in: the title of the deck */ wordlist *end, /*in: all lines with .width, .plot, .print, .save, .op, .meas, .tf */ bool reuse, /*in: TRUE if called from runcoms2.c com_rset, FALSE if called from inp_spsource() */ struct line *options, /*in: all .option lines from deck */ char *filename /*in: input file of deck */ ) { struct circ *ct; struct line *dd; CKTcircuit *ckt; char *s; INPtables *tab = NULL; struct variable *eev = NULL; wordlist *wl; bool noparse, ii; int print_listing; bool have_err = FALSE; int warn; /* whether SOA check should be performed */ int maxwarns = 0; /* specifies the maximum number of SOA warnings */ double startTime; /* First throw away any old error messages there might be and fix the case of the lines. */ for (dd = deck; dd; dd = dd->li_next) if (dd->li_error) { tfree(dd->li_error); dd->li_error = NULL; } if (reuse) { /* re-use existing circuit structure */ ct = ft_curckt; } else { if (ft_curckt) { ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, NULL); ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL); } /* create new circuit structure */ ft_curckt = ct = alloc(struct circ); /*PN FTESTATS*/ ft_curckt->FTEstats = TMALLOC(FTESTATistics, 1); } noparse = cp_getvar("noparse", CP_BOOL, NULL); /* We check preliminary for the scale option. This special processing is needed because we need the scale info BEFORE building the circuit and seems there is no other way to do this. */ if (!noparse) { struct line *opt_beg = options; for (; options; options = options->li_next) { for (s = options->li_line; *s && !isspace(*s); s++) ; ii = cp_interactive; cp_interactive = FALSE; wl = cp_lexer(s); cp_interactive = ii; if (!wl || !wl->wl_word || !*wl->wl_word) continue; if (eev) eev->va_next = cp_setparse(wl); else ct->ci_vars = eev = cp_setparse(wl); wl_free(wl); while (eev && (eev->va_next)) eev = eev->va_next; } for (eev = ct->ci_vars; eev; eev = eev->va_next) { switch (eev->va_type) { case CP_BOOL: break; case CP_NUM: break; case CP_REAL: if (strcmp("scale", eev->va_name) == 0) { cp_vset("scale", CP_REAL, &eev->va_real); printf("Scale set\n"); } break; case CP_STRING: break; default: { fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n"); controlled_exit(EXIT_FAILURE); } } /* switch . . . */ } options = opt_beg; // back to the beginning } /* if (!noparse) . . . */ /*---------------------------------------------------- * Now assuming that we wanna parse this deck, we call * if_inpdeck which takes the deck and returns a * a pointer to the circuit ckt. *---------------------------------------------------*/ if (!noparse) { startTime = seconds(); ckt = if_inpdeck(deck, &tab); ft_curckt->FTEstats->FTESTATnetParseTime = seconds() - startTime; } else { ckt = NULL; } /* set ckt->CKTisLinear=1 if circuit only contains R, L, C */ if (ckt) cktislinear(ckt, deck); /* set some output terminal data */ out_init(); if (cp_getvar("warn", CP_NUM, &warn)) ckt->CKTsoaCheck = warn; else ckt->CKTsoaCheck = 0; if (cp_getvar("maxwarns", CP_NUM, &maxwarns)) ckt->CKTsoaMaxWarns = maxwarns; else ckt->CKTsoaMaxWarns = 5; ft_curckt->FTEstats->FTESTATdeckNumLines = 0; /*---------------------------------------------------- Now run through the deck and look to see if there are errors on any line (message contained in li_error). Error messages have been generated either by writing directly to ->li_error from a struct line or to ->error from a struct card , or by using one of the macros as defined in inpmacs.h. Functions INPerror(), INPerrCat(), and SPerror() are invoked. *---------------------------------------------------*/ for (dd = deck; dd; dd = dd->li_next) { ft_curckt->FTEstats->FTESTATdeckNumLines += 1; #ifdef TRACE /* SDB debug statement */ printf("In inp_dodeck, looking for errors and examining line %s . . . \n", dd->li_line); #endif if (dd->li_error) { char *p, *q; #ifdef XSPICE /* add setting of ipc syntax error flag */ g_ipc.syntax_error = IPC_TRUE; #endif p = dd->li_error; do { q = strchr(p, '\n'); if (q) *q = '\0'; if (p == dd->li_error) { if (strstr(dd->li_line, ".model")) out_printf("Warning: Model issue on line %d : %.*s ...\n %s\n", dd->li_linenum_orig, 56, dd->li_line, dd->li_error); else { out_printf("Error on line %d : %s\n %s\n", dd->li_linenum_orig, dd->li_line, dd->li_error); have_err = TRUE; } if (ft_stricterror) controlled_exit(EXIT_BAD); } else { out_printf("%s\n", p); } if (q) *q++ = '\n'; p = q; } while (p && *p); } /* end if (dd->li_error) */ } /* for (dd = deck; dd; dd = dd->li_next) */ /* Stop here and exit if error occurred in batch mode */ if (have_err && ft_batchmode) { fprintf(stderr, "\nngspice stopped due to error, no simulation run!\n"); controlled_exit(EXIT_BAD); } /* Only print out netlist if brief is FALSE */ if (!cp_getvar("brief", CP_BOOL, NULL)) { /* output deck */ out_printf("\nProcessed Netlist\n"); out_printf("=================\n"); print_listing = 1; for (dd = deck; dd; dd = dd->li_next) { if (ciprefix(".prot", dd->li_line)) print_listing = 0; if (print_listing == 1) out_printf("%s\n", dd->li_line); if (ciprefix(".unprot", dd->li_line)) print_listing = 1; } out_printf("\n"); } /* Add this circuit to the circuit list. If reuse is TRUE (command 'reset'), then use the existing ft_curckt structure. */ if (!reuse) { /* Be sure that ci_devices and ci_nodes are valid */ ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, NULL); cp_kwswitch(CT_DEVNAMES, ft_curckt->ci_devices); ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, NULL); cp_kwswitch(CT_NODENAMES, ft_curckt->ci_nodes); ft_newcirc(ct); /* Assign current circuit */ ft_curckt = ct; } ct->ci_name = tt; ct->ci_deck = deck; ct->ci_options = options; if (deck->li_actual) ct->ci_origdeck = deck->li_actual; else ct->ci_origdeck = ct->ci_deck; ct->ci_ckt = ckt; /* attach the input ckt to the list of circuits */ ct->ci_symtab = tab; ct->ci_inprogress = FALSE; ct->ci_runonce = FALSE; ct->ci_commands = end; if (filename) ct->ci_filename = copy(filename); else ct->ci_filename = NULL; if (!noparse) { /* * for (; options; options = options->li_next) { * for (s = options->li_line; *s && !isspace(*s); s++) * ; * ii = cp_interactive; * cp_interactive = FALSE; * wl = cp_lexer(s); * cp_interactive = ii; * if (!wl || !wl->wl_word || !*wl->wl_word) * continue; * if (eev) * eev->va_next = cp_setparse(wl); * else * ct->ci_vars = eev = cp_setparse(wl); * while (eev->va_next) * eev = eev->va_next; * } */ for (eev = ct->ci_vars; eev; eev = eev->va_next) { bool one = TRUE; /* FIXME, actually eev->va_bool should be TRUE anyway */ switch (eev->va_type) { case CP_BOOL: if_option(ct->ci_ckt, eev->va_name, eev->va_type, &one); break; case CP_NUM: if_option(ct->ci_ckt, eev->va_name, eev->va_type, &eev->va_num); break; case CP_REAL: if_option(ct->ci_ckt, eev->va_name, eev->va_type, &eev->va_real); break; case CP_STRING: if_option(ct->ci_ckt, eev->va_name, eev->va_type, eev->va_string); break; default: { fprintf(stderr, "ERROR: enumeration value `CP_LIST' not handled in inp_dodeck\nAborting...\n"); controlled_exit(EXIT_FAILURE); } } // switch . . . } } // if (!noparse) . . . /* add title of deck to data base */ /* this won't work if the title is the empty string * cp_addkword() doesn't work for tt === "" * since CT_CKTNAMES doesn't seem to be used anywhere * I've disabled this piece. */ #if 0 cp_addkword(CT_CKTNAMES, tt); #endif } /* Edit and re-load the current input deck. Note that if these * commands are used on a non-unix machine, they will leave spice.tmp * junk files lying around. */ void com_edit(wordlist *wl) { char *filename; FILE *fp; bool inter, permfile; char buf[BSIZE_SP]; inter = cp_interactive; cp_interactive = FALSE; if (wl) { if (!doedit(wl->wl_word)) { cp_interactive = inter; return; } if ((fp = inp_pathopen(wl->wl_word, "r")) == NULL) { perror(wl->wl_word); cp_interactive = inter; return; } inp_spsource(fp, FALSE, wl->wl_word, FALSE); } else { /* If there is no circuit yet, then create one */ if (ft_curckt && ft_curckt->ci_filename) { filename = ft_curckt->ci_filename; permfile = TRUE; } else { filename = smktemp("sp"); permfile = FALSE; } if (ft_curckt && !ft_curckt->ci_filename) { if ((fp = fopen(filename, "w")) == NULL) { perror(filename); cp_interactive = inter; return; } inp_list(fp, ft_curckt->ci_deck, ft_curckt->ci_options, LS_DECK); fprintf(cp_err, "Warning: editing a temporary file -- " "circuit not saved\n"); fclose(fp); } else if (!ft_curckt) { if ((fp = fopen(filename, "w")) == NULL) { perror(filename); cp_interactive = inter; return; } fprintf(fp, "SPICE 3 test deck\n"); fclose(fp); } if (!doedit(filename)) { cp_interactive = inter; return; } if ((fp = fopen(filename, "r")) == NULL) { perror(filename); cp_interactive = inter; return; } inp_spsource(fp, FALSE, permfile ? filename : NULL, FALSE); /* fclose(fp); */ /* MW. inp_spsource already closed fp */ if (ft_curckt && !ft_curckt->ci_filename) unlink(filename); } cp_interactive = inter; /* note: default is to run circuit after successful edit */ fprintf(cp_out, "run circuit? "); fflush(cp_out); fgets(buf, BSIZE_SP, stdin); if (buf[0] != 'n') { fprintf(cp_out, "running circuit\n"); com_run(NULL); } } static bool doedit(char *filename) { char buf[BSIZE_SP], buf2[BSIZE_SP], *editor; if (cp_getvar("editor", CP_STRING, buf2)) { editor = buf2; } else { if ((editor = getenv("EDITOR")) == NULL) { if (Def_Editor && *Def_Editor) editor = Def_Editor; else editor = "/usr/bin/vi"; } } sprintf(buf, "%s %s", editor, filename); return (system(buf) ? FALSE : TRUE); } void com_source(wordlist *wl) { FILE *fp, *tp; char buf[BSIZE_SP]; bool inter; char *tempfile = NULL; wordlist *owl = wl; size_t n; inter = cp_interactive; cp_interactive = FALSE; if (wl->wl_next) { /* There are several files -- put them into a temp file */ tempfile = smktemp("sp"); if ((fp = inp_pathopen(tempfile, "w+")) == NULL) { perror(tempfile); cp_interactive = TRUE; return; } while (wl) { if ((tp = inp_pathopen(wl->wl_word, "r")) == NULL) { perror(wl->wl_word); fclose(fp); cp_interactive = TRUE; unlink(tempfile); return; } while ((n = fread(buf, 1, BSIZE_SP, tp)) > 0) fwrite(buf, 1, n, fp); fclose(tp); wl = wl->wl_next; } fseek(fp, 0L, SEEK_SET); } else { fp = inp_pathopen(wl->wl_word, "r"); } if (fp == NULL) { perror(wl->wl_word); cp_interactive = TRUE; return; } /* Don't print the title if this is a spice initialisation file. */ if (ft_nutmeg || substring(INITSTR, owl->wl_word) || substring(ALT_INITSTR, owl->wl_word)) inp_spsource(fp, TRUE, tempfile ? NULL : wl->wl_word, FALSE); else inp_spsource(fp, FALSE, tempfile ? NULL : wl->wl_word, FALSE); cp_interactive = inter; if (tempfile) unlink(tempfile); } void inp_source(char *file) { static struct wordlist wl = { NULL, NULL, NULL }; wl.wl_word = file; com_source(&wl); } /* check the input deck (after inpcom and numparam extensions) for linear elements. If only linear elements are found, ckt->CKTisLinear is set to 1. Return immediately if a first non-linear element is found. */ static void cktislinear(CKTcircuit *ckt, struct line *deck) { struct line *dd; char firstchar; if (deck->li_next) for (dd = deck->li_next; dd; dd = dd->li_next) { firstchar = *dd->li_line; switch (firstchar) { case 'r': case 'l': case 'c': case 'i': case 'v': case '*': case '.': case 'e': case 'g': case 'f': case 'h': continue; break; default: ckt->CKTisLinear = 0; return; } } ckt->CKTisLinear = 1; } /* global array for assembling circuit lines entered by fcn circbyline or receiving array from external caller. Array is created once per ngspice call. Last line of the array has to get the value NULL */ char **circarray; void create_circbyline(char *line) { static int linec = 0; static int memlen = 256; FILE *fp = NULL; if (!circarray) circarray = TMALLOC(char*, memlen); circarray[linec++] = line; if (linec < memlen) { if (ciprefix(".end", line) && (line[4] == '\0' || isspace(line[4]))) { circarray[linec] = NULL; inp_spsource(fp, FALSE, "", TRUE); linec = 0; } } else { memlen += memlen; circarray = TREALLOC(char*, circarray, memlen); } } /* fcn called by command 'circbyline' */ void com_circbyline(wordlist *wl) { /* undo the automatic wordline creation. wl_flatten allocates memory on the heap for each newline. This memory will be released line by line in inp_source(). */ char *newline = wl_flatten(wl); create_circbyline(newline); } /* handle .if('expr') ... .elseif('expr') ... .else ... .endif statements. numparam has evaluated .if('boolean expression') to .if ( 1.000000000e+000 ) or .elseif ( 0.000000000e+000 ) */ static void dotifeval(struct line *deck) { int iftrue = 0, elseiftrue = 0, elsetrue = 0, iffound = 0, elseiffound = 0, elsefound = 0; struct line *dd; char *dottoken; char *s, *t; /* skip the first line (title line) */ for (dd = deck->li_next; dd; dd = dd->li_next) { s = t = dd->li_line; if (*s == '*') continue; dottoken = gettok(&t); /* find '.if' and read its parameter */ if (cieq(dottoken, ".if")) { elsefound = 0; elseiffound = 0; iffound = 1; *s = '*'; s = dd->li_line + 3; iftrue = atoi(s); } else if (cieq(dottoken, ".elseif")) { elsefound = 0; elseiffound = 1; iffound = 0; *s = '*'; if (!iftrue) { s = dd->li_line + 7; elseiftrue = atoi(s); } } else if (cieq(dottoken, ".else")) { elsefound = 1; elseiffound = 0; iffound = 0; if (!iftrue && !elseiftrue) elsetrue = 1; *s = '*'; } else if (cieq(dottoken, ".endif")) { elsefound = elseiffound = iffound = 0; elsetrue = elseiftrue = iftrue = 0; *s = '*'; // inp_subcktexpand(dd); } else { if (iffound && !iftrue) { *s = '*'; } else if (elseiffound && !elseiftrue) { *s = '*'; } else if (elsefound && !elsetrue) { *s = '*'; } } tfree(dottoken); } } /* List of all expressions found in .model lines */ static struct pt_temper *modtlist = NULL; /* List of all expressions found in device instance lines */ static struct pt_temper *devtlist = NULL; /* Evaluate expressions containing 'temper' keyword, found in .model lines or device instance lines. Activity has four steps: 1) Prepare the expressions to survive numparam expansion (see function inp_temper_compat() in inpcom.c). A global variable expr_w_temper is set TRUE if any expression with 'temper' has been found. 2) After numparam insertion and subcircuit expansion, get the expressions, store them with a place holder for the pointer to the expression parse tree and a wordlist containing device/model name, parameter name and a placeholder for the evaluation result ready to be used by com_alter(mod) functions, in linked lists modtlist (model) or devtlist (device instance). (done function inp_parse_temper()). 3) After the circuit structure has been established, generate the parse trees. We can do it only then because pointers to ckt->CKTtemp and others are stored in the trees. (done in function inp_parse_temper_trees()). 4) Evaluation of the parse trees is requested by calling function inp_evaluate_temper(). The B Source parser is invoked here. ckt->CKTtemp is used to replace the 'temper' token by the actual circuit temperature. The evaluation results are added to the wordlist, com_alter(mod) is called to set the new parameters to the model parameters or device instance parameters. */ static int inp_parse_temper(struct line *card) { int error = 0; char *end_tstr, *beg_tstr, *beg_pstr, *str_ptr, *devmodname, *paramname; /* skip title line */ card = card->li_next; for (; card; card = card->li_next) { char *curr_line = card->li_line; /* exclude some elements */ if ((*curr_line == '*') || (*curr_line == 'v') || (*curr_line == 'b') || (*curr_line == 'i') || (*curr_line == 'e') || (*curr_line == 'g') || (*curr_line == 'f') || (*curr_line == 'h')) continue; /* exclude all dot commands except .model */ if ((*curr_line == '.') && (!prefix(".model", curr_line))) continue; /* exclude lines not containing 'temper' */ if (strstr(curr_line, "temper") == NULL) continue; /* now start processing of the remaining lines containing 'temper' */ if (prefix(".model", curr_line)) { struct pt_temper *modtlistnew = NULL; /* remove '.model' */ str_ptr = gettok(&curr_line); tfree(str_ptr); devmodname = gettok(&curr_line); beg_tstr = curr_line; while ((end_tstr = beg_tstr = strstr(beg_tstr, "temper")) != NULL) { wordlist *wl = NULL, *wlend = NULL; modtlistnew = TMALLOC(struct pt_temper, 1); while ((*beg_tstr) != '=') beg_tstr--; beg_pstr = beg_tstr; /* go back over param name */ while(isspace(*beg_pstr)) beg_pstr--; while(!isspace(*beg_pstr)) beg_pstr--; /* get parameter name */ paramname = copy_substring(beg_pstr + 1, beg_tstr); /* find end of expression string */ while (((*end_tstr) != '\0') && ((*end_tstr) != '=')) end_tstr++; /* go back over next param name */ if (*end_tstr == '=') { end_tstr--; while(isspace(*end_tstr)) end_tstr--; while(!isspace(*end_tstr)) end_tstr--; } /* copy the expression */ modtlistnew->expression = copy_substring(beg_tstr + 1, end_tstr); /* now remove this parameter entry by overwriting with ' ' ngspice then will use the default parameter to set up the circuit */ for (str_ptr = beg_pstr; str_ptr < end_tstr; str_ptr++) *str_ptr = ' '; modtlistnew->next = NULL; /* create wordlist suitable for com_altermod */ wl_append_word(&wl, &wlend, devmodname); wl_append_word(&wl, &wlend, paramname); wl_append_word(&wl, &wlend, copy("=")); /* to be filled in by evaluation function */ wl_append_word(&wl, &wlend, NULL); modtlistnew->wl = wl; modtlistnew->wlend = wlend; /* fill in the linked parse tree list */ if (modtlist) { struct pt_temper *modtlisttmp = modtlist; modtlist = modtlistnew; modtlist->next = modtlisttmp; } else { modtlist = modtlistnew; } } } else { /* instance expression with 'temper' */ struct pt_temper *devtlistnew = NULL; /* get device name */ devmodname = gettok(&curr_line); beg_tstr = curr_line; while ((end_tstr = beg_tstr = strstr(beg_tstr, "temper")) != NULL) { wordlist *wl = NULL, *wlend = NULL; devtlistnew = TMALLOC(struct pt_temper, 1); while ((*beg_tstr) != '=') beg_tstr--; beg_pstr = beg_tstr; /* go back over param name */ while(isspace(*beg_pstr)) beg_pstr--; while(!isspace(*beg_pstr)) beg_pstr--; /* get parameter name */ paramname = copy_substring(beg_pstr + 1, beg_tstr); /* find end of expression string */ while (((*end_tstr) != '\0') && ((*end_tstr) != '=')) end_tstr++; /* go back over next param name */ if (*end_tstr == '=') { end_tstr--; while(isspace(*end_tstr)) end_tstr--; while(!isspace(*end_tstr)) end_tstr--; } /* copy the expression */ devtlistnew->expression = copy_substring(beg_tstr + 1, end_tstr); /* now remove this parameter entry by overwriting with ' ' ngspice then will use the default parameter to set up the circuit */ for (str_ptr = beg_pstr; str_ptr < end_tstr; str_ptr++) *str_ptr = ' '; devtlistnew->next = NULL; /* create wordlist suitable for com_altermod */ wl_append_word(&wl, &wlend, devmodname); wl_append_word(&wl, &wlend, paramname); wl_append_word(&wl, &wlend, copy("=")); /* to be filled in by evaluation function */ wl_append_word(&wl, &wlend, NULL); devtlistnew->wl = wl; devtlistnew->wlend = wlend; /* fill in the linked parse tree list */ if (devtlist) { struct pt_temper *devtlisttmp = devtlist; devtlist = devtlistnew; devtlist->next = devtlisttmp; } else { devtlist = devtlistnew; } } } } return error; } static void inp_parse_temper_trees(void) { struct pt_temper *d; for(d = devtlist; d; d = d->next) INPgetTree(&d->expression, &d->pt, ft_curckt->ci_ckt, NULL); for(d = modtlist; d; d = d->next) INPgetTree(&d->expression, &d->pt, ft_curckt->ci_ckt, NULL); } void inp_evaluate_temper(void) { struct pt_temper *d; double result; char fts[128]; for(d = devtlist; d; d = d->next) { IFeval((IFparseTree *) d->pt, 1e-12, &result, NULL, NULL); sprintf(fts, "%g", result); d->wlend->wl_word = copy(fts); com_alter(d->wl); } for(d = modtlist; d; d = d->next) { /* only evaluate models which have been entered into the hash table ckt->MODnameHash */ if (ft_sim->findModel (ft_curckt->ci_ckt, d->wl->wl_word) == NULL) continue; IFeval((IFparseTree *) d->pt, 1e-12, &result, NULL, NULL); sprintf(fts, "%g", result); d->wlend->wl_word = copy(fts); com_altermod(d->wl); } } ngspice-26/src/frontend/control.h0000644000265600020320000000310412264261473016466 0ustar andreasadmin/********** * Header file for control.c **********/ #ifndef ngspice_CONTROL_H #define ngspice_CONTROL_H #include "ngspice/bool.h" /* Stuff to do control structures. We keep a history (seperate from * the cshpar history, for now at least) of commands and their event * numbers, with a block considered as a statement. In a goto, the * first word in co_text is where to go, likewise for label. For * conditional controls, we have to call ft_getpnames and ft_evaluate * each time, since the dvec pointers will change... Also we should do * variable and backquote substitution each time... */ struct control { int co_type; /* One of CO_* ... */ wordlist *co_cond; /* if, while, dowhile */ char *co_foreachvar; /* foreach */ int co_numtimes; /* repeat, break & continue levels */ int co_timestodo; /* the number of times left during a repeat loop */ wordlist *co_text; /* Ordinary text and foreach values. */ struct control *co_parent; /* If this is inside a block. */ struct control *co_children; /* The contents of this block. */ struct control *co_elseblock; /* For if-then-else. */ struct control *co_next; struct control *co_prev; }; enum co_command { CO_UNFILLED, CO_STATEMENT, CO_WHILE, CO_DOWHILE, CO_IF, CO_FOREACH, CO_BREAK, CO_CONTINUE, CO_LABEL, CO_GOTO, CO_REPEAT }; #define CONTROLSTACKSIZE 256 /* Better be enough. */ extern struct control *control[CONTROLSTACKSIZE]; extern struct control *cend[CONTROLSTACKSIZE]; extern int stackp; #endif ngspice-26/src/frontend/com_cdump.c0000644000265600020320000001117512264261473016756 0ustar andreasadmin/* Command cdump: dump the control structure to the console output */ #include "ngspice/ngspice.h" #include #include "ngspice/wordlist.h" #include "control.h" #include "ngspice/cpextern.h" #include "ngspice/fteext.h" #include "ngspice/cktdefs.h" #include "com_cdump.h" static int indent; static void tab(int num) { int i; for (i = 0; i < num; i++) putc(' ', cp_out); } static void dodump(struct control *cc) { struct control *tc; switch (cc->co_type) { case CO_UNFILLED: tab(indent); fprintf(cp_out, "(unfilled)\n"); break; case CO_STATEMENT: tab(indent); wl_print(cc->co_text, cp_out); putc('\n', cp_out); break; case CO_WHILE: tab(indent); fprintf(cp_out, "while "); wl_print(cc->co_cond, cp_out); putc('\n', cp_out); indent += TABINDENT; for (tc = cc->co_children; tc; tc = tc->co_next) dodump(tc); indent -= TABINDENT; tab(indent); fprintf(cp_out, "end\n"); break; case CO_REPEAT: tab(indent); fprintf(cp_out, "repeat "); if (cc->co_numtimes != -1) fprintf(cp_out, "%d (%d left to do)\n", cc->co_numtimes, cc->co_timestodo); /* CDHW */ else putc('\n', cp_out); indent += TABINDENT; for (tc = cc->co_children; tc; tc = tc->co_next) dodump(tc); indent -= TABINDENT; tab(indent); fprintf(cp_out, "end\n"); break; case CO_DOWHILE: tab(indent); fprintf(cp_out, "dowhile "); wl_print(cc->co_cond, cp_out); putc('\n', cp_out); indent += TABINDENT; for (tc = cc->co_children; tc; tc = tc->co_next) dodump(tc); indent -= TABINDENT; tab(indent); fprintf(cp_out, "end\n"); break; case CO_IF: tab(indent); fprintf(cp_out, "if "); wl_print(cc->co_cond, cp_out); putc('\n', cp_out); indent += TABINDENT; for (tc = cc->co_children; tc; tc = tc->co_next) dodump(tc); indent -= TABINDENT; tab(indent); fprintf(cp_out, "end\n"); break; case CO_FOREACH: tab(indent); fprintf(cp_out, "foreach %s ", cc->co_foreachvar); wl_print(cc->co_text, cp_out); putc('\n', cp_out); indent += TABINDENT; for (tc = cc->co_children; tc; tc = tc->co_next) dodump(tc); indent -= TABINDENT; tab(indent); fprintf(cp_out, "end\n"); break; case CO_BREAK: tab(indent); if (cc->co_numtimes != 1) fprintf(cp_out, "break %d\n", cc->co_numtimes); else fprintf(cp_out, "break\n"); break; case CO_CONTINUE: tab(indent); if (cc->co_numtimes != 1) fprintf(cp_out, "continue %d\n", cc->co_numtimes); else fprintf(cp_out, "continue\n"); break; case CO_LABEL: tab(indent); fprintf(cp_out, "label %s\n", cc->co_text->wl_word); break; case CO_GOTO: tab(indent); fprintf(cp_out, "goto %s\n", cc->co_text->wl_word); break; default: tab(indent); fprintf(cp_out, "bad type %d\n", cc->co_type); break; } } void com_cdump(wordlist *wl) { struct control *c; NG_IGNORE(wl); indent = 0; for (c = control[stackp]; c; c = c->co_next) dodump(c); } /* dump circuit matrix to stdout or file */ void com_mdump(wordlist *wl) { CKTcircuit *ckt = NULL; char *s; if (!ft_curckt || !ft_curckt->ci_ckt) { fprintf(cp_err, "Error: no circuit loaded.\n"); return; } ckt = ft_curckt->ci_ckt; if (ckt->CKTmatrix) if (wl == NULL) { SMPprint(ckt->CKTmatrix , NULL); } else { s = cp_unquote(wl->wl_word); SMPprint(ckt->CKTmatrix , s); } else fprintf(cp_err, "Error: no matrix available.\n"); } /* dump circuit matrix RHS to stdout or file */ void com_rdump(wordlist *wl) { CKTcircuit *ckt = NULL; char *s; if (!ft_curckt || !ft_curckt->ci_ckt) { fprintf(cp_err, "Error: no circuit loaded.\n"); return; } ckt = ft_curckt->ci_ckt; if ((ckt->CKTmatrix) && (ckt->CKTrhs)) if (wl == NULL) { SMPprintRHS(ckt->CKTmatrix , NULL, ckt->CKTrhs, ckt->CKTirhs); } else { s = cp_unquote(wl->wl_word); SMPprintRHS(ckt->CKTmatrix , s, ckt->CKTrhs, ckt->CKTirhs); } else fprintf(cp_err, "Error: no matrix or RHS available.\n"); } ngspice-26/src/frontend/terminal.c0000644000265600020320000001671112264261473016624 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to handle "more"d output. There are some serious system * dependencies in here, and it isn't clear that versions of this stuff * can be written for every possible machine... */ #include "ngspice/ngspice.h" #include #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif #ifdef HAVE_SGTTY_H #include #endif #ifdef HAVE_SYS_IOCTL_H #include #endif #if 0 /* Bad interaction with bool type in bool.h because curses also defines this symbol. */ #ifdef HAVE_TERMCAP #include #include #endif #endif #ifdef HAVE_TERMCAP_H #include #elif HAVE_NCURSES_TERMCAP_H #include #endif #include "ngspice/cpdefs.h" #include "variable.h" #include "terminal.h" bool out_moremode = TRUE; bool out_isatty = TRUE; #ifndef TCL_MODULE #ifdef HAVE_TERMCAP static char *motion_chars; static char *clear_chars; static char *home_chars; static char *cleol_chars; #endif #define DEF_SCRHEIGHT 24 #define DEF_SCRWIDTH 80 static int xsize, ysize; static int xpos, ypos; static bool noprint, nopause; /* Start output... */ void out_init(void) { #ifdef TIOCGWINSZ struct winsize ws; #endif noprint = nopause = FALSE; if (cp_getvar("nomoremode", CP_BOOL, NULL)) out_moremode = FALSE; else out_moremode = TRUE; if (!out_moremode || !cp_interactive) out_isatty = FALSE; if (!out_isatty) return; xsize = ysize = 0; /* Figure out the screen size. We try, in order, TIOCGSIZE, * tgetent(), and cp_getvar(height). Default is 24 x 80. */ #ifdef TIOCGWINSZ if (!xsize || !ysize) { (void) ioctl(fileno(stdout), TIOCGWINSZ, (char *) &ws); xsize = ws.ws_col; ysize = ws.ws_row; } #endif if (!xsize) (void) cp_getvar("width", CP_NUM, &xsize); if (!ysize) (void) cp_getvar("height", CP_NUM, &ysize); if (!xsize) xsize = DEF_SCRWIDTH; if (!ysize) ysize = DEF_SCRHEIGHT; ysize -= 2; /* Fudge room... */ xpos = ypos = 0; } /* Putc may not be buffered (sp?), so we do it ourselves. */ static char staticbuf[BUFSIZ]; struct { int count; char *ptr; } ourbuf = { BUFSIZ, staticbuf }; /* send buffer out */ void outbufputc(void) { if (ourbuf.count != BUFSIZ) { fputs(staticbuf, cp_out); memset(staticbuf, 0, (size_t) (BUFSIZ - ourbuf.count)); ourbuf.count = BUFSIZ; ourbuf.ptr = staticbuf; } } static void bufputc(char c) { if (--ourbuf.count >= 0) { *ourbuf.ptr++ = c; } else { /* Flush and reset the buffer */ outbufputc(); /* and store the character. */ ourbuf.count--; *ourbuf.ptr++ = c; } } /* prompt for a return */ void promptreturn(void) { char buf[16]; moe: fprintf(cp_out, "\n\t-- hit return for more, ? for help -- "); if (!fgets(buf, 16, cp_in)) { clearerr(cp_in); *buf = 'q'; } switch (*buf) { case '\n': break; case 'q': noprint = TRUE; break; case 'c': nopause = TRUE; break; case ' ': break; case '?': fprintf(cp_out, "\nPossible responses:\n\ \t : Print another screenful\n\ \tq : Discard the rest of the output\n\ \tc : Continuously print the rest of the output\n\ \t? : Print this help message\n"); goto moe; default: fprintf(cp_out, "Character %d is no good\n", *buf); goto moe; } } /* Print a string to the output. If this would cause the screen to scroll, * print "more". */ void out_send(char *string) { if (noprint) return; if (!out_isatty || nopause) { fputs(string, cp_out); return; } while (*string) { switch (*string) { case '\n': xpos = 0; ypos++; break; case '\f': ypos = ysize; xpos = 0; break; case '\t': xpos = xpos / 8 + 1; xpos *= 8; break; default: xpos++; break; } while (xpos >= xsize) { xpos -= xsize; ypos++; } if (ypos >= ysize) { outbufputc(); /* out goes buffer */ promptreturn(); (void) fflush(cp_out); ypos = xpos = 0; } bufputc(*string); /* we need to buffer these */ string++; } (void) outbufputc(); } /* Printf some stuff using more mode. */ void out_vprintf(const char *fmt, va_list ap) { #if defined(HAVE_ASPRINTF) /* seems the best solution */ char * tbuf; vasprintf(&tbuf, fmt, ap); out_send(tbuf); FREE(tbuf); #elif defined(HAVE_SNPRINTF) /* the second best */ static char out_pbuf[8*BSIZE_SP]; vsnprintf(out_pbuf, sizeof(out_pbuf), fmt, ap); out_send(out_pbuf); #else /* guaranteed a bug for long messages */ static char out_pbuf[8*BSIZE_SP]; vsprintf(out_pbuf, fmt, ap); out_send(out_pbuf); #endif } void out_printf(char *fmt, ...) { va_list ap; va_start(ap, fmt); out_vprintf(fmt, ap); va_end(ap); } #ifdef HAVE_TERMCAP static int outfn(int c) { putc(c, stdout); return c; } #endif void tcap_init(void) { char *s; #ifdef HAVE_TERMCAP char tbuf[1025]; static char buf2[100]; char *charbuf; charbuf = buf2; if ((s = getenv("TERM")) != NULL) if (tgetent(tbuf, s) != -1) { xsize = tgetnum("co"); ysize = tgetnum("li"); if ((xsize <= 0) || (ysize <= 0)) xsize = ysize = 0; clear_chars = tgetstr("cl", &charbuf); motion_chars = tgetstr("cm", &charbuf); home_chars = tgetstr("ho", &charbuf); cleol_chars = tgetstr("ce", &charbuf); } #endif if (!xsize) { if ((s = getenv("COLS")) != NULL) xsize = atoi(s); if (xsize <= 0) xsize = 0; } if (!ysize) { if ((s = getenv("LINES")) != NULL) ysize = atoi(s); if (ysize <= 0) ysize = 0; } } void term_clear(void) { #ifdef HAVE_TERMCAP if (*clear_chars) tputs(clear_chars, 1, outfn); else fputs("\n", stdout); #endif } void term_home(void) { #ifdef HAVE_TERMCAP if (*home_chars) tputs(home_chars, 1, outfn); else if (*motion_chars) tputs(tgoto(motion_chars, 1, 1), 1, outfn); else fputs("\n", stdout); #endif } void term_cleol(void) { #ifdef HAVE_TERMCAP if (*cleol_chars) tputs(cleol_chars, 1, outfn); #endif } #else void out_init(void) {} void outbufputc(void) {} void promptreturn(void) {} void term_clear(void) {} void term_home(void) {} void term_cleol(void) {} void tcap_init(void) {} void out_send(char *string) { fprintf(cp_out, "%s", string); } void out_vprintf(const char *fmt, va_list ap) { vfprintf(cp_out, fmt, ap); } void out_printf(char *fmt, ...) { va_list ap; va_start(ap, fmt); out_vprintf(fmt, ap); va_end(ap); } #endif /* TCL_MODULE */ ngspice-26/src/frontend/commands.h0000644000265600020320000000020112264261473016602 0ustar andreasadmin#ifndef ngspice_COMMANDS_H #define ngspice_COMMANDS_H extern struct comm spcp_coms[]; extern struct comm nutcp_coms[]; #endif ngspice-26/src/frontend/commands.c0000644000265600020320000011012012264261473016577 0ustar andreasadmin/* NG-SPICE -- An electrical circuit simulator * * Copyright (c) 1990 University of California * Copyright (c) 2000 Arno W. Peters * * Permission to use, copy, modify, and distribute this software and * its documentation without fee, and without a written agreement is * hereby granted, provided that the above copyright notice, this * paragraph and the following three paragraphs appear in all copies. * * This software program and documentation are copyrighted by their * authors. The software program and documentation are supplied "as * is", without any accompanying services from the authors. The * authors do not warrant that the operation of the program will be * uninterrupted or error-free. The end-user understands that the * program was developed for research purposes and is advised not to * rely exclusively on the program for any reason. * * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS * DOCUMENTATION, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. THE AUTHORS SPECIFICALLY DISCLAIMS ANY * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE * SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS * HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, * ENHANCEMENTS, OR MODIFICATIONS. */ /* Table of available commands. Note that they're sorted so that the * commands that appear in the spiceinit file are at the top. */ #include "ngspice/ngspice.h" #include "ngspice/ftedefs.h" #include "ngspice/cpdefs.h" #include "ftehelp.h" #include "commands.h" #include "com_ahelp.h" #include "com_ghelp.h" #include "com_asciiplot.h" #include "com_compose.h" #include "com_display.h" #include "com_hardcopy.h" #include "com_help.h" #include "com_let.h" #include "com_plot.h" #include "com_setscale.h" #include "com_xgraph.h" #include "com_gnuplot.h" #include "com_state.h" #include "com_chdir.h" #include "com_echo.h" #include "com_rehash.h" #include "com_shell.h" #include "com_shift.h" #include "com_unset.h" #include "fourier.h" #include "newcoms.h" #include "define.h" #include "com_set.h" #include "misccoms.h" #include "com_commands.h" #include "runcoms.h" #include "com_alias.h" #include "typesdef.h" #include "postcoms.h" #include "com_option.h" #include "inp.h" #include "com_dump.h" #include "com_fft.h" #include "spec.h" #include "runcoms2.h" #include "breakp.h" #include "breakp2.h" #include "aspice.h" #include "com_history.h" #include "com_cdump.h" #include "linear.h" #include "where.h" #include "mw_coms.h" #include "resource.h" #include "diff.h" #include "com_strcmp.h" #include "arg.h" #include "spiceif.h" /* for com_snload() and com_snsave() */ #include "com_dl.h" #ifdef XSPICE /* gtri - begin - wbk - add include files */ #include "ngspice/evtproto.h" /* gtri - end - wbk - add include files */ #endif /* Information about spice commands (struct comm). */ // char *co_comname; /* The name of the command. */ // void (*co_func) (wordlist *wl); /* The function that handles the command. */ // bool co_spiceonly; /* These can't be used from nutmeg. */ // bool co_major; /* Is this a "major" command? */ // long co_cctypes[4]; /* Bitmasks for command completion. */ // unsigned int co_env; /* print help message on this environment mask */ // int co_minargs; /* minimum number of arguments required */ // int co_maxargs; /* maximum number of arguments allowed */ // void (*co_argfn) (wordlist *wl, struct comm *command); /* The fn that prompts the user. */ // char *co_help; /* When these are printed, printf(string, av[0]) .. */ struct comm spcp_coms[] = { { "let", com_let, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, arg_let, "varname = expr : Assign vector variables." } , { "reshape", com_reshape, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, arg_let, "vector ... [ shape ] : change the dimensions of a vector." } , { "define", com_define, FALSE, TRUE, { 010000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "[[func (args)] stuff] : Define a user-definable function." } , { "set", com_set, FALSE, TRUE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[option] [option = value] ... : Set a variable." } , /* support for altering options in interactive mode, using either command 'option' or 'options'*/ { "option", com_option, TRUE, TRUE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[option] [option = value] ... : Set a simulator option." } , { "options", com_option, TRUE, TRUE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[option] [option = value] ... : Set a simulator option." } , { "snsave", com_snsave, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 1, 1, NULL, "file : Save a snapshot." } , { "snload", com_snload, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 2, 2, NULL, "file : Load a snapshot." } , { "circbyline", com_circbyline, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "line : Enter a circuit line." } , { "alias", com_alias, FALSE, FALSE, { 02, 04, 04, 04 }, E_ADVANCED, 0, LOTS, NULL, "[[word] alias] : Define an alias." } , { "deftype", com_dftype, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 3, LOTS, NULL, "spec name pat ... : Redefine vector and plot types.\n" } , #ifdef TCL_MODULE { "bltplot", com_bltplot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_BEGINNING | E_HASPLOTS, 1, LOTS, arg_plot, "expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things." }, { "plot", com_bltplot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_BEGINNING | E_HASPLOTS, 1, LOTS, arg_plot, "expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things." }, #else { "plot", com_plot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_BEGINNING | E_HASPLOTS, 1, LOTS, arg_plot, "expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things." }, #endif { "display", com_display, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 0, LOTS, arg_display, ": Display vector status." } , { "destroy", com_destroy, FALSE, FALSE, { 0400, 0400, 0400, 0400 }, E_DEFHMASK, 0, LOTS, NULL, "[plotname] ... : Throw away all the data in the plot." } , { "setplot", com_splot, FALSE, TRUE, { 0400, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[plotname] : Change the current working plot." } , { "setcirc", com_scirc, TRUE, FALSE, { 04, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[circuit name] : Change the current circuit." } , { "setscale", com_setscale, FALSE, FALSE, { 040000, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[vecname] : Change default scale of current working plot." } , { "transpose", com_transpose, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Perform matrix transposition on multi-D vectors." } , { "xgraph", com_xgraph, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS, NULL, "file plotargs : Send plot to Xgraph-11." } , { "gnuplot", com_gnuplot, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS, NULL, "file plotargs : Send plot to gnuplot." } , { "wrdata", com_write_simple, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS, NULL, "file plotargs : Send plot data to file." } , { "wrs2p", com_write_sparam, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 0, LOTS, NULL, "file : Send s-param data to file." } , { "hardcopy", com_hardcopy, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 0, LOTS, NULL, "file plotargs : Produce hardcopy plots." } , { "asciiplot", com_asciiplot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS, NULL, "plotargs : Produce ascii plots." } , { "write", com_write, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "file expr ... : Write data to a file." } , { "compose", com_compose, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 2, LOTS, NULL, "var parm=val ... : Compose a vector." } , { "unlet", com_unlet, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Undefine vectors." } , { "print", com_print, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 1, LOTS, arg_print, "[col] expr ... : Print vector values." } , #ifdef XSPICE /* gtri - begin - wbk - add event print command */ { "eprint", EVTprint, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 1, LOTS, NULL, "node node ... : Print event values." } , /* gtri - end - wbk - add event print command */ { "codemodel", com_codemodel, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 1, LOTS, NULL, "library library ... : Loads the opus librarys." } , #endif #ifdef DEVLIB { "use", com_use, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 1, LOTS, NULL, "library library ... : Loads the device librarys." } , #endif { "load", com_load, FALSE, TRUE, { 1, 1, 1, 1 }, E_BEGINNING | E_NOPLOTS, 1, LOTS, arg_load, "file ... : Load in data." } , { "cross", com_cross, FALSE, TRUE, { 040000, 0, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "vecname number [ vector ... ] : Make a vector in a strange way." } , { "undefine", com_undefine, FALSE, FALSE, { 010000, 010000, 010000, 010000 }, E_DEFHMASK, 0, LOTS, NULL, "[func ...] : Undefine a user-definable function." } , { "op", com_op, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.op line args] : Determine the operating point of the circuit." } , { "tf", com_tf, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.tran line args] : Do a transient analysis." } , { "tran", com_tran, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.tran line args] : Do a transient analysis." } , #ifdef WITH_PSS /* SP: Steady State Analysis */ { "pss", com_pss, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.pss line args] : Do a periodic state analysis." } , /* SP */ #endif { "ac", com_ac, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.ac line args] : Do an ac analysis." } , { "dc", com_dc, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.dc line args] : Do a dc analysis." } , { "pz", com_pz, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.pz line args] : Do a pole / zero analysis." } , { "sens", com_sens, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.sens line args] : Do a sensitivity analysis." } , { "disto", com_disto, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.disto line args] : Do an distortion analysis." } , { "noise", com_noise, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.noise line args] : Do a noise analysis." } , { "listing", com_listing, TRUE, TRUE, { 0100, 0100, 0100, 0100 }, E_DEFHMASK, 0, LOTS, NULL, "[logical] [physical] [deck] : Print the current circuit." } , { "edit", com_edit, TRUE, TRUE, { 1, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[filename] : Edit a spice deck and then load it in." } , { "dump", com_dump, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print a dump of the current circuit." } , { "fft", com_fft, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 1, LOTS, NULL, "vector ... : Create a frequency domain plot with FFT." } , { "psd", com_psd, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 2, LOTS, NULL, "vector ... : Create a power spetral density plot with FFT." } , { "fourier", com_fourier, FALSE, TRUE, { 0, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "fund_freq vector ... : Do a fourier analysis of some data." } , { "spec", com_spec, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 4, LOTS, NULL, "start_freq stop_freq step_freq vector ... : Create a frequency domain plot." } , { "meas", com_meas, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 1, LOTS, NULL, "various ... : User defined signal evaluation." } , { "show", com_show, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "devices ... : parameters ... : Print out device summary." } , { "showmod", com_showmod, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "models ... : parameters ... : Print out model summary." } , { "sysinfo", com_sysinfo, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "Print out system info summary." } , { "alter", com_alter, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "devspecs : parmname value : Alter device parameters." } , { "altermod", com_altermod, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "devspecs : parmname value : Alter model parameters." } , { "resume", com_resume, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Continue after a stop." } , { "state", com_state, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "(unimplemented) : Print the state of the circuit." }, { "stop", com_stop, TRUE, FALSE, { 04200, 04200, 04200, 04200 }, E_DEFHMASK, 0, LOTS, NULL, "[stop args] : Set a breakpoint." } , { "trace", com_trce, TRUE, FALSE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Trace a node." } , { "save", com_save, TRUE, FALSE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Save a spice output." } , { "iplot", com_iplot, TRUE, TRUE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Incrementally plot a node." } , { "status", com_sttus, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print the current breakpoints and traces." } , { "delete", com_delete, TRUE, FALSE, { 020, 020, 020, 020 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [break number ...] : Delete breakpoints and traces." } , { "step", com_step, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[number] : Iterate number times, or one." } , { "remcirc", com_remcirc, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Remove current citcuit." } , { "reset", com_rset, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Terminate a simulation after a breakpoint (formerly 'end')." } , { "run", com_run, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[rawfile] : Run the simulation as specified in the input file." } , { "aspice", com_aspice, FALSE, FALSE, { 1, 1, 1, 1 }, E_DEFHMASK, 1, 2, NULL, "file [outfile] : Run a spice job asynchronously." } , { "jobs", com_jobs, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Report on asynchronous spice jobs." } , { "rspice", com_rspice, FALSE, FALSE, { 1, 1, 1, 1 }, E_DEFHMASK, 0, LOTS, NULL, "[input file] : Run a spice job remotely." } , { "bug", com_bug, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Report a %s bug." } , { "where", com_where, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print last non-converging node or device" } , { "newhelp", com_ahelp, FALSE, TRUE, { 010, 010, 010, 010 }, E_DEFHMASK, 0, LOTS, NULL, "[command name] ... : help." }, { "tutorial", com_ghelp, FALSE, TRUE, { 023010, 023010, 023010, 023010 }, E_BEGINNING, 0, LOTS, NULL, "[subject] ... : Hierarchical documentation browser." } , { "help", com_ghelp, FALSE, TRUE, { 023010, 023010, 023010, 023010 }, E_DEFHMASK, 0, LOTS, NULL, "[subject] ... : Hierarchical documentation browser." } , { "oldhelp", com_help, FALSE, TRUE, { 010, 010, 010, 010 }, E_DEFHMASK, 0, LOTS, NULL, "[command name] ... : Print help." } , /* to remove circuits loaded */ { "removecirc", com_removecirc, TRUE, FALSE, { 04, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[circuit name] : Remove the current circuit from memory." } , { "quit", com_quit, FALSE, TRUE, { 0, 0, 0, 0 }, E_BEGINNING, 0, 1, NULL, ": Quit %s." } , { "source", com_source, FALSE, TRUE, { 1, 1, 1, 1 }, E_DEFHMASK, 1, LOTS, NULL, "file : Source a %s file." } , { "shift", com_shift, FALSE, FALSE, { 020000, 0, 0, 0 }, E_DEFHMASK, 0, 2, NULL, "[var] [number] : Shift argv or the named list var to the left." } , { "unset", com_unset, FALSE, FALSE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Unset a variable." } , { "unalias", com_unalias, FALSE, FALSE, { 02, 02, 02, 02 }, E_DEFHMASK, 1, LOTS, NULL, "word ... : Undefine an alias." } , { "history", com_history, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 2, NULL, "[-r] [number] : Print command history." } , { "echo", com_echo, FALSE, FALSE, { 1, 1, 1, 1 }, E_DEFHMASK, 0, LOTS, NULL, "[stuff ...] : Print stuff." } , { "shell", com_shell, FALSE, TRUE, { 1, 1, 1, 1 }, E_DEFHMASK, 0, LOTS, NULL, "[args] : Fork a shell, or execute the command." } , { "rusage", com_rusage, FALSE, FALSE, { 02000, 02000, 02000, 02000 }, E_DEFHMASK, 0, LOTS, NULL, "[resource ...] : Print current resource usage." } , { "cd", com_chdir, FALSE, FALSE, { 1, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[directory] : Change working directory." } , { "version", com_version, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[number] : Print the version number." } , { "diff", com_diff, FALSE, FALSE, { 0400, 0400, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "plotname plotname [vec ...] : 'diff' two plots." } , { "rehash", com_rehash, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Rebuild the unix command database." } , { "while", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute while the condition is TRUE." } , { "repeat", NULL, FALSE, FALSE, { 0, 0, 0, 0}, E_DEFHMASK, 0, 1, NULL, "[number] : Repeat number times, or forever." } , { "dowhile", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute while the condition is TRUE." } , { "foreach", NULL, FALSE, FALSE, { 0, 040000, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "variable value ... : Do once for each value." } , { "if", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute if the condition is TRUE." } , { "else", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Goes with if." } , { "end", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": End a block." } , { "break", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Break out of a block." } , { "continue", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Continue a loop." } , { "label", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 1, 1, NULL, "word : Create someplace to go to." } , { "goto", NULL, FALSE, FALSE, { 0100000, 0, 0, 0 }, E_DEFHMASK, 1, 1, NULL, "word : Go to a label." } , { "cdump", com_cdump, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Dump the current control structures." } , { "mdump", com_mdump, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "outfile: Dump the current matrix." } , { "mrdump", com_rdump, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "outfile: Dump the current RHS to file." } , { "settype", com_stype, FALSE, FALSE, { 0200000, 040000, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "type vec ... : Change the type of a vector." } , { "strcmp", com_strcmp, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 3, 3, NULL, "varname s1 s2 : Set $varname to strcmp(s1, s2)." } , { "linearize", com_linearize, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, " [ vec ... ] : Convert plot into one with linear scale." } , { "devhelp", com_devhelp, FALSE, FALSE, { 040000, 0400000, 040000, 040000 }, E_DEFHMASK, 0, 5 , NULL, "devspecs : show device information." }, { "inventory", com_inventory, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print circuit inventory" }, { 0, NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, NULL } }; /* Bool fields: spiceonly, major */ struct comm nutcp_coms[] = { { "let", com_let, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, arg_let, "varname = expr : Assign vector variables." } , { "reshape", com_reshape, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, arg_let, "vector ... [ shape ] : change the dimensions of a vector." } , { "define", com_define, FALSE, TRUE, { 010000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "[[func (args)] stuff] : Define a user-definable function." } , { "set", com_set, FALSE, TRUE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[option] [option = value] ... : Set a variable." } , #ifdef EXPERIMENTAL_CODE /* PN support for altering options in interactive mode */ { "option", com_option, TRUE, TRUE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 0, LOTS, arg_set, "[option] [option = value] ... : Set a simulator option." } , #endif { "alias", com_alias, FALSE, FALSE, { 02, 04, 04, 04 }, E_ADVANCED, 0, LOTS, NULL, "[[word] alias] : Define an alias." } , { "deftype", com_dftype, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 3, LOTS, NULL, "spec name pat ... : Redefine vector and plot types.\n" } , { "plot", com_plot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_BEGINNING | E_HASPLOTS, 1, LOTS, arg_plot, "expr ... [vs expr] [xl xlo xhi] [yl ylo yhi] : Plot things." }, { "display", com_display, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 0, LOTS, arg_display, ": Display vector status." } , { "destroy", com_destroy, FALSE, FALSE, { 0400, 0400, 0400, 0400 }, E_DEFHMASK, 0, LOTS, NULL, "[plotname] ... : Throw away all the data in the plot." } , { "setplot", com_splot, FALSE, TRUE, { 0400, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[plotname] : Change the current working plot." } , { "setcirc", com_scirc, TRUE, FALSE, { 04, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[circuit name] : Change the current circuit." } , { "setscale", com_setscale, FALSE, FALSE, { 040000, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[vecname] : Change default scale of current working plot." } , { "transpose", com_transpose, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Perform matrix transposition on multi-D vectors." } , { "xgraph", com_xgraph, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS, NULL, "file plotargs : Send plot to Xgraph-11." } , { "gnuplot", com_gnuplot, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS, NULL, "file plotargs : Send plot to gnuplot." } , { "wrdata", com_write_simple, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 2, LOTS, NULL, "file plotargs : Send plot data to file." } , { "wrs2p", com_write_sparam, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 0, LOTS, NULL, "file : Send s-param data to file." } , { "hardcopy", com_hardcopy, FALSE, TRUE, { 1, 041000, 041000, 041000 }, E_DEFHMASK, 0, LOTS, NULL, "file plotargs : Produce hardcopy plots." } , { "asciiplot", com_asciiplot, FALSE, TRUE, { 041000, 041000, 041000, 041000 }, E_DEFHMASK, 1, LOTS, NULL, "plotargs : Produce ascii plots." } , { "write", com_write, FALSE, TRUE, { 1, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "file expr ... : Write data to a file." } , { "compose", com_compose, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 2, LOTS, NULL, "var parm=val ... : Compose a vector." } , { "unlet", com_unlet, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Undefine vectors." } , { "print", com_print, FALSE, TRUE, { 040000, 040000, 040000, 040000 }, E_BEGINNING, 1, LOTS, arg_print, "[col] expr ... : Print vector values." } , { "load", com_load, FALSE, TRUE, { 1, 1, 1, 1 }, E_BEGINNING | E_NOPLOTS, 1, LOTS, arg_load, "file ... : Load in data." } , { "cross", com_cross, FALSE, TRUE, { 040000, 0, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "vecname number [ vector ... ] : Make a vector in a strange way." } , { "undefine", com_undefine, FALSE, FALSE, { 010000, 010000, 010000, 010000 }, E_DEFHMASK, 0, LOTS, NULL, "[func ...] : Undefine a user-definable function." } , { "op", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.op line args] : Determine the operating point of the circuit." } , { "tran", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.tran line args] : Do a transient analysis." } , #ifdef WITH_PSS /* SP: Steady State Analysis */ { "pss", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.pss line args] : Do a periodic steady state analysis." } , /* SP */ #endif { "ac", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.ac line args] : Do an ac analysis." } , { "dc", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.dc line args] : Do a dc analysis." } , { "pz", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.pz line args] : Do a pole / zero analysis." } , { "sens", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.ac line args] : Do a sensitivity analysis." } , { "disto", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.disto line args] : Do an distortion analysis." } , { "noise", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[.noise line args] : Do a noise analysis." } , { "listing", NULL, TRUE, TRUE, { 0100, 0100, 0100, 0100 }, E_DEFHMASK, 0, LOTS, NULL, "[logical] [physical] [deck] : Print the current circuit." } , { "edit", NULL, TRUE, TRUE, { 1, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[filename] : Edit a spice deck and then load it in." } , { "dump", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print a dump of the current circuit." } , { "fft", com_fft, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 1, LOTS, NULL, "vector ... : Create a frequency domain plot with FFT." } , { "psd", com_psd, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 2, LOTS, NULL, "vector ... : Create a power spetral density plot with FFT." } , { "fourier", com_fourier, FALSE, TRUE, { 0, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "fund_freq vector ... : Do a fourier analysis of some data." } , { "spec", com_spec, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 4, LOTS, NULL, "start_freq stop_freq step_freq vector ... : Create a frequency domain plot." } , { "show", NULL, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, LOTS, NULL, "devspecs ... : parmspecs ... : Print out device parameters." } , { "alter", NULL, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 3, LOTS, NULL, "devspecs : parmname value : Alter device parameters." } , { "altermod", NULL, TRUE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 3, LOTS, NULL, "devspecs : parmname value : Alter model parameters." } , { "resume", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Continue after a stop." } , { "state", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "(unimplemented) : Print the state of the circuit." }, { "stop", NULL, TRUE, FALSE, { 04200, 04200, 04200, 04200 }, E_DEFHMASK, 0, LOTS, NULL, "[stop args] : Set a breakpoint." } , { "trace", NULL, TRUE, FALSE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Trace a node." } , { "save", NULL, TRUE, FALSE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Save a spice output." } , { "iplot", NULL, TRUE, TRUE, { 0200, 0200, 0200, 0200 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [node ...] : Incrementally plot a node." } , { "status", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print the current breakpoints and traces." } , { "delete", NULL, TRUE, FALSE, { 020, 020, 020, 020 }, E_DEFHMASK, 0, LOTS, NULL, "[all] [break number ...] : Delete breakpoints and traces." } , { "step", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[number] : Iterate number times, or one." } , { "reset", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Terminate a simulation after a breakpoint (formerly 'end')." } , { "run", NULL, TRUE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[rawfile] : Run the simulation as specified in the input file." } , { "bug", com_bug, FALSE, TRUE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Report a %s bug." } , { "newhelp", com_ahelp, FALSE, TRUE, { 010, 010, 010, 010 }, E_DEFHMASK, 0, LOTS, NULL, "[command name] ... : help." }, { "tutorial", com_ghelp, FALSE, TRUE, { 023010, 023010, 023010, 023010 }, E_BEGINNING, 0, LOTS, NULL, "[subject] ... : Hierarchical documentation browser." } , { "help", com_ghelp, FALSE, TRUE, { 023010, 023010, 023010, 023010 }, E_DEFHMASK, 0, LOTS, NULL, "[subject] ... : Hierarchical documentation browser." } , { "oldhelp", com_help, FALSE, TRUE, { 010, 010, 010, 010 }, E_DEFHMASK, 0, LOTS, NULL, "[command name] ... : Print help." } , { "quit", com_quit, FALSE, TRUE, { 0, 0, 0, 0 }, E_BEGINNING, 0, 1, NULL, ": Quit %s." } , /* to remove circuits loaded */ { "removecirc", com_removecirc, TRUE, FALSE, { 04, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[circuit name] : Remove the current circuit from memory." } , { "source", nutcom_source, FALSE, TRUE, { 1, 1, 1, 1 }, E_DEFHMASK, 1, LOTS, NULL, "file : Source a %s file." } , { "shift", com_shift, FALSE, FALSE, { 020000, 0, 0, 0 }, E_DEFHMASK, 0, 2, NULL, "[var] [number] : Shift argv or the named list var to the left." } , { "unset", com_unset, FALSE, FALSE, { 020000, 020000, 020000, 020000 }, E_DEFHMASK, 1, LOTS, NULL, "varname ... : Unset a variable." } , { "unalias", com_unalias, FALSE, FALSE, { 02, 02, 02, 02 }, E_DEFHMASK, 1, LOTS, NULL, "word ... : Undefine an alias." } , { "history", com_history, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 2, NULL, "[-r] [number] : Print command history." } , { "echo", com_echo, FALSE, FALSE, { 1, 1, 1, 1 }, E_DEFHMASK, 0, LOTS, NULL, "[stuff ...] : Print stuff." } , { "shell", com_shell, FALSE, TRUE, { 1, 1, 1, 1 }, E_DEFHMASK, 0, LOTS, NULL, "[args] : Fork a shell, or execute the command." } , { "rusage", com_rusage, FALSE, FALSE, { 02000, 02000, 02000, 02000 }, E_DEFHMASK, 0, LOTS, NULL, "[resource ...] : Print current resource usage." } , { "cd", com_chdir, FALSE, FALSE, { 1, 0, 0, 0 }, E_DEFHMASK, 0, 1, NULL, "[directory] : Change working directory." } , { "version", com_version, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, "[number] : Print the version number." } , { "diff", com_diff, FALSE, FALSE, { 0400, 0400, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, "plotname plotname [vec ...] : 'diff' two plots." } , { "rehash", com_rehash, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Rebuild the unix command database." } , { "while", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute while the condition is TRUE." } , { "repeat", NULL, FALSE, FALSE, { 0, 0, 0, 0}, E_DEFHMASK, 0, 1, NULL, "[number] : Repeat number times, or forever." } , { "dowhile", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute while the condition is TRUE." } , { "foreach", NULL, FALSE, FALSE, { 0, 040000, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "variable value ... : Do once for each value." } , { "if", NULL, FALSE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 1, LOTS, NULL, "condition : Execute if the condition is TRUE." } , { "else", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Goes with if." } , { "end", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": End a block." } , { "break", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Break out of a block." } , { "continue", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Continue a loop." } , { "label", NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 1, 1, NULL, "word : Create someplace to go to." } , { "goto", NULL, FALSE, FALSE, { 0100000, 0, 0, 0 }, E_DEFHMASK, 1, 1, NULL, "word : Go to a label." } , { "cdump", com_cdump, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Dump the current control structures." } , { "settype", com_stype, FALSE, FALSE, { 0200000, 040000, 040000, 040000 }, E_DEFHMASK, 2, LOTS, NULL, "type vec ... : Change the type of a vector." } , { "strcmp", com_strcmp, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 3, 3, NULL, "varname s1 s2 : Set $varname to strcmp(s1, s2)." } , { "linearize", com_linearize, TRUE, FALSE, { 040000, 040000, 040000, 040000 }, E_DEFHMASK, 0, LOTS, NULL, " [ vec ... ] : Convert plot into one with linear scale." } , { "devhelp", NULL, FALSE, FALSE, { 040, 040, 040, 040 }, E_DEFHMASK, 0, 5 , NULL, " devspecs : show device information." }, { "inventory", NULL, TRUE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, 0, NULL, ": Print circuit inventory" } , { 0, NULL, FALSE, FALSE, { 0, 0, 0, 0 }, E_DEFHMASK, 0, LOTS, NULL, NULL } }; ngspice-26/src/frontend/control.c0000644000265600020320000007222612264261473016474 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* The front-end command loop. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "control.h" #include "com_cdump.h" #include "variable.h" #include "ngspice/fteext.h" /* Return values from doblock(). I am assuming that nobody will use * these characters in a string. */ #define NORMAL '\001' #define BROKEN '\002' #define CONTINUED '\003' #define NORMAL_STR "\001" #define BROKEN_STR "\002" #define CONTINUED_STR "\003" /* Are we waiting for a command? This lets signal handling be * more clever. */ bool cp_cwait = FALSE; char *cp_csep = ";"; bool cp_dounixcom = FALSE; /* We have to keep the control structures in a stack, so that when we * do a 'source', we can push a fresh set onto the top... Actually * there have to be two stacks -- one for the pointer to the list of * control structs, and one for the 'current command' pointer... */ struct control *control[CONTROLSTACKSIZE]; struct control *cend[CONTROLSTACKSIZE]; int stackp = 0; /* If there is an argument, give this to cshpar to use instead of * stdin. In a few places, we call cp_evloop again if it returns 1 and * exit (or close a file) if it returns 0... Because of the way * sources are done, we can't allow the control structures to get * blown away every time we return -- probably every time we type * source at the keyboard and every time a source returns to keyboard * input is ok though -- use ft_controlreset. */ /* Notes by CDHW: * This routine leaked like a sieve because each getcommand() created a * wordlist that was never freed because it might have been added into * the control structure. I've tackled this by making sure that everything * put into the cend[stackp] is a copy. This means that wlist can be * destroyed safely */ /* no redirection after the following commands (we may need more to add here!) */ static char *noredirect[] = { "stop", "define", NULL }; static struct control * findlabel(char *s, struct control *ct) { while (ct) { if ((ct->co_type == CO_LABEL) && eq(s, ct->co_text->wl_word)) break; ct = ct->co_next; } return (ct); } /* This is also in cshpar.c ... */ static void pwlist(wordlist *wlist, char *name) { wordlist *wl; if (!cp_debug) return; fprintf(cp_err, "%s : [ ", name); for (wl = wlist; wl; wl = wl->wl_next) fprintf(cp_err, "%s ", wl->wl_word); fprintf(cp_err, "]\n"); } /* CDHW defined functions */ static void pwlist_echo(wordlist *wlist, char *name) /*CDHW used to perform function of set echo */ { wordlist *wl; if ((!cp_echo)||cp_debug) /* cpdebug prints the same info */ return; fprintf(cp_err, "%s ", name); for (wl = wlist; wl; wl = wl->wl_next) fprintf(cp_err, "%s ", wl->wl_word); fprintf(cp_err, "\n"); } /*CDHW Remove control structure and free the memory its hogging CDHW*/ static void ctl_free(struct control *ctrl) { if (!ctrl) return; wl_free(ctrl->co_cond); ctrl->co_cond = NULL; tfree(ctrl->co_foreachvar); ctrl->co_foreachvar = NULL; wl_free(ctrl->co_text); ctrl->co_text = NULL; ctl_free(ctrl->co_children); ctrl->co_children = NULL; ctl_free(ctrl->co_elseblock); ctrl->co_elseblock = NULL; ctl_free(ctrl->co_next); ctrl->co_next = NULL; tfree(ctrl); ctrl = NULL; } /* Note that we only do io redirection when we get to here - we also * postpone some other things until now. */ static void docommand(wordlist *wlist) { wordlist *rwlist; if (cp_debug) { printf("docommand "); wl_print(wlist, stdout); putc('\n', stdout); } /* Do all the things that used to be done by cshpar when the line * was read... */ wlist = cp_variablesubst(wlist); pwlist(wlist, "After variable substitution"); wlist = cp_bquote(wlist); pwlist(wlist, "After backquote substitution"); wlist = cp_doglob(wlist); pwlist(wlist, "After globbing"); pwlist_echo(wlist, "Becomes >"); if (!wlist || !wlist->wl_word) /*CDHW need to free wlist in second case? CDHW*/ return; /* Now loop through all of the commands given. */ rwlist = wlist; while (wlist) { char *s; int i; struct comm *command; wordlist *nextc, *ee; nextc = wl_find(cp_csep, wlist); if (nextc == wlist) { /* skip leading `;' */ wlist = wlist->wl_next; continue; } /* Temporarily hide the rest of the command... */ ee = wlist->wl_prev; wl_chop(nextc); wl_chop(wlist); /* And do the redirection. */ cp_ioreset(); for (i = 0; noredirect[i]; i++) if (eq(wlist->wl_word, noredirect[i])) break; if (!noredirect[i]) if ((wlist = cp_redirect(wlist)) == NULL) { cp_ioreset(); return; } /* Get rid of all the 8th bits now... */ cp_striplist(wlist); s = wlist->wl_word; /* Look for the command in the command list. */ for (i = 0; cp_coms[i].co_comname; i++) if (strcmp(cp_coms[i].co_comname, s) == 0) break; command = &cp_coms[i]; /* Now give the user-supplied command routine a try... */ if (!command->co_func && cp_oddcomm(s, wlist->wl_next)) goto out; /* If it's not there, try it as a unix command. */ if (!command->co_comname) { if (cp_dounixcom && cp_unixcom(wlist)) goto out; fprintf(cp_err, "%s: no such command available in %s\n", s, cp_program); goto out; /* If it hasn't been implemented */ } else if (!command->co_func) { fprintf(cp_err, "%s: command is not implemented\n", s); goto out; /* If it's there but spiceonly, and this is nutmeg, error. */ } else if (ft_nutmeg && command->co_spiceonly) { fprintf(cp_err, "%s: command available only in spice\n", s); goto out; } /* The command was a valid spice/nutmeg command. */ { int nargs = wl_length(wlist->wl_next); if (nargs < command->co_minargs) { if (command->co_argfn) { command->co_argfn (wlist->wl_next, command); } else { fprintf(cp_err, "%s: too few args.\n", s); } } else if (nargs > command->co_maxargs) { fprintf(cp_err, "%s: too many args.\n", s); } else { command->co_func (wlist->wl_next); } } out: wl_append(ee, wlist); wl_append(wlist, nextc); if (!ee) rwlist = wlist; wlist = nextc; } wl_free(rwlist); /* Do periodic sorts of things... */ cp_periodic(); cp_ioreset(); } /* Execute a block. There can be a number of return values from this routine. * NORMAL indicates a normal termination * BROKEN indicates a break -- if the caller is a breakable loop, * terminate it, otherwise pass the break upwards * CONTINUED indicates a continue -- if the caller is a continuable loop, * continue, else pass the continue upwards * Any other return code is considered a pointer to a string which is * a label somewhere -- if this label is present in the block, * goto it, otherwise pass it up. Note that this prevents jumping * into a loop, which is good. * * Note that here is where we expand variables, ``, and globs for * controls. * * The 'num' argument is used by break n and continue n. */ static char * doblock(struct control *bl, int *num) { struct control *ch, *cn = NULL; wordlist *wl; char *i; int nn; nn = *num + 1; /*CDHW this is a guess... CDHW*/ switch (bl->co_type) { case CO_WHILE: if (!bl->co_children) { fprintf(cp_err, "Warning: Executing empty 'while' block.\n"); fprintf(cp_err, " (Use a label statement as a no-op to suppress this warning.)\n"); } while (bl->co_cond && cp_istrue(bl->co_cond)) { if (!bl->co_children) cp_periodic(); /*CDHW*/ for (ch = bl->co_children; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); switch (*i) { case NORMAL: break; case BROKEN: /* Break. */ if (nn < 2) { return (NORMAL_STR); } else { *num = nn - 1; return (BROKEN_STR); } case CONTINUED: /* Continue. */ if (nn < 2) { cn = NULL; break; } else { *num = nn - 1; return (CONTINUED_STR); } default: cn = findlabel(i, bl->co_children); if (!cn) return (i); } } } break; case CO_DOWHILE: do { for (ch = bl->co_children; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); switch (*i) { case NORMAL: break; case BROKEN: /* Break. */ if (nn < 2) { return (NORMAL_STR); } else { *num = nn - 1; return (BROKEN_STR); } case CONTINUED: /* Continue. */ if (nn < 2) { cn = NULL; break; } else { *num = nn - 1; return (CONTINUED_STR); } default: cn = findlabel(i, bl->co_children); if (!cn) return (i); } } } while (bl->co_cond && cp_istrue(bl->co_cond)); break; case CO_REPEAT: if (!bl->co_children) { fprintf(cp_err, "Warning: Executing empty 'repeat' block.\n"); fprintf(cp_err, " (Use a label statement as a no-op to suppress this warning.)\n"); } if (!bl->co_timestodo) bl->co_timestodo = bl->co_numtimes; /*bl->co_numtimes: total repeat count bl->co_numtimes = -1: repeat forever bl->co_timestodo: remaining repeats*/ while ((bl->co_timestodo > 0) || (bl->co_timestodo == -1)) { if (!bl->co_children) cp_periodic(); /*CDHW*/ if (bl->co_timestodo != -1) bl->co_timestodo--; /* loop through all stements inside rpeat ... end */ for (ch = bl->co_children; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); switch (*i) { case NORMAL: break; case BROKEN: /* Break. */ /* before leaving repeat loop set remaining timestodo to 0 */ bl->co_timestodo = 0; if (nn < 2) { return (NORMAL_STR); } else { *num = nn - 1; return (BROKEN_STR); } case CONTINUED: /* Continue. */ if (nn < 2) { cn = NULL; break; } else { /* before leaving repeat loop set remaining timestodo to 0 */ bl->co_timestodo = 0; *num = nn - 1; return (CONTINUED_STR); } default: cn = findlabel(i, bl->co_children); if (!cn) { /* no label found inside repeat loop: before leaving loop set remaining timestodo to 0 */ bl->co_timestodo = 0; return (i); } } } } break; case CO_IF: if (bl->co_cond && cp_istrue(bl->co_cond)) { for (ch = bl->co_children; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); if (*i > 2) { cn = findlabel(i, bl->co_children); if (!cn) return (i); } else if (*i != NORMAL) { *num = nn; return (i); } } } else { for (ch = bl->co_elseblock; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); if (*i > 2) { cn = findlabel(i, bl->co_elseblock); if (!cn) return (i); } else if (*i != NORMAL) { *num = nn; return (i); } } } break; case CO_FOREACH: for (wl = cp_variablesubst(cp_bquote(cp_doglob(wl_copy(bl->co_text)))); wl; wl = wl->wl_next) { cp_vset(bl->co_foreachvar, CP_STRING, wl->wl_word); for (ch = bl->co_children; ch; ch = cn) { cn = ch->co_next; i = doblock(ch, &nn); switch (*i) { case NORMAL: break; case BROKEN: /* Break. */ if (nn < 2) { return (NORMAL_STR); } else { *num = nn - 1; return (BROKEN_STR); } case CONTINUED: /* Continue. */ if (nn < 2) { cn = NULL; break; } else { *num = nn - 1; return (CONTINUED_STR); } default: cn = findlabel(i, bl->co_children); if (!cn) return (i); } } } break; case CO_BREAK: if (bl->co_numtimes > 0) { *num = bl->co_numtimes; return (BROKEN_STR); } else { fprintf(cp_err, "Warning: break %d a no-op\n", bl->co_numtimes); return (NORMAL_STR); } case CO_CONTINUE: if (bl->co_numtimes > 0) { *num = bl->co_numtimes; return (CONTINUED_STR); } else { fprintf(cp_err, "Warning: continue %d a no-op\n", bl->co_numtimes); return (NORMAL_STR); } case CO_GOTO: wl = cp_variablesubst(cp_bquote(cp_doglob( wl_copy(bl->co_text)))); /*CDHW Leak ? CDHW*/ return (wl->wl_word); case CO_LABEL: /* Do nothing. */ cp_periodic(); /*CDHW needed to avoid lock-ups when loop contains only a label CDHW*/ break; case CO_STATEMENT: docommand(wl_copy(bl->co_text)); break; case CO_UNFILLED: /* There was probably an error here... */ fprintf(cp_err, "Warning: ignoring previous error\n"); break; default: fprintf(cp_err, "doblock: Internal Error: bad block type %d\n", bl->co_type); return (NORMAL_STR); } return (NORMAL_STR); } /* Maxiumum number of cheverons used for the alternative prompt */ #define MAX_CHEVRONS 16 /* Get the alternate prompt. Number of chevrons indicates stack depth. Returns NULL when there is no alternate prompt. SJB 28th April 2005 */ char * get_alt_prompt(void) { int i = 0, j; static char buf[MAX_CHEVRONS + 2]; /* includes terminating space & null */ struct control *c; /* if nothing on the command stack return NULL */ if (cend[stackp] == 0) return NULL; /* measure stack depth */ for (c = cend[stackp]->co_parent; c; c = c->co_parent) i++; if (i <= 0) return NULL; /* Avoid overflow of buffer and indicate when we've limited the chevrons by starting with a '+' */ if (i > MAX_CHEVRONS) { i = MAX_CHEVRONS; buf[0] = '+'; } else { buf[0] = '>'; } /* return one chevron per command stack depth */ for (j = 1; j < i; j++) buf[j] = '>'; /* Add space and terminate */ buf[j] = ' '; buf[j + 1] = '\0'; return buf; } /* Get a command. This does all the bookkeeping things like turning * command completion on and off... */ static wordlist * getcommand(char *string) { wordlist *wlist; if (cp_debug) fprintf(cp_err, "calling getcommand %s\n", string ? string : ""); #if !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) /* set cp_altprompt for use by the lexer - see parser/lexical.c */ cp_altprompt = get_alt_prompt(); #endif /* !defined(HAVE_GNUREADLINE) && !defined(HAVE_BSDEDITLINE) */ cp_cwait = TRUE; wlist = cp_parse(string); cp_cwait = FALSE; if (cp_debug) { printf("getcommand "); wl_print(wlist, stdout); putc('\n', stdout); } return (wlist); } /* va: TODO: free control structure(s) before overwriting (memory leakage) */ int cp_evloop(char *string) { wordlist *wlist, *ww; struct control *x; char *i; int nn; #define newblock \ do { \ cend[stackp]->co_children = alloc(struct control); \ ZERO(cend[stackp]->co_children, struct control); \ cend[stackp]->co_children->co_parent = cend[stackp]; \ cend[stackp] = cend[stackp]->co_children; \ cend[stackp]->co_type = CO_UNFILLED; \ } while(0) for (;;) { wlist = getcommand(string); if (wlist == NULL) { /* End of file or end of user input. */ if (cend[stackp]->co_parent && !string) { cp_resetcontrol(); continue; } else { return (0); } } if ((wlist->wl_word == NULL) || (*wlist->wl_word == '\0')) { /* User just typed return. */ wl_free(wlist); /* va, avoid memory leak */ if (string) { return (1); } else { cp_event--; continue; } } /* Just a check... */ for (ww = wlist; ww; ww = ww->wl_next) if (!ww->wl_word) { fprintf(cp_err, "cp_evloop: Internal Error: NULL word pointer\n"); continue; } /* Add this to the control structure list. If cend->co_type is * CO_UNFILLED, the last line was the beginning of a block, * and this is the unfilled first statement. */ /* va: TODO: free old structure and its content, before overwriting */ if (cend[stackp] && (cend[stackp]->co_type != CO_UNFILLED)) { cend[stackp]->co_next = alloc(struct control); ZERO(cend[stackp]->co_next, struct control); cend[stackp]->co_next->co_prev = cend[stackp]; cend[stackp]->co_next->co_parent = cend[stackp]->co_parent; cend[stackp] = cend[stackp]->co_next; } else if (!cend[stackp]) { control[stackp] = cend[stackp] = alloc(struct control); ZERO(cend[stackp], struct control); } if (eq(wlist->wl_word, "while")) { cend[stackp]->co_type = CO_WHILE; cend[stackp]->co_cond = wl_copy(wlist->wl_next); /* va, wl_copy */ if (!cend[stackp]->co_cond) { fprintf(stderr, "Error: missing while condition, 'false' will be assumed.\n"); } newblock; } else if (eq(wlist->wl_word, "dowhile")) { cend[stackp]->co_type = CO_DOWHILE; cend[stackp]->co_cond = wl_copy(wlist->wl_next); /* va, wl_copy */ if (!cend[stackp]->co_cond) { /* va: prevent misinterpretation as trigraph sequence with \-sign */ fprintf(stderr, "Error: missing dowhile condition, '?\?\?' will be assumed.\n"); } newblock; } else if (eq(wlist->wl_word, "repeat")) { cend[stackp]->co_type = CO_REPEAT; if (!wlist->wl_next) { cend[stackp]->co_numtimes = -1; } else { char *s; double *dd; struct wordlist *t; /*CDHW*/ /*CDHW wlist = cp_variablesubst(cp_bquote(cp_doglob(wl_copy(wlist)))); Wrong order? Leak? CDHW*/ t = cp_doglob(cp_bquote(cp_variablesubst(wl_copy(wlist)))); /*CDHW leak from cp_doglob? */ s = t->wl_next->wl_word; dd = ft_numparse(&s, FALSE); if (dd) { if (*dd < 0) { fprintf(cp_err, "Error: can't repeat a negative number of times\n"); *dd = 0.0; } cend[stackp]->co_numtimes = (int) *dd; } else { fprintf(cp_err, "Error: bad repeat argument %s\n", t->wl_next->wl_word); /* CDHW */ } wl_free(t); t = NULL; /* CDHW */ } newblock; } else if (eq(wlist->wl_word, "if")) { cend[stackp]->co_type = CO_IF; cend[stackp]->co_cond = wl_copy(wlist->wl_next); /* va, wl_copy */ if (!cend[stackp]->co_cond) { fprintf(stderr, "Error: missing if condition.\n"); } newblock; } else if (eq(wlist->wl_word, "foreach")) { cend[stackp]->co_type = CO_FOREACH; if (wlist->wl_next) { wlist = wlist->wl_next; cend[stackp]->co_foreachvar = copy(wlist->wl_word); wlist = wlist->wl_next; } else { fprintf(stderr, "Error: missing foreach variable.\n"); } wlist = cp_doglob(wlist); /*CDHW Possible leak around here? */ cend[stackp]->co_text = wl_copy(wlist); newblock; } else if (eq(wlist->wl_word, "label")) { cend[stackp]->co_type = CO_LABEL; if (wlist->wl_next) { cend[stackp]->co_text = wl_copy(wlist->wl_next); /* I think of everything, don't I? */ cp_addkword(CT_LABEL, wlist->wl_next->wl_word); if (wlist->wl_next->wl_next) fprintf(cp_err, "Warning: ignored extra junk after label.\n"); } else { fprintf(stderr, "Error: missing label.\n"); } } else if (eq(wlist->wl_word, "goto")) { /* Incidentally, this won't work if the values 1 and 2 ever get * to be valid character pointers -- I think it's reasonably * safe to assume they aren't... */ cend[stackp]->co_type = CO_GOTO; if (wlist->wl_next) { cend[stackp]->co_text = wl_copy(wlist->wl_next); if (wlist->wl_next->wl_next) fprintf(cp_err, "Warning: ignored extra junk after goto.\n"); } else { fprintf(stderr, "Error: missing label.\n"); } } else if (eq(wlist->wl_word, "continue")) { cend[stackp]->co_type = CO_CONTINUE; if (wlist->wl_next) { cend[stackp]->co_numtimes = scannum(wlist->wl_next->wl_word); if (wlist->wl_next->wl_next) fprintf(cp_err, "Warning: ignored extra junk after continue %d.\n", cend[stackp]->co_numtimes); } else { cend[stackp]->co_numtimes = 1; } } else if (eq(wlist->wl_word, "break")) { cend[stackp]->co_type = CO_BREAK; if (wlist->wl_next) { cend[stackp]->co_numtimes = scannum(wlist->wl_next->wl_word); if (wlist->wl_next->wl_next) fprintf(cp_err, "Warning: ignored extra junk after break %d.\n", cend[stackp]->co_numtimes); } else { cend[stackp]->co_numtimes = 1; } } else if (eq(wlist->wl_word, "end")) { /* Throw away this thing. */ if (!cend[stackp]->co_parent) { fprintf(stderr, "Error: no block to end.\n"); cend[stackp]->co_type = CO_UNFILLED; } else if (cend[stackp]->co_prev) { cend[stackp]->co_prev->co_next = NULL; x = cend[stackp]; cend[stackp] = cend[stackp]->co_parent; tfree(x); x = NULL; } else { x = cend[stackp]; cend[stackp] = cend[stackp]->co_parent; cend[stackp]->co_children = NULL; tfree(x); x = NULL; } } else if (eq(wlist->wl_word, "else")) { if (!cend[stackp]->co_parent || (cend[stackp]->co_parent->co_type != CO_IF)) { fprintf(stderr, "Error: misplaced else.\n"); cend[stackp]->co_type = CO_UNFILLED; } else { if (cend[stackp]->co_prev) cend[stackp]->co_prev->co_next = NULL; else cend[stackp]->co_parent->co_children = NULL; cend[stackp]->co_parent->co_elseblock = cend[stackp]; cend[stackp]->co_prev = NULL; } } else { cend[stackp]->co_type = CO_STATEMENT; cend[stackp]->co_text = wl_copy(wlist); } if (!cend[stackp]->co_parent) { x = cend[stackp]; /* We have to toss this do-while loop in here so * that gotos at the top level will work. */ do { nn = 0; /* CDHW */ i = doblock(x, &nn); switch (*i) { case NORMAL: break; case BROKEN: fprintf(cp_err, "Error: break not in loop or too many break levels given\n"); break; case CONTINUED: fprintf(cp_err, "Error: continue not in loop or too many continue levels given\n"); break; default: x = findlabel(i, control[stackp]); if (!x) fprintf(cp_err, "Error: label %s not found\n", i); } if (x) x = x->co_next; } while (x); } wl_free(wlist); wlist = NULL; if (string) return (1); /* The return value is irrelevant. */ } } /* This blows away the control structures... */ void cp_free_control(void); /* needed by resetcontrol */ void cp_resetcontrol(void) { fprintf(cp_err, "Warning: clearing control structures\n"); if (cend[stackp] && cend[stackp]->co_parent) fprintf(cp_err, "Warning: EOF before block terminated\n"); /* We probably should free the control structures... */ cp_free_control(); /* va: free it */ control[0] = cend[0] = NULL; stackp = 0; cp_kwswitch(CT_LABEL, NULL); } /* Push or pop a new control structure set... */ void cp_popcontrol(void) { if (cp_debug) fprintf(cp_err, "pop: stackp: %d -> %d\n", stackp, stackp - 1); if (stackp < 1) { fprintf(cp_err, "cp_popcontrol: Internal Error: stack empty\n"); } else { /* va: free unused control structure */ ctl_free(control[stackp]); stackp--; } } void cp_pushcontrol(void) { if (cp_debug) fprintf(cp_err, "push: stackp: %d -> %d\n", stackp, stackp + 1); if (stackp > CONTROLSTACKSIZE - 2) { fprintf(cp_err, "Error: stack overflow -- max depth = %d\n", CONTROLSTACKSIZE); stackp = 0; } else { stackp++; control[stackp] = cend[stackp] = NULL; } } /* And this returns to the top level (for use in the interrupt handlers). */ void cp_toplevel(void) { stackp = 0; if (cend[stackp]) while (cend[stackp]->co_parent) cend[stackp] = cend[stackp]->co_parent; } /* va: This totally frees the control structures */ void cp_free_control(void) { int i; for (i = stackp; i >= 0; i--) ctl_free(control[i]); control[0] = cend[0] = NULL; stackp = 0; } ngspice-26/src/frontend/parse-bison.h0000644000265600020320000000501712264261704017232 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_NUM = 258, TOK_STR = 259, TOK_LE = 260, TOK_GE = 261, TOK_NE = 262, TOK_LRANGE = 263, TOK_RRANGE = 264, NEG = 265 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2068 of yacc.c */ #line 53 "./parse-bison.y" double num; const char *str; struct pnode *pnode; /* Line 2068 of yacc.c */ #line 68 "parse-bison.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif ngspice-26/src/frontend/parse.h0000644000265600020320000000041712264261473016124 0ustar andreasadmin/************* * Header file for parse.c * 1999 E. Rouat ************/ #ifndef ngspice_PARSE_H #define ngspice_PARSE_H #include "ngspice/pnode.h" #include "ngspice/wordlist.h" #ifndef free_pnode #define free_pnode(ptr) free_pnode_x(ptr); ptr=NULL; #endif #endif ngspice-26/src/frontend/spiceif.h0000644000265600020320000000111612264261473016431 0ustar andreasadmin/************* * Header file for spiceif.c * 1999 E. Rouat ************/ #ifndef ngspice_SPICEIF_H #define ngspice_SPICEIF_H CKTcircuit * if_inpdeck(struct line *deck, INPtables **tab); int if_run(CKTcircuit *t, char *what, wordlist *args, INPtables *tab); int if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value); void if_dump(CKTcircuit *ckt, FILE *file); void if_cktfree(CKTcircuit *ckt, INPtables *tab); int if_analQbyName(CKTcircuit *ckt, int which, JOB *anal, char *name, IFvalue *parm); void com_snload(wordlist *wl); void com_snsave(wordlist *wl); #endif ngspice-26/src/frontend/dimens.h0000644000265600020320000000065312264261473016273 0ustar andreasadmin/************* * Header file for dimens.c * 1999 E. Rouat ************/ #ifndef ngspice_DIMENS_H #define ngspice_DIMENS_H void dimstring(int *data, int length, char *retstring); void indexstring(int *data, int length, char *retstring); int incindex(int *counts, int numcounts, int *dims, int numdims); int emptydims(int *data, int length); int atodims(char *p, int *data, int *outlength); char *skipdims(char *p); #endif ngspice-26/src/frontend/com_help.c0000644000265600020320000000526212264261473016576 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/macros.h" #include "ngspice/wordlist.h" #include "ngspice/cpdefs.h" #include "ngspice/bool.h" #include "hcomp.h" #include "com_help.h" #include "ngspice/fteext.h" void com_help(wordlist *wl) { struct comm *c; struct comm *ccc[512]; /* Should be enough. */ int numcoms, i; bool allflag = FALSE; if (wl && eq(wl->wl_word, "all")) { allflag = TRUE; wl = NULL; /* XXX Probably right */ } /* We want to use more mode whether "moremode" is set or not. */ out_moremode = TRUE; out_init(); out_moremode = FALSE; if (wl == NULL) { out_printf("For a complete description " "read the Spice3 User's Manual.\n"); if (!allflag) { out_printf("For a list of all commands " "type \"help all\", for a short\n" "description of \"command\", " "type \"help command\".\n"); } /* Sort the commands */ for (numcoms = 0; cp_coms[numcoms].co_func != NULL; numcoms++) ccc[numcoms] = &cp_coms[numcoms]; qsort(ccc, (size_t) numcoms, sizeof(struct comm *), hcomp); for (i = 0; i < numcoms; i++) { if ((ccc[i]->co_spiceonly && ft_nutmeg) || (ccc[i]->co_help == NULL) || (!allflag && !ccc[i]->co_major)) continue; out_printf("%s ", ccc[i]->co_comname); out_printf(ccc[i]->co_help, cp_program); out_send("\n"); } } else { while (wl != NULL) { for (c = &cp_coms[0]; c->co_func != NULL; c++) if (eq(wl->wl_word, c->co_comname)) { out_printf("%s ", c->co_comname); out_printf(c->co_help, cp_program); if (c->co_spiceonly && ft_nutmeg) out_send(" (Not available in nutmeg)"); out_send("\n"); break; } if (c->co_func == NULL) { /* See if this is aliased. */ struct alias *al; for (al = cp_aliases; al; al = al->al_next) if (eq(al->al_name, wl->wl_word)) break; if (al == NULL) { fprintf(cp_out, "Sorry, no help for %s.\n", wl->wl_word); } else { out_printf("%s is aliased to ", wl->wl_word); /* Minor badness here... */ wl_print(al->al_text, cp_out); out_send("\n"); } } wl = wl->wl_next; } } out_send("\n"); } ngspice-26/src/frontend/parse-bison.y0000644000265600020320000001226712264261473017263 0ustar andreasadmin%{ /* * (compile (concat "bison " (file-relative-name buffer-file-name))) */ #include #include struct PPltype { const char *start, *stop; }; # define YYLTYPE struct PPltype # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) { \ (Current).start = YYRHSLOC(Rhs, 1).start; \ (Current).stop = YYRHSLOC(Rhs, N).stop; \ } else { \ (Current).start = (Current).stop = YYRHSLOC(Rhs, 0).stop; \ } \ while (0) #include "parse-bison.h" extern int PPlex (YYSTYPE *lvalp, struct PPltype *llocp, char **line); extern int PPdebug; static void PPerror (YYLTYPE *locp, char **line, struct pnode **retval, char const *); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif %} %name-prefix="PP" %output="parse-bison.c" %defines %locations %debug %pure-parser %parse-param {char **line} %lex-param {char **line} %parse-param {struct pnode **retval} %union { double num; const char *str; struct pnode *pnode; } /* * This gramar has two expected shift/reduce conflicts * exp1 '-' exp2 can * o yield an exp, interpreting '-' as a binary operator * o yield a list of two expressions * exp1 and * unary '-' exp2 * the first interpretation is favoured. (bison defaults to 'shift') * TOK_STR '(' exp1 ')' can * o yield an exp, per function application * o yield a list of two expressions * TOK_STR and * '(' exp1 ')' which will be reduced to exp1 * the first interpretation is favoured. (bison defaults to 'shift') * * to verify: * execute bison --report=state * * the %expect 2 * manifests my expectation, and will issue a `warning' when not met */ %expect 2 %token TOK_NUM %token TOK_STR %token TOK_LE TOK_GE TOK_NE TOK_LRANGE TOK_RRANGE %type exp exp_list one_exp /* Operator Precedence */ %right '?' ':' %left '|' %left '&' %left '=' TOK_NE TOK_LE '<' TOK_GE '>' %left '~' %right ',' %left '-' '+' %left '*' '/' '%' %left NEG /* negation--unary minus */ %right '^' /* exponentiation */ %left '[' ']' %left TOK_LRANGE TOK_RRANGE %initial-action /* initialize yylval */ { $$.num = 0.0; yylloc.start = yylloc.stop = NULL; }; %% /* */ expression: { *retval = NULL; } | exp_list { *retval = $1; } ; exp_list: one_exp | one_exp exp_list { $1->pn_next = $2; $2->pn_use ++; $$ = $1; } ; one_exp: exp { $1->pn_name = copy_substring(@1.start, @1.stop); $$ = $1; } ; exp: TOK_NUM { $$ = mknnode($1); } | TOK_STR { $$ = mksnode($1); txfree((void*)$1); } | exp ',' exp { $$ = mkbnode(PT_OP_COMMA, $1, $3); } | exp '+' exp { $$ = mkbnode(PT_OP_PLUS, $1, $3); } | exp '-' exp { $$ = mkbnode(PT_OP_MINUS, $1, $3); } | exp '*' exp { $$ = mkbnode(PT_OP_TIMES, $1, $3); } | exp '%' exp { $$ = mkbnode(PT_OP_MOD, $1, $3); } | exp '/' exp { $$ = mkbnode(PT_OP_DIVIDE, $1, $3); } | exp '^' exp { $$ = mkbnode(PT_OP_POWER, $1, $3); } | '(' exp ')' { $$ = $2; } | '-' exp %prec NEG { $$ = mkunode(PT_OP_UMINUS, $2); } | '~' exp { $$ = mkunode(PT_OP_NOT, $2); } | TOK_STR '(' exp ')' { $$ = mkfnode($1, $3); txfree((void*)$1); if(!$$) YYABORT; } | exp '=' exp { $$ = mkbnode(PT_OP_EQ, $1, $3); } | exp TOK_NE exp { $$ = mkbnode(PT_OP_NE, $1, $3); } | exp '>' exp { $$ = mkbnode(PT_OP_GT, $1, $3); } | exp '<' exp { $$ = mkbnode(PT_OP_LT, $1, $3); } | exp TOK_GE exp { $$ = mkbnode(PT_OP_GE, $1, $3); } | exp TOK_LE exp { $$ = mkbnode(PT_OP_LE, $1, $3); } | exp '&' exp { $$ = mkbnode(PT_OP_AND, $1, $3); } | exp '|' exp { $$ = mkbnode(PT_OP_OR, $1, $3); } | exp '[' exp ']' { $$ = mkbnode(PT_OP_INDX, $1, $3); } | exp TOK_LRANGE exp TOK_RRANGE { $$ = mkbnode(PT_OP_RANGE, $1, $3); } | exp '?' exp ':' exp { $$ = mkbnode(PT_OP_TERNARY,$1, mkbnode(PT_OP_COMMA,$3,$5)); } ; %% /* Called by yyparse on error. */ static void PPerror (YYLTYPE *locp, char **line, struct pnode **retval, char const *s) { NG_IGNORE(locp); NG_IGNORE(line); NG_IGNORE(retval); fprintf (stderr, "%s: %s\n", __func__, s); } ngspice-26/src/frontend/mw_coms.c0000644000265600020320000000676612264261473016466 0ustar andreasadmin/* Michael Widlok 2 Jun 1999 */ /* New commands for unloading circuits */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/ftedev.h" #include "ngspice/ftedebug.h" #include "ngspice/dvec.h" #include "circuits.h" #include "mw_coms.h" #include "variable.h" #include "runcoms.h" #include "spiceif.h" /* Clears ckt and removes current circ. form database */ void com_removecirc(wordlist *wl) { struct variable *v, *next; struct circ *ct; struct circ *caux = NULL; struct plot *p; struct plot *paux; int auxCir = 1, i, auxPlot; char* namecircuit; char buf[80]; NG_IGNORE(wl); if (!ft_curckt) { fprintf(cp_err, "Error: there is no circuit loaded.\n"); return; } ct = ft_curckt; if_cktfree(ct->ci_ckt, ct->ci_symtab); for (v = ct->ci_vars; v; v = next) { next = v->va_next; tfree(v); } /* PN FTESTATS*/ tfree(ct->FTEstats); ct->ci_vars = NULL; caux = ft_circuits; namecircuit = strdup(ft_curckt->ci_name); /* The circuit being removed is the first loaded and you have more circuits */ if (ft_curckt == ft_circuits && ft_circuits->ci_next) ft_circuits = ft_circuits->ci_next; /* The circuit being removed id the first loaded and there are no more circuits */ else if (ft_circuits->ci_next == NULL) ft_circuits = NULL; else { /* Run over the circuit list to find how many of them are * in front of the one to be removed */ for (; ft_curckt != caux && caux; caux = caux->ci_next) auxCir++; caux = ft_circuits; /* Remove the circuit and move pointer to the next one */ for (i = 1; i < auxCir-1; i++) caux = caux->ci_next; caux->ci_next = caux->ci_next->ci_next; /* ft_curckt = ft_circuits; */ } /* If the plot is the first one and there are no other plots */ if (!plot_list->pl_next && strcmp(plot_list->pl_title, namecircuit) == 0) plot_list = NULL; else if (plot_list && plot_list->pl_next) { p = plot_list; while (p) { auxPlot = 1; /* If the plot is in the first position */ if (plot_list->pl_next && strcmp(plot_list->pl_title, namecircuit) == 0) plot_list = plot_list->pl_next; /* otherwise we run over the list of plots */ else { for (; strcmp(p->pl_title, namecircuit) != 0 && p->pl_next; p = p->pl_next) auxPlot++; if (strcmp(p->pl_title, namecircuit) == 0) { paux = plot_list; for (i = 1; i < auxPlot-1; i++) paux = paux->pl_next; paux->pl_next = paux->pl_next->pl_next; } } p = p->pl_next; } } /* if (ft_curckt) { ft_curckt->ci_devices = cp_kwswitch(CT_DEVNAMES, ft_circuits->ci_devices); ft_curckt->ci_nodes = cp_kwswitch(CT_NODENAMES, ft_circuits->ci_nodes); } */ if (ft_circuits && caux->ci_next) { struct wordlist *wlist; sprintf(buf, "%d", auxCir); wlist = wl_cons(copy(buf), NULL); com_scirc(wlist); wl_free(wlist); } else if (ft_circuits) { struct wordlist *wlist; sprintf(buf, "%d", auxCir-1); wlist = wl_cons(copy(buf), NULL); com_scirc(wlist); wl_free(wlist); } else ft_curckt = NULL; } ngspice-26/src/frontend/wdisp/0000755000265600020320000000000012264261704015762 5ustar andreasadminngspice-26/src/frontend/wdisp/windisp.h0000644000265600020320000000221612264261473017614 0ustar andreasadmin/************* * Header file for windisp.c ************/ #ifndef ngspice_WINDISP_H #define ngspice_WINDISP_H disp_fn_Init_t WIN_Init; disp_fn_NewViewport_t WIN_NewViewport; disp_fn_Close_t WIN_Close; disp_fn_Clear_t WIN_Clear; disp_fn_DrawLine_t WIN_DrawLine; disp_fn_Arc_t WIN_Arc; disp_fn_Text_t WIN_Text; disp_fn_DefineColor_t WIN_DefineColor; disp_fn_DefineLinestyle_t WIN_DefineLinestyle; disp_fn_SetLinestyle_t WIN_SetLinestyle; disp_fn_SetColor_t WIN_SetColor; disp_fn_Update_t WIN_Update; disp_fn_Init_t WPRINT_Init; disp_fn_NewViewport_t WPRINT_NewViewport; disp_fn_Close_t WPRINT_Close; disp_fn_Clear_t WPRINT_Clear; disp_fn_DrawLine_t WPRINT_DrawLine; disp_fn_Arc_t WPRINT_Arc; disp_fn_Text_t WPRINT_Text; disp_fn_DefineColor_t WPRINT_DefineColor; disp_fn_DefineLinestyle_t WPRINT_DefineLinestyle; disp_fn_SetLinestyle_t WPRINT_SetLinestyle; disp_fn_SetColor_t WPRINT_SetColor; disp_fn_Update_t WPRINT_Update; //extern int WIN_DiagramReady(); #endif ngspice-26/src/frontend/wdisp/winprint.c0000644000265600020320000002557612264261473020022 0ustar andreasadmin/* * Printing Routines for the IBM PC using MS Windows * Wolfgang Muees 27.10.97 * Holger Vogt 07.12.01 */ #include "ngspice/ngspice.h" #ifdef HAS_WINGUI #include "ngspice/graph.h" #include "ngspice/ftedev.h" #include "ngspice/ftedbgra.h" #include "ngspice/fteext.h" /* * The ngspice.h file included above defines BOOLEAN (via bool.h) and this * clashes with the definition obtained from windows.h (via winnt.h). * However, BOOLEAN is not used by this file so we can work round this problem * by undefining BOOLEAN before including windows.h * SJB - May 2005 */ #undef BOOLEAN #define STRICT #include #include #include "ngspice/suffix.h" #ifdef _MSC_VER #pragma hdrstop #endif /* _MSC_VER */ #include "winprint.h" /* function prototypes */ /* Typen */ typedef struct { /* Extra Printdaten */ int ColorIndex; /* Index auf die akt. Farbe */ int LineIndex; /* Index auf den akt. Linientyp */ } tPrintData; typedef tPrintData * tpPrintData; /* Zeiger darauf */ #define pPrintData(g) ((tpPrintData)(g->devdep)) /* externals */ void WaitForIdle(void); /* Warte, bis keine Events da */ /* lokale Variablen */ static HFONT PlotFont = NULL; /* Font-Merker */ static HFONT OldFont = NULL; #define NumLines 7 /* Anzahl der LineStyles */ static int LineTable[NumLines]; /* Speicher fuer die LineStyles */ static HDC PrinterDC = NULL; /* Device Context */ #define NumPrintColors 2 /* vordef. Farben */ static COLORREF ColorTable[NumPrintColors];/* Speicher fuer die Farben */ static int PrinterWidth = 1000; /* Breite des Papiers */ static int PrinterHeight = 1000; /* Hoehe des Papiers */ /****************************************************************************** Drucker-Initialisierung ******************************************************************************/ void WPRINT_PrintInit(HWND hwnd) { /* Parameter-Block */ PRINTDLG pd; /* Initialisieren */ pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner = hwnd; pd.hDevMode = NULL; pd.hDevNames = NULL; pd.hDC = NULL; pd.Flags = PD_PRINTSETUP; pd.nFromPage = 1; pd.nToPage = 1; pd.nMinPage = 0; pd.nMaxPage = 0; pd.nCopies = 1; pd.hInstance = NULL; pd.lCustData = 0; pd.lpfnPrintHook = NULL; pd.lpfnSetupHook = NULL; pd.lpPrintTemplateName = NULL; pd.lpSetupTemplateName = NULL; pd.hPrintTemplate = NULL; pd.hSetupTemplate = NULL; /* Default-Drucker initialisieren */ (void) PrintDlg( &pd); /* Speicher freigeben */ if( pd.hDevMode) GlobalFree( pd.hDevMode); if( pd.hDevNames) GlobalFree( pd.hDevNames); } /* Abort-Procedur zum Drucken */ BOOL CALLBACK WPRINT_Abort( HDC hdc, int iError) { NG_IGNORE(hdc); NG_IGNORE(iError); /* Multitasking */ WaitForIdle(); /* Warten */ return TRUE; } /****************************************************************************** WPRINT_Init() stellt die Verbindung zur Grafik her. Dazu gehoert die Feststellung von dispdev->numlinestyles dispdev->numcolors dispdev->width dispdev->height WPRINT_Init() gibt 0 zurueck, falls kein Fehler auftrat. ******************************************************************************/ int WPRINT_Init(void) { int pWidth; int pHeight; /* Printer-DC holen */ if (!PrinterDC) { /* Parameter-Block */ PRINTDLG pd; /* Initialisieren */ pd.lStructSize = sizeof(PRINTDLG); pd.hwndOwner = NULL; pd.hDevMode = NULL; pd.hDevNames = NULL; pd.hDC = NULL; pd.Flags = PD_NOPAGENUMS | PD_NOSELECTION | PD_RETURNDC; pd.nFromPage = 1; pd.nToPage = 1; pd.nMinPage = 0; pd.nMaxPage = 0; pd.nCopies = 1; pd.hInstance = NULL; pd.lCustData = 0; pd.lpfnPrintHook = NULL; pd.lpfnSetupHook = NULL; pd.lpPrintTemplateName = NULL; pd.lpSetupTemplateName = NULL; pd.hPrintTemplate = NULL; pd.hSetupTemplate = NULL; /* Default-Drucker initialisieren */ (void) PrintDlg( &pd); /* Speicher freigeben */ if( pd.hDevMode) GlobalFree( pd.hDevMode); if( pd.hDevNames) GlobalFree( pd.hDevNames); /* DC holen */ PrinterDC = pd.hDC; if (!PrinterDC) return 1; /* Abmasze bestimmen */ PrinterWidth = GetDeviceCaps( PrinterDC, HORZRES); PrinterHeight = GetDeviceCaps( PrinterDC, VERTRES); pWidth = GetDeviceCaps( PrinterDC, HORZSIZE); pHeight = GetDeviceCaps( PrinterDC, VERTSIZE); /* Mapping Mode setzen (fuer Kreise) */ if ( pWidth > pHeight) /* Querformat */ PrinterWidth = (PrinterHeight * pWidth) / pHeight; else /* Hochformat */ PrinterHeight = (PrinterWidth * pHeight) / pWidth; SetMapMode( PrinterDC, MM_ISOTROPIC); SetWindowExtEx( PrinterDC, PrinterWidth, PrinterHeight, NULL); SetViewportExtEx( PrinterDC, PrinterWidth, PrinterHeight, NULL); /* nicht hoeher als breit zeichnen */ if (pWidth < pHeight) { /* Papier im Hochformat */ PrinterHeight = PrinterWidth; } /* Initialisierungen des Display-Descriptors */ dispdev->width = PrinterWidth; dispdev->height = PrinterHeight; dispdev->numlinestyles = NumLines; dispdev->numcolors = NumPrintColors; /* Farben initialisieren */ ColorTable[0] = RGB(255,255,255); /* Weisz */ ColorTable[1] = RGB( 0, 0, 0); /* Schwarz */ /* LineStyles initialisieren */ LineTable[0] = PS_SOLID; LineTable[1] = PS_DOT; /* Gitter */ LineTable[2] = PS_SOLID; /* Erste Linie */ LineTable[3] = PS_DOT; /* Zweite Linie */ LineTable[4] = PS_DASH; /* usw */ LineTable[5] = PS_DASHDOT; LineTable[6] = PS_DASHDOTDOT; /* Font */ if (!PlotFont) { PlotFont = CreateFont( 0,0,0,0, FW_DONTCARE, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, PROOF_QUALITY, FIXED_PITCH, NULL); } /* Abort-Prozedur setzen */ SetAbortProc( PrinterDC, WPRINT_Abort); } /* fertig */ return (0); } /****************************************************************************** WPRINT_NewViewport() oeffnet den Drucker WPRINT_NewViewport() gibt 0 zurueck, falls erfolgreich ******************************************************************************/ int WPRINT_NewViewport( GRAPH * graph) { TEXTMETRIC tm; tpPrintData pd; DOCINFO di; /* Parameter testen */ if (!graph) return 1; /* Initialisiere, falls noch nicht geschehen */ if (WPRINT_Init() != 0) { externalerror("Can't initialize Printer."); return(1); } /* Device dep. Info allocieren */ pd = calloc(1, sizeof(tPrintData)); if (!pd) return 1; graph->devdep = pd; /* Setze den Color-Index */ pd->ColorIndex = 0; /* Font setzen */ OldFont = SelectObject( PrinterDC, PlotFont); /* Font-Parameter abfragen */ if (GetTextMetrics( PrinterDC, &tm)) { graph->fontheight = tm.tmHeight; graph->fontwidth = tm.tmAveCharWidth; } /* Setze den Linien-Index */ pd->LineIndex = 0; /* Viewport-Parameter setzen */ graph->viewport.height = PrinterHeight; graph->viewport.width = PrinterWidth; /* Absolut-Parameter setzen */ graph->absolute.xpos = 0; graph->absolute.ypos = 0; graph->absolute.width = PrinterWidth; graph->absolute.height = PrinterHeight; /* Druckauftrag anmelden */ di.cbSize = sizeof( DOCINFO); di.lpszDocName = graph->plotname; di.lpszOutput = NULL; if (StartDoc( PrinterDC, &di) <= 0) return 1; if (StartPage( PrinterDC) <= 0) return 1; /* titel drucken */ if (graph->plotname) { UINT align; align = GetTextAlign( PrinterDC); SetTextAlign( PrinterDC, TA_RIGHT | TA_TOP | TA_NOUPDATECP); TextOut( PrinterDC, PrinterWidth-graph->fontwidth, 1, graph->plotname, (int)strlen(graph->plotname)); SetTextAlign( PrinterDC, align); } /* fertig */ return(0); } int WPRINT_Close(void) { if (PrinterDC) { EndPage( PrinterDC); EndDoc( PrinterDC); if (OldFont) { SelectObject( PrinterDC, OldFont); OldFont = NULL; } DeleteObject( PlotFont); DeleteDC( PrinterDC); PrinterDC = NULL; } return (0); } int WPRINT_Clear(void) { return 0; } int WPRINT_DrawLine(int x1, int y1, int x2, int y2) { tpPrintData pd; HPEN OldPen; HPEN NewPen; int ColIndex; if (!currentgraph) return 0; pd = pPrintData(currentgraph); if (!pd) return 0; /* Farben/Dicke */ ColIndex = pd->ColorIndex; if (ColIndex > 1) ColIndex = 1; MoveToEx(PrinterDC, x1, PrinterHeight - y1, NULL); NewPen = CreatePen( LineTable[pd->LineIndex], 0, ColorTable[ColIndex] ); OldPen = SelectObject(PrinterDC, NewPen); LineTo(PrinterDC, x2, PrinterHeight - y2); OldPen = SelectObject(PrinterDC, OldPen); DeleteObject( NewPen); return (0); } int WPRINT_Arc(int x0, int y0, int radius, double theta, double delta_theta) /* * Notes: * Draws an arc of and center at (x0,y0) beginning at * angle theta (in rad) and ending at theta + delta_theta */ { tpPrintData pd; HPEN OldPen; HPEN NewPen; int left, right, top, bottom; int xs, ys, xe, ye; int yb; int direction; int ColIndex; double r; double dx0; double dy0; if (!currentgraph) return 0; pd = pPrintData(currentgraph); if (!pd) return 0; ColIndex = pd->ColorIndex; if (ColIndex > 1) ColIndex = 1; direction = AD_COUNTERCLOCKWISE; if (delta_theta < 0) { theta = theta + delta_theta; delta_theta = - delta_theta; direction = AD_CLOCKWISE; } SetArcDirection( PrinterDC, direction); /* Geometrische Vorueberlegungen */ yb = PrinterHeight; left = x0 - radius; right = x0 + radius; top = y0 + radius; bottom = y0 - radius; r = radius; dx0 = x0; dy0 = y0; xs = (int)(dx0 + (r * cos(theta))); ys = (int)(dy0 + (r * sin(theta))); xe = (int)(dx0 + (r * cos(theta + delta_theta))); ye = (int)(dy0 + (r * sin(theta + delta_theta))); /* Zeichnen */ NewPen = CreatePen( LineTable[pd->LineIndex], 0, ColorTable[ColIndex] ); OldPen = SelectObject(PrinterDC, NewPen); Arc( PrinterDC, left, yb-top, right, yb-bottom, xs, yb-ys, xe, yb-ye); OldPen = SelectObject(PrinterDC, OldPen); DeleteObject( NewPen); return 0; } int WPRINT_Text( char * text, int x, int y, int degrees) { tpPrintData pd; int ColIndex; NG_IGNORE(degrees); if (!currentgraph) return 0; pd = pPrintData(currentgraph); if (!pd) return 0; ColIndex = pd->ColorIndex; if (ColIndex > 1) { ColIndex = 1; } SetTextColor( PrinterDC, ColorTable[ColIndex]); TextOut( PrinterDC, x, PrinterHeight - y - currentgraph->fontheight, text, (int) strlen(text)); return (0); } int WPRINT_DefineColor(int colorid, double red, double green, double blue) { /* nix */ NG_IGNORE(colorid); NG_IGNORE(red); NG_IGNORE(green); NG_IGNORE(blue); return (0); } int WPRINT_DefineLinestyle(int num, int mask) { /* nix */ NG_IGNORE(num); NG_IGNORE(mask); return (0); } int WPRINT_SetLinestyle(int style) { tpPrintData pd; if (!currentgraph) return 0; pd = pPrintData(currentgraph); if (!pd) return 0; pd->LineIndex = style % NumLines; return (0); } int WPRINT_SetColor( int color) { tpPrintData pd; if (!currentgraph) return 0; pd = pPrintData(currentgraph); if (!pd) return 0; pd->ColorIndex = color; return (0); } int WPRINT_Update(void) { return (0); } int WPRINT_DiagramReady(void) { return 0; } #endif /* HAS_WINGUI */ ngspice-26/src/frontend/wdisp/windisp.c0000644000265600020320000006665512264261473017630 0ustar andreasadmin/* * Frame buffer for the PC using MS Windows * Wolfgang Muees 27.10.97 * Holger Vogt 07.12.01 * Holger Vogt 05.12.07 */ #include "ngspice/ngspice.h" #ifdef HAS_WINGUI #include "ngspice/graph.h" #include "ngspice/ftedev.h" #include "ngspice/ftedbgra.h" #include "ngspice/fteext.h" #include "../plotting/graf.h" #include "../plotting/graphdb.h" #include "windisp.h" /* * The ngspice.h file included above defines BOOLEAN (via bool.h) and this * clashes with the definition obtained from windows.h (via winnt.h). * However, BOOLEAN is not used by this file so we can work round this problem * by undefining BOOLEAN before including windows.h * SJB - May 2005 */ #undef BOOLEAN #define STRICT #include #include #include "ngspice/suffix.h" /* Typen */ typedef struct { /* Extra window data */ HWND wnd; /* window */ HDC hDC; /* Device context of window */ RECT Area; /* plot area */ int ColorIndex; /* Index of actual color */ int PaintFlag; /* 1 with WM_PAINT */ int FirstFlag; /* 1 before first update */ } tWindowData; typedef tWindowData * tpWindowData; /* pointer to it */ #define pWindowData(g) ((tpWindowData)(g->devdep)) /* forwards */ LRESULT CALLBACK PlotWindowProc( HWND hwnd, /* window procedure */ UINT uMsg, WPARAM wParam, LPARAM lParam); void WPRINT_PrintInit( HWND hwnd); /* Windows printer init */ void WaitForIdle(void); /* wait until no more events */ static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy); static LRESULT HcpyPlot( HWND hwnd); static LRESULT HcpyPlotBW( HWND hwnd); static LRESULT PrintPlot( HWND hwnd); static LRESULT PrintInit( HWND hwnd); //static void RealClose(void); /* externals */ extern HINSTANCE hInst; /* application instance */ extern int WinLineWidth; /* width of text window */ extern HWND swString; /* string input window of main window */ //extern struct plot *plot_cur; extern int DevSwitch(char *devname); extern int NewViewport(GRAPH *pgraph); extern void com_hardcopy(wordlist *wl); /* defines */ #define RAD_TO_DEG (180.0 / M_PI) #ifndef M_LN10 #define M_LN10 2.30258509299404568402 #endif #define DEF_FONTW "Courier" /* local variables */ static int IsRegistered = 0; /* 1 if window class is registered */ #define NumWinColors 23 /* predefined colors */ static COLORREF ColorTable[NumWinColors]; /* color memory */ static char * WindowName = "Spice Plot"; /* window name */ static WNDCLASS TheWndClass; /* Plot-window class */ static HFONT PlotFont; /* which font */ #define ID_DRUCKEN 0xEFF0 /* System Menue: print */ #define ID_DRUCKEINR 0xEFE0 /* System Menue: printer setup */ #define ID_HARDCOPY 0xEFD0 /* System Menue: hardcopy color*/ #define ID_HARDCOPY_BW 0xEFB0 /* System Menue: hardcopy b&w*/ #define ID_MASK 0xFFF0; /* System-Menue: mask */ static char * STR_DRUCKEN = "Printer..."; /* System menue strings */ static char * STR_DRUCKEINR = "Printer setup..."; static char * STR_HARDCOPY = "Postscript file, color"; static char * STR_HARDCOPY_BW = "Postscript file, b&w"; static bool isblack = TRUE; /* background color of plot is black */ static bool isblackold = TRUE; static int linewidth = 0; /* linewidth of grid and plot */ /****************************************************************************** WIN_Init() makes connection to graphics. We have to determine dispdev->numlinestyles (if color screen == 1) dispdev->numcolors dispdev->width (preliminary window width) dispdev->height (preliminary window height) WIN_Init() returns 0, if no error ocurred. WIN_Init() does not yet open a window, this happens only in WIN_NewViewport() ******************************************************************************/ int WIN_Init(void) { char colorstring[BSIZE_SP]; /* Initialization of display descriptor */ dispdev->width = GetSystemMetrics( SM_CXSCREEN); dispdev->height = GetSystemMetrics( SM_CYSCREEN); dispdev->numlinestyles = 5; /* see implications in WinPrint! */ dispdev->numcolors = NumWinColors; /* always, user may have set color0 to white */ /* get background color information from spinit, only "white" is recognized as a suitable option! */ if (cp_getvar("color0", CP_STRING, colorstring)) { if (cieq(colorstring, "white")) isblack = FALSE; else isblack = TRUE; } /* get linewidth information from spinit */ if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth)) linewidth = 0; if (linewidth < 0) linewidth = 0; /* only for the first time: */ if (!IsRegistered) { isblackold = isblack; /* get linewidth information from spinit if (!cp_getvar("xbrushwidth", CP_NUM, &linewidth)) linewidth = 0; if (linewidth < 0) linewidth = 0; */ /* Initialize colors */ if (isblack) { ColorTable[0] = RGB( 0, 0, 0); /* black = background */ ColorTable[1] = RGB(255,255,255); /* white = text and grid */ } else { ColorTable[0] = RGB(255,255,255); /* white = background */ ColorTable[1] = RGB( 0, 0, 0); /* black = text and grid */ } ColorTable[2] = RGB( 0,255, 0); /* green = first line */ ColorTable[3] = RGB(255, 0, 0); /* red */ ColorTable[4] = RGB( 0, 0,255); /* blue */ ColorTable[5] = RGB(255,255, 0); /* yellow */ ColorTable[6] = RGB(255, 0,255); /* violett */ ColorTable[7] = RGB( 0,255,255); /* azur */ ColorTable[8] = RGB(255,128, 0); /* orange */ ColorTable[9] = RGB(128, 64, 0); /* brown */ ColorTable[10]= RGB(128, 0,255); /* light violett */ ColorTable[11]= RGB(255,128,128); /* pink */ /* 2. color bank (with different line style */ if (isblack) ColorTable[12]= RGB(255,255,255); /* white */ else ColorTable[12]= RGB( 0, 0, 0); /* black */ ColorTable[13]= RGB( 0,255, 0); /* green */ ColorTable[14]= RGB(255, 0, 0); /* red */ ColorTable[15]= RGB( 0, 0,255); /* blue */ ColorTable[16]= RGB(255,255, 0); /* yellow */ ColorTable[17]= RGB(255, 0,255); /* violett */ ColorTable[18]= RGB( 0,255,255); /* azur */ ColorTable[19]= RGB(255,128, 0); /* orange */ ColorTable[20]= RGB(128, 64, 0); /* brown */ ColorTable[21]= RGB(128, 0,255); /* light violett */ ColorTable[22]= RGB(255,128,128); /* pink */ /* Ansii fixed font */ PlotFont = GetStockFont( ANSI_FIXED_FONT); /* register window class */ TheWndClass.lpszClassName = WindowName; TheWndClass.hInstance = hInst; TheWndClass.lpfnWndProc = PlotWindowProc; TheWndClass.style = CS_OWNDC | CS_HREDRAW | CS_VREDRAW; TheWndClass.lpszMenuName = NULL; TheWndClass.hCursor = LoadCursor(NULL, IDC_ARROW); if (isblack) TheWndClass.hbrBackground = GetStockObject( BLACK_BRUSH); else TheWndClass.hbrBackground = GetStockObject( WHITE_BRUSH); TheWndClass.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(2)); TheWndClass.cbClsExtra = 0; TheWndClass.cbWndExtra = sizeof(GRAPH *); if (!RegisterClass(&TheWndClass)) return 1; } /* not first time */ else if (isblackold != isblack) { if (isblack) { ColorTable[0] = RGB( 0, 0, 0); /* black = background */ ColorTable[1] = RGB(255,255,255); /* white = text and grid */ } else { ColorTable[0] = RGB(255,255,255); /* white = background */ ColorTable[1] = RGB( 0, 0, 0); /* black = text and grid */ } if (isblack) ColorTable[12]= RGB(255,255,255); /* white */ else ColorTable[12]= RGB( 0, 0, 0); /* black */ isblackold=isblack; } IsRegistered = 1; /* ready */ return (0); } /* get pointer to graph */ /* (attach to window) */ static GRAPH * pGraph( HWND hwnd) { return (GRAPH *) GetWindowLongPtr( hwnd, 0); } /* return line style for plotting */ static int LType( int ColorIndex) { if (ColorIndex >= 12) return PS_DOT; else return PS_SOLID; } /* postscript hardcopy from a plot window */ /* called by SystemMenue / Postscript hardcopy */ static LRESULT HcpyPlot( HWND hwnd) { int colorval = isblack? 0 : 1; NG_IGNORE(hwnd); cp_vset("hcopypscolor", CP_NUM, &colorval); com_hardcopy(NULL); return 0; } static LRESULT HcpyPlotBW( HWND hwnd) { int bgcolor; NG_IGNORE(hwnd); if (cp_getvar("hcopypscolor", CP_NUM, &bgcolor)) cp_remvar("hcopypscolor"); com_hardcopy(NULL); return 0; } /* print a plot window */ /* called by SystemMenue / Print */ static LRESULT PrintPlot( HWND hwnd) { GRAPH * graph; GRAPH * temp; /* get pointer to graph */ graph = pGraph( hwnd); if (!graph) return 0; /* switch to printer */ /* (results in WPRINT_Init()) */ if (DevSwitch("WinPrint")) return 0; /* Cursor = wait */ SetCursor( LoadCursor( NULL, IDC_WAIT)); /* copy graph */ temp = CopyGraph(graph); if (!temp) goto PrintEND; /* add to the copy the new printer data */ if (NewViewport(temp)) goto PrintEND2; /* make correction to placement of grid (copy from gr_init) */ temp->viewportxoff = temp->fontwidth * 8; temp->viewportyoff = temp->fontheight * 4; /* print the graph */ gr_resize(temp); PrintEND2: /* delete temporary graph */ DestroyGraph(temp->graphid); PrintEND: /* switch back to screen */ DevSwitch(NULL); /* Cursor = normal */ SetCursor( LoadCursor( NULL, IDC_ARROW)); return 0; } /* initialze printer */ static LRESULT PrintInit( HWND hwnd) { /* hand over to printer module */ WPRINT_PrintInit(hwnd); return 0; } /* window procedure */ LRESULT CALLBACK PlotWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { static int x0,y0,xep,yep; int xe, ye, prevmix; static double fx0,fy0; double fxe, fye; double angle; char buf[BSIZE_SP]; char buf2[128]; char *t; HDC hdc; HPEN OldPen; HPEN NewPen; switch (uMsg) { case WM_SYSCOMMAND: { /* test command */ WPARAM cmd = wParam & ID_MASK; switch(cmd) { case ID_DRUCKEN: return PrintPlot( hwnd); case ID_DRUCKEINR: return PrintInit( hwnd); case ID_HARDCOPY: return HcpyPlot( hwnd); case ID_HARDCOPY_BW: return HcpyPlotBW( hwnd); } } goto WIN_DEFAULT; case WM_LBUTTONDOWN: { GRAPH * gr = pGraph( hwnd); xep = x0 = LOWORD (lParam); yep = y0 = HIWORD (lParam); /* generate x,y data from grid coordinates */ WIN_ScreentoData(gr, x0, y0, &fx0, &fy0); } goto WIN_DEFAULT; case WM_MOUSEMOVE: /* left mouse button: connect coordinate pair by dashed pair of x, y lines */ if (wParam & MK_LBUTTON) { hdc = GetDC (hwnd) ; if (isblack) prevmix = SetROP2(hdc, R2_XORPEN); else prevmix = SetROP2(hdc, R2_NOTXORPEN); /* Create white dashed pen */ NewPen = CreatePen( LType(12), 0, ColorTable[1] ); OldPen = SelectObject(hdc, NewPen); /* draw lines with previous coodinates -> delete old line because of XOR */ MoveToEx (hdc, x0, y0, NULL) ; LineTo (hdc, x0, yep) ; LineTo (hdc, xep, yep); /* get new end point */ xe = LOWORD (lParam); ye = HIWORD (lParam); /* draw new lines */ MoveToEx (hdc, x0, y0, NULL) ; LineTo (hdc, x0, ye) ; LineTo (hdc, xe, ye); /* restore standard color mix */ SetROP2(hdc, prevmix); OldPen = SelectObject(hdc, OldPen); DeleteObject( NewPen); ReleaseDC (hwnd, hdc) ; /* restore new to previous coordinates */ yep = ye; xep = xe; } /* right mouse button: create white (black) dashed box */ else if (wParam & MK_RBUTTON){ hdc = GetDC (hwnd) ; if (isblack) prevmix = SetROP2(hdc, R2_XORPEN); else prevmix = SetROP2(hdc, R2_NOTXORPEN); /* Create white (black) dashed pen */ NewPen = CreatePen( LType(12), 0, ColorTable[1] ); OldPen = SelectObject(hdc, NewPen); /* draw box with previous coodinates -> delete old lines because of XOR */ MoveToEx (hdc, x0, y0, NULL) ; LineTo (hdc, x0, yep) ; LineTo (hdc, xep, yep); LineTo (hdc, xep, y0) ; LineTo (hdc, x0, y0); /* get new end point */ xe = LOWORD (lParam); ye = HIWORD (lParam); /* draw new box */ MoveToEx (hdc, x0, y0, NULL) ; LineTo (hdc, x0, ye) ; LineTo (hdc, xe, ye); LineTo (hdc, xe, y0) ; LineTo (hdc, x0, y0); /* restore standard color mix */ SetROP2(hdc, prevmix); OldPen = SelectObject(hdc, OldPen); DeleteObject( NewPen); ReleaseDC (hwnd, hdc) ; /* restore new to previous coordinates */ yep = ye; xep = xe; } goto WIN_DEFAULT; /* get final coordinates upon left mouse up */ /* calculate and print out the data */ case WM_LBUTTONUP: { GRAPH * gr = pGraph( hwnd); InvalidateRect (hwnd, NULL, TRUE) ; xe = LOWORD (lParam); ye = HIWORD (lParam); WIN_ScreentoData(gr, xe, ye, &fxe, &fye); /* print it out */ if (xe == x0 && ye == y0) { /* only one location */ fprintf(stdout, "\nx0 = %g, y0 = %g\n", fx0, fy0); if (gr->grid.gridtype == GRID_POLAR || gr->grid.gridtype == GRID_SMITH || gr->grid.gridtype == GRID_SMITHGRID) { angle = RAD_TO_DEG * atan2( fy0, fx0 ); fprintf(stdout, "r0 = %g, a0 = %g\n", sqrt( fx0*fx0 + fy0*fy0 ), (angle>0)?angle:360.0+angle); } } else { /* need to print info about two points */ fprintf(stdout, "\nx0 = %g, y0 = %g x1 = %g, y1 = %g\n", fx0, fy0, fxe, fye); fprintf(stdout, "dx = %g, dy = %g\n", fxe-fx0, fye - fy0); if (xe != x0 && ye != y0) { /* add slope info if both dx and dy are zero, */ /* because otherwise either dy/dx or dx/dy is zero, */ /* which is uninteresting */ fprintf(stdout, "dy/dx = %g dx/dy = %g\n", (fye-fy0)/(fxe-fx0), (fxe-fx0)/(fye-fy0)); } } SetFocus( swString); } goto WIN_DEFAULT; /* get starting coordinates upon right mouse button down */ case WM_RBUTTONDOWN: { GRAPH * gr = pGraph( hwnd); x0 = xep = LOWORD (lParam); y0 = yep = HIWORD (lParam); WIN_ScreentoData(gr, x0, y0, &fx0, &fy0); } goto WIN_DEFAULT; /* get final coordinates upon right mouse button up */ /* copy xlimit, ylimit command into buf */ /* start plot loop with argument buf */ case WM_RBUTTONUP: { GRAPH * gr = pGraph( hwnd); InvalidateRect (hwnd, NULL, TRUE) ; xe = LOWORD (lParam); ye = HIWORD (lParam); /* do nothing if mouse curser is not moved in both x and y */ if ((xe == x0) || (ye == y0)) { SetFocus( swString); goto WIN_DEFAULT; } WIN_ScreentoData(gr, xe, ye, &fxe, &fye); strncpy(buf2, gr->plotname, sizeof(buf2)); if ((t = strchr(buf2, ':')) != NULL) *t = 0; if (!eq(plot_cur->pl_typename, buf2)) { (void) sprintf(buf, // "setplot %s; %s xlimit %e %e ylimit %e %e; setplot $curplot\n", "setplot %s; %s xlimit %e %e ylimit %e %e\n", buf2, gr->commandline, fx0, fxe, fy0, fye); } else { (void) sprintf(buf, "%s xlimit %e %e ylimit %e %e\n", gr->commandline, fx0, fxe, fy0, fye); } (void) cp_evloop(buf); SetFocus( swString); } goto WIN_DEFAULT; case WM_CLOSE: /* close window */ { GRAPH * g = pGraph( hwnd); if (g) { /* if g equals currentgraph, reset currentgraph. */ if (g == currentgraph) currentgraph = NULL; DestroyGraph(g->graphid); } } goto WIN_DEFAULT; case WM_PAINT: /* replot window (e.g. after Resize) */ { PAINTSTRUCT ps; GRAPH * g; tpWindowData wd; HDC saveDC; /* the DC from BeginPaint is different... */ HDC newDC; /* has to happen */ newDC = BeginPaint( hwnd, &ps); g = pGraph( hwnd); if (g) { wd = pWindowData(g); if (wd) { if (!wd->PaintFlag && !wd->FirstFlag) { /* avoid recursive call */ wd->PaintFlag = 1; /* get window sizes */ GetClientRect( hwnd, &(wd->Area)); g->absolute.width = wd->Area.right; g->absolute.height = wd->Area.bottom; /* switch DC */ saveDC = wd->hDC; wd->hDC = newDC; /* plot anew */ { GRAPH *tmp = currentgraph; currentgraph = g; gr_resize(g); currentgraph = tmp; } /* switch DC */ wd->hDC = saveDC; /* ready */ wd->PaintFlag = 0; } } } /* finish */ EndPaint( hwnd, &ps); } return 0; default: WIN_DEFAULT: return DefWindowProc( hwnd, uMsg, wParam, lParam); } } /****************************************************************************** WIN_NewViewport() creates a new window with a graph inside. WIN_NewViewport() returns 0 if successful ******************************************************************************/ int WIN_NewViewport( GRAPH * graph) { int i; HWND window; HDC dc; TEXTMETRIC tm; tpWindowData wd; HMENU sysmenu; /* test the parameters */ if (!graph) return 1; /* initialize if not yet done */ if (WIN_Init() != 0) { externalerror("Can't initialize GDI."); return(1); } /* allocate device dependency info */ wd = calloc(1, sizeof(tWindowData)); if (!wd) return 1; graph->devdep = wd; /* Create the window */ i = GetSystemMetrics( SM_CYSCREEN) / 3; window = CreateWindow( WindowName, graph->plotname, WS_OVERLAPPEDWINDOW, 0, 0, WinLineWidth, i * 2 - 22, NULL, NULL, hInst, NULL); if (!window) return 1; /* change the background color of all windows (both new and already plotted) by assessing the registered window class */ if (isblack) SetClassLongPtr(window, GCLP_HBRBACKGROUND, (LONG_PTR)GetStockObject(BLACK_BRUSH)); else SetClassLongPtr(window, GCLP_HBRBACKGROUND, (LONG_PTR)GetStockObject(WHITE_BRUSH)); wd->wnd = window; SetWindowLongPtr(window, 0, (LONG_PTR)graph); /* show window */ ShowWindow( window, SW_SHOWNORMAL); /* get the mask */ GetClientRect( window, &(wd->Area)); /* get the DC */ dc = GetDC( window); wd->hDC = dc; /* set the Color Index */ wd->ColorIndex = 0; /* still no flag */ wd->PaintFlag = 0; wd->FirstFlag = 1; /* modify system menue */ sysmenu = GetSystemMenu( window, FALSE); AppendMenu( sysmenu, MF_SEPARATOR, 0, NULL); AppendMenu( sysmenu, MF_STRING, ID_DRUCKEN, STR_DRUCKEN); AppendMenu( sysmenu, MF_STRING, ID_DRUCKEINR, STR_DRUCKEINR); AppendMenu( sysmenu, MF_STRING, ID_HARDCOPY, STR_HARDCOPY); AppendMenu( sysmenu, MF_STRING, ID_HARDCOPY_BW, STR_HARDCOPY_BW); /* set default parameters of DC */ SetBkColor( dc, ColorTable[0]); SetBkMode( dc, TRANSPARENT ); /* set font */ SelectObject( dc, PlotFont); /* query the font parameters */ if (GetTextMetrics( dc, &tm)) { graph->fontheight = tm.tmHeight; graph->fontwidth = tm.tmAveCharWidth; } /* set viewport parameters */ graph->viewport.height = wd->Area.bottom; graph->viewport.width = wd->Area.right; /* set absolute parameters */ graph->absolute.xpos = 0; graph->absolute.ypos = 0; graph->absolute.width = wd->Area.right; graph->absolute.height = wd->Area.bottom; /* wait until the window is really there */ WaitForIdle(); /* ready */ return(0); } /****************************************************************************** WIN_Close is essentially the counterpart to WIN_Init. unfortunately it might happen, that WIN_Close is called during plotting, because one wants to switch to the printer. Therefore WIN_Close is not allowed to do anything, cancelling of the structures occurs at program termination. ******************************************************************************/ int WIN_Close(void) { return (0); } /* static void RealClose(void) { // delete window class if (IsRegistered) { if (TheWndClass.hIcon) { DestroyIcon( TheWndClass.hIcon); TheWndClass.hIcon = NULL; } UnregisterClass( WindowName, hInst); IsRegistered = FALSE; } } */ int WIN_Clear(void) { tpWindowData wd; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; /* this is done by the window itself */ if (!wd->PaintFlag) /* not necessary with WM_PAINT */ SendMessage( wd->wnd, WM_ERASEBKGND, (WPARAM) wd->hDC, 0); return 0; } int WIN_DrawLine(int x1, int y1, int x2, int y2) { tpWindowData wd; HPEN OldPen; HPEN NewPen; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; MoveToEx(wd->hDC, x1, wd->Area.bottom - y1, NULL); NewPen = CreatePen( LType(wd->ColorIndex), linewidth, ColorTable[wd->ColorIndex] ); OldPen = SelectObject(wd->hDC, NewPen); LineTo(wd->hDC, x2, wd->Area.bottom - y2); OldPen = SelectObject(wd->hDC, OldPen); DeleteObject( NewPen); return (0); } int WIN_Arc(int x0, int y0, int radius, double theta, double delta_theta) /* * Notes: * Draws an arc of and center at (x0,y0) beginning at * angle theta (in rad) and ending at theta + delta_theta */ { tpWindowData wd; HPEN OldPen; HPEN NewPen; int left, right, top, bottom; int xs, ys, xe, ye; int yb; int direction; double r; double dx0; double dy0; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; direction = AD_COUNTERCLOCKWISE; if (delta_theta < 0) { theta = theta + delta_theta; delta_theta = - delta_theta; direction = AD_CLOCKWISE; } SetArcDirection( wd->hDC, direction); /* some geometric considerations in advance */ yb = wd->Area.bottom; left = x0 - radius; right = x0 + radius; top = y0 + radius; bottom = y0 - radius; r = radius; dx0 = x0; dy0 = y0; xs = (int)(dx0 + (r * cos(theta))); ys = (int)(dy0 + (r * sin(theta))); xe = (int)(dx0 + (r * cos(theta + delta_theta))); ye = (int)(dy0 + (r * sin(theta + delta_theta))); /* plot */ NewPen = CreatePen( LType(wd->ColorIndex), linewidth, ColorTable[wd->ColorIndex] ); OldPen = SelectObject(wd->hDC, NewPen); Arc( wd->hDC, left, yb-top, right, yb-bottom, xs, yb-ys, xe, yb-ye); OldPen = SelectObject(wd->hDC, OldPen); DeleteObject( NewPen); return 0; } /* int WIN_Text_old( char * text, int x, int y, int degrees) { tpWindowData wd; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; SetTextColor( wd->hDC, ColorTable[wd->ColorIndex]); TextOut( wd->hDC, x, wd->Area.bottom - y - currentgraph->fontheight, text, strlen(text)); return (0); } */ int WIN_Text( char * text, int x, int y) { tpWindowData wd; HFONT hfont; LOGFONT lf; int CentiDegrees = 0; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ; lf.lfWidth = 0 ; lf.lfEscapement = CentiDegrees ; lf.lfOrientation = CentiDegrees ; lf.lfWeight = 500 ; lf.lfItalic = 0 ; lf.lfUnderline = 0 ; lf.lfStrikeOut = 0 ; lf.lfCharSet = 0 ; lf.lfOutPrecision = 0 ; lf.lfClipPrecision = 0 ; lf.lfQuality = 0 ; lf.lfPitchAndFamily = 0 ; /* set up fonts */ if (!cp_getvar("wfont", CP_STRING, lf.lfFaceName)) { (void) lstrcpy(lf.lfFaceName, DEF_FONTW); } if (!cp_getvar("wfont_size", CP_NUM, &(lf.lfHeight))) { lf.lfHeight = (int) (1.1 * currentgraph->fontheight) ; } // lstrcpy (lf.lfFaceName, "Courier"/*"Times New Roman"*/) ; hfont = CreateFontIndirect (&lf); SelectObject(wd->hDC, hfont); SetTextColor( wd->hDC, ColorTable[wd->ColorIndex]); TextOut( wd->hDC, x, wd->Area.bottom - y - currentgraph->fontheight, text, (int)strlen(text)); DeleteObject(SelectObject(wd->hDC, GetStockObject(SYSTEM_FONT))); return (0); } int WIN_DefineColor(int colorid, double red, double green, double blue) { /* nothing */ NG_IGNORE(colorid); NG_IGNORE(red); NG_IGNORE(green); NG_IGNORE(blue); return (0); } int WIN_DefineLinestyle(int num, int mask) { /* nothing */ NG_IGNORE(num); NG_IGNORE(mask); return (0); } int WIN_SetLinestyle(int style) { /* nothing */ NG_IGNORE(style); return (0); } int WIN_SetColor( int color) { tpWindowData wd; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; wd->ColorIndex = color % NumWinColors; return (0); } int WIN_Update(void) { tpWindowData wd; if (!currentgraph) return 0; wd = pWindowData(currentgraph); if (!wd) return 0; /* After the first run of Update() */ /* FirstFlag again handles WM_PAINT messages. */ /* This prevents double painting during displaying the window. */ wd->FirstFlag = 0; return 0; } /* int WIN_DiagramReady(void) { return 0; } */ void RemoveWindow(GRAPH* dgraph) { tpWindowData wd; wd = pWindowData(dgraph); if (wd) SendMessage(wd->wnd, WM_CLOSE, (WPARAM) wd->hDC, 0); } /* Function borrowed from x11.c */ static void WIN_ScreentoData(GRAPH *graph, int x, int y, double *fx, double *fy) { double lmin, lmax; if (graph->grid.gridtype == GRID_XLOG || graph->grid.gridtype == GRID_LOGLOG) { lmin = log10(graph->datawindow.xmin); lmax = log10(graph->datawindow.xmax); *fx = exp(((x - graph->viewportxoff) * (lmax - lmin) / graph->viewport.width + lmin) * M_LN10); } else { *fx = (x - graph->viewportxoff) * graph->aspectratiox + graph->datawindow.xmin; } if (graph->grid.gridtype == GRID_YLOG || graph->grid.gridtype == GRID_LOGLOG) { lmin = log10(graph->datawindow.ymin); lmax = log10(graph->datawindow.ymax); *fy = exp(((graph->absolute.height - y - graph->viewportxoff) * (lmax - lmin) / graph->viewport.height + lmin) * M_LN10); } else { *fy = ((graph->absolute.height - y) - graph->viewportyoff) * graph->aspectratioy + graph->datawindow.ymin; } } #endif /* HAS_WINGUI */ ngspice-26/src/frontend/wdisp/Makefile.am0000644000265600020320000000052112264261473020017 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libwindisp.la libwindisp_la_SOURCES = \ windisp.c \ windisp.h \ winprint.c \ winprint.h \ ftegraf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend/wdisp AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/wdisp/ftegraf.h0000644000265600020320000000047312264261473017560 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * * Definitions common to the various graphics modules. */ #define G_NONE 0 #define G_HCOPY 1 #define G_TERM 2 #define G_MFB 3 #define G_X 4 ngspice-26/src/frontend/wdisp/Makefile.in0000644000265600020320000004007312264261534020034 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend/wdisp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libwindisp_la_LIBADD = am_libwindisp_la_OBJECTS = windisp.lo winprint.lo libwindisp_la_OBJECTS = $(am_libwindisp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libwindisp_la_SOURCES) DIST_SOURCES = $(libwindisp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend/wdisp AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libwindisp.la libwindisp_la_SOURCES = \ windisp.c \ windisp.h \ winprint.c \ winprint.h \ ftegraf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/wdisp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/wdisp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libwindisp.la: $(libwindisp_la_OBJECTS) $(libwindisp_la_DEPENDENCIES) $(EXTRA_libwindisp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libwindisp_la_OBJECTS) $(libwindisp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/windisp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/winprint.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/wdisp/winprint.h0000644000265600020320000000136212264261473020012 0ustar andreasadmin/************* * Header file for winprint.c ************/ #ifndef ngspice_WINPRINT_H #define ngspice_WINPRINT_H void WPRINT_PrintInit(HWND hwnd); BOOL CALLBACK WPRINT_Abort( HDC hdc, int iError); int WPRINT_Init(void); int WPRINT_NewViewport( GRAPH * graph); int WPRINT_Close(void); int WPRINT_Clear(void); int WPRINT_DrawLine(int x1, int y1, int x2, int y2); int WPRINT_Arc(int x0, int y0, int radius, double theta, double delta_theta); int WPRINT_Text( char * text, int x, int y, int degrees); int WPRINT_DefineColor(int colorid, double red, double green, double blue); int WPRINT_DefineLinestyle(int num, int mask); int WPRINT_SetLinestyle(int style); int WPRINT_SetColor( int color); int WPRINT_Update(void); int WPRINT_DiagramReady(void); #endif ngspice-26/src/frontend/com_asciiplot.h0000644000265600020320000000015412264261473017635 0ustar andreasadmin#ifndef ngspice_COM_ASCIIPLOT_H #define ngspice_COM_ASCIIPLOT_H void com_asciiplot(wordlist *wl); #endif ngspice-26/src/frontend/gens.h0000644000265600020320000000055112264261473015745 0ustar andreasadmin/************* * Header file for gens.c * 1999 E. Rouat ************/ #ifndef ngspice_GENS_H #define ngspice_GENS_H #include "ngspice/dgen.h" void wl_forall(wordlist *wl, void (*fn)(wordlist*, dgen*), dgen *data); int dgen_for_n(dgen *dg, int n, int (*fn) (dgen*, IFparm*, int), IFparm *data, int subindex); void dgen_nth_next(dgen **dg, int n); #endif ngspice-26/src/frontend/subckt.c0000644000265600020320000021745212264261473016311 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /*------------------------------------------------------------------------------ * encapsulated string assembly in translate() and finishLine() * this string facility (bxx_buffer) mainly abstracts away buffer allocation. * this fixes a buffer overflow in finishLine, caused by lengthy descriptions * of the kind: * B1 1 2 I=v(1)+v(2)+v(3)+... * Larice, 22nd Aug 2009 *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * Added changes supplied by by H.Tanaka with some tidy up of comments, debug * statements, and variables. This fixes a problem with nested .subsck elements * that accessed .model lines. Code not ideal, but it seems to work okay. * Also took opportunity to tidy a few other items (unused variables etc.), plus * fix a few spelling errors in the comments, and a memory leak. * SJB 25th March 2005 *----------------------------------------------------------------------------*/ /*------------------------------------------------------------------------------ * re-written by SDB during 4.2003 to enable SPICE2 POLY statements to be processed * properly. This is particularly important for dependent sources, whose argument * list changes when POLY is used. * Major changes include: * -- Added lots of comments which (hopefully) elucidate the steps taken * by the program during its processing. * -- Re-wrote translate, which does the processing of each card. * Please direct comments/questions/complaints to Stuart Brorson: * mailto:sdb@cloud9.net *-----------------------------------------------------------------------------*/ /* * Expand subcircuits. This is very spice-dependent. Bug fixes by Norbert * Jeske on 10/5/85. */ /*======================================================================* * Expand all subcircuits in the deck. This handles imbedded .subckt * definitions. The variables substart, subend, and subinvoke can be used * to redefine the controls used. The syntax is invariant though. * NOTE: the deck must be passed without the title line. * What we do is as follows: first make one pass through the circuit * and collect all of the subcircuits. Then, whenever a line that starts * with 'x' is found, copy the subcircuit associated with that name and * splice it in. A few of the problems: the nodes in the spliced-in * stuff must be unique, so when we copy it, append "subcktname:" to * each node. If we are in a nested subcircuit, use foo:bar:...:node. * Then we have to systematically change all references to the renamed * nodes. On top of that, we have to know how many args BJT's have, * so we have to keep track of model names. *======================================================================*/ /*#define TRACE*/ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteinp.h" #include #ifdef XSPICE /* gtri - add - wbk - 11/9/90 - include MIF function prototypes */ #include "ngspice/mifproto.h" /* gtri - end - wbk - 11/9/90 */ #endif #include "subckt.h" #include "variable.h" #include "numparam/numpaif.h" extern void line_free_x(struct line * deck, bool recurse); #define line_free(line, flag) \ do { \ line_free_x(line, flag); \ line = NULL; \ } while(0) struct subs; static struct line *doit(struct line *deck, wordlist *modnames); static int translate(struct line *deck, char *formal, char *actual, char *scname, char *subname, struct subs *subs, wordlist const *modnames); struct bxx_buffer; static void finishLine(struct bxx_buffer *dst, char *src, char *scname); static int settrans(char *formal, char *actual, char *subname); static char *gettrans(const char *name, const char *name_end); static int numnodes(char *name, struct subs *subs, wordlist const *modnames); static int numdevs(char *s); static bool modtranslate(struct line *deck, char *subname, wordlist **submod, wordlist **const modnames); static void devmodtranslate(struct line *deck, char *subname, wordlist * const submod); static int inp_numnodes(char c); /*--------------------------------------------------------------------- * table is used in settrans and gettrans -- it holds the netnames used * in the .subckt definition (t_old), and in the subcircuit invocation * (t_new) *--------------------------------------------------------------------*/ static struct tab { char *t_old; char *t_new; } table[512]; /* That had better be enough. */ /*--------------------------------------------------------------------- * subs is the linked list which holds the .subckt definitions * found during processing. *--------------------------------------------------------------------*/ struct subs { char *su_name; /* The .subckt name. */ char *su_args; /* The .subckt arguments, space separated. */ int su_numargs; struct line *su_def; /* Pointer to the .subckt definition. */ struct subs *su_next; }; /* submod is the list of original model names, modnames is the * list of translated names (i.e. after subckt expansion) */ static bool nobjthack = FALSE; /* flag indicating use of the experimental numparams library */ static bool use_numparams = FALSE; static char start[32], sbend[32], invoke[32], model[32]; static char node[128][128]; static int numgnode; /*------------------------------------------------------------------- inp_subcktexpand is the top level function which translates .subckts into mainlined code. Note that there are several things we need to do: 1. Find all .subckt definitions & stick them into a list. 2. Find all subcircuit invocations (refdes X) and replace them with the .subckt definition stored earlier. 3. Do parameter substitution. The algorithm is as follows: 1. Define some aliases for .subckt, .ends, etc. 2. First numparam pass: substitute paramterized tokens by intermediate values 1000000001 etc. 3. Make a list node[] of global nodes 4. Clean up parens around netnames 5. Call doit, which does the actual translation. 6. Second numparam pass: Do final substitution 7. Check the results & return. inp_subcktexpand takes as argument a pointer to deck, and it returns a pointer to the same deck after the new subcircuits are spliced in. -------------------------------------------------------------------*/ struct line * inp_subcktexpand(struct line *deck) { struct line *ll, *c; char *s; int ok = 0; char *t; int i; wordlist *modnames = NULL; if (!cp_getvar("substart", CP_STRING, start)) (void) strcpy(start, ".subckt"); if (!cp_getvar("subend", CP_STRING, sbend)) (void) strcpy(sbend, ".ends"); if (!cp_getvar("subinvoke", CP_STRING, invoke)) (void) strcpy(invoke, "x"); if (!cp_getvar("modelcard", CP_STRING, model)) (void) strcpy(model, ".model"); if (!cp_getvar("modelline", CP_STRING, model)) (void) strcpy(model, ".model"); nobjthack = cp_getvar("nobjthack", CP_BOOL, NULL); use_numparams = cp_getvar("numparams", CP_BOOL, NULL); use_numparams = TRUE; /* deck has .control sections already removed, but not comments */ if (use_numparams) { #ifdef TRACE fprintf(stderr, "Numparams is processing this deck:\n"); for (c = deck; c; c = c->li_next) fprintf(stderr, "%3d:%s\n", c->li_linenum, c->li_line); #endif ok = nupa_signal(NUPADECKCOPY, NULL); /* get the subckt/model names from the deck */ for (c = deck; c; c = c->li_next) { /* first Numparam pass */ if (ciprefix(".subckt", c->li_line)) nupa_scan(c->li_line, c->li_linenum, TRUE); if (ciprefix(".model", c->li_line)) nupa_scan(c->li_line, c->li_linenum, FALSE); } for (c = deck; c; c = c->li_next) /* first Numparam pass */ c->li_line = nupa_copy(c->li_line, c->li_linenum); /* now copy instances */ #ifdef TRACE fprintf(stderr, "Numparams transformed deck:\n"); for (c = deck; c; c = c->li_next) fprintf(stderr, "%3d:%s\n", c->li_linenum, c->li_line); #endif } /* Get all the model names so we can deal with BJTs, etc. * Stick all the model names into the doubly-linked wordlist modnames. */ { int nest = 0; for (c = deck; c; c = c->li_next) { if (ciprefix(".subckt", c->li_line)) nest++; else if (ciprefix(".ends", c->li_line)) nest--; else if (nest > 0) continue; if (ciprefix(model, c->li_line)) { s = c->li_line; txfree(gettok(&s)); /* discard the model keyword */ modnames = wl_cons(gettok(&s), modnames); } /* model name finding routine */ } } #ifdef TRACE { wordlist *w; printf("Models found:\n"); for (w = modnames; w; w = w->wl_next) printf("%s\n", w->wl_word); } #endif /* Added by H.Tanaka to find global nodes */ for (i = 0; i < 128; i++) strcpy(node[i], ""); /* Clear global node holder */ for (c = deck; c; c = c->li_next) if (ciprefix(".global", c->li_line)) { s = c->li_line; txfree(gettok(&s)); numgnode = 0; while (*s) { i = 0; t = s; for (/*s*/; *s && !isspace(*s); s++) i++; strncpy(node[numgnode], t, (size_t) i); if (i>0 && t[i-1] != '\0') node[numgnode][i] = '\0'; while (isspace(*s)) s++; numgnode++; } /* node[] holds name of global node */ #ifdef TRACE printf("***Global node option has been found.***\n"); for (i = 0; ili_line[0] = '*'; /* comment it out */ } /* Let's do a few cleanup things... Get rid of ( ) around node lists... */ for (c = deck; c; c = c->li_next) { /* iterate on lines in deck */ char *s = c->li_line; if (*s == '*') /* skip comment */ continue; if (ciprefix(start, s)) { /* if we find .subckt . . . */ #ifdef TRACE /* SDB debug statement */ printf("In inp_subcktexpand, found a .subckt: %s\n", s); #endif while (*s && *s != '(') /* search opening paren */ s++; if (*s == '(') { int level = 0; do { /* strip outer parens '(' ')', just the first pair */ if (*s == '(' && level++ == 0) { *s = ' '; } if (*s == ')' && --level == 0) { *s = ' '; break; } } while(*s++); } } else if (*s == '.') { continue; /* skip .commands */ } else { /* any other line . . . */ while (*s && !isspace(*s)) /* skip first token */ s++; while (*s && isspace(*s)) /* skip whitespace */ s++; if (*s == '(') { int level = 0; do { /* strip outer parens '(' ')', just the first pair, why ? */ if (*s == '(' && level++ == 0) { *s = ' '; } if (*s == ')' && --level == 0) { *s = ' '; break; } } while(*s++); } /* if (*s == '(' . . . */ } /* any other line */ } /* for (c = deck . . . */ #ifdef TRACE /* SDB debug statement */ printf("In inp_subcktexpand, about to call doit.\n"); #endif /* doit does the actual splicing in of the .subckt . . . */ ll = doit(deck, modnames); wl_free(modnames); /* Count numbers of line in deck after expansion */ if (ll) { dynMaxckt = 0; /* number of lines in deck after expansion */ for (c = ll; c; c = c->li_next) dynMaxckt++; } /* Now check to see if there are still subckt instances undefined... */ for (c = ll; c; c = c->li_next) if (ciprefix(invoke, c->li_line)) { fprintf(cp_err, "Error: unknown subckt: %s\n", c->li_line); if (use_numparams) ok = ok && nupa_signal(NUPAEVALDONE, NULL); return NULL; } if (use_numparams) { /* the NUMPARAM final line translation pass */ ok = ok && nupa_signal(NUPASUBDONE, NULL); for (c = ll; c; c = c->li_next) /* 'param' .meas statements can have dependencies on measurement values */ /* need to skip evaluating here and evaluate after other .meas statements */ if (ciprefix(".meas", c->li_line)) { if (!strstr(c->li_line, "param")) nupa_eval(c->li_line, c->li_linenum, c->li_linenum_orig); } else { nupa_eval(c->li_line, c->li_linenum, c->li_linenum_orig); } #ifdef TRACE fprintf(stderr, "Numparams converted deck:\n"); for (c = ll; c; c = c->li_next) fprintf(stderr, "%3d:%s\n", c->li_linenum, c->li_line); #endif /*nupa_list_params(stdout);*/ nupa_copy_inst_dico(); ok = ok && nupa_signal(NUPAEVALDONE, NULL); } return (ll); /* return the spliced deck. */ } #define MAXNEST 21 /*-------------------------------------------------------------------*/ /* doit does the actual substitution of .subckts. */ /* It takes two passes: the first extracts .subckts */ /* and sticks pointer to them into the linked list sss. It does */ /* the extraction recursively. Then, it look for subcircuit */ /* invocations and substitutes the stored .subckt into */ /* the main circuit file. */ /* It takes as argument a pointer to the deck, and returns a */ /* pointer to the deck after the subcircuit has been spliced in. */ /*-------------------------------------------------------------------*/ static struct line * doit(struct line *deck, wordlist *modnames) { struct subs *sss = NULL; /* *sss temporarily hold decks to substitute */ int numpasses = MAXNEST; bool gotone; int error; /* Save all the old stuff... */ struct subs *subs = NULL; wordlist *submod = NULL; wordlist *xmodnames = modnames; #ifdef TRACE /* SDB debug statement */ { struct line *c; printf("In doit, about to start first pass through deck.\n"); for (c = deck; c; c = c->li_next) printf(" %s\n", c->li_line); } #endif { /* First pass: xtract all the .subckts and stick pointers to them into sss. */ struct line *last = deck; struct line *lc = NULL; while (last) { struct line *c, *lcc; if (ciprefix(sbend, last->li_line)) { /* if line == .ends */ fprintf(cp_err, "Error: misplaced %s line: %s\n", sbend, last->li_line); return (NULL); } if (ciprefix(start, last->li_line)) { /* if line == .subckt */ if (last->li_next == NULL) { /* first check that next line is non null */ fprintf(cp_err, "Error: no %s line.\n", sbend); return (NULL); } /* Here we loop through the deck looking for .subckt and .ends cards. * At the end of this section, last will point to the location of the * .subckt card, and c will point to the location of the .ends card. * and lcc->li_next === c, thus lcc will be the last body card */ { int nest = 1; lcc = last; c = lcc->li_next; while (c) { if (ciprefix(sbend, c->li_line)) /* found a .ends */ nest--; else if (ciprefix(start, c->li_line)) /* found a .subckt */ nest++; if (!nest) break; lcc = c; c = lcc->li_next; } } /* Check to see if we have looped through remainder of deck without finding .ends */ if (!c) { fprintf(cp_err, "Error: no %s line.\n", sbend); return (NULL); } /* last is the opening .subckt card */ /* c is the terminating .ends card */ /* lcc is one card before, which is the last body card */ sss = alloc(struct subs); if (use_numparams == FALSE) lcc->li_next = NULL; /* shouldn't we free some memory here????? */ /* cut the whole .subckt ... .ends sequence from the deck chain */ if (lc) lc->li_next = c->li_next; else deck = c->li_next; /* Now put the .subckt definition found into sss */ sss->su_def = last->li_next; { char *s = last->li_line; txfree(gettok(&s)); sss->su_name = gettok(&s); sss->su_args = copy(s); /* count the number of args in the .subckt line */ sss->su_numargs = 0; for (;;) { while (isspace(*s)) s++; if (*s == '\0') break; while (*s && !isspace(*s)) s++; sss->su_numargs ++; } } sss->su_next = subs; subs = sss; /* Now that sss is built, assign it to subs */ line_free_x(last, FALSE); last = c->li_next; /*gp */ c->li_next = NULL; /* Numparam needs line c */ c->li_line[0] = '*'; /* comment it out */ } else { /* line is neither .ends nor .subckt. */ /* make lc point to this card, and advance last to next card. */ lc = last; last = last->li_next; } } /* for (last = deck . . . . */ } /* At this point, sss holds the .subckt definition found, subs holds * all .subckt defs found, including this one */ if (!subs) /* we have found no subckts. Just return. */ return (deck); /* Otherwise, expand sub-subcircuits recursively. */ for (sss = subs; sss; sss = sss->su_next) /* iterate through the list of subcircuits */ if ((sss->su_def = doit(sss->su_def, modnames)) == NULL) return (NULL); #ifdef TRACE /* SDB debug statement */ { struct line *c; printf("In doit, about to start second pass through deck.\n"); for (c = deck; c; c = c->li_next) printf(" %s\n", c->li_line); } #endif error = 0; /* Second pass: do the replacements. */ do { /* while (!error && numpasses-- && gotone) */ struct line *c = deck; struct line *lc = NULL; gotone = FALSE; while (c) { if (ciprefix(invoke, c->li_line)) { /* found reference to .subckt (i.e. component with refdes X) */ char *tofree, *tofree2, *s, *t; char *scname, *subname; struct line *lcc; gotone = TRUE; t = tofree = s = copy(c->li_line); /* s & t hold copy of component line */ /* make scname point to first non-whitepace chars after refdes invocation * e.g. if invocation is Xreference, *scname = reference */ tofree2 = scname = gettok(&s); /*scname += strlen(invoke); */ while ((*scname == ' ') || (*scname == '\t') || (*scname == ':')) scname++; /* Now set s to point to last non-space chars in line (i.e. * the name of the model invoked */ while (*s) s++; s--; while ((*s == ' ') || (*s == '\t')) *s-- = '\0'; while ((*s != ' ') && (*s != '\t')) s--; s++; /* iterate through .subckt list and look for .subckt name invoked */ for (sss = subs; sss; sss = sss->su_next) if (eq(sss->su_name, s)) break; /* At this point, sss points to the .subckt invoked, * and scname points to the netnames * involved. */ /* If no .subckt is found, don't complain -- this might be an * instance of a subckt that is defined above at higher level. */ if (!sss) { lc = c; c = c->li_next; tfree(tofree); tfree(tofree2); continue; } /* Now we have to replace this line with the * macro definition. */ subname = copy(sss->su_name); /* make lcc point to a copy of the .subckt definition */ lcc = inp_deckcopy(sss->su_def); /* Change the names of .models found in .subckts . . . */ submod = NULL; if (modtranslate(lcc, scname, &submod, &modnames)) /* this translates the model name in the .model line */ devmodtranslate(lcc, scname, submod); /* This translates the model name on all components in the deck */ wl_free(submod); { char *s = sss->su_args; txfree(gettok(&t)); /* Throw out the subcircuit refdes */ /* now invoke translate, which handles the remainder of the * translation. */ if (!translate(lcc, s, t, scname, subname, subs, modnames)) error = 1; tfree(subname); } /* Now splice the decks together. */ { struct line *savenext = c->li_next; if (use_numparams == FALSE) { /* old style: c will drop a dangling pointer: memory leak */ if (lc) lc->li_next = lcc; else deck = lcc; } else { /* ifdef NUMPARAMS, keep the invoke line as a comment */ c->li_next = lcc; c->li_line[0] = '*'; /* comment it out */ } while (lcc->li_next) lcc = lcc->li_next; lcc->li_next = c->li_next; lcc->li_next = savenext; } c = lcc->li_next; lc = lcc; tfree(tofree); tfree(tofree2); } /* if (ciprefix(invoke, c->li_line)) . . . */ else { lc = c; c = c->li_next; } } } while (!error && numpasses-- && gotone); if (!numpasses) { fprintf(cp_err, "Error: infinite subckt recursion\n"); error = 1; } #ifdef TRACE /* Added by H.Tanaka to display converted deck */ { struct line *c = deck; printf("Converted deck\n"); for (; c; c = c->li_next) printf("%s\n", c->li_line); } { wordlist *w = modnames; printf("Models:\n"); for (; w; w = w->wl_next) printf("%s\n", w->wl_word); } #endif wl_delete_slice(modnames, xmodnames); if (error) return NULL; /* error message already reported; should free() */ /* struct subs { char *su_name; char *su_args; int su_numargs; struct line *su_def; struct subs *su_next; }; */ while (subs) { struct subs *sss2 = subs; subs = subs->su_next; tfree(sss2->su_name); tfree(sss2->su_args); line_free(sss2->su_def, TRUE); tfree(sss2); } return (deck); } /*-------------------------------------------------------------------*/ /* Copy a deck, including the actual lines. */ /*-------------------------------------------------------------------*/ struct line * inp_deckcopy(struct line *deck) { struct line *d = NULL, *nd = NULL; while (deck) { if (nd) { d->li_next = alloc(struct line); d = d->li_next; } else { nd = d = alloc(struct line); } d->li_linenum = deck->li_linenum; d->li_line = copy(deck->li_line); if (deck->li_error) d->li_error = copy(deck->li_error); d->li_actual = inp_deckcopy(deck->li_actual); deck = deck->li_next; } return (nd); } /*------------------------------------------------------------------- * struct bxx_buffer, * a string assembly facility. * * usage: * * struct bxx_buffer thing; * bxx_init(&thing); * ... * while (...) { * bxx_rewind(&thing); * ... * bxx_putc(&thing, ...) * bxx_printf(&thing, ...) * bxx_put_cstring(&thing, ...) * bxx_put_substring(&thing, ...) * ... * strcpy(bxx_buffer(&thing) * } * .. * bxx_free(&thing) * * main aspect: * reallocates/extends its buffer itself. * * note: * during asssembly the internal buffer is * not necessarily '\0' terminated. * but will be when bxx_buffer() is invoked */ struct bxx_buffer { char *dst; char *limit; char *buffer; }; /* must be a power of 2 */ static const int bxx_chunksize = 1024; static void bxx_init(struct bxx_buffer *t) { /* assert(0 == (bxx_chunksize & (bxx_chunksize - 1))); */ t->buffer = TMALLOC(char, bxx_chunksize); t->dst = t->buffer; t->limit = t->buffer + bxx_chunksize; } static void bxx_free(struct bxx_buffer *t) { tfree(t->buffer); } static void bxx_rewind(struct bxx_buffer *t) { t->dst = t->buffer; } static void bxx_extend(struct bxx_buffer *t, int howmuch) { int pos = (int)(t->dst - t->buffer); int len = (int)(t->limit - t->buffer); /* round up */ howmuch += (bxx_chunksize - 1); howmuch &= ~(bxx_chunksize - 1); len += howmuch; t->buffer = TREALLOC(char, t->buffer, len); t->dst = t->buffer + pos; t->limit = t->buffer + len; } static void bxx_printf(struct bxx_buffer *t, const char *fmt, ...) { va_list ap; for (;;) { int ret; int size = (int)(t->limit - t->dst); va_start(ap, fmt); ret = vsnprintf(t->dst, (size_t) size, fmt, ap); va_end(ap); if (ret == -1) { bxx_extend(t, bxx_chunksize); } else if (ret >= size) { bxx_extend(t, ret - size + 1); } else { t->dst += ret; break; } } va_end(ap); } static inline char bxx_putc(struct bxx_buffer *t, char c) { if (t->dst >= t->limit) bxx_extend(t, 1); return *(t->dst)++ = c; } static void bxx_put_cstring(struct bxx_buffer *t, const char *cstring) { while (*cstring) bxx_putc(t, *cstring++); } static void bxx_put_substring(struct bxx_buffer *t, const char *str, const char *end) { while (str < end) bxx_putc(t, *str++); } static char * bxx_buffer(struct bxx_buffer *t) { if ((t->dst == t->buffer) || (t->dst[-1] != '\0')) bxx_putc(t, '\0'); return t->buffer; } /*------------------------------------------------------------------------------------------* * Translate all of the device names and node names in the .subckt deck. They are * pre-pended with subname:, unless they are in the formal list, in which case * they are replaced with the corresponding entry in the actual list. * The one special case is node 0 -- this is always ground and we don't * touch it. * * Variable name meanings: * *deck = pointer to subcircuit definition (lcc) (struct line) * formal = copy of the .subckt definition line (e.g. ".subckt subcircuitname 1 2 3") (string) * actual = copy of the .subcircuit invocation line (e.g. "Xexample 4 5 6 subcircuitname") (string) * scname = refdes (- first letter) used at invocation (e.g. "example") (string) * subname = copy of the subcircuit name *-------------------------------------------------------------------------------------------*/ static int translate(struct line *deck, char *formal, char *actual, char *scname, char *subname, struct subs *subs, wordlist const *modnames) { struct line *c; struct bxx_buffer buffer; char *next_name, dev_type, *name, *s, *t, ch, *nametofree, *paren_ptr, *new_str; int nnodes, i, dim; int rtn = 0; bxx_init(&buffer); /* settrans builds the table holding the translated netnames. */ i = settrans(formal, actual, subname); if (i < 0) { fprintf(stderr, "Too few parameters for subcircuit type \"%s\" (instance: x%s)\n", subname, scname); goto quit; } else if (i > 0) { fprintf(stderr, "Too many parameters for subcircuit type \"%s\" (instance: x%s)\n", subname, scname); goto quit; } /* now iterate through the .subckt deck and translate the cards. */ for (c = deck; c; c = c->li_next) { dev_type = *(c->li_line); #ifdef TRACE /* SDB debug statement */ printf("\nIn translate, examining line (dev_type: %c, subname: %s, instance: %s) %s \n", dev_type, subname, scname, c->li_line); #endif if (ciprefix(".ic", c->li_line) || ciprefix(".nodeset", c->li_line)) { paren_ptr = s = c->li_line; while ((paren_ptr = strstr(paren_ptr, "(")) != NULL) { *paren_ptr = '\0'; paren_ptr++; name = paren_ptr; if ((paren_ptr = strstr(paren_ptr, ")")) == NULL) { *(name-1) = '('; fprintf(cp_err, "Error: missing closing ')' for .ic|.nodeset statement %s\n", c->li_line); goto quit; } *paren_ptr = '\0'; t = gettrans(name, NULL); if (t) { new_str = TMALLOC(char, strlen(s) + strlen(t) + strlen(paren_ptr + 1) + 3); sprintf(new_str, "%s(%s)%s", s, t, paren_ptr+1); } else { new_str = TMALLOC(char, strlen(s) + strlen(scname) + strlen(name) + strlen(paren_ptr + 1) + 4); sprintf(new_str, "%s(%s.%s)%s", s, scname, name, paren_ptr+1); } paren_ptr = new_str + strlen(s) + 1; tfree(s); s = new_str; } c->li_line = s; continue; } /* Rename the device. */ switch (dev_type) { case '\0': case '*': case '$': case '.': /* Just a pointer to the line into s and then break */ bxx_rewind(&buffer); s = c->li_line; break; #ifdef XSPICE /*=================== case A ====================*/ /* gtri - add - wbk - 10/23/90 - process A devices specially */ /* since they have a more involved and variable length node syntax */ case 'a': case 'A': /* translate the instance name according to normal rules */ s = c->li_line; name = MIFgettok(&s); bxx_rewind(&buffer); bxx_printf(&buffer, "a.%s.%s ", scname, name); /* Now translate the nodes, looking ahead one token to recognize */ /* when we reach the model name which should not be translated */ /* here. */ next_name = MIFgettok(&s); for (;;) { /* rotate the tokens and get the the next one */ if (name) tfree(name); name = next_name; next_name = MIFgettok(&s); /* if next token is NULL, name holds the model name, so exit */ if (next_name == NULL) break; /* Process the token in name. If it is special, then don't */ /* translate it. */ switch (*name) { case '[': case ']': case '~': bxx_printf(&buffer, "%s ", name); break; case '%': bxx_printf(&buffer, "%%"); /* don't translate the port type identifier */ if (name) tfree(name); name = next_name; next_name = MIFgettok(&s); bxx_printf(&buffer, "%s ", name); break; default: /* must be a node name at this point, so translate it */ t = gettrans(name, NULL); if (t) { bxx_printf(&buffer, "%s ", t); } else { bxx_printf(&buffer, "%s.%s ", scname, name); } break; } /* switch */ } /* while */ /* copy in the last token, which is the model name */ if (name) { bxx_printf(&buffer, "%s ", name); tfree(name); } /* Set s to null string for compatibility with code */ /* after switch statement */ s = ""; break; /* case 'a' */ /* gtri - end - wbk - 10/23/90 */ #endif /*================ case E, F, G, H ================*/ /* This section handles controlled sources and allows for SPICE2 POLY attributes. * This is a new section, added by SDB to handle POLYs in sources. Significant * changes were made in here. * 4.21.2003 -- SDB. mailto:sdb@cloud9.net */ case 'E': case 'e': case 'F': case 'f': case 'G': case 'g': case 'H': case 'h': s = c->li_line; /* s now holds the SPICE line */ t = name = gettok(&s); /* name points to the refdes */ if (!name) continue; if (!*name) { tfree(name); continue; } /* Here's where we translate the refdes to e.g. F:subcircuitname:57 * and stick the translated name into buffer. */ ch = *name; /* ch identifies the type of component */ bxx_rewind(&buffer); bxx_printf(&buffer, "%c.%s.%s ", ch, scname, name); tfree(t); /* Next iterate over all nodes (netnames) found and translate them. */ nnodes = numnodes(c->li_line, subs, modnames); while (nnodes-- > 0) { name = gettok_node(&s); if (name == NULL) { fprintf(cp_err, "Error: too few nodes: %s\n", c->li_line); goto quit; } /* call gettrans and see if netname was used in the invocation */ t = gettrans(name, NULL); if (t) { /* the netname was used during the invocation; print it into the buffer */ bxx_printf(&buffer, "%s ", t); } else { /* net netname was not used during the invocation; place a * translated name into the buffer.*/ bxx_printf(&buffer, "%s.%s ", scname, name); } tfree(name); } /* while (nnodes-- . . . . */ /* Next we handle the POLY (if any) */ /* get next token */ t = s; next_name = gettok_noparens(&t); if ((strcmp(next_name, "POLY") == 0) || (strcmp(next_name, "poly") == 0)) { /* found POLY . . . . */ #ifdef TRACE /* SDB debug statement */ printf("In translate, looking at e, f, g, h found poly\n"); #endif /* move pointer ahead of ( */ if (get_l_paren(&s) == 1) { fprintf(cp_err, "Error: no left paren after POLY %s\n", c->li_line); tfree(next_name); goto quit; } nametofree = gettok_noparens(&s); dim = atoi(nametofree); /* convert returned string to int */ tfree(nametofree); /* move pointer ahead of ) */ if (get_r_paren(&s) == 1) { fprintf(cp_err, "Error: no right paren after POLY %s\n", c->li_line); tfree(next_name); goto quit; } /* Write POLY(dim) into buffer */ bxx_printf(&buffer, "POLY( %d ) ", dim); } /* if ((strcmp(next_name, "POLY") == 0) . . . */ else dim = 1; /* only one controlling source . . . */ tfree(next_name); /* Now translate the controlling source/nodes */ nnodes = dim * numdevs(c->li_line); while (nnodes-- > 0) { nametofree = name = gettok_node(&s); /* name points to the returned token */ if (name == NULL) { fprintf(cp_err, "Error: too few devs: %s\n", c->li_line); goto quit; } if ((dev_type == 'f') || (dev_type == 'F') || (dev_type == 'h') || (dev_type == 'H')) { /* Handle voltage source name */ #ifdef TRACE /* SDB debug statement */ printf("In translate, found type f or h\n"); #endif ch = *name; /* ch is the first char of the token. */ bxx_printf(&buffer, "%c.%s.%s ", ch, scname, name); /* From Vsense and Urefdes creates V.Urefdes.sense */ } else { /* Handle netname */ #ifdef TRACE /* SDB debug statement */ printf("In translate, found type e or g\n"); #endif /* call gettrans and see if netname was used in the invocation */ t = gettrans(name, NULL); if (t) { /* the netname was used during the invocation; print it into the buffer */ bxx_printf(&buffer, "%s ", t); } else { /* net netname was not used during the invocation; place a * translated name into the buffer. */ bxx_printf(&buffer, "%s.%s ", scname, name); /* From netname and Urefdes creates Urefdes:netname */ } } tfree(nametofree); } /* while (nnodes--. . . . */ /* Now write out remainder of line (polynomial coeffs) */ finishLine(&buffer, s, scname); s = ""; break; /*================= Default case ===================*/ default: /* this section handles ordinary components */ s = c->li_line; nametofree = name = gettok_node(&s); /* changed to gettok_node to handle netlists with ( , ) */ if (!name) continue; if (!*name) { tfree(name); continue; } /* Here's where we translate the refdes to e.g. R:subcircuitname:57 * and stick the translated name into buffer. */ ch = *name; bxx_rewind(&buffer); if (ch != 'x') bxx_printf(&buffer, "%c.%s.%s ", ch, scname, name); else bxx_printf(&buffer, "%s.%s ", scname, name); tfree(nametofree); /* Next iterate over all nodes (netnames) found and translate them. */ nnodes = numnodes(c->li_line, subs, modnames); while (nnodes-- > 0) { name = gettok_node(&s); if (name == NULL) { fprintf(cp_err, "Error: too few nodes: %s\n", c->li_line); goto quit; } /* call gettrans and see if netname was used in the invocation */ t = gettrans(name, NULL); if (t) { /* the netname was used during the invocation; print it into the buffer */ bxx_printf(&buffer, "%s ", t); } else { /* net netname was not used during the invocation; place a * translated name into the buffer. */ bxx_printf(&buffer, "%s.%s ", scname, name); } tfree(name); } /* while (nnodes-- . . . . */ /* Now translate any devices (i.e. controlling sources). * This may be superfluous because we handle dependent * source devices above . . . . */ nnodes = numdevs(c->li_line); while (nnodes-- > 0) { t = name = gettok_node(&s); if (name == NULL) { fprintf(cp_err, "Error: too few devs: %s\n", c->li_line); goto quit; } ch = *name; if (ch != 'x') bxx_printf(&buffer, "%c.%s.%s ", ch, scname, name); else bxx_printf(&buffer, "%s ", scname); tfree(t); } /* while (nnodes--. . . . */ /* Now we finish off the line. For most components (R, C, etc), * this involves adding the component value to the buffer. * We also scan through the line for v(something) and * i(something)... */ finishLine(&buffer, s, scname); s = ""; } /* switch (c->li_line . . . . */ bxx_printf(&buffer, "%s", s); tfree(c->li_line); c->li_line = copy(bxx_buffer(&buffer)); #ifdef TRACE /* SDB debug statement */ printf("In translate, translated line = %s \n", c->li_line); #endif } /* for (c = deck . . . . */ rtn = 1; quit: for (i = 0; ; i++) { if (!table[i].t_old && !table[i].t_new) break; FREE(table[i].t_old); FREE(table[i].t_new); } bxx_free(&buffer); return rtn; } /*-------------------------------------------------------------------* * finishLine now doesn't handle current or voltage sources. * Therefore, it just writes out the final netnames, if required. * Changes made by SDB on 4.29.2003. *-------------------------------------------------------------------*/ static void finishLine(struct bxx_buffer *t, char *src, char *scname) { char *buf, *buf_end, which; char *s; int lastwasalpha; lastwasalpha = 0; while (*src) { /* Find the next instance of "[vi](" in * this string. */ if (((*src != 'v') && (*src != 'V') && (*src != 'i') && (*src != 'I')) || lastwasalpha) { lastwasalpha = isalpha(*src); bxx_putc(t, *src++); continue; } for (s = src + 1; *s && isspace(*s); s++) ; if (!*s || (*s != '(')) { lastwasalpha = isalpha(*src); bxx_putc(t, *src++); continue; } lastwasalpha = 0; bxx_putc(t, which = *src); src = s; bxx_putc(t, *src++); while (isspace(*src)) src++; for (buf = src; *src && !isspace(*src) && *src != ',' && *src != ')'; ) src++; buf_end = src; if ((which == 'v') || (which == 'V')) s = gettrans(buf, buf_end); else s = NULL; if (s) { bxx_put_cstring(t, s); } else { /* just a normal netname . . . . */ /* i(vname) -> i(v.subckt.vname) i(ename) -> i(e.subckt.ename) i(hname) -> i(h.subckt.hname) i(bname) -> i(b.subckt.hname) */ if ((which == 'i' || which == 'I') && (buf[0] == 'v' || buf[0] == 'V' || buf[0] == 'e' || buf[0] == 'h' || buf[0] == 'b' || buf[0] == 'B')) { bxx_putc(t, buf[0]); bxx_putc(t, '.'); /*i = 1; */ } /* else { i = 0; } */ bxx_put_cstring(t, scname); bxx_putc(t, '.'); bxx_put_substring(t, buf, buf_end); } /* translate the reference node, as in the "2" in "v(4,2)" */ if ((which == 'v') || (which == 'V')) { while (*src && (isspace(*src) || *src == ',')) { src++; } if (*src && *src != ')') { for (buf = src; *src && !isspace(*src) && (*src != ')'); ) src++; s = gettrans(buf, buf_end = src); bxx_putc(t, ','); if (s) { bxx_put_cstring(t, s); } else { bxx_put_cstring(t, scname); bxx_putc(t, '.'); bxx_put_substring(t, buf, buf_end); } } } } } /*------------------------------------------------------------------------------* * settrans builds the table which holds the old and new netnames. * it also compares the number of nets present in the .subckt definition against * the number of nets present in the subcircuit invocation. It returns 0 if they * match, otherwise, it returns an error. * * Variable definitions: * formal = copy of the .subckt definition line (e.g. ".subckt subcircuitname 1 2 3") (string) * actual = copy of the .subcircuit invocation line (e.g. "Xexample 4 5 6 subcircuitname") (string) * subname = copy of the subcircuit name *------------------------------------------------------------------------------*/ static int settrans(char *formal, char *actual, char *subname) { int i; bzero(table, sizeof(*table)); for (i = 0; ; i++) { table[i].t_old = gettok(&formal); table[i].t_new = gettok(&actual); if (table[i].t_new == NULL) { return -1; /* Too few actual / too many formal */ } else if (table[i].t_old == NULL) { if (eq(table[i].t_new, subname)) break; else return 1; /* Too many actual / too few formal */ } } return 0; } /* compare a substring, with a '\0' terminated string * the substring itself is required to be free of a '\0' */ static int eq_substr(const char *str, const char *end, const char *cstring) { while (str < end) if (*str++ != *cstring++) return 0; return (*cstring == '\0'); } /*------------------------------------------------------------------------------* * gettrans returns the name of the top level net if it is in the list, * otherwise it returns NULL. *------------------------------------------------------------------------------*/ static char * gettrans(const char *name, const char *name_end) { int i; if (!name_end) name_end = strchr(name, '\0'); #ifdef XSPICE /* gtri - wbk - 2/27/91 - don't translate the reserved word 'null' */ if (eq_substr(name, name_end, "null")) return ("null"); /* gtri - end */ #endif /* Added by H.Tanaka to translate global nodes */ for (i = 0; i.[0-9]+ */ static bool model_bin_match(char *token, char *model_name) { /* find last dot in model_name */ char *dot_char = strrchr(model_name, '.'); bool flag = FALSE; /* check if token equals the substring before last dot in model_name */ if (dot_char) { char *mtoken = copy_substring(model_name, dot_char); if (cieq(mtoken, token)) { flag = TRUE; dot_char++; /* check if model_name has binning info (trailing digit(s)) */ while (*dot_char != '\0') { if (!isdigit(*dot_char)) { flag = FALSE; break; } dot_char++; } } tfree(mtoken); } return flag; } /*-------------------------------------------------------------------*/ /*-------------------------------------------------------------------*/ static int numnodes(char *name, struct subs *subs, wordlist const *modnames) { /* gtri - comment - wbk - 10/23/90 - Do not modify this routine for */ /* 'A' type devices since the callers will not know how to find the */ /* nodes even if they know how many there are. Modify the callers */ /* instead. */ /* gtri - end - wbk - 10/23/90 */ char c; struct subs *sss; char *s, *t, buf[4 * BSIZE_SP]; const wordlist *wl; int n, i, gotit; while (*name && isspace(*name)) name++; c = *name; if (isupper(c)) c = (char) tolower(c); (void) strncpy(buf, name, sizeof(buf)); s = buf; if (c == 'x') { /* Handle this ourselves. */ while (*s) s++; s--; while ((*s == ' ') || (*s == '\t')) *s-- = '\0'; while ((*s != ' ') && (*s != '\t')) s--; s++; for (sss = subs; sss; sss = sss->su_next) if (eq(sss->su_name, s)) return (sss->su_numargs); /* * number of nodes not known so far. * lets count the nodes ourselves, * assuming `buf' looks like this: * xname n1 n2 ... nn subname */ { int nodes = -2; for (s = buf; *s; ) { nodes++; while (*s && !isspace(*s)) s++; while (isspace(*s)) s++; } return (nodes); } } n = inp_numnodes(c); /* Added this code for variable number of nodes on BSIM3SOI/CPL devices */ /* The consequence of this code is that the value returned by the */ /* inp_numnodes(c) call must be regarded as "maximum number of nodes */ /* for a given device type. */ /* Paolo Nenzi Jan-2001 */ /* I hope that works, this code is very very untested */ if ((c == 'm') || (c == 'p')) { /* IF this is a mos or cpl */ i = 0; s = buf; gotit = 0; txfree(gettok(&s)); /* Skip component name */ while ((i < n) && (*s) && !gotit) { t = gettok_node(&s); /* get nodenames . . . */ for (wl = modnames; wl; wl = wl->wl_next) { /* also need to check if binnable device mos model */ if (eq(t, wl->wl_word) || model_bin_match(t, wl->wl_word)) gotit = 1; } i++; tfree(t); } /* while . . . . */ /* Note: node checks must be done on #_of_node-1 because the */ /* "while" cycle increments the counter even when a model is */ /* recognized. This code may be better! */ if (i < 5) { fprintf(cp_err, "Error: too few nodes for MOS or CPL: %s\n", name); return (0); } return (i-1); /* compensate the unnecessary increment in the while cycle */ } /* if (c == 'm' . . . */ if (nobjthack || (c != 'q')) return (n); for (s = buf, i = 0; *s && (i < 4); i++) txfree(gettok(&s)); if (i == 3) return (3); else if (i < 4) { fprintf(cp_err, "Error: too few nodes for BJT: %s\n", name); return (0); } /* Now, is this a model? */ t = gettok(&s); wl = wl_find(t, modnames); tfree(t); return wl ? 3 : 4; } /*-------------------------------------------------------------------* * This function returns the number of controlling voltage sources * (for F, H) or controlling nodes (for G, E) attached to a dependent * source. *-------------------------------------------------------------------*/ static int numdevs(char *s) { while (*s && isspace(*s)) s++; switch (*s) { case 'K': case 'k': return (2); /* two nodes per voltage controlled source */ case 'G': case 'g': case 'E': case 'e': return (2); /* one source per current controlled source */ case 'F': case 'f': case 'H': case 'h': /* 2 lines here added to fix w bug, NCF 1/31/95 */ case 'W': case 'w': return (1); default: return (0); } } /*----------------------------------------------------------------------* * modtranslate -- translates .model lines found in subckt definitions. * Calling arguments are: * *deck = pointer to the .subckt definition (linked list) * *subname = pointer to the subcircuit name used at the subcircuit invocation (string) * Modtranslate returns TRUE if it translated a model name, FALSE * otherwise. *----------------------------------------------------------------------*/ static bool modtranslate(struct line *deck, char *subname, wordlist **submod, wordlist ** const modnames) { struct line *c; char *buffer, *name, *t, model[4 * BSIZE_SP]; bool gotone; (void) strcpy(model, ".model"); gotone = FALSE; for (c = deck; c; c = c->li_next) { /* iterate through model def . . . */ if (ciprefix(model, c->li_line)) { gotone = TRUE; t = c->li_line; #ifdef TRACE /* SDB debug statement */ printf("In modtranslate, translating line %s\n", t); #endif name = gettok(&t); /* at this point, name = .model */ buffer = TMALLOC(char, strlen(name) + strlen(t) + strlen(subname) + 4); (void) sprintf(buffer, "%s ", name); /* at this point, buffer = ".model " */ tfree(name); name = gettok(&t); /* name now holds model name */ *submod = wl_cons(name, *submod); #ifdef TRACE /* SDB debug statement */ printf("In modtranslate, sticking model name %s into submod\n", (*submod)->wl_word); #endif /* now stick the new model name into the model line. */ (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); /* buffer = "model subname:modelname " */ (void) strcat(buffer, t); tfree(c->li_line); c->li_line = buffer; #ifdef TRACE /* SDB debug statement */ printf("In modtranslate, translated line= %s\n", c->li_line); #endif /* this looks like it tries to stick the translated model name into the list of model names */ t = c->li_line; txfree(gettok(&t)); *modnames = wl_cons(gettok(&t), *modnames); #ifdef TRACE /* SDB debug statement */ printf("In modtranslate, sticking model name %s into modnames\n", (*modnames)->wl_word); #endif } } return (gotone); } /*-------------------------------------------------------------------* * Devmodtranslate scans through the deck, and translates the * name of the model in a line held in a .subckt. For example: * before: .subckt U1 . . . . * Q1 c b e 2N3904 * after: Q1 c b e U1:2N3904 *-------------------------------------------------------------------*/ static void devmodtranslate(struct line *deck, char *subname, wordlist * const submod) { struct line *s; int found; for (s = deck; s; s = s->li_next) { char *buffer, *t, c, *name, *next_name; wordlist *wlsub; t = s->li_line; #ifdef TRACE /* SDB debug stuff */ printf("In devmodtranslate, examining line %s.\n", t); #endif while (*t && isspace(*t)) t++; c = *t; /* set c to first char in line. . . . */ if (isupper(c)) c = (char) tolower(c); buffer = TMALLOC(char, strlen(t) + strlen(subname) + 4); switch (c) { #ifdef XSPICE case 'a': /* Code for codemodels (dev prefix "A") added by SDB on 6.10.2004. * The algorithm is simple. We don't know how many nodes or sources are attached, * but the name of the model is always last. Therefore, just iterate through all * tokens until the last one is reached. Then translate it. */ #ifdef TRACE /* SDB debug statement */ printf("In devmodtranslate, found codemodel, line= %s\n", t); #endif /* first do refdes. */ name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); /* now do remainder of line. */ next_name = gettok(&t); for (;;) { name = next_name; next_name = gettok(&t); if (next_name == NULL) { /* if next_name is NULL, we are at the line end. * name holds the model name. Therefore, break */ break; } else { /* next_name holds something. Write name into the buffer and continue. */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); } } /* while */ /* * Note that we compare against submod, * which is the list of untranslated names of models. */ wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); #ifdef TRACE /* SDB debug statement */ printf("In devmodtranslate, translated codemodel line= %s\n", buffer); #endif (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; #endif /* XSPICE */ case 'r': case 'c': case 'l': name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok_node(&t); /* get first netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get second netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); if (*t) { /* if there is a model, process it. . . . */ name = gettok(&t); wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); } if (*t) { name = gettok(&t); wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); } (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; case 'd': name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok_node(&t); /* get first attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get second attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; case 'u': /* urc transmissionline */ /* 3 terminal devices */ case 'w': /* current controlled switch */ case 'j': /* jfet */ case 'z': /* hfet, mesa */ name = gettok(&t); (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok(&t); (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; /* 4 terminal devices */ case 'o': /* ltra */ case 's': /* vc switch */ case 'y': /* txl */ /* Changed gettok() to gettok_node() on 12.2.2003 by SDB to enable parsing lines like "S1 10 11 (80,51) SLATCH1" which occur in real Analog Devices SPICE models. */ name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok_node(&t); /* get first attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get second attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get third attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get fourth attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; tfree(name); break; /* 4-7 terminal mos devices */ case 'm': name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok_node(&t); /* get first attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get second attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get third attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get fourth attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); found = 0; while (!found) { /* Now, is this a subcircuit model? */ for (wlsub = submod; wlsub; wlsub = wlsub->wl_next) { /* FIXME, probably too unspecific */ int i = (int) strlen(wlsub->wl_word); int j = 0; /* Now, have we a binned model? */ char* dot_char; if ((dot_char = strstr(wlsub->wl_word, ".")) != NULL) { dot_char++; j++; while (*dot_char != '\0') { if (!isdigit(*dot_char)) { break; } dot_char++; j++; } } if (strncmp(name, wlsub->wl_word, (size_t) (i - j)) == 0) { found = 1; break; } } if (!found) { /* name was not a model - was a netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); if (name == NULL) { name = copy(""); /* allow 'tfree' */ break; } } } /* while */ if (!found) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; tfree(name); break; /* 3-5 terminal bjt devices */ case 'q': name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); name = gettok_node(&t); /* get first attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get second attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* get third attached netname */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok_node(&t); /* this can be either a model name or a node name. */ wlsub = wl_find(name, submod); if (!wlsub) if (*t) { /* There is another token - perhaps a model */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); wlsub = wl_find(name, submod); } #ifdef ADMS if (!wlsub) if (*t) { /* There is another token - perhaps a model */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); name = gettok(&t); wlsub = wl_find(name, submod); } #endif if (!wlsub) /* Fallback w/o subckt name before */ (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; /* 4-18 terminal devices */ case 'p': /* cpl */ name = gettok(&t); /* get refdes */ (void) sprintf(buffer, "%s ", name); tfree(name); /* now do remainder of line. */ next_name = gettok(&t); for (;;) { name = next_name; next_name = gettok(&t); if (!next_name || strstr(next_name, "len")) { /* if next_name is NULL or len or length, we are at the line end. * name holds the model name. Therefore, break */ break; } else { /* next_name holds something. Write name into the buffer and continue. */ (void) sprintf(buffer + strlen(buffer), "%s ", name); tfree(name); } } /* while */ wlsub = wl_find(name, submod); if (!wlsub) (void) sprintf(buffer + strlen(buffer), "%s ", name); else (void) sprintf(buffer + strlen(buffer), "%s:%s ", subname, name); tfree(name); (void) strcat(buffer, t); tfree(s->li_line); s->li_line = buffer; break; default: tfree(buffer); break; } } } /*----------------------------------------------------------------------* * inp_numnodes returns the number of nodes (netnames) attached to the * component. * This is a spice-dependent thing. It should probably go somewhere * else, but... Note that we pretend that dependent sources and mutual * inductors have more nodes than they really do... *----------------------------------------------------------------------*/ static int inp_numnodes(char c) { if (isupper(c)) c = (char) tolower(c); switch (c) { case ' ': case '\t': case '.': case 'x': case '*': case '$': return (0); case 'b': return (2); case 'c': return (2); case 'd': return (2); case 'e': return (2); /* changed from 4 to 2 by SDB on 4.22.2003 to enable POLY */ case 'f': return (2); case 'g': return (2); /* changed from 4 to 2 by SDB on 4.22.2003 to enable POLY */ case 'h': return (2); case 'i': return (2); case 'j': return (3); case 'k': return (0); case 'l': return (2); case 'm': return (7); /* This means that 7 is the maximun number of nodes */ case 'o': return (4); case 'p': return (18);/* 16 lines + 2 gnd is the maximum number of nodes for CPL */ case 'q': return (5); case 'r': return (2); case 's': return (4); case 't': return (4); case 'u': return (3); case 'v': return (2); case 'w': return (2); /* change 3 to 2 here to fix w bug, NCF 1/31/95 */ case 'y': return (4); case 'z': return (3); default: fprintf(cp_err, "Warning: unknown device type: %c\n", c); return (2); } } ngspice-26/src/frontend/signal_handler.h0000644000265600020320000000067312264261473017770 0ustar andreasadmin/************* * Header file for signal_handler.c * 1999 E. Rouat ************/ #ifndef ngspice_SIGNAL_HANDLER_H #define ngspice_SIGNAL_HANDLER_H RETSIGTYPE ft_sigintr(void); RETSIGTYPE sigfloat(int sig, int code); RETSIGTYPE sigstop(void); RETSIGTYPE sigcont(void); RETSIGTYPE sigill(void); RETSIGTYPE sigbus(void); RETSIGTYPE sigsegv(void); RETSIGTYPE sig_sys(void); extern JMP_BUF jbuf; extern void ft_sigintr_cleanup(void); #endif ngspice-26/src/frontend/postsc.h0000644000265600020320000000101112264261473016314 0ustar andreasadmin/************* * Header file for postsc.c * 1999 E. Rouat ************/ #ifndef ngspice_POSTSC_H #define ngspice_POSTSC_H disp_fn_Init_t PS_Init; disp_fn_NewViewport_t PS_NewViewport; disp_fn_Close_t PS_Close; disp_fn_Clear_t PS_Clear; disp_fn_DrawLine_t PS_DrawLine; disp_fn_Arc_t PS_Arc; disp_fn_Text_t PS_Text; disp_fn_SetLinestyle_t PS_SetLinestyle; disp_fn_SetColor_t PS_SetColor; disp_fn_Update_t PS_Update; #endif ngspice-26/src/frontend/measure.c0000644000265600020320000004000012264261473016436 0ustar andreasadmin/* Routines to evaluate the .measure cards. Entry point is function do_measure(), called by fcn dosim() from runcoms.c:335, after simulation is finished. In addition it contains the fcn com_meas(), which provide the interactive 'meas' command. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/dvec.h" #include "rawfile.h" #include "variable.h" #include "numparam/numpaif.h" #include "ngspice/missing_math.h" #include "com_measure2.h" #include "com_let.h" #include "com_commands.h" #include "com_display.h" static wordlist *measure_parse_line(char *line); extern bool ft_batchmode; extern bool rflag; /* measure in interactive mode: meas command inside .control ... .endc loop or manually entered. meas has to be followed by the standard tokens (see measure_extract_variables()). The result is put into a vector with name "result" */ void com_meas(wordlist *wl) { /* wl: in, input line of meas command */ char *line_in, *outvar, newvec[1000]; wordlist *wl_count, *wl_let; char *vec_found, *token, *equal_ptr, newval[256]; wordlist *wl_index; struct dvec *d; int err = 0; int fail; double result = 0; if (!wl) { com_display(NULL); return; } wl_count = wl; /* check each wl entry, if it contain '=' and if the following token is a single valued vector. If yes, replace this vector by its value. Vectors may stem from other meas commands, or be generated elsewhere within the .control .endc script. All other right hand side vectors are treated in com_measure2.c. */ wl_index = wl; while (wl_index) { token = wl_index->wl_word; /* find the vector vec_found, next token after each '=' sign. May be in the next wl_word */ if (token[strlen(token) - 1] == '=') { wl_index = wl_index->wl_next; vec_found = wl_index->wl_word; /* token may be already a value, maybe 'LAST', which we have to keep, or maybe a vector */ if (!cieq(vec_found, "LAST")) { INPevaluate(&vec_found, &err, 1); /* if not a valid number */ if (err) { /* check if vec_found is a valid vector */ d = vec_get(vec_found); /* Only if we have a single valued vector, replacing of the rigt hand side does make sense */ if (d && (d->v_length == 1) && (d->v_numdims == 1)) { /* get its value */ sprintf(newval, "%e", d->v_realdata[0]); tfree(vec_found); wl_index->wl_word = copy(newval); } } } } /* may be inside the same wl_word */ else if ((equal_ptr = strstr(token, "=")) != NULL) { vec_found = equal_ptr + 1; if (!cieq(vec_found, "LAST")) { INPevaluate(&vec_found, &err, 1); if (err) { d = vec_get(vec_found); /* Only if we have a single valued vector, replacing of the rigt hand side does make sense */ if (d && (d->v_length == 1) && (d->v_numdims == 1)) { *equal_ptr = '\0'; sprintf(newval, "%s=%e", token, d->v_realdata[0]); // memory leak with first part of vec_found ? tfree(token); wl_index->wl_word = copy(newval); } } } } else { ; // nothing } wl_index = wl_index->wl_next; } line_in = wl_flatten(wl); /* get output var name */ wl_count = wl_count->wl_next; if (!wl_count) { fprintf(stdout, " meas %s failed!\n" " unspecified output var name\n\n", line_in); return; } outvar = wl_count->wl_word; fail = get_measure2(wl, &result, NULL, FALSE); if (fail) { fprintf(stdout, " meas %s failed!\n\n", line_in); return; } sprintf(newvec, "%s = %e", outvar, result); wl_let = wl_cons(copy(newvec), NULL); com_let(wl_let); wl_free(wl_let); tfree(line_in); } static bool chkAnalysisType(char *an_type) { /* only support tran, dc, ac, sp analysis type for now */ if (strcmp(an_type, "tran") != 0 && strcmp(an_type, "ac") != 0 && strcmp(an_type, "dc") != 0 && strcmp(an_type, "sp") != 0) return FALSE; else return TRUE; } /* Gets pointer to double value after 'xxx=' and advances pointer of *line. On error returns FALSE. */ static bool get_double_value( char **line, /*in|out: pointer to line to be parsed */ char *name, /*in: xxx e.g. 'val' from 'val=0.5' */ double *value, /*out: return value (e.g. 0.5) from 'val=0.5'*/ bool just_chk_meas /* in: just check measurement if true */ ) { char *token = gettok(line); bool return_val = TRUE; char *equal_ptr, *junk; int err = 0; if (name && (strncmp(token, name, strlen(name)) != 0)) { if (just_chk_meas != TRUE) fprintf(cp_err, "Error: syntax error for measure statement; expecting next field to be '%s'.\n", name); return_val = FALSE; } else { /* see if '=' is last char of current token -- implies we need to read value in next token */ if (token[strlen(token) - 1] == '=') { txfree(token); junk = token = gettok(line); *value = INPevaluate(&junk, &err, 1); } else { if ((equal_ptr = strstr(token, "=")) != NULL) { equal_ptr += 1; *value = INPevaluate(&equal_ptr, &err, 1); } else { if (just_chk_meas != TRUE) fprintf(cp_err, "Error: syntax error for measure statement; missing '='!\n"); return_val = FALSE; } } if (err) { if (just_chk_meas != TRUE) fprintf(cp_err, "Error: Bad value.\n"); return_val = FALSE; } } txfree(token); return return_val; } /* Entry point for .meas evaluation. Called in fcn dosim() from runcoms.c:335, after simulation is finished with chk_only set to FALSE. Called from fcn check_autostop(), with chk_only set to TRUE (no printouts, no params set). This function returns TRUE if all measurements are ready and complete; FALSE otherwise. If called with chk_only, we can exit early if we fail a test in order to reduce execution time. */ bool do_measure( char *what, /*in: analysis type*/ bool chk_only /*in: TRUE if checking for "autostop", FALSE otherwise*/ ) { struct line *meas_card, *meas_results = NULL, *end = NULL, *newcard; char *line, *an_name, *an_type, *resname, *meastype, *str_ptr, out_line[1000]; int ok = 0; int fail; int num_failed = 0; double result = 0; bool first_time = TRUE; bool measures_passed; wordlist *measure_word_list; int precision = measure_get_precision(); #ifdef HAS_PROGREP if (!chk_only) SetAnalyse("meas", 0); #endif an_name = strdup(what); /* analysis type, e.g. "tran" */ strtolower(an_name); measure_word_list = NULL; measures_passed = TRUE; /* don't allow .meas if batchmode is set by -b and -r rawfile given */ if (ft_batchmode && rflag) { fprintf(cp_err, "\nNo .measure possible in batch mode (-b) with -r rawfile set!\n"); fprintf(cp_err, "Remove rawfile and use .print or .plot or\n"); fprintf(cp_err, "select interactive mode (optionally with .control section) instead.\n\n"); return (measures_passed); } /* don't allow autostop if no .meas commands are given in the input file */ if ((cp_getvar("autostop", CP_BOOL, NULL)) && (ft_curckt->ci_meas == NULL)) { fprintf(cp_err, "\nWarning: No .meas commands found!\n"); fprintf(cp_err, " Option autostop is not available, ignored!\n\n"); cp_remvar("autostop"); return (FALSE); } /* Evaluating the linked list of .meas cards, assembled from the input deck by fcn inp_spsource() in inp.c:575. A typical .meas card will contain: parameter value nameof card .meas(ure) analysis type tran only tran available currently result name myout defined by user measurement type trig|delay|param|expr|avg|mean|max|min|rms|integ(ral)|when The measurement type determines how to continue the .meas card. param|expr are skipped in first pass through .meas cards and are treated in second pass, all others are treated in fcn get_measure2() (com_measure2.c). */ /* first pass through .meas cards: evaluate everything except param|expr */ for (meas_card = ft_curckt->ci_meas; meas_card != NULL; meas_card = meas_card->li_next) { line = meas_card->li_line; txfree(gettok(&line)); /* discard .meas */ an_type = gettok(&line); resname = gettok(&line); meastype = gettok(&line); if (chkAnalysisType(an_type) != TRUE) { if (!chk_only) { fprintf(cp_err, "Error: unrecognized analysis type '%s' for the following .meas statement on line %d:\n", an_type, meas_card->li_linenum); fprintf(cp_err, " %s\n", meas_card->li_line); } txfree(an_type); txfree(resname); txfree(meastype); continue; } /* print header before evaluating first .meas line */ else if (first_time) { first_time = FALSE; if (!chk_only && strcmp(an_type, "tran") == 0) { fprintf(stdout, "\n Measurements for Transient Analysis\n\n"); } } /* skip param|expr measurement types for now -- will be done after other measurements */ if (strncmp(meastype, "param", 5) == 0 || strncmp(meastype, "expr", 4) == 0) continue; /* skip .meas line, if analysis type from line and name of analysis performed differ */ if (strcmp(an_name, an_type) != 0) { txfree(an_type); txfree(resname); txfree(meastype); continue; } /* New way of processing measure statements using common code in fcn get_measure2() (com_measure2.c)*/ out_line[0] = '\0'; measure_word_list = measure_parse_line(meas_card->li_line); if (measure_word_list) { fail = get_measure2(measure_word_list, &result, out_line, chk_only); if (fail) { measures_passed = FALSE; if (!chk_only) fprintf(stderr, " %s failed!\n\n", meas_card->li_line); num_failed++; if (chk_only) { /* added for speed - cleanup last parse and break */ txfree(an_type); txfree(resname); txfree(meastype); wl_free(measure_word_list); break; } } else { if (!chk_only) nupa_add_param(resname, result); } wl_free(measure_word_list); } else { measures_passed = FALSE; num_failed++; } if (!chk_only) { newcard = alloc(struct line); newcard->li_line = strdup(out_line); newcard->li_next = NULL; if (meas_results == NULL) { meas_results = end = newcard; } else { end->li_next = newcard; end = newcard; } } txfree(an_type); txfree(resname); txfree(meastype); } /* end of for loop (first pass through .meas lines) */ if (chk_only) { tfree(an_name); return (measures_passed); } /* second pass through .meas cards: now do param|expr .meas statements */ newcard = meas_results; for (meas_card = ft_curckt->ci_meas; meas_card != NULL; meas_card = meas_card->li_next) { line = meas_card->li_line; txfree(gettok(&line)); /* discard .meas */ an_type = gettok(&line); resname = gettok(&line); meastype = gettok(&line); if (chkAnalysisType(an_type) != TRUE) { if (!chk_only) { fprintf(cp_err, "Error: unrecognized analysis type '%s' for the following .meas statement on line %d:\n", an_type, meas_card->li_linenum); fprintf(cp_err, " %s\n", meas_card->li_line); } txfree(an_type); txfree(resname); txfree(meastype); continue; } if (strcmp(an_name, an_type) != 0) { txfree(an_type); txfree(resname); txfree(meastype); continue; } if (strncmp(meastype, "param", 5) != 0 && strncmp(meastype, "expr", 4) != 0) { if (!chk_only) fprintf(stdout, "%s", newcard->li_line); end = newcard; newcard = newcard->li_next; txfree(end->li_line); txfree(end); txfree(an_type); txfree(resname); txfree(meastype); continue; } if (!chk_only) fprintf(stdout, "%-20s=", resname); if (!chk_only) { ok = nupa_eval(meas_card->li_line, meas_card->li_linenum, meas_card->li_linenum_orig); if (ok) { str_ptr = strstr(meas_card->li_line, meastype); if (!get_double_value(&str_ptr, meastype, &result, chk_only)) { if (!chk_only) fprintf(stdout, " failed\n"); } else { if (!chk_only) fprintf(stdout, " %.*e\n", precision, result); nupa_add_param(resname, result); } } else { if (!chk_only) fprintf(stdout, " failed\n"); } } txfree(an_type); txfree(resname); txfree(meastype); } if (!chk_only) fprintf(stdout, "\n"); txfree(an_name); fflush(stdout); return(measures_passed); } /* called from dctran.c:470, if timepoint is accepted. Returns TRUE if measurement (just a check, no output) has been successful. If TRUE is returned, transient simulation is stopped. Returns TRUE if "autostop" has been set as an option and if do_measure passes all tests and thereby returns TRUE. 'what' is set to "tran". */ bool check_autostop(char* what) { bool flag = FALSE; if (cp_getvar("autostop", CP_BOOL, NULL)) flag = do_measure(what, TRUE); return flag; } /* parses the .meas line into a wordlist (without leading .meas) */ static wordlist * measure_parse_line(char *line) { size_t len; /* length of string */ wordlist *wl; /* build a word list - head of list */ wordlist *new_item; /* single item of a list */ char *item; /* parsed item */ char *long_str; /* concatenated string */ char *extra_item; /* extra item */ wl = NULL; txfree(gettok(&line)); do { item = gettok(&line); if (!(item)) break; len = strlen(item); if (item[len-1] == '=') { /* We can't end on an equal append the next piece */ extra_item = gettok(&line); if (!(extra_item)) break; len += strlen(extra_item) + 2; long_str = TMALLOC(char, len); sprintf(long_str, "%s%s", item, extra_item); txfree(item); txfree(extra_item); item = long_str; } new_item = wl_cons(item, NULL); wl = wl_append(wl, new_item); } while (line && *line); return (wl); } ngspice-26/src/frontend/hcomp.c0000644000265600020320000000040112264261473016104 0ustar andreasadmin#include "ngspice/cpdefs.h" #include #include "hcomp.h" int hcomp(const void *a, const void *b) { struct comm **c1 = (struct comm **) a; struct comm **c2 = (struct comm **) b; return (strcmp((*c1)->co_comname, (*c2)->co_comname)); } ngspice-26/src/frontend/help/0000755000265600020320000000000012264261704015564 5ustar andreasadminngspice-26/src/frontend/help/textdisp.c0000644000265600020320000001120112264261473017572 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * faustus@cad.berkeley.edu, ucbvax!faustus * Permission is granted to modify and re-distribute this code in any manner * as long as this notice is preserved. All standard disclaimers apply. * */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" static topic *curtop; static bool quitflag; static void putline(char *s); static int putstuff(toplink *tl, int base); int hlp_width = 72; bool hlp_tdisplay(topic *top) { wordlist *wl; int i = 0; curtop = top; out_init(); out_printf("\n\t%s\n", top->title); for (wl = top->text; wl; wl = wl->wl_next) putline(wl->wl_word); if (top->subtopics) { out_printf("\tSub-Topics:\n\n"); i = putstuff(top->subtopics, 0); } if (top->seealso) { out_printf("\n\tSee Also:\n\n"); (void) putstuff(top->seealso, i); } out_printf("\n"); return (TRUE); } toplink * hlp_thandle(topic **parent) { char buf[BSIZE_SP], *s; toplink *tl; int num; quitflag = FALSE; if (!curtop) { *parent = NULL; return (NULL); } for (;;) { fprintf(cp_out, "Selection (`?' for help): "); (void) fflush(cp_out); if (!fgets(buf, BSIZE_SP, cp_in)) { clearerr(stdin); quitflag = TRUE; *parent = NULL; return (NULL); } for (s = buf; *s && isspace(*s); s++) ; switch (*s) { case '?': fprintf(cp_out, "\n" "Type the number of a sub-topic or see also, or one of:\n" "\tr\tReprint the current topic\n" "\tp or CR\tReturn to the previous topic\n" "\tq\tQuit help\n" "\t?\tPrint this message\n" "\n"); continue; case 'r': (void) hlp_tdisplay(curtop); continue; case 'q': quitflag = TRUE; *parent = NULL; return (NULL); case 'p': case '\n': case '\r': case '\0': *parent = curtop; return (NULL); } if (!isdigit(*s)) { fprintf(cp_err, "Invalid command\n"); continue; } num = atoi(s); if (num <= 0) { fprintf(cp_err, "Bad choice.\n"); continue; } for (tl = curtop->subtopics; tl; tl = tl->next) if (--num == 0) break; if (num) { for (tl = curtop->seealso; tl; tl = tl->next) if (--num == 0) break; } if (num) { fprintf(cp_err, "Bad choice.\n"); continue; } *parent = curtop; return (tl); } } /* ARGSUSED */ void hlp_tkillwin(topic *top) { NG_IGNORE(top); if (curtop) curtop = curtop->parent; if (curtop && !quitflag) (void) hlp_tdisplay(curtop); } /* This has to rip out the font changes from the lines... */ static void putline(char *s) { char buf[BSIZE_SP]; int i = 0; while (*s) { if (((*s == '\033') && s[1]) || ((*s == '_') && (s[1] == '\b'))) s += 2; else buf[i++] = *s++; } buf[i] = '\0'; out_printf("%s\n", buf); } /* Figure out the number of columns we can use. Assume an entry like * nn) word -- add 5 characters to the width... */ static int putstuff(toplink *tl, int base) { int maxwidth = 0; int ncols, nrows, nbuts = 0, i, j, k; toplink *tt; for (tt = tl; tt; tt = tt->next) { if (maxwidth < (int) strlen(tt->description)) maxwidth = (int) strlen(tt->description); nbuts++; } ncols = hlp_width / (maxwidth + 5); if (ncols < 1) { fprintf(stderr, "Help, button too big!!\n"); return (0); } if (ncols > nbuts) ncols = nbuts; maxwidth = hlp_width / ncols; /* round up */ nrows = (nbuts + ncols - 1) / ncols; for (i = 0; i < nrows; i++) { for (tt = tl, j = 0; j < i; j++, tt = tt->next) ; for (j = 0; j < ncols; j++) { if (tt) out_printf("%2d) %-*s ", base + j * nrows + i + 1, maxwidth - 5, tt->description); for (k = 0; k < nrows; k++) if (tt) tt = tt->next; } out_printf("\n"); } return (nbuts); } ngspice-26/src/frontend/help/readhelp.c0000644000265600020320000002165412264261473017527 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified 1999 Emmanuel Rouat **********/ /* * SJB 20 May 2001 * Bug fix in help_read() * findsubject() now ignores case and does additional searches for partial matches * when a complete match is not found - additional code based on code in MacSpice. */ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" static char *getsubject(fplace *place); static toplink *getsubtoplink(char **ss); static topic *alltopics = NULL; static fplace *copy_fplace(fplace *place); static int sortcmp(const void *a, const void *b) { toplink **tlp1 = (toplink **) a; toplink **tlp2 = (toplink **) b; return (strcmp((*tlp1)->description, (*tlp2)->description)); } static void sortlist(toplink **tlp) { toplink **vec, *tl; size_t num = 0, i; for (tl = *tlp; tl; tl = tl->next) num++; if (!num) return; vec = TMALLOC(toplink *, num); for (tl = *tlp, i = 0; tl; tl = tl->next, i++) vec[i] = tl; (void) qsort(vec, num, sizeof (toplink *), sortcmp); *tlp = vec[0]; for (i = 0; i < num - 1; i++) vec[i]->next = vec[i + 1]; vec[i]->next = NULL; tfree(vec); } topic * hlp_read(fplace *place) { char buf[BSIZE_SP]; topic *top = alloc(topic); toplink *topiclink; toplink *tl, *tend = NULL; wordlist *end = NULL; int i, fchanges; char *s; bool mof = FALSE; if (!place) return 0; top->place = copy_fplace(place); /* get the title */ if (!place->fp) place->fp = hlp_fopen(place->filename); if (!place->fp) return (NULL); fseek(place->fp, place->fpos, SEEK_SET); (void) fgets(buf, BSIZE_SP, place->fp); /* skip subject */ (void) fgets(buf, BSIZE_SP, place->fp); for (s = buf; *s && (*s != '\n'); s++) ; *s = '\0'; top->title = copy(&buf[7]); /* don't copy "TITLE: " */ /* get the text */ /* skip to TEXT: */ while (fgets(buf, BSIZE_SP, place->fp)) { if (!strncmp("TEXT: ", buf, 6)) break; if ((*buf == '\0') || /* SJB - bug fix */ !strncmp("SEEALSO: ", buf, 9) || !strncmp("SUBTOPIC: ", buf, 10)) { /* no text */ top->text = NULL; goto endtext; } } mof = TRUE; while (mof && !strncmp("TEXT: ", buf, 6)) { for (s = &buf[6], fchanges = 0; *s && (*s != '\n'); s++) if (((s[0] == '\033') && s[1]) || ((s[0] == '_') && (s[1] == '\b'))) fchanges++; *s = '\0'; wl_append_word(&(top->text), &end, copy(&buf[6])); top->numlines++; i = (int) strlen(&buf[6]) - fchanges; if (top->maxcols < i) top->maxcols = i; mof = fgets(buf, BSIZE_SP, place->fp) == NULL ? FALSE : TRUE; } endtext: /* get subtopics */ while(mof && !strncmp("SUBTOPIC: ", buf, 10)) { s = &buf[10]; /* process tokens within line, updating pointer */ while (*s) { if ((topiclink = getsubtoplink(&s)) != NULL) { if (tend) tend->next = topiclink; else top->subtopics = topiclink; tend = topiclink; } } mof = fgets(buf, BSIZE_SP, place->fp) == NULL ? FALSE : TRUE; } /* get see alsos */ tend = NULL; while(mof && !strncmp("SEEALSO: ", buf, 9)) { s = &buf[9]; /* process tokens within line, updating pointer */ while (*s) { if ((topiclink = getsubtoplink(&s)) != NULL) { if (tend) tend->next = topiclink; else top->seealso = topiclink; tend = topiclink; } } mof = fgets(buf, BSIZE_SP, place->fp) == NULL ? FALSE : TRUE; } /* Now we have to fill in the subjects for the seealsos and subtopics. */ for (tl = top->seealso; tl; tl = tl->next) tl->description = getsubject(tl->place); for (tl = top->subtopics; tl; tl = tl->next) tl->description = getsubject(tl->place); sortlist(&top->seealso); /* sortlist(&top->subtopics); It looks nicer if they are in the original order */ top->readlink = alltopics; alltopics = top; return (top); } /* *ss is of the form filename:subject */ static toplink * getsubtoplink(char **ss) { toplink *tl; char *tmp, *s, *t; char subject[BSIZE_SP]; if (!**ss) return (NULL); s = *ss; tl = alloc(toplink); if ((tmp =strchr(s, ':')) != NULL) { tl->place = alloc(fplace); tl->place->filename = strncpy(TMALLOC(char, tmp - s + 1), s, (size_t) (tmp - s)); tl->place->filename[tmp - s] = '\0'; strtolower(tl->place->filename); /* see if filename is on approved list */ if (!hlp_approvedfile(tl->place->filename)) { tfree(tl->place); tfree(tl); /* skip up to next comma or newline */ while (*s && *s != ',' && *s != '\n') s++; while (*s && (*s == ',' || *s == ' ' || *s == '\n')) s++; *ss = s; return (NULL); } tl->place->fp = hlp_fopen(tl->place->filename); for (s = tmp + 1, t = subject; *s && *s != ',' && *s != '\n'; s++) *t++ = *s; *t = '\0'; tl->place->fpos = findsubject(tl->place->filename, subject); if (tl->place->fpos == -1) { tfree(tl->place); tfree(tl); while (*s && (*s == ',' || *s == ' ' || *s == '\n')) s++; *ss = s; return (NULL); } } else { fprintf(stderr, "bad filename:subject pair %s\n", s); /* skip up to next free space */ while (*s && *s != ',' && *s != '\n') s++; while (*s && (*s == ',' || *s == ' ' || *s == '\n')) s++; *ss = s; tfree(tl->place); tfree(tl); return (NULL); } while (*s && (*s == ',' || *s == ' ' || *s == '\n')) s++; *ss = s; return (tl); } /* returns a file position, -1 on error */ long findsubject(char *filename, char *subject) { FILE *fp; char buf[BSIZE_SP]; struct hlp_index indexitem; if (!filename) { return -1; } /* open up index for filename */ sprintf(buf, "%s%s%s.idx", hlp_directory, DIR_PATHSEP, filename); hlp_pathfix(buf); if ((fp = fopen(buf, "rb")) == NULL) { perror(buf); return (-1); } /* try it exactly (but ignore case) */ while(fread(&indexitem, sizeof (struct hlp_index), 1, fp)) { if (!strncasecmp(subject, indexitem.subject, 64)) { /* sjb - ignore case */ fclose(fp); return (indexitem.fpos); } } fclose(fp); if ((fp = fopen(buf, "rb")) == NULL) { perror(buf); return (-1); } /* try it abbreviated (ignore case) */ while(fread(&indexitem, sizeof (struct hlp_index), 1, fp)) { if (!strncasecmp(indexitem.subject,subject, strlen(subject))) { fclose(fp); return (indexitem.fpos); } } fclose(fp); if ((fp = fopen(buf, "rb")) == NULL) { perror(buf); return (-1); } /* try it within */ /* FIXME: need a case independent version of strstr() */ while(fread(&indexitem, sizeof (struct hlp_index), 1, fp)) { if (strstr(indexitem.subject,subject)) { fclose(fp); return (indexitem.fpos); } } fclose(fp); return (-1); } static char * getsubject(fplace *place) { char buf[BSIZE_SP], *s; if (!place->fp) place->fp = hlp_fopen(place->filename); if (!place->fp) return(NULL); fseek(place->fp, place->fpos, SEEK_SET); (void) fgets(buf, BSIZE_SP, place->fp); for (s = buf; *s && (*s != '\n'); s++) ; *s = '\0'; return (copy(&buf[9])); /* don't copy "SUBJECT: " */ } static void tlfree(toplink *tl) { toplink *nt = NULL; while (tl) { tfree(tl->description); tfree(tl->place->filename); tfree(tl->place); /* Don't free the button stuff... */ nt = tl->next; tfree(tl); tl = nt; } } void hlp_free(void) { topic *top, *nt = NULL; for (top = alltopics; top; top = nt) { nt = top->readlink; tfree(top->title); tfree(top->place); wl_free(top->text); tlfree(top->subtopics); tlfree(top->seealso); tfree(top); } alltopics = NULL; } static fplace * copy_fplace(fplace *place) { fplace *newplace; newplace = TMALLOC(fplace, 1); newplace->filename = copy(place->filename); newplace->fpos = place->fpos; newplace->fp = place->fp; return (newplace); } ngspice-26/src/frontend/help/ChangeLog0000644000265600020320000000156612264261473017351 0ustar andreasadmin1999-08-12 Emmanuel Rouat * x11disp.c: made a cast to (XtCallbackProc) when necessary * readhelp.c: sanitised the code slighly * *.c: changed functions from K&R into ANSI using protoize 1999-08-08 Emmanuel Rouat * xdisplay.c: removed all X10 related code * Makefile.am (DEFS): removed -DWANT_MFB (don't need it) 1999-08-03 Emmanuel Rouat * readhelp.c: HAVE_SYS_DIR_H and HAVE_DIRENT_H instead of HAS_BSDDIRS and HAS_SYSVDIRS. 1999-07-31 Emmanuel Rouat * Makefile.am: added @X_CFLAGS@ in INCLUDES list and removed unused LIBS 28-07-1999 emmanuel.rouat@wanadoo.fr (Manu Rouat) * help.c: * provide.c: * x11disp.c: changed HAS_X11 define to X_DISPLAY_MISSING, which is supplied by autoconf in config.h * removed -DWANT_X11 in Makefile.am ngspice-26/src/frontend/help/help.c0000644000265600020320000000732112264261473016666 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified 1999 Emmanuel Rouat **********/ /* * The main entry point for the help system. */ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" extern char *cp_tildexpand(char *string); char *hlp_directory; extern char *hlp_filelist[]; int hlp_ftablesize = 0; void hlp_main(char *path, wordlist *wl) { topic *top; fplace *place; hlp_directory = path; if (wl) { while (wl) { if ((place = findglobalsubject(wl->wl_word)) == NULL) { fprintf(stderr, "Error: No such topic: %s\n", wl->wl_word); wl = wl->wl_next; continue; } if ((top = hlp_read(place)) == NULL) { fprintf(stderr, "Error: can't read topic\n"); wl = wl->wl_next; continue; } hlp_provide(top); wl = wl->wl_next; } } else { if ((place = findglobalsubject("main")) == NULL) { fprintf(stderr, "Error: no main topic\n"); return; } if ((top = hlp_read(place)) == NULL) { fprintf(stderr, "Error: can't read topic\n"); return; } hlp_provide(top); } #ifdef X_DISPLAY_MISSING hlp_free(); #endif } fplace * findglobalsubject(char *subject) { fplace *place; char **dict; long fpos; place = 0; for (dict = hlp_filelist; *dict && **dict; dict++) { fpos = findsubject(*dict, subject); if (fpos != -1) { place = TMALLOC(fplace, 1); place->fpos = fpos; place->filename = copy(*dict); place->fp = hlp_fopen(*dict); break; } } return (place); } /* see if file is on filelist */ bool hlp_approvedfile(char *filename) { char **s; for (s = hlp_filelist; *s && **s; s++) if (cieq(*s, filename)) return (TRUE); return (FALSE); } /* keep file pointers on top level files so we don't always have to do fopen's */ FILE * hlp_fopen(char *filename) { static struct { char filename[BSIZE_SP]; FILE *fp; } hlp_ftable[32]; int i; char buf[BSIZE_SP]; for (i = 0; i < hlp_ftablesize; i++) if (cieq(filename, hlp_ftable[i].filename)) return (hlp_ftable[i].fp); /* not already in table */ strcpy(buf, hlp_directory); /* set up pathname */ strcat(buf, DIR_PATHSEP); strcat(buf, filename); strcat(buf, ".txt"); hlp_pathfix(buf); if ((hlp_ftable[hlp_ftablesize].fp = fopen(buf, "r")) == NULL) { perror(buf); return (NULL); } strcpy(hlp_ftable[hlp_ftablesize].filename, filename); hlp_ftablesize++; return (hlp_ftable[hlp_ftablesize - 1].fp); } /* ARGSUSED */ void hlp_pathfix(char *buf) { char *s, *t, *u, bufx[1025]; char *dir_pathsep; dir_pathsep = DIR_PATHSEP; if (!buf) return; s = cp_tildexpand(buf); if (sizeof(DIR_PATHSEP) == 2) { if (*dir_pathsep != '/') { for (t = s; *t; t++) { if (*t == '/') *t = *dir_pathsep; } } else strcpy(buf, s); } else { /* For vms; this probably doesn't work, but neither did the old code */ for (s = bufx, t = buf; *t; t++) { if (*t == '/') for (u = DIR_PATHSEP; *u; u++) *s++ = *u; else *s++ = *t; } *s = '\0'; strcpy(buf, s); } if (s) tfree(s); } ngspice-26/src/frontend/help/xdisplay.c0000644000265600020320000000171712264261473017576 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified 1999 Emmanuel Rouat **********/ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" char *hlp_boldfontname = BOLD_FONT; char *hlp_regfontname = REG_FONT; char *hlp_italicfontname = ITALIC_FONT; char *hlp_titlefontname = TITLE_FONT; char *hlp_buttonfontname = BUTTON_FONT; char *hlp_displayname = NULL; int hlp_initxpos = START_XPOS; int hlp_initypos = START_YPOS; int hlp_buttonstyle = BS_LEFT; #ifdef X_DISPLAY_MISSING bool hlp_xdisplay(topic *top) { NG_IGNORE(top); return (FALSE); } void hlp_xkillwin(topic *top) { NG_IGNORE(top); } #endif void hlp_xwait(topic *top, bool on) { NG_IGNORE(on); NG_IGNORE(top); } void hlp_xclosedisplay(void) { } toplink * hlp_xhandle(topic **pp) { *pp = NULL; return (NULL); } ngspice-26/src/frontend/help/provide.c0000644000265600020320000000714612264261473017413 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified 1999 Emmanuel Rouat **********/ /* * faustus@cad.berkeley.edu, ucbvax!faustus * Permission is granted to modify and re-distribute this code in any manner * as long as this notice is preserved. All standard disclaimers apply. * * Toss the help window up on the screen, and deal with the graph... */ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" #include "ngspice/hlpdefs.h" #include "ngspice/suffix.h" bool hlp_usex = FALSE; void hlp_provide(topic *top) { toplink *res; topic *parent, *newtop; if (!top) return; #ifndef X_DISPLAY_MISSING if (getenv("DISPLAY") || hlp_displayname) hlp_usex = TRUE; #endif top->xposition = top->yposition = 0; if (hlp_usex) { if (!hlp_xdisplay(top)) { fprintf(stderr, "Couldn't open X display.\n"); return; } } else { if (!hlp_tdisplay(top)) { fprintf(stderr, "Couldn't display text\n"); return; } } #ifndef X_DISPLAY_MISSING /* X11 does this asynchronously */ if (hlp_usex) return; #endif for (;;) { if (hlp_usex) res = hlp_xhandle(&parent); else res = hlp_thandle(&parent); if (!res && !parent) { /* No more windows. */ hlp_killfamily(top); if (hlp_usex) hlp_xclosedisplay(); /* need to change display pointer back J.H. */ return; } if (res) { /* Create a new window... */ if (hlp_usex) hlp_xwait(parent, TRUE); if ((newtop = hlp_read(res->place)) == NULL) { fprintf(stderr, "Internal error: bad link\n"); hlp_xwait(parent, FALSE); continue; } if (hlp_usex) hlp_xwait(parent, FALSE); newtop->next = parent->children; parent->children = newtop; newtop->parent = parent; newtop->xposition = parent->xposition + 50; newtop->yposition = parent->yposition + 50; if (hlp_usex) { if (!hlp_xdisplay(newtop)) { fprintf(stderr, "Couldn't open win\n"); return; } } else { if (!hlp_tdisplay(newtop)) { fprintf(stderr, "Couldn't display\n"); return; } } } else { /* Blow this one and its descendants away. */ hlp_killfamily(parent); hlp_fixchildren(parent); if (parent == top) return; } } } void hlp_fixchildren(topic *parent) { topic *pa; if (parent->parent) { if (parent->parent->children == parent) parent->parent->children = parent->next; else { for (pa = parent->parent->children; pa->next; pa = pa->next) if (pa->next == parent) break; if (!pa->next) fprintf(stderr, "bah...\n"); pa->next = pa->next->next; } } } /* Note that this doesn't actually free the data structures, just gets * rid of the window. */ void hlp_killfamily(topic *top) { topic *ch; for (ch = top->children; ch; ch = ch->next) hlp_killfamily(ch); if (hlp_usex) hlp_xkillwin(top); else hlp_tkillwin(top); top->children = NULL; } ngspice-26/src/frontend/help/Makefile.am0000644000265600020320000000054312264261473017625 0ustar andreasadmin## Process this file with automake to produce Makefile.in if !NO_X noinst_LTLIBRARIES = libhlp.la libhlp_la_SOURCES = \ help.c \ provide.c \ readhelp.c \ textdisp.c \ xdisplay.c \ x11disp.c libhlp_la_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include @X_CFLAGS@ libhlp_la_CFLAGS = $(STATIC) endif MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/frontend/help/Makefile.in0000644000265600020320000005606212264261534017643 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/frontend/help DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhlp_la_LIBADD = am__libhlp_la_SOURCES_DIST = help.c provide.c readhelp.c textdisp.c \ xdisplay.c x11disp.c @NO_X_FALSE@am_libhlp_la_OBJECTS = libhlp_la-help.lo \ @NO_X_FALSE@ libhlp_la-provide.lo libhlp_la-readhelp.lo \ @NO_X_FALSE@ libhlp_la-textdisp.lo libhlp_la-xdisplay.lo \ @NO_X_FALSE@ libhlp_la-x11disp.lo libhlp_la_OBJECTS = $(am_libhlp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libhlp_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libhlp_la_CFLAGS) \ $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @NO_X_FALSE@am_libhlp_la_rpath = DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libhlp_la_SOURCES) DIST_SOURCES = $(am__libhlp_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @NO_X_FALSE@noinst_LTLIBRARIES = libhlp.la @NO_X_FALSE@libhlp_la_SOURCES = \ @NO_X_FALSE@ help.c \ @NO_X_FALSE@ provide.c \ @NO_X_FALSE@ readhelp.c \ @NO_X_FALSE@ textdisp.c \ @NO_X_FALSE@ xdisplay.c \ @NO_X_FALSE@ x11disp.c @NO_X_FALSE@libhlp_la_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include @X_CFLAGS@ @NO_X_FALSE@libhlp_la_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/frontend/help/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/frontend/help/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhlp.la: $(libhlp_la_OBJECTS) $(libhlp_la_DEPENDENCIES) $(EXTRA_libhlp_la_DEPENDENCIES) $(AM_V_CCLD)$(libhlp_la_LINK) $(am_libhlp_la_rpath) $(libhlp_la_OBJECTS) $(libhlp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-help.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-provide.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-readhelp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-textdisp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-x11disp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libhlp_la-xdisplay.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libhlp_la-help.lo: help.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-help.lo -MD -MP -MF $(DEPDIR)/libhlp_la-help.Tpo -c -o libhlp_la-help.lo `test -f 'help.c' || echo '$(srcdir)/'`help.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-help.Tpo $(DEPDIR)/libhlp_la-help.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='help.c' object='libhlp_la-help.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-help.lo `test -f 'help.c' || echo '$(srcdir)/'`help.c libhlp_la-provide.lo: provide.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-provide.lo -MD -MP -MF $(DEPDIR)/libhlp_la-provide.Tpo -c -o libhlp_la-provide.lo `test -f 'provide.c' || echo '$(srcdir)/'`provide.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-provide.Tpo $(DEPDIR)/libhlp_la-provide.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='provide.c' object='libhlp_la-provide.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-provide.lo `test -f 'provide.c' || echo '$(srcdir)/'`provide.c libhlp_la-readhelp.lo: readhelp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-readhelp.lo -MD -MP -MF $(DEPDIR)/libhlp_la-readhelp.Tpo -c -o libhlp_la-readhelp.lo `test -f 'readhelp.c' || echo '$(srcdir)/'`readhelp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-readhelp.Tpo $(DEPDIR)/libhlp_la-readhelp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='readhelp.c' object='libhlp_la-readhelp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-readhelp.lo `test -f 'readhelp.c' || echo '$(srcdir)/'`readhelp.c libhlp_la-textdisp.lo: textdisp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-textdisp.lo -MD -MP -MF $(DEPDIR)/libhlp_la-textdisp.Tpo -c -o libhlp_la-textdisp.lo `test -f 'textdisp.c' || echo '$(srcdir)/'`textdisp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-textdisp.Tpo $(DEPDIR)/libhlp_la-textdisp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='textdisp.c' object='libhlp_la-textdisp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-textdisp.lo `test -f 'textdisp.c' || echo '$(srcdir)/'`textdisp.c libhlp_la-xdisplay.lo: xdisplay.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-xdisplay.lo -MD -MP -MF $(DEPDIR)/libhlp_la-xdisplay.Tpo -c -o libhlp_la-xdisplay.lo `test -f 'xdisplay.c' || echo '$(srcdir)/'`xdisplay.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-xdisplay.Tpo $(DEPDIR)/libhlp_la-xdisplay.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='xdisplay.c' object='libhlp_la-xdisplay.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-xdisplay.lo `test -f 'xdisplay.c' || echo '$(srcdir)/'`xdisplay.c libhlp_la-x11disp.lo: x11disp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -MT libhlp_la-x11disp.lo -MD -MP -MF $(DEPDIR)/libhlp_la-x11disp.Tpo -c -o libhlp_la-x11disp.lo `test -f 'x11disp.c' || echo '$(srcdir)/'`x11disp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libhlp_la-x11disp.Tpo $(DEPDIR)/libhlp_la-x11disp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='x11disp.c' object='libhlp_la-x11disp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libhlp_la_CPPFLAGS) $(CPPFLAGS) $(libhlp_la_CFLAGS) $(CFLAGS) -c -o libhlp_la-x11disp.lo `test -f 'x11disp.c' || echo '$(srcdir)/'`x11disp.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/frontend/help/x11disp.c0000644000265600020320000002422112264261473017225 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: Jeffrey M. Hsu Modified 1999 Emmanuel Rouat **********/ #include "ngspice/ngspice.h" #ifndef X_DISPLAY_MISSING #include "ngspice/cpstd.h" #include "ngspice/hlpdefs.h" #include #include #include #include #include #include #include #include static bool started = FALSE; static topic *topics = NULL; static void newtopic(Widget w, XtPointer client_data, XtPointer call_data); static void delete_w(Widget w, XtPointer client_data, XtPointer call_data); static void quit(Widget w, XtPointer client_data, XtPointer call_data); static void sputline(char *buf, char *s); /* atoms for catching window delet by WM x-button */ static Atom atom_wm_delete_window; static Atom atom_wm_protocols; static Display *display; /* callback function for catching window deletion by WM x-button */ static void handle_wm_messages(Widget w, XtPointer client_data, XEvent *event, Boolean *cont) { topic *top = (topic *) client_data; NG_IGNORE(cont); NG_IGNORE(w); if (event->type == ClientMessage && event->xclient.message_type == atom_wm_protocols && (Atom) event->xclient.data.l[0] == atom_wm_delete_window) { hlp_killfamily(top); hlp_fixchildren(top); } } /* Create a new window... */ bool hlp_xdisplay(topic *top) { toplink *tl; handle *hand; wordlist *wl; char *buf; static Arg titleargs[] = { { XtNtop, (XtArgVal) XtChainTop }, { XtNbottom, (XtArgVal) XtChainTop }, { XtNleft, (XtArgVal) XtChainLeft }, { XtNright, (XtArgVal) XtChainLeft }, { XtNwidth, (XtArgVal) 650 }, }; static Arg formargs[ ] = { { XtNtop, (XtArgVal) XtChainTop }, { XtNtop, (XtArgVal) XtChainTop }, { XtNtop, (XtArgVal) XtChainTop }, { XtNbottom, (XtArgVal) XtChainBottom }, }; Arg htextargs[7]; /* Arg vportargs[5]; */ static Arg bboxargs[ ] = { { XtNtop, (XtArgVal) XtChainBottom }, { XtNtop, (XtArgVal) XtChainBottom }, { XtNtop, (XtArgVal) XtChainBottom }, { XtNtop, (XtArgVal) XtChainBottom }, { XtNbottom, (XtArgVal) XtChainBottom }, { XtNleft, (XtArgVal) XtChainLeft }, { XtNright, (XtArgVal) XtChainLeft }, }; Arg buttonargs[1]; Arg labelargs[3]; Widget buttonwidget; if (!started) { /* have to init everything */ /* assume X toolkit already initialize */ started = TRUE; } top->shellwidget = XtCreateApplicationShell ("shell", topLevelShellWidgetClass, NULL, 0); if (!top->parent) { top->xposition = hlp_initxpos; top->yposition = hlp_initypos; } else { top->xposition = top->parent->xposition + X_INCR; top->yposition = top->parent->yposition + Y_INCR; } XtSetArg(formargs[0], XtNx, top->xposition); XtSetArg(formargs[1], XtNy, top->yposition); top->formwidget = XtCreateManagedWidget ("form", formWidgetClass, top->shellwidget, formargs, XtNumber(formargs)); /* we really want a title bar widget for this, sigh */ top->titlewidget = XtCreateManagedWidget ("title", boxWidgetClass, top->formwidget, titleargs, XtNumber(titleargs)); XtSetArg(labelargs[0], XtNlabel, top->title); XtCreateManagedWidget ("titlelabel", labelWidgetClass, top->titlewidget, labelargs, 1); XtSetArg(buttonargs[0], XtNlabel, "quit help"); buttonwidget = XtCreateManagedWidget ("quit", commandWidgetClass, top->titlewidget, buttonargs, 1); XtAddCallback(buttonwidget, XtNcallback, quit, top); XtSetArg(buttonargs[0], XtNlabel, "delete window"); buttonwidget = XtCreateManagedWidget ("delete", commandWidgetClass, top->titlewidget, buttonargs, XtNumber(buttonargs)); XtAddCallback(buttonwidget, XtNcallback, delete_w, top); buf = TMALLOC(char, 80 * top->numlines + 100); buf[0] = '\0'; for (wl = top->text; wl; wl = wl->wl_next) { sputline(buf, wl->wl_word); } top->chartext = buf; /* make sure gets deallocated later XXX */ XtSetArg(htextargs[0], XtNstring, top->chartext); XtSetArg(htextargs[1], XtNallowResize, True); XtSetArg(htextargs[2], XtNscrollHorizontal, XawtextScrollWhenNeeded); XtSetArg(htextargs[3], XtNscrollVertical, XawtextScrollAlways); XtSetArg(htextargs[4], XtNfromVert, top->titlewidget); XtSetArg(htextargs[5], XtNwidth, 660); XtSetArg(htextargs[6], XtNheight, 350); top->textwidget = XtCreateManagedWidget ("helptext", asciiTextWidgetClass, top->formwidget, htextargs, XtNumber(htextargs)); if (top->subtopics) { XtSetArg(labelargs[0], XtNfromVert, top->textwidget); XtSetArg(labelargs[1], XtNvertDistance, 8); XtSetArg(labelargs[2], XtNlabel, "Subtopics: "); top->sublabelwidget = XtCreateManagedWidget ("sublabel", labelWidgetClass, top->formwidget, labelargs, XtNumber(labelargs)); XtSetArg(bboxargs[0], XtNwidth, 400); XtSetArg(bboxargs[1], XtNallowResize, True); XtSetArg(bboxargs[2], XtNfromVert, top->sublabelwidget); top->subboxwidget = XtCreateManagedWidget ("buttonbox", boxWidgetClass, top->formwidget, bboxargs, XtNumber(bboxargs)); for (tl = top->subtopics; tl; tl = tl->next) { tl->button.text = tl->description; tl->button.tag = tl->place; if (!tl->button.text) tl->button.text = ""; XtSetArg(buttonargs[0], XtNlabel, tl->button.text); buttonwidget = XtCreateManagedWidget (tl->button.text, commandWidgetClass, top->subboxwidget, buttonargs, XtNumber(buttonargs)); /* core leak XXX */ hand = TMALLOC(handle, 1); hand->result = tl; hand->parent = top; XtAddCallback(buttonwidget, XtNcallback, newtopic, hand); } } if (top->seealso) { if (top->subtopics) XtSetArg(labelargs[0], XtNfromVert, top->subboxwidget); else XtSetArg(labelargs[0], XtNfromVert, top->textwidget); XtSetArg(labelargs[1], XtNvertDistance, 8); XtSetArg(labelargs[2], XtNlabel, "See also: "); top->seelabelwidget = XtCreateManagedWidget ("seelabel", labelWidgetClass, top->formwidget, labelargs, XtNumber(labelargs)); XtSetArg(bboxargs[0], XtNwidth, 400); XtSetArg(bboxargs[1], XtNallowResize, True); XtSetArg(bboxargs[2], XtNfromVert, top->seelabelwidget); top->seeboxwidget = XtCreateManagedWidget ("buttonbox", boxWidgetClass, top->formwidget, bboxargs, XtNumber(bboxargs)); for (tl = top->seealso; tl; tl = tl->next) { tl->button.text = tl->description; tl->button.tag = tl->place; if (!tl->button.text) tl->button.text = ""; XtSetArg(buttonargs[0], XtNlabel, tl->button.text); buttonwidget = XtCreateManagedWidget (tl->button.text, commandWidgetClass, top->seeboxwidget, buttonargs, 1); hand = TMALLOC(handle, 1); /* core leak XXX */ hand->result = tl; hand->parent = top; XtAddCallback(buttonwidget, XtNcallback, newtopic, hand); } } XtRealizeWidget(top->shellwidget); top->winlink = topics; topics = top; /* WM_DELETE_WINDOW protocol */ display = XtDisplay(top->shellwidget); atom_wm_protocols = XInternAtom(display, "WM_PROTOCOLS", False); atom_wm_delete_window = XInternAtom(display, "WM_DELETE_WINDOW", False); XtAddEventHandler(top->shellwidget, NoEventMask, True, handle_wm_messages, top); XSetWMProtocols(display, XtWindow(top->shellwidget), &atom_wm_delete_window, 1); return (TRUE); } static void newtopic(Widget w, XtPointer client_data, XtPointer call_data) { topic *parent = ((handle *) client_data)->parent; toplink *result = ((handle *) client_data)->result; topic *newtop; NG_IGNORE(call_data); NG_IGNORE(w); if (!(newtop = hlp_read(result->place))) { fprintf(stderr, "Internal error: bad link\n"); } newtop->next = parent->children; parent->children = newtop; newtop->parent = parent; newtop->xposition = parent->xposition + 50; newtop->yposition = parent->yposition + 50; if (!hlp_xdisplay(newtop)) { fprintf(stderr, "Couldn't open win\n"); return; } } static void delete_w(Widget w, XtPointer client_data, XtPointer call_data) { topic *top = (topic *) client_data; NG_IGNORE(call_data); NG_IGNORE(w); hlp_killfamily(top); hlp_fixchildren(top); } static void quit(Widget w, XtPointer client_data, XtPointer call_data) { topic *top = (topic *) client_data, *parent = top->parent; NG_IGNORE(call_data); NG_IGNORE(w); while (parent && parent->parent) parent = parent->parent; hlp_killfamily(parent ? parent : top); } void hlp_xkillwin(topic *top) { topic *last; if (top == topics) topics = top->winlink; else if (top->winlink) { /* we need this check for the pathological case where you have two helps running, normally hp_killfamily doesn't let this happen */ for (last = topics; last->winlink; last = last->winlink) if (last->winlink == top) { last->winlink = top->winlink; break; } if (!last->winlink) { fprintf(stderr, "window not in list!!\n"); return; } } XtDestroyWidget(top->shellwidget); } /* rip out font changes and write at end of buffer */ static void sputline(char *buf, char *s) { char tmp[BSIZE_SP], *tmpp; int i = 0; while (*s) { if (((*s == '\033') && s[1]) || ((*s == '_') && (s[1] == '\b'))) s += 2; else tmp[i++] = *s++; } tmp[i] = '\0'; /* strcat can't handle long strings */ tmpp = buf + strlen(buf); sprintf(tmpp, "%s\n", tmp); } #endif /* X_DISPLAY_MISSING */ ngspice-26/src/frontend/com_ahelp.h0000644000265600020320000000014012264261473016732 0ustar andreasadmin#ifndef ngspice_COM_AHELP_H #define ngspice_COM_AHELP_H void com_ahelp(wordlist *wl); #endif ngspice-26/src/frontend/diff.h0000644000265600020320000000027612264261473015725 0ustar andreasadmin/************* * Header file for diff.c * 1999 E. Rouat ************/ #ifndef ngspice_DIFF_H #define ngspice_DIFF_H #include "ngspice/wordlist.h" void com_diff(wordlist *wl); #endif ngspice-26/src/frontend/com_help.h0000644000265600020320000000013612264261473016576 0ustar andreasadmin#ifndef ngspice_COM_HELP_H #define ngspice_COM_HELP_H void com_help(wordlist *wl); #endif ngspice-26/src/setplot0000644000265600020320000000176712264261473014450 0ustar andreasadmin* set the current working plot .control begin unset resp if $argc set resp = $argv[1] else if $?plots = 0 echo Error: there aren\'t any plots currently loaded. goto bottom else if $#plots = 0 echo Error: there aren\'t any plots currently loaded. goto bottom end end if $?resp = 0 set oldplot = $curplot echo ' Type the name of the desired plot:' echo '' echo ' new New plot' foreach pl $plots set curplot = $pl strcmp i $pl $oldplot if $i = 0 echo "Current $pl $curplottitle ({$curplotname})" else echo " $pl $curplottitle ({$curplotname})" end end set curplot = $oldplot echo -n '? ' set resp = $< end end strcmp i $resp "" if $i = 0 goto bottom end strcmp i $resp new if $i = 0 set curplot = new goto bottom end foreach pl $plots strcmp i $resp $pl if $i = 0 set curplot = $pl goto bottom end end echo Error: no such plot name $resp label bottom unset resp i pl newflag oldplot end ngspice-26/src/ngsconvert.c0000644000265600020320000002773412264261473015371 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Main routine for sconvert. */ #include "ngspice/ngspice.h" #include #include "ngspice/fteinput.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/sim.h" #include "ngspice/suffix.h" #include "frontend/display.h" #include "../misc/mktemp.h" FILE *cp_in = NULL; FILE *cp_out = NULL; FILE *cp_err = NULL; FILE *cp_curin = NULL; FILE *cp_curout = NULL; FILE *cp_curerr = NULL; int cp_maxhistlength; bool cp_debug = FALSE; char cp_chars[128]; bool cp_nocc = TRUE; bool ft_stricterror = FALSE; bool ft_parsedb = FALSE; struct circ *ft_curckt = NULL; char *cp_program = "sconvert"; #define tfread(ptr, siz, nit, fp) if (fread((ptr), (siz), \ (nit), (fp)) != (nit)) { \ fprintf(cp_err, "Error: unexpected EOF\n"); \ return (NULL); } #define tfwrite(ptr, siz, nit, fp) if (fwrite((ptr), (siz), \ (nit), (fp)) != (nit)) { \ fprintf(cp_err, "Write error\n"); \ return; } void Input(REQUEST *request, RESPONSE *response) { switch (request->option) { case char_option: response->reply.ch = inchar(request->fp); response->option = request->option; break; default: /* just ignore, since we don't want a million error messages */ response->option = error_option; break; } return; } static char * fixdate(char *date) { char buf[20]; int i; (void) strcpy(buf, date); for (i = 17; i > 8; i--) buf[i] = buf[i - 1]; buf[8] = ' '; buf[18] = '\0'; return (copy(buf)); } static struct plot * oldread(char *name) { struct plot *pl; char buf[BSIZE_SP]; struct dvec *v, *end = NULL; short nv; /* # vars */ long np; /* # points/var. */ long i, j; short a; /* The magic number. */ float f1, f2; FILE *fp; if (!(fp = fopen(name, "r"))) { perror(name); return (NULL); } pl = alloc(struct plot); tfread(buf, 1, 80, fp); buf[80] = '\0'; for (i = (int) strlen(buf) - 1; (i > 1) && (buf[i] == ' '); i--) ; buf[i + 1] = '\0'; pl->pl_title = copy(buf); tfread(buf, 1, 16, fp); buf[16] = '\0'; pl->pl_date = copy(fixdate(buf)); tfread(&nv, sizeof (short), 1, fp); tfread(&a, sizeof (short), 1, fp); if (a != 4) fprintf(cp_err, "Warning: magic number 4 is wrong...\n"); for (i = 0; i < nv; i++) { v = alloc(struct dvec); if (end) end->v_next = v; else pl->pl_scale = pl->pl_dvecs = v; end = v; tfread(buf, 1, 8, fp); buf[8] = '\0'; v->v_name = copy(buf); } for (v = pl->pl_dvecs; v; v = v->v_next) { tfread(&a, sizeof (short), 1, fp); v->v_type = a; } /* If the first output variable is type FREQ then there is complex * data, otherwise the data is real. */ i = pl->pl_dvecs->v_type; if ((i == SV_FREQUENCY) || (i == SV_POLE) || (i == SV_ZERO)) for (v = pl->pl_dvecs; v; v = v->v_next) v->v_flags |= VF_COMPLEX; else for (v = pl->pl_dvecs; v; v = v->v_next) v->v_flags |= VF_REAL; /* Check the node indices -- this shouldn't be a problem ever. */ for (i = 0; i < nv; i++) { tfread(&a, sizeof(short), 1, fp); if (a != i + 1) fprintf(cp_err, "Warning: output %d should be %ld\n", a, i); } tfread(buf, 1, 24, fp); buf[24] = '\0'; pl->pl_name = copy(buf); /* Now to figure out how many points of data there are left in * the file. */ i = ftell(fp); (void) fseek(fp, 0L, SEEK_END); j = ftell(fp); (void) fseek(fp, i, SEEK_SET); i = j - i; if (i % 8) { /* Data points are always 8 bytes... */ fprintf(cp_err, "Error: alignment error in data\n"); (void) fclose(fp); return (NULL); } i = i / 8; if (i % nv) { fprintf(cp_err, "Error: alignment error in data\n"); (void) fclose(fp); return (NULL); } np = i / nv; for (v = pl->pl_dvecs; v; v = v->v_next) { v->v_length = (int) np; if (isreal(v)) { v->v_realdata = TMALLOC(double, np); } else { v->v_compdata = TMALLOC(ngcomplex_t, np); } } for (i = 0; i < np; i++) { /* Read in the output vector for point i. If the type is * complex it will be float and we want double. */ for (v = pl->pl_dvecs; v; v = v->v_next) { if (v->v_flags & VF_REAL) { tfread(&v->v_realdata[i], sizeof (double), 1, fp); } else { tfread(&f1, sizeof (float), 1, fp); tfread(&f2, sizeof (float), 1, fp); realpart(v->v_compdata[i]) = f1; imagpart(v->v_compdata[i]) = f2; } } } (void) fclose(fp); return (pl); } static void oldwrite(char *name, bool app, struct plot *pl) { short four = 4, k; struct dvec *v; float f1, f2, zero = 0.0; char buf[80]; int i, j, tp = VF_REAL, numpts = 0, numvecs = 0; FILE *fp; if (!(fp = fopen(name, app ? "a" : "w"))) { perror(name); return; } for (v = pl->pl_dvecs; v; v = v->v_next) { if (v->v_length > numpts) numpts = v->v_length; numvecs++; if (iscomplex(v)) tp = VF_COMPLEX; } /* This may not be a good idea... */ if (tp == VF_COMPLEX) pl->pl_scale->v_type = SV_FREQUENCY; for (i = 0; i < 80; i++) buf[i] = ' '; for (i = 0; i < 80; i++) if (pl->pl_title[i] == '\0') break; else buf[i] = pl->pl_title[i]; tfwrite(buf, 1, 80, fp); for (i = 0; i < 80; i++) buf[i] = ' '; for (i = 0; i < 16; i++) if (pl->pl_date[i] == '\0') break; else buf[i] = pl->pl_date[i]; tfwrite(buf, 1, 16, fp); tfwrite(&numvecs, sizeof (short), 1, fp); tfwrite(&four, sizeof (short), 1, fp); for (v = pl->pl_dvecs; v; v = v->v_next) { for (j = 0; j < 80; j++) buf[j] = ' '; for (j = 0; j < 8; j++) if (v->v_name[j] == '\0') break; else buf[j] = v->v_name[j]; tfwrite(buf, 1, 8, fp); } for (v = pl->pl_dvecs; v; v = v->v_next) { j = (short) v->v_type; tfwrite(&j, sizeof (short), 1, fp); } for (k = 1; k < numvecs + 1; k++) tfwrite(&k, sizeof (short), 1, fp); for (j = 0; j < 80; j++) buf[j] = ' '; for (j = 0; j < 24; j++) if (pl->pl_name[j] == '\0') break; else buf[j] = pl->pl_name[j]; tfwrite(buf, 1, 24, fp); for (i = 0; i < numpts; i++) { for (v = pl->pl_dvecs; v; v = v->v_next) { if ((tp == VF_REAL) && isreal(v)) { if (i < v->v_length) { tfwrite(&v->v_realdata[i], sizeof (double), 1, fp); } else { tfwrite(&v->v_realdata[v->v_length - 1], sizeof (double), 1, fp); } } else if ((tp == VF_REAL) && iscomplex(v)) { fprintf(cp_err, "internal error, everything real, yet complex ...\n"); exit(1); } else if ((tp == VF_COMPLEX) && isreal(v)) { if (i < v->v_length) f1 = (float) v->v_realdata[i]; else f1 = (float) v->v_realdata[v->v_length - 1]; tfwrite(&f1, sizeof (float), 1, fp); tfwrite(&zero, sizeof (float), 1, fp); } else if ((tp == VF_COMPLEX) && iscomplex(v)) { if (i < v->v_length) { f1 = (float) realpart(v->v_compdata[i]); f2 = (float) imagpart(v->v_compdata[i]); } else { f1 = (float) realpart(v->v_compdata[v-> v_length - 1]); f2 = (float) imagpart(v->v_compdata[v-> v_length - 1]); } tfwrite(&f1, sizeof (float), 1, fp); tfwrite(&f2, sizeof (float), 1, fp); } } } (void) fclose(fp); return; } int main(int ac, char **av) { char *sf, *af; char buf[BSIZE_SP]; char t, f; struct plot *pl; size_t n; char *infile = NULL; char *outfile = NULL; FILE *fp; cp_in = stdin; cp_out = stdout; cp_err = stderr; cp_curin = stdin; cp_curout = stdout; cp_curerr = stderr; switch (ac) { case 5: sf = av[2]; af = av[4]; f = *av[1]; t = *av[3]; break; case 3: f = *av[1]; t = *av[2]; /* This is a pain, but there is no choice */ sf = infile = smktemp("scin"); af = outfile = smktemp("scout"); if (!(fp = fopen(infile, "w"))) { perror(infile); exit(EXIT_BAD); } while ((n = fread(buf, 1, sizeof(buf), stdin)) != 0) (void) fwrite(buf, 1, n, fp); (void) fclose(fp); break; case 1: printf("Input file: "); (void) fflush(stdout); (void) fgets(buf, BSIZE_SP, stdin); sf = copy(buf); printf("Input type: "); (void) fflush(stdout); (void) fgets(buf, BSIZE_SP, stdin); f = buf[0]; printf("Output file: "); (void) fflush(stdout); (void) fgets(buf, BSIZE_SP, stdin); af = copy(buf); printf("Output type: "); (void) fflush(stdout); (void) fgets(buf, BSIZE_SP, stdin); t = buf[0]; break; default: fprintf(cp_err, "Usage: %s fromtype fromfile totype tofile,\n", cp_program); fprintf(cp_err, "\twhere types are o, b, or a\n"); fprintf(cp_err, "\tor, %s fromtype totype, used as a filter.\n", cp_program); exit(EXIT_BAD); } switch(f) { case 'o' : pl = oldread(sf); break; case 'b' : case 'a' : pl = raw_read(sf); break; default: fprintf(cp_err, "Types are o, a, or b\n"); exit(EXIT_BAD); } if (!pl) exit(EXIT_BAD); switch(t) { case 'o' : oldwrite(af, FALSE, pl); break; case 'b' : raw_write(af, pl, FALSE, TRUE); break; case 'a' : raw_write(af, pl, FALSE, FALSE); break; default: fprintf(cp_err, "Types are o, a, or b\n"); exit(EXIT_BAD); } if (ac == 3) { /* Gotta finish this stuff up */ if (!(fp = fopen(outfile, "r"))) { perror(outfile); exit(EXIT_BAD); } while ((n = fread(buf, 1, sizeof(buf), fp)) != 0) (void) fwrite(buf, 1, n, stdout); (void) fclose(fp); (void) unlink(infile); (void) unlink(outfile); } exit(EXIT_NORMAL); } void cp_pushcontrol(void) { } void cp_popcontrol(void) { } void out_init(void) { } void cp_doquit(void) { exit(0); } void cp_usrvars(struct variable **v1, struct variable **v2) { *v1 = NULL; *v2 = NULL; return; } int cp_evloop(char *s) { NG_IGNORE(s); return (0); } void cp_ccon(bool o) { NG_IGNORE(o); } char*if_errstring(int c) { NG_IGNORE(c); return ("error"); } void out_printf(char *fmt, ...) { NG_IGNORE(fmt); } void out_send(char *string) { NG_IGNORE(string); } struct variable * cp_enqvar(char *word) { NG_IGNORE(word); return (NULL); } struct dvec *vec_get(const char *word) { NG_IGNORE(word); return (NULL); } void cp_ccom(wordlist *w, char *b, bool e) { NG_IGNORE(e); NG_IGNORE(b); NG_IGNORE(w); return; } int cp_usrset(struct variable *v, bool i) { NG_IGNORE(i); NG_IGNORE(v); return(US_OK); } int disptype; ngspice-26/src/spinit.in0000644000265600020320000000135112264261473014656 0ustar andreasadmin* Standard ngspice init file alias exit quit alias acct rusage all set x11lineararcs *set rndseed=12 ** ascii rawfile ** *set filetype=ascii ** frontend debug output ** *set ngdebug ** no asking after quit ** set noaskquit ** set the number of threads in openmp ** default (if compiled with --enable-openmp) is: 2 *set num_threads=4 strcmp __flag $program "ngspice" if $__flag = 0 * For SPICE2 POLYs, edit the below line to point to the location * of your codemodel. @XSPICEINIT@ codemodel @pkglibdir@/spice2poly.cm * The other codemodels @XSPICEINIT@ codemodel @pkglibdir@/analog.cm @XSPICEINIT@ codemodel @pkglibdir@/digital.cm @XSPICEINIT@ codemodel @pkglibdir@/xtradev.cm @XSPICEINIT@ codemodel @pkglibdir@/xtraevt.cm end unset __flag ngspice-26/src/spicelib/0000755000265600020320000000000012264261705014610 5ustar andreasadminngspice-26/src/spicelib/analysis/0000755000265600020320000000000012264261705016433 5ustar andreasadminngspice-26/src/spicelib/analysis/ckttroub.c0000644000265600020320000000421712264261473020442 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "vsrc/vsrcdefs.h" #include "isrc/isrcdefs.h" #include "ngspice/jobdefs.h" #include "analysis.h" extern SPICEanalysis *analInfo[]; char * CKTtrouble(CKTcircuit *ckt, char *optmsg) { char msg_buf[513]; char *emsg; TRCV *cv; int vcode, icode; char *msg_p; SPICEanalysis *an; int i; if (!ckt || !ckt->CKTcurJob) return NULL; an = analInfo[ckt->CKTcurJob->JOBtype]; if (optmsg && *optmsg) { sprintf(msg_buf, "%s: %s; ", an->if_analysis.name, optmsg); } else { sprintf(msg_buf, "%s: ", an->if_analysis.name); } msg_p = msg_buf + strlen(msg_buf); switch (an->domain) { case TIMEDOMAIN: if (ckt->CKTtime == 0.0) sprintf(msg_p, "initial timepoint: "); else sprintf(msg_p, "time = %g, timestep = %g: ", ckt->CKTtime, ckt->CKTdelta); break; case FREQUENCYDOMAIN: sprintf(msg_p, "frequency = %g: ", ckt->CKTomega / (2.0 * M_PI)); break; case SWEEPDOMAIN: cv = (TRCV*) ckt->CKTcurJob; vcode = CKTtypelook("Vsource"); icode = CKTtypelook("Isource"); for (i = 0; i <= cv->TRCVnestLevel; i++) { msg_p += strlen(msg_p); if(cv->TRCVvType[i]==vcode) { /* voltage source */ sprintf(msg_p, " %s = %g: ", cv->TRCVvName[i], ((VSRCinstance*)(cv->TRCVvElt[i]))->VSRCdcValue); } else { sprintf(msg_p, " %s = %g: ", cv->TRCVvName[i], ((ISRCinstance*)(cv->TRCVvElt[i]))->ISRCdcValue); } } break; case NODOMAIN: default: break; } msg_p += strlen(msg_p); if (ckt->CKTtroubleNode) { sprintf(msg_p, "trouble with node \"%s\"\n", CKTnodName(ckt, ckt->CKTtroubleNode)); } else if (ckt->CKTtroubleElt) { /* "-" for dop */ sprintf(msg_p, "trouble with %s-instance %s\n", ckt->CKTtroubleElt->GENmodPtr->GENmodName, ckt->CKTtroubleElt->GENname); } else { sprintf(msg_p, "cause unrecorded.\n"); } emsg = TMALLOC(char, strlen(msg_buf) + 1); strcpy(emsg,msg_buf); return emsg; } ngspice-26/src/spicelib/analysis/cktgrnd.c0000644000265600020320000000211612264261473020235 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTground(ckt,node) * specify the node to be the ground node of the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" int CKTground(CKTcircuit *ckt, CKTnode **node, IFuid name) { if(ckt->CKTnodes) { if(ckt->CKTnodes->name) { /*already exists - keep old name, but return it */ if(node) *node = ckt->CKTnodes; return(E_EXISTS); } ckt->CKTnodes->name = name; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; } else { ckt->CKTnodes = TMALLOC(CKTnode, 1); if(ckt->CKTnodes == NULL) return(E_NOMEM); ckt->CKTnodes->name = name; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; ckt->CKTnodes->next = NULL; ckt->CKTlastNode = ckt->CKTnodes; } if(node) *node = ckt->CKTnodes; return(OK); } ngspice-26/src/spicelib/analysis/tranaskq.c0000644000265600020320000000173412264261473020432 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int TRANaskQuest(CKTcircuit *ckt, JOB *anal, int which,IFvalue *value) { TRANan *job = (TRANan *) anal; NG_IGNORE(ckt); switch(which) { case TRAN_TSTOP: value->rValue = job->TRANfinalTime; break; case TRAN_TSTEP: value->rValue = job->TRANstep; break; case TRAN_TSTART: value->rValue = job->TRANinitTime; break; case TRAN_TMAX: value->rValue = job->TRANmaxStep; break; case TRAN_UIC: if (job->TRANmode & MODEUIC) { value->iValue = 1; } else { value->iValue = 0; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/pssaskq.c0000644000265600020320000000217612264261473020274 0ustar andreasadmin/********** Author: 2010-05 Stefano Perticaroli ``spertica'' **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/pssdefs.h" /* ARGSUSED */ int PSSaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { PSSan *job = (PSSan *) anal; NG_IGNORE(ckt); switch(which) { case GUESSED_FREQ: value->rValue = job->PSSguessedFreq; break; case OSC_NODE: value->nValue = job->PSSoscNode; break; case STAB_TIME: value->rValue = job->PSSstabTime; break; case PSS_UIC: if (job->PSSmode & MODEUIC) { value->iValue = 1; } else { value->iValue = 0; } break; case PSS_POINTS: value->iValue = (int)job->PSSpoints; break; case PSS_HARMS: value->iValue = job->PSSharms; break; case SC_ITER: value->iValue = job->sc_iter; break; case STEADY_COEFF: value->rValue = job->steady_coeff; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/distoan.c0000644000265600020320000004371512264261473020254 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/distodef.h" #include "ngspice/sperror.h" static void DISswap(double **a, double **b) { double *c; c = *a; *a = *b; *b = c; } static void DmemAlloc(double **a, int size) { *a = TMALLOC(double, size + 1); } static void DstorAlloc(double ***header, int size) { *header = TMALLOC(double *, size); } int DISTOan(CKTcircuit *ckt, int restart) { double freq; static double freqTol; /* tolerence parameter for finding final frequency */ static int NoOfPoints; static int size; static int displacement; int error; int i; int numNames; IFuid *nameList; IFuid freqUid; runDesc *acPlot = NULL; DISTOAN *job = (DISTOAN *) ckt->CKTcurJob; static char *nof2src = "No source with f2 distortion input"; #ifdef DISTODEBUG double time,time1; #endif NG_IGNORE(restart); /* start at beginning */ #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds(); #endif switch(job->DstepType) { case DECADE: job->DfreqDelta = exp(log(10.0)/job->DnumSteps); freqTol = job->DfreqDelta * job->DstopF1 * ckt->CKTreltol; NoOfPoints = 1 + (int)floor ((job->DnumSteps) / log(10.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); break; case OCTAVE: job->DfreqDelta = exp(log(2.0)/job->DnumSteps); freqTol = job->DfreqDelta * job->DstopF1 * ckt->CKTreltol; NoOfPoints = 1 + (int)floor ((job->DnumSteps) / log(2.0) * log((job->DstopF1+freqTol)/(job->DstartF1))); break; case LINEAR: job->DfreqDelta = (job->DstopF1 - job->DstartF1)/ (job->DnumSteps+1); freqTol = job->DfreqDelta * ckt->CKTreltol; NoOfPoints = job->DnumSteps+1+ (int)floor(freqTol/(job->DfreqDelta)); break; default: return(E_BADPARM); } error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if(error) return(error); ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; error = CKTload(ckt); if(error) return(error); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); if (ckt->CKTkeepOpInfo) { /* Dump operating point. */ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Distortion Operating Point", NULL, IF_REAL, numNames, nameList, IF_REAL, &acPlot); if(error) return(error); CKTdump(ckt, 0.0, acPlot); SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; } #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds() - time1; printf("Time for initial work (including op. pt.): %g seconds \n", time1); #endif #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_SETUP); #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds() - time1; printf("Time outside D_SETUP: %g seconds \n", time1); #endif if (error) return(error); displacement = 0; #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds(); #endif freq = job->DstartF1; if (job->Df2wanted) { /* omegadelta = 2.0 * M_PI * freq *(1. - job->Df2ovrF1); */ /* keeping f2 const to be compatible with spectre */ job->Domega2 = 2.0 * M_PI * freq * job->Df2ovrF1; } DstorAlloc( &(job->r1H1stor),NoOfPoints+2); DstorAlloc( &(job->r2H11stor),NoOfPoints+2); DstorAlloc( &(job->i1H1stor),NoOfPoints+2); DstorAlloc( &(job->i2H11stor),NoOfPoints+2); size = SMPmatSize(ckt->CKTmatrix); if (! job->r1H1ptr) { DmemAlloc( &(job->r1H1ptr) , size+2); if (! job->r1H1ptr) return (E_NOMEM); } if (! job->r2H11ptr) { DmemAlloc( &(job->r2H11ptr) , size+2); if (! job->r2H11ptr) return (E_NOMEM); } if (! job->i1H1ptr) { DmemAlloc( &(job->i1H1ptr) , size+2); if (! job->i1H1ptr) return (E_NOMEM); } if (! job->i2H11ptr) { DmemAlloc( &(job->i2H11ptr) , size+2); if (! job->i2H11ptr) return (E_NOMEM); } if (! (job->Df2wanted)) { DstorAlloc( &(job->r3H11stor),NoOfPoints+2); DstorAlloc( &(job->i3H11stor),NoOfPoints+2); if (! job->r3H11ptr) { DmemAlloc( &(job->r3H11ptr) , size+2); if (! job->r3H11ptr) return (E_NOMEM); } if (! job->i3H11ptr) { DmemAlloc( &(job->i3H11ptr) , size+2); if (! job->i3H11ptr) return (E_NOMEM); } } else { DstorAlloc ( &(job->r1H2stor),NoOfPoints+2); DstorAlloc ( &(job->i1H2stor),NoOfPoints+2); DstorAlloc ( &(job->r2H12stor),NoOfPoints+2); DstorAlloc ( &(job->i2H12stor),NoOfPoints+2); DstorAlloc ( &(job->r2H1m2stor),NoOfPoints+2); DstorAlloc ( &(job->i2H1m2stor),NoOfPoints+2); DstorAlloc ( &(job->r3H1m2stor),NoOfPoints+2); DstorAlloc ( &(job->i3H1m2stor),NoOfPoints+2); if (! job->r1H2ptr) { DmemAlloc( &(job->r1H2ptr) , size+2); if (! job->r1H2ptr) return (E_NOMEM); } if (! job->r2H12ptr) { DmemAlloc( &(job->r2H12ptr) , size+2); if (! job->r2H12ptr) return (E_NOMEM); } if (! job->r2H1m2ptr) { DmemAlloc( &(job->r2H1m2ptr) , size+2); if (! job->r2H1m2ptr) return (E_NOMEM); } if (! job->r3H1m2ptr) { DmemAlloc( &(job->r3H1m2ptr) , size+2); if (! job->r3H1m2ptr) return (E_NOMEM); } if (! job->i1H2ptr) { DmemAlloc( &(job->i1H2ptr) , size+2); if (! job->i1H2ptr) return (E_NOMEM); } if (! job->i2H12ptr) { DmemAlloc( &(job->i2H12ptr) , size+2); if (! job->i2H12ptr) return (E_NOMEM); } if (! job->i2H1m2ptr) { DmemAlloc( &(job->i2H1m2ptr) , size+2); if (! job->i2H1m2ptr) return (E_NOMEM); } if (! job->i3H1m2ptr) { DmemAlloc( &(job->i3H1m2ptr) , size+2); if (! job->i3H1m2ptr) return (E_NOMEM); } } #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds() - time1; printf("Time for other setup (storage allocation etc.): %g seconds \n", time1); #endif #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds(); #endif while(freq <= job->DstopF1+freqTol) { /* if(SPfrontEnd->IFpauseTest()) { job->DsaveF1 = freq; return(E_PAUSE); } */ ckt->CKTomega = 2.0 * M_PI *freq; job->Domega1 = ckt->CKTomega; ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODEAC; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTacLoad(ckt); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for CKTacLoad: %g seconds \n", time); #endif if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_RHSF1); /* sets up the RHS vector for all inputs corresponding to F1 */ #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside DISTO_RHSFIX: %g seconds \n", time); #endif if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = NIdIter(ckt); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for NIdIter: %g seconds \n", time); #endif if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r1H1ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i1H1ptr)); ckt->CKTomega *= 2; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_TWOF1); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside D_TWOF1: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r2H11ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i2H11ptr)); if (! (job->Df2wanted )) { ckt->CKTomega = 3 * job->Domega1; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_THRF1); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside D_THRF1: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r3H11ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i3H11ptr)); } else if (job->Df2given) { /* ckt->CKTomega = job->Domega1 - omegadelta; job->Domega2 = ckt->CKTomega; */ ckt->CKTomega = job->Domega2; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_RHSF2); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside DISTO_RHSFIX: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r1H2ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i1H2ptr)); ckt->CKTomega = job->Domega1 + job->Domega2; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_F1PF2); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside D_F1PF2: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r2H12ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i2H12ptr)); ckt->CKTomega = job->Domega1 - job->Domega2; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_F1MF2); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside D_F1MF2: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r2H1m2ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i2H1m2ptr)); ckt->CKTomega = 2*job->Domega1 - job->Domega2; error = CKTacLoad(ckt); if (error) return(error); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif error = CKTdisto(ckt,D_2F1MF2); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time outside D_2F1MF2: %g seconds \n", time); #endif if (error) return(error); error = NIdIter(ckt); if (error) return(error); DISswap(&(ckt->CKTrhsOld),&(job->r3H1m2ptr)); DISswap(&(ckt->CKTirhsOld),&(job->i3H1m2ptr)); } else { errMsg = TMALLOC(char, strlen(nof2src) + 1); strcpy(errMsg,nof2src); return(E_NOF2SRC); } DmemAlloc( &(job->r1H1stor[displacement]),size); DISswap(&(job->r1H1stor[displacement]),&(job->r1H1ptr)); job->r1H1stor[displacement][0]=freq; DmemAlloc( &(job->r2H11stor[displacement]),size); DISswap(&(job->r2H11stor[displacement]),&((job->r2H11ptr))); job->r2H11stor[displacement][0]=freq; DmemAlloc( &(job->i1H1stor[displacement]),size); DISswap(&(job->i1H1stor[displacement]),&((job->i1H1ptr))); job->i1H1stor[displacement][0]=0.0; DmemAlloc( &(job->i2H11stor[displacement]),size); DISswap(&(job->i2H11stor[displacement]),&((job->i2H11ptr))); job->i2H11stor[displacement][0]=0.0; if (! (job->Df2wanted)) { DmemAlloc( &(job->r3H11stor[displacement]),size); DISswap(&(job->r3H11stor[displacement]),&((job->r3H11ptr))); job->r3H11stor[displacement][0]=freq; DmemAlloc( &(job->i3H11stor[displacement]),size); DISswap(&(job->i3H11stor[displacement]),&((job->i3H11ptr))); job->i3H11stor[displacement][0]=0.0; } else { DmemAlloc( &(job->r1H2stor[displacement]),size); DISswap(&(job->r1H2stor[displacement]),&((job->r1H2ptr))); job->r1H2stor[displacement][0]=freq; DmemAlloc( &(job->r2H12stor[displacement]),size); DISswap(&(job->r2H12stor[displacement]),&((job->r2H12ptr))); job->r2H12stor[displacement][0]=freq; DmemAlloc( &(job->r2H1m2stor[displacement]),size); DISswap(&(job->r2H1m2stor[displacement]),&((job->r2H1m2ptr))); job->r2H1m2stor[displacement][0]=freq; DmemAlloc( &(job->r3H1m2stor[displacement]),size); DISswap(&(job->r3H1m2stor[displacement]),&((job->r3H1m2ptr))); job->r3H1m2stor[displacement][0]=freq; DmemAlloc( &(job->i1H2stor[displacement]),size); DISswap(&(job->i1H2stor[displacement]),&((job->i1H2ptr))); job->i1H2stor[displacement][0]=0.0; DmemAlloc( &(job->i2H12stor[displacement]),size); DISswap(&(job->i2H12stor[displacement]),&((job->i2H12ptr))); job->i2H12stor[displacement][0]=0.0; DmemAlloc( &(job->i2H1m2stor[displacement]),size); DISswap(&(job->i2H1m2stor[displacement]),&((job->i2H1m2ptr))); job->i2H1m2stor[displacement][0]=0.0; DmemAlloc( &(job->i3H1m2stor[displacement]),size); DISswap(&(job->i3H1m2stor[displacement]),&((job->i3H1m2ptr))); job->i3H1m2stor[displacement][0]=0.0; } displacement++; switch(job->DstepType) { case DECADE: case OCTAVE: freq *= job->DfreqDelta; if(job->DfreqDelta==1) goto endsweep; break; case LINEAR: freq += job->DfreqDelta; if(job->DfreqDelta==0) goto endsweep; break; default: return(E_INTERN); } } #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds() - time1; printf("Time inside frequency loop: %g seconds \n", time1); #endif endsweep: /* output routines to process the H's and output actual ckt variable values */ #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds(); #endif if (! job->Df2wanted) { error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - 2nd harmonic", freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); if (job->DstepType != LINEAR) { SPfrontEnd->OUTattributes (acPlot, NULL, OUT_SCALE_LOG, NULL); } for (i=0; i< displacement ; i++) { DkerProc(D_TWOF1,job->r2H11stor[i], job->i2H11stor[i], size, job); ckt->CKTrhsOld = job->r2H11stor[i]; ckt->CKTirhsOld = job->i2H11stor[i]; error = CKTacDump(ckt,ckt->CKTrhsOld[0],acPlot); if(error) return(error); } SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - 3rd harmonic", freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); for (i=0; i< displacement ; i++) { DkerProc(D_THRF1,job->r3H11stor[i], job->i3H11stor[i], size, job); ckt->CKTrhsOld = job->r3H11stor[i]; ckt->CKTirhsOld = job->i3H11stor[i]; error = CKTacDump(ckt,ckt->CKTrhsOld[0],acPlot); } SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; } else { error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: f1+f2", freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); for (i=0; i< displacement ; i++) { DkerProc(D_F1PF2,job->r2H12stor[i], job->i2H12stor[i], size, job); ckt->CKTrhsOld = job->r2H12stor[i]; ckt->CKTirhsOld = job->i2H12stor[i]; error = CKTacDump(ckt,ckt->CKTrhsOld[0],acPlot); if(error) return(error); } SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: f1-f2", freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); for (i=0; i< displacement ; i++) { DkerProc(D_F1MF2, job->r2H1m2stor[i], job->i2H1m2stor[i], size, job); ckt->CKTrhsOld = job->r2H1m2stor[i]; ckt->CKTirhsOld = job->i2H1m2stor[i]; error = CKTacDump(ckt,ckt->CKTrhsOld[0],acPlot); if(error) return(error); } SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "DISTORTION - IM: 2f1-f2", freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); for (i=0; i< displacement ; i++) { DkerProc(D_2F1MF2, job->r3H1m2stor[i], job->i3H1m2stor[i], size, job); ckt->CKTrhsOld = job->r3H1m2stor[i]; ckt->CKTirhsOld = job->i3H1m2stor[i]; error = CKTacDump(ckt,ckt->CKTrhsOld[0],acPlot); if(error) return(error); } SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; } FREE(job->r1H1ptr); FREE(job->i1H1ptr); FREE(job->r2H11ptr); FREE(job->i2H11ptr); FREE(job->r1H1stor); FREE(job->i1H1stor); FREE(job->r2H11stor); FREE(job->i2H11stor); if (! (job->Df2wanted)) { FREE(job->r3H11ptr); FREE(job->i3H11ptr); FREE(job->i3H11stor); FREE(job->r3H11stor); } else { FREE(job->r2H1m2ptr); FREE(job->r3H1m2ptr); FREE(job->r1H2ptr); FREE(job->i1H2ptr); FREE(job->r2H12ptr); FREE(job->i2H12ptr); FREE(job->i2H1m2ptr); FREE(job->i3H1m2ptr); FREE(job->r1H2stor); FREE(job->r2H12stor); FREE(job->r2H1m2stor); FREE(job->r3H1m2stor); FREE(job->i1H2stor); FREE(job->i2H12stor); FREE(job->i2H1m2stor); FREE(job->i3H1m2stor); } #ifdef D_DBG_BLOCKTIMES time1 = SPfrontEnd->IFseconds() - time1; printf("Time for output and deallocation: %g seconds \n", time1); #endif return(OK); } ngspice-26/src/spicelib/analysis/dcop.c0000644000265600020320000001260012264261473017525 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add headers */ #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" #include "ngspice/ipctiein.h" /* gtri - end - wbk */ #endif int DCop(CKTcircuit *ckt, int notused) { #ifdef WANT_SENSE2 int i, senmode, size; long save; #endif int converged; int error; IFuid *nameList; /* va: tmalloc'ed list */ int numNames; runDesc *plot = NULL; NG_IGNORE(notused); #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff and initialize anal_init and anal_type */ /* Tell the beginPlot routine what mode we're in */ g_ipc.anal_type = IPC_ANAL_DCOP; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.circuit.anal_init = MIF_TRUE; /* gtri - end - wbk */ #endif error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); tfree(nameList); /* va: nameList not used any longer, it was a memory leak */ if(error) return(error); /* initialize CKTsoaCheck `warn' counters */ if (ckt->CKTsoaCheck) error = CKTsoaInit(); #ifdef XSPICE /* gtri - begin - wbk - 6/10/91 - Call EVTop if event-driven instances exist */ if(ckt->evt->counts.num_insts != 0) { /* use new DCOP algorithm */ converged = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, 0.0); EVTop_save(ckt, MIF_TRUE, 0.0); /* gtri - end - wbk - 6/10/91 - Call EVTop if event-driven instances exist */ } else /* If no event-driven instances, do what SPICE normally does */ #endif converged = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if(converged != 0) { fprintf(stdout,"\nDC solution failed -\n"); CKTncDump(ckt); /* CKTnode *node; double new, old, tol; int i=1; fprintf(stdout,"\nDC solution failed -\n\n"); fprintf(stdout,"Last Node Voltages\n"); fprintf(stdout,"------------------\n\n"); fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", "Previous Iter"); fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", "-------------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) { new = ckt->CKTrhsOld [i] ; old = ckt->CKTrhs [i] ; fprintf(stdout,"%-30s %20g %20g", node->name, new, old); if(node->type == SP_VOLTAGE) { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTvoltTol; } else { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTabstol; } if (fabs(new-old) >tol ) { fprintf(stdout," *"); } fprintf(stdout,"\n"); } i++; } fprintf(stdout,"\n"); SPfrontEnd->OUTendPlot (plot); */ return(converged); } ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && ((ckt->CKTsenInfo->SENmode&DCSEN) || (ckt->CKTsenInfo->SENmode&ACSEN)) ){ #ifdef SENSDEBUG printf("\nDC Operating Point Sensitivity Results\n\n"); CKTsenPrint(ckt); #endif /* SENSDEBUG */ senmode = ckt->CKTsenInfo->SENmode; save = ckt->CKTmode; ckt->CKTsenInfo->SENmode = DCSEN; size = SMPmatSize(ckt->CKTmatrix); for(i = 1; i<=size ; i++){ ckt->CKTrhsOp[i] = ckt->CKTrhsOld[i]; } error = CKTsenDCtran(ckt); if (error) return(error); ckt->CKTmode = save; ckt->CKTsenInfo->SENmode = senmode; } #endif converged = CKTload(ckt); #ifdef XSPICE /* gtri - modify - wbk - 12/19/90 - Send IPC data delimiters */ if(g_ipc.enabled) ipc_send_dcop_prefix(); CKTdump(ckt, 0.0, plot); if (ckt->CKTsoaCheck) error = CKTsoaCheck(ckt); if(g_ipc.enabled) ipc_send_dcop_suffix(); /* gtri - end - wbk */ #else if(converged == 0) { CKTdump(ckt, 0.0, plot); if (ckt->CKTsoaCheck) error = CKTsoaCheck(ckt); } else { fprintf(stderr,"error: circuit reload failed.\n"); } #endif SPfrontEnd->OUTendPlot (plot); return(converged); } ngspice-26/src/spicelib/analysis/cktneweq.c0000644000265600020320000000142612264261473020425 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTnewEq(ckt,node,name) * Allocate a new circuit equation number (returned) in the specified * circuit to contain a new equation or node * returns -1 for failure to allocate a node number * */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" int CKTnewEq(CKTcircuit *ckt, CKTnode **node, IFuid name) { CKTnode *mynode; int error; error = CKTmkNode(ckt,&mynode); if(error) return(error); if(node) *node = mynode; mynode->name = name; error = CKTlinkEq(ckt,mynode); return(error); } ngspice-26/src/spicelib/analysis/cktmkcur.c0000644000265600020320000000167612264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTmkCur * make the given name a 'node' of type current in the * specified circuit */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTmkCur(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix) { IFuid uid; int error; CKTnode *mynode; CKTnode *checknode; error = CKTmkNode(ckt,&mynode); if(error) return(error); checknode = mynode; error = SPfrontEnd->IFnewUid (ckt, &uid, basename, suffix, UID_SIGNAL, &checknode); if(error) { FREE(mynode); if(node) *node = checknode; return(error); } mynode->name = uid; mynode->type = SP_CURRENT; if(node) *node = mynode; error = CKTlinkEq(ckt,mynode); return(error); } ngspice-26/src/spicelib/analysis/cktdisto.c0000644000265600020320000000764412264261473020440 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ /* * CKTdisto (ckt, mode) */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "vsrc/vsrcdefs.h" #include "isrc/isrcdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/distodef.h" #include "ngspice/sperror.h" int CKTdisto (CKTcircuit *ckt, int mode) { DISTOAN *job = (DISTOAN *) ckt->CKTcurJob; int i; int error=0; int size; switch(mode) { case D_SETUP: for (i=0;iDEVdisto && ckt->CKThead[i] ) { error = DEVices[i]->DEVdisto (mode, ckt->CKThead[i], ckt); if(error) return(error); } } break; case D_TWOF1: case D_THRF1: case D_F1PF2: case D_F1MF2: case D_2F1MF2: size = SMPmatSize(ckt->CKTmatrix); for (i=1; i<=size; i++) { ckt->CKTrhs[i] = 0.0; ckt->CKTirhs[i] = 0.0; } for (i=0;iDEVdisto && ckt->CKThead[i] ) { error = DEVices[i]->DEVdisto (mode, ckt->CKThead[i], ckt); if(error) return(error); } } break; case D_RHSF1: job->Df2given = 0; /* will change if any F2 source is found */ case D_RHSF2: { int vcode; int icode; double mag=0.0; double phase=0.0; int size; size = SMPmatSize(ckt->CKTmatrix); for (i=0;i<=size;i++) { ckt->CKTrhs[i]=0; ckt->CKTirhs[i]=0; } vcode = CKTtypelook("Vsource"); icode = CKTtypelook("Isource"); if(vcode >= 0) { /* voltage sources are in this version, so use them */ VSRCinstance *here; VSRCmodel *model; for(model = (VSRCmodel *)ckt->CKThead[vcode];model != NULL; model=model->VSRCnextModel){ for(here=model->VSRCinstances;here!=NULL; here=here->VSRCnextInstance) { /* check if the source has a distortion input*/ if (here->VSRCdGiven) { if (here->VSRCdF2given) job->Df2given = 1; if ((here->VSRCdF1given) && (mode == D_RHSF1)) { mag = here->VSRCdF1mag; phase = here->VSRCdF1phase; } else if ((here->VSRCdF2given) && (mode == D_RHSF2)) { mag = here->VSRCdF2mag; phase = here->VSRCdF2phase; } if (((here->VSRCdF1given) && (mode == D_RHSF1)) || ((here->VSRCdF2given) && (mode == D_RHSF2))) { ckt->CKTrhs[here->VSRCbranch] = 0.5*mag* cos(M_PI*phase/180.0); ckt->CKTirhs[here->VSRCbranch] = 0.5*mag*sin(M_PI*phase/180.0); } } } } } if(icode >= 0 ) { /* current sources are in this version, so use them */ ISRCinstance *here; ISRCmodel *model; for(model= (ISRCmodel *)ckt->CKThead[icode];model != NULL; model=model->ISRCnextModel){ for(here=model->ISRCinstances;here!=NULL; here=here->ISRCnextInstance) { /* check if the source has a distortion input*/ if (here->ISRCdGiven) { if (here->ISRCdF2given) job->Df2given = 1; if ((here->ISRCdF1given) && (mode == D_RHSF1)) { mag = here->ISRCdF1mag; phase = here->ISRCdF1phase; } else if ((here->ISRCdF2given) && (mode == D_RHSF2)) { mag = here->ISRCdF2mag; phase = here->ISRCdF2phase; } if (((here->ISRCdF1given) && (mode == D_RHSF1)) || ((here->ISRCdF2given) && (mode == D_RHSF2))) { ckt->CKTrhs[here->ISRCposNode] = - 0.5 * mag * cos(M_PI*phase/180.0); ckt->CKTrhs[here->ISRCnegNode] = 0.5 * mag * cos( M_PI*phase/180.0); ckt->CKTirhs[here->ISRCposNode] = - 0.5 * mag * sin( M_PI*phase/180.0); ckt->CKTirhs[here->ISRCnegNode] = 0.5 * mag * sin( M_PI*phase/180.0); } } } } } } error = 0; break; default: error = E_BADPARM; break; } return(error); } ngspice-26/src/spicelib/analysis/senssetp.c0000644000265600020320000000531512264261473020451 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/sensdefs.h" #include "analysis.h" /* ARGSUSED */ int SENSsetParam(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { SENS_AN *job = (SENS_AN *) anal; NG_IGNORE(ckt); switch(which) { case SENS_POS: job->output_pos = value->nValue; job->output_neg = NULL; job->output_volt = 1; job->step_type = SENS_DC; break; case SENS_NEG: job->output_neg = value->nValue; break; case SENS_SRC: job->output_src = value->uValue; job->output_volt = 0; job->step_type = SENS_DC; break; case SENS_NAME: job->output_name = value->sValue; break; case SENS_START: job->start_freq = value->rValue; break; case SENS_STOP: job->stop_freq = value->rValue; break; case SENS_STEPS: job->n_freq_steps = value->iValue; break; case SENS_DEC: job->step_type = SENS_DECADE; break; case SENS_OCT: job->step_type = SENS_OCTAVE; break; case SENS_LIN: job->step_type = SENS_LINEAR; break; case SENS_DC: job->step_type = SENS_DC; break; case SENS_DEFTOL: job->deftol = value->rValue; break; case SENS_DEFPERTURB: job->defperturb = value->rValue; break; default: return(E_BADPARM); } return(OK); } static IFparm SENSparms[] = { /* TF like parameters */ { "outpos", SENS_POS, IF_SET|IF_ASK|IF_NODE, "output positive node" }, { "outneg", SENS_NEG, IF_SET|IF_ASK|IF_NODE, "output negative node" }, { "outsrc", SENS_SRC, IF_SET|IF_ASK|IF_INSTANCE, "output current" }, { "outname", SENS_NAME, IF_SET|IF_ASK|IF_STRING, "Name of output variable" }, /* AC parameters */ { "start", SENS_START, IF_SET|IF_ASK|IF_REAL, "starting frequency" }, { "stop", SENS_STOP, IF_SET|IF_ASK|IF_REAL, "ending frequency" }, { "numsteps", SENS_STEPS,IF_SET|IF_ASK|IF_INTEGER, "number of frequencies"}, { "dec", SENS_DEC, IF_SET|IF_FLAG, "step by decades" }, { "oct", SENS_OCT, IF_SET|IF_FLAG, "step by octaves" }, { "lin", SENS_LIN, IF_SET|IF_FLAG, "step linearly" }, { "dc", SENS_DC, IF_SET|IF_FLAG, "analysis at DC" }, }; SPICEanalysis SENSinfo = { { "SENS", "Sensitivity analysis", NUMELEMS(SENSparms), SENSparms }, sizeof(SENS_AN), FREQUENCYDOMAIN, 1, SENSsetParam, SENSask, NULL, sens_sens }; ngspice-26/src/spicelib/analysis/transetp.c0000644000265600020320000000416012264261473020442 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" /* ARGSUSED */ int TRANsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { TRANan *job = (TRANan *) anal; NG_IGNORE(ckt); switch(which) { case TRAN_TSTOP: if (value->rValue <= 0.0) { errMsg = copy("TST0P is invalid, must be greater than zero."); job->TRANfinalTime = 1.0; return(E_PARMVAL); } job->TRANfinalTime = value->rValue; break; case TRAN_TSTEP: if (value->rValue <= 0.0) { errMsg = copy( "TSTEP is invalid, must be greater than zero." ); job->TRANstep = 1.0; return(E_PARMVAL); } job->TRANstep = value->rValue; break; case TRAN_TSTART: if (value->rValue >= job->TRANfinalTime) { errMsg = copy("TSTART is invalid, must be less than TSTOP."); job->TRANinitTime = 0.0; return(E_PARMVAL); } job->TRANinitTime = value->rValue; break; case TRAN_TMAX: job->TRANmaxStep = value->rValue; break; case TRAN_UIC: if(value->iValue) { job->TRANmode |= MODEUIC; } break; default: return(E_BADPARM); } return(OK); } static IFparm TRANparms[] = { { "tstart", TRAN_TSTART, IF_SET|IF_REAL, "starting time" }, { "tstop", TRAN_TSTOP, IF_SET|IF_REAL, "ending time" }, { "tstep", TRAN_TSTEP, IF_SET|IF_REAL, "time step" }, { "tmax", TRAN_TMAX, IF_SET|IF_REAL, "maximum time step" }, { "uic", TRAN_UIC, IF_SET|IF_FLAG, "use initial conditions" }, }; SPICEanalysis TRANinfo = { { "TRAN", "Transient analysis", NUMELEMS(TRANparms), TRANparms }, sizeof(TRANan), TIMEDOMAIN, 1, TRANsetParm, TRANaskQuest, TRANinit, DCtran }; ngspice-26/src/spicelib/analysis/cktnoise.c0000644000265600020320000000716512264261473020431 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ /* * CKTnoise (ckt, mode, operation, data) * * This routine is responsible for naming and evaluating all of the * noise sources in the circuit. It uses a series of subroutines to * name and evaluate the sources associated with each model, and then * it evaluates the noise for the entire circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/sperror.h" int CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; double outNdens; int i; IFvalue outData; /* output variable (points to list of outputs)*/ IFvalue refVal; /* reference variable (always 0)*/ int error; outNdens = 0.0; /* let each device decide how many and what type of noise sources it has */ for (i=0; i < DEVmaxnum; i++) { if ( DEVices[i] && DEVices[i]->DEVnoise && ckt->CKThead[i] ) { error = DEVices[i]->DEVnoise (mode, operation, ckt->CKThead[i], ckt,data, &outNdens); if (error) return (error); } } switch (operation) { case N_OPEN: /* take care of the noise for the circuit as a whole */ switch (mode) { case N_DENS: data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, "onoise_spectrum", UID_OTHER, NULL); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, "inoise_spectrum", UID_OTHER, NULL); /* we've added two more plots */ data->outpVector = TMALLOC(double, data->numPlots); break; case INT_NOIZ: data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, "onoise_total", UID_OTHER, NULL); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, "inoise_total", UID_OTHER, NULL); /* we've added two more plots */ data->outpVector = TMALLOC(double, data->numPlots); break; default: return (E_INTERN); } break; case N_CALC: switch (mode) { case N_DENS: if ((job->NStpsSm == 0) || data->prtSummary) { data->outpVector[data->outNumber++] = outNdens; data->outpVector[data->outNumber++] = (outNdens * data->GainSqInv); refVal.rValue = data->freq; /* the reference is the freq */ outData.v.numValue = data->outNumber; /* vector number */ outData.v.vec.rVec = data->outpVector; /* vector of outputs */ SPfrontEnd->OUTpData (data->NplotPtr, &refVal, &outData); } break; case INT_NOIZ: data->outpVector[data->outNumber++] = data->outNoiz; data->outpVector[data->outNumber++] = data->inNoise; outData.v.vec.rVec = data->outpVector; /* vector of outputs */ outData.v.numValue = data->outNumber; /* vector number */ SPfrontEnd->OUTpData (data->NplotPtr, &refVal, &outData); break; default: return (E_INTERN); } break; case N_CLOSE: SPfrontEnd->OUTendPlot (data->NplotPtr); FREE(data->namelist); FREE(data->outpVector); break; default: return (E_INTERN); } return (OK); } ngspice-26/src/spicelib/analysis/cktmapn.c0000644000265600020320000000227412264261473020243 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTmapNode(ckt,node) * map the given node to the compact node numbering set of the * specified circuit */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED *//* fixme abandoned */ int CKTmapNode(CKTcircuit *ckt, CKTnode **node, IFuid name) { CKTnode *here; int error; IFuid uid; CKTnode *mynode; for (here = ckt->CKTnodes; here; here = here->next) { if(here->name == name) { if(node) *node = here; return(E_EXISTS); } } /* not found, so must be a new one */ error = CKTmkNode(ckt,&mynode); /*allocate the node*/ if(error) return(error); /* get a uid for it */ error = SPfrontEnd->IFnewUid (ckt, &uid, NULL, name, UID_SIGNAL, &mynode); if(error) return(error); mynode->name = uid; /* set the info we have */ mynode->type = SP_VOLTAGE; error = CKTlinkEq(ckt,mynode); /* and link it in */ if(node) *node = mynode; /* and finally, return it */ return(OK); } ngspice-26/src/spicelib/analysis/cktdltm.c0000644000265600020320000000224112264261473020242 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTdltMod * delete the specified model - not yet supported in spice */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTdltMod(CKTcircuit *ckt, GENmodel *m) { GENmodel *mod, **prevp; GENinstance *h, *next_i; int error; prevp = &ckt->CKThead[m->GENmodType]; for (mod = *prevp; m && mod != m; mod = mod->GENnextModel) prevp = &mod->GENnextModel; if (!mod) return OK; *prevp = m->GENnextModel; for (h = m->GENinstances; h; h = next_i) { next_i = h->GENnextInstance; if (h != nghash_delete(ckt->DEVnameHash, h->GENname)) fprintf(stderr, "ERROR, ouch nasal daemons ...\n"); error = SPfrontEnd->IFdelUid (ckt, h->GENname, UID_INSTANCE); tfree(h); } if (m != nghash_delete(ckt->MODnameHash, m->GENmodName)) fprintf(stderr, "ERROR, ouch nasal daemons ...\n"); error = SPfrontEnd->IFdelUid (ckt, m->GENmodName, UID_MODEL); tfree(m); return(OK); } ngspice-26/src/spicelib/analysis/cktfbran.c0000644000265600020320000000135212264261473020374 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTfndBranch(ckt,name) * this is a driver program to iterate through all the various * findBranch functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" int CKTfndBranch(CKTcircuit *ckt, IFuid name) { int i; int j; for (i=0;iDEVfindBranch && ckt->CKThead[i] ) { j = DEVices[i]->DEVfindBranch (ckt, ckt->CKThead[i], name); if(j != 0) return(j); } } return(0); } ngspice-26/src/spicelib/analysis/cktic.c0000644000265600020320000000256612264261473017707 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" int CKTic(CKTcircuit *ckt) { int error; int size; int i; CKTnode *node; size = SMPmatSize(ckt->CKTmatrix); for (i=0;i<=size;i++) { ckt->CKTrhs[i]=0; } for(node = ckt->CKTnodes;node != NULL; node = node->next) { if(node->nsGiven) { node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number,node->number); if(node->ptr == NULL) return(E_NOMEM); ckt->CKThadNodeset = 1; ckt->CKTrhs[node->number] = node->nodeset; } if(node->icGiven) { if(! ( node->ptr)) { node->ptr = SMPmakeElt(ckt->CKTmatrix,node->number, node->number); if(node->ptr == NULL) return(E_NOMEM); } ckt->CKTrhs[node->number] = node->ic; } } if(ckt->CKTmode & MODEUIC) { for (i=0;iDEVsetic && ckt->CKThead[i] ) { error = DEVices[i]->DEVsetic (ckt->CKThead[i], ckt); if(error) return(error); } } } return(OK); } ngspice-26/src/spicelib/analysis/pzan.c0000644000265600020320000001240612264261473017554 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/complex.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/pzdefs.h" #include "ngspice/trandefs.h" /* only to get the 'mode' definitions */ #include "ngspice/sperror.h" #define DEBUG if (0) /* ARGSUSED */ int PZan(CKTcircuit *ckt, int reset) { PZAN *job = (PZAN *) ckt->CKTcurJob; int error; int numNames; IFuid *nameList; runDesc *plot = NULL; NG_IGNORE(reset); error = PZinit(ckt); if (error != OK) return error; /* Calculate small signal parameters at the operating point */ error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if (error) return(error); ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; error = CKTload(ckt); /* Make sure that all small signal params are * set */ if (error) return(error); if (ckt->CKTkeepOpInfo) { /* Dump operating point. */ error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Distortion Operating Point", NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); if(error) return(error); CKTdump(ckt, 0.0, plot); SPfrontEnd->OUTendPlot (plot); } if (job->PZwhich & PZ_DO_POLES) { error = CKTpzSetup(ckt, PZ_DO_POLES); if (error != OK) return error; error = CKTpzFindZeros(ckt, &job->PZpoleList, &job->PZnPoles); if (error != OK) return(error); } if (job->PZwhich & PZ_DO_ZEROS) { error = CKTpzSetup(ckt, PZ_DO_ZEROS); if (error != OK) return error; error = CKTpzFindZeros(ckt, &job->PZzeroList, &job->PZnZeros); if (error != OK) return(error); } return PZpost(ckt); } /* * Perform error checking */ int PZinit(CKTcircuit *ckt) { PZAN *job = (PZAN *) ckt->CKTcurJob; int i; i = CKTtypelook("transmission line"); if (i == -1) { i = CKTtypelook("Tranline"); if (i == -1) i = CKTtypelook("LTRA"); } if (i != -1 && ckt->CKThead[i] != NULL) MERROR(E_XMISSIONLINE, "Transmission lines not supported"); job->PZpoleList = NULL; job->PZzeroList = NULL; job->PZnPoles = 0; job->PZnZeros = 0; if (job->PZin_pos == job->PZin_neg) MERROR(E_SHORT, "Input is shorted"); if (job->PZout_pos == job->PZout_neg) MERROR(E_SHORT, "Output is shorted"); if (job->PZin_pos == job->PZout_pos && job->PZin_neg == job->PZout_neg && job->PZinput_type == PZ_IN_VOL) MERROR(E_INISOUT, "Transfer function is unity"); else if (job->PZin_pos == job->PZout_neg && job->PZin_neg == job->PZout_pos && job->PZinput_type == PZ_IN_VOL) MERROR(E_INISOUT, "Transfer function is -1"); return(OK); } /* * PZpost Post-processing of the pole-zero analysis results */ int PZpost(CKTcircuit *ckt) { PZAN *job = (PZAN *) ckt->CKTcurJob; runDesc *pzPlotPtr = NULL; /* the plot pointer for front end */ IFcomplex *out_list; IFvalue outData; /* output variable (points to out_list) */ IFuid *namelist; PZtrial *root; char name[50]; int i, j; namelist = TMALLOC(IFuid, job->PZnPoles + job->PZnZeros); out_list = TMALLOC(IFcomplex, job->PZnPoles + job->PZnZeros); j = 0; for (i = 0; i < job->PZnPoles; i++) { sprintf(name, "pole(%-u)", i+1); SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL, name, UID_OTHER, NULL); } for (i = 0; i < job->PZnZeros; i++) { sprintf(name, "zero(%-u)", i+1); SPfrontEnd->IFnewUid (ckt, &(namelist[j++]), NULL, name, UID_OTHER, NULL); } SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, NULL, 0, job->PZnPoles + job->PZnZeros, namelist, IF_COMPLEX, &pzPlotPtr); j = 0; if (job->PZnPoles > 0) { for (root = job->PZpoleList; root != NULL; root = root->next) { for (i = 0; i < root->multiplicity; i++) { out_list[j].real = root->s.real; out_list[j].imag = root->s.imag; j += 1; if (root->s.imag != 0.0) { out_list[j].real = root->s.real; out_list[j].imag = -root->s.imag; j += 1; } } DEBUG printf("LIST pole: (%g,%g) x %d\n", root->s.real, root->s.imag, root->multiplicity); } } if (job->PZnZeros > 0) { for (root = job->PZzeroList; root != NULL; root = root->next) { for (i = 0; i < root->multiplicity; i++) { out_list[j].real = root->s.real; out_list[j].imag = root->s.imag; j += 1; if (root->s.imag != 0.0) { out_list[j].real = root->s.real; out_list[j].imag = -root->s.imag; j += 1; } } DEBUG printf("LIST zero: (%g,%g) x %d\n", root->s.real, root->s.imag, root->multiplicity); } } outData.v.numValue = job->PZnPoles + job->PZnZeros; outData.v.vec.cVec = out_list; SPfrontEnd->OUTpData (pzPlotPtr, NULL, &outData); SPfrontEnd->OUTendPlot (pzPlotPtr); return(OK); } ngspice-26/src/spicelib/analysis/cktpname.c0000644000265600020320000000274612264261473020414 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * CKTpName() * * Take a parameter by Name and set it on the specified device */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, char *name, GENinstance **fast) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this device is a member of */ /* the device type code to the device being parsed */ /* the name of the device being parsed */ /* direct pointer to device being parsed */ { int error; /* int to store evaluate error return codes in */ int i; NG_IGNORE(name); for(i = 0 ; i < *(DEVices[dev]->DEVpublic.numInstanceParms) ; i++) { if(!strcmp(parm, DEVices[dev]->DEVpublic.instanceParms[i].keyword)) { error = CKTparam(ckt, *fast, DEVices[dev]->DEVpublic.instanceParms[i].id, val, NULL); if(error) return(error); break; } } if(i == *(DEVices[dev]->DEVpublic.numInstanceParms)) { return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/daskq.c0000644000265600020320000000236312264261473017710 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/distodef.h" /* ARGSUSED */ int DaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { DISTOAN *job = (DISTOAN *) anal; NG_IGNORE(ckt); switch(which) { case D_START: value->rValue = job->DstartF1; break; case D_STOP: value->rValue = job->DstopF1 ; break; case D_STEPS: value->iValue = job->DnumSteps; break; case D_DEC: if (job->DstepType == DECADE) { value->iValue=1; } else { value->iValue=0; } break; case D_OCT: if (job->DstepType == OCTAVE) { value->iValue=1; } else { value->iValue=0; } break; case D_LIN: if (job->DstepType == LINEAR) { value->iValue=1; } else { value->iValue=0; } break; case D_F2OVRF1: value->rValue = job->Df2ovrF1; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/cktdojob.c0000644000265600020320000001507412264261473020407 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/trandefs.h" #include "ngspice/cpextern.h" #include "analysis.h" #ifdef XSPICE /* gtri - add - wbk - 11/26/90 - add include for MIF and EVT global data */ #include "ngspice/mif.h" #include "ngspice/evtproto.h" /* gtri - end - wbk - 11/26/90 */ /* gtri - add - 12/12/90 - wbk - include ipc stuff */ #include "ngspice/ipctiein.h" /* gtri - end - 12/12/90 */ #endif extern SPICEanalysis *analInfo[]; int CKTdoJob(CKTcircuit *ckt, int reset, TSKtask *task) { JOB *job; double startTime; int error, i, error2; int ANALmaxnum = spice_num_analysis(); #ifdef WANT_SENSE2 int senflag; static int sens_num = -1; /* Sensitivity is special */ if (sens_num < 0) { for (i = 0; i < ANALmaxnum; i++) if (!strcmp("SENS2", analInfo[i]->if_analysis.name)) break; sens_num = i; } #endif startTime = SPfrontEnd->IFseconds(); ckt->CKTtemp = task->TSKtemp; ckt->CKTnomTemp = task->TSKnomTemp; ckt->CKTmaxOrder = task->TSKmaxOrder; ckt->CKTintegrateMethod = task->TSKintegrateMethod; ckt->CKTbypass = task->TSKbypass; ckt->CKTdcMaxIter = task->TSKdcMaxIter; ckt->CKTdcTrcvMaxIter = task->TSKdcTrcvMaxIter; ckt->CKTtranMaxIter = task->TSKtranMaxIter; ckt->CKTnumSrcSteps = task->TSKnumSrcSteps; ckt->CKTnumGminSteps = task->TSKnumGminSteps; ckt->CKTgminFactor = task->TSKgminFactor; ckt->CKTminBreak = task->TSKminBreak; ckt->CKTabstol = task->TSKabstol; ckt->CKTpivotAbsTol = task->TSKpivotAbsTol; ckt->CKTpivotRelTol = task->TSKpivotRelTol; ckt->CKTreltol = task->TSKreltol; ckt->CKTchgtol = task->TSKchgtol; ckt->CKTvoltTol = task->TSKvoltTol; ckt->CKTgmin = task->TSKgmin; ckt->CKTgshunt = task->TSKgshunt; ckt->CKTdelmin = task->TSKdelmin; ckt->CKTtrtol = task->TSKtrtol; #ifdef XSPICE /* Lower value of trtol to give smaller stepsize and more accuracy, but only if there are 'A' devices in the circuit, may be overridden by 'set xtrtol=newval' */ if (ckt->CKTadevFlag && (ckt->CKTtrtol > 1)) { int newtol; if (cp_getvar("xtrtol", CP_NUM, &newtol)) { printf("Override trtol to %d for xspice 'A' devices\n", newtol); ckt->CKTtrtol = newtol; } else { printf("Reducing trtol to 1 for xspice 'A' devices\n"); ckt->CKTtrtol = 1; } } #endif ckt->CKTdefaultMosM = task->TSKdefaultMosM; ckt->CKTdefaultMosL = task->TSKdefaultMosL; ckt->CKTdefaultMosW = task->TSKdefaultMosW; ckt->CKTdefaultMosAD = task->TSKdefaultMosAD; ckt->CKTdefaultMosAS = task->TSKdefaultMosAS; ckt->CKTfixLimit = task->TSKfixLimit; ckt->CKTnoOpIter = task->TSKnoOpIter; ckt->CKTtryToCompact = task->TSKtryToCompact; ckt->CKTbadMos3 = task->TSKbadMos3; ckt->CKTkeepOpInfo = task->TSKkeepOpInfo; ckt->CKTcopyNodesets = task->TSKcopyNodesets; ckt->CKTnodeDamping = task->TSKnodeDamping; ckt->CKTabsDv = task->TSKabsDv; ckt->CKTrelDv = task->TSKrelDv; ckt->CKTtroubleNode = 0; ckt->CKTtroubleElt = NULL; ckt->CKTnoopac = task->TSKnoopac && ckt->CKTisLinear; #ifdef NEWTRUNC ckt->CKTlteReltol = task->TSKlteReltol; ckt->CKTlteAbstol = task->TSKlteAbstol; #endif /* NEWTRUNC */ fprintf(stdout, "Doing analysis at TEMP = %f and TNOM = %f\n\n", ckt->CKTtemp - CONSTCtoK, ckt->CKTnomTemp - CONSTCtoK); error = 0; if (reset) { ckt->CKTdelta = 0.0; ckt->CKTtime = 0.0; ckt->CKTcurrentAnalysis = 0; #ifdef WANT_SENSE2 senflag = 0; if (sens_num < ANALmaxnum) for (job = task->jobs; !error && job; job = job->JOBnextJob) { if (job->JOBtype == sens_num) { senflag = 1; ckt->CKTcurJob = job; ckt->CKTsenInfo = (SENstruct *) job; error = analInfo[sens_num]->an_func (ckt, reset); } } if (ckt->CKTsenInfo && (!senflag || error)) FREE(ckt->CKTsenInfo); #endif /* make sure this is either up do date or NULL */ ckt->CKTcurJob = NULL; /* normal reset */ if (!error) error = CKTunsetup(ckt); #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - set ipc syntax error flag */ if(error) g_ipc.syntax_error = IPC_TRUE; /* gtri - end - 12/12/90 */ #endif if (!error) error = CKTsetup(ckt); #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - set ipc syntax error flag */ if(error) g_ipc.syntax_error = IPC_TRUE; /* gtri - end - 12/12/90 */ #endif if (!error) error = CKTtemp(ckt); #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - set ipc syntax error flag */ if(error) g_ipc.syntax_error = IPC_TRUE; /* gtri - end - 12/12/90 */ #endif if (error) { #ifdef XSPICE /* gtri - add - 12/12/90 - wbk - return if syntax errors from parsing */ if(g_ipc.enabled) { if(g_ipc.syntax_error) ; else { /* else, send (GO) errchk status if we got this far */ /* Caller is responsible for sending NOGO status if we returned earlier */ ipc_send_errchk(); } } /* gtri - end - 12/12/90 */ #endif return error; }/* if error */ } error2 = OK; /* Analysis order is important */ for (i = 0; i < ANALmaxnum; i++) { #ifdef WANT_SENSE2 if (i == sens_num) continue; #endif for (job = task->jobs; job; job = job->JOBnextJob) { if (job->JOBtype == i) { ckt->CKTcurJob=job; error = OK; if (analInfo[i]->an_init) error = analInfo[i]->an_init (ckt, job); if (!error && analInfo[i]->do_ic) error = CKTic(ckt); if (!error){ #ifdef XSPICE if(reset) { /* gtri - begin - 6/10/91 - wbk - Setup event-driven data */ error = EVTsetup(ckt); if(error) { ckt->CKTstat->STATtotAnalTime += SPfrontEnd->IFseconds() - startTime; return(error); } /* gtri - end - 6/10/91 - wbk - Setup event-driven data */ } #endif error = analInfo[i]->an_func (ckt, reset); /* txl, cpl addition */ if (error == 1111) break; } if (error) error2 = error; } } } ckt->CKTstat->STATtotAnalTime += SPfrontEnd->IFseconds() - startTime; #ifdef WANT_SENSE2 if (ckt->CKTsenInfo) SENdestroy(ckt->CKTsenInfo); #endif return(error2); } ngspice-26/src/spicelib/analysis/ckti2nod.c0000644000265600020320000000362512264261473020324 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTinst2Node * get the name and node pointer for a node given a device it is * bound to and the terminal of the device. */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/devdefs.h" int CKTinst2Node(CKTcircuit *ckt, void *instPtr, int terminal, CKTnode **node, IFuid *nodeName) { int nodenum; int type; CKTnode *here; type = ((GENinstance *)instPtr)->GENmodPtr->GENmodType; if(*(DEVices[type]->DEVpublic.terms) >= terminal && terminal > 0) { switch(terminal) { default: return(E_NOTERM); case 1: nodenum = ((GENinstance *)instPtr)->GENnode1; break; case 2: nodenum = ((GENinstance *)instPtr)->GENnode2; break; case 3: nodenum = ((GENinstance *)instPtr)->GENnode3; break; case 4: nodenum = ((GENinstance *)instPtr)->GENnode4; break; case 5: nodenum = ((GENinstance *)instPtr)->GENnode5; break; case 6: nodenum = ((GENinstance *)instPtr)->GENnode6; break; case 7: nodenum = ((GENinstance *)instPtr)->GENnode7; break; } /* ok, now we know its number, so we just have to find it.*/ for(here = ckt->CKTnodes;here;here = here->next) { if(here->number == nodenum) { /* found it */ *node = here; *nodeName = here->name; return(OK); } } return(E_NOTFOUND); } else { return(E_NOTERM); } } ngspice-26/src/spicelib/analysis/acan.c0000644000265600020320000003177612264261473017521 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified 2001: AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/acdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add headers */ #include "ngspice/mif.h" #include "ngspice/evtproto.h" #include "ngspice/ipctiein.h" /* gtri - end - wbk */ #endif #define INIT_STATS() \ do { \ startTime = SPfrontEnd->IFseconds(); \ startdTime = ckt->CKTstat->STATdecompTime; \ startsTime = ckt->CKTstat->STATsolveTime; \ startlTime = ckt->CKTstat->STATloadTime; \ startkTime = ckt->CKTstat->STATsyncTime; \ } while(0) #define UPDATE_STATS(analysis) \ do { \ ckt->CKTcurrentAnalysis = analysis; \ ckt->CKTstat->STATacTime += SPfrontEnd->IFseconds() - startTime; \ ckt->CKTstat->STATacDecompTime += ckt->CKTstat->STATdecompTime - startdTime; \ ckt->CKTstat->STATacSolveTime += ckt->CKTstat->STATsolveTime - startsTime; \ ckt->CKTstat->STATacLoadTime += ckt->CKTstat->STATloadTime - startlTime; \ ckt->CKTstat->STATacSyncTime += ckt->CKTstat->STATsyncTime - startkTime; \ } while(0) int ACan(CKTcircuit *ckt, int restart) { ACAN *job = (ACAN *) ckt->CKTcurJob; double freq; double freqTol; /* tolerence parameter for finding final frequency */ double startdTime; double startsTime; double startlTime; double startkTime; double startTime; int error; int numNames; IFuid *nameList; /* va: tmalloc'ed list of names */ IFuid freqUid; static runDesc *acPlot = NULL; runDesc *plot = NULL; #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff and anal_init and anal_type */ /* Tell the beginPlot routine what mode we're in */ g_ipc.anal_type = IPC_ANAL_AC; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.circuit.anal_init = MIF_TRUE; /* gtri - end - wbk */ #endif /* start at beginning */ if (job->ACsaveFreq == 0 || restart) { if (job->ACnumberSteps < 1) job->ACnumberSteps = 1; switch (job->ACstepType) { case DECADE: job->ACfreqDelta = exp(log(10.0)/job->ACnumberSteps); break; case OCTAVE: job->ACfreqDelta = exp(log(2.0)/job->ACnumberSteps); break; case LINEAR: if (job->ACnumberSteps-1 > 1) job->ACfreqDelta = (job->ACstopFreq - job->ACstartFreq) / (job->ACnumberSteps - 1); else /* Patch from: Richard McRoberts * This patch is for a rather pathological case: * a linear step with only one point */ job->ACfreqDelta = 0; break; default: return(E_BADPARM); } #ifdef XSPICE /* gtri - begin - wbk - Call EVTop if event-driven instances exist */ if(ckt->evt->counts.num_insts != 0) { error = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, 0.0); EVTop_save(ckt, MIF_TRUE, 0.0); } else #endif /* If no event-driven instances, do what SPICE normally does */ if (!ckt->CKTnoopac) { /* skip OP if option NOOPAC is set and circuit is linear */ error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if(error){ fprintf(stdout,"\nAC operating point failed -\n"); CKTncDump(ckt); return(error); } } else fprintf(stdout,"\n Linear circuit, option noopac given: no OP analysis\n"); #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ /* Send the operating point results for Mspice compatibility */ if(g_ipc.enabled) { /* Call CKTnames to get names of nodes/branches used by BeginPlot */ /* Probably should free nameList after this block since called again... */ error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); /* We have to do a beginPlot here since the data to return is * different for the DCOP than it is for the AC analysis. * Moreover the begin plot has not even been done yet at this * point... */ SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, NULL, IF_REAL, numNames, nameList, IF_REAL, &acPlot); tfree(nameList); ipc_send_dcop_prefix(); CKTdump(ckt, 0.0, acPlot); ipc_send_dcop_suffix(); SPfrontEnd->OUTendPlot (acPlot); } /* gtri - end - wbk */ #endif ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; error = CKTload(ckt); if(error) return(error); error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); if (ckt->CKTkeepOpInfo) { /* Dump operating point. */ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "AC Operating Point", NULL, IF_REAL, numNames, nameList, IF_REAL, &plot); if(error) return(error); CKTdump(ckt, 0.0, plot); SPfrontEnd->OUTendPlot (plot); plot = NULL; } SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, freqUid, IF_REAL, numNames, nameList, IF_COMPLEX, &acPlot); tfree(nameList); if(error) return(error); if (job->ACstepType != LINEAR) { SPfrontEnd->OUTattributes (acPlot, NULL, OUT_SCALE_LOG, NULL); } freq = job->ACstartFreq; } else { /* continue previous analysis */ freq = job->ACsaveFreq; job->ACsaveFreq = 0; /* clear the 'old' frequency */ /* fix resume? saj, indeed !*/ error = SPfrontEnd->OUTpBeginPlot (NULL, NULL, NULL, NULL, 0, 666, NULL, 666, &acPlot); /* saj*/ } switch (job->ACstepType) { case DECADE: case OCTAVE: freqTol = job->ACfreqDelta * job->ACstopFreq * ckt->CKTreltol; break; case LINEAR: freqTol = job->ACfreqDelta * ckt->CKTreltol; break; default: return(E_BADPARM); } #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Set anal_init and anal_type */ g_mif_info.circuit.anal_init = MIF_TRUE; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_AC; /* gtri - end - wbk */ #endif INIT_STATS(); ckt->CKTcurrentAnalysis = DOING_AC; /* main loop through all scheduled frequencies */ while (freq <= job->ACstopFreq + freqTol) { if(SPfrontEnd->IFpauseTest()) { /* user asked us to pause via an interrupt */ job->ACsaveFreq = freq; return(E_PAUSE); } ckt->CKTomega = 2.0 * M_PI *freq; /* Update opertating point, if variable 'hertz' is given */ if (ckt->CKTvarHertz) { #ifdef XSPICE /* Call EVTop if event-driven instances exist */ if(ckt->evt->counts.num_insts != 0) { error = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, 0.0); EVTop_save(ckt, MIF_TRUE, 0.0); } else #endif // If no event-driven instances, do what SPICE normally does error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if(error){ fprintf(stdout,"\nAC operating point failed -\n"); CKTncDump(ckt); return(error); } ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; error = CKTload(ckt); if(error) return(error); } ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODEAC; error = NIacIter(ckt); if (error) { UPDATE_STATS(DOING_AC); return(error); } #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&ACSEN) ){ long save; int save1; save = ckt->CKTmode; ckt->CKTmode=(ckt->CKTmode&MODEUIC)|MODEDCOP|MODEINITSMSIG; save1 = ckt->CKTsenInfo->SENmode; ckt->CKTsenInfo->SENmode = ACSEN; if (freq == job->ACstartFreq) { ckt->CKTsenInfo->SENacpertflag = 1; } else{ ckt->CKTsenInfo->SENacpertflag = 0; } error = CKTsenAC(ckt); if (error) return (error); ckt->CKTmode = save; ckt->CKTsenInfo->SENmode = save1; } #endif #ifdef XSPICE /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ if(g_ipc.enabled) ipc_send_data_prefix(freq); error = CKTacDump(ckt,freq,acPlot); if(g_ipc.enabled) ipc_send_data_suffix(); /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ #else error = CKTacDump(ckt,freq,acPlot); #endif if (error) { UPDATE_STATS(DOING_AC); return(error); } /* increment frequency */ switch (job->ACstepType) { case DECADE: case OCTAVE: /* inserted again 14.12.2001 */ #ifdef HAS_PROGREP { double endfreq = job->ACstopFreq; double startfreq = job->ACstartFreq; endfreq = log(endfreq); if (startfreq == 0.0) startfreq = 1e-12; startfreq = log(startfreq); if (freq > 0.0) SetAnalyse( "ac", (int)((log(freq)-startfreq) * 1000.0 / (endfreq-startfreq))); } #endif freq *= job->ACfreqDelta; if (job->ACfreqDelta == 1) goto endsweep; break; case LINEAR: #ifdef HAS_PROGREP { double endfreq = job->ACstopFreq; double startfreq = job->ACstartFreq; SetAnalyse( "ac", (int)((freq - startfreq)* 1000.0 / (endfreq-startfreq))); } #endif freq += job->ACfreqDelta; if (job->ACfreqDelta == 0) goto endsweep; break; default: return(E_INTERN); } } endsweep: SPfrontEnd->OUTendPlot (acPlot); acPlot = NULL; UPDATE_STATS(0); return(0); } /* CKTacLoad(ckt) * this is a driver program to iterate through all the various * ac load functions provided for the circuit elements in the * given circuit */ int CKTacLoad(CKTcircuit *ckt) { int i; int size; int error; double startTime; startTime = SPfrontEnd->IFseconds(); size = SMPmatSize(ckt->CKTmatrix); for (i=0;i<=size;i++) { ckt->CKTrhs[i]=0; ckt->CKTirhs[i]=0; } SMPcClear(ckt->CKTmatrix); for (i=0;iDEVacLoad && ckt->CKThead[i] ) { error = DEVices[i]->DEVacLoad (ckt->CKThead[i], ckt); if(error) return(error); } } #ifdef XSPICE /* gtri - begin - Put resistors to ground at all nodes. */ /* Value of resistor is set by new "rshunt" option. */ if(ckt->enh->rshunt_data.enabled) { for(i = 0; i < ckt->enh->rshunt_data.num_nodes; i++) { *(ckt->enh->rshunt_data.diag[i]) += ckt->enh->rshunt_data.gshunt; } } /* gtri - end - Put resistors to ground at all nodes */ /* gtri - add - wbk - 11/26/90 - reset the MIF init flags */ /* init is set by CKTinit and should be true only for first load call */ g_mif_info.circuit.init = MIF_FALSE; /* anal_init is set by CKTdoJob and is true for first call */ /* of a particular analysis type */ g_mif_info.circuit.anal_init = MIF_FALSE; /* gtri - end - wbk - 11/26/90 */ #endif ckt->CKTstat->STATloadTime += SPfrontEnd->IFseconds() - startTime; return(OK); } ngspice-26/src/spicelib/analysis/cktasknq.c0000644000265600020320000000151612264261473020423 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTaskNodQst * * ask about a parameter on a node. */ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTaskNodQst(CKTcircuit *ckt, CKTnode *node, int parm, IFvalue *value, IFvalue *selector) { NG_IGNORE(ckt); NG_IGNORE(selector); if(!node) return(E_BADPARM); switch(parm) { case PARM_NS: value->rValue = node->nodeset; break; case PARM_IC: value->rValue = node->ic; break; case PARM_NODETYPE: value->iValue = node->type; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/pssinit.c0000644000265600020320000000175212264261473020277 0ustar andreasadmin/********** Author: 2010-05 Stefano Perticaroli ``spertica'' **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/trandefs.h" #include "ngspice/pssdefs.h" #include "ngspice/iferrmsg.h" int PSSinit(CKTcircuit *ckt, JOB *anal) { PSSan *job = (PSSan *) anal; /* Step is chosen empirically to be 1% of PSSguessedFreq */ ckt->CKTstep = 0.01 * (1/job->PSSguessedFreq); /* Init time should be always zero */ ckt->CKTinitTime = 0; /* MaxStep should not exceed Nyquist criterion */ ckt->CKTmaxStep = 0.5*(1/job->PSSguessedFreq); ckt->CKTdelmin = 1e-9*ckt->CKTmaxStep; ckt->CKTmode = job->PSSmode; /* modified CKTdefs.h for the following - 100609 */ ckt->CKTstabTime = job->PSSstabTime; ckt->CKTguessedFreq = job->PSSguessedFreq; ckt->CKTharms = job->PSSharms; ckt->CKTpsspoints = job->PSSpoints; ckt->CKTsc_iter = job->sc_iter; ckt->CKTsteady_coeff = job->steady_coeff; return OK; } ngspice-26/src/spicelib/analysis/acsetp.c0000644000265600020320000000461612264261473020067 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/acdefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" /* ARGSUSED */ int ACsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { ACAN *job = (ACAN *) anal; NG_IGNORE(ckt); switch(which) { case AC_START: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid for AC start"); job->ACstartFreq = 1.0; return(E_PARMVAL); } job->ACstartFreq = value->rValue; break; case AC_STOP: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid for AC stop"); job->ACstartFreq = 1.0; return(E_PARMVAL); } job->ACstopFreq = value->rValue; break; case AC_STEPS: job->ACnumberSteps = value->iValue; break; case AC_DEC: if(value->iValue) { job->ACstepType = DECADE; } else { if (job->ACstepType == DECADE) { job->ACstepType = 0; } } break; case AC_OCT: if(value->iValue) { job->ACstepType = OCTAVE; } else { if (job->ACstepType == OCTAVE) { job->ACstepType = 0; } } break; case AC_LIN: if(value->iValue) { job->ACstepType = LINEAR; } else { if (job->ACstepType == LINEAR) { job->ACstepType = 0; } } break; default: return(E_BADPARM); } return(OK); } static IFparm ACparms[] = { { "start", AC_START, IF_SET|IF_ASK|IF_REAL, "starting frequency" }, { "stop", AC_STOP, IF_SET|IF_ASK|IF_REAL, "ending frequency" }, { "numsteps", AC_STEPS,IF_SET|IF_ASK|IF_INTEGER, "number of frequencies"}, { "dec", AC_DEC, IF_SET|IF_FLAG, "step by decades" }, { "oct", AC_OCT, IF_SET|IF_FLAG, "step by octaves" }, { "lin", AC_LIN, IF_SET|IF_FLAG, "step linearly" } }; SPICEanalysis ACinfo = { { "AC", "A.C. Small signal analysis", NUMELEMS(ACparms), ACparms }, sizeof(ACAN), FREQUENCYDOMAIN, 1, ACsetParm, ACaskQuest, NULL, ACan }; ngspice-26/src/spicelib/analysis/cktftask.c0000644000265600020320000000101512264261473020410 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTfndTask * find the specified task - not yet supported in spice */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTfndTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName) { NG_IGNORE(ckt); NG_IGNORE(taskPtr); NG_IGNORE(taskName); return(E_UNSUPP); } ngspice-26/src/spicelib/analysis/cktparam.c0000644000265600020320000000132212264261473020401 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTparam * attach the given parameter to the specified device in the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTparam(CKTcircuit *ckt, GENinstance *fast, int param, IFvalue *val, IFvalue *selector) { int type; NG_IGNORE(ckt); type = fast->GENmodPtr->GENmodType; if(DEVices[type]->DEVparam) { return(DEVices[type]->DEVparam (param, val, fast, selector)); } else { return(E_BADPARM); } } ngspice-26/src/spicelib/analysis/acaskq.c0000644000265600020320000000230612264261473020045 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/acdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int ACaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { ACAN *job = (ACAN *) anal; NG_IGNORE(ckt); switch(which) { case AC_START: value->rValue = job->ACstartFreq; break; case AC_STOP: value->rValue = job->ACstopFreq ; break; case AC_STEPS: value->iValue = job->ACnumberSteps; break; case AC_DEC: if (job->ACstepType == DECADE) { value->iValue=1; } else { value->iValue=0; } break; case AC_OCT: if (job->ACstepType == OCTAVE) { value->iValue=1; } else { value->iValue=0; } break; case AC_LIN: if (job->ACstepType == LINEAR) { value->iValue=1; } else { value->iValue=0; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/cktmpar.c0000644000265600020320000000133612264261473020245 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTmodParam * attach the given parameter to the specified model in the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTmodParam(CKTcircuit *ckt, GENmodel *modfast, int param, IFvalue *val, IFvalue *selector) { int type = modfast->GENmodType; NG_IGNORE(ckt); NG_IGNORE(selector); if (DEVices[type]->DEVmodParam) { return(DEVices[type]->DEVmodParam (param, val, modfast)); } else { return(E_BADPARM); } } ngspice-26/src/spicelib/analysis/cktfnda.c0000644000265600020320000000150412264261473020213 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTfndAnal * find the given Analysis given its name and return the Analysis pointer */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTfndAnal(CKTcircuit *ckt, int *analIndex, JOB **anal, IFuid name, TSKtask *task, IFuid taskName) { JOB *here; NG_IGNORE(ckt); NG_IGNORE(analIndex); NG_IGNORE(taskName); for (here = task->jobs; here; here = here->JOBnextJob) { if(strcmp(here->JOBname,name)==0) { if(anal) *anal = here; return(OK); } } return(E_NOTFOUND); } ngspice-26/src/spicelib/analysis/cktop.c0000644000265600020320000004347612264261473017737 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Modified: 2005 Paolo Nenzi - Restructured **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" static int dynamic_gmin (CKTcircuit *, long int, long int, int); static int spice3_gmin (CKTcircuit *, long int, long int, int); static int gillespie_src (CKTcircuit *, long int, long int, int); static int spice3_src (CKTcircuit *, long int, long int, int); int CKTop (CKTcircuit * ckt, long int firstmode, long int continuemode, int iterlim) { int converged; #ifdef HAS_PROGREP SetAnalyse("op", 0); #endif ckt->CKTmode = firstmode; if (!ckt->CKTnoOpIter) { #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ if ((ckt->CKTnumGminSteps <= 0) && (ckt->CKTnumSrcSteps <= 0)) ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; else ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, iterlim); } else { converged = 1; /* the 'go directly to gmin stepping' option */ } if (converged != 0) { /* no convergence on the first try, so we do something else */ /* first, check if we should try gmin stepping */ if (ckt->CKTnumGminSteps >= 1) { if (ckt->CKTnumGminSteps == 1) converged = dynamic_gmin(ckt, firstmode, continuemode, iterlim); else converged = spice3_gmin(ckt, firstmode, continuemode, iterlim); } if (!converged) /* If gmin-stepping worked... move out */ return (0); /* ... otherwise try stepping sources ... * now, we'll try source stepping - we scale the sources * to 0, converge, then start stepping them up until they * are at their normal values */ if (ckt->CKTnumSrcSteps >= 1) { if (ckt->CKTnumSrcSteps == 1) converged = gillespie_src(ckt, firstmode, continuemode, iterlim); else converged = spice3_src(ckt, firstmode, continuemode, iterlim); } #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif } return (converged); } /* CKTconvTest(ckt) * this is a driver program to iterate through all the various * convTest functions provided for the circuit elements in the * given circuit */ int CKTconvTest (CKTcircuit * ckt) { int i; int error = OK; for (i = 0; i < DEVmaxnum; i++) { if (DEVices[i] && DEVices[i]->DEVconvTest && ckt->CKThead[i]) { error = DEVices[i]->DEVconvTest (ckt->CKThead[i], ckt); } if (error) return (error); if (ckt->CKTnoncon) { /* printf("convTest: device %s failed\n", * DEVices[i]->DEVpublic.name); */ return (OK); } } return (OK); } /* Dynamic gmin stepping * Algorithm by Alan Gillespie * Modified 2005 - Paolo Nenzi (extracted from CKTop.c code) * * return value: * 0 -> method converged * 1 -> method failed * * Note that no path out of this code allows ckt->CKTdiagGmin to be * anything but CKTgshunt. */ static int dynamic_gmin (CKTcircuit * ckt, long int firstmode, long int continuemode, int iterlim) { double OldGmin, gtarget, factor; int success, failed, converged; int NumNodes, iters, i; double *OldRhsOld, *OldCKTstate0; CKTnode *n; ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, "Starting dynamic gmin stepping", NULL); NumNodes = 0; for (n = ckt->CKTnodes; n; n = n->next) NumNodes++; OldRhsOld = TMALLOC(double, NumNodes + 1); OldCKTstate0 = TMALLOC(double, ckt->CKTnumStates + 1); for (n = ckt->CKTnodes; n; n = n->next) ckt->CKTrhsOld [n->number] = 0; for (i = 0; i < ckt->CKTnumStates; i++) ckt->CKTstate0 [i] = 0; factor = ckt->CKTgminFactor; OldGmin = 1e-2; ckt->CKTdiagGmin = OldGmin / factor; gtarget = MAX (ckt->CKTgmin, ckt->CKTgshunt); success = failed = 0; while ((!success) && (!failed)) { fprintf (stderr, "Trying gmin = %12.4E ", ckt->CKTdiagGmin); ckt->CKTnoncon = 1; iters = ckt->CKTstat->STATnumIter; converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); iters = (ckt->CKTstat->STATnumIter) - iters; if (converged == 0) { ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, "One successful gmin step", NULL); if (ckt->CKTdiagGmin <= gtarget) { success = 1; } else { i = 0; for (n = ckt->CKTnodes; n; n = n->next) { OldRhsOld[i] = ckt->CKTrhsOld[n->number]; i++; } for (i = 0; i < ckt->CKTnumStates; i++) { OldCKTstate0[i] = ckt->CKTstate0[i]; } if (iters <= (ckt->CKTdcTrcvMaxIter / 4)) { factor *= sqrt (factor); if (factor > ckt->CKTgminFactor) factor = ckt->CKTgminFactor; } if (iters > (3 * ckt->CKTdcTrcvMaxIter / 4)) factor = sqrt (factor); OldGmin = ckt->CKTdiagGmin; if ((ckt->CKTdiagGmin) < (factor * gtarget)) { factor = ckt->CKTdiagGmin / gtarget; ckt->CKTdiagGmin = gtarget; } else { ckt->CKTdiagGmin /= factor; } } } else { if (factor < 1.00005) { failed = 1; SPfrontEnd->IFerror (ERR_WARNING, "Last gmin step failed", NULL); } else { SPfrontEnd->IFerror (ERR_WARNING, "Further gmin increment", NULL); factor = sqrt (sqrt (factor)); ckt->CKTdiagGmin = OldGmin / factor; i = 0; for (n = ckt->CKTnodes; n; n = n->next) { ckt->CKTrhsOld[n->number] = OldRhsOld[i]; i++; } for (i = 0; i < ckt->CKTnumStates; i++) { ckt->CKTstate0[i] = OldCKTstate0[i]; } } } } ckt->CKTdiagGmin = ckt->CKTgshunt; FREE (OldRhsOld); FREE (OldCKTstate0); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ if (ckt->CKTnumSrcSteps <= 0) ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; else ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, iterlim); if (converged != 0) { SPfrontEnd->IFerror (ERR_WARNING, "Dynamic gmin stepping failed", NULL); } else { SPfrontEnd->IFerror (ERR_INFO, "Dynamic gmin stepping completed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif } return (converged); } /* Spice3 gmin stepping * Modified 2000 - Alan Gillespie (added gshunt) * Modified 2005 - Paolo Nenzi (extracted from CKTop.c code) * * return value: * 0 -> method converged * 1 -> method failed * * Note that no path out of this code allows ckt->CKTdiagGmin to be * anything but CKTgshunt. */ static int spice3_gmin (CKTcircuit * ckt, long int firstmode, long int continuemode, int iterlim) { int converged, i; ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, "Starting gmin stepping", NULL); if (ckt->CKTgshunt == 0) ckt->CKTdiagGmin = ckt->CKTgmin; else ckt->CKTdiagGmin = ckt->CKTgshunt; for (i = 0; i < ckt->CKTnumGminSteps; i++) ckt->CKTdiagGmin *= ckt->CKTgminFactor; for (i = 0; i <= ckt->CKTnumGminSteps; i++) { fprintf (stderr, "Trying gmin = %12.4E ", ckt->CKTdiagGmin); ckt->CKTnoncon = 1; converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); if (converged != 0) { ckt->CKTdiagGmin = ckt->CKTgshunt; SPfrontEnd->IFerror (ERR_WARNING, "gmin step failed", NULL); break; } ckt->CKTdiagGmin /= ckt->CKTgminFactor; ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, "One successful gmin step", NULL); } ckt->CKTdiagGmin = ckt->CKTgshunt; #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ if (ckt->CKTnumSrcSteps <= 0) ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; else ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, iterlim); if (converged == 0) { SPfrontEnd->IFerror (ERR_INFO, "gmin stepping completed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif } else { SPfrontEnd->IFerror (ERR_WARNING, "gmin stepping failed", NULL); } return (converged); } /* Gillespie's Source stepping * Modified 2005 - Paolo Nenzi (extracted from CKTop.c code) * * return value: * 0 -> method converged * 1 -> method failed * * Note that no path out of this code allows ckt->CKTsrcFact to be * anything but 1.00000. */ static int gillespie_src (CKTcircuit * ckt, long int firstmode, long int continuemode, int iterlim) { int converged, NumNodes, i, iters; double raise, ConvFact; double *OldRhsOld, *OldCKTstate0; CKTnode *n; NG_IGNORE(iterlim); ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, "Starting source stepping", NULL); ckt->CKTsrcFact = 0; raise = 0.001; ConvFact = 0; NumNodes = 0; for (n = ckt->CKTnodes; n; n = n->next) { NumNodes++; } OldRhsOld = TMALLOC(double, NumNodes + 1); OldCKTstate0 = TMALLOC(double, ckt->CKTnumStates + 1); for (n = ckt->CKTnodes; n; n = n->next) ckt->CKTrhsOld[n->number] = 0; for (i = 0; i < ckt->CKTnumStates; i++) ckt->CKTstate0[i] = 0; /* First, try a straight solution with all sources at zero */ fprintf (stderr, "Supplies reduced to %8.4f%% ", ckt->CKTsrcFact * 100); converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); /* If this doesn't work, try gmin stepping as well for the first solution */ if (converged != 0) { fprintf (stderr, "\n"); if (ckt->CKTgshunt <= 0) { ckt->CKTdiagGmin = ckt->CKTgmin; } else { ckt->CKTdiagGmin = ckt->CKTgshunt; } for (i = 0; i < 10; i++) ckt->CKTdiagGmin *= 10; for (i = 0; i <= 10; i++) { fprintf (stderr, "Trying gmin = %12.4E ", ckt->CKTdiagGmin); ckt->CKTnoncon = 1; #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); if (converged != 0) { ckt->CKTdiagGmin = ckt->CKTgshunt; SPfrontEnd->IFerror (ERR_WARNING, "gmin step failed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif break; } ckt->CKTdiagGmin /= 10; ckt->CKTmode = continuemode; SPfrontEnd->IFerror (ERR_INFO, "One successful gmin step", NULL); } ckt->CKTdiagGmin = ckt->CKTgshunt; } /* If we've got convergence, then try stepping up the sources */ if (converged == 0) { i = 0; for (n = ckt->CKTnodes; n; n = n->next) { OldRhsOld[i] = ckt->CKTrhsOld[n->number]; i++; } for (i = 0; i < ckt->CKTnumStates; i++) OldCKTstate0[i] = ckt->CKTstate0[i]; SPfrontEnd->IFerror (ERR_INFO, "One successful source step", NULL); ckt->CKTsrcFact = ConvFact + raise; } if (converged == 0) do { fprintf (stderr, "Supplies reduced to %8.4f%% ", ckt->CKTsrcFact * 100); iters = ckt->CKTstat->STATnumIter; #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); iters = (ckt->CKTstat->STATnumIter) - iters; ckt->CKTmode = continuemode; if (converged == 0) { ConvFact = ckt->CKTsrcFact; i = 0; for (n = ckt->CKTnodes; n; n = n->next) { OldRhsOld[i] = ckt->CKTrhsOld[n->number]; i++; } for (i = 0; i < ckt->CKTnumStates; i++) OldCKTstate0[i] = ckt->CKTstate0[i]; SPfrontEnd->IFerror (ERR_INFO, "One successful source step", NULL); ckt->CKTsrcFact = ConvFact + raise; if (iters <= (ckt->CKTdcTrcvMaxIter / 4)) { raise = raise * 1.5; } if (iters > (3 * ckt->CKTdcTrcvMaxIter / 4)) { raise = raise * 0.5; } /* if (raise>0.01) raise=0.01; */ } else { if ((ckt->CKTsrcFact - ConvFact) < 1e-8) break; raise = raise / 10; if (raise > 0.01) raise = 0.01; ckt->CKTsrcFact = ConvFact; i = 0; for (n = ckt->CKTnodes; n; n = n->next) { ckt->CKTrhsOld[n->number] = OldRhsOld[i]; i++; } for (i = 0; i < ckt->CKTnumStates; i++) ckt->CKTstate0[i] = OldCKTstate0[i]; } if ((ckt->CKTsrcFact) > 1) ckt->CKTsrcFact = 1; } while ((raise >= 1e-7) && (ConvFact < 1)); FREE (OldRhsOld); FREE (OldCKTstate0); ckt->CKTsrcFact = 1; if (ConvFact != 1) { ckt->CKTsrcFact = 1; ckt->CKTcurrentAnalysis = DOING_TRAN; SPfrontEnd->IFerror (ERR_WARNING, "source stepping failed", NULL); return (E_ITERLIM); } else { SPfrontEnd->IFerror (ERR_INFO, "Source stepping completed", NULL); return (0); } } /* Spice3 Source stepping * Modified 2005 - Paolo Nenzi (extracted from CKTop.c code) * * return value: * 0 -> method converged * 1 -> method failed * * Note that no path out of this code allows ckt->CKTsrcFact to be * anything but 1.00000. */ static int spice3_src (CKTcircuit * ckt, long int firstmode, long int continuemode, int iterlim) { int converged, i; NG_IGNORE(iterlim); ckt->CKTmode = firstmode; SPfrontEnd->IFerror (ERR_INFO, "Starting source stepping", NULL); for (i = 0; i <= ckt->CKTnumSrcSteps; i++) { ckt->CKTsrcFact = ((double) i) / ((double) ckt->CKTnumSrcSteps); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif converged = NIiter (ckt, ckt->CKTdcTrcvMaxIter); ckt->CKTmode = continuemode; if (converged != 0) { ckt->CKTsrcFact = 1; ckt->CKTcurrentAnalysis = DOING_TRAN; SPfrontEnd->IFerror (ERR_WARNING, "source stepping failed", NULL); #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif return (converged); } SPfrontEnd->IFerror (ERR_INFO, "One successful source step", NULL); } SPfrontEnd->IFerror (ERR_INFO, "Source stepping completed", NULL); ckt->CKTsrcFact = 1; #ifdef XSPICE /* gtri - begin - wbk - add convergence problem reporting flags */ ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - end - wbk - add convergence problem reporting flags */ #endif return (0); } ngspice-26/src/spicelib/analysis/dctsetp.c0000644000265600020320000000633312264261473020254 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/trcvdefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" /* ARGSUSED */ int DCTsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { TRCV *job = (TRCV *) anal; NG_IGNORE(ckt); switch(which) { case DCT_START1: job->TRCVvStart[0] = value->rValue; job->TRCVnestLevel = MAX(0, job->TRCVnestLevel); job->TRCVset[0] = TRUE; break; case DCT_STOP1: job->TRCVvStop[0] = value->rValue; job->TRCVnestLevel = MAX(0, job->TRCVnestLevel); job->TRCVset[0] = TRUE; break; case DCT_STEP1: job->TRCVvStep[0] = value->rValue; job->TRCVnestLevel = MAX(0, job->TRCVnestLevel); job->TRCVset[0] = TRUE; break; case DCT_START2: job->TRCVvStart[1] = value->rValue; job->TRCVnestLevel = MAX(1, job->TRCVnestLevel); job->TRCVset[1] = TRUE; break; case DCT_STOP2: job->TRCVvStop[1] = value->rValue; job->TRCVnestLevel = MAX(1, job->TRCVnestLevel); job->TRCVset[1] = TRUE; break; case DCT_STEP2: job->TRCVvStep[1] = value->rValue; job->TRCVnestLevel = MAX(1, job->TRCVnestLevel); job->TRCVset[1] = TRUE; break; case DCT_NAME1: job->TRCVvName[0] = value->uValue; job->TRCVnestLevel = MAX(0, job->TRCVnestLevel); job->TRCVset[0] = TRUE; break; case DCT_NAME2: job->TRCVvName[1] = value->uValue; job->TRCVnestLevel = MAX(1, job->TRCVnestLevel); job->TRCVset[1] = TRUE; break; case DCT_TYPE1: job->TRCVvType[0] = value->iValue; job->TRCVnestLevel = MAX(0, job->TRCVnestLevel); job->TRCVset[0] = TRUE; break; case DCT_TYPE2: job->TRCVvType[1] = value->iValue; job->TRCVnestLevel = MAX(1, job->TRCVnestLevel); job->TRCVset[1] = TRUE; break; default: return(E_BADPARM); } return(OK); } static IFparm DCTparms[] = { { "start1", DCT_START1, IF_SET|IF_REAL, "starting voltage/current"}, { "stop1", DCT_STOP1, IF_SET|IF_REAL, "ending voltage/current" }, { "step1", DCT_STEP1, IF_SET|IF_REAL, "voltage/current step" }, { "start2", DCT_START2, IF_SET|IF_REAL, "starting voltage/current"}, { "stop2", DCT_STOP2, IF_SET|IF_REAL, "ending voltage/current" }, { "step2", DCT_STEP2, IF_SET|IF_REAL, "voltage/current step" }, { "name1", DCT_NAME1, IF_SET|IF_INSTANCE, "name of source to step" }, { "name2", DCT_NAME2, IF_SET|IF_INSTANCE, "name of source to step" }, { "type1", DCT_TYPE1, IF_SET|IF_INTEGER, "type of source to step" }, { "type2", DCT_TYPE2, IF_SET|IF_INTEGER, "type of source to step" } }; SPICEanalysis DCTinfo = { { "DC", "D.C. Transfer curve analysis", NUMELEMS(DCTparms), DCTparms }, sizeof(TRCV), SWEEPDOMAIN, 1, DCTsetParm, DCTaskQuest, NULL, DCtrCurv }; ngspice-26/src/spicelib/analysis/cktnodn.c0000644000265600020320000000114412264261473020241 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* *CKTnodName(ckt) * output information on all circuit nodes/equations * */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" IFuid CKTnodName(CKTcircuit *ckt, int nodenum) { CKTnode *here; for(here = ckt->CKTnodes;here; here = here->next) { if(here->number == nodenum) { /* found it */ return(here->name); } } /* doesn't exist - do something */ return("UNKNOWN NODE"); } ngspice-26/src/spicelib/analysis/cktncdump.c0000644000265600020320000000226112264261473020572 0ustar andreasadmin/********** Copyright 1999 AG inc. All rights reserved. Author: 1999 Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/suffix.h" void CKTncDump( CKTcircuit *ckt) { CKTnode *node; double new, old, tol; int i=1; fprintf(stdout,"\n"); fprintf(stdout,"Last Node Voltages\n"); fprintf(stdout,"------------------\n\n"); fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", "Previous Iter"); fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", "-------------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) { new = ckt->CKTrhsOld [i] ; old = ckt->CKTrhs [i] ; fprintf(stdout,"%-30s %20g %20g", node->name, new, old); if(node->type == SP_VOLTAGE) { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTvoltTol; } else { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTabstol; } if (fabs(new-old) >tol ) { fprintf(stdout," *"); } fprintf(stdout,"\n"); } i++; } fprintf(stdout,"\n"); } ngspice-26/src/spicelib/analysis/tfsetp.c0000644000265600020320000000330112264261473020103 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/tfdefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" /* ARGSUSED */ int TFsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { TFan *job = (TFan *) anal; NG_IGNORE(ckt); switch(which) { case TF_OUTPOS: job->TFoutPos = value->nValue; job->TFoutIsV = TRUE; job->TFoutIsI = FALSE; break; case TF_OUTNEG: job->TFoutNeg = value->nValue; job->TFoutIsV = TRUE; job->TFoutIsI = FALSE; break; case TF_OUTNAME: job->TFoutName = value->sValue; break; case TF_OUTSRC: job->TFoutSrc = value->uValue; job->TFoutIsV = FALSE; job->TFoutIsI = TRUE; break; case TF_INSRC: job->TFinSrc = value->uValue; break; default: return(E_BADPARM); } return(OK); } static IFparm TFparms[] = { { "outpos", TF_OUTPOS, IF_SET|IF_NODE, "Positive output node" }, { "outneg", TF_OUTNEG, IF_SET|IF_NODE, "Negative output node" }, { "outname", TF_OUTNAME, IF_SET|IF_STRING,"Name of output variable"}, { "outsrc", TF_OUTSRC, IF_SET|IF_INSTANCE, "Output source" }, { "insrc", TF_INSRC, IF_SET|IF_INSTANCE, "Input source" } }; SPICEanalysis TFinfo = { { "TF", "transfer function analysis", NUMELEMS(TFparms), TFparms }, sizeof(TFan), NODOMAIN, 0, TFsetParm, TFaskQuest, NULL, TFanal }; ngspice-26/src/spicelib/analysis/cktmkvol.c0000644000265600020320000000165112264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTmkVolt * make the given name a 'node' of type voltage in the * specified circuit */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTmkVolt(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix) { IFuid uid; int error; CKTnode *mynode; CKTnode *checknode; error = CKTmkNode(ckt,&mynode); if(error) return(error); checknode = mynode; error = SPfrontEnd->IFnewUid (ckt, &uid, basename, suffix, UID_SIGNAL, &checknode); if(error) { FREE(mynode); if(node) *node = checknode; return(error); } mynode->name = uid; mynode->type = SP_VOLTAGE; if(node) *node = mynode; error = CKTlinkEq(ckt,mynode); return(error); } ngspice-26/src/spicelib/analysis/cktnewn.c0000644000265600020320000000250712264261473020256 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTnewNode(ckt,node,name) * Allocate a new circuit equation number (returned) in the specified * circuit to contain a new equation or node * returns -1 for failure to allocate a node number * */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" /* should just call CKTnewEQ and set node type afterwards */ int CKTnewNode(CKTcircuit *ckt, CKTnode **node, IFuid name) { if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */ ckt->CKTnodes = TMALLOC(CKTnode, 1); if(ckt->CKTnodes == NULL) return(E_NOMEM); ckt->CKTnodes->name = NULL; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; ckt->CKTlastNode = ckt->CKTnodes; } ckt->CKTlastNode->next = TMALLOC(CKTnode, 1); if(ckt->CKTlastNode->next == NULL) return(E_NOMEM); ckt->CKTlastNode = ckt->CKTlastNode->next; ckt->CKTlastNode->name = name; ckt->CKTlastNode->number = ckt->CKTmaxEqNum++; ckt->CKTlastNode->type = SP_VOLTAGE; ckt->CKTlastNode->next = NULL; if(node) *node = ckt->CKTlastNode; return(OK); } ngspice-26/src/spicelib/analysis/tfaskq.c0000644000265600020320000000077312264261473020101 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/trcvdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int TFaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NG_IGNORE(value); NG_IGNORE(anal); NG_IGNORE(ckt); switch(which) { default: break; } return(E_BADPARM); } ngspice-26/src/spicelib/analysis/cktsgen.c0000644000265600020320000001227712264261473020250 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/gendefs.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sensgen.h" /* XXX */ extern char *Sfilter; int set_model(sgen *); int set_param(sgen *); int set_inst(sgen *); int set_dev(sgen *); sgen * sgen_init(CKTcircuit *ckt, int is_dc) { sgen *sg; sg = NEW(sgen); sg->param = 99999; sg->is_instparam = 0; sg->dev = -1; sg->istate = 0; sg->ckt = ckt; sg->devlist = ckt->CKThead; sg->instance = sg->first_instance = sg->next_instance = NULL; sg->model = sg->next_model = NULL; sg->ptable = NULL; sg->is_dc = is_dc; sg->is_principle = 0; sg->is_q = 0; sg->is_zerook = 0; sg->value = 0.0; sgen_next(&sg); /* get the ball rolling XXX check return val? */ return sg; } int sgen_next(sgen **xsg) { sgen *sg = *xsg; int good, done; int i; done = 0; i = sg->dev; do { if (sg->instance) { if (sg->ptable) { do { sg->param += 1; } while (sg->param < sg->max_param && !set_param(sg)); } else { sg->max_param = -1; } if (sg->param < sg->max_param) { done = 1; } else if (!sg->is_instparam) { /* Try instance parameters now */ sg->is_instparam = 1; sg->param = -1; sg->max_param = *DEVices[i]->DEVpublic.numInstanceParms; sg->ptable = DEVices[i]->DEVpublic.instanceParms; } else { sg->is_principle = 0; sg->instance->GENnextInstance = sg->next_instance; sg->instance->GENstate = sg->istate; sg->instance = NULL; } } else if (sg->model) { /* Find the first/next good instance for this model */ for (good = 0; !good && sg->next_instance; good = set_inst(sg)) { sg->instance = sg->next_instance; sg->next_instance = sg->instance->GENnextInstance; } if (good) { sg->is_principle = 0; sg->istate = sg->instance->GENstate; sg->instance->GENnextInstance = NULL; sg->model->GENinstances = sg->instance; if (DEVices[i]->DEVpublic.modelParms) { sg->max_param = *DEVices[i]->DEVpublic. numModelParms; sg->ptable = DEVices[i]->DEVpublic. modelParms; } else { sg->ptable = NULL; } sg->param = -1; sg->is_instparam = 0; } else { /* No good instances of this model */ sg->model->GENinstances = sg->first_instance; sg->model->GENnextModel = sg->next_model; sg->model = NULL; } } else if (i >= 0) { /* Find the first/next good model for this device */ for (good = 0; !good && sg->next_model; good = set_model(sg)) { sg->model = sg->next_model; sg->next_model = sg->model->GENnextModel; } if (good) { sg->model->GENnextModel = NULL; sg->devlist[i] = sg->model; if (DEVices[i]->DEVpublic.modelParms) { sg->max_param = *DEVices[i]->DEVpublic. numModelParms; sg->ptable = DEVices[i]->DEVpublic. modelParms; } else { sg->ptable = NULL; } sg->next_instance = sg->first_instance = sg->model->GENinstances; } else { /* No more good models for this device */ sg->devlist[i] = sg->first_model; i = -1; /* Try the next good device */ } } else if (i < DEVmaxnum && sg->dev < DEVmaxnum) { /* Find the next good device in this circuit */ do sg->dev++; while (sg->dev < DEVmaxnum && sg->devlist[sg->dev] && !set_dev(sg)); i = sg->dev; if (i >= DEVmaxnum) /* PN: Segafult if not = */ done = 1; sg->first_model = sg->next_model = (idevlist[i] : NULL; } else { done = 1; } } while (!done); if (sg->dev >= DEVmaxnum) { FREE(sg); *xsg = NULL; } return 1; } int set_inst(sgen *sg) { NG_IGNORE(sg); return 1; } int set_model(sgen *sg) { NG_IGNORE(sg); return 1; } int set_dev(sgen *sg) { NG_IGNORE(sg); return 1; } int set_param(sgen *sg) { IFvalue ifval; if (!sg->ptable[sg->param].keyword) return 0; if (Sfilter && strncmp(sg->ptable[sg->param].keyword, Sfilter, strlen(Sfilter))) return 0; if ((sg->ptable[sg->param].dataType & (IF_SET|IF_ASK|IF_REAL|IF_VECTOR|IF_REDUNDANT|IF_NONSENSE)) != (IF_SET|IF_ASK|IF_REAL)) return 0; if (sg->is_dc && (sg->ptable[sg->param].dataType & (IF_AC | IF_AC_ONLY))) return 0; if ((sg->ptable[sg->param].dataType & IF_CHKQUERY) && !sg->is_q) return 0; if (sens_getp(sg, sg->ckt, &ifval)) return 0; if (fabs(ifval.rValue) < 1e-30) { if (sg->ptable[sg->param].dataType & IF_SETQUERY) sg->is_q = 0; if (!sg->is_zerook && !(sg->ptable[sg->param].dataType & IF_PRINCIPAL)) return 0; } else if (sg->ptable[sg->param].dataType & (IF_SETQUERY|IF_ORQUERY)) sg->is_q = 1; if (sg->ptable[sg->param].dataType & IF_PRINCIPAL) sg->is_principle += 1; sg->value = ifval.rValue; return 1; } #ifdef notdef void sgen_suspend(sgen *sg) { sg->devlist[sg->dev] = sg->first_model; sg->model->GENnextModel = sg->next_model; sg->instance->GENnextInstance = sg->next_instance; sg->model->GENinstances = sg->first_instance; } void sgen_restore(sgen *sg) { sg->devlist[sg->dev] = sg->model; sg->model->GENnextModel = NULL; sg->instance->GENnextInstance = NULL; sg->model->GENinstances = sg->instance; } #endif ngspice-26/src/spicelib/analysis/pzsetp.c0000644000265600020320000000423212264261473020127 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/pzdefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" /* ARGSUSED */ int PZsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { PZAN *job = (PZAN *) anal; NG_IGNORE(ckt); switch(which) { case PZ_NODEI: job->PZin_pos = value->nValue->number; break; case PZ_NODEG: job->PZin_neg = value->nValue->number; break; case PZ_NODEJ: job->PZout_pos = value->nValue->number; break; case PZ_NODEK: job->PZout_neg = value->nValue->number; break; case PZ_V: if(value->iValue) { job->PZinput_type = PZ_IN_VOL; } break; case PZ_I: if(value->iValue) { job->PZinput_type = PZ_IN_CUR; } break; case PZ_POL: if(value->iValue) { job->PZwhich = PZ_DO_POLES; } break; case PZ_ZER: if(value->iValue) { job->PZwhich = PZ_DO_ZEROS; } break; case PZ_PZ: if(value->iValue) { job->PZwhich = PZ_DO_POLES | PZ_DO_ZEROS; } break; default: return(E_BADPARM); } return(OK); } static IFparm PZparms[] = { { "nodei", PZ_NODEI, IF_SET|IF_ASK|IF_NODE, "" }, { "nodeg", PZ_NODEG, IF_SET|IF_ASK|IF_NODE, "" }, { "nodej", PZ_NODEJ, IF_SET|IF_ASK|IF_NODE, "" }, { "nodek", PZ_NODEK, IF_SET|IF_ASK|IF_NODE, "" }, { "vol", PZ_V, IF_SET|IF_ASK|IF_FLAG, "" }, { "cur", PZ_I, IF_SET|IF_ASK|IF_FLAG, "" }, { "pol", PZ_POL, IF_SET|IF_ASK|IF_FLAG, "" }, { "zer", PZ_ZER, IF_SET|IF_ASK|IF_FLAG, "" }, { "pz", PZ_PZ, IF_SET|IF_ASK|IF_FLAG, "" } }; SPICEanalysis PZinfo = { { "PZ", "pole-zero analysis", NUMELEMS(PZparms), PZparms }, sizeof(PZAN), NODOMAIN, 1, PZsetParm, PZaskQuest, NULL, PZan }; ngspice-26/src/spicelib/analysis/analysis.c0000644000265600020320000000213112264261473020421 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/jobdefs.h" #include "ngspice/cktdefs.h" #include "analysis.h" extern SPICEanalysis OPTinfo; extern SPICEanalysis ACinfo; extern SPICEanalysis DCTinfo; extern SPICEanalysis DCOinfo; extern SPICEanalysis TRANinfo; extern SPICEanalysis PZinfo; extern SPICEanalysis TFinfo; extern SPICEanalysis DISTOinfo; extern SPICEanalysis NOISEinfo; extern SPICEanalysis SENSinfo; #ifdef WITH_PSS extern SPICEanalysis PSSinfo; #endif #ifdef WANT_SENSE2 extern SPICEanalysis SEN2info; #endif SPICEanalysis *analInfo[] = { &OPTinfo, &ACinfo, &DCTinfo, &DCOinfo, &TRANinfo, &PZinfo, &TFinfo, &DISTOinfo, &NOISEinfo, &SENSinfo, #ifdef WITH_PSS &PSSinfo, #endif #ifdef WANT_SENSE2 &SEN2info, #endif }; char *spice_analysis_get_name(int index) { return analInfo[index]->if_analysis.name; } char *spice_analysis_get_description(int index) { return analInfo[index]->if_analysis.description; } int spice_num_analysis(void) { return NUMELEMS(analInfo); } SPICEanalysis **spice_analysis_ptr(void) { return analInfo; } ngspice-26/src/spicelib/analysis/cktpmnam.c0000644000265600020320000000271312264261473020416 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * CKTpModName() * * Take a parameter by Name and set it on the specified model */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTpModName(char *parm, IFvalue *val, CKTcircuit *ckt, int type, IFuid name, GENmodel **modfast) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this model is a member of */ /* the device type code to the model being parsed */ /* the name of the model being parsed */ /* direct pointer to model being parsed */ { int error; /* int to store evaluate error return codes in */ int i; NG_IGNORE(name); for(i = 0 ; i < *(DEVices[type]->DEVpublic.numModelParms) ; i++) { if(!strcmp(parm, DEVices[type]->DEVpublic.modelParms[i].keyword)) { error = CKTmodParam(ckt, *modfast, DEVices[type]->DEVpublic.modelParms[i].id, val, NULL); if(error) return(error); break; } } if(i == *(DEVices[type]->DEVpublic.numModelParms)) { return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/cktntask.c0000644000265600020320000001046512264261473020431 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/tskdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" /* CDHW See notes in spiceif.c for an explanation of these fixes CDHW */ int CKTnewTask(CKTcircuit *ckt, TSKtask **taskPtr, IFuid taskName, TSKtask **defPtr) { TSKtask *tsk, *def = NULL; NG_IGNORE(ckt); FREE(*taskPtr); /* clear old task upon repeated calls to tran etc.*/ *taskPtr = TMALLOC(TSKtask, 1); if (*taskPtr == NULL) return(E_NOMEM); tsk = *taskPtr; tsk->TSKname = taskName; #if (1) /*CDHW*/ if(defPtr) def = *defPtr; if ((strcmp(taskName,"special") == 0) && def) { /* create options by copying the circuit's defaults */ tsk->TSKtemp = def->TSKtemp; tsk->TSKnomTemp = def->TSKnomTemp; tsk->TSKmaxOrder = def->TSKmaxOrder; tsk->TSKintegrateMethod = def->TSKintegrateMethod; tsk->TSKbypass = def->TSKbypass; tsk->TSKdcMaxIter = def->TSKdcMaxIter; tsk->TSKdcTrcvMaxIter = def->TSKdcTrcvMaxIter; tsk->TSKtranMaxIter = def->TSKtranMaxIter; tsk->TSKnumSrcSteps = def->TSKnumSrcSteps; tsk->TSKnumGminSteps = def->TSKnumGminSteps; tsk->TSKgminFactor = def->TSKgminFactor; /* minBreak */ tsk->TSKabstol = def->TSKabstol; tsk->TSKpivotAbsTol = def->TSKpivotAbsTol; tsk->TSKpivotRelTol = def->TSKpivotRelTol; tsk->TSKreltol = def->TSKreltol; tsk->TSKchgtol = def->TSKchgtol; tsk->TSKvoltTol = def->TSKvoltTol; tsk->TSKgmin = def->TSKgmin; tsk->TSKgshunt = def->TSKgshunt; /* delmin */ tsk->TSKtrtol = def->TSKtrtol; tsk->TSKdefaultMosM = def->TSKdefaultMosM; tsk->TSKdefaultMosL = def->TSKdefaultMosL; tsk->TSKdefaultMosW = def->TSKdefaultMosW; tsk->TSKdefaultMosAD = def->TSKdefaultMosAD; tsk->TSKdefaultMosAS = def->TSKdefaultMosAS; /* fixLimit */ tsk->TSKnoOpIter = def->TSKnoOpIter; tsk->TSKtryToCompact = def->TSKtryToCompact; tsk->TSKbadMos3 = def->TSKbadMos3; tsk->TSKkeepOpInfo = def->TSKkeepOpInfo; tsk->TSKcopyNodesets = def->TSKcopyNodesets; tsk->TSKnodeDamping = def->TSKnodeDamping; tsk->TSKabsDv = def->TSKabsDv; tsk->TSKrelDv = def->TSKrelDv; tsk->TSKnoopac = def->TSKnoopac; #ifdef NEWTRUNC tsk->TSKlteReltol = def->TSKlteReltol; tsk->TSKlteAbstol = def->TSKlteAbstol; #endif } else { #endif /*CDHW*/ /* use the application defaults */ tsk->TSKgmin = 1e-12; tsk->TSKgshunt = 0; tsk->TSKabstol = 1e-12; tsk->TSKreltol = 1e-3; tsk->TSKchgtol = 1e-14; tsk->TSKvoltTol = 1e-6; #ifdef NEWTRUNC tsk->TSKlteReltol = 1e-3; tsk->TSKlteAbstol = 1e-6; #endif tsk->TSKtrtol = 7; tsk->TSKbypass = 0; tsk->TSKtranMaxIter = 10; tsk->TSKdcMaxIter = 100; tsk->TSKdcTrcvMaxIter = 50; tsk->TSKintegrateMethod = TRAPEZOIDAL; tsk->TSKmaxOrder = 2; tsk->TSKnumSrcSteps = 1; tsk->TSKnumGminSteps = 1; tsk->TSKgminFactor = 10; tsk->TSKpivotAbsTol = 1e-13; tsk->TSKpivotRelTol = 1e-3; tsk->TSKtemp = 300.15; tsk->TSKnomTemp = 300.15; tsk->TSKdefaultMosM = 1; tsk->TSKdefaultMosL = 1e-4; tsk->TSKdefaultMosW = 1e-4; tsk->TSKdefaultMosAD = 0; tsk->TSKdefaultMosAS = 0; tsk->TSKnoOpIter = 0; tsk->TSKtryToCompact = 0; tsk->TSKbadMos3 = 0; tsk->TSKkeepOpInfo = 0; tsk->TSKcopyNodesets = 0; tsk->TSKnodeDamping = 0; tsk->TSKabsDv = 0.5; tsk->TSKrelDv = 2.0; #if (1) /*CDHW*/ } #endif return(OK); } ngspice-26/src/spicelib/analysis/cktdump.c0000644000265600020320000000456312264261473020260 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles, 1991 David A. Gates **********/ /* TODO: Ngspice and cider integration note: This file must be changed to be consistent with the ngspice interface. The SPICEdev structure must be changed by adding a pointer to DEVdump and DEVacct routines (as suggested below). Paolo Nenzi Dec 2001 No more sure about this notice (2003) */ /* CKTdump(ckt) * this is a simple program to dump the rhs vector to stdout */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #ifdef CIDER /* Begin cider integration */ #include "ngspice/gendefs.h" #include "ngspice/devdefs.h" /* End cider integration */ #endif void CKTdump(CKTcircuit *ckt, double ref, void *plot) { IFvalue refData; IFvalue valData; #ifdef CIDER int i; #endif refData.rValue = ref; valData.v.numValue = ckt->CKTmaxEqNum-1; valData.v.vec.rVec = ckt->CKTrhsOld+1; SPfrontEnd->OUTpData (plot, &refData, &valData); #ifdef CIDER /* * Begin cider integration: * This code has been hacked changing the SPICEdev structure. * SPICEdev now has DEVdump and DEVacct as members. The * following code works for any devices but as of this * comment is written, only numerical devices have DEVdump * and DEVacct routine (NUMD, NBJT, NUMD2, NBJT2, NUMOS). */ for (i=0; iDEVdump && ckt->CKThead[i] ) { DEVices[i]->DEVdump (ckt->CKThead[i], ckt); } } /* End cider integration */ #endif /* CIDER */ } #ifdef CIDER /* * Routine to dump statistics about numerical devices * * The following lines are historical: * This is inefficient, because we have to look up the indices * of the devices in the device table. Would be simpler if * DEVices had an entry for an accounting function, so that indirection * could be used. * ------------------ * The SPICEdev structure has been hacked and now has a DEVacct entry. */ void NDEVacct(CKTcircuit *ckt, FILE *file) { int i; if ( !ckt->CKTisSetup ) { return; } for (i=0; iDEVacct && ckt->CKThead[i] ) { DEVices[i]->DEVacct (ckt->CKThead[i], ckt, file); } } return; } /* End cider integration */ #endif /* CIDER */ ngspice-26/src/spicelib/analysis/ninteg.c0000644000265600020320000000255412264261473020073 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ /* * Nintegrate.c (noizDens, lnNdens, lnNlstDens, data) * * This subroutine evaluates the integral of the function * * EXPONENT * NOISE = a * (FREQUENCY) * * given two points from the curve. If EXPONENT is relatively close * to 0, the noise is simply multiplied by the change in frequency. * If it isn't, a more complicated expression must be used. Note that * EXPONENT = -1 gives a different equation than EXPONENT <> -1. * Hence, the reason for the constant 'N_INTUSELOG'. */ #include "ngspice/ngspice.h" #include "ngspice/noisedef.h" #define limexp(x) (x > 700 ? exp(700.0)*(1.0+x-700.0) : exp(x)) double Nintegrate (double noizDens, double lnNdens, double lnNlstDens, Ndata *data) { double exponent; double a; exponent = (lnNdens - lnNlstDens) / data->delLnFreq; if ( fabs(exponent) < N_INTFTHRESH ) { return (noizDens * data->delFreq); } else { a = limexp(lnNdens - exponent*data->lnFreq); exponent += 1.0; if (fabs(exponent) < N_INTUSELOG) { return (a * (data->lnFreq - data->lnLastFreq)); } else { return (a * ((exp(exponent * data->lnFreq) - exp(exponent * data->lnLastFreq)) / exponent)); } } } ngspice-26/src/spicelib/analysis/cluster.c0000644000265600020320000002377012264261473020273 0ustar andreasadmin/* Spice hooks */ #include "ngspice/ngspice.h" #ifdef CLUSTER #include "ngspice/inpdefs.h" #include "ngspice/cluster.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* Misc stuff */ #include #include /*Network stuff*/ #include #include #include #include #include struct input_pipe { /*the names of the local and remote nodes*/ char remote[32]; char local[32]; int fd; FILE *stream; /* the data recieved */ double time; double data; /*resistance of this link*/ double res; /* The value controled */ double *currentPtr; /*The output it is linked to*/ struct output_pipe *link; struct input_pipe *next; }; struct output_pipe { int fd; FILE *stream; /*the names of the local and remote nodes*/ char local[32]; char remote[32]; /* The index of the local node value in the ckt->CKTrhsOld array */ int outIndex; /*Last values sent*/ double time,data; struct input_pipe *link; struct output_pipe *next; }; static double lastTimeSent=0; static int time_sock=0; static FILE *time_outfile=NULL; static FILE *time_infile=NULL; static struct input_pipe* input_pipes=NULL; static struct output_pipe* output_pipes=NULL; /* sets up deamon which waits for connections *and sets up input pipes as it recieves them */ static void *start_listener(void *); /* Setup the output pipes*/ static int setup_output(CKTcircuit *ckt); static int setup_input(CKTcircuit *ckt); static int setup_time(); int CLUsetup(CKTcircuit *ckt){ pthread_t tid; struct input_pipe *curr; int i, connections=0; GENmodel *mod; GENinstance *inst; /* count the number of connections expected */ i = INPtypelook("Isource"); for(mod = ckt->CKThead[i]; mod != NULL; mod = mod->GENnextModel) for (inst = mod->GENinstances; inst != NULL; inst = inst->GENnextInstance) if(strncmp("ipcx",inst->GENname,4) == 0) connections++; /* allocate the input connections */ for(i=0;inext = input_pipes; else curr->next = NULL; input_pipes = curr; } pthread_create(&tid,NULL,start_listener,(void *)&connections); setup_output(ckt); pthread_join(tid,NULL); setup_input(ckt); setup_time(); return 0; } #include "../devices/isrc/isrcdefs.h" /*Connect to remote machine and find the data*/ static int setup_output(CKTcircuit *ckt){ int type; GENmodel *mod; GENinstance *inst; char hostname[64]; lastTimeSent = 0; type = INPtypelook("Isource"); for(mod = ckt->CKThead[type]; mod != NULL; mod = mod->GENnextModel) for (inst = mod->GENinstances; inst != NULL; inst = inst->GENnextInstance) if(strncmp("ipcx",inst->GENname,4) == 0){ ISRCinstance *isrc = (ISRCinstance *)inst; CKTnode *node; struct output_pipe *curr; struct sockaddr_in address; struct hostent *host=NULL; int sock,nodeNum,i; /*Create the struct*/ curr = TMALLOC(struct output_pipe, 1); if(output_pipes) curr->next = output_pipes; else curr->next = NULL; output_pipes = curr; /* The node names */ strcpy(curr->local,CKTnodName(ckt,isrc->ISRCnegNode));/*weird*/ strcpy(curr->remote,isrc->ISRCname); /* extract remote node number */ nodeNum = /*Xcoord*/(curr->remote[4] - '0') * CLUSTER_WIDTH + /*Ycoord*/(curr->remote[9] - '0'); sprintf(hostname,"n%d."DOMAIN_NAME,nodeNum); /* network stuff */ host = gethostbyname(hostname); if(!host){ printf("Host not found in setup_output\n"); exit(0); } if((sock = socket(PF_INET,SOCK_STREAM,0)) < 0){ printf("Socket open in setup_output\n"); exit(0); } address.sin_family = AF_INET; address.sin_port = htons(PORT); memcpy(&address.sin_addr,host->h_addr_list[0], sizeof(address.sin_addr)); printf("connecting to %s ...... ",hostname); fflush(stdout); while(connect(sock,(struct sockaddr *)&address,sizeof(address))){ usleep(500);/*wait for the sever to start*/ } printf("connected\n"); curr->fd = sock; /* send stuff */ /* buffer */ i = (strlen(curr->remote) + strlen(curr->local) + 2)*sizeof(char); setsockopt(sock,SOL_SOCKET,SO_SNDBUF,&i,sizeof(i)); curr->stream = fdopen(curr->fd,"w"); fwrite(curr->remote,sizeof(char),strlen(curr->remote),curr->stream); fputc('\0',curr->stream); fwrite(curr->local,sizeof(char),strlen(curr->local),curr->stream); fputc('\0',curr->stream); fflush(curr->stream); /* buffer, what is done per time point */ i = sizeof(double)*2; setsockopt(sock,SOL_SOCKET,SO_SNDBUF,&i,sizeof(i)); /* find the index in ckt->rhsOld which contains the local node */ i = 0; for(node = ckt->CKTnodes->next;node;node = node->next){ i++; if(strcmp(node->name,curr->local)==0){ curr->outIndex = i; goto next; } } printf("Local node %s not found\n",curr->local); exit(0); next: } return 0; } /*Processes the connections recieved by start_listener*/ static int setup_input(CKTcircuit *ckt){ int type; GENmodel *mod; GENinstance *inst; struct input_pipe *input; type = INPtypelook("Isource"); for(input = input_pipes;input;input = input->next){ int i; input->stream = fdopen(input->fd,"r"); /*Get the local and remote node names*/ i=0; do { while(fread(&input->local[i],sizeof(char),1,input->stream) != 1); }while(input->local[i++] != '\0'); i=0; do { while(fread(&input->remote[i],sizeof(char),1,input->stream) != 1); }while(input->remote[i++] != '\0'); /* initilise */ input->time = -1; /*Find the Isource to control*/ for(mod = ckt->CKThead[type]; mod != NULL; mod = mod->GENnextModel) for (inst = mod->GENinstances; inst != NULL; inst = inst->GENnextInstance) if(strcmp(input->remote,&inst->GENname[11]) == 0){ ISRCinstance *isrc = (ISRCinstance *)inst; input->res = isrc->ISRCdcValue; isrc->ISRCdcValue = 0; input->currentPtr = &isrc->ISRCdcValue; goto next; } /* We get here if no Isource matches */ printf("Current source %s not found\n",input->remote); exit(0); next: /* Now find the corresponding output */ { struct output_pipe *output; for(output = output_pipes;output;output = output->next) if(strcmp(&input->local[11],output->local)==0){ input->link = output; output->link = input; goto next2; } printf("Parent to %s not found\n",&input->local[11]); exit(0); next2: } } return 0; } /* This starts a server and waits for connections, number given by argument*/ static void *start_listener(void *v){ int *connections = (int *)v; int count=0; struct sockaddr_in address; int sock, conn,i; size_t addrLength = sizeof(struct sockaddr_in); struct input_pipe *curr; if((sock = socket(PF_INET,SOCK_STREAM,0)) < 0){ printf("socket in start_listener\n"); exit(0); } /* Allow reuse of the socket */ i = 1; setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,&i,sizeof(i)); /* port, inferface ..*/ address.sin_family = AF_INET; address.sin_port = htons(PORT); memset(&address.sin_addr,0,sizeof(address.sin_addr)); if(bind(sock, (struct sockaddr *)&address,sizeof(address))){ printf("bind in start_listener\n"); exit(0); } if(listen(sock,5)){ printf("listen in start_listener\n"); exit(0); } /* Loop till recieved all connections */ curr = input_pipes; while (count < *connections){ if((conn = accept(sock, (struct sockaddr *)&address,&addrLength)) < 0){ printf("accept in start_listener\n"); exit(0); } curr->fd = conn; /* will fill rest of structure later in setup_input*/ count ++; curr = curr->next; } close(sock); return NULL; } /*Writes data to remote computer*/ int CLUoutput(CKTcircuit *ckt){ struct output_pipe *output; lastTimeSent = ckt->CKTtime; for(output = output_pipes; output; output = output->next){ output->time = ckt->CKTtime; output->data = ckt->CKTrhsOld[output->outIndex]; fwrite(&output->time,sizeof(double),1,output->stream); fwrite(&output->data, sizeof(double),1,output->stream); fflush(output->stream); } return 0; } /*Maniputates the local circuit based on the links*/ int CLUinput(CKTcircuit *ckt){ struct input_pipe *input; double tmp; for(input= input_pipes;input;input = input->next){ /*recieve data till we get a good time point*/ while (input->time < lastTimeSent){ while(fread(&input->time, sizeof(double), 1, input->stream) != 1){} while(fread(&input->data, sizeof(double), 1, input->stream) != 1){} } tmp = (input->link->data - input->data) / input->res; /*dampen out large currents*/ if(tmp > 0) *input->currentPtr = 0.2 * (1 - exp(-tmp/0.2)); else *input->currentPtr = -0.2 * (1 - exp(tmp/0.2)); /*GND is the posNode, local node is the negNode*/ } return 0; } static int setup_time(){ struct sockaddr_in address; struct hostent *host=NULL; char *hostname = TIME_HOST; int sock,i; /* network stuff */ host = gethostbyname(hostname); if(!host){ printf("Host not found in setup_time\n"); exit(0); } if((sock = socket(PF_INET,SOCK_STREAM,0)) < 0){ printf("Socket open in setup_time\n"); exit(0); } i = sizeof(double)*2; setsockopt(sock,SOL_SOCKET,SO_SNDBUF ,&i,sizeof(i)); address.sin_family = AF_INET; address.sin_port = htons(TIME_PORT); memcpy(&address.sin_addr,host->h_addr_list[0], sizeof(address.sin_addr)); while(connect(sock,(struct sockaddr *)&address,sizeof(address))){ usleep(500);/*wait for the sever to start*/ } time_sock=sock; time_outfile=fdopen(sock,"w"); time_infile=fdopen(sock,"r"); return 0; } int CLUsync(double time,double *delta, int error){ double tmp; if(error) tmp = *delta * (-1); else tmp = *delta; fwrite(&time,sizeof(double),1,time_outfile); fwrite(&tmp,sizeof(double),1,time_outfile); fflush(time_outfile); while(fread(&tmp,sizeof(double),1,time_infile) != 1); if(tmp < 0){ *delta = -tmp; return 0; } else { *delta = tmp; return 1; } } #endif ngspice-26/src/spicelib/analysis/cktload.c0000644000265600020320000001335512264261473020231 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ /* CKTload(ckt) * this is a driver program to iterate through all the various * load functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #ifdef XSPICE /* gtri - add - wbk - 11/26/90 - add include for MIF global data */ #include "ngspice/mif.h" /* gtri - end - wbk - 11/26/90 */ #endif static int ZeroNoncurRow(SMPmatrix *matrix, CKTnode *nodes, int rownum); int CKTload(CKTcircuit *ckt) { int i; int size; double startTime; CKTnode *node; int error; #ifdef STEPDEBUG int noncon; #endif /* STEPDEBUG */ #ifdef XSPICE /* gtri - begin - Put resistors to ground at all nodes */ /* SMPmatrix *matrix; maschmann : deleted , because unused */ double gshunt; int num_nodes; /* gtri - begin - Put resistors to ground at all nodes */ #endif startTime = SPfrontEnd->IFseconds(); size = SMPmatSize(ckt->CKTmatrix); for (i = 0; i <= size; i++) { ckt->CKTrhs[i] = 0; } SMPclear(ckt->CKTmatrix); #ifdef STEPDEBUG noncon = ckt->CKTnoncon; #endif /* STEPDEBUG */ for (i = 0; i < DEVmaxnum; i++) { if (DEVices[i] && DEVices[i]->DEVload && ckt->CKThead[i]) { error = DEVices[i]->DEVload (ckt->CKThead[i], ckt); if (ckt->CKTnoncon) ckt->CKTtroubleNode = 0; #ifdef STEPDEBUG if (noncon != ckt->CKTnoncon) { printf("device type %s nonconvergence\n", DEVices[i]->DEVpublic.name); noncon = ckt->CKTnoncon; } #endif /* STEPDEBUG */ if (error) return(error); } } #ifdef XSPICE /* gtri - add - wbk - 11/26/90 - reset the MIF init flags */ /* init is set by CKTinit and should be true only for first load call */ g_mif_info.circuit.init = MIF_FALSE; /* anal_init is set by CKTdoJob and is true for first call */ /* of a particular analysis type */ g_mif_info.circuit.anal_init = MIF_FALSE; /* gtri - end - wbk - 11/26/90 */ /* gtri - begin - Put resistors to ground at all nodes. */ /* Value of resistor is set by new "rshunt" option. */ if (ckt->enh->rshunt_data.enabled) { gshunt = ckt->enh->rshunt_data.gshunt; num_nodes = ckt->enh->rshunt_data.num_nodes; for (i = 0; i < num_nodes; i++) { *(ckt->enh->rshunt_data.diag[i]) += gshunt; } } /* gtri - end - Put resistors to ground at all nodes */ #endif if (ckt->CKTmode & MODEDC) { /* consider doing nodeset & ic assignments */ if (ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) { /* do nodesets */ for (node = ckt->CKTnodes; node; node = node->next) { if (node->nsGiven) { if (ZeroNoncurRow(ckt->CKTmatrix, ckt->CKTnodes, node->number)) { ckt->CKTrhs[node->number] = 1.0e10 * node->nodeset * ckt->CKTsrcFact; *(node->ptr) = 1e10; } else { ckt->CKTrhs[node->number] = node->nodeset * ckt->CKTsrcFact; *(node->ptr) = 1; } /* DAG: Original CIDER fix. If above fix doesn't work, * revert to this. */ /* * ckt->CKTrhs[node->number] += 1.0e10 * node->nodeset; * *(node->ptr) += 1.0e10; */ } } } if ((ckt->CKTmode & MODETRANOP) && (!(ckt->CKTmode & MODEUIC))) { for (node = ckt->CKTnodes; node; node = node->next) { if (node->icGiven) { if (ZeroNoncurRow(ckt->CKTmatrix, ckt->CKTnodes, node->number)) { /* Original code: ckt->CKTrhs[node->number] += 1.0e10 * node->ic; */ ckt->CKTrhs[node->number] = 1.0e10 * node->ic * ckt->CKTsrcFact; *(node->ptr) += 1.0e10; } else { /* Original code: ckt->CKTrhs[node->number] = node->ic; */ ckt->CKTrhs[node->number] = node->ic*ckt->CKTsrcFact; /* AlansFixes */ *(node->ptr) = 1; } /* DAG: Original CIDER fix. If above fix doesn't work, * revert to this. */ /* * ckt->CKTrhs[node->number] += 1.0e10 * node->ic; * *(node->ptr) += 1.0e10; */ } } } } /* SMPprint(ckt->CKTmatrix, stdout); if you want to debug, this is a good place to start ... */ ckt->CKTstat->STATloadTime += SPfrontEnd->IFseconds()-startTime; return(OK); } static int ZeroNoncurRow(SMPmatrix *matrix, CKTnode *nodes, int rownum) { CKTnode *n; double *x; int currents; currents = 0; for (n = nodes; n; n = n->next) { x = (double *) SMPfindElt(matrix, rownum, n->number, 0); if (x) { if (n->type == SP_CURRENT) currents = 1; else *x = 0.0; } } return currents; } ngspice-26/src/spicelib/analysis/cktlnkeq.c0000644000265600020320000000174012264261473020417 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTlinkEq * Link an already allocated node into the necessary structure */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" int CKTlinkEq(CKTcircuit *ckt, CKTnode *node) { if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */ ckt->CKTnodes = TMALLOC(CKTnode, 1); if(ckt->CKTnodes == NULL) return(E_NOMEM); ckt->CKTnodes->name = NULL; ckt->CKTnodes->type = SP_VOLTAGE; ckt->CKTnodes->number = 0; ckt->CKTlastNode = ckt->CKTnodes; } if(node == NULL) return(E_BADPARM); ckt->CKTlastNode->next = node; ckt->CKTlastNode = ckt->CKTlastNode->next; ckt->CKTlastNode->number = ckt->CKTmaxEqNum++; ckt->CKTlastNode->next = NULL; return(OK); } ngspice-26/src/spicelib/analysis/cktnum2n.c0000644000265600020320000000112512264261473020341 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTnum2nod * find the given node given its name and return the node pointer */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ CKTnode * CKTnum2nod(CKTcircuit *ckt, int node) { CKTnode *here; for (here = ckt->CKTnodes; here; here = here->next) { if(here->number == node) { return(here); } } return(NULL); } ngspice-26/src/spicelib/analysis/cktfndm.c0000644000265600020320000000061312264261473020227 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" GENmodel * CKTfndMod(CKTcircuit *ckt, IFuid modname) { return nghash_find(ckt->MODnameHash, modname); } ngspice-26/src/spicelib/analysis/cktclrbk.c0000644000265600020320000000151612264261473020403 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTclrBreak(ckt) * delete the first time from the breakpoint table for the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" int CKTclrBreak(CKTcircuit *ckt) { double *tmp; int j; if(ckt->CKTbreakSize >2) { tmp = TMALLOC(double, ckt->CKTbreakSize - 1); if(tmp == NULL) return(E_NOMEM); for(j=1;jCKTbreakSize;j++) { tmp[j-1] = ckt->CKTbreaks[j]; } FREE(ckt->CKTbreaks); ckt->CKTbreakSize--; ckt->CKTbreaks=tmp; } else { ckt->CKTbreaks[0] = ckt->CKTbreaks[1]; ckt->CKTbreaks[1] = ckt->CKTfinalTime; } return(OK); } ngspice-26/src/spicelib/analysis/dctaskq.c0000644000265600020320000000106612264261473020236 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/trcvdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int DCTaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NG_IGNORE(ckt); NG_IGNORE(anal); NG_IGNORE(value); switch(which) { default: break; } /* NOTREACHED */ /* TEMPORARY until cases get added */ return(E_BADPARM); } ngspice-26/src/spicelib/analysis/cktsetnp.c0000644000265600020320000000155112264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTsetNodPm * * set a parameter on a node. */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTsetNodPm(CKTcircuit *ckt, CKTnode *node, int parm, IFvalue *value, IFvalue *selector) { NG_IGNORE(ckt); NG_IGNORE(selector); if(!node) return(E_BADPARM); switch(parm) { case PARM_NS: node->nodeset = value->rValue; node->nsGiven = 1; break; case PARM_IC: node->ic = value->rValue; node->icGiven = 1; break; case PARM_NODETYPE: node->type = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/naskq.c0000644000265600020320000000267312264261473017726 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" int NaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NOISEAN *job = (NOISEAN *) anal; NG_IGNORE(ckt); switch(which) { case N_OUTPUT: value->nValue = job->output; break; case N_OUTREF: value->nValue = job->outputRef; break; case N_INPUT: value->uValue = job->input; break; case N_DEC: if (job->NstpType == DECADE) { value->iValue=1; } else { value->iValue=0; } break; case N_OCT: if (job->NstpType == OCTAVE) { value->iValue=1; } else { value->iValue=0; } break; case N_LIN: if (job->NstpType == LINEAR) { value->iValue=1; } else { value->iValue=0; } break; case N_STEPS: value->iValue = job->NnumSteps; break; case N_START: value->rValue = job->NstartFreq; break; case N_STOP: value->rValue = job->NstopFreq; break; case N_PTSPERSUM: value->iValue = job->NStpsSm; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/tfanal.c0000644000265600020320000001213412264261473020047 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ /* subroutine to do DC Transfer Function analysis */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/smpdefs.h" #include "ngspice/tfdefs.h" /* ARGSUSED */ int TFanal(CKTcircuit *ckt, int restart) /* forced restart flag */ { TFan *job = (TFan *) ckt->CKTcurJob; int size; int insrc = 0, outsrc = 0; double outputs[3]; IFvalue outdata; /* structure for output data vector, will point to * outputs vector above */ IFvalue refval; /* structure for 'reference' value (not used here) */ int error; int converged; int i; runDesc *plotptr = NULL; /* pointer to out plot */ GENinstance *ptr = NULL; IFuid uids[3]; char *name; #define tfuid (uids[0]) /* unique id for the transfer function output */ #define inuid (uids[1]) /* unique id for the transfer function input imp. */ #define outuid (uids[2]) /* unique id for the transfer function out. imp. */ NG_IGNORE(restart); /* first, find the operating point */ converged = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); ptr = CKTfndDev(ckt, job->TFinSrc); if (!ptr || ptr->GENmodPtr->GENmodType < 0) { SPfrontEnd->IFerror (ERR_WARNING, "Transfer function source %s not in circuit", &job->TFinSrc); job->TFinIsV = 0; job->TFinIsI = 0; return E_NOTFOUND; } if (ptr->GENmodPtr->GENmodType == CKTtypelook("Vsource")) { job->TFinIsV = 1; job->TFinIsI = 0; } else if (ptr->GENmodPtr->GENmodType == CKTtypelook("Isource")) { job->TFinIsV = 0; job->TFinIsI = 1; } else { SPfrontEnd->IFerror (ERR_WARNING, "Transfer function source %s not of proper type", &job->TFinSrc); return E_NOTFOUND; } size = SMPmatSize(ckt->CKTmatrix); for(i=0;i<=size;i++) { ckt->CKTrhs[i] = 0; } if (job->TFinIsI) { ckt->CKTrhs[ptr->GENnode1] -= 1; ckt->CKTrhs[ptr->GENnode2] += 1; } else { insrc = CKTfndBranch(ckt, job->TFinSrc); ckt->CKTrhs[insrc] += 1; } SMPsolve(ckt->CKTmatrix,ckt->CKTrhs,ckt->CKTrhsSpare); ckt->CKTrhs[0]=0; /* make a UID for the transfer function output */ SPfrontEnd->IFnewUid (ckt, &tfuid, NULL, "Transfer_function", UID_OTHER, NULL); /* make a UID for the input impedance */ SPfrontEnd->IFnewUid (ckt, &inuid, job->TFinSrc, "Input_impedance", UID_OTHER, NULL); /* make a UID for the output impedance */ if (job->TFoutIsI) { SPfrontEnd->IFnewUid (ckt, &outuid, job->TFoutSrc ,"Output_impedance", UID_OTHER, NULL); } else { name = TMALLOC(char, strlen(job->TFoutName) + 22); (void)sprintf(name,"output_impedance_at_%s", job->TFoutName); SPfrontEnd->IFnewUid (ckt, &outuid, NULL, name, UID_OTHER, NULL); } error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, job->JOBname, NULL, 0, 3, uids, IF_REAL, &plotptr); if(error) return(error); /*find transfer function */ if (job->TFoutIsV) { outputs[0] = ckt->CKTrhs[job->TFoutPos->number] - ckt->CKTrhs[job->TFoutNeg->number]; } else { outsrc = CKTfndBranch(ckt, job->TFoutSrc); outputs[0] = ckt->CKTrhs[outsrc]; } /* now for input resistance */ if (job->TFinIsI) { outputs[1] = ckt->CKTrhs[ptr->GENnode2] - ckt->CKTrhs[ptr->GENnode1]; } else { if(fabs(ckt->CKTrhs[insrc])<1e-20) { outputs[1]=1e20; } else { outputs[1] = -1/ckt->CKTrhs[insrc]; } } if (job->TFoutIsI && (job->TFoutSrc == job->TFinSrc)) { outputs[2]=outputs[1]; goto done; /* no need to compute output resistance when it is the same as the input */ } /* now for output resistance */ for(i=0;i<=size;i++) { ckt->CKTrhs[i] = 0; } if (job->TFoutIsV) { ckt->CKTrhs[job->TFoutPos->number] -= 1; ckt->CKTrhs[job->TFoutNeg->number] += 1; } else { ckt->CKTrhs[outsrc] += 1; } SMPsolve(ckt->CKTmatrix,ckt->CKTrhs,ckt->CKTrhsSpare); ckt->CKTrhs[0]=0; if (job->TFoutIsV) { outputs[2] = ckt->CKTrhs[job->TFoutNeg->number] - ckt->CKTrhs[job->TFoutPos->number]; } else { outputs[2] = 1/MAX(1e-20,ckt->CKTrhs[outsrc]); } done: outdata.v.numValue=3; outdata.v.vec.rVec=outputs; refval.rValue = 0; SPfrontEnd->OUTpData (plotptr, &refval, &outdata); SPfrontEnd->OUTendPlot (plotptr); return(OK); } ngspice-26/src/spicelib/analysis/cktsetup.c0000644000265600020320000001036212264261473020445 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTsetup(ckt) * this is a driver program to iterate through all the various * setup functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #ifdef USE_OMP #include #include "ngspice/cpextern.h" int nthreads; #endif #define CKALLOC(var,size,type) \ if(size && ((var = TMALLOC(type, size)) == NULL)){\ return(E_NOMEM);\ } int CKTsetup(CKTcircuit *ckt) { int i; int error; #ifdef XSPICE /* gtri - begin - Setup for adding rshunt option resistors */ CKTnode *node; int num_nodes; /* gtri - end - Setup for adding rshunt option resistors */ #endif SMPmatrix *matrix; ckt->CKTnumStates=0; #ifdef WANT_SENSE2 if(ckt->CKTsenInfo){ error = CKTsenSetup(ckt); if (error) return(error); } #endif if (ckt->CKTisSetup) return E_NOCHANGE; error = NIinit(ckt); if (error) return(error); ckt->CKTisSetup = 1; matrix = ckt->CKTmatrix; #ifdef USE_OMP if (!cp_getvar("num_threads", CP_NUM, &nthreads)) nthreads = 2; omp_set_num_threads(nthreads); /* if (nthreads == 1) printf("OpenMP: %d thread is requested in ngspice\n", nthreads); else printf("OpenMP: %d threads are requested in ngspice\n", nthreads);*/ #endif for (i=0;iDEVsetup && ckt->CKThead[i] ) { error = DEVices[i]->DEVsetup (matrix, ckt->CKThead[i], ckt, &ckt->CKTnumStates); if(error) return(error); } } for(i=0;i<=MAX(2,ckt->CKTmaxOrder)+1;i++) { /* dctran needs 3 states as minimum */ CKALLOC(ckt->CKTstates[i],ckt->CKTnumStates,double); } #ifdef WANT_SENSE2 if(ckt->CKTsenInfo){ /* to allocate memory to sensitivity structures if * it is not done before */ error = NIsenReinit(ckt); if(error) return(error); } #endif if(ckt->CKTniState & NIUNINITIALIZED) { error = NIreinit(ckt); if(error) return(error); } #ifdef XSPICE /* gtri - begin - Setup for adding rshunt option resistors */ if(ckt->enh->rshunt_data.enabled) { /* Count number of voltage nodes in circuit */ for(num_nodes = 0, node = ckt->CKTnodes; node; node = node->next) if((node->type == SP_VOLTAGE) && (node->number != 0)) num_nodes++; /* Allocate space for the matrix diagonal data */ if(num_nodes > 0) { ckt->enh->rshunt_data.diag = TMALLOC(double *, num_nodes); } /* Set the number of nodes in the rshunt data */ ckt->enh->rshunt_data.num_nodes = num_nodes; /* Get/create matrix diagonal entry following what RESsetup does */ for(i = 0, node = ckt->CKTnodes; node; node = node->next) { if((node->type == SP_VOLTAGE) && (node->number != 0)) { ckt->enh->rshunt_data.diag[i] = SMPmakeElt(matrix,node->number,node->number); i++; } } } /* gtri - end - Setup for adding rshunt option resistors */ #endif return(OK); } int CKTunsetup(CKTcircuit *ckt) { int i, error, e2; CKTnode *node; error = OK; if (!ckt->CKTisSetup) return OK; for(i=0;i<=ckt->CKTmaxOrder+1;i++) { tfree(ckt->CKTstates[i]); } /* added by HT 050802*/ for(node=ckt->CKTnodes;node;node=node->next){ if(node->icGiven || node->nsGiven) { node->ptr=0; } } for (i=0;iDEVunsetup && ckt->CKThead[i] ) { e2 = DEVices[i]->DEVunsetup (ckt->CKThead[i], ckt); if (!error && e2) error = e2; } } ckt->CKTisSetup = 0; if(error) return(error); NIdestroy(ckt); /* if (ckt->CKTmatrix) SMPdestroy(ckt->CKTmatrix); ckt->CKTmatrix = NULL; */ return OK; } ngspice-26/src/spicelib/analysis/dctran.c0000644000265600020320000010237412264261473020063 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* subroutine to do DC TRANSIENT analysis --- ONLY, unlike spice2 routine with the same name! */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cktaccept.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/fteext.h" #include "ngspice/missing_math.h" /* for setting breakpoints required by dbs data base */ extern struct dbcomm *dbs; #include "ngspice/ftedebug.h" #ifdef XSPICE /* gtri - add - wbk - Add headers */ #include "ngspice/miftypes.h" #include "ngspice/evt.h" #include "ngspice/mif.h" #include "ngspice/evtproto.h" #include "ngspice/ipctiein.h" /* gtri - end - wbk - Add headers */ #endif #ifdef CLUSTER #include "ngspice/cluster.h" #endif #ifdef SHARED_MODULE extern int add_bkpt(void); extern int sharedsync(double*, double*, double, double, double, int, int*, int); extern int ng_ident; /* for debugging */ static double del_before; /* for debugging */ #endif #define INIT_STATS() \ do { \ startTime = SPfrontEnd->IFseconds(); \ startIters = ckt->CKTstat->STATnumIter; \ startdTime = ckt->CKTstat->STATdecompTime; \ startsTime = ckt->CKTstat->STATsolveTime; \ startlTime = ckt->CKTstat->STATloadTime; \ startkTime = ckt->CKTstat->STATsyncTime; \ } while(0) #define UPDATE_STATS(analysis) \ do { \ ckt->CKTcurrentAnalysis = analysis; \ ckt->CKTstat->STATtranTime += SPfrontEnd->IFseconds() - startTime; \ ckt->CKTstat->STATtranIter += ckt->CKTstat->STATnumIter - startIters; \ ckt->CKTstat->STATtranDecompTime += ckt->CKTstat->STATdecompTime - startdTime; \ ckt->CKTstat->STATtranSolveTime += ckt->CKTstat->STATsolveTime - startsTime; \ ckt->CKTstat->STATtranLoadTime += ckt->CKTstat->STATloadTime - startlTime; \ ckt->CKTstat->STATtranSyncTime += ckt->CKTstat->STATsyncTime - startkTime; \ } while(0) int DCtran(CKTcircuit *ckt, int restart) /* forced restart flag */ { TRANan *job = (TRANan *) ckt->CKTcurJob; int i; double olddelta; double delta; double newdelta; double *temp; double startdTime; double startsTime; double startlTime; double startkTime; double startTime; int startIters; int converged; int firsttime; int error; #ifdef WANT_SENSE2 int save, save2, size; long save1; #endif int save_order; long save_mode; IFuid timeUid; IFuid *nameList; int numNames; double maxstepsize = 0.0; int ltra_num; CKTnode *node; #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ Ipc_Boolean_t ipc_firsttime = IPC_TRUE; Ipc_Boolean_t ipc_secondtime = IPC_FALSE; Ipc_Boolean_t ipc_delta_cut = IPC_FALSE; double ipc_last_time = 0.0; double ipc_last_delta = 0.0; /* gtri - end - wbk - 12/19/90 - Add IPC stuff */ #endif #if defined CLUSTER || defined SHARED_MODULE int redostep; #endif if(restart || ckt->CKTtime == 0) { delta=MIN(ckt->CKTfinalTime/100,ckt->CKTstep)/10; #ifdef STEPDEBUG printf("delta = %g finalTime/100: %g CKTstep: %g\n",delta,ckt->CKTfinalTime/100,ckt->CKTstep); #endif /* begin LTRA code addition */ if (ckt->CKTtimePoints != NULL) FREE(ckt->CKTtimePoints); if (ckt->CKTstep >= ckt->CKTmaxStep) maxstepsize = ckt->CKTstep; else maxstepsize = ckt->CKTmaxStep; ckt->CKTsizeIncr = 10; ckt->CKTtimeIndex = -1; /* before the DC soln has been stored */ ckt->CKTtimeListSize = (int) ceil( ckt->CKTfinalTime / maxstepsize ); ltra_num = CKTtypelook("LTRA"); if (ltra_num >= 0 && ckt->CKThead[ltra_num] != NULL) ckt->CKTtimePoints = NEWN(double, ckt->CKTtimeListSize); /* end LTRA code addition */ if(ckt->CKTbreaks) FREE(ckt->CKTbreaks); ckt->CKTbreaks = TMALLOC(double, 2); if(ckt->CKTbreaks == NULL) return(E_NOMEM); ckt->CKTbreaks[0] = 0; ckt->CKTbreaks[1] = ckt->CKTfinalTime; ckt->CKTbreakSize = 2; #ifdef SHARED_MODULE add_bkpt(); #endif #ifdef XSPICE /* gtri - begin - wbk - 12/19/90 - Modify setting of CKTminBreak */ /* Set to 10 times delmin for ATESSE 1 compatibity */ if(ckt->CKTminBreak==0) ckt->CKTminBreak = 10.0 * ckt->CKTdelmin; /* gtri - end - wbk - 12/19/90 - Modify setting of CKTminBreak */ #else if(ckt->CKTminBreak==0) ckt->CKTminBreak=ckt->CKTmaxStep*5e-5; #endif #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff and set anal_init and anal_type */ /* Tell the beginPlot routine what mode we're in */ g_ipc.anal_type = IPC_ANAL_TRAN; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.circuit.anal_init = MIF_TRUE; /* gtri - end - wbk */ #endif error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, timeUid, IF_REAL, numNames, nameList, IF_REAL, &(job->TRANplot)); tfree(nameList); if(error) return(error); /* initialize CKTsoaCheck `warn' counters */ if (ckt->CKTsoaCheck) error = CKTsoaInit(); ckt->CKTtime = 0; ckt->CKTdelta = 0; ckt->CKTbreak = 1; firsttime = 1; save_mode = (ckt->CKTmode&MODEUIC) | MODETRANOP | MODEINITJCT; save_order = ckt->CKTorder; /* Add breakpoints here which have been requested by the user setting the stop command as 'stop when time = xx'. Get data from the global dbs data base. */ if (dbs) { struct dbcomm *d; for (d = dbs; d; d = d->db_next) if ((d->db_type == DB_STOPWHEN) && cieq(d->db_nodename1,"time") && (d->db_value2 > 0)) { CKTsetBreak(ckt, d->db_value2); if (ft_ngdebug) printf("breakpoint set to time = %g\n", d->db_value2); } } #ifdef XSPICE /* gtri - begin - wbk - set a breakpoint at end of supply ramping time */ /* must do this after CKTtime set to 0 above */ if(ckt->enh->ramp.ramptime > 0.0) CKTsetBreak(ckt, ckt->enh->ramp.ramptime); /* gtri - end - wbk - set a breakpoint at end of supply ramping time */ /* gtri - begin - wbk - Call EVTop if event-driven instances exist */ if(ckt->evt->counts.num_insts != 0) { /* use new DCOP algorithm */ converged = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, 0.0); EVTop_save(ckt, MIF_FALSE, 0.0); /* gtri - end - wbk - Call EVTop if event-driven instances exist */ } else #endif converged = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if(converged != 0) { fprintf(stdout,"\nTransient solution failed -\n"); CKTncDump(ckt); /* CKTnode *node; double new, old, tol; int i=1; fprintf(stdout,"\nTransient solution failed -\n\n"); fprintf(stdout,"Last Node Voltages\n"); fprintf(stdout,"------------------\n\n"); fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", "Previous Iter"); fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", "-------------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) { new = ckt->CKTrhsOld [i] ; old = ckt->CKTrhs [i] ; fprintf(stdout,"%-30s %20g %20g", node->name, new, old); if(node->type == SP_VOLTAGE) { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTvoltTol; } else { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTabstol; } if (fabs(new-old) >tol ) { fprintf(stdout," *"); } fprintf(stdout,"\n"); } i++; } */ fprintf(stdout,"\n"); fflush(stdout); } else if (!ft_noacctprint && !ft_noinitprint) { fprintf(stdout,"\nInitial Transient Solution\n"); fprintf(stdout,"--------------------------\n\n"); fprintf(stdout,"%-30s %15s\n", "Node", "Voltage"); fprintf(stdout,"%-30s %15s\n", "----", "-------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) fprintf(stdout,"%-30s %15g\n", node->name, ckt->CKTrhsOld[node->number]); } fprintf(stdout,"\n"); fflush(stdout); } if(converged != 0) return(converged); #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ /* Send the operating point results for Mspice compatibility */ if(g_ipc.enabled) { ipc_send_dcop_prefix(); CKTdump(ckt, 0.0, job->TRANplot); ipc_send_dcop_suffix(); } /* gtri - end - wbk */ /* gtri - add - wbk - 12/19/90 - set anal_init and anal_type */ g_mif_info.circuit.anal_init = MIF_TRUE; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_TRAN; /* gtri - end - wbk */ /* gtri - begin - wbk - Add Breakpoint stuff */ /* Initialize the temporary breakpoint variables to infinity */ g_mif_info.breakpoint.current = 1.0e30; g_mif_info.breakpoint.last = 1.0e30; /* gtri - end - wbk - Add Breakpoint stuff */ #endif ckt->CKTstat->STATtimePts ++; ckt->CKTorder = 1; for(i=0;i<7;i++) { ckt->CKTdeltaOld[i]=ckt->CKTmaxStep; } ckt->CKTdelta = delta; #ifdef STEPDEBUG (void)printf("delta initialized to %g\n",ckt->CKTdelta); #endif ckt->CKTsaveDelta = ckt->CKTfinalTime/50; #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){ #ifdef SENSDEBUG printf("\nTransient Sensitivity Results\n\n"); CKTsenPrint(ckt); #endif /* SENSDEBUG */ save = ckt->CKTsenInfo->SENmode; ckt->CKTsenInfo->SENmode = TRANSEN; save1 = ckt->CKTmode; save2 = ckt->CKTorder; ckt->CKTmode = save_mode; ckt->CKTorder = save_order; error = CKTsenDCtran(ckt); if (error) return(error); ckt->CKTmode = save1; ckt->CKTorder = save2; } #endif ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITTRAN; /* modeinittran set here */ ckt->CKTag[0]=ckt->CKTag[1]=0; bcopy(ckt->CKTstate0, ckt->CKTstate1, (size_t) ckt->CKTnumStates * sizeof(double)); #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){ size = SMPmatSize(ckt->CKTmatrix); for(i = 1; i<=size ; i++) ckt->CKTrhsOp[i] = ckt->CKTrhsOld[i]; } #endif INIT_STATS(); #ifdef CLUSTER CLUsetup(ckt); #endif } else { /* saj As traninit resets CKTmode */ ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITPRED; /* saj */ INIT_STATS(); if(ckt->CKTminBreak==0) ckt->CKTminBreak=ckt->CKTmaxStep*5e-5; firsttime=0; /* To get rawfile working saj*/ error = SPfrontEnd->OUTpBeginPlot (NULL, NULL, NULL, NULL, 0, 666, NULL, 666, &(job->TRANplot)); if(error) { fprintf(stderr, "Couldn't relink rawfile\n"); return error; } /* end saj*/ goto resume; } /* 650 */ nextTime: /* begin LTRA code addition */ if (ckt->CKTtimePoints) { ckt->CKTtimeIndex++; if (ckt->CKTtimeIndex >= ckt->CKTtimeListSize) { /* need more space */ int need; need = (int) ceil( (ckt->CKTfinalTime - ckt->CKTtime) / maxstepsize ); if (need < ckt->CKTsizeIncr) need = ckt->CKTsizeIncr; ckt->CKTtimeListSize += need; ckt->CKTtimePoints = TREALLOC(double, ckt->CKTtimePoints, ckt->CKTtimeListSize); ckt->CKTsizeIncr = (int) ceil(1.4 * ckt->CKTsizeIncr); } ckt->CKTtimePoints[ckt->CKTtimeIndex] = ckt->CKTtime; } /* end LTRA code addition */ error = CKTaccept(ckt); /* check if current breakpoint is outdated; if so, clear */ if (ckt->CKTtime > ckt->CKTbreaks[0]) CKTclrBreak(ckt); if (ckt->CKTsoaCheck) error = CKTsoaCheck(ckt); /* * Breakpoint handling scheme: * When a timepoint t is accepted (by CKTaccept), clear all previous * breakpoints, because they will never be needed again. * * t may itself be a breakpoint, or indistinguishably close. DON'T * clear t itself; recognise it as a breakpoint and act accordingly * * if t is not a breakpoint, limit the timestep so that the next * breakpoint is not crossed */ #ifdef STEPDEBUG printf("Delta %g accepted at time %g (finaltime: %g)\n",ckt->CKTdelta,ckt->CKTtime,ckt->CKTfinalTime); fflush(stdout); #endif /* STEPDEBUG */ ckt->CKTstat->STATaccepted ++; ckt->CKTbreak = 0; /* XXX Error will cause single process to bail. */ if(error) { UPDATE_STATS(DOING_TRAN); return(error); } #ifdef XSPICE /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ if(g_ipc.enabled) { /* Send event-driven results */ EVTdump(ckt, IPC_ANAL_TRAN, 0.0); /* Then follow with analog results... */ /* Test to see if delta was cut by a breakpoint, */ /* a non-convergence, or a too large truncation error */ if(ipc_firsttime) ipc_delta_cut = IPC_FALSE; else if(ckt->CKTtime < (ipc_last_time + (0.999 * ipc_last_delta))) ipc_delta_cut = IPC_TRUE; else ipc_delta_cut = IPC_FALSE; /* Record the data required to check for delta cuts */ ipc_last_time = ckt->CKTtime; ipc_last_delta = MIN(ckt->CKTdelta, ckt->CKTmaxStep); /* Send results data if time since last dump is greater */ /* than 'mintime', or if first or second timepoints, */ /* or if delta was cut */ if( (ckt->CKTtime >= (g_ipc.mintime + g_ipc.last_time)) || ipc_firsttime || ipc_secondtime || ipc_delta_cut ) { ipc_send_data_prefix(ckt->CKTtime); CKTdump(ckt, ckt->CKTtime, job->TRANplot); ipc_send_data_suffix(); if(ipc_firsttime) { ipc_firsttime = IPC_FALSE; ipc_secondtime = IPC_TRUE; } else if(ipc_secondtime) { ipc_secondtime = IPC_FALSE; } g_ipc.last_time = ckt->CKTtime; } } else /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ #endif #ifdef CLUSTER CLUoutput(ckt); #endif if(ckt->CKTtime >= ckt->CKTinitTime) CKTdump(ckt, ckt->CKTtime, job->TRANplot); #ifdef XSPICE /* gtri - begin - wbk - Update event queues/data for accepted timepoint */ /* Note: this must be done AFTER sending results to SI so it can't */ /* go next to CKTaccept() above */ if(ckt->evt->counts.num_insts > 0) EVTaccept(ckt, ckt->CKTtime); /* gtri - end - wbk - Update event queues/data for accepted timepoint */ #endif ckt->CKTstat->STAToldIter = ckt->CKTstat->STATnumIter; if(check_autostop("tran") || fabs(ckt->CKTtime - ckt->CKTfinalTime) < ckt->CKTminBreak || AlmostEqualUlps( ckt->CKTtime, ckt->CKTfinalTime, 100 ) ) { #ifdef STEPDEBUG printf(" done: time is %g, final time is %g, and tol is %g\n", ckt->CKTtime, ckt->CKTfinalTime, ckt->CKTminBreak); #endif SPfrontEnd->OUTendPlot (job->TRANplot); job->TRANplot = NULL; UPDATE_STATS(0); #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){ ckt->CKTsenInfo->SENmode = save; } #endif return(OK); } if(SPfrontEnd->IFpauseTest()) { /* user requested pause... */ UPDATE_STATS(DOING_TRAN); return(E_PAUSE); } resume: #ifdef STEPDEBUG if( (ckt->CKTdelta <= ckt->CKTfinalTime/50) && (ckt->CKTdelta <= ckt->CKTmaxStep)) { ; } else { if(ckt->CKTfinalTime/50CKTmaxStep) { (void)printf("limited by Tstop/50\n"); } else { (void)printf("limited by Tmax == %g\n",ckt->CKTmaxStep); } } #endif #ifdef HAS_PROGREP if (ckt->CKTtime == 0.) SetAnalyse( "tran init", 0); else SetAnalyse( "tran", (int)((ckt->CKTtime * 1000.) / ckt->CKTfinalTime + 0.5)); #endif ckt->CKTdelta = MIN(ckt->CKTdelta,ckt->CKTmaxStep); #ifdef XSPICE /* gtri - begin - wbk - Cut integration order if first timepoint after breakpoint */ /* if(ckt->CKTtime == g_mif_info.breakpoint.last) */ if ( AlmostEqualUlps( ckt->CKTtime, g_mif_info.breakpoint.last, 100 ) ) ckt->CKTorder = 1; /* gtri - end - wbk - Cut integration order if first timepoint after breakpoint */ #endif /* are we at a breakpoint, or indistinguishably close? */ /* if ((ckt->CKTtime == ckt->CKTbreaks[0]) || (ckt->CKTbreaks[0] - */ if ( AlmostEqualUlps( ckt->CKTtime, ckt->CKTbreaks[0], 100 ) || ckt->CKTbreaks[0] - ckt->CKTtime <= ckt->CKTdelmin) { /* first timepoint after a breakpoint - cut integration order */ /* and limit timestep to .1 times minimum of time to next breakpoint, * and previous timestep */ ckt->CKTorder = 1; #ifdef STEPDEBUG if( (ckt->CKTdelta > .1*ckt->CKTsaveDelta) || (ckt->CKTdelta > .1*(ckt->CKTbreaks[1] - ckt->CKTbreaks[0])) ) { if(ckt->CKTsaveDelta < (ckt->CKTbreaks[1] - ckt->CKTbreaks[0])) { (void)printf("limited by pre-breakpoint delta (saveDelta: %g, nxt_breakpt: %g, curr_breakpt: %g\n", ckt->CKTsaveDelta, ckt->CKTbreaks[1], ckt->CKTbreaks[0]); } else { (void)printf("limited by next breakpoint\n"); } } #endif ckt->CKTdelta = MIN(ckt->CKTdelta, .1 * MIN(ckt->CKTsaveDelta, ckt->CKTbreaks[1] - ckt->CKTbreaks[0])); if(firsttime) { /* set a breakpoint to reduce ringing of current in devices */ if (ckt->CKTmode & MODEUIC) CKTsetBreak(ckt, ckt->CKTstep); ckt->CKTdelta /= 10; #ifdef STEPDEBUG (void)printf("delta cut for initial timepoint\n"); #endif } #ifndef XSPICE /* don't want to get below delmin for no reason */ ckt->CKTdelta = MAX(ckt->CKTdelta, ckt->CKTdelmin*2.0); #endif } #ifndef XSPICE else if(ckt->CKTtime + ckt->CKTdelta >= ckt->CKTbreaks[0]) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; #ifdef STEPDEBUG (void)printf("delta cut to %g to hit breakpoint\n",ckt->CKTdelta); fflush(stdout); #endif ckt->CKTbreak = 1; /* why? the current pt. is not a bkpt. */ } #endif /* !XSPICE */ #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ if(ckt->CKTtime + ckt->CKTdelta >= g_mif_info.breakpoint.current) { /* If next time > temporary breakpoint, force it to the breakpoint */ /* And mark that timestep was set by temporary breakpoint */ ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; } else { /* Else, mark that timestep was not set by temporary breakpoint */ g_mif_info.breakpoint.last = 1.0e30; } /* gtri - end - wbk - Add Breakpoint stuff */ /* gtri - begin - wbk - Modify Breakpoint stuff */ /* Throw out any permanent breakpoint times <= current time */ for (;;) { #ifdef STEPDEBUG printf(" brk_pt: %g ckt_time: %g ckt_min_break: %g\n",ckt->CKTbreaks[0], ckt->CKTtime, ckt->CKTminBreak); #endif if(AlmostEqualUlps(ckt->CKTbreaks[0], ckt->CKTtime, 100) || ckt->CKTbreaks[0] <= ckt->CKTtime + ckt->CKTminBreak) { #ifdef STEPDEBUG printf("throwing out permanent breakpoint times <= current time (brk pt: %g)\n",ckt->CKTbreaks[0]); printf(" ckt_time: %g ckt_min_break: %g\n",ckt->CKTtime, ckt->CKTminBreak); #endif CKTclrBreak(ckt); } else { break; } } /* Force the breakpoint if appropriate */ if(ckt->CKTtime + ckt->CKTdelta > ckt->CKTbreaks[0]) { ckt->CKTbreak = 1; ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; } /* gtri - end - wbk - Modify Breakpoint stuff */ #ifdef SHARED_MODULE /* Either directly go to next time step, or modify ckt->CKTdelta depending on synchronization requirements. sharedsync() returns 0. */ sharedsync(&ckt->CKTtime, &ckt->CKTdelta, 0, ckt->CKTfinalTime, ckt->CKTdelmin, 0, &ckt->CKTstat->STATrejected, 0); #endif /* gtri - begin - wbk - Do event solution */ if(ckt->evt->counts.num_insts > 0) { /* if time = 0 and op_alternate was specified as false during */ /* dcop analysis, call any changed instances to let them */ /* post their outputs with their associated delays */ if((ckt->CKTtime == 0.0) && (! ckt->evt->options.op_alternate)) EVTiter(ckt); /* while there are events on the queue with event time <= next */ /* projected analog time, process them */ while((g_mif_info.circuit.evt_step = EVTnext_time(ckt)) <= (ckt->CKTtime + ckt->CKTdelta)) { /* Initialize temp analog bkpt to infinity */ g_mif_info.breakpoint.current = 1e30; /* Pull items off queue and process them */ EVTdequeue(ckt, g_mif_info.circuit.evt_step); EVTiter(ckt); /* If any instances have forced an earlier */ /* next analog time, cut the delta */ if(ckt->CKTbreaks[0] < g_mif_info.breakpoint.current) if(ckt->CKTbreaks[0] > ckt->CKTtime + ckt->CKTminBreak) g_mif_info.breakpoint.current = ckt->CKTbreaks[0]; if(g_mif_info.breakpoint.current < ckt->CKTtime + ckt->CKTdelta) { /* Breakpoint must be > last accepted timepoint */ /* and >= current event time */ if(g_mif_info.breakpoint.current > ckt->CKTtime + ckt->CKTminBreak && g_mif_info.breakpoint.current >= g_mif_info.circuit.evt_step) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; } } } /* end while next event time <= next analog time */ } /* end if there are event instances */ /* gtri - end - wbk - Do event solution */ #else #ifdef CLUSTER if(!CLUsync(ckt->CKTtime,&ckt->CKTdelta,0)) { printf("Sync error!\n"); exit(0); } #endif /* CLUSTER */ #ifdef SHARED_MODULE /* Either directly go to next time step, or modify ckt->CKTdelta depending on synchronization requirements. sharedsync() returns 0. */ sharedsync(&ckt->CKTtime, &ckt->CKTdelta, 0, ckt->CKTfinalTime, ckt->CKTdelmin, 0, &ckt->CKTstat->STATrejected, 0); #endif #endif for(i=5; i>=0; i--) ckt->CKTdeltaOld[i+1] = ckt->CKTdeltaOld[i]; ckt->CKTdeltaOld[0] = ckt->CKTdelta; temp = ckt->CKTstates[ckt->CKTmaxOrder+1]; for(i=ckt->CKTmaxOrder;i>=0;i--) { ckt->CKTstates[i+1] = ckt->CKTstates[i]; } ckt->CKTstates[0] = temp; /* 600 */ for (;;) { #if defined CLUSTER || defined SHARED_MODULE redostep = 1; #endif #ifdef XSPICE /* gtri - add - wbk - 4/17/91 - Fix Berkeley bug */ /* This is needed here to allow CAPask to output currents */ /* during Transient analysis. A grep for CKTcurrentAnalysis */ /* indicates that it should not hurt anything else ... */ ckt->CKTcurrentAnalysis = DOING_TRAN; /* gtri - end - wbk - 4/17/91 - Fix Berkeley bug */ #endif olddelta=ckt->CKTdelta; /* time abort? */ ckt->CKTtime += ckt->CKTdelta; #ifdef CLUSTER CLUinput(ckt); #endif ckt->CKTdeltaOld[0]=ckt->CKTdelta; NIcomCof(ckt); #ifdef PREDICTOR error = NIpred(ckt); #endif /* PREDICTOR */ save_mode = ckt->CKTmode; save_order = ckt->CKTorder; #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ /* Initialize temporary breakpoint to infinity */ g_mif_info.breakpoint.current = 1.0e30; /* gtri - end - wbk - Add Breakpoint stuff */ /* gtri - begin - wbk - add convergence problem reporting flags */ /* delta is forced to equal delmin on last attempt near line 650 */ if(ckt->CKTdelta <= ckt->CKTdelmin) ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; else ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - begin - wbk - add convergence problem reporting flags */ /* gtri - begin - wbk - Call all hybrids */ /* gtri - begin - wbk - Set evt_step */ if(ckt->evt->counts.num_insts > 0) { g_mif_info.circuit.evt_step = ckt->CKTtime; } /* gtri - end - wbk - Set evt_step */ #endif converged = NIiter(ckt,ckt->CKTtranMaxIter); #ifdef XSPICE if(ckt->evt->counts.num_insts > 0) { g_mif_info.circuit.evt_step = ckt->CKTtime; EVTcall_hybrids(ckt); } /* gtri - end - wbk - Call all hybrids */ #endif ckt->CKTstat->STATtimePts ++; ckt->CKTmode = (ckt->CKTmode&MODEUIC)|MODETRAN | MODEINITPRED; if(firsttime) { for(i=0;iCKTnumStates;i++) { ckt->CKTstate2[i] = ckt->CKTstate1[i]; ckt->CKTstate3[i] = ckt->CKTstate1[i]; } } /* txl, cpl addition */ if (converged == 1111) { return(converged); } if(converged != 0) { #ifndef CLUSTER #ifndef SHARED_MODULE ckt->CKTtime = ckt->CKTtime -ckt->CKTdelta; ckt->CKTstat->STATrejected ++; #else redostep = 1; #endif #endif ckt->CKTdelta = ckt->CKTdelta/8; #ifdef STEPDEBUG (void)printf("delta cut to %g for non-convergance\n",ckt->CKTdelta); fflush(stdout); #endif if(firsttime) { ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITTRAN; } ckt->CKTorder = 1; #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ /* Force backup if temporary breakpoint is < current time */ } else if(g_mif_info.breakpoint.current < ckt->CKTtime) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTtime -= ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; if(firsttime) { ckt->CKTmode = (ckt->CKTmode&MODEUIC)|MODETRAN | MODEINITTRAN; } ckt->CKTorder = 1; /* gtri - end - wbk - Add Breakpoint stuff */ #endif } else { if (firsttime) { #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){ save1 = ckt->CKTmode; save2 = ckt->CKTorder; ckt->CKTmode = save_mode; ckt->CKTorder = save_order; error = CKTsenDCtran (ckt); if (error) return(error); ckt->CKTmode = save1; ckt->CKTorder = save2; } #endif firsttime = 0; #if !defined CLUSTER && !defined SHARED_MODULE goto nextTime; /* no check on * first time point */ #else redostep = 0; goto chkStep; #endif } newdelta = ckt->CKTdelta; error = CKTtrunc(ckt,&newdelta); if(error) { UPDATE_STATS(DOING_TRAN); return(error); } if(newdelta > .9 * ckt->CKTdelta) { if((ckt->CKTorder == 1) && (ckt->CKTmaxOrder > 1)) { /* don't rise the order for backward Euler */ newdelta = ckt->CKTdelta; ckt->CKTorder = 2; error = CKTtrunc(ckt,&newdelta); if(error) { UPDATE_STATS(DOING_TRAN); return(error); } if(newdelta <= 1.05 * ckt->CKTdelta) { ckt->CKTorder = 1; } } /* time point OK - 630 */ ckt->CKTdelta = newdelta; #ifdef NDEV /* show a time process indicator, by Gong Ding, gdiso@ustc.edu */ if(ckt->CKTtime/ckt->CKTfinalTime*100<10.0) printf("%%%3.2lf\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100); else if(ckt->CKTtime/ckt->CKTfinalTime*100<100.0) printf("%%%4.2lf\b\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100); else printf("%%%5.2lf\b\b\b\b\b\b\b",ckt->CKTtime/ckt->CKTfinalTime*100); fflush(stdout); #endif #ifdef STEPDEBUG (void)printf( "delta set to truncation error result: %g. Point accepted at CKTtime: %g\n", ckt->CKTdelta,ckt->CKTtime); fflush(stdout); #endif #ifdef WANT_SENSE2 if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN)){ save1 = ckt->CKTmode; save2 = ckt->CKTorder; ckt->CKTmode = save_mode; ckt->CKTorder = save_order; error = CKTsenDCtran(ckt); if (error) return (error); ckt->CKTmode = save1; ckt->CKTorder = save2; } #endif #if !defined CLUSTER && !defined SHARED_MODULE /* go to 650 - trapezoidal */ goto nextTime; #else redostep = 0; goto chkStep; #endif } else { #ifndef CLUSTER #ifndef SHARED_MODULE ckt->CKTtime = ckt->CKTtime -ckt->CKTdelta; ckt->CKTstat->STATrejected ++; #else redostep = 1; #endif #endif ckt->CKTdelta = newdelta; #ifdef STEPDEBUG (void)printf( "delta set to truncation error result:point rejected\n"); #endif } } if (ckt->CKTdelta <= ckt->CKTdelmin) { if (olddelta > ckt->CKTdelmin) { ckt->CKTdelta = ckt->CKTdelmin; #ifdef STEPDEBUG (void)printf("delta at delmin\n"); #endif } else { UPDATE_STATS(DOING_TRAN); errMsg = CKTtrouble(ckt, "Timestep too small"); return(E_TIMESTEP); } } #ifdef XSPICE /* gtri - begin - wbk - Do event backup */ if(ckt->evt->counts.num_insts > 0) EVTbackup(ckt, ckt->CKTtime + ckt->CKTdelta); /* gtri - end - wbk - Do event backup */ #endif #ifdef CLUSTER chkStep: if(CLUsync(ckt->CKTtime,&ckt->CKTdelta,redostep)){ goto nextTime; } else { ckt->CKTtime -= olddelta; ckt->CKTstat->STATrejected ++; } #endif #ifdef SHARED_MODULE /* redostep == 0: Either directly go to next time step, or modify ckt->CKTdelta depending on synchronization requirements. sharedsync() returns 0. redostep == 1: No convergence, or too large truncation error. Redo the last time step by subtracting olddelta, and modify ckt->CKTdelta depending on synchronization requirements. sharedsync() returns 1. User-supplied redo request: sharedsync() may return 1 if the user has decided to do so in the callback function. */ chkStep: if(sharedsync(&ckt->CKTtime, &ckt->CKTdelta, olddelta, ckt->CKTfinalTime, ckt->CKTdelmin, redostep, &ckt->CKTstat->STATrejected, 1) == 0) goto nextTime; #endif } /* NOTREACHED */ } ngspice-26/src/spicelib/analysis/cktmcrt.c0000644000265600020320000000166412264261473020257 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTmodCrt(type,name,ckt,fast) * Create a device model of the specified type, with the given name * in the named circuit. */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" int CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name) { GENmodel *model = CKTfndMod(ckt, name); if (model) { *modfast = model; return E_EXISTS; } model = (GENmodel *) tmalloc((size_t) *(DEVices[type]->DEVmodSize)); if (!model) return E_NOMEM; model->GENmodType = type; model->GENmodName = name; model->GENnextModel = ckt->CKThead[type]; ckt->CKThead[type] = model; nghash_insert(ckt->MODnameHash, name, model); *modfast = model; return OK; } ngspice-26/src/spicelib/analysis/cktacdum.c0000644000265600020320000000177312264261473020404 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTacDump(ckt,freq,file) * this is a simple program to dump the complex rhs vector * into the rawfile. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/ifsim.h" int CKTacDump(CKTcircuit *ckt, double freq, void *plot) { double *rhsold; double *irhsold; int i; IFcomplex *data; IFvalue freqData; IFvalue valueData; rhsold = ckt->CKTrhsOld; irhsold = ckt->CKTirhsOld; freqData.rValue = freq; valueData.v.numValue = ckt->CKTmaxEqNum-1; data = TMALLOC(IFcomplex, ckt->CKTmaxEqNum - 1); valueData.v.vec.cVec = data; for (i=0;iCKTmaxEqNum-1;i++) { data[i].real = rhsold[i+1]; data[i].imag = irhsold[i+1]; } SPfrontEnd->OUTpData (plot, &freqData, &valueData); FREE(data); return(OK); } ngspice-26/src/spicelib/analysis/traninit.c0000644000265600020320000000207412264261473020434 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/trandefs.h" #include "ngspice/iferrmsg.h" /* * this used to be in setup, but we need it here now * (must be done after mode is set as below) */ int TRANinit(CKTcircuit *ckt, JOB *anal) { TRANan *job = (TRANan *) anal; ckt->CKTfinalTime = job->TRANfinalTime; ckt->CKTstep = job->TRANstep; ckt->CKTinitTime = job->TRANinitTime; ckt->CKTmaxStep = job->TRANmaxStep; /* The following code has been taken from macspice 3f4 (A. Wilson) in the file traninit.new.c - Seems interesting */ if(ckt->CKTmaxStep == 0) { if (ckt->CKTstep < ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0) ckt->CKTmaxStep = ckt->CKTstep; else ckt->CKTmaxStep = ( ckt->CKTfinalTime - ckt->CKTinitTime )/50.0; } ckt->CKTdelmin = 1e-11*ckt->CKTmaxStep; /* XXX */ ckt->CKTmode = job->TRANmode; return OK; } ngspice-26/src/spicelib/analysis/dsetparm.c0000644000265600020320000000407012264261473020421 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/distodef.h" #include "analysis.h" /* ARGSUSED */ int DsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { DISTOAN *job = (DISTOAN *) anal; NG_IGNORE(ckt); switch(which) { case D_START: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid"); job->DstartF1 = 1.0; return(E_PARMVAL); } job->DstartF1 = value->rValue; break; case D_STOP: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid"); job->DstartF1 = 1.0; return(E_PARMVAL); } job->DstopF1 = value->rValue; break; case D_STEPS: job->DnumSteps = value->iValue; break; case D_DEC: job->DstepType = DECADE; break; case D_OCT: job->DstepType = OCTAVE; break; case D_LIN: job->DstepType = LINEAR; break; case D_F2OVRF1: job->Df2ovrF1 = value->rValue; job->Df2wanted = 1; break; default: return(E_BADPARM); } return(OK); } static IFparm Dparms[] = { { "start", D_START, IF_SET|IF_REAL, "starting frequency" }, { "stop", D_STOP, IF_SET|IF_REAL, "ending frequency" }, { "numsteps", D_STEPS, IF_SET|IF_INTEGER, "number of frequencies" }, { "dec", D_DEC, IF_SET|IF_FLAG, "step by decades" }, { "oct", D_OCT, IF_SET|IF_FLAG, "step by octaves" }, { "lin", D_LIN, IF_SET|IF_FLAG, "step linearly" }, { "f2overf1", D_F2OVRF1, IF_SET|IF_REAL, "ratio of F2 to F1" }, }; SPICEanalysis DISTOinfo = { { "DISTO", "Small signal distortion analysis", NUMELEMS(Dparms), Dparms }, sizeof(DISTOAN), FREQUENCYDOMAIN, 1, DsetParm, DaskQuest, NULL, DISTOan }; ngspice-26/src/spicelib/analysis/cktaskaq.c0000644000265600020320000000123212264261473020401 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/tskdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "analysis.h" extern SPICEanalysis *analInfo[]; /* ARGSUSED */ int CKTaskAnalQ(CKTcircuit *ckt, JOB *analPtr, int parm, IFvalue *value, IFvalue *selector) { int type = analPtr->JOBtype; NG_IGNORE(selector); if((analInfo[type]->askQuest) == NULL) return(E_BADPARM); return( analInfo[type]->askQuest (ckt, analPtr, parm, value)); } ngspice-26/src/spicelib/analysis/cktterr.c0000644000265600020320000000364412264261473020266 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #define ccap (qcap+1) void CKTterr(int qcap, CKTcircuit *ckt, double *timeStep) { double volttol; double chargetol; double tol; double del; double diff[8]; double deltmp[8]; double factor=0; int i; int j; static double gearCoeff[] = { .5, .2222222222, .1363636364, .096, .07299270073, .05830903790 }; static double trapCoeff[] = { .5, .08333333333 }; volttol = ckt->CKTabstol + ckt->CKTreltol * MAX( fabs(ckt->CKTstate0[ccap]), fabs(ckt->CKTstate1[ccap])); chargetol = MAX(fabs(ckt->CKTstate0[qcap]),fabs(ckt->CKTstate1[qcap])); chargetol = ckt->CKTreltol * MAX(chargetol,ckt->CKTchgtol)/ckt->CKTdelta; tol = MAX(volttol,chargetol); /* now divided differences */ for(i=ckt->CKTorder+1;i>=0;i--) { diff[i] = ckt->CKTstates[i][qcap]; } for(i=0 ; i <= ckt->CKTorder ; i++) { deltmp[i] = ckt->CKTdeltaOld[i]; } j = ckt->CKTorder; for (;;) { for(i=0;i <= j;i++) { diff[i] = (diff[i] - diff[i+1])/deltmp[i]; } if (--j < 0) break; for(i=0;i <= j;i++) { deltmp[i] = deltmp[i+1] + ckt->CKTdeltaOld[i]; } } switch(ckt->CKTintegrateMethod) { case GEAR: factor = gearCoeff[ckt->CKTorder-1]; break; case TRAPEZOIDAL: factor = trapCoeff[ckt->CKTorder - 1] ; break; } del = ckt->CKTtrtol * tol/MAX(ckt->CKTabstol,factor * fabs(diff[0])); if(ckt->CKTorder == 2) { del = sqrt(del); } else if (ckt->CKTorder > 2) { del = exp(log(del)/ckt->CKTorder); } *timeStep = MIN(*timeStep,del); return; } ngspice-26/src/spicelib/analysis/cktsopt.c0000644000265600020320000003072612264261473020300 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* * CKTsetOpt(ckt,opt,value) * set the specified 'opt' to have value 'value' in the * given circuit 'ckt'. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/optdefs.h" #include "ngspice/tskdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "analysis.h" #ifdef XSPICE /* gtri - begin - wbk - add includes */ #include "ngspice/mif.h" /* gtri - end - wbk - add includes */ #endif /* ARGSUSED */ int CKTsetOpt(CKTcircuit *ckt, JOB *anal, int opt, IFvalue *val) { TSKtask *task = (TSKtask *)anal; NG_IGNORE(ckt); switch(opt) { case OPT_NOOPITER: task->TSKnoOpIter = (val->iValue != 0); break; case OPT_GMIN: task->TSKgmin = val->rValue; break; case OPT_GSHUNT: task->TSKgshunt = val->rValue; break; case OPT_RELTOL: task->TSKreltol = val->rValue; break; case OPT_ABSTOL: task->TSKabstol = val->rValue; break; case OPT_VNTOL: task->TSKvoltTol = val->rValue; break; case OPT_TRTOL: task->TSKtrtol = val->rValue; break; case OPT_CHGTOL: task->TSKchgtol = val->rValue; break; case OPT_PIVTOL: task->TSKpivotAbsTol = val->rValue; break; case OPT_PIVREL: task->TSKpivotRelTol = val->rValue; break; case OPT_TNOM: task->TSKnomTemp = val->rValue + CONSTCtoK; /* Centegrade to Kelvin */ break; case OPT_TEMP: task->TSKtemp = val->rValue + CONSTCtoK; /* Centegrade to Kelvin */ break; case OPT_ITL1: task->TSKdcMaxIter = val->iValue; break; case OPT_ITL2: task->TSKdcTrcvMaxIter = val->iValue; break; case OPT_ITL3: break; case OPT_ITL4: task->TSKtranMaxIter = val->iValue; break; case OPT_ITL5: break; case OPT_SRCSTEPS: task->TSKnumSrcSteps = val->iValue; break; case OPT_GMINSTEPS: task->TSKnumGminSteps = val->iValue; break; case OPT_GMINFACT: task->TSKgminFactor = val->rValue; break; case OPT_DEFM: task->TSKdefaultMosM = val->rValue; break; case OPT_DEFL: task->TSKdefaultMosL = val->rValue; break; case OPT_DEFW: task->TSKdefaultMosW = val->rValue; break; case OPT_DEFAD: task->TSKdefaultMosAD = val->rValue; break; case OPT_DEFAS: task->TSKdefaultMosAD = val->rValue; break; case OPT_BYPASS: task->TSKbypass = val->iValue; break; case OPT_MAXORD: task->TSKmaxOrder = val->iValue; /* Check options method and maxorder for consistency */ if (task->TSKmaxOrder < 1) { task->TSKmaxOrder = 1; fprintf(stderr,"\nWarning -- Option maxord < 1 not allowed in ngspice\nSet to 1\n\n"); } else if (task->TSKmaxOrder > 6) { task->TSKmaxOrder = 6; fprintf(stderr,"\nWarning -- Option maxord > 6 not allowed in ngspice\nSet to 6\n\n"); } break; case OPT_OLDLIMIT: task->TSKfixLimit = (val->iValue != 0); break; case OPT_MINBREAK: task->TSKminBreak = val->rValue; break; case OPT_METHOD: if(strncmp(val->sValue,"trap", 4)==0) task->TSKintegrateMethod=TRAPEZOIDAL; else if (strcmp(val->sValue,"gear")==0) task->TSKintegrateMethod=GEAR; else return(E_METHOD); break; case OPT_TRYTOCOMPACT: task->TSKtryToCompact = (val->iValue != 0); break; case OPT_BADMOS3: task->TSKbadMos3 = (val->iValue != 0); break; case OPT_KEEPOPINFO: task->TSKkeepOpInfo = (val->iValue != 0); break; case OPT_COPYNODESETS: task->TSKcopyNodesets = (val->iValue != 0); break; case OPT_NODEDAMPING: task->TSKnodeDamping = (val->iValue != 0); break; case OPT_ABSDV: task->TSKabsDv = val->rValue; break; case OPT_RELDV: task->TSKrelDv = val->rValue; break; case OPT_NOOPAC: task->TSKnoopac = (val->iValue != 0); break; /* gtri - begin - wbk - add new options */ #ifdef XSPICE case OPT_EVT_MAX_OP_ALTER: ckt->evt->limits.max_op_alternations = val->iValue; break; case OPT_EVT_MAX_EVT_PASSES: ckt->evt->limits.max_event_passes = val->iValue; break; case OPT_ENH_NOOPALTER: ckt->evt->options.op_alternate = MIF_FALSE; break; case OPT_ENH_RAMPTIME: ckt->enh->ramp.ramptime = val->rValue; break; case OPT_ENH_CONV_LIMIT: ckt->enh->conv_limit.enabled = MIF_TRUE; break; case OPT_ENH_CONV_STEP: ckt->enh->conv_limit.step = val->rValue; ckt->enh->conv_limit.enabled = MIF_TRUE; break; case OPT_ENH_CONV_ABS_STEP: ckt->enh->conv_limit.abs_step = val->rValue; ckt->enh->conv_limit.enabled = MIF_TRUE; break; case OPT_MIF_AUTO_PARTIAL: g_mif_info.auto_partial.global = MIF_TRUE; break; case OPT_ENH_RSHUNT: if(val->rValue > 1.0e-30) { ckt->enh->rshunt_data.enabled = MIF_TRUE; ckt->enh->rshunt_data.gshunt = 1.0 / val->rValue; } else { printf("WARNING - Rshunt option too small. Ignored.\n"); } break; #endif /* gtri - end - wbk - add new options */ default: return(-1); } return(0); } static IFparm OPTtbl[] = { #ifdef XSPICE /* gtri - begin - wbk - add new options */ { "maxopalter", OPT_EVT_MAX_OP_ALTER, IF_SET|IF_INTEGER, "Maximum analog/event alternations in DCOP" }, { "maxevtiter", OPT_EVT_MAX_EVT_PASSES, IF_SET|IF_INTEGER, "Maximum event iterations at analysis point" }, { "noopalter", OPT_ENH_NOOPALTER, IF_SET|IF_FLAG, "Do not do analog/event alternation in DCOP" }, { "ramptime", OPT_ENH_RAMPTIME, IF_SET|IF_REAL, "Transient analysis supply ramping time" }, { "convlimit", OPT_ENH_CONV_LIMIT, IF_SET|IF_FLAG, "Enable convergence assistance on code models" }, { "convstep", OPT_ENH_CONV_STEP, IF_SET|IF_REAL, "Fractional step allowed by code model inputs between iterations" }, { "convabsstep", OPT_ENH_CONV_ABS_STEP, IF_SET|IF_REAL, "Absolute step allowed by code model inputs between iterations" }, { "autopartial", OPT_MIF_AUTO_PARTIAL, IF_SET|IF_FLAG, "Use auto-partial computation for all models" }, { "rshunt", OPT_ENH_RSHUNT, IF_SET|IF_REAL, "Shunt resistance from analog nodes to ground" }, /* gtri - end - wbk - add new options */ #endif { "noopiter", OPT_NOOPITER,IF_SET|IF_FLAG,"Go directly to gmin stepping" }, { "gmin", OPT_GMIN,IF_SET|IF_REAL,"Minimum conductance" }, { "gshunt", OPT_GSHUNT,IF_SET|IF_REAL,"Shunt conductance" }, { "reltol", OPT_RELTOL,IF_SET|IF_REAL ,"Relative error tolerence"}, { "abstol", OPT_ABSTOL,IF_SET|IF_REAL,"Absolute error tolerence" }, { "vntol", OPT_VNTOL,IF_SET|IF_REAL,"Voltage error tolerence" }, { "trtol", OPT_TRTOL,IF_SET|IF_REAL,"Truncation error overestimation factor" }, { "chgtol", OPT_CHGTOL,IF_SET|IF_REAL, "Charge error tolerence" }, { "pivtol", OPT_PIVTOL,IF_SET|IF_REAL, "Minimum acceptable pivot" }, { "pivrel", OPT_PIVREL,IF_SET|IF_REAL, "Minimum acceptable ratio of pivot" }, { "tnom", OPT_TNOM,IF_SET|IF_ASK|IF_REAL, "Nominal temperature" }, { "temp", OPT_TEMP,IF_SET|IF_ASK|IF_REAL, "Operating temperature" }, { "itl1", OPT_ITL1,IF_SET|IF_INTEGER,"DC iteration limit" }, { "itl2", OPT_ITL2,IF_SET|IF_INTEGER,"DC transfer curve iteration limit" }, { "itl3", OPT_ITL3, IF_INTEGER,"Lower transient iteration limit"}, { "itl4", OPT_ITL4,IF_SET|IF_INTEGER,"Upper transient iteration limit" }, { "itl5", OPT_ITL5, IF_INTEGER,"Total transient iteration limit"}, { "itl6", OPT_SRCSTEPS, IF_SET|IF_INTEGER,"number of source steps"}, { "srcsteps", OPT_SRCSTEPS, IF_SET|IF_INTEGER,"number of source steps"}, { "gminsteps", OPT_GMINSTEPS, IF_SET|IF_INTEGER,"number of Gmin steps"}, { "gminfactor", OPT_GMINFACT, IF_SET|IF_REAL,"factor per Gmin step"}, { "acct", 0, IF_FLAG ,"Print accounting"}, { "list", 0, IF_FLAG, "Print a listing" }, { "nomod", 0, IF_FLAG, "Don't print a model summary" }, { "nopage", 0, IF_FLAG, "Don't insert page breaks" }, { "node", 0, IF_FLAG,"Print a node connection summary" }, { "opts", 0, IF_FLAG, "Print a list of the options" }, { "oldlimit", OPT_OLDLIMIT, IF_SET|IF_FLAG, "use SPICE2 MOSfet limiting" }, { "numdgt", 0, IF_INTEGER, "Set number of digits printed"}, { "cptime", 0, IF_REAL, "Total cpu time in seconds" }, { "limtim", 0, IF_INTEGER, "Time to reserve for output" }, { "limpts", 0,IF_INTEGER,"Maximum points per analysis"}, { "lvlcod", 0, IF_INTEGER,"Generate machine code" }, { "lvltim", 0, IF_INTEGER,"Type of timestep control" }, { "method", OPT_METHOD, IF_SET|IF_STRING,"Integration method" }, { "maxord", OPT_MAXORD, IF_SET|IF_INTEGER,"Maximum integration order" }, { "defm", OPT_DEFM,IF_SET|IF_REAL,"Default MOSfet Multiplier" }, { "defl", OPT_DEFL,IF_SET|IF_REAL,"Default MOSfet length" }, { "defw", OPT_DEFW,IF_SET|IF_REAL,"Default MOSfet width" }, { "minbreak", OPT_MINBREAK,IF_SET|IF_REAL,"Minimum time between breakpoints" }, { "defad", OPT_DEFAD,IF_SET|IF_REAL,"Default MOSfet area of drain" }, { "defas", OPT_DEFAS,IF_SET|IF_REAL,"Default MOSfet area of source" }, { "bypass",OPT_BYPASS,IF_SET|IF_INTEGER,"Allow bypass of unchanging elements"}, { "totiter", OPT_ITERS, IF_ASK|IF_INTEGER,"Total iterations" }, { "traniter", OPT_TRANIT, IF_ASK|IF_INTEGER ,"Transient iterations"}, { "equations", OPT_EQNS, IF_ASK|IF_INTEGER,"Circuit Equations" }, { "originalnz", OPT_ORIGNZ, IF_ASK|IF_INTEGER,"Circuit original non-zeroes" }, { "fillinnz", OPT_FILLNZ, IF_ASK|IF_INTEGER,"Circuit fill-in non-zeroes" }, { "totalnz", OPT_TOTALNZ, IF_ASK|IF_INTEGER,"Circuit total non-zeroes" }, { "tranpoints", OPT_TRANPTS, IF_ASK|IF_INTEGER,"Transient timepoints" }, { "accept", OPT_TRANACCPT, IF_ASK|IF_INTEGER,"Accepted timepoints" }, { "rejected", OPT_TRANRJCT, IF_ASK|IF_INTEGER,"Rejected timepoints" }, { "time", OPT_TOTANALTIME, IF_ASK|IF_REAL,"Total analysis time" }, { "loadtime", OPT_LOADTIME, IF_ASK|IF_REAL,"Matrix load time" }, { "synctime", OPT_SYNCTIME, IF_ASK|IF_REAL,"Matrix synchronize time" }, { "reordertime", OPT_REORDTIME, IF_ASK|IF_REAL,"Matrix reorder time" }, { "factortime", OPT_DECOMP, IF_ASK|IF_REAL,"Matrix factor time" }, { "solvetime", OPT_SOLVE, IF_ASK|IF_REAL,"Matrix solve time" }, { "trantime", OPT_TRANTIME, IF_ASK|IF_REAL,"Transient analysis time" }, { "tranloadtime", OPT_TRANLOAD, IF_ASK|IF_REAL,"Transient load time" }, { "transynctime", OPT_TRANSYNC, IF_ASK|IF_REAL,"Transient sync time" }, { "tranfactortime", OPT_TRANDECOMP,IF_ASK|IF_REAL,"Transient factor time" }, { "transolvetime", OPT_TRANSOLVE, IF_ASK|IF_REAL,"Transient solve time" }, { "trantrunctime", OPT_TRANTRUNC, IF_ASK|IF_REAL,"Transient trunc time" }, { "trancuriters", OPT_TRANCURITER, IF_ASK|IF_INTEGER, "Transient iters per point" }, { "actime", OPT_ACTIME, IF_ASK|IF_REAL,"AC analysis time" }, { "acloadtime", OPT_ACLOAD, IF_ASK|IF_REAL,"AC load time" }, { "acsynctime", OPT_ACSYNC, IF_ASK|IF_REAL,"AC sync time" }, { "acfactortime", OPT_ACDECOMP,IF_ASK|IF_REAL,"AC factor time" }, { "acsolvetime", OPT_ACSOLVE, IF_ASK|IF_REAL,"AC solve time" }, { "trytocompact", OPT_TRYTOCOMPACT, IF_SET|IF_FLAG, "Try compaction for LTRA lines" }, { "badmos3", OPT_BADMOS3, IF_SET|IF_FLAG, "use old mos3 model (discontinuous with respect to kappa)" }, { "keepopinfo", OPT_KEEPOPINFO, IF_SET|IF_FLAG, "Record operating point for each small-signal analysis" }, { "copynodesets", OPT_COPYNODESETS, IF_SET|IF_FLAG, "Copy nodesets from device terminals to internal nodes" }, { "nodedamping", OPT_NODEDAMPING, IF_SET|IF_FLAG, "Limit iteration to iteration node voltage change" }, { "absdv", OPT_ABSDV, IF_SET|IF_REAL, "Maximum absolute iter-iter node voltage change" }, { "reldv", OPT_RELDV, IF_SET|IF_REAL, "Maximum relative iter-iter node voltage change" }, { "noopac", OPT_NOOPAC, IF_SET|IF_FLAG, "No op calculation in ac if circuit is linear" } }; int OPTcount = NUMELEMS(OPTtbl); SPICEanalysis OPTinfo = { { "options", "Task option selection", NUMELEMS(OPTtbl), OPTtbl }, 0, /* no size associated with options */ NODOMAIN, 0, CKTsetOpt, CKTacct, NULL, NULL }; ngspice-26/src/spicelib/analysis/ChangeLog0000644000265600020320000000611312264261473020210 0ustar andreasadmin2002-01-03 Paolo Nenzi * Added some code that adds new functionalities if ngspice is compiled for Windows (Holger Vogt patch) I think that the new code interactively displays the percent done of the analysis. 2001-01-23 Paolo Nenzi * noisean.c: patched the code with the new one in the bsim4.1.0 distribution. The new noisean.c put some code between #ifdef INT_NOISE. 2000-01-21 Paolo Nenzi * cktsgen.c: corrected a bug that caused segfault on sensitivity analysis. 2000-07-28 Arno W. Peters * cktpzstr.c: Reversed a patch that went in between ng-spice-0.2 and ng-spice-0.3 that eliminated the following warnings: 'suggest parentheses around && within ||'. The parenthesis were not placed correctly, leading to incorrect behaviour of the pole-zero analysis. 2000-05-22 Paolo Nenzi * cktpzstr.c, cktsens.c: Applied Widlok patches. 2000-04-04 Paolo Nenzi * noisean.c: Merged the previous code with the new one included in bsim4 distribution. This code originated from Weidong Lu (bsim group). 1999-12-20 Paolo Nenzi * noisean.c: Bug: The ac noise analysis in Spice3f4 has a serious bug. In interactive mode it fails to reproduce frequency dependence known to exist. In batch (Spice2) mode, it works only if a corresponding ac analysis has been run first. Fix: This bug is fixed by providing a call to CKTload() in noisean.c as shown by the source code patch which is attached below. 1999-09-08 Emmanuel Rouat * ckt.h: created (and included in Makefile.am) 1999-09-07 Arno * cktpzstr.c: reformatted and corrected(?) complex if condition. 1999-08-28 Emmanuel Rouat * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-27 Paolo Nenzi * Removed GENERIC and #include "suffix.h" from all the files. GENERIC has been replaced by void. ANSIfied all functions with protoize. 1999-08-26 Paolo Nenzi * cktacct.c: added #include "spmatrix.h" to avoid implicit declaration warning at compile time. * dctran.c: ansified and substituted void with void. * tranasq.c: same as before. * traninit.c: same as before. * transetp.c: same as before. 1999-08-08 Emmanuel Rouat * Removed all HAS_SHORTMACRO and HAS_FLATINCLUDES code in directory * cktdest.c (and other files): changed HAS_SENSE2 in WANT_SENSE2 1999-08-04 Paolo Nenzi * changed dctrcurv.c: added code for temperature sweeps and resistance sweeps. Now you can execute .dc temp to do a temp sweep, temp is the keyword for temp sweeps (The code comes from a patch supplied by Serban-Mihai Popescu . To do a resitance sweep just insert resistor name to the .cd line:.dc vin -5 5 1 rin 100 1000 10. Resistance and temperature sweeps can be nested. ngspice-26/src/spicelib/analysis/ckttyplk.c0000644000265600020320000000114412264261473020446 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* look up the 'type' in the device description struct and return the * appropriate strchr for the device found, or -1 for not found */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" int CKTtypelook(char *type) { int i; for(i=0;iDEVpublic.name)) { /*found the device - return it */ return(i); } } return(-1); } ngspice-26/src/spicelib/analysis/cktdlti.c0000644000265600020320000000075012264261473020241 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTdltInst * delete the specified instance - not yet supported in spice */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTdltInst(CKTcircuit *ckt, void *instance) { NG_IGNORE(ckt); NG_IGNORE(instance); return(E_UNSUPP); } ngspice-26/src/spicelib/analysis/cktdelt.c0000644000265600020320000000111312264261473020227 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/tskdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTdelTask(CKTcircuit *ckt, TSKtask *task) { JOB *job; JOB *old=NULL; NG_IGNORE(ckt); for(job = task->jobs; job; job=job->JOBnextJob){ if(old) FREE(old); old=job; } if(old)FREE(old); FREE(task); return(OK); } ngspice-26/src/spicelib/analysis/cktdest.c0000644000265600020320000001566012264261473020252 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTdestroy(ckt) * this is a driver program to iterate through all the various * destroy functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #ifdef XSPICE static int evt_dest(Evt_Ckt_Data_t *evt); #endif int CKTdestroy(CKTcircuit *ckt) { int i; CKTnode *node; CKTnode *nnode; #ifdef WANT_SENSE2 if(ckt->CKTsenInfo){ if(ckt->CKTrhsOp) FREE(ckt->CKTrhsOp); if(ckt->CKTsenRhs) FREE(ckt->CKTsenRhs); if(ckt->CKTseniRhs) FREE(ckt->CKTseniRhs); SENdestroy(ckt->CKTsenInfo); } #endif for (i=0;iDEVdestroy && ckt->CKThead[i] ) { DEVices[i]->DEVdestroy (&(ckt->CKThead[i])); } } for(i=0;i<=ckt->CKTmaxOrder+1;i++){ FREE(ckt->CKTstates[i]); } if(ckt->CKTmatrix) { SMPdestroy(ckt->CKTmatrix); ckt->CKTmatrix = NULL; } FREE(ckt->CKTbreaks); for(node = ckt->CKTnodes; node; ) { nnode = node->next; FREE(node); node = nnode; } ckt->CKTnodes = NULL; ckt->CKTlastNode = NULL; FREE(ckt->CKTrhs); FREE(ckt->CKTrhsOld); FREE(ckt->CKTrhsSpare); FREE(ckt->CKTirhs); FREE(ckt->CKTirhsOld); FREE(ckt->CKTirhsSpare); FREE(ckt->CKTstat->STATdevNum); FREE(ckt->CKTstat); FREE(ckt->CKThead); #ifdef XSPICE evt_dest(ckt->evt); FREE(ckt->enh); FREE(ckt->evt); #endif nghash_free(ckt->DEVnameHash, NULL, NULL); nghash_free(ckt->MODnameHash, NULL, NULL); FREE(ckt); return(OK); } #ifdef XSPICE static int evt_dest(Evt_Ckt_Data_t *evt) { int i; /* Get temporary pointers for fast access */ Evt_Output_Queue_t *output_queue; Evt_Node_Queue_t *node_queue; Evt_Inst_Queue_t *inst_queue; Evt_Output_Info_t **output_table; Evt_Node_Info_t **node_table; Evt_Port_Info_t **port_table; Evt_State_Data_t *state_data; Evt_State_t *statenext, *state; Evt_Node_Data_t *node_data; Evt_Node_t *rhs, *rhsnext; Evt_Node_t *node, *nodenext; Evt_Msg_Data_t *msg_data; Evt_Msg_t *msg, *msgnext; Evt_Inst_Event_t *here; Evt_Inst_Event_t *next; Evt_Output_Event_t *outhere; Evt_Output_Event_t *outnext; /* Exit immediately if no event-driven instances in circuit */ if (evt->counts.num_insts == 0) return(OK); output_queue = &(evt->queue.output); node_queue = &(evt->queue.node); inst_queue = &(evt->queue.inst); output_table = evt->info.output_table; node_table = evt->info.node_table; port_table = evt->info.port_table; node_data = evt->data.node; state_data = evt->data.state; msg_data = evt->data.msg; /* instance queue */ for (i = 0; i < evt->counts.num_insts; i++) { here = inst_queue->head[i]; while (here) { next = here->next; tfree(here); here = next; } } tfree(inst_queue->head); tfree(inst_queue->current); tfree(inst_queue->last_step); tfree(inst_queue->free); tfree(inst_queue->modified_index); tfree(inst_queue->modified); tfree(inst_queue->pending_index); tfree(inst_queue->pending); tfree(inst_queue->to_call_index); tfree(inst_queue->to_call); /* node queue */ tfree(node_queue->to_eval_index); tfree(node_queue->to_eval); tfree(node_queue->changed_index); tfree(node_queue->changed); /* output queue */ for (i = 0; i < evt->counts.num_outputs; i++) { outhere = output_queue->head[i]; while (outhere) { outnext = outhere->next; tfree(outhere); outhere = outnext; } } tfree(output_queue->head); tfree(output_queue->current); tfree(output_queue->last_step); tfree(output_queue->free); tfree(output_queue->modified_index); tfree(output_queue->modified); tfree(output_queue->pending_index); tfree(output_queue->pending); tfree(output_queue->changed_index); tfree(output_queue->changed); /* state data */ /* only if digital states are there */ if (state_data) { for (i = 0; i < evt->counts.num_insts; i++) { state = state_data->head[i]; while (state) { statenext = state->next; tfree(state->block); tfree(state); state = statenext; } } tfree(state_data->head); tfree(state_data->tail); tfree(state_data->last_step); tfree(state_data->free); tfree(state_data->modified); tfree(state_data->modified_index); tfree(state_data->total_size); /* FIXME: more on desc ? */ tfree(state_data->desc); } /* node data */ /* only if digital nodes are there */ if (node_data) { for (i = 0; i < evt->counts.num_nodes; i++) { node = node_data->head[i]; while (node) { nodenext = node->next; tfree(node); node = nodenext; } } tfree(node_data->head); tfree(node_data->tail); tfree(node_data->last_step); tfree(node_data->free); tfree(node_data->modified); tfree(node_data->modified_index); for (i = 0; i < evt->counts.num_nodes; i++) { rhs = &(node_data->rhs[i]); while (rhs) { rhsnext = rhs->next; tfree(rhs->inverted_value); tfree(rhs->output_value); tfree(rhs->node_value); rhs = rhsnext; } } tfree(node_data->rhs); for (i = 0; i < evt->counts.num_nodes; i++) { rhs = &(node_data->rhsold[i]); while (rhs) { rhsnext = rhs->next; tfree(rhs->inverted_value); tfree(rhs->output_value); tfree(rhs->node_value); rhs = rhsnext; } } tfree(node_data->rhsold); tfree(node_data->total_load); } /* msg data */ if (msg_data) { for (i = 0; i < evt->counts.num_ports; i++) { msg = msg_data->head[i]; while (msg) { msgnext = msg->next; tfree(msg); msg = msgnext; } } tfree(msg_data->head); tfree(msg_data->tail); tfree(msg_data->last_step); tfree(msg_data->free); tfree(msg_data->modified); tfree(msg_data->modified_index); } /* still to care for : * output_table * node_table * port_table */ return(OK); } #endif ngspice-26/src/spicelib/analysis/cktpzset.c0000644000265600020320000000415412264261473020454 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* CKTpzSetup(ckt) * iterate through all the various * pzSetup functions provided for the circuit elements in the * given circuit, setup ... */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" int CKTpzSetup(CKTcircuit *ckt, int type) { PZAN *job = (PZAN *) ckt->CKTcurJob; SMPmatrix *matrix; int error; int i, temp, solution_col, balance_col; int input_pos, input_neg, output_pos, output_neg; NIdestroy(ckt); error = NIinit(ckt); if (error) return(error); matrix = ckt->CKTmatrix; /* Really awful . . . */ ckt->CKTnumStates = 0; for (i = 0; i < DEVmaxnum; i++) { if (DEVices[i] && DEVices[i]->DEVpzSetup != NULL && ckt->CKThead[i] != NULL) { error = DEVices[i]->DEVpzSetup (matrix, ckt->CKThead[i], ckt, &ckt->CKTnumStates); if (error != OK) return(error); } } solution_col = 0; balance_col = 0; input_pos = job->PZin_pos; input_neg = job->PZin_neg; if (type == PZ_DO_ZEROS) { /* Vo/Ii in Y */ output_pos = job->PZout_pos; output_neg = job->PZout_neg; } else if (job->PZinput_type == PZ_IN_VOL) { /* Vi/Ii in Y */ output_pos = job->PZin_pos; output_neg = job->PZin_neg; } else { /* Denominator */ output_pos = 0; output_neg = 0; input_pos = 0; input_neg = 0; } if (output_pos) { solution_col = output_pos; if (output_neg) balance_col = output_neg; } else { solution_col = output_neg; temp = input_pos; input_pos = input_neg; input_neg = temp; } if (input_pos) job->PZdrive_pptr = SMPmakeElt(matrix, input_pos, solution_col); else job->PZdrive_pptr = NULL; if (input_neg) job->PZdrive_nptr = SMPmakeElt(matrix, input_neg, solution_col); else job->PZdrive_nptr = NULL; job->PZsolution_col = solution_col; job->PZbalance_col = balance_col; job->PZnumswaps = 1; error = NIreinit(ckt); if (error) return(error); return OK; } ngspice-26/src/spicelib/analysis/cktnewan.c0000644000265600020320000000201612264261473020412 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/tskdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "analysis.h" extern SPICEanalysis *analInfo[]; /* ARGSUSED */ int CKTnewAnal(CKTcircuit *ckt, int type, IFuid name, JOB **analPtr, TSKtask *taskPtr) { NG_IGNORE(ckt); if(type==0) { /* special case for analysis type 0 == option card */ *analPtr = &(taskPtr->taskOptions); /* pointer to the task itself */ (*analPtr)->JOBname = name; (*analPtr)->JOBtype = type; return(OK); /* doesn't need to be created */ } *analPtr = (JOB *) tmalloc((size_t) analInfo[type]->size); if(*analPtr==NULL) return(E_NOMEM); (*analPtr)->JOBname = name; (*analPtr)->JOBtype = type; (*analPtr)->JOBnextJob = taskPtr->jobs; taskPtr->jobs = *analPtr; return(OK); } ngspice-26/src/spicelib/analysis/cktsetap.c0000644000265600020320000000123012264261473020413 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/tskdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "analysis.h" extern SPICEanalysis *analInfo[]; /* ARGSUSED */ int CKTsetAnalPm(CKTcircuit *ckt, JOB *analPtr, int parm, IFvalue *value, IFvalue *selector) { int type = analPtr->JOBtype; NG_IGNORE(selector); if((analInfo[type]->setParm)==NULL) return(E_BADPARM); return( analInfo[type]->setParm (ckt, analPtr, parm, value) ); } ngspice-26/src/spicelib/analysis/cktbkdum.c0000644000265600020320000000074212264261473020410 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTbreakDump(ckt) - dump the breakpoint table associated with * the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" void CKTbreakDump(CKTcircuit *ckt) { int i; for(i=0;iCKTbreakSize;i++) { (void)printf("breakpoint table entry %d is %g\n",i,ckt->CKTbreaks[i]); } } ngspice-26/src/spicelib/analysis/cktpzld.c0000644000265600020320000000231312264261473020253 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/pzdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" int CKTpzLoad(CKTcircuit *ckt, SPcomplex *s) { PZAN *job = (PZAN *) ckt->CKTcurJob; int error; int i; for (i = 0; i <= SMPmatSize(ckt->CKTmatrix); i++) { ckt->CKTrhs[i] = 0.0; ckt->CKTirhs[i] = 0.0; } SMPcClear(ckt->CKTmatrix); for (i = 0; i < DEVmaxnum; i++) { if (DEVices[i] && DEVices[i]->DEVpzLoad != NULL && ckt->CKThead[i] != NULL) { error = DEVices[i]->DEVpzLoad (ckt->CKThead[i], ckt, s); if(error) return(error); } } if (job->PZbalance_col && job->PZsolution_col) { SMPcAddCol(ckt->CKTmatrix, job->PZbalance_col, job->PZsolution_col); /* AC sources ?? XXX */ } if (job->PZsolution_col) { SMPcZeroCol(ckt->CKTmatrix, job->PZsolution_col); } /* Driving function (current source) */ if (job->PZdrive_pptr) *job->PZdrive_pptr = 1.0; if (job->PZdrive_nptr) *job->PZdrive_nptr = -1.0; return(OK); } ngspice-26/src/spicelib/analysis/psssetp.c0000644000265600020320000000413012264261473020300 0ustar andreasadmin/********** Author: 2010-05 Stefano Perticaroli ``spertica'' **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/pssdefs.h" #include "analysis.h" /* ARGSUSED */ int PSSsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { PSSan *job = (PSSan *) anal; NG_IGNORE(ckt); switch(which) { case GUESSED_FREQ: job->PSSguessedFreq = value->rValue; break; case OSC_NODE: job->PSSoscNode = value->nValue; break; case STAB_TIME: job->PSSstabTime = value->rValue; break; case PSS_POINTS: job->PSSpoints = value->iValue; break; case PSS_HARMS: job->PSSharms = value->iValue; break; case PSS_UIC: if(value->iValue) { job->PSSmode |= MODEUIC; } break; case SC_ITER: job->sc_iter = value->iValue; break; case STEADY_COEFF: job->steady_coeff = value->rValue; break; default: return(E_BADPARM); } return(OK); } static IFparm PSSparms[] = { { "fguess", GUESSED_FREQ, IF_SET|IF_REAL, "guessed frequency" }, { "oscnode", OSC_NODE, IF_SET|IF_STRING, "oscillation node" }, { "stabtime", STAB_TIME, IF_SET|IF_REAL, "stabilization time" }, { "points", PSS_POINTS, IF_SET|IF_INTEGER, "pick equispaced number of time points in PSS" }, { "harmonics", PSS_HARMS, IF_SET|IF_INTEGER, "consider only given number of harmonics in PSS from DC" }, { "uic", PSS_UIC, IF_SET|IF_INTEGER, "use initial conditions (1 true - 0 false)" }, { "sc_iter", SC_ITER, IF_SET|IF_INTEGER, "maxmimum number of shooting cycle iterations" }, { "steady_coeff", STEADY_COEFF, IF_SET|IF_INTEGER, "set steady coefficient for convergence test" } }; SPICEanalysis PSSinfo = { { "PSS", "Periodic Steady State analysis", sizeof(PSSparms)/sizeof(IFparm), PSSparms }, sizeof(PSSan), TIMEDOMAIN, 1, PSSsetParm, PSSaskQuest, PSSinit, DCpss }; ngspice-26/src/spicelib/analysis/pzaskq.c0000644000265600020320000000321112264261473020107 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/pzdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int PZaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { PZAN *job = (PZAN *) anal; switch(which) { case PZ_NODEI: value->nValue = CKTnum2nod(ckt, job->PZin_pos); break; case PZ_NODEG: value->nValue = CKTnum2nod(ckt, job->PZin_neg); break; case PZ_NODEJ: value->nValue = CKTnum2nod(ckt, job->PZout_pos); break; case PZ_NODEK: value->nValue = CKTnum2nod(ckt, job->PZout_neg); break; case PZ_V: if (job->PZinput_type == PZ_IN_VOL) { value->iValue=1; } else { value->iValue=0; } break; case PZ_I: if (job->PZinput_type == PZ_IN_CUR) { value->iValue=1; } else { value->iValue=0; } break; case PZ_POL: if (job->PZwhich == PZ_DO_POLES) { value->iValue=1; } else { value->iValue=0; } break; case PZ_ZER: if (job->PZwhich == PZ_DO_ZEROS) { value->iValue=1; } else { value->iValue=0; } break; case PZ_PZ: if (job->PZwhich == (PZ_DO_POLES | PZ_DO_ZEROS)) { value->iValue=1; } else { value->iValue=0; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/Makefile.am0000644000265600020320000000323512264261473020474 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libckt.la libckt_la_SOURCES = \ acan.c \ acaskq.c \ acsetp.c \ analysis.c \ analysis.h \ cktacct.c \ cktacdum.c \ cktaskaq.c \ cktasknq.c \ cktbkdum.c \ cktclrbk.c \ cktdelt.c \ cktdest.c \ cktdisto.c \ cktdlti.c \ cktdltm.c \ cktdltn.c \ cktdojob.c \ cktdump.c \ cktncdump.c \ cktfbran.c \ cktfnda.c \ cktfndm.c \ cktfnode.c \ cktftask.c \ cktgrnd.c \ ckti2nod.c \ cktic.c \ cktlnkeq.c \ cktload.c \ cktmapn.c \ cktmask.c \ cktmcrt.c \ cktmkcur.c \ cktmknod.c \ cktmkvol.c \ cktmpar.c \ cktnames.c \ cktnewan.c \ cktneweq.c \ cktnewn.c \ cktnodn.c \ cktnoise.c \ cktntask.c \ cktnum2n.c \ cktop.c \ cktparam.c \ cktpmnam.c \ cktpname.c \ cktpzld.c \ cktpzset.c \ cktpzstr.c \ cktsens.c \ cktsetap.c \ cktsetbk.c \ cktsetnp.c \ cktsetup.c \ cktsgen.c \ cktsopt.c \ ckttemp.c \ cktterr.c \ ckttroub.c \ ckttrunc.c \ ckttyplk.c \ daskq.c \ dcoaskq.c \ dcop.c \ dcosetp.c \ dctaskq.c \ dctran.c \ dctrcurv.c \ dctsetp.c \ distoan.c \ dkerproc.c \ dloadfns.c \ dsetparm.c \ naskq.c \ nevalsrc.c \ ninteg.c \ noisean.c \ nsetparm.c \ pzan.c \ pzaskq.c \ pzsetp.c \ sensaskq.c \ senssetp.c \ tfanal.c \ tfaskq.c \ tfsetp.c \ tranaskq.c \ traninit.c \ transetp.c \ cluster.c if PSS_WANTED libckt_la_SOURCES += \ dcpss.c \ pssaskq.c \ pssinit.c \ psssetp.c endif AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/analysis/cktsens.c0000644000265600020320000004274712264261473020271 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Modified: 2000 AlanFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/spmatrix.h" #include "ngspice/gendefs.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/sensdefs.h" #include "ngspice/sensgen.h" /* #define ASDEBUG */ #ifdef ASDEBUG #define DEBUG(X) if ((X) < Sens_Debug) int Sens_Debug = 0; char SF1[] = "res"; char SF2[] = "dc"; char SF3[] = "bf"; #endif char *Sfilter = NULL; double Sens_Delta = 0.000001; double Sens_Abs_Delta = 0.000001; static int sens_setp(sgen *sg, CKTcircuit *ckt, IFvalue *val); static int sens_load(sgen *sg, CKTcircuit *ckt, int is_dc); static int sens_temp(sgen *sg, CKTcircuit *ckt); static int count_steps(int type, double low, double high, int steps, double *stepsize); static double inc_freq(double freq, int type, double step_size); #define save_context(thing, place) { \ place = thing; \ } #define release_context(thing, place) \ if(place) { \ thing = place; \ place = NULL; \ } /* * Procedure: * * Determine operating point (call CKTop) * * For each frequency point: * (for AC) call NIacIter to get base node voltages * For each element/parameter in the test list: * construct the perturbation matrix * Solve for the sensitivities: * delta_E = Y^-1 (delta_Y E - delta_I) * save results */ static int error; int sens_sens(CKTcircuit *ckt, int restart) { SENS_AN *job = (SENS_AN *) ckt->CKTcurJob; static int size; static double *delta_I, *delta_iI, *delta_I_delta_Y, *delta_iI_delta_Y; sgen *sg; static double freq; static int nfreqs; static int i; static SMPmatrix *delta_Y = NULL, *Y; static double step_size; double *E, *iE; IFvalue value, nvalue; double *output_values; IFcomplex *output_cvalues; double delta_var; int (*fn) (SMPmatrix *, GENmodel *, CKTcircuit *, int *); static int is_dc; int k, j, n; int num_vars, branch_eq=0; runDesc *sen_data = NULL; char namebuf[513]; IFuid *output_names, freq_name; int bypass; int type; double *saved_rhs = 0, *saved_irhs = 0; SMPmatrix *saved_matrix = 0; #ifndef notdef #ifdef notdef for (sg = sgen_init(ckt, 0); sg; sgen_next(&sg)) { if (sg->is_instparam) printf("%s:%s:%s -> param %s\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword); else printf("%s:%s:%s -> mparam %s\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword); } #endif #ifdef ASDEBUG DEBUG(1) printf(">>> restart : %d\n", restart); #endif /* get to work */ restart = 1; if (restart) { freq = 0.0; is_dc = (job->step_type == SENS_DC); nfreqs = count_steps(job->step_type, job->start_freq, job->stop_freq, job->n_freq_steps, &step_size); if (!is_dc) freq = job->start_freq; error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); #ifdef notdef ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; #endif if (error) return error; size = spGetSize(ckt->CKTmatrix, 1); /* Create the perturbation matrix */ delta_Y = spCreate(size, 1, &error); if (error) return error; size += 1; /* Create an extra rhs */ delta_I = NEWN(double, size); delta_iI = NEWN(double, size); delta_I_delta_Y = NEWN(double, size); delta_iI_delta_Y = NEWN(double, size); num_vars = 0; for (sg = sgen_init(ckt, is_dc); sg; sgen_next(&sg)) { num_vars += 1; } if (!num_vars) return OK; /* XXXX Should be E_ something */ k = 0; output_names = NEWN(IFuid, num_vars); for (sg = sgen_init(ckt, is_dc); sg; sgen_next(&sg)) { if (!sg->is_instparam) { sprintf(namebuf, "%s:%s", sg->instance->GENname, sg->ptable[sg->param].keyword); } else if ((sg->ptable[sg->param].dataType & IF_PRINCIPAL) && sg->is_principle == 1) { sprintf(namebuf, "%s", sg->instance->GENname); } else { sprintf(namebuf, "%s_%s", sg->instance->GENname, sg->ptable[sg->param].keyword); } SPfrontEnd->IFnewUid (ckt, output_names + k, NULL, namebuf, UID_OTHER, NULL); k += 1; } if (is_dc) { type = IF_REAL; freq_name = NULL; } else { type = IF_COMPLEX; SPfrontEnd->IFnewUid (ckt, &freq_name, NULL, "frequency", UID_OTHER, NULL); } error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, freq_name, IF_REAL, num_vars, output_names, type, &sen_data); if (error) return error; FREE(output_names); if (is_dc) { output_values = NEWN(double, num_vars); output_cvalues = NULL; } else { output_values = NULL; output_cvalues = NEWN(IFcomplex, num_vars); if (job->step_type != SENS_LINEAR) SPfrontEnd->OUTattributes (sen_data, NULL, OUT_SCALE_LOG, NULL); } } else { /*XXX Restore saved state */ output_values = NULL; output_cvalues = NULL; fprintf(stderr, "ERROR: restore is not implemented for cktsens\n"); controlled_exit(1); } #ifdef ASDEBUG DEBUG(1) printf("start: %f, num: %d, dc: %d\n", freq, nfreqs, is_dc); #endif if (!job->output_volt) branch_eq = CKTfndBranch(ckt, job->output_src); bypass = ckt->CKTbypass; ckt->CKTbypass = 0; /* CKTop solves into CKTrhs and CKTmatrix, * CKTirhs is hopefully zero (fresh allocated ?) */ E = ckt->CKTrhs; iE = ckt->CKTirhs; Y = ckt->CKTmatrix; #ifdef ASDEBUG DEBUG(1) { printf("Operating point:\n"); for (i = 0; i < size; i++) printf(" E [%d] = %20.15g\n", i, E[i]); } #endif #ifdef notdef for (j = 0; j <= ckt->CKTmaxOrder + 1; j++) { save_states[j] = ckt->CKTstates[j]; ckt->CKTstates[j] = NULL; } #endif for (i = 0; i < nfreqs; i++) { /* XXX handle restart */ n = 0; if (SPfrontEnd->IFpauseTest()) { /* XXX Save State */ return E_PAUSE; } for (j = 0; j < size; j++) { delta_I[j] = 0.0; delta_iI[j] = 0.0; } if (freq != 0.0) { /* This generates Y in LU form */ ckt->CKTomega = 2.0 * M_PI * freq; /* Yes, all this has to be re-done */ /* XXX Free old states */ error = CKTunsetup(ckt); if (error) return error; /* XXX ckt->CKTmatrix = Y; */ error = CKTsetup(ckt); if (error) return error; #ifdef notdef for (j = 0; j <= ckt->CKTmaxOrder + 1; j++) { /* XXX Free new states */ ckt->CKTstates[j] = save_states[j]; } #endif error = CKTtemp(ckt); if (error) return error; error = CKTload(ckt); /* INITSMSIGS */ if (error) return error; error = NIacIter(ckt); if (error) return error; #ifdef notdef /* XXX Why? */ for (j = 0; j <= ckt->CKTmaxOrder + 1; j++) { ckt->CKTstates[j] = NULL; } #endif /* NIacIter solves into CKTrhsOld, CKTirhsOld and CKTmatrix */ E = ckt->CKTrhsOld; iE = ckt->CKTirhsOld; Y = ckt->CKTmatrix; } /* Use a different vector & matrix */ save_context(ckt->CKTrhs, saved_rhs); save_context(ckt->CKTirhs, saved_irhs); save_context(ckt->CKTmatrix, saved_matrix); ckt->CKTrhs = delta_I; ckt->CKTirhs = delta_iI; ckt->CKTmatrix = delta_Y; /* calc. effect of each param */ for (sg = sgen_init(ckt, is_dc /* job->plist */); sg; sgen_next(&sg)) { #ifdef ASDEBUG DEBUG(2) { printf("E/iE: %x/%x; delta_I/iI: %x/%x\n", E, iE, delta_I, delta_iI); printf("cktrhs/irhs: %x/%x\n", ckt->CKTrhs, ckt->CKTirhs); if (sg->is_instparam) printf("%s:%s:%s -> param %s\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword); else printf("%s:%s:%s -> mparam %s\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword); } #endif spClear(delta_Y); for (j = 0; j < size; j++) { delta_I[j] = 0.0; delta_iI[j] = 0.0; } /* ? should this just call CKTsetup * ? but then CKThead would have to get fiddled with */ ckt->CKTnumStates = sg->istate; fn = DEVices[sg->dev]->DEVsetup; if (fn) fn (delta_Y, sg->model, ckt, /* XXXX insert old state base here ?? */ &ckt->CKTnumStates); /* ? CKTsetup would call NIreinit instead */ ckt->CKTniState = NISHOULDREORDER | NIACSHOULDREORDER; /* XXX instead of calling temp here, just swap * back to the original states */ (void) sens_temp(sg, ckt); /* XXX Leave original E until here!! so that temp reads * the right node voltages */ if (sens_load(sg, ckt, is_dc)) { if (error && error != E_BADPARM) return error; /* XXX */ continue; } /* Alter the parameter */ #ifdef ASDEBUG DEBUG(1) printf("Original value: %g\n", sg->value); #endif #ifdef ASDEBUG DEBUG(2) { printf("Effect of device:\n"); spPrint(delta_Y, 0, 1, 1); printf("LHS:\n"); for (j = 0; j < size; j++) printf("%d: %g, %g\n", j, delta_I[j], delta_iI[j]); } #endif if (sg->value != 0.0) delta_var = sg->value * Sens_Delta; else delta_var = Sens_Abs_Delta; nvalue.rValue = sg->value + delta_var; #ifdef ASDEBUG DEBUG(1) printf("New value: %g\n", nvalue.rValue); #endif sens_setp(sg, ckt, &nvalue); if (error && error != E_BADPARM) return error; spConstMult(delta_Y, -1.0); for (j = 0; j < size; j++) { delta_I[j] *= -1.0; delta_iI[j] *= -1.0; } #ifdef ASDEBUG DEBUG(2) { printf("Effect of negating matrix:\n"); spPrint(delta_Y, 0, 1, 1); for (j = 0; j < size; j++) printf("%d: %g, %g\n", j, delta_I[j], delta_iI[j]); } #endif /* XXX swap back to temp states ?? Naw ... */ (void) sens_temp(sg, ckt); #ifdef ASDEBUG DEBUG(1) { if (sens_getp(sg, ckt, &value)) { continue; } printf("New value in device: %g\n", value.rValue); } #endif sens_load(sg, ckt, is_dc); #ifdef ASDEBUG DEBUG(2) { printf("Effect of changing the parameter:\n"); spPrint(delta_Y, 0, 1, 1); for (j = 0; j < size; j++) printf("%d: %g, %g\n", j, delta_I[j], delta_iI[j]); } #endif /* Set the perturbed variable back to it's * original value */ value.rValue = sg->value; sens_setp(sg, ckt, &value); (void) sens_temp(sg, ckt); /* XXX is this necessary? */ /* Back to business . . . */ #ifdef ASDEBUG DEBUG(2) for (j = 0; j < size; j++) printf(" E [%d] = %20.15g\n", j, E[j]); #endif /* delta_Y E */ spMultiply(delta_Y, delta_I_delta_Y, E, delta_iI_delta_Y, iE); #ifdef ASDEBUG DEBUG(2) for (j = 0; j < size; j++) printf("delta_Y * E [%d] = %20.15g\n", j, delta_I_delta_Y[j]); #endif /* delta_I - delta_Y E */ for (j = 0; j < size; j++) { delta_I[j] -= delta_I_delta_Y[j]; delta_iI[j] -= delta_iI_delta_Y[j]; } #ifdef ASDEBUG DEBUG(2) { printf(">>> Y:\n"); spPrint(Y, 0, 1, 1); for (j = 0; j < size; j++) printf("%d: %g, %g\n", j, delta_I[j], delta_iI[j]); } #endif /* Solve; Y already factored */ spSolve(Y, delta_I, delta_I, delta_iI, delta_iI); /* the special `0' node * the matrix indizes are [1..n] * yet the vector indizes are [0..n] * with [0] being implicit === 0 */ delta_I[0] = 0.0; delta_iI[0] = 0.0; #ifdef ASDEBUG DEBUG(2) { for (j = 1; j < size; j++) { if (sg->is_instparam) printf("%d/%s.%s = %g, %g\n", j, sg->instance->GENname, sg->ptable[sg->param].keyword, delta_I[j], delta_iI[j]); else printf("%d/%s:%s = %g, %g\n", j, sg->instance->GENname, sg->ptable[sg->param].keyword, delta_I[j], delta_iI[j]); } } #endif /* delta_I is now equal to delta_E */ if (is_dc) { if (job->output_volt) output_values[n] = delta_I [job->output_pos->number] - delta_I [job->output_neg->number]; else { output_values[n] = delta_I[branch_eq]; } output_values[n] /= delta_var; } else { if (job->output_volt) { output_cvalues[n].real = delta_I [job->output_pos->number] - delta_I [job->output_neg->number]; output_cvalues[n].imag = delta_iI [job->output_pos->number] - delta_iI [job->output_neg->number]; } else { output_cvalues[n].real = delta_I[branch_eq]; output_cvalues[n].imag = delta_iI[branch_eq]; } output_cvalues[n].real /= delta_var; output_cvalues[n].imag /= delta_var; } n += 1; } release_context(ckt->CKTrhs, saved_rhs); release_context(ckt->CKTirhs, saved_irhs); release_context(ckt->CKTmatrix, saved_matrix); if (is_dc) nvalue.v.vec.rVec = output_values; else nvalue.v.vec.cVec = output_cvalues; value.rValue = freq; SPfrontEnd->OUTpData (sen_data, &value, &nvalue); freq = inc_freq(freq, job->step_type, step_size); } SPfrontEnd->OUTendPlot (sen_data); if (is_dc) { FREE(output_values); /* XXX free various vectors */ } else { FREE(output_cvalues); /* XXX free various vectors */ } release_context(ckt->CKTrhs, saved_rhs); release_context(ckt->CKTirhs, saved_irhs); release_context(ckt->CKTmatrix, saved_matrix); spDestroy(delta_Y); FREE(delta_I); FREE(delta_iI); FREE(delta_I_delta_Y); FREE(delta_iI_delta_Y); ckt->CKTbypass = bypass; #ifdef notdef for (j = 0; j <= ckt->CKTmaxOrder + 1; j++) { if (ckt->CKTstates[j]) FREE(ckt->CKTstates[j]); ckt->CKTstates[j] = save_states[j]; } #endif #endif return OK; } double inc_freq(double freq, int type, double step_size) { if (type != SENS_LINEAR) freq *= step_size; else freq += step_size; return freq; } /* static double next_freq(int type, double freq, double stepsize) { double s=0; switch (type) { case SENS_DC: s = 0; break; case SENS_LINEAR: s = freq + stepsize; break; case SENS_DECADE: case SENS_OCTAVE: s = freq * stepsize; break; } return s; } */ int count_steps(int type, double low, double high, int steps, double *stepsize) { double s; int n; if (steps < 1) steps = 1; switch (type) { default: case SENS_DC: n = 0; s = 0; break; case SENS_LINEAR: n = steps; s = (high - low) / steps; break; case SENS_DECADE: if (low <= 0.0) low = 1e-3; if (high <= low) high = 10.0 * low; n = (int)(steps * log10(high/low) + 1.01); s = pow(10.0, 1.0 / steps); break; case SENS_OCTAVE: if (low <= 0.0) low = 1e-3; if (high <= low) high = 2.0 * low; n = (int)(steps * log(high/low) / M_LOG2E + 1.01); s = pow(2.0, 1.0 / steps); break; } if (n <= 0) n = 1; *stepsize = s; return n; } static int sens_load(sgen *sg, CKTcircuit *ckt, int is_dc) { int (*fn) (GENmodel *, CKTcircuit *); error = 0; if (!is_dc) fn = DEVices[sg->dev]->DEVacLoad; else fn = DEVices[sg->dev]->DEVload; if (fn) error = fn (sg->model, ckt); else return 1; return error; } static int sens_temp(sgen *sg, CKTcircuit *ckt) { int (*fn) (GENmodel *, CKTcircuit *); error = 0; fn = DEVices[sg->dev]->DEVtemperature; if (fn) error = fn (sg->model, ckt); else return 1; return error; } /* Get parameter value */ int sens_getp(sgen *sg, CKTcircuit *ckt, IFvalue *val) { int pid; NG_IGNORE(ckt); error = 0; if (sg->is_instparam) { int (*fn) (CKTcircuit*, GENinstance*, int, IFvalue*, IFvalue*); fn = DEVices[sg->dev]->DEVask; pid = DEVices[sg->dev]->DEVpublic.instanceParms[sg->param].id; if (fn) error = fn (ckt, sg->instance, pid, val, NULL); else return 1; } else { int (*fn) (CKTcircuit*, GENmodel*, int, IFvalue*); fn = DEVices[sg->dev]->DEVmodAsk; pid = DEVices[sg->dev]->DEVpublic.modelParms[sg->param].id; if (fn) error = fn (ckt, sg->model, pid, val); else return 1; } if (error) { if (sg->is_instparam) printf("GET ERROR: %s:%s:%s -> param %s (%d)\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword, pid); else printf("GET ERROR: %s:%s:%s -> mparam %s (%d)\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword, pid); } return error; } /* Get parameter value */ int sens_setp(sgen *sg, CKTcircuit *ckt, IFvalue *val) { int pid; NG_IGNORE(ckt); error = 0; if (sg->is_instparam) { int (*fn) (int, IFvalue *, GENinstance *, IFvalue *); fn = DEVices[sg->dev]->DEVparam; pid = DEVices[sg->dev]->DEVpublic.instanceParms[sg->param].id; if (fn) error = fn (pid, val, sg->instance, NULL); else return 1; } else { int (*fn) (int, IFvalue *, GENmodel *); fn = DEVices[sg->dev]->DEVmodParam; pid = DEVices[sg->dev]->DEVpublic.modelParms[sg->param].id; if (fn) error = fn (pid, val, sg->model); else return 1; } if (error) { if (sg->is_instparam) printf("SET ERROR: %s:%s:%s -> param %s (%d)\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword, pid); else printf("SET ERROR: %s:%s:%s -> mparam %s (%d)\n", DEVices[sg->dev]->DEVpublic.name, sg->model->GENmodName, sg->instance->GENname, sg->ptable[sg->param].keyword, pid); } return error; } ngspice-26/src/spicelib/analysis/nevalsrc.c0000644000265600020320000001143712264261473020424 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ /* * NevalSrc (noise, lnNoise, ckt, type, node1, node2, param) * This routine evaluates the noise due to different physical * phenomena. This includes the "shot" noise associated with dc * currents in semiconductors and the "thermal" noise associated with * resistance. Although semiconductors also display "flicker" (1/f) * noise, the lack of a unified model requires us to handle it on a * "case by case" basis. What we CAN provide, though, is the noise * gain associated with the 1/f source. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "ngspice/noisedef.h" void NevalSrc (double *noise, double *lnNoise, CKTcircuit *ckt, int type, int node1, int node2, double param) { double realVal; double imagVal; double gain; realVal = ckt->CKTrhs [node1] - ckt->CKTrhs [node2]; imagVal = ckt->CKTirhs [node1] - ckt->CKTirhs [node2]; gain = (realVal*realVal) + (imagVal*imagVal); switch (type) { case SHOTNOISE: *noise = gain * 2 * CHARGE * fabs(param); /* param is the dc current in a semiconductor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case THERMNOISE: *noise = gain * 4 * CONSTboltz * ckt->CKTtemp * param; /* param is the conductance of a resistor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case N_GAIN: *noise = gain; break; } } /* * NevalSrc2 (noise, lnNoise, ckt, type, node1, node2, param, node3, node4, param2) * This routine is a modified version of NevalSrc() that computes * the output noise due to two fully-correlated noise sources. It is * useful for implementing correlated gate and drain noises in MOSFETs. * * Like NevalSrc(), it evaluates the noise due to different physical * phenomena. This includes the "shot" noise associated with dc * currents in semiconductors and the "thermal" noise associated with * resistance. Although semiconductors also display "flicker" (1/f) * noise, the lack of a unified model requires us to handle it on a * "case by case" basis. What we CAN provide, though, is the noise * gain associated with the 1/f source. */ /* Modified by Darsen Lu for BSIM4 tnoiMod=2 10/10/2010 */ void NevalSrc2 ( double *noise, double *lnNoise, CKTcircuit *ckt, int type, int node1, int node2, double param1, int node3, int node4, double param2, double phi21) /* Phase of signal 2 relative to signal 1 */ { double realVal1, imagVal1; double realVal2, imagVal2; double realOut, imagOut, param_gain; double T0, T1, T2, T3; realVal1 = ckt->CKTrhs [node1] - ckt->CKTrhs [node2]; imagVal1 = ckt->CKTirhs [node1] - ckt->CKTirhs [node2]; realVal2 = ckt->CKTrhs [node3] - ckt->CKTrhs [node4]; imagVal2 = ckt->CKTirhs [node3] - ckt->CKTirhs [node4]; T0 = sqrt(param1); T1 = sqrt(param2); T2 = T1 * cos(phi21); T3 = T1 * sin(phi21); realOut = T0 * realVal1 + T2 * realVal2 - T3 * imagVal2; imagOut = T0 * imagVal1 + T2 * imagVal2 + T3 * realVal2; param_gain = (realOut*realOut) + (imagOut*imagOut); switch (type) { case SHOTNOISE: *noise = 2.0 * CHARGE * fabs(param_gain); /* param is the dc current in a semiconductor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case THERMNOISE: *noise = 4.0 * CONSTboltz * ckt->CKTtemp * param_gain; /* param is the conductance of a resistor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case N_GAIN: *noise = 0.0; break; } } /* PN 2003: The following function includes instance dtemp in thermal noise calculation. It will replace NevalSrc as soon as all devices will implement dtemp feature. */ void NevalSrcInstanceTemp (double *noise, double *lnNoise, CKTcircuit *ckt, int type, int node1, int node2, double param, double param2) { double realVal; double imagVal; double gain; realVal = ckt->CKTrhs [node1] - ckt->CKTrhs [node2]; imagVal = ckt->CKTirhs [node1] - ckt->CKTirhs [node2]; gain = (realVal*realVal) + (imagVal*imagVal); switch (type) { case SHOTNOISE: *noise = gain * 2 * CHARGE * fabs(param); /* param is the dc current in a semiconductor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case THERMNOISE: *noise = gain * 4 * CONSTboltz * (ckt->CKTtemp + param2) /* param2 is the instance temperature difference */ * param; /* param is the conductance of a resistor */ *lnNoise = log( MAX(*noise,N_MINLOG) ); break; case N_GAIN: *noise = gain; break; } } ngspice-26/src/spicelib/analysis/analysis.h0000644000265600020320000000107712264261473020436 0ustar andreasadmin#ifndef ngspice_ANALYSIS_H #define ngspice_ANALYSIS_H struct SPICEanalysis { IFanalysis if_analysis; int size; int domain; int do_ic; int (*setParm)(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value); int (*askQuest)(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value); int (*an_init)(CKTcircuit *ckt, JOB *job); int (*an_func)(CKTcircuit *ckt, int restart); }; char *spice_analysis_get_name(int index); char *spice_analysis_get_description(int index); int spice_num_analysis(void); SPICEanalysis **spice_analysis_ptr(void); #endif ngspice-26/src/spicelib/analysis/Makefile.in0000644000265600020320000006367212264261535020517 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @PSS_WANTED_TRUE@am__append_1 = \ @PSS_WANTED_TRUE@ dcpss.c \ @PSS_WANTED_TRUE@ pssaskq.c \ @PSS_WANTED_TRUE@ pssinit.c \ @PSS_WANTED_TRUE@ psssetp.c subdir = src/spicelib/analysis DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libckt_la_LIBADD = am__libckt_la_SOURCES_DIST = acan.c acaskq.c acsetp.c analysis.c \ analysis.h cktacct.c cktacdum.c cktaskaq.c cktasknq.c \ cktbkdum.c cktclrbk.c cktdelt.c cktdest.c cktdisto.c cktdlti.c \ cktdltm.c cktdltn.c cktdojob.c cktdump.c cktncdump.c \ cktfbran.c cktfnda.c cktfndm.c cktfnode.c cktftask.c cktgrnd.c \ ckti2nod.c cktic.c cktlnkeq.c cktload.c cktmapn.c cktmask.c \ cktmcrt.c cktmkcur.c cktmknod.c cktmkvol.c cktmpar.c \ cktnames.c cktnewan.c cktneweq.c cktnewn.c cktnodn.c \ cktnoise.c cktntask.c cktnum2n.c cktop.c cktparam.c cktpmnam.c \ cktpname.c cktpzld.c cktpzset.c cktpzstr.c cktsens.c \ cktsetap.c cktsetbk.c cktsetnp.c cktsetup.c cktsgen.c \ cktsopt.c ckttemp.c cktterr.c ckttroub.c ckttrunc.c ckttyplk.c \ daskq.c dcoaskq.c dcop.c dcosetp.c dctaskq.c dctran.c \ dctrcurv.c dctsetp.c distoan.c dkerproc.c dloadfns.c \ dsetparm.c naskq.c nevalsrc.c ninteg.c noisean.c nsetparm.c \ pzan.c pzaskq.c pzsetp.c sensaskq.c senssetp.c tfanal.c \ tfaskq.c tfsetp.c tranaskq.c traninit.c transetp.c cluster.c \ dcpss.c pssaskq.c pssinit.c psssetp.c @PSS_WANTED_TRUE@am__objects_1 = dcpss.lo pssaskq.lo pssinit.lo \ @PSS_WANTED_TRUE@ psssetp.lo am_libckt_la_OBJECTS = acan.lo acaskq.lo acsetp.lo analysis.lo \ cktacct.lo cktacdum.lo cktaskaq.lo cktasknq.lo cktbkdum.lo \ cktclrbk.lo cktdelt.lo cktdest.lo cktdisto.lo cktdlti.lo \ cktdltm.lo cktdltn.lo cktdojob.lo cktdump.lo cktncdump.lo \ cktfbran.lo cktfnda.lo cktfndm.lo cktfnode.lo cktftask.lo \ cktgrnd.lo ckti2nod.lo cktic.lo cktlnkeq.lo cktload.lo \ cktmapn.lo cktmask.lo cktmcrt.lo cktmkcur.lo cktmknod.lo \ cktmkvol.lo cktmpar.lo cktnames.lo cktnewan.lo cktneweq.lo \ cktnewn.lo cktnodn.lo cktnoise.lo cktntask.lo cktnum2n.lo \ cktop.lo cktparam.lo cktpmnam.lo cktpname.lo cktpzld.lo \ cktpzset.lo cktpzstr.lo cktsens.lo cktsetap.lo cktsetbk.lo \ cktsetnp.lo cktsetup.lo cktsgen.lo cktsopt.lo ckttemp.lo \ cktterr.lo ckttroub.lo ckttrunc.lo ckttyplk.lo daskq.lo \ dcoaskq.lo dcop.lo dcosetp.lo dctaskq.lo dctran.lo dctrcurv.lo \ dctsetp.lo distoan.lo dkerproc.lo dloadfns.lo dsetparm.lo \ naskq.lo nevalsrc.lo ninteg.lo noisean.lo nsetparm.lo pzan.lo \ pzaskq.lo pzsetp.lo sensaskq.lo senssetp.lo tfanal.lo \ tfaskq.lo tfsetp.lo tranaskq.lo traninit.lo transetp.lo \ cluster.lo $(am__objects_1) libckt_la_OBJECTS = $(am_libckt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libckt_la_SOURCES) DIST_SOURCES = $(am__libckt_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libckt.la libckt_la_SOURCES = acan.c acaskq.c acsetp.c analysis.c analysis.h \ cktacct.c cktacdum.c cktaskaq.c cktasknq.c cktbkdum.c \ cktclrbk.c cktdelt.c cktdest.c cktdisto.c cktdlti.c cktdltm.c \ cktdltn.c cktdojob.c cktdump.c cktncdump.c cktfbran.c \ cktfnda.c cktfndm.c cktfnode.c cktftask.c cktgrnd.c ckti2nod.c \ cktic.c cktlnkeq.c cktload.c cktmapn.c cktmask.c cktmcrt.c \ cktmkcur.c cktmknod.c cktmkvol.c cktmpar.c cktnames.c \ cktnewan.c cktneweq.c cktnewn.c cktnodn.c cktnoise.c \ cktntask.c cktnum2n.c cktop.c cktparam.c cktpmnam.c cktpname.c \ cktpzld.c cktpzset.c cktpzstr.c cktsens.c cktsetap.c \ cktsetbk.c cktsetnp.c cktsetup.c cktsgen.c cktsopt.c ckttemp.c \ cktterr.c ckttroub.c ckttrunc.c ckttyplk.c daskq.c dcoaskq.c \ dcop.c dcosetp.c dctaskq.c dctran.c dctrcurv.c dctsetp.c \ distoan.c dkerproc.c dloadfns.c dsetparm.c naskq.c nevalsrc.c \ ninteg.c noisean.c nsetparm.c pzan.c pzaskq.c pzsetp.c \ sensaskq.c senssetp.c tfanal.c tfaskq.c tfsetp.c tranaskq.c \ traninit.c transetp.c cluster.c $(am__append_1) AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/analysis/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/analysis/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libckt.la: $(libckt_la_OBJECTS) $(libckt_la_DEPENDENCIES) $(EXTRA_libckt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libckt_la_OBJECTS) $(libckt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/acsetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/analysis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktacdum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktaskaq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktasknq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktbkdum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktclrbk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdelt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdisto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdlti.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdltm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdltn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdojob.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktfbran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktfnda.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktfndm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktfnode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktftask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktgrnd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckti2nod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktlnkeq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmapn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmcrt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmkcur.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmknod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmkvol.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnames.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktncdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnewan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktneweq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnewn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnodn.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktntask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktnum2n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktpmnam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktpname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktpzset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktpzstr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsetap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsetbk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsetnp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsgen.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckttemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktterr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckttroub.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckttrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ckttyplk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cluster.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/daskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcoaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcosetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcpss.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dctaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dctran.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dctrcurv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dctsetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/distoan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dkerproc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dloadfns.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsetparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/naskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nevalsrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ninteg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/noisean.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nsetparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pssaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pssinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psssetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pzan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pzaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pzsetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sensaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/senssetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfanal.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tfsetp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tranaskq.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traninit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/transetp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/analysis/cktsetbk.c0000644000265600020320000000553412264261473020422 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTsetBreak(ckt,time) * add the given time to the breakpoint table for the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" /* define to enable breakpoint trace code */ /* #define TRACE_BREAKPOINT */ int CKTsetBreak(CKTcircuit *ckt, double time) { double *tmp; int i,j; #ifdef TRACE_BREAKPOINT printf("[t:%e] \t want breakpoint for t = %e\n", ckt->CKTtime, time); #endif if(ckt->CKTtime > time) { SPfrontEnd->IFerror (ERR_PANIC, "breakpoint in the past - HELP!", NULL); return(E_INTERN); } for(i=0;iCKTbreakSize;i++) { if(ckt->CKTbreaks[i]>time) { /* passed */ if((ckt->CKTbreaks[i]-time) <= ckt->CKTminBreak) { /* very close together - take earlier point */ #ifdef TRACE_BREAKPOINT printf("[t:%e] \t %e replaces %e\n", ckt->CKTtime, time, ckt->CKTbreaks[i]); CKTbreakDump(ckt); #endif ckt->CKTbreaks[i] = time; return(OK); } if(i>0 && time-ckt->CKTbreaks[i-1] <= ckt->CKTminBreak) { /* very close together, but after, so skip */ #ifdef TRACE_BREAKPOINT printf("[t:%e] \t %e skipped\n", ckt->CKTtime, time); CKTbreakDump(ckt); #endif return(OK); } /* fits in middle - new array & insert */ tmp = TMALLOC(double, ckt->CKTbreakSize + 1); if(tmp == NULL) return(E_NOMEM); for(j=0;jCKTbreaks[j]; } tmp[i]=time; #ifdef TRACE_BREAKPOINT printf("[t:%e] \t %e added\n", ckt->CKTtime, time); CKTbreakDump(ckt); #endif for(j=i;jCKTbreakSize;j++) { tmp[j+1] = ckt->CKTbreaks[j]; } FREE(ckt->CKTbreaks); ckt->CKTbreakSize++; ckt->CKTbreaks=tmp; return(OK); } } /* never found it - beyond end of time - extend out idea of time */ if(time-ckt->CKTbreaks[ckt->CKTbreakSize-1]<=ckt->CKTminBreak) { /* very close tegether - keep earlier, throw out new point */ #ifdef TRACE_BREAKPOINT printf("[t:%e] \t %e skipped (at the end)\n", ckt->CKTtime, time); CKTbreakDump(ckt); #endif return(OK); } /* fits at end - grow array & add on */ ckt->CKTbreaks = TREALLOC(double, ckt->CKTbreaks, ckt->CKTbreakSize + 1); ckt->CKTbreakSize++; ckt->CKTbreaks[ckt->CKTbreakSize-1]=time; #ifdef TRACE_BREAKPOINT printf("[t:%e] \t %e added at end\n", ckt->CKTtime, time); CKTbreakDump(ckt); #endif return(OK); } ngspice-26/src/spicelib/analysis/dkerproc.c0000644000265600020320000000216612264261473020417 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" int DkerProc(int type, double *rPtr, double *iPtr, int size, DISTOAN *job) { int i; NG_IGNORE(job); switch(type) { case D_F1: for (i=1;i<=size;i++) { iPtr[i] *= 2.0; /* convert to sinusoid amplitude */ rPtr[i] *= 2.0; } break; case D_F2: for (i=1;i<=size;i++) { rPtr[i] *= 2.0; iPtr[i] *= 2.0; } break; case D_TWOF1: for (i=1;i<=size;i++) { iPtr[i] *= 2.0; rPtr[i] *= 2.0; } break; case D_THRF1: for (i=1;i<=size;i++) { iPtr[i] *= 2.0; rPtr[i] *= 2.0; } break; case D_F1PF2: for (i=1;i<=size;i++) { iPtr[i] *= 4.0; rPtr[i] *= 4.0; } break; case D_F1MF2: for (i=1;i<=size;i++) { iPtr[i] *= 4.0; rPtr[i] *= 4.0; } break; case D_2F1MF2: for (i=1;i<=size;i++) { iPtr[i] *= 6.0; rPtr[i] *= 6.0; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/dctrcurv.c0000644000265600020320000005015012264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 1999 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "vsrc/vsrcdefs.h" #include "isrc/isrcdefs.h" #include "res/resdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add headers */ #include "ngspice/mif.h" #include "ngspice/evtproto.h" #include "ngspice/ipctiein.h" /* gtri - end - wbk */ #endif #include "ngspice/devdefs.h" #ifdef HAS_PROGREP static double actval, actdiff; #endif extern void inp_evaluate_temper(void); int DCtrCurv(CKTcircuit *ckt, int restart) /* forced restart flag */ { TRCV *job = (TRCV *) ckt->CKTcurJob; int i; double *temp; int converged; int rcode; int vcode; int icode; int j; int error; IFuid varUid; IFuid *nameList; int numNames; int firstTime=1; static runDesc *plot = NULL; #ifdef WANT_SENSE2 long save; #ifdef SENSDEBUG if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&DCSEN) ){ printf("\nDC Sensitivity Results\n\n"); CKTsenPrint(ckt); } #endif /* SENSDEBUG */ #endif rcode = CKTtypelook("Resistor"); vcode = CKTtypelook("Vsource"); icode = CKTtypelook("Isource"); if (!restart && job->TRCVnestState >= 0) { /* continuing */ i = job->TRCVnestState; /* resume to work? saj*/ error = SPfrontEnd->OUTpBeginPlot (NULL, NULL, NULL, NULL, 0, 666, NULL, 666, &plot); goto resume; } ckt->CKTtime = 0; ckt->CKTdelta = job->TRCVvStep[0]; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT ; ckt->CKTorder=1; /* Save the state of the circuit */ for(i=0;i<7;i++) { ckt->CKTdeltaOld[i]=ckt->CKTdelta; } for (i = 0; i <= job->TRCVnestLevel; i++) { if(rcode >= 0) { /* resistances are in this version, so use them */ RESinstance *here; RESmodel *model; for(model = (RESmodel *)ckt->CKThead[rcode];model != NULL; model=model->RESnextModel){ for(here=model->RESinstances;here!=NULL; here=here->RESnextInstance) { if (here->RESname == job->TRCVvName[i]) { job->TRCVvElt[i] = (GENinstance *)here; job->TRCVvSave[i] = here->RESresist; job->TRCVgSave[i] = here->RESresGiven; job->TRCVvType[i] = rcode; here->RESresist = job->TRCVvStart[i]; here->RESresGiven = 1; CKTtemp(ckt); goto found; } } } } if(vcode >= 0) { /* voltage sources are in this version, so use them */ VSRCinstance *here; VSRCmodel *model; for(model = (VSRCmodel *)ckt->CKThead[vcode];model != NULL; model=model->VSRCnextModel){ for(here=model->VSRCinstances;here!=NULL; here=here->VSRCnextInstance) { if (here->VSRCname == job->TRCVvName[i]) { job->TRCVvElt[i] = (GENinstance *)here; job->TRCVvSave[i] = here->VSRCdcValue; job->TRCVgSave[i] = here->VSRCdcGiven; job->TRCVvType[i] = vcode; here->VSRCdcValue = job->TRCVvStart[i]; here->VSRCdcGiven = 1; goto found; } } } } if(icode >= 0 ) { /* current sources are in this version, so use them */ ISRCinstance *here; ISRCmodel *model; for(model= (ISRCmodel *)ckt->CKThead[icode];model != NULL; model=model->ISRCnextModel){ for(here=model->ISRCinstances;here!=NULL; here=here->ISRCnextInstance) { if(here->ISRCname == job->TRCVvName[i]) { job->TRCVvElt[i] = (GENinstance *)here; job->TRCVvSave[i] = here->ISRCdcValue; job->TRCVgSave[i] = here->ISRCdcGiven; job->TRCVvType[i] = icode; here->ISRCdcValue = job->TRCVvStart[i]; here->ISRCdcGiven = 1; goto found; } } } } if (!strcmp(job->TRCVvName[i], "temp")) { job->TRCVvSave[i] = ckt->CKTtemp; /* Saves the old circuit temperature */ job->TRCVvType[i] = TEMP_CODE; /* Set the sweep type code */ ckt->CKTtemp = job->TRCVvStart[i] + CONSTCtoK; /* Set the new circuit temp */ CKTtemp(ckt); if (expr_w_temper) inp_evaluate_temper(); goto found; } SPfrontEnd->IFerror (ERR_FATAL, "DCtrCurv: source / resistor %s not in circuit", &(job->TRCVvName[i])); return(E_NODEV); found:; } #ifdef HAS_PROGREP actval = job->TRCVvStart[job->TRCVnestLevel]; actdiff = job->TRCVvStart[job->TRCVnestLevel] - job->TRCVvStop[job->TRCVnestLevel]; #endif #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff and anal_init and anal_type */ /* Tell the beginPlot routine what mode we're in */ g_ipc.anal_type = IPC_ANAL_DCTRCURVE; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.circuit.anal_init = MIF_TRUE; /* gtri - end - wbk */ #endif i--; /* PN: This seems to do nothing ??? */ error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); if (job->TRCVvType[i] == vcode) SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "v-sweep", UID_OTHER, NULL); else { if (job->TRCVvType[i] == icode) SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "i-sweep", UID_OTHER, NULL); else { if (job->TRCVvType[i] == TEMP_CODE) SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "temp-sweep", UID_OTHER, NULL); else { if (job->TRCVvType[i] == rcode) SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "res-sweep", UID_OTHER, NULL); else SPfrontEnd->IFnewUid (ckt, &varUid, NULL, "?-sweep", UID_OTHER, NULL); } /* icode */ } /* TEMP_CODE */ } /* rcode*/ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, ckt->CKTcurJob->JOBname, varUid, IF_REAL, numNames, nameList, IF_REAL, &plot); tfree(nameList); if(error) return(error); /* initialize CKTsoaCheck `warn' counters */ if (ckt->CKTsoaCheck) error = CKTsoaInit(); /* now have finished the initialization - can start doing hard part */ i = 0; resume: for(;;) { if (job->TRCVvType[i] == vcode) { /* voltage source */ if((((VSRCinstance*)(job->TRCVvElt[i]))->VSRCdcValue) * SIGN(1.0, job->TRCVvStep[i]) - SIGN(1.0, job->TRCVvStep[i]) * job->TRCVvStop[i] > DBL_EPSILON*1e+03) { i++ ; firstTime=1; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT ; if (i > job->TRCVnestLevel) break; goto nextstep; } } else if (job->TRCVvType[i] == icode) { /* current source */ if((((ISRCinstance*)(job->TRCVvElt[i]))->ISRCdcValue) * SIGN(1.0, job->TRCVvStep[i]) - SIGN(1.0, job->TRCVvStep[i]) * job->TRCVvStop[i] > DBL_EPSILON*1e+03) { i++ ; firstTime=1; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT ; if (i > job->TRCVnestLevel) break; goto nextstep; } } else if (job->TRCVvType[i] == rcode) { /* resistance */ if((((RESinstance*)(job->TRCVvElt[i]))->RESresist) * SIGN(1.0, job->TRCVvStep[i]) - SIGN(1.0, job->TRCVvStep[i]) * job->TRCVvStop[i] > DBL_EPSILON*1e+03) { i++ ; firstTime=1; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT ; if (i > job->TRCVnestLevel) break; goto nextstep; } } else if (job->TRCVvType[i] == TEMP_CODE) { /* temp sweep */ if(((ckt->CKTtemp) - CONSTCtoK) * SIGN(1.0, job->TRCVvStep[i]) - SIGN(1.0, job->TRCVvStep[i]) * job->TRCVvStop[i] > DBL_EPSILON*1e+03) { i++ ; firstTime=1; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT ; if (i > job->TRCVnestLevel) break; goto nextstep; } } /* else not possible */ while (i > 0) { /* init(i); */ i--; if (job->TRCVvType[i] == vcode) { /* voltage source */ ((VSRCinstance *)(job->TRCVvElt[i]))->VSRCdcValue = job->TRCVvStart[i]; } else if (job->TRCVvType[i] == icode) { /* current source */ ((ISRCinstance *)(job->TRCVvElt[i]))->ISRCdcValue = job->TRCVvStart[i]; } else if (job->TRCVvType[i] == TEMP_CODE) { ckt->CKTtemp = job->TRCVvStart[i] + CONSTCtoK; CKTtemp(ckt); if (expr_w_temper) inp_evaluate_temper(); } else if (job->TRCVvType[i] == rcode) { ((RESinstance *)(job->TRCVvElt[i]))->RESresist = job->TRCVvStart[i]; ((RESinstance *)(job->TRCVvElt[i]))->RESconduct = 1/(((RESinstance *)(job->TRCVvElt[i]))->RESresist); /* Note: changing the resistance does nothing */ /* changing the conductance 1/r instead */ DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); /* * RESload(job->TRCVvElt[i]->GENmodPtr, ckt); */ } /* else not possible */ } /* Rotate state vectors. */ temp = ckt->CKTstates[ckt->CKTmaxOrder+1]; for(j=ckt->CKTmaxOrder;j>=0;j--) { ckt->CKTstates[j+1] = ckt->CKTstates[j]; } ckt->CKTstate0 = temp; /* do operation */ #ifdef XSPICE /* gtri - begin - wbk - Do EVTop if event instances exist */ if(ckt->evt->counts.num_insts == 0) { /* If no event-driven instances, do what SPICE normally does */ #endif converged = NIiter(ckt,ckt->CKTdcTrcvMaxIter); if(converged != 0) { converged = CKTop(ckt, (ckt->CKTmode&MODEUIC)|MODEDCTRANCURVE | MODEINITJCT, (ckt->CKTmode&MODEUIC)|MODEDCTRANCURVE | MODEINITFLOAT, ckt->CKTdcMaxIter); if(converged != 0) { return(converged); } } #ifdef XSPICE } else { /* else do new algorithm */ /* first get the current step in the analysis */ if (job->TRCVvType[0] == vcode) { g_mif_info.circuit.evt_step = ((VSRCinstance *)(job->TRCVvElt[i]))->VSRCdcValue ; } else if (job->TRCVvType[0] == icode) { g_mif_info.circuit.evt_step = ((ISRCinstance *)(job->TRCVvElt[i]))->ISRCdcValue ; } else if (job->TRCVvType[0] == rcode) { g_mif_info.circuit.evt_step = ((RESinstance*)(job->TRCVvElt[i]->GENmodPtr))->RESresist; } else if (job->TRCVvType[0] == TEMP_CODE) { g_mif_info.circuit.evt_step = ckt->CKTtemp - CONSTCtoK; } /* if first time through, call EVTop immediately and save event results */ if(firstTime) { converged = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, g_mif_info.circuit.evt_step); EVTop_save(ckt, MIF_FALSE, g_mif_info.circuit.evt_step); if(converged != 0) return(converged); } /* else, call NIiter first with mode = MODEINITPRED */ /* to attempt quick analog solution. Then call all hybrids and call */ /* EVTop only if event outputs have changed, or if non-converged */ else { converged = NIiter(ckt,ckt->CKTdcTrcvMaxIter); EVTcall_hybrids(ckt); if((converged != 0) || (ckt->evt->queue.output.num_changed != 0)) { converged = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCTRANCURVE | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_FALSE); EVTdump(ckt, IPC_ANAL_DCTRCURVE, g_mif_info.circuit.evt_step); EVTop_save(ckt, MIF_FALSE, g_mif_info.circuit.evt_step); if(converged != 0) return(converged); } } } /* gtri - end - wbk - Do EVTop if event instances exist */ #endif ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODEDCTRANCURVE | MODEINITPRED ; if (job->TRCVvType[0] == vcode) { ckt->CKTtime = ((VSRCinstance *)(job->TRCVvElt[i]))->VSRCdcValue ; } else if (job->TRCVvType[0] == icode) { ckt->CKTtime = ((ISRCinstance *)(job->TRCVvElt[i]))->ISRCdcValue ; } else if (job->TRCVvType[0] == rcode) { ckt->CKTtime = ((RESinstance *)(job->TRCVvElt[i]))->RESresist; } /* PN Temp sweep */ else { ckt->CKTtime = ckt->CKTtemp - CONSTCtoK ; } #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ /* If first time through, call CKTdump to output Operating Point info */ /* for Mspice compatibility */ if(g_ipc.enabled && firstTime) { ipc_send_dcop_prefix(); CKTdump(ckt, 0.0, plot); ipc_send_dcop_suffix(); } /* gtri - end - wbk */ #endif #ifdef WANT_SENSE2 /* if(!ckt->CKTsenInfo) printf("sensitivity structure does not exist\n"); */ if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode&DCSEN) ){ int senmode; #ifdef SENSDEBUG if (job->TRCVvType[i] == vcode) { /* voltage source */ printf("Voltage Source Value : %.5e V\n", ((VSRCinstance*) (job->TRCVvElt[i]))->VSRCdcValue); } if (job->TRCVvType[i] == icode) { /* current source */ printf("Current Source Value : %.5e A\n", ((ISRCinstance*)(job->TRCVvElt[i]))->ISRCdcValue); } if (job->TRCVvType[i] == rcode) { /* resistance */ printf("Current Resistance Value : %.5e Ohm\n", ((RESinstance*)(job->TRCVvElt[i]->GENmodPtr))->RESresist); } if (job->TRCVvType[i] == TEMP_CODE) { /* Temperature */ printf("Current Circuit Temperature : %.5e C\n", ckt->CKTtemp - CONSTCtoK); } #endif /* SENSDEBUG */ senmode = ckt->CKTsenInfo->SENmode; save = ckt->CKTmode; ckt->CKTsenInfo->SENmode = DCSEN; error = CKTsenDCtran(ckt); if (error) return(error); ckt->CKTmode = save; ckt->CKTsenInfo->SENmode = senmode; } #endif #ifdef XSPICE /* gtri - modify - wbk - 12/19/90 - Send IPC delimiters */ if(g_ipc.enabled) ipc_send_data_prefix(ckt->CKTtime); #endif CKTdump(ckt,ckt->CKTtime,plot); if (ckt->CKTsoaCheck) error = CKTsoaCheck(ckt); #ifdef XSPICE if(g_ipc.enabled) ipc_send_data_suffix(); /* gtri - end - wbk */ #endif if(firstTime) { firstTime=0; bcopy(ckt->CKTstate0, ckt->CKTstate1, (size_t) ckt->CKTnumStates * sizeof(double)); } nextstep:; if (job->TRCVvType[i] == vcode) { /* voltage source */ ((VSRCinstance*)(job->TRCVvElt[i]))->VSRCdcValue += job->TRCVvStep[i]; } else if (job->TRCVvType[i] == icode) { /* current source */ ((ISRCinstance*)(job->TRCVvElt[i]))->ISRCdcValue += job->TRCVvStep[i]; } else if (job->TRCVvType[i] == rcode) { /* resistance */ ((RESinstance*)(job->TRCVvElt[i]))->RESresist += job->TRCVvStep[i]; /* This code should update resistance and conductance */ ((RESinstance*)(job->TRCVvElt[i]))->RESconduct = 1/(((RESinstance*)(job->TRCVvElt[i]))->RESresist); DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); /* * RESload(job->TRCVvElt[i]->GENmodPtr, ckt); */ } /* PN Temp Sweep - serban */ else if (job->TRCVvType[i] == TEMP_CODE) { ckt->CKTtemp += job->TRCVvStep[i]; CKTtemp(ckt); if (expr_w_temper) inp_evaluate_temper(); } /* else not possible */ if(SPfrontEnd->IFpauseTest()) { /* user asked us to pause, so save state */ job->TRCVnestState = i; return(E_PAUSE); } #ifdef HAS_PROGREP if (i == job->TRCVnestLevel) { actval += job->TRCVvStep[job->TRCVnestLevel]; SetAnalyse( "dc", abs((int)(actval * 1000. / actdiff))); } #endif } /* all done, lets put everything back */ for (i = 0; i <= job->TRCVnestLevel; i++) { if (job->TRCVvType[i] == vcode) { /* voltage source */ ((VSRCinstance*)(job->TRCVvElt[i]))->VSRCdcValue = job->TRCVvSave[i]; ((VSRCinstance*)(job->TRCVvElt[i]))->VSRCdcGiven = (job->TRCVgSave[i] != 0); } else if (job->TRCVvType[i] == icode) /*current source */ { ((ISRCinstance*)(job->TRCVvElt[i]))->ISRCdcValue = job->TRCVvSave[i]; ((ISRCinstance*)(job->TRCVvElt[i]))->ISRCdcGiven = (job->TRCVgSave[i] != 0); } else if (job->TRCVvType[i] == rcode) /* Resistance */ { ((RESinstance*)(job->TRCVvElt[i]))->RESresist = job->TRCVvSave[i]; /* We restore both resistance and conductance */ ((RESinstance*)(job->TRCVvElt[i]))->RESconduct = 1/(((RESinstance*)(job->TRCVvElt[i]))->RESresist); ((RESinstance*)(job->TRCVvElt[i]))->RESresGiven = (job->TRCVgSave[i] != 0); DEVices[rcode]->DEVload(job->TRCVvElt[i]->GENmodPtr, ckt); /* * RESload(job->TRCVvElt[i]->GENmodPtr, ckt); */ } else if (job->TRCVvType[i] == TEMP_CODE) { ckt->CKTtemp = job->TRCVvSave[i]; CKTtemp(ckt); if (expr_w_temper) inp_evaluate_temper(); } /* else not possible */ } SPfrontEnd->OUTendPlot (plot); return(OK); } ngspice-26/src/spicelib/analysis/noisean.c0000644000265600020320000001776512264261473020255 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: 2001 AlansFixes **********/ /* Patch to noisean.c by Richard D. McRoberts. * Patched with modifications from Weidong Liu (2000) * Patched with modifications ftom Weidong Liu * in bsim4.1.0 code */ #include "ngspice/ngspice.h" #include "ngspice/acdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/sperror.h" #include "vsrc/vsrcdefs.h" #include "isrc/isrcdefs.h" int NOISEan (CKTcircuit *ckt, int restart) { static Ndata *data; /* va, must be static, for continuation of * interrupted(Ctrl-C), longer lasting noise * analysis */ double realVal; double imagVal; int error; int posOutNode; int negOutNode; int step; IFuid freqUid; double freqTol; /* tolerence parameter for finding final frequency; hack */ NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; posOutNode = (job->output) -> number; negOutNode = (job->outputRef) -> number; /* see if the source specified is AC */ { GENinstance *inst = CKTfndDev(ckt, job->input); bool ac_given = FALSE; if (!inst || inst->GENmodPtr->GENmodType < 0) { SPfrontEnd->IFerror (ERR_WARNING, "Noise input source %s not in circuit", &job->input); return E_NOTFOUND; } if (inst->GENmodPtr->GENmodType == CKTtypelook("Vsource")) { ac_given = ((VSRCinstance *)inst) -> VSRCacGiven; } else if(inst->GENmodPtr->GENmodType == CKTtypelook("Isource")) { ac_given = ((ISRCinstance *)inst) -> ISRCacGiven; } else { SPfrontEnd->IFerror (ERR_WARNING, "Noise input source %s is not of proper type", &job->input); return E_NOTFOUND; } if (!ac_given) { SPfrontEnd->IFerror (ERR_WARNING, "Noise input source %s has no AC value", &job->input); return E_NOACINPUT; } } if ( (job->NsavFstp == 0.0) || restart) { /* va, NsavFstp is double */ switch (job->NstpType) { case DECADE: job->NfreqDelta = exp(log(10.0)/ job->NnumSteps); break; case OCTAVE: job->NfreqDelta = exp(log(2.0)/ job->NnumSteps); break; case LINEAR: job->NfreqDelta = (job->NstopFreq - job->NstartFreq)/ (job->NnumSteps - 1); break; default: return(E_BADPARM); } /* error = DCop(ckt); */ error = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITFLOAT, ckt->CKTdcMaxIter); if (error) return(error); /* Patch to noisean.c by Richard D. McRoberts. */ ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEDCOP | MODEINITSMSIG; error = CKTload(ckt); if(error) return(error); data = TMALLOC(Ndata, 1); step = 0; data->freq = job->NstartFreq; data->outNoiz = 0.0; data->inNoise = 0.0; /* the current front-end needs the namelist to be fully declared before an OUTpBeginplot */ SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL); data->numPlots = 0; /* we don't have any plots yet */ error = CKTnoise(ckt,N_DENS,N_OPEN,data); if (error) return(error); /* * all names in the namelist have been declared. now start the * plot */ error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Noise Spectral Density Curves - (V^2 or A^2)/Hz", freqUid, IF_REAL, data->numPlots, data->namelist, IF_REAL, &(data->NplotPtr)); if (error) return(error); if (job->NstpType != LINEAR) { SPfrontEnd->OUTattributes (data->NplotPtr, NULL, OUT_SCALE_LOG, NULL); } } else { /* we must have paused before. pick up where we left off */ step = (int)(job->NsavFstp); switch (job->NstpType) { case DECADE: case OCTAVE: data->freq = job->NstartFreq * exp (step * log (job->NfreqDelta)); break; case LINEAR: data->freq = job->NstartFreq + step * job->NfreqDelta; break; default: return(E_BADPARM); } job->NsavFstp = 0; data->outNoiz = job->NsavOnoise; data->inNoise = job->NsavInoise; /* saj resume rawfile fix*/ error = SPfrontEnd->OUTpBeginPlot (NULL, NULL, NULL, NULL, 0, 666, NULL, 666, &(data->NplotPtr)); /*saj*/ } switch (job->NstpType) { case DECADE: case OCTAVE: freqTol = job->NfreqDelta * job->NstopFreq * ckt->CKTreltol; break; case LINEAR: freqTol = job->NfreqDelta * ckt->CKTreltol; break; default: return(E_BADPARM); } data->lstFreq = data->freq; /* do the noise analysis over all frequencies */ while (data->freq <= job->NstopFreq + freqTol) { if(SPfrontEnd->IFpauseTest()) { job->NsavFstp = step; /* save our results */ job->NsavOnoise = data->outNoiz; /* up until now */ job->NsavInoise = data->inNoise; return (E_PAUSE); } ckt->CKTomega = 2.0 * M_PI * data->freq; ckt->CKTmode = (ckt->CKTmode & MODEUIC) | MODEAC; /* * solve the original AC system to get the transfer * function between the input and output */ NIacIter(ckt); realVal = ckt->CKTrhsOld [posOutNode] - ckt->CKTrhsOld [negOutNode]; imagVal = ckt->CKTirhsOld [posOutNode] - ckt->CKTirhsOld [negOutNode]; data->GainSqInv = 1.0 / MAX(((realVal*realVal) + (imagVal*imagVal)),N_MINGAIN); data->lnGainInv = log(data->GainSqInv); /* set up a block of "common" data so we don't have to * recalculate it for every device */ data->delFreq = data->freq - data->lstFreq; data->lnFreq = log(MAX(data->freq,N_MINLOG)); data->lnLastFreq = log(MAX(data->lstFreq,N_MINLOG)); data->delLnFreq = data->lnFreq - data->lnLastFreq; if ((job->NStpsSm != 0) && ((step % (job->NStpsSm)) == 0)) { data->prtSummary = TRUE; } else { data->prtSummary = FALSE; } /* data->outNumber = 1; */ data->outNumber = 0; /* the frequency will NOT be stored in array[0] as before; instead, * it will be given in refVal.rValue (see later) */ NInzIter(ckt,posOutNode,negOutNode); /* solve the adjoint system */ /* now we use the adjoint system to calculate the noise * contributions of each generator in the circuit */ error = CKTnoise(ckt,N_DENS,N_CALC,data); if (error) return(error); data->lstFreq = data->freq; /* update the frequency */ switch (job->NstpType) { case DECADE: case OCTAVE: data->freq *= job->NfreqDelta; break; case LINEAR: data->freq += job->NfreqDelta; break; default: return(E_INTERN); } step++; } error = CKTnoise(ckt,N_DENS,N_CLOSE,data); if (error) return(error); data->numPlots = 0; data->outNumber = 0; if (job->NstartFreq != job->NstopFreq) { error = CKTnoise(ckt,INT_NOIZ,N_OPEN,data); if (error) return(error); SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Integrated Noise - V^2 or A^2", NULL, 0, data->numPlots, data->namelist, IF_REAL, &(data->NplotPtr)); error = CKTnoise(ckt,INT_NOIZ,N_CALC,data); if (error) return(error); error = CKTnoise(ckt,INT_NOIZ,N_CLOSE,data); if (error) return(error); } FREE(data); return(OK); } ngspice-26/src/spicelib/analysis/cktfnode.c0000644000265600020320000000120612264261473020375 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* CKTfndNode * find the given node given its name and return the node pointer */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTfndNode(CKTcircuit *ckt, CKTnode **node, IFuid name) { CKTnode *here; for (here = ckt->CKTnodes; here; here = here->next) { if(here->name == name) { if(node) *node = here; return(OK); } } return(E_NOTFOUND); } ngspice-26/src/spicelib/analysis/sensaskq.c0000644000265600020320000000167512264261473020442 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/sensdefs.h" /* ARGSUSED */ int SENSask(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { SENS_AN *job = (SENS_AN *) anal; NG_IGNORE(ckt); switch (which) { case SENS_START: value->rValue = job->start_freq; break; case SENS_STOP: value->rValue = job->stop_freq; break; case SENS_STEPS: value->iValue = job->n_freq_steps; break; case SENS_DEC: case SENS_OCT: case SENS_LIN: case SENS_DC: value->iValue = job->step_type == which; break; case SENS_DEFTOL: job->deftol = value->rValue; break; case SENS_DEFPERTURB: value->rValue = job->defperturb; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/analysis/cktnames.c0000644000265600020320000000161612264261473020412 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ /* * CKTnames(ckt) * output information on all circuit nodes/equations * */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" int CKTnames(CKTcircuit *ckt, int *numNames, IFuid **nameList) { CKTnode *here; int i; *numNames = ckt->CKTmaxEqNum-1; *nameList = TMALLOC(IFuid, *numNames); if ((*nameList) == NULL) return(E_NOMEM); i=0; for (here = ckt->CKTnodes->next; here; here = here->next) { (*nameList) [i++] = here->name; } return(OK); } int CKTdnames(CKTcircuit *ckt) { CKTnode *here; for (here = ckt->CKTnodes->next; here; here = here->next) { printf("%03d: %s\n", here->number, here->name); } return(OK); } ngspice-26/src/spicelib/analysis/nsetparm.c0000644000265600020320000000474412264261473020443 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "analysis.h" int NsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NOISEAN *job = (NOISEAN *) anal; NG_IGNORE(ckt); switch(which) { case N_OUTPUT: job->output = value->nValue; break; case N_OUTREF: job->outputRef = value->nValue; break; case N_INPUT: job->input = value->uValue; break; case N_DEC: job->NstpType = DECADE; break; case N_OCT: job->NstpType = OCTAVE; break; case N_LIN: job->NstpType = LINEAR; break; case N_STEPS: job->NnumSteps = value->iValue; break; case N_START: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid"); job->NstartFreq = 1.0; return(E_PARMVAL); } job->NstartFreq = value->rValue; break; case N_STOP: if (value->rValue <= 0.0) { errMsg = copy("Frequency of 0 is invalid"); job->NstartFreq = 1.0; return(E_PARMVAL); } job->NstopFreq = value->rValue; break; case N_PTSPERSUM: job->NStpsSm = value->iValue; break; default: return(E_BADPARM); } return(OK); } static IFparm Nparms[] = { { "output", N_OUTPUT, IF_SET|IF_STRING, "output noise summation node" }, { "outputref", N_OUTREF, IF_SET|IF_STRING, "output noise reference node" }, { "input", N_INPUT, IF_SET|IF_STRING, "input noise source" }, { "dec", N_DEC, IF_SET|IF_FLAG, "step by decades" }, { "oct", N_OCT, IF_SET|IF_FLAG, "step by octaves" }, { "lin", N_LIN, IF_SET|IF_FLAG, "step linearly" }, { "numsteps", N_STEPS, IF_SET|IF_INTEGER, "number of frequencies" }, { "start", N_START, IF_SET|IF_REAL, "starting frequency" }, { "stop", N_STOP, IF_SET|IF_REAL, "ending frequency" }, { "ptspersum", N_PTSPERSUM, IF_SET|IF_INTEGER, "frequency points per summary report" } }; SPICEanalysis NOISEinfo = { { "NOISE", "Noise analysis", NUMELEMS(Nparms), Nparms }, sizeof(NOISEAN), FREQUENCYDOMAIN, 1, NsetParm, NaskQuest, NULL, NOISEan }; ngspice-26/src/spicelib/analysis/dloadfns.c0000644000265600020320000005037112264261473020401 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" /* * all subFns are local to this file so they need not be renamed to * the awful 7 letter standard; however, for reasons of uniformity, * they are being renamed, losing all readability in the process. * the renaming convention is as follows: * example: 3v3F1m2 * 3v => 3 variable term xyz * 2F1m2 => Two F1 minus F2 * therefore the old name would be : S3v3F1minusF2 * for the imaginary sub functions, the v is replaced by an i * */ static double S2v2F1(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y) /* 5 arguments */ { return(cxy*(r1h1x*r1h1y - i1h1x*i1h1y)); } static double S2i2F1(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y) /* 5 arguments */ { return(cxy*(r1h1x*i1h1y + i1h1x*r1h1y)); } static double S2v3F1(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r2h11x, double i2h11x, double r2h11y, double i2h11y) /* 9 arguments */ { return(cxy*(r1h1x*r2h11y - i1h1x*i2h11y + r1h1y*r2h11x - i1h1y* i2h11x)); } static double S2i3F1(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r2h11x, double i2h11x, double r2h11y, double i2h11y) /* 9 arguments */ { return(cxy*(r1h1x*i2h11y + i1h1x*r2h11y + r1h1y*i2h11x + i1h1y* r2h11x)); } static double S2vF12(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h2x, double i1h2x, double r1h2y, double i1h2y) /* 9 arguments */ { return(cxy*(r1h1x*r1h2y - i1h1x*i1h2y + r1h1y*r1h2x - i1h1y*i1h2x)); } static double S2iF12(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h2x, double i1h2x, double r1h2y, double i1h2y) /* 9 arguments */ { return(cxy*(r1h1x*i1h2y + i1h1x*r1h2y + r1h1y*i1h2x + i1h1y*r1h2x)); } static double S2v2F12(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r2h11x, double i2h11x, double r2h11y, double i2h11y, double h2f1f2x, double ih2f1f2x, double h2f1f2y, double ih2f1f2y) /* 17 arguments */ { return ( cxy * ( 2*(r1h1x*h2f1f2y - i1h1x*ih2f1f2y +r1h1y*h2f1f2x - i1h1y*ih2f1f2x) + r1h2x*r2h11y - i1h2x*i2h11y + r1h2y*r2h11x - i1h2y*i2h11x )); } static double S2i2F12(double cxy, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r2h11x, double i2h11x, double r2h11y, double i2h11y, double h2f1f2x, double ih2f1f2x, double h2f1f2y, double ih2f1f2y) /* 17 arguments */ { return ( cxy * ( 2*(r1h1x*ih2f1f2y + i1h1x*h2f1f2y +r1h1y*ih2f1f2x + i1h1y*h2f1f2x) + r1h2x*i2h11y + i1h2x*r2h11y + r1h2y*i2h11x + i1h2y*r2h11x )); } static double S3v3F1(double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z) /* 7 arguments */ { return( cxyz * ( (r1h1x*r1h1y - i1h1x*i1h1y)*r1h1z - (i1h1x*r1h1y + r1h1x*i1h1y)*i1h1z )); } static double S3i3F1(double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z) /* 7 arguments */ { return( cxyz * ( (r1h1x*r1h1y - i1h1x*i1h1y)*i1h1z + (i1h1x*r1h1y + r1h1x*i1h1y)*r1h1z )); } static double S3v2F12(double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r1h2z, double i1h2z) /* 13 arguments */ { return ( cxyz * ( (r1h1x*r1h1y - i1h1x*i1h1y)*r1h2z - (i1h1x*r1h1y + r1h1x*i1h1y)*i1h2z + (r1h1x*r1h1z - i1h1x*i1h1z)*r1h2y - (i1h1x*r1h1z + r1h1x*i1h1z)*i1h2y + (r1h1z*r1h1y - i1h1z*i1h1y)*r1h2x - (i1h1z*r1h1y + r1h1z*i1h1y)*i1h2x )); } static double S3i2F12(double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r1h2z, double i1h2z) /* 13 arguments */ { return ( cxyz * ( (r1h1x*r1h1y - i1h1x*i1h1y)*i1h2z + (i1h1x*r1h1y + r1h1x*i1h1y)*r1h2z + (r1h1x*r1h1z - i1h1x*i1h1z)*i1h2y + (i1h1x*r1h1z + r1h1x*i1h1z)*r1h2y + (r1h1z*r1h1y - i1h1z*i1h1y)*i1h2x + (i1h1z*r1h1y + r1h1z*i1h1y)*r1h2x )); } /* the load functions */ /* also renamed... */ double DFn2F1(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z) /* 12 variables */ { double temp; temp = S2v2F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x) + S2v2F1(cyy,r1h1y,i1h1y,r1h1y,i1h1y) + S2v2F1(czz,r1h1z,i1h1z,r1h1z,i1h1z) + S2v2F1(cxy,r1h1x,i1h1x,r1h1y,i1h1y) + S2v2F1(cyz,r1h1y,i1h1y,r1h1z,i1h1z) + S2v2F1(cxz,r1h1x,i1h1x,r1h1z,i1h1z); return(temp); } double DFi2F1(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z) /* 12 variables */ { double temp; temp = S2i2F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x) + S2i2F1(cyy,r1h1y,i1h1y,r1h1y,i1h1y) + S2i2F1(czz,r1h1z,i1h1z,r1h1z,i1h1z) + S2i2F1(cxy,r1h1x,i1h1x,r1h1y,i1h1y) + S2i2F1(cyz,r1h1y,i1h1y,r1h1z,i1h1z) + S2i2F1(cxz,r1h1x,i1h1x,r1h1z,i1h1z); return(temp); } double DFn3F1(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double cxxx, double cyyy, double czzz, double cxxy, double cxxz, double cxyy, double cyyz, double cxzz, double cyzz, double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r2h11x, double i2h11x, double r2h11y, double i2h11y, double r2h11z, double i2h11z) /* 28 args - 16 + 6 + 6 */ { double temp; temp = S2v3F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r2h11x,i2h11x,r2h11x,i2h11x) +S2v3F1(cyy,r1h1y,i1h1y,r1h1y,i1h1y,r2h11y,i2h11y,r2h11y,i2h11y) +S2v3F1(czz,r1h1z,i1h1z,r1h1z,i1h1z,r2h11z,i2h11z,r2h11z,i2h11z); temp += S2v3F1(cxy,r1h1x,i1h1x,r1h1y,i1h1y,r2h11x,i2h11x,r2h11y,i2h11y) +S2v3F1(cyz,r1h1y,i1h1y,r1h1z,i1h1z,r2h11y,i2h11y,r2h11z,i2h11z) +S2v3F1(cxz,r1h1x,i1h1x,r1h1z,i1h1z,r2h11x,i2h11x,r2h11z,i2h11z) +S3v3F1(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x); temp += S3v3F1(cyyy,r1h1y,i1h1y,r1h1y,i1h1y,r1h1y,i1h1y) +S3v3F1(czzz,r1h1z,i1h1z,r1h1z,i1h1z,r1h1z,i1h1z) +S3v3F1(cxxy,r1h1x,i1h1x,r1h1x,i1h1x,r1h1y,i1h1y) +S3v3F1(cxxz,r1h1x,i1h1x,r1h1x,i1h1x,r1h1z,i1h1z) +S3v3F1(cxyy,r1h1x,i1h1x,r1h1y,i1h1y,r1h1y,i1h1y); temp += S3v3F1(cyyz,r1h1y,i1h1y,r1h1y,i1h1y,r1h1z,i1h1z) +S3v3F1(cxzz,r1h1x,i1h1x,r1h1z,i1h1z,r1h1z,i1h1z) +S3v3F1(cyzz,r1h1y,i1h1y,r1h1z,i1h1z,r1h1z,i1h1z) +S3v3F1(cxyz,r1h1x,i1h1x,r1h1y,i1h1y,r1h1z,i1h1z); return(temp); } double DFi3F1(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double cxxx, double cyyy, double czzz, double cxxy, double cxxz, double cxyy, double cyyz, double cxzz, double cyzz, double cxyz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r2h11x, double i2h11x, double r2h11y, double i2h11y, double r2h11z, double i2h11z) /* 28 args - 10 + 6 + 6 */ { double temp; temp = S2i3F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r2h11x,i2h11x,r2h11x,i2h11x) +S2i3F1(cyy,r1h1y,i1h1y,r1h1y,i1h1y,r2h11y,i2h11y,r2h11y,i2h11y) +S2i3F1(czz,r1h1z,i1h1z,r1h1z,i1h1z,r2h11z,i2h11z,r2h11z,i2h11z) +S2i3F1(cxy,r1h1x,i1h1x,r1h1y,i1h1y,r2h11x,i2h11x,r2h11y,i2h11y); temp += S2i3F1(cyz,r1h1y,i1h1y,r1h1z,i1h1z,r2h11y,i2h11y,r2h11z,i2h11z) +S2i3F1(cxz,r1h1x,i1h1x,r1h1z,i1h1z,r2h11x,i2h11x,r2h11z,i2h11z) +S3i3F1(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x) +S3i3F1(cyyy,r1h1y,i1h1y,r1h1y,i1h1y,r1h1y,i1h1y); temp += S3i3F1(czzz,r1h1z,i1h1z,r1h1z,i1h1z,r1h1z,i1h1z) +S3i3F1(cxxy,r1h1x,i1h1x,r1h1x,i1h1x,r1h1y,i1h1y) +S3i3F1(cxxz,r1h1x,i1h1x,r1h1x,i1h1x,r1h1z,i1h1z) +S3i3F1(cxyy,r1h1x,i1h1x,r1h1y,i1h1y,r1h1y,i1h1y); temp += S3i3F1(cyyz,r1h1y,i1h1y,r1h1y,i1h1y,r1h1z,i1h1z) +S3i3F1(cxzz,r1h1x,i1h1x,r1h1z,i1h1z,r1h1z,i1h1z) +S3i3F1(cyzz,r1h1y,i1h1y,r1h1z,i1h1z,r1h1z,i1h1z) +S3i3F1(cxyz,r1h1x,i1h1x,r1h1y,i1h1y,r1h1z,i1h1z); return(temp); } double DFnF12(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r1h2z, double i1h2z) /* 18 args - 6 + 6 + 6 */ { double temp; temp = S2vF12(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h2x,i1h2x,r1h2x,i1h2x) +S2vF12(cyy,r1h1y,i1h1y,r1h1y,i1h1y,r1h2y,i1h2y,r1h2y,i1h2y) +S2vF12(czz,r1h1z,i1h1z,r1h1z,i1h1z,r1h2z,i1h2z,r1h2z,i1h2z); temp += S2vF12(cxy,r1h1x,i1h1x,r1h1y,i1h1y,r1h2x,i1h2x,r1h2y,i1h2y) +S2vF12(cyz,r1h1y,i1h1y,r1h1z,i1h1z,r1h2y,i1h2y,r1h2z,i1h2z) +S2vF12(cxz,r1h1x,i1h1x,r1h1z,i1h1z,r1h2x,i1h2x,r1h2z,i1h2z); return(0.5*temp); } double DFiF12(double cxx, double cyy, double czz, double cxy, double cyz, double cxz, double r1h1x, double i1h1x, double r1h1y, double i1h1y, double r1h1z, double i1h1z, double r1h2x, double i1h2x, double r1h2y, double i1h2y, double r1h2z, double i1h2z) /* 18 args - 6 + 6 + 6 */ { double temp; temp = S2iF12(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h2x,i1h2x,r1h2x,i1h2x) +S2iF12(cyy,r1h1y,i1h1y,r1h1y,i1h1y,r1h2y,i1h2y,r1h2y,i1h2y) +S2iF12(czz,r1h1z,i1h1z,r1h1z,i1h1z,r1h2z,i1h2z,r1h2z,i1h2z); temp += S2iF12(cxy,r1h1x,i1h1x,r1h1y,i1h1y,r1h2x,i1h2x,r1h2y,i1h2y) +S2iF12(cyz,r1h1y,i1h1y,r1h1z,i1h1z,r1h2y,i1h2y,r1h2z,i1h2z) +S2iF12(cxz,r1h1x,i1h1x,r1h1z,i1h1z,r1h2x,i1h2x,r1h2z,i1h2z); return(temp*0.5); /* divided by two to scale down */ } double DFn2F12(DpassStr *p) /* 40 vars - 16 + 6 + 6 + 6 + 6 */ /* * a structure because a standard C compiler can handle only * 32 variables. * */ { double temp; temp = S2v2F12(p->cxx,p->r1h1x,p->i1h1x, p->r1h1x,p->i1h1x, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x, p->r2h11x,p->i2h11x, p->r2h11x,p->i2h11x, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2x,p->ih2f1f2x); temp += S2v2F12(p->cyy,p->r1h1y,p->i1h1y, p->r1h1y,p->i1h1y, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y, p->r2h11y,p->i2h11y, p->r2h11y,p->i2h11y, p->h2f1f2y,p->ih2f1f2y, p->h2f1f2y,p->ih2f1f2y); temp += S2v2F12(p->czz,p->r1h1z,p->i1h1z, p->r1h1z,p->i1h1z, p->r1h2z,p->i1h2z, p->r1h2z,p->i1h2z, p->r2h11z,p->i2h11z, p->r2h11z,p->i2h11z, p->h2f1f2z,p->ih2f1f2z, p->h2f1f2z,p->ih2f1f2z); temp += S2v2F12(p->cxy,p->r1h1x,p->i1h1x, p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y, p->r2h11x,p->i2h11x, p->r2h11y,p->i2h11y, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2y,p->ih2f1f2y); temp += S2v2F12(p->cyz,p->r1h1y,p->i1h1y, p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2z,p->i1h2z, p->r2h11y,p->i2h11y, p->r2h11z,p->i2h11z, p->h2f1f2y,p->ih2f1f2y, p->h2f1f2z,p->ih2f1f2z); temp += S2v2F12(p->cxz,p->r1h1x,p->i1h1x, p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2z,p->i1h2z, p->r2h11x,p->i2h11x, p->r2h11z,p->i2h11z, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2z,p->ih2f1f2z); temp += S3v2F12(p->cxxx,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1x,p->i1h1x, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2x,p->i1h2x) +S3v2F12(p->cyyy,p->r1h1y, p->i1h1y,p->r1h1y,p->i1h1y,p->r1h1y,p->i1h1y, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y,p->r1h2y,p->i1h2y); temp += S3v2F12(p->czzz,p->r1h1z, p->i1h1z,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2z,p->i1h2z, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z) +S3v2F12(p->cxxy,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2y,p->i1h2y); temp += S3v2F12(p->cxxz,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2z,p->i1h2z) +S3v2F12(p->cxyy,p->r1h1x, p->i1h1x,p->r1h1y,p->i1h1y,p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y,p->r1h2y,p->i1h2y); temp += S3v2F12(p->cyyz,p->r1h1y, p->i1h1y,p->r1h1y,p->i1h1y,p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y,p->r1h2z,p->i1h2z) +S3v2F12(p->cxzz,p->r1h1x, p->i1h1x,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z); temp += S3v2F12(p->cyzz,p->r1h1y, p->i1h1y,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z) +S3v2F12(p->cxyz,p->r1h1x, p->i1h1x,p->r1h1y,p->i1h1y,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y,p->r1h2z,p->i1h2z); return(temp/3.); /* divided by 3 to get kernel (otherwise we get 3*kernel) */ } double DFi2F12(DpassStr *p) /* 40 vars - 16 + 6 + 6 + 6 + 6 */ { double temp; temp = S2i2F12(p->cxx,p->r1h1x,p->i1h1x, p->r1h1x,p->i1h1x, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x, p->r2h11x,p->i2h11x, p->r2h11x,p->i2h11x, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2x,p->ih2f1f2x); temp += S2i2F12(p->cyy,p->r1h1y,p->i1h1y, p->r1h1y,p->i1h1y, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y, p->r2h11y,p->i2h11y, p->r2h11y,p->i2h11y, p->h2f1f2y,p->ih2f1f2y, p->h2f1f2y,p->ih2f1f2y); temp += S2i2F12(p->czz,p->r1h1z,p->i1h1z, p->r1h1z,p->i1h1z, p->r1h2z,p->i1h2z, p->r1h2z,p->i1h2z, p->r2h11z,p->i2h11z, p->r2h11z,p->i2h11z, p->h2f1f2z,p->ih2f1f2z, p->h2f1f2z,p->ih2f1f2z); temp += S2i2F12(p->cxy,p->r1h1x,p->i1h1x, p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y, p->r2h11x,p->i2h11x, p->r2h11y,p->i2h11y, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2y,p->ih2f1f2y); temp += S2i2F12(p->cyz,p->r1h1y,p->i1h1y, p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2z,p->i1h2z, p->r2h11y,p->i2h11y, p->r2h11z,p->i2h11z, p->h2f1f2y,p->ih2f1f2y, p->h2f1f2z,p->ih2f1f2z); temp += S2i2F12(p->cxz,p->r1h1x,p->i1h1x, p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2z,p->i1h2z, p->r2h11x,p->i2h11x, p->r2h11z,p->i2h11z, p->h2f1f2x,p->ih2f1f2x, p->h2f1f2z,p->ih2f1f2z); temp += S3i2F12(p->cxxx,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1x,p->i1h1x, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2x,p->i1h2x); temp += S3i2F12(p->cyyy,p->r1h1y, p->i1h1y,p->r1h1y,p->i1h1y,p->r1h1y,p->i1h1y, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y,p->r1h2y,p->i1h2y) +S3i2F12(p->czzz,p->r1h1z, p->i1h1z,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2z,p->i1h2z, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z); temp += S3i2F12(p->cxxy,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2y,p->i1h2y) +S3i2F12(p->cxxz,p->r1h1x, p->i1h1x,p->r1h1x,p->i1h1x,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2x,p->i1h2x,p->r1h2z,p->i1h2z); temp += S3i2F12(p->cxyy,p->r1h1x, p->i1h1x,p->r1h1y,p->i1h1y,p->r1h1y,p->i1h1y, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y,p->r1h2y,p->i1h2y) +S3i2F12(p->cyyz,p->r1h1y, p->i1h1y,p->r1h1y,p->i1h1y,p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2y,p->i1h2y,p->r1h2z,p->i1h2z); temp += S3i2F12(p->cxzz,p->r1h1x, p->i1h1x,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z); temp += S3i2F12(p->cyzz,p->r1h1y, p->i1h1y,p->r1h1z,p->i1h1z,p->r1h1z,p->i1h1z, p->r1h2y,p->i1h2y, p->r1h2z,p->i1h2z,p->r1h2z,p->i1h2z) +S3i2F12(p->cxyz,p->r1h1x, p->i1h1x,p->r1h1y,p->i1h1y,p->r1h1z,p->i1h1z, p->r1h2x,p->i1h2x, p->r1h2y,p->i1h2y,p->r1h2z,p->i1h2z); return(temp/3.); /* divided by 3 to get kernel (otherwise we get 3*kernel) */ } double D1n2F1(double cxx, double r1h1x, double i1h1x) /* 12 variables */ { double temp; temp = S2v2F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x); return(temp); } double D1n3F1(double cxx, double cxxx, double r1h1x, double i1h1x, double r2h11x, double i2h11x) { double temp; temp = S2v3F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r2h11x,i2h11x,r2h11x,i2h11x) +S3v3F1(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x); return(temp); } double D1nF12(double cxx, double r1h1x, double i1h1x, double r1h2x, double i1h2x) /* 18 args - 6 + 6 + 6 */ { double temp; temp = S2vF12(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h2x,i1h2x,r1h2x,i1h2x); return(0.5*temp); } double D1n2F12(double cxx, double cxxx, double r1h1x, double i1h1x, double r1h2x, double i1h2x, double r2h11x, double i2h11x, double h2f1f2x, double ih2f1f2x) /* 40 vars - 16 + 6 + 6 + 6 + 6 */ { double temp; temp = S2v2F12(cxx,r1h1x,i1h1x,r1h1x,i1h1x, r1h2x,i1h2x,r1h2x,i1h2x, r2h11x,i2h11x,r2h11x,i2h11x, h2f1f2x,ih2f1f2x,h2f1f2x,ih2f1f2x) +S3v2F12(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x, r1h2x,i1h2x,r1h2x,i1h2x,r1h2x,i1h2x); return(temp/3.); /* divided by 3 to get kernel (otherwise we get 3*kernel) */ } double D1i2F1(double cxx, double r1h1x, double i1h1x) /* 12 variables */ { double temp; temp = S2i2F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x); return(temp); } double D1i3F1(double cxx, double cxxx, double r1h1x, double i1h1x, double r2h11x, double i2h11x) { double temp; temp = S2i3F1(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r2h11x,i2h11x,r2h11x,i2h11x) +S3i3F1(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x); return(temp); } double D1iF12(double cxx, double r1h1x, double i1h1x, double r1h2x, double i1h2x) /* 18 args - 6 + 6 + 6 */ { double temp; temp = S2iF12(cxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h2x,i1h2x,r1h2x,i1h2x); return(0.5*temp); } double D1i2F12(double cxx, double cxxx, double r1h1x, double i1h1x, double r1h2x, double i1h2x, double r2h11x, double i2h11x, double h2f1f2x, double ih2f1f2x) /* 40 vars - 16 + 6 + 6 + 6 + 6 */ { double temp; temp = S2i2F12(cxx,r1h1x,i1h1x,r1h1x,i1h1x, r1h2x,i1h2x,r1h2x,i1h2x, r2h11x,i2h11x,r2h11x,i2h11x, h2f1f2x,ih2f1f2x,h2f1f2x,ih2f1f2x) +S3i2F12(cxxx,r1h1x,i1h1x,r1h1x,i1h1x,r1h1x,i1h1x, r1h2x,i1h2x,r1h2x,i1h2x,r1h2x,i1h2x); return(temp/3.); /* divided by 3 to get kernel (otherwise we get 3*kernel) */ } ngspice-26/src/spicelib/analysis/ckttrunc.c0000644000265600020320000001264212264261473020443 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTtrunc(ckt) * this is a driver program to iterate through all the various * truncation error functions provided for the circuit elements in the * given circuit */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" int CKTtrunc(CKTcircuit *ckt, double *timeStep) { #ifndef NEWTRUNC int i; double timetemp; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ double startTime; int error = OK; startTime = SPfrontEnd->IFseconds(); timetemp = HUGE; for (i=0;iDEVtrunc && ckt->CKThead[i]) { #ifdef STEPDEBUG debugtemp = timetemp; #endif /* STEPDEBUG */ error = DEVices[i]->DEVtrunc (ckt->CKThead[i], ckt, &timetemp); if(error) { ckt->CKTstat->STATtranTruncTime += SPfrontEnd->IFseconds() - startTime; return(error); } #ifdef STEPDEBUG if(debugtemp != timetemp) { printf("timestep cut by device type %s from %g to %g\n", DEVices[i]->DEVpublic.name, debugtemp, timetemp); } #endif /* STEPDEBUG */ } } *timeStep = MIN(2 * *timeStep,timetemp); ckt->CKTstat->STATtranTruncTime += SPfrontEnd->IFseconds() - startTime; return(OK); #else /* NEWTRUNC */ int i; CKTnode *node; double timetemp; double tmp; double diff; double tol; double startTime; int size; startTime = SPfrontEnd->IFseconds(); timetemp = HUGE; size = SMPmatSize(ckt->CKTmatrix); #ifdef STEPDEBUG printf("at time %g, delta %g\n",ckt->CKTtime,ckt->CKTdeltaOld[0]); #endif STEPDEBUG node = ckt->CKTnodes; switch(ckt->CKTintegrateMethod) { case TRAPEZOIDAL: switch(ckt->CKTorder) { case 1: for(i=1;iCKTrhs[i]),fabs(ckt->CKTpred[i]))* ckt->CKTlteReltol+ckt->CKTlteAbstol; node = node->next; if(node->type!= SP_VOLTAGE) continue; diff = ckt->CKTrhs[i]-ckt->CKTpred[i]; #ifdef STEPDEBUG printf("%s: cor=%g, pred=%g ",node->name, ckt->CKTrhs[i],ckt->CKTpred[i]); #endif if(diff != 0) { tmp = ckt->CKTtrtol * tol * 2 /diff; tmp = ckt->CKTdeltaOld[0]*sqrt(fabs(tmp)); timetemp = MIN(timetemp,tmp); #ifdef STEPDEBUG printf("tol = %g, diff = %g, h->%g\n",tol,diff,tmp); #endif } else { #ifdef STEPDEBUG printf("diff is 0\n"); #endif } } break; case 2: for(i=1;iCKTrhs[i]),fabs(ckt->CKTpred[i]))* ckt->CKTlteReltol+ckt->CKTlteAbstol; node = node->next; if(node->type!= SP_VOLTAGE) continue; diff = ckt->CKTrhs[i]-ckt->CKTpred[i]; #ifdef STEPDEBUG printf("%s: cor=%g, pred=%g ",node->name,ckt->CKTrhs[i], ckt->CKTpred[i]); #endif if(diff != 0) { tmp = ckt->CKTdeltaOld[0]*ckt->CKTtrtol * tol * 3 * (ckt->CKTdeltaOld[0]+ckt->CKTdeltaOld[1])/diff; tmp = fabs(tmp); timetemp = MIN(timetemp,tmp); #ifdef STEPDEBUG printf("tol = %g, diff = %g, h->%g\n",tol,diff,tmp); #endif } else { #ifdef STEPDEBUG printf("diff is 0\n"); #endif } } break; default: return(E_ORDER); break; } break; case GEAR: { double delsum=0; for(i=0;i<=ckt->CKTorder;i++) { delsum += ckt->CKTdeltaOld[i]; } for(i=1;inext; if(node->type!= SP_VOLTAGE) continue; tol = MAX( fabs(ckt->CKTrhs[i]),fabs(ckt->CKTpred[i]))* ckt->CKTlteReltol+ckt->CKTlteAbstol; diff = (ckt->CKTrhs[i]-ckt->CKTpred[i]); #ifdef STEPDEBUG printf("%s: cor=%g, pred=%g ",node->name,ckt->CKTrhs[i], ckt->CKTpred[i]); #endif if(diff != 0) { tmp = tol*ckt->CKTtrtol*delsum/(diff*ckt->CKTdelta); tmp = fabs(tmp); switch(ckt->CKTorder) { case 0: break; case 1: tmp = sqrt(tmp); break; default: tmp = exp(log(tmp)/(ckt->CKTorder+1)); break; } tmp *= ckt->CKTdelta; timetemp = MIN(timetemp,tmp); #ifdef STEPDEBUG printf("tol = %g, diff = %g, h->%g\n",tol,diff,tmp); #endif } else { #ifdef STEPDEBUG printf("diff is 0\n"); #endif } } } break; default: return(E_METHOD); } *timeStep = MIN(2 * *timeStep,timetemp); ckt->CKTstat->STATtranTruncTime += SPfrontEnd->IFseconds() - startTime; return(OK); #endif /* NEWTRUNC */ } ngspice-26/src/spicelib/analysis/cktdltn.c0000644000265600020320000000164612264261473020253 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. **********/ /* CKTdltNod */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTdltNod(CKTcircuit *ckt, CKTnode *node) { return CKTdltNNum(ckt, node->number); } int CKTdltNNum(CKTcircuit *ckt, int num) { CKTnode *n, *prev, *node, *sprev; int error; prev = NULL; node = NULL; sprev = NULL; for (n = ckt->CKTnodes; n; n = n->next) { if (n->number == num) { node = n; sprev = prev; } prev = n; } if (!node) return OK; ckt->CKTmaxEqNum -= 1; if (!sprev) { ckt->CKTnodes = node->next; } else { sprev->next = node->next; } if (node == ckt->CKTlastNode) ckt->CKTlastNode = sprev; error = SPfrontEnd->IFdelUid (ckt, node->name, UID_SIGNAL); tfree(node); return error; } ngspice-26/src/spicelib/analysis/ckttemp.c0000644000265600020320000000153712264261473020256 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTtemp(ckt) * this is a driver program to iterate through all the various * temperature dependency functions provided for the circuit * elements in the given circuit */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" int CKTtemp(CKTcircuit *ckt) { int error; int i; ckt->CKTvt = CONSTKoverQ * ckt->CKTtemp; for (i=0;iDEVtemperature && ckt->CKThead[i] ) { error = DEVices[i]->DEVtemperature (ckt->CKThead[i], ckt); if(error) return(error); } } return(OK); } ngspice-26/src/spicelib/analysis/cktmask.c0000644000265600020320000000125412264261473020240 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTmodAsk * Ask questions about a specified device. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" /* ARGSUSED */ int CKTmodAsk(CKTcircuit *ckt, GENmodel *modfast, int which, IFvalue *value, IFvalue *selector) { int type = modfast->GENmodType; NG_IGNORE(selector); if(DEVices[type]->DEVmodAsk) { return( DEVices[type]->DEVmodAsk (ckt, modfast, which, value) ); } return(E_BADPARM); } ngspice-26/src/spicelib/analysis/dcoaskq.c0000644000265600020320000000073712264261473020235 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/opdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int DCOaskQuest(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NG_IGNORE(ckt); NG_IGNORE(anal); NG_IGNORE(which); NG_IGNORE(value); return(E_BADPARM); } ngspice-26/src/spicelib/analysis/dcpss.c0000644000265600020320000016772012264261473017732 0ustar andreasadmin/********** Author: 2010-05 Stefano Perticaroli ``spertica'' First Review: 2012-02 Francesco Lannutti and Stefano Perticaroli ``spertica'' Second Review: 2012-10 Stefano Perticaroli ``spertica'' and Francesco Lannutti **********/ /* Include files for the PSS analysis */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cktaccept.h" #include "ngspice/pssdefs.h" #include "ngspice/sperror.h" #include "ngspice/fteext.h" #ifdef XSPICE /* gtri - add - wbk - Add headers */ #include "ngspice/miftypes.h" #include "ngspice/evt.h" #include "ngspice/mif.h" #include "ngspice/evtproto.h" #include "ngspice/ipctiein.h" /* gtri - end - wbk - Add headers */ #endif #ifdef CLUSTER #include "ngspice/cluster.h" #endif #define INIT_STATS() \ do { \ startTime = SPfrontEnd->IFseconds(); \ startIters = ckt->CKTstat->STATnumIter; \ startdTime = ckt->CKTstat->STATdecompTime; \ startsTime = ckt->CKTstat->STATsolveTime; \ startlTime = ckt->CKTstat->STATloadTime; \ startkTime = ckt->CKTstat->STATsyncTime; \ } while(0) #define UPDATE_STATS(analysis) \ do { \ ckt->CKTcurrentAnalysis = analysis; \ ckt->CKTstat->STATtranTime += SPfrontEnd->IFseconds() - startTime; \ ckt->CKTstat->STATtranIter += ckt->CKTstat->STATnumIter - startIters; \ ckt->CKTstat->STATtranDecompTime += ckt->CKTstat->STATdecompTime - startdTime; \ ckt->CKTstat->STATtranSolveTime += ckt->CKTstat->STATsolveTime - startsTime; \ ckt->CKTstat->STATtranLoadTime += ckt->CKTstat->STATloadTime - startlTime; \ ckt->CKTstat->STATtranSyncTime += ckt->CKTstat->STATsyncTime - startkTime; \ } while(0) /* Define some useful macro */ #define HISTORY 1024 #define GF_LAST 313 static int DFT(long int, int, double *, double *, double *, double, double *, double *, double *, double *, double *); int DCpss(CKTcircuit *ckt, int restart) /* forced restart flag */ { PSSan *job = (PSSan *) ckt->CKTcurJob; int i; double olddelta; double delta; double newdelta; double *temp; double startdTime; double startsTime; double startlTime; double startkTime; double startTime; int startIters; int converged; int firsttime; int error; int save_order; long save_mode; IFuid timeUid; IFuid *nameList; int numNames; double maxstepsize = 0.0; int ltra_num; CKTnode *node; #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ Ipc_Boolean_t ipc_firsttime = IPC_TRUE; Ipc_Boolean_t ipc_secondtime = IPC_FALSE; Ipc_Boolean_t ipc_delta_cut = IPC_FALSE; double ipc_last_time = 0.0; double ipc_last_delta = 0.0; /* gtri - end - wbk - 12/19/90 - Add IPC stuff */ #endif #ifdef CLUSTER int redostep; #endif /* New variables */ int j, oscnNode; IFuid freqUid; enum {STABILIZATION, SHOOTING, PSS} pss_state = STABILIZATION; double err = 0, predsum = 0 ; double time_temp = 0, gf_history [HISTORY], rr_history [HISTORY], predsum_history [HISTORY], nextstep ; int msize, shooting_cycle_counter = 0; double *RHS_copy_se, *RHS_copy_der, *RHS_derivative, *pred, err_0 = HUGE_VAL ; double time_err_min_1 = 0, time_err_min_0 = 0, err_min_0 = HUGE_VAL, err_min_1 = 0 ; double err_1 = 0, err_max = HUGE_VAL ; int pss_points_cycle = 0, dynamic_test = 0 ; double gf_last_0 = HUGE_VAL, gf_last_1 = GF_LAST ; double thd = 0 ; double *psstimes, *pssvalues; double *RHS_max, *RHS_min, *err_conv ; /* Francesco Lannutti's MOD */ /* Stuff needed by frequency estimation reiteration, based on the DFT result */ int position; double max_freq; /* Print some useful information */ fprintf (stderr, "Periodic Steady State Analysis Started\n\n") ; fprintf (stderr, "PSS Guessed Frequency %g\n", ckt->CKTguessedFreq) ; fprintf (stderr, "PSS Points %ld\n", ckt->CKTpsspoints) ; fprintf (stderr, "PSS Harmonics number %d\n", ckt->CKTharms) ; fprintf (stderr, "PSS Steady Coefficient %g\n", ckt->CKTsteady_coeff) ; fprintf (stderr, "PSS sc_iter %d\n", ckt->CKTsc_iter) ; fprintf (stderr, "PSS Stabilization Time %g\n", ckt->CKTstabTime) ; oscnNode = job->PSSoscNode->number ; /* Variables and memory initialization */ for (i = 0 ; i < HISTORY ; i++) { rr_history [i] = 0.0 ; gf_history [i] = 0.0 ; } msize = SMPmatSize (ckt->CKTmatrix) ; RHS_copy_se = TMALLOC (double, msize) ; /* Set the current RHS reference for next Shooting Evaluation */ RHS_copy_der = TMALLOC (double, msize) ; /* Used to compute current Derivative */ RHS_derivative = TMALLOC (double, msize) ; pred = TMALLOC (double, msize) ; RHS_max = TMALLOC (double, msize) ; RHS_min = TMALLOC (double, msize) ; err_conv = TMALLOC (double, msize) ; for (i = 0 ; i < msize ; i++) { RHS_copy_se [i] = 0.0 ; RHS_copy_der [i] = 0.0 ; RHS_derivative [i] = 0.0 ; pred [i] = 0.0 ; } psstimes = TMALLOC (double, ckt->CKTpsspoints + 1) ; pssvalues = TMALLOC (double, msize * (ckt->CKTpsspoints + 1)) ; for (i = 0 ; i < ckt->CKTpsspoints + 1 ; i++) psstimes [i] = 0.0 ; for (i = 0 ; i < msize * (ckt->CKTpsspoints + 1) ; i++) pssvalues [i] = 0.0 ; /* Delta timestep and circuit time setup */ delta = ckt->CKTstep ; ckt->CKTtime = ckt->CKTinitTime ; ckt->CKTfinalTime = ckt->CKTstabTime ; /* Starting PSS Algorithm, based on Transient Analysis */ if(restart || ckt->CKTtime == 0) { delta = MIN (1 / ckt->CKTguessedFreq / 100, ckt->CKTstep) ; #ifdef STEPDEBUG fprintf (stderr, "delta = %g finalTime/200: %g CKTstep: %g\n", delta, ckt->CKTfinalTime / 200, ckt->CKTstep) ; #endif /* begin LTRA code addition */ if (ckt->CKTtimePoints != NULL) FREE(ckt->CKTtimePoints); if (ckt->CKTstep >= ckt->CKTmaxStep) maxstepsize = ckt->CKTstep; else maxstepsize = ckt->CKTmaxStep; ckt->CKTsizeIncr = 10; ckt->CKTtimeIndex = -1; /* before the DC soln has been stored */ ckt->CKTtimeListSize = (int)(1 / ckt->CKTguessedFreq / maxstepsize + 0.5); ltra_num = CKTtypelook("LTRA"); if (ltra_num >= 0 && ckt->CKThead[ltra_num] != NULL) ckt->CKTtimePoints = NEWN(double, ckt->CKTtimeListSize); /* end LTRA code addition */ /* Breakpoints initialization */ if(ckt->CKTbreaks) FREE(ckt->CKTbreaks); ckt->CKTbreaks = TMALLOC(double, 2); if(ckt->CKTbreaks == NULL) return(E_NOMEM); ckt->CKTbreaks[0] = 0; ckt->CKTbreaks[1] = ckt->CKTfinalTime; ckt->CKTbreakSize = 2; #ifdef XSPICE /* gtri - begin - wbk - 12/19/90 - Modify setting of CKTminBreak */ /* if (ckt->CKTminBreak == 0) ckt->CKTminBreak = ckt->CKTmaxStep * 5e-5 ; */ /* Set to 10 times delmin for ATESSE 1 compatibity */ if(ckt->CKTminBreak==0) ckt->CKTminBreak = 10.0 * ckt->CKTdelmin; /* gtri - end - wbk - 12/19/90 - Modify setting of CKTminBreak */ #else /* Minimum Breakpoint Setup */ if(ckt->CKTminBreak==0) ckt->CKTminBreak=ckt->CKTmaxStep*5e-5; #endif #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff and set anal_init and anal_type */ /* Tell the beginPlot routine what mode we're in */ g_ipc.anal_type = IPC_ANAL_TRAN; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.circuit.anal_init = MIF_TRUE; /* gtri - end - wbk */ #endif /* Time Domain plot start and prepared to be filled in later */ error = CKTnames(ckt,&numNames,&nameList); if(error) return(error); SPfrontEnd->IFnewUid (ckt, &timeUid, NULL, "time", UID_OTHER, NULL); error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Time Domain Periodic Steady State Analysis", timeUid, IF_REAL, numNames, nameList, IF_REAL, &(job->PSSplot_td)); tfree(nameList); if(error) return(error); /* Time initialization for Transient Analysis */ ckt->CKTtime = 0; ckt->CKTdelta = 0; ckt->CKTbreak = 1; firsttime = 1; save_mode = (ckt->CKTmode&MODEUIC) | MODETRANOP | MODEINITJCT; save_order = ckt->CKTorder; #ifdef XSPICE /* gtri - begin - wbk - set a breakpoint at end of supply ramping time */ /* must do this after CKTtime set to 0 above */ if(ckt->enh->ramp.ramptime > 0.0) CKTsetBreak(ckt, ckt->enh->ramp.ramptime); /* gtri - end - wbk - set a breakpoint at end of supply ramping time */ /* gtri - begin - wbk - Call EVTop if event-driven instances exist */ if(ckt->evt->counts.num_insts != 0) { /* use new DCOP algorithm */ converged = EVTop(ckt, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITFLOAT, ckt->CKTdcMaxIter, MIF_TRUE); EVTdump(ckt, IPC_ANAL_DCOP, 0.0); EVTop_save(ckt, MIF_FALSE, 0.0); /* gtri - end - wbk - Call EVTop if event-driven instances exist */ } else #endif /* Looking for a working Operating Point */ converged = CKTop(ckt, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITJCT, (ckt->CKTmode & MODEUIC) | MODETRANOP | MODEINITFLOAT, ckt->CKTdcMaxIter); #ifdef STEPDEBUG if(converged != 0) { fprintf(stdout,"\nTransient solution failed -\n"); CKTncDump(ckt); /* CKTnode *node; double new, old, tol; int i=1; fprintf(stdout,"\nTransient solution failed -\n\n"); fprintf(stdout,"Last Node Voltages\n"); fprintf(stdout,"------------------\n\n"); fprintf(stdout,"%-30s %20s %20s\n", "Node", "Last Voltage", "Previous Iter"); fprintf(stdout,"%-30s %20s %20s\n", "----", "------------", "-------------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) { new = ckt->CKTrhsOld [i] ; old = ckt->CKTrhs [i] ; fprintf(stdout,"%-30s %20g %20g", node->name, new, old); if(node->type == SP_VOLTAGE) { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTvoltTol; } else { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTabstol; } if (fabs(new-old) >tol ) { fprintf(stdout," *"); } fprintf(stdout,"\n"); } i++; } */ fprintf(stdout,"\n"); fflush(stdout); } else if (!ft_noacctprint && !ft_noinitprint) { fprintf(stdout,"\nInitial Transient Solution\n"); fprintf(stdout,"--------------------------\n\n"); fprintf(stdout,"%-30s %15s\n", "Node", "Voltage"); fprintf(stdout,"%-30s %15s\n", "----", "-------"); for(node=ckt->CKTnodes->next;node;node=node->next) { if (strstr(node->name, "#branch") || !strstr(node->name, "#")) fprintf(stdout,"%-30s %15g\n", node->name, ckt->CKTrhsOld[node->number]); } fprintf(stdout,"\n"); fflush(stdout); } #endif /* If no convergence reached - NO valid Operating Point */ if(converged != 0) return(converged); #ifdef XSPICE /* gtri - add - wbk - 12/19/90 - Add IPC stuff */ /* Send the operating point results for Mspice compatibility */ if(g_ipc.enabled) { ipc_send_dcop_prefix(); CKTdump(ckt, 0.0, job->PSSplot_td); ipc_send_dcop_suffix(); } /* gtri - end - wbk */ /* gtri - add - wbk - 12/19/90 - set anal_init and anal_type */ g_mif_info.circuit.anal_init = MIF_TRUE; /* Tell the code models what mode we're in */ g_mif_info.circuit.anal_type = MIF_TRAN; /* gtri - end - wbk */ /* gtri - begin - wbk - Add Breakpoint stuff */ /* Initialize the temporary breakpoint variables to infinity */ g_mif_info.breakpoint.current = HUGE_VAL; g_mif_info.breakpoint.last = HUGE_VAL; /* gtri - end - wbk - Add Breakpoint stuff */ #endif ckt->CKTstat->STATtimePts ++; /* Setting Integration Order to Backward Euler */ ckt->CKTorder = 1; /* Copying the maxStep to every deltaOld */ for(i=0;i<7;i++) { ckt->CKTdeltaOld[i]=ckt->CKTmaxStep; } /* Setting DELTA */ ckt->CKTdelta = delta; #ifdef STEPDEBUG fprintf (stderr, "delta initialized to %g\n", ckt->CKTdelta); #endif ckt->CKTsaveDelta = ckt->CKTfinalTime/50; ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITTRAN; /* Changing Circuit MODE */ /* modeinittran set here */ ckt->CKTag[0]=ckt->CKTag[1]=0; /* State0 copied into State1 - DEPRECATED LEGACY function - to be replaced with memmove() */ bcopy(ckt->CKTstate0, ckt->CKTstate1, (size_t) ckt->CKTnumStates * sizeof(double)); /* Statistics Initialization using a macro at the beginning of this code */ INIT_STATS(); #ifdef CLUSTER CLUsetup(ckt); #endif } else { /* saj As traninit resets CKTmode */ ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITPRED; /* saj */ INIT_STATS(); if(ckt->CKTminBreak==0) ckt->CKTminBreak=ckt->CKTmaxStep*5e-5; firsttime=0; /* To get rawfile working saj*/ error = SPfrontEnd->OUTpBeginPlot (NULL, NULL, NULL, NULL, 0, 666, NULL, 666, &(job->PSSplot_td)); if(error) { fprintf(stderr, "Couldn't relink rawfile\n"); return error; } /* end saj*/ /* Skip nextTime if it isn't the firsttime! :) */ goto resume; } /* 650 */ nextTime: /* begin LTRA code addition */ if (ckt->CKTtimePoints) { ckt->CKTtimeIndex++; if (ckt->CKTtimeIndex >= ckt->CKTtimeListSize) { /* need more space */ int need; if (pss_state == STABILIZATION) need = (int) ceil((ckt->CKTstabTime - ckt->CKTtime) / maxstepsize ) ; else need = (int) ceil((time_temp + 1 / ckt->CKTguessedFreq - ckt->CKTtime) / maxstepsize) ; if (need < ckt->CKTsizeIncr) need = ckt->CKTsizeIncr; ckt->CKTtimeListSize += need; ckt->CKTtimePoints = TREALLOC(double, ckt->CKTtimePoints, ckt->CKTtimeListSize); ckt->CKTsizeIncr = (int) ceil(1.4 * ckt->CKTsizeIncr); } ckt->CKTtimePoints[ckt->CKTtimeIndex] = ckt->CKTtime; } /* end LTRA code addition */ /* Check for the timepoint acceptance */ error = CKTaccept(ckt); /* check if current breakpoint is outdated; if so, clear */ if (ckt->CKTtime > ckt->CKTbreaks[0]) CKTclrBreak(ckt); /* * Breakpoint handling scheme: * When a timepoint t is accepted (by CKTaccept), clear all previous * breakpoints, because they will never be needed again. * * t may itself be a breakpoint, or indistinguishably close. DON'T * clear t itself; recognise it as a breakpoint and act accordingly * * if t is not a breakpoint, limit the timestep so that the next * breakpoint is not crossed */ #ifdef STEPDEBUG fprintf (stderr, "Delta %g accepted at time %g (finaltime: %g)\n", ckt->CKTdelta, ckt->CKTtime, ckt->CKTfinalTime) ; fflush(stdout); #endif /* STEPDEBUG */ ckt->CKTstat->STATaccepted ++; ckt->CKTbreak = 0; /* XXX Error will cause single process to bail. */ if(error) { UPDATE_STATS(DOING_TRAN); return(error); } #ifdef XSPICE /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ if(g_ipc.enabled) { if (pss_state == PSS) { /* Send event-driven results */ EVTdump(ckt, IPC_ANAL_TRAN, 0.0); /* Then follow with analog results... */ /* Test to see if delta was cut by a breakpoint, */ /* a non-convergence, or a too large truncation error */ if(ipc_firsttime) ipc_delta_cut = IPC_FALSE; else if(ckt->CKTtime < (ipc_last_time + (0.999 * ipc_last_delta))) ipc_delta_cut = IPC_TRUE; else ipc_delta_cut = IPC_FALSE; /* Record the data required to check for delta cuts */ ipc_last_time = ckt->CKTtime; ipc_last_delta = MIN(ckt->CKTdelta, ckt->CKTmaxStep); /* Send results data if time since last dump is greater */ /* than 'mintime', or if first or second timepoints, */ /* or if delta was cut */ if( (ckt->CKTtime >= (g_ipc.mintime + g_ipc.last_time)) || ipc_firsttime || ipc_secondtime || ipc_delta_cut ) { ipc_send_data_prefix(ckt->CKTtime); CKTdump(ckt, ckt->CKTtime, job->PSSplot_td); ipc_send_data_suffix(); if(ipc_firsttime) { ipc_firsttime = IPC_FALSE; ipc_secondtime = IPC_TRUE; } else if(ipc_secondtime) { ipc_secondtime = IPC_FALSE; } g_ipc.last_time = ckt->CKTtime; } } } else /* gtri - modify - wbk - 12/19/90 - Send IPC stuff */ #endif #ifdef CLUSTER if (pss_state == PSS) CLUoutput(ckt); #endif if (pss_state == PSS) { nextstep = time_temp + 1 / ckt->CKTguessedFreq * ((double)(pss_points_cycle) / (double)ckt->CKTpsspoints) ; /* If in_pss, store data for Time Domain Plot and gather ordered data for FFT computing */ if ((AlmostEqualUlps (ckt->CKTtime, nextstep, 10)) || (ckt->CKTtime > time_temp + 1 / ckt->CKTguessedFreq)) { #ifdef STEPDEBUG fprintf (stderr, "IN_PSS: time point accepted in evolution for FFT calculations.\n") ; fprintf (stderr, "Circuit time %1.15g, final time %1.15g, point index %d and total requested points %ld\n", ckt->CKTtime, nextstep, pss_points_cycle, ckt->CKTpsspoints) ; #endif CKTdump (ckt, ckt->CKTtime, job->PSSplot_td) ; /* Store the Time Base for the DFT */ psstimes [pss_points_cycle] = ckt->CKTtime ; /* Store values for the FFT calculation */ for (i = 1 ; i <= msize ; i++) pssvalues [i - 1 + pss_points_cycle * msize] = ckt->CKTrhsOld [i] ; /* Update PSS counter cycle, used to stop the entire algorithm */ pss_points_cycle++ ; /* Set the next BreakPoint for PSS */ CKTsetBreak (ckt, time_temp + (1 / ckt->CKTguessedFreq) * ((double)pss_points_cycle / (double)ckt->CKTpsspoints)) ; #ifdef STEPDEBUG fprintf (stderr, "Next breakpoint set in: %1.15g\n", time_temp + 1 / ckt->CKTguessedFreq * ((double)pss_points_cycle / (double)ckt->CKTpsspoints)) ; #endif } else { /* Algo can enter here but should do nothing */ #ifdef STEPDEBUG fprintf (stderr, "IN_PSS: time point accepted in evolution but dropped for FFT calculations\n") ; #endif } } #ifdef XSPICE /* gtri - begin - wbk - Update event queues/data for accepted timepoint */ /* Note: this must be done AFTER sending results to SI so it can't */ /* go next to CKTaccept() above */ if(ckt->evt->counts.num_insts > 0) EVTaccept(ckt, ckt->CKTtime); /* gtri - end - wbk - Update event queues/data for accepted timepoint */ #endif ckt->CKTstat->STAToldIter = ckt->CKTstat->STATnumIter; /* ***********************************/ /* ******* SHOOTING CODE BLOCK *******/ /* ***********************************/ switch(pss_state) { case STABILIZATION: { /* Test if stabTime has been reached */ if (AlmostEqualUlps (ckt->CKTtime, ckt->CKTstabTime, 100)) { time_temp = ckt->CKTtime ; /* Set the new Final Time - This is important because the last breakpoint is always CKTfinalTime */ ckt->CKTfinalTime = time_temp + 2 / ckt->CKTguessedFreq ; fprintf (stderr, "Exiting from stabilization\n") ; fprintf (stderr, "Time of first shooting evaluation will be %1.10g\n", time_temp + 1 / ckt->CKTguessedFreq) ; /* Next time is no more in stabilization - Unset the flag */ pss_state = SHOOTING; /* Save the RHS_copy_der as the NEW CKTrhsOld */ for (i = 1 ; i <= msize ; i++) RHS_copy_der [i - 1] = ckt->CKTrhsOld [i] ; /* Print RHS on exiting from stabilization */ fprintf (stderr, "RHS on exiting from stabilization: ") ; for (i = 1 ; i <= msize ; i++) { RHS_copy_se [i - 1] = ckt->CKTrhsOld [i] ; fprintf (stderr, "%-15g ", RHS_copy_se [i - 1]) ; } fprintf (stderr, "\n") ; /* RHS_max and RHS_min initialization - HUGE_VAL is the maximum machine error */ for (i = 0 ; i < msize ; i++) { RHS_max [i] = -HUGE_VAL ; RHS_min [i] = HUGE_VAL ; } } } break; case SHOOTING: { double offset, interval, nextBreak ; int i ; /* Calculation of error norms of RHS solution of every accepted nextTime */ err = 0 ; for (i = 0 ; i < msize ; i++) { /* Save max per node or branch of every estimated period */ if (RHS_max [i] < ckt->CKTrhsOld [i + 1]) RHS_max [i] = ckt->CKTrhsOld [i + 1] ; /* Save min per node or branch of every estimated period */ if (RHS_min [i] > ckt->CKTrhsOld [i + 1]) RHS_min [i] = ckt->CKTrhsOld [i + 1] ; /* CKTrhsOld is the last CORRECT value of RHS */ err_conv [i] = ckt->CKTrhsOld [i + 1] - RHS_copy_se [i] ; err += err_conv [i] * err_conv [i] ; /* Compute and store derivative */ RHS_derivative [i] = (ckt->CKTrhsOld [i + 1] - RHS_copy_der [i]) / ckt->CKTdelta ; /* Save the RHS_copy_der as the NEW CKTrhsOld */ RHS_copy_der [i] = ckt->CKTrhsOld [i + 1] ; #ifdef STEPDEBUG fprintf (stderr, "Pred is so high or so low! Diff is: %g\n", err_conv [i]) ; #endif } err = sqrt (err) ; /* Start frequency estimation */ if ((err < err_0) && (ckt->CKTtime >= time_temp + 0.5 / ckt->CKTguessedFreq)) /* far enough from time temp... */ { if (err < err_min_0) { err_min_1 = err_min_0 ; /* store previous minimum of RHS vector error */ err_min_0 = err ; /* store minimum of RHS vector error */ time_err_min_1 = time_err_min_0 ; /* store previous minimum of RHS vector error time */ time_err_min_0 = ckt->CKTtime ; /* store minimum of RHS vector error time */ } } err_0 = err ; if ((err > err_1) && (ckt->CKTtime >= time_temp + 0.1 / ckt->CKTguessedFreq)) /* far enough from time temp... */ { if (err > err_max) err_max = err ; /* store maximum of RHS vector error */ } err_1 = err ; /* *************************************** */ /* ********** Breakpoint update ********** */ /* *************************************** */ /* Force the tran analysis to evaluate requested breakpoints. Breakpoints are even more closer as the next occurence of guessed period is approaching. La lunga notte dei robot viventi... */ /* double offset, interval, nextBreak ; int i ; */ if ((ckt->CKTtime > time_temp + (1 / ckt->CKTguessedFreq) * 0.995) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq))) { offset = time_temp + (1 / ckt->CKTguessedFreq) * 0.995 ; interval = (1 / ckt->CKTguessedFreq) * (1 - 0.995) * (ckt->CKTsteady_coeff / 10) ; i = (int)((ckt->CKTtime - offset) / interval) ; nextBreak = offset + (i + 1) * interval ; CKTsetBreak (ckt, nextBreak) ; } else if ((ckt->CKTtime > time_temp + (1 / ckt->CKTguessedFreq) * 0.8) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq) * 0.995)) { offset = time_temp + (1 / ckt->CKTguessedFreq) * 0.8 ; interval = (1 / ckt->CKTguessedFreq) * (0.995 - 0.8) * (ckt->CKTsteady_coeff / 5) ; i = (int)((ckt->CKTtime - offset) / interval) ; nextBreak = offset + (i + 1) * interval ; CKTsetBreak (ckt, nextBreak) ; } else if ((ckt->CKTtime > time_temp + (1 / ckt->CKTguessedFreq) * 0.5) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq) * 0.8)) { offset = time_temp + (1 / ckt->CKTguessedFreq) * 0.5 ; interval = (1 / ckt->CKTguessedFreq) * (0.8 - 0.5) * (ckt->CKTsteady_coeff / 3) ; i = (int)((ckt->CKTtime - offset) / interval) ; nextBreak = offset + (i + 1) * interval ; CKTsetBreak (ckt, nextBreak) ; } else if ((ckt->CKTtime > time_temp + (1 / ckt->CKTguessedFreq) * 0.1) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq) * 0.5)) { offset = time_temp + (1 / ckt->CKTguessedFreq) * 0.1 ; interval = (1 / ckt->CKTguessedFreq) * (0.5 - 0.1) * (ckt->CKTsteady_coeff / 2) ; i = (int)((ckt->CKTtime - offset) / interval) ; nextBreak = offset + (i + 1) * interval ; CKTsetBreak (ckt, nextBreak) ; } else if ((ckt->CKTtime > time_temp) && (ckt->CKTtime <= time_temp + (1 / ckt->CKTguessedFreq) * 0.1)) { offset = time_temp ; interval = (1 / ckt->CKTguessedFreq) * (0.1) * (ckt->CKTsteady_coeff) ; i = (int)((ckt->CKTtime - offset) / interval) ; nextBreak = offset + (i + 1) * interval ; CKTsetBreak (ckt, nextBreak) ; } else { fprintf (stderr, "Strange behavior\n\n") ; fprintf (stderr, "CKTtime: %g\ntime_temp: %g\n\n", ckt->CKTtime, time_temp) ; } /* *************************************** */ /* ******* END Breakpoint update ********* */ /* *************************************** */ /* If evolution is near shooting... */ if ((AlmostEqualUlps (ckt->CKTtime, time_temp + 1 / ckt->CKTguessedFreq, 10)) || (ckt->CKTtime > time_temp + 1 / ckt->CKTguessedFreq)) { int excessive_err_nodes = 0 ; /* Calculation of error norms of RHS solution of every accepted nextTime */ predsum = 0 ; for (i = 0 ; i < msize ; i++) { /* Pitagora ha sempre ragione!!! :))) */ /* pred is treated as FREQUENCY to avoid numerical overflow when derivative is close to ZERO */ pred [i] = RHS_derivative [i] / err_conv [i] ; #ifdef STEPDEBUG fprintf (stderr, "Pred is so high or so low! Diff is: %g\n", err_conv [i]) ; #endif if ((fabs (pred [i]) > 1.0e6 * ckt->CKTguessedFreq) || (err_conv [i] == 0)) { if (pred [i] > 0) pred [i] = 1.0e6 * ckt->CKTguessedFreq ; else pred [i] = -1.0e6 * ckt->CKTguessedFreq ; } predsum += pred [i] ; #ifdef STEPDEBUG fprintf (stderr, "Predsum in time before to be divided by dynamic_test has value %g\n", 1 / predsum) ; fprintf (stderr, "Current Diff: %g, Derivative: %g, Frequency Projection: %g\n", err_conv [i], RHS_derivative [i], pred [i]) ; #endif } // int excessive_err_nodes = 0 ; if (shooting_cycle_counter == 0) { /* If first time in shooting we warn about that ! */ fprintf (stderr, "In shooting...\n") ; } //#ifdef STEPDEBUG /* For debugging purpose */ fprintf (stderr, "\n----------------\n") ; fprintf (stderr, "Shooting cycle iteration number: %3d ||", shooting_cycle_counter) ; if (shooting_cycle_counter > 0) fprintf (stderr, " rr: %g || predsum: %g\n", rr_history [shooting_cycle_counter - 1], 1 / predsum) ; else fprintf (stderr, " rr: %g || predsum: %g\n", 0.0, 1 / predsum) ; // fprintf (stderr, "Print of dynamically consistent nodes voltages or branches currents:\n") ; /* --------------------- */ //#endif for (i = 0, node = ckt->CKTnodes->next ; node ; i++, node = node->next) { /* Voltage Node */ if (!strstr (node->name, "#")) { if (fabs (err_conv [i]) > (fabs (RHS_max [i] - RHS_min [i]) * ckt->CKTreltol + ckt->CKTvoltTol) * ckt->CKTtrtol * ckt->CKTsteady_coeff) { excessive_err_nodes++ ; } /* If the dynamic is below 10uV, it's dropped */ if (fabs (RHS_max [i] - RHS_min [i]) > 10 * 1e-6) { dynamic_test++ ; /* test on voltage dynamic consistence */ } /* Current Node */ } else { if (fabs (err_conv [i]) > (fabs (RHS_max [i] - RHS_min [i]) * ckt->CKTreltol + ckt->CKTabstol) * ckt->CKTtrtol * ckt->CKTsteady_coeff) { excessive_err_nodes++ ; } /* If the dynamic is below 10nA, it's dropped */ if (fabs (RHS_max [i] - RHS_min [i]) > 10 * 1e-9) { dynamic_test++ ; /* test on current dynamic consistence */ } } } if (dynamic_test == 0) { /* Test for dynamic existence */ fprintf (stderr, "No detectable dynamic on voltages nodes or currents branches. PSS analysis aborted\n") ; /* Terminates plot in Time Domain and frees the allocated memory */ SPfrontEnd->OUTendPlot (job->PSSplot_td) ; FREE (RHS_copy_se) ; FREE (RHS_copy_der) ; FREE (RHS_max) ; FREE (RHS_min) ; FREE (err_conv) ; FREE (psstimes) ; FREE (pssvalues) ; return (E_PANIC) ; /* to be corrected with definition of new error macro in iferrmsg.h */ } else if ((time_err_min_0 - time_temp) < 0) { /* Something has gone wrong... */ fprintf (stderr, "Cannot find a minimum for error vector in estimated period. Try to adjust tstab! PSS analysis aborted\n") ; /* Terminates plot in Time Domain and frees the allocated memory */ SPfrontEnd->OUTendPlot (job->PSSplot_td) ; FREE (RHS_copy_se) ; FREE (RHS_copy_der) ; FREE (RHS_max) ; FREE (RHS_min) ; FREE (err_conv) ; FREE (psstimes) ; FREE (pssvalues) ; return (E_PANIC) ; /* to be corrected with definition of new error macro in iferrmsg.h */ } //#ifdef STEPDEBUG // fprintf (stderr, "Global Convergence Error reference: %g, Time Projection: %g.\n", // err_conv_ref / dynamic_test, predsum) ; //#endif /* Take the mean value of time prediction trough the dynamic test variable - predsum becomes TIME */ predsum = 1 / (predsum * dynamic_test) ; /* Store the predsum history as absolute value */ predsum_history [shooting_cycle_counter] = fabs (predsum) ; /***********************************/ /*** FREQUENCY ESTIMATION UPDATE ***/ /***********************************/ if ((err_min_0 == err) || (err_min_0 == HUGE_VAL)) { /* Enters here if guessed frequency is higher than the 'real' value */ ckt->CKTguessedFreq = 1 / (1 / ckt->CKTguessedFreq + fabs (predsum)) ; #ifdef STEPDEBUG fprintf (stderr, "Frequency DOWN: est per %g, err min %g, err min 1 %g, err max %g, err %g\n", time_err_min_0 - time_temp, err_min_0, err_min_1, err_max, err) ; #endif } else { /* Enters here if guessed frequency is lower than the 'real' value */ ckt->CKTguessedFreq = 1 / (time_err_min_0 - time_temp) ; #ifdef STEPDEBUG fprintf (stderr, "Frequency UP: est per %g, err min %g, err min 1 %g, err max %g, err %g\n", time_err_min_0 - time_temp, err_min_0, err_min_1, err_max, err) ; #endif } /* Temporary variables to store previous occurrence of guessed frequency */ gf_last_1 = gf_last_0 ; gf_last_0 = ckt->CKTguessedFreq ; /* Next evaluation of shooting will be updated time (time_temp) summed to updated guessed period */ time_temp = ckt->CKTtime ; /* Store error history */ rr_history [shooting_cycle_counter] = err ; gf_history [shooting_cycle_counter] = ckt->CKTguessedFreq ; shooting_cycle_counter++ ; fprintf (stderr, "Updated guessed frequency: %1.10lg .\n", ckt->CKTguessedFreq) ; fprintf (stderr, "Next shooting evaluation time is %1.10g and current time is %1.10g.\n", time_temp + 1 / ckt->CKTguessedFreq, ckt->CKTtime) ; /* Restore maximum and minimum error for next search */ err_min_0 = HUGE_VAL ; err_max = -HUGE_VAL ; err_0 = HUGE_VAL ; err_1 = -HUGE_VAL ; dynamic_test = 0 ; /* Reset actual RHS reference for next shooting evaluation */ for (i = 1 ; i <= msize ; i++) RHS_copy_se [i - 1] = ckt->CKTrhsOld [i] ; #ifdef STEPDEBUG fprintf (stderr, "RHS on new shooting cycle: ") ; for (i = 0 ; i < msize ; i++) fprintf (stderr, "%-15g ", RHS_copy_se [i]) ; fprintf (stderr, "\n") ; #endif for (i = 0 ; i < msize ; i++) { /* Reset max and min per node or branch on every shooting cycle */ RHS_max [i] = -HUGE_VAL ; RHS_min [i] = HUGE_VAL ; } fprintf (stderr, "----------------\n\n") ; /* Shooting Exit Condition */ if ((shooting_cycle_counter > ckt->CKTsc_iter) || (excessive_err_nodes == 0)) { int k ; double minimum ; pss_state = PSS ; #ifdef STEPDEBUG fprintf (stderr, "\nFrequency estimation (FE) and RHS period residual (PR) evolution\n") ; #endif // minimum = rr_history [0] ; minimum = predsum_history [0] ; k = 0 ; for (i = 0 ; i < shooting_cycle_counter ; i++) { /* Print some statistics */ fprintf (stderr, "%-3d -> FE: %-15.10g || RR: %15.10g", i, gf_history [i], rr_history [i]) ; /* Take the minimum residual iteration */ // if (minimum > rr_history [i]) if (minimum > predsum_history [i]) { // minimum = rr_history [i] ; minimum = predsum_history [i] ; k = i ; } fprintf (stderr, " || predsum/dynamic_test: %15.10g || minimum: %15.10g\n", predsum_history [i], minimum) ; } if (excessive_err_nodes == 0) /* SHOOTING has converged */ ckt->CKTguessedFreq = gf_history [shooting_cycle_counter - 1] ; else ckt->CKTguessedFreq = gf_history [k] ; /* Save the current Time */ time_temp = ckt->CKTtime ; /* Set the new Final Time - This is important because the last breakpoint is always CKTfinalTime */ ckt->CKTfinalTime = time_temp + 1 / ckt->CKTguessedFreq ; /* Dump the first PSS point for the FFT */ CKTdump (ckt, ckt->CKTtime, job->PSSplot_td) ; psstimes [pss_points_cycle] = ckt->CKTtime ; for (i = 1 ; i <= msize ; i++) pssvalues [i - 1 + pss_points_cycle * msize] = ckt->CKTrhsOld [i] ; /* Update the PSS points counter and set the next Breakpoint */ pss_points_cycle++ ; CKTsetBreak (ckt, time_temp + (1 / ckt->CKTguessedFreq) * ((double)pss_points_cycle / (double)ckt->CKTpsspoints)) ; if (excessive_err_nodes == 0) fprintf (stderr, "\nConvergence reached. Final circuit time is %1.10g seconds (iteration n° %d) and predicted fundamental frequency is %15.10g Hz\n", ckt->CKTtime, shooting_cycle_counter - 1, ckt->CKTguessedFreq) ; else fprintf (stderr, "\nConvergence not reached. However the most near convergence iteration has predicted (iteration %d) a fundamental frequency of %15.10g Hz\n", k, ckt->CKTguessedFreq) ; #ifdef STEPDEBUG fprintf (stderr, "time_temp %g\n", time_temp) ; fprintf (stderr, "IN_PSS: FIRST time point accepted in evolution for FFT calculations\n") ; fprintf (stderr, "Circuit time %1.15g, final time %1.15g, point index %d and total requested points %ld\n", ckt->CKTtime, time_temp + 1 / ckt->CKTguessedFreq * ((double)pss_points_cycle / (double)ckt->CKTpsspoints), pss_points_cycle, ckt->CKTpsspoints) ; fprintf (stderr, "Next breakpoint set in: %1.15g\n", time_temp + 1 / ckt->CKTguessedFreq * ((double)pss_points_cycle / (double)ckt->CKTpsspoints)) ; #endif } else { /* Set the new Final Time - This is important because the last breakpoint is always CKTfinalTime */ ckt->CKTfinalTime = time_temp + 1 / ckt->CKTguessedFreq ; /* Set next the breakpoint */ CKTsetBreak (ckt, time_temp + 1 / ckt->CKTguessedFreq) ; } } } break; case PSS: { /* The algorithm enters here when in_pss is set */ #ifdef STEPDEBUG fprintf (stderr, "ttemp %1.15g, final_time %1.15g, current_time %1.15g\n", time_temp, time_temp + 1 / ckt->CKTguessedFreq, ckt->CKTtime) ; #endif if ((pss_points_cycle == ckt->CKTpsspoints + 1) || (ckt->CKTtime > ckt->CKTfinalTime)) { double *pssfreqs = TMALLOC (double, ckt->CKTharms); double *pssmags = TMALLOC (double, ckt->CKTharms); double *pssphases = TMALLOC (double, ckt->CKTharms); double *pssnmags = TMALLOC (double, ckt->CKTharms); double *pssnphases = TMALLOC (double, ckt->CKTharms); double *pssValues = TMALLOC (double, ckt->CKTpsspoints + 1); double *pssResults = TMALLOC (double, msize * ckt->CKTharms); /* End plot in Time Domain */ SPfrontEnd->OUTendPlot (job->PSSplot_td) ; /* Frequency Plot Creation */ error = CKTnames (ckt, &numNames, &nameList) ; if (error) return (error) ; SPfrontEnd->IFnewUid (ckt, &freqUid, NULL, "frequency", UID_OTHER, NULL) ; error = SPfrontEnd->OUTpBeginPlot (ckt, ckt->CKTcurJob, "Frequency Domain Periodic Steady State Analysis", freqUid, IF_REAL, numNames, nameList, IF_REAL, &(job->PSSplot_fd)) ; tfree (nameList) ; SPfrontEnd->OUTattributes (job->PSSplot_fd, NULL, PLOT_COMB, NULL) ; /* ******************** */ /* Starting DFT on data */ /* ******************** */ for (i = 0 ; i < msize ; i++) { for (j = 0 ; j < ckt->CKTpsspoints ; j++) pssValues [j] = pssvalues [j * msize + i] ; DFT (ckt->CKTpsspoints, ckt->CKTharms, &thd, psstimes, pssValues, ckt->CKTguessedFreq, pssfreqs, pssmags, pssphases, pssnmags, pssnphases) ; for (j = 0 ; j < ckt->CKTharms ; j++) pssResults [j * msize + i] = pssmags [j] ; } for (j = 0 ; j < ckt->CKTharms ; j++) { for (i = 0 ; i < msize ; i++) ckt->CKTrhsOld [i + 1] = pssResults [j * msize + i] ; CKTdump (ckt, pssfreqs [j], job->PSSplot_fd) ; } /* ****************** */ /* Ending DFT on data */ /* ****************** */ /* Terminates plot in Frequency Domain and frees the allocated memory */ SPfrontEnd->OUTendPlot (job->PSSplot_fd) ; /* Francesco Lannutti's MOD */ /* Verify the frequency found */ max_freq = pssResults [msize] ; /* max_freq = pssResults [1 * msize + 0] ; */ position = 1 ; for (j = 1 ; j < ckt->CKTharms ; j++) { for (i = 0 ; i < msize ; i++) { if (max_freq < pssResults [j * msize + i]) { max_freq = pssResults [j * msize + i] ; position = j ; } } } if (pssfreqs [position] != ckt->CKTguessedFreq) { ckt->CKTguessedFreq = pssfreqs [position] ; fprintf (stderr, "The predicted fundamental frequency is incorrect.\nRelaunching the analysis...\n\n") ; fprintf (stderr, "The new guessed fundamental frequency is: %.6g\n\n", ckt->CKTguessedFreq) ; DCpss (ckt, 1) ; } /****************************/ FREE (pssResults) ; FREE (pssValues) ; FREE (pssnphases) ; FREE (pssnmags) ; FREE (pssphases) ; FREE (pssmags) ; FREE (pssfreqs) ; FREE (RHS_copy_se) ; FREE (RHS_copy_der) ; FREE (RHS_max) ; FREE (RHS_min) ; FREE (err_conv) ; FREE (psstimes) ; FREE (pssvalues) ; return (OK) ; } } break; } /* switch(pss_state) */ /* ********************************** */ /* **** END SHOOTING CODE BLOCK ***** */ /* ********************************** */ if(SPfrontEnd->IFpauseTest()) { /* user requested pause... */ UPDATE_STATS(DOING_TRAN); return(E_PAUSE); } /* RESUME */ resume: #ifdef STEPDEBUG if( (ckt->CKTdelta <= ckt->CKTfinalTime/50) && (ckt->CKTdelta <= ckt->CKTmaxStep)) { ; } else { if(ckt->CKTfinalTime/50CKTmaxStep) { fprintf (stderr, "limited by Tstop/50\n"); } else { fprintf (stderr, "limited by Tmax == %g\n", ckt->CKTmaxStep); } } #endif #ifdef HAS_PROGREP if (ckt->CKTtime == 0.) SetAnalyse( "tran init", 0); else if ((pss_state != PSS) && (shooting_cycle_counter > 0)) SetAnalyse("shooting", shooting_cycle_counter) ; else SetAnalyse( "tran", (int)((ckt->CKTtime * 1000.) / ckt->CKTfinalTime)); #endif ckt->CKTdelta = MIN(ckt->CKTdelta,ckt->CKTmaxStep); #ifdef XSPICE /* gtri - begin - wbk - Cut integration order if first timepoint after breakpoint */ /* if(ckt->CKTtime == g_mif_info.breakpoint.last) */ if ( AlmostEqualUlps( ckt->CKTtime, g_mif_info.breakpoint.last, 100 ) ) ckt->CKTorder = 1; /* gtri - end - wbk - Cut integration order if first timepoint after breakpoint */ #endif /* are we at a breakpoint, or indistinguishably close? */ /* if ((ckt->CKTtime == ckt->CKTbreaks[0]) || (ckt->CKTbreaks[0] - */ if (ckt->CKTbreaks [0] - ckt->CKTtime <= ckt->CKTdelmin) { /*if ( AlmostEqualUlps( ckt->CKTtime, ckt->CKTbreaks[0], 100 ) || (ckt->CKTbreaks[0] - * (ckt->CKTtime) <= ckt->CKTdelmin)) {*/ /* first timepoint after a breakpoint - cut integration order */ /* and limit timestep to .1 times minimum of time to next breakpoint, * and previous timestep */ ckt->CKTorder = 1; #ifdef STEPDEBUG if( (ckt->CKTdelta > .1*ckt->CKTsaveDelta) || (ckt->CKTdelta > .1*(ckt->CKTbreaks[1] - ckt->CKTbreaks[0])) ) { if(ckt->CKTsaveDelta < (ckt->CKTbreaks[1] - ckt->CKTbreaks[0])) { fprintf (stderr, "limited by pre-breakpoint delta (saveDelta: %1.10g, nxt_breakpt: %1.10g, curr_breakpt: %1.10g and CKTtime: %1.10g\n", ckt->CKTsaveDelta, ckt->CKTbreaks [1], ckt->CKTbreaks [0], ckt->CKTtime) ; } else { fprintf (stderr, "limited by next breakpoint\n") ; fprintf (stderr, "(saveDelta: %1.10g, Delta: %1.10g, CKTtime: %1.10g and delmin: %1.10g\n", ckt->CKTsaveDelta, ckt->CKTdelta, ckt->CKTtime, ckt->CKTdelmin) ; } } #endif if (ckt->CKTbreaks [1] - ckt->CKTbreaks [0] == 0) ckt->CKTdelta = ckt->CKTdelmin ; else ckt->CKTdelta = MIN (ckt->CKTdelta, .1 * MIN (ckt->CKTsaveDelta, ckt->CKTbreaks[1] - ckt->CKTbreaks[0])); if(firsttime) { ckt->CKTdelta /= 10; #ifdef STEPDEBUG fprintf(stderr, "delta cut for initial timepoint\n"); #endif } #ifndef XSPICE /* don't want to get below delmin for no reason */ ckt->CKTdelta = MAX(ckt->CKTdelta, ckt->CKTdelmin*2.0); #endif } #ifndef XSPICE else if(ckt->CKTtime + ckt->CKTdelta >= ckt->CKTbreaks[0]) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; /* fprintf (stderr, "delta cut to %g to hit breakpoint\n" ,ckt->CKTdelta) ; */ fflush(stdout); ckt->CKTbreak = 1; /* why? the current pt. is not a bkpt. */ } #endif /* !XSPICE */ #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ if(ckt->CKTtime + ckt->CKTdelta >= g_mif_info.breakpoint.current) { /* If next time > temporary breakpoint, force it to the breakpoint */ /* And mark that timestep was set by temporary breakpoint */ ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; } else { /* Else, mark that timestep was not set by temporary breakpoint */ g_mif_info.breakpoint.last = HUGE_VAL; } /* gtri - end - wbk - Add Breakpoint stuff */ /* gtri - begin - wbk - Modify Breakpoint stuff */ /* Throw out any permanent breakpoint times <= current time */ for (;;) { #ifdef STEPDEBUG fprintf (stderr, " brk_pt: %g ckt_time: %g ckt_min_break: %g\n", ckt->CKTbreaks [0], ckt->CKTtime, ckt->CKTminBreak) ; #endif if(AlmostEqualUlps(ckt->CKTbreaks[0], ckt->CKTtime, 100) || ckt->CKTbreaks[0] <= ckt->CKTtime + ckt->CKTminBreak) { #ifdef STEPDEBUG fprintf (stderr, "throwing out permanent breakpoint times <= current time (brk pt: %g)\n", ckt->CKTbreaks [0]) ; fprintf (stderr, "ckt_time: %g ckt_min_break: %g\n", ckt->CKTtime, ckt->CKTminBreak) ; #endif CKTclrBreak(ckt); } else { break; } } /* Force the breakpoint if appropriate */ if(ckt->CKTtime + ckt->CKTdelta > ckt->CKTbreaks[0]) { ckt->CKTbreak = 1; ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = ckt->CKTbreaks[0] - ckt->CKTtime; } /* gtri - end - wbk - Modify Breakpoint stuff */ /* gtri - begin - wbk - Do event solution */ if(ckt->evt->counts.num_insts > 0) { /* if time = 0 and op_alternate was specified as false during */ /* dcop analysis, call any changed instances to let them */ /* post their outputs with their associated delays */ if((ckt->CKTtime == 0.0) && (! ckt->evt->options.op_alternate)) EVTiter(ckt); /* while there are events on the queue with event time <= next */ /* projected analog time, process them */ while((g_mif_info.circuit.evt_step = EVTnext_time(ckt)) <= (ckt->CKTtime + ckt->CKTdelta)) { /* Initialize temp analog bkpt to infinity */ g_mif_info.breakpoint.current = HUGE_VAL; /* Pull items off queue and process them */ EVTdequeue(ckt, g_mif_info.circuit.evt_step); EVTiter(ckt); /* If any instances have forced an earlier */ /* next analog time, cut the delta */ if(ckt->CKTbreaks[0] < g_mif_info.breakpoint.current) if(ckt->CKTbreaks[0] > ckt->CKTtime + ckt->CKTminBreak) g_mif_info.breakpoint.current = ckt->CKTbreaks[0]; if(g_mif_info.breakpoint.current < ckt->CKTtime + ckt->CKTdelta) { /* Breakpoint must be > last accepted timepoint */ /* and >= current event time */ if(g_mif_info.breakpoint.current > ckt->CKTtime + ckt->CKTminBreak && g_mif_info.breakpoint.current >= g_mif_info.circuit.evt_step) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; } } } /* end while next event time <= next analog time */ } /* end if there are event instances */ /* gtri - end - wbk - Do event solution */ #else #ifdef CLUSTER if(!CLUsync(ckt->CKTtime,&ckt->CKTdelta,0)) { fprintf (stderr, "Sync error!\n"); exit(0); } #endif /* CLUSTER */ #endif /* What is that??? */ for(i=5; i>=0; i--) ckt->CKTdeltaOld[i+1] = ckt->CKTdeltaOld[i]; ckt->CKTdeltaOld[0] = ckt->CKTdelta; temp = ckt->CKTstates[ckt->CKTmaxOrder+1]; for(i=ckt->CKTmaxOrder;i>=0;i--) { ckt->CKTstates[i+1] = ckt->CKTstates[i]; } ckt->CKTstates[0] = temp; /* 600 */ for (;;) { #ifdef CLUSTER redostep = 1; #endif #ifdef XSPICE /* gtri - add - wbk - 4/17/91 - Fix Berkeley bug */ /* This is needed here to allow CAPask to output currents */ /* during Transient analysis. A grep for CKTcurrentAnalysis */ /* indicates that it should not hurt anything else ... */ ckt->CKTcurrentAnalysis = DOING_TRAN; /* gtri - end - wbk - 4/17/91 - Fix Berkeley bug */ #endif olddelta=ckt->CKTdelta; /* time abort? */ ckt->CKTtime += ckt->CKTdelta; #ifdef CLUSTER CLUinput(ckt); #endif ckt->CKTdeltaOld[0]=ckt->CKTdelta; NIcomCof(ckt); #ifdef PREDICTOR error = NIpred(ckt); #endif /* PREDICTOR */ save_mode = ckt->CKTmode; save_order = ckt->CKTorder; #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ /* Initialize temporary breakpoint to infinity */ g_mif_info.breakpoint.current = HUGE_VAL; /* gtri - end - wbk - Add Breakpoint stuff */ /* gtri - begin - wbk - add convergence problem reporting flags */ /* delta is forced to equal delmin on last attempt near line 650 */ if(ckt->CKTdelta <= ckt->CKTdelmin) ckt->enh->conv_debug.last_NIiter_call = MIF_TRUE; else ckt->enh->conv_debug.last_NIiter_call = MIF_FALSE; /* gtri - begin - wbk - add convergence problem reporting flags */ /* gtri - begin - wbk - Call all hybrids */ /* gtri - begin - wbk - Set evt_step */ if(ckt->evt->counts.num_insts > 0) { g_mif_info.circuit.evt_step = ckt->CKTtime; } /* gtri - end - wbk - Set evt_step */ #endif converged = NIiter(ckt,ckt->CKTtranMaxIter); #ifdef XSPICE if(ckt->evt->counts.num_insts > 0) { g_mif_info.circuit.evt_step = ckt->CKTtime; EVTcall_hybrids(ckt); } /* gtri - end - wbk - Call all hybrids */ #endif ckt->CKTstat->STATtimePts ++; ckt->CKTmode = (ckt->CKTmode&MODEUIC)|MODETRAN | MODEINITPRED; if(firsttime) { for(i=0;iCKTnumStates;i++) { ckt->CKTstate2[i] = ckt->CKTstate1[i]; ckt->CKTstate3[i] = ckt->CKTstate1[i]; } } /* txl, cpl addition */ if (converged == 1111) { return(converged); } #ifdef STEPDEBUG if (pss_state == PSS) fprintf (stderr, "pss_state: %d, converged: %d\n", pss_state, converged) ; #endif if(converged != 0) { #ifndef CLUSTER ckt->CKTtime = ckt->CKTtime -ckt->CKTdelta; ckt->CKTstat->STATrejected ++; #endif ckt->CKTdelta = ckt->CKTdelta/8; #ifdef STEPDEBUG fprintf (stderr, "delta cut to %g for non-convergance\n", ckt->CKTdelta) ; fflush(stdout); #endif if(firsttime) { ckt->CKTmode = (ckt->CKTmode&MODEUIC) | MODETRAN | MODEINITTRAN; } ckt->CKTorder = 1; #ifdef XSPICE /* gtri - begin - wbk - Add Breakpoint stuff */ /* Force backup if temporary breakpoint is < current time */ } else if(g_mif_info.breakpoint.current < ckt->CKTtime) { ckt->CKTsaveDelta = ckt->CKTdelta; ckt->CKTtime -= ckt->CKTdelta; ckt->CKTdelta = g_mif_info.breakpoint.current - ckt->CKTtime; g_mif_info.breakpoint.last = ckt->CKTtime + ckt->CKTdelta; if(firsttime) { ckt->CKTmode = (ckt->CKTmode&MODEUIC)|MODETRAN | MODEINITTRAN; } ckt->CKTorder = 1; /* gtri - end - wbk - Add Breakpoint stuff */ #endif } else { if (firsttime) { firsttime = 0; #ifndef CLUSTER goto nextTime; /* no check on * first time point */ #else redostep = 0; goto chkStep; #endif } newdelta = ckt->CKTdelta; error = CKTtrunc(ckt,&newdelta); if(error) { UPDATE_STATS(DOING_TRAN); return(error); } if(newdelta > .9 * ckt->CKTdelta) { if((ckt->CKTorder == 1) && (ckt->CKTmaxOrder > 1)) { /* don't rise the order for backward Euler */ newdelta = ckt->CKTdelta; ckt->CKTorder = 2; error = CKTtrunc(ckt,&newdelta); if(error) { UPDATE_STATS(DOING_TRAN); return(error); } if(newdelta <= 1.05 * ckt->CKTdelta) { ckt->CKTorder = 1; } } /* time point OK - 630 */ ckt->CKTdelta = newdelta; #ifdef NDEV /* show a time process indicator, by Gong Ding, gdiso@ustc.edu */ if(ckt->CKTtime/ckt->CKTfinalTime*100<10.0) fprintf (stderr, "%%%3.2lf\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100) ; else if(ckt->CKTtime/ckt->CKTfinalTime*100<100.0) fprintf (stderr, "%%%4.2lf\b\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100) ; else fprintf (stderr, "%%%5.2lf\b\b\b\b\b\b\b", ckt->CKTtime / ckt->CKTfinalTime * 100) ; fflush(stdout); #endif #ifdef STEPDEBUG fprintf (stderr, "delta set to truncation error result: %g. Point accepted at CKTtime: %g\n", ckt->CKTdelta, ckt->CKTtime) ; fflush(stdout); #endif #ifndef CLUSTER /* go to 650 - trapezoidal */ goto nextTime; #else redostep = 0; goto chkStep; #endif } else { /* newdelta <= .9 * ckt->CKTdelta */ #ifndef CLUSTER ckt->CKTtime = ckt->CKTtime -ckt->CKTdelta; ckt->CKTstat->STATrejected ++; #endif ckt->CKTdelta = newdelta; #ifdef STEPDEBUG fprintf (stderr, "delta set to truncation error result:point rejected\n") ; #endif } } if (ckt->CKTdelta <= ckt->CKTdelmin) { if (olddelta > ckt->CKTdelmin) { ckt->CKTdelta = ckt->CKTdelmin; #ifdef STEPDEBUG fprintf (stderr, "delta at delmin\n"); #endif } else { UPDATE_STATS(DOING_TRAN); errMsg = CKTtrouble(ckt, "Timestep too small"); return(E_TIMESTEP); } } #ifdef XSPICE /* gtri - begin - wbk - Do event backup */ if(ckt->evt->counts.num_insts > 0) EVTbackup(ckt, ckt->CKTtime + ckt->CKTdelta); /* gtri - end - wbk - Do event backup */ #endif #ifdef CLUSTER chkStep: if(CLUsync(ckt->CKTtime,&ckt->CKTdelta,redostep)){ goto nextTime; } else { ckt->CKTtime -= olddelta; ckt->CKTstat->STATrejected ++; } #endif } /* NOTREACHED */ } static int DFT ( long int ndata, /* number of entries in the Time and Value arrays */ int numFreq, /* number of harmonics to calculate */ double *thd, /* total harmonic distortion (percent) to be returned */ double *Time, /* times at which the voltage/current values were measured */ double *Value, /* voltage or current vector whose transform is desired */ double FundFreq, /* the fundamental frequency of the analysis */ double *Freq, /* the frequency value of the various harmonics */ double *Mag, /* the Magnitude of the fourier transform */ double *Phase, /* the Phase of the fourier transform */ double *nMag, /* the normalized magnitude of the transform: nMag (fund) = 1 */ double *nPhase /* the normalized phase of the transform: Nphase (fund) = 0 */ ) { /* Note: we can consider these as a set of arrays. The sizes are: * Time [ndata], Value [ndata], Freq [numFreq], Mag [numfreq], * Phase [numfreq], nMag [numfreq], nPhase [numfreq] * * The arrays must all be allocated by the caller. * The Time and Value array must be reasonably distributed over at * least one full period of the fundamental Frequency for the * fourier transform to be useful. The function will take the * last period of the frequency as data for the transform. * * We are assuming that the caller has provided exactly one period * of the fundamental frequency. */ int i, j; double tmp; NG_IGNORE (Time); /* clear output/computation arrays */ for (i = 0; i < numFreq; i++) { Mag [i] = 0; Phase [i] = 0; } for (i = 0; i < ndata; i++) { for (j = 0; j < numFreq; j++) { Mag [j] += (Value [i] * sin (j * 2.0 * M_PI * i / ((double)ndata))); Phase [j] += (Value [i] * cos (j * 2.0 * M_PI * i / ((double)ndata))); } } Mag [0] = Phase [0] / (double)ndata; Phase [0] = 0; nMag [0] = 0; nPhase [0] = 0; Freq [0] = 0; *thd = 0; for (i = 1; i < numFreq; i++) { tmp = Mag [i] * 2.0 / (double)ndata; Phase [i] *= 2.0 / (double)ndata; Freq [i] = i * FundFreq; Mag [i] = sqrt (tmp * tmp + Phase [i] * Phase [i]); Phase [i] = atan2 (Phase [i], tmp) * 180.0 / M_PI; nMag [i] = Mag [i] / Mag [1]; nPhase [i] = Phase [i] - Phase [1]; if (i > 1) *thd += nMag [i] * nMag [i]; } *thd = 100 * sqrt (*thd); return (OK); } ngspice-26/src/spicelib/analysis/dcosetp.c0000644000265600020320000000134712264261473020247 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cktdefs.h" #include "ngspice/opdefs.h" #include "analysis.h" /* ARGSUSED */ int DCOsetParm(CKTcircuit *ckt, JOB *anal, int which, IFvalue *value) { NG_IGNORE(ckt); NG_IGNORE(anal); NG_IGNORE(value); switch(which) { default: break; } return(E_BADPARM); } SPICEanalysis DCOinfo = { { "OP", "D.C. Operating point analysis", 0, NULL, }, sizeof(OP), NODOMAIN, 1, DCOsetParm, DCOaskQuest, NULL, DCop }; ngspice-26/src/spicelib/analysis/cktacct.c0000644000265600020320000000653412264261473020225 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * CKTacct * get the specified accounting item into 'value' in the * given circuit 'ckt'. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/optdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/spmatrix.h" /* ARGSUSED */ int CKTacct(CKTcircuit *ckt, JOB *anal, int which, IFvalue *val) { NG_IGNORE(anal); switch(which) { case OPT_EQNS: val->iValue = ckt->CKTmaxEqNum; break; case OPT_ORIGNZ: if ( ckt->CKTmatrix != NULL ) { val->iValue = spOriginalCount(ckt->CKTmatrix); } else { val->iValue = 0; } break; case OPT_FILLNZ: if ( ckt->CKTmatrix != NULL ) { val->iValue = spFillinCount(ckt->CKTmatrix); } else { val->iValue = 0; } break; case OPT_TOTALNZ: if ( ckt->CKTmatrix != NULL ) { val->iValue = spElementCount(ckt->CKTmatrix); } else { val->iValue = 0; } break; case OPT_ITERS: val->iValue = ckt->CKTstat->STATnumIter; break; case OPT_TRANIT: val->iValue = ckt->CKTstat->STATtranIter; break; case OPT_TRANCURITER: val->iValue = ckt->CKTstat->STATnumIter - ckt->CKTstat->STAToldIter; break; case OPT_TRANPTS: val->iValue = ckt->CKTstat->STATtimePts; break; case OPT_TRANACCPT: val->iValue = ckt->CKTstat->STATaccepted; break; case OPT_TRANRJCT: val->iValue = ckt->CKTstat->STATrejected; break; case OPT_TOTANALTIME: val->rValue = ckt->CKTstat->STATtotAnalTime; break; case OPT_TRANTIME: val->rValue = ckt->CKTstat->STATtranTime; break; case OPT_ACTIME: val->rValue = ckt->CKTstat->STATacTime; break; case OPT_LOADTIME: val->rValue = ckt->CKTstat->STATloadTime; break; case OPT_SYNCTIME: val->rValue = ckt->CKTstat->STATsyncTime; break; case OPT_REORDTIME: val->rValue = ckt->CKTstat->STATreorderTime; break; case OPT_DECOMP: val->rValue = ckt->CKTstat->STATdecompTime; break; case OPT_SOLVE: val->rValue = ckt->CKTstat->STATsolveTime; break; case OPT_TRANLOAD: val->rValue = ckt->CKTstat->STATtranLoadTime; break; case OPT_TRANSYNC: val->rValue = ckt->CKTstat->STATtranSyncTime; break; case OPT_TRANDECOMP: val->rValue = ckt->CKTstat->STATtranDecompTime; break; case OPT_TRANSOLVE: val->rValue = ckt->CKTstat->STATtranSolveTime; break; case OPT_TRANTRUNC: val->rValue = ckt->CKTstat->STATtranTruncTime; break; case OPT_ACLOAD: val->rValue = ckt->CKTstat->STATacLoadTime; break; case OPT_ACSYNC: val->rValue = ckt->CKTstat->STATacSyncTime; break; case OPT_ACDECOMP: val->rValue = ckt->CKTstat->STATacDecompTime; break; case OPT_ACSOLVE: val->rValue = ckt->CKTstat->STATacSolveTime; break; case OPT_TEMP: val->rValue = ckt->CKTtemp - CONSTCtoK; break; case OPT_TNOM: val->rValue = ckt->CKTnomTemp - CONSTCtoK; break; default: return(-1); } return(0); } ngspice-26/src/spicelib/analysis/cktmknod.c0000644000265600020320000000122712264261473020415 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* *CKTmkNode(ckt,node) * Tentatively allocate a new circuit equation structure */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" /* ARGSUSED */ int CKTmkNode(CKTcircuit *ckt, CKTnode **node) { CKTnode *mynode; NG_IGNORE(ckt); mynode = TMALLOC(CKTnode, 1); if(mynode == NULL) return(E_NOMEM); mynode->next = NULL; mynode->name = NULL; if(node) *node = mynode; return(OK); } ngspice-26/src/spicelib/analysis/cktpzstr.c0000644000265600020320000006503712264261473020500 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* * A variant on the "zeroin" method. This is a bit convoluted. */ #include "ngspice/ngspice.h" #include "ngspice/pzdefs.h" #include "ngspice/complex.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #ifdef PZDEBUG # ifndef notdef # define DEBUG(N) if (Debug >= (unsigned) (N)) static unsigned int Debug = 3; # else # define DEBUG(N) if (0) # endif #endif /* static function definitions */ static int CKTpzStrat(PZtrial **set); static int CKTpzStep(int strat, PZtrial **set); static int CKTpzRunTrial(CKTcircuit *ckt, PZtrial **new_trialp, PZtrial **set); static int CKTpzVerify(PZtrial **set, PZtrial *new_trial); static void clear_trials(int mode); static void check_flat(PZtrial *a, PZtrial *b); void CKTpzUpdateSet(PZtrial **set, PZtrial *new); void zaddeq(double *a, int *amag, double x, int xmag, double y, int ymag); void CKTpzReset(PZtrial **set); #ifdef PZDEBUG static void show_trial(PZtrial *new_trial, char x); #endif #define NITER_LIM 200 #define SHIFT_LEFT 2 #define SHIFT_RIGHT 3 #define SKIP_LEFT 4 #define SKIP_RIGHT 5 #define INIT 6 #define GUESS 7 #define SPLIT_LEFT 8 #define SPLIT_RIGHT 9 #define MULLER 10 #define SYM 11 #define SYM2 12 #define COMPLEX_INIT 13 #define COMPLEX_GUESS 14 #define QUIT 15 #define NEAR_LEFT 4 #define MID_LEFT 5 #define FAR_LEFT 6 #define NEAR_RIGHT 7 #define FAR_RIGHT 8 #define MID_RIGHT 9 #ifdef PZDEBUG static char *snames[ ] = { "none", "none", "shift left", "shift right", "skip left", "skip right", "init", "guess", "split left", "split right", "Muller", "sym 1", "sym 2", "complex_init", "complex_guess", "quit", "none" }; #endif #define sgn(X) ((X) < 0 ? -1 : (X) == 0 ? 0 : 1) #define ISAROOT 2 #define ISAREPEAT 4 #define ISANABERRATION 8 #define ISAMINIMA 16 extern double NIpzK; extern int NIpzK_mag; int CKTpzTrapped; static int NZeros, NFlat, Max_Zeros; static PZtrial *ZeroTrial, *Trials; static int Seq_Num; static double Guess_Param; static double High_Guess, Low_Guess; static int Last_Move, Consec_Moves; static int NIter, NTrials; static int Aberr_Num; int PZeval(int strat, PZtrial **set, PZtrial **new_trial_p); static PZtrial *pzseek(PZtrial *t, int dir); static int alter(PZtrial *new, PZtrial *nearto, double abstol, double reltol); int CKTpzFindZeros(CKTcircuit *ckt, PZtrial **rootinfo, int *rootcount) { PZtrial *new_trial; PZtrial *neighborhood[3]; int strat; int error; char ebuf[513]; NIpzK = 0.0; NIpzK_mag = 0; High_Guess = -1.0; Low_Guess = 1.0; ZeroTrial = 0; Trials = 0; NZeros = 0; NFlat = 0; Max_Zeros = SMPmatSize(ckt->CKTmatrix); NIter = 0; error = OK; CKTpzTrapped = 0; Aberr_Num = 0; NTrials = 0; ckt->CKTniState |= NIPZSHOULDREORDER; /* Initial for LU fill-ins */ Seq_Num = 1; CKTpzReset(neighborhood); do { while ((strat = CKTpzStrat(neighborhood)) < GUESS && !CKTpzTrapped) if (!CKTpzStep(strat, neighborhood)) { strat = GUESS; #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "\t\tGuess\n"); #endif break; } NIter += 1; /* Evaluate current strategy */ error = PZeval(strat, neighborhood, &new_trial); if (error != OK) return error; error = CKTpzRunTrial(ckt, &new_trial, neighborhood); if (error != OK) return error; if (new_trial->flags & ISAROOT) { if (CKTpzVerify(neighborhood, new_trial)) { NIter = 0; CKTpzReset(neighborhood); } else /* XXX Verify fails ?!? */ CKTpzUpdateSet(neighborhood, new_trial); } else if (new_trial->flags & ISANABERRATION) { CKTpzReset(neighborhood); Aberr_Num += 1; tfree(new_trial); } else if (new_trial->flags & ISAMINIMA) { neighborhood[0] = NULL; neighborhood[1] = new_trial; neighborhood[2] = NULL; } else { CKTpzUpdateSet(neighborhood, new_trial); /* Replace a value */ } if (SPfrontEnd->IFpauseTest()) { sprintf(ebuf, "Pole-Zero analysis interrupted; %d trials, %d roots\n", Seq_Num, NZeros); SPfrontEnd->IFerror (ERR_WARNING, ebuf, 0); error = E_PAUSE; break; } } while (High_Guess - Low_Guess < 1e40 && NZeros < Max_Zeros && NIter < NITER_LIM && Aberr_Num < 3 && High_Guess - Low_Guess < 1e35 /* XXX Should use mach const */ && (!neighborhood[0] || !neighborhood[2] || CKTpzTrapped || neighborhood[2]->s.real - neighborhood[0]->s.real < 1e22)); /* XXX ZZZ */ #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Finished: NFlat %d, NZeros: %d, NTrials %d, Guess %g to %g, aber %d\n", NFlat, NZeros, NTrials, Low_Guess, High_Guess, Aberr_Num); #endif if (NZeros >= Seq_Num - 1) { /* Short */ clear_trials(ISAROOT); *rootinfo = NULL; *rootcount = 0; MERROR(E_SHORT, "The input signal is shorted on the way to the output"); } else clear_trials(0); *rootinfo = Trials; *rootcount = NZeros; if (Aberr_Num > 2) { sprintf(ebuf, "Pole-zero converging to numerical aberrations; giving up after %d trials", Seq_Num); SPfrontEnd->IFerror (ERR_WARNING, ebuf, 0); } if (NIter >= NITER_LIM) { sprintf(ebuf, "Pole-zero iteration limit reached; giving up after %d trials", Seq_Num); SPfrontEnd->IFerror (ERR_WARNING, ebuf, 0); } return error; } /* PZeval: evaluate an estimation function (given by 'strat') for the next guess (returned in a PZtrial) */ /* XXX ZZZ */ int PZeval(int strat, PZtrial **set, PZtrial **new_trial_p) { int error; PZtrial *new_trial; new_trial = NEW(PZtrial); new_trial->multiplicity = 0; new_trial->count = 0; new_trial->seq_num = Seq_Num++; switch (strat) { case GUESS: if (High_Guess < Low_Guess) Guess_Param = 0.0; else if (Guess_Param > 0.0) { if (High_Guess > 0.0) Guess_Param = High_Guess * 10.0; else Guess_Param = 1.0; } else { if (Low_Guess < 0.0) Guess_Param = Low_Guess * 10.0; else Guess_Param = -1.0; } if (Guess_Param > High_Guess) High_Guess = Guess_Param; if (Guess_Param < Low_Guess) Low_Guess = Guess_Param; new_trial->s.real = Guess_Param; if (set[1]) new_trial->s.imag = set[1]->s.imag; else new_trial->s.imag = 0.0; error = OK; break; case SYM: case SYM2: error = NIpzSym(set, new_trial); if (CKTpzTrapped == 1) { if (new_trial->s.real < set[0]->s.real || new_trial->s.real > set[1]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "FIXED UP BAD Strat: %s (%d) was (%.15g,%.15g)\n", snames[strat], CKTpzTrapped, new_trial->s.real, new_trial->s.imag); #endif new_trial->s.real = (set[0]->s.real + set[1]->s.real) / 2.0; } } else if (CKTpzTrapped == 2) { if (new_trial->s.real < set[1]->s.real || new_trial->s.real > set[2]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "FIXED UP BAD Strat: %s (%d) was (%.15g,%.15g)\n", snames[strat], CKTpzTrapped, new_trial->s.real, new_trial->s.imag); #endif new_trial->s.real = (set[1]->s.real + set[2]->s.real) / 2.0; } } else if (CKTpzTrapped == 3) { if (new_trial->s.real <= set[0]->s.real || (new_trial->s.real == set[1]->s.real && new_trial->s.imag == set[1]->s.imag) || new_trial->s.real >= set[2]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "FIXED UP BAD Strat: %s (%d), was (%.15g %.15g)\n", snames[strat], CKTpzTrapped, new_trial->s.real, new_trial->s.imag); #endif new_trial->s.real = (set[0]->s.real + set[2]->s.real) / 2.0; if (new_trial->s.real == set[1]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Still off!"); #endif if (Last_Move == MID_LEFT || Last_Move == NEAR_RIGHT) new_trial->s.real = (set[0]->s.real + set[1]->s.real) / 2.0; else new_trial->s.real = (set[1]->s.real + set[2]->s.real) / 2.0; } } } break; case COMPLEX_INIT: /* Not automatic */ #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "\tPZ minima at: %-30g %d\n", NIpzK, NIpzK_mag); #endif new_trial->s.real = set[1]->s.real; /* NIpzK is a good idea, but the value gets trashed * due to the numerics when zooming in on a minima. * The key is to know when to stop taking new values for NIpzK * (which I don't). For now I take the first value indicated * by the NIpzSym2 routine. A "hack". */ if (NIpzK != 0.0 && NIpzK_mag > -10) { while (NIpzK_mag > 0) { NIpzK *= 2.0; NIpzK_mag -= 1; } while (NIpzK_mag < 0) { NIpzK /= 2.0; NIpzK_mag += 1; } new_trial->s.imag = NIpzK; } else new_trial->s.imag = 10000.0; /* * Reset NIpzK so the same value doesn't get used again. */ NIpzK = 0.0; NIpzK_mag = 0; error = OK; break; case COMPLEX_GUESS: if (!set[2]) { new_trial->s.real = set[0]->s.real; new_trial->s.imag = 1.0e8; } else { new_trial->s.real = set[0]->s.real; new_trial->s.imag = 1.0e12; } error = OK; break; case MULLER: error = NIpzMuller(set, new_trial); break; case SPLIT_LEFT: new_trial->s.real = (set[0]->s.real + 2 * set[1]->s.real) / 3.0; error = OK; break; case SPLIT_RIGHT: new_trial->s.real = (set[2]->s.real + 2 * set[1]->s.real) / 3.0; error = OK; break; default: MERROR(E_PANIC, "Step type unknown"); break; } *new_trial_p = new_trial; return error; } /* CKTpzStrat: given three points, determine a good direction or method for guessing the next zero */ /* XXX ZZZ what is a strategy for complex hunting? */ int CKTpzStrat(PZtrial **set) { int suggestion; double a, b; int a_mag, b_mag; double k1, k2; int new_trap; new_trap = 0; if (set[1] && (set[1]->flags & ISAMINIMA)) { suggestion = COMPLEX_INIT; } else if (set[0] && set[0]->s.imag != 0.0) { if (!set[1] || !set[2]) suggestion = COMPLEX_GUESS; else suggestion = MULLER; } else if (!set[0] || !set[1] || !set[2]) { suggestion = INIT; } else { if (sgn(set[0]->f_def.real) != sgn(set[1]->f_def.real)) { /* Zero crossing between s[0] and s[1] */ new_trap = 1; suggestion = SYM2; } else if (sgn(set[1]->f_def.real) != sgn(set[2]->f_def.real)) { /* Zero crossing between s[1] and s[2] */ new_trap = 2; suggestion = SYM2; } else { zaddeq(&a, &a_mag, set[1]->f_def.real, set[1]->mag_def, -set[0]->f_def.real, set[0]->mag_def); zaddeq(&b, &b_mag, set[2]->f_def.real, set[2]->mag_def, -set[1]->f_def.real, set[1]->mag_def); if (!CKTpzTrapped) { k1 = set[1]->s.real - set[0]->s.real; k2 = set[2]->s.real - set[1]->s.real; if (a_mag + 10 < set[0]->mag_def && a_mag + 10 < set[1]->mag_def && b_mag + 10 < set[1]->mag_def && b_mag + 10 < set[2]->mag_def) { if (k1 > k2) suggestion = SKIP_RIGHT; else suggestion = SKIP_LEFT; } else if (sgn(a) != -sgn(b)) { if (a == 0.0) suggestion = SKIP_LEFT; else if (b == 0.0) suggestion = SKIP_RIGHT; else if (sgn(a) == sgn(set[1]->f_def.real)) suggestion = SHIFT_LEFT; else suggestion = SHIFT_RIGHT; } else if (sgn(a) == -sgn(set[1]->f_def.real)) { new_trap = 3; /* minima in magnitude above the x axis */ /* Search for exact mag. minima, look for complex pair */ suggestion = SYM; } else if (k1 > k2) suggestion = SKIP_RIGHT; else suggestion = SKIP_LEFT; } else { new_trap = 3; /* still */ /* XXX ? Are these tests needed or is SYM safe all the time? */ if (sgn(a) != sgn(b)) { /* minima in magnitude */ /* Search for exact mag. minima, look for complex pair */ suggestion = SYM; } else if (a_mag > b_mag || (a_mag == b_mag && fabs(a) > fabs(b))) suggestion = SPLIT_LEFT; else suggestion = SPLIT_RIGHT; } } if (Consec_Moves >= 3 && CKTpzTrapped == new_trap) { new_trap = CKTpzTrapped; if (Last_Move == MID_LEFT || Last_Move == NEAR_RIGHT) suggestion = SPLIT_LEFT; else if (Last_Move == MID_RIGHT || Last_Move == NEAR_LEFT) suggestion = SPLIT_RIGHT; else abort( ); /* XXX */ Consec_Moves = 0; } } CKTpzTrapped = new_trap; #ifdef PZDEBUG DEBUG(1) { if (set[0] && set[1] && set[2]) fprintf(stderr, "given %.15g %.15g / %.15g %.15g / %.15g %.15g\n", set[0]->s.real, set[0]->s.imag, set[1]->s.real, set[1]->s.imag, set[2]->s.real, set[2]->s.imag); fprintf(stderr, "suggestion(%d/%d/%d | %d): %s\n", NFlat, NZeros, Max_Zeros, CKTpzTrapped, snames[suggestion]); } #endif return suggestion; } /* CKTpzRunTrial: eval the function at a given 's', fold in deflation */ int CKTpzRunTrial(CKTcircuit *ckt, PZtrial **new_trialp, PZtrial **set) { PZAN *job = (PZAN *) ckt->CKTcurJob; PZtrial *match, *new_trial; PZtrial *p, *prev; SPcomplex def_frac, diff_frac; double reltol, abstol; int def_mag, diff_mag, error = 0; int i; int pretest, shifted, was_shifted; int repeat; new_trial = *new_trialp; if (new_trial->s.imag < 0.0) new_trial->s.imag *= -1.0; /* Insert the trial into the list of Trials, while calculating the deflation factor from previous zeros */ pretest = 0; shifted = 0; repeat = 0; do { def_mag = 0; def_frac.real = 1.0; def_frac.imag = 0.0; was_shifted = shifted; shifted = 0; prev = NULL; match = NULL; for (p = Trials; p != NULL; p = p->next) { C_SUBEQ(diff_frac,p->s,new_trial->s); if (diff_frac.real < 0.0 || (diff_frac.real == 0.0 && diff_frac.imag < 0.0)) { prev = p; } if (p->flags & ISAROOT) { abstol = 1e-5; reltol = 1e-6; } else { abstol = 1e-20; reltol = 1e-12; } if (diff_frac.imag == 0.0 && fabs(diff_frac.real) / (fabs(p->s.real) + abstol/reltol) < reltol) { #ifdef PZDEBUG DEBUG(1) { fprintf(stderr, "diff_frac.real = %10g, p->s = %10g, nt = %10g\n", diff_frac.real, p->s.real, new_trial->s.real); fprintf(stderr, "ab=%g,rel=%g\n", abstol, reltol); } #endif if (was_shifted || p->count >= 3 || !alter(new_trial, set[1], abstol, reltol)) { /* assume either a root or minima */ p->count = 0; pretest = 1; break; } else p->count += 1; /* try to shift */ shifted = 1; /* Re-calculate deflation */ break; } else { if (!CKTpzTrapped) p->count = 0; if (p->flags & ISAROOT) { diff_mag = 0; C_NORM(diff_frac,diff_mag); if (diff_frac.imag != 0.0) { C_MAG2(diff_frac); diff_mag *= 2; } C_NORM(diff_frac,diff_mag); for (i = p->multiplicity; i > 0; i--) { C_MUL(def_frac,diff_frac); def_mag += diff_mag; C_NORM(def_frac,def_mag); } } else if (!match) match = p; } } } while (shifted); if (pretest) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Pre-test taken\n"); /* XXX Should catch the double-zero right off * if K is 0.0 * instead of forcing a re-converge */ DEBUG(1) { fprintf(stderr, "NIpzK == %g, mag = %d\n", NIpzK, NIpzK_mag); fprintf(stderr, "over at %.30g %.30g (new %.30g %.30g, %x)\n", p->s.real, p->s.imag, new_trial->s.real, new_trial->s.imag, p->flags); } #endif if (!(p->flags & ISAROOT) && CKTpzTrapped == 3 && NIpzK != 0.0 && NIpzK_mag > -10) { #ifdef notdef // if (p->flags & ISAROOT) { // /* Ugh! muller doesn't work right */ // new_trial->flags = ISAMINIMA; // new_trial->s.imag = scalb(NIpzK, (int) (NIpzK_mag / 2)); // pretest = 0; // } else { #endif p->flags |= ISAMINIMA; tfree(new_trial); *new_trialp = p; repeat = 1; } else if (p->flags & ISAROOT) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Repeat at %.30g %.30g\n", p->s.real, p->s.imag); #endif *new_trialp = p; p->flags |= ISAREPEAT; p->multiplicity += 1; repeat = 1; } else { /* Regular zero, as precise as we can get it */ error = E_SINGULAR; } } if (!repeat) { if (!pretest) { /* Run the trial */ ckt->CKTniState |= NIPZSHOULDREORDER; /* XXX */ if (!(ckt->CKTniState & NIPZSHOULDREORDER)) { CKTpzLoad(ckt, &new_trial->s); #ifdef PZDEBUG DEBUG(3) { printf("Original:\n"); SMPprint(ckt->CKTmatrix, stdout); } #endif error = SMPcLUfac(ckt->CKTmatrix, ckt->CKTpivotAbsTol); if (error == E_SINGULAR) { #ifdef PZDEBUG DEBUG(1) printf("Needs reordering\n"); #endif ckt->CKTniState |= NIPZSHOULDREORDER; } else if (error != OK) return error; } if (ckt->CKTniState & NIPZSHOULDREORDER) { CKTpzLoad(ckt, &new_trial->s); error = SMPcReorder(ckt->CKTmatrix, 1.0e-30, 0.0 /* 0.1 Piv. Rel. */, &(job->PZnumswaps)); } if (error != E_SINGULAR) { ckt->CKTniState &= ~NIPZSHOULDREORDER; #ifdef PZDEBUG DEBUG(3) { printf("Factored:\n"); SMPprint(ckt->CKTmatrix, NULL); } #endif error = SMPcDProd(ckt->CKTmatrix, &new_trial->f_raw, &new_trial->mag_raw); } } if (error == E_SINGULAR || (new_trial->f_raw.real == 0.0 && new_trial->f_raw.imag == 0.0)) { new_trial->f_raw.real = 0.0; new_trial->f_raw.imag = 0.0; new_trial->mag_raw = 0; new_trial->f_def.real = 0.0; new_trial->f_def.imag = 0.0; new_trial->mag_def = 0; new_trial->flags = ISAROOT; /*printf("SMP Det: Singular\n");*/ } else if (error != OK) return error; else { /* PZnumswaps is either 0 or 1 */ new_trial->f_raw.real *= job->PZnumswaps; new_trial->f_raw.imag *= job->PZnumswaps; #ifdef PZDEBUG printf("SMP Det: (%g,%g)^%d\n", new_trial->f_raw.real, new_trial->f_raw.imag, new_trial->mag_raw); #endif new_trial->f_def.real = new_trial->f_raw.real; new_trial->f_def.imag = new_trial->f_raw.imag; new_trial->mag_def = new_trial->mag_raw; C_DIV(new_trial->f_def,def_frac); new_trial->mag_def -= def_mag; C_NORM(new_trial->f_def,new_trial->mag_def); } /* Link into the rest of the list */ if (prev) { new_trial->next = prev->next; if (prev->next) prev->next->prev = new_trial; prev->next = new_trial; } else { if (Trials) Trials->prev = new_trial; else ZeroTrial = new_trial; new_trial->next = Trials; Trials = new_trial; } new_trial->prev = prev; NTrials += 1; if (!(new_trial->flags & ISAROOT)) { if (match) check_flat(match, new_trial); else NFlat = 1; } } #ifdef PZDEBUG show_trial(new_trial, '*'); #endif return OK; } /* Process a zero; inc. zero count, deflate other trials */ int CKTpzVerify(PZtrial **set, PZtrial *new_trial) { PZtrial *next; int diff_mag; SPcomplex diff_frac; double tdiff; PZtrial *t, *prev; NG_IGNORE(set); NZeros += 1; if (new_trial->s.imag != 0.0) NZeros += 1; NFlat = 0; if (new_trial->multiplicity == 0) { new_trial->flags |= ISAROOT; new_trial->multiplicity = 1; } prev = NULL; for (t = Trials; t; t = next) { next = t->next; if (t->flags & ISAROOT) { prev = t; /* Don't need to bother */ continue; } C_SUBEQ(diff_frac,new_trial->s,t->s); if (new_trial->s.imag != 0.0) C_MAG2(diff_frac); tdiff = diff_frac.real; /* Note that Verify is called for each time the root is found, so * multiplicity is not significant */ if (diff_frac.real != 0.0) { diff_mag = 0; C_NORM(diff_frac,diff_mag); diff_mag *= -1; C_DIV(t->f_def,diff_frac); C_NORM(t->f_def,diff_mag); t->mag_def += diff_mag; } if (t->s.imag != 0.0 || fabs(tdiff) / (fabs(new_trial->s.real) + 200) < 0.005) { if (prev) prev->next = t->next; if (t->next) t->next->prev = prev; NTrials -= 1; #ifdef PZDEBUG show_trial(t, '-'); #endif if (t == ZeroTrial) { if (t->next) ZeroTrial = t->next; else if (t->prev) ZeroTrial = t->prev; else ZeroTrial = NULL; } if (t == Trials) { Trials = t->next; } tfree(t); } else { if (prev) check_flat(prev, t); else NFlat = 1; if (t->flags & ISAMINIMA) t->flags &= ~ISAMINIMA; prev = t; #ifdef PZDEBUG show_trial(t, '+'); #endif } } return 1; /* always ok */ } /* pzseek: search the trial list (given a starting point) for the first * non-zero entry; direction: -1 for prev, 1 for next, 0 for next * -or- first. Also, sets "Guess_Param" at the next reasonable * value to guess at if the search falls of the end of the list */ static PZtrial * pzseek(PZtrial *t, int dir) { Guess_Param = dir; if (t == NULL) return NULL; if (dir == 0 && !(t->flags & ISAROOT) && !(t->flags & ISAMINIMA)) return t; do { if (dir >= 0) t = t->next; else t = t->prev; } while (t && ((t->flags & ISAROOT) || (t->flags & ISAMINIMA))); return t; } static void clear_trials(int mode) { PZtrial *t, *next, *prev; prev = NULL; for (t = Trials; t; t = next) { next = t->next; if (mode || !(t->flags & ISAROOT)) { tfree(t); } else { if (prev) prev->next = t; else Trials = t; t->prev = prev; prev = t; } } if (prev) prev->next = NULL; else Trials = NULL; } void CKTpzUpdateSet(PZtrial **set, PZtrial *new) { int this_move; this_move = 0; if (new->s.imag != 0.0) { set[2] = set[1]; set[1] = set[0]; set[0] = new; } else if (!set[1]) set[1] = new; else if (!set[2] && new->s.real > set[1]->s.real) { set[2] = new; } else if (!set[0]) { set[0] = new; } else if (new->flags & ISAMINIMA) { set[1] = new; } else if (new->s.real < set[0]->s.real) { set[2] = set[1]; set[1] = set[0]; set[0] = new; this_move = FAR_LEFT; } else if (new->s.real < set[1]->s.real) { if (!CKTpzTrapped || new->mag_def < set[1]->mag_def || (new->mag_def == set[1]->mag_def && fabs(new->f_def.real) < fabs(set[1]->f_def.real))) { /* Really should check signs, not just compare fabs( ) */ set[2] = set[1]; /* XXX = set[2]->prev :: possible opt */ set[1] = new; this_move = MID_LEFT; } else { set[0] = new; this_move = NEAR_LEFT; } } else if (new->s.real < set[2]->s.real) { if (!CKTpzTrapped || new->mag_def < set[1]->mag_def || (new->mag_def == set[1]->mag_def && fabs(new->f_def.real) < fabs(set[1]->f_def.real))) { /* Really should check signs, not just compare fabs( ) */ set[0] = set[1]; set[1] = new; this_move = MID_RIGHT; } else { set[2] = new; this_move = NEAR_RIGHT; } } else { set[0] = set[1]; set[1] = set[2]; set[2] = new; this_move = FAR_RIGHT; } if (CKTpzTrapped && this_move == Last_Move) Consec_Moves += 1; else Consec_Moves = 0; Last_Move = this_move; } void zaddeq(double *a, int *amag, double x, int xmag, double y, int ymag) { /* Balance magnitudes . . . */ if (xmag > ymag) { *amag = xmag; if (xmag > 50 + ymag) y = 0.0; else for (xmag -= ymag; xmag > 0; xmag--) y /= 2.0; } else { *amag = ymag; if (ymag > 50 + xmag) x = 0.0; else for (ymag -= xmag; ymag > 0; ymag--) x /= 2.0; } *a = x + y; if (*a == 0.0) *amag = 0; else { while (fabs(*a) > 1.0) { *a /= 2.0; *amag += 1; } while (fabs(*a) < 0.5) { *a *= 2.0; *amag -= 1; } } } #ifdef PZDEBUG static void show_trial(PZtrial *new_trial, char x) { DEBUG(1) { if(new_trial) { fprintf(stderr, "%c (%3d/%3d) %.15g %.15g :: %.30g %.30g %d\n", x, NIter, new_trial->seq_num, new_trial->s.real, new_trial->s.imag, new_trial->f_def.real, new_trial->f_def.imag, new_trial->mag_def); if (new_trial->flags & ISANABERRATION) fprintf(stderr, "*** numerical aberration ***\n"); } else { fprintf(stderr, "%c (%3d/---) new_trial = nil\n", x, NIter); } } } #endif static void check_flat(PZtrial *a, PZtrial *b) { int diff_mag; SPcomplex diff_frac; double mult; diff_mag = a->mag_def - b->mag_def; if (abs(diff_mag) <= 1) { if (diff_mag == 1) mult = 2.0; else if (diff_mag == -1) mult = 0.5; else mult = 1.0; C_SUBEQ(diff_frac, mult * a->f_def, b->f_def); C_MAG2(diff_frac); if (diff_frac.real < 1.0e-20) NFlat += 1; } /* XXX else NFlat = ?????? */ } /* XXX ZZZ */ int CKTpzStep(int strat, PZtrial **set) { switch (strat) { case INIT: if (!set[1]) { set[1] = pzseek(ZeroTrial, 0); } else if (!set[2]) set[2] = pzseek(set[1], 1); else if (!set[0]) set[0] = pzseek(set[1], -1); break; case SKIP_LEFT: set[0] = pzseek(set[0], -1); break; case SKIP_RIGHT: set[2] = pzseek(set[2], 1); break; case SHIFT_LEFT: set[2] = set[1]; set[1] = set[0]; set[0] = pzseek(set[0], -1); break; case SHIFT_RIGHT: set[0] = set[1]; set[1] = set[2]; set[2] = pzseek(set[2], 1); break; } if (!set[0] || !set[1] || !set[2]) return 0; else return 1; } void CKTpzReset(PZtrial **set) { CKTpzTrapped = 0; Consec_Moves = 0; set[1] = pzseek(ZeroTrial, 0); if (set[1] != NULL) { set[0] = pzseek(set[1], -1); set[2] = pzseek(set[1], 1); } else { set[0] = NULL; set[2] = NULL; } } static int alter(PZtrial *new, PZtrial *nearto, double abstol, double reltol) { double p1, p2; #ifdef PZDEBUG DEBUG(1) { fprintf(stderr, "ALTER from: %.30g %.30g\n", new->s.real, new->s.imag); if (nearto->prev) fprintf(stderr, "nt->prev %g\n", nearto->prev->s.real); if (nearto->next) fprintf(stderr, "nt->next %g\n", nearto->next->s.real); } #endif if (CKTpzTrapped != 2) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "not 2\n"); #endif p1 = nearto->s.real; if (nearto->flags & ISAROOT) p1 -= 1e-6 * nearto->s.real + 1e-5; if (nearto->prev) { p1 += nearto->prev->s.real; #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "p1 %g\n", p1); #endif } else p1 -= 10.0 * (fabs(p1) + 1.0); p1 /= 2.0; } else p1 = nearto->s.real; if (CKTpzTrapped != 1) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "not 1\n"); #endif p2 = nearto->s.real; if (nearto->flags & ISAROOT) p2 += 1e-6 * nearto->s.real + 1e-5; /* XXX Would rather use pow(2)*/ if (nearto->next) { p2 += nearto->next->s.real; #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "p2 %g\n", p2); #endif } else p2 += 10.0 * (fabs(p2)+ 1.0); p2 /= 2.0; } else p2 = nearto->s.real; if ((nearto->prev && fabs(p1 - nearto->prev->s.real) / fabs(nearto->prev->s.real) + abstol/reltol < reltol) || (nearto->next && fabs(p2 - nearto->next->s.real) / fabs(nearto->next->s.real) + abstol/reltol < reltol)) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Bailed out\n"); #endif return 0; } if (CKTpzTrapped != 2 && nearto->s.real - p1 > p2 - nearto->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "take p1\n"); #endif new->s.real = p1; } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "take p2\n"); #endif new->s.real = p2; } #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "ALTER to : %.30g %.30g\n", new->s.real, new->s.imag); #endif return 1; } ngspice-26/src/spicelib/README0000644000265600020320000000012312264261473015466 0ustar andreasadminThe Spice Library. It takes a circuit description and builds a simulator from it. ngspice-26/src/spicelib/ChangeLog0000644000265600020320000000124112264261473016362 0ustar andreasadmin2000-07-25 Arno W. Peters * src/spicelib/devices/README: Moved to src/spicelib/README. * src/spicelib/Makefile.am, src/spicelib/devices/Makefile.am: Files affected by the move. * src/spicelib/devices/parser/*: Moved all files to src/spicelib/parser. * configure.in, src/Makefile.am, src/spicelib/Makefile.am, src/spicelib/devices/Makefile.am: Files affected by the move. 2000-07-24 Arno W. Peters * src/spicelib/devices/analysis/*: Moved all files to src/spicelib/analysis. * configure.in, src/spicelib/Makefile.am, src/spicelib/Makefile.am, src/spicelib/devices/Makefile.am: Files affected by the move. ngspice-26/src/spicelib/Makefile.am0000644000265600020320000000027012264261473016645 0ustar andreasadmin# Process this file with automake EXTRA_DIST = README SUBDIRS = analysis parser devices dist-hook: rm -rf `find $(distdir)/devices -name .deps` MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/Makefile.in0000644000265600020320000004414012264261535016661 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Process this file with automake VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = README SUBDIRS = analysis parser devices MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am dist-hook: rm -rf `find $(distdir)/devices -name .deps` # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/0000755000265600020320000000000012264261711016227 5ustar andreasadminngspice-26/src/spicelib/devices/mos3/0000755000265600020320000000000012264261710017107 5ustar andreasadminngspice-26/src/spicelib/devices/mos3/mos3noi.c0000644000265600020320000001453712264261473020662 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "mos3defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * MOS3noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int MOS3noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; MOS3model *firstModel = (MOS3model *) genmodel; MOS3model *model; MOS3instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[MOS3NSRCS]; double lnNdens[MOS3NSRCS]; int i; /* define the names of the noise sources */ static char *MOS3nNames[MOS3NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in MOS3defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->MOS3nextModel) { for (inst=model->MOS3instances; inst != NULL; inst=inst->MOS3nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < MOS3NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->MOS3name,MOS3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < MOS3NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->MOS3name,MOS3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->MOS3name,MOS3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[MOS3RDNOIZ],&lnNdens[MOS3RDNOIZ], ckt,THERMNOISE,inst->MOS3dNodePrime,inst->MOS3dNode, inst->MOS3drainConductance); NevalSrc(&noizDens[MOS3RSNOIZ],&lnNdens[MOS3RSNOIZ], ckt,THERMNOISE,inst->MOS3sNodePrime,inst->MOS3sNode, inst->MOS3sourceConductance); NevalSrc(&noizDens[MOS3IDNOIZ],&lnNdens[MOS3IDNOIZ], ckt,THERMNOISE,inst->MOS3dNodePrime,inst->MOS3sNodePrime, (2.0/3.0 * fabs(inst->MOS3gm))); NevalSrc(&noizDens[MOS3FLNOIZ], NULL, ckt, N_GAIN,inst->MOS3dNodePrime, inst->MOS3sNodePrime, (double)0.0); noizDens[MOS3FLNOIZ] *= model->MOS3fNcoef * exp(model->MOS3fNexp * log(MAX(fabs(inst->MOS3cd),N_MINLOG))) / (data->freq * (inst->MOS3w - 2*model->MOS3widthNarrow) * (inst->MOS3l - 2*model->MOS3latDiff) * model->MOS3oxideCapFactor * model->MOS3oxideCapFactor); lnNdens[MOS3FLNOIZ] = log(MAX(noizDens[MOS3FLNOIZ],N_MINLOG)); noizDens[MOS3TOTNOIZ] = noizDens[MOS3RDNOIZ] + noizDens[MOS3RSNOIZ] + noizDens[MOS3IDNOIZ] + noizDens[MOS3FLNOIZ]; lnNdens[MOS3TOTNOIZ] = log(MAX(noizDens[MOS3TOTNOIZ], N_MINLOG)); *OnDens += noizDens[MOS3TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < MOS3NSRCS; i++) { inst->MOS3nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < MOS3NSRCS; i++) { inst->MOS3nVar[OUTNOIZ][i] = 0.0; inst->MOS3nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < MOS3NSRCS; i++) { if (i != MOS3TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->MOS3nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->MOS3nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->MOS3nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->MOS3nVar[OUTNOIZ][i] += tempOnoise; inst->MOS3nVar[OUTNOIZ][MOS3TOTNOIZ] += tempOnoise; inst->MOS3nVar[INNOIZ][i] += tempInoise; inst->MOS3nVar[INNOIZ][MOS3TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < MOS3NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < MOS3NSRCS; i++) { data->outpVector[data->outNumber++] = inst->MOS3nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->MOS3nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3sld.c0000644000265600020320000006441112264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3sLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; double SaveState[44]; int save_mode; int i; int iparmno; int error; int flag; double A0; double DELA; double Apert; double DELAinv; double gspr0; double gspr; double gdpr0; double gdpr; double cdpr0; double cspr0; double cd0; double cbd0; double cbs0; double cd; double cbd; double cbs; double DcdprDp; double DcsprDp; double DcbDp; double DcdDp; double DcbsDp; double DcbdDp; double DcdprmDp; double DcsprmDp; double qgs0; double qgd0; double qgb0; double qbd0; double qbd; double qbs0; double qbs; double DqgsDp; double DqgdDp; double DqgbDp; double DqbdDp; double DqbsDp; double Osxpgs; double Osxpgd; double Osxpgb; double Osxpbd; double Osxpbs; double tag0; double tag1; double arg; double sarg; double sargsw; int offset; double EffectiveLength; double EffectiveWidth; SENstruct *info; #ifdef SENSDEBUG printf("MOS3senload \n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %d\n",ckt->CKTorder); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } /* loop through all the models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { #ifdef SENSDEBUG printf("senload instance name %s\n",here->MOS3name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS3gNode,here->MOS3dNode,here->MOS3dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS3sNode ,here->MOS3sNodePrime, here->MOS3bNode,here->MOS3senParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++){ *(SaveState + i) = *(ckt->CKTstate0 + here->MOS3states + i); } *(SaveState + 17) = here->MOS3sourceConductance; *(SaveState + 18) = here->MOS3drainConductance; *(SaveState + 19) = here->MOS3cd; *(SaveState + 20) = here->MOS3cbs; *(SaveState + 21) = here->MOS3cbd; *(SaveState + 22) = here->MOS3gmbs; *(SaveState + 23) = here->MOS3gm; *(SaveState + 24) = here->MOS3gds; *(SaveState + 25) = here->MOS3gbd; *(SaveState + 26) = here->MOS3gbs; *(SaveState + 27) = here->MOS3capbd; *(SaveState + 28) = here->MOS3capbs; *(SaveState + 29) = here->MOS3Cbd; *(SaveState + 30) = here->MOS3Cbdsw; *(SaveState + 31) = here->MOS3Cbs; *(SaveState + 32) = here->MOS3Cbssw; *(SaveState + 33) = here->MOS3f2d; *(SaveState + 34) = here->MOS3f3d; *(SaveState + 35) = here->MOS3f4d; *(SaveState + 36) = here->MOS3f2s; *(SaveState + 37) = here->MOS3f3s; *(SaveState + 38) = here->MOS3f4s; *(SaveState + 39) = here->MOS3cgs; *(SaveState + 40) = here->MOS3cgd; *(SaveState + 41) = here->MOS3cgb; *(SaveState + 42) = here->MOS3vdsat; *(SaveState + 43) = here->MOS3von; save_mode = here->MOS3mode; if(here->MOS3senParmNo == 0) goto next1; #ifdef SENSDEBUG printf("without perturbation \n"); #endif /* SENSDEBUG */ cdpr0= here->MOS3cd; cspr0= -(here->MOS3cd + here->MOS3cbd + here->MOS3cbs); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ qgs0 = *(ckt->CKTstate1 + here->MOS3qgs); qgd0 = *(ckt->CKTstate1 + here->MOS3qgd); qgb0 = *(ckt->CKTstate1 + here->MOS3qgb); } else{ qgs0 = *(ckt->CKTstate0 + here->MOS3qgs); qgd0 = *(ckt->CKTstate0 + here->MOS3qgd); qgb0 = *(ckt->CKTstate0 + here->MOS3qgb); } here->MOS3senPertFlag = ON; error = MOS3load((GENmodel*)model,ckt); if(error) return(error); cd0 = here->MOS3cd ; cbd0 = here->MOS3cbd ; cbs0 = here->MOS3cbs ; gspr0= here->MOS3sourceConductance ; gdpr0= here->MOS3drainConductance ; qbs0 = *(ckt->CKTstate0 + here->MOS3qbs); qbd0 = *(ckt->CKTstate0 + here->MOS3qbd); for( flag = 0 ; flag <= 1 ; flag++){ if(here->MOS3sens_l == 0) if(flag == 0) goto next2; if(here->MOS3sens_w == 0) if(flag == 1) goto next2; if(flag == 0){ A0 = here->MOS3l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS3l = Apert; } else{ A0 = here->MOS3w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS3w = Apert; here->MOS3drainArea *= (1 + info->SENpertfac); here->MOS3sourceArea *= (1 + info->SENpertfac); here->MOS3Cbd *= (1 + info->SENpertfac); here->MOS3Cbs *= (1 + info->SENpertfac); if(here->MOS3drainPerimiter){ here->MOS3Cbdsw += here->MOS3Cbdsw * DELA/here->MOS3drainPerimiter; } if(here->MOS3sourcePerimiter){ here->MOS3Cbssw += here->MOS3Cbssw * DELA/here->MOS3sourcePerimiter; } if(*(ckt->CKTstate0 + here->MOS3vbd) >= here->MOS3tDepCap){ arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3f2d = here->MOS3Cbd* (1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + here->MOS3Cbdsw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3d = here->MOS3Cbd * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ model->MOS3bulkJctPotential + here->MOS3Cbdsw * model->MOS3bulkJctSideGradingCoeff *sargsw/arg / model->MOS3bulkJctPotential; here->MOS3f4d = here->MOS3Cbd* model->MOS3bulkJctPotential*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + here->MOS3Cbdsw*model->MOS3bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3d/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2d; } if(*(ckt->CKTstate0 + here->MOS3vbs) >= here->MOS3tDepCap){ arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3f2s = here->MOS3Cbs* (1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + here->MOS3Cbssw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3s = here->MOS3Cbs * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ model->MOS3bulkJctPotential + here->MOS3Cbssw * model->MOS3bulkJctSideGradingCoeff * sargsw/arg/ model->MOS3bulkJctPotential; here->MOS3f4s = here->MOS3Cbs* model->MOS3bulkJctPotential*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + here->MOS3Cbssw*model->MOS3bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3s/2* (here->MOS3tBulkPot*here->MOS3tBulkPot) -here->MOS3tBulkPot * here->MOS3f2s; } here->MOS3drainConductance *= Apert/A0; here->MOS3sourceConductance *= Apert/A0; } #ifdef SENSDEBUG if(flag == 0) printf("perturbation of l\n"); if(flag == 1) printf("perturbation of w\n"); #endif /* SENSDEBUG */ error = MOS3load((GENmodel*)model,ckt); if(error) return(error); if(flag == 0){ here->MOS3l = A0; } else{ here->MOS3w = A0; here->MOS3drainArea /= (1 + info->SENpertfac); here->MOS3sourceArea /= (1 + info->SENpertfac); here->MOS3drainConductance *= A0/Apert; here->MOS3sourceConductance *= A0/Apert; } cd = here->MOS3cd ; cbd = here->MOS3cbd ; cbs = here->MOS3cbs ; gspr= here->MOS3sourceConductance ; gdpr= here->MOS3drainConductance ; DcdDp = (cd - cd0) * DELAinv; DcbsDp = (cbs - cbs0) * DELAinv; DcbdDp = (cbd - cbd0) * DELAinv; DcbDp = ( DcbsDp + DcbdDp ); DcdprDp = 0; DcsprDp = 0; if(here->MOS3dNode != here->MOS3dNodePrime) if(gdpr0) DcdprDp = cdpr0 * (gdpr - gdpr0)/gdpr0 * DELAinv; if(here->MOS3sNode != here->MOS3sNodePrime) if(gspr0) DcsprDp = cspr0 * (gspr - gspr0)/gspr0 * DELAinv; DcdprmDp = ( - DcdprDp + DcdDp); DcsprmDp = ( - DcbsDp - DcdDp - DcbdDp - DcsprDp); if(flag == 0){ EffectiveLength = here->MOS3l - 2*model->MOS3latDiff + model->MOS3lengthAdjust; if(EffectiveLength == 0){ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; } else{ DqgsDp = model->MOS3type * qgs0 / EffectiveLength; DqgdDp = model->MOS3type * qgd0 / EffectiveLength; DqgbDp = model->MOS3type * qgb0 / EffectiveLength; } } else{ EffectiveWidth = here->MOS3w - 2*model->MOS3widthNarrow + model->MOS3widthAdjust; DqgsDp = model->MOS3type * qgs0 / EffectiveWidth; DqgdDp = model->MOS3type * qgd0 / EffectiveWidth; DqgbDp = model->MOS3type * qgb0 / EffectiveWidth; } qbd = *(ckt->CKTstate0 + here->MOS3qbd); qbs = *(ckt->CKTstate0 + here->MOS3qbs); DqbsDp = model->MOS3type * (qbs - qbs0)*DELAinv; DqbdDp = model->MOS3type * (qbd - qbd0)*DELAinv; if(flag == 0){ *(here->MOS3dphigs_dl) = DqgsDp; *(here->MOS3dphigd_dl) = DqgdDp; *(here->MOS3dphibs_dl) = DqbsDp; *(here->MOS3dphibd_dl) = DqbdDp; *(here->MOS3dphigb_dl) = DqgbDp; } else{ *(here->MOS3dphigs_dw) = DqgsDp; *(here->MOS3dphigd_dw) = DqgdDp; *(here->MOS3dphibs_dw) = DqbsDp; *(here->MOS3dphibd_dw) = DqbdDp; *(here->MOS3dphigb_dw) = DqgbDp; } #ifdef SENSDEBUG printf("CKTag[0]=%.7e,CKTag[1]=%.7e,flag= %d\n", ckt->CKTag[0],ckt->CKTag[1],flag); printf("cd0 = %.7e ,cd = %.7e,\n",cd0,cd); printf("cbs0 = %.7e ,cbs = %.7e,\n",cbs0,cbs); printf("cbd0 = %.7e ,cbd = %.7e,\n",cbd0,cbd); printf("DcdprmDp = %.7e,\n",DcdprmDp); printf("DcsprmDp = %.7e,\n",DcsprmDp); printf("DcdprDp = %.7e,\n",DcdprDp); printf("DcsprDp = %.7e,\n",DcsprDp); printf("qgs0 = %.7e \n",qgs0); printf("qgd0 = %.7e \n",qgd0); printf("qgb0 = %.7e \n",qgb0); printf("qbs0 = %.7e ,qbs = %.7e,\n",qbs0,qbs); printf("qbd0 = %.7e ,qbd = %.7e,\n",qbd0,qbd); printf("DqgsDp = %.7e \n",DqgsDp); printf("DqgdDp = %.7e \n",DqgdDp); printf("DqgbDp = %.7e \n",DqgbDp); printf("DqbsDp = %.7e \n",DqbsDp); printf("DqbdDp = %.7e \n",DqbdDp); printf("EffectiveLength = %.7e \n",EffectiveLength); printf("tdepCap = %.7e \n",here->MOS3tDepCap); printf("\n"); #endif /* SENSDEBUG*/ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto next2; /* * load RHS matrix */ if(flag == 0){ *(info->SEN_RHS[here->MOS3bNode] + here->MOS3senParmNo) -= model->MOS3type * DcbDp; *(info->SEN_RHS[here->MOS3dNode] + here->MOS3senParmNo) -= model->MOS3type * DcdprDp; *(info->SEN_RHS[here->MOS3dNodePrime] + here->MOS3senParmNo) -= model->MOS3type * DcdprmDp; *(info->SEN_RHS[here->MOS3sNode] + here->MOS3senParmNo) -= model->MOS3type * DcsprDp; *(info->SEN_RHS[here->MOS3sNodePrime] + here->MOS3senParmNo) -= model->MOS3type * DcsprmDp; } else{ offset = here->MOS3sens_l; *(info->SEN_RHS[here->MOS3bNode] + here->MOS3senParmNo + offset) -= model->MOS3type * DcbDp; *(info->SEN_RHS[here->MOS3dNode] + here->MOS3senParmNo + offset) -= model->MOS3type * DcdprDp; *(info->SEN_RHS[here->MOS3dNodePrime] + here->MOS3senParmNo + offset) -= model->MOS3type * DcdprmDp; *(info->SEN_RHS[here->MOS3sNode] + here->MOS3senParmNo + offset) -= model->MOS3type * DcsprDp; *(info->SEN_RHS[here->MOS3sNodePrime] + here->MOS3senParmNo + offset) -= model->MOS3type * DcsprmDp; } #ifdef SENSDEBUG printf("after loading\n"); if(flag == 0){ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS3bNode] + here->MOS3senParmNo)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNode] + here->MOS3senParmNo)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNode] + here->MOS3senParmNo)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNodePrime] + here->MOS3senParmNo)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNodePrime] + here->MOS3senParmNo)); printf("\n"); } else{ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS3bNode] + here->MOS3senParmNo + here->MOS3sens_l)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNode] + here->MOS3senParmNo + here->MOS3sens_l)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNode] + here->MOS3senParmNo + here->MOS3sens_l)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNodePrime] + here->MOS3senParmNo + here->MOS3sens_l)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNodePrime] + here->MOS3senParmNo + here->MOS3sens_l)); } #endif /* SENSDEBUG*/ next2: ; } next1: if((info->SENmode == DCSEN) || (ckt->CKTmode&MODETRANOP) ) goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ #ifdef SENSDEBUG printf("after conductive currents\n"); printf("iparmno = %d\n",iparmno); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS3bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNodePrime] + iparmno)); printf("\n"); #endif /* SENSDEBUG */ Osxpgs = tag0 * *(ckt->CKTstate1 + here->MOS3sensxpgs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS3sensxpgs + 10*(iparmno - 1) + 1); Osxpgd = tag0 * *(ckt->CKTstate1 + here->MOS3sensxpgd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS3sensxpgd + 10*(iparmno - 1) + 1); Osxpbs = tag0 * *(ckt->CKTstate1 + here->MOS3sensxpbs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS3sensxpbs + 10*(iparmno - 1) + 1); Osxpbd =tag0 * *(ckt->CKTstate1 + here->MOS3sensxpbd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS3sensxpbd + 10*(iparmno - 1) + 1); Osxpgb = tag0 * *(ckt->CKTstate1 + here->MOS3sensxpgb + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS3sensxpgb + 10*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno=%d\n",iparmno); printf("sxpgs=%.7e,sdgs=%.7e\n", *(ckt->CKTstate1 + here->MOS3sensxpgs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS3sensxpgs + 10*(iparmno - 1) + 1)); printf("sxpgd=%.7e,sdgd=%.7e\n", *(ckt->CKTstate1 + here->MOS3sensxpgd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS3sensxpgd + 10*(iparmno - 1) + 1)); printf("sxpbs=%.7e,sdbs=%.7e\n", *(ckt->CKTstate1 + here->MOS3sensxpbs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS3sensxpbs + 10*(iparmno - 1) + 1)); printf("sxpbd=%.7e,sdbd=%.7e\n", *(ckt->CKTstate1 + here->MOS3sensxpbd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS3sensxpbd + 10*(iparmno - 1) + 1)); printf("sxpgb=%.7e,sdgb=%.7e\n", *(ckt->CKTstate1 + here->MOS3sensxpgb + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS3sensxpgb + 10*(iparmno - 1) + 1)); printf("before loading DqDp\n"); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); printf("\n"); #endif /* SENSDEBUG */ if(here->MOS3sens_l && (iparmno == here->MOS3senParmNo)){ Osxpgs -= tag0 * *(here->MOS3dphigs_dl); Osxpgd -= tag0 * *(here->MOS3dphigd_dl); Osxpbs -= tag0 * *(here->MOS3dphibs_dl); Osxpbd -= tag0 * *(here->MOS3dphibd_dl); Osxpgb -= tag0 * *(here->MOS3dphigb_dl); } if(here->MOS3sens_w && (iparmno == (here->MOS3senParmNo + here->MOS3sens_l))){ Osxpgs -= tag0 * *(here->MOS3dphigs_dw); Osxpgd -= tag0 * *(here->MOS3dphigd_dw); Osxpbs -= tag0 * *(here->MOS3dphibs_dw); Osxpbd -= tag0 * *(here->MOS3dphibd_dw); Osxpgb -= tag0 * *(here->MOS3dphigb_dw); } #ifdef SENSDEBUG printf("after loading DqDp\n"); printf("DqgsDp=%.7e",DqgsDp); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->MOS3bNode] + iparmno) += Osxpbs + Osxpbd -Osxpgb; *(info->SEN_RHS[here->MOS3gNode] + iparmno) += Osxpgs + Osxpgd + Osxpgb; *(info->SEN_RHS[here->MOS3dNodePrime] + iparmno) -= Osxpgd + Osxpbd ; *(info->SEN_RHS[here->MOS3sNodePrime] + iparmno) -= Osxpgs + Osxpbs; #ifdef SENSDEBUG printf("after capacitive currents\n"); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS3bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS3sNodePrime] + iparmno)); #endif /* SENSDEBUG */ } restore: /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS3states + i) = *(SaveState + i); here->MOS3sourceConductance = *(SaveState + 17) ; here->MOS3drainConductance = *(SaveState + 18) ; here->MOS3cd = *(SaveState + 19) ; here->MOS3cbs = *(SaveState + 20) ; here->MOS3cbd = *(SaveState + 21) ; here->MOS3gmbs = *(SaveState + 22) ; here->MOS3gm = *(SaveState + 23) ; here->MOS3gds = *(SaveState + 24) ; here->MOS3gbd = *(SaveState + 25) ; here->MOS3gbs = *(SaveState + 26) ; here->MOS3capbd = *(SaveState + 27) ; here->MOS3capbs = *(SaveState + 28) ; here->MOS3Cbd = *(SaveState + 29) ; here->MOS3Cbdsw = *(SaveState + 30) ; here->MOS3Cbs = *(SaveState + 31) ; here->MOS3Cbssw = *(SaveState + 32) ; here->MOS3f2d = *(SaveState + 33) ; here->MOS3f3d = *(SaveState + 34) ; here->MOS3f4d = *(SaveState + 35) ; here->MOS3f2s = *(SaveState + 36) ; here->MOS3f3s = *(SaveState + 37) ; here->MOS3f4s = *(SaveState + 38) ; here->MOS3cgs = *(SaveState + 39) ; here->MOS3cgd = *(SaveState + 40) ; here->MOS3cgb = *(SaveState + 41) ; here->MOS3vdsat = *(SaveState + 42) ; here->MOS3von = *(SaveState + 43) ; here->MOS3mode = save_mode ; here->MOS3senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS3senload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3dest.c0000644000265600020320000000152512264261473021025 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos3defs.h" #include "ngspice/suffix.h" void MOS3destroy(GENmodel **inModel) { MOS3model **model = (MOS3model **)inModel; MOS3instance *here; MOS3instance *prev = NULL; MOS3model *mod = *model; MOS3model *oldmod = NULL; for( ; mod ; mod = mod->MOS3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MOS3instances ; here ; here = here->MOS3nextInstance) { if(prev){ if(prev->MOS3sens) FREE(prev->MOS3sens); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos3/mos3init.c0000644000265600020320000000420012264261473021022 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mos3itf.h" #include "mos3ext.h" #include "mos3init.h" SPICEdev MOS3info = { { "Mos3", "Level 3 MOSfet model with Meyer capacitance model", &MOS3nSize, &MOS3nSize, MOS3names, &MOS3pTSize, MOS3pTable, &MOS3mPTSize, MOS3mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MOS3param, /* DEVmodParam */ MOS3mParam, /* DEVload */ MOS3load, /* DEVsetup */ MOS3setup, /* DEVunsetup */ MOS3unsetup, /* DEVpzSetup */ MOS3setup, /* DEVtemperature*/ MOS3temp, /* DEVtrunc */ MOS3trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MOS3acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MOS3destroy, /* DEVmodDelete */ MOS3mDelete, /* DEVdelete */ MOS3delete, /* DEVsetic */ MOS3getic, /* DEVask */ MOS3ask, /* DEVmodAsk */ MOS3mAsk, /* DEVpzLoad */ MOS3pzLoad, /* DEVconvTest */ MOS3convTest, /* DEVsenSetup */ MOS3sSetup, /* DEVsenLoad */ MOS3sLoad, /* DEVsenUpdate */ MOS3sUpdate, /* DEVsenAcLoad */ MOS3sAcLoad, /* DEVsenPrint */ MOS3sPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ MOS3disto, /* DEVnoise */ MOS3noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MOS3iSize, /* DEVmodSize */ &MOS3mSize }; SPICEdev * get_mos3_info(void) { return &MOS3info; } ngspice-26/src/spicelib/devices/mos3/mos3conv.c0000644000265600020320000000635112264261473021035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3convTest(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; double delvbs; double delvbd; double delvgs; double delvds; double delvgd; double cbhat; double cdhat; double vbs; double vbd; double vgs; double vds; double vgd; double vgdo; double tol; for( ; model != NULL; model = model->MOS3nextModel) { for(here = model->MOS3instances; here!= NULL; here = here->MOS3nextInstance) { vbs = model->MOS3type * ( *(ckt->CKTrhs+here->MOS3bNode) - *(ckt->CKTrhs+here->MOS3sNodePrime)); vgs = model->MOS3type * ( *(ckt->CKTrhs+here->MOS3gNode) - *(ckt->CKTrhs+here->MOS3sNodePrime)); vds = model->MOS3type * ( *(ckt->CKTrhs+here->MOS3dNodePrime) - *(ckt->CKTrhs+here->MOS3sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS3vgs) - *(ckt->CKTstate0 + here->MOS3vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS3vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS3vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS3vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS3mode >= 0) { cdhat= here->MOS3cd- here->MOS3gbd * delvbd + here->MOS3gmbs * delvbs + here->MOS3gm * delvgs + here->MOS3gds * delvds ; } else { cdhat= here->MOS3cd - ( here->MOS3gbd - here->MOS3gmbs) * delvbd - here->MOS3gm * delvgd + here->MOS3gds * delvds ; } cbhat= here->MOS3cbs + here->MOS3cbd + here->MOS3gbd * delvbd + here->MOS3gbs * delvbs ; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(here->MOS3cd))+ ckt->CKTabstol; if (fabs(cdhat-here->MOS3cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(cbhat),fabs(here->MOS3cbs+here->MOS3cbd)) + ckt->CKTabstol; if (fabs(cbhat-(here->MOS3cbs+here->MOS3cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged*/ } } } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3mdel.c0000644000265600020320000000176612264261473021016 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MOS3model **model = (MOS3model **)inModel; MOS3model *modfast = (MOS3model *)kill; MOS3instance *here; MOS3instance *prev = NULL; MOS3model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MOS3nextModel)) { if( (*model)->MOS3modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MOS3nextModel; /* cut deleted device out of list */ for(here = (*model)->MOS3instances ; here ; here = here->MOS3nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3trun.c0000644000265600020320000000134512264261473021056 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; for( ; model != NULL; model = model->MOS3nextModel) { for(here=model->MOS3instances;here!=NULL;here = here->MOS3nextInstance){ CKTterr(here->MOS3qgs,ckt,timeStep); CKTterr(here->MOS3qgd,ckt,timeStep); CKTterr(here->MOS3qgb,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3pzld.c0000644000265600020320000001235712264261473021044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; double EffectiveWidth; for( ; model != NULL; model = model->MOS3nextModel) { for(here = model->MOS3instances; here!= NULL; here = here->MOS3nextInstance) { if (here->MOS3mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveWidth=here->MOS3w-2*model->MOS3widthNarrow+ model->MOS3widthAdjust; EffectiveLength=here->MOS3l - 2*model->MOS3latDiff+ model->MOS3lengthAdjust; GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; capgs = ( 2* *(ckt->CKTstate0+here->MOS3capgs)+ GateSourceOverlapCap ); capgd = ( 2* *(ckt->CKTstate0+here->MOS3capgd)+ GateDrainOverlapCap ); capgb = ( 2* *(ckt->CKTstate0+here->MOS3capgb)+ GateBulkOverlapCap ); xgs = capgs; xgd = capgd; xgb = capgb; xbd = here->MOS3capbd; xbs = here->MOS3capbs; /*printf("mos2: xgs=%g, xgd=%g, xgb=%g, xbd=%g, xbs=%g\n", xgs,xgd,xgb,xbd,xbs);*/ /* * load matrix */ *(here->MOS3GgPtr ) += (xgd+xgs+xgb)*s->real; *(here->MOS3GgPtr +1) += (xgd+xgs+xgb)*s->imag; *(here->MOS3BbPtr ) += (xgb+xbd+xbs)*s->real; *(here->MOS3BbPtr +1) += (xgb+xbd+xbs)*s->imag; *(here->MOS3DPdpPtr ) += (xgd+xbd)*s->real; *(here->MOS3DPdpPtr +1) += (xgd+xbd)*s->imag; *(here->MOS3SPspPtr ) += (xgs+xbs)*s->real; *(here->MOS3SPspPtr +1) += (xgs+xbs)*s->imag; *(here->MOS3GbPtr ) -= xgb*s->real; *(here->MOS3GbPtr +1) -= xgb*s->imag; *(here->MOS3GdpPtr ) -= xgd*s->real; *(here->MOS3GdpPtr +1) -= xgd*s->imag; *(here->MOS3GspPtr ) -= xgs*s->real; *(here->MOS3GspPtr +1) -= xgs*s->imag; *(here->MOS3BgPtr ) -= xgb*s->real; *(here->MOS3BgPtr +1) -= xgb*s->imag; *(here->MOS3BdpPtr ) -= xbd*s->real; *(here->MOS3BdpPtr +1) -= xbd*s->imag; *(here->MOS3BspPtr ) -= xbs*s->real; *(here->MOS3BspPtr +1) -= xbs*s->imag; *(here->MOS3DPgPtr ) -= xgd*s->real; *(here->MOS3DPgPtr +1) -= xgd*s->imag; *(here->MOS3DPbPtr ) -= xbd*s->real; *(here->MOS3DPbPtr +1) -= xbd*s->imag; *(here->MOS3SPgPtr ) -= xgs*s->real; *(here->MOS3SPgPtr +1) -= xgs*s->imag; *(here->MOS3SPbPtr ) -= xbs*s->real; *(here->MOS3SPbPtr +1) -= xbs*s->imag; *(here->MOS3DdPtr) += here->MOS3drainConductance; *(here->MOS3SsPtr) += here->MOS3sourceConductance; *(here->MOS3BbPtr) += here->MOS3gbd+here->MOS3gbs; *(here->MOS3DPdpPtr) += here->MOS3drainConductance+ here->MOS3gds+here->MOS3gbd+ xrev*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3SPspPtr) += here->MOS3sourceConductance+ here->MOS3gds+here->MOS3gbs+ xnrm*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3DdpPtr) -= here->MOS3drainConductance; *(here->MOS3SspPtr) -= here->MOS3sourceConductance; *(here->MOS3BdpPtr) -= here->MOS3gbd; *(here->MOS3BspPtr) -= here->MOS3gbs; *(here->MOS3DPdPtr) -= here->MOS3drainConductance; *(here->MOS3DPgPtr) += (xnrm-xrev)*here->MOS3gm; *(here->MOS3DPbPtr) += -here->MOS3gbd+(xnrm-xrev)*here->MOS3gmbs; *(here->MOS3DPspPtr) -= here->MOS3gds+ xnrm*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3SPgPtr) -= (xnrm-xrev)*here->MOS3gm; *(here->MOS3SPsPtr) -= here->MOS3sourceConductance; *(here->MOS3SPbPtr) -= here->MOS3gbs+(xnrm-xrev)*here->MOS3gmbs; *(here->MOS3SPdpPtr) -= here->MOS3gds+ xrev*(here->MOS3gm+here->MOS3gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3set.c0000644000265600020320000002270112264261473020660 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarlesù Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) int MOS3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the MOS3 device structure with those pointers needed later * for fast matrix loading */ { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; int error; CKTnode *tmp; /* loop through all the MOS3 device models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* perform model defaulting */ if(!model->MOS3typeGiven) { model->MOS3type = NMOS; } if(!model->MOS3latDiffGiven) { model->MOS3latDiff = 0; } if(!model->MOS3lengthAdjustGiven) { model->MOS3lengthAdjust = 0; } if(!model->MOS3widthNarrowGiven) { model->MOS3widthNarrow = 0; } if(!model->MOS3widthAdjustGiven) { model->MOS3widthAdjust = 0; } if(!model->MOS3delvt0Given) { model->MOS3delvt0 = 0; } if(!model->MOS3jctSatCurDensityGiven) { model->MOS3jctSatCurDensity = 0; } if(!model->MOS3jctSatCurGiven) { model->MOS3jctSatCur = 1e-14; } if(!model->MOS3drainResistanceGiven) { model->MOS3drainResistance = 0; } if(!model->MOS3sourceResistanceGiven) { model->MOS3sourceResistance = 0; } if(!model->MOS3sheetResistanceGiven) { model->MOS3sheetResistance = 0; } if(!model->MOS3transconductanceGiven) { model->MOS3transconductance = 2e-5; } if(!model->MOS3gateSourceOverlapCapFactorGiven) { model->MOS3gateSourceOverlapCapFactor = 0; } if(!model->MOS3gateDrainOverlapCapFactorGiven) { model->MOS3gateDrainOverlapCapFactor = 0; } if(!model->MOS3gateBulkOverlapCapFactorGiven) { model->MOS3gateBulkOverlapCapFactor = 0; } if(!model->MOS3vt0Given) { model->MOS3vt0 = 0; } if(!model->MOS3capBDGiven) { model->MOS3capBD = 0; } if(!model->MOS3capBSGiven) { model->MOS3capBS = 0; } if(!model->MOS3bulkCapFactorGiven) { model->MOS3bulkCapFactor = 0; } if(!model->MOS3sideWallCapFactorGiven) { model->MOS3sideWallCapFactor = 0; } if(!model->MOS3bulkJctPotentialGiven) { model->MOS3bulkJctPotential = .8; } if(!model->MOS3bulkJctBotGradingCoeffGiven) { model->MOS3bulkJctBotGradingCoeff = .5; } if(!model->MOS3bulkJctSideGradingCoeffGiven) { model->MOS3bulkJctSideGradingCoeff = .33; } if(!model->MOS3fwdCapDepCoeffGiven) { model->MOS3fwdCapDepCoeff = .5; } if(!model->MOS3phiGiven) { model->MOS3phi = .6; } if(!model->MOS3gammaGiven) { model->MOS3gamma = 0; } if(!model->MOS3deltaGiven) { model->MOS3delta = 0; } if(!model->MOS3maxDriftVelGiven) { model->MOS3maxDriftVel = 0; } if(!model->MOS3junctionDepthGiven) { model->MOS3junctionDepth = 0; } if(!model->MOS3fastSurfaceStateDensityGiven) { model->MOS3fastSurfaceStateDensity = 0; } if(!model->MOS3etaGiven) { model->MOS3eta = 0; } if(!model->MOS3thetaGiven) { model->MOS3theta = 0; } if(!model->MOS3kappaGiven) { model->MOS3kappa = .2; } if(!model->MOS3oxideThicknessGiven) { model->MOS3oxideThickness = 1e-7; } if(!model->MOS3fNcoefGiven) { model->MOS3fNcoef = 0; } if(!model->MOS3fNexpGiven) { model->MOS3fNexp = 1; } /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { CKTnode *tmpNode; IFuid tmpName; /* allocate a chunk of the state vector */ here->MOS3states = *states; *states += MOS3NUMSTATES; if(!here->MOS3drainAreaGiven) { here->MOS3drainArea = ckt->CKTdefaultMosAD; } if(!here->MOS3drainPerimiterGiven) { here->MOS3drainPerimiter = 0; } if(!here->MOS3drainSquaresGiven) { here->MOS3drainSquares = 1; } if(!here->MOS3icVBSGiven) { here->MOS3icVBS = 0; } if(!here->MOS3icVDSGiven) { here->MOS3icVDS = 0; } if(!here->MOS3icVGSGiven) { here->MOS3icVGS = 0; } if(!here->MOS3sourcePerimiterGiven) { here->MOS3sourcePerimiter = 0; } if(!here->MOS3sourceSquaresGiven) { here->MOS3sourceSquares = 1; } if(!here->MOS3vdsatGiven) { here->MOS3vdsat = 0; } if(!here->MOS3vonGiven) { here->MOS3von = 0; } if(!here->MOS3modeGiven) { here->MOS3mode = 1; } if((model->MOS3drainResistance != 0 || (model->MOS3sheetResistance != 0 && here->MOS3drainSquares != 0 ) )) { if (here->MOS3dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS3name,"internal#drain"); if(error) return(error); here->MOS3dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS3dNodePrime = here->MOS3dNode; } if((model->MOS3sourceResistance != 0 || (model->MOS3sheetResistance != 0 && here->MOS3sourceSquares != 0 ) )) { if (here->MOS3sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS3name,"internal#source"); if(error) return(error); here->MOS3sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS3sNodePrime = here->MOS3sNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MOS3DdPtr, MOS3dNode, MOS3dNode); TSTALLOC(MOS3GgPtr, MOS3gNode, MOS3gNode); TSTALLOC(MOS3SsPtr, MOS3sNode, MOS3sNode); TSTALLOC(MOS3BbPtr, MOS3bNode, MOS3bNode); TSTALLOC(MOS3DPdpPtr, MOS3dNodePrime, MOS3dNodePrime); TSTALLOC(MOS3SPspPtr, MOS3sNodePrime, MOS3sNodePrime); TSTALLOC(MOS3DdpPtr, MOS3dNode, MOS3dNodePrime); TSTALLOC(MOS3GbPtr, MOS3gNode, MOS3bNode); TSTALLOC(MOS3GdpPtr, MOS3gNode, MOS3dNodePrime); TSTALLOC(MOS3GspPtr, MOS3gNode, MOS3sNodePrime); TSTALLOC(MOS3SspPtr, MOS3sNode, MOS3sNodePrime); TSTALLOC(MOS3BdpPtr, MOS3bNode, MOS3dNodePrime); TSTALLOC(MOS3BspPtr, MOS3bNode, MOS3sNodePrime); TSTALLOC(MOS3DPspPtr, MOS3dNodePrime, MOS3sNodePrime); TSTALLOC(MOS3DPdPtr, MOS3dNodePrime, MOS3dNode); TSTALLOC(MOS3BgPtr, MOS3bNode, MOS3gNode); TSTALLOC(MOS3DPgPtr, MOS3dNodePrime, MOS3gNode); TSTALLOC(MOS3SPgPtr, MOS3sNodePrime, MOS3gNode); TSTALLOC(MOS3SPsPtr, MOS3sNodePrime, MOS3sNode); TSTALLOC(MOS3DPbPtr, MOS3dNodePrime, MOS3bNode); TSTALLOC(MOS3SPbPtr, MOS3sNodePrime, MOS3bNode); TSTALLOC(MOS3SPdpPtr, MOS3sNodePrime, MOS3dNodePrime); } } return(OK); } int MOS3unsetup(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model; MOS3instance *here; for (model = (MOS3model *)inModel; model != NULL; model = model->MOS3nextModel) { for (here = model->MOS3instances; here != NULL; here=here->MOS3nextInstance) { if (here->MOS3dNodePrime && here->MOS3dNodePrime != here->MOS3dNode) { CKTdltNNum(ckt, here->MOS3dNodePrime); here->MOS3dNodePrime= 0; } if (here->MOS3sNodePrime && here->MOS3sNodePrime != here->MOS3sNode) { CKTdltNNum(ckt, here->MOS3sNodePrime); here->MOS3sNodePrime= 0; } } } return OK; } ngspice-26/src/spicelib/devices/mos3/mos3load.c0000644000265600020320000012012312264261473021001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos3defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* actually load the current value into the sparse matrix previously * provided */ int MOS3load(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; double Beta; double DrainSatCur; double EffectiveLength; double EffectiveWidth; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cbhat; double cdhat; double cdrain; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqgb; double ceqgd; double ceqgs; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gcgb; double gcgd; double gcgs; double geq; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb1; double vgb; double vgd1; double vgd; double vgdo; double vgs1; double vgs; double von; #ifndef PREDICTOR double xfact = 0.0; #endif int xnrm; int xrev; double capgs = 0.0; /* total gate-source capacitance */ double capgd = 0.0; /* total gate-drain capacitance */ double capgb = 0.0; /* total gate-bulk capacitance */ int Check; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; #ifdef CAPBYPASS int senflag; #endif /*CAPBYPASS*/ int SenCond; double vt; /* vt at instance temperature */ #ifdef CAPBYPASS senflag = 0; #endif /* CAPBYPASS */ if(ckt->CKTsenInfo){ if(ckt->CKTsenInfo->SENstatus == PERTURBATION) { if((ckt->CKTsenInfo->SENmode == ACSEN)|| (ckt->CKTsenInfo->SENmode == TRANSEN)){ #ifdef CAPBYPASS senflag = 1; #endif /* CAPBYPASS */ } goto next; } } /* loop through all the MOS3 device models */ next: for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { vt = CONSTKoverQ * here->MOS3temp; Check=1; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("MOS3load \n"); #endif /* SENSDEBUG */ if(ckt->CKTsenInfo->SENstatus == PERTURBATION) if(here->MOS3senPertFlag == OFF)continue; } SenCond = ckt->CKTsenInfo && here->MOS3senPertFlag; /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance * size */ EffectiveWidth=here->MOS3w-2*model->MOS3widthNarrow+ model->MOS3widthAdjust; EffectiveLength=here->MOS3l - 2*model->MOS3latDiff+ model->MOS3lengthAdjust; if( (here->MOS3tSatCurDens == 0) || (here->MOS3drainArea == 0) || (here->MOS3sourceArea == 0)) { DrainSatCur = here->MOS3m * here->MOS3tSatCur; SourceSatCur = here->MOS3m * here->MOS3tSatCur; } else { DrainSatCur = here->MOS3m * here->MOS3tSatCurDens * here->MOS3drainArea; SourceSatCur = here->MOS3m * here->MOS3tSatCurDens * here->MOS3sourceArea; } GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; Beta = here->MOS3tTransconductance * here->MOS3m * EffectiveWidth/EffectiveLength; OxideCap = model->MOS3oxideCapFactor * EffectiveLength * here->MOS3m * EffectiveWidth; if(SenCond){ #ifdef SENSDEBUG printf("MOS3senPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { vgs = *(ckt->CKTstate1 + here->MOS3vgs); vds = *(ckt->CKTstate1 + here->MOS3vds); vbs = *(ckt->CKTstate1 + here->MOS3vbs); vbd = *(ckt->CKTstate1 + here->MOS3vbd); vgb = vgs - vbs; vgd = vgs - vds; } else if (ckt->CKTsenInfo->SENmode == ACSEN){ vgb = model->MOS3type * ( *(ckt->CKTrhsOp+here->MOS3gNode) - *(ckt->CKTrhsOp+here->MOS3bNode)); vbs = *(ckt->CKTstate0 + here->MOS3vbs); vbd = *(ckt->CKTstate0 + here->MOS3vbd); vgd = vgb + vbd ; vgs = vgb + vbs ; vds = vbs - vbd ; } else{ vgs = *(ckt->CKTstate0 + here->MOS3vgs); vds = *(ckt->CKTstate0 + here->MOS3vds); vbs = *(ckt->CKTstate0 + here->MOS3vbs); vbd = *(ckt->CKTstate0 + here->MOS3vbd); vgb = vgs - vbs; vgd = vgs - vds; } #ifdef SENSDEBUG printf(" vbs = %.7e ,vbd = %.7e,vgb = %.7e\n",vbs,vbd,vgb); printf(" vgs = %.7e ,vds = %.7e,vgd = %.7e\n",vgs,vds,vgd); #endif /* SENSDEBUG */ goto next1; } /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last * iteration These are the two most common cases - either * a prediction step or the general iteration step and * they share some code, so we put them first - others * later on */ if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED | MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->MOS3off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MOS3vbs) = *(ckt->CKTstate1 + here->MOS3vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS3vbs)) -(xfact * (*(ckt->CKTstate2 + here->MOS3vbs))); *(ckt->CKTstate0 + here->MOS3vgs) = *(ckt->CKTstate1 + here->MOS3vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS3vgs)) -(xfact * (*(ckt->CKTstate2 + here->MOS3vgs))); *(ckt->CKTstate0 + here->MOS3vds) = *(ckt->CKTstate1 + here->MOS3vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->MOS3vds)) -(xfact * (*(ckt->CKTstate2 + here->MOS3vds))); *(ckt->CKTstate0 + here->MOS3vbd) = *(ckt->CKTstate0 + here->MOS3vbs)- *(ckt->CKTstate0 + here->MOS3vds); } else { #endif /*PREDICTOR*/ /* general iteration */ vbs = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3bNode) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); vgs = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3gNode) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); vds = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3dNodePrime) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); #ifndef PREDICTOR } #endif /*PREDICTOR*/ /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS3vgs) - *(ckt->CKTstate0 + here->MOS3vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS3vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS3vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS3vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS3mode >= 0) { cdhat= here->MOS3cd- here->MOS3gbd * delvbd + here->MOS3gmbs * delvbs + here->MOS3gm * delvgs + here->MOS3gds * delvds ; } else { cdhat= here->MOS3cd - ( here->MOS3gbd - here->MOS3gmbs) * delvbd - here->MOS3gm * delvgd + here->MOS3gds * delvds ; } cbhat= here->MOS3cbs + here->MOS3cbd + here->MOS3gbd * delvbd + here->MOS3gbs * delvbs ; #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* the following mess should be one if statement, but * many compilers can't handle it all at once, so it * is split into several successive if statements */ tempv = MAX(fabs(cbhat),fabs(here->MOS3cbs + here->MOS3cbd))+ckt->CKTabstol; if((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG) )) && (ckt->CKTbypass) ) if ( (fabs(cbhat-(here->MOS3cbs + here->MOS3cbd)) < ckt->CKTreltol * tempv)) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS3vbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS3vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->MOS3vgs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->MOS3vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- here->MOS3cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs( here->MOS3cd)) + ckt->CKTabstol) ) { /* bypass code */ /* nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration out * and keep going */ vbs = *(ckt->CKTstate0 + here->MOS3vbs); vbd = *(ckt->CKTstate0 + here->MOS3vbd); vgs = *(ckt->CKTstate0 + here->MOS3vgs); vds = *(ckt->CKTstate0 + here->MOS3vds); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->MOS3mode * (here->MOS3cd + here->MOS3cbd); if(ckt->CKTmode & (MODETRAN | MODETRANOP)) { capgs = ( *(ckt->CKTstate0+here->MOS3capgs)+ *(ckt->CKTstate1+here->MOS3capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS3capgd)+ *(ckt->CKTstate1+here->MOS3capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS3capgb)+ *(ckt->CKTstate1+here->MOS3capgb) + GateBulkOverlapCap ); } goto bypass; } #endif /*NOBYPASS*/ /* ok - bypass is out, do it the hard way */ von = model->MOS3type * here->MOS3von; #ifndef NODELIMITING /* * limiting * we want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->MOS3vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MOS3vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->MOS3vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->MOS3vds))); } vgs = vgd + vds; } if(vds >= 0) { vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->MOS3vbs), vt,here->MOS3sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->MOS3vbd), vt,here->MOS3drainVcrit,&Check); vbs = vbd + vds; } #endif /*NODELIMITING*/ } else { /* ok - not one of the simple cases, so we have to * look at all of the possibilities for why we were * called. We still just initialize the three voltages */ if((ckt->CKTmode & MODEINITJCT) && !here->MOS3off) { vds= model->MOS3type * here->MOS3icVDS; vgs= model->MOS3type * here->MOS3icVGS; vbs= model->MOS3type * here->MOS3icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = model->MOS3type * here->MOS3tVto; vds = 0; } } else { vbs=vgs=vds=0; } } /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) { arg=3*vt/(vbs*CONSTe); arg = arg * arg * arg; here->MOS3cbs = -SourceSatCur*(1+arg)+ckt->CKTgmin*vbs; here->MOS3gbs = SourceSatCur*3*arg/vbs+ckt->CKTgmin; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS3gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS3cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; } if(vbd <= -3*vt) { arg=3*vt/(vbd*CONSTe); arg = arg * arg * arg; here->MOS3cbd = -DrainSatCur*(1+arg)+ckt->CKTgmin*vbd; here->MOS3gbd = DrainSatCur*3*arg/vbd+ckt->CKTgmin; } else { evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS3gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS3cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS3mode = 1; } else { /* inverse mode */ here->MOS3mode = -1; } { /* * subroutine moseq3(vds,vbs,vgs,gm,gds,gmbs, * qg,qc,qb,cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* this routine evaluates the drain current, its * derivatives and the charges associated with the * gate, channel and bulk for mosfets based on * semi-empirical equations */ double coeff0 = 0.0631353e0; double coeff1 = 0.8013292e0; double coeff2 = -0.01110777e0; double oneoverxl; /* 1/effective length */ double eta; /* eta from model after length factor */ double phibs; /* phi - vbs */ double sqphbs; /* square root of phibs */ double dsqdvb; /* */ double sqphis; /* square root of phi */ double sqphs3; /* square root of phi cubed */ double wps; double oneoverxj; /* 1/junction depth */ double xjonxl; /* junction depth/effective length */ double djonxj; double wponxj; double arga; double argb; double argc; double dwpdvb; double dadvb; double dbdvb; double gammas; double fbodys; double fbody; double onfbdy; double qbonco; double vbix; double wconxj; double dfsdvb; double dfbdvb; double dqbdvb; double vth; double dvtdvb; double csonco; double cdonco; double dxndvb = 0.0; double dvodvb = 0.0; double dvodvd = 0.0; double vgsx; double dvtdvd; double onfg; double fgate; double us; double dfgdvg; double dfgdvd; double dfgdvb; double dvsdvg; double dvsdvb; double dvsdvd; double xn = 0.0; double vdsc; double onvdsc = 0.0; double dvsdga; double vdsx; double dcodvb; double cdnorm; double cdo; double cd1; double fdrain = 0.0; double fd2; double dfddvg = 0.0; double dfddvb = 0.0; double dfddvd = 0.0; double gdsat; double cdsat; double gdoncd; double gdonfd; double gdonfg; double dgdvg; double dgdvd; double dgdvb; double emax; double emongd; double demdvg; double demdvd; double demdvb; double delxl; double dldvd; double dldem; double ddldvg; double ddldvd; double ddldvb; double dlonxl; double xlfact; double diddl; double gds0 = 0.0; double emoncd; double ondvt; double onxn; double wfact; double gms; double gmw; double fshort; /* * bypasses the computation of charges */ /* * reference cdrain equations to source and * charge equations to bulk */ vdsat = 0.0; oneoverxl = 1.0/EffectiveLength; eta = model->MOS3eta * 8.15e-22/(model->MOS3oxideCapFactor* EffectiveLength*EffectiveLength*EffectiveLength); /* *.....square root term */ if ( (here->MOS3mode==1?vbs:vbd) <= 0.0 ) { phibs = here->MOS3tPhi-(here->MOS3mode==1?vbs:vbd); sqphbs = sqrt(phibs); dsqdvb = -0.5/sqphbs; } else { sqphis = sqrt(here->MOS3tPhi); sqphs3 = here->MOS3tPhi*sqphis; sqphbs = sqphis/(1.0+(here->MOS3mode==1?vbs:vbd)/ (here->MOS3tPhi+here->MOS3tPhi)); phibs = sqphbs*sqphbs; dsqdvb = -phibs/(sqphs3+sqphs3); } /* *.....short channel effect factor */ if ( (model->MOS3junctionDepth != 0.0) && (model->MOS3coeffDepLayWidth != 0.0) ) { wps = model->MOS3coeffDepLayWidth*sqphbs; oneoverxj = 1.0/model->MOS3junctionDepth; xjonxl = model->MOS3junctionDepth*oneoverxl; djonxj = model->MOS3latDiff*oneoverxj; wponxj = wps*oneoverxj; wconxj = coeff0+coeff1*wponxj+coeff2*wponxj*wponxj; arga = wconxj+djonxj; argc = wponxj/(1.0+wponxj); argb = sqrt(1.0-argc*argc); fshort = 1.0-xjonxl*(arga*argb-djonxj); dwpdvb = model->MOS3coeffDepLayWidth*dsqdvb; dadvb = (coeff1+coeff2*(wponxj+wponxj))*dwpdvb*oneoverxj; dbdvb = -argc*argc*(1.0-argc)*dwpdvb/(argb*wps); dfsdvb = -xjonxl*(dadvb*argb+arga*dbdvb); } else { fshort = 1.0; dfsdvb = 0.0; } /* *.....body effect */ gammas = model->MOS3gamma*fshort; fbodys = 0.5*gammas/(sqphbs+sqphbs); fbody = fbodys+model->MOS3narrowFactor/EffectiveWidth; onfbdy = 1.0/(1.0+fbody); dfbdvb = -fbodys*dsqdvb/sqphbs+fbodys*dfsdvb/fshort; qbonco =gammas*sqphbs+model->MOS3narrowFactor*phibs/EffectiveWidth; dqbdvb = gammas*dsqdvb+model->MOS3gamma*dfsdvb*sqphbs- model->MOS3narrowFactor/EffectiveWidth; /* *.....static feedback effect */ vbix = here->MOS3tVbi*model->MOS3type-eta*(here->MOS3mode*vds); /* *.....threshold voltage */ vth = vbix+qbonco; dvtdvd = -eta; dvtdvb = dqbdvb; /* *.....joint weak inversion and strong inversion */ von = vth; if ( model->MOS3fastSurfaceStateDensity != 0.0 ) { csonco = CHARGE*model->MOS3fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ *EffectiveLength*EffectiveWidth * here->MOS3m/OxideCap; cdonco = qbonco/(phibs+phibs); xn = 1.0+csonco+cdonco; von = vth+vt*xn; dxndvb = dqbdvb/(phibs+phibs)-qbonco*dsqdvb/(phibs*sqphbs); dvodvd = dvtdvd; dvodvb = dvtdvb+vt*dxndvb; } else { /* *.....cutoff region */ if ( (here->MOS3mode==1?vgs:vgd) <= von ) { cdrain = 0.0; here->MOS3gm = 0.0; here->MOS3gds = 0.0; here->MOS3gmbs = 0.0; goto innerline1000; } } /* *.....device is on */ vgsx = MAX((here->MOS3mode==1?vgs:vgd),von); /* *.....mobility modulation by gate voltage */ onfg = 1.0+model->MOS3theta*(vgsx-vth); fgate = 1.0/onfg; us = here->MOS3tSurfMob * 1e-4 /*(m**2/cm**2)*/ *fgate; dfgdvg = -model->MOS3theta*fgate*fgate; dfgdvd = -dfgdvg*dvtdvd; dfgdvb = -dfgdvg*dvtdvb; /* *.....saturation voltage */ vdsat = (vgsx-vth)*onfbdy; if ( model->MOS3maxDriftVel <= 0.0 ) { dvsdvg = onfbdy; dvsdvd = -dvsdvg*dvtdvd; dvsdvb = -dvsdvg*dvtdvb-vdsat*dfbdvb*onfbdy; } else { vdsc = EffectiveLength*model->MOS3maxDriftVel/us; onvdsc = 1.0/vdsc; arga = (vgsx-vth)*onfbdy; argb = sqrt(arga*arga+vdsc*vdsc); vdsat = arga+vdsc-argb; dvsdga = (1.0-arga/argb)*onfbdy; dvsdvg = dvsdga-(1.0-vdsc/argb)*vdsc*dfgdvg*onfg; dvsdvd = -dvsdvg*dvtdvd; dvsdvb = -dvsdvg*dvtdvb-arga*dvsdga*dfbdvb; } /* *.....current factors in linear region */ vdsx = MIN((here->MOS3mode*vds),vdsat); if ( vdsx == 0.0 ) goto line900; cdo = vgsx-vth-0.5*(1.0+fbody)*vdsx; dcodvb = -dvtdvb-0.5*dfbdvb*vdsx; /* *.....normalized drain current */ cdnorm = cdo*vdsx; here->MOS3gm = vdsx; if ((here->MOS3mode*vds) > vdsat) here->MOS3gds = -dvtdvd*vdsx; else here->MOS3gds = vgsx-vth-(1.0+fbody+dvtdvd)*vdsx; here->MOS3gmbs = dcodvb*vdsx; /* *.....drain current without velocity saturation effect */ cd1 = Beta*cdnorm; Beta = Beta*fgate; cdrain = Beta*cdnorm; here->MOS3gm = Beta*here->MOS3gm+dfgdvg*cd1; here->MOS3gds = Beta*here->MOS3gds+dfgdvd*cd1; here->MOS3gmbs = Beta*here->MOS3gmbs+dfgdvb*cd1; /* *.....velocity saturation factor */ if ( model->MOS3maxDriftVel > 0.0 ) { fdrain = 1.0/(1.0+vdsx*onvdsc); fd2 = fdrain*fdrain; arga = fd2*vdsx*onvdsc*onfg; dfddvg = -dfgdvg*arga; if ((here->MOS3mode*vds) > vdsat) dfddvd = -dfgdvd*arga; else dfddvd = -dfgdvd*arga-fd2*onvdsc; dfddvb = -dfgdvb*arga; /* *.....drain current */ here->MOS3gm = fdrain*here->MOS3gm+dfddvg*cdrain; here->MOS3gds = fdrain*here->MOS3gds+dfddvd*cdrain; here->MOS3gmbs = fdrain*here->MOS3gmbs+dfddvb*cdrain; cdrain = fdrain*cdrain; Beta = Beta*fdrain; } /* *.....channel length modulation */ if ( (here->MOS3mode*vds) <= vdsat ) { if ( (model->MOS3maxDriftVel > 0.0) || (model->MOS3alpha == 0.0) || (ckt->CKTbadMos3) ) goto line700; else { arga = (here->MOS3mode*vds)/vdsat; delxl = sqrt(model->MOS3kappa*model->MOS3alpha*vdsat/8); dldvd = 4*delxl*arga*arga*arga/vdsat; arga *= arga; arga *= arga; delxl *= arga; ddldvg = 0.0; ddldvd = -dldvd; ddldvb = 0.0; goto line520; } } if ( model->MOS3maxDriftVel <= 0.0 ) goto line510; if (model->MOS3alpha == 0.0) goto line700; cdsat = cdrain; gdsat = cdsat*(1.0-fdrain)*onvdsc; gdsat = MAX(1.0e-12,gdsat); gdoncd = gdsat/cdsat; gdonfd = gdsat/(1.0-fdrain); gdonfg = gdsat*onfg; dgdvg = gdoncd*here->MOS3gm-gdonfd*dfddvg+gdonfg*dfgdvg; dgdvd = gdoncd*here->MOS3gds-gdonfd*dfddvd+gdonfg*dfgdvd; dgdvb = gdoncd*here->MOS3gmbs-gdonfd*dfddvb+gdonfg*dfgdvb; if (ckt->CKTbadMos3) emax = cdsat*oneoverxl/gdsat; else emax = model->MOS3kappa * cdsat*oneoverxl/gdsat; emoncd = emax/cdsat; emongd = emax/gdsat; demdvg = emoncd*here->MOS3gm-emongd*dgdvg; demdvd = emoncd*here->MOS3gds-emongd*dgdvd; demdvb = emoncd*here->MOS3gmbs-emongd*dgdvb; arga = 0.5*emax*model->MOS3alpha; argc = model->MOS3kappa*model->MOS3alpha; argb = sqrt(arga*arga+argc*((here->MOS3mode*vds)-vdsat)); delxl = argb-arga; if (argb != 0.0) { dldvd = argc/(argb+argb); dldem = 0.5*(arga/argb-1.0)*model->MOS3alpha; } else { dldvd = 0.0; dldem = 0.0; } ddldvg = dldem*demdvg; ddldvd = dldem*demdvd-dldvd; ddldvb = dldem*demdvb; goto line520; line510: if (ckt->CKTbadMos3) { delxl = sqrt(model->MOS3kappa*((here->MOS3mode*vds)-vdsat)* model->MOS3alpha); dldvd = 0.5*delxl/((here->MOS3mode*vds)-vdsat); } else { delxl = sqrt(model->MOS3kappa*model->MOS3alpha* ((here->MOS3mode*vds)-vdsat+(vdsat/8))); dldvd = 0.5*delxl/((here->MOS3mode*vds)-vdsat+(vdsat/8)); } ddldvg = 0.0; ddldvd = -dldvd; ddldvb = 0.0; /* *.....punch through approximation */ line520: if ( delxl > (0.5*EffectiveLength) ) { delxl = EffectiveLength-(EffectiveLength*EffectiveLength/ (4.0*delxl)); arga = 4.0*(EffectiveLength-delxl)*(EffectiveLength-delxl)/ (EffectiveLength*EffectiveLength); ddldvg = ddldvg*arga; ddldvd = ddldvd*arga; ddldvb = ddldvb*arga; dldvd = dldvd*arga; } /* *.....saturation region */ dlonxl = delxl*oneoverxl; xlfact = 1.0/(1.0-dlonxl); cd1 = cdrain; cdrain = cdrain*xlfact; diddl = cdrain/(EffectiveLength-delxl); here->MOS3gm = here->MOS3gm*xlfact+diddl*ddldvg; here->MOS3gmbs = here->MOS3gmbs*xlfact+diddl*ddldvb; gds0 = diddl*ddldvd; here->MOS3gm = here->MOS3gm+gds0*dvsdvg; here->MOS3gmbs = here->MOS3gmbs+gds0*dvsdvb; here->MOS3gds = here->MOS3gds*xlfact+diddl*dldvd+gds0*dvsdvd; /* here->MOS3gds = (here->MOS3gds*xlfact)+gds0*dvsdvd- (cd1*ddldvd/(EffectiveLength*(1-2*dlonxl+dlonxl*dlonxl)));*/ /* *.....finish strong inversion case */ line700: if ( (here->MOS3mode==1?vgs:vgd) < von ) { /* *.....weak inversion */ onxn = 1.0/xn; ondvt = onxn/vt; wfact = exp( ((here->MOS3mode==1?vgs:vgd)-von)*ondvt ); cdrain = cdrain*wfact; gms = here->MOS3gm*wfact; gmw = cdrain*ondvt; here->MOS3gm = gmw; if ((here->MOS3mode*vds) > vdsat) { here->MOS3gm = here->MOS3gm+gds0*dvsdvg*wfact; } here->MOS3gds = here->MOS3gds*wfact+(gms-gmw)*dvodvd; here->MOS3gmbs = here->MOS3gmbs*wfact+(gms-gmw)*dvodvb-gmw* ((here->MOS3mode==1?vgs:vgd)-von)*onxn*dxndvb; } /* *.....charge computation */ goto innerline1000; /* *.....special case of vds = 0.0d0 */ line900: Beta = Beta*fgate; cdrain = 0.0; here->MOS3gm = 0.0; here->MOS3gds = Beta*(vgsx-vth); here->MOS3gmbs = 0.0; if ( (model->MOS3fastSurfaceStateDensity != 0.0) && ((here->MOS3mode==1?vgs:vgd) < von) ) { here->MOS3gds *=exp(((here->MOS3mode==1?vgs:vgd)-von)/(vt*xn)); } innerline1000:; /* *.....done */ } /* now deal with n vs p polarity */ here->MOS3von = model->MOS3type * von; here->MOS3vdsat = model->MOS3type * vdsat; /* line 490 */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->MOS3cd=here->MOS3mode * cdrain - here->MOS3cbd; if (ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG)) { /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS3vbs)))+ ckt->CKTvoltTol)|| senflag ) #endif /*CAPBYPASS*/ { /* can't bypass the diode capacitance calculations */ if(here->MOS3Cbs != 0 || here->MOS3Cbssw != 0 ) { if (vbs < here->MOS3tDepCap){ arg=1-vbs/here->MOS3tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS3bulkJctBotGradingCoeff == model->MOS3bulkJctSideGradingCoeff) { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } if(model->MOS3bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS3bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS3qbs) = here->MOS3tBulkPot*(here->MOS3Cbs* (1-arg*sarg)/(1-model->MOS3bulkJctBotGradingCoeff) +here->MOS3Cbssw* (1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff)); here->MOS3capbs=here->MOS3Cbs*sarg+ here->MOS3Cbssw*sargsw; } else { *(ckt->CKTstate0 + here->MOS3qbs) = here->MOS3f4s + vbs*(here->MOS3f2s+vbs*(here->MOS3f3s/2)); here->MOS3capbs=here->MOS3f2s+here->MOS3f3s*vbs; } } else { *(ckt->CKTstate0 + here->MOS3qbs) = 0; here->MOS3capbs=0; } } #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS3vbd)))+ ckt->CKTvoltTol)|| senflag ) #endif /*CAPBYPASS*/ /* can't bypass the diode capacitance calculations */ { if(here->MOS3Cbd != 0 || here->MOS3Cbdsw != 0 ) { if (vbd < here->MOS3tDepCap) { arg=1-vbd/here->MOS3tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS3bulkJctBotGradingCoeff == .5 && model->MOS3bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } if(model->MOS3bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS3bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS3qbd) = here->MOS3tBulkPot*(here->MOS3Cbd* (1-arg*sarg) /(1-model->MOS3bulkJctBotGradingCoeff) +here->MOS3Cbdsw* (1-arg*sargsw) /(1-model->MOS3bulkJctSideGradingCoeff)); here->MOS3capbd=here->MOS3Cbd*sarg+ here->MOS3Cbdsw*sargsw; } else { *(ckt->CKTstate0 + here->MOS3qbd) = here->MOS3f4d + vbd * (here->MOS3f2d + vbd * here->MOS3f3d/2); here->MOS3capbd=here->MOS3f2d + vbd * here->MOS3f3d; } } else { *(ckt->CKTstate0 + here->MOS3qbd) = 0; here->MOS3capbd = 0; } } if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2; if ( ckt->CKTmode & MODETRAN ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ceq,here->MOS3capbd, here->MOS3qbd); if(error) return(error); here->MOS3gbd += geq; here->MOS3cbd += *(ckt->CKTstate0 + here->MOS3cqbd); here->MOS3cd -= *(ckt->CKTstate0 + here->MOS3cqbd); error = NIintegrate(ckt,&geq,&ceq,here->MOS3capbs, here->MOS3qbs); if(error) return(error); here->MOS3gbs += geq; here->MOS3cbs += *(ckt->CKTstate0 + here->MOS3cqbs); } } if(SenCond) goto next2; /* * check convergence */ if ( (here->MOS3off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* save things away for next time */ next2: *(ckt->CKTstate0 + here->MOS3vbs) = vbs; *(ckt->CKTstate0 + here->MOS3vbd) = vbd; *(ckt->CKTstate0 + here->MOS3vgs) = vgs; *(ckt->CKTstate0 + here->MOS3vds) = vds; /* * meyer's capacitor model */ if ( ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG) ) { /* * calculate meyer's capacitors */ /* * new cmeyer - this just evaluates at the current time, * expects you to remember values from previous time * returns 1/2 of non-constant portion of capacitance * you must add in the other half from previous time * and the constant part */ if (here->MOS3mode > 0){ DEVqmeyer (vgs,vgd,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS3capgs), (ckt->CKTstate0 + here->MOS3capgd), (ckt->CKTstate0 + here->MOS3capgb), here->MOS3tPhi,OxideCap); } else { DEVqmeyer (vgd,vgs,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS3capgd), (ckt->CKTstate0 + here->MOS3capgs), (ckt->CKTstate0 + here->MOS3capgb), here->MOS3tPhi,OxideCap); } vgs1 = *(ckt->CKTstate1 + here->MOS3vgs); vgd1 = vgs1 - *(ckt->CKTstate1 + here->MOS3vds); vgb1 = vgs1 - *(ckt->CKTstate1 + here->MOS3vbs); if(ckt->CKTmode & MODETRANOP) { capgs = 2 * *(ckt->CKTstate0+here->MOS3capgs)+ GateSourceOverlapCap ; capgd = 2 * *(ckt->CKTstate0+here->MOS3capgd)+ GateDrainOverlapCap ; capgb = 2 * *(ckt->CKTstate0+here->MOS3capgb)+ GateBulkOverlapCap ; } else { capgs = ( *(ckt->CKTstate0+here->MOS3capgs)+ *(ckt->CKTstate1+here->MOS3capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS3capgd)+ *(ckt->CKTstate1+here->MOS3capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS3capgb)+ *(ckt->CKTstate1+here->MOS3capgb) + GateBulkOverlapCap ); } if(ckt->CKTsenInfo){ here->MOS3cgs = capgs; here->MOS3cgd = capgd; here->MOS3cgb = capgb; } /* * store small-signal parameters (for meyer's model) * all parameters already stored, so done... */ if(SenCond){ if(ckt->CKTsenInfo->SENmode & (DCSEN|ACSEN)) { continue; } } #ifndef PREDICTOR if (ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { *(ckt->CKTstate0 + here->MOS3qgs) = (1+xfact) * *(ckt->CKTstate1 + here->MOS3qgs) - xfact * *(ckt->CKTstate2 + here->MOS3qgs); *(ckt->CKTstate0 + here->MOS3qgd) = (1+xfact) * *(ckt->CKTstate1 + here->MOS3qgd) - xfact * *(ckt->CKTstate2 + here->MOS3qgd); *(ckt->CKTstate0 + here->MOS3qgb) = (1+xfact) * *(ckt->CKTstate1 + here->MOS3qgb) - xfact * *(ckt->CKTstate2 + here->MOS3qgb); } else { #endif /*PREDICTOR*/ if(ckt->CKTmode & MODETRAN) { *(ckt->CKTstate0 + here->MOS3qgs) = (vgs-vgs1)*capgs + *(ckt->CKTstate1 + here->MOS3qgs) ; *(ckt->CKTstate0 + here->MOS3qgd) = (vgd-vgd1)*capgd + *(ckt->CKTstate1 + here->MOS3qgd) ; *(ckt->CKTstate0 + here->MOS3qgb) = (vgb-vgb1)*capgb + *(ckt->CKTstate1 + here->MOS3qgb) ; } else { /* TRANOP only */ *(ckt->CKTstate0 + here->MOS3qgs) = vgs*capgs; *(ckt->CKTstate0 + here->MOS3qgd) = vgd*capgd; *(ckt->CKTstate0 + here->MOS3qgb) = vgb*capgb; } #ifndef PREDICTOR } #endif /*PREDICTOR*/ } #ifndef NOBYPASS bypass: #endif if(SenCond) continue; if ( (ckt->CKTmode & (MODEINITTRAN)) || (! (ckt->CKTmode & (MODETRAN)) ) ) { /* * initialize to zero charge conductances * and current */ gcgs=0; ceqgs=0; gcgd=0; ceqgd=0; gcgb=0; ceqgb=0; } else { if(capgs == 0) *(ckt->CKTstate0 + here->MOS3cqgs) =0; if(capgd == 0) *(ckt->CKTstate0 + here->MOS3cqgd) =0; if(capgb == 0) *(ckt->CKTstate0 + here->MOS3cqgb) =0; /* * calculate equivalent conductances and currents for * meyer"s capacitors */ error = NIintegrate(ckt,&gcgs,&ceqgs,capgs,here->MOS3qgs); if(error) return(error); error = NIintegrate(ckt,&gcgd,&ceqgd,capgd,here->MOS3qgd); if(error) return(error); error = NIintegrate(ckt,&gcgb,&ceqgb,capgb,here->MOS3qgb); if(error) return(error); ceqgs=ceqgs-gcgs*vgs+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS3qgs); ceqgd=ceqgd-gcgd*vgd+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS3qgd); ceqgb=ceqgb-gcgb*vgb+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS3qgb); } /* * store charge storage info for meyer's cap in lx table */ /* * load current vector */ ceqbs = model->MOS3type * (here->MOS3cbs-(here->MOS3gbs)*vbs); ceqbd = model->MOS3type * (here->MOS3cbd-(here->MOS3gbd)*vbd); if (here->MOS3mode >= 0) { xnrm=1; xrev=0; cdreq=model->MOS3type*(cdrain-here->MOS3gds*vds- here->MOS3gm*vgs-here->MOS3gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->MOS3type)*(cdrain-here->MOS3gds*(-vds)- here->MOS3gm*vgd-here->MOS3gmbs*vbd); } *(ckt->CKTrhs + here->MOS3gNode) -= (model->MOS3type * (ceqgs + ceqgb + ceqgd)); *(ckt->CKTrhs + here->MOS3bNode) -= (ceqbs + ceqbd - model->MOS3type * ceqgb); *(ckt->CKTrhs + here->MOS3dNodePrime) += (ceqbd - cdreq + model->MOS3type * ceqgd); *(ckt->CKTrhs + here->MOS3sNodePrime) += cdreq + ceqbs + model->MOS3type * ceqgs; /* * load y matrix */ #if 0 printf(" loading %s at time %g\n",here->MOS3name,ckt->CKTtime); printf("%g %g %g %g %g\n", here->MOS3drainConductance,gcgd+gcgs+gcgb, here->MOS3sourceConductance,here->MOS3gbd,here->MOS3gbs); printf("%g %g %g %g %g\n",-gcgb,0.0,0.0,here->MOS3gds,here->MOS3gm); printf("%g %g %g %g %g\n", here->MOS3gds,here->MOS3gmbs,gcgd,-gcgs,-gcgd); printf("%g %g %g %g %g\n", -gcgs,-gcgd,0.0,-gcgs,0.0); #endif *(here->MOS3DdPtr) += (here->MOS3drainConductance); *(here->MOS3GgPtr) += ((gcgd+gcgs+gcgb)); *(here->MOS3SsPtr) += (here->MOS3sourceConductance); *(here->MOS3BbPtr) += (here->MOS3gbd+here->MOS3gbs+gcgb); *(here->MOS3DPdpPtr) += (here->MOS3drainConductance+here->MOS3gds+ here->MOS3gbd+xrev*(here->MOS3gm+here->MOS3gmbs)+gcgd); *(here->MOS3SPspPtr) += (here->MOS3sourceConductance+here->MOS3gds+ here->MOS3gbs+xnrm*(here->MOS3gm+here->MOS3gmbs)+gcgs); *(here->MOS3DdpPtr) += (-here->MOS3drainConductance); *(here->MOS3GbPtr) -= gcgb; *(here->MOS3GdpPtr) -= gcgd; *(here->MOS3GspPtr) -= gcgs; *(here->MOS3SspPtr) += (-here->MOS3sourceConductance); *(here->MOS3BgPtr) -= gcgb; *(here->MOS3BdpPtr) -= here->MOS3gbd; *(here->MOS3BspPtr) -= here->MOS3gbs; *(here->MOS3DPdPtr) += (-here->MOS3drainConductance); *(here->MOS3DPgPtr) += ((xnrm-xrev)*here->MOS3gm-gcgd); *(here->MOS3DPbPtr) += (-here->MOS3gbd+(xnrm-xrev)*here->MOS3gmbs); *(here->MOS3DPspPtr) += (-here->MOS3gds- xnrm*(here->MOS3gm+here->MOS3gmbs)); *(here->MOS3SPgPtr) += (-(xnrm-xrev)*here->MOS3gm-gcgs); *(here->MOS3SPsPtr) += (-here->MOS3sourceConductance); *(here->MOS3SPbPtr) += (-here->MOS3gbs-(xnrm-xrev)*here->MOS3gmbs); *(here->MOS3SPdpPtr) += (-here->MOS3gds- xrev*(here->MOS3gm+here->MOS3gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3supd.c0000644000265600020320000001552512264261473021046 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3sUpdate(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; int iparmno; double sb; double sg; double sdprm; double ssprm; double sxpgs; double sxpgd; double sxpbs; double sxpbd; double sxpgb; double dummy1; double dummy2; SENstruct *info; if(ckt->CKTtime == 0) return(OK); info = ckt->CKTsenInfo; #ifdef SENSDEBUG printf("MOS3senupdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ sxpgs = 0; sxpgd = 0; sxpbs = 0; sxpbd = 0; sxpgb = 0; dummy1 = 0; dummy2 = 0; /* loop through all the MOS3 models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { #ifdef SENSDEBUG printf("senupdate instance name %s\n",here->MOS3name); printf("before loading\n"); printf("CKTag[0] = %.2e,CKTag[1] = %.2e\n", ckt->CKTag[0],ckt->CKTag[1]); printf("capgs = %.7e\n",here->MOS3cgs); printf("capgd = %.7e\n",here->MOS3cgd); printf("capgb = %.7e\n",here->MOS3cgb); printf("capbs = %.7e\n",here->MOS3capbs); printf("capbd = %.7e\n",here->MOS3capbd); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sb = *(info->SEN_Sap[here->MOS3bNode] + iparmno); sg = *(info->SEN_Sap[here->MOS3gNode] + iparmno); ssprm = *(info->SEN_Sap[here->MOS3sNodePrime] + iparmno); sdprm = *(info->SEN_Sap[here->MOS3dNodePrime] + iparmno); #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sb = %.7e,sg = %.7e\n",sb,sg); printf("ssprm = %.7e,sdprm = %.7e\n",ssprm,sdprm); #endif /* SENSDEBUG */ sxpgs = (sg - ssprm) * here->MOS3cgs ; sxpgd = (sg - sdprm) * here->MOS3cgd ; sxpgb = (sg - sb) * here->MOS3cgb ; sxpbs = (sb - ssprm) * here->MOS3capbs ; sxpbd = (sb - sdprm) * here->MOS3capbd ; if(here->MOS3sens_l && (iparmno == here->MOS3senParmNo)){ sxpgs += *(here->MOS3dphigs_dl); sxpgd += *(here->MOS3dphigd_dl); sxpbs += *(here->MOS3dphibs_dl); sxpbd += *(here->MOS3dphibd_dl); sxpgb += *(here->MOS3dphigb_dl); } if(here->MOS3sens_w && (iparmno == (here->MOS3senParmNo+here->MOS3sens_l))){ sxpgs += *(here->MOS3dphigs_dw); sxpgd += *(here->MOS3dphigd_dw); sxpbs += *(here->MOS3dphibs_dw); sxpbd += *(here->MOS3dphibd_dw); sxpgb += *(here->MOS3dphigb_dw); } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MOS3sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate1 + here->MOS3sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate1 + here->MOS3sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate1 + here->MOS3sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate1 + here->MOS3sensxpgb + 10 * (iparmno - 1)) = sxpgb; *(ckt->CKTstate1 + here->MOS3sensxpgs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS3sensxpgd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS3sensxpbs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS3sensxpbd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS3sensxpgb + 10 * (iparmno - 1) + 1) = 0; goto next; } *(ckt->CKTstate0 + here->MOS3sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate0 + here->MOS3sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate0 + here->MOS3sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate0 + here->MOS3sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate0 + here->MOS3sensxpgb + 10 * (iparmno - 1)) = sxpgb; NIintegrate(ckt,&dummy1,&dummy2,here->MOS3cgs, here->MOS3sensxpgs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS3cgd, here->MOS3sensxpgd + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS3cgb, here->MOS3sensxpgb + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS3capbs, here->MOS3sensxpbs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS3capbd, here->MOS3sensxpbd + 10*(iparmno -1)); next: ; #ifdef SENSDEBUG printf("after loading\n"); printf("sxpgs = %.7e,sdotxpgs = %.7e\n", sxpgs,*(ckt->CKTstate0 + here->MOS3sensxpgs + 10 * (iparmno - 1) + 1)); printf("sxpgd = %.7e,sdotxpgd = %.7e\n", sxpgd,*(ckt->CKTstate0 + here->MOS3sensxpgd + 10 * (iparmno - 1) + 1)); printf("sxpgb = %.7e,sdotxpgb = %.7e\n", sxpgb,*(ckt->CKTstate0 + here->MOS3sensxpgb + 10 * (iparmno - 1) + 1)); printf("sxpbs = %.7e,sdotxpbs = %.7e\n", sxpbs,*(ckt->CKTstate0 + here->MOS3sensxpbs + 10 * (iparmno - 1) + 1)); printf("sxpbd = %.7e,sdotxpbd = %.7e\n", sxpbd,*(ckt->CKTstate0 + here->MOS3sensxpbd + 10 * (iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } #ifdef SENSDEBUG printf("MOS3senupdate end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3itf.h0000644000265600020320000000026012264261473020650 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MOS3 #define DEV_MOS3 SPICEdev *get_mos3_info(void); #endif ngspice-26/src/spicelib/devices/mos3/mos3sset.c0000644000265600020320000000260612264261473021045 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3sSetup(SENstruct *info, GENmodel *inModel) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; /* loop through all the models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { if(here->MOS3senParmNo){ if((here->MOS3sens_l)&&(here->MOS3sens_w)){ here->MOS3senParmNo = ++(info->SENparms); ++(info->SENparms);/* MOS has two design parameters */ } else{ here->MOS3senParmNo = ++(info->SENparms); } } here->MOS3senPertFlag = OFF; if((here->MOS3sens = TMALLOC(double, 72)) == NULL) { return(E_NOMEM); } } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3ask.c0000644000265600020320000004100112264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS3ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MOS3instance *here = (MOS3instance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case MOS3_TEMP: value->rValue = here->MOS3temp-CONSTCtoK; return(OK); case MOS3_DTEMP: value->rValue = here->MOS3dtemp; return(OK); case MOS3_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgs); return(OK); case MOS3_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgd); return(OK); case MOS3_M: value->rValue = here->MOS3m; return(OK); case MOS3_L: value->rValue = here->MOS3l; return(OK); case MOS3_W: value->rValue = here->MOS3w; return(OK); case MOS3_AS: value->rValue = here->MOS3sourceArea; return(OK); case MOS3_AD: value->rValue = here->MOS3drainArea; return(OK); case MOS3_PS: value->rValue = here->MOS3sourcePerimiter; return(OK); case MOS3_PD: value->rValue = here->MOS3drainPerimiter; return(OK); case MOS3_NRS: value->rValue = here->MOS3sourceSquares; return(OK); case MOS3_NRD: value->rValue = here->MOS3drainSquares; return(OK); case MOS3_OFF: value->rValue = here->MOS3off; return(OK); case MOS3_IC_VBS: value->rValue = here->MOS3icVBS; return(OK); case MOS3_IC_VDS: value->rValue = here->MOS3icVDS; return(OK); case MOS3_IC_VGS: value->rValue = here->MOS3icVGS; return(OK); case MOS3_DNODE: value->iValue = here->MOS3dNode; return(OK); case MOS3_GNODE: value->iValue = here->MOS3gNode; return(OK); case MOS3_SNODE: value->iValue = here->MOS3sNode; return(OK); case MOS3_BNODE: value->iValue = here->MOS3bNode; return(OK); case MOS3_DNODEPRIME: value->iValue = here->MOS3dNodePrime; return(OK); case MOS3_SNODEPRIME: value->iValue = here->MOS3sNodePrime; return(OK); case MOS3_SOURCECONDUCT: value->rValue = here->MOS3sourceConductance; return(OK); case MOS3_DRAINCONDUCT: value->rValue = here->MOS3drainConductance; return(OK); case MOS3_SOURCERESIST: if (here->MOS3sNodePrime != here->MOS3sNode) value->rValue = 1.0 / here->MOS3sourceConductance; else value->rValue = 0.0; return(OK); case MOS3_DRAINRESIST: if (here->MOS3dNodePrime != here->MOS3dNode) value->rValue = 1.0 / here->MOS3drainConductance; else value->rValue = 0.0; return(OK); case MOS3_VON: value->rValue = here->MOS3von; return(OK); case MOS3_VDSAT: value->rValue = here->MOS3vdsat; return(OK); case MOS3_SOURCEVCRIT: value->rValue = here->MOS3sourceVcrit; return(OK); case MOS3_DRAINVCRIT: value->rValue = here->MOS3drainVcrit; return(OK); case MOS3_CD: value->rValue = here->MOS3cd; return(OK); case MOS3_CBS: value->rValue = here->MOS3cbs; return(OK); case MOS3_CBD: value->rValue = here->MOS3cbd; return(OK); case MOS3_GMBS: value->rValue = here->MOS3gmbs; return(OK); case MOS3_GM: value->rValue = here->MOS3gm; return(OK); case MOS3_GDS: value->rValue = here->MOS3gds; return(OK); case MOS3_GBD: value->rValue = here->MOS3gbd; return(OK); case MOS3_GBS: value->rValue = here->MOS3gbs; return(OK); case MOS3_CAPBD: value->rValue = here->MOS3capbd; return(OK); case MOS3_CAPBS: value->rValue = here->MOS3capbs; return(OK); case MOS3_CAPZEROBIASBD: value->rValue = here->MOS3Cbd; return(OK); case MOS3_CAPZEROBIASBDSW: value->rValue = here->MOS3Cbdsw; return(OK); case MOS3_CAPZEROBIASBS: value->rValue = here->MOS3Cbs; return(OK); case MOS3_CAPZEROBIASBSSW: value->rValue = here->MOS3Cbssw; return(OK); case MOS3_VBD: value->rValue = *(ckt->CKTstate0 + here->MOS3vbd); return(OK); case MOS3_VBS: value->rValue = *(ckt->CKTstate0 + here->MOS3vbs); return(OK); case MOS3_VGS: value->rValue = *(ckt->CKTstate0 + here->MOS3vgs); return(OK); case MOS3_VDS: value->rValue = *(ckt->CKTstate0 + here->MOS3vds); return(OK); case MOS3_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgs); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateSourceOverlapCapFactor) * here->MOS3m * (here->MOS3w +here->MOS3modPtr->MOS3widthAdjust -2*(here->MOS3modPtr->MOS3widthNarrow)); return(OK); case MOS3_QGS: value->rValue = *(ckt->CKTstate0 + here->MOS3qgs); return(OK); case MOS3_CQGS: value->rValue = *(ckt->CKTstate0 + here->MOS3cqgs); return(OK); case MOS3_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgd); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateDrainOverlapCapFactor) * here->MOS3m * (here->MOS3w +here->MOS3modPtr->MOS3widthAdjust -2*(here->MOS3modPtr->MOS3widthNarrow)); return(OK); case MOS3_QGD: value->rValue = *(ckt->CKTstate0 + here->MOS3qgd); return(OK); case MOS3_CQGD: value->rValue = *(ckt->CKTstate0 + here->MOS3cqgd); return(OK); case MOS3_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgb); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateBulkOverlapCapFactor) * here->MOS3m * (here->MOS3l +here->MOS3modPtr->MOS3lengthAdjust -2*(here->MOS3modPtr->MOS3latDiff)); return(OK); case MOS3_QGB: value->rValue = *(ckt->CKTstate0 + here->MOS3qgb); return(OK); case MOS3_CQGB: value->rValue = *(ckt->CKTstate0 + here->MOS3cqgb); return(OK); case MOS3_QBD: value->rValue = *(ckt->CKTstate0 + here->MOS3qbd); return(OK); case MOS3_CQBD: value->rValue = *(ckt->CKTstate0 + here->MOS3cqbd); return(OK); case MOS3_QBS: value->rValue = *(ckt->CKTstate0 + here->MOS3qbs); return(OK); case MOS3_CQBS: value->rValue = *(ckt->CKTstate0 + here->MOS3cqbs); return(OK); case MOS3_L_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS3senParmNo); } return(OK); case MOS3_L_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo); } return(OK); case MOS3_L_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo); } return(OK); case MOS3_L_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS3_L_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS3_L_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo); } return(OK); case MOS3_W_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); } return(OK); case MOS3_W_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); } return(OK); case MOS3_W_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); } return(OK); case MOS3_W_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS3_W_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS3_W_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS3senParmNo + here->MOS3sens_l); } return(OK); case MOS3_CB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->MOS3cbd + here->MOS3cbs - *(ckt->CKTstate0 + here->MOS3cqgb); } return(OK); case MOS3_CG : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->MOS3cqgb) + *(ckt->CKTstate0 + here->MOS3cqgd) + *(ckt->CKTstate0 + here->MOS3cqgs); } return(OK); case MOS3_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->MOS3cd; value->rValue -= here->MOS3cbd + here->MOS3cbs - *(ckt->CKTstate0 + here->MOS3cqgb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->MOS3cqgb) + *(ckt->CKTstate0 + here->MOS3cqgd) + *(ckt->CKTstate0 + here->MOS3cqgs); } } return(OK); case MOS3_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS3ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->MOS3cd * *(ckt->CKTrhsOld + here->MOS3dNode); value->rValue += (here->MOS3cbd + here->MOS3cbs - *(ckt->CKTstate0 + here->MOS3cqgb)) * *(ckt->CKTrhsOld + here->MOS3bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->MOS3cqgb) + *(ckt->CKTstate0 + here->MOS3cqgd) + *(ckt->CKTstate0 + here->MOS3cqgs)) * *(ckt->CKTrhsOld + here->MOS3gNode); } temp = -here->MOS3cd; temp -= here->MOS3cbd + here->MOS3cbs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->MOS3cqgb) + *(ckt->CKTstate0 + here->MOS3cqgd) + *(ckt->CKTstate0 + here->MOS3cqgs); } value->rValue += temp * *(ckt->CKTrhsOld + here->MOS3sNode); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos3/mos3sprt.c0000644000265600020320000000401212264261473021050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all the MOS3 * devices in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void MOS3sPrint(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; printf("LEVEL 3 MOSFETS-----------------\n"); /* loop through all the MOS3 models */ for( ; model != NULL; model = model->MOS3nextModel ) { printf("Model name:%s\n",model->MOS3modName); /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { printf(" Instance name:%s\n",here->MOS3name); printf(" Drain, Gate , Source nodes: %s, %s ,%s\n", CKTnodName(ckt,here->MOS3dNode),CKTnodName(ckt,here->MOS3gNode), CKTnodName(ckt,here->MOS3sNode)); printf(" Multiplier: %g ",here->MOS3m); printf(here->MOS3mGiven ? "(specified)\n" : "(default)\n"); printf(" Length: %g ",here->MOS3l); printf(here->MOS3lGiven ? "(specified)\n" : "(default)\n"); printf(" Width: %g ",here->MOS3w); printf(here->MOS3wGiven ? "(specified)\n" : "(default)\n"); if(here->MOS3sens_l == 1){ printf(" MOS3senParmNo:l = %d ",here->MOS3senParmNo); } else{ printf(" MOS3senParmNo:l = 0 "); } if(here->MOS3sens_w == 1){ printf(" w = %d \n",here->MOS3senParmNo + here->MOS3sens_l); } else{ printf(" w = 0 \n"); } } } } ngspice-26/src/spicelib/devices/mos3/mos3defs.h0000644000265600020320000005121112264261473021011 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlanFixes **********/ #ifndef MOS3 #define MOS3 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for level 3 MOSFETs */ /* information needed for each instance */ typedef struct sMOS3instance { struct sMOS3model *MOS3modPtr; /* backpointer to model */ struct sMOS3instance *MOS3nextInstance; /* pointer to next instance of *current model*/ IFuid MOS3name; /* pointer to character string naming this instance */ int MOS3states; /* index into state table for this device */ int MOS3dNode; /* number of the gate node of the mosfet */ int MOS3gNode; /* number of the gate node of the mosfet */ int MOS3sNode; /* number of the source node of the mosfet */ int MOS3bNode; /* number of the bulk node of the mosfet */ int MOS3dNodePrime; /* number of the internal drain node of the mosfet */ int MOS3sNodePrime; /* number of the internal source node of the mosfet */ double MOS3m; /* parallel device multiplier */ double MOS3l; /* the length of the channel region */ double MOS3w; /* the width of the channel region */ double MOS3drainArea; /* the area of the drain diffusion */ double MOS3sourceArea; /* the area of the source diffusion */ double MOS3drainSquares; /* the length of the drain in squares */ double MOS3sourceSquares; /* the length of the source in squares */ double MOS3drainPerimiter; double MOS3sourcePerimiter; double MOS3sourceConductance; /*conductance of source(or 0):set in setup*/ double MOS3drainConductance; /*conductance of drain(or 0):set in setup*/ double MOS3temp; /* operating temperature of this instance */ double MOS3dtemp; /* temperature difference for this instance */ double MOS3tTransconductance; /* temperature corrected transconductance*/ double MOS3tSurfMob; /* temperature corrected surface mobility */ double MOS3tPhi; /* temperature corrected Phi */ double MOS3tVto; /* temperature corrected Vto */ double MOS3tSatCur; /* temperature corrected saturation Cur. */ double MOS3tSatCurDens; /* temperature corrected saturation Cur. density*/ double MOS3tCbd; /* temperature corrected B-D Capacitance */ double MOS3tCbs; /* temperature corrected B-S Capacitance */ double MOS3tCj; /* temperature corrected Bulk bottom Capacitance */ double MOS3tCjsw; /* temperature corrected Bulk side Capacitance */ double MOS3tBulkPot; /* temperature corrected Bulk potential */ double MOS3tDepCap; /* temperature adjusted transition point in */ /* the cureve matching Fc * Vj */ double MOS3tVbi; /* temperature adjusted Vbi */ double MOS3icVBS; /* initial condition B-S voltage */ double MOS3icVDS; /* initial condition D-S voltage */ double MOS3icVGS; /* initial condition G-S voltage */ double MOS3von; double MOS3vdsat; double MOS3sourceVcrit; /* vcrit for pos. vds */ double MOS3drainVcrit; /* vcrit for neg. vds */ double MOS3cd; double MOS3cbs; double MOS3cbd; double MOS3gmbs; double MOS3gm; double MOS3gds; double MOS3gbd; double MOS3gbs; double MOS3capbd; double MOS3capbs; double MOS3Cbd; double MOS3Cbdsw; double MOS3Cbs; double MOS3Cbssw; double MOS3f2d; double MOS3f3d; double MOS3f4d; double MOS3f2s; double MOS3f3s; double MOS3f4s; int MOS3mode; /* device mode : 1 = normal, -1 = inverse */ unsigned MOS3off :1;/* non-zero to indicate device is off for dc analysis*/ unsigned MOS3tempGiven :1; /* instance temperature specified */ unsigned MOS3dtempGiven :1; /* instance temperature difference specified */ unsigned MOS3mGiven :1; unsigned MOS3lGiven :1; unsigned MOS3wGiven :1; unsigned MOS3drainAreaGiven :1; unsigned MOS3sourceAreaGiven :1; unsigned MOS3drainSquaresGiven :1; unsigned MOS3sourceSquaresGiven :1; unsigned MOS3drainPerimiterGiven :1; unsigned MOS3sourcePerimiterGiven :1; unsigned MOS3dNodePrimeSet :1; unsigned MOS3sNodePrimeSet :1; unsigned MOS3icVBSGiven :1; unsigned MOS3icVDSGiven :1; unsigned MOS3icVGSGiven :1; unsigned MOS3vonGiven :1; unsigned MOS3vdsatGiven :1; unsigned MOS3modeGiven :1; double *MOS3DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *MOS3GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *MOS3SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *MOS3BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *MOS3DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *MOS3SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *MOS3DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *MOS3GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *MOS3GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *MOS3GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *MOS3SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *MOS3BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *MOS3BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *MOS3DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *MOS3DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *MOS3BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *MOS3DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *MOS3SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *MOS3SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *MOS3DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *MOS3SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *MOS3SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ int MOS3senParmNo; /* parameter # for sensitivity use; set equal to 0 if neither length nor width of the mosfet is a design parameter */ unsigned MOS3sens_l :1; /* field which indicates whether length of the mosfet is a design parameter or not */ unsigned MOS3sens_w :1; /* field which indicates whether width of the mosfet is a design parameter or not */ unsigned MOS3senPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ double MOS3cgs; double MOS3cgd; double MOS3cgb; double *MOS3sens; #define MOS3senGdpr MOS3sens #define MOS3senGspr MOS3sens + 1 #define MOS3senCgs MOS3sens + 2 /* contains pertured values of cgs */ #define MOS3senCgd MOS3sens + 8 /* contains perturbed values of cgd*/ #define MOS3senCgb MOS3sens + 14 /* contains perturbed values of cgb*/ #define MOS3senCbd MOS3sens + 20 /* contains perturbed values of cbd*/ #define MOS3senCbs MOS3sens + 26 /* contains perturbed values of cbs*/ #define MOS3senGds MOS3sens + 32 /* contains perturbed values of gds*/ #define MOS3senGbs MOS3sens + 38 /* contains perturbed values of gbs*/ #define MOS3senGbd MOS3sens + 44 /* contains perturbed values of gbd*/ #define MOS3senGm MOS3sens + 50 /* contains perturbed values of gm*/ #define MOS3senGmbs MOS3sens + 56 /* contains perturbed values of gmbs*/ #define MOS3dphigs_dl MOS3sens + 62 #define MOS3dphigd_dl MOS3sens + 63 #define MOS3dphigb_dl MOS3sens + 64 #define MOS3dphibs_dl MOS3sens + 65 #define MOS3dphibd_dl MOS3sens + 66 #define MOS3dphigs_dw MOS3sens + 67 #define MOS3dphigd_dw MOS3sens + 68 #define MOS3dphigb_dw MOS3sens + 69 #define MOS3dphibs_dw MOS3sens + 70 #define MOS3dphibd_dw MOS3sens + 71 /* distortion stuff */ /* * naming convention: * x = vgs * y = vbs * z = vds * cdr = cdrain */ #define MOS3NDCOEFFS 30 #ifndef NODISTO double MOS3dCoeffs[MOS3NDCOEFFS]; #else /* NODISTO */ double *MOS3dCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define capbs2 MOS3dCoeffs[0] #define capbs3 MOS3dCoeffs[1] #define capbd2 MOS3dCoeffs[2] #define capbd3 MOS3dCoeffs[3] #define gbs2 MOS3dCoeffs[4] #define gbs3 MOS3dCoeffs[5] #define gbd2 MOS3dCoeffs[6] #define gbd3 MOS3dCoeffs[7] #define capgb2 MOS3dCoeffs[8] #define capgb3 MOS3dCoeffs[9] #define cdr_x2 MOS3dCoeffs[10] #define cdr_y2 MOS3dCoeffs[11] #define cdr_z2 MOS3dCoeffs[12] #define cdr_xy MOS3dCoeffs[13] #define cdr_yz MOS3dCoeffs[14] #define cdr_xz MOS3dCoeffs[15] #define cdr_x3 MOS3dCoeffs[16] #define cdr_y3 MOS3dCoeffs[17] #define cdr_z3 MOS3dCoeffs[18] #define cdr_x2z MOS3dCoeffs[19] #define cdr_x2y MOS3dCoeffs[20] #define cdr_y2z MOS3dCoeffs[21] #define cdr_xy2 MOS3dCoeffs[22] #define cdr_xz2 MOS3dCoeffs[23] #define cdr_yz2 MOS3dCoeffs[24] #define cdr_xyz MOS3dCoeffs[25] #define capgs2 MOS3dCoeffs[26] #define capgs3 MOS3dCoeffs[27] #define capgd2 MOS3dCoeffs[28] #define capgd3 MOS3dCoeffs[29] #endif /* end distortion coeffs. */ /* indices to the array of MOSFET(3) noise sources */ #define MOS3RDNOIZ 0 #define MOS3RSNOIZ 1 #define MOS3IDNOIZ 2 #define MOS3FLNOIZ 3 #define MOS3TOTNOIZ 4 #define MOS3NSRCS 5 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double MOS3nVar[NSTATVARS][MOS3NSRCS]; #else /* NONOISE */ double **MOS3nVar; #endif /* NONOISE */ } MOS3instance ; #define MOS3vbd MOS3states+ 0 #define MOS3vbs MOS3states+ 1 #define MOS3vgs MOS3states+ 2 #define MOS3vds MOS3states+ 3 /* meyer capacitances */ #define MOS3capgs MOS3states+ 4 /* gate-source capacitor value */ #define MOS3qgs MOS3states+ 5 /* gate-source capacitor charge */ #define MOS3cqgs MOS3states+ 6 /* gate-source capacitor current */ #define MOS3capgd MOS3states+ 7 /* gate-drain capacitor value */ #define MOS3qgd MOS3states+ 8 /* gate-drain capacitor charge */ #define MOS3cqgd MOS3states+ 9 /* gate-drain capacitor current */ #define MOS3capgb MOS3states+ 10/* gate-bulk capacitor value */ #define MOS3qgb MOS3states+ 11 /* gate-bulk capacitor charge */ #define MOS3cqgb MOS3states+ 12 /* gate-bulk capacitor current */ /* diode capacitances */ #define MOS3qbd MOS3states+ 13 /* bulk-drain capacitor charge */ #define MOS3cqbd MOS3states+ 14 /* bulk-drain capacitor current */ #define MOS3qbs MOS3states+ 15 /* bulk-source capacitor charge */ #define MOS3cqbs MOS3states+ 16 /* bulk-source capacitor current */ #define MOS3NUMSTATES 17 #define MOS3sensxpgs MOS3states+17 /* charge sensitivities and their derivatives +18 for the derivatives - pointer to the beginning of the array */ #define MOS3sensxpgd MOS3states+19 #define MOS3sensxpgb MOS3states+21 #define MOS3sensxpbs MOS3states+23 #define MOS3sensxpbd MOS3states+25 #define MOS3numSenStates 10 /* per model data */ /* NOTE: parameters marked 'input - use xxxx' are paramters for * which a temperature correction is applied in MOS3temp, thus * the MOS3xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sMOS3model { /* model structure for a resistor */ int MOS3modType; /* type index of this device type */ struct sMOS3model *MOS3nextModel; /* pointer to next possible model *in linked list */ MOS3instance * MOS3instances; /* pointer to list of instances * that have this model */ IFuid MOS3modName; /* pointer to character string naming this model */ int MOS3type; /* device type : 1 = nmos, -1 = pmos */ double MOS3tnom; /* temperature at which parameters measured */ double MOS3latDiff; double MOS3lengthAdjust; /* New parm: mask adjustment to length */ double MOS3widthNarrow; /* New parm to reduce effective width */ double MOS3widthAdjust; /* New parm: mask adjustment to width */ double MOS3delvt0; /* New parm: adjustment calculated vtO */ double MOS3jctSatCurDensity; /* input - use tSatCurDens*/ double MOS3jctSatCur; /* input - use tSatCur instead */ double MOS3drainResistance; double MOS3sourceResistance; double MOS3sheetResistance; double MOS3transconductance; /* input - use tTransconductance */ double MOS3gateSourceOverlapCapFactor; double MOS3gateDrainOverlapCapFactor; double MOS3gateBulkOverlapCapFactor; double MOS3oxideCapFactor; double MOS3vt0; /* input - use tVto */ double MOS3capBD; /* input - use tCbs */ double MOS3capBS; /* input - use tCbd */ double MOS3bulkCapFactor; /* input - use tCj */ double MOS3sideWallCapFactor; /* input - use tCjsw */ double MOS3bulkJctPotential; /* input - use tBulkPot */ double MOS3bulkJctBotGradingCoeff; double MOS3bulkJctSideGradingCoeff; double MOS3fwdCapDepCoeff; double MOS3phi; /* input - use tPhi */ double MOS3gamma; double MOS3substrateDoping; int MOS3gateType; double MOS3surfaceStateDensity; double MOS3oxideThickness; double MOS3surfaceMobility; /* input - use tSurfMob */ double MOS3eta; double MOS3junctionDepth; double MOS3coeffDepLayWidth; /* xd */ double MOS3narrowFactor; /* delta */ double MOS3delta; /* input delta */ double MOS3fastSurfaceStateDensity; /* nfs */ double MOS3theta; /* theta */ double MOS3maxDriftVel; /* vmax */ double MOS3alpha; /* alpha */ double MOS3kappa; /* kappa */ double MOS3fNcoef; double MOS3fNexp; unsigned MOS3typeGiven :1; unsigned MOS3latDiffGiven :1; unsigned MOS3lengthAdjustGiven :1; unsigned MOS3widthNarrowGiven :1; unsigned MOS3widthAdjustGiven :1; unsigned MOS3delvt0Given :1; unsigned MOS3jctSatCurDensityGiven :1; unsigned MOS3jctSatCurGiven :1; unsigned MOS3drainResistanceGiven :1; unsigned MOS3sourceResistanceGiven :1; unsigned MOS3sheetResistanceGiven :1; unsigned MOS3transconductanceGiven :1; unsigned MOS3gateSourceOverlapCapFactorGiven :1; unsigned MOS3gateDrainOverlapCapFactorGiven :1; unsigned MOS3gateBulkOverlapCapFactorGiven :1; unsigned MOS3vt0Given :1; unsigned MOS3capBDGiven :1; unsigned MOS3capBSGiven :1; unsigned MOS3bulkCapFactorGiven :1; unsigned MOS3sideWallCapFactorGiven :1; unsigned MOS3bulkJctPotentialGiven :1; unsigned MOS3bulkJctBotGradingCoeffGiven :1; unsigned MOS3bulkJctSideGradingCoeffGiven :1; unsigned MOS3fwdCapDepCoeffGiven :1; unsigned MOS3phiGiven :1; unsigned MOS3gammaGiven :1; unsigned MOS3substrateDopingGiven :1; unsigned MOS3gateTypeGiven :1; unsigned MOS3surfaceStateDensityGiven :1; unsigned MOS3oxideThicknessGiven :1; unsigned MOS3surfaceMobilityGiven :1; unsigned MOS3etaGiven :1; unsigned MOS3junctionDepthGiven :1; unsigned MOS3deltaGiven :1; /* delta */ unsigned MOS3fastSurfaceStateDensityGiven :1; /* nfs */ unsigned MOS3thetaGiven :1; /* theta */ unsigned MOS3maxDriftVelGiven :1; /* vmax */ unsigned MOS3kappaGiven :1; /* kappa */ unsigned MOS3tnomGiven :1; /* Tnom was given? */ unsigned MOS3fNcoefGiven :1; unsigned MOS3fNexpGiven :1; } MOS3model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define MOS3_W 1 #define MOS3_L 2 #define MOS3_AS 3 #define MOS3_AD 4 #define MOS3_PS 5 #define MOS3_PD 6 #define MOS3_NRS 7 #define MOS3_NRD 8 #define MOS3_OFF 9 #define MOS3_IC 10 #define MOS3_IC_VBS 11 #define MOS3_IC_VDS 12 #define MOS3_IC_VGS 13 #define MOS3_W_SENS 14 #define MOS3_L_SENS 15 #define MOS3_CB 16 #define MOS3_CG 17 #define MOS3_CS 18 #define MOS3_POWER 19 #define MOS3_CGS 20 #define MOS3_CGD 21 #define MOS3_DNODE 22 #define MOS3_GNODE 23 #define MOS3_SNODE 24 #define MOS3_BNODE 25 #define MOS3_DNODEPRIME 26 #define MOS3_SNODEPRIME 27 #define MOS3_SOURCECONDUCT 28 #define MOS3_DRAINCONDUCT 29 #define MOS3_VON 30 #define MOS3_VDSAT 31 #define MOS3_SOURCEVCRIT 32 #define MOS3_DRAINVCRIT 33 #define MOS3_CD 34 #define MOS3_CBS 35 #define MOS3_CBD 36 #define MOS3_GMBS 37 #define MOS3_GM 38 #define MOS3_GDS 39 #define MOS3_GBD 40 #define MOS3_GBS 41 #define MOS3_CAPBD 42 #define MOS3_CAPBS 43 #define MOS3_CAPZEROBIASBD 44 #define MOS3_CAPZEROBIASBDSW 45 #define MOS3_CAPZEROBIASBS 46 #define MOS3_CAPZEROBIASBSSW 47 #define MOS3_VBD 48 #define MOS3_VBS 49 #define MOS3_VGS 50 #define MOS3_VDS 51 #define MOS3_CAPGS 52 #define MOS3_QGS 53 #define MOS3_CQGS 54 #define MOS3_CAPGD 55 #define MOS3_QGD 56 #define MOS3_CQGD 57 #define MOS3_CAPGB 58 #define MOS3_QGB 59 #define MOS3_CQGB 60 #define MOS3_QBD 61 #define MOS3_CQBD 62 #define MOS3_QBS 63 #define MOS3_CQBS 64 #define MOS3_W_SENS_REAL 65 #define MOS3_W_SENS_IMAG 66 #define MOS3_W_SENS_MAG 67 #define MOS3_W_SENS_PH 68 #define MOS3_W_SENS_CPLX 69 #define MOS3_L_SENS_REAL 70 #define MOS3_L_SENS_IMAG 71 #define MOS3_L_SENS_MAG 72 #define MOS3_L_SENS_PH 73 #define MOS3_L_SENS_CPLX 74 #define MOS3_W_SENS_DC 75 #define MOS3_L_SENS_DC 76 #define MOS3_TEMP 77 #define MOS3_SOURCERESIST 78 #define MOS3_DRAINRESIST 79 #define MOS3_M 80 #define MOS3_DTEMP 81 /* model parameters */ #define MOS3_MOD_VTO 101 #define MOS3_MOD_KP 102 #define MOS3_MOD_GAMMA 103 #define MOS3_MOD_PHI 104 #define MOS3_MOD_RD 105 #define MOS3_MOD_RS 106 #define MOS3_MOD_CBD 107 #define MOS3_MOD_CBS 108 #define MOS3_MOD_IS 109 #define MOS3_MOD_PB 110 #define MOS3_MOD_CGSO 111 #define MOS3_MOD_CGDO 112 #define MOS3_MOD_CGBO 113 #define MOS3_MOD_RSH 114 #define MOS3_MOD_CJ 115 #define MOS3_MOD_MJ 116 #define MOS3_MOD_CJSW 117 #define MOS3_MOD_MJSW 118 #define MOS3_MOD_JS 119 #define MOS3_MOD_TOX 120 #define MOS3_MOD_LD 121 #define MOS3_MOD_U0 122 #define MOS3_MOD_FC 123 #define MOS3_MOD_NSUB 124 #define MOS3_MOD_TPG 125 #define MOS3_MOD_NSS 126 #define MOS3_MOD_ETA 127 #define MOS3_MOD_DELTA 128 #define MOS3_MOD_NFS 129 #define MOS3_MOD_THETA 130 #define MOS3_MOD_VMAX 131 #define MOS3_MOD_KAPPA 132 #define MOS3_MOD_NMOS 133 #define MOS3_MOD_PMOS 134 #define MOS3_MOD_XJ 135 #define MOS3_MOD_UEXP 136 #define MOS3_MOD_NEFF 137 #define MOS3_MOD_XD 138 #define MOS3_MOD_ALPHA 139 #define MOS3_DELTA 140 #define MOS3_MOD_TNOM 141 #define MOS3_MOD_KF 142 #define MOS3_MOD_AF 143 #define MOS3_MOD_TYPE 144 #define MOS3_MOD_XL 145 #define MOS3_MOD_WD 146 #define MOS3_MOD_XW 147 #define MOS3_MOD_DELVTO 148 /* device questions */ /* model questions */ #include "mos3ext.h" #endif /*MOS3*/ ngspice-26/src/spicelib/devices/mos3/mos3dist.c0000644000265600020320000007716112264261473021042 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int MOS3disto(int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { MOS3model *model = (MOS3model *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h1z, i1h1z; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1h2z, i1h2z; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r1hm2z, i1hm2z; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h11z, i2h11z; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double r2h1m2z, i2h1m2z; double temp, itemp; MOS3instance *here; if (mode == D_SETUP) return(MOS3dSetup(genmodel,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the MOS3 models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + (here->MOS3dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F1(here->gbs2, r1h1y, i1h1y); itemp = D1i2F1(here->gbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = D1i2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F1(here->capgs2, r1h1x, i1h1x); itemp = ckt->CKTomega * D1n2F1(here->capgs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3bNode)) += temp; *(ckt->CKTirhs + (here->MOS3bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F1(here->capbs2, r1h1y, i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r2h11x = *(job->r2H11ptr + (here->MOS3gNode)) - *(job->r2H11ptr + (here->MOS3sNodePrime)); i2h11x = *(job->i2H11ptr + (here->MOS3gNode)) - *(job->i2H11ptr + (here->MOS3sNodePrime)); r2h11y = *(job->r2H11ptr + (here->MOS3bNode)) - *(job->r2H11ptr + (here->MOS3sNodePrime)); i2h11y = *(job->i2H11ptr + (here->MOS3bNode)) - *(job->i2H11ptr + (here->MOS3sNodePrime)); r2h11z = *(job->r2H11ptr + (here->MOS3dNodePrime)) - *(job->r2H11ptr + (here->MOS3sNodePrime)); i2h11z = *(job->i2H11ptr + (here->MOS3dNodePrime)) - *(job->i2H11ptr + (here->MOS3sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + (here->MOS3dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = D1i3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = D1i3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = ckt->CKTomega * D1n3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3bNode)) += temp; *(ckt->CKTirhs + (here->MOS3bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h2x = *(job->r1H2ptr + (here->MOS3gNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1h2x = *(job->i1H2ptr + (here->MOS3gNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime)); r1h2y = *(job->r1H2ptr + (here->MOS3bNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1h2y = *(job->i1H2ptr + (here->MOS3bNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime)); r1h2z = *(job->r1H2ptr + (here->MOS3dNodePrime)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1h2z = *(job->i1H2ptr + (here->MOS3dNodePrime)) - *(job->i1H2ptr + (here->MOS3sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + (here->MOS3dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3bNode)) += temp; *(ckt->CKTirhs + (here->MOS3bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS3gNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS3gNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS3bNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS3bNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS3dNodePrime)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS3dNodePrime)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + (here->MOS3dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3bNode)) += temp; *(ckt->CKTirhs + (here->MOS3bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS3gNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS3gNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS3bNode)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS3bNode)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS3dNodePrime)) - *(job->r1H2ptr + (here->MOS3sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS3dNodePrime)) - *(job->i1H2ptr + (here->MOS3sNodePrime))); r2h11x = *(job->r1H1ptr + (here->MOS3gNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i2h11x = *(job->i1H1ptr + (here->MOS3gNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r2h11y = *(job->r1H1ptr + (here->MOS3bNode)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i2h11y = *(job->i1H1ptr + (here->MOS3bNode)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r2h11z = *(job->r1H1ptr + (here->MOS3dNodePrime)) - *(job->r1H1ptr + (here->MOS3sNodePrime)); i2h11z = *(job->i1H1ptr + (here->MOS3dNodePrime)) - *(job->i1H1ptr + (here->MOS3sNodePrime)); r2h1m2x = *(job->r2H1m2ptr + (here->MOS3gNode)) - *(job->r2H1m2ptr + (here->MOS3sNodePrime)); i2h1m2x = *(job->i2H1m2ptr + (here->MOS3gNode)) - *(job->i2H1m2ptr + (here->MOS3sNodePrime)); r2h1m2y = *(job->r2H1m2ptr + (here->MOS3bNode)) - *(job->r2H1m2ptr + (here->MOS3sNodePrime)); i2h1m2y = *(job->i2H1m2ptr + (here->MOS3bNode)) - *(job->i2H1m2ptr + (here->MOS3sNodePrime)); r2h1m2z = *(job->r2H1m2ptr + (here->MOS3dNodePrime)) - *(job->r2H1m2ptr + (here->MOS3sNodePrime)); i2h1m2z = *(job->i2H1m2ptr + (here->MOS3dNodePrime)) - *(job->i2H1m2ptr + (here->MOS3sNodePrime)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_y2; pass.czz = here->cdr_z2; pass.cxy = here->cdr_xy; pass.cyz = here->cdr_yz; pass.cxz = here->cdr_xz; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_y3; pass.czzz = here->cdr_z3; pass.cxxy = here->cdr_x2y; pass.cxxz = here->cdr_x2z; pass.cxyy = here->cdr_xy2; pass.cyyz = here->cdr_y2z; pass.cxzz = here->cdr_xz2; pass.cyzz = here->cdr_yz2; pass.cxyz = here->cdr_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->MOS3dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = D1i2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = D1i2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = ckt->CKTomega * D1n2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->MOS3gNode)) -= temp; *(ckt->CKTirhs + (here->MOS3gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3bNode)) += temp; *(ckt->CKTirhs + (here->MOS3bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS3bNode)) -= temp; *(ckt->CKTirhs + (here->MOS3bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS3dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS3dNodePrime)) += itemp; /* capbd over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/mos3/mos3mpar.c0000644000265600020320000001516612264261473021033 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3mParam(int param, IFvalue *value, GENmodel *inModel) { MOS3model *model = (MOS3model *)inModel; switch(param) { case MOS3_MOD_VTO: model->MOS3vt0 = value->rValue; model->MOS3vt0Given = TRUE; break; case MOS3_MOD_KP: model->MOS3transconductance = value->rValue; model->MOS3transconductanceGiven = TRUE; break; case MOS3_MOD_GAMMA: model->MOS3gamma = value->rValue; model->MOS3gammaGiven = TRUE; break; case MOS3_MOD_PHI: model->MOS3phi = value->rValue; model->MOS3phiGiven = TRUE; break; case MOS3_MOD_RD: model->MOS3drainResistance = value->rValue; model->MOS3drainResistanceGiven = TRUE; break; case MOS3_MOD_RS: model->MOS3sourceResistance = value->rValue; model->MOS3sourceResistanceGiven = TRUE; break; case MOS3_MOD_CBD: model->MOS3capBD = value->rValue; model->MOS3capBDGiven = TRUE; break; case MOS3_MOD_CBS: model->MOS3capBS = value->rValue; model->MOS3capBSGiven = TRUE; break; case MOS3_MOD_IS: model->MOS3jctSatCur = value->rValue; model->MOS3jctSatCurGiven = TRUE; break; case MOS3_MOD_PB: model->MOS3bulkJctPotential = value->rValue; model->MOS3bulkJctPotentialGiven = TRUE; break; case MOS3_MOD_CGSO: model->MOS3gateSourceOverlapCapFactor = value->rValue; model->MOS3gateSourceOverlapCapFactorGiven = TRUE; break; case MOS3_MOD_CGDO: model->MOS3gateDrainOverlapCapFactor = value->rValue; model->MOS3gateDrainOverlapCapFactorGiven = TRUE; break; case MOS3_MOD_CGBO: model->MOS3gateBulkOverlapCapFactor = value->rValue; model->MOS3gateBulkOverlapCapFactorGiven = TRUE; break; case MOS3_MOD_RSH: model->MOS3sheetResistance = value->rValue; model->MOS3sheetResistanceGiven = TRUE; break; case MOS3_MOD_CJ: model->MOS3bulkCapFactor = value->rValue; model->MOS3bulkCapFactorGiven = TRUE; break; case MOS3_MOD_MJ: model->MOS3bulkJctBotGradingCoeff = value->rValue; model->MOS3bulkJctBotGradingCoeffGiven = TRUE; break; case MOS3_MOD_CJSW: model->MOS3sideWallCapFactor = value->rValue; model->MOS3sideWallCapFactorGiven = TRUE; break; case MOS3_MOD_MJSW: model->MOS3bulkJctSideGradingCoeff = value->rValue; model->MOS3bulkJctSideGradingCoeffGiven = TRUE; break; case MOS3_MOD_JS: model->MOS3jctSatCurDensity = value->rValue; model->MOS3jctSatCurDensityGiven = TRUE; break; case MOS3_MOD_TOX: model->MOS3oxideThickness = value->rValue; model->MOS3oxideThicknessGiven = TRUE; break; case MOS3_MOD_LD: model->MOS3latDiff = value->rValue; model->MOS3latDiffGiven = TRUE; break; case MOS3_MOD_XL: model->MOS3lengthAdjust = value->rValue; model->MOS3lengthAdjustGiven = TRUE; break; case MOS3_MOD_WD: model->MOS3widthNarrow = value->rValue; model->MOS3widthNarrowGiven = TRUE; break; case MOS3_MOD_XW: model->MOS3widthAdjust = value->rValue; model->MOS3widthAdjustGiven = TRUE; break; case MOS3_MOD_DELVTO: model->MOS3delvt0 = value->rValue; model->MOS3delvt0Given = TRUE; break; case MOS3_MOD_U0: model->MOS3surfaceMobility = value->rValue; model->MOS3surfaceMobilityGiven = TRUE; break; case MOS3_MOD_FC: model->MOS3fwdCapDepCoeff = value->rValue; model->MOS3fwdCapDepCoeffGiven = TRUE; break; case MOS3_MOD_NSUB: model->MOS3substrateDoping = value->rValue; model->MOS3substrateDopingGiven = TRUE; break; case MOS3_MOD_TPG: model->MOS3gateType = value->iValue; model->MOS3gateTypeGiven = TRUE; break; case MOS3_MOD_NSS: model->MOS3surfaceStateDensity = value->rValue; model->MOS3surfaceStateDensityGiven = TRUE; break; case MOS3_MOD_ETA: model->MOS3eta = value->rValue; model->MOS3etaGiven = TRUE; break; case MOS3_MOD_DELTA: model->MOS3delta = value->rValue; model->MOS3deltaGiven = TRUE; break; case MOS3_MOD_NFS: model->MOS3fastSurfaceStateDensity = value->rValue; model->MOS3fastSurfaceStateDensityGiven = TRUE; break; case MOS3_MOD_THETA: model->MOS3theta = value->rValue; model->MOS3thetaGiven = TRUE; break; case MOS3_MOD_VMAX: model->MOS3maxDriftVel = value->rValue; model->MOS3maxDriftVelGiven = TRUE; break; case MOS3_MOD_KAPPA: model->MOS3kappa = value->rValue; model->MOS3kappaGiven = TRUE; break; case MOS3_MOD_NMOS: if(value->iValue) { model->MOS3type = 1; model->MOS3typeGiven = TRUE; } break; case MOS3_MOD_PMOS: if(value->iValue) { model->MOS3type = -1; model->MOS3typeGiven = TRUE; } break; case MOS3_MOD_XJ: model->MOS3junctionDepth = value->rValue; model->MOS3junctionDepthGiven = TRUE; break; case MOS3_MOD_TNOM: model->MOS3tnom = value->rValue+CONSTCtoK; model->MOS3tnomGiven = TRUE; break; case MOS3_MOD_KF: model->MOS3fNcoef = value->rValue; model->MOS3fNcoefGiven = TRUE; break; case MOS3_MOD_AF: model->MOS3fNexp = value->rValue; model->MOS3fNexpGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3ext.h0000644000265600020320000000253612264261473020676 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int MOS3acLoad(GENmodel*,CKTcircuit*); extern int MOS3ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MOS3convTest(GENmodel *,CKTcircuit *); extern int MOS3delete(GENmodel*,IFuid,GENinstance**); extern void MOS3destroy(GENmodel**); extern int MOS3getic(GENmodel*,CKTcircuit*); extern int MOS3load(GENmodel*,CKTcircuit*); extern int MOS3mAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int MOS3mDelete(GENmodel**,IFuid,GENmodel*); extern int MOS3mParam(int,IFvalue*,GENmodel*); extern int MOS3param(int,IFvalue*,GENinstance*,IFvalue*); extern int MOS3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MOS3sAcLoad(GENmodel*,CKTcircuit*); extern int MOS3sLoad(GENmodel*,CKTcircuit*); extern void MOS3sPrint(GENmodel*,CKTcircuit*); extern int MOS3sSetup(SENstruct*,GENmodel*); extern int MOS3sUpdate(GENmodel*,CKTcircuit*); extern int MOS3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MOS3unsetup(GENmodel*,CKTcircuit*); extern int MOS3temp(GENmodel*,CKTcircuit*); extern int MOS3trunc(GENmodel*,CKTcircuit*,double*); extern int MOS3disto(int,GENmodel*,CKTcircuit*); extern int MOS3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int MOS3dSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mos3/mos3temp.c0000644000265600020320000003554512264261473021044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) int MOS3temp(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; double wkfngs; double wkfng; double fermig; double fermis; double vfb; double fact1,fact2; double vt,vtnom; double kt,kt1; double ratio,ratio4; double egfet,egfet1; double pbfact,pbfact1,pbo; double phio; double arg1; double capfact; double gmanew,gmaold; double ni_temp, nifact; /* loop through all the mosfet models */ for( ; model != NULL; model = model->MOS3nextModel) { if(!model->MOS3tnomGiven) { model->MOS3tnom = ckt->CKTnomTemp; } fact1 = model->MOS3tnom/REFTEMP; vtnom = model->MOS3tnom*CONSTKoverQ; kt1 = CONSTboltz * model->MOS3tnom; egfet1 = 1.16-(7.02e-4*model->MOS3tnom*model->MOS3tnom)/ (model->MOS3tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); nifact=(model->MOS3tnom/300)*sqrt(model->MOS3tnom/300); nifact*=exp(0.5*egfet1*((1/(double)300)-(1/model->MOS3tnom))/ CONSTKoverQ); ni_temp=1.45e16*nifact; if (model->MOS3phi <= 0.0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: Phi is not positive.", &model->MOS3modName); return(E_BADPARM); } model->MOS3oxideCapFactor = 3.9 * 8.854214871e-12/ model->MOS3oxideThickness; if(!model->MOS3surfaceMobilityGiven) model->MOS3surfaceMobility=600; if(!model->MOS3transconductanceGiven) { model->MOS3transconductance = model->MOS3surfaceMobility * model->MOS3oxideCapFactor * 1e-4; } if(model->MOS3substrateDopingGiven) { if(model->MOS3substrateDoping*1e6 /*(cm**3/m**3)*/ >ni_temp) { if(!model->MOS3phiGiven) { model->MOS3phi = 2*vtnom* log(model->MOS3substrateDoping* 1e6/*(cm**3/m**3)*//ni_temp); model->MOS3phi = MAX(.1,model->MOS3phi); } fermis = model->MOS3type * .5 * model->MOS3phi; wkfng = 3.2; if(!model->MOS3gateTypeGiven) model->MOS3gateType=1; if(model->MOS3gateType != 0) { fermig = model->MOS3type * model->MOS3gateType*.5*egfet1; wkfng = 3.25 + .5 * egfet1 - fermig; } wkfngs = wkfng - (3.25 + .5 * egfet1 +fermis); if(!model->MOS3gammaGiven) { model->MOS3gamma = sqrt(2 * EPSSIL * CHARGE * model->MOS3substrateDoping* 1e6 /*(cm**3/m**3)*/ )/ model->MOS3oxideCapFactor; } if(!model->MOS3vt0Given) { if(!model->MOS3surfaceStateDensityGiven) model->MOS3surfaceStateDensity=0; vfb = wkfngs - model->MOS3surfaceStateDensity * 1e4 * CHARGE/model->MOS3oxideCapFactor; model->MOS3vt0 = vfb + model->MOS3type * (model->MOS3gamma * sqrt(model->MOS3phi)+ model->MOS3phi); } else { vfb = model->MOS3vt0 - model->MOS3type * (model->MOS3gamma* sqrt(model->MOS3phi)+model->MOS3phi); } model->MOS3alpha = (EPSSIL+EPSSIL)/ (CHARGE*model->MOS3substrateDoping*1e6 /*(cm**3/m**3)*/ ); model->MOS3coeffDepLayWidth = sqrt(model->MOS3alpha); } else { model->MOS3substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni ",&(model->MOS3modName)); return(E_BADPARM); } } /* now model parameter preprocessing */ model->MOS3narrowFactor = model->MOS3delta * 0.5 * M_PI * EPSSIL / model->MOS3oxideCapFactor ; /* loop through all instances of the model */ for(here = model->MOS3instances; here!= NULL; here = here->MOS3nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbdsw; /* zero voltage bulk-drain sidewall capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double czbssw; /* zero voltage bulk-source sidewall capacitance */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ double sargsw; /* (1-fc) ^^ (-mjsw) */ /* perform the parameter defaulting */ if(!here->MOS3dtempGiven) { here->MOS3dtemp = 0.0; } if(!here->MOS3tempGiven) { here->MOS3temp = ckt->CKTtemp + here->MOS3dtemp; } vt = here->MOS3temp * CONSTKoverQ; ratio = here->MOS3temp/model->MOS3tnom; fact2 = here->MOS3temp/REFTEMP; kt = here->MOS3temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->MOS3temp*here->MOS3temp)/ (here->MOS3temp+1108); arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->MOS3mGiven) { here->MOS3m = ckt->CKTdefaultMosM; } if(!here->MOS3lGiven) { here->MOS3l = ckt->CKTdefaultMosL; } if(!here->MOS3sourceAreaGiven) { here->MOS3sourceArea = ckt->CKTdefaultMosAS; } if(!here->MOS3wGiven) { here->MOS3w = ckt->CKTdefaultMosW; } if(model->MOS3drainResistanceGiven) { if(model->MOS3drainResistance != 0) { here->MOS3drainConductance = here->MOS3m / model->MOS3drainResistance; } else { here->MOS3drainConductance = 0; } } else if (model->MOS3sheetResistanceGiven) { if ((model->MOS3sheetResistance != 0) && (here->MOS3drainSquares != 0)) { here->MOS3drainConductance = here->MOS3m / (model->MOS3sheetResistance*here->MOS3drainSquares); } else { here->MOS3drainConductance = 0; } } else { here->MOS3drainConductance = 0; } if(model->MOS3sourceResistanceGiven) { if(model->MOS3sourceResistance != 0) { here->MOS3sourceConductance = here->MOS3m / model->MOS3sourceResistance; } else { here->MOS3sourceConductance = 0; } } else if (model->MOS3sheetResistanceGiven) { if ((model->MOS3sheetResistance != 0) && (here->MOS3sourceSquares != 0)) { here->MOS3sourceConductance = here->MOS3m / (model->MOS3sheetResistance*here->MOS3sourceSquares); } else { here->MOS3sourceConductance = 0; } } else { here->MOS3sourceConductance = 0; } if(here->MOS3l - 2 * model->MOS3latDiff + model->MOS3lengthAdjust <= 0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel length less than zero", &(here->MOS3name)); return(E_PARMVAL); } if(here->MOS3w - 2 * model->MOS3widthNarrow + model->MOS3widthAdjust <= 0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel width less than zero", &(here->MOS3name)); return(E_PARMVAL); } ratio4 = ratio * sqrt(ratio); here->MOS3tTransconductance = model->MOS3transconductance / ratio4; here->MOS3tSurfMob = model->MOS3surfaceMobility/ratio4; phio= (model->MOS3phi-pbfact1)/fact1; here->MOS3tPhi = fact2 * phio + pbfact; here->MOS3tVbi = model->MOS3delvt0 + model->MOS3vt0 - model->MOS3type * (model->MOS3gamma* sqrt(model->MOS3phi)) +.5*(egfet1-egfet) + model->MOS3type*.5* (here->MOS3tPhi-model->MOS3phi); here->MOS3tVto = here->MOS3tVbi + model->MOS3type * model->MOS3gamma * sqrt(here->MOS3tPhi); here->MOS3tSatCur = model->MOS3jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->MOS3tSatCurDens = model->MOS3jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); pbo = (model->MOS3bulkJctPotential - pbfact1)/fact1; gmaold = (model->MOS3bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->MOS3bulkJctBotGradingCoeff* (4e-4*(model->MOS3tnom-REFTEMP)-gmaold)); here->MOS3tCbd = model->MOS3capBD * capfact; here->MOS3tCbs = model->MOS3capBS * capfact; here->MOS3tCj = model->MOS3bulkCapFactor * capfact; capfact = 1/(1+model->MOS3bulkJctSideGradingCoeff* (4e-4*(model->MOS3tnom-REFTEMP)-gmaold)); here->MOS3tCjsw = model->MOS3sideWallCapFactor * capfact; here->MOS3tBulkPot = fact2 * pbo+pbfact; gmanew = (here->MOS3tBulkPot-pbo)/pbo; capfact = (1+model->MOS3bulkJctBotGradingCoeff* (4e-4*(here->MOS3temp-REFTEMP)-gmanew)); here->MOS3tCbd *= capfact; here->MOS3tCbs *= capfact; here->MOS3tCj *= capfact; capfact = (1+model->MOS3bulkJctSideGradingCoeff* (4e-4*(here->MOS3temp-REFTEMP)-gmanew)); here->MOS3tCjsw *= capfact; here->MOS3tDepCap = model->MOS3fwdCapDepCoeff * here->MOS3tBulkPot; if( (model->MOS3jctSatCurDensity == 0) || (here->MOS3drainArea == 0) || (here->MOS3sourceArea == 0) ) { here->MOS3sourceVcrit = here->MOS3drainVcrit = vt*log(vt/(CONSTroot2*here->MOS3m*here->MOS3tSatCur)); } else { here->MOS3drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS3m * here->MOS3tSatCurDens * here->MOS3drainArea)); here->MOS3sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS3m * here->MOS3tSatCurDens * here->MOS3sourceArea)); } if(model->MOS3capBDGiven) { czbd = here->MOS3tCbd * here->MOS3m; } else { if(model->MOS3bulkCapFactorGiven) { czbd=here->MOS3tCj*here->MOS3drainArea * here->MOS3m; } else { czbd=0; } } if(model->MOS3sideWallCapFactorGiven) { czbdsw= here->MOS3tCjsw * here->MOS3drainPerimiter * here->MOS3m; } else { czbdsw=0; } arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3Cbd = czbd; here->MOS3Cbdsw = czbdsw; here->MOS3f2d = czbd*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + czbdsw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3d = czbd * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ here->MOS3tBulkPot + czbdsw * model->MOS3bulkJctSideGradingCoeff * sargsw/arg / here->MOS3tBulkPot; here->MOS3f4d = czbd*here->MOS3tBulkPot*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbdsw*here->MOS3tBulkPot*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3d/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2d; if(model->MOS3capBSGiven) { czbs = here->MOS3tCbs * here->MOS3m; } else { if(model->MOS3bulkCapFactorGiven) { czbs=here->MOS3tCj*here->MOS3sourceArea * here->MOS3m; } else { czbs=0; } } if(model->MOS3sideWallCapFactorGiven) { czbssw = here->MOS3tCjsw * here->MOS3sourcePerimiter * here->MOS3m; } else { czbssw=0; } arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3Cbs = czbs; here->MOS3Cbssw = czbssw; here->MOS3f2s = czbs*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + czbssw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3s = czbs * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ here->MOS3tBulkPot + czbssw * model->MOS3bulkJctSideGradingCoeff * sargsw/arg / here->MOS3tBulkPot; here->MOS3f4s = czbs*here->MOS3tBulkPot*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbssw*here->MOS3tBulkPot*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3s/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2s; } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3dset.c0000644000265600020320000010056512264261473021031 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos3defs.h" #include "ngspice/trandefs.h" #include "ngspice/distodef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3dSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; double Beta; double DrainSatCur; double EffectiveLength; double EffectiveWidth; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cdrain; double evbs; double sarg; double sargsw; double lvgs; double vbd; double vbs; double vds; double vdsat; double vgb; double vgd; double vgs; double von; double lcapgs2,lcapgs3; /* total gate-source capacitance */ double lcapgd2,lcapgd3; /* total gate-drain capacitance */ double lcapgb2,lcapgb3; /* total gate-bulk capacitance */ double lgbs, lgbs2, lgbs3; double lgbd, lgbd2, lgbd3; double gm2, gb2, gds2, gmb, gmds, gbds; double gm3, gb3, gds3, gm2ds, gm2b, gb2ds, gbds2, gmb2, gmds2, gmbds; double lcapbd, lcapbd2, lcapbd3; double lcapbs, lcapbs2, lcapbs3; double ebd; double vt; /* vt at instance temperature */ Dderivs d_cdrain; /* loop through all the MOS3 device models */ for( ; model != NULL; model = model->MOS3nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS3instances; here != NULL ; here=here->MOS3nextInstance) { vt = CONSTKoverQ * here->MOS3temp; /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveWidth=here->MOS3w-2*model->MOS3widthNarrow+ model->MOS3widthAdjust; EffectiveLength=here->MOS3l - 2*model->MOS3latDiff+ model->MOS3lengthAdjust; if( (here->MOS3tSatCurDens == 0) || (here->MOS3drainArea == 0) || (here->MOS3sourceArea == 0)) { DrainSatCur = here->MOS3m * here->MOS3tSatCur; SourceSatCur = here->MOS3m * here->MOS3tSatCur; } else { DrainSatCur = here->MOS3tSatCurDens * here->MOS3m * here->MOS3drainArea; SourceSatCur = here->MOS3tSatCurDens * here->MOS3m * here->MOS3sourceArea; } GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; Beta = here->MOS3tTransconductance * here->MOS3m * EffectiveWidth/EffectiveLength; OxideCap = model->MOS3oxideCapFactor * EffectiveLength * here->MOS3m * EffectiveWidth; /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ /* general iteration */ vbs = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3bNode) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); vgs = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3gNode) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); vds = model->MOS3type * ( *(ckt->CKTrhsOld+here->MOS3dNodePrime) - *(ckt->CKTrhsOld+here->MOS3sNodePrime)); /* now some common crunching for some more useful quantities */ /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* bulk-source and bulk-drain doides * here we just evaluate the ideal diode current and the * correspoinding derivative (conductance). */ if(vbs <= 0) { lgbs = SourceSatCur/vt; lgbs += ckt->CKTgmin; lgbs2 = lgbs3 = 0; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); lgbs = SourceSatCur*evbs/vt + ckt->CKTgmin; lgbs2 = model->MOS3type *0.5 * (lgbs - ckt->CKTgmin)/vt; lgbs3 = model->MOS3type *lgbs2/(vt*3); } if(vbd <= 0) { lgbd = DrainSatCur/vt; lgbd += ckt->CKTgmin; lgbd2 = lgbd3 = 0; } else { ebd = exp(MIN(MAX_EXP_ARG,vbd/vt)); lgbd = DrainSatCur*ebd/vt +ckt->CKTgmin; lgbd2 = model->MOS3type *0.5 * (lgbd - ckt->CKTgmin)/vt; lgbd3 = model->MOS3type *lgbd2/(vt*3); } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS3mode = 1; } else { /* inverse mode */ here->MOS3mode = -1; } { /* * subroutine moseq3(vds,vbs,vgs,gm,gds,gmbs, * qg,qc,qb,cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets based on semi-empirical equations */ /* common /mosarg/ vto,beta,gamma,phi,phib,cox,xnsub,xnfs,xd,xj,xld, 1 xlamda,uo,uexp,vbp,utra,vmax,xneff,xl,xw,vbi,von,vdsat,qspof, 2 beta0,beta1,cdrain,xqco,xqc,fnarrw,fshort,lev common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, 1 xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, 2 iterno,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 */ /* equivalence (xlamda,alpha),(vbp,theta),(uexp,eta),(utra,xkappa)*/ double coeff0 = 0.0631353e0; double coeff1 = 0.8013292e0; double coeff2 = -0.01110777e0; double oneoverxl; /* 1/effective length */ double eta; /* eta from model after length factor */ double phibs; /* phi - vbs */ double sqphbs; /* square root of phibs */ double sqphis; /* square root of phi */ double wps; double oneoverxj; /* 1/junction depth */ double xjonxl; /* junction depth/effective length */ double djonxj; double wponxj; double arga; double argb; double argc; double gammas; double fbodys; double fbody; double onfbdy; double qbonco; double vbix; double wconxj; double vth; double csonco; double cdonco; double vgsx; double onfg; double fgate; double us; double xn = 0.0; double vdsc; double onvdsc = 0.0; double vdsx; double cdnorm; double cdo; double fdrain = 0.0; double gdsat; double cdsat; double emax; double delxl; double dlonxl; double xlfact; double ondvt; double onxn; double wfact; double fshort; double lvds, lvbs, lvbd; Dderivs d_onxn, d_ondvt, d_wfact, d_MOS3gds; Dderivs d_emax, d_delxl, d_dlonxl, d_xlfact; Dderivs d_cdonco, d_fdrain, d_cdsat, d_gdsat; Dderivs d_vdsx, d_cdo, d_cdnorm, d_Beta, d_dummy; Dderivs d_vdsc, d_onvdsc, d_arga, d_argb; Dderivs d_onfg, d_fgate, d_us, d_vgsx; Dderivs d_von, d_xn, d_vth, d_onfbdy, d_qbonco, d_vbix; Dderivs d_argc, d_fshort, d_gammas, d_fbodys, d_fbody; Dderivs d_wps, d_wconxj, d_wponxj; Dderivs d_phibs, d_sqphbs; Dderivs d_p, d_q, d_r, d_zero, d_vdsat; /* * bypasses the computation of charges */ if (here->MOS3mode == 1) { lvgs = vgs; lvds = vds; lvbs = vbs; lvbd = vbd; } else { lvgs = vgd; lvds = -vds; lvbs = vbd; lvbd = vbs; } /* * reference cdrain equations to source and * charge equations to bulk */ d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2r = 0.0; d_p.d3_p2q = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q,&d_p); EqualDeriv(&d_r,&d_p); EqualDeriv(&d_zero,&d_p); d_q.d1_p = d_r.d1_p = d_zero.d1_p = 0.0; d_q.d1_q = d_r.d1_r = 1.0; vdsat = 0.0; EqualDeriv(&d_vdsat,&d_zero); oneoverxl = 1.0/EffectiveLength;/*const*/ eta = model->MOS3eta * 8.15e-22/(model->MOS3oxideCapFactor* EffectiveLength*EffectiveLength*EffectiveLength);/*const*/ /* *.....square root term */ if ( lvbs <= 0.0 ) { phibs = here->MOS3tPhi-lvbs; EqualDeriv(&d_phibs,&d_q); d_phibs.value = lvbs; TimesDeriv(&d_phibs,&d_phibs,-1.0); d_phibs.value += here->MOS3tPhi; sqphbs = sqrt(phibs); SqrtDeriv(&d_sqphbs,&d_phibs); } else { sqphis = sqrt(here->MOS3tPhi);/*const*/ /*sqphs3 = here->MOS3tPhi*sqphis;const*/ sqphbs = sqphis/(1.0+lvbs/ (here->MOS3tPhi+here->MOS3tPhi)); EqualDeriv(&d_sqphbs,&d_q); d_sqphbs.value = lvbs; TimesDeriv(&d_sqphbs,&d_sqphbs,1/(here->MOS3tPhi+here->MOS3tPhi)); d_sqphbs.value += 1.0; InvDeriv(&d_sqphbs,&d_sqphbs); TimesDeriv(&d_sqphbs,&d_sqphbs,sqphis); phibs = sqphbs*sqphbs; MultDeriv(&d_phibs,&d_sqphbs,&d_sqphbs); } /* *.....short channel effect factor */ if ( (model->MOS3junctionDepth != 0.0) && (model->MOS3coeffDepLayWidth != 0.0) ) { wps = model->MOS3coeffDepLayWidth*sqphbs; TimesDeriv(&d_wps,&d_sqphbs,model->MOS3coeffDepLayWidth); oneoverxj = 1.0/model->MOS3junctionDepth;/*const*/ xjonxl = model->MOS3junctionDepth*oneoverxl;/*const*/ djonxj = model->MOS3latDiff*oneoverxj;/*const*/ wponxj = wps*oneoverxj; TimesDeriv(&d_wponxj,&d_wps,oneoverxj); wconxj = coeff0+coeff1*wponxj+coeff2*wponxj*wponxj; TimesDeriv(&d_wconxj,&d_wponxj,coeff2); d_wconxj.value += coeff1; MultDeriv(&d_wconxj,&d_wconxj,&d_wponxj); d_wconxj.value += coeff0; arga = wconxj + djonxj; EqualDeriv(&d_arga,&d_wconxj); d_arga.value += djonxj; argc = wponxj/(1.0+wponxj); EqualDeriv(&d_argc,&d_wponxj); d_argc.value += 1.0; InvDeriv(&d_argc,&d_argc); MultDeriv(&d_argc,&d_argc,&d_wponxj); argb = sqrt(1.0-argc*argc); MultDeriv(&d_argb,&d_argc,&d_argc); TimesDeriv(&d_argb,&d_argb,-1.0); d_argb.value += 1.0; SqrtDeriv(&d_argb,&d_argb); fshort = 1.0-xjonxl*(arga*argb-djonxj); MultDeriv(&d_fshort,&d_arga,&d_argb); d_fshort.value -= djonxj; TimesDeriv(&d_fshort,&d_fshort,-xjonxl); d_fshort.value += 1.0; } else { fshort = 1.0; EqualDeriv(&d_fshort,&d_zero); d_fshort.value = 1.0; } /* *.....body effect */ gammas = model->MOS3gamma*fshort; TimesDeriv(&d_gammas,&d_fshort,model->MOS3gamma); fbodys = 0.5*gammas/(sqphbs+sqphbs); DivDeriv(&d_fbodys,&d_gammas,&d_sqphbs); TimesDeriv(&d_fbodys,&d_fbodys,0.25); fbody = fbodys+model->MOS3narrowFactor/EffectiveWidth; EqualDeriv(&d_fbody,&d_fbodys); d_fbody.value += fbody - fbodys; onfbdy = 1.0/(1.0+fbody); EqualDeriv(&d_onfbdy,&d_fbody); d_onfbdy.value += 1.0; InvDeriv(&d_onfbdy,&d_onfbdy); qbonco =gammas*sqphbs+model->MOS3narrowFactor*phibs/EffectiveWidth; EqualDeriv(&d_dummy,&d_phibs); TimesDeriv(&d_dummy,&d_dummy,model->MOS3narrowFactor*EffectiveWidth); MultDeriv(&d_qbonco,&d_gammas,&d_sqphbs); PlusDeriv(&d_qbonco,&d_qbonco,&d_dummy); /* *.....static feedback effect */ vbix = here->MOS3tVbi*model->MOS3type-eta*(lvds); EqualDeriv(&d_vbix,&d_r); d_vbix.value = vbix; d_vbix.d1_r = -eta; /* *.....threshold voltage */ vth = vbix+qbonco; PlusDeriv(&d_vth,&d_vbix,&d_qbonco); /* *.....joint weak inversion and strong inversion */ von = vth; EqualDeriv(&d_von,&d_vth); if ( model->MOS3fastSurfaceStateDensity != 0.0 ) { csonco = CHARGE*model->MOS3fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ *EffectiveLength*EffectiveWidth * here->MOS3m/OxideCap; /*const*/ cdonco = 0.5*qbonco/phibs; DivDeriv(&d_cdonco,&d_qbonco,&d_phibs); TimesDeriv(&d_cdonco,&d_cdonco,0.5); xn = 1.0+csonco+cdonco; EqualDeriv(&d_xn,&d_cdonco); d_xn.value += 1.0 + csonco; von = vth+vt*xn; TimesDeriv(&d_von,&d_xn,vt); PlusDeriv(&d_von,&d_von,&d_vth); } else { /* *.....cutoff region */ if ( lvgs <= von ) { cdrain = 0.0; EqualDeriv(&d_cdrain,&d_zero); goto innerline1000; } } /* *.....device is on */ vgsx = MAX(lvgs,von); if (lvgs >= von) { EqualDeriv(&d_vgsx,&d_p); d_vgsx.value = lvgs; } else { EqualDeriv(&d_vgsx,&d_von); } /* *.....mobility modulation by gate voltage */ onfg = 1.0+model->MOS3theta*(vgsx-vth); TimesDeriv(&d_onfg,&d_vth,-1.0); PlusDeriv(&d_onfg,&d_onfg,&d_vgsx); TimesDeriv(&d_onfg,&d_onfg,model->MOS3theta); d_onfg.value += 1.0; fgate = 1.0/onfg; InvDeriv(&d_fgate,&d_onfg); us = here->MOS3tSurfMob * 1e-4 /*(m**2/cm**2)*/ *fgate; TimesDeriv(&d_us,&d_fgate,here->MOS3tSurfMob * 1e-4); /* *.....saturation voltage */ vdsat = (vgsx-vth)*onfbdy; TimesDeriv(&d_vdsat,&d_vth, -1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_vgsx); MultDeriv(&d_vdsat,&d_vdsat,&d_onfbdy); if ( model->MOS3maxDriftVel <= 0.0 ) { } else { vdsc = EffectiveLength*model->MOS3maxDriftVel/us; InvDeriv(&d_vdsc,&d_us); TimesDeriv(&d_vdsc,&d_vdsc,EffectiveLength*model->MOS3maxDriftVel); onvdsc = 1.0/vdsc; InvDeriv(&d_onvdsc,&d_vdsc); arga = (vgsx-vth)*onfbdy; /* note arga = vdsat at this point */ EqualDeriv(&d_arga,&d_vdsat); argb = sqrt(arga*arga+vdsc*vdsc); MultDeriv(&d_dummy,&d_arga,&d_arga); MultDeriv(&d_argb,&d_vdsc,&d_vdsc); PlusDeriv(&d_argb,&d_argb,&d_dummy); SqrtDeriv(&d_argb,&d_argb); vdsat = arga+vdsc-argb; TimesDeriv(&d_vdsat,&d_argb,-1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_vdsc); PlusDeriv(&d_vdsat,&d_vdsat,&d_arga); } /* *.....current factors in linear region */ vdsx = MIN((lvds),vdsat); if (lvds < vdsat) { EqualDeriv(&d_vdsx,&d_r); d_vdsx.value = lvds; } else { EqualDeriv(&d_vdsx,&d_vdsat); } if ( vdsx == 0.0 ) goto line900; cdo = vgsx-vth-0.5*(1.0+fbody)*vdsx; EqualDeriv(&d_cdo,&d_fbody); d_cdo.value += 1.0; MultDeriv(&d_cdo,&d_cdo,&d_vdsx); TimesDeriv(&d_cdo,&d_cdo,0.5); PlusDeriv(&d_cdo,&d_cdo,&d_vth); TimesDeriv(&d_cdo,&d_cdo,-1.0); PlusDeriv(&d_cdo,&d_cdo,&d_vgsx); /* *.....normalized drain current */ cdnorm = cdo*vdsx; MultDeriv(&d_cdnorm,&d_cdo,&d_vdsx); /* *.....drain current without velocity saturation effect */ /* Beta is a constant till now */ Beta = Beta*fgate; TimesDeriv(&d_Beta,&d_fgate,Beta); cdrain = Beta*cdnorm; MultDeriv(&d_cdrain,&d_Beta,&d_cdnorm); /* *.....velocity saturation factor */ if ( model->MOS3maxDriftVel != 0.0 ) { fdrain = 1.0/(1.0+vdsx*onvdsc); MultDeriv(&d_fdrain,&d_vdsx,&d_onvdsc); d_fdrain.value += 1.0; InvDeriv(&d_fdrain,&d_fdrain); /* *.....drain current */ cdrain = fdrain*cdrain; MultDeriv(&d_cdrain,&d_cdrain,&d_fdrain); Beta = Beta*fdrain; MultDeriv(&d_Beta,&d_Beta,&d_fdrain); } /* *.....channel length modulation */ if ( (lvds) <= vdsat ) goto line700; if ( model->MOS3maxDriftVel == 0.0 ) goto line510; if (model->MOS3alpha == 0.0) goto line700; cdsat = cdrain; EqualDeriv(&d_cdsat,&d_cdrain); gdsat = cdsat*(1.0-fdrain)*onvdsc; TimesDeriv(&d_dummy,&d_fdrain,-1.0); d_dummy.value += 1.0; MultDeriv(&d_gdsat,&d_cdsat,&d_dummy); MultDeriv(&d_gdsat,&d_gdsat,&d_onvdsc); gdsat = MAX(1.0e-12,gdsat); if (gdsat == 1.0e-12) { EqualDeriv(&d_gdsat,&d_zero); d_gdsat.value = gdsat; } emax = cdsat*oneoverxl/gdsat; DivDeriv(&d_emax,&d_cdsat,&d_gdsat); TimesDeriv(&d_emax,&d_emax,oneoverxl); arga = 0.5*emax*model->MOS3alpha; TimesDeriv(&d_arga,&d_emax,0.5*model->MOS3alpha); argc = model->MOS3kappa*model->MOS3alpha;/*const*/ argb = sqrt(arga*arga+argc*((lvds)-vdsat)); TimesDeriv(&d_dummy,&d_vdsat,-1.0); d_dummy.value += lvds; d_dummy.d1_r += 1.0; TimesDeriv(&d_argb,&d_dummy,argc); MultDeriv(&d_dummy,&d_arga,&d_arga); PlusDeriv(&d_argb,&d_argb,&d_dummy); SqrtDeriv(&d_argb,&d_argb); delxl = argb-arga; TimesDeriv(&d_delxl,&d_arga,-1.0); PlusDeriv(&d_delxl,&d_argb,&d_delxl); goto line520; line510: delxl = sqrt(model->MOS3kappa*((lvds)-vdsat)*model->MOS3alpha); TimesDeriv(&d_delxl,&d_vdsat,-1.0); d_delxl.value += lvds; d_delxl.d1_r += 1.0; TimesDeriv(&d_delxl,&d_delxl,model->MOS3kappa*model->MOS3alpha); SqrtDeriv(&d_delxl,&d_delxl); /* *.....punch through approximation */ line520: if ( delxl > (0.5*EffectiveLength) ) { delxl = EffectiveLength - (EffectiveLength*EffectiveLength/ delxl*0.25); InvDeriv(&d_delxl,&d_delxl); TimesDeriv(&d_delxl,&d_delxl,-EffectiveLength*EffectiveLength*0.25); d_delxl.value += EffectiveLength; } /* *.....saturation region */ dlonxl = delxl*oneoverxl; TimesDeriv(&d_dlonxl,&d_delxl,oneoverxl); xlfact = 1.0/(1.0-dlonxl); TimesDeriv(&d_xlfact,&d_dlonxl,-1.0); d_xlfact.value += 1.0; InvDeriv(&d_xlfact,&d_xlfact); cdrain = cdrain*xlfact; MultDeriv(&d_cdrain,&d_cdrain,&d_xlfact); /* *.....finish strong inversion case */ line700: if ( lvgs < von ) { /* *.....weak inversion */ onxn = 1.0/xn; InvDeriv(&d_onxn,&d_xn); ondvt = onxn/vt; TimesDeriv(&d_ondvt,&d_onxn,1/vt); wfact = exp( (lvgs-von)*ondvt ); TimesDeriv(&d_wfact,&d_von,-1.0); d_wfact.value += lvgs; d_wfact.d1_p += 1.0; MultDeriv(&d_wfact,&d_wfact,&d_ondvt); ExpDeriv(&d_wfact,&d_wfact); cdrain = cdrain*wfact; MultDeriv(&d_cdrain,&d_cdrain,&d_wfact); } /* *.....charge computation */ goto innerline1000; /* *.....special case of vds = 0.0d0 */ line900: Beta = Beta*fgate; /* Beta is still a constant */ TimesDeriv(&d_Beta,&d_fgate,Beta); cdrain = 0.0; EqualDeriv(&d_cdrain,&d_zero); here->MOS3gds = Beta*(vgsx-vth); TimesDeriv(&d_MOS3gds,&d_vth,-1.0); PlusDeriv(&d_MOS3gds,&d_MOS3gds,&d_vgsx); MultDeriv(&d_MOS3gds,&d_MOS3gds,&d_Beta); if ( (model->MOS3fastSurfaceStateDensity != 0.0) && (lvgs < von) ) { here->MOS3gds *=exp((lvgs-von)/(vt*xn)); TimesDeriv(&d_dummy,&d_von,-1.0); d_dummy.value += lvgs; d_dummy.d1_p += 1.0; DivDeriv(&d_dummy,&d_dummy,&d_xn); TimesDeriv(&d_dummy,&d_dummy,1/vt); ExpDeriv(&d_dummy,&d_dummy); MultDeriv(&d_MOS3gds,&d_MOS3gds,&d_dummy); } d_cdrain.d1_r = d_MOS3gds.value; d_cdrain.d2_r2 = d_MOS3gds.d1_r; d_cdrain.d3_r3 = d_MOS3gds.d2_r2; innerline1000:; /* *.....done */ } /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ if (vbs < here->MOS3tDepCap){ arg=1-vbs/here->MOS3tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS3bulkJctBotGradingCoeff == model->MOS3bulkJctSideGradingCoeff) { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } if(model->MOS3bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS3bulkJctSideGradingCoeff* log(arg)); } } lcapbs=here->MOS3Cbs*sarg+ here->MOS3Cbssw*sargsw; lcapbs2 = model->MOS3type*0.5/here->MOS3tBulkPot*( here->MOS3Cbs*model->MOS3bulkJctBotGradingCoeff* sarg/arg + here->MOS3Cbssw* model->MOS3bulkJctSideGradingCoeff*sargsw/arg); lcapbs3 = here->MOS3Cbs*sarg* model->MOS3bulkJctBotGradingCoeff* (model->MOS3bulkJctBotGradingCoeff+1); lcapbs3 += here->MOS3Cbssw*sargsw* model->MOS3bulkJctSideGradingCoeff* (model->MOS3bulkJctSideGradingCoeff+1); lcapbs3 = lcapbs3/(6*here->MOS3tBulkPot* here->MOS3tBulkPot*arg*arg); } else { /* *(ckt->CKTstate0 + here->MOS3qbs)= here->MOS3f4s + vbs*(here->MOS3f2s+vbs*(here->MOS3f3s/2));*/ lcapbs=here->MOS3f2s+here->MOS3f3s*vbs; lcapbs2 = 0.5*here->MOS3f3s; lcapbs3 = 0; } if (vbd < here->MOS3tDepCap) { arg=1-vbd/here->MOS3tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS3bulkJctBotGradingCoeff == .5 && model->MOS3bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS3bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS3bulkJctBotGradingCoeff* log(arg)); } if(model->MOS3bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS3bulkJctSideGradingCoeff* log(arg)); } } lcapbd=here->MOS3Cbd*sarg+ here->MOS3Cbdsw*sargsw; lcapbd2 = model->MOS3type*0.5/here->MOS3tBulkPot*( here->MOS3Cbd*model->MOS3bulkJctBotGradingCoeff* sarg/arg + here->MOS3Cbdsw* model->MOS3bulkJctSideGradingCoeff*sargsw/arg); lcapbd3 = here->MOS3Cbd*sarg* model->MOS3bulkJctBotGradingCoeff* (model->MOS3bulkJctBotGradingCoeff+1); lcapbd3 += here->MOS3Cbdsw*sargsw* model->MOS3bulkJctSideGradingCoeff* (model->MOS3bulkJctSideGradingCoeff+1); lcapbd3 = lcapbd3/(6*here->MOS3tBulkPot* here->MOS3tBulkPot*arg*arg); } else { lcapbd=here->MOS3f2d + vbd * here->MOS3f3d; lcapbd2=0.5*here->MOS3f3d; lcapbd3=0; } /* * meyer's capacitor model */ /* * the meyer capacitance equations are in DEVqmeyer * these expressions are derived from those equations. * these expressions are incorrect; they assume just one * controlling variable for each charge storage element * while actually there are several; the MOS3 small * signal ac linear model is also wrong because it * ignores controlled capacitive elements. these can be * corrected (as can the linear ss ac model) if the * expressions for the charge are available */ { double phi; double cox; double vddif; double vddif1; double vddif2; double vgst; /* von, lvgs and vdsat have already been adjusted for possible source-drain interchange */ vgst = lvgs -von; phi = here->MOS3tPhi; cox = OxideCap; if (vgst <= -phi) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= -phi/2) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= 0) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs3=lcapgd2=lcapgd3=0; lcapgs2 = cox/(3*phi); } else { /* the MOS3modes are around because vds has not been adjusted */ if (vdsat <= here->MOS3mode*vds) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else { vddif = 2.0*vdsat-here->MOS3mode*vds; vddif1 = vdsat-here->MOS3mode*vds/*-1.0e-12*/; vddif2 = vddif*vddif; lcapgd2 = -vdsat*here->MOS3mode*vds*cox/(3*vddif*vddif2); lcapgd3 = - here->MOS3mode*vds*cox*(vddif - 6*vdsat)/(9*vddif2*vddif2); lcapgs2 = -vddif1*here->MOS3mode*vds*cox/(3*vddif*vddif2); lcapgs3 = - here->MOS3mode*vds*cox*(vddif - 6*vddif1)/(9*vddif2*vddif2); lcapgb2=lcapgb3=0; } } } /* the b-s and b-d diodes need no processing ... */ here->capbs2 = lcapbs2; here->capbs3 = lcapbs3; here->capbd2 = lcapbd2; here->capbd3 = lcapbd3; here->gbs2 = lgbs2; here->gbs3 = lgbs3; here->gbd2 = lgbd2; here->gbd3 = lgbd3; here->capgb2 = model->MOS3type*lcapgb2; here->capgb3 = lcapgb3; /* * process to get Taylor coefficients, taking into * account type and mode. */ gm2 = d_cdrain.d2_p2; gb2 = d_cdrain.d2_q2; gds2 = d_cdrain.d2_r2; gmb = d_cdrain.d2_pq; gbds = d_cdrain.d2_qr; gmds = d_cdrain.d2_pr; gm3 = d_cdrain.d3_p3; gb3 = d_cdrain.d3_q3; gds3 = d_cdrain.d3_r3; gm2ds = d_cdrain.d3_p2r; gm2b = d_cdrain.d3_p2q; gb2ds = d_cdrain.d3_q2r; gmb2 = d_cdrain.d3_pq2; gmds2 = d_cdrain.d3_pr2; gbds2 = d_cdrain.d3_qr2; gmbds = d_cdrain.d3_pqr; if (here->MOS3mode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x2 = gm2; here->cdr_y2 = gb2;; here->cdr_z2 = gds2;; here->cdr_xy = gmb; here->cdr_yz = gbds; here->cdr_xz = gmds; here->cdr_x3 = gm3; here->cdr_y3 = gb3; here->cdr_z3 = gds3; here->cdr_x2z = gm2ds; here->cdr_x2y = gm2b; here->cdr_y2z = gb2ds; here->cdr_xy2 = gmb2; here->cdr_xz2 = gmds2; here->cdr_yz2 = gbds2; here->cdr_xyz = gmbds; /* the gate caps have been divided and made into Taylor coeffs., but not adjusted for type */ here->capgs2 = model->MOS3type*lcapgs2; here->capgs3 = lcapgs3; here->capgd2 = model->MOS3type*lcapgd2; here->capgd3 = lcapgd3; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x2 = -gm2; here->cdr_y2 = -gb2; here->cdr_z2 = -(gm2 + gb2 + gds2 + 2*(gmb + gmds + gbds)); here->cdr_xy = -gmb; here->cdr_yz = gmb + gb2 + gbds; here->cdr_xz = gm2 + gmb + gmds; here->cdr_x3 = -gm3; here->cdr_y3 = -gb3; here->cdr_z3 = gm3 + gb3 + gds3 + 3*(gm2b + gm2ds + gmb2 + gb2ds + gmds2 + gbds2) + 6*gmbds ; here->cdr_x2z = gm3 + gm2b + gm2ds; here->cdr_x2y = -gm2b; here->cdr_y2z = gmb2 + gb3 + gb2ds; here->cdr_xy2 = -gmb2; here->cdr_xz2 = -(gm3 + 2*(gm2b + gm2ds + gmbds) + gmb2 + gmds2); here->cdr_yz2 = -(gb3 + 2*(gmb2 + gb2ds + gmbds) + gm2b + gbds2); here->cdr_xyz = gm2b + gmb2 + gmbds; here->capgs2 = model->MOS3type*lcapgd2; here->capgs3 = lcapgd3; here->capgd2 = model->MOS3type*lcapgs2; here->capgd3 = lcapgs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->MOS3type*here->cdr_x2; here->cdr_y2 = 0.5*model->MOS3type*here->cdr_y2; here->cdr_z2 = 0.5*model->MOS3type*here->cdr_z2; here->cdr_xy = model->MOS3type*here->cdr_xy; here->cdr_yz = model->MOS3type*here->cdr_yz; here->cdr_xz = model->MOS3type*here->cdr_xz; here->cdr_x3 = here->cdr_x3/6.; here->cdr_y3 = here->cdr_y3/6.; here->cdr_z3 = here->cdr_z3/6.; here->cdr_x2z = 0.5*here->cdr_x2z; here->cdr_x2y = 0.5*here->cdr_x2y; here->cdr_y2z = 0.5*here->cdr_y2z; here->cdr_xy2 = 0.5*here->cdr_xy2; here->cdr_xz2 = 0.5*here->cdr_xz2; here->cdr_yz2 = 0.5*here->cdr_yz2; } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3.c0000644000265600020320000002342312264261473020146 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mos3defs.h" #include "ngspice/suffix.h" IFparm MOS3pTable[] = { /* parameters */ IOPU("m", MOS3_M, IF_REAL , "Multiplier"), IOPU("l", MOS3_L, IF_REAL , "Length"), IOPU("w", MOS3_W, IF_REAL , "Width"), IOPU("ad", MOS3_AD, IF_REAL , "Drain area"), IOPU("as", MOS3_AS, IF_REAL , "Source area"), IOPU("pd", MOS3_PD, IF_REAL , "Drain perimeter"), IOPU("ps", MOS3_PS, IF_REAL , "Source perimeter"), OP("id", MOS3_CD, IF_REAL, "Drain current"), OPR("cd", MOS3_CD, IF_REAL, "Drain current"), OPU("ibd", MOS3_CBD, IF_REAL, "B-D junction current"), OPU("ibs", MOS3_CBS, IF_REAL, "B-S junction current"), OPU("is", MOS3_CS, IF_REAL, "Source current"), OPU("ig", MOS3_CG, IF_REAL, "Gate current"), OPU("ib", MOS3_CB, IF_REAL, "Bulk current"), OP("vgs", MOS3_VGS, IF_REAL, "Gate-Source voltage"), OP("vds", MOS3_VDS, IF_REAL, "Drain-Source voltage"), OP("vbs", MOS3_VBS, IF_REAL, "Bulk-Source voltage"), OPU("vbd", MOS3_VBD, IF_REAL, "Bulk-Drain voltage"), IOPU("nrd", MOS3_NRD, IF_REAL , "Drain squares"), IOPU("nrs", MOS3_NRS, IF_REAL , "Source squares"), IP("off", MOS3_OFF, IF_FLAG , "Device initially off"), IOPAU("icvds", MOS3_IC_VDS, IF_REAL , "Initial D-S voltage"), IOPAU("icvgs", MOS3_IC_VGS, IF_REAL , "Initial G-S voltage"), IOPAU("icvbs", MOS3_IC_VBS, IF_REAL , "Initial B-S voltage"), IOPU("ic", MOS3_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"), IOPU("temp", MOS3_TEMP, IF_REAL , "Instance operating temperature"), IOPU("dtemp", MOS3_DTEMP, IF_REAL , "Instance temperature difference"), IP("sens_l", MOS3_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"), IP("sens_w", MOS3_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"), OPU("dnode", MOS3_DNODE, IF_INTEGER, "Number of drain node"), OPU("gnode", MOS3_GNODE, IF_INTEGER, "Number of gate node"), OPU("snode", MOS3_SNODE, IF_INTEGER, "Number of source node"), OPU("bnode", MOS3_BNODE, IF_INTEGER, "Number of bulk node"), OPU("dnodeprime", MOS3_DNODEPRIME,IF_INTEGER,"Number of internal drain node"), OPU("snodeprime", MOS3_SNODEPRIME,IF_INTEGER,"Number of internal source node"), OP("von", MOS3_VON, IF_REAL, "Turn-on voltage"), OP("vdsat", MOS3_VDSAT, IF_REAL, "Saturation drain voltage"), OPU("sourcevcrit", MOS3_SOURCEVCRIT, IF_REAL, "Critical source voltage"), OPU("drainvcrit", MOS3_DRAINVCRIT, IF_REAL, "Critical drain voltage"), OP("rs", MOS3_SOURCERESIST, IF_REAL, "Source resistance"), OPU("sourceconductance", MOS3_SOURCECONDUCT, IF_REAL, "Source conductance"), OP("rd", MOS3_DRAINRESIST, IF_REAL, "Drain resistance"), OPU("drainconductance", MOS3_DRAINCONDUCT, IF_REAL, "Drain conductance"), OP("gm", MOS3_GM, IF_REAL, "Transconductance"), OP("gds", MOS3_GDS, IF_REAL, "Drain-Source conductance"), OP("gmb", MOS3_GMBS, IF_REAL, "Bulk-Source transconductance"), OPR("gmbs", MOS3_GMBS, IF_REAL, "Bulk-Source transconductance"), OPU("gbd", MOS3_GBD, IF_REAL, "Bulk-Drain conductance"), OPU("gbs", MOS3_GBS, IF_REAL, "Bulk-Source conductance"), OP("cbd", MOS3_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP("cbs", MOS3_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP("cgs", MOS3_CAPGS, IF_REAL, "Gate-Source capacitance"), /* OPR("cgs", MOS3_CGS, IF_REAL , "Gate-Source capacitance"),*/ OP("cgd", MOS3_CAPGD, IF_REAL, "Gate-Drain capacitance"), /* OPR("cgd", MOS3_CGD, IF_REAL , "Gate-Drain capacitance"),*/ OP("cgb", MOS3_CAPGB, IF_REAL, "Gate-Bulk capacitance"), OPU("cqgs",MOS3_CQGS,IF_REAL,"Capacitance due to gate-source charge storage"), OPU("cqgd",MOS3_CQGD, IF_REAL,"Capacitance due to gate-drain charge storage"), OPU("cqgb",MOS3_CQGB, IF_REAL,"Capacitance due to gate-bulk charge storage"), OPU("cqbd",MOS3_CQBD,IF_REAL,"Capacitance due to bulk-drain charge storage"), OPU("cqbs",MOS3_CQBS,IF_REAL,"Capacitance due to bulk-source charge storage"), OPU("cbd0",MOS3_CAPZEROBIASBD,IF_REAL,"Zero-Bias B-D junction capacitance"), OPU("cbdsw0",MOS3_CAPZEROBIASBDSW,IF_REAL, "Zero-Bias B-D sidewall capacitance"), OPU("cbs0",MOS3_CAPZEROBIASBS,IF_REAL,"Zero-Bias B-S junction capacitance"), OPU("cbssw0",MOS3_CAPZEROBIASBSSW,IF_REAL, "Zero-Bias B-S sidewall capacitance"), OPU("qbs", MOS3_QBS, IF_REAL, "Bulk-Source charge storage"), OPU("qgs", MOS3_QGS, IF_REAL, "Gate-Source charge storage"), OPU("qgd", MOS3_QGD, IF_REAL, "Gate-Drain charge storage"), OPU("qgb", MOS3_QGB, IF_REAL, "Gate-Bulk charge storage"), OPU("qbd", MOS3_QBD, IF_REAL, "Bulk-Drain charge storage"), OPU("p", MOS3_POWER, IF_REAL, "Instantaneous power"), OPU("sens_l_dc", MOS3_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OPU("sens_l_real",MOS3_L_SENS_REAL, IF_REAL, "real part of ac sensitivity wrt length"), OPU("sens_l_imag",MOS3_L_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt length"), OPU("sens_l_cplx",MOS3_L_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt length"), OPU("sens_l_mag", MOS3_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OPU("sens_l_ph", MOS3_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OPU("sens_w_dc", MOS3_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OPU("sens_w_real",MOS3_W_SENS_REAL, IF_REAL, "real part of ac sensitivity wrt width"), OPU("sens_w_imag",MOS3_W_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt width"), OPU("sens_w_mag", MOS3_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OPU("sens_w_ph", MOS3_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OPU("sens_w_cplx",MOS3_W_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt width") }; IFparm MOS3mPTable[] = { /* model parameters */ OP("type", MOS3_MOD_TYPE, IF_STRING ,"N-channel or P-channel MOS"), IP("nmos", MOS3_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS3_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), IOP("vto", MOS3_MOD_VTO, IF_REAL ,"Threshold voltage"), IOPR("vt0", MOS3_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("kp", MOS3_MOD_KP, IF_REAL ,"Transconductance parameter"), IOP("gamma", MOS3_MOD_GAMMA, IF_REAL ,"Bulk threshold parameter"), IOP("phi", MOS3_MOD_PHI, IF_REAL ,"Surface potential"), IOP("rd", MOS3_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", MOS3_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOPA("cbd", MOS3_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOPA("cbs", MOS3_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", MOS3_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("pb", MOS3_MOD_PB, IF_REAL ,"Bulk junction potential"), IOPA("cgso", MOS3_MOD_CGSO, IF_REAL ,"Gate-source overlap cap."), IOPA("cgdo", MOS3_MOD_CGDO, IF_REAL ,"Gate-drain overlap cap."), IOPA("cgbo", MOS3_MOD_CGBO, IF_REAL ,"Gate-bulk overlap cap."), IOP("rsh", MOS3_MOD_RSH, IF_REAL ,"Sheet resistance"), IOPA("cj", MOS3_MOD_CJ, IF_REAL ,"Bottom junction cap per area"), IOP("mj", MOS3_MOD_MJ, IF_REAL ,"Bottom grading coefficient"), IOPA("cjsw", MOS3_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mjsw", MOS3_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOPU("js", MOS3_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("tox", MOS3_MOD_TOX, IF_REAL ,"Oxide thickness"), IOP("ld", MOS3_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("xl", MOS3_MOD_XL, IF_REAL ,"Length mask adjustment"), IOP("wd", MOS3_MOD_WD, IF_REAL ,"Width Narrowing (Diffusion)"), IOP("xw", MOS3_MOD_XW, IF_REAL ,"Width mask adjustment"), IOPU("delvto", MOS3_MOD_DELVTO, IF_REAL ,"Threshold voltage Adjust"), IOPR("delvt0", MOS3_MOD_DELVTO, IF_REAL ,"Threshold voltage Adjust"), IOP("u0", MOS3_MOD_U0, IF_REAL ,"Surface mobility"), IOPR("uo", MOS3_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", MOS3_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IOP("nsub", MOS3_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("tpg", MOS3_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nss", MOS3_MOD_NSS, IF_REAL ,"Surface state density"), IOP("vmax", MOS3_MOD_VMAX, IF_REAL ,"Maximum carrier drift velocity"), IOP("xj", MOS3_MOD_XJ, IF_REAL ,"Junction depth"), IOP("nfs", MOS3_MOD_NFS, IF_REAL ,"Fast surface state density"), IOP("xd", MOS3_MOD_XD, IF_REAL ,"Depletion layer width"), IOP("alpha", MOS3_MOD_ALPHA, IF_REAL ,"Alpha"), IOP("eta", MOS3_MOD_ETA, IF_REAL ,"Vds dependence of threshold voltage"), IOP("delta", MOS3_MOD_DELTA, IF_REAL ,"Width effect on threshold"), IOPR("input_delta", MOS3_DELTA, IF_REAL ,""), IOP("theta", MOS3_MOD_THETA, IF_REAL ,"Vgs dependence on mobility"), IOP("kappa", MOS3_MOD_KAPPA, IF_REAL ,"Kappa"), IOPU("tnom", MOS3_MOD_TNOM, IF_REAL ,"Parameter measurement temperature"), IOP("kf", MOS3_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", MOS3_MOD_AF, IF_REAL ,"Flicker noise exponent") }; char *MOS3names[] = { "Drain", "Gate", "Source", "Bulk" }; int MOS3nSize = NUMELEMS(MOS3names); int MOS3pTSize = NUMELEMS(MOS3pTable); int MOS3mPTSize = NUMELEMS(MOS3mPTable); int MOS3iSize = sizeof(MOS3instance); int MOS3mSize = sizeof(MOS3model); ngspice-26/src/spicelib/devices/mos3/Makefile.am0000644000265600020320000000115512264261473021153 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmos3.la libmos3_la_SOURCES = \ mos3.c \ mos3acld.c \ mos3ask.c \ mos3conv.c \ mos3defs.h \ mos3del.c \ mos3dest.c \ mos3dist.c \ mos3dset.c \ mos3ext.h \ mos3ic.c \ mos3init.c \ mos3init.h \ mos3itf.h \ mos3load.c \ mos3mask.c \ mos3mdel.c \ mos3mpar.c \ mos3noi.c \ mos3par.c \ mos3pzld.c \ mos3sacl.c \ mos3set.c \ mos3sld.c \ mos3sprt.c \ mos3sset.c \ mos3supd.c \ mos3temp.c \ mos3trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mos3/Makefile.in0000644000265600020320000004434512264261537021175 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mos3 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmos3_la_LIBADD = am_libmos3_la_OBJECTS = mos3.lo mos3acld.lo mos3ask.lo mos3conv.lo \ mos3del.lo mos3dest.lo mos3dist.lo mos3dset.lo mos3ic.lo \ mos3init.lo mos3load.lo mos3mask.lo mos3mdel.lo mos3mpar.lo \ mos3noi.lo mos3par.lo mos3pzld.lo mos3sacl.lo mos3set.lo \ mos3sld.lo mos3sprt.lo mos3sset.lo mos3supd.lo mos3temp.lo \ mos3trun.lo libmos3_la_OBJECTS = $(am_libmos3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmos3_la_SOURCES) DIST_SOURCES = $(libmos3_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmos3.la libmos3_la_SOURCES = \ mos3.c \ mos3acld.c \ mos3ask.c \ mos3conv.c \ mos3defs.h \ mos3del.c \ mos3dest.c \ mos3dist.c \ mos3dset.c \ mos3ext.h \ mos3ic.c \ mos3init.c \ mos3init.h \ mos3itf.h \ mos3load.c \ mos3mask.c \ mos3mdel.c \ mos3mpar.c \ mos3noi.c \ mos3par.c \ mos3pzld.c \ mos3sacl.c \ mos3set.c \ mos3sld.c \ mos3sprt.c \ mos3sset.c \ mos3supd.c \ mos3temp.c \ mos3trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mos3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mos3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmos3.la: $(libmos3_la_OBJECTS) $(libmos3_la_DEPENDENCIES) $(EXTRA_libmos3_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmos3_la_OBJECTS) $(libmos3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3dset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3sacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3sld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3sprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3sset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3supd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos3trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mos3/mos3par.c0000644000265600020320000000711012264261473020644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* ARGSUSED */ int MOS3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; MOS3instance *here = (MOS3instance *)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case MOS3_M: here->MOS3m = value->rValue; here->MOS3mGiven = TRUE; break; case MOS3_W: here->MOS3w = value->rValue * scale; here->MOS3wGiven = TRUE; break; case MOS3_L: here->MOS3l = value->rValue * scale; here->MOS3lGiven = TRUE; break; case MOS3_AS: here->MOS3sourceArea = value->rValue * scale * scale; here->MOS3sourceAreaGiven = TRUE; break; case MOS3_AD: here->MOS3drainArea = value->rValue * scale * scale; here->MOS3drainAreaGiven = TRUE; break; case MOS3_PS: here->MOS3sourcePerimiter = value->rValue * scale; here->MOS3sourcePerimiterGiven = TRUE; break; case MOS3_PD: here->MOS3drainPerimiter = value->rValue * scale; here->MOS3drainPerimiterGiven = TRUE; break; case MOS3_NRS: here->MOS3sourceSquares = value->rValue; here->MOS3sourceSquaresGiven = TRUE; break; case MOS3_NRD: here->MOS3drainSquares = value->rValue; here->MOS3drainSquaresGiven = TRUE; break; case MOS3_OFF: here->MOS3off = (value->iValue != 0); break; case MOS3_IC_VBS: here->MOS3icVBS = value->rValue; here->MOS3icVBSGiven = TRUE; break; case MOS3_IC_VDS: here->MOS3icVDS = value->rValue; here->MOS3icVDSGiven = TRUE; break; case MOS3_IC_VGS: here->MOS3icVGS = value->rValue; here->MOS3icVGSGiven = TRUE; break; case MOS3_TEMP: here->MOS3temp = value->rValue+CONSTCtoK; here->MOS3tempGiven = TRUE; break; case MOS3_DTEMP: here->MOS3dtemp = value->rValue; here->MOS3dtempGiven = TRUE; break; case MOS3_IC: switch(value->v.numValue){ case 3: here->MOS3icVBS = *(value->v.vec.rVec+2); here->MOS3icVBSGiven = TRUE; case 2: here->MOS3icVGS = *(value->v.vec.rVec+1); here->MOS3icVGSGiven = TRUE; case 1: here->MOS3icVDS = *(value->v.vec.rVec); here->MOS3icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MOS3_L_SENS: if(value->iValue) { here->MOS3senParmNo = 1; here->MOS3sens_l = 1; } break; case MOS3_W_SENS: if(value->iValue) { here->MOS3senParmNo = 1; here->MOS3sens_w = 1; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3mask.c0000644000265600020320000001216612264261473021024 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS3mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { MOS3model *here = (MOS3model *)inst; NG_IGNORE(ckt); switch(which) { case MOS3_MOD_TNOM: value->rValue = here->MOS3tnom-CONSTCtoK; return(OK); case MOS3_MOD_VTO: value->rValue = here->MOS3vt0; return(OK); case MOS3_MOD_KP: value->rValue = here->MOS3transconductance; return(OK); case MOS3_MOD_GAMMA: value->rValue = here->MOS3gamma; return(OK); case MOS3_MOD_PHI: value->rValue = here->MOS3phi; return(OK); case MOS3_MOD_RD: value->rValue = here->MOS3drainResistance; return(OK); case MOS3_MOD_RS: value->rValue = here->MOS3sourceResistance; return(OK); case MOS3_MOD_CBD: value->rValue = here->MOS3capBD; return(OK); case MOS3_MOD_CBS: value->rValue = here->MOS3capBS; return(OK); case MOS3_MOD_IS: value->rValue = here->MOS3jctSatCur; return(OK); case MOS3_MOD_PB: value->rValue = here->MOS3bulkJctPotential; return(OK); case MOS3_MOD_CGSO: value->rValue = here->MOS3gateSourceOverlapCapFactor; return(OK); case MOS3_MOD_CGDO: value->rValue = here->MOS3gateDrainOverlapCapFactor; return(OK); case MOS3_MOD_CGBO: value->rValue = here->MOS3gateBulkOverlapCapFactor; return(OK); case MOS3_MOD_CJ: value->rValue = here->MOS3bulkCapFactor; return(OK); case MOS3_MOD_MJ: value->rValue = here->MOS3bulkJctBotGradingCoeff; return(OK); case MOS3_MOD_CJSW: value->rValue = here->MOS3sideWallCapFactor; return(OK); case MOS3_MOD_MJSW: value->rValue = here->MOS3bulkJctSideGradingCoeff; return(OK); case MOS3_MOD_JS: value->rValue = here->MOS3jctSatCurDensity; return(OK); case MOS3_MOD_TOX: value->rValue = here->MOS3oxideThickness; return(OK); case MOS3_MOD_LD: value->rValue = here->MOS3latDiff; return(OK); case MOS3_MOD_XL: value->rValue = here->MOS3lengthAdjust; return(OK); case MOS3_MOD_WD: value->rValue = here->MOS3widthNarrow; return(OK); case MOS3_MOD_XW: value->rValue = here->MOS3widthAdjust; return(OK); case MOS3_MOD_DELVTO: value->rValue = here->MOS3delvt0; return(OK); case MOS3_MOD_RSH: value->rValue = here->MOS3sheetResistance; return(OK); case MOS3_MOD_U0: value->rValue = here->MOS3surfaceMobility; return(OK); case MOS3_MOD_FC: value->rValue = here->MOS3fwdCapDepCoeff; return(OK); case MOS3_MOD_NSUB: value->rValue = here->MOS3substrateDoping; return(OK); case MOS3_MOD_TPG: value->iValue = here->MOS3gateType; return(OK); case MOS3_MOD_NSS: value->rValue = here->MOS3surfaceStateDensity; return(OK); case MOS3_MOD_NFS: value->rValue = here->MOS3fastSurfaceStateDensity; return(OK); case MOS3_MOD_DELTA: value->rValue = here->MOS3narrowFactor; return(OK); case MOS3_MOD_VMAX: value->rValue = here->MOS3maxDriftVel; return(OK); case MOS3_MOD_XJ: value->rValue = here->MOS3junctionDepth; return(OK); case MOS3_MOD_ETA: value->rValue = here->MOS3eta; return(OK); case MOS3_MOD_XD: value->rValue = here->MOS3coeffDepLayWidth; return(OK); case MOS3_DELTA: value->rValue = here->MOS3delta; return(OK); case MOS3_MOD_THETA: value->rValue = here->MOS3theta; return(OK); case MOS3_MOD_ALPHA: value->rValue = here->MOS3alpha; return(OK); case MOS3_MOD_KAPPA: value->rValue = here->MOS3kappa; return(OK); case MOS3_MOD_KF: value->rValue = here->MOS3fNcoef; return(OK); case MOS3_MOD_AF: value->rValue = here->MOS3fNexp; return(OK); case MOS3_MOD_TYPE: if (here->MOS3type > 0) value->sValue = "nmos"; else value->sValue = "pmos"; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos3/mos3del.c0000644000265600020320000000155712264261473020637 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3delete(GENmodel *inModel, IFuid name, GENinstance **inst) { MOS3model *model = (MOS3model *)inModel; MOS3instance **fast = (MOS3instance **)inst; MOS3instance **prev = NULL; MOS3instance *here; for( ; model ; model = model->MOS3nextModel) { prev = &(model->MOS3instances); for(here = *prev; here ; here = *prev) { if(here->MOS3name == name || (fast && here==*fast) ) { *prev= here->MOS3nextInstance; FREE(here); return(OK); } prev = &(here->MOS3nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mos3/mos3ic.c0000644000265600020320000000245312264261473020462 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3getic(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MOS3nextModel) { for(here = model->MOS3instances; here ; here = here->MOS3nextInstance) { if(!here->MOS3icVBSGiven) { here->MOS3icVBS = *(ckt->CKTrhs + here->MOS3bNode) - *(ckt->CKTrhs + here->MOS3sNode); } if(!here->MOS3icVDSGiven) { here->MOS3icVDS = *(ckt->CKTrhs + here->MOS3dNode) - *(ckt->CKTrhs + here->MOS3sNode); } if(!here->MOS3icVGSGiven) { here->MOS3icVGS = *(ckt->CKTrhs + here->MOS3gNode) - *(ckt->CKTrhs + here->MOS3sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3init.h0000644000265600020320000000037012264261473021033 0ustar andreasadmin#ifndef _MOS3INIT_H #define _MOS3INIT_H extern IFparm MOS3pTable[ ]; extern IFparm MOS3mPTable[ ]; extern char *MOS3names[ ]; extern int MOS3pTSize; extern int MOS3mPTSize; extern int MOS3nSize; extern int MOS3iSize; extern int MOS3mSize; #endif ngspice-26/src/spicelib/devices/mos3/mos3sacl.c0000644000265600020320000007435412264261473021022 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3sAcLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; int xnrm; int xrev; double A0; double Apert = 0.0; double DELA; double DELAinv; double gdpr0; double gspr0; double gds0; double gbs0; double gbd0; double gm0; double gmbs0; double gdpr; double gspr; double gds; double gbs; double gbd; double gm; double gmbs; double xcgs0; double xcgd0; double xcgb0; double xbd0; double xbs0; double xcgs; double xcgd; double xcgb; double xbd; double xbs; double vbsOp; double vbdOp; double vspr; double vdpr; double vgs; double vgd; double vgb; double vbs; double vbd; double vds; double ivspr; double ivdpr; double ivgs; double ivgd; double ivgb; double ivbs; double ivbd; double ivds; double cspr; double cdpr; double cgs; double cgd; double cgb; double cbs; double cbd; double cds; double cs0; double csprm0; double cd0; double cdprm0; double cg0; double cb0; double cs; double csprm; double cd; double cdprm; double cg; double cb; double icspr; double icdpr; double icgs; double icgd; double icgb; double icbs; double icbd; double icds; double ics0; double icsprm0; double icd0; double icdprm0; double icg0; double icb0; double ics; double icsprm; double icd; double icdprm; double icg; double icb; double DvDp = 0.0; int i; int flag; int error; int iparmno; double arg; double sarg; double sargsw; double SaveState[44]; int save_mode; SENstruct *info; #ifdef SENSDEBUG printf("MOS3senacload\n"); printf("CKTomega = %.5e\n",ckt->CKTomega); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; for( ; model != NULL; model = model->MOS3nextModel) { for(here = model->MOS3instances; here!= NULL; here = here->MOS3nextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++) *(SaveState + i) = *(ckt->CKTstate0 + here->MOS3states + i); *(SaveState + 17) = here->MOS3sourceConductance; *(SaveState + 18) = here->MOS3drainConductance; *(SaveState + 19) = here->MOS3cd; *(SaveState + 20) = here->MOS3cbs; *(SaveState + 21) = here->MOS3cbd; *(SaveState + 22) = here->MOS3gmbs; *(SaveState + 23) = here->MOS3gm; *(SaveState + 24) = here->MOS3gds; *(SaveState + 25) = here->MOS3gbd; *(SaveState + 26) = here->MOS3gbs; *(SaveState + 27) = here->MOS3capbd; *(SaveState + 28) = here->MOS3capbs; *(SaveState + 29) = here->MOS3Cbd; *(SaveState + 30) = here->MOS3Cbdsw; *(SaveState + 31) = here->MOS3Cbs; *(SaveState + 32) = here->MOS3Cbssw; *(SaveState + 33) = here->MOS3f2d; *(SaveState + 34) = here->MOS3f3d; *(SaveState + 35) = here->MOS3f4d; *(SaveState + 36) = here->MOS3f2s; *(SaveState + 37) = here->MOS3f3s; *(SaveState + 38) = here->MOS3f4s; *(SaveState + 39) = here->MOS3cgs; *(SaveState + 40) = here->MOS3cgd; *(SaveState + 41) = here->MOS3cgb; *(SaveState + 42) = here->MOS3vdsat; *(SaveState + 43) = here->MOS3von; save_mode = here->MOS3mode; xnrm=1; xrev=0; if (here->MOS3mode < 0) { xnrm=0; xrev=1; } vbsOp = model->MOS3type * ( *(ckt->CKTrhsOp+here->MOS3bNode) - *(ckt->CKTrhsOp+here->MOS3sNodePrime)); vbdOp = model->MOS3type * ( *(ckt->CKTrhsOp+here->MOS3bNode) - *(ckt->CKTrhsOp+here->MOS3dNodePrime)); vspr = *(ckt->CKTrhsOld + here->MOS3sNode) - *(ckt->CKTrhsOld + here->MOS3sNodePrime) ; ivspr = *(ckt->CKTirhsOld + here->MOS3sNode) - *(ckt->CKTirhsOld + here->MOS3sNodePrime) ; vdpr = *(ckt->CKTrhsOld + here->MOS3dNode) - *(ckt->CKTrhsOld + here->MOS3dNodePrime) ; ivdpr = *(ckt->CKTirhsOld + here->MOS3dNode) - *(ckt->CKTirhsOld + here->MOS3dNodePrime) ; vgb = *(ckt->CKTrhsOld + here->MOS3gNode) - *(ckt->CKTrhsOld + here->MOS3bNode) ; ivgb = *(ckt->CKTirhsOld + here->MOS3gNode) - *(ckt->CKTirhsOld + here->MOS3bNode) ; vbs = *(ckt->CKTrhsOld + here->MOS3bNode) - *(ckt->CKTrhsOld + here->MOS3sNodePrime) ; ivbs = *(ckt->CKTirhsOld + here->MOS3bNode) - *(ckt->CKTirhsOld + here->MOS3sNodePrime) ; vbd = *(ckt->CKTrhsOld + here->MOS3bNode) - *(ckt->CKTrhsOld + here->MOS3dNodePrime) ; ivbd = *(ckt->CKTirhsOld + here->MOS3bNode) - *(ckt->CKTirhsOld + here->MOS3dNodePrime) ; vds = vbs - vbd ; ivds = ivbs - ivbd ; vgs = vgb + vbs ; ivgs = ivgb + ivbs ; vgd = vgb + vbd ; ivgd = ivgb + ivbd ; #ifdef SENSDEBUG printf("senacload instance name %s\n",here->MOS3name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS3gNode,here->MOS3dNode,here->MOS3dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS3sNode ,here->MOS3sNodePrime, here->MOS3bNode,here->MOS3senParmNo); printf("\n without perturbation \n"); #endif /* SENSDEBUG */ /* without perturbation */ *(ckt->CKTstate0 + here->MOS3vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS3vbd) = vbdOp; here->MOS3senPertFlag = ON ; if(info->SENacpertflag == 1){ /* store the unperturbed values of small signal parameters */ if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs) = here->MOS3cgs; *(here->MOS3senCgd) = here->MOS3cgd; *(here->MOS3senCgb) = here->MOS3cgb; *(here->MOS3senCbd) = here->MOS3capbd; *(here->MOS3senCbs) = here->MOS3capbs; *(here->MOS3senGds) = here->MOS3gds; *(here->MOS3senGbs) = here->MOS3gbs; *(here->MOS3senGbd) = here->MOS3gbd; *(here->MOS3senGm) = here->MOS3gm; *(here->MOS3senGmbs) = here->MOS3gmbs; } xcgs0= *(here->MOS3senCgs) * ckt->CKTomega; xcgd0= *(here->MOS3senCgd) * ckt->CKTomega; xcgb0= *(here->MOS3senCgb) * ckt->CKTomega; xbd0= *(here->MOS3senCbd) * ckt->CKTomega; xbs0= *(here->MOS3senCbs) * ckt->CKTomega; gds0= *(here->MOS3senGds); gbs0= *(here->MOS3senGbs); gbd0= *(here->MOS3senGbd); gm0= *(here->MOS3senGm); gmbs0= *(here->MOS3senGmbs); gdpr0 = here->MOS3drainConductance; gspr0 = here->MOS3sourceConductance; cspr = gspr0 * vspr ; icspr = gspr0 * ivspr ; cdpr = gdpr0 * vdpr ; icdpr = gdpr0 * ivdpr ; cgs = ( - xcgs0 * ivgs ); icgs = xcgs0 * vgs ; cgd = ( - xcgd0 * ivgd ); icgd = xcgd0 * vgd ; cgb = ( - xcgb0 * ivgb ); icgb = xcgb0 * vgb ; cbs = ( gbs0 * vbs - xbs0 * ivbs ); icbs = ( xbs0 * vbs + gbs0 * ivbs ); cbd = ( gbd0 * vbd - xbd0 * ivbd ); icbd = ( xbd0 * vbd + gbd0 * ivbd ); cds = ( gds0 * vds + xnrm * (gm0 * vgs + gmbs0 * vbs) - xrev * (gm0 * vgd + gmbs0 * vbd) ); icds = ( gds0 * ivds + xnrm * (gm0 * ivgs + gmbs0 * ivbs) - xrev * (gm0 * ivgd + gmbs0 * ivbd) ); cs0 = cspr; ics0 = icspr; csprm0 = ( -cspr - cgs - cbs - cds ) ; icsprm0 = ( -icspr - icgs - icbs - icds ) ; cd0 = cdpr; icd0 = icdpr; cdprm0 = ( -cdpr - cgd - cbd + cds ) ; icdprm0 = ( -icdpr - icgd - icbd + icds ) ; cg0 = cgs + cgd + cgb ; icg0 = icgs + icgd + icgb ; cb0 = cbs + cbd - cgb ; icb0 = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("gspr0 = %.7e , gdpr0 = %.7e , gds0 = %.7e, gbs0 = %.7e\n", gspr0,gdpr0,gds0,gbs0); printf("gbd0 = %.7e , gm0 = %.7e , gmbs0 = %.7e\n",gbd0,gm0,gmbs0); printf("xcgs0 = %.7e , xcgd0 = %.7e ,", xcgs0,xcgd0); printf("xcgb0 = %.7e, xbd0 = %.7e,xbs0 = %.7e\n" ,xcgb0,xbd0,xbs0); printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs0 = %.7e , cbd0 = %.7e , cgb0 = %.7e\n",cbs,cbd,cgb); printf("cb0 = %.7e , cg0 = %.7e , cs0 = %.7e\n",cb0,cg0,cs0); printf("csprm0 = %.7e, cd0 = %.7e, cdprm0 = %.7e\n", csprm0,cd0,cdprm0); printf("icb0 = %.7e , icg0 = %.7e , ics0 = %.7e\n",icb0,icg0,ics0); printf("icsprm0 = %.7e, icd0 = %.7e, icdprm0 = %.7e\n", icsprm0,icd0,icdprm0); printf("\nPerturbation of vbs\n"); #endif /* SENSDEBUG */ /* Perturbation of vbs */ flag = 1; A0 = vbsOp; DELA = info->SENpertfac * CONSTvt0 ; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbs */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS3vbs) = Apert; *(ckt->CKTstate0 + here->MOS3vbd) = vbdOp; if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs + 1) = here->MOS3cgs; *(here->MOS3senCgd + 1) = here->MOS3cgd; *(here->MOS3senCgb + 1) = here->MOS3cgb; *(here->MOS3senCbd + 1) = here->MOS3capbd; *(here->MOS3senCbs + 1) = here->MOS3capbs; *(here->MOS3senGds + 1) = here->MOS3gds; *(here->MOS3senGbs + 1) = here->MOS3gbs; *(here->MOS3senGbd + 1) = here->MOS3gbd; *(here->MOS3senGm + 1) = here->MOS3gm; *(here->MOS3senGmbs + 1) = here->MOS3gmbs; *(ckt->CKTstate0 + here->MOS3vbs) = A0; } goto load; pertvbd: /* Perturbation of vbd */ #ifdef SENSDEBUG printf("\nPerturbation of vbd\n"); #endif /* SENSDEBUG */ flag = 2; A0 = vbdOp; DELA = info->SENpertfac * CONSTvt0 + 1e-8; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbd */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS3vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS3vbd) = Apert; if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs + 2) = here->MOS3cgs; *(here->MOS3senCgd + 2) = here->MOS3cgd; *(here->MOS3senCgb + 2) = here->MOS3cgb; *(here->MOS3senCbd + 2) = here->MOS3capbd; *(here->MOS3senCbs + 2) = here->MOS3capbs; *(here->MOS3senGds + 2) = here->MOS3gds; *(here->MOS3senGbs + 2) = here->MOS3gbs; *(here->MOS3senGbd + 2) = here->MOS3gbd; *(here->MOS3senGm + 2) = here->MOS3gm; *(here->MOS3senGmbs + 2) = here->MOS3gmbs; *(ckt->CKTstate0 + here->MOS3vbd) = A0; } goto load; pertvgb: /* Perturbation of vgb */ #ifdef SENSDEBUG printf("\nPerturbation of vgb\n"); #endif /* SENSDEBUG */ flag = 3; A0 = model->MOS3type * (*(ckt->CKTrhsOp + here->MOS3gNode) - *(ckt->CKTrhsOp + here->MOS3bNode)); DELA = info->SENpertfac * A0 + 1e-8; DELAinv = model->MOS3type * 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vgb */ *(ckt->CKTstate0 + here->MOS3vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS3vbd) = vbdOp; *(ckt->CKTrhsOp + here->MOS3bNode) -= DELA; if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs + 3) = here->MOS3cgs; *(here->MOS3senCgd + 3) = here->MOS3cgd; *(here->MOS3senCgb + 3) = here->MOS3cgb; *(here->MOS3senCbd + 3) = here->MOS3capbd; *(here->MOS3senCbs + 3) = here->MOS3capbs; *(here->MOS3senGds + 3) = here->MOS3gds; *(here->MOS3senGbs + 3) = here->MOS3gbs; *(here->MOS3senGbd + 3) = here->MOS3gbd; *(here->MOS3senGm + 3) = here->MOS3gm; *(here->MOS3senGmbs + 3) = here->MOS3gmbs; *(ckt->CKTrhsOp + here->MOS3bNode) += DELA; } goto load; pertl: /* Perturbation of length */ if(here->MOS3sens_l == 0){ goto pertw; } #ifdef SENSDEBUG printf("\nPerturbation of length\n"); #endif /* SENSDEBUG */ flag = 4; A0 = here->MOS3l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed length */ Apert = A0 + DELA; here->MOS3l = Apert; *(ckt->CKTstate0 + here->MOS3vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS3vbd) = vbdOp; if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs + 4) = here->MOS3cgs; *(here->MOS3senCgd + 4) = here->MOS3cgd; *(here->MOS3senCgb + 4) = here->MOS3cgb; *(here->MOS3senCbd + 4) = here->MOS3capbd; *(here->MOS3senCbs + 4) = here->MOS3capbs; *(here->MOS3senGds + 4) = here->MOS3gds; *(here->MOS3senGbs + 4) = here->MOS3gbs; *(here->MOS3senGbd + 4) = here->MOS3gbd; *(here->MOS3senGm + 4) = here->MOS3gm; *(here->MOS3senGmbs + 4) = here->MOS3gmbs; here->MOS3l = A0; } goto load; pertw: /* Perturbation of width */ if(here->MOS3sens_w == 0) goto next; #ifdef SENSDEBUG printf("\nPerturbation of width\n"); #endif /* SENSDEBUG */ flag = 5; A0 = here->MOS3w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed width */ here->MOS3w = Apert; here->MOS3drainArea *= (1 + info->SENpertfac); here->MOS3sourceArea *= (1 + info->SENpertfac); here->MOS3Cbd *= (1 + info->SENpertfac); here->MOS3Cbs *= (1 + info->SENpertfac); if(here->MOS3drainPerimiter){ here->MOS3Cbdsw += here->MOS3Cbdsw * DELA/here->MOS3drainPerimiter; } if(here->MOS3sourcePerimiter){ here->MOS3Cbssw += here->MOS3Cbssw * DELA/here->MOS3sourcePerimiter; } if(vbdOp >= here->MOS3tDepCap){ arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3f2d = here->MOS3Cbd*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + here->MOS3Cbdsw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3d = here->MOS3Cbd * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ model->MOS3bulkJctPotential + here->MOS3Cbdsw * model->MOS3bulkJctSideGradingCoeff * sargsw/arg / model->MOS3bulkJctPotential; here->MOS3f4d = here->MOS3Cbd*model->MOS3bulkJctPotential* (1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + here->MOS3Cbdsw*model->MOS3bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3d/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2d; } if(vbsOp >= here->MOS3tDepCap){ arg = 1-model->MOS3fwdCapDepCoeff; sarg = exp( (-model->MOS3bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS3bulkJctSideGradingCoeff) * log(arg) ); here->MOS3f2s = here->MOS3Cbs*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctBotGradingCoeff))* sarg/arg + here->MOS3Cbssw*(1-model->MOS3fwdCapDepCoeff* (1+model->MOS3bulkJctSideGradingCoeff))* sargsw/arg; here->MOS3f3s = here->MOS3Cbs * model->MOS3bulkJctBotGradingCoeff * sarg/arg/ model->MOS3bulkJctPotential + here->MOS3Cbssw * model->MOS3bulkJctSideGradingCoeff * sargsw/arg / model->MOS3bulkJctPotential; here->MOS3f4s = here->MOS3Cbs*model->MOS3bulkJctPotential* (1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + here->MOS3Cbssw*model->MOS3bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3s/2* (here->MOS3tBulkPot*here->MOS3tBulkPot) -here->MOS3tBulkPot * here->MOS3f2s; } *(ckt->CKTstate0 + here->MOS3vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS3vbd) = vbdOp; if((error = MOS3load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS3senCgs + 5) = here->MOS3cgs; *(here->MOS3senCgd + 5) = here->MOS3cgd; *(here->MOS3senCgb + 5) = here->MOS3cgb; *(here->MOS3senCbd + 5) = here->MOS3capbd; *(here->MOS3senCbs + 5) = here->MOS3capbs; *(here->MOS3senGds + 5) = here->MOS3gds; *(here->MOS3senGbs + 5) = here->MOS3gbs; *(here->MOS3senGbd + 5) = here->MOS3gbd; *(here->MOS3senGm + 5) = here->MOS3gm; *(here->MOS3senGmbs + 5) = here->MOS3gmbs; here->MOS3w = A0; here->MOS3drainArea /= (1 + info->SENpertfac); here->MOS3sourceArea /= (1 + info->SENpertfac); } load: gds= *(here->MOS3senGds + flag); gbs= *(here->MOS3senGbs + flag); gbd= *(here->MOS3senGbd + flag); gm= *(here->MOS3senGm + flag); gmbs= *(here->MOS3senGmbs + flag); if(flag == 5){ gdpr = here->MOS3drainConductance * Apert/A0; gspr = here->MOS3sourceConductance * Apert/A0; } else{ gdpr = here->MOS3drainConductance; gspr = here->MOS3sourceConductance; } xcgs= *(here->MOS3senCgs + flag) * ckt->CKTomega; xcgd= *(here->MOS3senCgd + flag) * ckt->CKTomega; xcgb= *(here->MOS3senCgb + flag) * ckt->CKTomega; xbd= *(here->MOS3senCbd + flag) * ckt->CKTomega; xbs= *(here->MOS3senCbs + flag) * ckt->CKTomega; #ifdef SENSDEBUG printf("flag = %d \n",flag); printf("gspr = %.7e , gdpr = %.7e , gds = %.7e, gbs = %.7e\n", gspr,gdpr,gds,gbs); printf("gbd = %.7e , gm = %.7e , gmbs = %.7e\n",gbd,gm,gmbs); printf("xcgs = %.7e , xcgd = %.7e , xcgb = %.7e,", xcgs,xcgd,xcgb); printf("xbd = %.7e,xbs = %.7e\n" ,xbd,xbs); #endif /* SENSDEBUG */ cspr = gspr * vspr ; icspr = gspr * ivspr ; cdpr = gdpr * vdpr ; icdpr = gdpr * ivdpr ; cgs = ( - xcgs * ivgs ); icgs = xcgs * vgs ; cgd = ( - xcgd * ivgd ); icgd = xcgd * vgd ; cgb = ( - xcgb * ivgb ); icgb = xcgb * vgb ; cbs = ( gbs * vbs - xbs * ivbs ); icbs = ( xbs * vbs + gbs * ivbs ); cbd = ( gbd * vbd - xbd * ivbd ); icbd = ( xbd * vbd + gbd * ivbd ); cds = ( gds * vds + xnrm * (gm * vgs + gmbs * vbs) - xrev * (gm * vgd + gmbs * vbd) ); icds = ( gds * ivds + xnrm * (gm * ivgs + gmbs * ivbs) - xrev * (gm * ivgd + gmbs * ivbd) ); cs = cspr; ics = icspr; csprm = ( -cspr - cgs - cbs - cds ) ; icsprm = ( -icspr - icgs - icbs - icds ) ; cd = cdpr; icd = icdpr; cdprm = ( -cdpr - cgd - cbd + cds ) ; icdprm = ( -icdpr - icgd - icbd + icds ) ; cg = cgs + cgd + cgb ; icg = icgs + icgd + icgb ; cb = cbs + cbd - cgb ; icb = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs = %.7e , cbd = %.7e , cgb = %.7e\n",cbs,cbd,cgb); printf("cb = %.7e , cg = %.7e , cs = %.7e\n",cb,cg,cs); printf("csprm = %.7e, cd = %.7e, cdprm = %.7e\n",csprm,cd,cdprm); printf("icb = %.7e , icg = %.7e , ics = %.7e\n",icb,icg,ics); printf("icsprm = %.7e, icd = %.7e, icdprm = %.7e\n", icsprm,icd,icdprm); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if( (flag == 4) && (iparmno != here->MOS3senParmNo) ) continue; if( (flag == 5) && (iparmno != (here->MOS3senParmNo + here->MOS3sens_l)) ) continue; switch(flag){ case 1: DvDp = model->MOS3type * (info->SEN_Sap[here->MOS3bNode][iparmno] - info->SEN_Sap[here->MOS3sNodePrime][iparmno]); break; case 2: DvDp = model->MOS3type * ( info->SEN_Sap[here->MOS3bNode][iparmno] - info->SEN_Sap[here->MOS3dNodePrime][iparmno]); break; case 3: DvDp = model->MOS3type * ( info->SEN_Sap[here->MOS3gNode][iparmno] - info->SEN_Sap[here->MOS3bNode][iparmno]); break; case 4: DvDp = 1; break; case 5: DvDp = 1; break; } *(info->SEN_RHS[here->MOS3bNode] + iparmno) -= ( cb - cb0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3bNode] + iparmno) -= ( icb - icb0) * DELAinv * DvDp; *(info->SEN_RHS[here->MOS3gNode] + iparmno) -= ( cg - cg0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3gNode] + iparmno) -= ( icg - icg0) * DELAinv * DvDp; if(here->MOS3sNode != here->MOS3sNodePrime){ *(info->SEN_RHS[here->MOS3sNode] + iparmno) -= ( cs - cs0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3sNode] + iparmno) -= ( ics - ics0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS3sNodePrime] + iparmno) -= ( csprm - csprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3sNodePrime] + iparmno) -= ( icsprm - icsprm0) * DELAinv * DvDp; if(here->MOS3dNode != here->MOS3dNodePrime){ *(info->SEN_RHS[here->MOS3dNode] + iparmno) -= ( cd - cd0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3dNode] + iparmno) -= ( icd - icd0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS3dNodePrime] + iparmno) -= ( cdprm - cdprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS3dNodePrime] + iparmno) -= ( icdprm - icdprm0) * DELAinv * DvDp; #ifdef SENSDEBUG printf("after loading\n"); printf("DvDp = %.5e , DELAinv = %.5e ,flag = %d ,", DvDp,DELAinv,flag); printf("iparmno = %d,senparmno = %d\n", iparmno,here->MOS3senParmNo); printf("A0 = %.5e , Apert = %.5e ,CONSTvt0 = %.5e \n", A0,Apert,CONSTvt0); printf("senb = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3bNode] + iparmno), *(info->SEN_iRHS[here->MOS3bNode] + iparmno)); printf("seng = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3gNode] + iparmno), *(info->SEN_iRHS[here->MOS3gNode] + iparmno)); printf("sens = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3sNode] + iparmno), *(info->SEN_iRHS[here->MOS3sNode] + iparmno)); printf("sensprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3sNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS3sNodePrime] + iparmno)); printf("send = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3dNode] + iparmno), *(info->SEN_iRHS[here->MOS3dNode] + iparmno)); printf("sendprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS3dNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS3dNodePrime] + iparmno)); #endif /* SENSDEBUG */ } switch(flag){ case 1: goto pertvbd ; case 2: goto pertvgb ; case 3: goto pertl ; case 4: goto pertw ; case 5: break; } next: ; /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS3states + i) = *(SaveState + i); here->MOS3sourceConductance = *(SaveState + 17) ; here->MOS3drainConductance = *(SaveState + 18) ; here->MOS3cd = *(SaveState + 19) ; here->MOS3cbs = *(SaveState + 20) ; here->MOS3cbd = *(SaveState + 21) ; here->MOS3gmbs = *(SaveState + 22) ; here->MOS3gm = *(SaveState + 23) ; here->MOS3gds = *(SaveState + 24) ; here->MOS3gbd = *(SaveState + 25) ; here->MOS3gbs = *(SaveState + 26) ; here->MOS3capbd = *(SaveState + 27) ; here->MOS3capbs = *(SaveState + 28) ; here->MOS3Cbd = *(SaveState + 29) ; here->MOS3Cbdsw = *(SaveState + 30) ; here->MOS3Cbs = *(SaveState + 31) ; here->MOS3Cbssw = *(SaveState + 32) ; here->MOS3f2d = *(SaveState + 33) ; here->MOS3f3d = *(SaveState + 34) ; here->MOS3f4d = *(SaveState + 35) ; here->MOS3f2s = *(SaveState + 36) ; here->MOS3f3s = *(SaveState + 37) ; here->MOS3f4s = *(SaveState + 38) ; here->MOS3cgs = *(SaveState + 39) ; here->MOS3cgd = *(SaveState + 40) ; here->MOS3cgb = *(SaveState + 41) ; here->MOS3vdsat = *(SaveState + 42) ; here->MOS3von = *(SaveState + 43) ; here->MOS3mode = save_mode ; here->MOS3senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS3senacload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos3/mos3acld.c0000644000265600020320000001113412264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS3acLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS3model *model = (MOS3model *)inModel; MOS3instance *here; int xnrm; int xrev; double EffectiveLength; double EffectiveWidth; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; for( ; model != NULL; model = model->MOS3nextModel) { for(here = model->MOS3instances; here!= NULL; here = here->MOS3nextInstance) { if (here->MOS3mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * charge oriented model parameters */ EffectiveWidth=here->MOS3w-2*model->MOS3widthNarrow+ model->MOS3widthAdjust; EffectiveLength=here->MOS3l - 2*model->MOS3latDiff+ model->MOS3lengthAdjust; GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; /* * meyer"s model parameters */ capgs = ( *(ckt->CKTstate0+here->MOS3capgs)+ *(ckt->CKTstate0+here->MOS3capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS3capgd)+ *(ckt->CKTstate0+here->MOS3capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS3capgb)+ *(ckt->CKTstate0+here->MOS3capgb) + GateBulkOverlapCap ); xgs = capgs * ckt->CKTomega; xgd = capgd * ckt->CKTomega; xgb = capgb * ckt->CKTomega; xbd = here->MOS3capbd * ckt->CKTomega; xbs = here->MOS3capbs * ckt->CKTomega; /* * load matrix */ *(here->MOS3GgPtr +1) += xgd+xgs+xgb; *(here->MOS3BbPtr +1) += xgb+xbd+xbs; *(here->MOS3DPdpPtr +1) += xgd+xbd; *(here->MOS3SPspPtr +1) += xgs+xbs; *(here->MOS3GbPtr +1) -= xgb; *(here->MOS3GdpPtr +1) -= xgd; *(here->MOS3GspPtr +1) -= xgs; *(here->MOS3BgPtr +1) -= xgb; *(here->MOS3BdpPtr +1) -= xbd; *(here->MOS3BspPtr +1) -= xbs; *(here->MOS3DPgPtr +1) -= xgd; *(here->MOS3DPbPtr +1) -= xbd; *(here->MOS3SPgPtr +1) -= xgs; *(here->MOS3SPbPtr +1) -= xbs; *(here->MOS3DdPtr) += here->MOS3drainConductance; *(here->MOS3SsPtr) += here->MOS3sourceConductance; *(here->MOS3BbPtr) += here->MOS3gbd+here->MOS3gbs; *(here->MOS3DPdpPtr) += here->MOS3drainConductance+ here->MOS3gds+here->MOS3gbd+ xrev*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3SPspPtr) += here->MOS3sourceConductance+ here->MOS3gds+here->MOS3gbs+ xnrm*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3DdpPtr) -= here->MOS3drainConductance; *(here->MOS3SspPtr) -= here->MOS3sourceConductance; *(here->MOS3BdpPtr) -= here->MOS3gbd; *(here->MOS3BspPtr) -= here->MOS3gbs; *(here->MOS3DPdPtr) -= here->MOS3drainConductance; *(here->MOS3DPgPtr) += (xnrm-xrev)*here->MOS3gm; *(here->MOS3DPbPtr) += -here->MOS3gbd+(xnrm-xrev)*here->MOS3gmbs; *(here->MOS3DPspPtr) -= here->MOS3gds+ xnrm*(here->MOS3gm+here->MOS3gmbs); *(here->MOS3SPgPtr) -= (xnrm-xrev)*here->MOS3gm; *(here->MOS3SPsPtr) -= here->MOS3sourceConductance; *(here->MOS3SPbPtr) -= here->MOS3gbs+(xnrm-xrev)*here->MOS3gmbs; *(here->MOS3SPdpPtr) -= here->MOS3gds+ xrev*(here->MOS3gm+here->MOS3gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/0000755000265600020320000000000012264261707017243 5ustar andreasadminngspice-26/src/spicelib/devices/hfet1/hfetgetic.c0000644000265600020320000000207712264261473021357 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAgetic(GENmodel *inModel, CKTcircuit *ckt) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->HFETAnextModel) { for(here = model->HFETAinstances; here ; here = here->HFETAnextInstance) { if(!here->HFETAicVDSGiven) { here->HFETAicVDS = *(ckt->CKTrhs + here->HFETAdrainNode) - *(ckt->CKTrhs + here->HFETAsourceNode); } if(!here->HFETAicVGSGiven) { here->HFETAicVGS = *(ckt->CKTrhs + here->HFETAgateNode) - *(ckt->CKTrhs + here->HFETAsourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetmpar.c0000644000265600020320000002214512264261473021221 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAmParam(int param, IFvalue *value, GENmodel *inModel) { HFETAmodel *model = (HFETAmodel*)inModel; switch(param) { case HFETA_MOD_VTO: model->HFETAthresholdGiven = TRUE; model->HFETAthreshold = value->rValue; break; case HFETA_MOD_LAMBDA: model->HFETAlambdaGiven = TRUE; model->HFETAlambda = value->rValue; break; case HFETA_MOD_RD: model->HFETArdGiven = TRUE; model->HFETArd = value->rValue; break; case HFETA_MOD_RS: model->HFETArsGiven = TRUE; model->HFETArs = value->rValue; break; case HFETA_MOD_RG: model->HFETArgGiven = TRUE; model->HFETArg = value->rValue; break; case HFETA_MOD_RDI: model->HFETArdiGiven = TRUE; model->HFETArdi = value->rValue; break; case HFETA_MOD_RSI: model->HFETArsiGiven = TRUE; model->HFETArsi = value->rValue; break; case HFETA_MOD_RGS: model->HFETArgsGiven = TRUE; model->HFETArgs = value->rValue; break; case HFETA_MOD_RGD: model->HFETArgdGiven = TRUE; model->HFETArgd = value->rValue; break; case HFETA_MOD_RI: model->HFETAriGiven = TRUE; model->HFETAri = value->rValue; break; case HFETA_MOD_RF: model->HFETArfGiven = TRUE; model->HFETArf = value->rValue; break; case HFETA_MOD_ETA: model->HFETAetaGiven = TRUE; model->HFETAeta = value->rValue; break; case HFETA_MOD_M: model->HFETAmGiven = TRUE; model->HFETAm = value->rValue; break; case HFETA_MOD_MC: model->HFETAmcGiven = TRUE; model->HFETAmc = value->rValue; break; case HFETA_MOD_GAMMA: model->HFETAgammaGiven = TRUE; model->HFETAgamma = value->rValue; break; case HFETA_MOD_SIGMA0: model->HFETAsigma0Given = TRUE; model->HFETAsigma0 = value->rValue; break; case HFETA_MOD_VSIGMAT: model->HFETAvsigmatGiven = TRUE; model->HFETAvsigmat = value->rValue; break; case HFETA_MOD_VSIGMA: model->HFETAvsigmaGiven = TRUE; model->HFETAvsigma = value->rValue; break; case HFETA_MOD_MU: model->HFETAmuGiven = TRUE; model->HFETAmu = value->rValue; break; case HFETA_MOD_DI: model->HFETAdiGiven = TRUE; model->HFETAdi = value->rValue; break; case HFETA_MOD_DELTA: model->HFETAdeltaGiven = TRUE; model->HFETAdelta = value->rValue; break; case HFETA_MOD_VS: model->HFETAvsGiven = TRUE; model->HFETAvs = value->rValue; break; case HFETA_MOD_NMAX: model->HFETAnmaxGiven = TRUE; model->HFETAnmax = value->rValue; break; case HFETA_MOD_DELTAD: model->HFETAdeltadGiven = TRUE; model->HFETAdeltad = value->rValue; break; case HFETA_MOD_JS1D: model->HFETAjs1dGiven = TRUE; model->HFETAjs1d = value->rValue; break; case HFETA_MOD_JS2D: model->HFETAjs2dGiven = TRUE; model->HFETAjs2d = value->rValue; break; case HFETA_MOD_JS1S: model->HFETAjs1sGiven = TRUE; model->HFETAjs1s = value->rValue; break; case HFETA_MOD_JS2S: model->HFETAjs2sGiven = TRUE; model->HFETAjs2s = value->rValue; break; case HFETA_MOD_M1D: model->HFETAm1dGiven = TRUE; model->HFETAm1d = value->rValue; break; case HFETA_MOD_M2D: model->HFETAm2dGiven = TRUE; model->HFETAm2d = value->rValue; break; case HFETA_MOD_M1S: model->HFETAm1sGiven = TRUE; model->HFETAm1s = value->rValue; break; case HFETA_MOD_M2S: model->HFETAm2sGiven = TRUE; model->HFETAm2s = value->rValue; break; case HFETA_MOD_EPSI: model->HFETAepsiGiven = TRUE; model->HFETAepsi = value->rValue; break; case HFETA_MOD_A1: model->HFETAa1Given = TRUE; model->HFETAa1 = value->rValue; break; case HFETA_MOD_A2: model->HFETAa2Given = TRUE; model->HFETAa2 = value->rValue; break; case HFETA_MOD_MV1: model->HFETAmv1Given = TRUE; model->HFETAmv1 = value->rValue; break; case HFETA_MOD_P: model->HFETApGiven = TRUE; model->HFETAp = value->rValue; break; case HFETA_MOD_KAPPA: model->HFETAkappaGiven = TRUE; model->HFETAkappa = value->rValue; break; case HFETA_MOD_DELF: model->HFETAdelfGiven = TRUE; model->HFETAdelf = value->rValue; break; case HFETA_MOD_FGDS: model->HFETAfgdsGiven = TRUE; model->HFETAfgds = value->rValue; break; case HFETA_MOD_TF: model->HFETAtfGiven = TRUE; model->HFETAtf = value->rValue+CONSTCtoK; break; case HFETA_MOD_CDS: model->HFETAcdsGiven = TRUE; model->HFETAcds = value->rValue; break; case HFETA_MOD_PHIB: model->HFETAphibGiven = TRUE; model->HFETAphib = value->rValue*CHARGE; break; case HFETA_MOD_TALPHA: model->HFETAtalphaGiven = TRUE; model->HFETAtalpha = value->rValue; break; case HFETA_MOD_MT1: model->HFETAmt1Given = TRUE; model->HFETAmt1 = value->rValue; break; case HFETA_MOD_MT2: model->HFETAmt2Given = TRUE; model->HFETAmt2 = value->rValue; break; case HFETA_MOD_CK1: model->HFETAck1Given = TRUE; model->HFETAck1 = value->rValue; break; case HFETA_MOD_CK2: model->HFETAck2Given = TRUE; model->HFETAck2 = value->rValue; break; case HFETA_MOD_CM1: model->HFETAcm1Given = TRUE; model->HFETAcm1 = value->rValue; break; case HFETA_MOD_CM2: model->HFETAcm2Given = TRUE; model->HFETAcm2 = value->rValue; break; case HFETA_MOD_CM3: model->HFETAcm3Given = TRUE; model->HFETAcm3 = value->rValue; break; case HFETA_MOD_ASTAR: model->HFETAastarGiven = TRUE; model->HFETAastar = value->rValue; break; case HFETA_MOD_ETA1: model->HFETAeta1Given = TRUE; model->HFETAeta1 = value->rValue; break; case HFETA_MOD_D1: model->HFETAd1Given = TRUE; model->HFETAd1 = value->rValue; break; case HFETA_MOD_VT1: model->HFETAvt1Given = TRUE; model->HFETAvt1 = value->rValue; break; case HFETA_MOD_ETA2: model->HFETAeta2Given = TRUE; model->HFETAeta2 = value->rValue; break; case HFETA_MOD_D2: model->HFETAd2Given = TRUE; model->HFETAd2 = value->rValue; break; case HFETA_MOD_VT2: model->HFETAvt2Given = TRUE; model->HFETAvt2 = value->rValue; break; case HFETA_MOD_GGR: model->HFETAggrGiven = TRUE; model->HFETAggr = value->rValue; break; case HFETA_MOD_DEL: model->HFETAdelGiven = TRUE; model->HFETAdel = value->rValue; break; case HFETA_MOD_GATEMOD: model->HFETAgatemodGiven = TRUE; model->HFETAgatemod = value->iValue; break; case HFETA_MOD_KLAMBDA: model->HFETAklambdaGiven = TRUE; KLAMBDA = value->rValue; break; case HFETA_MOD_KMU: model->HFETAkmuGiven = TRUE; KMU = value->rValue; break; case HFETA_MOD_KVTO: model->HFETAkvtoGiven = TRUE; KVTO = value->rValue; break; case HFETA_MOD_NHFET: if(value->iValue) { model->HFETAtype = NHFET; } break; case HFETA_MOD_PHFET: if(value->iValue) { model->HFETAtype = PHFET; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetinit.c0000644000265600020320000000406112264261473021222 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "hfetitf.h" #include "hfetext.h" #include "hfetinit.h" SPICEdev HFETAinfo = { { "HFET1", "HFET1 Model", &HFETAnSize, &HFETAnSize, HFETAnames, &HFETApTSize, HFETApTable, &HFETAmPTSize, HFETAmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ HFETAparam, /* DEVmodParam */ HFETAmParam, /* DEVload */ HFETAload, /* DEVsetup */ HFETAsetup, /* DEVunsetup */ HFETAunsetup, /* DEVpzSetup */ HFETAsetup, /* DEVtemperature*/ HFETAtemp, /* DEVtrunc */ HFETAtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ HFETAacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ HFETAdestroy, /* DEVmodDelete */ HFETAmDelete, /* DEVdelete */ HFETAdelete, /* DEVsetic */ HFETAgetic, /* DEVask */ HFETAask, /* DEVmodAsk */ HFETAmAsk, /* DEVpzLoad */ HFETApzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &HFETAiSize, /* DEVmodSize */ &HFETAmSize }; SPICEdev * get_hfeta_info(void) { return &HFETAinfo; } ngspice-26/src/spicelib/devices/hfet1/hfetpzl.c0000644000265600020320000001276612264261473021077 0ustar andreasadmin/********** Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETApzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; double gm; double gds; double xds; double ggs; double xgs; double ggd; double xgd; double ggspp; double ggdpp; double f; double m; for( ; model != NULL; model = model->HFETAnextModel ) { for( here = model->HFETAinstances; here != NULL; here = here->HFETAnextInstance) { gm = *(ckt->CKTstate0 + here->HFETAgm); gds = *(ckt->CKTstate0 + here->HFETAgds); xds = CDS*ckt->CKTomega; ggs = *(ckt->CKTstate0 + here->HFETAggs); xgs = *(ckt->CKTstate0 + here->HFETAqgs); ggd = *(ckt->CKTstate0 + here->HFETAggd); xgd = *(ckt->CKTstate0 + here->HFETAqgd); ggspp = *(ckt->CKTstate0 + here->HFETAggspp); ggdpp = *(ckt->CKTstate0 + here->HFETAggdpp); if(model->HFETAkappaGiven && here->HFETAdelf != 0.0) { f = ckt->CKTomega/2/M_PI; gds = gds*(1+0.5*model->HFETAkappa*(1+tanh((f-here->HFETAfgds)/here->HFETAdelf))); } m = here->HFETAm; *(here->HFETAdrainDrainPtr) += m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePtr) += m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeGatePrimePtr) += m * (ggd+ggs+ggspp+ggdpp+model->HFETAgateConduct); *(here->HFETAdrainPrimeDrainPrimePtr) += m * (gds+ggd+model->HFETAdrainConduct+model->HFETAgf); *(here->HFETAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+model->HFETAsourceConduct+model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr) += m * (model->HFETAgi+ggspp); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr) += m * (model->HFETAgf+ggdpp); *(here->HFETAdrainDrainPrimePtr) -= m * (model->HFETAdrainConduct); *(here->HFETAdrainPrimeDrainPtr) -= m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePrimePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAsourcePrimeSourcePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeDrainPrimePtr) -= m * (ggd); *(here->HFETAdrainPrimeGatePrimePtr) += m * (gm-ggd); *(here->HFETAgatePrimeSourcePrimePtr) -= m * (ggs); *(here->HFETAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->HFETAdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->HFETAsourcePrimeDrainPrimePtr) -= m * (gds); *(here->HFETAsourcePrimeSourcePrmPrmPtr) -= m * (model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrimePtr) -= m * (model->HFETAgi); *(here->HFETAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->HFETAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->HFETAdrainPrimeDrainPrmPrmPtr) -= m * (model->HFETAgf); *(here->HFETAdrainPrmPrmDrainPrimePtr) -= m * (model->HFETAgf); *(here->HFETAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->HFETAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); *(here->HFETAgateGatePtr) += m * (model->HFETAgateConduct); *(here->HFETAgateGatePrimePtr) -= m * (model->HFETAgateConduct); *(here->HFETAgatePrimeGatePtr) -= m * (model->HFETAgateConduct); *(here->HFETAgatePrimeGatePrimePtr) += m * ((xgd+xgs) * s->real); *(here->HFETAgatePrimeGatePrimePtr+1) += m * ((xgd+xgs) * s->imag); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr) += m * (xgd * s->real); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr+1) += m * (xgd * s->imag); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr) += m * (xgs * s->real); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr+1) += m * (xgs * s->imag); *(here->HFETAgatePrimeDrainPrmPrmPtr) -= m * (xgd * s->real); *(here->HFETAgatePrimeDrainPrmPrmPtr+1) -= m * (xgd * s->imag); *(here->HFETAgatePrimeSourcePrmPrmPtr) -= m * (xgs * s->real); *(here->HFETAgatePrimeSourcePrmPrmPtr+1) -= m * (xgs * s->imag); *(here->HFETAdrainPrmPrmGatePrimePtr) -= m * (xgd * s->real); *(here->HFETAdrainPrmPrmGatePrimePtr+1) -= m * (xgd * s->imag); *(here->HFETAsourcePrmPrmGatePrimePtr) -= m * (xgs * s->real); *(here->HFETAsourcePrmPrmGatePrimePtr+1) -= m * (xgs * s->imag); *(here->HFETAdrainPrimeDrainPrimePtr) += m * (xds * s->real); *(here->HFETAdrainPrimeDrainPrimePtr+1) += m * (xds * s->imag); *(here->HFETAsourcePrimeSourcePrimePtr) += m * (xds * s->real); *(here->HFETAsourcePrimeSourcePrimePtr+1) += m * (xds * s->imag); *(here->HFETAdrainPrimeSourcePrimePtr) -= m * (xds * s->real); *(here->HFETAdrainPrimeSourcePrimePtr+1) -= m * (xds * s->imag); *(here->HFETAsourcePrimeDrainPrimePtr) -= m * (xds * s->real); *(here->HFETAsourcePrimeDrainPrimePtr+1) -= m * (xds * s->imag); } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetmdel.c0000644000265600020320000000204412264261473021177 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into hfeta model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { HFETAmodel **model = (HFETAmodel**)inModel; HFETAmodel *modfast = (HFETAmodel*)kill; HFETAinstance *here; HFETAinstance *prev = NULL; HFETAmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->HFETAnextModel)) { if( (*model)->HFETAmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->HFETAnextModel; /* cut deleted device out of list */ for(here = (*model)->HFETAinstances ; here ; here = here->HFETAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfet.c0000644000265600020320000001446312264261473020345 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "hfetdefs.h" #include "ngspice/suffix.h" IFparm HFETApTable[] = { /* parameters */ OP("off", HFETA_OFF, IF_FLAG ,"Device initially off"), IOP("l", HFETA_LENGTH, IF_REAL ,"Length of device"), IOP("w", HFETA_WIDTH, IF_REAL ,"Width of device"), IOP("m", HFETA_M, IF_REAL ,"Parallel Multiplier"), IOP("icvds", HFETA_IC_VDS, IF_REAL ,"Initial D-S voltage"), IOP("icvgs", HFETA_IC_VGS, IF_REAL ,"Initial G-S voltage"), IOP("temp", HFETA_TEMP, IF_REAL ,"Instance temperature"), IOP("dtemp", HFETA_DTEMP, IF_REAL ,"Instance temperature difference"), OP("dnode", HFETA_DRAINNODE, IF_INTEGER,"Number of drain node"), OP("gnode", HFETA_GATENODE, IF_INTEGER,"Number of gate node"), OP("snode", HFETA_SOURCENODE, IF_INTEGER,"Number of source node"), OP("dprimenode",HFETA_DRAINPRIMENODE, IF_INTEGER,"Number of internal drain node"), OP("sprimenode",HFETA_SOURCEPRIMENODE,IF_INTEGER,"Number of internal source node"), OP("vgs", HFETA_VGS, IF_REAL,"Gate-Source voltage"), OP("vgd", HFETA_VGD, IF_REAL,"Gate-Drain voltage"), OP("cg", HFETA_CG, IF_REAL,"Gate capacitance"), OP("cd", HFETA_CD, IF_REAL,"Drain capacitance"), OP("cgd", HFETA_CGD, IF_REAL,"Gate_Drain capacitance"), OP("gm", HFETA_GM, IF_REAL,"Transconductance"), OP("gds", HFETA_GDS, IF_REAL,"Drain-Source conductance"), OP("ggs", HFETA_GGS, IF_REAL,"Gate-Source conductance"), OP("ggd", HFETA_GGD, IF_REAL,"Gate-Drain conductance"), OP("qgs", HFETA_QGS, IF_REAL,"Gate-Source charge storage"), OP("cqgs", HFETA_CQGS, IF_REAL,"Capacitance due to gate-source charge storage"), OP("qgd", HFETA_QGD, IF_REAL,"Gate-Drain charge storage"), OP("cqgd", HFETA_CQGD, IF_REAL,"Capacitance due to gate-drain charge storage"), OP("cs", HFETA_CS, IF_REAL ,"Source current"), OP("p", HFETA_POWER, IF_REAL ,"Power dissipated by the mesfet") }; IFparm HFETAmPTable[] = { /* model parameters */ IOP( "vt0", HFETA_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "vto", HFETA_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "lambda", HFETA_MOD_LAMBDA, IF_REAL,"Output conductance parameter"), IOP( "rd", HFETA_MOD_RD, IF_REAL,"Drain ohmic resistance"), IOP( "rs", HFETA_MOD_RS, IF_REAL,"Source ohmic resistance"), IOP( "rg", HFETA_MOD_RG, IF_REAL,"Gate ohmic resistance"), IOP( "rdi", HFETA_MOD_RDI, IF_REAL,"Drain ohmic resistance"), IOP( "rsi", HFETA_MOD_RSI, IF_REAL,"Source ohmic resistance"), IOP( "rgs", HFETA_MOD_RGS, IF_REAL,"Gate-source ohmic resistance"), IOP( "rgd", HFETA_MOD_RGD, IF_REAL,"Gate-drain ohmic resistance"), IOP( "ri", HFETA_MOD_RI, IF_REAL,""), IOP( "rf", HFETA_MOD_RF, IF_REAL,""), IOP( "eta", HFETA_MOD_ETA, IF_REAL,"Subthreshold ideality factor"), IOP( "m", HFETA_MOD_M, IF_REAL,"Knee shape parameter"), IOP( "mc", HFETA_MOD_MC, IF_REAL,"Knee shape parameter"), IOP( "gamma", HFETA_MOD_GAMMA, IF_REAL,"Knee shape parameter"), IOP( "sigma0", HFETA_MOD_SIGMA0, IF_REAL,"Threshold voltage coefficient"), IOP( "vsigmat", HFETA_MOD_VSIGMAT,IF_REAL,""), IOP( "vsigma", HFETA_MOD_VSIGMA, IF_REAL,""), IOP( "mu", HFETA_MOD_MU, IF_REAL,"Moblity"), IOP( "di", HFETA_MOD_DI, IF_REAL,"Depth of device"), IOP( "delta", HFETA_MOD_DELTA, IF_REAL,""), IOP( "vs", HFETA_MOD_VS, IF_REAL,"Saturation velocity"), IOP( "nmax", HFETA_MOD_NMAX, IF_REAL,""), IOP( "deltad", HFETA_MOD_DELTAD, IF_REAL,"Thickness correction"), IOP( "js1d", HFETA_MOD_JS1D, IF_REAL,""), IOP( "js2d", HFETA_MOD_JS2D, IF_REAL,""), IOP( "js1s", HFETA_MOD_JS1S, IF_REAL,""), IOP( "js2s", HFETA_MOD_JS2S, IF_REAL,""), IOP( "m1d", HFETA_MOD_M1D, IF_REAL,""), IOP( "m2d", HFETA_MOD_M2D, IF_REAL,""), IOP( "m1s", HFETA_MOD_M1S, IF_REAL,""), IOP( "m2s", HFETA_MOD_M2S, IF_REAL,""), IOP( "epsi", HFETA_MOD_EPSI, IF_REAL,""), IOP( "p", HFETA_MOD_P, IF_REAL,""), IOP( "cm3", HFETA_MOD_CM3, IF_REAL,""), IOP( "a1", HFETA_MOD_A1, IF_REAL,""), IOP( "a2", HFETA_MOD_A2, IF_REAL,""), IOP( "mv1", HFETA_MOD_MV1, IF_REAL,""), IOP( "kappa", HFETA_MOD_KAPPA, IF_REAL,""), IOP( "delf", HFETA_MOD_DELF, IF_REAL,""), IOP( "fgds", HFETA_MOD_FGDS, IF_REAL,""), IOP( "tf", HFETA_MOD_TF, IF_REAL,""), IOP( "cds", HFETA_MOD_CDS, IF_REAL,""), IOP( "phib", HFETA_MOD_PHIB, IF_REAL,""), IOP( "talpha", HFETA_MOD_TALPHA, IF_REAL,""), IOP( "mt1", HFETA_MOD_MT1, IF_REAL,""), IOP( "mt2", HFETA_MOD_MT2, IF_REAL,""), IOP( "ck1", HFETA_MOD_CK1, IF_REAL,""), IOP( "ck2", HFETA_MOD_CK2, IF_REAL,""), IOP( "cm1", HFETA_MOD_CM1, IF_REAL,""), IOP( "cm2", HFETA_MOD_CM2, IF_REAL,""), IOP( "astar", HFETA_MOD_ASTAR, IF_REAL,""), IOP( "eta1", HFETA_MOD_ETA1, IF_REAL,""), IOP( "d1", HFETA_MOD_D1, IF_REAL,""), IOP( "vt1", HFETA_MOD_VT1, IF_REAL,""), IOP( "eta2", HFETA_MOD_ETA2, IF_REAL,""), IOP( "d2", HFETA_MOD_D2, IF_REAL,""), IOP( "vt2", HFETA_MOD_VT2, IF_REAL,""), IOP( "ggr", HFETA_MOD_GGR, IF_REAL,""), IOP( "del", HFETA_MOD_DEL, IF_REAL,""), IOP( "gatemod", HFETA_MOD_GATEMOD,IF_INTEGER,""), IOP( "klambda", HFETA_MOD_KLAMBDA, IF_REAL,""), IOP( "kmu", HFETA_MOD_KMU, IF_REAL,""), IOP( "kvto", HFETA_MOD_KVTO, IF_REAL,""), OP( "type", HFETA_MOD_TYPE, IF_STRING, "NHFET or PHFET"), IOP( "nhfet", HFETA_MOD_NHFET, IF_FLAG,"N HFET device"), IOP( "phfet", HFETA_MOD_PHFET, IF_FLAG,"P HFET device"), }; char *HFETAnames[] = { "Drain", "Gate", "Source" }; int HFETAnSize = NUMELEMS(HFETAnames); int HFETApTSize = NUMELEMS(HFETApTable); int HFETAmPTSize = NUMELEMS(HFETAmPTable); int HFETAiSize = sizeof(HFETAinstance); int HFETAmSize = sizeof(HFETAmodel); ngspice-26/src/spicelib/devices/hfet1/hfetinit.h0000644000265600020320000000040212264261473021222 0ustar andreasadmin#ifndef _HFETAINIT_H #define _HFETAINIT_H extern IFparm HFETApTable[ ]; extern IFparm HFETAmPTable[ ]; extern char *HFETAnames[ ]; extern int HFETApTSize; extern int HFETAmPTSize; extern int HFETAnSize; extern int HFETAiSize; extern int HFETAmSize; #endif ngspice-26/src/spicelib/devices/hfet1/hfetmask.c0000644000265600020320000001667012264261473021223 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* Imported into HFETA model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFETAmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { HFETAmodel *here = (HFETAmodel*)inst; NG_IGNORE(ckt); switch(which) { case HFETA_MOD_VTO: value->rValue = here->HFETAthreshold; return (OK); case HFETA_MOD_LAMBDA: value->rValue = here->HFETAlambda; return (OK); case HFETA_MOD_RD: value->rValue = here->HFETArd; return (OK); case HFETA_MOD_RS: value->rValue = here->HFETArs; return (OK); case HFETA_MOD_RG: value->rValue = here->HFETArg; return (OK); case HFETA_MOD_RDI: value->rValue = here->HFETArdi; return (OK); case HFETA_MOD_RSI: value->rValue = here->HFETArsi; return (OK); case HFETA_MOD_RGS: value->rValue = here->HFETArgs; return (OK); case HFETA_MOD_RGD: value->rValue = here->HFETArgd; return (OK); case HFETA_MOD_RI: value->rValue = here->HFETAri; return (OK); case HFETA_MOD_RF: value->rValue = here->HFETArf; return (OK); case HFETA_MOD_ETA: value->rValue = here->HFETAeta; return (OK); case HFETA_MOD_M: value->rValue = here->HFETAm; return (OK); case HFETA_MOD_MC: value->rValue = here->HFETAmc; return (OK); case HFETA_MOD_GAMMA: value->rValue = here->HFETAgamma; return (OK); case HFETA_MOD_SIGMA0: value->rValue = here->HFETAsigma0; return (OK); case HFETA_MOD_VSIGMAT: value->rValue = here->HFETAvsigmat; return (OK); case HFETA_MOD_VSIGMA: value->rValue = here->HFETAvsigma; return (OK); case HFETA_MOD_MU: value->rValue = here->HFETAmu; return (OK); case HFETA_MOD_DI: value->rValue = here->HFETAdi; return (OK); case HFETA_MOD_DELTA: value->rValue = here->HFETAdelta; return (OK); case HFETA_MOD_VS: value->rValue = here->HFETAvs; return (OK); case HFETA_MOD_NMAX: value->rValue = here->HFETAnmax; return (OK); case HFETA_MOD_DELTAD: value->rValue = here->HFETAdeltad; return (OK); case HFETA_MOD_JS1D: value->rValue = here->HFETAjs1d; return (OK); case HFETA_MOD_JS2D: value->rValue = here->HFETAjs2d; return (OK); case HFETA_MOD_JS1S: value->rValue = here->HFETAjs1s; return (OK); case HFETA_MOD_JS2S: value->rValue = here->HFETAjs2s; return (OK); case HFETA_MOD_M1D: value->rValue = here->HFETAm1d; return (OK); case HFETA_MOD_M2D: value->rValue = here->HFETAm2d; return (OK); case HFETA_MOD_M1S: value->rValue = here->HFETAm1s; return (OK); case HFETA_MOD_M2S: value->rValue = here->HFETAm2s; return (OK); case HFETA_MOD_EPSI: value->rValue = here->HFETAepsi; return (OK); case HFETA_MOD_P: value->rValue = here->HFETAp; return (OK); case HFETA_MOD_CM3: value->rValue = here->HFETAcm3; return (OK); case HFETA_MOD_A1: value->rValue = here->HFETAa1; return (OK); case HFETA_MOD_A2: value->rValue = here->HFETAa2; return (OK); case HFETA_MOD_MV1: value->rValue = here->HFETAmv1; return (OK); case HFETA_MOD_KAPPA: value->rValue = here->HFETAkappa; return (OK); case HFETA_MOD_DELF: value->rValue = here->HFETAdelf; return (OK); case HFETA_MOD_FGDS: value->rValue = here->HFETAfgds; return (OK); case HFETA_MOD_TF: value->rValue = here->HFETAtf; return (OK); case HFETA_MOD_CDS: value->rValue = here->HFETAcds; return (OK); case HFETA_MOD_PHIB: value->rValue = here->HFETAphib; return (OK); case HFETA_MOD_TALPHA: value->rValue = here->HFETAtalpha; return (OK); case HFETA_MOD_MT1: value->rValue = here->HFETAmt1; return (OK); case HFETA_MOD_MT2: value->rValue = here->HFETAmt2; return (OK); case HFETA_MOD_CK1: value->rValue = here->HFETAck1; return (OK); case HFETA_MOD_CK2: value->rValue = here->HFETAck2; return (OK); case HFETA_MOD_CM1: value->rValue = here->HFETAcm1; return (OK); case HFETA_MOD_CM2: value->rValue = here->HFETAcm2; return (OK); case HFETA_MOD_ASTAR: value->rValue = here->HFETAastar; return (OK); case HFETA_MOD_ETA1: value->rValue = here->HFETAeta1; return (OK); case HFETA_MOD_D1: value->rValue = here->HFETAd1; return (OK); case HFETA_MOD_VT1: value->rValue = here->HFETAvt1; return (OK); case HFETA_MOD_ETA2: value->rValue = here->HFETAeta2; return (OK); case HFETA_MOD_D2: value->rValue = here->HFETAd2; return (OK); case HFETA_MOD_VT2: value->rValue = here->HFETAvt2; return (OK); case HFETA_MOD_GGR: value->rValue = here->HFETAggr; return (OK); case HFETA_MOD_DEL: value->rValue = here->HFETAdel; return (OK); case HFETA_MOD_GATEMOD: value->iValue = here->HFETAgatemod; return (OK); case HFETA_MOD_KLAMBDA: value->rValue = here->HFETAklambda; return (OK); case HFETA_MOD_KMU: value->rValue = here->HFETAkmu; return (OK); case HFETA_MOD_KVTO: value->rValue = here->HFETAkvto; return (OK); case HFETA_MOD_DRAINCONDUCT: value->rValue = here->HFETAdrainConduct; return (OK); case HFETA_MOD_SOURCECONDUCT: value->rValue = here->HFETAsourceConduct; return (OK); /* case HFETA_MOD_DEPLETIONCAP: value->rValue = here->HFETA???; return(OK); */ /* case HFETA_MOD_VCRIT: value->rValue = here->HFETAvcrit; return (OK); */ case HFETA_MOD_TYPE: if (here->HFETAtype == NHFET) value->sValue = "nhfet"; else value->sValue = "phfet"; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hfet1/hfetacl.c0000644000265600020320000001114012264261473021012 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAacLoad(GENmodel *inModel, CKTcircuit *ckt) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; double gm; double gds; double xds; double ggs; double xgs; double ggd; double xgd; double ggspp; double ggdpp; double f; double m; for( ; model != NULL; model = model->HFETAnextModel ) { for( here = model->HFETAinstances; here != NULL; here = here->HFETAnextInstance) { gm = *(ckt->CKTstate0 + here->HFETAgm); gds = *(ckt->CKTstate0 + here->HFETAgds); xds = CDS*ckt->CKTomega; ggs = *(ckt->CKTstate0 + here->HFETAggs); xgs = *(ckt->CKTstate0 + here->HFETAqgs) * ckt->CKTomega; ggd = *(ckt->CKTstate0 + here->HFETAggd); xgd = *(ckt->CKTstate0 + here->HFETAqgd) * ckt->CKTomega; ggspp = *(ckt->CKTstate0 + here->HFETAggspp); ggdpp = *(ckt->CKTstate0 + here->HFETAggdpp); if(model->HFETAkappaGiven && here->HFETAdelf != 0.0) { f = ckt->CKTomega/2/M_PI; gds = gds*(1+0.5*model->HFETAkappa*(1+tanh((f-here->HFETAfgds)/here->HFETAdelf))); } m = here->HFETAm; *(here->HFETAdrainDrainPtr) += m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePtr) += m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeGatePrimePtr) += m * (ggd+ggs+ggspp+ggdpp+model->HFETAgateConduct); *(here->HFETAdrainPrimeDrainPrimePtr) += m * (gds+ggd+model->HFETAdrainConduct+model->HFETAgf); *(here->HFETAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+model->HFETAsourceConduct+model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr) += m * (model->HFETAgi+ggspp); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr) += m * (model->HFETAgf+ggdpp); *(here->HFETAdrainDrainPrimePtr) -= m * (model->HFETAdrainConduct); *(here->HFETAdrainPrimeDrainPtr) -= m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePrimePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAsourcePrimeSourcePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeDrainPrimePtr) -= m * (ggd); *(here->HFETAdrainPrimeGatePrimePtr) += m * (gm-ggd); *(here->HFETAgatePrimeSourcePrimePtr) -= m * (ggs); *(here->HFETAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->HFETAdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->HFETAsourcePrimeDrainPrimePtr) -= m * (gds); *(here->HFETAsourcePrimeSourcePrmPrmPtr) -= m * (model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrimePtr) -= m * (model->HFETAgi); *(here->HFETAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->HFETAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->HFETAdrainPrimeDrainPrmPrmPtr) -= m * (model->HFETAgf); *(here->HFETAdrainPrmPrmDrainPrimePtr) -= m * (model->HFETAgf); *(here->HFETAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->HFETAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); *(here->HFETAgateGatePtr) += m * (model->HFETAgateConduct); *(here->HFETAgateGatePrimePtr) -= m * (model->HFETAgateConduct); *(here->HFETAgatePrimeGatePtr) -= m * (model->HFETAgateConduct); *(here->HFETAgatePrimeGatePrimePtr+1) += m * (xgd+xgs); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr+1) += m * (xgd); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr+1) += m * (xgs); *(here->HFETAgatePrimeDrainPrmPrmPtr+1) -= m * (xgd); *(here->HFETAgatePrimeSourcePrmPrmPtr+1) -= m * (xgs); *(here->HFETAdrainPrmPrmGatePrimePtr+1) -= m * (xgd); *(here->HFETAsourcePrmPrmGatePrimePtr+1) -= m * (xgs); *(here->HFETAdrainPrimeDrainPrimePtr+1) += m * (xds); *(here->HFETAsourcePrimeSourcePrimePtr+1) += m * (xds); *(here->HFETAdrainPrimeSourcePrimePtr+1) -= m * (xds); *(here->HFETAsourcePrimeDrainPrimePtr+1) -= m * (xds); } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetext.h0000644000265600020320000000155412264261473021070 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ extern int HFETAacLoad(GENmodel*,CKTcircuit*); extern int HFETAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int HFETAdelete(GENmodel*,IFuid,GENinstance**); extern void HFETAdestroy(GENmodel**); extern int HFETAgetic(GENmodel*,CKTcircuit*); extern int HFETAload(GENmodel*,CKTcircuit*); extern int HFETAmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int HFETAmDelete(GENmodel**,IFuid,GENmodel*); extern int HFETAmParam(int,IFvalue*,GENmodel*); extern int HFETAparam(int,IFvalue*,GENinstance*,IFvalue*); extern int HFETApzLoad(GENmodel*, CKTcircuit*, SPcomplex*); extern int HFETAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int HFETAtemp(GENmodel*,CKTcircuit*); extern int HFETAtrunc(GENmodel*,CKTcircuit*,double*); extern int HFETAunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/hfet1/hfetdel.c0000644000265600020320000000163512264261473021027 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into hfeta model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance **fast = (HFETAinstance**)inst; HFETAinstance **prev = NULL; HFETAinstance *here; for( ; model ; model = model->HFETAnextModel) { prev = &(model->HFETAinstances); for(here = *prev; here ; here = *prev) { if(here->HFETAname == name || (fast && here==*fast) ) { *prev= here->HFETAnextInstance; FREE(here); return(OK); } prev = &(here->HFETAnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/hfet1/hfetdest.c0000644000265600020320000000135212264261473021216 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "hfetdefs.h" #include "ngspice/suffix.h" void HFETAdestroy(GENmodel **inModel) { HFETAmodel **model = (HFETAmodel**)inModel; HFETAinstance *here; HFETAinstance *prev = NULL; HFETAmodel *mod = *model; HFETAmodel *oldmod = NULL; for( ; mod ; mod = mod->HFETAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->HFETAinstances ; here ; here = here->HFETAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/hfet1/hfetask.c0000644000265600020320000001237712264261473021046 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* Imported into HFETA source: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFETAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { HFETAinstance *here = (HFETAinstance*)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case HFETA_LENGTH: value->rValue = here->HFETAlength; return (OK); case HFETA_WIDTH: value->rValue = here->HFETAwidth; value->rValue *= here->HFETAm; return (OK); case HFETA_M: value->rValue = here->HFETAm; return (OK); case HFETA_IC_VDS: value->rValue = here->HFETAicVDS; return (OK); case HFETA_IC_VGS: value->rValue = here->HFETAicVGS; return (OK); case HFETA_OFF: value->iValue = here->HFETAoff; return (OK); case HFETA_DRAINNODE: value->iValue = here->HFETAdrainNode; return (OK); case HFETA_GATENODE: value->iValue = here->HFETAgateNode; return (OK); case HFETA_SOURCENODE: value->iValue = here->HFETAsourceNode; return (OK); case HFETA_DRAINPRIMENODE: value->iValue = here->HFETAdrainPrimeNode; return (OK); case HFETA_SOURCEPRIMENODE: value->iValue = here->HFETAsourcePrimeNode; return (OK); case HFETA_TEMP: value->rValue = here->HFETAtemp - CONSTCtoK; return(OK); case HFETA_DTEMP: value->rValue = here->HFETAdtemp; return(OK); case HFETA_VGS: value->rValue = *(ckt->CKTstate0 + here->HFETAvgs); return (OK); case HFETA_VGD: value->rValue = *(ckt->CKTstate0 + here->HFETAvgd); return (OK); case HFETA_CG: value->rValue = *(ckt->CKTstate0 + here->HFETAcg); value->rValue *= here->HFETAm; return (OK); case HFETA_CD: value->rValue = *(ckt->CKTstate0 + here->HFETAcd); value->rValue *= here->HFETAm; return (OK); case HFETA_CGD: value->rValue = *(ckt->CKTstate0 + here->HFETAcgd); value->rValue *= here->HFETAm; return (OK); case HFETA_GM: value->rValue = *(ckt->CKTstate0 + here->HFETAgm); value->rValue *= here->HFETAm; return (OK); case HFETA_GDS: value->rValue = *(ckt->CKTstate0 + here->HFETAgds); value->rValue *= here->HFETAm; return (OK); case HFETA_GGS: value->rValue = *(ckt->CKTstate0 + here->HFETAggs); value->rValue *= here->HFETAm; return (OK); case HFETA_GGD: value->rValue = *(ckt->CKTstate0 + here->HFETAggd); value->rValue *= here->HFETAm; return (OK); case HFETA_QGS: value->rValue = *(ckt->CKTstate0 + here->HFETAqgs); value->rValue *= here->HFETAm; return (OK); case HFETA_CQGS: value->rValue = *(ckt->CKTstate0 + here->HFETAcqgs); value->rValue *= here->HFETAm; return (OK); case HFETA_QGD: value->rValue = *(ckt->CKTstate0 + here->HFETAqgd); value->rValue *= here->HFETAm; return (OK); case HFETA_CQGD: value->rValue = *(ckt->CKTstate0 + here->HFETAcqgd); value->rValue *= here->HFETAm; return (OK); case HFETA_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "HFETAask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->HFETAcd); value->rValue -= *(ckt->CKTstate0 + here->HFETAcg); value->rValue *= here->HFETAm; } return(OK); case HFETA_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "HFETAask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->HFETAcd) * *(ckt->CKTrhsOld + here->HFETAdrainNode); value->rValue += *(ckt->CKTstate0 + here->HFETAcg) * *(ckt->CKTrhsOld + here->HFETAgateNode); value->rValue -= (*(ckt->CKTstate0+here->HFETAcd) + *(ckt->CKTstate0 + here->HFETAcg)) * *(ckt->CKTrhsOld + here->HFETAsourceNode); value->rValue *= here->HFETAm; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hfet1/hfetparam.c0000644000265600020320000000365512264261473021367 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFETAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { HFETAinstance *here = (HFETAinstance*)inst; NG_IGNORE(select); switch(param) { case HFETA_LENGTH: here->HFETAlength = value->rValue; here->HFETAlengthGiven = TRUE; break; case HFETA_WIDTH: here->HFETAwidth = value->rValue; here->HFETAwidthGiven = TRUE; break; case HFETA_M: here->HFETAm = value->rValue; here->HFETAmGiven = TRUE; break; case HFETA_IC_VDS: here->HFETAicVDS = value->rValue; here->HFETAicVDSGiven = TRUE; break; case HFETA_IC_VGS: here->HFETAicVGS = value->rValue; here->HFETAicVGSGiven = TRUE; break; case HFETA_OFF: here->HFETAoff = value->iValue; break; case HFETA_IC: switch(value->v.numValue) { case 2: here->HFETAicVGS = *(value->v.vec.rVec+1); here->HFETAicVGSGiven = TRUE; case 1: here->HFETAicVDS = *(value->v.vec.rVec); here->HFETAicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case HFETA_TEMP: here->HFETAtemp = value->rValue + CONSTCtoK; here->HFETAtempGiven = TRUE; break; case HFETA_DTEMP: here->HFETAdtemp = value->rValue; here->HFETAdtempGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetsetup.c0000644000265600020320000003477712264261473021440 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* #define HFETAphibGiven #define CHARGE 1.60219e-19 */ int HFETAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the diode structure with those pointers needed later * for fast matrix loading */ { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->HFETAnextModel ) { if( (model->HFETAtype != NHFET) && (model->HFETAtype != PHFET) ) { model->HFETAtype = NHFET; } if(!model->HFETAthresholdGiven) { if(model->HFETAtype == NHFET) model->HFETAthreshold = 0.15; else model->HFETAthreshold = -0.15; } if(!model->HFETAdiGiven) { model->HFETAdi = 0.04e-6; } if(!model->HFETAlambdaGiven) { model->HFETAlambda = 0.15; } if(!model->HFETAetaGiven) { if(model->HFETAtype == NHFET) model->HFETAeta = 1.28; else model->HFETAeta = 1.4; } if(!model->HFETAmGiven) { model->HFETAm = 3.0; } if(!model->HFETAmcGiven) { model->HFETAmc = 3.0; } if(!model->HFETAgammaGiven) { model->HFETAgamma = 3.0; } if(!model->HFETAsigma0Given) { model->HFETAsigma0 = 0.057; } if(!model->HFETAvsigmatGiven) { model->HFETAvsigmat = 0.3; } if(!model->HFETAvsigmaGiven) { model->HFETAvsigma = 0.1; } if(!model->HFETAmuGiven) { if(model->HFETAtype == NHFET) model->HFETAmu = 0.4; else model->HFETAmu = 0.03; } if(!model->HFETAdeltaGiven) { model->HFETAdelta = 3.0; } if(!model->HFETAvsGiven) { if(model->HFETAtype == NHFET) model->HFETAvs = 1.5e5; else model->HFETAvs = 0.8e5; } if(!model->HFETAnmaxGiven) { model->HFETAnmax = 2e16; } if(!model->HFETAdeltadGiven) { model->HFETAdeltad = 4.5e-9; } if(!model->HFETAjs1dGiven) { model->HFETAjs1d = 1.0; } if(!model->HFETAjs2dGiven) { model->HFETAjs2d = 1.15e6; } if(!model->HFETAjs1sGiven) { model->HFETAjs1s = 1.0; } if(!model->HFETAjs2sGiven) { model->HFETAjs2s = 1.15e6; } if(!model->HFETAm1dGiven) { model->HFETAm1d = 1.32; } if(!model->HFETAm2dGiven) { model->HFETAm2d = 6.9; } if(!model->HFETAm1sGiven) { model->HFETAm1s = 1.32; } if(!model->HFETAm2sGiven) { model->HFETAm2s = 6.9; } if(!model->HFETArdGiven) { model->HFETArd = 0; } if(!model->HFETArsGiven) { model->HFETArs = 0; } if(!model->HFETArdiGiven) { model->HFETArdi = 0; } if(!model->HFETArsiGiven) { model->HFETArsi = 0; } if(!model->HFETArgsGiven) { model->HFETArgs = 90; } if(!model->HFETArgdGiven) { model->HFETArgd = 90; } if(!model->HFETAriGiven) { model->HFETAri = 0; } if(!model->HFETArfGiven) { model->HFETArf = 0; } if(!model->HFETAepsiGiven) { model->HFETAepsi = 12.244*8.85418e-12; } if(!model->HFETAa1Given) { model->HFETAa1 = 0; } if(!model->HFETAa2Given) { model->HFETAa2 = 0; } if(!model->HFETAmv1Given) { model->HFETAmv1 = 3; } if(!model->HFETApGiven) { model->HFETAp = 1; } if(!model->HFETAkappaGiven) { model->HFETAkappa = 0; } if(!model->HFETAdelfGiven) { model->HFETAdelf = 0; } if(!model->HFETAfgdsGiven) { model->HFETAfgds = 0; } if(!model->HFETAtfGiven) { model->HFETAtf = ckt->CKTtemp; } if(!model->HFETAcdsGiven) { model->HFETAcds = 0; } if(!model->HFETAphibGiven) { model->HFETAphib = 0.5*CHARGE; } if(!model->HFETAtalphaGiven) { model->HFETAtalpha = 1200; } if(!model->HFETAmt1Given) { model->HFETAmt1 = 3.5; } if(!model->HFETAmt2Given) { model->HFETAmt2 = 9.9; } if(!model->HFETAck1Given) { model->HFETAck1 = 1; } if(!model->HFETAck2Given) { model->HFETAck2 = 0; } if(!model->HFETAcm1Given) { model->HFETAcm1 = 3; } if(!model->HFETAcm2Given) { model->HFETAcm2 = 0; } if(!model->HFETAcm3Given) { model->HFETAcm3 = 0.17; } if(!model->HFETAastarGiven) { model->HFETAastar = 4.0e4; } if(!model->HFETAeta1Given) { model->HFETAeta1 = 2; } if(!model->HFETAd1Given) { model->HFETAd1 = 0.03e-6; } if(!model->HFETAeta2Given) { model->HFETAeta2 = 2; } if(!model->HFETAd2Given) { model->HFETAd2 = 0.2e-6; } if(!model->HFETAvt2Given) { /* initialized in HFETAtemp */ model->HFETAvt2 = 0; } if(!model->HFETAggrGiven) { model->HFETAggr = 40; } if(!model->HFETAdelGiven) { model->HFETAdel = 0.04; } if(!model->HFETAklambdaGiven) KLAMBDA = 0; if(!model->HFETAkmuGiven) KMU = 0; if(!model->HFETAkvtoGiven) KVTO = 0; /* loop through all the instances of the model */ for (here = model->HFETAinstances; here != NULL ; here=here->HFETAnextInstance) { if(!here->HFETAlengthGiven) { here->HFETAlength = 1e-6; } if(!here->HFETAwidthGiven) { here->HFETAwidth = 20e-6; } if(!here->HFETAmGiven) { here->HFETAm = 1.0; } here->HFETAstate = *states; /* *states += 24; */ *states += HFETAnumStates; if(model->HFETArs != 0) { if(here->HFETAsourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFETAname,"source"); if(error) return(error); here->HFETAsourcePrimeNode = tmp->number; /* XXX: Applied AlansFixes */ if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFETAsourcePrimeNode = here->HFETAsourceNode; } if(model->HFETArd != 0) { if(here->HFETAdrainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFETAname,"drain"); if(error) return(error); here->HFETAdrainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFETAdrainPrimeNode = here->HFETAdrainNode; } if(model->HFETArg != 0) { if(here->HFETAgatePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFETAname,"gate"); if(error) return(error); here->HFETAgatePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFETAgatePrimeNode = here->HFETAgateNode; } if(model->HFETArf != 0) { if(here->HFETAdrainPrmPrmNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFETAname,"gd"); if(error) return(error); here->HFETAdrainPrmPrmNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFETAdrainPrmPrmNode = here->HFETAdrainPrimeNode; } if(model->HFETAri != 0) { if(here->HFETAsourcePrmPrmNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFETAname,"gs"); if(error) return(error); here->HFETAsourcePrmPrmNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFETAsourcePrmPrmNode = here->HFETAsourcePrimeNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(HFETAdrainDrainPrimePtr,HFETAdrainNode,HFETAdrainPrimeNode); TSTALLOC(HFETAgatePrimeDrainPrimePtr,HFETAgatePrimeNode,HFETAdrainPrimeNode); TSTALLOC(HFETAgatePrimeSourcePrimePtr,HFETAgatePrimeNode,HFETAsourcePrimeNode); TSTALLOC(HFETAsourceSourcePrimePtr,HFETAsourceNode,HFETAsourcePrimeNode); TSTALLOC(HFETAdrainPrimeDrainPtr,HFETAdrainPrimeNode,HFETAdrainNode); TSTALLOC(HFETAdrainPrimeGatePrimePtr,HFETAdrainPrimeNode,HFETAgatePrimeNode); TSTALLOC(HFETAdrainPrimeSourcePrimePtr,HFETAdrainPrimeNode,HFETAsourcePrimeNode); TSTALLOC(HFETAsourcePrimeGatePrimePtr,HFETAsourcePrimeNode,HFETAgatePrimeNode); TSTALLOC(HFETAsourcePrimeSourcePtr,HFETAsourcePrimeNode,HFETAsourceNode); TSTALLOC(HFETAsourcePrimeDrainPrimePtr,HFETAsourcePrimeNode,HFETAdrainPrimeNode); TSTALLOC(HFETAdrainDrainPtr,HFETAdrainNode,HFETAdrainNode); TSTALLOC(HFETAgatePrimeGatePrimePtr,HFETAgatePrimeNode,HFETAgatePrimeNode); TSTALLOC(HFETAsourceSourcePtr,HFETAsourceNode,HFETAsourceNode); TSTALLOC(HFETAdrainPrimeDrainPrimePtr,HFETAdrainPrimeNode,HFETAdrainPrimeNode); TSTALLOC(HFETAsourcePrimeSourcePrimePtr,HFETAsourcePrimeNode,HFETAsourcePrimeNode); TSTALLOC(HFETAdrainPrimeDrainPrmPrmPtr,HFETAdrainPrimeNode,HFETAdrainPrmPrmNode); TSTALLOC(HFETAdrainPrmPrmDrainPrimePtr,HFETAdrainPrmPrmNode,HFETAdrainPrimeNode); TSTALLOC(HFETAdrainPrmPrmGatePrimePtr,HFETAdrainPrmPrmNode,HFETAgatePrimeNode); TSTALLOC(HFETAgatePrimeDrainPrmPrmPtr,HFETAgatePrimeNode,HFETAdrainPrmPrmNode); TSTALLOC(HFETAdrainPrmPrmDrainPrmPrmPtr,HFETAdrainPrmPrmNode,HFETAdrainPrmPrmNode); TSTALLOC(HFETAsourcePrimeSourcePrmPrmPtr,HFETAsourcePrimeNode,HFETAsourcePrmPrmNode); TSTALLOC(HFETAsourcePrmPrmSourcePrimePtr,HFETAsourcePrmPrmNode,HFETAsourcePrimeNode); TSTALLOC(HFETAsourcePrmPrmGatePrimePtr,HFETAsourcePrmPrmNode,HFETAgatePrimeNode); TSTALLOC(HFETAgatePrimeSourcePrmPrmPtr,HFETAgatePrimeNode,HFETAsourcePrmPrmNode); TSTALLOC(HFETAsourcePrmPrmSourcePrmPrmPtr,HFETAsourcePrmPrmNode,HFETAsourcePrmPrmNode); TSTALLOC(HFETAgateGatePtr,HFETAgateNode,HFETAgateNode); TSTALLOC(HFETAgateGatePrimePtr,HFETAgateNode,HFETAgatePrimeNode); TSTALLOC(HFETAgatePrimeGatePtr,HFETAgatePrimeNode,HFETAgateNode); } } return(OK); } int HFETAunsetup(GENmodel *inModel, CKTcircuit *ckt) { HFETAmodel *model; HFETAinstance *here; for (model = (HFETAmodel *)inModel; model != NULL; model = model->HFETAnextModel) { for (here = model->HFETAinstances; here != NULL; here=here->HFETAnextInstance) { if (here->HFETAdrainPrimeNode && here->HFETAdrainPrimeNode != here->HFETAdrainNode) { CKTdltNNum(ckt, here->HFETAdrainPrimeNode); here->HFETAdrainPrimeNode = 0; } if (here->HFETAsourcePrimeNode && here->HFETAsourcePrimeNode != here->HFETAsourceNode) { CKTdltNNum(ckt, here->HFETAsourcePrimeNode); here->HFETAsourcePrimeNode = 0; } if (here->HFETAgatePrimeNode && here->HFETAgatePrimeNode != here->HFETAgateNode) { CKTdltNNum(ckt, here->HFETAgatePrimeNode); here->HFETAgatePrimeNode = 0; } if (here->HFETAdrainPrmPrmNode && here->HFETAdrainPrmPrmNode != here->HFETAdrainPrimeNode) { CKTdltNNum(ckt, here->HFETAdrainPrmPrmNode); here->HFETAdrainPrmPrmNode = 0; } if (here->HFETAsourcePrmPrmNode && here->HFETAsourcePrmPrmNode != here->HFETAsourcePrimeNode) { CKTdltNNum(ckt, here->HFETAsourcePrmPrmNode); here->HFETAsourcePrmPrmNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/hfet1/hfetload.c0000644000265600020320000007333512264261473021210 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* #define true 1 #define false 0 */ /* #define PHIB 0.5 */ double diode(double); static void leak(double gmin, double vt, double v, double rs, double is1, double is2, double m1, double m2, double *il, double *gl); static void hfeta(HFETAmodel *model, HFETAinstance *here, CKTcircuit *ckt, double vgs, double vds, double *cdrain, double *gm, double *gds, double *capgs, double *capgd, double *cgd, double *gmg, double *gmd, double *cgs, double *ggs); void Pause(void); int HFETAload(GENmodel *inModel, CKTcircuit *ckt) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; double capgd; double capgs; double cd; double cdhat = 0.0; double cdrain; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd=0; double cgs=0; double cghat = 0.0; double delvds; double delvgd; double delvgs; double delvgdpp=0; double delvgspp=0; double gds; double geq; double ggd=0; double ggs=0; double gm; double vcrit; double vds; double vgd; double vgs; double vgs1; double vgd1; double vds1; #ifndef PREDICTOR double xfact; #endif double temp; double vt; double vgspp=0; double vgdpp=0; double cgspp=0; double cgdpp=0; double ggspp=0; double ggdpp=0; double gmg=0; double gmd=0; int inverse=FALSE; int icheck; int error; double m; for( ; model != NULL; model = model->HFETAnextModel ) { for (here = model->HFETAinstances; here != NULL ; here=here->HFETAnextInstance) { vcrit = here->HFETAvcrit; vt = CONSTKoverQ * here->HFETAtemp; icheck = 0; if( ckt->CKTmode & MODEINITSMSIG) { vgs = *(ckt->CKTstate0 + here->HFETAvgs); vgd = *(ckt->CKTstate0 + here->HFETAvgd); vgspp = *(ckt->CKTstate0 + here->HFETAvgspp); vgdpp = *(ckt->CKTstate0 + here->HFETAvgdpp); } else if (ckt->CKTmode & MODEINITTRAN) { vgs = *(ckt->CKTstate1 + here->HFETAvgs); vgd = *(ckt->CKTstate1 + here->HFETAvgd); vgspp = *(ckt->CKTstate1 + here->HFETAvgspp); vgdpp = *(ckt->CKTstate1 + here->HFETAvgdpp); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds = model->HFETAtype*here->HFETAicVDS; vgs = model->HFETAtype*here->HFETAicVGS; vgd = vgs-vds; vgspp = vgs; vgdpp = vgd; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->HFETAoff == 0) ) { vgs = -1; vgd = -1; vgspp = 0; vgdpp = 0; } else if( (ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->HFETAoff))) { vgs = 0; vgd = 0; vgspp = 0; vgdpp = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[2]; *(ckt->CKTstate0 + here->HFETAvgs) = *(ckt->CKTstate1 + here->HFETAvgs); vgs = (1+xfact) * *(ckt->CKTstate1 + here->HFETAvgs) - xfact * *(ckt->CKTstate2 + here->HFETAvgs); *(ckt->CKTstate0 + here->HFETAvgspp) = *(ckt->CKTstate1 + here->HFETAvgspp); vgspp = (1+xfact) * *(ckt->CKTstate1 + here->HFETAvgspp) - xfact * *(ckt->CKTstate2 + here->HFETAvgspp); *(ckt->CKTstate0 + here->HFETAvgd) = *(ckt->CKTstate1 + here->HFETAvgd); vgd = (1+xfact)* *(ckt->CKTstate1 + here->HFETAvgd) - xfact * *(ckt->CKTstate2 + here->HFETAvgd); *(ckt->CKTstate0 + here->HFETAvgdpp) = *(ckt->CKTstate1 + here->HFETAvgdpp); vgdpp = (1+xfact) * *(ckt->CKTstate1 + here->HFETAvgdpp) - xfact * *(ckt->CKTstate2 + here->HFETAvgdpp); *(ckt->CKTstate0 + here->HFETAcg) = *(ckt->CKTstate1 + here->HFETAcg); *(ckt->CKTstate0 + here->HFETAcd) = *(ckt->CKTstate1 + here->HFETAcd); *(ckt->CKTstate0 + here->HFETAcgd) = *(ckt->CKTstate1 + here->HFETAcgd); *(ckt->CKTstate0 + here->HFETAcgs) = *(ckt->CKTstate1 + here->HFETAcgs); *(ckt->CKTstate0 + here->HFETAcgspp) = *(ckt->CKTstate1 + here->HFETAcgspp); *(ckt->CKTstate0 + here->HFETAcgdpp) = *(ckt->CKTstate1 + here->HFETAcgdpp); *(ckt->CKTstate0 + here->HFETAgm) = *(ckt->CKTstate1 + here->HFETAgm); *(ckt->CKTstate0 + here->HFETAgds) = *(ckt->CKTstate1 + here->HFETAgds); *(ckt->CKTstate0 + here->HFETAggs) = *(ckt->CKTstate1 + here->HFETAggs); *(ckt->CKTstate0 + here->HFETAggspp) = *(ckt->CKTstate1 + here->HFETAggspp); *(ckt->CKTstate0 + here->HFETAggd) = *(ckt->CKTstate1 + here->HFETAggd); *(ckt->CKTstate0 + here->HFETAggdpp) = *(ckt->CKTstate1 + here->HFETAggdpp); *(ckt->CKTstate0 + here->HFETAgmg) = *(ckt->CKTstate1 + here->HFETAgmg); *(ckt->CKTstate0 + here->HFETAgmd) = *(ckt->CKTstate1 + here->HFETAgmd); } else { #endif /* PREDICTOR */ /* * compute new nonlinear branch voltages */ vgs = model->HFETAtype* (*(ckt->CKTrhsOld+ here->HFETAgatePrimeNode)- *(ckt->CKTrhsOld+ here->HFETAsourcePrimeNode)); vgd = model->HFETAtype* (*(ckt->CKTrhsOld+here->HFETAgatePrimeNode)- *(ckt->CKTrhsOld+ here->HFETAdrainPrimeNode)); vgspp = model->HFETAtype* (*(ckt->CKTrhsOld+ here->HFETAgatePrimeNode)- *(ckt->CKTrhsOld+ here->HFETAsourcePrmPrmNode)); vgdpp = model->HFETAtype* (*(ckt->CKTrhsOld+ here->HFETAgatePrimeNode)- *(ckt->CKTrhsOld+ here->HFETAdrainPrmPrmNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvgs=vgs - *(ckt->CKTstate0 + here->HFETAvgs); delvgd=vgd - *(ckt->CKTstate0 + here->HFETAvgd); delvds=delvgs - delvgd; delvgspp=vgspp - *(ckt->CKTstate0 + here->HFETAvgspp); delvgdpp=vgdpp - *(ckt->CKTstate0 + here->HFETAvgdpp); cghat= *(ckt->CKTstate0 + here->HFETAcg) + *(ckt->CKTstate0 + here->HFETAgmg)*delvgs - *(ckt->CKTstate0 + here->HFETAgmd)*delvds + *(ckt->CKTstate0 + here->HFETAggd)*delvgd + *(ckt->CKTstate0 + here->HFETAggs)*delvgs + *(ckt->CKTstate0 + here->HFETAggdpp)*delvgdpp + *(ckt->CKTstate0 + here->HFETAggspp)*delvgspp; cdhat= *(ckt->CKTstate0 + here->HFETAcd) + *(ckt->CKTstate0 + here->HFETAgm)*delvgs + *(ckt->CKTstate0 + here->HFETAgds)*delvds - *(ckt->CKTstate0 + here->HFETAggd)*delvgd - (*(ckt->CKTstate0 + here->HFETAgmg)*delvgs - *(ckt->CKTstate0 + here->HFETAgmd)*delvds); /* * bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->HFETAvgs)))+ ckt->CKTvoltTol) ) if ( (fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->HFETAvgd)))+ ckt->CKTvoltTol)) if ( (fabs(delvgspp) < ckt->CKTreltol*MAX(fabs(vgspp), fabs(*(ckt->CKTstate0 + here->HFETAvgspp)))+ ckt->CKTvoltTol)) if ( (fabs(delvgdpp) < ckt->CKTreltol*MAX(fabs(vgdpp), fabs(*(ckt->CKTstate0 + here->HFETAvgdpp)))+ ckt->CKTvoltTol)) if ( (fabs(cghat-*(ckt->CKTstate0 + here->HFETAcg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->HFETAcg)))+ ckt->CKTabstol) ) if ( /* hack - expression too big */ (fabs(cdhat-*(ckt->CKTstate0 + here->HFETAcd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->HFETAcd)))+ ckt->CKTabstol) ) { /* we can do a bypass */ vgs = *(ckt->CKTstate0 + here->HFETAvgs); vgd = *(ckt->CKTstate0 + here->HFETAvgd); vds = vgs-vgd; vgspp = *(ckt->CKTstate0 + here->HFETAvgspp); vgdpp = *(ckt->CKTstate0 + here->HFETAvgdpp); cg = *(ckt->CKTstate0 + here->HFETAcg); cd = *(ckt->CKTstate0 + here->HFETAcd); cgd = *(ckt->CKTstate0 + here->HFETAcgd); cgs = *(ckt->CKTstate0 + here->HFETAcgs); cgdpp = *(ckt->CKTstate0 + here->HFETAcgdpp); cgspp = *(ckt->CKTstate0 + here->HFETAcgspp); gm = *(ckt->CKTstate0 + here->HFETAgm); gds = *(ckt->CKTstate0 + here->HFETAgds); ggs = *(ckt->CKTstate0 + here->HFETAggs); ggd = *(ckt->CKTstate0 + here->HFETAggd); ggdpp = *(ckt->CKTstate0 + here->HFETAggdpp); ggspp = *(ckt->CKTstate0 + here->HFETAggspp); gmg = *(ckt->CKTstate0 + here->HFETAgmg); gmd = *(ckt->CKTstate0 + here->HFETAgmd); goto load; } /* * limit nonlinear branch voltages */ vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->HFETAvgs),TVTO); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->HFETAvgd),TVTO); } /* * determine dc current and derivatives */ vds = vgs-vgd; if(model->HFETAgatemod == 0) { double arg; double earg; if(IS1S == 0 || IS2S == 0) { cgs = 0; ggs = 0; } else leak(ckt->CKTgmin,vt,vgs,RGS,IS1S,IS2S,M1S,M2S,&cgs,&ggs); arg = -vgs*DEL/vt; earg = exp(arg); cgs += GGRWL*vgs*earg; ggs += GGRWL*earg*(1-arg); if(IS1D == 0 || IS2D == 0) { cgd = 0; ggd = 0; } else leak(ckt->CKTgmin,vt,vgd,RGD,IS1D,IS2D,M1D,M2D,&cgd,&ggd); arg = -vgd*DEL/vt; earg = exp(arg); cgd += GGRWL*vgd*earg; ggd += GGRWL*earg*(1-arg); } else ggd = 0; if(vds < 0) { vds = -vds; inverse = TRUE; } hfeta(model,here,ckt,vds>0?vgs:vgd,vds,&cdrain,&gm,&gds,&capgs,&capgd, &cgd,&gmg,&gmd,&cgs,&ggs); cg = cgs+cgd; if(inverse) { cdrain = -cdrain; vds = -vds; temp = capgs; capgs = capgd; capgd = temp; } /* * compute equivalent drain current source */ cd = cdrain - cgd; if ( (ckt->CKTmode & (MODETRAN|MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * charge storage elements */ vgs1 = *(ckt->CKTstate1 + here->HFETAvgspp); vgd1 = *(ckt->CKTstate1 + here->HFETAvgdpp); vds1 = *(ckt->CKTstate1 + here->HFETAvgs)- *(ckt->CKTstate1 + here->HFETAvgd); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFETAqgs) = capgs*vgspp; *(ckt->CKTstate1 + here->HFETAqgd) = capgd*vgdpp; *(ckt->CKTstate1 + here->HFETAqds) = CDS*vds; } *(ckt->CKTstate0+here->HFETAqgs) = *(ckt->CKTstate1 + here->HFETAqgs) + capgs*(vgspp-vgs1); *(ckt->CKTstate0+here->HFETAqgd) = *(ckt->CKTstate1 + here->HFETAqgd) + capgd*(vgdpp-vgd1); *(ckt->CKTstate0+here->HFETAqds) = *(ckt->CKTstate1 + here->HFETAqds) + CDS*(vds-vds1); /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->HFETAqgs) = capgs; *(ckt->CKTstate0 + here->HFETAqgd) = capgd; *(ckt->CKTstate0 + here->HFETAqds) = CDS; continue; /*go to 1000*/ } /* * transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFETAqgs) = *(ckt->CKTstate0 + here->HFETAqgs); *(ckt->CKTstate1 + here->HFETAqgd) = *(ckt->CKTstate0 + here->HFETAqgd); *(ckt->CKTstate1 + here->HFETAqds) = *(ckt->CKTstate0 + here->HFETAqds); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->HFETAqgs); if(error) return(error); ggspp = geq; cgspp = *(ckt->CKTstate0 + here->HFETAcqgs); cg = cg + cgspp; error = NIintegrate(ckt,&geq,&ceq,capgd,here->HFETAqgd); if(error) return(error); ggdpp = geq; cgdpp = *(ckt->CKTstate0 + here->HFETAcqgd); cg = cg + cgdpp; cd = cd - cgdpp; error = NIintegrate(ckt,&geq,&ceq,CDS,here->HFETAqds); if(error) return(error); gds += geq; cd += *(ckt->CKTstate0 + here->HFETAcqds); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFETAcqgs) = *(ckt->CKTstate0 + here->HFETAcqgs); *(ckt->CKTstate1 + here->HFETAcqgd) = *(ckt->CKTstate0 + here->HFETAcqgd); *(ckt->CKTstate1 + here->HFETAcqds) = *(ckt->CKTstate0 + here->HFETAcqds); } } } /* * check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if( (icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol* MAX(fabs(cghat),fabs(cg))+ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol) ) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->HFETAvgs) = vgs; *(ckt->CKTstate0 + here->HFETAvgd) = vgd; *(ckt->CKTstate0 + here->HFETAvgspp) = vgspp; *(ckt->CKTstate0 + here->HFETAvgdpp) = vgdpp; *(ckt->CKTstate0 + here->HFETAcg) = cg; *(ckt->CKTstate0 + here->HFETAcd) = cd; *(ckt->CKTstate0 + here->HFETAcgd) = cgd; *(ckt->CKTstate0 + here->HFETAcgs) = cgs; *(ckt->CKTstate0 + here->HFETAcgspp) = cgspp; *(ckt->CKTstate0 + here->HFETAcgdpp) = cgdpp; *(ckt->CKTstate0 + here->HFETAgm) = gm; *(ckt->CKTstate0 + here->HFETAgds) = gds; *(ckt->CKTstate0 + here->HFETAggs) = ggs; *(ckt->CKTstate0 + here->HFETAggd) = ggd; *(ckt->CKTstate0 + here->HFETAggspp) = ggspp; *(ckt->CKTstate0 + here->HFETAggdpp) = ggdpp; *(ckt->CKTstate0 + here->HFETAgmg) = gmg; *(ckt->CKTstate0 + here->HFETAgmd) = gmd; /* * load current vector */ load: m = here->HFETAm; ceqgd = model->HFETAtype*(cgd+cgdpp-ggd*vgd-gmg*vgs-gmd*vds-ggdpp*vgdpp); ceqgs = model->HFETAtype*(cgs + cgspp - ggs*vgs - ggspp*vgspp); cdreq = model->HFETAtype*(cd + cgd + cgdpp - gds*vds - gm*vgs); *(ckt->CKTrhs + here->HFETAgatePrimeNode) += m * (-ceqgs-ceqgd); ceqgd = model->HFETAtype*(cgd-ggd*vgd-gmg*vgs-gmd*vds); *(ckt->CKTrhs + here->HFETAdrainPrimeNode) += m * (-cdreq+ceqgd); ceqgd = model->HFETAtype*(cgdpp-ggdpp*vgdpp); *(ckt->CKTrhs + here->HFETAdrainPrmPrmNode) += m * ceqgd; ceqgs = model->HFETAtype*(cgs-ggs*vgs); *(ckt->CKTrhs + here->HFETAsourcePrimeNode) += m * (cdreq+ceqgs); ceqgs = model->HFETAtype*(cgspp-ggspp*vgspp); *(ckt->CKTrhs + here->HFETAsourcePrmPrmNode) += m * ceqgs; /* * load y matrix */ *(here->HFETAdrainDrainPtr) += m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePtr) += m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeGatePrimePtr) += m * (ggd+ggs+ggspp+ggdpp+gmg+model->HFETAgateConduct); *(here->HFETAdrainPrimeDrainPrimePtr) += m * (gds+ggd-gmd+model->HFETAdrainConduct+model->HFETAgf); *(here->HFETAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+model->HFETAsourceConduct+model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrmPrmPtr) += m * (model->HFETAgi+ggspp); *(here->HFETAdrainPrmPrmDrainPrmPrmPtr) += m * (model->HFETAgf+ggdpp); *(here->HFETAdrainDrainPrimePtr) -= m * (model->HFETAdrainConduct); *(here->HFETAdrainPrimeDrainPtr) -= m * (model->HFETAdrainConduct); *(here->HFETAsourceSourcePrimePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAsourcePrimeSourcePtr) -= m * (model->HFETAsourceConduct); *(here->HFETAgatePrimeDrainPrimePtr) += m * (-ggd+gmd); *(here->HFETAdrainPrimeGatePrimePtr) += m * (gm-ggd-gmg); *(here->HFETAgatePrimeSourcePrimePtr) -= m * (ggs+gmg+gmd); *(here->HFETAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->HFETAdrainPrimeSourcePrimePtr) += m * (-gds-gm+gmg+gmd); *(here->HFETAsourcePrimeDrainPrimePtr) -= m * (gds); *(here->HFETAsourcePrimeSourcePrmPrmPtr) -= m * (model->HFETAgi); *(here->HFETAsourcePrmPrmSourcePrimePtr) -= m * (model->HFETAgi); *(here->HFETAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->HFETAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->HFETAdrainPrimeDrainPrmPrmPtr) -= m * (model->HFETAgf); *(here->HFETAdrainPrmPrmDrainPrimePtr) -= m * (model->HFETAgf); *(here->HFETAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->HFETAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); *(here->HFETAgateGatePtr) += m * (model->HFETAgateConduct); *(here->HFETAgateGatePrimePtr) -= m * (model->HFETAgateConduct); *(here->HFETAgatePrimeGatePtr) -= m * (model->HFETAgateConduct); } } return(OK); } static void leak(double gmin, double vt, double v, double rs, double is1, double is2, double m1, double m2, double *il, double *gl) { double vt1 = vt*m1; double vt2 = vt*m2; if(v > -10*vt1) { double dvdi0; double iaprox; double iaprox1; double iaprox2; double v0; double vteff = vt1 + vt2; double iseff = is2*pow((is1/is2),(m1/(m1+m2))); if(rs > 0) { double unorm = (v + rs*is1)/vt1 + log(rs*is1/vt1); iaprox1 = vt1*diode(unorm)/rs - is1; unorm = (v + rs*iseff)/vteff + log(rs*iseff/vteff); iaprox2 = vteff*diode(unorm)/rs - iseff; } else { iaprox1 = is1*(exp(v/vt1) - 1); iaprox2 = iseff*(exp(v/vteff) - 1); } if((iaprox1*iaprox2) != 0.0) iaprox = 1./(1./iaprox1 + 1./iaprox2); else iaprox = 0.5*(iaprox1 + iaprox2); dvdi0 = rs + vt1/(iaprox+is1) + vt2/(iaprox+is2); v0 = rs*iaprox; v0 += vt1*log(iaprox/is1 + 1) + vt2*log(iaprox/is2 + 1); /* *il = __max(-is1,iaprox + (v - v0)/dvdi0)*0.99999; */ *il = MAX(-is1,iaprox + (v - v0)/dvdi0)*0.99999; *gl = 1./(rs + vt1/(*il+is1) + vt2/(*il+is2)); } else { *gl = gmin; *il = (*gl)*v-is1; } } static void hfeta(HFETAmodel *model, HFETAinstance *here, CKTcircuit *ckt, double vgs, double vds, double *cdrain, double *gm, double *gds, double *capgs, double *capgd, double *cgd, double *gmg, double *gmd, double *cgs, double *ggs) { double vt; double vgt; double vgt0; double sigma; double vgte; double isat; double isatm; double ns; double nsm; double a; double b; double c; double d; double e; double f; double g; double h; double p; double q; double s; double t; double u; double nsc = 0.0; double nsn = 0.0; double temp; double etavth; double gch; double gchi; double gchim; double vsate = 0.0; double vdse; double cg1; double cgc; double rt; double vl; double delidgch; double delgchgchi; double delgchins; double delnsnsm; double delnsmvgt; double delvgtevgt = 0.0; double delidvsate; double delvsateisat; double delisatisatm; double delisatmvgte; double delisatmgchim; double delvsategch; double delidvds; double delvgtvgs = 0.0; double delvsatevgt = 0.0; vt = CONSTKoverQ*TEMP; etavth = ETA*vt; vl = VS/TMU*L; rt = RSI+RDI; vgt0 = vgs - TVTO; s = exp((vgt0-VSIGMAT)/VSIGMA); sigma = SIGMA0/(1+s); vgt = vgt0+sigma*vds; u = 0.5*vgt/vt-1; t = sqrt(model->HFETAdeltaSqr+u*u); vgte = vt*(2+u+t); b = exp(vgt/etavth); if(model->HFETAeta2Given && model->HFETAd2Given) { nsc = N02*exp((vgt+TVTO-VT2)/(ETA2*vt)); nsn = 2*N0*log(1+0.5*b); nsm = nsn*nsc/(nsn+nsc); } else { nsm = 2*N0*log(1+0.5*b); } if(nsm < 1.0e-38) { *cdrain = 0; *gm = 0.0; *gds = 0.0; *capgs = CF; *capgd = CF; goto cgd_calc; } c = pow(nsm/NMAX,GAMMA); q = pow(1+c,1.0/GAMMA); ns = nsm/q; gchi = GCHI0*ns; gch = gchi/(1+gchi*rt); gchim = GCHI0*nsm; h = sqrt(1+2*gchim*RSI + vgte*vgte/(vl*vl)); p = 1+gchim*RSI+h; isatm = gchim*vgte/p; g = pow(isatm/IMAX,GAMMA); isat = isatm/pow(1+g,1/GAMMA); vsate = isat/gch; d = pow(vds/vsate,M); e = pow(1+d,1.0/M); delidgch = vds*(1+TLAMBDA*vds)/e; *cdrain = gch*delidgch; delidvsate = (*cdrain)*d/vsate/(1+d); delidvds = gch*(1+2*TLAMBDA*vds)/e-(*cdrain)* pow(vds/vsate,M-1)/(vsate*(1+d)); a = 1+gchi*rt; delgchgchi = 1.0/(a*a); delgchins = GCHI0; delnsnsm = ns/nsm*(1-c/(1+c)); delvgtevgt = 0.5*(1+u/t); delnsmvgt = N0/etavth/(1.0/b + 0.5); if(model->HFETAeta2Given && model->HFETAd2Given) delnsmvgt = nsc*(nsc*delnsmvgt+nsn*nsn/(ETA2*vt))/((nsc+nsn)*(nsc+nsn)); delvsateisat = 1.0/gch; delisatisatm = isat/isatm*(1-g/(1+g)); delisatmvgte = gchim*(p - vgte*vgte/(vl*vl*h))/(p*p); delvsategch = -vsate/gch; delisatmgchim = vgte*(p - gchim*RSI*(1+1.0/h))/(p*p); delvgtvgs = 1-vds*SIGMA0/VSIGMA*s/((1+s)*(1+s)); p = delgchgchi*delgchins*delnsnsm*delnsmvgt; delvsatevgt = (delvsateisat*delisatisatm*(delisatmvgte*delvgtevgt + delisatmgchim*GCHI0*delnsmvgt)+delvsategch*p); g = delidgch*p + delidvsate*delvsatevgt; *gm = g*delvgtvgs; *gds = delidvds + g*sigma; /* Capacitance calculations */ temp = ETA1*vt; cg1 = 1/(D1/EPSI+temp*exp(-(vgs-IN_VT1)/temp)); cgc = W*L*(CHARGE*delnsnsm*delnsmvgt*delvgtvgs+cg1); vdse = vds*pow(1+pow(vds/vsate,MC),-1.0/MC); a = (vsate-vdse)/(2*vsate-vdse); a = a*a; temp = 2.0/3.0; p = PM + (1-PM)*exp(-vds/vsate); *capgs = CF+2*temp*cgc*(1-a)/(1+p); a = vsate/(2*vsate-vdse); a = a*a; *capgd = CF+2*p*temp*cgc*(1-a)/(1+p); /* { char buf[128]; FILE *fp; fp = fopen("d:\\temp\\debug.txt","at"); sprintf(buf,"%f\t%f\t%e\t%e\n",vgs,vds,W*L*CHARGE*delnsnsm*delnsmvgt*delvgtvgs,cgc); fputs(buf,fp); fclose(fp); } */ cgd_calc: if(model->HFETAgatemod != 0) { /* Gate-drain current calculation */ double vkneet; double vmax; double td; double delcgdvgs; double delcgdtd; double deltdvdse; double deltdvkneet; double delvdsevmax; double delvdsevds; double dvdsevgs; double dvdsevds; double dtdvgs; double dtdvds; vkneet = CK1*vsate+CK2; vmax = CM1*vsate+CM2; a = pow(vds/vmax,MT2); b = pow(1+a,1/MT2); vdse = vds/b; c = pow(vdse/vkneet,MT1); d = pow(1+c,1/MT1); td = TEMP+TALPHA*vdse*vdse/d; e = CONSTKoverQ*td*M2D; p = PHIB/(CONSTboltz*td); f = exp(-p); q = (vgs-vdse)/e; g = exp(q); h = ISO*td*td*f*g; *cgd = h - ISO*TEMP*TEMP*exp(-PHIB/(CONSTboltz*TEMP)); delcgdvgs = h/e; delcgdtd = h*(p-q+2)/td; deltdvdse = TALPHA*vdse*(2-c/(1+c))/d; deltdvkneet = (td-TEMP)*c/((1+c)*vkneet); delvdsevmax = vdse*a/((1+a)*vmax); delvdsevds = (1-a/(1+a))/b; temp = delvsatevgt*delvgtvgs; dvdsevgs = delvdsevmax*CM1*temp; dtdvgs = deltdvdse*dvdsevgs+deltdvkneet*CK1*temp; *gmg = delcgdvgs+delcgdtd*dtdvgs; temp = delvsatevgt*sigma; dvdsevds = delvdsevds+delvdsevmax*CM1*temp; dtdvds = deltdvdse*dvdsevds+deltdvkneet*CK1*temp; *gmd = -delcgdvgs*dvdsevds+delcgdtd*dtdvds; } else { gmg = 0; gmd = 0; } if(model->HFETAgatemod != 0) { /* Gate-source current calculation */ double evgs; double vtn = vt*M2S; double csat = ISO*TEMP*TEMP*exp(-PHIB/(CONSTboltz*TEMP)); if (vgs <= -5*vt) { *ggs = -csat/vgs+ckt->CKTgmin; *cgs = (*ggs)*vgs; } else { evgs = exp(vgs/vtn); *ggs = csat*evgs/vtn+ckt->CKTgmin; *cgs = csat*(evgs-1)+ckt->CKTgmin*vgs; } } if(model->HFETAgatemod != 0 && (A1 != 0.0 || A2 != 0.0)) { /* Correction current calculations */ double vmax; double delvdsevmax; double delvdsevds; double dvdsevgs; double dvdsevds; vmax = CM3*vsate; a = pow(vds/vmax,MV1); b = pow(1+a,1/MV1); vdse = vds/b; delvdsevmax = vdse*a/((1+a)*vmax); delvdsevds = (1-a/(1+a))/b; dvdsevgs = delvdsevmax*CM3*delvsatevgt*delvgtvgs; dvdsevds = delvdsevds+delvdsevmax*CM3*delvsatevgt*sigma; c = vgte*vdse; d = 1+A2*c; e = vdse*delvgtevgt; f = A2*(*cgd); *cdrain += A1*(d*(*cgd) - (*cgs)); *gds += A1*(d*(*gmd)+f*(vgte*dvdsevds+e*sigma)); *gm += A1*(d*(*gmg)+f*(vgte*dvdsevgs+e*delvgtvgs) - (*ggs)); } } double diode(double u) { #define U0 (-2.303) #define A (2.221) #define B (6.804) #define C (1.685) double it; double ut; double b; double c; double i; double expu=exp(u); if(u <= U0) { it = expu*(1-expu); }else { b = 0.5*(u-U0); it = u + A*exp((U0-u)/B) - log(b+sqrt(b*b + 0.25*C*C)); } ut = it + log(it); b = u-ut; c = 1+it; i = it*(1 + b/c + 0.5*b*b/c/c/c); return(i); } ngspice-26/src/spicelib/devices/hfet1/Makefile.am0000644000265600020320000000077012264261473021303 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libhfet.la libhfet_la_SOURCES = \ hfet.c \ hfetacl.c \ hfetask.c \ hfetdefs.h \ hfetdel.c \ hfetdest.c \ hfetext.h \ hfetgetic.c \ hfetinit.c \ hfetinit.h \ hfetitf.h \ hfetload.c \ hfetmask.c \ hfetmdel.c \ hfetmpar.c \ hfetparam.c \ hfetpzl.c \ hfetsetup.c \ hfettemp.c \ hfettrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/hfet1/hfetitf.h0000644000265600020320000000011612264261473021043 0ustar andreasadmin#ifndef DEV_HFETA #define DEV_HFETA SPICEdev *get_hfeta_info(void); #endif ngspice-26/src/spicelib/devices/hfet1/hfettemp.c0000644000265600020320000000630312264261473021225 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFETAtemp(GENmodel *inModel, CKTcircuit *ckt) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; double vt; double temp; /* loop through all the diode models */ for( ; model != NULL; model = model->HFETAnextModel ) { if(model->HFETArd != 0) { model->HFETAdrainConduct = 1/model->HFETArd; } else { model->HFETAdrainConduct = 0; } if(model->HFETArs != 0) { model->HFETAsourceConduct = 1/model->HFETArs; } else { model->HFETAsourceConduct = 0; } if(model->HFETArg != 0) { model->HFETAgateConduct = 1/model->HFETArg; } else { model->HFETAgateConduct = 0; } if(model->HFETAri != 0) { model->HFETAgi = 1/model->HFETAri; } else { model->HFETAgi = 0; } if(model->HFETArf != 0) { model->HFETAgf = 1/model->HFETArf; } else { model->HFETAgf = 0; } model->HFETAdeltaSqr = model->HFETAdelta*model->HFETAdelta; model->HFETAthreshold *= model->HFETAtype; if(!model->HFETAvt2Given) VT2 = VTO; if(!model->HFETAvt1Given) IN_VT1 = VTO+CHARGE*NMAX*DI/EPSI; for (here = model->HFETAinstances; here != NULL ; here=here->HFETAnextInstance) { if(!here->HFETAdtempGiven) { here->HFETAdtemp = 0.0; } if(!here->HFETAtempGiven) { here->HFETAtemp = ckt->CKTtemp + here->HFETAdtemp; } vt = CONSTKoverQ*TEMP; TLAMBDA = LAMBDA + KLAMBDA*(TEMP-ckt->CKTnomTemp); TMU = MU - KMU*(TEMP-ckt->CKTnomTemp); TVTO = VTO - KVTO*(TEMP-ckt->CKTnomTemp); N0 = EPSI*ETA*vt/2/CHARGE/(DI+DELTAD); N01 = EPSI*ETA1*vt/2/CHARGE/D1; if(model->HFETAeta2Given) N02 = EPSI*ETA2*vt/2/CHARGE/D2; else N02 = 0.0; GCHI0 = CHARGE*W*TMU/L; CF = 0.5*EPSI*W; IMAX = CHARGE*NMAX*VS*W; IS1D = JS1D*W*L/2; IS2D = JS2D*W*L/2; IS1S = JS1S*W*L/2; IS2S = JS2S*W*L/2; ISO = ASTAR*W*L/2; GGRWL = GGR*L*W/2; temp = exp(TEMP/model->HFETAtf); FGDS = model->HFETAfgds*temp; DELF = model->HFETAdelf*temp; if(model->HFETAgatemod == 0) { if(IS1S != 0) here->HFETAvcrit = vt*log(vt/(CONSTroot2*IS1S)); else here->HFETAvcrit = DBL_MAX; } else { if(ISO != 0.0) here->HFETAvcrit = vt*log(vt/(CONSTroot2*ISO)); else here->HFETAvcrit = DBL_MAX; } } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/Makefile.in0000644000265600020320000004257712264261536021327 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/hfet1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhfet_la_LIBADD = am_libhfet_la_OBJECTS = hfet.lo hfetacl.lo hfetask.lo hfetdel.lo \ hfetdest.lo hfetgetic.lo hfetinit.lo hfetload.lo hfetmask.lo \ hfetmdel.lo hfetmpar.lo hfetparam.lo hfetpzl.lo hfetsetup.lo \ hfettemp.lo hfettrunc.lo libhfet_la_OBJECTS = $(am_libhfet_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libhfet_la_SOURCES) DIST_SOURCES = $(libhfet_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libhfet.la libhfet_la_SOURCES = \ hfet.c \ hfetacl.c \ hfetask.c \ hfetdefs.h \ hfetdel.c \ hfetdest.c \ hfetext.h \ hfetgetic.c \ hfetinit.c \ hfetinit.h \ hfetitf.h \ hfetload.c \ hfetmask.c \ hfetmdel.c \ hfetmpar.c \ hfetparam.c \ hfetpzl.c \ hfetsetup.c \ hfettemp.c \ hfettrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/hfet1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/hfet1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhfet.la: $(libhfet_la_OBJECTS) $(libhfet_la_DEPENDENCIES) $(EXTRA_libhfet_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhfet_la_OBJECTS) $(libhfet_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetpzl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfetsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfettemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfettrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/hfet1/hfettrunc.c0000644000265600020320000000121012264261473021403 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFETAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { HFETAmodel *model = (HFETAmodel*)inModel; HFETAinstance *here; for( ; model != NULL; model = model->HFETAnextModel) { for(here=model->HFETAinstances;here!=NULL;here = here->HFETAnextInstance){ CKTterr(here->HFETAqgs,ckt,timeStep); CKTterr(here->HFETAqgd,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/hfet1/hfetdefs.h0000644000265600020320000003203312264261473021205 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #ifndef HFETA #define HFETA #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" #define HFETAnumStates 24 typedef struct sHFETAinstance { struct sHFETAmodel *HFETAmodPtr; struct sHFETAinstance *HFETAnextInstance; IFuid HFETAname; int HFETAstate; /* index into state table for this device */ int HFETAdrainNode; int HFETAgateNode; int HFETAsourceNode; int HFETAdrainPrimeNode; int HFETAgatePrimeNode; int HFETAsourcePrimeNode; int HFETAdrainPrmPrmNode; int HFETAsourcePrmPrmNode; double HFETAlength; double HFETAwidth; double HFETAm; double HFETAicVDS; double HFETAicVGS; double HFETAtemp; double HFETAdtemp; double HFETAtVto; double HFETAtMu; double HFETAtLambda; double HFETAtLambdahf; double *HFETAdrainDrainPrimePtr; double *HFETAgatePrimeDrainPrimePtr; double *HFETAgatePrimeSourcePrimePtr; double *HFETAsourceSourcePrimePtr; double *HFETAdrainPrimeDrainPtr; double *HFETAdrainPrimeGatePrimePtr; double *HFETAdrainPrimeSourcePrimePtr; double *HFETAsourcePrimeGatePrimePtr; double *HFETAsourcePrimeSourcePtr; double *HFETAsourcePrimeDrainPrimePtr; double *HFETAdrainDrainPtr; double *HFETAgatePrimeGatePrimePtr; double *HFETAsourceSourcePtr; double *HFETAdrainPrimeDrainPrimePtr; double *HFETAsourcePrimeSourcePrimePtr; double *HFETAdrainPrmPrmDrainPrmPrmPtr; double *HFETAdrainPrmPrmDrainPrimePtr; double *HFETAdrainPrimeDrainPrmPrmPtr; double *HFETAdrainPrmPrmGatePrimePtr; double *HFETAgatePrimeDrainPrmPrmPtr; double *HFETAsourcePrmPrmSourcePrmPrmPtr; double *HFETAsourcePrmPrmSourcePrimePtr; double *HFETAsourcePrimeSourcePrmPrmPtr; double *HFETAsourcePrmPrmGatePrimePtr; double *HFETAgatePrimeSourcePrmPrmPtr; double *HFETAgateGatePtr; double *HFETAgateGatePrimePtr; double *HFETAgatePrimeGatePtr; #define HFETAvgs HFETAstate #define HFETAvgd HFETAstate+1 #define HFETAcg HFETAstate+2 #define HFETAcd HFETAstate+3 #define HFETAcgd HFETAstate+4 #define HFETAcgs HFETAstate+5 #define HFETAgm HFETAstate+6 #define HFETAgds HFETAstate+7 #define HFETAggs HFETAstate+8 #define HFETAggd HFETAstate+9 #define HFETAqgs HFETAstate+10 #define HFETAcqgs HFETAstate+11 #define HFETAqgd HFETAstate+12 #define HFETAcqgd HFETAstate+13 #define HFETAvgspp HFETAstate+14 #define HFETAggspp HFETAstate+15 #define HFETAcgspp HFETAstate+16 #define HFETAvgdpp HFETAstate+17 #define HFETAggdpp HFETAstate+18 #define HFETAcgdpp HFETAstate+19 #define HFETAqds HFETAstate+20 #define HFETAcqds HFETAstate+21 #define HFETAgmg HFETAstate+22 #define HFETAgmd HFETAstate+23 int HFETAoff; unsigned HFETAlengthGiven : 1; unsigned HFETAwidthGiven : 1; unsigned HFETAmGiven : 1; unsigned HFETAicVDSGiven : 1; unsigned HFETAicVGSGiven : 1; unsigned HFETAtempGiven : 1; unsigned HFETAdtempGiven : 1; int HFETAmode; double HFETAn0; double HFETAn01; double HFETAn02; double HFETAgchi0; double HFETAcf; double HFETAis1d; double HFETAis2d; double HFETAis1s; double HFETAis2s; double HFETAiso; double HFETAimax; double HFETAvcrit; double HFETAdelf; double HFETAfgds; double HFETAggrwl; } HFETAinstance ; /* per model data */ typedef struct sHFETAmodel { int HFETAmodType; struct sHFETAmodel *HFETAnextModel; HFETAinstance *HFETAinstances; IFuid HFETAmodName; int HFETAtype; int HFETAgatemod; double HFETAthreshold; double HFETAlambda; double HFETAeta; double HFETAm; double HFETAmc; double HFETAgamma; double HFETAsigma0; double HFETAvsigmat; double HFETAvsigma; double HFETAmu; double HFETAdi; double HFETAdelta; double HFETAvs; double HFETAnmax; double HFETAdeltad; double HFETAjs1d; double HFETAjs2d; double HFETAjs1s; double HFETAjs2s; double HFETAm1d; double HFETAm2d; double HFETAm1s; double HFETAm2s; double HFETArd; double HFETArs; double HFETArg; double HFETArdi; double HFETArsi; double HFETArgs; double HFETArgd; double HFETAri; double HFETArf; double HFETAepsi; double HFETAa1; double HFETAa2; double HFETAmv1; double HFETAp; double HFETAkappa; double HFETAdelf; double HFETAfgds; double HFETAtf; double HFETAcds; double HFETAphib; double HFETAtalpha; double HFETAmt1; double HFETAmt2; double HFETAck1; double HFETAck2; double HFETAcm1; double HFETAcm2; double HFETAcm3; double HFETAastar; double HFETAeta1; double HFETAd1; double HFETAvt1; double HFETAeta2; double HFETAd2; double HFETAvt2; double HFETAggr; double HFETAdel; double HFETAklambda; double HFETAkmu; double HFETAkvto; double HFETAdrainConduct; double HFETAsourceConduct; double HFETAgateConduct; double HFETAgi; double HFETAgf; double HFETAdeltaSqr; unsigned HFETAgatemodGiven:1; unsigned HFETAthresholdGiven:1; unsigned HFETAlambdaGiven:1; unsigned HFETAetaGiven:1; unsigned HFETAmGiven:1; unsigned HFETAmcGiven:1; unsigned HFETAgammaGiven:1; unsigned HFETAsigma0Given:1; unsigned HFETAvsigmatGiven:1; unsigned HFETAvsigmaGiven:1; unsigned HFETAmuGiven:1; unsigned HFETAdiGiven:1; unsigned HFETAdeltaGiven:1; unsigned HFETAvsGiven:1; unsigned HFETAnmaxGiven:1; unsigned HFETAdeltadGiven:1; unsigned HFETAjs1dGiven:1; unsigned HFETAjs2dGiven:1; unsigned HFETAjs1sGiven:1; unsigned HFETAjs2sGiven:1; unsigned HFETAm1dGiven:1; unsigned HFETAm2dGiven:1; unsigned HFETAm1sGiven:1; unsigned HFETAm2sGiven:1; unsigned HFETArdGiven:1; unsigned HFETArsGiven:1; unsigned HFETArgGiven:1; unsigned HFETArdiGiven:1; unsigned HFETArsiGiven:1; unsigned HFETArgsGiven:1; unsigned HFETArgdGiven:1; unsigned HFETAriGiven:1; unsigned HFETArfGiven:1; unsigned HFETAepsiGiven:1; unsigned HFETAa1Given:1; unsigned HFETAa2Given:1; unsigned HFETAmv1Given:1; unsigned HFETApGiven:1; unsigned HFETAkappaGiven:1; unsigned HFETAdelfGiven:1; unsigned HFETAfgdsGiven:1; unsigned HFETAtfGiven:1; unsigned HFETAcdsGiven:1; unsigned HFETAphibGiven:1; unsigned HFETAtalphaGiven:1; unsigned HFETAmt1Given:1; unsigned HFETAmt2Given:1; unsigned HFETAck1Given:1; unsigned HFETAck2Given:1; unsigned HFETAcm1Given:1; unsigned HFETAcm2Given:1; unsigned HFETAcm3Given:1; unsigned HFETAastarGiven:1; unsigned HFETAeta1Given:1; unsigned HFETAd1Given:1; unsigned HFETAvt1Given:1; unsigned HFETAeta2Given:1; unsigned HFETAd2Given:1; unsigned HFETAvt2Given:1; unsigned HFETAggrGiven:1; unsigned HFETAdelGiven:1; unsigned HFETAklambdaGiven:1; unsigned HFETAkmuGiven:1; unsigned HFETAkvtoGiven:1; } HFETAmodel; #ifndef NHFET #define NHFET 1 #define PHFET -1 #endif /* device parameters */ #define HFETA_LENGTH 1 #define HFETA_WIDTH 2 #define HFETA_IC_VDS 3 #define HFETA_IC_VGS 4 #define HFETA_TEMP 5 #define HFETA_IC 6 #define HFETA_OFF 7 #define HFETA_CS 8 #define HFETA_POWER 9 #define HFETA_DTEMP 10 #define HFETA_M 11 /* model parameters */ #define HFETA_MOD_VTO 101 #define HFETA_MOD_LAMBDA 102 #define HFETA_MOD_RD 103 #define HFETA_MOD_RS 104 #define HFETA_MOD_RG 105 #define HFETA_MOD_RGS 106 #define HFETA_MOD_RGD 107 #define HFETA_MOD_RI 108 #define HFETA_MOD_RF 109 #define HFETA_MOD_ETA 110 #define HFETA_MOD_M 111 #define HFETA_MOD_MC 112 #define HFETA_MOD_GAMMA 113 #define HFETA_MOD_SIGMA0 114 #define HFETA_MOD_VSIGMAT 115 #define HFETA_MOD_VSIGMA 116 #define HFETA_MOD_MU 117 #define HFETA_MOD_DI 118 #define HFETA_MOD_DELTA 119 #define HFETA_MOD_VS 120 #define HFETA_MOD_NMAX 121 #define HFETA_MOD_DELTAD 122 #define HFETA_MOD_JS1D 123 #define HFETA_MOD_JS2D 124 #define HFETA_MOD_JS1S 125 #define HFETA_MOD_JS2S 126 #define HFETA_MOD_M1D 127 #define HFETA_MOD_M2D 128 #define HFETA_MOD_M1S 129 #define HFETA_MOD_M2S 130 #define HFETA_MOD_EPSI 132 #define HFETA_MOD_RDI 133 #define HFETA_MOD_RSI 134 #define HFETA_MOD_A1 135 #define HFETA_MOD_A2 136 #define HFETA_MOD_MV1 137 #define HFETA_MOD_P 138 #define HFETA_MOD_KAPPA 139 #define HFETA_MOD_DELF 140 #define HFETA_MOD_FGDS 141 #define HFETA_MOD_TF 142 #define HFETA_MOD_CDS 143 #define HFETA_MOD_PHIB 144 #define HFETA_MOD_TALPHA 145 #define HFETA_MOD_MT1 146 #define HFETA_MOD_MT2 147 #define HFETA_MOD_CK1 148 #define HFETA_MOD_CK2 149 #define HFETA_MOD_CM1 150 #define HFETA_MOD_CM2 151 #define HFETA_MOD_CM3 152 #define HFETA_MOD_ASTAR 153 #define HFETA_MOD_ETA1 154 #define HFETA_MOD_D1 155 #define HFETA_MOD_VT1 156 #define HFETA_MOD_ETA2 157 #define HFETA_MOD_D2 158 #define HFETA_MOD_VT2 159 #define HFETA_MOD_GGR 160 #define HFETA_MOD_DEL 161 #define HFETA_MOD_GATEMOD 162 #define HFETA_MOD_KLAMBDA 163 #define HFETA_MOD_KMU 164 #define HFETA_MOD_KVTO 165 #define HFETA_MOD_NHFET 166 #define HFETA_MOD_PHFET 167 #define HFETA_MOD_TYPE 168 /* device questions */ #define HFETA_DRAINNODE 201 #define HFETA_GATENODE 202 #define HFETA_SOURCENODE 203 #define HFETA_DRAINPRIMENODE 204 #define HFETA_SOURCEPRIMENODE 205 #define HFETA_VGS 206 #define HFETA_VGD 207 #define HFETA_CG 208 #define HFETA_CD 209 #define HFETA_CGD 210 #define HFETA_GM 211 #define HFETA_GDS 212 #define HFETA_GGS 213 #define HFETA_GGD 214 #define HFETA_QGS 215 #define HFETA_CQGS 216 #define HFETA_QGD 217 #define HFETA_CQGD 218 /* model questions */ #define HFETA_MOD_DRAINCONDUCT 301 #define HFETA_MOD_SOURCECONDUCT 302 #define HFETA_MOD_DEPLETIONCAP 303 #define HFETA_MOD_VCRIT 304 #define L (here->HFETAlength) #define W (here->HFETAwidth) #define VTO (model->HFETAthreshold) #define LAMBDA (model->HFETAlambda) #define RDI (model->HFETArdi) #define RSI (model->HFETArsi) #define RD (model->HFETArd) #define RS (model->HFETArs) #define RG (model->HFETArg) #define RF (model->HFETArf) #define RI (model->HFETAri) #define RGS (model->HFETArgs) #define RGD (model->HFETArgd) #define ETA (model->HFETAeta) #define M (model->HFETAm) #define MC (model->HFETAmc) #define GAMMA (model->HFETAgamma) #define SIGMA0 (model->HFETAsigma0) #define VSIGMAT (model->HFETAvsigmat) #define VSIGMA (model->HFETAvsigma) #define MU (model->HFETAmu) #define DI (model->HFETAdi) #define DELTAD (model->HFETAdeltad) #define DELTASQR (model->HFETAdeltaSqr) #define VS (model->HFETAvs) #define NMAX (model->HFETAnmax) #define EPSI (model->HFETAepsi) #define JS1D (model->HFETAjs1d) #define JS2D (model->HFETAjs2d) #define JS1S (model->HFETAjs1s) #define JS2S (model->HFETAjs2s) #define M1D (model->HFETAm1d) #define M2D (model->HFETAm2d) #define M1S (model->HFETAm1s) #define M2S (model->HFETAm2s) #define ASTAR (model->HFETAastar) #define PHIB (model->HFETAphib) #define TALPHA (model->HFETAtalpha) #define MT1 (model->HFETAmt1) #define MT2 (model->HFETAmt2) #define CK1 (model->HFETAck1) #define CK2 (model->HFETAck2) #define CM1 (model->HFETAcm1) #define CM2 (model->HFETAcm2) #define CM3 (model->HFETAcm3) #define A1 (model->HFETAa1) #define A2 (model->HFETAa2) #define MV1 (model->HFETAmv1) #define PM (model->HFETAp) #define CDS (model->HFETAcds) #define ETA1 (model->HFETAeta1) #define D1 (model->HFETAd1) #define IN_VT1 (model->HFETAvt1) /* VT1 was defined in termios.h */ #define ETA2 (model->HFETAeta2) #define D2 (model->HFETAd2) #define VT2 (model->HFETAvt2) #define GGR (model->HFETAggr) #define DEL (model->HFETAdel) #define KLAMBDA (model->HFETAklambda) #define KMU (model->HFETAkmu) #define KVTO (model->HFETAkvto) #define GCHI0 (here->HFETAgchi0) #define N0 (here->HFETAn0) #define N01 (here->HFETAn01) #define N02 (here->HFETAn02) #define CF (here->HFETAcf) #define IMAX (here->HFETAimax) #define ISO (here->HFETAiso) #define TEMP (here->HFETAtemp) #define IS1D (here->HFETAis1d) #define IS2D (here->HFETAis2d) #define IS1S (here->HFETAis1s) #define IS2S (here->HFETAis2s) #define FGDS (here->HFETAfgds) #define DELF (here->HFETAdelf) #define GGRWL (here->HFETAggrwl) #define TLAMBDA (here->HFETAtLambda) #define TMU (here->HFETAtMu) #define TVTO (here->HFETAtVto) #include "hfetext.h" #endif /*HFETA*/ ngspice-26/src/spicelib/devices/bsim4v6/0000755000265600020320000000000012264261706017525 5ustar andreasadminngspice-26/src/spicelib/devices/bsim4v6/b4v6geo.c0000644000265600020320000003101712264261473021150 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4geo.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" /* * WDLiu: * This subrutine is a special module to process the geometry dependent * parasitics for BSIM4v6, which calculates Ps, Pd, As, Ad, and Rs and Rd * for multi-fingers and varous GEO and RGEO options. */ int BSIM4v6RdsEndIso(double, double, double, double, double, double, int, int, double *); int BSIM4v6RdsEndSha(double, double, double, double, double, double, int, int, double *); static int BSIM4v6NumFingerDiff(double nf, int minSD, double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS) { int NF; NF = (int)nf; if ((NF%2) != 0) { *nuEndD = *nuEndS = 1.0; *nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); } else { if (minSD == 1) /* minimize # of source */ { *nuEndD = 2.0; *nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); *nuEndS = 0.0; *nuIntS = nf; } else { *nuEndD = 0.0; *nuIntD = nf; *nuEndS = 2.0; *nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); } } return 0; } int BSIM4v6PAeffGeo(double nf, int geo, int minSD, double Weffcj, double DMCG, double DMCI, double DMDG, double *Ps, double *Pd, double *As, double *Ad) { double T0, T1, T2; double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ BSIM4v6NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); T0 = DMCG + DMCI; T1 = DMCG + DMCG; T2 = DMDG + DMDG; PSiso = PDiso = T0 + T0 + Weffcj; PSsha = PDsha = T1; PSmer = PDmer = T2; ASiso = ADiso = T0 * Weffcj; ASsha = ADsha = DMCG * Weffcj; ASmer = ADmer = DMDG * Weffcj; switch(geo) { case 0: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 1: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 2: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 3: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 4: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 5: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 6: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 7: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 8: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 9: /* geo = 9 and 10 happen only when nf = even */ *Ps = PSiso + (nf - 1.0) * PSsha; *Pd = nf * PDsha; *As = ASiso + (nf - 1.0) * ASsha; *Ad = nf * ADsha; break; case 10: *Ps = nf * PSsha; *Pd = PDiso + (nf - 1.0) * PDsha; *As = nf * ASsha; *Ad = ADiso + (nf - 1.0) * ADsha; break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } return 0; } int BSIM4v6RdseffGeo(double nf, int geo, int rgeo, int minSD, double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, int Type, double *Rtot) { double Rint = 0.0, Rend = 0.0; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ { BSIM4v6NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); /* Internal S/D resistance -- assume shared S or D and all wide contacts */ if (Type == 1) { if (nuIntS == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntS); } else { if (nuIntD == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntD); } } /* End S/D resistance -- geo dependent */ switch(geo) { case 0: if (Type == 1) BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 1: if (Type == 1) BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 2: if (Type == 1) BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 3: if (Type == 1) BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 4: if (Type == 1) BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / Weffcj; break; case 5: if (Type == 1) BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / (Weffcj * nuEndD); break; case 6: if (Type == 1) Rend = Rsh * DMDG / Weffcj; else BSIM4v6RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 7: if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); else BSIM4v6RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 8: Rend = Rsh * DMDG / Weffcj; break; case 9: /* all wide contacts assumed for geo = 9 and 10 */ if (Type == 1) { Rend = 0.5 * Rsh * DMCG / Weffcj; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } else { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } break; case 10: if (Type == 1) { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } else { Rend = 0.5 * Rsh * DMCG / Weffcj;; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } if (Rint <= 0.0) *Rtot = Rend; else if (Rend <= 0.0) *Rtot = Rint; else *Rtot = Rint * Rend / (Rint + Rend); if(*Rtot==0.0) printf("Warning: Zero resistance returned from RdseffGeo\n"); return 0; } int BSIM4v6RdsEndIso(double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if ((nuEnd == 0.0)||((DMCG+DMCI)==0.0)) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if ((nuEnd == 0.0)||((DMCG + DMCI)==0.0)) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } int BSIM4v6RdsEndSha(double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMCI); NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } ngspice-26/src/spicelib/devices/bsim4v6/b4v6pzld.c0000644000265600020320000010432112264261473021346 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4pzld.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim4v6def.h" #include "ngspice/suffix.h" int BSIM4v6pzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0; double xcgmbb=0.0, xcbgmb=0.0; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; struct bsim4v6SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here!= NULL; here = here->BSIM4v6nextInstance) { pParam = here->pParam; capbd = here->BSIM4v6capbd; capbs = here->BSIM4v6capbs; cgso = here->BSIM4v6cgso; cgdo = here->BSIM4v6cgdo; cgbo = pParam->BSIM4v6cgbo; if (here->BSIM4v6mode >= 0) { Gm = here->BSIM4v6gm; Gmbs = here->BSIM4v6gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -(here->BSIM4v6gbds); gbbsp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = here->BSIM4v6gbgs; gbdpdp = here->BSIM4v6gbds; gbdpb = here->BSIM4v6gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcsg; gIstotd = here->BSIM4v6gIgcsd; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcss; gIstotb = here->BSIM4v6gIgcsb; gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcdg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcdd; gIdtots = here->BSIM4v6gIgcds; gIdtotb = here->BSIM4v6gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbd; gIbtots = here->BSIM4v6gIgbs; gIbtotb = here->BSIM4v6gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vges) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); else if (here->BSIM4v6rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vgms) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgd * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgs * T0; gcrgb = here->BSIM4v6gcrgb * T0; gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v6acnqsMod == 0) { if (here->BSIM4v6rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v6cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v6cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v6cggb; xcgdb = here->BSIM4v6cgdb; xcgsb = here->BSIM4v6cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v6cdgb; xcsgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb); xcbgb = here->BSIM4v6cbgb; } else { xcggb = here->BSIM4v6cggb + cgdo + cgso + pParam->BSIM4v6cgbo; xcgdb = here->BSIM4v6cgdb - cgdo; xcgsb = here->BSIM4v6cgsb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v6cdgb - cgdo; xcsgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb + cgso); xcbgb = here->BSIM4v6cbgb - pParam->BSIM4v6cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v6cddb + here->BSIM4v6capbd + cgdo; xcdsb = here->BSIM4v6cdsb; xcsdb = -(here->BSIM4v6cgdb + here->BSIM4v6cbdb + here->BSIM4v6cddb); xcssb = here->BSIM4v6capbs + cgso - (here->BSIM4v6cgsb + here->BSIM4v6cbsb + here->BSIM4v6cdsb); if (!here->BSIM4v6rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v6cbdb - here->BSIM4v6capbd; xcbsb = here->BSIM4v6cbsb - here->BSIM4v6capbs; xcdbdb = 0.0; } else { xcdbb = -(here->BSIM4v6cddb + here->BSIM4v6cdgb + here->BSIM4v6cdsb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) + here->BSIM4v6capbs; xcbdb = here->BSIM4v6cbdb; xcbsb = here->BSIM4v6cbsb; xcdbdb = -here->BSIM4v6capbd; xcsbsb = -here->BSIM4v6capbs; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v6gtg; xgtd = here->BSIM4v6gtd; xgts = here->BSIM4v6gts; xgtb = here->BSIM4v6gtb; xcqgb = here->BSIM4v6cqgb; xcqdb = here->BSIM4v6cqdb; xcqsb = here->BSIM4v6cqsb; xcqbb = here->BSIM4v6cqbb; CoxWL = model->BSIM4v6coxe * here->pParam->BSIM4v6weffCV * here->BSIM4v6nf * here->pParam->BSIM4v6leffCV; qcheq = -(here->BSIM4v6qgate + here->BSIM4v6qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v6xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v6xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM4v6qdrn / qcheq; Cdd = here->BSIM4v6cddb; Csd = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + here->BSIM4v6cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v6cdgb; Csg = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + here->BSIM4v6cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v6cdsb; Css = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + here->BSIM4v6cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM4v6gm; Gmbs = -here->BSIM4v6gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -(here->BSIM4v6gbds); gbbdp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v6gbgs; gbspsp = here->BSIM4v6gbds; gbspb = here->BSIM4v6gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcdg; gIstotd = here->BSIM4v6gIgcds; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcdd; gIstotb = here->BSIM4v6gIgcdb; gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcss; gIdtots = here->BSIM4v6gIgcsd; gIdtotb = here->BSIM4v6gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbs; gIbtots = here->BSIM4v6gIgbd; gIbtotb = here->BSIM4v6gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vges) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); else if (here->BSIM4v6rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vgms) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgs * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgd * T0; gcrgb = here->BSIM4v6gcrgb * T0; gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v6acnqsMod == 0) { if (here->BSIM4v6rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v6cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v6cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v6cggb; xcgdb = here->BSIM4v6cgsb; xcgsb = here->BSIM4v6cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb); xcsgb = here->BSIM4v6cdgb; xcbgb = here->BSIM4v6cbgb; } else { xcggb = here->BSIM4v6cggb + cgdo + cgso + pParam->BSIM4v6cgbo; xcgdb = here->BSIM4v6cgsb - cgdo; xcgsb = here->BSIM4v6cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb + cgdo); xcsgb = here->BSIM4v6cdgb - cgso; xcbgb = here->BSIM4v6cbgb - pParam->BSIM4v6cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v6capbd + cgdo - (here->BSIM4v6cgsb + here->BSIM4v6cbsb + here->BSIM4v6cdsb); xcdsb = -(here->BSIM4v6cgdb + here->BSIM4v6cbdb + here->BSIM4v6cddb); xcsdb = here->BSIM4v6cdsb; xcssb = here->BSIM4v6cddb + here->BSIM4v6capbs + cgso; if (!here->BSIM4v6rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v6cbsb - here->BSIM4v6capbd; xcbsb = here->BSIM4v6cbdb - here->BSIM4v6capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) + here->BSIM4v6capbd; xcsbb = -(here->BSIM4v6cddb + here->BSIM4v6cdgb + here->BSIM4v6cdsb); xcbdb = here->BSIM4v6cbsb; xcbsb = here->BSIM4v6cbdb; xcdbdb = -here->BSIM4v6capbd; xcsbsb = -here->BSIM4v6capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v6gtg; xgtd = here->BSIM4v6gts; xgts = here->BSIM4v6gtd; xgtb = here->BSIM4v6gtb; xcqgb = here->BSIM4v6cqgb; xcqdb = here->BSIM4v6cqsb; xcqsb = here->BSIM4v6cqdb; xcqbb = here->BSIM4v6cqbb; CoxWL = model->BSIM4v6coxe * here->pParam->BSIM4v6weffCV * here->BSIM4v6nf * here->pParam->BSIM4v6leffCV; qcheq = -(here->BSIM4v6qgate + here->BSIM4v6qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v6xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v6xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM4v6qdrn / qcheq; Css = here->BSIM4v6cddb; Cds = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + here->BSIM4v6cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v6cdgb; Cdg = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + here->BSIM4v6cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v6cdsb; Cdd = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + here->BSIM4v6cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } if (model->BSIM4v6rdsMod == 1) { gstot = here->BSIM4v6gstot; gstotd = here->BSIM4v6gstotd; gstotg = here->BSIM4v6gstotg; gstots = here->BSIM4v6gstots - gstot; gstotb = here->BSIM4v6gstotb; gdtot = here->BSIM4v6gdtot; gdtotd = here->BSIM4v6gdtotd - gdtot; gdtotg = here->BSIM4v6gdtotg; gdtots = here->BSIM4v6gdtots; gdtotb = here->BSIM4v6gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } T1 = *(ckt->CKTstate0 + here->BSIM4v6qdef) * here->BSIM4v6gtau; gds = here->BSIM4v6gds; /* * Loading PZ matrix */ m = here->BSIM4v6m; if (!model->BSIM4v6rdsMod) { gdpr = here->BSIM4v6drainConductance; gspr = here->BSIM4v6sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v6rbodyMod) { gjbd = here->BSIM4v6gbd; gjbs = here->BSIM4v6gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v6grgeltd; if (here->BSIM4v6rgateMod == 1) { *(here->BSIM4v6GEgePtr) += m * geltd; *(here->BSIM4v6GPgePtr) -= m * geltd; *(here->BSIM4v6GEgpPtr) -= m * geltd; *(here->BSIM4v6GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v6GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v6GPgpPtr) += m * (geltd - xgtg + gIgtotg); *(here->BSIM4v6GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v6GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v6GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v6GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v6GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v6GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v6GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v6GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v6GPbpPtr) -= m * (xgtb - gIgtotb); } else if (here->BSIM4v6rgateMod == 2) { *(here->BSIM4v6GEgePtr) += m * gcrg; *(here->BSIM4v6GEgpPtr) += m * gcrgg; *(here->BSIM4v6GEdpPtr) += m * gcrgd; *(here->BSIM4v6GEspPtr) += m * gcrgs; *(here->BSIM4v6GEbpPtr) += m * gcrgb; *(here->BSIM4v6GPgePtr) -= m * gcrg; *(here->BSIM4v6GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v6GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v6GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v6GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v6GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v6GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v6GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v6GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v6GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v6GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v6GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v6GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); } else if (here->BSIM4v6rgateMod == 3) { *(here->BSIM4v6GEgePtr) += m * geltd; *(here->BSIM4v6GEgmPtr) -= m * geltd; *(here->BSIM4v6GMgePtr) -= m * geltd; *(here->BSIM4v6GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v6GMgmPtr ) += m * xcgmgmb * s->real; *(here->BSIM4v6GMgmPtr +1) += m * xcgmgmb * s->imag; *(here->BSIM4v6GMdpPtr) += m * gcrgd; *(here->BSIM4v6GMdpPtr ) += m * xcgmdb * s->real; *(here->BSIM4v6GMdpPtr +1) += m * xcgmdb * s->imag; *(here->BSIM4v6GMgpPtr) += m * gcrgg; *(here->BSIM4v6GMspPtr) += m * gcrgs; *(here->BSIM4v6GMspPtr ) += m * xcgmsb * s->real; *(here->BSIM4v6GMspPtr +1) += m * xcgmsb * s->imag; *(here->BSIM4v6GMbpPtr) += m * gcrgb; *(here->BSIM4v6GMbpPtr ) += m * xcgmbb * s->real; *(here->BSIM4v6GMbpPtr +1) += m * xcgmbb * s->imag; *(here->BSIM4v6DPgmPtr ) += m * xcdgmb * s->real; *(here->BSIM4v6DPgmPtr +1) += m * xcdgmb * s->imag; *(here->BSIM4v6GPgmPtr) -= m * gcrg; *(here->BSIM4v6SPgmPtr ) += m * xcsgmb * s->real; *(here->BSIM4v6SPgmPtr +1) += m * xcsgmb * s->imag; *(here->BSIM4v6BPgmPtr ) += m * xcbgmb * s->real; *(here->BSIM4v6BPgmPtr +1) += m * xcbgmb * s->imag; *(here->BSIM4v6GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v6GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v6GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v6GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v6GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v6GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v6GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v6GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v6GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v6GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); *(here->BSIM4v6GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v6GPbpPtr +1) += m * xcgbb * s->imag; } else { *(here->BSIM4v6GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v6GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v6GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v6GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v6GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v6GPgpPtr) -= m * (xgtg - gIgtotg); *(here->BSIM4v6GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v6GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v6GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v6GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v6GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v6GPbpPtr) -= m * (xgtb - gIgtotb); } if (model->BSIM4v6rdsMod) { (*(here->BSIM4v6DgpPtr) += m * gdtotg); (*(here->BSIM4v6DspPtr) += m * gdtots); (*(here->BSIM4v6DbpPtr) += m * gdtotb); (*(here->BSIM4v6SdpPtr) += m * gstotd); (*(here->BSIM4v6SgpPtr) += m * gstotg); (*(here->BSIM4v6SbpPtr) += m * gstotb); } *(here->BSIM4v6DPdpPtr ) += m * xcddb * s->real; *(here->BSIM4v6DPdpPtr +1) += m * xcddb * s->imag; *(here->BSIM4v6DPdpPtr) += m * (gdpr + gds + here->BSIM4v6gbd - gdtotd + RevSum + gbdpdp - gIdtotd + dxpart * xgtd + T1 * ddxpart_dVd); *(here->BSIM4v6DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v6DPgpPtr ) += m * xcdgb * s->real; *(here->BSIM4v6DPgpPtr +1) += m * xcdgb * s->imag; *(here->BSIM4v6DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + T1 * ddxpart_dVg + dxpart * xgtg); *(here->BSIM4v6DPspPtr ) += m * xcdsb * s->real; *(here->BSIM4v6DPspPtr +1) += m * xcdsb * s->imag; *(here->BSIM4v6DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots - T1 * ddxpart_dVs - dxpart * xgts); *(here->BSIM4v6DPbpPtr ) += m * xcdbb * s->real; *(here->BSIM4v6DPbpPtr +1) += m * xcdbb * s->imag; *(here->BSIM4v6DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * xgtb); *(here->BSIM4v6DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v6DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v6SPdpPtr ) += m * xcsdb * s->real; *(here->BSIM4v6SPdpPtr +1) += m * xcsdb * s->imag; *(here->BSIM4v6SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd - T1 * dsxpart_dVd - sxpart * xgtd); *(here->BSIM4v6SPgpPtr ) += m * xcsgb * s->real; *(here->BSIM4v6SPgpPtr +1) += m * xcsgb * s->imag; *(here->BSIM4v6SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg - T1 * dsxpart_dVg - sxpart * xgtg); *(here->BSIM4v6SPspPtr ) += m * xcssb * s->real; *(here->BSIM4v6SPspPtr +1) += m * xcssb * s->imag; *(here->BSIM4v6SPspPtr) += m * (gspr + gds + here->BSIM4v6gbs - gIstots - gstots + FwdSum + gbspsp + sxpart * xgts + T1 * dsxpart_dVs); *(here->BSIM4v6SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v6SPbpPtr ) += m * xcsbb * s->real; *(here->BSIM4v6SPbpPtr +1) += m * xcsbb * s->imag; *(here->BSIM4v6SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb - T1 * dsxpart_dVb - sxpart * xgtb); *(here->BSIM4v6SspPtr) -= m * (gspr - gstots); *(here->BSIM4v6SsPtr) += m * (gspr + gstot); *(here->BSIM4v6BPdpPtr ) += m * xcbdb * s->real; *(here->BSIM4v6BPdpPtr +1) += m * xcbdb * s->imag; *(here->BSIM4v6BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v6BPgpPtr ) += m * xcbgb * s->real; *(here->BSIM4v6BPgpPtr +1) += m * xcbgb * s->imag; *(here->BSIM4v6BPgpPtr) -= m * (here->BSIM4v6gbgs + gIbtotg); *(here->BSIM4v6BPspPtr ) += m * xcbsb * s->real; *(here->BSIM4v6BPspPtr +1) += m * xcbsb * s->imag; *(here->BSIM4v6BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v6BPbpPtr ) += m * xcbbb * s->real; *(here->BSIM4v6BPbpPtr +1) += m * xcbbb * s->imag; *(here->BSIM4v6BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v6gbbs - gIbtotb); ggidld = here->BSIM4v6ggidld; ggidlg = here->BSIM4v6ggidlg; ggidlb = here->BSIM4v6ggidlb; ggislg = here->BSIM4v6ggislg; ggisls = here->BSIM4v6ggisls; ggislb = here->BSIM4v6ggislb; /* stamp gidl */ (*(here->BSIM4v6DPdpPtr) += m * ggidld); (*(here->BSIM4v6DPgpPtr) += m * ggidlg); (*(here->BSIM4v6DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v6DPbpPtr) += m * ggidlb); (*(here->BSIM4v6BPdpPtr) -= m * ggidld); (*(here->BSIM4v6BPgpPtr) -= m * ggidlg); (*(here->BSIM4v6BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v6BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v6SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v6SPgpPtr) += m * ggislg); (*(here->BSIM4v6SPspPtr) += m * ggisls); (*(here->BSIM4v6SPbpPtr) += m * ggislb); (*(here->BSIM4v6BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v6BPgpPtr) -= m * ggislg); (*(here->BSIM4v6BPspPtr) -= m * ggisls); (*(here->BSIM4v6BPbpPtr) -= m * ggislb); if (here->BSIM4v6rbodyMod) { (*(here->BSIM4v6DPdbPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v6DPdbPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v6DPdbPtr) -= m * here->BSIM4v6gbd); (*(here->BSIM4v6SPsbPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v6SPsbPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v6SPsbPtr) -= m * here->BSIM4v6gbs); (*(here->BSIM4v6DBdpPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v6DBdpPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v6DBdpPtr) -= m * here->BSIM4v6gbd); (*(here->BSIM4v6DBdbPtr ) -= m * xcdbdb * s->real); (*(here->BSIM4v6DBdbPtr +1) -= m * xcdbdb * s->imag); (*(here->BSIM4v6DBdbPtr) += m * (here->BSIM4v6gbd + here->BSIM4v6grbpd + here->BSIM4v6grbdb)); (*(here->BSIM4v6DBbpPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6DBbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BPdbPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6BPbPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BPsbPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6BPbpPtr) += m * (here->BSIM4v6grbpd + here->BSIM4v6grbps + here->BSIM4v6grbpb)); /* WDL: (-here->BSIM4v6gbbs) already added to BPbpPtr */ (*(here->BSIM4v6SBspPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v6SBspPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v6SBspPtr) -= m * here->BSIM4v6gbs); (*(here->BSIM4v6SBbpPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6SBbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6SBsbPtr ) -= m * xcsbsb * s->real); (*(here->BSIM4v6SBsbPtr +1) -= m * xcsbsb * s->imag); (*(here->BSIM4v6SBsbPtr) += m * (here->BSIM4v6gbs + here->BSIM4v6grbps + here->BSIM4v6grbsb)); (*(here->BSIM4v6BdbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BbpPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BsbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6BbPtr) += m * (here->BSIM4v6grbsb + here->BSIM4v6grbdb + here->BSIM4v6grbpb)); } if (here->BSIM4v6acnqsMod) { *(here->BSIM4v6QqPtr ) += m * s->real * ScalingFactor; *(here->BSIM4v6QqPtr +1) += m * s->imag * ScalingFactor; *(here->BSIM4v6QgpPtr ) -= m * xcqgb * s->real; *(here->BSIM4v6QgpPtr +1) -= m * xcqgb * s->imag; *(here->BSIM4v6QdpPtr ) -= m * xcqdb * s->real; *(here->BSIM4v6QdpPtr +1) -= m * xcqdb * s->imag; *(here->BSIM4v6QbpPtr ) -= m * xcqbb * s->real; *(here->BSIM4v6QbpPtr +1) -= m * xcqbb * s->imag; *(here->BSIM4v6QspPtr ) -= m * xcqsb * s->real; *(here->BSIM4v6QspPtr +1) -= m * xcqsb * s->imag; *(here->BSIM4v6GPqPtr) -= m * here->BSIM4v6gtau; *(here->BSIM4v6DPqPtr) += m * dxpart * here->BSIM4v6gtau; *(here->BSIM4v6SPqPtr) += m * sxpart * here->BSIM4v6gtau; *(here->BSIM4v6QqPtr) += m * here->BSIM4v6gtau; *(here->BSIM4v6QgpPtr) += m * xgtg; *(here->BSIM4v6QdpPtr) += m * xgtd; *(here->BSIM4v6QbpPtr) += m * xgtb; *(here->BSIM4v6QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/bsim4v6init.h0000644000265600020320000000042612264261473022057 0ustar andreasadmin#ifndef _BSIM4v6INIT_H #define _BSIM4v6INIT_H extern IFparm BSIM4v6pTable[ ]; extern IFparm BSIM4v6mPTable[ ]; extern char *BSIM4v6names[ ]; extern int BSIM4v6pTSize; extern int BSIM4v6mPTSize; extern int BSIM4v6nSize; extern int BSIM4v6iSize; extern int BSIM4v6mSize; #endif ngspice-26/src/spicelib/devices/bsim4v6/b4v6temp.c0000644000265600020320000030773712264261473021362 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /**** BSIM4.6.5 Update ngspice 09/22/2009 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4temp.c of BSIM4.6.3. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 #define DELTA 1.0E-9 #define DEXP(A,B) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ } else { \ B = exp(A); \ } \ } static int BSIM4v6DioIjthVjmEval(double Nvtm, double Ijth, double Isb, double XExpBV, double *Vjm) { double Tb, Tc, EVjmovNv; Tc = XExpBV; Tb = 1.0 + Ijth / Isb - Tc; EVjmovNv = 0.5 * (Tb + sqrt(Tb * Tb + 4.0 * Tc)); *Vjm = Nvtm * log(EVjmovNv); return 0; } int BSIM4v6temp( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v6model *model = (BSIM4v6model*) inModel; BSIM4v6instance *here; struct bsim4v6SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, epssub; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Lnew=0.0, Wnew; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double dumPs, dumPd, dumAs, dumAd, PowWeffWr; double DMCGeff, DMCIeff, DMDGeff; double Nvtms, Nvtmd, SourceSatCurrent, DrainSatCurrent; double T10, T11; double Inv_saref, Inv_sbref, Inv_sa, Inv_sb, rho, Ldrn, dvth0_lod; double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod; double lnl, lnw, lnnf, rbpbx, rbpby, rbsbx, rbsby, rbdbx, rbdby,bodymode; double kvsat, wlod, sceff, Wdrn; double V0, lt1, ltw, Theta0, Delt_vth, Vth_NarrowW, Lpe_Vb, Vth; double n, n0, Vgsteff, Vgs_eff, niter, toxpf, toxpi, Tcen, toxe, epsrox, vddeot; double vtfbphi2eot, phieot, TempRatioeot, Vtm0eot, Vtmeot,vbieot; int Size_Not_Found, i; /* loop through all the BSIM4v6 device models */ for (; model != NULL; model = model->BSIM4v6nextModel) { Temp = ckt->CKTtemp; if (model->BSIM4v6SbulkJctPotential < 0.1) { model->BSIM4v6SbulkJctPotential = 0.1; fprintf(stderr, "Given pbs is less than 0.1. Pbs is set to 0.1.\n"); } if (model->BSIM4v6SsidewallJctPotential < 0.1) { model->BSIM4v6SsidewallJctPotential = 0.1; fprintf(stderr, "Given pbsws is less than 0.1. Pbsws is set to 0.1.\n"); } if (model->BSIM4v6SGatesidewallJctPotential < 0.1) { model->BSIM4v6SGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgs is less than 0.1. Pbswgs is set to 0.1.\n"); } if (model->BSIM4v6DbulkJctPotential < 0.1) { model->BSIM4v6DbulkJctPotential = 0.1; fprintf(stderr, "Given pbd is less than 0.1. Pbd is set to 0.1.\n"); } if (model->BSIM4v6DsidewallJctPotential < 0.1) { model->BSIM4v6DsidewallJctPotential = 0.1; fprintf(stderr, "Given pbswd is less than 0.1. Pbswd is set to 0.1.\n"); } if (model->BSIM4v6DGatesidewallJctPotential < 0.1) { model->BSIM4v6DGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgd is less than 0.1. Pbswgd is set to 0.1.\n"); } if(model->BSIM4v6mtrlMod == 0) { if ((model->BSIM4v6toxeGiven) && (model->BSIM4v6toxpGiven) && (model->BSIM4v6dtoxGiven) && (model->BSIM4v6toxe != (model->BSIM4v6toxp + model->BSIM4v6dtox))) printf("Warning: toxe, toxp and dtox all given and toxe != toxp + dtox; dtox ignored.\n"); else if ((model->BSIM4v6toxeGiven) && (!model->BSIM4v6toxpGiven)) model->BSIM4v6toxp = model->BSIM4v6toxe - model->BSIM4v6dtox; else if ((!model->BSIM4v6toxeGiven) && (model->BSIM4v6toxpGiven)) model->BSIM4v6toxe = model->BSIM4v6toxp + model->BSIM4v6dtox; } if(model->BSIM4v6mtrlMod) { epsrox = 3.9; toxe = model->BSIM4v6eot; epssub = EPS0 * model->BSIM4v6epsrsub; } else { epsrox = model->BSIM4v6epsrox; toxe = model->BSIM4v6toxe; epssub = EPSSI; } model->BSIM4v6coxe = epsrox * EPS0 / toxe; if(model->BSIM4v6mtrlMod == 0) model->BSIM4v6coxp = model->BSIM4v6epsrox * EPS0 / model->BSIM4v6toxp; if (!model->BSIM4v6cgdoGiven) { if (model->BSIM4v6dlcGiven && (model->BSIM4v6dlc > 0.0)) model->BSIM4v6cgdo = model->BSIM4v6dlc * model->BSIM4v6coxe - model->BSIM4v6cgdl ; else model->BSIM4v6cgdo = 0.6 * model->BSIM4v6xj * model->BSIM4v6coxe; } if (!model->BSIM4v6cgsoGiven) { if (model->BSIM4v6dlcGiven && (model->BSIM4v6dlc > 0.0)) model->BSIM4v6cgso = model->BSIM4v6dlc * model->BSIM4v6coxe - model->BSIM4v6cgsl ; else model->BSIM4v6cgso = 0.6 * model->BSIM4v6xj * model->BSIM4v6coxe; } if (!model->BSIM4v6cgboGiven) model->BSIM4v6cgbo = 2.0 * model->BSIM4v6dwc * model->BSIM4v6coxe; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM4v6tnom; TRatio = Temp / Tnom; model->BSIM4v6vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM4v6factor1 = sqrt(epssub / (epsrox * EPS0)* toxe); Vtm0 = model->BSIM4v6vtm0 = KboQ * Tnom; if(model->BSIM4v6mtrlMod==0) { Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); } else { Eg0 = model->BSIM4v6bg0sub - model->BSIM4v6tbgasub * Tnom * Tnom / (Tnom + model->BSIM4v6tbgbsub); T0 = model->BSIM4v6bg0sub - model->BSIM4v6tbgasub * 90090.0225 / (300.15 + model->BSIM4v6tbgbsub); ni = model->BSIM4v6ni0sub * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp((T0 - Eg0) / (2.0 * Vtm0)); } model->BSIM4v6Eg0 = Eg0; model->BSIM4v6vtm = KboQ * Temp; if(model->BSIM4v6mtrlMod == 0) Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); else Eg = model->BSIM4v6bg0sub - model->BSIM4v6tbgasub * Temp * Temp / (Temp + model->BSIM4v6tbgbsub); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM4v6vtm; T1 = log(Temp / Tnom); T2 = T0 + model->BSIM4v6SjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v6SjctEmissionCoeff); model->BSIM4v6SjctTempSatCurDensity = model->BSIM4v6SjctSatCurDensity * T3; model->BSIM4v6SjctSidewallTempSatCurDensity = model->BSIM4v6SjctSidewallSatCurDensity * T3; model->BSIM4v6SjctGateSidewallTempSatCurDensity = model->BSIM4v6SjctGateSidewallSatCurDensity * T3; T2 = T0 + model->BSIM4v6DjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v6DjctEmissionCoeff); model->BSIM4v6DjctTempSatCurDensity = model->BSIM4v6DjctSatCurDensity * T3; model->BSIM4v6DjctSidewallTempSatCurDensity = model->BSIM4v6DjctSidewallSatCurDensity * T3; model->BSIM4v6DjctGateSidewallTempSatCurDensity = model->BSIM4v6DjctGateSidewallSatCurDensity * T3; } else { model->BSIM4v6SjctTempSatCurDensity = model->BSIM4v6SjctSatCurDensity; model->BSIM4v6SjctSidewallTempSatCurDensity = model->BSIM4v6SjctSidewallSatCurDensity; model->BSIM4v6SjctGateSidewallTempSatCurDensity = model->BSIM4v6SjctGateSidewallSatCurDensity; model->BSIM4v6DjctTempSatCurDensity = model->BSIM4v6DjctSatCurDensity; model->BSIM4v6DjctSidewallTempSatCurDensity = model->BSIM4v6DjctSidewallSatCurDensity; model->BSIM4v6DjctGateSidewallTempSatCurDensity = model->BSIM4v6DjctGateSidewallSatCurDensity; } if (model->BSIM4v6SjctTempSatCurDensity < 0.0) model->BSIM4v6SjctTempSatCurDensity = 0.0; if (model->BSIM4v6SjctSidewallTempSatCurDensity < 0.0) model->BSIM4v6SjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v6SjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v6SjctGateSidewallTempSatCurDensity = 0.0; if (model->BSIM4v6DjctTempSatCurDensity < 0.0) model->BSIM4v6DjctTempSatCurDensity = 0.0; if (model->BSIM4v6DjctSidewallTempSatCurDensity < 0.0) model->BSIM4v6DjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v6DjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v6DjctGateSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM4v6tnom; T0 = model->BSIM4v6tcj * delTemp; if (T0 >= -1.0) { model->BSIM4v6SunitAreaTempJctCap = model->BSIM4v6SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ model->BSIM4v6DunitAreaTempJctCap = model->BSIM4v6DunitAreaJctCap *(1.0 + T0); } else { if (model->BSIM4v6SunitAreaJctCap > 0.0) { model->BSIM4v6SunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjs to be negative. Cjs is clamped to zero.\n"); } if (model->BSIM4v6DunitAreaJctCap > 0.0) { model->BSIM4v6DunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjd to be negative. Cjd is clamped to zero.\n"); } } T0 = model->BSIM4v6tcjsw * delTemp; if (model->BSIM4v6SunitLengthSidewallJctCap < 0.0)/*4.6.2*/ {model->BSIM4v6SunitLengthSidewallJctCap = 0.0; fprintf(stderr, "CJSWS is negative. Cjsws is clamped to zero.\n");} if (model->BSIM4v6DunitLengthSidewallJctCap < 0.0) {model->BSIM4v6DunitLengthSidewallJctCap = 0.0; fprintf(stderr, "CJSWD is negative. Cjswd is clamped to zero.\n");} if (T0 >= -1.0) { model->BSIM4v6SunitLengthSidewallTempJctCap = model->BSIM4v6SunitLengthSidewallJctCap *(1.0 + T0); model->BSIM4v6DunitLengthSidewallTempJctCap = model->BSIM4v6DunitLengthSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v6SunitLengthSidewallJctCap > 0.0) { model->BSIM4v6SunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsws to be negative. Cjsws is clamped to zero.\n"); } if (model->BSIM4v6DunitLengthSidewallJctCap > 0.0) { model->BSIM4v6DunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswd to be negative. Cjswd is clamped to zero.\n"); } } T0 = model->BSIM4v6tcjswg * delTemp; if (T0 >= -1.0) { model->BSIM4v6SunitLengthGateSidewallTempJctCap = model->BSIM4v6SunitLengthGateSidewallJctCap *(1.0 + T0); model->BSIM4v6DunitLengthGateSidewallTempJctCap = model->BSIM4v6DunitLengthGateSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v6SunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v6SunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgs to be negative. Cjswgs is clamped to zero.\n"); } if (model->BSIM4v6DunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v6DunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgd to be negative. Cjswgd is clamped to zero.\n"); } } model->BSIM4v6PhiBS = model->BSIM4v6SbulkJctPotential - model->BSIM4v6tpb * delTemp; if (model->BSIM4v6PhiBS < 0.01) { model->BSIM4v6PhiBS = 0.01; fprintf(stderr, "Temperature effect has caused pbs to be less than 0.01. Pbs is clamped to 0.01.\n"); } model->BSIM4v6PhiBD = model->BSIM4v6DbulkJctPotential - model->BSIM4v6tpb * delTemp; if (model->BSIM4v6PhiBD < 0.01) { model->BSIM4v6PhiBD = 0.01; fprintf(stderr, "Temperature effect has caused pbd to be less than 0.01. Pbd is clamped to 0.01.\n"); } model->BSIM4v6PhiBSWS = model->BSIM4v6SsidewallJctPotential - model->BSIM4v6tpbsw * delTemp; if (model->BSIM4v6PhiBSWS <= 0.01) { model->BSIM4v6PhiBSWS = 0.01; fprintf(stderr, "Temperature effect has caused pbsws to be less than 0.01. Pbsws is clamped to 0.01.\n"); } model->BSIM4v6PhiBSWD = model->BSIM4v6DsidewallJctPotential - model->BSIM4v6tpbsw * delTemp; if (model->BSIM4v6PhiBSWD <= 0.01) { model->BSIM4v6PhiBSWD = 0.01; fprintf(stderr, "Temperature effect has caused pbswd to be less than 0.01. Pbswd is clamped to 0.01.\n"); } model->BSIM4v6PhiBSWGS = model->BSIM4v6SGatesidewallJctPotential - model->BSIM4v6tpbswg * delTemp; if (model->BSIM4v6PhiBSWGS <= 0.01) { model->BSIM4v6PhiBSWGS = 0.01; fprintf(stderr, "Temperature effect has caused pbswgs to be less than 0.01. Pbswgs is clamped to 0.01.\n"); } model->BSIM4v6PhiBSWGD = model->BSIM4v6DGatesidewallJctPotential - model->BSIM4v6tpbswg * delTemp; if (model->BSIM4v6PhiBSWGD <= 0.01) { model->BSIM4v6PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ if (model->BSIM4v6ijthdfwd <= 0.0) { model->BSIM4v6ijthdfwd = 0.0; fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4v6ijthdfwd); } if (model->BSIM4v6ijthsfwd <= 0.0) { model->BSIM4v6ijthsfwd = 0.0; fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4v6ijthsfwd); } if (model->BSIM4v6ijthdrev <= 0.0) { model->BSIM4v6ijthdrev = 0.0; fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4v6ijthdrev); } if (model->BSIM4v6ijthsrev <= 0.0) { model->BSIM4v6ijthsrev = 0.0; fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4v6ijthsrev); } if ((model->BSIM4v6xjbvd <= 0.0) && (model->BSIM4v6dioMod == 2)) { model->BSIM4v6xjbvd = 0.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v6xjbvd); } else if ((model->BSIM4v6xjbvd < 0.0) && (model->BSIM4v6dioMod == 0)) { model->BSIM4v6xjbvd = 0.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v6xjbvd); } if (model->BSIM4v6bvd <= 0.0) /*4.6.2*/ { model->BSIM4v6bvd = 0.0; fprintf(stderr, "BVD reset to %g.\n", model->BSIM4v6bvd); } if ((model->BSIM4v6xjbvs <= 0.0) && (model->BSIM4v6dioMod == 2)) { model->BSIM4v6xjbvs = 0.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v6xjbvs); } else if ((model->BSIM4v6xjbvs < 0.0) && (model->BSIM4v6dioMod == 0)) { model->BSIM4v6xjbvs = 0.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v6xjbvs); } if (model->BSIM4v6bvs <= 0.0) { model->BSIM4v6bvs = 0.0; fprintf(stderr, "BVS reset to %g.\n", model->BSIM4v6bvs); } /* loop through all the instances of the model */ for (here = model->BSIM4v6instances; here != NULL; here = here->BSIM4v6nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM4v6l == pSizeDependParamKnot->Length) && (here->BSIM4v6w == pSizeDependParamKnot->Width) && (here->BSIM4v6nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } /* stress effect */ Ldrn = here->BSIM4v6l; Wdrn = here->BSIM4v6w / here->BSIM4v6nf; if (Size_Not_Found) { pParam = TMALLOC(struct bsim4v6SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; pParam->Length = here->BSIM4v6l; pParam->Width = here->BSIM4v6w; pParam->NFinger = here->BSIM4v6nf; Lnew = here->BSIM4v6l + model->BSIM4v6xl ; Wnew = here->BSIM4v6w / here->BSIM4v6nf + model->BSIM4v6xw; T0 = pow(Lnew, model->BSIM4v6Lln); T1 = pow(Wnew, model->BSIM4v6Lwn); tmp1 = model->BSIM4v6Ll / T0 + model->BSIM4v6Lw / T1 + model->BSIM4v6Lwl / (T0 * T1); pParam->BSIM4v6dl = model->BSIM4v6Lint + tmp1; tmp2 = model->BSIM4v6Llc / T0 + model->BSIM4v6Lwc / T1 + model->BSIM4v6Lwlc / (T0 * T1); pParam->BSIM4v6dlc = model->BSIM4v6dlc + tmp2; T2 = pow(Lnew, model->BSIM4v6Wln); T3 = pow(Wnew, model->BSIM4v6Wwn); tmp1 = model->BSIM4v6Wl / T2 + model->BSIM4v6Ww / T3 + model->BSIM4v6Wwl / (T2 * T3); pParam->BSIM4v6dw = model->BSIM4v6Wint + tmp1; tmp2 = model->BSIM4v6Wlc / T2 + model->BSIM4v6Wwc / T3 + model->BSIM4v6Wwlc / (T2 * T3); pParam->BSIM4v6dwc = model->BSIM4v6dwc + tmp2; pParam->BSIM4v6dwj = model->BSIM4v6dwj + tmp2; pParam->BSIM4v6leff = Lnew - 2.0 * pParam->BSIM4v6dl; if (pParam->BSIM4v6leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v6: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v6weff = Wnew - 2.0 * pParam->BSIM4v6dw; if (pParam->BSIM4v6weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v6: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v6leffCV = Lnew - 2.0 * pParam->BSIM4v6dlc; if (pParam->BSIM4v6leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v6: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v6weffCV = Wnew - 2.0 * pParam->BSIM4v6dwc; if (pParam->BSIM4v6weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v6: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v6weffCJ = Wnew - 2.0 * pParam->BSIM4v6dwj; if (pParam->BSIM4v6weffCJ <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v6: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } if (model->BSIM4v6binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM4v6leff; Inv_W = 1.0e-6 / pParam->BSIM4v6weff; Inv_LW = 1.0e-12 / (pParam->BSIM4v6leff * pParam->BSIM4v6weff); } else { Inv_L = 1.0 / pParam->BSIM4v6leff; Inv_W = 1.0 / pParam->BSIM4v6weff; Inv_LW = 1.0 / (pParam->BSIM4v6leff * pParam->BSIM4v6weff); } pParam->BSIM4v6cdsc = model->BSIM4v6cdsc + model->BSIM4v6lcdsc * Inv_L + model->BSIM4v6wcdsc * Inv_W + model->BSIM4v6pcdsc * Inv_LW; pParam->BSIM4v6cdscb = model->BSIM4v6cdscb + model->BSIM4v6lcdscb * Inv_L + model->BSIM4v6wcdscb * Inv_W + model->BSIM4v6pcdscb * Inv_LW; pParam->BSIM4v6cdscd = model->BSIM4v6cdscd + model->BSIM4v6lcdscd * Inv_L + model->BSIM4v6wcdscd * Inv_W + model->BSIM4v6pcdscd * Inv_LW; pParam->BSIM4v6cit = model->BSIM4v6cit + model->BSIM4v6lcit * Inv_L + model->BSIM4v6wcit * Inv_W + model->BSIM4v6pcit * Inv_LW; pParam->BSIM4v6nfactor = model->BSIM4v6nfactor + model->BSIM4v6lnfactor * Inv_L + model->BSIM4v6wnfactor * Inv_W + model->BSIM4v6pnfactor * Inv_LW; pParam->BSIM4v6xj = model->BSIM4v6xj + model->BSIM4v6lxj * Inv_L + model->BSIM4v6wxj * Inv_W + model->BSIM4v6pxj * Inv_LW; pParam->BSIM4v6vsat = model->BSIM4v6vsat + model->BSIM4v6lvsat * Inv_L + model->BSIM4v6wvsat * Inv_W + model->BSIM4v6pvsat * Inv_LW; pParam->BSIM4v6at = model->BSIM4v6at + model->BSIM4v6lat * Inv_L + model->BSIM4v6wat * Inv_W + model->BSIM4v6pat * Inv_LW; pParam->BSIM4v6a0 = model->BSIM4v6a0 + model->BSIM4v6la0 * Inv_L + model->BSIM4v6wa0 * Inv_W + model->BSIM4v6pa0 * Inv_LW; pParam->BSIM4v6ags = model->BSIM4v6ags + model->BSIM4v6lags * Inv_L + model->BSIM4v6wags * Inv_W + model->BSIM4v6pags * Inv_LW; pParam->BSIM4v6a1 = model->BSIM4v6a1 + model->BSIM4v6la1 * Inv_L + model->BSIM4v6wa1 * Inv_W + model->BSIM4v6pa1 * Inv_LW; pParam->BSIM4v6a2 = model->BSIM4v6a2 + model->BSIM4v6la2 * Inv_L + model->BSIM4v6wa2 * Inv_W + model->BSIM4v6pa2 * Inv_LW; pParam->BSIM4v6keta = model->BSIM4v6keta + model->BSIM4v6lketa * Inv_L + model->BSIM4v6wketa * Inv_W + model->BSIM4v6pketa * Inv_LW; pParam->BSIM4v6nsub = model->BSIM4v6nsub + model->BSIM4v6lnsub * Inv_L + model->BSIM4v6wnsub * Inv_W + model->BSIM4v6pnsub * Inv_LW; pParam->BSIM4v6ndep = model->BSIM4v6ndep + model->BSIM4v6lndep * Inv_L + model->BSIM4v6wndep * Inv_W + model->BSIM4v6pndep * Inv_LW; pParam->BSIM4v6nsd = model->BSIM4v6nsd + model->BSIM4v6lnsd * Inv_L + model->BSIM4v6wnsd * Inv_W + model->BSIM4v6pnsd * Inv_LW; pParam->BSIM4v6phin = model->BSIM4v6phin + model->BSIM4v6lphin * Inv_L + model->BSIM4v6wphin * Inv_W + model->BSIM4v6pphin * Inv_LW; pParam->BSIM4v6ngate = model->BSIM4v6ngate + model->BSIM4v6lngate * Inv_L + model->BSIM4v6wngate * Inv_W + model->BSIM4v6pngate * Inv_LW; pParam->BSIM4v6gamma1 = model->BSIM4v6gamma1 + model->BSIM4v6lgamma1 * Inv_L + model->BSIM4v6wgamma1 * Inv_W + model->BSIM4v6pgamma1 * Inv_LW; pParam->BSIM4v6gamma2 = model->BSIM4v6gamma2 + model->BSIM4v6lgamma2 * Inv_L + model->BSIM4v6wgamma2 * Inv_W + model->BSIM4v6pgamma2 * Inv_LW; pParam->BSIM4v6vbx = model->BSIM4v6vbx + model->BSIM4v6lvbx * Inv_L + model->BSIM4v6wvbx * Inv_W + model->BSIM4v6pvbx * Inv_LW; pParam->BSIM4v6vbm = model->BSIM4v6vbm + model->BSIM4v6lvbm * Inv_L + model->BSIM4v6wvbm * Inv_W + model->BSIM4v6pvbm * Inv_LW; pParam->BSIM4v6xt = model->BSIM4v6xt + model->BSIM4v6lxt * Inv_L + model->BSIM4v6wxt * Inv_W + model->BSIM4v6pxt * Inv_LW; pParam->BSIM4v6vfb = model->BSIM4v6vfb + model->BSIM4v6lvfb * Inv_L + model->BSIM4v6wvfb * Inv_W + model->BSIM4v6pvfb * Inv_LW; pParam->BSIM4v6k1 = model->BSIM4v6k1 + model->BSIM4v6lk1 * Inv_L + model->BSIM4v6wk1 * Inv_W + model->BSIM4v6pk1 * Inv_LW; pParam->BSIM4v6kt1 = model->BSIM4v6kt1 + model->BSIM4v6lkt1 * Inv_L + model->BSIM4v6wkt1 * Inv_W + model->BSIM4v6pkt1 * Inv_LW; pParam->BSIM4v6kt1l = model->BSIM4v6kt1l + model->BSIM4v6lkt1l * Inv_L + model->BSIM4v6wkt1l * Inv_W + model->BSIM4v6pkt1l * Inv_LW; pParam->BSIM4v6k2 = model->BSIM4v6k2 + model->BSIM4v6lk2 * Inv_L + model->BSIM4v6wk2 * Inv_W + model->BSIM4v6pk2 * Inv_LW; pParam->BSIM4v6kt2 = model->BSIM4v6kt2 + model->BSIM4v6lkt2 * Inv_L + model->BSIM4v6wkt2 * Inv_W + model->BSIM4v6pkt2 * Inv_LW; pParam->BSIM4v6k3 = model->BSIM4v6k3 + model->BSIM4v6lk3 * Inv_L + model->BSIM4v6wk3 * Inv_W + model->BSIM4v6pk3 * Inv_LW; pParam->BSIM4v6k3b = model->BSIM4v6k3b + model->BSIM4v6lk3b * Inv_L + model->BSIM4v6wk3b * Inv_W + model->BSIM4v6pk3b * Inv_LW; pParam->BSIM4v6w0 = model->BSIM4v6w0 + model->BSIM4v6lw0 * Inv_L + model->BSIM4v6ww0 * Inv_W + model->BSIM4v6pw0 * Inv_LW; pParam->BSIM4v6lpe0 = model->BSIM4v6lpe0 + model->BSIM4v6llpe0 * Inv_L + model->BSIM4v6wlpe0 * Inv_W + model->BSIM4v6plpe0 * Inv_LW; pParam->BSIM4v6lpeb = model->BSIM4v6lpeb + model->BSIM4v6llpeb * Inv_L + model->BSIM4v6wlpeb * Inv_W + model->BSIM4v6plpeb * Inv_LW; pParam->BSIM4v6dvtp0 = model->BSIM4v6dvtp0 + model->BSIM4v6ldvtp0 * Inv_L + model->BSIM4v6wdvtp0 * Inv_W + model->BSIM4v6pdvtp0 * Inv_LW; pParam->BSIM4v6dvtp1 = model->BSIM4v6dvtp1 + model->BSIM4v6ldvtp1 * Inv_L + model->BSIM4v6wdvtp1 * Inv_W + model->BSIM4v6pdvtp1 * Inv_LW; pParam->BSIM4v6dvt0 = model->BSIM4v6dvt0 + model->BSIM4v6ldvt0 * Inv_L + model->BSIM4v6wdvt0 * Inv_W + model->BSIM4v6pdvt0 * Inv_LW; pParam->BSIM4v6dvt1 = model->BSIM4v6dvt1 + model->BSIM4v6ldvt1 * Inv_L + model->BSIM4v6wdvt1 * Inv_W + model->BSIM4v6pdvt1 * Inv_LW; pParam->BSIM4v6dvt2 = model->BSIM4v6dvt2 + model->BSIM4v6ldvt2 * Inv_L + model->BSIM4v6wdvt2 * Inv_W + model->BSIM4v6pdvt2 * Inv_LW; pParam->BSIM4v6dvt0w = model->BSIM4v6dvt0w + model->BSIM4v6ldvt0w * Inv_L + model->BSIM4v6wdvt0w * Inv_W + model->BSIM4v6pdvt0w * Inv_LW; pParam->BSIM4v6dvt1w = model->BSIM4v6dvt1w + model->BSIM4v6ldvt1w * Inv_L + model->BSIM4v6wdvt1w * Inv_W + model->BSIM4v6pdvt1w * Inv_LW; pParam->BSIM4v6dvt2w = model->BSIM4v6dvt2w + model->BSIM4v6ldvt2w * Inv_L + model->BSIM4v6wdvt2w * Inv_W + model->BSIM4v6pdvt2w * Inv_LW; pParam->BSIM4v6drout = model->BSIM4v6drout + model->BSIM4v6ldrout * Inv_L + model->BSIM4v6wdrout * Inv_W + model->BSIM4v6pdrout * Inv_LW; pParam->BSIM4v6dsub = model->BSIM4v6dsub + model->BSIM4v6ldsub * Inv_L + model->BSIM4v6wdsub * Inv_W + model->BSIM4v6pdsub * Inv_LW; pParam->BSIM4v6vth0 = model->BSIM4v6vth0 + model->BSIM4v6lvth0 * Inv_L + model->BSIM4v6wvth0 * Inv_W + model->BSIM4v6pvth0 * Inv_LW; pParam->BSIM4v6ua = model->BSIM4v6ua + model->BSIM4v6lua * Inv_L + model->BSIM4v6wua * Inv_W + model->BSIM4v6pua * Inv_LW; pParam->BSIM4v6ua1 = model->BSIM4v6ua1 + model->BSIM4v6lua1 * Inv_L + model->BSIM4v6wua1 * Inv_W + model->BSIM4v6pua1 * Inv_LW; pParam->BSIM4v6ub = model->BSIM4v6ub + model->BSIM4v6lub * Inv_L + model->BSIM4v6wub * Inv_W + model->BSIM4v6pub * Inv_LW; pParam->BSIM4v6ub1 = model->BSIM4v6ub1 + model->BSIM4v6lub1 * Inv_L + model->BSIM4v6wub1 * Inv_W + model->BSIM4v6pub1 * Inv_LW; pParam->BSIM4v6uc = model->BSIM4v6uc + model->BSIM4v6luc * Inv_L + model->BSIM4v6wuc * Inv_W + model->BSIM4v6puc * Inv_LW; pParam->BSIM4v6uc1 = model->BSIM4v6uc1 + model->BSIM4v6luc1 * Inv_L + model->BSIM4v6wuc1 * Inv_W + model->BSIM4v6puc1 * Inv_LW; pParam->BSIM4v6ud = model->BSIM4v6ud + model->BSIM4v6lud * Inv_L + model->BSIM4v6wud * Inv_W + model->BSIM4v6pud * Inv_LW; pParam->BSIM4v6ud1 = model->BSIM4v6ud1 + model->BSIM4v6lud1 * Inv_L + model->BSIM4v6wud1 * Inv_W + model->BSIM4v6pud1 * Inv_LW; pParam->BSIM4v6up = model->BSIM4v6up + model->BSIM4v6lup * Inv_L + model->BSIM4v6wup * Inv_W + model->BSIM4v6pup * Inv_LW; pParam->BSIM4v6lp = model->BSIM4v6lp + model->BSIM4v6llp * Inv_L + model->BSIM4v6wlp * Inv_W + model->BSIM4v6plp * Inv_LW; pParam->BSIM4v6eu = model->BSIM4v6eu + model->BSIM4v6leu * Inv_L + model->BSIM4v6weu * Inv_W + model->BSIM4v6peu * Inv_LW; pParam->BSIM4v6u0 = model->BSIM4v6u0 + model->BSIM4v6lu0 * Inv_L + model->BSIM4v6wu0 * Inv_W + model->BSIM4v6pu0 * Inv_LW; pParam->BSIM4v6ute = model->BSIM4v6ute + model->BSIM4v6lute * Inv_L + model->BSIM4v6wute * Inv_W + model->BSIM4v6pute * Inv_LW; /*high k mobility*/ pParam->BSIM4v6ucs = model->BSIM4v6ucs + model->BSIM4v6lucs * Inv_L + model->BSIM4v6wucs * Inv_W + model->BSIM4v6pucs * Inv_LW; pParam->BSIM4v6ucste = model->BSIM4v6ucste + model->BSIM4v6lucste * Inv_L + model->BSIM4v6wucste * Inv_W + model->BSIM4v6pucste * Inv_LW; pParam->BSIM4v6voff = model->BSIM4v6voff + model->BSIM4v6lvoff * Inv_L + model->BSIM4v6wvoff * Inv_W + model->BSIM4v6pvoff * Inv_LW; pParam->BSIM4v6tvoff = model->BSIM4v6tvoff + model->BSIM4v6ltvoff * Inv_L + model->BSIM4v6wtvoff * Inv_W + model->BSIM4v6ptvoff * Inv_LW; pParam->BSIM4v6minv = model->BSIM4v6minv + model->BSIM4v6lminv * Inv_L + model->BSIM4v6wminv * Inv_W + model->BSIM4v6pminv * Inv_LW; pParam->BSIM4v6minvcv = model->BSIM4v6minvcv + model->BSIM4v6lminvcv * Inv_L + model->BSIM4v6wminvcv * Inv_W + model->BSIM4v6pminvcv * Inv_LW; pParam->BSIM4v6fprout = model->BSIM4v6fprout + model->BSIM4v6lfprout * Inv_L + model->BSIM4v6wfprout * Inv_W + model->BSIM4v6pfprout * Inv_LW; pParam->BSIM4v6pdits = model->BSIM4v6pdits + model->BSIM4v6lpdits * Inv_L + model->BSIM4v6wpdits * Inv_W + model->BSIM4v6ppdits * Inv_LW; pParam->BSIM4v6pditsd = model->BSIM4v6pditsd + model->BSIM4v6lpditsd * Inv_L + model->BSIM4v6wpditsd * Inv_W + model->BSIM4v6ppditsd * Inv_LW; pParam->BSIM4v6delta = model->BSIM4v6delta + model->BSIM4v6ldelta * Inv_L + model->BSIM4v6wdelta * Inv_W + model->BSIM4v6pdelta * Inv_LW; pParam->BSIM4v6rdsw = model->BSIM4v6rdsw + model->BSIM4v6lrdsw * Inv_L + model->BSIM4v6wrdsw * Inv_W + model->BSIM4v6prdsw * Inv_LW; pParam->BSIM4v6rdw = model->BSIM4v6rdw + model->BSIM4v6lrdw * Inv_L + model->BSIM4v6wrdw * Inv_W + model->BSIM4v6prdw * Inv_LW; pParam->BSIM4v6rsw = model->BSIM4v6rsw + model->BSIM4v6lrsw * Inv_L + model->BSIM4v6wrsw * Inv_W + model->BSIM4v6prsw * Inv_LW; pParam->BSIM4v6prwg = model->BSIM4v6prwg + model->BSIM4v6lprwg * Inv_L + model->BSIM4v6wprwg * Inv_W + model->BSIM4v6pprwg * Inv_LW; pParam->BSIM4v6prwb = model->BSIM4v6prwb + model->BSIM4v6lprwb * Inv_L + model->BSIM4v6wprwb * Inv_W + model->BSIM4v6pprwb * Inv_LW; pParam->BSIM4v6prt = model->BSIM4v6prt + model->BSIM4v6lprt * Inv_L + model->BSIM4v6wprt * Inv_W + model->BSIM4v6pprt * Inv_LW; pParam->BSIM4v6eta0 = model->BSIM4v6eta0 + model->BSIM4v6leta0 * Inv_L + model->BSIM4v6weta0 * Inv_W + model->BSIM4v6peta0 * Inv_LW; pParam->BSIM4v6etab = model->BSIM4v6etab + model->BSIM4v6letab * Inv_L + model->BSIM4v6wetab * Inv_W + model->BSIM4v6petab * Inv_LW; pParam->BSIM4v6pclm = model->BSIM4v6pclm + model->BSIM4v6lpclm * Inv_L + model->BSIM4v6wpclm * Inv_W + model->BSIM4v6ppclm * Inv_LW; pParam->BSIM4v6pdibl1 = model->BSIM4v6pdibl1 + model->BSIM4v6lpdibl1 * Inv_L + model->BSIM4v6wpdibl1 * Inv_W + model->BSIM4v6ppdibl1 * Inv_LW; pParam->BSIM4v6pdibl2 = model->BSIM4v6pdibl2 + model->BSIM4v6lpdibl2 * Inv_L + model->BSIM4v6wpdibl2 * Inv_W + model->BSIM4v6ppdibl2 * Inv_LW; pParam->BSIM4v6pdiblb = model->BSIM4v6pdiblb + model->BSIM4v6lpdiblb * Inv_L + model->BSIM4v6wpdiblb * Inv_W + model->BSIM4v6ppdiblb * Inv_LW; pParam->BSIM4v6pscbe1 = model->BSIM4v6pscbe1 + model->BSIM4v6lpscbe1 * Inv_L + model->BSIM4v6wpscbe1 * Inv_W + model->BSIM4v6ppscbe1 * Inv_LW; pParam->BSIM4v6pscbe2 = model->BSIM4v6pscbe2 + model->BSIM4v6lpscbe2 * Inv_L + model->BSIM4v6wpscbe2 * Inv_W + model->BSIM4v6ppscbe2 * Inv_LW; pParam->BSIM4v6pvag = model->BSIM4v6pvag + model->BSIM4v6lpvag * Inv_L + model->BSIM4v6wpvag * Inv_W + model->BSIM4v6ppvag * Inv_LW; pParam->BSIM4v6wr = model->BSIM4v6wr + model->BSIM4v6lwr * Inv_L + model->BSIM4v6wwr * Inv_W + model->BSIM4v6pwr * Inv_LW; pParam->BSIM4v6dwg = model->BSIM4v6dwg + model->BSIM4v6ldwg * Inv_L + model->BSIM4v6wdwg * Inv_W + model->BSIM4v6pdwg * Inv_LW; pParam->BSIM4v6dwb = model->BSIM4v6dwb + model->BSIM4v6ldwb * Inv_L + model->BSIM4v6wdwb * Inv_W + model->BSIM4v6pdwb * Inv_LW; pParam->BSIM4v6b0 = model->BSIM4v6b0 + model->BSIM4v6lb0 * Inv_L + model->BSIM4v6wb0 * Inv_W + model->BSIM4v6pb0 * Inv_LW; pParam->BSIM4v6b1 = model->BSIM4v6b1 + model->BSIM4v6lb1 * Inv_L + model->BSIM4v6wb1 * Inv_W + model->BSIM4v6pb1 * Inv_LW; pParam->BSIM4v6alpha0 = model->BSIM4v6alpha0 + model->BSIM4v6lalpha0 * Inv_L + model->BSIM4v6walpha0 * Inv_W + model->BSIM4v6palpha0 * Inv_LW; pParam->BSIM4v6alpha1 = model->BSIM4v6alpha1 + model->BSIM4v6lalpha1 * Inv_L + model->BSIM4v6walpha1 * Inv_W + model->BSIM4v6palpha1 * Inv_LW; pParam->BSIM4v6beta0 = model->BSIM4v6beta0 + model->BSIM4v6lbeta0 * Inv_L + model->BSIM4v6wbeta0 * Inv_W + model->BSIM4v6pbeta0 * Inv_LW; pParam->BSIM4v6agidl = model->BSIM4v6agidl + model->BSIM4v6lagidl * Inv_L + model->BSIM4v6wagidl * Inv_W + model->BSIM4v6pagidl * Inv_LW; pParam->BSIM4v6bgidl = model->BSIM4v6bgidl + model->BSIM4v6lbgidl * Inv_L + model->BSIM4v6wbgidl * Inv_W + model->BSIM4v6pbgidl * Inv_LW; pParam->BSIM4v6cgidl = model->BSIM4v6cgidl + model->BSIM4v6lcgidl * Inv_L + model->BSIM4v6wcgidl * Inv_W + model->BSIM4v6pcgidl * Inv_LW; pParam->BSIM4v6egidl = model->BSIM4v6egidl + model->BSIM4v6legidl * Inv_L + model->BSIM4v6wegidl * Inv_W + model->BSIM4v6pegidl * Inv_LW; pParam->BSIM4v6agisl = model->BSIM4v6agisl + model->BSIM4v6lagisl * Inv_L + model->BSIM4v6wagisl * Inv_W + model->BSIM4v6pagisl * Inv_LW; pParam->BSIM4v6bgisl = model->BSIM4v6bgisl + model->BSIM4v6lbgisl * Inv_L + model->BSIM4v6wbgisl * Inv_W + model->BSIM4v6pbgisl * Inv_LW; pParam->BSIM4v6cgisl = model->BSIM4v6cgisl + model->BSIM4v6lcgisl * Inv_L + model->BSIM4v6wcgisl * Inv_W + model->BSIM4v6pcgisl * Inv_LW; pParam->BSIM4v6egisl = model->BSIM4v6egisl + model->BSIM4v6legisl * Inv_L + model->BSIM4v6wegisl * Inv_W + model->BSIM4v6pegisl * Inv_LW; pParam->BSIM4v6aigc = model->BSIM4v6aigc + model->BSIM4v6laigc * Inv_L + model->BSIM4v6waigc * Inv_W + model->BSIM4v6paigc * Inv_LW; pParam->BSIM4v6bigc = model->BSIM4v6bigc + model->BSIM4v6lbigc * Inv_L + model->BSIM4v6wbigc * Inv_W + model->BSIM4v6pbigc * Inv_LW; pParam->BSIM4v6cigc = model->BSIM4v6cigc + model->BSIM4v6lcigc * Inv_L + model->BSIM4v6wcigc * Inv_W + model->BSIM4v6pcigc * Inv_LW; pParam->BSIM4v6aigs = model->BSIM4v6aigs + model->BSIM4v6laigs * Inv_L + model->BSIM4v6waigs * Inv_W + model->BSIM4v6paigs * Inv_LW; pParam->BSIM4v6bigs = model->BSIM4v6bigs + model->BSIM4v6lbigs * Inv_L + model->BSIM4v6wbigs * Inv_W + model->BSIM4v6pbigs * Inv_LW; pParam->BSIM4v6cigs = model->BSIM4v6cigs + model->BSIM4v6lcigs * Inv_L + model->BSIM4v6wcigs * Inv_W + model->BSIM4v6pcigs * Inv_LW; pParam->BSIM4v6aigd = model->BSIM4v6aigd + model->BSIM4v6laigd * Inv_L + model->BSIM4v6waigd * Inv_W + model->BSIM4v6paigd * Inv_LW; pParam->BSIM4v6bigd = model->BSIM4v6bigd + model->BSIM4v6lbigd * Inv_L + model->BSIM4v6wbigd * Inv_W + model->BSIM4v6pbigd * Inv_LW; pParam->BSIM4v6cigd = model->BSIM4v6cigd + model->BSIM4v6lcigd * Inv_L + model->BSIM4v6wcigd * Inv_W + model->BSIM4v6pcigd * Inv_LW; pParam->BSIM4v6aigbacc = model->BSIM4v6aigbacc + model->BSIM4v6laigbacc * Inv_L + model->BSIM4v6waigbacc * Inv_W + model->BSIM4v6paigbacc * Inv_LW; pParam->BSIM4v6bigbacc = model->BSIM4v6bigbacc + model->BSIM4v6lbigbacc * Inv_L + model->BSIM4v6wbigbacc * Inv_W + model->BSIM4v6pbigbacc * Inv_LW; pParam->BSIM4v6cigbacc = model->BSIM4v6cigbacc + model->BSIM4v6lcigbacc * Inv_L + model->BSIM4v6wcigbacc * Inv_W + model->BSIM4v6pcigbacc * Inv_LW; pParam->BSIM4v6aigbinv = model->BSIM4v6aigbinv + model->BSIM4v6laigbinv * Inv_L + model->BSIM4v6waigbinv * Inv_W + model->BSIM4v6paigbinv * Inv_LW; pParam->BSIM4v6bigbinv = model->BSIM4v6bigbinv + model->BSIM4v6lbigbinv * Inv_L + model->BSIM4v6wbigbinv * Inv_W + model->BSIM4v6pbigbinv * Inv_LW; pParam->BSIM4v6cigbinv = model->BSIM4v6cigbinv + model->BSIM4v6lcigbinv * Inv_L + model->BSIM4v6wcigbinv * Inv_W + model->BSIM4v6pcigbinv * Inv_LW; pParam->BSIM4v6nigc = model->BSIM4v6nigc + model->BSIM4v6lnigc * Inv_L + model->BSIM4v6wnigc * Inv_W + model->BSIM4v6pnigc * Inv_LW; pParam->BSIM4v6nigbacc = model->BSIM4v6nigbacc + model->BSIM4v6lnigbacc * Inv_L + model->BSIM4v6wnigbacc * Inv_W + model->BSIM4v6pnigbacc * Inv_LW; pParam->BSIM4v6nigbinv = model->BSIM4v6nigbinv + model->BSIM4v6lnigbinv * Inv_L + model->BSIM4v6wnigbinv * Inv_W + model->BSIM4v6pnigbinv * Inv_LW; pParam->BSIM4v6ntox = model->BSIM4v6ntox + model->BSIM4v6lntox * Inv_L + model->BSIM4v6wntox * Inv_W + model->BSIM4v6pntox * Inv_LW; pParam->BSIM4v6eigbinv = model->BSIM4v6eigbinv + model->BSIM4v6leigbinv * Inv_L + model->BSIM4v6weigbinv * Inv_W + model->BSIM4v6peigbinv * Inv_LW; pParam->BSIM4v6pigcd = model->BSIM4v6pigcd + model->BSIM4v6lpigcd * Inv_L + model->BSIM4v6wpigcd * Inv_W + model->BSIM4v6ppigcd * Inv_LW; pParam->BSIM4v6poxedge = model->BSIM4v6poxedge + model->BSIM4v6lpoxedge * Inv_L + model->BSIM4v6wpoxedge * Inv_W + model->BSIM4v6ppoxedge * Inv_LW; pParam->BSIM4v6xrcrg1 = model->BSIM4v6xrcrg1 + model->BSIM4v6lxrcrg1 * Inv_L + model->BSIM4v6wxrcrg1 * Inv_W + model->BSIM4v6pxrcrg1 * Inv_LW; pParam->BSIM4v6xrcrg2 = model->BSIM4v6xrcrg2 + model->BSIM4v6lxrcrg2 * Inv_L + model->BSIM4v6wxrcrg2 * Inv_W + model->BSIM4v6pxrcrg2 * Inv_LW; pParam->BSIM4v6lambda = model->BSIM4v6lambda + model->BSIM4v6llambda * Inv_L + model->BSIM4v6wlambda * Inv_W + model->BSIM4v6plambda * Inv_LW; pParam->BSIM4v6vtl = model->BSIM4v6vtl + model->BSIM4v6lvtl * Inv_L + model->BSIM4v6wvtl * Inv_W + model->BSIM4v6pvtl * Inv_LW; pParam->BSIM4v6xn = model->BSIM4v6xn + model->BSIM4v6lxn * Inv_L + model->BSIM4v6wxn * Inv_W + model->BSIM4v6pxn * Inv_LW; pParam->BSIM4v6vfbsdoff = model->BSIM4v6vfbsdoff + model->BSIM4v6lvfbsdoff * Inv_L + model->BSIM4v6wvfbsdoff * Inv_W + model->BSIM4v6pvfbsdoff * Inv_LW; pParam->BSIM4v6tvfbsdoff = model->BSIM4v6tvfbsdoff + model->BSIM4v6ltvfbsdoff * Inv_L + model->BSIM4v6wtvfbsdoff * Inv_W + model->BSIM4v6ptvfbsdoff * Inv_LW; pParam->BSIM4v6cgsl = model->BSIM4v6cgsl + model->BSIM4v6lcgsl * Inv_L + model->BSIM4v6wcgsl * Inv_W + model->BSIM4v6pcgsl * Inv_LW; pParam->BSIM4v6cgdl = model->BSIM4v6cgdl + model->BSIM4v6lcgdl * Inv_L + model->BSIM4v6wcgdl * Inv_W + model->BSIM4v6pcgdl * Inv_LW; pParam->BSIM4v6ckappas = model->BSIM4v6ckappas + model->BSIM4v6lckappas * Inv_L + model->BSIM4v6wckappas * Inv_W + model->BSIM4v6pckappas * Inv_LW; pParam->BSIM4v6ckappad = model->BSIM4v6ckappad + model->BSIM4v6lckappad * Inv_L + model->BSIM4v6wckappad * Inv_W + model->BSIM4v6pckappad * Inv_LW; pParam->BSIM4v6cf = model->BSIM4v6cf + model->BSIM4v6lcf * Inv_L + model->BSIM4v6wcf * Inv_W + model->BSIM4v6pcf * Inv_LW; pParam->BSIM4v6clc = model->BSIM4v6clc + model->BSIM4v6lclc * Inv_L + model->BSIM4v6wclc * Inv_W + model->BSIM4v6pclc * Inv_LW; pParam->BSIM4v6cle = model->BSIM4v6cle + model->BSIM4v6lcle * Inv_L + model->BSIM4v6wcle * Inv_W + model->BSIM4v6pcle * Inv_LW; pParam->BSIM4v6vfbcv = model->BSIM4v6vfbcv + model->BSIM4v6lvfbcv * Inv_L + model->BSIM4v6wvfbcv * Inv_W + model->BSIM4v6pvfbcv * Inv_LW; pParam->BSIM4v6acde = model->BSIM4v6acde + model->BSIM4v6lacde * Inv_L + model->BSIM4v6wacde * Inv_W + model->BSIM4v6pacde * Inv_LW; pParam->BSIM4v6moin = model->BSIM4v6moin + model->BSIM4v6lmoin * Inv_L + model->BSIM4v6wmoin * Inv_W + model->BSIM4v6pmoin * Inv_LW; pParam->BSIM4v6noff = model->BSIM4v6noff + model->BSIM4v6lnoff * Inv_L + model->BSIM4v6wnoff * Inv_W + model->BSIM4v6pnoff * Inv_LW; pParam->BSIM4v6voffcv = model->BSIM4v6voffcv + model->BSIM4v6lvoffcv * Inv_L + model->BSIM4v6wvoffcv * Inv_W + model->BSIM4v6pvoffcv * Inv_LW; pParam->BSIM4v6kvth0we = model->BSIM4v6kvth0we + model->BSIM4v6lkvth0we * Inv_L + model->BSIM4v6wkvth0we * Inv_W + model->BSIM4v6pkvth0we * Inv_LW; pParam->BSIM4v6k2we = model->BSIM4v6k2we + model->BSIM4v6lk2we * Inv_L + model->BSIM4v6wk2we * Inv_W + model->BSIM4v6pk2we * Inv_LW; pParam->BSIM4v6ku0we = model->BSIM4v6ku0we + model->BSIM4v6lku0we * Inv_L + model->BSIM4v6wku0we * Inv_W + model->BSIM4v6pku0we * Inv_LW; pParam->BSIM4v6abulkCVfactor = 1.0 + pow((pParam->BSIM4v6clc / pParam->BSIM4v6leffCV), pParam->BSIM4v6cle); T0 = (TRatio - 1.0); PowWeffWr = pow(pParam->BSIM4v6weffCJ * 1.0e6, pParam->BSIM4v6wr) * here->BSIM4v6nf; T1 = T2 = T3 = T4 = 0.0; pParam->BSIM4v6ucs = pParam->BSIM4v6ucs * pow(TRatio, pParam->BSIM4v6ucste); if(model->BSIM4v6tempMod == 0) { pParam->BSIM4v6ua = pParam->BSIM4v6ua + pParam->BSIM4v6ua1 * T0; pParam->BSIM4v6ub = pParam->BSIM4v6ub + pParam->BSIM4v6ub1 * T0; pParam->BSIM4v6uc = pParam->BSIM4v6uc + pParam->BSIM4v6uc1 * T0; pParam->BSIM4v6ud = pParam->BSIM4v6ud + pParam->BSIM4v6ud1 * T0; pParam->BSIM4v6vsattemp = pParam->BSIM4v6vsat - pParam->BSIM4v6at * T0; T10 = pParam->BSIM4v6prt * T0; if(model->BSIM4v6rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v6rdw + T10; T2 = model->BSIM4v6rdwmin + T10; /* External Rs(V) */ T3 = pParam->BSIM4v6rsw + T10; T4 = model->BSIM4v6rswmin + T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v6rds0 = (pParam->BSIM4v6rdsw + T10) * here->BSIM4v6nf / PowWeffWr; pParam->BSIM4v6rdswmin = (model->BSIM4v6rdswmin + T10) * here->BSIM4v6nf / PowWeffWr; } else { if (model->BSIM4v6tempMod == 3) {pParam->BSIM4v6ua = pParam->BSIM4v6ua * pow(TRatio, pParam->BSIM4v6ua1) ; pParam->BSIM4v6ub = pParam->BSIM4v6ub * pow(TRatio, pParam->BSIM4v6ub1); pParam->BSIM4v6uc = pParam->BSIM4v6uc * pow(TRatio, pParam->BSIM4v6uc1); pParam->BSIM4v6ud = pParam->BSIM4v6ud * pow(TRatio, pParam->BSIM4v6ud1); } else{ /* tempMod = 1, 2 */ pParam->BSIM4v6ua = pParam->BSIM4v6ua * (1.0 + pParam->BSIM4v6ua1 * delTemp) ; pParam->BSIM4v6ub = pParam->BSIM4v6ub * (1.0 + pParam->BSIM4v6ub1 * delTemp); pParam->BSIM4v6uc = pParam->BSIM4v6uc * (1.0 + pParam->BSIM4v6uc1 * delTemp); pParam->BSIM4v6ud = pParam->BSIM4v6ud * (1.0 + pParam->BSIM4v6ud1 * delTemp); } pParam->BSIM4v6vsattemp = pParam->BSIM4v6vsat * (1.0 - pParam->BSIM4v6at * delTemp); T10 = 1.0 + pParam->BSIM4v6prt * delTemp; if(model->BSIM4v6rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v6rdw * T10; T2 = model->BSIM4v6rdwmin * T10; /* External Rs(V) */ T3 = pParam->BSIM4v6rsw * T10; T4 = model->BSIM4v6rswmin * T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v6rds0 = pParam->BSIM4v6rdsw * T10 * here->BSIM4v6nf / PowWeffWr; pParam->BSIM4v6rdswmin = model->BSIM4v6rdswmin * T10 * here->BSIM4v6nf / PowWeffWr; } if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v6rd0 = T1 / PowWeffWr; pParam->BSIM4v6rdwmin = T2 / PowWeffWr; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } if (T4 < 0.0) { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v6rs0 = T3 / PowWeffWr; pParam->BSIM4v6rswmin = T4 / PowWeffWr; if (pParam->BSIM4v6u0 > 1.0) pParam->BSIM4v6u0 = pParam->BSIM4v6u0 / 1.0e4; /* mobility channel length dependence */ T5 = 1.0 - pParam->BSIM4v6up * exp( - pParam->BSIM4v6leff / pParam->BSIM4v6lp); pParam->BSIM4v6u0temp = pParam->BSIM4v6u0 * T5 * pow(TRatio, pParam->BSIM4v6ute); if (pParam->BSIM4v6eu < 0.0) { pParam->BSIM4v6eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } if (pParam->BSIM4v6ucs < 0.0) { pParam->BSIM4v6ucs = 0.0; printf("Warning: ucs has been negative; reset to 0.0.\n"); } pParam->BSIM4v6vfbsdoff = pParam->BSIM4v6vfbsdoff * (1.0 + pParam->BSIM4v6tvfbsdoff * delTemp); pParam->BSIM4v6voff = pParam->BSIM4v6voff * (1.0 + pParam->BSIM4v6tvoff * delTemp); /* Source End Velocity Limit */ if((model->BSIM4v6vtlGiven) && (model->BSIM4v6vtl > 0.0) ) { if(model->BSIM4v6lc < 0.0) pParam->BSIM4v6lc = 0.0; else pParam->BSIM4v6lc = model->BSIM4v6lc ; T0 = pParam->BSIM4v6leff / (pParam->BSIM4v6xn * pParam->BSIM4v6leff + pParam->BSIM4v6lc); pParam->BSIM4v6tfactor = (1.0 - T0) / (1.0 + T0 ); } pParam->BSIM4v6cgdo = (model->BSIM4v6cgdo + pParam->BSIM4v6cf) * pParam->BSIM4v6weffCV; pParam->BSIM4v6cgso = (model->BSIM4v6cgso + pParam->BSIM4v6cf) * pParam->BSIM4v6weffCV; pParam->BSIM4v6cgbo = model->BSIM4v6cgbo * pParam->BSIM4v6leffCV * here->BSIM4v6nf; if (!model->BSIM4v6ndepGiven && model->BSIM4v6gamma1Given) { T0 = pParam->BSIM4v6gamma1 * model->BSIM4v6coxe; pParam->BSIM4v6ndep = 3.01248e22 * T0 * T0; } pParam->BSIM4v6phi = Vtm0 * log(pParam->BSIM4v6ndep / ni) + pParam->BSIM4v6phin + 0.4; pParam->BSIM4v6sqrtPhi = sqrt(pParam->BSIM4v6phi); pParam->BSIM4v6phis3 = pParam->BSIM4v6sqrtPhi * pParam->BSIM4v6phi; pParam->BSIM4v6Xdep0 = sqrt(2.0 * epssub / (Charge_q * pParam->BSIM4v6ndep * 1.0e6)) * pParam->BSIM4v6sqrtPhi; pParam->BSIM4v6sqrtXdep0 = sqrt(pParam->BSIM4v6Xdep0); if(model->BSIM4v6mtrlMod == 0) pParam->BSIM4v6litl = sqrt(3.0 * 3.9 / epsrox * pParam->BSIM4v6xj * toxe); else pParam->BSIM4v6litl = sqrt(model->BSIM4v6epsrsub/epsrox * pParam->BSIM4v6xj * toxe); pParam->BSIM4v6vbi = Vtm0 * log(pParam->BSIM4v6nsd * pParam->BSIM4v6ndep / (ni * ni)); if (model->BSIM4v6mtrlMod == 0) { if (pParam->BSIM4v6ngate > 0.0) { pParam->BSIM4v6vfbsd = Vtm0 * log(pParam->BSIM4v6ngate / pParam->BSIM4v6nsd); } else pParam->BSIM4v6vfbsd = 0.0; } else { T0 = Vtm0 * log(pParam->BSIM4v6nsd/ni); T1 = 0.5 * Eg0; if(T0 > T1) T0 = T1; T2 = model->BSIM4v6easub + T1 - model->BSIM4v6type * T0; pParam->BSIM4v6vfbsd = model->BSIM4v6phig - T2; } pParam->BSIM4v6cdep0 = sqrt(Charge_q * epssub * pParam->BSIM4v6ndep * 1.0e6 / 2.0 / pParam->BSIM4v6phi); pParam->BSIM4v6ToxRatio = exp(pParam->BSIM4v6ntox * log(model->BSIM4v6toxref / toxe)) / toxe / toxe; pParam->BSIM4v6ToxRatioEdge = exp(pParam->BSIM4v6ntox * log(model->BSIM4v6toxref / (toxe * pParam->BSIM4v6poxedge))) / toxe / toxe / pParam->BSIM4v6poxedge / pParam->BSIM4v6poxedge; pParam->BSIM4v6Aechvb = (model->BSIM4v6type == NMOS) ? 4.97232e-7 : 3.42537e-7; pParam->BSIM4v6Bechvb = (model->BSIM4v6type == NMOS) ? 7.45669e11 : 1.16645e12; pParam->BSIM4v6AechvbEdgeS = pParam->BSIM4v6Aechvb * pParam->BSIM4v6weff * model->BSIM4v6dlcig * pParam->BSIM4v6ToxRatioEdge; pParam->BSIM4v6AechvbEdgeD = pParam->BSIM4v6Aechvb * pParam->BSIM4v6weff * model->BSIM4v6dlcigd * pParam->BSIM4v6ToxRatioEdge; pParam->BSIM4v6BechvbEdge = -pParam->BSIM4v6Bechvb * toxe * pParam->BSIM4v6poxedge; pParam->BSIM4v6Aechvb *= pParam->BSIM4v6weff * pParam->BSIM4v6leff * pParam->BSIM4v6ToxRatio; pParam->BSIM4v6Bechvb *= -toxe; pParam->BSIM4v6mstar = 0.5 + atan(pParam->BSIM4v6minv) / PI; pParam->BSIM4v6mstarcv = 0.5 + atan(pParam->BSIM4v6minvcv) / PI; pParam->BSIM4v6voffcbn = pParam->BSIM4v6voff + model->BSIM4v6voffl / pParam->BSIM4v6leff; pParam->BSIM4v6voffcbncv = pParam->BSIM4v6voffcv + model->BSIM4v6voffcvl / pParam->BSIM4v6leff; pParam->BSIM4v6ldeb = sqrt(epssub * Vtm0 / (Charge_q * pParam->BSIM4v6ndep * 1.0e6)) / 3.0; pParam->BSIM4v6acde *= pow((pParam->BSIM4v6ndep / 2.0e16), -0.25); if (model->BSIM4v6k1Given || model->BSIM4v6k2Given) { if (!model->BSIM4v6k1Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4v6k1 = 0.53; } if (!model->BSIM4v6k2Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4v6k2 = -0.0186; } if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) { /* don't print in sensitivity */ if (model->BSIM4v6nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM4v6xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM4v6vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM4v6gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM4v6gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } } else { if (!model->BSIM4v6vbxGiven) pParam->BSIM4v6vbx = pParam->BSIM4v6phi - 7.7348e-4 * pParam->BSIM4v6ndep * pParam->BSIM4v6xt * pParam->BSIM4v6xt; if (pParam->BSIM4v6vbx > 0.0) pParam->BSIM4v6vbx = -pParam->BSIM4v6vbx; if (pParam->BSIM4v6vbm > 0.0) pParam->BSIM4v6vbm = -pParam->BSIM4v6vbm; if (!model->BSIM4v6gamma1Given) pParam->BSIM4v6gamma1 = 5.753e-12 * sqrt(pParam->BSIM4v6ndep) / model->BSIM4v6coxe; if (!model->BSIM4v6gamma2Given) pParam->BSIM4v6gamma2 = 5.753e-12 * sqrt(pParam->BSIM4v6nsub) / model->BSIM4v6coxe; T0 = pParam->BSIM4v6gamma1 - pParam->BSIM4v6gamma2; T1 = sqrt(pParam->BSIM4v6phi - pParam->BSIM4v6vbx) - pParam->BSIM4v6sqrtPhi; T2 = sqrt(pParam->BSIM4v6phi * (pParam->BSIM4v6phi - pParam->BSIM4v6vbm)) - pParam->BSIM4v6phi; pParam->BSIM4v6k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4v6vbm); pParam->BSIM4v6k1 = pParam->BSIM4v6gamma2 - 2.0 * pParam->BSIM4v6k2 * sqrt(pParam->BSIM4v6phi - pParam->BSIM4v6vbm); } if (!model->BSIM4v6vfbGiven) { if (model->BSIM4v6vth0Given) { pParam->BSIM4v6vfb = model->BSIM4v6type * pParam->BSIM4v6vth0 - pParam->BSIM4v6phi - pParam->BSIM4v6k1 * pParam->BSIM4v6sqrtPhi; } else { if ((model->BSIM4v6mtrlMod) && (model->BSIM4v6phigGiven) && (model->BSIM4v6nsubGiven)) { T0 = Vtm0 * log(pParam->BSIM4v6nsub/ni); T1 = 0.5 * Eg0; if(T0 > T1) T0 = T1; T2 = model->BSIM4v6easub + T1 + model->BSIM4v6type * T0; pParam->BSIM4v6vfb = model->BSIM4v6phig - T2; } else { pParam->BSIM4v6vfb = -1.0; } } } if (!model->BSIM4v6vth0Given) { pParam->BSIM4v6vth0 = model->BSIM4v6type * (pParam->BSIM4v6vfb + pParam->BSIM4v6phi + pParam->BSIM4v6k1 * pParam->BSIM4v6sqrtPhi); } pParam->BSIM4v6k1ox = pParam->BSIM4v6k1 * toxe / model->BSIM4v6toxm; tmp = sqrt(epssub / (epsrox * EPS0) * toxe * pParam->BSIM4v6Xdep0); T0 = pParam->BSIM4v6dsub * pParam->BSIM4v6leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; pParam->BSIM4v6theta0vb0 = T1 / T4; } else pParam->BSIM4v6theta0vb0 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v6drout * pParam->BSIM4v6leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ pParam->BSIM4v6thetaRout = pParam->BSIM4v6pdibl1 * T5 + pParam->BSIM4v6pdibl2; tmp = sqrt(pParam->BSIM4v6Xdep0); tmp1 = pParam->BSIM4v6vbi - pParam->BSIM4v6phi; tmp2 = model->BSIM4v6factor1 * tmp; T0 = pParam->BSIM4v6dvt1w * pParam->BSIM4v6weff * pParam->BSIM4v6leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T8 = T1 / T4; } else T8 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v6dvt0w * T8; T8 = T0 * tmp1; T0 = pParam->BSIM4v6dvt1 * pParam->BSIM4v6leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T9 = T1 / T4; } else T9 = 1.0 / (MAX_EXP - 2.0); T9 = pParam->BSIM4v6dvt0 * T9 * tmp1; T4 = toxe * pParam->BSIM4v6phi / (pParam->BSIM4v6weff + pParam->BSIM4v6w0); T0 = sqrt(1.0 + pParam->BSIM4v6lpe0 / pParam->BSIM4v6leff); if((model->BSIM4v6tempMod == 1) || (model->BSIM4v6tempMod == 0)) T3 = (pParam->BSIM4v6kt1 + pParam->BSIM4v6kt1l / pParam->BSIM4v6leff) * (TRatio - 1.0); if((model->BSIM4v6tempMod == 2)||(model->BSIM4v6tempMod == 3)) T3 = - pParam->BSIM4v6kt1 * (TRatio - 1.0); T5 = pParam->BSIM4v6k1ox * (T0 - 1.0) * pParam->BSIM4v6sqrtPhi + T3; pParam->BSIM4v6vfbzbfactor = - T8 - T9 + pParam->BSIM4v6k3 * T4 + T5 - pParam->BSIM4v6phi - pParam->BSIM4v6k1 * pParam->BSIM4v6sqrtPhi; /* stress effect */ wlod = model->BSIM4v6wlod; if (model->BSIM4v6wlod < 0.0) { fprintf(stderr, "Warning: WLOD = %g is less than 0. 0.0 is used\n",model->BSIM4v6wlod); wlod = 0.0; } T0 = pow(Lnew, model->BSIM4v6llodku0); W_tmp = Wnew + wlod; T1 = pow(W_tmp, model->BSIM4v6wlodku0); tmp1 = model->BSIM4v6lku0 / T0 + model->BSIM4v6wku0 / T1 + model->BSIM4v6pku0 / (T0 * T1); pParam->BSIM4v6ku0 = 1.0 + tmp1; T0 = pow(Lnew, model->BSIM4v6llodvth); T1 = pow(W_tmp, model->BSIM4v6wlodvth); tmp1 = model->BSIM4v6lkvth0 / T0 + model->BSIM4v6wkvth0 / T1 + model->BSIM4v6pkvth0 / (T0 * T1); pParam->BSIM4v6kvth0 = 1.0 + tmp1; pParam->BSIM4v6kvth0 = sqrt(pParam->BSIM4v6kvth0*pParam->BSIM4v6kvth0 + DELTA); T0 = (TRatio - 1.0); pParam->BSIM4v6ku0temp = pParam->BSIM4v6ku0 * (1.0 + model->BSIM4v6tku0 *T0) + DELTA; Inv_saref = 1.0/(model->BSIM4v6saref + 0.5*Ldrn); Inv_sbref = 1.0/(model->BSIM4v6sbref + 0.5*Ldrn); pParam->BSIM4v6inv_od_ref = Inv_saref + Inv_sbref; pParam->BSIM4v6rho_ref = model->BSIM4v6ku0 / pParam->BSIM4v6ku0temp * pParam->BSIM4v6inv_od_ref; } /* End of SizeNotFound */ /* stress effect */ if( (here->BSIM4v6sa > 0.0) && (here->BSIM4v6sb > 0.0) && ((here->BSIM4v6nf == 1.0) || ((here->BSIM4v6nf > 1.0) && (here->BSIM4v6sd > 0.0))) ) { Inv_sa = 0; Inv_sb = 0; kvsat = model->BSIM4v6kvsat; if (model->BSIM4v6kvsat < -1.0 ) { fprintf(stderr, "Warning: KVSAT = %g is too small; -1.0 is used.\n",model->BSIM4v6kvsat); kvsat = -1.0; } if (model->BSIM4v6kvsat > 1.0) { fprintf(stderr, "Warning: KVSAT = %g is too big; 1.0 is used.\n",model->BSIM4v6kvsat); kvsat = 1.0; } for(i = 0; i < here->BSIM4v6nf; i++){ T0 = 1.0 / here->BSIM4v6nf / (here->BSIM4v6sa + 0.5*Ldrn + i * (here->BSIM4v6sd +Ldrn)); T1 = 1.0 / here->BSIM4v6nf / (here->BSIM4v6sb + 0.5*Ldrn + i * (here->BSIM4v6sd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; rho = model->BSIM4v6ku0 / pParam->BSIM4v6ku0temp * Inv_ODeff; T0 = (1.0 + rho)/(1.0 + pParam->BSIM4v6rho_ref); here->BSIM4v6u0temp = pParam->BSIM4v6u0temp * T0; T1 = (1.0 + kvsat * rho)/(1.0 + kvsat * pParam->BSIM4v6rho_ref); here->BSIM4v6vsattemp = pParam->BSIM4v6vsattemp * T1; OD_offset = Inv_ODeff - pParam->BSIM4v6inv_od_ref; dvth0_lod = model->BSIM4v6kvth0 / pParam->BSIM4v6kvth0 * OD_offset; dk2_lod = model->BSIM4v6stk2 / pow(pParam->BSIM4v6kvth0, model->BSIM4v6lodk2) * OD_offset; deta0_lod = model->BSIM4v6steta0 / pow(pParam->BSIM4v6kvth0, model->BSIM4v6lodeta0) * OD_offset; here->BSIM4v6vth0 = pParam->BSIM4v6vth0 + dvth0_lod; here->BSIM4v6eta0 = pParam->BSIM4v6eta0 + deta0_lod; here->BSIM4v6k2 = pParam->BSIM4v6k2 + dk2_lod; } else { here->BSIM4v6u0temp = pParam->BSIM4v6u0temp; here->BSIM4v6vth0 = pParam->BSIM4v6vth0; here->BSIM4v6vsattemp = pParam->BSIM4v6vsattemp; here->BSIM4v6eta0 = pParam->BSIM4v6eta0; here->BSIM4v6k2 = pParam->BSIM4v6k2; } /* Well Proximity Effect */ if (model->BSIM4v6wpemod) { if( (!here->BSIM4v6scaGiven) && (!here->BSIM4v6scbGiven) && (!here->BSIM4v6sccGiven) ) { if((here->BSIM4v6scGiven) && (here->BSIM4v6sc > 0.0) ) { T1 = here->BSIM4v6sc + Wdrn; T2 = 1.0 / model->BSIM4v6scref; here->BSIM4v6sca = model->BSIM4v6scref * model->BSIM4v6scref / (here->BSIM4v6sc * T1); here->BSIM4v6scb = ( (0.1 * here->BSIM4v6sc + 0.01 * model->BSIM4v6scref) * exp(-10.0 * here->BSIM4v6sc * T2) - (0.1 * T1 + 0.01 * model->BSIM4v6scref) * exp(-10.0 * T1 * T2) ) / Wdrn; here->BSIM4v6scc = ( (0.05 * here->BSIM4v6sc + 0.0025 * model->BSIM4v6scref) * exp(-20.0 * here->BSIM4v6sc * T2) - (0.05 * T1 + 0.0025 * model->BSIM4v6scref) * exp(-20.0 * T1 * T2) ) / Wdrn; } else { fprintf(stderr, "Warning: No WPE as none of SCA, SCB, SCC, SC is given and/or SC not positive.\n"); } } if (here->BSIM4v6sca < 0.0) { printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v6sca); here->BSIM4v6sca = 0.0; } if (here->BSIM4v6scb < 0.0) { printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v6scb); here->BSIM4v6scb = 0.0; } if (here->BSIM4v6scc < 0.0) { printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v6scc); here->BSIM4v6scc = 0.0; } if (here->BSIM4v6sc < 0.0) { printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v6sc); here->BSIM4v6sc = 0.0; } /*4.6.2*/ sceff = here->BSIM4v6sca + model->BSIM4v6web * here->BSIM4v6scb + model->BSIM4v6wec * here->BSIM4v6scc; here->BSIM4v6vth0 += pParam->BSIM4v6kvth0we * sceff; here->BSIM4v6k2 += pParam->BSIM4v6k2we * sceff; T3 = 1.0 + pParam->BSIM4v6ku0we * sceff; if (T3 <= 0.0) { T3 = 0.0; fprintf(stderr, "Warning: ku0we = %g is negatively too high. Negative mobility! \n", pParam->BSIM4v6ku0we); } here->BSIM4v6u0temp *= T3; } /* adding delvto */ here->BSIM4v6vth0 += here->BSIM4v6delvto; here->BSIM4v6vfb = pParam->BSIM4v6vfb + model->BSIM4v6type * here->BSIM4v6delvto; /* Instance variables calculation */ T3 = model->BSIM4v6type * here->BSIM4v6vth0 - here->BSIM4v6vfb - pParam->BSIM4v6phi; T4 = T3 + T3; T5 = 2.5 * T3; here->BSIM4v6vtfbphi1 = (model->BSIM4v6type == NMOS) ? T4 : T5; if (here->BSIM4v6vtfbphi1 < 0.0) here->BSIM4v6vtfbphi1 = 0.0; here->BSIM4v6vtfbphi2 = 4.0 * T3; if (here->BSIM4v6vtfbphi2 < 0.0) here->BSIM4v6vtfbphi2 = 0.0; if (here->BSIM4v6k2 < 0.0) { T0 = 0.5 * pParam->BSIM4v6k1 / here->BSIM4v6k2; here->BSIM4v6vbsc = 0.9 * (pParam->BSIM4v6phi - T0 * T0); if (here->BSIM4v6vbsc > -3.0) here->BSIM4v6vbsc = -3.0; else if (here->BSIM4v6vbsc < -30.0) here->BSIM4v6vbsc = -30.0; } else here->BSIM4v6vbsc = -30.0; if (here->BSIM4v6vbsc > pParam->BSIM4v6vbm) here->BSIM4v6vbsc = pParam->BSIM4v6vbm; here->BSIM4v6k2ox = here->BSIM4v6k2 * toxe / model->BSIM4v6toxm; here->BSIM4v6vfbzb = pParam->BSIM4v6vfbzbfactor + model->BSIM4v6type * here->BSIM4v6vth0 ; here->BSIM4v6cgso = pParam->BSIM4v6cgso; here->BSIM4v6cgdo = pParam->BSIM4v6cgdo; lnl = log(pParam->BSIM4v6leff * 1.0e6); lnw = log(pParam->BSIM4v6weff * 1.0e6); lnnf = log(here->BSIM4v6nf); bodymode = 5; if( ( !model->BSIM4v6rbps0Given) || ( !model->BSIM4v6rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4v6rbsbx0Given && !model->BSIM4v6rbsby0Given) || (!model->BSIM4v6rbdbx0Given && !model->BSIM4v6rbdby0Given) ) bodymode = 3; if(here->BSIM4v6rbodyMod == 2) { if (bodymode == 5) { rbsbx = exp( log(model->BSIM4v6rbsbx0) + model->BSIM4v6rbsdbxl * lnl + model->BSIM4v6rbsdbxw * lnw + model->BSIM4v6rbsdbxnf * lnnf ); rbsby = exp( log(model->BSIM4v6rbsby0) + model->BSIM4v6rbsdbyl * lnl + model->BSIM4v6rbsdbyw * lnw + model->BSIM4v6rbsdbynf * lnnf ); here->BSIM4v6rbsb = rbsbx * rbsby / (rbsbx + rbsby); rbdbx = exp( log(model->BSIM4v6rbdbx0) + model->BSIM4v6rbsdbxl * lnl + model->BSIM4v6rbsdbxw * lnw + model->BSIM4v6rbsdbxnf * lnnf ); rbdby = exp( log(model->BSIM4v6rbdby0) + model->BSIM4v6rbsdbyl * lnl + model->BSIM4v6rbsdbyw * lnw + model->BSIM4v6rbsdbynf * lnnf ); here->BSIM4v6rbdb = rbdbx * rbdby / (rbdbx + rbdby); } if ((bodymode == 3)|| (bodymode == 5)) { here->BSIM4v6rbps = exp( log(model->BSIM4v6rbps0) + model->BSIM4v6rbpsl * lnl + model->BSIM4v6rbpsw * lnw + model->BSIM4v6rbpsnf * lnnf ); here->BSIM4v6rbpd = exp( log(model->BSIM4v6rbpd0) + model->BSIM4v6rbpdl * lnl + model->BSIM4v6rbpdw * lnw + model->BSIM4v6rbpdnf * lnnf ); } rbpbx = exp( log(model->BSIM4v6rbpbx0) + model->BSIM4v6rbpbxl * lnl + model->BSIM4v6rbpbxw * lnw + model->BSIM4v6rbpbxnf * lnnf ); rbpby = exp( log(model->BSIM4v6rbpby0) + model->BSIM4v6rbpbyl * lnl + model->BSIM4v6rbpbyw * lnw + model->BSIM4v6rbpbynf * lnnf ); here->BSIM4v6rbpb = rbpbx*rbpby/(rbpbx + rbpby); } if ((here->BSIM4v6rbodyMod == 1 ) || ((here->BSIM4v6rbodyMod == 2 ) && (bodymode == 5)) ) { if (here->BSIM4v6rbdb < 1.0e-3) here->BSIM4v6grbdb = 1.0e3; /* in mho */ else here->BSIM4v6grbdb = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbdb; if (here->BSIM4v6rbpb < 1.0e-3) here->BSIM4v6grbpb = 1.0e3; else here->BSIM4v6grbpb = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbpb; if (here->BSIM4v6rbps < 1.0e-3) here->BSIM4v6grbps = 1.0e3; else here->BSIM4v6grbps = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbps; if (here->BSIM4v6rbsb < 1.0e-3) here->BSIM4v6grbsb = 1.0e3; else here->BSIM4v6grbsb = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbsb; if (here->BSIM4v6rbpd < 1.0e-3) here->BSIM4v6grbpd = 1.0e3; else here->BSIM4v6grbpd = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbpd; } if((here->BSIM4v6rbodyMod == 2) && (bodymode == 3)) { here->BSIM4v6grbdb = here->BSIM4v6grbsb = model->BSIM4v6gbmin; if (here->BSIM4v6rbpb < 1.0e-3) here->BSIM4v6grbpb = 1.0e3; else here->BSIM4v6grbpb = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbpb; if (here->BSIM4v6rbps < 1.0e-3) here->BSIM4v6grbps = 1.0e3; else here->BSIM4v6grbps = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbps; if (here->BSIM4v6rbpd < 1.0e-3) here->BSIM4v6grbpd = 1.0e3; else here->BSIM4v6grbpd = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbpd; } if((here->BSIM4v6rbodyMod == 2) && (bodymode == 1)) { here->BSIM4v6grbdb = here->BSIM4v6grbsb = model->BSIM4v6gbmin; here->BSIM4v6grbps = here->BSIM4v6grbpd = 1.0e3; if (here->BSIM4v6rbpb < 1.0e-3) here->BSIM4v6grbpb = 1.0e3; else here->BSIM4v6grbpb = model->BSIM4v6gbmin + 1.0 / here->BSIM4v6rbpb; } /* * Process geomertry dependent parasitics */ here->BSIM4v6grgeltd = model->BSIM4v6rshg * (here->BSIM4v6xgw + pParam->BSIM4v6weffCJ / 3.0 / here->BSIM4v6ngcon) / (here->BSIM4v6ngcon * here->BSIM4v6nf * (Lnew - model->BSIM4v6xgl)); if (here->BSIM4v6grgeltd > 0.0) here->BSIM4v6grgeltd = 1.0 / here->BSIM4v6grgeltd; else { here->BSIM4v6grgeltd = 1.0e3; /* mho */ if (here->BSIM4v6rgateMod != 0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } DMCGeff = model->BSIM4v6dmcg - model->BSIM4v6dmcgt; DMCIeff = model->BSIM4v6dmci; DMDGeff = model->BSIM4v6dmdg - model->BSIM4v6dmcgt; if (here->BSIM4v6sourcePerimeterGiven) { if(here->BSIM4v6sourcePerimeter == 0.0) here->BSIM4v6Pseff = 0.0; else if (here->BSIM4v6sourcePerimeter < 0.0) { printf("Warning: Source Perimeter is specified as negative, it is set to zero.\n"); here->BSIM4v6Pseff = 0.0; } else { if (model->BSIM4v6perMod == 0) here->BSIM4v6Pseff = here->BSIM4v6sourcePerimeter; else here->BSIM4v6Pseff = here->BSIM4v6sourcePerimeter - pParam->BSIM4v6weffCJ * here->BSIM4v6nf; } } else BSIM4v6PAeffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, DMCGeff, DMCIeff, DMDGeff, &(here->BSIM4v6Pseff), &dumPd, &dumAs, &dumAd); if (here->BSIM4v6Pseff < 0.0) /*4.6.2*/ here->BSIM4v6Pseff = 0.0; if (here->BSIM4v6drainPerimeterGiven) { if(here->BSIM4v6drainPerimeter == 0.0) here->BSIM4v6Pdeff = 0.0; else if (here->BSIM4v6drainPerimeter < 0.0) { printf("Warning: Drain Perimeter is specified as negative, it is set to zero\n"); here->BSIM4v6Pdeff = 0.0; } else { if (model->BSIM4v6perMod == 0) here->BSIM4v6Pdeff = here->BSIM4v6drainPerimeter; else here->BSIM4v6Pdeff = here->BSIM4v6drainPerimeter - pParam->BSIM4v6weffCJ * here->BSIM4v6nf; } } else BSIM4v6PAeffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &(here->BSIM4v6Pdeff), &dumAs, &dumAd); if (here->BSIM4v6Pdeff < 0.0) /*4.6.2*/ here->BSIM4v6Pdeff = 0.0; if (here->BSIM4v6sourceAreaGiven) here->BSIM4v6Aseff = here->BSIM4v6sourceArea; else BSIM4v6PAeffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &(here->BSIM4v6Aseff), &dumAd); if (here->BSIM4v6drainAreaGiven) here->BSIM4v6Adeff = here->BSIM4v6drainArea; else BSIM4v6PAeffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &dumAs, &(here->BSIM4v6Adeff)); /* Processing S/D resistance and conductance below */ if(here->BSIM4v6sNodePrime != here->BSIM4v6sNode) { here->BSIM4v6sourceConductance = 0.0; if(here->BSIM4v6sourceSquaresGiven) { here->BSIM4v6sourceConductance = model->BSIM4v6sheetResistance * here->BSIM4v6sourceSquares; } else if (here->BSIM4v6rgeoMod > 0) { BSIM4v6RdseffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6rgeoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, model->BSIM4v6sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4v6sourceConductance)); } else { here->BSIM4v6sourceConductance = 0.0; } if (here->BSIM4v6sourceConductance > 0.0) here->BSIM4v6sourceConductance = 1.0 / here->BSIM4v6sourceConductance; else { here->BSIM4v6sourceConductance = 1.0e3; /* mho */ printf ("Warning: Source conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v6sourceConductance = 0.0; } if(here->BSIM4v6dNodePrime != here->BSIM4v6dNode) { here->BSIM4v6drainConductance = 0.0; if(here->BSIM4v6drainSquaresGiven) { here->BSIM4v6drainConductance = model->BSIM4v6sheetResistance * here->BSIM4v6drainSquares; } else if (here->BSIM4v6rgeoMod > 0) { BSIM4v6RdseffGeo(here->BSIM4v6nf, here->BSIM4v6geoMod, here->BSIM4v6rgeoMod, here->BSIM4v6min, pParam->BSIM4v6weffCJ, model->BSIM4v6sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4v6drainConductance)); } else { here->BSIM4v6drainConductance = 0.0; } if (here->BSIM4v6drainConductance > 0.0) here->BSIM4v6drainConductance = 1.0 / here->BSIM4v6drainConductance; else { here->BSIM4v6drainConductance = 1.0e3; /* mho */ printf ("Warning: Drain conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v6drainConductance = 0.0; } /* End of Rsd processing */ Nvtms = model->BSIM4v6vtm * model->BSIM4v6SjctEmissionCoeff; if ((here->BSIM4v6Aseff <= 0.0) && (here->BSIM4v6Pseff <= 0.0)) { SourceSatCurrent = 0.0; } else { SourceSatCurrent = here->BSIM4v6Aseff * model->BSIM4v6SjctTempSatCurDensity + here->BSIM4v6Pseff * model->BSIM4v6SjctSidewallTempSatCurDensity + pParam->BSIM4v6weffCJ * here->BSIM4v6nf * model->BSIM4v6SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent > 0.0) { switch(model->BSIM4v6dioMod) { case 0: if ((model->BSIM4v6bvs / Nvtms) > EXP_THRESHOLD) here->BSIM4v6XExpBVS = model->BSIM4v6xjbvs * MIN_EXP; else here->BSIM4v6XExpBVS = model->BSIM4v6xjbvs * exp(-model->BSIM4v6bvs / Nvtms); break; case 1: BSIM4v6DioIjthVjmEval(Nvtms, model->BSIM4v6ijthsfwd, SourceSatCurrent, 0.0, &(here->BSIM4v6vjsmFwd)); here->BSIM4v6IVjsmFwd = SourceSatCurrent * exp(here->BSIM4v6vjsmFwd / Nvtms); break; case 2: if ((model->BSIM4v6bvs / Nvtms) > EXP_THRESHOLD) { here->BSIM4v6XExpBVS = model->BSIM4v6xjbvs * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v6XExpBVS = exp(-model->BSIM4v6bvs / Nvtms); tmp = here->BSIM4v6XExpBVS; here->BSIM4v6XExpBVS *= model->BSIM4v6xjbvs; } BSIM4v6DioIjthVjmEval(Nvtms, model->BSIM4v6ijthsfwd, SourceSatCurrent, here->BSIM4v6XExpBVS, &(here->BSIM4v6vjsmFwd)); T0 = exp(here->BSIM4v6vjsmFwd / Nvtms); here->BSIM4v6IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4v6XExpBVS / T0 + here->BSIM4v6XExpBVS - 1.0); here->BSIM4v6SslpFwd = SourceSatCurrent * (T0 + here->BSIM4v6XExpBVS / T0) / Nvtms; T2 = model->BSIM4v6ijthsrev / SourceSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthsrev too small and set to 10 times IsbSat.\n"); } here->BSIM4v6vjsmRev = -model->BSIM4v6bvs - Nvtms * log((T2 - 1.0) / model->BSIM4v6xjbvs); T1 = model->BSIM4v6xjbvs * exp(-(model->BSIM4v6bvs + here->BSIM4v6vjsmRev) / Nvtms); here->BSIM4v6IVjsmRev = SourceSatCurrent * (1.0 + T1); here->BSIM4v6SslpRev = -SourceSatCurrent * T1 / Nvtms; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v6dioMod); } } Nvtmd = model->BSIM4v6vtm * model->BSIM4v6DjctEmissionCoeff; if ((here->BSIM4v6Adeff <= 0.0) && (here->BSIM4v6Pdeff <= 0.0)) { DrainSatCurrent = 0.0; } else { DrainSatCurrent = here->BSIM4v6Adeff * model->BSIM4v6DjctTempSatCurDensity + here->BSIM4v6Pdeff * model->BSIM4v6DjctSidewallTempSatCurDensity + pParam->BSIM4v6weffCJ * here->BSIM4v6nf * model->BSIM4v6DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent > 0.0) { switch(model->BSIM4v6dioMod) { case 0: if ((model->BSIM4v6bvd / Nvtmd) > EXP_THRESHOLD) here->BSIM4v6XExpBVD = model->BSIM4v6xjbvd * MIN_EXP; else here->BSIM4v6XExpBVD = model->BSIM4v6xjbvd * exp(-model->BSIM4v6bvd / Nvtmd); break; case 1: BSIM4v6DioIjthVjmEval(Nvtmd, model->BSIM4v6ijthdfwd, DrainSatCurrent, 0.0, &(here->BSIM4v6vjdmFwd)); here->BSIM4v6IVjdmFwd = DrainSatCurrent * exp(here->BSIM4v6vjdmFwd / Nvtmd); break; case 2: if ((model->BSIM4v6bvd / Nvtmd) > EXP_THRESHOLD) { here->BSIM4v6XExpBVD = model->BSIM4v6xjbvd * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v6XExpBVD = exp(-model->BSIM4v6bvd / Nvtmd); tmp = here->BSIM4v6XExpBVD; here->BSIM4v6XExpBVD *= model->BSIM4v6xjbvd; } BSIM4v6DioIjthVjmEval(Nvtmd, model->BSIM4v6ijthdfwd, DrainSatCurrent, here->BSIM4v6XExpBVD, &(here->BSIM4v6vjdmFwd)); T0 = exp(here->BSIM4v6vjdmFwd / Nvtmd); here->BSIM4v6IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4v6XExpBVD / T0 + here->BSIM4v6XExpBVD - 1.0); here->BSIM4v6DslpFwd = DrainSatCurrent * (T0 + here->BSIM4v6XExpBVD / T0) / Nvtmd; T2 = model->BSIM4v6ijthdrev / DrainSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthdrev too small and set to 10 times IdbSat.\n"); } here->BSIM4v6vjdmRev = -model->BSIM4v6bvd - Nvtmd * log((T2 - 1.0) / model->BSIM4v6xjbvd); /* bugfix */ T1 = model->BSIM4v6xjbvd * exp(-(model->BSIM4v6bvd + here->BSIM4v6vjdmRev) / Nvtmd); here->BSIM4v6IVjdmRev = DrainSatCurrent * (1.0 + T1); here->BSIM4v6DslpRev = -DrainSatCurrent * T1 / Nvtmd; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v6dioMod); } } /* GEDL current reverse bias */ T0 = (TRatio - 1.0); model->BSIM4v6njtsstemp = model->BSIM4v6njts * (1.0 + model->BSIM4v6tnjts * T0); model->BSIM4v6njtsswstemp = model->BSIM4v6njtssw * (1.0 + model->BSIM4v6tnjtssw * T0); model->BSIM4v6njtsswgstemp = model->BSIM4v6njtsswg * (1.0 + model->BSIM4v6tnjtsswg * T0); model->BSIM4v6njtsdtemp = model->BSIM4v6njtsd * (1.0 + model->BSIM4v6tnjtsd * T0); model->BSIM4v6njtsswdtemp = model->BSIM4v6njtsswd * (1.0 + model->BSIM4v6tnjtsswd * T0); model->BSIM4v6njtsswgdtemp = model->BSIM4v6njtsswgd * (1.0 + model->BSIM4v6tnjtsswgd * T0); T7 = Eg0 / model->BSIM4v6vtm * T0; T9 = model->BSIM4v6xtss * T7; DEXP(T9, T1); T9 = model->BSIM4v6xtsd * T7; DEXP(T9, T2); T9 = model->BSIM4v6xtssws * T7; DEXP(T9, T3); T9 = model->BSIM4v6xtsswd * T7; DEXP(T9, T4); T9 = model->BSIM4v6xtsswgs * T7; DEXP(T9, T5); T9 = model->BSIM4v6xtsswgd * T7; DEXP(T9, T6); /*IBM TAT*/ if(model->BSIM4v6jtweff < 0.0) { model->BSIM4v6jtweff = 0.0; fprintf(stderr, "TAT width dependence effect is negative. Jtweff is clamped to zero.\n"); } T11 = sqrt(model->BSIM4v6jtweff / pParam->BSIM4v6weffCJ) + 1.0; T10 = pParam->BSIM4v6weffCJ * here->BSIM4v6nf; here->BSIM4v6SjctTempRevSatCur = T1 * here->BSIM4v6Aseff * model->BSIM4v6jtss; here->BSIM4v6DjctTempRevSatCur = T2 * here->BSIM4v6Adeff * model->BSIM4v6jtsd; here->BSIM4v6SswTempRevSatCur = T3 * here->BSIM4v6Pseff * model->BSIM4v6jtssws; here->BSIM4v6DswTempRevSatCur = T4 * here->BSIM4v6Pdeff * model->BSIM4v6jtsswd; here->BSIM4v6SswgTempRevSatCur = T5 * T10 * T11 * model->BSIM4v6jtsswgs; here->BSIM4v6DswgTempRevSatCur = T6 * T10 * T11 * model->BSIM4v6jtsswgd; /*high k*/ /*Calculate VgsteffVth for mobMod=3*/ if(model->BSIM4v6mobMod==3) { /*Calculate n @ Vbs=Vds=0*/ V0 = pParam->BSIM4v6vbi - pParam->BSIM4v6phi; lt1 = model->BSIM4v6factor1* pParam->BSIM4v6sqrtXdep0; ltw = lt1; T0 = pParam->BSIM4v6dvt1 * pParam->BSIM4v6leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; } else Theta0 = 1.0 / (MAX_EXP - 2.0); tmp1 = epssub / pParam->BSIM4v6Xdep0; here->BSIM4v6nstar = model->BSIM4v6vtm / Charge_q * (model->BSIM4v6coxe + tmp1 + pParam->BSIM4v6cit); tmp2 = pParam->BSIM4v6nfactor * tmp1; tmp3 = (tmp2 + pParam->BSIM4v6cdsc * Theta0 + pParam->BSIM4v6cit) / model->BSIM4v6coxe; if (tmp3 >= -0.5) n0 = 1.0 + tmp3; else { T0 = 1.0 / (3.0 + 8.0 * tmp3); n0 = (1.0 + 3.0 * tmp3) * T0; } T0 = n0 * model->BSIM4v6vtm; T1 = pParam->BSIM4v6voffcbn; T2 = T1/T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MIN_EXP / pParam->BSIM4v6cdep0; T4 = pParam->BSIM4v6mstar + T3 * n0; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MAX_EXP / pParam->BSIM4v6cdep0; T4 = pParam->BSIM4v6mstar + T3 * n0; } else { T3 = exp(T2)* model->BSIM4v6coxe / pParam->BSIM4v6cdep0; T4 = pParam->BSIM4v6mstar + T3 * n0; } pParam->BSIM4v6VgsteffVth = T0 * log(2.0)/T4; } if(model->BSIM4v6mtrlMod) { /* Calculate TOXP from EOT */ /* Calculate Vgs_eff @ Vgs = VDD with Poly Depletion Effect */ Vtm0eot = KboQ * model->BSIM4v6tempeot; Vtmeot = Vtm0eot; vbieot = Vtm0eot * log(pParam->BSIM4v6nsd * pParam->BSIM4v6ndep / (ni * ni)); phieot = Vtm0eot * log(pParam->BSIM4v6ndep / ni) + pParam->BSIM4v6phin + 0.4; tmp2 = here->BSIM4v6vfb + phieot; vddeot = model->BSIM4v6type * model->BSIM4v6vddeot; T0 = model->BSIM4v6epsrgate * EPS0; if ((pParam->BSIM4v6ngate > 1.0e18) && (pParam->BSIM4v6ngate < 1.0e25) && (vddeot > tmp2) && (T0!=0)) { T1 = 1.0e6 * CHARGE * T0 * pParam->BSIM4v6ngate / (model->BSIM4v6coxe * model->BSIM4v6coxe); T8 = vddeot - tmp2; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = vddeot - T5; } else Vgs_eff = vddeot; /* Calculate Vth @ Vds=Vbs=0 */ V0 = vbieot - phieot; lt1 = model->BSIM4v6factor1* pParam->BSIM4v6sqrtXdep0; ltw = lt1; T0 = pParam->BSIM4v6dvt1 * model->BSIM4v6leffeot / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; } else Theta0 = 1.0 / (MAX_EXP - 2.0); Delt_vth = pParam->BSIM4v6dvt0 * Theta0 * V0; T0 = pParam->BSIM4v6dvt1w * model->BSIM4v6weffeot * model->BSIM4v6leffeot / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ T2 = pParam->BSIM4v6dvt0w * T5 * V0; TempRatioeot = model->BSIM4v6tempeot / model->BSIM4v6tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4v6lpe0 / model->BSIM4v6leffeot); T1 = pParam->BSIM4v6k1ox * (T0 - 1.0) * sqrt(phieot) + (pParam->BSIM4v6kt1 + pParam->BSIM4v6kt1l / model->BSIM4v6leffeot) * TempRatioeot; Vth_NarrowW = toxe * phieot / (model->BSIM4v6weffeot + pParam->BSIM4v6w0); Lpe_Vb = sqrt(1.0 + pParam->BSIM4v6lpeb / model->BSIM4v6leffeot); Vth = model->BSIM4v6type * here->BSIM4v6vth0 + (pParam->BSIM4v6k1ox - pParam->BSIM4v6k1)*sqrt(phieot)*Lpe_Vb - Delt_vth - T2 + pParam->BSIM4v6k3 * Vth_NarrowW + T1; /* Calculate n */ tmp1 = epssub / pParam->BSIM4v6Xdep0; here->BSIM4v6nstar = Vtmeot / Charge_q * (model->BSIM4v6coxe + tmp1 + pParam->BSIM4v6cit); tmp2 = pParam->BSIM4v6nfactor * tmp1; tmp3 = (tmp2 + pParam->BSIM4v6cdsc * Theta0 + pParam->BSIM4v6cit) / model->BSIM4v6coxe; if (tmp3 >= -0.5) n = 1.0 + tmp3; else { T0 = 1.0 / (3.0 + 8.0 * tmp3); n = (1.0 + 3.0 * tmp3) * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4v6dvtp0 > 0.0) { T3 = model->BSIM4v6leffeot + pParam->BSIM4v6dvtp0 * 2.0; if (model->BSIM4v6tempMod < 2) T4 = Vtmeot * log(model->BSIM4v6leffeot / T3); else T4 = Vtm0eot * log(model->BSIM4v6leffeot / T3); Vth -= n * T4; } Vgsteff = Vgs_eff-Vth; /* calculating Toxp */ T3 = model->BSIM4v6type * here->BSIM4v6vth0 - here->BSIM4v6vfb - phieot; T4 = T3 + T3; T5 = 2.5 * T3; vtfbphi2eot = 4.0 * T3; if (vtfbphi2eot < 0.0) vtfbphi2eot = 0.0; niter = 0; toxpf = toxe; do { toxpi = toxpf; tmp2 = 2.0e8 * toxpf; T0 = (Vgsteff + vtfbphi2eot) / tmp2; T1 = 1.0 + exp(model->BSIM4v6bdos * 0.7 * log(T0)); Tcen = model->BSIM4v6ados * 1.9e-9 / T1; toxpf = toxe - epsrox/model->BSIM4v6epsrsub * Tcen; niter++; } while ((niter<=4)&&(ABS(toxpf-toxpi)>1e-12)); model->BSIM4v6toxp = toxpf; model->BSIM4v6coxp = epsrox * EPS0 / model->BSIM4v6toxp; } if (BSIM4v6checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM4v6modName; namarray[1] = here->BSIM4v6name; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM4.6.4 parameter checking for %s in model %s", namarray); return(E_BADPARM); } } /* End instance */ } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/bsim4v6def.h0000644000265600020320000034345412264261473021665 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /**** OpenMP support for ngspice by Holger Vogt 06/28/2010 ****/ /********** Copyright 2006 Regents of the University of California. All rights reserved. File: bsim4v6def.h Author: 2000 Weidong Liu. Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu Modified by Xuemei Xi, 11/15/2002. Modified by Xuemei Xi, 05/09/2003. Modified by Xuemei Xi, 03/04/2004. Modified by Xuemei Xi, Mohan Dunga, 09/24/2004. Modified by Xuemei Xi, 07/29/2005. Modified by Mohan Dunga, 12/13/2006 Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. Modified by Wenwei Yang, 07/31/2008. **********/ #ifndef BSIM4v6 #define BSIM4v6 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM4v6instance { struct sBSIM4v6model *BSIM4v6modPtr; struct sBSIM4v6instance *BSIM4v6nextInstance; IFuid BSIM4v6name; int BSIM4v6states; /* index into state table for this device */ int BSIM4v6dNode; int BSIM4v6gNodeExt; int BSIM4v6sNode; int BSIM4v6bNode; int BSIM4v6dNodePrime; int BSIM4v6gNodePrime; int BSIM4v6gNodeMid; int BSIM4v6sNodePrime; int BSIM4v6bNodePrime; int BSIM4v6dbNode; int BSIM4v6sbNode; int BSIM4v6qNode; double BSIM4v6ueff; double BSIM4v6thetavth; double BSIM4v6von; double BSIM4v6vdsat; double BSIM4v6cgdo; double BSIM4v6qgdo; double BSIM4v6cgso; double BSIM4v6qgso; double BSIM4v6grbsb; double BSIM4v6grbdb; double BSIM4v6grbpb; double BSIM4v6grbps; double BSIM4v6grbpd; double BSIM4v6vjsmFwd; double BSIM4v6vjsmRev; double BSIM4v6vjdmFwd; double BSIM4v6vjdmRev; double BSIM4v6XExpBVS; double BSIM4v6XExpBVD; double BSIM4v6SslpFwd; double BSIM4v6SslpRev; double BSIM4v6DslpFwd; double BSIM4v6DslpRev; double BSIM4v6IVjsmFwd; double BSIM4v6IVjsmRev; double BSIM4v6IVjdmFwd; double BSIM4v6IVjdmRev; double BSIM4v6grgeltd; double BSIM4v6Pseff; double BSIM4v6Pdeff; double BSIM4v6Aseff; double BSIM4v6Adeff; double BSIM4v6l; double BSIM4v6w; double BSIM4v6drainArea; double BSIM4v6sourceArea; double BSIM4v6drainSquares; double BSIM4v6sourceSquares; double BSIM4v6drainPerimeter; double BSIM4v6sourcePerimeter; double BSIM4v6sourceConductance; double BSIM4v6drainConductance; /* stress effect instance param */ double BSIM4v6sa; double BSIM4v6sb; double BSIM4v6sd; double BSIM4v6sca; double BSIM4v6scb; double BSIM4v6scc; double BSIM4v6sc; double BSIM4v6rbdb; double BSIM4v6rbsb; double BSIM4v6rbpb; double BSIM4v6rbps; double BSIM4v6rbpd; double BSIM4v6delvto; double BSIM4v6xgw; double BSIM4v6ngcon; /* added here to account stress effect instance dependence */ double BSIM4v6u0temp; double BSIM4v6vsattemp; double BSIM4v6vth0; double BSIM4v6vfb; double BSIM4v6vfbzb; double BSIM4v6vtfbphi1; double BSIM4v6vtfbphi2; double BSIM4v6k2; double BSIM4v6vbsc; double BSIM4v6k2ox; double BSIM4v6eta0; double BSIM4v6icVDS; double BSIM4v6icVGS; double BSIM4v6icVBS; double BSIM4v6m; double BSIM4v6nf; int BSIM4v6off; int BSIM4v6mode; int BSIM4v6trnqsMod; int BSIM4v6acnqsMod; int BSIM4v6rbodyMod; int BSIM4v6rgateMod; int BSIM4v6geoMod; int BSIM4v6rgeoMod; int BSIM4v6min; /* OP point */ double BSIM4v6Vgsteff; double BSIM4v6vgs_eff; double BSIM4v6vgd_eff; double BSIM4v6dvgs_eff_dvg; double BSIM4v6dvgd_eff_dvg; double BSIM4v6Vdseff; double BSIM4v6nstar; double BSIM4v6Abulk; double BSIM4v6EsatL; double BSIM4v6AbovVgst2Vtm; double BSIM4v6qinv; double BSIM4v6cd; double BSIM4v6cbs; double BSIM4v6cbd; double BSIM4v6csub; double BSIM4v6Igidl; double BSIM4v6Igisl; double BSIM4v6gm; double BSIM4v6gds; double BSIM4v6gmbs; double BSIM4v6gbd; double BSIM4v6gbs; double BSIM4v6gbbs; double BSIM4v6gbgs; double BSIM4v6gbds; double BSIM4v6ggidld; double BSIM4v6ggidlg; double BSIM4v6ggidls; double BSIM4v6ggidlb; double BSIM4v6ggisld; double BSIM4v6ggislg; double BSIM4v6ggisls; double BSIM4v6ggislb; double BSIM4v6Igcs; double BSIM4v6gIgcsg; double BSIM4v6gIgcsd; double BSIM4v6gIgcss; double BSIM4v6gIgcsb; double BSIM4v6Igcd; double BSIM4v6gIgcdg; double BSIM4v6gIgcdd; double BSIM4v6gIgcds; double BSIM4v6gIgcdb; double BSIM4v6Igs; double BSIM4v6gIgsg; double BSIM4v6gIgss; double BSIM4v6Igd; double BSIM4v6gIgdg; double BSIM4v6gIgdd; double BSIM4v6Igb; double BSIM4v6gIgbg; double BSIM4v6gIgbd; double BSIM4v6gIgbs; double BSIM4v6gIgbb; double BSIM4v6grdsw; double BSIM4v6IdovVds; double BSIM4v6gcrg; double BSIM4v6gcrgd; double BSIM4v6gcrgg; double BSIM4v6gcrgs; double BSIM4v6gcrgb; double BSIM4v6gstot; double BSIM4v6gstotd; double BSIM4v6gstotg; double BSIM4v6gstots; double BSIM4v6gstotb; double BSIM4v6gdtot; double BSIM4v6gdtotd; double BSIM4v6gdtotg; double BSIM4v6gdtots; double BSIM4v6gdtotb; double BSIM4v6cggb; double BSIM4v6cgdb; double BSIM4v6cgsb; double BSIM4v6cbgb; double BSIM4v6cbdb; double BSIM4v6cbsb; double BSIM4v6cdgb; double BSIM4v6cddb; double BSIM4v6cdsb; double BSIM4v6csgb; double BSIM4v6csdb; double BSIM4v6cssb; double BSIM4v6cgbb; double BSIM4v6cdbb; double BSIM4v6csbb; double BSIM4v6cbbb; double BSIM4v6capbd; double BSIM4v6capbs; double BSIM4v6cqgb; double BSIM4v6cqdb; double BSIM4v6cqsb; double BSIM4v6cqbb; double BSIM4v6qgate; double BSIM4v6qbulk; double BSIM4v6qdrn; double BSIM4v6qsrc; double BSIM4v6qdef; double BSIM4v6qchqs; double BSIM4v6taunet; double BSIM4v6gtau; double BSIM4v6gtg; double BSIM4v6gtd; double BSIM4v6gts; double BSIM4v6gtb; double BSIM4v6SjctTempRevSatCur; double BSIM4v6DjctTempRevSatCur; double BSIM4v6SswTempRevSatCur; double BSIM4v6DswTempRevSatCur; double BSIM4v6SswgTempRevSatCur; double BSIM4v6DswgTempRevSatCur; struct bsim4v6SizeDependParam *pParam; unsigned BSIM4v6lGiven :1; unsigned BSIM4v6wGiven :1; unsigned BSIM4v6mGiven :1; unsigned BSIM4v6nfGiven :1; unsigned BSIM4v6minGiven :1; unsigned BSIM4v6drainAreaGiven :1; unsigned BSIM4v6sourceAreaGiven :1; unsigned BSIM4v6drainSquaresGiven :1; unsigned BSIM4v6sourceSquaresGiven :1; unsigned BSIM4v6drainPerimeterGiven :1; unsigned BSIM4v6sourcePerimeterGiven :1; unsigned BSIM4v6saGiven :1; unsigned BSIM4v6sbGiven :1; unsigned BSIM4v6sdGiven :1; unsigned BSIM4v6scaGiven :1; unsigned BSIM4v6scbGiven :1; unsigned BSIM4v6sccGiven :1; unsigned BSIM4v6scGiven :1; unsigned BSIM4v6rbdbGiven :1; unsigned BSIM4v6rbsbGiven :1; unsigned BSIM4v6rbpbGiven :1; unsigned BSIM4v6rbpdGiven :1; unsigned BSIM4v6rbpsGiven :1; unsigned BSIM4v6delvtoGiven :1; unsigned BSIM4v6xgwGiven :1; unsigned BSIM4v6ngconGiven :1; unsigned BSIM4v6icVDSGiven :1; unsigned BSIM4v6icVGSGiven :1; unsigned BSIM4v6icVBSGiven :1; unsigned BSIM4v6trnqsModGiven :1; unsigned BSIM4v6acnqsModGiven :1; unsigned BSIM4v6rbodyModGiven :1; unsigned BSIM4v6rgateModGiven :1; unsigned BSIM4v6geoModGiven :1; unsigned BSIM4v6rgeoModGiven :1; double *BSIM4v6DPdPtr; double *BSIM4v6DPdpPtr; double *BSIM4v6DPgpPtr; double *BSIM4v6DPgmPtr; double *BSIM4v6DPspPtr; double *BSIM4v6DPbpPtr; double *BSIM4v6DPdbPtr; double *BSIM4v6DdPtr; double *BSIM4v6DdpPtr; double *BSIM4v6GPdpPtr; double *BSIM4v6GPgpPtr; double *BSIM4v6GPgmPtr; double *BSIM4v6GPgePtr; double *BSIM4v6GPspPtr; double *BSIM4v6GPbpPtr; double *BSIM4v6GMdpPtr; double *BSIM4v6GMgpPtr; double *BSIM4v6GMgmPtr; double *BSIM4v6GMgePtr; double *BSIM4v6GMspPtr; double *BSIM4v6GMbpPtr; double *BSIM4v6GEdpPtr; double *BSIM4v6GEgpPtr; double *BSIM4v6GEgmPtr; double *BSIM4v6GEgePtr; double *BSIM4v6GEspPtr; double *BSIM4v6GEbpPtr; double *BSIM4v6SPdpPtr; double *BSIM4v6SPgpPtr; double *BSIM4v6SPgmPtr; double *BSIM4v6SPsPtr; double *BSIM4v6SPspPtr; double *BSIM4v6SPbpPtr; double *BSIM4v6SPsbPtr; double *BSIM4v6SspPtr; double *BSIM4v6SsPtr; double *BSIM4v6BPdpPtr; double *BSIM4v6BPgpPtr; double *BSIM4v6BPgmPtr; double *BSIM4v6BPspPtr; double *BSIM4v6BPdbPtr; double *BSIM4v6BPbPtr; double *BSIM4v6BPsbPtr; double *BSIM4v6BPbpPtr; double *BSIM4v6DBdpPtr; double *BSIM4v6DBdbPtr; double *BSIM4v6DBbpPtr; double *BSIM4v6DBbPtr; double *BSIM4v6SBspPtr; double *BSIM4v6SBbpPtr; double *BSIM4v6SBbPtr; double *BSIM4v6SBsbPtr; double *BSIM4v6BdbPtr; double *BSIM4v6BbpPtr; double *BSIM4v6BsbPtr; double *BSIM4v6BbPtr; double *BSIM4v6DgpPtr; double *BSIM4v6DspPtr; double *BSIM4v6DbpPtr; double *BSIM4v6SdpPtr; double *BSIM4v6SgpPtr; double *BSIM4v6SbpPtr; double *BSIM4v6QdpPtr; double *BSIM4v6QgpPtr; double *BSIM4v6QspPtr; double *BSIM4v6QbpPtr; double *BSIM4v6QqPtr; double *BSIM4v6DPqPtr; double *BSIM4v6GPqPtr; double *BSIM4v6SPqPtr; #ifdef USE_OMP /* per instance storage of results, to update matrix at a later stge */ double BSIM4v6rhsdPrime; double BSIM4v6rhsgPrime; double BSIM4v6rhsgExt; double BSIM4v6grhsMid; double BSIM4v6rhsbPrime; double BSIM4v6rhssPrime; double BSIM4v6rhsdb; double BSIM4v6rhssb; double BSIM4v6rhsd; double BSIM4v6rhss; double BSIM4v6rhsq; double BSIM4v6_1; double BSIM4v6_2; double BSIM4v6_3; double BSIM4v6_4; double BSIM4v6_5; double BSIM4v6_6; double BSIM4v6_7; double BSIM4v6_8; double BSIM4v6_9; double BSIM4v6_10; double BSIM4v6_11; double BSIM4v6_12; double BSIM4v6_13; double BSIM4v6_14; double BSIM4v6_15; double BSIM4v6_16; double BSIM4v6_17; double BSIM4v6_18; double BSIM4v6_19; double BSIM4v6_20; double BSIM4v6_21; double BSIM4v6_22; double BSIM4v6_23; double BSIM4v6_24; double BSIM4v6_25; double BSIM4v6_26; double BSIM4v6_27; double BSIM4v6_28; double BSIM4v6_29; double BSIM4v6_30; double BSIM4v6_31; double BSIM4v6_32; double BSIM4v6_33; double BSIM4v6_34; double BSIM4v6_35; double BSIM4v6_36; double BSIM4v6_37; double BSIM4v6_38; double BSIM4v6_39; double BSIM4v6_40; double BSIM4v6_41; double BSIM4v6_42; double BSIM4v6_43; double BSIM4v6_44; double BSIM4v6_45; double BSIM4v6_46; double BSIM4v6_47; double BSIM4v6_48; double BSIM4v6_49; double BSIM4v6_50; double BSIM4v6_51; double BSIM4v6_52; double BSIM4v6_53; double BSIM4v6_54; double BSIM4v6_55; double BSIM4v6_56; double BSIM4v6_57; double BSIM4v6_58; double BSIM4v6_59; double BSIM4v6_60; double BSIM4v6_61; double BSIM4v6_62; double BSIM4v6_63; double BSIM4v6_64; double BSIM4v6_65; double BSIM4v6_66; double BSIM4v6_67; double BSIM4v6_68; double BSIM4v6_69; double BSIM4v6_70; double BSIM4v6_71; double BSIM4v6_72; double BSIM4v6_73; double BSIM4v6_74; double BSIM4v6_75; double BSIM4v6_76; double BSIM4v6_77; double BSIM4v6_78; double BSIM4v6_79; double BSIM4v6_80; double BSIM4v6_81; double BSIM4v6_82; double BSIM4v6_83; double BSIM4v6_84; double BSIM4v6_85; double BSIM4v6_86; double BSIM4v6_87; double BSIM4v6_88; double BSIM4v6_89; double BSIM4v6_90; double BSIM4v6_91; double BSIM4v6_92; double BSIM4v6_93; double BSIM4v6_94; double BSIM4v6_95; double BSIM4v6_96; double BSIM4v6_97; double BSIM4v6_98; double BSIM4v6_99; double BSIM4v6_100; double BSIM4v6_101; double BSIM4v6_102; double BSIM4v6_103; #endif #define BSIM4v6vbd BSIM4v6states+ 0 #define BSIM4v6vbs BSIM4v6states+ 1 #define BSIM4v6vgs BSIM4v6states+ 2 #define BSIM4v6vds BSIM4v6states+ 3 #define BSIM4v6vdbs BSIM4v6states+ 4 #define BSIM4v6vdbd BSIM4v6states+ 5 #define BSIM4v6vsbs BSIM4v6states+ 6 #define BSIM4v6vges BSIM4v6states+ 7 #define BSIM4v6vgms BSIM4v6states+ 8 #define BSIM4v6vses BSIM4v6states+ 9 #define BSIM4v6vdes BSIM4v6states+ 10 #define BSIM4v6qb BSIM4v6states+ 11 #define BSIM4v6cqb BSIM4v6states+ 12 #define BSIM4v6qg BSIM4v6states+ 13 #define BSIM4v6cqg BSIM4v6states+ 14 #define BSIM4v6qd BSIM4v6states+ 15 #define BSIM4v6cqd BSIM4v6states+ 16 #define BSIM4v6qgmid BSIM4v6states+ 17 #define BSIM4v6cqgmid BSIM4v6states+ 18 #define BSIM4v6qbs BSIM4v6states+ 19 #define BSIM4v6cqbs BSIM4v6states+ 20 #define BSIM4v6qbd BSIM4v6states+ 21 #define BSIM4v6cqbd BSIM4v6states+ 22 #define BSIM4v6qcheq BSIM4v6states+ 23 #define BSIM4v6cqcheq BSIM4v6states+ 24 #define BSIM4v6qcdump BSIM4v6states+ 25 #define BSIM4v6cqcdump BSIM4v6states+ 26 #define BSIM4v6qdef BSIM4v6states+ 27 #define BSIM4v6qs BSIM4v6states+ 28 #define BSIM4v6numStates 29 /* indices to the array of BSIM4v6 NOISE SOURCES */ #define BSIM4v6RDNOIZ 0 #define BSIM4v6RSNOIZ 1 #define BSIM4v6RGNOIZ 2 #define BSIM4v6RBPSNOIZ 3 #define BSIM4v6RBPDNOIZ 4 #define BSIM4v6RBPBNOIZ 5 #define BSIM4v6RBSBNOIZ 6 #define BSIM4v6RBDBNOIZ 7 #define BSIM4v6IDNOIZ 8 #define BSIM4v6FLNOIZ 9 #define BSIM4v6IGSNOIZ 10 #define BSIM4v6IGDNOIZ 11 #define BSIM4v6IGBNOIZ 12 #define BSIM4v6TOTNOIZ 13 #define BSIM4v6NSRCS 14 /* Number of BSIM4v6 noise sources */ #ifndef NONOISE double BSIM4v6nVar[NSTATVARS][BSIM4v6NSRCS]; #else /* NONOISE */ double **BSIM4v6nVar; #endif /* NONOISE */ } BSIM4v6instance ; struct bsim4v6SizeDependParam { double Width; double Length; double NFinger; double BSIM4v6cdsc; double BSIM4v6cdscb; double BSIM4v6cdscd; double BSIM4v6cit; double BSIM4v6nfactor; double BSIM4v6xj; double BSIM4v6vsat; double BSIM4v6at; double BSIM4v6a0; double BSIM4v6ags; double BSIM4v6a1; double BSIM4v6a2; double BSIM4v6keta; double BSIM4v6nsub; double BSIM4v6ndep; double BSIM4v6nsd; double BSIM4v6phin; double BSIM4v6ngate; double BSIM4v6gamma1; double BSIM4v6gamma2; double BSIM4v6vbx; double BSIM4v6vbi; double BSIM4v6vbm; double BSIM4v6xt; double BSIM4v6phi; double BSIM4v6litl; double BSIM4v6k1; double BSIM4v6kt1; double BSIM4v6kt1l; double BSIM4v6kt2; double BSIM4v6k2; double BSIM4v6k3; double BSIM4v6k3b; double BSIM4v6w0; double BSIM4v6dvtp0; double BSIM4v6dvtp1; double BSIM4v6lpe0; double BSIM4v6lpeb; double BSIM4v6dvt0; double BSIM4v6dvt1; double BSIM4v6dvt2; double BSIM4v6dvt0w; double BSIM4v6dvt1w; double BSIM4v6dvt2w; double BSIM4v6drout; double BSIM4v6dsub; double BSIM4v6vth0; double BSIM4v6ua; double BSIM4v6ua1; double BSIM4v6ub; double BSIM4v6ub1; double BSIM4v6uc; double BSIM4v6uc1; double BSIM4v6ud; double BSIM4v6ud1; double BSIM4v6up; double BSIM4v6lp; double BSIM4v6u0; double BSIM4v6eu; double BSIM4v6ucs; double BSIM4v6ute; double BSIM4v6ucste; double BSIM4v6voff; double BSIM4v6tvoff; double BSIM4v6minv; double BSIM4v6minvcv; double BSIM4v6vfb; double BSIM4v6delta; double BSIM4v6rdsw; double BSIM4v6rds0; double BSIM4v6rs0; double BSIM4v6rd0; double BSIM4v6rsw; double BSIM4v6rdw; double BSIM4v6prwg; double BSIM4v6prwb; double BSIM4v6prt; double BSIM4v6eta0; double BSIM4v6etab; double BSIM4v6pclm; double BSIM4v6pdibl1; double BSIM4v6pdibl2; double BSIM4v6pdiblb; double BSIM4v6fprout; double BSIM4v6pdits; double BSIM4v6pditsd; double BSIM4v6pscbe1; double BSIM4v6pscbe2; double BSIM4v6pvag; double BSIM4v6wr; double BSIM4v6dwg; double BSIM4v6dwb; double BSIM4v6b0; double BSIM4v6b1; double BSIM4v6alpha0; double BSIM4v6alpha1; double BSIM4v6beta0; double BSIM4v6agidl; double BSIM4v6bgidl; double BSIM4v6cgidl; double BSIM4v6egidl; double BSIM4v6agisl; double BSIM4v6bgisl; double BSIM4v6cgisl; double BSIM4v6egisl; double BSIM4v6aigc; double BSIM4v6bigc; double BSIM4v6cigc; double BSIM4v6aigs; double BSIM4v6bigs; double BSIM4v6cigs; double BSIM4v6aigd; double BSIM4v6bigd; double BSIM4v6cigd; double BSIM4v6aigbacc; double BSIM4v6bigbacc; double BSIM4v6cigbacc; double BSIM4v6aigbinv; double BSIM4v6bigbinv; double BSIM4v6cigbinv; double BSIM4v6nigc; double BSIM4v6nigbacc; double BSIM4v6nigbinv; double BSIM4v6ntox; double BSIM4v6eigbinv; double BSIM4v6pigcd; double BSIM4v6poxedge; double BSIM4v6xrcrg1; double BSIM4v6xrcrg2; double BSIM4v6lambda; /* overshoot */ double BSIM4v6vtl; /* thermal velocity limit */ double BSIM4v6xn; /* back scattering parameter */ double BSIM4v6lc; /* back scattering parameter */ double BSIM4v6tfactor; /* ballistic transportation factor */ double BSIM4v6vfbsdoff; /* S/D flatband offset voltage */ double BSIM4v6tvfbsdoff; /* added for stress effect */ double BSIM4v6ku0; double BSIM4v6kvth0; double BSIM4v6ku0temp; double BSIM4v6rho_ref; double BSIM4v6inv_od_ref; /* added for well proximity effect */ double BSIM4v6kvth0we; double BSIM4v6k2we; double BSIM4v6ku0we; /* CV model */ double BSIM4v6cgsl; double BSIM4v6cgdl; double BSIM4v6ckappas; double BSIM4v6ckappad; double BSIM4v6cf; double BSIM4v6clc; double BSIM4v6cle; double BSIM4v6vfbcv; double BSIM4v6noff; double BSIM4v6voffcv; double BSIM4v6acde; double BSIM4v6moin; /* Pre-calculated constants */ double BSIM4v6dw; double BSIM4v6dl; double BSIM4v6leff; double BSIM4v6weff; double BSIM4v6dwc; double BSIM4v6dlc; double BSIM4v6dwj; double BSIM4v6leffCV; double BSIM4v6weffCV; double BSIM4v6weffCJ; double BSIM4v6abulkCVfactor; double BSIM4v6cgso; double BSIM4v6cgdo; double BSIM4v6cgbo; double BSIM4v6u0temp; double BSIM4v6vsattemp; double BSIM4v6sqrtPhi; double BSIM4v6phis3; double BSIM4v6Xdep0; double BSIM4v6sqrtXdep0; double BSIM4v6theta0vb0; double BSIM4v6thetaRout; double BSIM4v6mstar; double BSIM4v6VgsteffVth; double BSIM4v6mstarcv; double BSIM4v6voffcbn; double BSIM4v6voffcbncv; double BSIM4v6rdswmin; double BSIM4v6rdwmin; double BSIM4v6rswmin; double BSIM4v6vfbsd; double BSIM4v6cof1; double BSIM4v6cof2; double BSIM4v6cof3; double BSIM4v6cof4; double BSIM4v6cdep0; double BSIM4v6ToxRatio; double BSIM4v6Aechvb; double BSIM4v6Bechvb; double BSIM4v6ToxRatioEdge; double BSIM4v6AechvbEdgeS; double BSIM4v6AechvbEdgeD; double BSIM4v6BechvbEdge; double BSIM4v6ldeb; double BSIM4v6k1ox; double BSIM4v6k2ox; double BSIM4v6vfbzbfactor; struct bsim4v6SizeDependParam *pNext; }; typedef struct sBSIM4v6model { int BSIM4v6modType; struct sBSIM4v6model *BSIM4v6nextModel; BSIM4v6instance *BSIM4v6instances; IFuid BSIM4v6modName; int BSIM4v6type; int BSIM4v6mobMod; int BSIM4v6cvchargeMod; int BSIM4v6capMod; int BSIM4v6dioMod; int BSIM4v6trnqsMod; int BSIM4v6acnqsMod; int BSIM4v6fnoiMod; int BSIM4v6tnoiMod; int BSIM4v6rdsMod; int BSIM4v6rbodyMod; int BSIM4v6rgateMod; int BSIM4v6perMod; int BSIM4v6geoMod; int BSIM4v6rgeoMod; int BSIM4v6mtrlMod; int BSIM4v6igcMod; int BSIM4v6igbMod; int BSIM4v6tempMod; int BSIM4v6binUnit; int BSIM4v6paramChk; char *BSIM4v6version; double BSIM4v6eot; double BSIM4v6vddeot; double BSIM4v6tempeot; double BSIM4v6leffeot; double BSIM4v6weffeot; double BSIM4v6ados; double BSIM4v6bdos; double BSIM4v6toxe; double BSIM4v6toxp; double BSIM4v6toxm; double BSIM4v6dtox; double BSIM4v6epsrox; double BSIM4v6cdsc; double BSIM4v6cdscb; double BSIM4v6cdscd; double BSIM4v6cit; double BSIM4v6nfactor; double BSIM4v6xj; double BSIM4v6vsat; double BSIM4v6at; double BSIM4v6a0; double BSIM4v6ags; double BSIM4v6a1; double BSIM4v6a2; double BSIM4v6keta; double BSIM4v6nsub; double BSIM4v6phig; double BSIM4v6epsrgate; double BSIM4v6easub; double BSIM4v6epsrsub; double BSIM4v6ni0sub; double BSIM4v6bg0sub; double BSIM4v6tbgasub; double BSIM4v6tbgbsub; double BSIM4v6ndep; double BSIM4v6nsd; double BSIM4v6phin; double BSIM4v6ngate; double BSIM4v6gamma1; double BSIM4v6gamma2; double BSIM4v6vbx; double BSIM4v6vbm; double BSIM4v6xt; double BSIM4v6k1; double BSIM4v6kt1; double BSIM4v6kt1l; double BSIM4v6kt2; double BSIM4v6k2; double BSIM4v6k3; double BSIM4v6k3b; double BSIM4v6w0; double BSIM4v6dvtp0; double BSIM4v6dvtp1; double BSIM4v6lpe0; double BSIM4v6lpeb; double BSIM4v6dvt0; double BSIM4v6dvt1; double BSIM4v6dvt2; double BSIM4v6dvt0w; double BSIM4v6dvt1w; double BSIM4v6dvt2w; double BSIM4v6drout; double BSIM4v6dsub; double BSIM4v6vth0; double BSIM4v6eu; double BSIM4v6ucs; double BSIM4v6ua; double BSIM4v6ua1; double BSIM4v6ub; double BSIM4v6ub1; double BSIM4v6uc; double BSIM4v6uc1; double BSIM4v6ud; double BSIM4v6ud1; double BSIM4v6up; double BSIM4v6lp; double BSIM4v6u0; double BSIM4v6ute; double BSIM4v6ucste; double BSIM4v6voff; double BSIM4v6tvoff; double BSIM4v6minv; double BSIM4v6minvcv; double BSIM4v6voffl; double BSIM4v6voffcvl; double BSIM4v6delta; double BSIM4v6rdsw; double BSIM4v6rdswmin; double BSIM4v6rdwmin; double BSIM4v6rswmin; double BSIM4v6rsw; double BSIM4v6rdw; double BSIM4v6prwg; double BSIM4v6prwb; double BSIM4v6prt; double BSIM4v6eta0; double BSIM4v6etab; double BSIM4v6pclm; double BSIM4v6pdibl1; double BSIM4v6pdibl2; double BSIM4v6pdiblb; double BSIM4v6fprout; double BSIM4v6pdits; double BSIM4v6pditsd; double BSIM4v6pditsl; double BSIM4v6pscbe1; double BSIM4v6pscbe2; double BSIM4v6pvag; double BSIM4v6wr; double BSIM4v6dwg; double BSIM4v6dwb; double BSIM4v6b0; double BSIM4v6b1; double BSIM4v6alpha0; double BSIM4v6alpha1; double BSIM4v6beta0; double BSIM4v6agidl; double BSIM4v6bgidl; double BSIM4v6cgidl; double BSIM4v6egidl; double BSIM4v6agisl; double BSIM4v6bgisl; double BSIM4v6cgisl; double BSIM4v6egisl; double BSIM4v6aigc; double BSIM4v6bigc; double BSIM4v6cigc; double BSIM4v6aigsd; double BSIM4v6bigsd; double BSIM4v6cigsd; double BSIM4v6aigs; double BSIM4v6bigs; double BSIM4v6cigs; double BSIM4v6aigd; double BSIM4v6bigd; double BSIM4v6cigd; double BSIM4v6aigbacc; double BSIM4v6bigbacc; double BSIM4v6cigbacc; double BSIM4v6aigbinv; double BSIM4v6bigbinv; double BSIM4v6cigbinv; double BSIM4v6nigc; double BSIM4v6nigbacc; double BSIM4v6nigbinv; double BSIM4v6ntox; double BSIM4v6eigbinv; double BSIM4v6pigcd; double BSIM4v6poxedge; double BSIM4v6toxref; double BSIM4v6ijthdfwd; double BSIM4v6ijthsfwd; double BSIM4v6ijthdrev; double BSIM4v6ijthsrev; double BSIM4v6xjbvd; double BSIM4v6xjbvs; double BSIM4v6bvd; double BSIM4v6bvs; double BSIM4v6jtss; double BSIM4v6jtsd; double BSIM4v6jtssws; double BSIM4v6jtsswd; double BSIM4v6jtsswgs; double BSIM4v6jtsswgd; double BSIM4v6jtweff; double BSIM4v6njts; double BSIM4v6njtssw; double BSIM4v6njtsswg; double BSIM4v6njtsd; double BSIM4v6njtsswd; double BSIM4v6njtsswgd; double BSIM4v6xtss; double BSIM4v6xtsd; double BSIM4v6xtssws; double BSIM4v6xtsswd; double BSIM4v6xtsswgs; double BSIM4v6xtsswgd; double BSIM4v6tnjts; double BSIM4v6tnjtssw; double BSIM4v6tnjtsswg; double BSIM4v6tnjtsd; double BSIM4v6tnjtsswd; double BSIM4v6tnjtsswgd; double BSIM4v6vtss; double BSIM4v6vtsd; double BSIM4v6vtssws; double BSIM4v6vtsswd; double BSIM4v6vtsswgs; double BSIM4v6vtsswgd; double BSIM4v6xrcrg1; double BSIM4v6xrcrg2; double BSIM4v6lambda; double BSIM4v6vtl; double BSIM4v6lc; double BSIM4v6xn; double BSIM4v6vfbsdoff; /* S/D flatband offset voltage */ double BSIM4v6lintnoi; /* lint offset for noise calculation */ double BSIM4v6tvfbsdoff; double BSIM4v6vfb; double BSIM4v6gbmin; double BSIM4v6rbdb; double BSIM4v6rbsb; double BSIM4v6rbpb; double BSIM4v6rbps; double BSIM4v6rbpd; double BSIM4v6rbps0; double BSIM4v6rbpsl; double BSIM4v6rbpsw; double BSIM4v6rbpsnf; double BSIM4v6rbpd0; double BSIM4v6rbpdl; double BSIM4v6rbpdw; double BSIM4v6rbpdnf; double BSIM4v6rbpbx0; double BSIM4v6rbpbxl; double BSIM4v6rbpbxw; double BSIM4v6rbpbxnf; double BSIM4v6rbpby0; double BSIM4v6rbpbyl; double BSIM4v6rbpbyw; double BSIM4v6rbpbynf; double BSIM4v6rbsbx0; double BSIM4v6rbsby0; double BSIM4v6rbdbx0; double BSIM4v6rbdby0; double BSIM4v6rbsdbxl; double BSIM4v6rbsdbxw; double BSIM4v6rbsdbxnf; double BSIM4v6rbsdbyl; double BSIM4v6rbsdbyw; double BSIM4v6rbsdbynf; double BSIM4v6tnoia; double BSIM4v6tnoib; double BSIM4v6rnoia; double BSIM4v6rnoib; double BSIM4v6ntnoi; /* CV model and Parasitics */ double BSIM4v6cgsl; double BSIM4v6cgdl; double BSIM4v6ckappas; double BSIM4v6ckappad; double BSIM4v6cf; double BSIM4v6vfbcv; double BSIM4v6clc; double BSIM4v6cle; double BSIM4v6dwc; double BSIM4v6dlc; double BSIM4v6xw; double BSIM4v6xl; double BSIM4v6dlcig; double BSIM4v6dlcigd; double BSIM4v6dwj; double BSIM4v6noff; double BSIM4v6voffcv; double BSIM4v6acde; double BSIM4v6moin; double BSIM4v6tcj; double BSIM4v6tcjsw; double BSIM4v6tcjswg; double BSIM4v6tpb; double BSIM4v6tpbsw; double BSIM4v6tpbswg; double BSIM4v6dmcg; double BSIM4v6dmci; double BSIM4v6dmdg; double BSIM4v6dmcgt; double BSIM4v6xgw; double BSIM4v6xgl; double BSIM4v6rshg; double BSIM4v6ngcon; /* Length Dependence */ double BSIM4v6lcdsc; double BSIM4v6lcdscb; double BSIM4v6lcdscd; double BSIM4v6lcit; double BSIM4v6lnfactor; double BSIM4v6lxj; double BSIM4v6lvsat; double BSIM4v6lat; double BSIM4v6la0; double BSIM4v6lags; double BSIM4v6la1; double BSIM4v6la2; double BSIM4v6lketa; double BSIM4v6lnsub; double BSIM4v6lndep; double BSIM4v6lnsd; double BSIM4v6lphin; double BSIM4v6lngate; double BSIM4v6lgamma1; double BSIM4v6lgamma2; double BSIM4v6lvbx; double BSIM4v6lvbm; double BSIM4v6lxt; double BSIM4v6lk1; double BSIM4v6lkt1; double BSIM4v6lkt1l; double BSIM4v6lkt2; double BSIM4v6lk2; double BSIM4v6lk3; double BSIM4v6lk3b; double BSIM4v6lw0; double BSIM4v6ldvtp0; double BSIM4v6ldvtp1; double BSIM4v6llpe0; double BSIM4v6llpeb; double BSIM4v6ldvt0; double BSIM4v6ldvt1; double BSIM4v6ldvt2; double BSIM4v6ldvt0w; double BSIM4v6ldvt1w; double BSIM4v6ldvt2w; double BSIM4v6ldrout; double BSIM4v6ldsub; double BSIM4v6lvth0; double BSIM4v6lua; double BSIM4v6lua1; double BSIM4v6lub; double BSIM4v6lub1; double BSIM4v6luc; double BSIM4v6luc1; double BSIM4v6lud; double BSIM4v6lud1; double BSIM4v6lup; double BSIM4v6llp; double BSIM4v6lu0; double BSIM4v6leu; double BSIM4v6lucs; double BSIM4v6lute; double BSIM4v6lucste; double BSIM4v6lvoff; double BSIM4v6ltvoff; double BSIM4v6lminv; double BSIM4v6lminvcv; double BSIM4v6ldelta; double BSIM4v6lrdsw; double BSIM4v6lrsw; double BSIM4v6lrdw; double BSIM4v6lprwg; double BSIM4v6lprwb; double BSIM4v6lprt; double BSIM4v6leta0; double BSIM4v6letab; double BSIM4v6lpclm; double BSIM4v6lpdibl1; double BSIM4v6lpdibl2; double BSIM4v6lpdiblb; double BSIM4v6lfprout; double BSIM4v6lpdits; double BSIM4v6lpditsd; double BSIM4v6lpscbe1; double BSIM4v6lpscbe2; double BSIM4v6lpvag; double BSIM4v6lwr; double BSIM4v6ldwg; double BSIM4v6ldwb; double BSIM4v6lb0; double BSIM4v6lb1; double BSIM4v6lalpha0; double BSIM4v6lalpha1; double BSIM4v6lbeta0; double BSIM4v6lvfb; double BSIM4v6lagidl; double BSIM4v6lbgidl; double BSIM4v6lcgidl; double BSIM4v6legidl; double BSIM4v6lagisl; double BSIM4v6lbgisl; double BSIM4v6lcgisl; double BSIM4v6legisl; double BSIM4v6laigc; double BSIM4v6lbigc; double BSIM4v6lcigc; double BSIM4v6laigsd; double BSIM4v6lbigsd; double BSIM4v6lcigsd; double BSIM4v6laigs; double BSIM4v6lbigs; double BSIM4v6lcigs; double BSIM4v6laigd; double BSIM4v6lbigd; double BSIM4v6lcigd; double BSIM4v6laigbacc; double BSIM4v6lbigbacc; double BSIM4v6lcigbacc; double BSIM4v6laigbinv; double BSIM4v6lbigbinv; double BSIM4v6lcigbinv; double BSIM4v6lnigc; double BSIM4v6lnigbacc; double BSIM4v6lnigbinv; double BSIM4v6lntox; double BSIM4v6leigbinv; double BSIM4v6lpigcd; double BSIM4v6lpoxedge; double BSIM4v6lxrcrg1; double BSIM4v6lxrcrg2; double BSIM4v6llambda; double BSIM4v6lvtl; double BSIM4v6lxn; double BSIM4v6lvfbsdoff; double BSIM4v6ltvfbsdoff; /* CV model */ double BSIM4v6lcgsl; double BSIM4v6lcgdl; double BSIM4v6lckappas; double BSIM4v6lckappad; double BSIM4v6lcf; double BSIM4v6lclc; double BSIM4v6lcle; double BSIM4v6lvfbcv; double BSIM4v6lnoff; double BSIM4v6lvoffcv; double BSIM4v6lacde; double BSIM4v6lmoin; /* Width Dependence */ double BSIM4v6wcdsc; double BSIM4v6wcdscb; double BSIM4v6wcdscd; double BSIM4v6wcit; double BSIM4v6wnfactor; double BSIM4v6wxj; double BSIM4v6wvsat; double BSIM4v6wat; double BSIM4v6wa0; double BSIM4v6wags; double BSIM4v6wa1; double BSIM4v6wa2; double BSIM4v6wketa; double BSIM4v6wnsub; double BSIM4v6wndep; double BSIM4v6wnsd; double BSIM4v6wphin; double BSIM4v6wngate; double BSIM4v6wgamma1; double BSIM4v6wgamma2; double BSIM4v6wvbx; double BSIM4v6wvbm; double BSIM4v6wxt; double BSIM4v6wk1; double BSIM4v6wkt1; double BSIM4v6wkt1l; double BSIM4v6wkt2; double BSIM4v6wk2; double BSIM4v6wk3; double BSIM4v6wk3b; double BSIM4v6ww0; double BSIM4v6wdvtp0; double BSIM4v6wdvtp1; double BSIM4v6wlpe0; double BSIM4v6wlpeb; double BSIM4v6wdvt0; double BSIM4v6wdvt1; double BSIM4v6wdvt2; double BSIM4v6wdvt0w; double BSIM4v6wdvt1w; double BSIM4v6wdvt2w; double BSIM4v6wdrout; double BSIM4v6wdsub; double BSIM4v6wvth0; double BSIM4v6wua; double BSIM4v6wua1; double BSIM4v6wub; double BSIM4v6wub1; double BSIM4v6wuc; double BSIM4v6wuc1; double BSIM4v6wud; double BSIM4v6wud1; double BSIM4v6wup; double BSIM4v6wlp; double BSIM4v6wu0; double BSIM4v6weu; double BSIM4v6wucs; double BSIM4v6wute; double BSIM4v6wucste; double BSIM4v6wvoff; double BSIM4v6wtvoff; double BSIM4v6wminv; double BSIM4v6wminvcv; double BSIM4v6wdelta; double BSIM4v6wrdsw; double BSIM4v6wrsw; double BSIM4v6wrdw; double BSIM4v6wprwg; double BSIM4v6wprwb; double BSIM4v6wprt; double BSIM4v6weta0; double BSIM4v6wetab; double BSIM4v6wpclm; double BSIM4v6wpdibl1; double BSIM4v6wpdibl2; double BSIM4v6wpdiblb; double BSIM4v6wfprout; double BSIM4v6wpdits; double BSIM4v6wpditsd; double BSIM4v6wpscbe1; double BSIM4v6wpscbe2; double BSIM4v6wpvag; double BSIM4v6wwr; double BSIM4v6wdwg; double BSIM4v6wdwb; double BSIM4v6wb0; double BSIM4v6wb1; double BSIM4v6walpha0; double BSIM4v6walpha1; double BSIM4v6wbeta0; double BSIM4v6wvfb; double BSIM4v6wagidl; double BSIM4v6wbgidl; double BSIM4v6wcgidl; double BSIM4v6wegidl; double BSIM4v6wagisl; double BSIM4v6wbgisl; double BSIM4v6wcgisl; double BSIM4v6wegisl; double BSIM4v6waigc; double BSIM4v6wbigc; double BSIM4v6wcigc; double BSIM4v6waigsd; double BSIM4v6wbigsd; double BSIM4v6wcigsd; double BSIM4v6waigs; double BSIM4v6wbigs; double BSIM4v6wcigs; double BSIM4v6waigd; double BSIM4v6wbigd; double BSIM4v6wcigd; double BSIM4v6waigbacc; double BSIM4v6wbigbacc; double BSIM4v6wcigbacc; double BSIM4v6waigbinv; double BSIM4v6wbigbinv; double BSIM4v6wcigbinv; double BSIM4v6wnigc; double BSIM4v6wnigbacc; double BSIM4v6wnigbinv; double BSIM4v6wntox; double BSIM4v6weigbinv; double BSIM4v6wpigcd; double BSIM4v6wpoxedge; double BSIM4v6wxrcrg1; double BSIM4v6wxrcrg2; double BSIM4v6wlambda; double BSIM4v6wvtl; double BSIM4v6wxn; double BSIM4v6wvfbsdoff; double BSIM4v6wtvfbsdoff; /* CV model */ double BSIM4v6wcgsl; double BSIM4v6wcgdl; double BSIM4v6wckappas; double BSIM4v6wckappad; double BSIM4v6wcf; double BSIM4v6wclc; double BSIM4v6wcle; double BSIM4v6wvfbcv; double BSIM4v6wnoff; double BSIM4v6wvoffcv; double BSIM4v6wacde; double BSIM4v6wmoin; /* Cross-term Dependence */ double BSIM4v6pcdsc; double BSIM4v6pcdscb; double BSIM4v6pcdscd; double BSIM4v6pcit; double BSIM4v6pnfactor; double BSIM4v6pxj; double BSIM4v6pvsat; double BSIM4v6pat; double BSIM4v6pa0; double BSIM4v6pags; double BSIM4v6pa1; double BSIM4v6pa2; double BSIM4v6pketa; double BSIM4v6pnsub; double BSIM4v6pndep; double BSIM4v6pnsd; double BSIM4v6pphin; double BSIM4v6pngate; double BSIM4v6pgamma1; double BSIM4v6pgamma2; double BSIM4v6pvbx; double BSIM4v6pvbm; double BSIM4v6pxt; double BSIM4v6pk1; double BSIM4v6pkt1; double BSIM4v6pkt1l; double BSIM4v6pkt2; double BSIM4v6pk2; double BSIM4v6pk3; double BSIM4v6pk3b; double BSIM4v6pw0; double BSIM4v6pdvtp0; double BSIM4v6pdvtp1; double BSIM4v6plpe0; double BSIM4v6plpeb; double BSIM4v6pdvt0; double BSIM4v6pdvt1; double BSIM4v6pdvt2; double BSIM4v6pdvt0w; double BSIM4v6pdvt1w; double BSIM4v6pdvt2w; double BSIM4v6pdrout; double BSIM4v6pdsub; double BSIM4v6pvth0; double BSIM4v6pua; double BSIM4v6pua1; double BSIM4v6pub; double BSIM4v6pub1; double BSIM4v6puc; double BSIM4v6puc1; double BSIM4v6pud; double BSIM4v6pud1; double BSIM4v6pup; double BSIM4v6plp; double BSIM4v6pu0; double BSIM4v6peu; double BSIM4v6pucs; double BSIM4v6pute; double BSIM4v6pucste; double BSIM4v6pvoff; double BSIM4v6ptvoff; double BSIM4v6pminv; double BSIM4v6pminvcv; double BSIM4v6pdelta; double BSIM4v6prdsw; double BSIM4v6prsw; double BSIM4v6prdw; double BSIM4v6pprwg; double BSIM4v6pprwb; double BSIM4v6pprt; double BSIM4v6peta0; double BSIM4v6petab; double BSIM4v6ppclm; double BSIM4v6ppdibl1; double BSIM4v6ppdibl2; double BSIM4v6ppdiblb; double BSIM4v6pfprout; double BSIM4v6ppdits; double BSIM4v6ppditsd; double BSIM4v6ppscbe1; double BSIM4v6ppscbe2; double BSIM4v6ppvag; double BSIM4v6pwr; double BSIM4v6pdwg; double BSIM4v6pdwb; double BSIM4v6pb0; double BSIM4v6pb1; double BSIM4v6palpha0; double BSIM4v6palpha1; double BSIM4v6pbeta0; double BSIM4v6pvfb; double BSIM4v6pagidl; double BSIM4v6pbgidl; double BSIM4v6pcgidl; double BSIM4v6pegidl; double BSIM4v6pagisl; double BSIM4v6pbgisl; double BSIM4v6pcgisl; double BSIM4v6pegisl; double BSIM4v6paigc; double BSIM4v6pbigc; double BSIM4v6pcigc; double BSIM4v6paigsd; double BSIM4v6pbigsd; double BSIM4v6pcigsd; double BSIM4v6paigs; double BSIM4v6pbigs; double BSIM4v6pcigs; double BSIM4v6paigd; double BSIM4v6pbigd; double BSIM4v6pcigd; double BSIM4v6paigbacc; double BSIM4v6pbigbacc; double BSIM4v6pcigbacc; double BSIM4v6paigbinv; double BSIM4v6pbigbinv; double BSIM4v6pcigbinv; double BSIM4v6pnigc; double BSIM4v6pnigbacc; double BSIM4v6pnigbinv; double BSIM4v6pntox; double BSIM4v6peigbinv; double BSIM4v6ppigcd; double BSIM4v6ppoxedge; double BSIM4v6pxrcrg1; double BSIM4v6pxrcrg2; double BSIM4v6plambda; double BSIM4v6pvtl; double BSIM4v6pxn; double BSIM4v6pvfbsdoff; double BSIM4v6ptvfbsdoff; /* CV model */ double BSIM4v6pcgsl; double BSIM4v6pcgdl; double BSIM4v6pckappas; double BSIM4v6pckappad; double BSIM4v6pcf; double BSIM4v6pclc; double BSIM4v6pcle; double BSIM4v6pvfbcv; double BSIM4v6pnoff; double BSIM4v6pvoffcv; double BSIM4v6pacde; double BSIM4v6pmoin; double BSIM4v6tnom; double BSIM4v6cgso; double BSIM4v6cgdo; double BSIM4v6cgbo; double BSIM4v6xpart; double BSIM4v6cFringOut; double BSIM4v6cFringMax; double BSIM4v6sheetResistance; double BSIM4v6SjctSatCurDensity; double BSIM4v6DjctSatCurDensity; double BSIM4v6SjctSidewallSatCurDensity; double BSIM4v6DjctSidewallSatCurDensity; double BSIM4v6SjctGateSidewallSatCurDensity; double BSIM4v6DjctGateSidewallSatCurDensity; double BSIM4v6SbulkJctPotential; double BSIM4v6DbulkJctPotential; double BSIM4v6SbulkJctBotGradingCoeff; double BSIM4v6DbulkJctBotGradingCoeff; double BSIM4v6SbulkJctSideGradingCoeff; double BSIM4v6DbulkJctSideGradingCoeff; double BSIM4v6SbulkJctGateSideGradingCoeff; double BSIM4v6DbulkJctGateSideGradingCoeff; double BSIM4v6SsidewallJctPotential; double BSIM4v6DsidewallJctPotential; double BSIM4v6SGatesidewallJctPotential; double BSIM4v6DGatesidewallJctPotential; double BSIM4v6SunitAreaJctCap; double BSIM4v6DunitAreaJctCap; double BSIM4v6SunitLengthSidewallJctCap; double BSIM4v6DunitLengthSidewallJctCap; double BSIM4v6SunitLengthGateSidewallJctCap; double BSIM4v6DunitLengthGateSidewallJctCap; double BSIM4v6SjctEmissionCoeff; double BSIM4v6DjctEmissionCoeff; double BSIM4v6SjctTempExponent; double BSIM4v6DjctTempExponent; double BSIM4v6njtsstemp; double BSIM4v6njtsswstemp; double BSIM4v6njtsswgstemp; double BSIM4v6njtsdtemp; double BSIM4v6njtsswdtemp; double BSIM4v6njtsswgdtemp; double BSIM4v6Lint; double BSIM4v6Ll; double BSIM4v6Llc; double BSIM4v6Lln; double BSIM4v6Lw; double BSIM4v6Lwc; double BSIM4v6Lwn; double BSIM4v6Lwl; double BSIM4v6Lwlc; double BSIM4v6Lmin; double BSIM4v6Lmax; double BSIM4v6Wint; double BSIM4v6Wl; double BSIM4v6Wlc; double BSIM4v6Wln; double BSIM4v6Ww; double BSIM4v6Wwc; double BSIM4v6Wwn; double BSIM4v6Wwl; double BSIM4v6Wwlc; double BSIM4v6Wmin; double BSIM4v6Wmax; /* added for stress effect */ double BSIM4v6saref; double BSIM4v6sbref; double BSIM4v6wlod; double BSIM4v6ku0; double BSIM4v6kvsat; double BSIM4v6kvth0; double BSIM4v6tku0; double BSIM4v6llodku0; double BSIM4v6wlodku0; double BSIM4v6llodvth; double BSIM4v6wlodvth; double BSIM4v6lku0; double BSIM4v6wku0; double BSIM4v6pku0; double BSIM4v6lkvth0; double BSIM4v6wkvth0; double BSIM4v6pkvth0; double BSIM4v6stk2; double BSIM4v6lodk2; double BSIM4v6steta0; double BSIM4v6lodeta0; double BSIM4v6web; double BSIM4v6wec; double BSIM4v6kvth0we; double BSIM4v6k2we; double BSIM4v6ku0we; double BSIM4v6scref; double BSIM4v6wpemod; double BSIM4v6lkvth0we; double BSIM4v6lk2we; double BSIM4v6lku0we; double BSIM4v6wkvth0we; double BSIM4v6wk2we; double BSIM4v6wku0we; double BSIM4v6pkvth0we; double BSIM4v6pk2we; double BSIM4v6pku0we; /* Pre-calculated constants * move to size-dependent param */ double BSIM4v6Eg0; double BSIM4v6vtm; double BSIM4v6vtm0; double BSIM4v6coxe; double BSIM4v6coxp; double BSIM4v6cof1; double BSIM4v6cof2; double BSIM4v6cof3; double BSIM4v6cof4; double BSIM4v6vcrit; double BSIM4v6factor1; double BSIM4v6PhiBS; double BSIM4v6PhiBSWS; double BSIM4v6PhiBSWGS; double BSIM4v6SjctTempSatCurDensity; double BSIM4v6SjctSidewallTempSatCurDensity; double BSIM4v6SjctGateSidewallTempSatCurDensity; double BSIM4v6PhiBD; double BSIM4v6PhiBSWD; double BSIM4v6PhiBSWGD; double BSIM4v6DjctTempSatCurDensity; double BSIM4v6DjctSidewallTempSatCurDensity; double BSIM4v6DjctGateSidewallTempSatCurDensity; double BSIM4v6SunitAreaTempJctCap; double BSIM4v6DunitAreaTempJctCap; double BSIM4v6SunitLengthSidewallTempJctCap; double BSIM4v6DunitLengthSidewallTempJctCap; double BSIM4v6SunitLengthGateSidewallTempJctCap; double BSIM4v6DunitLengthGateSidewallTempJctCap; double BSIM4v6oxideTrapDensityA; double BSIM4v6oxideTrapDensityB; double BSIM4v6oxideTrapDensityC; double BSIM4v6em; double BSIM4v6ef; double BSIM4v6af; double BSIM4v6kf; double BSIM4v6vgsMax; double BSIM4v6vgdMax; double BSIM4v6vgbMax; double BSIM4v6vdsMax; double BSIM4v6vbsMax; double BSIM4v6vbdMax; struct bsim4v6SizeDependParam *pSizeDependParamKnot; #ifdef USE_OMP int BSIM4v6InstCount; struct sBSIM4v6instance **BSIM4v6InstanceArray; #endif /* Flags */ unsigned BSIM4v6mobModGiven :1; unsigned BSIM4v6binUnitGiven :1; unsigned BSIM4v6cvchargeModGiven :1; unsigned BSIM4v6capModGiven :1; unsigned BSIM4v6dioModGiven :1; unsigned BSIM4v6rdsModGiven :1; unsigned BSIM4v6rbodyModGiven :1; unsigned BSIM4v6rgateModGiven :1; unsigned BSIM4v6perModGiven :1; unsigned BSIM4v6geoModGiven :1; unsigned BSIM4v6rgeoModGiven :1; unsigned BSIM4v6paramChkGiven :1; unsigned BSIM4v6trnqsModGiven :1; unsigned BSIM4v6acnqsModGiven :1; unsigned BSIM4v6fnoiModGiven :1; unsigned BSIM4v6tnoiModGiven :1; unsigned BSIM4v6mtrlModGiven :1; unsigned BSIM4v6igcModGiven :1; unsigned BSIM4v6igbModGiven :1; unsigned BSIM4v6tempModGiven :1; unsigned BSIM4v6typeGiven :1; unsigned BSIM4v6toxrefGiven :1; unsigned BSIM4v6eotGiven :1; unsigned BSIM4v6vddeotGiven :1; unsigned BSIM4v6tempeotGiven :1; unsigned BSIM4v6leffeotGiven :1; unsigned BSIM4v6weffeotGiven :1; unsigned BSIM4v6adosGiven :1; unsigned BSIM4v6bdosGiven :1; unsigned BSIM4v6toxeGiven :1; unsigned BSIM4v6toxpGiven :1; unsigned BSIM4v6toxmGiven :1; unsigned BSIM4v6dtoxGiven :1; unsigned BSIM4v6epsroxGiven :1; unsigned BSIM4v6versionGiven :1; unsigned BSIM4v6cdscGiven :1; unsigned BSIM4v6cdscbGiven :1; unsigned BSIM4v6cdscdGiven :1; unsigned BSIM4v6citGiven :1; unsigned BSIM4v6nfactorGiven :1; unsigned BSIM4v6xjGiven :1; unsigned BSIM4v6vsatGiven :1; unsigned BSIM4v6atGiven :1; unsigned BSIM4v6a0Given :1; unsigned BSIM4v6agsGiven :1; unsigned BSIM4v6a1Given :1; unsigned BSIM4v6a2Given :1; unsigned BSIM4v6ketaGiven :1; unsigned BSIM4v6nsubGiven :1; unsigned BSIM4v6phigGiven :1; unsigned BSIM4v6epsrgateGiven :1; unsigned BSIM4v6easubGiven :1; unsigned BSIM4v6epsrsubGiven :1; unsigned BSIM4v6ni0subGiven :1; unsigned BSIM4v6bg0subGiven :1; unsigned BSIM4v6tbgasubGiven :1; unsigned BSIM4v6tbgbsubGiven :1; unsigned BSIM4v6ndepGiven :1; unsigned BSIM4v6nsdGiven :1; unsigned BSIM4v6phinGiven :1; unsigned BSIM4v6ngateGiven :1; unsigned BSIM4v6gamma1Given :1; unsigned BSIM4v6gamma2Given :1; unsigned BSIM4v6vbxGiven :1; unsigned BSIM4v6vbmGiven :1; unsigned BSIM4v6xtGiven :1; unsigned BSIM4v6k1Given :1; unsigned BSIM4v6kt1Given :1; unsigned BSIM4v6kt1lGiven :1; unsigned BSIM4v6kt2Given :1; unsigned BSIM4v6k2Given :1; unsigned BSIM4v6k3Given :1; unsigned BSIM4v6k3bGiven :1; unsigned BSIM4v6w0Given :1; unsigned BSIM4v6dvtp0Given :1; unsigned BSIM4v6dvtp1Given :1; unsigned BSIM4v6lpe0Given :1; unsigned BSIM4v6lpebGiven :1; unsigned BSIM4v6dvt0Given :1; unsigned BSIM4v6dvt1Given :1; unsigned BSIM4v6dvt2Given :1; unsigned BSIM4v6dvt0wGiven :1; unsigned BSIM4v6dvt1wGiven :1; unsigned BSIM4v6dvt2wGiven :1; unsigned BSIM4v6droutGiven :1; unsigned BSIM4v6dsubGiven :1; unsigned BSIM4v6vth0Given :1; unsigned BSIM4v6euGiven :1; unsigned BSIM4v6ucsGiven :1; unsigned BSIM4v6uaGiven :1; unsigned BSIM4v6ua1Given :1; unsigned BSIM4v6ubGiven :1; unsigned BSIM4v6ub1Given :1; unsigned BSIM4v6ucGiven :1; unsigned BSIM4v6uc1Given :1; unsigned BSIM4v6udGiven :1; unsigned BSIM4v6ud1Given :1; unsigned BSIM4v6upGiven :1; unsigned BSIM4v6lpGiven :1; unsigned BSIM4v6u0Given :1; unsigned BSIM4v6uteGiven :1; unsigned BSIM4v6ucsteGiven :1; unsigned BSIM4v6voffGiven :1; unsigned BSIM4v6tvoffGiven :1; unsigned BSIM4v6vofflGiven :1; unsigned BSIM4v6voffcvlGiven :1; unsigned BSIM4v6minvGiven :1; unsigned BSIM4v6minvcvGiven :1; unsigned BSIM4v6rdswGiven :1; unsigned BSIM4v6rdswminGiven :1; unsigned BSIM4v6rdwminGiven :1; unsigned BSIM4v6rswminGiven :1; unsigned BSIM4v6rswGiven :1; unsigned BSIM4v6rdwGiven :1; unsigned BSIM4v6prwgGiven :1; unsigned BSIM4v6prwbGiven :1; unsigned BSIM4v6prtGiven :1; unsigned BSIM4v6eta0Given :1; unsigned BSIM4v6etabGiven :1; unsigned BSIM4v6pclmGiven :1; unsigned BSIM4v6pdibl1Given :1; unsigned BSIM4v6pdibl2Given :1; unsigned BSIM4v6pdiblbGiven :1; unsigned BSIM4v6fproutGiven :1; unsigned BSIM4v6pditsGiven :1; unsigned BSIM4v6pditsdGiven :1; unsigned BSIM4v6pditslGiven :1; unsigned BSIM4v6pscbe1Given :1; unsigned BSIM4v6pscbe2Given :1; unsigned BSIM4v6pvagGiven :1; unsigned BSIM4v6deltaGiven :1; unsigned BSIM4v6wrGiven :1; unsigned BSIM4v6dwgGiven :1; unsigned BSIM4v6dwbGiven :1; unsigned BSIM4v6b0Given :1; unsigned BSIM4v6b1Given :1; unsigned BSIM4v6alpha0Given :1; unsigned BSIM4v6alpha1Given :1; unsigned BSIM4v6beta0Given :1; unsigned BSIM4v6agidlGiven :1; unsigned BSIM4v6bgidlGiven :1; unsigned BSIM4v6cgidlGiven :1; unsigned BSIM4v6egidlGiven :1; unsigned BSIM4v6agislGiven :1; unsigned BSIM4v6bgislGiven :1; unsigned BSIM4v6cgislGiven :1; unsigned BSIM4v6egislGiven :1; unsigned BSIM4v6aigcGiven :1; unsigned BSIM4v6bigcGiven :1; unsigned BSIM4v6cigcGiven :1; unsigned BSIM4v6aigsdGiven :1; unsigned BSIM4v6bigsdGiven :1; unsigned BSIM4v6cigsdGiven :1; unsigned BSIM4v6aigsGiven :1; unsigned BSIM4v6bigsGiven :1; unsigned BSIM4v6cigsGiven :1; unsigned BSIM4v6aigdGiven :1; unsigned BSIM4v6bigdGiven :1; unsigned BSIM4v6cigdGiven :1; unsigned BSIM4v6aigbaccGiven :1; unsigned BSIM4v6bigbaccGiven :1; unsigned BSIM4v6cigbaccGiven :1; unsigned BSIM4v6aigbinvGiven :1; unsigned BSIM4v6bigbinvGiven :1; unsigned BSIM4v6cigbinvGiven :1; unsigned BSIM4v6nigcGiven :1; unsigned BSIM4v6nigbinvGiven :1; unsigned BSIM4v6nigbaccGiven :1; unsigned BSIM4v6ntoxGiven :1; unsigned BSIM4v6eigbinvGiven :1; unsigned BSIM4v6pigcdGiven :1; unsigned BSIM4v6poxedgeGiven :1; unsigned BSIM4v6ijthdfwdGiven :1; unsigned BSIM4v6ijthsfwdGiven :1; unsigned BSIM4v6ijthdrevGiven :1; unsigned BSIM4v6ijthsrevGiven :1; unsigned BSIM4v6xjbvdGiven :1; unsigned BSIM4v6xjbvsGiven :1; unsigned BSIM4v6bvdGiven :1; unsigned BSIM4v6bvsGiven :1; unsigned BSIM4v6jtssGiven :1; unsigned BSIM4v6jtsdGiven :1; unsigned BSIM4v6jtsswsGiven :1; unsigned BSIM4v6jtsswdGiven :1; unsigned BSIM4v6jtsswgsGiven :1; unsigned BSIM4v6jtsswgdGiven :1; unsigned BSIM4v6jtweffGiven :1; unsigned BSIM4v6njtsGiven :1; unsigned BSIM4v6njtsswGiven :1; unsigned BSIM4v6njtsswgGiven :1; unsigned BSIM4v6njtsdGiven :1; unsigned BSIM4v6njtsswdGiven :1; unsigned BSIM4v6njtsswgdGiven :1; unsigned BSIM4v6xtssGiven :1; unsigned BSIM4v6xtsdGiven :1; unsigned BSIM4v6xtsswsGiven :1; unsigned BSIM4v6xtsswdGiven :1; unsigned BSIM4v6xtsswgsGiven :1; unsigned BSIM4v6xtsswgdGiven :1; unsigned BSIM4v6tnjtsGiven :1; unsigned BSIM4v6tnjtsswGiven :1; unsigned BSIM4v6tnjtsswgGiven :1; unsigned BSIM4v6tnjtsdGiven :1; unsigned BSIM4v6tnjtsswdGiven :1; unsigned BSIM4v6tnjtsswgdGiven :1; unsigned BSIM4v6vtssGiven :1; unsigned BSIM4v6vtsdGiven :1; unsigned BSIM4v6vtsswsGiven :1; unsigned BSIM4v6vtsswdGiven :1; unsigned BSIM4v6vtsswgsGiven :1; unsigned BSIM4v6vtsswgdGiven :1; unsigned BSIM4v6vfbGiven :1; unsigned BSIM4v6gbminGiven :1; unsigned BSIM4v6rbdbGiven :1; unsigned BSIM4v6rbsbGiven :1; unsigned BSIM4v6rbpsGiven :1; unsigned BSIM4v6rbpdGiven :1; unsigned BSIM4v6rbpbGiven :1; unsigned BSIM4v6rbps0Given :1; unsigned BSIM4v6rbpslGiven :1; unsigned BSIM4v6rbpswGiven :1; unsigned BSIM4v6rbpsnfGiven :1; unsigned BSIM4v6rbpd0Given :1; unsigned BSIM4v6rbpdlGiven :1; unsigned BSIM4v6rbpdwGiven :1; unsigned BSIM4v6rbpdnfGiven :1; unsigned BSIM4v6rbpbx0Given :1; unsigned BSIM4v6rbpbxlGiven :1; unsigned BSIM4v6rbpbxwGiven :1; unsigned BSIM4v6rbpbxnfGiven :1; unsigned BSIM4v6rbpby0Given :1; unsigned BSIM4v6rbpbylGiven :1; unsigned BSIM4v6rbpbywGiven :1; unsigned BSIM4v6rbpbynfGiven :1; unsigned BSIM4v6rbsbx0Given :1; unsigned BSIM4v6rbsby0Given :1; unsigned BSIM4v6rbdbx0Given :1; unsigned BSIM4v6rbdby0Given :1; unsigned BSIM4v6rbsdbxlGiven :1; unsigned BSIM4v6rbsdbxwGiven :1; unsigned BSIM4v6rbsdbxnfGiven :1; unsigned BSIM4v6rbsdbylGiven :1; unsigned BSIM4v6rbsdbywGiven :1; unsigned BSIM4v6rbsdbynfGiven :1; unsigned BSIM4v6xrcrg1Given :1; unsigned BSIM4v6xrcrg2Given :1; unsigned BSIM4v6tnoiaGiven :1; unsigned BSIM4v6tnoibGiven :1; unsigned BSIM4v6rnoiaGiven :1; unsigned BSIM4v6rnoibGiven :1; unsigned BSIM4v6ntnoiGiven :1; unsigned BSIM4v6lambdaGiven :1; unsigned BSIM4v6vtlGiven :1; unsigned BSIM4v6lcGiven :1; unsigned BSIM4v6xnGiven :1; unsigned BSIM4v6vfbsdoffGiven :1; unsigned BSIM4v6lintnoiGiven :1; unsigned BSIM4v6tvfbsdoffGiven :1; /* CV model and parasitics */ unsigned BSIM4v6cgslGiven :1; unsigned BSIM4v6cgdlGiven :1; unsigned BSIM4v6ckappasGiven :1; unsigned BSIM4v6ckappadGiven :1; unsigned BSIM4v6cfGiven :1; unsigned BSIM4v6vfbcvGiven :1; unsigned BSIM4v6clcGiven :1; unsigned BSIM4v6cleGiven :1; unsigned BSIM4v6dwcGiven :1; unsigned BSIM4v6dlcGiven :1; unsigned BSIM4v6xwGiven :1; unsigned BSIM4v6xlGiven :1; unsigned BSIM4v6dlcigGiven :1; unsigned BSIM4v6dlcigdGiven :1; unsigned BSIM4v6dwjGiven :1; unsigned BSIM4v6noffGiven :1; unsigned BSIM4v6voffcvGiven :1; unsigned BSIM4v6acdeGiven :1; unsigned BSIM4v6moinGiven :1; unsigned BSIM4v6tcjGiven :1; unsigned BSIM4v6tcjswGiven :1; unsigned BSIM4v6tcjswgGiven :1; unsigned BSIM4v6tpbGiven :1; unsigned BSIM4v6tpbswGiven :1; unsigned BSIM4v6tpbswgGiven :1; unsigned BSIM4v6dmcgGiven :1; unsigned BSIM4v6dmciGiven :1; unsigned BSIM4v6dmdgGiven :1; unsigned BSIM4v6dmcgtGiven :1; unsigned BSIM4v6xgwGiven :1; unsigned BSIM4v6xglGiven :1; unsigned BSIM4v6rshgGiven :1; unsigned BSIM4v6ngconGiven :1; /* Length dependence */ unsigned BSIM4v6lcdscGiven :1; unsigned BSIM4v6lcdscbGiven :1; unsigned BSIM4v6lcdscdGiven :1; unsigned BSIM4v6lcitGiven :1; unsigned BSIM4v6lnfactorGiven :1; unsigned BSIM4v6lxjGiven :1; unsigned BSIM4v6lvsatGiven :1; unsigned BSIM4v6latGiven :1; unsigned BSIM4v6la0Given :1; unsigned BSIM4v6lagsGiven :1; unsigned BSIM4v6la1Given :1; unsigned BSIM4v6la2Given :1; unsigned BSIM4v6lketaGiven :1; unsigned BSIM4v6lnsubGiven :1; unsigned BSIM4v6lndepGiven :1; unsigned BSIM4v6lnsdGiven :1; unsigned BSIM4v6lphinGiven :1; unsigned BSIM4v6lngateGiven :1; unsigned BSIM4v6lgamma1Given :1; unsigned BSIM4v6lgamma2Given :1; unsigned BSIM4v6lvbxGiven :1; unsigned BSIM4v6lvbmGiven :1; unsigned BSIM4v6lxtGiven :1; unsigned BSIM4v6lk1Given :1; unsigned BSIM4v6lkt1Given :1; unsigned BSIM4v6lkt1lGiven :1; unsigned BSIM4v6lkt2Given :1; unsigned BSIM4v6lk2Given :1; unsigned BSIM4v6lk3Given :1; unsigned BSIM4v6lk3bGiven :1; unsigned BSIM4v6lw0Given :1; unsigned BSIM4v6ldvtp0Given :1; unsigned BSIM4v6ldvtp1Given :1; unsigned BSIM4v6llpe0Given :1; unsigned BSIM4v6llpebGiven :1; unsigned BSIM4v6ldvt0Given :1; unsigned BSIM4v6ldvt1Given :1; unsigned BSIM4v6ldvt2Given :1; unsigned BSIM4v6ldvt0wGiven :1; unsigned BSIM4v6ldvt1wGiven :1; unsigned BSIM4v6ldvt2wGiven :1; unsigned BSIM4v6ldroutGiven :1; unsigned BSIM4v6ldsubGiven :1; unsigned BSIM4v6lvth0Given :1; unsigned BSIM4v6luaGiven :1; unsigned BSIM4v6lua1Given :1; unsigned BSIM4v6lubGiven :1; unsigned BSIM4v6lub1Given :1; unsigned BSIM4v6lucGiven :1; unsigned BSIM4v6luc1Given :1; unsigned BSIM4v6ludGiven :1; unsigned BSIM4v6lud1Given :1; unsigned BSIM4v6lupGiven :1; unsigned BSIM4v6llpGiven :1; unsigned BSIM4v6lu0Given :1; unsigned BSIM4v6leuGiven :1; unsigned BSIM4v6lucsGiven :1; unsigned BSIM4v6luteGiven :1; unsigned BSIM4v6lucsteGiven :1; unsigned BSIM4v6lvoffGiven :1; unsigned BSIM4v6ltvoffGiven :1; unsigned BSIM4v6lminvGiven :1; unsigned BSIM4v6lminvcvGiven :1; unsigned BSIM4v6lrdswGiven :1; unsigned BSIM4v6lrswGiven :1; unsigned BSIM4v6lrdwGiven :1; unsigned BSIM4v6lprwgGiven :1; unsigned BSIM4v6lprwbGiven :1; unsigned BSIM4v6lprtGiven :1; unsigned BSIM4v6leta0Given :1; unsigned BSIM4v6letabGiven :1; unsigned BSIM4v6lpclmGiven :1; unsigned BSIM4v6lpdibl1Given :1; unsigned BSIM4v6lpdibl2Given :1; unsigned BSIM4v6lpdiblbGiven :1; unsigned BSIM4v6lfproutGiven :1; unsigned BSIM4v6lpditsGiven :1; unsigned BSIM4v6lpditsdGiven :1; unsigned BSIM4v6lpscbe1Given :1; unsigned BSIM4v6lpscbe2Given :1; unsigned BSIM4v6lpvagGiven :1; unsigned BSIM4v6ldeltaGiven :1; unsigned BSIM4v6lwrGiven :1; unsigned BSIM4v6ldwgGiven :1; unsigned BSIM4v6ldwbGiven :1; unsigned BSIM4v6lb0Given :1; unsigned BSIM4v6lb1Given :1; unsigned BSIM4v6lalpha0Given :1; unsigned BSIM4v6lalpha1Given :1; unsigned BSIM4v6lbeta0Given :1; unsigned BSIM4v6lvfbGiven :1; unsigned BSIM4v6lagidlGiven :1; unsigned BSIM4v6lbgidlGiven :1; unsigned BSIM4v6lcgidlGiven :1; unsigned BSIM4v6legidlGiven :1; unsigned BSIM4v6lagislGiven :1; unsigned BSIM4v6lbgislGiven :1; unsigned BSIM4v6lcgislGiven :1; unsigned BSIM4v6legislGiven :1; unsigned BSIM4v6laigcGiven :1; unsigned BSIM4v6lbigcGiven :1; unsigned BSIM4v6lcigcGiven :1; unsigned BSIM4v6laigsdGiven :1; unsigned BSIM4v6lbigsdGiven :1; unsigned BSIM4v6lcigsdGiven :1; unsigned BSIM4v6laigsGiven :1; unsigned BSIM4v6lbigsGiven :1; unsigned BSIM4v6lcigsGiven :1; unsigned BSIM4v6laigdGiven :1; unsigned BSIM4v6lbigdGiven :1; unsigned BSIM4v6lcigdGiven :1; unsigned BSIM4v6laigbaccGiven :1; unsigned BSIM4v6lbigbaccGiven :1; unsigned BSIM4v6lcigbaccGiven :1; unsigned BSIM4v6laigbinvGiven :1; unsigned BSIM4v6lbigbinvGiven :1; unsigned BSIM4v6lcigbinvGiven :1; unsigned BSIM4v6lnigcGiven :1; unsigned BSIM4v6lnigbinvGiven :1; unsigned BSIM4v6lnigbaccGiven :1; unsigned BSIM4v6lntoxGiven :1; unsigned BSIM4v6leigbinvGiven :1; unsigned BSIM4v6lpigcdGiven :1; unsigned BSIM4v6lpoxedgeGiven :1; unsigned BSIM4v6lxrcrg1Given :1; unsigned BSIM4v6lxrcrg2Given :1; unsigned BSIM4v6llambdaGiven :1; unsigned BSIM4v6lvtlGiven :1; unsigned BSIM4v6lxnGiven :1; unsigned BSIM4v6lvfbsdoffGiven :1; unsigned BSIM4v6ltvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v6lcgslGiven :1; unsigned BSIM4v6lcgdlGiven :1; unsigned BSIM4v6lckappasGiven :1; unsigned BSIM4v6lckappadGiven :1; unsigned BSIM4v6lcfGiven :1; unsigned BSIM4v6lclcGiven :1; unsigned BSIM4v6lcleGiven :1; unsigned BSIM4v6lvfbcvGiven :1; unsigned BSIM4v6lnoffGiven :1; unsigned BSIM4v6lvoffcvGiven :1; unsigned BSIM4v6lacdeGiven :1; unsigned BSIM4v6lmoinGiven :1; /* Width dependence */ unsigned BSIM4v6wcdscGiven :1; unsigned BSIM4v6wcdscbGiven :1; unsigned BSIM4v6wcdscdGiven :1; unsigned BSIM4v6wcitGiven :1; unsigned BSIM4v6wnfactorGiven :1; unsigned BSIM4v6wxjGiven :1; unsigned BSIM4v6wvsatGiven :1; unsigned BSIM4v6watGiven :1; unsigned BSIM4v6wa0Given :1; unsigned BSIM4v6wagsGiven :1; unsigned BSIM4v6wa1Given :1; unsigned BSIM4v6wa2Given :1; unsigned BSIM4v6wketaGiven :1; unsigned BSIM4v6wnsubGiven :1; unsigned BSIM4v6wndepGiven :1; unsigned BSIM4v6wnsdGiven :1; unsigned BSIM4v6wphinGiven :1; unsigned BSIM4v6wngateGiven :1; unsigned BSIM4v6wgamma1Given :1; unsigned BSIM4v6wgamma2Given :1; unsigned BSIM4v6wvbxGiven :1; unsigned BSIM4v6wvbmGiven :1; unsigned BSIM4v6wxtGiven :1; unsigned BSIM4v6wk1Given :1; unsigned BSIM4v6wkt1Given :1; unsigned BSIM4v6wkt1lGiven :1; unsigned BSIM4v6wkt2Given :1; unsigned BSIM4v6wk2Given :1; unsigned BSIM4v6wk3Given :1; unsigned BSIM4v6wk3bGiven :1; unsigned BSIM4v6ww0Given :1; unsigned BSIM4v6wdvtp0Given :1; unsigned BSIM4v6wdvtp1Given :1; unsigned BSIM4v6wlpe0Given :1; unsigned BSIM4v6wlpebGiven :1; unsigned BSIM4v6wdvt0Given :1; unsigned BSIM4v6wdvt1Given :1; unsigned BSIM4v6wdvt2Given :1; unsigned BSIM4v6wdvt0wGiven :1; unsigned BSIM4v6wdvt1wGiven :1; unsigned BSIM4v6wdvt2wGiven :1; unsigned BSIM4v6wdroutGiven :1; unsigned BSIM4v6wdsubGiven :1; unsigned BSIM4v6wvth0Given :1; unsigned BSIM4v6wuaGiven :1; unsigned BSIM4v6wua1Given :1; unsigned BSIM4v6wubGiven :1; unsigned BSIM4v6wub1Given :1; unsigned BSIM4v6wucGiven :1; unsigned BSIM4v6wuc1Given :1; unsigned BSIM4v6wudGiven :1; unsigned BSIM4v6wud1Given :1; unsigned BSIM4v6wupGiven :1; unsigned BSIM4v6wlpGiven :1; unsigned BSIM4v6wu0Given :1; unsigned BSIM4v6weuGiven :1; unsigned BSIM4v6wucsGiven :1; unsigned BSIM4v6wuteGiven :1; unsigned BSIM4v6wucsteGiven :1; unsigned BSIM4v6wvoffGiven :1; unsigned BSIM4v6wtvoffGiven :1; unsigned BSIM4v6wminvGiven :1; unsigned BSIM4v6wminvcvGiven :1; unsigned BSIM4v6wrdswGiven :1; unsigned BSIM4v6wrswGiven :1; unsigned BSIM4v6wrdwGiven :1; unsigned BSIM4v6wprwgGiven :1; unsigned BSIM4v6wprwbGiven :1; unsigned BSIM4v6wprtGiven :1; unsigned BSIM4v6weta0Given :1; unsigned BSIM4v6wetabGiven :1; unsigned BSIM4v6wpclmGiven :1; unsigned BSIM4v6wpdibl1Given :1; unsigned BSIM4v6wpdibl2Given :1; unsigned BSIM4v6wpdiblbGiven :1; unsigned BSIM4v6wfproutGiven :1; unsigned BSIM4v6wpditsGiven :1; unsigned BSIM4v6wpditsdGiven :1; unsigned BSIM4v6wpscbe1Given :1; unsigned BSIM4v6wpscbe2Given :1; unsigned BSIM4v6wpvagGiven :1; unsigned BSIM4v6wdeltaGiven :1; unsigned BSIM4v6wwrGiven :1; unsigned BSIM4v6wdwgGiven :1; unsigned BSIM4v6wdwbGiven :1; unsigned BSIM4v6wb0Given :1; unsigned BSIM4v6wb1Given :1; unsigned BSIM4v6walpha0Given :1; unsigned BSIM4v6walpha1Given :1; unsigned BSIM4v6wbeta0Given :1; unsigned BSIM4v6wvfbGiven :1; unsigned BSIM4v6wagidlGiven :1; unsigned BSIM4v6wbgidlGiven :1; unsigned BSIM4v6wcgidlGiven :1; unsigned BSIM4v6wegidlGiven :1; unsigned BSIM4v6wagislGiven :1; unsigned BSIM4v6wbgislGiven :1; unsigned BSIM4v6wcgislGiven :1; unsigned BSIM4v6wegislGiven :1; unsigned BSIM4v6waigcGiven :1; unsigned BSIM4v6wbigcGiven :1; unsigned BSIM4v6wcigcGiven :1; unsigned BSIM4v6waigsdGiven :1; unsigned BSIM4v6wbigsdGiven :1; unsigned BSIM4v6wcigsdGiven :1; unsigned BSIM4v6waigsGiven :1; unsigned BSIM4v6wbigsGiven :1; unsigned BSIM4v6wcigsGiven :1; unsigned BSIM4v6waigdGiven :1; unsigned BSIM4v6wbigdGiven :1; unsigned BSIM4v6wcigdGiven :1; unsigned BSIM4v6waigbaccGiven :1; unsigned BSIM4v6wbigbaccGiven :1; unsigned BSIM4v6wcigbaccGiven :1; unsigned BSIM4v6waigbinvGiven :1; unsigned BSIM4v6wbigbinvGiven :1; unsigned BSIM4v6wcigbinvGiven :1; unsigned BSIM4v6wnigcGiven :1; unsigned BSIM4v6wnigbinvGiven :1; unsigned BSIM4v6wnigbaccGiven :1; unsigned BSIM4v6wntoxGiven :1; unsigned BSIM4v6weigbinvGiven :1; unsigned BSIM4v6wpigcdGiven :1; unsigned BSIM4v6wpoxedgeGiven :1; unsigned BSIM4v6wxrcrg1Given :1; unsigned BSIM4v6wxrcrg2Given :1; unsigned BSIM4v6wlambdaGiven :1; unsigned BSIM4v6wvtlGiven :1; unsigned BSIM4v6wxnGiven :1; unsigned BSIM4v6wvfbsdoffGiven :1; unsigned BSIM4v6wtvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v6wcgslGiven :1; unsigned BSIM4v6wcgdlGiven :1; unsigned BSIM4v6wckappasGiven :1; unsigned BSIM4v6wckappadGiven :1; unsigned BSIM4v6wcfGiven :1; unsigned BSIM4v6wclcGiven :1; unsigned BSIM4v6wcleGiven :1; unsigned BSIM4v6wvfbcvGiven :1; unsigned BSIM4v6wnoffGiven :1; unsigned BSIM4v6wvoffcvGiven :1; unsigned BSIM4v6wacdeGiven :1; unsigned BSIM4v6wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM4v6pcdscGiven :1; unsigned BSIM4v6pcdscbGiven :1; unsigned BSIM4v6pcdscdGiven :1; unsigned BSIM4v6pcitGiven :1; unsigned BSIM4v6pnfactorGiven :1; unsigned BSIM4v6pxjGiven :1; unsigned BSIM4v6pvsatGiven :1; unsigned BSIM4v6patGiven :1; unsigned BSIM4v6pa0Given :1; unsigned BSIM4v6pagsGiven :1; unsigned BSIM4v6pa1Given :1; unsigned BSIM4v6pa2Given :1; unsigned BSIM4v6pketaGiven :1; unsigned BSIM4v6pnsubGiven :1; unsigned BSIM4v6pndepGiven :1; unsigned BSIM4v6pnsdGiven :1; unsigned BSIM4v6pphinGiven :1; unsigned BSIM4v6pngateGiven :1; unsigned BSIM4v6pgamma1Given :1; unsigned BSIM4v6pgamma2Given :1; unsigned BSIM4v6pvbxGiven :1; unsigned BSIM4v6pvbmGiven :1; unsigned BSIM4v6pxtGiven :1; unsigned BSIM4v6pk1Given :1; unsigned BSIM4v6pkt1Given :1; unsigned BSIM4v6pkt1lGiven :1; unsigned BSIM4v6pkt2Given :1; unsigned BSIM4v6pk2Given :1; unsigned BSIM4v6pk3Given :1; unsigned BSIM4v6pk3bGiven :1; unsigned BSIM4v6pw0Given :1; unsigned BSIM4v6pdvtp0Given :1; unsigned BSIM4v6pdvtp1Given :1; unsigned BSIM4v6plpe0Given :1; unsigned BSIM4v6plpebGiven :1; unsigned BSIM4v6pdvt0Given :1; unsigned BSIM4v6pdvt1Given :1; unsigned BSIM4v6pdvt2Given :1; unsigned BSIM4v6pdvt0wGiven :1; unsigned BSIM4v6pdvt1wGiven :1; unsigned BSIM4v6pdvt2wGiven :1; unsigned BSIM4v6pdroutGiven :1; unsigned BSIM4v6pdsubGiven :1; unsigned BSIM4v6pvth0Given :1; unsigned BSIM4v6puaGiven :1; unsigned BSIM4v6pua1Given :1; unsigned BSIM4v6pubGiven :1; unsigned BSIM4v6pub1Given :1; unsigned BSIM4v6pucGiven :1; unsigned BSIM4v6puc1Given :1; unsigned BSIM4v6pudGiven :1; unsigned BSIM4v6pud1Given :1; unsigned BSIM4v6pupGiven :1; unsigned BSIM4v6plpGiven :1; unsigned BSIM4v6pu0Given :1; unsigned BSIM4v6peuGiven :1; unsigned BSIM4v6pucsGiven :1; unsigned BSIM4v6puteGiven :1; unsigned BSIM4v6pucsteGiven :1; unsigned BSIM4v6pvoffGiven :1; unsigned BSIM4v6ptvoffGiven :1; unsigned BSIM4v6pminvGiven :1; unsigned BSIM4v6pminvcvGiven :1; unsigned BSIM4v6prdswGiven :1; unsigned BSIM4v6prswGiven :1; unsigned BSIM4v6prdwGiven :1; unsigned BSIM4v6pprwgGiven :1; unsigned BSIM4v6pprwbGiven :1; unsigned BSIM4v6pprtGiven :1; unsigned BSIM4v6peta0Given :1; unsigned BSIM4v6petabGiven :1; unsigned BSIM4v6ppclmGiven :1; unsigned BSIM4v6ppdibl1Given :1; unsigned BSIM4v6ppdibl2Given :1; unsigned BSIM4v6ppdiblbGiven :1; unsigned BSIM4v6pfproutGiven :1; unsigned BSIM4v6ppditsGiven :1; unsigned BSIM4v6ppditsdGiven :1; unsigned BSIM4v6ppscbe1Given :1; unsigned BSIM4v6ppscbe2Given :1; unsigned BSIM4v6ppvagGiven :1; unsigned BSIM4v6pdeltaGiven :1; unsigned BSIM4v6pwrGiven :1; unsigned BSIM4v6pdwgGiven :1; unsigned BSIM4v6pdwbGiven :1; unsigned BSIM4v6pb0Given :1; unsigned BSIM4v6pb1Given :1; unsigned BSIM4v6palpha0Given :1; unsigned BSIM4v6palpha1Given :1; unsigned BSIM4v6pbeta0Given :1; unsigned BSIM4v6pvfbGiven :1; unsigned BSIM4v6pagidlGiven :1; unsigned BSIM4v6pbgidlGiven :1; unsigned BSIM4v6pcgidlGiven :1; unsigned BSIM4v6pegidlGiven :1; unsigned BSIM4v6pagislGiven :1; unsigned BSIM4v6pbgislGiven :1; unsigned BSIM4v6pcgislGiven :1; unsigned BSIM4v6pegislGiven :1; unsigned BSIM4v6paigcGiven :1; unsigned BSIM4v6pbigcGiven :1; unsigned BSIM4v6pcigcGiven :1; unsigned BSIM4v6paigsdGiven :1; unsigned BSIM4v6pbigsdGiven :1; unsigned BSIM4v6pcigsdGiven :1; unsigned BSIM4v6paigsGiven :1; unsigned BSIM4v6pbigsGiven :1; unsigned BSIM4v6pcigsGiven :1; unsigned BSIM4v6paigdGiven :1; unsigned BSIM4v6pbigdGiven :1; unsigned BSIM4v6pcigdGiven :1; unsigned BSIM4v6paigbaccGiven :1; unsigned BSIM4v6pbigbaccGiven :1; unsigned BSIM4v6pcigbaccGiven :1; unsigned BSIM4v6paigbinvGiven :1; unsigned BSIM4v6pbigbinvGiven :1; unsigned BSIM4v6pcigbinvGiven :1; unsigned BSIM4v6pnigcGiven :1; unsigned BSIM4v6pnigbinvGiven :1; unsigned BSIM4v6pnigbaccGiven :1; unsigned BSIM4v6pntoxGiven :1; unsigned BSIM4v6peigbinvGiven :1; unsigned BSIM4v6ppigcdGiven :1; unsigned BSIM4v6ppoxedgeGiven :1; unsigned BSIM4v6pxrcrg1Given :1; unsigned BSIM4v6pxrcrg2Given :1; unsigned BSIM4v6plambdaGiven :1; unsigned BSIM4v6pvtlGiven :1; unsigned BSIM4v6pxnGiven :1; unsigned BSIM4v6pvfbsdoffGiven :1; unsigned BSIM4v6ptvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v6pcgslGiven :1; unsigned BSIM4v6pcgdlGiven :1; unsigned BSIM4v6pckappasGiven :1; unsigned BSIM4v6pckappadGiven :1; unsigned BSIM4v6pcfGiven :1; unsigned BSIM4v6pclcGiven :1; unsigned BSIM4v6pcleGiven :1; unsigned BSIM4v6pvfbcvGiven :1; unsigned BSIM4v6pnoffGiven :1; unsigned BSIM4v6pvoffcvGiven :1; unsigned BSIM4v6pacdeGiven :1; unsigned BSIM4v6pmoinGiven :1; unsigned BSIM4v6useFringeGiven :1; unsigned BSIM4v6tnomGiven :1; unsigned BSIM4v6cgsoGiven :1; unsigned BSIM4v6cgdoGiven :1; unsigned BSIM4v6cgboGiven :1; unsigned BSIM4v6xpartGiven :1; unsigned BSIM4v6sheetResistanceGiven :1; unsigned BSIM4v6SjctSatCurDensityGiven :1; unsigned BSIM4v6SjctSidewallSatCurDensityGiven :1; unsigned BSIM4v6SjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v6SbulkJctPotentialGiven :1; unsigned BSIM4v6SbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v6SsidewallJctPotentialGiven :1; unsigned BSIM4v6SGatesidewallJctPotentialGiven :1; unsigned BSIM4v6SbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v6SunitAreaJctCapGiven :1; unsigned BSIM4v6SunitLengthSidewallJctCapGiven :1; unsigned BSIM4v6SbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v6SunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v6SjctEmissionCoeffGiven :1; unsigned BSIM4v6SjctTempExponentGiven :1; unsigned BSIM4v6DjctSatCurDensityGiven :1; unsigned BSIM4v6DjctSidewallSatCurDensityGiven :1; unsigned BSIM4v6DjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v6DbulkJctPotentialGiven :1; unsigned BSIM4v6DbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v6DsidewallJctPotentialGiven :1; unsigned BSIM4v6DGatesidewallJctPotentialGiven :1; unsigned BSIM4v6DbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v6DunitAreaJctCapGiven :1; unsigned BSIM4v6DunitLengthSidewallJctCapGiven :1; unsigned BSIM4v6DbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v6DunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v6DjctEmissionCoeffGiven :1; unsigned BSIM4v6DjctTempExponentGiven :1; unsigned BSIM4v6oxideTrapDensityAGiven :1; unsigned BSIM4v6oxideTrapDensityBGiven :1; unsigned BSIM4v6oxideTrapDensityCGiven :1; unsigned BSIM4v6emGiven :1; unsigned BSIM4v6efGiven :1; unsigned BSIM4v6afGiven :1; unsigned BSIM4v6kfGiven :1; unsigned BSIM4v6vgsMaxGiven :1; unsigned BSIM4v6vgdMaxGiven :1; unsigned BSIM4v6vgbMaxGiven :1; unsigned BSIM4v6vdsMaxGiven :1; unsigned BSIM4v6vbsMaxGiven :1; unsigned BSIM4v6vbdMaxGiven :1; unsigned BSIM4v6LintGiven :1; unsigned BSIM4v6LlGiven :1; unsigned BSIM4v6LlcGiven :1; unsigned BSIM4v6LlnGiven :1; unsigned BSIM4v6LwGiven :1; unsigned BSIM4v6LwcGiven :1; unsigned BSIM4v6LwnGiven :1; unsigned BSIM4v6LwlGiven :1; unsigned BSIM4v6LwlcGiven :1; unsigned BSIM4v6LminGiven :1; unsigned BSIM4v6LmaxGiven :1; unsigned BSIM4v6WintGiven :1; unsigned BSIM4v6WlGiven :1; unsigned BSIM4v6WlcGiven :1; unsigned BSIM4v6WlnGiven :1; unsigned BSIM4v6WwGiven :1; unsigned BSIM4v6WwcGiven :1; unsigned BSIM4v6WwnGiven :1; unsigned BSIM4v6WwlGiven :1; unsigned BSIM4v6WwlcGiven :1; unsigned BSIM4v6WminGiven :1; unsigned BSIM4v6WmaxGiven :1; /* added for stress effect */ unsigned BSIM4v6sarefGiven :1; unsigned BSIM4v6sbrefGiven :1; unsigned BSIM4v6wlodGiven :1; unsigned BSIM4v6ku0Given :1; unsigned BSIM4v6kvsatGiven :1; unsigned BSIM4v6kvth0Given :1; unsigned BSIM4v6tku0Given :1; unsigned BSIM4v6llodku0Given :1; unsigned BSIM4v6wlodku0Given :1; unsigned BSIM4v6llodvthGiven :1; unsigned BSIM4v6wlodvthGiven :1; unsigned BSIM4v6lku0Given :1; unsigned BSIM4v6wku0Given :1; unsigned BSIM4v6pku0Given :1; unsigned BSIM4v6lkvth0Given :1; unsigned BSIM4v6wkvth0Given :1; unsigned BSIM4v6pkvth0Given :1; unsigned BSIM4v6stk2Given :1; unsigned BSIM4v6lodk2Given :1; unsigned BSIM4v6steta0Given :1; unsigned BSIM4v6lodeta0Given :1; unsigned BSIM4v6webGiven :1; unsigned BSIM4v6wecGiven :1; unsigned BSIM4v6kvth0weGiven :1; unsigned BSIM4v6k2weGiven :1; unsigned BSIM4v6ku0weGiven :1; unsigned BSIM4v6screfGiven :1; unsigned BSIM4v6wpemodGiven :1; unsigned BSIM4v6lkvth0weGiven :1; unsigned BSIM4v6lk2weGiven :1; unsigned BSIM4v6lku0weGiven :1; unsigned BSIM4v6wkvth0weGiven :1; unsigned BSIM4v6wk2weGiven :1; unsigned BSIM4v6wku0weGiven :1; unsigned BSIM4v6pkvth0weGiven :1; unsigned BSIM4v6pk2weGiven :1; unsigned BSIM4v6pku0weGiven :1; } BSIM4v6model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* Instance parameters */ #define BSIM4v6_W 1 #define BSIM4v6_L 2 #define BSIM4v6_AS 3 #define BSIM4v6_AD 4 #define BSIM4v6_PS 5 #define BSIM4v6_PD 6 #define BSIM4v6_NRS 7 #define BSIM4v6_NRD 8 #define BSIM4v6_OFF 9 #define BSIM4v6_IC 10 #define BSIM4v6_IC_VDS 11 #define BSIM4v6_IC_VGS 12 #define BSIM4v6_IC_VBS 13 #define BSIM4v6_TRNQSMOD 14 #define BSIM4v6_RBODYMOD 15 #define BSIM4v6_RGATEMOD 16 #define BSIM4v6_GEOMOD 17 #define BSIM4v6_RGEOMOD 18 #define BSIM4v6_NF 19 #define BSIM4v6_MIN 20 #define BSIM4v6_ACNQSMOD 22 #define BSIM4v6_RBDB 23 #define BSIM4v6_RBSB 24 #define BSIM4v6_RBPB 25 #define BSIM4v6_RBPS 26 #define BSIM4v6_RBPD 27 #define BSIM4v6_SA 28 #define BSIM4v6_SB 29 #define BSIM4v6_SD 30 #define BSIM4v6_DELVTO 31 #define BSIM4v6_XGW 32 #define BSIM4v6_NGCON 33 #define BSIM4v6_SCA 34 #define BSIM4v6_SCB 35 #define BSIM4v6_SCC 36 #define BSIM4v6_SC 37 #define BSIM4v6_M 38 /* Global parameters */ #define BSIM4v6_MOD_TEMPEOT 65 #define BSIM4v6_MOD_LEFFEOT 66 #define BSIM4v6_MOD_WEFFEOT 67 #define BSIM4v6_MOD_UCSTE 68 #define BSIM4v6_MOD_LUCSTE 69 #define BSIM4v6_MOD_WUCSTE 70 #define BSIM4v6_MOD_PUCSTE 71 #define BSIM4v6_MOD_UCS 72 #define BSIM4v6_MOD_LUCS 73 #define BSIM4v6_MOD_WUCS 74 #define BSIM4v6_MOD_PUCS 75 #define BSIM4v6_MOD_CVCHARGEMOD 76 #define BSIM4v6_MOD_ADOS 77 #define BSIM4v6_MOD_BDOS 78 #define BSIM4v6_MOD_TEMPMOD 79 #define BSIM4v6_MOD_MTRLMOD 80 #define BSIM4v6_MOD_IGCMOD 81 #define BSIM4v6_MOD_IGBMOD 82 #define BSIM4v6_MOD_ACNQSMOD 83 #define BSIM4v6_MOD_FNOIMOD 84 #define BSIM4v6_MOD_RDSMOD 85 #define BSIM4v6_MOD_DIOMOD 86 #define BSIM4v6_MOD_PERMOD 87 #define BSIM4v6_MOD_GEOMOD 88 #define BSIM4v6_MOD_RGEOMOD 89 #define BSIM4v6_MOD_RGATEMOD 90 #define BSIM4v6_MOD_RBODYMOD 91 #define BSIM4v6_MOD_CAPMOD 92 #define BSIM4v6_MOD_TRNQSMOD 93 #define BSIM4v6_MOD_MOBMOD 94 #define BSIM4v6_MOD_TNOIMOD 95 #define BSIM4v6_MOD_EOT 96 #define BSIM4v6_MOD_VDDEOT 97 #define BSIM4v6_MOD_TOXE 98 #define BSIM4v6_MOD_CDSC 99 #define BSIM4v6_MOD_CDSCB 100 #define BSIM4v6_MOD_CIT 101 #define BSIM4v6_MOD_NFACTOR 102 #define BSIM4v6_MOD_XJ 103 #define BSIM4v6_MOD_VSAT 104 #define BSIM4v6_MOD_AT 105 #define BSIM4v6_MOD_A0 106 #define BSIM4v6_MOD_A1 107 #define BSIM4v6_MOD_A2 108 #define BSIM4v6_MOD_KETA 109 #define BSIM4v6_MOD_NSUB 110 #define BSIM4v6_MOD_PHIG 111 #define BSIM4v6_MOD_EPSRGATE 112 #define BSIM4v6_MOD_EASUB 113 #define BSIM4v6_MOD_EPSRSUB 114 #define BSIM4v6_MOD_NI0SUB 115 #define BSIM4v6_MOD_BG0SUB 116 #define BSIM4v6_MOD_TBGASUB 117 #define BSIM4v6_MOD_TBGBSUB 118 #define BSIM4v6_MOD_NDEP 119 #define BSIM4v6_MOD_NGATE 120 #define BSIM4v6_MOD_GAMMA1 121 #define BSIM4v6_MOD_GAMMA2 122 #define BSIM4v6_MOD_VBX 123 #define BSIM4v6_MOD_BINUNIT 124 #define BSIM4v6_MOD_VBM 125 #define BSIM4v6_MOD_XT 126 #define BSIM4v6_MOD_K1 129 #define BSIM4v6_MOD_KT1 130 #define BSIM4v6_MOD_KT1L 131 #define BSIM4v6_MOD_K2 132 #define BSIM4v6_MOD_KT2 133 #define BSIM4v6_MOD_K3 134 #define BSIM4v6_MOD_K3B 135 #define BSIM4v6_MOD_W0 136 #define BSIM4v6_MOD_LPE0 137 #define BSIM4v6_MOD_DVT0 138 #define BSIM4v6_MOD_DVT1 139 #define BSIM4v6_MOD_DVT2 140 #define BSIM4v6_MOD_DVT0W 141 #define BSIM4v6_MOD_DVT1W 142 #define BSIM4v6_MOD_DVT2W 143 #define BSIM4v6_MOD_DROUT 144 #define BSIM4v6_MOD_DSUB 145 #define BSIM4v6_MOD_VTH0 146 #define BSIM4v6_MOD_UA 147 #define BSIM4v6_MOD_UA1 148 #define BSIM4v6_MOD_UB 149 #define BSIM4v6_MOD_UB1 150 #define BSIM4v6_MOD_UC 151 #define BSIM4v6_MOD_UC1 152 #define BSIM4v6_MOD_U0 153 #define BSIM4v6_MOD_UTE 154 #define BSIM4v6_MOD_VOFF 155 #define BSIM4v6_MOD_DELTA 156 #define BSIM4v6_MOD_RDSW 157 #define BSIM4v6_MOD_PRT 158 #define BSIM4v6_MOD_LDD 159 #define BSIM4v6_MOD_ETA 160 #define BSIM4v6_MOD_ETA0 161 #define BSIM4v6_MOD_ETAB 162 #define BSIM4v6_MOD_PCLM 163 #define BSIM4v6_MOD_PDIBL1 164 #define BSIM4v6_MOD_PDIBL2 165 #define BSIM4v6_MOD_PSCBE1 166 #define BSIM4v6_MOD_PSCBE2 167 #define BSIM4v6_MOD_PVAG 168 #define BSIM4v6_MOD_WR 169 #define BSIM4v6_MOD_DWG 170 #define BSIM4v6_MOD_DWB 171 #define BSIM4v6_MOD_B0 172 #define BSIM4v6_MOD_B1 173 #define BSIM4v6_MOD_ALPHA0 174 #define BSIM4v6_MOD_BETA0 175 #define BSIM4v6_MOD_PDIBLB 178 #define BSIM4v6_MOD_PRWG 179 #define BSIM4v6_MOD_PRWB 180 #define BSIM4v6_MOD_CDSCD 181 #define BSIM4v6_MOD_AGS 182 #define BSIM4v6_MOD_FRINGE 184 #define BSIM4v6_MOD_CGSL 186 #define BSIM4v6_MOD_CGDL 187 #define BSIM4v6_MOD_CKAPPAS 188 #define BSIM4v6_MOD_CF 189 #define BSIM4v6_MOD_CLC 190 #define BSIM4v6_MOD_CLE 191 #define BSIM4v6_MOD_PARAMCHK 192 #define BSIM4v6_MOD_VERSION 193 #define BSIM4v6_MOD_VFBCV 194 #define BSIM4v6_MOD_ACDE 195 #define BSIM4v6_MOD_MOIN 196 #define BSIM4v6_MOD_NOFF 197 #define BSIM4v6_MOD_IJTHDFWD 198 #define BSIM4v6_MOD_ALPHA1 199 #define BSIM4v6_MOD_VFB 200 #define BSIM4v6_MOD_TOXM 201 #define BSIM4v6_MOD_TCJ 202 #define BSIM4v6_MOD_TCJSW 203 #define BSIM4v6_MOD_TCJSWG 204 #define BSIM4v6_MOD_TPB 205 #define BSIM4v6_MOD_TPBSW 206 #define BSIM4v6_MOD_TPBSWG 207 #define BSIM4v6_MOD_VOFFCV 208 #define BSIM4v6_MOD_GBMIN 209 #define BSIM4v6_MOD_RBDB 210 #define BSIM4v6_MOD_RBSB 211 #define BSIM4v6_MOD_RBPB 212 #define BSIM4v6_MOD_RBPS 213 #define BSIM4v6_MOD_RBPD 214 #define BSIM4v6_MOD_DMCG 215 #define BSIM4v6_MOD_DMCI 216 #define BSIM4v6_MOD_DMDG 217 #define BSIM4v6_MOD_XGW 218 #define BSIM4v6_MOD_XGL 219 #define BSIM4v6_MOD_RSHG 220 #define BSIM4v6_MOD_NGCON 221 #define BSIM4v6_MOD_AGIDL 222 #define BSIM4v6_MOD_BGIDL 223 #define BSIM4v6_MOD_EGIDL 224 #define BSIM4v6_MOD_IJTHSFWD 225 #define BSIM4v6_MOD_XJBVD 226 #define BSIM4v6_MOD_XJBVS 227 #define BSIM4v6_MOD_BVD 228 #define BSIM4v6_MOD_BVS 229 #define BSIM4v6_MOD_TOXP 230 #define BSIM4v6_MOD_DTOX 231 #define BSIM4v6_MOD_XRCRG1 232 #define BSIM4v6_MOD_XRCRG2 233 #define BSIM4v6_MOD_EU 234 #define BSIM4v6_MOD_IJTHSREV 235 #define BSIM4v6_MOD_IJTHDREV 236 #define BSIM4v6_MOD_MINV 237 #define BSIM4v6_MOD_VOFFL 238 #define BSIM4v6_MOD_PDITS 239 #define BSIM4v6_MOD_PDITSD 240 #define BSIM4v6_MOD_PDITSL 241 #define BSIM4v6_MOD_TNOIA 242 #define BSIM4v6_MOD_TNOIB 243 #define BSIM4v6_MOD_NTNOI 244 #define BSIM4v6_MOD_FPROUT 245 #define BSIM4v6_MOD_LPEB 246 #define BSIM4v6_MOD_DVTP0 247 #define BSIM4v6_MOD_DVTP1 248 #define BSIM4v6_MOD_CGIDL 249 #define BSIM4v6_MOD_PHIN 250 #define BSIM4v6_MOD_RDSWMIN 251 #define BSIM4v6_MOD_RSW 252 #define BSIM4v6_MOD_RDW 253 #define BSIM4v6_MOD_RDWMIN 254 #define BSIM4v6_MOD_RSWMIN 255 #define BSIM4v6_MOD_NSD 256 #define BSIM4v6_MOD_CKAPPAD 257 #define BSIM4v6_MOD_DMCGT 258 #define BSIM4v6_MOD_AIGC 259 #define BSIM4v6_MOD_BIGC 260 #define BSIM4v6_MOD_CIGC 261 #define BSIM4v6_MOD_AIGBACC 262 #define BSIM4v6_MOD_BIGBACC 263 #define BSIM4v6_MOD_CIGBACC 264 #define BSIM4v6_MOD_AIGBINV 265 #define BSIM4v6_MOD_BIGBINV 266 #define BSIM4v6_MOD_CIGBINV 267 #define BSIM4v6_MOD_NIGC 268 #define BSIM4v6_MOD_NIGBACC 269 #define BSIM4v6_MOD_NIGBINV 270 #define BSIM4v6_MOD_NTOX 271 #define BSIM4v6_MOD_TOXREF 272 #define BSIM4v6_MOD_EIGBINV 273 #define BSIM4v6_MOD_PIGCD 274 #define BSIM4v6_MOD_POXEDGE 275 #define BSIM4v6_MOD_EPSROX 276 #define BSIM4v6_MOD_AIGSD 277 #define BSIM4v6_MOD_BIGSD 278 #define BSIM4v6_MOD_CIGSD 279 #define BSIM4v6_MOD_JSWGS 280 #define BSIM4v6_MOD_JSWGD 281 #define BSIM4v6_MOD_LAMBDA 282 #define BSIM4v6_MOD_VTL 283 #define BSIM4v6_MOD_LC 284 #define BSIM4v6_MOD_XN 285 #define BSIM4v6_MOD_RNOIA 286 #define BSIM4v6_MOD_RNOIB 287 #define BSIM4v6_MOD_VFBSDOFF 288 #define BSIM4v6_MOD_LINTNOI 289 #define BSIM4v6_MOD_UD 290 #define BSIM4v6_MOD_UD1 291 #define BSIM4v6_MOD_UP 292 #define BSIM4v6_MOD_LP 293 #define BSIM4v6_MOD_TVOFF 294 #define BSIM4v6_MOD_TVFBSDOFF 295 #define BSIM4v6_MOD_MINVCV 296 #define BSIM4v6_MOD_VOFFCVL 297 /* Length dependence */ #define BSIM4v6_MOD_LCDSC 301 #define BSIM4v6_MOD_LCDSCB 302 #define BSIM4v6_MOD_LCIT 303 #define BSIM4v6_MOD_LNFACTOR 304 #define BSIM4v6_MOD_LXJ 305 #define BSIM4v6_MOD_LVSAT 306 #define BSIM4v6_MOD_LAT 307 #define BSIM4v6_MOD_LA0 308 #define BSIM4v6_MOD_LA1 309 #define BSIM4v6_MOD_LA2 310 #define BSIM4v6_MOD_LKETA 311 #define BSIM4v6_MOD_LNSUB 312 #define BSIM4v6_MOD_LNDEP 313 #define BSIM4v6_MOD_LNGATE 315 #define BSIM4v6_MOD_LGAMMA1 316 #define BSIM4v6_MOD_LGAMMA2 317 #define BSIM4v6_MOD_LVBX 318 #define BSIM4v6_MOD_LVBM 320 #define BSIM4v6_MOD_LXT 322 #define BSIM4v6_MOD_LK1 325 #define BSIM4v6_MOD_LKT1 326 #define BSIM4v6_MOD_LKT1L 327 #define BSIM4v6_MOD_LK2 328 #define BSIM4v6_MOD_LKT2 329 #define BSIM4v6_MOD_LK3 330 #define BSIM4v6_MOD_LK3B 331 #define BSIM4v6_MOD_LW0 332 #define BSIM4v6_MOD_LLPE0 333 #define BSIM4v6_MOD_LDVT0 334 #define BSIM4v6_MOD_LDVT1 335 #define BSIM4v6_MOD_LDVT2 336 #define BSIM4v6_MOD_LDVT0W 337 #define BSIM4v6_MOD_LDVT1W 338 #define BSIM4v6_MOD_LDVT2W 339 #define BSIM4v6_MOD_LDROUT 340 #define BSIM4v6_MOD_LDSUB 341 #define BSIM4v6_MOD_LVTH0 342 #define BSIM4v6_MOD_LUA 343 #define BSIM4v6_MOD_LUA1 344 #define BSIM4v6_MOD_LUB 345 #define BSIM4v6_MOD_LUB1 346 #define BSIM4v6_MOD_LUC 347 #define BSIM4v6_MOD_LUC1 348 #define BSIM4v6_MOD_LU0 349 #define BSIM4v6_MOD_LUTE 350 #define BSIM4v6_MOD_LVOFF 351 #define BSIM4v6_MOD_LDELTA 352 #define BSIM4v6_MOD_LRDSW 353 #define BSIM4v6_MOD_LPRT 354 #define BSIM4v6_MOD_LLDD 355 #define BSIM4v6_MOD_LETA 356 #define BSIM4v6_MOD_LETA0 357 #define BSIM4v6_MOD_LETAB 358 #define BSIM4v6_MOD_LPCLM 359 #define BSIM4v6_MOD_LPDIBL1 360 #define BSIM4v6_MOD_LPDIBL2 361 #define BSIM4v6_MOD_LPSCBE1 362 #define BSIM4v6_MOD_LPSCBE2 363 #define BSIM4v6_MOD_LPVAG 364 #define BSIM4v6_MOD_LWR 365 #define BSIM4v6_MOD_LDWG 366 #define BSIM4v6_MOD_LDWB 367 #define BSIM4v6_MOD_LB0 368 #define BSIM4v6_MOD_LB1 369 #define BSIM4v6_MOD_LALPHA0 370 #define BSIM4v6_MOD_LBETA0 371 #define BSIM4v6_MOD_LPDIBLB 374 #define BSIM4v6_MOD_LPRWG 375 #define BSIM4v6_MOD_LPRWB 376 #define BSIM4v6_MOD_LCDSCD 377 #define BSIM4v6_MOD_LAGS 378 #define BSIM4v6_MOD_LFRINGE 381 #define BSIM4v6_MOD_LCGSL 383 #define BSIM4v6_MOD_LCGDL 384 #define BSIM4v6_MOD_LCKAPPAS 385 #define BSIM4v6_MOD_LCF 386 #define BSIM4v6_MOD_LCLC 387 #define BSIM4v6_MOD_LCLE 388 #define BSIM4v6_MOD_LVFBCV 389 #define BSIM4v6_MOD_LACDE 390 #define BSIM4v6_MOD_LMOIN 391 #define BSIM4v6_MOD_LNOFF 392 #define BSIM4v6_MOD_LALPHA1 394 #define BSIM4v6_MOD_LVFB 395 #define BSIM4v6_MOD_LVOFFCV 396 #define BSIM4v6_MOD_LAGIDL 397 #define BSIM4v6_MOD_LBGIDL 398 #define BSIM4v6_MOD_LEGIDL 399 #define BSIM4v6_MOD_LXRCRG1 400 #define BSIM4v6_MOD_LXRCRG2 401 #define BSIM4v6_MOD_LEU 402 #define BSIM4v6_MOD_LMINV 403 #define BSIM4v6_MOD_LPDITS 404 #define BSIM4v6_MOD_LPDITSD 405 #define BSIM4v6_MOD_LFPROUT 406 #define BSIM4v6_MOD_LLPEB 407 #define BSIM4v6_MOD_LDVTP0 408 #define BSIM4v6_MOD_LDVTP1 409 #define BSIM4v6_MOD_LCGIDL 410 #define BSIM4v6_MOD_LPHIN 411 #define BSIM4v6_MOD_LRSW 412 #define BSIM4v6_MOD_LRDW 413 #define BSIM4v6_MOD_LNSD 414 #define BSIM4v6_MOD_LCKAPPAD 415 #define BSIM4v6_MOD_LAIGC 416 #define BSIM4v6_MOD_LBIGC 417 #define BSIM4v6_MOD_LCIGC 418 #define BSIM4v6_MOD_LAIGBACC 419 #define BSIM4v6_MOD_LBIGBACC 420 #define BSIM4v6_MOD_LCIGBACC 421 #define BSIM4v6_MOD_LAIGBINV 422 #define BSIM4v6_MOD_LBIGBINV 423 #define BSIM4v6_MOD_LCIGBINV 424 #define BSIM4v6_MOD_LNIGC 425 #define BSIM4v6_MOD_LNIGBACC 426 #define BSIM4v6_MOD_LNIGBINV 427 #define BSIM4v6_MOD_LNTOX 428 #define BSIM4v6_MOD_LEIGBINV 429 #define BSIM4v6_MOD_LPIGCD 430 #define BSIM4v6_MOD_LPOXEDGE 431 #define BSIM4v6_MOD_LAIGSD 432 #define BSIM4v6_MOD_LBIGSD 433 #define BSIM4v6_MOD_LCIGSD 434 #define BSIM4v6_MOD_LLAMBDA 435 #define BSIM4v6_MOD_LVTL 436 #define BSIM4v6_MOD_LXN 437 #define BSIM4v6_MOD_LVFBSDOFF 438 #define BSIM4v6_MOD_LUD 439 #define BSIM4v6_MOD_LUD1 440 #define BSIM4v6_MOD_LUP 441 #define BSIM4v6_MOD_LLP 442 #define BSIM4v6_MOD_LMINVCV 443 /* Width dependence */ #define BSIM4v6_MOD_WCDSC 481 #define BSIM4v6_MOD_WCDSCB 482 #define BSIM4v6_MOD_WCIT 483 #define BSIM4v6_MOD_WNFACTOR 484 #define BSIM4v6_MOD_WXJ 485 #define BSIM4v6_MOD_WVSAT 486 #define BSIM4v6_MOD_WAT 487 #define BSIM4v6_MOD_WA0 488 #define BSIM4v6_MOD_WA1 489 #define BSIM4v6_MOD_WA2 490 #define BSIM4v6_MOD_WKETA 491 #define BSIM4v6_MOD_WNSUB 492 #define BSIM4v6_MOD_WNDEP 493 #define BSIM4v6_MOD_WNGATE 495 #define BSIM4v6_MOD_WGAMMA1 496 #define BSIM4v6_MOD_WGAMMA2 497 #define BSIM4v6_MOD_WVBX 498 #define BSIM4v6_MOD_WVBM 500 #define BSIM4v6_MOD_WXT 502 #define BSIM4v6_MOD_WK1 505 #define BSIM4v6_MOD_WKT1 506 #define BSIM4v6_MOD_WKT1L 507 #define BSIM4v6_MOD_WK2 508 #define BSIM4v6_MOD_WKT2 509 #define BSIM4v6_MOD_WK3 510 #define BSIM4v6_MOD_WK3B 511 #define BSIM4v6_MOD_WW0 512 #define BSIM4v6_MOD_WLPE0 513 #define BSIM4v6_MOD_WDVT0 514 #define BSIM4v6_MOD_WDVT1 515 #define BSIM4v6_MOD_WDVT2 516 #define BSIM4v6_MOD_WDVT0W 517 #define BSIM4v6_MOD_WDVT1W 518 #define BSIM4v6_MOD_WDVT2W 519 #define BSIM4v6_MOD_WDROUT 520 #define BSIM4v6_MOD_WDSUB 521 #define BSIM4v6_MOD_WVTH0 522 #define BSIM4v6_MOD_WUA 523 #define BSIM4v6_MOD_WUA1 524 #define BSIM4v6_MOD_WUB 525 #define BSIM4v6_MOD_WUB1 526 #define BSIM4v6_MOD_WUC 527 #define BSIM4v6_MOD_WUC1 528 #define BSIM4v6_MOD_WU0 529 #define BSIM4v6_MOD_WUTE 530 #define BSIM4v6_MOD_WVOFF 531 #define BSIM4v6_MOD_WDELTA 532 #define BSIM4v6_MOD_WRDSW 533 #define BSIM4v6_MOD_WPRT 534 #define BSIM4v6_MOD_WLDD 535 #define BSIM4v6_MOD_WETA 536 #define BSIM4v6_MOD_WETA0 537 #define BSIM4v6_MOD_WETAB 538 #define BSIM4v6_MOD_WPCLM 539 #define BSIM4v6_MOD_WPDIBL1 540 #define BSIM4v6_MOD_WPDIBL2 541 #define BSIM4v6_MOD_WPSCBE1 542 #define BSIM4v6_MOD_WPSCBE2 543 #define BSIM4v6_MOD_WPVAG 544 #define BSIM4v6_MOD_WWR 545 #define BSIM4v6_MOD_WDWG 546 #define BSIM4v6_MOD_WDWB 547 #define BSIM4v6_MOD_WB0 548 #define BSIM4v6_MOD_WB1 549 #define BSIM4v6_MOD_WALPHA0 550 #define BSIM4v6_MOD_WBETA0 551 #define BSIM4v6_MOD_WPDIBLB 554 #define BSIM4v6_MOD_WPRWG 555 #define BSIM4v6_MOD_WPRWB 556 #define BSIM4v6_MOD_WCDSCD 557 #define BSIM4v6_MOD_WAGS 558 #define BSIM4v6_MOD_WFRINGE 561 #define BSIM4v6_MOD_WCGSL 563 #define BSIM4v6_MOD_WCGDL 564 #define BSIM4v6_MOD_WCKAPPAS 565 #define BSIM4v6_MOD_WCF 566 #define BSIM4v6_MOD_WCLC 567 #define BSIM4v6_MOD_WCLE 568 #define BSIM4v6_MOD_WVFBCV 569 #define BSIM4v6_MOD_WACDE 570 #define BSIM4v6_MOD_WMOIN 571 #define BSIM4v6_MOD_WNOFF 572 #define BSIM4v6_MOD_WALPHA1 574 #define BSIM4v6_MOD_WVFB 575 #define BSIM4v6_MOD_WVOFFCV 576 #define BSIM4v6_MOD_WAGIDL 577 #define BSIM4v6_MOD_WBGIDL 578 #define BSIM4v6_MOD_WEGIDL 579 #define BSIM4v6_MOD_WXRCRG1 580 #define BSIM4v6_MOD_WXRCRG2 581 #define BSIM4v6_MOD_WEU 582 #define BSIM4v6_MOD_WMINV 583 #define BSIM4v6_MOD_WPDITS 584 #define BSIM4v6_MOD_WPDITSD 585 #define BSIM4v6_MOD_WFPROUT 586 #define BSIM4v6_MOD_WLPEB 587 #define BSIM4v6_MOD_WDVTP0 588 #define BSIM4v6_MOD_WDVTP1 589 #define BSIM4v6_MOD_WCGIDL 590 #define BSIM4v6_MOD_WPHIN 591 #define BSIM4v6_MOD_WRSW 592 #define BSIM4v6_MOD_WRDW 593 #define BSIM4v6_MOD_WNSD 594 #define BSIM4v6_MOD_WCKAPPAD 595 #define BSIM4v6_MOD_WAIGC 596 #define BSIM4v6_MOD_WBIGC 597 #define BSIM4v6_MOD_WCIGC 598 #define BSIM4v6_MOD_WAIGBACC 599 #define BSIM4v6_MOD_WBIGBACC 600 #define BSIM4v6_MOD_WCIGBACC 601 #define BSIM4v6_MOD_WAIGBINV 602 #define BSIM4v6_MOD_WBIGBINV 603 #define BSIM4v6_MOD_WCIGBINV 604 #define BSIM4v6_MOD_WNIGC 605 #define BSIM4v6_MOD_WNIGBACC 606 #define BSIM4v6_MOD_WNIGBINV 607 #define BSIM4v6_MOD_WNTOX 608 #define BSIM4v6_MOD_WEIGBINV 609 #define BSIM4v6_MOD_WPIGCD 610 #define BSIM4v6_MOD_WPOXEDGE 611 #define BSIM4v6_MOD_WAIGSD 612 #define BSIM4v6_MOD_WBIGSD 613 #define BSIM4v6_MOD_WCIGSD 614 #define BSIM4v6_MOD_WLAMBDA 615 #define BSIM4v6_MOD_WVTL 616 #define BSIM4v6_MOD_WXN 617 #define BSIM4v6_MOD_WVFBSDOFF 618 #define BSIM4v6_MOD_WUD 619 #define BSIM4v6_MOD_WUD1 620 #define BSIM4v6_MOD_WUP 621 #define BSIM4v6_MOD_WLP 622 #define BSIM4v6_MOD_WMINVCV 623 /* Cross-term dependence */ #define BSIM4v6_MOD_PCDSC 661 #define BSIM4v6_MOD_PCDSCB 662 #define BSIM4v6_MOD_PCIT 663 #define BSIM4v6_MOD_PNFACTOR 664 #define BSIM4v6_MOD_PXJ 665 #define BSIM4v6_MOD_PVSAT 666 #define BSIM4v6_MOD_PAT 667 #define BSIM4v6_MOD_PA0 668 #define BSIM4v6_MOD_PA1 669 #define BSIM4v6_MOD_PA2 670 #define BSIM4v6_MOD_PKETA 671 #define BSIM4v6_MOD_PNSUB 672 #define BSIM4v6_MOD_PNDEP 673 #define BSIM4v6_MOD_PNGATE 675 #define BSIM4v6_MOD_PGAMMA1 676 #define BSIM4v6_MOD_PGAMMA2 677 #define BSIM4v6_MOD_PVBX 678 #define BSIM4v6_MOD_PVBM 680 #define BSIM4v6_MOD_PXT 682 #define BSIM4v6_MOD_PK1 685 #define BSIM4v6_MOD_PKT1 686 #define BSIM4v6_MOD_PKT1L 687 #define BSIM4v6_MOD_PK2 688 #define BSIM4v6_MOD_PKT2 689 #define BSIM4v6_MOD_PK3 690 #define BSIM4v6_MOD_PK3B 691 #define BSIM4v6_MOD_PW0 692 #define BSIM4v6_MOD_PLPE0 693 #define BSIM4v6_MOD_PDVT0 694 #define BSIM4v6_MOD_PDVT1 695 #define BSIM4v6_MOD_PDVT2 696 #define BSIM4v6_MOD_PDVT0W 697 #define BSIM4v6_MOD_PDVT1W 698 #define BSIM4v6_MOD_PDVT2W 699 #define BSIM4v6_MOD_PDROUT 700 #define BSIM4v6_MOD_PDSUB 701 #define BSIM4v6_MOD_PVTH0 702 #define BSIM4v6_MOD_PUA 703 #define BSIM4v6_MOD_PUA1 704 #define BSIM4v6_MOD_PUB 705 #define BSIM4v6_MOD_PUB1 706 #define BSIM4v6_MOD_PUC 707 #define BSIM4v6_MOD_PUC1 708 #define BSIM4v6_MOD_PU0 709 #define BSIM4v6_MOD_PUTE 710 #define BSIM4v6_MOD_PVOFF 711 #define BSIM4v6_MOD_PDELTA 712 #define BSIM4v6_MOD_PRDSW 713 #define BSIM4v6_MOD_PPRT 714 #define BSIM4v6_MOD_PLDD 715 #define BSIM4v6_MOD_PETA 716 #define BSIM4v6_MOD_PETA0 717 #define BSIM4v6_MOD_PETAB 718 #define BSIM4v6_MOD_PPCLM 719 #define BSIM4v6_MOD_PPDIBL1 720 #define BSIM4v6_MOD_PPDIBL2 721 #define BSIM4v6_MOD_PPSCBE1 722 #define BSIM4v6_MOD_PPSCBE2 723 #define BSIM4v6_MOD_PPVAG 724 #define BSIM4v6_MOD_PWR 725 #define BSIM4v6_MOD_PDWG 726 #define BSIM4v6_MOD_PDWB 727 #define BSIM4v6_MOD_PB0 728 #define BSIM4v6_MOD_PB1 729 #define BSIM4v6_MOD_PALPHA0 730 #define BSIM4v6_MOD_PBETA0 731 #define BSIM4v6_MOD_PPDIBLB 734 #define BSIM4v6_MOD_PPRWG 735 #define BSIM4v6_MOD_PPRWB 736 #define BSIM4v6_MOD_PCDSCD 737 #define BSIM4v6_MOD_PAGS 738 #define BSIM4v6_MOD_PFRINGE 741 #define BSIM4v6_MOD_PCGSL 743 #define BSIM4v6_MOD_PCGDL 744 #define BSIM4v6_MOD_PCKAPPAS 745 #define BSIM4v6_MOD_PCF 746 #define BSIM4v6_MOD_PCLC 747 #define BSIM4v6_MOD_PCLE 748 #define BSIM4v6_MOD_PVFBCV 749 #define BSIM4v6_MOD_PACDE 750 #define BSIM4v6_MOD_PMOIN 751 #define BSIM4v6_MOD_PNOFF 752 #define BSIM4v6_MOD_PALPHA1 754 #define BSIM4v6_MOD_PVFB 755 #define BSIM4v6_MOD_PVOFFCV 756 #define BSIM4v6_MOD_PAGIDL 757 #define BSIM4v6_MOD_PBGIDL 758 #define BSIM4v6_MOD_PEGIDL 759 #define BSIM4v6_MOD_PXRCRG1 760 #define BSIM4v6_MOD_PXRCRG2 761 #define BSIM4v6_MOD_PEU 762 #define BSIM4v6_MOD_PMINV 763 #define BSIM4v6_MOD_PPDITS 764 #define BSIM4v6_MOD_PPDITSD 765 #define BSIM4v6_MOD_PFPROUT 766 #define BSIM4v6_MOD_PLPEB 767 #define BSIM4v6_MOD_PDVTP0 768 #define BSIM4v6_MOD_PDVTP1 769 #define BSIM4v6_MOD_PCGIDL 770 #define BSIM4v6_MOD_PPHIN 771 #define BSIM4v6_MOD_PRSW 772 #define BSIM4v6_MOD_PRDW 773 #define BSIM4v6_MOD_PNSD 774 #define BSIM4v6_MOD_PCKAPPAD 775 #define BSIM4v6_MOD_PAIGC 776 #define BSIM4v6_MOD_PBIGC 777 #define BSIM4v6_MOD_PCIGC 778 #define BSIM4v6_MOD_PAIGBACC 779 #define BSIM4v6_MOD_PBIGBACC 780 #define BSIM4v6_MOD_PCIGBACC 781 #define BSIM4v6_MOD_PAIGBINV 782 #define BSIM4v6_MOD_PBIGBINV 783 #define BSIM4v6_MOD_PCIGBINV 784 #define BSIM4v6_MOD_PNIGC 785 #define BSIM4v6_MOD_PNIGBACC 786 #define BSIM4v6_MOD_PNIGBINV 787 #define BSIM4v6_MOD_PNTOX 788 #define BSIM4v6_MOD_PEIGBINV 789 #define BSIM4v6_MOD_PPIGCD 790 #define BSIM4v6_MOD_PPOXEDGE 791 #define BSIM4v6_MOD_PAIGSD 792 #define BSIM4v6_MOD_PBIGSD 793 #define BSIM4v6_MOD_PCIGSD 794 #define BSIM4v6_MOD_SAREF 795 #define BSIM4v6_MOD_SBREF 796 #define BSIM4v6_MOD_KU0 797 #define BSIM4v6_MOD_KVSAT 798 #define BSIM4v6_MOD_TKU0 799 #define BSIM4v6_MOD_LLODKU0 800 #define BSIM4v6_MOD_WLODKU0 801 #define BSIM4v6_MOD_LLODVTH 802 #define BSIM4v6_MOD_WLODVTH 803 #define BSIM4v6_MOD_LKU0 804 #define BSIM4v6_MOD_WKU0 805 #define BSIM4v6_MOD_PKU0 806 #define BSIM4v6_MOD_KVTH0 807 #define BSIM4v6_MOD_LKVTH0 808 #define BSIM4v6_MOD_WKVTH0 809 #define BSIM4v6_MOD_PKVTH0 810 #define BSIM4v6_MOD_WLOD 811 #define BSIM4v6_MOD_STK2 812 #define BSIM4v6_MOD_LODK2 813 #define BSIM4v6_MOD_STETA0 814 #define BSIM4v6_MOD_LODETA0 815 #define BSIM4v6_MOD_WEB 816 #define BSIM4v6_MOD_WEC 817 #define BSIM4v6_MOD_KVTH0WE 818 #define BSIM4v6_MOD_K2WE 819 #define BSIM4v6_MOD_KU0WE 820 #define BSIM4v6_MOD_SCREF 821 #define BSIM4v6_MOD_WPEMOD 822 #define BSIM4v6_MOD_PMINVCV 823 #define BSIM4v6_MOD_PLAMBDA 825 #define BSIM4v6_MOD_PVTL 826 #define BSIM4v6_MOD_PXN 827 #define BSIM4v6_MOD_PVFBSDOFF 828 #define BSIM4v6_MOD_TNOM 831 #define BSIM4v6_MOD_CGSO 832 #define BSIM4v6_MOD_CGDO 833 #define BSIM4v6_MOD_CGBO 834 #define BSIM4v6_MOD_XPART 835 #define BSIM4v6_MOD_RSH 836 #define BSIM4v6_MOD_JSS 837 #define BSIM4v6_MOD_PBS 838 #define BSIM4v6_MOD_MJS 839 #define BSIM4v6_MOD_PBSWS 840 #define BSIM4v6_MOD_MJSWS 841 #define BSIM4v6_MOD_CJS 842 #define BSIM4v6_MOD_CJSWS 843 #define BSIM4v6_MOD_NMOS 844 #define BSIM4v6_MOD_PMOS 845 #define BSIM4v6_MOD_NOIA 846 #define BSIM4v6_MOD_NOIB 847 #define BSIM4v6_MOD_NOIC 848 #define BSIM4v6_MOD_LINT 849 #define BSIM4v6_MOD_LL 850 #define BSIM4v6_MOD_LLN 851 #define BSIM4v6_MOD_LW 852 #define BSIM4v6_MOD_LWN 853 #define BSIM4v6_MOD_LWL 854 #define BSIM4v6_MOD_LMIN 855 #define BSIM4v6_MOD_LMAX 856 #define BSIM4v6_MOD_WINT 857 #define BSIM4v6_MOD_WL 858 #define BSIM4v6_MOD_WLN 859 #define BSIM4v6_MOD_WW 860 #define BSIM4v6_MOD_WWN 861 #define BSIM4v6_MOD_WWL 862 #define BSIM4v6_MOD_WMIN 863 #define BSIM4v6_MOD_WMAX 864 #define BSIM4v6_MOD_DWC 865 #define BSIM4v6_MOD_DLC 866 #define BSIM4v6_MOD_XL 867 #define BSIM4v6_MOD_XW 868 #define BSIM4v6_MOD_EM 869 #define BSIM4v6_MOD_EF 870 #define BSIM4v6_MOD_AF 871 #define BSIM4v6_MOD_KF 872 #define BSIM4v6_MOD_NJS 873 #define BSIM4v6_MOD_XTIS 874 #define BSIM4v6_MOD_PBSWGS 875 #define BSIM4v6_MOD_MJSWGS 876 #define BSIM4v6_MOD_CJSWGS 877 #define BSIM4v6_MOD_JSWS 878 #define BSIM4v6_MOD_LLC 879 #define BSIM4v6_MOD_LWC 880 #define BSIM4v6_MOD_LWLC 881 #define BSIM4v6_MOD_WLC 882 #define BSIM4v6_MOD_WWC 883 #define BSIM4v6_MOD_WWLC 884 #define BSIM4v6_MOD_DWJ 885 #define BSIM4v6_MOD_JSD 886 #define BSIM4v6_MOD_PBD 887 #define BSIM4v6_MOD_MJD 888 #define BSIM4v6_MOD_PBSWD 889 #define BSIM4v6_MOD_MJSWD 890 #define BSIM4v6_MOD_CJD 891 #define BSIM4v6_MOD_CJSWD 892 #define BSIM4v6_MOD_NJD 893 #define BSIM4v6_MOD_XTID 894 #define BSIM4v6_MOD_PBSWGD 895 #define BSIM4v6_MOD_MJSWGD 896 #define BSIM4v6_MOD_CJSWGD 897 #define BSIM4v6_MOD_JSWD 898 #define BSIM4v6_MOD_DLCIG 899 /* trap-assisted tunneling */ #define BSIM4v6_MOD_JTSS 900 #define BSIM4v6_MOD_JTSD 901 #define BSIM4v6_MOD_JTSSWS 902 #define BSIM4v6_MOD_JTSSWD 903 #define BSIM4v6_MOD_JTSSWGS 904 #define BSIM4v6_MOD_JTSSWGD 905 #define BSIM4v6_MOD_NJTS 906 #define BSIM4v6_MOD_NJTSSW 907 #define BSIM4v6_MOD_NJTSSWG 908 #define BSIM4v6_MOD_XTSS 909 #define BSIM4v6_MOD_XTSD 910 #define BSIM4v6_MOD_XTSSWS 911 #define BSIM4v6_MOD_XTSSWD 912 #define BSIM4v6_MOD_XTSSWGS 913 #define BSIM4v6_MOD_XTSSWGD 914 #define BSIM4v6_MOD_TNJTS 915 #define BSIM4v6_MOD_TNJTSSW 916 #define BSIM4v6_MOD_TNJTSSWG 917 #define BSIM4v6_MOD_VTSS 918 #define BSIM4v6_MOD_VTSD 919 #define BSIM4v6_MOD_VTSSWS 920 #define BSIM4v6_MOD_VTSSWD 921 #define BSIM4v6_MOD_VTSSWGS 922 #define BSIM4v6_MOD_VTSSWGD 923 #define BSIM4v6_MOD_PUD 924 #define BSIM4v6_MOD_PUD1 925 #define BSIM4v6_MOD_PUP 926 #define BSIM4v6_MOD_PLP 927 #define BSIM4v6_MOD_JTWEFF 928 /* device questions */ #define BSIM4v6_DNODE 945 #define BSIM4v6_GNODEEXT 946 #define BSIM4v6_SNODE 947 #define BSIM4v6_BNODE 948 #define BSIM4v6_DNODEPRIME 949 #define BSIM4v6_GNODEPRIME 950 #define BSIM4v6_GNODEMIDE 951 #define BSIM4v6_GNODEMID 952 #define BSIM4v6_SNODEPRIME 953 #define BSIM4v6_BNODEPRIME 954 #define BSIM4v6_DBNODE 955 #define BSIM4v6_SBNODE 956 #define BSIM4v6_VBD 957 #define BSIM4v6_VBS 958 #define BSIM4v6_VGS 959 #define BSIM4v6_VDS 960 #define BSIM4v6_CD 961 #define BSIM4v6_CBS 962 #define BSIM4v6_CBD 963 #define BSIM4v6_GM 964 #define BSIM4v6_GDS 965 #define BSIM4v6_GMBS 966 #define BSIM4v6_GBD 967 #define BSIM4v6_GBS 968 #define BSIM4v6_QB 969 #define BSIM4v6_CQB 970 #define BSIM4v6_QG 971 #define BSIM4v6_CQG 972 #define BSIM4v6_QD 973 #define BSIM4v6_CQD 974 #define BSIM4v6_CGGB 975 #define BSIM4v6_CGDB 976 #define BSIM4v6_CGSB 977 #define BSIM4v6_CBGB 978 #define BSIM4v6_CAPBD 979 #define BSIM4v6_CQBD 980 #define BSIM4v6_CAPBS 981 #define BSIM4v6_CQBS 982 #define BSIM4v6_CDGB 983 #define BSIM4v6_CDDB 984 #define BSIM4v6_CDSB 985 #define BSIM4v6_VON 986 #define BSIM4v6_VDSAT 987 #define BSIM4v6_QBS 988 #define BSIM4v6_QBD 989 #define BSIM4v6_SOURCECONDUCT 990 #define BSIM4v6_DRAINCONDUCT 991 #define BSIM4v6_CBDB 992 #define BSIM4v6_CBSB 993 #define BSIM4v6_CSUB 994 #define BSIM4v6_QINV 995 #define BSIM4v6_IGIDL 996 #define BSIM4v6_CSGB 997 #define BSIM4v6_CSDB 998 #define BSIM4v6_CSSB 999 #define BSIM4v6_CGBB 1000 #define BSIM4v6_CDBB 1001 #define BSIM4v6_CSBB 1002 #define BSIM4v6_CBBB 1003 #define BSIM4v6_QS 1004 #define BSIM4v6_IGISL 1005 #define BSIM4v6_IGS 1006 #define BSIM4v6_IGD 1007 #define BSIM4v6_IGB 1008 #define BSIM4v6_IGCS 1009 #define BSIM4v6_IGCD 1010 #define BSIM4v6_QDEF 1011 #define BSIM4v6_DELVT0 1012 #define BSIM4v6_GCRG 1013 #define BSIM4v6_GTAU 1014 #define BSIM4v6_MOD_LTVOFF 1051 #define BSIM4v6_MOD_LTVFBSDOFF 1052 #define BSIM4v6_MOD_WTVOFF 1053 #define BSIM4v6_MOD_WTVFBSDOFF 1054 #define BSIM4v6_MOD_PTVOFF 1055 #define BSIM4v6_MOD_PTVFBSDOFF 1056 #define BSIM4v6_MOD_LKVTH0WE 1061 #define BSIM4v6_MOD_LK2WE 1062 #define BSIM4v6_MOD_LKU0WE 1063 #define BSIM4v6_MOD_WKVTH0WE 1064 #define BSIM4v6_MOD_WK2WE 1065 #define BSIM4v6_MOD_WKU0WE 1066 #define BSIM4v6_MOD_PKVTH0WE 1067 #define BSIM4v6_MOD_PK2WE 1068 #define BSIM4v6_MOD_PKU0WE 1069 #define BSIM4v6_MOD_RBPS0 1101 #define BSIM4v6_MOD_RBPSL 1102 #define BSIM4v6_MOD_RBPSW 1103 #define BSIM4v6_MOD_RBPSNF 1104 #define BSIM4v6_MOD_RBPD0 1105 #define BSIM4v6_MOD_RBPDL 1106 #define BSIM4v6_MOD_RBPDW 1107 #define BSIM4v6_MOD_RBPDNF 1108 #define BSIM4v6_MOD_RBPBX0 1109 #define BSIM4v6_MOD_RBPBXL 1110 #define BSIM4v6_MOD_RBPBXW 1111 #define BSIM4v6_MOD_RBPBXNF 1112 #define BSIM4v6_MOD_RBPBY0 1113 #define BSIM4v6_MOD_RBPBYL 1114 #define BSIM4v6_MOD_RBPBYW 1115 #define BSIM4v6_MOD_RBPBYNF 1116 #define BSIM4v6_MOD_RBSBX0 1117 #define BSIM4v6_MOD_RBSBY0 1118 #define BSIM4v6_MOD_RBDBX0 1119 #define BSIM4v6_MOD_RBDBY0 1120 #define BSIM4v6_MOD_RBSDBXL 1121 #define BSIM4v6_MOD_RBSDBXW 1122 #define BSIM4v6_MOD_RBSDBXNF 1123 #define BSIM4v6_MOD_RBSDBYL 1124 #define BSIM4v6_MOD_RBSDBYW 1125 #define BSIM4v6_MOD_RBSDBYNF 1126 #define BSIM4v6_MOD_AGISL 1200 #define BSIM4v6_MOD_BGISL 1201 #define BSIM4v6_MOD_EGISL 1202 #define BSIM4v6_MOD_CGISL 1203 #define BSIM4v6_MOD_LAGISL 1204 #define BSIM4v6_MOD_LBGISL 1205 #define BSIM4v6_MOD_LEGISL 1206 #define BSIM4v6_MOD_LCGISL 1207 #define BSIM4v6_MOD_WAGISL 1208 #define BSIM4v6_MOD_WBGISL 1209 #define BSIM4v6_MOD_WEGISL 1210 #define BSIM4v6_MOD_WCGISL 1211 #define BSIM4v6_MOD_PAGISL 1212 #define BSIM4v6_MOD_PBGISL 1213 #define BSIM4v6_MOD_PEGISL 1214 #define BSIM4v6_MOD_PCGISL 1215 #define BSIM4v6_MOD_AIGS 1220 #define BSIM4v6_MOD_BIGS 1221 #define BSIM4v6_MOD_CIGS 1222 #define BSIM4v6_MOD_LAIGS 1223 #define BSIM4v6_MOD_LBIGS 1224 #define BSIM4v6_MOD_LCIGS 1225 #define BSIM4v6_MOD_WAIGS 1226 #define BSIM4v6_MOD_WBIGS 1227 #define BSIM4v6_MOD_WCIGS 1228 #define BSIM4v6_MOD_PAIGS 1229 #define BSIM4v6_MOD_PBIGS 1230 #define BSIM4v6_MOD_PCIGS 1231 #define BSIM4v6_MOD_AIGD 1232 #define BSIM4v6_MOD_BIGD 1233 #define BSIM4v6_MOD_CIGD 1234 #define BSIM4v6_MOD_LAIGD 1235 #define BSIM4v6_MOD_LBIGD 1236 #define BSIM4v6_MOD_LCIGD 1237 #define BSIM4v6_MOD_WAIGD 1238 #define BSIM4v6_MOD_WBIGD 1239 #define BSIM4v6_MOD_WCIGD 1240 #define BSIM4v6_MOD_PAIGD 1241 #define BSIM4v6_MOD_PBIGD 1242 #define BSIM4v6_MOD_PCIGD 1243 #define BSIM4v6_MOD_DLCIGD 1244 #define BSIM4v6_MOD_NJTSD 1250 #define BSIM4v6_MOD_NJTSSWD 1251 #define BSIM4v6_MOD_NJTSSWGD 1252 #define BSIM4v6_MOD_TNJTSD 1253 #define BSIM4v6_MOD_TNJTSSWD 1254 #define BSIM4v6_MOD_TNJTSSWGD 1255 #define BSIM4v6_MOD_VGS_MAX 1301 #define BSIM4v6_MOD_VGD_MAX 1302 #define BSIM4v6_MOD_VGB_MAX 1303 #define BSIM4v6_MOD_VDS_MAX 1304 #define BSIM4v6_MOD_VBS_MAX 1305 #define BSIM4v6_MOD_VBD_MAX 1306 #include "bsim4v6ext.h" extern void BSIM4v6evaluate(double,double,double,BSIM4v6instance*,BSIM4v6model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM4v6debug(BSIM4v6model*, BSIM4v6instance*, CKTcircuit*, int); extern int BSIM4v6checkModel(BSIM4v6model*, BSIM4v6instance*, CKTcircuit*); extern int BSIM4v6PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); extern int BSIM4v6RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); #endif /*BSIM4v6*/ ngspice-26/src/spicelib/devices/bsim4v6/bsim4v6ext.h0000644000265600020320000000277012264261473021720 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu Author: 2001- Xuemei Xi File: bsim4v6ext.h **********/ extern int BSIM4v6acLoad(GENmodel *,CKTcircuit*); extern int BSIM4v6ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM4v6convTest(GENmodel *,CKTcircuit*); extern int BSIM4v6delete(GENmodel*,IFuid,GENinstance**); extern void BSIM4v6destroy(GENmodel**); extern int BSIM4v6getic(GENmodel*,CKTcircuit*); extern int BSIM4v6load(GENmodel*,CKTcircuit*); extern int BSIM4v6mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM4v6mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM4v6mParam(int,IFvalue*,GENmodel*); extern void BSIM4v6mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM4v6param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM4v6pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM4v6setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM4v6temp(GENmodel*,CKTcircuit*); extern int BSIM4v6trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM4v6noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM4v6unsetup(GENmodel*,CKTcircuit*); extern int BSIM4v6soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsim4v6/b4v6cvtest.c0000644000265600020320000002216212264261473021707 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 04/05/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4cvtest.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6convTest( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; double delvbd, delvbs, delvds, delvgd, delvgs; double delvdbd, delvsbs; double delvbd_jct, delvbs_jct; double vds, vgs, vgd, vgdo, vbs, vbd; double vdbd, vdbs, vsbs; double cbhat, cdhat, Idtot, Ibtot; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double tol0, tol1, tol2, tol3, tol4, tol5, tol6; for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here != NULL ; here=here->BSIM4v6nextInstance) { vds = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vgs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vdbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dbNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vsbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6sbNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vses = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6sNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vdes = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vgdo = *(ckt->CKTstate0 + here->BSIM4v6vgs) - *(ckt->CKTstate0 + here->BSIM4v6vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v6vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v6vdbd); delvgd = vgd - vgdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v6vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v6vgs); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v6vbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v6vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v6vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v6vdes) - *(ckt->CKTstate0 + here->BSIM4v6vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v6vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v6rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v6rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v6mode >= 0) { Idtot = here->BSIM4v6cd + here->BSIM4v6csub - here->BSIM4v6cbd + here->BSIM4v6Igidl; cdhat = Idtot - here->BSIM4v6gbd * delvbd_jct + (here->BSIM4v6gmbs + here->BSIM4v6gbbs + here->BSIM4v6ggidlb) * delvbs + (here->BSIM4v6gm + here->BSIM4v6gbgs + here->BSIM4v6ggidlg) * delvgs + (here->BSIM4v6gds + here->BSIM4v6gbds + here->BSIM4v6ggidld) * delvds; Igstot = here->BSIM4v6Igs + here->BSIM4v6Igcs; cgshat = Igstot + (here->BSIM4v6gIgsg + here->BSIM4v6gIgcsg) * delvgs + here->BSIM4v6gIgcsd * delvds + here->BSIM4v6gIgcsb * delvbs; Igdtot = here->BSIM4v6Igd + here->BSIM4v6Igcd; cgdhat = Igdtot + here->BSIM4v6gIgdg * delvgd + here->BSIM4v6gIgcdg * delvgs + here->BSIM4v6gIgcdd * delvds + here->BSIM4v6gIgcdb * delvbs; Igbtot = here->BSIM4v6Igb; cgbhat = here->BSIM4v6Igb + here->BSIM4v6gIgbg * delvgs + here->BSIM4v6gIgbd * delvds + here->BSIM4v6gIgbb * delvbs; } else { Idtot = here->BSIM4v6cd + here->BSIM4v6cbd - here->BSIM4v6Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v6gbd * delvbd_jct + here->BSIM4v6gmbs * delvbd + here->BSIM4v6gm * delvgd - (here->BSIM4v6gds + here->BSIM4v6ggidls) * delvds - here->BSIM4v6ggidlg * delvgs - here->BSIM4v6ggidlb * delvbs; Igstot = here->BSIM4v6Igs + here->BSIM4v6Igcd; cgshat = Igstot + here->BSIM4v6gIgsg * delvgs + here->BSIM4v6gIgcdg * delvgd - here->BSIM4v6gIgcdd * delvds + here->BSIM4v6gIgcdb * delvbd; Igdtot = here->BSIM4v6Igd + here->BSIM4v6Igcs; cgdhat = Igdtot + (here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg) * delvgd - here->BSIM4v6gIgcsd * delvds + here->BSIM4v6gIgcsb * delvbd; Igbtot = here->BSIM4v6Igb; cgbhat = here->BSIM4v6Igb + here->BSIM4v6gIgbg * delvgd - here->BSIM4v6gIgbd * delvds + here->BSIM4v6gIgbb * delvbd; } Isestot = here->BSIM4v6gstot * (*(ckt->CKTstate0 + here->BSIM4v6vses)); cseshat = Isestot + here->BSIM4v6gstot * delvses + here->BSIM4v6gstotd * delvds + here->BSIM4v6gstotg * delvgs + here->BSIM4v6gstotb * delvbs; Idedtot = here->BSIM4v6gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v6gdtot * delvded + here->BSIM4v6gdtotd * delvds + here->BSIM4v6gdtotg * delvgs + here->BSIM4v6gdtotb * delvbs; /* * Check convergence */ if ((here->BSIM4v6off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; return(OK); } if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; return(OK); } Ibtot = here->BSIM4v6cbs + here->BSIM4v6cbd - here->BSIM4v6Igidl - here->BSIM4v6Igisl - here->BSIM4v6csub; if (here->BSIM4v6mode >= 0) { cbhat = Ibtot + here->BSIM4v6gbd * delvbd_jct + here->BSIM4v6gbs * delvbs_jct - (here->BSIM4v6gbbs + here->BSIM4v6ggidlb) * delvbs - (here->BSIM4v6gbgs + here->BSIM4v6ggidlg) * delvgs - (here->BSIM4v6gbds + here->BSIM4v6ggidld) * delvds - here->BSIM4v6ggislg * delvgd - here->BSIM4v6ggislb* delvbd + here->BSIM4v6ggisls * delvds ; } else { cbhat = Ibtot + here->BSIM4v6gbs * delvbs_jct + here->BSIM4v6gbd * delvbd_jct - (here->BSIM4v6gbbs + here->BSIM4v6ggislb) * delvbd - (here->BSIM4v6gbgs + here->BSIM4v6ggislg) * delvgd + (here->BSIM4v6gbds + here->BSIM4v6ggisld - here->BSIM4v6ggidls) * delvds - here->BSIM4v6ggidlg * delvgs - here->BSIM4v6ggidlb * delvbs; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6mdel.c0000644000265600020320000000251312264261473021316 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mdel.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM4v6model **model = (BSIM4v6model**)inModel; BSIM4v6model *modfast = (BSIM4v6model*)kill; BSIM4v6instance *here; BSIM4v6instance *prev = NULL; BSIM4v6model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM4v6nextModel)) { if ((*model)->BSIM4v6modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM4v6nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6ld.c0000644000265600020320000071626012264261473021007 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008****/ /**** BSIM4.6.5 Update ngspice 09/22/2009 ****/ /**** OpenMP support ngspice 06/28/2010 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4ld.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" /* #define MAX_EXP 2.688117142e+43 #define MIN_EXP 3.720075976e-44 #define EXP_THRESHOLD 100.0 */ #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define MM 3 /* smooth coeff */ #define DEXP(A,B,C) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ C = MAX_EXP; \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } #ifdef USE_OMP int BSIM4v6LoadOMP(BSIM4v6instance *here, CKTcircuit *ckt); void BSIM4v6LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt); #endif int BSIM4v6polyDepletion(double phi, double ngate,double epsgate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); int BSIM4v6load( GENmodel *inModel, CKTcircuit *ckt) { #ifdef USE_OMP int idx; BSIM4v6model *model = (BSIM4v6model*)inModel; int good = 0; BSIM4v6instance *here; BSIM4v6instance **InstArray; InstArray = model->BSIM4v6InstanceArray; #pragma omp parallel for private(here) for (idx = 0; idx < model->BSIM4v6InstCount; idx++) { here = InstArray[idx]; good = BSIM4v6LoadOMP(here, ckt); } BSIM4v6LoadRhsMat(inModel, ckt); return good; } int BSIM4v6LoadOMP(BSIM4v6instance *here, CKTcircuit *ckt) { BSIM4v6model *model; #else BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; #endif double ceqgstot, dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb; double ceqgdtot, dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb; double gstot, gstotd, gstotg, gstots, gstotb, gspr, Rs, Rd; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double vgs_eff, vgd_eff, dvgs_eff_dvg, dvgd_eff_dvg; double dRs_dvg, dRd_dvg, dRs_dvb, dRd_dvb; double dT0_dvg, dT1_dvb, dT3_dvg, dT3_dvb; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot=0.0, cseshat=0.0, Idedtot=0.0, cdedhat=0.0; #ifndef NEWCONV double tol0, tol1, tol2, tol3, tol4, tol5, tol6; #endif double geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb, ceqgcrg; double vges, vgms, vgedo, vgmdo, vged, vgmd, delvged, delvgmd; double delvges, delvgms, vgmb; double gcgmgmb=0.0, gcgmdb=0.0, gcgmsb=0.0, gcdgmb, gcsgmb; double gcgmbb=0.0, gcbgmb, qgmb, qgmid=0.0, ceqqgmid; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vdbs, vdbd, vsbs, vsbdo, vsbd; double delvdbs, delvdbd, delvsbs; double delvbd_jct, delvbs_jct, vbs_jct, vbd_jct; double SourceSatCurrent, DrainSatCurrent; double ag0, qgb, von, cbhat=0.0, VgstNVt, ExpVgst; double ceqqb, ceqqd, ceqqg, ceqqjd=0.0, ceqqjs=0.0, ceq, geq; double cdrain, cdhat=0.0, ceqdrn, ceqbd, ceqbs, ceqjd, ceqjs, gjbd, gjbs; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; double gcgbb, gcdbb, gcsbb, gcbbb; double gcdbdb, gcsbsb; double gcsgb, gcssb, MJD, MJSWD, MJSWGD, MJS, MJSWS, MJSWGS; double qgate=0.0, qbulk=0.0, qdrn=0.0, qsrc, cqgate, cqbody, cqdrn; double Vdb, Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Igidl, Ggidld, Ggidlg, Ggidlb; double Voxacc=0.0, dVoxacc_dVg=0.0, dVoxacc_dVb=0.0; double Voxdepinv=0.0, dVoxdepinv_dVg=0.0, dVoxdepinv_dVd=0.0, dVoxdepinv_dVb=0.0; double VxNVt=0.0, ExpVxNVt, Vaux=0.0, dVaux_dVg=0.0, dVaux_dVd=0.0, dVaux_dVb=0.0; double Igc, dIgc_dVg, dIgc_dVd, dIgc_dVb; double Igcs, dIgcs_dVg, dIgcs_dVd, dIgcs_dVb; double Igcd, dIgcd_dVg, dIgcd_dVd, dIgcd_dVb; double Igs, dIgs_dVg, dIgs_dVs, Igd, dIgd_dVg, dIgd_dVd; double Igbacc, dIgbacc_dVg, dIgbacc_dVb; double Igbinv, dIgbinv_dVg, dIgbinv_dVd, dIgbinv_dVb; double Pigcd, dPigcd_dVg, dPigcd_dVd, dPigcd_dVb; double Istoteq, gIstotg, gIstotd, gIstots, gIstotb; double Idtoteq, gIdtotg, gIdtotd, gIdtots, gIdtotb; double Ibtoteq, gIbtotg, gIbtotd, gIbtots, gIbtotb; double Igtoteq, gIgtotg, gIgtotd, gIgtots, gIgtotb; double Igstot=0.0, cgshat=0.0, Igdtot=0.0, cgdhat=0.0, Igbtot=0.0, cgbhat=0.0; double Vgs_eff, Vfb=0.0, Vth_NarrowW; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtms, Nvtmd; double Vtm, Vtm0; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg, VgDP, dVgDP_dVg; double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVd, dCoxeff_dVg, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double VgsteffVth, dT11_dVg; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0=0.0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4, dT4_dVd, dT4_dVb; double T5, dT5_dVg, dT5_dVd, dT5_dVb; double T6, dT6_dVg, dT6_dVd, dT6_dVb; double T7, dT7_dVg, dT7_dVd, dT7_dVb; double T8, dT8_dVg, dT8_dVd, dT8_dVb; double T9, dT9_dVg, dT9_dVd, dT9_dVb; double T10, dT10_dVg, dT10_dVb, dT10_dVd; double T11, T12, T13, T14; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double Cclm, dCclm_dVg, dCclm_dVd, dCclm_dVb; double FP, dFP_dVg, PvagTerm, dPvagTerm_dVg, dPvagTerm_dVd, dPvagTerm_dVb; double VADITS, dVADITS_dVg, dVADITS_dVd; double Lpe_Vb, dDITS_Sft_dVb, dDITS_Sft_dVd; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot, Ibtot, a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb, devbs_dvb, devbd_dvb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxeffWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qcheq, qdef, gqdef=0.0, cqdef=0.0, cqcheq=0.0; double gcqdb=0.0, gcqsb=0.0, gcqgb=0.0, gcqbb=0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double qgdo, qgso, cgdo, cgso; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double Igisl, Ggislg, Ggislb, Ggisls; double Nvtmrss, Nvtmrssws, Nvtmrsswgs; double Nvtmrsd, Nvtmrsswd, Nvtmrsswgd; double vs, Fsevl, dvs_dVg, dvs_dVd, dvs_dVb, dFsevl_dVg, dFsevl_dVd, dFsevl_dVb; double vgdx, vgsx, epssub, toxe, epsrox; struct bsim4v6SizeDependParam *pParam; int ByPass, ChargeComputationNeeded, error, Check, Check1, Check2; double m; #ifdef USE_OMP model = here->BSIM4v6modPtr; #endif ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; #ifndef USE_OMP for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here != NULL; here = here->BSIM4v6nextInstance) { #endif Check = Check1 = Check2 = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vds = *(ckt->CKTstate0 + here->BSIM4v6vds); vgs = *(ckt->CKTstate0 + here->BSIM4v6vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v6vbs); vges = *(ckt->CKTstate0 + here->BSIM4v6vges); vgms = *(ckt->CKTstate0 + here->BSIM4v6vgms); vdbs = *(ckt->CKTstate0 + here->BSIM4v6vdbs); vsbs = *(ckt->CKTstate0 + here->BSIM4v6vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v6vses); vdes = *(ckt->CKTstate0 + here->BSIM4v6vdes); qdef = *(ckt->CKTstate0 + here->BSIM4v6qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vds = *(ckt->CKTstate1 + here->BSIM4v6vds); vgs = *(ckt->CKTstate1 + here->BSIM4v6vgs); vbs = *(ckt->CKTstate1 + here->BSIM4v6vbs); vges = *(ckt->CKTstate1 + here->BSIM4v6vges); vgms = *(ckt->CKTstate1 + here->BSIM4v6vgms); vdbs = *(ckt->CKTstate1 + here->BSIM4v6vdbs); vsbs = *(ckt->CKTstate1 + here->BSIM4v6vsbs); vses = *(ckt->CKTstate1 + here->BSIM4v6vses); vdes = *(ckt->CKTstate1 + here->BSIM4v6vdes); qdef = *(ckt->CKTstate1 + here->BSIM4v6qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4v6off) { vds = model->BSIM4v6type * here->BSIM4v6icVDS; vgs = vges = vgms = model->BSIM4v6type * here->BSIM4v6icVGS; vbs = vdbs = vsbs = model->BSIM4v6type * here->BSIM4v6icVBS; if (vds > 0.0) { vdes = vds + 0.01; vses = -0.01; } else if (vds < 0.0) { vdes = vds - 0.01; vses = 0.01; } else vdes = vses = 0.0; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vds = 0.1; vdes = 0.11; vses = -0.01; vgs = vges = vgms = model->BSIM4v6type * here->BSIM4v6vth0 + 0.1; vbs = vdbs = vsbs = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM4v6off)) { vds = vgs = vbs = vges = vgms = 0.0; vdbs = vsbs = vdes = vses = qdef = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM4v6vds) = *(ckt->CKTstate1 + here->BSIM4v6vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vds))); *(ckt->CKTstate0 + here->BSIM4v6vgs) = *(ckt->CKTstate1 + here->BSIM4v6vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vgs))); *(ckt->CKTstate0 + here->BSIM4v6vges) = *(ckt->CKTstate1 + here->BSIM4v6vges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vges)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vges))); *(ckt->CKTstate0 + here->BSIM4v6vgms) = *(ckt->CKTstate1 + here->BSIM4v6vgms); vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vgms)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vgms))); *(ckt->CKTstate0 + here->BSIM4v6vbs) = *(ckt->CKTstate1 + here->BSIM4v6vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vbs))); *(ckt->CKTstate0 + here->BSIM4v6vbd) = *(ckt->CKTstate0 + here->BSIM4v6vbs) - *(ckt->CKTstate0 + here->BSIM4v6vds); *(ckt->CKTstate0 + here->BSIM4v6vdbs) = *(ckt->CKTstate1 + here->BSIM4v6vdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vdbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vdbs))); *(ckt->CKTstate0 + here->BSIM4v6vdbd) = *(ckt->CKTstate0 + here->BSIM4v6vdbs) - *(ckt->CKTstate0 + here->BSIM4v6vds); *(ckt->CKTstate0 + here->BSIM4v6vsbs) = *(ckt->CKTstate1 + here->BSIM4v6vsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vsbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vsbs))); *(ckt->CKTstate0 + here->BSIM4v6vses) = *(ckt->CKTstate1 + here->BSIM4v6vses); vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vses)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vses))); *(ckt->CKTstate0 + here->BSIM4v6vdes) = *(ckt->CKTstate1 + here->BSIM4v6vdes); vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6vdes)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v6vdes))); *(ckt->CKTstate0 + here->BSIM4v6qdef) = *(ckt->CKTstate1 + here->BSIM4v6qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v6qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM4v6qdef))); } else { #endif /* PREDICTOR */ vds = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vgs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vges = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6gNodeExt) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vgms = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6gNodeMid) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vdbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dbNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vsbs = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6sbNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vses = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6sNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); vdes = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6dNode) - *(ckt->CKTrhsOld + here->BSIM4v6sNodePrime)); qdef = model->BSIM4v6type * (*(ckt->CKTrhsOld + here->BSIM4v6qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vgdo = *(ckt->CKTstate0 + here->BSIM4v6vgs) - *(ckt->CKTstate0 + here->BSIM4v6vds); vgedo = *(ckt->CKTstate0 + here->BSIM4v6vges) - *(ckt->CKTstate0 + here->BSIM4v6vds); vgmdo = *(ckt->CKTstate0 + here->BSIM4v6vgms) - *(ckt->CKTstate0 + here->BSIM4v6vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; vged = vges - vds; vgmd = vgms - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v6vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v6vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v6vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v6vgs); delvges = vges - *(ckt->CKTstate0 + here->BSIM4v6vges); delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4v6vgms); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v6vbs); delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4v6vdbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v6vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v6vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v6vdes) - *(ckt->CKTstate0 + here->BSIM4v6vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v6vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v6rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v6rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v6mode >= 0) { Idtot = here->BSIM4v6cd + here->BSIM4v6csub - here->BSIM4v6cbd + here->BSIM4v6Igidl; cdhat = Idtot - here->BSIM4v6gbd * delvbd_jct + (here->BSIM4v6gmbs + here->BSIM4v6gbbs + here->BSIM4v6ggidlb) * delvbs + (here->BSIM4v6gm + here->BSIM4v6gbgs + here->BSIM4v6ggidlg) * delvgs + (here->BSIM4v6gds + here->BSIM4v6gbds + here->BSIM4v6ggidld) * delvds; Ibtot = here->BSIM4v6cbs + here->BSIM4v6cbd - here->BSIM4v6Igidl - here->BSIM4v6Igisl - here->BSIM4v6csub; cbhat = Ibtot + here->BSIM4v6gbd * delvbd_jct + here->BSIM4v6gbs * delvbs_jct - (here->BSIM4v6gbbs + here->BSIM4v6ggidlb) * delvbs - (here->BSIM4v6gbgs + here->BSIM4v6ggidlg) * delvgs - (here->BSIM4v6gbds + here->BSIM4v6ggidld - here->BSIM4v6ggisls) * delvds - here->BSIM4v6ggislg * delvgd - here->BSIM4v6ggislb* delvbd; Igstot = here->BSIM4v6Igs + here->BSIM4v6Igcs; cgshat = Igstot + (here->BSIM4v6gIgsg + here->BSIM4v6gIgcsg) * delvgs + here->BSIM4v6gIgcsd * delvds + here->BSIM4v6gIgcsb * delvbs; Igdtot = here->BSIM4v6Igd + here->BSIM4v6Igcd; cgdhat = Igdtot + here->BSIM4v6gIgdg * delvgd + here->BSIM4v6gIgcdg * delvgs + here->BSIM4v6gIgcdd * delvds + here->BSIM4v6gIgcdb * delvbs; Igbtot = here->BSIM4v6Igb; cgbhat = here->BSIM4v6Igb + here->BSIM4v6gIgbg * delvgs + here->BSIM4v6gIgbd * delvds + here->BSIM4v6gIgbb * delvbs; } else { Idtot = here->BSIM4v6cd + here->BSIM4v6cbd - here->BSIM4v6Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v6gbd * delvbd_jct + here->BSIM4v6gmbs * delvbd + here->BSIM4v6gm * delvgd - (here->BSIM4v6gds + here->BSIM4v6ggidls) * delvds - here->BSIM4v6ggidlg * delvgs - here->BSIM4v6ggidlb * delvbs; Ibtot = here->BSIM4v6cbs + here->BSIM4v6cbd - here->BSIM4v6Igidl - here->BSIM4v6Igisl - here->BSIM4v6csub; cbhat = Ibtot + here->BSIM4v6gbs * delvbs_jct + here->BSIM4v6gbd * delvbd_jct - (here->BSIM4v6gbbs + here->BSIM4v6ggislb) * delvbd - (here->BSIM4v6gbgs + here->BSIM4v6ggislg) * delvgd + (here->BSIM4v6gbds + here->BSIM4v6ggisld - here->BSIM4v6ggidls) * delvds - here->BSIM4v6ggidlg * delvgs - here->BSIM4v6ggidlb * delvbs; Igstot = here->BSIM4v6Igs + here->BSIM4v6Igcd; cgshat = Igstot + here->BSIM4v6gIgsg * delvgs + here->BSIM4v6gIgcdg * delvgd - here->BSIM4v6gIgcdd * delvds + here->BSIM4v6gIgcdb * delvbd; Igdtot = here->BSIM4v6Igd + here->BSIM4v6Igcs; cgdhat = Igdtot + (here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg) * delvgd - here->BSIM4v6gIgcsd * delvds + here->BSIM4v6gIgcsb * delvbd; Igbtot = here->BSIM4v6Igb; cgbhat = here->BSIM4v6Igb + here->BSIM4v6gIgbg * delvgd - here->BSIM4v6gIgbd * delvds + here->BSIM4v6gIgbb * delvbd; } Isestot = here->BSIM4v6gstot * (*(ckt->CKTstate0 + here->BSIM4v6vses)); cseshat = Isestot + here->BSIM4v6gstot * delvses + here->BSIM4v6gstotd * delvds + here->BSIM4v6gstotg * delvgs + here->BSIM4v6gstotb * delvbs; Idedtot = here->BSIM4v6gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v6gdtot * delvded + here->BSIM4v6gdtotd * delvds + here->BSIM4v6gdtotg * delvgs + here->BSIM4v6gdtotb * delvbs; #ifndef NOBYPASS /* Following should be one IF statement, but some C compilers * can't handle that all at once, so we split it into several * successive IF's */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0 + here->BSIM4v6vds))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->BSIM4v6vgs))) + ckt->CKTvoltTol))) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0 + here->BSIM4v6vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0 + here->BSIM4v6vbd))) + ckt->CKTvoltTol))) if ((here->BSIM4v6rgateMod == 0) || (here->BSIM4v6rgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->BSIM4v6vges))) + ckt->CKTvoltTol))) if ((here->BSIM4v6rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4v6vgms))) + ckt->CKTvoltTol))) if ((!here->BSIM4v6rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4v6vdbs))) + ckt->CKTvoltTol))) if ((!here->BSIM4v6rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4v6vdbd))) + ckt->CKTvoltTol))) if ((!here->BSIM4v6rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4v6vsbs))) + ckt->CKTvoltTol))) if ((!model->BSIM4v6rdsMod) || (fabs(delvses) < (ckt->CKTreltol * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4v6vses))) + ckt->CKTvoltTol))) if ((!model->BSIM4v6rdsMod) || (fabs(delvdes) < (ckt->CKTreltol * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4v6vdes))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol)) if ((fabs(cbhat - Ibtot) < ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol)) if ((!model->BSIM4v6igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol))) if ((!model->BSIM4v6igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol))) if ((!model->BSIM4v6igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol))) if ((!model->BSIM4v6rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) if ((!model->BSIM4v6rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) { vds = *(ckt->CKTstate0 + here->BSIM4v6vds); vgs = *(ckt->CKTstate0 + here->BSIM4v6vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v6vbs); vges = *(ckt->CKTstate0 + here->BSIM4v6vges); vgms = *(ckt->CKTstate0 + here->BSIM4v6vgms); vbd = *(ckt->CKTstate0 + here->BSIM4v6vbd); vdbs = *(ckt->CKTstate0 + here->BSIM4v6vdbs); vdbd = *(ckt->CKTstate0 + here->BSIM4v6vdbd); vsbs = *(ckt->CKTstate0 + here->BSIM4v6vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v6vses); vdes = *(ckt->CKTstate0 + here->BSIM4v6vdes); vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vbs_jct = (!here->BSIM4v6rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v6rbodyMod) ? vbd : vdbd; /*** qdef should not be kept fixed even if vgs, vds & vbs has converged **** qdef = *(ckt->CKTstate0 + here->BSIM4v6qdef); ***/ cdrain = here->BSIM4v6cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM4v6qgate; qbulk = here->BSIM4v6qbulk; qdrn = here->BSIM4v6qdrn; cgdo = here->BSIM4v6cgdo; qgdo = here->BSIM4v6qgdo; cgso = here->BSIM4v6cgso; qgso = here->BSIM4v6qgso; goto line755; } else goto line850; } #endif /*NOBYPASS*/ von = here->BSIM4v6von; if (*(ckt->CKTstate0 + here->BSIM4v6vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4v6vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4v6vds)); vgd = vgs - vds; if (here->BSIM4v6rgateMod == 3) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v6vges), von); vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4v6vgms), von); vged = vges - vds; vgmd = vgms - vds; } else if ((here->BSIM4v6rgateMod == 1) || (here->BSIM4v6rgateMod == 2)) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v6vges), von); vged = vges - vds; } if (model->BSIM4v6rdsMod) { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4v6vdes)); vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4v6vses))); } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4v6vds))); vgs = vgd + vds; if (here->BSIM4v6rgateMod == 3) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; vgmd = DEVfetlim(vgmd, vgmdo, von); vgms = vgmd + vds; } if ((here->BSIM4v6rgateMod == 1) || (here->BSIM4v6rgateMod == 2)) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } if (model->BSIM4v6rdsMod) { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4v6vdes))); vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4v6vses)); } } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4v6vbs), CONSTvt0, model->BSIM4v6vcrit, &Check); vbd = vbs - vds; if (here->BSIM4v6rbodyMod) { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4v6vdbs), CONSTvt0, model->BSIM4v6vcrit, &Check1); vdbd = vdbs - vds; vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4v6vsbs), CONSTvt0, model->BSIM4v6vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4v6vbd), CONSTvt0, model->BSIM4v6vcrit, &Check); vbs = vbd + vds; if (here->BSIM4v6rbodyMod) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4v6vdbd), CONSTvt0, model->BSIM4v6vcrit, &Check1); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->BSIM4v6vsbs) - *(ckt->CKTstate0 + here->BSIM4v6vds); vsbd = vsbs - vds; vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4v6vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } } /* Calculate DC currents and their derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vdbd = vdbs - vds; vbs_jct = (!here->BSIM4v6rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v6rbodyMod) ? vbd : vdbd; /* Source/drain junction diode DC model begins */ Nvtms = model->BSIM4v6vtm * model->BSIM4v6SjctEmissionCoeff; if ((here->BSIM4v6Aseff <= 0.0) && (here->BSIM4v6Pseff <= 0.0)) { SourceSatCurrent = 0.0; } else { SourceSatCurrent = here->BSIM4v6Aseff * model->BSIM4v6SjctTempSatCurDensity + here->BSIM4v6Pseff * model->BSIM4v6SjctSidewallTempSatCurDensity + pParam->BSIM4v6weffCJ * here->BSIM4v6nf * model->BSIM4v6SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent <= 0.0) { here->BSIM4v6gbs = ckt->CKTgmin; here->BSIM4v6cbs = here->BSIM4v6gbs * vbs_jct; } else { switch(model->BSIM4v6dioMod) { case 0: evbs = exp(vbs_jct / Nvtms); T1 = model->BSIM4v6xjbvs * exp(-(model->BSIM4v6bvs + vbs_jct) / Nvtms); /* WDLiu: Magic T1 in this form; different from BSIM4v6 beta. */ here->BSIM4v6gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; here->BSIM4v6cbs = SourceSatCurrent * (evbs + here->BSIM4v6XExpBVS - T1 - 1.0) + ckt->CKTgmin * vbs_jct; break; case 1: T2 = vbs_jct / Nvtms; if (T2 < -EXP_THRESHOLD) { here->BSIM4v6gbs = ckt->CKTgmin; here->BSIM4v6cbs = SourceSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v6vjsmFwd) { evbs = exp(T2); here->BSIM4v6gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; here->BSIM4v6cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs_jct; } else { T0 = here->BSIM4v6IVjsmFwd / Nvtms; here->BSIM4v6gbs = T0 + ckt->CKTgmin; here->BSIM4v6cbs = here->BSIM4v6IVjsmFwd - SourceSatCurrent + T0 * (vbs_jct - here->BSIM4v6vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; case 2: if (vbs_jct < here->BSIM4v6vjsmRev) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = evbs - 1.0; T2 = here->BSIM4v6IVjsmRev + here->BSIM4v6SslpRev * (vbs_jct - here->BSIM4v6vjsmRev); here->BSIM4v6gbs = devbs_dvb * T2 + T1 * here->BSIM4v6SslpRev + ckt->CKTgmin; here->BSIM4v6cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v6vjsmFwd) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = (model->BSIM4v6bvs + vbs_jct) / Nvtms; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtms; } here->BSIM4v6gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4v6xjbvs * T3) + ckt->CKTgmin; here->BSIM4v6cbs = SourceSatCurrent * (evbs + here->BSIM4v6XExpBVS - 1.0 - model->BSIM4v6xjbvs * T2) + ckt->CKTgmin * vbs_jct; } else { here->BSIM4v6gbs = here->BSIM4v6SslpFwd + ckt->CKTgmin; here->BSIM4v6cbs = here->BSIM4v6IVjsmFwd + here->BSIM4v6SslpFwd * (vbs_jct - here->BSIM4v6vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; default: break; } } Nvtmd = model->BSIM4v6vtm * model->BSIM4v6DjctEmissionCoeff; if ((here->BSIM4v6Adeff <= 0.0) && (here->BSIM4v6Pdeff <= 0.0)) { DrainSatCurrent = 0.0; } else { DrainSatCurrent = here->BSIM4v6Adeff * model->BSIM4v6DjctTempSatCurDensity + here->BSIM4v6Pdeff * model->BSIM4v6DjctSidewallTempSatCurDensity + pParam->BSIM4v6weffCJ * here->BSIM4v6nf * model->BSIM4v6DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) { here->BSIM4v6gbd = ckt->CKTgmin; here->BSIM4v6cbd = here->BSIM4v6gbd * vbd_jct; } else { switch(model->BSIM4v6dioMod) { case 0: evbd = exp(vbd_jct / Nvtmd); T1 = model->BSIM4v6xjbvd * exp(-(model->BSIM4v6bvd + vbd_jct) / Nvtmd); /* WDLiu: Magic T1 in this form; different from BSIM4v6 beta. */ here->BSIM4v6gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; here->BSIM4v6cbd = DrainSatCurrent * (evbd + here->BSIM4v6XExpBVD - T1 - 1.0) + ckt->CKTgmin * vbd_jct; break; case 1: T2 = vbd_jct / Nvtmd; if (T2 < -EXP_THRESHOLD) { here->BSIM4v6gbd = ckt->CKTgmin; here->BSIM4v6cbd = DrainSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v6vjdmFwd) { evbd = exp(T2); here->BSIM4v6gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; here->BSIM4v6cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd_jct; } else { T0 = here->BSIM4v6IVjdmFwd / Nvtmd; here->BSIM4v6gbd = T0 + ckt->CKTgmin; here->BSIM4v6cbd = here->BSIM4v6IVjdmFwd - DrainSatCurrent + T0 * (vbd_jct - here->BSIM4v6vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; case 2: if (vbd_jct < here->BSIM4v6vjdmRev) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = evbd - 1.0; T2 = here->BSIM4v6IVjdmRev + here->BSIM4v6DslpRev * (vbd_jct - here->BSIM4v6vjdmRev); here->BSIM4v6gbd = devbd_dvb * T2 + T1 * here->BSIM4v6DslpRev + ckt->CKTgmin; here->BSIM4v6cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v6vjdmFwd) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = (model->BSIM4v6bvd + vbd_jct) / Nvtmd; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtmd; } here->BSIM4v6gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4v6xjbvd * T3) + ckt->CKTgmin; here->BSIM4v6cbd = DrainSatCurrent * (evbd + here->BSIM4v6XExpBVD - 1.0 - model->BSIM4v6xjbvd * T2) + ckt->CKTgmin * vbd_jct; } else { here->BSIM4v6gbd = here->BSIM4v6DslpFwd + ckt->CKTgmin; here->BSIM4v6cbd = here->BSIM4v6IVjdmFwd + here->BSIM4v6DslpFwd * (vbd_jct - here->BSIM4v6vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; default: break; } } /* trap-assisted tunneling and recombination current for reverse bias */ Nvtmrssws = model->BSIM4v6vtm0 * model->BSIM4v6njtsswstemp; Nvtmrsswgs = model->BSIM4v6vtm0 * model->BSIM4v6njtsswgstemp; Nvtmrss = model->BSIM4v6vtm0 * model->BSIM4v6njtsstemp; Nvtmrsswd = model->BSIM4v6vtm0 * model->BSIM4v6njtsswdtemp; Nvtmrsswgd = model->BSIM4v6vtm0 * model->BSIM4v6njtsswgdtemp; Nvtmrsd = model->BSIM4v6vtm0 * model->BSIM4v6njtsdtemp; if ((model->BSIM4v6vtss - vbs_jct) < (model->BSIM4v6vtss * 1e-3)) { T9 = 1.0e3; T0 = - vbs_jct / Nvtmrss * T9; DEXP(T0, T1, T10); dT1_dVb = T10 / Nvtmrss * T9; } else { T9 = 1.0 / (model->BSIM4v6vtss - vbs_jct); T0 = -vbs_jct / Nvtmrss * model->BSIM4v6vtss * T9; dT0_dVb = model->BSIM4v6vtss / Nvtmrss * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T1, T10); dT1_dVb = T10 * dT0_dVb; } if ((model->BSIM4v6vtsd - vbd_jct) < (model->BSIM4v6vtsd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsd * T9; DEXP(T0, T2, T10); dT2_dVb = T10 / Nvtmrsd * T9; } else { T9 = 1.0 / (model->BSIM4v6vtsd - vbd_jct); T0 = -vbd_jct / Nvtmrsd * model->BSIM4v6vtsd * T9; dT0_dVb = model->BSIM4v6vtsd / Nvtmrsd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T2, T10); dT2_dVb = T10 * dT0_dVb; } if ((model->BSIM4v6vtssws - vbs_jct) < (model->BSIM4v6vtssws * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrssws * T9; DEXP(T0, T3, T10); dT3_dVb = T10 / Nvtmrssws * T9; } else { T9 = 1.0 / (model->BSIM4v6vtssws - vbs_jct); T0 = -vbs_jct / Nvtmrssws * model->BSIM4v6vtssws * T9; dT0_dVb = model->BSIM4v6vtssws / Nvtmrssws * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T3, T10); dT3_dVb = T10 * dT0_dVb; } if ((model->BSIM4v6vtsswd - vbd_jct) < (model->BSIM4v6vtsswd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsswd * T9; DEXP(T0, T4, T10); dT4_dVb = T10 / Nvtmrsswd * T9; } else { T9 = 1.0 / (model->BSIM4v6vtsswd - vbd_jct); T0 = -vbd_jct / Nvtmrsswd * model->BSIM4v6vtsswd * T9; dT0_dVb = model->BSIM4v6vtsswd / Nvtmrsswd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T4, T10); dT4_dVb = T10 * dT0_dVb; } if ((model->BSIM4v6vtsswgs - vbs_jct) < (model->BSIM4v6vtsswgs * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrsswgs * T9; DEXP(T0, T5, T10); dT5_dVb = T10 / Nvtmrsswgs * T9; } else { T9 = 1.0 / (model->BSIM4v6vtsswgs - vbs_jct); T0 = -vbs_jct / Nvtmrsswgs * model->BSIM4v6vtsswgs * T9; dT0_dVb = model->BSIM4v6vtsswgs / Nvtmrsswgs * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T5, T10); dT5_dVb = T10 * dT0_dVb; } if ((model->BSIM4v6vtsswgd - vbd_jct) < (model->BSIM4v6vtsswgd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsswgd * T9; DEXP(T0, T6, T10); dT6_dVb = T10 / Nvtmrsswgd * T9; } else { T9 = 1.0 / (model->BSIM4v6vtsswgd - vbd_jct); T0 = -vbd_jct / Nvtmrsswgd * model->BSIM4v6vtsswgd * T9; dT0_dVb = model->BSIM4v6vtsswgd / Nvtmrsswgd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T6, T10); dT6_dVb = T10 * dT0_dVb; } here->BSIM4v6gbs += here->BSIM4v6SjctTempRevSatCur * dT1_dVb + here->BSIM4v6SswTempRevSatCur * dT3_dVb + here->BSIM4v6SswgTempRevSatCur * dT5_dVb; here->BSIM4v6cbs -= here->BSIM4v6SjctTempRevSatCur * (T1 - 1.0) + here->BSIM4v6SswTempRevSatCur * (T3 - 1.0) + here->BSIM4v6SswgTempRevSatCur * (T5 - 1.0); here->BSIM4v6gbd += here->BSIM4v6DjctTempRevSatCur * dT2_dVb + here->BSIM4v6DswTempRevSatCur * dT4_dVb + here->BSIM4v6DswgTempRevSatCur * dT6_dVb; here->BSIM4v6cbd -= here->BSIM4v6DjctTempRevSatCur * (T2 - 1.0) + here->BSIM4v6DswTempRevSatCur * (T4 - 1.0) + here->BSIM4v6DswgTempRevSatCur * (T6 - 1.0); /* End of diode DC model */ if (vds >= 0.0) { here->BSIM4v6mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vdb = vds - vbs; /* WDLiu: for GIDL */ } else { here->BSIM4v6mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vdb = -vbs; } /* dunga */ if(model->BSIM4v6mtrlMod) { epsrox = 3.9; toxe = model->BSIM4v6eot; epssub = EPS0 * model->BSIM4v6epsrsub; } else { epsrox = model->BSIM4v6epsrox; toxe = model->BSIM4v6toxe; epssub = EPSSI; } T0 = Vbs - here->BSIM4v6vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4v6vbsc); if (T0 >= 0.0) { Vbseff = here->BSIM4v6vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); Vbseff = here->BSIM4v6vbsc * (1.0 + T2); dVbseff_dVb = T2 * here->BSIM4v6vbsc / T1; } /* JX: Correction to forward body bias */ T9 = 0.95 * pParam->BSIM4v6phi; T0 = T9 - Vbseff - 0.001; T1 = sqrt(T0 * T0 + 0.004 * T9); Vbseff = T9 - 0.5 * (T0 + T1); dVbseff_dVb *= 0.5 * (1.0 + T0 / T1); Phis = pParam->BSIM4v6phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = pParam->BSIM4v6Xdep0 * sqrtPhis / pParam->BSIM4v6sqrtPhi; dXdep_dVb = (pParam->BSIM4v6Xdep0 / pParam->BSIM4v6sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM4v6leff; Vtm = model->BSIM4v6vtm; Vtm0 = model->BSIM4v6vtm0; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM4v6vbi - pParam->BSIM4v6phi; T0 = pParam->BSIM4v6dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v6dvt2; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v6dvt2 * T4 * T4; } lt1 = model->BSIM4v6factor1 * T3 * T1; dlt1_dVb = model->BSIM4v6factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v6dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v6dvt2w; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v6dvt2w * T4 * T4; } ltw = model->BSIM4v6factor1 * T3 * T1; dltw_dVb = model->BSIM4v6factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v6dvt1 * Leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; dT1_dVb = -T0 * T1 * dlt1_dVb / lt1; dTheta0_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { Theta0 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dTheta0_dVb = 0.0; } here->BSIM4v6thetavth = pParam->BSIM4v6dvt0 * Theta0; Delt_vth = here->BSIM4v6thetavth * V0; dDelt_vth_dVb = pParam->BSIM4v6dvt0 * dTheta0_dVb * V0; T0 = pParam->BSIM4v6dvt1w * pParam->BSIM4v6weff * Leff / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; dT1_dVb = -T0 * T1 * dltw_dVb / ltw; dT5_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dT5_dVb = 0.0; } T0 = pParam->BSIM4v6dvt0w * T5; T2 = T0 * V0; dT2_dVb = pParam->BSIM4v6dvt0w * dT5_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM4v6tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4v6lpe0 / Leff); T1 = pParam->BSIM4v6k1ox * (T0 - 1.0) * pParam->BSIM4v6sqrtPhi + (pParam->BSIM4v6kt1 + pParam->BSIM4v6kt1l / Leff + pParam->BSIM4v6kt2 * Vbseff) * TempRatio; Vth_NarrowW = toxe * pParam->BSIM4v6phi / (pParam->BSIM4v6weff + pParam->BSIM4v6w0); T3 = here->BSIM4v6eta0 + pParam->BSIM4v6etab * Vbseff; if (T3 < 1.0e-4) { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM4v6theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Lpe_Vb = sqrt(1.0 + pParam->BSIM4v6lpeb / Leff); Vth = model->BSIM4v6type * here->BSIM4v6vth0 + (pParam->BSIM4v6k1ox * sqrtPhis - pParam->BSIM4v6k1 * pParam->BSIM4v6sqrtPhi) * Lpe_Vb - here->BSIM4v6k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4v6k3 + pParam->BSIM4v6k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; dVth_dVb = Lpe_Vb * pParam->BSIM4v6k1ox * dsqrtPhis_dVb - here->BSIM4v6k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4v6k3b * Vth_NarrowW - pParam->BSIM4v6etab * Vds * pParam->BSIM4v6theta0vb0 * T4 + pParam->BSIM4v6kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp1 = epssub / Xdep; here->BSIM4v6nstar = model->BSIM4v6vtm / Charge_q * (model->BSIM4v6coxe + tmp1 + pParam->BSIM4v6cit); tmp2 = pParam->BSIM4v6nfactor * tmp1; tmp3 = pParam->BSIM4v6cdsc + pParam->BSIM4v6cdscb * Vbseff + pParam->BSIM4v6cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4v6cit) / model->BSIM4v6coxe; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v6cdscb * Theta0) / model->BSIM4v6coxe; dn_dVd = pParam->BSIM4v6cdscd * Theta0 / model->BSIM4v6coxe; } else { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v6cdscb * Theta0) / model->BSIM4v6coxe * T0; dn_dVd = pParam->BSIM4v6cdscd * Theta0 / model->BSIM4v6coxe * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4v6dvtp0 > 0.0) { T0 = -pParam->BSIM4v6dvtp1 * Vds; if (T0 < -EXP_THRESHOLD) { T2 = MIN_EXP; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->BSIM4v6dvtp1 * T2; } T3 = Leff + pParam->BSIM4v6dvtp0 * (1.0 + T2); dT3_dVd = pParam->BSIM4v6dvtp0 * dT2_dVd; if (model->BSIM4v6tempMod < 2) { T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; } else { T4 = model->BSIM4v6vtm0 * log(Leff / T3); dT4_dVd = -model->BSIM4v6vtm0 * dT3_dVd / T3; } dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; Vth -= n * T4; dVth_dVd -= dDITS_Sft_dVd; dVth_dVb -= dDITS_Sft_dVb; } here->BSIM4v6von = Vth; /* Poly Gate Si Depletion Effect */ T0 = here->BSIM4v6vfb + pParam->BSIM4v6phi; if(model->BSIM4v6mtrlMod == 0) T1 = EPSSI; else T1 = model->BSIM4v6epsrgate * EPS0; BSIM4v6polyDepletion(T0, pParam->BSIM4v6ngate, T1, model->BSIM4v6coxe, vgs, &vgs_eff, &dvgs_eff_dvg); BSIM4v6polyDepletion(T0, pParam->BSIM4v6ngate, T1, model->BSIM4v6coxe, vgd, &vgd_eff, &dvgd_eff_dvg); if(here->BSIM4v6mode>0) { Vgs_eff = vgs_eff; dVgs_eff_dVg = dvgs_eff_dvg; } else { Vgs_eff = vgd_eff; dVgs_eff_dVg = dvgd_eff_dvg; } here->BSIM4v6vgs_eff = vgs_eff; here->BSIM4v6vgd_eff = vgd_eff; here->BSIM4v6dvgs_eff_dvg = dvgs_eff_dvg; here->BSIM4v6dvgd_eff_dvg = dvgd_eff_dvg; Vgst = Vgs_eff - Vth; /* Calculate Vgsteff */ T0 = n * Vtm; T1 = pParam->BSIM4v6mstar * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4v6mstar * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4v6mstar; dT10_dVb = -dVth_dVb * pParam->BSIM4v6mstar; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4v6mstar * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4v6voffcbn - (1.0 - pParam->BSIM4v6mstar) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MIN_EXP / pParam->BSIM4v6cdep0; T9 = pParam->BSIM4v6mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MAX_EXP / pParam->BSIM4v6cdep0; T9 = pParam->BSIM4v6mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4v6coxe / pParam->BSIM4v6cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4v6mstar + n * T4; dT9_dVg = T3 * (pParam->BSIM4v6mstar - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } here->BSIM4v6Vgsteff = Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM4v6sqrtPhi; Weff = pParam->BSIM4v6weff - 2.0 * (pParam->BSIM4v6dwg * Vgsteff + pParam->BSIM4v6dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM4v6dwg; dWeff_dVb = -2.0 * pParam->BSIM4v6dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } if (model->BSIM4v6rdsMod == 1) Rds = dRds_dVg = dRds_dVb = 0.0; else { T0 = 1.0 + pParam->BSIM4v6prwg * Vgsteff; dT0_dVg = -pParam->BSIM4v6prwg / T0 / T0; T1 = pParam->BSIM4v6prwb * T9; dT1_dVb = pParam->BSIM4v6prwb * dsqrtPhis_dVb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); /* 0.01 = 4.0 * 0.05 * 0.05 */ dT3_dVg = 1.0 + T2 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; T4 = pParam->BSIM4v6rds0 * 0.5; Rds = pParam->BSIM4v6rdswmin + T3 * T4; dRds_dVg = T4 * dT3_dVg; dRds_dVb = T4 * dT3_dVb; if (Rds > 0.0) here->BSIM4v6grdsw = 1.0 / Rds* here->BSIM4v6nf; /*4.6.2*/ else here->BSIM4v6grdsw = 0.0; } /* Calculate Abulk */ T9 = 0.5 * pParam->BSIM4v6k1ox * Lpe_Vb / sqrtPhis; T1 = T9 + here->BSIM4v6k2ox - pParam->BSIM4v6k3b * Vth_NarrowW; dT1_dVb = -T9 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM4v6xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM4v6a0 * T5; tmp3 = pParam->BSIM4v6weff + pParam->BSIM4v6b1; tmp4 = pParam->BSIM4v6b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM4v6ags * pParam->BSIM4v6a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } here->BSIM4v6Abulk = Abulk; T2 = pParam->BSIM4v6keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM4v6keta * T0 * T0; } else { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM4v6keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM4v6mtrlMod) T14 = 2.0 * model->BSIM4v6type *(model->BSIM4v6phig - model->BSIM4v6easub - 0.5*model->BSIM4v6Eg0 + 0.45); else T14 = 0.0; if (model->BSIM4v6mobMod == 0) { T0 = Vgsteff + Vth + Vth - T14; T2 = pParam->BSIM4v6ua + pParam->BSIM4v6uc * Vbseff; T3 = T0 / toxe; T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4v6ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T3 * (T2 + pParam->BSIM4v6ub * T3) + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4v6ub * T3) / toxe; T13 = 2.0 * (dDenomi_dVg + T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + pParam->BSIM4v6uc * T3; dDenomi_dVg+= T7; } else if (model->BSIM4v6mobMod == 1) { T0 = Vgsteff + Vth + Vth - T14; T2 = 1.0 + pParam->BSIM4v6uc * Vbseff; T3 = T0 / toxe; T4 = T3 * (pParam->BSIM4v6ua + pParam->BSIM4v6ub * T3); T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4v6ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T4 * T2 + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = (pParam->BSIM4v6ua + 2.0 * pParam->BSIM4v6ub * T3) * T2 / toxe; T13 = 2.0 * (dDenomi_dVg + T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + pParam->BSIM4v6uc * T4; dDenomi_dVg+= T7; } else if (model->BSIM4v6mobMod == 2) { T0 = (Vgsteff + here->BSIM4v6vtfbphi1) / toxe; T1 = exp(pParam->BSIM4v6eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4v6eu / T0 / toxe; T2 = pParam->BSIM4v6ua + pParam->BSIM4v6uc * Vbseff; T3 = T0 / toxe; /*Do we need it?*/ T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4v6ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T1 * T2 + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = T2 * dT1_dVg + T7; T13 = 2.0 * (T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + T1 * pParam->BSIM4v6uc; } /*high K mobility*/ else { /*univsersal mobility*/ T0 = (Vgsteff + here->BSIM4v6vtfbphi1)* 1.0e-8 / toxe/6.0; T1 = exp(pParam->BSIM4v6eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4v6eu * 1.0e-8/ T0 / toxe/6.0; T2 = pParam->BSIM4v6ua + pParam->BSIM4v6uc * Vbseff; /*Coulombic*/ VgsteffVth = pParam->BSIM4v6VgsteffVth; T10 = exp(pParam->BSIM4v6ucs * log(0.5 + 0.5 * Vgsteff/VgsteffVth)); T11 = pParam->BSIM4v6ud/T10; dT11_dVg = - 0.5 * pParam->BSIM4v6ucs * T11 /(0.5 + 0.5*Vgsteff/VgsteffVth)/VgsteffVth; dDenomi_dVg = T2 * dT1_dVg + dT11_dVg; dDenomi_dVd = 0.0; dDenomi_dVb = T1 * pParam->BSIM4v6uc; T5 = T1 * T2 + T11; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM4v6ueff = ueff = here->BSIM4v6u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * here->BSIM4v6vsattemp * model->BSIM4v6coxe; WVCoxRds = WVCox * Rds; Esat = 2.0 * here->BSIM4v6vsattemp / ueff; here->BSIM4v6EsatL = EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM4v6a1; if (a1 == 0.0) { Lambda = pParam->BSIM4v6a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) { T0 = 1.0 - pParam->BSIM4v6a2; T1 = T0 - pParam->BSIM4v6a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM4v6a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v6a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM4v6a2 + pParam->BSIM4v6a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4v6a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v6a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM4v6vdsat = Vdsat; /* Calculate Vdseff */ T1 = Vdsat - Vds - pParam->BSIM4v6delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4v6delta * Vdsat); T0 = T1 / T2; T9 = 2.0 * pParam->BSIM4v6delta; T3 = T9 / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; if (T1 >= 0.0) { Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); } else { T4 = T9 / (T2 - T1); T5 = 1.0 - T4; T6 = Vdsat * T4 / (T2 - T1); Vdseff = Vdsat * T5; dVdseff_dVg = dVdsat_dVg * T5 + T6 * (dT2_dVg - dT1_dVg); dVdseff_dVd = dVdsat_dVd * T5 + T6 * (dT2_dVd - dT1_dVd); dVdseff_dVb = dVdsat_dVb * T5 + T6 * (dT2_dVb - dT1_dVb); } if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; here->BSIM4v6Vdseff = Vdseff; /* Velocity Overshoot */ if((model->BSIM4v6lambdaGiven) && (model->BSIM4v6lambda > 0.0) ) { T1 = Leff * ueff; T2 = pParam->BSIM4v6lambda / T1; T3 = -T2 / T1 * Leff; dT2_dVd = T3 * dueff_dVd; dT2_dVg = T3 * dueff_dVg; dT2_dVb = T3 * dueff_dVb; T5 = 1.0 / (Esat * pParam->BSIM4v6litl); T4 = -T5 / EsatL; dT5_dVg = dEsatL_dVg * T4; dT5_dVd = dEsatL_dVd * T4; dT5_dVb = dEsatL_dVb * T4; T6 = 1.0 + diffVds * T5; dT6_dVg = dT5_dVg * diffVds - dVdseff_dVg * T5; dT6_dVd = dT5_dVd * diffVds + (1.0 - dVdseff_dVd) * T5; dT6_dVb = dT5_dVb * diffVds - dVdseff_dVb * T5; T7 = 2.0 / (T6 * T6 + 1.0); T8 = 1.0 - T7; T9 = T6 * T7 * T7; dT8_dVg = T9 * dT6_dVg; dT8_dVd = T9 * dT6_dVd; dT8_dVb = T9 * dT6_dVb; T10 = 1.0 + T2 * T8; dT10_dVg = dT2_dVg * T8 + T2 * dT8_dVg; dT10_dVd = dT2_dVd * T8 + T2 * dT8_dVd; dT10_dVb = dT2_dVb * T8 + T2 * dT8_dVb; if(T10 == 1.0) dT10_dVg = dT10_dVd = dT10_dVb = 0.0; dEsatL_dVg *= T10; dEsatL_dVg += EsatL * dT10_dVg; dEsatL_dVd *= T10; dEsatL_dVd += EsatL * dT10_dVd; dEsatL_dVb *= T10; dEsatL_dVb += EsatL * dT10_dVb; EsatL *= T10; Esat = EsatL / Leff; /* bugfix by Wenwei Yang (4.6.4) */ here->BSIM4v6EsatL = EsatL; } /* Calculate Vasat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; /* Calculate Idl first */ tmp1 = here->BSIM4v6vtfbphi2; tmp2 = 2.0e8 * model->BSIM4v6toxp; dT0_dVg = 1.0 / tmp2; T0 = (Vgsteff + tmp1) * dT0_dVg; tmp3 = exp(model->BSIM4v6bdos * 0.7 * log(T0)); T1 = 1.0 + tmp3; T2 = model->BSIM4v6bdos * 0.7 * tmp3 / T0; Tcen = model->BSIM4v6ados * 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 * dT0_dVg / T1; Coxeff = epssub * model->BSIM4v6coxp / (epssub + model->BSIM4v6coxp * Tcen); dCoxeff_dVg = -Coxeff * Coxeff * dTcen_dVg / epssub; CoxeffWovL = Coxeff * Weff / Leff; beta = ueff * CoxeffWovL; T3 = ueff / Leff; dbeta_dVg = CoxeffWovL * dueff_dVg + T3 * (Weff * dCoxeff_dVg + Coxeff * dWeff_dVg); dbeta_dVd = CoxeffWovL * dueff_dVd; dbeta_dVb = CoxeffWovL * dueff_dVb + T3 * Coxeff * dWeff_dVb; here->BSIM4v6AbovVgst2Vtm = Abulk / Vgst2Vtm; T0 = 1.0 - 0.5 * Vdseff * here->BSIM4v6AbovVgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; Idl = gche / T0; T1 = (1.0 - Idl * Rds) / T0; T2 = Idl * Idl; dIdl_dVg = T1 * dgche_dVg - T2 * dRds_dVg; dIdl_dVd = T1 * dgche_dVd; dIdl_dVb = T1 * dgche_dVb - T2 * dRds_dVb; /* Calculate degradation factor due to pocket implant */ if (pParam->BSIM4v6fprout <= 0.0) { FP = 1.0; dFP_dVg = 0.0; } else { T9 = pParam->BSIM4v6fprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); dFP_dVg = FP * FP * T9 / Vgst2Vtm; } /* Calculate VACLM */ T8 = pParam->BSIM4v6pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { PvagTerm = 1.0 + T9; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dPvagTerm_dVb = -T9 * dEsatL_dVb / EsatL; dPvagTerm_dVd = -T9 * dEsatL_dVd / EsatL; } else { T4 = 1.0 / (17.0 + 20.0 * T9); PvagTerm = (0.8 + T9) * T4; T4 *= T4; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T4; T9 *= T4 / EsatL; dPvagTerm_dVb = -T9 * dEsatL_dVb; dPvagTerm_dVd = -T9 * dEsatL_dVd; } if ((pParam->BSIM4v6pclm > MIN_EXP) && (diffVds > 1.0e-10)) { T0 = 1.0 + Rds * Idl; dT0_dVg = dRds_dVg * Idl + Rds * dIdl_dVg; dT0_dVd = Rds * dIdl_dVd; dT0_dVb = dRds_dVb * Idl + Rds * dIdl_dVb; T2 = Vdsat / Esat; T1 = Leff + T2; dT1_dVg = (dVdsat_dVg - T2 * dEsatL_dVg / Leff) / Esat; dT1_dVd = (dVdsat_dVd - T2 * dEsatL_dVd / Leff) / Esat; dT1_dVb = (dVdsat_dVb - T2 * dEsatL_dVb / Leff) / Esat; Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4v6pclm * pParam->BSIM4v6litl); dCclm_dVg = Cclm * (dFP_dVg / FP + dPvagTerm_dVg / PvagTerm + dT0_dVg / T0 + dT1_dVg / T1); dCclm_dVb = Cclm * (dPvagTerm_dVb / PvagTerm + dT0_dVb / T0 + dT1_dVb / T1); dCclm_dVd = Cclm * (dPvagTerm_dVd / PvagTerm + dT0_dVd / T0 + dT1_dVd / T1); VACLM = Cclm * diffVds; dVACLM_dVg = dCclm_dVg * diffVds - dVdseff_dVg * Cclm; dVACLM_dVb = dCclm_dVb * diffVds - dVdseff_dVb * Cclm; dVACLM_dVd = dCclm_dVd * diffVds + (1.0 - dVdseff_dVd) * Cclm; } else { VACLM = Cclm = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; dCclm_dVd = dCclm_dVg = dCclm_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM4v6thetaRout > MIN_EXP) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM4v6thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM4v6pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4v6pdiblb) * T3; dVADIBL_dVd *= T3; } else { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM4v6pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } dVADIBL_dVg = dVADIBL_dVg * PvagTerm + VADIBL * dPvagTerm_dVg; dVADIBL_dVb = dVADIBL_dVb * PvagTerm + VADIBL * dPvagTerm_dVb; dVADIBL_dVd = dVADIBL_dVd * PvagTerm + VADIBL * dPvagTerm_dVd; VADIBL *= PvagTerm; } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate Va */ Va = Vasat + VACLM; dVa_dVg = dVasat_dVg + dVACLM_dVg; dVa_dVb = dVasat_dVb + dVACLM_dVb; dVa_dVd = dVasat_dVd + dVACLM_dVd; /* Calculate VADITS */ T0 = pParam->BSIM4v6pditsd * Vds; if (T0 > EXP_THRESHOLD) { T1 = MAX_EXP; dT1_dVd = 0; } else { T1 = exp(T0); dT1_dVd = T1 * pParam->BSIM4v6pditsd; } if (pParam->BSIM4v6pdits > MIN_EXP) { T2 = 1.0 + model->BSIM4v6pditsl * Leff; VADITS = (1.0 + T2 * T1) / pParam->BSIM4v6pdits; dVADITS_dVg = VADITS * dFP_dVg; dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4v6pdits; VADITS *= FP; } else { VADITS = MAX_EXP; dVADITS_dVg = dVADITS_dVd = 0; } /* Calculate VASCBE */ if ((pParam->BSIM4v6pscbe2 > 0.0)&&(pParam->BSIM4v6pscbe1>=0.0)) /*4.6.2*/ { if (diffVds > pParam->BSIM4v6pscbe1 * pParam->BSIM4v6litl / EXP_THRESHOLD) { T0 = pParam->BSIM4v6pscbe1 * pParam->BSIM4v6litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM4v6pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM4v6pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Add DIBL to Ids */ T9 = diffVds / VADIBL; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVADIBL_dVg) / VADIBL; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVADIBL_dVd) / VADIBL; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVADIBL_dVb) / VADIBL; /* Add DITS to Ids */ T9 = diffVds / VADITS; T0 = 1.0 + T9; dIdsa_dVg = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVADITS_dVg) / VADITS; dIdsa_dVd = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVADITS_dVd) / VADITS; dIdsa_dVb = T0 * dIdsa_dVb - Idsa * dVdseff_dVb / VADITS; Idsa *= T0; /* Add CLM to Ids */ T0 = log(Va / Vasat); dT0_dVg = dVa_dVg / Va - dVasat_dVg / Vasat; dT0_dVb = dVa_dVb / Va - dVasat_dVb / Vasat; dT0_dVd = dVa_dVd / Va - dVasat_dVd / Vasat; T1 = T0 / Cclm; T9 = 1.0 + T1; dT9_dVg = (dT0_dVg - T1 * dCclm_dVg) / Cclm; dT9_dVb = (dT0_dVb - T1 * dCclm_dVb) / Cclm; dT9_dVd = (dT0_dVd - T1 * dCclm_dVd) / Cclm; dIdsa_dVg = dIdsa_dVg * T9 + Idsa * dT9_dVg; dIdsa_dVb = dIdsa_dVb * T9 + Idsa * dT9_dVb; dIdsa_dVd = dIdsa_dVd * T9 + Idsa * dT9_dVd; Idsa *= T9; /* Substrate current begins */ tmp = pParam->BSIM4v6alpha0 + pParam->BSIM4v6alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM4v6beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM4v6beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM4v6beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } T4 = Idsa * Vdseff; Isub = T1 * T4; Gbg = T1 * (dIdsa_dVg * Vdseff + Idsa * dVdseff_dVg) + T4 * dT1_dVg; Gbd = T1 * (dIdsa_dVd * Vdseff + Idsa * dVdseff_dVd) + T4 * dT1_dVd; Gbb = T1 * (dIdsa_dVb * Vdseff + Idsa * dVdseff_dVb) + T4 * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; } here->BSIM4v6csub = Isub; here->BSIM4v6gbbs = Gbb; here->BSIM4v6gbgs = Gbg; here->BSIM4v6gbds = Gbd; /* Add SCBE to Ids */ T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; tmp1 = Gds + Gm * dVgsteff_dVd; tmp2 = Gmb + Gm * dVgsteff_dVb; tmp3 = Gm; Gm = (Ids * dVdseff_dVg + Vdseff * tmp3) * dVgsteff_dVg; Gds = Ids * (dVdseff_dVd + dVdseff_dVg * dVgsteff_dVd) + Vdseff * tmp1; Gmb = (Ids * (dVdseff_dVb + dVdseff_dVg * dVgsteff_dVb) + Vdseff * tmp2) * dVbseff_dVb; cdrain = Ids * Vdseff; /* Source End Velocity Limit */ if((model->BSIM4v6vtlGiven) && (model->BSIM4v6vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; vs = cdrain * T11; /* vs */ dvs_dVg = Gm * T11 + cdrain * T10 * dVgsteff_dVg; dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; T1 = vs / (pParam->BSIM4v6vtl * pParam->BSIM4v6tfactor); if(T1 > 0.0) { T2 = 1.0 + exp(T0 * log(T1)); T3 = (T2 - 1.0) * T0 / vs; Fsevl = 1.0 / exp(log(T2)/ T0); dT2_dVg = T3 * dvs_dVg; dT2_dVd = T3 * dvs_dVd; dT2_dVb = T3 * dvs_dVb; T4 = -1.0 / T0 * Fsevl / T2; dFsevl_dVg = T4 * dT2_dVg; dFsevl_dVd = T4 * dT2_dVd; dFsevl_dVb = T4 * dT2_dVb; } else { Fsevl = 1.0; dFsevl_dVg = 0.0; dFsevl_dVd = 0.0; dFsevl_dVb = 0.0; } Gm *=Fsevl; Gm += cdrain * dFsevl_dVg; Gmb *=Fsevl; Gmb += cdrain * dFsevl_dVb; Gds *=Fsevl; Gds += cdrain * dFsevl_dVd; cdrain *= Fsevl; } here->BSIM4v6gds = Gds; here->BSIM4v6gm = Gm; here->BSIM4v6gmbs = Gmb; here->BSIM4v6IdovVds = Ids; if( here->BSIM4v6IdovVds <= 1.0e-9) here->BSIM4v6IdovVds = 1.0e-9; /* Calculate Rg */ if ((here->BSIM4v6rgateMod > 1) || (here->BSIM4v6trnqsMod != 0) || (here->BSIM4v6acnqsMod != 0)) { T9 = pParam->BSIM4v6xrcrg2 * model->BSIM4v6vtm; T0 = T9 * beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; here->BSIM4v6gcrg = pParam->BSIM4v6xrcrg1 * ( T0 + Ids); here->BSIM4v6gcrgd = pParam->BSIM4v6xrcrg1 * (dT0_dVd + tmp1); here->BSIM4v6gcrgb = pParam->BSIM4v6xrcrg1 * (dT0_dVb + tmp2) * dVbseff_dVb; here->BSIM4v6gcrgg = pParam->BSIM4v6xrcrg1 * (dT0_dVg + tmp3) * dVgsteff_dVg; if (here->BSIM4v6nf != 1.0) { here->BSIM4v6gcrg *= here->BSIM4v6nf; here->BSIM4v6gcrgg *= here->BSIM4v6nf; here->BSIM4v6gcrgd *= here->BSIM4v6nf; here->BSIM4v6gcrgb *= here->BSIM4v6nf; } if (here->BSIM4v6rgateMod == 2) { T10 = here->BSIM4v6grgeltd * here->BSIM4v6grgeltd; T11 = here->BSIM4v6grgeltd + here->BSIM4v6gcrg; here->BSIM4v6gcrg = here->BSIM4v6grgeltd * here->BSIM4v6gcrg / T11; T12 = T10 / T11 / T11; here->BSIM4v6gcrgg *= T12; here->BSIM4v6gcrgd *= T12; here->BSIM4v6gcrgb *= T12; } here->BSIM4v6gcrgs = -(here->BSIM4v6gcrgg + here->BSIM4v6gcrgd + here->BSIM4v6gcrgb); } /* Calculate bias-dependent external S/D resistance */ if (model->BSIM4v6rdsMod) { /* Rs(V) */ T0 = vgs - pParam->BSIM4v6vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; T0 = 1.0 + pParam->BSIM4v6prwg * vgs_eff; dT0_dvg = -pParam->BSIM4v6prwg / T0 / T0 * dvgs_eff_dvg; T1 = -pParam->BSIM4v6prwb * vbs; dT1_dvb = -pParam->BSIM4v6prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v6rs0 * 0.5; Rs = pParam->BSIM4v6rswmin + T3 * T4; dRs_dvg = T4 * dT3_dvg; dRs_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v6sourceConductance * Rs; here->BSIM4v6gstot = here->BSIM4v6sourceConductance / T0; T0 = -here->BSIM4v6gstot * here->BSIM4v6gstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dvg; dgstot_dvb = T0 * dRs_dvb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd); /* Rd(V) */ T0 = vgd - pParam->BSIM4v6vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; T0 = 1.0 + pParam->BSIM4v6prwg * vgd_eff; dT0_dvg = -pParam->BSIM4v6prwg / T0 / T0 * dvgd_eff_dvg; T1 = -pParam->BSIM4v6prwb * vbd; dT1_dvb = -pParam->BSIM4v6prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v6rd0 * 0.5; Rd = pParam->BSIM4v6rdwmin + T3 * T4; dRd_dvg = T4 * dT3_dvg; dRd_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v6drainConductance * Rd; here->BSIM4v6gdtot = here->BSIM4v6drainConductance / T0; T0 = -here->BSIM4v6gdtot * here->BSIM4v6gdtot; dgdtot_dvs = 0.0; dgdtot_dvg = T0 * dRd_dvg; dgdtot_dvb = T0 * dRd_dvb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs); here->BSIM4v6gstotd = vses * dgstot_dvd; here->BSIM4v6gstotg = vses * dgstot_dvg; here->BSIM4v6gstots = vses * dgstot_dvs; here->BSIM4v6gstotb = vses * dgstot_dvb; T2 = vdes - vds; here->BSIM4v6gdtotd = T2 * dgdtot_dvd; here->BSIM4v6gdtotg = T2 * dgdtot_dvg; here->BSIM4v6gdtots = T2 * dgdtot_dvs; here->BSIM4v6gdtotb = T2 * dgdtot_dvb; } else /* WDLiu: for bypass */ { here->BSIM4v6gstot = here->BSIM4v6gstotd = here->BSIM4v6gstotg = 0.0; here->BSIM4v6gstots = here->BSIM4v6gstotb = 0.0; here->BSIM4v6gdtot = here->BSIM4v6gdtotd = here->BSIM4v6gdtotg = 0.0; here->BSIM4v6gdtots = here->BSIM4v6gdtotb = 0.0; } /* Calculate GIDL current */ vgs_eff = here->BSIM4v6vgs_eff; dvgs_eff_dvg = here->BSIM4v6dvgs_eff_dvg; if(model->BSIM4v6mtrlMod == 0) T0 = 3.0 * toxe; else T0 = model->BSIM4v6epsrsub * toxe / epsrox; if(model->BSIM4v6mtrlMod ==0) T1 = (vds - vgs_eff - pParam->BSIM4v6egidl ) / T0; else T1 = (vds - vgs_eff - pParam->BSIM4v6egidl + pParam->BSIM4v6vfbsd) / T0; if ((pParam->BSIM4v6agidl <= 0.0) || (pParam->BSIM4v6bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v6cgidl <= 0.0) || (vbd > 0.0)) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgs_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v6bgidl / T1; if (T2 < 100.0) { Igidl = pParam->BSIM4v6agidl * pParam->BSIM4v6weffCJ * T1 * exp(-T2); T3 = Igidl * (1.0 + T2) / T1; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else { Igidl = pParam->BSIM4v6agidl * pParam->BSIM4v6weffCJ * 3.720075976e-44; Ggidld = Igidl * dT1_dVd; Ggidlg = Igidl * dT1_dVg; Igidl *= T1; } T4 = vbd * vbd; T5 = -vbd * T4; T6 = pParam->BSIM4v6cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v6cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; Igidl *= T7; } here->BSIM4v6Igidl = Igidl; here->BSIM4v6ggidld = Ggidld; here->BSIM4v6ggidlg = Ggidlg; here->BSIM4v6ggidlb = Ggidlb; /* Calculate GISL current */ vgd_eff = here->BSIM4v6vgd_eff; dvgd_eff_dvg = here->BSIM4v6dvgd_eff_dvg; if(model->BSIM4v6mtrlMod ==0) T1 = (-vds - vgd_eff - pParam->BSIM4v6egisl ) / T0; else T1 = (-vds - vgd_eff - pParam->BSIM4v6egisl + pParam->BSIM4v6vfbsd ) / T0; if ((pParam->BSIM4v6agisl <= 0.0) || (pParam->BSIM4v6bgisl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v6cgisl <= 0.0) || (vbs > 0.0)) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgd_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v6bgisl / T1; if (T2 < 100.0) { Igisl = pParam->BSIM4v6agisl * pParam->BSIM4v6weffCJ * T1 * exp(-T2); T3 = Igisl * (1.0 + T2) / T1; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else { Igisl = pParam->BSIM4v6agisl * pParam->BSIM4v6weffCJ * 3.720075976e-44; Ggisls = Igisl * dT1_dVd; Ggislg = Igisl * dT1_dVg; Igisl *= T1; } T4 = vbs * vbs; T5 = -vbs * T4; T6 = pParam->BSIM4v6cgisl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v6cgisl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; Igisl *= T7; } here->BSIM4v6Igisl = Igisl; here->BSIM4v6ggisls = Ggisls; here->BSIM4v6ggislg = Ggislg; here->BSIM4v6ggislb = Ggislb; /* Calculate gate tunneling current */ if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { Vfb = here->BSIM4v6vfbzb; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1; /* WDLiu: -No surprise? No. -Good! */ Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) /* WDLiu: Avoiding numerical instability. */ Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; T0 = 0.5 * pParam->BSIM4v6k1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->BSIM4v6k1ox == 0.0) Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = 0.0; else if (T3 < 0.0) { Voxdepinv = -T3; dVoxdepinv_dVg = -dVgs_eff_dVg + dVfbeff_dVg + dVgsteff_dVg; dVoxdepinv_dVd = dVgsteff_dVd; dVoxdepinv_dVb = dVfbeff_dVb + 1.0 + dVgsteff_dVb; } else { T1 = sqrt(T0 * T0 + T3); T2 = T0 / T1; Voxdepinv = pParam->BSIM4v6k1ox * (T1 - T0); dVoxdepinv_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dVoxdepinv_dVd = -T2 * dVgsteff_dVd; dVoxdepinv_dVb = -T2 * (dVfbeff_dVb + 1.0 + dVgsteff_dVb); } Voxdepinv += Vgsteff; dVoxdepinv_dVg += dVgsteff_dVg; dVoxdepinv_dVd += dVgsteff_dVd; dVoxdepinv_dVb += dVgsteff_dVb; } if(model->BSIM4v6tempMod < 2) tmp = Vtm; else /* model->BSIM4v6tempMod = 2 , 3*/ tmp = Vtm0; if (model->BSIM4v6igcMod) { T0 = tmp * pParam->BSIM4v6nigc; if(model->BSIM4v6igcMod == 1) { VxNVt = (Vgs_eff - model->BSIM4v6type * here->BSIM4v6vth0) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - model->BSIM4v6type * here->BSIM4v6vth0; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; } } else if (model->BSIM4v6igcMod == 2) { VxNVt = (Vgs_eff - here->BSIM4v6von) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - here->BSIM4v6von; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = -dVth_dVd; dVaux_dVb = -dVth_dVb; } } if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else if ((VxNVt >= -EXP_THRESHOLD) && (VxNVt <= EXP_THRESHOLD)) { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); if(model->BSIM4v6igcMod == 1) { dVaux_dVd = 0.0; dVaux_dVb = 0.0; } else if (model->BSIM4v6igcMod == 2) { dVaux_dVd = -dVgs_eff_dVg * dVth_dVd; dVaux_dVb = -dVgs_eff_dVg * dVth_dVb; } dVaux_dVg *= dVgs_eff_dVg; } T2 = Vgs_eff * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + Vgs_eff * dVaux_dVg; dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; T11 = pParam->BSIM4v6Aechvb; T12 = pParam->BSIM4v6Bechvb; T3 = pParam->BSIM4v6aigc * pParam->BSIM4v6cigc - pParam->BSIM4v6bigc; T4 = pParam->BSIM4v6bigc * pParam->BSIM4v6cigc; T5 = T12 * (pParam->BSIM4v6aigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igc = T11 * T2 * T6; dIgc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); if (model->BSIM4v6pigcdGiven) { Pigcd = pParam->BSIM4v6pigcd; dPigcd_dVg = dPigcd_dVd = dPigcd_dVb = 0.0; } else { T11 = pParam->BSIM4v6Bechvb * toxe; T12 = Vgsteff + 1.0e-20; T13 = T11 / T12 / T12; T14 = -T13 / T12; Pigcd = T13 * (1.0 - 0.5 * Vdseff / T12); dPigcd_dVg = T14 * (2.0 + 0.5 * (dVdseff_dVg - 3.0 * Vdseff / T12)); dPigcd_dVd = 0.5 * T14 * dVdseff_dVd; dPigcd_dVb = 0.5 * T14 * dVdseff_dVb; } T7 = -Pigcd * Vdseff; /* bugfix */ dT7_dVg = -Vdseff * dPigcd_dVg - Pigcd * dVdseff_dVg; dT7_dVd = -Vdseff * dPigcd_dVd - Pigcd * dVdseff_dVd + dT7_dVg * dVgsteff_dVd; dT7_dVb = -Vdseff * dPigcd_dVb - Pigcd * dVdseff_dVb + dT7_dVg * dVgsteff_dVb; dT7_dVg *= dVgsteff_dVg; dT7_dVb *= dVbseff_dVb; T8 = T7 * T7 + 2.0e-4; dT8_dVg = 2.0 * T7; dT8_dVd = dT8_dVg * dT7_dVd; dT8_dVb = dT8_dVg * dT7_dVb; dT8_dVg *= dT7_dVg; if (T7 > EXP_THRESHOLD) { T9 = MAX_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else if (T7 < -EXP_THRESHOLD) { T9 = MIN_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else { T9 = exp(T7); dT9_dVg = T9 * dT7_dVg; dT9_dVd = T9 * dT7_dVd; dT9_dVb = T9 * dT7_dVb; } T0 = T8 * T8; T1 = T9 - 1.0 + 1.0e-4; T10 = (T1 - T7) / T8; dT10_dVg = (dT9_dVg - dT7_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT9_dVd - dT7_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT9_dVb - dT7_dVb - T10 * dT8_dVb) / T8; Igcs = Igc * T10; dIgcs_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcs_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcs_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; T1 = T9 - 1.0 - 1.0e-4; T10 = (T7 * T9 - T1) / T8; dT10_dVg = (dT7_dVg * T9 + (T7 - 1.0) * dT9_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT7_dVd * T9 + (T7 - 1.0) * dT9_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT7_dVb * T9 + (T7 - 1.0) * dT9_dVb - T10 * dT8_dVb) / T8; Igcd = Igc * T10; dIgcd_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; here->BSIM4v6Igcs = Igcs; here->BSIM4v6gIgcsg = dIgcs_dVg; here->BSIM4v6gIgcsd = dIgcs_dVd; here->BSIM4v6gIgcsb = dIgcs_dVb * dVbseff_dVb; here->BSIM4v6Igcd = Igcd; here->BSIM4v6gIgcdg = dIgcd_dVg; here->BSIM4v6gIgcdd = dIgcd_dVd; here->BSIM4v6gIgcdb = dIgcd_dVb * dVbseff_dVb; T0 = vgs - (pParam->BSIM4v6vfbsd + pParam->BSIM4v6vfbsdoff); vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; T11 = pParam->BSIM4v6AechvbEdgeS; T12 = pParam->BSIM4v6BechvbEdge; T3 = pParam->BSIM4v6aigs * pParam->BSIM4v6cigs - pParam->BSIM4v6bigs; T4 = pParam->BSIM4v6bigs * pParam->BSIM4v6cigs; T5 = T12 * (pParam->BSIM4v6aigs + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgs_eff) * dvgs_eff_dvg; } Igs = T11 * T2 * T6; dIgs_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgs_dVs = -dIgs_dVg; T0 = vgd - (pParam->BSIM4v6vfbsd + pParam->BSIM4v6vfbsdoff); vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; T11 = pParam->BSIM4v6AechvbEdgeD; T3 = pParam->BSIM4v6aigd * pParam->BSIM4v6cigd - pParam->BSIM4v6bigd; T4 = pParam->BSIM4v6bigd * pParam->BSIM4v6cigd; T5 = T12 * (pParam->BSIM4v6aigd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgd_eff) * dvgd_eff_dvg; } Igd = T11 * T2 * T6; dIgd_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; here->BSIM4v6Igs = Igs; here->BSIM4v6gIgsg = dIgs_dVg; here->BSIM4v6gIgss = dIgs_dVs; here->BSIM4v6Igd = Igd; here->BSIM4v6gIgdg = dIgd_dVg; here->BSIM4v6gIgdd = dIgd_dVd; } else { here->BSIM4v6Igcs = here->BSIM4v6gIgcsg = here->BSIM4v6gIgcsd = here->BSIM4v6gIgcsb = 0.0; here->BSIM4v6Igcd = here->BSIM4v6gIgcdg = here->BSIM4v6gIgcdd = here->BSIM4v6gIgcdb = 0.0; here->BSIM4v6Igs = here->BSIM4v6gIgsg = here->BSIM4v6gIgss = 0.0; here->BSIM4v6Igd = here->BSIM4v6gIgdg = here->BSIM4v6gIgdd = 0.0; } if (model->BSIM4v6igbMod) { T0 = tmp * pParam->BSIM4v6nigbacc; T1 = -Vgs_eff + Vbseff + Vfb; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = -dVgs_eff_dVg; dVaux_dVb = 1.0; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVb = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVg = -dVaux_dVb * dVgs_eff_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 = 4.97232e-7 * pParam->BSIM4v6weff * pParam->BSIM4v6leff * pParam->BSIM4v6ToxRatio; T12 = -7.45669e11 * toxe; T3 = pParam->BSIM4v6aigbacc * pParam->BSIM4v6cigbacc - pParam->BSIM4v6bigbacc; T4 = pParam->BSIM4v6bigbacc * pParam->BSIM4v6cigbacc; T5 = T12 * (pParam->BSIM4v6aigbacc + T3 * Voxacc - T4 * Voxacc * Voxacc); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxacc); dT6_dVb = dT6_dVg * dVoxacc_dVb; dT6_dVg *= dVoxacc_dVg; } Igbacc = T11 * T2 * T6; dIgbacc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbacc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); T0 = tmp * pParam->BSIM4v6nigbinv; T1 = Voxdepinv - pParam->BSIM4v6eigbinv; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = dVoxdepinv_dVg; dVaux_dVd = dVoxdepinv_dVd; dVaux_dVb = dVoxdepinv_dVb; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = dVaux_dVg * dVoxdepinv_dVd; dVaux_dVb = dVaux_dVg * dVoxdepinv_dVb; dVaux_dVg *= dVoxdepinv_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVd = (Vgs_eff - Vbseff) * dVaux_dVd; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 *= 0.75610; T12 *= 1.31724; T3 = pParam->BSIM4v6aigbinv * pParam->BSIM4v6cigbinv - pParam->BSIM4v6bigbinv; T4 = pParam->BSIM4v6bigbinv * pParam->BSIM4v6cigbinv; T5 = T12 * (pParam->BSIM4v6aigbinv + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igbinv = T11 * T2 * T6; dIgbinv_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbinv_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgbinv_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); here->BSIM4v6Igb = Igbinv + Igbacc; here->BSIM4v6gIgbg = dIgbinv_dVg + dIgbacc_dVg; here->BSIM4v6gIgbd = dIgbinv_dVd; here->BSIM4v6gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; } else { here->BSIM4v6Igb = here->BSIM4v6gIgbg = here->BSIM4v6gIgbd = here->BSIM4v6gIgbs = here->BSIM4v6gIgbb = 0.0; } /* End of Gate current */ if (here->BSIM4v6nf != 1.0) { cdrain *= here->BSIM4v6nf; here->BSIM4v6gds *= here->BSIM4v6nf; here->BSIM4v6gm *= here->BSIM4v6nf; here->BSIM4v6gmbs *= here->BSIM4v6nf; here->BSIM4v6IdovVds *= here->BSIM4v6nf; here->BSIM4v6gbbs *= here->BSIM4v6nf; here->BSIM4v6gbgs *= here->BSIM4v6nf; here->BSIM4v6gbds *= here->BSIM4v6nf; here->BSIM4v6csub *= here->BSIM4v6nf; here->BSIM4v6Igidl *= here->BSIM4v6nf; here->BSIM4v6ggidld *= here->BSIM4v6nf; here->BSIM4v6ggidlg *= here->BSIM4v6nf; here->BSIM4v6ggidlb *= here->BSIM4v6nf; here->BSIM4v6Igisl *= here->BSIM4v6nf; here->BSIM4v6ggisls *= here->BSIM4v6nf; here->BSIM4v6ggislg *= here->BSIM4v6nf; here->BSIM4v6ggislb *= here->BSIM4v6nf; here->BSIM4v6Igcs *= here->BSIM4v6nf; here->BSIM4v6gIgcsg *= here->BSIM4v6nf; here->BSIM4v6gIgcsd *= here->BSIM4v6nf; here->BSIM4v6gIgcsb *= here->BSIM4v6nf; here->BSIM4v6Igcd *= here->BSIM4v6nf; here->BSIM4v6gIgcdg *= here->BSIM4v6nf; here->BSIM4v6gIgcdd *= here->BSIM4v6nf; here->BSIM4v6gIgcdb *= here->BSIM4v6nf; here->BSIM4v6Igs *= here->BSIM4v6nf; here->BSIM4v6gIgsg *= here->BSIM4v6nf; here->BSIM4v6gIgss *= here->BSIM4v6nf; here->BSIM4v6Igd *= here->BSIM4v6nf; here->BSIM4v6gIgdg *= here->BSIM4v6nf; here->BSIM4v6gIgdd *= here->BSIM4v6nf; here->BSIM4v6Igb *= here->BSIM4v6nf; here->BSIM4v6gIgbg *= here->BSIM4v6nf; here->BSIM4v6gIgbd *= here->BSIM4v6nf; here->BSIM4v6gIgbb *= here->BSIM4v6nf; } here->BSIM4v6ggidls = -(here->BSIM4v6ggidld + here->BSIM4v6ggidlg + here->BSIM4v6ggidlb); here->BSIM4v6ggisld = -(here->BSIM4v6ggisls + here->BSIM4v6ggislg + here->BSIM4v6ggislb); here->BSIM4v6gIgbs = -(here->BSIM4v6gIgbg + here->BSIM4v6gIgbd + here->BSIM4v6gIgbb); here->BSIM4v6gIgcss = -(here->BSIM4v6gIgcsg + here->BSIM4v6gIgcsd + here->BSIM4v6gIgcsb); here->BSIM4v6gIgcds = -(here->BSIM4v6gIgcdg + here->BSIM4v6gIgcdd + here->BSIM4v6gIgcdb); here->BSIM4v6cd = cdrain; if (model->BSIM4v6tnoiMod == 0) { Abulk = Abulk0 * pParam->BSIM4v6abulkCVfactor; Vdsat = Vgsteff / Abulk; T0 = Vdsat - Vds - DELTA_4; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * Vdsat); if (T0 >= 0.0) Vdseff = Vdsat - 0.5 * (T0 + T1); else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = Vdsat * T3 / (T1 - T0); Vdseff = Vdsat * T4; } if (Vds == 0.0) Vdseff = 0.0; T0 = Abulk * Vdseff; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = Vdseff / T1; T3 = T0 * T2; here->BSIM4v6qinv = Coxeff * pParam->BSIM4v6weffCV * here->BSIM4v6nf * pParam->BSIM4v6leffCV * (Vgsteff - 0.5 * T0 + Abulk * T3); } /* * BSIM4v6 C-V begins */ if ((model->BSIM4v6xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM4v6cggb = here->BSIM4v6cgsb = here->BSIM4v6cgdb = 0.0; here->BSIM4v6cdgb = here->BSIM4v6cdsb = here->BSIM4v6cddb = 0.0; here->BSIM4v6cbgb = here->BSIM4v6cbsb = here->BSIM4v6cbdb = 0.0; here->BSIM4v6csgb = here->BSIM4v6cssb = here->BSIM4v6csdb = 0.0; here->BSIM4v6cgbb = here->BSIM4v6csbb = here->BSIM4v6cdbb = here->BSIM4v6cbbb = 0.0; here->BSIM4v6cqdb = here->BSIM4v6cqsb = here->BSIM4v6cqgb = here->BSIM4v6cqbb = 0.0; here->BSIM4v6gtau = 0.0; goto finished; } else if (model->BSIM4v6capMod == 0) { if (Vbseff < 0.0) { VbseffCV = Vbs; /*4.6.2*/ dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4v6phi - Phis; dVbseffCV_dVb = -dPhis_dVb * dVbseff_dVb; /*4.6.2*/ } Vfb = pParam->BSIM4v6vfbcv; Vth = Vfb + pParam->BSIM4v6phi + pParam->BSIM4v6k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM4v6k1ox * dsqrtPhis_dVb *dVbseff_dVb; /*4.6.2*/ dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * pParam->BSIM4v6leffCV * here->BSIM4v6nf; Arg1 = Vgs_eff - VbseffCV - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM4v6cggb = CoxWL * dVgs_eff_dVg; here->BSIM4v6cgdb = 0.0; here->BSIM4v6cgsb = CoxWL * (dVbseffCV_dVb - dVgs_eff_dVg); here->BSIM4v6cdgb = 0.0; here->BSIM4v6cddb = 0.0; here->BSIM4v6cdsb = 0.0; here->BSIM4v6cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM4v6cbdb = 0.0; here->BSIM4v6cbsb = -here->BSIM4v6cgsb; } /* Arg1 <= 0.0, end of accumulation */ else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM4v6k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM4v6k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM4v6cggb = T0 * dVgs_eff_dVg; here->BSIM4v6cgdb = 0.0; here->BSIM4v6cgsb = T0 * (dVbseffCV_dVb - dVgs_eff_dVg); here->BSIM4v6cdgb = 0.0; here->BSIM4v6cddb = 0.0; here->BSIM4v6cdsb = 0.0; here->BSIM4v6cbgb = -here->BSIM4v6cggb; here->BSIM4v6cbdb = 0.0; here->BSIM4v6cbsb = -here->BSIM4v6cgsb; } /* Vgst <= 0.0, end of depletion */ else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM4v6abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v6abulkCVfactor * dAbulk0_dVb*dVbseff_dVb; dVdsat_dVg = 1.0 / AbulkCV; /*4.6.2*/ Vdsat = Vgst * dVdsat_dVg; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)* dVdsat_dVg; if (model->BSIM4v6xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM4v6cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v6cgsb = -(here->BSIM4v6cggb + T2); here->BSIM4v6cgdb = 0.0; here->BSIM4v6cdgb = 0.0; here->BSIM4v6cddb = 0.0; here->BSIM4v6cdsb = 0.0; here->BSIM4v6cbgb = -(here->BSIM4v6cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v6cbsb = -(here->BSIM4v6cbgb + T3); here->BSIM4v6cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM4v6cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v6cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v6cgsb = -(here->BSIM4v6cggb + T11 + here->BSIM4v6cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM4v6cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM4v6cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM4v6cdsb = -(here->BSIM4v6cdgb + T12 + here->BSIM4v6cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM4v6cbgb = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + T10); here->BSIM4v6cbdb = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + T12); here->BSIM4v6cbsb = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + T0); } } else if (model->BSIM4v6xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM4v6cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v6cgsb = -(here->BSIM4v6cggb + T2); here->BSIM4v6cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM4v6cdgb = -T3 * dVgs_eff_dVg; here->BSIM4v6cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM4v6cdsb = -(T4 + here->BSIM4v6cdgb); here->BSIM4v6cbgb = -(here->BSIM4v6cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v6cbsb = -(here->BSIM4v6cbgb + T3); here->BSIM4v6cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v6cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v6cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v6cgsb = -(here->BSIM4v6cggb + here->BSIM4v6cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM4v6cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM4v6cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM4v6cdsb = -(here->BSIM4v6cdgb + T10 + here->BSIM4v6cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - T0 * dVdsat_dVg) * dVgs_eff_dVg - here->BSIM4v6cdgb; /*4.6.2*/ T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM4v6cddb; tmp = -(T10 + T11 + T12); here->BSIM4v6cbgb = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + T12); here->BSIM4v6cbdb = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + T10); here->BSIM4v6cbsb = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + tmp); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM4v6cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v6cgsb = -(here->BSIM4v6cggb + T2); here->BSIM4v6cgdb = 0.0; here->BSIM4v6cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM4v6cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM4v6cdsb = -(T4 + here->BSIM4v6cdgb); here->BSIM4v6cbgb = -(here->BSIM4v6cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v6cbsb = -(here->BSIM4v6cbgb + T3); here->BSIM4v6cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v6phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v6cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v6cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v6cgsb = -(here->BSIM4v6cggb + here->BSIM4v6cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM4v6cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM4v6cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM4v6cdsb = -(here->BSIM4v6cdgb + T12 + here->BSIM4v6cddb); here->BSIM4v6cbgb = -(here->BSIM4v6cggb + 2.0 * here->BSIM4v6cdgb); here->BSIM4v6cbdb = -(here->BSIM4v6cgdb + 2.0 * here->BSIM4v6cddb); here->BSIM4v6cbsb = -(here->BSIM4v6cgsb + 2.0 * here->BSIM4v6cdsb); } /* end of linear region */ } /* end of 50/50 partition */ } /* end of inversion */ } /* end of capMod=0 */ else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4v6phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * pParam->BSIM4v6leffCV * here->BSIM4v6nf; if(model->BSIM4v6cvchargeMod == 0) { /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM4v6noff; dnoff_dVd = pParam->BSIM4v6noff * dn_dVd; dnoff_dVb = pParam->BSIM4v6noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM4v6voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV for cvchargeMod = 0 */ } else { T0 = n * Vtm; T1 = pParam->BSIM4v6mstarcv * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4v6mstarcv * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4v6mstarcv; dT10_dVb = -dVth_dVb * pParam->BSIM4v6mstarcv; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4v6mstarcv * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4v6voffcbncv - (1.0 - pParam->BSIM4v6mstarcv) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MIN_EXP / pParam->BSIM4v6cdep0; T9 = pParam->BSIM4v6mstarcv + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4v6coxe * MAX_EXP / pParam->BSIM4v6cdep0; T9 = pParam->BSIM4v6mstarcv + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4v6coxe / pParam->BSIM4v6cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4v6mstarcv + n * T4; dT9_dVg = T3 * (pParam->BSIM4v6mstarcv - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* End of VgsteffCV for cvchargeMod = 1 */ } if (model->BSIM4v6capMod == 1) { Vfb = here->BSIM4v6vfbzb; V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; T0 = 0.5 * pParam->BSIM4v6k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v6k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v6k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM4v6k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM4v6abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v6abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = 1.0 / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (T4 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM4v6xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM4v6xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v6cggb = Cgg; here->BSIM4v6cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v6cgdb = Cgd; here->BSIM4v6cdgb = -(Cgg + Cbg + Csg); here->BSIM4v6cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v6cddb = -(Cgd + Cbd + Csd); here->BSIM4v6cbgb = Cbg; here->BSIM4v6cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v6cbdb = Cbd; } /* Charge-Thickness capMod (CTM) begins */ else if (model->BSIM4v6capMod == 2) { V3 = here->BSIM4v6vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM4v6vfbzb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4v6vfbzb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4v6vfbzb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM4v6vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM4v6coxp; Tox = 1.0e8 * model->BSIM4v6toxp; T0 = (Vgs_eff - VbseffCV - here->BSIM4v6vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; tmp = T0 * pParam->BSIM4v6acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM4v6ldeb * exp(tmp); dTcen_dVg = pParam->BSIM4v6acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM4v6ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM4v6ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM4v6toxp; V3 = pParam->BSIM4v6ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4v6ldeb); Tcen = pParam->BSIM4v6ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = epssub / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v6coxe; Qac0 = CoxWLcen * (Vfbeff - here->BSIM4v6vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM4v6k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v6k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v6k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM4v6k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM4v6k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM4v6moin * Vtm; T0 = 0.5 * pParam->BSIM4v6sqrtPhi; } else { Denomi = pParam->BSIM4v6moin * Vtm * pParam->BSIM4v6k1ox * pParam->BSIM4v6k1ox; T0 = pParam->BSIM4v6k1ox * pParam->BSIM4v6sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); /* End of delta Phis */ /* VgDP = Vgsteff - DeltaPhi */ T0 = Vgsteff - DeltaPhi - 0.001; dT0_dVg = 1.0 - dDeltaPhi_dVg; T1 = sqrt(T0 * T0 + Vgsteff * 0.004); VgDP = 0.5 * (T0 + T1); dVgDP_dVg = 0.5 * (dT0_dVg + (T0 * dT0_dVg + 0.002) / T1); Tox += Tox; /* WDLiu: Tcen reevaluated below due to different Vgsteff */ T0 = (Vgsteff + here->BSIM4v6vtfbphi2) / Tox; tmp = exp(model->BSIM4v6bdos * 0.7 * log(T0)); T1 = 1.0 + tmp; T2 = model->BSIM4v6bdos * 0.7 * tmp / (T0 * Tox); Tcen = model->BSIM4v6ados * 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 / T1; dTcen_dVd = dTcen_dVg * dVgsteff_dVd; dTcen_dVb = dTcen_dVg * dVgsteff_dVb; dTcen_dVg *= dVgsteff_dVg; Ccen = epssub / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v6coxe; AbulkCV = Abulk0 * pParam->BSIM4v6abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v6abulkCVfactor * dAbulk0_dVb; VdsatCV = VgDP / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = dVgDP_dVg / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (T4 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = VgDP; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * dVgDP_dVg + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * dVgDP_dVg; T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM4v6xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * dVgDP_dVg; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM4v6xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * dVgDP_dVg + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v6cggb = Cgg; here->BSIM4v6cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v6cgdb = Cgd; here->BSIM4v6cdgb = -(Cgg + Cbg + Csg); here->BSIM4v6cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v6cddb = -(Cgd + Cbd + Csd); here->BSIM4v6cbgb = Cbg; here->BSIM4v6cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v6cbdb = Cbd; } /* End of CTM */ } here->BSIM4v6csgb = - here->BSIM4v6cggb - here->BSIM4v6cdgb - here->BSIM4v6cbgb; here->BSIM4v6csdb = - here->BSIM4v6cgdb - here->BSIM4v6cddb - here->BSIM4v6cbdb; here->BSIM4v6cssb = - here->BSIM4v6cgsb - here->BSIM4v6cdsb - here->BSIM4v6cbsb; here->BSIM4v6cgbb = - here->BSIM4v6cgdb - here->BSIM4v6cggb - here->BSIM4v6cgsb; here->BSIM4v6cdbb = - here->BSIM4v6cddb - here->BSIM4v6cdgb - here->BSIM4v6cdsb; here->BSIM4v6cbbb = - here->BSIM4v6cbgb - here->BSIM4v6cbdb - here->BSIM4v6cbsb; here->BSIM4v6csbb = - here->BSIM4v6cgbb - here->BSIM4v6cdbb - here->BSIM4v6cbbb; here->BSIM4v6qgate = qgate; here->BSIM4v6qbulk = qbulk; here->BSIM4v6qdrn = qdrn; here->BSIM4v6qsrc = -(qgate + qbulk + qdrn); /* NQS begins */ if ((here->BSIM4v6trnqsMod) || (here->BSIM4v6acnqsMod)) { here->BSIM4v6qchqs = qcheq = -(qbulk + qgate); here->BSIM4v6cqgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb); here->BSIM4v6cqdb = -(here->BSIM4v6cgdb + here->BSIM4v6cbdb); here->BSIM4v6cqsb = -(here->BSIM4v6cgsb + here->BSIM4v6cbsb); here->BSIM4v6cqbb = -(here->BSIM4v6cqgb + here->BSIM4v6cqdb + here->BSIM4v6cqsb); CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * here->BSIM4v6nf * pParam->BSIM4v6leffCV; T1 = here->BSIM4v6gcrg / CoxWL; /* 1 / tau */ here->BSIM4v6gtau = T1 * ScalingFactor; if (here->BSIM4v6acnqsMod) here->BSIM4v6taunet = 1.0 / T1; *(ckt->CKTstate0 + here->BSIM4v6qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v6qcheq) = *(ckt->CKTstate0 + here->BSIM4v6qcheq); if (here->BSIM4v6trnqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qcheq); if (error) return(error); } } finished: /* Calculate junction C-V */ if (ChargeComputationNeeded) { czbd = model->BSIM4v6DunitAreaTempJctCap * here->BSIM4v6Adeff; /* bug fix */ czbs = model->BSIM4v6SunitAreaTempJctCap * here->BSIM4v6Aseff; czbdsw = model->BSIM4v6DunitLengthSidewallTempJctCap * here->BSIM4v6Pdeff; czbdswg = model->BSIM4v6DunitLengthGateSidewallTempJctCap * pParam->BSIM4v6weffCJ * here->BSIM4v6nf; czbssw = model->BSIM4v6SunitLengthSidewallTempJctCap * here->BSIM4v6Pseff; czbsswg = model->BSIM4v6SunitLengthGateSidewallTempJctCap * pParam->BSIM4v6weffCJ * here->BSIM4v6nf; MJS = model->BSIM4v6SbulkJctBotGradingCoeff; MJSWS = model->BSIM4v6SbulkJctSideGradingCoeff; MJSWGS = model->BSIM4v6SbulkJctGateSideGradingCoeff; MJD = model->BSIM4v6DbulkJctBotGradingCoeff; MJSWD = model->BSIM4v6DbulkJctSideGradingCoeff; MJSWGD = model->BSIM4v6DbulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v6qbs) = 0.0; here->BSIM4v6capbs = czbs + czbssw + czbsswg; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v6PhiBS; if (MJS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbs) = model->BSIM4v6PhiBS * czbs * (1.0 - arg * sarg) / (1.0 - MJS); here->BSIM4v6capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v6qbs) = 0.0; here->BSIM4v6capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v6PhiBSWS; if (MJSWS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbs) += model->BSIM4v6PhiBSWS * czbssw * (1.0 - arg * sarg) / (1.0 - MJSWS); here->BSIM4v6capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v6PhiBSWGS; if (MJSWGS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbs) += model->BSIM4v6PhiBSWGS * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWGS); here->BSIM4v6capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs_jct * (czbs * MJS / model->BSIM4v6PhiBS + czbssw * MJSWS / model->BSIM4v6PhiBSWS + czbsswg * MJSWGS / model->BSIM4v6PhiBSWGS); *(ckt->CKTstate0 + here->BSIM4v6qbs) = vbs_jct * (T0 + 0.5 * T1); here->BSIM4v6capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v6qbd) = 0.0; here->BSIM4v6capbd = czbd + czbdsw + czbdswg; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v6PhiBD; if (MJD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbd) = model->BSIM4v6PhiBD* czbd * (1.0 - arg * sarg) / (1.0 - MJD); here->BSIM4v6capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v6qbd) = 0.0; here->BSIM4v6capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v6PhiBSWD; if (MJSWD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbd) += model->BSIM4v6PhiBSWD * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSWD); here->BSIM4v6capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v6PhiBSWGD; if (MJSWGD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v6qbd) += model->BSIM4v6PhiBSWGD * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWGD); here->BSIM4v6capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd_jct * (czbd * MJD / model->BSIM4v6PhiBD + czbdsw * MJSWD / model->BSIM4v6PhiBSWD + czbdswg * MJSWGD / model->BSIM4v6PhiBSWGD); *(ckt->CKTstate0 + here->BSIM4v6qbd) = vbd_jct * (T0 + 0.5 * T1); here->BSIM4v6capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM4v6off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM4v6mode >= 0) { Idtot = here->BSIM4v6cd + here->BSIM4v6csub + here->BSIM4v6Igidl - here->BSIM4v6cbd; } else { Idtot = here->BSIM4v6cd + here->BSIM4v6cbd - here->BSIM4v6Igidl; /* bugfix */ } tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; } else if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; } else { Ibtot = here->BSIM4v6cbs + here->BSIM4v6cbd - here->BSIM4v6Igidl - here->BSIM4v6Igisl - here->BSIM4v6csub; tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM4v6vds) = vds; *(ckt->CKTstate0 + here->BSIM4v6vgs) = vgs; *(ckt->CKTstate0 + here->BSIM4v6vbs) = vbs; *(ckt->CKTstate0 + here->BSIM4v6vbd) = vbd; *(ckt->CKTstate0 + here->BSIM4v6vges) = vges; *(ckt->CKTstate0 + here->BSIM4v6vgms) = vgms; *(ckt->CKTstate0 + here->BSIM4v6vdbs) = vdbs; *(ckt->CKTstate0 + here->BSIM4v6vdbd) = vdbd; *(ckt->CKTstate0 + here->BSIM4v6vsbs) = vsbs; *(ckt->CKTstate0 + here->BSIM4v6vses) = vses; *(ckt->CKTstate0 + here->BSIM4v6vdes) = vdes; *(ckt->CKTstate0 + here->BSIM4v6qdef) = qdef; if (!ChargeComputationNeeded) goto line850; if (here->BSIM4v6rgateMod == 3) { vgdx = vgmd; vgsx = vgms; } else /* For rgateMod == 0, 1 and 2 */ { vgdx = vgd; vgsx = vgs; } if (model->BSIM4v6capMod == 0) { cgdo = pParam->BSIM4v6cgdo; qgdo = pParam->BSIM4v6cgdo * vgdx; cgso = pParam->BSIM4v6cgso; qgso = pParam->BSIM4v6cgso * vgsx; } else /* For both capMod == 1 and 2 */ { T0 = vgdx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v6weffCV * pParam->BSIM4v6cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v6ckappad); cgdo = pParam->BSIM4v6cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM4v6cgdo + T3) * vgdx - T3 * (T2 + 0.5 * pParam->BSIM4v6ckappad * (T4 - 1.0)); T0 = vgsx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v6weffCV * pParam->BSIM4v6cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v6ckappas); cgso = pParam->BSIM4v6cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM4v6cgso + T3) * vgsx - T3 * (T2 + 0.5 * pParam->BSIM4v6ckappas * (T4 - 1.0)); } if (here->BSIM4v6nf != 1.0) { cgdo *= here->BSIM4v6nf; cgso *= here->BSIM4v6nf; qgdo *= here->BSIM4v6nf; qgso *= here->BSIM4v6nf; } here->BSIM4v6cgdo = cgdo; here->BSIM4v6qgdo = qgdo; here->BSIM4v6cgso = cgso; here->BSIM4v6qgso = qgso; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (here->BSIM4v6mode > 0) { if (here->BSIM4v6trnqsMod == 0) { qdrn -= qgdo; if (here->BSIM4v6rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v6cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v6cggb * ag0; gcgdb = here->BSIM4v6cgdb * ag0; gcgsb = here->BSIM4v6cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = here->BSIM4v6cdgb * ag0; gcsgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb) * ag0; gcbgb = here->BSIM4v6cbgb * ag0; qgmb = pParam->BSIM4v6cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qsrc = -(qgate + qgmid + qbulk + qdrn); } else { gcggb = (here->BSIM4v6cggb + cgdo + cgso + pParam->BSIM4v6cgbo ) * ag0; gcgdb = (here->BSIM4v6cgdb - cgdo) * ag0; gcgsb = (here->BSIM4v6cgsb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = (here->BSIM4v6cdgb - cgdo) * ag0; gcsgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb + cgso) * ag0; gcbgb = (here->BSIM4v6cbgb - pParam->BSIM4v6cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v6cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v6cddb + here->BSIM4v6capbd + cgdo) * ag0; gcdsb = here->BSIM4v6cdsb * ag0; gcsdb = -(here->BSIM4v6cgdb + here->BSIM4v6cbdb + here->BSIM4v6cddb) * ag0; gcssb = (here->BSIM4v6capbs + cgso - (here->BSIM4v6cgsb + here->BSIM4v6cbsb + here->BSIM4v6cdsb)) * ag0; if (!here->BSIM4v6rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v6cbdb - here->BSIM4v6capbd) * ag0; gcbsb = (here->BSIM4v6cbsb - here->BSIM4v6capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(here->BSIM4v6cddb + here->BSIM4v6cdgb + here->BSIM4v6cdsb) * ag0; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb) + here->BSIM4v6capbs * ag0; gcbdb = here->BSIM4v6cbdb * ag0; gcbsb = here->BSIM4v6cbsb * ag0; gcdbdb = -here->BSIM4v6capbd * ag0; gcsbsb = -here->BSIM4v6capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v6qchqs; CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * here->BSIM4v6nf * pParam->BSIM4v6leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v6gtg = T0 * here->BSIM4v6gcrgg; ggtd = here->BSIM4v6gtd = T0 * here->BSIM4v6gcrgd; ggts = here->BSIM4v6gts = T0 * here->BSIM4v6gcrgs; ggtb = here->BSIM4v6gtb = T0 * here->BSIM4v6gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v6cqgb * ag0; gcqdb = here->BSIM4v6cqdb * ag0; gcqsb = here->BSIM4v6cqsb * ag0; gcqbb = here->BSIM4v6cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v6xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v6xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM4v6cddb; Csd = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + here->BSIM4v6cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v6cdgb; Csg = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + here->BSIM4v6cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v6cdsb; Css = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + here->BSIM4v6cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); if (here->BSIM4v6rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v6cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v6cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -(qgmid + qbulk + qdrn); } else { gcggb = (cgdo + cgso + pParam->BSIM4v6cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v6cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v6cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v6capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v6capbs + cgso) * ag0; if (!here->BSIM4v6rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v6capbd * ag0; gcbsb = -here->BSIM4v6capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v6capbd * ag0; gcsbsb = -here->BSIM4v6capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } else { if (here->BSIM4v6trnqsMod == 0) { qsrc = qdrn - qgso; if (here->BSIM4v6rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v6cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v6cggb * ag0; gcgdb = here->BSIM4v6cgsb * ag0; gcgsb = here->BSIM4v6cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb) * ag0; gcsgb = here->BSIM4v6cdgb * ag0; gcbgb = here->BSIM4v6cbgb * ag0; qgmb = pParam->BSIM4v6cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qdrn = -(qgate + qgmid + qbulk + qsrc); } else { gcggb = (here->BSIM4v6cggb + cgdo + cgso + pParam->BSIM4v6cgbo ) * ag0; gcgdb = (here->BSIM4v6cgsb - cgdo) * ag0; gcgsb = (here->BSIM4v6cgdb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v6cggb + here->BSIM4v6cbgb + here->BSIM4v6cdgb + cgdo) * ag0; gcsgb = (here->BSIM4v6cdgb - cgso) * ag0; gcbgb = (here->BSIM4v6cbgb - pParam->BSIM4v6cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v6cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qdrn = -(qgate + qbulk + qsrc); } gcddb = (here->BSIM4v6capbd + cgdo - (here->BSIM4v6cgsb + here->BSIM4v6cbsb + here->BSIM4v6cdsb)) * ag0; gcdsb = -(here->BSIM4v6cgdb + here->BSIM4v6cbdb + here->BSIM4v6cddb) * ag0; gcsdb = here->BSIM4v6cdsb * ag0; gcssb = (here->BSIM4v6cddb + here->BSIM4v6capbs + cgso) * ag0; if (!here->BSIM4v6rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v6cbsb - here->BSIM4v6capbd) * ag0; gcbsb = (here->BSIM4v6cbdb - here->BSIM4v6capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb) + here->BSIM4v6capbd * ag0; gcsbb = -(here->BSIM4v6cddb + here->BSIM4v6cdgb + here->BSIM4v6cdsb) * ag0; gcbdb = here->BSIM4v6cbsb * ag0; gcbsb = here->BSIM4v6cbdb * ag0; gcdbdb = -here->BSIM4v6capbd * ag0; gcsbsb = -here->BSIM4v6capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v6qchqs; CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * here->BSIM4v6nf * pParam->BSIM4v6leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v6gtg = T0 * here->BSIM4v6gcrgg; ggts = here->BSIM4v6gts = T0 * here->BSIM4v6gcrgd; ggtd = here->BSIM4v6gtd = T0 * here->BSIM4v6gcrgs; ggtb = here->BSIM4v6gtb = T0 * here->BSIM4v6gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v6cqgb * ag0; gcqdb = here->BSIM4v6cqsb * ag0; gcqsb = here->BSIM4v6cqdb * ag0; gcqbb = here->BSIM4v6cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v6xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v6xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM4v6cddb; Cds = -(here->BSIM4v6cgdb + here->BSIM4v6cddb + here->BSIM4v6cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v6cdgb; Cdg = -(here->BSIM4v6cggb + here->BSIM4v6cdgb + here->BSIM4v6cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v6cdsb; Cdd = -(here->BSIM4v6cgsb + here->BSIM4v6cdsb + here->BSIM4v6cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); if (here->BSIM4v6rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v6cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v6cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -qgso; } else { gcggb = (cgdo + cgso + pParam->BSIM4v6cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v6cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v6cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -qgso; } gcddb = (here->BSIM4v6capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v6capbs + cgso) * ag0; if (!here->BSIM4v6rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v6capbd * ag0; gcbsb = -here->BSIM4v6capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v6capbd * ag0; gcsbsb = -here->BSIM4v6capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } if (here->BSIM4v6trnqsMod) { *(ckt->CKTstate0 + here->BSIM4v6qcdump) = qdef * ScalingFactor; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v6qcdump) = *(ckt->CKTstate0 + here->BSIM4v6qcdump); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qcdump); if (error) return(error); } if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM4v6qg) = qgate; *(ckt->CKTstate0 + here->BSIM4v6qd) = qdrn - *(ckt->CKTstate0 + here->BSIM4v6qbd); *(ckt->CKTstate0 + here->BSIM4v6qs) = qsrc - *(ckt->CKTstate0 + here->BSIM4v6qbs); if (here->BSIM4v6rgateMod == 3) *(ckt->CKTstate0 + here->BSIM4v6qgmid) = qgmid; if (!here->BSIM4v6rbodyMod) { *(ckt->CKTstate0 + here->BSIM4v6qb) = qbulk + *(ckt->CKTstate0 + here->BSIM4v6qbd) + *(ckt->CKTstate0 + here->BSIM4v6qbs); } else *(ckt->CKTstate0 + here->BSIM4v6qb) = qbulk; /* Store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v6qb) = *(ckt->CKTstate0 + here->BSIM4v6qb); *(ckt->CKTstate1 + here->BSIM4v6qg) = *(ckt->CKTstate0 + here->BSIM4v6qg); *(ckt->CKTstate1 + here->BSIM4v6qd) = *(ckt->CKTstate0 + here->BSIM4v6qd); if (here->BSIM4v6rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v6qgmid) = *(ckt->CKTstate0 + here->BSIM4v6qgmid); if (here->BSIM4v6rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v6qbs) = *(ckt->CKTstate0 + here->BSIM4v6qbs); *(ckt->CKTstate1 + here->BSIM4v6qbd) = *(ckt->CKTstate0 + here->BSIM4v6qbd); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qd); if (error) return(error); if (here->BSIM4v6rgateMod == 3) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qgmid); if (error) return(error); } if (here->BSIM4v6rbodyMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qbs); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v6qbd); if (error) return(error); } goto line860; line850: /* Zero gcap and ceqcap if (!ChargeComputationNeeded) */ ceqqg = ceqqb = ceqqd = 0.0; ceqqjd = ceqqjs = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = gcdbb = 0.0; gcsgb = gcsdb = gcssb = gcsbb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; gcbdb = gcbgb = gcbsb = gcbbb = 0.0; gcgmgmb = gcgmdb = gcgmsb = gcgmbb = 0.0; gcdgmb = gcsgmb = gcbgmb = ceqqgmid = 0.0; gcdbdb = gcsbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM4v6mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM4v6trnqsMod) { CoxWL = model->BSIM4v6coxe * pParam->BSIM4v6weffCV * here->BSIM4v6nf * pParam->BSIM4v6leffCV; T1 = here->BSIM4v6gcrg / CoxWL; here->BSIM4v6gtau = T1 * ScalingFactor; } else here->BSIM4v6gtau = 0.0; goto line900; line860: /* Calculate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM4v6cqg); cqbody = *(ckt->CKTstate0 + here->BSIM4v6cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM4v6cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb - gcdgmb * vgmb + (gcddb + gcdbdb) * vbd - gcdbdb * vbd_jct + gcdsb * vbs; ceqqb = cqbody - gcbgb * vgb - gcbgmb * vgmb + gcbdb * vbd + gcbsb * vbs; if (here->BSIM4v6rgateMod == 3) ceqqgmid = *(ckt->CKTstate0 + here->BSIM4v6cqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb; else ceqqgmid = 0.0; if (here->BSIM4v6rbodyMod) { ceqqjs = *(ckt->CKTstate0 + here->BSIM4v6cqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->BSIM4v6cqbd) + gcdbdb * vbd_jct; } if (here->BSIM4v6trnqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM4v6gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM4v6cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM4v6cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v6cqb) = *(ckt->CKTstate0 + here->BSIM4v6cqb); *(ckt->CKTstate1 + here->BSIM4v6cqg) = *(ckt->CKTstate0 + here->BSIM4v6cqg); *(ckt->CKTstate1 + here->BSIM4v6cqd) = *(ckt->CKTstate0 + here->BSIM4v6cqd); if (here->BSIM4v6rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v6cqgmid) = *(ckt->CKTstate0 + here->BSIM4v6cqgmid); if (here->BSIM4v6rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v6cqbs) = *(ckt->CKTstate0 + here->BSIM4v6cqbs); *(ckt->CKTstate1 + here->BSIM4v6cqbd) = *(ckt->CKTstate0 + here->BSIM4v6cqbd); } } /* * Load current vector */ line900: if (here->BSIM4v6mode >= 0) { Gm = here->BSIM4v6gm; Gmbs = here->BSIM4v6gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; ceqdrn = model->BSIM4v6type * (cdrain - here->BSIM4v6gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = model->BSIM4v6type * (here->BSIM4v6csub + here->BSIM4v6Igidl - (here->BSIM4v6gbds + here->BSIM4v6ggidld) * vds - (here->BSIM4v6gbgs + here->BSIM4v6ggidlg) * vgs - (here->BSIM4v6gbbs + here->BSIM4v6ggidlb) * vbs); ceqbs = model->BSIM4v6type * (here->BSIM4v6Igisl + here->BSIM4v6ggisls * vds - here->BSIM4v6ggislg * vgd - here->BSIM4v6ggislb * vbd); gbbdp = -(here->BSIM4v6gbds); gbbsp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = here->BSIM4v6gbgs; gbdpdp = here->BSIM4v6gbds; gbdpb = here->BSIM4v6gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcsg; gIstotd = here->BSIM4v6gIgcsd; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcss; gIstotb = here->BSIM4v6gIgcsb; Istoteq = model->BSIM4v6type * (here->BSIM4v6Igs + here->BSIM4v6Igcs - gIstotg * vgs - here->BSIM4v6gIgcsd * vds - here->BSIM4v6gIgcsb * vbs); gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcdg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcdd; gIdtots = here->BSIM4v6gIgcds; gIdtotb = here->BSIM4v6gIgcdb; Idtoteq = model->BSIM4v6type * (here->BSIM4v6Igd + here->BSIM4v6Igcd - here->BSIM4v6gIgdg * vgd - here->BSIM4v6gIgcdg * vgs - here->BSIM4v6gIgcdd * vds - here->BSIM4v6gIgcdb * vbs); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbd; gIbtots = here->BSIM4v6gIgbs; gIbtotb = here->BSIM4v6gIgbb; Ibtoteq = model->BSIM4v6type * (here->BSIM4v6Igb - here->BSIM4v6gIgbg * vgs - here->BSIM4v6gIgbd * vds - here->BSIM4v6gIgbb * vbs); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v6rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgd * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgs * T0; gcrgb = here->BSIM4v6gcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } else { Gm = -here->BSIM4v6gm; Gmbs = -here->BSIM4v6gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); ceqdrn = -model->BSIM4v6type * (cdrain + here->BSIM4v6gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = model->BSIM4v6type * (here->BSIM4v6csub + here->BSIM4v6Igisl + (here->BSIM4v6gbds + here->BSIM4v6ggisls) * vds - (here->BSIM4v6gbgs + here->BSIM4v6ggislg) * vgd - (here->BSIM4v6gbbs + here->BSIM4v6ggislb) * vbd); ceqbd = model->BSIM4v6type * (here->BSIM4v6Igidl - here->BSIM4v6ggidld * vds - here->BSIM4v6ggidlg * vgs - here->BSIM4v6ggidlb * vbs); gbbsp = -(here->BSIM4v6gbds); gbbdp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v6gbgs; gbspsp = here->BSIM4v6gbds; gbspb = here->BSIM4v6gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcdg; gIstotd = here->BSIM4v6gIgcds; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcdd; gIstotb = here->BSIM4v6gIgcdb; Istoteq = model->BSIM4v6type * (here->BSIM4v6Igs + here->BSIM4v6Igcd - here->BSIM4v6gIgsg * vgs - here->BSIM4v6gIgcdg * vgd + here->BSIM4v6gIgcdd * vds - here->BSIM4v6gIgcdb * vbd); gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcss; gIdtots = here->BSIM4v6gIgcsd; gIdtotb = here->BSIM4v6gIgcsb; Idtoteq = model->BSIM4v6type * (here->BSIM4v6Igd + here->BSIM4v6Igcs - (here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg) * vgd + here->BSIM4v6gIgcsd * vds - here->BSIM4v6gIgcsb * vbd); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbs; gIbtots = here->BSIM4v6gIgbd; gIbtotb = here->BSIM4v6gIgbb; Ibtoteq = model->BSIM4v6type * (here->BSIM4v6Igb - here->BSIM4v6gIgbg * vgd + here->BSIM4v6gIgbd * vds - here->BSIM4v6gIgbb * vbd); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v6rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgs * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgd * T0; gcrgb = here->BSIM4v6gcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } if (model->BSIM4v6rdsMod == 1) { ceqgstot = model->BSIM4v6type * (here->BSIM4v6gstotd * vds + here->BSIM4v6gstotg * vgs + here->BSIM4v6gstotb * vbs); /* WDLiu: ceqgstot flowing away from sNodePrime */ gstot = here->BSIM4v6gstot; gstotd = here->BSIM4v6gstotd; gstotg = here->BSIM4v6gstotg; gstots = here->BSIM4v6gstots - gstot; gstotb = here->BSIM4v6gstotb; ceqgdtot = -model->BSIM4v6type * (here->BSIM4v6gdtotd * vds + here->BSIM4v6gdtotg * vgs + here->BSIM4v6gdtotb * vbs); /* WDLiu: ceqgdtot defined as flowing into dNodePrime */ gdtot = here->BSIM4v6gdtot; gdtotd = here->BSIM4v6gdtotd - gdtot; gdtotg = here->BSIM4v6gdtotg; gdtots = here->BSIM4v6gdtots; gdtotb = here->BSIM4v6gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } if (model->BSIM4v6type > 0) { ceqjs = (here->BSIM4v6cbs - here->BSIM4v6gbs * vbs_jct); ceqjd = (here->BSIM4v6cbd - here->BSIM4v6gbd * vbd_jct); } else { ceqjs = -(here->BSIM4v6cbs - here->BSIM4v6gbs * vbs_jct); ceqjd = -(here->BSIM4v6cbd - here->BSIM4v6gbd * vbd_jct); ceqqg = -ceqqg; ceqqd = -ceqqd; ceqqb = -ceqqb; ceqgcrg = -ceqgcrg; if (here->BSIM4v6trnqsMod) { cqdef = -cqdef; cqcheq = -cqcheq; } if (here->BSIM4v6rbodyMod) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } if (here->BSIM4v6rgateMod == 3) ceqqgmid = -ceqqgmid; } /* * Loading RHS */ m = here->BSIM4v6m; #ifdef USE_OMP here->BSIM4v6rhsdPrime = m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq); here->BSIM4v6rhsgPrime = m * (ceqqg - ceqgcrg + Igtoteq); if (here->BSIM4v6rgateMod == 2) here->BSIM4v6rhsgExt = m * ceqgcrg; else if (here->BSIM4v6rgateMod == 3) here->BSIM4v6grhsMid = m * (ceqqgmid + ceqgcrg); if (!here->BSIM4v6rbodyMod) { here->BSIM4v6rhsbPrime = m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq); here->BSIM4v6rhssPrime = m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq); } else { here->BSIM4v6rhsdb = m * (ceqjd + ceqqjd); here->BSIM4v6rhsbPrime = m * (ceqbd + ceqbs - ceqqb + Ibtoteq); here->BSIM4v6rhssb = m * (ceqjs + ceqqjs); here->BSIM4v6rhssPrime = m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq); } if (model->BSIM4v6rdsMod) { here->BSIM4v6rhsd = m * ceqgdtot; here->BSIM4v6rhss = m * ceqgstot; } if (here->BSIM4v6trnqsMod) here->BSIM4v6rhsq = m * (cqcheq - cqdef); #else (*(ckt->CKTrhs + here->BSIM4v6dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq)); (*(ckt->CKTrhs + here->BSIM4v6gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); if (here->BSIM4v6rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4v6gNodeExt) -= m * ceqgcrg); else if (here->BSIM4v6rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4v6gNodeMid) -= m * (ceqqgmid + ceqgcrg)); if (!here->BSIM4v6rbodyMod) { (*(ckt->CKTrhs + here->BSIM4v6bNodePrime) += m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v6sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq)); } else { (*(ckt->CKTrhs + here->BSIM4v6dbNode) -= m * (ceqjd + ceqqjd)); (*(ckt->CKTrhs + here->BSIM4v6bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v6sbNode) -= m * (ceqjs + ceqqjs)); (*(ckt->CKTrhs + here->BSIM4v6sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq)); } if (model->BSIM4v6rdsMod) { (*(ckt->CKTrhs + here->BSIM4v6dNode) -= m * ceqgdtot); (*(ckt->CKTrhs + here->BSIM4v6sNode) += m * ceqgstot); } if (here->BSIM4v6trnqsMod) *(ckt->CKTrhs + here->BSIM4v6qNode) += m * (cqcheq - cqdef); #endif /* * Loading matrix */ if (!here->BSIM4v6rbodyMod) { gjbd = here->BSIM4v6gbd; gjbs = here->BSIM4v6gbs; } else gjbd = gjbs = 0.0; if (!model->BSIM4v6rdsMod) { gdpr = here->BSIM4v6drainConductance; gspr = here->BSIM4v6sourceConductance; } else gdpr = gspr = 0.0; geltd = here->BSIM4v6grgeltd; T1 = qdef * here->BSIM4v6gtau; #ifdef USE_OMP if (here->BSIM4v6rgateMod == 1) { here->BSIM4v6_1 = m * geltd; here->BSIM4v6_2 = m * geltd; here->BSIM4v6_3 = m * geltd; here->BSIM4v6_4 = m * (gcggb + geltd - ggtg + gIgtotg); here->BSIM4v6_5 = m * (gcgdb - ggtd + gIgtotd); here->BSIM4v6_6 = m * (gcgsb - ggts + gIgtots); here->BSIM4v6_7 = m * (gcgbb - ggtb + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v6rgateMod == 2) { here->BSIM4v6_8 = m * gcrg; here->BSIM4v6_9 = m * gcrgg; here->BSIM4v6_10 = m * gcrgd; here->BSIM4v6_11 = m * gcrgs; here->BSIM4v6_12 = m * gcrgb; here->BSIM4v6_13 = m * gcrg; here->BSIM4v6_14 = m * (gcggb - gcrgg - ggtg + gIgtotg); here->BSIM4v6_15 = m * (gcgdb - gcrgd - ggtd + gIgtotd); here->BSIM4v6_16 = m * (gcgsb - gcrgs - ggts + gIgtots); here->BSIM4v6_17 = m * (gcgbb - gcrgb - ggtb + gIgtotb); } else if (here->BSIM4v6rgateMod == 3) { here->BSIM4v6_18 = m * geltd; here->BSIM4v6_19 = m * geltd; here->BSIM4v6_20 = m * geltd; here->BSIM4v6_21 = m * (geltd + gcrg + gcgmgmb); here->BSIM4v6_22 = m * (gcrgd + gcgmdb); here->BSIM4v6_23 = m * gcrgg; here->BSIM4v6_24 = m * (gcrgs + gcgmsb); here->BSIM4v6_25 = m * (gcrgb + gcgmbb); here->BSIM4v6_26 = m * gcdgmb; here->BSIM4v6_26 = m * gcrg; here->BSIM4v6_28 = m * gcsgmb; here->BSIM4v6_29 = m * gcbgmb; here->BSIM4v6_30 = m * (gcggb - gcrgg - ggtg + gIgtotg); here->BSIM4v6_31 = m * (gcgdb - gcrgd - ggtd + gIgtotd); here->BSIM4v6_32 = m * (gcgsb - gcrgs - ggts + gIgtots); here->BSIM4v6_33 = m * (gcgbb - gcrgb - ggtb + gIgtotb); } else { here->BSIM4v6_34 = m * (gcggb - ggtg + gIgtotg); here->BSIM4v6_35 = m * (gcgdb - ggtd + gIgtotd); here->BSIM4v6_36 = m * (gcgsb - ggts + gIgtots); here->BSIM4v6_37 = m * (gcgbb - ggtb + gIgtotb); } if (model->BSIM4v6rdsMod) { here->BSIM4v6_38 = m * gdtotg; here->BSIM4v6_39 = m * gdtots; here->BSIM4v6_40 = m * gdtotb; here->BSIM4v6_41 = m * gstotd; here->BSIM4v6_42 = m * gstotg; here->BSIM4v6_43 = m * gstotb; } here->BSIM4v6_44 = m * (gdpr + here->BSIM4v6gds + here->BSIM4v6gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd); here->BSIM4v6_45 = m * (gdpr + gdtot); here->BSIM4v6_46 = m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg); here->BSIM4v6_47 = m * (here->BSIM4v6gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp); here->BSIM4v6_48 = m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb); here->BSIM4v6_49 = m * (gdpr - gdtotd); here->BSIM4v6_50 = m * (gdpr + gdtot); here->BSIM4v6_51 = m * (here->BSIM4v6gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd); here->BSIM4v6_52 = m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg); here->BSIM4v6_53 = m * (gspr + here->BSIM4v6gds + here->BSIM4v6gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots); here->BSIM4v6_54 = m * (gspr + gstot); here->BSIM4v6_55 = m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb); here->BSIM4v6_56 = m * (gspr - gstots); here->BSIM4v6_57 = m * (gspr + gstot); here->BSIM4v6_58 = m * (gcbdb - gjbd + gbbdp - gIbtotd); here->BSIM4v6_59 = m * (gcbgb - here->BSIM4v6gbgs - gIbtotg); here->BSIM4v6_60 = m * (gcbsb - gjbs + gbbsp - gIbtots); here->BSIM4v6_61 = m * (gjbd + gjbs + gcbbb - here->BSIM4v6gbbs - gIbtotb); ggidld = here->BSIM4v6ggidld; ggidlg = here->BSIM4v6ggidlg; ggidlb = here->BSIM4v6ggidlb; ggislg = here->BSIM4v6ggislg; ggisls = here->BSIM4v6ggisls; ggislb = here->BSIM4v6ggislb; /* stamp gidl */ here->BSIM4v6_62 = m * ggidld; here->BSIM4v6_63 = m * ggidlg; here->BSIM4v6_64 = m * (ggidlg + ggidld + ggidlb); here->BSIM4v6_65 = m * ggidlb; here->BSIM4v6_66 = m * ggidld; here->BSIM4v6_67 = m * ggidlg; here->BSIM4v6_68 = m * (ggidlg + ggidld + ggidlb); here->BSIM4v6_69 = m * ggidlb; /* stamp gisl */ here->BSIM4v6_70 = m * (ggisls + ggislg + ggislb); here->BSIM4v6_71 = m * ggislg; here->BSIM4v6_72 = m * ggisls; here->BSIM4v6_73 = m * ggislb; here->BSIM4v6_74 = m * (ggislg + ggisls + ggislb); here->BSIM4v6_75 = m * ggislg; here->BSIM4v6_76 = m * ggisls; here->BSIM4v6_77 = m * ggislb; if (here->BSIM4v6rbodyMod) { here->BSIM4v6_78 = m * (gcdbdb - here->BSIM4v6gbd); here->BSIM4v6_79 = m * (here->BSIM4v6gbs - gcsbsb); here->BSIM4v6_80 = m * (gcdbdb - here->BSIM4v6gbd); here->BSIM4v6_81 = m * (here->BSIM4v6gbd - gcdbdb + here->BSIM4v6grbpd + here->BSIM4v6grbdb); here->BSIM4v6_82 = m * here->BSIM4v6grbpd; here->BSIM4v6_83 = m * here->BSIM4v6grbdb; here->BSIM4v6_84 = m * here->BSIM4v6grbpd; here->BSIM4v6_85 = m * here->BSIM4v6grbpb; here->BSIM4v6_86 = m * here->BSIM4v6grbps; here->BSIM4v6_87 = m * (here->BSIM4v6grbpd + here->BSIM4v6grbps + here->BSIM4v6grbpb); /* WDLiu: (gcbbb - here->BSIM4v6gbbs) already added to BPbpPtr */ here->BSIM4v6_88 = m * (gcsbsb - here->BSIM4v6gbs); here->BSIM4v6_89 = m * here->BSIM4v6grbps; here->BSIM4v6_90 = m * here->BSIM4v6grbsb; here->BSIM4v6_91 = m * (here->BSIM4v6gbs - gcsbsb + here->BSIM4v6grbps + here->BSIM4v6grbsb); here->BSIM4v6_92 = m * here->BSIM4v6grbdb; here->BSIM4v6_93 = m * here->BSIM4v6grbpb; here->BSIM4v6_94 = m * here->BSIM4v6grbsb; here->BSIM4v6_95 = m * (here->BSIM4v6grbsb + here->BSIM4v6grbdb + here->BSIM4v6grbpb); } if (here->BSIM4v6trnqsMod) { here->BSIM4v6_96 = m * (gqdef + here->BSIM4v6gtau); here->BSIM4v6_97 = m * (ggtg - gcqgb); here->BSIM4v6_98 = m * (ggtd - gcqdb); here->BSIM4v6_99 = m * (ggts - gcqsb); here->BSIM4v6_100 = m * (ggtb - gcqbb); here->BSIM4v6_101 = m * dxpart * here->BSIM4v6gtau; here->BSIM4v6_102 = m * sxpart * here->BSIM4v6gtau; here->BSIM4v6_103 = m * here->BSIM4v6gtau; } #else if (here->BSIM4v6rgateMod == 1) { (*(here->BSIM4v6GEgePtr) += m * geltd); (*(here->BSIM4v6GPgePtr) -= m * geltd); (*(here->BSIM4v6GEgpPtr) -= m * geltd); (*(here->BSIM4v6GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); (*(here->BSIM4v6GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v6GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v6GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v6rgateMod == 2) { (*(here->BSIM4v6GEgePtr) += m * gcrg); (*(here->BSIM4v6GEgpPtr) += m * gcrgg); (*(here->BSIM4v6GEdpPtr) += m * gcrgd); (*(here->BSIM4v6GEspPtr) += m * gcrgs); (*(here->BSIM4v6GEbpPtr) += m * gcrgb); (*(here->BSIM4v6GPgePtr) -= m * gcrg); (*(here->BSIM4v6GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v6GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v6GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v6GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else if (here->BSIM4v6rgateMod == 3) { (*(here->BSIM4v6GEgePtr) += m * geltd); (*(here->BSIM4v6GEgmPtr) -= m * geltd); (*(here->BSIM4v6GMgePtr) -= m * geltd); (*(here->BSIM4v6GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); (*(here->BSIM4v6GMdpPtr) += m * (gcrgd + gcgmdb)); (*(here->BSIM4v6GMgpPtr) += m * gcrgg); (*(here->BSIM4v6GMspPtr) += m * (gcrgs + gcgmsb)); (*(here->BSIM4v6GMbpPtr) += m * (gcrgb + gcgmbb)); (*(here->BSIM4v6DPgmPtr) += m * gcdgmb); (*(here->BSIM4v6GPgmPtr) -= m * gcrg); (*(here->BSIM4v6SPgmPtr) += m * gcsgmb); (*(here->BSIM4v6BPgmPtr) += m * gcbgmb); (*(here->BSIM4v6GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v6GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v6GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v6GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else { (*(here->BSIM4v6GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); (*(here->BSIM4v6GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v6GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v6GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } if (model->BSIM4v6rdsMod) { (*(here->BSIM4v6DgpPtr) += m * gdtotg); (*(here->BSIM4v6DspPtr) += m * gdtots); (*(here->BSIM4v6DbpPtr) += m * gdtotb); (*(here->BSIM4v6SdpPtr) += m * gstotd); (*(here->BSIM4v6SgpPtr) += m * gstotg); (*(here->BSIM4v6SbpPtr) += m * gstotb); } (*(here->BSIM4v6DPdpPtr) += m * (gdpr + here->BSIM4v6gds + here->BSIM4v6gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd)); (*(here->BSIM4v6DPdPtr) -= m * (gdpr + gdtot)); (*(here->BSIM4v6DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg)); (*(here->BSIM4v6DPspPtr) -= m * (here->BSIM4v6gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp)); (*(here->BSIM4v6DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb)); (*(here->BSIM4v6DdpPtr) -= m * (gdpr - gdtotd)); (*(here->BSIM4v6DdPtr) += m * (gdpr + gdtot)); (*(here->BSIM4v6SPdpPtr) -= m * (here->BSIM4v6gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd)); (*(here->BSIM4v6SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg)); (*(here->BSIM4v6SPspPtr) += m * (gspr + here->BSIM4v6gds + here->BSIM4v6gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots)); (*(here->BSIM4v6SPsPtr) -= m * (gspr + gstot)); (*(here->BSIM4v6SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb)); (*(here->BSIM4v6SspPtr) -= m * (gspr - gstots)); (*(here->BSIM4v6SsPtr) += m * (gspr + gstot)); (*(here->BSIM4v6BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); (*(here->BSIM4v6BPgpPtr) += m * (gcbgb - here->BSIM4v6gbgs - gIbtotg)); (*(here->BSIM4v6BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); (*(here->BSIM4v6BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4v6gbbs - gIbtotb)); ggidld = here->BSIM4v6ggidld; ggidlg = here->BSIM4v6ggidlg; ggidlb = here->BSIM4v6ggidlb; ggislg = here->BSIM4v6ggislg; ggisls = here->BSIM4v6ggisls; ggislb = here->BSIM4v6ggislb; /* stamp gidl */ (*(here->BSIM4v6DPdpPtr) += m * ggidld); (*(here->BSIM4v6DPgpPtr) += m * ggidlg); (*(here->BSIM4v6DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v6DPbpPtr) += m * ggidlb); (*(here->BSIM4v6BPdpPtr) -= m * ggidld); (*(here->BSIM4v6BPgpPtr) -= m * ggidlg); (*(here->BSIM4v6BPspPtr) += m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v6BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v6SPdpPtr) -= m * (ggisls + ggislg + ggislb)); (*(here->BSIM4v6SPgpPtr) += m * ggislg); (*(here->BSIM4v6SPspPtr) += m * ggisls); (*(here->BSIM4v6SPbpPtr) += m * ggislb); (*(here->BSIM4v6BPdpPtr) += m * (ggislg + ggisls + ggislb)); (*(here->BSIM4v6BPgpPtr) -= m * ggislg); (*(here->BSIM4v6BPspPtr) -= m * ggisls); (*(here->BSIM4v6BPbpPtr) -= m * ggislb); if (here->BSIM4v6rbodyMod) { (*(here->BSIM4v6DPdbPtr) += m * (gcdbdb - here->BSIM4v6gbd)); (*(here->BSIM4v6SPsbPtr) -= m * (here->BSIM4v6gbs - gcsbsb)); (*(here->BSIM4v6DBdpPtr) += m * (gcdbdb - here->BSIM4v6gbd)); (*(here->BSIM4v6DBdbPtr) += m * (here->BSIM4v6gbd - gcdbdb + here->BSIM4v6grbpd + here->BSIM4v6grbdb)); (*(here->BSIM4v6DBbpPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6DBbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BPdbPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6BPbPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BPsbPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6BPbpPtr) += m * (here->BSIM4v6grbpd + here->BSIM4v6grbps + here->BSIM4v6grbpb)); /* WDLiu: (gcbbb - here->BSIM4v6gbbs) already added to BPbpPtr */ (*(here->BSIM4v6SBspPtr) += m * (gcsbsb - here->BSIM4v6gbs)); (*(here->BSIM4v6SBbpPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6SBbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6SBsbPtr) += m * (here->BSIM4v6gbs - gcsbsb + here->BSIM4v6grbps + here->BSIM4v6grbsb)); (*(here->BSIM4v6BdbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BbpPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BsbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6BbPtr) += m * (here->BSIM4v6grbsb + here->BSIM4v6grbdb + here->BSIM4v6grbpb)); } if (here->BSIM4v6trnqsMod) { (*(here->BSIM4v6QqPtr) += m * (gqdef + here->BSIM4v6gtau)); (*(here->BSIM4v6QgpPtr) += m * (ggtg - gcqgb)); (*(here->BSIM4v6QdpPtr) += m * (ggtd - gcqdb)); (*(here->BSIM4v6QspPtr) += m * (ggts - gcqsb)); (*(here->BSIM4v6QbpPtr) += m * (ggtb - gcqbb)); (*(here->BSIM4v6DPqPtr) += m * dxpart * here->BSIM4v6gtau); (*(here->BSIM4v6SPqPtr) += m * sxpart * here->BSIM4v6gtau); (*(here->BSIM4v6GPqPtr) -= m * here->BSIM4v6gtau); } #endif line1000: ; #ifndef USE_OMP } /* End of MOSFET Instance */ } /* End of Model Instance */ #endif return(OK); } /* function to compute poly depletion effect */ int BSIM4v6polyDepletion( double phi, double ngate, double epsgate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg) { double T1, T2, T3, T4, T5, T6, T7, T8; /* Poly Gate Si Depletion Effect */ if ((ngate > 1.0e18) && (ngate < 1.0e25) && (Vgs > phi) && (epsgate!=0) ){ T1 = 1.0e6 * CHARGE * epsgate * ngate / (coxe * coxe); T8 = Vgs - phi; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); *Vgs_eff = Vgs - T5; *dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { *Vgs_eff = Vgs; *dVgs_eff_dVg = 1.0; } return(0); } #ifdef USE_OMP void BSIM4v6LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt) { unsigned int InstCount, idx; BSIM4v6instance **InstArray; BSIM4v6instance *here; BSIM4v6model *model = (BSIM4v6model*)inModel; InstArray = model->BSIM4v6InstanceArray; InstCount = model->BSIM4v6InstCount; for(idx = 0; idx < InstCount; idx++) { here = InstArray[idx]; /* Update b for Ax = b */ (*(ckt->CKTrhs + here->BSIM4v6dNodePrime) += here->BSIM4v6rhsdPrime); (*(ckt->CKTrhs + here->BSIM4v6gNodePrime) -= here->BSIM4v6rhsgPrime); if (here->BSIM4v6rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4v6gNodeExt) -= here->BSIM4v6rhsgExt); else if (here->BSIM4v6rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4v6gNodeMid) -= here->BSIM4v6grhsMid); if (!here->BSIM4v6rbodyMod) { (*(ckt->CKTrhs + here->BSIM4v6bNodePrime) += here->BSIM4v6rhsbPrime); (*(ckt->CKTrhs + here->BSIM4v6sNodePrime) += here->BSIM4v6rhssPrime); } else { (*(ckt->CKTrhs + here->BSIM4v6dbNode) -= here->BSIM4v6rhsdb); (*(ckt->CKTrhs + here->BSIM4v6bNodePrime) += here->BSIM4v6rhsbPrime); (*(ckt->CKTrhs + here->BSIM4v6sbNode) -= here->BSIM4v6rhssb); (*(ckt->CKTrhs + here->BSIM4v6sNodePrime) += here->BSIM4v6rhssPrime); } if (model->BSIM4v6rdsMod) { (*(ckt->CKTrhs + here->BSIM4v6dNode) -= here->BSIM4v6rhsd); (*(ckt->CKTrhs + here->BSIM4v6sNode) += here->BSIM4v6rhss); } if (here->BSIM4v6trnqsMod) *(ckt->CKTrhs + here->BSIM4v6qNode) += here->BSIM4v6rhsq; /* Update A for Ax = b */ if (here->BSIM4v6rgateMod == 1) { (*(here->BSIM4v6GEgePtr) += here->BSIM4v6_1); (*(here->BSIM4v6GPgePtr) -= here->BSIM4v6_2); (*(here->BSIM4v6GEgpPtr) -= here->BSIM4v6_3); (*(here->BSIM4v6GPgpPtr) += here->BSIM4v6_4); (*(here->BSIM4v6GPdpPtr) += here->BSIM4v6_5); (*(here->BSIM4v6GPspPtr) += here->BSIM4v6_6); (*(here->BSIM4v6GPbpPtr) += here->BSIM4v6_7); } else if (here->BSIM4v6rgateMod == 2) { (*(here->BSIM4v6GEgePtr) += here->BSIM4v6_8); (*(here->BSIM4v6GEgpPtr) += here->BSIM4v6_9); (*(here->BSIM4v6GEdpPtr) += here->BSIM4v6_10); (*(here->BSIM4v6GEspPtr) += here->BSIM4v6_11); (*(here->BSIM4v6GEbpPtr) += here->BSIM4v6_12); (*(here->BSIM4v6GPgePtr) -= here->BSIM4v6_13); (*(here->BSIM4v6GPgpPtr) += here->BSIM4v6_14); (*(here->BSIM4v6GPdpPtr) += here->BSIM4v6_15); (*(here->BSIM4v6GPspPtr) += here->BSIM4v6_16); (*(here->BSIM4v6GPbpPtr) += here->BSIM4v6_17); } else if (here->BSIM4v6rgateMod == 3) { (*(here->BSIM4v6GEgePtr) += here->BSIM4v6_18); (*(here->BSIM4v6GEgmPtr) -= here->BSIM4v6_19); (*(here->BSIM4v6GMgePtr) -= here->BSIM4v6_20); (*(here->BSIM4v6GMgmPtr) += here->BSIM4v6_21); (*(here->BSIM4v6GMdpPtr) += here->BSIM4v6_22); (*(here->BSIM4v6GMgpPtr) += here->BSIM4v6_23); (*(here->BSIM4v6GMspPtr) += here->BSIM4v6_24); (*(here->BSIM4v6GMbpPtr) += here->BSIM4v6_25); (*(here->BSIM4v6DPgmPtr) += here->BSIM4v6_26); (*(here->BSIM4v6GPgmPtr) -= here->BSIM4v6_27); (*(here->BSIM4v6SPgmPtr) += here->BSIM4v6_28); (*(here->BSIM4v6BPgmPtr) += here->BSIM4v6_29); (*(here->BSIM4v6GPgpPtr) += here->BSIM4v6_30); (*(here->BSIM4v6GPdpPtr) += here->BSIM4v6_31); (*(here->BSIM4v6GPspPtr) += here->BSIM4v6_32); (*(here->BSIM4v6GPbpPtr) += here->BSIM4v6_33); } else { (*(here->BSIM4v6GPgpPtr) += here->BSIM4v6_34); (*(here->BSIM4v6GPdpPtr) += here->BSIM4v6_35); (*(here->BSIM4v6GPspPtr) += here->BSIM4v6_36); (*(here->BSIM4v6GPbpPtr) += here->BSIM4v6_37); } if (model->BSIM4v6rdsMod) { (*(here->BSIM4v6DgpPtr) += here->BSIM4v6_38); (*(here->BSIM4v6DspPtr) += here->BSIM4v6_39); (*(here->BSIM4v6DbpPtr) += here->BSIM4v6_40); (*(here->BSIM4v6SdpPtr) += here->BSIM4v6_41); (*(here->BSIM4v6SgpPtr) += here->BSIM4v6_42); (*(here->BSIM4v6SbpPtr) += here->BSIM4v6_43); } (*(here->BSIM4v6DPdpPtr) += here->BSIM4v6_44); (*(here->BSIM4v6DPdPtr) -= here->BSIM4v6_45); (*(here->BSIM4v6DPgpPtr) += here->BSIM4v6_46); (*(here->BSIM4v6DPspPtr) -= here->BSIM4v6_47); (*(here->BSIM4v6DPbpPtr) -= here->BSIM4v6_48); (*(here->BSIM4v6DdpPtr) -= here->BSIM4v6_49); (*(here->BSIM4v6DdPtr) += here->BSIM4v6_50); (*(here->BSIM4v6SPdpPtr) -= here->BSIM4v6_51); (*(here->BSIM4v6SPgpPtr) += here->BSIM4v6_52); (*(here->BSIM4v6SPspPtr) += here->BSIM4v6_53); (*(here->BSIM4v6SPsPtr) -= here->BSIM4v6_54); (*(here->BSIM4v6SPbpPtr) -= here->BSIM4v6_55); (*(here->BSIM4v6SspPtr) -= here->BSIM4v6_56); (*(here->BSIM4v6SsPtr) += here->BSIM4v6_57); (*(here->BSIM4v6BPdpPtr) += here->BSIM4v6_58); (*(here->BSIM4v6BPgpPtr) += here->BSIM4v6_59); (*(here->BSIM4v6BPspPtr) += here->BSIM4v6_60); (*(here->BSIM4v6BPbpPtr) += here->BSIM4v6_61); /* stamp gidl */ (*(here->BSIM4v6DPdpPtr) += here->BSIM4v6_62); (*(here->BSIM4v6DPgpPtr) += here->BSIM4v6_63); (*(here->BSIM4v6DPspPtr) -= here->BSIM4v6_64); (*(here->BSIM4v6DPbpPtr) += here->BSIM4v6_65); (*(here->BSIM4v6BPdpPtr) -= here->BSIM4v6_66); (*(here->BSIM4v6BPgpPtr) -= here->BSIM4v6_67); (*(here->BSIM4v6BPspPtr) += here->BSIM4v6_68); (*(here->BSIM4v6BPbpPtr) -= here->BSIM4v6_69); /* stamp gisl */ (*(here->BSIM4v6SPdpPtr) -= here->BSIM4v6_70); (*(here->BSIM4v6SPgpPtr) += here->BSIM4v6_71); (*(here->BSIM4v6SPspPtr) += here->BSIM4v6_72); (*(here->BSIM4v6SPbpPtr) += here->BSIM4v6_73); (*(here->BSIM4v6BPdpPtr) += here->BSIM4v6_74); (*(here->BSIM4v6BPgpPtr) -= here->BSIM4v6_75); (*(here->BSIM4v6BPspPtr) -= here->BSIM4v6_76); (*(here->BSIM4v6BPbpPtr) -= here->BSIM4v6_77); if (here->BSIM4v6rbodyMod) { (*(here->BSIM4v6DPdbPtr) += here->BSIM4v6_78); (*(here->BSIM4v6SPsbPtr) -= here->BSIM4v6_79); (*(here->BSIM4v6DBdpPtr) += here->BSIM4v6_80); (*(here->BSIM4v6DBdbPtr) += here->BSIM4v6_81); (*(here->BSIM4v6DBbpPtr) -= here->BSIM4v6_82); (*(here->BSIM4v6DBbPtr) -= here->BSIM4v6_83); (*(here->BSIM4v6BPdbPtr) -= here->BSIM4v6_84); (*(here->BSIM4v6BPbPtr) -= here->BSIM4v6_85); (*(here->BSIM4v6BPsbPtr) -= here->BSIM4v6_86); (*(here->BSIM4v6BPbpPtr) += here->BSIM4v6_87); (*(here->BSIM4v6SBspPtr) += here->BSIM4v6_88); (*(here->BSIM4v6SBbpPtr) -= here->BSIM4v6_89); (*(here->BSIM4v6SBbPtr) -= here->BSIM4v6_90); (*(here->BSIM4v6SBsbPtr) += here->BSIM4v6_91); (*(here->BSIM4v6BdbPtr) -= here->BSIM4v6_92); (*(here->BSIM4v6BbpPtr) -= here->BSIM4v6_93); (*(here->BSIM4v6BsbPtr) -= here->BSIM4v6_94); (*(here->BSIM4v6BbPtr) += here->BSIM4v6_95); } if (here->BSIM4v6trnqsMod) { (*(here->BSIM4v6QqPtr) += here->BSIM4v6_96); (*(here->BSIM4v6QgpPtr) += here->BSIM4v6_97); (*(here->BSIM4v6QdpPtr) += here->BSIM4v6_98); (*(here->BSIM4v6QspPtr) += here->BSIM4v6_99); (*(here->BSIM4v6QbpPtr) += here->BSIM4v6_100); (*(here->BSIM4v6DPqPtr) += here->BSIM4v6_101); (*(here->BSIM4v6SPqPtr) += here->BSIM4v6_102); (*(here->BSIM4v6GPqPtr) -= here->BSIM4v6_103); } } } #endif ngspice-26/src/spicelib/devices/bsim4v6/b4v6check.c0000644000265600020320000011003212264261473021446 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /**** BSIM4.6.5 Update ngspice 09/22/2009 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4check.c of BSIM4.6.1. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008 . **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM4v6checkModel( BSIM4v6model *model, BSIM4v6instance *here, CKTcircuit *ckt) { struct bsim4v6SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; if ((fplog = fopen("bsim4v6.out", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM4v6: Berkeley Short Channel IGFET Model-4\n"); fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); fprintf(fplog, "\n"); fprintf(fplog, "++++++++++ BSIM4v6 PARAMETER CHECKING BELOW ++++++++++\n"); if (strcmp(model->BSIM4v6version, "4.6.5") != 0) { fprintf(fplog, "Warning: This model is BSIM4.6.5; you specified a wrong version number.\n"); printf("Warning: This model is BSIM4.6.5; you specified a wrong version number.\n"); } fprintf(fplog, "Model = %s\n", model->BSIM4v6modName); if ((here->BSIM4v6rgateMod == 2) || (here->BSIM4v6rgateMod == 3)) { if ((here->BSIM4v6trnqsMod == 1) || (here->BSIM4v6acnqsMod == 1)) { fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); } } if (model->BSIM4v6toxe <= 0.0) { fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", model->BSIM4v6toxe); printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v6toxe); Fatal_Flag = 1; } if (model->BSIM4v6toxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", model->BSIM4v6toxp); printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v6toxp); Fatal_Flag = 1; } if (model->BSIM4v6eot <= 0.0) { fprintf(fplog, "Fatal: EOT = %g is not positive.\n", model->BSIM4v6eot); printf("Fatal: EOT = %g is not positive.\n", model->BSIM4v6eot); Fatal_Flag = 1; } if (model->BSIM4v6epsrgate < 0.0) { fprintf(fplog, "Fatal: Epsrgate = %g is not positive.\n", model->BSIM4v6epsrgate); printf("Fatal: Epsrgate = %g is not positive.\n", model->BSIM4v6epsrgate); Fatal_Flag = 1; } if (model->BSIM4v6epsrsub < 0.0) { fprintf(fplog, "Fatal: Epsrsub = %g is not positive.\n", model->BSIM4v6epsrsub); printf("Fatal: Epsrsub = %g is not positive.\n", model->BSIM4v6epsrsub); Fatal_Flag = 1; } if (model->BSIM4v6easub < 0.0) { fprintf(fplog, "Fatal: Easub = %g is not positive.\n", model->BSIM4v6easub); printf("Fatal: Easub = %g is not positive.\n", model->BSIM4v6easub); Fatal_Flag = 1; } if (model->BSIM4v6ni0sub <= 0.0) { fprintf(fplog, "Fatal: Ni0sub = %g is not positive.\n", model->BSIM4v6ni0sub); printf("Fatal: Easub = %g is not positive.\n", model->BSIM4v6ni0sub); Fatal_Flag = 1; } if (model->BSIM4v6toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM4v6toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v6toxm); Fatal_Flag = 1; } if (model->BSIM4v6toxref <= 0.0) { fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", model->BSIM4v6toxref); printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v6toxref); Fatal_Flag = 1; } if (pParam->BSIM4v6lpe0 < -pParam->BSIM4v6leff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v6lpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v6lpe0); Fatal_Flag = 1; } if (model->BSIM4v6lintnoi > pParam->BSIM4v6leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v6lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v6lintnoi); Fatal_Flag = 1; } if (pParam->BSIM4v6lpeb < -pParam->BSIM4v6leff) { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v6lpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v6lpeb); Fatal_Flag = 1; } if (pParam->BSIM4v6ndep <= 0.0) { fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v6ndep); printf("Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v6ndep); Fatal_Flag = 1; } if (pParam->BSIM4v6phi <= 0.0) { fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v6phi); fprintf(fplog, " Phin = %g Ndep = %g \n", pParam->BSIM4v6phin, pParam->BSIM4v6ndep); printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v6phi); printf(" Phin = %g Ndep = %g \n", pParam->BSIM4v6phin, pParam->BSIM4v6ndep); Fatal_Flag = 1; } if (pParam->BSIM4v6nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v6nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v6nsub); Fatal_Flag = 1; } if (pParam->BSIM4v6ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM4v6ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM4v6ngate); Fatal_Flag = 1; } if (pParam->BSIM4v6ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM4v6ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM4v6ngate); Fatal_Flag = 1; } if (pParam->BSIM4v6xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM4v6xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v6xj); Fatal_Flag = 1; } if (pParam->BSIM4v6dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v6dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v6dvt1); Fatal_Flag = 1; } if (pParam->BSIM4v6dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v6dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v6dvt1w); Fatal_Flag = 1; } if (pParam->BSIM4v6w0 == -pParam->BSIM4v6weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM4v6dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v6dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v6dsub); Fatal_Flag = 1; } if (pParam->BSIM4v6b1 == -pParam->BSIM4v6weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (here->BSIM4v6u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v6u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v6u0temp); Fatal_Flag = 1; } if (pParam->BSIM4v6delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v6delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v6delta); Fatal_Flag = 1; } if (here->BSIM4v6vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v6vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v6vsattemp); Fatal_Flag = 1; } if (pParam->BSIM4v6pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v6pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v6pclm); Fatal_Flag = 1; } if (pParam->BSIM4v6drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v6drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v6drout); Fatal_Flag = 1; } if (here->BSIM4v6m < 1.0) { fprintf(fplog, "Fatal: Number of multiplier = %g is smaller than one.\n", here->BSIM4v6m); printf("Fatal: Number of multiplier = %g is smaller than one.\n", here->BSIM4v6m); Fatal_Flag = 1; } if (here->BSIM4v6nf < 1.0) { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v6nf); printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v6nf); Fatal_Flag = 1; } if((here->BSIM4v6sa > 0.0) && (here->BSIM4v6sb > 0.0) && ((here->BSIM4v6nf == 1.0) || ((here->BSIM4v6nf > 1.0) && (here->BSIM4v6sd > 0.0))) ) { if (model->BSIM4v6saref <= 0.0) { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v6saref); printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v6saref); Fatal_Flag = 1; } if (model->BSIM4v6sbref <= 0.0) { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v6sbref); printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v6sbref); Fatal_Flag = 1; } } if ((here->BSIM4v6l + model->BSIM4v6xl) <= model->BSIM4v6xgl) { fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); Fatal_Flag = 1; } if (here->BSIM4v6ngcon < 1.0) { fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); Fatal_Flag = 1; } if ((here->BSIM4v6ngcon != 1.0) && (here->BSIM4v6ngcon != 2.0)) { here->BSIM4v6ngcon = 1.0; fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); } if (model->BSIM4v6gbmin < 1.0e-20) { fprintf(fplog, "Warning: Gbmin = %g is too small.\n", model->BSIM4v6gbmin); printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v6gbmin); } /* Check saturation parameters */ if (pParam->BSIM4v6fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->BSIM4v6fprout); printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v6fprout); Fatal_Flag = 1; } if (pParam->BSIM4v6pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->BSIM4v6pdits); printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v6pdits); Fatal_Flag = 1; } if (model->BSIM4v6pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->BSIM4v6pditsl); printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v6pditsl); Fatal_Flag = 1; } /* Check gate current parameters */ if (model->BSIM4v6igbMod) { if (pParam->BSIM4v6nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v6nigbinv); printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v6nigbinv); Fatal_Flag = 1; } if (pParam->BSIM4v6nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v6nigbacc); printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v6nigbacc); Fatal_Flag = 1; } } if (model->BSIM4v6igcMod) { if (pParam->BSIM4v6nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v6nigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v6nigc); Fatal_Flag = 1; } if (pParam->BSIM4v6poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v6poxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v6poxedge); Fatal_Flag = 1; } if (pParam->BSIM4v6pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v6pigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v6pigcd); Fatal_Flag = 1; } } /* Check capacitance parameters */ if (pParam->BSIM4v6clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v6clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v6clc); Fatal_Flag = 1; } /* Check overlap capacitance parameters */ if (pParam->BSIM4v6ckappas < 0.02) { fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", pParam->BSIM4v6ckappas); printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v6ckappas); pParam->BSIM4v6ckappas = 0.02; } if (pParam->BSIM4v6ckappad < 0.02) { fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", pParam->BSIM4v6ckappad); printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v6ckappad); pParam->BSIM4v6ckappad = 0.02; } if (model->BSIM4v6vtss < 0.0) { fprintf(fplog, "Fatal: Vtss = %g is negative.\n", model->BSIM4v6vtss); printf("Fatal: Vtss = %g is negative.\n", model->BSIM4v6vtss); Fatal_Flag = 1; } if (model->BSIM4v6vtsd < 0.0) { fprintf(fplog, "Fatal: Vtsd = %g is negative.\n", model->BSIM4v6vtsd); printf("Fatal: Vtsd = %g is negative.\n", model->BSIM4v6vtsd); Fatal_Flag = 1; } if (model->BSIM4v6vtssws < 0.0) { fprintf(fplog, "Fatal: Vtssws = %g is negative.\n", model->BSIM4v6vtssws); printf("Fatal: Vtssws = %g is negative.\n", model->BSIM4v6vtssws); Fatal_Flag = 1; } if (model->BSIM4v6vtsswd < 0.0) { fprintf(fplog, "Fatal: Vtsswd = %g is negative.\n", model->BSIM4v6vtsswd); printf("Fatal: Vtsswd = %g is negative.\n", model->BSIM4v6vtsswd); Fatal_Flag = 1; } if (model->BSIM4v6vtsswgs < 0.0) { fprintf(fplog, "Fatal: Vtsswgs = %g is negative.\n", model->BSIM4v6vtsswgs); printf("Fatal: Vtsswgs = %g is negative.\n", model->BSIM4v6vtsswgs); Fatal_Flag = 1; } if (model->BSIM4v6vtsswgd < 0.0) { fprintf(fplog, "Fatal: Vtsswgd = %g is negative.\n", model->BSIM4v6vtsswgd); printf("Fatal: Vtsswgd = %g is negative.\n", model->BSIM4v6vtsswgd); Fatal_Flag = 1; } if (model->BSIM4v6paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM4v6leff <= 1.0e-9) { fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v6leff); printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v6leff); } if (pParam->BSIM4v6leffCV <= 1.0e-9) { fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v6leffCV); printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v6leffCV); } if (pParam->BSIM4v6weff <= 1.0e-9) { fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v6weff); printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v6weff); } if (pParam->BSIM4v6weffCV <= 1.0e-9) { fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v6weffCV); printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v6weffCV); } /* Check threshold voltage parameters */ if (model->BSIM4v6toxe < 1.0e-10) { fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v6toxe); printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v6toxe); } if (model->BSIM4v6toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v6toxp); printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v6toxp); } if (model->BSIM4v6toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v6toxm); printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v6toxm); } if (pParam->BSIM4v6ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", pParam->BSIM4v6ndep); printf("Warning: Ndep = %g may be too small.\n", pParam->BSIM4v6ndep); } else if (pParam->BSIM4v6ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", pParam->BSIM4v6ndep); printf("Warning: Ndep = %g may be too large.\n", pParam->BSIM4v6ndep); } if (pParam->BSIM4v6nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM4v6nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM4v6nsub); } else if (pParam->BSIM4v6nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM4v6nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM4v6nsub); } if ((pParam->BSIM4v6ngate > 0.0) && (pParam->BSIM4v6ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v6ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v6ngate); } if (pParam->BSIM4v6dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v6dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v6dvt0); } if (fabs(1.0e-8 / (pParam->BSIM4v6w0 + pParam->BSIM4v6weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM4v6nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM4v6nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v6nfactor); } if (pParam->BSIM4v6cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM4v6cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v6cdsc); } if (pParam->BSIM4v6cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM4v6cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v6cdscd); } /* Check DIBL parameters */ if (here->BSIM4v6eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", here->BSIM4v6eta0); printf("Warning: Eta0 = %g is negative.\n", here->BSIM4v6eta0); } /* Check Abulk parameters */ if (fabs(1.0e-8 / (pParam->BSIM4v6b1 + pParam->BSIM4v6weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM4v6a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v6a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v6a2); pParam->BSIM4v6a2 = 0.01; } else if (pParam->BSIM4v6a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v6a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v6a2); pParam->BSIM4v6a2 = 1.0; pParam->BSIM4v6a1 = 0.0; } if (pParam->BSIM4v6prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v6prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v6prwg); pParam->BSIM4v6prwg = 0.0; } if (pParam->BSIM4v6rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v6rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v6rdsw); pParam->BSIM4v6rdsw = 0.0; pParam->BSIM4v6rds0 = 0.0; } if (pParam->BSIM4v6rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v6rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v6rds0); pParam->BSIM4v6rds0 = 0.0; } if (pParam->BSIM4v6rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v6rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v6rdswmin); pParam->BSIM4v6rdswmin = 0.0; } if (pParam->BSIM4v6pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v6pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v6pscbe2); } if (pParam->BSIM4v6vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v6vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v6vsattemp); } if((model->BSIM4v6lambdaGiven) && (pParam->BSIM4v6lambda > 0.0) ) { if (pParam->BSIM4v6lambda > 1.0e-9) { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v6lambda); printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v6lambda); } } if((model->BSIM4v6vtlGiven) && (pParam->BSIM4v6vtl > 0.0) ) { if (pParam->BSIM4v6vtl < 6.0e4) { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v6vtl); printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v6vtl); } if (pParam->BSIM4v6xn < 3.0) { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v6xn); printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v6xn); pParam->BSIM4v6xn = 3.0; } if (model->BSIM4v6lc < 0.0) { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v6lc); printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v6lc); pParam->BSIM4v6lc = 0.0; } } if (pParam->BSIM4v6pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v6pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v6pdibl1); } if (pParam->BSIM4v6pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v6pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v6pdibl2); } /* Check stress effect parameters */ if((here->BSIM4v6sa > 0.0) && (here->BSIM4v6sb > 0.0) && ((here->BSIM4v6nf == 1.0) || ((here->BSIM4v6nf > 1.0) && (here->BSIM4v6sd > 0.0))) ) { if (model->BSIM4v6lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v6lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v6lodk2); } if (model->BSIM4v6lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v6lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v6lodeta0); } } /* Check gate resistance parameters */ if (here->BSIM4v6rgateMod == 1) { if (model->BSIM4v6rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->BSIM4v6rgateMod == 2) { if (model->BSIM4v6rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); else if (pParam->BSIM4v6xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } if (here->BSIM4v6rgateMod == 3) { if (model->BSIM4v6rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (pParam->BSIM4v6xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } /* Check capacitance parameters */ if (pParam->BSIM4v6noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4v6noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v6noff); } if (pParam->BSIM4v6voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4v6voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v6voffcv); } if (pParam->BSIM4v6moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4v6moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v6moin); } if (pParam->BSIM4v6moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4v6moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v6moin); } if(model->BSIM4v6capMod ==2) { if (pParam->BSIM4v6acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4v6acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v6acde); } if (pParam->BSIM4v6acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4v6acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v6acde); } } /* Check overlap capacitance parameters */ if (model->BSIM4v6cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v6cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v6cgdo); model->BSIM4v6cgdo = 0.0; } if (model->BSIM4v6cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v6cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v6cgso); model->BSIM4v6cgso = 0.0; } if (model->BSIM4v6cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v6cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v6cgbo); model->BSIM4v6cgbo = 0.0; } if (model->BSIM4v6tnoiMod == 1) { if (model->BSIM4v6tnoia < 0.0) { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v6tnoia); printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v6tnoia); model->BSIM4v6tnoia = 0.0; } if (model->BSIM4v6tnoib < 0.0) { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v6tnoib); printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v6tnoib); model->BSIM4v6tnoib = 0.0; } if (model->BSIM4v6rnoia < 0.0) { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v6rnoia); printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v6rnoia); model->BSIM4v6rnoia = 0.0; } if (model->BSIM4v6rnoib < 0.0) { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v6rnoib); printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v6rnoib); model->BSIM4v6rnoib = 0.0; } } if (model->BSIM4v6SjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njs = %g is negative.\n", model->BSIM4v6SjctEmissionCoeff); printf("Warning: Njs = %g is negative.\n", model->BSIM4v6SjctEmissionCoeff); } if (model->BSIM4v6DjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njd = %g is negative.\n", model->BSIM4v6DjctEmissionCoeff); printf("Warning: Njd = %g is negative.\n", model->BSIM4v6DjctEmissionCoeff); } if (model->BSIM4v6njtsstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v6njtsstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v6njtsstemp, ckt->CKTtemp); } if (model->BSIM4v6njtsswstemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswstemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswstemp, ckt->CKTtemp); } if (model->BSIM4v6njtsswgstemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswgstemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswgstemp, ckt->CKTtemp); } if (model->BSIM4v6njtsdGiven && model->BSIM4v6njtsdtemp < 0.0) { fprintf(fplog, "Warning: Njtsd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsdtemp, ckt->CKTtemp); printf("Warning: Njtsd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsdtemp, ckt->CKTtemp); } if (model->BSIM4v6njtsswdGiven && model->BSIM4v6njtsswdtemp < 0.0) { fprintf(fplog, "Warning: Njtsswd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswdtemp, ckt->CKTtemp); printf("Warning: Njtsswd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswdtemp, ckt->CKTtemp); } if (model->BSIM4v6njtsswgdGiven && model->BSIM4v6njtsswgdtemp < 0.0) { fprintf(fplog, "Warning: Njtsswgd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswgdtemp, ckt->CKTtemp); printf("Warning: Njtsswgd = %g is negative at temperature = %g.\n", model->BSIM4v6njtsswgdtemp, ckt->CKTtemp); } if (model->BSIM4v6ntnoi < 0.0) { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v6ntnoi); printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v6ntnoi); model->BSIM4v6ntnoi = 0.0; } /* diode model */ if (model->BSIM4v6SbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctBotGradingCoeff); printf("Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctBotGradingCoeff); model->BSIM4v6SbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4v6SbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctSideGradingCoeff); printf("Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctSideGradingCoeff); model->BSIM4v6SbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4v6SbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctGateSideGradingCoeff); printf("Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v6SbulkJctGateSideGradingCoeff); model->BSIM4v6SbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4v6DbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctBotGradingCoeff); printf("Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctBotGradingCoeff); model->BSIM4v6DbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4v6DbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctSideGradingCoeff); printf("Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctSideGradingCoeff); model->BSIM4v6DbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4v6DbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctGateSideGradingCoeff); printf("Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v6DbulkJctGateSideGradingCoeff); model->BSIM4v6DbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4v6wpemod == 1) { if (model->BSIM4v6scref <= 0.0) { fprintf(fplog, "Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v6scref); printf("Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v6scref); model->BSIM4v6scref = 1e-6; } /*Move these checks to temp.c for sceff calculation*/ /* if (here->BSIM4v6sca < 0.0) { fprintf(fplog, "Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v6sca); printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v6sca); here->BSIM4v6sca = 0.0; } if (here->BSIM4v6scb < 0.0) { fprintf(fplog, "Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v6scb); printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v6scb); here->BSIM4v6scb = 0.0; } if (here->BSIM4v6scc < 0.0) { fprintf(fplog, "Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v6scc); printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v6scc); here->BSIM4v6scc = 0.0; } if (here->BSIM4v6sc < 0.0) { fprintf(fplog, "Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v6sc); printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v6sc); here->BSIM4v6sc = 0.0; } */ } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6trunc.c0000644000265600020320000000337212264261473021534 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4trunc.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here != NULL; here = here->BSIM4v6nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM4v6qb,ckt,timeStep); CKTterr(here->BSIM4v6qg,ckt,timeStep); CKTterr(here->BSIM4v6qd,ckt,timeStep); if (here->BSIM4v6trnqsMod) CKTterr(here->BSIM4v6qcdump,ckt,timeStep); if (here->BSIM4v6rbodyMod) { CKTterr(here->BSIM4v6qbs,ckt,timeStep); CKTterr(here->BSIM4v6qbd,ckt,timeStep); } if (here->BSIM4v6rgateMod == 3) CKTterr(here->BSIM4v6qgmid,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM4v6name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6ask.c0000644000265600020320000003275012264261473021161 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4ask.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM4v6instance *here = (BSIM4v6instance*)inst; NG_IGNORE(select); switch(which) { case BSIM4v6_L: value->rValue = here->BSIM4v6l; return(OK); case BSIM4v6_W: value->rValue = here->BSIM4v6w; return(OK); case BSIM4v6_M: value->rValue = here->BSIM4v6m; return(OK); case BSIM4v6_NF: value->rValue = here->BSIM4v6nf; return(OK); case BSIM4v6_MIN: value->iValue = here->BSIM4v6min; return(OK); case BSIM4v6_AS: value->rValue = here->BSIM4v6sourceArea; return(OK); case BSIM4v6_AD: value->rValue = here->BSIM4v6drainArea; return(OK); case BSIM4v6_PS: value->rValue = here->BSIM4v6sourcePerimeter; return(OK); case BSIM4v6_PD: value->rValue = here->BSIM4v6drainPerimeter; return(OK); case BSIM4v6_NRS: value->rValue = here->BSIM4v6sourceSquares; return(OK); case BSIM4v6_NRD: value->rValue = here->BSIM4v6drainSquares; return(OK); case BSIM4v6_OFF: value->rValue = here->BSIM4v6off; return(OK); case BSIM4v6_SA: value->rValue = here->BSIM4v6sa ; return(OK); case BSIM4v6_SB: value->rValue = here->BSIM4v6sb ; return(OK); case BSIM4v6_SD: value->rValue = here->BSIM4v6sd ; return(OK); case BSIM4v6_SCA: value->rValue = here->BSIM4v6sca ; return(OK); case BSIM4v6_SCB: value->rValue = here->BSIM4v6scb ; return(OK); case BSIM4v6_SCC: value->rValue = here->BSIM4v6scc ; return(OK); case BSIM4v6_SC: value->rValue = here->BSIM4v6sc ; return(OK); case BSIM4v6_RBSB: value->rValue = here->BSIM4v6rbsb; return(OK); case BSIM4v6_RBDB: value->rValue = here->BSIM4v6rbdb; return(OK); case BSIM4v6_RBPB: value->rValue = here->BSIM4v6rbpb; return(OK); case BSIM4v6_RBPS: value->rValue = here->BSIM4v6rbps; return(OK); case BSIM4v6_RBPD: value->rValue = here->BSIM4v6rbpd; return(OK); case BSIM4v6_DELVTO: value->rValue = here->BSIM4v6delvto; return(OK); case BSIM4v6_XGW: value->rValue = here->BSIM4v6xgw; return(OK); case BSIM4v6_NGCON: value->rValue = here->BSIM4v6ngcon; return(OK); case BSIM4v6_TRNQSMOD: value->iValue = here->BSIM4v6trnqsMod; return(OK); case BSIM4v6_ACNQSMOD: value->iValue = here->BSIM4v6acnqsMod; return(OK); case BSIM4v6_RBODYMOD: value->iValue = here->BSIM4v6rbodyMod; return(OK); case BSIM4v6_RGATEMOD: value->iValue = here->BSIM4v6rgateMod; return(OK); case BSIM4v6_GEOMOD: value->iValue = here->BSIM4v6geoMod; return(OK); case BSIM4v6_RGEOMOD: value->iValue = here->BSIM4v6rgeoMod; return(OK); case BSIM4v6_IC_VDS: value->rValue = here->BSIM4v6icVDS; return(OK); case BSIM4v6_IC_VGS: value->rValue = here->BSIM4v6icVGS; return(OK); case BSIM4v6_IC_VBS: value->rValue = here->BSIM4v6icVBS; return(OK); case BSIM4v6_DNODE: value->iValue = here->BSIM4v6dNode; return(OK); case BSIM4v6_GNODEEXT: value->iValue = here->BSIM4v6gNodeExt; return(OK); case BSIM4v6_SNODE: value->iValue = here->BSIM4v6sNode; return(OK); case BSIM4v6_BNODE: value->iValue = here->BSIM4v6bNode; return(OK); case BSIM4v6_DNODEPRIME: value->iValue = here->BSIM4v6dNodePrime; return(OK); case BSIM4v6_GNODEPRIME: value->iValue = here->BSIM4v6gNodePrime; return(OK); case BSIM4v6_GNODEMID: value->iValue = here->BSIM4v6gNodeMid; return(OK); case BSIM4v6_SNODEPRIME: value->iValue = here->BSIM4v6sNodePrime; return(OK); case BSIM4v6_DBNODE: value->iValue = here->BSIM4v6dbNode; return(OK); case BSIM4v6_BNODEPRIME: value->iValue = here->BSIM4v6bNodePrime; return(OK); case BSIM4v6_SBNODE: value->iValue = here->BSIM4v6sbNode; return(OK); case BSIM4v6_SOURCECONDUCT: value->rValue = here->BSIM4v6sourceConductance; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_DRAINCONDUCT: value->rValue = here->BSIM4v6drainConductance; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6vbd); return(OK); case BSIM4v6_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6vbs); return(OK); case BSIM4v6_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6vgs); return(OK); case BSIM4v6_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6vds); return(OK); case BSIM4v6_CD: value->rValue = here->BSIM4v6cd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBS: value->rValue = here->BSIM4v6cbs; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBD: value->rValue = here->BSIM4v6cbd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CSUB: value->rValue = here->BSIM4v6csub; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_QINV: value->rValue = here-> BSIM4v6qinv; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGIDL: value->rValue = here->BSIM4v6Igidl; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGISL: value->rValue = here->BSIM4v6Igisl; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGS: value->rValue = here->BSIM4v6Igs; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGD: value->rValue = here->BSIM4v6Igd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGB: value->rValue = here->BSIM4v6Igb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGCS: value->rValue = here->BSIM4v6Igcs; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_IGCD: value->rValue = here->BSIM4v6Igcd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GM: value->rValue = here->BSIM4v6gm; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GDS: value->rValue = here->BSIM4v6gds; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GMBS: value->rValue = here->BSIM4v6gmbs; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GBD: value->rValue = here->BSIM4v6gbd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GBS: value->rValue = here->BSIM4v6gbs; value->rValue *= here->BSIM4v6m; return(OK); /* case BSIM4v6_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qb); return(OK); */ case BSIM4v6_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6cqb); return(OK); /* case BSIM4v6_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qg); return(OK); */ case BSIM4v6_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6cqg); return(OK); /* case BSIM4v6_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qd); return(OK); */ case BSIM4v6_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6cqd); return(OK); /* case BSIM4v6_QS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qs); return(OK); */ case BSIM4v6_QB: value->rValue = here->BSIM4v6qbulk; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_QG: value->rValue = here->BSIM4v6qgate; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_QS: value->rValue = here->BSIM4v6qsrc; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_QD: value->rValue = here->BSIM4v6qdrn; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_QDEF: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qdef); return(OK); case BSIM4v6_GCRG: value->rValue = here->BSIM4v6gcrg; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_GTAU: value->rValue = here->BSIM4v6gtau; return(OK); case BSIM4v6_CGGB: value->rValue = here->BSIM4v6cggb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CGDB: value->rValue = here->BSIM4v6cgdb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CGSB: value->rValue = here->BSIM4v6cgsb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CDGB: value->rValue = here->BSIM4v6cdgb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CDDB: value->rValue = here->BSIM4v6cddb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CDSB: value->rValue = here->BSIM4v6cdsb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBGB: value->rValue = here->BSIM4v6cbgb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBDB: value->rValue = here->BSIM4v6cbdb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBSB: value->rValue = here->BSIM4v6cbsb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CSGB: value->rValue = here->BSIM4v6csgb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CSDB: value->rValue = here->BSIM4v6csdb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CSSB: value->rValue = here->BSIM4v6cssb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CGBB: value->rValue = here->BSIM4v6cgbb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CDBB: value->rValue = here->BSIM4v6cdbb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CSBB: value->rValue = here->BSIM4v6csbb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CBBB: value->rValue = here->BSIM4v6cbbb; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CAPBD: value->rValue = here->BSIM4v6capbd; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_CAPBS: value->rValue = here->BSIM4v6capbs; value->rValue *= here->BSIM4v6m; return(OK); case BSIM4v6_VON: value->rValue = here->BSIM4v6von; return(OK); case BSIM4v6_VDSAT: value->rValue = here->BSIM4v6vdsat; return(OK); case BSIM4v6_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qbs); return(OK); case BSIM4v6_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v6qbd); return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v6/b4v6par.c0000644000265600020320000001511412264261473021160 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4par.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM4v6param( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM4v6instance *here = (BSIM4v6instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM4v6_W: here->BSIM4v6w = value->rValue*scale; here->BSIM4v6wGiven = TRUE; break; case BSIM4v6_L: here->BSIM4v6l = value->rValue*scale; here->BSIM4v6lGiven = TRUE; break; case BSIM4v6_M: here->BSIM4v6m = value->rValue; here->BSIM4v6mGiven = TRUE; break; case BSIM4v6_NF: here->BSIM4v6nf = value->rValue; here->BSIM4v6nfGiven = TRUE; break; case BSIM4v6_MIN: here->BSIM4v6min = value->iValue; here->BSIM4v6minGiven = TRUE; break; case BSIM4v6_AS: here->BSIM4v6sourceArea = value->rValue*scale*scale; here->BSIM4v6sourceAreaGiven = TRUE; break; case BSIM4v6_AD: here->BSIM4v6drainArea = value->rValue*scale*scale; here->BSIM4v6drainAreaGiven = TRUE; break; case BSIM4v6_PS: here->BSIM4v6sourcePerimeter = value->rValue*scale; here->BSIM4v6sourcePerimeterGiven = TRUE; break; case BSIM4v6_PD: here->BSIM4v6drainPerimeter = value->rValue*scale; here->BSIM4v6drainPerimeterGiven = TRUE; break; case BSIM4v6_NRS: here->BSIM4v6sourceSquares = value->rValue; here->BSIM4v6sourceSquaresGiven = TRUE; break; case BSIM4v6_NRD: here->BSIM4v6drainSquares = value->rValue; here->BSIM4v6drainSquaresGiven = TRUE; break; case BSIM4v6_OFF: here->BSIM4v6off = value->iValue; break; case BSIM4v6_SA: here->BSIM4v6sa = value->rValue; here->BSIM4v6saGiven = TRUE; break; case BSIM4v6_SB: here->BSIM4v6sb = value->rValue; here->BSIM4v6sbGiven = TRUE; break; case BSIM4v6_SD: here->BSIM4v6sd = value->rValue; here->BSIM4v6sdGiven = TRUE; break; case BSIM4v6_SCA: here->BSIM4v6sca = value->rValue; here->BSIM4v6scaGiven = TRUE; break; case BSIM4v6_SCB: here->BSIM4v6scb = value->rValue; here->BSIM4v6scbGiven = TRUE; break; case BSIM4v6_SCC: here->BSIM4v6scc = value->rValue; here->BSIM4v6sccGiven = TRUE; break; case BSIM4v6_SC: here->BSIM4v6sc = value->rValue; here->BSIM4v6scGiven = TRUE; break; case BSIM4v6_RBSB: here->BSIM4v6rbsb = value->rValue; here->BSIM4v6rbsbGiven = TRUE; break; case BSIM4v6_RBDB: here->BSIM4v6rbdb = value->rValue; here->BSIM4v6rbdbGiven = TRUE; break; case BSIM4v6_RBPB: here->BSIM4v6rbpb = value->rValue; here->BSIM4v6rbpbGiven = TRUE; break; case BSIM4v6_RBPS: here->BSIM4v6rbps = value->rValue; here->BSIM4v6rbpsGiven = TRUE; break; case BSIM4v6_RBPD: here->BSIM4v6rbpd = value->rValue; here->BSIM4v6rbpdGiven = TRUE; break; case BSIM4v6_DELVTO: here->BSIM4v6delvto = value->rValue; here->BSIM4v6delvtoGiven = TRUE; break; case BSIM4v6_XGW: here->BSIM4v6xgw = value->rValue; here->BSIM4v6xgwGiven = TRUE; break; case BSIM4v6_NGCON: here->BSIM4v6ngcon = value->rValue; here->BSIM4v6ngconGiven = TRUE; break; case BSIM4v6_TRNQSMOD: here->BSIM4v6trnqsMod = value->iValue; here->BSIM4v6trnqsModGiven = TRUE; break; case BSIM4v6_ACNQSMOD: here->BSIM4v6acnqsMod = value->iValue; here->BSIM4v6acnqsModGiven = TRUE; break; case BSIM4v6_RBODYMOD: here->BSIM4v6rbodyMod = value->iValue; here->BSIM4v6rbodyModGiven = TRUE; break; case BSIM4v6_RGATEMOD: here->BSIM4v6rgateMod = value->iValue; here->BSIM4v6rgateModGiven = TRUE; break; case BSIM4v6_GEOMOD: here->BSIM4v6geoMod = value->iValue; here->BSIM4v6geoModGiven = TRUE; break; case BSIM4v6_RGEOMOD: here->BSIM4v6rgeoMod = value->iValue; here->BSIM4v6rgeoModGiven = TRUE; break; case BSIM4v6_IC_VDS: here->BSIM4v6icVDS = value->rValue; here->BSIM4v6icVDSGiven = TRUE; break; case BSIM4v6_IC_VGS: here->BSIM4v6icVGS = value->rValue; here->BSIM4v6icVGSGiven = TRUE; break; case BSIM4v6_IC_VBS: here->BSIM4v6icVBS = value->rValue; here->BSIM4v6icVBSGiven = TRUE; break; case BSIM4v6_IC: switch(value->v.numValue) { case 3: here->BSIM4v6icVBS = *(value->v.vec.rVec+2); here->BSIM4v6icVBSGiven = TRUE; case 2: here->BSIM4v6icVGS = *(value->v.vec.rVec+1); here->BSIM4v6icVGSGiven = TRUE; case 1: here->BSIM4v6icVDS = *(value->v.vec.rVec); here->BSIM4v6icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6set.c0000644000265600020320000030266712264261473021205 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /**** BSIM4.6.4 Update ngspice 08/22/2009 ****/ /**** OpenMP support ngspice 06/28/2010 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4set.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "ngspice/jobdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef USE_OMP #include "ngspice/cpextern.h" #endif #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 int BSIM4v6setup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; int error; CKTnode *tmp; int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */ double Rtot, DMCGeff, DMCIeff, DMDGeff; JOB *job; #ifdef USE_OMP unsigned int idx, InstCount; BSIM4v6instance **InstArray; #endif /* Search for a noise analysis request */ for (job = ft_curckt->ci_curTask->jobs; job; job = job->JOBnextJob) { if(strcmp(job->JOBname,"Noise Analysis")==0) { noiseAnalGiven = 1; break; } } /* loop through all the BSIM4v6 device models */ for( ; model != NULL; model = model->BSIM4v6nextModel ) { /* process defaults of model parameters */ if (!model->BSIM4v6typeGiven) model->BSIM4v6type = NMOS; if (!model->BSIM4v6mobModGiven) model->BSIM4v6mobMod = 0; else if ((model->BSIM4v6mobMod != 0) && (model->BSIM4v6mobMod != 1) && (model->BSIM4v6mobMod != 2) && (model->BSIM4v6mobMod != 3)) { model->BSIM4v6mobMod = 0; printf("Warning: mobMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6binUnitGiven) model->BSIM4v6binUnit = 1; if (!model->BSIM4v6paramChkGiven) model->BSIM4v6paramChk = 1; if (!model->BSIM4v6dioModGiven) model->BSIM4v6dioMod = 1; else if ((model->BSIM4v6dioMod != 0) && (model->BSIM4v6dioMod != 1) && (model->BSIM4v6dioMod != 2)) { model->BSIM4v6dioMod = 1; printf("Warning: dioMod has been set to its default value: 1.\n"); } if (!model->BSIM4v6cvchargeModGiven) model->BSIM4v6cvchargeMod = 0; if (!model->BSIM4v6capModGiven) model->BSIM4v6capMod = 2; else if ((model->BSIM4v6capMod != 0) && (model->BSIM4v6capMod != 1) && (model->BSIM4v6capMod != 2)) { model->BSIM4v6capMod = 2; printf("Warning: capMod has been set to its default value: 2.\n"); } if (!model->BSIM4v6rdsModGiven) model->BSIM4v6rdsMod = 0; else if ((model->BSIM4v6rdsMod != 0) && (model->BSIM4v6rdsMod != 1)) { model->BSIM4v6rdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6rbodyModGiven) model->BSIM4v6rbodyMod = 0; else if ((model->BSIM4v6rbodyMod != 0) && (model->BSIM4v6rbodyMod != 1) && (model->BSIM4v6rbodyMod != 2)) { model->BSIM4v6rbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6rgateModGiven) model->BSIM4v6rgateMod = 0; else if ((model->BSIM4v6rgateMod != 0) && (model->BSIM4v6rgateMod != 1) && (model->BSIM4v6rgateMod != 2) && (model->BSIM4v6rgateMod != 3)) { model->BSIM4v6rgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6perModGiven) model->BSIM4v6perMod = 1; else if ((model->BSIM4v6perMod != 0) && (model->BSIM4v6perMod != 1)) { model->BSIM4v6perMod = 1; printf("Warning: perMod has been set to its default value: 1.\n"); } if (!model->BSIM4v6geoModGiven) model->BSIM4v6geoMod = 0; if (!model->BSIM4v6rgeoModGiven) model->BSIM4v6rgeoMod = 0; else if ((model->BSIM4v6rgeoMod != 0) && (model->BSIM4v6rgeoMod != 1)) { model->BSIM4v6rgeoMod = 1; printf("Warning: rgeoMod has been set to its default value: 1.\n"); } if (!model->BSIM4v6fnoiModGiven) model->BSIM4v6fnoiMod = 1; else if ((model->BSIM4v6fnoiMod != 0) && (model->BSIM4v6fnoiMod != 1)) { model->BSIM4v6fnoiMod = 1; printf("Warning: fnoiMod has been set to its default value: 1.\n"); } if (!model->BSIM4v6tnoiModGiven) model->BSIM4v6tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ else if ((model->BSIM4v6tnoiMod != 0) && (model->BSIM4v6tnoiMod != 1)) { model->BSIM4v6tnoiMod = 0; printf("Warning: tnoiMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6trnqsModGiven) model->BSIM4v6trnqsMod = 0; else if ((model->BSIM4v6trnqsMod != 0) && (model->BSIM4v6trnqsMod != 1)) { model->BSIM4v6trnqsMod = 0; printf("Warning: trnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6acnqsModGiven) model->BSIM4v6acnqsMod = 0; else if ((model->BSIM4v6acnqsMod != 0) && (model->BSIM4v6acnqsMod != 1)) { model->BSIM4v6acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6mtrlModGiven) model->BSIM4v6mtrlMod = 0; if (!model->BSIM4v6igcModGiven) model->BSIM4v6igcMod = 0; else if ((model->BSIM4v6igcMod != 0) && (model->BSIM4v6igcMod != 1) && (model->BSIM4v6igcMod != 2)) { model->BSIM4v6igcMod = 0; printf("Warning: igcMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6igbModGiven) model->BSIM4v6igbMod = 0; else if ((model->BSIM4v6igbMod != 0) && (model->BSIM4v6igbMod != 1)) { model->BSIM4v6igbMod = 0; printf("Warning: igbMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6tempModGiven) model->BSIM4v6tempMod = 0; else if ((model->BSIM4v6tempMod != 0) && (model->BSIM4v6tempMod != 1) && (model->BSIM4v6tempMod != 2) && (model->BSIM4v6tempMod != 3)) { model->BSIM4v6tempMod = 0; printf("Warning: tempMod has been set to its default value: 0.\n"); } if (!model->BSIM4v6versionGiven) model->BSIM4v6version = "4.6.4"; if (!model->BSIM4v6toxrefGiven) model->BSIM4v6toxref = 30.0e-10; if (!model->BSIM4v6eotGiven) model->BSIM4v6eot = 15.0e-10; if (!model->BSIM4v6vddeotGiven) model->BSIM4v6vddeot = (model->BSIM4v6type == NMOS) ? 1.5 : -1.5; if (!model->BSIM4v6tempeotGiven) model->BSIM4v6tempeot = 300.15; if (!model->BSIM4v6leffeotGiven) model->BSIM4v6leffeot = 1; if (!model->BSIM4v6weffeotGiven) model->BSIM4v6weffeot = 10; if (!model->BSIM4v6adosGiven) model->BSIM4v6ados = 1.0; if (!model->BSIM4v6bdosGiven) model->BSIM4v6bdos = 1.0; if (!model->BSIM4v6toxeGiven) model->BSIM4v6toxe = 30.0e-10; if (!model->BSIM4v6toxpGiven) model->BSIM4v6toxp = model->BSIM4v6toxe; if (!model->BSIM4v6toxmGiven) model->BSIM4v6toxm = model->BSIM4v6toxe; if (!model->BSIM4v6dtoxGiven) model->BSIM4v6dtox = 0.0; if (!model->BSIM4v6epsroxGiven) model->BSIM4v6epsrox = 3.9; if (!model->BSIM4v6cdscGiven) model->BSIM4v6cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM4v6cdscbGiven) model->BSIM4v6cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v6cdscdGiven) model->BSIM4v6cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v6citGiven) model->BSIM4v6cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v6nfactorGiven) model->BSIM4v6nfactor = 1.0; if (!model->BSIM4v6xjGiven) model->BSIM4v6xj = .15e-6; if (!model->BSIM4v6vsatGiven) model->BSIM4v6vsat = 8.0e4; /* unit m/s */ if (!model->BSIM4v6atGiven) model->BSIM4v6at = 3.3e4; /* unit m/s */ if (!model->BSIM4v6a0Given) model->BSIM4v6a0 = 1.0; if (!model->BSIM4v6agsGiven) model->BSIM4v6ags = 0.0; if (!model->BSIM4v6a1Given) model->BSIM4v6a1 = 0.0; if (!model->BSIM4v6a2Given) model->BSIM4v6a2 = 1.0; if (!model->BSIM4v6ketaGiven) model->BSIM4v6keta = -0.047; /* unit / V */ if (!model->BSIM4v6nsubGiven) model->BSIM4v6nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM4v6phigGiven) model->BSIM4v6phig = 4.05; if (!model->BSIM4v6epsrgateGiven) model->BSIM4v6epsrgate = 11.7; if (!model->BSIM4v6easubGiven) model->BSIM4v6easub = 4.05; if (!model->BSIM4v6epsrsubGiven) model->BSIM4v6epsrsub = 11.7; if (!model->BSIM4v6ni0subGiven) model->BSIM4v6ni0sub = 1.45e10; /* unit 1/cm3 */ if (!model->BSIM4v6bg0subGiven) model->BSIM4v6bg0sub = 1.16; /* unit eV */ if (!model->BSIM4v6tbgasubGiven) model->BSIM4v6tbgasub = 7.02e-4; if (!model->BSIM4v6tbgbsubGiven) model->BSIM4v6tbgbsub = 1108.0; if (!model->BSIM4v6ndepGiven) model->BSIM4v6ndep = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM4v6nsdGiven) model->BSIM4v6nsd = 1.0e20; /* unit 1/cm3 */ if (!model->BSIM4v6phinGiven) model->BSIM4v6phin = 0.0; /* unit V */ if (!model->BSIM4v6ngateGiven) model->BSIM4v6ngate = 0; /* unit 1/cm3 */ if (!model->BSIM4v6vbmGiven) model->BSIM4v6vbm = -3.0; if (!model->BSIM4v6xtGiven) model->BSIM4v6xt = 1.55e-7; if (!model->BSIM4v6kt1Given) model->BSIM4v6kt1 = -0.11; /* unit V */ if (!model->BSIM4v6kt1lGiven) model->BSIM4v6kt1l = 0.0; /* unit V*m */ if (!model->BSIM4v6kt2Given) model->BSIM4v6kt2 = 0.022; /* No unit */ if (!model->BSIM4v6k3Given) model->BSIM4v6k3 = 80.0; if (!model->BSIM4v6k3bGiven) model->BSIM4v6k3b = 0.0; if (!model->BSIM4v6w0Given) model->BSIM4v6w0 = 2.5e-6; if (!model->BSIM4v6lpe0Given) model->BSIM4v6lpe0 = 1.74e-7; if (!model->BSIM4v6lpebGiven) model->BSIM4v6lpeb = 0.0; if (!model->BSIM4v6dvtp0Given) model->BSIM4v6dvtp0 = 0.0; if (!model->BSIM4v6dvtp1Given) model->BSIM4v6dvtp1 = 0.0; if (!model->BSIM4v6dvt0Given) model->BSIM4v6dvt0 = 2.2; if (!model->BSIM4v6dvt1Given) model->BSIM4v6dvt1 = 0.53; if (!model->BSIM4v6dvt2Given) model->BSIM4v6dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM4v6dvt0wGiven) model->BSIM4v6dvt0w = 0.0; if (!model->BSIM4v6dvt1wGiven) model->BSIM4v6dvt1w = 5.3e6; if (!model->BSIM4v6dvt2wGiven) model->BSIM4v6dvt2w = -0.032; if (!model->BSIM4v6droutGiven) model->BSIM4v6drout = 0.56; if (!model->BSIM4v6dsubGiven) model->BSIM4v6dsub = model->BSIM4v6drout; if (!model->BSIM4v6vth0Given) model->BSIM4v6vth0 = (model->BSIM4v6type == NMOS) ? 0.7 : -0.7; if (!model->BSIM4v6vfbGiven) model->BSIM4v6vfb = -1.0; if (!model->BSIM4v6euGiven) model->BSIM4v6eu = (model->BSIM4v6type == NMOS) ? 1.67 : 1.0; if (!model->BSIM4v6ucsGiven) model->BSIM4v6ucs = (model->BSIM4v6type == NMOS) ? 1.67 : 1.0; if (!model->BSIM4v6uaGiven) model->BSIM4v6ua = ((model->BSIM4v6mobMod == 2)) ? 1.0e-15 : 1.0e-9; /* unit m/V */ if (!model->BSIM4v6ua1Given) model->BSIM4v6ua1 = 1.0e-9; /* unit m/V */ if (!model->BSIM4v6ubGiven) model->BSIM4v6ub = 1.0e-19; /* unit (m/V)**2 */ if (!model->BSIM4v6ub1Given) model->BSIM4v6ub1 = -1.0e-18; /* unit (m/V)**2 */ if (!model->BSIM4v6ucGiven) model->BSIM4v6uc = (model->BSIM4v6mobMod == 1) ? -0.0465 : -0.0465e-9; if (!model->BSIM4v6uc1Given) model->BSIM4v6uc1 = (model->BSIM4v6mobMod == 1) ? -0.056 : -0.056e-9; if (!model->BSIM4v6udGiven) model->BSIM4v6ud = 0.0; /* unit m**(-2) */ if (!model->BSIM4v6ud1Given) model->BSIM4v6ud1 = 0.0; if (!model->BSIM4v6upGiven) model->BSIM4v6up = 0.0; if (!model->BSIM4v6lpGiven) model->BSIM4v6lp = 1.0e-8; if (!model->BSIM4v6u0Given) model->BSIM4v6u0 = (model->BSIM4v6type == NMOS) ? 0.067 : 0.025; if (!model->BSIM4v6uteGiven) model->BSIM4v6ute = -1.5; if (!model->BSIM4v6ucsteGiven) model->BSIM4v6ucste = -4.775e-3; if (!model->BSIM4v6voffGiven) model->BSIM4v6voff = -0.08; if (!model->BSIM4v6vofflGiven) model->BSIM4v6voffl = 0.0; if (!model->BSIM4v6voffcvlGiven) model->BSIM4v6voffcvl = 0.0; if (!model->BSIM4v6minvGiven) model->BSIM4v6minv = 0.0; if (!model->BSIM4v6minvcvGiven) model->BSIM4v6minvcv = 0.0; if (!model->BSIM4v6fproutGiven) model->BSIM4v6fprout = 0.0; if (!model->BSIM4v6pditsGiven) model->BSIM4v6pdits = 0.0; if (!model->BSIM4v6pditsdGiven) model->BSIM4v6pditsd = 0.0; if (!model->BSIM4v6pditslGiven) model->BSIM4v6pditsl = 0.0; if (!model->BSIM4v6deltaGiven) model->BSIM4v6delta = 0.01; if (!model->BSIM4v6rdswminGiven) model->BSIM4v6rdswmin = 0.0; if (!model->BSIM4v6rdwminGiven) model->BSIM4v6rdwmin = 0.0; if (!model->BSIM4v6rswminGiven) model->BSIM4v6rswmin = 0.0; if (!model->BSIM4v6rdswGiven) model->BSIM4v6rdsw = 200.0; /* in ohm*um */ if (!model->BSIM4v6rdwGiven) model->BSIM4v6rdw = 100.0; if (!model->BSIM4v6rswGiven) model->BSIM4v6rsw = 100.0; if (!model->BSIM4v6prwgGiven) model->BSIM4v6prwg = 1.0; /* in 1/V */ if (!model->BSIM4v6prwbGiven) model->BSIM4v6prwb = 0.0; if (!model->BSIM4v6prtGiven) if (!model->BSIM4v6prtGiven) model->BSIM4v6prt = 0.0; if (!model->BSIM4v6eta0Given) model->BSIM4v6eta0 = 0.08; /* no unit */ if (!model->BSIM4v6etabGiven) model->BSIM4v6etab = -0.07; /* unit 1/V */ if (!model->BSIM4v6pclmGiven) model->BSIM4v6pclm = 1.3; /* no unit */ if (!model->BSIM4v6pdibl1Given) model->BSIM4v6pdibl1 = 0.39; /* no unit */ if (!model->BSIM4v6pdibl2Given) model->BSIM4v6pdibl2 = 0.0086; /* no unit */ if (!model->BSIM4v6pdiblbGiven) model->BSIM4v6pdiblb = 0.0; /* 1/V */ if (!model->BSIM4v6pscbe1Given) model->BSIM4v6pscbe1 = 4.24e8; if (!model->BSIM4v6pscbe2Given) model->BSIM4v6pscbe2 = 1.0e-5; if (!model->BSIM4v6pvagGiven) model->BSIM4v6pvag = 0.0; if (!model->BSIM4v6wrGiven) model->BSIM4v6wr = 1.0; if (!model->BSIM4v6dwgGiven) model->BSIM4v6dwg = 0.0; if (!model->BSIM4v6dwbGiven) model->BSIM4v6dwb = 0.0; if (!model->BSIM4v6b0Given) model->BSIM4v6b0 = 0.0; if (!model->BSIM4v6b1Given) model->BSIM4v6b1 = 0.0; if (!model->BSIM4v6alpha0Given) model->BSIM4v6alpha0 = 0.0; if (!model->BSIM4v6alpha1Given) model->BSIM4v6alpha1 = 0.0; if (!model->BSIM4v6beta0Given) model->BSIM4v6beta0 = 0.0; if (!model->BSIM4v6agidlGiven) model->BSIM4v6agidl = 0.0; if (!model->BSIM4v6bgidlGiven) model->BSIM4v6bgidl = 2.3e9; /* V/m */ if (!model->BSIM4v6cgidlGiven) model->BSIM4v6cgidl = 0.5; /* V^3 */ if (!model->BSIM4v6egidlGiven) model->BSIM4v6egidl = 0.8; /* V */ if (!model->BSIM4v6agislGiven) { if (model->BSIM4v6agidlGiven) model->BSIM4v6agisl = model->BSIM4v6agidl; else model->BSIM4v6agisl = 0.0; } if (!model->BSIM4v6bgislGiven) { if (model->BSIM4v6bgidlGiven) model->BSIM4v6bgisl = model->BSIM4v6bgidl; else model->BSIM4v6bgisl = 2.3e9; /* V/m */ } if (!model->BSIM4v6cgislGiven) { if (model->BSIM4v6cgidlGiven) model->BSIM4v6cgisl = model->BSIM4v6cgidl; else model->BSIM4v6cgisl = 0.5; /* V^3 */ } if (!model->BSIM4v6egislGiven) { if (model->BSIM4v6egidlGiven) model->BSIM4v6egisl = model->BSIM4v6egidl; else model->BSIM4v6egisl = 0.8; /* V */ } if (!model->BSIM4v6aigcGiven) model->BSIM4v6aigc = (model->BSIM4v6type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4v6bigcGiven) model->BSIM4v6bigc = (model->BSIM4v6type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4v6cigcGiven) model->BSIM4v6cigc = (model->BSIM4v6type == NMOS) ? 0.075 : 0.03; if (model->BSIM4v6aigsdGiven) { model->BSIM4v6aigs = model->BSIM4v6aigd = model->BSIM4v6aigsd; } else { model->BSIM4v6aigsd = (model->BSIM4v6type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4v6aigsGiven) model->BSIM4v6aigs = (model->BSIM4v6type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4v6aigdGiven) model->BSIM4v6aigd = (model->BSIM4v6type == NMOS) ? 1.36e-2 : 9.80e-3; } if (model->BSIM4v6bigsdGiven) { model->BSIM4v6bigs = model->BSIM4v6bigd = model->BSIM4v6bigsd; } else { model->BSIM4v6bigsd = (model->BSIM4v6type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4v6bigsGiven) model->BSIM4v6bigs = (model->BSIM4v6type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4v6bigdGiven) model->BSIM4v6bigd = (model->BSIM4v6type == NMOS) ? 1.71e-3 : 7.59e-4; } if (model->BSIM4v6cigsdGiven) { model->BSIM4v6cigs = model->BSIM4v6cigd = model->BSIM4v6cigsd; } else { model->BSIM4v6cigsd = (model->BSIM4v6type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v6cigsGiven) model->BSIM4v6cigs = (model->BSIM4v6type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v6cigdGiven) model->BSIM4v6cigd = (model->BSIM4v6type == NMOS) ? 0.075 : 0.03; } if (!model->BSIM4v6aigbaccGiven) model->BSIM4v6aigbacc = 1.36e-2; if (!model->BSIM4v6bigbaccGiven) model->BSIM4v6bigbacc = 1.71e-3; if (!model->BSIM4v6cigbaccGiven) model->BSIM4v6cigbacc = 0.075; if (!model->BSIM4v6aigbinvGiven) model->BSIM4v6aigbinv = 1.11e-2; if (!model->BSIM4v6bigbinvGiven) model->BSIM4v6bigbinv = 9.49e-4; if (!model->BSIM4v6cigbinvGiven) model->BSIM4v6cigbinv = 0.006; if (!model->BSIM4v6nigcGiven) model->BSIM4v6nigc = 1.0; if (!model->BSIM4v6nigbinvGiven) model->BSIM4v6nigbinv = 3.0; if (!model->BSIM4v6nigbaccGiven) model->BSIM4v6nigbacc = 1.0; if (!model->BSIM4v6ntoxGiven) model->BSIM4v6ntox = 1.0; if (!model->BSIM4v6eigbinvGiven) model->BSIM4v6eigbinv = 1.1; if (!model->BSIM4v6pigcdGiven) model->BSIM4v6pigcd = 1.0; if (!model->BSIM4v6poxedgeGiven) model->BSIM4v6poxedge = 1.0; if (!model->BSIM4v6xrcrg1Given) model->BSIM4v6xrcrg1 = 12.0; if (!model->BSIM4v6xrcrg2Given) model->BSIM4v6xrcrg2 = 1.0; if (!model->BSIM4v6ijthsfwdGiven) model->BSIM4v6ijthsfwd = 0.1; /* unit A */ if (!model->BSIM4v6ijthdfwdGiven) model->BSIM4v6ijthdfwd = model->BSIM4v6ijthsfwd; if (!model->BSIM4v6ijthsrevGiven) model->BSIM4v6ijthsrev = 0.1; /* unit A */ if (!model->BSIM4v6ijthdrevGiven) model->BSIM4v6ijthdrev = model->BSIM4v6ijthsrev; if (!model->BSIM4v6tnoiaGiven) model->BSIM4v6tnoia = 1.5; if (!model->BSIM4v6tnoibGiven) model->BSIM4v6tnoib = 3.5; if (!model->BSIM4v6rnoiaGiven) model->BSIM4v6rnoia = 0.577; if (!model->BSIM4v6rnoibGiven) model->BSIM4v6rnoib = 0.5164; if (!model->BSIM4v6ntnoiGiven) model->BSIM4v6ntnoi = 1.0; if (!model->BSIM4v6lambdaGiven) model->BSIM4v6lambda = 0.0; if (!model->BSIM4v6vtlGiven) model->BSIM4v6vtl = 2.0e5; /* unit m/s */ if (!model->BSIM4v6xnGiven) model->BSIM4v6xn = 3.0; if (!model->BSIM4v6lcGiven) model->BSIM4v6lc = 5.0e-9; if (!model->BSIM4v6vfbsdoffGiven) model->BSIM4v6vfbsdoff = 0.0; /* unit v */ if (!model->BSIM4v6tvfbsdoffGiven) model->BSIM4v6tvfbsdoff = 0.0; if (!model->BSIM4v6tvoffGiven) model->BSIM4v6tvoff = 0.0; if (!model->BSIM4v6lintnoiGiven) model->BSIM4v6lintnoi = 0.0; /* unit m */ if (!model->BSIM4v6xjbvsGiven) model->BSIM4v6xjbvs = 1.0; /* no unit */ if (!model->BSIM4v6xjbvdGiven) model->BSIM4v6xjbvd = model->BSIM4v6xjbvs; if (!model->BSIM4v6bvsGiven) model->BSIM4v6bvs = 10.0; /* V */ if (!model->BSIM4v6bvdGiven) model->BSIM4v6bvd = model->BSIM4v6bvs; if (!model->BSIM4v6gbminGiven) model->BSIM4v6gbmin = 1.0e-12; /* in mho */ if (!model->BSIM4v6rbdbGiven) model->BSIM4v6rbdb = 50.0; /* in ohm */ if (!model->BSIM4v6rbpbGiven) model->BSIM4v6rbpb = 50.0; if (!model->BSIM4v6rbsbGiven) model->BSIM4v6rbsb = 50.0; if (!model->BSIM4v6rbpsGiven) model->BSIM4v6rbps = 50.0; if (!model->BSIM4v6rbpdGiven) model->BSIM4v6rbpd = 50.0; if (!model->BSIM4v6rbps0Given) model->BSIM4v6rbps0 = 50.0; if (!model->BSIM4v6rbpslGiven) model->BSIM4v6rbpsl = 0.0; if (!model->BSIM4v6rbpswGiven) model->BSIM4v6rbpsw = 0.0; if (!model->BSIM4v6rbpsnfGiven) model->BSIM4v6rbpsnf = 0.0; if (!model->BSIM4v6rbpd0Given) model->BSIM4v6rbpd0 = 50.0; if (!model->BSIM4v6rbpdlGiven) model->BSIM4v6rbpdl = 0.0; if (!model->BSIM4v6rbpdwGiven) model->BSIM4v6rbpdw = 0.0; if (!model->BSIM4v6rbpdnfGiven) model->BSIM4v6rbpdnf = 0.0; if (!model->BSIM4v6rbpbx0Given) model->BSIM4v6rbpbx0 = 100.0; if (!model->BSIM4v6rbpbxlGiven) model->BSIM4v6rbpbxl = 0.0; if (!model->BSIM4v6rbpbxwGiven) model->BSIM4v6rbpbxw = 0.0; if (!model->BSIM4v6rbpbxnfGiven) model->BSIM4v6rbpbxnf = 0.0; if (!model->BSIM4v6rbpby0Given) model->BSIM4v6rbpby0 = 100.0; if (!model->BSIM4v6rbpbylGiven) model->BSIM4v6rbpbyl = 0.0; if (!model->BSIM4v6rbpbywGiven) model->BSIM4v6rbpbyw = 0.0; if (!model->BSIM4v6rbpbynfGiven) model->BSIM4v6rbpbynf = 0.0; if (!model->BSIM4v6rbsbx0Given) model->BSIM4v6rbsbx0 = 100.0; if (!model->BSIM4v6rbsby0Given) model->BSIM4v6rbsby0 = 100.0; if (!model->BSIM4v6rbdbx0Given) model->BSIM4v6rbdbx0 = 100.0; if (!model->BSIM4v6rbdby0Given) model->BSIM4v6rbdby0 = 100.0; if (!model->BSIM4v6rbsdbxlGiven) model->BSIM4v6rbsdbxl = 0.0; if (!model->BSIM4v6rbsdbxwGiven) model->BSIM4v6rbsdbxw = 0.0; if (!model->BSIM4v6rbsdbxnfGiven) model->BSIM4v6rbsdbxnf = 0.0; if (!model->BSIM4v6rbsdbylGiven) model->BSIM4v6rbsdbyl = 0.0; if (!model->BSIM4v6rbsdbywGiven) model->BSIM4v6rbsdbyw = 0.0; if (!model->BSIM4v6rbsdbynfGiven) model->BSIM4v6rbsdbynf = 0.0; if (!model->BSIM4v6cgslGiven) model->BSIM4v6cgsl = 0.0; if (!model->BSIM4v6cgdlGiven) model->BSIM4v6cgdl = 0.0; if (!model->BSIM4v6ckappasGiven) model->BSIM4v6ckappas = 0.6; if (!model->BSIM4v6ckappadGiven) model->BSIM4v6ckappad = model->BSIM4v6ckappas; if (!model->BSIM4v6clcGiven) model->BSIM4v6clc = 0.1e-6; if (!model->BSIM4v6cleGiven) model->BSIM4v6cle = 0.6; if (!model->BSIM4v6vfbcvGiven) model->BSIM4v6vfbcv = -1.0; if (!model->BSIM4v6acdeGiven) model->BSIM4v6acde = 1.0; if (!model->BSIM4v6moinGiven) model->BSIM4v6moin = 15.0; if (!model->BSIM4v6noffGiven) model->BSIM4v6noff = 1.0; if (!model->BSIM4v6voffcvGiven) model->BSIM4v6voffcv = 0.0; if (!model->BSIM4v6dmcgGiven) model->BSIM4v6dmcg = 0.0; if (!model->BSIM4v6dmciGiven) model->BSIM4v6dmci = model->BSIM4v6dmcg; if (!model->BSIM4v6dmdgGiven) model->BSIM4v6dmdg = 0.0; if (!model->BSIM4v6dmcgtGiven) model->BSIM4v6dmcgt = 0.0; if (!model->BSIM4v6xgwGiven) model->BSIM4v6xgw = 0.0; if (!model->BSIM4v6xglGiven) model->BSIM4v6xgl = 0.0; if (!model->BSIM4v6rshgGiven) model->BSIM4v6rshg = 0.1; if (!model->BSIM4v6ngconGiven) model->BSIM4v6ngcon = 1.0; if (!model->BSIM4v6tcjGiven) model->BSIM4v6tcj = 0.0; if (!model->BSIM4v6tpbGiven) model->BSIM4v6tpb = 0.0; if (!model->BSIM4v6tcjswGiven) model->BSIM4v6tcjsw = 0.0; if (!model->BSIM4v6tpbswGiven) model->BSIM4v6tpbsw = 0.0; if (!model->BSIM4v6tcjswgGiven) model->BSIM4v6tcjswg = 0.0; if (!model->BSIM4v6tpbswgGiven) model->BSIM4v6tpbswg = 0.0; /* Length dependence */ if (!model->BSIM4v6lcdscGiven) model->BSIM4v6lcdsc = 0.0; if (!model->BSIM4v6lcdscbGiven) model->BSIM4v6lcdscb = 0.0; if (!model->BSIM4v6lcdscdGiven) model->BSIM4v6lcdscd = 0.0; if (!model->BSIM4v6lcitGiven) model->BSIM4v6lcit = 0.0; if (!model->BSIM4v6lnfactorGiven) model->BSIM4v6lnfactor = 0.0; if (!model->BSIM4v6lxjGiven) model->BSIM4v6lxj = 0.0; if (!model->BSIM4v6lvsatGiven) model->BSIM4v6lvsat = 0.0; if (!model->BSIM4v6latGiven) model->BSIM4v6lat = 0.0; if (!model->BSIM4v6la0Given) model->BSIM4v6la0 = 0.0; if (!model->BSIM4v6lagsGiven) model->BSIM4v6lags = 0.0; if (!model->BSIM4v6la1Given) model->BSIM4v6la1 = 0.0; if (!model->BSIM4v6la2Given) model->BSIM4v6la2 = 0.0; if (!model->BSIM4v6lketaGiven) model->BSIM4v6lketa = 0.0; if (!model->BSIM4v6lnsubGiven) model->BSIM4v6lnsub = 0.0; if (!model->BSIM4v6lndepGiven) model->BSIM4v6lndep = 0.0; if (!model->BSIM4v6lnsdGiven) model->BSIM4v6lnsd = 0.0; if (!model->BSIM4v6lphinGiven) model->BSIM4v6lphin = 0.0; if (!model->BSIM4v6lngateGiven) model->BSIM4v6lngate = 0.0; if (!model->BSIM4v6lvbmGiven) model->BSIM4v6lvbm = 0.0; if (!model->BSIM4v6lxtGiven) model->BSIM4v6lxt = 0.0; if (!model->BSIM4v6lkt1Given) model->BSIM4v6lkt1 = 0.0; if (!model->BSIM4v6lkt1lGiven) model->BSIM4v6lkt1l = 0.0; if (!model->BSIM4v6lkt2Given) model->BSIM4v6lkt2 = 0.0; if (!model->BSIM4v6lk3Given) model->BSIM4v6lk3 = 0.0; if (!model->BSIM4v6lk3bGiven) model->BSIM4v6lk3b = 0.0; if (!model->BSIM4v6lw0Given) model->BSIM4v6lw0 = 0.0; if (!model->BSIM4v6llpe0Given) model->BSIM4v6llpe0 = 0.0; if (!model->BSIM4v6llpebGiven) model->BSIM4v6llpeb = 0.0; if (!model->BSIM4v6ldvtp0Given) model->BSIM4v6ldvtp0 = 0.0; if (!model->BSIM4v6ldvtp1Given) model->BSIM4v6ldvtp1 = 0.0; if (!model->BSIM4v6ldvt0Given) model->BSIM4v6ldvt0 = 0.0; if (!model->BSIM4v6ldvt1Given) model->BSIM4v6ldvt1 = 0.0; if (!model->BSIM4v6ldvt2Given) model->BSIM4v6ldvt2 = 0.0; if (!model->BSIM4v6ldvt0wGiven) model->BSIM4v6ldvt0w = 0.0; if (!model->BSIM4v6ldvt1wGiven) model->BSIM4v6ldvt1w = 0.0; if (!model->BSIM4v6ldvt2wGiven) model->BSIM4v6ldvt2w = 0.0; if (!model->BSIM4v6ldroutGiven) model->BSIM4v6ldrout = 0.0; if (!model->BSIM4v6ldsubGiven) model->BSIM4v6ldsub = 0.0; if (!model->BSIM4v6lvth0Given) model->BSIM4v6lvth0 = 0.0; if (!model->BSIM4v6luaGiven) model->BSIM4v6lua = 0.0; if (!model->BSIM4v6lua1Given) model->BSIM4v6lua1 = 0.0; if (!model->BSIM4v6lubGiven) model->BSIM4v6lub = 0.0; if (!model->BSIM4v6lub1Given) model->BSIM4v6lub1 = 0.0; if (!model->BSIM4v6lucGiven) model->BSIM4v6luc = 0.0; if (!model->BSIM4v6luc1Given) model->BSIM4v6luc1 = 0.0; if (!model->BSIM4v6ludGiven) model->BSIM4v6lud = 0.0; if (!model->BSIM4v6lud1Given) model->BSIM4v6lud1 = 0.0; if (!model->BSIM4v6lupGiven) model->BSIM4v6lup = 0.0; if (!model->BSIM4v6llpGiven) model->BSIM4v6llp = 0.0; if (!model->BSIM4v6lu0Given) model->BSIM4v6lu0 = 0.0; if (!model->BSIM4v6luteGiven) model->BSIM4v6lute = 0.0; if (!model->BSIM4v6lucsteGiven) model->BSIM4v6lucste = 0.0; if (!model->BSIM4v6lvoffGiven) model->BSIM4v6lvoff = 0.0; if (!model->BSIM4v6lminvGiven) model->BSIM4v6lminv = 0.0; if (!model->BSIM4v6lminvcvGiven) model->BSIM4v6lminvcv = 0.0; if (!model->BSIM4v6lfproutGiven) model->BSIM4v6lfprout = 0.0; if (!model->BSIM4v6lpditsGiven) model->BSIM4v6lpdits = 0.0; if (!model->BSIM4v6lpditsdGiven) model->BSIM4v6lpditsd = 0.0; if (!model->BSIM4v6ldeltaGiven) model->BSIM4v6ldelta = 0.0; if (!model->BSIM4v6lrdswGiven) model->BSIM4v6lrdsw = 0.0; if (!model->BSIM4v6lrdwGiven) model->BSIM4v6lrdw = 0.0; if (!model->BSIM4v6lrswGiven) model->BSIM4v6lrsw = 0.0; if (!model->BSIM4v6lprwbGiven) model->BSIM4v6lprwb = 0.0; if (!model->BSIM4v6lprwgGiven) model->BSIM4v6lprwg = 0.0; if (!model->BSIM4v6lprtGiven) model->BSIM4v6lprt = 0.0; if (!model->BSIM4v6leta0Given) model->BSIM4v6leta0 = 0.0; if (!model->BSIM4v6letabGiven) model->BSIM4v6letab = -0.0; if (!model->BSIM4v6lpclmGiven) model->BSIM4v6lpclm = 0.0; if (!model->BSIM4v6lpdibl1Given) model->BSIM4v6lpdibl1 = 0.0; if (!model->BSIM4v6lpdibl2Given) model->BSIM4v6lpdibl2 = 0.0; if (!model->BSIM4v6lpdiblbGiven) model->BSIM4v6lpdiblb = 0.0; if (!model->BSIM4v6lpscbe1Given) model->BSIM4v6lpscbe1 = 0.0; if (!model->BSIM4v6lpscbe2Given) model->BSIM4v6lpscbe2 = 0.0; if (!model->BSIM4v6lpvagGiven) model->BSIM4v6lpvag = 0.0; if (!model->BSIM4v6lwrGiven) model->BSIM4v6lwr = 0.0; if (!model->BSIM4v6ldwgGiven) model->BSIM4v6ldwg = 0.0; if (!model->BSIM4v6ldwbGiven) model->BSIM4v6ldwb = 0.0; if (!model->BSIM4v6lb0Given) model->BSIM4v6lb0 = 0.0; if (!model->BSIM4v6lb1Given) model->BSIM4v6lb1 = 0.0; if (!model->BSIM4v6lalpha0Given) model->BSIM4v6lalpha0 = 0.0; if (!model->BSIM4v6lalpha1Given) model->BSIM4v6lalpha1 = 0.0; if (!model->BSIM4v6lbeta0Given) model->BSIM4v6lbeta0 = 0.0; if (!model->BSIM4v6lagidlGiven) model->BSIM4v6lagidl = 0.0; if (!model->BSIM4v6lbgidlGiven) model->BSIM4v6lbgidl = 0.0; if (!model->BSIM4v6lcgidlGiven) model->BSIM4v6lcgidl = 0.0; if (!model->BSIM4v6legidlGiven) model->BSIM4v6legidl = 0.0; if (!model->BSIM4v6lagislGiven) { if (model->BSIM4v6lagidlGiven) model->BSIM4v6lagisl = model->BSIM4v6lagidl; else model->BSIM4v6lagisl = 0.0; } if (!model->BSIM4v6lbgislGiven) { if (model->BSIM4v6lbgidlGiven) model->BSIM4v6lbgisl = model->BSIM4v6lbgidl; else model->BSIM4v6lbgisl = 0.0; } if (!model->BSIM4v6lcgislGiven) { if (model->BSIM4v6lcgidlGiven) model->BSIM4v6lcgisl = model->BSIM4v6lcgidl; else model->BSIM4v6lcgisl = 0.0; } if (!model->BSIM4v6legislGiven) { if (model->BSIM4v6legidlGiven) model->BSIM4v6legisl = model->BSIM4v6legidl; else model->BSIM4v6legisl = 0.0; } if (!model->BSIM4v6laigcGiven) model->BSIM4v6laigc = 0.0; if (!model->BSIM4v6lbigcGiven) model->BSIM4v6lbigc = 0.0; if (!model->BSIM4v6lcigcGiven) model->BSIM4v6lcigc = 0.0; if (!model->BSIM4v6aigsdGiven && (model->BSIM4v6aigsGiven || model->BSIM4v6aigdGiven)) { if (!model->BSIM4v6laigsGiven) model->BSIM4v6laigs = 0.0; if (!model->BSIM4v6laigdGiven) model->BSIM4v6laigd = 0.0; } else { if (!model->BSIM4v6laigsdGiven) model->BSIM4v6laigsd = 0.0; model->BSIM4v6laigs = model->BSIM4v6laigd = model->BSIM4v6laigsd; } if (!model->BSIM4v6bigsdGiven && (model->BSIM4v6bigsGiven || model->BSIM4v6bigdGiven)) { if (!model->BSIM4v6lbigsGiven) model->BSIM4v6lbigs = 0.0; if (!model->BSIM4v6lbigdGiven) model->BSIM4v6lbigd = 0.0; } else { if (!model->BSIM4v6lbigsdGiven) model->BSIM4v6lbigsd = 0.0; model->BSIM4v6lbigs = model->BSIM4v6lbigd = model->BSIM4v6lbigsd; } if (!model->BSIM4v6cigsdGiven && (model->BSIM4v6cigsGiven || model->BSIM4v6cigdGiven)) { if (!model->BSIM4v6lcigsGiven) model->BSIM4v6lcigs = 0.0; if (!model->BSIM4v6lcigdGiven) model->BSIM4v6lcigd = 0.0; } else { if (!model->BSIM4v6lcigsdGiven) model->BSIM4v6lcigsd = 0.0; model->BSIM4v6lcigs = model->BSIM4v6lcigd = model->BSIM4v6lcigsd; } if (!model->BSIM4v6laigbaccGiven) model->BSIM4v6laigbacc = 0.0; if (!model->BSIM4v6lbigbaccGiven) model->BSIM4v6lbigbacc = 0.0; if (!model->BSIM4v6lcigbaccGiven) model->BSIM4v6lcigbacc = 0.0; if (!model->BSIM4v6laigbinvGiven) model->BSIM4v6laigbinv = 0.0; if (!model->BSIM4v6lbigbinvGiven) model->BSIM4v6lbigbinv = 0.0; if (!model->BSIM4v6lcigbinvGiven) model->BSIM4v6lcigbinv = 0.0; if (!model->BSIM4v6lnigcGiven) model->BSIM4v6lnigc = 0.0; if (!model->BSIM4v6lnigbinvGiven) model->BSIM4v6lnigbinv = 0.0; if (!model->BSIM4v6lnigbaccGiven) model->BSIM4v6lnigbacc = 0.0; if (!model->BSIM4v6lntoxGiven) model->BSIM4v6lntox = 0.0; if (!model->BSIM4v6leigbinvGiven) model->BSIM4v6leigbinv = 0.0; if (!model->BSIM4v6lpigcdGiven) model->BSIM4v6lpigcd = 0.0; if (!model->BSIM4v6lpoxedgeGiven) model->BSIM4v6lpoxedge = 0.0; if (!model->BSIM4v6lxrcrg1Given) model->BSIM4v6lxrcrg1 = 0.0; if (!model->BSIM4v6lxrcrg2Given) model->BSIM4v6lxrcrg2 = 0.0; if (!model->BSIM4v6leuGiven) model->BSIM4v6leu = 0.0; if (!model->BSIM4v6lucsGiven) model->BSIM4v6lucs = 0.0; if (!model->BSIM4v6lvfbGiven) model->BSIM4v6lvfb = 0.0; if (!model->BSIM4v6llambdaGiven) model->BSIM4v6llambda = 0.0; if (!model->BSIM4v6lvtlGiven) model->BSIM4v6lvtl = 0.0; if (!model->BSIM4v6lxnGiven) model->BSIM4v6lxn = 0.0; if (!model->BSIM4v6lvfbsdoffGiven) model->BSIM4v6lvfbsdoff = 0.0; if (!model->BSIM4v6ltvfbsdoffGiven) model->BSIM4v6ltvfbsdoff = 0.0; if (!model->BSIM4v6ltvoffGiven) model->BSIM4v6ltvoff = 0.0; if (!model->BSIM4v6lcgslGiven) model->BSIM4v6lcgsl = 0.0; if (!model->BSIM4v6lcgdlGiven) model->BSIM4v6lcgdl = 0.0; if (!model->BSIM4v6lckappasGiven) model->BSIM4v6lckappas = 0.0; if (!model->BSIM4v6lckappadGiven) model->BSIM4v6lckappad = 0.0; if (!model->BSIM4v6lclcGiven) model->BSIM4v6lclc = 0.0; if (!model->BSIM4v6lcleGiven) model->BSIM4v6lcle = 0.0; if (!model->BSIM4v6lcfGiven) model->BSIM4v6lcf = 0.0; if (!model->BSIM4v6lvfbcvGiven) model->BSIM4v6lvfbcv = 0.0; if (!model->BSIM4v6lacdeGiven) model->BSIM4v6lacde = 0.0; if (!model->BSIM4v6lmoinGiven) model->BSIM4v6lmoin = 0.0; if (!model->BSIM4v6lnoffGiven) model->BSIM4v6lnoff = 0.0; if (!model->BSIM4v6lvoffcvGiven) model->BSIM4v6lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM4v6wcdscGiven) model->BSIM4v6wcdsc = 0.0; if (!model->BSIM4v6wcdscbGiven) model->BSIM4v6wcdscb = 0.0; if (!model->BSIM4v6wcdscdGiven) model->BSIM4v6wcdscd = 0.0; if (!model->BSIM4v6wcitGiven) model->BSIM4v6wcit = 0.0; if (!model->BSIM4v6wnfactorGiven) model->BSIM4v6wnfactor = 0.0; if (!model->BSIM4v6wxjGiven) model->BSIM4v6wxj = 0.0; if (!model->BSIM4v6wvsatGiven) model->BSIM4v6wvsat = 0.0; if (!model->BSIM4v6watGiven) model->BSIM4v6wat = 0.0; if (!model->BSIM4v6wa0Given) model->BSIM4v6wa0 = 0.0; if (!model->BSIM4v6wagsGiven) model->BSIM4v6wags = 0.0; if (!model->BSIM4v6wa1Given) model->BSIM4v6wa1 = 0.0; if (!model->BSIM4v6wa2Given) model->BSIM4v6wa2 = 0.0; if (!model->BSIM4v6wketaGiven) model->BSIM4v6wketa = 0.0; if (!model->BSIM4v6wnsubGiven) model->BSIM4v6wnsub = 0.0; if (!model->BSIM4v6wndepGiven) model->BSIM4v6wndep = 0.0; if (!model->BSIM4v6wnsdGiven) model->BSIM4v6wnsd = 0.0; if (!model->BSIM4v6wphinGiven) model->BSIM4v6wphin = 0.0; if (!model->BSIM4v6wngateGiven) model->BSIM4v6wngate = 0.0; if (!model->BSIM4v6wvbmGiven) model->BSIM4v6wvbm = 0.0; if (!model->BSIM4v6wxtGiven) model->BSIM4v6wxt = 0.0; if (!model->BSIM4v6wkt1Given) model->BSIM4v6wkt1 = 0.0; if (!model->BSIM4v6wkt1lGiven) model->BSIM4v6wkt1l = 0.0; if (!model->BSIM4v6wkt2Given) model->BSIM4v6wkt2 = 0.0; if (!model->BSIM4v6wk3Given) model->BSIM4v6wk3 = 0.0; if (!model->BSIM4v6wk3bGiven) model->BSIM4v6wk3b = 0.0; if (!model->BSIM4v6ww0Given) model->BSIM4v6ww0 = 0.0; if (!model->BSIM4v6wlpe0Given) model->BSIM4v6wlpe0 = 0.0; if (!model->BSIM4v6wlpebGiven) model->BSIM4v6wlpeb = 0.0; if (!model->BSIM4v6wdvtp0Given) model->BSIM4v6wdvtp0 = 0.0; if (!model->BSIM4v6wdvtp1Given) model->BSIM4v6wdvtp1 = 0.0; if (!model->BSIM4v6wdvt0Given) model->BSIM4v6wdvt0 = 0.0; if (!model->BSIM4v6wdvt1Given) model->BSIM4v6wdvt1 = 0.0; if (!model->BSIM4v6wdvt2Given) model->BSIM4v6wdvt2 = 0.0; if (!model->BSIM4v6wdvt0wGiven) model->BSIM4v6wdvt0w = 0.0; if (!model->BSIM4v6wdvt1wGiven) model->BSIM4v6wdvt1w = 0.0; if (!model->BSIM4v6wdvt2wGiven) model->BSIM4v6wdvt2w = 0.0; if (!model->BSIM4v6wdroutGiven) model->BSIM4v6wdrout = 0.0; if (!model->BSIM4v6wdsubGiven) model->BSIM4v6wdsub = 0.0; if (!model->BSIM4v6wvth0Given) model->BSIM4v6wvth0 = 0.0; if (!model->BSIM4v6wuaGiven) model->BSIM4v6wua = 0.0; if (!model->BSIM4v6wua1Given) model->BSIM4v6wua1 = 0.0; if (!model->BSIM4v6wubGiven) model->BSIM4v6wub = 0.0; if (!model->BSIM4v6wub1Given) model->BSIM4v6wub1 = 0.0; if (!model->BSIM4v6wucGiven) model->BSIM4v6wuc = 0.0; if (!model->BSIM4v6wuc1Given) model->BSIM4v6wuc1 = 0.0; if (!model->BSIM4v6wudGiven) model->BSIM4v6wud = 0.0; if (!model->BSIM4v6wud1Given) model->BSIM4v6wud1 = 0.0; if (!model->BSIM4v6wupGiven) model->BSIM4v6wup = 0.0; if (!model->BSIM4v6wlpGiven) model->BSIM4v6wlp = 0.0; if (!model->BSIM4v6wu0Given) model->BSIM4v6wu0 = 0.0; if (!model->BSIM4v6wuteGiven) model->BSIM4v6wute = 0.0; if (!model->BSIM4v6wucsteGiven) model->BSIM4v6wucste = 0.0; if (!model->BSIM4v6wvoffGiven) model->BSIM4v6wvoff = 0.0; if (!model->BSIM4v6wminvGiven) model->BSIM4v6wminv = 0.0; if (!model->BSIM4v6wminvcvGiven) model->BSIM4v6wminvcv = 0.0; if (!model->BSIM4v6wfproutGiven) model->BSIM4v6wfprout = 0.0; if (!model->BSIM4v6wpditsGiven) model->BSIM4v6wpdits = 0.0; if (!model->BSIM4v6wpditsdGiven) model->BSIM4v6wpditsd = 0.0; if (!model->BSIM4v6wdeltaGiven) model->BSIM4v6wdelta = 0.0; if (!model->BSIM4v6wrdswGiven) model->BSIM4v6wrdsw = 0.0; if (!model->BSIM4v6wrdwGiven) model->BSIM4v6wrdw = 0.0; if (!model->BSIM4v6wrswGiven) model->BSIM4v6wrsw = 0.0; if (!model->BSIM4v6wprwbGiven) model->BSIM4v6wprwb = 0.0; if (!model->BSIM4v6wprwgGiven) model->BSIM4v6wprwg = 0.0; if (!model->BSIM4v6wprtGiven) model->BSIM4v6wprt = 0.0; if (!model->BSIM4v6weta0Given) model->BSIM4v6weta0 = 0.0; if (!model->BSIM4v6wetabGiven) model->BSIM4v6wetab = 0.0; if (!model->BSIM4v6wpclmGiven) model->BSIM4v6wpclm = 0.0; if (!model->BSIM4v6wpdibl1Given) model->BSIM4v6wpdibl1 = 0.0; if (!model->BSIM4v6wpdibl2Given) model->BSIM4v6wpdibl2 = 0.0; if (!model->BSIM4v6wpdiblbGiven) model->BSIM4v6wpdiblb = 0.0; if (!model->BSIM4v6wpscbe1Given) model->BSIM4v6wpscbe1 = 0.0; if (!model->BSIM4v6wpscbe2Given) model->BSIM4v6wpscbe2 = 0.0; if (!model->BSIM4v6wpvagGiven) model->BSIM4v6wpvag = 0.0; if (!model->BSIM4v6wwrGiven) model->BSIM4v6wwr = 0.0; if (!model->BSIM4v6wdwgGiven) model->BSIM4v6wdwg = 0.0; if (!model->BSIM4v6wdwbGiven) model->BSIM4v6wdwb = 0.0; if (!model->BSIM4v6wb0Given) model->BSIM4v6wb0 = 0.0; if (!model->BSIM4v6wb1Given) model->BSIM4v6wb1 = 0.0; if (!model->BSIM4v6walpha0Given) model->BSIM4v6walpha0 = 0.0; if (!model->BSIM4v6walpha1Given) model->BSIM4v6walpha1 = 0.0; if (!model->BSIM4v6wbeta0Given) model->BSIM4v6wbeta0 = 0.0; if (!model->BSIM4v6wagidlGiven) model->BSIM4v6wagidl = 0.0; if (!model->BSIM4v6wbgidlGiven) model->BSIM4v6wbgidl = 0.0; if (!model->BSIM4v6wcgidlGiven) model->BSIM4v6wcgidl = 0.0; if (!model->BSIM4v6wegidlGiven) model->BSIM4v6wegidl = 0.0; if (!model->BSIM4v6wagislGiven) { if (model->BSIM4v6wagidlGiven) model->BSIM4v6wagisl = model->BSIM4v6wagidl; else model->BSIM4v6wagisl = 0.0; } if (!model->BSIM4v6wbgislGiven) { if (model->BSIM4v6wbgidlGiven) model->BSIM4v6wbgisl = model->BSIM4v6wbgidl; else model->BSIM4v6wbgisl = 0.0; } if (!model->BSIM4v6wcgislGiven) { if (model->BSIM4v6wcgidlGiven) model->BSIM4v6wcgisl = model->BSIM4v6wcgidl; else model->BSIM4v6wcgisl = 0.0; } if (!model->BSIM4v6wegislGiven) { if (model->BSIM4v6wegidlGiven) model->BSIM4v6wegisl = model->BSIM4v6wegidl; else model->BSIM4v6wegisl = 0.0; } if (!model->BSIM4v6waigcGiven) model->BSIM4v6waigc = 0.0; if (!model->BSIM4v6wbigcGiven) model->BSIM4v6wbigc = 0.0; if (!model->BSIM4v6wcigcGiven) model->BSIM4v6wcigc = 0.0; if (!model->BSIM4v6aigsdGiven && (model->BSIM4v6aigsGiven || model->BSIM4v6aigdGiven)) { if (!model->BSIM4v6waigsGiven) model->BSIM4v6waigs = 0.0; if (!model->BSIM4v6waigdGiven) model->BSIM4v6waigd = 0.0; } else { if (!model->BSIM4v6waigsdGiven) model->BSIM4v6waigsd = 0.0; model->BSIM4v6waigs = model->BSIM4v6waigd = model->BSIM4v6waigsd; } if (!model->BSIM4v6bigsdGiven && (model->BSIM4v6bigsGiven || model->BSIM4v6bigdGiven)) { if (!model->BSIM4v6wbigsGiven) model->BSIM4v6wbigs = 0.0; if (!model->BSIM4v6wbigdGiven) model->BSIM4v6wbigd = 0.0; } else { if (!model->BSIM4v6wbigsdGiven) model->BSIM4v6wbigsd = 0.0; model->BSIM4v6wbigs = model->BSIM4v6wbigd = model->BSIM4v6wbigsd; } if (!model->BSIM4v6cigsdGiven && (model->BSIM4v6cigsGiven || model->BSIM4v6cigdGiven)) { if (!model->BSIM4v6wcigsGiven) model->BSIM4v6wcigs = 0.0; if (!model->BSIM4v6wcigdGiven) model->BSIM4v6wcigd = 0.0; } else { if (!model->BSIM4v6wcigsdGiven) model->BSIM4v6wcigsd = 0.0; model->BSIM4v6wcigs = model->BSIM4v6wcigd = model->BSIM4v6wcigsd; } if (!model->BSIM4v6waigbaccGiven) model->BSIM4v6waigbacc = 0.0; if (!model->BSIM4v6wbigbaccGiven) model->BSIM4v6wbigbacc = 0.0; if (!model->BSIM4v6wcigbaccGiven) model->BSIM4v6wcigbacc = 0.0; if (!model->BSIM4v6waigbinvGiven) model->BSIM4v6waigbinv = 0.0; if (!model->BSIM4v6wbigbinvGiven) model->BSIM4v6wbigbinv = 0.0; if (!model->BSIM4v6wcigbinvGiven) model->BSIM4v6wcigbinv = 0.0; if (!model->BSIM4v6wnigcGiven) model->BSIM4v6wnigc = 0.0; if (!model->BSIM4v6wnigbinvGiven) model->BSIM4v6wnigbinv = 0.0; if (!model->BSIM4v6wnigbaccGiven) model->BSIM4v6wnigbacc = 0.0; if (!model->BSIM4v6wntoxGiven) model->BSIM4v6wntox = 0.0; if (!model->BSIM4v6weigbinvGiven) model->BSIM4v6weigbinv = 0.0; if (!model->BSIM4v6wpigcdGiven) model->BSIM4v6wpigcd = 0.0; if (!model->BSIM4v6wpoxedgeGiven) model->BSIM4v6wpoxedge = 0.0; if (!model->BSIM4v6wxrcrg1Given) model->BSIM4v6wxrcrg1 = 0.0; if (!model->BSIM4v6wxrcrg2Given) model->BSIM4v6wxrcrg2 = 0.0; if (!model->BSIM4v6weuGiven) model->BSIM4v6weu = 0.0; if (!model->BSIM4v6wucsGiven) model->BSIM4v6wucs = 0.0; if (!model->BSIM4v6wvfbGiven) model->BSIM4v6wvfb = 0.0; if (!model->BSIM4v6wlambdaGiven) model->BSIM4v6wlambda = 0.0; if (!model->BSIM4v6wvtlGiven) model->BSIM4v6wvtl = 0.0; if (!model->BSIM4v6wxnGiven) model->BSIM4v6wxn = 0.0; if (!model->BSIM4v6wvfbsdoffGiven) model->BSIM4v6wvfbsdoff = 0.0; if (!model->BSIM4v6wtvfbsdoffGiven) model->BSIM4v6wtvfbsdoff = 0.0; if (!model->BSIM4v6wtvoffGiven) model->BSIM4v6wtvoff = 0.0; if (!model->BSIM4v6wcgslGiven) model->BSIM4v6wcgsl = 0.0; if (!model->BSIM4v6wcgdlGiven) model->BSIM4v6wcgdl = 0.0; if (!model->BSIM4v6wckappasGiven) model->BSIM4v6wckappas = 0.0; if (!model->BSIM4v6wckappadGiven) model->BSIM4v6wckappad = 0.0; if (!model->BSIM4v6wcfGiven) model->BSIM4v6wcf = 0.0; if (!model->BSIM4v6wclcGiven) model->BSIM4v6wclc = 0.0; if (!model->BSIM4v6wcleGiven) model->BSIM4v6wcle = 0.0; if (!model->BSIM4v6wvfbcvGiven) model->BSIM4v6wvfbcv = 0.0; if (!model->BSIM4v6wacdeGiven) model->BSIM4v6wacde = 0.0; if (!model->BSIM4v6wmoinGiven) model->BSIM4v6wmoin = 0.0; if (!model->BSIM4v6wnoffGiven) model->BSIM4v6wnoff = 0.0; if (!model->BSIM4v6wvoffcvGiven) model->BSIM4v6wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM4v6pcdscGiven) model->BSIM4v6pcdsc = 0.0; if (!model->BSIM4v6pcdscbGiven) model->BSIM4v6pcdscb = 0.0; if (!model->BSIM4v6pcdscdGiven) model->BSIM4v6pcdscd = 0.0; if (!model->BSIM4v6pcitGiven) model->BSIM4v6pcit = 0.0; if (!model->BSIM4v6pnfactorGiven) model->BSIM4v6pnfactor = 0.0; if (!model->BSIM4v6pxjGiven) model->BSIM4v6pxj = 0.0; if (!model->BSIM4v6pvsatGiven) model->BSIM4v6pvsat = 0.0; if (!model->BSIM4v6patGiven) model->BSIM4v6pat = 0.0; if (!model->BSIM4v6pa0Given) model->BSIM4v6pa0 = 0.0; if (!model->BSIM4v6pagsGiven) model->BSIM4v6pags = 0.0; if (!model->BSIM4v6pa1Given) model->BSIM4v6pa1 = 0.0; if (!model->BSIM4v6pa2Given) model->BSIM4v6pa2 = 0.0; if (!model->BSIM4v6pketaGiven) model->BSIM4v6pketa = 0.0; if (!model->BSIM4v6pnsubGiven) model->BSIM4v6pnsub = 0.0; if (!model->BSIM4v6pndepGiven) model->BSIM4v6pndep = 0.0; if (!model->BSIM4v6pnsdGiven) model->BSIM4v6pnsd = 0.0; if (!model->BSIM4v6pphinGiven) model->BSIM4v6pphin = 0.0; if (!model->BSIM4v6pngateGiven) model->BSIM4v6pngate = 0.0; if (!model->BSIM4v6pvbmGiven) model->BSIM4v6pvbm = 0.0; if (!model->BSIM4v6pxtGiven) model->BSIM4v6pxt = 0.0; if (!model->BSIM4v6pkt1Given) model->BSIM4v6pkt1 = 0.0; if (!model->BSIM4v6pkt1lGiven) model->BSIM4v6pkt1l = 0.0; if (!model->BSIM4v6pkt2Given) model->BSIM4v6pkt2 = 0.0; if (!model->BSIM4v6pk3Given) model->BSIM4v6pk3 = 0.0; if (!model->BSIM4v6pk3bGiven) model->BSIM4v6pk3b = 0.0; if (!model->BSIM4v6pw0Given) model->BSIM4v6pw0 = 0.0; if (!model->BSIM4v6plpe0Given) model->BSIM4v6plpe0 = 0.0; if (!model->BSIM4v6plpebGiven) model->BSIM4v6plpeb = 0.0; if (!model->BSIM4v6pdvtp0Given) model->BSIM4v6pdvtp0 = 0.0; if (!model->BSIM4v6pdvtp1Given) model->BSIM4v6pdvtp1 = 0.0; if (!model->BSIM4v6pdvt0Given) model->BSIM4v6pdvt0 = 0.0; if (!model->BSIM4v6pdvt1Given) model->BSIM4v6pdvt1 = 0.0; if (!model->BSIM4v6pdvt2Given) model->BSIM4v6pdvt2 = 0.0; if (!model->BSIM4v6pdvt0wGiven) model->BSIM4v6pdvt0w = 0.0; if (!model->BSIM4v6pdvt1wGiven) model->BSIM4v6pdvt1w = 0.0; if (!model->BSIM4v6pdvt2wGiven) model->BSIM4v6pdvt2w = 0.0; if (!model->BSIM4v6pdroutGiven) model->BSIM4v6pdrout = 0.0; if (!model->BSIM4v6pdsubGiven) model->BSIM4v6pdsub = 0.0; if (!model->BSIM4v6pvth0Given) model->BSIM4v6pvth0 = 0.0; if (!model->BSIM4v6puaGiven) model->BSIM4v6pua = 0.0; if (!model->BSIM4v6pua1Given) model->BSIM4v6pua1 = 0.0; if (!model->BSIM4v6pubGiven) model->BSIM4v6pub = 0.0; if (!model->BSIM4v6pub1Given) model->BSIM4v6pub1 = 0.0; if (!model->BSIM4v6pucGiven) model->BSIM4v6puc = 0.0; if (!model->BSIM4v6puc1Given) model->BSIM4v6puc1 = 0.0; if (!model->BSIM4v6pudGiven) model->BSIM4v6pud = 0.0; if (!model->BSIM4v6pud1Given) model->BSIM4v6pud1 = 0.0; if (!model->BSIM4v6pupGiven) model->BSIM4v6pup = 0.0; if (!model->BSIM4v6plpGiven) model->BSIM4v6plp = 0.0; if (!model->BSIM4v6pu0Given) model->BSIM4v6pu0 = 0.0; if (!model->BSIM4v6puteGiven) model->BSIM4v6pute = 0.0; if (!model->BSIM4v6pucsteGiven) model->BSIM4v6pucste = 0.0; if (!model->BSIM4v6pvoffGiven) model->BSIM4v6pvoff = 0.0; if (!model->BSIM4v6pminvGiven) model->BSIM4v6pminv = 0.0; if (!model->BSIM4v6pminvcvGiven) model->BSIM4v6pminvcv = 0.0; if (!model->BSIM4v6pfproutGiven) model->BSIM4v6pfprout = 0.0; if (!model->BSIM4v6ppditsGiven) model->BSIM4v6ppdits = 0.0; if (!model->BSIM4v6ppditsdGiven) model->BSIM4v6ppditsd = 0.0; if (!model->BSIM4v6pdeltaGiven) model->BSIM4v6pdelta = 0.0; if (!model->BSIM4v6prdswGiven) model->BSIM4v6prdsw = 0.0; if (!model->BSIM4v6prdwGiven) model->BSIM4v6prdw = 0.0; if (!model->BSIM4v6prswGiven) model->BSIM4v6prsw = 0.0; if (!model->BSIM4v6pprwbGiven) model->BSIM4v6pprwb = 0.0; if (!model->BSIM4v6pprwgGiven) model->BSIM4v6pprwg = 0.0; if (!model->BSIM4v6pprtGiven) model->BSIM4v6pprt = 0.0; if (!model->BSIM4v6peta0Given) model->BSIM4v6peta0 = 0.0; if (!model->BSIM4v6petabGiven) model->BSIM4v6petab = 0.0; if (!model->BSIM4v6ppclmGiven) model->BSIM4v6ppclm = 0.0; if (!model->BSIM4v6ppdibl1Given) model->BSIM4v6ppdibl1 = 0.0; if (!model->BSIM4v6ppdibl2Given) model->BSIM4v6ppdibl2 = 0.0; if (!model->BSIM4v6ppdiblbGiven) model->BSIM4v6ppdiblb = 0.0; if (!model->BSIM4v6ppscbe1Given) model->BSIM4v6ppscbe1 = 0.0; if (!model->BSIM4v6ppscbe2Given) model->BSIM4v6ppscbe2 = 0.0; if (!model->BSIM4v6ppvagGiven) model->BSIM4v6ppvag = 0.0; if (!model->BSIM4v6pwrGiven) model->BSIM4v6pwr = 0.0; if (!model->BSIM4v6pdwgGiven) model->BSIM4v6pdwg = 0.0; if (!model->BSIM4v6pdwbGiven) model->BSIM4v6pdwb = 0.0; if (!model->BSIM4v6pb0Given) model->BSIM4v6pb0 = 0.0; if (!model->BSIM4v6pb1Given) model->BSIM4v6pb1 = 0.0; if (!model->BSIM4v6palpha0Given) model->BSIM4v6palpha0 = 0.0; if (!model->BSIM4v6palpha1Given) model->BSIM4v6palpha1 = 0.0; if (!model->BSIM4v6pbeta0Given) model->BSIM4v6pbeta0 = 0.0; if (!model->BSIM4v6pagidlGiven) model->BSIM4v6pagidl = 0.0; if (!model->BSIM4v6pbgidlGiven) model->BSIM4v6pbgidl = 0.0; if (!model->BSIM4v6pcgidlGiven) model->BSIM4v6pcgidl = 0.0; if (!model->BSIM4v6pegidlGiven) model->BSIM4v6pegidl = 0.0; if (!model->BSIM4v6pagislGiven) { if (model->BSIM4v6pagidlGiven) model->BSIM4v6pagisl = model->BSIM4v6pagidl; else model->BSIM4v6pagisl = 0.0; } if (!model->BSIM4v6pbgislGiven) { if (model->BSIM4v6pbgidlGiven) model->BSIM4v6pbgisl = model->BSIM4v6pbgidl; else model->BSIM4v6pbgisl = 0.0; } if (!model->BSIM4v6pcgislGiven) { if (model->BSIM4v6pcgidlGiven) model->BSIM4v6pcgisl = model->BSIM4v6pcgidl; else model->BSIM4v6pcgisl = 0.0; } if (!model->BSIM4v6pegislGiven) { if (model->BSIM4v6pegidlGiven) model->BSIM4v6pegisl = model->BSIM4v6pegidl; else model->BSIM4v6pegisl = 0.0; } if (!model->BSIM4v6paigcGiven) model->BSIM4v6paigc = 0.0; if (!model->BSIM4v6pbigcGiven) model->BSIM4v6pbigc = 0.0; if (!model->BSIM4v6pcigcGiven) model->BSIM4v6pcigc = 0.0; if (!model->BSIM4v6aigsdGiven && (model->BSIM4v6aigsGiven || model->BSIM4v6aigdGiven)) { if (!model->BSIM4v6paigsGiven) model->BSIM4v6paigs = 0.0; if (!model->BSIM4v6paigdGiven) model->BSIM4v6paigd = 0.0; } else { if (!model->BSIM4v6paigsdGiven) model->BSIM4v6paigsd = 0.0; model->BSIM4v6paigs = model->BSIM4v6paigd = model->BSIM4v6paigsd; } if (!model->BSIM4v6bigsdGiven && (model->BSIM4v6bigsGiven || model->BSIM4v6bigdGiven)) { if (!model->BSIM4v6pbigsGiven) model->BSIM4v6pbigs = 0.0; if (!model->BSIM4v6pbigdGiven) model->BSIM4v6pbigd = 0.0; } else { if (!model->BSIM4v6pbigsdGiven) model->BSIM4v6pbigsd = 0.0; model->BSIM4v6pbigs = model->BSIM4v6pbigd = model->BSIM4v6pbigsd; } if (!model->BSIM4v6cigsdGiven && (model->BSIM4v6cigsGiven || model->BSIM4v6cigdGiven)) { if (!model->BSIM4v6pcigsGiven) model->BSIM4v6pcigs = 0.0; if (!model->BSIM4v6pcigdGiven) model->BSIM4v6pcigd = 0.0; } else { if (!model->BSIM4v6pcigsdGiven) model->BSIM4v6pcigsd = 0.0; model->BSIM4v6pcigs = model->BSIM4v6pcigd = model->BSIM4v6pcigsd; } if (!model->BSIM4v6paigbaccGiven) model->BSIM4v6paigbacc = 0.0; if (!model->BSIM4v6pbigbaccGiven) model->BSIM4v6pbigbacc = 0.0; if (!model->BSIM4v6pcigbaccGiven) model->BSIM4v6pcigbacc = 0.0; if (!model->BSIM4v6paigbinvGiven) model->BSIM4v6paigbinv = 0.0; if (!model->BSIM4v6pbigbinvGiven) model->BSIM4v6pbigbinv = 0.0; if (!model->BSIM4v6pcigbinvGiven) model->BSIM4v6pcigbinv = 0.0; if (!model->BSIM4v6pnigcGiven) model->BSIM4v6pnigc = 0.0; if (!model->BSIM4v6pnigbinvGiven) model->BSIM4v6pnigbinv = 0.0; if (!model->BSIM4v6pnigbaccGiven) model->BSIM4v6pnigbacc = 0.0; if (!model->BSIM4v6pntoxGiven) model->BSIM4v6pntox = 0.0; if (!model->BSIM4v6peigbinvGiven) model->BSIM4v6peigbinv = 0.0; if (!model->BSIM4v6ppigcdGiven) model->BSIM4v6ppigcd = 0.0; if (!model->BSIM4v6ppoxedgeGiven) model->BSIM4v6ppoxedge = 0.0; if (!model->BSIM4v6pxrcrg1Given) model->BSIM4v6pxrcrg1 = 0.0; if (!model->BSIM4v6pxrcrg2Given) model->BSIM4v6pxrcrg2 = 0.0; if (!model->BSIM4v6peuGiven) model->BSIM4v6peu = 0.0; if (!model->BSIM4v6pucsGiven) model->BSIM4v6pucs = 0.0; if (!model->BSIM4v6pvfbGiven) model->BSIM4v6pvfb = 0.0; if (!model->BSIM4v6plambdaGiven) model->BSIM4v6plambda = 0.0; if (!model->BSIM4v6pvtlGiven) model->BSIM4v6pvtl = 0.0; if (!model->BSIM4v6pxnGiven) model->BSIM4v6pxn = 0.0; if (!model->BSIM4v6pvfbsdoffGiven) model->BSIM4v6pvfbsdoff = 0.0; if (!model->BSIM4v6ptvfbsdoffGiven) model->BSIM4v6ptvfbsdoff = 0.0; if (!model->BSIM4v6ptvoffGiven) model->BSIM4v6ptvoff = 0.0; if (!model->BSIM4v6pcgslGiven) model->BSIM4v6pcgsl = 0.0; if (!model->BSIM4v6pcgdlGiven) model->BSIM4v6pcgdl = 0.0; if (!model->BSIM4v6pckappasGiven) model->BSIM4v6pckappas = 0.0; if (!model->BSIM4v6pckappadGiven) model->BSIM4v6pckappad = 0.0; if (!model->BSIM4v6pcfGiven) model->BSIM4v6pcf = 0.0; if (!model->BSIM4v6pclcGiven) model->BSIM4v6pclc = 0.0; if (!model->BSIM4v6pcleGiven) model->BSIM4v6pcle = 0.0; if (!model->BSIM4v6pvfbcvGiven) model->BSIM4v6pvfbcv = 0.0; if (!model->BSIM4v6pacdeGiven) model->BSIM4v6pacde = 0.0; if (!model->BSIM4v6pmoinGiven) model->BSIM4v6pmoin = 0.0; if (!model->BSIM4v6pnoffGiven) model->BSIM4v6pnoff = 0.0; if (!model->BSIM4v6pvoffcvGiven) model->BSIM4v6pvoffcv = 0.0; if (!model->BSIM4v6gamma1Given) model->BSIM4v6gamma1 = 0.0; if (!model->BSIM4v6lgamma1Given) model->BSIM4v6lgamma1 = 0.0; if (!model->BSIM4v6wgamma1Given) model->BSIM4v6wgamma1 = 0.0; if (!model->BSIM4v6pgamma1Given) model->BSIM4v6pgamma1 = 0.0; if (!model->BSIM4v6gamma2Given) model->BSIM4v6gamma2 = 0.0; if (!model->BSIM4v6lgamma2Given) model->BSIM4v6lgamma2 = 0.0; if (!model->BSIM4v6wgamma2Given) model->BSIM4v6wgamma2 = 0.0; if (!model->BSIM4v6pgamma2Given) model->BSIM4v6pgamma2 = 0.0; if (!model->BSIM4v6vbxGiven) model->BSIM4v6vbx = 0.0; if (!model->BSIM4v6lvbxGiven) model->BSIM4v6lvbx = 0.0; if (!model->BSIM4v6wvbxGiven) model->BSIM4v6wvbx = 0.0; if (!model->BSIM4v6pvbxGiven) model->BSIM4v6pvbx = 0.0; /* unit degree celcius */ if (!model->BSIM4v6tnomGiven) model->BSIM4v6tnom = ckt->CKTnomTemp; if (!model->BSIM4v6LintGiven) model->BSIM4v6Lint = 0.0; if (!model->BSIM4v6LlGiven) model->BSIM4v6Ll = 0.0; if (!model->BSIM4v6LlcGiven) model->BSIM4v6Llc = model->BSIM4v6Ll; if (!model->BSIM4v6LlnGiven) model->BSIM4v6Lln = 1.0; if (!model->BSIM4v6LwGiven) model->BSIM4v6Lw = 0.0; if (!model->BSIM4v6LwcGiven) model->BSIM4v6Lwc = model->BSIM4v6Lw; if (!model->BSIM4v6LwnGiven) model->BSIM4v6Lwn = 1.0; if (!model->BSIM4v6LwlGiven) model->BSIM4v6Lwl = 0.0; if (!model->BSIM4v6LwlcGiven) model->BSIM4v6Lwlc = model->BSIM4v6Lwl; if (!model->BSIM4v6LminGiven) model->BSIM4v6Lmin = 0.0; if (!model->BSIM4v6LmaxGiven) model->BSIM4v6Lmax = 1.0; if (!model->BSIM4v6WintGiven) model->BSIM4v6Wint = 0.0; if (!model->BSIM4v6WlGiven) model->BSIM4v6Wl = 0.0; if (!model->BSIM4v6WlcGiven) model->BSIM4v6Wlc = model->BSIM4v6Wl; if (!model->BSIM4v6WlnGiven) model->BSIM4v6Wln = 1.0; if (!model->BSIM4v6WwGiven) model->BSIM4v6Ww = 0.0; if (!model->BSIM4v6WwcGiven) model->BSIM4v6Wwc = model->BSIM4v6Ww; if (!model->BSIM4v6WwnGiven) model->BSIM4v6Wwn = 1.0; if (!model->BSIM4v6WwlGiven) model->BSIM4v6Wwl = 0.0; if (!model->BSIM4v6WwlcGiven) model->BSIM4v6Wwlc = model->BSIM4v6Wwl; if (!model->BSIM4v6WminGiven) model->BSIM4v6Wmin = 0.0; if (!model->BSIM4v6WmaxGiven) model->BSIM4v6Wmax = 1.0; if (!model->BSIM4v6dwcGiven) model->BSIM4v6dwc = model->BSIM4v6Wint; if (!model->BSIM4v6dlcGiven) model->BSIM4v6dlc = model->BSIM4v6Lint; if (!model->BSIM4v6xlGiven) model->BSIM4v6xl = 0.0; if (!model->BSIM4v6xwGiven) model->BSIM4v6xw = 0.0; if (!model->BSIM4v6dlcigGiven) model->BSIM4v6dlcig = model->BSIM4v6Lint; if (!model->BSIM4v6dlcigdGiven) { if (model->BSIM4v6dlcigGiven) model->BSIM4v6dlcigd = model->BSIM4v6dlcig; else model->BSIM4v6dlcigd = model->BSIM4v6Lint; } if (!model->BSIM4v6dwjGiven) model->BSIM4v6dwj = model->BSIM4v6dwc; if (!model->BSIM4v6cfGiven) model->BSIM4v6cf = 2.0 * model->BSIM4v6epsrox * EPS0 / PI * log(1.0 + 0.4e-6 / model->BSIM4v6toxe); if (!model->BSIM4v6xpartGiven) model->BSIM4v6xpart = 0.0; if (!model->BSIM4v6sheetResistanceGiven) model->BSIM4v6sheetResistance = 0.0; if (!model->BSIM4v6SunitAreaJctCapGiven) model->BSIM4v6SunitAreaJctCap = 5.0E-4; if (!model->BSIM4v6DunitAreaJctCapGiven) model->BSIM4v6DunitAreaJctCap = model->BSIM4v6SunitAreaJctCap; if (!model->BSIM4v6SunitLengthSidewallJctCapGiven) model->BSIM4v6SunitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM4v6DunitLengthSidewallJctCapGiven) model->BSIM4v6DunitLengthSidewallJctCap = model->BSIM4v6SunitLengthSidewallJctCap; if (!model->BSIM4v6SunitLengthGateSidewallJctCapGiven) model->BSIM4v6SunitLengthGateSidewallJctCap = model->BSIM4v6SunitLengthSidewallJctCap ; if (!model->BSIM4v6DunitLengthGateSidewallJctCapGiven) model->BSIM4v6DunitLengthGateSidewallJctCap = model->BSIM4v6SunitLengthGateSidewallJctCap; if (!model->BSIM4v6SjctSatCurDensityGiven) model->BSIM4v6SjctSatCurDensity = 1.0E-4; if (!model->BSIM4v6DjctSatCurDensityGiven) model->BSIM4v6DjctSatCurDensity = model->BSIM4v6SjctSatCurDensity; if (!model->BSIM4v6SjctSidewallSatCurDensityGiven) model->BSIM4v6SjctSidewallSatCurDensity = 0.0; if (!model->BSIM4v6DjctSidewallSatCurDensityGiven) model->BSIM4v6DjctSidewallSatCurDensity = model->BSIM4v6SjctSidewallSatCurDensity; if (!model->BSIM4v6SjctGateSidewallSatCurDensityGiven) model->BSIM4v6SjctGateSidewallSatCurDensity = 0.0; if (!model->BSIM4v6DjctGateSidewallSatCurDensityGiven) model->BSIM4v6DjctGateSidewallSatCurDensity = model->BSIM4v6SjctGateSidewallSatCurDensity; if (!model->BSIM4v6SbulkJctPotentialGiven) model->BSIM4v6SbulkJctPotential = 1.0; if (!model->BSIM4v6DbulkJctPotentialGiven) model->BSIM4v6DbulkJctPotential = model->BSIM4v6SbulkJctPotential; if (!model->BSIM4v6SsidewallJctPotentialGiven) model->BSIM4v6SsidewallJctPotential = 1.0; if (!model->BSIM4v6DsidewallJctPotentialGiven) model->BSIM4v6DsidewallJctPotential = model->BSIM4v6SsidewallJctPotential; if (!model->BSIM4v6SGatesidewallJctPotentialGiven) model->BSIM4v6SGatesidewallJctPotential = model->BSIM4v6SsidewallJctPotential; if (!model->BSIM4v6DGatesidewallJctPotentialGiven) model->BSIM4v6DGatesidewallJctPotential = model->BSIM4v6SGatesidewallJctPotential; if (!model->BSIM4v6SbulkJctBotGradingCoeffGiven) model->BSIM4v6SbulkJctBotGradingCoeff = 0.5; if (!model->BSIM4v6DbulkJctBotGradingCoeffGiven) model->BSIM4v6DbulkJctBotGradingCoeff = model->BSIM4v6SbulkJctBotGradingCoeff; if (!model->BSIM4v6SbulkJctSideGradingCoeffGiven) model->BSIM4v6SbulkJctSideGradingCoeff = 0.33; if (!model->BSIM4v6DbulkJctSideGradingCoeffGiven) model->BSIM4v6DbulkJctSideGradingCoeff = model->BSIM4v6SbulkJctSideGradingCoeff; if (!model->BSIM4v6SbulkJctGateSideGradingCoeffGiven) model->BSIM4v6SbulkJctGateSideGradingCoeff = model->BSIM4v6SbulkJctSideGradingCoeff; if (!model->BSIM4v6DbulkJctGateSideGradingCoeffGiven) model->BSIM4v6DbulkJctGateSideGradingCoeff = model->BSIM4v6SbulkJctGateSideGradingCoeff; if (!model->BSIM4v6SjctEmissionCoeffGiven) model->BSIM4v6SjctEmissionCoeff = 1.0; if (!model->BSIM4v6DjctEmissionCoeffGiven) model->BSIM4v6DjctEmissionCoeff = model->BSIM4v6SjctEmissionCoeff; if (!model->BSIM4v6SjctTempExponentGiven) model->BSIM4v6SjctTempExponent = 3.0; if (!model->BSIM4v6DjctTempExponentGiven) model->BSIM4v6DjctTempExponent = model->BSIM4v6SjctTempExponent; if (!model->BSIM4v6jtssGiven) model->BSIM4v6jtss = 0.0; if (!model->BSIM4v6jtsdGiven) model->BSIM4v6jtsd = model->BSIM4v6jtss; if (!model->BSIM4v6jtsswsGiven) model->BSIM4v6jtssws = 0.0; if (!model->BSIM4v6jtsswdGiven) model->BSIM4v6jtsswd = model->BSIM4v6jtssws; if (!model->BSIM4v6jtsswgsGiven) model->BSIM4v6jtsswgs = 0.0; if (!model->BSIM4v6jtsswgdGiven) model->BSIM4v6jtsswgd = model->BSIM4v6jtsswgs; if (!model->BSIM4v6jtweffGiven) model->BSIM4v6jtweff = 0.0; if (!model->BSIM4v6njtsGiven) model->BSIM4v6njts = 20.0; if (!model->BSIM4v6njtsswGiven) model->BSIM4v6njtssw = 20.0; if (!model->BSIM4v6njtsswgGiven) model->BSIM4v6njtsswg = 20.0; if (!model->BSIM4v6njtsdGiven) { if (model->BSIM4v6njtsGiven) model->BSIM4v6njtsd = model->BSIM4v6njts; else model->BSIM4v6njtsd = 20.0; } if (!model->BSIM4v6njtsswdGiven) { if (model->BSIM4v6njtsswGiven) model->BSIM4v6njtsswd = model->BSIM4v6njtssw; else model->BSIM4v6njtsswd = 20.0; } if (!model->BSIM4v6njtsswgdGiven) { if (model->BSIM4v6njtsswgGiven) model->BSIM4v6njtsswgd = model->BSIM4v6njtsswg; else model->BSIM4v6njtsswgd = 20.0; } if (!model->BSIM4v6xtssGiven) model->BSIM4v6xtss = 0.02; if (!model->BSIM4v6xtsdGiven) model->BSIM4v6xtsd = model->BSIM4v6xtss; if (!model->BSIM4v6xtsswsGiven) model->BSIM4v6xtssws = 0.02; if (!model->BSIM4v6xtsswdGiven) model->BSIM4v6xtsswd = model->BSIM4v6xtssws; if (!model->BSIM4v6xtsswgsGiven) model->BSIM4v6xtsswgs = 0.02; if (!model->BSIM4v6xtsswgdGiven) model->BSIM4v6xtsswgd = model->BSIM4v6xtsswgs; if (!model->BSIM4v6tnjtsGiven) model->BSIM4v6tnjts = 0.0; if (!model->BSIM4v6tnjtsswGiven) model->BSIM4v6tnjtssw = 0.0; if (!model->BSIM4v6tnjtsswgGiven) model->BSIM4v6tnjtsswg = 0.0; if (!model->BSIM4v6tnjtsdGiven) { if (model->BSIM4v6tnjtsGiven) model->BSIM4v6tnjtsd = model->BSIM4v6tnjts; else model->BSIM4v6tnjtsd = 0.0; } if (!model->BSIM4v6tnjtsswdGiven) { if (model->BSIM4v6tnjtsswGiven) model->BSIM4v6tnjtsswd = model->BSIM4v6tnjtssw; else model->BSIM4v6tnjtsswd = 0.0; } if (!model->BSIM4v6tnjtsswgdGiven) { if (model->BSIM4v6tnjtsswgGiven) model->BSIM4v6tnjtsswgd = model->BSIM4v6tnjtsswg; else model->BSIM4v6tnjtsswgd = 0.0; } if (!model->BSIM4v6vtssGiven) model->BSIM4v6vtss = 10.0; if (!model->BSIM4v6vtsdGiven) model->BSIM4v6vtsd = model->BSIM4v6vtss; if (!model->BSIM4v6vtsswsGiven) model->BSIM4v6vtssws = 10.0; if (!model->BSIM4v6vtsswdGiven) model->BSIM4v6vtsswd = model->BSIM4v6vtssws; if (!model->BSIM4v6vtsswgsGiven) model->BSIM4v6vtsswgs = 10.0; if (!model->BSIM4v6vtsswgdGiven) model->BSIM4v6vtsswgd = model->BSIM4v6vtsswgs; if (!model->BSIM4v6oxideTrapDensityAGiven) { if (model->BSIM4v6type == NMOS) model->BSIM4v6oxideTrapDensityA = 6.25e41; else model->BSIM4v6oxideTrapDensityA= 6.188e40; } if (!model->BSIM4v6oxideTrapDensityBGiven) { if (model->BSIM4v6type == NMOS) model->BSIM4v6oxideTrapDensityB = 3.125e26; else model->BSIM4v6oxideTrapDensityB = 1.5e25; } if (!model->BSIM4v6oxideTrapDensityCGiven) model->BSIM4v6oxideTrapDensityC = 8.75e9; if (!model->BSIM4v6emGiven) model->BSIM4v6em = 4.1e7; /* V/m */ if (!model->BSIM4v6efGiven) model->BSIM4v6ef = 1.0; if (!model->BSIM4v6afGiven) model->BSIM4v6af = 1.0; if (!model->BSIM4v6kfGiven) model->BSIM4v6kf = 0.0; if (!model->BSIM4v6vgsMaxGiven) model->BSIM4v6vgsMax = 1e99; if (!model->BSIM4v6vgdMaxGiven) model->BSIM4v6vgdMax = 1e99; if (!model->BSIM4v6vgbMaxGiven) model->BSIM4v6vgbMax = 1e99; if (!model->BSIM4v6vdsMaxGiven) model->BSIM4v6vdsMax = 1e99; if (!model->BSIM4v6vbsMaxGiven) model->BSIM4v6vbsMax = 1e99; if (!model->BSIM4v6vbdMaxGiven) model->BSIM4v6vbdMax = 1e99; /* stress effect */ if (!model->BSIM4v6sarefGiven) model->BSIM4v6saref = 1e-6; /* m */ if (!model->BSIM4v6sbrefGiven) model->BSIM4v6sbref = 1e-6; /* m */ if (!model->BSIM4v6wlodGiven) model->BSIM4v6wlod = 0; /* m */ if (!model->BSIM4v6ku0Given) model->BSIM4v6ku0 = 0; /* 1/m */ if (!model->BSIM4v6kvsatGiven) model->BSIM4v6kvsat = 0; if (!model->BSIM4v6kvth0Given) /* m */ model->BSIM4v6kvth0 = 0; if (!model->BSIM4v6tku0Given) model->BSIM4v6tku0 = 0; if (!model->BSIM4v6llodku0Given) model->BSIM4v6llodku0 = 0; if (!model->BSIM4v6wlodku0Given) model->BSIM4v6wlodku0 = 0; if (!model->BSIM4v6llodvthGiven) model->BSIM4v6llodvth = 0; if (!model->BSIM4v6wlodvthGiven) model->BSIM4v6wlodvth = 0; if (!model->BSIM4v6lku0Given) model->BSIM4v6lku0 = 0; if (!model->BSIM4v6wku0Given) model->BSIM4v6wku0 = 0; if (!model->BSIM4v6pku0Given) model->BSIM4v6pku0 = 0; if (!model->BSIM4v6lkvth0Given) model->BSIM4v6lkvth0 = 0; if (!model->BSIM4v6wkvth0Given) model->BSIM4v6wkvth0 = 0; if (!model->BSIM4v6pkvth0Given) model->BSIM4v6pkvth0 = 0; if (!model->BSIM4v6stk2Given) model->BSIM4v6stk2 = 0; if (!model->BSIM4v6lodk2Given) model->BSIM4v6lodk2 = 1.0; if (!model->BSIM4v6steta0Given) model->BSIM4v6steta0 = 0; if (!model->BSIM4v6lodeta0Given) model->BSIM4v6lodeta0 = 1.0; /* Well Proximity Effect */ if (!model->BSIM4v6webGiven) model->BSIM4v6web = 0.0; if (!model->BSIM4v6wecGiven) model->BSIM4v6wec = 0.0; if (!model->BSIM4v6kvth0weGiven) model->BSIM4v6kvth0we = 0.0; if (!model->BSIM4v6k2weGiven) model->BSIM4v6k2we = 0.0; if (!model->BSIM4v6ku0weGiven) model->BSIM4v6ku0we = 0.0; if (!model->BSIM4v6screfGiven) model->BSIM4v6scref = 1.0E-6; /* m */ if (!model->BSIM4v6wpemodGiven) model->BSIM4v6wpemod = 0; else if ((model->BSIM4v6wpemod != 0) && (model->BSIM4v6wpemod != 1)) { model->BSIM4v6wpemod = 0; printf("Warning: wpemod has been set to its default value: 0.\n"); } if (!model->BSIM4v6lkvth0weGiven) model->BSIM4v6lkvth0we = 0; if (!model->BSIM4v6lk2weGiven) model->BSIM4v6lk2we = 0; if (!model->BSIM4v6lku0weGiven) model->BSIM4v6lku0we = 0; if (!model->BSIM4v6wkvth0weGiven) model->BSIM4v6wkvth0we = 0; if (!model->BSIM4v6wk2weGiven) model->BSIM4v6wk2we = 0; if (!model->BSIM4v6wku0weGiven) model->BSIM4v6wku0we = 0; if (!model->BSIM4v6pkvth0weGiven) model->BSIM4v6pkvth0we = 0; if (!model->BSIM4v6pk2weGiven) model->BSIM4v6pk2we = 0; if (!model->BSIM4v6pku0weGiven) model->BSIM4v6pku0we = 0; DMCGeff = model->BSIM4v6dmcg - model->BSIM4v6dmcgt; DMCIeff = model->BSIM4v6dmci; DMDGeff = model->BSIM4v6dmdg - model->BSIM4v6dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ for (here = model->BSIM4v6instances; here != NULL ; here=here->BSIM4v6nextInstance) { /* allocate a chunk of the state vector */ here->BSIM4v6states = *states; *states += BSIM4v6numStates; /* perform the parameter defaulting */ if (!here->BSIM4v6lGiven) here->BSIM4v6l = 5.0e-6; if (!here->BSIM4v6wGiven) here->BSIM4v6w = 5.0e-6; if (!here->BSIM4v6mGiven) here->BSIM4v6m = 1.0; if (!here->BSIM4v6nfGiven) here->BSIM4v6nf = 1.0; if (!here->BSIM4v6minGiven) here->BSIM4v6min = 0; /* integer */ if (!here->BSIM4v6icVDSGiven) here->BSIM4v6icVDS = 0.0; if (!here->BSIM4v6icVGSGiven) here->BSIM4v6icVGS = 0.0; if (!here->BSIM4v6icVBSGiven) here->BSIM4v6icVBS = 0.0; if (!here->BSIM4v6drainAreaGiven) here->BSIM4v6drainArea = 0.0; if (!here->BSIM4v6drainPerimeterGiven) here->BSIM4v6drainPerimeter = 0.0; if (!here->BSIM4v6drainSquaresGiven) here->BSIM4v6drainSquares = 1.0; if (!here->BSIM4v6sourceAreaGiven) here->BSIM4v6sourceArea = 0.0; if (!here->BSIM4v6sourcePerimeterGiven) here->BSIM4v6sourcePerimeter = 0.0; if (!here->BSIM4v6sourceSquaresGiven) here->BSIM4v6sourceSquares = 1.0; if (!here->BSIM4v6rbdbGiven) here->BSIM4v6rbdb = model->BSIM4v6rbdb; /* in ohm */ if (!here->BSIM4v6rbsbGiven) here->BSIM4v6rbsb = model->BSIM4v6rbsb; if (!here->BSIM4v6rbpbGiven) here->BSIM4v6rbpb = model->BSIM4v6rbpb; if (!here->BSIM4v6rbpsGiven) here->BSIM4v6rbps = model->BSIM4v6rbps; if (!here->BSIM4v6rbpdGiven) here->BSIM4v6rbpd = model->BSIM4v6rbpd; if (!here->BSIM4v6delvtoGiven) here->BSIM4v6delvto = 0.0; if (!here->BSIM4v6xgwGiven) here->BSIM4v6xgw = model->BSIM4v6xgw; if (!here->BSIM4v6ngconGiven) here->BSIM4v6ngcon = model->BSIM4v6ngcon; /* Process instance model selectors, some * may override their global counterparts */ if (!here->BSIM4v6rbodyModGiven) here->BSIM4v6rbodyMod = model->BSIM4v6rbodyMod; else if ((here->BSIM4v6rbodyMod != 0) && (here->BSIM4v6rbodyMod != 1) && (here->BSIM4v6rbodyMod != 2)) { here->BSIM4v6rbodyMod = model->BSIM4v6rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", model->BSIM4v6rbodyMod); } if (!here->BSIM4v6rgateModGiven) here->BSIM4v6rgateMod = model->BSIM4v6rgateMod; else if ((here->BSIM4v6rgateMod != 0) && (here->BSIM4v6rgateMod != 1) && (here->BSIM4v6rgateMod != 2) && (here->BSIM4v6rgateMod != 3)) { here->BSIM4v6rgateMod = model->BSIM4v6rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->BSIM4v6rgateMod); } if (!here->BSIM4v6geoModGiven) here->BSIM4v6geoMod = model->BSIM4v6geoMod; if (!here->BSIM4v6rgeoModGiven) here->BSIM4v6rgeoMod = model->BSIM4v6rgeoMod; else if ((here->BSIM4v6rgeoMod != 0) && (here->BSIM4v6rgeoMod != 1)) { here->BSIM4v6rgeoMod = model->BSIM4v6rgeoMod; printf("Warning: rgeoMod has been set to its global value %d.\n", model->BSIM4v6rgeoMod); } if (!here->BSIM4v6trnqsModGiven) here->BSIM4v6trnqsMod = model->BSIM4v6trnqsMod; else if ((here->BSIM4v6trnqsMod != 0) && (here->BSIM4v6trnqsMod != 1)) { here->BSIM4v6trnqsMod = model->BSIM4v6trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", model->BSIM4v6trnqsMod); } if (!here->BSIM4v6acnqsModGiven) here->BSIM4v6acnqsMod = model->BSIM4v6acnqsMod; else if ((here->BSIM4v6acnqsMod != 0) && (here->BSIM4v6acnqsMod != 1)) { here->BSIM4v6acnqsMod = model->BSIM4v6acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM4v6acnqsMod); } /* stress effect */ if (!here->BSIM4v6saGiven) here->BSIM4v6sa = 0.0; if (!here->BSIM4v6sbGiven) here->BSIM4v6sb = 0.0; if (!here->BSIM4v6sdGiven) here->BSIM4v6sd = 2 * model->BSIM4v6dmcg; /* Well Proximity Effect */ if (!here->BSIM4v6scaGiven) here->BSIM4v6sca = 0.0; if (!here->BSIM4v6scbGiven) here->BSIM4v6scb = 0.0; if (!here->BSIM4v6sccGiven) here->BSIM4v6scc = 0.0; if (!here->BSIM4v6scGiven) here->BSIM4v6sc = 0.0; /* m */ /* process drain series resistance */ createNode = 0; if ( (model->BSIM4v6rdsMod != 0) || (model->BSIM4v6tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v6sheetResistance > 0) { if (here->BSIM4v6drainSquaresGiven && here->BSIM4v6drainSquares > 0) { createNode = 1; } else if (!here->BSIM4v6drainSquaresGiven && (here->BSIM4v6rgeoMod != 0)) { BSIM4v6RdseffGeo(here->BSIM4v6nf*here->BSIM4v6m, here->BSIM4v6geoMod, here->BSIM4v6rgeoMod, here->BSIM4v6min, here->BSIM4v6w, model->BSIM4v6sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v6dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"drain"); if(error) return(error); here->BSIM4v6dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM4v6dNodePrime = here->BSIM4v6dNode; } /* process source series resistance */ createNode = 0; if ( (model->BSIM4v6rdsMod != 0) || (model->BSIM4v6tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v6sheetResistance > 0) { if (here->BSIM4v6sourceSquaresGiven && here->BSIM4v6sourceSquares > 0) { createNode = 1; } else if (!here->BSIM4v6sourceSquaresGiven && (here->BSIM4v6rgeoMod != 0)) { BSIM4v6RdseffGeo(here->BSIM4v6nf*here->BSIM4v6m, here->BSIM4v6geoMod, here->BSIM4v6rgeoMod, here->BSIM4v6min, here->BSIM4v6w, model->BSIM4v6sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v6sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"source"); if(error) return(error); here->BSIM4v6sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4v6sNodePrime = here->BSIM4v6sNode; if (here->BSIM4v6rgateMod > 0) { if (here->BSIM4v6gNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"gate"); if(error) return(error); here->BSIM4v6gNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4v6gNodePrime = here->BSIM4v6gNodeExt; if (here->BSIM4v6rgateMod == 3) { if (here->BSIM4v6gNodeMid == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"midgate"); if(error) return(error); here->BSIM4v6gNodeMid = tmp->number; } } else here->BSIM4v6gNodeMid = here->BSIM4v6gNodeExt; /* internal body nodes for body resistance model */ if ((here->BSIM4v6rbodyMod ==1) || (here->BSIM4v6rbodyMod ==2)) { if (here->BSIM4v6dbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"dbody"); if(error) return(error); here->BSIM4v6dbNode = tmp->number; } if (here->BSIM4v6bNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"body"); if(error) return(error); here->BSIM4v6bNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if (here->BSIM4v6sbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"sbody"); if(error) return(error); here->BSIM4v6sbNode = tmp->number; } } else here->BSIM4v6dbNode = here->BSIM4v6bNodePrime = here->BSIM4v6sbNode = here->BSIM4v6bNode; /* NQS node */ if (here->BSIM4v6trnqsMod) { if (here->BSIM4v6qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v6name,"charge"); if(error) return(error); here->BSIM4v6qNode = tmp->number; } } else here->BSIM4v6qNode = 0; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM4v6DPbpPtr, BSIM4v6dNodePrime, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6GPbpPtr, BSIM4v6gNodePrime, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6SPbpPtr, BSIM4v6sNodePrime, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6BPdpPtr, BSIM4v6bNodePrime, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6BPgpPtr, BSIM4v6bNodePrime, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6BPspPtr, BSIM4v6bNodePrime, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6BPbpPtr, BSIM4v6bNodePrime, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6DdPtr, BSIM4v6dNode, BSIM4v6dNode); TSTALLOC(BSIM4v6GPgpPtr, BSIM4v6gNodePrime, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6SsPtr, BSIM4v6sNode, BSIM4v6sNode); TSTALLOC(BSIM4v6DPdpPtr, BSIM4v6dNodePrime, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6SPspPtr, BSIM4v6sNodePrime, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6DdpPtr, BSIM4v6dNode, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6GPdpPtr, BSIM4v6gNodePrime, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6GPspPtr, BSIM4v6gNodePrime, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6SspPtr, BSIM4v6sNode, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6DPspPtr, BSIM4v6dNodePrime, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6DPdPtr, BSIM4v6dNodePrime, BSIM4v6dNode); TSTALLOC(BSIM4v6DPgpPtr, BSIM4v6dNodePrime, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6SPgpPtr, BSIM4v6sNodePrime, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6SPsPtr, BSIM4v6sNodePrime, BSIM4v6sNode); TSTALLOC(BSIM4v6SPdpPtr, BSIM4v6sNodePrime, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6QqPtr, BSIM4v6qNode, BSIM4v6qNode); TSTALLOC(BSIM4v6QbpPtr, BSIM4v6qNode, BSIM4v6bNodePrime) ; TSTALLOC(BSIM4v6QdpPtr, BSIM4v6qNode, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6QspPtr, BSIM4v6qNode, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6QgpPtr, BSIM4v6qNode, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6DPqPtr, BSIM4v6dNodePrime, BSIM4v6qNode); TSTALLOC(BSIM4v6SPqPtr, BSIM4v6sNodePrime, BSIM4v6qNode); TSTALLOC(BSIM4v6GPqPtr, BSIM4v6gNodePrime, BSIM4v6qNode); if (here->BSIM4v6rgateMod != 0) { TSTALLOC(BSIM4v6GEgePtr, BSIM4v6gNodeExt, BSIM4v6gNodeExt); TSTALLOC(BSIM4v6GEgpPtr, BSIM4v6gNodeExt, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6GPgePtr, BSIM4v6gNodePrime, BSIM4v6gNodeExt); TSTALLOC(BSIM4v6GEdpPtr, BSIM4v6gNodeExt, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6GEspPtr, BSIM4v6gNodeExt, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6GEbpPtr, BSIM4v6gNodeExt, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6GMdpPtr, BSIM4v6gNodeMid, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6GMgpPtr, BSIM4v6gNodeMid, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6GMgmPtr, BSIM4v6gNodeMid, BSIM4v6gNodeMid); TSTALLOC(BSIM4v6GMgePtr, BSIM4v6gNodeMid, BSIM4v6gNodeExt); TSTALLOC(BSIM4v6GMspPtr, BSIM4v6gNodeMid, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6GMbpPtr, BSIM4v6gNodeMid, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6DPgmPtr, BSIM4v6dNodePrime, BSIM4v6gNodeMid); TSTALLOC(BSIM4v6GPgmPtr, BSIM4v6gNodePrime, BSIM4v6gNodeMid); TSTALLOC(BSIM4v6GEgmPtr, BSIM4v6gNodeExt, BSIM4v6gNodeMid); TSTALLOC(BSIM4v6SPgmPtr, BSIM4v6sNodePrime, BSIM4v6gNodeMid); TSTALLOC(BSIM4v6BPgmPtr, BSIM4v6bNodePrime, BSIM4v6gNodeMid); } if ((here->BSIM4v6rbodyMod ==1) || (here->BSIM4v6rbodyMod ==2)) { TSTALLOC(BSIM4v6DPdbPtr, BSIM4v6dNodePrime, BSIM4v6dbNode); TSTALLOC(BSIM4v6SPsbPtr, BSIM4v6sNodePrime, BSIM4v6sbNode); TSTALLOC(BSIM4v6DBdpPtr, BSIM4v6dbNode, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6DBdbPtr, BSIM4v6dbNode, BSIM4v6dbNode); TSTALLOC(BSIM4v6DBbpPtr, BSIM4v6dbNode, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6DBbPtr, BSIM4v6dbNode, BSIM4v6bNode); TSTALLOC(BSIM4v6BPdbPtr, BSIM4v6bNodePrime, BSIM4v6dbNode); TSTALLOC(BSIM4v6BPbPtr, BSIM4v6bNodePrime, BSIM4v6bNode); TSTALLOC(BSIM4v6BPsbPtr, BSIM4v6bNodePrime, BSIM4v6sbNode); TSTALLOC(BSIM4v6SBspPtr, BSIM4v6sbNode, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6SBbpPtr, BSIM4v6sbNode, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6SBbPtr, BSIM4v6sbNode, BSIM4v6bNode); TSTALLOC(BSIM4v6SBsbPtr, BSIM4v6sbNode, BSIM4v6sbNode); TSTALLOC(BSIM4v6BdbPtr, BSIM4v6bNode, BSIM4v6dbNode); TSTALLOC(BSIM4v6BbpPtr, BSIM4v6bNode, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6BsbPtr, BSIM4v6bNode, BSIM4v6sbNode); TSTALLOC(BSIM4v6BbPtr, BSIM4v6bNode, BSIM4v6bNode); } if (model->BSIM4v6rdsMod) { TSTALLOC(BSIM4v6DgpPtr, BSIM4v6dNode, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6DspPtr, BSIM4v6dNode, BSIM4v6sNodePrime); TSTALLOC(BSIM4v6DbpPtr, BSIM4v6dNode, BSIM4v6bNodePrime); TSTALLOC(BSIM4v6SdpPtr, BSIM4v6sNode, BSIM4v6dNodePrime); TSTALLOC(BSIM4v6SgpPtr, BSIM4v6sNode, BSIM4v6gNodePrime); TSTALLOC(BSIM4v6SbpPtr, BSIM4v6sNode, BSIM4v6bNodePrime); } } } /* end of loop through all the BSIM4v6 device models */ #ifdef USE_OMP InstCount = 0; model = (BSIM4v6model*)inModel; /* loop through all the BSIM4v6 device models to count the number of instances */ for( ; model != NULL; model = model->BSIM4v6nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM4v6instances; here != NULL ; here=here->BSIM4v6nextInstance) { InstCount++; } } InstArray = TMALLOC(BSIM4v6instance*, InstCount); model = (BSIM4v6model*)inModel; idx = 0; for( ; model != NULL; model = model->BSIM4v6nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM4v6instances; here != NULL ; here=here->BSIM4v6nextInstance) { InstArray[idx] = here; idx++; } /* set the array pointer and instance count into each model */ model->BSIM4v6InstCount = InstCount; model->BSIM4v6InstanceArray = InstArray; } #endif return(OK); } int BSIM4v6unsetup(GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM BSIM4v6model *model; BSIM4v6instance *here; for (model = (BSIM4v6model *)inModel; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here != NULL; here=here->BSIM4v6nextInstance) { if (here->BSIM4v6dNodePrime && here->BSIM4v6dNodePrime != here->BSIM4v6dNode) { CKTdltNNum(ckt, here->BSIM4v6dNodePrime); here->BSIM4v6dNodePrime = 0; } if (here->BSIM4v6sNodePrime && here->BSIM4v6sNodePrime != here->BSIM4v6sNode) { CKTdltNNum(ckt, here->BSIM4v6sNodePrime); here->BSIM4v6sNodePrime = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/bsim4v6/b4v6dest.c0000644000265600020320000000316712264261473021342 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4dest.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" #include "ngspice/suffix.h" void BSIM4v6destroy( GENmodel **inModel) { BSIM4v6model **model = (BSIM4v6model**)inModel; BSIM4v6instance *here; BSIM4v6instance *prev = NULL; BSIM4v6model *mod = *model; BSIM4v6model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v6nextModel) { /** added to get rid of link list pSizeDependParamKnot **/ struct bsim4v6SizeDependParam *pParam, *pParamOld=NULL; pParam = mod->pSizeDependParamKnot; for (; pParam ; pParam = pParam->pNext) { FREE(pParamOld); pParamOld = pParam; } FREE(pParamOld); pParam = NULL; /** end of extra code **/ if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) { #ifdef USE_OMP /* free just once for all models */ FREE(oldmod->BSIM4v6InstanceArray); #endif FREE(oldmod); } *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim4v6/b4v6noi.c0000644000265600020320000007337112264261473021174 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /**** BSIM4.6.4 Update ngspice 08/22/2009 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4noi.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* * WDL: 1/f noise model has been smoothed out and enhanced with * bulk charge effect as well as physical N* equ. and necessary * conversion into the SI unit system. */ static double Eval1ovFNoise(double Vds, BSIM4v6model *model, BSIM4v6instance *here, double freq, double temp) { struct bsim4v6SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM4v6cd); Leff = pParam->BSIM4v6leff - 2.0 * model->BSIM4v6lintnoi; Leffsq = Leff * Leff; esat = 2.0 * here->BSIM4v6vsattemp / here->BSIM4v6ueff; if(model->BSIM4v6em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ else { T0 = ((((Vds - here->BSIM4v6Vdseff) / pParam->BSIM4v6litl) + model->BSIM4v6em) / esat); DelClm = pParam->BSIM4v6litl * log (MAX(T0, N_MINLOG)); if (DelClm < 0.0) DelClm = 0.0; /* bugfix */ } EffFreq = pow(freq, model->BSIM4v6ef); T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v6ueff; T2 = 1.0e10 * EffFreq * here->BSIM4v6Abulk * model->BSIM4v6coxe * Leffsq; N0 = model->BSIM4v6coxe * here->BSIM4v6Vgsteff / CHARGE; Nl = model->BSIM4v6coxe * here->BSIM4v6Vgsteff * (1.0 - here->BSIM4v6AbovVgst2Vtm * here->BSIM4v6Vdseff) / CHARGE; T3 = model->BSIM4v6oxideTrapDensityA * log(MAX(((N0 + here->BSIM4v6nstar) / (Nl + here->BSIM4v6nstar)), N_MINLOG)); T4 = model->BSIM4v6oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM4v6oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4v6weff * here->BSIM4v6nf; T8 = model->BSIM4v6oxideTrapDensityA + model->BSIM4v6oxideTrapDensityB * Nl + model->BSIM4v6oxideTrapDensityC * Nl * Nl; T9 = (Nl + here->BSIM4v6nstar) * (Nl + here->BSIM4v6nstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM4v6noise( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM4v6model *model = (BSIM4v6model *)inModel; BSIM4v6instance *here; struct bsim4v6SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM4v6NSRCS]; double lnNdens[BSIM4v6NSRCS]; double T0, T1, T2, T5, T10, T11; double Vds, Ssi, Swi; double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare, bodymode; double m; int i; /* define the names of the noise sources */ static char *BSIM4v6nNames[BSIM4v6NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".rg", /* noise due to rgeltd */ ".rbps", /* noise due to rbps */ ".rbpd", /* noise due to rbpd */ ".rbpb", /* noise due to rbpb */ ".rbsb", /* noise due to rbsb */ ".rbdb", /* noise due to rbdb */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".igs", /* shot noise due to IGS */ ".igd", /* shot noise due to IGD */ ".igb", /* shot noise due to IGB */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here != NULL; here = here->BSIM4v6nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM4v6NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM4v6name, BSIM4v6nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM4v6NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM4v6name, BSIM4v6nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM4v6name, BSIM4v6nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM4v6m; switch (mode) { case N_DENS: if (model->BSIM4v6tnoiMod == 0) { if (model->BSIM4v6rdsMod == 0) { gspr = here->BSIM4v6sourceConductance; gdpr = here->BSIM4v6drainConductance; if (here->BSIM4v6grdsw > 0.0) tmp = 1.0 / here->BSIM4v6grdsw; /* tmp used below */ else tmp = 0.0; } else { gspr = here->BSIM4v6gstot; gdpr = here->BSIM4v6gdtot; tmp = 0.0; } } else { T5 = here->BSIM4v6Vgsteff / here->BSIM4v6EsatL; T5 *= T5; npart_beta = model->BSIM4v6rnoia * (1.0 + T5 * model->BSIM4v6tnoia * pParam->BSIM4v6leff); npart_theta = model->BSIM4v6rnoib * (1.0 + T5 * model->BSIM4v6tnoib * pParam->BSIM4v6leff); if(npart_theta > 0.9) npart_theta = 0.9; if(npart_theta > 0.9 * npart_beta) npart_theta = 0.9 * npart_beta; //4.6.2 if (model->BSIM4v6rdsMod == 0) { gspr = here->BSIM4v6sourceConductance; gdpr = here->BSIM4v6drainConductance; } else { gspr = here->BSIM4v6gstot; gdpr = here->BSIM4v6gdtot; } if ((*(ckt->CKTstates[0] + here->BSIM4v6vds)) >= 0.0) gspr = gspr * (1.0 + npart_theta * npart_theta * gspr / here->BSIM4v6IdovVds); /* bugfix */ else gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr / here->BSIM4v6IdovVds); } NevalSrc(&noizDens[BSIM4v6RDNOIZ], &lnNdens[BSIM4v6RDNOIZ], ckt, THERMNOISE, here->BSIM4v6dNodePrime, here->BSIM4v6dNode, gdpr * m); NevalSrc(&noizDens[BSIM4v6RSNOIZ], &lnNdens[BSIM4v6RSNOIZ], ckt, THERMNOISE, here->BSIM4v6sNodePrime, here->BSIM4v6sNode, gspr * m); if (here->BSIM4v6rgateMod == 1) { NevalSrc(&noizDens[BSIM4v6RGNOIZ], &lnNdens[BSIM4v6RGNOIZ], ckt, THERMNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6gNodeExt, here->BSIM4v6grgeltd * m); } else if (here->BSIM4v6rgateMod == 2) { T0 = 1.0 + here->BSIM4v6grgeltd/here->BSIM4v6gcrg; T1 = T0 * T0; NevalSrc(&noizDens[BSIM4v6RGNOIZ], &lnNdens[BSIM4v6RGNOIZ], ckt, THERMNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6gNodeExt, here->BSIM4v6grgeltd * m / T1); } else if (here->BSIM4v6rgateMod == 3) { NevalSrc(&noizDens[BSIM4v6RGNOIZ], &lnNdens[BSIM4v6RGNOIZ], ckt, THERMNOISE, here->BSIM4v6gNodeMid, here->BSIM4v6gNodeExt, here->BSIM4v6grgeltd * m); } else { noizDens[BSIM4v6RGNOIZ] = 0.0; lnNdens[BSIM4v6RGNOIZ] = log(MAX(noizDens[BSIM4v6RGNOIZ], N_MINLOG)); } bodymode = 5; if (here->BSIM4v6rbodyMod == 2) { if( ( !model->BSIM4v6rbps0Given) || ( !model->BSIM4v6rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4v6rbsbx0Given && !model->BSIM4v6rbsby0Given) || (!model->BSIM4v6rbdbx0Given && !model->BSIM4v6rbdby0Given) ) bodymode = 3; } if (here->BSIM4v6rbodyMod) { if(bodymode == 5) { NevalSrc(&noizDens[BSIM4v6RBPSNOIZ], &lnNdens[BSIM4v6RBPSNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6sbNode, here->BSIM4v6grbps * m); NevalSrc(&noizDens[BSIM4v6RBPDNOIZ], &lnNdens[BSIM4v6RBPDNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6dbNode, here->BSIM4v6grbpd * m); NevalSrc(&noizDens[BSIM4v6RBPBNOIZ], &lnNdens[BSIM4v6RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6bNode, here->BSIM4v6grbpb * m); NevalSrc(&noizDens[BSIM4v6RBSBNOIZ], &lnNdens[BSIM4v6RBSBNOIZ], ckt, THERMNOISE, here->BSIM4v6bNode, here->BSIM4v6sbNode, here->BSIM4v6grbsb * m); NevalSrc(&noizDens[BSIM4v6RBDBNOIZ], &lnNdens[BSIM4v6RBDBNOIZ], ckt, THERMNOISE, here->BSIM4v6bNode, here->BSIM4v6dbNode, here->BSIM4v6grbdb * m); } if(bodymode == 3) { NevalSrc(&noizDens[BSIM4v6RBPSNOIZ], &lnNdens[BSIM4v6RBPSNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6sbNode, here->BSIM4v6grbps * m); NevalSrc(&noizDens[BSIM4v6RBPDNOIZ], &lnNdens[BSIM4v6RBPDNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6dbNode, here->BSIM4v6grbpd * m); NevalSrc(&noizDens[BSIM4v6RBPBNOIZ], &lnNdens[BSIM4v6RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6bNode, here->BSIM4v6grbpb * m); noizDens[BSIM4v6RBSBNOIZ] = noizDens[BSIM4v6RBDBNOIZ] = 0.0; lnNdens[BSIM4v6RBSBNOIZ] = log(MAX(noizDens[BSIM4v6RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBDBNOIZ] = log(MAX(noizDens[BSIM4v6RBDBNOIZ], N_MINLOG)); } if(bodymode == 1) { NevalSrc(&noizDens[BSIM4v6RBPBNOIZ], &lnNdens[BSIM4v6RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v6bNodePrime, here->BSIM4v6bNode, here->BSIM4v6grbpb * m); noizDens[BSIM4v6RBPSNOIZ] = noizDens[BSIM4v6RBPDNOIZ] = 0.0; noizDens[BSIM4v6RBSBNOIZ] = noizDens[BSIM4v6RBDBNOIZ] = 0.0; lnNdens[BSIM4v6RBPSNOIZ] = log(MAX(noizDens[BSIM4v6RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBPDNOIZ] = log(MAX(noizDens[BSIM4v6RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBSBNOIZ] = log(MAX(noizDens[BSIM4v6RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBDBNOIZ] = log(MAX(noizDens[BSIM4v6RBDBNOIZ], N_MINLOG)); } } else { noizDens[BSIM4v6RBPSNOIZ] = noizDens[BSIM4v6RBPDNOIZ] = 0.0; noizDens[BSIM4v6RBPBNOIZ] = 0.0; noizDens[BSIM4v6RBSBNOIZ] = noizDens[BSIM4v6RBDBNOIZ] = 0.0; lnNdens[BSIM4v6RBPSNOIZ] = log(MAX(noizDens[BSIM4v6RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBPDNOIZ] = log(MAX(noizDens[BSIM4v6RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBPBNOIZ] = log(MAX(noizDens[BSIM4v6RBPBNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBSBNOIZ] = log(MAX(noizDens[BSIM4v6RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v6RBDBNOIZ] = log(MAX(noizDens[BSIM4v6RBDBNOIZ], N_MINLOG)); } switch(model->BSIM4v6tnoiMod) { case 0: T0 = here->BSIM4v6ueff * fabs(here->BSIM4v6qinv); T1 = T0 * tmp + pParam->BSIM4v6leff * pParam->BSIM4v6leff; NevalSrc(&noizDens[BSIM4v6IDNOIZ], &lnNdens[BSIM4v6IDNOIZ], ckt, THERMNOISE, here->BSIM4v6dNodePrime, here->BSIM4v6sNodePrime, m * (T0 / T1) * model->BSIM4v6ntnoi); break; case 1: T0 = here->BSIM4v6gm + here->BSIM4v6gmbs + here->BSIM4v6gds; T0 *= T0; igsquare = npart_theta * npart_theta * T0 / here->BSIM4v6IdovVds; T1 = npart_beta * (here->BSIM4v6gm + here->BSIM4v6gmbs) + here->BSIM4v6gds; T2 = T1 * T1 / here->BSIM4v6IdovVds; NevalSrc(&noizDens[BSIM4v6IDNOIZ], &lnNdens[BSIM4v6IDNOIZ], ckt, THERMNOISE, here->BSIM4v6dNodePrime, here->BSIM4v6sNodePrime, m * (T2 - igsquare)); break; } NevalSrc(&noizDens[BSIM4v6FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v6dNodePrime, here->BSIM4v6sNodePrime, (double) 0.0); switch(model->BSIM4v6fnoiMod) { case 0: noizDens[BSIM4v6FLNOIZ] *= m * model->BSIM4v6kf * exp(model->BSIM4v6af * log(MAX(fabs(here->BSIM4v6cd), N_MINLOG))) / (pow(data->freq, model->BSIM4v6ef) * pParam->BSIM4v6leff * pParam->BSIM4v6leff * model->BSIM4v6coxe); break; case 1: Vds = *(ckt->CKTstates[0] + here->BSIM4v6vds); if (Vds < 0.0) Vds = -Vds; Ssi = Eval1ovFNoise(Vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM4v6oxideTrapDensityA * CONSTboltz * ckt->CKTtemp; T11 = pParam->BSIM4v6weff * here->BSIM4v6nf * pParam->BSIM4v6leff * pow(data->freq, model->BSIM4v6ef) * 1.0e10 * here->BSIM4v6nstar * here->BSIM4v6nstar; Swi = T10 / T11 * here->BSIM4v6cd * here->BSIM4v6cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM4v6FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM4v6FLNOIZ] *= 0.0; break; } lnNdens[BSIM4v6FLNOIZ] = log(MAX(noizDens[BSIM4v6FLNOIZ], N_MINLOG)); if(here->BSIM4v6mode >= 0) { /* bugfix */ NevalSrc(&noizDens[BSIM4v6IGSNOIZ], &lnNdens[BSIM4v6IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6sNodePrime, m * (here->BSIM4v6Igs + here->BSIM4v6Igcs)); NevalSrc(&noizDens[BSIM4v6IGDNOIZ], &lnNdens[BSIM4v6IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6dNodePrime, m * (here->BSIM4v6Igd + here->BSIM4v6Igcd)); } else { NevalSrc(&noizDens[BSIM4v6IGSNOIZ], &lnNdens[BSIM4v6IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6sNodePrime, m * (here->BSIM4v6Igs + here->BSIM4v6Igcd)); NevalSrc(&noizDens[BSIM4v6IGDNOIZ], &lnNdens[BSIM4v6IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6dNodePrime, m * (here->BSIM4v6Igd + here->BSIM4v6Igcs)); } NevalSrc(&noizDens[BSIM4v6IGBNOIZ], &lnNdens[BSIM4v6IGBNOIZ], ckt, SHOTNOISE, here->BSIM4v6gNodePrime, here->BSIM4v6bNodePrime, m * here->BSIM4v6Igb); noizDens[BSIM4v6TOTNOIZ] = noizDens[BSIM4v6RDNOIZ] + noizDens[BSIM4v6RSNOIZ] + noizDens[BSIM4v6RGNOIZ] + noizDens[BSIM4v6RBPSNOIZ] + noizDens[BSIM4v6RBPDNOIZ] + noizDens[BSIM4v6RBPBNOIZ] + noizDens[BSIM4v6RBSBNOIZ] + noizDens[BSIM4v6RBDBNOIZ] + noizDens[BSIM4v6IDNOIZ] + noizDens[BSIM4v6FLNOIZ] + noizDens[BSIM4v6IGSNOIZ] + noizDens[BSIM4v6IGDNOIZ] + noizDens[BSIM4v6IGBNOIZ]; lnNdens[BSIM4v6TOTNOIZ] = log(MAX(noizDens[BSIM4v6TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM4v6TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM4v6NSRCS; i++) { here->BSIM4v6nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM4v6NSRCS; i++) { here->BSIM4v6nVar[OUTNOIZ][i] = 0.0; here->BSIM4v6nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM4v6NSRCS; i++) { if (i != BSIM4v6TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM4v6nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM4v6nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM4v6nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM4v6nVar[OUTNOIZ][i] += tempOnoise; here->BSIM4v6nVar[OUTNOIZ][BSIM4v6TOTNOIZ] += tempOnoise; here->BSIM4v6nVar[INNOIZ][i] += tempInoise; here->BSIM4v6nVar[INNOIZ][BSIM4v6TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM4v6NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM4v6NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM4v6nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM4v6nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/bsim4v6itf.h0000644000265600020320000000037712264261473021703 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Author: 2001- Xuemei Xi File: bsim4v6itf.h **********/ #ifndef DEV_BSIM4v6 #define DEV_BSIM4v6 SPICEdev *get_bsim4v6_info(void); #endif ngspice-26/src/spicelib/devices/bsim4v6/Makefile.am0000644000265600020320000000116612264261473021566 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim4v6.la libbsim4v6_la_SOURCES = \ b4v6.c \ b4v6acld.c \ b4v6ask.c \ b4v6check.c \ b4v6cvtest.c \ b4v6del.c \ b4v6dest.c \ b4v6geo.c \ b4v6getic.c \ b4v6ld.c \ b4v6mask.c \ b4v6mdel.c \ b4v6mpar.c \ b4v6noi.c \ b4v6par.c \ b4v6pzld.c \ b4v6set.c \ b4v6soachk.c \ b4v6temp.c \ b4v6trunc.c \ bsim4v6def.h \ bsim4v6ext.h \ bsim4v6init.c \ bsim4v6init.h \ bsim4v6itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim4v6/b4v6acld.c0000644000265600020320000007177012264261473021313 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4acld.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6acLoad( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcbgb, xcbdb, xcbsb, xcbbb; double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb; double xcgmbb=0.0, xcbgmb; double capbd, capbs, omega; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double T0=0.0, T1, T2, T3; double Csg, Csd, Css; double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; double FwdSumr, RevSumr, Gmr, Gmbsr; double FwdSumi, RevSumi, Gmi, Gmbsi; struct bsim4v6SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here!= NULL; here = here->BSIM4v6nextInstance) { pParam = here->pParam; capbd = here->BSIM4v6capbd; capbs = here->BSIM4v6capbs; cgso = here->BSIM4v6cgso; cgdo = here->BSIM4v6cgdo; cgbo = pParam->BSIM4v6cgbo; Csd = -(here->BSIM4v6cddb + here->BSIM4v6cgdb + here->BSIM4v6cbdb); Csg = -(here->BSIM4v6cdgb + here->BSIM4v6cggb + here->BSIM4v6cbgb); Css = -(here->BSIM4v6cdsb + here->BSIM4v6cgsb + here->BSIM4v6cbsb); if (here->BSIM4v6acnqsMod) { T0 = omega * here->BSIM4v6taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; gmr = here->BSIM4v6gm * T2; gmbsr = here->BSIM4v6gmbs * T2; gdsr = here->BSIM4v6gds * T2; gmi = -here->BSIM4v6gm * T3; gmbsi = -here->BSIM4v6gmbs * T3; gdsi = -here->BSIM4v6gds * T3; Cddr = here->BSIM4v6cddb * T2; Cdgr = here->BSIM4v6cdgb * T2; Cdsr = here->BSIM4v6cdsb * T2; Cdbr = -(Cddr + Cdgr + Cdsr); /* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ Cddi = here->BSIM4v6cddb * T3 * omega; Cdgi = here->BSIM4v6cdgb * T3 * omega; Cdsi = here->BSIM4v6cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; Csgr = Csg * T2; Cssr = Css * T2; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csd * T3 * omega; Csgi = Csg * T3 * omega; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); Cgdr = -(Cddr + Csdr + here->BSIM4v6cbdb); Cggr = -(Cdgr + Csgr + here->BSIM4v6cbgb); Cgsr = -(Cdsr + Cssr + here->BSIM4v6cbsb); Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = -(Cddi + Csdi); Cggi = -(Cdgi + Csgi); Cgsi = -(Cdsi + Cssi); Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ { gmr = here->BSIM4v6gm; gmbsr = here->BSIM4v6gmbs; gdsr = here->BSIM4v6gds; gmi = gmbsi = gdsi = 0.0; Cddr = here->BSIM4v6cddb; Cdgr = here->BSIM4v6cdgb; Cdsr = here->BSIM4v6cdsb; Cdbr = -(Cddr + Cdgr + Cdsr); Cddi = Cdgi = Cdsi = Cdbi = 0.0; Csdr = Csd; Csgr = Csg; Cssr = Css; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csgi = Cssi = Csbi = 0.0; Cgdr = here->BSIM4v6cgdb; Cggr = here->BSIM4v6cggb; Cgsr = here->BSIM4v6cgsb; Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = Cggi = Cgsi = Cgbi = 0.0; } if (here->BSIM4v6mode >= 0) { Gmr = gmr; Gmbsr = gmbsr; FwdSumr = Gmr + Gmbsr; RevSumr = 0.0; Gmi = gmi; Gmbsi = gmbsi; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; gbbdp = -(here->BSIM4v6gbds); gbbsp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = here->BSIM4v6gbgs; gbdpdp = here->BSIM4v6gbds; gbdpb = here->BSIM4v6gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcsg; gIstotd = here->BSIM4v6gIgcsd; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcss; gIstotb = here->BSIM4v6gIgcsb; gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcdg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcdd; gIdtots = here->BSIM4v6gIgcds; gIdtotb = here->BSIM4v6gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbd; gIbtots = here->BSIM4v6gIgbs; gIbtotb = here->BSIM4v6gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vges) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); else if (here->BSIM4v6rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vgms) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgd * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgs * T0; gcrgb = here->BSIM4v6gcrgb * T0; gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v6rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v6cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgdr * omega; xcgsbr = Cgsr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Cdgr * omega; xcsgbr = Csgr * omega; xcbgb = here->BSIM4v6cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v6cgbo ) * omega; xcgdbr = (Cgdr - cgdo) * omega; xcgsbr = (Cgsr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Cdgr - cgdo) * omega; xcsgbr = (Csgr - cgso) * omega; xcbgb = (here->BSIM4v6cbgb - pParam->BSIM4v6cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (Cddr + here->BSIM4v6capbd + cgdo) * omega; xcdsbr = Cdsr * omega; xcsdbr = Csdr * omega; xcssbr = (here->BSIM4v6capbs + cgso + Cssr) * omega; if (!here->BSIM4v6rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v6cbdb - here->BSIM4v6capbd) * omega; xcbsb = (here->BSIM4v6cbsb - here->BSIM4v6capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = Cdbr * omega; xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) + here->BSIM4v6capbs * omega; xcbdb = here->BSIM4v6cbdb * omega; xcbsb = here->BSIM4v6cbsb * omega; xcdbdb = -here->BSIM4v6capbd * omega; xcsbsb = -here->BSIM4v6capbs * omega; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xcdgbi = Cdgi; xcsgbi = Csgi; xcddbi = Cddi; xcdsbi = Cdsi; xcsdbi = Csdi; xcssbi = Cssi; xcdbbi = Cdbi; xcsbbi = Csbi; xcggbi = Cggi; xcgdbi = Cgdi; xcgsbi = Cgsi; xcgbbi = Cgbi; } else /* Reverse mode */ { Gmr = -gmr; Gmbsr = -gmbsr; FwdSumr = 0.0; RevSumr = -(Gmr + Gmbsr); Gmi = -gmi; Gmbsi = -gmbsi; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); gbbsp = -(here->BSIM4v6gbds); gbbdp = here->BSIM4v6gbds + here->BSIM4v6gbgs + here->BSIM4v6gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v6gbgs; gbspsp = here->BSIM4v6gbds; gbspb = here->BSIM4v6gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v6igcMod) { gIstotg = here->BSIM4v6gIgsg + here->BSIM4v6gIgcdg; gIstotd = here->BSIM4v6gIgcds; gIstots = here->BSIM4v6gIgss + here->BSIM4v6gIgcdd; gIstotb = here->BSIM4v6gIgcdb; gIdtotg = here->BSIM4v6gIgdg + here->BSIM4v6gIgcsg; gIdtotd = here->BSIM4v6gIgdd + here->BSIM4v6gIgcss; gIdtots = here->BSIM4v6gIgcsd; gIdtotb = here->BSIM4v6gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v6igbMod) { gIbtotg = here->BSIM4v6gIgbg; gIbtotd = here->BSIM4v6gIgbs; gIbtots = here->BSIM4v6gIgbd; gIbtotb = here->BSIM4v6gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v6igcMod != 0) || (model->BSIM4v6igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v6rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vges) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); else if (here->BSIM4v6rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v6vgms) - *(ckt->CKTstates[0] + here->BSIM4v6vgs); if (here->BSIM4v6rgateMod > 1) { gcrgd = here->BSIM4v6gcrgs * T0; gcrgg = here->BSIM4v6gcrgg * T0; gcrgs = here->BSIM4v6gcrgd * T0; gcrgb = here->BSIM4v6gcrgb * T0; gcrgg -= here->BSIM4v6gcrg; gcrg = here->BSIM4v6gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v6rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v6cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v6cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgsr * omega; xcgsbr = Cgdr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Csgr * omega; xcsgbr = Cdgr * omega; xcbgb = here->BSIM4v6cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v6cgbo ) * omega; xcgdbr = (Cgsr - cgdo) * omega; xcgsbr = (Cgdr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Csgr - cgdo) * omega; xcsgbr = (Cdgr - cgso) * omega; xcbgb = (here->BSIM4v6cbgb - pParam->BSIM4v6cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (here->BSIM4v6capbd + cgdo + Cssr) * omega; xcdsbr = Csdr * omega; xcsdbr = Cdsr * omega; xcssbr = (Cddr + here->BSIM4v6capbs + cgso) * omega; if (!here->BSIM4v6rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v6cbsb - here->BSIM4v6capbd) * omega; xcbsb = (here->BSIM4v6cbdb - here->BSIM4v6capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) + here->BSIM4v6capbd * omega; xcsbbr = Cdbr * omega; xcbdb = here->BSIM4v6cbsb * omega; xcbsb = here->BSIM4v6cbdb * omega; xcdbdb = -here->BSIM4v6capbd * omega; xcsbsb = -here->BSIM4v6capbs * omega; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xcdgbi = Csgi; xcsgbi = Cdgi; xcddbi = Cssi; xcdsbi = Csdi; xcsdbi = Cdsi; xcssbi = Cddi; xcdbbi = Csbi; xcsbbi = Cdbi; xcggbi = Cggi; xcgdbi = Cgsi; xcgsbi = Cgdi; xcgbbi = Cgbi; } if (model->BSIM4v6rdsMod == 1) { gstot = here->BSIM4v6gstot; gstotd = here->BSIM4v6gstotd; gstotg = here->BSIM4v6gstotg; gstots = here->BSIM4v6gstots - gstot; gstotb = here->BSIM4v6gstotb; gdtot = here->BSIM4v6gdtot; gdtotd = here->BSIM4v6gdtotd - gdtot; gdtotg = here->BSIM4v6gdtotg; gdtots = here->BSIM4v6gdtots; gdtotb = here->BSIM4v6gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } /* * Loading AC matrix */ m = here->BSIM4v6m; if (!model->BSIM4v6rdsMod) { gdpr = here->BSIM4v6drainConductance; gspr = here->BSIM4v6sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v6rbodyMod) { gjbd = here->BSIM4v6gbd; gjbs = here->BSIM4v6gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v6grgeltd; if (here->BSIM4v6rgateMod == 1) { *(here->BSIM4v6GEgePtr) += m * geltd; *(here->BSIM4v6GPgePtr) -= m * geltd; *(here->BSIM4v6GEgpPtr) -= m * geltd; *(here->BSIM4v6GPgpPtr +1) += m * xcggbr; *(here->BSIM4v6GPgpPtr) += m * (geltd + xcggbi + gIgtotg); *(here->BSIM4v6GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v6GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v6GPspPtr +1) += m * xcgsbr; *(here->BSIM4v6GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v6GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v6GPbpPtr) += m * (xcgbbi + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v6rgateMod == 2) { *(here->BSIM4v6GEgePtr) += m * gcrg; *(here->BSIM4v6GEgpPtr) += m * gcrgg; *(here->BSIM4v6GEdpPtr) += m * gcrgd; *(here->BSIM4v6GEspPtr) += m * gcrgs; *(here->BSIM4v6GEbpPtr) += m * gcrgb; *(here->BSIM4v6GPgePtr) -= m * gcrg; *(here->BSIM4v6GPgpPtr +1) += m * xcggbr; *(here->BSIM4v6GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v6GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v6GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v6GPspPtr +1) += m * xcgsbr; *(here->BSIM4v6GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v6GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v6GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); } else if (here->BSIM4v6rgateMod == 3) { *(here->BSIM4v6GEgePtr) += m * geltd; *(here->BSIM4v6GEgmPtr) -= m * geltd; *(here->BSIM4v6GMgePtr) -= m * geltd; *(here->BSIM4v6GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v6GMgmPtr +1) += m * xcgmgmb; *(here->BSIM4v6GMdpPtr) += m * gcrgd; *(here->BSIM4v6GMdpPtr +1) += m * xcgmdb; *(here->BSIM4v6GMgpPtr) += m * gcrgg; *(here->BSIM4v6GMspPtr) += m * gcrgs; *(here->BSIM4v6GMspPtr +1) += m * xcgmsb; *(here->BSIM4v6GMbpPtr) += m * gcrgb; *(here->BSIM4v6GMbpPtr +1) += m * xcgmbb; *(here->BSIM4v6DPgmPtr +1) += m * xcdgmb; *(here->BSIM4v6GPgmPtr) -= m * gcrg; *(here->BSIM4v6SPgmPtr +1) += m * xcsgmb; *(here->BSIM4v6BPgmPtr +1) += m * xcbgmb; *(here->BSIM4v6GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v6GPgpPtr +1) += m * xcggbr; *(here->BSIM4v6GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v6GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v6GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v6GPspPtr +1) += m * xcgsbr; *(here->BSIM4v6GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); *(here->BSIM4v6GPbpPtr +1) += m * xcgbbr; } else { *(here->BSIM4v6GPgpPtr +1) += m * xcggbr; *(here->BSIM4v6GPgpPtr) += m * (xcggbi + gIgtotg); *(here->BSIM4v6GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v6GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v6GPspPtr +1) += m * xcgsbr; *(here->BSIM4v6GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v6GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v6GPbpPtr) += m * (xcgbbi + gIgtotb); } if (model->BSIM4v6rdsMod) { (*(here->BSIM4v6DgpPtr) += m * gdtotg); (*(here->BSIM4v6DspPtr) += m * gdtots); (*(here->BSIM4v6DbpPtr) += m * gdtotb); (*(here->BSIM4v6SdpPtr) += m * gstotd); (*(here->BSIM4v6SgpPtr) += m * gstotg); (*(here->BSIM4v6SbpPtr) += m * gstotb); } *(here->BSIM4v6DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); *(here->BSIM4v6DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v6gbd - gdtotd + RevSumr + gbdpdp - gIdtotd); *(here->BSIM4v6DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v6DPgpPtr +1) += m * (xcdgbr + Gmi); *(here->BSIM4v6DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); *(here->BSIM4v6DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); *(here->BSIM4v6DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); *(here->BSIM4v6DPbpPtr +1) += m * (xcdbbr + Gmbsi); *(here->BSIM4v6DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); *(here->BSIM4v6DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v6DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v6SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); *(here->BSIM4v6SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); *(here->BSIM4v6SPgpPtr +1) += m * (xcsgbr - Gmi); *(here->BSIM4v6SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); *(here->BSIM4v6SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); *(here->BSIM4v6SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v6gbs - gstots + FwdSumr + gbspsp - gIstots); *(here->BSIM4v6SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v6SPbpPtr +1) += m * (xcsbbr - Gmbsi); *(here->BSIM4v6SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); *(here->BSIM4v6SspPtr) -= m * (gspr - gstots); *(here->BSIM4v6SsPtr) += m * (gspr + gstot); *(here->BSIM4v6BPdpPtr +1) += m * xcbdb; *(here->BSIM4v6BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v6BPgpPtr +1) += m * xcbgb; *(here->BSIM4v6BPgpPtr) -= m * (here->BSIM4v6gbgs + gIbtotg); *(here->BSIM4v6BPspPtr +1) += m * xcbsb; *(here->BSIM4v6BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v6BPbpPtr +1) += m * xcbbb; *(here->BSIM4v6BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v6gbbs - gIbtotb); ggidld = here->BSIM4v6ggidld; ggidlg = here->BSIM4v6ggidlg; ggidlb = here->BSIM4v6ggidlb; ggislg = here->BSIM4v6ggislg; ggisls = here->BSIM4v6ggisls; ggislb = here->BSIM4v6ggislb; /* stamp gidl */ (*(here->BSIM4v6DPdpPtr) += m * ggidld); (*(here->BSIM4v6DPgpPtr) += m * ggidlg); (*(here->BSIM4v6DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v6DPbpPtr) += m * ggidlb); (*(here->BSIM4v6BPdpPtr) -= m * ggidld); (*(here->BSIM4v6BPgpPtr) -= m * ggidlg); (*(here->BSIM4v6BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v6BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v6SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v6SPgpPtr) += m * ggislg); (*(here->BSIM4v6SPspPtr) += m * ggisls); (*(here->BSIM4v6SPbpPtr) += m * ggislb); (*(here->BSIM4v6BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v6BPgpPtr) -= m * ggislg); (*(here->BSIM4v6BPspPtr) -= m * ggisls); (*(here->BSIM4v6BPbpPtr) -= m * ggislb); if (here->BSIM4v6rbodyMod) { (*(here->BSIM4v6DPdbPtr +1) += m * xcdbdb); (*(here->BSIM4v6DPdbPtr) -= m * here->BSIM4v6gbd); (*(here->BSIM4v6SPsbPtr +1) += m * xcsbsb); (*(here->BSIM4v6SPsbPtr) -= m * here->BSIM4v6gbs); (*(here->BSIM4v6DBdpPtr +1) += m * xcdbdb); (*(here->BSIM4v6DBdpPtr) -= m * here->BSIM4v6gbd); (*(here->BSIM4v6DBdbPtr +1) -= m * xcdbdb); (*(here->BSIM4v6DBdbPtr) += m * (here->BSIM4v6gbd + here->BSIM4v6grbpd + here->BSIM4v6grbdb)); (*(here->BSIM4v6DBbpPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6DBbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BPdbPtr) -= m * here->BSIM4v6grbpd); (*(here->BSIM4v6BPbPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BPsbPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6BPbpPtr) += m * (here->BSIM4v6grbpd + here->BSIM4v6grbps + here->BSIM4v6grbpb)); /* WDLiu: (-here->BSIM4v6gbbs) already added to BPbpPtr */ (*(here->BSIM4v6SBspPtr +1) += m * xcsbsb); (*(here->BSIM4v6SBspPtr) -= m * here->BSIM4v6gbs); (*(here->BSIM4v6SBbpPtr) -= m * here->BSIM4v6grbps); (*(here->BSIM4v6SBbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6SBsbPtr +1) -= m * xcsbsb); (*(here->BSIM4v6SBsbPtr) += m * (here->BSIM4v6gbs + here->BSIM4v6grbps + here->BSIM4v6grbsb)); (*(here->BSIM4v6BdbPtr) -= m * here->BSIM4v6grbdb); (*(here->BSIM4v6BbpPtr) -= m * here->BSIM4v6grbpb); (*(here->BSIM4v6BsbPtr) -= m * here->BSIM4v6grbsb); (*(here->BSIM4v6BbPtr) += m * (here->BSIM4v6grbsb + here->BSIM4v6grbdb + here->BSIM4v6grbpb)); } /* * WDLiu: The internal charge node generated for transient NQS is not needed for * AC NQS. The following is not doing a real job, but we have to keep it; * otherwise a singular AC NQS matrix may occur if the transient NQS is on. * The charge node is isolated from the instance. */ if (here->BSIM4v6trnqsMod) { (*(here->BSIM4v6QqPtr) += m * 1.0); (*(here->BSIM4v6QgpPtr) += 0.0); (*(here->BSIM4v6QdpPtr) += 0.0); (*(here->BSIM4v6QspPtr) += 0.0); (*(here->BSIM4v6QbpPtr) += 0.0); (*(here->BSIM4v6DPqPtr) += 0.0); (*(here->BSIM4v6SPqPtr) += 0.0); (*(here->BSIM4v6GPqPtr) += 0.0); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6soachk.c0000644000265600020320000000730412264261473021650 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BSIM4v6soaCheck(CKTcircuit *ckt, GENmodel *inModel) { BSIM4v6model *model = (BSIM4v6model *) inModel; BSIM4v6instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->BSIM4v6gNodePrime] - ckt->CKTrhsOld [here->BSIM4v6sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->BSIM4v6gNodePrime] - ckt->CKTrhsOld [here->BSIM4v6dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->BSIM4v6gNodePrime] - ckt->CKTrhsOld [here->BSIM4v6bNodePrime]); vds = fabs(ckt->CKTrhsOld [here->BSIM4v6dNodePrime] - ckt->CKTrhsOld [here->BSIM4v6sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->BSIM4v6bNodePrime] - ckt->CKTrhsOld [here->BSIM4v6sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->BSIM4v6bNodePrime] - ckt->CKTrhsOld [here->BSIM4v6dNodePrime]); if (vgs > model->BSIM4v6vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->BSIM4v6vgsMax); warns_vgs++; } if (vgd > model->BSIM4v6vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->BSIM4v6vgdMax); warns_vgd++; } if (vgb > model->BSIM4v6vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->BSIM4v6vgbMax); warns_vgb++; } if (vds > model->BSIM4v6vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->BSIM4v6vdsMax); warns_vds++; } if (vbs > model->BSIM4v6vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->BSIM4v6vbsMax); warns_vbs++; } if (vbd > model->BSIM4v6vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->BSIM4v6vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/bsim4v6/b4v6mpar.c0000644000265600020320000035756312264261473021356 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mpar.c of BSIM4.6.1. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/const.h" int BSIM4v6mParam( int param, IFvalue *value, GENmodel *inMod) { BSIM4v6model *mod = (BSIM4v6model*)inMod; switch(param) { case BSIM4v6_MOD_MOBMOD : mod->BSIM4v6mobMod = value->iValue; mod->BSIM4v6mobModGiven = TRUE; break; case BSIM4v6_MOD_BINUNIT : mod->BSIM4v6binUnit = value->iValue; mod->BSIM4v6binUnitGiven = TRUE; break; case BSIM4v6_MOD_PARAMCHK : mod->BSIM4v6paramChk = value->iValue; mod->BSIM4v6paramChkGiven = TRUE; break; case BSIM4v6_MOD_CVCHARGEMOD : mod->BSIM4v6cvchargeMod = value->iValue; mod->BSIM4v6cvchargeModGiven = TRUE; break; case BSIM4v6_MOD_CAPMOD : mod->BSIM4v6capMod = value->iValue; mod->BSIM4v6capModGiven = TRUE; break; case BSIM4v6_MOD_DIOMOD : mod->BSIM4v6dioMod = value->iValue; mod->BSIM4v6dioModGiven = TRUE; break; case BSIM4v6_MOD_RDSMOD : mod->BSIM4v6rdsMod = value->iValue; mod->BSIM4v6rdsModGiven = TRUE; break; case BSIM4v6_MOD_TRNQSMOD : mod->BSIM4v6trnqsMod = value->iValue; mod->BSIM4v6trnqsModGiven = TRUE; break; case BSIM4v6_MOD_ACNQSMOD : mod->BSIM4v6acnqsMod = value->iValue; mod->BSIM4v6acnqsModGiven = TRUE; break; case BSIM4v6_MOD_RBODYMOD : mod->BSIM4v6rbodyMod = value->iValue; mod->BSIM4v6rbodyModGiven = TRUE; break; case BSIM4v6_MOD_RGATEMOD : mod->BSIM4v6rgateMod = value->iValue; mod->BSIM4v6rgateModGiven = TRUE; break; case BSIM4v6_MOD_PERMOD : mod->BSIM4v6perMod = value->iValue; mod->BSIM4v6perModGiven = TRUE; break; case BSIM4v6_MOD_GEOMOD : mod->BSIM4v6geoMod = value->iValue; mod->BSIM4v6geoModGiven = TRUE; break; case BSIM4v6_MOD_RGEOMOD : mod->BSIM4v6rgeoMod = value->iValue; mod->BSIM4v6rgeoModGiven = TRUE; break; case BSIM4v6_MOD_FNOIMOD : mod->BSIM4v6fnoiMod = value->iValue; mod->BSIM4v6fnoiModGiven = TRUE; break; case BSIM4v6_MOD_TNOIMOD : mod->BSIM4v6tnoiMod = value->iValue; mod->BSIM4v6tnoiModGiven = TRUE; break; case BSIM4v6_MOD_MTRLMOD : mod->BSIM4v6mtrlMod = value->iValue; mod->BSIM4v6mtrlModGiven = TRUE; break; case BSIM4v6_MOD_IGCMOD : mod->BSIM4v6igcMod = value->iValue; mod->BSIM4v6igcModGiven = TRUE; break; case BSIM4v6_MOD_IGBMOD : mod->BSIM4v6igbMod = value->iValue; mod->BSIM4v6igbModGiven = TRUE; break; case BSIM4v6_MOD_TEMPMOD : mod->BSIM4v6tempMod = value->iValue; mod->BSIM4v6tempModGiven = TRUE; break; case BSIM4v6_MOD_VERSION : mod->BSIM4v6version = value->sValue; mod->BSIM4v6versionGiven = TRUE; break; case BSIM4v6_MOD_TOXREF : mod->BSIM4v6toxref = value->rValue; mod->BSIM4v6toxrefGiven = TRUE; break; case BSIM4v6_MOD_EOT : mod->BSIM4v6eot = value->rValue; mod->BSIM4v6eotGiven = TRUE; break; case BSIM4v6_MOD_VDDEOT : mod->BSIM4v6vddeot = value->rValue; mod->BSIM4v6vddeotGiven = TRUE; break; case BSIM4v6_MOD_TEMPEOT : mod->BSIM4v6tempeot = value->rValue; mod->BSIM4v6tempeotGiven = TRUE; break; case BSIM4v6_MOD_LEFFEOT : mod->BSIM4v6leffeot = value->rValue; mod->BSIM4v6leffeotGiven = TRUE; break; case BSIM4v6_MOD_WEFFEOT : mod->BSIM4v6weffeot = value->rValue; mod->BSIM4v6weffeotGiven = TRUE; break; case BSIM4v6_MOD_ADOS : mod->BSIM4v6ados = value->rValue; mod->BSIM4v6adosGiven = TRUE; break; case BSIM4v6_MOD_BDOS : mod->BSIM4v6bdos = value->rValue; mod->BSIM4v6bdosGiven = TRUE; break; case BSIM4v6_MOD_TOXE : mod->BSIM4v6toxe = value->rValue; mod->BSIM4v6toxeGiven = TRUE; break; case BSIM4v6_MOD_TOXP : mod->BSIM4v6toxp = value->rValue; mod->BSIM4v6toxpGiven = TRUE; break; case BSIM4v6_MOD_TOXM : mod->BSIM4v6toxm = value->rValue; mod->BSIM4v6toxmGiven = TRUE; break; case BSIM4v6_MOD_DTOX : mod->BSIM4v6dtox = value->rValue; mod->BSIM4v6dtoxGiven = TRUE; break; case BSIM4v6_MOD_EPSROX : mod->BSIM4v6epsrox = value->rValue; mod->BSIM4v6epsroxGiven = TRUE; break; case BSIM4v6_MOD_CDSC : mod->BSIM4v6cdsc = value->rValue; mod->BSIM4v6cdscGiven = TRUE; break; case BSIM4v6_MOD_CDSCB : mod->BSIM4v6cdscb = value->rValue; mod->BSIM4v6cdscbGiven = TRUE; break; case BSIM4v6_MOD_CDSCD : mod->BSIM4v6cdscd = value->rValue; mod->BSIM4v6cdscdGiven = TRUE; break; case BSIM4v6_MOD_CIT : mod->BSIM4v6cit = value->rValue; mod->BSIM4v6citGiven = TRUE; break; case BSIM4v6_MOD_NFACTOR : mod->BSIM4v6nfactor = value->rValue; mod->BSIM4v6nfactorGiven = TRUE; break; case BSIM4v6_MOD_XJ: mod->BSIM4v6xj = value->rValue; mod->BSIM4v6xjGiven = TRUE; break; case BSIM4v6_MOD_VSAT: mod->BSIM4v6vsat = value->rValue; mod->BSIM4v6vsatGiven = TRUE; break; case BSIM4v6_MOD_A0: mod->BSIM4v6a0 = value->rValue; mod->BSIM4v6a0Given = TRUE; break; case BSIM4v6_MOD_AGS: mod->BSIM4v6ags= value->rValue; mod->BSIM4v6agsGiven = TRUE; break; case BSIM4v6_MOD_A1: mod->BSIM4v6a1 = value->rValue; mod->BSIM4v6a1Given = TRUE; break; case BSIM4v6_MOD_A2: mod->BSIM4v6a2 = value->rValue; mod->BSIM4v6a2Given = TRUE; break; case BSIM4v6_MOD_AT: mod->BSIM4v6at = value->rValue; mod->BSIM4v6atGiven = TRUE; break; case BSIM4v6_MOD_KETA: mod->BSIM4v6keta = value->rValue; mod->BSIM4v6ketaGiven = TRUE; break; case BSIM4v6_MOD_NSUB: mod->BSIM4v6nsub = value->rValue; mod->BSIM4v6nsubGiven = TRUE; break; case BSIM4v6_MOD_PHIG: mod->BSIM4v6phig = value->rValue; mod->BSIM4v6phigGiven = TRUE; break; case BSIM4v6_MOD_EPSRGATE: mod->BSIM4v6epsrgate = value->rValue; mod->BSIM4v6epsrgateGiven = TRUE; break; case BSIM4v6_MOD_EASUB: mod->BSIM4v6easub = value->rValue; mod->BSIM4v6easubGiven = TRUE; break; case BSIM4v6_MOD_EPSRSUB: mod->BSIM4v6epsrsub = value->rValue; mod->BSIM4v6epsrsubGiven = TRUE; break; case BSIM4v6_MOD_NI0SUB: mod->BSIM4v6ni0sub = value->rValue; mod->BSIM4v6ni0subGiven = TRUE; break; case BSIM4v6_MOD_BG0SUB: mod->BSIM4v6bg0sub = value->rValue; mod->BSIM4v6bg0subGiven = TRUE; break; case BSIM4v6_MOD_TBGASUB: mod->BSIM4v6tbgasub = value->rValue; mod->BSIM4v6tbgasubGiven = TRUE; break; case BSIM4v6_MOD_TBGBSUB: mod->BSIM4v6tbgbsub = value->rValue; mod->BSIM4v6tbgbsubGiven = TRUE; break; case BSIM4v6_MOD_NDEP: mod->BSIM4v6ndep = value->rValue; mod->BSIM4v6ndepGiven = TRUE; if (mod->BSIM4v6ndep > 1.0e20) mod->BSIM4v6ndep *= 1.0e-6; break; case BSIM4v6_MOD_NSD: mod->BSIM4v6nsd = value->rValue; mod->BSIM4v6nsdGiven = TRUE; if (mod->BSIM4v6nsd > 1.0e23) mod->BSIM4v6nsd *= 1.0e-6; break; case BSIM4v6_MOD_NGATE: mod->BSIM4v6ngate = value->rValue; mod->BSIM4v6ngateGiven = TRUE; if (mod->BSIM4v6ngate > 1.0e23) mod->BSIM4v6ngate *= 1.0e-6; break; case BSIM4v6_MOD_GAMMA1: mod->BSIM4v6gamma1 = value->rValue; mod->BSIM4v6gamma1Given = TRUE; break; case BSIM4v6_MOD_GAMMA2: mod->BSIM4v6gamma2 = value->rValue; mod->BSIM4v6gamma2Given = TRUE; break; case BSIM4v6_MOD_VBX: mod->BSIM4v6vbx = value->rValue; mod->BSIM4v6vbxGiven = TRUE; break; case BSIM4v6_MOD_VBM: mod->BSIM4v6vbm = value->rValue; mod->BSIM4v6vbmGiven = TRUE; break; case BSIM4v6_MOD_XT: mod->BSIM4v6xt = value->rValue; mod->BSIM4v6xtGiven = TRUE; break; case BSIM4v6_MOD_K1: mod->BSIM4v6k1 = value->rValue; mod->BSIM4v6k1Given = TRUE; break; case BSIM4v6_MOD_KT1: mod->BSIM4v6kt1 = value->rValue; mod->BSIM4v6kt1Given = TRUE; break; case BSIM4v6_MOD_KT1L: mod->BSIM4v6kt1l = value->rValue; mod->BSIM4v6kt1lGiven = TRUE; break; case BSIM4v6_MOD_KT2: mod->BSIM4v6kt2 = value->rValue; mod->BSIM4v6kt2Given = TRUE; break; case BSIM4v6_MOD_K2: mod->BSIM4v6k2 = value->rValue; mod->BSIM4v6k2Given = TRUE; break; case BSIM4v6_MOD_K3: mod->BSIM4v6k3 = value->rValue; mod->BSIM4v6k3Given = TRUE; break; case BSIM4v6_MOD_K3B: mod->BSIM4v6k3b = value->rValue; mod->BSIM4v6k3bGiven = TRUE; break; case BSIM4v6_MOD_LPE0: mod->BSIM4v6lpe0 = value->rValue; mod->BSIM4v6lpe0Given = TRUE; break; case BSIM4v6_MOD_LPEB: mod->BSIM4v6lpeb = value->rValue; mod->BSIM4v6lpebGiven = TRUE; break; case BSIM4v6_MOD_DVTP0: mod->BSIM4v6dvtp0 = value->rValue; mod->BSIM4v6dvtp0Given = TRUE; break; case BSIM4v6_MOD_DVTP1: mod->BSIM4v6dvtp1 = value->rValue; mod->BSIM4v6dvtp1Given = TRUE; break; case BSIM4v6_MOD_W0: mod->BSIM4v6w0 = value->rValue; mod->BSIM4v6w0Given = TRUE; break; case BSIM4v6_MOD_DVT0: mod->BSIM4v6dvt0 = value->rValue; mod->BSIM4v6dvt0Given = TRUE; break; case BSIM4v6_MOD_DVT1: mod->BSIM4v6dvt1 = value->rValue; mod->BSIM4v6dvt1Given = TRUE; break; case BSIM4v6_MOD_DVT2: mod->BSIM4v6dvt2 = value->rValue; mod->BSIM4v6dvt2Given = TRUE; break; case BSIM4v6_MOD_DVT0W: mod->BSIM4v6dvt0w = value->rValue; mod->BSIM4v6dvt0wGiven = TRUE; break; case BSIM4v6_MOD_DVT1W: mod->BSIM4v6dvt1w = value->rValue; mod->BSIM4v6dvt1wGiven = TRUE; break; case BSIM4v6_MOD_DVT2W: mod->BSIM4v6dvt2w = value->rValue; mod->BSIM4v6dvt2wGiven = TRUE; break; case BSIM4v6_MOD_DROUT: mod->BSIM4v6drout = value->rValue; mod->BSIM4v6droutGiven = TRUE; break; case BSIM4v6_MOD_DSUB: mod->BSIM4v6dsub = value->rValue; mod->BSIM4v6dsubGiven = TRUE; break; case BSIM4v6_MOD_VTH0: mod->BSIM4v6vth0 = value->rValue; mod->BSIM4v6vth0Given = TRUE; break; case BSIM4v6_MOD_EU: mod->BSIM4v6eu = value->rValue; mod->BSIM4v6euGiven = TRUE; break; case BSIM4v6_MOD_UCS: mod->BSIM4v6ucs = value->rValue; mod->BSIM4v6ucsGiven = TRUE; break; case BSIM4v6_MOD_UA: mod->BSIM4v6ua = value->rValue; mod->BSIM4v6uaGiven = TRUE; break; case BSIM4v6_MOD_UA1: mod->BSIM4v6ua1 = value->rValue; mod->BSIM4v6ua1Given = TRUE; break; case BSIM4v6_MOD_UB: mod->BSIM4v6ub = value->rValue; mod->BSIM4v6ubGiven = TRUE; break; case BSIM4v6_MOD_UB1: mod->BSIM4v6ub1 = value->rValue; mod->BSIM4v6ub1Given = TRUE; break; case BSIM4v6_MOD_UC: mod->BSIM4v6uc = value->rValue; mod->BSIM4v6ucGiven = TRUE; break; case BSIM4v6_MOD_UC1: mod->BSIM4v6uc1 = value->rValue; mod->BSIM4v6uc1Given = TRUE; break; case BSIM4v6_MOD_U0 : mod->BSIM4v6u0 = value->rValue; mod->BSIM4v6u0Given = TRUE; break; case BSIM4v6_MOD_UTE : mod->BSIM4v6ute = value->rValue; mod->BSIM4v6uteGiven = TRUE; break; case BSIM4v6_MOD_UCSTE : mod->BSIM4v6ucste = value->rValue; mod->BSIM4v6ucsteGiven = TRUE; break; case BSIM4v6_MOD_UD: mod->BSIM4v6ud = value->rValue; mod->BSIM4v6udGiven = TRUE; break; case BSIM4v6_MOD_UD1: mod->BSIM4v6ud1 = value->rValue; mod->BSIM4v6ud1Given = TRUE; break; case BSIM4v6_MOD_UP: mod->BSIM4v6up = value->rValue; mod->BSIM4v6upGiven = TRUE; break; case BSIM4v6_MOD_LP: mod->BSIM4v6lp = value->rValue; mod->BSIM4v6lpGiven = TRUE; break; case BSIM4v6_MOD_LUD: mod->BSIM4v6lud = value->rValue; mod->BSIM4v6ludGiven = TRUE; break; case BSIM4v6_MOD_LUD1: mod->BSIM4v6lud1 = value->rValue; mod->BSIM4v6lud1Given = TRUE; break; case BSIM4v6_MOD_LUP: mod->BSIM4v6lup = value->rValue; mod->BSIM4v6lupGiven = TRUE; break; case BSIM4v6_MOD_LLP: mod->BSIM4v6llp = value->rValue; mod->BSIM4v6llpGiven = TRUE; break; case BSIM4v6_MOD_WUD: mod->BSIM4v6wud = value->rValue; mod->BSIM4v6wudGiven = TRUE; break; case BSIM4v6_MOD_WUD1: mod->BSIM4v6wud1 = value->rValue; mod->BSIM4v6wud1Given = TRUE; break; case BSIM4v6_MOD_WUP: mod->BSIM4v6wup = value->rValue; mod->BSIM4v6wupGiven = TRUE; break; case BSIM4v6_MOD_WLP: mod->BSIM4v6wlp = value->rValue; mod->BSIM4v6wlpGiven = TRUE; break; case BSIM4v6_MOD_PUD: mod->BSIM4v6pud = value->rValue; mod->BSIM4v6pudGiven = TRUE; break; case BSIM4v6_MOD_PUD1: mod->BSIM4v6pud1 = value->rValue; mod->BSIM4v6pud1Given = TRUE; break; case BSIM4v6_MOD_PUP: mod->BSIM4v6pup = value->rValue; mod->BSIM4v6pupGiven = TRUE; break; case BSIM4v6_MOD_PLP: mod->BSIM4v6plp = value->rValue; mod->BSIM4v6plpGiven = TRUE; break; case BSIM4v6_MOD_VOFF: mod->BSIM4v6voff = value->rValue; mod->BSIM4v6voffGiven = TRUE; break; case BSIM4v6_MOD_TVOFF: mod->BSIM4v6tvoff = value->rValue; mod->BSIM4v6tvoffGiven = TRUE; break; case BSIM4v6_MOD_VOFFL: mod->BSIM4v6voffl = value->rValue; mod->BSIM4v6vofflGiven = TRUE; break; case BSIM4v6_MOD_VOFFCVL: mod->BSIM4v6voffcvl = value->rValue; mod->BSIM4v6voffcvlGiven = TRUE; break; case BSIM4v6_MOD_MINV: mod->BSIM4v6minv = value->rValue; mod->BSIM4v6minvGiven = TRUE; break; case BSIM4v6_MOD_MINVCV: mod->BSIM4v6minvcv = value->rValue; mod->BSIM4v6minvcvGiven = TRUE; break; case BSIM4v6_MOD_FPROUT: mod->BSIM4v6fprout = value->rValue; mod->BSIM4v6fproutGiven = TRUE; break; case BSIM4v6_MOD_PDITS: mod->BSIM4v6pdits = value->rValue; mod->BSIM4v6pditsGiven = TRUE; break; case BSIM4v6_MOD_PDITSD: mod->BSIM4v6pditsd = value->rValue; mod->BSIM4v6pditsdGiven = TRUE; break; case BSIM4v6_MOD_PDITSL: mod->BSIM4v6pditsl = value->rValue; mod->BSIM4v6pditslGiven = TRUE; break; case BSIM4v6_MOD_DELTA : mod->BSIM4v6delta = value->rValue; mod->BSIM4v6deltaGiven = TRUE; break; case BSIM4v6_MOD_RDSW: mod->BSIM4v6rdsw = value->rValue; mod->BSIM4v6rdswGiven = TRUE; break; case BSIM4v6_MOD_RDSWMIN: mod->BSIM4v6rdswmin = value->rValue; mod->BSIM4v6rdswminGiven = TRUE; break; case BSIM4v6_MOD_RDWMIN: mod->BSIM4v6rdwmin = value->rValue; mod->BSIM4v6rdwminGiven = TRUE; break; case BSIM4v6_MOD_RSWMIN: mod->BSIM4v6rswmin = value->rValue; mod->BSIM4v6rswminGiven = TRUE; break; case BSIM4v6_MOD_RDW: mod->BSIM4v6rdw = value->rValue; mod->BSIM4v6rdwGiven = TRUE; break; case BSIM4v6_MOD_RSW: mod->BSIM4v6rsw = value->rValue; mod->BSIM4v6rswGiven = TRUE; break; case BSIM4v6_MOD_PRWG: mod->BSIM4v6prwg = value->rValue; mod->BSIM4v6prwgGiven = TRUE; break; case BSIM4v6_MOD_PRWB: mod->BSIM4v6prwb = value->rValue; mod->BSIM4v6prwbGiven = TRUE; break; case BSIM4v6_MOD_PRT: mod->BSIM4v6prt = value->rValue; mod->BSIM4v6prtGiven = TRUE; break; case BSIM4v6_MOD_ETA0: mod->BSIM4v6eta0 = value->rValue; mod->BSIM4v6eta0Given = TRUE; break; case BSIM4v6_MOD_ETAB: mod->BSIM4v6etab = value->rValue; mod->BSIM4v6etabGiven = TRUE; break; case BSIM4v6_MOD_PCLM: mod->BSIM4v6pclm = value->rValue; mod->BSIM4v6pclmGiven = TRUE; break; case BSIM4v6_MOD_PDIBL1: mod->BSIM4v6pdibl1 = value->rValue; mod->BSIM4v6pdibl1Given = TRUE; break; case BSIM4v6_MOD_PDIBL2: mod->BSIM4v6pdibl2 = value->rValue; mod->BSIM4v6pdibl2Given = TRUE; break; case BSIM4v6_MOD_PDIBLB: mod->BSIM4v6pdiblb = value->rValue; mod->BSIM4v6pdiblbGiven = TRUE; break; case BSIM4v6_MOD_PSCBE1: mod->BSIM4v6pscbe1 = value->rValue; mod->BSIM4v6pscbe1Given = TRUE; break; case BSIM4v6_MOD_PSCBE2: mod->BSIM4v6pscbe2 = value->rValue; mod->BSIM4v6pscbe2Given = TRUE; break; case BSIM4v6_MOD_PVAG: mod->BSIM4v6pvag = value->rValue; mod->BSIM4v6pvagGiven = TRUE; break; case BSIM4v6_MOD_WR : mod->BSIM4v6wr = value->rValue; mod->BSIM4v6wrGiven = TRUE; break; case BSIM4v6_MOD_DWG : mod->BSIM4v6dwg = value->rValue; mod->BSIM4v6dwgGiven = TRUE; break; case BSIM4v6_MOD_DWB : mod->BSIM4v6dwb = value->rValue; mod->BSIM4v6dwbGiven = TRUE; break; case BSIM4v6_MOD_B0 : mod->BSIM4v6b0 = value->rValue; mod->BSIM4v6b0Given = TRUE; break; case BSIM4v6_MOD_B1 : mod->BSIM4v6b1 = value->rValue; mod->BSIM4v6b1Given = TRUE; break; case BSIM4v6_MOD_ALPHA0 : mod->BSIM4v6alpha0 = value->rValue; mod->BSIM4v6alpha0Given = TRUE; break; case BSIM4v6_MOD_ALPHA1 : mod->BSIM4v6alpha1 = value->rValue; mod->BSIM4v6alpha1Given = TRUE; break; case BSIM4v6_MOD_PHIN : mod->BSIM4v6phin = value->rValue; mod->BSIM4v6phinGiven = TRUE; break; case BSIM4v6_MOD_AGIDL : mod->BSIM4v6agidl = value->rValue; mod->BSIM4v6agidlGiven = TRUE; break; case BSIM4v6_MOD_BGIDL : mod->BSIM4v6bgidl = value->rValue; mod->BSIM4v6bgidlGiven = TRUE; break; case BSIM4v6_MOD_CGIDL : mod->BSIM4v6cgidl = value->rValue; mod->BSIM4v6cgidlGiven = TRUE; break; case BSIM4v6_MOD_EGIDL : mod->BSIM4v6egidl = value->rValue; mod->BSIM4v6egidlGiven = TRUE; break; case BSIM4v6_MOD_AGISL : mod->BSIM4v6agisl = value->rValue; mod->BSIM4v6agislGiven = TRUE; break; case BSIM4v6_MOD_BGISL : mod->BSIM4v6bgisl = value->rValue; mod->BSIM4v6bgislGiven = TRUE; break; case BSIM4v6_MOD_CGISL : mod->BSIM4v6cgisl = value->rValue; mod->BSIM4v6cgislGiven = TRUE; break; case BSIM4v6_MOD_EGISL : mod->BSIM4v6egisl = value->rValue; mod->BSIM4v6egislGiven = TRUE; break; case BSIM4v6_MOD_AIGC : mod->BSIM4v6aigc = value->rValue; mod->BSIM4v6aigcGiven = TRUE; break; case BSIM4v6_MOD_BIGC : mod->BSIM4v6bigc = value->rValue; mod->BSIM4v6bigcGiven = TRUE; break; case BSIM4v6_MOD_CIGC : mod->BSIM4v6cigc = value->rValue; mod->BSIM4v6cigcGiven = TRUE; break; case BSIM4v6_MOD_AIGSD : mod->BSIM4v6aigsd = value->rValue; mod->BSIM4v6aigsdGiven = TRUE; break; case BSIM4v6_MOD_BIGSD : mod->BSIM4v6bigsd = value->rValue; mod->BSIM4v6bigsdGiven = TRUE; break; case BSIM4v6_MOD_CIGSD : mod->BSIM4v6cigsd = value->rValue; mod->BSIM4v6cigsdGiven = TRUE; break; case BSIM4v6_MOD_AIGS : mod->BSIM4v6aigs = value->rValue; mod->BSIM4v6aigsGiven = TRUE; break; case BSIM4v6_MOD_BIGS : mod->BSIM4v6bigs = value->rValue; mod->BSIM4v6bigsGiven = TRUE; break; case BSIM4v6_MOD_CIGS : mod->BSIM4v6cigs = value->rValue; mod->BSIM4v6cigsGiven = TRUE; break; case BSIM4v6_MOD_AIGD : mod->BSIM4v6aigd = value->rValue; mod->BSIM4v6aigdGiven = TRUE; break; case BSIM4v6_MOD_BIGD : mod->BSIM4v6bigd = value->rValue; mod->BSIM4v6bigdGiven = TRUE; break; case BSIM4v6_MOD_CIGD : mod->BSIM4v6cigd = value->rValue; mod->BSIM4v6cigdGiven = TRUE; break; case BSIM4v6_MOD_AIGBACC : mod->BSIM4v6aigbacc = value->rValue; mod->BSIM4v6aigbaccGiven = TRUE; break; case BSIM4v6_MOD_BIGBACC : mod->BSIM4v6bigbacc = value->rValue; mod->BSIM4v6bigbaccGiven = TRUE; break; case BSIM4v6_MOD_CIGBACC : mod->BSIM4v6cigbacc = value->rValue; mod->BSIM4v6cigbaccGiven = TRUE; break; case BSIM4v6_MOD_AIGBINV : mod->BSIM4v6aigbinv = value->rValue; mod->BSIM4v6aigbinvGiven = TRUE; break; case BSIM4v6_MOD_BIGBINV : mod->BSIM4v6bigbinv = value->rValue; mod->BSIM4v6bigbinvGiven = TRUE; break; case BSIM4v6_MOD_CIGBINV : mod->BSIM4v6cigbinv = value->rValue; mod->BSIM4v6cigbinvGiven = TRUE; break; case BSIM4v6_MOD_NIGC : mod->BSIM4v6nigc = value->rValue; mod->BSIM4v6nigcGiven = TRUE; break; case BSIM4v6_MOD_NIGBINV : mod->BSIM4v6nigbinv = value->rValue; mod->BSIM4v6nigbinvGiven = TRUE; break; case BSIM4v6_MOD_NIGBACC : mod->BSIM4v6nigbacc = value->rValue; mod->BSIM4v6nigbaccGiven = TRUE; break; case BSIM4v6_MOD_NTOX : mod->BSIM4v6ntox = value->rValue; mod->BSIM4v6ntoxGiven = TRUE; break; case BSIM4v6_MOD_EIGBINV : mod->BSIM4v6eigbinv = value->rValue; mod->BSIM4v6eigbinvGiven = TRUE; break; case BSIM4v6_MOD_PIGCD : mod->BSIM4v6pigcd = value->rValue; mod->BSIM4v6pigcdGiven = TRUE; break; case BSIM4v6_MOD_POXEDGE : mod->BSIM4v6poxedge = value->rValue; mod->BSIM4v6poxedgeGiven = TRUE; break; case BSIM4v6_MOD_XRCRG1 : mod->BSIM4v6xrcrg1 = value->rValue; mod->BSIM4v6xrcrg1Given = TRUE; break; case BSIM4v6_MOD_XRCRG2 : mod->BSIM4v6xrcrg2 = value->rValue; mod->BSIM4v6xrcrg2Given = TRUE; break; case BSIM4v6_MOD_LAMBDA : mod->BSIM4v6lambda = value->rValue; mod->BSIM4v6lambdaGiven = TRUE; break; case BSIM4v6_MOD_VTL : mod->BSIM4v6vtl = value->rValue; mod->BSIM4v6vtlGiven = TRUE; break; case BSIM4v6_MOD_XN: mod->BSIM4v6xn = value->rValue; mod->BSIM4v6xnGiven = TRUE; break; case BSIM4v6_MOD_LC: mod->BSIM4v6lc = value->rValue; mod->BSIM4v6lcGiven = TRUE; break; case BSIM4v6_MOD_TNOIA : mod->BSIM4v6tnoia = value->rValue; mod->BSIM4v6tnoiaGiven = TRUE; break; case BSIM4v6_MOD_TNOIB : mod->BSIM4v6tnoib = value->rValue; mod->BSIM4v6tnoibGiven = TRUE; break; case BSIM4v6_MOD_RNOIA : mod->BSIM4v6rnoia = value->rValue; mod->BSIM4v6rnoiaGiven = TRUE; break; case BSIM4v6_MOD_RNOIB : mod->BSIM4v6rnoib = value->rValue; mod->BSIM4v6rnoibGiven = TRUE; break; case BSIM4v6_MOD_NTNOI : mod->BSIM4v6ntnoi = value->rValue; mod->BSIM4v6ntnoiGiven = TRUE; break; case BSIM4v6_MOD_VFBSDOFF: mod->BSIM4v6vfbsdoff = value->rValue; mod->BSIM4v6vfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_TVFBSDOFF: mod->BSIM4v6tvfbsdoff = value->rValue; mod->BSIM4v6tvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_LINTNOI: mod->BSIM4v6lintnoi = value->rValue; mod->BSIM4v6lintnoiGiven = TRUE; break; /* stress effect */ case BSIM4v6_MOD_SAREF : mod->BSIM4v6saref = value->rValue; mod->BSIM4v6sarefGiven = TRUE; break; case BSIM4v6_MOD_SBREF : mod->BSIM4v6sbref = value->rValue; mod->BSIM4v6sbrefGiven = TRUE; break; case BSIM4v6_MOD_WLOD : mod->BSIM4v6wlod = value->rValue; mod->BSIM4v6wlodGiven = TRUE; break; case BSIM4v6_MOD_KU0 : mod->BSIM4v6ku0 = value->rValue; mod->BSIM4v6ku0Given = TRUE; break; case BSIM4v6_MOD_KVSAT : mod->BSIM4v6kvsat = value->rValue; mod->BSIM4v6kvsatGiven = TRUE; break; case BSIM4v6_MOD_KVTH0 : mod->BSIM4v6kvth0 = value->rValue; mod->BSIM4v6kvth0Given = TRUE; break; case BSIM4v6_MOD_TKU0 : mod->BSIM4v6tku0 = value->rValue; mod->BSIM4v6tku0Given = TRUE; break; case BSIM4v6_MOD_LLODKU0 : mod->BSIM4v6llodku0 = value->rValue; mod->BSIM4v6llodku0Given = TRUE; break; case BSIM4v6_MOD_WLODKU0 : mod->BSIM4v6wlodku0 = value->rValue; mod->BSIM4v6wlodku0Given = TRUE; break; case BSIM4v6_MOD_LLODVTH : mod->BSIM4v6llodvth = value->rValue; mod->BSIM4v6llodvthGiven = TRUE; break; case BSIM4v6_MOD_WLODVTH : mod->BSIM4v6wlodvth = value->rValue; mod->BSIM4v6wlodvthGiven = TRUE; break; case BSIM4v6_MOD_LKU0 : mod->BSIM4v6lku0 = value->rValue; mod->BSIM4v6lku0Given = TRUE; break; case BSIM4v6_MOD_WKU0 : mod->BSIM4v6wku0 = value->rValue; mod->BSIM4v6wku0Given = TRUE; break; case BSIM4v6_MOD_PKU0 : mod->BSIM4v6pku0 = value->rValue; mod->BSIM4v6pku0Given = TRUE; break; case BSIM4v6_MOD_LKVTH0 : mod->BSIM4v6lkvth0 = value->rValue; mod->BSIM4v6lkvth0Given = TRUE; break; case BSIM4v6_MOD_WKVTH0 : mod->BSIM4v6wkvth0 = value->rValue; mod->BSIM4v6wkvth0Given = TRUE; break; case BSIM4v6_MOD_PKVTH0 : mod->BSIM4v6pkvth0 = value->rValue; mod->BSIM4v6pkvth0Given = TRUE; break; case BSIM4v6_MOD_STK2 : mod->BSIM4v6stk2 = value->rValue; mod->BSIM4v6stk2Given = TRUE; break; case BSIM4v6_MOD_LODK2 : mod->BSIM4v6lodk2 = value->rValue; mod->BSIM4v6lodk2Given = TRUE; break; case BSIM4v6_MOD_STETA0 : mod->BSIM4v6steta0 = value->rValue; mod->BSIM4v6steta0Given = TRUE; break; case BSIM4v6_MOD_LODETA0 : mod->BSIM4v6lodeta0 = value->rValue; mod->BSIM4v6lodeta0Given = TRUE; break; case BSIM4v6_MOD_WEB : mod->BSIM4v6web = value->rValue; mod->BSIM4v6webGiven = TRUE; break; case BSIM4v6_MOD_WEC : mod->BSIM4v6wec = value->rValue; mod->BSIM4v6wecGiven = TRUE; break; case BSIM4v6_MOD_KVTH0WE : mod->BSIM4v6kvth0we = value->rValue; mod->BSIM4v6kvth0weGiven = TRUE; break; case BSIM4v6_MOD_K2WE : mod->BSIM4v6k2we = value->rValue; mod->BSIM4v6k2weGiven = TRUE; break; case BSIM4v6_MOD_KU0WE : mod->BSIM4v6ku0we = value->rValue; mod->BSIM4v6ku0weGiven = TRUE; break; case BSIM4v6_MOD_SCREF : mod->BSIM4v6scref = value->rValue; mod->BSIM4v6screfGiven = TRUE; break; case BSIM4v6_MOD_WPEMOD : mod->BSIM4v6wpemod = value->rValue; mod->BSIM4v6wpemodGiven = TRUE; break; case BSIM4v6_MOD_LKVTH0WE : mod->BSIM4v6lkvth0we = value->rValue; mod->BSIM4v6lkvth0weGiven = TRUE; break; case BSIM4v6_MOD_LK2WE : mod->BSIM4v6lk2we = value->rValue; mod->BSIM4v6lk2weGiven = TRUE; break; case BSIM4v6_MOD_LKU0WE : mod->BSIM4v6lku0we = value->rValue; mod->BSIM4v6lku0weGiven = TRUE; break; case BSIM4v6_MOD_WKVTH0WE : mod->BSIM4v6wkvth0we = value->rValue; mod->BSIM4v6wkvth0weGiven = TRUE; break; case BSIM4v6_MOD_WK2WE : mod->BSIM4v6wk2we = value->rValue; mod->BSIM4v6wk2weGiven = TRUE; break; case BSIM4v6_MOD_WKU0WE : mod->BSIM4v6wku0we = value->rValue; mod->BSIM4v6wku0weGiven = TRUE; break; case BSIM4v6_MOD_PKVTH0WE : mod->BSIM4v6pkvth0we = value->rValue; mod->BSIM4v6pkvth0weGiven = TRUE; break; case BSIM4v6_MOD_PK2WE : mod->BSIM4v6pk2we = value->rValue; mod->BSIM4v6pk2weGiven = TRUE; break; case BSIM4v6_MOD_PKU0WE : mod->BSIM4v6pku0we = value->rValue; mod->BSIM4v6pku0weGiven = TRUE; break; case BSIM4v6_MOD_BETA0 : mod->BSIM4v6beta0 = value->rValue; mod->BSIM4v6beta0Given = TRUE; break; case BSIM4v6_MOD_IJTHDFWD : mod->BSIM4v6ijthdfwd = value->rValue; mod->BSIM4v6ijthdfwdGiven = TRUE; break; case BSIM4v6_MOD_IJTHSFWD : mod->BSIM4v6ijthsfwd = value->rValue; mod->BSIM4v6ijthsfwdGiven = TRUE; break; case BSIM4v6_MOD_IJTHDREV : mod->BSIM4v6ijthdrev = value->rValue; mod->BSIM4v6ijthdrevGiven = TRUE; break; case BSIM4v6_MOD_IJTHSREV : mod->BSIM4v6ijthsrev = value->rValue; mod->BSIM4v6ijthsrevGiven = TRUE; break; case BSIM4v6_MOD_XJBVD : mod->BSIM4v6xjbvd = value->rValue; mod->BSIM4v6xjbvdGiven = TRUE; break; case BSIM4v6_MOD_XJBVS : mod->BSIM4v6xjbvs = value->rValue; mod->BSIM4v6xjbvsGiven = TRUE; break; case BSIM4v6_MOD_BVD : mod->BSIM4v6bvd = value->rValue; mod->BSIM4v6bvdGiven = TRUE; break; case BSIM4v6_MOD_BVS : mod->BSIM4v6bvs = value->rValue; mod->BSIM4v6bvsGiven = TRUE; break; /* reverse diode */ case BSIM4v6_MOD_JTSS : mod->BSIM4v6jtss = value->rValue; mod->BSIM4v6jtssGiven = TRUE; break; case BSIM4v6_MOD_JTSD : mod->BSIM4v6jtsd = value->rValue; mod->BSIM4v6jtsdGiven = TRUE; break; case BSIM4v6_MOD_JTSSWS : mod->BSIM4v6jtssws = value->rValue; mod->BSIM4v6jtsswsGiven = TRUE; break; case BSIM4v6_MOD_JTSSWD : mod->BSIM4v6jtsswd = value->rValue; mod->BSIM4v6jtsswdGiven = TRUE; break; case BSIM4v6_MOD_JTSSWGS : mod->BSIM4v6jtsswgs = value->rValue; mod->BSIM4v6jtsswgsGiven = TRUE; break; case BSIM4v6_MOD_JTSSWGD : mod->BSIM4v6jtsswgd = value->rValue; mod->BSIM4v6jtsswgdGiven = TRUE; break; case BSIM4v6_MOD_JTWEFF : mod->BSIM4v6jtweff = value->rValue; mod->BSIM4v6jtweffGiven = TRUE; break; case BSIM4v6_MOD_NJTS : mod->BSIM4v6njts = value->rValue; mod->BSIM4v6njtsGiven = TRUE; break; case BSIM4v6_MOD_NJTSSW : mod->BSIM4v6njtssw = value->rValue; mod->BSIM4v6njtsswGiven = TRUE; break; case BSIM4v6_MOD_NJTSSWG : mod->BSIM4v6njtsswg = value->rValue; mod->BSIM4v6njtsswgGiven = TRUE; break; case BSIM4v6_MOD_NJTSD : mod->BSIM4v6njtsd = value->rValue; mod->BSIM4v6njtsdGiven = TRUE; break; case BSIM4v6_MOD_NJTSSWD : mod->BSIM4v6njtsswd = value->rValue; mod->BSIM4v6njtsswdGiven = TRUE; break; case BSIM4v6_MOD_NJTSSWGD : mod->BSIM4v6njtsswgd = value->rValue; mod->BSIM4v6njtsswgdGiven = TRUE; break; case BSIM4v6_MOD_XTSS : mod->BSIM4v6xtss = value->rValue; mod->BSIM4v6xtssGiven = TRUE; break; case BSIM4v6_MOD_XTSD : mod->BSIM4v6xtsd = value->rValue; mod->BSIM4v6xtsdGiven = TRUE; break; case BSIM4v6_MOD_XTSSWS : mod->BSIM4v6xtssws = value->rValue; mod->BSIM4v6xtsswsGiven = TRUE; break; case BSIM4v6_MOD_XTSSWD : mod->BSIM4v6xtsswd = value->rValue; mod->BSIM4v6xtsswdGiven = TRUE; break; case BSIM4v6_MOD_XTSSWGS : mod->BSIM4v6xtsswgs = value->rValue; mod->BSIM4v6xtsswgsGiven = TRUE; break; case BSIM4v6_MOD_XTSSWGD : mod->BSIM4v6xtsswgd = value->rValue; mod->BSIM4v6xtsswgdGiven = TRUE; break; case BSIM4v6_MOD_TNJTS : mod->BSIM4v6tnjts = value->rValue; mod->BSIM4v6tnjtsGiven = TRUE; break; case BSIM4v6_MOD_TNJTSSW : mod->BSIM4v6tnjtssw = value->rValue; mod->BSIM4v6tnjtsswGiven = TRUE; break; case BSIM4v6_MOD_TNJTSSWG : mod->BSIM4v6tnjtsswg = value->rValue; mod->BSIM4v6tnjtsswgGiven = TRUE; break; case BSIM4v6_MOD_TNJTSD : mod->BSIM4v6tnjtsd = value->rValue; mod->BSIM4v6tnjtsdGiven = TRUE; break; case BSIM4v6_MOD_TNJTSSWD : mod->BSIM4v6tnjtsswd = value->rValue; mod->BSIM4v6tnjtsswdGiven = TRUE; break; case BSIM4v6_MOD_TNJTSSWGD : mod->BSIM4v6tnjtsswgd = value->rValue; mod->BSIM4v6tnjtsswgdGiven = TRUE; break; case BSIM4v6_MOD_VTSS : mod->BSIM4v6vtss = value->rValue; mod->BSIM4v6vtssGiven = TRUE; break; case BSIM4v6_MOD_VTSD : mod->BSIM4v6vtsd = value->rValue; mod->BSIM4v6vtsdGiven = TRUE; break; case BSIM4v6_MOD_VTSSWS : mod->BSIM4v6vtssws = value->rValue; mod->BSIM4v6vtsswsGiven = TRUE; break; case BSIM4v6_MOD_VTSSWD : mod->BSIM4v6vtsswd = value->rValue; mod->BSIM4v6vtsswdGiven = TRUE; break; case BSIM4v6_MOD_VTSSWGS : mod->BSIM4v6vtsswgs = value->rValue; mod->BSIM4v6vtsswgsGiven = TRUE; break; case BSIM4v6_MOD_VTSSWGD : mod->BSIM4v6vtsswgd = value->rValue; mod->BSIM4v6vtsswgdGiven = TRUE; break; case BSIM4v6_MOD_VFB : mod->BSIM4v6vfb = value->rValue; mod->BSIM4v6vfbGiven = TRUE; break; case BSIM4v6_MOD_GBMIN : mod->BSIM4v6gbmin = value->rValue; mod->BSIM4v6gbminGiven = TRUE; break; case BSIM4v6_MOD_RBDB : mod->BSIM4v6rbdb = value->rValue; mod->BSIM4v6rbdbGiven = TRUE; break; case BSIM4v6_MOD_RBPB : mod->BSIM4v6rbpb = value->rValue; mod->BSIM4v6rbpbGiven = TRUE; break; case BSIM4v6_MOD_RBSB : mod->BSIM4v6rbsb = value->rValue; mod->BSIM4v6rbsbGiven = TRUE; break; case BSIM4v6_MOD_RBPS : mod->BSIM4v6rbps = value->rValue; mod->BSIM4v6rbpsGiven = TRUE; break; case BSIM4v6_MOD_RBPD : mod->BSIM4v6rbpd = value->rValue; mod->BSIM4v6rbpdGiven = TRUE; break; case BSIM4v6_MOD_RBPS0 : mod->BSIM4v6rbps0 = value->rValue; mod->BSIM4v6rbps0Given = TRUE; break; case BSIM4v6_MOD_RBPSL : mod->BSIM4v6rbpsl = value->rValue; mod->BSIM4v6rbpslGiven = TRUE; break; case BSIM4v6_MOD_RBPSW : mod->BSIM4v6rbpsw = value->rValue; mod->BSIM4v6rbpswGiven = TRUE; break; case BSIM4v6_MOD_RBPSNF : mod->BSIM4v6rbpsnf = value->rValue; mod->BSIM4v6rbpsnfGiven = TRUE; break; case BSIM4v6_MOD_RBPD0 : mod->BSIM4v6rbpd0 = value->rValue; mod->BSIM4v6rbpd0Given = TRUE; break; case BSIM4v6_MOD_RBPDL : mod->BSIM4v6rbpdl = value->rValue; mod->BSIM4v6rbpdlGiven = TRUE; break; case BSIM4v6_MOD_RBPDW : mod->BSIM4v6rbpdw = value->rValue; mod->BSIM4v6rbpdwGiven = TRUE; break; case BSIM4v6_MOD_RBPDNF : mod->BSIM4v6rbpdnf = value->rValue; mod->BSIM4v6rbpdnfGiven = TRUE; break; case BSIM4v6_MOD_RBPBX0 : mod->BSIM4v6rbpbx0 = value->rValue; mod->BSIM4v6rbpbx0Given = TRUE; break; case BSIM4v6_MOD_RBPBXL : mod->BSIM4v6rbpbxl = value->rValue; mod->BSIM4v6rbpbxlGiven = TRUE; break; case BSIM4v6_MOD_RBPBXW : mod->BSIM4v6rbpbxw = value->rValue; mod->BSIM4v6rbpbxwGiven = TRUE; break; case BSIM4v6_MOD_RBPBXNF : mod->BSIM4v6rbpbxnf = value->rValue; mod->BSIM4v6rbpbxnfGiven = TRUE; break; case BSIM4v6_MOD_RBPBY0 : mod->BSIM4v6rbpby0 = value->rValue; mod->BSIM4v6rbpby0Given = TRUE; break; case BSIM4v6_MOD_RBPBYL : mod->BSIM4v6rbpbyl = value->rValue; mod->BSIM4v6rbpbylGiven = TRUE; break; case BSIM4v6_MOD_RBPBYW : mod->BSIM4v6rbpbyw = value->rValue; mod->BSIM4v6rbpbywGiven = TRUE; break; case BSIM4v6_MOD_RBPBYNF : mod->BSIM4v6rbpbynf = value->rValue; mod->BSIM4v6rbpbynfGiven = TRUE; break; case BSIM4v6_MOD_RBSBX0 : mod->BSIM4v6rbsbx0 = value->rValue; mod->BSIM4v6rbsbx0Given = TRUE; break; case BSIM4v6_MOD_RBSBY0 : mod->BSIM4v6rbsby0 = value->rValue; mod->BSIM4v6rbsby0Given = TRUE; break; case BSIM4v6_MOD_RBDBX0 : mod->BSIM4v6rbdbx0 = value->rValue; mod->BSIM4v6rbdbx0Given = TRUE; break; case BSIM4v6_MOD_RBDBY0 : mod->BSIM4v6rbdby0 = value->rValue; mod->BSIM4v6rbdby0Given = TRUE; break; case BSIM4v6_MOD_RBSDBXL : mod->BSIM4v6rbsdbxl = value->rValue; mod->BSIM4v6rbsdbxlGiven = TRUE; break; case BSIM4v6_MOD_RBSDBXW : mod->BSIM4v6rbsdbxw = value->rValue; mod->BSIM4v6rbsdbxwGiven = TRUE; break; case BSIM4v6_MOD_RBSDBXNF : mod->BSIM4v6rbsdbxnf = value->rValue; mod->BSIM4v6rbsdbxnfGiven = TRUE; break; case BSIM4v6_MOD_RBSDBYL : mod->BSIM4v6rbsdbyl = value->rValue; mod->BSIM4v6rbsdbylGiven = TRUE; break; case BSIM4v6_MOD_RBSDBYW : mod->BSIM4v6rbsdbyw = value->rValue; mod->BSIM4v6rbsdbywGiven = TRUE; break; case BSIM4v6_MOD_RBSDBYNF : mod->BSIM4v6rbsdbynf = value->rValue; mod->BSIM4v6rbsdbynfGiven = TRUE; break; case BSIM4v6_MOD_CGSL : mod->BSIM4v6cgsl = value->rValue; mod->BSIM4v6cgslGiven = TRUE; break; case BSIM4v6_MOD_CGDL : mod->BSIM4v6cgdl = value->rValue; mod->BSIM4v6cgdlGiven = TRUE; break; case BSIM4v6_MOD_CKAPPAS : mod->BSIM4v6ckappas = value->rValue; mod->BSIM4v6ckappasGiven = TRUE; break; case BSIM4v6_MOD_CKAPPAD : mod->BSIM4v6ckappad = value->rValue; mod->BSIM4v6ckappadGiven = TRUE; break; case BSIM4v6_MOD_CF : mod->BSIM4v6cf = value->rValue; mod->BSIM4v6cfGiven = TRUE; break; case BSIM4v6_MOD_CLC : mod->BSIM4v6clc = value->rValue; mod->BSIM4v6clcGiven = TRUE; break; case BSIM4v6_MOD_CLE : mod->BSIM4v6cle = value->rValue; mod->BSIM4v6cleGiven = TRUE; break; case BSIM4v6_MOD_DWC : mod->BSIM4v6dwc = value->rValue; mod->BSIM4v6dwcGiven = TRUE; break; case BSIM4v6_MOD_DLC : mod->BSIM4v6dlc = value->rValue; mod->BSIM4v6dlcGiven = TRUE; break; case BSIM4v6_MOD_XW : mod->BSIM4v6xw = value->rValue; mod->BSIM4v6xwGiven = TRUE; break; case BSIM4v6_MOD_XL : mod->BSIM4v6xl = value->rValue; mod->BSIM4v6xlGiven = TRUE; break; case BSIM4v6_MOD_DLCIG : mod->BSIM4v6dlcig = value->rValue; mod->BSIM4v6dlcigGiven = TRUE; break; case BSIM4v6_MOD_DLCIGD : mod->BSIM4v6dlcigd = value->rValue; mod->BSIM4v6dlcigdGiven = TRUE; break; case BSIM4v6_MOD_DWJ : mod->BSIM4v6dwj = value->rValue; mod->BSIM4v6dwjGiven = TRUE; break; case BSIM4v6_MOD_VFBCV : mod->BSIM4v6vfbcv = value->rValue; mod->BSIM4v6vfbcvGiven = TRUE; break; case BSIM4v6_MOD_ACDE : mod->BSIM4v6acde = value->rValue; mod->BSIM4v6acdeGiven = TRUE; break; case BSIM4v6_MOD_MOIN : mod->BSIM4v6moin = value->rValue; mod->BSIM4v6moinGiven = TRUE; break; case BSIM4v6_MOD_NOFF : mod->BSIM4v6noff = value->rValue; mod->BSIM4v6noffGiven = TRUE; break; case BSIM4v6_MOD_VOFFCV : mod->BSIM4v6voffcv = value->rValue; mod->BSIM4v6voffcvGiven = TRUE; break; case BSIM4v6_MOD_DMCG : mod->BSIM4v6dmcg = value->rValue; mod->BSIM4v6dmcgGiven = TRUE; break; case BSIM4v6_MOD_DMCI : mod->BSIM4v6dmci = value->rValue; mod->BSIM4v6dmciGiven = TRUE; break; case BSIM4v6_MOD_DMDG : mod->BSIM4v6dmdg = value->rValue; mod->BSIM4v6dmdgGiven = TRUE; break; case BSIM4v6_MOD_DMCGT : mod->BSIM4v6dmcgt = value->rValue; mod->BSIM4v6dmcgtGiven = TRUE; break; case BSIM4v6_MOD_XGW : mod->BSIM4v6xgw = value->rValue; mod->BSIM4v6xgwGiven = TRUE; break; case BSIM4v6_MOD_XGL : mod->BSIM4v6xgl = value->rValue; mod->BSIM4v6xglGiven = TRUE; break; case BSIM4v6_MOD_RSHG : mod->BSIM4v6rshg = value->rValue; mod->BSIM4v6rshgGiven = TRUE; break; case BSIM4v6_MOD_NGCON : mod->BSIM4v6ngcon = value->rValue; mod->BSIM4v6ngconGiven = TRUE; break; case BSIM4v6_MOD_TCJ : mod->BSIM4v6tcj = value->rValue; mod->BSIM4v6tcjGiven = TRUE; break; case BSIM4v6_MOD_TPB : mod->BSIM4v6tpb = value->rValue; mod->BSIM4v6tpbGiven = TRUE; break; case BSIM4v6_MOD_TCJSW : mod->BSIM4v6tcjsw = value->rValue; mod->BSIM4v6tcjswGiven = TRUE; break; case BSIM4v6_MOD_TPBSW : mod->BSIM4v6tpbsw = value->rValue; mod->BSIM4v6tpbswGiven = TRUE; break; case BSIM4v6_MOD_TCJSWG : mod->BSIM4v6tcjswg = value->rValue; mod->BSIM4v6tcjswgGiven = TRUE; break; case BSIM4v6_MOD_TPBSWG : mod->BSIM4v6tpbswg = value->rValue; mod->BSIM4v6tpbswgGiven = TRUE; break; /* Length dependence */ case BSIM4v6_MOD_LCDSC : mod->BSIM4v6lcdsc = value->rValue; mod->BSIM4v6lcdscGiven = TRUE; break; case BSIM4v6_MOD_LCDSCB : mod->BSIM4v6lcdscb = value->rValue; mod->BSIM4v6lcdscbGiven = TRUE; break; case BSIM4v6_MOD_LCDSCD : mod->BSIM4v6lcdscd = value->rValue; mod->BSIM4v6lcdscdGiven = TRUE; break; case BSIM4v6_MOD_LCIT : mod->BSIM4v6lcit = value->rValue; mod->BSIM4v6lcitGiven = TRUE; break; case BSIM4v6_MOD_LNFACTOR : mod->BSIM4v6lnfactor = value->rValue; mod->BSIM4v6lnfactorGiven = TRUE; break; case BSIM4v6_MOD_LXJ: mod->BSIM4v6lxj = value->rValue; mod->BSIM4v6lxjGiven = TRUE; break; case BSIM4v6_MOD_LVSAT: mod->BSIM4v6lvsat = value->rValue; mod->BSIM4v6lvsatGiven = TRUE; break; case BSIM4v6_MOD_LA0: mod->BSIM4v6la0 = value->rValue; mod->BSIM4v6la0Given = TRUE; break; case BSIM4v6_MOD_LAGS: mod->BSIM4v6lags = value->rValue; mod->BSIM4v6lagsGiven = TRUE; break; case BSIM4v6_MOD_LA1: mod->BSIM4v6la1 = value->rValue; mod->BSIM4v6la1Given = TRUE; break; case BSIM4v6_MOD_LA2: mod->BSIM4v6la2 = value->rValue; mod->BSIM4v6la2Given = TRUE; break; case BSIM4v6_MOD_LAT: mod->BSIM4v6lat = value->rValue; mod->BSIM4v6latGiven = TRUE; break; case BSIM4v6_MOD_LKETA: mod->BSIM4v6lketa = value->rValue; mod->BSIM4v6lketaGiven = TRUE; break; case BSIM4v6_MOD_LNSUB: mod->BSIM4v6lnsub = value->rValue; mod->BSIM4v6lnsubGiven = TRUE; break; case BSIM4v6_MOD_LNDEP: mod->BSIM4v6lndep = value->rValue; mod->BSIM4v6lndepGiven = TRUE; if (mod->BSIM4v6lndep > 1.0e20) mod->BSIM4v6lndep *= 1.0e-6; break; case BSIM4v6_MOD_LNSD: mod->BSIM4v6lnsd = value->rValue; mod->BSIM4v6lnsdGiven = TRUE; if (mod->BSIM4v6lnsd > 1.0e23) mod->BSIM4v6lnsd *= 1.0e-6; break; case BSIM4v6_MOD_LNGATE: mod->BSIM4v6lngate = value->rValue; mod->BSIM4v6lngateGiven = TRUE; if (mod->BSIM4v6lngate > 1.0e23) mod->BSIM4v6lngate *= 1.0e-6; break; case BSIM4v6_MOD_LGAMMA1: mod->BSIM4v6lgamma1 = value->rValue; mod->BSIM4v6lgamma1Given = TRUE; break; case BSIM4v6_MOD_LGAMMA2: mod->BSIM4v6lgamma2 = value->rValue; mod->BSIM4v6lgamma2Given = TRUE; break; case BSIM4v6_MOD_LVBX: mod->BSIM4v6lvbx = value->rValue; mod->BSIM4v6lvbxGiven = TRUE; break; case BSIM4v6_MOD_LVBM: mod->BSIM4v6lvbm = value->rValue; mod->BSIM4v6lvbmGiven = TRUE; break; case BSIM4v6_MOD_LXT: mod->BSIM4v6lxt = value->rValue; mod->BSIM4v6lxtGiven = TRUE; break; case BSIM4v6_MOD_LK1: mod->BSIM4v6lk1 = value->rValue; mod->BSIM4v6lk1Given = TRUE; break; case BSIM4v6_MOD_LKT1: mod->BSIM4v6lkt1 = value->rValue; mod->BSIM4v6lkt1Given = TRUE; break; case BSIM4v6_MOD_LKT1L: mod->BSIM4v6lkt1l = value->rValue; mod->BSIM4v6lkt1lGiven = TRUE; break; case BSIM4v6_MOD_LKT2: mod->BSIM4v6lkt2 = value->rValue; mod->BSIM4v6lkt2Given = TRUE; break; case BSIM4v6_MOD_LK2: mod->BSIM4v6lk2 = value->rValue; mod->BSIM4v6lk2Given = TRUE; break; case BSIM4v6_MOD_LK3: mod->BSIM4v6lk3 = value->rValue; mod->BSIM4v6lk3Given = TRUE; break; case BSIM4v6_MOD_LK3B: mod->BSIM4v6lk3b = value->rValue; mod->BSIM4v6lk3bGiven = TRUE; break; case BSIM4v6_MOD_LLPE0: mod->BSIM4v6llpe0 = value->rValue; mod->BSIM4v6llpe0Given = TRUE; break; case BSIM4v6_MOD_LLPEB: mod->BSIM4v6llpeb = value->rValue; mod->BSIM4v6llpebGiven = TRUE; break; case BSIM4v6_MOD_LDVTP0: mod->BSIM4v6ldvtp0 = value->rValue; mod->BSIM4v6ldvtp0Given = TRUE; break; case BSIM4v6_MOD_LDVTP1: mod->BSIM4v6ldvtp1 = value->rValue; mod->BSIM4v6ldvtp1Given = TRUE; break; case BSIM4v6_MOD_LW0: mod->BSIM4v6lw0 = value->rValue; mod->BSIM4v6lw0Given = TRUE; break; case BSIM4v6_MOD_LDVT0: mod->BSIM4v6ldvt0 = value->rValue; mod->BSIM4v6ldvt0Given = TRUE; break; case BSIM4v6_MOD_LDVT1: mod->BSIM4v6ldvt1 = value->rValue; mod->BSIM4v6ldvt1Given = TRUE; break; case BSIM4v6_MOD_LDVT2: mod->BSIM4v6ldvt2 = value->rValue; mod->BSIM4v6ldvt2Given = TRUE; break; case BSIM4v6_MOD_LDVT0W: mod->BSIM4v6ldvt0w = value->rValue; mod->BSIM4v6ldvt0wGiven = TRUE; break; case BSIM4v6_MOD_LDVT1W: mod->BSIM4v6ldvt1w = value->rValue; mod->BSIM4v6ldvt1wGiven = TRUE; break; case BSIM4v6_MOD_LDVT2W: mod->BSIM4v6ldvt2w = value->rValue; mod->BSIM4v6ldvt2wGiven = TRUE; break; case BSIM4v6_MOD_LDROUT: mod->BSIM4v6ldrout = value->rValue; mod->BSIM4v6ldroutGiven = TRUE; break; case BSIM4v6_MOD_LDSUB: mod->BSIM4v6ldsub = value->rValue; mod->BSIM4v6ldsubGiven = TRUE; break; case BSIM4v6_MOD_LVTH0: mod->BSIM4v6lvth0 = value->rValue; mod->BSIM4v6lvth0Given = TRUE; break; case BSIM4v6_MOD_LUA: mod->BSIM4v6lua = value->rValue; mod->BSIM4v6luaGiven = TRUE; break; case BSIM4v6_MOD_LUA1: mod->BSIM4v6lua1 = value->rValue; mod->BSIM4v6lua1Given = TRUE; break; case BSIM4v6_MOD_LUB: mod->BSIM4v6lub = value->rValue; mod->BSIM4v6lubGiven = TRUE; break; case BSIM4v6_MOD_LUB1: mod->BSIM4v6lub1 = value->rValue; mod->BSIM4v6lub1Given = TRUE; break; case BSIM4v6_MOD_LUC: mod->BSIM4v6luc = value->rValue; mod->BSIM4v6lucGiven = TRUE; break; case BSIM4v6_MOD_LUC1: mod->BSIM4v6luc1 = value->rValue; mod->BSIM4v6luc1Given = TRUE; break; case BSIM4v6_MOD_LU0 : mod->BSIM4v6lu0 = value->rValue; mod->BSIM4v6lu0Given = TRUE; break; case BSIM4v6_MOD_LUTE : mod->BSIM4v6lute = value->rValue; mod->BSIM4v6luteGiven = TRUE; break; case BSIM4v6_MOD_LUCSTE : mod->BSIM4v6lucste = value->rValue; mod->BSIM4v6lucsteGiven = TRUE; break; case BSIM4v6_MOD_LVOFF: mod->BSIM4v6lvoff = value->rValue; mod->BSIM4v6lvoffGiven = TRUE; break; case BSIM4v6_MOD_LTVOFF: mod->BSIM4v6ltvoff = value->rValue; mod->BSIM4v6ltvoffGiven = TRUE; break; case BSIM4v6_MOD_LMINV: mod->BSIM4v6lminv = value->rValue; mod->BSIM4v6lminvGiven = TRUE; break; case BSIM4v6_MOD_LMINVCV: mod->BSIM4v6lminvcv = value->rValue; mod->BSIM4v6lminvcvGiven = TRUE; break; case BSIM4v6_MOD_LFPROUT: mod->BSIM4v6lfprout = value->rValue; mod->BSIM4v6lfproutGiven = TRUE; break; case BSIM4v6_MOD_LPDITS: mod->BSIM4v6lpdits = value->rValue; mod->BSIM4v6lpditsGiven = TRUE; break; case BSIM4v6_MOD_LPDITSD: mod->BSIM4v6lpditsd = value->rValue; mod->BSIM4v6lpditsdGiven = TRUE; break; case BSIM4v6_MOD_LDELTA : mod->BSIM4v6ldelta = value->rValue; mod->BSIM4v6ldeltaGiven = TRUE; break; case BSIM4v6_MOD_LRDSW: mod->BSIM4v6lrdsw = value->rValue; mod->BSIM4v6lrdswGiven = TRUE; break; case BSIM4v6_MOD_LRDW: mod->BSIM4v6lrdw = value->rValue; mod->BSIM4v6lrdwGiven = TRUE; break; case BSIM4v6_MOD_LRSW: mod->BSIM4v6lrsw = value->rValue; mod->BSIM4v6lrswGiven = TRUE; break; case BSIM4v6_MOD_LPRWB: mod->BSIM4v6lprwb = value->rValue; mod->BSIM4v6lprwbGiven = TRUE; break; case BSIM4v6_MOD_LPRWG: mod->BSIM4v6lprwg = value->rValue; mod->BSIM4v6lprwgGiven = TRUE; break; case BSIM4v6_MOD_LPRT: mod->BSIM4v6lprt = value->rValue; mod->BSIM4v6lprtGiven = TRUE; break; case BSIM4v6_MOD_LETA0: mod->BSIM4v6leta0 = value->rValue; mod->BSIM4v6leta0Given = TRUE; break; case BSIM4v6_MOD_LETAB: mod->BSIM4v6letab = value->rValue; mod->BSIM4v6letabGiven = TRUE; break; case BSIM4v6_MOD_LPCLM: mod->BSIM4v6lpclm = value->rValue; mod->BSIM4v6lpclmGiven = TRUE; break; case BSIM4v6_MOD_LPDIBL1: mod->BSIM4v6lpdibl1 = value->rValue; mod->BSIM4v6lpdibl1Given = TRUE; break; case BSIM4v6_MOD_LPDIBL2: mod->BSIM4v6lpdibl2 = value->rValue; mod->BSIM4v6lpdibl2Given = TRUE; break; case BSIM4v6_MOD_LPDIBLB: mod->BSIM4v6lpdiblb = value->rValue; mod->BSIM4v6lpdiblbGiven = TRUE; break; case BSIM4v6_MOD_LPSCBE1: mod->BSIM4v6lpscbe1 = value->rValue; mod->BSIM4v6lpscbe1Given = TRUE; break; case BSIM4v6_MOD_LPSCBE2: mod->BSIM4v6lpscbe2 = value->rValue; mod->BSIM4v6lpscbe2Given = TRUE; break; case BSIM4v6_MOD_LPVAG: mod->BSIM4v6lpvag = value->rValue; mod->BSIM4v6lpvagGiven = TRUE; break; case BSIM4v6_MOD_LWR : mod->BSIM4v6lwr = value->rValue; mod->BSIM4v6lwrGiven = TRUE; break; case BSIM4v6_MOD_LDWG : mod->BSIM4v6ldwg = value->rValue; mod->BSIM4v6ldwgGiven = TRUE; break; case BSIM4v6_MOD_LDWB : mod->BSIM4v6ldwb = value->rValue; mod->BSIM4v6ldwbGiven = TRUE; break; case BSIM4v6_MOD_LB0 : mod->BSIM4v6lb0 = value->rValue; mod->BSIM4v6lb0Given = TRUE; break; case BSIM4v6_MOD_LB1 : mod->BSIM4v6lb1 = value->rValue; mod->BSIM4v6lb1Given = TRUE; break; case BSIM4v6_MOD_LALPHA0 : mod->BSIM4v6lalpha0 = value->rValue; mod->BSIM4v6lalpha0Given = TRUE; break; case BSIM4v6_MOD_LALPHA1 : mod->BSIM4v6lalpha1 = value->rValue; mod->BSIM4v6lalpha1Given = TRUE; break; case BSIM4v6_MOD_LBETA0 : mod->BSIM4v6lbeta0 = value->rValue; mod->BSIM4v6lbeta0Given = TRUE; break; case BSIM4v6_MOD_LPHIN : mod->BSIM4v6lphin = value->rValue; mod->BSIM4v6lphinGiven = TRUE; break; case BSIM4v6_MOD_LAGIDL : mod->BSIM4v6lagidl = value->rValue; mod->BSIM4v6lagidlGiven = TRUE; break; case BSIM4v6_MOD_LBGIDL : mod->BSIM4v6lbgidl = value->rValue; mod->BSIM4v6lbgidlGiven = TRUE; break; case BSIM4v6_MOD_LCGIDL : mod->BSIM4v6lcgidl = value->rValue; mod->BSIM4v6lcgidlGiven = TRUE; break; case BSIM4v6_MOD_LEGIDL : mod->BSIM4v6legidl = value->rValue; mod->BSIM4v6legidlGiven = TRUE; break; case BSIM4v6_MOD_LAGISL : mod->BSIM4v6lagisl = value->rValue; mod->BSIM4v6lagislGiven = TRUE; break; case BSIM4v6_MOD_LBGISL : mod->BSIM4v6lbgisl = value->rValue; mod->BSIM4v6lbgislGiven = TRUE; break; case BSIM4v6_MOD_LCGISL : mod->BSIM4v6lcgisl = value->rValue; mod->BSIM4v6lcgislGiven = TRUE; break; case BSIM4v6_MOD_LEGISL : mod->BSIM4v6legisl = value->rValue; mod->BSIM4v6legislGiven = TRUE; break; case BSIM4v6_MOD_LAIGC : mod->BSIM4v6laigc = value->rValue; mod->BSIM4v6laigcGiven = TRUE; break; case BSIM4v6_MOD_LBIGC : mod->BSIM4v6lbigc = value->rValue; mod->BSIM4v6lbigcGiven = TRUE; break; case BSIM4v6_MOD_LCIGC : mod->BSIM4v6lcigc = value->rValue; mod->BSIM4v6lcigcGiven = TRUE; break; case BSIM4v6_MOD_LAIGSD : mod->BSIM4v6laigsd = value->rValue; mod->BSIM4v6laigsdGiven = TRUE; break; case BSIM4v6_MOD_LBIGSD : mod->BSIM4v6lbigsd = value->rValue; mod->BSIM4v6lbigsdGiven = TRUE; break; case BSIM4v6_MOD_LCIGSD : mod->BSIM4v6lcigsd = value->rValue; mod->BSIM4v6lcigsdGiven = TRUE; break; case BSIM4v6_MOD_LAIGS : mod->BSIM4v6laigs = value->rValue; mod->BSIM4v6laigsGiven = TRUE; break; case BSIM4v6_MOD_LBIGS : mod->BSIM4v6lbigs = value->rValue; mod->BSIM4v6lbigsGiven = TRUE; break; case BSIM4v6_MOD_LCIGS : mod->BSIM4v6lcigs = value->rValue; mod->BSIM4v6lcigsGiven = TRUE; break; case BSIM4v6_MOD_LAIGD : mod->BSIM4v6laigd = value->rValue; mod->BSIM4v6laigdGiven = TRUE; break; case BSIM4v6_MOD_LBIGD : mod->BSIM4v6lbigd = value->rValue; mod->BSIM4v6lbigdGiven = TRUE; break; case BSIM4v6_MOD_LCIGD : mod->BSIM4v6lcigd = value->rValue; mod->BSIM4v6lcigdGiven = TRUE; break; case BSIM4v6_MOD_LAIGBACC : mod->BSIM4v6laigbacc = value->rValue; mod->BSIM4v6laigbaccGiven = TRUE; break; case BSIM4v6_MOD_LBIGBACC : mod->BSIM4v6lbigbacc = value->rValue; mod->BSIM4v6lbigbaccGiven = TRUE; break; case BSIM4v6_MOD_LCIGBACC : mod->BSIM4v6lcigbacc = value->rValue; mod->BSIM4v6lcigbaccGiven = TRUE; break; case BSIM4v6_MOD_LAIGBINV : mod->BSIM4v6laigbinv = value->rValue; mod->BSIM4v6laigbinvGiven = TRUE; break; case BSIM4v6_MOD_LBIGBINV : mod->BSIM4v6lbigbinv = value->rValue; mod->BSIM4v6lbigbinvGiven = TRUE; break; case BSIM4v6_MOD_LCIGBINV : mod->BSIM4v6lcigbinv = value->rValue; mod->BSIM4v6lcigbinvGiven = TRUE; break; case BSIM4v6_MOD_LNIGC : mod->BSIM4v6lnigc = value->rValue; mod->BSIM4v6lnigcGiven = TRUE; break; case BSIM4v6_MOD_LNIGBINV : mod->BSIM4v6lnigbinv = value->rValue; mod->BSIM4v6lnigbinvGiven = TRUE; break; case BSIM4v6_MOD_LNIGBACC : mod->BSIM4v6lnigbacc = value->rValue; mod->BSIM4v6lnigbaccGiven = TRUE; break; case BSIM4v6_MOD_LNTOX : mod->BSIM4v6lntox = value->rValue; mod->BSIM4v6lntoxGiven = TRUE; break; case BSIM4v6_MOD_LEIGBINV : mod->BSIM4v6leigbinv = value->rValue; mod->BSIM4v6leigbinvGiven = TRUE; break; case BSIM4v6_MOD_LPIGCD : mod->BSIM4v6lpigcd = value->rValue; mod->BSIM4v6lpigcdGiven = TRUE; break; case BSIM4v6_MOD_LPOXEDGE : mod->BSIM4v6lpoxedge = value->rValue; mod->BSIM4v6lpoxedgeGiven = TRUE; break; case BSIM4v6_MOD_LXRCRG1 : mod->BSIM4v6lxrcrg1 = value->rValue; mod->BSIM4v6lxrcrg1Given = TRUE; break; case BSIM4v6_MOD_LXRCRG2 : mod->BSIM4v6lxrcrg2 = value->rValue; mod->BSIM4v6lxrcrg2Given = TRUE; break; case BSIM4v6_MOD_LLAMBDA : mod->BSIM4v6llambda = value->rValue; mod->BSIM4v6llambdaGiven = TRUE; break; case BSIM4v6_MOD_LVTL : mod->BSIM4v6lvtl = value->rValue; mod->BSIM4v6lvtlGiven = TRUE; break; case BSIM4v6_MOD_LXN: mod->BSIM4v6lxn = value->rValue; mod->BSIM4v6lxnGiven = TRUE; break; case BSIM4v6_MOD_LVFBSDOFF: mod->BSIM4v6lvfbsdoff = value->rValue; mod->BSIM4v6lvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_LTVFBSDOFF: mod->BSIM4v6ltvfbsdoff = value->rValue; mod->BSIM4v6ltvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_LEU : mod->BSIM4v6leu = value->rValue; mod->BSIM4v6leuGiven = TRUE; break; case BSIM4v6_MOD_LUCS : mod->BSIM4v6lucs = value->rValue; mod->BSIM4v6lucsGiven = TRUE; break; case BSIM4v6_MOD_LVFB : mod->BSIM4v6lvfb = value->rValue; mod->BSIM4v6lvfbGiven = TRUE; break; case BSIM4v6_MOD_LCGSL : mod->BSIM4v6lcgsl = value->rValue; mod->BSIM4v6lcgslGiven = TRUE; break; case BSIM4v6_MOD_LCGDL : mod->BSIM4v6lcgdl = value->rValue; mod->BSIM4v6lcgdlGiven = TRUE; break; case BSIM4v6_MOD_LCKAPPAS : mod->BSIM4v6lckappas = value->rValue; mod->BSIM4v6lckappasGiven = TRUE; break; case BSIM4v6_MOD_LCKAPPAD : mod->BSIM4v6lckappad = value->rValue; mod->BSIM4v6lckappadGiven = TRUE; break; case BSIM4v6_MOD_LCF : mod->BSIM4v6lcf = value->rValue; mod->BSIM4v6lcfGiven = TRUE; break; case BSIM4v6_MOD_LCLC : mod->BSIM4v6lclc = value->rValue; mod->BSIM4v6lclcGiven = TRUE; break; case BSIM4v6_MOD_LCLE : mod->BSIM4v6lcle = value->rValue; mod->BSIM4v6lcleGiven = TRUE; break; case BSIM4v6_MOD_LVFBCV : mod->BSIM4v6lvfbcv = value->rValue; mod->BSIM4v6lvfbcvGiven = TRUE; break; case BSIM4v6_MOD_LACDE : mod->BSIM4v6lacde = value->rValue; mod->BSIM4v6lacdeGiven = TRUE; break; case BSIM4v6_MOD_LMOIN : mod->BSIM4v6lmoin = value->rValue; mod->BSIM4v6lmoinGiven = TRUE; break; case BSIM4v6_MOD_LNOFF : mod->BSIM4v6lnoff = value->rValue; mod->BSIM4v6lnoffGiven = TRUE; break; case BSIM4v6_MOD_LVOFFCV : mod->BSIM4v6lvoffcv = value->rValue; mod->BSIM4v6lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM4v6_MOD_WCDSC : mod->BSIM4v6wcdsc = value->rValue; mod->BSIM4v6wcdscGiven = TRUE; break; case BSIM4v6_MOD_WCDSCB : mod->BSIM4v6wcdscb = value->rValue; mod->BSIM4v6wcdscbGiven = TRUE; break; case BSIM4v6_MOD_WCDSCD : mod->BSIM4v6wcdscd = value->rValue; mod->BSIM4v6wcdscdGiven = TRUE; break; case BSIM4v6_MOD_WCIT : mod->BSIM4v6wcit = value->rValue; mod->BSIM4v6wcitGiven = TRUE; break; case BSIM4v6_MOD_WNFACTOR : mod->BSIM4v6wnfactor = value->rValue; mod->BSIM4v6wnfactorGiven = TRUE; break; case BSIM4v6_MOD_WXJ: mod->BSIM4v6wxj = value->rValue; mod->BSIM4v6wxjGiven = TRUE; break; case BSIM4v6_MOD_WVSAT: mod->BSIM4v6wvsat = value->rValue; mod->BSIM4v6wvsatGiven = TRUE; break; case BSIM4v6_MOD_WA0: mod->BSIM4v6wa0 = value->rValue; mod->BSIM4v6wa0Given = TRUE; break; case BSIM4v6_MOD_WAGS: mod->BSIM4v6wags = value->rValue; mod->BSIM4v6wagsGiven = TRUE; break; case BSIM4v6_MOD_WA1: mod->BSIM4v6wa1 = value->rValue; mod->BSIM4v6wa1Given = TRUE; break; case BSIM4v6_MOD_WA2: mod->BSIM4v6wa2 = value->rValue; mod->BSIM4v6wa2Given = TRUE; break; case BSIM4v6_MOD_WAT: mod->BSIM4v6wat = value->rValue; mod->BSIM4v6watGiven = TRUE; break; case BSIM4v6_MOD_WKETA: mod->BSIM4v6wketa = value->rValue; mod->BSIM4v6wketaGiven = TRUE; break; case BSIM4v6_MOD_WNSUB: mod->BSIM4v6wnsub = value->rValue; mod->BSIM4v6wnsubGiven = TRUE; break; case BSIM4v6_MOD_WNDEP: mod->BSIM4v6wndep = value->rValue; mod->BSIM4v6wndepGiven = TRUE; if (mod->BSIM4v6wndep > 1.0e20) mod->BSIM4v6wndep *= 1.0e-6; break; case BSIM4v6_MOD_WNSD: mod->BSIM4v6wnsd = value->rValue; mod->BSIM4v6wnsdGiven = TRUE; if (mod->BSIM4v6wnsd > 1.0e23) mod->BSIM4v6wnsd *= 1.0e-6; break; case BSIM4v6_MOD_WNGATE: mod->BSIM4v6wngate = value->rValue; mod->BSIM4v6wngateGiven = TRUE; if (mod->BSIM4v6wngate > 1.0e23) mod->BSIM4v6wngate *= 1.0e-6; break; case BSIM4v6_MOD_WGAMMA1: mod->BSIM4v6wgamma1 = value->rValue; mod->BSIM4v6wgamma1Given = TRUE; break; case BSIM4v6_MOD_WGAMMA2: mod->BSIM4v6wgamma2 = value->rValue; mod->BSIM4v6wgamma2Given = TRUE; break; case BSIM4v6_MOD_WVBX: mod->BSIM4v6wvbx = value->rValue; mod->BSIM4v6wvbxGiven = TRUE; break; case BSIM4v6_MOD_WVBM: mod->BSIM4v6wvbm = value->rValue; mod->BSIM4v6wvbmGiven = TRUE; break; case BSIM4v6_MOD_WXT: mod->BSIM4v6wxt = value->rValue; mod->BSIM4v6wxtGiven = TRUE; break; case BSIM4v6_MOD_WK1: mod->BSIM4v6wk1 = value->rValue; mod->BSIM4v6wk1Given = TRUE; break; case BSIM4v6_MOD_WKT1: mod->BSIM4v6wkt1 = value->rValue; mod->BSIM4v6wkt1Given = TRUE; break; case BSIM4v6_MOD_WKT1L: mod->BSIM4v6wkt1l = value->rValue; mod->BSIM4v6wkt1lGiven = TRUE; break; case BSIM4v6_MOD_WKT2: mod->BSIM4v6wkt2 = value->rValue; mod->BSIM4v6wkt2Given = TRUE; break; case BSIM4v6_MOD_WK2: mod->BSIM4v6wk2 = value->rValue; mod->BSIM4v6wk2Given = TRUE; break; case BSIM4v6_MOD_WK3: mod->BSIM4v6wk3 = value->rValue; mod->BSIM4v6wk3Given = TRUE; break; case BSIM4v6_MOD_WK3B: mod->BSIM4v6wk3b = value->rValue; mod->BSIM4v6wk3bGiven = TRUE; break; case BSIM4v6_MOD_WLPE0: mod->BSIM4v6wlpe0 = value->rValue; mod->BSIM4v6wlpe0Given = TRUE; break; case BSIM4v6_MOD_WLPEB: mod->BSIM4v6wlpeb = value->rValue; mod->BSIM4v6wlpebGiven = TRUE; break; case BSIM4v6_MOD_WDVTP0: mod->BSIM4v6wdvtp0 = value->rValue; mod->BSIM4v6wdvtp0Given = TRUE; break; case BSIM4v6_MOD_WDVTP1: mod->BSIM4v6wdvtp1 = value->rValue; mod->BSIM4v6wdvtp1Given = TRUE; break; case BSIM4v6_MOD_WW0: mod->BSIM4v6ww0 = value->rValue; mod->BSIM4v6ww0Given = TRUE; break; case BSIM4v6_MOD_WDVT0: mod->BSIM4v6wdvt0 = value->rValue; mod->BSIM4v6wdvt0Given = TRUE; break; case BSIM4v6_MOD_WDVT1: mod->BSIM4v6wdvt1 = value->rValue; mod->BSIM4v6wdvt1Given = TRUE; break; case BSIM4v6_MOD_WDVT2: mod->BSIM4v6wdvt2 = value->rValue; mod->BSIM4v6wdvt2Given = TRUE; break; case BSIM4v6_MOD_WDVT0W: mod->BSIM4v6wdvt0w = value->rValue; mod->BSIM4v6wdvt0wGiven = TRUE; break; case BSIM4v6_MOD_WDVT1W: mod->BSIM4v6wdvt1w = value->rValue; mod->BSIM4v6wdvt1wGiven = TRUE; break; case BSIM4v6_MOD_WDVT2W: mod->BSIM4v6wdvt2w = value->rValue; mod->BSIM4v6wdvt2wGiven = TRUE; break; case BSIM4v6_MOD_WDROUT: mod->BSIM4v6wdrout = value->rValue; mod->BSIM4v6wdroutGiven = TRUE; break; case BSIM4v6_MOD_WDSUB: mod->BSIM4v6wdsub = value->rValue; mod->BSIM4v6wdsubGiven = TRUE; break; case BSIM4v6_MOD_WVTH0: mod->BSIM4v6wvth0 = value->rValue; mod->BSIM4v6wvth0Given = TRUE; break; case BSIM4v6_MOD_WUA: mod->BSIM4v6wua = value->rValue; mod->BSIM4v6wuaGiven = TRUE; break; case BSIM4v6_MOD_WUA1: mod->BSIM4v6wua1 = value->rValue; mod->BSIM4v6wua1Given = TRUE; break; case BSIM4v6_MOD_WUB: mod->BSIM4v6wub = value->rValue; mod->BSIM4v6wubGiven = TRUE; break; case BSIM4v6_MOD_WUB1: mod->BSIM4v6wub1 = value->rValue; mod->BSIM4v6wub1Given = TRUE; break; case BSIM4v6_MOD_WUC: mod->BSIM4v6wuc = value->rValue; mod->BSIM4v6wucGiven = TRUE; break; case BSIM4v6_MOD_WUC1: mod->BSIM4v6wuc1 = value->rValue; mod->BSIM4v6wuc1Given = TRUE; break; case BSIM4v6_MOD_WU0 : mod->BSIM4v6wu0 = value->rValue; mod->BSIM4v6wu0Given = TRUE; break; case BSIM4v6_MOD_WUTE : mod->BSIM4v6wute = value->rValue; mod->BSIM4v6wuteGiven = TRUE; break; case BSIM4v6_MOD_WUCSTE : mod->BSIM4v6wucste = value->rValue; mod->BSIM4v6wucsteGiven = TRUE; break; case BSIM4v6_MOD_WVOFF: mod->BSIM4v6wvoff = value->rValue; mod->BSIM4v6wvoffGiven = TRUE; break; case BSIM4v6_MOD_WTVOFF: mod->BSIM4v6wtvoff = value->rValue; mod->BSIM4v6wtvoffGiven = TRUE; break; case BSIM4v6_MOD_WMINV: mod->BSIM4v6wminv = value->rValue; mod->BSIM4v6wminvGiven = TRUE; break; case BSIM4v6_MOD_WMINVCV: mod->BSIM4v6wminvcv = value->rValue; mod->BSIM4v6wminvcvGiven = TRUE; break; case BSIM4v6_MOD_WFPROUT: mod->BSIM4v6wfprout = value->rValue; mod->BSIM4v6wfproutGiven = TRUE; break; case BSIM4v6_MOD_WPDITS: mod->BSIM4v6wpdits = value->rValue; mod->BSIM4v6wpditsGiven = TRUE; break; case BSIM4v6_MOD_WPDITSD: mod->BSIM4v6wpditsd = value->rValue; mod->BSIM4v6wpditsdGiven = TRUE; break; case BSIM4v6_MOD_WDELTA : mod->BSIM4v6wdelta = value->rValue; mod->BSIM4v6wdeltaGiven = TRUE; break; case BSIM4v6_MOD_WRDSW: mod->BSIM4v6wrdsw = value->rValue; mod->BSIM4v6wrdswGiven = TRUE; break; case BSIM4v6_MOD_WRDW: mod->BSIM4v6wrdw = value->rValue; mod->BSIM4v6wrdwGiven = TRUE; break; case BSIM4v6_MOD_WRSW: mod->BSIM4v6wrsw = value->rValue; mod->BSIM4v6wrswGiven = TRUE; break; case BSIM4v6_MOD_WPRWB: mod->BSIM4v6wprwb = value->rValue; mod->BSIM4v6wprwbGiven = TRUE; break; case BSIM4v6_MOD_WPRWG: mod->BSIM4v6wprwg = value->rValue; mod->BSIM4v6wprwgGiven = TRUE; break; case BSIM4v6_MOD_WPRT: mod->BSIM4v6wprt = value->rValue; mod->BSIM4v6wprtGiven = TRUE; break; case BSIM4v6_MOD_WETA0: mod->BSIM4v6weta0 = value->rValue; mod->BSIM4v6weta0Given = TRUE; break; case BSIM4v6_MOD_WETAB: mod->BSIM4v6wetab = value->rValue; mod->BSIM4v6wetabGiven = TRUE; break; case BSIM4v6_MOD_WPCLM: mod->BSIM4v6wpclm = value->rValue; mod->BSIM4v6wpclmGiven = TRUE; break; case BSIM4v6_MOD_WPDIBL1: mod->BSIM4v6wpdibl1 = value->rValue; mod->BSIM4v6wpdibl1Given = TRUE; break; case BSIM4v6_MOD_WPDIBL2: mod->BSIM4v6wpdibl2 = value->rValue; mod->BSIM4v6wpdibl2Given = TRUE; break; case BSIM4v6_MOD_WPDIBLB: mod->BSIM4v6wpdiblb = value->rValue; mod->BSIM4v6wpdiblbGiven = TRUE; break; case BSIM4v6_MOD_WPSCBE1: mod->BSIM4v6wpscbe1 = value->rValue; mod->BSIM4v6wpscbe1Given = TRUE; break; case BSIM4v6_MOD_WPSCBE2: mod->BSIM4v6wpscbe2 = value->rValue; mod->BSIM4v6wpscbe2Given = TRUE; break; case BSIM4v6_MOD_WPVAG: mod->BSIM4v6wpvag = value->rValue; mod->BSIM4v6wpvagGiven = TRUE; break; case BSIM4v6_MOD_WWR : mod->BSIM4v6wwr = value->rValue; mod->BSIM4v6wwrGiven = TRUE; break; case BSIM4v6_MOD_WDWG : mod->BSIM4v6wdwg = value->rValue; mod->BSIM4v6wdwgGiven = TRUE; break; case BSIM4v6_MOD_WDWB : mod->BSIM4v6wdwb = value->rValue; mod->BSIM4v6wdwbGiven = TRUE; break; case BSIM4v6_MOD_WB0 : mod->BSIM4v6wb0 = value->rValue; mod->BSIM4v6wb0Given = TRUE; break; case BSIM4v6_MOD_WB1 : mod->BSIM4v6wb1 = value->rValue; mod->BSIM4v6wb1Given = TRUE; break; case BSIM4v6_MOD_WALPHA0 : mod->BSIM4v6walpha0 = value->rValue; mod->BSIM4v6walpha0Given = TRUE; break; case BSIM4v6_MOD_WALPHA1 : mod->BSIM4v6walpha1 = value->rValue; mod->BSIM4v6walpha1Given = TRUE; break; case BSIM4v6_MOD_WBETA0 : mod->BSIM4v6wbeta0 = value->rValue; mod->BSIM4v6wbeta0Given = TRUE; break; case BSIM4v6_MOD_WPHIN : mod->BSIM4v6wphin = value->rValue; mod->BSIM4v6wphinGiven = TRUE; break; case BSIM4v6_MOD_WAGIDL : mod->BSIM4v6wagidl = value->rValue; mod->BSIM4v6wagidlGiven = TRUE; break; case BSIM4v6_MOD_WBGIDL : mod->BSIM4v6wbgidl = value->rValue; mod->BSIM4v6wbgidlGiven = TRUE; break; case BSIM4v6_MOD_WCGIDL : mod->BSIM4v6wcgidl = value->rValue; mod->BSIM4v6wcgidlGiven = TRUE; break; case BSIM4v6_MOD_WEGIDL : mod->BSIM4v6wegidl = value->rValue; mod->BSIM4v6wegidlGiven = TRUE; break; case BSIM4v6_MOD_WAGISL : mod->BSIM4v6wagisl = value->rValue; mod->BSIM4v6wagislGiven = TRUE; break; case BSIM4v6_MOD_WBGISL : mod->BSIM4v6wbgisl = value->rValue; mod->BSIM4v6wbgislGiven = TRUE; break; case BSIM4v6_MOD_WCGISL : mod->BSIM4v6wcgisl = value->rValue; mod->BSIM4v6wcgislGiven = TRUE; break; case BSIM4v6_MOD_WEGISL : mod->BSIM4v6wegisl = value->rValue; mod->BSIM4v6wegislGiven = TRUE; break; case BSIM4v6_MOD_WAIGC : mod->BSIM4v6waigc = value->rValue; mod->BSIM4v6waigcGiven = TRUE; break; case BSIM4v6_MOD_WBIGC : mod->BSIM4v6wbigc = value->rValue; mod->BSIM4v6wbigcGiven = TRUE; break; case BSIM4v6_MOD_WCIGC : mod->BSIM4v6wcigc = value->rValue; mod->BSIM4v6wcigcGiven = TRUE; break; case BSIM4v6_MOD_WAIGSD : mod->BSIM4v6waigsd = value->rValue; mod->BSIM4v6waigsdGiven = TRUE; break; case BSIM4v6_MOD_WBIGSD : mod->BSIM4v6wbigsd = value->rValue; mod->BSIM4v6wbigsdGiven = TRUE; break; case BSIM4v6_MOD_WCIGSD : mod->BSIM4v6wcigsd = value->rValue; mod->BSIM4v6wcigsdGiven = TRUE; break; case BSIM4v6_MOD_WAIGS : mod->BSIM4v6waigs = value->rValue; mod->BSIM4v6waigsGiven = TRUE; break; case BSIM4v6_MOD_WBIGS : mod->BSIM4v6wbigs = value->rValue; mod->BSIM4v6wbigsGiven = TRUE; break; case BSIM4v6_MOD_WCIGS : mod->BSIM4v6wcigs = value->rValue; mod->BSIM4v6wcigsGiven = TRUE; break; case BSIM4v6_MOD_WAIGD : mod->BSIM4v6waigd = value->rValue; mod->BSIM4v6waigdGiven = TRUE; break; case BSIM4v6_MOD_WBIGD : mod->BSIM4v6wbigd = value->rValue; mod->BSIM4v6wbigdGiven = TRUE; break; case BSIM4v6_MOD_WCIGD : mod->BSIM4v6wcigd = value->rValue; mod->BSIM4v6wcigdGiven = TRUE; break; case BSIM4v6_MOD_WAIGBACC : mod->BSIM4v6waigbacc = value->rValue; mod->BSIM4v6waigbaccGiven = TRUE; break; case BSIM4v6_MOD_WBIGBACC : mod->BSIM4v6wbigbacc = value->rValue; mod->BSIM4v6wbigbaccGiven = TRUE; break; case BSIM4v6_MOD_WCIGBACC : mod->BSIM4v6wcigbacc = value->rValue; mod->BSIM4v6wcigbaccGiven = TRUE; break; case BSIM4v6_MOD_WAIGBINV : mod->BSIM4v6waigbinv = value->rValue; mod->BSIM4v6waigbinvGiven = TRUE; break; case BSIM4v6_MOD_WBIGBINV : mod->BSIM4v6wbigbinv = value->rValue; mod->BSIM4v6wbigbinvGiven = TRUE; break; case BSIM4v6_MOD_WCIGBINV : mod->BSIM4v6wcigbinv = value->rValue; mod->BSIM4v6wcigbinvGiven = TRUE; break; case BSIM4v6_MOD_WNIGC : mod->BSIM4v6wnigc = value->rValue; mod->BSIM4v6wnigcGiven = TRUE; break; case BSIM4v6_MOD_WNIGBINV : mod->BSIM4v6wnigbinv = value->rValue; mod->BSIM4v6wnigbinvGiven = TRUE; break; case BSIM4v6_MOD_WNIGBACC : mod->BSIM4v6wnigbacc = value->rValue; mod->BSIM4v6wnigbaccGiven = TRUE; break; case BSIM4v6_MOD_WNTOX : mod->BSIM4v6wntox = value->rValue; mod->BSIM4v6wntoxGiven = TRUE; break; case BSIM4v6_MOD_WEIGBINV : mod->BSIM4v6weigbinv = value->rValue; mod->BSIM4v6weigbinvGiven = TRUE; break; case BSIM4v6_MOD_WPIGCD : mod->BSIM4v6wpigcd = value->rValue; mod->BSIM4v6wpigcdGiven = TRUE; break; case BSIM4v6_MOD_WPOXEDGE : mod->BSIM4v6wpoxedge = value->rValue; mod->BSIM4v6wpoxedgeGiven = TRUE; break; case BSIM4v6_MOD_WXRCRG1 : mod->BSIM4v6wxrcrg1 = value->rValue; mod->BSIM4v6wxrcrg1Given = TRUE; break; case BSIM4v6_MOD_WXRCRG2 : mod->BSIM4v6wxrcrg2 = value->rValue; mod->BSIM4v6wxrcrg2Given = TRUE; break; case BSIM4v6_MOD_WLAMBDA : mod->BSIM4v6wlambda = value->rValue; mod->BSIM4v6wlambdaGiven = TRUE; break; case BSIM4v6_MOD_WVTL : mod->BSIM4v6wvtl = value->rValue; mod->BSIM4v6wvtlGiven = TRUE; break; case BSIM4v6_MOD_WXN: mod->BSIM4v6wxn = value->rValue; mod->BSIM4v6wxnGiven = TRUE; break; case BSIM4v6_MOD_WVFBSDOFF: mod->BSIM4v6wvfbsdoff = value->rValue; mod->BSIM4v6wvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_WTVFBSDOFF: mod->BSIM4v6wtvfbsdoff = value->rValue; mod->BSIM4v6wtvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_WEU : mod->BSIM4v6weu = value->rValue; mod->BSIM4v6weuGiven = TRUE; break; case BSIM4v6_MOD_WUCS : mod->BSIM4v6wucs = value->rValue; mod->BSIM4v6wucsGiven = TRUE; break; case BSIM4v6_MOD_WVFB : mod->BSIM4v6wvfb = value->rValue; mod->BSIM4v6wvfbGiven = TRUE; break; case BSIM4v6_MOD_WCGSL : mod->BSIM4v6wcgsl = value->rValue; mod->BSIM4v6wcgslGiven = TRUE; break; case BSIM4v6_MOD_WCGDL : mod->BSIM4v6wcgdl = value->rValue; mod->BSIM4v6wcgdlGiven = TRUE; break; case BSIM4v6_MOD_WCKAPPAS : mod->BSIM4v6wckappas = value->rValue; mod->BSIM4v6wckappasGiven = TRUE; break; case BSIM4v6_MOD_WCKAPPAD : mod->BSIM4v6wckappad = value->rValue; mod->BSIM4v6wckappadGiven = TRUE; break; case BSIM4v6_MOD_WCF : mod->BSIM4v6wcf = value->rValue; mod->BSIM4v6wcfGiven = TRUE; break; case BSIM4v6_MOD_WCLC : mod->BSIM4v6wclc = value->rValue; mod->BSIM4v6wclcGiven = TRUE; break; case BSIM4v6_MOD_WCLE : mod->BSIM4v6wcle = value->rValue; mod->BSIM4v6wcleGiven = TRUE; break; case BSIM4v6_MOD_WVFBCV : mod->BSIM4v6wvfbcv = value->rValue; mod->BSIM4v6wvfbcvGiven = TRUE; break; case BSIM4v6_MOD_WACDE : mod->BSIM4v6wacde = value->rValue; mod->BSIM4v6wacdeGiven = TRUE; break; case BSIM4v6_MOD_WMOIN : mod->BSIM4v6wmoin = value->rValue; mod->BSIM4v6wmoinGiven = TRUE; break; case BSIM4v6_MOD_WNOFF : mod->BSIM4v6wnoff = value->rValue; mod->BSIM4v6wnoffGiven = TRUE; break; case BSIM4v6_MOD_WVOFFCV : mod->BSIM4v6wvoffcv = value->rValue; mod->BSIM4v6wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM4v6_MOD_PCDSC : mod->BSIM4v6pcdsc = value->rValue; mod->BSIM4v6pcdscGiven = TRUE; break; case BSIM4v6_MOD_PCDSCB : mod->BSIM4v6pcdscb = value->rValue; mod->BSIM4v6pcdscbGiven = TRUE; break; case BSIM4v6_MOD_PCDSCD : mod->BSIM4v6pcdscd = value->rValue; mod->BSIM4v6pcdscdGiven = TRUE; break; case BSIM4v6_MOD_PCIT : mod->BSIM4v6pcit = value->rValue; mod->BSIM4v6pcitGiven = TRUE; break; case BSIM4v6_MOD_PNFACTOR : mod->BSIM4v6pnfactor = value->rValue; mod->BSIM4v6pnfactorGiven = TRUE; break; case BSIM4v6_MOD_PXJ: mod->BSIM4v6pxj = value->rValue; mod->BSIM4v6pxjGiven = TRUE; break; case BSIM4v6_MOD_PVSAT: mod->BSIM4v6pvsat = value->rValue; mod->BSIM4v6pvsatGiven = TRUE; break; case BSIM4v6_MOD_PA0: mod->BSIM4v6pa0 = value->rValue; mod->BSIM4v6pa0Given = TRUE; break; case BSIM4v6_MOD_PAGS: mod->BSIM4v6pags = value->rValue; mod->BSIM4v6pagsGiven = TRUE; break; case BSIM4v6_MOD_PA1: mod->BSIM4v6pa1 = value->rValue; mod->BSIM4v6pa1Given = TRUE; break; case BSIM4v6_MOD_PA2: mod->BSIM4v6pa2 = value->rValue; mod->BSIM4v6pa2Given = TRUE; break; case BSIM4v6_MOD_PAT: mod->BSIM4v6pat = value->rValue; mod->BSIM4v6patGiven = TRUE; break; case BSIM4v6_MOD_PKETA: mod->BSIM4v6pketa = value->rValue; mod->BSIM4v6pketaGiven = TRUE; break; case BSIM4v6_MOD_PNSUB: mod->BSIM4v6pnsub = value->rValue; mod->BSIM4v6pnsubGiven = TRUE; break; case BSIM4v6_MOD_PNDEP: mod->BSIM4v6pndep = value->rValue; mod->BSIM4v6pndepGiven = TRUE; if (mod->BSIM4v6pndep > 1.0e20) mod->BSIM4v6pndep *= 1.0e-6; break; case BSIM4v6_MOD_PNSD: mod->BSIM4v6pnsd = value->rValue; mod->BSIM4v6pnsdGiven = TRUE; if (mod->BSIM4v6pnsd > 1.0e23) mod->BSIM4v6pnsd *= 1.0e-6; break; case BSIM4v6_MOD_PNGATE: mod->BSIM4v6pngate = value->rValue; mod->BSIM4v6pngateGiven = TRUE; if (mod->BSIM4v6pngate > 1.0e23) mod->BSIM4v6pngate *= 1.0e-6; break; case BSIM4v6_MOD_PGAMMA1: mod->BSIM4v6pgamma1 = value->rValue; mod->BSIM4v6pgamma1Given = TRUE; break; case BSIM4v6_MOD_PGAMMA2: mod->BSIM4v6pgamma2 = value->rValue; mod->BSIM4v6pgamma2Given = TRUE; break; case BSIM4v6_MOD_PVBX: mod->BSIM4v6pvbx = value->rValue; mod->BSIM4v6pvbxGiven = TRUE; break; case BSIM4v6_MOD_PVBM: mod->BSIM4v6pvbm = value->rValue; mod->BSIM4v6pvbmGiven = TRUE; break; case BSIM4v6_MOD_PXT: mod->BSIM4v6pxt = value->rValue; mod->BSIM4v6pxtGiven = TRUE; break; case BSIM4v6_MOD_PK1: mod->BSIM4v6pk1 = value->rValue; mod->BSIM4v6pk1Given = TRUE; break; case BSIM4v6_MOD_PKT1: mod->BSIM4v6pkt1 = value->rValue; mod->BSIM4v6pkt1Given = TRUE; break; case BSIM4v6_MOD_PKT1L: mod->BSIM4v6pkt1l = value->rValue; mod->BSIM4v6pkt1lGiven = TRUE; break; case BSIM4v6_MOD_PKT2: mod->BSIM4v6pkt2 = value->rValue; mod->BSIM4v6pkt2Given = TRUE; break; case BSIM4v6_MOD_PK2: mod->BSIM4v6pk2 = value->rValue; mod->BSIM4v6pk2Given = TRUE; break; case BSIM4v6_MOD_PK3: mod->BSIM4v6pk3 = value->rValue; mod->BSIM4v6pk3Given = TRUE; break; case BSIM4v6_MOD_PK3B: mod->BSIM4v6pk3b = value->rValue; mod->BSIM4v6pk3bGiven = TRUE; break; case BSIM4v6_MOD_PLPE0: mod->BSIM4v6plpe0 = value->rValue; mod->BSIM4v6plpe0Given = TRUE; break; case BSIM4v6_MOD_PLPEB: mod->BSIM4v6plpeb = value->rValue; mod->BSIM4v6plpebGiven = TRUE; break; case BSIM4v6_MOD_PDVTP0: mod->BSIM4v6pdvtp0 = value->rValue; mod->BSIM4v6pdvtp0Given = TRUE; break; case BSIM4v6_MOD_PDVTP1: mod->BSIM4v6pdvtp1 = value->rValue; mod->BSIM4v6pdvtp1Given = TRUE; break; case BSIM4v6_MOD_PW0: mod->BSIM4v6pw0 = value->rValue; mod->BSIM4v6pw0Given = TRUE; break; case BSIM4v6_MOD_PDVT0: mod->BSIM4v6pdvt0 = value->rValue; mod->BSIM4v6pdvt0Given = TRUE; break; case BSIM4v6_MOD_PDVT1: mod->BSIM4v6pdvt1 = value->rValue; mod->BSIM4v6pdvt1Given = TRUE; break; case BSIM4v6_MOD_PDVT2: mod->BSIM4v6pdvt2 = value->rValue; mod->BSIM4v6pdvt2Given = TRUE; break; case BSIM4v6_MOD_PDVT0W: mod->BSIM4v6pdvt0w = value->rValue; mod->BSIM4v6pdvt0wGiven = TRUE; break; case BSIM4v6_MOD_PDVT1W: mod->BSIM4v6pdvt1w = value->rValue; mod->BSIM4v6pdvt1wGiven = TRUE; break; case BSIM4v6_MOD_PDVT2W: mod->BSIM4v6pdvt2w = value->rValue; mod->BSIM4v6pdvt2wGiven = TRUE; break; case BSIM4v6_MOD_PDROUT: mod->BSIM4v6pdrout = value->rValue; mod->BSIM4v6pdroutGiven = TRUE; break; case BSIM4v6_MOD_PDSUB: mod->BSIM4v6pdsub = value->rValue; mod->BSIM4v6pdsubGiven = TRUE; break; case BSIM4v6_MOD_PVTH0: mod->BSIM4v6pvth0 = value->rValue; mod->BSIM4v6pvth0Given = TRUE; break; case BSIM4v6_MOD_PUA: mod->BSIM4v6pua = value->rValue; mod->BSIM4v6puaGiven = TRUE; break; case BSIM4v6_MOD_PUA1: mod->BSIM4v6pua1 = value->rValue; mod->BSIM4v6pua1Given = TRUE; break; case BSIM4v6_MOD_PUB: mod->BSIM4v6pub = value->rValue; mod->BSIM4v6pubGiven = TRUE; break; case BSIM4v6_MOD_PUB1: mod->BSIM4v6pub1 = value->rValue; mod->BSIM4v6pub1Given = TRUE; break; case BSIM4v6_MOD_PUC: mod->BSIM4v6puc = value->rValue; mod->BSIM4v6pucGiven = TRUE; break; case BSIM4v6_MOD_PUC1: mod->BSIM4v6puc1 = value->rValue; mod->BSIM4v6puc1Given = TRUE; break; case BSIM4v6_MOD_PU0 : mod->BSIM4v6pu0 = value->rValue; mod->BSIM4v6pu0Given = TRUE; break; case BSIM4v6_MOD_PUTE : mod->BSIM4v6pute = value->rValue; mod->BSIM4v6puteGiven = TRUE; break; case BSIM4v6_MOD_PUCSTE : mod->BSIM4v6pucste = value->rValue; mod->BSIM4v6pucsteGiven = TRUE; break; case BSIM4v6_MOD_PVOFF: mod->BSIM4v6pvoff = value->rValue; mod->BSIM4v6pvoffGiven = TRUE; break; case BSIM4v6_MOD_PTVOFF: mod->BSIM4v6ptvoff = value->rValue; mod->BSIM4v6ptvoffGiven = TRUE; break; case BSIM4v6_MOD_PMINV: mod->BSIM4v6pminv = value->rValue; mod->BSIM4v6pminvGiven = TRUE; break; case BSIM4v6_MOD_PMINVCV: mod->BSIM4v6pminvcv = value->rValue; mod->BSIM4v6pminvcvGiven = TRUE; break; case BSIM4v6_MOD_PFPROUT: mod->BSIM4v6pfprout = value->rValue; mod->BSIM4v6pfproutGiven = TRUE; break; case BSIM4v6_MOD_PPDITS: mod->BSIM4v6ppdits = value->rValue; mod->BSIM4v6ppditsGiven = TRUE; break; case BSIM4v6_MOD_PPDITSD: mod->BSIM4v6ppditsd = value->rValue; mod->BSIM4v6ppditsdGiven = TRUE; break; case BSIM4v6_MOD_PDELTA : mod->BSIM4v6pdelta = value->rValue; mod->BSIM4v6pdeltaGiven = TRUE; break; case BSIM4v6_MOD_PRDSW: mod->BSIM4v6prdsw = value->rValue; mod->BSIM4v6prdswGiven = TRUE; break; case BSIM4v6_MOD_PRDW: mod->BSIM4v6prdw = value->rValue; mod->BSIM4v6prdwGiven = TRUE; break; case BSIM4v6_MOD_PRSW: mod->BSIM4v6prsw = value->rValue; mod->BSIM4v6prswGiven = TRUE; break; case BSIM4v6_MOD_PPRWB: mod->BSIM4v6pprwb = value->rValue; mod->BSIM4v6pprwbGiven = TRUE; break; case BSIM4v6_MOD_PPRWG: mod->BSIM4v6pprwg = value->rValue; mod->BSIM4v6pprwgGiven = TRUE; break; case BSIM4v6_MOD_PPRT: mod->BSIM4v6pprt = value->rValue; mod->BSIM4v6pprtGiven = TRUE; break; case BSIM4v6_MOD_PETA0: mod->BSIM4v6peta0 = value->rValue; mod->BSIM4v6peta0Given = TRUE; break; case BSIM4v6_MOD_PETAB: mod->BSIM4v6petab = value->rValue; mod->BSIM4v6petabGiven = TRUE; break; case BSIM4v6_MOD_PPCLM: mod->BSIM4v6ppclm = value->rValue; mod->BSIM4v6ppclmGiven = TRUE; break; case BSIM4v6_MOD_PPDIBL1: mod->BSIM4v6ppdibl1 = value->rValue; mod->BSIM4v6ppdibl1Given = TRUE; break; case BSIM4v6_MOD_PPDIBL2: mod->BSIM4v6ppdibl2 = value->rValue; mod->BSIM4v6ppdibl2Given = TRUE; break; case BSIM4v6_MOD_PPDIBLB: mod->BSIM4v6ppdiblb = value->rValue; mod->BSIM4v6ppdiblbGiven = TRUE; break; case BSIM4v6_MOD_PPSCBE1: mod->BSIM4v6ppscbe1 = value->rValue; mod->BSIM4v6ppscbe1Given = TRUE; break; case BSIM4v6_MOD_PPSCBE2: mod->BSIM4v6ppscbe2 = value->rValue; mod->BSIM4v6ppscbe2Given = TRUE; break; case BSIM4v6_MOD_PPVAG: mod->BSIM4v6ppvag = value->rValue; mod->BSIM4v6ppvagGiven = TRUE; break; case BSIM4v6_MOD_PWR : mod->BSIM4v6pwr = value->rValue; mod->BSIM4v6pwrGiven = TRUE; break; case BSIM4v6_MOD_PDWG : mod->BSIM4v6pdwg = value->rValue; mod->BSIM4v6pdwgGiven = TRUE; break; case BSIM4v6_MOD_PDWB : mod->BSIM4v6pdwb = value->rValue; mod->BSIM4v6pdwbGiven = TRUE; break; case BSIM4v6_MOD_PB0 : mod->BSIM4v6pb0 = value->rValue; mod->BSIM4v6pb0Given = TRUE; break; case BSIM4v6_MOD_PB1 : mod->BSIM4v6pb1 = value->rValue; mod->BSIM4v6pb1Given = TRUE; break; case BSIM4v6_MOD_PALPHA0 : mod->BSIM4v6palpha0 = value->rValue; mod->BSIM4v6palpha0Given = TRUE; break; case BSIM4v6_MOD_PALPHA1 : mod->BSIM4v6palpha1 = value->rValue; mod->BSIM4v6palpha1Given = TRUE; break; case BSIM4v6_MOD_PBETA0 : mod->BSIM4v6pbeta0 = value->rValue; mod->BSIM4v6pbeta0Given = TRUE; break; case BSIM4v6_MOD_PPHIN : mod->BSIM4v6pphin = value->rValue; mod->BSIM4v6pphinGiven = TRUE; break; case BSIM4v6_MOD_PAGIDL : mod->BSIM4v6pagidl = value->rValue; mod->BSIM4v6pagidlGiven = TRUE; break; case BSIM4v6_MOD_PBGIDL : mod->BSIM4v6pbgidl = value->rValue; mod->BSIM4v6pbgidlGiven = TRUE; break; case BSIM4v6_MOD_PCGIDL : mod->BSIM4v6pcgidl = value->rValue; mod->BSIM4v6pcgidlGiven = TRUE; break; case BSIM4v6_MOD_PEGIDL : mod->BSIM4v6pegidl = value->rValue; mod->BSIM4v6pegidlGiven = TRUE; break; case BSIM4v6_MOD_PAGISL : mod->BSIM4v6pagisl = value->rValue; mod->BSIM4v6pagislGiven = TRUE; break; case BSIM4v6_MOD_PBGISL : mod->BSIM4v6pbgisl = value->rValue; mod->BSIM4v6pbgislGiven = TRUE; break; case BSIM4v6_MOD_PCGISL : mod->BSIM4v6pcgisl = value->rValue; mod->BSIM4v6pcgislGiven = TRUE; break; case BSIM4v6_MOD_PEGISL : mod->BSIM4v6pegisl = value->rValue; mod->BSIM4v6pegislGiven = TRUE; break; case BSIM4v6_MOD_PAIGC : mod->BSIM4v6paigc = value->rValue; mod->BSIM4v6paigcGiven = TRUE; break; case BSIM4v6_MOD_PBIGC : mod->BSIM4v6pbigc = value->rValue; mod->BSIM4v6pbigcGiven = TRUE; break; case BSIM4v6_MOD_PCIGC : mod->BSIM4v6pcigc = value->rValue; mod->BSIM4v6pcigcGiven = TRUE; break; case BSIM4v6_MOD_PAIGSD : mod->BSIM4v6paigsd = value->rValue; mod->BSIM4v6paigsdGiven = TRUE; break; case BSIM4v6_MOD_PBIGSD : mod->BSIM4v6pbigsd = value->rValue; mod->BSIM4v6pbigsdGiven = TRUE; break; case BSIM4v6_MOD_PCIGSD : mod->BSIM4v6pcigsd = value->rValue; mod->BSIM4v6pcigsdGiven = TRUE; break; case BSIM4v6_MOD_PAIGS : mod->BSIM4v6paigs = value->rValue; mod->BSIM4v6paigsGiven = TRUE; break; case BSIM4v6_MOD_PBIGS : mod->BSIM4v6pbigs = value->rValue; mod->BSIM4v6pbigsGiven = TRUE; break; case BSIM4v6_MOD_PCIGS : mod->BSIM4v6pcigs = value->rValue; mod->BSIM4v6pcigsGiven = TRUE; break; case BSIM4v6_MOD_PAIGD : mod->BSIM4v6paigd = value->rValue; mod->BSIM4v6paigdGiven = TRUE; break; case BSIM4v6_MOD_PBIGD : mod->BSIM4v6pbigd = value->rValue; mod->BSIM4v6pbigdGiven = TRUE; break; case BSIM4v6_MOD_PCIGD : mod->BSIM4v6pcigd = value->rValue; mod->BSIM4v6pcigdGiven = TRUE; break; case BSIM4v6_MOD_PAIGBACC : mod->BSIM4v6paigbacc = value->rValue; mod->BSIM4v6paigbaccGiven = TRUE; break; case BSIM4v6_MOD_PBIGBACC : mod->BSIM4v6pbigbacc = value->rValue; mod->BSIM4v6pbigbaccGiven = TRUE; break; case BSIM4v6_MOD_PCIGBACC : mod->BSIM4v6pcigbacc = value->rValue; mod->BSIM4v6pcigbaccGiven = TRUE; break; case BSIM4v6_MOD_PAIGBINV : mod->BSIM4v6paigbinv = value->rValue; mod->BSIM4v6paigbinvGiven = TRUE; break; case BSIM4v6_MOD_PBIGBINV : mod->BSIM4v6pbigbinv = value->rValue; mod->BSIM4v6pbigbinvGiven = TRUE; break; case BSIM4v6_MOD_PCIGBINV : mod->BSIM4v6pcigbinv = value->rValue; mod->BSIM4v6pcigbinvGiven = TRUE; break; case BSIM4v6_MOD_PNIGC : mod->BSIM4v6pnigc = value->rValue; mod->BSIM4v6pnigcGiven = TRUE; break; case BSIM4v6_MOD_PNIGBINV : mod->BSIM4v6pnigbinv = value->rValue; mod->BSIM4v6pnigbinvGiven = TRUE; break; case BSIM4v6_MOD_PNIGBACC : mod->BSIM4v6pnigbacc = value->rValue; mod->BSIM4v6pnigbaccGiven = TRUE; break; case BSIM4v6_MOD_PNTOX : mod->BSIM4v6pntox = value->rValue; mod->BSIM4v6pntoxGiven = TRUE; break; case BSIM4v6_MOD_PEIGBINV : mod->BSIM4v6peigbinv = value->rValue; mod->BSIM4v6peigbinvGiven = TRUE; break; case BSIM4v6_MOD_PPIGCD : mod->BSIM4v6ppigcd = value->rValue; mod->BSIM4v6ppigcdGiven = TRUE; break; case BSIM4v6_MOD_PPOXEDGE : mod->BSIM4v6ppoxedge = value->rValue; mod->BSIM4v6ppoxedgeGiven = TRUE; break; case BSIM4v6_MOD_PXRCRG1 : mod->BSIM4v6pxrcrg1 = value->rValue; mod->BSIM4v6pxrcrg1Given = TRUE; break; case BSIM4v6_MOD_PXRCRG2 : mod->BSIM4v6pxrcrg2 = value->rValue; mod->BSIM4v6pxrcrg2Given = TRUE; break; case BSIM4v6_MOD_PLAMBDA : mod->BSIM4v6plambda = value->rValue; mod->BSIM4v6plambdaGiven = TRUE; break; case BSIM4v6_MOD_PVTL : mod->BSIM4v6pvtl = value->rValue; mod->BSIM4v6pvtlGiven = TRUE; break; case BSIM4v6_MOD_PXN: mod->BSIM4v6pxn = value->rValue; mod->BSIM4v6pxnGiven = TRUE; break; case BSIM4v6_MOD_PVFBSDOFF: mod->BSIM4v6pvfbsdoff = value->rValue; mod->BSIM4v6pvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_PTVFBSDOFF: mod->BSIM4v6ptvfbsdoff = value->rValue; mod->BSIM4v6ptvfbsdoffGiven = TRUE; break; case BSIM4v6_MOD_PEU : mod->BSIM4v6peu = value->rValue; mod->BSIM4v6peuGiven = TRUE; break; case BSIM4v6_MOD_PUCS : mod->BSIM4v6pucs = value->rValue; mod->BSIM4v6pucsGiven = TRUE; break; case BSIM4v6_MOD_PVFB : mod->BSIM4v6pvfb = value->rValue; mod->BSIM4v6pvfbGiven = TRUE; break; case BSIM4v6_MOD_PCGSL : mod->BSIM4v6pcgsl = value->rValue; mod->BSIM4v6pcgslGiven = TRUE; break; case BSIM4v6_MOD_PCGDL : mod->BSIM4v6pcgdl = value->rValue; mod->BSIM4v6pcgdlGiven = TRUE; break; case BSIM4v6_MOD_PCKAPPAS : mod->BSIM4v6pckappas = value->rValue; mod->BSIM4v6pckappasGiven = TRUE; break; case BSIM4v6_MOD_PCKAPPAD : mod->BSIM4v6pckappad = value->rValue; mod->BSIM4v6pckappadGiven = TRUE; break; case BSIM4v6_MOD_PCF : mod->BSIM4v6pcf = value->rValue; mod->BSIM4v6pcfGiven = TRUE; break; case BSIM4v6_MOD_PCLC : mod->BSIM4v6pclc = value->rValue; mod->BSIM4v6pclcGiven = TRUE; break; case BSIM4v6_MOD_PCLE : mod->BSIM4v6pcle = value->rValue; mod->BSIM4v6pcleGiven = TRUE; break; case BSIM4v6_MOD_PVFBCV : mod->BSIM4v6pvfbcv = value->rValue; mod->BSIM4v6pvfbcvGiven = TRUE; break; case BSIM4v6_MOD_PACDE : mod->BSIM4v6pacde = value->rValue; mod->BSIM4v6pacdeGiven = TRUE; break; case BSIM4v6_MOD_PMOIN : mod->BSIM4v6pmoin = value->rValue; mod->BSIM4v6pmoinGiven = TRUE; break; case BSIM4v6_MOD_PNOFF : mod->BSIM4v6pnoff = value->rValue; mod->BSIM4v6pnoffGiven = TRUE; break; case BSIM4v6_MOD_PVOFFCV : mod->BSIM4v6pvoffcv = value->rValue; mod->BSIM4v6pvoffcvGiven = TRUE; break; case BSIM4v6_MOD_TNOM : mod->BSIM4v6tnom = value->rValue + CONSTCtoK; mod->BSIM4v6tnomGiven = TRUE; break; case BSIM4v6_MOD_CGSO : mod->BSIM4v6cgso = value->rValue; mod->BSIM4v6cgsoGiven = TRUE; break; case BSIM4v6_MOD_CGDO : mod->BSIM4v6cgdo = value->rValue; mod->BSIM4v6cgdoGiven = TRUE; break; case BSIM4v6_MOD_CGBO : mod->BSIM4v6cgbo = value->rValue; mod->BSIM4v6cgboGiven = TRUE; break; case BSIM4v6_MOD_XPART : mod->BSIM4v6xpart = value->rValue; mod->BSIM4v6xpartGiven = TRUE; break; case BSIM4v6_MOD_RSH : mod->BSIM4v6sheetResistance = value->rValue; mod->BSIM4v6sheetResistanceGiven = TRUE; break; case BSIM4v6_MOD_JSS : mod->BSIM4v6SjctSatCurDensity = value->rValue; mod->BSIM4v6SjctSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_JSWS : mod->BSIM4v6SjctSidewallSatCurDensity = value->rValue; mod->BSIM4v6SjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_JSWGS : mod->BSIM4v6SjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v6SjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_PBS : mod->BSIM4v6SbulkJctPotential = value->rValue; mod->BSIM4v6SbulkJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJS : mod->BSIM4v6SbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v6SbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_PBSWS : mod->BSIM4v6SsidewallJctPotential = value->rValue; mod->BSIM4v6SsidewallJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJSWS : mod->BSIM4v6SbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v6SbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_CJS : mod->BSIM4v6SunitAreaJctCap = value->rValue; mod->BSIM4v6SunitAreaJctCapGiven = TRUE; break; case BSIM4v6_MOD_CJSWS : mod->BSIM4v6SunitLengthSidewallJctCap = value->rValue; mod->BSIM4v6SunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v6_MOD_NJS : mod->BSIM4v6SjctEmissionCoeff = value->rValue; mod->BSIM4v6SjctEmissionCoeffGiven = TRUE; break; case BSIM4v6_MOD_PBSWGS : mod->BSIM4v6SGatesidewallJctPotential = value->rValue; mod->BSIM4v6SGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJSWGS : mod->BSIM4v6SbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v6SbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_CJSWGS : mod->BSIM4v6SunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v6SunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v6_MOD_XTIS : mod->BSIM4v6SjctTempExponent = value->rValue; mod->BSIM4v6SjctTempExponentGiven = TRUE; break; case BSIM4v6_MOD_JSD : mod->BSIM4v6DjctSatCurDensity = value->rValue; mod->BSIM4v6DjctSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_JSWD : mod->BSIM4v6DjctSidewallSatCurDensity = value->rValue; mod->BSIM4v6DjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_JSWGD : mod->BSIM4v6DjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v6DjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v6_MOD_PBD : mod->BSIM4v6DbulkJctPotential = value->rValue; mod->BSIM4v6DbulkJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJD : mod->BSIM4v6DbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v6DbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_PBSWD : mod->BSIM4v6DsidewallJctPotential = value->rValue; mod->BSIM4v6DsidewallJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJSWD : mod->BSIM4v6DbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v6DbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_CJD : mod->BSIM4v6DunitAreaJctCap = value->rValue; mod->BSIM4v6DunitAreaJctCapGiven = TRUE; break; case BSIM4v6_MOD_CJSWD : mod->BSIM4v6DunitLengthSidewallJctCap = value->rValue; mod->BSIM4v6DunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v6_MOD_NJD : mod->BSIM4v6DjctEmissionCoeff = value->rValue; mod->BSIM4v6DjctEmissionCoeffGiven = TRUE; break; case BSIM4v6_MOD_PBSWGD : mod->BSIM4v6DGatesidewallJctPotential = value->rValue; mod->BSIM4v6DGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v6_MOD_MJSWGD : mod->BSIM4v6DbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v6DbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v6_MOD_CJSWGD : mod->BSIM4v6DunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v6DunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v6_MOD_XTID : mod->BSIM4v6DjctTempExponent = value->rValue; mod->BSIM4v6DjctTempExponentGiven = TRUE; break; case BSIM4v6_MOD_LINT : mod->BSIM4v6Lint = value->rValue; mod->BSIM4v6LintGiven = TRUE; break; case BSIM4v6_MOD_LL : mod->BSIM4v6Ll = value->rValue; mod->BSIM4v6LlGiven = TRUE; break; case BSIM4v6_MOD_LLC : mod->BSIM4v6Llc = value->rValue; mod->BSIM4v6LlcGiven = TRUE; break; case BSIM4v6_MOD_LLN : mod->BSIM4v6Lln = value->rValue; mod->BSIM4v6LlnGiven = TRUE; break; case BSIM4v6_MOD_LW : mod->BSIM4v6Lw = value->rValue; mod->BSIM4v6LwGiven = TRUE; break; case BSIM4v6_MOD_LWC : mod->BSIM4v6Lwc = value->rValue; mod->BSIM4v6LwcGiven = TRUE; break; case BSIM4v6_MOD_LWN : mod->BSIM4v6Lwn = value->rValue; mod->BSIM4v6LwnGiven = TRUE; break; case BSIM4v6_MOD_LWL : mod->BSIM4v6Lwl = value->rValue; mod->BSIM4v6LwlGiven = TRUE; break; case BSIM4v6_MOD_LWLC : mod->BSIM4v6Lwlc = value->rValue; mod->BSIM4v6LwlcGiven = TRUE; break; case BSIM4v6_MOD_LMIN : mod->BSIM4v6Lmin = value->rValue; mod->BSIM4v6LminGiven = TRUE; break; case BSIM4v6_MOD_LMAX : mod->BSIM4v6Lmax = value->rValue; mod->BSIM4v6LmaxGiven = TRUE; break; case BSIM4v6_MOD_WINT : mod->BSIM4v6Wint = value->rValue; mod->BSIM4v6WintGiven = TRUE; break; case BSIM4v6_MOD_WL : mod->BSIM4v6Wl = value->rValue; mod->BSIM4v6WlGiven = TRUE; break; case BSIM4v6_MOD_WLC : mod->BSIM4v6Wlc = value->rValue; mod->BSIM4v6WlcGiven = TRUE; break; case BSIM4v6_MOD_WLN : mod->BSIM4v6Wln = value->rValue; mod->BSIM4v6WlnGiven = TRUE; break; case BSIM4v6_MOD_WW : mod->BSIM4v6Ww = value->rValue; mod->BSIM4v6WwGiven = TRUE; break; case BSIM4v6_MOD_WWC : mod->BSIM4v6Wwc = value->rValue; mod->BSIM4v6WwcGiven = TRUE; break; case BSIM4v6_MOD_WWN : mod->BSIM4v6Wwn = value->rValue; mod->BSIM4v6WwnGiven = TRUE; break; case BSIM4v6_MOD_WWL : mod->BSIM4v6Wwl = value->rValue; mod->BSIM4v6WwlGiven = TRUE; break; case BSIM4v6_MOD_WWLC : mod->BSIM4v6Wwlc = value->rValue; mod->BSIM4v6WwlcGiven = TRUE; break; case BSIM4v6_MOD_WMIN : mod->BSIM4v6Wmin = value->rValue; mod->BSIM4v6WminGiven = TRUE; break; case BSIM4v6_MOD_WMAX : mod->BSIM4v6Wmax = value->rValue; mod->BSIM4v6WmaxGiven = TRUE; break; case BSIM4v6_MOD_NOIA : mod->BSIM4v6oxideTrapDensityA = value->rValue; mod->BSIM4v6oxideTrapDensityAGiven = TRUE; break; case BSIM4v6_MOD_NOIB : mod->BSIM4v6oxideTrapDensityB = value->rValue; mod->BSIM4v6oxideTrapDensityBGiven = TRUE; break; case BSIM4v6_MOD_NOIC : mod->BSIM4v6oxideTrapDensityC = value->rValue; mod->BSIM4v6oxideTrapDensityCGiven = TRUE; break; case BSIM4v6_MOD_EM : mod->BSIM4v6em = value->rValue; mod->BSIM4v6emGiven = TRUE; break; case BSIM4v6_MOD_EF : mod->BSIM4v6ef = value->rValue; mod->BSIM4v6efGiven = TRUE; break; case BSIM4v6_MOD_AF : mod->BSIM4v6af = value->rValue; mod->BSIM4v6afGiven = TRUE; break; case BSIM4v6_MOD_KF : mod->BSIM4v6kf = value->rValue; mod->BSIM4v6kfGiven = TRUE; break; case BSIM4v6_MOD_VGS_MAX: mod->BSIM4v6vgsMax = value->rValue; mod->BSIM4v6vgsMaxGiven = TRUE; break; case BSIM4v6_MOD_VGD_MAX: mod->BSIM4v6vgdMax = value->rValue; mod->BSIM4v6vgdMaxGiven = TRUE; break; case BSIM4v6_MOD_VGB_MAX: mod->BSIM4v6vgbMax = value->rValue; mod->BSIM4v6vgbMaxGiven = TRUE; break; case BSIM4v6_MOD_VDS_MAX: mod->BSIM4v6vdsMax = value->rValue; mod->BSIM4v6vdsMaxGiven = TRUE; break; case BSIM4v6_MOD_VBS_MAX: mod->BSIM4v6vbsMax = value->rValue; mod->BSIM4v6vbsMaxGiven = TRUE; break; case BSIM4v6_MOD_VBD_MAX: mod->BSIM4v6vbdMax = value->rValue; mod->BSIM4v6vbdMaxGiven = TRUE; break; case BSIM4v6_MOD_NMOS : if(value->iValue) { mod->BSIM4v6type = 1; mod->BSIM4v6typeGiven = TRUE; } break; case BSIM4v6_MOD_PMOS : if(value->iValue) { mod->BSIM4v6type = - 1; mod->BSIM4v6typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/Makefile.in0000644000265600020320000004372512264261536021606 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim4v6 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim4v6_la_LIBADD = am_libbsim4v6_la_OBJECTS = b4v6.lo b4v6acld.lo b4v6ask.lo b4v6check.lo \ b4v6cvtest.lo b4v6del.lo b4v6dest.lo b4v6geo.lo b4v6getic.lo \ b4v6ld.lo b4v6mask.lo b4v6mdel.lo b4v6mpar.lo b4v6noi.lo \ b4v6par.lo b4v6pzld.lo b4v6set.lo b4v6soachk.lo b4v6temp.lo \ b4v6trunc.lo bsim4v6init.lo libbsim4v6_la_OBJECTS = $(am_libbsim4v6_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim4v6_la_SOURCES) DIST_SOURCES = $(libbsim4v6_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim4v6.la libbsim4v6_la_SOURCES = \ b4v6.c \ b4v6acld.c \ b4v6ask.c \ b4v6check.c \ b4v6cvtest.c \ b4v6del.c \ b4v6dest.c \ b4v6geo.c \ b4v6getic.c \ b4v6ld.c \ b4v6mask.c \ b4v6mdel.c \ b4v6mpar.c \ b4v6noi.c \ b4v6par.c \ b4v6pzld.c \ b4v6set.c \ b4v6soachk.c \ b4v6temp.c \ b4v6trunc.c \ bsim4v6def.h \ bsim4v6ext.h \ bsim4v6init.c \ bsim4v6init.h \ bsim4v6itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v6/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v6/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim4v6.la: $(libbsim4v6_la_OBJECTS) $(libbsim4v6_la_DEPENDENCIES) $(EXTRA_libbsim4v6_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim4v6_la_OBJECTS) $(libbsim4v6_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6geo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v6trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim4v6init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim4v6/b4v6.c0000644000265600020320000021465312264261473020466 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim4v6def.h" #include "ngspice/suffix.h" IFparm BSIM4v6pTable[] = { /* parameters */ IOP( "l", BSIM4v6_L, IF_REAL , "Length"), IOP( "w", BSIM4v6_W, IF_REAL , "Width"), IOP( "m", BSIM4v6_M, IF_REAL , "Separate Parallel multiplier"), IOP( "nf", BSIM4v6_NF, IF_REAL , "Number of fingers"), IOP( "sa", BSIM4v6_SA, IF_REAL , "distance between OD edge to poly of one side "), IOP( "sb", BSIM4v6_SB, IF_REAL , "distance between OD edge to poly of the other side"), IOP( "sd", BSIM4v6_SD, IF_REAL , "distance between neighbour fingers"), IOP( "sca", BSIM4v6_SCA, IF_REAL , "Integral of the first distribution function for scattered well dopant"), IOP( "scb", BSIM4v6_SCB, IF_REAL , "Integral of the second distribution function for scattered well dopant"), IOP( "scc", BSIM4v6_SCC, IF_REAL , "Integral of the third distribution function for scattered well dopant"), IOP( "sc", BSIM4v6_SC, IF_REAL , "Distance to a single well edge "), IOP( "min", BSIM4v6_MIN, IF_INTEGER , "Minimize either D or S"), IOP( "ad", BSIM4v6_AD, IF_REAL , "Drain area"), IOP( "as", BSIM4v6_AS, IF_REAL , "Source area"), IOP( "pd", BSIM4v6_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM4v6_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM4v6_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM4v6_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM4v6_OFF, IF_FLAG , "Device is initially off"), IOP( "rbdb", BSIM4v6_RBDB, IF_REAL , "Body resistance"), IOP( "rbsb", BSIM4v6_RBSB, IF_REAL , "Body resistance"), IOP( "rbpb", BSIM4v6_RBPB, IF_REAL , "Body resistance"), IOP( "rbps", BSIM4v6_RBPS, IF_REAL , "Body resistance"), IOP( "rbpd", BSIM4v6_RBPD, IF_REAL , "Body resistance"), IOP( "delvto", BSIM4v6_DELVTO, IF_REAL , "Zero bias threshold voltage variation"), IOP( "xgw", BSIM4v6_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "ngcon", BSIM4v6_NGCON, IF_REAL, "Number of gate contacts"), IOP( "trnqsmod", BSIM4v6_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v6_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "rbodymod", BSIM4v6_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v6_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), IOP( "geomod", BSIM4v6_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4v6_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IP( "ic", BSIM4v6_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM4v6_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM4v6_GM, IF_REAL, "Gm"), OP( "gds", BSIM4v6_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM4v6_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM4v6_VON, IF_REAL, "Vth"), OP( "id", BSIM4v6_CD, IF_REAL, "Ids"), OP( "ibd", BSIM4v6_CBD, IF_REAL, "Ibd"), OP( "ibs", BSIM4v6_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM4v6_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM4v6_GBS, IF_REAL, "gbs"), OP( "isub", BSIM4v6_CSUB, IF_REAL, "Isub"), OP( "igidl", BSIM4v6_IGIDL, IF_REAL, "Igidl"), OP( "igisl", BSIM4v6_IGISL, IF_REAL, "Igisl"), OP( "igs", BSIM4v6_IGS, IF_REAL, "Igs"), OP( "igd", BSIM4v6_IGD, IF_REAL, "Igd"), OP( "igb", BSIM4v6_IGB, IF_REAL, "Igb"), OP( "igcs", BSIM4v6_IGCS, IF_REAL, "Igcs"), OP( "igcd", BSIM4v6_IGCD, IF_REAL, "Igcd"), OP( "vbs", BSIM4v6_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM4v6_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM4v6_VDS, IF_REAL, "Vds"), OP( "cgg", BSIM4v6_CGGB, IF_REAL, "Cggb"), OP( "cgs", BSIM4v6_CGSB, IF_REAL, "Cgsb"), OP( "cgd", BSIM4v6_CGDB, IF_REAL, "Cgdb"), OP( "cbg", BSIM4v6_CBGB, IF_REAL, "Cbgb"), OP( "cbd", BSIM4v6_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM4v6_CBSB, IF_REAL, "Cbsb"), OP( "cdg", BSIM4v6_CDGB, IF_REAL, "Cdgb"), OP( "cdd", BSIM4v6_CDDB, IF_REAL, "Cddb"), OP( "cds", BSIM4v6_CDSB, IF_REAL, "Cdsb"), OP( "csg", BSIM4v6_CSGB, IF_REAL, "Csgb"), OP( "csd", BSIM4v6_CSDB, IF_REAL, "Csdb"), OP( "css", BSIM4v6_CSSB, IF_REAL, "Cssb"), OP( "cgb", BSIM4v6_CGBB, IF_REAL, "Cgbb"), OP( "cdb", BSIM4v6_CDBB, IF_REAL, "Cdbb"), OP( "csb", BSIM4v6_CSBB, IF_REAL, "Csbb"), OP( "cbb", BSIM4v6_CBBB, IF_REAL, "Cbbb"), OP( "capbd", BSIM4v6_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM4v6_CAPBS, IF_REAL, "Capbs"), OP( "qg", BSIM4v6_QG, IF_REAL, "Qgate"), OP( "qb", BSIM4v6_QB, IF_REAL, "Qbulk"), OP( "qd", BSIM4v6_QD, IF_REAL, "Qdrain"), OP( "qs", BSIM4v6_QS, IF_REAL, "Qsource"), OP( "qinv", BSIM4v6_QINV, IF_REAL, "Qinversion"), OP( "qdef", BSIM4v6_QDEF, IF_REAL, "Qdef"), OP( "gcrg", BSIM4v6_GCRG, IF_REAL, "Gcrg"), OP( "gtau", BSIM4v6_GTAU, IF_REAL, "Gtau"), }; IFparm BSIM4v6mPTable[] = { /* model parameters */ IOP( "cvchargemod", BSIM4v6_MOD_CVCHARGEMOD, IF_INTEGER, "Capacitance Charge model selector"), IOP( "capmod", BSIM4v6_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "diomod", BSIM4v6_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), IOP( "rdsmod", BSIM4v6_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), IOP( "trnqsmod", BSIM4v6_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v6_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "mobmod", BSIM4v6_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "rbodymod", BSIM4v6_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v6_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), IOP( "permod", BSIM4v6_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), IOP( "geomod", BSIM4v6_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4v6_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IOP( "fnoimod", BSIM4v6_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), IOP( "tnoimod", BSIM4v6_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), IOP( "mtrlmod", BSIM4v6_MOD_MTRLMOD, IF_INTEGER, "parameter for non-silicon substrate or metal gate selector"), IOP( "igcmod", BSIM4v6_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), IOP( "igbmod", BSIM4v6_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), IOP( "tempmod", BSIM4v6_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), IOP( "paramchk", BSIM4v6_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM4v6_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM4v6_MOD_VERSION, IF_STRING, "parameter for model version"), IOP( "eot", BSIM4v6_MOD_EOT, IF_REAL, "Equivalent gate oxide thickness in meters"), IOP( "vddeot", BSIM4v6_MOD_VDDEOT, IF_REAL, "Voltage for extraction of Equivalent gate oxide thickness"), IOP( "tempeot", BSIM4v6_MOD_TEMPEOT, IF_REAL, " Temperature for extraction of EOT"), IOP( "leffeot", BSIM4v6_MOD_LEFFEOT, IF_REAL, " Effective length for extraction of EOT"), IOP( "weffeot", BSIM4v6_MOD_WEFFEOT, IF_REAL, "Effective width for extraction of EOT"), IOP( "ados", BSIM4v6_MOD_ADOS, IF_REAL, "Charge centroid parameter"), IOP( "bdos", BSIM4v6_MOD_BDOS, IF_REAL, "Charge centroid parameter"), IOP( "toxe", BSIM4v6_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), IOP( "toxp", BSIM4v6_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), IOP( "toxm", BSIM4v6_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), IOP( "toxref", BSIM4v6_MOD_TOXREF, IF_REAL, "Target tox value"), IOP( "dtox", BSIM4v6_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), IOP( "epsrox", BSIM4v6_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), IOP( "cdsc", BSIM4v6_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM4v6_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM4v6_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM4v6_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM4v6_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM4v6_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM4v6_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM4v6_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM4v6_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM4v6_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM4v6_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM4v6_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM4v6_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "phig", BSIM4v6_MOD_PHIG, IF_REAL, "Work function of gate"), IOP( "epsrgate", BSIM4v6_MOD_EPSRGATE, IF_REAL, "Dielectric constant of gate relative to vacuum"), IOP( "easub",BSIM4v6_MOD_EASUB, IF_REAL, "Electron affinity of substrate"), IOP( "epsrsub", BSIM4v6_MOD_EPSRSUB, IF_REAL, "Dielectric constant of substrate relative to vacuum"), IOP( "ni0sub", BSIM4v6_MOD_NI0SUB, IF_REAL, "Intrinsic carrier concentration of substrate at 300.15K"), IOP( "bg0sub", BSIM4v6_MOD_BG0SUB, IF_REAL, "Band-gap of substrate at T=0K"), IOP( "tbgasub", BSIM4v6_MOD_TBGASUB, IF_REAL, "First parameter of band-gap change due to temperature"), IOP( "tbgbsub", BSIM4v6_MOD_TBGBSUB, IF_REAL, "Second parameter of band-gap change due to temperature"), IOP( "nsub", BSIM4v6_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "ndep", BSIM4v6_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), IOP( "nsd", BSIM4v6_MOD_NSD, IF_REAL, "S/D doping concentration"), IOP( "phin", BSIM4v6_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), IOP( "ngate", BSIM4v6_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM4v6_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM4v6_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM4v6_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM4v6_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM4v6_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM4v6_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM4v6_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM4v6_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM4v6_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM4v6_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM4v6_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM4v6_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM4v6_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "dvtp0", BSIM4v6_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), IOP( "dvtp1", BSIM4v6_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), IOP( "lpe0", BSIM4v6_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), IOP( "lpeb", BSIM4v6_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), IOP( "dvt0", BSIM4v6_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM4v6_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM4v6_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM4v6_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM4v6_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM4v6_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM4v6_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM4v6_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM4v6_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM4v6_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM4v6_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM4v6_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM4v6_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM4v6_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM4v6_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM4v6_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "ud", BSIM4v6_MOD_UD, IF_REAL, "Coulomb scattering factor of mobility"), IOP( "ud1", BSIM4v6_MOD_UD1, IF_REAL, "Temperature coefficient of ud"), IOP( "up", BSIM4v6_MOD_UP, IF_REAL, "Channel length linear factor of mobility"), IOP( "lp", BSIM4v6_MOD_LP, IF_REAL, "Channel length exponential factor of mobility"), IOP( "u0", BSIM4v6_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "eu", BSIM4v6_MOD_EU, IF_REAL, "Mobility exponent"), IOP( "ucs", BSIM4v6_MOD_UCS, IF_REAL, "Colombic scattering exponent"), IOP( "ute", BSIM4v6_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "ucste", BSIM4v6_MOD_UCSTE, IF_REAL,"Temperature coefficient of colombic mobility"), IOP( "voff", BSIM4v6_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "minv", BSIM4v6_MOD_MINV, IF_REAL, "Fitting parameter for moderate inversion in Vgsteff"), IOP( "minvcv", BSIM4v6_MOD_MINVCV, IF_REAL, "Fitting parameter for moderate inversion in Vgsteffcv"), IOP( "voffl", BSIM4v6_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), IOP( "voffcvl", BSIM4v6_MOD_VOFFCVL, IF_REAL, "Length dependence parameter for Vth offset in CV"), IOP( "tnom", BSIM4v6_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM4v6_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM4v6_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM4v6_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM4v6_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", BSIM4v6_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM4v6_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM4v6_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "rdswmin", BSIM4v6_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), IOP( "rsw", BSIM4v6_MOD_RSW, IF_REAL, "Source resistance per width"), IOP( "rdw", BSIM4v6_MOD_RDW, IF_REAL, "Drain resistance per width"), IOP( "rdwmin", BSIM4v6_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), IOP( "rswmin", BSIM4v6_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), IOP( "prwg", BSIM4v6_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM4v6_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM4v6_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM4v6_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM4v6_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM4v6_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM4v6_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM4v6_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM4v6_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "fprout", BSIM4v6_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), IOP( "pdits", BSIM4v6_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), IOP( "pditsl", BSIM4v6_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), IOP( "pditsd", BSIM4v6_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), IOP( "pscbe1", BSIM4v6_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM4v6_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM4v6_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "jss", BSIM4v6_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), IOP( "jsws", BSIM4v6_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), IOP( "jswgs", BSIM4v6_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), IOP( "pbs", BSIM4v6_MOD_PBS, IF_REAL, "Source junction built-in potential"), IOP( "njs", BSIM4v6_MOD_NJS, IF_REAL, "Source junction emission coefficient"), IOP( "xtis", BSIM4v6_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), IOP( "mjs", BSIM4v6_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), IOP( "pbsws", BSIM4v6_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), IOP( "mjsws", BSIM4v6_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), IOP( "pbswgs", BSIM4v6_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgs", BSIM4v6_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjs", BSIM4v6_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), IOP( "cjsws", BSIM4v6_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), IOP( "cjswgs", BSIM4v6_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), IOP( "jsd", BSIM4v6_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), IOP( "jswd", BSIM4v6_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), IOP( "jswgd", BSIM4v6_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), IOP( "pbd", BSIM4v6_MOD_PBD, IF_REAL, "Drain junction built-in potential"), IOP( "njd", BSIM4v6_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), IOP( "xtid", BSIM4v6_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), IOP( "mjd", BSIM4v6_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), IOP( "pbswd", BSIM4v6_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), IOP( "mjswd", BSIM4v6_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), IOP( "pbswgd", BSIM4v6_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgd", BSIM4v6_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjd", BSIM4v6_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), IOP( "cjswd", BSIM4v6_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), IOP( "cjswgd", BSIM4v6_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), IOP( "vfbcv", BSIM4v6_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM4v6_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "tpb", BSIM4v6_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM4v6_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM4v6_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM4v6_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM4v6_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM4v6_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM4v6_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM4v6_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM4v6_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM4v6_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "dmcg", BSIM4v6_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), IOP( "dmci", BSIM4v6_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), IOP( "dmdg", BSIM4v6_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), IOP( "dmcgt", BSIM4v6_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), IOP( "xgw", BSIM4v6_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "xgl", BSIM4v6_MOD_XGL, IF_REAL, "Variation in Ldrawn"), IOP( "rshg", BSIM4v6_MOD_RSHG, IF_REAL, "Gate sheet resistance"), IOP( "ngcon", BSIM4v6_MOD_NGCON, IF_REAL, "Number of gate contacts"), IOP( "xrcrg1", BSIM4v6_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), IOP( "xrcrg2", BSIM4v6_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), IOP( "lambda", BSIM4v6_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), IOP( "vtl", BSIM4v6_MOD_VTL, IF_REAL, " thermal velocity"), IOP( "lc", BSIM4v6_MOD_LC, IF_REAL, " back scattering parameter"), IOP( "xn", BSIM4v6_MOD_XN, IF_REAL, " back scattering parameter"), IOP( "vfbsdoff", BSIM4v6_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), IOP( "tvfbsdoff", BSIM4v6_MOD_TVFBSDOFF, IF_REAL, "Temperature parameter for vfbsdoff"), IOP( "tvoff", BSIM4v6_MOD_TVOFF, IF_REAL, "Temperature parameter for voff"), IOP( "lintnoi", BSIM4v6_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), IOP( "lint", BSIM4v6_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM4v6_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM4v6_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM4v6_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM4v6_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM4v6_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM4v6_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM4v6_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM4v6_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM4v6_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM4v6_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM4v6_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM4v6_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM4v6_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM4v6_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM4v6_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM4v6_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM4v6_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM4v6_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM4v6_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM4v6_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM4v6_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM4v6_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM4v6_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM4v6_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM4v6_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM4v6_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM4v6_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM4v6_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappas", BSIM4v6_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), IOP( "ckappad", BSIM4v6_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), IOP( "cf", BSIM4v6_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM4v6_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM4v6_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM4v6_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM4v6_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "xw", BSIM4v6_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), IOP( "xl", BSIM4v6_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), IOP( "dlcig", BSIM4v6_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), IOP( "dlcigd", BSIM4v6_MOD_DLCIGD, IF_REAL, "Delta L for Ig model drain side"), IOP( "dwj", BSIM4v6_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), IOP( "alpha0", BSIM4v6_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM4v6_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM4v6_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "agidl", BSIM4v6_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), IOP( "bgidl", BSIM4v6_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), IOP( "cgidl", BSIM4v6_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), IOP( "egidl", BSIM4v6_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "agisl", BSIM4v6_MOD_AGISL, IF_REAL, "Pre-exponential constant for GISL"), IOP( "bgisl", BSIM4v6_MOD_BGISL, IF_REAL, "Exponential constant for GISL"), IOP( "cgisl", BSIM4v6_MOD_CGISL, IF_REAL, "Parameter for body-bias dependence of GISL"), IOP( "egisl", BSIM4v6_MOD_EGISL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "aigc", BSIM4v6_MOD_AIGC, IF_REAL, "Parameter for Igc"), IOP( "bigc", BSIM4v6_MOD_BIGC, IF_REAL, "Parameter for Igc"), IOP( "cigc", BSIM4v6_MOD_CIGC, IF_REAL, "Parameter for Igc"), IOP( "aigsd", BSIM4v6_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "bigsd", BSIM4v6_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "cigsd", BSIM4v6_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "aigs", BSIM4v6_MOD_AIGS, IF_REAL, "Parameter for Igs"), IOP( "bigs", BSIM4v6_MOD_BIGS, IF_REAL, "Parameter for Igs"), IOP( "cigs", BSIM4v6_MOD_CIGS, IF_REAL, "Parameter for Igs"), IOP( "aigd", BSIM4v6_MOD_AIGD, IF_REAL, "Parameter for Igd"), IOP( "bigd", BSIM4v6_MOD_BIGD, IF_REAL, "Parameter for Igd"), IOP( "cigd", BSIM4v6_MOD_CIGD, IF_REAL, "Parameter for Igd"), IOP( "aigbacc", BSIM4v6_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), IOP( "bigbacc", BSIM4v6_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), IOP( "cigbacc", BSIM4v6_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), IOP( "aigbinv", BSIM4v6_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), IOP( "bigbinv", BSIM4v6_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), IOP( "cigbinv", BSIM4v6_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), IOP( "nigc", BSIM4v6_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), IOP( "nigbinv", BSIM4v6_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), IOP( "nigbacc", BSIM4v6_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), IOP( "ntox", BSIM4v6_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), IOP( "eigbinv", BSIM4v6_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), IOP( "pigcd", BSIM4v6_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), IOP( "poxedge", BSIM4v6_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), IOP( "ijthdfwd", BSIM4v6_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), IOP( "ijthsfwd", BSIM4v6_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), IOP( "ijthdrev", BSIM4v6_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), IOP( "ijthsrev", BSIM4v6_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), IOP( "xjbvd", BSIM4v6_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), IOP( "xjbvs", BSIM4v6_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), IOP( "bvd", BSIM4v6_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), IOP( "bvs", BSIM4v6_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), IOP( "jtss", BSIM4v6_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), IOP( "jtsd", BSIM4v6_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), IOP( "jtssws", BSIM4v6_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), IOP( "jtsswd", BSIM4v6_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), IOP( "jtsswgs", BSIM4v6_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), IOP( "jtsswgd", BSIM4v6_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), IOP( "jtweff", BSIM4v6_MOD_JTWEFF, IF_REAL, "TAT current width dependance"), IOP( "njts", BSIM4v6_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), IOP( "njtssw", BSIM4v6_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), IOP( "njtsswg", BSIM4v6_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), IOP( "njtsd", BSIM4v6_MOD_NJTSD, IF_REAL, "Non-ideality factor for bottom junction drain side"), IOP( "njtsswd", BSIM4v6_MOD_NJTSSWD, IF_REAL, "Non-ideality factor for STI sidewall junction drain side"), IOP( "njtsswgd", BSIM4v6_MOD_NJTSSWGD, IF_REAL, "Non-ideality factor for gate-edge sidewall junction drain side"), IOP( "xtss", BSIM4v6_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), IOP( "xtsd", BSIM4v6_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), IOP( "xtssws", BSIM4v6_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), IOP( "xtsswd", BSIM4v6_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), IOP( "xtsswgs", BSIM4v6_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), IOP( "xtsswgd", BSIM4v6_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), IOP( "tnjts", BSIM4v6_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), IOP( "tnjtssw", BSIM4v6_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), IOP( "tnjtsswg", BSIM4v6_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), IOP( "tnjtsd", BSIM4v6_MOD_TNJTSD, IF_REAL, "Temperature coefficient for NJTSD"), IOP( "tnjtsswd", BSIM4v6_MOD_TNJTSSWD, IF_REAL, "Temperature coefficient for NJTSSWD"), IOP( "tnjtsswgd", BSIM4v6_MOD_TNJTSSWGD, IF_REAL, "Temperature coefficient for NJTSSWGD"), IOP( "vtss", BSIM4v6_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), IOP( "vtsd", BSIM4v6_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), IOP( "vtssws", BSIM4v6_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswd", BSIM4v6_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgs", BSIM4v6_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgd", BSIM4v6_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "gbmin", BSIM4v6_MOD_GBMIN, IF_REAL, "Minimum body conductance"), IOP( "rbdb", BSIM4v6_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), IOP( "rbpb", BSIM4v6_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbsb", BSIM4v6_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), IOP( "rbps", BSIM4v6_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), IOP( "rbpd", BSIM4v6_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbps0", BSIM4v6_MOD_RBPS0, IF_REAL , "Body resistance RBPS scaling"), IOP( "rbpsl", BSIM4v6_MOD_RBPSL, IF_REAL , "Body resistance RBPS L scaling"), IOP( "rbpsw", BSIM4v6_MOD_RBPSW, IF_REAL , "Body resistance RBPS W scaling"), IOP( "rbpsnf", BSIM4v6_MOD_RBPSNF, IF_REAL , "Body resistance RBPS NF scaling"), IOP( "rbpd0", BSIM4v6_MOD_RBPD0, IF_REAL , "Body resistance RBPD scaling"), IOP( "rbpdl", BSIM4v6_MOD_RBPDL, IF_REAL , "Body resistance RBPD L scaling"), IOP( "rbpdw", BSIM4v6_MOD_RBPDW, IF_REAL , "Body resistance RBPD W scaling"), IOP( "rbpdnf", BSIM4v6_MOD_RBPDNF, IF_REAL , "Body resistance RBPD NF scaling"), IOP( "rbpbx0", BSIM4v6_MOD_RBPBX0, IF_REAL , "Body resistance RBPBX scaling"), IOP( "rbpbxl", BSIM4v6_MOD_RBPBXL, IF_REAL , "Body resistance RBPBX L scaling"), IOP( "rbpbxw", BSIM4v6_MOD_RBPBXW, IF_REAL , "Body resistance RBPBX W scaling"), IOP( "rbpbxnf", BSIM4v6_MOD_RBPBXNF, IF_REAL , "Body resistance RBPBX NF scaling"), IOP( "rbpby0", BSIM4v6_MOD_RBPBY0, IF_REAL , "Body resistance RBPBY scaling"), IOP( "rbpbyl", BSIM4v6_MOD_RBPBYL, IF_REAL , "Body resistance RBPBY L scaling"), IOP( "rbpbyw", BSIM4v6_MOD_RBPBYW, IF_REAL , "Body resistance RBPBY W scaling"), IOP( "rbpbynf", BSIM4v6_MOD_RBPBYNF, IF_REAL , "Body resistance RBPBY NF scaling"), IOP( "rbsbx0", BSIM4v6_MOD_RBSBX0, IF_REAL , "Body resistance RBSBX scaling"), IOP( "rbsby0", BSIM4v6_MOD_RBSBY0, IF_REAL , "Body resistance RBSBY scaling"), IOP( "rbdbx0", BSIM4v6_MOD_RBDBX0, IF_REAL , "Body resistance RBDBX scaling"), IOP( "rbdby0", BSIM4v6_MOD_RBDBY0, IF_REAL , "Body resistance RBDBY scaling"), IOP( "rbsdbxl", BSIM4v6_MOD_RBSDBXL, IF_REAL , "Body resistance RBSDBX L scaling"), IOP( "rbsdbxw", BSIM4v6_MOD_RBSDBXW, IF_REAL , "Body resistance RBSDBX W scaling"), IOP( "rbsdbxnf", BSIM4v6_MOD_RBSDBXNF, IF_REAL , "Body resistance RBSDBX NF scaling"), IOP( "rbsdbyl", BSIM4v6_MOD_RBSDBYL, IF_REAL , "Body resistance RBSDBY L scaling"), IOP( "rbsdbyw", BSIM4v6_MOD_RBSDBYW, IF_REAL , "Body resistance RBSDBY W scaling"), IOP( "rbsdbynf", BSIM4v6_MOD_RBSDBYNF, IF_REAL , "Body resistance RBSDBY NF scaling"), IOP( "lcdsc", BSIM4v6_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM4v6_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM4v6_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM4v6_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM4v6_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM4v6_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM4v6_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM4v6_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM4v6_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM4v6_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM4v6_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM4v6_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM4v6_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM4v6_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lndep", BSIM4v6_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP( "lnsd", BSIM4v6_MOD_LNSD, IF_REAL, "Length dependence of nsd"), IOP( "lphin", BSIM4v6_MOD_LPHIN, IF_REAL, "Length dependence of phin"), IOP( "lngate", BSIM4v6_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM4v6_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM4v6_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM4v6_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM4v6_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM4v6_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM4v6_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM4v6_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM4v6_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM4v6_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM4v6_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM4v6_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM4v6_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM4v6_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "ldvtp0", BSIM4v6_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), IOP( "ldvtp1", BSIM4v6_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), IOP( "llpe0", BSIM4v6_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), IOP( "llpeb", BSIM4v6_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), IOP( "ldvt0", BSIM4v6_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM4v6_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM4v6_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM4v6_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM4v6_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM4v6_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM4v6_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM4v6_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM4v6_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM4v6_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM4v6_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM4v6_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM4v6_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM4v6_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM4v6_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM4v6_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lud", BSIM4v6_MOD_LUD, IF_REAL, "Length dependence of ud"), IOP( "lud1", BSIM4v6_MOD_LUD1, IF_REAL, "Length dependence of ud1"), IOP( "lup", BSIM4v6_MOD_LUP, IF_REAL, "Length dependence of up"), IOP( "llp", BSIM4v6_MOD_LLP, IF_REAL, "Length dependence of lp"), IOP( "lu0", BSIM4v6_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM4v6_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lucste", BSIM4v6_MOD_LUCSTE, IF_REAL, "Length dependence of ucste"), IOP( "lvoff", BSIM4v6_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lminv", BSIM4v6_MOD_LMINV, IF_REAL, "Length dependence of minv"), IOP( "lminvcv", BSIM4v6_MOD_LMINVCV, IF_REAL, "Length dependence of minvcv"), IOP( "ldelta", BSIM4v6_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM4v6_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lrsw", BSIM4v6_MOD_LRSW, IF_REAL, "Length dependence of rsw"), IOP( "lrdw", BSIM4v6_MOD_LRDW, IF_REAL, "Length dependence of rdw"), IOP( "lprwg", BSIM4v6_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM4v6_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM4v6_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM4v6_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM4v6_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM4v6_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM4v6_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM4v6_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM4v6_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lfprout", BSIM4v6_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpdits", BSIM4v6_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), IOP( "lpditsd", BSIM4v6_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), IOP( "lpscbe1", BSIM4v6_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM4v6_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM4v6_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM4v6_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM4v6_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM4v6_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM4v6_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM4v6_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM4v6_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM4v6_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappas", BSIM4v6_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), IOP( "lckappad", BSIM4v6_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), IOP( "lcf", BSIM4v6_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM4v6_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM4v6_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM4v6_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM4v6_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM4v6_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", BSIM4v6_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", BSIM4v6_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lcgidl", BSIM4v6_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), IOP( "legidl", BSIM4v6_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), IOP( "lagisl", BSIM4v6_MOD_LAGISL, IF_REAL, "Length dependence of agisl"), IOP( "lbgisl", BSIM4v6_MOD_LBGISL, IF_REAL, "Length dependence of bgisl"), IOP( "lcgisl", BSIM4v6_MOD_LCGISL, IF_REAL, "Length dependence of cgisl"), IOP( "legisl", BSIM4v6_MOD_LEGISL, IF_REAL, "Length dependence of egisl"), IOP( "laigc", BSIM4v6_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), IOP( "lbigc", BSIM4v6_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), IOP( "lcigc", BSIM4v6_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), IOP( "laigsd", BSIM4v6_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), IOP( "lbigsd", BSIM4v6_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), IOP( "lcigsd", BSIM4v6_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), IOP( "laigs", BSIM4v6_MOD_LAIGS, IF_REAL, "Length dependence of aigs"), IOP( "lbigs", BSIM4v6_MOD_LBIGS, IF_REAL, "Length dependence of bigs"), IOP( "lcigs", BSIM4v6_MOD_LCIGS, IF_REAL, "Length dependence of cigs"), IOP( "laigd", BSIM4v6_MOD_LAIGD, IF_REAL, "Length dependence of aigd"), IOP( "lbigd", BSIM4v6_MOD_LBIGD, IF_REAL, "Length dependence of bigd"), IOP( "lcigd", BSIM4v6_MOD_LCIGD, IF_REAL, "Length dependence of cigd"), IOP( "laigbacc", BSIM4v6_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), IOP( "lbigbacc", BSIM4v6_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), IOP( "lcigbacc", BSIM4v6_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), IOP( "laigbinv", BSIM4v6_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), IOP( "lbigbinv", BSIM4v6_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), IOP( "lcigbinv", BSIM4v6_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), IOP( "lnigc", BSIM4v6_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), IOP( "lnigbinv", BSIM4v6_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), IOP( "lnigbacc", BSIM4v6_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), IOP( "lntox", BSIM4v6_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), IOP( "leigbinv", BSIM4v6_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), IOP( "lpigcd", BSIM4v6_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), IOP( "lpoxedge", BSIM4v6_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), IOP( "lvfbcv", BSIM4v6_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM4v6_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM4v6_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM4v6_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM4v6_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM4v6_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "lxrcrg1", BSIM4v6_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), IOP( "lxrcrg2", BSIM4v6_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), IOP( "llambda", BSIM4v6_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), IOP( "lvtl", BSIM4v6_MOD_LVTL, IF_REAL, " Length dependence of vtl"), IOP( "lxn", BSIM4v6_MOD_LXN, IF_REAL, " Length dependence of xn"), IOP( "leu", BSIM4v6_MOD_LEU, IF_REAL, " Length dependence of eu"), IOP( "lucs", BSIM4v6_MOD_LUCS, IF_REAL, "Length dependence of lucs"), IOP( "lvfbsdoff", BSIM4v6_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), IOP( "ltvfbsdoff", BSIM4v6_MOD_LTVFBSDOFF, IF_REAL, "Length dependence of tvfbsdoff"), IOP( "ltvoff", BSIM4v6_MOD_LTVOFF, IF_REAL, "Length dependence of tvoff"), IOP( "wcdsc", BSIM4v6_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM4v6_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM4v6_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM4v6_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM4v6_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM4v6_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM4v6_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM4v6_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM4v6_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM4v6_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM4v6_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM4v6_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM4v6_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM4v6_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wndep", BSIM4v6_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP( "wnsd", BSIM4v6_MOD_WNSD, IF_REAL, "Width dependence of nsd"), IOP( "wphin", BSIM4v6_MOD_WPHIN, IF_REAL, "Width dependence of phin"), IOP( "wngate", BSIM4v6_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM4v6_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM4v6_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM4v6_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM4v6_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM4v6_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM4v6_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM4v6_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM4v6_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM4v6_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM4v6_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM4v6_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM4v6_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM4v6_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wdvtp0", BSIM4v6_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), IOP( "wdvtp1", BSIM4v6_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), IOP( "wlpe0", BSIM4v6_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), IOP( "wlpeb", BSIM4v6_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), IOP( "wdvt0", BSIM4v6_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM4v6_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM4v6_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM4v6_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM4v6_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM4v6_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM4v6_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM4v6_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM4v6_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM4v6_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM4v6_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM4v6_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM4v6_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM4v6_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM4v6_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM4v6_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wud", BSIM4v6_MOD_WUD, IF_REAL, "Width dependence of ud"), IOP( "wud1", BSIM4v6_MOD_WUD1, IF_REAL, "Width dependence of ud1"), IOP( "wup", BSIM4v6_MOD_WUP, IF_REAL, "Width dependence of up"), IOP( "wlp", BSIM4v6_MOD_WLP, IF_REAL, "Width dependence of lp"), IOP( "wu0", BSIM4v6_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM4v6_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wucste", BSIM4v6_MOD_WUCSTE, IF_REAL, "Width dependence of ucste"), IOP( "wvoff", BSIM4v6_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "wminv", BSIM4v6_MOD_WMINV, IF_REAL, "Width dependence of minv"), IOP( "wminvcv", BSIM4v6_MOD_WMINVCV, IF_REAL, "Width dependence of minvcv"), IOP( "wdelta", BSIM4v6_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM4v6_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wrsw", BSIM4v6_MOD_WRSW, IF_REAL, "Width dependence of rsw"), IOP( "wrdw", BSIM4v6_MOD_WRDW, IF_REAL, "Width dependence of rdw"), IOP( "wprwg", BSIM4v6_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM4v6_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM4v6_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM4v6_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM4v6_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM4v6_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM4v6_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM4v6_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM4v6_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wfprout", BSIM4v6_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpdits", BSIM4v6_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), IOP( "wpditsd", BSIM4v6_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), IOP( "wpscbe1", BSIM4v6_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM4v6_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM4v6_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM4v6_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM4v6_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM4v6_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM4v6_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM4v6_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM4v6_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM4v6_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappas", BSIM4v6_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), IOP( "wckappad", BSIM4v6_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), IOP( "wcf", BSIM4v6_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM4v6_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM4v6_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM4v6_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM4v6_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM4v6_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", BSIM4v6_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", BSIM4v6_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wcgidl", BSIM4v6_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), IOP( "wegidl", BSIM4v6_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), IOP( "wagisl", BSIM4v6_MOD_WAGISL, IF_REAL, "Width dependence of agisl"), IOP( "wbgisl", BSIM4v6_MOD_WBGISL, IF_REAL, "Width dependence of bgisl"), IOP( "wcgisl", BSIM4v6_MOD_WCGISL, IF_REAL, "Width dependence of cgisl"), IOP( "wegisl", BSIM4v6_MOD_WEGISL, IF_REAL, "Width dependence of egisl"), IOP( "waigc", BSIM4v6_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), IOP( "wbigc", BSIM4v6_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), IOP( "wcigc", BSIM4v6_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), IOP( "waigsd", BSIM4v6_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), IOP( "wbigsd", BSIM4v6_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), IOP( "wcigsd", BSIM4v6_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), IOP( "waigs", BSIM4v6_MOD_WAIGS, IF_REAL, "Width dependence of aigs"), IOP( "wbigs", BSIM4v6_MOD_WBIGS, IF_REAL, "Width dependence of bigs"), IOP( "wcigs", BSIM4v6_MOD_WCIGS, IF_REAL, "Width dependence of cigs"), IOP( "waigd", BSIM4v6_MOD_WAIGD, IF_REAL, "Width dependence of aigd"), IOP( "wbigd", BSIM4v6_MOD_WBIGD, IF_REAL, "Width dependence of bigd"), IOP( "wcigd", BSIM4v6_MOD_WCIGD, IF_REAL, "Width dependence of cigd"), IOP( "waigbacc", BSIM4v6_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), IOP( "wbigbacc", BSIM4v6_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), IOP( "wcigbacc", BSIM4v6_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), IOP( "waigbinv", BSIM4v6_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), IOP( "wbigbinv", BSIM4v6_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), IOP( "wcigbinv", BSIM4v6_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), IOP( "wnigc", BSIM4v6_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), IOP( "wnigbinv", BSIM4v6_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), IOP( "wnigbacc", BSIM4v6_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), IOP( "wntox", BSIM4v6_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), IOP( "weigbinv", BSIM4v6_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), IOP( "wpigcd", BSIM4v6_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), IOP( "wpoxedge", BSIM4v6_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), IOP( "wvfbcv", BSIM4v6_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM4v6_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM4v6_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM4v6_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM4v6_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM4v6_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "wxrcrg1", BSIM4v6_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), IOP( "wxrcrg2", BSIM4v6_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), IOP( "wlambda", BSIM4v6_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), IOP( "wvtl", BSIM4v6_MOD_WVTL, IF_REAL, "Width dependence of vtl"), IOP( "wxn", BSIM4v6_MOD_WXN, IF_REAL, "Width dependence of xn"), IOP( "weu", BSIM4v6_MOD_WEU, IF_REAL, "Width dependence of eu"), IOP( "wucs", BSIM4v6_MOD_WUCS, IF_REAL, "Width dependence of ucs"), IOP( "wvfbsdoff", BSIM4v6_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), IOP( "wtvfbsdoff", BSIM4v6_MOD_WTVFBSDOFF, IF_REAL, "Width dependence of tvfbsdoff"), IOP( "wtvoff", BSIM4v6_MOD_WTVOFF, IF_REAL, "Width dependence of tvoff"), IOP( "pcdsc", BSIM4v6_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM4v6_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM4v6_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM4v6_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM4v6_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM4v6_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM4v6_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM4v6_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM4v6_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM4v6_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM4v6_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM4v6_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM4v6_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM4v6_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pndep", BSIM4v6_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP( "pnsd", BSIM4v6_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), IOP( "pphin", BSIM4v6_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), IOP( "pngate", BSIM4v6_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM4v6_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM4v6_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM4v6_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM4v6_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM4v6_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM4v6_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM4v6_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM4v6_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM4v6_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM4v6_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM4v6_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM4v6_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM4v6_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pdvtp0", BSIM4v6_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), IOP( "pdvtp1", BSIM4v6_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), IOP( "plpe0", BSIM4v6_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), IOP( "plpeb", BSIM4v6_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), IOP( "pdvt0", BSIM4v6_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM4v6_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM4v6_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM4v6_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM4v6_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM4v6_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM4v6_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM4v6_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM4v6_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM4v6_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM4v6_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM4v6_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM4v6_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM4v6_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM4v6_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM4v6_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pud", BSIM4v6_MOD_PUD, IF_REAL, "Cross-term dependence of ud"), IOP( "pud1", BSIM4v6_MOD_PUD1, IF_REAL, "Cross-term dependence of ud1"), IOP( "pup", BSIM4v6_MOD_PUP, IF_REAL, "Cross-term dependence of up"), IOP( "plp", BSIM4v6_MOD_PLP, IF_REAL, "Cross-term dependence of lp"), IOP( "pu0", BSIM4v6_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM4v6_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pucste", BSIM4v6_MOD_PUCSTE, IF_REAL, "Cross-term dependence of ucste"), IOP( "pvoff", BSIM4v6_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pminv", BSIM4v6_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), IOP( "pminvcv", BSIM4v6_MOD_PMINVCV, IF_REAL, "Cross-term dependence of minvcv"), IOP( "pdelta", BSIM4v6_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM4v6_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "prsw", BSIM4v6_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), IOP( "prdw", BSIM4v6_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), IOP( "pprwg", BSIM4v6_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM4v6_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM4v6_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM4v6_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM4v6_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM4v6_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM4v6_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM4v6_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM4v6_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pfprout", BSIM4v6_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppdits", BSIM4v6_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), IOP( "ppditsd", BSIM4v6_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), IOP( "ppscbe1", BSIM4v6_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM4v6_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM4v6_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM4v6_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM4v6_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM4v6_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM4v6_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM4v6_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM4v6_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM4v6_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappas", BSIM4v6_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), IOP( "pckappad", BSIM4v6_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), IOP( "pcf", BSIM4v6_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM4v6_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM4v6_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM4v6_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM4v6_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM4v6_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", BSIM4v6_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", BSIM4v6_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pcgidl", BSIM4v6_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), IOP( "pegidl", BSIM4v6_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), IOP( "pagisl", BSIM4v6_MOD_PAGISL, IF_REAL, "Cross-term dependence of agisl"), IOP( "pbgisl", BSIM4v6_MOD_PBGISL, IF_REAL, "Cross-term dependence of bgisl"), IOP( "pcgisl", BSIM4v6_MOD_PCGISL, IF_REAL, "Cross-term dependence of cgisl"), IOP( "pegisl", BSIM4v6_MOD_PEGISL, IF_REAL, "Cross-term dependence of egisl"), IOP( "paigc", BSIM4v6_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), IOP( "pbigc", BSIM4v6_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), IOP( "pcigc", BSIM4v6_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), IOP( "paigsd", BSIM4v6_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), IOP( "pbigsd", BSIM4v6_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), IOP( "pcigsd", BSIM4v6_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), IOP( "paigs", BSIM4v6_MOD_PAIGS, IF_REAL, "Cross-term dependence of aigs"), IOP( "pbigs", BSIM4v6_MOD_PBIGS, IF_REAL, "Cross-term dependence of bigs"), IOP( "pcigs", BSIM4v6_MOD_PCIGS, IF_REAL, "Cross-term dependence of cigs"), IOP( "paigd", BSIM4v6_MOD_PAIGD, IF_REAL, "Cross-term dependence of aigd"), IOP( "pbigd", BSIM4v6_MOD_PBIGD, IF_REAL, "Cross-term dependence of bigd"), IOP( "pcigd", BSIM4v6_MOD_PCIGD, IF_REAL, "Cross-term dependence of cigd"), IOP( "paigbacc", BSIM4v6_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), IOP( "pbigbacc", BSIM4v6_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), IOP( "pcigbacc", BSIM4v6_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), IOP( "paigbinv", BSIM4v6_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), IOP( "pbigbinv", BSIM4v6_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), IOP( "pcigbinv", BSIM4v6_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), IOP( "pnigc", BSIM4v6_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), IOP( "pnigbinv", BSIM4v6_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), IOP( "pnigbacc", BSIM4v6_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), IOP( "pntox", BSIM4v6_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), IOP( "peigbinv", BSIM4v6_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), IOP( "ppigcd", BSIM4v6_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), IOP( "ppoxedge", BSIM4v6_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), IOP( "pvfbcv", BSIM4v6_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM4v6_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM4v6_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM4v6_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM4v6_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM4v6_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "pxrcrg1", BSIM4v6_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), IOP( "pxrcrg2", BSIM4v6_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), IOP( "plambda", BSIM4v6_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), IOP( "pvtl", BSIM4v6_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), IOP( "pxn", BSIM4v6_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), IOP( "peu", BSIM4v6_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), IOP( "pucs", BSIM4v6_MOD_PUCS, IF_REAL, "Cross-term dependence of ucs"), IOP( "pvfbsdoff", BSIM4v6_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), IOP( "ptvfbsdoff", BSIM4v6_MOD_PTVFBSDOFF, IF_REAL, "Cross-term dependence of tvfbsdoff"), IOP( "ptvoff", BSIM4v6_MOD_PTVOFF, IF_REAL, "Cross-term dependence of tvoff"), /* stress effect*/ IOP( "saref", BSIM4v6_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), IOP( "sbref", BSIM4v6_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), IOP( "wlod", BSIM4v6_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), IOP( "ku0", BSIM4v6_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), IOP( "kvsat", BSIM4v6_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), IOP( "kvth0", BSIM4v6_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), IOP( "tku0", BSIM4v6_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), IOP( "llodku0", BSIM4v6_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), IOP( "wlodku0", BSIM4v6_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), IOP( "llodvth", BSIM4v6_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), IOP( "wlodvth", BSIM4v6_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), IOP( "lku0", BSIM4v6_MOD_LKU0, IF_REAL, "Length dependence of ku0"), IOP( "wku0", BSIM4v6_MOD_WKU0, IF_REAL, "Width dependence of ku0"), IOP( "pku0", BSIM4v6_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), IOP( "lkvth0", BSIM4v6_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), IOP( "wkvth0", BSIM4v6_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), IOP( "pkvth0", BSIM4v6_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), IOP( "stk2", BSIM4v6_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), IOP( "lodk2", BSIM4v6_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), IOP( "steta0", BSIM4v6_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), IOP( "lodeta0", BSIM4v6_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), /* Well Proximity Effect */ IOP( "web", BSIM4v6_MOD_WEB, IF_REAL, "Coefficient for SCB"), IOP( "wec", BSIM4v6_MOD_WEC, IF_REAL, "Coefficient for SCC"), IOP( "kvth0we", BSIM4v6_MOD_KVTH0WE, IF_REAL, "Threshold shift factor for well proximity effect"), IOP( "k2we", BSIM4v6_MOD_K2WE, IF_REAL, " K2 shift factor for well proximity effect "), IOP( "ku0we", BSIM4v6_MOD_KU0WE, IF_REAL, " Mobility degradation factor for well proximity effect "), IOP( "scref", BSIM4v6_MOD_SCREF, IF_REAL, " Reference distance to calculate SCA, SCB and SCC"), IOP( "wpemod", BSIM4v6_MOD_WPEMOD, IF_REAL, " Flag for WPE model (WPEMOD=1 to activate this model) "), IOP( "lkvth0we", BSIM4v6_MOD_LKVTH0WE, IF_REAL, "Length dependence of kvth0we"), IOP( "lk2we", BSIM4v6_MOD_LK2WE, IF_REAL, " Length dependence of k2we "), IOP( "lku0we", BSIM4v6_MOD_LKU0WE, IF_REAL, " Length dependence of ku0we "), IOP( "wkvth0we", BSIM4v6_MOD_WKVTH0WE, IF_REAL, "Width dependence of kvth0we"), IOP( "wk2we", BSIM4v6_MOD_WK2WE, IF_REAL, " Width dependence of k2we "), IOP( "wku0we", BSIM4v6_MOD_WKU0WE, IF_REAL, " Width dependence of ku0we "), IOP( "pkvth0we", BSIM4v6_MOD_PKVTH0WE, IF_REAL, "Cross-term dependence of kvth0we"), IOP( "pk2we", BSIM4v6_MOD_PK2WE, IF_REAL, " Cross-term dependence of k2we "), IOP( "pku0we", BSIM4v6_MOD_PKU0WE, IF_REAL, " Cross-term dependence of ku0we "), IOP( "noia", BSIM4v6_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM4v6_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM4v6_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "tnoia", BSIM4v6_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), IOP( "tnoib", BSIM4v6_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), IOP( "rnoia", BSIM4v6_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), IOP( "rnoib", BSIM4v6_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), IOP( "ntnoi", BSIM4v6_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), IOP( "em", BSIM4v6_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM4v6_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM4v6_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM4v6_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP("vgs_max", BSIM4v6_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", BSIM4v6_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", BSIM4v6_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", BSIM4v6_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", BSIM4v6_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", BSIM4v6_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", BSIM4v6_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM4v6_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM4v6names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM4v6nSize = NUMELEMS(BSIM4v6names); int BSIM4v6pTSize = NUMELEMS(BSIM4v6pTable); int BSIM4v6mPTSize = NUMELEMS(BSIM4v6mPTable); int BSIM4v6iSize = sizeof(BSIM4v6instance); int BSIM4v6mSize = sizeof(BSIM4v6model); ngspice-26/src/spicelib/devices/bsim4v6/bsim4v6init.c0000644000265600020320000000470212264261473022053 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim4v6itf.h" #include "bsim4v6ext.h" #include "bsim4v6init.h" SPICEdev BSIM4v6info = { { "BSIM4v6", "Berkeley Short Channel IGFET Model-4", &BSIM4v6nSize, &BSIM4v6nSize, BSIM4v6names, &BSIM4v6pTSize, BSIM4v6pTable, &BSIM4v6mPTSize, BSIM4v6mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, BSIM4v6param, /* DEVparam */ BSIM4v6mParam, /* DEVmodParam */ BSIM4v6load, /* DEVload */ BSIM4v6setup, /* DEVsetup */ BSIM4v6unsetup, /* DEVunsetup */ BSIM4v6setup, /* DEVpzSetup */ BSIM4v6temp, /* DEVtemperature */ BSIM4v6trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ BSIM4v6acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ BSIM4v6destroy, /* DEVdestroy */ BSIM4v6mDelete, /* DEVmodDelete */ BSIM4v6delete, /* DEVdelete */ BSIM4v6getic, /* DEVsetic */ BSIM4v6ask, /* DEVask */ BSIM4v6mAsk, /* DEVmodAsk */ BSIM4v6pzLoad, /* DEVpzLoad */ BSIM4v6convTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ BSIM4v6noise, /* DEVnoise */ BSIM4v6soaCheck,/* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &BSIM4v6iSize, /* DEVinstSize */ &BSIM4v6mSize /* DEVmodSize */ }; SPICEdev * get_bsim4v6_info(void) { return &BSIM4v6info; } ngspice-26/src/spicelib/devices/bsim4v6/b4v6mask.c0000644000265600020320000025526612264261473021347 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mask.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 07/31/2008. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM4v6model *model = (BSIM4v6model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM4v6_MOD_MOBMOD : value->iValue = model->BSIM4v6mobMod; return(OK); case BSIM4v6_MOD_PARAMCHK : value->iValue = model->BSIM4v6paramChk; return(OK); case BSIM4v6_MOD_BINUNIT : value->iValue = model->BSIM4v6binUnit; return(OK); case BSIM4v6_MOD_CVCHARGEMOD : value->iValue = model->BSIM4v6cvchargeMod; return(OK); case BSIM4v6_MOD_CAPMOD : value->iValue = model->BSIM4v6capMod; return(OK); case BSIM4v6_MOD_DIOMOD : value->iValue = model->BSIM4v6dioMod; return(OK); case BSIM4v6_MOD_TRNQSMOD : value->iValue = model->BSIM4v6trnqsMod; return(OK); case BSIM4v6_MOD_ACNQSMOD : value->iValue = model->BSIM4v6acnqsMod; return(OK); case BSIM4v6_MOD_FNOIMOD : value->iValue = model->BSIM4v6fnoiMod; return(OK); case BSIM4v6_MOD_TNOIMOD : value->iValue = model->BSIM4v6tnoiMod; return(OK); case BSIM4v6_MOD_RDSMOD : value->iValue = model->BSIM4v6rdsMod; return(OK); case BSIM4v6_MOD_RBODYMOD : value->iValue = model->BSIM4v6rbodyMod; return(OK); case BSIM4v6_MOD_RGATEMOD : value->iValue = model->BSIM4v6rgateMod; return(OK); case BSIM4v6_MOD_PERMOD : value->iValue = model->BSIM4v6perMod; return(OK); case BSIM4v6_MOD_GEOMOD : value->iValue = model->BSIM4v6geoMod; return(OK); case BSIM4v6_MOD_RGEOMOD : value->iValue = model->BSIM4v6rgeoMod; return(OK); case BSIM4v6_MOD_MTRLMOD : value->iValue = model->BSIM4v6mtrlMod; return(OK); case BSIM4v6_MOD_IGCMOD : value->iValue = model->BSIM4v6igcMod; return(OK); case BSIM4v6_MOD_IGBMOD : value->iValue = model->BSIM4v6igbMod; return(OK); case BSIM4v6_MOD_TEMPMOD : value->iValue = model->BSIM4v6tempMod; return(OK); case BSIM4v6_MOD_VERSION : value->sValue = model->BSIM4v6version; return(OK); case BSIM4v6_MOD_TOXREF : value->rValue = model->BSIM4v6toxref; return(OK); case BSIM4v6_MOD_EOT : value->rValue = model->BSIM4v6eot; return(OK); case BSIM4v6_MOD_VDDEOT : value->rValue = model->BSIM4v6vddeot; return(OK); case BSIM4v6_MOD_TEMPEOT : value->rValue = model->BSIM4v6tempeot; return(OK); case BSIM4v6_MOD_LEFFEOT : value->rValue = model->BSIM4v6leffeot; return(OK); case BSIM4v6_MOD_WEFFEOT : value->rValue = model->BSIM4v6weffeot; return(OK); case BSIM4v6_MOD_ADOS : value->rValue = model->BSIM4v6ados; return(OK); case BSIM4v6_MOD_BDOS : value->rValue = model->BSIM4v6bdos; return(OK); case BSIM4v6_MOD_TOXE : value->rValue = model->BSIM4v6toxe; return(OK); case BSIM4v6_MOD_TOXP : value->rValue = model->BSIM4v6toxp; return(OK); case BSIM4v6_MOD_TOXM : value->rValue = model->BSIM4v6toxm; return(OK); case BSIM4v6_MOD_DTOX : value->rValue = model->BSIM4v6dtox; return(OK); case BSIM4v6_MOD_EPSROX : value->rValue = model->BSIM4v6epsrox; return(OK); case BSIM4v6_MOD_CDSC : value->rValue = model->BSIM4v6cdsc; return(OK); case BSIM4v6_MOD_CDSCB : value->rValue = model->BSIM4v6cdscb; return(OK); case BSIM4v6_MOD_CDSCD : value->rValue = model->BSIM4v6cdscd; return(OK); case BSIM4v6_MOD_CIT : value->rValue = model->BSIM4v6cit; return(OK); case BSIM4v6_MOD_NFACTOR : value->rValue = model->BSIM4v6nfactor; return(OK); case BSIM4v6_MOD_XJ: value->rValue = model->BSIM4v6xj; return(OK); case BSIM4v6_MOD_VSAT: value->rValue = model->BSIM4v6vsat; return(OK); case BSIM4v6_MOD_VTL: value->rValue = model->BSIM4v6vtl; return(OK); case BSIM4v6_MOD_XN: value->rValue = model->BSIM4v6xn; return(OK); case BSIM4v6_MOD_LC: value->rValue = model->BSIM4v6lc; return(OK); case BSIM4v6_MOD_LAMBDA: value->rValue = model->BSIM4v6lambda; return(OK); case BSIM4v6_MOD_AT: value->rValue = model->BSIM4v6at; return(OK); case BSIM4v6_MOD_A0: value->rValue = model->BSIM4v6a0; return(OK); case BSIM4v6_MOD_AGS: value->rValue = model->BSIM4v6ags; return(OK); case BSIM4v6_MOD_A1: value->rValue = model->BSIM4v6a1; return(OK); case BSIM4v6_MOD_A2: value->rValue = model->BSIM4v6a2; return(OK); case BSIM4v6_MOD_KETA: value->rValue = model->BSIM4v6keta; return(OK); case BSIM4v6_MOD_NSUB: value->rValue = model->BSIM4v6nsub; return(OK); case BSIM4v6_MOD_PHIG: value->rValue = model->BSIM4v6phig; return(OK); case BSIM4v6_MOD_EPSRGATE: value->rValue = model->BSIM4v6epsrgate; return(OK); case BSIM4v6_MOD_EASUB: value->rValue = model->BSIM4v6easub; return(OK); case BSIM4v6_MOD_EPSRSUB: value->rValue = model->BSIM4v6epsrsub; return(OK); case BSIM4v6_MOD_NI0SUB: value->rValue = model->BSIM4v6ni0sub; return(OK); case BSIM4v6_MOD_BG0SUB: value->rValue = model->BSIM4v6bg0sub; return(OK); case BSIM4v6_MOD_TBGASUB: value->rValue = model->BSIM4v6tbgasub; return(OK); case BSIM4v6_MOD_TBGBSUB: value->rValue = model->BSIM4v6tbgbsub; return(OK); case BSIM4v6_MOD_NDEP: value->rValue = model->BSIM4v6ndep; return(OK); case BSIM4v6_MOD_NSD: value->rValue = model->BSIM4v6nsd; return(OK); case BSIM4v6_MOD_NGATE: value->rValue = model->BSIM4v6ngate; return(OK); case BSIM4v6_MOD_GAMMA1: value->rValue = model->BSIM4v6gamma1; return(OK); case BSIM4v6_MOD_GAMMA2: value->rValue = model->BSIM4v6gamma2; return(OK); case BSIM4v6_MOD_VBX: value->rValue = model->BSIM4v6vbx; return(OK); case BSIM4v6_MOD_VBM: value->rValue = model->BSIM4v6vbm; return(OK); case BSIM4v6_MOD_XT: value->rValue = model->BSIM4v6xt; return(OK); case BSIM4v6_MOD_K1: value->rValue = model->BSIM4v6k1; return(OK); case BSIM4v6_MOD_KT1: value->rValue = model->BSIM4v6kt1; return(OK); case BSIM4v6_MOD_KT1L: value->rValue = model->BSIM4v6kt1l; return(OK); case BSIM4v6_MOD_KT2 : value->rValue = model->BSIM4v6kt2; return(OK); case BSIM4v6_MOD_K2 : value->rValue = model->BSIM4v6k2; return(OK); case BSIM4v6_MOD_K3: value->rValue = model->BSIM4v6k3; return(OK); case BSIM4v6_MOD_K3B: value->rValue = model->BSIM4v6k3b; return(OK); case BSIM4v6_MOD_W0: value->rValue = model->BSIM4v6w0; return(OK); case BSIM4v6_MOD_LPE0: value->rValue = model->BSIM4v6lpe0; return(OK); case BSIM4v6_MOD_LPEB: value->rValue = model->BSIM4v6lpeb; return(OK); case BSIM4v6_MOD_DVTP0: value->rValue = model->BSIM4v6dvtp0; return(OK); case BSIM4v6_MOD_DVTP1: value->rValue = model->BSIM4v6dvtp1; return(OK); case BSIM4v6_MOD_DVT0 : value->rValue = model->BSIM4v6dvt0; return(OK); case BSIM4v6_MOD_DVT1 : value->rValue = model->BSIM4v6dvt1; return(OK); case BSIM4v6_MOD_DVT2 : value->rValue = model->BSIM4v6dvt2; return(OK); case BSIM4v6_MOD_DVT0W : value->rValue = model->BSIM4v6dvt0w; return(OK); case BSIM4v6_MOD_DVT1W : value->rValue = model->BSIM4v6dvt1w; return(OK); case BSIM4v6_MOD_DVT2W : value->rValue = model->BSIM4v6dvt2w; return(OK); case BSIM4v6_MOD_DROUT : value->rValue = model->BSIM4v6drout; return(OK); case BSIM4v6_MOD_DSUB : value->rValue = model->BSIM4v6dsub; return(OK); case BSIM4v6_MOD_VTH0: value->rValue = model->BSIM4v6vth0; return(OK); case BSIM4v6_MOD_EU: value->rValue = model->BSIM4v6eu; return(OK); case BSIM4v6_MOD_UCS: value->rValue = model->BSIM4v6ucs; return(OK); case BSIM4v6_MOD_UA: value->rValue = model->BSIM4v6ua; return(OK); case BSIM4v6_MOD_UA1: value->rValue = model->BSIM4v6ua1; return(OK); case BSIM4v6_MOD_UB: value->rValue = model->BSIM4v6ub; return(OK); case BSIM4v6_MOD_UB1: value->rValue = model->BSIM4v6ub1; return(OK); case BSIM4v6_MOD_UC: value->rValue = model->BSIM4v6uc; return(OK); case BSIM4v6_MOD_UC1: value->rValue = model->BSIM4v6uc1; return(OK); case BSIM4v6_MOD_UD: value->rValue = model->BSIM4v6ud; return(OK); case BSIM4v6_MOD_UD1: value->rValue = model->BSIM4v6ud1; return(OK); case BSIM4v6_MOD_UP: value->rValue = model->BSIM4v6up; return(OK); case BSIM4v6_MOD_LP: value->rValue = model->BSIM4v6lp; return(OK); case BSIM4v6_MOD_U0: value->rValue = model->BSIM4v6u0; return(OK); case BSIM4v6_MOD_UTE: value->rValue = model->BSIM4v6ute; return(OK); case BSIM4v6_MOD_UCSTE: value->rValue = model->BSIM4v6ucste; return(OK); case BSIM4v6_MOD_VOFF: value->rValue = model->BSIM4v6voff; return(OK); case BSIM4v6_MOD_TVOFF: value->rValue = model->BSIM4v6tvoff; return(OK); case BSIM4v6_MOD_VFBSDOFF: value->rValue = model->BSIM4v6vfbsdoff; return(OK); case BSIM4v6_MOD_TVFBSDOFF: value->rValue = model->BSIM4v6tvfbsdoff; return(OK); case BSIM4v6_MOD_VOFFL: value->rValue = model->BSIM4v6voffl; return(OK); case BSIM4v6_MOD_VOFFCVL: value->rValue = model->BSIM4v6voffcvl; return(OK); case BSIM4v6_MOD_MINV: value->rValue = model->BSIM4v6minv; return(OK); case BSIM4v6_MOD_MINVCV: value->rValue = model->BSIM4v6minvcv; return(OK); case BSIM4v6_MOD_FPROUT: value->rValue = model->BSIM4v6fprout; return(OK); case BSIM4v6_MOD_PDITS: value->rValue = model->BSIM4v6pdits; return(OK); case BSIM4v6_MOD_PDITSD: value->rValue = model->BSIM4v6pditsd; return(OK); case BSIM4v6_MOD_PDITSL: value->rValue = model->BSIM4v6pditsl; return(OK); case BSIM4v6_MOD_DELTA: value->rValue = model->BSIM4v6delta; return(OK); case BSIM4v6_MOD_RDSW: value->rValue = model->BSIM4v6rdsw; return(OK); case BSIM4v6_MOD_RDSWMIN: value->rValue = model->BSIM4v6rdswmin; return(OK); case BSIM4v6_MOD_RDWMIN: value->rValue = model->BSIM4v6rdwmin; return(OK); case BSIM4v6_MOD_RSWMIN: value->rValue = model->BSIM4v6rswmin; return(OK); case BSIM4v6_MOD_RDW: value->rValue = model->BSIM4v6rdw; return(OK); case BSIM4v6_MOD_RSW: value->rValue = model->BSIM4v6rsw; return(OK); case BSIM4v6_MOD_PRWG: value->rValue = model->BSIM4v6prwg; return(OK); case BSIM4v6_MOD_PRWB: value->rValue = model->BSIM4v6prwb; return(OK); case BSIM4v6_MOD_PRT: value->rValue = model->BSIM4v6prt; return(OK); case BSIM4v6_MOD_ETA0: value->rValue = model->BSIM4v6eta0; return(OK); case BSIM4v6_MOD_ETAB: value->rValue = model->BSIM4v6etab; return(OK); case BSIM4v6_MOD_PCLM: value->rValue = model->BSIM4v6pclm; return(OK); case BSIM4v6_MOD_PDIBL1: value->rValue = model->BSIM4v6pdibl1; return(OK); case BSIM4v6_MOD_PDIBL2: value->rValue = model->BSIM4v6pdibl2; return(OK); case BSIM4v6_MOD_PDIBLB: value->rValue = model->BSIM4v6pdiblb; return(OK); case BSIM4v6_MOD_PSCBE1: value->rValue = model->BSIM4v6pscbe1; return(OK); case BSIM4v6_MOD_PSCBE2: value->rValue = model->BSIM4v6pscbe2; return(OK); case BSIM4v6_MOD_PVAG: value->rValue = model->BSIM4v6pvag; return(OK); case BSIM4v6_MOD_WR: value->rValue = model->BSIM4v6wr; return(OK); case BSIM4v6_MOD_DWG: value->rValue = model->BSIM4v6dwg; return(OK); case BSIM4v6_MOD_DWB: value->rValue = model->BSIM4v6dwb; return(OK); case BSIM4v6_MOD_B0: value->rValue = model->BSIM4v6b0; return(OK); case BSIM4v6_MOD_B1: value->rValue = model->BSIM4v6b1; return(OK); case BSIM4v6_MOD_ALPHA0: value->rValue = model->BSIM4v6alpha0; return(OK); case BSIM4v6_MOD_ALPHA1: value->rValue = model->BSIM4v6alpha1; return(OK); case BSIM4v6_MOD_BETA0: value->rValue = model->BSIM4v6beta0; return(OK); case BSIM4v6_MOD_AGIDL: value->rValue = model->BSIM4v6agidl; return(OK); case BSIM4v6_MOD_BGIDL: value->rValue = model->BSIM4v6bgidl; return(OK); case BSIM4v6_MOD_CGIDL: value->rValue = model->BSIM4v6cgidl; return(OK); case BSIM4v6_MOD_EGIDL: value->rValue = model->BSIM4v6egidl; return(OK); case BSIM4v6_MOD_AGISL: value->rValue = model->BSIM4v6agisl; return(OK); case BSIM4v6_MOD_BGISL: value->rValue = model->BSIM4v6bgisl; return(OK); case BSIM4v6_MOD_CGISL: value->rValue = model->BSIM4v6cgisl; return(OK); case BSIM4v6_MOD_EGISL: value->rValue = model->BSIM4v6egisl; return(OK); case BSIM4v6_MOD_AIGC: value->rValue = model->BSIM4v6aigc; return(OK); case BSIM4v6_MOD_BIGC: value->rValue = model->BSIM4v6bigc; return(OK); case BSIM4v6_MOD_CIGC: value->rValue = model->BSIM4v6cigc; return(OK); case BSIM4v6_MOD_AIGSD: value->rValue = model->BSIM4v6aigsd; return(OK); case BSIM4v6_MOD_BIGSD: value->rValue = model->BSIM4v6bigsd; return(OK); case BSIM4v6_MOD_CIGSD: value->rValue = model->BSIM4v6cigsd; return(OK); case BSIM4v6_MOD_AIGS: value->rValue = model->BSIM4v6aigs; return(OK); case BSIM4v6_MOD_BIGS: value->rValue = model->BSIM4v6bigs; return(OK); case BSIM4v6_MOD_CIGS: value->rValue = model->BSIM4v6cigs; return(OK); case BSIM4v6_MOD_AIGD: value->rValue = model->BSIM4v6aigd; return(OK); case BSIM4v6_MOD_BIGD: value->rValue = model->BSIM4v6bigd; return(OK); case BSIM4v6_MOD_CIGD: value->rValue = model->BSIM4v6cigd; return(OK); case BSIM4v6_MOD_AIGBACC: value->rValue = model->BSIM4v6aigbacc; return(OK); case BSIM4v6_MOD_BIGBACC: value->rValue = model->BSIM4v6bigbacc; return(OK); case BSIM4v6_MOD_CIGBACC: value->rValue = model->BSIM4v6cigbacc; return(OK); case BSIM4v6_MOD_AIGBINV: value->rValue = model->BSIM4v6aigbinv; return(OK); case BSIM4v6_MOD_BIGBINV: value->rValue = model->BSIM4v6bigbinv; return(OK); case BSIM4v6_MOD_CIGBINV: value->rValue = model->BSIM4v6cigbinv; return(OK); case BSIM4v6_MOD_NIGC: value->rValue = model->BSIM4v6nigc; return(OK); case BSIM4v6_MOD_NIGBACC: value->rValue = model->BSIM4v6nigbacc; return(OK); case BSIM4v6_MOD_NIGBINV: value->rValue = model->BSIM4v6nigbinv; return(OK); case BSIM4v6_MOD_NTOX: value->rValue = model->BSIM4v6ntox; return(OK); case BSIM4v6_MOD_EIGBINV: value->rValue = model->BSIM4v6eigbinv; return(OK); case BSIM4v6_MOD_PIGCD: value->rValue = model->BSIM4v6pigcd; return(OK); case BSIM4v6_MOD_POXEDGE: value->rValue = model->BSIM4v6poxedge; return(OK); case BSIM4v6_MOD_PHIN: value->rValue = model->BSIM4v6phin; return(OK); case BSIM4v6_MOD_XRCRG1: value->rValue = model->BSIM4v6xrcrg1; return(OK); case BSIM4v6_MOD_XRCRG2: value->rValue = model->BSIM4v6xrcrg2; return(OK); case BSIM4v6_MOD_TNOIA: value->rValue = model->BSIM4v6tnoia; return(OK); case BSIM4v6_MOD_TNOIB: value->rValue = model->BSIM4v6tnoib; return(OK); case BSIM4v6_MOD_RNOIA: value->rValue = model->BSIM4v6rnoia; return(OK); case BSIM4v6_MOD_RNOIB: value->rValue = model->BSIM4v6rnoib; return(OK); case BSIM4v6_MOD_NTNOI: value->rValue = model->BSIM4v6ntnoi; return(OK); case BSIM4v6_MOD_IJTHDFWD: value->rValue = model->BSIM4v6ijthdfwd; return(OK); case BSIM4v6_MOD_IJTHSFWD: value->rValue = model->BSIM4v6ijthsfwd; return(OK); case BSIM4v6_MOD_IJTHDREV: value->rValue = model->BSIM4v6ijthdrev; return(OK); case BSIM4v6_MOD_IJTHSREV: value->rValue = model->BSIM4v6ijthsrev; return(OK); case BSIM4v6_MOD_XJBVD: value->rValue = model->BSIM4v6xjbvd; return(OK); case BSIM4v6_MOD_XJBVS: value->rValue = model->BSIM4v6xjbvs; return(OK); case BSIM4v6_MOD_BVD: value->rValue = model->BSIM4v6bvd; return(OK); case BSIM4v6_MOD_BVS: value->rValue = model->BSIM4v6bvs; return(OK); case BSIM4v6_MOD_VFB: value->rValue = model->BSIM4v6vfb; return(OK); case BSIM4v6_MOD_JTSS: value->rValue = model->BSIM4v6jtss; return(OK); case BSIM4v6_MOD_JTSD: value->rValue = model->BSIM4v6jtsd; return(OK); case BSIM4v6_MOD_JTSSWS: value->rValue = model->BSIM4v6jtssws; return(OK); case BSIM4v6_MOD_JTSSWD: value->rValue = model->BSIM4v6jtsswd; return(OK); case BSIM4v6_MOD_JTSSWGS: value->rValue = model->BSIM4v6jtsswgs; return(OK); case BSIM4v6_MOD_JTSSWGD: value->rValue = model->BSIM4v6jtsswgd; return(OK); case BSIM4v6_MOD_JTWEFF: value->rValue = model->BSIM4v6jtweff; return(OK); case BSIM4v6_MOD_NJTS: value->rValue = model->BSIM4v6njts; return(OK); case BSIM4v6_MOD_NJTSSW: value->rValue = model->BSIM4v6njtssw; return(OK); case BSIM4v6_MOD_NJTSSWG: value->rValue = model->BSIM4v6njtsswg; return(OK); case BSIM4v6_MOD_NJTSD: value->rValue = model->BSIM4v6njtsd; return(OK); case BSIM4v6_MOD_NJTSSWD: value->rValue = model->BSIM4v6njtsswd; return(OK); case BSIM4v6_MOD_NJTSSWGD: value->rValue = model->BSIM4v6njtsswgd; return(OK); case BSIM4v6_MOD_XTSS: value->rValue = model->BSIM4v6xtss; return(OK); case BSIM4v6_MOD_XTSD: value->rValue = model->BSIM4v6xtsd; return(OK); case BSIM4v6_MOD_XTSSWS: value->rValue = model->BSIM4v6xtssws; return(OK); case BSIM4v6_MOD_XTSSWD: value->rValue = model->BSIM4v6xtsswd; return(OK); case BSIM4v6_MOD_XTSSWGS: value->rValue = model->BSIM4v6xtsswgs; return(OK); case BSIM4v6_MOD_XTSSWGD: value->rValue = model->BSIM4v6xtsswgd; return(OK); case BSIM4v6_MOD_TNJTS: value->rValue = model->BSIM4v6tnjts; return(OK); case BSIM4v6_MOD_TNJTSSW: value->rValue = model->BSIM4v6tnjtssw; return(OK); case BSIM4v6_MOD_TNJTSSWG: value->rValue = model->BSIM4v6tnjtsswg; return(OK); case BSIM4v6_MOD_TNJTSD: value->rValue = model->BSIM4v6tnjtsd; return(OK); case BSIM4v6_MOD_TNJTSSWD: value->rValue = model->BSIM4v6tnjtsswd; return(OK); case BSIM4v6_MOD_TNJTSSWGD: value->rValue = model->BSIM4v6tnjtsswgd; return(OK); case BSIM4v6_MOD_VTSS: value->rValue = model->BSIM4v6vtss; return(OK); case BSIM4v6_MOD_VTSD: value->rValue = model->BSIM4v6vtsd; return(OK); case BSIM4v6_MOD_VTSSWS: value->rValue = model->BSIM4v6vtssws; return(OK); case BSIM4v6_MOD_VTSSWD: value->rValue = model->BSIM4v6vtsswd; return(OK); case BSIM4v6_MOD_VTSSWGS: value->rValue = model->BSIM4v6vtsswgs; return(OK); case BSIM4v6_MOD_VTSSWGD: value->rValue = model->BSIM4v6vtsswgd; return(OK); case BSIM4v6_MOD_GBMIN: value->rValue = model->BSIM4v6gbmin; return(OK); case BSIM4v6_MOD_RBDB: value->rValue = model->BSIM4v6rbdb; return(OK); case BSIM4v6_MOD_RBPB: value->rValue = model->BSIM4v6rbpb; return(OK); case BSIM4v6_MOD_RBSB: value->rValue = model->BSIM4v6rbsb; return(OK); case BSIM4v6_MOD_RBPS: value->rValue = model->BSIM4v6rbps; return(OK); case BSIM4v6_MOD_RBPD: value->rValue = model->BSIM4v6rbpd; return(OK); case BSIM4v6_MOD_RBPS0: value->rValue = model->BSIM4v6rbps0; return(OK); case BSIM4v6_MOD_RBPSL: value->rValue = model->BSIM4v6rbpsl; return(OK); case BSIM4v6_MOD_RBPSW: value->rValue = model->BSIM4v6rbpsw; return(OK); case BSIM4v6_MOD_RBPSNF: value->rValue = model->BSIM4v6rbpsnf; return(OK); case BSIM4v6_MOD_RBPD0: value->rValue = model->BSIM4v6rbpd0; return(OK); case BSIM4v6_MOD_RBPDL: value->rValue = model->BSIM4v6rbpdl; return(OK); case BSIM4v6_MOD_RBPDW: value->rValue = model->BSIM4v6rbpdw; return(OK); case BSIM4v6_MOD_RBPDNF: value->rValue = model->BSIM4v6rbpdnf; return(OK); case BSIM4v6_MOD_RBPBX0: value->rValue = model->BSIM4v6rbpbx0; return(OK); case BSIM4v6_MOD_RBPBXL: value->rValue = model->BSIM4v6rbpbxl; return(OK); case BSIM4v6_MOD_RBPBXW: value->rValue = model->BSIM4v6rbpbxw; return(OK); case BSIM4v6_MOD_RBPBXNF: value->rValue = model->BSIM4v6rbpbxnf; return(OK); case BSIM4v6_MOD_RBPBY0: value->rValue = model->BSIM4v6rbpby0; return(OK); case BSIM4v6_MOD_RBPBYL: value->rValue = model->BSIM4v6rbpbyl; return(OK); case BSIM4v6_MOD_RBPBYW: value->rValue = model->BSIM4v6rbpbyw; return(OK); case BSIM4v6_MOD_RBPBYNF: value->rValue = model->BSIM4v6rbpbynf; return(OK); case BSIM4v6_MOD_RBSBX0: value->rValue = model->BSIM4v6rbsbx0; return(OK); case BSIM4v6_MOD_RBSBY0: value->rValue = model->BSIM4v6rbsby0; return(OK); case BSIM4v6_MOD_RBDBX0: value->rValue = model->BSIM4v6rbdbx0; return(OK); case BSIM4v6_MOD_RBDBY0: value->rValue = model->BSIM4v6rbdby0; return(OK); case BSIM4v6_MOD_RBSDBXL: value->rValue = model->BSIM4v6rbsdbxl; return(OK); case BSIM4v6_MOD_RBSDBXW: value->rValue = model->BSIM4v6rbsdbxw; return(OK); case BSIM4v6_MOD_RBSDBXNF: value->rValue = model->BSIM4v6rbsdbxnf; return(OK); case BSIM4v6_MOD_RBSDBYL: value->rValue = model->BSIM4v6rbsdbyl; return(OK); case BSIM4v6_MOD_RBSDBYW: value->rValue = model->BSIM4v6rbsdbyw; return(OK); case BSIM4v6_MOD_RBSDBYNF: value->rValue = model->BSIM4v6rbsdbynf; return(OK); case BSIM4v6_MOD_CGSL: value->rValue = model->BSIM4v6cgsl; return(OK); case BSIM4v6_MOD_CGDL: value->rValue = model->BSIM4v6cgdl; return(OK); case BSIM4v6_MOD_CKAPPAS: value->rValue = model->BSIM4v6ckappas; return(OK); case BSIM4v6_MOD_CKAPPAD: value->rValue = model->BSIM4v6ckappad; return(OK); case BSIM4v6_MOD_CF: value->rValue = model->BSIM4v6cf; return(OK); case BSIM4v6_MOD_CLC: value->rValue = model->BSIM4v6clc; return(OK); case BSIM4v6_MOD_CLE: value->rValue = model->BSIM4v6cle; return(OK); case BSIM4v6_MOD_DWC: value->rValue = model->BSIM4v6dwc; return(OK); case BSIM4v6_MOD_DLC: value->rValue = model->BSIM4v6dlc; return(OK); case BSIM4v6_MOD_XW: value->rValue = model->BSIM4v6xw; return(OK); case BSIM4v6_MOD_XL: value->rValue = model->BSIM4v6xl; return(OK); case BSIM4v6_MOD_DLCIG: value->rValue = model->BSIM4v6dlcig; return(OK); case BSIM4v6_MOD_DLCIGD: value->rValue = model->BSIM4v6dlcigd; return(OK); case BSIM4v6_MOD_DWJ: value->rValue = model->BSIM4v6dwj; return(OK); case BSIM4v6_MOD_VFBCV: value->rValue = model->BSIM4v6vfbcv; return(OK); case BSIM4v6_MOD_ACDE: value->rValue = model->BSIM4v6acde; return(OK); case BSIM4v6_MOD_MOIN: value->rValue = model->BSIM4v6moin; return(OK); case BSIM4v6_MOD_NOFF: value->rValue = model->BSIM4v6noff; return(OK); case BSIM4v6_MOD_VOFFCV: value->rValue = model->BSIM4v6voffcv; return(OK); case BSIM4v6_MOD_DMCG: value->rValue = model->BSIM4v6dmcg; return(OK); case BSIM4v6_MOD_DMCI: value->rValue = model->BSIM4v6dmci; return(OK); case BSIM4v6_MOD_DMDG: value->rValue = model->BSIM4v6dmdg; return(OK); case BSIM4v6_MOD_DMCGT: value->rValue = model->BSIM4v6dmcgt; return(OK); case BSIM4v6_MOD_XGW: value->rValue = model->BSIM4v6xgw; return(OK); case BSIM4v6_MOD_XGL: value->rValue = model->BSIM4v6xgl; return(OK); case BSIM4v6_MOD_RSHG: value->rValue = model->BSIM4v6rshg; return(OK); case BSIM4v6_MOD_TCJ: value->rValue = model->BSIM4v6tcj; return(OK); case BSIM4v6_MOD_TPB: value->rValue = model->BSIM4v6tpb; return(OK); case BSIM4v6_MOD_TCJSW: value->rValue = model->BSIM4v6tcjsw; return(OK); case BSIM4v6_MOD_TPBSW: value->rValue = model->BSIM4v6tpbsw; return(OK); case BSIM4v6_MOD_TCJSWG: value->rValue = model->BSIM4v6tcjswg; return(OK); case BSIM4v6_MOD_TPBSWG: value->rValue = model->BSIM4v6tpbswg; return(OK); /* Length dependence */ case BSIM4v6_MOD_LCDSC : value->rValue = model->BSIM4v6lcdsc; return(OK); case BSIM4v6_MOD_LCDSCB : value->rValue = model->BSIM4v6lcdscb; return(OK); case BSIM4v6_MOD_LCDSCD : value->rValue = model->BSIM4v6lcdscd; return(OK); case BSIM4v6_MOD_LCIT : value->rValue = model->BSIM4v6lcit; return(OK); case BSIM4v6_MOD_LNFACTOR : value->rValue = model->BSIM4v6lnfactor; return(OK); case BSIM4v6_MOD_LXJ: value->rValue = model->BSIM4v6lxj; return(OK); case BSIM4v6_MOD_LVSAT: value->rValue = model->BSIM4v6lvsat; return(OK); case BSIM4v6_MOD_LAT: value->rValue = model->BSIM4v6lat; return(OK); case BSIM4v6_MOD_LA0: value->rValue = model->BSIM4v6la0; return(OK); case BSIM4v6_MOD_LAGS: value->rValue = model->BSIM4v6lags; return(OK); case BSIM4v6_MOD_LA1: value->rValue = model->BSIM4v6la1; return(OK); case BSIM4v6_MOD_LA2: value->rValue = model->BSIM4v6la2; return(OK); case BSIM4v6_MOD_LKETA: value->rValue = model->BSIM4v6lketa; return(OK); case BSIM4v6_MOD_LNSUB: value->rValue = model->BSIM4v6lnsub; return(OK); case BSIM4v6_MOD_LNDEP: value->rValue = model->BSIM4v6lndep; return(OK); case BSIM4v6_MOD_LNSD: value->rValue = model->BSIM4v6lnsd; return(OK); case BSIM4v6_MOD_LNGATE: value->rValue = model->BSIM4v6lngate; return(OK); case BSIM4v6_MOD_LGAMMA1: value->rValue = model->BSIM4v6lgamma1; return(OK); case BSIM4v6_MOD_LGAMMA2: value->rValue = model->BSIM4v6lgamma2; return(OK); case BSIM4v6_MOD_LVBX: value->rValue = model->BSIM4v6lvbx; return(OK); case BSIM4v6_MOD_LVBM: value->rValue = model->BSIM4v6lvbm; return(OK); case BSIM4v6_MOD_LXT: value->rValue = model->BSIM4v6lxt; return(OK); case BSIM4v6_MOD_LK1: value->rValue = model->BSIM4v6lk1; return(OK); case BSIM4v6_MOD_LKT1: value->rValue = model->BSIM4v6lkt1; return(OK); case BSIM4v6_MOD_LKT1L: value->rValue = model->BSIM4v6lkt1l; return(OK); case BSIM4v6_MOD_LKT2 : value->rValue = model->BSIM4v6lkt2; return(OK); case BSIM4v6_MOD_LK2 : value->rValue = model->BSIM4v6lk2; return(OK); case BSIM4v6_MOD_LK3: value->rValue = model->BSIM4v6lk3; return(OK); case BSIM4v6_MOD_LK3B: value->rValue = model->BSIM4v6lk3b; return(OK); case BSIM4v6_MOD_LW0: value->rValue = model->BSIM4v6lw0; return(OK); case BSIM4v6_MOD_LLPE0: value->rValue = model->BSIM4v6llpe0; return(OK); case BSIM4v6_MOD_LLPEB: value->rValue = model->BSIM4v6llpeb; return(OK); case BSIM4v6_MOD_LDVTP0: value->rValue = model->BSIM4v6ldvtp0; return(OK); case BSIM4v6_MOD_LDVTP1: value->rValue = model->BSIM4v6ldvtp1; return(OK); case BSIM4v6_MOD_LDVT0: value->rValue = model->BSIM4v6ldvt0; return(OK); case BSIM4v6_MOD_LDVT1 : value->rValue = model->BSIM4v6ldvt1; return(OK); case BSIM4v6_MOD_LDVT2 : value->rValue = model->BSIM4v6ldvt2; return(OK); case BSIM4v6_MOD_LDVT0W : value->rValue = model->BSIM4v6ldvt0w; return(OK); case BSIM4v6_MOD_LDVT1W : value->rValue = model->BSIM4v6ldvt1w; return(OK); case BSIM4v6_MOD_LDVT2W : value->rValue = model->BSIM4v6ldvt2w; return(OK); case BSIM4v6_MOD_LDROUT : value->rValue = model->BSIM4v6ldrout; return(OK); case BSIM4v6_MOD_LDSUB : value->rValue = model->BSIM4v6ldsub; return(OK); case BSIM4v6_MOD_LVTH0: value->rValue = model->BSIM4v6lvth0; return(OK); case BSIM4v6_MOD_LUA: value->rValue = model->BSIM4v6lua; return(OK); case BSIM4v6_MOD_LUA1: value->rValue = model->BSIM4v6lua1; return(OK); case BSIM4v6_MOD_LUB: value->rValue = model->BSIM4v6lub; return(OK); case BSIM4v6_MOD_LUB1: value->rValue = model->BSIM4v6lub1; return(OK); case BSIM4v6_MOD_LUC: value->rValue = model->BSIM4v6luc; return(OK); case BSIM4v6_MOD_LUC1: value->rValue = model->BSIM4v6luc1; return(OK); case BSIM4v6_MOD_LUD: value->rValue = model->BSIM4v6lud; return(OK); case BSIM4v6_MOD_LUD1: value->rValue = model->BSIM4v6lud1; return(OK); case BSIM4v6_MOD_LUP: value->rValue = model->BSIM4v6lup; return(OK); case BSIM4v6_MOD_LLP: value->rValue = model->BSIM4v6llp; return(OK); case BSIM4v6_MOD_LU0: value->rValue = model->BSIM4v6lu0; return(OK); case BSIM4v6_MOD_LUTE: value->rValue = model->BSIM4v6lute; return(OK); case BSIM4v6_MOD_LUCSTE: value->rValue = model->BSIM4v6lucste; return(OK); case BSIM4v6_MOD_LVOFF: value->rValue = model->BSIM4v6lvoff; return(OK); case BSIM4v6_MOD_LTVOFF: value->rValue = model->BSIM4v6ltvoff; return(OK); case BSIM4v6_MOD_LMINV: value->rValue = model->BSIM4v6lminv; return(OK); case BSIM4v6_MOD_LMINVCV: value->rValue = model->BSIM4v6lminvcv; return(OK); case BSIM4v6_MOD_LFPROUT: value->rValue = model->BSIM4v6lfprout; return(OK); case BSIM4v6_MOD_LPDITS: value->rValue = model->BSIM4v6lpdits; return(OK); case BSIM4v6_MOD_LPDITSD: value->rValue = model->BSIM4v6lpditsd; return(OK); case BSIM4v6_MOD_LDELTA: value->rValue = model->BSIM4v6ldelta; return(OK); case BSIM4v6_MOD_LRDSW: value->rValue = model->BSIM4v6lrdsw; return(OK); case BSIM4v6_MOD_LRDW: value->rValue = model->BSIM4v6lrdw; return(OK); case BSIM4v6_MOD_LRSW: value->rValue = model->BSIM4v6lrsw; return(OK); case BSIM4v6_MOD_LPRWB: value->rValue = model->BSIM4v6lprwb; return(OK); case BSIM4v6_MOD_LPRWG: value->rValue = model->BSIM4v6lprwg; return(OK); case BSIM4v6_MOD_LPRT: value->rValue = model->BSIM4v6lprt; return(OK); case BSIM4v6_MOD_LETA0: value->rValue = model->BSIM4v6leta0; return(OK); case BSIM4v6_MOD_LETAB: value->rValue = model->BSIM4v6letab; return(OK); case BSIM4v6_MOD_LPCLM: value->rValue = model->BSIM4v6lpclm; return(OK); case BSIM4v6_MOD_LPDIBL1: value->rValue = model->BSIM4v6lpdibl1; return(OK); case BSIM4v6_MOD_LPDIBL2: value->rValue = model->BSIM4v6lpdibl2; return(OK); case BSIM4v6_MOD_LPDIBLB: value->rValue = model->BSIM4v6lpdiblb; return(OK); case BSIM4v6_MOD_LPSCBE1: value->rValue = model->BSIM4v6lpscbe1; return(OK); case BSIM4v6_MOD_LPSCBE2: value->rValue = model->BSIM4v6lpscbe2; return(OK); case BSIM4v6_MOD_LPVAG: value->rValue = model->BSIM4v6lpvag; return(OK); case BSIM4v6_MOD_LWR: value->rValue = model->BSIM4v6lwr; return(OK); case BSIM4v6_MOD_LDWG: value->rValue = model->BSIM4v6ldwg; return(OK); case BSIM4v6_MOD_LDWB: value->rValue = model->BSIM4v6ldwb; return(OK); case BSIM4v6_MOD_LB0: value->rValue = model->BSIM4v6lb0; return(OK); case BSIM4v6_MOD_LB1: value->rValue = model->BSIM4v6lb1; return(OK); case BSIM4v6_MOD_LALPHA0: value->rValue = model->BSIM4v6lalpha0; return(OK); case BSIM4v6_MOD_LALPHA1: value->rValue = model->BSIM4v6lalpha1; return(OK); case BSIM4v6_MOD_LBETA0: value->rValue = model->BSIM4v6lbeta0; return(OK); case BSIM4v6_MOD_LAGIDL: value->rValue = model->BSIM4v6lagidl; return(OK); case BSIM4v6_MOD_LBGIDL: value->rValue = model->BSIM4v6lbgidl; return(OK); case BSIM4v6_MOD_LCGIDL: value->rValue = model->BSIM4v6lcgidl; return(OK); case BSIM4v6_MOD_LEGIDL: value->rValue = model->BSIM4v6legidl; return(OK); case BSIM4v6_MOD_LAGISL: value->rValue = model->BSIM4v6lagisl; return(OK); case BSIM4v6_MOD_LBGISL: value->rValue = model->BSIM4v6lbgisl; return(OK); case BSIM4v6_MOD_LCGISL: value->rValue = model->BSIM4v6lcgisl; return(OK); case BSIM4v6_MOD_LEGISL: value->rValue = model->BSIM4v6legisl; return(OK); case BSIM4v6_MOD_LAIGC: value->rValue = model->BSIM4v6laigc; return(OK); case BSIM4v6_MOD_LBIGC: value->rValue = model->BSIM4v6lbigc; return(OK); case BSIM4v6_MOD_LCIGC: value->rValue = model->BSIM4v6lcigc; return(OK); case BSIM4v6_MOD_LAIGSD: value->rValue = model->BSIM4v6laigsd; return(OK); case BSIM4v6_MOD_LBIGSD: value->rValue = model->BSIM4v6lbigsd; return(OK); case BSIM4v6_MOD_LCIGSD: value->rValue = model->BSIM4v6lcigsd; return(OK); case BSIM4v6_MOD_LAIGS: value->rValue = model->BSIM4v6laigs; return(OK); case BSIM4v6_MOD_LBIGS: value->rValue = model->BSIM4v6lbigs; return(OK); case BSIM4v6_MOD_LCIGS: value->rValue = model->BSIM4v6lcigs; return(OK); case BSIM4v6_MOD_LAIGD: value->rValue = model->BSIM4v6laigd; return(OK); case BSIM4v6_MOD_LBIGD: value->rValue = model->BSIM4v6lbigd; return(OK); case BSIM4v6_MOD_LCIGD: value->rValue = model->BSIM4v6lcigd; return(OK); case BSIM4v6_MOD_LAIGBACC: value->rValue = model->BSIM4v6laigbacc; return(OK); case BSIM4v6_MOD_LBIGBACC: value->rValue = model->BSIM4v6lbigbacc; return(OK); case BSIM4v6_MOD_LCIGBACC: value->rValue = model->BSIM4v6lcigbacc; return(OK); case BSIM4v6_MOD_LAIGBINV: value->rValue = model->BSIM4v6laigbinv; return(OK); case BSIM4v6_MOD_LBIGBINV: value->rValue = model->BSIM4v6lbigbinv; return(OK); case BSIM4v6_MOD_LCIGBINV: value->rValue = model->BSIM4v6lcigbinv; return(OK); case BSIM4v6_MOD_LNIGC: value->rValue = model->BSIM4v6lnigc; return(OK); case BSIM4v6_MOD_LNIGBACC: value->rValue = model->BSIM4v6lnigbacc; return(OK); case BSIM4v6_MOD_LNIGBINV: value->rValue = model->BSIM4v6lnigbinv; return(OK); case BSIM4v6_MOD_LNTOX: value->rValue = model->BSIM4v6lntox; return(OK); case BSIM4v6_MOD_LEIGBINV: value->rValue = model->BSIM4v6leigbinv; return(OK); case BSIM4v6_MOD_LPIGCD: value->rValue = model->BSIM4v6lpigcd; return(OK); case BSIM4v6_MOD_LPOXEDGE: value->rValue = model->BSIM4v6lpoxedge; return(OK); case BSIM4v6_MOD_LPHIN: value->rValue = model->BSIM4v6lphin; return(OK); case BSIM4v6_MOD_LXRCRG1: value->rValue = model->BSIM4v6lxrcrg1; return(OK); case BSIM4v6_MOD_LXRCRG2: value->rValue = model->BSIM4v6lxrcrg2; return(OK); case BSIM4v6_MOD_LEU: value->rValue = model->BSIM4v6leu; return(OK); case BSIM4v6_MOD_LUCS: value->rValue = model->BSIM4v6lucs; return(OK); case BSIM4v6_MOD_LVFB: value->rValue = model->BSIM4v6lvfb; return(OK); case BSIM4v6_MOD_LCGSL: value->rValue = model->BSIM4v6lcgsl; return(OK); case BSIM4v6_MOD_LCGDL: value->rValue = model->BSIM4v6lcgdl; return(OK); case BSIM4v6_MOD_LCKAPPAS: value->rValue = model->BSIM4v6lckappas; return(OK); case BSIM4v6_MOD_LCKAPPAD: value->rValue = model->BSIM4v6lckappad; return(OK); case BSIM4v6_MOD_LCF: value->rValue = model->BSIM4v6lcf; return(OK); case BSIM4v6_MOD_LCLC: value->rValue = model->BSIM4v6lclc; return(OK); case BSIM4v6_MOD_LCLE: value->rValue = model->BSIM4v6lcle; return(OK); case BSIM4v6_MOD_LVFBCV: value->rValue = model->BSIM4v6lvfbcv; return(OK); case BSIM4v6_MOD_LACDE: value->rValue = model->BSIM4v6lacde; return(OK); case BSIM4v6_MOD_LMOIN: value->rValue = model->BSIM4v6lmoin; return(OK); case BSIM4v6_MOD_LNOFF: value->rValue = model->BSIM4v6lnoff; return(OK); case BSIM4v6_MOD_LVOFFCV: value->rValue = model->BSIM4v6lvoffcv; return(OK); case BSIM4v6_MOD_LVFBSDOFF: value->rValue = model->BSIM4v6lvfbsdoff; return(OK); case BSIM4v6_MOD_LTVFBSDOFF: value->rValue = model->BSIM4v6ltvfbsdoff; return(OK); /* Width dependence */ case BSIM4v6_MOD_WCDSC : value->rValue = model->BSIM4v6wcdsc; return(OK); case BSIM4v6_MOD_WCDSCB : value->rValue = model->BSIM4v6wcdscb; return(OK); case BSIM4v6_MOD_WCDSCD : value->rValue = model->BSIM4v6wcdscd; return(OK); case BSIM4v6_MOD_WCIT : value->rValue = model->BSIM4v6wcit; return(OK); case BSIM4v6_MOD_WNFACTOR : value->rValue = model->BSIM4v6wnfactor; return(OK); case BSIM4v6_MOD_WXJ: value->rValue = model->BSIM4v6wxj; return(OK); case BSIM4v6_MOD_WVSAT: value->rValue = model->BSIM4v6wvsat; return(OK); case BSIM4v6_MOD_WAT: value->rValue = model->BSIM4v6wat; return(OK); case BSIM4v6_MOD_WA0: value->rValue = model->BSIM4v6wa0; return(OK); case BSIM4v6_MOD_WAGS: value->rValue = model->BSIM4v6wags; return(OK); case BSIM4v6_MOD_WA1: value->rValue = model->BSIM4v6wa1; return(OK); case BSIM4v6_MOD_WA2: value->rValue = model->BSIM4v6wa2; return(OK); case BSIM4v6_MOD_WKETA: value->rValue = model->BSIM4v6wketa; return(OK); case BSIM4v6_MOD_WNSUB: value->rValue = model->BSIM4v6wnsub; return(OK); case BSIM4v6_MOD_WNDEP: value->rValue = model->BSIM4v6wndep; return(OK); case BSIM4v6_MOD_WNSD: value->rValue = model->BSIM4v6wnsd; return(OK); case BSIM4v6_MOD_WNGATE: value->rValue = model->BSIM4v6wngate; return(OK); case BSIM4v6_MOD_WGAMMA1: value->rValue = model->BSIM4v6wgamma1; return(OK); case BSIM4v6_MOD_WGAMMA2: value->rValue = model->BSIM4v6wgamma2; return(OK); case BSIM4v6_MOD_WVBX: value->rValue = model->BSIM4v6wvbx; return(OK); case BSIM4v6_MOD_WVBM: value->rValue = model->BSIM4v6wvbm; return(OK); case BSIM4v6_MOD_WXT: value->rValue = model->BSIM4v6wxt; return(OK); case BSIM4v6_MOD_WK1: value->rValue = model->BSIM4v6wk1; return(OK); case BSIM4v6_MOD_WKT1: value->rValue = model->BSIM4v6wkt1; return(OK); case BSIM4v6_MOD_WKT1L: value->rValue = model->BSIM4v6wkt1l; return(OK); case BSIM4v6_MOD_WKT2 : value->rValue = model->BSIM4v6wkt2; return(OK); case BSIM4v6_MOD_WK2 : value->rValue = model->BSIM4v6wk2; return(OK); case BSIM4v6_MOD_WK3: value->rValue = model->BSIM4v6wk3; return(OK); case BSIM4v6_MOD_WK3B: value->rValue = model->BSIM4v6wk3b; return(OK); case BSIM4v6_MOD_WW0: value->rValue = model->BSIM4v6ww0; return(OK); case BSIM4v6_MOD_WLPE0: value->rValue = model->BSIM4v6wlpe0; return(OK); case BSIM4v6_MOD_WDVTP0: value->rValue = model->BSIM4v6wdvtp0; return(OK); case BSIM4v6_MOD_WDVTP1: value->rValue = model->BSIM4v6wdvtp1; return(OK); case BSIM4v6_MOD_WLPEB: value->rValue = model->BSIM4v6wlpeb; return(OK); case BSIM4v6_MOD_WDVT0: value->rValue = model->BSIM4v6wdvt0; return(OK); case BSIM4v6_MOD_WDVT1 : value->rValue = model->BSIM4v6wdvt1; return(OK); case BSIM4v6_MOD_WDVT2 : value->rValue = model->BSIM4v6wdvt2; return(OK); case BSIM4v6_MOD_WDVT0W : value->rValue = model->BSIM4v6wdvt0w; return(OK); case BSIM4v6_MOD_WDVT1W : value->rValue = model->BSIM4v6wdvt1w; return(OK); case BSIM4v6_MOD_WDVT2W : value->rValue = model->BSIM4v6wdvt2w; return(OK); case BSIM4v6_MOD_WDROUT : value->rValue = model->BSIM4v6wdrout; return(OK); case BSIM4v6_MOD_WDSUB : value->rValue = model->BSIM4v6wdsub; return(OK); case BSIM4v6_MOD_WVTH0: value->rValue = model->BSIM4v6wvth0; return(OK); case BSIM4v6_MOD_WUA: value->rValue = model->BSIM4v6wua; return(OK); case BSIM4v6_MOD_WUA1: value->rValue = model->BSIM4v6wua1; return(OK); case BSIM4v6_MOD_WUB: value->rValue = model->BSIM4v6wub; return(OK); case BSIM4v6_MOD_WUB1: value->rValue = model->BSIM4v6wub1; return(OK); case BSIM4v6_MOD_WUC: value->rValue = model->BSIM4v6wuc; return(OK); case BSIM4v6_MOD_WUC1: value->rValue = model->BSIM4v6wuc1; return(OK); case BSIM4v6_MOD_WUD: value->rValue = model->BSIM4v6wud; return(OK); case BSIM4v6_MOD_WUD1: value->rValue = model->BSIM4v6wud1; return(OK); case BSIM4v6_MOD_WUP: value->rValue = model->BSIM4v6wup; return(OK); case BSIM4v6_MOD_WLP: value->rValue = model->BSIM4v6wlp; return(OK); case BSIM4v6_MOD_WU0: value->rValue = model->BSIM4v6wu0; return(OK); case BSIM4v6_MOD_WUTE: value->rValue = model->BSIM4v6wute; return(OK); case BSIM4v6_MOD_WUCSTE: value->rValue = model->BSIM4v6wucste; return(OK); case BSIM4v6_MOD_WVOFF: value->rValue = model->BSIM4v6wvoff; return(OK); case BSIM4v6_MOD_WTVOFF: value->rValue = model->BSIM4v6wtvoff; return(OK); case BSIM4v6_MOD_WMINV: value->rValue = model->BSIM4v6wminv; return(OK); case BSIM4v6_MOD_WMINVCV: value->rValue = model->BSIM4v6wminvcv; return(OK); case BSIM4v6_MOD_WFPROUT: value->rValue = model->BSIM4v6wfprout; return(OK); case BSIM4v6_MOD_WPDITS: value->rValue = model->BSIM4v6wpdits; return(OK); case BSIM4v6_MOD_WPDITSD: value->rValue = model->BSIM4v6wpditsd; return(OK); case BSIM4v6_MOD_WDELTA: value->rValue = model->BSIM4v6wdelta; return(OK); case BSIM4v6_MOD_WRDSW: value->rValue = model->BSIM4v6wrdsw; return(OK); case BSIM4v6_MOD_WRDW: value->rValue = model->BSIM4v6wrdw; return(OK); case BSIM4v6_MOD_WRSW: value->rValue = model->BSIM4v6wrsw; return(OK); case BSIM4v6_MOD_WPRWB: value->rValue = model->BSIM4v6wprwb; return(OK); case BSIM4v6_MOD_WPRWG: value->rValue = model->BSIM4v6wprwg; return(OK); case BSIM4v6_MOD_WPRT: value->rValue = model->BSIM4v6wprt; return(OK); case BSIM4v6_MOD_WETA0: value->rValue = model->BSIM4v6weta0; return(OK); case BSIM4v6_MOD_WETAB: value->rValue = model->BSIM4v6wetab; return(OK); case BSIM4v6_MOD_WPCLM: value->rValue = model->BSIM4v6wpclm; return(OK); case BSIM4v6_MOD_WPDIBL1: value->rValue = model->BSIM4v6wpdibl1; return(OK); case BSIM4v6_MOD_WPDIBL2: value->rValue = model->BSIM4v6wpdibl2; return(OK); case BSIM4v6_MOD_WPDIBLB: value->rValue = model->BSIM4v6wpdiblb; return(OK); case BSIM4v6_MOD_WPSCBE1: value->rValue = model->BSIM4v6wpscbe1; return(OK); case BSIM4v6_MOD_WPSCBE2: value->rValue = model->BSIM4v6wpscbe2; return(OK); case BSIM4v6_MOD_WPVAG: value->rValue = model->BSIM4v6wpvag; return(OK); case BSIM4v6_MOD_WWR: value->rValue = model->BSIM4v6wwr; return(OK); case BSIM4v6_MOD_WDWG: value->rValue = model->BSIM4v6wdwg; return(OK); case BSIM4v6_MOD_WDWB: value->rValue = model->BSIM4v6wdwb; return(OK); case BSIM4v6_MOD_WB0: value->rValue = model->BSIM4v6wb0; return(OK); case BSIM4v6_MOD_WB1: value->rValue = model->BSIM4v6wb1; return(OK); case BSIM4v6_MOD_WALPHA0: value->rValue = model->BSIM4v6walpha0; return(OK); case BSIM4v6_MOD_WALPHA1: value->rValue = model->BSIM4v6walpha1; return(OK); case BSIM4v6_MOD_WBETA0: value->rValue = model->BSIM4v6wbeta0; return(OK); case BSIM4v6_MOD_WAGIDL: value->rValue = model->BSIM4v6wagidl; return(OK); case BSIM4v6_MOD_WBGIDL: value->rValue = model->BSIM4v6wbgidl; return(OK); case BSIM4v6_MOD_WCGIDL: value->rValue = model->BSIM4v6wcgidl; return(OK); case BSIM4v6_MOD_WEGIDL: value->rValue = model->BSIM4v6wegidl; return(OK); case BSIM4v6_MOD_WAGISL: value->rValue = model->BSIM4v6wagisl; return(OK); case BSIM4v6_MOD_WBGISL: value->rValue = model->BSIM4v6wbgisl; return(OK); case BSIM4v6_MOD_WCGISL: value->rValue = model->BSIM4v6wcgisl; return(OK); case BSIM4v6_MOD_WEGISL: value->rValue = model->BSIM4v6wegisl; return(OK); case BSIM4v6_MOD_WAIGC: value->rValue = model->BSIM4v6waigc; return(OK); case BSIM4v6_MOD_WBIGC: value->rValue = model->BSIM4v6wbigc; return(OK); case BSIM4v6_MOD_WCIGC: value->rValue = model->BSIM4v6wcigc; return(OK); case BSIM4v6_MOD_WAIGSD: value->rValue = model->BSIM4v6waigsd; return(OK); case BSIM4v6_MOD_WBIGSD: value->rValue = model->BSIM4v6wbigsd; return(OK); case BSIM4v6_MOD_WCIGSD: value->rValue = model->BSIM4v6wcigsd; return(OK); case BSIM4v6_MOD_WAIGS: value->rValue = model->BSIM4v6waigs; return(OK); case BSIM4v6_MOD_WBIGS: value->rValue = model->BSIM4v6wbigs; return(OK); case BSIM4v6_MOD_WCIGS: value->rValue = model->BSIM4v6wcigs; return(OK); case BSIM4v6_MOD_WAIGD: value->rValue = model->BSIM4v6waigd; return(OK); case BSIM4v6_MOD_WBIGD: value->rValue = model->BSIM4v6wbigd; return(OK); case BSIM4v6_MOD_WCIGD: value->rValue = model->BSIM4v6wcigd; return(OK); case BSIM4v6_MOD_WAIGBACC: value->rValue = model->BSIM4v6waigbacc; return(OK); case BSIM4v6_MOD_WBIGBACC: value->rValue = model->BSIM4v6wbigbacc; return(OK); case BSIM4v6_MOD_WCIGBACC: value->rValue = model->BSIM4v6wcigbacc; return(OK); case BSIM4v6_MOD_WAIGBINV: value->rValue = model->BSIM4v6waigbinv; return(OK); case BSIM4v6_MOD_WBIGBINV: value->rValue = model->BSIM4v6wbigbinv; return(OK); case BSIM4v6_MOD_WCIGBINV: value->rValue = model->BSIM4v6wcigbinv; return(OK); case BSIM4v6_MOD_WNIGC: value->rValue = model->BSIM4v6wnigc; return(OK); case BSIM4v6_MOD_WNIGBACC: value->rValue = model->BSIM4v6wnigbacc; return(OK); case BSIM4v6_MOD_WNIGBINV: value->rValue = model->BSIM4v6wnigbinv; return(OK); case BSIM4v6_MOD_WNTOX: value->rValue = model->BSIM4v6wntox; return(OK); case BSIM4v6_MOD_WEIGBINV: value->rValue = model->BSIM4v6weigbinv; return(OK); case BSIM4v6_MOD_WPIGCD: value->rValue = model->BSIM4v6wpigcd; return(OK); case BSIM4v6_MOD_WPOXEDGE: value->rValue = model->BSIM4v6wpoxedge; return(OK); case BSIM4v6_MOD_WPHIN: value->rValue = model->BSIM4v6wphin; return(OK); case BSIM4v6_MOD_WXRCRG1: value->rValue = model->BSIM4v6wxrcrg1; return(OK); case BSIM4v6_MOD_WXRCRG2: value->rValue = model->BSIM4v6wxrcrg2; return(OK); case BSIM4v6_MOD_WEU: value->rValue = model->BSIM4v6weu; return(OK); case BSIM4v6_MOD_WUCS: value->rValue = model->BSIM4v6wucs; return(OK); case BSIM4v6_MOD_WVFB: value->rValue = model->BSIM4v6wvfb; return(OK); case BSIM4v6_MOD_WCGSL: value->rValue = model->BSIM4v6wcgsl; return(OK); case BSIM4v6_MOD_WCGDL: value->rValue = model->BSIM4v6wcgdl; return(OK); case BSIM4v6_MOD_WCKAPPAS: value->rValue = model->BSIM4v6wckappas; return(OK); case BSIM4v6_MOD_WCKAPPAD: value->rValue = model->BSIM4v6wckappad; return(OK); case BSIM4v6_MOD_WCF: value->rValue = model->BSIM4v6wcf; return(OK); case BSIM4v6_MOD_WCLC: value->rValue = model->BSIM4v6wclc; return(OK); case BSIM4v6_MOD_WCLE: value->rValue = model->BSIM4v6wcle; return(OK); case BSIM4v6_MOD_WVFBCV: value->rValue = model->BSIM4v6wvfbcv; return(OK); case BSIM4v6_MOD_WACDE: value->rValue = model->BSIM4v6wacde; return(OK); case BSIM4v6_MOD_WMOIN: value->rValue = model->BSIM4v6wmoin; return(OK); case BSIM4v6_MOD_WNOFF: value->rValue = model->BSIM4v6wnoff; return(OK); case BSIM4v6_MOD_WVOFFCV: value->rValue = model->BSIM4v6wvoffcv; return(OK); case BSIM4v6_MOD_WVFBSDOFF: value->rValue = model->BSIM4v6wvfbsdoff; return(OK); case BSIM4v6_MOD_WTVFBSDOFF: value->rValue = model->BSIM4v6wtvfbsdoff; return(OK); /* Cross-term dependence */ case BSIM4v6_MOD_PCDSC : value->rValue = model->BSIM4v6pcdsc; return(OK); case BSIM4v6_MOD_PCDSCB : value->rValue = model->BSIM4v6pcdscb; return(OK); case BSIM4v6_MOD_PCDSCD : value->rValue = model->BSIM4v6pcdscd; return(OK); case BSIM4v6_MOD_PCIT : value->rValue = model->BSIM4v6pcit; return(OK); case BSIM4v6_MOD_PNFACTOR : value->rValue = model->BSIM4v6pnfactor; return(OK); case BSIM4v6_MOD_PXJ: value->rValue = model->BSIM4v6pxj; return(OK); case BSIM4v6_MOD_PVSAT: value->rValue = model->BSIM4v6pvsat; return(OK); case BSIM4v6_MOD_PAT: value->rValue = model->BSIM4v6pat; return(OK); case BSIM4v6_MOD_PA0: value->rValue = model->BSIM4v6pa0; return(OK); case BSIM4v6_MOD_PAGS: value->rValue = model->BSIM4v6pags; return(OK); case BSIM4v6_MOD_PA1: value->rValue = model->BSIM4v6pa1; return(OK); case BSIM4v6_MOD_PA2: value->rValue = model->BSIM4v6pa2; return(OK); case BSIM4v6_MOD_PKETA: value->rValue = model->BSIM4v6pketa; return(OK); case BSIM4v6_MOD_PNSUB: value->rValue = model->BSIM4v6pnsub; return(OK); case BSIM4v6_MOD_PNDEP: value->rValue = model->BSIM4v6pndep; return(OK); case BSIM4v6_MOD_PNSD: value->rValue = model->BSIM4v6pnsd; return(OK); case BSIM4v6_MOD_PNGATE: value->rValue = model->BSIM4v6pngate; return(OK); case BSIM4v6_MOD_PGAMMA1: value->rValue = model->BSIM4v6pgamma1; return(OK); case BSIM4v6_MOD_PGAMMA2: value->rValue = model->BSIM4v6pgamma2; return(OK); case BSIM4v6_MOD_PVBX: value->rValue = model->BSIM4v6pvbx; return(OK); case BSIM4v6_MOD_PVBM: value->rValue = model->BSIM4v6pvbm; return(OK); case BSIM4v6_MOD_PXT: value->rValue = model->BSIM4v6pxt; return(OK); case BSIM4v6_MOD_PK1: value->rValue = model->BSIM4v6pk1; return(OK); case BSIM4v6_MOD_PKT1: value->rValue = model->BSIM4v6pkt1; return(OK); case BSIM4v6_MOD_PKT1L: value->rValue = model->BSIM4v6pkt1l; return(OK); case BSIM4v6_MOD_PKT2 : value->rValue = model->BSIM4v6pkt2; return(OK); case BSIM4v6_MOD_PK2 : value->rValue = model->BSIM4v6pk2; return(OK); case BSIM4v6_MOD_PK3: value->rValue = model->BSIM4v6pk3; return(OK); case BSIM4v6_MOD_PK3B: value->rValue = model->BSIM4v6pk3b; return(OK); case BSIM4v6_MOD_PW0: value->rValue = model->BSIM4v6pw0; return(OK); case BSIM4v6_MOD_PLPE0: value->rValue = model->BSIM4v6plpe0; return(OK); case BSIM4v6_MOD_PLPEB: value->rValue = model->BSIM4v6plpeb; return(OK); case BSIM4v6_MOD_PDVTP0: value->rValue = model->BSIM4v6pdvtp0; return(OK); case BSIM4v6_MOD_PDVTP1: value->rValue = model->BSIM4v6pdvtp1; return(OK); case BSIM4v6_MOD_PDVT0 : value->rValue = model->BSIM4v6pdvt0; return(OK); case BSIM4v6_MOD_PDVT1 : value->rValue = model->BSIM4v6pdvt1; return(OK); case BSIM4v6_MOD_PDVT2 : value->rValue = model->BSIM4v6pdvt2; return(OK); case BSIM4v6_MOD_PDVT0W : value->rValue = model->BSIM4v6pdvt0w; return(OK); case BSIM4v6_MOD_PDVT1W : value->rValue = model->BSIM4v6pdvt1w; return(OK); case BSIM4v6_MOD_PDVT2W : value->rValue = model->BSIM4v6pdvt2w; return(OK); case BSIM4v6_MOD_PDROUT : value->rValue = model->BSIM4v6pdrout; return(OK); case BSIM4v6_MOD_PDSUB : value->rValue = model->BSIM4v6pdsub; return(OK); case BSIM4v6_MOD_PVTH0: value->rValue = model->BSIM4v6pvth0; return(OK); case BSIM4v6_MOD_PUA: value->rValue = model->BSIM4v6pua; return(OK); case BSIM4v6_MOD_PUA1: value->rValue = model->BSIM4v6pua1; return(OK); case BSIM4v6_MOD_PUB: value->rValue = model->BSIM4v6pub; return(OK); case BSIM4v6_MOD_PUB1: value->rValue = model->BSIM4v6pub1; return(OK); case BSIM4v6_MOD_PUC: value->rValue = model->BSIM4v6puc; return(OK); case BSIM4v6_MOD_PUC1: value->rValue = model->BSIM4v6puc1; return(OK); case BSIM4v6_MOD_PUD: value->rValue = model->BSIM4v6pud; return(OK); case BSIM4v6_MOD_PUD1: value->rValue = model->BSIM4v6pud1; return(OK); case BSIM4v6_MOD_PUP: value->rValue = model->BSIM4v6pup; return(OK); case BSIM4v6_MOD_PLP: value->rValue = model->BSIM4v6plp; return(OK); case BSIM4v6_MOD_PU0: value->rValue = model->BSIM4v6pu0; return(OK); case BSIM4v6_MOD_PUTE: value->rValue = model->BSIM4v6pute; return(OK); case BSIM4v6_MOD_PUCSTE: value->rValue = model->BSIM4v6pucste; return(OK); case BSIM4v6_MOD_PVOFF: value->rValue = model->BSIM4v6pvoff; return(OK); case BSIM4v6_MOD_PTVOFF: value->rValue = model->BSIM4v6ptvoff; return(OK); case BSIM4v6_MOD_PMINV: value->rValue = model->BSIM4v6pminv; return(OK); case BSIM4v6_MOD_PMINVCV: value->rValue = model->BSIM4v6pminvcv; return(OK); case BSIM4v6_MOD_PFPROUT: value->rValue = model->BSIM4v6pfprout; return(OK); case BSIM4v6_MOD_PPDITS: value->rValue = model->BSIM4v6ppdits; return(OK); case BSIM4v6_MOD_PPDITSD: value->rValue = model->BSIM4v6ppditsd; return(OK); case BSIM4v6_MOD_PDELTA: value->rValue = model->BSIM4v6pdelta; return(OK); case BSIM4v6_MOD_PRDSW: value->rValue = model->BSIM4v6prdsw; return(OK); case BSIM4v6_MOD_PRDW: value->rValue = model->BSIM4v6prdw; return(OK); case BSIM4v6_MOD_PRSW: value->rValue = model->BSIM4v6prsw; return(OK); case BSIM4v6_MOD_PPRWB: value->rValue = model->BSIM4v6pprwb; return(OK); case BSIM4v6_MOD_PPRWG: value->rValue = model->BSIM4v6pprwg; return(OK); case BSIM4v6_MOD_PPRT: value->rValue = model->BSIM4v6pprt; return(OK); case BSIM4v6_MOD_PETA0: value->rValue = model->BSIM4v6peta0; return(OK); case BSIM4v6_MOD_PETAB: value->rValue = model->BSIM4v6petab; return(OK); case BSIM4v6_MOD_PPCLM: value->rValue = model->BSIM4v6ppclm; return(OK); case BSIM4v6_MOD_PPDIBL1: value->rValue = model->BSIM4v6ppdibl1; return(OK); case BSIM4v6_MOD_PPDIBL2: value->rValue = model->BSIM4v6ppdibl2; return(OK); case BSIM4v6_MOD_PPDIBLB: value->rValue = model->BSIM4v6ppdiblb; return(OK); case BSIM4v6_MOD_PPSCBE1: value->rValue = model->BSIM4v6ppscbe1; return(OK); case BSIM4v6_MOD_PPSCBE2: value->rValue = model->BSIM4v6ppscbe2; return(OK); case BSIM4v6_MOD_PPVAG: value->rValue = model->BSIM4v6ppvag; return(OK); case BSIM4v6_MOD_PWR: value->rValue = model->BSIM4v6pwr; return(OK); case BSIM4v6_MOD_PDWG: value->rValue = model->BSIM4v6pdwg; return(OK); case BSIM4v6_MOD_PDWB: value->rValue = model->BSIM4v6pdwb; return(OK); case BSIM4v6_MOD_PB0: value->rValue = model->BSIM4v6pb0; return(OK); case BSIM4v6_MOD_PB1: value->rValue = model->BSIM4v6pb1; return(OK); case BSIM4v6_MOD_PALPHA0: value->rValue = model->BSIM4v6palpha0; return(OK); case BSIM4v6_MOD_PALPHA1: value->rValue = model->BSIM4v6palpha1; return(OK); case BSIM4v6_MOD_PBETA0: value->rValue = model->BSIM4v6pbeta0; return(OK); case BSIM4v6_MOD_PAGIDL: value->rValue = model->BSIM4v6pagidl; return(OK); case BSIM4v6_MOD_PBGIDL: value->rValue = model->BSIM4v6pbgidl; return(OK); case BSIM4v6_MOD_PCGIDL: value->rValue = model->BSIM4v6pcgidl; return(OK); case BSIM4v6_MOD_PEGIDL: value->rValue = model->BSIM4v6pegidl; return(OK); case BSIM4v6_MOD_PAGISL: value->rValue = model->BSIM4v6pagisl; return(OK); case BSIM4v6_MOD_PBGISL: value->rValue = model->BSIM4v6pbgisl; return(OK); case BSIM4v6_MOD_PCGISL: value->rValue = model->BSIM4v6pcgisl; return(OK); case BSIM4v6_MOD_PEGISL: value->rValue = model->BSIM4v6pegisl; return(OK); case BSIM4v6_MOD_PAIGC: value->rValue = model->BSIM4v6paigc; return(OK); case BSIM4v6_MOD_PBIGC: value->rValue = model->BSIM4v6pbigc; return(OK); case BSIM4v6_MOD_PCIGC: value->rValue = model->BSIM4v6pcigc; return(OK); case BSIM4v6_MOD_PAIGSD: value->rValue = model->BSIM4v6paigsd; return(OK); case BSIM4v6_MOD_PBIGSD: value->rValue = model->BSIM4v6pbigsd; return(OK); case BSIM4v6_MOD_PCIGSD: value->rValue = model->BSIM4v6pcigsd; return(OK); case BSIM4v6_MOD_PAIGS: value->rValue = model->BSIM4v6paigs; return(OK); case BSIM4v6_MOD_PBIGS: value->rValue = model->BSIM4v6pbigs; return(OK); case BSIM4v6_MOD_PCIGS: value->rValue = model->BSIM4v6pcigs; return(OK); case BSIM4v6_MOD_PAIGD: value->rValue = model->BSIM4v6paigd; return(OK); case BSIM4v6_MOD_PBIGD: value->rValue = model->BSIM4v6pbigd; return(OK); case BSIM4v6_MOD_PCIGD: value->rValue = model->BSIM4v6pcigd; return(OK); case BSIM4v6_MOD_PAIGBACC: value->rValue = model->BSIM4v6paigbacc; return(OK); case BSIM4v6_MOD_PBIGBACC: value->rValue = model->BSIM4v6pbigbacc; return(OK); case BSIM4v6_MOD_PCIGBACC: value->rValue = model->BSIM4v6pcigbacc; return(OK); case BSIM4v6_MOD_PAIGBINV: value->rValue = model->BSIM4v6paigbinv; return(OK); case BSIM4v6_MOD_PBIGBINV: value->rValue = model->BSIM4v6pbigbinv; return(OK); case BSIM4v6_MOD_PCIGBINV: value->rValue = model->BSIM4v6pcigbinv; return(OK); case BSIM4v6_MOD_PNIGC: value->rValue = model->BSIM4v6pnigc; return(OK); case BSIM4v6_MOD_PNIGBACC: value->rValue = model->BSIM4v6pnigbacc; return(OK); case BSIM4v6_MOD_PNIGBINV: value->rValue = model->BSIM4v6pnigbinv; return(OK); case BSIM4v6_MOD_PNTOX: value->rValue = model->BSIM4v6pntox; return(OK); case BSIM4v6_MOD_PEIGBINV: value->rValue = model->BSIM4v6peigbinv; return(OK); case BSIM4v6_MOD_PPIGCD: value->rValue = model->BSIM4v6ppigcd; return(OK); case BSIM4v6_MOD_PPOXEDGE: value->rValue = model->BSIM4v6ppoxedge; return(OK); case BSIM4v6_MOD_PPHIN: value->rValue = model->BSIM4v6pphin; return(OK); case BSIM4v6_MOD_PXRCRG1: value->rValue = model->BSIM4v6pxrcrg1; return(OK); case BSIM4v6_MOD_PXRCRG2: value->rValue = model->BSIM4v6pxrcrg2; return(OK); case BSIM4v6_MOD_PEU: value->rValue = model->BSIM4v6peu; return(OK); case BSIM4v6_MOD_PUCS: value->rValue = model->BSIM4v6pucs; return(OK); case BSIM4v6_MOD_PVFB: value->rValue = model->BSIM4v6pvfb; return(OK); case BSIM4v6_MOD_PCGSL: value->rValue = model->BSIM4v6pcgsl; return(OK); case BSIM4v6_MOD_PCGDL: value->rValue = model->BSIM4v6pcgdl; return(OK); case BSIM4v6_MOD_PCKAPPAS: value->rValue = model->BSIM4v6pckappas; return(OK); case BSIM4v6_MOD_PCKAPPAD: value->rValue = model->BSIM4v6pckappad; return(OK); case BSIM4v6_MOD_PCF: value->rValue = model->BSIM4v6pcf; return(OK); case BSIM4v6_MOD_PCLC: value->rValue = model->BSIM4v6pclc; return(OK); case BSIM4v6_MOD_PCLE: value->rValue = model->BSIM4v6pcle; return(OK); case BSIM4v6_MOD_PVFBCV: value->rValue = model->BSIM4v6pvfbcv; return(OK); case BSIM4v6_MOD_PACDE: value->rValue = model->BSIM4v6pacde; return(OK); case BSIM4v6_MOD_PMOIN: value->rValue = model->BSIM4v6pmoin; return(OK); case BSIM4v6_MOD_PNOFF: value->rValue = model->BSIM4v6pnoff; return(OK); case BSIM4v6_MOD_PVOFFCV: value->rValue = model->BSIM4v6pvoffcv; return(OK); case BSIM4v6_MOD_PVFBSDOFF: value->rValue = model->BSIM4v6pvfbsdoff; return(OK); case BSIM4v6_MOD_PTVFBSDOFF: value->rValue = model->BSIM4v6ptvfbsdoff; return(OK); case BSIM4v6_MOD_TNOM : value->rValue = model->BSIM4v6tnom; return(OK); case BSIM4v6_MOD_CGSO: value->rValue = model->BSIM4v6cgso; return(OK); case BSIM4v6_MOD_CGDO: value->rValue = model->BSIM4v6cgdo; return(OK); case BSIM4v6_MOD_CGBO: value->rValue = model->BSIM4v6cgbo; return(OK); case BSIM4v6_MOD_XPART: value->rValue = model->BSIM4v6xpart; return(OK); case BSIM4v6_MOD_RSH: value->rValue = model->BSIM4v6sheetResistance; return(OK); case BSIM4v6_MOD_JSS: value->rValue = model->BSIM4v6SjctSatCurDensity; return(OK); case BSIM4v6_MOD_JSWS: value->rValue = model->BSIM4v6SjctSidewallSatCurDensity; return(OK); case BSIM4v6_MOD_JSWGS: value->rValue = model->BSIM4v6SjctGateSidewallSatCurDensity; return(OK); case BSIM4v6_MOD_PBS: value->rValue = model->BSIM4v6SbulkJctPotential; return(OK); case BSIM4v6_MOD_MJS: value->rValue = model->BSIM4v6SbulkJctBotGradingCoeff; return(OK); case BSIM4v6_MOD_PBSWS: value->rValue = model->BSIM4v6SsidewallJctPotential; return(OK); case BSIM4v6_MOD_MJSWS: value->rValue = model->BSIM4v6SbulkJctSideGradingCoeff; return(OK); case BSIM4v6_MOD_CJS: value->rValue = model->BSIM4v6SunitAreaJctCap; return(OK); case BSIM4v6_MOD_CJSWS: value->rValue = model->BSIM4v6SunitLengthSidewallJctCap; return(OK); case BSIM4v6_MOD_PBSWGS: value->rValue = model->BSIM4v6SGatesidewallJctPotential; return(OK); case BSIM4v6_MOD_MJSWGS: value->rValue = model->BSIM4v6SbulkJctGateSideGradingCoeff; return(OK); case BSIM4v6_MOD_CJSWGS: value->rValue = model->BSIM4v6SunitLengthGateSidewallJctCap; return(OK); case BSIM4v6_MOD_NJS: value->rValue = model->BSIM4v6SjctEmissionCoeff; return(OK); case BSIM4v6_MOD_XTIS: value->rValue = model->BSIM4v6SjctTempExponent; return(OK); case BSIM4v6_MOD_JSD: value->rValue = model->BSIM4v6DjctSatCurDensity; return(OK); case BSIM4v6_MOD_JSWD: value->rValue = model->BSIM4v6DjctSidewallSatCurDensity; return(OK); case BSIM4v6_MOD_JSWGD: value->rValue = model->BSIM4v6DjctGateSidewallSatCurDensity; return(OK); case BSIM4v6_MOD_PBD: value->rValue = model->BSIM4v6DbulkJctPotential; return(OK); case BSIM4v6_MOD_MJD: value->rValue = model->BSIM4v6DbulkJctBotGradingCoeff; return(OK); case BSIM4v6_MOD_PBSWD: value->rValue = model->BSIM4v6DsidewallJctPotential; return(OK); case BSIM4v6_MOD_MJSWD: value->rValue = model->BSIM4v6DbulkJctSideGradingCoeff; return(OK); case BSIM4v6_MOD_CJD: value->rValue = model->BSIM4v6DunitAreaJctCap; return(OK); case BSIM4v6_MOD_CJSWD: value->rValue = model->BSIM4v6DunitLengthSidewallJctCap; return(OK); case BSIM4v6_MOD_PBSWGD: value->rValue = model->BSIM4v6DGatesidewallJctPotential; return(OK); case BSIM4v6_MOD_MJSWGD: value->rValue = model->BSIM4v6DbulkJctGateSideGradingCoeff; return(OK); case BSIM4v6_MOD_CJSWGD: value->rValue = model->BSIM4v6DunitLengthGateSidewallJctCap; return(OK); case BSIM4v6_MOD_NJD: value->rValue = model->BSIM4v6DjctEmissionCoeff; return(OK); case BSIM4v6_MOD_XTID: value->rValue = model->BSIM4v6DjctTempExponent; return(OK); case BSIM4v6_MOD_LINT: value->rValue = model->BSIM4v6Lint; return(OK); case BSIM4v6_MOD_LL: value->rValue = model->BSIM4v6Ll; return(OK); case BSIM4v6_MOD_LLC: value->rValue = model->BSIM4v6Llc; return(OK); case BSIM4v6_MOD_LLN: value->rValue = model->BSIM4v6Lln; return(OK); case BSIM4v6_MOD_LW: value->rValue = model->BSIM4v6Lw; return(OK); case BSIM4v6_MOD_LWC: value->rValue = model->BSIM4v6Lwc; return(OK); case BSIM4v6_MOD_LWN: value->rValue = model->BSIM4v6Lwn; return(OK); case BSIM4v6_MOD_LWL: value->rValue = model->BSIM4v6Lwl; return(OK); case BSIM4v6_MOD_LWLC: value->rValue = model->BSIM4v6Lwlc; return(OK); case BSIM4v6_MOD_LMIN: value->rValue = model->BSIM4v6Lmin; return(OK); case BSIM4v6_MOD_LMAX: value->rValue = model->BSIM4v6Lmax; return(OK); case BSIM4v6_MOD_WINT: value->rValue = model->BSIM4v6Wint; return(OK); case BSIM4v6_MOD_WL: value->rValue = model->BSIM4v6Wl; return(OK); case BSIM4v6_MOD_WLC: value->rValue = model->BSIM4v6Wlc; return(OK); case BSIM4v6_MOD_WLN: value->rValue = model->BSIM4v6Wln; return(OK); case BSIM4v6_MOD_WW: value->rValue = model->BSIM4v6Ww; return(OK); case BSIM4v6_MOD_WWC: value->rValue = model->BSIM4v6Wwc; return(OK); case BSIM4v6_MOD_WWN: value->rValue = model->BSIM4v6Wwn; return(OK); case BSIM4v6_MOD_WWL: value->rValue = model->BSIM4v6Wwl; return(OK); case BSIM4v6_MOD_WWLC: value->rValue = model->BSIM4v6Wwlc; return(OK); case BSIM4v6_MOD_WMIN: value->rValue = model->BSIM4v6Wmin; return(OK); case BSIM4v6_MOD_WMAX: value->rValue = model->BSIM4v6Wmax; return(OK); /* stress effect */ case BSIM4v6_MOD_SAREF: value->rValue = model->BSIM4v6saref; return(OK); case BSIM4v6_MOD_SBREF: value->rValue = model->BSIM4v6sbref; return(OK); case BSIM4v6_MOD_WLOD: value->rValue = model->BSIM4v6wlod; return(OK); case BSIM4v6_MOD_KU0: value->rValue = model->BSIM4v6ku0; return(OK); case BSIM4v6_MOD_KVSAT: value->rValue = model->BSIM4v6kvsat; return(OK); case BSIM4v6_MOD_KVTH0: value->rValue = model->BSIM4v6kvth0; return(OK); case BSIM4v6_MOD_TKU0: value->rValue = model->BSIM4v6tku0; return(OK); case BSIM4v6_MOD_LLODKU0: value->rValue = model->BSIM4v6llodku0; return(OK); case BSIM4v6_MOD_WLODKU0: value->rValue = model->BSIM4v6wlodku0; return(OK); case BSIM4v6_MOD_LLODVTH: value->rValue = model->BSIM4v6llodvth; return(OK); case BSIM4v6_MOD_WLODVTH: value->rValue = model->BSIM4v6wlodvth; return(OK); case BSIM4v6_MOD_LKU0: value->rValue = model->BSIM4v6lku0; return(OK); case BSIM4v6_MOD_WKU0: value->rValue = model->BSIM4v6wku0; return(OK); case BSIM4v6_MOD_PKU0: value->rValue = model->BSIM4v6pku0; return(OK); case BSIM4v6_MOD_LKVTH0: value->rValue = model->BSIM4v6lkvth0; return(OK); case BSIM4v6_MOD_WKVTH0: value->rValue = model->BSIM4v6wkvth0; return(OK); case BSIM4v6_MOD_PKVTH0: value->rValue = model->BSIM4v6pkvth0; return(OK); case BSIM4v6_MOD_STK2: value->rValue = model->BSIM4v6stk2; return(OK); case BSIM4v6_MOD_LODK2: value->rValue = model->BSIM4v6lodk2; return(OK); case BSIM4v6_MOD_STETA0: value->rValue = model->BSIM4v6steta0; return(OK); case BSIM4v6_MOD_LODETA0: value->rValue = model->BSIM4v6lodeta0; return(OK); /* Well Proximity Effect */ case BSIM4v6_MOD_WEB: value->rValue = model->BSIM4v6web; return(OK); case BSIM4v6_MOD_WEC: value->rValue = model->BSIM4v6wec; return(OK); case BSIM4v6_MOD_KVTH0WE: value->rValue = model->BSIM4v6kvth0we; return(OK); case BSIM4v6_MOD_K2WE: value->rValue = model->BSIM4v6k2we; return(OK); case BSIM4v6_MOD_KU0WE: value->rValue = model->BSIM4v6ku0we; return(OK); case BSIM4v6_MOD_SCREF: value->rValue = model->BSIM4v6scref; return(OK); case BSIM4v6_MOD_WPEMOD: value->rValue = model->BSIM4v6wpemod; return(OK); case BSIM4v6_MOD_LKVTH0WE: value->rValue = model->BSIM4v6lkvth0we; return(OK); case BSIM4v6_MOD_LK2WE: value->rValue = model->BSIM4v6lk2we; return(OK); case BSIM4v6_MOD_LKU0WE: value->rValue = model->BSIM4v6lku0we; return(OK); case BSIM4v6_MOD_WKVTH0WE: value->rValue = model->BSIM4v6wkvth0we; return(OK); case BSIM4v6_MOD_WK2WE: value->rValue = model->BSIM4v6wk2we; return(OK); case BSIM4v6_MOD_WKU0WE: value->rValue = model->BSIM4v6wku0we; return(OK); case BSIM4v6_MOD_PKVTH0WE: value->rValue = model->BSIM4v6pkvth0we; return(OK); case BSIM4v6_MOD_PK2WE: value->rValue = model->BSIM4v6pk2we; return(OK); case BSIM4v6_MOD_PKU0WE: value->rValue = model->BSIM4v6pku0we; return(OK); case BSIM4v6_MOD_NOIA: value->rValue = model->BSIM4v6oxideTrapDensityA; return(OK); case BSIM4v6_MOD_NOIB: value->rValue = model->BSIM4v6oxideTrapDensityB; return(OK); case BSIM4v6_MOD_NOIC: value->rValue = model->BSIM4v6oxideTrapDensityC; return(OK); case BSIM4v6_MOD_EM: value->rValue = model->BSIM4v6em; return(OK); case BSIM4v6_MOD_EF: value->rValue = model->BSIM4v6ef; return(OK); case BSIM4v6_MOD_AF: value->rValue = model->BSIM4v6af; return(OK); case BSIM4v6_MOD_KF: value->rValue = model->BSIM4v6kf; return(OK); case BSIM4v6_MOD_VGS_MAX: value->rValue = model->BSIM4v6vgsMax; return(OK); case BSIM4v6_MOD_VGD_MAX: value->rValue = model->BSIM4v6vgdMax; return(OK); case BSIM4v6_MOD_VGB_MAX: value->rValue = model->BSIM4v6vgbMax; return(OK); case BSIM4v6_MOD_VDS_MAX: value->rValue = model->BSIM4v6vdsMax; return(OK); case BSIM4v6_MOD_VBS_MAX: value->rValue = model->BSIM4v6vbsMax; return(OK); case BSIM4v6_MOD_VBD_MAX: value->rValue = model->BSIM4v6vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v6/b4v6getic.c0000644000265600020320000000267312264261473021477 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4getic.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v6getic( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance *here; for (; model ; model = model->BSIM4v6nextModel) { for (here = model->BSIM4v6instances; here; here = here->BSIM4v6nextInstance) { if (!here->BSIM4v6icVDSGiven) { here->BSIM4v6icVDS = *(ckt->CKTrhs + here->BSIM4v6dNode) - *(ckt->CKTrhs + here->BSIM4v6sNode); } if (!here->BSIM4v6icVGSGiven) { here->BSIM4v6icVGS = *(ckt->CKTrhs + here->BSIM4v6gNodeExt) - *(ckt->CKTrhs + here->BSIM4v6sNode); } if(!here->BSIM4v6icVBSGiven) { here->BSIM4v6icVBS = *(ckt->CKTrhs + here->BSIM4v6bNode) - *(ckt->CKTrhs + here->BSIM4v6sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v6/b4v6del.c0000644000265600020320000000234112264261473021140 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4del.c of BSIM4.6.2. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v6def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM4v6delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM4v6instance **fast = (BSIM4v6instance**)inInst; BSIM4v6model *model = (BSIM4v6model*)inModel; BSIM4v6instance **prev = NULL; BSIM4v6instance *here; for (; model ; model = model->BSIM4v6nextModel) { prev = &(model->BSIM4v6instances); for (here = *prev; here ; here = *prev) { if (here->BSIM4v6name == name || (fast && here==*fast)) { *prev= here->BSIM4v6nextInstance; FREE(here); return(OK); } prev = &(here->BSIM4v6nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim4v6/B4TERMS_OF_USE0000644000265600020320000000254412264261473021636 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. Chenming Hu, and Weidong Liu Mar. 2000 ngspice-26/src/spicelib/devices/cap/0000755000265600020320000000000012264261706016776 5ustar andreasadminngspice-26/src/spicelib/devices/cap/capgetic.c0000644000265600020320000000165312264261473020727 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPgetic(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->CAPnextModel) { for(here = model->CAPinstances; here ; here = here->CAPnextInstance) { if(!here->CAPicGiven) { here->CAPinitCond = *(ckt->CKTrhs + here->CAPposNode) - *(ckt->CKTrhs + here->CAPnegNode); } } } return(OK); } ngspice-26/src/spicelib/devices/cap/capext.h0000644000265600020320000000214112264261473020432 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int CAPacLoad(GENmodel*,CKTcircuit*); extern int CAPask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int CAPdelete(GENmodel*,IFuid,GENinstance**); extern void CAPdestroy(GENmodel**); extern int CAPgetic(GENmodel*,CKTcircuit*); extern int CAPload(GENmodel*,CKTcircuit*); extern int CAPmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int CAPmDelete(GENmodel**,IFuid,GENmodel*); extern int CAPmParam(int,IFvalue*,GENmodel*); extern int CAPparam(int,IFvalue*,GENinstance*,IFvalue*); extern int CAPpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int CAPsAcLoad(GENmodel*,CKTcircuit*); extern int CAPsLoad(GENmodel*,CKTcircuit*); extern void CAPsPrint(GENmodel*,CKTcircuit*); extern int CAPsSetup(SENstruct *,GENmodel*); extern int CAPsUpdate(GENmodel*,CKTcircuit*); extern int CAPsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int CAPtemp(GENmodel*,CKTcircuit*); extern int CAPtrunc(GENmodel*,CKTcircuit*,double*); extern int CAPsoaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/cap/capsprt.c0000644000265600020320000000257712264261473020632 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* Pretty print the sensitivity info for all * the capacitors in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void CAPsPrint(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; printf("CAPACITORS-----------------\n"); /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { printf("Model name:%s\n",model->CAPmodName); /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { printf(" Instance name:%s\n",here->CAPname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->CAPposNode),CKTnodName(ckt,here->CAPnegNode)); printf(" Capacitance: %e",here->CAPcapac); printf(here->CAPcapGiven ? "(specified)\n" : "(default)\n"); printf(" CAPsenParmNo:%d\n",here->CAPsenParmNo); } } } ngspice-26/src/spicelib/devices/cap/capdest.c0000644000265600020320000000144412264261473020571 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "capdefs.h" #include "ngspice/suffix.h" void CAPdestroy(GENmodel **inModel) { CAPmodel **model = (CAPmodel**)inModel; CAPinstance *here; CAPinstance *prev = NULL; CAPmodel *mod = *model; CAPmodel *oldmod = NULL; for( ; mod ; mod = mod->CAPnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->CAPinstances ; here ; here = here->CAPnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/cap/capdefs.h0000644000265600020320000001537612264261473020571 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ #ifndef CAP #define CAP #include "ngspice/ifsim.h" #include "ngspice/complex.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" /* structures used to describe capacitors */ /* information to describe each instance */ typedef struct sCAPinstance { struct sCAPmodel *CAPmodPtr; /* backpointer to model */ struct sCAPinstance *CAPnextInstance; /* pointer to next instance of * current model*/ IFuid CAPname; /* pointer to character string naming this instance */ int CAPstate; /* pointer to start of capacitor state vector */ int CAPposNode; /* number of positive node of capacitor */ int CAPnegNode; /* number of negative node of capacitor */ double CAPtemp; /* temperature at which this capacitor operates */ double CAPdtemp; /* delta-temperature of this instance */ double CAPcapac; /* capacitance */ double CAPinitCond; /* initial capacitor voltage if specified */ double CAPwidth; /* width of the capacitor */ double CAPlength; /* length of the capacitor */ double CAPscale; /* scale factor */ double CAPm; /* parallel multiplier */ double CAPtc1; /* first temperature coefficient of capacitors */ double CAPtc2; /* second temperature coefficient of capacitors */ double CAPbv_max; /* Maximum capacitor voltage */ double *CAPposPosptr; /* pointer to sparse matrix diagonal at * (positive,positive) */ double *CAPnegNegptr; /* pointer to sparse matrix diagonal at * (negative,negative) */ double *CAPposNegptr; /* pointer to sparse matrix offdiagonal at * (positive,negative) */ double *CAPnegPosptr; /* pointer to sparse matrix offdiagonal at * (negative,positive) */ unsigned CAPcapGiven : 1; /* flag to indicate capacitance was specified */ unsigned CAPicGiven : 1; /* flag to indicate init. cond. was specified */ unsigned CAPwidthGiven : 1; /* flag to indicate capacitor width given */ unsigned CAPlengthGiven : 1; /* flag to indicate capacitor length given*/ unsigned CAPtempGiven : 1; /* flag to indicate operating temp given */ unsigned CAPdtempGiven : 1; /* flag to indicate delta temp given */ unsigned CAPscaleGiven : 1; /* flag to indicate scale factor given */ unsigned CAPmGiven : 1; /* flag to indicate parallel multiplier given */ unsigned CAPtc1Given : 1; /* flag indicates tc1 was specified */ unsigned CAPtc2Given : 1; /* flag indicates tc2 was specified */ unsigned CAPbv_maxGiven : 1; /* flags indicates maximum voltage is given */ int CAPsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } CAPinstance ; #define CAPqcap CAPstate /* charge on the capacitor */ #define CAPccap CAPstate+1 /* current through the capacitor */ #define CAPsensxp CAPstate+2 /* charge sensitivities and their derivatives. +3 for the derivatives - pointer to the beginning of the array */ /* data per model */ typedef struct sCAPmodel { /* model structure for a capacitor */ int CAPmodType; /* type index of this device type */ struct sCAPmodel *CAPnextModel; /* pointer to next possible model in * linked list */ CAPinstance * CAPinstances; /* pointer to list of instances that have this * model */ IFuid CAPmodName; /* pointer to character string naming this model */ double CAPtnom; /* temperature at which capacitance measured */ double CAPtempCoeff1; /* linear temperature coefficient */ double CAPtempCoeff2; /* quadratic temperature coefficient */ double CAPmCap; /* Model default capacitance */ double CAPcj; /* Unit Area Capacitance ( F/ M**2 ) */ double CAPcjsw; /* Unit Length Sidewall Capacitance ( F / M ) */ double CAPdefWidth; /* the default width of a capacitor */ double CAPdefLength; /* the default length of a capacitor */ double CAPnarrow; /* amount by which width are less than drawn */ double CAPshort; /* amount by which length are less than drawn */ double CAPdel; /* amount by which length and width are less than drawn */ double CAPdi; /* Relative dielectric constant */ double CAPthick; /* Insulator thickness */ double CAPbv_max; /* Maximum capacitor voltage */ unsigned CAPmCapGiven : 1; /* flag indicates default capacitance given */ unsigned CAPcjGiven : 1; /* Unit Area Capacitance ( F/ M**2 ) */ unsigned CAPcjswGiven : 1; /* Unit Length Sidewall Capacitance( F/M )*/ unsigned CAPdefWidthGiven : 1; /* flag indicates default width given*/ unsigned CAPdefLengthGiven : 1; /* flag indicates deafult lenght given */ unsigned CAPnarrowGiven : 1; /* flag indicates narrowing factor given */ unsigned CAPshortGiven : 1; /* flag indicates shortening factor given */ unsigned CAPdelGiven : 1; /* flag indicates del factor given */ unsigned CAPtnomGiven : 1; /* flag indicates nominal temp. given */ unsigned CAPtc1Given : 1; /* flag indicates tc1 was specified */ unsigned CAPtc2Given : 1; /* flag indicates tc2 was specified */ unsigned CAPdiGiven : 1; /* flag indicates epsilon-ins given */ unsigned CAPthickGiven : 1; /* flags indicates insulator thickness given */ unsigned CAPbv_maxGiven : 1; /* flags indicates maximum voltage is given */ } CAPmodel; /* device parameters */ #define CAP_CAP 1 #define CAP_IC 2 #define CAP_WIDTH 3 #define CAP_LENGTH 4 #define CAP_CAP_SENS 5 #define CAP_CURRENT 6 #define CAP_POWER 7 #define CAP_TEMP 8 #define CAP_DTEMP 9 #define CAP_SCALE 10 #define CAP_M 11 #define CAP_TC1 12 #define CAP_TC2 13 #define CAP_BV_MAX 14 /* model parameters */ #define CAP_MOD_CJ 101 #define CAP_MOD_CJSW 102 #define CAP_MOD_DEFWIDTH 103 #define CAP_MOD_C 104 #define CAP_MOD_NARROW 105 #define CAP_MOD_SHORT 106 #define CAP_MOD_DEL 107 #define CAP_MOD_TC1 108 #define CAP_MOD_TC2 109 #define CAP_MOD_TNOM 110 #define CAP_MOD_DI 111 #define CAP_MOD_THICK 112 #define CAP_MOD_CAP 113 #define CAP_MOD_DEFLENGTH 114 #define CAP_MOD_BV_MAX 115 /* device questions */ #define CAP_QUEST_SENS_REAL 201 #define CAP_QUEST_SENS_IMAG 202 #define CAP_QUEST_SENS_MAG 203 #define CAP_QUEST_SENS_PH 204 #define CAP_QUEST_SENS_CPLX 205 #define CAP_QUEST_SENS_DC 206 #include "capext.h" #endif /*CAP*/ ngspice-26/src/spicelib/devices/cap/capsacl.c0000644000265600020320000000356012264261473020555 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; double vcap; double ivcap; double val; double ival; /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { if(here->CAPsenParmNo){ vcap = *(ckt->CKTrhsOld+here->CAPposNode) - *(ckt->CKTrhsOld+here->CAPnegNode); ivcap = *(ckt->CKTirhsOld+here->CAPposNode) - *(ckt->CKTirhsOld+here->CAPnegNode); val = ckt->CKTomega * ivcap; ival = ckt->CKTomega * vcap; /* load the RHS matrix */ *(ckt->CKTsenInfo->SEN_RHS[here->CAPposNode] + here->CAPsenParmNo) += val; *(ckt->CKTsenInfo->SEN_iRHS[here->CAPposNode] + here->CAPsenParmNo) -= ival; *(ckt->CKTsenInfo->SEN_RHS[here->CAPnegNode] + here->CAPsenParmNo) -= val; *(ckt->CKTsenInfo->SEN_iRHS[here->CAPnegNode] + here->CAPsenParmNo) += ival; } } } return(OK); } ngspice-26/src/spicelib/devices/cap/capsset.c0000644000265600020320000000201112264261473020577 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPsSetup(SENstruct *info, GENmodel *inModel) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { if(here->CAPsenParmNo){ here->CAPsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/cap/capdel.c0000644000265600020320000000160712264261473020377 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { CAPinstance **fast = (CAPinstance**)inst; CAPmodel *model = (CAPmodel*)inModel; CAPinstance **prev = NULL; CAPinstance *here; for( ; model ; model = model->CAPnextModel) { prev = &(model->CAPinstances); for(here = *prev; here ; here = *prev) { if(here->CAPname == name || (fast && here==*fast) ) { *prev= here->CAPnextInstance; FREE(here); return(OK); } prev = &(here->CAPnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/cap/capsupd.c0000644000265600020320000000461512264261473020610 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ /* update the charge sensitivities and their derivatives */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPsUpdate(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; int iparmno; double s1; double s2; double sxp; double vcap; double dummy1; double dummy2; SENstruct *info; info = ckt->CKTsenInfo; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) return(OK); #ifdef SENSDEBUG printf("CAPsenUpdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { vcap = *(ckt->CKTrhsOld+here->CAPposNode) - *(ckt->CKTrhsOld+here->CAPnegNode) ; for(iparmno=1;iparmno<=info->SENparms;iparmno++){ s1 = *(info->SEN_Sap[here->CAPposNode] + iparmno); s2 = *(info->SEN_Sap[here->CAPnegNode] + iparmno); sxp = here->CAPcapac * (s1 - s2); if(iparmno == here->CAPsenParmNo) sxp += vcap; *(ckt->CKTstate0 + here->CAPsensxp + 2*(iparmno - 1)) = sxp; if(ckt->CKTtime == 0){ *(ckt->CKTstate0 + here->CAPsensxp + 2*(iparmno - 1) + 1)=0; } else{ NIintegrate(ckt,&dummy1,&dummy2,here->CAPcapac, (here->CAPsensxp + 2 * (iparmno -1 ))); } #ifdef SENSDEBUG printf("after loading\n"); printf("iparmno = %d\n",iparmno); printf("s1 = %.7e,s2 = %.7e\n",s1,s2); printf("sxp = %.7e,sdotxp = %.7e\n", sxp,*(ckt->CKTstate0 + here->CAPsensxp + 2*(iparmno - 1) + 1)); printf("\n"); #endif /* SENSDEBUG */ } } } return(OK); } ngspice-26/src/spicelib/devices/cap/capsetup.c0000644000265600020320000000703512264261473020774 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CAPsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the capacitor structure with those pointers needed later * for fast matrix loading */ { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /*Default Value Processing for Model Parameters */ if (!model->CAPmCapGiven) { model->CAPmCap = 0.0; } if (!model->CAPcjswGiven){ model->CAPcjsw = 0.0; } if (!model->CAPdefWidthGiven) { model->CAPdefWidth = 10.e-6; } if (!model->CAPdefLengthGiven) { model->CAPdefLength = 0.0; } if (!model->CAPnarrowGiven) { model->CAPnarrow = 0.0; } if (!model->CAPshortGiven) { model->CAPshort = 0.0; } if (!model->CAPdelGiven) { model->CAPdel = 0.0; } if (!model->CAPtc1Given) { model->CAPtempCoeff1 = 0.0; } if (!model->CAPtc2Given) { model->CAPtempCoeff2 = 0.0; } if (!model->CAPtnomGiven) { model->CAPtnom = ckt->CKTnomTemp; } if (!model->CAPdiGiven) { model->CAPdi = 0.0; } if (!model->CAPthickGiven) { model->CAPthick = 0.0; } if (!model->CAPbv_maxGiven) { model->CAPbv_max = 1e99; } if (!model->CAPcjGiven) { if((model->CAPthickGiven) && (model->CAPthick > 0.0)) { if (model->CAPdiGiven) model->CAPcj = (model->CAPdi * CONSTepsZero) / model->CAPthick; else model->CAPcj = CONSTepsSiO2 / model->CAPthick; } else { model->CAPcj = 0.0; } } if (model->CAPdelGiven) { if (!model->CAPnarrowGiven) model->CAPnarrow = 2 * model->CAPdel; if (!model->CAPshortGiven) model->CAPshort = 2 * model->CAPdel; } /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { /* Default Value Processing for Capacitor Instance */ if (!here->CAPlengthGiven) { here->CAPlength = 0; } if (!here->CAPbv_maxGiven) { here->CAPbv_max = model->CAPbv_max; } here->CAPqcap = *states; *states += 2; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 2 * (ckt->CKTsenInfo->SENparms); } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(CAPposPosptr,CAPposNode,CAPposNode); TSTALLOC(CAPnegNegptr,CAPnegNode,CAPnegNode); TSTALLOC(CAPposNegptr,CAPposNode,CAPnegNode); TSTALLOC(CAPnegPosptr,CAPnegNode,CAPposNode); } } return(OK); } ngspice-26/src/spicelib/devices/cap/capmdel.c0000644000265600020320000000201512264261473020546 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Spetember 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { CAPmodel *modfast = (CAPmodel*)kill; CAPmodel **model = (CAPmodel**)inModel; CAPinstance *here; CAPinstance *prev = NULL; CAPmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->CAPnextModel)) { if( (*model)->CAPmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->CAPnextModel; /* cut deleted device out of list */ for(here = (*model)->CAPinstances ; here ; here = here->CAPnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/cap/capinit.h0000644000265600020320000000035612264261473020603 0ustar andreasadmin#ifndef _CAPINIT_H #define _CAPINIT_H extern IFparm CAPpTable[ ]; extern IFparm CAPmPTable[ ]; extern char *CAPnames[ ]; extern int CAPpTSize; extern int CAPmPTSize; extern int CAPnSize; extern int CAPiSize; extern int CAPmSize; #endif ngspice-26/src/spicelib/devices/cap/capsload.c0000644000265600020320000000543212264261473020735 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPsLoad(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; int iparmno; double vcap; double Osxp; double tag0; double tag1; SENstruct *info; info = ckt->CKTsenInfo; if((info->SENmode == DCSEN) || (ckt->CKTmode&MODETRANOP)) return( OK ); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) return(OK); #ifdef SENSDEBUG printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CAPsenload \n"); #endif /* SENSDEBUG */ tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ /* Euler Method */ tag1 = 0; /* we treat tag1 as beta */ } /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { #ifdef SENSDEBUG printf("senload instance name %s\n",here->CAPname); printf("pos = %d , neg = %d \n",here->CAPposNode ,here->CAPnegNode); #endif /* SENSDEBUG */ vcap = *(ckt->CKTrhsOld+here->CAPposNode) - *(ckt->CKTrhsOld+here->CAPnegNode) ; for(iparmno=1;iparmno<=info->SENparms;iparmno++){ Osxp = tag0 * *(ckt->CKTstate1 + here->CAPsensxp + 2*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->CAPsensxp + 2*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sxp = %.5e\n" ,*(ckt->CKTstate1 + here->CAPsensxp + 2*(iparmno-1))); printf("sdotxp = %.5e\n", *(ckt->CKTstate1 + here->CAPsensxp + 2*(iparmno-1)+1)); printf("Osxp = %.5e\n",Osxp); #endif /* SENSDEBUG */ if(iparmno == here->CAPsenParmNo) Osxp = Osxp - tag0 * vcap; #ifdef SENSDEBUG printf("Osxp = %.5e\n",Osxp); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->CAPposNode] + iparmno) += Osxp; *(info->SEN_RHS[here->CAPnegNode] + iparmno) -= Osxp; } } } return(OK); } ngspice-26/src/spicelib/devices/cap/capinit.c0000644000265600020320000000404012264261473020570 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "capitf.h" #include "capext.h" #include "capinit.h" SPICEdev CAPinfo = { { "Capacitor", "Fixed capacitor", &CAPnSize, &CAPnSize, CAPnames, &CAPpTSize, CAPpTable, &CAPmPTSize, CAPmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ CAPparam, /* DEVmodParam */ CAPmParam, /* DEVload */ CAPload, /* DEVsetup */ CAPsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ CAPsetup, /* DEVtemperature*/ CAPtemp, /* DEVtrunc */ CAPtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ CAPacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ CAPdestroy, /* DEVmodDelete */ CAPmDelete, /* DEVdelete */ CAPdelete, /* DEVsetic */ CAPgetic, /* DEVask */ CAPask, /* DEVmodAsk */ CAPmAsk, /* DEVpzLoad */ CAPpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ CAPsSetup, /* DEVsenLoad */ CAPsLoad, /* DEVsenUpdate */ CAPsUpdate, /* DEVsenAcLoad */ CAPsAcLoad, /* DEVsenPrint */ CAPsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ CAPsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &CAPiSize, /* DEVmodSize */ &CAPmSize }; SPICEdev * get_cap_info(void) { return &CAPinfo; } ngspice-26/src/spicelib/devices/cap/capitf.h0000644000265600020320000000025512264261473020420 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_CAP #define DEV_CAP SPICEdev *get_cap_info(void); #endif ngspice-26/src/spicelib/devices/cap/capmpar.c0000644000265600020320000000425012264261473020567 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPmParam(int param, IFvalue *value, GENmodel *inModel) { CAPmodel *mod = (CAPmodel*)inModel; switch(param) { case CAP_MOD_TNOM: mod->CAPtnom = value->rValue+CONSTCtoK; mod->CAPtnomGiven = TRUE; break; case CAP_MOD_TC1: mod->CAPtempCoeff1 = value->rValue; mod->CAPtc1Given = TRUE; break; case CAP_MOD_TC2: mod->CAPtempCoeff2 = value->rValue; mod->CAPtc2Given = TRUE; break; case CAP_MOD_CAP: mod->CAPmCap = value->rValue; mod->CAPmCapGiven = TRUE; break; case CAP_MOD_CJ : mod->CAPcj = value->rValue; mod->CAPcjGiven = TRUE; break; case CAP_MOD_CJSW : mod->CAPcjsw = value->rValue; mod->CAPcjswGiven = TRUE; break; case CAP_MOD_DEFWIDTH: mod->CAPdefWidth = value->rValue; mod->CAPdefWidthGiven = TRUE; break; case CAP_MOD_DEFLENGTH: mod->CAPdefLength = value->rValue; mod->CAPdefLengthGiven = TRUE; break; case CAP_MOD_NARROW: mod->CAPnarrow = value->rValue; mod->CAPnarrowGiven = TRUE; break; case CAP_MOD_SHORT: mod->CAPshort = value->rValue; mod->CAPshortGiven = TRUE; break; case CAP_MOD_DEL: mod->CAPdel = value->rValue; mod->CAPdelGiven = TRUE; break; case CAP_MOD_DI: mod->CAPdi = value->rValue; mod->CAPdiGiven = TRUE; break; case CAP_MOD_THICK: mod->CAPthick = value->rValue; mod->CAPthickGiven = TRUE; break; case CAP_MOD_BV_MAX: mod->CAPbv_max = value->rValue; mod->CAPbv_maxGiven = TRUE; break; case CAP_MOD_C: /* just being reassured by the user that we are a capacitor */ /* no-op */ break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cap/captemp.c0000644000265600020320000000552512264261473020603 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ /* load the capacitor structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CAPtemp(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; double difference; double factor; double tc1, tc2; /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { /* Default Value Processing for Capacitor Instance */ if(!here->CAPtempGiven) { here->CAPtemp = ckt->CKTtemp; if(!here->CAPdtempGiven) here->CAPdtemp = 0.0; } else { /* CAPtempGiven */ here->CAPdtemp = 0.0; if (here->CAPdtempGiven) printf("%s: Instance temperature specified, dtemp ignored\n", here->CAPname); } if (!here->CAPwidthGiven) { here->CAPwidth = model->CAPdefWidth; } if (!here->CAPscaleGiven) here->CAPscale = 1.0; if (!here->CAPmGiven) here->CAPm = 1.0; if (!here->CAPcapGiven) { /* No instance capacitance given */ if (!model->CAPmCapGiven) { /* No model capacitange given */ here->CAPcapac = model->CAPcj * (here->CAPwidth - model->CAPnarrow) * (here->CAPlength - model->CAPshort) + model->CAPcjsw * 2 * ( (here->CAPlength - model->CAPshort) + (here->CAPwidth - model->CAPnarrow) ); } else { here->CAPcapac = model->CAPmCap; } } difference = (here->CAPtemp + here->CAPdtemp) - model->CAPtnom; /* instance parameters tc1 and tc2 will override model parameters tc1 and tc2 */ if (here->CAPtc1Given) tc1 = here->CAPtc1; /* instance */ else tc1 = model->CAPtempCoeff1; /* model */ if (here->CAPtc2Given) tc2 = here->CAPtc2; else tc2 = model->CAPtempCoeff2; factor = 1.0 + tc1*difference + tc2*difference*difference; here->CAPcapac = here->CAPcapac * factor * here->CAPscale; } } return(OK); } ngspice-26/src/spicelib/devices/cap/capacld.c0000644000265600020320000000165112264261473020535 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPacLoad(GENmodel *inModel, CKTcircuit *ckt) { CAPmodel *model = (CAPmodel*)inModel; double val; double m; CAPinstance *here; for( ; model != NULL; model = model->CAPnextModel) { for( here = model->CAPinstances; here != NULL; here = here->CAPnextInstance) { m = here->CAPm; val = ckt->CKTomega * here->CAPcapac; *(here->CAPposPosptr +1) += m * val; *(here->CAPnegNegptr +1) += m * val; *(here->CAPposNegptr +1) -= m * val; *(here->CAPnegPosptr +1) -= m * val; } } return(OK); } ngspice-26/src/spicelib/devices/cap/captrunc.c0000644000265600020320000000126712264261473020770 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; for( ; model!= NULL; model = model->CAPnextModel) { for(here = model->CAPinstances ; here != NULL ; here = here->CAPnextInstance) { CKTterr(here->CAPqcap,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/cap/cappzld.c0000644000265600020320000000237512264261473020607 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "capdefs.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CAPpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { CAPmodel *model = (CAPmodel*)inModel; double val; double m; CAPinstance *here; NG_IGNORE(ckt); for( ; model != NULL; model = model->CAPnextModel) { for( here = model->CAPinstances;here != NULL; here = here->CAPnextInstance) { val = here->CAPcapac; m = here->CAPm; *(here->CAPposPosptr ) += m * val * s->real; *(here->CAPposPosptr +1) += m * val * s->imag; *(here->CAPnegNegptr ) += m * val * s->real; *(here->CAPnegNegptr +1) += m * val * s->imag; *(here->CAPposNegptr ) -= m * val * s->real; *(here->CAPposNegptr +1) -= m * val * s->imag; *(here->CAPnegPosptr ) -= m * val * s->real; *(here->CAPnegPosptr +1) -= m * val * s->imag; } } return(OK); } ngspice-26/src/spicelib/devices/cap/capmask.c0000644000265600020320000000336012264261473020564 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CAPmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { CAPmodel *here = (CAPmodel*)inst; NG_IGNORE(ckt); switch(which) { case CAP_MOD_TNOM: value->rValue = here->CAPtnom-CONSTCtoK; return(OK); case CAP_MOD_TC1: value->rValue = here->CAPtempCoeff1; return(OK); case CAP_MOD_TC2: value->rValue = here->CAPtempCoeff2; return(OK); case CAP_MOD_CAP: value->rValue = here->CAPmCap; return(OK); case CAP_MOD_CJ: value->rValue = here->CAPcj; return(OK); case CAP_MOD_CJSW: value->rValue = here->CAPcjsw; return(OK); case CAP_MOD_DEFWIDTH: value->rValue = here->CAPdefWidth; return(OK); case CAP_MOD_DEFLENGTH: value->rValue = here->CAPdefLength; return(OK); case CAP_MOD_NARROW: value->rValue = here->CAPnarrow; return(OK); case CAP_MOD_SHORT: value->rValue = here->CAPshort; return(OK); case CAP_MOD_DEL: value->rValue = here->CAPdel; return(OK); case CAP_MOD_DI: value->rValue = here->CAPdi; return(OK); case CAP_MOD_THICK: value->rValue = here->CAPthick; return(OK); case CAP_MOD_BV_MAX: value->rValue = here->CAPbv_max; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/cap/Makefile.am0000644000265600020320000000106612264261473021036 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcap.la libcap_la_SOURCES = \ cap.c \ capacld.c \ capask.c \ capdefs.h \ capdel.c \ capdest.c \ capext.h \ capgetic.c \ capinit.c \ capinit.h \ capitf.h \ capload.c \ capmask.c \ capmdel.c \ capmpar.c \ capparam.c \ cappzld.c \ capsacl.c \ capsetup.c \ capsload.c \ capsoachk.c \ capsprt.c \ capsset.c \ capsupd.c \ captemp.c \ captrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/cap/Makefile.in0000644000265600020320000004361112264261536021051 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/cap DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcap_la_LIBADD = am_libcap_la_OBJECTS = cap.lo capacld.lo capask.lo capdel.lo \ capdest.lo capgetic.lo capinit.lo capload.lo capmask.lo \ capmdel.lo capmpar.lo capparam.lo cappzld.lo capsacl.lo \ capsetup.lo capsload.lo capsoachk.lo capsprt.lo capsset.lo \ capsupd.lo captemp.lo captrunc.lo libcap_la_OBJECTS = $(am_libcap_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcap_la_SOURCES) DIST_SOURCES = $(libcap_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcap.la libcap_la_SOURCES = \ cap.c \ capacld.c \ capask.c \ capdefs.h \ capdel.c \ capdest.c \ capext.h \ capgetic.c \ capinit.c \ capinit.h \ capitf.h \ capload.c \ capmask.c \ capmdel.c \ capmpar.c \ capparam.c \ cappzld.c \ capsacl.c \ capsetup.c \ capsload.c \ capsoachk.c \ capsprt.c \ capsset.c \ capsupd.c \ captemp.c \ captrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/cap/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/cap/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcap.la: $(libcap_la_OBJECTS) $(libcap_la_DEPENDENCIES) $(EXTRA_libcap_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcap_la_OBJECTS) $(libcap_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cappzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/capsupd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/captemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/captrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/cap/capload.c0000644000265600020320000000612612264261473020553 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CAPload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current capacitance value into the * sparse matrix previously provided */ { CAPmodel *model = (CAPmodel*)inModel; CAPinstance *here; int cond1; double vcap; double geq; double ceq; int error; double m; /* check if capacitors are in the circuit or are open circuited */ if(ckt->CKTmode & (MODETRAN|MODEAC|MODETRANOP) ) { /* evaluate device independent analysis conditions */ cond1= ( ( (ckt->CKTmode & MODEDC) && (ckt->CKTmode & MODEINITJCT) ) || ( ( ckt->CKTmode & MODEUIC) && ( ckt->CKTmode & MODEINITTRAN) ) ) ; /* loop through all the capacitor models */ for( ; model != NULL; model = model->CAPnextModel ) { /* loop through all the instances of the model */ for (here = model->CAPinstances; here != NULL ; here=here->CAPnextInstance) { m = here->CAPm; if(cond1) { vcap = here->CAPinitCond; } else { vcap = *(ckt->CKTrhsOld+here->CAPposNode) - *(ckt->CKTrhsOld+here->CAPnegNode) ; } if(ckt->CKTmode & (MODETRAN | MODEAC)) { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0+here->CAPqcap) = *(ckt->CKTstate1+here->CAPqcap); } else { /* only const caps - no poly's */ #endif /* PREDICTOR */ *(ckt->CKTstate0+here->CAPqcap) = here->CAPcapac * vcap; if((ckt->CKTmode & MODEINITTRAN)) { *(ckt->CKTstate1+here->CAPqcap) = *(ckt->CKTstate0+here->CAPqcap); } #ifndef PREDICTOR } #endif /* PREDICTOR */ error = NIintegrate(ckt,&geq,&ceq,here->CAPcapac, here->CAPqcap); if(error) return(error); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1+here->CAPccap) = *(ckt->CKTstate0+here->CAPccap); } *(here->CAPposPosptr) += m * geq; *(here->CAPnegNegptr) += m * geq; *(here->CAPposNegptr) -= m * geq; *(here->CAPnegPosptr) -= m * geq; *(ckt->CKTrhs+here->CAPposNode) -= m * ceq; *(ckt->CKTrhs+here->CAPnegNode) += m * ceq; } else *(ckt->CKTstate0+here->CAPqcap) = here->CAPcapac * vcap; } } } return(OK); } ngspice-26/src/spicelib/devices/cap/cap.c0000644000265600020320000000747712264261473017725 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "capdefs.h" #include "ngspice/suffix.h" IFparm CAPpTable[] = { /* parameters */ IOPAP("capacitance", CAP_CAP, IF_REAL, "Device capacitance"), IOPAP("cap", CAP_CAP, IF_REAL, "Device capacitance"), IOPAP("c", CAP_CAP, IF_REAL, "Device capacitance"), IOPAU("ic", CAP_IC, IF_REAL, "Initial capacitor voltage"), IOPZU("temp", CAP_TEMP, IF_REAL, "Instance operating temperature"), IOPZ( "dtemp", CAP_DTEMP, IF_REAL, "Instance temperature difference from the rest of the circuit"), IOPAU("w", CAP_WIDTH, IF_REAL, "Device width"), IOPAU("l", CAP_LENGTH, IF_REAL, "Device length"), IOPU( "m", CAP_M, IF_REAL, "Parallel multiplier"), IOPU( "tc1", CAP_TC1, IF_REAL, "First order temp. coefficient"), IOPU( "tc2", CAP_TC2, IF_REAL, "Second order temp. coefficient"), IOP( "bv_max", CAP_BV_MAX, IF_REAL, "maximum voltage over capacitance"), IOPU( "scale", CAP_SCALE, IF_REAL, "Scale factor"), IP( "sens_cap", CAP_CAP_SENS, IF_FLAG, "flag to request sens. WRT cap."), OP( "i", CAP_CURRENT, IF_REAL, "Device current"), OP( "p", CAP_POWER, IF_REAL, "Instantaneous device power"), OPU( "sens_dc", CAP_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU( "sens_real", CAP_QUEST_SENS_REAL, IF_REAL, "real part of ac sensitivity"), OPU( "sens_imag", CAP_QUEST_SENS_IMAG, IF_REAL, "dc sens. & imag part of ac sens."), OPU( "sens_mag", CAP_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU( "sens_ph", CAP_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU( "sens_cplx", CAP_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; IFparm CAPmPTable[] = { /* names of model parameters */ IOPA( "cap", CAP_MOD_CAP, IF_REAL, "Model capacitance"), IOPA( "cj", CAP_MOD_CJ, IF_REAL, "Bottom Capacitance per area"), IOPR( "cox", CAP_MOD_CJ, IF_REAL, "Bottom Capacitance per area"), IOPA( "cjsw", CAP_MOD_CJSW, IF_REAL, "Sidewall capacitance per meter"), IOPR( "capsw", CAP_MOD_CJSW, IF_REAL, "Sidewall capacitance per meter"), IOPX( "defw", CAP_MOD_DEFWIDTH, IF_REAL, "Default width"), IOPR( "w", CAP_MOD_DEFWIDTH, IF_REAL, "Default width"), IOPX( "defl", CAP_MOD_DEFLENGTH,IF_REAL, "Default length"), IOPR( "l", CAP_MOD_DEFLENGTH,IF_REAL, "Default length"), IOPA( "narrow", CAP_MOD_NARROW, IF_REAL, "width correction factor"), IOPA( "short", CAP_MOD_SHORT, IF_REAL, "length correction factor"), IOPA( "del", CAP_MOD_DEL, IF_REAL, "length and width correction factor"), IOPA( "tc1", CAP_MOD_TC1, IF_REAL, "First order temp. coefficient"), IOPA( "tc2", CAP_MOD_TC2, IF_REAL, "Second order temp. coefficient"), IOPXU("tnom", CAP_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOPA( "di", CAP_MOD_DI, IF_REAL, "Relative dielectric constant"), IOPA( "thick", CAP_MOD_THICK, IF_REAL, "Insulator thickness"), IOP( "bv_max", CAP_MOD_BV_MAX, IF_REAL, "maximum voltage over capacitance"), IP( "c", CAP_MOD_C, IF_FLAG, "Capacitor model") }; char *CAPnames[] = { "C+", "C-" }; int CAPnSize = NUMELEMS(CAPnames); int CAPpTSize = NUMELEMS(CAPpTable); int CAPmPTSize = NUMELEMS(CAPmPTable); int CAPiSize = sizeof(CAPinstance); int CAPmSize = sizeof(CAPmodel); ngspice-26/src/spicelib/devices/cap/capask.c0000644000265600020320000001351112264261473020406 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "capdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CAPask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { CAPinstance *here = (CAPinstance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case CAP_TEMP: value->rValue = here->CAPtemp - CONSTCtoK; return(OK); case CAP_DTEMP: value->rValue = here->CAPdtemp; return(OK); case CAP_CAP: value->rValue=here->CAPcapac; value->rValue *= here->CAPm; return(OK); case CAP_IC: value->rValue = here->CAPinitCond; return(OK); case CAP_WIDTH: value->rValue = here->CAPwidth; return(OK); case CAP_LENGTH: value->rValue = here->CAPlength; return(OK); case CAP_SCALE: value->rValue = here->CAPscale; return(OK); case CAP_BV_MAX: value->rValue = here->CAPbv_max; return(OK); case CAP_M: value->rValue = here->CAPm; return(OK); case CAP_TC1: value->rValue = here->CAPtc1; return(OK); case CAP_TC2: value->rValue = here->CAPtc2; return(OK); case CAP_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CAPask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if (ckt->CKTcurrentAnalysis & DOING_TRAN) { if (ckt->CKTmode & MODETRANOP) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->CAPccap); } } else value->rValue = *(ckt->CKTstate0 + here->CAPccap); value->rValue *= here->CAPm; return(OK); case CAP_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CAPask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if (ckt->CKTcurrentAnalysis & DOING_TRAN) { if (ckt->CKTmode & MODETRANOP) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->CAPccap) * (*(ckt->CKTrhsOld + here->CAPposNode) - *(ckt->CKTrhsOld + here->CAPnegNode)); } } else value->rValue = *(ckt->CKTstate0 + here->CAPccap) * (*(ckt->CKTrhsOld + here->CAPposNode) - *(ckt->CKTrhsOld + here->CAPnegNode)); value->rValue *= here->CAPm; return(OK); case CAP_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->CAPsenParmNo); } return(OK); case CAP_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CAPsenParmNo); } return(OK); case CAP_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CAPsenParmNo); } return(OK); case CAP_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CAPsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CAPsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case CAP_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CAPsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CAPsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case CAP_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CAPsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CAPsenParmNo); } return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/cap/capsoachk.c0000644000265600020320000000227612264261473021106 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "capdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int CAPsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { CAPmodel *model = (CAPmodel *) inModel; CAPinstance *here; double vc; /* current capacitor voltage */ int maxwarns; static int warns_bv = 0; if (!ckt) { warns_bv = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->CAPnextModel) { for (here = model->CAPinstances; here; here = here->CAPnextInstance) { vc = fabs(ckt->CKTrhsOld [here->CAPposNode] - ckt->CKTrhsOld [here->CAPnegNode]); if (vc > here->CAPbv_max) if (warns_bv < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vc|=%g has exceeded Bv_max=%g\n", vc, here->CAPbv_max); warns_bv++; } } } return OK; } ngspice-26/src/spicelib/devices/cap/capparam.c0000644000265600020320000000376412264261473020741 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: September 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "capdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* ARGSUSED */ int CAPparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; CAPinstance *here = (CAPinstance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case CAP_CAP: here->CAPcapac = value->rValue; if (!here->CAPmGiven) here->CAPm = 1.0; here->CAPcapGiven = TRUE; break; case CAP_IC: here->CAPinitCond = value->rValue; here->CAPicGiven = TRUE; break; case CAP_TEMP: here->CAPtemp = value->rValue + CONSTCtoK; here->CAPtempGiven = TRUE; break; case CAP_DTEMP: here->CAPdtemp = value->rValue; here->CAPdtempGiven = TRUE; break; case CAP_WIDTH: here->CAPwidth = value->rValue * scale; here->CAPwidthGiven = TRUE; break; case CAP_LENGTH: here->CAPlength = value->rValue * scale; here->CAPlengthGiven = TRUE; break; case CAP_M: here->CAPm = value->rValue; here->CAPmGiven = TRUE; break; case CAP_SCALE: here->CAPscale = value->rValue; here->CAPscaleGiven = TRUE; break; case CAP_CAP_SENS: here->CAPsenParmNo = value->iValue; break; case CAP_TC1: here->CAPtc1 = value->rValue; here->CAPtc1Given = TRUE; break; case CAP_TC2: here->CAPtc2 = value->rValue; here->CAPtc2Given = TRUE; break; case CAP_BV_MAX: here->CAPbv_max = value->rValue; here->CAPbv_maxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/soi3/0000755000265600020320000000000012264261711017104 5ustar andreasadminngspice-26/src/spicelib/devices/soi3/soi3trun.c0000644000265600020320000000250512264261473021045 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { SOI3model *model = (SOI3model *)inModel; SOI3instance *here; for( ; model != NULL; model = model->SOI3nextModel) { for(here=model->SOI3instances;here!=NULL;here = here->SOI3nextInstance) { CKTterr(here->SOI3qgf,ckt,timeStep); CKTterr(here->SOI3qd,ckt,timeStep); CKTterr(here->SOI3qs,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3conv.c0000644000265600020320000002162112264261473021022 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3convTest(GENmodel *inModel, CKTcircuit *ckt) { SOI3model *model = (SOI3model*)inModel; SOI3instance *here; double delvbs; double delvbd; double delvgfs; double delvgbs; double delvds; double delvgfd; double delvgbd; double deldeltaT; double ibhat; double idhat; double iPthat; double vbs; double vbd; double vgfs; double vgbs; double vds; double deltaT; double vgfd; double vgbd; double vgfdo; double vgbdo; double tol; /* debug stuff */ /* FILE *fp,*fopen(); */ for( ; model != NULL; model = model->SOI3nextModel) { for(here = model->SOI3instances; here!= NULL; here = here->SOI3nextInstance) { vbs = model->SOI3type * ( *(ckt->CKTrhs+here->SOI3bNode) - *(ckt->CKTrhs+here->SOI3sNodePrime)); vgfs = model->SOI3type * ( *(ckt->CKTrhs+here->SOI3gfNode) - *(ckt->CKTrhs+here->SOI3sNodePrime)); vgbs = model->SOI3type * ( *(ckt->CKTrhs+here->SOI3gbNode) - *(ckt->CKTrhs+here->SOI3sNodePrime)); vds = model->SOI3type * ( *(ckt->CKTrhs+here->SOI3dNodePrime) - *(ckt->CKTrhs+here->SOI3sNodePrime)); deltaT = MAX(0,*(ckt->CKTrhs+here->SOI3toutNode)); /* voltage deltaT is V(tout) wrt thermal ground */ vbd=vbs-vds; vgfd=vgfs-vds; vgbd=vgbs-vds; vgfdo = *(ckt->CKTstate0 + here->SOI3vgfs) - *(ckt->CKTstate0 + here->SOI3vds); vgbdo = *(ckt->CKTstate0 + here->SOI3vgbs) - *(ckt->CKTstate0 + here->SOI3vds); delvbs = vbs - *(ckt->CKTstate0 + here->SOI3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->SOI3vbd); delvgfs = vgfs - *(ckt->CKTstate0 + here->SOI3vgfs); delvgbs = vgbs - *(ckt->CKTstate0 + here->SOI3vgbs); delvds = vds - *(ckt->CKTstate0 + here->SOI3vds); delvgfd = vgfd-vgfdo; delvgbd = vgbd-vgbdo; deldeltaT = deltaT - *(ckt->CKTstate0 + here->SOI3deltaT); /* these are needed for convergence testing */ if (here->SOI3mode >= 0) { /* normal */ idhat= here->SOI3id- here->SOI3gbd * delvbd - here->SOI3gbdT * deldeltaT + /* for -ibd bit of id */ (here->SOI3gmbs + here->SOI3gMmbs) * delvbs + (here->SOI3gmf + here->SOI3gMmf) * delvgfs + (here->SOI3gmb + here->SOI3gMmb) * delvgbs + (here->SOI3gds + here->SOI3gMd) * delvds + (here->SOI3gt + here->SOI3gMdeltaT) * deldeltaT + here->SOI3gBJTdb_bs * delvbs + here->SOI3gBJTdb_deltaT * deldeltaT; ibhat= here->SOI3ibs + here->SOI3ibd + here->SOI3gbd * delvbd + here->SOI3gbdT * deldeltaT + here->SOI3gbs * delvbs + here->SOI3gbsT * deldeltaT - here->SOI3iMdb - here->SOI3gMmbs * delvbs - (here->SOI3gMmf)* delvgfs - (here->SOI3gMmb)* delvgbs - here->SOI3gMd * delvds - here->SOI3gMdeltaT * deldeltaT - here->SOI3iBJTsb - here->SOI3gBJTsb_bd * delvbd - here->SOI3gBJTsb_deltaT * deldeltaT - here->SOI3iBJTdb - here->SOI3gBJTdb_bs * delvbs - here->SOI3gBJTdb_deltaT * deldeltaT; } else { /* A over T */ idhat= here->SOI3id - ( here->SOI3gbd + here->SOI3gmbs) * delvbd - (here->SOI3gmf) * delvgfd - (here->SOI3gmb) * delvgbd + (here->SOI3gds) * delvds - (here->SOI3gt + here->SOI3gbdT) * deldeltaT + here->SOI3gBJTdb_bs * delvbs + here->SOI3gBJTdb_deltaT * deldeltaT; ibhat= here->SOI3ibs + here->SOI3ibd + here->SOI3gbd * delvbd + here->SOI3gbdT * deldeltaT + here->SOI3gbs * delvbs + here->SOI3gbsT * deldeltaT - here->SOI3iMsb - here->SOI3gMmbs * delvbd - here->SOI3gMmf * delvgfd - here->SOI3gMmb * delvgbd + here->SOI3gMd * delvds - /* gMd should go with vsd */ here->SOI3gMdeltaT * deldeltaT - here->SOI3iBJTsb - here->SOI3gBJTsb_bd * delvbd - here->SOI3gBJTsb_deltaT * deldeltaT - here->SOI3iBJTdb - here->SOI3gBJTdb_bs * delvbs - here->SOI3gBJTdb_deltaT * deldeltaT; } iPthat = here->SOI3iPt + here->SOI3gPmbs * delvbs + here->SOI3gPmf * delvgfs + here->SOI3gPmb * delvgbs + here->SOI3gPds * delvds * here->SOI3mode + here->SOI3gPdT * deldeltaT; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(idhat),fabs(here->SOI3id))+ ckt->CKTabstol; if (fabs(idhat-here->SOI3id) >= tol) { ckt->CKTnoncon++; /* JimB - Remove line containing ckt->CKTtroubleElt for the */ /* Simetrix DLL version - element removed from ckt structure */ ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(ibhat),fabs(here->SOI3ibs+here->SOI3ibd - here->SOI3iMdb - here->SOI3iMsb - here->SOI3iBJTdb - here->SOI3iBJTsb))+ ckt->CKTabstol; if (fabs(ibhat-(here->SOI3ibs+here->SOI3ibd - here->SOI3iMdb - here->SOI3iMsb - here->SOI3iBJTdb - here->SOI3iBJTsb)) > tol) { ckt->CKTnoncon++; /* JimB - Remove line containing ckt->CKTtroubleElt for the */ /* Simetrix DLL version - element removed from ckt structure */ ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue,we haven't converged*/ } else { tol=ckt->CKTreltol*MAX(fabs(iPthat), fabs(here->SOI3iPt))+ckt->CKTabstol; if (fabs(iPthat-here->SOI3iPt) >= tol) { ckt->CKTnoncon++; /* JimB - Remove line containing ckt->CKTtroubleElt for the */ /* Simetrix DLL version - element removed from ckt structure */ ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue,we haven't converged*/ } } } /* debug stuff */ /* fp=fopen("level3.dat","a"); fprintf(fp,"%2.3f %2.3f %.15e %.15e %.15e %.15e %.15e %.15e %.15e\n", vgfs-vbs,vds,ckt->CKTtime,here->SOI3debug1,here->SOI3debug2,here->SOI3debug3, here->SOI3debug4,here->SOI3debug5,here->SOI3debug6); fclose(fp); */ } } return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3mask.c0000644000265600020320000002276412264261473021021 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int SOI3mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { SOI3model *model = (SOI3model *)inst; NG_IGNORE(ckt); switch(which) { case SOI3_MOD_VTO: value->rValue = model->SOI3vt0; return(OK); case SOI3_MOD_VFBF: value->rValue = model->SOI3vfbF; return(OK); case SOI3_MOD_KP: value->rValue = model->SOI3transconductance; return(OK); case SOI3_MOD_GAMMA: value->rValue = model->SOI3gamma; return(OK); case SOI3_MOD_PHI: value->rValue = model->SOI3phi; return(OK); case SOI3_MOD_LAMBDA: value->rValue = model->SOI3lambda; return(OK); case SOI3_MOD_THETA: value->rValue = model->SOI3theta; return(OK); case SOI3_MOD_RD: value->rValue = model->SOI3drainResistance; return(OK); case SOI3_MOD_RS: value->rValue = model->SOI3sourceResistance; return(OK); case SOI3_MOD_CBD: value->rValue = model->SOI3capBD; return(OK); case SOI3_MOD_CBS: value->rValue = model->SOI3capBS; return(OK); case SOI3_MOD_IS: value->rValue = model->SOI3jctSatCur; return(OK); case SOI3_MOD_IS1: value->rValue = model->SOI3jctSatCur1; return(OK); case SOI3_MOD_PB: value->rValue = model->SOI3bulkJctPotential; return(OK); case SOI3_MOD_CGFSO: value->rValue = model->SOI3frontGateSourceOverlapCapFactor; return(OK); case SOI3_MOD_CGFDO: value->rValue = model->SOI3frontGateDrainOverlapCapFactor; return(OK); case SOI3_MOD_CGFBO: value->rValue = model->SOI3frontGateBulkOverlapCapFactor; return(OK); case SOI3_MOD_CGBSO: value->rValue = model->SOI3backGateSourceOverlapCapAreaFactor; return(OK); case SOI3_MOD_CGBDO: value->rValue = model->SOI3backGateDrainOverlapCapAreaFactor; return(OK); case SOI3_MOD_CGBBO: value->rValue = model->SOI3backGateBulkOverlapCapAreaFactor; return(OK); case SOI3_MOD_RSH: value->rValue = model->SOI3sheetResistance; return(OK); case SOI3_MOD_CJSW: value->rValue = model->SOI3sideWallCapFactor; return(OK); case SOI3_MOD_MJSW: value->rValue = model->SOI3bulkJctSideGradingCoeff; return(OK); case SOI3_MOD_JS: value->rValue = model->SOI3jctSatCurDensity; return(OK); case SOI3_MOD_JS1: value->rValue = model->SOI3jctSatCurDensity1; return(OK); case SOI3_MOD_TOF: value->rValue = model->SOI3frontOxideThickness; return(OK); case SOI3_MOD_TOB: value->rValue = model->SOI3backOxideThickness; return(OK); case SOI3_MOD_TB: value->rValue = model->SOI3bodyThickness; return(OK); case SOI3_MOD_LD: value->rValue = model->SOI3latDiff; return(OK); case SOI3_MOD_U0: value->rValue = model->SOI3surfaceMobility; return(OK); case SOI3_MOD_FC: value->rValue = model->SOI3fwdCapDepCoeff; return(OK); case SOI3_MOD_KOX: value->rValue = model->SOI3oxideThermalConductivity; return(OK); case SOI3_MOD_SHSI: value->rValue = model->SOI3siliconSpecificHeat; return(OK); case SOI3_MOD_DSI: value->rValue = model->SOI3siliconDensity; return(OK); case SOI3_MOD_NSUB: value->rValue = model->SOI3substrateDoping; return(OK); case SOI3_MOD_TPG: value->iValue = model->SOI3gateType; return(OK); case SOI3_MOD_NQFF: value->rValue = model->SOI3frontFixedChargeDensity; return(OK); case SOI3_MOD_NQFB: value->rValue = model->SOI3backFixedChargeDensity; return(OK); case SOI3_MOD_NSSF: value->rValue = model->SOI3frontSurfaceStateDensity; return(OK); case SOI3_MOD_NSSB: value->rValue = model->SOI3backSurfaceStateDensity; return(OK); case SOI3_MOD_TNOM: value->rValue = model->SOI3tnom-CONSTCtoK; return(OK); /* extra stuff for newer model - msll Jan96 */ case SOI3_MOD_SIGMA: value->rValue = model->SOI3sigma; return(OK); case SOI3_MOD_CHIFB: value->rValue = model->SOI3chiFB; return(OK); case SOI3_MOD_CHIPHI: value->rValue = model->SOI3chiPHI; return(OK); case SOI3_MOD_DELTAW: value->rValue = model->SOI3deltaW; return(OK); case SOI3_MOD_DELTAL: value->rValue = model->SOI3deltaL; return(OK); case SOI3_MOD_VSAT: value->rValue = model->SOI3vsat; return(OK); case SOI3_MOD_K: value->rValue = model->SOI3k; return(OK); case SOI3_MOD_LX: value->rValue = model->SOI3lx; return(OK); case SOI3_MOD_VP: value->rValue = model->SOI3vp; return(OK); case SOI3_MOD_ETA: value->rValue = model->SOI3eta; return(OK); case SOI3_MOD_ALPHA0: value->rValue = model->SOI3alpha0; return(OK); case SOI3_MOD_BETA0: value->rValue = model->SOI3beta0; return(OK); case SOI3_MOD_LM: value->rValue = model->SOI3lm; return(OK); case SOI3_MOD_LM1: value->rValue = model->SOI3lm1; return(OK); case SOI3_MOD_LM2: value->rValue = model->SOI3lm2; return(OK); case SOI3_MOD_ETAD: value->rValue = model->SOI3etad; return(OK); case SOI3_MOD_ETAD1: value->rValue = model->SOI3etad1; return(OK); case SOI3_MOD_CHIBETA: value->rValue = model->SOI3chibeta; return(OK); case SOI3_MOD_VFBB: value->rValue = model->SOI3vfbB; return(OK); case SOI3_MOD_GAMMAB: value->rValue = model->SOI3gammaB; return(OK); case SOI3_MOD_CHID: value->rValue = model->SOI3chid; return(OK); case SOI3_MOD_CHID1: value->rValue = model->SOI3chid1; return(OK); case SOI3_MOD_DVT: value->iValue = model->SOI3dvt; return(OK); case SOI3_MOD_NLEV: value->iValue = model->SOI3nLev; return(OK); case SOI3_MOD_BETABJT: value->rValue = model->SOI3betaBJT; return(OK); case SOI3_MOD_TAUFBJT: value->rValue = model->SOI3tauFBJT; return(OK); case SOI3_MOD_TAURBJT: value->rValue = model->SOI3tauRBJT; return(OK); case SOI3_MOD_BETAEXP: value->rValue = model->SOI3betaEXP; return(OK); case SOI3_MOD_TAUEXP: value->rValue = model->SOI3tauEXP; return(OK); case SOI3_MOD_RSW: value->rValue = model->SOI3rsw; return(OK); case SOI3_MOD_RDW: value->rValue = model->SOI3rdw; return(OK); case SOI3_MOD_FMIN: value->rValue = model->SOI3minimumFeatureSize; return(OK); case SOI3_MOD_VTEX: value->rValue = model->SOI3vtex; return(OK); case SOI3_MOD_VDEX: value->rValue = model->SOI3vdex; return(OK); case SOI3_MOD_DELTA0: value->rValue = model->SOI3delta0; return(OK); case SOI3_MOD_CSF: value->rValue = model->SOI3satChargeShareFactor; return(OK); case SOI3_MOD_NPLUS: value->rValue = model->SOI3nplusDoping; return(OK); case SOI3_MOD_RTA: value->rValue = model->SOI3rta; return(OK); case SOI3_MOD_CTA: value->rValue = model->SOI3cta; return(OK); case SOI3_MOD_MEXP: value->rValue = model->SOI3mexp; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/soi3/soi3defs.h0000644000265600020320000010366412264261473021013 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #ifndef SOI3 #define SOI3 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for SOI3 MOSFETs */ /* information needed for each instance */ typedef struct sSOI3instance { struct sSOI3model *sSOI3modPtr; /* backpointer to model */ struct sSOI3instance *SOI3nextInstance; /* pointer to next instance of *current model*/ IFuid SOI3name; /* pointer to character string naming this instance */ int SOI3states; /* index into state table for this device */ int SOI3dNode; /* number of the drain node of the mosfet */ int SOI3gfNode; /* number of the front gate node of the mosfet */ int SOI3sNode; /* number of the source node of the mosfet */ int SOI3gbNode; /* number of the back gate node of the mosfet */ int SOI3bNode; /* number of the bulk node of the mosfet */ int SOI3toutNode; /* number of thermal output node (tout) */ int SOI3branch; /* branch number for zero voltage source if no thermal */ int SOI3dNodePrime; /* number of the internal drain node of the mosfet */ int SOI3sNodePrime; /* number of the internal source node of the mosfet */ int SOI3tout1Node; /* first internal thermal node */ int SOI3tout2Node; /* second internal thermal node */ int SOI3tout3Node; /* third internal thermal node */ int SOI3tout4Node; /* fourth internal thermal node */ double SOI3l; /* the length of the channel region */ double SOI3w; /* the width of the channel region */ double SOI3m; /* the parallel multiplier parameter */ double SOI3as; /* Area of source region */ double SOI3ad; /* Area of drain region */ double SOI3ab; /* Area of body region */ double SOI3drainSquares; /* the length of the drain in squares */ double SOI3sourceSquares; /* the length of the source in squares */ double SOI3sourceConductance; /*conductance of source(or 0):set in setup*/ double SOI3drainConductance; /*conductance of drain(or 0):set in setup*/ double SOI3temp; /* operating temperature of this instance */ double SOI3rt; /* Thermal resistance */ double SOI3ct; /* Thermal capacitance */ double SOI3rt1; /* 1st internal Thermal resistance */ double SOI3ct1; /* 1st internal Thermal capacitance */ double SOI3rt2; /* 2nd internal Thermal resistance */ double SOI3ct2; /* 2nd internal Thermal capacitance */ double SOI3rt3; /* 3rd internal Thermal resistance */ double SOI3ct3; /* 3rd internal Thermal capacitance */ double SOI3rt4; /* 4th internal Thermal resistance */ double SOI3ct4; /* 4th internal Thermal capacitance */ double SOI3tTransconductance; /* temperature corrected transconductance (KP param) */ double SOI3ueff; /* passed on to noise model */ double SOI3tSurfMob; /* temperature corrected surface mobility */ double SOI3tPhi; /* temperature corrected Phi */ double SOI3tVto; /* temperature corrected Vto */ double SOI3tVfbF; /* temperature corrected Vfb */ double SOI3tVfbB; /* temperature corrected Vfb (back gate) */ double SOI3tSatCur; /* temperature corrected jnct saturation Cur. */ double SOI3tSatCur1; /* temperature corrected jnct saturation Cur. */ double SOI3tSatCurDens; /* temperature corrected jnct saturation Cur. density */ double SOI3tSatCurDens1; /* temperature corrected jnct saturation Cur. density */ double SOI3tCbd; /* temperature corrected B-D Capacitance */ double SOI3tCbs; /* temperature corrected B-S Capacitance */ double SOI3tCjsw; /* temperature corrected Bulk side Capacitance */ double SOI3tBulkPot; /* temperature corrected Bulk potential */ double SOI3tDepCap; /* temperature adjusted transition point in */ /* the curve matching Fc * Vj */ double SOI3tVbi; /* temperature adjusted Vbi diode built-in voltage */ double SOI3icVBS; /* initial condition B-S voltage */ double SOI3icVDS; /* initial condition D-S voltage */ double SOI3icVGFS; /* initial condition GF-S voltage */ double SOI3icVGBS; /* initial condition GB-S voltage */ double SOI3von; double SOI3vdsat; double SOI3sourceVcrit; /* Vcrit for pos. vds */ double SOI3drainVcrit; /* Vcrit for pos. vds */ double SOI3id; /* DC drain current */ double SOI3ibs; /* bulk source current */ double SOI3ibd; /* bulk drain current */ double SOI3iMdb; /* drain bulk impact ionisation current */ double SOI3iMsb; /* source bulk impact ionisation cur. (rev mode) */ double SOI3iPt; /* heat 'current' in thermal circuit */ double SOI3gmbs; double SOI3gmf; double SOI3gmb; double SOI3gds; double SOI3gt; /* change of channel current wrt deltaT */ double SOI3gdsnotherm; /* gds0 at elevated temp - ac use only) */ double SOI3gMmbs; double SOI3gMmf; double SOI3gMmb; double SOI3gMd; double SOI3gMdeltaT; double SOI3iBJTdb; double SOI3gBJTdb_bs; double SOI3gBJTdb_deltaT; double SOI3iBJTsb; double SOI3gBJTsb_bd; double SOI3gBJTsb_deltaT; double SOI3gPmf; /* change of Pt wrt vgfs */ double SOI3gPmb; /* change of Pt wrt vgbs */ double SOI3gPmbs; /* change of Pt wrt vbs */ double SOI3gPds; /* change of Pt wrt vds */ double SOI3gPdT; /* change of Pt wrt deltaT */ double SOI3gbd; /* for body drain current */ double SOI3gbdT; /* for body drain current */ double SOI3gbs; /* for body source current */ double SOI3gbsT; /* for body source current */ double SOI3capbd; double SOI3capbs; double SOI3Cbd; double SOI3Cbs; double SOI3f2d; double SOI3f3d; double SOI3f4d; double SOI3f2s; double SOI3f3s; double SOI3f4s; double SOI3dDT_dVds; /* sm-sig gT term */ double SOI3dId_dDT; /* sm-sig source term */ /*debug stuff*/ double SOI3debug1; double SOI3debug2; double SOI3debug3; double SOI3debug4; double SOI3debug5; double SOI3debug6; /* extra stuff for newer model - msll Jan96 */ /* * naming convention: * x = vgs * y = vbs * z = vds * cdr = cdrain */ int SOI3mode; /* device mode : 1 = normal, -1 = inverse */ int SOI3backstate; /* indicates charge condition of back surface */ int SOI3numThermalNodes; /* Number of thermal nodes required */ unsigned SOI3off:1; /* non-zero to indicate device is off for dc analysis*/ unsigned SOI3tempGiven :1; /* instance temperature specified */ unsigned SOI3lGiven :1; unsigned SOI3wGiven :1; unsigned SOI3mGiven :1; unsigned SOI3asGiven:1; unsigned SOI3adGiven:1; unsigned SOI3abGiven:1; unsigned SOI3drainSquaresGiven :1; unsigned SOI3sourceSquaresGiven :1; unsigned SOI3dNodePrimeSet :1; unsigned SOI3sNodePrimeSet :1; unsigned SOI3icVBSGiven :1; unsigned SOI3icVDSGiven :1; unsigned SOI3icVGFSGiven:1; unsigned SOI3icVGBSGiven:1; unsigned SOI3rtGiven:1; unsigned SOI3ctGiven:1; unsigned SOI3rt1Given:1; unsigned SOI3ct1Given:1; unsigned SOI3rt2Given:1; unsigned SOI3ct2Given:1; unsigned SOI3rt3Given:1; unsigned SOI3ct3Given:1; unsigned SOI3rt4Given:1; unsigned SOI3ct4Given:1; unsigned SOI3vonGiven :1; unsigned SOI3vdsatGiven :1; unsigned SOI3modeGiven :1; double *SOI3D_dPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *SOI3D_dpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *SOI3DP_dPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *SOI3S_sPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *SOI3S_spPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *SOI3SP_sPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *SOI3GF_gfPtr; /* pointer to sparse matrix element at * (front gate node,front gate node) */ double *SOI3GF_gbPtr; /* pointer to sparse matrix element at * (front gate node,back gate node) */ double *SOI3GF_dpPtr; /* pointer to sparse matrix element at * (front gate node,drain prime node) */ double *SOI3GF_spPtr; /* pointer to sparse matrix element at * (front gate node,source prime node) */ double *SOI3GF_bPtr; /* pointer to sparse matrix element at * (front gate node,bulk node) */ double *SOI3GB_gfPtr; /* pointer to sparse matrix element at * (back gate node,front gate node) */ double *SOI3GB_gbPtr; /* pointer to sparse matrix element at * (back gate node,back gate node) */ double *SOI3GB_dpPtr; /* pointer to sparse matrix element at * (back gate node,drain prime node) */ double *SOI3GB_spPtr; /* pointer to sparse matrix element at * (back gate node,source prime node) */ double *SOI3GB_bPtr; /* pointer to sparse matrix element at * (back gate node,bulk node) */ double *SOI3DP_gfPtr; /* pointer to sparse matrix element at * (drain prime node,front gate node) */ double *SOI3DP_gbPtr; /* pointer to sparse matrix element at * (drain prime node,back gate node) */ double *SOI3DP_dpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *SOI3DP_spPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *SOI3DP_bPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *SOI3SP_gfPtr; /* pointer to sparse matrix element at * (source prime node,front gate node) */ double *SOI3SP_gbPtr; /* pointer to sparse matrix element at * (source prime node,back gate node) */ double *SOI3SP_dpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ double *SOI3SP_spPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *SOI3SP_bPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *SOI3B_gfPtr; /* pointer to sparse matrix element at * (bulk node,front gate node) */ double *SOI3B_gbPtr; /* pointer to sparse matrix element at * (bulk node,back gate node) */ double *SOI3B_dpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *SOI3B_spPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *SOI3B_bPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ /** Now for Thermal Node **/ double *SOI3TOUT_toutPtr; double *SOI3TOUT_dpPtr; double *SOI3TOUT_gfPtr; double *SOI3TOUT_gbPtr; double *SOI3TOUT_bPtr; double *SOI3TOUT_spPtr; double *SOI3GF_toutPtr; double *SOI3GB_toutPtr; double *SOI3DP_toutPtr; double *SOI3SP_toutPtr; double *SOI3TOUT_ibrPtr; /* these are for zero voltage source should */ double *SOI3IBR_toutPtr; /* no thermal behaviour be specified */ double *SOI3B_toutPtr; /* for impact ionisation current source */ double *SOI3TOUT_tout1Ptr; double *SOI3TOUT1_toutPtr; double *SOI3TOUT1_tout1Ptr; double *SOI3TOUT1_tout2Ptr; double *SOI3TOUT2_tout1Ptr; double *SOI3TOUT2_tout2Ptr; double *SOI3TOUT2_tout3Ptr; double *SOI3TOUT3_tout2Ptr; double *SOI3TOUT3_tout3Ptr; double *SOI3TOUT3_tout4Ptr; double *SOI3TOUT4_tout3Ptr; double *SOI3TOUT4_tout4Ptr; /* indices to the array of SOI(3) noise sources */ #define SOI3RDNOIZ 0 #define SOI3RSNOIZ 1 #define SOI3IDNOIZ 2 #define SOI3FLNOIZ 3 #define SOI3TOTNOIZ 4 #define SOI3NSRCS 5 /* the number of SOI(3) noise sources */ #ifndef NONOISE double SOI3nVar[NSTATVARS][SOI3NSRCS]; #else /* NONOISE */ double **SOI3nVar; #endif /* NONOISE */ } SOI3instance ; #define SOI3vbd SOI3states+ 0 /* bulk-drain voltage */ #define SOI3vbs SOI3states+ 1 /* bulk-source voltage */ #define SOI3vgfs SOI3states+ 2 /* front gate-source voltage */ #define SOI3vgbs SOI3states+ 3 /* back gate-source voltage */ #define SOI3vds SOI3states+ 4 /* drain-source voltage */ #define SOI3deltaT SOI3states+ 5 /* final temperature difference */ #define SOI3qgf SOI3states + 6 /* front gate charge */ #define SOI3iqgf SOI3states +7 /* front gate current */ #define SOI3qgb SOI3states+ 8 /* back gate charge */ #define SOI3iqgb SOI3states+ 9 /* back gate current */ #define SOI3qd SOI3states+ 10 /* drain charge */ #define SOI3iqd SOI3states+ 11 /* drain current */ #define SOI3qs SOI3states+ 14 /* body charge */ #define SOI3iqs SOI3states+ 15 /* body current */ #define SOI3cgfgf SOI3states+ 16 #define SOI3cgfd SOI3states+ 17 #define SOI3cgfs SOI3states+ 18 #define SOI3cgfdeltaT SOI3states+ 19 #define SOI3cgfgb SOI3states+ 20 #define SOI3cdgf SOI3states+ 21 #define SOI3cdd SOI3states+ 22 #define SOI3cds SOI3states+ 23 #define SOI3cddeltaT SOI3states+ 24 #define SOI3cdgb SOI3states+ 25 #define SOI3csgf SOI3states+ 26 #define SOI3csd SOI3states+ 27 #define SOI3css SOI3states+ 28 #define SOI3csdeltaT SOI3states+ 29 #define SOI3csgb SOI3states+ 30 #define SOI3cgbgf SOI3states + 31 #define SOI3cgbd SOI3states + 32 #define SOI3cgbs SOI3states + 33 #define SOI3cgbdeltaT SOI3states+ 34 #define SOI3cgbgb SOI3states + 35 #define SOI3qbd SOI3states+ 36 /* body-drain capacitor charge */ #define SOI3iqbd SOI3states+ 37 /* body-drain capacitor current */ #define SOI3qbs SOI3states+ 38 /* body-source capacitor charge */ #define SOI3iqbs SOI3states+ 39 /* body-source capacitor current */ #define SOI3qt SOI3states+ 40 /* Energy or 'charge' associated with ct */ #define SOI3iqt SOI3states+ 41 /* equiv current source for ct */ #define SOI3qt1 SOI3states+ 42 /* Energy or 'charge' associated with ct */ #define SOI3iqt1 SOI3states+ 43 /* equiv current source for ct */ #define SOI3qt2 SOI3states+ 44 /* Energy or 'charge' associated with ct */ #define SOI3iqt2 SOI3states+ 45 /* equiv current source for ct */ #define SOI3qt3 SOI3states+ 46 /* Energy or 'charge' associated with ct */ #define SOI3iqt3 SOI3states+ 47 /* equiv current source for ct */ #define SOI3qt4 SOI3states+ 48 /* Energy or 'charge' associated with ct */ #define SOI3iqt4 SOI3states+ 49 /* equiv current source for ct */ #define SOI3qBJTbs SOI3states+ 50 #define SOI3iqBJTbs SOI3states+ 51 #define SOI3qBJTbd SOI3states+ 52 #define SOI3iqBJTbd SOI3states+ 53 #define SOI3cBJTbsbs SOI3states+ 54 #define SOI3cBJTbsdeltaT SOI3states+ 55 #define SOI3cBJTbdbd SOI3states+ 56 #define SOI3cBJTbddeltaT SOI3states+ 57 #define SOI3idrain SOI3states+ 58 /* final drain current at timepoint (no define) */ #define SOI3deltaT1 SOI3states+ 59 /* final temperature difference */ #define SOI3deltaT2 SOI3states+ 60 /* final temperature difference */ #define SOI3deltaT3 SOI3states+ 61 /* final temperature difference */ #define SOI3deltaT4 SOI3states+ 62 /* final temperature difference */ #define SOI3deltaT5 SOI3states+ 63 /* final temperature difference */ #define SOI3numStates 64 /* per model data */ /* NOTE: parameters marked 'input - use xxxx' are paramters for * which a temperature correction is applied in SOI3temp, thus * the SOI3xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sSOI3model { /* model structure for an SOI3 MOSFET */ int SOI3modType; /* type index to this device type */ struct sSOI3model *SOI3nextModel; /* pointer to next possible model *in linked list */ SOI3instance * SOI3instances; /* pointer to list of instances * that have this model */ IFuid SOI3modName; /* pointer to character string naming this model */ int SOI3type; /* device type : 1 = nsoi, -1 = psoi */ double SOI3tnom; /* temperature at which parameters measured */ double SOI3latDiff; double SOI3jctSatCurDensity; /* input - use tSatCurDens (jnct)*/ double SOI3jctSatCurDensity1; /* input - use tSatCurDens1 (jnct)*/ double SOI3jctSatCur; /* input - use tSatCur (jnct Is)*/ double SOI3jctSatCur1; /* input - use tSatCur1 (jnct Is)*/ double SOI3drainResistance; double SOI3sourceResistance; double SOI3sheetResistance; double SOI3transconductance; /* (KP) input - use tTransconductance */ double SOI3frontGateSourceOverlapCapFactor; double SOI3frontGateDrainOverlapCapFactor; double SOI3frontGateBulkOverlapCapFactor; double SOI3backGateSourceOverlapCapAreaFactor; double SOI3backGateDrainOverlapCapAreaFactor; double SOI3backGateBulkOverlapCapAreaFactor; double SOI3frontOxideCapFactor; /* Cof NO DEFINES */ double SOI3backOxideCapFactor; /* Cob OR */ double SOI3bodyCapFactor; /* Cb FLAGS */ double SOI3C_bb; /* Cb in series with Cob */ double SOI3C_fb; /* Cb in series with Cof */ double SOI3C_ssf; /* q*NQFF */ double SOI3C_ssb; /* q*NQFB */ double SOI3C_fac; /* C_ob/(C_ob+C_b+C_ssb) */ double SOI3vt0; /* input - use tVto */ double SOI3vfbF; /* flat-band voltage. input - use tVfbF */ double SOI3vfbB; /* back flat-band voltage. input - use tVfbB */ double SOI3gamma; /* gamma */ double SOI3gammaB; /* back gamma */ double SOI3capBD; /* input - use tCbd */ double SOI3capBS; /* input - use tCbs */ double SOI3sideWallCapFactor; /* input - use tCjsw */ double SOI3bulkJctPotential; /* input - use tBulkPot */ double SOI3bulkJctSideGradingCoeff; /* MJSW */ double SOI3fwdCapDepCoeff; /* FC */ double SOI3phi; /* input - use tPhi */ double SOI3vbi; /* input - use tVbi */ double SOI3lambda; double SOI3theta; double SOI3substrateDoping; /* Nsub */ double SOI3substrateCharge; /* Qb - no define/flag */ int SOI3gateType; /* +1=same, -1=different, 0=Al */ double SOI3frontFixedChargeDensity; double SOI3backFixedChargeDensity; double SOI3frontSurfaceStateDensity; double SOI3backSurfaceStateDensity; double SOI3frontOxideThickness; double SOI3backOxideThickness; double SOI3bodyThickness; double SOI3surfaceMobility; /* input - use tSurfMob */ double SOI3oxideThermalConductivity; double SOI3siliconSpecificHeat; double SOI3siliconDensity; double SOI3fNcoef; double SOI3fNexp; /* new stuff for newer model - msll Jan96 */ double SOI3sigma; /* DIBL factor */ double SOI3chiFB; /* temperature coeff of flatband voltage */ double SOI3chiPHI; /* temperature coeff of PHI */ double SOI3deltaW; /* narrow width effect factor */ double SOI3deltaL; /* short channel effect factor */ double SOI3vsat; /* input - saturation velocity, use tVsat */ double SOI3TVF0; /* internal use - precalculation of exp to save time */ double SOI3k; /* thermal exponent for mobility factor */ double SOI3lx; /* channel length modulation factor */ double SOI3vp; /* channel length modulation empirical voltage */ double SOI3eta; /* Imp. ion. field adjustment factor */ double SOI3alpha0; /* 1st impact ionisation coeff */ double SOI3beta0; /* 2nd impact ionisation coeff */ double SOI3lm; /* impact ion. drain region length cf LX */ double SOI3lm1; /* impact ion. drain region coeff */ double SOI3lm2; /* impact ion. drain region coeff */ double SOI3etad; /* diode ideality factor */ double SOI3etad1; /* 2nd diode ideality factor */ double SOI3chibeta; /* temp coeff of BETA0 */ double SOI3chid; /* temp factor for junction 1 */ double SOI3chid1; /* temp factor for junction 2 */ int SOI3dvt; /* switch for temp dependence of vt in diodes */ int SOI3nLev; /* level switch for noise model */ double SOI3betaBJT; /* beta for Eber Moll BJT model */ double SOI3tauFBJT; /* forward BJT transit time */ double SOI3tauRBJT; /* reverse BJT transit time */ double SOI3betaEXP; double SOI3tauEXP; double SOI3rsw; /* source resistance width scaling factor */ double SOI3rdw; /* drain resistance width scaling factor */ double SOI3minimumFeatureSize; /* minimum feature size of simulated process technology */ double SOI3vtex; /* Extracted threshold voltage */ double SOI3vdex; /* Drain bias at which vtex extracted */ double SOI3delta0; /* Surface potential factor for vtex conversion */ double SOI3satChargeShareFactor; /* Saturation region charge sharing factor */ double SOI3nplusDoping; /* Doping concentration of N+ or P+ regions */ double SOI3rta; /* thermal resistance area scaling factor */ double SOI3cta; /* thermal capacitance area scaling factor */ double SOI3mexp; /* exponent for CLM smoothing */ unsigned SOI3typeGiven :1; unsigned SOI3latDiffGiven :1; unsigned SOI3jctSatCurDensityGiven :1; unsigned SOI3jctSatCurDensity1Given :1; unsigned SOI3jctSatCurGiven :1; unsigned SOI3jctSatCur1Given :1; unsigned SOI3drainResistanceGiven :1; unsigned SOI3sourceResistanceGiven :1; unsigned SOI3sheetResistanceGiven :1; unsigned SOI3transconductanceGiven :1; unsigned SOI3frontGateSourceOverlapCapFactorGiven :1; unsigned SOI3frontGateDrainOverlapCapFactorGiven :1; unsigned SOI3frontGateBulkOverlapCapFactorGiven :1; unsigned SOI3backGateSourceOverlapCapAreaFactorGiven :1; unsigned SOI3backGateDrainOverlapCapAreaFactorGiven :1; unsigned SOI3backGateBulkOverlapCapAreaFactorGiven :1; unsigned SOI3subsBiasFactorGiven :1; unsigned SOI3bodyFactorGiven :1; unsigned SOI3vt0Given :1; unsigned SOI3vfbFGiven :1; unsigned SOI3vfbBGiven :1; unsigned SOI3gammaGiven :1; unsigned SOI3gammaBGiven :1; unsigned SOI3capBDGiven :1; unsigned SOI3capBSGiven :1; unsigned SOI3sideWallCapFactorGiven :1; unsigned SOI3bulkJctPotentialGiven :1; unsigned SOI3bulkJctSideGradingCoeffGiven :1; unsigned SOI3fwdCapDepCoeffGiven :1; unsigned SOI3phiGiven :1; unsigned SOI3lambdaGiven :1; unsigned SOI3thetaGiven :1; unsigned SOI3substrateDopingGiven :1; unsigned SOI3gateTypeGiven :1; unsigned SOI3frontFixedChargeDensityGiven :1; unsigned SOI3backFixedChargeDensityGiven :1; unsigned SOI3frontSurfaceStateDensityGiven :1; unsigned SOI3backSurfaceStateDensityGiven :1; unsigned SOI3frontOxideThicknessGiven :1; unsigned SOI3backOxideThicknessGiven :1; unsigned SOI3bodyThicknessGiven :1; unsigned SOI3surfaceMobilityGiven :1; unsigned SOI3tnomGiven :1; unsigned SOI3oxideThermalConductivityGiven :1; unsigned SOI3siliconSpecificHeatGiven :1; unsigned SOI3siliconDensityGiven :1; unsigned SOI3fNcoefGiven :1; unsigned SOI3fNexpGiven :1; /* extra stuff for newer model - msll Jan96 */ unsigned SOI3sigmaGiven :1; unsigned SOI3chiFBGiven :1; unsigned SOI3chiPHIGiven :1; unsigned SOI3deltaWGiven :1; unsigned SOI3deltaLGiven :1; unsigned SOI3vsatGiven :1; unsigned SOI3kGiven :1; unsigned SOI3lxGiven :1; unsigned SOI3vpGiven :1; unsigned SOI3useLAMBDA :1; unsigned SOI3etaGiven :1; unsigned SOI3alpha0Given :1; unsigned SOI3beta0Given :1; unsigned SOI3lmGiven :1; unsigned SOI3lm1Given :1; unsigned SOI3lm2Given :1; unsigned SOI3etadGiven :1; unsigned SOI3etad1Given :1; unsigned SOI3chibetaGiven :1; unsigned SOI3chidGiven :1; unsigned SOI3chid1Given :1; unsigned SOI3dvtGiven :1; unsigned SOI3nLevGiven :1; unsigned SOI3betaBJTGiven :1; unsigned SOI3tauFBJTGiven :1; unsigned SOI3tauRBJTGiven :1; unsigned SOI3betaEXPGiven :1; unsigned SOI3tauEXPGiven :1; unsigned SOI3rswGiven :1; unsigned SOI3rdwGiven :1; unsigned SOI3minimumFeatureSizeGiven :1; unsigned SOI3vtexGiven :1; unsigned SOI3vdexGiven :1; unsigned SOI3delta0Given :1; unsigned SOI3satChargeShareFactorGiven :1; unsigned SOI3nplusDopingGiven :1; unsigned SOI3rtaGiven :1; unsigned SOI3ctaGiven :1; unsigned SOI3mexpGiven :1; } SOI3model; #ifndef NSOI3 #define NSOI3 1 #define PSOI3 -1 #endif /*NSOI3*/ /* device parameters */ #define SOI3_W 1 #define SOI3_L 2 #define SOI3_M 25 #define SOI3_AS 3 #define SOI3_AD 4 #define SOI3_AB 5 #define SOI3_PS 6 #define SOI3_PD 7 #define SOI3_PB 8 #define SOI3_NRS 9 #define SOI3_NRD 10 #define SOI3_OFF 11 #define SOI3_IC 12 #define SOI3_IC_VBS 13 #define SOI3_IC_VDS 14 #define SOI3_IC_VGFS 15 #define SOI3_IC_VGBS 16 #define SOI3_W_SENS 17 #define SOI3_L_SENS 18 #define SOI3_IB 19 #define SOI3_IGF 20 #define SOI3_IGB 21 #define SOI3_IS 22 #define SOI3_POWER 23 #define SOI3_TEMP 24 /* model parameters */ #define SOI3_MOD_VTO 101 #define SOI3_MOD_VFBF 149 #define SOI3_MOD_KP 102 #define SOI3_MOD_GAMMA 103 #define SOI3_MOD_PHI 104 #define SOI3_MOD_LAMBDA 105 #define SOI3_MOD_THETA 139 #define SOI3_MOD_RD 106 #define SOI3_MOD_RS 107 #define SOI3_MOD_CBD 108 #define SOI3_MOD_CBS 109 #define SOI3_MOD_IS 110 #define SOI3_MOD_PB 111 #define SOI3_MOD_CGFSO 112 #define SOI3_MOD_CGFDO 113 #define SOI3_MOD_CGFBO 114 #define SOI3_MOD_CGBSO 144 #define SOI3_MOD_CGBDO 145 #define SOI3_MOD_CGBBO 146 #define SOI3_MOD_CJ 115 #define SOI3_MOD_MJ 116 #define SOI3_MOD_CJSW 117 #define SOI3_MOD_MJSW 118 #define SOI3_MOD_JS 119 #define SOI3_MOD_TOF 120 #define SOI3_MOD_TOB 133 #define SOI3_MOD_TB 134 #define SOI3_MOD_LD 121 #define SOI3_MOD_RSH 122 #define SOI3_MOD_U0 123 #define SOI3_MOD_FC 124 #define SOI3_MOD_NSUB 125 #define SOI3_MOD_TPG 126 #define SOI3_MOD_NQFF 147 #define SOI3_MOD_NQFB 148 #define SOI3_MOD_NSSF 127 #define SOI3_MOD_NSSB 135 #define SOI3_MOD_NSOI3 128 #define SOI3_MOD_PSOI3 129 #define SOI3_MOD_TNOM 130 #define SOI3_MOD_KF 131 #define SOI3_MOD_AF 132 #define SOI3_MOD_KOX 142 #define SOI3_MOD_SHSI 143 /* extra stuff for newer model - msll Jan96 */ #define SOI3_MOD_SIGMA 150 #define SOI3_MOD_CHIFB 151 #define SOI3_MOD_CHIPHI 152 #define SOI3_MOD_DELTAW 153 #define SOI3_MOD_DELTAL 154 #define SOI3_MOD_VSAT 155 #define SOI3_MOD_K 156 #define SOI3_MOD_LX 157 #define SOI3_MOD_VP 158 #define SOI3_MOD_ETA 159 #define SOI3_MOD_ALPHA0 140 #define SOI3_MOD_BETA0 141 #define SOI3_MOD_LM 160 #define SOI3_MOD_LM1 161 #define SOI3_MOD_LM2 162 #define SOI3_MOD_ETAD 163 #define SOI3_MOD_ETAD1 164 #define SOI3_MOD_IS1 165 #define SOI3_MOD_JS1 166 #define SOI3_MOD_CHIBETA 167 #define SOI3_MOD_VFBB 168 #define SOI3_MOD_GAMMAB 169 #define SOI3_MOD_CHID 170 #define SOI3_MOD_CHID1 171 #define SOI3_MOD_DVT 172 #define SOI3_MOD_NLEV 173 #define SOI3_MOD_BETABJT 174 #define SOI3_MOD_TAUFBJT 176 #define SOI3_MOD_TAURBJT 177 #define SOI3_MOD_BETAEXP 178 #define SOI3_MOD_TAUEXP 179 #define SOI3_MOD_RSW 180 #define SOI3_MOD_RDW 181 #define SOI3_MOD_FMIN 382 #define SOI3_MOD_VTEX 383 #define SOI3_MOD_VDEX 384 #define SOI3_MOD_DELTA0 385 #define SOI3_MOD_CSF 386 #define SOI3_MOD_DSI 387 #define SOI3_MOD_NPLUS 388 #define SOI3_MOD_RTA 389 #define SOI3_MOD_CTA 390 #define SOI3_MOD_MEXP 391 /* device questions */ #define SOI3_DNODE 201 #define SOI3_GFNODE 202 #define SOI3_SNODE 203 #define SOI3_GBNODE 204 #define SOI3_BNODE 205 #define SOI3_DNODEPRIME 206 #define SOI3_SNODEPRIME 207 #define SOI3_TNODE 208 #define SOI3_BRANCH 209 #define SOI3_SOURCECONDUCT 210 #define SOI3_DRAINCONDUCT 211 #define SOI3_VON 212 #define SOI3_VFBF 213 #define SOI3_VDSAT 214 #define SOI3_SOURCEVCRIT 215 #define SOI3_DRAINVCRIT 216 #define SOI3_ID 217 #define SOI3_IBS 218 #define SOI3_IBD 219 #define SOI3_GMBS 220 #define SOI3_GMF 221 #define SOI3_GMB 222 #define SOI3_GDS 223 #define SOI3_GBD 224 #define SOI3_GBS 225 #define SOI3_CAPBD 226 #define SOI3_CAPBS 227 #define SOI3_CAPZEROBIASBD 228 #define SOI3_CAPZEROBIASBDSW 229 #define SOI3_CAPZEROBIASBS 230 #define SOI3_CAPZEROBIASBSSW 231 #define SOI3_VBD 232 #define SOI3_VBS 233 #define SOI3_VGFS 234 #define SOI3_VGBS 235 #define SOI3_VDS 236 #define SOI3_QGF 237 #define SOI3_IQGF 238 #define SOI3_QGB 239 #define SOI3_IQGB 240 #define SOI3_QD 241 #define SOI3_IQD 242 #define SOI3_QS 243 #define SOI3_IQS 244 #define SOI3_QBD 245 #define SOI3_IQBD 246 #define SOI3_QBS 247 #define SOI3_IQBS 248 #define SOI3_CGFGF 249 #define SOI3_CGFD 250 #define SOI3_CGFS 251 #define SOI3_CGFDELTAT 252 #define SOI3_CGFGB 253 #define SOI3_CDGF 254 #define SOI3_CDD 255 #define SOI3_CDS 256 #define SOI3_CDDELTAT 257 #define SOI3_CDGB 258 #define SOI3_CSGF 259 #define SOI3_CSD 260 #define SOI3_CSS 261 #define SOI3_CSDELTAT 262 #define SOI3_CSGB 263 #define SOI3_CGBGF 264 #define SOI3_CGBD 265 #define SOI3_CGBS 266 #define SOI3_CGBDELTAT 267 #define SOI3_CGBGB 268 #define SOI3_L_SENS_REAL 269 #define SOI3_L_SENS_IMAG 270 #define SOI3_L_SENS_MAG 271 #define SOI3_L_SENS_PH 272 #define SOI3_L_SENS_CPLX 273 #define SOI3_W_SENS_REAL 274 #define SOI3_W_SENS_IMAG 275 #define SOI3_W_SENS_MAG 276 #define SOI3_W_SENS_PH 277 #define SOI3_W_SENS_CPLX 278 #define SOI3_L_SENS_DC 279 #define SOI3_W_SENS_DC 280 #define SOI3_RT 281 #define SOI3_CT 282 #define SOI3_VFBB 283 #define SOI3_RT1 284 #define SOI3_CT1 285 #define SOI3_RT2 286 #define SOI3_CT2 287 #define SOI3_RT3 288 #define SOI3_CT3 289 #define SOI3_RT4 290 #define SOI3_CT4 291 #define SOI3_ITOT 292 /* model questions */ #include "soi3ext.h" #endif /*SOI3*/ ngspice-26/src/spicelib/devices/soi3/soi3set.c0000644000265600020320000005751212264261473020660 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { SOI3model *model = (SOI3model *)inModel; SOI3instance *here; int error; CKTnode *tmp; /* JimB - new variable for RT and CT scaling */ double thermal_area; double rtargs[5]; double * rtptr; int node_count; CKTnode *tmpNode; IFuid tmpName; /****** Part 1 - set any model parameters that are not present in ******/ /****** the netlist to default values. ******/ /* loop through all the SOI3 device models */ for( ; model != NULL; model = model->SOI3nextModel ) { if(!model->SOI3typeGiven) { model->SOI3type = NSOI3; } if(!model->SOI3latDiffGiven) { model->SOI3latDiff = 0; } if(!model->SOI3jctSatCurDensityGiven) { model->SOI3jctSatCurDensity = 1.0e-10; } if(!model->SOI3jctSatCurDensity1Given) { model->SOI3jctSatCurDensity1 = 0.0; } if(!model->SOI3jctSatCurGiven) { model->SOI3jctSatCur = 0.0; } if(!model->SOI3jctSatCur1Given) { model->SOI3jctSatCur1 = 0.0; } if(!model->SOI3transconductanceGiven) { model->SOI3transconductance = 2e-5; } if(!model->SOI3frontGateSourceOverlapCapFactorGiven) { model->SOI3frontGateSourceOverlapCapFactor = 0; } if(!model->SOI3frontGateDrainOverlapCapFactorGiven) { model->SOI3frontGateDrainOverlapCapFactor = 0; } if(!model->SOI3frontGateBulkOverlapCapFactorGiven) { model->SOI3frontGateBulkOverlapCapFactor = 0; } if(!model->SOI3backGateSourceOverlapCapAreaFactorGiven) { model->SOI3backGateSourceOverlapCapAreaFactor = 0; } if(!model->SOI3backGateDrainOverlapCapAreaFactorGiven) { model->SOI3backGateDrainOverlapCapAreaFactor = 0; } if(!model->SOI3backGateBulkOverlapCapAreaFactorGiven) { model->SOI3backGateBulkOverlapCapAreaFactor = 0; } if(!model->SOI3sideWallCapFactorGiven) { model->SOI3sideWallCapFactor = 0; } if(!model->SOI3bulkJctPotentialGiven) { model->SOI3bulkJctPotential = 0.8; } if(!model->SOI3bulkJctSideGradingCoeffGiven) { model->SOI3bulkJctSideGradingCoeff = 0.5; } if(!model->SOI3fwdCapDepCoeffGiven) { model->SOI3fwdCapDepCoeff = 0.5; } if(!model->SOI3lambdaGiven) { model->SOI3lambda = 0; } if(!model->SOI3thetaGiven) { model->SOI3theta = 0; } /* JimB - If SiO2 thermal conductivity given in netlist then use */ /* that value, otherwise use literature value. (Units W/K*m). */ if(!model->SOI3oxideThermalConductivityGiven) { model->SOI3oxideThermalConductivity = 1.4; } /* JimB - If Si specific heat given in netlist then use that value, */ /* otherwise use literature value. (Units J/kg*K). */ if(!model->SOI3siliconSpecificHeatGiven) { model->SOI3siliconSpecificHeat = 700; } /* JimB - If density of Si given in netlist then use that value, */ /* otherwise use literature value. (kg/m^3). */ if(!model->SOI3siliconDensityGiven) { model->SOI3siliconDensity = 2330; } if(!model->SOI3frontFixedChargeDensityGiven) { model->SOI3frontFixedChargeDensity = 0; } if(!model->SOI3backFixedChargeDensityGiven) { model->SOI3backFixedChargeDensity = 0; } if(!model->SOI3frontSurfaceStateDensityGiven) { model->SOI3frontSurfaceStateDensity = 0; } if(!model->SOI3backSurfaceStateDensityGiven) { model->SOI3backSurfaceStateDensity = 0; } if(!model->SOI3gammaGiven) { model->SOI3gamma = 0; } if(!model->SOI3fNcoefGiven) { model->SOI3fNcoef = 0; } if(!model->SOI3fNexpGiven) { model->SOI3fNexp = 1; } /* extra stuff for newer model - msll Jan96 */ if(!model->SOI3sigmaGiven) { model->SOI3sigma = 0; } if(!model->SOI3chiFBGiven) { model->SOI3chiFB = 0; } if(!model->SOI3chiPHIGiven) { model->SOI3chiPHI = 0; } if(!model->SOI3deltaWGiven) { model->SOI3deltaW = 0; } if(!model->SOI3deltaLGiven) { model->SOI3deltaL = 0; } if(!model->SOI3vsatGiven) { model->SOI3vsat = 0; /* special case - must check for it */ } if(!model->SOI3kGiven) { model->SOI3k = 1.5; /* defaults to old SPICE value */ } if(!model->SOI3lxGiven) { model->SOI3lx = 0; } if(!model->SOI3vpGiven) { model->SOI3vp = 0; } if(!model->SOI3gammaBGiven) { model->SOI3gammaB = 0; } if(!model->SOI3etaGiven) { model->SOI3eta = 1.0; /* normal field for imp. ion. */ } if(!model->SOI3alpha0Given) { model->SOI3alpha0=0; } if(!model->SOI3beta0Given) { model->SOI3beta0=1.92e6; } if(!model->SOI3lmGiven) { model->SOI3lm = 0; } if(!model->SOI3lm1Given) { model->SOI3lm1 = 0; } if(!model->SOI3lm2Given) { model->SOI3lm2 = 0; } if((!model->SOI3etadGiven) || (model->SOI3etad == 0 )) { model->SOI3etad = 1.0; } if((!model->SOI3etad1Given) || (model->SOI3etad1 == 0 )) { model->SOI3etad1 = 1.0; } if(!model->SOI3chibetaGiven) { model->SOI3chibeta = 0.0; } if(!model->SOI3dvtGiven) { model->SOI3dvt = 1; } if(!model->SOI3nLevGiven) { model->SOI3nLev = 0; } if(!model->SOI3betaBJTGiven) { model->SOI3betaBJT = 0.0; } if(!model->SOI3tauFBJTGiven) { model->SOI3tauFBJT = 0.0; } if(!model->SOI3tauRBJTGiven) { model->SOI3tauRBJT = 0.0; } if(!model->SOI3betaEXPGiven) { model->SOI3betaEXP = 2.0; } if(!model->SOI3tauEXPGiven) { model->SOI3tauEXP = 0.0; } if(!model->SOI3rswGiven) { model->SOI3rsw = 0.0; } if(!model->SOI3rdwGiven) { model->SOI3rdw = 0.0; } if(!model->SOI3minimumFeatureSizeGiven) { model->SOI3minimumFeatureSize = 0.0; } if(!model->SOI3vtexGiven) { model->SOI3vtex = 0.0; } if(!model->SOI3vdexGiven) { model->SOI3vdex = 0.0; } if(!model->SOI3delta0Given) { model->SOI3delta0 = 0.0; } if(!model->SOI3satChargeShareFactorGiven) { model->SOI3satChargeShareFactor = 0.5; } if(!model->SOI3nplusDopingGiven) { model->SOI3nplusDoping = 1e20; } if(!model->SOI3rtaGiven) { model->SOI3rta = 0; } if(!model->SOI3ctaGiven) { model->SOI3cta = 0; } if(!model->SOI3mexpGiven) { model->SOI3mexp = 0; } /* now check to determine which CLM model to use */ if((model->SOI3lx != 0) && (model->SOI3lambda != 0)) { SPfrontEnd->IFerror (ERR_WARNING, "%s: Non-zero values for BOTH LAMBDA and LX. \nDefaulting to simple LAMBDA model", &model->SOI3modName); model->SOI3useLAMBDA = TRUE; } /* if only lx given, AND vp!=0, AND mexp (integer) is at least 1, use lx/vp, else basic lambda model*/ if ((model->SOI3lxGiven) && (model->SOI3lx != 0) && (!model->SOI3lambdaGiven) && (model->SOI3vp != 0) && (model->SOI3mexp > 0)) { model->SOI3useLAMBDA = FALSE; } else { model->SOI3useLAMBDA = TRUE; } /****** Part 2 - set any instance parameters that are not present ******/ /****** in the netlist to default values. ******/ /* loop through all the instances of the model */ for (here = model->SOI3instances; here != NULL ; here=here->SOI3nextInstance) { if(!here->SOI3icVBSGiven) { here->SOI3icVBS = 0; } if(!here->SOI3icVDSGiven) { here->SOI3icVDS = 0; } if(!here->SOI3icVGFSGiven) { here->SOI3icVGFS = 0; } if(!here->SOI3icVGBSGiven) { here->SOI3icVGBS = 0; } if(!here->SOI3drainSquaresGiven || here->SOI3drainSquares==0) { here->SOI3drainSquares=1; } if(!here->SOI3sourceSquaresGiven || here->SOI3sourceSquares==0) { here->SOI3sourceSquares=1; } if (!here->SOI3mGiven) here->SOI3m = 1; /****** Part 3 - Initialise transconductances. ******/ /* initialise gM's */ here->SOI3iMdb= 0.0; here->SOI3iMsb= 0.0; here->SOI3gMmbs = 0.0; here->SOI3gMmf = 0.0; here->SOI3gMmb = 0.0; here->SOI3gMd = 0.0; here->SOI3gMdeltaT = 0.0; /* allocate a chunk of the state vector */ here->SOI3states = *states; *states += SOI3numStates; /* if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 10 * (ckt->CKTsenInfo->SENparms); } */ /****** Part 4 - check resistance values for internal nodes, ******/ /****** to see which internal nodes need to be created. ******/ /* Start with internal source and drain nodes */ if((model->SOI3drainResistance != 0 || (model->SOI3sheetResistance != 0 && here->SOI3drainSquares != 0) || model->SOI3rdw != 0) && here->SOI3dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"drain"); if(error) { return(error); } here->SOI3dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->SOI3dNodePrime = here->SOI3dNode; } if((model->SOI3sourceResistance != 0 || (model->SOI3sheetResistance != 0 && here->SOI3sourceSquares != 0) || model->SOI3rsw != 0) && here->SOI3sNodePrime==0) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"source"); if(error) { return(error); } here->SOI3sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->SOI3sNodePrime = here->SOI3sNode; } /* Now for thermal node */ /* JimB - If minimum feature size has non-zero value, then this */ /* will be used to calculate thermal area of SiO2 - this gives */ /* more accurate values of RT for short-channel devices. Assume*/ /* 4*fmin added to L, and 2*fmin added to W (fmin in microns). */ thermal_area = (here->SOI3w + 2*1e-6*model->SOI3minimumFeatureSize) * (here->SOI3l + 4*1e-6*model->SOI3minimumFeatureSize); /* Now calculate RT and CT. */ /* If RT is given on instance line, use it, otherwise calculate from */ /* above variables. */ if (!here->SOI3rtGiven) { if (model->SOI3rtaGiven) { here->SOI3rt = model->SOI3rta/thermal_area; } else { if (model->SOI3oxideThermalConductivity != 0) { here->SOI3rt = model->SOI3backOxideThickness / (model->SOI3oxideThermalConductivity * thermal_area); } else /* If conductivity set to zero in netlist, switch off self-heating. */ { here->SOI3rt = 0; } } } if (!here->SOI3rt1Given) { here->SOI3rt1=0; } if (!here->SOI3rt2Given) { here->SOI3rt2=0; } if (!here->SOI3rt3Given) { here->SOI3rt3=0; } if (!here->SOI3rt4Given) { here->SOI3rt4=0; } /* Now same thing for CT, but less complex as CT=0 does not cause problems */ if (!here->SOI3ctGiven) { if (model->SOI3ctaGiven) { here->SOI3ct = model->SOI3cta*thermal_area; } else { here->SOI3ct = model->SOI3siliconDensity * model->SOI3siliconSpecificHeat * thermal_area * model->SOI3bodyThickness; } } if (!here->SOI3ct1Given) { here->SOI3ct1=0; } if (!here->SOI3ct2Given) { here->SOI3ct2=0; } if (!here->SOI3ct3Given) { here->SOI3ct3=0; } if (!here->SOI3ct4Given) { here->SOI3ct4=0; } /* JimB - 15/9/99 */ rtargs[0]=here->SOI3rt; rtargs[1]=here->SOI3rt1; rtargs[2]=here->SOI3rt2; rtargs[3]=here->SOI3rt3; rtargs[4]=here->SOI3rt4; rtptr = rtargs; /* Set pointer to start address of rtargs array. */ node_count=0; while ( (*rtptr) && (node_count<5) ) { node_count++; if (node_count<5) { rtptr++; /* Increment pointer to next array element. */ } } here->SOI3numThermalNodes=node_count; /* Thermal node is now external and so is automatically created by CKTcreate in INP2A. It is also bound to the created node's number. However, if rt=0 then no thermal so make tout be the thermal ground. Can't simply use CKTbindNode 'cos the row and column associated with the original node has already been created. Thus problems will occur during pivoting. Instead put zero voltage source here. First create branch for it.*/ if ((here->SOI3rt == 0) && (here->SOI3branch == 0)) { error = CKTmkCur(ckt,&tmp,here->SOI3name,"branch"); if(error) { return(error); } here->SOI3branch = tmp->number; } else { /* have thermal - now how many time constants ? */ if ((here->SOI3numThermalNodes > 1) && (here->SOI3tout1Node == 0)) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"tout1"); if (error) return (error); here->SOI3tout1Node = tmp->number; } else { here->SOI3tout1Node = 0; } if ((here->SOI3numThermalNodes > 2) && (here->SOI3tout2Node == 0)) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"tout2"); if (error) return (error); here->SOI3tout2Node = tmp->number; } else { here->SOI3tout2Node = 0; } if ((here->SOI3numThermalNodes > 3) && (here->SOI3tout3Node == 0)) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"tout3"); if (error) return (error); here->SOI3tout3Node = tmp->number; } else { here->SOI3tout3Node = 0; } if ((here->SOI3numThermalNodes > 4) && (here->SOI3tout4Node == 0)) { error = CKTmkVolt(ckt,&tmp,here->SOI3name,"tout4"); if (error) return (error); here->SOI3tout4Node = tmp->number; } else { here->SOI3tout4Node = 0; } } /****** Part 5 - allocate memory to matrix elements corresponding to ******/ /****** pairs of nodes. ******/ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(SOI3D_dPtr,SOI3dNode,SOI3dNode); TSTALLOC(SOI3D_dpPtr,SOI3dNode,SOI3dNodePrime); TSTALLOC(SOI3DP_dPtr,SOI3dNodePrime,SOI3dNode); TSTALLOC(SOI3S_sPtr,SOI3sNode,SOI3sNode); TSTALLOC(SOI3S_spPtr,SOI3sNode,SOI3sNodePrime); TSTALLOC(SOI3SP_sPtr,SOI3sNodePrime,SOI3sNode); TSTALLOC(SOI3GF_gfPtr,SOI3gfNode,SOI3gfNode); TSTALLOC(SOI3GF_gbPtr,SOI3gfNode,SOI3gbNode); TSTALLOC(SOI3GF_dpPtr,SOI3gfNode,SOI3dNodePrime); TSTALLOC(SOI3GF_spPtr,SOI3gfNode,SOI3sNodePrime); TSTALLOC(SOI3GF_bPtr,SOI3gfNode,SOI3bNode); TSTALLOC(SOI3GB_gfPtr,SOI3gbNode,SOI3gfNode); TSTALLOC(SOI3GB_gbPtr,SOI3gbNode,SOI3gbNode); TSTALLOC(SOI3GB_dpPtr,SOI3gbNode,SOI3dNodePrime); TSTALLOC(SOI3GB_spPtr,SOI3gbNode,SOI3sNodePrime); TSTALLOC(SOI3GB_bPtr,SOI3gbNode,SOI3bNode); TSTALLOC(SOI3B_gfPtr,SOI3bNode,SOI3gfNode); TSTALLOC(SOI3B_gbPtr,SOI3bNode,SOI3gbNode); TSTALLOC(SOI3B_dpPtr,SOI3bNode,SOI3dNodePrime); TSTALLOC(SOI3B_spPtr,SOI3bNode,SOI3sNodePrime); TSTALLOC(SOI3B_bPtr,SOI3bNode,SOI3bNode); TSTALLOC(SOI3DP_gfPtr,SOI3dNodePrime,SOI3gfNode); TSTALLOC(SOI3DP_gbPtr,SOI3dNodePrime,SOI3gbNode); TSTALLOC(SOI3DP_dpPtr,SOI3dNodePrime,SOI3dNodePrime); TSTALLOC(SOI3DP_spPtr,SOI3dNodePrime,SOI3sNodePrime); TSTALLOC(SOI3DP_bPtr,SOI3dNodePrime,SOI3bNode); TSTALLOC(SOI3SP_gfPtr,SOI3sNodePrime,SOI3gfNode); TSTALLOC(SOI3SP_gbPtr,SOI3sNodePrime,SOI3gbNode); TSTALLOC(SOI3SP_dpPtr,SOI3sNodePrime,SOI3dNodePrime); TSTALLOC(SOI3SP_spPtr,SOI3sNodePrime,SOI3sNodePrime); TSTALLOC(SOI3SP_bPtr,SOI3sNodePrime,SOI3bNode); if (here->SOI3rt == 0) { TSTALLOC(SOI3TOUT_ibrPtr,SOI3toutNode,SOI3branch); TSTALLOC(SOI3IBR_toutPtr,SOI3branch,SOI3toutNode); } else { TSTALLOC(SOI3TOUT_toutPtr,SOI3toutNode,SOI3toutNode); if (here->SOI3numThermalNodes > 1) { TSTALLOC(SOI3TOUT_tout1Ptr,SOI3toutNode,SOI3tout1Node); TSTALLOC(SOI3TOUT1_toutPtr,SOI3tout1Node,SOI3toutNode); TSTALLOC(SOI3TOUT1_tout1Ptr,SOI3tout1Node,SOI3tout1Node); } if (here->SOI3numThermalNodes > 2) { TSTALLOC(SOI3TOUT1_tout2Ptr,SOI3tout1Node,SOI3tout2Node); TSTALLOC(SOI3TOUT2_tout1Ptr,SOI3tout2Node,SOI3tout1Node); TSTALLOC(SOI3TOUT2_tout2Ptr,SOI3tout2Node,SOI3tout2Node); } if (here->SOI3numThermalNodes > 3) { TSTALLOC(SOI3TOUT2_tout3Ptr,SOI3tout2Node,SOI3tout3Node); TSTALLOC(SOI3TOUT3_tout2Ptr,SOI3tout3Node,SOI3tout2Node); TSTALLOC(SOI3TOUT3_tout3Ptr,SOI3tout3Node,SOI3tout3Node); } if (here->SOI3numThermalNodes > 4) { TSTALLOC(SOI3TOUT3_tout4Ptr,SOI3tout3Node,SOI3tout4Node); TSTALLOC(SOI3TOUT4_tout3Ptr,SOI3tout4Node,SOI3tout3Node); TSTALLOC(SOI3TOUT4_tout4Ptr,SOI3tout4Node,SOI3tout4Node); } TSTALLOC(SOI3TOUT_toutPtr,SOI3toutNode,SOI3toutNode); TSTALLOC(SOI3TOUT_gfPtr,SOI3toutNode,SOI3gfNode); TSTALLOC(SOI3TOUT_gbPtr,SOI3toutNode,SOI3gbNode); TSTALLOC(SOI3TOUT_dpPtr,SOI3toutNode,SOI3dNodePrime); TSTALLOC(SOI3TOUT_spPtr,SOI3toutNode,SOI3sNodePrime); TSTALLOC(SOI3TOUT_bPtr,SOI3toutNode,SOI3bNode); TSTALLOC(SOI3GF_toutPtr,SOI3gfNode,SOI3toutNode); TSTALLOC(SOI3GB_toutPtr,SOI3gbNode,SOI3toutNode); TSTALLOC(SOI3DP_toutPtr,SOI3dNodePrime,SOI3toutNode); TSTALLOC(SOI3SP_toutPtr,SOI3sNodePrime,SOI3toutNode); TSTALLOC(SOI3B_toutPtr,SOI3bNode,SOI3toutNode); } } } return(OK); } int SOI3unsetup(GENmodel *inModel, CKTcircuit *ckt) { SOI3model *model; SOI3instance *here; for (model = (SOI3model *)inModel; model != NULL; model = model->SOI3nextModel) { for (here = model->SOI3instances; here != NULL; here=here->SOI3nextInstance) { if (here->SOI3dNodePrime && here->SOI3dNodePrime != here->SOI3dNode) { CKTdltNNum(ckt, here->SOI3dNodePrime); here->SOI3dNodePrime= 0; } if (here->SOI3sNodePrime && here->SOI3sNodePrime != here->SOI3sNode) { CKTdltNNum(ckt, here->SOI3sNodePrime); here->SOI3sNodePrime= 0; } if (here->SOI3branch) { CKTdltNNum(ckt, here->SOI3branch); here->SOI3branch=0; } if (here->SOI3tout1Node) { CKTdltNNum(ckt, here->SOI3tout1Node); here->SOI3tout1Node = 0; } if (here->SOI3tout2Node) { CKTdltNNum(ckt, here->SOI3tout2Node); here->SOI3tout2Node = 0; } if (here->SOI3tout3Node) { CKTdltNNum(ckt, here->SOI3tout3Node); here->SOI3tout3Node = 0; } if (here->SOI3tout4Node) { CKTdltNNum(ckt, here->SOI3tout4Node); here->SOI3tout4Node = 0; } } } return OK; } ngspice-26/src/spicelib/devices/soi3/soi3par.c0000644000265600020320000001217112264261473020637 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int SOI3param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { SOI3instance *here = (SOI3instance *)inst; NG_IGNORE(select); switch(param) { case SOI3_L: here->SOI3l = value->rValue; here->SOI3lGiven = TRUE; break; case SOI3_W: here->SOI3w = value->rValue; here->SOI3wGiven = TRUE; break; case SOI3_M: here->SOI3m = value->rValue; here->SOI3mGiven = TRUE; break; case SOI3_AS: here->SOI3as = value->rValue; here->SOI3asGiven = TRUE; break; case SOI3_AD: here->SOI3ad = value->rValue; here->SOI3adGiven = TRUE; break; case SOI3_AB: here->SOI3ab = value->rValue; here->SOI3abGiven = TRUE; break; case SOI3_NRD: here->SOI3drainSquares = value->rValue; here->SOI3drainSquaresGiven = TRUE; break; case SOI3_NRS: here->SOI3sourceSquares = value->rValue; here->SOI3sourceSquaresGiven = TRUE; break; case SOI3_OFF: here->SOI3off = (value->iValue != 0); break; case SOI3_IC_VDS: here->SOI3icVDS = value->rValue; here->SOI3icVDSGiven = TRUE; break; case SOI3_IC_VGFS: here->SOI3icVGFS = value->rValue; here->SOI3icVGFSGiven = TRUE; break; case SOI3_IC_VGBS: here->SOI3icVGBS = value->rValue; here->SOI3icVGBSGiven = TRUE; break; case SOI3_IC_VBS: here->SOI3icVBS = value->rValue; here->SOI3icVBSGiven = TRUE; break; case SOI3_TEMP: here->SOI3temp = value->rValue+CONSTCtoK; here->SOI3tempGiven = TRUE; break; case SOI3_RT: here->SOI3rt = value->rValue; here->SOI3rtGiven = TRUE; break; case SOI3_CT: here->SOI3ct = value->rValue; here->SOI3ctGiven = TRUE; break; case SOI3_RT1: here->SOI3rt1 = value->rValue; here->SOI3rt1Given = TRUE; break; case SOI3_CT1: here->SOI3ct1 = value->rValue; here->SOI3ct1Given = TRUE; break; case SOI3_RT2: here->SOI3rt2 = value->rValue; here->SOI3rt2Given = TRUE; break; case SOI3_CT2: here->SOI3ct2 = value->rValue; here->SOI3ct2Given = TRUE; break; case SOI3_RT3: here->SOI3rt3 = value->rValue; here->SOI3rt3Given = TRUE; break; case SOI3_CT3: here->SOI3ct3 = value->rValue; here->SOI3ct3Given = TRUE; break; case SOI3_RT4: here->SOI3rt4 = value->rValue; here->SOI3rt4Given = TRUE; break; case SOI3_CT4: here->SOI3ct4 = value->rValue; here->SOI3ct4Given = TRUE; break; case SOI3_IC: switch(value->v.numValue){ case 4: here->SOI3icVBS = *(value->v.vec.rVec+3); here->SOI3icVBSGiven = TRUE; case 3: here->SOI3icVGBS = *(value->v.vec.rVec+2); here->SOI3icVGBSGiven = TRUE; case 2: here->SOI3icVGFS = *(value->v.vec.rVec+1); here->SOI3icVGFSGiven = TRUE; case 1: here->SOI3icVDS = *(value->v.vec.rVec); here->SOI3icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; /* case SOI3_L_SENS: if(value->iValue) { here->SOI3senParmNo = 1; here->SOI3sens_l = 1; } break; case SOI3_W_SENS: if(value->iValue) { here->SOI3senParmNo = 1; here->SOI3sens_w = 1; } break; */ default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3init.h0000644000265600020320000000037012264261473021023 0ustar andreasadmin#ifndef _SOI3INIT_H #define _SOI3INIT_H extern IFparm SOI3pTable[ ]; extern IFparm SOI3mPTable[ ]; extern char *SOI3names[ ]; extern int SOI3pTSize; extern int SOI3mPTSize; extern int SOI3nSize; extern int SOI3iSize; extern int SOI3mSize; #endif ngspice-26/src/spicelib/devices/soi3/soi3ic.c0000644000265600020320000000410212264261473020443 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3getic(GENmodel *inModel, CKTcircuit *ckt) { SOI3model *model = (SOI3model *)inModel; SOI3instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->SOI3nextModel) { for(here = model->SOI3instances; here ; here = here->SOI3nextInstance) { if(!here->SOI3icVBSGiven) { here->SOI3icVBS = *(ckt->CKTrhs + here->SOI3bNode) - *(ckt->CKTrhs + here->SOI3sNode); } if(!here->SOI3icVDSGiven) { here->SOI3icVDS = *(ckt->CKTrhs + here->SOI3dNode) - *(ckt->CKTrhs + here->SOI3sNode); } if(!here->SOI3icVGFSGiven) { here->SOI3icVGFS = *(ckt->CKTrhs + here->SOI3gfNode) - *(ckt->CKTrhs + here->SOI3sNode); } if(!here->SOI3icVGBSGiven) { here->SOI3icVGBS = *(ckt->CKTrhs + here->SOI3gbNode) - *(ckt->CKTrhs + here->SOI3sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3dest.c0000644000265600020320000000267212264261473021021 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "soi3defs.h" #include "ngspice/suffix.h" void SOI3destroy(GENmodel **inModel) { SOI3model **model = (SOI3model**)inModel; SOI3instance *here; SOI3instance *prev = NULL; SOI3model *mod = *model; SOI3model *oldmod = NULL; for( ; mod ; mod = mod->SOI3nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->SOI3instances ; here ; here = here->SOI3nextInstance) { if(prev){ /* if(prev->SOI3sens) FREE(prev->SOI3sens); */ FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/soi3/soi3.c0000644000265600020320000003421112264261473020133 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "soi3defs.h" #include "ngspice/suffix.h" char *SOI3names[] = { "Drain", "Front Gate", "Source", "Back Gate", "Bulk", "Thermal" }; IFparm SOI3pTable[] = { /* parameters */ IOP("l", SOI3_L, IF_REAL, "Length"), IOP("w", SOI3_W, IF_REAL, "Width"), IOP("m", SOI3_M, IF_REAL, "Parallel Multiplier"), IOP("as", SOI3_AS, IF_REAL, "Source area"), IOP("ad", SOI3_AD, IF_REAL, "Drain area"), IOP("ab", SOI3_AB, IF_REAL, "Body area"), IOP("nrd", SOI3_NRD, IF_REAL, "Drain squares"), IOP("nrs", SOI3_NRS, IF_REAL, "Source squares"), IP("off", SOI3_OFF, IF_FLAG, "Device initially off"), IOP("icvds", SOI3_IC_VDS, IF_REAL, "Initial D-S voltage"), IOP("icvgfs", SOI3_IC_VGFS, IF_REAL, "Initial GF-S voltage"), IOP("icvgbs", SOI3_IC_VGBS, IF_REAL, "Initial GB-S voltage"), IOP("icvbs", SOI3_IC_VBS, IF_REAL, "Initial B-S voltage"), IOP("temp", SOI3_TEMP, IF_REAL, "Instance temperature"), IOP("rt", SOI3_RT, IF_REAL, "Instance Lumped Thermal Resistance"), IOP("ct", SOI3_CT, IF_REAL, "Instance Lumped Thermal Capacitance"), IOP("rt1", SOI3_RT1, IF_REAL, "Second Thermal Resistance"), IOP("ct1", SOI3_CT1, IF_REAL, "Second Thermal Capacitance"), IOP("rt2", SOI3_RT2, IF_REAL, "Third Thermal Resistance"), IOP("ct2", SOI3_CT2, IF_REAL, "Third Thermal Capacitance"), IOP("rt3", SOI3_RT3, IF_REAL, "Fourth Thermal Resistance"), IOP("ct3", SOI3_CT3, IF_REAL, "Fourth Thermal Capacitance"), IOP("rt4", SOI3_RT4, IF_REAL, "Fifth Thermal Resistance"), IOP("ct4", SOI3_CT4, IF_REAL, "Fifth Thermal Capacitance"), IP( "ic", SOI3_IC, IF_REALVEC,"Vector of D-S, GF-S, GB-S, B-S voltages"), /* IP( "sens_l", SOI3_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"), IP( "sens_w", SOI3_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"),*/ OP( "dnode", SOI3_DNODE, IF_INTEGER, "Number of the drain node "), OP( "gfnode", SOI3_GFNODE, IF_INTEGER, "Number of frt. gate node "), OP( "snode", SOI3_SNODE, IF_INTEGER, "Number of the source node "), OP( "gbnode", SOI3_GBNODE, IF_INTEGER, "Number of back gate node "), OP( "bnode", SOI3_BNODE, IF_INTEGER, "Number of the body node "), OP( "dnodeprime", SOI3_DNODEPRIME, IF_INTEGER, "Number of int. drain node"), OP( "snodeprime", SOI3_SNODEPRIME, IF_INTEGER, "Number of int. source node "), OP( "tnode", SOI3_TNODE, IF_INTEGER, "Number of thermal node "), OP( "branch", SOI3_BRANCH, IF_INTEGER, "Number of thermal branch "), OP( "sourceconductance", SOI3_SOURCECONDUCT, IF_REAL, "Conductance of source"), OP( "drainconductance", SOI3_DRAINCONDUCT, IF_REAL, "Conductance of drain"), OP( "von", SOI3_VON, IF_REAL, "Effective Threshold Voltage (von) "), OP( "vfbf", SOI3_VFBF, IF_REAL, "Temperature adjusted flat band voltage"), OP( "vdsat", SOI3_VDSAT, IF_REAL, "Saturation drain voltage"), OP( "sourcevcrit", SOI3_SOURCEVCRIT,IF_REAL, "Critical source voltage"), OP( "drainvcrit", SOI3_DRAINVCRIT, IF_REAL, "Critical drain voltage"), OP( "id", SOI3_ID, IF_REAL, "Drain current"), OP( "ibs", SOI3_IBS, IF_REAL, "B-S junction current"), OP( "ibd", SOI3_IBD, IF_REAL, "B-D junction current"), OP( "gmbs", SOI3_GMBS, IF_REAL, "Bulk-Source transconductance"), OP( "gmf", SOI3_GMF, IF_REAL, "Front transconductance"), OP( "gmb", SOI3_GMB, IF_REAL, "Back transconductance"), OP( "gds", SOI3_GDS, IF_REAL, "Drain-Source conductance"), OP( "gbd", SOI3_GBD, IF_REAL, "Bulk-Drain conductance"), OP( "gbs", SOI3_GBS, IF_REAL, "Bulk-Source conductance"), OP( "capbd", SOI3_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP( "capbs", SOI3_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP( "cbd0", SOI3_CAPZEROBIASBD, IF_REAL, "Zero-Bias B-D junction capacitance"), OP( "cbs0", SOI3_CAPZEROBIASBS, IF_REAL, "Zero-Bias B-S junction capacitance"), OP( "vbd", SOI3_VBD, IF_REAL, "Bulk-Drain voltage"), OP( "vbs", SOI3_VBS, IF_REAL, "Bulk-Source voltage"), OP( "vgfs", SOI3_VGFS, IF_REAL, "Front gate-Source voltage"), OP( "vgbs", SOI3_VGBS, IF_REAL, "Back gate-Source voltage"), OP( "vds", SOI3_VDS, IF_REAL, "Drain-Source voltage"), OP( "qgf", SOI3_QGF, IF_REAL, "Front Gate charge storage"), OP( "iqgf",SOI3_IQGF,IF_REAL,"Current due to front gate charge storage"), /* OP( "qgb", SOI3_QGB, IF_REAL, "Back Gate charge storage"), OP( "iqgb",SOI3_IQGB,IF_REAL,"Current due to back gate charge storage"), */ OP( "qd", SOI3_QD, IF_REAL, "Drain charge storage"), OP( "iqd",SOI3_IQD,IF_REAL,"Current due to drain charge storage"), OP( "qs", SOI3_QS, IF_REAL, "Source charge storage"), OP( "iqs",SOI3_IQS,IF_REAL,"Current due to source charge storage"), OP( "qbd", SOI3_QBD, IF_REAL, "Bulk-Drain charge storage"), OP( "iqbd",SOI3_IQBD,IF_REAL,"Current due to bulk-drain charge storage"), OP( "qbs", SOI3_QBS, IF_REAL, "Bulk-Source charge storage"), OP( "iqbs",SOI3_IQBS,IF_REAL,"Currnet due to bulk-source charge storage"), /* extra stuff for newer model -msll Jan96 */ OP( "vfbb", SOI3_VFBB, IF_REAL, "Temperature adjusted back flat band voltage") /*, OP( "sens_l_dc", SOI3_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OP( "sens_l_real", SOI3_L_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt length"), OP( "sens_l_imag", SOI3_L_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt length"), OP( "sens_l_mag", SOI3_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OP( "sens_l_ph", SOI3_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OP( "sens_l_cplx", SOI3_L_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt length"), OP( "sens_w_dc", SOI3_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OP( "sens_w_real", SOI3_W_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt width"), OP( "sens_w_imag", SOI3_W_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt width"), OP( "sens_w_mag", SOI3_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OP( "sens_w_ph", SOI3_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OP( "sens_w_cplx", SOI3_W_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt width")*/ }; IFparm SOI3mPTable[] = { /* model parameters */ IOP("vto", SOI3_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("vt0", SOI3_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("vfbf", SOI3_MOD_VFBF, IF_REAL ,"Flat band voltage"), IOP("kp", SOI3_MOD_KP, IF_REAL ,"Transconductance parameter"), IOP("gamma", SOI3_MOD_GAMMA, IF_REAL ,"Body Factor"), IOP("phi", SOI3_MOD_PHI, IF_REAL ,"Surface potential"), IOP("lambda",SOI3_MOD_LAMBDA,IF_REAL ,"Channel length modulation"), IOP("theta", SOI3_MOD_THETA, IF_REAL ,"Vertical field mobility degradation"), IOP("rd", SOI3_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", SOI3_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOP("cbd", SOI3_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOP("cbs", SOI3_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", SOI3_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("is1", SOI3_MOD_IS1, IF_REAL ,"2nd Bulk junction sat. current"), IOP("pb", SOI3_MOD_PB, IF_REAL ,"Bulk junction potential"), IOP("cgfso", SOI3_MOD_CGFSO, IF_REAL ,"Front Gate-source overlap cap."), IOP("cgfdo", SOI3_MOD_CGFDO, IF_REAL ,"Front Gate-drain overlap cap."), IOP("cgfbo", SOI3_MOD_CGFBO, IF_REAL ,"Front Gate-bulk overlap cap."), IOP("cgbso", SOI3_MOD_CGBSO, IF_REAL ,"Back Gate-source overlap cap."), IOP("cgbdo", SOI3_MOD_CGBDO, IF_REAL ,"Back Gate-drain overlap cap."), IOP("cgbbo", SOI3_MOD_CGBBO, IF_REAL ,"Back Gate-bulk overlap cap."), IOP("rsh", SOI3_MOD_RSH, IF_REAL ,"Sheet resistance"), IOP("cj", SOI3_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mj", SOI3_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOP("js", SOI3_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("js1", SOI3_MOD_JS1, IF_REAL ,"2nd Bulk jct. sat. current density"), IOP("tof", SOI3_MOD_TOF, IF_REAL ,"Front Oxide thickness"), IOP("tob", SOI3_MOD_TOB, IF_REAL ,"Back Oxide thickness"), IOP("tb", SOI3_MOD_TB, IF_REAL ,"Bulk film thickness"), IOP("ld", SOI3_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("u0", SOI3_MOD_U0, IF_REAL ,"Surface mobility"), IOP("uo", SOI3_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", SOI3_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IP("nsoi", SOI3_MOD_NSOI3, IF_FLAG ,"N type SOI3fet model"), IP("psoi", SOI3_MOD_PSOI3, IF_FLAG ,"P type SOI3fet model"), IOP("kox", SOI3_MOD_KOX, IF_REAL ,"Oxide thermal conductivity"), IOP("shsi", SOI3_MOD_SHSI, IF_REAL ,"Specific heat of silicon"), IOP("dsi", SOI3_MOD_DSI, IF_REAL ,"Density of silicon"), IOP("nsub", SOI3_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("tpg", SOI3_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nqff", SOI3_MOD_NQFF, IF_REAL ,"Front fixed oxide charge density"), IOP("nqfb", SOI3_MOD_NQFB, IF_REAL ,"Back fixed oxide charge density"), IOP("nssf", SOI3_MOD_NSSF, IF_REAL ,"Front surface state density"), IOP("nssb", SOI3_MOD_NSSB, IF_REAL ,"Back surface state density"), IOP("tnom", SOI3_MOD_TNOM, IF_REAL ,"Parameter measurement temp"), IP("kf", SOI3_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IP("af", SOI3_MOD_AF, IF_REAL ,"Flicker noise exponent"), /* extra stuff for newer model - msll Jan96 */ IOP("sigma", SOI3_MOD_SIGMA, IF_REAL ,"DIBL coefficient"), IOP("chifb", SOI3_MOD_CHIFB, IF_REAL ,"Temperature coeff of flatband voltage"), IOP("chiphi",SOI3_MOD_CHIPHI, IF_REAL ,"Temperature coeff of PHI"), IOP("deltaw",SOI3_MOD_DELTAW,IF_REAL ,"Narrow width factor"), IOP("deltal",SOI3_MOD_DELTAL,IF_REAL ,"Short channel factor"), IOP("vsat", SOI3_MOD_VSAT, IF_REAL ,"Saturation velocity"), IOP("k", SOI3_MOD_K, IF_REAL ,"Thermal exponent"), IOP("lx", SOI3_MOD_LX, IF_REAL ,"Channel length modulation (alternative)"), IOP("vp", SOI3_MOD_VP, IF_REAL ,"Channel length modulation (alt. empirical)"), IOP("eta", SOI3_MOD_ETA, IF_REAL ,"Impact ionization field adjustment factor"), IOP("alpha0",SOI3_MOD_ALPHA0,IF_REAL ,"First impact ionisation coeff (alpha0)"), IOP("beta0", SOI3_MOD_BETA0, IF_REAL ,"Second impact ionisation coeff (beta0)"), IOP("lm", SOI3_MOD_LM, IF_REAL ,"Impact ion. drain region length"), IOP("lm1", SOI3_MOD_LM1, IF_REAL ,"Impact ion. drain region length coeff"), IOP("lm2", SOI3_MOD_LM2, IF_REAL ,"Impact ion. drain region length coeff"), IOP("etad", SOI3_MOD_ETAD, IF_REAL ,"Diode ideality factor"), IOP("etad1", SOI3_MOD_ETAD1, IF_REAL ,"2nd Diode ideality factor"), IOP("chibeta",SOI3_MOD_CHIBETA,IF_REAL ,"Impact ionisation temperature coefficient"), IOP("vfbb", SOI3_MOD_VFBB, IF_REAL ,"Back Flat band voltage"), IOP("gammab",SOI3_MOD_GAMMAB,IF_REAL ,"Back Body Factor"), IOP("chid", SOI3_MOD_CHID, IF_REAL ,"Junction temperature factor"), IOP("chid1", SOI3_MOD_CHID1, IF_REAL ,"2nd Junction temperature factor"), IOP("dvt", SOI3_MOD_DVT, IF_INTEGER,"Switch for temperature dependence of vt in diodes"), IOP("nlev", SOI3_MOD_NLEV, IF_INTEGER,"Level switch for flicker noise model"), IOP("betabjt",SOI3_MOD_BETABJT,IF_REAL ,"Beta for BJT"), IOP("tauf", SOI3_MOD_TAUFBJT,IF_REAL ,"Forward tau for BJT"), IOP("taur", SOI3_MOD_TAURBJT,IF_REAL ,"Reverse tau for BJT"), IOP("betaexp",SOI3_MOD_BETAEXP,IF_REAL ,"Exponent for Beta of BJT"), IOP("tauexp", SOI3_MOD_TAUEXP,IF_REAL, "Exponent for Transit time of BJT"), IOP("rsw", SOI3_MOD_RSW, IF_REAL ,"Source resistance width scaling factor"), IOP("rdw", SOI3_MOD_RDW, IF_REAL ,"Drain resistance width scaling factor"), IOP("fmin", SOI3_MOD_FMIN, IF_REAL ,"Minimum feature size of technology"), IOP("vtex", SOI3_MOD_VTEX, IF_REAL ,"Extracted threshold voltage"), IOP("vdex", SOI3_MOD_VDEX, IF_REAL ,"Drain bias at which vtex extracted"), IOP("delta0",SOI3_MOD_DELTA0,IF_REAL ,"Surface potential factor for vtex conversion"), IOP("csf", SOI3_MOD_CSF ,IF_REAL ,"Saturation region charge sharing factor"), IOP("nplus", SOI3_MOD_NPLUS ,IF_REAL ,"Doping concentration of N+ or P+ regions"), IOP("rta", SOI3_MOD_RTA ,IF_REAL ,"Thermal resistance area scaling factor"), IOP("cta", SOI3_MOD_CTA ,IF_REAL ,"Thermal capacitance area scaling factor"), IOP("mexp", SOI3_MOD_MEXP ,IF_REAL ,"Exponent for CLM smoothing") }; int SOI3nSize = NUMELEMS(SOI3names); int SOI3pTSize = NUMELEMS(SOI3pTable); int SOI3mPTSize = NUMELEMS(SOI3mPTable); int SOI3iSize = sizeof(SOI3instance); int SOI3mSize = sizeof(SOI3model); ngspice-26/src/spicelib/devices/soi3/soi3temp.c0000644000265600020320000006166012264261473021031 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3temp(GENmodel *inModel, CKTcircuit *ckt) { SOI3model *model = (SOI3model *)inModel; SOI3instance *here; /* All variables ending in 1 denote that they pertain to the model and so use model->SOI3tnom for temperature - the others use here->SOI3temp. REFTEMP is temp at which hard-coded quantities are given. */ double egfet,egfet1; /* Band Gap */ double fact1,fact2; /* temperature/REFTEMP */ double kt,kt1; /* kT @ various temps */ double arg1; /* ??? */ double ratio,ratio4; /* (temp/tnom) and (temp/tnom)^(3/2) */ double phio; /* temp adjusted phi PHI0*/ double pbo; double gmanew,gmaold; double capfact; double pbfact1,pbfact; /* ??? */ double vt,vtnom; double wkfngfs; /* work function difference phi(gate,Si) */ double wkfngf; /* work fn of front gate */ double wkfngbs; /* work fn diff of back gate = 0 usu. */ double fermig; /* fermi level of gate */ double fermis; /* fermi level of Si */ double xd_max; /* Minimum Si film thickness for this model to be valid */ double eta_s; /* JimB - new variables for improved threshold voltage conversion model. */ double Edelta0; double psi_delta0; /* loop through all the transistor models */ for( ; model != NULL; model = model->SOI3nextModel) { /* perform model defaulting */ if(!model->SOI3tnomGiven) { model->SOI3tnom = ckt->CKTnomTemp; } fact1 = model->SOI3tnom/REFTEMP; vtnom = model->SOI3tnom*CONSTKoverQ; kt1 = CONSTboltz * model->SOI3tnom; egfet1 = 1.16-(7.02e-4*model->SOI3tnom*model->SOI3tnom)/ (model->SOI3tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); /* this is -Egnom + Egref. - sign due to it being in bracket with log(fact1) 'cos we wanted log(1/fact1). */ pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); /* 2 comes from fact phi=2*phi_F ^ */ /* now model parameter preprocessing */ if(!model->SOI3frontOxideThicknessGiven || model->SOI3frontOxideThickness == 0 || !model->SOI3backOxideThicknessGiven || model->SOI3backOxideThickness == 0 || !model->SOI3bodyThicknessGiven || model->SOI3bodyThickness == 0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: SOI3 device film thickness must be supplied", &model->SOI3modName); return(E_BADPARM); } else /* Oxide and film thicknesses are supplied. */ { model->SOI3frontOxideCapFactor = 3.9 * 8.854214871e-12/ model->SOI3frontOxideThickness; model->SOI3backOxideCapFactor = 3.9 * 8.854214871e-12/ model->SOI3backOxideThickness; model->SOI3bodyCapFactor = 11.7 * 8.854214871e-12/ model->SOI3bodyThickness; model->SOI3C_ssf = CHARGE*model->SOI3frontSurfaceStateDensity*1e4; model->SOI3C_ssb = CHARGE*model->SOI3backSurfaceStateDensity*1e4; eta_s = 1 + model->SOI3C_ssf/model->SOI3frontOxideCapFactor; if(!model->SOI3transconductanceGiven) { if(!model->SOI3surfaceMobilityGiven) { model->SOI3surfaceMobility=600; } model->SOI3transconductance = model->SOI3surfaceMobility * model->SOI3frontOxideCapFactor * 1e-4 /*(m**2/cm**2) for mobility */; } if(model->SOI3substrateDopingGiven) { /* work everything out */ if(model->SOI3substrateDoping*1e6 /*(cm**3/m**3)*/ >1.45e16) { if(!model->SOI3phiGiven) { model->SOI3phi = 2*vtnom* log(model->SOI3substrateDoping* 1e6/*(cm**3/m**3)*//1.45e16); model->SOI3phi = MAX(0.1,model->SOI3phi); } /* Now that we have ascertained both the doping * * and the body film thickness, check to see * * if we have a thick film device. If not, complain ! */ xd_max=2*sqrt((2* 11.7 * 8.854214871e-12 * model->SOI3phi)/ (CHARGE*1e6 /*(cm**3/m**3)*/ * model->SOI3substrateDoping)); if(model->SOI3bodyThickness < xd_max) { SPfrontEnd->IFerror (ERR_WARNING, "%s: Body Film thickness may be too small \nfor this model to be valid", &model->SOI3modName); /* return(E_PAUSE); don't want to stop, just issue a warning */ } /* End of thick film check - msll 21/2/94 Changed to only give warning - msll 31/10/95 */ if(!model->SOI3vfbFGiven) { if(!model->SOI3frontFixedChargeDensityGiven) model->SOI3frontFixedChargeDensity = 0; fermis = model->SOI3type * 0.5 * model->SOI3phi; wkfngf = 3.2; if(!model->SOI3gateTypeGiven) model->SOI3gateType=1; if(model->SOI3gateType != 0) { fermig = model->SOI3type *model->SOI3gateType*0.5*egfet1; wkfngf = 3.25 + 0.5 * egfet1 - fermig; } wkfngfs = wkfngf - (3.25 + 0.5 * egfet1 +fermis); /* Fixed oxide charge is normally +ve for both n and p-channel, so need -ve voltage to neutralise it */ model->SOI3vfbF = wkfngfs - model->SOI3frontFixedChargeDensity * 1e4 /*(cm**2/m**2)*/ * CHARGE/model->SOI3frontOxideCapFactor; } if(!model->SOI3vfbBGiven) { wkfngbs = (1-model->SOI3type)*0.5*model->SOI3phi; /* assume p-sub */ model->SOI3vfbB = wkfngbs - model->SOI3backFixedChargeDensity * 1e4 /*(cm**2/m**2)*/ * CHARGE/model->SOI3backOxideCapFactor; } if(!model->SOI3gammaGiven) { model->SOI3gamma = sqrt(2 * 11.70 * 8.854214871e-12 * CHARGE * model->SOI3substrateDoping * 1e6 /*(cm**3/m**3)*/)/model->SOI3frontOxideCapFactor; } if(!model->SOI3gammaBGiven) { model->SOI3gammaB = sqrt(2 * 11.70 * 8.854214871e-12 * CHARGE * model->SOI3substrateDoping * 1e6 /*(cm**3/m**3)*/)/model->SOI3backOxideCapFactor; } if(model->SOI3vt0Given) { /* NSUB given AND VT0 given - change vfbF */ model->SOI3vfbF = model->SOI3vt0 - model->SOI3type * (eta_s*model->SOI3phi + model->SOI3gamma*sqrt(model->SOI3phi)); } else { if(model->SOI3vtexGiven) { /* JimB - Improved threshold voltage conversion model. */ if (model->SOI3delta0 < 0) { model->SOI3delta0 = 0; } if (model->SOI3vdex < 0) { /* Use convention that Vd at which Vtex was extracted */ /* is always +ve. */ model->SOI3vdex = -model->SOI3vdex; } /* Exponential term delta*phiF/phit (SOI3phi = 2phiF) */ Edelta0 = exp(MIN(MAX_EXP_ARG, (model->SOI3delta0*model->SOI3phi)/(2*vtnom)) ); /* Modified surface potential term (2+delta)*phiF + vdex/2 */ /* (SOI3phi = 2phiF) */ psi_delta0 = ((2+model->SOI3delta0)*model->SOI3phi/2) + model->SOI3vdex/2; model->SOI3vfbF = model->SOI3vtex - model->SOI3type * (eta_s*psi_delta0 + model->SOI3gamma* sqrt(psi_delta0 + vtnom*Edelta0) ); } } } else /* Substrate doping less than intrinsic silicon, so set to zero. */ { model->SOI3substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni",&model->SOI3modName); return(E_BADPARM); } } else /* NSUB not given, have to assume that VT0, PHI and GAMMA are given */ { xd_max=(2* 11.7 * 8.854214871e-12*sqrt(model->SOI3phi))/ (model->SOI3gamma*model->SOI3frontOxideCapFactor); if(model->SOI3bodyThickness < xd_max) { SPfrontEnd->IFerror (ERR_WARNING, "%s :Body Film thickness may be too small \nfor this model to be valid", &model->SOI3modName); /* return(E_PAUSE); */ } /* End of thick film check - msll 21/2/94 Changed to only give warning - msll 31/10/95 */ /* If vtext given in netlist, but no vt0. */ if( (model->SOI3vtexGiven) && (!model->SOI3vt0Given) ) { /* JimB - Improved threshold voltage conversion model. */ if (model->SOI3delta0 < 0) { model->SOI3delta0 = 0; } if (model->SOI3vdex < 0) { /* Use convention that Vd at which Vtex was extracted */ /* is always +ve. */ model->SOI3vdex = -model->SOI3vdex; } /* Exponential term delta*phiF/phit (SOI3phi = 2phiF) */ Edelta0 = exp(MIN(MAX_EXP_ARG, (model->SOI3delta0*model->SOI3phi)/(2*vtnom)) ); /* Modified surface potential term (2+delta)*phiF + vdex/2 */ /* (SOI3phi = 2phiF) */ psi_delta0 = ((2+model->SOI3delta0)*model->SOI3phi/2) + model->SOI3vdex/2; model->SOI3vfbF = model->SOI3vtex - model->SOI3type * (eta_s*psi_delta0 + model->SOI3gamma* sqrt(psi_delta0 + vtnom*Edelta0) ); } else /* If no vtex, then use vt0, either netlist or default value. */ { /* Use standard threshold voltage model. */ model->SOI3vfbF = model->SOI3vt0 - model->SOI3type * (eta_s*model->SOI3phi + model->SOI3gamma*sqrt(model->SOI3phi)); } if (!model->SOI3vfbBGiven) { model->SOI3vfbB = 0; /* NSUB not given, vfbB not given */ } } } if((model->SOI3vsatGiven)&&(model->SOI3vsat != 0)) { model->SOI3TVF0 = 0.8*exp(model->SOI3tnom/600); } else { model->SOI3TVF0 = 0; } /* loop through all instances of the model */ for(here = model->SOI3instances; here!= NULL; here = here->SOI3nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double cj0; /* default value of zero voltage bulk-source/drain capacitance*/ double Nratio; /* ratio of Nsub*Nplus/Nsub+Nplus */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ /* perform the parameter defaulting */ /* JimB - if device temperature not given, OR, if self-heating switched */ /* on, then set device temperature equal to circuit temperature. Can't */ /* set device temp with self-heating on, otherwise get multiple thermal */ /* ground nodes, but doesn't matter, since any sizeable thermal gradient*/ /* across an IC circuit is probably due to self-heating anyway. */ if ( (!here->SOI3tempGiven) || (here->SOI3rt != 0) ) { here->SOI3temp = ckt->CKTtemp; } vt = here->SOI3temp * CONSTKoverQ; ratio = here->SOI3temp/model->SOI3tnom; fact2 = here->SOI3temp/REFTEMP; kt = here->SOI3temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->SOI3temp*here->SOI3temp)/ (here->SOI3temp+1108); if (!model->SOI3chidGiven) { model->SOI3chid = CHARGE*egfet/CONSTboltz; } if (!model->SOI3chid1Given) { model->SOI3chid1 = CHARGE*egfet/CONSTboltz; } arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->SOI3lGiven) { here->SOI3l = ckt->CKTdefaultMosL; } if(!here->SOI3wGiven) { here->SOI3w = ckt->CKTdefaultMosW; } if(here->SOI3l - 2 * model->SOI3latDiff <=0) { SPfrontEnd->IFerror (ERR_WARNING, "%s: Effective channel length less than zero \nIncreasing \ this instance length by 2*LD to remove effect of LD", &(here->SOI3name)); here->SOI3l += 2*model->SOI3latDiff; } ratio4 = exp(model->SOI3k*log(ratio)); /* ratio4 = (temp/tnom)^k */ /* i.e. mobilitites prop to */ /* T^-(k) where k=1.5 for old SPICE */ here->SOI3tTransconductance = model->SOI3transconductance / ratio4; here->SOI3tSurfMob = model->SOI3surfaceMobility/ratio4; phio= (model->SOI3phi-pbfact1)/fact1; /* this is PHI @ REFTEMP */ here->SOI3tPhi = fact2 * phio + pbfact; here->SOI3tVfbF = model->SOI3vfbF + (model->SOI3type * model->SOI3gateType * 0.5*(egfet1-egfet)) + (model->SOI3type * 0.5 * (model->SOI3phi - here->SOI3tPhi)); here->SOI3tVfbB = model->SOI3vfbB + (1-model->SOI3type)*0.5*(here->SOI3tPhi-model->SOI3phi); here->SOI3tVto = here->SOI3tVfbF + model->SOI3type * (model->SOI3gamma * sqrt(here->SOI3tPhi) + eta_s*here->SOI3tPhi); here->SOI3tSatCur = model->SOI3jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->SOI3tSatCur1 = model->SOI3jctSatCur1* exp(-egfet/vt+egfet1/vtnom); here->SOI3tSatCurDens = model->SOI3jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); here->SOI3tSatCurDens1 = model->SOI3jctSatCurDensity1 * exp(-egfet/vt+egfet1/vtnom); pbo = (model->SOI3bulkJctPotential - pbfact1)/fact1; gmaold = (model->SOI3bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(model->SOI3tnom-REFTEMP)-gmaold)); here->SOI3tCbd = model->SOI3capBD * capfact; here->SOI3tCbs = model->SOI3capBS * capfact; here->SOI3tCjsw = model->SOI3sideWallCapFactor * capfact; here->SOI3tBulkPot = fact2 * pbo+pbfact; gmanew = (here->SOI3tBulkPot-pbo)/pbo; capfact = (1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(here->SOI3temp-REFTEMP)-gmanew)); here->SOI3tCbd *= capfact; here->SOI3tCbs *= capfact; here->SOI3tCjsw *= capfact; here->SOI3tDepCap = model->SOI3fwdCapDepCoeff * here->SOI3tBulkPot; if (here->SOI3tSatCurDens == 0) { if (here->SOI3tSatCur == 0) { here->SOI3sourceVcrit = here->SOI3drainVcrit = vt*log(vt/(CONSTroot2*1.0e-15)); } else { here->SOI3sourceVcrit = here->SOI3drainVcrit = vt*log(vt/(CONSTroot2*here->SOI3tSatCur)); } } else { here->SOI3drainVcrit = vt * log( vt / (CONSTroot2 * here->SOI3tSatCurDens * (here->SOI3w))); here->SOI3sourceVcrit = vt * log( vt / (CONSTroot2 * here->SOI3tSatCurDens * (here->SOI3w))); } if(model->SOI3capBDGiven) { czbd = here->SOI3tCbd; } else { if(model->SOI3sideWallCapFactorGiven) { czbd = here->SOI3tCjsw * (here->SOI3w*model->SOI3bodyThickness); } /* JimB - 2/1/99. Calculate default value for Cj0 */ /* using PN junction theory. */ else { Nratio = (1e6*model->SOI3nplusDoping * model->SOI3substrateDoping)/ (model->SOI3nplusDoping + model->SOI3substrateDoping); cj0 = sqrt((Nratio * 11.7 * 8.854214871e-12 * CHARGE)/ (2 * here->SOI3tBulkPot)); /* JimB - temperature dependence code */ gmaold = (model->SOI3bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(model->SOI3tnom-REFTEMP)-gmaold)); cj0 *= capfact; gmanew = (here->SOI3tBulkPot-pbo)/pbo; capfact = (1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(here->SOI3temp-REFTEMP)-gmanew)); cj0 *= capfact; czbd = cj0 * (here->SOI3w*model->SOI3bodyThickness); } } arg = 1-model->SOI3fwdCapDepCoeff; sarg = exp( (-model->SOI3bulkJctSideGradingCoeff) * log(arg) ); here->SOI3Cbd = czbd; here->SOI3f2d = czbd*(1-model->SOI3fwdCapDepCoeff* (1+model->SOI3bulkJctSideGradingCoeff))* sarg/arg; here->SOI3f3d = czbd * model->SOI3bulkJctSideGradingCoeff * sarg/arg / here->SOI3tBulkPot; here->SOI3f4d = czbd*here->SOI3tBulkPot*(1-arg*sarg)/ (1-model->SOI3bulkJctSideGradingCoeff) -here->SOI3f3d/2* (here->SOI3tDepCap*here->SOI3tDepCap) -here->SOI3tDepCap * here->SOI3f2d; if(model->SOI3capBSGiven) { czbs=here->SOI3tCbs; } else { if(model->SOI3sideWallCapFactorGiven) { czbs=here->SOI3tCjsw * (here->SOI3w*model->SOI3bodyThickness); } /* JimB - 2/1/99. Calculate default value for Cj0 */ /* using PN junction theory. */ else { Nratio = (1e6*model->SOI3nplusDoping * model->SOI3substrateDoping)/ (model->SOI3nplusDoping + model->SOI3substrateDoping); cj0 = sqrt((Nratio * 11.7 * 8.854214871e-12 * CHARGE)/ (2 * here->SOI3tBulkPot)); /* JimB - temperature dependence code */ gmaold = (model->SOI3bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(model->SOI3tnom-REFTEMP)-gmaold)); cj0 *= capfact; gmanew = (here->SOI3tBulkPot-pbo)/pbo; capfact = (1+model->SOI3bulkJctSideGradingCoeff* (4e-4*(here->SOI3temp-REFTEMP)-gmanew)); cj0 *= capfact; czbs = cj0 * (here->SOI3w*model->SOI3bodyThickness); } } arg = 1-model->SOI3fwdCapDepCoeff; sarg = exp( (-model->SOI3bulkJctSideGradingCoeff) * log(arg) ); here->SOI3Cbs = czbs; here->SOI3f2s = czbs*(1-model->SOI3fwdCapDepCoeff* (1+model->SOI3bulkJctSideGradingCoeff))* sarg/arg; here->SOI3f3s = czbs * model->SOI3bulkJctSideGradingCoeff * sarg/arg / here->SOI3tBulkPot; here->SOI3f4s = czbs*here->SOI3tBulkPot*(1-arg*sarg)/ (1-model->SOI3bulkJctSideGradingCoeff) -here->SOI3f3s/2* (here->SOI3tDepCap*here->SOI3tDepCap) -here->SOI3tDepCap * here->SOI3f2s; if(model->SOI3drainResistanceGiven) { if(model->SOI3drainResistance != 0) { here->SOI3drainConductance = 1/model->SOI3drainResistance; } else { here->SOI3drainConductance = 0; } } else if (model->SOI3sheetResistanceGiven) { if(model->SOI3sheetResistance != 0) { here->SOI3drainConductance = 1/(model->SOI3sheetResistance*here->SOI3drainSquares); } else { here->SOI3drainConductance = 0; } } else if(model->SOI3rdwGiven) { if (model->SOI3rdw != 0) { /* JimB - 1e6 multiplying factor converts W from m to microns */ here->SOI3drainConductance = (here->SOI3w/model->SOI3rdw)*1e6; } else { here->SOI3drainConductance = 0; } } else { here->SOI3drainConductance = 0; } if(model->SOI3sourceResistanceGiven) { if(model->SOI3sourceResistance != 0) { here->SOI3sourceConductance = 1/model->SOI3sourceResistance; } else { here->SOI3sourceConductance = 0; } } else if (model->SOI3sheetResistanceGiven) { if(model->SOI3sheetResistance != 0) { here->SOI3sourceConductance = 1/(model->SOI3sheetResistance*here->SOI3sourceSquares); } else { here->SOI3sourceConductance = 0; } } else if(model->SOI3rswGiven) { if (model->SOI3rsw != 0) { /* JimB - 1e6 multiplying factor converts W from m to microns */ here->SOI3sourceConductance = (here->SOI3w/model->SOI3rsw)*1e6; } else { here->SOI3sourceConductance = 0; } } else { here->SOI3sourceConductance = 0; } /* extra stuff for newer model - msll Jan96 */ } /* finish looping through all instances of the model*/ } /* finish looping through all the transistor models */ return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3mdel.c0000644000265600020320000000311112264261473020770 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { SOI3model **model = (SOI3model **)inModel; SOI3model *modfast = (SOI3model *)kill; SOI3instance *here; SOI3instance *prev = NULL; SOI3model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->SOI3nextModel)) { if( (*model)->SOI3modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->SOI3nextModel; /* cut deleted device out of list */ for(here = (*model)->SOI3instances ; here ; here = here->SOI3nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3ask.c0000644000265600020320000005324212264261473020637 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int SOI3ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { SOI3instance *here = (SOI3instance*)inst; NG_IGNORE(select); /* The line below belong to the parts of the case statement that are also * commented out */ /* double vr; */ /* double vi; */ /* double sr; */ /* double si; */ /* double vm; */ /* static char *msg = "Current and power not available for ac analysis"; */ switch(which) { case SOI3_L: value->rValue = here->SOI3l; return(OK); case SOI3_W: value->rValue = here->SOI3w; return(OK); case SOI3_M: value->rValue = here->SOI3m; return(OK); case SOI3_AS: value->rValue = here->SOI3as; return(OK); case SOI3_AD: value->rValue = here->SOI3ad; return(OK); case SOI3_AB: value->rValue = here->SOI3ab; return(OK); case SOI3_NRS: value->rValue = here->SOI3sourceSquares; return(OK); case SOI3_NRD: value->rValue = here->SOI3drainSquares; return(OK); case SOI3_OFF: value->rValue = here->SOI3off; return(OK); case SOI3_IC_VDS: value->rValue = here->SOI3icVDS; return(OK); case SOI3_IC_VGFS: value->rValue = here->SOI3icVGFS; return(OK); case SOI3_IC_VGBS: value->rValue = here->SOI3icVGBS; return(OK); case SOI3_IC_VBS: value->rValue = here->SOI3icVBS; return(OK); case SOI3_TEMP: value->rValue = here->SOI3temp-CONSTCtoK; return(OK); case SOI3_RT: value->rValue = here->SOI3rt; value->rValue /= here->SOI3m; return(OK); case SOI3_CT: value->rValue = here->SOI3ct; value->rValue *= here->SOI3m; return(OK); case SOI3_DNODE: value->iValue = here->SOI3dNode; return(OK); case SOI3_GFNODE: value->iValue = here->SOI3gfNode; return(OK); case SOI3_SNODE: value->iValue = here->SOI3sNode; return(OK); case SOI3_GBNODE: value->iValue = here->SOI3gbNode; return(OK); case SOI3_BNODE: value->iValue = here->SOI3bNode; return(OK); case SOI3_DNODEPRIME: value->iValue = here->SOI3dNodePrime; return(OK); case SOI3_SNODEPRIME: value->iValue = here->SOI3sNodePrime; return(OK); case SOI3_TNODE: value->iValue = here->SOI3toutNode; return(OK); case SOI3_BRANCH: value->iValue = here->SOI3branch; return(OK); case SOI3_SOURCECONDUCT: value->rValue = here->SOI3sourceConductance; value->rValue *= here->SOI3m; return(OK); case SOI3_DRAINCONDUCT: value->rValue = here->SOI3drainConductance; value->rValue *= here->SOI3m; return(OK); case SOI3_VON: value->rValue = here->SOI3tVto; return(OK); case SOI3_VFBF: value->rValue = here->SOI3tVfbF; return(OK); case SOI3_VDSAT: value->rValue = here->SOI3vdsat; return(OK); case SOI3_SOURCEVCRIT: value->rValue = here->SOI3sourceVcrit; return(OK); case SOI3_DRAINVCRIT: value->rValue = here->SOI3drainVcrit; return(OK); case SOI3_ID: value->rValue = here->SOI3id; value->rValue *= here->SOI3m; return(OK); case SOI3_IBS: value->rValue = here->SOI3ibs; value->rValue *= here->SOI3m; return(OK); case SOI3_IBD: value->rValue = here->SOI3ibd; value->rValue *= here->SOI3m; return(OK); case SOI3_GMBS: value->rValue = here->SOI3gmbs; value->rValue *= here->SOI3m; return(OK); case SOI3_GMF: value->rValue = here->SOI3gmf; value->rValue *= here->SOI3m; return(OK); case SOI3_GMB: value->rValue = here->SOI3gmb; value->rValue *= here->SOI3m; return(OK); case SOI3_GDS: value->rValue = here->SOI3gds; value->rValue *= here->SOI3m; return(OK); case SOI3_GBD: value->rValue = here->SOI3gbd; value->rValue *= here->SOI3m; return(OK); case SOI3_GBS: value->rValue = here->SOI3gbs; value->rValue *= here->SOI3m; return(OK); case SOI3_CAPBD: value->rValue = here->SOI3capbd; value->rValue *= here->SOI3m; return(OK); case SOI3_CAPBS: value->rValue = here->SOI3capbs; value->rValue *= here->SOI3m; return(OK); case SOI3_CAPZEROBIASBD: value->rValue = here->SOI3Cbd; value->rValue *= here->SOI3m; return(OK); case SOI3_CAPZEROBIASBS: value->rValue = here->SOI3Cbs; value->rValue *= here->SOI3m; return(OK); case SOI3_VBD: value->rValue = *(ckt->CKTstate0 + here->SOI3vbd); return(OK); case SOI3_VBS: value->rValue = *(ckt->CKTstate0 + here->SOI3vbs); return(OK); case SOI3_VGFS: value->rValue = *(ckt->CKTstate0 + here->SOI3vgfs); return(OK); case SOI3_VGBS: value->rValue = *(ckt->CKTstate0 + here->SOI3vgbs); return(OK); case SOI3_VDS: value->rValue = *(ckt->CKTstate0 + here->SOI3vds); return(OK); case SOI3_QGF: value->rValue = *(ckt->CKTstate0 + here->SOI3qgf); value->rValue *= here->SOI3m; return(OK); case SOI3_IQGF: value->rValue = *(ckt->CKTstate0 + here->SOI3iqgf); value->rValue *= here->SOI3m; return(OK); case SOI3_QD: value->rValue = *(ckt->CKTstate0 + here->SOI3qd); value->rValue *= here->SOI3m; return(OK); case SOI3_IQD: value->rValue = *(ckt->CKTstate0 + here->SOI3iqd); value->rValue *= here->SOI3m; return(OK); case SOI3_QS: value->rValue = *(ckt->CKTstate0 + here->SOI3qs); value->rValue *= here->SOI3m; return(OK); case SOI3_IQS: value->rValue = *(ckt->CKTstate0 + here->SOI3iqs); value->rValue *= here->SOI3m; return(OK); case SOI3_CGFGF: value->rValue = *(ckt->CKTstate0 + here->SOI3cgfgf); value->rValue *= here->SOI3m; return (OK); case SOI3_CGFD: value->rValue = *(ckt->CKTstate0 + here->SOI3cgfd); value->rValue *= here->SOI3m; return (OK); case SOI3_CGFS: value->rValue = *(ckt->CKTstate0 + here->SOI3cgfs); value->rValue *= here->SOI3m; return (OK); case SOI3_CGFDELTAT: value->rValue = *(ckt->CKTstate0 + here->SOI3cgfdeltaT); value->rValue *= here->SOI3m; return (OK); case SOI3_CGFGB: value->rValue = *(ckt->CKTstate0 + here->SOI3cgfgb); value->rValue *= here->SOI3m; return (OK); case SOI3_CDGF: value->rValue = *(ckt->CKTstate0 + here->SOI3cdgf); value->rValue *= here->SOI3m; return (OK); case SOI3_CDD: value->rValue = *(ckt->CKTstate0 + here->SOI3cdd); value->rValue *= here->SOI3m; return (OK); case SOI3_CDS: value->rValue = *(ckt->CKTstate0 + here->SOI3cds); value->rValue *= here->SOI3m; return (OK); case SOI3_CDDELTAT: value->rValue = *(ckt->CKTstate0 + here->SOI3cddeltaT); value->rValue *= here->SOI3m; return (OK); case SOI3_CDGB: value->rValue = *(ckt->CKTstate0 + here->SOI3cdgb); value->rValue *= here->SOI3m; return (OK); case SOI3_CSGF: value->rValue = *(ckt->CKTstate0 + here->SOI3csgf); value->rValue *= here->SOI3m; return (OK); case SOI3_CSD: value->rValue = *(ckt->CKTstate0 + here->SOI3csd); value->rValue *= here->SOI3m; return (OK); case SOI3_CSS: value->rValue = *(ckt->CKTstate0 + here->SOI3css); value->rValue *= here->SOI3m; return (OK); case SOI3_CSDELTAT: value->rValue = *(ckt->CKTstate0 + here->SOI3csdeltaT); value->rValue *= here->SOI3m; return (OK); case SOI3_CSGB: value->rValue = *(ckt->CKTstate0 + here->SOI3csgb); value->rValue *= here->SOI3m; return (OK); case SOI3_CGBGF: value->rValue = *(ckt->CKTstate0 + here->SOI3cgbgf); value->rValue *= here->SOI3m; return (OK); case SOI3_CGBD: value->rValue = *(ckt->CKTstate0 + here->SOI3cgbd); value->rValue *= here->SOI3m; return (OK); case SOI3_CGBS: value->rValue = *(ckt->CKTstate0 + here->SOI3cgbs); value->rValue *= here->SOI3m; return (OK); case SOI3_CGBDELTAT: value->rValue = *(ckt->CKTstate0 + here->SOI3cgbdeltaT); value->rValue *= here->SOI3m; return (OK); case SOI3_CGBGB: value->rValue = *(ckt->CKTstate0 + here->SOI3cgbgb); value->rValue *= here->SOI3m; return (OK); case SOI3_QBD: value->rValue = *(ckt->CKTstate0 + here->SOI3qbd); value->rValue *= here->SOI3m; return(OK); case SOI3_IQBD: value->rValue = *(ckt->CKTstate0 + here->SOI3iqbd); value->rValue *= here->SOI3m; return(OK); case SOI3_QBS: value->rValue = *(ckt->CKTstate0 + here->SOI3qbs); value->rValue *= here->SOI3m; return(OK); case SOI3_IQBS: value->rValue = *(ckt->CKTstate0 + here->SOI3iqbs); value->rValue *= here->SOI3m; return(OK); /* extra stuff for newer model - msll Jan96 */ case SOI3_VFBB: value->rValue = here->SOI3tVfbB; return(OK); case SOI3_RT1: value->rValue = here->SOI3rt1; value->rValue /= here->SOI3m; return(OK); case SOI3_CT1: value->rValue = here->SOI3ct1; value->rValue *= here->SOI3m; return(OK); case SOI3_RT2: value->rValue = here->SOI3rt2; value->rValue /= here->SOI3m; return(OK); case SOI3_CT2: value->rValue = here->SOI3ct2; value->rValue *= here->SOI3m; return(OK); case SOI3_RT3: value->rValue = here->SOI3rt3; value->rValue /= here->SOI3m; return(OK); case SOI3_CT3: value->rValue = here->SOI3ct3; value->rValue *= here->SOI3m; return(OK); case SOI3_RT4: value->rValue = here->SOI3rt4; value->rValue /= here->SOI3m; return(OK); case SOI3_CT4: value->rValue = here->SOI3ct4; value->rValue *= here->SOI3m; return(OK); /* case SOI3_L_SENS_DC: if(ckt->CKTsenInfo && here->SOI3sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->SOI3senParmNo); } return(OK); case SOI3_L_SENS_REAL: if(ckt->CKTsenInfo && here->SOI3sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo); } return(OK); case SOI3_L_SENS_IMAG: if(ckt->CKTsenInfo && here->SOI3sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo); } return(OK); case SOI3_L_SENS_MAG: if(ckt->CKTsenInfo && here->SOI3sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case SOI3_L_SENS_PH: if(ckt->CKTsenInfo && here->SOI3sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case SOI3_L_SENS_CPLX: if(ckt->CKTsenInfo && here->SOI3sens_l){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo); } return(OK); case SOI3_W_SENS_DC: if(ckt->CKTsenInfo && here->SOI3sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); } return(OK); case SOI3_W_SENS_REAL: if(ckt->CKTsenInfo && here->SOI3sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); } return(OK); case SOI3_W_SENS_IMAG: if(ckt->CKTsenInfo && here->SOI3sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); } return(OK); case SOI3_W_SENS_MAG: if(ckt->CKTsenInfo && here->SOI3sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case SOI3_W_SENS_PH: if(ckt->CKTsenInfo && here->SOI3sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case SOI3_W_SENS_CPLX: if(ckt->CKTsenInfo && here->SOI3sens_w){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->SOI3senParmNo + here->SOI3sens_l); } return(OK); */ /* case SOI3_IS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SOI3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->SOI3id; value->rValue -= here->SOI3ibd + here->SOI3ibs - *(ckt->CKTstate0 + here->SOI3iqgfb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->SOI3iqgfb) + *(ckt->CKTstate0 + here->SOI3iqgfd) + *(ckt->CKTstate0 + here->SOI3iqgfs); } } return(OK); case SOI3_IB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SOI3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->SOI3ibd + here->SOI3ibs - *(ckt->CKTstate0 + here->SOI3iqgfb); } return(OK); case SOI3_IGF : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SOI3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->SOI3iqgfb) + *(ckt->CKTstate0 + here->SOI3iqgfd) + *(ckt->CKTstate0 + here->SOI3iqgfs); } return(OK); case SOI3_IGB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SOI3ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->SOI3iqgfb) + *(ckt->CKTstate0 + here->SOI3iqgfd) + *(ckt->CKTstate0 + here->SOI3iqgfs); } return(OK); case SOI3_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SOI3ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->SOI3id * *(ckt->CKTrhsOld + here->SOI3dNode); value->rValue += ((here->SOI3ibd + here->SOI3ibs) - *(ckt->CKTstate0 + here->SOI3iqgfb)) * *(ckt->CKTrhsOld + here->SOI3bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->SOI3iqgfb) + *(ckt->CKTstate0 + here->SOI3iqgfd) + *(ckt->CKTstate0 + here->SOI3iqgfs)) * *(ckt->CKTrhsOld + here->SOI3gfNode); } temp = -here->SOI3id; temp -= here->SOI3ibd + here->SOI3ibs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->SOI3iqgfb) + *(ckt->CKTstate0 + here->SOI3iqgfd) + *(ckt->CKTstate0 + here->SOI3iqgfs); } value->rValue += temp * *(ckt->CKTrhsOld + here->SOI3sNode); } return(OK); */ default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/soi3/README0000644000265600020320000000453212264261473017775 0ustar andreasadminLicence Agreement (STAG) from DERA 1. The STAG Computer Model is subject to Copyright owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency (DERA). It is made available to licensee (hereinafter LICENSEE) on the following conditions:- 2. Downloading the STAG Model deems acceptance of the terms of the licence. 3. DERA grants to LICENSEE a royalty free non-exclusive licence to use the furnished STAG Model. LICENSEE is permitted to copy, distribute, and transfer the STAG Model to customers for their royalty free use on the same licence terms. 4. LICENSEE acknowledges that STAG is a research tool still in the development stage, that it is being supplied "as is", without any accompanying services or improvements from DERA. 5. LICENSEE acknowledges that STAG is a Model developed by the Department of Electronics and Computer Science at the University of Southampton (UOS), England, and is incorporated within SPICE 3f5, a program developed by the Department of Electrical Engineering and Computer Science at the University of California, Berkeley, California (UCB). As such, LICENSEE acknowledges that in addition to the rights licensed by DERA, UCB itself imposes restrictions on use, copying, and distribution of the SPICE 3f5 program and its derivatives. 6. LICENSEE undertakes to obtain any separate licence required for the use of SPICE 3f5 from UCB. 7. DERA make no representations or warranties, express or implied. DERA shall not be held liable for any liability nor for any direct, indirect, or consequential damages with respect to any claim by LICENSEE or any third party on account of or arising from this Agreement or use of STAG. 8. Title to copyright of all portions of STAG developed at UOS and/or DERA together with associated documentation shall at all times remain with DERA, and LICENSEE agrees to preserve same. LICENSEE agrees to ensure that this information and appropriate copyright notice is reproduced with any copies of STAG or any modified versions derived from it. 9. This agreement shall be construed, interpreted, and applied in accordance with the laws of England. for DERA by: J B EDWARDS IPD5A 10 NOV 1997 Intellectual Property Department Defence Evaluation and Research Agency St Andrews Road Malvern WR14 3PS United Kingdom phone: +44 - 1684 - 894234 fax: +44 - 1684 - 894146 ngspice-26/src/spicelib/devices/soi3/soi3mpar.c0000644000265600020320000003327112264261473021020 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3mParam(int param, IFvalue *value, GENmodel *inModel) { register SOI3model *model = (SOI3model *)inModel; switch(param) { case SOI3_MOD_VTO: model->SOI3vt0 = value->rValue; model->SOI3vt0Given = TRUE; break; case SOI3_MOD_VFBF: model->SOI3vfbF = value->rValue; model->SOI3vfbFGiven = TRUE; break; case SOI3_MOD_KP: model->SOI3transconductance = value->rValue; model->SOI3transconductanceGiven = TRUE; break; case SOI3_MOD_GAMMA: model->SOI3gamma = value->rValue; model->SOI3gammaGiven = TRUE; break; case SOI3_MOD_PHI: model->SOI3phi = value->rValue; model->SOI3phiGiven = TRUE; break; case SOI3_MOD_LAMBDA: model->SOI3lambda = value->rValue; model->SOI3lambdaGiven = TRUE; break; case SOI3_MOD_THETA: model->SOI3theta = value->rValue; model->SOI3thetaGiven = TRUE; break; case SOI3_MOD_RD: model->SOI3drainResistance = value->rValue; model->SOI3drainResistanceGiven = TRUE; break; case SOI3_MOD_RS: model->SOI3sourceResistance = value->rValue; model->SOI3sourceResistanceGiven = TRUE; break; case SOI3_MOD_CBD: model->SOI3capBD = value->rValue; model->SOI3capBDGiven = TRUE; break; case SOI3_MOD_CBS: model->SOI3capBS = value->rValue; model->SOI3capBSGiven = TRUE; break; case SOI3_MOD_IS: model->SOI3jctSatCur = value->rValue; model->SOI3jctSatCurGiven = TRUE; break; case SOI3_MOD_IS1: model->SOI3jctSatCur1 = value->rValue; model->SOI3jctSatCur1Given = TRUE; break; case SOI3_MOD_PB: model->SOI3bulkJctPotential = value->rValue; model->SOI3bulkJctPotentialGiven = TRUE; break; case SOI3_MOD_CGFSO: model->SOI3frontGateSourceOverlapCapFactor = value->rValue; model->SOI3frontGateSourceOverlapCapFactorGiven = TRUE; break; case SOI3_MOD_CGFDO: model->SOI3frontGateDrainOverlapCapFactor = value->rValue; model->SOI3frontGateDrainOverlapCapFactorGiven = TRUE; break; case SOI3_MOD_CGFBO: model->SOI3frontGateBulkOverlapCapFactor = value->rValue; model->SOI3frontGateBulkOverlapCapFactorGiven = TRUE; break; case SOI3_MOD_CGBSO: model->SOI3backGateSourceOverlapCapAreaFactor = value->rValue; model->SOI3backGateSourceOverlapCapAreaFactorGiven = TRUE; break; case SOI3_MOD_CGBDO: model->SOI3backGateDrainOverlapCapAreaFactor = value->rValue; model->SOI3backGateDrainOverlapCapAreaFactorGiven = TRUE; break; case SOI3_MOD_CGBBO: model->SOI3backGateBulkOverlapCapAreaFactor = value->rValue; model->SOI3backGateBulkOverlapCapAreaFactorGiven = TRUE; break; /* case SOI3_MOD_CJ: model->SOI3bulkCapFactor = value->rValue; model->SOI3bulkCapFactorGiven = TRUE; break; case SOI3_MOD_MJ: model->SOI3bulkJctBotGradingCoeff = value->rValue; model->SOI3bulkJctBotGradingCoeffGiven = TRUE; break; */ case SOI3_MOD_RSH: model->SOI3sheetResistance = value->rValue; model->SOI3sheetResistanceGiven = TRUE; break; case SOI3_MOD_CJSW: model->SOI3sideWallCapFactor = value->rValue; model->SOI3sideWallCapFactorGiven = TRUE; break; case SOI3_MOD_MJSW: model->SOI3bulkJctSideGradingCoeff = value->rValue; model->SOI3bulkJctSideGradingCoeffGiven = TRUE; break; case SOI3_MOD_JS: model->SOI3jctSatCurDensity = value->rValue; model->SOI3jctSatCurDensityGiven = TRUE; break; case SOI3_MOD_JS1: model->SOI3jctSatCurDensity1 = value->rValue; model->SOI3jctSatCurDensity1Given = TRUE; break; case SOI3_MOD_TOF: model->SOI3frontOxideThickness = value->rValue; model->SOI3frontOxideThicknessGiven = TRUE; break; case SOI3_MOD_TOB: model->SOI3backOxideThickness = value->rValue; model->SOI3backOxideThicknessGiven = TRUE; break; case SOI3_MOD_TB: model->SOI3bodyThickness = value->rValue; model->SOI3bodyThicknessGiven = TRUE; break; case SOI3_MOD_LD: model->SOI3latDiff = value->rValue; model->SOI3latDiffGiven = TRUE; break; case SOI3_MOD_U0: model->SOI3surfaceMobility = value->rValue; model->SOI3surfaceMobilityGiven = TRUE; break; case SOI3_MOD_FC: model->SOI3fwdCapDepCoeff = value->rValue; model->SOI3fwdCapDepCoeffGiven = TRUE; break; case SOI3_MOD_NSOI3: if(value->iValue) { model->SOI3type = 1; model->SOI3typeGiven = TRUE; } break; case SOI3_MOD_PSOI3: if(value->iValue) { model->SOI3type = -1; model->SOI3typeGiven = TRUE; } break; case SOI3_MOD_KOX: model->SOI3oxideThermalConductivity = value->rValue; model->SOI3oxideThermalConductivityGiven = TRUE; break; case SOI3_MOD_SHSI: model->SOI3siliconSpecificHeat = value->rValue; model->SOI3siliconSpecificHeatGiven = TRUE; break; case SOI3_MOD_DSI: model->SOI3siliconDensity = value->rValue; model->SOI3siliconDensityGiven = TRUE; break; case SOI3_MOD_NSUB: model->SOI3substrateDoping = value->rValue; model->SOI3substrateDopingGiven = TRUE; break; case SOI3_MOD_TPG: model->SOI3gateType = value->iValue; model->SOI3gateTypeGiven = TRUE; break; case SOI3_MOD_NQFF: model->SOI3frontFixedChargeDensity = value->rValue; model->SOI3frontFixedChargeDensityGiven = TRUE; break; case SOI3_MOD_NQFB: model->SOI3backFixedChargeDensity = value->rValue; model->SOI3backFixedChargeDensityGiven = TRUE; break; case SOI3_MOD_NSSF: model->SOI3frontSurfaceStateDensity = value->rValue; model->SOI3frontSurfaceStateDensityGiven = TRUE; break; case SOI3_MOD_NSSB: model->SOI3backSurfaceStateDensity = value->rValue; model->SOI3backSurfaceStateDensityGiven = TRUE; break; case SOI3_MOD_TNOM: model->SOI3tnom = value->rValue+CONSTCtoK; model->SOI3tnomGiven = TRUE; break; case SOI3_MOD_KF: model->SOI3fNcoef = value->rValue; model->SOI3fNcoefGiven = TRUE; break; case SOI3_MOD_AF: model->SOI3fNexp = value->rValue; model->SOI3fNexpGiven = TRUE; break; /* extra stuff for newer model - msll Jan96 */ case SOI3_MOD_SIGMA: model->SOI3sigma = value->rValue; model->SOI3sigmaGiven = TRUE; break; case SOI3_MOD_CHIFB: model->SOI3chiFB = value->rValue; model->SOI3chiFBGiven = TRUE; break; case SOI3_MOD_CHIPHI: model->SOI3chiPHI = value->rValue; model->SOI3chiPHIGiven = TRUE; break; case SOI3_MOD_DELTAW: model->SOI3deltaW = value->rValue; model->SOI3deltaWGiven = TRUE; break; case SOI3_MOD_DELTAL: model->SOI3deltaL = value->rValue; model->SOI3deltaLGiven = TRUE; break; case SOI3_MOD_VSAT: model->SOI3vsat = value->rValue; model->SOI3vsatGiven = TRUE; break; case SOI3_MOD_K: model->SOI3k = value->rValue; model->SOI3kGiven = TRUE; break; case SOI3_MOD_LX: model->SOI3lx = value->rValue; model->SOI3lxGiven = TRUE; break; case SOI3_MOD_VP: model->SOI3vp = value->rValue; model->SOI3vpGiven = TRUE; break; case SOI3_MOD_ETA: model->SOI3eta = value->rValue; model->SOI3etaGiven = TRUE; break; case SOI3_MOD_ALPHA0: model->SOI3alpha0 = value->rValue; model->SOI3alpha0Given = TRUE; break; case SOI3_MOD_BETA0: model->SOI3beta0 = value->rValue; model->SOI3beta0Given = TRUE; break; case SOI3_MOD_LM: model->SOI3lm = value->rValue; model->SOI3lmGiven = TRUE; break; case SOI3_MOD_LM1: model->SOI3lm1 = value->rValue; model->SOI3lm1Given = TRUE; break; case SOI3_MOD_LM2: model->SOI3lm2 = value->rValue; model->SOI3lm2Given = TRUE; break; case SOI3_MOD_ETAD: model->SOI3etad = value->rValue; model->SOI3etadGiven = TRUE; break; case SOI3_MOD_ETAD1: model->SOI3etad1 = value->rValue; model->SOI3etad1Given = TRUE; break; case SOI3_MOD_CHIBETA: model->SOI3chibeta = value->rValue; model->SOI3chibetaGiven = TRUE; break; case SOI3_MOD_VFBB: model->SOI3vfbB = value->rValue; model->SOI3vfbBGiven = TRUE; break; case SOI3_MOD_GAMMAB: model->SOI3gammaB = value->rValue; model->SOI3gammaBGiven = TRUE; break; case SOI3_MOD_CHID: model->SOI3chid = value->rValue; model->SOI3chidGiven = TRUE; break; case SOI3_MOD_CHID1: model->SOI3chid1 = value->rValue; model->SOI3chid1Given = TRUE; break; case SOI3_MOD_DVT: model->SOI3dvt = value->iValue; model->SOI3dvtGiven = TRUE; break; case SOI3_MOD_NLEV: model->SOI3nLev = value->iValue; model->SOI3nLevGiven = TRUE; break; case SOI3_MOD_BETABJT: model->SOI3betaBJT = value->rValue; model->SOI3betaBJTGiven = TRUE; break; case SOI3_MOD_TAUFBJT: model->SOI3tauFBJT = value->rValue; model->SOI3tauFBJTGiven = TRUE; break; case SOI3_MOD_TAURBJT: model->SOI3tauRBJT = value->rValue; model->SOI3tauRBJTGiven = TRUE; break; case SOI3_MOD_BETAEXP: model->SOI3betaEXP = value->rValue; model->SOI3betaEXPGiven = TRUE; break; case SOI3_MOD_TAUEXP: model->SOI3tauEXP = value->rValue; model->SOI3tauEXPGiven = TRUE; break; case SOI3_MOD_RSW: model->SOI3rsw = value->rValue; model->SOI3rswGiven = TRUE; break; case SOI3_MOD_RDW: model->SOI3rdw = value->rValue; model->SOI3rdwGiven = TRUE; break; case SOI3_MOD_FMIN: model->SOI3minimumFeatureSize = value->rValue; model->SOI3minimumFeatureSizeGiven = TRUE; break; case SOI3_MOD_VTEX: model->SOI3vtex = value->rValue; model->SOI3vtexGiven = TRUE; break; case SOI3_MOD_VDEX: model->SOI3vdex = value->rValue; model->SOI3vdexGiven = TRUE; break; case SOI3_MOD_DELTA0: model->SOI3delta0 = value->rValue; model->SOI3delta0Given = TRUE; break; case SOI3_MOD_CSF: model->SOI3satChargeShareFactor = value->rValue; model->SOI3satChargeShareFactorGiven = TRUE; break; case SOI3_MOD_NPLUS: model->SOI3nplusDoping = value->rValue; model->SOI3nplusDopingGiven = TRUE; break; case SOI3_MOD_RTA: model->SOI3rta = value->rValue; model->SOI3rtaGiven = TRUE; break; case SOI3_MOD_CTA: model->SOI3cta = value->rValue; model->SOI3ctaGiven = TRUE; break; case SOI3_MOD_MEXP: model->SOI3mexp = value->rValue; model->SOI3mexpGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/soi3/soi3ext.h0000644000265600020320000000612512264261473020664 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ extern int SOI3acLoad(GENmodel *,CKTcircuit*); extern int SOI3ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int SOI3delete(GENmodel*,IFuid,GENinstance**); extern void SOI3destroy(GENmodel**); extern int SOI3getic(GENmodel*,CKTcircuit*); extern int SOI3load(GENmodel*,CKTcircuit*); extern int SOI3mAsk(CKTcircuit *,GENmodel *,int,IFvalue*); extern int SOI3mDelete(GENmodel**,IFuid,GENmodel*); extern int SOI3mParam(int,IFvalue*,GENmodel*); extern void SOI3cap(double,double,double, double*,double*,double*,double*, double*,double*,double*,double*, double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*); extern void SOI3capEval(CKTcircuit*,double*,double*, double,double,double,double,double, double,double,double,double,double, double,double,double,double,double, double,double,double,double,double, double,double,double,double,double, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*, double*,double*,double*,double*,double*); extern int SOI3param(int,IFvalue*,GENinstance*,IFvalue*); /* extern int SOI3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); | extern int SOI3sAcLoad(GENmodel*,CKTcircuit*); | extern int SOI3sLoad(GENmodel*,CKTcircuit*); | Ignored extern void SOI3sPrint(GENmodel*,CKTcircuit*); | extern int SOI3sSetup(SENstruct*,GENmodel*); | extern int SOI3sUpdate(GENmodel*,CKTcircuit*); | */ extern int SOI3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int SOI3unsetup(GENmodel*,CKTcircuit*); extern int SOI3temp(GENmodel*,CKTcircuit*); extern int SOI3trunc(GENmodel*,CKTcircuit*,double*); extern int SOI3convTest(GENmodel*,CKTcircuit*); /* extern int SOI3disto(int,GENmodel*,CKTcircuit*); */ extern int SOI3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); ngspice-26/src/spicelib/devices/soi3/soi3acld.c0000644000265600020320000004600112264261473020757 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3acLoad(GENmodel *inModel, CKTcircuit *ckt) { SOI3model *model = (SOI3model*)inModel; SOI3instance *here; int xnrm; int xrev; double cgfgf,cgfd,cgfs,cgfdeltaT,cgfgb; double cdgf,cdd,cds,cddeltaT,cdgb; double csgf,csd,css,csdeltaT,csgb; double cbgf,cbd,cbs,cbdeltaT,cbgb; double cgbgf,cgbd,cgbs,cgbdeltaT,cgbgb; double xcgfgf,xcgfd,xcgfs,xcgfdeltaT,xcgfgb; double xcdgf,xcdd,xcds,xcddeltaT,xcdgb; double xcsgf,xcsd,xcss,xcsdeltaT,xcsgb; double xcbgf,xcbd,xcbs,xcbdeltaT,xcbgb; double xcgbgf,xcgbd,xcgbs,xcgbdeltaT,xcgbgb; double capbd,capbs; /* diode capacitances */ double xcBJTbsbs,xcBJTbsdeltaT; double xcBJTbdbd,xcBJTbddeltaT; double rtargs[5]; double grt[5]; double ctargs[5]; double xct[5]; /* 1/reactance of thermal cap */ int tnodeindex; double cgfb0; double cgfd0; double cgfs0; double cgbb0; double cgbd0; double cgbs0; double EffectiveLength; double omega; double m; omega = ckt->CKTomega; for( ; model != NULL; model = model->SOI3nextModel) { for(here = model->SOI3instances; here!= NULL; here = here->SOI3nextInstance) { if (here->SOI3mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } EffectiveLength=here->SOI3l - 2*model->SOI3latDiff; /* JimB - can use basic device geometry to estimate front and back */ /* overlap capacitances to a first approximation. Use this default */ /* model if capacitance factors aren't given in model netlist. */ /* Calculate front gate overlap capacitances. */ if(model->SOI3frontGateSourceOverlapCapFactorGiven) { cgfs0 = model->SOI3frontGateSourceOverlapCapFactor * here->SOI3w; } else { cgfs0 = model->SOI3latDiff * here->SOI3w * model->SOI3frontOxideCapFactor; } if(model->SOI3frontGateDrainOverlapCapFactorGiven) { cgfd0 = model->SOI3frontGateDrainOverlapCapFactor * here->SOI3w; } else { cgfd0 = model->SOI3latDiff * here->SOI3w * model->SOI3frontOxideCapFactor; } if(model->SOI3frontGateBulkOverlapCapFactorGiven) { cgfb0 = model->SOI3frontGateBulkOverlapCapFactor * EffectiveLength; } else { cgfb0 = EffectiveLength * (0.1*1e-6*model->SOI3minimumFeatureSize) * model->SOI3frontOxideCapFactor; } /* Calculate back gate overlap capacitances. */ if( (model->SOI3backGateSourceOverlapCapAreaFactorGiven) && (!model->SOI3backGateSourceOverlapCapAreaFactor || here->SOI3asGiven) ) { cgbs0 = model->SOI3backGateSourceOverlapCapAreaFactor * here->SOI3as; } else { cgbs0 = (2*1e-6*model->SOI3minimumFeatureSize + model->SOI3latDiff) * here->SOI3w * model->SOI3backOxideCapFactor; } if( (model->SOI3backGateDrainOverlapCapAreaFactorGiven) && (!model->SOI3backGateDrainOverlapCapAreaFactor || here->SOI3adGiven) ) { cgbd0 = model->SOI3backGateDrainOverlapCapAreaFactor * here->SOI3ad; } else { cgbd0 = (2*1e-6*model->SOI3minimumFeatureSize + model->SOI3latDiff) * here->SOI3w * model->SOI3backOxideCapFactor; } if( (model->SOI3backGateBulkOverlapCapAreaFactorGiven) && (!model->SOI3backGateBulkOverlapCapAreaFactor || here->SOI3abGiven) ) { cgbb0 = model->SOI3backGateBulkOverlapCapAreaFactor * here->SOI3ab; } else { cgbb0 = EffectiveLength * (0.1*1e-6*model->SOI3minimumFeatureSize + here->SOI3w) * model->SOI3backOxideCapFactor; } capbd = here->SOI3capbd; capbs = here->SOI3capbs; cgfgf = *(ckt->CKTstate0 + here->SOI3cgfgf); cgfd = *(ckt->CKTstate0 + here->SOI3cgfd); cgfs = *(ckt->CKTstate0 + here->SOI3cgfs); cgfdeltaT = *(ckt->CKTstate0 + here->SOI3cgfdeltaT); cgfgb = *(ckt->CKTstate0 + here->SOI3cgfgb); csgf = *(ckt->CKTstate0 + here->SOI3csgf); csd = *(ckt->CKTstate0 + here->SOI3csd); css = *(ckt->CKTstate0 + here->SOI3css); csdeltaT = *(ckt->CKTstate0 + here->SOI3csdeltaT); csgb = *(ckt->CKTstate0 + here->SOI3csgb); cdgf = *(ckt->CKTstate0 + here->SOI3cdgf); cdd = *(ckt->CKTstate0 + here->SOI3cdd); cds = *(ckt->CKTstate0 + here->SOI3cds); cddeltaT = *(ckt->CKTstate0 + here->SOI3cddeltaT); cdgb = *(ckt->CKTstate0 + here->SOI3cdgb); cgbgf = *(ckt->CKTstate0 + here->SOI3cgbgf); cgbd = *(ckt->CKTstate0 + here->SOI3cgbd); cgbs = *(ckt->CKTstate0 + here->SOI3cgbs); cgbdeltaT = *(ckt->CKTstate0 + here->SOI3cgbdeltaT); cgbgb = *(ckt->CKTstate0 + here->SOI3cgbgb); cbgf = -(cgfgf + cdgf + csgf + cgbgf); cbd = -(cgfd + cdd + csd + cgbd); cbs = -(cgfs + cds + css + cgbs); cbdeltaT = -(cgfdeltaT + cddeltaT + csdeltaT + cgbdeltaT); cbgb = -(cgfgb + cdgb + csgb + cgbgb); xcgfgf = (cgfgf + cgfd0 + cgfs0 + cgfb0) * omega; xcgfd = (cgfd - cgfd0) * omega; xcgfs = (cgfs - cgfs0) * omega; xcgfdeltaT = cgfdeltaT * omega; xcgfgb = cgfgb * omega; xcdgf = (cdgf - cgfd0) * omega; xcdd = (cdd + capbd + cgfd0 + cgbd0) * omega; xcds = cds * omega; xcddeltaT = cddeltaT * omega; xcdgb = (cdgb - cgbd0) * omega; xcsgf = (csgf - cgfs0) * omega; xcsd = csd * omega; xcss = (css + capbs + cgfs0 + cgbs0) * omega; xcsdeltaT = csdeltaT * omega; xcsgb = (csgb - cgbs0) * omega; xcbgf = (cbgf - cgfb0) * omega; xcbd = (cbd - capbd) * omega; xcbs = (cbs - capbs) * omega; xcbdeltaT = cbdeltaT * omega; xcbgb = (cbgb - cgbb0) * omega; xcgbgf = cgbgf * omega; xcgbd = (cgbd - cgbd0) * omega; xcgbs = (cgbs - cgbs0) * omega; xcgbdeltaT = cgbdeltaT * omega; xcgbgb = (cgbgb + cgbd0 + cgbs0 + cgbb0) * omega; xcBJTbsbs = *(ckt->CKTstate0 + here->SOI3cBJTbsbs) * omega; xcBJTbsdeltaT = *(ckt->CKTstate0 + here->SOI3cBJTbsdeltaT) * omega; xcBJTbdbd = *(ckt->CKTstate0 + here->SOI3cBJTbdbd) * omega; xcBJTbddeltaT = *(ckt->CKTstate0 + here->SOI3cBJTbddeltaT) * omega; /* JimB - 15/9/99 */ /* Code for multiple thermal time constants. Start by moving all */ /* rt and ct constants into arrays. */ rtargs[0]=here->SOI3rt; rtargs[1]=here->SOI3rt1; rtargs[2]=here->SOI3rt2; rtargs[3]=here->SOI3rt3; rtargs[4]=here->SOI3rt4; ctargs[0]=here->SOI3ct; ctargs[1]=here->SOI3ct1; ctargs[2]=here->SOI3ct2; ctargs[3]=here->SOI3ct3; ctargs[4]=here->SOI3ct4; /* Set all admittance components to zero. */ grt[0]=grt[1]=grt[2]=grt[3]=grt[4]=0.0; xct[0]=xct[1]=xct[2]=xct[3]=xct[4]=0.0; /* Now calculate conductances and susceptances from rt and ct. */ /* Don't need to worry about divide by zero when calculating */ /* grt components, as soi3setup() only creates a thermal node */ /* if corresponding rt is greater than zero. */ for(tnodeindex=0;tnodeindexSOI3numThermalNodes;tnodeindex++) { xct[tnodeindex] = ctargs[tnodeindex] * ckt->CKTomega; grt[tnodeindex] = 1/rtargs[tnodeindex]; } /* End JimB */ /* * load matrix */ m = here->SOI3m; *(here->SOI3GF_gfPtr + 1) += m * xcgfgf; *(here->SOI3GF_gbPtr + 1) += m * xcgfgb; *(here->SOI3GF_dpPtr + 1) += m * xcgfd; *(here->SOI3GF_spPtr + 1) += m * xcgfs; *(here->SOI3GF_bPtr + 1) -= m * (xcgfgf + xcgfd + xcgfs + xcgfgb); *(here->SOI3GB_gfPtr + 1) += m * xcgbgf; *(here->SOI3GB_gbPtr + 1) += m * xcgbgb; *(here->SOI3GB_dpPtr + 1) += m * xcgbd; *(here->SOI3GB_spPtr + 1) += m * xcgbs; *(here->SOI3GB_bPtr + 1) -= m * (xcgbgf + xcgbd + xcgbs + xcgbgb); *(here->SOI3B_gfPtr + 1) += m * xcbgf; *(here->SOI3B_gbPtr + 1) += m * xcbgb; *(here->SOI3B_dpPtr + 1) += m * (xcbd-xcBJTbdbd); *(here->SOI3B_spPtr + 1) += m * (xcbs-xcBJTbsbs); *(here->SOI3B_bPtr + 1) += m * (-(xcbgf+xcbd+xcbs+xcbgb) +xcBJTbsbs+xcBJTbdbd); *(here->SOI3DP_gfPtr + 1) += m * xcdgf; *(here->SOI3DP_gbPtr + 1) += m * xcdgb; *(here->SOI3DP_dpPtr + 1) += m * (xcdd+xcBJTbdbd); *(here->SOI3DP_spPtr + 1) += m * xcds; *(here->SOI3DP_bPtr + 1) -= m * (xcdgf + xcdd + xcds + xcdgb + xcBJTbdbd); *(here->SOI3SP_gfPtr + 1) += m * xcsgf; *(here->SOI3SP_gbPtr + 1) += m * xcsgb; *(here->SOI3SP_dpPtr + 1) += m * xcsd; *(here->SOI3SP_spPtr + 1) += m * (xcss+xcBJTbsbs); *(here->SOI3SP_bPtr + 1) -= m * (xcsgf + xcsd + xcss + xcsgb + xcBJTbsbs); /* if no thermal behaviour specified, then put in zero valued indpt. voltage source between TOUT and ground */ if (here->SOI3rt==0) { *(here->SOI3TOUT_ibrPtr + 1) += m * 1.0; *(here->SOI3IBR_toutPtr + 1) += m * 1.0; *(ckt->CKTirhs + (here->SOI3branch)) = 0; } else { *(here->SOI3TOUT_toutPtr + 1) += m * xct[0]; if (here->SOI3numThermalNodes > 1) { *(here->SOI3TOUT_tout1Ptr + 1) += m * (-xct[0]); *(here->SOI3TOUT1_toutPtr + 1) += m * (-xct[0]); *(here->SOI3TOUT1_tout1Ptr + 1) += m * (xct[0]+xct[1]); } if (here->SOI3numThermalNodes > 2) { *(here->SOI3TOUT1_tout2Ptr + 1) += m * (-xct[1]); *(here->SOI3TOUT2_tout1Ptr + 1) += m * (-xct[1]); *(here->SOI3TOUT2_tout2Ptr + 1) += m * (xct[1]+xct[2]); } if (here->SOI3numThermalNodes > 3) { *(here->SOI3TOUT2_tout3Ptr + 1) += m * (-xct[2]); *(here->SOI3TOUT3_tout2Ptr + 1) += m * (-xct[2]); *(here->SOI3TOUT3_tout3Ptr + 1) += m * (xct[2]+xct[3]); } if (here->SOI3numThermalNodes > 4) { *(here->SOI3TOUT3_tout4Ptr + 1) += m * (-xct[3]); *(here->SOI3TOUT4_tout3Ptr + 1) += m * (-xct[3]); *(here->SOI3TOUT4_tout4Ptr + 1) += m * (xct[3]+xct[4]); } *(here->SOI3GF_toutPtr + 1) += m * xcgfdeltaT*model->SOI3type; *(here->SOI3DP_toutPtr + 1) += m * (xcddeltaT - xcBJTbddeltaT)*model->SOI3type; *(here->SOI3SP_toutPtr + 1) += m * (xcsdeltaT - xcBJTbsdeltaT)*model->SOI3type; *(here->SOI3B_toutPtr + 1) += m * model->SOI3type * (xcbdeltaT + xcBJTbsdeltaT + xcBJTbddeltaT); *(here->SOI3GB_toutPtr + 1) += m * xcgbdeltaT*model->SOI3type; } /* and now real part */ *(here->SOI3D_dPtr) += (m * here->SOI3drainConductance); *(here->SOI3D_dpPtr) += (m * (-here->SOI3drainConductance)); *(here->SOI3DP_dPtr) += (m * (-here->SOI3drainConductance)); *(here->SOI3S_sPtr) += (m * here->SOI3sourceConductance); *(here->SOI3S_spPtr) += (m * (-here->SOI3sourceConductance)); *(here->SOI3SP_sPtr) += (m * (-here->SOI3sourceConductance)); *(here->SOI3DP_gfPtr) += ((m * (xnrm-xrev)*here->SOI3gmf + xnrm*here->SOI3gMmf)); *(here->SOI3DP_gbPtr) += (m * ((xnrm-xrev)*here->SOI3gmb + xnrm*here->SOI3gMmb)); *(here->SOI3DP_dpPtr) += m * (here->SOI3drainConductance+here->SOI3gds+ here->SOI3gbd+xrev*(here->SOI3gmf+here->SOI3gmbs+ here->SOI3gmb)+xnrm*here->SOI3gMd); *(here->SOI3DP_spPtr) += m * (-here->SOI3gds - here->SOI3gBJTdb_bs -xnrm*(here->SOI3gmf+here->SOI3gmb+here->SOI3gmbs + here->SOI3gMmf+here->SOI3gMmb+here->SOI3gMmbs+here->SOI3gMd)); *(here->SOI3DP_bPtr) += m * (-here->SOI3gbd + here->SOI3gBJTdb_bs +(xnrm-xrev)*here->SOI3gmbs+ xnrm*here->SOI3gMmbs); *(here->SOI3SP_gfPtr) += m * (-(xnrm-xrev)*here->SOI3gmf+ xrev*here->SOI3gMmf); *(here->SOI3SP_gbPtr) += m * (-(xnrm-xrev)*here->SOI3gmb+ xrev*here->SOI3gMmb); *(here->SOI3SP_dpPtr) += m * (-here->SOI3gds - here->SOI3gBJTsb_bd -xrev*(here->SOI3gmf+here->SOI3gmb+here->SOI3gmbs+ here->SOI3gMmf+here->SOI3gMmb+here->SOI3gMmbs+here->SOI3gMd)); *(here->SOI3SP_spPtr) += m * (here->SOI3sourceConductance+here->SOI3gds+ here->SOI3gbs+xnrm*(here->SOI3gmf+here->SOI3gmbs+ here->SOI3gmb)+xrev*here->SOI3gMd); *(here->SOI3SP_bPtr) += m * (-here->SOI3gbs + here->SOI3gBJTsb_bd -(xnrm-xrev)*here->SOI3gmbs+ xrev*here->SOI3gMmbs); *(here->SOI3B_gfPtr) += m * (-here->SOI3gMmf); *(here->SOI3B_gbPtr) += m * (-here->SOI3gMmb); *(here->SOI3B_dpPtr) += m * (-(here->SOI3gbd) + here->SOI3gBJTsb_bd + xrev*(here->SOI3gMmf+here->SOI3gMmb+ here->SOI3gMmbs+here->SOI3gMd) - xnrm*here->SOI3gMd); *(here->SOI3B_spPtr) += m * (-(here->SOI3gbs) + here->SOI3gBJTdb_bs + xnrm*(here->SOI3gMmf+here->SOI3gMmb+ here->SOI3gMmbs+here->SOI3gMd) - xrev*here->SOI3gMd); *(here->SOI3B_bPtr) += m * (here->SOI3gbd+here->SOI3gbs - here->SOI3gMmbs - here->SOI3gBJTdb_bs - here->SOI3gBJTsb_bd); /* if no thermal behaviour specified, then put in zero valued indpt. voltage source between TOUT and ground */ if (here->SOI3rt==0) { *(here->SOI3TOUT_ibrPtr) += m * 1.0; *(here->SOI3IBR_toutPtr) += m * 1.0; *(ckt->CKTrhs + (here->SOI3branch)) = 0; } else { *(here->SOI3TOUT_toutPtr) += m * (-(here->SOI3gPdT)+grt[0]); if (here->SOI3numThermalNodes > 1) { *(here->SOI3TOUT_tout1Ptr) += m * (-grt[0]); *(here->SOI3TOUT1_toutPtr) += m * (-grt[0]); *(here->SOI3TOUT1_tout1Ptr) += m * (grt[0]+grt[1]); } if (here->SOI3numThermalNodes > 2) { *(here->SOI3TOUT1_tout2Ptr) += m * (-grt[1]); *(here->SOI3TOUT2_tout1Ptr) += m * (-grt[1]); *(here->SOI3TOUT2_tout2Ptr) += m * (grt[1]+grt[2]); } if (here->SOI3numThermalNodes > 3) { *(here->SOI3TOUT2_tout3Ptr) += m * (-grt[2]); *(here->SOI3TOUT3_tout2Ptr) += m * (-grt[2]); *(here->SOI3TOUT3_tout3Ptr) += m * (grt[2]+grt[3]); } if (here->SOI3numThermalNodes > 4) { *(here->SOI3TOUT3_tout4Ptr) += m * (-grt[3]); *(here->SOI3TOUT4_tout3Ptr) += m * (-grt[3]); *(here->SOI3TOUT4_tout4Ptr) += m * (grt[3]+grt[4]); } *(here->SOI3TOUT_dpPtr) += m * (xnrm*(-(here->SOI3gPds*model->SOI3type)) +xrev*(here->SOI3gPds+here->SOI3gPmf+ here->SOI3gPmb+here->SOI3gPmbs)* model->SOI3type); *(here->SOI3TOUT_gfPtr) += m * (-(here->SOI3gPmf*model->SOI3type)); *(here->SOI3TOUT_gbPtr) += m * (-(here->SOI3gPmb*model->SOI3type)); *(here->SOI3TOUT_bPtr) += m * (-(here->SOI3gPmbs*model->SOI3type)); *(here->SOI3TOUT_spPtr) += m * (xnrm*(here->SOI3gPds+here->SOI3gPmf+ here->SOI3gPmb+here->SOI3gPmbs)*model->SOI3type +xrev*(-(here->SOI3gPds*model->SOI3type))); *(here->SOI3DP_toutPtr) += m * (xnrm-xrev)*here->SOI3gt*model->SOI3type; *(here->SOI3SP_toutPtr) += m * (xrev-xnrm)*here->SOI3gt*model->SOI3type; /* need to mult by type in above as conductances will be used with exterior voltages which will be -ve for PMOS except for gPdT */ /* now for thermal influence on impact ionisation current and transient stuff */ *(here->SOI3DP_toutPtr) += m * (xnrm*here->SOI3gMdeltaT - here->SOI3gbdT + here->SOI3gBJTdb_deltaT)*model->SOI3type; *(here->SOI3SP_toutPtr) += m * (xrev*here->SOI3gMdeltaT - here->SOI3gbsT + here->SOI3gBJTsb_deltaT)*model->SOI3type; *(here->SOI3B_toutPtr) -= m * (here->SOI3gMdeltaT - here->SOI3gbsT - here->SOI3gbdT + here->SOI3gBJTdb_deltaT + here->SOI3gBJTsb_deltaT)*model->SOI3type; } } } return(OK); } ngspice-26/src/spicelib/devices/soi3/Makefile.am0000644000265600020320000000101512264261473021142 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libsoi3.la libsoi3_la_SOURCES = \ soi3.c \ soi3acld.c \ soi3ask.c \ soi3cap.c \ soi3conv.c \ soi3defs.h \ soi3del.c \ soi3dest.c \ soi3ext.h \ soi3ic.c \ soi3init.c \ soi3init.h \ soi3itf.h \ soi3load.c \ soi3mask.c \ soi3mdel.c \ soi3mpar.c \ soi3nois.c \ soi3par.c \ soi3set.c \ soi3temp.c \ soi3trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/soi3/soi3nois.c0000644000265600020320000002153412264261473021030 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "soi3defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/const.h" #include "ngspice/suffix.h" /* This routine is VERY closely based on the standard MOS noise function. * SOI3noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int SOI3noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; SOI3model *firstModel = (SOI3model *) genmodel; SOI3model *model; SOI3instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[SOI3NSRCS]; double lnNdens[SOI3NSRCS]; double gain; double EffectiveLength; int i; /* define the names of the noise sources */ static char *SOI3nNames[SOI3NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with the index definitions */ "_rs", /* noise due to rs */ /* in SOI3defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->SOI3nextModel) { for (inst=model->SOI3instances; inst != NULL; inst=inst->SOI3nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < SOI3NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->SOI3name,SOI3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < SOI3NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->SOI3name,SOI3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->SOI3name,SOI3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: /* just get gain from eval routine. Do thermal * noise ourselves as we have local temperature * rise. Also can use channel charge so model * is valid in ALL regions and not just saturation. */ EffectiveLength=inst->SOI3l - 2*model->SOI3latDiff; NevalSrc(&noizDens[SOI3RDNOIZ], NULL, ckt,N_GAIN,inst->SOI3dNodePrime,inst->SOI3dNode, (double)0.0); noizDens[SOI3RDNOIZ] *= 4 * CONSTboltz * (ckt->CKTtemp + *(ckt->CKTstate0 + inst->SOI3deltaT)) * inst->SOI3drainConductance * inst->SOI3m; lnNdens[SOI3RDNOIZ] = log(MAX(noizDens[SOI3RDNOIZ],N_MINLOG)); NevalSrc(&noizDens[SOI3RSNOIZ], NULL, ckt,N_GAIN,inst->SOI3sNodePrime,inst->SOI3sNode, (double)0.0); noizDens[SOI3RSNOIZ] *= 4 * CONSTboltz * (ckt->CKTtemp + *(ckt->CKTstate0 + inst->SOI3deltaT)) * inst->SOI3sourceConductance * inst->SOI3m; lnNdens[SOI3RSNOIZ] = log(MAX(noizDens[SOI3RSNOIZ],N_MINLOG)); NevalSrc(&gain, NULL, ckt, N_GAIN,inst->SOI3dNodePrime, inst->SOI3sNodePrime, (double)0.0); noizDens[SOI3IDNOIZ] = (gain * 4 * CONSTboltz * (ckt->CKTtemp + *(ckt->CKTstate0 + inst->SOI3deltaT)) * inst->SOI3ueff * inst->SOI3m * fabs(*(ckt->CKTstate0 + inst->SOI3qd) + *(ckt->CKTstate0 + inst->SOI3qs)))/ (EffectiveLength*EffectiveLength); lnNdens[SOI3IDNOIZ] = log(MAX(noizDens[SOI3IDNOIZ],N_MINLOG)); switch (model->SOI3nLev) { case 2: noizDens[SOI3FLNOIZ] = gain * model->SOI3fNcoef * (inst->SOI3gmf * inst->SOI3m)*(inst->SOI3gmf * inst->SOI3m)/ (model->SOI3frontOxideCapFactor * inst->SOI3w * inst->SOI3m * EffectiveLength * exp(model->SOI3fNexp * log(MAX(fabs(data->freq),N_MINLOG))) ); break; case 1: noizDens[SOI3FLNOIZ] = gain * model->SOI3fNcoef * exp(model->SOI3fNexp * log(MAX(fabs(inst->SOI3id * inst->SOI3m),N_MINLOG))) / (data->freq * EffectiveLength * inst->SOI3w * inst->SOI3m * model->SOI3frontOxideCapFactor); break; case 0: default: noizDens[SOI3FLNOIZ] = gain * model->SOI3fNcoef * exp(model->SOI3fNexp * log(MAX(fabs(inst->SOI3id),N_MINLOG))) / (data->freq * EffectiveLength * EffectiveLength * model->SOI3frontOxideCapFactor); break; } lnNdens[SOI3FLNOIZ] = log(MAX(noizDens[SOI3FLNOIZ],N_MINLOG)); noizDens[SOI3TOTNOIZ] = noizDens[SOI3RDNOIZ] + noizDens[SOI3RSNOIZ] + noizDens[SOI3IDNOIZ] + noizDens[SOI3FLNOIZ]; lnNdens[SOI3TOTNOIZ] = log(MAX(noizDens[SOI3TOTNOIZ], N_MINLOG)); *OnDens += noizDens[SOI3TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < SOI3NSRCS; i++) { inst->SOI3nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < SOI3NSRCS; i++) { inst->SOI3nVar[OUTNOIZ][i] = 0.0; inst->SOI3nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < SOI3NSRCS; i++) { if (i != SOI3TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->SOI3nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->SOI3nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->SOI3nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->SOI3nVar[OUTNOIZ][i] += tempOnoise; inst->SOI3nVar[OUTNOIZ][SOI3TOTNOIZ] += tempOnoise; inst->SOI3nVar[INNOIZ][i] += tempInoise; inst->SOI3nVar[INNOIZ][SOI3TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < SOI3NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < SOI3NSRCS; i++) { data->outpVector[data->outNumber++] = inst->SOI3nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->SOI3nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/soi3/Makefile.in0000644000265600020320000004306412264261540021160 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/soi3 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsoi3_la_LIBADD = am_libsoi3_la_OBJECTS = soi3.lo soi3acld.lo soi3ask.lo soi3cap.lo \ soi3conv.lo soi3del.lo soi3dest.lo soi3ic.lo soi3init.lo \ soi3load.lo soi3mask.lo soi3mdel.lo soi3mpar.lo soi3nois.lo \ soi3par.lo soi3set.lo soi3temp.lo soi3trun.lo libsoi3_la_OBJECTS = $(am_libsoi3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libsoi3_la_SOURCES) DIST_SOURCES = $(libsoi3_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libsoi3.la libsoi3_la_SOURCES = \ soi3.c \ soi3acld.c \ soi3ask.c \ soi3cap.c \ soi3conv.c \ soi3defs.h \ soi3del.c \ soi3dest.c \ soi3ext.h \ soi3ic.c \ soi3init.c \ soi3init.h \ soi3itf.h \ soi3load.c \ soi3mask.c \ soi3mdel.c \ soi3mpar.c \ soi3nois.c \ soi3par.c \ soi3set.c \ soi3temp.c \ soi3trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/soi3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/soi3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsoi3.la: $(libsoi3_la_OBJECTS) $(libsoi3_la_DEPENDENCIES) $(EXTRA_libsoi3_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsoi3_la_OBJECTS) $(libsoi3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3cap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3nois.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/soi3trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/soi3/soi3init.c0000644000265600020320000000410412264261473021015 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "soi3itf.h" #include "soi3ext.h" #include "soi3init.h" SPICEdev SOI3info = { { "SOI3", "Basic Thick Film SOI3 model v2.7", &SOI3nSize, &SOI3nSize, SOI3names, &SOI3pTSize, SOI3pTable, &SOI3mPTSize, SOI3mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ SOI3param, /* DEVmodParam */ SOI3mParam, /* DEVload */ SOI3load, /* DEVsetup */ SOI3setup, /* DEVunsetup */ SOI3unsetup, /* DEVpzSetup */ SOI3setup, /* DEVtemperature*/ SOI3temp, /* DEVtrunc */ SOI3trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ SOI3acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ SOI3destroy, /* DEVmodDelete */ SOI3mDelete, /* DEVdelete */ SOI3delete, /* DEVsetic */ SOI3getic, /* DEVask */ SOI3ask, /* DEVmodAsk */ SOI3mAsk, /* DEVpzLoad */ NULL, /* DEVconvTest */ SOI3convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ SOI3noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &SOI3iSize, /* DEVmodSize */ &SOI3mSize }; SPICEdev * get_soi3_info(void) { return &SOI3info; } ngspice-26/src/spicelib/devices/soi3/soi3del.c0000644000265600020320000000270312264261473020621 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "soi3defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SOI3delete(GENmodel *inModel, IFuid name, GENinstance **inst) { SOI3model *model = (SOI3model *)inModel; SOI3instance **fast = (SOI3instance **)inst; SOI3instance **prev = NULL; SOI3instance *here; for( ; model ; model = model->SOI3nextModel) { prev = &(model->SOI3instances); for(here = *prev; here ; here = *prev) { if(here->SOI3name == name || (fast && here==*fast) ) { *prev= here->SOI3nextInstance; FREE(here); return(OK); } prev = &(here->SOI3nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/soi3/soi3cap.c0000644000265600020320000003636712264261473020635 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/suffix.h" #include "soi3defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" void SOI3cap(double vgB, double Phiplusvsb, double gammaB, double paramargs[10], double Bfargs[2], double alpha_args[5], double psi_st0args[5], double vGTargs[5], double psi_sLargs[5], double psi_s0args[5], double ldargs[5], double *Qg, double *Qb, double *Qd, double *QgB, double *cgfgf, double *cgfd, double *cgfs, double *cgfdeltaT, double *cgfgb, double *cbgf, double *cbd, double *cbs, double *cbdeltaT, double *cbgb, double *cdgf, double *cdd, double *cds, double *cddeltaT, double *cdgb, double *cgbgf, double *cgbd, double *cgbs, double *cgbdeltaT, double *cgbgb ) /****** Part 1 - declare local variables. ******/ { double WCox,WCob,L; double gamma,eta_s,vt,delta,sigma,chiFB; double Bf,pDBf_Dpsi_st0; double alpha,Dalpha_Dvgfb,Dalpha_Dvdb,Dalpha_Dvsb,Dalpha_DdeltaT; double Dpsi_st0_Dvgfb,Dpsi_st0_Dvdb,Dpsi_st0_Dvsb,Dpsi_st0_DdeltaT; double vGT,DvGT_Dvgfb,DvGT_Dvdb,DvGT_Dvsb,DvGT_DdeltaT; double psi_sL,Dpsi_sL_Dvgfb,Dpsi_sL_Dvdb,Dpsi_sL_Dvsb,Dpsi_sL_DdeltaT; double psi_s0,Dpsi_s0_Dvgfb,Dpsi_s0_Dvdb,Dpsi_s0_Dvsb,Dpsi_s0_DdeltaT; double ld,Dld_Dvgfb,Dld_Dvdb,Dld_Dvsb,Dld_DdeltaT; double Lprime,Fc; double Qbprime,Qcprime,Qdprime,Qgprime,Qb2prime,Qc2prime,Qd2prime,Qg2prime; double Dlimc,Dlimd; double Vqd,Vqs; double F,F2; double cq,dq; double dercq,derdq; double sigmaC,Eqc,Eqd; double DVqs_Dvgfb,DVqs_Dvdb,DVqs_Dvsb,DVqs_DdeltaT; double DF_Dvgfb,DF_Dvdb,DF_Dvsb,DF_DdeltaT; double ccgf,ccd,ccs,ccdeltaT,ccgb; double vg,vgacc,Egacc,tmpacc,Qacc; double csf; NG_IGNORE(gammaB); NG_IGNORE(Phiplusvsb); NG_IGNORE(vgB); /****** Part 2 - extract variables passed from soi3load(), which ******/ /****** have been passed to soi3cap() in *arg arrays. ******/ WCox = paramargs[0]; L = paramargs[1]; gamma = paramargs[2]; eta_s = paramargs[3]; vt = paramargs[4]; delta = paramargs[5]; WCob = paramargs[6]; sigma = paramargs[7]; chiFB = paramargs[8]; csf = paramargs[9]; Bf = Bfargs[0]; pDBf_Dpsi_st0 = Bfargs[1]; alpha = alpha_args[0]; Dalpha_Dvgfb = alpha_args[1]; Dalpha_Dvdb = alpha_args[2]; Dalpha_Dvsb = alpha_args[3]; Dalpha_DdeltaT = alpha_args[4]; Dpsi_st0_Dvgfb = psi_st0args[1]; Dpsi_st0_Dvdb = psi_st0args[2]; Dpsi_st0_Dvsb = psi_st0args[3]; Dpsi_st0_DdeltaT = psi_st0args[4]; vGT = vGTargs[0]; DvGT_Dvgfb = vGTargs[1]; DvGT_Dvdb = vGTargs[2]; DvGT_Dvsb = vGTargs[3]; DvGT_DdeltaT = vGTargs[4]; psi_sL = psi_sLargs[0]; Dpsi_sL_Dvgfb = psi_sLargs[1]; Dpsi_sL_Dvdb = psi_sLargs[2]; Dpsi_sL_Dvsb = psi_sLargs[3]; Dpsi_sL_DdeltaT = psi_sLargs[4]; psi_s0 = psi_s0args[0]; Dpsi_s0_Dvgfb = psi_s0args[1]; Dpsi_s0_Dvdb = psi_s0args[2]; Dpsi_s0_Dvsb = psi_s0args[3]; Dpsi_s0_DdeltaT = psi_s0args[4]; ld = ldargs[0]; Dld_Dvgfb = ldargs[1]; Dld_Dvdb = ldargs[2]; Dld_Dvsb = ldargs[3]; Dld_DdeltaT = ldargs[4]; /****** Part 3 - define some important quantities. ******/ sigmaC = 1E-8; Vqd = (vGT - alpha*psi_sL); /* This is -qd/Cof */ Vqs = (vGT - alpha*psi_s0); /* This is -qs/Cof */ if (Vqs<=0) { /* deep subthreshold contingency */ F = 1; } else { F = Vqd/Vqs; if (F<0) { /* physically impossible situation */ F=0; } } F2 = F*F; Fc = 1 + ld/L; Lprime = L/Fc; /****** Part 4 - calculate normalised (see note below) terminal ******/ /****** charge expressions for the GCA region. ******/ /* JimB - important note */ /* The charge expressions Qcprime, Qd2prime etc in this file are not charges */ /* but voltages! Each expression is equal to the derived expression for the */ /* total charge in each region, but divided by a factor WL'Cof. This is */ /* compensated for later on. */ /* Channel charge Qc1 */ cq = (F*F + F + 1)/(F+1); Qcprime = -2*Vqs*cq/3; if ((-Qcprime/sigmaC) MAX_EXP_ARG) { vgacc = vg; tmpacc = 1; } else { Egacc = exp(-vg/vt); vgacc = -vt*log(1+Egacc); tmpacc = Egacc/(1+Egacc); } Qacc = -WCox*L*vgacc; /* Now work out GCA region charges */ *Qb = WCox*Lprime*Qbprime + Qacc; *Qd = WCox*Lprime*Qdprime; *Qg = WCox*Lprime*Qgprime - Qacc; /****** Part 7 - calculate normalised (see note below) terminal ******/ /****** charge expressions for the saturated drain region. ******/ Qc2prime = -Vqd; /* Basic expression for the intrinsic body charge in the saturation region is */ /* modified by csf, to reflect the fact that the body charge will be shared */ /* between the gate and the drain/body depletion region. This factor must be */ /* between 0 and 1, since it represents the fraction of ld over which qb is */ /* integrated to give Qb2. */ Qb2prime = -gamma*csf*(Bf + delta*psi_sL); Qd2prime = 0.5*Qc2prime; /* JimB - 9/1/99. Re-partition drain region charge */ /* Qd2prime = Qc2prime; */ Qg2prime = -Qc2prime-Qb2prime; *Qb += WCox*ld*Qb2prime; *Qd += WCox*ld*Qd2prime; *Qg += WCox*ld*Qg2prime; /****** Part 8 - calculate full capacitance expressions, accounting ******/ /****** for both GCA and drain region contributions. As explained ******/ /****** in part 5, *cbgf, *cbd etc only derivatives of GCA charge ******/ /****** expression w.r.t. Vx. Now need to include Lprime/ld ******/ /****** dependence on Vx as well. ******/ *cbgf = WCox*(Lprime*(*cbgf) - ld*csf*(pDBf_Dpsi_st0*Dpsi_st0_Dvgfb + delta*Dpsi_sL_Dvgfb + (psi_sL*Dalpha_Dvgfb/gamma)) + (Qb2prime - Qbprime/(Fc*Fc))*Dld_Dvgfb ); *cbd = WCox*(Lprime*(*cbd) - ld*csf*(pDBf_Dpsi_st0*Dpsi_st0_Dvdb + delta*Dpsi_sL_Dvdb + (psi_sL*Dalpha_Dvdb/gamma)) + (Qb2prime - Qbprime/(Fc*Fc))*Dld_Dvdb ); *cbs = WCox*(Lprime*(*cbs) - ld*csf*(pDBf_Dpsi_st0*Dpsi_st0_Dvsb + delta*Dpsi_sL_Dvsb + (psi_sL*Dalpha_Dvsb/gamma)) + (Qb2prime - Qbprime/(Fc*Fc))*Dld_Dvsb ); *cbdeltaT = WCox*(Lprime*(*cbdeltaT) - ld*csf*(pDBf_Dpsi_st0*Dpsi_st0_DdeltaT + delta*Dpsi_sL_DdeltaT + (psi_sL*Dalpha_DdeltaT/gamma)) + (Qb2prime - Qbprime/(Fc*Fc))*Dld_DdeltaT ); *cbgb = 0; ccgf = WCox*(Lprime*(ccgf) - ld*(DvGT_Dvgfb - alpha*Dpsi_sL_Dvgfb - psi_sL*Dalpha_Dvgfb) + (Qc2prime - Qcprime/(Fc*Fc))*Dld_Dvgfb ); ccd = WCox*(Lprime*(ccd) - ld*(DvGT_Dvdb - alpha*Dpsi_sL_Dvdb - psi_sL*Dalpha_Dvdb) + (Qc2prime - Qcprime/(Fc*Fc))*Dld_Dvdb ); ccs = WCox*(Lprime*(ccs) - ld*(DvGT_Dvsb - alpha*Dpsi_sL_Dvsb - psi_sL*Dalpha_Dvsb) + (Qc2prime - Qcprime/(Fc*Fc))*Dld_Dvsb ); ccdeltaT = WCox*(Lprime*(ccdeltaT) - ld*(DvGT_DdeltaT - alpha*Dpsi_sL_DdeltaT - psi_sL*Dalpha_DdeltaT) + (Qc2prime - Qcprime/(Fc*Fc))*Dld_DdeltaT ); ccgb = 0; *cdgf = WCox*(Lprime*(*cdgf) - 0.5*ld*(DvGT_Dvgfb - alpha*Dpsi_sL_Dvgfb - psi_sL*Dalpha_Dvgfb) + (Qd2prime - Qdprime/(Fc*Fc))*Dld_Dvgfb ); *cdd = WCox*(Lprime*(*cdd) - 0.5*ld*(DvGT_Dvdb - alpha*Dpsi_sL_Dvdb - psi_sL*Dalpha_Dvdb) + (Qd2prime - Qdprime/(Fc*Fc))*Dld_Dvdb ); *cds = WCox*(Lprime*(*cds) - 0.5*ld*(DvGT_Dvsb - alpha*Dpsi_sL_Dvsb - psi_sL*Dalpha_Dvsb) + (Qd2prime - Qdprime/(Fc*Fc))*Dld_Dvsb ); *cddeltaT = WCox*(Lprime*(*cddeltaT) - 0.5*ld*(DvGT_DdeltaT - alpha*Dpsi_sL_DdeltaT - psi_sL*Dalpha_DdeltaT) + (Qd2prime - Qdprime/(Fc*Fc))*Dld_DdeltaT ); *cdgb = 0; /****** Part 9 - Finally, include accumulation charge derivatives. ******/ /* Now include accumulation charge derivs */ *cbgf += -WCox*L*tmpacc; *cbd += -WCox*L*tmpacc*sigma; *cbs += -WCox*L*tmpacc*(-sigma); *cbdeltaT += -WCox*L*tmpacc*chiFB; *cbgb += 0; *cgfgf = -(ccgf + *cbgf); *cgfd = -(ccd + *cbd); *cgfs = -(ccs + *cbs); *cgfdeltaT = -(ccdeltaT + *cbdeltaT); *cgfgb = 0; /****** Part 10 - Back gate stuff - doesn't work, so set to zero. ******/ /* Should move this before the accumulation section for consistency, but */ /* doesn't matter, as all intrinsic back-gate capacitances set to zero anyway. */ *QgB = 0; *cgbgf = 0; *cgbd = 0; *cgbs = 0; *cgbgb = 0; *cgbdeltaT = 0; } void SOI3capEval(CKTcircuit *ckt, double Frontcapargs[6], double Backcapargs[6], double cgfgf, double cgfd, double cgfs, double cgfdeltaT, double cgfgb, double cdgf, double cdd, double cds, double cddeltaT, double cdgb, double csgf, double csd, double css, double csdeltaT, double csgb, double cbgf, double cbd, double cbs, double cbdeltaT, double cbgb, double cgbgf, double cgbd, double cgbs, double cgbdeltaT, double cgbgb, double *gcgfgf, double *gcgfd, double *gcgfs, double *gcgfdeltaT, double *gcgfgb, double *gcdgf, double *gcdd, double *gcds, double *gcddeltaT, double *gcdgb, double *gcsgf, double *gcsd, double *gcss, double *gcsdeltaT, double *gcsgb, double *gcbgf, double *gcbd, double *gcbs, double *gcbdeltaT, double *gcbgb, double *gcgbgf, double *gcgbd, double *gcgbs, double *gcgbdeltaT, double *gcgbgb, double *qgatef, double *qbody, double *qdrn, double *qsrc, double *qgateb) { double cgfd0,cgfs0,cgfb0; double cgbd0,cgbs0,cgbb0; double vgfd,vgfs,vgfb; double vgbd,vgbs,vgbb; double ag0; double qgfd,qgfs,qgfb; double qgbd,qgbs,qgbb; cgfd0 = Frontcapargs[0]; cgfs0 = Frontcapargs[1]; cgfb0 = Frontcapargs[2]; vgfd = Frontcapargs[3]; vgfs = Frontcapargs[4]; vgfb = Frontcapargs[5]; cgbd0 = Backcapargs[0]; cgbs0 = Backcapargs[1]; cgbb0 = Backcapargs[2]; vgbd = Backcapargs[3]; vgbs = Backcapargs[4]; vgbb = Backcapargs[5]; /* stuff below includes overlap caps' conductances */ ag0 = ckt->CKTag[0]; *gcgfgf = (cgfgf + cgfd0 + cgfs0 + cgfb0) * ag0; *gcgfd = (cgfd - cgfd0) * ag0; *gcgfs = (cgfs - cgfs0) * ag0; *gcgfdeltaT = cgfdeltaT * ag0; *gcgfgb = cgfgb * ag0; *gcdgf = (cdgf - cgfd0) * ag0; *gcdd = (cdd + cgfd0 + cgbd0) * ag0; *gcds = cds * ag0; *gcddeltaT = cddeltaT * ag0; *gcdgb = (cdgb - cgbd0) * ag0; *gcsgf = (csgf - cgfs0) * ag0; *gcsd = csd * ag0; *gcss = (css + cgfs0 + cgbs0) * ag0; *gcsdeltaT = csdeltaT * ag0; *gcsgb = (csgb - cgbs0) * ag0; *gcbgf = (cbgf - cgfb0) * ag0; *gcbd = cbd * ag0; *gcbs = cbs * ag0; *gcbdeltaT = cbdeltaT * ag0; *gcbgb = (cbgb - cgbb0) * ag0; *gcgbgf = cgbgf * ag0; *gcgbd = (cgbd - cgbd0) * ag0; *gcgbs = (cgbs - cgbs0) * ag0; *gcgbdeltaT = cgbdeltaT * ag0; *gcgbgb = (cgbgb + cgbd0 + cgbs0 + cgbb0) * ag0; qgfd = cgfd0 * vgfd; qgfs = cgfs0 * vgfs; qgfb = cgfb0 * vgfb; qgbd = cgbd0 * vgbd; qgbs = cgbs0 * vgbs; qgbb = cgbb0 * vgbb; *qgatef = *qgatef + qgfd + qgfs + qgfb; *qbody = *qbody - qgfb - qgbb; *qdrn = *qdrn - qgfd - qgbd; *qgateb = *qgateb + qgbd + qgbs + qgbb; *qsrc = -(*qgatef + *qbody + *qdrn + *qgateb); } ngspice-26/src/spicelib/devices/soi3/soi3itf.h0000644000265600020320000000145412264261473020646 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #ifndef DEV_SOI3 #define DEV_SOI3 SPICEdev *get_soi3_info(void); #endif ngspice-26/src/spicelib/devices/soi3/soi3load.c0000644000265600020320000034337012264261473021004 0ustar andreasadmin/********** STAG version 2.7 Copyright 2000 owned by the United Kingdom Secretary of State for Defence acting through the Defence Evaluation and Research Agency. Developed by : Jim Benson, Department of Electronics and Computer Science, University of Southampton, United Kingdom. With help from : Nele D'Halleweyn, Ketan Mistry, Bill Redman-White, and Craig Easson. Based on STAG version 2.1 Developed by : Mike Lee, With help from : Bernard Tenbroek, Bill Redman-White, Mike Uren, Chris Edwards and John Bunyan. Acknowledgements : Rupert Howes and Pete Mole. **********/ /********** Modified by Paolo Nenzi 2002 ngspice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "soi3defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" extern double DEVsoipnjlim(double, double, double, double, int *); int SOI3load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { SOI3model *model = (SOI3model *) inModel; SOI3instance *here; double Beta; double DrainSatCur; /* for drain pn junction */ double SourceSatCur; /* for source pn junction */ double DrainSatCur1; /* for 2nd drain pn junction */ double SourceSatCur1; /* for 2nd source pn junction */ double EffectiveLength,logL; double FrontGateBulkOverlapCap; double FrontGateDrainOverlapCap; double FrontGateSourceOverlapCap; double BackGateBulkOverlapCap; double BackGateDrainOverlapCap; double BackGateSourceOverlapCap; double Frontcapargs[6]; double Backcapargs[6]; double FrontOxideCap; double BackOxideCap; double arg; double ibhat; double idhat; double iPthat; /* needed for convergence */ double ieqPt; /* value of equivalent current source */ double idrain; double idreq; double ieq; double ieqct,ieqct1,ieqct2,ieqct3,ieqct4; double ieqbd; double ieqbs; double iMdbeq; double iMsbeq; double iBJTdbeq; double iBJTsbeq; double delvbd; double delvbs; double delvds; double delvgfd; double delvgfs; double delvgbd; double delvgbs; double deldeltaT; double evbd,evbd1; double evbs,evbs1; double rtargs[5]; double grt[5]; double gct[5]; int tnodeindex; double geq; double sarg; double vbd; double vbs; double vds; /* the next lot are so we can cast the problem with the body node as ref */ double vsb; double vdb; double vgbb; /* now back to our regular programming */ /* vgfb exists already for gate cap calc */ double deltaT,deltaT1 = 0.0,deltaT2 = 0.0,deltaT3 = 0.0; double deltaT4 = 0.0,deltaT5 = 0.0; double vdsat_ext; double vgfb; double vgfd; double vgbd; double vgfdo; double vgbdo; double vgfs; double vgbs; double von; double vt; #ifndef PREDICTOR double xfact; #endif int xnrm; int xrev; /* now stuff needed for new charge model */ double paramargs[10]; double Bfargs[2],alpha_args[5]; double psi_st0args[5]; double vGTargs[5]; double psi_sLargs[5],psi_s0args[5]; double ldargs[5]; double qgatef,qdrn,qsrc,qbody,qgateb; double ieqqgf,ieqqd,ieqqs,ieqqgb; double cgfgf,cgfd,cgfs,cgfdeltaT,cgfgb; double cdgf,cdd,cds,cddeltaT,cdgb; double csgf,csd,css,csdeltaT,csgb; double cbgf,cbd,cbs,cbdeltaT,cbgb; double cgbgf,cgbd,cgbs,cgbdeltaT,cgbgb; double gcgfgf,gcgfd,gcgfs,gcgfdeltaT,gcgfgb; double gcdgf,gcdd,gcds,gcddeltaT,gcdgb; double gcsgf,gcsd,gcss,gcsdeltaT,gcsgb; double gcbgf,gcbd,gcbs,gcbdeltaT,gcbgb; double gcgbgf,gcgbd,gcgbs,gcgbdeltaT,gcgbgb; double alphaBJT; double tauFBJTeff,tauRBJTeff; double ISts,IS1ts,IStd,IS1td; double ieqqBJTbs,ieqqBJTbd; double gcBJTbsbs,gcBJTbsdeltaT; double gcBJTbdbd,gcBJTbddeltaT; double ag0; int Check; int ByPass; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; #ifdef CAPBYPASS int senflag; #endif /* CAPBYPASS */ double m; for( ; model != NULL; model = model->SOI3nextModel ) { /* loop through all the instances of the model */ for (here = model->SOI3instances; here != NULL ; here=here->SOI3nextInstance) { vt = CONSTKoverQ * here->SOI3temp; Check=1; ByPass=0; /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveLength=here->SOI3l - 2*model->SOI3latDiff; logL = log(EffectiveLength); if (here->SOI3tSatCurDens == 0) { DrainSatCur = here->SOI3tSatCur; SourceSatCur = here->SOI3tSatCur; } else { DrainSatCur = here->SOI3tSatCurDens * here->SOI3w; SourceSatCur = here->SOI3tSatCurDens * here->SOI3w; } if (here->SOI3tSatCurDens1 == 0) { DrainSatCur1 = here->SOI3tSatCur1; SourceSatCur1 = here->SOI3tSatCur1; } else { DrainSatCur1 = here->SOI3tSatCurDens1 * here->SOI3w; SourceSatCur1 = here->SOI3tSatCurDens1 * here->SOI3w; } /* NB Junction sat. cur. density is NOW PER UNIT WIDTH */ /* JimB - can use basic device geometry to estimate front and back */ /* overlap capacitances to a first approximation. Use this default */ /* model if capacitance factors aren't given in model netlist. */ /* Calculate front gate overlap capacitances. */ if(model->SOI3frontGateSourceOverlapCapFactorGiven) { FrontGateSourceOverlapCap = model->SOI3frontGateSourceOverlapCapFactor * here->SOI3w; } else { FrontGateSourceOverlapCap = model->SOI3latDiff * here->SOI3w * model->SOI3frontOxideCapFactor; } if(model->SOI3frontGateDrainOverlapCapFactorGiven) { FrontGateDrainOverlapCap = model->SOI3frontGateDrainOverlapCapFactor * here->SOI3w; } else { FrontGateDrainOverlapCap = model->SOI3latDiff * here->SOI3w * model->SOI3frontOxideCapFactor; } if(model->SOI3frontGateBulkOverlapCapFactorGiven) { FrontGateBulkOverlapCap = model->SOI3frontGateBulkOverlapCapFactor * EffectiveLength; } else { FrontGateBulkOverlapCap = EffectiveLength * (0.1*1e-6*model->SOI3minimumFeatureSize) * model->SOI3frontOxideCapFactor; } /* Calculate back gate overlap capacitances. */ if( (model->SOI3backGateSourceOverlapCapAreaFactorGiven) && (!model->SOI3backGateSourceOverlapCapAreaFactor || here->SOI3asGiven) ) { BackGateSourceOverlapCap = model->SOI3backGateSourceOverlapCapAreaFactor * here->SOI3as; } else { BackGateSourceOverlapCap = (2*1e-6*model->SOI3minimumFeatureSize + model->SOI3latDiff) * here->SOI3w * model->SOI3backOxideCapFactor; } if( (model->SOI3backGateDrainOverlapCapAreaFactorGiven) && (!model->SOI3backGateDrainOverlapCapAreaFactor || here->SOI3adGiven) ) { BackGateDrainOverlapCap = model->SOI3backGateDrainOverlapCapAreaFactor * here->SOI3ad; } else { BackGateDrainOverlapCap = (2*1e-6*model->SOI3minimumFeatureSize + model->SOI3latDiff) * here->SOI3w * model->SOI3backOxideCapFactor; } if( (model->SOI3backGateBulkOverlapCapAreaFactorGiven) && (!model->SOI3backGateBulkOverlapCapAreaFactor || here->SOI3abGiven) ) { BackGateBulkOverlapCap = model->SOI3backGateBulkOverlapCapAreaFactor * here->SOI3ab; } else { BackGateBulkOverlapCap = EffectiveLength * (0.1*1e-6*model->SOI3minimumFeatureSize + here->SOI3w) * model->SOI3backOxideCapFactor; } Beta = here->SOI3tTransconductance * here->SOI3w/EffectiveLength; /* reset mu_eff to ambient temp value in SI units */ here->SOI3ueff = here->SOI3tTransconductance/ model->SOI3frontOxideCapFactor; FrontOxideCap = model->SOI3frontOxideCapFactor * EffectiveLength * here->SOI3w; BackOxideCap = model->SOI3backOxideCapFactor * EffectiveLength * here->SOI3w; /* * ok - now to do the start-up operations * * we must get values for vbs, vds, vgfs and vgbs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ /* yeah, but we'll then use vsb and vdb for the real work */ /* we will use conventional voltages to save * * work rewriting the convergence criteria */ if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED | MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->SOI3off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->SOI3vbs) = *(ckt->CKTstate1 + here->SOI3vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->SOI3vbs)) -(xfact * (*(ckt->CKTstate2 + here->SOI3vbs))); *(ckt->CKTstate0 + here->SOI3vgfs) = *(ckt->CKTstate1 + here->SOI3vgfs); vgfs = (1+xfact)* (*(ckt->CKTstate1 + here->SOI3vgfs)) -(xfact * (*(ckt->CKTstate2 + here->SOI3vgfs))); *(ckt->CKTstate0 + here->SOI3vgbs) = *(ckt->CKTstate1 + here->SOI3vgbs); vgbs = (1+xfact)* (*(ckt->CKTstate1 + here->SOI3vgbs)) -(xfact * (*(ckt->CKTstate2 + here->SOI3vgbs))); *(ckt->CKTstate0 + here->SOI3vds) = *(ckt->CKTstate1 + here->SOI3vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->SOI3vds)) -(xfact * (*(ckt->CKTstate2 + here->SOI3vds))); *(ckt->CKTstate0 + here->SOI3vbd) = *(ckt->CKTstate0 + here->SOI3vbs)- *(ckt->CKTstate0 + here->SOI3vds); *(ckt->CKTstate0 + here->SOI3deltaT) = *(ckt->CKTstate1 + here->SOI3deltaT); deltaT = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT)))); /* need to stop deltaT being -ve */ /* JimB - 19/5/99 */ if (here->SOI3numThermalNodes == 0) { deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0.0; } if (here->SOI3numThermalNodes == 1) { deltaT1=deltaT; deltaT2=deltaT3=deltaT4=deltaT5=0.0; } if (here->SOI3numThermalNodes == 2) { deltaT1 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT1)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT1)))); deltaT2 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT2)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT2)))); deltaT3=deltaT4=deltaT5=0.0; } if (here->SOI3numThermalNodes == 3) { deltaT1 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT1)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT1)))); deltaT2 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT2)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT2)))); deltaT3 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT3)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT3)))); deltaT4=deltaT5=0.0; } if (here->SOI3numThermalNodes == 4) { deltaT1 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT1)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT1)))); deltaT2 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT2)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT2)))); deltaT3 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT3)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT3)))); deltaT4 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT4)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT4)))); deltaT5=0.0; } if (here->SOI3numThermalNodes == 5) { deltaT1 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT1)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT1)))); deltaT2 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT2)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT2)))); deltaT3 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT3)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT3)))); deltaT4 = MAX(0,(1+xfact)* (*(ckt->CKTstate1 + here->SOI3deltaT4)) -(xfact * (*(ckt->CKTstate2 + here->SOI3deltaT4)))); deltaT5 =MAX(0,deltaT-deltaT1-deltaT2-deltaT3-deltaT4); } *(ckt->CKTstate0 + here->SOI3idrain) = *(ckt->CKTstate1 + here->SOI3idrain); *(ckt->CKTstate0 + here->SOI3cgfgf) = *(ckt->CKTstate1 + here->SOI3cgfgf); *(ckt->CKTstate0 + here->SOI3cgfd) = *(ckt->CKTstate1 + here->SOI3cgfd); *(ckt->CKTstate0 + here->SOI3cgfs) = *(ckt->CKTstate1 + here->SOI3cgfs); *(ckt->CKTstate0 + here->SOI3cgfdeltaT) = *(ckt->CKTstate1 + here->SOI3cgfdeltaT); *(ckt->CKTstate0 + here->SOI3cgfgb) = *(ckt->CKTstate1 + here->SOI3cgfgb); *(ckt->CKTstate0 + here->SOI3csgf) = *(ckt->CKTstate1 + here->SOI3csgf); *(ckt->CKTstate0 + here->SOI3csd) = *(ckt->CKTstate1 + here->SOI3csd); *(ckt->CKTstate0 + here->SOI3css) = *(ckt->CKTstate1 + here->SOI3css); *(ckt->CKTstate0 + here->SOI3csdeltaT) = *(ckt->CKTstate1 + here->SOI3csdeltaT); *(ckt->CKTstate0 + here->SOI3csgb) = *(ckt->CKTstate1 + here->SOI3csgb); *(ckt->CKTstate0 + here->SOI3cdgf) = *(ckt->CKTstate1 + here->SOI3cdgf); *(ckt->CKTstate0 + here->SOI3cdd) = *(ckt->CKTstate1 + here->SOI3cdd); *(ckt->CKTstate0 + here->SOI3cds) = *(ckt->CKTstate1 + here->SOI3cds); *(ckt->CKTstate0 + here->SOI3cddeltaT) = *(ckt->CKTstate1 + here->SOI3cddeltaT); *(ckt->CKTstate0 + here->SOI3cdgb) = *(ckt->CKTstate1 + here->SOI3cdgb); *(ckt->CKTstate0 + here->SOI3cgbgf) = *(ckt->CKTstate1 + here->SOI3cgbgf); *(ckt->CKTstate0 + here->SOI3cgbd) = *(ckt->CKTstate1 + here->SOI3cgbd); *(ckt->CKTstate0 + here->SOI3cgbs) = *(ckt->CKTstate1 + here->SOI3cgbs); *(ckt->CKTstate0 + here->SOI3cgbdeltaT) = *(ckt->CKTstate1 + here->SOI3cgbdeltaT); *(ckt->CKTstate0 + here->SOI3cgbgb) = *(ckt->CKTstate1 + here->SOI3cgbgb); *(ckt->CKTstate0 + here->SOI3cBJTbsbs) = *(ckt->CKTstate1 + here->SOI3cBJTbsbs); *(ckt->CKTstate0 + here->SOI3cBJTbsdeltaT) = *(ckt->CKTstate1 + here->SOI3cBJTbsdeltaT); *(ckt->CKTstate0 + here->SOI3cBJTbdbd) = *(ckt->CKTstate1 + here->SOI3cBJTbdbd); *(ckt->CKTstate0 + here->SOI3cBJTbddeltaT) = *(ckt->CKTstate1 + here->SOI3cBJTbddeltaT); } else { #endif /* PREDICTOR */ /* general iteration */ vbs = model->SOI3type * ( *(ckt->CKTrhsOld+here->SOI3bNode) - *(ckt->CKTrhsOld+here->SOI3sNodePrime)); vgfs = model->SOI3type * ( *(ckt->CKTrhsOld+here->SOI3gfNode) - *(ckt->CKTrhsOld+here->SOI3sNodePrime)); vgbs = model->SOI3type * ( *(ckt->CKTrhsOld+here->SOI3gbNode) - *(ckt->CKTrhsOld+here->SOI3sNodePrime)); vds = model->SOI3type * ( *(ckt->CKTrhsOld+here->SOI3dNodePrime) - *(ckt->CKTrhsOld+here->SOI3sNodePrime)); deltaT = MAX(0,*(ckt->CKTrhsOld+here->SOI3toutNode)); /* voltage deltaT is V(tout) wrt ground and shoule be positive */ /* the next lot are needed for the (extra) thermal capacitances */ /* JimB - 19/5/99 */ if (here->SOI3numThermalNodes == 0) { deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 1) { deltaT1=deltaT; deltaT2=deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 2) { deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node)); deltaT1 = deltaT - deltaT2; deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 3) { deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node)); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3); deltaT1 = deltaT - deltaT2 - deltaT3; deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 4) { deltaT4 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout3Node)); deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node) - deltaT4); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3 - deltaT4); deltaT1 = deltaT - deltaT2 - deltaT3 - deltaT4; deltaT5=0; } if (here->SOI3numThermalNodes == 5) { deltaT5 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout4Node)); deltaT4 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout3Node) - deltaT5); deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node) - deltaT4 - deltaT5); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3 - deltaT4 - deltaT5); deltaT1 = deltaT - deltaT2 - deltaT3 - deltaT4 - deltaT5; } #ifndef PREDICTOR } #endif /* PREDICTOR */ /* now some common crunching for some more useful quantities */ /* bloody useful in our case */ vbd=vbs-vds; vdb=-vbd; vsb=-vbs; vgfd=vgfs-vds; vgbd=vgbs-vds; vgbb=vgbs-vbs; vgfdo = *(ckt->CKTstate0 + here->SOI3vgfs) - *(ckt->CKTstate0 + here->SOI3vds); vgbdo = *(ckt->CKTstate0 + here->SOI3vgbs) - *(ckt->CKTstate0 + here->SOI3vds); delvbs = vbs - *(ckt->CKTstate0 + here->SOI3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->SOI3vbd); delvgfs = vgfs - *(ckt->CKTstate0 + here->SOI3vgfs); delvgbs = vgbs - *(ckt->CKTstate0 + here->SOI3vgbs); delvds = vds - *(ckt->CKTstate0 + here->SOI3vds); delvgfd = vgfd-vgfdo; delvgbd = vgbd-vgbdo; deldeltaT = deltaT - *(ckt->CKTstate0 + here->SOI3deltaT); /* these are needed for convergence testing */ /* we're keeping these the same as convergence on vgfs, vbs, vbd, vgbs, deltaT is equiv to conv. on vgfb, vsb, vdb, vgb_b, deltaT */ if (here->SOI3mode >= 0) { /* normal */ idhat= here->SOI3id- here->SOI3gbd * delvbd - here->SOI3gbdT * deldeltaT + /* for -ibd bit of id */ (here->SOI3gmbs + here->SOI3gMmbs) * delvbs + (here->SOI3gmf + here->SOI3gMmf) * delvgfs + (here->SOI3gmb + here->SOI3gMmb) * delvgbs + (here->SOI3gds + here->SOI3gMd) * delvds + (here->SOI3gt + here->SOI3gMdeltaT) * deldeltaT + here->SOI3gBJTdb_bs * delvbs + here->SOI3gBJTdb_deltaT * deldeltaT; ibhat= here->SOI3ibs + here->SOI3ibd + here->SOI3gbd * delvbd + here->SOI3gbdT * deldeltaT + here->SOI3gbs * delvbs + here->SOI3gbsT * deldeltaT - here->SOI3iMdb - here->SOI3gMmbs * delvbs - here->SOI3gMmf * delvgfs - here->SOI3gMmb * delvgbs - here->SOI3gMd * delvds - here->SOI3gMdeltaT * deldeltaT - here->SOI3iBJTsb - here->SOI3gBJTsb_bd * delvbd - here->SOI3gBJTsb_deltaT * deldeltaT - here->SOI3iBJTdb - here->SOI3gBJTdb_bs * delvbs - here->SOI3gBJTdb_deltaT * deldeltaT; } else { /* A over T */ idhat= here->SOI3id - ( here->SOI3gbd + here->SOI3gmbs) * delvbd - (here->SOI3gmf) * delvgfd - (here->SOI3gmb) * delvgbd + (here->SOI3gds) * delvds - (here->SOI3gt + here->SOI3gbdT) * deldeltaT + here->SOI3gBJTdb_bs * delvbs + here->SOI3gBJTdb_deltaT * deldeltaT; ibhat= here->SOI3ibs + here->SOI3ibd + here->SOI3gbd * delvbd + here->SOI3gbdT * deldeltaT + here->SOI3gbs * delvbs + here->SOI3gbsT * deldeltaT - here->SOI3iMsb - here->SOI3gMmbs * delvbd - here->SOI3gMmf * delvgfd - here->SOI3gMmb * delvgbd + here->SOI3gMd * delvds - /* gMd should go with vsd */ here->SOI3gMdeltaT * deldeltaT - here->SOI3iBJTsb - here->SOI3gBJTsb_bd * delvbd - here->SOI3gBJTsb_deltaT * deldeltaT - here->SOI3iBJTdb - here->SOI3gBJTdb_bs * delvbs - here->SOI3gBJTdb_deltaT * deldeltaT; } /* thermal current source comparator */ iPthat =here->SOI3iPt + here->SOI3gPmbs * delvbs + here->SOI3gPmf * delvgfs + here->SOI3gPmb * delvgbs + here->SOI3gPds * delvds * here->SOI3mode + here->SOI3gPdT * deldeltaT; #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* the following mess should be one if statement, but * many compilers can't handle it all at once, so it * is split into several successive if statements */ /* bypass just needs to check any four voltages have not changed so leave as before to avoid hassle */ tempv = MAX(fabs(ibhat),fabs(here->SOI3ibs + here->SOI3ibd-here->SOI3iMsb - here->SOI3iMdb - here->SOI3iBJTdb - here->SOI3iBJTsb))+ckt->CKTabstol; if((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG) )) && (ckt->CKTbypass) ) if ( (fabs(ibhat-(here->SOI3ibs + here->SOI3ibd-here->SOI3iMdb - here->SOI3iMsb - here->SOI3iBJTdb - here->SOI3iBJTsb)) < ckt->CKTreltol * tempv)) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->SOI3vbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->SOI3vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgfs) < (ckt->CKTreltol * MAX(fabs(vgfs), fabs(*(ckt->CKTstate0+here->SOI3vgfs)))+ ckt->CKTvoltTol))) if( (fabs(delvgbs) < (ckt->CKTreltol * MAX(fabs(vgbs), fabs(*(ckt->CKTstate0+here->SOI3vgbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->SOI3vds)))+ ckt->CKTvoltTol)) ) if ( (fabs(deldeltaT) < (ckt->CKTreltol * MAX(fabs(deltaT), fabs(*(ckt->CKTstate0+here->SOI3deltaT)))+ ckt->CKTvoltTol)) ) if( (fabs(iPthat- here->SOI3iPt) < ckt->CKTreltol * MAX(fabs(iPthat),fabs( here->SOI3iPt)) + ckt->CKTabstol) ) if( (fabs(idhat- here->SOI3id) < ckt->CKTreltol * MAX(fabs(idhat),fabs( here->SOI3id)) + ckt->CKTabstol) ) { /* bypass code */ /* nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration out * and keep going */ vbs = *(ckt->CKTstate0 + here->SOI3vbs); vbd = *(ckt->CKTstate0 + here->SOI3vbd); vgfs = *(ckt->CKTstate0 + here->SOI3vgfs); vgbs = *(ckt->CKTstate0 + here->SOI3vgbs); vds = *(ckt->CKTstate0 + here->SOI3vds); deltaT = *(ckt->CKTstate0 + here->SOI3deltaT); deltaT1 = *(ckt->CKTstate0 + here->SOI3deltaT1); deltaT2 = *(ckt->CKTstate0 + here->SOI3deltaT2); deltaT3 = *(ckt->CKTstate0 + here->SOI3deltaT3); deltaT4 = *(ckt->CKTstate0 + here->SOI3deltaT4); deltaT5 = *(ckt->CKTstate0 + here->SOI3deltaT5); /* and now the extra ones */ vsb=-vbs; vdb=-vbd; vgfb = vgfs - vbs; vgbb = vgbs - vbs; /* JimB - 15/9/99 */ /* Code for multiple thermal time constants. Start by moving all */ /* rt constants into arrays. */ rtargs[0]=here->SOI3rt; rtargs[1]=here->SOI3rt1; rtargs[2]=here->SOI3rt2; rtargs[3]=here->SOI3rt3; rtargs[4]=here->SOI3rt4; /* Set all conductance components to zero. */ grt[0]=grt[1]=grt[2]=grt[3]=grt[4]=0.0; /* Now calculate conductances from rt. */ /* Don't need to worry about divide by zero when calculating */ /* grt components, as soi3setup() only creates a thermal node */ /* if corresponding rt is greater than zero. */ for(tnodeindex=0;tnodeindexSOI3numThermalNodes;tnodeindex++) { grt[tnodeindex]=1/rtargs[tnodeindex]; } /* End JimB */ vgfd = vgfs - vds; vgbd = vgbs - vds; if (here->SOI3mode==1) { idrain = here->SOI3id + here->SOI3ibd - here->SOI3iMdb - here->SOI3iBJTdb; } else { idrain = -here->SOI3id - here->SOI3ibd + here->SOI3iBJTdb; } /* Pt doesn't need changing as it's in here->SOI3iPt */ if((ckt->CKTmode & (MODETRAN | MODEAC)) || (ckt->CKTmode & MODETRANOP)) { cgfgf = *(ckt->CKTstate0 + here->SOI3cgfgf); cgfd = *(ckt->CKTstate0 + here->SOI3cgfd); cgfs = *(ckt->CKTstate0 + here->SOI3cgfs); cgfdeltaT = *(ckt->CKTstate0 + here->SOI3cgfdeltaT); cgfgb = *(ckt->CKTstate0 + here->SOI3cgfgb); csgf = *(ckt->CKTstate0 + here->SOI3csgf); csd = *(ckt->CKTstate0 + here->SOI3csd); css = *(ckt->CKTstate0 + here->SOI3css); csdeltaT = *(ckt->CKTstate0 + here->SOI3csdeltaT); csgb = *(ckt->CKTstate0 + here->SOI3csgb); cdgf = *(ckt->CKTstate0 + here->SOI3cdgf); cdd = *(ckt->CKTstate0 + here->SOI3cdd); cds = *(ckt->CKTstate0 + here->SOI3cds); cddeltaT = *(ckt->CKTstate0 + here->SOI3cddeltaT); cdgb = *(ckt->CKTstate0 + here->SOI3cdgb); cgbgf = *(ckt->CKTstate0 + here->SOI3cgbgf); cgbd = *(ckt->CKTstate0 + here->SOI3cgbd); cgbs = *(ckt->CKTstate0 + here->SOI3cgbs); cgbdeltaT = *(ckt->CKTstate0 + here->SOI3cgbdeltaT); cgbgb = *(ckt->CKTstate0 + here->SOI3cgbgb); cbgf = -(cgfgf + cdgf + csgf + cgbgf); cbd = -(cgfd + cdd + csd + cgbd); cbs = -(cgfs + cds + css + cgbs); cbdeltaT = -(cgfdeltaT + cddeltaT + csdeltaT + cgbdeltaT); cbgb = -(cgfgb + cdgb + csgb + cgbgb); qgatef = *(ckt->CKTstate0 + here->SOI3qgf); qdrn = *(ckt->CKTstate0 + here->SOI3qd); qsrc = *(ckt->CKTstate0 + here->SOI3qs); qgateb = *(ckt->CKTstate0 + here->SOI3qgb); qbody = -(qgatef + qdrn + qsrc + qgateb); ByPass = 1; goto bypass1; } goto bypass2; } #endif /*NOBYPASS*/ /* ok - bypass is out, do it the hard way */ von = model->SOI3type * here->SOI3von; #ifndef NODELIMITING /* * limiting * we want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->SOI3vds) >=0) { vgfs = DEVfetlim(vgfs,*(ckt->CKTstate0 + here->SOI3vgfs) ,von); vds = vgfs - vgfd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->SOI3vds)); vgfd = vgfs - vds; } else { vgfd = DEVfetlim(vgfd,vgfdo,von); vds = vgfs - vgfd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->SOI3vds))); } vgfs = vgfd + vds; } if(vds >= 0) { vbs = DEVsoipnjlim(vbs,*(ckt->CKTstate0 + here->SOI3vbs), vt,here->SOI3sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVsoipnjlim(vbd,*(ckt->CKTstate0 + here->SOI3vbd), vt,here->SOI3drainVcrit,&Check); vbs = vbd + vds; } /* and now some limiting of the temperature rise */ if (deltaT>(10 + *(ckt->CKTstate0 + here->SOI3deltaT))) { deltaT = 10 + *(ckt->CKTstate0 + here->SOI3deltaT); /* need limiting, therefore must also impose limits on other thermal voltages. */ /* JimB - 19/5/99 */ if (here->SOI3numThermalNodes == 0) { deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 1) { deltaT1=deltaT; deltaT2=deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 2) { deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node)); deltaT1 = deltaT - deltaT2; deltaT3=deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 3) { deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node)); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3); deltaT1 = deltaT - deltaT2 - deltaT3; deltaT4=deltaT5=0; } if (here->SOI3numThermalNodes == 4) { deltaT4 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout3Node)); deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node) - deltaT4); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3 - deltaT4); deltaT1 = deltaT - deltaT2 - deltaT3 - deltaT4; deltaT5=0; } if (here->SOI3numThermalNodes == 5) { deltaT5 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout4Node)); deltaT4 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout3Node) - deltaT5); deltaT3 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout2Node) - deltaT4 - deltaT5); deltaT2 = MAX(0,*(ckt->CKTrhsOld+here->SOI3tout1Node) - deltaT3 - deltaT4 - deltaT5); deltaT1 = deltaT - deltaT2 - deltaT3 - deltaT4 - deltaT5; } Check = 1; } #endif /*NODELIMITING*/ } else { /* ok - not one of the simple cases, so we have to * look at all of the possibilities for why we were * called. We still just initialize the three voltages */ if((ckt->CKTmode & MODEINITJCT) && !here->SOI3off) { vds= model->SOI3type * here->SOI3icVDS; vgfs= model->SOI3type * here->SOI3icVGFS; vgbs= model->SOI3type * here->SOI3icVGBS; vbs= model->SOI3type * here->SOI3icVBS; deltaT=deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0.0; if((vds==0) && (vgfs==0) && (vbs==0) && (vgbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgfs = model->SOI3type * here->SOI3tVto; vds = 0; vgbs = 0; deltaT=deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0.0; } } else { vbs=vgfs=vds=vgbs=deltaT=deltaT1=deltaT2=deltaT3=deltaT4=deltaT5=0.0; } } /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgfd = vgfs - vds; vgbd = vgbs - vds; vgfb = vgfs - vbs; vgbb = vgbs - vbs; vsb = -vbs; vdb = -vbd; /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->SOI3mode = 1; } else { /* inverse mode */ here->SOI3mode = -1; } { /* begin block */ /* * This block works out drain current and derivatives. * It does this via the calculation of the surface potential * which is a bit complex mostly for reasons of continuity * and robustness - c'est la vie. * */ /* the following variables are local to this code block until * it is obvious that they can be made global */ double vg; double eta_s; /* 1+Citf/Cof */ double gamma,sigma; double Egy = 0.0,vgy,Sgy; double psi_ss; double AL,A0,LL,L0; double ALx,A0x,EAL = 0.0,EA0 = 0.0; double logterm0,logtermL; double Vgconst0,VgconstL; double Egx0 = 0.0,EgxL = 0.0; double vgx0,vgxL; double psi_si0,psi_siL,psi_st0; double Esi0 = 0.0,EsiL = 0.0,Ess0 = 0.0; double theta2; double TVF; /* thermal velocity-saturation factor */ double Mmob; double sqt0,sqt0one; double alpha,delta,Bf; double vGBF,vGT,vGBT; double PSI; double S; double psi_sLsat; double Esd0 = 0.0,EsdL = 0.0; double psi_s0,psi_sL; double fL,f0; double DfL_Dvgfb,DfL_Dvdb,DfL_Dvsb,DfL_DdeltaT; double Df0_Dvgfb,Df0_Dvdb,Df0_Dvsb,Df0_DdeltaT; double ld,Dld_Dvgfb,Dld_Dvdb,Dld_Dvsb,Dld_DdeltaT; double ich0; double pDpsi_si0_Dvgx0,pDpsi_siL_DvgxL; double Dvgx0_Dvgfb,pDvgx0_Dvg,Dvgx0_Dvsb,Dvgx0_Dvdb,Dvgx0_DdeltaT; double DvgxL_Dvgfb,pDvgxL_Dvg,DvgxL_Dvsb,DvgxL_Dvdb,DvgxL_DdeltaT; double pDpsi_si0_Dvsb,pDpsi_siL_Dvdb; double Dpsi_si0_Dvgfb,Dpsi_si0_Dvsb,Dpsi_si0_Dvdb; double Dpsi_siL_Dvgfb,Dpsi_siL_Dvsb,Dpsi_siL_Dvdb; double Dpsi_ss_Dvgfb,Dpsi_ss_Dvsb,Dpsi_ss_Dvdb; double Dpsi_st0_Dvgfb,Dpsi_st0_Dvsb,Dpsi_st0_Dvdb; double pDdelta_Dpsi_st0; double Dalpha_Dvgfb,Dalpha_Dvdb,Dalpha_Dvsb,Dalpha_DdeltaT; double DPSI_Dvgfb,DPSI_Dvdb,DPSI_Dvsb,DPSI_DdeltaT; double pDBf_Dpsi_st0,DvGT_Dvgfb,DvGT_Dvsb,DvGT_Dvdb,DvGT_DdeltaT; double D,DS_Dvgfb,DS_Dvsb,DS_Dvdb,DS_DdeltaT; double Dpsi_sLsat_Dvgfb,Dpsi_sLsat_Dvsb,Dpsi_sLsat_Dvdb; double gmg,gmd,gms,gmt; double Dpsi_si0_DdeltaT,Dpsi_siL_DdeltaT; double Dpsi_ss_DdeltaT,Dpsi_st0_DdeltaT; double Dpsi_sLsat_DdeltaT; double Dpsi_sL_Dvgfb,Dpsi_s0_Dvgfb,Dpsi_sL_Dvdb,Dpsi_s0_Dvdb; double Dpsi_sL_Dvsb,Dpsi_s0_Dvsb,Dpsi_sL_DdeltaT,Dpsi_s0_DdeltaT; double vdsat; double Dvdsat_Dvgfb,Dvdsat_Dvsb,Dvdsat_Dvdb,Dvdsat_DdeltaT; int i; double vds2m,vdsat2m,Em,vdslim; double Dvdslim_Dvgfb,Dvdslim_Dvdb,Dvdslim_Dvsb,Dvdslim_DdeltaT; double Vmx; double DVmx_Dvgfb,DVmx_Dvdb,DVmx_Dvsb,DVmx_DdeltaT; double Vm1,Em1,Vm1x; double DVm1x_Dvgfb,DVm1x_Dvdb,DVm1x_Dvsb,DVm1x_DdeltaT; double vgeff,lm,lmeff,Elm,Dlm_Dvgfb,Dlm_Dvdb,Dlm_Dvsb,Dlm_DdeltaT; double Mminus1=0; double EM,betaM; double gMg,gMd,gMs; double Fm; /* mobility degradation factor */ double Y; /* channel length modulation factor */ double tmp,tmp1; /* temporary var to aid pre-calculation */ double TMF; /* thermal mobility factor */ int vgx0trans,vgxLtrans; /* flags to indicate if vg transform performed */ int psi_s0_trans,psi_sL_trans=0; int Ess0_trans,Esd0_trans,EsdL_trans; int A0trans,ALtrans; double vT,EchiD,EchiD1; double BetaBJTeff; /* Now we use a nasty trick - if device is A over T, must "swap" drain and source potentials. we do a literal switch and change it back for the outside world. */ if (here->SOI3mode == -1) { tmp = vsb; vsb = vdb; vdb = tmp; } /* Intrinsic Electrical Bit - has a bit of thermal due to TTC */ sigma = model->SOI3sigma/(EffectiveLength); eta_s = 1 + (model->SOI3C_ssf/model->SOI3frontOxideCapFactor); vg = vgfb - here->SOI3tVfbF * model->SOI3type + sigma*(here->SOI3mode*vds) - model->SOI3chiFB*deltaT; gamma = model->SOI3gamma * (1 + (model->SOI3deltaW)/(here->SOI3w)) * (1 - (model->SOI3deltaL)/EffectiveLength); /* must introduce some limiting to prevent exp overflow */ if (vg > (vt*MAX_EXP_ARG)) { vgy = vg; } else { Egy = exp(vg/vt); vgy = vt*log(1+Egy); } Sgy = sqrt((vgy/eta_s) + (gamma*gamma)/(4*eta_s*eta_s)); psi_ss = (Sgy-0.5*gamma/eta_s)*(Sgy-0.5*gamma/eta_s); A0 = here->SOI3tPhi + vsb; AL = here->SOI3tPhi + vdb; if (A0 > (vt*MAX_EXP_ARG)) { A0x = A0; A0trans = 0; } else { EA0 = exp(A0/vt); A0x = vt * log(1+EA0); A0trans = 1; } if (AL > (vt*MAX_EXP_ARG)) { ALx = AL; ALtrans = 0; } else { EAL = exp(AL/vt); ALx = vt * log(1+EAL); ALtrans = 1; } /* if vg is very large then don't need to transform vg into vgx. */ Vgconst0 = eta_s*A0x - vt*(eta_s - 1) + gamma*sqrt(A0x); if ((vg-Vgconst0) < (5 * vt * MAX_EXP_ARG)) { vgx0trans = 1; Egx0 = exp((vg - Vgconst0)/(5*vt)); vgx0 = (5*vt) * log(1 + Egx0) + Vgconst0; } else { vgx0trans = 0; /* no transform performed */ vgx0 = vg; } VgconstL = eta_s*ALx - vt*(eta_s - 1) + gamma*sqrt(ALx); if ((vg-VgconstL) < (5 * vt * MAX_EXP_ARG)) { vgxLtrans = 1; EgxL = exp((vg - VgconstL)/(5*vt)); vgxL = (5*vt) * log(1 + EgxL) + VgconstL; } else { vgxLtrans = 0; /* no transform performed */ vgxL = vg; } L0 = vgx0 - eta_s*(A0 - vt); LL = vgxL - eta_s*(AL - vt); logterm0 = ((L0/gamma)*(L0/gamma) - A0)/vt; logtermL = ((LL/gamma)*(LL/gamma) - AL)/vt; if (logterm0<=0) { /* can only happen due to numerical problems with sqrt*/ psi_si0 = A0 + model->SOI3chiPHI*deltaT + vt*log(vt/(gamma*gamma)); } else { psi_si0 = A0 + model->SOI3chiPHI*deltaT + vt*log(logterm0); } if (logtermL<=0) { psi_siL = AL + model->SOI3chiPHI*deltaT + vt*log(vt/(gamma*gamma)); } else { psi_siL = AL + model->SOI3chiPHI*deltaT + vt*log(logtermL); } if ((psi_si0-psi_ss) < vt*MAX_EXP_ARG) { Ess0 = exp((psi_si0-psi_ss)/vt); Ess0_trans = 1; if (psi_si0 > (vt * MAX_EXP_ARG)) { /* psi_si0 is BIG */ psi_st0 = psi_si0 - vt*log(1+Ess0); psi_s0_trans = 0; } else { Esi0 = exp(psi_si0/vt); psi_st0 = vt*log(1+(Esi0/(1+Ess0))); psi_s0_trans = 1; } } else { psi_st0 = psi_ss; Ess0_trans = 0; psi_s0_trans = 0; } /* now for psi_sLsat - has thermal influence ! (if vel sat is included) */ TMF = exp(-model->SOI3k*log(1+(deltaT/here->SOI3temp))); sqt0 = sqrt(psi_st0+1E-25); sqt0one = sqrt(1+psi_st0); /* delta is formulated this way so we can change it here and nowhere else */ delta = 0.5/sqt0one; pDdelta_Dpsi_st0 = -0.25/((1+psi_st0)*sqt0one); alpha = eta_s+gamma*delta; vGBF = vg - psi_st0; Bf = sqt0 - delta*psi_st0; vGT = vg - gamma*Bf; vGBT = vGT + alpha*vt; if(model->SOI3vsat == 0) { theta2 = 0; TVF = 0.0; /* could be any nominal value */ } else { TVF = 0.8*exp((here->SOI3temp+deltaT)/600); theta2 = (here->SOI3tSurfMob/(model->SOI3vsat))*1e-2 /*cm to m*/ *TMF*(1+TVF)/(EffectiveLength*(1+model->SOI3TVF0)); /* theta2=1/(L.Ec) */ } Mmob = theta2 - 0.5*model->SOI3theta; PSI = MAX(0,(vGT/alpha) - psi_st0); S = 0.5*(1+sqrt(1 + (2*Mmob*PSI)/(1+model->SOI3theta*vGBF))); psi_sLsat = psi_st0 + PSI/S; if ((psi_si0 - psi_sLsat)<(vt*MAX_EXP_ARG)) { Esd0 = exp((psi_si0 - psi_sLsat)/vt); Esd0_trans = 1; if (psi_s0_trans) { psi_s0 = vt*log(1+Esi0/(1+Esd0)); } else { psi_s0 = psi_si0 - vt*log(1+Esd0); } } else { psi_s0 = psi_sLsat; Esd0_trans = 0; } if ((psi_siL - psi_sLsat)<(vt*MAX_EXP_ARG)) { EsdL = exp((psi_siL - psi_sLsat)/vt); EsdL_trans = 1; if (psi_siL < (vt * MAX_EXP_ARG)) { EsiL = exp(psi_siL/vt); psi_sL = vt*log(1+EsiL/(1+EsdL)); psi_sL_trans = 1; } else { psi_sL = psi_siL - vt*log(1+EsdL); psi_sL_trans = 0; } } else { psi_sL = psi_sLsat; EsdL_trans = 0; } /* if, after all that, we have impossible situation due to numerical limiting schemes ... */ if (psi_s0>psi_sL) { psi_sL = psi_s0; } /* now we can finally work out surface potential for source and drain end */ /* now surface potential is ready */ f0 = (vGBT - 0.5*alpha*psi_s0)*psi_s0; fL = (vGBT - 0.5*alpha*psi_sL)*psi_sL; ich0 = Beta * (fL - f0); /* This is "intrinsic" bit */ /* now for derivatives - they're a bit of a nightmare * * notation pD... means PARTIAL derivative whilst D... * * means FULL derivative */ /* first sub-threshold */ if (vg > (vt*MAX_EXP_ARG)) { Dpsi_ss_Dvgfb = (1-0.5*gamma/(eta_s*Sgy))/eta_s; } else { Dpsi_ss_Dvgfb = (1-0.5*gamma/(eta_s*Sgy))*(Egy/(1+Egy))/eta_s; } Dpsi_ss_Dvsb = Dpsi_ss_Dvgfb*(-sigma); Dpsi_ss_Dvdb = Dpsi_ss_Dvgfb*(sigma); Dpsi_ss_DdeltaT = Dpsi_ss_Dvgfb*(-model->SOI3chiFB); /* now for strong inversion */ pDpsi_si0_Dvgx0 = 2*vt*L0/(L0*L0-gamma*gamma*A0); pDpsi_siL_DvgxL = 2*vt*LL/(LL*LL-gamma*gamma*AL); /* if vg is transformed, must have deriv accordingly, else it is 1 */ if (vgx0trans) { Dvgx0_Dvgfb = pDvgx0_Dvg = Egx0/(1+Egx0); if (A0trans) { /* JimB - 27/8/98 */ /* Get divide by zero errors when A0x is equal to zero */ /* Temporary fix - add small constant to denominator */ /* Dvgx0_Dvsb = pDvgx0_Dvg * (-sigma) + (1-pDvgx0_Dvg)*(eta_s+0.5*gamma/sqrt(A0x))* (EA0/(1+EA0)); */ Dvgx0_Dvsb = pDvgx0_Dvg * (-sigma) + (1-pDvgx0_Dvg)*(eta_s+0.5*gamma/(sqrt(A0x)+1e-25))* (EA0/(1+EA0)); /* End JimB */ } else { /* JimB - 27/8/97 */ /* Temporary fix - add small constant to denominator */ /*Dvgx0_Dvsb = pDvgx0_Dvg * (-sigma) + (1-pDvgx0_Dvg)*(eta_s+0.5*gamma/sqrt(A0)); */ Dvgx0_Dvsb = pDvgx0_Dvg * (-sigma) + (1-pDvgx0_Dvg)*(eta_s+0.5*gamma/(sqrt(A0)+1e-25)); /* End JimB */ } Dvgx0_Dvdb = pDvgx0_Dvg*(sigma); Dvgx0_DdeltaT = pDvgx0_Dvg*(-model->SOI3chiFB); } else { Dvgx0_Dvgfb = pDvgx0_Dvg = 1; Dvgx0_Dvsb = (-sigma); Dvgx0_Dvdb = (sigma); Dvgx0_DdeltaT = (-model->SOI3chiFB); } if (vgxLtrans) { DvgxL_Dvgfb = pDvgxL_Dvg = EgxL/(1+EgxL); DvgxL_Dvsb = pDvgxL_Dvg * (-sigma); if (ALtrans) { /* JimB - 27/8/98 */ /* Get divide by zero errors when ALx is equal to zero */ /* Temporary fix - add small constant to denominator */ /*DvgxL_Dvdb = pDvgxL_Dvg * (sigma) + (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/sqrt(ALx))* (EAL/(1+EAL)); */ DvgxL_Dvdb = pDvgxL_Dvg * (sigma) + (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/(sqrt(ALx)+1e-25))* (EAL/(1+EAL)); /* End JimB */ } else { /* JimB - 27/8/97 */ /* Temporary fix - add small constant to denominator */ /* DvgxL_Dvdb = pDvgxL_Dvg * (sigma) + (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/sqrt(AL)); */ DvgxL_Dvdb = pDvgxL_Dvg * (sigma) + (1-pDvgxL_Dvg)*(eta_s+0.5*gamma/(sqrt(AL)+1e-25)); /* End JimB */ } DvgxL_DdeltaT = pDvgxL_Dvg * (-model->SOI3chiFB); } else { DvgxL_Dvgfb = 1; DvgxL_Dvsb = (-sigma); DvgxL_Dvdb = (sigma); DvgxL_DdeltaT = (-model->SOI3chiFB); } pDpsi_si0_Dvsb = 1 - (2*vt*eta_s*L0+vt*gamma*gamma)/(L0*L0-gamma*gamma*A0); pDpsi_siL_Dvdb = 1 - (2*vt*eta_s*LL+vt*gamma*gamma)/(LL*LL-gamma*gamma*AL); Dpsi_si0_Dvgfb = pDpsi_si0_Dvgx0*Dvgx0_Dvgfb; Dpsi_si0_Dvsb = pDpsi_si0_Dvgx0*Dvgx0_Dvsb + pDpsi_si0_Dvsb; Dpsi_si0_Dvdb = pDpsi_si0_Dvgx0*Dvgx0_Dvdb; Dpsi_si0_DdeltaT = model->SOI3chiPHI + pDpsi_si0_Dvgx0*Dvgx0_DdeltaT; Dpsi_siL_Dvgfb = pDpsi_siL_DvgxL*DvgxL_Dvgfb; Dpsi_siL_Dvsb = pDpsi_siL_DvgxL*DvgxL_Dvsb; Dpsi_siL_Dvdb = pDpsi_siL_DvgxL*DvgxL_Dvdb + pDpsi_siL_Dvdb; Dpsi_siL_DdeltaT = model->SOI3chiPHI + pDpsi_siL_DvgxL*DvgxL_DdeltaT; /* now we can get full deriv of first guess but also, partials of psi_s0 and psi_sL, the final values have similar structure, so do them now as well */ /* deriv of psi_s etc wrt psi_si must be according to transform used */ if (Ess0_trans) { if (psi_s0_trans) { tmp = (Esi0/(1+Ess0+Esi0))/(1+Ess0); tmp1 = (Esi0/(1+Ess0+Esi0))*(Ess0/(1+Ess0)); } else { tmp = 1/(1+Ess0); tmp1 = Ess0*tmp; } Dpsi_st0_Dvgfb = tmp*Dpsi_si0_Dvgfb + tmp1*Dpsi_ss_Dvgfb; Dpsi_st0_Dvsb = tmp*Dpsi_si0_Dvsb + tmp1*Dpsi_ss_Dvsb; Dpsi_st0_Dvdb = tmp*Dpsi_si0_Dvdb + tmp1*Dpsi_ss_Dvdb; Dpsi_st0_DdeltaT = tmp*Dpsi_si0_DdeltaT + tmp1*Dpsi_ss_DdeltaT; } else { Dpsi_st0_Dvgfb = Dpsi_ss_Dvgfb; Dpsi_st0_Dvdb = Dpsi_ss_Dvdb; Dpsi_st0_Dvsb = Dpsi_ss_Dvsb; Dpsi_st0_DdeltaT = Dpsi_ss_DdeltaT; } /* now some itsy bitsy quantities useful all over the shop */ /* Ddelta_Dpsi_st0 is defined earlier with delta to allow change of delta expression in one place */ pDBf_Dpsi_st0 = 0.5/sqt0 - psi_st0*pDdelta_Dpsi_st0 - delta; DvGT_Dvgfb = 1 - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvgfb; DvGT_Dvsb = (-sigma) - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvsb; DvGT_Dvdb = (sigma) - gamma*pDBf_Dpsi_st0*Dpsi_st0_Dvdb; DvGT_DdeltaT = (-model->SOI3chiFB) - gamma*pDBf_Dpsi_st0*Dpsi_st0_DdeltaT; Dalpha_Dvgfb = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvgfb; Dalpha_Dvsb = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvsb; Dalpha_Dvdb = gamma*pDdelta_Dpsi_st0*Dpsi_st0_Dvdb; Dalpha_DdeltaT = gamma*pDdelta_Dpsi_st0*Dpsi_st0_DdeltaT; /* Now for saturation stuff psi_sLsat */ /* NB no need for special case, theta2=0 ==> Mmob=-theta/2 */ if (PSI != 0) { /* stops unnecessary math if PSI = 0 */ DPSI_Dvgfb = (DvGT_Dvgfb - (vGT/alpha)*Dalpha_Dvgfb )/alpha - Dpsi_st0_Dvgfb; DPSI_Dvsb = (DvGT_Dvsb - (vGT/alpha)*Dalpha_Dvsb )/alpha - Dpsi_st0_Dvsb; DPSI_Dvdb = (DvGT_Dvdb - (vGT/alpha)*Dalpha_Dvdb )/alpha - Dpsi_st0_Dvdb; DPSI_DdeltaT = (DvGT_DdeltaT - (vGT/alpha)*Dalpha_DdeltaT )/alpha - Dpsi_st0_DdeltaT; D = 2*(1+model->SOI3theta*vGBF)* sqrt(1 + (2*Mmob*PSI)/(1+model->SOI3theta*vGBF)); DS_Dvgfb = (Mmob/D)*DPSI_Dvgfb - (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF))) *(1-Dpsi_st0_Dvgfb); DS_Dvsb = (Mmob/D)*DPSI_Dvsb - (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF))) *((-sigma)-Dpsi_st0_Dvsb); DS_Dvdb = (Mmob/D)*DPSI_Dvdb - (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF))) *((sigma)-Dpsi_st0_Dvdb); DS_DdeltaT = (Mmob/D)*DPSI_DdeltaT - (Mmob*PSI*(model->SOI3theta)/(D*(1+model->SOI3theta*vGBF))) *((-model->SOI3chiFB)-Dpsi_st0_DdeltaT) - (PSI/D)*theta2*(model->SOI3k/(deltaT+here->SOI3temp) - TVF/(600*(1+TVF))); Dpsi_sLsat_Dvgfb = Dpsi_st0_Dvgfb + DPSI_Dvgfb/S - PSI*DS_Dvgfb/(S*S); Dpsi_sLsat_Dvsb = Dpsi_st0_Dvsb + DPSI_Dvsb/S - PSI*DS_Dvsb/(S*S); Dpsi_sLsat_Dvdb = Dpsi_st0_Dvdb + DPSI_Dvdb/S - PSI*DS_Dvdb/(S*S); Dpsi_sLsat_DdeltaT = Dpsi_st0_DdeltaT + DPSI_DdeltaT/S - PSI*DS_DdeltaT/(S*S); } else { Dpsi_sLsat_Dvgfb = Dpsi_st0_Dvgfb; Dpsi_sLsat_Dvsb = Dpsi_st0_Dvsb; Dpsi_sLsat_Dvdb = Dpsi_st0_Dvdb; Dpsi_sLsat_DdeltaT = Dpsi_st0_DdeltaT; } if (Esd0_trans) { if (psi_s0_trans) { tmp = (Esi0/(1+Esd0+Esi0))/(1+Esd0); tmp1 = (Esi0/(1+Esd0+Esi0))*(Esd0/(1+Esd0)); } else { tmp = 1/(1+Esd0); tmp1 = Esd0*tmp; } Dpsi_s0_Dvgfb = tmp*Dpsi_si0_Dvgfb + tmp1*Dpsi_sLsat_Dvgfb; Dpsi_s0_Dvdb = tmp*Dpsi_si0_Dvdb + tmp1*Dpsi_sLsat_Dvdb; Dpsi_s0_Dvsb = tmp*Dpsi_si0_Dvsb + tmp1*Dpsi_sLsat_Dvsb; Dpsi_s0_DdeltaT = tmp*Dpsi_si0_DdeltaT + tmp1*Dpsi_sLsat_DdeltaT; } else { Dpsi_s0_Dvgfb = Dpsi_sLsat_Dvgfb; Dpsi_s0_Dvdb = Dpsi_sLsat_Dvdb; Dpsi_s0_Dvsb = Dpsi_sLsat_Dvsb; Dpsi_s0_DdeltaT = Dpsi_sLsat_DdeltaT; } if (EsdL_trans) { if (psi_sL_trans) { tmp = (EsiL/(1+EsdL+EsiL))/(1+EsdL); tmp1 = (EsiL/(1+EsdL+EsiL))*(EsdL/(1+EsdL)); } else { tmp = 1/(1+EsdL); tmp1 = EsdL*tmp; } Dpsi_sL_Dvgfb = tmp*Dpsi_siL_Dvgfb + tmp1*Dpsi_sLsat_Dvgfb; Dpsi_sL_Dvdb = tmp*Dpsi_siL_Dvdb + tmp1*Dpsi_sLsat_Dvdb; Dpsi_sL_Dvsb = tmp*Dpsi_siL_Dvsb + tmp1*Dpsi_sLsat_Dvsb; Dpsi_sL_DdeltaT = tmp*Dpsi_siL_DdeltaT + tmp1*Dpsi_sLsat_DdeltaT; } else { Dpsi_sL_Dvgfb = Dpsi_sLsat_Dvgfb; Dpsi_sL_Dvdb = Dpsi_sLsat_Dvdb; Dpsi_sL_Dvsb = Dpsi_sLsat_Dvsb; Dpsi_sL_DdeltaT = Dpsi_sLsat_DdeltaT; } /* now for the whole kaboodle */ DfL_Dvgfb = psi_sL*(DvGT_Dvgfb + vt*Dalpha_Dvgfb) - psi_sL*psi_sL*0.5*Dalpha_Dvgfb + (vGBT - alpha*psi_sL)*Dpsi_sL_Dvgfb; Df0_Dvgfb = psi_s0*(DvGT_Dvgfb + vt*Dalpha_Dvgfb) - psi_s0*psi_s0*0.5*Dalpha_Dvgfb + (vGBT - alpha*psi_s0)*Dpsi_s0_Dvgfb; DfL_Dvdb = psi_sL*(DvGT_Dvdb + vt*Dalpha_Dvdb) - psi_sL*psi_sL*0.5*Dalpha_Dvdb + (vGBT - alpha*psi_sL)*Dpsi_sL_Dvdb; Df0_Dvdb = psi_s0*(DvGT_Dvdb + vt*Dalpha_Dvdb) - psi_s0*psi_s0*0.5*Dalpha_Dvdb + (vGBT - alpha*psi_s0)*Dpsi_s0_Dvdb; DfL_Dvsb = psi_sL*(DvGT_Dvsb + vt*Dalpha_Dvsb) - psi_sL*psi_sL*0.5*Dalpha_Dvsb + (vGBT - alpha*psi_sL)*Dpsi_sL_Dvsb; Df0_Dvsb = psi_s0*(DvGT_Dvsb + vt*Dalpha_Dvsb) - psi_s0*psi_s0*0.5*Dalpha_Dvsb + (vGBT - alpha*psi_s0)*Dpsi_s0_Dvsb; DfL_DdeltaT = psi_sL*(DvGT_DdeltaT + vt*Dalpha_DdeltaT) - psi_sL*psi_sL*0.5*Dalpha_DdeltaT + (vGBT - alpha*psi_sL)*Dpsi_sL_DdeltaT; Df0_DdeltaT = psi_s0*(DvGT_DdeltaT + vt*Dalpha_DdeltaT) - psi_s0*psi_s0*0.5*Dalpha_DdeltaT + (vGBT - alpha*psi_s0)*Dpsi_s0_DdeltaT; /* put them all together and what have you got ...? */ gmg = Beta*(DfL_Dvgfb - Df0_Dvgfb); gmd = Beta*(DfL_Dvdb - Df0_Dvdb); gms = Beta*(DfL_Dvsb - Df0_Dvsb); gmt = Beta*(DfL_DdeltaT - Df0_DdeltaT); /* End Intrinsic Electrical Bit */ /* * High Field Mobility Effects */ Fm = 1 + model->SOI3theta*(vg - 0.5*(psi_sL + psi_s0)) + theta2 * (psi_sL - psi_s0); ich0 = ich0/Fm; here->SOI3ueff = here->SOI3ueff/Fm; gmg = (gmg-ich0*(model->SOI3theta* (1-0.5*(Dpsi_sL_Dvgfb + Dpsi_s0_Dvgfb)) + theta2*(Dpsi_sL_Dvgfb - Dpsi_s0_Dvgfb) ) )/Fm; gmd = (gmd-ich0*(model->SOI3theta* (sigma-0.5*(Dpsi_sL_Dvdb + Dpsi_s0_Dvdb)) + theta2*(Dpsi_sL_Dvdb - Dpsi_s0_Dvdb) ) )/Fm; gms = (gms-ich0*(model->SOI3theta* (-sigma-0.5*(Dpsi_sL_Dvsb + Dpsi_s0_Dvsb)) + theta2*(Dpsi_sL_Dvsb - Dpsi_s0_Dvsb) ) )/Fm; gmt = (gmt-ich0*(model->SOI3theta* ((-model->SOI3chiFB)-0.5*(Dpsi_sL_DdeltaT + Dpsi_s0_DdeltaT) ) + theta2*(Dpsi_sL_DdeltaT - Dpsi_s0_DdeltaT - (psi_sL - psi_s0)*(model->SOI3k/(deltaT+here->SOI3temp) - TVF/(600*(1+TVF)) ) ) ) )/Fm; /* * End High Field Mobility Effects */ /* Now to define bits which affect the drain region */ /* * Channel Length Modulation */ /* JimB - add thermal voltage to vdsat to ensure it remains above zero in subthreshold */ vdsat = psi_sLsat - psi_st0 + vt; Dvdsat_Dvgfb = Dpsi_sLsat_Dvgfb - Dpsi_st0_Dvgfb; Dvdsat_Dvsb = Dpsi_sLsat_Dvsb - Dpsi_st0_Dvsb; Dvdsat_Dvdb = Dpsi_sLsat_Dvdb - Dpsi_st0_Dvdb; Dvdsat_DdeltaT = Dpsi_sLsat_DdeltaT - Dpsi_st0_DdeltaT; m = model->SOI3mexp; if (m>0) { if (vdsat>0) { vds2m = 1; vdsat2m = 1; for (i=0; i<2*m; i=i+1) { vds2m = vds2m*(vds*here->SOI3mode); vdsat2m = vdsat2m*vdsat; } Em = exp(-log(vds2m+vdsat2m)/(2*m)); vdslim = (here->SOI3mode*vds)*vdsat*Em; Dvdslim_Dvgfb = (here->SOI3mode*vds*Em*Dvdsat_Dvgfb*vds2m)/(vds2m+vdsat2m); Dvdslim_Dvdb = (here->SOI3mode*vds*Em*Dvdsat_Dvdb*vds2m + vdsat*Em*vdsat2m)/(vds2m+vdsat2m); Dvdslim_Dvsb = (here->SOI3mode*vds*Em*Dvdsat_Dvsb*vds2m - vdsat*Em*vdsat2m)/(vds2m+vdsat2m); Dvdslim_DdeltaT = (here->SOI3mode*vds*Em*Dvdsat_DdeltaT*vds2m)/(vds2m+vdsat2m); Vmx = (here->SOI3mode*vds) - vdslim; DVmx_Dvgfb = -Dvdslim_Dvgfb; DVmx_Dvdb = 1 - Dvdslim_Dvdb; DVmx_Dvsb = -1 - Dvdslim_Dvsb; DVmx_DdeltaT = -Dvdslim_DdeltaT; } else { Vmx = 0; DVmx_Dvgfb = 0; DVmx_Dvdb = 0; DVmx_Dvsb = 0; DVmx_DdeltaT = 0; } } else { Vmx = (here->SOI3mode*vds) - vdsat; DVmx_Dvgfb = -Dvdsat_Dvgfb; DVmx_Dvdb = 1 - Dvdsat_Dvdb; DVmx_Dvsb = -1 - Dvdsat_Dvsb; DVmx_DdeltaT = -Dvdsat_DdeltaT; } if (model->SOI3useLAMBDA) { ld = model->SOI3lambda*Vmx; tmp = model->SOI3lambda; } else { ld = model->SOI3lx * log(1 + Vmx/model->SOI3vp); tmp = model->SOI3lx/(model->SOI3vp + Vmx); } Y = 1 + (ld/EffectiveLength); Dld_Dvgfb = tmp * DVmx_Dvgfb; Dld_Dvdb = tmp * DVmx_Dvdb; Dld_Dvsb = tmp * DVmx_Dvsb; Dld_DdeltaT = tmp * DVmx_DdeltaT; gmg = gmg * Y + (ich0/EffectiveLength) * Dld_Dvgfb; gmd = gmd * Y + (ich0/EffectiveLength) * Dld_Dvdb; gms = gms * Y + (ich0/EffectiveLength) * Dld_Dvsb; gmt = gmt * Y + (ich0/EffectiveLength) * Dld_DdeltaT; ich0 = ich0 * Y; /* Need to do ich0 last as its old value is needed for gds */ /* * End Channel Length Modulation */ here->SOI3gdsnotherm = here->SOI3gds; /************** Thermal Mobility Stuff **************/ /* thermal effect on intrinsic electrical circuit */ idrain = ich0 * TMF; /* idrain has new value now */ here->SOI3ueff *= TMF; gmg = gmg * TMF; /* here->SOI3gmb = here->SOI3gmb * TMF; */ gms = gms * TMF; gmd = gmd * TMF; /* deltaT is indpt voltage now */ gmt = gmt*TMF - (model->SOI3k/(deltaT+here->SOI3temp)) * idrain; ich0 = idrain; /* * finished intrinsic electrical */ /* * Impact Ionisation current sources */ Vm1 = (here->SOI3mode*vds) + model->SOI3eta*(psi_s0 - psi_sLsat); if (Vm1 > (vt*MAX_EXP_ARG)) { Vm1x = Vm1; tmp = 1; } else { Em1 = exp(MIN(MAX_EXP_ARG,Vm1/vt)); Vm1x = vt * log(1 + Em1) + 1e-25; tmp = (Em1/(1+Em1)); } DVm1x_Dvgfb = tmp*model->SOI3eta*(Dpsi_s0_Dvgfb - Dpsi_sLsat_Dvgfb); DVm1x_Dvdb = tmp*(model->SOI3eta*(Dpsi_s0_Dvdb - Dpsi_sLsat_Dvdb) + 1); DVm1x_Dvsb = tmp*(model->SOI3eta*(Dpsi_s0_Dvsb - Dpsi_sLsat_Dvsb) - 1); DVm1x_DdeltaT = tmp*model->SOI3eta*(Dpsi_s0_DdeltaT - Dpsi_sLsat_DdeltaT); vgeff = vg - vsb - eta_s*here->SOI3tPhi - gamma*sqrt(here->SOI3tPhi); lm = model->SOI3lm + model->SOI3lm1*(here->SOI3mode*vds-vgeff) + model->SOI3lm2*(here->SOI3mode*vds-vgeff)*(here->SOI3mode*vds-vgeff); Elm = exp(MIN(MAX_EXP_ARG,lm/MAX(1e-10,(model->SOI3lm/40)))); lmeff = (model->SOI3lm/40)*log(1+Elm); betaM = 100*(model->SOI3beta0 + model->SOI3chibeta*deltaT); EM = exp(MIN(MAX_EXP_ARG,-(lmeff*betaM)/Vm1x)); Mminus1 = (100*model->SOI3alpha0/betaM) * Vm1x * EM; if (here->SOI3mode==1) { here->SOI3iMdb=Mminus1*ich0; here->SOI3iMsb=0; } else { here->SOI3iMsb=Mminus1*ich0; here->SOI3iMdb=0; } tmp = (Elm/(1+Elm))* (model->SOI3lm1 + 2*model->SOI3lm2*(here->SOI3mode*vds-vgeff)); Dlm_Dvgfb = -tmp; Dlm_Dvdb = tmp*(1-sigma); Dlm_Dvsb = tmp*(sigma); Dlm_DdeltaT = tmp*(model->SOI3chiFB); tmp = (ich0/Vm1x); tmp1 = (1+(lmeff*betaM/Vm1x)); gMg = Mminus1 * (gmg + tmp * (tmp1*DVm1x_Dvgfb - betaM*Dlm_Dvgfb)); gMd = Mminus1 * (gmd + tmp * (tmp1*DVm1x_Dvdb - betaM*Dlm_Dvdb)); gMs = Mminus1 * (gms + tmp * (tmp1*DVm1x_Dvsb - betaM*Dlm_Dvsb)); here->SOI3gMmf = gMg; here->SOI3gMmb = 0; here->SOI3gMmbs= -(gMs + gMg + gMd); here->SOI3gMd = gMd; here->SOI3gMdeltaT = Mminus1*(gmt+ tmp*(tmp1*DVm1x_DdeltaT - betaM*Dlm_DdeltaT - lmeff*model->SOI3chibeta*100) - (ich0*model->SOI3chibeta*100/betaM) ); /* * End Impact Ionisation current sources */ /***** time to convert to conventional names for (trans)conductances *****/ here->SOI3gmf = gmg; here->SOI3gmb = 0; /* FOR NOW */ here->SOI3gmbs = -(gms + gmg + gmd); here->SOI3gds = gmd; here->SOI3gt = gmt; vdsat_ext = psi_sLsat - psi_s0; /* now for thermal subcircuit values */ tmp = (here->SOI3drainConductance==0?0:(1/(here->SOI3drainConductance))); tmp += (here->SOI3sourceConductance==0?0:(1/(here->SOI3sourceConductance))); /* tmp = RS+RD */ here->SOI3iPt = (here->SOI3mode*vds + idrain*tmp)*idrain; here->SOI3gPmf = (here->SOI3mode*vds + 2*idrain*tmp)*here->SOI3gmf; here->SOI3gPmb = (here->SOI3mode*vds + 2*idrain*tmp)*here->SOI3gmb; here->SOI3gPmbs = (here->SOI3mode*vds + 2*idrain*tmp)*here->SOI3gmbs; here->SOI3gPds = idrain + (here->SOI3mode*vds + 2*idrain*tmp)*here->SOI3gds; here->SOI3gPdT = (here->SOI3mode*vds + 2*idrain*tmp)*here->SOI3gt; /* JimB - 15/9/99 */ /* Code for multiple thermal time constants. Start by moving all */ /* rt constants into arrays. */ rtargs[0]=here->SOI3rt; rtargs[1]=here->SOI3rt1; rtargs[2]=here->SOI3rt2; rtargs[3]=here->SOI3rt3; rtargs[4]=here->SOI3rt4; /* Set all conductance components to zero. */ grt[0]=grt[1]=grt[2]=grt[3]=grt[4]=0.0; /* Now calculate conductances from rt. */ /* Don't need to worry about divide by zero when calculating */ /* grt components, as soi3setup() only creates a thermal node */ /* if corresponding rt is greater than zero. */ for(tnodeindex=0;tnodeindexSOI3numThermalNodes;tnodeindex++) { grt[tnodeindex]=1/rtargs[tnodeindex]; } /* End JimB */ /* now end nasty trick - if vsb and vdb have been switched, reverse them back */ if (here->SOI3mode == -1) { tmp = vsb; vsb = vdb; vdb = tmp; } /* * bulk-source and bulk-drain diodes * includes parasitic BJT and 2nd diode * */ tmp = here->SOI3temp+deltaT; tmp1 = here->SOI3temp + model->SOI3dvt * deltaT; vT = CONSTKoverQ * tmp1; if ((model->SOI3betaEXP) != 1.0) { if ((model->SOI3betaEXP) != 2.0) { BetaBJTeff = model->SOI3betaBJT * exp(-(model->SOI3betaEXP)*logL); } else { BetaBJTeff = model->SOI3betaBJT/ (EffectiveLength*EffectiveLength); } } else { BetaBJTeff = model->SOI3betaBJT/EffectiveLength; } alphaBJT = BetaBJTeff/(BetaBJTeff + 1); EchiD = exp(MIN(MAX_EXP_ARG, (model->SOI3chid * deltaT)/(here->SOI3temp*tmp) ) ); EchiD1 = exp(MIN(MAX_EXP_ARG, (model->SOI3chid1 * deltaT)/(here->SOI3temp*tmp) ) ); ISts = SourceSatCur*EchiD; IS1ts = SourceSatCur1*EchiD1; evbs = exp(MIN(MAX_EXP_ARG,vbs/((model->SOI3etad)*vT))); evbs1 = exp(MIN(MAX_EXP_ARG,vbs/((model->SOI3etad1)*vT))); /* First Junction */ here->SOI3ibs = ISts * (evbs-1); here->SOI3gbs = ISts*evbs/((model->SOI3etad)*vT); here->SOI3gbsT = ISts*((evbs-1)*model->SOI3chid/(tmp*tmp) - evbs*vbs*model->SOI3dvt/((model->SOI3etad)*vT*tmp1)); /* Now Bipolar */ here->SOI3iBJTdb = alphaBJT * ISts * (evbs-1); here->SOI3gBJTdb_bs = alphaBJT * here->SOI3gbs; here->SOI3gBJTdb_deltaT = alphaBJT * here->SOI3gbsT; /* Now second junction and gmin */ /* JimB - make gmin code consistent */ here->SOI3ibs += IS1ts * (evbs1-1) + ckt->CKTgmin*vbs; here->SOI3gbs += IS1ts*evbs1/((model->SOI3etad1)*vT) + ckt->CKTgmin; /* End JimB */ here->SOI3gbsT += IS1ts*((evbs1-1)*model->SOI3chid1/(tmp*tmp) - evbs1*vbs*model->SOI3dvt/((model->SOI3etad1)*vT*tmp1) ); IStd = DrainSatCur*EchiD; IS1td = DrainSatCur1*EchiD1; evbd = exp(MIN(MAX_EXP_ARG,vbd/((model->SOI3etad)*vT))); evbd1 = exp(MIN(MAX_EXP_ARG,vbd/((model->SOI3etad1)*vT))); /* First Junction */ here->SOI3ibd = IStd *(evbd-1); here->SOI3gbd = IStd*evbd/((model->SOI3etad)*vT); here->SOI3gbdT = IStd*((evbd-1)*model->SOI3chid/(tmp*tmp) - evbd*vbd*model->SOI3dvt/((model->SOI3etad)*vT*tmp1)); /* Now Bipolar */ here->SOI3iBJTsb = alphaBJT * IStd *(evbd-1); here->SOI3gBJTsb_bd = alphaBJT * here->SOI3gbd; here->SOI3gBJTsb_deltaT = alphaBJT * here->SOI3gbdT; /* Now second junction and gmin */ /* JimB - make gmin code consistent */ here->SOI3ibd += IS1td *(evbd1-1) + ckt->CKTgmin*vbd; here->SOI3gbd += IS1td*evbd1/((model->SOI3etad1)*vT) + ckt->CKTgmin; /* End JimB */ here->SOI3gbdT += IS1td*((evbd1-1)*model->SOI3chid1/(tmp*tmp) - evbd1*vbd*model->SOI3dvt/((model->SOI3etad1)*vT*tmp1) ); /* initialise von for voltage limiting purposes */ von = (here->SOI3tVfbF * model->SOI3type) + psi_s0 + gamma*sqt0 + sigma*(here->SOI3mode*vds) - model->SOI3chiFB*deltaT; /* finally if we're going to do charge/capacitance calcs, store * some stuff to pass to function. Need to use arrays 'cos there's * a limit to how many parameters you can pass in standard C */ paramargs[0] = here->SOI3w*model->SOI3frontOxideCapFactor; paramargs[1] = EffectiveLength; paramargs[2] = gamma; paramargs[3] = eta_s; paramargs[4] = vt; paramargs[5] = delta; paramargs[6] = here->SOI3w*model->SOI3backOxideCapFactor; paramargs[7] = sigma; paramargs[8] = model->SOI3chiFB; paramargs[9] = model->SOI3satChargeShareFactor; Bfargs[0] = Bf; Bfargs[1] = pDBf_Dpsi_st0; alpha_args[0] = alpha; alpha_args[1] = Dalpha_Dvgfb; alpha_args[2] = Dalpha_Dvdb; alpha_args[3] = Dalpha_Dvsb; alpha_args[4] = Dalpha_DdeltaT; psi_st0args[0] = psi_st0; psi_st0args[1] = Dpsi_st0_Dvgfb; psi_st0args[2] = Dpsi_st0_Dvdb; psi_st0args[3] = Dpsi_st0_Dvsb; psi_st0args[4] = Dpsi_st0_DdeltaT; vGTargs[0] = vGT; vGTargs[1] = DvGT_Dvgfb; vGTargs[2] = DvGT_Dvdb; vGTargs[3] = DvGT_Dvsb; vGTargs[4] = DvGT_DdeltaT; psi_sLargs[0] = psi_sL; psi_sLargs[1] = Dpsi_sL_Dvgfb; psi_sLargs[2] = Dpsi_sL_Dvdb; psi_sLargs[3] = Dpsi_sL_Dvsb; psi_sLargs[4] = Dpsi_sL_DdeltaT; psi_s0args[0] = psi_s0; psi_s0args[1] = Dpsi_s0_Dvgfb; psi_s0args[2] = Dpsi_s0_Dvdb; psi_s0args[3] = Dpsi_s0_Dvsb; psi_s0args[4] = Dpsi_s0_DdeltaT; ldargs[0] = ld; ldargs[1] = Dld_Dvgfb; ldargs[2] = Dld_Dvdb; ldargs[3] = Dld_Dvsb; ldargs[4] = Dld_DdeltaT; /* debug stuff */ here->SOI3debug1 = psi_sL; here->SOI3debug2 = psi_s0; here->SOI3debug3 = fL; here->SOI3debug4 = f0; here->SOI3debug5 = gmd; here->SOI3debug6 = gms; } /* end block */ /* now deal with n vs p polarity */ here->SOI3von = model->SOI3type * von; here->SOI3vdsat = model->SOI3type * vdsat_ext; /* line 490 */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE * OLD here->SOI3id=here->SOI3mode * idrain - here->SOI3ibd; */ if (here->SOI3mode==1) { here->SOI3id= idrain - here->SOI3ibd + here->SOI3iMdb + here->SOI3iBJTdb; } else { here->SOI3id= -idrain - here->SOI3ibd + here->SOI3iBJTdb; } /* JimB - 4/1/99 */ /* Tidy up depletion capacitance code, and remove unwanted */ /* compile options. */ if (ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG)) { /* * Now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * The basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations. This is because most users use the default * grading coefficients of 0.5, and sqrt is MUCH faster than * an exp(log()), so we use this special case to buy time - * as much as 10% of total job time! */ /******** Bulk-source depletion capacitance ********/ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->SOI3vbs)))+ ckt->CKTvoltTol)) #endif /*CAPBYPASS*/ { if(here->SOI3Cbs != 0) { if (vbs < here->SOI3tDepCap) { arg=1-vbs/here->SOI3tBulkPot; if(model->SOI3bulkJctSideGradingCoeff == 0.5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->SOI3bulkJctSideGradingCoeff* log(arg)); } *(ckt->CKTstate0 + here->SOI3qbs) = here->SOI3tBulkPot*(here->SOI3Cbs* (1-arg*sarg)/(1-model->SOI3bulkJctSideGradingCoeff)); here->SOI3capbs=here->SOI3Cbs*sarg; } else { *(ckt->CKTstate0 + here->SOI3qbs) = here->SOI3f4s + vbs*(here->SOI3f2s+vbs*(here->SOI3f3s/2)); here->SOI3capbs=here->SOI3f2s+here->SOI3f3s*vbs; } } else { *(ckt->CKTstate0 + here->SOI3qbs) = 0; here->SOI3capbs=0; } } /******** End bulk-source depletion capcitance ********/ /******** Bulk-drain depletion capacitance ********/ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->SOI3vbd)))+ ckt->CKTvoltTol)) #endif /*CAPBYPASS*/ { if(here->SOI3Cbd != 0) { if (vbd < here->SOI3tDepCap) { arg=1-vbd/here->SOI3tBulkPot; if(model->SOI3bulkJctSideGradingCoeff == 0.5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->SOI3bulkJctSideGradingCoeff* log(arg)); } *(ckt->CKTstate0 + here->SOI3qbd) = here->SOI3tBulkPot*(here->SOI3Cbd* (1-arg*sarg)/(1-model->SOI3bulkJctSideGradingCoeff)); here->SOI3capbd=here->SOI3Cbd*sarg; } else { *(ckt->CKTstate0 + here->SOI3qbd) = here->SOI3f4d + vbd * (here->SOI3f2d + vbd *(here->SOI3f3d/2)); here->SOI3capbd=here->SOI3f2d + vbd * here->SOI3f3d; } } else { *(ckt->CKTstate0 + here->SOI3qbd) = 0; here->SOI3capbd = 0; } } /******** End bulk-drain depletion capacitance ********/ /* Need to work out charge on thermal cap */ *(ckt->CKTstate0 + here->SOI3qt) = here->SOI3ct * deltaT1; *(ckt->CKTstate0 + here->SOI3qt1) = here->SOI3ct1 * deltaT2; *(ckt->CKTstate0 + here->SOI3qt2) = here->SOI3ct2 * deltaT3; *(ckt->CKTstate0 + here->SOI3qt3) = here->SOI3ct3 * deltaT4; *(ckt->CKTstate0 + here->SOI3qt4) = here->SOI3ct4 * deltaT5; /* ct is constant, so integral is trivial */ if ( (ckt->CKTmode & MODETRAN) || ( (ckt->CKTmode&MODEINITTRAN) && !(ckt->CKTmode&MODEUIC)) ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ieq,here->SOI3capbd, here->SOI3qbd); if(error) return(error); here->SOI3gbd += geq; here->SOI3ibd += *(ckt->CKTstate0 + here->SOI3iqbd); here->SOI3id -= *(ckt->CKTstate0 + here->SOI3iqbd); error = NIintegrate(ckt,&geq,&ieq,here->SOI3capbs, here->SOI3qbs); if(error) return(error); here->SOI3gbs += geq; here->SOI3ibs += *(ckt->CKTstate0 + here->SOI3iqbs); } } /* * check convergence */ if ( (here->SOI3off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; } } /* * new capacitor model */ if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * calculate charges and capacitances */ /* * Partially Depleted model => back surface neglected * so back capacitances are ignored. */ /* * All the args assume vsb and vdb are 'correct' * so must make sure we're getting right values * back. */ if (here->SOI3mode > 0) { SOI3cap((vgbb-here->SOI3tVfbB),(here->SOI3tPhi + vsb),model->SOI3gammaB, paramargs, Bfargs,alpha_args,psi_st0args, vGTargs, psi_sLargs,psi_s0args, ldargs, &qgatef,&qbody,&qdrn,&qgateb, &cgfgf,&cgfd,&cgfs,&cgfdeltaT,&cgfgb, &cbgf,&cbd,&cbs,&cbdeltaT,&cbgb, &cdgf,&cdd,&cds,&cddeltaT,&cdgb, &cgbgf,&cgbd,&cgbs,&cgbdeltaT,&cgbgb); csgf = -(cgfgf + cdgf + cbgf + cgbgf); csd = -(cgfd + cdd + cbd + cgbd); css = -(cgfs + cds + cbs + cgbs); csdeltaT = -(cgfdeltaT + cddeltaT + cbdeltaT + cgbdeltaT); csgb = -(cgfgb + cdgb + cbgb + cgbgb); } else { SOI3cap((vgbb-here->SOI3tVfbB),(here->SOI3tPhi + vdb),model->SOI3gammaB, paramargs, Bfargs,alpha_args,psi_st0args, vGTargs, psi_sLargs,psi_s0args, ldargs, &qgatef,&qbody,&qsrc,&qgateb, &cgfgf,&cgfs,&cgfd,&cgfdeltaT,&cgfgb, &cbgf,&cbs,&cbd,&cbdeltaT,&cbgb, &csgf,&css,&csd,&csdeltaT,&csgb, &cgbgf,&cgbs,&cgbd,&cgbdeltaT,&cgbgb); cdgf = -(cgfgf + csgf + cbgf + cgbgf); cdd = -(cgfd + csd + cbd + cgbd); cds = -(cgfs + css + cbs + cgbs); cddeltaT = -(cgfdeltaT + csdeltaT + cbdeltaT + cgbdeltaT); cdgb = -(cgfgb + csgb + cbgb + cgbgb); } *(ckt->CKTstate0 + here->SOI3cgfgf) = cgfgf; *(ckt->CKTstate0 + here->SOI3cgfd) = cgfd; *(ckt->CKTstate0 + here->SOI3cgfs) = cgfs; *(ckt->CKTstate0 + here->SOI3cgfdeltaT) = cgfdeltaT; *(ckt->CKTstate0 + here->SOI3cgfgb) = cgfgb; *(ckt->CKTstate0 + here->SOI3csgf) = csgf; *(ckt->CKTstate0 + here->SOI3csd) = csd; *(ckt->CKTstate0 + here->SOI3css) = css; *(ckt->CKTstate0 + here->SOI3csdeltaT) = csdeltaT; *(ckt->CKTstate0 + here->SOI3csgb) = csgb; *(ckt->CKTstate0 + here->SOI3cdgf) = cdgf; *(ckt->CKTstate0 + here->SOI3cdd) = cdd; *(ckt->CKTstate0 + here->SOI3cds) = cds; *(ckt->CKTstate0 + here->SOI3cddeltaT) = cddeltaT; *(ckt->CKTstate0 + here->SOI3cdgb) = cdgb; *(ckt->CKTstate0 + here->SOI3cgbgf) = cgbgf; *(ckt->CKTstate0 + here->SOI3cgbd) = cgbd; *(ckt->CKTstate0 + here->SOI3cgbs) = cgbs; *(ckt->CKTstate0 + here->SOI3cgbdeltaT) = cgbdeltaT; *(ckt->CKTstate0 + here->SOI3cgbgb) = cgbgb; /* got charges and caps now, must get equiv conductances/current sources * but first work out charge and caps for BJT charge storage */ if ((model->SOI3tauEXP) != 2.0) { if ((model->SOI3tauEXP) != 1.0) { tauFBJTeff = model->SOI3tauFBJT * exp((model->SOI3tauEXP)*logL); tauRBJTeff = model->SOI3tauRBJT * exp((model->SOI3tauEXP)*logL); } else { tauFBJTeff = model->SOI3tauFBJT*EffectiveLength; tauRBJTeff = model->SOI3tauRBJT*EffectiveLength; } } else { tauFBJTeff = model->SOI3tauFBJT*(EffectiveLength*EffectiveLength); tauRBJTeff = model->SOI3tauRBJT*(EffectiveLength*EffectiveLength); } *(ckt->CKTstate0 + here->SOI3qBJTbs) = tauFBJTeff * here->SOI3iBJTdb; *(ckt->CKTstate0 + here->SOI3cBJTbsbs) = tauFBJTeff * here->SOI3gBJTdb_bs; *(ckt->CKTstate0 + here->SOI3cBJTbsdeltaT) = tauFBJTeff * here->SOI3gBJTdb_deltaT; *(ckt->CKTstate0 + here->SOI3qBJTbd) = tauRBJTeff * here->SOI3iBJTsb; *(ckt->CKTstate0 + here->SOI3cBJTbdbd) = tauRBJTeff * here->SOI3gBJTsb_bd; *(ckt->CKTstate0 + here->SOI3cBJTbddeltaT) = tauRBJTeff * here->SOI3gBJTsb_deltaT; } /* end of charge/cap calculations */ /* save things away for next time */ *(ckt->CKTstate0 + here->SOI3vbs) = vbs; *(ckt->CKTstate0 + here->SOI3vbd) = vbd; *(ckt->CKTstate0 + here->SOI3vgfs) = vgfs; *(ckt->CKTstate0 + here->SOI3vgbs) = vgbs; *(ckt->CKTstate0 + here->SOI3vds) = vds; *(ckt->CKTstate0 + here->SOI3deltaT) = deltaT; *(ckt->CKTstate0 + here->SOI3deltaT1) = deltaT1; *(ckt->CKTstate0 + here->SOI3deltaT2) = deltaT2; *(ckt->CKTstate0 + here->SOI3deltaT3) = deltaT3; *(ckt->CKTstate0 + here->SOI3deltaT4) = deltaT4; *(ckt->CKTstate0 + here->SOI3deltaT5) = deltaT5; *(ckt->CKTstate0 + here->SOI3idrain) = idrain; if((!(ckt->CKTmode & (MODETRAN | MODEAC))) && ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) && (!(ckt->CKTmode & MODEINITSMSIG))) goto bypass2; #ifndef NOBYPASS bypass1: #endif if (here->SOI3mode>0) { Frontcapargs[0] = FrontGateDrainOverlapCap; Frontcapargs[1] = FrontGateSourceOverlapCap; Frontcapargs[2] = FrontGateBulkOverlapCap; Frontcapargs[3] = vgfd; Frontcapargs[4] = vgfs; Frontcapargs[5] = vgfb; Backcapargs[0] = BackGateDrainOverlapCap; Backcapargs[1] = BackGateSourceOverlapCap; Backcapargs[2] = BackGateBulkOverlapCap; Backcapargs[3] = vgbd; Backcapargs[4] = vgbs; Backcapargs[5] = vgbb; SOI3capEval(ckt, Frontcapargs, Backcapargs, cgfgf,cgfd,cgfs,cgfdeltaT,cgfgb, cdgf,cdd,cds,cddeltaT,cdgb, csgf,csd,css,csdeltaT,csgb, cbgf,cbd,cbs,cbdeltaT,cbgb, cgbgf,cgbd,cgbs,cgbdeltaT,cgbgb, &gcgfgf,&gcgfd,&gcgfs,&gcgfdeltaT,&gcgfgb, &gcdgf,&gcdd,&gcds,&gcddeltaT,&gcdgb, &gcsgf,&gcsd,&gcss,&gcsdeltaT,&gcsgb, &gcbgf,&gcbd,&gcbs,&gcbdeltaT,&gcbgb, &gcgbgf,&gcgbd,&gcgbs,&gcgbdeltaT,&gcgbgb, &qgatef,&qbody,&qdrn,&qsrc,&qgateb); } else { Frontcapargs[0] = FrontGateSourceOverlapCap; Frontcapargs[1] = FrontGateDrainOverlapCap; Frontcapargs[2] = FrontGateBulkOverlapCap; Frontcapargs[3] = vgfs; Frontcapargs[4] = vgfd; Frontcapargs[5] = vgfb; Backcapargs[0] = BackGateSourceOverlapCap; Backcapargs[1] = BackGateDrainOverlapCap; Backcapargs[2] = BackGateBulkOverlapCap; Backcapargs[3] = vgbs; Backcapargs[4] = vgbd; Backcapargs[5] = vgbb; SOI3capEval(ckt, Frontcapargs, Backcapargs, cgfgf,cgfs,cgfd,cgfdeltaT,cgfgb, csgf,css,csd,csdeltaT,csgb, cdgf,cds,cdd,cddeltaT,cdgb, cbgf,cbs,cbd,cbdeltaT,cbgb, cgbgf,cgbs,cgbd,cgbdeltaT,cgbgb, &gcgfgf,&gcgfs,&gcgfd,&gcgfdeltaT,&gcgfgb, &gcsgf,&gcss,&gcsd,&gcsdeltaT,&gcsgb, &gcdgf,&gcds,&gcdd,&gcddeltaT,&gcdgb, &gcbgf,&gcbs,&gcbd,&gcbdeltaT,&gcbgb, &gcgbgf,&gcgbs,&gcgbd,&gcgbdeltaT,&gcgbgb, &qgatef,&qbody,&qsrc,&qdrn,&qgateb); } ag0 = ckt->CKTag[0]; gcBJTbsbs = ag0 * *(ckt->CKTstate0+here->SOI3cBJTbsbs); gcBJTbsdeltaT = ag0 * *(ckt->CKTstate0+here->SOI3cBJTbsdeltaT); gcBJTbdbd = ag0 * *(ckt->CKTstate0+here->SOI3cBJTbdbd); gcBJTbddeltaT = ag0 * *(ckt->CKTstate0+here->SOI3cBJTbddeltaT); if (ByPass) goto line860; /* already stored charges */ *(ckt->CKTstate0 + here->SOI3qgf) = qgatef; *(ckt->CKTstate0 + here->SOI3qd) = qdrn; *(ckt->CKTstate0 + here->SOI3qs) = qsrc; *(ckt->CKTstate0 + here->SOI3qgb) = qgateb; /* NB, we've kept charge/cap associated with diodes separately */ if((!(ckt->CKTmode & (MODEAC | MODETRAN))) && (ckt->CKTmode & MODETRANOP ) && (ckt->CKTmode & MODEUIC )) goto bypass2; /* store small signal parameters */ if(ckt->CKTmode & MODEINITSMSIG ) { *(ckt->CKTstate0+here->SOI3cgfgf) = cgfgf; *(ckt->CKTstate0+here->SOI3cgfd) = cgfd; *(ckt->CKTstate0+here->SOI3cgfs) = cgfs; *(ckt->CKTstate0+here->SOI3cgfdeltaT) = cgfdeltaT; *(ckt->CKTstate0+here->SOI3cgfgb) = cgfgb; *(ckt->CKTstate0+here->SOI3cdgf) = cdgf; *(ckt->CKTstate0+here->SOI3cdd) = cdd; *(ckt->CKTstate0+here->SOI3cds) = cds; *(ckt->CKTstate0+here->SOI3cddeltaT) = cddeltaT; *(ckt->CKTstate0+here->SOI3cdgb) = cdgb; *(ckt->CKTstate0+here->SOI3csgf) = csgf; *(ckt->CKTstate0+here->SOI3csd) = csd; *(ckt->CKTstate0+here->SOI3css) = css; *(ckt->CKTstate0+here->SOI3csdeltaT) = csdeltaT; *(ckt->CKTstate0+here->SOI3csgb) = csgb; *(ckt->CKTstate0+here->SOI3cgbgf) = cgbgf; *(ckt->CKTstate0+here->SOI3cgbd) = cgbd; *(ckt->CKTstate0+here->SOI3cgbs) = cgbs; *(ckt->CKTstate0+here->SOI3cgbdeltaT) = cgbdeltaT; *(ckt->CKTstate0+here->SOI3cgbgb) = cgbgb; goto End; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->SOI3qgf) = *(ckt->CKTstate0 + here->SOI3qgf); *(ckt->CKTstate1 + here->SOI3qd) = *(ckt->CKTstate0 + here->SOI3qd); *(ckt->CKTstate1 + here->SOI3qs) = *(ckt->CKTstate0 + here->SOI3qs); *(ckt->CKTstate1 + here->SOI3qgb) = *(ckt->CKTstate0 + here->SOI3qgb); *(ckt->CKTstate1 + here->SOI3qBJTbs) = *(ckt->CKTstate0 + here->SOI3qBJTbs); *(ckt->CKTstate1 + here->SOI3qBJTbd) = *(ckt->CKTstate0 + here->SOI3qBJTbd); } /* * numerical integration of intrinsic caps * and BJT caps */ error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qgf); if(error) return(error); error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qd); if(error) return(error); error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qs); if(error) return(error); error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qgb); if(error) return(error); error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qBJTbs); if(error) return(error); error = NIintegrate(ckt,&geq,&ieq,0.0,here->SOI3qBJTbd); if(error) return(error); goto line860; bypass2: /* * initialize to zero charge conductances * and current (DC and TRANOP) */ ieqqgf = ieqqd = ieqqs = ieqqgb = 0.0; gcgfgf = gcgfd = gcgfs = gcgfdeltaT = gcgfgb = 0.0; gcdgf = gcdd = gcds = gcddeltaT = gcdgb = 0.0; gcsgf = gcsd = gcss = gcsdeltaT = gcsgb = 0.0; gcbgf = gcbd = gcbs = gcbdeltaT = gcbgb = 0.0; gcgbgf = gcgbd = gcgbs = gcgbdeltaT = gcgbgb = 0.0; gct[0]=gct[1]=gct[2]=gct[3]=gct[4]=0.0; ieqct=ieqct1=ieqct2=ieqct3=ieqct4=0.0; ieqqBJTbs = ieqqBJTbd = 0.0; gcBJTbsbs = gcBJTbsdeltaT = gcBJTbdbd = gcBJTbddeltaT = 0.0; goto LoadUp; line860: /* evaluate equivalent charge currents */ ieqqgf = *(ckt->CKTstate0 + here->SOI3iqgf) - gcgfgf * vgfb - gcgfd * vdb - gcgfs * vsb - gcgfdeltaT * deltaT - gcgfgb * vgbb; ieqqd = *(ckt->CKTstate0 + here->SOI3iqd) - gcdgf * vgfb - gcdd * vdb - gcds * vsb - gcddeltaT * deltaT - gcdgb * vgbb; ieqqs = *(ckt->CKTstate0 + here->SOI3iqs) - gcsgf * vgfb - gcsd * vdb - gcss * vsb - gcsdeltaT * deltaT - gcsgb * vgbb; ieqqgb = *(ckt->CKTstate0 + here->SOI3iqgb) - gcgbgf * vgfb - gcgbd * vdb - gcgbs * vsb - gcgbdeltaT * deltaT - gcgbgb * vgbb; ieqqBJTbs = *(ckt->CKTstate0 + here->SOI3iqBJTbs) - gcBJTbsbs * vbs - gcBJTbsdeltaT * deltaT; ieqqBJTbd = *(ckt->CKTstate0 + here->SOI3iqBJTbd) - gcBJTbdbd * vbd - gcBJTbddeltaT * deltaT; /* now for the thermal capacitance is constant and linear so no need to fart about with equiv current */ error = NIintegrate(ckt,&gct[0],&ieqct,here->SOI3ct, here->SOI3qt); if(error) return(error); error = NIintegrate(ckt,&gct[1],&ieqct1,here->SOI3ct1, here->SOI3qt1); if(error) return(error); error = NIintegrate(ckt,&gct[2],&ieqct2,here->SOI3ct2, here->SOI3qt2); if(error) return(error); error = NIintegrate(ckt,&gct[3],&ieqct3,here->SOI3ct3, here->SOI3qt3); if(error) return(error); error = NIintegrate(ckt,&gct[4],&ieqct4,here->SOI3ct4, here->SOI3qt4); if(error) return(error); LoadUp: /* * load current vector */ m = here->SOI3m; ieqbs = model->SOI3type * (here->SOI3ibs-(here->SOI3gbs-ckt->CKTgmin)*vbs -(here->SOI3gbsT)*deltaT); ieqbd = model->SOI3type * (here->SOI3ibd-(here->SOI3gbd-ckt->CKTgmin)*vbd -(here->SOI3gbdT)*deltaT); iBJTdbeq = model->SOI3type * (here->SOI3iBJTdb -(here->SOI3gBJTdb_bs)*vbs -(here->SOI3gBJTdb_deltaT)*deltaT); iBJTsbeq = model->SOI3type * (here->SOI3iBJTsb -(here->SOI3gBJTsb_bd)*vbd -(here->SOI3gBJTsb_deltaT)*deltaT); ieqPt = here->SOI3iPt - (here->SOI3gPds*(here->SOI3mode*vds)+ here->SOI3gPmf*(here->SOI3mode==1?vgfs:vgfd)+ here->SOI3gPmb*(here->SOI3mode==1?vgbs:vgbd)+ here->SOI3gPmbs*(here->SOI3mode==1?vbs:vbd)+ here->SOI3gPdT*(deltaT)); if (here->SOI3mode >= 0) { xnrm=1; xrev=0; idreq=model->SOI3type*(idrain-here->SOI3gds*vds- here->SOI3gmf*vgfs-here->SOI3gmbs*vbs- here->SOI3gmb*vgbs-here->SOI3gt*deltaT); iMdbeq=model->SOI3type*(here->SOI3iMdb-here->SOI3gMd*vds- here->SOI3gMmf*vgfs-here->SOI3gMmbs*vbs- here->SOI3gMmb*vgbs-here->SOI3gMdeltaT*deltaT); iMsbeq=0; } else { xnrm=0; xrev=1; idreq = -(model->SOI3type)*(idrain-here->SOI3gds*(-vds)- here->SOI3gmf*vgfd-here->SOI3gmbs*vbd- here->SOI3gmb*vgbd-here->SOI3gt*deltaT); iMsbeq= (model->SOI3type)*(here->SOI3iMsb-here->SOI3gMd*(-vds)- here->SOI3gMmf*vgfd-here->SOI3gMmbs*vbd- here->SOI3gMmb*vgbd-here->SOI3gMdeltaT*deltaT); iMdbeq = 0; } *(ckt->CKTrhs + here->SOI3gfNode) -= m * (model->SOI3type * ieqqgf); *(ckt->CKTrhs + here->SOI3gbNode) -= m * (model->SOI3type * ieqqgb); *(ckt->CKTrhs + here->SOI3bNode) += m * (-(ieqbs + ieqbd) + iMdbeq + iMsbeq /* one is 0 */ +iBJTdbeq + iBJTsbeq + model->SOI3type * (ieqqgf + ieqqd + ieqqs + ieqqgb) - model->SOI3type * (ieqqBJTbs + ieqqBJTbd)); *(ckt->CKTrhs + here->SOI3dNodePrime) += m * ((ieqbd-idreq) - iMdbeq - iBJTdbeq - model->SOI3type * (ieqqd) + model->SOI3type * (ieqqBJTbd)); *(ckt->CKTrhs + here->SOI3sNodePrime) += m * ((idreq + ieqbs) - iMsbeq - iBJTsbeq - model->SOI3type * (ieqqs) + model->SOI3type * (ieqqBJTbs)); *(ckt->CKTrhs + here->SOI3toutNode) += m * (ieqPt-ieqct); if (here->SOI3numThermalNodes > 1) { *(ckt->CKTrhs + here->SOI3tout1Node) += m * (ieqct-ieqct1); } if (here->SOI3numThermalNodes > 2) { *(ckt->CKTrhs + here->SOI3tout2Node) += m * (ieqct1-ieqct2); } if (here->SOI3numThermalNodes > 3) { *(ckt->CKTrhs + here->SOI3tout3Node) += m * (ieqct2-ieqct3); } if (here->SOI3numThermalNodes > 4) { *(ckt->CKTrhs + here->SOI3tout4Node) += m * (ieqct3-ieqct4); } /* load y matrix */ *(here->SOI3D_dPtr) += m * (here->SOI3drainConductance); *(here->SOI3D_dpPtr) += m * (-here->SOI3drainConductance); *(here->SOI3DP_dPtr) += m * (-here->SOI3drainConductance); *(here->SOI3S_sPtr) += m * (here->SOI3sourceConductance); *(here->SOI3S_spPtr) += m * (-here->SOI3sourceConductance); *(here->SOI3SP_sPtr) += m * (-here->SOI3sourceConductance); *(here->SOI3GF_gfPtr) += m * gcgfgf; *(here->SOI3GF_dpPtr) += m * gcgfd; *(here->SOI3GF_spPtr) += m * gcgfs; *(here->SOI3GF_gbPtr) += m * gcgfgb; *(here->SOI3GF_bPtr) -= m * (gcgfgf + gcgfd + gcgfs + gcgfgb); *(here->SOI3DP_gfPtr) += m * ((xnrm-xrev)*here->SOI3gmf + gcdgf+ xnrm*here->SOI3gMmf); *(here->SOI3DP_dpPtr) += m * ((here->SOI3drainConductance+here->SOI3gds+ here->SOI3gbd+xrev*(here->SOI3gmf+here->SOI3gmbs+ here->SOI3gmb)+xnrm*here->SOI3gMd + gcdd)+ gcBJTbdbd); *(here->SOI3DP_spPtr) += m * ((-here->SOI3gds - here->SOI3gBJTdb_bs -xnrm*(here->SOI3gmf+here->SOI3gmb+here->SOI3gmbs + here->SOI3gMmf+here->SOI3gMmb+here->SOI3gMmbs+here->SOI3gMd)) + gcds); *(here->SOI3DP_gbPtr) += m * (((xnrm-xrev)*here->SOI3gmb + xnrm*here->SOI3gMmb) + gcdgb); *(here->SOI3DP_bPtr) += m * ((-here->SOI3gbd + here->SOI3gBJTdb_bs + (xnrm-xrev)*here->SOI3gmbs + xnrm*here->SOI3gMmbs) - (gcdgf + gcdd + gcds + gcdgb + gcBJTbdbd)); *(here->SOI3SP_gfPtr) += m * ((-(xnrm-xrev)*here->SOI3gmf+ xrev*here->SOI3gMmf) + gcsgf); *(here->SOI3SP_dpPtr) += m * ((-here->SOI3gds - here->SOI3gBJTsb_bd -xrev*(here->SOI3gmf+here->SOI3gmb+here->SOI3gmbs+ here->SOI3gMmf+here->SOI3gMmb+here->SOI3gMmbs+here->SOI3gMd)) + gcsd); *(here->SOI3SP_spPtr) += m * ((here->SOI3sourceConductance+here->SOI3gds+ here->SOI3gbs+xnrm*(here->SOI3gmf+here->SOI3gmbs+ here->SOI3gmb)+xrev*here->SOI3gMd + gcss)+ gcBJTbsbs); *(here->SOI3SP_gbPtr) += m * ((-(xnrm-xrev)*here->SOI3gmb+ xrev*here->SOI3gMmb) + gcsgb); *(here->SOI3SP_bPtr) += m * ((-here->SOI3gbs + here->SOI3gBJTsb_bd - (xnrm-xrev)*here->SOI3gmbs+ xrev*here->SOI3gMmbs) - (gcsgf + gcsd + gcss + gcsgb + gcBJTbsbs)); *(here->SOI3GB_gfPtr) += m * gcgbgf; *(here->SOI3GB_dpPtr) += m * gcgbd; *(here->SOI3GB_spPtr) += m * gcgbs; *(here->SOI3GB_gbPtr) += m * gcgbgb; *(here->SOI3GB_bPtr) -= m * (gcgbgf + gcgbd + gcgbs + gcgbgb); *(here->SOI3B_gfPtr) += m * (-here->SOI3gMmf + gcbgf); *(here->SOI3B_dpPtr) += m * (-(here->SOI3gbd) + here->SOI3gBJTsb_bd + xrev*(here->SOI3gMmf+here->SOI3gMmb+ here->SOI3gMmbs+here->SOI3gMd) - xnrm*here->SOI3gMd + gcbd - gcBJTbdbd); *(here->SOI3B_spPtr) += m * (-(here->SOI3gbs) + here->SOI3gBJTdb_bs + xnrm*(here->SOI3gMmf+here->SOI3gMmb+ here->SOI3gMmbs+here->SOI3gMd) - xrev*here->SOI3gMd + gcbs - gcBJTbsbs); *(here->SOI3B_gbPtr) += m * (-(here->SOI3gMmb) + gcbgb); *(here->SOI3B_bPtr) += m * ((here->SOI3gbd+here->SOI3gbs - here->SOI3gMmbs - here->SOI3gBJTdb_bs - here->SOI3gBJTsb_bd) - (gcbgf+gcbd+gcbs+gcbgb) + gcBJTbsbs+gcBJTbdbd); /* if no thermal behaviour specified, then put in zero valued indpt. voltage source between TOUT and ground */ if (here->SOI3rt==0) { *(here->SOI3TOUT_ibrPtr) += m * 1.0 ; *(here->SOI3IBR_toutPtr) += m * 1.0 ; *(ckt->CKTrhs + (here->SOI3branch)) = 0 ; } else { *(here->SOI3TOUT_toutPtr) += m * (-(here->SOI3gPdT)+grt[0]+gct[0]); if (here->SOI3numThermalNodes > 1) { *(here->SOI3TOUT_tout1Ptr) += m * (-grt[0]-gct[0]); *(here->SOI3TOUT1_toutPtr) += m * (-grt[0]-gct[0]); *(here->SOI3TOUT1_tout1Ptr) += m * (grt[0]+grt[1]+gct[0]+gct[1]); } if (here->SOI3numThermalNodes > 2) { *(here->SOI3TOUT1_tout2Ptr) += m * (-grt[1]-gct[1]); *(here->SOI3TOUT2_tout1Ptr) += m * (-grt[1]-gct[1]); *(here->SOI3TOUT2_tout2Ptr) += m * (grt[1]+grt[2]+gct[1]+gct[2]); } if (here->SOI3numThermalNodes > 3) { *(here->SOI3TOUT2_tout3Ptr) += m * (-grt[2]-gct[2]); *(here->SOI3TOUT3_tout2Ptr) += m * (-grt[2]-gct[2]); *(here->SOI3TOUT3_tout3Ptr) += m * (grt[2]+grt[3]+gct[2]+gct[3]); } if (here->SOI3numThermalNodes > 4) { *(here->SOI3TOUT3_tout4Ptr) += m * (-grt[3]-gct[3]); *(here->SOI3TOUT4_tout3Ptr) += m * (-grt[3]-gct[3]); *(here->SOI3TOUT4_tout4Ptr) += m * (grt[3]+grt[4]+gct[3]+gct[4]); } *(here->SOI3TOUT_dpPtr) += m * (xnrm*(-(here->SOI3gPds*model->SOI3type)) +xrev*(here->SOI3gPds+here->SOI3gPmf+ here->SOI3gPmb+here->SOI3gPmbs)* model->SOI3type); *(here->SOI3TOUT_gfPtr) += m * (-(here->SOI3gPmf*model->SOI3type)); *(here->SOI3TOUT_gbPtr) += m * (-(here->SOI3gPmb*model->SOI3type)); *(here->SOI3TOUT_bPtr) += m * (-(here->SOI3gPmbs*model->SOI3type)); *(here->SOI3TOUT_spPtr) += m * (xnrm*(here->SOI3gPds+here->SOI3gPmf+ here->SOI3gPmb+here->SOI3gPmbs)*model->SOI3type +xrev*(-(here->SOI3gPds*model->SOI3type))); *(here->SOI3DP_toutPtr) += m * (xnrm-xrev)*here->SOI3gt*model->SOI3type; *(here->SOI3SP_toutPtr) += m * (xrev-xnrm)*here->SOI3gt*model->SOI3type; /* need to mult by type in above as conductances will be used with exterior voltages which will be -ve for PMOS except for gPdT */ /* now for thermal influence on impact ionisation current and tranisent stuff */ *(here->SOI3GF_toutPtr) += m * gcgfdeltaT*model->SOI3type; *(here->SOI3DP_toutPtr) += m * (xnrm*here->SOI3gMdeltaT + gcddeltaT - here->SOI3gbdT + here->SOI3gBJTdb_deltaT - gcBJTbddeltaT)*model->SOI3type; *(here->SOI3SP_toutPtr) += m * (xrev*here->SOI3gMdeltaT + gcsdeltaT - here->SOI3gbsT + here->SOI3gBJTsb_deltaT - gcBJTbsdeltaT)*model->SOI3type; *(here->SOI3GB_toutPtr) += m * gcgbdeltaT*model->SOI3type; *(here->SOI3B_toutPtr) -= m * (here->SOI3gMdeltaT - gcbdeltaT - here->SOI3gbsT - here->SOI3gbdT + here->SOI3gBJTdb_deltaT + here->SOI3gBJTsb_deltaT -gcBJTbsdeltaT-gcBJTbddeltaT)*model->SOI3type; } End: ; } } return(OK); } /* DEVsoipnjlim(vnew,vold,vt,vcrit,icheck) * limit the per-iteration change of PN junction voltages */ double DEVsoipnjlim(double vnew, double vold, double vt, double vcrit, int *icheck) { double arg; if((vnew > vcrit) && (fabs(vnew - vold) > (vt + vt))) { if(vold > 0) { arg = 1 + (vnew - vold) / vt; if(arg > 0) { vnew = vold + vt * log(arg); } else { vnew = vcrit; } } else { vnew = vt *log(vnew/vt); } *icheck = 1; } else { if (fabs(vnew - vold) < (vt + vt)) { *icheck = 0; } else { if (vnew>vold) { *icheck = 0; } else { arg = 1 + (vold - vnew) / vt; vnew = vold - vt*log(arg); *icheck = 1; } } } return(vnew); } ngspice-26/src/spicelib/devices/csw/0000755000265600020320000000000012264261707017030 5ustar andreasadminngspice-26/src/spicelib/devices/csw/cswsetup.c0000644000265600020320000000456312264261473021061 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the switch conductance with those pointers needed later * for fast matrix loading */ { CSWmodel *model = (CSWmodel*)inModel; CSWinstance *here; /* loop through all the current source models */ for( ; model != NULL; model = model->CSWnextModel ) { /* Default Value Processing for Switch Model */ if (!model->CSWthreshGiven) { model->CSWiThreshold = 0; } if (!model->CSWhystGiven) { model->CSWiHysteresis = 0; } if (!model->CSWonGiven) { model->CSWonConduct = CSW_ON_CONDUCTANCE; model->CSWonResistance = 1.0/model->CSWonConduct; } if (!model->CSWoffGiven) { model->CSWoffConduct = CSW_OFF_CONDUCTANCE; model->CSWoffResistance = 1.0/model->CSWoffConduct; } /* loop through all the instances of the model */ for (here = model->CSWinstances; here != NULL ; here=here->CSWnextInstance) { /* Default Value Processing for Switch Instance */ here->CSWstate = *states; *states += CSW_NUM_STATES; here->CSWcontBranch = CKTfndBranch(ckt,here->CSWcontName); if(here->CSWcontBranch == 0) { IFuid namarray[2]; namarray[0] = here->CSWname; namarray[1] = here->CSWcontName; SPfrontEnd->IFerror (ERR_FATAL, "%s: unknown controlling source %s",namarray); return(E_BADPARM); } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(CSWposPosptr, CSWposNode, CSWposNode); TSTALLOC(CSWposNegptr, CSWposNode, CSWnegNode); TSTALLOC(CSWnegPosptr, CSWnegNode, CSWposNode); TSTALLOC(CSWnegNegptr, CSWnegNode, CSWnegNode); } } return(OK); } ngspice-26/src/spicelib/devices/csw/cswload.c0000644000265600020320000001262412264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs Modified: 2001 Jon Engelbert **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cswdefs.h" #include "ngspice/fteext.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ { CSWmodel *model = (CSWmodel*)inModel; CSWinstance *here; double g_now; double i_ctrl; double previous_state = -1; double current_state = -1, old_current_state = -1; double REALLY_OFF = 0, REALLY_ON = 1; /* switch is on or off, not in hysteresis region. */ double HYST_OFF = 2, HYST_ON = 3; /* switch is on or off while control value is in hysteresis region. */ /* loop through all the switch models */ for( ; model != NULL; model = model->CSWnextModel ) { /* loop through all the instances of the model */ for (here = model->CSWinstances; here != NULL ; here=here->CSWnextInstance) { old_current_state = *(ckt->CKTstates[0] + here->CSWstate); previous_state = *(ckt->CKTstates[1] + here->CSWstate); i_ctrl = *(ckt->CKTrhsOld + here->CSWcontBranch); /* decide the state of the switch */ if(ckt->CKTmode & (MODEINITFIX|MODEINITJCT)) { if(here->CSWzero_stateGiven) { /* switch specified "on" */ if ((model->CSWiHysteresis >= 0) && (i_ctrl > (model->CSWiThreshold + model->CSWiHysteresis))) current_state = REALLY_ON; else if ((model->CSWiHysteresis < 0) && (i_ctrl > (model->CSWiThreshold - model->CSWiHysteresis))) current_state = REALLY_ON; else current_state = HYST_ON; } else { if ((model->CSWiHysteresis >= 0) && (i_ctrl < (model->CSWiThreshold - model->CSWiHysteresis))) current_state = REALLY_OFF; else if ((model->CSWiHysteresis < 0) && (i_ctrl < (model->CSWiThreshold + model->CSWiHysteresis))) current_state = REALLY_OFF; else current_state = HYST_OFF; } } else if (ckt->CKTmode & (MODEINITSMSIG)) { current_state = previous_state; } else if (ckt->CKTmode & (MODEINITFLOAT)) { /* use state0 since INITTRAN or INITPRED already called */ if (model->CSWiHysteresis > 0) { if (i_ctrl > (model->CSWiThreshold + model->CSWiHysteresis)) { current_state = REALLY_ON; } else if (i_ctrl < (model->CSWiThreshold - model->CSWiHysteresis)) { current_state = REALLY_OFF; } else { current_state = previous_state; } } else { if (i_ctrl > (model->CSWiThreshold - model->CSWiHysteresis)) { current_state = REALLY_ON; } else if (i_ctrl < (model->CSWiThreshold + model->CSWiHysteresis)) { current_state = REALLY_OFF; } else { /* in hysteresis... change value if going from low to hysteresis, * or from hi to hysteresis. */ /* if previous state was in hysteresis, then don't change the state.. */ if ((previous_state == HYST_OFF) || (previous_state == HYST_ON)) { current_state = previous_state; } else if (previous_state == REALLY_ON) { current_state = HYST_OFF; } else if (previous_state == REALLY_OFF) { current_state = HYST_ON; } else internalerror("bad value for previous region in swload"); } } if(current_state != old_current_state) { ckt->CKTnoncon++; /* ensure one more iteration */ ckt->CKTtroubleElt = (GENinstance *) here; } } else if (ckt->CKTmode & (MODEINITTRAN|MODEINITPRED)) { if (model->CSWiHysteresis > 0) { if (i_ctrl > (model->CSWiThreshold + model->CSWiHysteresis)) { current_state = REALLY_ON; } else if (i_ctrl < (model->CSWiThreshold - model->CSWiHysteresis)) { current_state = REALLY_OFF; } else { current_state = previous_state; } } else { if (i_ctrl > (model->CSWiThreshold - model->CSWiHysteresis)) { current_state = REALLY_ON; } else if (i_ctrl < (model->CSWiThreshold + model->CSWiHysteresis)) { current_state = REALLY_OFF; } else { /* in hysteresis... change value if going from low to hysteresis, * or from hi to hysteresis. */ /* if previous state was in hysteresis, then don't change the state.. */ if ((previous_state == HYST_OFF) || (previous_state == HYST_ON)) { current_state = previous_state; } else if (previous_state == REALLY_ON) { current_state = HYST_OFF; } else if (previous_state == REALLY_OFF) { current_state = HYST_ON; } else internalerror("bad value for previous region in cswload"); } } } *(ckt->CKTstates[0] + here->CSWstate) = current_state; *(ckt->CKTstates[1] + here->CSWstate) = previous_state; if ((current_state == REALLY_ON) || (current_state == HYST_ON)) g_now = model->CSWonConduct; else g_now = model->CSWoffConduct; here->CSWcond = g_now; *(here->CSWposPosptr) += g_now; *(here->CSWposNegptr) -= g_now; *(here->CSWnegPosptr) -= g_now; *(here->CSWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/csw/cswparam.c0000644000265600020320000000160212264261473021010 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "cswdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CSWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { CSWinstance *here = (CSWinstance*)inst; NG_IGNORE(select); switch(param) { case CSW_CONTROL: here->CSWcontName = value->uValue; break; case CSW_IC_ON: if(value->iValue) { here->CSWzero_stateGiven = TRUE; } break; case CSW_IC_OFF: if(value->iValue) { here->CSWzero_stateGiven = FALSE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/csw/cswdefs.h0000644000265600020320000000715012264261473020642 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon M. Jacobs Modified: 2000 AlansFixes **********/ #ifndef CSW #define CSW #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/noisedef.h" #include "ngspice/complex.h" /* structures used to describe current controlled switches */ /* information to describe each instance */ typedef struct sCSWinstance { struct sCSWmodel *CSWmodPtr; /* backpointer to model */ struct sCSWinstance *CSWnextInstance; /* pointer to next instance of * current model*/ IFuid CSWname; /* pointer to character string naming this instance */ int CSWstate; /* pointer to start of switch's section of state vector */ int CSWposNode; /* number of positive node of switch */ int CSWnegNode; /* number of negative node of switch */ int CSWcontBranch; /* number of branch of controlling current */ IFuid CSWcontName; /* name of controlling source */ double *CSWposPosptr; /* pointer to sparse matrix diagonal at (positive,positive) for switch conductance */ double *CSWnegPosptr; /* pointer to sparse matrix offdiagonal at (neagtive,positive) for switch conductance */ double *CSWposNegptr; /* pointer to sparse matrix offdiagonal at (positive,neagtive) for switch conductance */ double *CSWnegNegptr; /* pointer to sparse matrix diagonal at (neagtive,neagtive) for switch conductance */ double CSWcond; /* current conductance of switch */ unsigned CSWzero_stateGiven : 1; /* flag to indicate initial state */ #ifndef NONOISE double CSWnVar[NSTATVARS]; #else /* NONOISE */ double *CSWnVar; #endif /* NONOISE */ } CSWinstance ; /* data per model */ #define CSW_ON_CONDUCTANCE 1.0 /* default on conductance = 1 mho */ #define CSW_OFF_CONDUCTANCE ckt->CKTgmin /* default off conductance */ #define CSW_NUM_STATES 2 typedef struct sCSWmodel { /* model structure for a switch */ int CSWmodType; /* type index of this device type */ struct sCSWmodel *CSWnextModel; /* pointer to next possible model in * linked list */ CSWinstance *CSWinstances; /* pointer to list of instances that have this * model */ IFuid CSWmodName; /* pointer to character string naming this model */ double CSWonResistance; /* switch "on" resistance */ double CSWoffResistance; /* switch "off" resistance */ double CSWiThreshold; /* switching threshold current */ double CSWiHysteresis; /* switching hysteresis current */ double CSWonConduct; /* switch "on" conductance */ double CSWoffConduct; /* switch "off" conductance */ unsigned CSWonGiven : 1; /* flag to indicate on-resistance was specified */ unsigned CSWoffGiven : 1;/* flag to indicate off-resistance was " */ unsigned CSWthreshGiven : 1;/* flag to indicate threshold volt was given */ unsigned CSWhystGiven : 1; /* flag to indicate hysteresis volt was given */ } CSWmodel; /* device parameters */ #define CSW_CONTROL 1 #define CSW_IC_ON 2 #define CSW_IC_OFF 3 #define CSW_POS_NODE 4 #define CSW_NEG_NODE 5 #define CSW_CURRENT 6 #define CSW_POWER 7 /* model parameters */ #define CSW_CSW 101 #define CSW_RON 102 #define CSW_ROFF 103 #define CSW_ITH 104 #define CSW_IHYS 105 #define CSW_GON 106 #define CSW_GOFF 107 /* device questions */ /* model questions */ #include "cswext.h" #endif /*CSW*/ ngspice-26/src/spicelib/devices/csw/cswpzld.c0000644000265600020320000000237012264261473020664 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CSWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* load the current values into the * sparse matrix previously provided * during AC analysis */ { CSWmodel *model = (CSWmodel*)inModel; CSWinstance *here; double g_now; int current_state; NG_IGNORE(s); /* loop through all the switch models */ for( ; model != NULL; model = model->CSWnextModel ) { /* loop through all the instances of the model */ for (here = model->CSWinstances; here != NULL ; here=here->CSWnextInstance) { current_state = (int)*(ckt->CKTstate0 + here->CSWstate); g_now = current_state?(model->CSWonConduct):(model->CSWoffConduct); *(here->CSWposPosptr) += g_now; *(here->CSWposNegptr) -= g_now; *(here->CSWnegPosptr) -= g_now; *(here->CSWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/csw/cswinit.c0000644000265600020320000000403312264261473020654 0ustar andreasadmin/* Modified: 2000 AlansFixes */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "cswitf.h" #include "cswext.h" #include "cswinit.h" SPICEdev CSWinfo = { { "CSwitch", "Current controlled ideal switch", &CSWnSize, &CSWnSize, CSWnames, &CSWpTSize, CSWpTable, &CSWmPTSize, CSWmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ CSWparam, /* DEVmodParam */ CSWmParam, /* DEVload */ CSWload, /* DEVsetup */ CSWsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ CSWsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ CSWtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ CSWacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ CSWdestroy, /* DEVmodDelete */ CSWmDelete, /* DEVdelete */ CSWdelete, /* DEVsetic */ NULL, /* DEVask */ CSWask, /* DEVmodAsk */ CSWmAsk, /* DEVpzLoad */ CSWpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ CSWnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &CSWiSize, /* DEVmodSize */ &CSWmSize }; SPICEdev * get_csw_info(void) { return &CSWinfo; } ngspice-26/src/spicelib/devices/csw/cswinit.h0000644000265600020320000000035612264261473020665 0ustar andreasadmin#ifndef _CSWINIT_H #define _CSWINIT_H extern IFparm CSWpTable[ ]; extern IFparm CSWmPTable[ ]; extern char *CSWnames[ ]; extern int CSWpTSize; extern int CSWmPTSize; extern int CSWnSize; extern int CSWiSize; extern int CSWmSize; #endif ngspice-26/src/spicelib/devices/csw/cswdest.c0000644000265600020320000000137112264261473020652 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "cswdefs.h" #include "ngspice/suffix.h" void CSWdestroy(GENmodel **inModel) { CSWmodel **model = (CSWmodel**)inModel; CSWinstance *here; CSWinstance *prev = NULL; CSWmodel *mod = *model; CSWmodel *oldmod = NULL; for( ; mod ; mod = mod->CSWnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->CSWinstances ; here ; here = here->CSWnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/csw/csw.c0000644000265600020320000000265612264261473020001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "cswdefs.h" #include "ngspice/suffix.h" IFparm CSWpTable[] = { /* parameters */ IOP( "control",CSW_CONTROL, IF_INSTANCE, "Name of controlling source"), IP( "on", CSW_IC_ON, IF_FLAG , "Initially closed"), IP( "off", CSW_IC_OFF, IF_FLAG , "Initially open"), OPU( "pos_node",CSW_POS_NODE,IF_INTEGER, "Positive node of switch"), OPU( "neg_node",CSW_NEG_NODE,IF_INTEGER, "Negative node of switch"), OP( "i" ,CSW_CURRENT, IF_REAL, "Switch current"), OP( "p" ,CSW_POWER, IF_REAL, "Instantaneous power") }; IFparm CSWmPTable[] = { /* model parameters */ IOPU( "csw", CSW_CSW, IF_FLAG, "Current controlled switch model"), IOPU( "it", CSW_ITH, IF_REAL, "Threshold current"), IOPU( "ih", CSW_IHYS, IF_REAL, "Hysterisis current"), IOPU( "ron", CSW_RON, IF_REAL, "Closed resistance"), IOPU( "roff", CSW_ROFF, IF_REAL, "Open resistance"), OPU( "gon", CSW_GON, IF_REAL, "Closed conductance"), OPU( "goff", CSW_GOFF, IF_REAL, "Open conductance") }; char *CSWnames[] = { "W+", "W-" }; int CSWnSize = NUMELEMS(CSWnames); int CSWpTSize = NUMELEMS(CSWpTable); int CSWmPTSize = NUMELEMS(CSWmPTable); int CSWiSize = sizeof(CSWinstance); int CSWmSize = sizeof(CSWmodel); ngspice-26/src/spicelib/devices/csw/cswmpar.c0000644000265600020320000000251212264261473020650 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs Modified: 2001 Jon Englebert **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWmParam(int param, IFvalue *value, GENmodel *inModel) { CSWmodel *model = (CSWmodel*)inModel; switch(param) { case CSW_CSW: /* just says that this is a switch */ break; case CSW_RON: model->CSWonResistance = value->rValue; model->CSWonConduct = 1.0/(value->rValue); model->CSWonGiven = TRUE; break; case CSW_ROFF: model->CSWoffResistance = value->rValue; model->CSWoffConduct = 1.0/(value->rValue); model->CSWoffGiven = TRUE; break; case CSW_ITH: model->CSWiThreshold = value->rValue; model->CSWthreshGiven = TRUE; break; case CSW_IHYS: /* take absolute value of hysteresis voltage */ /* model->CSWiHysteresis = fabs(value->rValue); */ model->CSWiHysteresis = value->rValue; model->CSWhystGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/csw/cswacld.c0000644000265600020320000000225312264261473020616 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWacLoad(GENmodel *inModel, CKTcircuit *ckt) /* load the current values into the * sparse matrix previously provided * during AC analysis */ { CSWmodel *model = (CSWmodel*)inModel; CSWinstance *here; double g_now; int current_state; /* loop through all the switch models */ for( ; model != NULL; model = model->CSWnextModel ) { /* loop through all the instances of the model */ for (here = model->CSWinstances; here != NULL ; here=here->CSWnextInstance) { current_state = (int)*(ckt->CKTstate0 + here->CSWstate); g_now = current_state?(model->CSWonConduct):(model->CSWoffConduct); *(here->CSWposPosptr) += g_now; *(here->CSWposNegptr) -= g_now; *(here->CSWnegPosptr) -= g_now; *(here->CSWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/csw/cswtrunc.c0000644000265600020320000000335512264261473021052 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "cswdefs.h" int CSWtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { CSWmodel *model = (CSWmodel*)inModel; CSWinstance *here; double lastChange, maxChange, maxStep, ref; for( ; model!= NULL; model = model->CSWnextModel) { for(here = model->CSWinstances ; here != NULL ; here = here->CSWnextInstance) { lastChange = *(ckt->CKTstate0+(here->CSWstate+1)) - *(ckt->CKTstate1+(here->CSWstate+1)); if (*(ckt->CKTstate0+(here->CSWstate))==0) { ref = (model->CSWiThreshold + model->CSWiHysteresis); if ((*(ckt->CKTstate0+(here->CSWstate+1))0)) { maxChange = (ref - *(ckt->CKTstate0+(here->CSWstate+1))) * 0.75 + 0.00005; maxStep = maxChange/lastChange * ckt->CKTdeltaOld[0]; if (*timeStep > maxStep) { *timeStep = maxStep; } } } else { ref = (model->CSWiThreshold - model->CSWiHysteresis); if ((*(ckt->CKTstate0+(here->CSWstate+1))>ref) && (lastChange<0)) { maxChange = (ref - *(ckt->CKTstate0+(here->CSWstate+1))) * 0.75 - 0.00005; maxStep = maxChange/lastChange * ckt->CKTdeltaOld[0]; if (*timeStep > maxStep) { *timeStep = maxStep; } } } } } return(OK); } ngspice-26/src/spicelib/devices/csw/cswdel.c0000644000265600020320000000153512264261473020461 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { CSWmodel *model = (CSWmodel*)inModel; CSWinstance **fast = (CSWinstance**)inst; CSWinstance **prev = NULL; CSWinstance *here; for( ; model ; model = model->CSWnextModel) { prev = &(model->CSWinstances); for(here = *prev; here ; here = *prev) { if(here->CSWname == name || (fast && here==*fast) ) { *prev= here->CSWnextInstance; FREE(here); return(OK); } prev = &(here->CSWnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/csw/cswext.h0000644000265600020320000000152012264261473020514 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon M. Jacobs Modified: 2000 AlansFixes **********/ extern int CSWask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int CSWacLoad(GENmodel*,CKTcircuit*); extern int CSWdelete(GENmodel*,IFuid,GENinstance**); extern void CSWdestroy(GENmodel**); extern int CSWload(GENmodel*,CKTcircuit*); extern int CSWmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int CSWmDelete(GENmodel**,IFuid,GENmodel*); extern int CSWmParam(int,IFvalue*,GENmodel*); extern int CSWparam(int,IFvalue*,GENinstance*,IFvalue*); extern int CSWpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int CSWsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int CSWnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int CSWtrunc(GENmodel*,CKTcircuit*,double*); ngspice-26/src/spicelib/devices/csw/Makefile.am0000644000265600020320000000072712264261473021072 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcsw.la libcsw_la_SOURCES = \ csw.c \ cswacld.c \ cswask.c \ cswdefs.h \ cswdel.c \ cswdest.c \ cswext.h \ cswinit.c \ cswinit.h \ cswitf.h \ cswload.c \ cswmask.c \ cswmdel.c \ cswmpar.c \ cswnoise.c \ cswparam.c \ cswpzld.c \ cswsetup.c \ cswtrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/csw/Makefile.in0000644000265600020320000004233512264261536021104 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/csw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcsw_la_LIBADD = am_libcsw_la_OBJECTS = csw.lo cswacld.lo cswask.lo cswdel.lo \ cswdest.lo cswinit.lo cswload.lo cswmask.lo cswmdel.lo \ cswmpar.lo cswnoise.lo cswparam.lo cswpzld.lo cswsetup.lo \ cswtrunc.lo libcsw_la_OBJECTS = $(am_libcsw_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcsw_la_SOURCES) DIST_SOURCES = $(libcsw_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcsw.la libcsw_la_SOURCES = \ csw.c \ cswacld.c \ cswask.c \ cswdefs.h \ cswdel.c \ cswdest.c \ cswext.h \ cswinit.c \ cswinit.h \ cswitf.h \ cswload.c \ cswmask.c \ cswmdel.c \ cswmpar.c \ cswnoise.c \ cswparam.c \ cswpzld.c \ cswsetup.c \ cswtrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/csw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/csw/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcsw.la: $(libcsw_la_OBJECTS) $(libcsw_la_DEPENDENCIES) $(EXTRA_libcsw_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcsw_la_OBJECTS) $(libcsw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cswtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/csw/cswitf.h0000644000265600020320000000026412264261473020502 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_CSW #define DEV_CSW extern SPICEdev *get_csw_info(void); #endif ngspice-26/src/spicelib/devices/csw/cswnoise.c0000644000265600020320000001025212264261473021026 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "cswdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * CSWnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with current- controlled switches. It starts with the * model *firstModel and traverses all of its instances. It then * proceeds to any other models on the linked list. The total output * noise density generated by the CSW's is summed in the variable * "OnDens". */ int CSWnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; CSWmodel *firstModel = (CSWmodel *) genmodel; CSWmodel *model; CSWinstance *inst; char name[N_MXVLNTH]; double tempOutNoise; double tempInNoise; double noizDens; double lnNdens; int current_state; for (model=firstModel; model != NULL; model=model->CSWnextModel) { for (inst=model->CSWinstances; inst != NULL; inst=inst->CSWnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name the noise generator */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: (void)sprintf(name,"onoise_%s",inst->CSWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; case INT_NOIZ: (void)sprintf(name,"onoise_total_%s",inst->CSWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s",inst->CSWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; } } break; case N_CALC: switch (mode) { case N_DENS: current_state = (int)*(ckt->CKTstate0 + inst->CSWstate); NevalSrc(&noizDens,&lnNdens,ckt,THERMNOISE, inst->CSWposNode,inst->CSWnegNode, current_state?(model->CSWonConduct):(model->CSWoffConduct)); *OnDens += noizDens; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ inst->CSWnVar[LNLSTDENS] = lnNdens; /* clear out our integration variable if it's the first pass */ if (data->freq == job->NstartFreq) { inst->CSWnVar[OUTNOIZ] = 0.0; } } else { /* data->delFreq != 0.0 (we have to integrate) */ tempOutNoise = Nintegrate(noizDens, lnNdens, inst->CSWnVar[LNLSTDENS], data); tempInNoise = Nintegrate(noizDens * data->GainSqInv ,lnNdens + data->lnGainInv, inst->CSWnVar[LNLSTDENS] + data->lnGainInv, data); inst->CSWnVar[OUTNOIZ] += tempOutNoise; inst->CSWnVar[INNOIZ] += tempInNoise; data->outNoiz += tempOutNoise; data->inNoise += tempInNoise; inst->CSWnVar[LNLSTDENS] = lnNdens; } if (data->prtSummary) { data->outpVector[data->outNumber++] = noizDens; } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { data->outpVector[data->outNumber++] = inst->CSWnVar[OUTNOIZ]; data->outpVector[data->outNumber++] = inst->CSWnVar[INNOIZ]; } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/csw/cswmask.c0000644000265600020320000000236412264261473020651 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal model parameters * of Current controlled SWitch */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CSWmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { CSWmodel *here = (CSWmodel*)inst; NG_IGNORE(ckt); switch(which) { case CSW_RON: value->rValue = here->CSWonResistance; return (OK); case CSW_ROFF: value->rValue = here->CSWoffResistance; return (OK); case CSW_ITH: value->rValue = here->CSWiThreshold; return (OK); case CSW_IHYS: value->rValue = here->CSWiHysteresis; return (OK); case CSW_GON: value->rValue = here->CSWonConduct; return (OK); case CSW_GOFF: value->rValue = here->CSWoffConduct; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/csw/cswmdel.c0000644000265600020320000000174212264261473020636 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CSWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { CSWmodel **model = (CSWmodel**)inModel; CSWmodel *modfast = (CSWmodel*)kill; CSWinstance *here; CSWinstance *prev = NULL; CSWmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->CSWnextModel)) { if( (*model)->CSWmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->CSWnextModel; /* cut deleted device out of list */ for(here = (*model)->CSWinstances ; here ; here = here->CSWnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/csw/cswask.c0000644000265600020320000000416012264261473020470 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameters * of Current controlled SWitch */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "cswdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CSWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { CSWinstance *here = (CSWinstance*)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case CSW_CONTROL: value->uValue = here->CSWcontName; return (OK); case CSW_POS_NODE: value->iValue = here->CSWposNode; return (OK); case CSW_NEG_NODE: value->iValue = here->CSWnegNode; return (OK); case CSW_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CSWask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = (*(ckt->CKTrhsOld+here->CSWposNode) - *(ckt->CKTrhsOld + here->CSWnegNode)) * here->CSWcond; } return(OK); case CSW_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CSWask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = (*(ckt->CKTrhsOld+here->CSWposNode) - *(ckt->CKTrhsOld + here->CSWnegNode)) * (*(ckt->CKTrhsOld + here->CSWposNode) - *(ckt->CKTrhsOld + here->CSWnegNode)) * here->CSWcond; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mesa/0000755000265600020320000000000012264261710017153 5ustar andreasadminngspice-26/src/spicelib/devices/mesa/mesamparam.c0000644000265600020320000002145012264261473021452 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAmParam(int param, IFvalue *value, GENmodel *inModel) { MESAmodel *model = (MESAmodel*)inModel; switch(param) { case MESA_MOD_VTO: model->MESAthresholdGiven = TRUE; model->MESAthreshold = value->rValue; break; case MESA_MOD_BETA: model->MESAbetaGiven = TRUE; model->MESAbeta = value->rValue; break; case MESA_MOD_VS: model->MESAvsGiven = TRUE; model->MESAvs = value->rValue; break; case MESA_MOD_LAMBDA: model->MESAlambdaGiven = TRUE; model->MESAlambda = value->rValue; break; case MESA_MOD_RD: model->MESAdrainResistGiven = TRUE; model->MESAdrainResist = value->rValue; break; case MESA_MOD_RS: model->MESAsourceResistGiven = TRUE; model->MESAsourceResist = value->rValue; break; case MESA_MOD_RG: model->MESAgateResistGiven = TRUE; model->MESAgateResist = value->rValue; break; case MESA_MOD_RI: model->MESAriGiven = TRUE; model->MESAri = value->rValue; break; case MESA_MOD_RF: model->MESArfGiven = TRUE; model->MESArf = value->rValue; break; case MESA_MOD_RDI: model->MESArdiGiven = TRUE; model->MESArdi = value->rValue; break; case MESA_MOD_RSI: model->MESArsiGiven = TRUE; model->MESArsi = value->rValue; break; case MESA_MOD_PHIB: model->MESAphibGiven = TRUE; model->MESAphib = value->rValue*CHARGE; break; case MESA_MOD_PHIB1: model->MESAphib1Given = TRUE; model->MESAphib1 = value->rValue*CHARGE; break; case MESA_MOD_ASTAR: model->MESAastarGiven = TRUE; model->MESAastar = value->rValue; break; case MESA_MOD_GGR: model->MESAggrGiven = TRUE; model->MESAggr = value->rValue; break; case MESA_MOD_DEL: model->MESAdelGiven = TRUE; model->MESAdel = value->rValue; break; case MESA_MOD_XCHI: model->MESAxchiGiven = TRUE; model->MESAxchi = value->rValue; break; case MESA_MOD_N: model->MESAnGiven = TRUE; model->MESAn = value->rValue; break; case MESA_MOD_ETA: model->MESAetaGiven = TRUE; model->MESAeta = value->rValue; break; case MESA_MOD_M: model->MESAmGiven = TRUE; model->MESAm = value->rValue; break; case MESA_MOD_MC: model->MESAmcGiven = TRUE; model->MESAmc = value->rValue; break; case MESA_MOD_ALPHA: model->MESAalphaGiven = TRUE; model->MESAalpha = value->rValue; break; case MESA_MOD_SIGMA0: model->MESAsigma0Given = TRUE; model->MESAsigma0 = value->rValue; break; case MESA_MOD_VSIGMAT: model->MESAvsigmatGiven = TRUE; model->MESAvsigmat = value->rValue; break; case MESA_MOD_VSIGMA: model->MESAvsigmaGiven = TRUE; model->MESAvsigma = value->rValue; break; case MESA_MOD_MU: model->MESAmuGiven = TRUE; model->MESAmu = value->rValue; break; case MESA_MOD_THETA: model->MESAthetaGiven = TRUE; model->MESAtheta = value->rValue; break; case MESA_MOD_MU1: model->MESAmu1Given = TRUE; model->MESAmu1 = value->rValue; break; case MESA_MOD_MU2: model->MESAmu2Given = TRUE; model->MESAmu2 = value->rValue; break; case MESA_MOD_D: model->MESAdGiven = TRUE; model->MESAd = value->rValue; break; case MESA_MOD_ND: model->MESAndGiven = TRUE; model->MESAnd = value->rValue; break; case MESA_MOD_DU: model->MESAduGiven = TRUE; model->MESAdu = value->rValue; break; case MESA_MOD_NDU: model->MESAnduGiven = TRUE; model->MESAndu = value->rValue; break; case MESA_MOD_TH: model->MESAthGiven = TRUE; model->MESAth = value->rValue; break; case MESA_MOD_NDELTA: model->MESAndeltaGiven = TRUE; model->MESAndelta = value->rValue; break; case MESA_MOD_DELTA: model->MESAdeltaGiven = TRUE; model->MESAdelta = value->rValue; break; case MESA_MOD_TC: model->MESAtcGiven = TRUE; model->MESAtc = value->rValue; break; case MESA_MOD_NMF: if(value->iValue) { model->MESAtype = NMF; } break; case MESA_MOD_PMF: if(value->iValue) { fprintf(stderr, "Only nmf model type supported, set to nmf\n"); model->MESAtype = NMF; } break; case MESA_MOD_TVTO: model->MESAtvtoGiven = TRUE; model->MESAtvto = value->rValue; break; case MESA_MOD_TLAMBDA: model->MESAtlambdaGiven = TRUE; model->MESAtlambda = value->rValue+CONSTCtoK; break; case MESA_MOD_TETA0: model->MESAteta0Given = TRUE; model->MESAteta0 = value->rValue+CONSTCtoK; break; case MESA_MOD_TETA1: model->MESAteta1Given = TRUE; model->MESAteta1 = value->rValue+CONSTCtoK; break; case MESA_MOD_TMU: model->MESAtmuGiven = TRUE; model->MESAtmu = value->rValue+CONSTCtoK; break; case MESA_MOD_XTM0: model->MESAxtm0Given = TRUE; model->MESAxtm0 = value->rValue; break; case MESA_MOD_XTM1: model->MESAxtm1Given = TRUE; model->MESAxtm1 = value->rValue; break; case MESA_MOD_XTM2: model->MESAxtm2Given = TRUE; model->MESAxtm2 = value->rValue; break; case MESA_MOD_KS: model->MESAksGiven = TRUE; model->MESAks = value->rValue; break; case MESA_MOD_VSG: model->MESAvsgGiven = TRUE; model->MESAvsg = value->rValue; break; case MESA_MOD_LAMBDAHF: model->MESAlambdahfGiven = TRUE; model->MESAlambdahf = value->rValue; break; case MESA_MOD_TF: model->MESAtfGiven = TRUE; model->MESAtf = value->rValue+CONSTCtoK; break; case MESA_MOD_FLO: model->MESAfloGiven = TRUE; model->MESAflo = value->rValue; break; case MESA_MOD_DELFO: model->MESAdelfoGiven = TRUE; model->MESAdelfo = value->rValue; break; case MESA_MOD_AG: model->MESAagGiven = TRUE; model->MESAag = value->rValue; break; case MESA_MOD_TC1: model->MESAtc1Given = TRUE; model->MESAtc1 = value->rValue; break; case MESA_MOD_TC2: model->MESAtc2Given = TRUE; model->MESAtc2 = value->rValue; break; case MESA_MOD_ZETA: model->MESAzetaGiven = TRUE; model->MESAzeta = value->rValue; break; case MESA_MOD_LEVEL: model->MESAlevelGiven = TRUE; model->MESAlevel = value->rValue; break; case MESA_MOD_NMAX: model->MESAnmaxGiven = TRUE; model->MESAnmax = value->rValue; break; case MESA_MOD_GAMMA: model->MESAgammaGiven = TRUE; model->MESAgamma = value->rValue; break; case MESA_MOD_EPSI: model->MESAepsiGiven = TRUE; model->MESAepsi = value->rValue; break; case MESA_MOD_CBS: model->MESAcbsGiven = TRUE; model->MESAcbs = value->rValue; break; case MESA_MOD_CAS: model->MESAcasGiven = TRUE; model->MESAcas = value->rValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesamdel.c0000644000265600020320000000202712264261473021115 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into mesa model: 2001 Paolo Nenzi */ #include "ngspice/ngspice.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MESAmodel **model = (MESAmodel**)inModel; MESAmodel *modfast = (MESAmodel*)kill; MESAinstance *here; MESAinstance *prev = NULL; MESAmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MESAnextModel)) { if( (*model)->MESAmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MESAnextModel; /* cut deleted device out of list */ for(here = (*model)->MESAinstances ; here ; here = here->MESAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mesa/mesainit.c0000644000265600020320000000405612264261473021143 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mesaitf.h" #include "mesaext.h" #include "mesainit.h" SPICEdev MESAinfo = { { "MESA", "GaAs MESFET model", &MESAnSize, &MESAnSize, MESAnames, &MESApTSize, MESApTable, &MESAmPTSize, MESAmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MESAparam, /* DEVmodParam */ MESAmParam, /* DEVload */ MESAload, /* DEVsetup */ MESAsetup, /* DEVunsetup */ MESAunsetup, /* DEVpzSetup */ MESAsetup, /* DEVtemperature*/ MESAtemp, /* DEVtrunc */ MESAtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MESAacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MESAdestroy, /* DEVmodDelete */ MESAmDelete, /* DEVdelete */ MESAdelete, /* DEVsetic */ MESAgetic, /* DEVask */ MESAask, /* DEVmodAsk */ MESAmAsk, /* DEVpzLoad */ MESApzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MESAiSize, /* DEVmodSize */ &MESAmSize }; SPICEdev * get_mesa_info(void) { return &MESAinfo; } ngspice-26/src/spicelib/devices/mesa/mesapzl.c0000644000265600020320000001224312264261473021002 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESApzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; double gm; double gds; double ggspp; double ggdpp; double ggs; double xgs; double ggd; double xgd; double f; double lambda; double vds; double delidgch; double delidvds; double m; for( ; model != NULL; model = model->MESAnextModel ) { for( here = model->MESAinstances; here != NULL; here = here->MESAnextInstance) { f = ckt->CKTomega/2/M_PI; if(here->MESAdelf == 0) lambda = here->MESAtLambda; else lambda = here->MESAtLambda+0.5*(here->MESAtLambdahf-here->MESAtLambda)* (1+tanh((f-here->MESAfl)/here->MESAdelf)); vds= *(ckt->CKTstate0 + here->MESAvgs) - *(ckt->CKTstate0 + here->MESAvgd); delidgch = here->MESAdelidgch0*(1+lambda*vds); delidvds = here->MESAdelidvds0*(1+2*lambda*vds) - here->MESAdelidvds1; gm = (delidgch*here->MESAgm0+here->MESAgm1)*here->MESAgm2; gds = delidvds+here->MESAgds0; ggspp=*(ckt->CKTstate0 + here->MESAggspp); ggdpp=*(ckt->CKTstate0 + here->MESAggdpp); ggs= *(ckt->CKTstate0 + here->MESAggs) ; xgs= *(ckt->CKTstate0 + here->MESAqgs) ; ggd= *(ckt->CKTstate0 + here->MESAggd) ; xgd= *(ckt->CKTstate0 + here->MESAqgd) ; m = here->MESAm; *(here->MESAdrainDrainPtr) += m * (here->MESAdrainConduct); *(here->MESAsourceSourcePtr) += m * (here->MESAsourceConduct); *(here->MESAgateGatePtr) += m * (here->MESAgateConduct); *(here->MESAsourcePrmPrmSourcePrmPrmPtr) += m * (here->MESAtGi+ggspp); *(here->MESAdrainPrmPrmDrainPrmPrmPtr) += m * (here->MESAtGf+ggdpp); *(here->MESAdrainDrainPrimePtr) -= m * (here->MESAdrainConduct); *(here->MESAdrainPrimeDrainPtr) -= m * (here->MESAdrainConduct); *(here->MESAsourceSourcePrimePtr) -= m * (here->MESAsourceConduct); *(here->MESAsourcePrimeSourcePtr) -= m * (here->MESAsourceConduct); *(here->MESAgateGatePrimePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeGatePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeDrainPrimePtr) += m * (-ggd); *(here->MESAgatePrimeSourcePrimePtr) += m * (-ggs); *(here->MESAdrainPrimeGatePrimePtr) += m * (gm-ggd); *(here->MESAdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->MESAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->MESAsourcePrimeDrainPrimePtr) += m * (-gds); *(here->MESAgatePrimeGatePrimePtr) += m * (ggd+ggs+here->MESAgateConduct+ggspp+ggdpp); *(here->MESAdrainPrimeDrainPrimePtr) += m * (gds+ggd+here->MESAdrainConduct+here->MESAtGf); *(here->MESAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+here->MESAsourceConduct+here->MESAtGi); *(here->MESAsourcePrimeSourcePrmPrmPtr) -= m * (here->MESAtGi); *(here->MESAsourcePrmPrmSourcePrimePtr) -= m * (here->MESAtGi); *(here->MESAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->MESAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->MESAdrainPrimeDrainPrmPrmPtr) -= m * (here->MESAtGf); *(here->MESAdrainPrmPrmDrainPrimePtr) -= m * (here->MESAtGf); *(here->MESAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->MESAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); *(here->MESAsourcePrmPrmSourcePrmPrmPtr) += m * (xgs * s->real); *(here->MESAsourcePrmPrmSourcePrmPrmPtr+1) += m * (xgs * s->imag); *(here->MESAdrainPrmPrmDrainPrmPrmPtr) += m * (xgd * s->real); *(here->MESAdrainPrmPrmDrainPrmPrmPtr+1) += m * (xgd * s->imag); *(here->MESAgatePrimeGatePrimePtr) += m * ((xgd+xgs) * s->real); *(here->MESAgatePrimeGatePrimePtr+1) += m * ((xgd+xgs) * s->imag); *(here->MESAgatePrimeDrainPrmPrmPtr) -= m * (xgd * s->real); *(here->MESAgatePrimeDrainPrmPrmPtr+1) -= m * (xgd * s->imag); *(here->MESAdrainPrmPrmGatePrimePtr) -= m * (xgd * s->real); *(here->MESAdrainPrmPrmGatePrimePtr+1) -= m * (xgd * s->imag); *(here->MESAgatePrimeSourcePrmPrmPtr) -= m * (xgs * s->real); *(here->MESAgatePrimeSourcePrmPrmPtr+1) -= m * (xgs * s->imag); *(here->MESAsourcePrmPrmGatePrimePtr) -= m * (xgs * s->real); *(here->MESAsourcePrmPrmGatePrimePtr+1) -= m * (xgs * s->imag); } } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesaask.c0000644000265600020320000001261012264261473020751 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* Imported into MESA model: 2001 Paolo Nenzi */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MESAinstance *here = (MESAinstance*)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case MESA_LENGTH: value->rValue = here->MESAlength; return (OK); case MESA_WIDTH: value->rValue = here->MESAwidth; value->rValue *= here->MESAm; return (OK); case MESA_M: value->rValue = here->MESAm; return (OK); case MESA_IC_VDS: value->rValue = here->MESAicVDS; return (OK); case MESA_IC_VGS: value->rValue = here->MESAicVGS; return (OK); case MESA_OFF: value->iValue = here->MESAoff; return (OK); case MESA_TD: value->rValue = here->MESAtd - CONSTCtoK; return (OK); case MESA_TS: value->rValue = here->MESAts - CONSTCtoK; return (OK); case MESA_DTEMP: value->rValue = here->MESAdtemp; return (OK); case MESA_DRAINNODE: value->iValue = here->MESAdrainNode; return (OK); case MESA_GATENODE: value->iValue = here->MESAgateNode; return (OK); case MESA_SOURCENODE: value->iValue = here->MESAsourceNode; return (OK); case MESA_DRAINPRIMENODE: value->iValue = here->MESAdrainPrimeNode; return (OK); case MESA_SOURCEPRIMENODE: value->iValue = here->MESAsourcePrimeNode; return (OK); case MESA_GATEPRIMENODE: value->iValue = here->MESAgatePrimeNode; return (OK); case MESA_VGS: value->rValue = *(ckt->CKTstate0 + here->MESAvgs); return (OK); case MESA_VGD: value->rValue = *(ckt->CKTstate0 + here->MESAvgd); return (OK); case MESA_CG: value->rValue = *(ckt->CKTstate0 + here->MESAcg); value->rValue *= here->MESAm; return (OK); case MESA_CD: value->rValue = *(ckt->CKTstate0 + here->MESAcd); value->rValue *= here->MESAm; return (OK); case MESA_CGD: value->rValue = *(ckt->CKTstate0 + here->MESAcgd); value->rValue *= here->MESAm; return (OK); case MESA_GM: value->rValue = *(ckt->CKTstate0 + here->MESAgm); value->rValue *= here->MESAm; return (OK); case MESA_GDS: value->rValue = *(ckt->CKTstate0 + here->MESAgds); value->rValue *= here->MESAm; return (OK); case MESA_GGS: value->rValue = *(ckt->CKTstate0 + here->MESAggs); value->rValue *= here->MESAm; return (OK); case MESA_GGD: value->rValue = *(ckt->CKTstate0 + here->MESAggd); value->rValue *= here->MESAm; return (OK); case MESA_QGS: value->rValue = *(ckt->CKTstate0 + here->MESAqgs); value->rValue *= here->MESAm; return (OK); case MESA_CQGS: value->rValue = *(ckt->CKTstate0 + here->MESAcqgs); value->rValue *= here->MESAm; return (OK); case MESA_QGD: value->rValue = *(ckt->CKTstate0 + here->MESAqgd); value->rValue *= here->MESAm; return (OK); case MESA_CQGD: value->rValue = *(ckt->CKTstate0 + here->MESAcqgd); value->rValue *= here->MESAm; return (OK); case MESA_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MESAask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->MESAcd); value->rValue -= *(ckt->CKTstate0 + here->MESAcg); value->rValue *= here->MESAm; } return(OK); case MESA_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MESAask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->MESAcd) * *(ckt->CKTrhsOld + here->MESAdrainNode); value->rValue += *(ckt->CKTstate0 + here->MESAcg) * *(ckt->CKTrhsOld + here->MESAgateNode); value->rValue -= (*(ckt->CKTstate0+here->MESAcd) + *(ckt->CKTstate0 + here->MESAcg)) * *(ckt->CKTrhsOld + here->MESAsourceNode); value->rValue *= here->MESAm; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mesa/mesaext.h0000644000265600020320000000161012264261473020776 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ extern int MESAacLoad(GENmodel*,CKTcircuit*); extern int MESAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MESAdelete(GENmodel*,IFuid,GENinstance**); extern void MESAdestroy(GENmodel**); extern int MESAgetic(GENmodel*,CKTcircuit*); extern int MESAload(GENmodel*,CKTcircuit*); extern int MESAmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int MESAmDelete(GENmodel**,IFuid,GENmodel*); extern int MESAmParam(int,IFvalue*,GENmodel*); extern int MESAparam(int,IFvalue*,GENinstance*,IFvalue*); extern int MESApzLoad(GENmodel*,CKTcircuit*, SPcomplex*); extern int MESAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MESAtemp(GENmodel*,CKTcircuit*); extern int MESAtrunc(GENmodel*,CKTcircuit*,double*); extern int MESAunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mesa/mesadel.c0000644000265600020320000000161712264261473020744 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into mesa model: 2001 Paolo Nenzi */ #include "ngspice/ngspice.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance **fast = (MESAinstance**)inst; MESAinstance **prev = NULL; MESAinstance *here; for( ; model ; model = model->MESAnextModel) { prev = &(model->MESAinstances); for(here = *prev; here ; here = *prev) { if(here->MESAname == name || (fast && here==*fast) ) { *prev= here->MESAnextInstance; FREE(here); return(OK); } prev = &(here->MESAnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mesa/mesagetic.c0000644000265600020320000000213412264261473021266 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAgetic(GENmodel *inModel, CKTcircuit *ckt) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MESAnextModel) { for(here = model->MESAinstances; here ; here = here->MESAnextInstance) { if(!here->MESAicVDSGiven) { here->MESAicVDS = *(ckt->CKTrhs + here->MESAdrainNode) - *(ckt->CKTrhs + here->MESAsourceNode); } if(!here->MESAicVGSGiven) { here->MESAicVGS = *(ckt->CKTrhs + here->MESAgateNode) - *(ckt->CKTrhs + here->MESAsourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesatrunc.c0000644000265600020320000000127012264261473021326 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; for( ; model != NULL; model = model->MESAnextModel) { for(here=model->MESAinstances;here!=NULL; here = here->MESAnextInstance){ CKTterr(here->MESAqgs,ckt,timeStep); CKTterr(here->MESAqgd,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesamask.c0000644000265600020320000001556212264261473021137 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESAmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { MESAmodel *here = (MESAmodel*)inst; NG_IGNORE(ckt); switch(which) { case MESA_MOD_VTO: value->rValue = here->MESAthreshold; return (OK); case MESA_MOD_VS: value->rValue = here->MESAvs; return (OK); case MESA_MOD_ALPHA: value->rValue = here->MESAalpha; return (OK); case MESA_MOD_BETA: value->rValue = here->MESAbeta; return (OK); case MESA_MOD_LAMBDA: value->rValue = here->MESAlambda; return (OK); case MESA_MOD_RG: value->rValue = here->MESAgateResist; return (OK); case MESA_MOD_RD: value->rValue = here->MESAdrainResist; return (OK); case MESA_MOD_RS: value->rValue = here->MESAsourceResist; return (OK); case MESA_MOD_RI: value->rValue = here->MESAri; return (OK); case MESA_MOD_RF: value->rValue = here->MESArf; return (OK); case MESA_MOD_RDI: value->rValue = here->MESArdi; return (OK); case MESA_MOD_RSI: value->rValue = here->MESArsi; return (OK); case MESA_MOD_PHIB: value->rValue = here->MESAphib; return (OK); case MESA_MOD_PHIB1: value->rValue = here->MESAphib1; return (OK); case MESA_MOD_ASTAR: value->rValue = here->MESAastar; return (OK); case MESA_MOD_GGR: value->rValue = here->MESAggr; return (OK); case MESA_MOD_DEL: value->rValue = here->MESAdel; return (OK); case MESA_MOD_XCHI: value->rValue = here->MESAxchi; return (OK); case MESA_MOD_N: value->rValue = here->MESAn; return (OK); case MESA_MOD_ETA: value->rValue = here->MESAeta; return (OK); case MESA_MOD_M: value->rValue = here->MESAm; return (OK); case MESA_MOD_MC: value->rValue = here->MESAmc; return (OK); case MESA_MOD_SIGMA0: value->rValue = here->MESAsigma0; return (OK); case MESA_MOD_VSIGMAT: value->rValue = here->MESAvsigmat; return (OK); case MESA_MOD_VSIGMA: value->rValue = here->MESAvsigma; return (OK); case MESA_MOD_MU: value->rValue = here->MESAmu; return (OK); case MESA_MOD_MU1: value->rValue = here->MESAmu1; return (OK); case MESA_MOD_MU2: value->rValue = here->MESAmu2; return (OK); case MESA_MOD_D: value->rValue = here->MESAd; return (OK); case MESA_MOD_ND: value->rValue = here->MESAnd; return (OK); case MESA_MOD_DELTA: value->rValue = here->MESAdelta; return (OK); case MESA_MOD_TC: value->rValue = here->MESAtc; return (OK); case MESA_MOD_TVTO: value->rValue = here->MESAtvto; return (OK); case MESA_MOD_TLAMBDA: value->rValue = here->MESAtlambda; return (OK); case MESA_MOD_TETA0: value->rValue = here->MESAteta0; return (OK); case MESA_MOD_TETA1: value->rValue = here->MESAteta1; return (OK); case MESA_MOD_TMU: value->rValue = here->MESAtmu; return (OK); case MESA_MOD_XTM0: value->rValue = here->MESAxtm0; return (OK); case MESA_MOD_XTM1: value->rValue = here->MESAxtm1; return (OK); case MESA_MOD_XTM2: value->rValue = here->MESAxtm2; return (OK); case MESA_MOD_KS: value->rValue = here->MESAks; return (OK); case MESA_MOD_VSG: value->rValue = here->MESAvsg; return (OK); case MESA_MOD_LAMBDAHF: value->rValue = here->MESAlambdahf; return (OK); case MESA_MOD_TF: value->rValue = here->MESAtf; return (OK); case MESA_MOD_FLO: value->rValue = here->MESAflo; return (OK); case MESA_MOD_DELFO: value->rValue = here->MESAdelfo; return (OK); case MESA_MOD_AG: value->rValue = here->MESAag; return (OK); case MESA_MOD_THETA: value->rValue = here->MESAtheta; return (OK); case MESA_MOD_TC1: value->rValue = here->MESAtc1; return (OK); case MESA_MOD_TC2: value->rValue = here->MESAtc2; return (OK); case MESA_MOD_ZETA: value->rValue = here->MESAzeta; return (OK); case MESA_MOD_DU: value->rValue = here->MESAdu; return (OK); case MESA_MOD_NDU: value->rValue = here->MESAndu; return (OK); case MESA_MOD_TH: value->rValue = here->MESAth; return (OK); case MESA_MOD_NDELTA: value->rValue = here->MESAndelta; return (OK); case MESA_MOD_LEVEL: value->rValue = here->MESAlevel; return (OK); case MESA_MOD_NMAX: value->rValue = here->MESAnmax; return (OK); case MESA_MOD_GAMMA: value->rValue = here->MESAgamma; return (OK); case MESA_MOD_EPSI: value->rValue = here->MESAepsi; return (OK); case MESA_MOD_CBS: value->rValue = here->MESAcbs; return (OK); case MESA_MOD_CAS: value->rValue = here->MESAcas; return (OK); case MESA_MOD_TYPE: if (here->MESAtype == NMF) value->sValue = "nmf"; else value->sValue = "pmf"; return (OK); case MESA_MOD_DRAINCONDUCT: value->rValue = here->MESAdrainConduct; return (OK); case MESA_MOD_SOURCECONDUCT: value->rValue = here->MESAsourceConduct; return (OK); case MESA_MOD_VCRIT: value->rValue = here->MESAvcrit; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mesa/mesaitf.h0000644000265600020320000000026012264261473020760 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MESA #define DEV_MESA SPICEdev *get_mesa_info(void); #endif ngspice-26/src/spicelib/devices/mesa/mesadefs.h0000644000265600020320000003166112264261473021130 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #ifndef MESA #define MESA #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures used to describe MESFET Transistors */ /* information used to describe a single instance */ typedef struct sMESAinstance { struct sMESAmodel *MESAmodPtr; /* backpointer to model */ struct sMESAinstance *MESAnextInstance; /* pointer to next instance of * current model*/ IFuid MESAname; /* pointer to character string naming this instance */ int MESAstate; /* pointer to start of state vector for MESAfet */ int MESAdrainNode; /* number of drain node of MESAfet */ int MESAgateNode; /* number of gate node of MESAfet */ int MESAsourceNode; /* number of source node of MESAfet */ int MESAdrainPrimeNode; /* number of internal drain node of MESAfet */ int MESAgatePrimeNode; /* number of internal gate node of MESAfet */ int MESAsourcePrimeNode; /* number of internal source node of MESAfet */ int MESAsourcePrmPrmNode; int MESAdrainPrmPrmNode; double MESAlength; /* length of MESAfet */ double MESAwidth; /* width of MESAfet */ double MESAm; /* Parallel Multiplier */ double MESAicVDS; /* initial condition voltage D-S*/ double MESAicVGS; /* initial condition voltage G-S*/ double MESAtd; /* drain temperature */ double MESAts; /* source temperature */ double MESAdtemp; /* Instance temperature difference */ double MESAtVto; double MESAtLambda; double MESAtLambdahf; double MESAtEta; double MESAtMu; double MESAtPhib; double MESAtTheta; double MESAtRsi; double MESAtRdi; double MESAtRs; double MESAtRd; double MESAtRg; double MESAtRi; double MESAtRf; double MESAtGi; double MESAtGf; double MESAdrainConduct; double MESAsourceConduct; double MESAgateConduct; double *MESAdrainDrainPrimePtr; double *MESAgatePrimeDrainPrimePtr; double *MESAgatePrimeSourcePrimePtr; double *MESAsourceSourcePrimePtr; double *MESAdrainPrimeDrainPtr; double *MESAdrainPrimeGatePrimePtr; double *MESAdrainPrimeSourcePrimePtr; double *MESAsourcePrimeGatePrimePtr; double *MESAsourcePrimeSourcePtr; double *MESAsourcePrimeDrainPrimePtr; double *MESAdrainDrainPtr; double *MESAgatePrimeGatePrimePtr; double *MESAsourceSourcePtr; double *MESAdrainPrimeDrainPrimePtr; double *MESAsourcePrimeSourcePrimePtr; double *MESAgateGatePrimePtr; double *MESAgatePrimeGatePtr; double *MESAgateGatePtr; double *MESAsourcePrmPrmSourcePrmPrmPtr; double *MESAsourcePrmPrmSourcePrimePtr; double *MESAsourcePrimeSourcePrmPrmPtr; double *MESAsourcePrmPrmGatePrimePtr; double *MESAgatePrimeSourcePrmPrmPtr; double *MESAdrainPrmPrmDrainPrmPrmPtr; double *MESAdrainPrmPrmDrainPrimePtr; double *MESAdrainPrimeDrainPrmPrmPtr; double *MESAdrainPrmPrmGatePrimePtr; double *MESAgatePrimeDrainPrmPrmPtr; #define MESAvgs MESAstate #define MESAvgd MESAstate+1 #define MESAcg MESAstate+2 #define MESAcd MESAstate+3 #define MESAcgd MESAstate+4 #define MESAcgs MESAstate+5 #define MESAgm MESAstate+6 #define MESAgds MESAstate+7 #define MESAggs MESAstate+8 #define MESAggd MESAstate+9 #define MESAqgs MESAstate+10 #define MESAcqgs MESAstate+11 #define MESAqgd MESAstate+12 #define MESAcqgd MESAstate+13 #define MESAvgspp MESAstate+14 #define MESAggspp MESAstate+15 #define MESAcgspp MESAstate+16 #define MESAvgdpp MESAstate+17 #define MESAggdpp MESAstate+18 #define MESAcgdpp MESAstate+19 int MESAoff; unsigned MESAlengthGiven : 1; unsigned MESAwidthGiven : 1; unsigned MESAmGiven : 1; unsigned MESAicVDSGiven : 1; unsigned MESAicVGSGiven : 1; unsigned MESAtdGiven : 1; unsigned MESAtsGiven : 1; unsigned MESAdtempGiven : 1; int MESAmode; /* * naming convention: * x = vgs * y = vgd * z = vds * cdr = cdrain */ #define MESANDCOEFFS 27 #ifndef NODISTO double MESAdCoeffs[MESANDCOEFFS]; #else /* NODISTO */ double *MESAdCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define cdr_x MESAdCoeffs[0] #define cdr_z MESAdCoeffs[1] #define cdr_x2 MESAdCoeffs[2] #define cdr_z2 MESAdCoeffs[3] #define cdr_xz MESAdCoeffs[4] #define cdr_x3 MESAdCoeffs[5] #define cdr_z3 MESAdCoeffs[6] #define cdr_x2z MESAdCoeffs[7] #define cdr_xz2 MESAdCoeffs[8] #define ggs3 MESAdCoeffs[9] #define ggd3 MESAdCoeffs[10] #define ggs2 MESAdCoeffs[11] #define ggd2 MESAdCoeffs[12] #define qgs_x2 MESAdCoeffs[13] #define qgs_y2 MESAdCoeffs[14] #define qgs_xy MESAdCoeffs[15] #define qgs_x3 MESAdCoeffs[16] #define qgs_y3 MESAdCoeffs[17] #define qgs_x2y MESAdCoeffs[18] #define qgs_xy2 MESAdCoeffs[19] #define qgd_x2 MESAdCoeffs[20] #define qgd_y2 MESAdCoeffs[21] #define qgd_xy MESAdCoeffs[22] #define qgd_x3 MESAdCoeffs[23] #define qgd_y3 MESAdCoeffs[24] #define qgd_x2y MESAdCoeffs[25] #define qgd_xy2 MESAdCoeffs[26] #endif /* indices to the array of MESAFET noise sources */ #define MESARDNOIZ 0 #define MESARSNOIZ 1 #define MESAIDNOIZ 2 #define MESAFLNOIZ 3 #define MESATOTNOIZ 4 #define MESANSRCS 5 /* the number of MESAFET noise sources */ #ifndef NONOISE double MESAnVar[NSTATVARS][MESANSRCS]; #else /* NONOISE */ double **MESAnVar; #endif /* NONOISE */ double MESAcsatfs; double MESAcsatfd; double MESAggrwl; double MESAgchi0; double MESAbeta; double MESAisatb0; double MESAimax; double MESAcf; double MESAfl; double MESAdelf; double MESAgds0; double MESAgm0; double MESAgm1; double MESAgm2; double MESAdelidvds0; double MESAdelidvds1; double MESAdelidgch0; double MESAn0; double MESAnsb0; double MESAvcrits; double MESAvcritd; } MESAinstance ; /* per model data */ typedef struct sMESAmodel { /* model structure for a MESAfet */ int MESAmodType; /* type index of this device type */ struct sMESAmodel *MESAnextModel; /* pointer to next possible model in * linked list */ MESAinstance * MESAinstances; /* pointer to list of instances * that have this model */ IFuid MESAmodName; /* pointer to character string naming this model */ int MESAtype; double MESAthreshold; double MESAlambda; double MESAbeta; double MESAvs; double MESAeta; double MESAm; double MESAmc; double MESAalpha; double MESAsigma0; double MESAvsigmat; double MESAvsigma; double MESAmu; double MESAtheta; double MESAmu1; double MESAmu2; double MESAd; double MESAnd; double MESAdu; double MESAndu; double MESAth; double MESAndelta; double MESAdelta; double MESAtc; double MESArdi; double MESArsi; double MESAdrainResist; double MESAsourceResist; double MESAdrainConduct; double MESAsourceConduct; double MESAgateResist; double MESAri; double MESArf; double MESAphib; double MESAphib1; double MESAastar; double MESAggr; double MESAdel; double MESAxchi; double MESAn; double MESAtvto; double MESAtlambda; double MESAteta0; double MESAteta1; double MESAtmu; double MESAxtm0; double MESAxtm1; double MESAxtm2; double MESAks; double MESAvsg; double MESAlambdahf; double MESAtf; double MESAflo; double MESAdelfo; double MESAag; double MESAtc1; double MESAtc2; double MESAzeta; double MESAlevel; double MESAnmax; double MESAgamma; double MESAepsi; double MESAcbs; double MESAcas; double MESAvcrit; double MESAsigma; double MESAvpo; double MESAvpou; double MESAvpod; double MESAdeltaSqr; unsigned MESAthresholdGiven:1; unsigned MESAlambdaGiven:1; unsigned MESAbetaGiven:1; unsigned MESAvsGiven:1; unsigned MESAetaGiven:1; unsigned MESAmGiven:1; unsigned MESAmcGiven:1; unsigned MESAalphaGiven:1; unsigned MESAsigma0Given:1; unsigned MESAvsigmatGiven:1; unsigned MESAvsigmaGiven:1; unsigned MESAmuGiven:1; unsigned MESAthetaGiven:1; unsigned MESAmu1Given:1; unsigned MESAmu2Given:1; unsigned MESAdGiven:1; unsigned MESAndGiven:1; unsigned MESAduGiven:1; unsigned MESAnduGiven:1; unsigned MESAthGiven:1; unsigned MESAndeltaGiven:1; unsigned MESAdeltaGiven:1; unsigned MESAtcGiven:1; unsigned MESArdiGiven:1; unsigned MESArsiGiven:1; unsigned MESAdrainResistGiven:1; unsigned MESAsourceResistGiven:1; unsigned MESAgateResistGiven:1; unsigned MESAriGiven:1; unsigned MESArfGiven:1; unsigned MESAphibGiven:1; unsigned MESAphib1Given:1; unsigned MESAastarGiven:1; unsigned MESAggrGiven:1; unsigned MESAdelGiven:1; unsigned MESAxchiGiven:1; unsigned MESAnGiven:1; unsigned MESAtvtoGiven:1; unsigned MESAtlambdaGiven:1; unsigned MESAteta0Given:1; unsigned MESAteta1Given:1; unsigned MESAtmuGiven:1; unsigned MESAxtm0Given:1; unsigned MESAxtm1Given:1; unsigned MESAxtm2Given:1; unsigned MESAksGiven:1; unsigned MESAvsgGiven:1; unsigned MESAlambdahfGiven:1; unsigned MESAtfGiven:1; unsigned MESAfloGiven:1; unsigned MESAdelfoGiven:1; unsigned MESAagGiven:1; unsigned MESAtc1Given:1; unsigned MESAtc2Given:1; unsigned MESAzetaGiven:1; unsigned MESAlevelGiven:1; unsigned MESAnmaxGiven:1; unsigned MESAgammaGiven:1; unsigned MESAepsiGiven:1; unsigned MESAcbsGiven:1; unsigned MESAcasGiven:1; } MESAmodel; #ifndef NMF #define NMF 1 #define PMF -1 #endif /* device parameters */ #define MESA_LENGTH 1 #define MESA_WIDTH 2 #define MESA_IC_VDS 3 #define MESA_IC_VGS 4 #define MESA_TD 5 #define MESA_TS 6 #define MESA_IC 7 #define MESA_OFF 8 #define MESA_CS 9 #define MESA_POWER 10 #define MESA_DTEMP 11 #define MESA_M 12 /* model parameters */ #define MESA_MOD_VTO 101 #define MESA_MOD_VS 102 #define MESA_MOD_LAMBDA 103 #define MESA_MOD_RD 104 #define MESA_MOD_RS 105 #define MESA_MOD_RG 106 #define MESA_MOD_RI 107 #define MESA_MOD_RF 108 #define MESA_MOD_RDI 109 #define MESA_MOD_RSI 110 #define MESA_MOD_PHIB 111 #define MESA_MOD_PHIB1 112 #define MESA_MOD_ASTAR 113 #define MESA_MOD_GGR 114 #define MESA_MOD_DEL 115 #define MESA_MOD_XCHI 116 #define MESA_MOD_N 117 #define MESA_MOD_ETA 118 #define MESA_MOD_M 119 #define MESA_MOD_MC 120 #define MESA_MOD_SIGMA0 121 #define MESA_MOD_VSIGMAT 122 #define MESA_MOD_VSIGMA 123 #define MESA_MOD_MU 124 #define MESA_MOD_MU1 125 #define MESA_MOD_MU2 126 #define MESA_MOD_D 127 #define MESA_MOD_ND 128 #define MESA_MOD_DELTA 129 #define MESA_MOD_TC 130 #define MESA_MOD_NMF 131 #define MESA_MOD_TVTO 132 #define MESA_MOD_TLAMBDA 134 #define MESA_MOD_TETA0 135 #define MESA_MOD_TETA1 136 #define MESA_MOD_TMU 137 #define MESA_MOD_XTM0 138 #define MESA_MOD_XTM1 139 #define MESA_MOD_XTM2 140 #define MESA_MOD_KS 141 #define MESA_MOD_VSG 142 #define MESA_MOD_LAMBDAHF 143 #define MESA_MOD_TF 144 #define MESA_MOD_FLO 145 #define MESA_MOD_DELFO 146 #define MESA_MOD_AG 147 #define MESA_MOD_THETA 148 #define MESA_MOD_ALPHA 149 #define MESA_MOD_TC1 150 #define MESA_MOD_TC2 151 #define MESA_MOD_ZETA 152 #define MESA_MOD_BETA 153 #define MESA_MOD_DU 154 #define MESA_MOD_NDU 155 #define MESA_MOD_TH 156 #define MESA_MOD_NDELTA 157 #define MESA_MOD_LEVEL 158 #define MESA_MOD_NMAX 159 #define MESA_MOD_GAMMA 160 #define MESA_MOD_EPSI 161 #define MESA_MOD_CBS 162 #define MESA_MOD_CAS 163 #define MESA_MOD_PMF 164 #define MESA_MOD_TYPE 165 #define MESA_DRAINNODE 201 #define MESA_GATENODE 202 #define MESA_SOURCENODE 203 #define MESA_DRAINPRIMENODE 204 #define MESA_SOURCEPRIMENODE 205 #define MESA_GATEPRIMENODE 206 #define MESA_VGS 207 #define MESA_VGD 208 #define MESA_CG 209 #define MESA_CD 210 #define MESA_CGD 211 #define MESA_GM 212 #define MESA_GDS 213 #define MESA_GGS 214 #define MESA_GGD 215 #define MESA_QGS 216 #define MESA_CQGS 217 #define MESA_QGD 218 #define MESA_CQGD 219 #define MESA_MOD_DRAINCONDUCT 301 #define MESA_MOD_SOURCECONDUCT 302 #define MESA_MOD_GATECONDUCT 303 #define MESA_MOD_DEPLETIONCAP 304 #define MESA_MOD_VCRIT 305 #include "mesaext.h" #endif /*MESA*/ ngspice-26/src/spicelib/devices/mesa/mesadest.c0000644000265600020320000000141412264261473021132 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "mesadefs.h" #include "ngspice/suffix.h" void MESAdestroy(GENmodel **inModel) { MESAmodel **model = (MESAmodel**)inModel; MESAinstance *here; MESAinstance *prev = NULL; MESAmodel *mod = *model; MESAmodel *oldmod = NULL; for( ; mod ; mod = mod->MESAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MESAinstances ; here ; here = here->MESAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/mesa/mesaacl.c0000644000265600020320000001115712264261473020737 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAacLoad(GENmodel *inModel, CKTcircuit *ckt) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; double gm; double gds; double ggspp; double ggdpp; double ggs; double xgs; double ggd; double xgd; double f; double lambda; double vds; double delidgch; double delidvds; double m; for( ; model != NULL; model = model->MESAnextModel ) { for( here = model->MESAinstances; here != NULL; here = here->MESAnextInstance) { f = ckt->CKTomega/2/M_PI; if(here->MESAdelf == 0) lambda = here->MESAtLambda; else lambda = here->MESAtLambda+0.5*(here->MESAtLambdahf-here->MESAtLambda)* (1+tanh((f-here->MESAfl)/here->MESAdelf)); vds= *(ckt->CKTstate0 + here->MESAvgs) - *(ckt->CKTstate0 + here->MESAvgd); delidgch = here->MESAdelidgch0*(1+lambda*vds); delidvds = here->MESAdelidvds0*(1+2*lambda*vds) - here->MESAdelidvds1; gm = (delidgch*here->MESAgm0+here->MESAgm1)*here->MESAgm2; gds = delidvds+here->MESAgds0; ggspp=*(ckt->CKTstate0 + here->MESAggspp); ggdpp=*(ckt->CKTstate0 + here->MESAggdpp); ggs= *(ckt->CKTstate0 + here->MESAggs) ; xgs= *(ckt->CKTstate0 + here->MESAqgs) * ckt->CKTomega ; ggd= *(ckt->CKTstate0 + here->MESAggd) ; xgd= *(ckt->CKTstate0 + here->MESAqgd) * ckt->CKTomega ; m = here->MESAm; *(here->MESAdrainDrainPtr) += m * (here->MESAdrainConduct); *(here->MESAsourceSourcePtr) += m * (here->MESAsourceConduct); *(here->MESAgateGatePtr) += m * (here->MESAgateConduct); *(here->MESAsourcePrmPrmSourcePrmPrmPtr) += m * (here->MESAtGi+ggspp); *(here->MESAdrainPrmPrmDrainPrmPrmPtr) += m * (here->MESAtGf+ggdpp); *(here->MESAdrainDrainPrimePtr) -= m * (here->MESAdrainConduct); *(here->MESAdrainPrimeDrainPtr) -= m * (here->MESAdrainConduct); *(here->MESAsourceSourcePrimePtr) -= m * (here->MESAsourceConduct); *(here->MESAsourcePrimeSourcePtr) -= m * (here->MESAsourceConduct); *(here->MESAgateGatePrimePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeGatePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeDrainPrimePtr) += m * (-ggd); *(here->MESAgatePrimeSourcePrimePtr) += m * (-ggs); *(here->MESAdrainPrimeGatePrimePtr) += m * (gm-ggd); *(here->MESAdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->MESAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->MESAsourcePrimeDrainPrimePtr) += m * (-gds); *(here->MESAgatePrimeGatePrimePtr) += m * (ggd+ggs+here->MESAgateConduct+ggspp+ggdpp); *(here->MESAdrainPrimeDrainPrimePtr) += m * (gds+ggd+here->MESAdrainConduct+here->MESAtGf); *(here->MESAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+here->MESAsourceConduct+here->MESAtGi); *(here->MESAsourcePrimeSourcePrmPrmPtr) -= m * (here->MESAtGi); *(here->MESAsourcePrmPrmSourcePrimePtr) -= m * (here->MESAtGi); *(here->MESAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->MESAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->MESAdrainPrimeDrainPrmPrmPtr) -= m * (here->MESAtGf); *(here->MESAdrainPrmPrmDrainPrimePtr) -= m * (here->MESAtGf); *(here->MESAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->MESAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); *(here->MESAsourcePrmPrmSourcePrmPrmPtr+1) += m * (xgs); *(here->MESAdrainPrmPrmDrainPrmPrmPtr+1) += m * (xgd); *(here->MESAgatePrimeGatePrimePtr+1) += m * (xgd+xgs); *(here->MESAgatePrimeDrainPrmPrmPtr+1) -= m * (xgd); *(here->MESAdrainPrmPrmGatePrimePtr+1) -= m * (xgd); *(here->MESAgatePrimeSourcePrmPrmPtr+1) -= m * (xgs); *(here->MESAsourcePrmPrmGatePrimePtr+1) -= m * (xgs); } } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesasetup.c0000644000265600020320000003530212264261473021336 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal Modified: 2001 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the diode structure with those pointers needed later * for fast matrix loading */ { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->MESAnextModel ) { if( (model->MESAtype != NMF) ) { fprintf(stderr, "Only nmf model type supported, set to nmf\n"); model->MESAtype = NMF; } if(!model->MESAthresholdGiven) { model->MESAthreshold = -1.26; } if(!model->MESAdGiven) { model->MESAd = 0.12e-6; } if(!model->MESAduGiven) { model->MESAdu = 0.035e-6; } if(!model->MESAlambdaGiven) { model->MESAlambda = 0.045; } if(!model->MESAvsGiven) { model->MESAvs = 1.5e5; } if(!model->MESAbetaGiven) { model->MESAbeta = 0.0085; } if(!model->MESAetaGiven) { model->MESAeta = 1.73; } if(!model->MESAmGiven) { model->MESAm = 2.5; } if(!model->MESAmcGiven) { model->MESAmc = 3.0; } if(!model->MESAalphaGiven) { model->MESAalpha = 0.0; } if(!model->MESAsigma0Given) { model->MESAsigma0 = 0.081; } if(!model->MESAvsigmatGiven) { model->MESAvsigmat = 1.01; } if(!model->MESAvsigmaGiven) { model->MESAvsigma = 0.1; } if(!model->MESAmuGiven) { model->MESAmu = 0.23; } if(!model->MESAthetaGiven) { model->MESAtheta = 0; } if(!model->MESAmu1Given) { model->MESAmu1 = 0; } if(!model->MESAmu2Given) { model->MESAmu2 = 0; } if(!model->MESAndGiven) { model->MESAnd = 2.0e23; } if(!model->MESAnduGiven) { model->MESAndu = 1e22; } if(!model->MESAndeltaGiven) { model->MESAndelta = 6e24; } if(!model->MESAthGiven) { model->MESAth = 0.01e-6; } if(!model->MESAdeltaGiven) { model->MESAdelta = 5.0; } if(!model->MESAtcGiven) { model->MESAtc = 0.0; } if(!model->MESAdrainResistGiven) { model->MESAdrainResist = 0; } if(!model->MESAsourceResistGiven) { model->MESAsourceResist = 0; } if(!model->MESAgateResistGiven) { model->MESAgateResist = 0; } if(!model->MESAriGiven) { model->MESAri = 0; } if(!model->MESArfGiven) { model->MESArf = 0; } if(!model->MESArdiGiven) { model->MESArdi = 0; } if(!model->MESArsiGiven) { model->MESArsi = 0; } if(!model->MESAphibGiven) { model->MESAphib = 0.5*CHARGE; } if(!model->MESAphib1Given) { model->MESAphib1 = 0; } if(!model->MESAastarGiven) { model->MESAastar = 4.0e4; } if(!model->MESAggrGiven) { model->MESAggr = 40; } if(!model->MESAdelGiven) { model->MESAdel = 0.04; } if(!model->MESAxchiGiven) { model->MESAxchi = 0.033; } if(!model->MESAnGiven) { model->MESAn = 1; } if(!model->MESAtvtoGiven) { model->MESAtvto = 0; } if(!model->MESAtlambdaGiven) { model->MESAtlambda = DBL_MAX; } if(!model->MESAteta0Given) { model->MESAteta0 = DBL_MAX; } if(!model->MESAteta1Given) { model->MESAteta1 = 0; } if(!model->MESAtmuGiven) { model->MESAtmu = 300.15; } if(!model->MESAxtm0Given) { model->MESAxtm0 = 0; } if(!model->MESAxtm1Given) { model->MESAxtm1 = 0; } if(!model->MESAxtm2Given) { model->MESAxtm2 = 0; } if(!model->MESAksGiven) { model->MESAks = 0; } if(!model->MESAvsgGiven) { model->MESAvsg = 0; } if(!model->MESAtfGiven) { model->MESAtf = ckt->CKTtemp; } if(!model->MESAfloGiven) { model->MESAflo = 0; } if(!model->MESAdelfoGiven) { model->MESAdelfo = 0; } if(!model->MESAagGiven) { model->MESAag = 0; } if(!model->MESAtc1Given) { model->MESAtc1 = 0; } if(!model->MESAtc2Given) { model->MESAtc2 = 0; } if(!model->MESAzetaGiven) { model->MESAzeta = 1; } if(!model->MESAlevelGiven) { model->MESAlevel = 2; } if(!model->MESAnmaxGiven) { model->MESAnmax = 2e16; } if(!model->MESAgammaGiven) { model->MESAgamma = 3.0; } if(!model->MESAepsiGiven) { model->MESAepsi = 12.244*8.85418e-12; } if(!model->MESAcasGiven) { model->MESAcas = 1; } if(!model->MESAcbsGiven) { model->MESAcbs = 1; } if(model->MESAdrainResist != 0) { model->MESAdrainConduct = 1./model->MESAdrainResist; } else { model->MESAdrainConduct = DBL_MAX; } if(model->MESAsourceResist != 0) { model->MESAsourceConduct = 1./model->MESAsourceResist; } else { model->MESAsourceConduct = DBL_MAX; } model->MESAvcrit = 0.; /* until model has changed */ /* loop through all the instances of the model */ for (here = model->MESAinstances; here != NULL ; here=here->MESAnextInstance) { if(!here->MESAlengthGiven) { here->MESAlength = 1e-6; } if(!here->MESAwidthGiven) { here->MESAwidth = 20e-6; } if(!here->MESAmGiven) { here->MESAm = 1.0; } if(!here->MESAdtempGiven) { here->MESAdtemp = 0.0; } if(!here->MESAtdGiven) { here->MESAtd = ckt->CKTtemp + here->MESAdtemp; } if(!here->MESAtsGiven) { here->MESAts = ckt->CKTtemp + here->MESAdtemp; } here->MESAstate = *states; *states += 20; if(model->MESAsourceResist != 0) { if(here->MESAsourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESAname,"source"); if(error) return(error); here->MESAsourcePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESAsourcePrimeNode = here->MESAsourceNode; } if(model->MESAdrainResist != 0) { if(here->MESAdrainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESAname,"drain"); if(error) return(error); here->MESAdrainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESAdrainPrimeNode = here->MESAdrainNode; } if(model->MESAgateResist != 0) { if(here->MESAgatePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESAname,"gate"); if(error) return(error); here->MESAgatePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESAgatePrimeNode = here->MESAgateNode; } if(model->MESAri != 0) { if(here->MESAsourcePrmPrmNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESAname,"gs"); if(error) return(error); here->MESAsourcePrmPrmNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESAsourcePrmPrmNode = here->MESAsourcePrimeNode; } if(model->MESArf != 0) { if(here->MESAdrainPrmPrmNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESAname,"gd"); if(error) return(error); here->MESAdrainPrmPrmNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESAdrainPrmPrmNode = here->MESAdrainPrimeNode; } #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MESAdrainDrainPtr,MESAdrainNode,MESAdrainNode); TSTALLOC(MESAdrainPrimeDrainPrimePtr,MESAdrainPrimeNode,MESAdrainPrimeNode); TSTALLOC(MESAdrainPrmPrmDrainPrmPrmPtr,MESAdrainPrmPrmNode,MESAdrainPrmPrmNode); TSTALLOC(MESAgateGatePtr,MESAgateNode,MESAgateNode); TSTALLOC(MESAgatePrimeGatePrimePtr,MESAgatePrimeNode,MESAgatePrimeNode); TSTALLOC(MESAsourceSourcePtr,MESAsourceNode,MESAsourceNode); TSTALLOC(MESAsourcePrimeSourcePrimePtr,MESAsourcePrimeNode,MESAsourcePrimeNode); TSTALLOC(MESAsourcePrmPrmSourcePrmPrmPtr,MESAsourcePrmPrmNode,MESAsourcePrmPrmNode); TSTALLOC(MESAdrainDrainPrimePtr,MESAdrainNode,MESAdrainPrimeNode); TSTALLOC(MESAdrainPrimeDrainPtr,MESAdrainPrimeNode,MESAdrainNode); TSTALLOC(MESAgatePrimeDrainPrimePtr,MESAgatePrimeNode,MESAdrainPrimeNode); TSTALLOC(MESAdrainPrimeGatePrimePtr,MESAdrainPrimeNode,MESAgatePrimeNode); TSTALLOC(MESAgatePrimeSourcePrimePtr,MESAgatePrimeNode,MESAsourcePrimeNode); TSTALLOC(MESAsourcePrimeGatePrimePtr,MESAsourcePrimeNode,MESAgatePrimeNode) ; TSTALLOC(MESAsourceSourcePrimePtr,MESAsourceNode,MESAsourcePrimeNode); TSTALLOC(MESAsourcePrimeSourcePtr,MESAsourcePrimeNode,MESAsourceNode); TSTALLOC(MESAdrainPrimeSourcePrimePtr,MESAdrainPrimeNode,MESAsourcePrimeNode); TSTALLOC(MESAsourcePrimeDrainPrimePtr,MESAsourcePrimeNode,MESAdrainPrimeNode); TSTALLOC(MESAgatePrimeGatePtr,MESAgatePrimeNode,MESAgateNode); TSTALLOC(MESAgateGatePrimePtr,MESAgateNode,MESAgatePrimeNode); TSTALLOC(MESAsourcePrmPrmSourcePrimePtr,MESAsourcePrmPrmNode,MESAsourcePrimeNode); TSTALLOC(MESAsourcePrimeSourcePrmPrmPtr,MESAsourcePrimeNode,MESAsourcePrmPrmNode); TSTALLOC(MESAsourcePrmPrmGatePrimePtr,MESAsourcePrmPrmNode,MESAgatePrimeNode); TSTALLOC(MESAgatePrimeSourcePrmPrmPtr,MESAgatePrimeNode,MESAsourcePrmPrmNode); TSTALLOC(MESAdrainPrmPrmDrainPrimePtr,MESAdrainPrmPrmNode,MESAdrainPrimeNode); TSTALLOC(MESAdrainPrimeDrainPrmPrmPtr,MESAdrainPrimeNode,MESAdrainPrmPrmNode); TSTALLOC(MESAdrainPrmPrmGatePrimePtr,MESAdrainPrmPrmNode,MESAgatePrimeNode); TSTALLOC(MESAgatePrimeDrainPrmPrmPtr,MESAgatePrimeNode,MESAdrainPrmPrmNode); } } return(OK); } int MESAunsetup(GENmodel *inModel, CKTcircuit *ckt) { MESAmodel *model; MESAinstance *here; for (model = (MESAmodel *)inModel; model != NULL; model = model->MESAnextModel) { for (here = model->MESAinstances; here != NULL; here=here->MESAnextInstance) { if (here->MESAdrainPrimeNode && here->MESAdrainPrimeNode != here->MESAdrainNode) { CKTdltNNum(ckt, here->MESAdrainPrimeNode); here->MESAdrainPrimeNode = 0; } if (here->MESAsourcePrimeNode && here->MESAsourcePrimeNode != here->MESAsourceNode) { CKTdltNNum(ckt, here->MESAsourcePrimeNode); here->MESAsourcePrimeNode = 0; } if (here->MESAgatePrimeNode && here->MESAgatePrimeNode != here->MESAgateNode) { CKTdltNNum(ckt, here->MESAgatePrimeNode); here->MESAgatePrimeNode = 0; } if (here->MESAsourcePrmPrmNode && here->MESAsourcePrmPrmNode != here->MESAsourcePrimeNode) { CKTdltNNum(ckt, here->MESAsourcePrmPrmNode); here->MESAsourcePrmPrmNode = 0; } if (here->MESAdrainPrmPrmNode && here->MESAdrainPrmPrmNode != here->MESAdrainPrimeNode) { CKTdltNNum(ckt, here->MESAdrainPrmPrmNode); here->MESAdrainPrmPrmNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/mesa/Makefile.am0000644000265600020320000000077212264261473021223 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmesa.la libmesa_la_SOURCES = \ mesa.c \ mesaacl.c \ mesaask.c \ mesadefs.h \ mesadel.c \ mesadest.c \ mesaext.h \ mesagetic.c \ mesainit.c \ mesainit.h \ mesaitf.h \ mesaload.c \ mesamask.c \ mesamdel.c \ mesamparam.c \ mesaparam.c \ mesapzl.c \ mesasetup.c \ mesatemp.c \ mesatrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mesa/mesa.c0000644000265600020320000001647212264261473020264 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "mesadefs.h" #include "ngspice/suffix.h" IFparm MESApTable[] = { /* parameters */ OP("off", MESA_OFF, IF_FLAG ,"Device initially off"), IOP("l", MESA_LENGTH, IF_REAL ,"Length of device"), IOP("w", MESA_WIDTH, IF_REAL ,"Width of device"), IOP("m", MESA_M, IF_REAL ,"Parallel Multiplier"), IOP("icvds", MESA_IC_VDS, IF_REAL ,"Initial D-S voltage"), IOP("icvgs", MESA_IC_VGS, IF_REAL ,"Initial G-S voltage"), IOP("td", MESA_TD, IF_REAL ,"Instance drain temperature"), IOP("ts", MESA_TS, IF_REAL ,"Instance source temperature"), IOP("dtemp", MESA_DTEMP, IF_REAL ,"Instance temperature difference"), OP("dnode", MESA_DRAINNODE, IF_INTEGER,"Number of drain node"), OP("gnode", MESA_GATENODE, IF_INTEGER,"Number of gate node"), OP("snode", MESA_SOURCENODE, IF_INTEGER,"Number of source node"), OP("dprimenode",MESA_DRAINPRIMENODE, IF_INTEGER,"Number of internal drain node"), OP("sprimenode",MESA_SOURCEPRIMENODE,IF_INTEGER,"Number of internal source node"), OP("gprimenode",MESA_GATEPRIMENODE, IF_INTEGER,"Number of internal gate node"), OP("vgs", MESA_VGS, IF_REAL,"Gate-Source voltage"), OP("vgd", MESA_VGD, IF_REAL,"Gate-Drain voltage"), OP("cg", MESA_CG, IF_REAL,"Gate capacitance"), OP("cd", MESA_CD, IF_REAL,"Drain capacitance"), OP("cgd", MESA_CGD, IF_REAL,"Gate_Drain capacitance"), OP("gm", MESA_GM, IF_REAL,"Transconductance"), OP("gds", MESA_GDS, IF_REAL,"Drain-Source conductance"), OP("ggs", MESA_GGS, IF_REAL,"Gate-Source conductance"), OP("ggd", MESA_GGD, IF_REAL,"Gate-Drain conductance"), OP("qgs", MESA_QGS, IF_REAL,"Gate-Source charge storage"), OP("cqgs", MESA_CQGS, IF_REAL,"Capacitance due to gate-source charge storage"), OP("qgd", MESA_QGD, IF_REAL,"Gate-Drain charge storage"), OP("cqgd", MESA_CQGD, IF_REAL,"Capacitance due to gate-drain charge storage"), OP("cs", MESA_CS, IF_REAL,"Source current"), OP("p", MESA_POWER, IF_REAL,"Power dissipated by the mesfet") }; IFparm MESAmPTable[] = { /* model parameters */ OP( "type", MESA_MOD_TYPE, IF_STRING,"N-type or P-type MESfet model"), IOPR( "vt0", MESA_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "vto", MESA_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "lambda", MESA_MOD_LAMBDA, IF_REAL,"Output conductance parameter"), IOP( "lambdahf",MESA_MOD_LAMBDAHF, IF_REAL,"Output conductance parameter at high frequencies"), IOP( "beta", MESA_MOD_BETA, IF_REAL,"Transconductance parameter"), IOP( "vs", MESA_MOD_VS, IF_REAL,"Saturation velocity"), IOP( "rd", MESA_MOD_RD, IF_REAL,"Drain ohmic resistance"), IOP( "rs", MESA_MOD_RS, IF_REAL,"Source ohmic resistance"), IOP( "rg", MESA_MOD_RG, IF_REAL,"Gate ohmic resistance"), IOP( "ri", MESA_MOD_RI, IF_REAL,"Gate-source ohmic resistance"), IOP( "rf", MESA_MOD_RF, IF_REAL,"Gate-drain ohmic resistance"), IOP( "rdi", MESA_MOD_RDI, IF_REAL,"Intrinsic source ohmic resistance"), IOP( "rsi", MESA_MOD_RSI, IF_REAL,"Intrinsic drain ohmic resistance"), IOP( "phib", MESA_MOD_PHIB, IF_REAL,"Effective Schottky barrier height at room temperature"), IOP( "phib1", MESA_MOD_PHIB1, IF_REAL,""), IOP( "tphib", MESA_MOD_PHIB1, IF_REAL,""), IOP( "astar", MESA_MOD_ASTAR, IF_REAL,"Effective Richardson constant"), IOP( "ggr", MESA_MOD_GGR, IF_REAL,"Reverse diode conductance"), IOP( "del", MESA_MOD_DEL, IF_REAL,""), IOP( "xchi", MESA_MOD_XCHI, IF_REAL,""), IOP( "tggr", MESA_MOD_XCHI, IF_REAL,""), IOP( "n", MESA_MOD_N, IF_REAL,"Emission coefficient"), IOP( "eta", MESA_MOD_ETA, IF_REAL,"Subthreshold ideality factor"), IOP( "m", MESA_MOD_M, IF_REAL,"Knee shape parameter"), IOP( "mc", MESA_MOD_MC, IF_REAL,"Knee shape parameter"), IOP( "alpha", MESA_MOD_ALPHA, IF_REAL,""), IOP( "sigma0", MESA_MOD_SIGMA0, IF_REAL,"Threshold voltage coefficient"), IOP( "vsigmat",MESA_MOD_VSIGMAT,IF_REAL,""), IOP( "vsigma", MESA_MOD_VSIGMA, IF_REAL,""), IOP( "mu", MESA_MOD_MU, IF_REAL,"Mobility"), IOP( "theta", MESA_MOD_THETA, IF_REAL,""), IOP( "mu1", MESA_MOD_MU1, IF_REAL,"Second moblity parameter"), IOP( "mu2", MESA_MOD_MU2, IF_REAL,"Third moblity parameter"), IOP( "d", MESA_MOD_D, IF_REAL,"Depth of device"), IOP( "nd", MESA_MOD_ND, IF_REAL,"Doping density"), IOP( "du", MESA_MOD_DU, IF_REAL,"Depth of device"), IOP( "ndu", MESA_MOD_NDU, IF_REAL,"Doping density"), IOP( "th", MESA_MOD_TH, IF_REAL,"Thickness of delta doped layer"), IOP( "ndelta", MESA_MOD_NDELTA, IF_REAL,"Delta doped layer doping density"), IOP( "delta", MESA_MOD_DELTA, IF_REAL,""), IOP( "tc", MESA_MOD_TC, IF_REAL,"Transconductance compression factor"), IOP( "tvto", MESA_MOD_TVTO, IF_REAL,"Temperature coefficient for vto"), IOP( "alphat", MESA_MOD_TVTO, IF_REAL,""), IOP( "tlambda",MESA_MOD_TLAMBDA,IF_REAL,"Temperature coefficient for lambda"), IOP( "teta0", MESA_MOD_TETA0, IF_REAL,"First temperature coefficient for eta"), IOP( "teta1", MESA_MOD_TETA1, IF_REAL,"Second temperature coefficient for eta"), IOP( "tmu", MESA_MOD_TMU, IF_REAL,"Temperature coefficient for mobility"), IOP( "xtm0", MESA_MOD_XTM0, IF_REAL,"First exponent for temp dependence of mobility"), IOP( "xtm1", MESA_MOD_XTM1, IF_REAL,"Second exponent for temp dependence of mobility"), IOP( "xtm2", MESA_MOD_XTM2, IF_REAL,"Third exponent for temp dependence of mobility"), IOP( "ks", MESA_MOD_KS, IF_REAL,"Sidegating coefficient"), IOP( "vsg", MESA_MOD_VSG, IF_REAL,"Sidegating voltage"), IOP( "tf", MESA_MOD_TF, IF_REAL,"Characteristic temperature determined by traps"), IOP( "flo", MESA_MOD_FLO, IF_REAL,""), IOP( "delfo", MESA_MOD_DELFO, IF_REAL,""), IOP( "ag", MESA_MOD_AG, IF_REAL,""), IOP( "rtc1", MESA_MOD_TC1, IF_REAL,""), IOP( "rtc2", MESA_MOD_TC2, IF_REAL,""), IOP( "zeta", MESA_MOD_ZETA, IF_REAL,""), IOP( "level", MESA_MOD_LEVEL, IF_REAL,""), IOP( "nmax", MESA_MOD_NMAX, IF_REAL,""), IOP( "gamma", MESA_MOD_GAMMA, IF_REAL,""), IOP( "epsi", MESA_MOD_EPSI, IF_REAL,""), IOP( "cas", MESA_MOD_CAS, IF_REAL,""), IOP( "cbs", MESA_MOD_CBS, IF_REAL,""), IP( "pmf", MESA_MOD_PMF, IF_FLAG,"P type MESfet model"), IP( "nmf", MESA_MOD_NMF, IF_FLAG,"N type MESfet model"), OP( "gd", MESA_MOD_DRAINCONDUCT, IF_REAL,"Drain conductance"), OP( "gs", MESA_MOD_SOURCECONDUCT, IF_REAL,"Source conductance"), OP( "vcrit", MESA_MOD_VCRIT, IF_REAL,"Critical voltage"), }; char *MESAnames[] = { "Drain", "Gate", "Source" }; int MESAnSize = NUMELEMS(MESAnames); int MESApTSize = NUMELEMS(MESApTable); int MESAmPTSize = NUMELEMS(MESAmPTable); int MESAiSize = sizeof(MESAinstance); int MESAmSize = sizeof(MESAmodel); ngspice-26/src/spicelib/devices/mesa/mesatemp.c0000644000265600020320000001557312264261473021153 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define EPSILONGAAS (12.244*8.85418e-12) int MESAtemp(GENmodel *inModel, CKTcircuit *ckt) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; double temp; double vt; double d; for( ; model != NULL; model = model->MESAnextModel ) { if(!model->MESAlambdahfGiven) model->MESAlambdahf = model->MESAlambda; if(model->MESAlevel == 2) model->MESAvpo = CHARGE*model->MESAnd*model->MESAd*model->MESAd/ 2/EPSILONGAAS; else { model->MESAvpou = CHARGE*model->MESAndu*model->MESAdu*model->MESAdu/ 2/EPSILONGAAS; model->MESAvpod = CHARGE*model->MESAndelta*model->MESAth* (2*model->MESAdu + model->MESAth)/2/EPSILONGAAS; model->MESAvpo = model->MESAvpou+model->MESAvpod; } model->MESAdeltaSqr = model->MESAdelta*model->MESAdelta; for (here = model->MESAinstances; here != NULL ; here=here->MESAnextInstance) { vt = CONSTKoverQ * here->MESAts; if(model->MESAmu1 == 0 && model->MESAmu2 == 0) here->MESAtMu = model->MESAmu*pow(here->MESAts/ model->MESAtmu,model->MESAxtm0); else { double muimp = model->MESAmu*pow(here->MESAts/ model->MESAtmu,model->MESAxtm0); double mupo = model->MESAmu1*pow(model->MESAtmu/ here->MESAts,model->MESAxtm1) + model->MESAmu2*pow(model->MESAtmu/ here->MESAts,model->MESAxtm2); here->MESAtMu = 1/(1/muimp+1/mupo); } here->MESAtTheta = model->MESAtheta; here->MESAtPhib = model->MESAphib-model->MESAphib1*(here->MESAts-ckt->CKTnomTemp); here->MESAtVto = model->MESAthreshold-model->MESAtvto*(here->MESAts-ckt->CKTnomTemp); here->MESAimax = CHARGE*model->MESAnmax*model->MESAvs*here->MESAwidth; if(model->MESAlevel == 2) here->MESAgchi0 = CHARGE*here->MESAwidth/here->MESAlength; else here->MESAgchi0 = CHARGE*here->MESAwidth/here->MESAlength*here->MESAtMu; here->MESAbeta = 2*EPSILONGAAS*model->MESAvs*model->MESAzeta*here->MESAwidth/ model->MESAd; here->MESAtEta = model->MESAeta*(1+here->MESAts/model->MESAteta0)+ model->MESAteta1/here->MESAts; here->MESAtLambda= model->MESAlambda*(1-here->MESAts/model->MESAtlambda); here->MESAtLambdahf = model->MESAlambdahf*(1-here->MESAts/model->MESAtlambda); if(model->MESAlevel == 3) d = model->MESAdu; else d = model->MESAd; if(model->MESAlevel == 4) here->MESAn0 = model->MESAepsi*here->MESAtEta*vt/2/CHARGE/d; else here->MESAn0 = EPSILONGAAS*here->MESAtEta*vt/CHARGE/d; here->MESAnsb0 = EPSILONGAAS*here->MESAtEta*vt/CHARGE/ (model->MESAdu + model->MESAth); here->MESAisatb0 = CHARGE*here->MESAn0*vt* here->MESAwidth/here->MESAlength; if(model->MESAlevel == 4) here->MESAcf = 0.5*model->MESAepsi*here->MESAwidth; else here->MESAcf = 0.5*EPSILONGAAS*here->MESAwidth; here->MESAcsatfs = 0.5*model->MESAastar*here->MESAts* here->MESAts*exp(-here->MESAtPhib/(CONSTboltz*here->MESAts))* here->MESAlength*here->MESAwidth; here->MESAcsatfd = 0.5*model->MESAastar*here->MESAtd* here->MESAtd*exp(-here->MESAtPhib/(CONSTboltz*here->MESAtd))* here->MESAlength*here->MESAwidth; here->MESAggrwl = model->MESAggr*here->MESAlength*here->MESAwidth* exp(model->MESAxchi*(here->MESAts-ckt->CKTnomTemp)); if(here->MESAcsatfs != 0) here->MESAvcrits = vt*log(vt/(CONSTroot2 * here->MESAcsatfs)); else here->MESAvcrits = DBL_MAX; if(here->MESAcsatfd != 0) { double vtd = CONSTKoverQ * here->MESAtd; here->MESAvcritd = vtd*log(vtd/(CONSTroot2 * here->MESAcsatfd)); } else here->MESAvcritd = DBL_MAX; temp = exp(here->MESAts/model->MESAtf); here->MESAfl = model->MESAflo*temp; here->MESAdelf = model->MESAdelfo*temp; if(model->MESArdi != 0.0) here->MESAtRdi = model->MESArdi*(1+ model->MESAtc1*(here->MESAtd-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAtd-ckt->CKTnomTemp)*(here->MESAtd-ckt->CKTnomTemp)); else here->MESAtRdi = 0; if(model->MESArsi != 0.0) here->MESAtRsi = model->MESArsi*(1+ model->MESAtc1*(here->MESAts-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAts-ckt->CKTnomTemp)*(here->MESAts-ckt->CKTnomTemp)); else here->MESAtRsi = 0; if(model->MESAgateResist != 0.0) here->MESAtRg = model->MESAgateResist*(1+ model->MESAtc1*(here->MESAts-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAts-ckt->CKTnomTemp)*(here->MESAts-ckt->CKTnomTemp)); else here->MESAtRg = 0; if(model->MESAsourceResist != 0.0) here->MESAtRs = model->MESAsourceResist*(1+ model->MESAtc1*(here->MESAts-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAts-ckt->CKTnomTemp)*(here->MESAts-ckt->CKTnomTemp)); else here->MESAtRs = 0; if(model->MESAdrainResist != 0.0) here->MESAtRd = model->MESAdrainResist*(1+ model->MESAtc1*(here->MESAtd-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAtd-ckt->CKTnomTemp)*(here->MESAtd-ckt->CKTnomTemp)); else here->MESAtRd = 0; if(model->MESAri != 0.0) here->MESAtRi = model->MESAri*(1+ model->MESAtc1*(here->MESAts-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAts-ckt->CKTnomTemp)*(here->MESAts-ckt->CKTnomTemp)); else here->MESAtRi = 0; if(model->MESArf != 0.0) here->MESAtRf = model->MESArf*(1+ model->MESAtc1*(here->MESAtd-ckt->CKTnomTemp)+ model->MESAtc2*(here->MESAtd-ckt->CKTnomTemp)*(here->MESAtd-ckt->CKTnomTemp)); else here->MESAtRf = 0; if(here->MESAtRd != 0) here->MESAdrainConduct = 1/here->MESAtRd; else here->MESAdrainConduct = 0; if(here->MESAtRs != 0) here->MESAsourceConduct = 1/here->MESAtRs; else here->MESAsourceConduct = 0; if(here->MESAtRg != 0) here->MESAgateConduct = 1/here->MESAtRg; else here->MESAgateConduct = 0; if(here->MESAtRi != 0) here->MESAtGi = 1/here->MESAtRi; else here->MESAtGi = 0; if(here->MESAtRf != 0) here->MESAtGf = 1/here->MESAtRf; else here->MESAtGf = 0; } } return(OK); } ngspice-26/src/spicelib/devices/mesa/Makefile.in0000644000265600020320000004260212264261537021233 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mesa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmesa_la_LIBADD = am_libmesa_la_OBJECTS = mesa.lo mesaacl.lo mesaask.lo mesadel.lo \ mesadest.lo mesagetic.lo mesainit.lo mesaload.lo mesamask.lo \ mesamdel.lo mesamparam.lo mesaparam.lo mesapzl.lo mesasetup.lo \ mesatemp.lo mesatrunc.lo libmesa_la_OBJECTS = $(am_libmesa_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmesa_la_SOURCES) DIST_SOURCES = $(libmesa_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmesa.la libmesa_la_SOURCES = \ mesa.c \ mesaacl.c \ mesaask.c \ mesadefs.h \ mesadel.c \ mesadest.c \ mesaext.h \ mesagetic.c \ mesainit.c \ mesainit.h \ mesaitf.h \ mesaload.c \ mesamask.c \ mesamdel.c \ mesamparam.c \ mesaparam.c \ mesapzl.c \ mesasetup.c \ mesatemp.c \ mesatrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mesa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mesa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmesa.la: $(libmesa_la_OBJECTS) $(libmesa_la_DEPENDENCIES) $(EXTRA_libmesa_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmesa_la_OBJECTS) $(libmesa_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesaacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesaask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesadel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesadest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesagetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesainit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesaload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesamask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesamdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesamparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesaparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesapzl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesasetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesatemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesatrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mesa/mesaload.c0000644000265600020320000010357212264261473021122 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "mesadefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* #define true 1 #define false 0 */ #define EPSILONGAAS (12.244*8.85418e-12) #define W (here->MESAwidth) #define L (here->MESAlength) static void mesa1(MESAmodel*, MESAinstance*, double, double, double, double*, double*, double*, double*,double*); static void mesa2(MESAmodel*, MESAinstance*, double, double, double, double*, double*, double*, double*,double*); static void mesa3(MESAmodel*, MESAinstance*, double, double, double, double*, double*, double*, double*,double*); void Pause(void); int MESAload(GENmodel *inModel, CKTcircuit *ckt) { MESAmodel *model = (MESAmodel*)inModel; MESAinstance *here; double capgd = 0.0; double capgs = 0.0; double cd; double cdhat = 0.0; double cdrain = 0.0; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd; double cgs; double cghat = 0.0; double arg; double earg; double delvds; double delvgd; double delvgs; double delvgspp = 0.0; double delvgdpp = 0.0; double evgd; double evgs; double gds = 0.0; double geq; double ggd; double ggs; double gm = 0.0; double ggspp = 0.0; double cgspp = 0.0; double ggdpp = 0.0; double cgdpp = 0.0; double vcrits; double vcritd; double vds = 0.0; double vgd = 0.0; double vgs = 0.0; double vgspp = 0.0; double vgdpp = 0.0; double vgs1 = 0.0; double vgd1 = 0.0; #ifndef PREDICTOR double xfact; #endif double temp; double vted; double vtes; double vtd; double vts; double von; double ccorr; int inverse = FALSE; int icheck; int ichk1; int error; double m; /* loop through all the models */ for( ; model != NULL; model = model->MESAnextModel ) { /* loop through all the instances of the model */ for (here = model->MESAinstances; here != NULL ; here=here->MESAnextInstance) { /* * dc model parameters */ vcrits = here->MESAvcrits; vcritd = here->MESAvcritd; vtd = CONSTKoverQ * here->MESAtd; vts = CONSTKoverQ * here->MESAts; vted = model->MESAn*vtd; vtes = model->MESAn*vts; /* * initialization */ icheck = 1; if( ckt->CKTmode & MODEINITSMSIG) { vgs = *(ckt->CKTstate0 + here->MESAvgs); vgd = *(ckt->CKTstate0 + here->MESAvgd); vgspp = *(ckt->CKTstate0 + here->MESAvgspp); vgdpp = *(ckt->CKTstate0 + here->MESAvgdpp); } else if (ckt->CKTmode & MODEINITTRAN) { vgs = *(ckt->CKTstate1 + here->MESAvgs); vgd = *(ckt->CKTstate1 + here->MESAvgd); vgspp = *(ckt->CKTstate1 + here->MESAvgspp); vgdpp = *(ckt->CKTstate1 + here->MESAvgdpp); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds = here->MESAicVDS; vgs = here->MESAicVGS; vgd = vgs-vds; vgspp = vgs; vgdpp = vgd; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->MESAoff == 0) ) { vgs = -1; vgd = -1; vgspp = 0; vgdpp = 0; } else if( (ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->MESAoff))) { vgs = 0; vgd = 0; vgspp = 0; vgdpp = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[2]; *(ckt->CKTstate0 + here->MESAvgs) = *(ckt->CKTstate1 + here->MESAvgs); vgs = (1+xfact) * *(ckt->CKTstate1 + here->MESAvgs) - xfact * *(ckt->CKTstate2 + here->MESAvgs); *(ckt->CKTstate0 + here->MESAvgspp) = *(ckt->CKTstate1 + here->MESAvgspp); vgspp = (1+xfact) * *(ckt->CKTstate1 + here->MESAvgspp) - xfact * *(ckt->CKTstate2 + here->MESAvgspp); *(ckt->CKTstate0 + here->MESAvgd) = *(ckt->CKTstate1 + here->MESAvgd); vgd = (1+xfact)* *(ckt->CKTstate1 + here->MESAvgd) - xfact * *(ckt->CKTstate2 + here->MESAvgd); *(ckt->CKTstate0 + here->MESAvgdpp) = *(ckt->CKTstate1 + here->MESAvgdpp); vgdpp = (1+xfact) * *(ckt->CKTstate1 + here->MESAvgdpp) - xfact * *(ckt->CKTstate2 + here->MESAvgdpp); *(ckt->CKTstate0 + here->MESAcg) = *(ckt->CKTstate1 + here->MESAcg); *(ckt->CKTstate0 + here->MESAcd) = *(ckt->CKTstate1 + here->MESAcd); *(ckt->CKTstate0 + here->MESAcgd) = *(ckt->CKTstate1 + here->MESAcgd); *(ckt->CKTstate0 + here->MESAcgs) = *(ckt->CKTstate1 + here->MESAcgs); *(ckt->CKTstate0 + here->MESAgm) = *(ckt->CKTstate1 + here->MESAgm); *(ckt->CKTstate0 + here->MESAgds) = *(ckt->CKTstate1 + here->MESAgds); *(ckt->CKTstate0 + here->MESAggs) = *(ckt->CKTstate1 + here->MESAggs); *(ckt->CKTstate0 + here->MESAggd) = *(ckt->CKTstate1 + here->MESAggd); *(ckt->CKTstate0 + here->MESAggspp) = *(ckt->CKTstate1 + here->MESAggspp); *(ckt->CKTstate0 + here->MESAcgspp) = *(ckt->CKTstate1 + here->MESAcgspp); *(ckt->CKTstate0 + here->MESAggdpp) = *(ckt->CKTstate1 + here->MESAggdpp); *(ckt->CKTstate0 + here->MESAcgdpp) = *(ckt->CKTstate1 + here->MESAcgdpp); } else { #endif /* PREDICTOR */ /* * compute new nonlinear branch voltages */ vgs = (*(ckt->CKTrhsOld+ here->MESAgatePrimeNode)- *(ckt->CKTrhsOld+here->MESAsourcePrimeNode)); vgd = (*(ckt->CKTrhsOld+here->MESAgatePrimeNode)- *(ckt->CKTrhsOld+here->MESAdrainPrimeNode)); vgspp = (*(ckt->CKTrhsOld+here->MESAgatePrimeNode)- *(ckt->CKTrhsOld+here->MESAsourcePrmPrmNode)); vgdpp = (*(ckt->CKTrhsOld+here->MESAgatePrimeNode)- *(ckt->CKTrhsOld+here->MESAdrainPrmPrmNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvgs=vgs - *(ckt->CKTstate0 + here->MESAvgs); delvgd=vgd - *(ckt->CKTstate0 + here->MESAvgd); delvds=delvgs - delvgd; delvgspp = vgspp - *(ckt->CKTstate0 + here->MESAvgspp); delvgdpp = vgdpp - *(ckt->CKTstate0 + here->MESAvgdpp); cghat= *(ckt->CKTstate0 + here->MESAcg) + *(ckt->CKTstate0 + here->MESAggd)*delvgd + *(ckt->CKTstate0 + here->MESAggs)*delvgs + *(ckt->CKTstate0 + here->MESAggspp)*delvgspp+ *(ckt->CKTstate0 + here->MESAggdpp)*delvgdpp; cdhat= *(ckt->CKTstate0 + here->MESAcd) + *(ckt->CKTstate0 + here->MESAgm)*delvgs + *(ckt->CKTstate0 + here->MESAgds)*delvds - *(ckt->CKTstate0 + here->MESAggd)*delvgd; /* * bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->MESAvgs)))+ ckt->CKTvoltTol) ) if((fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->MESAvgd)))+ ckt->CKTvoltTol)) if((fabs(delvgspp) < ckt->CKTreltol*MAX(fabs(vgspp), fabs(*(ckt->CKTstate0 + here->MESAvgspp)))+ ckt->CKTvoltTol)) if((fabs(delvgdpp) < ckt->CKTreltol*MAX(fabs(vgdpp), fabs(*(ckt->CKTstate0 + here->MESAvgdpp)))+ ckt->CKTvoltTol)) if((fabs(cghat-*(ckt->CKTstate0 + here->MESAcg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->MESAcg)))+ ckt->CKTabstol)) if((fabs(cdhat-*(ckt->CKTstate0 + here->MESAcd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->MESAcd)))+ ckt->CKTabstol)) { /* we can do a bypass */ vgs= *(ckt->CKTstate0 + here->MESAvgs); vgd= *(ckt->CKTstate0 + here->MESAvgd); vds= vgs-vgd; vgspp = *(ckt->CKTstate0 + here->MESAvgspp); vgdpp = *(ckt->CKTstate0 + here->MESAvgdpp); cg= *(ckt->CKTstate0 + here->MESAcg); cd= *(ckt->CKTstate0 + here->MESAcd); cgs= *(ckt->CKTstate0 + here->MESAcgs); cgd= *(ckt->CKTstate0 + here->MESAcgd); gm= *(ckt->CKTstate0 + here->MESAgm); gds= *(ckt->CKTstate0 + here->MESAgds); ggs= *(ckt->CKTstate0 + here->MESAggs); ggd= *(ckt->CKTstate0 + here->MESAggd); ggspp = *(ckt->CKTstate0 + here->MESAggspp); cgspp = *(ckt->CKTstate0 + here->MESAcgspp); ggdpp = *(ckt->CKTstate0 + here->MESAggdpp); cgdpp = *(ckt->CKTstate0 + here->MESAcgdpp); goto load; } /* * limit nonlinear branch voltages */ ichk1=1; vgs = DEVpnjlim(vgs,*(ckt->CKTstate0 + here->MESAvgs),vtes, vcrits, &icheck); vgd = DEVpnjlim(vgd,*(ckt->CKTstate0 + here->MESAvgd),vted, vcritd,&ichk1); if (ichk1 == 1) { icheck=1; } vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MESAvgs), here->MESAtVto); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->MESAvgd), here->MESAtVto); if(here->MESAsourcePrmPrmNode == here->MESAsourcePrimeNode) vgspp = vgs; if(here->MESAdrainPrmPrmNode == here->MESAdrainPrimeNode) vgdpp = vgd; } /* * determine dc current and derivatives */ vds = vgs-vgd; arg = -vgs*model->MESAdel/vts; earg = exp(arg); evgs = exp(vgs/vtes); ggs = here->MESAcsatfs*evgs/vtes+here->MESAggrwl*earg*(1-arg)+ckt->CKTgmin; cgs = here->MESAcsatfs*(evgs-1)+here->MESAggrwl*vgs*earg+ ckt->CKTgmin*vgs; cg = cgs; arg = -vgd*model->MESAdel/vtd; earg = exp(arg); evgd = exp(vgd/vted); ggd = here->MESAcsatfd*evgd/vted+here->MESAggrwl*earg*(1-arg)+ckt->CKTgmin; cgd = here->MESAcsatfd*(evgd-1)+here->MESAggrwl*vgd*earg+ ckt->CKTgmin*vgd; cg = cg+cgd; if(vds < 0) { vds = -vds; inverse = TRUE; } von = here->MESAtVto+model->MESAks*(*(ckt->CKTrhsOld+here->MESAsourcePrimeNode)-model->MESAvsg); if(model->MESAlevel == 2) mesa1(model,here,inverse?vgd:vgs,vds,von,&cdrain,&gm,&gds,&capgs,&capgd); else if(model->MESAlevel == 3) mesa2(model,here,inverse?vgd:vgs,vds,von,&cdrain,&gm,&gds,&capgs,&capgd); else if(model->MESAlevel == 4) mesa3(model,here,inverse?vgd:vgs,vds,von,&cdrain,&gm,&gds,&capgs,&capgd); if(inverse) { cdrain = -cdrain; vds = -vds; temp = capgs; capgs = capgd; capgd = temp; } /* * compute equivalent drain current source */ cd = cdrain - cgd; if ( (ckt->CKTmode & (MODETRAN|MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * charge storage elements */ vgs1 = *(ckt->CKTstate1 + here->MESAvgspp); vgd1 = *(ckt->CKTstate1 + here->MESAvgdpp); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MESAqgs) = capgs*vgspp; *(ckt->CKTstate1 + here->MESAqgd) = capgd*vgdpp; } *(ckt->CKTstate0+here->MESAqgs) = *(ckt->CKTstate1 + here->MESAqgs) + capgs*(vgspp-vgs1); *(ckt->CKTstate0+here->MESAqgd) = *(ckt->CKTstate1 + here->MESAqgd) + capgd*(vgdpp-vgd1); /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->MESAqgs) = capgs; *(ckt->CKTstate0 + here->MESAqgd) = capgd; continue; /*go to 1000*/ } /* * transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MESAqgs) = *(ckt->CKTstate0 + here->MESAqgs); *(ckt->CKTstate1 + here->MESAqgd) = *(ckt->CKTstate0 + here->MESAqgd); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->MESAqgs); if(error) return(error); ggspp = geq; cgspp = *(ckt->CKTstate0 + here->MESAcqgs); cg = cg + cgspp; error = NIintegrate(ckt,&geq,&ceq,capgd,here->MESAqgd); if(error) return(error); ggdpp = geq; cgdpp = *(ckt->CKTstate0 + here->MESAcqgd); cg = cg + cgdpp; cd = cd - cgdpp; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MESAcqgs) = *(ckt->CKTstate0 + here->MESAcqgs); *(ckt->CKTstate1 + here->MESAcqgd) = *(ckt->CKTstate0 + here->MESAcqgd); } } } /* * check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if( (icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol* MAX(fabs(cghat),fabs(cg))+ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol) ) { ckt->CKTnoncon++; } } *(ckt->CKTstate0 + here->MESAvgs) = vgs; *(ckt->CKTstate0 + here->MESAvgspp) = vgspp; *(ckt->CKTstate0 + here->MESAvgd) = vgd; *(ckt->CKTstate0 + here->MESAvgdpp) = vgdpp; *(ckt->CKTstate0 + here->MESAcg) = cg; *(ckt->CKTstate0 + here->MESAcd) = cd; *(ckt->CKTstate0 + here->MESAcgd) = cgd; *(ckt->CKTstate0 + here->MESAcgs) = cgs; *(ckt->CKTstate0 + here->MESAgm) = gm; *(ckt->CKTstate0 + here->MESAgds) = gds; *(ckt->CKTstate0 + here->MESAggs) = ggs; *(ckt->CKTstate0 + here->MESAggd) = ggd; *(ckt->CKTstate0 + here->MESAggspp) = ggspp; *(ckt->CKTstate0 + here->MESAcgspp) = cgspp; *(ckt->CKTstate0 + here->MESAggdpp) = ggdpp; *(ckt->CKTstate0 + here->MESAcgdpp) = cgdpp; /* * load current vector */ load: m = here->MESAm; ccorr = model->MESAag*(cgs-cgd); ceqgd = cgd + cgdpp - ggd*vgd - ggdpp*vgdpp; ceqgs = cgs + cgspp - ggs*vgs - ggspp*vgspp; cdreq=((cd+cgd+cgdpp)-gds*vds-gm*vgs); *(ckt->CKTrhs + here->MESAgatePrimeNode) += m * (-ceqgs-ceqgd); ceqgd = (cgd-ggd*vgd); *(ckt->CKTrhs + here->MESAdrainPrimeNode) += m * (-cdreq+ceqgd+ccorr); ceqgd = (cgdpp-ggdpp*vgdpp); *(ckt->CKTrhs + here->MESAdrainPrmPrmNode) += ceqgd; ceqgs = (cgs-ggs*vgs); *(ckt->CKTrhs + here->MESAsourcePrimeNode) += m * (cdreq+ceqgs-ccorr); ceqgs = (cgspp-ggspp*vgspp); *(ckt->CKTrhs + here->MESAsourcePrmPrmNode) += ceqgs; /* * load y matrix */ *(here->MESAdrainDrainPtr) += m * (here->MESAdrainConduct); *(here->MESAsourceSourcePtr) += m * (here->MESAsourceConduct); *(here->MESAgateGatePtr) += m * (here->MESAgateConduct); *(here->MESAsourcePrmPrmSourcePrmPrmPtr) += m * (here->MESAtGi+ggspp); *(here->MESAdrainPrmPrmDrainPrmPrmPtr) += m * (here->MESAtGf+ggdpp); *(here->MESAgatePrimeGatePrimePtr) += m * (ggd+ggs+here->MESAgateConduct+ggspp+ggdpp); *(here->MESAdrainPrimeDrainPrimePtr) += m * (gds+ggd+here->MESAdrainConduct+here->MESAtGf); *(here->MESAsourcePrimeSourcePrimePtr) += m * (gds+gm+ggs+here->MESAsourceConduct+here->MESAtGi); *(here->MESAdrainDrainPrimePtr) -= m * (here->MESAdrainConduct); *(here->MESAdrainPrimeDrainPtr) -= m * (here->MESAdrainConduct); *(here->MESAsourceSourcePrimePtr) -= m * (here->MESAsourceConduct); *(here->MESAsourcePrimeSourcePtr) -= m * (here->MESAsourceConduct); *(here->MESAgateGatePrimePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeGatePtr) -= m * (here->MESAgateConduct); *(here->MESAgatePrimeDrainPrimePtr) -= m * (ggd); *(here->MESAgatePrimeSourcePrimePtr) -= m * (ggs); *(here->MESAdrainPrimeGatePrimePtr) += m * (gm-ggd); *(here->MESAdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->MESAsourcePrimeGatePrimePtr) += m * (-ggs-gm); *(here->MESAsourcePrimeDrainPrimePtr) -= m * (gds); *(here->MESAsourcePrimeSourcePrmPrmPtr) -= m * (here->MESAtGi); *(here->MESAsourcePrmPrmSourcePrimePtr) -= m * (here->MESAtGi); *(here->MESAgatePrimeSourcePrmPrmPtr) -= m * (ggspp); *(here->MESAsourcePrmPrmGatePrimePtr) -= m * (ggspp); *(here->MESAdrainPrimeDrainPrmPrmPtr) -= m * (here->MESAtGf); *(here->MESAdrainPrmPrmDrainPrimePtr) -= m * (here->MESAtGf); *(here->MESAgatePrimeDrainPrmPrmPtr) -= m * (ggdpp); *(here->MESAdrainPrmPrmGatePrimePtr) -= m * (ggdpp); } } return(OK); } #define ETA (here->MESAtEta) #define MU0 (here->MESAtMu) #define RS (here->MESAtRsi) #define RD (here->MESAtRdi) #define SIGMA0 (model->MESAsigma0) #define VSIGMAT (model->MESAvsigmat) #define VSIGMA (model->MESAvsigma) #define THETA (model->MESAtheta) #define VS (model->MESAvs) #define ND (model->MESAnd) #define D (model->MESAd) #define TC (model->MESAtc) #define MC (model->MESAmc) #define M0 (model->MESAm) #define ALPHA (model->MESAalpha) #define LAMBDA (here->MESAtLambda) #define NDELTA (model->MESAndelta) #define TH (model->MESAth) #define NDU (model->MESAndu) #define DU (model->MESAdu) #define NMAX (model->MESAnmax) #define GAMMA (model->MESAgamma) static void mesa1(MESAmodel *model, MESAinstance *here, double vgs, double vds, double von, double *cdrain, double *gm, double *gds, double *capgs, double *capgd) { double vt; double etavth; double vl; double rt; double mu; double beta; double vgt; double vgt0; double sigma; double vgte; double isat; double isata; double isatb; double ns; double a; double b; double c; double d; double e; double f; double g; double h; double m; double p; double q; double r; double s; double t; double u; double v; double w; double temp; double gch; double gchi; double vsate; double vdse; double cgc; double sqrt1; double delidgch; double delgchgchi; double delgchins; double delnsvgt; double delnsvgte; double delvgtevgt; double delidvsate; double delvsateisat; double delisatisata; double delisatavgte; double delisatabeta; double delisatisatb; double delvsategch; double delidvds; double ddevgte; double dvgtvgs; double dgchivgt; double dvgtevds; double dgchivds; double disatavgt; double disatavds; double disatbvgt; double dvsatevgt; double dvsatevds; double gmmadd; double gdsmadd; vt = CONSTKoverQ * here->MESAts; etavth = ETA*vt; rt = RS+RD; vgt0 = vgs - von; s = exp((vgt0-VSIGMAT)/VSIGMA); sigma = SIGMA0/(1+s); vgt = vgt0+sigma*vds; mu = MU0+THETA*vgt; vl = VS/mu*here->MESAlength; beta = here->MESAbeta/(model->MESAvpo+3*vl); u = vgt/vt-1; t = sqrt(model->MESAdeltaSqr+u*u); vgte = 0.5*vt*(2+u+t); a = 2*beta*vgte; b = exp(-vgt/etavth); if(vgte > model->MESAvpo) sqrt1 = 0; else sqrt1 = sqrt(1-vgte/model->MESAvpo); ns = 1.0/(1.0/ND/D/(1-sqrt1) + 1.0/here->MESAn0*b); if(ns < 1.0e-38) { *cdrain = 0; *gm = 0.0; *gds = 0.0; *capgs = here->MESAcf; *capgd = here->MESAcf; return; } gchi = here->MESAgchi0*mu*ns; gch = gchi/(1+gchi*rt); f = sqrt(1+2*a*RS); d = 1+a*RS + f; e = 1+TC*vgte; isata = a*vgte/(d*e); isatb = here->MESAisatb0*mu*exp(vgt/etavth); isat = isata*isatb/(isata+isatb); vsate = isat/gch; vdse = vds*pow(1+pow(vds/vsate,MC),-1.0/MC); m = M0+ALPHA*vgte; g = pow(vds/vsate,m); h = pow(1+g,1.0/m); here->MESAdelidgch0 = vds/h; delidgch = here->MESAdelidgch0*(1+LAMBDA*vds); *cdrain = gch*delidgch; if(vgt > model->MESAvpo) temp = 0; else temp = sqrt(1-vgt/model->MESAvpo); cgc = W*L*EPSILONGAAS/(temp+b)/D; c = (vsate-vdse)/(2*vsate-vdse); c = c*c; *capgs = here->MESAcf+2.0/3.0*cgc*(1-c); c = vsate/(2*vsate-vdse); c = c*c; *capgd = here->MESAcf+2.0/3.0*cgc*(1-c); temp = 1+gchi*rt; delgchgchi = 1.0/(temp*temp); delgchins = here->MESAgchi0*mu; delnsvgt = ns*ns*1.0/here->MESAn0/etavth*b; q = 1 - sqrt1; if(sqrt1 == 0) delnsvgte = 0; else delnsvgte = 0.5*ns*ns/(model->MESAvpo*ND*D*sqrt1*q*q); delvgtevgt = 0.5*(1+u/t); here->MESAdelidvds0 = gch/h; if(vds != 0.0) here->MESAdelidvds1 = (*cdrain)*pow(vds/vsate,m-1)/(vsate*(1+g)); else here->MESAdelidvds1 = 0.0; delidvds = here->MESAdelidvds0*(1+2*LAMBDA*vds) - here->MESAdelidvds1; delidvsate = (*cdrain)*g/(vsate*(1+g)); delvsateisat = 1.0/gch; r = isata+isatb; r = r*r; delisatisata = isatb*isatb/r; v = 1.0+1.0/f; ddevgte = 2*beta*RS*v*e+d*TC; temp = d*d*e*e; delisatavgte = (2*a*d*e - a*vgte*ddevgte)/temp; delisatabeta = 2*vgte*vgte*(d*e-a*e*RS*v)/temp; delisatisatb = isata*isata/r; delvsategch = -vsate/gch; dvgtvgs = 1 - SIGMA0*vds*s/VSIGMA/((1+s)*(1+s)); temp = here->MESAgchi0*ns*THETA; dgchivgt = delgchins*(delnsvgte*delvgtevgt+delnsvgt)+temp; dvgtevds = delvgtevgt*sigma; dgchivds = delgchins*(delnsvgte*dvgtevds+delnsvgt*sigma)+temp*sigma; temp = delisatabeta*3*beta*vl*THETA/(mu*(model->MESAvpo+3*vl)); disatavgt = delisatavgte*delvgtevgt+temp; disatavds = delisatavgte*dvgtevds+temp*sigma; disatbvgt = isatb/etavth+isatb/mu*THETA; p = delgchgchi*dgchivgt; w = delgchgchi*dgchivds; dvsatevgt = delvsateisat*(delisatisata*disatavgt+delisatisatb*disatbvgt)+delvsategch*p; dvsatevds = delvsateisat*(delisatisata*disatavds+delisatisatb*disatbvgt*sigma)+delvsategch*w; if(ALPHA != 0) { if(vds == 0) gmmadd = 0; else gmmadd = (*cdrain)*(log(1+g)/(m*m)-g*log(vds/vsate)/(m*(1+g)))* ALPHA*delvgtevgt; gdsmadd = gmmadd*sigma; } else { gmmadd = 0; gdsmadd = 0; } here->MESAgm0 = p; here->MESAgm1 = delidvsate*dvsatevgt; here->MESAgm2 = dvgtvgs; g = delidgch*p+here->MESAgm1; *gm = (g+gmmadd)*dvgtvgs; here->MESAgds0 = delidvsate*dvsatevds+delidgch*w+gdsmadd; *gds = delidvds+here->MESAgds0; } static void mesa2(MESAmodel *model, MESAinstance *here, double vgs, double vds, double von, double *cdrain, double *gm, double *gds, double *capgs, double *capgd) { double vt; double rt; double vgt; double etavth; double vgt0; double sigma; double vgte; double isat; double isata; double isatb; double nsa; double nsb; double ns; double a; double b; double c; double d; double e; double f; double g; double h; double p; double q; double r; double s; double t; double gch; double gchi; double vsate; double vdse; double ca; double cb; double cgc; double delidgch; double delgchgchi; double delgchins; double delnsvgt; double delnsbvgt; double delnsavgte; double delvgtevgt; double delidvsate; double delvsateisat; double delisatisata; double delisatavgte; double delisatisatb; double delvsategch; double delisatbvgt; double delvsatevgt; double delidvds; double ddevgte; double delvgtvgs; vt = CONSTKoverQ * here->MESAts; etavth = ETA*vt; rt = RS+RD; vgt0 = vgs - von; s = exp((vgt0-VSIGMAT)/VSIGMA); sigma = SIGMA0/(1+s); vgt = vgt0+sigma*vds; t = vgt/vt-1; q = sqrt(model->MESAdeltaSqr+t*t); vgte = 0.5*vt*(2+t+q); a = 2*model->MESAbeta*vgte; if(vgt > model->MESAvpod) { if(vgte > model->MESAvpo) { nsa = NDELTA*TH + NDU*DU; ca = EPSILONGAAS/DU; delnsavgte = 0; } else { r = sqrt((model->MESAvpo-vgte)/model->MESAvpou); nsa = NDELTA*TH + NDU*DU*(1-r); ca = EPSILONGAAS/DU/r; delnsavgte = NDU*DU/model->MESAvpou/2.0/r; } } else { if(model->MESAvpod - vgte < 0) { nsa = NDELTA*TH*(1-DU/TH); ca = EPSILONGAAS/DU; delnsavgte = 0; } else { r = sqrt(1+NDU/NDELTA*(model->MESAvpod - vgte)/model->MESAvpou); nsa = NDELTA*TH*(1-DU/TH*(r-1)); ca = EPSILONGAAS/DU/r; delnsavgte = DU*NDU/2.0/model->MESAvpou/r; } } b = exp(vgt/etavth); cb = EPSILONGAAS/(DU+TH)*b; nsb = here->MESAnsb0*b; delnsbvgt = nsb/etavth; ns = nsa*nsb/(nsa+nsb); if(ns < 1.0e-38) { *cdrain = 0; *gm = 0.0; *gds = 0.0; *capgs = here->MESAcf; *capgd = here->MESAcf; return; } gchi = here->MESAgchi0*ns; gch = gchi/(1+gchi*rt); f = sqrt(1+2*a*RS); d = 1+a*RS + f; e = 1+TC*vgte; isata = a*vgte/d/e; isatb = here->MESAisatb0*b; isat = isata*isatb/(isata+isatb); vsate = isat/gch; vdse = vds*pow(1+pow(vds/vsate,MC),-1.0/MC); g = pow(vds/vsate,M0); h = pow(1+g,1.0/M0); here->MESAdelidgch0 = vds/h; delidgch = here->MESAdelidgch0*(1+LAMBDA*vds); *cdrain = gch*delidgch; cgc = W*L*ca*cb/(ca+cb); c = (vsate-vdse)/(2*vsate-vdse); c = c*c; *capgs = here->MESAcf+2.0/3.0*cgc*(1-c); c = vsate/(2*vsate-vdse); c = c*c; *capgd = here->MESAcf+2.0/3.0*cgc*(1-c); c = vgt/vt-1; delvgtevgt = 0.5*(1+t/q); here->MESAdelidvds0 = gch/h; if(vds != 0.0) here->MESAdelidvds1 = (*cdrain)*pow(vds/vsate,M0-1)/vsate/(1+g); else here->MESAdelidvds1 = 0.0; delidvds = here->MESAdelidvds0*(1+2*LAMBDA*vds) - here->MESAdelidvds1; delgchgchi = 1.0/(1+gchi*rt)/(1+gchi*rt); delgchins = here->MESAgchi0; r = nsa+nsb; r = r*r; delnsvgt = (nsb*nsb*delvgtevgt*delnsavgte + nsa*nsa*delnsbvgt)/r; delidvsate = (*cdrain)*g/vsate/(1+g); delvsateisat = 1.0/gch; r = isata+isatb; r = r*r; delisatisata = isatb*isatb/r; ddevgte = 2*model->MESAbeta*RS*(1+1.0/f)*e+d*TC; delisatavgte = (2*a*d*e - a*vgte*ddevgte)/d/d/e/e; delisatisatb = isata*isata/r; delisatbvgt = isatb/etavth; delvsategch = -vsate/gch; delvgtvgs = 1-SIGMA0*vds*s/VSIGMA/(1+s)/(1+s); p = delgchgchi*delgchins*delnsvgt; delvsatevgt = delvsateisat*(delisatisata*delisatavgte*delvgtevgt + delisatisatb*delisatbvgt) + delvsategch*p; here->MESAgm0 = p; here->MESAgm1 = delidvsate*delvsatevgt; here->MESAgm2 = delvgtvgs; g = delidgch*p + here->MESAgm1; *gm = g*delvgtvgs; here->MESAgds0 = g*sigma; *gds = delidvds+here->MESAgds0; } static void mesa3(MESAmodel *model, MESAinstance *here, double vgs, double vds, double von, double *cdrain, double *gm, double *gds, double *capgs, double *capgd) { double vt; double vgt; double vgt0; double sigma; double vgte; double isat; double isatm; double ns; double nsm; double a; double b; double c; double d; double e; double g; double h; double p; double q; double s; double t; double u; double temp; double etavth; double gch; double gchi; double gchim; double vsate; double vdse; double cgc; double cgcm; double rt; double vl; double delidgch; double delgchgchi; double delgchins; double delnsnsm; double delnsmvgt; double delvgtevgt; double delidvsate; double delvsateisat; double delisatisatm; double delisatmvgte; double delisatmgchim; double delvsategch; double delidvds; double delvgtvgs; double delvsatevgt; vt = CONSTKoverQ * here->MESAts; etavth = ETA*vt; vl = VS/MU0*L; rt = RS+RD; vgt0 = vgs - von; s = exp((vgt0-VSIGMAT)/VSIGMA); sigma = SIGMA0/(1+s); vgt = vgt0+sigma*vds; u = 0.5*vgt/vt-1; t = sqrt(model->MESAdeltaSqr+u*u); vgte = vt*(2+u+t); b = exp(vgt/etavth); nsm = 2*here->MESAn0*log(1+0.5*b); if(nsm < 1.0e-38) { *cdrain = 0; *gm = 0.0; *gds = 0.0; *capgs = here->MESAcf; *capgd = here->MESAcf; return; } c = pow(nsm/NMAX,GAMMA); q = pow(1+c,1.0/GAMMA); ns = nsm/q; gchi = here->MESAgchi0*ns; gch = gchi/(1+gchi*rt); gchim = here->MESAgchi0*nsm; h = sqrt(1+2*gchim*model->MESArsi + vgte*vgte/(vl*vl)); p = 1+gchim*RS+h; isatm = gchim*vgte/p; g = pow(isatm/here->MESAimax,GAMMA); isat = isatm/pow(1+g,1/GAMMA); vsate = isat/gch; vdse = vds*pow(1+pow(vds/vsate,MC),-1.0/MC); d = pow(vds/vsate,M0); e = pow(1+d,1.0/M0); delidgch = vds*(1+LAMBDA*vds)/e; *cdrain = gch*delidgch; cgcm = 1.0/(1/model->MESAcas*D/model->MESAepsi + 1/model->MESAcbs*etavth/CHARGE/here->MESAn0*exp(-vgt/etavth)); cgc = W*L*cgcm/pow(1+c,1+1.0/GAMMA); /* { char buf[256]; void far pascal OutputDebugString(char*); sprintf(buf,"\n%f\t%e",vgs,cgc); OutputDebugString(buf); } */ a = (vsate-vdse)/(2*vsate-vdse); a = a*a; temp = 2.0/3.0; *capgs = here->MESAcf+temp*cgc*(1-a); a = vsate/(2*vsate-vdse); a = a*a; *capgd = here->MESAcf+temp*cgc*(1-a); delidvsate = (*cdrain)*d/vsate/(1+d); delidvds = gch*(1+2*LAMBDA*vds)/e-(*cdrain)* pow(vds/vsate,M0-1)/(vsate*(1+d)); a = 1+gchi*rt; delgchgchi = 1.0/(a*a); delgchins = here->MESAgchi0; delnsnsm = ns/nsm*(1-c/(1+c)); delnsmvgt = here->MESAn0/etavth/(1.0/b + 0.5); delvgtevgt = 0.5*(1+u/t); delvsateisat = 1.0/gch; delisatisatm = isat/isatm*(1-g/(1+g)); delisatmvgte = gchim*(p - vgte*vgte/(vl*vl*h))/(p*p); delvsategch = -vsate/gch; delisatmgchim = vgte*(p - gchim*RS*(1+1.0/h))/(p*p); delvgtvgs = 1-vds*SIGMA0/VSIGMA*s/((1+s)*(1+s)); p = delgchgchi*delgchins*delnsnsm*delnsmvgt; delvsatevgt = (delvsateisat*delisatisatm*(delisatmvgte*delvgtevgt + delisatmgchim*here->MESAgchi0*delnsmvgt)+delvsategch*p); g = delidgch*p + delidvsate*delvsatevgt; *gm = g*delvgtvgs; *gds = delidvds + g*sigma; } ngspice-26/src/spicelib/devices/mesa/mesaparam.c0000644000265600020320000000412112264261473021271 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mesadefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { MESAinstance *here = (MESAinstance*)inst; NG_IGNORE(select); switch(param) { case MESA_LENGTH: here->MESAlength = value->rValue; here->MESAlengthGiven = TRUE; break; case MESA_WIDTH: here->MESAwidth = value->rValue; here->MESAwidthGiven = TRUE; break; case MESA_M: here->MESAm = value->rValue; here->MESAmGiven = TRUE; break; case MESA_IC_VDS: here->MESAicVDS = value->rValue; here->MESAicVDSGiven = TRUE; break; case MESA_IC_VGS: here->MESAicVGS = value->rValue; here->MESAicVGSGiven = TRUE; break; case MESA_OFF: here->MESAoff = value->iValue; break; case MESA_IC: switch(value->v.numValue) { case 2: here->MESAicVGS = *(value->v.vec.rVec+1); here->MESAicVGSGiven = TRUE; case 1: here->MESAicVDS = *(value->v.vec.rVec); here->MESAicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MESA_TD: here->MESAtd = value->rValue+CONSTCtoK; here->MESAtdGiven = TRUE; break; case MESA_TS: here->MESAts = value->rValue+CONSTCtoK; here->MESAtsGiven = TRUE; break; case MESA_DTEMP: here->MESAdtemp = value->rValue; here->MESAdtempGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mesa/mesainit.h0000644000265600020320000000037012264261473021143 0ustar andreasadmin#ifndef _MESAINIT_H #define _MESAINIT_H extern IFparm MESApTable[ ]; extern IFparm MESAmPTable[ ]; extern char *MESAnames[ ]; extern int MESApTSize; extern int MESAmPTSize; extern int MESAnSize; extern int MESAiSize; extern int MESAmSize; #endif ngspice-26/src/spicelib/devices/bsim3/0000755000265600020320000000000012264261705017247 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3/b3pzld.c0000644000265600020320000003434112264261473020620 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3pzld.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim3def.h" #include "ngspice/suffix.h" int BSIM3pzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; double m; for (; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here!= NULL; here = here->BSIM3nextInstance) { if (here->BSIM3mode >= 0) { Gm = here->BSIM3gm; Gmbs = here->BSIM3gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -here->BSIM3gbds; gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs; gbdpg = here->BSIM3gbgs; gbdpdp = here->BSIM3gbds; gbdpb = here->BSIM3gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (here->BSIM3nqsMod == 0 && here->BSIM3acnqsMod == 0) { cggb = here->BSIM3cggb; cgsb = here->BSIM3cgsb; cgdb = here->BSIM3cgdb; cbgb = here->BSIM3cbgb; cbsb = here->BSIM3cbsb; cbdb = here->BSIM3cbdb; cdgb = here->BSIM3cdgb; cdsb = here->BSIM3cdsb; cddb = here->BSIM3cddb; xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3gtg; xgtd = here->BSIM3gtd; xgts = here->BSIM3gts; xgtb = here->BSIM3gtb; xcqgb = here->BSIM3cqgb; xcqdb = here->BSIM3cqdb; xcqsb = here->BSIM3cqsb; xcqbb = here->BSIM3cqbb; CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV * here->pParam->BSIM3leffCV; qcheq = -(here->BSIM3qgate + here->BSIM3qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM3qdrn / qcheq; Cdd = here->BSIM3cddb; Csd = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3cdgb; Csg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3cdsb; Css = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM3gm; Gmbs = -here->BSIM3gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -here->BSIM3gbds; gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3gbgs; gbspsp = here->BSIM3gbds; gbspb = here->BSIM3gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (here->BSIM3nqsMod == 0 && here->BSIM3acnqsMod == 0) { cggb = here->BSIM3cggb; cgsb = here->BSIM3cgdb; cgdb = here->BSIM3cgsb; cbgb = here->BSIM3cbgb; cbsb = here->BSIM3cbdb; cbdb = here->BSIM3cbsb; cdgb = -(here->BSIM3cdgb + cggb + cbgb); cdsb = -(here->BSIM3cddb + cgsb + cbsb); cddb = -(here->BSIM3cdsb + cgdb + cbdb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3gtg; xgtd = here->BSIM3gts; xgts = here->BSIM3gtd; xgtb = here->BSIM3gtb; xcqgb = here->BSIM3cqgb; xcqdb = here->BSIM3cqsb; xcqsb = here->BSIM3cqdb; xcqbb = here->BSIM3cqbb; CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV * here->pParam->BSIM3leffCV; qcheq = -(here->BSIM3qgate + here->BSIM3qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM3qdrn / qcheq; Css = here->BSIM3cddb; Cds = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3cdgb; Cdg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3cdsb; Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau; gdpr = here->BSIM3drainConductance; gspr = here->BSIM3sourceConductance; gds = here->BSIM3gds; gbd = here->BSIM3gbd; gbs = here->BSIM3gbs; capbd = here->BSIM3capbd; capbs = here->BSIM3capbs; GSoverlapCap = here->BSIM3cgso; GDoverlapCap = here->BSIM3cgdo; GBoverlapCap = here->pParam->BSIM3cgbo; xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcdbb = -(xcdgb + xcddb + xcdsb); xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)); xcsbb = -(xcsgb + xcsdb + xcssb); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcgbb = -(xcggb + xcgdb + xcgsb); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); xcbbb = -(xcbgb + xcbdb + xcbsb); m = here->BSIM3m; *(here->BSIM3GgPtr ) += m * (xcggb * s->real); *(here->BSIM3GgPtr +1) += m * (xcggb * s->imag); *(here->BSIM3BbPtr ) += m * (xcbbb * s->real); *(here->BSIM3BbPtr +1) += m * (xcbbb * s->imag); *(here->BSIM3DPdpPtr ) += m * (xcddb * s->real); *(here->BSIM3DPdpPtr +1) += m * (xcddb * s->imag); *(here->BSIM3SPspPtr ) += m * (xcssb * s->real); *(here->BSIM3SPspPtr +1) += m * (xcssb * s->imag); *(here->BSIM3GbPtr ) += m * (xcgbb * s->real); *(here->BSIM3GbPtr +1) += m * (xcgbb * s->imag); *(here->BSIM3GdpPtr ) += m * (xcgdb * s->real); *(here->BSIM3GdpPtr +1) += m * (xcgdb * s->imag); *(here->BSIM3GspPtr ) += m * (xcgsb * s->real); *(here->BSIM3GspPtr +1) += m * (xcgsb * s->imag); *(here->BSIM3BgPtr ) += m * (xcbgb * s->real); *(here->BSIM3BgPtr +1) += m * (xcbgb * s->imag); *(here->BSIM3BdpPtr ) += m * (xcbdb * s->real); *(here->BSIM3BdpPtr +1) += m * (xcbdb * s->imag); *(here->BSIM3BspPtr ) += m * (xcbsb * s->real); *(here->BSIM3BspPtr +1) += m * (xcbsb * s->imag); *(here->BSIM3DPgPtr ) += m * (xcdgb * s->real); *(here->BSIM3DPgPtr +1) += m * (xcdgb * s->imag); *(here->BSIM3DPbPtr ) += m * (xcdbb * s->real); *(here->BSIM3DPbPtr +1) += m * (xcdbb * s->imag); *(here->BSIM3DPspPtr ) += m * (xcdsb * s->real); *(here->BSIM3DPspPtr +1) += m * (xcdsb * s->imag); *(here->BSIM3SPgPtr ) += m * (xcsgb * s->real); *(here->BSIM3SPgPtr +1) += m * (xcsgb * s->imag); *(here->BSIM3SPbPtr ) += m * (xcsbb * s->real); *(here->BSIM3SPbPtr +1) += m * (xcsbb * s->imag); *(here->BSIM3SPdpPtr ) += m * (xcsdb * s->real); *(here->BSIM3SPdpPtr +1) += m * (xcsdb * s->imag); *(here->BSIM3DdPtr) += m * gdpr; *(here->BSIM3DdpPtr) -= m * gdpr; *(here->BSIM3DPdPtr) -= m * gdpr; *(here->BSIM3SsPtr) += m * gspr; *(here->BSIM3SspPtr) -= m * gspr; *(here->BSIM3SPsPtr) -= m * gspr; *(here->BSIM3BgPtr) -= m * here->BSIM3gbgs; *(here->BSIM3BbPtr) += m * (gbd + gbs - here->BSIM3gbbs); *(here->BSIM3BdpPtr) -= m * (gbd - gbbdp); *(here->BSIM3BspPtr) -= m * (gbs - gbbsp); *(here->BSIM3DPgPtr) += m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg + gbdpg); *(here->BSIM3DPdpPtr) += m * (gdpr + gds + gbd + RevSum + dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp); *(here->BSIM3DPspPtr) -= m * (gds + FwdSum - dxpart * xgts - T1 * ddxpart_dVs - gbdpsp); *(here->BSIM3DPbPtr) -= m * (gbd - Gmbs - dxpart * xgtb - T1 * ddxpart_dVb - gbdpb); *(here->BSIM3SPgPtr) -= m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg - gbspg); *(here->BSIM3SPspPtr) += m * (gspr + gds + gbs + FwdSum + sxpart * xgts + T1 * dsxpart_dVs + gbspsp); *(here->BSIM3SPbPtr) -= m * (gbs + Gmbs - sxpart * xgtb - T1 * dsxpart_dVb - gbspb); *(here->BSIM3SPdpPtr) -= m * (gds + RevSum - sxpart * xgtd - T1 * dsxpart_dVd - gbspdp); *(here->BSIM3GgPtr) -= m * xgtg; *(here->BSIM3GbPtr) -= m * xgtb; *(here->BSIM3GdpPtr) -= m * xgtd; *(here->BSIM3GspPtr) -= m * xgts; if (here->BSIM3nqsMod || here->BSIM3acnqsMod) { *(here->BSIM3QqPtr ) += m * (s->real * ScalingFactor); *(here->BSIM3QqPtr +1) += m * (s->imag * ScalingFactor); *(here->BSIM3QgPtr ) -= m * (xcqgb * s->real); *(here->BSIM3QgPtr +1) -= m * (xcqgb * s->imag); *(here->BSIM3QdpPtr ) -= m * (xcqdb * s->real); *(here->BSIM3QdpPtr +1) -= m * (xcqdb * s->imag); *(here->BSIM3QbPtr ) -= m * (xcqbb * s->real); *(here->BSIM3QbPtr +1) -= m * (xcqbb * s->imag); *(here->BSIM3QspPtr ) -= m * (xcqsb * s->real); *(here->BSIM3QspPtr +1) -= m * (xcqsb * s->imag); *(here->BSIM3GqPtr) -= m * (here->BSIM3gtau); *(here->BSIM3DPqPtr) += m * (dxpart * here->BSIM3gtau); *(here->BSIM3SPqPtr) += m * (sxpart * here->BSIM3gtau); *(here->BSIM3QqPtr) += m * (here->BSIM3gtau); *(here->BSIM3QgPtr) += m * xgtg; *(here->BSIM3QdpPtr) += m * xgtd; *(here->BSIM3QbPtr) += m * xgtb; *(here->BSIM3QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3acld.c0000644000265600020320000004170612264261473020555 0ustar andreasadmin/**** BSIM3v3.3.0 beta, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3acld.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3acLoad( GENmodel *inModel, CKTcircuit *ckt) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega; double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; /* For ACNQSMOD */ double T0, T2, T3, gmr, gmbsr, gmi, gmbsi, gdsi; double Cddr, Cdgr, Cdsr, Csdr, Csgr, Cssr, Cgdr, Cggr, Cgsr; double Cddi, Cdgi, Cdsi, Cdbi, Csdi, Csgi, Cssi, Csbi; double Cgdi, Cggi, Cgsi, Cgbi, Gmi, Gmbsi, FwdSumi, RevSumi; double xcdgbi, xcsgbi, xcddbi, xcdsbi, xcsdbi, xcssbi, xcdbbi; double xcsbbi, xcggbi, xcgdbi, xcgsbi, xcgbbi; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here!= NULL; here = here->BSIM3nextInstance) { Csd = -(here->BSIM3cddb + here->BSIM3cgdb + here->BSIM3cbdb); Csg = -(here->BSIM3cdgb + here->BSIM3cggb + here->BSIM3cbgb); Css = -(here->BSIM3cdsb + here->BSIM3cgsb + here->BSIM3cbsb); if (here->BSIM3acnqsMod) { T0 = omega * here->BSIM3taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; gmr = here->BSIM3gm * T2; gmbsr = here->BSIM3gmbs * T2; gds = here->BSIM3gds * T2; gmi = -here->BSIM3gm * T3; gmbsi = -here->BSIM3gmbs * T3; gdsi = -here->BSIM3gds * T3; Cddr = here->BSIM3cddb * T2; Cdgr = here->BSIM3cdgb * T2; Cdsr = here->BSIM3cdsb * T2; Cddi = here->BSIM3cddb * T3 * omega; Cdgi = here->BSIM3cdgb * T3 * omega; Cdsi = here->BSIM3cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; Csgr = Csg * T2; Cssr = Css * T2; Csdi = Csd * T3 * omega; Csgi = Csg * T3 * omega; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); Cgdr = -(Cddr + Csdr + here->BSIM3cbdb); Cggr = -(Cdgr + Csgr + here->BSIM3cbgb); Cgsr = -(Cdsr + Cssr + here->BSIM3cbsb); Cgdi = -(Cddi + Csdi); Cggi = -(Cdgi + Csgi); Cgsi = -(Cdsi + Cssi); Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ { gmr = here->BSIM3gm; gmbsr = here->BSIM3gmbs; gds = here->BSIM3gds; gmi = gmbsi = gdsi = 0.0; Cddr = here->BSIM3cddb; Cdgr = here->BSIM3cdgb; Cdsr = here->BSIM3cdsb; Cddi = Cdgi = Cdsi = Cdbi = 0.0; Csdr = Csd; Csgr = Csg; Cssr = Css; Csdi = Csgi = Cssi = Csbi = 0.0; Cgdr = here->BSIM3cgdb; Cggr = here->BSIM3cggb; Cgsr = here->BSIM3cgsb; Cgdi = Cggi = Cgsi = Cgbi = 0.0; } if (here->BSIM3mode >= 0) { Gm = gmr; Gmbs = gmbsr; FwdSum = Gm + Gmbs; RevSum = 0.0; Gmi = gmi; Gmbsi = gmbsi; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; gbbdp = -here->BSIM3gbds; gbbsp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs; gbdpg = here->BSIM3gbgs; gbdpb = here->BSIM3gbbs; gbdpdp = here->BSIM3gbds; gbdpsp = -(gbdpg + gbdpb + gbdpdp); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (here->BSIM3nqsMod == 0 || here->BSIM3acnqsMod == 1) { cggb = Cggr; cgsb = Cgsr; cgdb = Cgdr; cbgb = here->BSIM3cbgb; cbsb = here->BSIM3cbsb; cbdb = here->BSIM3cbdb; cdgb = Cdgr; cdsb = Cdsr; cddb = Cddr; xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3gtg; xgtd = here->BSIM3gtd; xgts = here->BSIM3gts; xgtb = here->BSIM3gtb; xcqgb = here->BSIM3cqgb * omega; xcqdb = here->BSIM3cqdb * omega; xcqsb = here->BSIM3cqsb * omega; xcqbb = here->BSIM3cqbb * omega; CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV * here->pParam->BSIM3leffCV; qcheq = -(here->BSIM3qgate + here->BSIM3qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM3qdrn / qcheq; Cdd = here->BSIM3cddb; Csd = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3cdgb; Csg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3cdsb; Css = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } xcdgbi = Cdgi; xcsgbi = Csgi; xcddbi = Cddi; xcdsbi = Cdsi; xcsdbi = Csdi; xcssbi = Cssi; xcdbbi = Cdbi; xcsbbi = Csbi; xcggbi = Cggi; xcgdbi = Cgdi; xcgsbi = Cgsi; xcgbbi = Cgbi; } else { Gm = -gmr; Gmbs = -gmbsr; FwdSum = 0.0; RevSum = -(Gm + Gmbs); Gmi = -gmi; Gmbsi = -gmbsi; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); gbbsp = -here->BSIM3gbds; gbbdp = here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3gbgs; gbspsp = here->BSIM3gbds; gbspb = here->BSIM3gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (here->BSIM3nqsMod == 0 || here->BSIM3acnqsMod == 1) { cggb = Cggr; cgsb = Cgdr; cgdb = Cgsr; cbgb = here->BSIM3cbgb; cbsb = here->BSIM3cbdb; cbdb = here->BSIM3cbsb; cdgb = -(Cdgr + cggb + cbgb); cdsb = -(Cddr + cgsb + cbsb); cddb = -(Cdsr + cgdb + cbdb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3gtg; xgtd = here->BSIM3gts; xgts = here->BSIM3gtd; xgtb = here->BSIM3gtb; xcqgb = here->BSIM3cqgb * omega; xcqdb = here->BSIM3cqsb * omega; xcqsb = here->BSIM3cqdb * omega; xcqbb = here->BSIM3cqbb * omega; CoxWL = model->BSIM3cox * here->pParam->BSIM3weffCV * here->pParam->BSIM3leffCV; qcheq = -(here->BSIM3qgate + here->BSIM3qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM3qdrn / qcheq; Css = here->BSIM3cddb; Cds = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3cdgb; Cdg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3cdsb; Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } xcdgbi = Csgi; xcsgbi = Cdgi; xcddbi = Cssi; xcdsbi = Csdi; xcsdbi = Cdsi; xcssbi = Cddi; xcdbbi = Csbi; xcsbbi = Cdbi; xcggbi = Cggi; xcgdbi = Cgsi; xcgsbi = Cgdi; xcgbbi = Cgbi; } T1 = *(ckt->CKTstate0 + here->BSIM3qdef) * here->BSIM3gtau; gdpr = here->BSIM3drainConductance; gspr = here->BSIM3sourceConductance; gbd = here->BSIM3gbd; gbs = here->BSIM3gbs; capbd = here->BSIM3capbd; capbs = here->BSIM3capbs; GSoverlapCap = here->BSIM3cgso; GDoverlapCap = here->BSIM3cgdo; GBoverlapCap = here->pParam->BSIM3cgbo; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + capbd + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcbgb = (cbgb - GBoverlapCap) * omega; xcbdb = (cbdb - capbd ) * omega; xcbsb = (cbsb - capbs ) * omega; m = here->BSIM3m; *(here->BSIM3GgPtr +1) += m * xcggb; *(here->BSIM3BbPtr +1) -= m * (xcbgb + xcbdb + xcbsb); *(here->BSIM3DPdpPtr +1) += m * (xcddb + gdsi + RevSumi); *(here->BSIM3SPspPtr +1) += m * (xcssb + gdsi + FwdSumi); *(here->BSIM3GbPtr +1) -= m * (xcggb + xcgdb + xcgsb); *(here->BSIM3GdpPtr +1) += m * xcgdb; *(here->BSIM3GspPtr +1) += m * xcgsb; *(here->BSIM3BgPtr +1) += m * xcbgb; *(here->BSIM3BdpPtr +1) += m * xcbdb; *(here->BSIM3BspPtr +1) += m * xcbsb; *(here->BSIM3DPgPtr +1) += m * (xcdgb + Gmi); *(here->BSIM3DPbPtr +1) -= m * (xcdgb + xcddb + xcdsb + Gmbsi); *(here->BSIM3DPspPtr +1) += m * (xcdsb - gdsi - FwdSumi); *(here->BSIM3SPgPtr +1) += m * (xcsgb - Gmi); *(here->BSIM3SPbPtr +1) -= m * (xcsgb + xcsdb + xcssb - Gmbsi); *(here->BSIM3SPdpPtr +1) += m * (xcsdb - gdsi - RevSumi); *(here->BSIM3DdPtr) += m * gdpr; *(here->BSIM3SsPtr) += m * gspr; *(here->BSIM3BbPtr) += m * (gbd + gbs - here->BSIM3gbbs); *(here->BSIM3DPdpPtr) += m * (gdpr + gds + gbd + RevSum + xcddbi + dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp); *(here->BSIM3SPspPtr) += m * (gspr + gds + gbs + FwdSum + xcssbi + sxpart * xgts + T1 * dsxpart_dVs + gbspsp); *(here->BSIM3DdpPtr) -= m * gdpr; *(here->BSIM3SspPtr) -= m * gspr; *(here->BSIM3BgPtr) -= m * here->BSIM3gbgs; *(here->BSIM3BdpPtr) -= m * (gbd - gbbdp); *(here->BSIM3BspPtr) -= m * (gbs - gbbsp); *(here->BSIM3DPdPtr) -= m * gdpr; *(here->BSIM3DPgPtr) += m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg + gbdpg + xcdgbi); *(here->BSIM3DPbPtr) -= m * (gbd - Gmbs - dxpart * xgtb - T1 * ddxpart_dVb - gbdpb - xcdbbi); *(here->BSIM3DPspPtr) -= m * (gds + FwdSum - dxpart * xgts - T1 * ddxpart_dVs - gbdpsp - xcdsbi); *(here->BSIM3SPgPtr) -= m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg - gbspg - xcsgbi); *(here->BSIM3SPsPtr) -= m * gspr; *(here->BSIM3SPbPtr) -= m * (gbs + Gmbs - sxpart * xgtb - T1 * dsxpart_dVb - gbspb - xcsbbi); *(here->BSIM3SPdpPtr) -= m * (gds + RevSum - sxpart * xgtd - T1 * dsxpart_dVd - gbspdp - xcsdbi); *(here->BSIM3GgPtr) -= m * (xgtg - xcggbi); *(here->BSIM3GbPtr) -= m * (xgtb - xcgbbi); *(here->BSIM3GdpPtr) -= m * (xgtd - xcgdbi); *(here->BSIM3GspPtr) -= m * (xgts - xcgsbi); if (here->BSIM3nqsMod) { if (here->BSIM3acnqsMod) { (*(here->BSIM3QqPtr) += m * 1.0); (*(here->BSIM3QgPtr) += 0.0); (*(here->BSIM3QdpPtr) += 0.0); (*(here->BSIM3QspPtr) += 0.0); (*(here->BSIM3QbPtr) += 0.0); (*(here->BSIM3DPqPtr) += 0.0); (*(here->BSIM3SPqPtr) += 0.0); (*(here->BSIM3GqPtr) += 0.0); } else { *(here->BSIM3QqPtr +1) += m * omega * ScalingFactor; *(here->BSIM3QgPtr +1) -= m * xcqgb; *(here->BSIM3QdpPtr +1) -= m * xcqdb; *(here->BSIM3QspPtr +1) -= m * xcqsb; *(here->BSIM3QbPtr +1) -= m * xcqbb; *(here->BSIM3QqPtr) += m * here->BSIM3gtau; *(here->BSIM3DPqPtr) += m * dxpart * here->BSIM3gtau; *(here->BSIM3SPqPtr) += m * sxpart * here->BSIM3gtau; *(here->BSIM3GqPtr) -= m * here->BSIM3gtau; *(here->BSIM3QgPtr) += m * xgtg; *(here->BSIM3QdpPtr) += m * xgtd; *(here->BSIM3QspPtr) += m * xgts; *(here->BSIM3QbPtr) += m * xgtb; } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3getic.c0000644000265600020320000000232612264261473020740 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3getic.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3getic( GENmodel *inModel, CKTcircuit *ckt) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; for (; model ; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance) { if (!here->BSIM3icVBSGiven) { here->BSIM3icVBS = *(ckt->CKTrhs + here->BSIM3bNode) - *(ckt->CKTrhs + here->BSIM3sNode); } if (!here->BSIM3icVDSGiven) { here->BSIM3icVDS = *(ckt->CKTrhs + here->BSIM3dNode) - *(ckt->CKTrhs + here->BSIM3sNode); } if (!here->BSIM3icVGSGiven) { here->BSIM3icVGS = *(ckt->CKTrhs + here->BSIM3gNode) - *(ckt->CKTrhs + here->BSIM3sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3mask.c0000644000265600020320000012615212264261473020604 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3mask.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM3model *model = (BSIM3model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM3_MOD_MOBMOD: value->iValue = model->BSIM3mobMod; return(OK); case BSIM3_MOD_PARAMCHK: value->iValue = model->BSIM3paramChk; return(OK); case BSIM3_MOD_BINUNIT: value->iValue = model->BSIM3binUnit; return(OK); case BSIM3_MOD_CAPMOD: value->iValue = model->BSIM3capMod; return(OK); case BSIM3_MOD_NOIMOD: value->iValue = model->BSIM3noiMod; return(OK); case BSIM3_MOD_NQSMOD: value->iValue = model->BSIM3nqsMod; return(OK); case BSIM3_MOD_ACNQSMOD: value->iValue = model->BSIM3acnqsMod; return(OK); case BSIM3_MOD_ACMMOD: value->iValue = model->BSIM3acmMod; return(OK); case BSIM3_MOD_CALCACM: value->iValue = model->BSIM3calcacm; return(OK); case BSIM3_MOD_VERSION : value->sValue = model->BSIM3version; return(OK); case BSIM3_MOD_TOX : value->rValue = model->BSIM3tox; return(OK); case BSIM3_MOD_TOXM : value->rValue = model->BSIM3toxm; return(OK); case BSIM3_MOD_CDSC : value->rValue = model->BSIM3cdsc; return(OK); case BSIM3_MOD_CDSCB : value->rValue = model->BSIM3cdscb; return(OK); case BSIM3_MOD_CDSCD : value->rValue = model->BSIM3cdscd; return(OK); case BSIM3_MOD_CIT : value->rValue = model->BSIM3cit; return(OK); case BSIM3_MOD_NFACTOR : value->rValue = model->BSIM3nfactor; return(OK); case BSIM3_MOD_XJ: value->rValue = model->BSIM3xj; return(OK); case BSIM3_MOD_VSAT: value->rValue = model->BSIM3vsat; return(OK); case BSIM3_MOD_AT: value->rValue = model->BSIM3at; return(OK); case BSIM3_MOD_A0: value->rValue = model->BSIM3a0; return(OK); case BSIM3_MOD_AGS: value->rValue = model->BSIM3ags; return(OK); case BSIM3_MOD_A1: value->rValue = model->BSIM3a1; return(OK); case BSIM3_MOD_A2: value->rValue = model->BSIM3a2; return(OK); case BSIM3_MOD_KETA: value->rValue = model->BSIM3keta; return(OK); case BSIM3_MOD_NSUB: value->rValue = model->BSIM3nsub; return(OK); case BSIM3_MOD_NPEAK: value->rValue = model->BSIM3npeak; return(OK); case BSIM3_MOD_NGATE: value->rValue = model->BSIM3ngate; return(OK); case BSIM3_MOD_GAMMA1: value->rValue = model->BSIM3gamma1; return(OK); case BSIM3_MOD_GAMMA2: value->rValue = model->BSIM3gamma2; return(OK); case BSIM3_MOD_VBX: value->rValue = model->BSIM3vbx; return(OK); case BSIM3_MOD_VBM: value->rValue = model->BSIM3vbm; return(OK); case BSIM3_MOD_XT: value->rValue = model->BSIM3xt; return(OK); case BSIM3_MOD_K1: value->rValue = model->BSIM3k1; return(OK); case BSIM3_MOD_KT1: value->rValue = model->BSIM3kt1; return(OK); case BSIM3_MOD_KT1L: value->rValue = model->BSIM3kt1l; return(OK); case BSIM3_MOD_KT2 : value->rValue = model->BSIM3kt2; return(OK); case BSIM3_MOD_K2 : value->rValue = model->BSIM3k2; return(OK); case BSIM3_MOD_K3: value->rValue = model->BSIM3k3; return(OK); case BSIM3_MOD_K3B: value->rValue = model->BSIM3k3b; return(OK); case BSIM3_MOD_W0: value->rValue = model->BSIM3w0; return(OK); case BSIM3_MOD_NLX: value->rValue = model->BSIM3nlx; return(OK); case BSIM3_MOD_DVT0 : value->rValue = model->BSIM3dvt0; return(OK); case BSIM3_MOD_DVT1 : value->rValue = model->BSIM3dvt1; return(OK); case BSIM3_MOD_DVT2 : value->rValue = model->BSIM3dvt2; return(OK); case BSIM3_MOD_DVT0W : value->rValue = model->BSIM3dvt0w; return(OK); case BSIM3_MOD_DVT1W : value->rValue = model->BSIM3dvt1w; return(OK); case BSIM3_MOD_DVT2W : value->rValue = model->BSIM3dvt2w; return(OK); case BSIM3_MOD_DROUT : value->rValue = model->BSIM3drout; return(OK); case BSIM3_MOD_DSUB : value->rValue = model->BSIM3dsub; return(OK); case BSIM3_MOD_VTH0: value->rValue = model->BSIM3vth0; return(OK); case BSIM3_MOD_UA: value->rValue = model->BSIM3ua; return(OK); case BSIM3_MOD_UA1: value->rValue = model->BSIM3ua1; return(OK); case BSIM3_MOD_UB: value->rValue = model->BSIM3ub; return(OK); case BSIM3_MOD_UB1: value->rValue = model->BSIM3ub1; return(OK); case BSIM3_MOD_UC: value->rValue = model->BSIM3uc; return(OK); case BSIM3_MOD_UC1: value->rValue = model->BSIM3uc1; return(OK); case BSIM3_MOD_U0: value->rValue = model->BSIM3u0; return(OK); case BSIM3_MOD_UTE: value->rValue = model->BSIM3ute; return(OK); case BSIM3_MOD_VOFF: value->rValue = model->BSIM3voff; return(OK); case BSIM3_MOD_DELTA: value->rValue = model->BSIM3delta; return(OK); case BSIM3_MOD_RDSW: value->rValue = model->BSIM3rdsw; return(OK); case BSIM3_MOD_PRWG: value->rValue = model->BSIM3prwg; return(OK); case BSIM3_MOD_PRWB: value->rValue = model->BSIM3prwb; return(OK); case BSIM3_MOD_PRT: value->rValue = model->BSIM3prt; return(OK); case BSIM3_MOD_ETA0: value->rValue = model->BSIM3eta0; return(OK); case BSIM3_MOD_ETAB: value->rValue = model->BSIM3etab; return(OK); case BSIM3_MOD_PCLM: value->rValue = model->BSIM3pclm; return(OK); case BSIM3_MOD_PDIBL1: value->rValue = model->BSIM3pdibl1; return(OK); case BSIM3_MOD_PDIBL2: value->rValue = model->BSIM3pdibl2; return(OK); case BSIM3_MOD_PDIBLB: value->rValue = model->BSIM3pdiblb; return(OK); case BSIM3_MOD_PSCBE1: value->rValue = model->BSIM3pscbe1; return(OK); case BSIM3_MOD_PSCBE2: value->rValue = model->BSIM3pscbe2; return(OK); case BSIM3_MOD_PVAG: value->rValue = model->BSIM3pvag; return(OK); case BSIM3_MOD_WR: value->rValue = model->BSIM3wr; return(OK); case BSIM3_MOD_DWG: value->rValue = model->BSIM3dwg; return(OK); case BSIM3_MOD_DWB: value->rValue = model->BSIM3dwb; return(OK); case BSIM3_MOD_B0: value->rValue = model->BSIM3b0; return(OK); case BSIM3_MOD_B1: value->rValue = model->BSIM3b1; return(OK); case BSIM3_MOD_ALPHA0: value->rValue = model->BSIM3alpha0; return(OK); case BSIM3_MOD_ALPHA1: value->rValue = model->BSIM3alpha1; return(OK); case BSIM3_MOD_BETA0: value->rValue = model->BSIM3beta0; return(OK); case BSIM3_MOD_IJTH: value->rValue = model->BSIM3ijth; return(OK); case BSIM3_MOD_VFB: value->rValue = model->BSIM3vfb; return(OK); case BSIM3_MOD_ELM: value->rValue = model->BSIM3elm; return(OK); case BSIM3_MOD_CGSL: value->rValue = model->BSIM3cgsl; return(OK); case BSIM3_MOD_CGDL: value->rValue = model->BSIM3cgdl; return(OK); case BSIM3_MOD_CKAPPA: value->rValue = model->BSIM3ckappa; return(OK); case BSIM3_MOD_CF: value->rValue = model->BSIM3cf; return(OK); case BSIM3_MOD_CLC: value->rValue = model->BSIM3clc; return(OK); case BSIM3_MOD_CLE: value->rValue = model->BSIM3cle; return(OK); case BSIM3_MOD_DWC: value->rValue = model->BSIM3dwc; return(OK); case BSIM3_MOD_DLC: value->rValue = model->BSIM3dlc; return(OK); case BSIM3_MOD_VFBCV: value->rValue = model->BSIM3vfbcv; return(OK); case BSIM3_MOD_ACDE: value->rValue = model->BSIM3acde; return(OK); case BSIM3_MOD_MOIN: value->rValue = model->BSIM3moin; return(OK); case BSIM3_MOD_NOFF: value->rValue = model->BSIM3noff; return(OK); case BSIM3_MOD_VOFFCV: value->rValue = model->BSIM3voffcv; return(OK); case BSIM3_MOD_TCJ: value->rValue = model->BSIM3tcj; return(OK); case BSIM3_MOD_TPB: value->rValue = model->BSIM3tpb; return(OK); case BSIM3_MOD_TCJSW: value->rValue = model->BSIM3tcjsw; return(OK); case BSIM3_MOD_TPBSW: value->rValue = model->BSIM3tpbsw; return(OK); case BSIM3_MOD_TCJSWG: value->rValue = model->BSIM3tcjswg; return(OK); case BSIM3_MOD_TPBSWG: value->rValue = model->BSIM3tpbswg; return(OK); /* ACM model */ case BSIM3_MOD_HDIF: value->rValue = model->BSIM3hdif; return(OK); case BSIM3_MOD_LDIF: value->rValue = model->BSIM3ldif; return(OK); case BSIM3_MOD_LD: value->rValue = model->BSIM3ld; return(OK); case BSIM3_MOD_RD: value->rValue = model->BSIM3rd; return(OK); case BSIM3_MOD_RS: value->rValue = model->BSIM3rs; return(OK); case BSIM3_MOD_RDC: value->rValue = model->BSIM3rdc; return(OK); case BSIM3_MOD_RSC: value->rValue = model->BSIM3rsc; return(OK); case BSIM3_MOD_WMLT: value->rValue = model->BSIM3wmlt; return(OK); /* Length dependence */ case BSIM3_MOD_LCDSC : value->rValue = model->BSIM3lcdsc; return(OK); case BSIM3_MOD_LCDSCB : value->rValue = model->BSIM3lcdscb; return(OK); case BSIM3_MOD_LCDSCD : value->rValue = model->BSIM3lcdscd; return(OK); case BSIM3_MOD_LCIT : value->rValue = model->BSIM3lcit; return(OK); case BSIM3_MOD_LNFACTOR : value->rValue = model->BSIM3lnfactor; return(OK); case BSIM3_MOD_LXJ: value->rValue = model->BSIM3lxj; return(OK); case BSIM3_MOD_LVSAT: value->rValue = model->BSIM3lvsat; return(OK); case BSIM3_MOD_LAT: value->rValue = model->BSIM3lat; return(OK); case BSIM3_MOD_LA0: value->rValue = model->BSIM3la0; return(OK); case BSIM3_MOD_LAGS: value->rValue = model->BSIM3lags; return(OK); case BSIM3_MOD_LA1: value->rValue = model->BSIM3la1; return(OK); case BSIM3_MOD_LA2: value->rValue = model->BSIM3la2; return(OK); case BSIM3_MOD_LKETA: value->rValue = model->BSIM3lketa; return(OK); case BSIM3_MOD_LNSUB: value->rValue = model->BSIM3lnsub; return(OK); case BSIM3_MOD_LNPEAK: value->rValue = model->BSIM3lnpeak; return(OK); case BSIM3_MOD_LNGATE: value->rValue = model->BSIM3lngate; return(OK); case BSIM3_MOD_LGAMMA1: value->rValue = model->BSIM3lgamma1; return(OK); case BSIM3_MOD_LGAMMA2: value->rValue = model->BSIM3lgamma2; return(OK); case BSIM3_MOD_LVBX: value->rValue = model->BSIM3lvbx; return(OK); case BSIM3_MOD_LVBM: value->rValue = model->BSIM3lvbm; return(OK); case BSIM3_MOD_LXT: value->rValue = model->BSIM3lxt; return(OK); case BSIM3_MOD_LK1: value->rValue = model->BSIM3lk1; return(OK); case BSIM3_MOD_LKT1: value->rValue = model->BSIM3lkt1; return(OK); case BSIM3_MOD_LKT1L: value->rValue = model->BSIM3lkt1l; return(OK); case BSIM3_MOD_LKT2 : value->rValue = model->BSIM3lkt2; return(OK); case BSIM3_MOD_LK2 : value->rValue = model->BSIM3lk2; return(OK); case BSIM3_MOD_LK3: value->rValue = model->BSIM3lk3; return(OK); case BSIM3_MOD_LK3B: value->rValue = model->BSIM3lk3b; return(OK); case BSIM3_MOD_LW0: value->rValue = model->BSIM3lw0; return(OK); case BSIM3_MOD_LNLX: value->rValue = model->BSIM3lnlx; return(OK); case BSIM3_MOD_LDVT0: value->rValue = model->BSIM3ldvt0; return(OK); case BSIM3_MOD_LDVT1 : value->rValue = model->BSIM3ldvt1; return(OK); case BSIM3_MOD_LDVT2 : value->rValue = model->BSIM3ldvt2; return(OK); case BSIM3_MOD_LDVT0W : value->rValue = model->BSIM3ldvt0w; return(OK); case BSIM3_MOD_LDVT1W : value->rValue = model->BSIM3ldvt1w; return(OK); case BSIM3_MOD_LDVT2W : value->rValue = model->BSIM3ldvt2w; return(OK); case BSIM3_MOD_LDROUT : value->rValue = model->BSIM3ldrout; return(OK); case BSIM3_MOD_LDSUB : value->rValue = model->BSIM3ldsub; return(OK); case BSIM3_MOD_LVTH0: value->rValue = model->BSIM3lvth0; return(OK); case BSIM3_MOD_LUA: value->rValue = model->BSIM3lua; return(OK); case BSIM3_MOD_LUA1: value->rValue = model->BSIM3lua1; return(OK); case BSIM3_MOD_LUB: value->rValue = model->BSIM3lub; return(OK); case BSIM3_MOD_LUB1: value->rValue = model->BSIM3lub1; return(OK); case BSIM3_MOD_LUC: value->rValue = model->BSIM3luc; return(OK); case BSIM3_MOD_LUC1: value->rValue = model->BSIM3luc1; return(OK); case BSIM3_MOD_LU0: value->rValue = model->BSIM3lu0; return(OK); case BSIM3_MOD_LUTE: value->rValue = model->BSIM3lute; return(OK); case BSIM3_MOD_LVOFF: value->rValue = model->BSIM3lvoff; return(OK); case BSIM3_MOD_LDELTA: value->rValue = model->BSIM3ldelta; return(OK); case BSIM3_MOD_LRDSW: value->rValue = model->BSIM3lrdsw; return(OK); case BSIM3_MOD_LPRWB: value->rValue = model->BSIM3lprwb; return(OK); case BSIM3_MOD_LPRWG: value->rValue = model->BSIM3lprwg; return(OK); case BSIM3_MOD_LPRT: value->rValue = model->BSIM3lprt; return(OK); case BSIM3_MOD_LETA0: value->rValue = model->BSIM3leta0; return(OK); case BSIM3_MOD_LETAB: value->rValue = model->BSIM3letab; return(OK); case BSIM3_MOD_LPCLM: value->rValue = model->BSIM3lpclm; return(OK); case BSIM3_MOD_LPDIBL1: value->rValue = model->BSIM3lpdibl1; return(OK); case BSIM3_MOD_LPDIBL2: value->rValue = model->BSIM3lpdibl2; return(OK); case BSIM3_MOD_LPDIBLB: value->rValue = model->BSIM3lpdiblb; return(OK); case BSIM3_MOD_LPSCBE1: value->rValue = model->BSIM3lpscbe1; return(OK); case BSIM3_MOD_LPSCBE2: value->rValue = model->BSIM3lpscbe2; return(OK); case BSIM3_MOD_LPVAG: value->rValue = model->BSIM3lpvag; return(OK); case BSIM3_MOD_LWR: value->rValue = model->BSIM3lwr; return(OK); case BSIM3_MOD_LDWG: value->rValue = model->BSIM3ldwg; return(OK); case BSIM3_MOD_LDWB: value->rValue = model->BSIM3ldwb; return(OK); case BSIM3_MOD_LB0: value->rValue = model->BSIM3lb0; return(OK); case BSIM3_MOD_LB1: value->rValue = model->BSIM3lb1; return(OK); case BSIM3_MOD_LALPHA0: value->rValue = model->BSIM3lalpha0; return(OK); case BSIM3_MOD_LALPHA1: value->rValue = model->BSIM3lalpha1; return(OK); case BSIM3_MOD_LBETA0: value->rValue = model->BSIM3lbeta0; return(OK); case BSIM3_MOD_LVFB: value->rValue = model->BSIM3lvfb; return(OK); case BSIM3_MOD_LELM: value->rValue = model->BSIM3lelm; return(OK); case BSIM3_MOD_LCGSL: value->rValue = model->BSIM3lcgsl; return(OK); case BSIM3_MOD_LCGDL: value->rValue = model->BSIM3lcgdl; return(OK); case BSIM3_MOD_LCKAPPA: value->rValue = model->BSIM3lckappa; return(OK); case BSIM3_MOD_LCF: value->rValue = model->BSIM3lcf; return(OK); case BSIM3_MOD_LCLC: value->rValue = model->BSIM3lclc; return(OK); case BSIM3_MOD_LCLE: value->rValue = model->BSIM3lcle; return(OK); case BSIM3_MOD_LVFBCV: value->rValue = model->BSIM3lvfbcv; return(OK); case BSIM3_MOD_LACDE: value->rValue = model->BSIM3lacde; return(OK); case BSIM3_MOD_LMOIN: value->rValue = model->BSIM3lmoin; return(OK); case BSIM3_MOD_LNOFF: value->rValue = model->BSIM3lnoff; return(OK); case BSIM3_MOD_LVOFFCV: value->rValue = model->BSIM3lvoffcv; return(OK); /* Width dependence */ case BSIM3_MOD_WCDSC : value->rValue = model->BSIM3wcdsc; return(OK); case BSIM3_MOD_WCDSCB : value->rValue = model->BSIM3wcdscb; return(OK); case BSIM3_MOD_WCDSCD : value->rValue = model->BSIM3wcdscd; return(OK); case BSIM3_MOD_WCIT : value->rValue = model->BSIM3wcit; return(OK); case BSIM3_MOD_WNFACTOR : value->rValue = model->BSIM3wnfactor; return(OK); case BSIM3_MOD_WXJ: value->rValue = model->BSIM3wxj; return(OK); case BSIM3_MOD_WVSAT: value->rValue = model->BSIM3wvsat; return(OK); case BSIM3_MOD_WAT: value->rValue = model->BSIM3wat; return(OK); case BSIM3_MOD_WA0: value->rValue = model->BSIM3wa0; return(OK); case BSIM3_MOD_WAGS: value->rValue = model->BSIM3wags; return(OK); case BSIM3_MOD_WA1: value->rValue = model->BSIM3wa1; return(OK); case BSIM3_MOD_WA2: value->rValue = model->BSIM3wa2; return(OK); case BSIM3_MOD_WKETA: value->rValue = model->BSIM3wketa; return(OK); case BSIM3_MOD_WNSUB: value->rValue = model->BSIM3wnsub; return(OK); case BSIM3_MOD_WNPEAK: value->rValue = model->BSIM3wnpeak; return(OK); case BSIM3_MOD_WNGATE: value->rValue = model->BSIM3wngate; return(OK); case BSIM3_MOD_WGAMMA1: value->rValue = model->BSIM3wgamma1; return(OK); case BSIM3_MOD_WGAMMA2: value->rValue = model->BSIM3wgamma2; return(OK); case BSIM3_MOD_WVBX: value->rValue = model->BSIM3wvbx; return(OK); case BSIM3_MOD_WVBM: value->rValue = model->BSIM3wvbm; return(OK); case BSIM3_MOD_WXT: value->rValue = model->BSIM3wxt; return(OK); case BSIM3_MOD_WK1: value->rValue = model->BSIM3wk1; return(OK); case BSIM3_MOD_WKT1: value->rValue = model->BSIM3wkt1; return(OK); case BSIM3_MOD_WKT1L: value->rValue = model->BSIM3wkt1l; return(OK); case BSIM3_MOD_WKT2 : value->rValue = model->BSIM3wkt2; return(OK); case BSIM3_MOD_WK2 : value->rValue = model->BSIM3wk2; return(OK); case BSIM3_MOD_WK3: value->rValue = model->BSIM3wk3; return(OK); case BSIM3_MOD_WK3B: value->rValue = model->BSIM3wk3b; return(OK); case BSIM3_MOD_WW0: value->rValue = model->BSIM3ww0; return(OK); case BSIM3_MOD_WNLX: value->rValue = model->BSIM3wnlx; return(OK); case BSIM3_MOD_WDVT0: value->rValue = model->BSIM3wdvt0; return(OK); case BSIM3_MOD_WDVT1 : value->rValue = model->BSIM3wdvt1; return(OK); case BSIM3_MOD_WDVT2 : value->rValue = model->BSIM3wdvt2; return(OK); case BSIM3_MOD_WDVT0W : value->rValue = model->BSIM3wdvt0w; return(OK); case BSIM3_MOD_WDVT1W : value->rValue = model->BSIM3wdvt1w; return(OK); case BSIM3_MOD_WDVT2W : value->rValue = model->BSIM3wdvt2w; return(OK); case BSIM3_MOD_WDROUT : value->rValue = model->BSIM3wdrout; return(OK); case BSIM3_MOD_WDSUB : value->rValue = model->BSIM3wdsub; return(OK); case BSIM3_MOD_WVTH0: value->rValue = model->BSIM3wvth0; return(OK); case BSIM3_MOD_WUA: value->rValue = model->BSIM3wua; return(OK); case BSIM3_MOD_WUA1: value->rValue = model->BSIM3wua1; return(OK); case BSIM3_MOD_WUB: value->rValue = model->BSIM3wub; return(OK); case BSIM3_MOD_WUB1: value->rValue = model->BSIM3wub1; return(OK); case BSIM3_MOD_WUC: value->rValue = model->BSIM3wuc; return(OK); case BSIM3_MOD_WUC1: value->rValue = model->BSIM3wuc1; return(OK); case BSIM3_MOD_WU0: value->rValue = model->BSIM3wu0; return(OK); case BSIM3_MOD_WUTE: value->rValue = model->BSIM3wute; return(OK); case BSIM3_MOD_WVOFF: value->rValue = model->BSIM3wvoff; return(OK); case BSIM3_MOD_WDELTA: value->rValue = model->BSIM3wdelta; return(OK); case BSIM3_MOD_WRDSW: value->rValue = model->BSIM3wrdsw; return(OK); case BSIM3_MOD_WPRWB: value->rValue = model->BSIM3wprwb; return(OK); case BSIM3_MOD_WPRWG: value->rValue = model->BSIM3wprwg; return(OK); case BSIM3_MOD_WPRT: value->rValue = model->BSIM3wprt; return(OK); case BSIM3_MOD_WETA0: value->rValue = model->BSIM3weta0; return(OK); case BSIM3_MOD_WETAB: value->rValue = model->BSIM3wetab; return(OK); case BSIM3_MOD_WPCLM: value->rValue = model->BSIM3wpclm; return(OK); case BSIM3_MOD_WPDIBL1: value->rValue = model->BSIM3wpdibl1; return(OK); case BSIM3_MOD_WPDIBL2: value->rValue = model->BSIM3wpdibl2; return(OK); case BSIM3_MOD_WPDIBLB: value->rValue = model->BSIM3wpdiblb; return(OK); case BSIM3_MOD_WPSCBE1: value->rValue = model->BSIM3wpscbe1; return(OK); case BSIM3_MOD_WPSCBE2: value->rValue = model->BSIM3wpscbe2; return(OK); case BSIM3_MOD_WPVAG: value->rValue = model->BSIM3wpvag; return(OK); case BSIM3_MOD_WWR: value->rValue = model->BSIM3wwr; return(OK); case BSIM3_MOD_WDWG: value->rValue = model->BSIM3wdwg; return(OK); case BSIM3_MOD_WDWB: value->rValue = model->BSIM3wdwb; return(OK); case BSIM3_MOD_WB0: value->rValue = model->BSIM3wb0; return(OK); case BSIM3_MOD_WB1: value->rValue = model->BSIM3wb1; return(OK); case BSIM3_MOD_WALPHA0: value->rValue = model->BSIM3walpha0; return(OK); case BSIM3_MOD_WALPHA1: value->rValue = model->BSIM3walpha1; return(OK); case BSIM3_MOD_WBETA0: value->rValue = model->BSIM3wbeta0; return(OK); case BSIM3_MOD_WVFB: value->rValue = model->BSIM3wvfb; return(OK); case BSIM3_MOD_WELM: value->rValue = model->BSIM3welm; return(OK); case BSIM3_MOD_WCGSL: value->rValue = model->BSIM3wcgsl; return(OK); case BSIM3_MOD_WCGDL: value->rValue = model->BSIM3wcgdl; return(OK); case BSIM3_MOD_WCKAPPA: value->rValue = model->BSIM3wckappa; return(OK); case BSIM3_MOD_WCF: value->rValue = model->BSIM3wcf; return(OK); case BSIM3_MOD_WCLC: value->rValue = model->BSIM3wclc; return(OK); case BSIM3_MOD_WCLE: value->rValue = model->BSIM3wcle; return(OK); case BSIM3_MOD_WVFBCV: value->rValue = model->BSIM3wvfbcv; return(OK); case BSIM3_MOD_WACDE: value->rValue = model->BSIM3wacde; return(OK); case BSIM3_MOD_WMOIN: value->rValue = model->BSIM3wmoin; return(OK); case BSIM3_MOD_WNOFF: value->rValue = model->BSIM3wnoff; return(OK); case BSIM3_MOD_WVOFFCV: value->rValue = model->BSIM3wvoffcv; return(OK); /* Cross-term dependence */ case BSIM3_MOD_PCDSC : value->rValue = model->BSIM3pcdsc; return(OK); case BSIM3_MOD_PCDSCB : value->rValue = model->BSIM3pcdscb; return(OK); case BSIM3_MOD_PCDSCD : value->rValue = model->BSIM3pcdscd; return(OK); case BSIM3_MOD_PCIT : value->rValue = model->BSIM3pcit; return(OK); case BSIM3_MOD_PNFACTOR : value->rValue = model->BSIM3pnfactor; return(OK); case BSIM3_MOD_PXJ: value->rValue = model->BSIM3pxj; return(OK); case BSIM3_MOD_PVSAT: value->rValue = model->BSIM3pvsat; return(OK); case BSIM3_MOD_PAT: value->rValue = model->BSIM3pat; return(OK); case BSIM3_MOD_PA0: value->rValue = model->BSIM3pa0; return(OK); case BSIM3_MOD_PAGS: value->rValue = model->BSIM3pags; return(OK); case BSIM3_MOD_PA1: value->rValue = model->BSIM3pa1; return(OK); case BSIM3_MOD_PA2: value->rValue = model->BSIM3pa2; return(OK); case BSIM3_MOD_PKETA: value->rValue = model->BSIM3pketa; return(OK); case BSIM3_MOD_PNSUB: value->rValue = model->BSIM3pnsub; return(OK); case BSIM3_MOD_PNPEAK: value->rValue = model->BSIM3pnpeak; return(OK); case BSIM3_MOD_PNGATE: value->rValue = model->BSIM3pngate; return(OK); case BSIM3_MOD_PGAMMA1: value->rValue = model->BSIM3pgamma1; return(OK); case BSIM3_MOD_PGAMMA2: value->rValue = model->BSIM3pgamma2; return(OK); case BSIM3_MOD_PVBX: value->rValue = model->BSIM3pvbx; return(OK); case BSIM3_MOD_PVBM: value->rValue = model->BSIM3pvbm; return(OK); case BSIM3_MOD_PXT: value->rValue = model->BSIM3pxt; return(OK); case BSIM3_MOD_PK1: value->rValue = model->BSIM3pk1; return(OK); case BSIM3_MOD_PKT1: value->rValue = model->BSIM3pkt1; return(OK); case BSIM3_MOD_PKT1L: value->rValue = model->BSIM3pkt1l; return(OK); case BSIM3_MOD_PKT2 : value->rValue = model->BSIM3pkt2; return(OK); case BSIM3_MOD_PK2 : value->rValue = model->BSIM3pk2; return(OK); case BSIM3_MOD_PK3: value->rValue = model->BSIM3pk3; return(OK); case BSIM3_MOD_PK3B: value->rValue = model->BSIM3pk3b; return(OK); case BSIM3_MOD_PW0: value->rValue = model->BSIM3pw0; return(OK); case BSIM3_MOD_PNLX: value->rValue = model->BSIM3pnlx; return(OK); case BSIM3_MOD_PDVT0 : value->rValue = model->BSIM3pdvt0; return(OK); case BSIM3_MOD_PDVT1 : value->rValue = model->BSIM3pdvt1; return(OK); case BSIM3_MOD_PDVT2 : value->rValue = model->BSIM3pdvt2; return(OK); case BSIM3_MOD_PDVT0W : value->rValue = model->BSIM3pdvt0w; return(OK); case BSIM3_MOD_PDVT1W : value->rValue = model->BSIM3pdvt1w; return(OK); case BSIM3_MOD_PDVT2W : value->rValue = model->BSIM3pdvt2w; return(OK); case BSIM3_MOD_PDROUT : value->rValue = model->BSIM3pdrout; return(OK); case BSIM3_MOD_PDSUB : value->rValue = model->BSIM3pdsub; return(OK); case BSIM3_MOD_PVTH0: value->rValue = model->BSIM3pvth0; return(OK); case BSIM3_MOD_PUA: value->rValue = model->BSIM3pua; return(OK); case BSIM3_MOD_PUA1: value->rValue = model->BSIM3pua1; return(OK); case BSIM3_MOD_PUB: value->rValue = model->BSIM3pub; return(OK); case BSIM3_MOD_PUB1: value->rValue = model->BSIM3pub1; return(OK); case BSIM3_MOD_PUC: value->rValue = model->BSIM3puc; return(OK); case BSIM3_MOD_PUC1: value->rValue = model->BSIM3puc1; return(OK); case BSIM3_MOD_PU0: value->rValue = model->BSIM3pu0; return(OK); case BSIM3_MOD_PUTE: value->rValue = model->BSIM3pute; return(OK); case BSIM3_MOD_PVOFF: value->rValue = model->BSIM3pvoff; return(OK); case BSIM3_MOD_PDELTA: value->rValue = model->BSIM3pdelta; return(OK); case BSIM3_MOD_PRDSW: value->rValue = model->BSIM3prdsw; return(OK); case BSIM3_MOD_PPRWB: value->rValue = model->BSIM3pprwb; return(OK); case BSIM3_MOD_PPRWG: value->rValue = model->BSIM3pprwg; return(OK); case BSIM3_MOD_PPRT: value->rValue = model->BSIM3pprt; return(OK); case BSIM3_MOD_PETA0: value->rValue = model->BSIM3peta0; return(OK); case BSIM3_MOD_PETAB: value->rValue = model->BSIM3petab; return(OK); case BSIM3_MOD_PPCLM: value->rValue = model->BSIM3ppclm; return(OK); case BSIM3_MOD_PPDIBL1: value->rValue = model->BSIM3ppdibl1; return(OK); case BSIM3_MOD_PPDIBL2: value->rValue = model->BSIM3ppdibl2; return(OK); case BSIM3_MOD_PPDIBLB: value->rValue = model->BSIM3ppdiblb; return(OK); case BSIM3_MOD_PPSCBE1: value->rValue = model->BSIM3ppscbe1; return(OK); case BSIM3_MOD_PPSCBE2: value->rValue = model->BSIM3ppscbe2; return(OK); case BSIM3_MOD_PPVAG: value->rValue = model->BSIM3ppvag; return(OK); case BSIM3_MOD_PWR: value->rValue = model->BSIM3pwr; return(OK); case BSIM3_MOD_PDWG: value->rValue = model->BSIM3pdwg; return(OK); case BSIM3_MOD_PDWB: value->rValue = model->BSIM3pdwb; return(OK); case BSIM3_MOD_PB0: value->rValue = model->BSIM3pb0; return(OK); case BSIM3_MOD_PB1: value->rValue = model->BSIM3pb1; return(OK); case BSIM3_MOD_PALPHA0: value->rValue = model->BSIM3palpha0; return(OK); case BSIM3_MOD_PALPHA1: value->rValue = model->BSIM3palpha1; return(OK); case BSIM3_MOD_PBETA0: value->rValue = model->BSIM3pbeta0; return(OK); case BSIM3_MOD_PVFB: value->rValue = model->BSIM3pvfb; return(OK); case BSIM3_MOD_PELM: value->rValue = model->BSIM3pelm; return(OK); case BSIM3_MOD_PCGSL: value->rValue = model->BSIM3pcgsl; return(OK); case BSIM3_MOD_PCGDL: value->rValue = model->BSIM3pcgdl; return(OK); case BSIM3_MOD_PCKAPPA: value->rValue = model->BSIM3pckappa; return(OK); case BSIM3_MOD_PCF: value->rValue = model->BSIM3pcf; return(OK); case BSIM3_MOD_PCLC: value->rValue = model->BSIM3pclc; return(OK); case BSIM3_MOD_PCLE: value->rValue = model->BSIM3pcle; return(OK); case BSIM3_MOD_PVFBCV: value->rValue = model->BSIM3pvfbcv; return(OK); case BSIM3_MOD_PACDE: value->rValue = model->BSIM3pacde; return(OK); case BSIM3_MOD_PMOIN: value->rValue = model->BSIM3pmoin; return(OK); case BSIM3_MOD_PNOFF: value->rValue = model->BSIM3pnoff; return(OK); case BSIM3_MOD_PVOFFCV: value->rValue = model->BSIM3pvoffcv; return(OK); case BSIM3_MOD_TNOM : value->rValue = model->BSIM3tnom; return(OK); case BSIM3_MOD_CGSO: value->rValue = model->BSIM3cgso; return(OK); case BSIM3_MOD_CGDO: value->rValue = model->BSIM3cgdo; return(OK); case BSIM3_MOD_CGBO: value->rValue = model->BSIM3cgbo; return(OK); case BSIM3_MOD_XPART: value->rValue = model->BSIM3xpart; return(OK); case BSIM3_MOD_RSH: value->rValue = model->BSIM3sheetResistance; return(OK); case BSIM3_MOD_JS: value->rValue = model->BSIM3jctSatCurDensity; return(OK); case BSIM3_MOD_JSW: value->rValue = model->BSIM3jctSidewallSatCurDensity; return(OK); case BSIM3_MOD_PB: value->rValue = model->BSIM3bulkJctPotential; return(OK); case BSIM3_MOD_MJ: value->rValue = model->BSIM3bulkJctBotGradingCoeff; return(OK); case BSIM3_MOD_PBSW: value->rValue = model->BSIM3sidewallJctPotential; return(OK); case BSIM3_MOD_MJSW: value->rValue = model->BSIM3bulkJctSideGradingCoeff; return(OK); case BSIM3_MOD_CJ: value->rValue = model->BSIM3unitAreaJctCap; return(OK); case BSIM3_MOD_CJSW: value->rValue = model->BSIM3unitLengthSidewallJctCap; return(OK); case BSIM3_MOD_PBSWG: value->rValue = model->BSIM3GatesidewallJctPotential; return(OK); case BSIM3_MOD_MJSWG: value->rValue = model->BSIM3bulkJctGateSideGradingCoeff; return(OK); case BSIM3_MOD_CJSWG: value->rValue = model->BSIM3unitLengthGateSidewallJctCap; return(OK); case BSIM3_MOD_NJ: value->rValue = model->BSIM3jctEmissionCoeff; return(OK); case BSIM3_MOD_XTI: value->rValue = model->BSIM3jctTempExponent; return(OK); case BSIM3_MOD_LINTNOI: value->rValue = model->BSIM3lintnoi; return(OK); case BSIM3_MOD_LINT: value->rValue = model->BSIM3Lint; return(OK); case BSIM3_MOD_LL: value->rValue = model->BSIM3Ll; return(OK); case BSIM3_MOD_LLC: value->rValue = model->BSIM3Llc; return(OK); case BSIM3_MOD_LLN: value->rValue = model->BSIM3Lln; return(OK); case BSIM3_MOD_LW: value->rValue = model->BSIM3Lw; return(OK); case BSIM3_MOD_LWC: value->rValue = model->BSIM3Lwc; return(OK); case BSIM3_MOD_LWN: value->rValue = model->BSIM3Lwn; return(OK); case BSIM3_MOD_LWL: value->rValue = model->BSIM3Lwl; return(OK); case BSIM3_MOD_LWLC: value->rValue = model->BSIM3Lwlc; return(OK); case BSIM3_MOD_LMIN: value->rValue = model->BSIM3Lmin; return(OK); case BSIM3_MOD_LMAX: value->rValue = model->BSIM3Lmax; return(OK); case BSIM3_MOD_WINT: value->rValue = model->BSIM3Wint; return(OK); case BSIM3_MOD_WL: value->rValue = model->BSIM3Wl; return(OK); case BSIM3_MOD_WLC: value->rValue = model->BSIM3Wlc; return(OK); case BSIM3_MOD_WLN: value->rValue = model->BSIM3Wln; return(OK); case BSIM3_MOD_WW: value->rValue = model->BSIM3Ww; return(OK); case BSIM3_MOD_WWC: value->rValue = model->BSIM3Wwc; return(OK); case BSIM3_MOD_WWN: value->rValue = model->BSIM3Wwn; return(OK); case BSIM3_MOD_WWL: value->rValue = model->BSIM3Wwl; return(OK); case BSIM3_MOD_WWLC: value->rValue = model->BSIM3Wwlc; return(OK); case BSIM3_MOD_WMIN: value->rValue = model->BSIM3Wmin; return(OK); case BSIM3_MOD_WMAX: value->rValue = model->BSIM3Wmax; return(OK); case BSIM3_MOD_XL: value->rValue = model->BSIM3xl; return(OK); case BSIM3_MOD_XW: value->rValue = model->BSIM3xw; return(OK); case BSIM3_MOD_NOIA: value->rValue = model->BSIM3oxideTrapDensityA; return(OK); case BSIM3_MOD_NOIB: value->rValue = model->BSIM3oxideTrapDensityB; return(OK); case BSIM3_MOD_NOIC: value->rValue = model->BSIM3oxideTrapDensityC; return(OK); case BSIM3_MOD_EM: value->rValue = model->BSIM3em; return(OK); case BSIM3_MOD_EF: value->rValue = model->BSIM3ef; return(OK); case BSIM3_MOD_AF: value->rValue = model->BSIM3af; return(OK); case BSIM3_MOD_KF: value->rValue = model->BSIM3kf; return(OK); case BSIM3_MOD_VGS_MAX: value->rValue = model->BSIM3vgsMax; return(OK); case BSIM3_MOD_VGD_MAX: value->rValue = model->BSIM3vgdMax; return(OK); case BSIM3_MOD_VGB_MAX: value->rValue = model->BSIM3vgbMax; return(OK); case BSIM3_MOD_VDS_MAX: value->rValue = model->BSIM3vdsMax; return(OK); case BSIM3_MOD_VBS_MAX: value->rValue = model->BSIM3vbsMax; return(OK); case BSIM3_MOD_VBD_MAX: value->rValue = model->BSIM3vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3/bsim3init.h0000644000265600020320000000040212264261473021317 0ustar andreasadmin#ifndef _BSIM3INIT_H #define _BSIM3INIT_H extern IFparm BSIM3pTable[ ]; extern IFparm BSIM3mPTable[ ]; extern char *BSIM3names[ ]; extern int BSIM3pTSize; extern int BSIM3mPTSize; extern int BSIM3nSize; extern int BSIM3iSize; extern int BSIM3mSize; #endif ngspice-26/src/spicelib/devices/bsim3/b3check.c0000644000265600020320000004437512264261473020734 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3check.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi. * Modified by Xuemei Xi, 10/05, 12/14, 2001. * Modified by Xuemei Xi, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM3checkModel( BSIM3model *model, BSIM3instance *here, CKTcircuit *ckt) { struct bsim3SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3v33check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM3v3.3.0 Parameter Checking.\n"); if ((strncmp(model->BSIM3version, "3.3.0", 5)) && (strncmp(model->BSIM3version, "3.30", 4)) && (strncmp(model->BSIM3version, "3.3", 3))) { fprintf(fplog, "Warning: This model is BSIM3v3.3.0; you specified a wrong version number.\n"); printf("Warning: This model is BSIM3v3.3.0; you specified a wrong version number.\n"); } fprintf(fplog, "Model = %s\n", model->BSIM3modName); if (pParam->BSIM3nlx < -pParam->BSIM3leff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3nlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3nlx); Fatal_Flag = 1; } if (model->BSIM3tox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->BSIM3tox); printf("Fatal: Tox = %g is not positive.\n", model->BSIM3tox); Fatal_Flag = 1; } if (model->BSIM3toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM3toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM3toxm); Fatal_Flag = 1; } if (model->BSIM3lintnoi > pParam->BSIM3leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM3lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM3lintnoi); Fatal_Flag = 1; } if (pParam->BSIM3npeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->BSIM3npeak); printf("Fatal: Nch = %g is not positive.\n", pParam->BSIM3npeak); Fatal_Flag = 1; } if (pParam->BSIM3nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM3nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM3nsub); Fatal_Flag = 1; } if (pParam->BSIM3ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM3ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM3ngate); Fatal_Flag = 1; } if (pParam->BSIM3ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM3ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM3ngate); Fatal_Flag = 1; } if (pParam->BSIM3xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM3xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3xj); Fatal_Flag = 1; } if (pParam->BSIM3dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3dvt1); Fatal_Flag = 1; } if (pParam->BSIM3dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3dvt1w); Fatal_Flag = 1; } if (pParam->BSIM3w0 == -pParam->BSIM3weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3dsub); Fatal_Flag = 1; } if (pParam->BSIM3b1 == -pParam->BSIM3weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3u0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->BSIM3delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM3delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3delta); Fatal_Flag = 1; } if (pParam->BSIM3vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3vsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->BSIM3pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3pclm); Fatal_Flag = 1; } if (pParam->BSIM3drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3drout); Fatal_Flag = 1; } if (pParam->BSIM3pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3pscbe2); } /* ACM model */ if (model->BSIM3acmMod == 0) { if (model->BSIM3unitLengthSidewallJctCap > 0.0 || model->BSIM3unitLengthGateSidewallJctCap > 0.0) { if (here->BSIM3drainPerimeter < pParam->BSIM3weff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->BSIM3drainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->BSIM3drainPerimeter); } if (here->BSIM3sourcePerimeter < pParam->BSIM3weff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->BSIM3sourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->BSIM3sourcePerimeter); } } } if ((model->BSIM3calcacm > 0) && (model->BSIM3acmMod != 12)) { fprintf(fplog, "Warning: CALCACM = %d is wrong. Set back to 0.\n", model->BSIM3calcacm); printf("Warning: CALCACM = %d is wrong. Set back to 0.\n", model->BSIM3calcacm); model->BSIM3calcacm = 0; } if (pParam->BSIM3noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM3noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM3noff); } if (pParam->BSIM3noff > 4.0) { fprintf(fplog, "Warning: Noff = %g is too large.\n", pParam->BSIM3noff); printf("Warning: Noff = %g is too large.\n", pParam->BSIM3noff); } if (pParam->BSIM3voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM3voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM3voffcv); } if (pParam->BSIM3voffcv > 0.5) { fprintf(fplog, "Warning: Voffcv = %g is too large.\n", pParam->BSIM3voffcv); printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM3voffcv); } if (model->BSIM3ijth < 0.0) { fprintf(fplog, "Fatal: Ijth = %g cannot be negative.\n", model->BSIM3ijth); printf("Fatal: Ijth = %g cannot be negative.\n", model->BSIM3ijth); Fatal_Flag = 1; } /* Check capacitance parameters */ if (pParam->BSIM3clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3clc); Fatal_Flag = 1; } if (pParam->BSIM3moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM3moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM3moin); } if (pParam->BSIM3moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM3moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM3moin); } if(model->BSIM3capMod ==3) { if (pParam->BSIM3acde < 0.4) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM3acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM3acde); } if (pParam->BSIM3acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM3acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM3acde); } } if (model->BSIM3paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM3leff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->BSIM3leff); printf("Warning: Leff = %g may be too small.\n", pParam->BSIM3leff); } if (pParam->BSIM3leffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3leffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3leffCV); } if (pParam->BSIM3weff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->BSIM3weff); printf("Warning: Weff = %g may be too small.\n", pParam->BSIM3weff); } if (pParam->BSIM3weffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3weffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3weffCV); } /* Check threshold voltage parameters */ if (pParam->BSIM3nlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx); printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3nlx); } if (model->BSIM3tox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->BSIM3tox); printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3tox); } if (pParam->BSIM3npeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->BSIM3npeak); printf("Warning: Nch = %g may be too small.\n", pParam->BSIM3npeak); } else if (pParam->BSIM3npeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->BSIM3npeak); printf("Warning: Nch = %g may be too large.\n", pParam->BSIM3npeak); } if (pParam->BSIM3nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM3nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM3nsub); } else if (pParam->BSIM3nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM3nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM3nsub); } if ((pParam->BSIM3ngate > 0.0) && (pParam->BSIM3ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3ngate); } if (pParam->BSIM3dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM3dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3dvt0); } if (fabs(1.0e-6 / (pParam->BSIM3w0 + pParam->BSIM3weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM3nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3nfactor); } if (pParam->BSIM3cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM3cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3cdsc); } if (pParam->BSIM3cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM3cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3cdscd); } /* Check DIBL parameters */ if (pParam->BSIM3eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->BSIM3eta0); printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3eta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->BSIM3b1 + pParam->BSIM3weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM3a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3a2); pParam->BSIM3a2 = 0.01; } else if (pParam->BSIM3a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3a2); pParam->BSIM3a2 = 1.0; pParam->BSIM3a1 = 0.0; } if (pParam->BSIM3rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3rdsw); pParam->BSIM3rdsw = 0.0; pParam->BSIM3rds0 = 0.0; } if (pParam->BSIM3rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM3rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM3rds0); pParam->BSIM3rds0 = 0.0; } if (pParam->BSIM3vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3vsattemp); } if (pParam->BSIM3pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3pdibl1); } if (pParam->BSIM3pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3pdibl2); } /* Check overlap capacitance parameters */ if (model->BSIM3cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3cgdo); model->BSIM3cgdo = 0.0; } if (model->BSIM3cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3cgso); model->BSIM3cgso = 0.0; } if (model->BSIM3cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3cgbo); model->BSIM3cgbo = 0.0; } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3/b3par.c0000644000265600020320000000737512264261473020440 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3par.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM3param ( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM3instance *here = (BSIM3instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM3_W: here->BSIM3w = value->rValue*scale; here->BSIM3wGiven = TRUE; break; case BSIM3_L: here->BSIM3l = value->rValue*scale; here->BSIM3lGiven = TRUE; break; case BSIM3_M: here->BSIM3m = value->rValue; here->BSIM3mGiven = TRUE; break; case BSIM3_AS: here->BSIM3sourceArea = value->rValue*scale*scale; here->BSIM3sourceAreaGiven = TRUE; break; case BSIM3_AD: here->BSIM3drainArea = value->rValue*scale*scale; here->BSIM3drainAreaGiven = TRUE; break; case BSIM3_PS: here->BSIM3sourcePerimeter = value->rValue*scale; here->BSIM3sourcePerimeterGiven = TRUE; break; case BSIM3_PD: here->BSIM3drainPerimeter = value->rValue*scale; here->BSIM3drainPerimeterGiven = TRUE; break; case BSIM3_NRS: here->BSIM3sourceSquares = value->rValue; here->BSIM3sourceSquaresGiven = TRUE; break; case BSIM3_NRD: here->BSIM3drainSquares = value->rValue; here->BSIM3drainSquaresGiven = TRUE; break; case BSIM3_OFF: here->BSIM3off = value->iValue; break; case BSIM3_IC_VBS: here->BSIM3icVBS = value->rValue; here->BSIM3icVBSGiven = TRUE; break; case BSIM3_IC_VDS: here->BSIM3icVDS = value->rValue; here->BSIM3icVDSGiven = TRUE; break; case BSIM3_IC_VGS: here->BSIM3icVGS = value->rValue; here->BSIM3icVGSGiven = TRUE; break; case BSIM3_NQSMOD: here->BSIM3nqsMod = value->iValue; here->BSIM3nqsModGiven = TRUE; break; case BSIM3_ACNQSMOD: here->BSIM3acnqsMod = value->iValue; here->BSIM3acnqsModGiven = TRUE; break; case BSIM3_GEO: here->BSIM3geo = value->iValue; here->BSIM3geoGiven = TRUE; break; case BSIM3_DELVTO: here->BSIM3delvto = value->rValue; here->BSIM3delvtoGiven = TRUE; break; case BSIM3_MULU0: here->BSIM3mulu0 = value->rValue; here->BSIM3mulu0Given = TRUE; break; case BSIM3_IC: switch(value->v.numValue){ case 3: here->BSIM3icVBS = *(value->v.vec.rVec+2); here->BSIM3icVBSGiven = TRUE; case 2: here->BSIM3icVGS = *(value->v.vec.rVec+1); here->BSIM3icVGSGiven = TRUE; case 1: here->BSIM3icVDS = *(value->v.vec.rVec); here->BSIM3icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3/bsim3ext.h0000644000265600020320000000301412264261473021156 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. Modified by Yuhua Cheng to use BSIM3v3 in Spice3f5 (Jan. 1997) File: bsim3ext.h **********/ extern int BSIM3acLoad(GENmodel *,CKTcircuit*); extern int BSIM3ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM3convTest(GENmodel *,CKTcircuit*); extern int BSIM3delete(GENmodel*,IFuid,GENinstance**); extern void BSIM3destroy(GENmodel**); extern int BSIM3getic(GENmodel*,CKTcircuit*); extern int BSIM3load(GENmodel*,CKTcircuit*); extern int BSIM3mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM3mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM3mParam(int,IFvalue*,GENmodel*); extern void BSIM3mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM3param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM3pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM3setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM3temp(GENmodel*,CKTcircuit*); extern int BSIM3trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM3unsetup(GENmodel*,CKTcircuit*); extern int BSIM3soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsim3/b3trunc.c0000644000265600020320000000236712264261473021005 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3trunc.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here != NULL; here = here->BSIM3nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM3qb,ckt,timeStep); CKTterr(here->BSIM3qg,ckt,timeStep); CKTterr(here->BSIM3qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM3name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3dest.c0000644000265600020320000000314012264261473020577 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3dest.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "bsim3def.h" #include "ngspice/suffix.h" void BSIM3destroy( GENmodel **inModel) { BSIM3model **model = (BSIM3model**)inModel; BSIM3instance *here; BSIM3instance *prev = NULL; BSIM3model *mod = *model; BSIM3model *oldmod = NULL; for (; mod ; mod = mod->BSIM3nextModel) { /** added to get rid of link list pSizeDependParamKnot **/ struct bsim3SizeDependParam *pParam, *pParamOld=NULL; pParam = mod->pSizeDependParamKnot; for (; pParam ; pParam = pParam->pNext) { FREE(pParamOld); pParamOld = pParam; } FREE(pParamOld); pParam = NULL; /** end of extra code **/ if(oldmod) { FREE(oldmod->BSIM3version); FREE(oldmod); } oldmod = mod; prev = NULL; for (here = mod->BSIM3instances; here; here = here->BSIM3nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) { #ifdef USE_OMP /* free just once for all models */ FREE(oldmod->BSIM3InstanceArray); #endif /* oldmod->BSIM3modName to be freed in INPtabEnd() */ FREE(oldmod->BSIM3version); FREE(oldmod); } *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3/b3noi.c0000644000265600020320000003224212264261473020432 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3noi.c of BSIM3v3.3.0 * Author: 1995 Gary W. Ng and Min-Chie Jeng. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "bsim3def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * BSIM3noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->BSIM3noiMod. If model->BSIM3noiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->BSIM3noiMod = 2, Channel thermal noise = BSIM3 model Flicker noise = BSIM3 model If model->BSIM3noiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = BSIM3 model If model->BSIM3noiMod = 4, Channel thermal noise = BSIM3 model Flicker noise = SPICE2 model If model->BSIM3noiMod = 5, Channel thermal noise = SPICE2 model with linear/sat fix Flicker noise = SPICE2 model If model->BSIM3noiMod = 6, Channel thermal noise = SPICE2 model with linear/sat fix Flicker noise = BSIM3 model */ /* * JX: 1/f noise model is smoothed out 12/18/01. */ static double StrongInversionNoiseEval( double Vds, BSIM3model *model, BSIM3instance *here, double freq, double temp) { struct bsim3SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM3cd); Leff = pParam->BSIM3leff - 2.0 * model->BSIM3lintnoi; Leffsq = Leff * Leff; esat = 2.0 * pParam->BSIM3vsattemp / here->BSIM3ueff; if(model->BSIM3em<=0.0) DelClm = 0.0; else { T0 = ((((Vds - here->BSIM3Vdseff) / pParam->BSIM3litl) + model->BSIM3em) / esat); DelClm = pParam->BSIM3litl * log (MAX(T0, N_MINLOG)); if (DelClm < 0.0) DelClm = 0.0; /* bugfix */ } EffFreq = pow(freq, model->BSIM3ef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3ueff; T2 = 1.0e8 * EffFreq * here->BSIM3Abulk * model->BSIM3cox * Leffsq; N0 = model->BSIM3cox * here->BSIM3Vgsteff / CHARGE; Nl = model->BSIM3cox * here->BSIM3Vgsteff * (1.0 - here->BSIM3AbovVgst2Vtm * here->BSIM3Vdseff) / CHARGE; T3 = model->BSIM3oxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->BSIM3oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM3oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * Leffsq * pParam->BSIM3weff; T8 = model->BSIM3oxideTrapDensityA + model->BSIM3oxideTrapDensityB * Nl + model->BSIM3oxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM3noise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM3model *model = (BSIM3model *)inModel; BSIM3instance *here; struct bsim3SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM3NSRCS]; double lnNdens[BSIM3NSRCS]; double vds; double T1, T10, T11; double Ssi, Swi; double m; int i; /* define the names of the noise sources */ static char *BSIM3nNames[BSIM3NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in BSIM3defs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here != NULL; here = here->BSIM3nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM3NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM3name, BSIM3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM3NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM3name, BSIM3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM3name, BSIM3nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM3m; switch (mode) { case N_DENS: NevalSrc(&noizDens[BSIM3RDNOIZ], &lnNdens[BSIM3RDNOIZ], ckt, THERMNOISE, here->BSIM3dNodePrime, here->BSIM3dNode, here->BSIM3drainConductance * m); NevalSrc(&noizDens[BSIM3RSNOIZ], &lnNdens[BSIM3RSNOIZ], ckt, THERMNOISE, here->BSIM3sNodePrime, here->BSIM3sNode, here->BSIM3sourceConductance * m); switch( model->BSIM3noiMod ) { case 1: case 3: NevalSrc(&noizDens[BSIM3IDNOIZ], &lnNdens[BSIM3IDNOIZ], ckt, THERMNOISE, here->BSIM3dNodePrime, here->BSIM3sNodePrime, 2.0 * fabs(here->BSIM3gm + here->BSIM3gds + here->BSIM3gmbs) / 3.0 * m); break; case 5: case 6: vds = MIN(*(ckt->CKTstates[0] + here->BSIM3vds), here->BSIM3vdsat); NevalSrc(&noizDens[BSIM3IDNOIZ], &lnNdens[BSIM3IDNOIZ], ckt, THERMNOISE, here->BSIM3dNodePrime, here->BSIM3sNodePrime, (3.0 - vds / here->BSIM3vdsat) * fabs(here->BSIM3gm + here->BSIM3gds + here->BSIM3gmbs) / 3.0 * m); break; case 2: case 4: NevalSrc(&noizDens[BSIM3IDNOIZ], &lnNdens[BSIM3IDNOIZ], ckt, THERMNOISE, here->BSIM3dNodePrime, here->BSIM3sNodePrime, (m * here->BSIM3ueff * fabs(here->BSIM3qinv) / (pParam->BSIM3leff * pParam->BSIM3leff + here->BSIM3ueff *fabs(here->BSIM3qinv) * here->BSIM3rds))); /* bugfix */ break; } NevalSrc(&noizDens[BSIM3FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3dNodePrime, here->BSIM3sNodePrime, (double) 0.0); switch( model->BSIM3noiMod ) { case 1: case 4: case 5: noizDens[BSIM3FLNOIZ] *= m * model->BSIM3kf * exp(model->BSIM3af * log(MAX(fabs(here->BSIM3cd), N_MINLOG))) / (pow(data->freq, model->BSIM3ef) * pParam->BSIM3leff * pParam->BSIM3leff * model->BSIM3cox); break; case 2: case 3: case 6: vds = *(ckt->CKTstates[0] + here->BSIM3vds); if (vds < 0.0) { vds = -vds; } Ssi = StrongInversionNoiseEval(vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM3oxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->BSIM3weff * pParam->BSIM3leff * pow(data->freq, model->BSIM3ef) * 4.0e36; Swi = T10 / T11 * here->BSIM3cd * here->BSIM3cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM3FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM3FLNOIZ] *= 0.0; break; } lnNdens[BSIM3FLNOIZ] = log(MAX(noizDens[BSIM3FLNOIZ], N_MINLOG)); noizDens[BSIM3TOTNOIZ] = noizDens[BSIM3RDNOIZ] + noizDens[BSIM3RSNOIZ] + noizDens[BSIM3IDNOIZ] + noizDens[BSIM3FLNOIZ]; lnNdens[BSIM3TOTNOIZ] = log(MAX(noizDens[BSIM3TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM3TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM3NSRCS; i++) { here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM3NSRCS; i++) { here->BSIM3nVar[OUTNOIZ][i] = 0.0; here->BSIM3nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM3NSRCS; i++) { if (i != BSIM3TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM3nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM3nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM3nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM3nVar[OUTNOIZ][i] += tempOnoise; here->BSIM3nVar[OUTNOIZ][BSIM3TOTNOIZ] += tempOnoise; here->BSIM3nVar[INNOIZ][i] += tempInoise; here->BSIM3nVar[INNOIZ][BSIM3TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM3NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM3NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM3nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM3nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3set.c0000644000265600020320000012357612264261473020453 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /**** OpenMP support for ngspice by Holger Vogt 06/28/2010 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3set.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int BSIM3setup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; int error; CKTnode *tmp; CKTnode *tmpNode; IFuid tmpName; #ifdef USE_OMP unsigned int idx, InstCount; BSIM3instance **InstArray; #endif /* loop through all the BSIM3 device models */ for( ; model != NULL; model = model->BSIM3nextModel ) { /* Default value Processing for BSIM3 MOSFET Models */ if (!model->BSIM3typeGiven) model->BSIM3type = NMOS; if (!model->BSIM3mobModGiven) model->BSIM3mobMod = 1; if (!model->BSIM3binUnitGiven) model->BSIM3binUnit = 1; if (!model->BSIM3paramChkGiven) model->BSIM3paramChk = 0; if (!model->BSIM3capModGiven) model->BSIM3capMod = 3; if (!model->BSIM3acmModGiven) model->BSIM3acmMod = 0; if (!model->BSIM3calcacmGiven) model->BSIM3calcacm = 0; if (!model->BSIM3noiModGiven) model->BSIM3noiMod = 1; if (!model->BSIM3nqsModGiven) model->BSIM3nqsMod = 0; else if ((model->BSIM3nqsMod != 0) && (model->BSIM3nqsMod != 1)) { model->BSIM3nqsMod = 0; printf("Warning: nqsMod has been set to its default value: 0.\n"); } if (!model->BSIM3acnqsModGiven) model->BSIM3acnqsMod = 0; else if ((model->BSIM3acnqsMod != 0) && (model->BSIM3acnqsMod != 1)) { model->BSIM3acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM3versionGiven) model->BSIM3version = copy("3.3.0"); if (!model->BSIM3toxGiven) model->BSIM3tox = 150.0e-10; model->BSIM3cox = 3.453133e-11 / model->BSIM3tox; if (!model->BSIM3toxmGiven) model->BSIM3toxm = model->BSIM3tox; if (!model->BSIM3cdscGiven) model->BSIM3cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM3cdscbGiven) model->BSIM3cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3cdscdGiven) model->BSIM3cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3citGiven) model->BSIM3cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3nfactorGiven) model->BSIM3nfactor = 1; if (!model->BSIM3xjGiven) model->BSIM3xj = .15e-6; if (!model->BSIM3vsatGiven) model->BSIM3vsat = 8.0e4; /* unit m/s */ if (!model->BSIM3atGiven) model->BSIM3at = 3.3e4; /* unit m/s */ if (!model->BSIM3a0Given) model->BSIM3a0 = 1.0; if (!model->BSIM3agsGiven) model->BSIM3ags = 0.0; if (!model->BSIM3a1Given) model->BSIM3a1 = 0.0; if (!model->BSIM3a2Given) model->BSIM3a2 = 1.0; if (!model->BSIM3ketaGiven) model->BSIM3keta = -0.047; /* unit / V */ if (!model->BSIM3nsubGiven) model->BSIM3nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM3npeakGiven) model->BSIM3npeak = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM3ngateGiven) model->BSIM3ngate = 0; /* unit 1/cm3 */ if (!model->BSIM3vbmGiven) model->BSIM3vbm = -3.0; if (!model->BSIM3xtGiven) model->BSIM3xt = 1.55e-7; if (!model->BSIM3kt1Given) model->BSIM3kt1 = -0.11; /* unit V */ if (!model->BSIM3kt1lGiven) model->BSIM3kt1l = 0.0; /* unit V*m */ if (!model->BSIM3kt2Given) model->BSIM3kt2 = 0.022; /* No unit */ if (!model->BSIM3k3Given) model->BSIM3k3 = 80.0; if (!model->BSIM3k3bGiven) model->BSIM3k3b = 0.0; if (!model->BSIM3w0Given) model->BSIM3w0 = 2.5e-6; if (!model->BSIM3nlxGiven) model->BSIM3nlx = 1.74e-7; if (!model->BSIM3dvt0Given) model->BSIM3dvt0 = 2.2; if (!model->BSIM3dvt1Given) model->BSIM3dvt1 = 0.53; if (!model->BSIM3dvt2Given) model->BSIM3dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM3dvt0wGiven) model->BSIM3dvt0w = 0.0; if (!model->BSIM3dvt1wGiven) model->BSIM3dvt1w = 5.3e6; if (!model->BSIM3dvt2wGiven) model->BSIM3dvt2w = -0.032; if (!model->BSIM3droutGiven) model->BSIM3drout = 0.56; if (!model->BSIM3dsubGiven) model->BSIM3dsub = model->BSIM3drout; if (!model->BSIM3vth0Given) model->BSIM3vth0 = (model->BSIM3type == NMOS) ? 0.7 : -0.7; if (!model->BSIM3uaGiven) model->BSIM3ua = 2.25e-9; /* unit m/V */ if (!model->BSIM3ua1Given) model->BSIM3ua1 = 4.31e-9; /* unit m/V */ if (!model->BSIM3ubGiven) model->BSIM3ub = 5.87e-19; /* unit (m/V)**2 */ if (!model->BSIM3ub1Given) model->BSIM3ub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->BSIM3ucGiven) model->BSIM3uc = (model->BSIM3mobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->BSIM3uc1Given) model->BSIM3uc1 = (model->BSIM3mobMod == 3) ? -0.056 : -0.056e-9; if (!model->BSIM3u0Given) model->BSIM3u0 = (model->BSIM3type == NMOS) ? 0.067 : 0.025; if (!model->BSIM3uteGiven) model->BSIM3ute = -1.5; if (!model->BSIM3voffGiven) model->BSIM3voff = -0.08; if (!model->BSIM3deltaGiven) model->BSIM3delta = 0.01; if (!model->BSIM3rdswGiven) model->BSIM3rdsw = 0; if (!model->BSIM3prwgGiven) model->BSIM3prwg = 0.0; /* unit 1/V */ if (!model->BSIM3prwbGiven) model->BSIM3prwb = 0.0; if (!model->BSIM3prtGiven) model->BSIM3prt = 0.0; if (!model->BSIM3eta0Given) model->BSIM3eta0 = 0.08; /* no unit */ if (!model->BSIM3etabGiven) model->BSIM3etab = -0.07; /* unit 1/V */ if (!model->BSIM3pclmGiven) model->BSIM3pclm = 1.3; /* no unit */ if (!model->BSIM3pdibl1Given) model->BSIM3pdibl1 = .39; /* no unit */ if (!model->BSIM3pdibl2Given) model->BSIM3pdibl2 = 0.0086; /* no unit */ if (!model->BSIM3pdiblbGiven) model->BSIM3pdiblb = 0.0; /* 1/V */ if (!model->BSIM3pscbe1Given) model->BSIM3pscbe1 = 4.24e8; if (!model->BSIM3pscbe2Given) model->BSIM3pscbe2 = 1.0e-5; if (!model->BSIM3pvagGiven) model->BSIM3pvag = 0.0; if (!model->BSIM3wrGiven) model->BSIM3wr = 1.0; if (!model->BSIM3dwgGiven) model->BSIM3dwg = 0.0; if (!model->BSIM3dwbGiven) model->BSIM3dwb = 0.0; if (!model->BSIM3b0Given) model->BSIM3b0 = 0.0; if (!model->BSIM3b1Given) model->BSIM3b1 = 0.0; if (!model->BSIM3alpha0Given) model->BSIM3alpha0 = 0.0; if (!model->BSIM3alpha1Given) model->BSIM3alpha1 = 0.0; if (!model->BSIM3beta0Given) model->BSIM3beta0 = 30.0; if (!model->BSIM3ijthGiven) model->BSIM3ijth = 0.1; /* unit A */ if (!model->BSIM3elmGiven) model->BSIM3elm = 5.0; if (!model->BSIM3cgslGiven) model->BSIM3cgsl = 0.0; if (!model->BSIM3cgdlGiven) model->BSIM3cgdl = 0.0; if (!model->BSIM3ckappaGiven) model->BSIM3ckappa = 0.6; if (!model->BSIM3clcGiven) model->BSIM3clc = 0.1e-6; if (!model->BSIM3cleGiven) model->BSIM3cle = 0.6; if (!model->BSIM3vfbcvGiven) model->BSIM3vfbcv = -1.0; if (!model->BSIM3acdeGiven) model->BSIM3acde = 1.0; if (!model->BSIM3moinGiven) model->BSIM3moin = 15.0; if (!model->BSIM3noffGiven) model->BSIM3noff = 1.0; if (!model->BSIM3voffcvGiven) model->BSIM3voffcv = 0.0; if (!model->BSIM3tcjGiven) model->BSIM3tcj = 0.0; if (!model->BSIM3tpbGiven) model->BSIM3tpb = 0.0; if (!model->BSIM3tcjswGiven) model->BSIM3tcjsw = 0.0; if (!model->BSIM3tpbswGiven) model->BSIM3tpbsw = 0.0; if (!model->BSIM3tcjswgGiven) model->BSIM3tcjswg = 0.0; if (!model->BSIM3tpbswgGiven) model->BSIM3tpbswg = 0.0; /* ACM model */ if (!model->BSIM3hdifGiven) model->BSIM3hdif = 0.0; if (!model->BSIM3ldifGiven) model->BSIM3ldif = 0.0; if (!model->BSIM3ldGiven) model->BSIM3ld = 0.0; if (!model->BSIM3rdGiven) model->BSIM3rd = 0.0; if (!model->BSIM3rsGiven) model->BSIM3rs = 0.0; if (!model->BSIM3rdcGiven) model->BSIM3rdc = 0.0; if (!model->BSIM3rscGiven) model->BSIM3rsc = 0.0; if (!model->BSIM3wmltGiven) model->BSIM3wmlt = 1.0; /* Length dependence */ if (!model->BSIM3lcdscGiven) model->BSIM3lcdsc = 0.0; if (!model->BSIM3lcdscbGiven) model->BSIM3lcdscb = 0.0; if (!model->BSIM3lcdscdGiven) model->BSIM3lcdscd = 0.0; if (!model->BSIM3lcitGiven) model->BSIM3lcit = 0.0; if (!model->BSIM3lnfactorGiven) model->BSIM3lnfactor = 0.0; if (!model->BSIM3lxjGiven) model->BSIM3lxj = 0.0; if (!model->BSIM3lvsatGiven) model->BSIM3lvsat = 0.0; if (!model->BSIM3latGiven) model->BSIM3lat = 0.0; if (!model->BSIM3la0Given) model->BSIM3la0 = 0.0; if (!model->BSIM3lagsGiven) model->BSIM3lags = 0.0; if (!model->BSIM3la1Given) model->BSIM3la1 = 0.0; if (!model->BSIM3la2Given) model->BSIM3la2 = 0.0; if (!model->BSIM3lketaGiven) model->BSIM3lketa = 0.0; if (!model->BSIM3lnsubGiven) model->BSIM3lnsub = 0.0; if (!model->BSIM3lnpeakGiven) model->BSIM3lnpeak = 0.0; if (!model->BSIM3lngateGiven) model->BSIM3lngate = 0.0; if (!model->BSIM3lvbmGiven) model->BSIM3lvbm = 0.0; if (!model->BSIM3lxtGiven) model->BSIM3lxt = 0.0; if (!model->BSIM3lkt1Given) model->BSIM3lkt1 = 0.0; if (!model->BSIM3lkt1lGiven) model->BSIM3lkt1l = 0.0; if (!model->BSIM3lkt2Given) model->BSIM3lkt2 = 0.0; if (!model->BSIM3lk3Given) model->BSIM3lk3 = 0.0; if (!model->BSIM3lk3bGiven) model->BSIM3lk3b = 0.0; if (!model->BSIM3lw0Given) model->BSIM3lw0 = 0.0; if (!model->BSIM3lnlxGiven) model->BSIM3lnlx = 0.0; if (!model->BSIM3ldvt0Given) model->BSIM3ldvt0 = 0.0; if (!model->BSIM3ldvt1Given) model->BSIM3ldvt1 = 0.0; if (!model->BSIM3ldvt2Given) model->BSIM3ldvt2 = 0.0; if (!model->BSIM3ldvt0wGiven) model->BSIM3ldvt0w = 0.0; if (!model->BSIM3ldvt1wGiven) model->BSIM3ldvt1w = 0.0; if (!model->BSIM3ldvt2wGiven) model->BSIM3ldvt2w = 0.0; if (!model->BSIM3ldroutGiven) model->BSIM3ldrout = 0.0; if (!model->BSIM3ldsubGiven) model->BSIM3ldsub = 0.0; if (!model->BSIM3lvth0Given) model->BSIM3lvth0 = 0.0; if (!model->BSIM3luaGiven) model->BSIM3lua = 0.0; if (!model->BSIM3lua1Given) model->BSIM3lua1 = 0.0; if (!model->BSIM3lubGiven) model->BSIM3lub = 0.0; if (!model->BSIM3lub1Given) model->BSIM3lub1 = 0.0; if (!model->BSIM3lucGiven) model->BSIM3luc = 0.0; if (!model->BSIM3luc1Given) model->BSIM3luc1 = 0.0; if (!model->BSIM3lu0Given) model->BSIM3lu0 = 0.0; if (!model->BSIM3luteGiven) model->BSIM3lute = 0.0; if (!model->BSIM3lvoffGiven) model->BSIM3lvoff = 0.0; if (!model->BSIM3ldeltaGiven) model->BSIM3ldelta = 0.0; if (!model->BSIM3lrdswGiven) model->BSIM3lrdsw = 0.0; if (!model->BSIM3lprwbGiven) model->BSIM3lprwb = 0.0; if (!model->BSIM3lprwgGiven) model->BSIM3lprwg = 0.0; if (!model->BSIM3lprtGiven) model->BSIM3lprt = 0.0; if (!model->BSIM3leta0Given) model->BSIM3leta0 = 0.0; if (!model->BSIM3letabGiven) model->BSIM3letab = -0.0; if (!model->BSIM3lpclmGiven) model->BSIM3lpclm = 0.0; if (!model->BSIM3lpdibl1Given) model->BSIM3lpdibl1 = 0.0; if (!model->BSIM3lpdibl2Given) model->BSIM3lpdibl2 = 0.0; if (!model->BSIM3lpdiblbGiven) model->BSIM3lpdiblb = 0.0; if (!model->BSIM3lpscbe1Given) model->BSIM3lpscbe1 = 0.0; if (!model->BSIM3lpscbe2Given) model->BSIM3lpscbe2 = 0.0; if (!model->BSIM3lpvagGiven) model->BSIM3lpvag = 0.0; if (!model->BSIM3lwrGiven) model->BSIM3lwr = 0.0; if (!model->BSIM3ldwgGiven) model->BSIM3ldwg = 0.0; if (!model->BSIM3ldwbGiven) model->BSIM3ldwb = 0.0; if (!model->BSIM3lb0Given) model->BSIM3lb0 = 0.0; if (!model->BSIM3lb1Given) model->BSIM3lb1 = 0.0; if (!model->BSIM3lalpha0Given) model->BSIM3lalpha0 = 0.0; if (!model->BSIM3lalpha1Given) model->BSIM3lalpha1 = 0.0; if (!model->BSIM3lbeta0Given) model->BSIM3lbeta0 = 0.0; if (!model->BSIM3lvfbGiven) model->BSIM3lvfb = 0.0; if (!model->BSIM3lelmGiven) model->BSIM3lelm = 0.0; if (!model->BSIM3lcgslGiven) model->BSIM3lcgsl = 0.0; if (!model->BSIM3lcgdlGiven) model->BSIM3lcgdl = 0.0; if (!model->BSIM3lckappaGiven) model->BSIM3lckappa = 0.0; if (!model->BSIM3lclcGiven) model->BSIM3lclc = 0.0; if (!model->BSIM3lcleGiven) model->BSIM3lcle = 0.0; if (!model->BSIM3lcfGiven) model->BSIM3lcf = 0.0; if (!model->BSIM3lvfbcvGiven) model->BSIM3lvfbcv = 0.0; if (!model->BSIM3lacdeGiven) model->BSIM3lacde = 0.0; if (!model->BSIM3lmoinGiven) model->BSIM3lmoin = 0.0; if (!model->BSIM3lnoffGiven) model->BSIM3lnoff = 0.0; if (!model->BSIM3lvoffcvGiven) model->BSIM3lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM3wcdscGiven) model->BSIM3wcdsc = 0.0; if (!model->BSIM3wcdscbGiven) model->BSIM3wcdscb = 0.0; if (!model->BSIM3wcdscdGiven) model->BSIM3wcdscd = 0.0; if (!model->BSIM3wcitGiven) model->BSIM3wcit = 0.0; if (!model->BSIM3wnfactorGiven) model->BSIM3wnfactor = 0.0; if (!model->BSIM3wxjGiven) model->BSIM3wxj = 0.0; if (!model->BSIM3wvsatGiven) model->BSIM3wvsat = 0.0; if (!model->BSIM3watGiven) model->BSIM3wat = 0.0; if (!model->BSIM3wa0Given) model->BSIM3wa0 = 0.0; if (!model->BSIM3wagsGiven) model->BSIM3wags = 0.0; if (!model->BSIM3wa1Given) model->BSIM3wa1 = 0.0; if (!model->BSIM3wa2Given) model->BSIM3wa2 = 0.0; if (!model->BSIM3wketaGiven) model->BSIM3wketa = 0.0; if (!model->BSIM3wnsubGiven) model->BSIM3wnsub = 0.0; if (!model->BSIM3wnpeakGiven) model->BSIM3wnpeak = 0.0; if (!model->BSIM3wngateGiven) model->BSIM3wngate = 0.0; if (!model->BSIM3wvbmGiven) model->BSIM3wvbm = 0.0; if (!model->BSIM3wxtGiven) model->BSIM3wxt = 0.0; if (!model->BSIM3wkt1Given) model->BSIM3wkt1 = 0.0; if (!model->BSIM3wkt1lGiven) model->BSIM3wkt1l = 0.0; if (!model->BSIM3wkt2Given) model->BSIM3wkt2 = 0.0; if (!model->BSIM3wk3Given) model->BSIM3wk3 = 0.0; if (!model->BSIM3wk3bGiven) model->BSIM3wk3b = 0.0; if (!model->BSIM3ww0Given) model->BSIM3ww0 = 0.0; if (!model->BSIM3wnlxGiven) model->BSIM3wnlx = 0.0; if (!model->BSIM3wdvt0Given) model->BSIM3wdvt0 = 0.0; if (!model->BSIM3wdvt1Given) model->BSIM3wdvt1 = 0.0; if (!model->BSIM3wdvt2Given) model->BSIM3wdvt2 = 0.0; if (!model->BSIM3wdvt0wGiven) model->BSIM3wdvt0w = 0.0; if (!model->BSIM3wdvt1wGiven) model->BSIM3wdvt1w = 0.0; if (!model->BSIM3wdvt2wGiven) model->BSIM3wdvt2w = 0.0; if (!model->BSIM3wdroutGiven) model->BSIM3wdrout = 0.0; if (!model->BSIM3wdsubGiven) model->BSIM3wdsub = 0.0; if (!model->BSIM3wvth0Given) model->BSIM3wvth0 = 0.0; if (!model->BSIM3wuaGiven) model->BSIM3wua = 0.0; if (!model->BSIM3wua1Given) model->BSIM3wua1 = 0.0; if (!model->BSIM3wubGiven) model->BSIM3wub = 0.0; if (!model->BSIM3wub1Given) model->BSIM3wub1 = 0.0; if (!model->BSIM3wucGiven) model->BSIM3wuc = 0.0; if (!model->BSIM3wuc1Given) model->BSIM3wuc1 = 0.0; if (!model->BSIM3wu0Given) model->BSIM3wu0 = 0.0; if (!model->BSIM3wuteGiven) model->BSIM3wute = 0.0; if (!model->BSIM3wvoffGiven) model->BSIM3wvoff = 0.0; if (!model->BSIM3wdeltaGiven) model->BSIM3wdelta = 0.0; if (!model->BSIM3wrdswGiven) model->BSIM3wrdsw = 0.0; if (!model->BSIM3wprwbGiven) model->BSIM3wprwb = 0.0; if (!model->BSIM3wprwgGiven) model->BSIM3wprwg = 0.0; if (!model->BSIM3wprtGiven) model->BSIM3wprt = 0.0; if (!model->BSIM3weta0Given) model->BSIM3weta0 = 0.0; if (!model->BSIM3wetabGiven) model->BSIM3wetab = 0.0; if (!model->BSIM3wpclmGiven) model->BSIM3wpclm = 0.0; if (!model->BSIM3wpdibl1Given) model->BSIM3wpdibl1 = 0.0; if (!model->BSIM3wpdibl2Given) model->BSIM3wpdibl2 = 0.0; if (!model->BSIM3wpdiblbGiven) model->BSIM3wpdiblb = 0.0; if (!model->BSIM3wpscbe1Given) model->BSIM3wpscbe1 = 0.0; if (!model->BSIM3wpscbe2Given) model->BSIM3wpscbe2 = 0.0; if (!model->BSIM3wpvagGiven) model->BSIM3wpvag = 0.0; if (!model->BSIM3wwrGiven) model->BSIM3wwr = 0.0; if (!model->BSIM3wdwgGiven) model->BSIM3wdwg = 0.0; if (!model->BSIM3wdwbGiven) model->BSIM3wdwb = 0.0; if (!model->BSIM3wb0Given) model->BSIM3wb0 = 0.0; if (!model->BSIM3wb1Given) model->BSIM3wb1 = 0.0; if (!model->BSIM3walpha0Given) model->BSIM3walpha0 = 0.0; if (!model->BSIM3walpha1Given) model->BSIM3walpha1 = 0.0; if (!model->BSIM3wbeta0Given) model->BSIM3wbeta0 = 0.0; if (!model->BSIM3wvfbGiven) model->BSIM3wvfb = 0.0; if (!model->BSIM3welmGiven) model->BSIM3welm = 0.0; if (!model->BSIM3wcgslGiven) model->BSIM3wcgsl = 0.0; if (!model->BSIM3wcgdlGiven) model->BSIM3wcgdl = 0.0; if (!model->BSIM3wckappaGiven) model->BSIM3wckappa = 0.0; if (!model->BSIM3wcfGiven) model->BSIM3wcf = 0.0; if (!model->BSIM3wclcGiven) model->BSIM3wclc = 0.0; if (!model->BSIM3wcleGiven) model->BSIM3wcle = 0.0; if (!model->BSIM3wvfbcvGiven) model->BSIM3wvfbcv = 0.0; if (!model->BSIM3wacdeGiven) model->BSIM3wacde = 0.0; if (!model->BSIM3wmoinGiven) model->BSIM3wmoin = 0.0; if (!model->BSIM3wnoffGiven) model->BSIM3wnoff = 0.0; if (!model->BSIM3wvoffcvGiven) model->BSIM3wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM3pcdscGiven) model->BSIM3pcdsc = 0.0; if (!model->BSIM3pcdscbGiven) model->BSIM3pcdscb = 0.0; if (!model->BSIM3pcdscdGiven) model->BSIM3pcdscd = 0.0; if (!model->BSIM3pcitGiven) model->BSIM3pcit = 0.0; if (!model->BSIM3pnfactorGiven) model->BSIM3pnfactor = 0.0; if (!model->BSIM3pxjGiven) model->BSIM3pxj = 0.0; if (!model->BSIM3pvsatGiven) model->BSIM3pvsat = 0.0; if (!model->BSIM3patGiven) model->BSIM3pat = 0.0; if (!model->BSIM3pa0Given) model->BSIM3pa0 = 0.0; if (!model->BSIM3pagsGiven) model->BSIM3pags = 0.0; if (!model->BSIM3pa1Given) model->BSIM3pa1 = 0.0; if (!model->BSIM3pa2Given) model->BSIM3pa2 = 0.0; if (!model->BSIM3pketaGiven) model->BSIM3pketa = 0.0; if (!model->BSIM3pnsubGiven) model->BSIM3pnsub = 0.0; if (!model->BSIM3pnpeakGiven) model->BSIM3pnpeak = 0.0; if (!model->BSIM3pngateGiven) model->BSIM3pngate = 0.0; if (!model->BSIM3pvbmGiven) model->BSIM3pvbm = 0.0; if (!model->BSIM3pxtGiven) model->BSIM3pxt = 0.0; if (!model->BSIM3pkt1Given) model->BSIM3pkt1 = 0.0; if (!model->BSIM3pkt1lGiven) model->BSIM3pkt1l = 0.0; if (!model->BSIM3pkt2Given) model->BSIM3pkt2 = 0.0; if (!model->BSIM3pk3Given) model->BSIM3pk3 = 0.0; if (!model->BSIM3pk3bGiven) model->BSIM3pk3b = 0.0; if (!model->BSIM3pw0Given) model->BSIM3pw0 = 0.0; if (!model->BSIM3pnlxGiven) model->BSIM3pnlx = 0.0; if (!model->BSIM3pdvt0Given) model->BSIM3pdvt0 = 0.0; if (!model->BSIM3pdvt1Given) model->BSIM3pdvt1 = 0.0; if (!model->BSIM3pdvt2Given) model->BSIM3pdvt2 = 0.0; if (!model->BSIM3pdvt0wGiven) model->BSIM3pdvt0w = 0.0; if (!model->BSIM3pdvt1wGiven) model->BSIM3pdvt1w = 0.0; if (!model->BSIM3pdvt2wGiven) model->BSIM3pdvt2w = 0.0; if (!model->BSIM3pdroutGiven) model->BSIM3pdrout = 0.0; if (!model->BSIM3pdsubGiven) model->BSIM3pdsub = 0.0; if (!model->BSIM3pvth0Given) model->BSIM3pvth0 = 0.0; if (!model->BSIM3puaGiven) model->BSIM3pua = 0.0; if (!model->BSIM3pua1Given) model->BSIM3pua1 = 0.0; if (!model->BSIM3pubGiven) model->BSIM3pub = 0.0; if (!model->BSIM3pub1Given) model->BSIM3pub1 = 0.0; if (!model->BSIM3pucGiven) model->BSIM3puc = 0.0; if (!model->BSIM3puc1Given) model->BSIM3puc1 = 0.0; if (!model->BSIM3pu0Given) model->BSIM3pu0 = 0.0; if (!model->BSIM3puteGiven) model->BSIM3pute = 0.0; if (!model->BSIM3pvoffGiven) model->BSIM3pvoff = 0.0; if (!model->BSIM3pdeltaGiven) model->BSIM3pdelta = 0.0; if (!model->BSIM3prdswGiven) model->BSIM3prdsw = 0.0; if (!model->BSIM3pprwbGiven) model->BSIM3pprwb = 0.0; if (!model->BSIM3pprwgGiven) model->BSIM3pprwg = 0.0; if (!model->BSIM3pprtGiven) model->BSIM3pprt = 0.0; if (!model->BSIM3peta0Given) model->BSIM3peta0 = 0.0; if (!model->BSIM3petabGiven) model->BSIM3petab = 0.0; if (!model->BSIM3ppclmGiven) model->BSIM3ppclm = 0.0; if (!model->BSIM3ppdibl1Given) model->BSIM3ppdibl1 = 0.0; if (!model->BSIM3ppdibl2Given) model->BSIM3ppdibl2 = 0.0; if (!model->BSIM3ppdiblbGiven) model->BSIM3ppdiblb = 0.0; if (!model->BSIM3ppscbe1Given) model->BSIM3ppscbe1 = 0.0; if (!model->BSIM3ppscbe2Given) model->BSIM3ppscbe2 = 0.0; if (!model->BSIM3ppvagGiven) model->BSIM3ppvag = 0.0; if (!model->BSIM3pwrGiven) model->BSIM3pwr = 0.0; if (!model->BSIM3pdwgGiven) model->BSIM3pdwg = 0.0; if (!model->BSIM3pdwbGiven) model->BSIM3pdwb = 0.0; if (!model->BSIM3pb0Given) model->BSIM3pb0 = 0.0; if (!model->BSIM3pb1Given) model->BSIM3pb1 = 0.0; if (!model->BSIM3palpha0Given) model->BSIM3palpha0 = 0.0; if (!model->BSIM3palpha1Given) model->BSIM3palpha1 = 0.0; if (!model->BSIM3pbeta0Given) model->BSIM3pbeta0 = 0.0; if (!model->BSIM3pvfbGiven) model->BSIM3pvfb = 0.0; if (!model->BSIM3pelmGiven) model->BSIM3pelm = 0.0; if (!model->BSIM3pcgslGiven) model->BSIM3pcgsl = 0.0; if (!model->BSIM3pcgdlGiven) model->BSIM3pcgdl = 0.0; if (!model->BSIM3pckappaGiven) model->BSIM3pckappa = 0.0; if (!model->BSIM3pcfGiven) model->BSIM3pcf = 0.0; if (!model->BSIM3pclcGiven) model->BSIM3pclc = 0.0; if (!model->BSIM3pcleGiven) model->BSIM3pcle = 0.0; if (!model->BSIM3pvfbcvGiven) model->BSIM3pvfbcv = 0.0; if (!model->BSIM3pacdeGiven) model->BSIM3pacde = 0.0; if (!model->BSIM3pmoinGiven) model->BSIM3pmoin = 0.0; if (!model->BSIM3pnoffGiven) model->BSIM3pnoff = 0.0; if (!model->BSIM3pvoffcvGiven) model->BSIM3pvoffcv = 0.0; /* unit degree celcius */ if (!model->BSIM3tnomGiven) model->BSIM3tnom = ckt->CKTnomTemp; /* else model->BSIM3tnom = model->BSIM3tnom + 273.15; we make this transform in b3mpar.c in the first run */ if (!model->BSIM3lintnoiGiven) model->BSIM3lintnoi = 0.0; /* unit m */ if (!model->BSIM3LintGiven) model->BSIM3Lint = 0.0; if (!model->BSIM3LlGiven) model->BSIM3Ll = 0.0; if (!model->BSIM3LlcGiven) model->BSIM3Llc = model->BSIM3Ll; if (!model->BSIM3LlnGiven) model->BSIM3Lln = 1.0; if (!model->BSIM3LwGiven) model->BSIM3Lw = 0.0; if (!model->BSIM3LwcGiven) model->BSIM3Lwc = model->BSIM3Lw; if (!model->BSIM3LwnGiven) model->BSIM3Lwn = 1.0; if (!model->BSIM3LwlGiven) model->BSIM3Lwl = 0.0; if (!model->BSIM3LwlcGiven) model->BSIM3Lwlc = model->BSIM3Lwl; if (!model->BSIM3LminGiven) model->BSIM3Lmin = 0.0; if (!model->BSIM3LmaxGiven) model->BSIM3Lmax = 1.0; if (!model->BSIM3WintGiven) model->BSIM3Wint = 0.0; if (!model->BSIM3WlGiven) model->BSIM3Wl = 0.0; if (!model->BSIM3WlcGiven) model->BSIM3Wlc = model->BSIM3Wl; if (!model->BSIM3WlnGiven) model->BSIM3Wln = 1.0; if (!model->BSIM3WwGiven) model->BSIM3Ww = 0.0; if (!model->BSIM3WwcGiven) model->BSIM3Wwc = model->BSIM3Ww; if (!model->BSIM3WwnGiven) model->BSIM3Wwn = 1.0; if (!model->BSIM3WwlGiven) model->BSIM3Wwl = 0.0; if (!model->BSIM3WwlcGiven) model->BSIM3Wwlc = model->BSIM3Wwl; if (!model->BSIM3WminGiven) model->BSIM3Wmin = 0.0; if (!model->BSIM3WmaxGiven) model->BSIM3Wmax = 1.0; if (!model->BSIM3dwcGiven) model->BSIM3dwc = model->BSIM3Wint; if (!model->BSIM3dlcGiven) model->BSIM3dlc = model->BSIM3Lint; if (!model->BSIM3xlGiven) model->BSIM3xl = 0.0; if (!model->BSIM3xwGiven) model->BSIM3xw = 0.0; if (!model->BSIM3cfGiven) model->BSIM3cf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->BSIM3tox); if (!model->BSIM3cgdoGiven) { if (model->BSIM3dlcGiven && (model->BSIM3dlc > 0.0)) { model->BSIM3cgdo = model->BSIM3dlc * model->BSIM3cox - model->BSIM3cgdl ; } else model->BSIM3cgdo = 0.6 * model->BSIM3xj * model->BSIM3cox; } if (!model->BSIM3cgsoGiven) { if (model->BSIM3dlcGiven && (model->BSIM3dlc > 0.0)) { model->BSIM3cgso = model->BSIM3dlc * model->BSIM3cox - model->BSIM3cgsl ; } else model->BSIM3cgso = 0.6 * model->BSIM3xj * model->BSIM3cox; } if (!model->BSIM3cgboGiven) { model->BSIM3cgbo = 2.0 * model->BSIM3dwc * model->BSIM3cox; } if (!model->BSIM3xpartGiven) model->BSIM3xpart = 0.0; if (!model->BSIM3sheetResistanceGiven) model->BSIM3sheetResistance = 0.0; if (!model->BSIM3unitAreaJctCapGiven) model->BSIM3unitAreaJctCap = 5.0E-4; if (!model->BSIM3unitLengthSidewallJctCapGiven) model->BSIM3unitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM3unitLengthGateSidewallJctCapGiven) model->BSIM3unitLengthGateSidewallJctCap = model->BSIM3unitLengthSidewallJctCap ; if (!model->BSIM3jctSatCurDensityGiven) model->BSIM3jctSatCurDensity = 1.0E-4; if (!model->BSIM3jctSidewallSatCurDensityGiven) model->BSIM3jctSidewallSatCurDensity = 0.0; if (!model->BSIM3bulkJctPotentialGiven) model->BSIM3bulkJctPotential = 1.0; if (!model->BSIM3sidewallJctPotentialGiven) model->BSIM3sidewallJctPotential = 1.0; if (!model->BSIM3GatesidewallJctPotentialGiven) model->BSIM3GatesidewallJctPotential = model->BSIM3sidewallJctPotential; if (!model->BSIM3bulkJctBotGradingCoeffGiven) model->BSIM3bulkJctBotGradingCoeff = 0.5; if (!model->BSIM3bulkJctSideGradingCoeffGiven) model->BSIM3bulkJctSideGradingCoeff = 0.33; if (!model->BSIM3bulkJctGateSideGradingCoeffGiven) model->BSIM3bulkJctGateSideGradingCoeff = model->BSIM3bulkJctSideGradingCoeff; if (!model->BSIM3jctEmissionCoeffGiven) model->BSIM3jctEmissionCoeff = 1.0; if (!model->BSIM3jctTempExponentGiven) model->BSIM3jctTempExponent = 3.0; if (!model->BSIM3oxideTrapDensityAGiven) { if (model->BSIM3type == NMOS) model->BSIM3oxideTrapDensityA = 1e20; else model->BSIM3oxideTrapDensityA=9.9e18; } if (!model->BSIM3oxideTrapDensityBGiven) { if (model->BSIM3type == NMOS) model->BSIM3oxideTrapDensityB = 5e4; else model->BSIM3oxideTrapDensityB = 2.4e3; } if (!model->BSIM3oxideTrapDensityCGiven) { if (model->BSIM3type == NMOS) model->BSIM3oxideTrapDensityC = -1.4e-12; else model->BSIM3oxideTrapDensityC = 1.4e-12; } if (!model->BSIM3emGiven) model->BSIM3em = 4.1e7; /* V/m */ if (!model->BSIM3efGiven) model->BSIM3ef = 1.0; if (!model->BSIM3afGiven) model->BSIM3af = 1.0; if (!model->BSIM3kfGiven) model->BSIM3kf = 0.0; if (!model->BSIM3vgsMaxGiven) model->BSIM3vgsMax = 1e99; if (!model->BSIM3vgdMaxGiven) model->BSIM3vgdMax = 1e99; if (!model->BSIM3vgbMaxGiven) model->BSIM3vgbMax = 1e99; if (!model->BSIM3vdsMaxGiven) model->BSIM3vdsMax = 1e99; if (!model->BSIM3vbsMaxGiven) model->BSIM3vbsMax = 1e99; if (!model->BSIM3vbdMaxGiven) model->BSIM3vbdMax = 1e99; /* loop through all the instances of the model */ for (here = model->BSIM3instances; here != NULL ; here=here->BSIM3nextInstance) { /* allocate a chunk of the state vector */ here->BSIM3states = *states; *states += BSIM3numStates; /* perform the parameter defaulting */ if (!here->BSIM3drainAreaGiven) here->BSIM3drainArea = 0.0; if (!here->BSIM3drainPerimeterGiven) here->BSIM3drainPerimeter = 0.0; if (!here->BSIM3drainSquaresGiven) { if (model->BSIM3acmMod == 0) here->BSIM3drainSquares = 1.0; else here->BSIM3drainSquares = 0.0; } if (!here->BSIM3delvtoGiven) here->BSIM3delvto = 0.0; if (!here->BSIM3mulu0Given) here->BSIM3mulu0 = 1.0; if (!here->BSIM3icVBSGiven) here->BSIM3icVBS = 0.0; if (!here->BSIM3icVDSGiven) here->BSIM3icVDS = 0.0; if (!here->BSIM3icVGSGiven) here->BSIM3icVGS = 0.0; if (!here->BSIM3lGiven) here->BSIM3l = 5.0e-6; if (!here->BSIM3sourceAreaGiven) here->BSIM3sourceArea = 0.0; if (!here->BSIM3sourcePerimeterGiven) here->BSIM3sourcePerimeter = 0.0; if (!here->BSIM3sourceSquaresGiven) { if (model->BSIM3acmMod == 0) here->BSIM3sourceSquares = 1.0; else here->BSIM3sourceSquares = 0.0; } if (!here->BSIM3wGiven) here->BSIM3w = 5.0e-6; if (!here->BSIM3nqsModGiven) here->BSIM3nqsMod = model->BSIM3nqsMod; else if ((here->BSIM3nqsMod != 0) && (here->BSIM3nqsMod != 1)) { here->BSIM3nqsMod = model->BSIM3nqsMod; printf("Warning: nqsMod has been set to its global value %d.\n", model->BSIM3nqsMod); } if (!here->BSIM3acnqsModGiven) here->BSIM3acnqsMod = model->BSIM3acnqsMod; else if ((here->BSIM3acnqsMod != 0) && (here->BSIM3acnqsMod != 1)) { here->BSIM3acnqsMod = model->BSIM3acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM3acnqsMod); } if (!here->BSIM3geoGiven) here->BSIM3geo = 0; if (!here->BSIM3mGiven) here->BSIM3m = 1; /* process drain series resistance */ if ( ((model->BSIM3sheetResistance > 0.0) && (here->BSIM3drainSquares > 0.0)) ||((model->BSIM3sheetResistance > 0.0) && (model->BSIM3hdif > 0.0)) ||((model->BSIM3rd > 0.0) && (model->BSIM3ldif > 0.0)) ||((model->BSIM3rd > 0.0) && (model->BSIM3ld > 0.0)) ||((model->BSIM3rdc > 0.0)) ) { if(here->BSIM3dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3name,"drain"); if(error) return(error); here->BSIM3dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3dNodePrime = here->BSIM3dNode; } /* process source series resistance */ if ( ((model->BSIM3sheetResistance > 0.0) && (here->BSIM3sourceSquares > 0.0)) ||((model->BSIM3sheetResistance > 0.0) && (model->BSIM3hdif > 0.0)) ||((model->BSIM3rs > 0.0) && (model->BSIM3ldif > 0.0)) ||((model->BSIM3rs > 0.0) && (model->BSIM3ld > 0.0)) ||((model->BSIM3rsc > 0.0)) ) { if(here->BSIM3sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3name,"source"); if(error) return(error); here->BSIM3sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3sNodePrime = here->BSIM3sNode; } /* internal charge node */ if (here->BSIM3nqsMod) { if (here->BSIM3qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3name,"charge"); if(error) return(error); here->BSIM3qNode = tmp->number; } } else { here->BSIM3qNode = 0; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM3DdPtr, BSIM3dNode, BSIM3dNode); TSTALLOC(BSIM3GgPtr, BSIM3gNode, BSIM3gNode); TSTALLOC(BSIM3SsPtr, BSIM3sNode, BSIM3sNode); TSTALLOC(BSIM3BbPtr, BSIM3bNode, BSIM3bNode); TSTALLOC(BSIM3DPdpPtr, BSIM3dNodePrime, BSIM3dNodePrime); TSTALLOC(BSIM3SPspPtr, BSIM3sNodePrime, BSIM3sNodePrime); TSTALLOC(BSIM3DdpPtr, BSIM3dNode, BSIM3dNodePrime); TSTALLOC(BSIM3GbPtr, BSIM3gNode, BSIM3bNode); TSTALLOC(BSIM3GdpPtr, BSIM3gNode, BSIM3dNodePrime); TSTALLOC(BSIM3GspPtr, BSIM3gNode, BSIM3sNodePrime); TSTALLOC(BSIM3SspPtr, BSIM3sNode, BSIM3sNodePrime); TSTALLOC(BSIM3BdpPtr, BSIM3bNode, BSIM3dNodePrime); TSTALLOC(BSIM3BspPtr, BSIM3bNode, BSIM3sNodePrime); TSTALLOC(BSIM3DPspPtr, BSIM3dNodePrime, BSIM3sNodePrime); TSTALLOC(BSIM3DPdPtr, BSIM3dNodePrime, BSIM3dNode); TSTALLOC(BSIM3BgPtr, BSIM3bNode, BSIM3gNode); TSTALLOC(BSIM3DPgPtr, BSIM3dNodePrime, BSIM3gNode); TSTALLOC(BSIM3SPgPtr, BSIM3sNodePrime, BSIM3gNode); TSTALLOC(BSIM3SPsPtr, BSIM3sNodePrime, BSIM3sNode); TSTALLOC(BSIM3DPbPtr, BSIM3dNodePrime, BSIM3bNode); TSTALLOC(BSIM3SPbPtr, BSIM3sNodePrime, BSIM3bNode); TSTALLOC(BSIM3SPdpPtr, BSIM3sNodePrime, BSIM3dNodePrime); TSTALLOC(BSIM3QqPtr, BSIM3qNode, BSIM3qNode); TSTALLOC(BSIM3QdpPtr, BSIM3qNode, BSIM3dNodePrime); TSTALLOC(BSIM3QspPtr, BSIM3qNode, BSIM3sNodePrime); TSTALLOC(BSIM3QgPtr, BSIM3qNode, BSIM3gNode); TSTALLOC(BSIM3QbPtr, BSIM3qNode, BSIM3bNode); TSTALLOC(BSIM3DPqPtr, BSIM3dNodePrime, BSIM3qNode); TSTALLOC(BSIM3SPqPtr, BSIM3sNodePrime, BSIM3qNode); TSTALLOC(BSIM3GqPtr, BSIM3gNode, BSIM3qNode); TSTALLOC(BSIM3BqPtr, BSIM3bNode, BSIM3qNode); } } #ifdef USE_OMP InstCount = 0; model = (BSIM3model*)inModel; /* loop through all the BSIM3 device models to count the number of instances */ for( ; model != NULL; model = model->BSIM3nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM3instances; here != NULL ; here=here->BSIM3nextInstance) { InstCount++; } } InstArray = TMALLOC(BSIM3instance*, InstCount); model = (BSIM3model*)inModel; idx = 0; for( ; model != NULL; model = model->BSIM3nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM3instances; here != NULL ; here=here->BSIM3nextInstance) { InstArray[idx] = here; idx++; } /* set the array pointer and instance count into each model */ model->BSIM3InstCount = InstCount; model->BSIM3InstanceArray = InstArray; } #endif return(OK); } int BSIM3unsetup( GENmodel *inModel, CKTcircuit *ckt) { BSIM3model *model; BSIM3instance *here; for (model = (BSIM3model *)inModel; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here != NULL; here=here->BSIM3nextInstance) { if (here->BSIM3dNodePrime && here->BSIM3dNodePrime != here->BSIM3dNode) { CKTdltNNum(ckt, here->BSIM3dNodePrime); here->BSIM3dNodePrime = 0; } if (here->BSIM3sNodePrime && here->BSIM3sNodePrime != here->BSIM3sNode) { CKTdltNNum(ckt, here->BSIM3sNodePrime); here->BSIM3sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3/b3del.c0000644000265600020320000000213312264261473020405 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3del.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/14, 2001. **********/ #include "ngspice/ngspice.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM3delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM3instance **fast = (BSIM3instance**)inInst; BSIM3model *model = (BSIM3model*)inModel; BSIM3instance **prev = NULL; BSIM3instance *here; for (; model ; model = model->BSIM3nextModel) { prev = &(model->BSIM3instances); for (here = *prev; here ; here = *prev) { if (here->BSIM3name == name || (fast && here==*fast)) { *prev= here->BSIM3nextInstance; FREE(here); return(OK); } prev = &(here->BSIM3nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3/bsim3def.h0000644000265600020320000015250012264261473021121 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. Author: 1997-1999 Weidong Liu. Author: 2001- Xuemei Xi **** OpenMP support for ngspice by Holger Vogt 06/28/2010 **** File: bsim3def.h **********/ #ifndef BSIM3 #define BSIM3 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM3instance { struct sBSIM3model *BSIM3modPtr; struct sBSIM3instance *BSIM3nextInstance; IFuid BSIM3name; int BSIM3states; /* index into state table for this device */ int BSIM3dNode; int BSIM3gNode; int BSIM3sNode; int BSIM3bNode; int BSIM3dNodePrime; int BSIM3sNodePrime; int BSIM3qNode; /* MCJ */ /* MCJ */ double BSIM3ueff; double BSIM3thetavth; double BSIM3von; double BSIM3vdsat; double BSIM3cgdo; double BSIM3cgso; double BSIM3vjsm; double BSIM3IsEvjsm; double BSIM3vjdm; double BSIM3IsEvjdm; double BSIM3l; double BSIM3w; double BSIM3m; double BSIM3drainArea; double BSIM3sourceArea; double BSIM3drainSquares; double BSIM3sourceSquares; double BSIM3drainPerimeter; double BSIM3sourcePerimeter; double BSIM3sourceConductance; double BSIM3drainConductance; double BSIM3delvto; double BSIM3mulu0; double BSIM3vth0; double BSIM3vfb; double BSIM3vfbzb; double BSIM3u0temp; double BSIM3tconst; double BSIM3icVBS; double BSIM3icVDS; double BSIM3icVGS; int BSIM3off; int BSIM3mode; int BSIM3nqsMod; int BSIM3acnqsMod; int BSIM3geo; /* OP point */ double BSIM3qinv; double BSIM3cd; double BSIM3cbs; double BSIM3cbd; double BSIM3csub; double BSIM3gm; double BSIM3gds; double BSIM3gmbs; double BSIM3gbd; double BSIM3gbs; double BSIM3gbbs; double BSIM3gbgs; double BSIM3gbds; double BSIM3cggb; double BSIM3cgdb; double BSIM3cgsb; double BSIM3cbgb; double BSIM3cbdb; double BSIM3cbsb; double BSIM3cdgb; double BSIM3cddb; double BSIM3cdsb; double BSIM3capbd; double BSIM3capbs; double BSIM3cqgb; double BSIM3cqdb; double BSIM3cqsb; double BSIM3cqbb; double BSIM3qgate; double BSIM3qbulk; double BSIM3qdrn; double BSIM3gtau; double BSIM3gtg; double BSIM3gtd; double BSIM3gts; double BSIM3gtb; double BSIM3rds; /* Noise bugfix */ double BSIM3Vgsteff; double BSIM3Vdseff; double BSIM3Abulk; double BSIM3AbovVgst2Vtm; double BSIM3taunet; struct bsim3SizeDependParam *pParam; unsigned BSIM3lGiven :1; unsigned BSIM3wGiven :1; unsigned BSIM3mGiven :1; unsigned BSIM3drainAreaGiven :1; unsigned BSIM3sourceAreaGiven :1; unsigned BSIM3drainSquaresGiven :1; unsigned BSIM3sourceSquaresGiven :1; unsigned BSIM3drainPerimeterGiven :1; unsigned BSIM3sourcePerimeterGiven :1; unsigned BSIM3delvtoGiven :1; unsigned BSIM3mulu0Given :1; unsigned BSIM3dNodePrimeSet :1; unsigned BSIM3sNodePrimeSet :1; unsigned BSIM3icVBSGiven :1; unsigned BSIM3icVDSGiven :1; unsigned BSIM3icVGSGiven :1; unsigned BSIM3nqsModGiven :1; unsigned BSIM3acnqsModGiven :1; unsigned BSIM3geoGiven :1; double *BSIM3DdPtr; double *BSIM3GgPtr; double *BSIM3SsPtr; double *BSIM3BbPtr; double *BSIM3DPdpPtr; double *BSIM3SPspPtr; double *BSIM3DdpPtr; double *BSIM3GbPtr; double *BSIM3GdpPtr; double *BSIM3GspPtr; double *BSIM3SspPtr; double *BSIM3BdpPtr; double *BSIM3BspPtr; double *BSIM3DPspPtr; double *BSIM3DPdPtr; double *BSIM3BgPtr; double *BSIM3DPgPtr; double *BSIM3SPgPtr; double *BSIM3SPsPtr; double *BSIM3DPbPtr; double *BSIM3SPbPtr; double *BSIM3SPdpPtr; double *BSIM3QqPtr; double *BSIM3QdpPtr; double *BSIM3QgPtr; double *BSIM3QspPtr; double *BSIM3QbPtr; double *BSIM3DPqPtr; double *BSIM3GqPtr; double *BSIM3SPqPtr; double *BSIM3BqPtr; #ifdef USE_OMP /* per instance storage of results, to update matrix at a later stge */ double BSIM3rhsG; double BSIM3rhsB; double BSIM3rhsD; double BSIM3rhsS; double BSIM3rhsQ; double BSIM3DdPt; double BSIM3GgPt; double BSIM3SsPt; double BSIM3BbPt; double BSIM3DPdpPt; double BSIM3SPspPt; double BSIM3DdpPt; double BSIM3GbPt; double BSIM3GdpPt; double BSIM3GspPt; double BSIM3SspPt; double BSIM3BdpPt; double BSIM3BspPt; double BSIM3DPspPt; double BSIM3DPdPt; double BSIM3BgPt; double BSIM3DPgPt; double BSIM3SPgPt; double BSIM3SPsPt; double BSIM3DPbPt; double BSIM3SPbPt; double BSIM3SPdpPt; double BSIM3QqPt; double BSIM3QdpPt; double BSIM3QgPt; double BSIM3QspPt; double BSIM3QbPt; double BSIM3DPqPt; double BSIM3GqPt; double BSIM3SPqPt; double BSIM3BqPt; #endif #define BSIM3vbd BSIM3states+ 0 #define BSIM3vbs BSIM3states+ 1 #define BSIM3vgs BSIM3states+ 2 #define BSIM3vds BSIM3states+ 3 #define BSIM3qb BSIM3states+ 4 #define BSIM3cqb BSIM3states+ 5 #define BSIM3qg BSIM3states+ 6 #define BSIM3cqg BSIM3states+ 7 #define BSIM3qd BSIM3states+ 8 #define BSIM3cqd BSIM3states+ 9 #define BSIM3qbs BSIM3states+ 10 #define BSIM3qbd BSIM3states+ 11 #define BSIM3qcheq BSIM3states+ 12 #define BSIM3cqcheq BSIM3states+ 13 #define BSIM3qcdump BSIM3states+ 14 #define BSIM3cqcdump BSIM3states+ 15 #define BSIM3qdef BSIM3states+ 16 #define BSIM3numStates 17 /* indices to the array of BSIM3 NOISE SOURCES */ #define BSIM3RDNOIZ 0 #define BSIM3RSNOIZ 1 #define BSIM3IDNOIZ 2 #define BSIM3FLNOIZ 3 #define BSIM3TOTNOIZ 4 #define BSIM3NSRCS 5 /* the number of BSIM3 MOSFET noise sources */ #ifndef NONOISE double BSIM3nVar[NSTATVARS][BSIM3NSRCS]; #else /* NONOISE */ double **BSIM3nVar; #endif /* NONOISE */ } BSIM3instance ; struct bsim3SizeDependParam { double Width; double Length; double BSIM3cdsc; double BSIM3cdscb; double BSIM3cdscd; double BSIM3cit; double BSIM3nfactor; double BSIM3xj; double BSIM3vsat; double BSIM3at; double BSIM3a0; double BSIM3ags; double BSIM3a1; double BSIM3a2; double BSIM3keta; double BSIM3nsub; double BSIM3npeak; double BSIM3ngate; double BSIM3gamma1; double BSIM3gamma2; double BSIM3vbx; double BSIM3vbi; double BSIM3vbm; double BSIM3vbsc; double BSIM3xt; double BSIM3phi; double BSIM3litl; double BSIM3k1; double BSIM3kt1; double BSIM3kt1l; double BSIM3kt2; double BSIM3k2; double BSIM3k3; double BSIM3k3b; double BSIM3w0; double BSIM3nlx; double BSIM3dvt0; double BSIM3dvt1; double BSIM3dvt2; double BSIM3dvt0w; double BSIM3dvt1w; double BSIM3dvt2w; double BSIM3drout; double BSIM3dsub; double BSIM3vth0; double BSIM3ua; double BSIM3ua1; double BSIM3ub; double BSIM3ub1; double BSIM3uc; double BSIM3uc1; double BSIM3u0; double BSIM3ute; double BSIM3voff; double BSIM3vfb; double BSIM3delta; double BSIM3rdsw; double BSIM3rds0; double BSIM3prwg; double BSIM3prwb; double BSIM3prt; double BSIM3eta0; double BSIM3etab; double BSIM3pclm; double BSIM3pdibl1; double BSIM3pdibl2; double BSIM3pdiblb; double BSIM3pscbe1; double BSIM3pscbe2; double BSIM3pvag; double BSIM3wr; double BSIM3dwg; double BSIM3dwb; double BSIM3b0; double BSIM3b1; double BSIM3alpha0; double BSIM3alpha1; double BSIM3beta0; /* CV model */ double BSIM3elm; double BSIM3cgsl; double BSIM3cgdl; double BSIM3ckappa; double BSIM3cf; double BSIM3clc; double BSIM3cle; double BSIM3vfbcv; double BSIM3noff; double BSIM3voffcv; double BSIM3acde; double BSIM3moin; /* Pre-calculated constants */ double BSIM3dw; double BSIM3dl; double BSIM3leff; double BSIM3weff; double BSIM3dwc; double BSIM3dlc; double BSIM3leffCV; double BSIM3weffCV; double BSIM3abulkCVfactor; double BSIM3cgso; double BSIM3cgdo; double BSIM3cgbo; double BSIM3tconst; double BSIM3u0temp; double BSIM3vsattemp; double BSIM3sqrtPhi; double BSIM3phis3; double BSIM3Xdep0; double BSIM3sqrtXdep0; double BSIM3theta0vb0; double BSIM3thetaRout; double BSIM3cof1; double BSIM3cof2; double BSIM3cof3; double BSIM3cof4; double BSIM3cdep0; double BSIM3vfbzb; double BSIM3ldeb; double BSIM3k1ox; double BSIM3k2ox; struct bsim3SizeDependParam *pNext; }; typedef struct sBSIM3model { int BSIM3modType; struct sBSIM3model *BSIM3nextModel; BSIM3instance *BSIM3instances; IFuid BSIM3modName; int BSIM3type; int BSIM3mobMod; int BSIM3capMod; int BSIM3acmMod; int BSIM3calcacm; int BSIM3noiMod; int BSIM3nqsMod; int BSIM3acnqsMod; int BSIM3binUnit; int BSIM3paramChk; char *BSIM3version; double BSIM3tox; double BSIM3toxm; double BSIM3cdsc; double BSIM3cdscb; double BSIM3cdscd; double BSIM3cit; double BSIM3nfactor; double BSIM3xj; double BSIM3vsat; double BSIM3at; double BSIM3a0; double BSIM3ags; double BSIM3a1; double BSIM3a2; double BSIM3keta; double BSIM3nsub; double BSIM3npeak; double BSIM3ngate; double BSIM3gamma1; double BSIM3gamma2; double BSIM3vbx; double BSIM3vbm; double BSIM3xt; double BSIM3k1; double BSIM3kt1; double BSIM3kt1l; double BSIM3kt2; double BSIM3k2; double BSIM3k3; double BSIM3k3b; double BSIM3w0; double BSIM3nlx; double BSIM3dvt0; double BSIM3dvt1; double BSIM3dvt2; double BSIM3dvt0w; double BSIM3dvt1w; double BSIM3dvt2w; double BSIM3drout; double BSIM3dsub; double BSIM3vth0; double BSIM3ua; double BSIM3ua1; double BSIM3ub; double BSIM3ub1; double BSIM3uc; double BSIM3uc1; double BSIM3u0; double BSIM3ute; double BSIM3voff; double BSIM3delta; double BSIM3rdsw; double BSIM3prwg; double BSIM3prwb; double BSIM3prt; double BSIM3eta0; double BSIM3etab; double BSIM3pclm; double BSIM3pdibl1; double BSIM3pdibl2; double BSIM3pdiblb; double BSIM3pscbe1; double BSIM3pscbe2; double BSIM3pvag; double BSIM3wr; double BSIM3dwg; double BSIM3dwb; double BSIM3b0; double BSIM3b1; double BSIM3alpha0; double BSIM3alpha1; double BSIM3beta0; double BSIM3ijth; double BSIM3vfb; /* CV model */ double BSIM3elm; double BSIM3cgsl; double BSIM3cgdl; double BSIM3ckappa; double BSIM3cf; double BSIM3vfbcv; double BSIM3clc; double BSIM3cle; double BSIM3dwc; double BSIM3dlc; double BSIM3noff; double BSIM3voffcv; double BSIM3acde; double BSIM3moin; double BSIM3tcj; double BSIM3tcjsw; double BSIM3tcjswg; double BSIM3tpb; double BSIM3tpbsw; double BSIM3tpbswg; /* ACM model */ double BSIM3xl; double BSIM3xw; double BSIM3hdif; double BSIM3ldif; double BSIM3ld; double BSIM3rd; double BSIM3rs; double BSIM3rdc; double BSIM3rsc; double BSIM3wmlt; /* Length Dependence */ double BSIM3lcdsc; double BSIM3lcdscb; double BSIM3lcdscd; double BSIM3lcit; double BSIM3lnfactor; double BSIM3lxj; double BSIM3lvsat; double BSIM3lat; double BSIM3la0; double BSIM3lags; double BSIM3la1; double BSIM3la2; double BSIM3lketa; double BSIM3lnsub; double BSIM3lnpeak; double BSIM3lngate; double BSIM3lgamma1; double BSIM3lgamma2; double BSIM3lvbx; double BSIM3lvbm; double BSIM3lxt; double BSIM3lk1; double BSIM3lkt1; double BSIM3lkt1l; double BSIM3lkt2; double BSIM3lk2; double BSIM3lk3; double BSIM3lk3b; double BSIM3lw0; double BSIM3lnlx; double BSIM3ldvt0; double BSIM3ldvt1; double BSIM3ldvt2; double BSIM3ldvt0w; double BSIM3ldvt1w; double BSIM3ldvt2w; double BSIM3ldrout; double BSIM3ldsub; double BSIM3lvth0; double BSIM3lua; double BSIM3lua1; double BSIM3lub; double BSIM3lub1; double BSIM3luc; double BSIM3luc1; double BSIM3lu0; double BSIM3lute; double BSIM3lvoff; double BSIM3ldelta; double BSIM3lrdsw; double BSIM3lprwg; double BSIM3lprwb; double BSIM3lprt; double BSIM3leta0; double BSIM3letab; double BSIM3lpclm; double BSIM3lpdibl1; double BSIM3lpdibl2; double BSIM3lpdiblb; double BSIM3lpscbe1; double BSIM3lpscbe2; double BSIM3lpvag; double BSIM3lwr; double BSIM3ldwg; double BSIM3ldwb; double BSIM3lb0; double BSIM3lb1; double BSIM3lalpha0; double BSIM3lalpha1; double BSIM3lbeta0; double BSIM3lvfb; /* CV model */ double BSIM3lelm; double BSIM3lcgsl; double BSIM3lcgdl; double BSIM3lckappa; double BSIM3lcf; double BSIM3lclc; double BSIM3lcle; double BSIM3lvfbcv; double BSIM3lnoff; double BSIM3lvoffcv; double BSIM3lacde; double BSIM3lmoin; /* Width Dependence */ double BSIM3wcdsc; double BSIM3wcdscb; double BSIM3wcdscd; double BSIM3wcit; double BSIM3wnfactor; double BSIM3wxj; double BSIM3wvsat; double BSIM3wat; double BSIM3wa0; double BSIM3wags; double BSIM3wa1; double BSIM3wa2; double BSIM3wketa; double BSIM3wnsub; double BSIM3wnpeak; double BSIM3wngate; double BSIM3wgamma1; double BSIM3wgamma2; double BSIM3wvbx; double BSIM3wvbm; double BSIM3wxt; double BSIM3wk1; double BSIM3wkt1; double BSIM3wkt1l; double BSIM3wkt2; double BSIM3wk2; double BSIM3wk3; double BSIM3wk3b; double BSIM3ww0; double BSIM3wnlx; double BSIM3wdvt0; double BSIM3wdvt1; double BSIM3wdvt2; double BSIM3wdvt0w; double BSIM3wdvt1w; double BSIM3wdvt2w; double BSIM3wdrout; double BSIM3wdsub; double BSIM3wvth0; double BSIM3wua; double BSIM3wua1; double BSIM3wub; double BSIM3wub1; double BSIM3wuc; double BSIM3wuc1; double BSIM3wu0; double BSIM3wute; double BSIM3wvoff; double BSIM3wdelta; double BSIM3wrdsw; double BSIM3wprwg; double BSIM3wprwb; double BSIM3wprt; double BSIM3weta0; double BSIM3wetab; double BSIM3wpclm; double BSIM3wpdibl1; double BSIM3wpdibl2; double BSIM3wpdiblb; double BSIM3wpscbe1; double BSIM3wpscbe2; double BSIM3wpvag; double BSIM3wwr; double BSIM3wdwg; double BSIM3wdwb; double BSIM3wb0; double BSIM3wb1; double BSIM3walpha0; double BSIM3walpha1; double BSIM3wbeta0; double BSIM3wvfb; /* CV model */ double BSIM3welm; double BSIM3wcgsl; double BSIM3wcgdl; double BSIM3wckappa; double BSIM3wcf; double BSIM3wclc; double BSIM3wcle; double BSIM3wvfbcv; double BSIM3wnoff; double BSIM3wvoffcv; double BSIM3wacde; double BSIM3wmoin; /* Cross-term Dependence */ double BSIM3pcdsc; double BSIM3pcdscb; double BSIM3pcdscd; double BSIM3pcit; double BSIM3pnfactor; double BSIM3pxj; double BSIM3pvsat; double BSIM3pat; double BSIM3pa0; double BSIM3pags; double BSIM3pa1; double BSIM3pa2; double BSIM3pketa; double BSIM3pnsub; double BSIM3pnpeak; double BSIM3pngate; double BSIM3pgamma1; double BSIM3pgamma2; double BSIM3pvbx; double BSIM3pvbm; double BSIM3pxt; double BSIM3pk1; double BSIM3pkt1; double BSIM3pkt1l; double BSIM3pkt2; double BSIM3pk2; double BSIM3pk3; double BSIM3pk3b; double BSIM3pw0; double BSIM3pnlx; double BSIM3pdvt0; double BSIM3pdvt1; double BSIM3pdvt2; double BSIM3pdvt0w; double BSIM3pdvt1w; double BSIM3pdvt2w; double BSIM3pdrout; double BSIM3pdsub; double BSIM3pvth0; double BSIM3pua; double BSIM3pua1; double BSIM3pub; double BSIM3pub1; double BSIM3puc; double BSIM3puc1; double BSIM3pu0; double BSIM3pute; double BSIM3pvoff; double BSIM3pdelta; double BSIM3prdsw; double BSIM3pprwg; double BSIM3pprwb; double BSIM3pprt; double BSIM3peta0; double BSIM3petab; double BSIM3ppclm; double BSIM3ppdibl1; double BSIM3ppdibl2; double BSIM3ppdiblb; double BSIM3ppscbe1; double BSIM3ppscbe2; double BSIM3ppvag; double BSIM3pwr; double BSIM3pdwg; double BSIM3pdwb; double BSIM3pb0; double BSIM3pb1; double BSIM3palpha0; double BSIM3palpha1; double BSIM3pbeta0; double BSIM3pvfb; /* CV model */ double BSIM3pelm; double BSIM3pcgsl; double BSIM3pcgdl; double BSIM3pckappa; double BSIM3pcf; double BSIM3pclc; double BSIM3pcle; double BSIM3pvfbcv; double BSIM3pnoff; double BSIM3pvoffcv; double BSIM3pacde; double BSIM3pmoin; double BSIM3tnom; double BSIM3cgso; double BSIM3cgdo; double BSIM3cgbo; double BSIM3xpart; double BSIM3cFringOut; double BSIM3cFringMax; double BSIM3sheetResistance; double BSIM3jctSatCurDensity; double BSIM3jctSidewallSatCurDensity; double BSIM3bulkJctPotential; double BSIM3bulkJctBotGradingCoeff; double BSIM3bulkJctSideGradingCoeff; double BSIM3bulkJctGateSideGradingCoeff; double BSIM3sidewallJctPotential; double BSIM3GatesidewallJctPotential; double BSIM3unitAreaJctCap; double BSIM3unitLengthSidewallJctCap; double BSIM3unitLengthGateSidewallJctCap; double BSIM3jctEmissionCoeff; double BSIM3jctTempExponent; double BSIM3Lint; double BSIM3Ll; double BSIM3Llc; double BSIM3Lln; double BSIM3Lw; double BSIM3Lwc; double BSIM3Lwn; double BSIM3Lwl; double BSIM3Lwlc; double BSIM3Lmin; double BSIM3Lmax; double BSIM3Wint; double BSIM3Wl; double BSIM3Wlc; double BSIM3Wln; double BSIM3Ww; double BSIM3Wwc; double BSIM3Wwn; double BSIM3Wwl; double BSIM3Wwlc; double BSIM3Wmin; double BSIM3Wmax; /* Pre-calculated constants */ /* MCJ: move to size-dependent param. */ double BSIM3vtm; double BSIM3cox; double BSIM3cof1; double BSIM3cof2; double BSIM3cof3; double BSIM3cof4; double BSIM3vcrit; double BSIM3factor1; double BSIM3PhiB; double BSIM3PhiBSW; double BSIM3PhiBSWG; double BSIM3jctTempSatCurDensity; double BSIM3jctSidewallTempSatCurDensity; double BSIM3unitAreaTempJctCap; double BSIM3unitLengthSidewallTempJctCap; double BSIM3unitLengthGateSidewallTempJctCap; double BSIM3oxideTrapDensityA; double BSIM3oxideTrapDensityB; double BSIM3oxideTrapDensityC; double BSIM3em; double BSIM3ef; double BSIM3af; double BSIM3kf; double BSIM3lintnoi; /* lint offset for noise calculation */ double BSIM3vgsMax; double BSIM3vgdMax; double BSIM3vgbMax; double BSIM3vdsMax; double BSIM3vbsMax; double BSIM3vbdMax; struct bsim3SizeDependParam *pSizeDependParamKnot; #ifdef USE_OMP int BSIM3InstCount; struct sBSIM3instance **BSIM3InstanceArray; #endif /* Flags */ unsigned BSIM3mobModGiven :1; unsigned BSIM3binUnitGiven :1; unsigned BSIM3capModGiven :1; unsigned BSIM3acmModGiven :1; unsigned BSIM3calcacmGiven :1; unsigned BSIM3paramChkGiven :1; unsigned BSIM3noiModGiven :1; unsigned BSIM3nqsModGiven :1; unsigned BSIM3acnqsModGiven :1; unsigned BSIM3typeGiven :1; unsigned BSIM3toxGiven :1; unsigned BSIM3versionGiven :1; unsigned BSIM3toxmGiven :1; unsigned BSIM3cdscGiven :1; unsigned BSIM3cdscbGiven :1; unsigned BSIM3cdscdGiven :1; unsigned BSIM3citGiven :1; unsigned BSIM3nfactorGiven :1; unsigned BSIM3xjGiven :1; unsigned BSIM3vsatGiven :1; unsigned BSIM3atGiven :1; unsigned BSIM3a0Given :1; unsigned BSIM3agsGiven :1; unsigned BSIM3a1Given :1; unsigned BSIM3a2Given :1; unsigned BSIM3ketaGiven :1; unsigned BSIM3nsubGiven :1; unsigned BSIM3npeakGiven :1; unsigned BSIM3ngateGiven :1; unsigned BSIM3gamma1Given :1; unsigned BSIM3gamma2Given :1; unsigned BSIM3vbxGiven :1; unsigned BSIM3vbmGiven :1; unsigned BSIM3xtGiven :1; unsigned BSIM3k1Given :1; unsigned BSIM3kt1Given :1; unsigned BSIM3kt1lGiven :1; unsigned BSIM3kt2Given :1; unsigned BSIM3k2Given :1; unsigned BSIM3k3Given :1; unsigned BSIM3k3bGiven :1; unsigned BSIM3w0Given :1; unsigned BSIM3nlxGiven :1; unsigned BSIM3dvt0Given :1; unsigned BSIM3dvt1Given :1; unsigned BSIM3dvt2Given :1; unsigned BSIM3dvt0wGiven :1; unsigned BSIM3dvt1wGiven :1; unsigned BSIM3dvt2wGiven :1; unsigned BSIM3droutGiven :1; unsigned BSIM3dsubGiven :1; unsigned BSIM3vth0Given :1; unsigned BSIM3uaGiven :1; unsigned BSIM3ua1Given :1; unsigned BSIM3ubGiven :1; unsigned BSIM3ub1Given :1; unsigned BSIM3ucGiven :1; unsigned BSIM3uc1Given :1; unsigned BSIM3u0Given :1; unsigned BSIM3uteGiven :1; unsigned BSIM3voffGiven :1; unsigned BSIM3rdswGiven :1; unsigned BSIM3prwgGiven :1; unsigned BSIM3prwbGiven :1; unsigned BSIM3prtGiven :1; unsigned BSIM3eta0Given :1; unsigned BSIM3etabGiven :1; unsigned BSIM3pclmGiven :1; unsigned BSIM3pdibl1Given :1; unsigned BSIM3pdibl2Given :1; unsigned BSIM3pdiblbGiven :1; unsigned BSIM3pscbe1Given :1; unsigned BSIM3pscbe2Given :1; unsigned BSIM3pvagGiven :1; unsigned BSIM3deltaGiven :1; unsigned BSIM3wrGiven :1; unsigned BSIM3dwgGiven :1; unsigned BSIM3dwbGiven :1; unsigned BSIM3b0Given :1; unsigned BSIM3b1Given :1; unsigned BSIM3alpha0Given :1; unsigned BSIM3alpha1Given :1; unsigned BSIM3beta0Given :1; unsigned BSIM3ijthGiven :1; unsigned BSIM3vfbGiven :1; /* CV model */ unsigned BSIM3elmGiven :1; unsigned BSIM3cgslGiven :1; unsigned BSIM3cgdlGiven :1; unsigned BSIM3ckappaGiven :1; unsigned BSIM3cfGiven :1; unsigned BSIM3vfbcvGiven :1; unsigned BSIM3clcGiven :1; unsigned BSIM3cleGiven :1; unsigned BSIM3dwcGiven :1; unsigned BSIM3dlcGiven :1; unsigned BSIM3noffGiven :1; unsigned BSIM3voffcvGiven :1; unsigned BSIM3acdeGiven :1; unsigned BSIM3moinGiven :1; unsigned BSIM3tcjGiven :1; unsigned BSIM3tcjswGiven :1; unsigned BSIM3tcjswgGiven :1; unsigned BSIM3tpbGiven :1; unsigned BSIM3tpbswGiven :1; unsigned BSIM3tpbswgGiven :1; /* ACM model */ unsigned BSIM3xlGiven :1; unsigned BSIM3xwGiven :1; unsigned BSIM3hdifGiven :1; unsigned BSIM3ldifGiven :1; unsigned BSIM3ldGiven :1; unsigned BSIM3rdGiven :1; unsigned BSIM3rsGiven :1; unsigned BSIM3rdcGiven :1; unsigned BSIM3rscGiven :1; unsigned BSIM3wmltGiven :1; /* Length dependence */ unsigned BSIM3lcdscGiven :1; unsigned BSIM3lcdscbGiven :1; unsigned BSIM3lcdscdGiven :1; unsigned BSIM3lcitGiven :1; unsigned BSIM3lnfactorGiven :1; unsigned BSIM3lxjGiven :1; unsigned BSIM3lvsatGiven :1; unsigned BSIM3latGiven :1; unsigned BSIM3la0Given :1; unsigned BSIM3lagsGiven :1; unsigned BSIM3la1Given :1; unsigned BSIM3la2Given :1; unsigned BSIM3lketaGiven :1; unsigned BSIM3lnsubGiven :1; unsigned BSIM3lnpeakGiven :1; unsigned BSIM3lngateGiven :1; unsigned BSIM3lgamma1Given :1; unsigned BSIM3lgamma2Given :1; unsigned BSIM3lvbxGiven :1; unsigned BSIM3lvbmGiven :1; unsigned BSIM3lxtGiven :1; unsigned BSIM3lk1Given :1; unsigned BSIM3lkt1Given :1; unsigned BSIM3lkt1lGiven :1; unsigned BSIM3lkt2Given :1; unsigned BSIM3lk2Given :1; unsigned BSIM3lk3Given :1; unsigned BSIM3lk3bGiven :1; unsigned BSIM3lw0Given :1; unsigned BSIM3lnlxGiven :1; unsigned BSIM3ldvt0Given :1; unsigned BSIM3ldvt1Given :1; unsigned BSIM3ldvt2Given :1; unsigned BSIM3ldvt0wGiven :1; unsigned BSIM3ldvt1wGiven :1; unsigned BSIM3ldvt2wGiven :1; unsigned BSIM3ldroutGiven :1; unsigned BSIM3ldsubGiven :1; unsigned BSIM3lvth0Given :1; unsigned BSIM3luaGiven :1; unsigned BSIM3lua1Given :1; unsigned BSIM3lubGiven :1; unsigned BSIM3lub1Given :1; unsigned BSIM3lucGiven :1; unsigned BSIM3luc1Given :1; unsigned BSIM3lu0Given :1; unsigned BSIM3luteGiven :1; unsigned BSIM3lvoffGiven :1; unsigned BSIM3lrdswGiven :1; unsigned BSIM3lprwgGiven :1; unsigned BSIM3lprwbGiven :1; unsigned BSIM3lprtGiven :1; unsigned BSIM3leta0Given :1; unsigned BSIM3letabGiven :1; unsigned BSIM3lpclmGiven :1; unsigned BSIM3lpdibl1Given :1; unsigned BSIM3lpdibl2Given :1; unsigned BSIM3lpdiblbGiven :1; unsigned BSIM3lpscbe1Given :1; unsigned BSIM3lpscbe2Given :1; unsigned BSIM3lpvagGiven :1; unsigned BSIM3ldeltaGiven :1; unsigned BSIM3lwrGiven :1; unsigned BSIM3ldwgGiven :1; unsigned BSIM3ldwbGiven :1; unsigned BSIM3lb0Given :1; unsigned BSIM3lb1Given :1; unsigned BSIM3lalpha0Given :1; unsigned BSIM3lalpha1Given :1; unsigned BSIM3lbeta0Given :1; unsigned BSIM3lvfbGiven :1; /* CV model */ unsigned BSIM3lelmGiven :1; unsigned BSIM3lcgslGiven :1; unsigned BSIM3lcgdlGiven :1; unsigned BSIM3lckappaGiven :1; unsigned BSIM3lcfGiven :1; unsigned BSIM3lclcGiven :1; unsigned BSIM3lcleGiven :1; unsigned BSIM3lvfbcvGiven :1; unsigned BSIM3lnoffGiven :1; unsigned BSIM3lvoffcvGiven :1; unsigned BSIM3lacdeGiven :1; unsigned BSIM3lmoinGiven :1; /* Width dependence */ unsigned BSIM3wcdscGiven :1; unsigned BSIM3wcdscbGiven :1; unsigned BSIM3wcdscdGiven :1; unsigned BSIM3wcitGiven :1; unsigned BSIM3wnfactorGiven :1; unsigned BSIM3wxjGiven :1; unsigned BSIM3wvsatGiven :1; unsigned BSIM3watGiven :1; unsigned BSIM3wa0Given :1; unsigned BSIM3wagsGiven :1; unsigned BSIM3wa1Given :1; unsigned BSIM3wa2Given :1; unsigned BSIM3wketaGiven :1; unsigned BSIM3wnsubGiven :1; unsigned BSIM3wnpeakGiven :1; unsigned BSIM3wngateGiven :1; unsigned BSIM3wgamma1Given :1; unsigned BSIM3wgamma2Given :1; unsigned BSIM3wvbxGiven :1; unsigned BSIM3wvbmGiven :1; unsigned BSIM3wxtGiven :1; unsigned BSIM3wk1Given :1; unsigned BSIM3wkt1Given :1; unsigned BSIM3wkt1lGiven :1; unsigned BSIM3wkt2Given :1; unsigned BSIM3wk2Given :1; unsigned BSIM3wk3Given :1; unsigned BSIM3wk3bGiven :1; unsigned BSIM3ww0Given :1; unsigned BSIM3wnlxGiven :1; unsigned BSIM3wdvt0Given :1; unsigned BSIM3wdvt1Given :1; unsigned BSIM3wdvt2Given :1; unsigned BSIM3wdvt0wGiven :1; unsigned BSIM3wdvt1wGiven :1; unsigned BSIM3wdvt2wGiven :1; unsigned BSIM3wdroutGiven :1; unsigned BSIM3wdsubGiven :1; unsigned BSIM3wvth0Given :1; unsigned BSIM3wuaGiven :1; unsigned BSIM3wua1Given :1; unsigned BSIM3wubGiven :1; unsigned BSIM3wub1Given :1; unsigned BSIM3wucGiven :1; unsigned BSIM3wuc1Given :1; unsigned BSIM3wu0Given :1; unsigned BSIM3wuteGiven :1; unsigned BSIM3wvoffGiven :1; unsigned BSIM3wrdswGiven :1; unsigned BSIM3wprwgGiven :1; unsigned BSIM3wprwbGiven :1; unsigned BSIM3wprtGiven :1; unsigned BSIM3weta0Given :1; unsigned BSIM3wetabGiven :1; unsigned BSIM3wpclmGiven :1; unsigned BSIM3wpdibl1Given :1; unsigned BSIM3wpdibl2Given :1; unsigned BSIM3wpdiblbGiven :1; unsigned BSIM3wpscbe1Given :1; unsigned BSIM3wpscbe2Given :1; unsigned BSIM3wpvagGiven :1; unsigned BSIM3wdeltaGiven :1; unsigned BSIM3wwrGiven :1; unsigned BSIM3wdwgGiven :1; unsigned BSIM3wdwbGiven :1; unsigned BSIM3wb0Given :1; unsigned BSIM3wb1Given :1; unsigned BSIM3walpha0Given :1; unsigned BSIM3walpha1Given :1; unsigned BSIM3wbeta0Given :1; unsigned BSIM3wvfbGiven :1; /* CV model */ unsigned BSIM3welmGiven :1; unsigned BSIM3wcgslGiven :1; unsigned BSIM3wcgdlGiven :1; unsigned BSIM3wckappaGiven :1; unsigned BSIM3wcfGiven :1; unsigned BSIM3wclcGiven :1; unsigned BSIM3wcleGiven :1; unsigned BSIM3wvfbcvGiven :1; unsigned BSIM3wnoffGiven :1; unsigned BSIM3wvoffcvGiven :1; unsigned BSIM3wacdeGiven :1; unsigned BSIM3wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM3pcdscGiven :1; unsigned BSIM3pcdscbGiven :1; unsigned BSIM3pcdscdGiven :1; unsigned BSIM3pcitGiven :1; unsigned BSIM3pnfactorGiven :1; unsigned BSIM3pxjGiven :1; unsigned BSIM3pvsatGiven :1; unsigned BSIM3patGiven :1; unsigned BSIM3pa0Given :1; unsigned BSIM3pagsGiven :1; unsigned BSIM3pa1Given :1; unsigned BSIM3pa2Given :1; unsigned BSIM3pketaGiven :1; unsigned BSIM3pnsubGiven :1; unsigned BSIM3pnpeakGiven :1; unsigned BSIM3pngateGiven :1; unsigned BSIM3pgamma1Given :1; unsigned BSIM3pgamma2Given :1; unsigned BSIM3pvbxGiven :1; unsigned BSIM3pvbmGiven :1; unsigned BSIM3pxtGiven :1; unsigned BSIM3pk1Given :1; unsigned BSIM3pkt1Given :1; unsigned BSIM3pkt1lGiven :1; unsigned BSIM3pkt2Given :1; unsigned BSIM3pk2Given :1; unsigned BSIM3pk3Given :1; unsigned BSIM3pk3bGiven :1; unsigned BSIM3pw0Given :1; unsigned BSIM3pnlxGiven :1; unsigned BSIM3pdvt0Given :1; unsigned BSIM3pdvt1Given :1; unsigned BSIM3pdvt2Given :1; unsigned BSIM3pdvt0wGiven :1; unsigned BSIM3pdvt1wGiven :1; unsigned BSIM3pdvt2wGiven :1; unsigned BSIM3pdroutGiven :1; unsigned BSIM3pdsubGiven :1; unsigned BSIM3pvth0Given :1; unsigned BSIM3puaGiven :1; unsigned BSIM3pua1Given :1; unsigned BSIM3pubGiven :1; unsigned BSIM3pub1Given :1; unsigned BSIM3pucGiven :1; unsigned BSIM3puc1Given :1; unsigned BSIM3pu0Given :1; unsigned BSIM3puteGiven :1; unsigned BSIM3pvoffGiven :1; unsigned BSIM3prdswGiven :1; unsigned BSIM3pprwgGiven :1; unsigned BSIM3pprwbGiven :1; unsigned BSIM3pprtGiven :1; unsigned BSIM3peta0Given :1; unsigned BSIM3petabGiven :1; unsigned BSIM3ppclmGiven :1; unsigned BSIM3ppdibl1Given :1; unsigned BSIM3ppdibl2Given :1; unsigned BSIM3ppdiblbGiven :1; unsigned BSIM3ppscbe1Given :1; unsigned BSIM3ppscbe2Given :1; unsigned BSIM3ppvagGiven :1; unsigned BSIM3pdeltaGiven :1; unsigned BSIM3pwrGiven :1; unsigned BSIM3pdwgGiven :1; unsigned BSIM3pdwbGiven :1; unsigned BSIM3pb0Given :1; unsigned BSIM3pb1Given :1; unsigned BSIM3palpha0Given :1; unsigned BSIM3palpha1Given :1; unsigned BSIM3pbeta0Given :1; unsigned BSIM3pvfbGiven :1; /* CV model */ unsigned BSIM3pelmGiven :1; unsigned BSIM3pcgslGiven :1; unsigned BSIM3pcgdlGiven :1; unsigned BSIM3pckappaGiven :1; unsigned BSIM3pcfGiven :1; unsigned BSIM3pclcGiven :1; unsigned BSIM3pcleGiven :1; unsigned BSIM3pvfbcvGiven :1; unsigned BSIM3pnoffGiven :1; unsigned BSIM3pvoffcvGiven :1; unsigned BSIM3pacdeGiven :1; unsigned BSIM3pmoinGiven :1; unsigned BSIM3useFringeGiven :1; unsigned BSIM3tnomGiven :1; unsigned BSIM3cgsoGiven :1; unsigned BSIM3cgdoGiven :1; unsigned BSIM3cgboGiven :1; unsigned BSIM3xpartGiven :1; unsigned BSIM3sheetResistanceGiven :1; unsigned BSIM3jctSatCurDensityGiven :1; unsigned BSIM3jctSidewallSatCurDensityGiven :1; unsigned BSIM3bulkJctPotentialGiven :1; unsigned BSIM3bulkJctBotGradingCoeffGiven :1; unsigned BSIM3sidewallJctPotentialGiven :1; unsigned BSIM3GatesidewallJctPotentialGiven :1; unsigned BSIM3bulkJctSideGradingCoeffGiven :1; unsigned BSIM3unitAreaJctCapGiven :1; unsigned BSIM3unitLengthSidewallJctCapGiven :1; unsigned BSIM3bulkJctGateSideGradingCoeffGiven :1; unsigned BSIM3unitLengthGateSidewallJctCapGiven :1; unsigned BSIM3jctEmissionCoeffGiven :1; unsigned BSIM3jctTempExponentGiven :1; unsigned BSIM3oxideTrapDensityAGiven :1; unsigned BSIM3oxideTrapDensityBGiven :1; unsigned BSIM3oxideTrapDensityCGiven :1; unsigned BSIM3emGiven :1; unsigned BSIM3efGiven :1; unsigned BSIM3afGiven :1; unsigned BSIM3kfGiven :1; unsigned BSIM3lintnoiGiven :1; unsigned BSIM3vgsMaxGiven :1; unsigned BSIM3vgdMaxGiven :1; unsigned BSIM3vgbMaxGiven :1; unsigned BSIM3vdsMaxGiven :1; unsigned BSIM3vbsMaxGiven :1; unsigned BSIM3vbdMaxGiven :1; unsigned BSIM3LintGiven :1; unsigned BSIM3LlGiven :1; unsigned BSIM3LlcGiven :1; unsigned BSIM3LlnGiven :1; unsigned BSIM3LwGiven :1; unsigned BSIM3LwcGiven :1; unsigned BSIM3LwnGiven :1; unsigned BSIM3LwlGiven :1; unsigned BSIM3LwlcGiven :1; unsigned BSIM3LminGiven :1; unsigned BSIM3LmaxGiven :1; unsigned BSIM3WintGiven :1; unsigned BSIM3WlGiven :1; unsigned BSIM3WlcGiven :1; unsigned BSIM3WlnGiven :1; unsigned BSIM3WwGiven :1; unsigned BSIM3WwcGiven :1; unsigned BSIM3WwnGiven :1; unsigned BSIM3WwlGiven :1; unsigned BSIM3WwlcGiven :1; unsigned BSIM3WminGiven :1; unsigned BSIM3WmaxGiven :1; } BSIM3model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM3_W 1 #define BSIM3_L 2 #define BSIM3_AS 3 #define BSIM3_AD 4 #define BSIM3_PS 5 #define BSIM3_PD 6 #define BSIM3_NRS 7 #define BSIM3_NRD 8 #define BSIM3_OFF 9 #define BSIM3_IC_VBS 10 #define BSIM3_IC_VDS 11 #define BSIM3_IC_VGS 12 #define BSIM3_IC 13 #define BSIM3_NQSMOD 14 #define BSIM3_ACNQSMOD 15 #define BSIM3_M 16 #define BSIM3_DELVTO 17 #define BSIM3_MULU0 18 #define BSIM3_GEO 19 /* model parameters */ #define BSIM3_MOD_CAPMOD 100 #define BSIM3_MOD_ACMMOD 101 #define BSIM3_MOD_CALCACM 102 #define BSIM3_MOD_MOBMOD 103 #define BSIM3_MOD_NOIMOD 104 #define BSIM3_MOD_TOX 105 #define BSIM3_MOD_CDSC 106 #define BSIM3_MOD_CDSCB 107 #define BSIM3_MOD_CIT 108 #define BSIM3_MOD_NFACTOR 109 #define BSIM3_MOD_XJ 110 #define BSIM3_MOD_VSAT 111 #define BSIM3_MOD_AT 112 #define BSIM3_MOD_A0 113 #define BSIM3_MOD_A1 114 #define BSIM3_MOD_A2 115 #define BSIM3_MOD_KETA 116 #define BSIM3_MOD_NSUB 117 #define BSIM3_MOD_NPEAK 118 #define BSIM3_MOD_NGATE 120 #define BSIM3_MOD_GAMMA1 121 #define BSIM3_MOD_GAMMA2 122 #define BSIM3_MOD_VBX 123 #define BSIM3_MOD_BINUNIT 124 #define BSIM3_MOD_VBM 125 #define BSIM3_MOD_XT 126 #define BSIM3_MOD_K1 129 #define BSIM3_MOD_KT1 130 #define BSIM3_MOD_KT1L 131 #define BSIM3_MOD_K2 132 #define BSIM3_MOD_KT2 133 #define BSIM3_MOD_K3 134 #define BSIM3_MOD_K3B 135 #define BSIM3_MOD_W0 136 #define BSIM3_MOD_NLX 137 #define BSIM3_MOD_DVT0 138 #define BSIM3_MOD_DVT1 139 #define BSIM3_MOD_DVT2 140 #define BSIM3_MOD_DVT0W 141 #define BSIM3_MOD_DVT1W 142 #define BSIM3_MOD_DVT2W 143 #define BSIM3_MOD_DROUT 144 #define BSIM3_MOD_DSUB 145 #define BSIM3_MOD_VTH0 146 #define BSIM3_MOD_UA 147 #define BSIM3_MOD_UA1 148 #define BSIM3_MOD_UB 149 #define BSIM3_MOD_UB1 150 #define BSIM3_MOD_UC 151 #define BSIM3_MOD_UC1 152 #define BSIM3_MOD_U0 153 #define BSIM3_MOD_UTE 154 #define BSIM3_MOD_VOFF 155 #define BSIM3_MOD_DELTA 156 #define BSIM3_MOD_RDSW 157 #define BSIM3_MOD_PRT 158 #define BSIM3_MOD_LDD 159 #define BSIM3_MOD_ETA 160 #define BSIM3_MOD_ETA0 161 #define BSIM3_MOD_ETAB 162 #define BSIM3_MOD_PCLM 163 #define BSIM3_MOD_PDIBL1 164 #define BSIM3_MOD_PDIBL2 165 #define BSIM3_MOD_PSCBE1 166 #define BSIM3_MOD_PSCBE2 167 #define BSIM3_MOD_PVAG 168 #define BSIM3_MOD_WR 169 #define BSIM3_MOD_DWG 170 #define BSIM3_MOD_DWB 171 #define BSIM3_MOD_B0 172 #define BSIM3_MOD_B1 173 #define BSIM3_MOD_ALPHA0 174 #define BSIM3_MOD_BETA0 175 #define BSIM3_MOD_PDIBLB 178 #define BSIM3_MOD_PRWG 179 #define BSIM3_MOD_PRWB 180 #define BSIM3_MOD_CDSCD 181 #define BSIM3_MOD_AGS 182 #define BSIM3_MOD_FRINGE 184 #define BSIM3_MOD_ELM 185 #define BSIM3_MOD_CGSL 186 #define BSIM3_MOD_CGDL 187 #define BSIM3_MOD_CKAPPA 188 #define BSIM3_MOD_CF 189 #define BSIM3_MOD_CLC 190 #define BSIM3_MOD_CLE 191 #define BSIM3_MOD_PARAMCHK 192 #define BSIM3_MOD_VERSION 193 #define BSIM3_MOD_VFBCV 194 #define BSIM3_MOD_ACDE 195 #define BSIM3_MOD_MOIN 196 #define BSIM3_MOD_NOFF 197 #define BSIM3_MOD_IJTH 198 #define BSIM3_MOD_ALPHA1 199 #define BSIM3_MOD_VFB 200 #define BSIM3_MOD_TOXM 201 #define BSIM3_MOD_TCJ 202 #define BSIM3_MOD_TCJSW 203 #define BSIM3_MOD_TCJSWG 204 #define BSIM3_MOD_TPB 205 #define BSIM3_MOD_TPBSW 206 #define BSIM3_MOD_TPBSWG 207 #define BSIM3_MOD_VOFFCV 208 #define BSIM3_MOD_LINTNOI 209 #define BSIM3_MOD_NQSMOD 210 #define BSIM3_MOD_ACNQSMOD 211 /* Length dependence */ #define BSIM3_MOD_LCDSC 251 #define BSIM3_MOD_LCDSCB 252 #define BSIM3_MOD_LCIT 253 #define BSIM3_MOD_LNFACTOR 254 #define BSIM3_MOD_LXJ 255 #define BSIM3_MOD_LVSAT 256 #define BSIM3_MOD_LAT 257 #define BSIM3_MOD_LA0 258 #define BSIM3_MOD_LA1 259 #define BSIM3_MOD_LA2 260 #define BSIM3_MOD_LKETA 261 #define BSIM3_MOD_LNSUB 262 #define BSIM3_MOD_LNPEAK 263 #define BSIM3_MOD_LNGATE 265 #define BSIM3_MOD_LGAMMA1 266 #define BSIM3_MOD_LGAMMA2 267 #define BSIM3_MOD_LVBX 268 #define BSIM3_MOD_LVBM 270 #define BSIM3_MOD_LXT 272 #define BSIM3_MOD_LK1 275 #define BSIM3_MOD_LKT1 276 #define BSIM3_MOD_LKT1L 277 #define BSIM3_MOD_LK2 278 #define BSIM3_MOD_LKT2 279 #define BSIM3_MOD_LK3 280 #define BSIM3_MOD_LK3B 281 #define BSIM3_MOD_LW0 282 #define BSIM3_MOD_LNLX 283 #define BSIM3_MOD_LDVT0 284 #define BSIM3_MOD_LDVT1 285 #define BSIM3_MOD_LDVT2 286 #define BSIM3_MOD_LDVT0W 287 #define BSIM3_MOD_LDVT1W 288 #define BSIM3_MOD_LDVT2W 289 #define BSIM3_MOD_LDROUT 290 #define BSIM3_MOD_LDSUB 291 #define BSIM3_MOD_LVTH0 292 #define BSIM3_MOD_LUA 293 #define BSIM3_MOD_LUA1 294 #define BSIM3_MOD_LUB 295 #define BSIM3_MOD_LUB1 296 #define BSIM3_MOD_LUC 297 #define BSIM3_MOD_LUC1 298 #define BSIM3_MOD_LU0 299 #define BSIM3_MOD_LUTE 300 #define BSIM3_MOD_LVOFF 301 #define BSIM3_MOD_LDELTA 302 #define BSIM3_MOD_LRDSW 303 #define BSIM3_MOD_LPRT 304 #define BSIM3_MOD_LLDD 305 #define BSIM3_MOD_LETA 306 #define BSIM3_MOD_LETA0 307 #define BSIM3_MOD_LETAB 308 #define BSIM3_MOD_LPCLM 309 #define BSIM3_MOD_LPDIBL1 310 #define BSIM3_MOD_LPDIBL2 311 #define BSIM3_MOD_LPSCBE1 312 #define BSIM3_MOD_LPSCBE2 313 #define BSIM3_MOD_LPVAG 314 #define BSIM3_MOD_LWR 315 #define BSIM3_MOD_LDWG 316 #define BSIM3_MOD_LDWB 317 #define BSIM3_MOD_LB0 318 #define BSIM3_MOD_LB1 319 #define BSIM3_MOD_LALPHA0 320 #define BSIM3_MOD_LBETA0 321 #define BSIM3_MOD_LPDIBLB 324 #define BSIM3_MOD_LPRWG 325 #define BSIM3_MOD_LPRWB 326 #define BSIM3_MOD_LCDSCD 327 #define BSIM3_MOD_LAGS 328 #define BSIM3_MOD_LFRINGE 331 #define BSIM3_MOD_LELM 332 #define BSIM3_MOD_LCGSL 333 #define BSIM3_MOD_LCGDL 334 #define BSIM3_MOD_LCKAPPA 335 #define BSIM3_MOD_LCF 336 #define BSIM3_MOD_LCLC 337 #define BSIM3_MOD_LCLE 338 #define BSIM3_MOD_LVFBCV 339 #define BSIM3_MOD_LACDE 340 #define BSIM3_MOD_LMOIN 341 #define BSIM3_MOD_LNOFF 342 #define BSIM3_MOD_LALPHA1 344 #define BSIM3_MOD_LVFB 345 #define BSIM3_MOD_LVOFFCV 346 /* Width dependence */ #define BSIM3_MOD_WCDSC 381 #define BSIM3_MOD_WCDSCB 382 #define BSIM3_MOD_WCIT 383 #define BSIM3_MOD_WNFACTOR 384 #define BSIM3_MOD_WXJ 385 #define BSIM3_MOD_WVSAT 386 #define BSIM3_MOD_WAT 387 #define BSIM3_MOD_WA0 388 #define BSIM3_MOD_WA1 389 #define BSIM3_MOD_WA2 390 #define BSIM3_MOD_WKETA 391 #define BSIM3_MOD_WNSUB 392 #define BSIM3_MOD_WNPEAK 393 #define BSIM3_MOD_WNGATE 395 #define BSIM3_MOD_WGAMMA1 396 #define BSIM3_MOD_WGAMMA2 397 #define BSIM3_MOD_WVBX 398 #define BSIM3_MOD_WVBM 400 #define BSIM3_MOD_WXT 402 #define BSIM3_MOD_WK1 405 #define BSIM3_MOD_WKT1 406 #define BSIM3_MOD_WKT1L 407 #define BSIM3_MOD_WK2 408 #define BSIM3_MOD_WKT2 409 #define BSIM3_MOD_WK3 410 #define BSIM3_MOD_WK3B 411 #define BSIM3_MOD_WW0 412 #define BSIM3_MOD_WNLX 413 #define BSIM3_MOD_WDVT0 414 #define BSIM3_MOD_WDVT1 415 #define BSIM3_MOD_WDVT2 416 #define BSIM3_MOD_WDVT0W 417 #define BSIM3_MOD_WDVT1W 418 #define BSIM3_MOD_WDVT2W 419 #define BSIM3_MOD_WDROUT 420 #define BSIM3_MOD_WDSUB 421 #define BSIM3_MOD_WVTH0 422 #define BSIM3_MOD_WUA 423 #define BSIM3_MOD_WUA1 424 #define BSIM3_MOD_WUB 425 #define BSIM3_MOD_WUB1 426 #define BSIM3_MOD_WUC 427 #define BSIM3_MOD_WUC1 428 #define BSIM3_MOD_WU0 429 #define BSIM3_MOD_WUTE 430 #define BSIM3_MOD_WVOFF 431 #define BSIM3_MOD_WDELTA 432 #define BSIM3_MOD_WRDSW 433 #define BSIM3_MOD_WPRT 434 #define BSIM3_MOD_WLDD 435 #define BSIM3_MOD_WETA 436 #define BSIM3_MOD_WETA0 437 #define BSIM3_MOD_WETAB 438 #define BSIM3_MOD_WPCLM 439 #define BSIM3_MOD_WPDIBL1 440 #define BSIM3_MOD_WPDIBL2 441 #define BSIM3_MOD_WPSCBE1 442 #define BSIM3_MOD_WPSCBE2 443 #define BSIM3_MOD_WPVAG 444 #define BSIM3_MOD_WWR 445 #define BSIM3_MOD_WDWG 446 #define BSIM3_MOD_WDWB 447 #define BSIM3_MOD_WB0 448 #define BSIM3_MOD_WB1 449 #define BSIM3_MOD_WALPHA0 450 #define BSIM3_MOD_WBETA0 451 #define BSIM3_MOD_WPDIBLB 454 #define BSIM3_MOD_WPRWG 455 #define BSIM3_MOD_WPRWB 456 #define BSIM3_MOD_WCDSCD 457 #define BSIM3_MOD_WAGS 458 #define BSIM3_MOD_WFRINGE 461 #define BSIM3_MOD_WELM 462 #define BSIM3_MOD_WCGSL 463 #define BSIM3_MOD_WCGDL 464 #define BSIM3_MOD_WCKAPPA 465 #define BSIM3_MOD_WCF 466 #define BSIM3_MOD_WCLC 467 #define BSIM3_MOD_WCLE 468 #define BSIM3_MOD_WVFBCV 469 #define BSIM3_MOD_WACDE 470 #define BSIM3_MOD_WMOIN 471 #define BSIM3_MOD_WNOFF 472 #define BSIM3_MOD_WALPHA1 474 #define BSIM3_MOD_WVFB 475 #define BSIM3_MOD_WVOFFCV 476 /* Cross-term dependence */ #define BSIM3_MOD_PCDSC 511 #define BSIM3_MOD_PCDSCB 512 #define BSIM3_MOD_PCIT 513 #define BSIM3_MOD_PNFACTOR 514 #define BSIM3_MOD_PXJ 515 #define BSIM3_MOD_PVSAT 516 #define BSIM3_MOD_PAT 517 #define BSIM3_MOD_PA0 518 #define BSIM3_MOD_PA1 519 #define BSIM3_MOD_PA2 520 #define BSIM3_MOD_PKETA 521 #define BSIM3_MOD_PNSUB 522 #define BSIM3_MOD_PNPEAK 523 #define BSIM3_MOD_PNGATE 525 #define BSIM3_MOD_PGAMMA1 526 #define BSIM3_MOD_PGAMMA2 527 #define BSIM3_MOD_PVBX 528 #define BSIM3_MOD_PVBM 530 #define BSIM3_MOD_PXT 532 #define BSIM3_MOD_PK1 535 #define BSIM3_MOD_PKT1 536 #define BSIM3_MOD_PKT1L 537 #define BSIM3_MOD_PK2 538 #define BSIM3_MOD_PKT2 539 #define BSIM3_MOD_PK3 540 #define BSIM3_MOD_PK3B 541 #define BSIM3_MOD_PW0 542 #define BSIM3_MOD_PNLX 543 #define BSIM3_MOD_PDVT0 544 #define BSIM3_MOD_PDVT1 545 #define BSIM3_MOD_PDVT2 546 #define BSIM3_MOD_PDVT0W 547 #define BSIM3_MOD_PDVT1W 548 #define BSIM3_MOD_PDVT2W 549 #define BSIM3_MOD_PDROUT 550 #define BSIM3_MOD_PDSUB 551 #define BSIM3_MOD_PVTH0 552 #define BSIM3_MOD_PUA 553 #define BSIM3_MOD_PUA1 554 #define BSIM3_MOD_PUB 555 #define BSIM3_MOD_PUB1 556 #define BSIM3_MOD_PUC 557 #define BSIM3_MOD_PUC1 558 #define BSIM3_MOD_PU0 559 #define BSIM3_MOD_PUTE 560 #define BSIM3_MOD_PVOFF 561 #define BSIM3_MOD_PDELTA 562 #define BSIM3_MOD_PRDSW 563 #define BSIM3_MOD_PPRT 564 #define BSIM3_MOD_PLDD 565 #define BSIM3_MOD_PETA 566 #define BSIM3_MOD_PETA0 567 #define BSIM3_MOD_PETAB 568 #define BSIM3_MOD_PPCLM 569 #define BSIM3_MOD_PPDIBL1 570 #define BSIM3_MOD_PPDIBL2 571 #define BSIM3_MOD_PPSCBE1 572 #define BSIM3_MOD_PPSCBE2 573 #define BSIM3_MOD_PPVAG 574 #define BSIM3_MOD_PWR 575 #define BSIM3_MOD_PDWG 576 #define BSIM3_MOD_PDWB 577 #define BSIM3_MOD_PB0 578 #define BSIM3_MOD_PB1 579 #define BSIM3_MOD_PALPHA0 580 #define BSIM3_MOD_PBETA0 581 #define BSIM3_MOD_PPDIBLB 584 #define BSIM3_MOD_PPRWG 585 #define BSIM3_MOD_PPRWB 586 #define BSIM3_MOD_PCDSCD 587 #define BSIM3_MOD_PAGS 588 #define BSIM3_MOD_PFRINGE 591 #define BSIM3_MOD_PELM 592 #define BSIM3_MOD_PCGSL 593 #define BSIM3_MOD_PCGDL 594 #define BSIM3_MOD_PCKAPPA 595 #define BSIM3_MOD_PCF 596 #define BSIM3_MOD_PCLC 597 #define BSIM3_MOD_PCLE 598 #define BSIM3_MOD_PVFBCV 599 #define BSIM3_MOD_PACDE 600 #define BSIM3_MOD_PMOIN 601 #define BSIM3_MOD_PNOFF 602 #define BSIM3_MOD_PALPHA1 604 #define BSIM3_MOD_PVFB 605 #define BSIM3_MOD_PVOFFCV 606 #define BSIM3_MOD_TNOM 651 #define BSIM3_MOD_CGSO 652 #define BSIM3_MOD_CGDO 653 #define BSIM3_MOD_CGBO 654 #define BSIM3_MOD_XPART 655 #define BSIM3_MOD_RSH 656 #define BSIM3_MOD_JS 657 #define BSIM3_MOD_PB 658 #define BSIM3_MOD_MJ 659 #define BSIM3_MOD_PBSW 660 #define BSIM3_MOD_MJSW 661 #define BSIM3_MOD_CJ 662 #define BSIM3_MOD_CJSW 663 #define BSIM3_MOD_NMOS 664 #define BSIM3_MOD_PMOS 665 #define BSIM3_MOD_NOIA 666 #define BSIM3_MOD_NOIB 667 #define BSIM3_MOD_NOIC 668 #define BSIM3_MOD_LINT 669 #define BSIM3_MOD_LL 670 #define BSIM3_MOD_LLN 671 #define BSIM3_MOD_LW 672 #define BSIM3_MOD_LWN 673 #define BSIM3_MOD_LWL 674 #define BSIM3_MOD_LMIN 675 #define BSIM3_MOD_LMAX 676 #define BSIM3_MOD_WINT 677 #define BSIM3_MOD_WL 678 #define BSIM3_MOD_WLN 679 #define BSIM3_MOD_WW 680 #define BSIM3_MOD_WWN 681 #define BSIM3_MOD_WWL 682 #define BSIM3_MOD_WMIN 683 #define BSIM3_MOD_WMAX 684 #define BSIM3_MOD_DWC 685 #define BSIM3_MOD_DLC 686 #define BSIM3_MOD_EM 687 #define BSIM3_MOD_EF 688 #define BSIM3_MOD_AF 689 #define BSIM3_MOD_KF 690 #define BSIM3_MOD_NJ 691 #define BSIM3_MOD_XTI 692 #define BSIM3_MOD_PBSWG 693 #define BSIM3_MOD_MJSWG 694 #define BSIM3_MOD_CJSWG 695 #define BSIM3_MOD_JSW 696 #define BSIM3_MOD_LLC 697 #define BSIM3_MOD_LWC 698 #define BSIM3_MOD_LWLC 699 #define BSIM3_MOD_WLC 700 #define BSIM3_MOD_WWC 701 #define BSIM3_MOD_WWLC 702 /* ACM parameters */ #define BSIM3_MOD_XL 703 #define BSIM3_MOD_XW 704 #define BSIM3_MOD_HDIF 711 #define BSIM3_MOD_LDIF 712 #define BSIM3_MOD_LD 713 #define BSIM3_MOD_RD 714 #define BSIM3_MOD_RS 715 #define BSIM3_MOD_RDC 716 #define BSIM3_MOD_RSC 717 #define BSIM3_MOD_WMLT 718 /* device questions */ #define BSIM3_DNODE 751 #define BSIM3_GNODE 752 #define BSIM3_SNODE 753 #define BSIM3_BNODE 754 #define BSIM3_DNODEPRIME 755 #define BSIM3_SNODEPRIME 756 #define BSIM3_VBD 757 #define BSIM3_VBS 758 #define BSIM3_VGS 759 #define BSIM3_VDS 760 #define BSIM3_CD 761 #define BSIM3_CBS 762 #define BSIM3_CBD 763 #define BSIM3_GM 764 #define BSIM3_GDS 765 #define BSIM3_GMBS 766 #define BSIM3_GBD 767 #define BSIM3_GBS 768 #define BSIM3_QB 769 #define BSIM3_CQB 770 #define BSIM3_QG 771 #define BSIM3_CQG 772 #define BSIM3_QD 773 #define BSIM3_CQD 774 #define BSIM3_CGG 775 #define BSIM3_CGD 776 #define BSIM3_CGS 777 #define BSIM3_CBG 778 #define BSIM3_CAPBD 779 #define BSIM3_CQBD 780 #define BSIM3_CAPBS 781 #define BSIM3_CQBS 782 #define BSIM3_CDG 783 #define BSIM3_CDD 784 #define BSIM3_CDS 785 #define BSIM3_VON 786 #define BSIM3_VDSAT 787 #define BSIM3_QBS 788 #define BSIM3_QBD 789 #define BSIM3_SOURCECONDUCT 790 #define BSIM3_DRAINCONDUCT 791 #define BSIM3_CBDB 792 #define BSIM3_CBSB 793 #define BSIM3_MOD_VGS_MAX 801 #define BSIM3_MOD_VGD_MAX 802 #define BSIM3_MOD_VGB_MAX 803 #define BSIM3_MOD_VDS_MAX 804 #define BSIM3_MOD_VBS_MAX 805 #define BSIM3_MOD_VBD_MAX 806 #include "bsim3ext.h" extern void BSIM3evaluate(double,double,double,BSIM3instance*,BSIM3model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM3debug(BSIM3model*, BSIM3instance*, CKTcircuit*, int); extern int BSIM3checkModel(BSIM3model*, BSIM3instance*, CKTcircuit*); #endif /*BSIM3*/ ngspice-26/src/spicelib/devices/bsim3/ChangeLog0000644000265600020320000000012412264261473021020 0ustar andreasadmin1999-09-06 Arno Peters * b3ld.c: Removed unused variable. ngspice-26/src/spicelib/devices/bsim3/Makefile.am0000644000265600020320000000106412264261473021306 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3.la libbsim3_la_SOURCES = \ b3.c \ b3acld.c \ b3ask.c \ b3check.c \ b3cvtest.c \ b3del.c \ b3dest.c \ b3getic.c \ b3ld.c \ b3mask.c \ b3mdel.c \ b3mpar.c \ b3noi.c \ b3par.c \ b3pzld.c \ b3set.c \ b3soachk.c \ b3temp.c \ b3trunc.c \ bsim3def.h \ bsim3ext.h \ bsim3init.c \ bsim3init.h \ bsim3itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B3TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim3/Makefile.in0000644000265600020320000004333112264261535021321 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3_la_LIBADD = am_libbsim3_la_OBJECTS = b3.lo b3acld.lo b3ask.lo b3check.lo \ b3cvtest.lo b3del.lo b3dest.lo b3getic.lo b3ld.lo b3mask.lo \ b3mdel.lo b3mpar.lo b3noi.lo b3par.lo b3pzld.lo b3set.lo \ b3soachk.lo b3temp.lo b3trunc.lo bsim3init.lo libbsim3_la_OBJECTS = $(am_libbsim3_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3_la_SOURCES) DIST_SOURCES = $(libbsim3_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3.la libbsim3_la_SOURCES = \ b3.c \ b3acld.c \ b3ask.c \ b3check.c \ b3cvtest.c \ b3del.c \ b3dest.c \ b3getic.c \ b3ld.c \ b3mask.c \ b3mdel.c \ b3mpar.c \ b3noi.c \ b3par.c \ b3pzld.c \ b3set.c \ b3soachk.c \ b3temp.c \ b3trunc.c \ bsim3def.h \ bsim3ext.h \ bsim3init.c \ bsim3init.h \ bsim3itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B3TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3.la: $(libbsim3_la_OBJECTS) $(libbsim3_la_DEPENDENCIES) $(EXTRA_libbsim3_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3_la_OBJECTS) $(libbsim3_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim3init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3/bsim3itf.h0000644000265600020320000000036312264261473021144 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. File: bsim3itf.h **********/ #ifndef DEV_BSIM3 #define DEV_BSIM3 SPICEdev *get_bsim3_info(void); #endif ngspice-26/src/spicelib/devices/bsim3/b3mdel.c0000644000265600020320000000223012264261473020560 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3mdel.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM3model **model = (BSIM3model**)inModel; BSIM3model *modfast = (BSIM3model*)kill; BSIM3instance *here; BSIM3instance *prev = NULL; BSIM3model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM3nextModel)) { if ((*model)->BSIM3modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM3nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM3instances; here; here = here->BSIM3nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3cvtest.c0000644000265600020320000000703712264261473021161 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3cvtest.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3convTest( GENmodel *inModel, CKTcircuit *ckt) { BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the BSIM3 device models */ for (; model != NULL; model = model->BSIM3nextModel) { /* loop through all the instances of the model */ for (here = model->BSIM3instances; here != NULL ; here=here->BSIM3nextInstance) { vbs = model->BSIM3type * (*(ckt->CKTrhsOld+here->BSIM3bNode) - *(ckt->CKTrhsOld+here->BSIM3sNodePrime)); vgs = model->BSIM3type * (*(ckt->CKTrhsOld+here->BSIM3gNode) - *(ckt->CKTrhsOld+here->BSIM3sNodePrime)); vds = model->BSIM3type * (*(ckt->CKTrhsOld+here->BSIM3dNodePrime) - *(ckt->CKTrhsOld+here->BSIM3sNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3vgs) - *(ckt->CKTstate0 + here->BSIM3vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds); delvgd = vgd-vgdo; cd = here->BSIM3cd - here->BSIM3cbd; if (here->BSIM3mode >= 0) { cd += here->BSIM3csub; cdhat = cd - here->BSIM3gbd * delvbd + (here->BSIM3gmbs + here->BSIM3gbbs) * delvbs + (here->BSIM3gm + here->BSIM3gbgs) * delvgs + (here->BSIM3gds + here->BSIM3gbds) * delvds; } else { cdhat = cd + (here->BSIM3gmbs - here->BSIM3gbd) * delvbd + here->BSIM3gm * delvgd - here->BSIM3gds * delvds; } /* * check convergence */ if ((here->BSIM3off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->BSIM3cbs; cbd = here->BSIM3cbd; if (here->BSIM3mode >= 0) { cbhat = cbs + cbd - here->BSIM3csub + here->BSIM3gbd * delvbd + (here->BSIM3gbs - here->BSIM3gbbs) * delvbs - here->BSIM3gbgs * delvgs - here->BSIM3gbds * delvds; } else { cbhat = cbs + cbd - here->BSIM3csub + here->BSIM3gbs * delvbs + (here->BSIM3gbd - here->BSIM3gbbs) * delvbd - here->BSIM3gbgs * delvgd + here->BSIM3gbds * delvds; } tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd - here->BSIM3csub)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd - here->BSIM3csub)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3ld.c0000644000265600020320000040727212264261473020255 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /**** OpenMP support for ngspice by Holger Vogt 06/28/2010 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3ld.c of BSIM3v3.3.0 * Author: 1991 JianHui Huang and Min-Chie Jeng. * Modified by Mansun Chan (1995). * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/21, 2001. * Modified by Xuemei Xi, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #ifdef USE_OMP int BSIM3LoadOMP(BSIM3instance *here, CKTcircuit *ckt); void BSIM3LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt); #endif int BSIM3load( GENmodel *inModel, CKTcircuit *ckt) { #ifdef USE_OMP int idx; BSIM3model *model = (BSIM3model*)inModel; int good = 0; BSIM3instance *here; BSIM3instance **InstArray; InstArray = model->BSIM3InstanceArray; #pragma omp parallel for private(here) for (idx = 0; idx < model->BSIM3InstCount; idx++) { here = InstArray[idx]; good = BSIM3LoadOMP(here, ckt); } BSIM3LoadRhsMat(inModel, ckt); return good; } int BSIM3LoadOMP(BSIM3instance *here, CKTcircuit *ckt) { BSIM3model *model; #else BSIM3model *model = (BSIM3model*)inModel; BSIM3instance *here; #endif double SourceSatCurrent, DrainSatCurrent; double ag0, qgd, qgs, qgb, von, cbhat, VgstNVt, ExpVgst; double cdrain, cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; #ifndef NEWCONV double tol; #endif double gcsgb, gcssb, MJ, MJSW, MJSWG; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double qgate=0.0, qbulk=0.0, qdrn=0.0, qsrc, qinoi, cqgate, cqbulk, cqdrn; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtm; double Vtm; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double ExpArg, V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg, VgDP, dVgDP_dVg; double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVg, dCoxeff_dVd, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4; double T5; double T6; double T7; double T8; double T9; double T10; double T11, T12; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot, Ibtot; #ifndef NOBYPASS double tempv; #endif double a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double qcheq=0.0, qdef, gqdef=0.0, cqdef, cqcheq, gtau_diff, gtau_drift; double gcqdb=0.0,gcqsb=0.0,gcqgb=0.0,gcqbb=0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double m; struct bsim3SizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded, error; /* double junk[50]; */ #ifdef USE_OMP model = here->BSIM3modPtr; #endif ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEDCTRANCURVE | MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; #ifndef USE_OMP for (; model != NULL; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here != NULL; here = here->BSIM3nextInstance) { #endif Check = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->BSIM3vbs); vgs = *(ckt->CKTstate0 + here->BSIM3vgs); vds = *(ckt->CKTstate0 + here->BSIM3vds); qdef = *(ckt->CKTstate0 + here->BSIM3qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->BSIM3vbs); vgs = *(ckt->CKTstate1 + here->BSIM3vgs); vds = *(ckt->CKTstate1 + here->BSIM3vds); qdef = *(ckt->CKTstate1 + here->BSIM3qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM3off) { vds = model->BSIM3type * here->BSIM3icVDS; vgs = model->BSIM3type * here->BSIM3icVGS; vbs = model->BSIM3type * here->BSIM3icVBS; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = model->BSIM3type * here->BSIM3vth0 + 0.1; vds = 0.1; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM3off)) { qdef = vbs = vgs = vds = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM3vbs) = *(ckt->CKTstate1 + here->BSIM3vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3vbs))); *(ckt->CKTstate0 + here->BSIM3vgs) = *(ckt->CKTstate1 + here->BSIM3vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3vgs))); *(ckt->CKTstate0 + here->BSIM3vds) = *(ckt->CKTstate1 + here->BSIM3vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3vds))); *(ckt->CKTstate0 + here->BSIM3vbd) = *(ckt->CKTstate0 + here->BSIM3vbs) - *(ckt->CKTstate0 + here->BSIM3vds); *(ckt->CKTstate0 + here->BSIM3qdef) = *(ckt->CKTstate1 + here->BSIM3qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM3qdef))); } else { #endif /* PREDICTOR */ vbs = model->BSIM3type * (*(ckt->CKTrhsOld + here->BSIM3bNode) - *(ckt->CKTrhsOld + here->BSIM3sNodePrime)); vgs = model->BSIM3type * (*(ckt->CKTrhsOld + here->BSIM3gNode) - *(ckt->CKTrhsOld + here->BSIM3sNodePrime)); vds = model->BSIM3type * (*(ckt->CKTrhsOld + here->BSIM3dNodePrime) - *(ckt->CKTrhsOld + here->BSIM3sNodePrime)); qdef = model->BSIM3type * (*(ckt->CKTrhsOld + here->BSIM3qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3vgs) - *(ckt->CKTstate0 + here->BSIM3vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3vds); delvgd = vgd - vgdo; if (here->BSIM3mode >= 0) { Idtot = here->BSIM3cd + here->BSIM3csub - here->BSIM3cbd; cdhat = Idtot - here->BSIM3gbd * delvbd + (here->BSIM3gmbs + here->BSIM3gbbs) * delvbs + (here->BSIM3gm + here->BSIM3gbgs) * delvgs + (here->BSIM3gds + here->BSIM3gbds) * delvds; Ibtot = here->BSIM3cbs + here->BSIM3cbd - here->BSIM3csub; cbhat = Ibtot + here->BSIM3gbd * delvbd + (here->BSIM3gbs - here->BSIM3gbbs) * delvbs - here->BSIM3gbgs * delvgs - here->BSIM3gbds * delvds; } else { Idtot = here->BSIM3cd - here->BSIM3cbd; cdhat = Idtot - (here->BSIM3gbd - here->BSIM3gmbs) * delvbd + here->BSIM3gm * delvgd - here->BSIM3gds * delvds; Ibtot = here->BSIM3cbs + here->BSIM3cbd - here->BSIM3csub; cbhat = Ibtot + here->BSIM3gbs * delvbs + (here->BSIM3gbd - here->BSIM3gbbs) * delvbd - here->BSIM3gbgs * delvgd + here->BSIM3gbds * delvds; } #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->BSIM3vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->BSIM3vbd))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->BSIM3vgs))) + ckt->CKTvoltTol))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->BSIM3vds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(Idtot)) + ckt->CKTabstol)) { tempv = MAX(fabs(cbhat),fabs(Ibtot)) + ckt->CKTabstol; if ((fabs(cbhat - Ibtot)) < ckt->CKTreltol * tempv) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->BSIM3vbs); vbd = *(ckt->CKTstate0 + here->BSIM3vbd); vgs = *(ckt->CKTstate0 + here->BSIM3vgs); vds = *(ckt->CKTstate0 + here->BSIM3vds); qdef = *(ckt->CKTstate0 + here->BSIM3qdef); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->BSIM3cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM3qgate; qbulk = here->BSIM3qbulk; qdrn = here->BSIM3qdrn; goto line755; } else { goto line850; } } } #endif /*NOBYPASS*/ von = here->BSIM3von; if (*(ckt->CKTstate0 + here->BSIM3vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0+here->BSIM3vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM3vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0+here->BSIM3vds))); vgs = vgd + vds; } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM3vbs), CONSTvt0, model->BSIM3vcrit, &Check); vbd = vbs - vds; } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM3vbd), CONSTvt0, model->BSIM3vcrit, &Check); vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* Source/drain junction diode DC model begins */ Nvtm = model->BSIM3vtm * model->BSIM3jctEmissionCoeff; /* acm model */ if (model->BSIM3acmMod == 0) { if ((here->BSIM3sourceArea <= 0.0) && (here->BSIM3sourcePerimeter <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM3sourceArea * model->BSIM3jctTempSatCurDensity + here->BSIM3sourcePerimeter * model->BSIM3jctSidewallTempSatCurDensity; } if ((here->BSIM3drainArea <= 0.0) && (here->BSIM3drainPerimeter <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM3drainArea * model->BSIM3jctTempSatCurDensity + here->BSIM3drainPerimeter * model->BSIM3jctSidewallTempSatCurDensity; } } else { error = ACM_saturationCurrents( model->BSIM3acmMod, model->BSIM3calcacm, here->BSIM3geo, model->BSIM3hdif, model->BSIM3wmlt, here->BSIM3w, model->BSIM3xw, model->BSIM3jctTempSatCurDensity, model->BSIM3jctSidewallTempSatCurDensity, here->BSIM3drainAreaGiven, here->BSIM3drainArea, here->BSIM3drainPerimeterGiven, here->BSIM3drainPerimeter, here->BSIM3sourceAreaGiven, here->BSIM3sourceArea, here->BSIM3sourcePerimeterGiven, here->BSIM3sourcePerimeter, &DrainSatCurrent, &SourceSatCurrent ); if (error) return(error); } if (SourceSatCurrent <= 0.0) { here->BSIM3gbs = ckt->CKTgmin; here->BSIM3cbs = here->BSIM3gbs * vbs; } else { if (model->BSIM3ijth == 0.0) { evbs = exp(vbs / Nvtm); here->BSIM3gbs = SourceSatCurrent * evbs / Nvtm + ckt->CKTgmin; here->BSIM3cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { if (vbs < here->BSIM3vjsm) { evbs = exp(vbs / Nvtm); here->BSIM3gbs = SourceSatCurrent * evbs / Nvtm + ckt->CKTgmin; here->BSIM3cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { T0 = here->BSIM3IsEvjsm / Nvtm; here->BSIM3gbs = T0 + ckt->CKTgmin; here->BSIM3cbs = here->BSIM3IsEvjsm - SourceSatCurrent + T0 * (vbs - here->BSIM3vjsm) + ckt->CKTgmin * vbs; } } } if (DrainSatCurrent <= 0.0) { here->BSIM3gbd = ckt->CKTgmin; here->BSIM3cbd = here->BSIM3gbd * vbd; } else { if (model->BSIM3ijth == 0.0) { evbd = exp(vbd / Nvtm); here->BSIM3gbd = DrainSatCurrent * evbd / Nvtm + ckt->CKTgmin; here->BSIM3cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { if (vbd < here->BSIM3vjdm) { evbd = exp(vbd / Nvtm); here->BSIM3gbd = DrainSatCurrent * evbd / Nvtm + ckt->CKTgmin; here->BSIM3cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { T0 = here->BSIM3IsEvjdm / Nvtm; here->BSIM3gbd = T0 + ckt->CKTgmin; here->BSIM3cbd = here->BSIM3IsEvjdm - DrainSatCurrent + T0 * (vbd - here->BSIM3vjdm) + ckt->CKTgmin * vbd; } } } /* End of diode DC model */ if (vds >= 0.0) { /* normal mode */ here->BSIM3mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; } else { /* inverse mode */ here->BSIM3mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; } T0 = Vbs - pParam->BSIM3vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * pParam->BSIM3vbsc); Vbseff = pParam->BSIM3vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); if (Vbseff < Vbs) { Vbseff = Vbs; } if (Vbseff > 0.0) { T0 = pParam->BSIM3phi / (pParam->BSIM3phi + Vbseff); Phis = pParam->BSIM3phi * T0; dPhis_dVb = -T0 * T0; sqrtPhis = pParam->BSIM3phis3 / (pParam->BSIM3phi + 0.5 * Vbseff); dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis / pParam->BSIM3phis3; } else { Phis = pParam->BSIM3phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; } Xdep = pParam->BSIM3Xdep0 * sqrtPhis / pParam->BSIM3sqrtPhi; dXdep_dVb = (pParam->BSIM3Xdep0 / pParam->BSIM3sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM3leff; Vtm = model->BSIM3vtm; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM3vbi - pParam->BSIM3phi; T0 = pParam->BSIM3dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3dvt2; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3dvt2 * T4 * T4; } lt1 = model->BSIM3factor1 * T3 * T1; dlt1_dVb = model->BSIM3factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM3dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3dvt2w; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3dvt2w * T4 * T4; } ltw = model->BSIM3factor1 * T3 * T1; dltw_dVb = model->BSIM3factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->BSIM3dvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->BSIM3thetavth = pParam->BSIM3dvt0 * Theta0; Delt_vth = here->BSIM3thetavth * V0; dDelt_vth_dVb = pParam->BSIM3dvt0 * dTheta0_dVb * V0; T0 = -0.5 * pParam->BSIM3dvt1w * pParam->BSIM3weff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->BSIM3dvt0w * T2; T2 = T0 * V0; dT2_dVb = pParam->BSIM3dvt0w * dT2_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM3tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM3nlx / Leff); T1 = pParam->BSIM3k1ox * (T0 - 1.0) * pParam->BSIM3sqrtPhi + (pParam->BSIM3kt1 + pParam->BSIM3kt1l / Leff + pParam->BSIM3kt2 * Vbseff) * TempRatio; tmp2 = model->BSIM3tox * pParam->BSIM3phi / (pParam->BSIM3weff + pParam->BSIM3w0); T3 = pParam->BSIM3eta0 + pParam->BSIM3etab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM3theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Vth = model->BSIM3type * here->BSIM3vth0 - pParam->BSIM3k1 * pParam->BSIM3sqrtPhi + pParam->BSIM3k1ox * sqrtPhis - pParam->BSIM3k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM3k3 + pParam->BSIM3k3b * Vbseff) * tmp2 + T1 - DIBL_Sft; here->BSIM3von = Vth; dVth_dVb = pParam->BSIM3k1ox * dsqrtPhis_dVb - pParam->BSIM3k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM3k3b * tmp2 - pParam->BSIM3etab * Vds * pParam->BSIM3theta0vb0 * T4 + pParam->BSIM3kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp2 = pParam->BSIM3nfactor * EPSSI / Xdep; tmp3 = pParam->BSIM3cdsc + pParam->BSIM3cdscb * Vbseff + pParam->BSIM3cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM3cit) / model->BSIM3cox; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3cdscb * Theta0) / model->BSIM3cox; dn_dVd = pParam->BSIM3cdscd * Theta0 / model->BSIM3cox; } else /* avoid discontinuity problems caused by tmp4 */ { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3cdscb * Theta0) / model->BSIM3cox * T0; dn_dVd = pParam->BSIM3cdscd * Theta0 / model->BSIM3cox * T0; } /* Poly Gate Si Depletion Effect */ T0 = here->BSIM3vfb + pParam->BSIM3phi; if ((pParam->BSIM3ngate > 1.e18) && (pParam->BSIM3ngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->BSIM3ngate / (model->BSIM3cox * model->BSIM3cox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Vgst = Vgs_eff - Vth; /* Effective Vgst (Vgsteff) Calculation */ T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->BSIM3voff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (ExpArg > EXP_THRESHOLD) { T0 = (Vgst - pParam->BSIM3voff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->BSIM3cdep0 / model->BSIM3cox * ExpVgst; dVgsteff_dVg = Vgsteff / (n * Vtm); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + T0 * Vtm * dn_dVd); dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg *= dVgs_eff_dVg; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; dT2_dVg = -model->BSIM3cox / (Vtm * pParam->BSIM3cdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; Vgsteff = T1 / T2; T3 = T2 * T2; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; } here->BSIM3Vgsteff = Vgsteff; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM3sqrtPhi; Weff = pParam->BSIM3weff - 2.0 * (pParam->BSIM3dwg * Vgsteff + pParam->BSIM3dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM3dwg; dWeff_dVb = -2.0 * pParam->BSIM3dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->BSIM3prwg * Vgsteff + pParam->BSIM3prwb * T9; if (T0 >= -0.9) { Rds = pParam->BSIM3rds0 * (1.0 + T0); dRds_dVg = pParam->BSIM3rds0 * pParam->BSIM3prwg; dRds_dVb = pParam->BSIM3rds0 * pParam->BSIM3prwb * dsqrtPhis_dVb; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = pParam->BSIM3rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = pParam->BSIM3rds0 * pParam->BSIM3prwg * T1; dRds_dVb = pParam->BSIM3rds0 * pParam->BSIM3prwb * dsqrtPhis_dVb * T1; } here->BSIM3rds = Rds; /* Noise Bugfix */ /* Calculate Abulk */ T1 = 0.5 * pParam->BSIM3k1ox / sqrtPhis; dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM3xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM3a0 * T5; tmp3 = pParam->BSIM3weff + pParam->BSIM3b1; tmp4 = pParam->BSIM3b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM3ags * pParam->BSIM3a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) /* added to avoid the problems caused by Abulk */ { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } here->BSIM3Abulk = Abulk; T2 = pParam->BSIM3keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM3keta * T0 * T0; } else /* added to avoid the problems caused by Keta */ { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM3keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM3mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM3ua + pParam->BSIM3uc * Vbseff; T3 = T0 / model->BSIM3tox; T5 = T3 * (T2 + pParam->BSIM3ub * T3); dDenomi_dVg = (T2 + 2.0 * pParam->BSIM3ub * T3) / model->BSIM3tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3uc * T3; } else if (model->BSIM3mobMod == 2) { T5 = Vgsteff / model->BSIM3tox * (pParam->BSIM3ua + pParam->BSIM3uc * Vbseff + pParam->BSIM3ub * Vgsteff / model->BSIM3tox); dDenomi_dVg = (pParam->BSIM3ua + pParam->BSIM3uc * Vbseff + 2.0 * pParam->BSIM3ub * Vgsteff / model->BSIM3tox) / model->BSIM3tox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * pParam->BSIM3uc / model->BSIM3tox; } else { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM3uc * Vbseff; T3 = T0 / model->BSIM3tox; T4 = T3 * (pParam->BSIM3ua + pParam->BSIM3ub * T3); T5 = T4 * T2; dDenomi_dVg = (pParam->BSIM3ua + 2.0 * pParam->BSIM3ub * T3) * T2 / model->BSIM3tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3uc * T4; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM3ueff = ueff = here->BSIM3u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * pParam->BSIM3vsattemp * model->BSIM3cox; WVCoxRds = WVCox * Rds; Esat = 2.0 * pParam->BSIM3vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM3a1; if (a1 == 0.0) { Lambda = pParam->BSIM3a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->BSIM3a2; T1 = T0 - pParam->BSIM3a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM3a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM3a2 + pParam->BSIM3a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM3a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; here->BSIM3AbovVgst2Vtm = Abulk / Vgst2Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM3vdsat = Vdsat; /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->BSIM3delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM3delta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->BSIM3delta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); /* Added to eliminate non-zero Vdseff at Vds=0.0 */ if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; here->BSIM3Vdseff = Vdseff; /* Calculate VACLM */ if ((pParam->BSIM3pclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->BSIM3pclm * Abulk * pParam->BSIM3litl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg = -T0 / Abulk * dAbulk_dVg; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg); dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM3thetaRout > 0.0) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM3thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM3pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM3pdiblb) * T3; dVADIBL_dVd *= T3; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM3pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate VA */ T8 = pParam->BSIM3pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; /* Calculate VASCBE */ if (pParam->BSIM3pscbe2 > 0.0) { if (diffVds > pParam->BSIM3pscbe1 * pParam->BSIM3litl / EXP_THRESHOLD) { T0 = pParam->BSIM3pscbe1 * pParam->BSIM3litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM3pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM3pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Calculate Ids */ CoxWovL = model->BSIM3cox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; T9 = diffVds / Va; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; Gds += Gm * dVgsteff_dVd; Gmb += Gm * dVgsteff_dVb; Gm *= dVgsteff_dVg; Gmb *= dVbseff_dVb; /* Substrate current begins */ tmp = pParam->BSIM3alpha0 + pParam->BSIM3alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM3beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM3beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM3beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } Isub = T1 * Idsa; Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg; Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd; Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; /* bug fixing */ } cdrain = Ids; here->BSIM3gds = Gds; here->BSIM3gm = Gm; here->BSIM3gmbs = Gmb; here->BSIM3gbbs = Gbb; here->BSIM3gbgs = Gbg; here->BSIM3gbds = Gbd; here->BSIM3csub = Isub; /* BSIM3 thermal noise Qinv calculated from all capMod * 0, 1, 2 & 3 stored in here->BSIM3qinv 1/1998 */ if ((model->BSIM3xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM3cggb = here->BSIM3cgsb = here->BSIM3cgdb = 0.0; here->BSIM3cdgb = here->BSIM3cdsb = here->BSIM3cddb = 0.0; here->BSIM3cbgb = here->BSIM3cbsb = here->BSIM3cbdb = 0.0; here->BSIM3cqdb = here->BSIM3cqsb = here->BSIM3cqgb = here->BSIM3cqbb = 0.0; here->BSIM3gtau = 0.0; goto finished; } else if (model->BSIM3capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = pParam->BSIM3phi - Phis; dVbseff_dVb = -dPhis_dVb; } Vfb = pParam->BSIM3vfbcv; Vth = Vfb + pParam->BSIM3phi + pParam->BSIM3k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM3k1ox * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM3cggb = CoxWL * dVgs_eff_dVg; here->BSIM3cgdb = 0.0; here->BSIM3cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3cdgb = 0.0; here->BSIM3cddb = 0.0; here->BSIM3cdsb = 0.0; here->BSIM3cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM3cbdb = 0.0; here->BSIM3cbsb = -here->BSIM3cgsb; here->BSIM3qinv = 0.0; } else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM3k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM3k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM3cggb = T0 * dVgs_eff_dVg; here->BSIM3cgdb = 0.0; here->BSIM3cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3cdgb = 0.0; here->BSIM3cddb = 0.0; here->BSIM3cdsb = 0.0; here->BSIM3cbgb = -here->BSIM3cggb; here->BSIM3cbdb = 0.0; here->BSIM3cbsb = -here->BSIM3cgsb; here->BSIM3qinv = 0.0; } else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; if (model->BSIM3xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM3cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3cgsb = -(here->BSIM3cggb + T2); here->BSIM3cgdb = 0.0; here->BSIM3cdgb = 0.0; here->BSIM3cddb = 0.0; here->BSIM3cdsb = 0.0; here->BSIM3cbgb = -(here->BSIM3cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3cbsb = -(here->BSIM3cbgb + T3); here->BSIM3cbdb = 0.0; here->BSIM3qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM3cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM3cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3cgsb = -(here->BSIM3cggb + T11 + here->BSIM3cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM3cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM3cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM3cdsb = -(here->BSIM3cdgb + T12 + here->BSIM3cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM3cbgb = -(here->BSIM3cggb + here->BSIM3cdgb + T10); here->BSIM3cbdb = -(here->BSIM3cgdb + here->BSIM3cddb + T12); here->BSIM3cbsb = -(here->BSIM3cgsb + here->BSIM3cdsb + T0); here->BSIM3qinv = -(qgate + qbulk); } } else if (model->BSIM3xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM3cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3cgsb = -(here->BSIM3cggb + T2); here->BSIM3cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM3cdgb = -T3 * dVgs_eff_dVg; here->BSIM3cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM3cdsb = -(T4 + here->BSIM3cdgb); here->BSIM3cbgb = -(here->BSIM3cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3cbsb = -(here->BSIM3cbgb + T3); here->BSIM3cbdb = 0.0; here->BSIM3qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3cgsb = -(here->BSIM3cggb + here->BSIM3cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM3cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM3cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM3cdsb = -(here->BSIM3cdgb + T10 + here->BSIM3cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - here->BSIM3cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM3cddb; tmp = -(T10 + T11 + T12); here->BSIM3cbgb = -(here->BSIM3cggb + here->BSIM3cdgb + T12); here->BSIM3cbdb = -(here->BSIM3cgdb + here->BSIM3cddb + T10); /* bug fix */ here->BSIM3cbsb = -(here->BSIM3cgsb + here->BSIM3cdsb + tmp); here->BSIM3qinv = -(qgate + qbulk); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM3cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3cgsb = -(here->BSIM3cggb + T2); here->BSIM3cgdb = 0.0; here->BSIM3cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM3cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM3cdsb = -(T4 + here->BSIM3cdgb); here->BSIM3cbgb = -(here->BSIM3cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3cbsb = -(here->BSIM3cbgb + T3); here->BSIM3cbdb = 0.0; here->BSIM3qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3cgsb = -(here->BSIM3cggb + here->BSIM3cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM3cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM3cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM3cdsb = -(here->BSIM3cdgb + T12 + here->BSIM3cddb); here->BSIM3cbgb = -(here->BSIM3cggb + 2.0 * here->BSIM3cdgb); here->BSIM3cbdb = -(here->BSIM3cgdb + 2.0 * here->BSIM3cddb); here->BSIM3cbsb = -(here->BSIM3cgsb + 2.0 * here->BSIM3cdsb); here->BSIM3qinv = -(qgate + qbulk); } } } } else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM3phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV; /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM3noff; dnoff_dVd = pParam->BSIM3noff * dn_dVd; dnoff_dVb = pParam->BSIM3noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM3voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV */ if (model->BSIM3capMod == 1) { Vfb = here->BSIM3vfbzb; Arg1 = Vgs_eff - VbseffCV - Vfb - Vgsteff; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; Cgg = CoxWL * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -CoxWL * dVgsteff_dVd; Cgb = -CoxWL * (dVbseffCV_dVb + dVgsteff_dVb); } else { T0 = 0.5 * pParam->BSIM3k1ox; T1 = sqrt(T0 * T0 + Arg1); T2 = CoxWL * T0 / T1; qgate = CoxWL * pParam->BSIM3k1ox * (T1 - T0); Cgg = T2 * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -T2 * dVgsteff_dVd; Cgb = -T2 * (dVbseffCV_dVb + dVgsteff_dVb); } qbulk = -qgate; Cbg = -Cgg; Cbd = -Cgd; Cbb = -Cgb; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; if (VdsatCV < Vds) { dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T0 = Vgsteff - VdsatCV / 3.0; dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0; dT0_dVb = -dVdsatCV_dVb / 3.0; qgate += CoxWL * T0; Cgg1 = CoxWL * dT0_dVg; Cgb1 = CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; T0 = VdsatCV - Vgsteff; dT0_dVg = dVdsatCV_dVg - 1.0; dT0_dVb = dVdsatCV_dVb; qbulk += One_Third_CoxWL * T0; Cbg1 = One_Third_CoxWL * dT0_dVg; Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb; Cbd1 = Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3xpart > 0.5) T0 = -Two_Third_CoxWL; else if (model->BSIM3xpart < 0.5) T0 = -0.4 * CoxWL; else T0 = -One_Third_CoxWL; qsrc = T0 * Vgsteff; Csg = T0 * dVgsteff_dVg; Csb = T0 * dVgsteff_dVb; Csd = T0 * dVgsteff_dVd; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } else { T0 = AbulkCV * Vds; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.e-20); T2 = Vds / T1; T3 = T0 * T2; dT3_dVg = -12.0 * T2 * T2 * AbulkCV; dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5; dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb * Vgsteff; qgate += CoxWL * (Vgsteff - 0.5 * Vds + T3); Cgg1 = CoxWL * (1.0 + dT3_dVg); Cgb1 = CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; qbulk += CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3); Cbg1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVg); Cbb1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVb + (0.5 * Vds - T3) * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbd1 = -CoxWL * (1.0 - AbulkCV) * dT3_dVd + Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); Csg = -CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV); Csb = -CoxWL * (0.25 * Vds * dAbulkCV_dVb - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0) * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csd = -CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0 / T1 / T1 * (4.0 * Vgsteff - T0)) + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else if (model->BSIM3xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb + Csg * dVgsteff_dVb; Csd = (qsrc / T1 + T2 * T4) * AbulkCV + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } qdrn = -(qgate + qbulk + qsrc); here->BSIM3cggb = Cgg; here->BSIM3cgsb = -(Cgg + Cgd + Cgb); here->BSIM3cgdb = Cgd; here->BSIM3cdgb = -(Cgg + Cbg + Csg); here->BSIM3cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3cddb = -(Cgd + Cbd + Csd); here->BSIM3cbgb = Cbg; here->BSIM3cbsb = -(Cbg + Cbd + Cbb); here->BSIM3cbdb = Cbd; here->BSIM3qinv = -(qgate + qbulk); } else if (model->BSIM3capMod == 2) { Vfb = here->BSIM3vfbzb; V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; T0 = 0.5 * pParam->BSIM3k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM3k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM3k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM3k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM3abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; /* Added to eliminate non-zero VdseffCV at Vds=0.0 */ if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qinoi = -CoxWL * (Vgsteff - 0.5 * T0 + AbulkCV * T3); qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM3xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM3xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3cggb = Cgg; here->BSIM3cgsb = -(Cgg + Cgd + Cgb); here->BSIM3cgdb = Cgd; here->BSIM3cdgb = -(Cgg + Cbg + Csg); here->BSIM3cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3cddb = -(Cgd + Cbd + Csd); here->BSIM3cbgb = Cbg; here->BSIM3cbsb = -(Cbg + Cbd + Cbb); here->BSIM3cbdb = Cbd; here->BSIM3qinv = qinoi; } /* New Charge-Thickness capMod (CTM) begins */ else if (model->BSIM3capMod == 3) { V3 = here->BSIM3vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM3vfbzb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM3vfbzb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM3vfbzb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM3vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM3cox; Tox = 1.0e8 * model->BSIM3tox; T0 = (Vgs_eff - VbseffCV - here->BSIM3vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; tmp = T0 * pParam->BSIM3acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM3ldeb * exp(tmp); dTcen_dVg = pParam->BSIM3acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM3ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM3ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM3tox; V3 = pParam->BSIM3ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM3ldeb); Tcen = pParam->BSIM3ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = EPSSI / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / Cox; Qac0 = CoxWLcen * (Vfbeff - here->BSIM3vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM3k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM3k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM3k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM3k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM3k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM3moin * Vtm; T0 = 0.5 * pParam->BSIM3sqrtPhi; } else { Denomi = pParam->BSIM3moin * Vtm * pParam->BSIM3k1ox * pParam->BSIM3k1ox; T0 = pParam->BSIM3k1ox * pParam->BSIM3sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); /* End of delta Phis */ /* VgDP = Vgsteff - DeltaPhi */ T0 = Vgsteff - DeltaPhi - 0.001; dT0_dVg = 1.0 - dDeltaPhi_dVg; T1 = sqrt(T0 * T0 + Vgsteff * 0.004); VgDP = 0.5 * (T0 + T1); dVgDP_dVg = 0.5 * (dT0_dVg + (T0 * dT0_dVg + 0.002) / T1); T3 = 4.0 * (Vth - here->BSIM3vfbzb - pParam->BSIM3phi); Tox += Tox; if (T3 >= 0.0) { T0 = (Vgsteff + T3) / Tox; dT0_dVd = (dVgsteff_dVd + 4.0 * dVth_dVd) / Tox; dT0_dVb = (dVgsteff_dVb + 4.0 * dVth_dVb) / Tox; } else { T0 = (Vgsteff + 1.0e-20) / Tox; dT0_dVd = dVgsteff_dVd / Tox; dT0_dVb = dVgsteff_dVb / Tox; } tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = -1.9e-9 * T2 / T1 /T1; dTcen_dVd = Tox * dTcen_dVg; dTcen_dVb = dTcen_dVd * dT0_dVb; dTcen_dVd *= dT0_dVd; dTcen_dVg *= dVgsteff_dVg; Ccen = EPSSI / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / Cox; AbulkCV = Abulk0 * pParam->BSIM3abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3abulkCVfactor * dAbulk0_dVb; VdsatCV = VgDP / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = dVgDP_dVg / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (1.0 - T5) + T5 * dT1_dVb; } /* Added to eliminate non-zero VdseffCV at Vds=0.0 */ if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = VgDP; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * dVgDP_dVg + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * dVgDP_dVg; T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM3xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * dVgDP_dVg; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM3xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * dVgDP_dVg + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3cggb = Cgg; here->BSIM3cgsb = -(Cgg + Cgd + Cgb); here->BSIM3cgdb = Cgd; here->BSIM3cdgb = -(Cgg + Cbg + Csg); here->BSIM3cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3cddb = -(Cgd + Cbd + Csd); here->BSIM3cbgb = Cbg; here->BSIM3cbsb = -(Cbg + Cbd + Cbb); here->BSIM3cbdb = Cbd; here->BSIM3qinv = -qinoi; } /* End of CTM */ } finished: /* Returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->BSIM3qgate = qgate; here->BSIM3qbulk = qbulk; here->BSIM3qdrn = qdrn; here->BSIM3cd = cdrain; if (ChargeComputationNeeded) { /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw: zero bias drain junction sidewall capacitance along field oxide * czbssw: zero bias source junction sidewall capacitance along field oxide * czbdswg: zero bias drain junction sidewall capacitance along gate side * czbsswg: zero bias source junction sidewall capacitance along gate side */ if (model->BSIM3acmMod == 0) { czbd = model->BSIM3unitAreaTempJctCap * here->BSIM3drainArea; /*bug fix */ czbs = model->BSIM3unitAreaTempJctCap * here->BSIM3sourceArea; if (here->BSIM3drainPerimeter < pParam->BSIM3weff) { czbdswg = model->BSIM3unitLengthGateSidewallTempJctCap * here->BSIM3drainPerimeter; czbdsw = 0.0; } else { czbdsw = model->BSIM3unitLengthSidewallTempJctCap * (here->BSIM3drainPerimeter - pParam->BSIM3weff); czbdswg = model->BSIM3unitLengthGateSidewallTempJctCap * pParam->BSIM3weff; } if (here->BSIM3sourcePerimeter < pParam->BSIM3weff) { czbssw = 0.0; czbsswg = model->BSIM3unitLengthGateSidewallTempJctCap * here->BSIM3sourcePerimeter; } else { czbssw = model->BSIM3unitLengthSidewallTempJctCap * (here->BSIM3sourcePerimeter - pParam->BSIM3weff); czbsswg = model->BSIM3unitLengthGateSidewallTempJctCap * pParam->BSIM3weff; } } else { error = ACM_junctionCapacitances( model->BSIM3acmMod, model->BSIM3calcacm, here->BSIM3geo, model->BSIM3hdif, model->BSIM3wmlt, here->BSIM3w, model->BSIM3xw, here->BSIM3drainAreaGiven, here->BSIM3drainArea, here->BSIM3drainPerimeterGiven, here->BSIM3drainPerimeter, here->BSIM3sourceAreaGiven, here->BSIM3sourceArea, here->BSIM3sourcePerimeterGiven, here->BSIM3sourcePerimeter, model->BSIM3unitAreaTempJctCap, model->BSIM3unitLengthSidewallTempJctCap, model->BSIM3unitLengthGateSidewallJctCap, &czbd, &czbdsw, &czbdswg, &czbs, &czbssw, &czbsswg ); if (error) return(error); } MJ = model->BSIM3bulkJctBotGradingCoeff; MJSW = model->BSIM3bulkJctSideGradingCoeff; MJSWG = model->BSIM3bulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs == 0.0) { *(ckt->CKTstate0 + here->BSIM3qbs) = 0.0; here->BSIM3capbs = czbs + czbssw + czbsswg; } else if (vbs < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs / model->BSIM3PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbs) = model->BSIM3PhiB * czbs * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM3qbs) = 0.0; here->BSIM3capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs / model->BSIM3PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbs) += model->BSIM3PhiBSW * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs / model->BSIM3PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbs) += model->BSIM3PhiBSWG * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs * (czbs * MJ / model->BSIM3PhiB + czbssw * MJSW / model->BSIM3PhiBSW + czbsswg * MJSWG / model->BSIM3PhiBSWG); *(ckt->CKTstate0 + here->BSIM3qbs) = vbs * (T0 + 0.5 * T1); here->BSIM3capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd == 0.0) { *(ckt->CKTstate0 + here->BSIM3qbd) = 0.0; here->BSIM3capbd = czbd + czbdsw + czbdswg; } else if (vbd < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd / model->BSIM3PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbd) = model->BSIM3PhiB * czbd * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM3qbd) = 0.0; here->BSIM3capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd / model->BSIM3PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbd) += model->BSIM3PhiBSW * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd / model->BSIM3PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3qbd) += model->BSIM3PhiBSWG * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd * (czbd * MJ / model->BSIM3PhiB + czbdsw * MJSW / model->BSIM3PhiBSW + czbdswg * MJSWG / model->BSIM3PhiBSWG); *(ckt->CKTstate0 + here->BSIM3qbd) = vbd * (T0 + 0.5 * T1); here->BSIM3capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM3off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM3mode >= 0) { Idtot = here->BSIM3cd + here->BSIM3csub - here->BSIM3cbd; } else { Idtot = here->BSIM3cd - here->BSIM3cbd; } tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; if (fabs(cdhat - Idtot) >= tol) { ckt->CKTnoncon++; } else { Ibtot = here->BSIM3cbs + here->BSIM3cbd - here->BSIM3csub; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM3vbs) = vbs; *(ckt->CKTstate0 + here->BSIM3vbd) = vbd; *(ckt->CKTstate0 + here->BSIM3vgs) = vgs; *(ckt->CKTstate0 + here->BSIM3vds) = vds; *(ckt->CKTstate0 + here->BSIM3qdef) = qdef; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif /* NQS begins */ if ((here->BSIM3nqsMod) || (here->BSIM3acnqsMod)) { qcheq = -(qbulk + qgate); here->BSIM3cqgb = -(here->BSIM3cggb + here->BSIM3cbgb); here->BSIM3cqdb = -(here->BSIM3cgdb + here->BSIM3cbdb); here->BSIM3cqsb = -(here->BSIM3cgsb + here->BSIM3cbsb); here->BSIM3cqbb = -(here->BSIM3cqgb + here->BSIM3cqdb + here->BSIM3cqsb); gtau_drift = fabs(here->BSIM3tconst * qcheq) * ScalingFactor; T0 = pParam->BSIM3leffCV * pParam->BSIM3leffCV; gtau_diff = 16.0 * here->BSIM3u0temp * model->BSIM3vtm / T0 * ScalingFactor; here->BSIM3gtau = gtau_drift + gtau_diff; if (here->BSIM3acnqsMod) here->BSIM3taunet = ScalingFactor / here->BSIM3gtau; } if (model->BSIM3capMod == 0) /* code merge -JX */ { cgdo = pParam->BSIM3cgdo; qgdo = pParam->BSIM3cgdo * vgd; cgso = pParam->BSIM3cgso; qgso = pParam->BSIM3cgso * vgs; } else if (model->BSIM3capMod == 1) { if (vgd < 0.0) { T1 = sqrt(1.0 - 4.0 * vgd / pParam->BSIM3ckappa); cgdo = pParam->BSIM3cgdo + pParam->BSIM3weffCV * pParam->BSIM3cgdl / T1; qgdo = pParam->BSIM3cgdo * vgd - pParam->BSIM3weffCV * 0.5 * pParam->BSIM3cgdl * pParam->BSIM3ckappa * (T1 - 1.0); } else { cgdo = pParam->BSIM3cgdo + pParam->BSIM3weffCV * pParam->BSIM3cgdl; qgdo = (pParam->BSIM3weffCV * pParam->BSIM3cgdl + pParam->BSIM3cgdo) * vgd; } if (vgs < 0.0) { T1 = sqrt(1.0 - 4.0 * vgs / pParam->BSIM3ckappa); cgso = pParam->BSIM3cgso + pParam->BSIM3weffCV * pParam->BSIM3cgsl / T1; qgso = pParam->BSIM3cgso * vgs - pParam->BSIM3weffCV * 0.5 * pParam->BSIM3cgsl * pParam->BSIM3ckappa * (T1 - 1.0); } else { cgso = pParam->BSIM3cgso + pParam->BSIM3weffCV * pParam->BSIM3cgsl; qgso = (pParam->BSIM3weffCV * pParam->BSIM3cgsl + pParam->BSIM3cgso) * vgs; } } else { T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3weffCV * pParam->BSIM3cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3ckappa); cgdo = pParam->BSIM3cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM3cgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->BSIM3ckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3weffCV * pParam->BSIM3cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3ckappa); cgso = pParam->BSIM3cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM3cgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->BSIM3ckappa * (T4 - 1.0)); } here->BSIM3cgdo = cgdo; here->BSIM3cgso = cgso; ag0 = ckt->CKTag[0]; if (here->BSIM3mode > 0) { if (here->BSIM3nqsMod == 0) { gcggb = (here->BSIM3cggb + cgdo + cgso + pParam->BSIM3cgbo ) * ag0; gcgdb = (here->BSIM3cgdb - cgdo) * ag0; gcgsb = (here->BSIM3cgsb - cgso) * ag0; gcdgb = (here->BSIM3cdgb - cgdo) * ag0; gcddb = (here->BSIM3cddb + here->BSIM3capbd + cgdo) * ag0; gcdsb = here->BSIM3cdsb * ag0; gcsgb = -(here->BSIM3cggb + here->BSIM3cbgb + here->BSIM3cdgb + cgso) * ag0; gcsdb = -(here->BSIM3cgdb + here->BSIM3cbdb + here->BSIM3cddb) * ag0; gcssb = (here->BSIM3capbs + cgso - (here->BSIM3cgsb + here->BSIM3cbsb + here->BSIM3cdsb)) * ag0; gcbgb = (here->BSIM3cbgb - pParam->BSIM3cgbo) * ag0; gcbdb = (here->BSIM3cbdb - here->BSIM3capbd) * ag0; gcbsb = (here->BSIM3cbsb - here->BSIM3capbs) * ag0; qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qdrn -= qgd; qsrc = -(qgate + qbulk + qdrn); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { if (qcheq > 0.0) T0 = here->BSIM3tconst * qdef * ScalingFactor; else T0 = -here->BSIM3tconst * qdef * ScalingFactor; ggtg = here->BSIM3gtg = T0 * here->BSIM3cqgb; ggtd = here->BSIM3gtd = T0 * here->BSIM3cqdb; ggts = here->BSIM3gts = T0 * here->BSIM3cqsb; ggtb = here->BSIM3gtb = T0 * here->BSIM3cqbb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM3cqgb * ag0; gcqdb = here->BSIM3cqdb * ag0; gcqsb = here->BSIM3cqsb * ag0; gcqbb = here->BSIM3cqbb * ag0; gcggb = (cgdo + cgso + pParam->BSIM3cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcdgb = -cgdo * ag0; gcddb = (here->BSIM3capbd + cgdo) * ag0; gcdsb = 0.0; gcsgb = -cgso * ag0; gcsdb = 0.0; gcssb = (here->BSIM3capbs + cgso) * ag0; gcbgb = -pParam->BSIM3cgbo * ag0; gcbdb = -here->BSIM3capbd * ag0; gcbsb = -here->BSIM3capbs * ag0; CoxWL = model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM3cddb; Csd = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3cdgb; Csg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3cdsb; Css = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3cgbo * vgb; qgate = qgd + qgs + qgb; qbulk = -qgb; qdrn = -qgd; qsrc = -(qgate + qbulk + qdrn); } } else { if (here->BSIM3nqsMod == 0) { gcggb = (here->BSIM3cggb + cgdo + cgso + pParam->BSIM3cgbo ) * ag0; gcgdb = (here->BSIM3cgsb - cgdo) * ag0; gcgsb = (here->BSIM3cgdb - cgso) * ag0; gcdgb = -(here->BSIM3cggb + here->BSIM3cbgb + here->BSIM3cdgb + cgdo) * ag0; gcddb = (here->BSIM3capbd + cgdo - (here->BSIM3cgsb + here->BSIM3cbsb + here->BSIM3cdsb)) * ag0; gcdsb = -(here->BSIM3cgdb + here->BSIM3cbdb + here->BSIM3cddb) * ag0; gcsgb = (here->BSIM3cdgb - cgso) * ag0; gcsdb = here->BSIM3cdsb * ag0; gcssb = (here->BSIM3cddb + here->BSIM3capbs + cgso) * ag0; gcbgb = (here->BSIM3cbgb - pParam->BSIM3cgbo) * ag0; gcbdb = (here->BSIM3cbsb - here->BSIM3capbd) * ag0; gcbsb = (here->BSIM3cbdb - here->BSIM3capbs) * ag0; qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qsrc = qdrn - qgs; qdrn = -(qgate + qbulk + qsrc); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { if (qcheq > 0.0) T0 = here->BSIM3tconst * qdef * ScalingFactor; else T0 = -here->BSIM3tconst * qdef * ScalingFactor; ggtg = here->BSIM3gtg = T0 * here->BSIM3cqgb; ggts = here->BSIM3gtd = T0 * here->BSIM3cqdb; ggtd = here->BSIM3gts = T0 * here->BSIM3cqsb; ggtb = here->BSIM3gtb = T0 * here->BSIM3cqbb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM3cqgb * ag0; gcqdb = here->BSIM3cqsb * ag0; gcqsb = here->BSIM3cqdb * ag0; gcqbb = here->BSIM3cqbb * ag0; gcggb = (cgdo + cgso + pParam->BSIM3cgbo) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcdgb = -cgdo * ag0; gcddb = (here->BSIM3capbd + cgdo) * ag0; gcdsb = 0.0; gcsgb = -cgso * ag0; gcsdb = 0.0; gcssb = (here->BSIM3capbs + cgso) * ag0; gcbgb = -pParam->BSIM3cgbo * ag0; gcbdb = -here->BSIM3capbd * ag0; gcbsb = -here->BSIM3capbs * ag0; CoxWL = model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM3cddb; Cds = -(here->BSIM3cgdb + here->BSIM3cddb + here->BSIM3cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3cdgb; Cdg = -(here->BSIM3cggb + here->BSIM3cdgb + here->BSIM3cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3cdsb; Cdd = -(here->BSIM3cgsb + here->BSIM3cdsb + here->BSIM3cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3cgbo * vgb; qgate = qgd + qgs + qgb; qbulk = -qgb; qsrc = -qgs; qdrn = -(qgate + qbulk + qsrc); } } cqdef = cqcheq = 0.0; if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM3qg) = qgate; *(ckt->CKTstate0 + here->BSIM3qd) = qdrn - *(ckt->CKTstate0 + here->BSIM3qbd); *(ckt->CKTstate0 + here->BSIM3qb) = qbulk + *(ckt->CKTstate0 + here->BSIM3qbd) + *(ckt->CKTstate0 + here->BSIM3qbs); if (here->BSIM3nqsMod) { *(ckt->CKTstate0 + here->BSIM3qcdump) = qdef * ScalingFactor; *(ckt->CKTstate0 + here->BSIM3qcheq) = qcheq; } /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3qb) = *(ckt->CKTstate0 + here->BSIM3qb); *(ckt->CKTstate1 + here->BSIM3qg) = *(ckt->CKTstate0 + here->BSIM3qg); *(ckt->CKTstate1 + here->BSIM3qd) = *(ckt->CKTstate0 + here->BSIM3qd); if (here->BSIM3nqsMod) { *(ckt->CKTstate1 + here->BSIM3qcheq) = *(ckt->CKTstate0 + here->BSIM3qcheq); *(ckt->CKTstate1 + here->BSIM3qcdump) = *(ckt->CKTstate0 + here->BSIM3qcdump); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3qd); if (error) return(error); if (here->BSIM3nqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3qcdump); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3qcheq); if (error) return(error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM3mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM3nqsMod) here->BSIM3gtau = 16.0 * here->BSIM3u0temp * model->BSIM3vtm / pParam->BSIM3leffCV / pParam->BSIM3leffCV * ScalingFactor; else here->BSIM3gtau = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM3cqg); cqbulk = *(ckt->CKTstate0 + here->BSIM3cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM3cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs; if (here->BSIM3nqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM3gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM3cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM3cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3cqb) = *(ckt->CKTstate0 + here->BSIM3cqb); *(ckt->CKTstate1 + here->BSIM3cqg) = *(ckt->CKTstate0 + here->BSIM3cqg); *(ckt->CKTstate1 + here->BSIM3cqd) = *(ckt->CKTstate0 + here->BSIM3cqd); if (here->BSIM3nqsMod) { *(ckt->CKTstate1 + here->BSIM3cqcheq) = *(ckt->CKTstate0 + here->BSIM3cqcheq); *(ckt->CKTstate1 + here->BSIM3cqcdump) = *(ckt->CKTstate0 + here->BSIM3cqcdump); } } /* * load current vector */ line900: if (here->BSIM3mode >= 0) { Gm = here->BSIM3gm; Gmbs = here->BSIM3gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cdreq = model->BSIM3type * (cdrain - here->BSIM3gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = -model->BSIM3type * (here->BSIM3csub - here->BSIM3gbds * vds - here->BSIM3gbgs * vgs - here->BSIM3gbbs * vbs); ceqbs = 0.0; gbbdp = -here->BSIM3gbds; gbbsp = (here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs); gbdpg = here->BSIM3gbgs; gbdpdp = here->BSIM3gbds; gbdpb = here->BSIM3gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; } else { Gm = -here->BSIM3gm; Gmbs = -here->BSIM3gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); cdreq = -model->BSIM3type * (cdrain + here->BSIM3gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = -model->BSIM3type * (here->BSIM3csub + here->BSIM3gbds * vds - here->BSIM3gbgs * vgd - here->BSIM3gbbs * vbd); ceqbd = 0.0; gbbsp = -here->BSIM3gbds; gbbdp = (here->BSIM3gbds + here->BSIM3gbgs + here->BSIM3gbbs); gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3gbgs; gbspsp = here->BSIM3gbds; gbspb = here->BSIM3gbbs; gbspdp = -(gbspg + gbspsp + gbspb); } if (model->BSIM3type > 0) { ceqbs += (here->BSIM3cbs - here->BSIM3gbs * vbs); ceqbd += (here->BSIM3cbd - here->BSIM3gbd * vbd); /* ceqqg = ceqqg; ceqqb = ceqqb; ceqqd = ceqqd; cqdef = cqdef; cqcheq = cqcheq; */ } else { ceqbs -= (here->BSIM3cbs - here->BSIM3gbs * vbs); ceqbd -= (here->BSIM3cbd - here->BSIM3gbd * vbd); ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; cqdef = -cqdef; cqcheq = -cqcheq; } m = here->BSIM3m; #ifdef USE_OMP here->BSIM3rhsG = m * ceqqg; here->BSIM3rhsB = m * (ceqbs + ceqbd + ceqqb); here->BSIM3rhsD = m * (ceqbd - cdreq - ceqqd); here->BSIM3rhsS = m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd); if (here->BSIM3nqsMod) here->BSIM3rhsQ = m * (cqcheq - cqdef); #else (*(ckt->CKTrhs + here->BSIM3gNode) -= m * ceqqg); (*(ckt->CKTrhs + here->BSIM3bNode) -= m * (ceqbs + ceqbd + ceqqb)); (*(ckt->CKTrhs + here->BSIM3dNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->BSIM3sNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd)); if (here->BSIM3nqsMod) *(ckt->CKTrhs + here->BSIM3qNode) += m * (cqcheq - cqdef); #endif /* * load y matrix */ T1 = qdef * here->BSIM3gtau; #ifdef USE_OMP here->BSIM3DdPt = m * here->BSIM3drainConductance; here->BSIM3GgPt = m * (gcggb - ggtg); here->BSIM3SsPt = m * here->BSIM3sourceConductance; here->BSIM3BbPt = m * (here->BSIM3gbd + here->BSIM3gbs - gcbgb - gcbdb - gcbsb - here->BSIM3gbbs); here->BSIM3DPdpPt = m * (here->BSIM3drainConductance + here->BSIM3gds + here->BSIM3gbd + RevSum + gcddb + dxpart * ggtd + T1 * ddxpart_dVd + gbdpdp); here->BSIM3SPspPt = m * (here->BSIM3sourceConductance + here->BSIM3gds + here->BSIM3gbs + FwdSum + gcssb + sxpart * ggts + T1 * dsxpart_dVs + gbspsp); here->BSIM3DdpPt = m * here->BSIM3drainConductance; here->BSIM3GbPt = m * (gcggb + gcgdb + gcgsb + ggtb); here->BSIM3GdpPt = m * (gcgdb - ggtd); here->BSIM3GspPt = m * (gcgsb - ggts); here->BSIM3SspPt = m * here->BSIM3sourceConductance; here->BSIM3BgPt = m * (gcbgb - here->BSIM3gbgs); here->BSIM3BdpPt = m * (gcbdb - here->BSIM3gbd + gbbdp); here->BSIM3BspPt = m * (gcbsb - here->BSIM3gbs + gbbsp); here->BSIM3DPdPt = m * here->BSIM3drainConductance; here->BSIM3DPgPt = m * (Gm + gcdgb + dxpart * ggtg + T1 * ddxpart_dVg + gbdpg); here->BSIM3DPbPt = m * (here->BSIM3gbd - Gmbs + gcdgb + gcddb + gcdsb - dxpart * ggtb - T1 * ddxpart_dVb - gbdpb); here->BSIM3DPspPt = m * (here->BSIM3gds + FwdSum - gcdsb - dxpart * ggts - T1 * ddxpart_dVs - gbdpsp); here->BSIM3SPgPt = m * (gcsgb - Gm + sxpart * ggtg + T1 * dsxpart_dVg + gbspg); here->BSIM3SPsPt = m * here->BSIM3sourceConductance; here->BSIM3SPbPt = m * (here->BSIM3gbs + Gmbs + gcsgb + gcsdb + gcssb - sxpart * ggtb - T1 * dsxpart_dVb - gbspb); here->BSIM3SPdpPt = m * (here->BSIM3gds + RevSum - gcsdb - sxpart * ggtd - T1 * dsxpart_dVd - gbspdp); if (here->BSIM3nqsMod) { here->BSIM3QqPt = m * (gqdef + here->BSIM3gtau); here->BSIM3DPqPt = m * (dxpart * here->BSIM3gtau); here->BSIM3SPqPt = m * (sxpart * here->BSIM3gtau); here->BSIM3GqPt = m * here->BSIM3gtau; here->BSIM3QgPt = m * (ggtg - gcqgb); here->BSIM3QdpPt = m * (ggtd - gcqdb); here->BSIM3QspPt = m * (ggts - gcqsb); here->BSIM3QbPt = m * (ggtb - gcqbb); } #else (*(here->BSIM3DdPtr) += m * here->BSIM3drainConductance); (*(here->BSIM3GgPtr) += m * (gcggb - ggtg)); (*(here->BSIM3SsPtr) += m * here->BSIM3sourceConductance); (*(here->BSIM3BbPtr) += m * (here->BSIM3gbd + here->BSIM3gbs - gcbgb - gcbdb - gcbsb - here->BSIM3gbbs)); (*(here->BSIM3DPdpPtr) += m * (here->BSIM3drainConductance + here->BSIM3gds + here->BSIM3gbd + RevSum + gcddb + dxpart * ggtd + T1 * ddxpart_dVd + gbdpdp)); (*(here->BSIM3SPspPtr) += m * (here->BSIM3sourceConductance + here->BSIM3gds + here->BSIM3gbs + FwdSum + gcssb + sxpart * ggts + T1 * dsxpart_dVs + gbspsp)); (*(here->BSIM3DdpPtr) -= m * here->BSIM3drainConductance); (*(here->BSIM3GbPtr) -= m * (gcggb + gcgdb + gcgsb + ggtb)); (*(here->BSIM3GdpPtr) += m * (gcgdb - ggtd)); (*(here->BSIM3GspPtr) += m * (gcgsb - ggts)); (*(here->BSIM3SspPtr) -= m * here->BSIM3sourceConductance); (*(here->BSIM3BgPtr) += m * (gcbgb - here->BSIM3gbgs)); (*(here->BSIM3BdpPtr) += m * (gcbdb - here->BSIM3gbd + gbbdp)); (*(here->BSIM3BspPtr) += m * (gcbsb - here->BSIM3gbs + gbbsp)); (*(here->BSIM3DPdPtr) -= m * here->BSIM3drainConductance); (*(here->BSIM3DPgPtr) += m * (Gm + gcdgb + dxpart * ggtg + T1 * ddxpart_dVg + gbdpg)); (*(here->BSIM3DPbPtr) -= m * (here->BSIM3gbd - Gmbs + gcdgb + gcddb + gcdsb - dxpart * ggtb - T1 * ddxpart_dVb - gbdpb)); (*(here->BSIM3DPspPtr) -= m * (here->BSIM3gds + FwdSum - gcdsb - dxpart * ggts - T1 * ddxpart_dVs - gbdpsp)); (*(here->BSIM3SPgPtr) += m * (gcsgb - Gm + sxpart * ggtg + T1 * dsxpart_dVg + gbspg)); (*(here->BSIM3SPsPtr) -= m * here->BSIM3sourceConductance); (*(here->BSIM3SPbPtr) -= m * (here->BSIM3gbs + Gmbs + gcsgb + gcsdb + gcssb - sxpart * ggtb - T1 * dsxpart_dVb - gbspb)); (*(here->BSIM3SPdpPtr) -= m * (here->BSIM3gds + RevSum - gcsdb - sxpart * ggtd - T1 * dsxpart_dVd - gbspdp)); if (here->BSIM3nqsMod) { *(here->BSIM3QqPtr) += m * (gqdef + here->BSIM3gtau); *(here->BSIM3DPqPtr) += m * (dxpart * here->BSIM3gtau); *(here->BSIM3SPqPtr) += m * (sxpart * here->BSIM3gtau); *(here->BSIM3GqPtr) -= m * here->BSIM3gtau; *(here->BSIM3QgPtr) += m * (ggtg - gcqgb); *(here->BSIM3QdpPtr) += m * (ggtd - gcqdb); *(here->BSIM3QspPtr) += m * (ggts - gcqsb); *(here->BSIM3QbPtr) += m * (ggtb - gcqbb); } #endif line1000: ; #ifndef USE_OMP } /* End of Mosfet Instance */ } /* End of Model Instance */ #endif return(OK); } #ifdef USE_OMP void BSIM3LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt) { unsigned int InstCount, idx; BSIM3instance **InstArray; BSIM3instance *here; BSIM3model *model = (BSIM3model*)inModel; InstArray = model->BSIM3InstanceArray; InstCount = model->BSIM3InstCount; for(idx = 0; idx < InstCount; idx++) { here = InstArray[idx]; /* Update b for Ax = b */ (*(ckt->CKTrhs + here->BSIM3gNode) -= here->BSIM3rhsG); (*(ckt->CKTrhs + here->BSIM3bNode) -= here->BSIM3rhsB); (*(ckt->CKTrhs + here->BSIM3dNodePrime) += here->BSIM3rhsD); (*(ckt->CKTrhs + here->BSIM3sNodePrime) += here->BSIM3rhsS); if (here->BSIM3nqsMod) (*(ckt->CKTrhs + here->BSIM3qNode) += here->BSIM3rhsQ); /* Update A for Ax = b */ (*(here->BSIM3DdPtr) += here->BSIM3DdPt); (*(here->BSIM3GgPtr) += here->BSIM3GgPt); (*(here->BSIM3SsPtr) += here->BSIM3SsPt); (*(here->BSIM3BbPtr) += here->BSIM3BbPt); (*(here->BSIM3DPdpPtr) += here->BSIM3DPdpPt); (*(here->BSIM3SPspPtr) += here->BSIM3SPspPt); (*(here->BSIM3DdpPtr) -= here->BSIM3DdpPt); (*(here->BSIM3GbPtr) -= here->BSIM3GbPt); (*(here->BSIM3GdpPtr) += here->BSIM3GdpPt); (*(here->BSIM3GspPtr) += here->BSIM3GspPt); (*(here->BSIM3SspPtr) -= here->BSIM3SspPt); (*(here->BSIM3BgPtr) += here->BSIM3BgPt); (*(here->BSIM3BdpPtr) += here->BSIM3BdpPt); (*(here->BSIM3BspPtr) += here->BSIM3BspPt); (*(here->BSIM3DPdPtr) -= here->BSIM3DPdPt); (*(here->BSIM3DPgPtr) += here->BSIM3DPgPt); (*(here->BSIM3DPbPtr) -= here->BSIM3DPbPt); (*(here->BSIM3DPspPtr) -= here->BSIM3DPspPt); (*(here->BSIM3SPgPtr) += here->BSIM3SPgPt); (*(here->BSIM3SPsPtr) -= here->BSIM3SPsPt); (*(here->BSIM3SPbPtr) -= here->BSIM3SPbPt); (*(here->BSIM3SPdpPtr) -= here->BSIM3SPdpPt); if (here->BSIM3nqsMod) { *(here->BSIM3QqPtr) += here->BSIM3QqPt; *(here->BSIM3DPqPtr) += here->BSIM3DPqPt; *(here->BSIM3SPqPtr) += here->BSIM3SPqPt; *(here->BSIM3GqPtr) -= here->BSIM3GqPt; *(here->BSIM3QgPtr) += here->BSIM3QgPt; *(here->BSIM3QdpPtr) += here->BSIM3QdpPt; *(here->BSIM3QspPtr) += here->BSIM3QspPt; *(here->BSIM3QbPtr) += here->BSIM3QbPt; } } } #endif ngspice-26/src/spicelib/devices/bsim3/b3ask.c0000644000265600020320000001726312264261473020431 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3ask.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM3instance *here = (BSIM3instance*)inst; NG_IGNORE(select); switch(which) { case BSIM3_L: value->rValue = here->BSIM3l; return(OK); case BSIM3_W: value->rValue = here->BSIM3w; return(OK); case BSIM3_M: value->rValue = here->BSIM3m; return(OK); case BSIM3_AS: value->rValue = here->BSIM3sourceArea; return(OK); case BSIM3_AD: value->rValue = here->BSIM3drainArea; return(OK); case BSIM3_PS: value->rValue = here->BSIM3sourcePerimeter; return(OK); case BSIM3_PD: value->rValue = here->BSIM3drainPerimeter; return(OK); case BSIM3_NRS: value->rValue = here->BSIM3sourceSquares; return(OK); case BSIM3_NRD: value->rValue = here->BSIM3drainSquares; return(OK); case BSIM3_OFF: value->rValue = here->BSIM3off; return(OK); case BSIM3_NQSMOD: value->iValue = here->BSIM3nqsMod; return(OK); case BSIM3_ACNQSMOD: value->iValue = here->BSIM3acnqsMod; return(OK); case BSIM3_GEO: value->iValue = here->BSIM3geo; return(OK); case BSIM3_DELVTO: value->rValue = here->BSIM3delvto; return(OK); case BSIM3_MULU0: value->rValue = here->BSIM3mulu0; return(OK); case BSIM3_IC_VBS: value->rValue = here->BSIM3icVBS; return(OK); case BSIM3_IC_VDS: value->rValue = here->BSIM3icVDS; return(OK); case BSIM3_IC_VGS: value->rValue = here->BSIM3icVGS; return(OK); case BSIM3_DNODE: value->iValue = here->BSIM3dNode; return(OK); case BSIM3_GNODE: value->iValue = here->BSIM3gNode; return(OK); case BSIM3_SNODE: value->iValue = here->BSIM3sNode; return(OK); case BSIM3_BNODE: value->iValue = here->BSIM3bNode; return(OK); case BSIM3_DNODEPRIME: value->iValue = here->BSIM3dNodePrime; return(OK); case BSIM3_SNODEPRIME: value->iValue = here->BSIM3sNodePrime; return(OK); case BSIM3_SOURCECONDUCT: value->rValue = here->BSIM3sourceConductance; value->rValue *= here->BSIM3m; return(OK); case BSIM3_DRAINCONDUCT: value->rValue = here->BSIM3drainConductance; value->rValue *= here->BSIM3m; return(OK); case BSIM3_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3vbd); return(OK); case BSIM3_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3vbs); return(OK); case BSIM3_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM3vgs); return(OK); case BSIM3_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM3vds); return(OK); case BSIM3_CD: value->rValue = here->BSIM3cd; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CBS: value->rValue = here->BSIM3cbs; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CBD: value->rValue = here->BSIM3cbd; value->rValue *= here->BSIM3m; return(OK); case BSIM3_GM: value->rValue = here->BSIM3gm; value->rValue *= here->BSIM3m; return(OK); case BSIM3_GDS: value->rValue = here->BSIM3gds; value->rValue *= here->BSIM3m; return(OK); case BSIM3_GMBS: value->rValue = here->BSIM3gmbs; value->rValue *= here->BSIM3m; return(OK); case BSIM3_GBD: value->rValue = here->BSIM3gbd; value->rValue *= here->BSIM3m; return(OK); case BSIM3_GBS: value->rValue = here->BSIM3gbs; value->rValue *= here->BSIM3m; return(OK); case BSIM3_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM3qb); value->rValue *= here->BSIM3m; return(OK); case BSIM3_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM3cqb); value->rValue *= here->BSIM3m; return(OK); case BSIM3_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM3qg); value->rValue *= here->BSIM3m; return(OK); case BSIM3_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM3cqg); value->rValue *= here->BSIM3m; return(OK); case BSIM3_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM3qd); value->rValue *= here->BSIM3m; return(OK); case BSIM3_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM3cqd); value->rValue *= here->BSIM3m; return(OK); case BSIM3_CGG: value->rValue = here->BSIM3cggb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CGD: value->rValue = here->BSIM3cgdb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CGS: value->rValue = here->BSIM3cgsb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CDG: value->rValue = here->BSIM3cdgb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CDD: value->rValue = here->BSIM3cddb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CDS: value->rValue = here->BSIM3cdsb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CBG: value->rValue = here->BSIM3cbgb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CBDB: value->rValue = here->BSIM3cbdb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CBSB: value->rValue = here->BSIM3cbsb; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CAPBD: value->rValue = here->BSIM3capbd; value->rValue *= here->BSIM3m; return(OK); case BSIM3_CAPBS: value->rValue = here->BSIM3capbs; value->rValue *= here->BSIM3m; return(OK); case BSIM3_VON: value->rValue = here->BSIM3von; return(OK); case BSIM3_VDSAT: value->rValue = here->BSIM3vdsat; return(OK); case BSIM3_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3qbs); value->rValue *= here->BSIM3m; return(OK); case BSIM3_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3qbd); value->rValue *= here->BSIM3m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3/b3.c0000644000265600020320000010255212264261473017726 0ustar andreasadmin/**** BSIM3v3.3.0 beta, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim3def.h" #include "ngspice/suffix.h" IFparm BSIM3pTable[] = { /* parameters */ IOP( "l", BSIM3_L, IF_REAL , "Length"), IOP( "w", BSIM3_W, IF_REAL , "Width"), IOP( "m", BSIM3_M, IF_REAL , "Parallel multiplier"), IOP( "ad", BSIM3_AD, IF_REAL , "Drain area"), IOP( "as", BSIM3_AS, IF_REAL , "Source area"), IOP( "pd", BSIM3_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM3_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM3_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM3_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM3_OFF, IF_FLAG , "Device is initially off"), IOP( "nqsmod", BSIM3_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "acnqsmod", BSIM3_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "geo", BSIM3_GEO, IF_INTEGER, "ACM model drain/source connection"), IOP( "delvto", BSIM3_DELVTO, IF_REAL, "Zero bias threshold voltage variation"), IOP( "mulu0", BSIM3_MULU0, IF_REAL, "Low field mobility multiplier"), IP( "ic", BSIM3_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM3_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM3_GM, IF_REAL, "Gm"), OP( "gds", BSIM3_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM3_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM3_VON, IF_REAL, "Vth"), OP( "id", BSIM3_CD, IF_REAL, "Ids"), OP( "vbs", BSIM3_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM3_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM3_VDS, IF_REAL, "Vds"), OP( "ibd", BSIM3_CBD, IF_REAL, "Ibd"), /* newly added from here */ OP( "ibs", BSIM3_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM3_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM3_GBS, IF_REAL, "gbs"), OP( "qb", BSIM3_QB, IF_REAL, "Qbulk"), OP( "cqb", BSIM3_CQB, IF_REAL, "CQbulk"), OP( "qg", BSIM3_QG, IF_REAL, "Qgate"), OP( "cqg", BSIM3_CQG, IF_REAL, "CQgate"), OP( "qd", BSIM3_QD, IF_REAL, "Qdrain"), OP( "cqd", BSIM3_CQD, IF_REAL, "CQdrain"), OP( "cgg", BSIM3_CGG, IF_REAL, "Cggb"), OP( "cgd", BSIM3_CGD, IF_REAL, "Cgdb"), OP( "cgs", BSIM3_CGS, IF_REAL, "Cgsb"), OP( "cdg", BSIM3_CDG, IF_REAL, "Cdgb"), OP( "cdd", BSIM3_CDD, IF_REAL, "Cddb"), OP( "cds", BSIM3_CDS, IF_REAL, "Cdsb"), OP( "cbg", BSIM3_CBG, IF_REAL, "Cbgb"), OP( "cbd", BSIM3_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM3_CBSB, IF_REAL, "Cbsb"), OP( "capbd", BSIM3_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM3_CAPBS, IF_REAL, "Capbs"), }; IFparm BSIM3mPTable[] = { /* model parameters */ IOP( "capmod", BSIM3_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", BSIM3_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", BSIM3_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "nqsmod", BSIM3_MOD_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "acnqsmod", BSIM3_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "acm", BSIM3_MOD_ACMMOD, IF_INTEGER, "Area calculation method selector"), IOP( "calcacm", BSIM3_MOD_CALCACM, IF_INTEGER, "Area calculation method ACM=12"), IOP( "paramchk", BSIM3_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM3_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM3_MOD_VERSION, IF_STRING, " parameter for model version"), IOP( "tox", BSIM3_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "toxm", BSIM3_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"), IOP( "cdsc", BSIM3_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM3_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM3_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM3_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM3_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM3_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM3_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM3_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM3_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM3_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM3_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM3_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM3_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM3_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "nch", BSIM3_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", BSIM3_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM3_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM3_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM3_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM3_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM3_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM3_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM3_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM3_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM3_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM3_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM3_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM3_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM3_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", BSIM3_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", BSIM3_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM3_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM3_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM3_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM3_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM3_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM3_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM3_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM3_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM3_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM3_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM3_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM3_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM3_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM3_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", BSIM3_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", BSIM3_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM3_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", BSIM3_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM3_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM3_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM3_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM3_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "elm", BSIM3_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"), IOP( "delta", BSIM3_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM3_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM3_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", BSIM3_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM3_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM3_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM3_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM3_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM3_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM3_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM3_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM3_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pscbe1", BSIM3_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM3_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM3_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "js", BSIM3_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"), IOP( "jsw", BSIM3_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"), IOP( "pb", BSIM3_MOD_PB, IF_REAL, "Source/drain junction built-in potential"), IOP( "nj", BSIM3_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"), IOP( "xti", BSIM3_MOD_XTI, IF_REAL, "Junction current temperature exponent"), IOP( "mj", BSIM3_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"), IOP( "pbsw", BSIM3_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"), IOP( "mjsw", BSIM3_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP( "pbswg", BSIM3_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", BSIM3_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cj", BSIM3_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"), IOP( "vfbcv", BSIM3_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM3_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "cjsw", BSIM3_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"), IOP( "cjswg", BSIM3_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "tpb", BSIM3_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM3_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM3_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM3_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM3_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM3_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM3_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM3_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM3_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM3_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "lintnoi", BSIM3_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), IOP( "lint", BSIM3_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM3_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM3_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM3_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM3_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM3_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM3_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM3_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM3_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM3_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM3_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "xl", BSIM3_MOD_XL, IF_REAL, "Length correction parameter"), IOP( "xw", BSIM3_MOD_XW, IF_REAL, "Width correction parameter"), IOP( "wr", BSIM3_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM3_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM3_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM3_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM3_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM3_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM3_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM3_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM3_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM3_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM3_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM3_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM3_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM3_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM3_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM3_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM3_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM3_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", BSIM3_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", BSIM3_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM3_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM3_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM3_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM3_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "hdif", BSIM3_MOD_HDIF, IF_REAL, "ACM Parameter: Distance Gate - contact"), IOP( "ldif", BSIM3_MOD_LDIF, IF_REAL, "ACM Parameter: Length of LDD Gate-Source/Drain"), IOP( "ld", BSIM3_MOD_LD, IF_REAL, "ACM Parameter: Length of LDD under Gate"), IOP( "rd", BSIM3_MOD_RD, IF_REAL, "ACM Parameter: Resistance of LDD drain side"), IOP( "rs", BSIM3_MOD_RS, IF_REAL, "ACM Parameter: Resistance of LDD source side"), IOP( "rdc", BSIM3_MOD_RDC, IF_REAL, "ACM Parameter: Resistance contact drain side"), IOP( "rsc", BSIM3_MOD_RSC, IF_REAL, "ACM Parameter: Resistance contact source side"), IOP( "wmlt", BSIM3_MOD_WMLT, IF_REAL, "ACM Parameter: Width shrink factor"), IOP( "alpha0", BSIM3_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM3_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM3_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "ijth", BSIM3_MOD_IJTH, IF_REAL, "Diode limiting current"), IOP( "lcdsc", BSIM3_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM3_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM3_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM3_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM3_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM3_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM3_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM3_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM3_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM3_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM3_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM3_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM3_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM3_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lnch", BSIM3_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lngate", BSIM3_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM3_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM3_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM3_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM3_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM3_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM3_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM3_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM3_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM3_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM3_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM3_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM3_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM3_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", BSIM3_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", BSIM3_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM3_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM3_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM3_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM3_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM3_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM3_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM3_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM3_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM3_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM3_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM3_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM3_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM3_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM3_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lu0", BSIM3_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM3_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM3_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lelm", BSIM3_MOD_LELM, IF_REAL, "Length dependence of elm"), IOP( "ldelta", BSIM3_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM3_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwg", BSIM3_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM3_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM3_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM3_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM3_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM3_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM3_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM3_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM3_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpscbe1", BSIM3_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM3_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM3_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM3_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM3_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM3_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM3_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM3_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM3_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM3_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappa", BSIM3_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"), IOP( "lcf", BSIM3_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM3_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM3_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM3_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM3_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM3_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lvfbcv", BSIM3_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM3_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM3_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM3_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM3_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM3_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "wcdsc", BSIM3_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM3_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM3_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM3_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM3_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM3_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM3_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM3_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM3_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM3_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM3_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM3_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM3_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM3_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wnch", BSIM3_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wngate", BSIM3_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM3_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM3_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM3_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM3_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM3_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM3_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM3_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM3_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM3_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM3_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM3_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM3_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM3_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", BSIM3_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", BSIM3_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM3_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM3_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM3_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM3_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM3_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM3_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM3_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM3_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM3_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM3_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM3_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM3_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM3_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM3_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wu0", BSIM3_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM3_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM3_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "welm", BSIM3_MOD_WELM, IF_REAL, "Width dependence of elm"), IOP( "wdelta", BSIM3_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM3_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwg", BSIM3_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM3_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM3_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM3_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM3_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM3_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM3_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM3_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM3_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpscbe1", BSIM3_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM3_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM3_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM3_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM3_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM3_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM3_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM3_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM3_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM3_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappa", BSIM3_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"), IOP( "wcf", BSIM3_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM3_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM3_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM3_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM3_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM3_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wvfbcv", BSIM3_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM3_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM3_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM3_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM3_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM3_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "pcdsc", BSIM3_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM3_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM3_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM3_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM3_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM3_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM3_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM3_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM3_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM3_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM3_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM3_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM3_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM3_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pnch", BSIM3_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pngate", BSIM3_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM3_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM3_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM3_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM3_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM3_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM3_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM3_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM3_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM3_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM3_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM3_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM3_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM3_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", BSIM3_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", BSIM3_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM3_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM3_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM3_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM3_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM3_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM3_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM3_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM3_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM3_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM3_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM3_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM3_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM3_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM3_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pu0", BSIM3_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM3_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM3_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pelm", BSIM3_MOD_PELM, IF_REAL, "Cross-term dependence of elm"), IOP( "pdelta", BSIM3_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM3_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwg", BSIM3_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM3_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM3_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM3_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM3_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM3_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM3_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM3_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM3_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppscbe1", BSIM3_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM3_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM3_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM3_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM3_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM3_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM3_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM3_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM3_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM3_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappa", BSIM3_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"), IOP( "pcf", BSIM3_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM3_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM3_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM3_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM3_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM3_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pvfbcv", BSIM3_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM3_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM3_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM3_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM3_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM3_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "noia", BSIM3_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM3_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM3_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", BSIM3_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM3_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM3_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM3_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP("vgs_max", BSIM3_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", BSIM3_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", BSIM3_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", BSIM3_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", BSIM3_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", BSIM3_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", BSIM3_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM3_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM3names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM3nSize = NUMELEMS(BSIM3names); int BSIM3pTSize = NUMELEMS(BSIM3pTable); int BSIM3mPTSize = NUMELEMS(BSIM3mPTable); int BSIM3iSize = sizeof(BSIM3instance); int BSIM3mSize = sizeof(BSIM3model); ngspice-26/src/spicelib/devices/bsim3/bsim3init.c0000644000265600020320000000420412264261473021316 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim3itf.h" #include "bsim3ext.h" #include "bsim3init.h" SPICEdev BSIM3info = { { "BSIM3", "Berkeley Short Channel IGFET Model Version-3", &BSIM3nSize, &BSIM3nSize, BSIM3names, &BSIM3pTSize, BSIM3pTable, &BSIM3mPTSize, BSIM3mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ BSIM3param, /* DEVmodParam */ BSIM3mParam, /* DEVload */ BSIM3load, /* DEVsetup */ BSIM3setup, /* DEVunsetup */ BSIM3unsetup, /* DEVpzSetup */ BSIM3setup, /* DEVtemperature*/ BSIM3temp, /* DEVtrunc */ BSIM3trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ BSIM3acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ BSIM3destroy, /* DEVmodDelete */ BSIM3mDelete, /* DEVdelete */ BSIM3delete, /* DEVsetic */ BSIM3getic, /* DEVask */ BSIM3ask, /* DEVmodAsk */ BSIM3mAsk, /* DEVpzLoad */ BSIM3pzLoad, /* DEVconvTest */ BSIM3convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ BSIM3noise, /* DEVsoaCheck */ BSIM3soaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &BSIM3iSize, /* DEVmodSize */ &BSIM3mSize }; SPICEdev * get_bsim3_info(void) { return &BSIM3info; } ngspice-26/src/spicelib/devices/bsim3/B3TERMS_OF_USE0000644000265600020320000000247512264261473021363 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsim3/b3temp.c0000644000265600020320000013277612264261473020627 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3temp.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int BSIM3temp( GENmodel *inModel, CKTcircuit *ckt) { BSIM3model *model = (BSIM3model*) inModel; BSIM3instance *here; struct bsim3SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, Ldrn, Wdrn; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double Nvtm, SourceSatCurrent, DrainSatCurrent; int Size_Not_Found, error; /* loop through all the BSIM3 device models */ for (; model != NULL; model = model->BSIM3nextModel) { Temp = ckt->CKTtemp; if (model->BSIM3bulkJctPotential < 0.1) { model->BSIM3bulkJctPotential = 0.1; fprintf(stderr, "Given pb is less than 0.1. Pb is set to 0.1.\n"); } if (model->BSIM3sidewallJctPotential < 0.1) { model->BSIM3sidewallJctPotential = 0.1; fprintf(stderr, "Given pbsw is less than 0.1. Pbsw is set to 0.1.\n"); } if (model->BSIM3GatesidewallJctPotential < 0.1) { model->BSIM3GatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n"); } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM3tnom; TRatio = Temp / Tnom; model->BSIM3vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM3factor1 = sqrt(EPSSI / EPSOX * model->BSIM3tox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); model->BSIM3vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM3vtm + model->BSIM3jctTempExponent * log(Temp / Tnom); T1 = exp(T0 / model->BSIM3jctEmissionCoeff); model->BSIM3jctTempSatCurDensity = model->BSIM3jctSatCurDensity * T1; model->BSIM3jctSidewallTempSatCurDensity = model->BSIM3jctSidewallSatCurDensity * T1; } else { model->BSIM3jctTempSatCurDensity = model->BSIM3jctSatCurDensity; model->BSIM3jctSidewallTempSatCurDensity = model->BSIM3jctSidewallSatCurDensity; } if (model->BSIM3jctTempSatCurDensity < 0.0) model->BSIM3jctTempSatCurDensity = 0.0; if (model->BSIM3jctSidewallTempSatCurDensity < 0.0) model->BSIM3jctSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM3tnom; T0 = model->BSIM3tcj * delTemp; if (T0 >= -1.0) { model->BSIM3unitAreaTempJctCap = model->BSIM3unitAreaJctCap * (1.0 + T0); } else if (model->BSIM3unitAreaJctCap > 0.0) { model->BSIM3unitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cj to be negative. Cj is clamped to zero.\n"); } T0 = model->BSIM3tcjsw * delTemp; if (T0 >= -1.0) { model->BSIM3unitLengthSidewallTempJctCap = model->BSIM3unitLengthSidewallJctCap * (1.0 + T0); } else if (model->BSIM3unitLengthSidewallJctCap > 0.0) { model->BSIM3unitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsw to be negative. Cjsw is clamped to zero.\n"); } T0 = model->BSIM3tcjswg * delTemp; if (T0 >= -1.0) { model->BSIM3unitLengthGateSidewallTempJctCap = model->BSIM3unitLengthGateSidewallJctCap * (1.0 + T0); } else if (model->BSIM3unitLengthGateSidewallJctCap > 0.0) { model->BSIM3unitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswg to be negative. Cjswg is clamped to zero.\n"); } model->BSIM3PhiB = model->BSIM3bulkJctPotential - model->BSIM3tpb * delTemp; if (model->BSIM3PhiB < 0.01) { model->BSIM3PhiB = 0.01; fprintf(stderr, "Temperature effect has caused pb to be less than 0.01. Pb is clamped to 0.01.\n"); } model->BSIM3PhiBSW = model->BSIM3sidewallJctPotential - model->BSIM3tpbsw * delTemp; if (model->BSIM3PhiBSW <= 0.01) { model->BSIM3PhiBSW = 0.01; fprintf(stderr, "Temperature effect has caused pbsw to be less than 0.01. Pbsw is clamped to 0.01.\n"); } model->BSIM3PhiBSWG = model->BSIM3GatesidewallJctPotential - model->BSIM3tpbswg * delTemp; if (model->BSIM3PhiBSWG <= 0.01) { model->BSIM3PhiBSWG = 0.01; fprintf(stderr, "Temperature effect has caused pbswg to be less than 0.01. Pbswg is clamped to 0.01.\n"); } /* End of junction capacitance */ /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->BSIM3instances; here != NULL; here = here->BSIM3nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM3l == pSizeDependParamKnot->Length) && (here->BSIM3w == pSizeDependParamKnot->Width)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct bsim3SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->BSIM3l; Wdrn = here->BSIM3w; pParam->Length = Ldrn; pParam->Width = Wdrn; T0 = pow(Ldrn, model->BSIM3Lln); T1 = pow(Wdrn, model->BSIM3Lwn); tmp1 = model->BSIM3Ll / T0 + model->BSIM3Lw / T1 + model->BSIM3Lwl / (T0 * T1); pParam->BSIM3dl = model->BSIM3Lint + tmp1; tmp2 = model->BSIM3Llc / T0 + model->BSIM3Lwc / T1 + model->BSIM3Lwlc / (T0 * T1); pParam->BSIM3dlc = model->BSIM3dlc + tmp2; T2 = pow(Ldrn, model->BSIM3Wln); T3 = pow(Wdrn, model->BSIM3Wwn); tmp1 = model->BSIM3Wl / T2 + model->BSIM3Ww / T3 + model->BSIM3Wwl / (T2 * T3); pParam->BSIM3dw = model->BSIM3Wint + tmp1; tmp2 = model->BSIM3Wlc / T2 + model->BSIM3Wwc / T3 + model->BSIM3Wwlc / (T2 * T3); pParam->BSIM3dwc = model->BSIM3dwc + tmp2; pParam->BSIM3leff = here->BSIM3l + model->BSIM3xl - 2.0 * pParam->BSIM3dl; if (pParam->BSIM3leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3modName; namarray[1] = here->BSIM3name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM3weff = here->BSIM3w + model->BSIM3xw - 2.0 * pParam->BSIM3dw; if (pParam->BSIM3weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3modName; namarray[1] = here->BSIM3name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM3leffCV = here->BSIM3l + model->BSIM3xl - 2.0 * pParam->BSIM3dlc; if (pParam->BSIM3leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3modName; namarray[1] = here->BSIM3name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM3weffCV = here->BSIM3w + model->BSIM3xw - 2.0 * pParam->BSIM3dwc; if (pParam->BSIM3weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3modName; namarray[1] = here->BSIM3name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } if (model->BSIM3binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM3leff; Inv_W = 1.0e-6 / pParam->BSIM3weff; Inv_LW = 1.0e-12 / (pParam->BSIM3leff * pParam->BSIM3weff); } else { Inv_L = 1.0 / pParam->BSIM3leff; Inv_W = 1.0 / pParam->BSIM3weff; Inv_LW = 1.0 / (pParam->BSIM3leff * pParam->BSIM3weff); } pParam->BSIM3cdsc = model->BSIM3cdsc + model->BSIM3lcdsc * Inv_L + model->BSIM3wcdsc * Inv_W + model->BSIM3pcdsc * Inv_LW; pParam->BSIM3cdscb = model->BSIM3cdscb + model->BSIM3lcdscb * Inv_L + model->BSIM3wcdscb * Inv_W + model->BSIM3pcdscb * Inv_LW; pParam->BSIM3cdscd = model->BSIM3cdscd + model->BSIM3lcdscd * Inv_L + model->BSIM3wcdscd * Inv_W + model->BSIM3pcdscd * Inv_LW; pParam->BSIM3cit = model->BSIM3cit + model->BSIM3lcit * Inv_L + model->BSIM3wcit * Inv_W + model->BSIM3pcit * Inv_LW; pParam->BSIM3nfactor = model->BSIM3nfactor + model->BSIM3lnfactor * Inv_L + model->BSIM3wnfactor * Inv_W + model->BSIM3pnfactor * Inv_LW; pParam->BSIM3xj = model->BSIM3xj + model->BSIM3lxj * Inv_L + model->BSIM3wxj * Inv_W + model->BSIM3pxj * Inv_LW; pParam->BSIM3vsat = model->BSIM3vsat + model->BSIM3lvsat * Inv_L + model->BSIM3wvsat * Inv_W + model->BSIM3pvsat * Inv_LW; pParam->BSIM3at = model->BSIM3at + model->BSIM3lat * Inv_L + model->BSIM3wat * Inv_W + model->BSIM3pat * Inv_LW; pParam->BSIM3a0 = model->BSIM3a0 + model->BSIM3la0 * Inv_L + model->BSIM3wa0 * Inv_W + model->BSIM3pa0 * Inv_LW; pParam->BSIM3ags = model->BSIM3ags + model->BSIM3lags * Inv_L + model->BSIM3wags * Inv_W + model->BSIM3pags * Inv_LW; pParam->BSIM3a1 = model->BSIM3a1 + model->BSIM3la1 * Inv_L + model->BSIM3wa1 * Inv_W + model->BSIM3pa1 * Inv_LW; pParam->BSIM3a2 = model->BSIM3a2 + model->BSIM3la2 * Inv_L + model->BSIM3wa2 * Inv_W + model->BSIM3pa2 * Inv_LW; pParam->BSIM3keta = model->BSIM3keta + model->BSIM3lketa * Inv_L + model->BSIM3wketa * Inv_W + model->BSIM3pketa * Inv_LW; pParam->BSIM3nsub = model->BSIM3nsub + model->BSIM3lnsub * Inv_L + model->BSIM3wnsub * Inv_W + model->BSIM3pnsub * Inv_LW; pParam->BSIM3npeak = model->BSIM3npeak + model->BSIM3lnpeak * Inv_L + model->BSIM3wnpeak * Inv_W + model->BSIM3pnpeak * Inv_LW; pParam->BSIM3ngate = model->BSIM3ngate + model->BSIM3lngate * Inv_L + model->BSIM3wngate * Inv_W + model->BSIM3pngate * Inv_LW; pParam->BSIM3gamma1 = model->BSIM3gamma1 + model->BSIM3lgamma1 * Inv_L + model->BSIM3wgamma1 * Inv_W + model->BSIM3pgamma1 * Inv_LW; pParam->BSIM3gamma2 = model->BSIM3gamma2 + model->BSIM3lgamma2 * Inv_L + model->BSIM3wgamma2 * Inv_W + model->BSIM3pgamma2 * Inv_LW; pParam->BSIM3vbx = model->BSIM3vbx + model->BSIM3lvbx * Inv_L + model->BSIM3wvbx * Inv_W + model->BSIM3pvbx * Inv_LW; pParam->BSIM3vbm = model->BSIM3vbm + model->BSIM3lvbm * Inv_L + model->BSIM3wvbm * Inv_W + model->BSIM3pvbm * Inv_LW; pParam->BSIM3xt = model->BSIM3xt + model->BSIM3lxt * Inv_L + model->BSIM3wxt * Inv_W + model->BSIM3pxt * Inv_LW; pParam->BSIM3vfb = model->BSIM3vfb + model->BSIM3lvfb * Inv_L + model->BSIM3wvfb * Inv_W + model->BSIM3pvfb * Inv_LW; pParam->BSIM3k1 = model->BSIM3k1 + model->BSIM3lk1 * Inv_L + model->BSIM3wk1 * Inv_W + model->BSIM3pk1 * Inv_LW; pParam->BSIM3kt1 = model->BSIM3kt1 + model->BSIM3lkt1 * Inv_L + model->BSIM3wkt1 * Inv_W + model->BSIM3pkt1 * Inv_LW; pParam->BSIM3kt1l = model->BSIM3kt1l + model->BSIM3lkt1l * Inv_L + model->BSIM3wkt1l * Inv_W + model->BSIM3pkt1l * Inv_LW; pParam->BSIM3k2 = model->BSIM3k2 + model->BSIM3lk2 * Inv_L + model->BSIM3wk2 * Inv_W + model->BSIM3pk2 * Inv_LW; pParam->BSIM3kt2 = model->BSIM3kt2 + model->BSIM3lkt2 * Inv_L + model->BSIM3wkt2 * Inv_W + model->BSIM3pkt2 * Inv_LW; pParam->BSIM3k3 = model->BSIM3k3 + model->BSIM3lk3 * Inv_L + model->BSIM3wk3 * Inv_W + model->BSIM3pk3 * Inv_LW; pParam->BSIM3k3b = model->BSIM3k3b + model->BSIM3lk3b * Inv_L + model->BSIM3wk3b * Inv_W + model->BSIM3pk3b * Inv_LW; pParam->BSIM3w0 = model->BSIM3w0 + model->BSIM3lw0 * Inv_L + model->BSIM3ww0 * Inv_W + model->BSIM3pw0 * Inv_LW; pParam->BSIM3nlx = model->BSIM3nlx + model->BSIM3lnlx * Inv_L + model->BSIM3wnlx * Inv_W + model->BSIM3pnlx * Inv_LW; pParam->BSIM3dvt0 = model->BSIM3dvt0 + model->BSIM3ldvt0 * Inv_L + model->BSIM3wdvt0 * Inv_W + model->BSIM3pdvt0 * Inv_LW; pParam->BSIM3dvt1 = model->BSIM3dvt1 + model->BSIM3ldvt1 * Inv_L + model->BSIM3wdvt1 * Inv_W + model->BSIM3pdvt1 * Inv_LW; pParam->BSIM3dvt2 = model->BSIM3dvt2 + model->BSIM3ldvt2 * Inv_L + model->BSIM3wdvt2 * Inv_W + model->BSIM3pdvt2 * Inv_LW; pParam->BSIM3dvt0w = model->BSIM3dvt0w + model->BSIM3ldvt0w * Inv_L + model->BSIM3wdvt0w * Inv_W + model->BSIM3pdvt0w * Inv_LW; pParam->BSIM3dvt1w = model->BSIM3dvt1w + model->BSIM3ldvt1w * Inv_L + model->BSIM3wdvt1w * Inv_W + model->BSIM3pdvt1w * Inv_LW; pParam->BSIM3dvt2w = model->BSIM3dvt2w + model->BSIM3ldvt2w * Inv_L + model->BSIM3wdvt2w * Inv_W + model->BSIM3pdvt2w * Inv_LW; pParam->BSIM3drout = model->BSIM3drout + model->BSIM3ldrout * Inv_L + model->BSIM3wdrout * Inv_W + model->BSIM3pdrout * Inv_LW; pParam->BSIM3dsub = model->BSIM3dsub + model->BSIM3ldsub * Inv_L + model->BSIM3wdsub * Inv_W + model->BSIM3pdsub * Inv_LW; pParam->BSIM3vth0 = model->BSIM3vth0 + model->BSIM3lvth0 * Inv_L + model->BSIM3wvth0 * Inv_W + model->BSIM3pvth0 * Inv_LW; pParam->BSIM3ua = model->BSIM3ua + model->BSIM3lua * Inv_L + model->BSIM3wua * Inv_W + model->BSIM3pua * Inv_LW; pParam->BSIM3ua1 = model->BSIM3ua1 + model->BSIM3lua1 * Inv_L + model->BSIM3wua1 * Inv_W + model->BSIM3pua1 * Inv_LW; pParam->BSIM3ub = model->BSIM3ub + model->BSIM3lub * Inv_L + model->BSIM3wub * Inv_W + model->BSIM3pub * Inv_LW; pParam->BSIM3ub1 = model->BSIM3ub1 + model->BSIM3lub1 * Inv_L + model->BSIM3wub1 * Inv_W + model->BSIM3pub1 * Inv_LW; pParam->BSIM3uc = model->BSIM3uc + model->BSIM3luc * Inv_L + model->BSIM3wuc * Inv_W + model->BSIM3puc * Inv_LW; pParam->BSIM3uc1 = model->BSIM3uc1 + model->BSIM3luc1 * Inv_L + model->BSIM3wuc1 * Inv_W + model->BSIM3puc1 * Inv_LW; pParam->BSIM3u0 = model->BSIM3u0 + model->BSIM3lu0 * Inv_L + model->BSIM3wu0 * Inv_W + model->BSIM3pu0 * Inv_LW; pParam->BSIM3ute = model->BSIM3ute + model->BSIM3lute * Inv_L + model->BSIM3wute * Inv_W + model->BSIM3pute * Inv_LW; pParam->BSIM3voff = model->BSIM3voff + model->BSIM3lvoff * Inv_L + model->BSIM3wvoff * Inv_W + model->BSIM3pvoff * Inv_LW; pParam->BSIM3delta = model->BSIM3delta + model->BSIM3ldelta * Inv_L + model->BSIM3wdelta * Inv_W + model->BSIM3pdelta * Inv_LW; pParam->BSIM3rdsw = model->BSIM3rdsw + model->BSIM3lrdsw * Inv_L + model->BSIM3wrdsw * Inv_W + model->BSIM3prdsw * Inv_LW; pParam->BSIM3prwg = model->BSIM3prwg + model->BSIM3lprwg * Inv_L + model->BSIM3wprwg * Inv_W + model->BSIM3pprwg * Inv_LW; pParam->BSIM3prwb = model->BSIM3prwb + model->BSIM3lprwb * Inv_L + model->BSIM3wprwb * Inv_W + model->BSIM3pprwb * Inv_LW; pParam->BSIM3prt = model->BSIM3prt + model->BSIM3lprt * Inv_L + model->BSIM3wprt * Inv_W + model->BSIM3pprt * Inv_LW; pParam->BSIM3eta0 = model->BSIM3eta0 + model->BSIM3leta0 * Inv_L + model->BSIM3weta0 * Inv_W + model->BSIM3peta0 * Inv_LW; pParam->BSIM3etab = model->BSIM3etab + model->BSIM3letab * Inv_L + model->BSIM3wetab * Inv_W + model->BSIM3petab * Inv_LW; pParam->BSIM3pclm = model->BSIM3pclm + model->BSIM3lpclm * Inv_L + model->BSIM3wpclm * Inv_W + model->BSIM3ppclm * Inv_LW; pParam->BSIM3pdibl1 = model->BSIM3pdibl1 + model->BSIM3lpdibl1 * Inv_L + model->BSIM3wpdibl1 * Inv_W + model->BSIM3ppdibl1 * Inv_LW; pParam->BSIM3pdibl2 = model->BSIM3pdibl2 + model->BSIM3lpdibl2 * Inv_L + model->BSIM3wpdibl2 * Inv_W + model->BSIM3ppdibl2 * Inv_LW; pParam->BSIM3pdiblb = model->BSIM3pdiblb + model->BSIM3lpdiblb * Inv_L + model->BSIM3wpdiblb * Inv_W + model->BSIM3ppdiblb * Inv_LW; pParam->BSIM3pscbe1 = model->BSIM3pscbe1 + model->BSIM3lpscbe1 * Inv_L + model->BSIM3wpscbe1 * Inv_W + model->BSIM3ppscbe1 * Inv_LW; pParam->BSIM3pscbe2 = model->BSIM3pscbe2 + model->BSIM3lpscbe2 * Inv_L + model->BSIM3wpscbe2 * Inv_W + model->BSIM3ppscbe2 * Inv_LW; pParam->BSIM3pvag = model->BSIM3pvag + model->BSIM3lpvag * Inv_L + model->BSIM3wpvag * Inv_W + model->BSIM3ppvag * Inv_LW; pParam->BSIM3wr = model->BSIM3wr + model->BSIM3lwr * Inv_L + model->BSIM3wwr * Inv_W + model->BSIM3pwr * Inv_LW; pParam->BSIM3dwg = model->BSIM3dwg + model->BSIM3ldwg * Inv_L + model->BSIM3wdwg * Inv_W + model->BSIM3pdwg * Inv_LW; pParam->BSIM3dwb = model->BSIM3dwb + model->BSIM3ldwb * Inv_L + model->BSIM3wdwb * Inv_W + model->BSIM3pdwb * Inv_LW; pParam->BSIM3b0 = model->BSIM3b0 + model->BSIM3lb0 * Inv_L + model->BSIM3wb0 * Inv_W + model->BSIM3pb0 * Inv_LW; pParam->BSIM3b1 = model->BSIM3b1 + model->BSIM3lb1 * Inv_L + model->BSIM3wb1 * Inv_W + model->BSIM3pb1 * Inv_LW; pParam->BSIM3alpha0 = model->BSIM3alpha0 + model->BSIM3lalpha0 * Inv_L + model->BSIM3walpha0 * Inv_W + model->BSIM3palpha0 * Inv_LW; pParam->BSIM3alpha1 = model->BSIM3alpha1 + model->BSIM3lalpha1 * Inv_L + model->BSIM3walpha1 * Inv_W + model->BSIM3palpha1 * Inv_LW; pParam->BSIM3beta0 = model->BSIM3beta0 + model->BSIM3lbeta0 * Inv_L + model->BSIM3wbeta0 * Inv_W + model->BSIM3pbeta0 * Inv_LW; /* CV model */ pParam->BSIM3elm = model->BSIM3elm + model->BSIM3lelm * Inv_L + model->BSIM3welm * Inv_W + model->BSIM3pelm * Inv_LW; pParam->BSIM3cgsl = model->BSIM3cgsl + model->BSIM3lcgsl * Inv_L + model->BSIM3wcgsl * Inv_W + model->BSIM3pcgsl * Inv_LW; pParam->BSIM3cgdl = model->BSIM3cgdl + model->BSIM3lcgdl * Inv_L + model->BSIM3wcgdl * Inv_W + model->BSIM3pcgdl * Inv_LW; pParam->BSIM3ckappa = model->BSIM3ckappa + model->BSIM3lckappa * Inv_L + model->BSIM3wckappa * Inv_W + model->BSIM3pckappa * Inv_LW; pParam->BSIM3cf = model->BSIM3cf + model->BSIM3lcf * Inv_L + model->BSIM3wcf * Inv_W + model->BSIM3pcf * Inv_LW; pParam->BSIM3clc = model->BSIM3clc + model->BSIM3lclc * Inv_L + model->BSIM3wclc * Inv_W + model->BSIM3pclc * Inv_LW; pParam->BSIM3cle = model->BSIM3cle + model->BSIM3lcle * Inv_L + model->BSIM3wcle * Inv_W + model->BSIM3pcle * Inv_LW; pParam->BSIM3vfbcv = model->BSIM3vfbcv + model->BSIM3lvfbcv * Inv_L + model->BSIM3wvfbcv * Inv_W + model->BSIM3pvfbcv * Inv_LW; pParam->BSIM3acde = model->BSIM3acde + model->BSIM3lacde * Inv_L + model->BSIM3wacde * Inv_W + model->BSIM3pacde * Inv_LW; pParam->BSIM3moin = model->BSIM3moin + model->BSIM3lmoin * Inv_L + model->BSIM3wmoin * Inv_W + model->BSIM3pmoin * Inv_LW; pParam->BSIM3noff = model->BSIM3noff + model->BSIM3lnoff * Inv_L + model->BSIM3wnoff * Inv_W + model->BSIM3pnoff * Inv_LW; pParam->BSIM3voffcv = model->BSIM3voffcv + model->BSIM3lvoffcv * Inv_L + model->BSIM3wvoffcv * Inv_W + model->BSIM3pvoffcv * Inv_LW; pParam->BSIM3abulkCVfactor = 1.0 + pow((pParam->BSIM3clc / pParam->BSIM3leffCV), pParam->BSIM3cle); T0 = (TRatio - 1.0); pParam->BSIM3ua = pParam->BSIM3ua + pParam->BSIM3ua1 * T0; pParam->BSIM3ub = pParam->BSIM3ub + pParam->BSIM3ub1 * T0; pParam->BSIM3uc = pParam->BSIM3uc + pParam->BSIM3uc1 * T0; if (pParam->BSIM3u0 > 1.0) pParam->BSIM3u0 = pParam->BSIM3u0 / 1.0e4; pParam->BSIM3u0temp = pParam->BSIM3u0 * pow(TRatio, pParam->BSIM3ute); pParam->BSIM3vsattemp = pParam->BSIM3vsat - pParam->BSIM3at * T0; pParam->BSIM3rds0 = (pParam->BSIM3rdsw + pParam->BSIM3prt * T0) / pow(pParam->BSIM3weff * 1E6, pParam->BSIM3wr); if (BSIM3checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM3modName; namarray[1] = here->BSIM3name; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM3V3.3 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->BSIM3cgdo = (model->BSIM3cgdo + pParam->BSIM3cf) * pParam->BSIM3weffCV; pParam->BSIM3cgso = (model->BSIM3cgso + pParam->BSIM3cf) * pParam->BSIM3weffCV; pParam->BSIM3cgbo = model->BSIM3cgbo * pParam->BSIM3leffCV; T0 = pParam->BSIM3leffCV * pParam->BSIM3leffCV; pParam->BSIM3tconst = pParam->BSIM3u0temp * pParam->BSIM3elm / (model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV * T0); if (!model->BSIM3npeakGiven && model->BSIM3gamma1Given) { T0 = pParam->BSIM3gamma1 * model->BSIM3cox; pParam->BSIM3npeak = 3.021E22 * T0 * T0; } pParam->BSIM3phi = 2.0 * Vtm0 * log(pParam->BSIM3npeak / ni); pParam->BSIM3sqrtPhi = sqrt(pParam->BSIM3phi); pParam->BSIM3phis3 = pParam->BSIM3sqrtPhi * pParam->BSIM3phi; pParam->BSIM3Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM3npeak * 1.0e6)) * pParam->BSIM3sqrtPhi; pParam->BSIM3sqrtXdep0 = sqrt(pParam->BSIM3Xdep0); pParam->BSIM3litl = sqrt(3.0 * pParam->BSIM3xj * model->BSIM3tox); pParam->BSIM3vbi = Vtm0 * log(1.0e20 * pParam->BSIM3npeak / (ni * ni)); pParam->BSIM3cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM3npeak * 1.0e6 / 2.0 / pParam->BSIM3phi); pParam->BSIM3ldeb = sqrt(EPSSI * Vtm0 / (Charge_q * pParam->BSIM3npeak * 1.0e6)) / 3.0; pParam->BSIM3acde *= pow((pParam->BSIM3npeak / 2.0e16), -0.25); if (model->BSIM3k1Given || model->BSIM3k2Given) { if (!model->BSIM3k1Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3k1 = 0.53; } if (!model->BSIM3k2Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3k2 = -0.0186; } if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) { /* don't print in sensitivity */ if (model->BSIM3nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM3xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM3vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM3gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM3gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } } else { if (!model->BSIM3vbxGiven) pParam->BSIM3vbx = pParam->BSIM3phi - 7.7348e-4 * pParam->BSIM3npeak * pParam->BSIM3xt * pParam->BSIM3xt; if (pParam->BSIM3vbx > 0.0) pParam->BSIM3vbx = -pParam->BSIM3vbx; if (pParam->BSIM3vbm > 0.0) pParam->BSIM3vbm = -pParam->BSIM3vbm; if (!model->BSIM3gamma1Given) pParam->BSIM3gamma1 = 5.753e-12 * sqrt(pParam->BSIM3npeak) / model->BSIM3cox; if (!model->BSIM3gamma2Given) pParam->BSIM3gamma2 = 5.753e-12 * sqrt(pParam->BSIM3nsub) / model->BSIM3cox; T0 = pParam->BSIM3gamma1 - pParam->BSIM3gamma2; T1 = sqrt(pParam->BSIM3phi - pParam->BSIM3vbx) - pParam->BSIM3sqrtPhi; T2 = sqrt(pParam->BSIM3phi * (pParam->BSIM3phi - pParam->BSIM3vbm)) - pParam->BSIM3phi; pParam->BSIM3k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM3vbm); pParam->BSIM3k1 = pParam->BSIM3gamma2 - 2.0 * pParam->BSIM3k2 * sqrt(pParam->BSIM3phi - pParam->BSIM3vbm); } if (pParam->BSIM3k2 < 0.0) { T0 = 0.5 * pParam->BSIM3k1 / pParam->BSIM3k2; pParam->BSIM3vbsc = 0.9 * (pParam->BSIM3phi - T0 * T0); if (pParam->BSIM3vbsc > -3.0) pParam->BSIM3vbsc = -3.0; else if (pParam->BSIM3vbsc < -30.0) pParam->BSIM3vbsc = -30.0; } else { pParam->BSIM3vbsc = -30.0; } if (pParam->BSIM3vbsc > pParam->BSIM3vbm) pParam->BSIM3vbsc = pParam->BSIM3vbm; if (!model->BSIM3vfbGiven) { if (model->BSIM3vth0Given) { pParam->BSIM3vfb = model->BSIM3type * pParam->BSIM3vth0 - pParam->BSIM3phi - pParam->BSIM3k1 * pParam->BSIM3sqrtPhi; } else { pParam->BSIM3vfb = -1.0; } } if (!model->BSIM3vth0Given) { pParam->BSIM3vth0 = model->BSIM3type * (pParam->BSIM3vfb + pParam->BSIM3phi + pParam->BSIM3k1 * pParam->BSIM3sqrtPhi); } pParam->BSIM3k1ox = pParam->BSIM3k1 * model->BSIM3tox / model->BSIM3toxm; pParam->BSIM3k2ox = pParam->BSIM3k2 * model->BSIM3tox / model->BSIM3toxm; T1 = sqrt(EPSSI / EPSOX * model->BSIM3tox * pParam->BSIM3Xdep0); T0 = exp(-0.5 * pParam->BSIM3dsub * pParam->BSIM3leff / T1); pParam->BSIM3theta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->BSIM3drout * pParam->BSIM3leff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->BSIM3thetaRout = pParam->BSIM3pdibl1 * T2 + pParam->BSIM3pdibl2; tmp = sqrt(pParam->BSIM3Xdep0); tmp1 = pParam->BSIM3vbi - pParam->BSIM3phi; tmp2 = model->BSIM3factor1 * tmp; T0 = -0.5 * pParam->BSIM3dvt1w * pParam->BSIM3weff * pParam->BSIM3leff / tmp2; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->BSIM3dvt0w * T2; T2 = T0 * tmp1; T0 = -0.5 * pParam->BSIM3dvt1 * pParam->BSIM3leff / tmp2; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T3 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXP; T3 = T1 * (1.0 + 2.0 * T1); } T3 = pParam->BSIM3dvt0 * T3 * tmp1; T4 = model->BSIM3tox * pParam->BSIM3phi / (pParam->BSIM3weff + pParam->BSIM3w0); T0 = sqrt(1.0 + pParam->BSIM3nlx / pParam->BSIM3leff); T5 = pParam->BSIM3k1ox * (T0 - 1.0) * pParam->BSIM3sqrtPhi + (pParam->BSIM3kt1 + pParam->BSIM3kt1l / pParam->BSIM3leff) * (TRatio - 1.0); tmp3 = model->BSIM3type * pParam->BSIM3vth0 - T2 - T3 + pParam->BSIM3k3 * T4 + T5; pParam->BSIM3vfbzb = tmp3 - pParam->BSIM3phi - pParam->BSIM3k1 * pParam->BSIM3sqrtPhi; /* End of vfbzb */ } /* adding delvto */ here->BSIM3vth0 = pParam->BSIM3vth0 + here->BSIM3delvto; here->BSIM3vfb = pParam->BSIM3vfb + model->BSIM3type * here->BSIM3delvto; here->BSIM3vfbzb = pParam->BSIM3vfbzb + model->BSIM3type * here->BSIM3delvto; /* low field mobility multiplier */ here->BSIM3u0temp = pParam->BSIM3u0temp * here->BSIM3mulu0; here->BSIM3tconst = here->BSIM3u0temp * pParam->BSIM3elm / (model->BSIM3cox * pParam->BSIM3weffCV * pParam->BSIM3leffCV * T0); /* process source/drain series resistance */ /* ACM model */ if (model->BSIM3acmMod == 0) { here->BSIM3drainConductance = model->BSIM3sheetResistance * here->BSIM3drainSquares; here->BSIM3sourceConductance = model->BSIM3sheetResistance * here->BSIM3sourceSquares; } else /* ACM > 0 */ { error = ACM_SourceDrainResistances( model->BSIM3acmMod, model->BSIM3ld, model->BSIM3ldif, model->BSIM3hdif, model->BSIM3wmlt, here->BSIM3w, model->BSIM3xw, model->BSIM3sheetResistance, here->BSIM3drainSquaresGiven, model->BSIM3rd, model->BSIM3rdc, here->BSIM3drainSquares, here->BSIM3sourceSquaresGiven, model->BSIM3rs, model->BSIM3rsc, here->BSIM3sourceSquares, &(here->BSIM3drainConductance), &(here->BSIM3sourceConductance) ); if (error) return(error); } if (here->BSIM3drainConductance > 0.0) here->BSIM3drainConductance = 1.0 / here->BSIM3drainConductance; else here->BSIM3drainConductance = 0.0; if (here->BSIM3sourceConductance > 0.0) here->BSIM3sourceConductance = 1.0 / here->BSIM3sourceConductance; else here->BSIM3sourceConductance = 0.0; here->BSIM3cgso = pParam->BSIM3cgso; here->BSIM3cgdo = pParam->BSIM3cgdo; Nvtm = model->BSIM3vtm * model->BSIM3jctEmissionCoeff; if ((here->BSIM3sourceArea <= 0.0) && (here->BSIM3sourcePerimeter <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM3sourceArea * model->BSIM3jctTempSatCurDensity + here->BSIM3sourcePerimeter * model->BSIM3jctSidewallTempSatCurDensity; } if ((SourceSatCurrent > 0.0) && (model->BSIM3ijth > 0.0)) { here->BSIM3vjsm = Nvtm * log(model->BSIM3ijth / SourceSatCurrent + 1.0); here->BSIM3IsEvjsm = SourceSatCurrent * exp(here->BSIM3vjsm / Nvtm); } if ((here->BSIM3drainArea <= 0.0) && (here->BSIM3drainPerimeter <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM3drainArea * model->BSIM3jctTempSatCurDensity + here->BSIM3drainPerimeter * model->BSIM3jctSidewallTempSatCurDensity; } if ((DrainSatCurrent > 0.0) && (model->BSIM3ijth > 0.0)) { here->BSIM3vjdm = Nvtm * log(model->BSIM3ijth / DrainSatCurrent + 1.0); here->BSIM3IsEvjdm = DrainSatCurrent * exp(here->BSIM3vjdm / Nvtm); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3mpar.c0000644000265600020320000016510712264261473020613 0ustar andreasadmin/**** BSIM3v3.3.0, Released by Xuemei Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b3mpar.c of BSIM3v3.3.0 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "bsim3def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3mParam( int param, IFvalue *value, GENmodel *inMod) { BSIM3model *mod = (BSIM3model*)inMod; switch(param) { case BSIM3_MOD_MOBMOD : mod->BSIM3mobMod = value->iValue; mod->BSIM3mobModGiven = TRUE; break; case BSIM3_MOD_BINUNIT : mod->BSIM3binUnit = value->iValue; mod->BSIM3binUnitGiven = TRUE; break; case BSIM3_MOD_PARAMCHK : mod->BSIM3paramChk = value->iValue; mod->BSIM3paramChkGiven = TRUE; break; case BSIM3_MOD_CAPMOD : mod->BSIM3capMod = value->iValue; mod->BSIM3capModGiven = TRUE; break; case BSIM3_MOD_ACMMOD: mod->BSIM3acmMod = value->iValue; mod->BSIM3acmModGiven = TRUE; break; case BSIM3_MOD_CALCACM: mod->BSIM3calcacm = value->iValue; mod->BSIM3calcacmGiven = TRUE; break; case BSIM3_MOD_NOIMOD : mod->BSIM3noiMod = value->iValue; mod->BSIM3noiModGiven = TRUE; break; case BSIM3_MOD_NQSMOD : mod->BSIM3nqsMod = value->iValue; mod->BSIM3nqsModGiven = TRUE; break; case BSIM3_MOD_ACNQSMOD : mod->BSIM3acnqsMod = value->iValue; mod->BSIM3acnqsModGiven = TRUE; break; case BSIM3_MOD_VERSION : mod->BSIM3version = value->sValue; mod->BSIM3versionGiven = TRUE; break; case BSIM3_MOD_TOX : mod->BSIM3tox = value->rValue; mod->BSIM3toxGiven = TRUE; break; case BSIM3_MOD_TOXM : mod->BSIM3toxm = value->rValue; mod->BSIM3toxmGiven = TRUE; break; case BSIM3_MOD_CDSC : mod->BSIM3cdsc = value->rValue; mod->BSIM3cdscGiven = TRUE; break; case BSIM3_MOD_CDSCB : mod->BSIM3cdscb = value->rValue; mod->BSIM3cdscbGiven = TRUE; break; case BSIM3_MOD_CDSCD : mod->BSIM3cdscd = value->rValue; mod->BSIM3cdscdGiven = TRUE; break; case BSIM3_MOD_CIT : mod->BSIM3cit = value->rValue; mod->BSIM3citGiven = TRUE; break; case BSIM3_MOD_NFACTOR : mod->BSIM3nfactor = value->rValue; mod->BSIM3nfactorGiven = TRUE; break; case BSIM3_MOD_XJ: mod->BSIM3xj = value->rValue; mod->BSIM3xjGiven = TRUE; break; case BSIM3_MOD_VSAT: mod->BSIM3vsat = value->rValue; mod->BSIM3vsatGiven = TRUE; break; case BSIM3_MOD_A0: mod->BSIM3a0 = value->rValue; mod->BSIM3a0Given = TRUE; break; case BSIM3_MOD_AGS: mod->BSIM3ags= value->rValue; mod->BSIM3agsGiven = TRUE; break; case BSIM3_MOD_A1: mod->BSIM3a1 = value->rValue; mod->BSIM3a1Given = TRUE; break; case BSIM3_MOD_A2: mod->BSIM3a2 = value->rValue; mod->BSIM3a2Given = TRUE; break; case BSIM3_MOD_AT: mod->BSIM3at = value->rValue; mod->BSIM3atGiven = TRUE; break; case BSIM3_MOD_KETA: mod->BSIM3keta = value->rValue; mod->BSIM3ketaGiven = TRUE; break; case BSIM3_MOD_NSUB: mod->BSIM3nsub = value->rValue; mod->BSIM3nsubGiven = TRUE; break; case BSIM3_MOD_NPEAK: mod->BSIM3npeak = value->rValue; mod->BSIM3npeakGiven = TRUE; if (mod->BSIM3npeak > 1.0e20) mod->BSIM3npeak *= 1.0e-6; break; case BSIM3_MOD_NGATE: mod->BSIM3ngate = value->rValue; mod->BSIM3ngateGiven = TRUE; if (mod->BSIM3ngate > 1.0e23) mod->BSIM3ngate *= 1.0e-6; break; case BSIM3_MOD_GAMMA1: mod->BSIM3gamma1 = value->rValue; mod->BSIM3gamma1Given = TRUE; break; case BSIM3_MOD_GAMMA2: mod->BSIM3gamma2 = value->rValue; mod->BSIM3gamma2Given = TRUE; break; case BSIM3_MOD_VBX: mod->BSIM3vbx = value->rValue; mod->BSIM3vbxGiven = TRUE; break; case BSIM3_MOD_VBM: mod->BSIM3vbm = value->rValue; mod->BSIM3vbmGiven = TRUE; break; case BSIM3_MOD_XT: mod->BSIM3xt = value->rValue; mod->BSIM3xtGiven = TRUE; break; case BSIM3_MOD_K1: mod->BSIM3k1 = value->rValue; mod->BSIM3k1Given = TRUE; break; case BSIM3_MOD_KT1: mod->BSIM3kt1 = value->rValue; mod->BSIM3kt1Given = TRUE; break; case BSIM3_MOD_KT1L: mod->BSIM3kt1l = value->rValue; mod->BSIM3kt1lGiven = TRUE; break; case BSIM3_MOD_KT2: mod->BSIM3kt2 = value->rValue; mod->BSIM3kt2Given = TRUE; break; case BSIM3_MOD_K2: mod->BSIM3k2 = value->rValue; mod->BSIM3k2Given = TRUE; break; case BSIM3_MOD_K3: mod->BSIM3k3 = value->rValue; mod->BSIM3k3Given = TRUE; break; case BSIM3_MOD_K3B: mod->BSIM3k3b = value->rValue; mod->BSIM3k3bGiven = TRUE; break; case BSIM3_MOD_NLX: mod->BSIM3nlx = value->rValue; mod->BSIM3nlxGiven = TRUE; break; case BSIM3_MOD_W0: mod->BSIM3w0 = value->rValue; mod->BSIM3w0Given = TRUE; break; case BSIM3_MOD_DVT0: mod->BSIM3dvt0 = value->rValue; mod->BSIM3dvt0Given = TRUE; break; case BSIM3_MOD_DVT1: mod->BSIM3dvt1 = value->rValue; mod->BSIM3dvt1Given = TRUE; break; case BSIM3_MOD_DVT2: mod->BSIM3dvt2 = value->rValue; mod->BSIM3dvt2Given = TRUE; break; case BSIM3_MOD_DVT0W: mod->BSIM3dvt0w = value->rValue; mod->BSIM3dvt0wGiven = TRUE; break; case BSIM3_MOD_DVT1W: mod->BSIM3dvt1w = value->rValue; mod->BSIM3dvt1wGiven = TRUE; break; case BSIM3_MOD_DVT2W: mod->BSIM3dvt2w = value->rValue; mod->BSIM3dvt2wGiven = TRUE; break; case BSIM3_MOD_DROUT: mod->BSIM3drout = value->rValue; mod->BSIM3droutGiven = TRUE; break; case BSIM3_MOD_DSUB: mod->BSIM3dsub = value->rValue; mod->BSIM3dsubGiven = TRUE; break; case BSIM3_MOD_VTH0: mod->BSIM3vth0 = value->rValue; mod->BSIM3vth0Given = TRUE; break; case BSIM3_MOD_UA: mod->BSIM3ua = value->rValue; mod->BSIM3uaGiven = TRUE; break; case BSIM3_MOD_UA1: mod->BSIM3ua1 = value->rValue; mod->BSIM3ua1Given = TRUE; break; case BSIM3_MOD_UB: mod->BSIM3ub = value->rValue; mod->BSIM3ubGiven = TRUE; break; case BSIM3_MOD_UB1: mod->BSIM3ub1 = value->rValue; mod->BSIM3ub1Given = TRUE; break; case BSIM3_MOD_UC: mod->BSIM3uc = value->rValue; mod->BSIM3ucGiven = TRUE; break; case BSIM3_MOD_UC1: mod->BSIM3uc1 = value->rValue; mod->BSIM3uc1Given = TRUE; break; case BSIM3_MOD_U0 : mod->BSIM3u0 = value->rValue; mod->BSIM3u0Given = TRUE; break; case BSIM3_MOD_UTE : mod->BSIM3ute = value->rValue; mod->BSIM3uteGiven = TRUE; break; case BSIM3_MOD_VOFF: mod->BSIM3voff = value->rValue; mod->BSIM3voffGiven = TRUE; break; case BSIM3_MOD_DELTA : mod->BSIM3delta = value->rValue; mod->BSIM3deltaGiven = TRUE; break; case BSIM3_MOD_RDSW: mod->BSIM3rdsw = value->rValue; mod->BSIM3rdswGiven = TRUE; break; case BSIM3_MOD_PRWG: mod->BSIM3prwg = value->rValue; mod->BSIM3prwgGiven = TRUE; break; case BSIM3_MOD_PRWB: mod->BSIM3prwb = value->rValue; mod->BSIM3prwbGiven = TRUE; break; case BSIM3_MOD_PRT: mod->BSIM3prt = value->rValue; mod->BSIM3prtGiven = TRUE; break; case BSIM3_MOD_ETA0: mod->BSIM3eta0 = value->rValue; mod->BSIM3eta0Given = TRUE; break; case BSIM3_MOD_ETAB: mod->BSIM3etab = value->rValue; mod->BSIM3etabGiven = TRUE; break; case BSIM3_MOD_PCLM: mod->BSIM3pclm = value->rValue; mod->BSIM3pclmGiven = TRUE; break; case BSIM3_MOD_PDIBL1: mod->BSIM3pdibl1 = value->rValue; mod->BSIM3pdibl1Given = TRUE; break; case BSIM3_MOD_PDIBL2: mod->BSIM3pdibl2 = value->rValue; mod->BSIM3pdibl2Given = TRUE; break; case BSIM3_MOD_PDIBLB: mod->BSIM3pdiblb = value->rValue; mod->BSIM3pdiblbGiven = TRUE; break; case BSIM3_MOD_PSCBE1: mod->BSIM3pscbe1 = value->rValue; mod->BSIM3pscbe1Given = TRUE; break; case BSIM3_MOD_PSCBE2: mod->BSIM3pscbe2 = value->rValue; mod->BSIM3pscbe2Given = TRUE; break; case BSIM3_MOD_PVAG: mod->BSIM3pvag = value->rValue; mod->BSIM3pvagGiven = TRUE; break; case BSIM3_MOD_WR : mod->BSIM3wr = value->rValue; mod->BSIM3wrGiven = TRUE; break; case BSIM3_MOD_DWG : mod->BSIM3dwg = value->rValue; mod->BSIM3dwgGiven = TRUE; break; case BSIM3_MOD_DWB : mod->BSIM3dwb = value->rValue; mod->BSIM3dwbGiven = TRUE; break; case BSIM3_MOD_B0 : mod->BSIM3b0 = value->rValue; mod->BSIM3b0Given = TRUE; break; case BSIM3_MOD_B1 : mod->BSIM3b1 = value->rValue; mod->BSIM3b1Given = TRUE; break; case BSIM3_MOD_ALPHA0 : mod->BSIM3alpha0 = value->rValue; mod->BSIM3alpha0Given = TRUE; break; case BSIM3_MOD_ALPHA1 : mod->BSIM3alpha1 = value->rValue; mod->BSIM3alpha1Given = TRUE; break; case BSIM3_MOD_BETA0 : mod->BSIM3beta0 = value->rValue; mod->BSIM3beta0Given = TRUE; break; case BSIM3_MOD_IJTH : mod->BSIM3ijth = value->rValue; mod->BSIM3ijthGiven = TRUE; break; case BSIM3_MOD_VFB : mod->BSIM3vfb = value->rValue; mod->BSIM3vfbGiven = TRUE; break; case BSIM3_MOD_ELM : mod->BSIM3elm = value->rValue; mod->BSIM3elmGiven = TRUE; break; case BSIM3_MOD_CGSL : mod->BSIM3cgsl = value->rValue; mod->BSIM3cgslGiven = TRUE; break; case BSIM3_MOD_CGDL : mod->BSIM3cgdl = value->rValue; mod->BSIM3cgdlGiven = TRUE; break; case BSIM3_MOD_CKAPPA : mod->BSIM3ckappa = value->rValue; mod->BSIM3ckappaGiven = TRUE; break; case BSIM3_MOD_CF : mod->BSIM3cf = value->rValue; mod->BSIM3cfGiven = TRUE; break; case BSIM3_MOD_CLC : mod->BSIM3clc = value->rValue; mod->BSIM3clcGiven = TRUE; break; case BSIM3_MOD_CLE : mod->BSIM3cle = value->rValue; mod->BSIM3cleGiven = TRUE; break; case BSIM3_MOD_DWC : mod->BSIM3dwc = value->rValue; mod->BSIM3dwcGiven = TRUE; break; case BSIM3_MOD_DLC : mod->BSIM3dlc = value->rValue; mod->BSIM3dlcGiven = TRUE; break; case BSIM3_MOD_VFBCV : mod->BSIM3vfbcv = value->rValue; mod->BSIM3vfbcvGiven = TRUE; break; case BSIM3_MOD_ACDE : mod->BSIM3acde = value->rValue; mod->BSIM3acdeGiven = TRUE; break; case BSIM3_MOD_MOIN : mod->BSIM3moin = value->rValue; mod->BSIM3moinGiven = TRUE; break; case BSIM3_MOD_NOFF : mod->BSIM3noff = value->rValue; mod->BSIM3noffGiven = TRUE; break; case BSIM3_MOD_VOFFCV : mod->BSIM3voffcv = value->rValue; mod->BSIM3voffcvGiven = TRUE; break; case BSIM3_MOD_TCJ : mod->BSIM3tcj = value->rValue; mod->BSIM3tcjGiven = TRUE; break; case BSIM3_MOD_TPB : mod->BSIM3tpb = value->rValue; mod->BSIM3tpbGiven = TRUE; break; case BSIM3_MOD_TCJSW : mod->BSIM3tcjsw = value->rValue; mod->BSIM3tcjswGiven = TRUE; break; case BSIM3_MOD_TPBSW : mod->BSIM3tpbsw = value->rValue; mod->BSIM3tpbswGiven = TRUE; break; case BSIM3_MOD_TCJSWG : mod->BSIM3tcjswg = value->rValue; mod->BSIM3tcjswgGiven = TRUE; break; case BSIM3_MOD_TPBSWG : mod->BSIM3tpbswg = value->rValue; mod->BSIM3tpbswgGiven = TRUE; break; /* acm model */ case BSIM3_MOD_HDIF: mod->BSIM3hdif = value->rValue; mod->BSIM3hdifGiven = TRUE; break; case BSIM3_MOD_LDIF: mod->BSIM3ldif = value->rValue; mod->BSIM3ldifGiven = TRUE; break; case BSIM3_MOD_LD: mod->BSIM3ld = value->rValue; mod->BSIM3ldGiven = TRUE; break; case BSIM3_MOD_RD: mod->BSIM3rd = value->rValue; mod->BSIM3rdGiven = TRUE; break; case BSIM3_MOD_RS: mod->BSIM3rs = value->rValue; mod->BSIM3rsGiven = TRUE; break; case BSIM3_MOD_RDC: mod->BSIM3rdc = value->rValue; mod->BSIM3rdcGiven = TRUE; break; case BSIM3_MOD_RSC: mod->BSIM3rsc = value->rValue; mod->BSIM3rscGiven = TRUE; break; case BSIM3_MOD_WMLT: mod->BSIM3wmlt = value->rValue; mod->BSIM3wmltGiven = TRUE; break; /* Length dependence */ case BSIM3_MOD_LCDSC : mod->BSIM3lcdsc = value->rValue; mod->BSIM3lcdscGiven = TRUE; break; case BSIM3_MOD_LCDSCB : mod->BSIM3lcdscb = value->rValue; mod->BSIM3lcdscbGiven = TRUE; break; case BSIM3_MOD_LCDSCD : mod->BSIM3lcdscd = value->rValue; mod->BSIM3lcdscdGiven = TRUE; break; case BSIM3_MOD_LCIT : mod->BSIM3lcit = value->rValue; mod->BSIM3lcitGiven = TRUE; break; case BSIM3_MOD_LNFACTOR : mod->BSIM3lnfactor = value->rValue; mod->BSIM3lnfactorGiven = TRUE; break; case BSIM3_MOD_LXJ: mod->BSIM3lxj = value->rValue; mod->BSIM3lxjGiven = TRUE; break; case BSIM3_MOD_LVSAT: mod->BSIM3lvsat = value->rValue; mod->BSIM3lvsatGiven = TRUE; break; case BSIM3_MOD_LA0: mod->BSIM3la0 = value->rValue; mod->BSIM3la0Given = TRUE; break; case BSIM3_MOD_LAGS: mod->BSIM3lags = value->rValue; mod->BSIM3lagsGiven = TRUE; break; case BSIM3_MOD_LA1: mod->BSIM3la1 = value->rValue; mod->BSIM3la1Given = TRUE; break; case BSIM3_MOD_LA2: mod->BSIM3la2 = value->rValue; mod->BSIM3la2Given = TRUE; break; case BSIM3_MOD_LAT: mod->BSIM3lat = value->rValue; mod->BSIM3latGiven = TRUE; break; case BSIM3_MOD_LKETA: mod->BSIM3lketa = value->rValue; mod->BSIM3lketaGiven = TRUE; break; case BSIM3_MOD_LNSUB: mod->BSIM3lnsub = value->rValue; mod->BSIM3lnsubGiven = TRUE; break; case BSIM3_MOD_LNPEAK: mod->BSIM3lnpeak = value->rValue; mod->BSIM3lnpeakGiven = TRUE; if (mod->BSIM3lnpeak > 1.0e20) mod->BSIM3lnpeak *= 1.0e-6; break; case BSIM3_MOD_LNGATE: mod->BSIM3lngate = value->rValue; mod->BSIM3lngateGiven = TRUE; if (mod->BSIM3lngate > 1.0e23) mod->BSIM3lngate *= 1.0e-6; break; case BSIM3_MOD_LGAMMA1: mod->BSIM3lgamma1 = value->rValue; mod->BSIM3lgamma1Given = TRUE; break; case BSIM3_MOD_LGAMMA2: mod->BSIM3lgamma2 = value->rValue; mod->BSIM3lgamma2Given = TRUE; break; case BSIM3_MOD_LVBX: mod->BSIM3lvbx = value->rValue; mod->BSIM3lvbxGiven = TRUE; break; case BSIM3_MOD_LVBM: mod->BSIM3lvbm = value->rValue; mod->BSIM3lvbmGiven = TRUE; break; case BSIM3_MOD_LXT: mod->BSIM3lxt = value->rValue; mod->BSIM3lxtGiven = TRUE; break; case BSIM3_MOD_LK1: mod->BSIM3lk1 = value->rValue; mod->BSIM3lk1Given = TRUE; break; case BSIM3_MOD_LKT1: mod->BSIM3lkt1 = value->rValue; mod->BSIM3lkt1Given = TRUE; break; case BSIM3_MOD_LKT1L: mod->BSIM3lkt1l = value->rValue; mod->BSIM3lkt1lGiven = TRUE; break; case BSIM3_MOD_LKT2: mod->BSIM3lkt2 = value->rValue; mod->BSIM3lkt2Given = TRUE; break; case BSIM3_MOD_LK2: mod->BSIM3lk2 = value->rValue; mod->BSIM3lk2Given = TRUE; break; case BSIM3_MOD_LK3: mod->BSIM3lk3 = value->rValue; mod->BSIM3lk3Given = TRUE; break; case BSIM3_MOD_LK3B: mod->BSIM3lk3b = value->rValue; mod->BSIM3lk3bGiven = TRUE; break; case BSIM3_MOD_LNLX: mod->BSIM3lnlx = value->rValue; mod->BSIM3lnlxGiven = TRUE; break; case BSIM3_MOD_LW0: mod->BSIM3lw0 = value->rValue; mod->BSIM3lw0Given = TRUE; break; case BSIM3_MOD_LDVT0: mod->BSIM3ldvt0 = value->rValue; mod->BSIM3ldvt0Given = TRUE; break; case BSIM3_MOD_LDVT1: mod->BSIM3ldvt1 = value->rValue; mod->BSIM3ldvt1Given = TRUE; break; case BSIM3_MOD_LDVT2: mod->BSIM3ldvt2 = value->rValue; mod->BSIM3ldvt2Given = TRUE; break; case BSIM3_MOD_LDVT0W: mod->BSIM3ldvt0w = value->rValue; mod->BSIM3ldvt0wGiven = TRUE; break; case BSIM3_MOD_LDVT1W: mod->BSIM3ldvt1w = value->rValue; mod->BSIM3ldvt1wGiven = TRUE; break; case BSIM3_MOD_LDVT2W: mod->BSIM3ldvt2w = value->rValue; mod->BSIM3ldvt2wGiven = TRUE; break; case BSIM3_MOD_LDROUT: mod->BSIM3ldrout = value->rValue; mod->BSIM3ldroutGiven = TRUE; break; case BSIM3_MOD_LDSUB: mod->BSIM3ldsub = value->rValue; mod->BSIM3ldsubGiven = TRUE; break; case BSIM3_MOD_LVTH0: mod->BSIM3lvth0 = value->rValue; mod->BSIM3lvth0Given = TRUE; break; case BSIM3_MOD_LUA: mod->BSIM3lua = value->rValue; mod->BSIM3luaGiven = TRUE; break; case BSIM3_MOD_LUA1: mod->BSIM3lua1 = value->rValue; mod->BSIM3lua1Given = TRUE; break; case BSIM3_MOD_LUB: mod->BSIM3lub = value->rValue; mod->BSIM3lubGiven = TRUE; break; case BSIM3_MOD_LUB1: mod->BSIM3lub1 = value->rValue; mod->BSIM3lub1Given = TRUE; break; case BSIM3_MOD_LUC: mod->BSIM3luc = value->rValue; mod->BSIM3lucGiven = TRUE; break; case BSIM3_MOD_LUC1: mod->BSIM3luc1 = value->rValue; mod->BSIM3luc1Given = TRUE; break; case BSIM3_MOD_LU0 : mod->BSIM3lu0 = value->rValue; mod->BSIM3lu0Given = TRUE; break; case BSIM3_MOD_LUTE : mod->BSIM3lute = value->rValue; mod->BSIM3luteGiven = TRUE; break; case BSIM3_MOD_LVOFF: mod->BSIM3lvoff = value->rValue; mod->BSIM3lvoffGiven = TRUE; break; case BSIM3_MOD_LDELTA : mod->BSIM3ldelta = value->rValue; mod->BSIM3ldeltaGiven = TRUE; break; case BSIM3_MOD_LRDSW: mod->BSIM3lrdsw = value->rValue; mod->BSIM3lrdswGiven = TRUE; break; case BSIM3_MOD_LPRWB: mod->BSIM3lprwb = value->rValue; mod->BSIM3lprwbGiven = TRUE; break; case BSIM3_MOD_LPRWG: mod->BSIM3lprwg = value->rValue; mod->BSIM3lprwgGiven = TRUE; break; case BSIM3_MOD_LPRT: mod->BSIM3lprt = value->rValue; mod->BSIM3lprtGiven = TRUE; break; case BSIM3_MOD_LETA0: mod->BSIM3leta0 = value->rValue; mod->BSIM3leta0Given = TRUE; break; case BSIM3_MOD_LETAB: mod->BSIM3letab = value->rValue; mod->BSIM3letabGiven = TRUE; break; case BSIM3_MOD_LPCLM: mod->BSIM3lpclm = value->rValue; mod->BSIM3lpclmGiven = TRUE; break; case BSIM3_MOD_LPDIBL1: mod->BSIM3lpdibl1 = value->rValue; mod->BSIM3lpdibl1Given = TRUE; break; case BSIM3_MOD_LPDIBL2: mod->BSIM3lpdibl2 = value->rValue; mod->BSIM3lpdibl2Given = TRUE; break; case BSIM3_MOD_LPDIBLB: mod->BSIM3lpdiblb = value->rValue; mod->BSIM3lpdiblbGiven = TRUE; break; case BSIM3_MOD_LPSCBE1: mod->BSIM3lpscbe1 = value->rValue; mod->BSIM3lpscbe1Given = TRUE; break; case BSIM3_MOD_LPSCBE2: mod->BSIM3lpscbe2 = value->rValue; mod->BSIM3lpscbe2Given = TRUE; break; case BSIM3_MOD_LPVAG: mod->BSIM3lpvag = value->rValue; mod->BSIM3lpvagGiven = TRUE; break; case BSIM3_MOD_LWR : mod->BSIM3lwr = value->rValue; mod->BSIM3lwrGiven = TRUE; break; case BSIM3_MOD_LDWG : mod->BSIM3ldwg = value->rValue; mod->BSIM3ldwgGiven = TRUE; break; case BSIM3_MOD_LDWB : mod->BSIM3ldwb = value->rValue; mod->BSIM3ldwbGiven = TRUE; break; case BSIM3_MOD_LB0 : mod->BSIM3lb0 = value->rValue; mod->BSIM3lb0Given = TRUE; break; case BSIM3_MOD_LB1 : mod->BSIM3lb1 = value->rValue; mod->BSIM3lb1Given = TRUE; break; case BSIM3_MOD_LALPHA0 : mod->BSIM3lalpha0 = value->rValue; mod->BSIM3lalpha0Given = TRUE; break; case BSIM3_MOD_LALPHA1 : mod->BSIM3lalpha1 = value->rValue; mod->BSIM3lalpha1Given = TRUE; break; case BSIM3_MOD_LBETA0 : mod->BSIM3lbeta0 = value->rValue; mod->BSIM3lbeta0Given = TRUE; break; case BSIM3_MOD_LVFB : mod->BSIM3lvfb = value->rValue; mod->BSIM3lvfbGiven = TRUE; break; case BSIM3_MOD_LELM : mod->BSIM3lelm = value->rValue; mod->BSIM3lelmGiven = TRUE; break; case BSIM3_MOD_LCGSL : mod->BSIM3lcgsl = value->rValue; mod->BSIM3lcgslGiven = TRUE; break; case BSIM3_MOD_LCGDL : mod->BSIM3lcgdl = value->rValue; mod->BSIM3lcgdlGiven = TRUE; break; case BSIM3_MOD_LCKAPPA : mod->BSIM3lckappa = value->rValue; mod->BSIM3lckappaGiven = TRUE; break; case BSIM3_MOD_LCF : mod->BSIM3lcf = value->rValue; mod->BSIM3lcfGiven = TRUE; break; case BSIM3_MOD_LCLC : mod->BSIM3lclc = value->rValue; mod->BSIM3lclcGiven = TRUE; break; case BSIM3_MOD_LCLE : mod->BSIM3lcle = value->rValue; mod->BSIM3lcleGiven = TRUE; break; case BSIM3_MOD_LVFBCV : mod->BSIM3lvfbcv = value->rValue; mod->BSIM3lvfbcvGiven = TRUE; break; case BSIM3_MOD_LACDE : mod->BSIM3lacde = value->rValue; mod->BSIM3lacdeGiven = TRUE; break; case BSIM3_MOD_LMOIN : mod->BSIM3lmoin = value->rValue; mod->BSIM3lmoinGiven = TRUE; break; case BSIM3_MOD_LNOFF : mod->BSIM3lnoff = value->rValue; mod->BSIM3lnoffGiven = TRUE; break; case BSIM3_MOD_LVOFFCV : mod->BSIM3lvoffcv = value->rValue; mod->BSIM3lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM3_MOD_WCDSC : mod->BSIM3wcdsc = value->rValue; mod->BSIM3wcdscGiven = TRUE; break; case BSIM3_MOD_WCDSCB : mod->BSIM3wcdscb = value->rValue; mod->BSIM3wcdscbGiven = TRUE; break; case BSIM3_MOD_WCDSCD : mod->BSIM3wcdscd = value->rValue; mod->BSIM3wcdscdGiven = TRUE; break; case BSIM3_MOD_WCIT : mod->BSIM3wcit = value->rValue; mod->BSIM3wcitGiven = TRUE; break; case BSIM3_MOD_WNFACTOR : mod->BSIM3wnfactor = value->rValue; mod->BSIM3wnfactorGiven = TRUE; break; case BSIM3_MOD_WXJ: mod->BSIM3wxj = value->rValue; mod->BSIM3wxjGiven = TRUE; break; case BSIM3_MOD_WVSAT: mod->BSIM3wvsat = value->rValue; mod->BSIM3wvsatGiven = TRUE; break; case BSIM3_MOD_WA0: mod->BSIM3wa0 = value->rValue; mod->BSIM3wa0Given = TRUE; break; case BSIM3_MOD_WAGS: mod->BSIM3wags = value->rValue; mod->BSIM3wagsGiven = TRUE; break; case BSIM3_MOD_WA1: mod->BSIM3wa1 = value->rValue; mod->BSIM3wa1Given = TRUE; break; case BSIM3_MOD_WA2: mod->BSIM3wa2 = value->rValue; mod->BSIM3wa2Given = TRUE; break; case BSIM3_MOD_WAT: mod->BSIM3wat = value->rValue; mod->BSIM3watGiven = TRUE; break; case BSIM3_MOD_WKETA: mod->BSIM3wketa = value->rValue; mod->BSIM3wketaGiven = TRUE; break; case BSIM3_MOD_WNSUB: mod->BSIM3wnsub = value->rValue; mod->BSIM3wnsubGiven = TRUE; break; case BSIM3_MOD_WNPEAK: mod->BSIM3wnpeak = value->rValue; mod->BSIM3wnpeakGiven = TRUE; if (mod->BSIM3wnpeak > 1.0e20) mod->BSIM3wnpeak *= 1.0e-6; break; case BSIM3_MOD_WNGATE: mod->BSIM3wngate = value->rValue; mod->BSIM3wngateGiven = TRUE; if (mod->BSIM3wngate > 1.0e23) mod->BSIM3wngate *= 1.0e-6; break; case BSIM3_MOD_WGAMMA1: mod->BSIM3wgamma1 = value->rValue; mod->BSIM3wgamma1Given = TRUE; break; case BSIM3_MOD_WGAMMA2: mod->BSIM3wgamma2 = value->rValue; mod->BSIM3wgamma2Given = TRUE; break; case BSIM3_MOD_WVBX: mod->BSIM3wvbx = value->rValue; mod->BSIM3wvbxGiven = TRUE; break; case BSIM3_MOD_WVBM: mod->BSIM3wvbm = value->rValue; mod->BSIM3wvbmGiven = TRUE; break; case BSIM3_MOD_WXT: mod->BSIM3wxt = value->rValue; mod->BSIM3wxtGiven = TRUE; break; case BSIM3_MOD_WK1: mod->BSIM3wk1 = value->rValue; mod->BSIM3wk1Given = TRUE; break; case BSIM3_MOD_WKT1: mod->BSIM3wkt1 = value->rValue; mod->BSIM3wkt1Given = TRUE; break; case BSIM3_MOD_WKT1L: mod->BSIM3wkt1l = value->rValue; mod->BSIM3wkt1lGiven = TRUE; break; case BSIM3_MOD_WKT2: mod->BSIM3wkt2 = value->rValue; mod->BSIM3wkt2Given = TRUE; break; case BSIM3_MOD_WK2: mod->BSIM3wk2 = value->rValue; mod->BSIM3wk2Given = TRUE; break; case BSIM3_MOD_WK3: mod->BSIM3wk3 = value->rValue; mod->BSIM3wk3Given = TRUE; break; case BSIM3_MOD_WK3B: mod->BSIM3wk3b = value->rValue; mod->BSIM3wk3bGiven = TRUE; break; case BSIM3_MOD_WNLX: mod->BSIM3wnlx = value->rValue; mod->BSIM3wnlxGiven = TRUE; break; case BSIM3_MOD_WW0: mod->BSIM3ww0 = value->rValue; mod->BSIM3ww0Given = TRUE; break; case BSIM3_MOD_WDVT0: mod->BSIM3wdvt0 = value->rValue; mod->BSIM3wdvt0Given = TRUE; break; case BSIM3_MOD_WDVT1: mod->BSIM3wdvt1 = value->rValue; mod->BSIM3wdvt1Given = TRUE; break; case BSIM3_MOD_WDVT2: mod->BSIM3wdvt2 = value->rValue; mod->BSIM3wdvt2Given = TRUE; break; case BSIM3_MOD_WDVT0W: mod->BSIM3wdvt0w = value->rValue; mod->BSIM3wdvt0wGiven = TRUE; break; case BSIM3_MOD_WDVT1W: mod->BSIM3wdvt1w = value->rValue; mod->BSIM3wdvt1wGiven = TRUE; break; case BSIM3_MOD_WDVT2W: mod->BSIM3wdvt2w = value->rValue; mod->BSIM3wdvt2wGiven = TRUE; break; case BSIM3_MOD_WDROUT: mod->BSIM3wdrout = value->rValue; mod->BSIM3wdroutGiven = TRUE; break; case BSIM3_MOD_WDSUB: mod->BSIM3wdsub = value->rValue; mod->BSIM3wdsubGiven = TRUE; break; case BSIM3_MOD_WVTH0: mod->BSIM3wvth0 = value->rValue; mod->BSIM3wvth0Given = TRUE; break; case BSIM3_MOD_WUA: mod->BSIM3wua = value->rValue; mod->BSIM3wuaGiven = TRUE; break; case BSIM3_MOD_WUA1: mod->BSIM3wua1 = value->rValue; mod->BSIM3wua1Given = TRUE; break; case BSIM3_MOD_WUB: mod->BSIM3wub = value->rValue; mod->BSIM3wubGiven = TRUE; break; case BSIM3_MOD_WUB1: mod->BSIM3wub1 = value->rValue; mod->BSIM3wub1Given = TRUE; break; case BSIM3_MOD_WUC: mod->BSIM3wuc = value->rValue; mod->BSIM3wucGiven = TRUE; break; case BSIM3_MOD_WUC1: mod->BSIM3wuc1 = value->rValue; mod->BSIM3wuc1Given = TRUE; break; case BSIM3_MOD_WU0 : mod->BSIM3wu0 = value->rValue; mod->BSIM3wu0Given = TRUE; break; case BSIM3_MOD_WUTE : mod->BSIM3wute = value->rValue; mod->BSIM3wuteGiven = TRUE; break; case BSIM3_MOD_WVOFF: mod->BSIM3wvoff = value->rValue; mod->BSIM3wvoffGiven = TRUE; break; case BSIM3_MOD_WDELTA : mod->BSIM3wdelta = value->rValue; mod->BSIM3wdeltaGiven = TRUE; break; case BSIM3_MOD_WRDSW: mod->BSIM3wrdsw = value->rValue; mod->BSIM3wrdswGiven = TRUE; break; case BSIM3_MOD_WPRWB: mod->BSIM3wprwb = value->rValue; mod->BSIM3wprwbGiven = TRUE; break; case BSIM3_MOD_WPRWG: mod->BSIM3wprwg = value->rValue; mod->BSIM3wprwgGiven = TRUE; break; case BSIM3_MOD_WPRT: mod->BSIM3wprt = value->rValue; mod->BSIM3wprtGiven = TRUE; break; case BSIM3_MOD_WETA0: mod->BSIM3weta0 = value->rValue; mod->BSIM3weta0Given = TRUE; break; case BSIM3_MOD_WETAB: mod->BSIM3wetab = value->rValue; mod->BSIM3wetabGiven = TRUE; break; case BSIM3_MOD_WPCLM: mod->BSIM3wpclm = value->rValue; mod->BSIM3wpclmGiven = TRUE; break; case BSIM3_MOD_WPDIBL1: mod->BSIM3wpdibl1 = value->rValue; mod->BSIM3wpdibl1Given = TRUE; break; case BSIM3_MOD_WPDIBL2: mod->BSIM3wpdibl2 = value->rValue; mod->BSIM3wpdibl2Given = TRUE; break; case BSIM3_MOD_WPDIBLB: mod->BSIM3wpdiblb = value->rValue; mod->BSIM3wpdiblbGiven = TRUE; break; case BSIM3_MOD_WPSCBE1: mod->BSIM3wpscbe1 = value->rValue; mod->BSIM3wpscbe1Given = TRUE; break; case BSIM3_MOD_WPSCBE2: mod->BSIM3wpscbe2 = value->rValue; mod->BSIM3wpscbe2Given = TRUE; break; case BSIM3_MOD_WPVAG: mod->BSIM3wpvag = value->rValue; mod->BSIM3wpvagGiven = TRUE; break; case BSIM3_MOD_WWR : mod->BSIM3wwr = value->rValue; mod->BSIM3wwrGiven = TRUE; break; case BSIM3_MOD_WDWG : mod->BSIM3wdwg = value->rValue; mod->BSIM3wdwgGiven = TRUE; break; case BSIM3_MOD_WDWB : mod->BSIM3wdwb = value->rValue; mod->BSIM3wdwbGiven = TRUE; break; case BSIM3_MOD_WB0 : mod->BSIM3wb0 = value->rValue; mod->BSIM3wb0Given = TRUE; break; case BSIM3_MOD_WB1 : mod->BSIM3wb1 = value->rValue; mod->BSIM3wb1Given = TRUE; break; case BSIM3_MOD_WALPHA0 : mod->BSIM3walpha0 = value->rValue; mod->BSIM3walpha0Given = TRUE; break; case BSIM3_MOD_WALPHA1 : mod->BSIM3walpha1 = value->rValue; mod->BSIM3walpha1Given = TRUE; break; case BSIM3_MOD_WBETA0 : mod->BSIM3wbeta0 = value->rValue; mod->BSIM3wbeta0Given = TRUE; break; case BSIM3_MOD_WVFB : mod->BSIM3wvfb = value->rValue; mod->BSIM3wvfbGiven = TRUE; break; case BSIM3_MOD_WELM : mod->BSIM3welm = value->rValue; mod->BSIM3welmGiven = TRUE; break; case BSIM3_MOD_WCGSL : mod->BSIM3wcgsl = value->rValue; mod->BSIM3wcgslGiven = TRUE; break; case BSIM3_MOD_WCGDL : mod->BSIM3wcgdl = value->rValue; mod->BSIM3wcgdlGiven = TRUE; break; case BSIM3_MOD_WCKAPPA : mod->BSIM3wckappa = value->rValue; mod->BSIM3wckappaGiven = TRUE; break; case BSIM3_MOD_WCF : mod->BSIM3wcf = value->rValue; mod->BSIM3wcfGiven = TRUE; break; case BSIM3_MOD_WCLC : mod->BSIM3wclc = value->rValue; mod->BSIM3wclcGiven = TRUE; break; case BSIM3_MOD_WCLE : mod->BSIM3wcle = value->rValue; mod->BSIM3wcleGiven = TRUE; break; case BSIM3_MOD_WVFBCV : mod->BSIM3wvfbcv = value->rValue; mod->BSIM3wvfbcvGiven = TRUE; break; case BSIM3_MOD_WACDE : mod->BSIM3wacde = value->rValue; mod->BSIM3wacdeGiven = TRUE; break; case BSIM3_MOD_WMOIN : mod->BSIM3wmoin = value->rValue; mod->BSIM3wmoinGiven = TRUE; break; case BSIM3_MOD_WNOFF : mod->BSIM3wnoff = value->rValue; mod->BSIM3wnoffGiven = TRUE; break; case BSIM3_MOD_WVOFFCV : mod->BSIM3wvoffcv = value->rValue; mod->BSIM3wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM3_MOD_PCDSC : mod->BSIM3pcdsc = value->rValue; mod->BSIM3pcdscGiven = TRUE; break; case BSIM3_MOD_PCDSCB : mod->BSIM3pcdscb = value->rValue; mod->BSIM3pcdscbGiven = TRUE; break; case BSIM3_MOD_PCDSCD : mod->BSIM3pcdscd = value->rValue; mod->BSIM3pcdscdGiven = TRUE; break; case BSIM3_MOD_PCIT : mod->BSIM3pcit = value->rValue; mod->BSIM3pcitGiven = TRUE; break; case BSIM3_MOD_PNFACTOR : mod->BSIM3pnfactor = value->rValue; mod->BSIM3pnfactorGiven = TRUE; break; case BSIM3_MOD_PXJ: mod->BSIM3pxj = value->rValue; mod->BSIM3pxjGiven = TRUE; break; case BSIM3_MOD_PVSAT: mod->BSIM3pvsat = value->rValue; mod->BSIM3pvsatGiven = TRUE; break; case BSIM3_MOD_PA0: mod->BSIM3pa0 = value->rValue; mod->BSIM3pa0Given = TRUE; break; case BSIM3_MOD_PAGS: mod->BSIM3pags = value->rValue; mod->BSIM3pagsGiven = TRUE; break; case BSIM3_MOD_PA1: mod->BSIM3pa1 = value->rValue; mod->BSIM3pa1Given = TRUE; break; case BSIM3_MOD_PA2: mod->BSIM3pa2 = value->rValue; mod->BSIM3pa2Given = TRUE; break; case BSIM3_MOD_PAT: mod->BSIM3pat = value->rValue; mod->BSIM3patGiven = TRUE; break; case BSIM3_MOD_PKETA: mod->BSIM3pketa = value->rValue; mod->BSIM3pketaGiven = TRUE; break; case BSIM3_MOD_PNSUB: mod->BSIM3pnsub = value->rValue; mod->BSIM3pnsubGiven = TRUE; break; case BSIM3_MOD_PNPEAK: mod->BSIM3pnpeak = value->rValue; mod->BSIM3pnpeakGiven = TRUE; if (mod->BSIM3pnpeak > 1.0e20) mod->BSIM3pnpeak *= 1.0e-6; break; case BSIM3_MOD_PNGATE: mod->BSIM3pngate = value->rValue; mod->BSIM3pngateGiven = TRUE; if (mod->BSIM3pngate > 1.0e23) mod->BSIM3pngate *= 1.0e-6; break; case BSIM3_MOD_PGAMMA1: mod->BSIM3pgamma1 = value->rValue; mod->BSIM3pgamma1Given = TRUE; break; case BSIM3_MOD_PGAMMA2: mod->BSIM3pgamma2 = value->rValue; mod->BSIM3pgamma2Given = TRUE; break; case BSIM3_MOD_PVBX: mod->BSIM3pvbx = value->rValue; mod->BSIM3pvbxGiven = TRUE; break; case BSIM3_MOD_PVBM: mod->BSIM3pvbm = value->rValue; mod->BSIM3pvbmGiven = TRUE; break; case BSIM3_MOD_PXT: mod->BSIM3pxt = value->rValue; mod->BSIM3pxtGiven = TRUE; break; case BSIM3_MOD_PK1: mod->BSIM3pk1 = value->rValue; mod->BSIM3pk1Given = TRUE; break; case BSIM3_MOD_PKT1: mod->BSIM3pkt1 = value->rValue; mod->BSIM3pkt1Given = TRUE; break; case BSIM3_MOD_PKT1L: mod->BSIM3pkt1l = value->rValue; mod->BSIM3pkt1lGiven = TRUE; break; case BSIM3_MOD_PKT2: mod->BSIM3pkt2 = value->rValue; mod->BSIM3pkt2Given = TRUE; break; case BSIM3_MOD_PK2: mod->BSIM3pk2 = value->rValue; mod->BSIM3pk2Given = TRUE; break; case BSIM3_MOD_PK3: mod->BSIM3pk3 = value->rValue; mod->BSIM3pk3Given = TRUE; break; case BSIM3_MOD_PK3B: mod->BSIM3pk3b = value->rValue; mod->BSIM3pk3bGiven = TRUE; break; case BSIM3_MOD_PNLX: mod->BSIM3pnlx = value->rValue; mod->BSIM3pnlxGiven = TRUE; break; case BSIM3_MOD_PW0: mod->BSIM3pw0 = value->rValue; mod->BSIM3pw0Given = TRUE; break; case BSIM3_MOD_PDVT0: mod->BSIM3pdvt0 = value->rValue; mod->BSIM3pdvt0Given = TRUE; break; case BSIM3_MOD_PDVT1: mod->BSIM3pdvt1 = value->rValue; mod->BSIM3pdvt1Given = TRUE; break; case BSIM3_MOD_PDVT2: mod->BSIM3pdvt2 = value->rValue; mod->BSIM3pdvt2Given = TRUE; break; case BSIM3_MOD_PDVT0W: mod->BSIM3pdvt0w = value->rValue; mod->BSIM3pdvt0wGiven = TRUE; break; case BSIM3_MOD_PDVT1W: mod->BSIM3pdvt1w = value->rValue; mod->BSIM3pdvt1wGiven = TRUE; break; case BSIM3_MOD_PDVT2W: mod->BSIM3pdvt2w = value->rValue; mod->BSIM3pdvt2wGiven = TRUE; break; case BSIM3_MOD_PDROUT: mod->BSIM3pdrout = value->rValue; mod->BSIM3pdroutGiven = TRUE; break; case BSIM3_MOD_PDSUB: mod->BSIM3pdsub = value->rValue; mod->BSIM3pdsubGiven = TRUE; break; case BSIM3_MOD_PVTH0: mod->BSIM3pvth0 = value->rValue; mod->BSIM3pvth0Given = TRUE; break; case BSIM3_MOD_PUA: mod->BSIM3pua = value->rValue; mod->BSIM3puaGiven = TRUE; break; case BSIM3_MOD_PUA1: mod->BSIM3pua1 = value->rValue; mod->BSIM3pua1Given = TRUE; break; case BSIM3_MOD_PUB: mod->BSIM3pub = value->rValue; mod->BSIM3pubGiven = TRUE; break; case BSIM3_MOD_PUB1: mod->BSIM3pub1 = value->rValue; mod->BSIM3pub1Given = TRUE; break; case BSIM3_MOD_PUC: mod->BSIM3puc = value->rValue; mod->BSIM3pucGiven = TRUE; break; case BSIM3_MOD_PUC1: mod->BSIM3puc1 = value->rValue; mod->BSIM3puc1Given = TRUE; break; case BSIM3_MOD_PU0 : mod->BSIM3pu0 = value->rValue; mod->BSIM3pu0Given = TRUE; break; case BSIM3_MOD_PUTE : mod->BSIM3pute = value->rValue; mod->BSIM3puteGiven = TRUE; break; case BSIM3_MOD_PVOFF: mod->BSIM3pvoff = value->rValue; mod->BSIM3pvoffGiven = TRUE; break; case BSIM3_MOD_PDELTA : mod->BSIM3pdelta = value->rValue; mod->BSIM3pdeltaGiven = TRUE; break; case BSIM3_MOD_PRDSW: mod->BSIM3prdsw = value->rValue; mod->BSIM3prdswGiven = TRUE; break; case BSIM3_MOD_PPRWB: mod->BSIM3pprwb = value->rValue; mod->BSIM3pprwbGiven = TRUE; break; case BSIM3_MOD_PPRWG: mod->BSIM3pprwg = value->rValue; mod->BSIM3pprwgGiven = TRUE; break; case BSIM3_MOD_PPRT: mod->BSIM3pprt = value->rValue; mod->BSIM3pprtGiven = TRUE; break; case BSIM3_MOD_PETA0: mod->BSIM3peta0 = value->rValue; mod->BSIM3peta0Given = TRUE; break; case BSIM3_MOD_PETAB: mod->BSIM3petab = value->rValue; mod->BSIM3petabGiven = TRUE; break; case BSIM3_MOD_PPCLM: mod->BSIM3ppclm = value->rValue; mod->BSIM3ppclmGiven = TRUE; break; case BSIM3_MOD_PPDIBL1: mod->BSIM3ppdibl1 = value->rValue; mod->BSIM3ppdibl1Given = TRUE; break; case BSIM3_MOD_PPDIBL2: mod->BSIM3ppdibl2 = value->rValue; mod->BSIM3ppdibl2Given = TRUE; break; case BSIM3_MOD_PPDIBLB: mod->BSIM3ppdiblb = value->rValue; mod->BSIM3ppdiblbGiven = TRUE; break; case BSIM3_MOD_PPSCBE1: mod->BSIM3ppscbe1 = value->rValue; mod->BSIM3ppscbe1Given = TRUE; break; case BSIM3_MOD_PPSCBE2: mod->BSIM3ppscbe2 = value->rValue; mod->BSIM3ppscbe2Given = TRUE; break; case BSIM3_MOD_PPVAG: mod->BSIM3ppvag = value->rValue; mod->BSIM3ppvagGiven = TRUE; break; case BSIM3_MOD_PWR : mod->BSIM3pwr = value->rValue; mod->BSIM3pwrGiven = TRUE; break; case BSIM3_MOD_PDWG : mod->BSIM3pdwg = value->rValue; mod->BSIM3pdwgGiven = TRUE; break; case BSIM3_MOD_PDWB : mod->BSIM3pdwb = value->rValue; mod->BSIM3pdwbGiven = TRUE; break; case BSIM3_MOD_PB0 : mod->BSIM3pb0 = value->rValue; mod->BSIM3pb0Given = TRUE; break; case BSIM3_MOD_PB1 : mod->BSIM3pb1 = value->rValue; mod->BSIM3pb1Given = TRUE; break; case BSIM3_MOD_PALPHA0 : mod->BSIM3palpha0 = value->rValue; mod->BSIM3palpha0Given = TRUE; break; case BSIM3_MOD_PALPHA1 : mod->BSIM3palpha1 = value->rValue; mod->BSIM3palpha1Given = TRUE; break; case BSIM3_MOD_PBETA0 : mod->BSIM3pbeta0 = value->rValue; mod->BSIM3pbeta0Given = TRUE; break; case BSIM3_MOD_PVFB : mod->BSIM3pvfb = value->rValue; mod->BSIM3pvfbGiven = TRUE; break; case BSIM3_MOD_PELM : mod->BSIM3pelm = value->rValue; mod->BSIM3pelmGiven = TRUE; break; case BSIM3_MOD_PCGSL : mod->BSIM3pcgsl = value->rValue; mod->BSIM3pcgslGiven = TRUE; break; case BSIM3_MOD_PCGDL : mod->BSIM3pcgdl = value->rValue; mod->BSIM3pcgdlGiven = TRUE; break; case BSIM3_MOD_PCKAPPA : mod->BSIM3pckappa = value->rValue; mod->BSIM3pckappaGiven = TRUE; break; case BSIM3_MOD_PCF : mod->BSIM3pcf = value->rValue; mod->BSIM3pcfGiven = TRUE; break; case BSIM3_MOD_PCLC : mod->BSIM3pclc = value->rValue; mod->BSIM3pclcGiven = TRUE; break; case BSIM3_MOD_PCLE : mod->BSIM3pcle = value->rValue; mod->BSIM3pcleGiven = TRUE; break; case BSIM3_MOD_PVFBCV : mod->BSIM3pvfbcv = value->rValue; mod->BSIM3pvfbcvGiven = TRUE; break; case BSIM3_MOD_PACDE : mod->BSIM3pacde = value->rValue; mod->BSIM3pacdeGiven = TRUE; break; case BSIM3_MOD_PMOIN : mod->BSIM3pmoin = value->rValue; mod->BSIM3pmoinGiven = TRUE; break; case BSIM3_MOD_PNOFF : mod->BSIM3pnoff = value->rValue; mod->BSIM3pnoffGiven = TRUE; break; case BSIM3_MOD_PVOFFCV : mod->BSIM3pvoffcv = value->rValue; mod->BSIM3pvoffcvGiven = TRUE; break; case BSIM3_MOD_TNOM : mod->BSIM3tnom = value->rValue + CONSTCtoK; mod->BSIM3tnomGiven = TRUE; break; case BSIM3_MOD_CGSO : mod->BSIM3cgso = value->rValue; mod->BSIM3cgsoGiven = TRUE; break; case BSIM3_MOD_CGDO : mod->BSIM3cgdo = value->rValue; mod->BSIM3cgdoGiven = TRUE; break; case BSIM3_MOD_CGBO : mod->BSIM3cgbo = value->rValue; mod->BSIM3cgboGiven = TRUE; break; case BSIM3_MOD_XPART : mod->BSIM3xpart = value->rValue; mod->BSIM3xpartGiven = TRUE; break; case BSIM3_MOD_RSH : mod->BSIM3sheetResistance = value->rValue; mod->BSIM3sheetResistanceGiven = TRUE; break; case BSIM3_MOD_JS : mod->BSIM3jctSatCurDensity = value->rValue; mod->BSIM3jctSatCurDensityGiven = TRUE; break; case BSIM3_MOD_JSW : mod->BSIM3jctSidewallSatCurDensity = value->rValue; mod->BSIM3jctSidewallSatCurDensityGiven = TRUE; break; case BSIM3_MOD_PB : mod->BSIM3bulkJctPotential = value->rValue; mod->BSIM3bulkJctPotentialGiven = TRUE; break; case BSIM3_MOD_MJ : mod->BSIM3bulkJctBotGradingCoeff = value->rValue; mod->BSIM3bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM3_MOD_PBSW : mod->BSIM3sidewallJctPotential = value->rValue; mod->BSIM3sidewallJctPotentialGiven = TRUE; break; case BSIM3_MOD_MJSW : mod->BSIM3bulkJctSideGradingCoeff = value->rValue; mod->BSIM3bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM3_MOD_CJ : mod->BSIM3unitAreaJctCap = value->rValue; mod->BSIM3unitAreaJctCapGiven = TRUE; break; case BSIM3_MOD_CJSW : mod->BSIM3unitLengthSidewallJctCap = value->rValue; mod->BSIM3unitLengthSidewallJctCapGiven = TRUE; break; case BSIM3_MOD_NJ : mod->BSIM3jctEmissionCoeff = value->rValue; mod->BSIM3jctEmissionCoeffGiven = TRUE; break; case BSIM3_MOD_PBSWG : mod->BSIM3GatesidewallJctPotential = value->rValue; mod->BSIM3GatesidewallJctPotentialGiven = TRUE; break; case BSIM3_MOD_MJSWG : mod->BSIM3bulkJctGateSideGradingCoeff = value->rValue; mod->BSIM3bulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM3_MOD_CJSWG : mod->BSIM3unitLengthGateSidewallJctCap = value->rValue; mod->BSIM3unitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM3_MOD_XTI : mod->BSIM3jctTempExponent = value->rValue; mod->BSIM3jctTempExponentGiven = TRUE; break; case BSIM3_MOD_LINTNOI: mod->BSIM3lintnoi = value->rValue; mod->BSIM3lintnoiGiven = TRUE; break; case BSIM3_MOD_LINT : mod->BSIM3Lint = value->rValue; mod->BSIM3LintGiven = TRUE; break; case BSIM3_MOD_LL : mod->BSIM3Ll = value->rValue; mod->BSIM3LlGiven = TRUE; break; case BSIM3_MOD_LLC : mod->BSIM3Llc = value->rValue; mod->BSIM3LlcGiven = TRUE; break; case BSIM3_MOD_LLN : mod->BSIM3Lln = value->rValue; mod->BSIM3LlnGiven = TRUE; break; case BSIM3_MOD_LW : mod->BSIM3Lw = value->rValue; mod->BSIM3LwGiven = TRUE; break; case BSIM3_MOD_LWC : mod->BSIM3Lwc = value->rValue; mod->BSIM3LwcGiven = TRUE; break; case BSIM3_MOD_LWN : mod->BSIM3Lwn = value->rValue; mod->BSIM3LwnGiven = TRUE; break; case BSIM3_MOD_LWL : mod->BSIM3Lwl = value->rValue; mod->BSIM3LwlGiven = TRUE; break; case BSIM3_MOD_LWLC : mod->BSIM3Lwlc = value->rValue; mod->BSIM3LwlcGiven = TRUE; break; case BSIM3_MOD_LMIN : mod->BSIM3Lmin = value->rValue; mod->BSIM3LminGiven = TRUE; break; case BSIM3_MOD_LMAX : mod->BSIM3Lmax = value->rValue; mod->BSIM3LmaxGiven = TRUE; break; case BSIM3_MOD_WINT : mod->BSIM3Wint = value->rValue; mod->BSIM3WintGiven = TRUE; break; case BSIM3_MOD_WL : mod->BSIM3Wl = value->rValue; mod->BSIM3WlGiven = TRUE; break; case BSIM3_MOD_WLC : mod->BSIM3Wlc = value->rValue; mod->BSIM3WlcGiven = TRUE; break; case BSIM3_MOD_WLN : mod->BSIM3Wln = value->rValue; mod->BSIM3WlnGiven = TRUE; break; case BSIM3_MOD_WW : mod->BSIM3Ww = value->rValue; mod->BSIM3WwGiven = TRUE; break; case BSIM3_MOD_WWC : mod->BSIM3Wwc = value->rValue; mod->BSIM3WwcGiven = TRUE; break; case BSIM3_MOD_WWN : mod->BSIM3Wwn = value->rValue; mod->BSIM3WwnGiven = TRUE; break; case BSIM3_MOD_WWL : mod->BSIM3Wwl = value->rValue; mod->BSIM3WwlGiven = TRUE; break; case BSIM3_MOD_WWLC : mod->BSIM3Wwlc = value->rValue; mod->BSIM3WwlcGiven = TRUE; break; case BSIM3_MOD_WMIN : mod->BSIM3Wmin = value->rValue; mod->BSIM3WminGiven = TRUE; break; case BSIM3_MOD_WMAX : mod->BSIM3Wmax = value->rValue; mod->BSIM3WmaxGiven = TRUE; break; case BSIM3_MOD_XL: mod->BSIM3xl = value->rValue; mod->BSIM3xlGiven = TRUE; break; case BSIM3_MOD_XW: mod->BSIM3xw = value->rValue; mod->BSIM3xwGiven = TRUE; break; case BSIM3_MOD_NOIA : mod->BSIM3oxideTrapDensityA = value->rValue; mod->BSIM3oxideTrapDensityAGiven = TRUE; break; case BSIM3_MOD_NOIB : mod->BSIM3oxideTrapDensityB = value->rValue; mod->BSIM3oxideTrapDensityBGiven = TRUE; break; case BSIM3_MOD_NOIC : mod->BSIM3oxideTrapDensityC = value->rValue; mod->BSIM3oxideTrapDensityCGiven = TRUE; break; case BSIM3_MOD_EM : mod->BSIM3em = value->rValue; mod->BSIM3emGiven = TRUE; break; case BSIM3_MOD_EF : mod->BSIM3ef = value->rValue; mod->BSIM3efGiven = TRUE; break; case BSIM3_MOD_AF : mod->BSIM3af = value->rValue; mod->BSIM3afGiven = TRUE; break; case BSIM3_MOD_KF : mod->BSIM3kf = value->rValue; mod->BSIM3kfGiven = TRUE; break; case BSIM3_MOD_VGS_MAX: mod->BSIM3vgsMax = value->rValue; mod->BSIM3vgsMaxGiven = TRUE; break; case BSIM3_MOD_VGD_MAX: mod->BSIM3vgdMax = value->rValue; mod->BSIM3vgdMaxGiven = TRUE; break; case BSIM3_MOD_VGB_MAX: mod->BSIM3vgbMax = value->rValue; mod->BSIM3vgbMaxGiven = TRUE; break; case BSIM3_MOD_VDS_MAX: mod->BSIM3vdsMax = value->rValue; mod->BSIM3vdsMaxGiven = TRUE; break; case BSIM3_MOD_VBS_MAX: mod->BSIM3vbsMax = value->rValue; mod->BSIM3vbsMaxGiven = TRUE; break; case BSIM3_MOD_VBD_MAX: mod->BSIM3vbdMax = value->rValue; mod->BSIM3vbdMaxGiven = TRUE; break; case BSIM3_MOD_NMOS : if(value->iValue) { mod->BSIM3type = 1; mod->BSIM3typeGiven = TRUE; } break; case BSIM3_MOD_PMOS : if(value->iValue) { mod->BSIM3type = - 1; mod->BSIM3typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3/b3soachk.c0000644000265600020320000000714612264261473021122 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BSIM3soaCheck(CKTcircuit *ckt, GENmodel *inModel) { BSIM3model *model = (BSIM3model *) inModel; BSIM3instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BSIM3nextModel) { for (here = model->BSIM3instances; here; here = here->BSIM3nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->BSIM3gNode] - ckt->CKTrhsOld [here->BSIM3sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->BSIM3gNode] - ckt->CKTrhsOld [here->BSIM3dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->BSIM3gNode] - ckt->CKTrhsOld [here->BSIM3bNode]); vds = fabs(ckt->CKTrhsOld [here->BSIM3dNodePrime] - ckt->CKTrhsOld [here->BSIM3sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->BSIM3bNode] - ckt->CKTrhsOld [here->BSIM3sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->BSIM3bNode] - ckt->CKTrhsOld [here->BSIM3dNodePrime]); if (vgs > model->BSIM3vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->BSIM3vgsMax); warns_vgs++; } if (vgd > model->BSIM3vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->BSIM3vgdMax); warns_vgd++; } if (vgb > model->BSIM3vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->BSIM3vgbMax); warns_vgb++; } if (vds > model->BSIM3vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->BSIM3vdsMax); warns_vds++; } if (vbs > model->BSIM3vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->BSIM3vbsMax); warns_vbs++; } if (vbd > model->BSIM3vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->BSIM3vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/vccs/0000755000265600020320000000000012264261711017165 5ustar andreasadminngspice-26/src/spicelib/devices/vccs/vccsdefs.h0000644000265600020320000000643012264261473021146 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef VCCS #define VCCS #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* * structures to describe Voltage Controlled Current Sources */ /* information to describe a single instance */ typedef struct sVCCSinstance { struct sVCCSmodel *VCCSmodPtr; /* backpointer to model */ struct sVCCSinstance *VCCSnextInstance; /* pointer to next instance of *current model*/ IFuid VCCSname; /* pointer to character string naming this instance */ int VCCSstates; /* state info */ int VCCSposNode; /* number of positive node of source */ int VCCSnegNode; /* number of negative node of source */ int VCCScontPosNode; /* number of positive node of controlling source */ int VCCScontNegNode; /* number of negative node of controlling source */ double VCCSinitCond; /* initial condition (of controlling source) */ double VCCScoeff; /* coefficient */ double VCCSmValue; /* Parallel multiplier */ double *VCCSposContPosptr; /* pointer to sparse matrix element at * (positive node, control positive node) */ double *VCCSposContNegptr; /* pointer to sparse matrix element at * (negative node, control negative node) */ double *VCCSnegContPosptr; /* pointer to sparse matrix element at * (positive node, control positive node) */ double *VCCSnegContNegptr; /* pointer to sparse matrix element at * (negative node, control negative node) */ unsigned VCCScoeffGiven :1 ;/* flag to indicate function coeffs given */ unsigned VCCSmGiven :1 ;/* flag to indicate multiplier given */ int VCCSsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } VCCSinstance ; #define VCCSvOld VCCSstates #define VCCScontVOld VCCSstates + 1 /* per model data */ typedef struct sVCCSmodel { /* model structure for a source */ int VCCSmodType; /* type index of this device type */ struct sVCCSmodel *VCCSnextModel; /* pointer to next possible model * in linked list */ VCCSinstance * VCCSinstances; /* pointer to list of instances * that have this model */ IFuid VCCSmodName; /* pointer to character string naming this model */ } VCCSmodel; /* device parameters */ #define VCCS_TRANS 1 #define VCCS_IC 2 #define VCCS_POS_NODE 3 #define VCCS_NEG_NODE 4 #define VCCS_CONT_P_NODE 5 #define VCCS_CONT_N_NODE 6 #define VCCS_CONT_V_OLD 7 #define VCCS_TRANS_SENS 8 #define VCCS_CURRENT 9 #define VCCS_POWER 10 #define VCCS_VOLTS 11 #define VCCS_M 12 /* model parameters */ /* device questions */ #define VCCS_QUEST_SENS_REAL 201 #define VCCS_QUEST_SENS_IMAG 202 #define VCCS_QUEST_SENS_MAG 203 #define VCCS_QUEST_SENS_PH 204 #define VCCS_QUEST_SENS_CPLX 205 #define VCCS_QUEST_SENS_DC 206 /* model questions */ #include "vccsext.h" #endif /*VCCS*/ ngspice-26/src/spicelib/devices/vccs/vccsinit.c0000644000265600020320000000414612264261473021165 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "vccsitf.h" #include "vccsext.h" #include "vccsinit.h" SPICEdev VCCSinfo = { { "VCCS", "Voltage controlled current source", &VCCSnSize, &VCCSnSize, VCCSnames, &VCCSpTSize, VCCSpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ VCCSparam, /* DEVmodParam */ NULL, /* DEVload */ VCCSload, /* DEVsetup */ VCCSsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ VCCSsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ VCCSload, /* ac and normal loads are identical */ /* DEVaccept */ NULL, /* DEVdestroy */ VCCSdestroy, /* DEVmodDelete */ VCCSmDelete, /* DEVdelete */ VCCSdelete, /* DEVsetic */ NULL, /* DEVask */ VCCSask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ VCCSpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ VCCSsSetup, /* DEVsenLoad */ VCCSsLoad, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ VCCSsAcLoad, /* DEVsenPrint */ VCCSsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &VCCSiSize, /* DEVmodSize */ &VCCSmSize }; SPICEdev * get_vccs_info(void) { return &VCCSinfo; } ngspice-26/src/spicelib/devices/vccs/vccssld.c0000644000265600020320000000236312264261473021003 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current sensitivity information into the * array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCCSsLoad(GENmodel *inModel, CKTcircuit *ckt) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; double vc; /* loop through all the source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { if(here->VCCSsenParmNo){ vc = *(ckt->CKTrhsOld + here->VCCScontPosNode) - *(ckt->CKTrhsOld + here->VCCScontNegNode); *(ckt->CKTsenInfo->SEN_RHS[here->VCCSposNode] + here->VCCSsenParmNo) -= vc; *(ckt->CKTsenInfo->SEN_RHS[here->VCCSnegNode] + here->VCCSsenParmNo) += vc; } } } return(OK); } ngspice-26/src/spicelib/devices/vccs/vccspzld.c0000644000265600020320000000221512264261473021166 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "vccsdefs.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCCSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current values into the * sparse matrix previously provided */ { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; NG_IGNORE(s); NG_IGNORE(ckt); /* loop through all the source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { *(here->VCCSposContPosptr) += here->VCCScoeff ; *(here->VCCSposContNegptr) -= here->VCCScoeff ; *(here->VCCSnegContPosptr) -= here->VCCScoeff ; *(here->VCCSnegContNegptr) += here->VCCScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/vccs/vccsask.c0000644000265600020320000001223012264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* * This routine gives access to the internal device parameters * of Voltage Controlled Current Source */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VCCSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { VCCSinstance *here = (VCCSinstance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case VCCS_TRANS: value->rValue = here->VCCScoeff; return (OK); case VCCS_M: value->rValue = here->VCCSmValue; return (OK); case VCCS_POS_NODE: value->iValue = here->VCCSposNode; return (OK); case VCCS_NEG_NODE: value->iValue = here->VCCSnegNode; return (OK); case VCCS_CONT_P_NODE: value->iValue = here->VCCScontPosNode; return (OK); case VCCS_CONT_N_NODE: value->iValue = here->VCCScontNegNode; return (OK); case VCCS_CONT_V_OLD: value->rValue = *(ckt->CKTstate0 + here->VCCScontVOld); return (OK); case VCCS_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->VCCSsenParmNo); } return(OK); case VCCS_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCCSsenParmNo); } return(OK); case VCCS_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCCSsenParmNo); } return(OK); case VCCS_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCCSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCCSsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case VCCS_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCCSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCCSsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case VCCS_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCCSsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCCSsenParmNo); } return(OK); case VCCS_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VCCSask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = (*(ckt->CKTrhsOld+here->VCCScontPosNode) - *(ckt->CKTrhsOld + here->VCCScontNegNode)) * (here->VCCScoeff); } return (OK); case VCCS_VOLTS: value->rValue = (*(ckt->CKTrhsOld+here->VCCSposNode) - *(ckt->CKTrhsOld + here->VCCSnegNode)); return (OK); case VCCS_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VCCSask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = (*(ckt->CKTrhsOld+here->VCCScontPosNode) - *(ckt->CKTrhsOld + here->VCCScontNegNode)) * (here->VCCScoeff) * (*(ckt->CKTrhsOld+here->VCCSposNode) - *(ckt->CKTrhsOld + here->VCCSnegNode)); } return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/vccs/vccsext.h0000644000265600020320000000135512264261473021026 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int VCCSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int VCCSdelete(GENmodel*,IFuid,GENinstance**); extern void VCCSdestroy(GENmodel**); extern int VCCSload(GENmodel*,CKTcircuit*); extern int VCCSmDelete(GENmodel**,IFuid,GENmodel*); extern int VCCSparam(int,IFvalue*,GENinstance*,IFvalue*); extern int VCCSpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int VCCSsAcLoad(GENmodel*,CKTcircuit*); extern int VCCSsLoad(GENmodel*,CKTcircuit*); extern int VCCSsSetup(SENstruct*,GENmodel*); extern void VCCSsPrint(GENmodel*,CKTcircuit*); extern int VCCSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); ngspice-26/src/spicelib/devices/vccs/vccsitf.h0000644000265600020320000000026712264261473021011 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_VCCS #define DEV_VCCS extern SPICEdev *get_vccs_info(void); #endif ngspice-26/src/spicelib/devices/vccs/vccsload.c0000644000265600020320000000211612264261473021134 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCCSload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; NG_IGNORE(ckt); /* loop through all the source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { *(here->VCCSposContPosptr) += here->VCCScoeff ; *(here->VCCSposContNegptr) -= here->VCCScoeff ; *(here->VCCSnegContPosptr) -= here->VCCScoeff ; *(here->VCCSnegContNegptr) += here->VCCScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/vccs/vccs.c0000644000265600020320000000350412264261473020276 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "vccsdefs.h" #include "ngspice/suffix.h" IFparm VCCSpTable[] = { /* parameters */ IOPU("gain", VCCS_TRANS, IF_REAL, "Transconductance of source (gain)"), IOP ( "m", VCCS_M, IF_REAL , "Parallel multiplier"), IP("sens_trans", VCCS_TRANS_SENS,IF_FLAG, "flag to request sensitivity WRT transconductance"), OPU("pos_node", VCCS_POS_NODE, IF_INTEGER, "Positive node of source"), OPU("neg_node", VCCS_NEG_NODE, IF_INTEGER, "Negative node of source"), OPU("cont_p_node",VCCS_CONT_P_NODE,IF_INTEGER, "Positive node of contr. source"), OPU("cont_n_node",VCCS_CONT_N_NODE,IF_INTEGER, "Negative node of contr. source"), IP("ic", VCCS_IC, IF_REAL, "Initial condition of controlling source"), OP("i", VCCS_CURRENT,IF_REAL, "Output current"), OP("v", VCCS_VOLTS,IF_REAL, "Voltage across output"), OP("p", VCCS_POWER, IF_REAL, "Power"), OPU("sens_dc", VCCS_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU("sens_real", VCCS_QUEST_SENS_REAL, IF_REAL, "real part of ac sensitivity"), OPU("sens_imag", VCCS_QUEST_SENS_IMAG, IF_REAL, "imag part of ac sensitivity"), OPU("sens_mag", VCCS_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU("sens_ph", VCCS_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx", VCCS_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; char *VCCSnames[] = { "V+", "V-", "VC+", "VC-" }; int VCCSnSize = NUMELEMS(VCCSnames); int VCCSpTSize = NUMELEMS(VCCSpTable); int VCCSmPTSize = 0; int VCCSiSize = sizeof(VCCSinstance); int VCCSmSize = sizeof(VCCSmodel); ngspice-26/src/spicelib/devices/vccs/vccsmdel.c0000644000265600020320000000176612264261473021150 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { VCCSmodel **model = (VCCSmodel **)inModel; VCCSmodel *modfast = (VCCSmodel *)kill; VCCSinstance *here; VCCSinstance *prev = NULL; VCCSmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->VCCSnextModel)) { if( (*model)->VCCSmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->VCCSnextModel; /* cut deleted device out of list */ for(here = (*model)->VCCSinstances ; here ; here = here->VCCSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/vccs/vccssacl.c0000644000265600020320000000317212264261473021142 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current ac sensitivity information into the * array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCCSsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; double vc; double ivc; /* loop through all the source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { if (here->VCCSsenParmNo){ vc = *(ckt->CKTrhsOld + here->VCCScontPosNode) - *(ckt->CKTrhsOld + here->VCCScontNegNode); ivc = *(ckt->CKTirhsOld + here->VCCScontPosNode) - *(ckt->CKTirhsOld + here->VCCScontNegNode); *(ckt->CKTsenInfo->SEN_RHS[here->VCCSposNode] + here->VCCSsenParmNo) -= vc; *(ckt->CKTsenInfo->SEN_iRHS[here->VCCSposNode] + here->VCCSsenParmNo) -= ivc; *(ckt->CKTsenInfo->SEN_RHS[here->VCCSnegNode] + here->VCCSsenParmNo) += vc; *(ckt->CKTsenInfo->SEN_iRHS[here->VCCSnegNode] + here->VCCSsenParmNo) += ivc; } } } return(OK); } ngspice-26/src/spicelib/devices/vccs/vccsdest.c0000644000265600020320000000141012264261473021150 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vccsdefs.h" #include "ngspice/suffix.h" void VCCSdestroy(GENmodel **inModel) { VCCSmodel **model = (VCCSmodel**)inModel; VCCSinstance *here; VCCSinstance *prev = NULL; VCCSmodel *mod = *model; VCCSmodel *oldmod = NULL; for( ; mod ; mod = mod->VCCSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->VCCSinstances ; here ; here = here->VCCSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/vccs/vccsdel.c0000644000265600020320000000155612264261473020770 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCCSdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance **fast = (VCCSinstance**)inst; VCCSinstance **prev = NULL; VCCSinstance *here; for( ; model ; model = model->VCCSnextModel) { prev = &(model->VCCSinstances); for(here = *prev; here ; here = *prev) { if(here->VCCSname == name || (fast && here==*fast) ) { *prev= here->VCCSnextInstance; FREE(here); return(OK); } prev = &(here->VCCSnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/vccs/vccsset.c0000644000265600020320000000266512264261473021021 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* load the current source structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCCSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; NG_IGNORE(states); NG_IGNORE(ckt); /* loop through all the current source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(VCCSposContPosptr, VCCSposNode, VCCScontPosNode); TSTALLOC(VCCSposContNegptr, VCCSposNode, VCCScontNegNode); TSTALLOC(VCCSnegContPosptr, VCCSnegNode, VCCScontPosNode); TSTALLOC(VCCSnegContNegptr, VCCSnegNode, VCCScontNegNode); } } return(OK); } ngspice-26/src/spicelib/devices/vccs/Makefile.am0000644000265600020320000000072712264261473021234 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libvccs.la libvccs_la_SOURCES = \ vccs.c \ vccsask.c \ vccsdefs.h \ vccsdel.c \ vccsdest.c \ vccsext.h \ vccsinit.c \ vccsinit.h \ vccsitf.h \ vccsload.c \ vccsmdel.c \ vccspar.c \ vccspzld.c \ vccssacl.c \ vccsset.c \ vccssld.c \ vccssprt.c \ vccssset.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/vccs/vccssset.c0000644000265600020320000000165612264261473021203 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCCSsSetup(SENstruct *info, GENmodel *inModel) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; /* loop through all the current source models */ for( ; model != NULL; model = model->VCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { if(here->VCCSsenParmNo){ here->VCCSsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/vccs/Makefile.in0000644000265600020320000004224412264261540021240 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/vccs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvccs_la_LIBADD = am_libvccs_la_OBJECTS = vccs.lo vccsask.lo vccsdel.lo vccsdest.lo \ vccsinit.lo vccsload.lo vccsmdel.lo vccspar.lo vccspzld.lo \ vccssacl.lo vccsset.lo vccssld.lo vccssprt.lo vccssset.lo libvccs_la_OBJECTS = $(am_libvccs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libvccs_la_SOURCES) DIST_SOURCES = $(libvccs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libvccs.la libvccs_la_SOURCES = \ vccs.c \ vccsask.c \ vccsdefs.h \ vccsdel.c \ vccsdest.c \ vccsext.h \ vccsinit.c \ vccsinit.h \ vccsitf.h \ vccsload.c \ vccsmdel.c \ vccspar.c \ vccspzld.c \ vccssacl.c \ vccsset.c \ vccssld.c \ vccssprt.c \ vccssset.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/vccs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/vccs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvccs.la: $(libvccs_la_OBJECTS) $(libvccs_la_DEPENDENCIES) $(EXTRA_libvccs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libvccs_la_OBJECTS) $(libvccs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccspar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccspzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccssacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccssld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccssprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vccssset.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/vccs/vccssprt.c0000644000265600020320000000267112264261473021213 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* Pretty print the sensitivity info for * all the VCCS in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void VCCSsPrint(GENmodel *inModel, CKTcircuit *ckt) { VCCSmodel *model = (VCCSmodel *)inModel; VCCSinstance *here; printf("VOLTAGE CONTROLLED CURRENT SOURCES-----------------\n"); /* loop through all the source models */ for( ; model != NULL; model = model->VCCSnextModel ) { printf("Model name:%s\n",model->VCCSmodName); /* loop through all the instances of the model */ for (here = model->VCCSinstances; here != NULL ; here=here->VCCSnextInstance) { printf(" Instance name:%s\n",here->VCCSname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->VCCSposNode), CKTnodName(ckt,here->VCCSnegNode)); printf(" Controlling Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->VCCScontPosNode), CKTnodName(ckt,here->VCCScontNegNode)); printf(" Coefficient: %f\n",here->VCCScoeff); printf(" VCCSsenParmNo:%d\n",here->VCCSsenParmNo); } } } ngspice-26/src/spicelib/devices/vccs/vccsinit.h0000644000265600020320000000030212264261473021160 0ustar andreasadmin#ifndef _VCCSINIT_H #define _VCCSINIT_H extern IFparm VCCSpTable[ ]; extern char *VCCSnames[ ]; extern int VCCSpTSize; extern int VCCSnSize; extern int VCCSiSize; extern int VCCSmSize; #endif ngspice-26/src/spicelib/devices/vccs/vccspar.c0000644000265600020320000000171612264261473021004 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "vccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VCCSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { VCCSinstance *here = (VCCSinstance *)inst; NG_IGNORE(select); switch(param) { case VCCS_TRANS: here->VCCScoeff = value->rValue; here->VCCScoeffGiven = TRUE; if (here->VCCSmGiven) here->VCCScoeff *= here->VCCSmValue; break; case VCCS_M: here->VCCSmValue = value->rValue; here->VCCSmGiven = TRUE; break; case VCCS_TRANS_SENS: here->VCCSsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/nbjt/0000755000265600020320000000000012264261711017164 5ustar andreasadminngspice-26/src/spicelib/devices/nbjt/nbjtinit.c0000644000265600020320000000404612264261473021162 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "nbjtitf.h" #include "nbjtext.h" #include "nbjtinit.h" SPICEdev NBJTinfo = { { "NBJT", "1D Numerical Bipolar Junction Transistor model", &NBJTnSize, &NBJTnSize, NBJTnames, &NBJTpTSize, NBJTpTable, &NBJTmPTSize, NBJTmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NBJTparam, /* DEVmodParam */ NBJTmParam, /* DEVload */ NBJTload, /* DEVsetup */ NBJTsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NBJTsetup, /* DEVtemperature*/ NBJTtemp, /* DEVtrunc */ NBJTtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NBJTacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ NBJTdestroy, /* DEVmodDelete */ NBJTmDelete, /* DEVdelete */ NBJTdelete, /* DEVsetic */ NULL, /* DEVask */ NBJTask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NBJTpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NBJTdump, /* DEVacct */ NBJTacct, #endif /* DEVinstSize */ &NBJTiSize, /* DEVmodSize */ &NBJTmSize }; SPICEdev * get_nbjt_info(void) { return &NBJTinfo; } ngspice-26/src/spicelib/devices/nbjt/nbjtmpar.c0000644000265600020320000000133112264261473021150 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NBJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJTmParam(int param, IFvalue *value, GENmodel *inModel) { NG_IGNORE(value); NG_IGNORE(inModel); switch (param) { case NBJT_MOD_NBJT: /* no action - already know it is a numerical bjt, but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtext.h0000644000265600020320000000176612264261473021032 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef __NBJT_H #define __NBJT_H extern int NBJTacLoad(GENmodel *, CKTcircuit *); extern int NBJTask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NBJTdelete(GENmodel *, IFuid, GENinstance **); extern void NBJTdestroy(GENmodel **); extern int NBJTgetic(GENmodel *, CKTcircuit *); extern int NBJTload(GENmodel *, CKTcircuit *); extern int NBJTmDelete(GENmodel **, IFuid, GENmodel *); extern int NBJTmParam(int, IFvalue *, GENmodel *); extern int NBJTparam(int, IFvalue *, GENinstance *, IFvalue *); extern int NBJTpzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NBJTsetup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NBJTtemp(GENmodel *, CKTcircuit *); extern int NBJTtrunc(GENmodel *, CKTcircuit *, double *); extern void NBJTdump(GENmodel *, CKTcircuit *); extern void NBJTacct(GENmodel *, CKTcircuit *, FILE *); #endif /* NBJT_H */ ngspice-26/src/spicelib/devices/nbjt/nbjtdefs.h0000644000265600020320000001336612264261473021152 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef NBJT_H #define NBJT_H /* data structures used to describe 1D Numerical BJTs */ /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* device level includes */ #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/profile.h" #include "ngspice/numglobs.h" #include "ngspice/carddefs.h" /* information needed per instance */ typedef struct sNBJTinstance { struct sNBJTmodel *NBJTmodPtr;/* back pointer to model */ struct sNBJTinstance *NBJTnextInstance; /* pointer to next instance * of current model */ IFuid NBJTname; /* pointer to character string naming this * instance */ int NBJTstate; /* pointer to start of state vector for bjt */ /* entries in the state vector for bjt: */ #define NBJTvbe NBJTstate #define NBJTvce NBJTstate+1 #define NBJTic NBJTstate+2 #define NBJTie NBJTstate+3 #define NBJTdIeDVce NBJTstate+4 #define NBJTdIeDVbe NBJTstate+5 #define NBJTdIcDVce NBJTstate+6 #define NBJTdIcDVbe NBJTstate+7 #define NBJTnumStates 8 int NBJTcolNode; /* number of collector node of bjt */ int NBJTbaseNode; /* number of base node of bjt */ int NBJTemitNode; /* number of emitter node of bjt */ ONEdevice *NBJTpDevice; GLOBvalues NBJTglobals; /* Temp.-Dep. Global Parameters */ int NBJTtype; double NBJTarea; /* area factor of the BJT */ double NBJTtemp; /* Instance Temperature */ double NBJTc11; /* small-signal capacitance */ double NBJTy11r; /* small-signal admittance, real part */ double NBJTy11i; /* small-signal admittance, imag part */ double NBJTc12; /* small-signal capacitance */ double NBJTy12r; /* small-signal admittance, real part */ double NBJTy12i; /* small-signal admittance, imag part */ double NBJTc21; /* small-signal capacitance */ double NBJTy21r; /* small-signal admittance, real part */ double NBJTy21i; /* small-signal admittance, imag part */ double NBJTc22; /* small-signal capacitance */ double NBJTy22r; /* small-signal admittance, real part */ double NBJTy22i; /* small-signal admittance, imag part */ int NBJTprint; char *NBJTicFile; /* Name of initial condition file */ double *NBJTcolColPtr; /* pointer to sparse matrix at * (collector,collector) */ double *NBJTbaseBasePtr; /* pointer to sparse matrix at (base,base) */ double *NBJTemitEmitPtr; /* pointer to sparse matrix at * (emitter,emitter) */ double *NBJTcolBasePtr; /* pointer to sparse matrix at * (collector,base) */ double *NBJTcolEmitPtr; /* pointer to sparse matrix at * (collector,emitter) */ double *NBJTbaseColPtr; /* pointer to sparse matrix at * (base,collector) */ double *NBJTbaseEmitPtr; /* pointer to sparse matrix at (base,emitter) */ double *NBJTemitColPtr; /* pointer to sparse matrix at * (emitter,collector) */ double *NBJTemitBasePtr; /* pointer to sparse matrix at (emitter,base) */ int NBJToff; /* 'off' flag for bjt */ unsigned NBJTsmSigAvail:1; /* flag to indicate small-signal done */ unsigned NBJTareaGiven:1; /* flag to indicate area was specified */ unsigned NBJTicFileGiven:1; /* flag to indicate init. cond. file given */ unsigned NBJTprintGiven:1; /* flag to indicate if print was given */ unsigned NBJTtempGiven:1; /* flag to indicate if temp was given */ } NBJTinstance; /* per model data */ typedef struct sNBJTmodel { /* model structure for a bjt */ int NBJTmodType; /* type index of this device type */ struct sNBJTmodel *NBJTnextModel; /* pointer to next possible model in * linked list */ NBJTinstance *NBJTinstances; /* pointer to list of instances that have * this model */ IFuid NBJTmodName; /* pointer to character string naming this * model */ /* Everything below here is numerical-device-specific */ MESHcard *NBJTxMeshes; /* list of xmesh cards */ MESHcard *NBJTyMeshes; /* list of ymesh cards */ DOMNcard *NBJTdomains; /* list of domain cards */ BDRYcard *NBJTboundaries; /* list of boundary cards */ DOPcard *NBJTdopings; /* list of doping cards */ ELCTcard *NBJTelectrodes; /* list of electrode cards */ CONTcard *NBJTcontacts; /* list of contact cards */ MODLcard *NBJTmodels; /* list of model cards */ MATLcard *NBJTmaterials; /* list of material cards */ MOBcard *NBJTmobility; /* list of mobility cards */ METHcard *NBJTmethods; /* list of method cards */ OPTNcard *NBJToptions; /* list of option cards */ OUTPcard *NBJToutputs; /* list of output cards */ ONEtranInfo *NBJTpInfo; /* transient analysis information */ DOPprofile *NBJTprofiles; /* expanded list of doping profiles */ DOPtable *NBJTdopTables; /* list of tables used by profiles */ ONEmaterial *NBJTmatlInfo; /* list of material info structures */ } NBJTmodel; /* type of BJT */ #define NPN 1 #define PNP -1 /* device parameters */ #define NBJT_AREA 1 #define NBJT_OFF 2 #define NBJT_IC_FILE 3 #define NBJT_PRINT 4 #define NBJT_TEMP 5 #define NBJT_G11 8 #define NBJT_C11 9 #define NBJT_Y11 10 #define NBJT_G12 11 #define NBJT_C12 12 #define NBJT_Y12 13 #define NBJT_G13 14 #define NBJT_C13 15 #define NBJT_Y13 16 #define NBJT_G21 17 #define NBJT_C21 18 #define NBJT_Y21 19 #define NBJT_G22 20 #define NBJT_C22 21 #define NBJT_Y22 22 #define NBJT_G23 23 #define NBJT_C23 24 #define NBJT_Y23 25 #define NBJT_G31 26 #define NBJT_C31 27 #define NBJT_Y31 28 #define NBJT_G32 29 #define NBJT_C32 30 #define NBJT_Y32 31 #define NBJT_G33 32 #define NBJT_C33 33 #define NBJT_Y33 34 /* model parameters */ /* NOTE: all true model parameters have been moved to IFcardInfo structures */ #define NBJT_MOD_NBJT 101 /* device questions */ /* model questions */ #include "nbjtext.h" #endif /* NBJT_H */ ngspice-26/src/spicelib/devices/nbjt/nbjt.c0000644000265600020320000000504212264261473020273 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "nbjtdefs.h" #include "ngspice/suffix.h" /* * This file defines the Numerical BJT data structures that are available to * the next level(s) up the calling hierarchy */ IFparm NBJTpTable[] = { /* parameters */ IP("off", NBJT_OFF, IF_FLAG, "Device initially off"), IP("ic.file", NBJT_IC_FILE, IF_STRING, "Initial condition file"), IOP("area", NBJT_AREA, IF_REAL, "Area factor"), IP("save", NBJT_PRINT, IF_INTEGER, "Save Solutions"), IP("print", NBJT_PRINT, IF_INTEGER, "Print Solutions"), OP("g11", NBJT_G11, IF_REAL, "Conductance"), OP("c11", NBJT_C11, IF_REAL, "Capacitance"), OP("y11", NBJT_Y11, IF_COMPLEX, "Admittance"), OP("g12", NBJT_G12, IF_REAL, "Conductance"), OP("c12", NBJT_C12, IF_REAL, "Capacitance"), OP("y12", NBJT_Y12, IF_COMPLEX, "Admittance"), OPU("g13", NBJT_G13, IF_REAL, "Conductance"), OPU("c13", NBJT_C13, IF_REAL, "Capacitance"), OPU("y13", NBJT_Y13, IF_COMPLEX, "Admittance"), OP("g21", NBJT_G21, IF_REAL, "Conductance"), OP("c21", NBJT_C21, IF_REAL, "Capacitance"), OP("y21", NBJT_Y21, IF_COMPLEX, "Admittance"), OP("g22", NBJT_G22, IF_REAL, "Conductance"), OP("c22", NBJT_C22, IF_REAL, "Capacitance"), OP("y22", NBJT_Y22, IF_COMPLEX, "Admittance"), OPU("g23", NBJT_G23, IF_REAL, "Conductance"), OPU("c23", NBJT_C23, IF_REAL, "Capacitance"), OPU("y23", NBJT_Y23, IF_COMPLEX, "Admittance"), OPU("g31", NBJT_G31, IF_REAL, "Conductance"), OPU("c31", NBJT_C31, IF_REAL, "Capacitance"), OPU("y31", NBJT_Y31, IF_COMPLEX, "Admittance"), OPU("g32", NBJT_G32, IF_REAL, "Conductance"), OPU("c32", NBJT_C32, IF_REAL, "Capacitance"), OPU("y32", NBJT_Y32, IF_COMPLEX, "Admittance"), OPU("g33", NBJT_G33, IF_REAL, "Conductance"), OPU("c33", NBJT_C33, IF_REAL, "Capacitance"), OPU("y33", NBJT_Y33, IF_COMPLEX, "Admittance"), IOP("temp", NBJT_TEMP, IF_REAL, "Instance Temperature") }; IFparm NBJTmPTable[] = { /* model parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("nbjt", NBJT_MOD_NBJT, IF_FLAG, "Numerical BJT Model") }; char *NBJTnames[] = { "Collector", "Base", "Emitter", "Substrate" }; int NBJTnSize = NUMELEMS(NBJTnames); int NBJTpTSize = NUMELEMS(NBJTpTable); int NBJTmPTSize = NUMELEMS(NBJTmPTable); int NBJTiSize = sizeof(NBJTinstance); int NBJTmSize = sizeof(NBJTmodel); ngspice-26/src/spicelib/devices/nbjt/nbjtmdel.c0000644000265600020320000000172512264261473021141 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NBJT model from the circuit and frees the storage * it was using. returns an error if the model has instances */ #include "ngspice/ngspice.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { NBJTmodel **model = (NBJTmodel **) inModel; NBJTmodel *modfast = (NBJTmodel *) kill; NBJTmodel **oldmod; oldmod = model; for (; *model; model = &((*model)->NBJTnextModel)) { if ((*model)->NBJTmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: if ((*model)->NBJTinstances) return (E_NOTEMPTY); *oldmod = (*model)->NBJTnextModel; /* cut deleted device out of list */ FREE(*model); return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtdest.c0000644000265600020320000000160512264261473021154 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes all NBJTs from the circuit and frees all storage they * were using. The current implementation has memory leaks. */ #include "ngspice/ngspice.h" #include "nbjtdefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" void NBJTdestroy(GENmodel **inModel) { NBJTmodel **model = (NBJTmodel **) inModel; NBJTmodel *mod, *nextMod; NBJTinstance *inst, *nextInst; for (mod = *model; mod;) { for (inst = mod->NBJTinstances; inst;) { ONEdestroy(inst->NBJTpDevice); nextInst = inst->NBJTnextInstance; FREE(inst); inst = nextInst; } nextMod = mod->NBJTnextModel; FREE(mod); mod = nextMod; } *model = NULL; } ngspice-26/src/spicelib/devices/nbjt/nbjttrun.c0000644000265600020320000000254212264261473021206 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine performs truncation error calculations for NBJTs in the * circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NBJTtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; double deltaNew; double deltaNorm[7]; double startTime; int i; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } for (; model != NULL; model = model->NBJTnextModel) { model->NBJTpInfo->order = ckt->CKTorder; model->NBJTpInfo->delta = deltaNorm; model->NBJTpInfo->lteCoeff = computeLTECoeff(model->NBJTpInfo); for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { startTime = SPfrontEnd->IFseconds(); deltaNew = ONEtrunc(inst->NBJTpDevice, model->NBJTpInfo, ckt->CKTdelta); *timeStep = MIN(*timeStep, deltaNew); inst->NBJTpDevice->pStats->totalTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtdump.c0000644000265600020320000001150512264261473021162 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ static void NBJTputHeader(FILE *, CKTcircuit *, NBJTinstance *); /* State Counter */ static int state_numOP = 0; static int state_numDC = 0; static int state_numTR = 0; void NBJTdump(GENmodel *inModel, CKTcircuit *ckt) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; OUTPcard *output; FILE *fpState; char fileName[BSIZE_SP]; char description[BSIZE_SP]; char *prefix; int *state_num; int anyOutput = 0; if (ckt->CKTmode & MODEDCOP) { prefix = "OP"; state_num = &state_numOP; sprintf(description, "..."); } else if (ckt->CKTmode & MODEDCTRANCURVE) { prefix = "DC"; state_num = &state_numDC; sprintf(description, "sweep = % e", ckt->CKTtime); } else if (ckt->CKTmode & MODETRAN) { prefix = "TR"; state_num = &state_numTR; sprintf(description, "time = % e", ckt->CKTtime); } else { /* Not a recognized CKT mode. */ return; } for (; model != NULL; model = model->NBJTnextModel) { output = model->NBJToutputs; for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { if (inst->NBJTprintGiven) { if ((ckt->CKTmode & MODETRAN) && ((ckt->CKTstat->STATaccepted - 1) % inst->NBJTprint != 0)) { continue; } anyOutput = 1; sprintf(fileName, "%s%s.%d.%s", output->OUTProotFile, prefix, *state_num, inst->NBJTname); if ((fpState = fopen(fileName, "wb")) == NULL) { perror(fileName); } else { NBJTputHeader(fpState, ckt, inst); ONEprnSolution(fpState, inst->NBJTpDevice, model->NBJToutputs); fclose(fpState); LOGmakeEntry(fileName, description); } } } } if (anyOutput) { (*state_num)++; } } #define NBJTnumOutputs 9 static void NBJTputHeader(FILE *file, CKTcircuit *ckt, NBJTinstance *inst) { char *reference; double refVal = 0.0; int numVars = NBJTnumOutputs; if (ckt->CKTmode & MODEDCOP) { reference = NULL; } else if (ckt->CKTmode & MODEDCTRANCURVE) { reference = "sweep"; refVal = ckt->CKTtime; numVars++; } else if (ckt->CKTmode & MODETRAN) { reference = "time"; refVal = ckt->CKTtime; numVars++; } else { reference = NULL; } fprintf(file, "Title: Device %s external state\n", inst->NBJTname); fprintf(file, "Plotname: Device Operating Point\n"); fprintf(file, "Command: deftype v conductance S\n"); fprintf(file, "Flags: real\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: 1\n"); numVars = 0; fprintf(file, "Variables:\n"); if (reference) { fprintf(file, "\t%d %s unknown\n", numVars++, reference); } fprintf(file, "\t%d v13 voltage\n", numVars++); fprintf(file, "\t%d v23 voltage\n", numVars++); fprintf(file, "\t%d i1 current\n", numVars++); fprintf(file, "\t%d i2 current\n", numVars++); fprintf(file, "\t%d i3 current\n", numVars++); fprintf(file, "\t%d g22 conductance\n", numVars++); fprintf(file, "\t%d g21 conductance\n", numVars++); fprintf(file, "\t%d g12 conductance\n", numVars++); fprintf(file, "\t%d g11 conductance\n", numVars++); fprintf(file, "Values:\n0"); if (reference) { fprintf(file, "\t% e\n", refVal); } fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTvce)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTvbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTic)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTie) - *(ckt->CKTstate0 + inst->NBJTic)); fprintf(file, "\t% e\n", -*(ckt->CKTstate0 + inst->NBJTie)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTdIeDVbe) - *(ckt->CKTstate0 + inst->NBJTdIcDVbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTdIeDVce) - *(ckt->CKTstate0 + inst->NBJTdIcDVce)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTdIcDVbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJTdIcDVce)); } void NBJTacct(GENmodel *inModel, CKTcircuit *ckt, FILE *file) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; OUTPcard *output; NG_IGNORE(ckt); for (; model != NULL; model = model->NBJTnextModel) { output = model->NBJToutputs; for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { if (output->OUTPstats) { ONEmemStats(file, inst->NBJTpDevice); ONEcpuStats(file, inst->NBJTpDevice); } } } } ngspice-26/src/spicelib/devices/nbjt/nbjtacld.c0000644000265600020320000000715212264261473021123 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/numglobs.h" #include "ngspice/suffix.h" /* External Declarations */ extern int ONEacDebug; int NBJTacLoad(GENmodel *inModel, CKTcircuit *ckt) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double startTime; for (; model != NULL; model = model->NBJTnextModel) { FieldDepMobility = model->NBJTmodels->MODLfieldDepMobility; Srh = model->NBJTmodels->MODLsrh; Auger = model->NBJTmodels->MODLauger; AvalancheGen = model->NBJTmodels->MODLavalancheGen; AcAnalysisMethod = model->NBJTmethods->METHacAnalysisMethod; MobDeriv = model->NBJTmethods->METHmobDeriv; ONEacDebug = model->NBJToutputs->OUTPacDebug; for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJTglobals)); model->NBJTmethods->METHacAnalysisMethod = NBJTadmittance(inst->NBJTpDevice, ckt->CKTomega, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); *(inst->NBJTcolColPtr) += yIcVce.real; *(inst->NBJTcolColPtr + 1) += yIcVce.imag; *(inst->NBJTcolBasePtr) += yIcVbe.real; *(inst->NBJTcolBasePtr + 1) += yIcVbe.imag; *(inst->NBJTcolEmitPtr) -= yIcVbe.real + yIcVce.real; *(inst->NBJTcolEmitPtr + 1) -= yIcVbe.imag + yIcVce.imag; *(inst->NBJTbaseColPtr) -= yIcVce.real - yIeVce.real; *(inst->NBJTbaseColPtr + 1) -= yIcVce.imag - yIeVce.imag; *(inst->NBJTbaseBasePtr) -= yIcVbe.real - yIeVbe.real; *(inst->NBJTbaseBasePtr + 1) -= yIcVbe.imag - yIeVbe.imag; *(inst->NBJTbaseEmitPtr) += yIcVbe.real + yIcVce.real - yIeVbe.real - yIeVce.real; *(inst->NBJTbaseEmitPtr + 1) += yIcVbe.imag + yIcVce.imag - yIeVbe.imag - yIeVce.imag; *(inst->NBJTemitColPtr) -= yIeVce.real; *(inst->NBJTemitColPtr + 1) -= yIeVce.imag; *(inst->NBJTemitBasePtr) -= yIeVbe.real; *(inst->NBJTemitBasePtr + 1) -= yIeVbe.imag; *(inst->NBJTemitEmitPtr) += yIeVbe.real + yIeVce.real; *(inst->NBJTemitEmitPtr + 1) += yIeVbe.imag + yIeVce.imag; if (ckt->CKTomega != 0.0) { inst->NBJTc11 = yIcVce.imag / ckt->CKTomega; inst->NBJTc12 = yIcVbe.imag / ckt->CKTomega; inst->NBJTc21 = (yIeVce.imag - yIcVce.imag) / ckt->CKTomega; inst->NBJTc22 = (yIeVbe.imag - yIcVbe.imag) / ckt->CKTomega; } else { inst->NBJTc11 = 0.0; /* XXX What else can be done?! */ inst->NBJTc12 = 0.0; /* XXX What else can be done?! */ inst->NBJTc21 = 0.0; /* XXX What else can be done?! */ inst->NBJTc22 = 0.0; /* XXX What else can be done?! */ } inst->NBJTy11r = yIcVce.real; inst->NBJTy11i = yIcVce.imag; inst->NBJTy12r = yIcVbe.real; inst->NBJTy12i = yIcVbe.imag; inst->NBJTy21r = yIeVce.real - yIcVce.real; inst->NBJTy21i = yIeVce.imag - yIcVce.imag; inst->NBJTy22r = yIeVbe.real - yIcVbe.real; inst->NBJTy22i = yIeVbe.imag - yIcVbe.imag; inst->NBJTsmSigAvail = TRUE; inst->NBJTpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtitf.h0000644000265600020320000000027212264261473021003 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NBJT #define DEV_NBJT extern SPICEdev *get_nbjt_info(void); #endif ngspice-26/src/spicelib/devices/nbjt/nbjtparm.c0000644000265600020320000000211212264261473021146 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets instance parameters for NBJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJTparam(int param, IFvalue *value, GENinstance *inInst, IFvalue *select) { register NBJTinstance *inst = (NBJTinstance *) inInst; NG_IGNORE(select); switch (param) { case NBJT_AREA: inst->NBJTarea = value->rValue; inst->NBJTareaGiven = TRUE; break; case NBJT_OFF: inst->NBJToff = TRUE; break; case NBJT_IC_FILE: inst->NBJTicFile = value->sValue; inst->NBJTicFileGiven = TRUE; break; case NBJT_PRINT: inst->NBJTprint = value->iValue; inst->NBJTprintGiven = TRUE; break; case NBJT_TEMP: inst->NBJTtemp = value->rValue + CONSTCtoK; inst->NBJTtempGiven = TRUE; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtask.c0000644000265600020320000001352012264261473020772 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Check out this one */ extern int NBJTinitSmSig(NBJTinstance *); /* ARGSUSED */ int NBJTask(CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select) { NBJTinstance *inst = (NBJTinstance *) inInst; NG_IGNORE(select); switch (which) { case NBJT_AREA: value->rValue = inst->NBJTarea; return (OK); case NBJT_TEMP: value->rValue = inst->NBJTtemp - CONSTCtoK; return (OK); case NBJT_G11: value->rValue = *(ckt->CKTstate0 + inst->NBJTdIcDVce); return (OK); case NBJT_G12: value->rValue = *(ckt->CKTstate0 + inst->NBJTdIcDVbe); return (OK); case NBJT_G13: value->rValue = -*(ckt->CKTstate0 + inst->NBJTdIcDVce) - *(ckt->CKTstate0 + inst->NBJTdIcDVbe); return (OK); case NBJT_G21: value->rValue = *(ckt->CKTstate0 + inst->NBJTdIeDVce) - *(ckt->CKTstate0 + inst->NBJTdIcDVce); return (OK); case NBJT_G22: value->rValue = *(ckt->CKTstate0 + inst->NBJTdIeDVbe) - *(ckt->CKTstate0 + inst->NBJTdIcDVbe); return (OK); case NBJT_G23: value->rValue = -*(ckt->CKTstate0 + inst->NBJTdIeDVce) + *(ckt->CKTstate0 + inst->NBJTdIcDVce) /* XXX there was a ;*/ -*(ckt->CKTstate0 + inst->NBJTdIeDVbe) + *(ckt->CKTstate0 + inst->NBJTdIcDVbe); return (OK); case NBJT_G31: value->rValue = -*(ckt->CKTstate0 + inst->NBJTdIeDVce); return (OK); case NBJT_G32: value->rValue = -*(ckt->CKTstate0 + inst->NBJTdIeDVbe); return (OK); case NBJT_G33: value->rValue = *(ckt->CKTstate0 + inst->NBJTdIeDVce) + *(ckt->CKTstate0 + inst->NBJTdIeDVbe); return (OK); case NBJT_C11: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = inst->NBJTc11; return (OK); case NBJT_C12: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = inst->NBJTc12; return (OK); case NBJT_C13: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = -inst->NBJTc11 - inst->NBJTc12; return (OK); case NBJT_C21: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = inst->NBJTc21; return (OK); case NBJT_C22: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = inst->NBJTc22; return (OK); case NBJT_C23: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = -inst->NBJTc21 - inst->NBJTc22; return (OK); case NBJT_C31: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = -inst->NBJTc11 - inst->NBJTc21; return (OK); case NBJT_C32: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = -inst->NBJTc12 - inst->NBJTc22; return (OK); case NBJT_C33: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->rValue = inst->NBJTc11 + inst->NBJTc21 + inst->NBJTc12 + inst->NBJTc22; return (OK); case NBJT_Y11: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = inst->NBJTy11r; value->cValue.imag = inst->NBJTy11i; return (OK); case NBJT_Y12: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = inst->NBJTy12r; value->cValue.imag = inst->NBJTy12i; return (OK); case NBJT_Y13: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = -inst->NBJTy11r - inst->NBJTy12r; value->cValue.imag = -inst->NBJTy11i - inst->NBJTy12i; return (OK); case NBJT_Y21: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = inst->NBJTy21r; value->cValue.imag = inst->NBJTy21i; return (OK); case NBJT_Y22: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = inst->NBJTy22r; value->cValue.imag = inst->NBJTy22i; return (OK); case NBJT_Y23: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = -inst->NBJTy21r - inst->NBJTy22r; value->cValue.imag = -inst->NBJTy21i - inst->NBJTy22i; return (OK); case NBJT_Y31: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = -inst->NBJTy11r - inst->NBJTy21r; value->cValue.imag = -inst->NBJTy11i - inst->NBJTy21i; return (OK); case NBJT_Y32: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = -inst->NBJTy12r - inst->NBJTy22r; value->cValue.imag = -inst->NBJTy12i - inst->NBJTy22i; return (OK); case NBJT_Y33: if (!inst->NBJTsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJTinitSmSig(inst); } value->cValue.real = inst->NBJTy11r + inst->NBJTy21r + inst->NBJTy12r + inst->NBJTy22r; value->cValue.imag = inst->NBJTy11i + inst->NBJTy21i + inst->NBJTy12i + inst->NBJTy22i; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/nbjt/nbjtpzld.c0000644000265600020320000000626112264261473021171 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "ngspice/suffix.h" /* External Declarations */ extern int ONEacDebug; int NBJTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double startTime; NG_IGNORE(ckt); for (; model != NULL; model = model->NBJTnextModel) { FieldDepMobility = model->NBJTmodels->MODLfieldDepMobility; Srh = model->NBJTmodels->MODLsrh; Auger = model->NBJTmodels->MODLauger; AvalancheGen = model->NBJTmodels->MODLavalancheGen; AcAnalysisMethod = model->NBJTmethods->METHacAnalysisMethod; MobDeriv = model->NBJTmethods->METHmobDeriv; ONEacDebug = model->NBJToutputs->OUTPacDebug; for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJTglobals)); NBJTys(inst->NBJTpDevice, s, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); if (ONEacDebug) { fprintf(stdout, "BJT admittances: %s:%s at s = % .5g, % .5g\n", model->NBJTmodName, inst->NBJTname, s->real, s->imag); fprintf(stdout, "Ycc: % .5g,% .5g\n", yIcVce.real, yIcVce.imag); fprintf(stdout, "Ycb: % .5g,% .5g\n", yIcVbe.real, yIcVbe.imag); fprintf(stdout, "Ybc: % .5g,% .5g\n", yIeVce.real - yIcVce.real, yIeVce.imag - yIcVce.imag); fprintf(stdout, "Ybb: % .5g,% .5g\n", yIeVbe.real - yIcVbe.real, yIeVbe.imag - yIcVbe.imag); } *(inst->NBJTcolColPtr) += yIcVce.real; *(inst->NBJTcolColPtr + 1) += yIcVce.imag; *(inst->NBJTcolBasePtr) += yIcVbe.real; *(inst->NBJTcolBasePtr + 1) += yIcVbe.imag; *(inst->NBJTcolEmitPtr) -= yIcVbe.real + yIcVce.real; *(inst->NBJTcolEmitPtr + 1) -= yIcVbe.imag + yIcVce.imag; *(inst->NBJTbaseColPtr) -= yIcVce.real - yIeVce.real; *(inst->NBJTbaseColPtr + 1) -= yIcVce.imag - yIeVce.imag; *(inst->NBJTbaseBasePtr) -= yIcVbe.real - yIeVbe.real; *(inst->NBJTbaseBasePtr + 1) -= yIcVbe.imag - yIeVbe.imag; *(inst->NBJTbaseEmitPtr) += yIcVbe.real + yIcVce.real - yIeVbe.real - yIeVce.real; *(inst->NBJTbaseEmitPtr + 1) += yIcVbe.imag + yIcVce.imag - yIeVbe.imag - yIeVce.imag; *(inst->NBJTemitColPtr) -= yIeVce.real; *(inst->NBJTemitColPtr + 1) -= yIeVce.imag; *(inst->NBJTemitBasePtr) -= yIeVbe.real; *(inst->NBJTemitBasePtr + 1) -= yIeVbe.imag; *(inst->NBJTemitEmitPtr) += yIeVbe.real + yIeVce.real; *(inst->NBJTemitEmitPtr + 1) += yIeVbe.imag + yIeVce.imag; inst->NBJTpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtset.c0000644000265600020320000001771612264261473021022 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "nbjtdefs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/ciderinp.h" #include "ngspice/suffix.h" #include "ngspice/meshext.h" #define TSCALLOC(var, size, type)\ if (size && (var =(type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NBJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the diode structure with those pointers needed later for fast matrix * loading */ { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; char *icFileName = NULL; size_t nameLen; int error; int xMeshSize; ONEdevice *pDevice; ONEcoord *xCoordList = NULL; ONEdomain *domainList = NULL; DOPprofile *profileList = NULL; DOPtable *dopTableList = NULL; ONEmaterial *pM, *pMaterial = NULL, *materialList = NULL; double startTime; /* loop through all the diode models */ for (; model != NULL; model = model->NBJTnextModel) { if (!model->NBJTpInfo) { TSCALLOC(model->NBJTpInfo, 1, ONEtranInfo); } methods = model->NBJTmethods; if (!methods) { TSCALLOC(methods, 1, METHcard); model->NBJTmethods = methods; } models = model->NBJTmodels; if (!models) { TSCALLOC(models, 1, MODLcard); model->NBJTmodels = models; } options = model->NBJToptions; if (!options) { TSCALLOC(options, 1, OPTNcard); model->NBJToptions = options; } outputs = model->NBJToutputs; if (!outputs) { TSCALLOC(outputs, 1, OUTPcard); model->NBJToutputs = outputs; } if (!methods->METHvoltPredGiven) { methods->METHvoltPred = FALSE; } if (!methods->METHmobDerivGiven) { methods->METHmobDeriv = TRUE; } if (!methods->METHoneCarrierGiven) { methods->METHoneCarrier = FALSE; } if (!methods->METHacAnalysisMethodGiven) { methods->METHacAnalysisMethod = SOR; } if (!methods->METHdabstolGiven) { methods->METHdabstol = DABSTOL1D; } if (!methods->METHdreltolGiven) { methods->METHdreltol = ckt->CKTreltol; } if (!methods->METHitLimGiven) { methods->METHitLim = 20; } if (!methods->METHomegaGiven || methods->METHomega <= 0.0) { methods->METHomega = 2.0 * M_PI /* radians/sec */ ; } if (!options->OPTNdefaGiven || options->OPTNdefa <= 0.0) { options->OPTNdefa = 1.0e4 /* cm^2 */ ; } if (!options->OPTNbaseLengthGiven) { options->OPTNbaseLength = 0.0; } if (!options->OPTNbaseAreaGiven) { options->OPTNbaseArea = 1.0; } if (!options->OPTNdeviceTypeGiven) { options->OPTNdeviceType = OPTN_BIPOLAR; } if (!options->OPTNicFileGiven) { options->OPTNicFile = NULL; options->OPTNunique = FALSE; /* Can't form a unique name. */ } if (!options->OPTNuniqueGiven) { options->OPTNunique = FALSE; } /* Set up the rest of the card lists */ if ((error = MODLsetup(model->NBJTmodels)) != 0) return (error); BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; if ((error = OUTPsetup(model->NBJToutputs)) != 0) return (error); if ((error = MATLsetup(model->NBJTmaterials, &materialList)) != 0) return (error); if ((error = MOBsetup(model->NBJTmobility, materialList)) != 0) return (error); if ((error = MESHsetup('x', model->NBJTxMeshes, &xCoordList, &xMeshSize)) != 0) return (error); if ((error = DOMNsetup(model->NBJTdomains, &domainList, xCoordList, NULL, materialList)) != 0) return (error); if ((error = BDRYsetup(model->NBJTboundaries, xCoordList, NULL, domainList)) != 0) return (error); if ((error = CONTsetup(model->NBJTcontacts, NULL)) != 0) return (error); if ((error = DOPsetup(model->NBJTdopings, &profileList, &dopTableList, xCoordList, NULL)) != 0) return (error); model->NBJTmatlInfo = materialList; model->NBJTprofiles = profileList; model->NBJTdopTables = dopTableList; /* loop through all the instances of the model */ for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NBJTprintGiven) { inst->NBJTprint = 0; } else if (inst->NBJTprint <= 0) { inst->NBJTprint = 1; } if (!inst->NBJTicFileGiven) { if (options->OPTNunique) { nameLen = strlen(options->OPTNicFile) + strlen(inst->NBJTname) + 1; TSCALLOC(icFileName, nameLen+1, char); sprintf(icFileName, "%s.%s", options->OPTNicFile, inst->NBJTname); icFileName[nameLen] = '\0'; inst->NBJTicFile = icFileName; } else if (options->OPTNicFile != NULL) { nameLen = strlen(options->OPTNicFile); TSCALLOC(icFileName, nameLen+1, char); icFileName = strcpy(icFileName, options->OPTNicFile); inst->NBJTicFile = icFileName; } else { inst->NBJTicFile = NULL; } } inst->NBJTstate = *states; *states += NBJTnumStates; if (!inst->NBJTpDevice) { /* Assign the mesh info to each instance. */ TSCALLOC(pDevice, 1, ONEdevice); TSCALLOC(pDevice->pStats, 1, ONEstats); pDevice->name = inst->NBJTname; pDevice->solverType = SLV_NONE; pDevice->numNodes = xMeshSize; pDevice->abstol = methods->METHdabstol; pDevice->reltol = methods->METHdreltol; pDevice->rhsImag = NULL; TSCALLOC(pDevice->elemArray, pDevice->numNodes, ONEelem *); /* Create a copy of material data that can change with temperature. */ pDevice->pMaterials = NULL; for (pM = materialList; pM != NULL; pM = pM->next) { if (pDevice->pMaterials == NULL) { TSCALLOC(pMaterial, 1, ONEmaterial); pDevice->pMaterials = pMaterial; } else { TSCALLOC(pMaterial->next, 1, ONEmaterial); pMaterial = pMaterial->next; } /* Copy everything, then fix the incorrect pointer. */ bcopy(pM, pMaterial, sizeof(ONEmaterial)); pMaterial->next = NULL; } /* generate the mesh structure for the device */ ONEbuildMesh(pDevice, xCoordList, domainList, pDevice->pMaterials); if (options->OPTNbaseDepthGiven) { /* The base contact depth has been specified in the input. */ pDevice->baseIndex = MESHlocate(xCoordList, options->OPTNbaseDepth); } else { pDevice->baseIndex = -1; /* Invalid index acts as a flag */ } /* store the device info in the instance */ inst->NBJTpDevice = pDevice; } /* Now update the state pointers. */ ONEgetStatePointers(inst->NBJTpDevice, states); /* Wipe out statistics from previous runs (if any). */ bzero(inst->NBJTpDevice->pStats, sizeof(ONEstats)); inst->NBJTpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(NBJTcolColPtr, NBJTcolNode, NBJTcolNode); TSTALLOC(NBJTbaseBasePtr, NBJTbaseNode, NBJTbaseNode); TSTALLOC(NBJTemitEmitPtr, NBJTemitNode, NBJTemitNode); TSTALLOC(NBJTcolBasePtr, NBJTcolNode, NBJTbaseNode); TSTALLOC(NBJTcolEmitPtr, NBJTcolNode, NBJTemitNode); TSTALLOC(NBJTbaseColPtr, NBJTbaseNode, NBJTcolNode); TSTALLOC(NBJTbaseEmitPtr, NBJTbaseNode, NBJTemitNode); TSTALLOC(NBJTemitColPtr, NBJTemitNode, NBJTcolNode); TSTALLOC(NBJTemitBasePtr, NBJTemitNode, NBJTbaseNode); } /* Clean up lists */ killCoordInfo(xCoordList); killDomainInfo(domainList); } return (OK); } ngspice-26/src/spicelib/devices/nbjt/Makefile.am0000644000265600020320000000075012264261473021227 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libnbjt.la libnbjt_la_SOURCES = \ nbjt.c \ nbjtacld.c \ nbjtask.c \ nbjtdefs.h \ nbjtdel.c \ nbjtdest.c \ nbjtdump.c \ nbjtext.h \ nbjtinit.c \ nbjtinit.h \ nbjtitf.h \ nbjtload.c \ nbjtmdel.c \ nbjtmpar.c \ nbjtparm.c \ nbjtpzld.c \ nbjtset.c \ nbjttemp.c \ nbjttrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/nbjt/nbjtdel.c0000644000265600020320000000162612264261473020764 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NBJT instance from the circuit and frees the * storage it was using. */ #include "ngspice/ngspice.h" #include "nbjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJTdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { NBJTmodel *model = (NBJTmodel *) inModel; NBJTinstance **fast = (NBJTinstance **) kill; NBJTinstance **prev = NULL; NBJTinstance *inst; for (; model; model = model->NBJTnextModel) { prev = &(model->NBJTinstances); for (inst = *prev; inst; inst = *prev) { if (inst->NBJTname == name || (fast && inst == *fast)) { *prev = inst->NBJTnextInstance; FREE(inst); return (OK); } prev = &(inst->NBJTnextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/nbjt/Makefile.in0000644000265600020320000004242012264261537021241 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/nbjt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnbjt_la_LIBADD = am_libnbjt_la_OBJECTS = nbjt.lo nbjtacld.lo nbjtask.lo nbjtdel.lo \ nbjtdest.lo nbjtdump.lo nbjtinit.lo nbjtload.lo nbjtmdel.lo \ nbjtmpar.lo nbjtparm.lo nbjtpzld.lo nbjtset.lo nbjttemp.lo \ nbjttrun.lo libnbjt_la_OBJECTS = $(am_libnbjt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnbjt_la_SOURCES) DIST_SOURCES = $(libnbjt_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnbjt.la libnbjt_la_SOURCES = \ nbjt.c \ nbjtacld.c \ nbjtask.c \ nbjtdefs.h \ nbjtdel.c \ nbjtdest.c \ nbjtdump.c \ nbjtext.h \ nbjtinit.c \ nbjtinit.h \ nbjtitf.h \ nbjtload.c \ nbjtmdel.c \ nbjtmpar.c \ nbjtparm.c \ nbjtpzld.c \ nbjtset.c \ nbjttemp.c \ nbjttrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/nbjt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/nbjt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnbjt.la: $(libnbjt_la_OBJECTS) $(libnbjt_la_DEPENDENCIES) $(EXTRA_libnbjt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnbjt_la_OBJECTS) $(libnbjt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjtset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjttemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbjttrun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/nbjt/nbjtinit.h0000644000265600020320000000037012264261473021163 0ustar andreasadmin#ifndef _NBJTINIT_H #define _NBJTINIT_H extern IFparm NBJTpTable[ ]; extern IFparm NBJTmPTable[ ]; extern char *NBJTnames[ ]; extern int NBJTpTSize; extern int NBJTmPTSize; extern int NBJTnSize; extern int NBJTiSize; extern int NBJTmSize; #endif ngspice-26/src/spicelib/devices/nbjt/nbjttemp.c0000644000265600020320000001140412264261473021160 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" extern int ONEdcDebug; int NBJTtemp(GENmodel *inModel, CKTcircuit *ckt) /* * perform the temperature update to the bjt */ { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; ONEmaterial *pM, *pMaterial, *pNextMaterial; ONEdevice *pDevice; double startTime; int baseIndex, indexBE, indexBC; /* loop through all the bjt models */ for (; model != NULL; model = model->NBJTnextModel) { methods = model->NBJTmethods; models = model->NBJTmodels; options = model->NBJToptions; outputs = model->NBJToutputs; if (!options->OPTNtnomGiven) { options->OPTNtnom = ckt->CKTnomTemp; } for (pM = model->NBJTmatlInfo; pM != NULL; pM = pM->next) { pM->tnom = options->OPTNtnom; } BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NBJTtempGiven) { inst->NBJTtemp = ckt->CKTtemp; } if (!inst->NBJTareaGiven || inst->NBJTarea <= 0.0) { inst->NBJTarea = 1.0; } inst->NBJTpDevice->area = inst->NBJTarea * options->OPTNdefa; /* Compute and save globals for this instance. */ GLOBcomputeGlobals(&(inst->NBJTglobals), inst->NBJTtemp); /* Calculate new sets of material parameters. */ pM = model->NBJTmatlInfo; pMaterial = inst->NBJTpDevice->pMaterials; for (; pM != NULL; pM = pM->next, pMaterial = pMaterial->next) { /* Copy the original values, then fix the incorrect pointer. */ pNextMaterial = pMaterial->next; bcopy(pM, pMaterial, sizeof(ONEmaterial)); pMaterial->next = pNextMaterial; /* Now do the temperature dependence. */ MATLtempDep(pMaterial, pMaterial->tnom); if (outputs->OUTPmaterial) { printMaterialInfo(pMaterial); } } /* Assign doping to the mesh. */ ONEsetDoping(inst->NBJTpDevice, model->NBJTprofiles, model->NBJTdopTables); /* Assign other physical parameters to the mesh. */ ONEsetup(inst->NBJTpDevice); /* Assign boundary condition parameters. */ ONEsetBCparams(inst->NBJTpDevice, model->NBJTboundaries, model->NBJTcontacts); /* Normalize everything. */ ONEnormalize(inst->NBJTpDevice); /* Find the device's type. */ if (inst->NBJTpDevice->elemArray[1]->pNodes[0]->netConc < 0.0) { inst->NBJTtype = PNP; } else { inst->NBJTtype = NPN; } /* Find the location of the base index. */ pDevice = inst->NBJTpDevice; baseIndex = pDevice->baseIndex; if (baseIndex <= 0) { if (options->OPTNbaseDepthGiven) { printf("Warning: base contact not on node -- adjusting contact\n"); } NBJTjunctions(pDevice, &indexBE, &indexBC); pDevice->baseIndex = (indexBE + indexBC) / 2; } if (inst->NBJTtype == PNP) { pDevice->elemArray[pDevice->baseIndex]->pNodes[0]->baseType = N_TYPE; } else if (inst->NBJTtype == NPN) { pDevice->elemArray[pDevice->baseIndex]->pNodes[0]->baseType = P_TYPE; } else { printf("NBJTtemp: unknown BJT type \n"); } if (baseIndex <= 0 && !options->OPTNbaseDepthGiven) { ONEdcDebug = FALSE; ONEequilSolve(pDevice); adjustBaseContact(pDevice, indexBE, indexBC); } printf("BJT: base contact depth is %g um at node %d\n", pDevice->elemArray[pDevice->baseIndex]->pNodes[0]->x * 1e4, pDevice->baseIndex); /* Find, normalize and convert to reciprocal-form the base length. */ pDevice->baseLength = options->OPTNbaseLength; if (pDevice->baseLength > 0.0) { pDevice->baseLength /= LNorm; pDevice->baseLength = 1.0 / pDevice->baseLength; } else if (pDevice->elemArray[pDevice->baseIndex]->evalNodes[0]) { pDevice->baseLength = pDevice->elemArray[pDevice->baseIndex]->rDx; } else { pDevice->baseLength = pDevice->elemArray[pDevice->baseIndex - 1]->rDx; } /* Adjust reciprocal base length to account for base area factor */ pDevice->baseLength *= options->OPTNbaseArea; inst->NBJTpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt/nbjtload.c0000644000265600020320000004033712264261473021141 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This is the function called each iteration to evaluate the numerical BJTs * in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "nbjtdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward declarations */ int NBJTinitSmSig(NBJTinstance *); /* External Declarations */ extern int ONEdcDebug; extern int ONEtranDebug; extern int ONEacDebug; int NBJTload(GENmodel *inModel, CKTcircuit *ckt) { register NBJTmodel *model = (NBJTmodel *) inModel; register NBJTinstance *inst; register ONEdevice *pDevice; double startTime, startTime2, totalTime, totalTime2; double tol; double ic, ie; double iceq, ieeq; double ichat = 0.0, iehat = 0.0; double delVce, delVbe; double vce, vbe /*, vbc*/; double dIeDVce, dIeDVbe; double dIcDVce, dIcDVbe; double xfact; int icheck; int icheck1; int i; double deltaNorm[7]; int devConverged = 0; int numDevNonCon; int deviceType; int doInitSolve; int doVoltPred; char *initStateName; /* loop through all the models */ for (; model != NULL; model = model->NBJTnextModel) { FieldDepMobility = model->NBJTmodels->MODLfieldDepMobility; Srh = model->NBJTmodels->MODLsrh; Auger = model->NBJTmodels->MODLauger; AvalancheGen = model->NBJTmodels->MODLavalancheGen; MobDeriv = model->NBJTmethods->METHmobDeriv; MaxIterations = model->NBJTmethods->METHitLim; ONEdcDebug = model->NBJToutputs->OUTPdcDebug; ONEtranDebug = model->NBJToutputs->OUTPtranDebug; ONEacDebug = model->NBJToutputs->OUTPacDebug; deviceType = model->NBJToptions->OPTNdeviceType; doVoltPred = model->NBJTmethods->METHvoltPred; if (ckt->CKTmode & MODEINITPRED) { /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { model->NBJTpInfo->order = ckt->CKTorder; model->NBJTpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJTpInfo->intCoeff, deltaNorm); computePredCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJTpInfo->predCoeff, deltaNorm); } } else if (ckt->CKTmode & MODEINITTRAN) { model->NBJTpInfo->order = ckt->CKTorder; model->NBJTpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJTpInfo->intCoeff, deltaNorm); } /* loop through all the instances of the model */ for (inst = model->NBJTinstances; inst != NULL; inst = inst->NBJTnextInstance) { pDevice = inst->NBJTpDevice; totalTime = 0.0; startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJTglobals)); /* * initialization */ pDevice->devStates = ckt->CKTstates; icheck = 1; doInitSolve = FALSE; initStateName = NULL; if (ckt->CKTmode & MODEINITSMSIG) { vbe = *(ckt->CKTstate0 + inst->NBJTvbe); vce = *(ckt->CKTstate0 + inst->NBJTvce); delVbe = 0.0; delVce = 0.0; NBJTsetBCs(pDevice, vce, vbe); } else if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + inst->NBJTvbe) = *(ckt->CKTstate1 + inst->NBJTvbe); *(ckt->CKTstate0 + inst->NBJTvce) = *(ckt->CKTstate1 + inst->NBJTvce); vbe = *(ckt->CKTstate1 + inst->NBJTvbe); vce = *(ckt->CKTstate1 + inst->NBJTvce); ONEsaveState(pDevice); delVbe = 0.0; delVce = 0.0; } else if ((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { doInitSolve = TRUE; initStateName = inst->NBJTicFile; vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else if ((ckt->CKTmode & MODEINITJCT) && (inst->NBJToff == 0)) { doInitSolve = TRUE; initStateName = inst->NBJTicFile; vbe = inst->NBJTtype * 0.6; vce = inst->NBJTtype * 1.0; delVbe = vbe; delVce = vce; } else if (ckt->CKTmode & MODEINITJCT) { doInitSolve = TRUE; vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else if ((ckt->CKTmode & MODEINITFIX) && inst->NBJToff) { vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else { if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + inst->NBJTvbe) = *(ckt->CKTstate1 + inst->NBJTvbe); *(ckt->CKTstate0 + inst->NBJTvce) = *(ckt->CKTstate1 + inst->NBJTvce); *(ckt->CKTstate0 + inst->NBJTic) = *(ckt->CKTstate1 + inst->NBJTic); *(ckt->CKTstate0 + inst->NBJTie) = *(ckt->CKTstate1 + inst->NBJTie); *(ckt->CKTstate0 + inst->NBJTdIeDVce) = *(ckt->CKTstate1 + inst->NBJTdIeDVce); *(ckt->CKTstate0 + inst->NBJTdIeDVbe) = *(ckt->CKTstate1 + inst->NBJTdIeDVbe); *(ckt->CKTstate0 + inst->NBJTdIcDVce) = *(ckt->CKTstate1 + inst->NBJTdIcDVce); *(ckt->CKTstate0 + inst->NBJTdIcDVbe) = *(ckt->CKTstate1 + inst->NBJTdIcDVbe); if (!(ckt->CKTmode & MODEDCTRANCURVE)) { /* no linear prediction on device voltages */ vbe = *(ckt->CKTstate1 + inst->NBJTvbe); vce = *(ckt->CKTstate1 + inst->NBJTvce); ONEpredict(pDevice, model->NBJTpInfo); } else { if (doVoltPred) { /* linear prediction */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; vbe = (1+xfact) * (*(ckt->CKTstate1 + inst->NBJTvbe)) - (xfact) * (*(ckt->CKTstate2 + inst->NBJTvbe)); vce = (1+xfact) * (*(ckt->CKTstate1 + inst->NBJTvce)) - (xfact) * (*(ckt->CKTstate2 + inst->NBJTvce)); } else { vbe = *(ckt->CKTstate1 + inst->NBJTvbe); vce = *(ckt->CKTstate1 + inst->NBJTvce); } } } else { /* * compute new nonlinear branch voltages */ vbe = *(ckt->CKTrhsOld + inst->NBJTbaseNode) - *(ckt->CKTrhsOld + inst->NBJTemitNode); vce = *(ckt->CKTrhsOld + inst->NBJTcolNode) - *(ckt->CKTrhsOld + inst->NBJTemitNode); } delVbe = vbe - *(ckt->CKTstate0 + inst->NBJTvbe); delVce = vce - *(ckt->CKTstate0 + inst->NBJTvce); ichat = *(ckt->CKTstate0 + inst->NBJTic) - *(ckt->CKTstate0 + inst->NBJTdIcDVbe) * delVbe - *(ckt->CKTstate0 + inst->NBJTdIcDVce) * delVce; iehat = *(ckt->CKTstate0 + inst->NBJTie) - *(ckt->CKTstate0 + inst->NBJTdIeDVbe) * delVbe - *(ckt->CKTstate0 + inst->NBJTdIeDVce) * delVce; #ifndef NOBYPASS /* * bypass if solution has not changed */ /* * the following collections of if's would be just one if the average * compiler could handle it, but many find the expression too * complicated, thus the split. */ if ((ckt->CKTbypass) && pDevice->converged && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delVbe) < (ckt->CKTreltol * MAX(fabs(vbe), fabs(*(ckt->CKTstate0 + inst->NBJTvbe))) + ckt->CKTvoltTol))) if ((fabs(delVce) < ckt->CKTreltol * MAX(fabs(vce), fabs(*(ckt->CKTstate0 + inst->NBJTvce))) + ckt->CKTvoltTol)) if ((fabs(ichat - *(ckt->CKTstate0 + inst->NBJTic)) < ckt->CKTreltol * MAX(fabs(ichat), fabs(*(ckt->CKTstate0 + inst->NBJTic))) + ckt->CKTabstol)) if ((fabs(iehat - *(ckt->CKTstate0 + inst->NBJTie)) < ckt->CKTreltol * MAX(fabs(iehat), fabs(*(ckt->CKTstate0 + inst->NBJTie))) + ckt->CKTabstol)) { /* * bypassing.... */ vbe = *(ckt->CKTstate0 + inst->NBJTvbe); vce = *(ckt->CKTstate0 + inst->NBJTvce); ic = *(ckt->CKTstate0 + inst->NBJTic); ie = *(ckt->CKTstate0 + inst->NBJTie); dIeDVce = *(ckt->CKTstate0 + inst->NBJTdIeDVce); dIeDVbe = *(ckt->CKTstate0 + inst->NBJTdIeDVbe); dIcDVce = *(ckt->CKTstate0 + inst->NBJTdIcDVce); dIcDVbe = *(ckt->CKTstate0 + inst->NBJTdIcDVbe); goto load; } #endif /* NOBYPASS */ /* * limit nonlinear branch voltages */ icheck1 = 1; vbe = inst->NBJTtype * limitVbe(inst->NBJTtype * vbe, inst->NBJTtype * *(ckt->CKTstate0 + inst->NBJTvbe), &icheck); /* vbc = vbe - vce; vbc = inst->NBJTtype * limitVbe(inst->NBJTtype * vbc, inst->NBJTtype * (*(ckt->CKTstate0 + inst->NBJTvbe) - *(ckt->CKTstate0 + inst->NBJTvce)), &icheck1); vce = vbe - vbc; */ vce = inst->NBJTtype * limitVce(inst->NBJTtype * vce, inst->NBJTtype * *(ckt->CKTstate0 + inst->NBJTvce), &icheck1); if (icheck1 == 1) icheck = 1; delVbe = vbe - *(ckt->CKTstate0 + inst->NBJTvbe); delVce = vce - *(ckt->CKTstate0 + inst->NBJTvce); } if (doInitSolve) { if (ONEdcDebug) { printVoltages(stdout, model->NBJTmodName, inst->NBJTname, deviceType, 2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } startTime2 = SPfrontEnd->IFseconds(); ONEequilSolve(pDevice); totalTime2 = SPfrontEnd->IFseconds() - startTime2; pDevice->pStats->totalTime[STAT_SETUP] += totalTime2; pDevice->pStats->totalTime[STAT_DC] -= totalTime2; ONEbiasSolve(pDevice, MaxIterations, FALSE, NULL); *(ckt->CKTstate0 + inst->NBJTvbe) = 0.0; *(ckt->CKTstate0 + inst->NBJTvce) = 0.0; if (initStateName != NULL) { if (ONEreadState(pDevice, initStateName, 2, &vce, &vbe ) < 0) { fprintf(stderr, "NBJTload: trouble reading state-file %s\n", initStateName); } else { NBJTsetBCs(pDevice, vce, vbe); delVce = delVbe = 0.0; } } } /* * determine dc current and derivatives using the numerical routines */ if (ckt->CKTmode & (MODEDCOP | MODETRANOP | MODEDCTRANCURVE | MODEINITSMSIG)) { numDevNonCon = 0; inst->NBJTc11 = inst->NBJTy11r = inst->NBJTy11i = 0.0; inst->NBJTc12 = inst->NBJTy12r = inst->NBJTy12i = 0.0; inst->NBJTc21 = inst->NBJTy21r = inst->NBJTy21i = 0.0; inst->NBJTc22 = inst->NBJTy22r = inst->NBJTy22i = 0.0; inst->NBJTsmSigAvail = FALSE; devNonCon: NBJTproject(pDevice, delVce, delVbe, vbe); if (ONEdcDebug) { printVoltages(stdout, model->NBJTmodName, inst->NBJTname, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); } ONEbiasSolve(pDevice, MaxIterations, FALSE, model->NBJTpInfo); devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ NBJTcurrent(pDevice, FALSE, NULL, &ie, &ic); NBJTconductance(pDevice, FALSE, NULL, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); /* * Add Gmin terms to everything in case we are operating at * abnormally low current levels */ ie += ckt->CKTgmin * (vce + vbe); dIeDVce += ckt->CKTgmin; dIeDVbe += ckt->CKTgmin; ic += ckt->CKTgmin * (2.0 * vce - vbe); dIcDVce += 2.0 * ckt->CKTgmin; dIcDVbe -= ckt->CKTgmin; } else { /* reduce the voltage step until converged */ /* restore the boundary potential to previous value */ NBJTsetBCs(pDevice, vce - delVce, vbe - delVbe); ONEstoreInitialGuess(pDevice); ONEresetJacobian(pDevice); delVbe *= 0.5; delVce *= 0.5; vbe = delVbe + *(ckt->CKTstate0 + inst->NBJTvbe); vce = delVce + *(ckt->CKTstate0 + inst->NBJTvce); numDevNonCon++; icheck = 1; if (numDevNonCon > 10) { printVoltages(stderr, model->NBJTmodName, inst->NBJTname, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); fprintf(stderr, "*** Non-convergence during load ***\n"); totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } else { goto devNonCon; } } } if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG)) { /* * store small-signal parameters */ if ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) { if (ckt->CKTmode & MODEINITSMSIG) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; startTime2 = SPfrontEnd->IFseconds(); NBJTinitSmSig(inst); pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime2; continue; } else { inst->NBJTsmSigAvail = FALSE; } /* * transient analysis */ if (ckt->CKTmode & MODEINITPRED) { NBJTsetBCs(pDevice, vce, vbe); ONEstoreInitialGuess(pDevice); } else { NBJTupdate(pDevice, delVce, delVbe, vbe, TRUE); } if (ONEtranDebug) { printVoltages(stdout, model->NBJTmodName, inst->NBJTname, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); } ONEbiasSolve(pDevice, 0, TRUE, model->NBJTpInfo); if (!finite(pDevice->rhsNorm)) { /* Timestep took us to never-never land. */ totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_TRAN] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } devConverged = ONEdeviceConverged(pDevice); pDevice->converged = devConverged; /* compute the currents */ NBJTcurrent(pDevice, TRUE, model->NBJTpInfo->intCoeff, &ie, &ic); NBJTconductance(pDevice, TRUE, model->NBJTpInfo->intCoeff, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); /* * Add Gmin terms to everything in case we are operating at * abnormally low current levels */ ie += ckt->CKTgmin * (vce + vbe); dIeDVce += ckt->CKTgmin; dIeDVbe += ckt->CKTgmin; ic += ckt->CKTgmin * (2.0 * vce - vbe); dIcDVce += 2.0 * ckt->CKTgmin; dIcDVbe -= ckt->CKTgmin; } } /* * check convergence */ if ((!(ckt->CKTmode & MODEINITFIX)) || (!(inst->NBJToff))) { if (icheck == 1 || !devConverged) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(ichat), fabs(ic)) + ckt->CKTabstol; if (fabs(ichat - ic) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(iehat), fabs(ie)) + ckt->CKTabstol; if (fabs(iehat - ie) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } } } } *(ckt->CKTstate0 + inst->NBJTvbe) = vbe; *(ckt->CKTstate0 + inst->NBJTvce) = vce; *(ckt->CKTstate0 + inst->NBJTic) = ic; *(ckt->CKTstate0 + inst->NBJTie) = ie; *(ckt->CKTstate0 + inst->NBJTdIeDVce) = dIeDVce; *(ckt->CKTstate0 + inst->NBJTdIeDVbe) = dIeDVbe; *(ckt->CKTstate0 + inst->NBJTdIcDVce) = dIcDVce; *(ckt->CKTstate0 + inst->NBJTdIcDVbe) = dIcDVbe; load: /* * load current excitation vector */ iceq = ic - dIcDVce * vce - dIcDVbe * vbe; ieeq = ie - dIeDVce * vce - dIeDVbe * vbe; *(ckt->CKTrhs + inst->NBJTcolNode) -= iceq; *(ckt->CKTrhs + inst->NBJTbaseNode) -= ieeq - iceq; *(ckt->CKTrhs + inst->NBJTemitNode) += ieeq; /* * load y matrix */ *(inst->NBJTcolColPtr) += dIcDVce; *(inst->NBJTcolBasePtr) += dIcDVbe; *(inst->NBJTcolEmitPtr) -= dIcDVbe + dIcDVce; *(inst->NBJTbaseColPtr) -= dIcDVce - dIeDVce; *(inst->NBJTbaseBasePtr) -= dIcDVbe - dIeDVbe; *(inst->NBJTbaseEmitPtr) += dIcDVbe + dIcDVce - dIeDVbe - dIeDVce; *(inst->NBJTemitColPtr) -= dIeDVce; *(inst->NBJTemitBasePtr) -= dIeDVbe; *(inst->NBJTemitEmitPtr) += dIeDVbe + dIeDVce; totalTime += SPfrontEnd->IFseconds() - startTime; if (ckt->CKTmode & MODETRAN) { pDevice->pStats->totalTime[STAT_TRAN] += totalTime; } else { pDevice->pStats->totalTime[STAT_DC] += totalTime; } } } return (OK); } int NBJTinitSmSig(NBJTinstance *inst) { SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double omega = inst->NBJTmodPtr->NBJTmethods->METHomega; AcAnalysisMethod = SOR_ONLY; (void) NBJTadmittance(inst->NBJTpDevice, omega, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); inst->NBJTc11 = yIcVce.imag / omega; inst->NBJTc12 = yIcVbe.imag / omega; inst->NBJTc21 = (yIeVce.imag - yIcVce.imag) / omega; inst->NBJTc22 = (yIeVbe.imag - yIcVbe.imag) / omega; inst->NBJTy11r = yIcVce.real; inst->NBJTy11i = yIcVce.imag; inst->NBJTy12r = yIcVbe.real; inst->NBJTy12i = yIcVbe.imag; inst->NBJTy21r = yIeVce.real - yIcVce.real; inst->NBJTy21i = yIeVce.imag - yIcVce.imag; inst->NBJTy22r = yIeVbe.real - yIcVbe.real; inst->NBJTy22i = yIeVbe.imag - yIcVbe.imag; inst->NBJTsmSigAvail = TRUE; return (OK); } ngspice-26/src/spicelib/devices/adms/0000755000265600020320000000000012264261473017160 5ustar andreasadminngspice-26/src/spicelib/devices/adms/admst/0000755000265600020320000000000012264261473020270 5ustar andreasadminngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEinit.h.xml0000644000265600020320000000432112264261473024462 0ustar andreasadmin #ifndef _$(module)INIT_H #define _$(module)INIT_H extern IFparm $(module)pTable[ ]; extern IFparm $(module)mPTable[ ]; extern char *$(module)names[ ]; extern int $(module)pTSize; extern int $(module)mPTSize; extern int $(module)nSize; extern int $(module)iSize; extern int $(module)mSize; #endif ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEask.c.xml0000644000265600020320000000632712264261473024300 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "$(module)defs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { $(module)instance *instance = ($(module)instance*)inst; NG_IGNOREABLE(ckt); NG_IGNOREABLE(value); NG_IGNOREABLE(select); NG_IGNOREABLE(instance); switch (which) { default: return(-1); } return(-1); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEdel.c.xml0000644000265600020320000000604412264261473024262 0ustar andreasadmin #include "ngspice/ngspice.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)delete(GENmodel *inModel, IFuid name, GENinstance **inInst) { register $(module)model *model = ($(module)model*)inModel; register $(module)instance **fast =($(module)instance**)inInst; $(module)instance **prev = NULL; $(module)instance *here; for ( ; model ; model = model->$(module)nextModel ) { prev = &(model->$(module)instances); for (here = *prev; here ; here = *prev) { if(here->$(module)name == name || (fast && here==*fast) ) { *prev = here->$(module)nextInstance; FREE(here); return(OK); } } } return(E_NODEV); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULE.c.xml0000644000265600020320000001075212264261473023576 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "$(module)defs.h" #include "ngspice/suffix.h" char *$(module)names[] = { }; int $(module)nSize = NUMELEMS($(module)names); int $(module)pTSize = NUMELEMS($(module)pTable); int $(module)mPTSize = NUMELEMS($(module)mPTable); int $(module)iSize = sizeof($(module)instance); int $(module)mSize = sizeof($(module)model); ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEsetup.c.xml0000644000265600020320000001516612264261473024663 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "$(module)defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int $(module)setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the $(module) device structure with those pointers needed later * for fast matrix loading */ { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; /* loop through all the $(module) device models */ for ( ;model != NULL ;model = model->$(module)nextModel ) { if(model->%s_Given == FALSE) model->%s=%s; for ( here = model->$(module)instances ;here != NULL ; here = here->$(module)nextInstance ) { if(here->%s_Given == FALSE) here->%s=%s; /* Internal Nodes */ { here->%sNode = -1; } /* set states */ here->state_%s_%s = *states; *states += 2; /* set Sparse Matrix Pointers */ here->PTR_J_%s_%s_required=0; $(module)guesstopology(matrix,ckt,model,here); /* Internal Nodes */ { int error; CKTnode *tmp; if(here->%sNode == -1) { error=CKTmkVolt(ckt,&tmp,here->$(module)name,"$info"); if(error) return(error); here->%sNode = tmp->number; } } if(here->PTR_J_%s_%s_required==1) { here->PTR_J_%s_%s=SMPmakeElt(matrix,here->%sNode,here->%sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml0000644000265600020320000003466312264261473026451 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "$(module)defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" #define jacobian(a,b) here->PTR_J_##a##_##b##_required=1; #define static_jacobian4(p,q,r,s) jacobian(p,r) jacobian(p,s) jacobian(q,r) jacobian(q,s) #define static_jacobian2s(p,q,r) jacobian(p,r) jacobian(q,r) #define static_jacobian2p(p,r,s) jacobian(p,r) jacobian(p,s) #define static_jacobian1(p,r) jacobian(p,r) #define dynamic_jacobian4(p,q,r,s) jacobian(p,r) jacobian(p,s) jacobian(q,r) jacobian(q,s) #define dynamic_jacobian2s(p,q,r) jacobian(p,r) jacobian(q,r) #define dynamic_jacobian2p(p,r,s) jacobian(p,r) jacobian(p,s) #define dynamic_jacobian1(p,r) jacobian(p,r) #define whitenoise_jacobian4(p,q,r,s) #define whitenoise_jacobian2s(p,q,r) #define whitenoise_jacobian2p(p,r,s) #define whitenoise_jacobian1(p) #define flickernoise_jacobian4(p,q,r,s) #define flickernoise_jacobian2s(p,q,r) #define flickernoise_jacobian2p(p,r,s) #define flickernoise_jacobian1(p) int $(module)guesstopology (SMPmatrix *matrix, CKTcircuit *ckt, $(module)model *model, $(module)instance *here) /* guess topology */ { NG_IGNOREABLE(matrix); NG_IGNOREABLE(ckt); int %(name);\n double %(name)=0.0/0.0;\n char* %(name);\n return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml0000644000265600020320000003420112264261473024440 0ustar andreasadmin #ifndef $(module) #define $(module) #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" #ifdef $(variable) #warning conflict: $(variable) is declared as a variable of module '$(module)'. #warning conflict: However in the API of ngspice '$(variable)' is also defined as a pragma. #warning conflict: Pragma '$(variable)' will be undefined. #warning conflict: You can solve the confict by renaming variable '$(variable)' in module '$(module)'. #undef $(variable) #endif #ifdef $(variable) #warning conflict: $(node) is declared as a node of module '$(module)'. #warning conflict: However in the API of ngspice '$(node)' is also defined as a pragma. #warning conflict: Pragma '$(node)' will be undefined. #warning conflict: You can solve the confict by renaming variable '$(node)' in module '$(module)'. #undef $(variable) #endif #ifdef NGSPICE_DEBUG_OK #define NGSPICE_DEBUG \\ { \\ if(getenv("ngspice_debug")) \\ $(module)debug(ckt,model,here); \\ else \\ { \\ printf(" To get more info run your simulation after setting shell variable ngspice_debug to 1\\n"); \\ printf(" For example in sh shell just type: export ngspice_debug=1\\n"); \\ } \\ } #else #define NGSPICE_DEBUG #endif #define EXIT_IF_ISNAN(var) \\ if(isnan((double) var)) \\ { \\ printf("%%s:%%i:bug:isnan:"#var"\\n",__FILE__,__LINE__); \\ printf("Please send this message to laurent.lemaitre@freescale.com\\n"); \\ NGSPICE_DEBUG \\ exit(1); /*__asm__ __volatile__ ("int \$03");*/ \\ } \\ if(isinf((double) var)) \\ { \\ printf("%%s:%%i:bug:isinf:"#var"\\n",__FILE__,__LINE__); \\ printf("Please send this message to laurent.lemaitre@freescale.com\\n"); \\ NGSPICE_DEBUG \\ exit(1); /*__asm__ __volatile__ ("int \$03");*/ \\ } /* ngspice \$simparam variables gdev (1/Ohms): Additional conductance to be added to nonlinear branches for conductance homotopy convergence algorithm. gmin (1/Ohms): Minimum conductance placed in parallel with nonlinear branches. imax (Amps) : Branch current threshold above which the constitutive relation of a nonlinear branch should be linearized. imelt (Amps) : Branch current threshold indicating device failure. iteration : Iteration number of the analog solver. scale : Scale factor for device instance geometry parameters. shrink : Optical linear shrink factor. simulatorSubversion : The simulator sub-version. simulatorVersion : The simulator version. sourceScaleFactor : Multiplicative factor for independent sources for source stepping homotopy convergence algorithm. tnom degrees (Celsius): Default value of temperature at which model parameters were extracted. */ #define _circuit_gdev ckt->CKTgmin #define _circuit_gmin ((ckt->CKTgmin)>(ckt->CKTdiagGmin))?(ckt->CKTgmin):(ckt->CKTdiagGmin) #define _circuit_imax 1.0 #define _circuit_imelt 1.0 #define _circuit_iteration 1.0 #define _circuit_scale 1.0 #define _circuit_shrink 1.0 #define _circuit_simulatorSubversion 0 #define _circuit_simulatorVersion 3.5 #define _circuit_sourceScaleFactor 1.0 #define _circuit_tnom ckt->CKTnomTemp #define _circuit_temp ckt->CKTtemp #define _scale 1.0 #define _cos(val,arg) val = cos(arg); #define _d_cos(val,dval,arg) val = cos(arg); dval = (-sin(arg)); #define _sin(val,arg) val = sin(arg); #define _d_sin(val,dval,arg) val = sin(arg); dval = (cos(arg)); #define _tan(val,arg) val = tan(arg); #define _d_tan(val,dval,arg) val = tan(arg); dval = (1.0/cos(arg)/cos(arg)); #define _hypot(xy,x,y) xy = sqrt((x)*(x)+(y)*(y)); #define _dx_hypot(dx,xy,x,y) dx = (x)/(xy); #define _dy_hypot(dy,xy,x,y) dy = (y)/(xy); #define _max(xy,x,y) xy = ((x)>(y))?(x):(y); #define _dx_max(dx,xy,x,y) dx = ((x)>(y))?1.0:0.0; #define _dy_max(dy,xy,x,y) dy = ((x)>(y))?0.0:1.0; #define _min(xy,x,y) xy = ((x)<(y))?(x):(y); #define _dx_min(dx,xy,x,y) dx = ((x)<(y))?1.0:0.0; #define _dy_min(dy,xy,x,y) dy = ((x)<(y))?0.0:1.0; #define _cosh(val,arg) val = cosh(arg); #define _d_cosh(val,dval,arg) val = cosh(arg); dval = (sinh(arg)); #define _sinh(val,arg) val = sinh(arg); #define _d_sinh(val,dval,arg) val = sinh(arg); dval = (cosh(arg)); #define _tanh(val,arg) val = tanh(arg); #define _d_tanh(val,dval,arg) val = tanh(arg); dval = (1.0/cosh(arg)/cosh(arg)); #define _acos(val,arg) val = acos(arg); #define _d_acos(val,dval,arg) val = acos(arg); dval = (-1.0/sqrt(1-arg*arg)); #define _asin(val,arg) val = asin(arg); #define _d_asin(val,dval,arg) val = asin(arg); dval = (+1.0/sqrt(1-arg*arg)); #define _atan(val,arg) val = atan(arg); #define _d_atan(val,dval,arg) val = atan(arg); dval = (+1.0/(1+arg*arg)); #define _logE(val,arg) val = log(arg); #define _d_logE(val,dval,arg) val = log(arg); dval = (1.0/arg); #define _log10(val,arg) val = log10(arg); #define _d_log10(val,dval,arg) val = log10(arg); dval = (1.0/arg/log(10)); #define _exp(val,arg) val = exp(arg); #define _d_exp(val,dval,arg) val = exp(arg); dval = val; #define _sqrt(val,arg) val = sqrt(arg); #define _d_sqrt(val,dval,arg) val = sqrt(arg); dval = (1.0/val/2.0); #define _pow(xy,x,y) xy = pow(x,y); #define _dx_pow(dx,xy,x,y) dx = (x==0.0)?0.0:((y/x)*xy); #define _dy_pow(dy,xy,x,y) dy = (x==0.0)?0.0:((log(x)/exp(0.0))*xy); #define _div1(x,y) ((x)/(y)) #define _div0(xy,x,y) xy=(x)/(y); #define _div(xy,dx,x,y) dx=1/(y); xy=(x)*dx; #define _dx_div(dx,xy,x,y) #define _dy_div(dy,dx,xy,x,y) dy = -xy*dx; #define _limexp(val,arg) val = ((arg)<(90)) ? (exp(arg)) : (exp(90)*(1.0+(arg-90))); #define _d_limexp(val,dval,arg) val = ((arg)<(90)) ? (exp(arg)) : (exp(90)*(1.0+(arg-90))); dval = val; #define _fabs(val,arg) val = fabs(arg); #define _d_fabs(val,dval,arg) val = fabs(arg); dval = (((val)>=0)?(+1.0):(-1.0)); #define _abs(val) ((val)<(0) ? (-(val)):(val)) /* declarations for $(module) MOSFETs */ /* information needed for each instance */ typedef struct s$(module)instance { struct s$(module)model *$(module)modPtr; /* pointer to model */ struct s$(module)instance *$(module)nextInstance; /* pointer to next instance of current model*/ IFuid $(module)name; /* pointer to character string naming this instance */ int $(module)state; /* index into state table for this device */ /* node */ /* instance parameters */ // noise\n /* variables */ /* states */ /* pointer to sparse matrix (+ values)*/ #define $(module)numStates 0 } $(module)instance ; /* per model data */ typedef struct s$(module)model { /* model structure */ int $(module)modType; /* type index of this device type */ struct s$(module)model *$(module)nextModel; /* pointer to next possible model in linked list */ $(module)instance * $(module)instances; /* pointer to list of instances that have this model */ IFuid $(module)modName; /* pointer to the name of this model */ /* model parameters */ /* variable */ } $(module)model; #include "$(module)ext.h" #include "analogfunction.h" #endif /*$(module)*/ ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEpar.c.xml0000644000265600020320000000635612264261473024306 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)par(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { $(module)instance *myinstance = ($(module)instance*)inst; NG_IGNOREABLE(value); NG_IGNOREABLE(select); NG_IGNOREABLE(myinstance); switch (param) { default: return(-1); } return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml0000644000265600020320000001031012264261473024456 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; NG_IGNOREABLE(ckt); for ( ; model != NULL; model = model->$(module)nextModel ) { /* loop through all the instances of the model */ for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) { } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEacld.c.xml0000644000265600020320000000732412264261473024423 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)acLoad(GENmodel *inModel, CKTcircuit *ckt) { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; for ( ; model != NULL; model = model->$(module)nextModel ) { /* loop through all the instances of the model */ for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) { } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULE.hxx.xml0000644000265600020320000036413112264261473024166 0ustar andreasadmin /* arithmetics */ #define EXP90 1.220403294317841e+039 #define m00_hypot(v00,x,y) v00 = sqrt((x)*(x)+(y)*(y)); #define m10_hypot(v10,v00,x,y) v10 = (x)/(v00); #define m11_hypot(v11,v00,x,y) v11 = (y)/(v00); #define m00_max(v00,x,y) v00 = ((x)>(y))?(x):(y); #define m10_max(v10,v00,x,y) v10 = ((x)>(y))?1.0:0.0; #define m11_max(v11,v00,x,y) v11 = ((x)>(y))?0.0:1.0; #define m00_min(v00,x,y) v00 = ((x)<(y))?(x):(y); #define m10_min(v10,v00,x,y) v10 = ((x)<(y))?1.0:0.0; #define m11_min(v11,v00,x,y) v11 = ((x)<(y))?0.0:1.0; #define m00_pow(v00,x,y) v00 = pow(x,y); #define m10_pow(v10,v00,x,y) v10 = (x==0.0)?0.0:(v00)*(y)/(x); #define m11_pow(v11,v00,x,y) v11 = (x==0.0)?0.0:(log(x)*(v00)); #define m00_div(v00,v10,x,y) double v10=1/(y); double v00=(x)*v10; #define m10_div(v10,v00,vv,x,y) #define m11_div(v11,v00,vv,x,y) double v11 = -v00*vv; #define m00_mult(v00,v10,v11,x,y) double v10=(x); double v11=(y); double v00=v10*v11; #define m00_add(v00,x,y) double v00=(x)+(y); #define m00_cos(v00,x) v00 = cos(x); #define m10_cos(v10,v00,x) v10 = (-sin(x)); #define m00_sin(v00,x) v00 = sin(x); #define m10_sin(v10,v00,x) v10 = (cos(x)); #define m00_tan(v00,x) v00 = tan(x); #define m10_tan(v10,v00,x) v10 = (1.0/cos(x)/cos(x)); #define m00_cosh(v00,x) v00 = cosh(x); #define m10_cosh(v10,v00,x) v10 = (sinh(x)); #define m00_sinh(v00,x) v00 = sinh(x); #define m10_sinh(v10,v00,x) v10 = (cosh(x)); #define m00_tanh(v00,x) v00 = tanh(x); #define m10_tanh(v10,v00,x) v10 = (1.0/cosh(x)/cosh(x)); #define m00_acos(v00,x) v00 = acos(x); #define m10_acos(v10,v00,x) v10 = (-1.0/sqrt(1-x*x)); #define m00_asin(v00,x) v00 = asin(x); #define m10_asin(v10,v00,x) v10 = (+1.0/sqrt(1-x*x)); #define m00_atan(v00,x) v00 = atan(x); #define m10_atan(v10,v00,x) v10 = (+1.0/(1+x*x)); #define m00_logE(v00,x) v00 = log(x); #define m10_logE(v10,v00,x) v10 = (1.0/x); #define m00_log10(v00,x) v00 = log10(x); #define m10_log10(v10,v00,x) v10 = (1.0/x/log(10)); #define m00_sqrt(v00,x) v00 = sqrt(x); #define m10_sqrt(v10,v00,x) v10 = (0.5/v00); #define m00_fabs(v00,x) v00 = fabs(x); #define m10_fabs(v10,v00,x) v10 = (((x)>=0)?(+1.0):(-1.0)); #define m00_exp(v00,x) v00 = exp(x); #define m10_exp(v10,v00,x) v10 = v00; #define m00_abs(v00) ((v00)<(0)?(-(v00)):(v00)) #define m00_limexp(v00,x) v00 = ((x)<90.0?exp(x):EXP90*(x-89.0)); #define m10_limexp(v10,v00,x) v10 = ((x)<90.0?(v00):EXP90); #define m20_logE(v00) (-1.0/v00/v00) #define m20_exp(v00) exp(v00) #define m20_limexp(v00) ((v00)<90.0?exp(v00):0.0) #define m20_sqrt(v00) (-0.25/(v00)/sqrt(v00)) #define m20_fabs(v00) 0.0 /*wrapper*/ #define pModel model #define pInst here #define mint_get_circuit_tempK() _circuit_temp #define voltages(n) NP(n) #define _DDT(q) q #define _DDX #define _DERIVATEFORDDX #define _DERIVATE2 inline double _cos(double arg) { return cos(arg); } inline double _d0_cos(double arg) { return (-sin(arg)); } inline double _sin(double arg) { return sin(arg); } inline double _d0_sin(double arg) { return (cos(arg)); } inline double _tan(double arg) { return tan(arg); } inline double _d0_tan(double arg) { return (1.0/cos(arg)/cos(arg)); } inline double _cosh(double arg) { return cosh(arg); } inline double _d0_cosh(double arg) { return (sinh(arg)); } inline double _sinh(double arg) { return sinh(arg); } inline double _d0_sinh(double arg) { return (cosh(arg)); } inline double _tanh(double arg) { return tanh(arg); } inline double _d0_tanh(double arg) { return (1.0/cosh(arg)/cosh(arg)); } inline double _acos(double arg) { return acos(arg); } inline double _d0_acos(double arg) { return (-1.0/sqrt(1-arg*arg)); } inline double _asin(double arg) { return asin(arg); } inline double _d0_asin(double arg) { return (+1.0/sqrt(1-arg*arg)); } inline double _atan(double arg) { return atan(arg); } inline double _d0_atan(double arg) { return (+1.0/(1+arg*arg)); } inline double _logE(double arg) { return log(arg); } inline double _d0_logE(double arg) { return (1.0/arg); } inline double _log10(double arg) { return log10(arg); } inline double _d0_log10(double arg) { return (1.0/arg/log(10)); } inline double _exp(double arg) { return exp(arg); } inline double _d0_exp(double arg) { return exp(arg); } inline double _sqrt(double arg) { return sqrt(arg); } inline double _d0_sqrt(double arg) { return (1.0/sqrt(arg)/2.0); } inline double _abs(double arg) { return fabs(arg); } inline double _d0_abs(double arg) { return (((arg)>=0)?(+1.0):(-1.0)); } inline double _hypot(double x,double y) { return sqrt((x)*(x)+(y)*(y)); } inline double _d0_hypot(double x,double y) { return (x)/sqrt((x)*(x)+(y)*(y)); } inline double _d1_hypot(double x,double y) { return (y)/sqrt((x)*(x)+(y)*(y)); } inline double _max(double x,double y) { return ((x)>(y))?(x):(y); } inline double _d0_max(double x,double y) { return ((x)>(y))?1.0:0.0; } inline double _d1_max(double x,double y) { return ((x)>(y))?0.0:1.0; } inline double _min(double x,double y) { return ((x)<(y))?(x):(y); } inline double _d0_min(double x,double y) { return ((x)<(y))?1.0:0.0; } inline double _d1_min(double x,double y) { return ((x)<(y))?0.0:1.0; } inline double _pow(double x,double y) { return pow(x,y); } inline double _d0_pow(double x,double y) { return (x==0.0)?0.0:((y/x)*pow(x,y)); } inline double _d1_pow(double x,double y) { return (x==0.0)?0.0:((log(x)/exp(0.0))*pow(x,y)); } #define _limexp(arg) _exp(val,arg) #define _d_limexp(arg) _d_exp(val,dval,arg) int double char* fabs shrinkl shrinka log10 logE limexp limexp %(name) $e printf( _warning( _error( _finish( _stop( %(e(tree)) "\\n" ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml0000644000265600020320000001072412264261473024461 0ustar andreasadmin #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "$(module)itf.h" #include "$(module)ext.h" #include "$(module)init.h" SPICEdev $(module)info = { { "$module", "$module created by adms", &$(module)nSize, &$(module)nSize, $(module)names, &$(module)pTSize, $(module)pTable, &$(module)mPTSize, $(module)mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, $(module)par, /* DEVparam */ $(module)mParam, /* DEVmodParam */ $(module)load, /* DEVload */ $(module)setup, /* DEVsetup */ NULL, /* DEVunsetup */ $(module)setup, /* DEVpzSetup */ $(module)temp, /* DEVtemperature */ $(module)trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ $(module)acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ $(module)destroy, /* DEVdestroy */ $(module)mDelete, /* DEVmodDelete */ $(module)delete, /* DEVdelete */ NULL, /* DEVsetic */ $(module)ask, /* DEVask */ $(module)mAsk, /* DEVmodAsk */ $(module)pzLoad, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &$(module)iSize, /* DEVinstSize */ &$(module)mSize /* DEVmodSize */ }; SPICEdev * get_$(module)_info(void) { return &$(module)info; } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEext.h.xml0000644000265600020320000000624512264261473024326 0ustar andreasadmin #ifndef __$(module)EXT_H #define __$(module)EXT_H #include "$(module)defs.h" extern int $(module)par(int,IFvalue*,GENinstance*,IFvalue*); extern int $(module)mParam(int,IFvalue*,GENmodel*); extern int $(module)load(GENmodel*,CKTcircuit*); extern int $(module)setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int $(module)guesstopology(SMPmatrix *, CKTcircuit *, $(module)model *, $(module)instance *); extern int $(module)temp(GENmodel*,CKTcircuit*); extern int $(module)ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int $(module)mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int $(module)acLoad(GENmodel *,CKTcircuit*); extern int $(module)convTest(GENmodel *,CKTcircuit*); extern int $(module)delete(GENmodel*,IFuid,GENinstance**); extern int $(module)getic(GENmodel*,CKTcircuit*); extern int $(module)mDelete(GENmodel**,IFuid,GENmodel*); extern int $(module)noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int $(module)pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int $(module)trunc(GENmodel*,CKTcircuit*,double*); extern int $(module)unsetup(GENmodel*,CKTcircuit*); extern void $(module)destroy(GENmodel**); #endif ngspice-26/src/spicelib/devices/adms/admst/ngspiceVersion.xml0000644000265600020320000027050512264261473024021 0ustar andreasadmin #if defined(_DYNAMIC)\n int %s;\n double %s=0.0/0.0;\n char* %s;\n #endif /*_DYNAMIC*/\n int %(name);\n double %(name);\n char* %(name);\n %s ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml0000644000265600020320000000575412264261473024642 0ustar andreasadmin #include "ngspice/ngspice.h" #include "$(module)defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" extern void NevalSrc(); extern double Nintegrate(); static char* $(module)nNames []= { }; int $(module)noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { $(module)model *firstModel = ($(module)model *) genmodel; $(module)model *model; $(module)instance *inst; for (model=firstModel; model != NULL; model=model->$(module)nextModel) { for (inst=model->$(module)instances; inst != NULL; inst=inst->$(module)nextInstance) { switch (operation) { case N_OPEN: break; case N_CALC: switch (mode) { case N_DENS: break; case INT_NOIZ: break; } break; case N_CLOSE: return (OK); break; } } } return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEdest.c.xml0000644000265600020320000000576612264261473024467 0ustar andreasadmin #include "ngspice/ngspice.h" #include "$(module)defs.h" #include "ngspice/suffix.h" void $(module)destroy(GENmodel **inModel) { register $(module)model **model = ($(module)model**)inModel; register $(module)instance *here; $(module)instance *prev = NULL; $(module)model *mod = *model; $(module)model *oldmod = NULL; for ( ; mod ; mod = mod->$(module)nextModel ) { if (oldmod) FREE(oldmod); oldmod = mod; prev = ($(module)instance *)NULL; for (here = mod->$(module)instances; here ; here = here->$(module)nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml0000644000265600020320000000635712264261473024472 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "$(module)defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" #define _STATIC #define _DYNAMIC int $(module)temp(GENmodel *inModel, CKTcircuit *ckt) { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; NG_IGNOREABLE(ckt); for ( ; model != NULL; model = model->$(module)nextModel ) { /* loop through all the instances of the model */ for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) { } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml0000644000265600020320000003125312264261473024435 0ustar andreasadmin #define NGSPICE_DEBUG_OK #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "$(module)defs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" /*fixme: noise not implemented in ngspice*/ #define ngspice_flickernoise(p,n,mag,freq,info)\\ {\\ } #define ngspice_whitenoise(p,n,mag,info)\\ {\\ } #define NP(p) *(ckt->CKTrhsOld+here->p ## Node) #define BP(p,n) (NP(p)-NP(n)) #define DBGNODE(p) printf(#p "=%i - v=%e\\n",here->p ## Node,NP(p)); #define _STATIC #define _DYNAMIC #define _DERIVATE #define _load_static_residual2(p,n,v)\\ *(ckt->CKTrhs+here->p ## Node)-=v;\\ *(ckt->CKTrhs+here->n ## Node)+=v; #define _load_static_residual1(p,v)\\ *(ckt->CKTrhs+here->p ## Node)-=v; #define _load_static_jacobian4(Sp,Sn,Pp,Pn,v)\\ _load_static_residual2(Sp,Sn,-v*BP(Pp,Pn))\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\ *(here->PTR_J_ ## Sn ## _ ## Pn)+=v;\\ *(here->PTR_J_ ## Sp ## _ ## Pn)-=v;\\ *(here->PTR_J_ ## Sn ## _ ## Pp)-=v;\\ (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JSVAL_ ## Sn ## _ ## Pn)+=v;\\ (here->JSVAL_ ## Sp ## _ ## Pn)-=v;\\ (here->JSVAL_ ## Sn ## _ ## Pp)-=v; #define _load_static_jacobian2s(Sp,Sn,Pp,v)\\ _load_static_residual2(Sp,Sn,-v*NP(Pp))\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\ *(here->PTR_J_ ## Sn ## _ ## Pp)-=v;\\ (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JSVAL_ ## Sn ## _ ## Pp)-=v; #define _load_static_jacobian2p(Sp,Pp,Pn,v)\\ _load_static_residual1(Sp,-v*BP(Pp,Pn))\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\ *(here->PTR_J_ ## Sp ## _ ## Pn)-=v;\\ (here->JSVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JSVAL_ ## Sp ## _ ## Pn)-=v; #define _load_static_jacobian1(Sp,Pp,v)\\ _load_static_residual1(Sp,-v*NP(Pp))\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=v;\\ (here->JSVAL_ ## Sp ## _ ## Pp)+=v; #define _load_dynamic_residual2(p,n,v)\\ if(ChargeComputationNeeded)\\ {\\ int error;\\ double unused;\\ *(ckt->CKTstate0+here->state_##p##_##n)=v;\\ if(ckt->CKTmode & MODEINITTRAN)\\ *(ckt->CKTstate1+here->state_##p##_##n)=*(ckt->CKTstate0+here->state_##p##_##n);\\ error = NIintegrate(ckt,&unused,&unused,0.0,here->state_##p##_##n);\\ if(error) return(error);\\ if(ckt->CKTmode & MODEINITTRAN)\\ *(ckt->CKTstate1+here->state_##p##_##n+1) = *(ckt->CKTstate0+here->state_##p##_##n+1);\\ *(ckt->CKTrhs+here->p##Node)-=*(ckt->CKTstate0+here->state_##p##_##n+1);\\ *(ckt->CKTrhs+here->n##Node)+=*(ckt->CKTstate0+here->state_##p##_##n+1);\\ } #define _load_dynamic_residual1(p,v)\\ if(ChargeComputationNeeded)\\ {\\ int error;\\ double unused;\\ *(ckt->CKTstate0+here->state_##p##_GND)=v;\\ if(ckt->CKTmode & MODEINITTRAN)\\ *(ckt->CKTstate1+here->state_##p##_GND)=*(ckt->CKTstate0+here->state_##p##_GND);\\ error = NIintegrate(ckt,&unused,&unused,0.0,here->state_##p##_GND);\\ if(error) return(error);\\ if(ckt->CKTmode & MODEINITTRAN)\\ *(ckt->CKTstate1+here->state_##p##_GND+1) = *(ckt->CKTstate0+here->state_##p##_GND+1);\\ *(ckt->CKTrhs+here->p##Node)-=*(ckt->CKTstate0+here->state_##p##_GND+1);\\ } #define _load_dynamic_jacobian4(Sp,Sn,Pp,Pn,v)\\ if(ChargeComputationNeeded)\\ {\\ double geq=(v)*ckt->CKTag[0];\\ double ceq=geq*BP(Pp,Pn);\\ *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\ *(ckt->CKTrhs+here->Sn##Node)-=ceq;\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\ *(here->PTR_J_ ## Sn ## _ ## Pn)+=geq;\\ *(here->PTR_J_ ## Sp ## _ ## Pn)-=geq;\\ *(here->PTR_J_ ## Sn ## _ ## Pp)-=geq;\\ }\\ (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JDVAL_ ## Sn ## _ ## Pn)+=v;\\ (here->JDVAL_ ## Sp ## _ ## Pn)-=v;\\ (here->JDVAL_ ## Sn ## _ ## Pp)-=v; #define _load_dynamic_jacobian2s(Sp,Sn,Pp,v)\\ if(ChargeComputationNeeded)\\ {\\ double geq=(v)*ckt->CKTag[0];\\ double ceq=geq*NP(Pp);\\ *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\ *(ckt->CKTrhs+here->Sn##Node)-=ceq;\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\ *(here->PTR_J_ ## Sn ## _ ## Pp)-=geq;\\ }\\ (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JDVAL_ ## Sn ## _ ## Pp)-=v; #define _load_dynamic_jacobian2p(Sp,Pp,Pn,v)\\ if(ChargeComputationNeeded)\\ {\\ double geq=(v)*ckt->CKTag[0];\\ double ceq=geq*BP(Pp,Pn);\\ *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\ *(here->PTR_J_ ## Sp ## _ ## Pn)-=geq;\\ }\\ (here->JDVAL_ ## Sp ## _ ## Pp)+=v;\\ (here->JDVAL_ ## Sp ## _ ## Pn)-=v; #define _load_dynamic_jacobian1(Sp,Pp,v)\\ if(ChargeComputationNeeded)\\ {\\ double geq=(v)*ckt->CKTag[0];\\ double ceq=geq*NP(Pp);\\ *(ckt->CKTrhs+here->Sp##Node)+=ceq;\\ *(here->PTR_J_ ## Sp ## _ ## Pp)+=geq;\\ }\\ (here->JDVAL_ ## Sp ## _ ## Pp)+=v; int $(module)load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; int ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; for ( ; model != NULL; model = model->$(module)nextModel ) { /* loop through all the instances of the model */ for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) { { } { #include "$module.hxx" } } /* End of Instance */ } /* End of Model */ return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEitf.h.xml0000644000265600020320000000400512264261473024300 0ustar andreasadmin #ifndef DEV_$(module) #define DEV_$(module) extern SPICEdev *get_$(module)_info(void); #endif ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEmask.c.xml0000644000265600020320000000621512264261473024451 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { $(module)model *model = ($(module)model *)inst; NG_IGNOREABLE(ckt); switch (which) { default: return(-1); } return(-1); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEmpar.c.xml0000644000265600020320000000615512264261473024460 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)mParam(int param, IFvalue *value, GENmodel *inMod) { $(module)model *mod = ($(module)model*)inMod; switch (param) { default: return(-1); } return(OK); } ngspice-26/src/spicelib/devices/adms/admst/COPYING0000644000265600020320000005666612264261473021346 0ustar andreasadminGNU Lesser General Public License Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS /* ngspice-26/src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml0000644000265600020320000001246312264261473024502 0ustar andreasadmin ## Process this file with automake to produce Makefile.in ADMSXMLINTERFACE=\$(srcdir)/../admst noinst_LTLIBRARIES = lib$(module).la BUILT_SOURCES = \\ $(module).c \\ $(module).hxx \\ $(module)acld.c \\ $(module)ask.c \\ $(module)defs.h \\ $(module)del.c \\ $(module)dest.c \\ $(module)ext.h \\ $(module)guesstopology.c \\ $(module)init.c \\ $(module)init.h \\ $(module)itf.h \\ $(module)load.c \\ $(module)mask.c \\ $(module)mdel.c \\ $(module)mpar.c \\ $(module)par.c \\ $(module)pzld.c \\ $(module)setup.c \\ $(module)temp.c \\ $(module)trunc.c lib$(module)_la_SOURCES = \\ \$(BUILT_SOURCES) CLEANFILES = \\ \$(BUILT_SOURCES) \\ $(module)noise.c \\ .$(module).va.adms \\ .adms.implicit.xml \\ .interface.xml \\ *.h \\ *.xml #TODO (not implemented) \\ $(module)conv.c \\ $(module)getic.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I\$(top_srcdir)/src/include AM_CFLAGS = \$(STATIC) MAINTAINERCLEANFILES = Makefile.in \\ Makefile.am DISTCLEANFILES = Makefile.am \\ Makefile.in \%.c \%.hxx \\ \%acld.c \%ask.c \%defs.h \%del.c \%dest.c \%ext.h \%guesstopology.c \\ \%init.c \%init.h \%itf.h \%load.c \%mask.c \%mdel.c \%mpar.c \%par.c \\ \%pzld.c \%setup.c \%temp.c \%trunc.c \\ : \$(srcdir)/admsva/\%.va \\ \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\ \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml admsXml -I\$(srcdir) -I\$(srcdir)/admsva \$< \\ -e \$(ADMSXMLINTERFACE)/ngspiceVersion.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEitf.h.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEinit.h.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEext.h.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdefs.h.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEask.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmask.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpar.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmpar.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEload.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEacld.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEpzld.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtemp.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEtrunc.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEsetup.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdel.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEmdel.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEdest.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEnoise.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULEguesstopology.c.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.hxx.xml \\ -e \$(ADMSXMLINTERFACE)/ngspiceMODULE.c.xml ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEmdel.c.xml0000644000265600020320000000636012264261473024440 0ustar andreasadmin #include "ngspice/ngspice.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { register $(module)model **model = ($(module)model**)inModel; register $(module)model *modfast =($(module)model*)kill; $(module)instance *here; $(module)instance *prev = NULL; $(module)model **oldmod; oldmod = model; for ( ; *model ; model = &((*model)->$(module)nextModel)) { if ((*model)->$(module)modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->$(module)nextModel; /* cut deleted device out of list */ for (here = (*model)->$(module)instances; here; here = here->$(module)nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/adms/admst/ngspiceMODULEtrunc.c.xml0000644000265600020320000000677112264261473024660 0ustar andreasadmin #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "$(module)defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int $(module)trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register $(module)model *model = ($(module)model*)inModel; register $(module)instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for ( ; model != NULL; model = model->$(module)nextModel ) { /* loop through all the instances of the model */ for (here = model->$(module)instances; here != NULL ; here = here->$(module)nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->state_%s_%s, ckt, timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %%s reduces step from %%g to %%g\\n", here->$(module)name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } /* End of Instance */ } /* End of Model */ return(OK); } ngspice-26/src/spicelib/devices/adms/hicum0/0000755000265600020320000000000012264261473020345 5ustar andreasadminngspice-26/src/spicelib/devices/adms/hicum0/admsva/0000755000265600020320000000000012264261473021620 5ustar andreasadminngspice-26/src/spicelib/devices/adms/hicum0/admsva/hicum0.va0000644000265600020320000010116312264261473023337 0ustar andreasadmin// HICUM Level_0 Version_1.12: A Verilog-A description // (A simplified version of HICUM Level2 model for BJT) // ## It is modified after the first version of HICUM/L0 code ## // 12/08: Modifications for ngspice and adms2.2.7 DW // Changed VT0 in Vt0 to prevent conflict in compiled C version. // Made a temporary variable cjei_i for cjei output purpose only. // Minor code related changes // 03/08: Quick Fix: Default value of TFH has been changed from infinity to zero and modified the default value limits to [0, inf) to include zero // 12/06: Upper limit of FGEO is changed to infinity // 06/06: Thermal node "tnode" set as external // Flag FLSH introduced for controlling Self-heating calculation // all if-else blocks marked with begin-end // all series resistors and RTH are allowed to have a minimum value MIN_R // 07/06: QCJMOD deleted, QJMODF introduced along with with HICJQ // ddx() operator used with QJMOD and QJMODF wherever needed // aj is kept at 2.4 except BE depletion charge // Substrate transistor transfer current added. // Gmin added to (bi,ei) and (bi,ci) branches. // hyperbolic smoothing used in rbi computation to avoid devide-by-zero. // ********************************************************************************* // 06/06: Comment on NODE COLLAPSING: // Presently this verilog code permits a minimum of 1 milli-Ohm resistance for any // series resistance as well as for thermal resistance RTH. If any of the resistance // values drops below this minimum value, the corresponding nodes are shorted with // zero voltage contribution. We want the model compilers/simulators deal this // situation in such a manner that the corresponding node is COLLAPSED. // We expect that the simulators should permit current contribution statement // for any branch with resistance value more than (or equal to) 1 milli-Ohm without // any convergence problem. In fact, we wish NOT to have to use a voltage contribution // statement in our Verilog code, except as an indication for the model compiler/simulator // to interprete a zero branch voltage as NODE-COLLAPSING action. // ********************************************************************************** //Default simulator: Spectre `ifdef insideADMS `define P(p) (*p*) `define PGIVEN(p) $given(p) `define INITIAL_MODEL @(initial_model) `else `define P(p) `define PGIVEN(p) p `define INITIAL_MODEL @(initial_step) `endif //ADS //`include "constants.vams" //`include "disciplines.vams" //`include "compact.vams" //Spectre `include "constants.h" `include "discipline.h" `define NPN +1 `define PNP -1 `define VPT_thresh 1.0e2 `define EXPLIM 80.0 `define INF 1.0e6 `define TMAX 326.85 `define TMIN -100.0 `define MIN_R 0.001 //`define Gmin 1.0e-12 `define QCMODF(vj,cj0,vd,z,aj,cjf)\ if(cj0 > 0.0) begin\ vf = vd*(1.0-exp(-ln(aj)/z));\ xvf = (vf-vj)/VT;\ xvf2 = sqrt(xvf*xvf+1.921812);\ v_j = vf-VT*(xvf+xvf2)*0.5;\ dvj = 0.5*(xvf+xvf2)/xvf2;\ cjf = cj0*exp(-z*ln(1-v_j/vd))*dvj+aj*cj0*(1-dvj);\ end else begin\ cjf = 0.0;\ end // DEPLETION CHARGE CALCULATION // Hyperbolic smoothing used; no punch-through `define QJMODF(vj,cj0,vd,z,aj,qjf)\ if(cj0 > 0.0) begin\ vf = vd*(1.0-exp(-ln(aj)/z));\ xvf = (vf-vj)/VT;\ xvf2 = sqrt(xvf*xvf+1.921812);\ v_j = vf-VT*(xvf+xvf2)*0.5;\ x = 1.0-z;\ y = 1.0-exp(x*ln(1.0-v_j/vd));\ qjf = cj0*vd*y/x+aj*cj0*(vj-v_j);\ end else begin\ qjf = 0.0;\ end // Depletion Charge : with punch through `define QJMOD(vj,cj0,vd,z,vpt,aj,qjf)\ if(cj0 > 0.0) begin\ zr = z/4.0;\ vp = vpt-vd;\ vf = vd*(1.0-exp(-ln(aj)/z));\ cmax = aj*cj0;\ cr = cj0*exp((z-zr)*ln(vd/vpt));\ a = VT;\ ve = (vf-vj)/a;\ if (ve <= `EXPLIM) begin\ ex1 = exp(ve);\ ee1 = 1.0+ex1;\ vj1 = vf-a*ln(ee1);\ end else begin\ vj1 = vj;\ end\ a = 0.1*vp+4.0*VT;\ vr = (vp+vj1)/a;\ if (vr <= `EXPLIM) begin\ ex1 = exp(vr);\ ee1 = 1.0+ex1;\ vj2 = -vp+a*ln(ee1);\ end else begin\ vj2 = vj1;\ end\ vj4 = vj-vj1;\ ez = 1.0-z;\ ezr = 1.0-zr;\ vdj1 = ln(1.0-vj1/vd);\ vdj2 = ln(1.0-vj2/vd);\ qj1 = cj0*(1.0-exp(vdj2*ez))/ez;\ qj2 = cr*(1.0-exp(vdj1*ezr))/ezr;\ qj3 = cr*(1.0-exp(vdj2*ezr))/ezr;\ qjf = (qj1+qj2-qj3)*vd+cmax*vj4;\ end else begin\ qjf = 0.0;\ end // DEPLETION CHARGE CALCULATION SELECTOR: // Dependent on junction punch-through voltage // Important for collector related junctions `define HICJQ(vj,cj0,vd,z,vpt,qjf)\ if(vpt < `VPT_thresh) begin\ `QJMOD(vj,cj0,vd,z,vpt,2.4,qjf)\ end else begin\ `QJMODF(vj,cj0,vd,z,2.4,qjf)\ end //Temperature dependence of depletion capacitance parameters `define TMPHICJ(cj0,vd,z,vg,cj0_t,vd_t)\ arg = 0.5*vd/Vt0;\ vdj0 = 2*Vt0*ln(exp(arg)-exp(-arg));\ vdjt = vdj0*qtt0+vg*(1-qtt0)-mg*VT*ln_qtt0;\ vd_t = vdjt+2*VT*ln(0.5*(1+sqrt(1+4*exp(-vdjt/VT))));\ cj0_t = cj0*exp(z*ln(vd/vd_t)); //Limiting exponential `define LIN_EXP(le, arg)\ if(arg > 80) begin\ le = (1 + ((arg) - 80));\ arg = 80;\ end else begin\ le=1;\ end\ le = le*limexp(arg); // IDEAL DIODE (WITHOUT CAPACITANCE): // conductance not calculated // INPUT: // IS, IST : saturation currents (model parameter related) // UM1 : ideality factor // U : branch voltage // IMPLICIT INPUT: // VT : thermal voltage // OUTPUT: // Iz : diode current `define HICDIO(IS,IST,UM1,U,Iz)\ DIOY = U/(UM1*VT);\ if (IS > 0.0) begin\ if (DIOY > 80) begin\ le = (1 + ((DIOY) - 80));\ DIOY = 80;\ end else begin\ le = 1;\ end\ le = le*limexp(DIOY);\ Iz = IST*(le-1.0);\ if(DIOY <= -14.0) begin\ Iz = -IST;\ end\ end else begin\ Iz = 0.0;\ end module hic0_full (c,b,e,s,tnode); //Node definitions inout c,b,e,s,tnode; electrical c `P(info="external collector node"); electrical b `P(info="external base node"); electrical e `P(info="external emitter node"); electrical s `P(info="external substrate node"); electrical ci `P(info="internal collector node"); electrical bi `P(info="internal base node"); electrical ei `P(info="internal emitter node"); electrical tnode `P(info="local temperature rise node"); //Branch definitions branch (ci,c) br_cic_i; branch (ci,c) br_cic_v; branch (ei,e) br_eie_i; branch (ei,e) br_eie_v; branch (bi,ei) br_biei; branch (bi,ci) br_bici; branch (ci,ei) br_ciei; branch (b,bi) br_bbi_i; branch (b,bi) br_bbi_v; branch (b,e) br_be; branch (b,ci) br_bci; branch (b,s) br_bs; branch (s,ci) br_sci; branch (tnode ) br_sht; // // Parameter initialization with default values // Collector current parameter real is = 1.0e-16 from [0:1] `P(spice:name="is" info="(Modified) saturation current" m:factor="yes" unit="A"); parameter real mcf = 1.00 from (0:10] `P(spice:name="mcf" info="Non-ideality coefficient of forward collector current"); parameter real mcr = 1.00 from (0:10] `P(spice:name="mcr" info="Non-ideality coefficient of reverse collector current"); parameter real vef = `INF from (0:`INF] `P(spice:name="vef" info="forward Early voltage (normalization volt.)" unit="V" default:value="infinity"); parameter real iqf = `INF from (0:`INF] `P(spice:name="iqf" info="forward d.c. high-injection toll-off current" unit="A" m:factor="yes" default:value="infinity"); parameter real iqr = `INF from (0:`INF] `P(spice:name="iqr" info="inverse d.c. high-injection roll-off current" unit="A" m:factor="yes" default:value="infinity"); parameter real iqfh = `INF from (0:`INF] `P(spice:name="iqfh" info="high-injection correction current" unit="A" m:factor="yes"); parameter real tfh = 0.0 from [0:`INF) `P(spice:name="tfh" info="high-injection correction factor" test:value="2e-9" m:factor="yes"); // Base current parameter real ibes = 1e-18 from [0:1] `P(spice:name="ibes" info="BE saturation current" unit="A" m:factor="yes"); parameter real mbe = 1.0 from (0:10] `P(spice:name="mbe" info="BE non-ideality factor"); parameter real ires = 0.0 from [0:1] `P(spice:name="ires" info="BE recombination saturation current" test:value="1e-16" unit="A" m:factor="yes"); parameter real mre = 2.0 from (0:10] `P(spice:name="mre" info="BE recombination non-ideality factor"); parameter real ibcs = 0.0 from [0:1] `P(spice:name="ibcs" info="BC saturation current" test:value="1e-16" unit="A" m:factor="yes"); parameter real mbc = 1.0 from (0:10] `P(spice:name="mbc" info="BC non-ideality factor"); // BE depletion cap parameter real cje0 = 1.0e-20 from (0:`INF) `P(spice:name="cje0" info="Zero-bias BE depletion capacitance" unit="F" test:value="2e-14" m:factor="yes"); parameter real vde = 0.9 from (0:10] `P(spice:name="vde" info="BE built-in voltage" unit="V"); parameter real ze = 0.5 from (0:1] `P(spice:name="ze" info="BE exponent factor"); parameter real aje = 2.5 from [1:`INF) `P(spice:name="aje" info="Ratio of maximum to zero-bias value"); // Transit time parameter real t0 = 0.0 from [0:`INF) `P(spice:name="t0" info="low current transit time at Vbici=0" test:value="5e-12" unit="s"); parameter real dt0h = 0.0; // from [0:`INF) `P(spice:name="dt0h" info="Base width modulation contribution" test:value="2e-12" unit="s"); parameter real tbvl = 0.0 from [0:`INF) `P(spice:name="tbvl" info="SCR width modulation contribution" test:value="4e-12" unit="s"); parameter real tef0 = 0.0 from [0:`INF) `P(spice:name="tef0" info="Storage time in neutral emitter" test:value="1e-12" unit="s"); parameter real gte = 1.0 from (0:10] `P(spice:name="gte" info="Exponent factor for emmiter transit time"); parameter real thcs = 0.0 from [0:`INF) `P(spice:name="thcs" info="Saturation time at high current densities" test:value="3e-11" unit="s"); parameter real ahc = 0.1 from (0:10] `P(spice:name="ahc" info="Smoothing facor for current dependence"); parameter real tr = 0.0 from [0:`INF) `P(spice:name="tr" info="Storage time at inverse operation" unit="s"); // Critical current parameter real rci0 = 150 from (0:`INF) `P(spice:name="rci0" info="Low-field collector resistance under emitter" test:value="50" unit="Ohm" m:inverse_factor="yes"); parameter real vlim = 0.5 from (0:10] `P(spice:name="vlim" info="Voltage dividing ohmic and satur.region" unit="V"); parameter real vpt = 100 from (0:100] `P(spice:name="vpt" info="Punch-through voltage" test:value="10" unit="V" default="infinity"); parameter real vces = 0.1 from [0:1] `P(spice:name="vces" info="Saturation voltage" unit="V"); // BC depletion cap intern parameter real cjci0 = 1.0e-20 from (0:`INF) `P(spice:name="cjci0" info="Total zero-bias BC depletion capacitance" test:value="1e-15" unit="F" m:factor="yes"); parameter real vdci = 0.7 from (0:10] `P(spice:name="vdci" info="BC built-in voltage" test:value="0.7" unit="V"); parameter real zci = 0.333 from (0:1] `P(spice:name="zci" info="BC exponent factor" test:value="0.4"); parameter real vptci = 100 from (0:100] `P(spice:name="vptci" info="Punch-through voltage of BC junction" test:value="50" unit="V"); // BC depletion cap extern parameter real cjcx0 = 1.0e-20 from [0:`INF) `P(spice:name="cjcx0" info="Zero-bias external BC depletion capacitance" unit="F" test:value="1e-15" m:factor="yes"); parameter real vdcx = 0.7 from (0:10] `P(spice:name="vdcx" info="External BC built-in voltage" unit="V"); parameter real zcx = 0.333 from (0:1] `P(spice:name="zcx" info="External BC exponent factor"); parameter real vptcx = 100 from (0:100] `P(spice:name="vptcx" info="Punch-through voltage" unit="V" test:value="5.0" default="infinity"); parameter real fbc = 1.0 from [0:1] `P(spice:name="fbc" info="Split factor = Cjci0/Cjc0" test:value="0.5"); // Base resistance parameter real rbi0 = 0.0 from [0:`INF) `P(spice:name="rbi0" info="Internal base resistance at zero-bias" test:value="100" unit="Ohm" m:inverse_factor="yes"); parameter real vr0e = 2.5 from (0:`INF] `P(spice:name="vr0e" info="forward Early voltage (normalization volt.)" unit="V"); parameter real vr0c = `INF from (0:`INF] `P(spice:name="vr0c" info="forward Early voltage (normalization volt.)" unit="V" default="infinity" test:value="25.0"); parameter real fgeo = 0.656 from [0:`INF] `P(spice:name="fgeo" info="Geometry factor" test:value="0.73"); // Series resistances parameter real rbx = 0.0 from [0:`INF) `P(spice:name="rbx" info="External base series resistance" test:value="8.8" unit="Ohm" m:inverse_factor="yes"); parameter real rcx = 0.0 from [0:`INF) `P(spice:name="rcx" info="Emitter series resistance" test:value="12.5" unit="Ohm" m:inverse_factor="yes"); parameter real re = 0.0 from [0:`INF) `P(spice:name="re" info="External collector series resistance" test:value="9.16" unit="Ohm" m:inverse_factor="yes"); // Substrate transfer current, diode current and cap parameter real itss = 0.0 from [0:1.0] `P(spice:name="itss" info="Substrate transistor transfer saturation current" unit="A" test:value="1e-17" m:factor="yes"); parameter real msf = 1.0 from (0:10] `P(spice:name="msf" info="Substrate transistor transfer current non-ideality factor"); parameter real iscs = 0.0 from [0:1.0] `P(spice:name="iscs" info="SC saturation current" unit="A" test:value="1e-17" m:factor="yes"); parameter real msc = 1.0 from (0:10] `P(spice:name="msc" info="SC non-ideality factor"); parameter real cjs0 = 1.0e-20 from [0:`INF) `P(spice:name="cjs0" info="Zero-bias SC depletion capacitance" unit="F" test:value="1e-15" m:factor="yes"); parameter real vds = 0.3 from (0:10] `P(spice:name="vds" info="SC built-in voltage" unit="V"); parameter real zs = 0.3 from (0:1] `P(spice:name="zs" info="External SC exponent factor"); parameter real vpts = 100 from (0:100] `P(spice:name="vpts" info="SC punch-through voltage" unit="V" test:value="5.0" default="infinity"); // Parasitic caps parameter real cbcpar = 0.0 from [0:`INF) `P(spice:name="cbcpar" info="Collector-base isolation (overlap) capacitance" unit="F" m:factor="yes" test:value="1e-15"); parameter real cbepar = 0.0 from [0:`INF) `P(spice:name="cbepar" info="Emitter-base oxide capacitance" unit="F" m:factor="yes" test:value="2e-15"); // BC avalanche current parameter real eavl = 0.0 from [0:inf) `P(spice:name="eavl" info="Exponent factor" test:value="1e-14"); parameter real kavl = 0.0 from [0:`INF) `P(spice:name="kavl" info="Prefactor" test:value="1.19"); // Flicker noise parameter real kf = 0.0 from [0:`INF) `P(spice:name="kf" info="flicker noise coefficient" unit="M^(1-AF)"); parameter real af = 2.0 from (0:10] `P(spice:name="af" info="flicker noise exponent factor"); // Temperature dependance parameter real vgb = 1.2 from (0:10] `P(spice:name="vgb" info="Bandgap-voltage" unit="V" test:value="1.17"); parameter real vge = 1.17 from (0:10] `P(spice:name="vge" info="Effective emitter bandgap-voltage" unit="V" test:value="1.07"); parameter real vgc = 1.17 from (0:10] `P(spice:name="vgc" info="Effective collector bandgap-voltage" unit="V" test:value="1.14"); parameter real vgs = 1.17 from (0:10] `P(spice:name="vgs" info="Effective substrate bandgap-voltage" unit="V" test:value="1.17"); parameter real f1vg =-1.02377e-4 `P(spice:name="f1vg" info="Coefficient K1 in T-dependent bandgap equation" unit="V/K"); parameter real f2vg = 4.3215e-4 `P(spice:name="f2vg" info="Coefficient K2 in T-dependent bandgap equation" unit="V/K"); parameter real alt0 = 0.0 `P(spice:name="alt0" info="Frist-order TC of tf0" unit="1/K"); parameter real kt0 = 0.0 `P(spice:name="kt0" info="Second-order TC of tf0" unit="1/K^2"); parameter real zetact = 3.0 `P(spice:name="zetact" info="Exponent coefficient in transfer current temperature dependence" test:value="3.5"); parameter real zetabet = 3.5 `P(spice:name="zetabet" info="Exponent coefficient in BE junction current temperature dependence" test:value="4.0"); parameter real zetaci = 0.0 `P(spice:name="zetaci" info="TC of epi-collector diffusivity" test:value="1.6"); parameter real alvs = 0.0 `P(spice:name="alvs" info="Relative TC of satur.drift velocity" unit="1/K" test:value="1e-3"); parameter real alces = 0.0 `P(spice:name="alces" info="Relative TC of vces" unit="1/K" test:value="4e-4"); parameter real zetarbi = 0.0 `P(spice:name="zetarbi" info="TC of internal base resistance" test:value="0.6"); parameter real zetarbx = 0.0 `P(spice:name="zetarbx" info="TC of external base resistance" test:value="0.2"); parameter real zetarcx = 0.0 `P(spice:name="zetarcx" info="TC of external collector resistance" test:value="0.2"); parameter real zetare = 0.0 `P(spice:name="zetare" info="TC of emitter resistances"); parameter real alkav = 0.0 `P(spice:name="alkav" info="TC of avalanche prefactor" unit="1/K"); parameter real aleav = 0.0 `P(spice:name="aleav" info="TC of avalanche exponential factor" unit="1/K"); // Self-heating parameter integer flsh = 0 from [0:2] `P(spice:name="flsh" info="Flag for self-heating calculation" test:value="2"); parameter real rth = 0.0 from [0:`INF) `P(spice:name="rth" info="Thermal resistance" test:value="200.0" unit="K/W" m:inverse_factor="yes"); parameter real cth = 0.0 from [0:`INF) `P(spice:name="cth" info="Thermal capacitance" test:value="0.1" unit="Ws/K" m:factor="yes"); // Transistor type parameter integer npn = 1 from [0:1] `P(spice:isflag="yes" info="model type flag for npn" ); parameter integer pnp = 0 from [0:1] `P(info="model type flag for pnp" ); //Circuit simulator specific parameters parameter real tnom = 27 `P(spice:name="tnom" info="Temperature for which parameters are valid" unit="C"); parameter real dt = 0.0 `P(spice:name="dt" type="instance" info="Temperature change for particular transistor" unit="K"); // Declaration of the variables: begin real _circuit_gmin; real HICUMtype `P(spice:name="type" info="Device type from npn or pnp flags" unit="no" ask="yes"); // QCJMOD real cj0,vd,z,aj; real zr,vp; real cmax,cr,ve; real ee1,ez,ezr,vdj1,vdj2,ex1,vr,vj1,vj2,vj4; real qj1,qj2,qj3,qjf; //Cjfun *** VT, removed: BA real cj1,cj2,cj3,cjf; //cjtfun *** tnom,VT,mg,Vt0, removed: BA real vg; real vdj0,vdjt,cj0_t,vd_t,aj_t; // temperature and drift real VT,Tamb,Tdev,Tnom,dT,qtt0,ln_qtt0; real vde_t,vdci_t,vdcx_t,vds_t; real is_t,ires_t,ibes_t,ibcs_t; real itss_t,iscs_t,cje0_t,cjci0_t,cjcx0_t; real cjs0_t,rci0_t,vlim_t; real vces_t,thcs_t,tef0_t,rbi0_t; real rbx_t,rcx_t,re_t,t0_t,eavl_t,kavl_t; real aje_t; // bc charge and cap real qjci `P(ask="yes" info="B-C internal junction charge" unit="C"); real qjcx,qjcii,cjcii,qjcxi,qjciii; //cjcx real cjci0_t_ii,cjcx0_t_ii,cjcx0_t_i,v_j; // be junction real qjei `P(ask="yes" info="B-E internal junction charge" unit="C"); real cjei_i `P(ask="yes" info="B-E internal junction capacitance" unit="F"); // dw: adms2.2.7 problem real cjei,vf,vj,x,y,e1,e2; // transfer and internal base current real cc,qj_2,facl; real tf0,ickf,ickr,itfi,itri,qm; real qpt,itf,itr; real it `P(ask="yes" info="Transfer Current" unit="A"); real ibe,ire,ibi; real itfl,itrl,al,s3l,wl,d_qfh; // be diffusion charge real qf,qf0,dqfh,dqef; real dtef,dtfh,tf,ick; real vc,vceff,s3,w,a,tww; // bc diffusion charge real qr; // avalanche current source real v_bord,a_iavl,lncc; // base resistance real rb,eta,rbi,qje,Qz_nom,fQz; // substrate transistor, diode and cap real qjs,HSa,HSb,HSI_Tsu,HSUM; // self heating real pterm; // new for temperature dependence real mg,zetabci,zetasct,zetatef,avs; real k1,k2,vgbe,vgbc,vgsc,dvg; real xvf,xvf2,dvj,uvc,Vt0; // noise real flicker_Pwr,fourkt,twoq; // LIN_EXP real le,arg,le1,arg1,le2,arg2; //HICDIO real IS,IST,UM1,U,Iz,DIOY; // branch voltages real Vbci,Vbici,Vbiei,Vciei,Vsci,Veie,Vbbi,Vcic,Vbe,Vrth; //Output to be seen real ijbc `P(ask="yes" info="Base-collector diode current" unit="A"); real iavl `P(ask="yes" info="Avalanche current" unit="A"); real ijsc `P(ask="yes" info="Substrate-collector diode current" unit="A"); real Ieei `P(ask="yes" info="Current through external to internal emitter node" unit="A"); real Icci `P(ask="yes" info="Current through external to internal collector node" unit="A"); real Ibbi `P(ask="yes" info="Current through external to internal base node" unit="A"); real Ibici `P(ask="yes" info="Base-collector diode current minus the avalanche current" unit="A"); real ijbe `P(ask="yes" info="Base-emitter diode current" unit="A"); real Qbci,Qbe,Qbici,Qbiei; //Declaration of the variables: end // //======================== calculation of the transistor =================== // analog begin // assign voltages with regard to transistor type `INITIAL_MODEL begin if (`PGIVEN(npn)) HICUMtype = `NPN; else if (`PGIVEN(pnp)) HICUMtype = `PNP; else HICUMtype = `NPN; end Vbci = HICUMtype*V(br_bci); Vbici = HICUMtype*V(br_bici); Vbiei = HICUMtype*V(br_biei); Vciei = HICUMtype*V(br_ciei); Vsci = HICUMtype*V(br_sci); Veie = V(br_eie_v); Vcic = V(br_cic_v); Vbbi = V(br_bbi_v); Vbe = HICUMtype*V(br_be); Vrth = V(br_sht); // // temperature and resulting parameter drift // Tnom = tnom+273.15; Tamb = $temperature; Tdev = Tamb+dt+Vrth; // Limit temperature to avoid FPE's in equations if(Tdev < `TMIN + 273.15) begin Tdev = `TMIN + 273.15; end else begin if (Tdev > `TMAX + 273.15) begin Tdev = `TMAX + 273.15; end end Vt0 = `P_K*Tnom /`P_Q; VT = `P_K*Tdev /`P_Q; dT = Tdev-Tnom; qtt0 = Tdev/Tnom; ln_qtt0 = ln(qtt0); k1 = f1vg*Tnom; k2 = f2vg*Tnom+k1*ln(Tnom); avs = alvs*Tnom; vgbe = (vgb+vge)/2; vgbc = (vgb+vgc)/2; vgsc = (vgs+vgc)/2; mg = 3-`P_Q*f1vg/`P_K; zetabci = mg+1-zetaci; zetasct = mg-1.5; //+1-m_upS with m_upS=2.5 is_t = is*exp(zetact*ln_qtt0+vgb/VT*(qtt0-1)); ibes_t = ibes*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1)); ires_t = ires*exp(0.5*mg*ln_qtt0+0.5*vgbe/VT*(qtt0-1)); ibcs_t = ibcs*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1)); itss_t = itss*exp(zetasct*ln_qtt0+vgc/VT*(qtt0-1)); iscs_t = iscs*exp(zetasct*ln_qtt0+vgs/VT*(qtt0-1)); `TMPHICJ(cje0,vde,ze,vgbe,cje0_t,vde_t) aje_t = aje*vde_t/vde; `TMPHICJ(cjci0,vdci,zci,vgbc,cjci0_t,vdci_t) `TMPHICJ(cjcx0,vdcx,zcx,vgbc,cjcx0_t,vdcx_t) `TMPHICJ(cjs0,vds,zs,vgsc,cjs0_t,vds_t) rci0_t = rci0*exp(zetaci*ln_qtt0); vlim_t = vlim*exp((zetaci-avs)*ln_qtt0); vces_t = vces*(1+alces*dT); t0_t = t0*(1+alt0*dT+kt0*dT*dT); thcs_t = thcs*exp((zetaci-1)*ln_qtt0); zetatef = zetabet-zetact-0.5; dvg = vgb-vge; tef0_t = tef0*exp(zetatef*ln_qtt0-dvg/VT*(qtt0-1)); rbx_t = rbx*exp(zetarbx*ln_qtt0); rcx_t = rcx*exp(zetarcx*ln_qtt0); rbi0_t = rbi0*exp(zetarbi*ln_qtt0); re_t = re*exp(zetare*ln_qtt0); eavl_t = eavl*exp(aleav*dT); kavl_t = kavl*exp(alkav*dT); // // Calculation of intrinsic transistor elements // // BC charge and cap (internal and external) // The cjcx0 value is used to switch between one (cjcx0=0) and two bc parameter sets // 1. For one parameter set only the internal bc set is partitioned by fbc // 2. For two independent sets only the external set is partitioned by fbc if (cjcx0_t==0) begin cjci0_t_ii = cjci0_t*fbc; // zero bias internal portion qjcxi = 0; cjcx0_t_i = cjci0_t*(1-fbc); // zero bias external portion `HICJQ(Vbci,cjcx0_t_i,vdci_t,zci,vptci,qjcx) end else begin cjci0_t_ii = cjci0_t; // zero bias internal portion cjcx0_t_ii = cjcx0_t*fbc; `HICJQ(Vbici,cjcx0_t_ii,vdcx_t,zcx,vptcx,qjcxi) cjcx0_t_i = cjcx0_t*(1-fbc); // zero bias external portion `HICJQ(Vbci,cjcx0_t_i,vdcx_t,zcx,vptcx,qjcx) end `HICJQ(Vbici,cjci0_t_ii,vdci_t,zci,vptci,qjci) qjcii = qjci+qjcxi; //Internal bc cap without punch through for cc //`HICJQ(Vbici,cjci0_t_ii,vdci_t,zci,100,qjciii) `QCMODF(Vbici,cjci0_t_ii,vdci_t,zci,2.4,cjcii) //cjcii = ddx(qjciii,V(bi)); //Internal be cap and charge `QJMODF(Vbiei,cje0_t,vde_t,ze,aje_t,qjei) cjei = ddx(qjei,V(bi)); cjei_i = cjei; // dw: adms2.2.7 problem // Critical current: ick vc = Vciei-vces_t; uvc = vc/VT-1; vceff = VT*(1+0.5*(uvc+sqrt(uvc*uvc+1.921812))); x = (vceff-vlim_t)/vpt; ick = vceff*(1+0.5*(x+sqrt(x*x+1e-3)))/rci0_t/sqrt(1+vceff*vceff/vlim_t/vlim_t); // Transfer current // Normalized BC cap and carge cc = cjci0_t_ii/cjcii; qjci = qjci/cjci0_t_ii; qj_2 = (1+qjci/vef)/2; // Minority charge transit time tf0 = t0_t+dt0h*(cc-1)+tbvl*(1/cc-1); // DC critical currents ickf = iqf; ickr = iqr; // Ideal transfer currents arg1 = Vbiei/(mcf*VT); `LIN_EXP(le1,arg1) itfi=is_t*le1; arg2 = Vbici/(mcr*VT); `LIN_EXP(le2,arg2) itri=is_t*le2; // Normalized minority charge qm = (itfi/ickf+itri/ickr); // Normalized total hole charge qpt = qj_2+sqrt((qj_2)*(qj_2)+qm); if (qpt<=1e-20) begin qpt=1e-20; end // Low transfer current itfl = itfi/qpt; itrl = itri/qpt; // Normalized injection width with low transfer current // and normalized charge component if (itfl<=1e-20) begin itfl = 1e-20; end al = 1-ick/itfl; s3l = sqrt(al*al+ahc); wl = (al+s3l)/(1+sqrt(1+ahc)); d_qfh = (wl*wl+tfh*itfl/ick)*itfl/iqfh; // Transfer current facl = 1/(1+d_qfh/qpt); itf = itfl*facl; itr = itrl*facl; if (itf<=1e-20) begin itf = 1e-20; end it = itf-itr; // BE diffusion charge // Calculation of low-current portion qf0 = tf0*itf; // Current dependent component a = 1-ick/itf; s3 = sqrt(a*a+ahc); w = (a+s3)/(1+sqrt(1+ahc)); tww = thcs_t*w*w; dqfh = tww*itf; dtfh = tww*(1+2*ick/itf/s3); // Emitter component dtef = tef0_t*exp(gte*ln(itf/ick)); dqef = dtef*itf/(gte+1.0); // Total minority charge and transit time qf = qf0+dqef+dqfh; tf = tf0+dtfh+dtef; // BC diffusion charge qr = tr*itr; // Internal base current // BE diode `HICDIO(ibes,ibes_t,mbe,Vbiei,ibe) `HICDIO(ires,ires_t,mre,Vbiei,ire) ijbe = ibe+ire; // BC diode `HICDIO(ibcs,ibcs_t,mbc,Vbici,ijbc) // Total base current ibi = ijbe+ijbc; // Avalanche current if (Vbici < 0) begin : HICAVL v_bord = eavl_t*vdci_t; if (vdci_t-Vbici>v_bord) begin a_iavl = kavl_t/vdci_t*exp(-cc); iavl = itf*a_iavl*(v_bord+(1+cc)*(vdci_t-Vbici-v_bord)); end else begin lncc = ln(1/cc); iavl = kavl_t*itf*exp(-1/zci*lncc-eavl_t*exp((1/zci-1)*lncc)); end end else begin iavl = 0; end // // Additional elements for external transistor // // Base resistance if(rbi0_t > 0.0) begin : HICRBI // Conductivity modulation with hyperbolic smoothing qje = qjei/cje0_t; Qz_nom = 1+qje/vr0e+qjci/vr0c+itf/ickf+itr/ickr; fQz = 0.5*(Qz_nom+sqrt(Qz_nom*Qz_nom+0.01));; rbi = rbi0_t/fQz; // Emitter current crowding if (ibi > 0.0) begin eta = fgeo*rbi*ibi/VT; if (eta < 1e-6) begin rbi = rbi*(1-0.5*eta); end else begin rbi = rbi*ln(eta+1)/eta; end end end else begin rbi = 0.0; end // Total base resistance rb = rbi+rbx_t; // Parasitic substrate transistor transfer current if(itss > 0.0) begin : Sub_Transfer HSUM = msf*VT; HSa = limexp(Vbci/HSUM); HSb = limexp(Vsci/HSUM); HSI_Tsu = itss_t*(HSa-HSb); end else begin HSI_Tsu = 0.0; end // Substrate diode and cap and charge `HICDIO(iscs,iscs_t,msc,Vsci,ijsc) `HICJQ(Vsci,cjs0_t,vds_t,zs,vpts,qjs) // Self heating if (flsh == 1 && rth >= `MIN_R) begin pterm = it*Vciei+iavl*(vdci_t-Vbici); end else if (flsh == 2 && rth >= `MIN_R) begin pterm = Vciei*it + (vdci_t-Vbici)*iavl + ijbe*Vbiei + ijbc*Vbici + ijsc*Vsci; if (rb >= `MIN_R) begin pterm = pterm + Vbbi*Vbbi/rb; end if (re_t >= `MIN_R) begin pterm = pterm + Veie*Veie/re_t; end if (rcx_t >= `MIN_R) begin pterm = pterm + Vcic*Vcic/rcx_t; end end // // Compute branch sources // Ibici = ijbc - iavl; Qbci = cbcpar*Vbci; Qbe = cbepar*Vbe; Qbici = qjcii+qr; Qbiei = qjei+qf; ijsc = HICUMtype*ijsc; qjs = HICUMtype*qjs; qjcx = HICUMtype*qjcx; Qbci = HICUMtype*Qbci; Qbe = HICUMtype*Qbe; Ibici = HICUMtype*Ibici; Qbici = HICUMtype*Qbici; ijbe = HICUMtype*ijbe; Qbiei = HICUMtype*Qbiei; it = HICUMtype*it; // // Define branch sources // I(br_biei) <+ _circuit_gmin*V(br_biei); I(br_bici) <+ _circuit_gmin*V(br_bici); I(br_bs) <+ HSI_Tsu; I(br_sci) <+ ijsc + _circuit_gmin*V(br_sci); //`P(spectre:gmin="add" spectre:pwl_passive="1e10"); I(br_sci) <+ ddt(qjs); I(br_bci) <+ ddt(qjcx); I(br_bci) <+ ddt(Qbci); I(br_be) <+ ddt(Qbe); if (re >= `MIN_R) begin I(br_eie_i) <+ Veie/re_t + _circuit_gmin*V(br_eie_i);//`P(spectre:gmin="add"); end else begin V(br_eie_v) <+ 0.0; end if (rcx >= `MIN_R) begin I(br_cic_i) <+ Vcic/rcx_t + _circuit_gmin*V(br_cic_i);//`P(spectre:gmin="add"); end else begin V(br_cic_v) <+ 0.0; end if (rbi0 >= `MIN_R || rbx >= `MIN_R) begin I(br_bbi_i) <+ Vbbi/rb + _circuit_gmin*V(br_bbi_i); //`P(spectre:gmin="add"); end else begin V(br_bbi_v) <+ 0.0; end I(br_bici) <+ Ibici + _circuit_gmin*V(br_bici); //`P(spectre:gmin="add" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="imax/0.025" spectre:pwl_rev_current="imax" spectre:pwl_rev_cond="IMAX/0.025"); I(br_bici) <+ ddt(Qbici); I(br_biei) <+ ijbe + _circuit_gmin*V(br_biei); //`P(spectre:gmin="add" spectre:pwl_fwd_current="IBEIS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IBEIS*exp(25.0)/0.025" spectre:pwl_sat_current="IMAX" spectre:pwl_sat_cond="IMAX/0.025" spectre:pwl_passive="1e10"); I(br_biei) <+ ddt(Qbiei); I(br_ciei) <+ it `P(spectre:pwl_fwd_current="IS*exp(25.0)" spectre:pwl_fwd_node="bi" spectre:pwl_fwd_cond="IS*exp(25.0)/0.025" spectre:pwl_rev_current="IMAX" spectre:pwl_rev_cond="IMAX/0.025" spectre:pwl_passive="1e10"); // Following code is an intermediate solution: // ****************************************** if(flsh == 0 || rth < `MIN_R) begin I(br_sht) <+ Vrth/`MIN_R; end else begin I(br_sht) <+ Vrth/rth-pterm + _circuit_gmin*V(br_sht);//`P(spectre:gmin="add"); I(br_sht) <+ ddt(cth*Vrth); end // ****************************************** // For simulators having no problem with V(br_sht) <+ 0.0 // with external thermal node, follwing code may be used. // This external thermal node should remain accessible. // ******************************************** //if(flsh == 0 || rth < `MIN_R) begin // V(br_sht) <+ 0.0; //end else begin // I(br_sht) <+ Vrth/rth-pterm `P(spectre:gmin="add"); // I(br_sht) <+ ddt(cth*Vrth); //end // ******************************************** // Noise sources // Thermal noise fourkt = 4.0 * `P_K * Tdev; if(rbx >= `MIN_R || rbi0 >= `MIN_R) begin I(br_bbi_i) <+ white_noise(fourkt/rb); end if(rcx >= `MIN_R) begin I(br_cic_i) <+ white_noise(fourkt/rcx_t); end if(re >= `MIN_R) begin I(br_eie_i) <+ white_noise(fourkt/re_t); end // Shot noise twoq = 2.0 * `P_Q; I(br_biei) <+ white_noise(twoq*ijbe); I(br_ciei) <+ white_noise(twoq*it); // Flicker noise flicker_Pwr = kf*pow(ijbe,af); I(br_biei) <+ flicker_noise(flicker_Pwr,1.0); end // analog endmodule ngspice-26/src/spicelib/devices/adms/psp102/0000755000265600020320000000000012264261473020205 5ustar andreasadminngspice-26/src/spicelib/devices/adms/psp102/admsva/0000755000265600020320000000000012264261473021460 5ustar andreasadminngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_ChargesNQS.include0000644000265600020320000004254512264261473025742 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_ChargesNQS.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // /////////////////////////////////////////////// // // Calculate NQS-charge contributions // /////////////////////////////////////////////// Qp1 = vnorm * V(SPLINE1); Qp2 = vnorm * V(SPLINE2); Qp3 = vnorm * V(SPLINE3); Qp4 = vnorm * V(SPLINE4); Qp5 = vnorm * V(SPLINE5); Qp6 = vnorm * V(SPLINE6); Qp7 = vnorm * V(SPLINE7); Qp8 = vnorm * V(SPLINE8); Qp9 = vnorm * V(SPLINE9); Tnorm = 0.0; if (SWNQS_i != 0) begin // Dimension and mobility information is included in Tnorm Tnorm = MUNQS_i * phit1 * BET_i / (COX_qm * Gmob_dL); thesat2 = thesat1 * thesat1 * phit1 * phit1; if (SWNQS_i == 1) begin dQy = QpN - Qp0; d2Qy = 6.0 * (Qp0 + QpN) - 12.0 * Qp1; end else if (SWNQS_i == 2) begin dQy = (-7.0 * Qp0 - 3.0 * Qp1 + 12.0 * Qp2 - 2.0 * QpN) / 5.0; d2Qy = -18.0 / 5.0 * (-4.0 * Qp0 + 9.0 * Qp1 - 6.0 * Qp2 + QpN); end else if (SWNQS_i == 3) begin dQy = (-13.0 * Qp0 - 6.0 * Qp1 + 24.0 * Qp2 - 6.0 * Qp3 + QpN) / 7.0; d2Qy = (180.0 * Qp0 - 408.0 * Qp1 + 288.0 * Qp2 - 72.0 * Qp3 + 12.0 * QpN) / 7.0; end else if (SWNQS_i == 5) begin dQy = (-181.0 * Qp0 - 84.0 * Qp1 + 24.0 * Qp4 - 6.0 * Qp5 - 90.0 * Qp3 + QpN + 336.0 * Qp2) / 65.0; d2Qy = (432.0 * Qp4 - 108.0 * Qp5 - 1620.0 * Qp3 + 18.0 * QpN + 3762.0 * Qp0 - 8532.0 * Qp1 + 6048.0 * Qp2) / 65.0; end else if (SWNQS_i == 9) begin dQy = (1680.0 * Qp6 + 23400.0 * Qp4 + 5.0 * QpN - 87330.0 * Qp3 + 120.0 * Qp8 - 450.0 * Qp7 - 81480.0 * Qp1 + 325920.0 * Qp2 -175565.0 * Qp0 - 30.0 * Qp9) / 37829.0 - 30.0 / 181.0 * Qp5; d2Qy = (-13500.0 * Qp7 + 702000.0 * Qp4 - 2619900 * Qp3 - 13793100.0 * Qp1 + 9777600.0 * Qp2 + 6081750.0 * Qp0 + 150.0 * QpN + 3600.0 * Qp8 - 900.0 * Qp9 + 50400 * Qp6) / 37829.0 - 900.0 / 181.0 * Qp5; end else begin dQy = 0; d2Qy = 0; end `fq(Qp1, xg, dQy, d2Qy, fk1) end if (SWNQS_i >= 2) begin if (SWNQS_i == 2) begin dQy = (2.0 * Qp0 - 12.0 * Qp1 + 3.0 * Qp2 + 7.0 * QpN) / 5.0; d2Qy = -18.0 / 5.0 * (-4.0 * QpN + 9.0 * Qp2 - 6.0 * Qp1 + Qp0); end else if (SWNQS_i == 3) begin dQy = 0.5 * Qp0 - 3.0 * Qp1 + 3.0 * Qp3 - 0.5 * QpN; d2Qy = (-48.0 * Qp0 + 288.0 * Qp1 - 480.0 * Qp2 + 288.0 * Qp3 - 48.0 * QpN) / 7.0; end else if (SWNQS_i == 5) begin dQy = (-291.0 * Qp1 - 6.0 * Qp2 - 84.0 * Qp4 + 21.0 * Qp5) / 65.0 + (630.0 * Qp3 - 7.0 * QpN + 97.0 * Qp0) / 130.0; d2Qy = (-1728.0 * Qp4 + 432.0 * Qp5 + 6480.0 * Qp3 - 72.0 * QpN - 1008 * Qp0 + 6048 * Qp1 - 10152 * Qp2) / 65.0; end else if (SWNQS_i == 9) begin dQy = (-5880.0 * Qp6 - 81900.0 * Qp4 + 305655.0 * Qp3 - 420.0 * Qp8 + 105.0 * Qp9 - 282255.0 * Qp1 + 1575.0 * Qp7 - 5850.0 * Qp2) / 37829.0 + 105.0 / 181.0 * Qp5 + (94085.0 * Qp0 - 35.0 * QpN) / 75658.0; d2Qy = (9777600.0 * Qp1 + 54000.0 * Qp7 - 2808000.0 * Qp4 + 10479600.0 * Qp3 - 16413000.0 * Qp2 - 1629600.0 * Qp0 - 600.0 * QpN - 14400.0 * Qp8 + 3600.0 * Qp9 - 201600.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp2, xg, dQy, d2Qy, fk2) end if (SWNQS_i >= 3) begin if (SWNQS_i == 3) begin dQy = (13.0 * QpN + 6.0 * Qp3 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 7.0; d2Qy = (180.0 * QpN - 408.0 * Qp3 + 288.0 * Qp2 - 72.0 * Qp1 + 12.0 * Qp0) / 7.0; end else if (SWNQS_i == 5) begin dQy = (QpN - 6.0 * Qp5 + 24.0 * Qp4 - 24.0 * Qp2 + 6.0 * Qp1 - Qp0) / 5.0; d2Qy = (1296.0 * (Qp4 + Qp2) - 324.0 * (Qp5 + Qp1) - 2052.0 * Qp3 + 54.0 * (QpN + Qp0)) / 13.0; end else if (SWNQS_i == 9) begin dQy = (21840.0 * Qp6 + 304200.0 * Qp4 + 65.0 * QpN - 420.0 * Qp3 + 1560.0 * Qp8 - 12605.0 * Qp0-390.0 * Qp9 + 75630.0 * Qp1 - 5850.0 * Qp7 - 302520.0 * Qp2) / 37829.0 - 390.0 / 181.0 * Qp5; d2Qy = (-2619900.0 * Qp1 - 202500.0 * Qp7 + 10530000.0 * Qp4 - 16601100.0 * Qp3 + 10479600.0 * Qp2 + 436650.0 * Qp0 + 2250.0 * QpN + 54000.0 * Qp8 - 13500.0 * Qp9 + 756000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp3, xg, dQy, d2Qy, fk3) end if (SWNQS_i >= 4) begin if (SWNQS_i == 5) begin dQy = (-630.0 * Qp3 + 12.0 * Qp4 + 582.0 * Qp5 - 97.0 * QpN + 7.0 * Qp0 - 42.0 * Qp1 + 168.0 * Qp2)/130.0; d2Qy = (-10152.0 * Qp4 + 6048.0 * Qp5 + 6480.0 * Qp3 - 1008.0 * QpN - 72.0 * Qp0 + 432.0 * Qp1 - 1728.0 * Qp2) / 65.0; end else if (SWNQS_i == 9) begin dQy = (-81480.0 * Qp6 - 30.0 * Qp4 - 303975.0 * Qp3 - 5820.0 * Qp8 + 1455.0 * Qp9 - 20265.0 * Qp1 + 21825.0 * Qp7 + 81060.0 * Qp2) / 37829.0 - 485.0 / 75658.0 * QpN + 1455.0 * Qp5 / 181.0 + 6755.0 * Qp0 / 75658.0; d2Qy = (702000.0 * Qp1 + 756000.0 * Qp7 - 16614600.0 * Qp4 + 10530000.0 * Qp3 - 2808000.0 * Qp2 - 117000.0 * Qp0 - 8400.0 * QpN - 201600.0 * Qp8 + 50400.0 * Qp9 - 2822400.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp4, xg, dQy, d2Qy, fk4) end if (SWNQS_i >= 5) begin if (SWNQS_i == 5) begin dQy = (-336.0 * Qp4 + 84.0 * Qp5 + 90.0 * Qp3 + 181.0 * QpN - Qp0 + 6.0 * Qp1 - 24.0 * Qp2) / 65.0; d2Qy = (18.0 * Qp0 + 3762.0 * QpN + 6048.0 * Qp4 + 432.0 * Qp2 - 1620.0 * Qp3 - 108.0 * Qp1 - 8532.0 * Qp5) / 65.0; end else if (SWNQS_i == 9) begin dQy = (1680.0 * (Qp6 - Qp4) + 5.0 * (QpN - Qp0) + 450.0 * (Qp3 - Qp7) + 120.0 * (Qp8 - Qp2) - 30.0 * (Qp9 - Qp1)) / 209.0; d2Qy = (-900.0 * (Qp1 + Qp9) - 13500.0 * (Qp7 + Qp3) - 79500.0 * Qp5 + 50400.0 * (Qp4 + Qp6) + 3600.0 * (Qp2 + Qp8) + 150.0 * (Qp0 + QpN)) / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp5, xg, dQy, d2Qy, fk5) end if (SWNQS_i >= 6) begin if (SWNQS_i == 9) begin dQy = (30.0 * Qp6 + 81480.0 * Qp4 - 21825.0 * Qp3 - 81060.0 * Qp8 + 20265.0 * Qp9 - 1455.0 * Qp1 + 303975.0 * Qp7 + 5820.0 * Qp2) / 37829.0 -(6755.0 * QpN - 485.0 * Qp0) / 75658.0 - 1455.0 / 181.0 * Qp5; d2Qy = (50400.0 * Qp1 + 10530000.0 * Qp7 - 2822400.0 * Qp4 + 756000.0 * Qp3 - 201600.0 * Qp2 - 8400.0 * Qp0 - 117000.0 * QpN - 2808000.0 * Qp8 + 702000.0 * Qp9 - 16614600.0 * Qp6) / 37829.0 + 50400.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp6, xg, dQy, d2Qy, fk6) end if (SWNQS_i >= 7) begin if (SWNQS_i == 9) begin dQy = (-304200.0 * Qp6 - 21840.0 * Qp4 + 12605.0 * QpN + 5850.0 * Qp3 + 302520.0 * Qp8 - 65.0 * Qp0 - 75630.0 * Qp9 + 390.0 * Qp1 + 420.0 * Qp7 - 1560.0 * Qp2) / 37829.0 + 390.0 / 181.0 * Qp5; d2Qy = (-13500.0 * Qp1 - 16601100.0 * Qp7 + 756000.0 * Qp4 - 202500.0 * Qp3 + 54000.0 * Qp2 + 2250.0 * Qp0 + 436650.0 * QpN + 10479600.0 * Qp8 - 2619900.0 * Qp9 + 10530000.0 * Qp6) / 37829.0 - 13500.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp7, xg, dQy, d2Qy, fk7) end if (SWNQS_i >= 8) begin if (SWNQS_i == 9) begin dQy = (81900.0 * Qp6 + 5880.0 * Qp4 - 1575.0 * Qp3 + 5850.0 * Qp8 + 282255.0 * Qp9 - 105.0 * Qp1 - 305655.0 * Qp7 + 420.0 * Qp2) / 37829.0 + (35.0 * Qp0 - 94085.0 * QpN) / 75658.0 - 105.0 / 181.0 * Qp5; d2Qy = (3600.0 * Qp1 + 10479600.0 * Qp7 - 201600.0 * Qp4 + 54000.0 * Qp3 - 14400.0 * Qp2 - 600.0 * Qp0 - 1629600.0 * QpN - 16413000.0 * Qp8 + 9777600.0 * Qp9 - 2808000.0 * Qp6) / 37829.0 + 3600.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp8, xg, dQy, d2Qy, fk8) end if (SWNQS_i >= 9) begin if (SWNQS_i == 9) begin dQy = (-23400.0 * Qp6 - 1680.0 * Qp4 + 175565.0 * QpN + 450.0 * Qp3 - 325920.0 * Qp8 - 5.0 * Qp0 + 81480.0 * Qp9 + 30.0 * Qp1 + 87330.0 * Qp7 - 120.0 * Qp2) / 37829.0 + 30.0 * Qp5 / 181.0; d2Qy = (-900.0 * Qp1 - 2619900.0 * Qp7 + 50400.0 * Qp4 - 13500.0 * Qp3 + 3600.0 * Qp2 + 150.0 * Qp0 + 6081750.0 * QpN + 9777600.0 * Qp8 - 13793100.0 * Qp9 + 702000.0 * Qp6) / 37829.0 - 900.0 * Qp5 / 181.0; end else begin dQy = 0; d2Qy = 0; end `fq(Qp9, xg, dQy, d2Qy, fk9) end //-------------------------------------------------------------------- // Terminal charges for NQS if (SWNQS_i != 0) begin if (SWNQS_i == 1) begin QS_NQS = (17.0 * Qp0 + 30.0 * Qp1 + QpN) / 96.0; QD_NQS = (Qp0 + 30.0 * Qp1 + 17.0 * QpN) / 96.0; `QiToPhi(Qp1,xg, temp1) QG_NQS = xg - (x_sp + 4.0 * temp1 + x_dp) * `oneSixth; end else if (SWNQS_i == 2) begin QS_NQS = (11.0 * Qp0 + 24.0 * Qp1 + 9.0 * Qp2 + QpN) / 90.0; QD_NQS = (11.0 * QpN + 24.0 * Qp2 + 9.0 * Qp1 + Qp0) / 90.0; `QiToPhi(Qp1, xg, temp1) `QiToPhi(Qp2, xg, temp2) QG_NQS = xg - (x_sp + 3.0 * (temp1 + temp2) + x_dp) * 0.125; end else if (SWNQS_i == 3) begin QS_NQS = (251.0 * Qp0 + 594.0 * Qp1 + 312.0 * Qp2 + 174.0 * Qp3 + 13.0 * QpN) / 2688.0; QD_NQS = (251.0 * QpN + 594.0 * Qp3 + 312.0 * Qp2 + 174.0 * Qp1 + 13.0 * Qp0) / 2688.0; `QiToPhi(Qp1, xg, temp1) `QiToPhi(Qp2, xg, temp2) `QiToPhi(Qp3, xg, temp3) QG_NQS = xg - (x_sp + 4.0 * temp1 + 2.0 * temp2 + 4.0 * temp3 + x_dp) / 12.0; end else if (SWNQS_i == 5) begin QS_NQS = (1187.0 * Qp0 + 43.0 * QpN) / 18720.0 + (503.0 * Qp1 + 172.0 * Qp4 + 87.0 * Qp5 + 265.0 * Qp3 + 328.0 * Qp2) / 3120.0; QD_NQS = (1187.0 * QpN + 43.0 * Qp0) / 18720.0 + (503.0 * Qp5 + 172.0 * Qp2 + 87.0 * Qp1 + 265.0 * Qp3 + 328.0 * Qp4) / 3120.0; `QiToPhi(Qp1, xg, temp1) `QiToPhi(Qp2, xg, temp2) `QiToPhi(Qp3, xg, temp3) `QiToPhi(Qp4, xg, temp4) `QiToPhi(Qp5, xg, temp5) QG_NQS = xg - (x_sp + 4.0 * (temp1 + temp3 + temp5) + 2.0 * (temp2 + temp4) + x_dp) / 18.0; end else if (SWNQS_i == 9) begin QS_NQS = (75653.0 * Qp8 + 225999.0 * Qp4) / 3782900.0 + (151321.0 * Qp9 + 454023.0 * Qp7 + 1073767.0 * Qp3 + 1564569.0 * Qp1) / 15131600.0 + 75623.0 * Qp6 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp2 / 945725.0 + (3504517.0 * Qp0 + 75653.0 * QpN) / 90789600.0; QD_NQS = (75653.0 * Qp2 + 225999.0 * Qp6) / 3782900.0 + (151321.0 * Qp1 + 454023.0 * Qp3 + 1073767.0 * Qp7 + 1564569.0 * Qp9) / 15131600.0 + 75623.0 * Qp4 / 1891450.0 + 145.0 * Qp5 / 2896.0 + 72263.0 * Qp8 / 945725.0 + (3504517.0 * QpN + 75653.0 * Qp0) / 90789600.0; `QiToPhi(Qp1, xg, temp1) `QiToPhi(Qp2, xg, temp2) `QiToPhi(Qp3, xg, temp3) `QiToPhi(Qp4, xg, temp4) `QiToPhi(Qp5, xg, temp5) `QiToPhi(Qp6, xg, temp6) `QiToPhi(Qp7, xg, temp7) `QiToPhi(Qp8, xg, temp8) `QiToPhi(Qp9, xg, temp9) QG_NQS = xg - (x_sp + 4.0 * (temp1 + temp3 + temp5 + temp7 + temp9) + 2.0 * (temp2 + temp4 + temp6 + temp8) + x_dp) / 30.0; end QG_NQS = pd * QG_NQS; if (sigVds > 0) begin Qs = COX_qm * phit1 * QS_NQS; Qd = COX_qm * phit1 * QD_NQS; end else begin Qs = COX_qm * phit1 * QD_NQS; Qd = COX_qm * phit1 * QS_NQS; end Qg = COX_qm * phit1 * QG_NQS; Qb = -Qg - Qs - Qd; end // Update internal nodes V(RES1) <+ vnorm_inv * I(RES1) * r_nqs; V(SPLINE1) <+ idt(-vnorm_inv * Tnorm * fk1, Qp1_0); V(RES2) <+ vnorm_inv * I(RES2) * r_nqs; V(SPLINE2) <+ idt(-vnorm_inv * Tnorm * fk2, Qp2_0); V(RES3) <+ vnorm_inv * I(RES3) * r_nqs; V(SPLINE3) <+ idt(-vnorm_inv * Tnorm * fk3, Qp3_0); V(RES4) <+ vnorm_inv * I(RES4) * r_nqs; V(SPLINE4) <+ idt(-vnorm_inv * Tnorm * fk4, Qp4_0); V(RES5) <+ vnorm_inv * I(RES5) * r_nqs; V(SPLINE5) <+ idt(-vnorm_inv * Tnorm * fk5, Qp5_0); V(RES6) <+ vnorm_inv * I(RES6) * r_nqs; V(SPLINE6) <+ idt(-vnorm_inv * Tnorm * fk6, Qp6_0); V(RES7) <+ vnorm_inv * I(RES7) * r_nqs; V(SPLINE7) <+ idt(-vnorm_inv * Tnorm * fk7, Qp7_0); V(RES8) <+ vnorm_inv * I(RES8) * r_nqs; V(SPLINE8) <+ idt(-vnorm_inv * Tnorm * fk8, Qp8_0); V(RES9) <+ vnorm_inv * I(RES9) * r_nqs; V(SPLINE9) <+ idt(-vnorm_inv * Tnorm * fk9, Qp9_0); ngspice-26/src/spicelib/devices/adms/psp102/admsva/psp102.va0000644000265600020320000000244012264261473023035 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: psp102.va //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // `include "discipline.h" `include "SIMKIT_macrodefs.include" `include "JUNCAP200_macrodefs.include" `include "PSP102_macrodefs.include" ///////////////////////////////////////////////////////////////////////////// // // PSP global model code // ///////////////////////////////////////////////////////////////////////////// // `undef LocalModel // `define Binning module PSP102VA(D, G, S, B) `P( info = "PSP MOSFET Model" version = `VERS revision = `VREV simkit:name = "psp1020" simkit:desc = "psp_1020" ); `include "PSP102_module.include" endmodule ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_module.include0000644000265600020320000036572512264261473025301 0ustar andreasadmin`undef P `define P(txt) (*txt*) //====================================================================================== //====================================================================================== // Filename: PSP102_module.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // // Node definitions inout D, G, S, B; electrical D; electrical G; electrical S; electrical B; // Extra internal nodes for correlated drain and gate noise electrical NOI; electrical NOI2; // Extra branches for correlated drain and gate noise branch (NOI) NOII; branch (NOI) NOIR; branch (NOI) NOIC; `ifdef NQSmodel // Internal nodes for gate and bulk resistors electrical GP; electrical BP; electrical BI; electrical BS; electrical BD; // Internal nodes for spline collocation electrical INT1; electrical INT2; electrical INT3; electrical INT4; electrical INT5; electrical INT6; electrical INT7; electrical INT8; electrical INT9; branch(INT1) SPLINE1; branch(INT2) SPLINE2; branch(INT3) SPLINE3; branch(INT4) SPLINE4; branch(INT5) SPLINE5; branch(INT6) SPLINE6; branch(INT7) SPLINE7; branch(INT8) SPLINE8; branch(INT9) SPLINE9; branch(INT1) RES1; branch(INT2) RES2; branch(INT3) RES3; branch(INT4) RES4; branch(INT5) RES5; branch(INT6) RES6; branch(INT7) RES7; branch(INT8) RES8; branch(INT9) RES9; `endif // NQSmodel ////////////////////////// // // Model parameters // ////////////////////////// `ifdef LocalModel /////////////////////////////////////////////////// // PSP local model parameters /////////////////////////////////////////////////// // Special model parameters, some are also simulator global variables parameter real LEVEL = 102 `P(info="Model level" unit="" ); parameter real TYPE = 1.0 `from( -1.0,1.0 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="" ); parameter real TR = 21.0 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C" ); // Switch parameters that turn models or effects on or off parameter real SWIGATE = 0.0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="" ); parameter real SWIMPACT = 0.0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="" ); parameter real SWGIDL = 0.0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="" ); parameter real SWJUNCAP = 0.0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="" ); parameter real QMC = 1.0 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="" ); // Process parameters parameter real VFB = -1.0 `P(info="Flatband voltage at TR" unit="V" ); parameter real STVFB = 5.0e-4 `P(info="Temperature dependence of VFB" unit="V/K" ); parameter real TOX = 2.0e-09 `from( 1e-10,inf ) `P(info="Gate oxide thickness" unit="m" ); parameter real NEFF = 5.0e+23 `from( 1e20,1e26 ) `P(info="Effective substrate doping" unit="m^-3" ); parameter real VNSUB = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V" ); parameter real NSLP = 0.05 `from( 1e-3,inf ) `P(info="Effective doping bias-dependence parameter" unit="V" ); parameter real DNSUB = 0.0 `from( 0.0,1.0 ) `P(info="Effective doping bias-dependence parameter" unit="V^-1" ); parameter real DPHIB = 0.0 `P(info="Offset parameter for PHIB" unit="V" ); parameter real NP = 1.0e+26 `from( 0.0,inf ) `P(info="Gate poly-silicon doping" unit="m^-3" ); parameter real CT = 0.0 `from( 0.0,inf ) `P(info="Interface states factor" unit="" ); parameter real TOXOV = 2.0e-09 `from( 1e-10,inf ) `P(info="Overlap oxide thickness" unit="m" ); parameter real NOV = 5.0e+25 `from( 1e20,1e27 ) `P(info="Effective doping of overlap region" unit="m^-3" ); // DIBL parameters parameter real CF = 0.0 `from( 0.0,inf ) `P(info="DIBL-parameter" unit="V^-1" ); parameter real CFB = 0.0 `from( 0.0,1.0 ) `P(info="Back bias dependence of CF" unit="V^-1" ); // Mobility parameters parameter real BETN = 7e-2 `from( 0.0,inf ) `P(info="Channel aspect ratio times zero-field mobility" unit="m^2/V/s" ); parameter real STBET = 1.0 `P(info="Temperature dependence of BETN" unit="" ); parameter real MUE = 0.5 `from( 0.0,inf ) `P(info="Mobility reduction coefficient at TR" unit="m/V" ); parameter real STMUE = 0.0 `P(info="Temperature dependence of MUE" unit="" ); parameter real THEMU = 1.5 `from( 0.0,inf ) `P(info="Mobility reduction exponent at TR" unit="" ); parameter real STTHEMU = 1.5 `P(info="Temperature dependence of THEMU" unit="" ); parameter real CS = 0.0 `from( 0.0,inf ) `P(info="Coulomb scattering parameter at TR" unit="" ); parameter real STCS = 0.0 `P(info="Temperature dependence of CS" unit="" ); parameter real XCOR = 0.0 `from( 0.0,inf ) `P(info="Non-universality factor" unit="V^-1" ); parameter real STXCOR = 0.0 `P(info="Temperature dependence of XCOR" unit="" ); parameter real FETA = 1.0 `from( 0.0,inf ) `P(info="Effective field parameter" unit="" ); // Series-resistance parameters (for resistance modeling as part of intrinsic mobility reduction) parameter real RS = 30 `from( 0.0,inf ) `P(info="Series resistance at TR" unit="Ohm" ); parameter real STRS = 1.0 `P(info="Temperature dependence of RS" unit="" ); parameter real RSB = 0.0 `from( -0.5,1.0 ) `P(info="Back-bias dependence of series resistance" unit="V^-1" ); parameter real RSG = 0.0 `from( -0.5,inf ) `P(info="Gate-bias dependence of series resistance" unit="V^-1" ); // Velocity saturation parameters parameter real THESAT = 1.0 `from( 0.0,inf ) `P(info="Velocity saturation parameter at TR" unit="V^-1" ); parameter real STTHESAT = 1.0 `P(info="Temperature dependence of THESAT" unit="" ); parameter real THESATB = 0.0 `from( -0.5,1.0 ) `P(info="Back-bias dependence of velocity saturation" unit="V^-1" ); parameter real THESATG = 0.0 `from( -0.5,inf ) `P(info="Gate-bias dependence of velocity saturation" unit="V^-1" ); // Saturation voltage parameters parameter real AX = 3.0 `from( 2.0,inf ) `P(info="Linear/saturation transition factor" unit="" ); // Channel length modulation (CLM) parameters parameter real ALP = 0.01 `from( 0.0,inf ) `P(info="CLM pre-factor" unit="" ); parameter real ALP1 = 0.00 `from( 0.0,inf ) `P(info="CLM enhancement factor above threshold" unit="V" ); parameter real ALP2 = 0.00 `from( 0.0,inf ) `P(info="CLM enhancement factor below threshold" unit="V^-1" ); parameter real VP = 0.05 `from( 1e-10,inf ) `P(info="CLM logarithm dependence factor" unit="V" ); // Impact ionization (II) parameters parameter real A1 = 1.0 `from( 0.0,inf ) `P(info="Impact-ionization pre-factor" unit="" ); parameter real A2 = 10.0 `from( 0.0,inf ) `P(info="Impact-ionization exponent at TR" unit="V" ); parameter real STA2 = 0.0 `P(info="Temperature dependence of A2" unit="V" ); parameter real A3 = 1.0 `from( 0.0,inf ) `P(info="Saturation-voltage dependence of impact-ionization" unit="" ); parameter real A4 = 0.0 `from( 0.0,inf ) `P(info="Back-bias dependence of impact-ionization" unit="V^-0.5" ); // Gate current parameters parameter real GCO = 0.0 `from( -10.0,10.0 ) `P(info="Gate tunnelling energy adjustment" unit="" ); parameter real IGINV = 0.0 `from( 0.0,inf ) `P(info="Gate channel current pre-factor" unit="A" ); parameter real IGOV = 0.0 `from( 0.0,inf ) `P(info="Gate overlap current pre-factor" unit="A" ); parameter real STIG = 2.0 `P(info="Temperature dependence of IGINV and IGOV" unit="" ); parameter real GC2 = 0.375 `from( 0.0,10.0 ) `P(info="Gate current slope factor" unit="" ); parameter real GC3 = 0.063 `from( -2.0,2.0 ) `P(info="Gate current curvature factor" unit="" ); parameter real CHIB = 3.1 `from( 1.0,inf ) `P(info="Tunnelling barrier height" unit="V" ); // Gate Induced Drain/Source Leakage (GIDL) parameters parameter real AGIDL = 0.0 `from( 0.0,inf ) `P(info="GIDL pre-factor" unit="A/V^3" ); parameter real BGIDL = 41.0 `from( 0.0,inf ) `P(info="GIDL probability factor at TR" unit="V" ); parameter real STBGIDL = 0.0 `P(info="Temperature dependence of BGIDL" unit="V/K" ); parameter real CGIDL = 0.0 `P(info="Back-bias dependence of GIDL" unit="" ); // Charge model parameters parameter real COX = 1.0e-14 `from( 0.0,inf ) `P(info="Oxide capacitance for intrinsic channel" unit="F" ); parameter real CGOV = 1.0e-15 `from( 0.0,inf ) `P(info="Oxide capacitance for gate-drain/source overlap" unit="F" ); parameter real CGBOV = 0.0 `from( 0.0,inf ) `P(info="Oxide capacitance for gate-bulk overlap" unit="F" ); parameter real CFR = 0.0 `from( 0.0,inf ) `P(info="Outer fringe capacitance" unit="F" ); // Noise parameters parameter real FNT = 1.0 `from( 0.0,inf ) `P(info="Thermal noise coefficient" unit="" ); parameter real NFA = 8.0e+22 `from( 0.0,inf ) `P(info="First coefficient of flicker noise" unit="V^-1/m^4" ); parameter real NFB = 3.0e+07 `from( 0.0,inf ) `P(info="Second coefficient of flicker noise" unit="V^-1/m^2" ); parameter real NFC = 0.0 `from( 0.0,inf ) `P(info="Third coefficient of flicker noise" unit="V^-1" ); `ifdef NQSmodel // NQS parameters parameter real SWNQS = 0.0 `from( 0.0,9.0 ) `P(info="Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points" unit="" ); parameter real MUNQS = 1.0 `from( 0.0,inf ) `P(info="Relative mobility for NQS modelling" ); parameter real RG = 1.0e-3 `from( 1.0e-6,inf ) `P(info="Gate resistance" unit="Ohm" ); parameter real RBULK = 1.0e-3 `from( 1.0e-6,inf ) `P(info="Bulk resistance between node BP and BI" unit="Ohm" ); parameter real RWELL = 1.0e-3 `from( 1.0e-6,inf ) `P(info="Well resistance between node BI and B" unit="Ohm" ); parameter real RJUNS = 1.0e-3 `from( 1.0e-6,inf ) `P(info="Source-side bulk resistance between node BI and BS" unit="Ohm" ); parameter real RJUND = 1.0e-3 `from( 1.0e-6,inf ) `P(info="Drain-side bulk resistance between node BI and BD" unit="Ohm" ); `endif // NQSmodel // JUNCAP Parameters parameter real TRJ = 21 `from(`TRJ_cliplow,inf) `P(info="reference temperature" unit="C" ); `include "JUNCAP200_parlist.include" // Other parameters parameter real DTA = 0.0 `P(info="Temperature offset w.r.t. ambient temperature" unit="K" ); // Instance parameters parameter real ABSOURCE = 1e-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2" ); parameter real LSSOURCE = 1e-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of source junction" unit="m" ); parameter real LGSOURCE = 1e-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source junction" unit="m" ); parameter real ABDRAIN = 1e-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2" ); parameter real LSDRAIN = 1e-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of drain junction" unit="m" ); parameter real LGDRAIN = 1e-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of drain junction" unit="m" ); parameter real AS = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2" ); parameter real PS = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of source junction" unit="m" ); parameter real AD = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2" ); parameter real PD = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of drain junction" unit="m" ); parameter real JW = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source/drain junction" unit="m" ); parameter real MULT = 1.0 `from( 0.0,inf ) `P(type="instance" info="Number of devices in parallel" unit="" ); `else // LocalModel `ifdef Binning `include "PSP102_binpars.include" `else // Binning /////////////////////////////////////////////////// // PSP global model parameters /////////////////////////////////////////////////// // Special model parameters parameter real LEVEL = 1020 `P(info="Model level" unit="" ); parameter real TYPE = 1.0 `from( -1,1 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="" ); // Reference Temperature parameter real TR = 21.0 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C" ); // Switch parameters that turn models or effects on or off parameter real SWIGATE = 0.0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="" ); parameter real SWIMPACT = 0.0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="" ); parameter real SWGIDL = 0.0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="" ); parameter real SWJUNCAP = 0.0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="" ); parameter real QMC = 1.0 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="" ); // Process Parameters parameter real LVARO = 0.0 `P(info="Geom. independent difference between actual and programmed gate length" unit="m" ); parameter real LVARL = 0.0 `P(info="Length dependence of LVAR" unit="" ); parameter real LVARW = 0.0 `P(info="Width dependence of LVAR" unit="" ); parameter real LAP = 0.0 `P(info="Effective channel length reduction per side" unit="m" ); parameter real WVARO = 0.0 `P(info="Geom. independent difference between actual and programmed field-oxide opening" unit="m" ); parameter real WVARL = 0.0 `P(info="Length dependence of WVAR" unit="" ); parameter real WVARW = 0.0 `P(info="Width dependence of WVAR" unit="" ); parameter real WOT = 0.0 `P(info="Effective channel width reduction per side" unit="m" ); parameter real DLQ = 0.0 `P(info="Effective channel length reduction for CV" unit="m" ); parameter real DWQ = 0.0 `P(info="Effective channel width reduction for CV" unit="m" ); parameter real VFBO = -1.0 `P(info="Geometry-independent flat-band voltage at TR" unit="V" ); parameter real VFBL = 0.0 `P(info="Length dependence of flat-band voltage" unit="" ); parameter real VFBW = 0.0 `P(info="Width dependence of flat-band voltage" unit="" ); parameter real VFBLW = 0.0 `P(info="Area dependence of flat-band voltage" unit="" ); parameter real STVFBO = 5e-4 `P(info="Geometry-independent temperature dependence of VFB" unit="V/K" ); parameter real STVFBL = 0.0 `P(info="Length dependence of temperature dependence of VFB" unit="" ); parameter real STVFBW = 0.0 `P(info="Width dependence of temperature dependence of VFB" unit="" ); parameter real STVFBLW = 0.0 `P(info="Area dependence of temperature dependence of VFB" unit="" ); parameter real TOXO = 2e-9 `from( 1e-10,inf ) `P(info="Gate oxide thickness" unit="m" ); parameter real NSUBO = 3e23 `from( 1e20,inf ) `P(info="Geometry independent substrate doping" unit="m^-3" ); parameter real NSUBW = 0.0 `P(info="Width dependence of background doping NSUBO due to segregation" unit="" ); parameter real WSEG = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of segregation of background doping NSUBO" unit="m" ); parameter real NPCK = 1e24 `from( 0.0,inf ) `P(info="Pocket doping level" unit="m^-3" ); parameter real NPCKW = 0.0 `P(info="Width dependence of pocket doping NPCK due to segregation" unit="" ); parameter real WSEGP = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of segregation of pocket doping NPCK" unit="m" ); parameter real LPCK = 1e-8 `from( 1e-10,inf ) `P(info="Char. length of lateral doping profile" unit="m" ); parameter real LPCKW = 0.0 `P(info="Width dependence of char. length of lateral doping profile" unit="" ); parameter real FOL1 = 0.0 `P(info="First length dependence coefficient for short channel body effect" unit="" ); parameter real FOL2 = 0.0 `P(info="Second length dependence coefficient for short channel body effect" unit="" ); parameter real VNSUBO = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V" ); parameter real NSLPO = 0.05 `P(info="Effective doping bias-dependence parameter" unit="V" ); parameter real DNSUBO = 0.0 `P(info="Effective doping bias-dependence parameter" unit="V^-1" ); parameter real DPHIBO = 0.0 `P(info="Geometry independent offset of PHIB" unit="V" ); parameter real DPHIBL = 0.0 `P(info="Length dependence offset of PHIB" unit="V" ); parameter real DPHIBLEXP= 1.0 `P(info="Exponent for length dependence of offset of PHIB" unit="" ); parameter real DPHIBW = 0.0 `P(info="Width dependence of offset of PHIB" unit="" ); parameter real DPHIBLW = 0.0 `P(info="Area dependence of offset of PHIB" unit="" ); parameter real NPO = 1e26 `P(info="Geometry-independent gate poly-silicon doping" unit="m^-3" ); parameter real NPL = 0.0 `P(info="Length dependence of gate poly-silicon doping" unit="" ); parameter real CTO = 0.0 `P(info="Geometry-independent interface states factor" unit="" ); parameter real CTL = 0.0 `P(info="Length dependence of interface states factor" unit="" ); parameter real CTLEXP = 1.0 `P(info="Exponent for length dependence of interface states factor" unit="" ); parameter real CTW = 0.0 `P(info="Width dependence of interface states factor" unit="" ); parameter real CTLW = 0.0 `P(info="Area dependence of interface states factor" unit="" ); parameter real TOXOVO = 2e-9 `from( 1e-10,inf ) `P(info="Overlap oxide thickness" unit="m" ); parameter real LOV = 0 `from( 0.0,inf ) `P(info="Overlap length for gate/drain and gate/source overlap capacitance" unit="m" ); parameter real NOVO = 5e25 `P(info="Effective doping of overlap region" unit="m^-3" ); // DIBL Parameters parameter real CFL = 0.0 `P(info="Length dependence of DIBL-parameter" unit="V^-1" ); parameter real CFLEXP = 2.0 `P(info="Exponent for length dependence of CF" unit="" ); parameter real CFW = 0.0 `P(info="Width dependence of CF" unit="" ); parameter real CFBO = 0.0 `P(info="Back-bias dependence of CF" unit="V^-1" ); // Mobility Parameters parameter real UO = 5e-2 `P(info="Zero-field mobility at TR" unit="m^2/V/s" ); parameter real FBET1 = 0.0 `P(info="Relative mobility decrease due to first lateral profile" unit="" ); parameter real FBET1W = 0.0 `P(info="Width dependence of relative mobility decrease due to first lateral profile" unit="" ); parameter real LP1 = 1e-8 `from( 1e-10,inf ) `P(info="Mobility-related characteristic length of first lateral profile" unit="m" ); parameter real LP1W = 0.0 `P(info="Width dependence of mobility-related characteristic length of first lateral profile" unit="" ); parameter real FBET2 = 0.0 `P(info="Relative mobility decrease due to second lateral profile" unit="" ); parameter real LP2 = 1e-8 `from( 1e-10,inf ) `P(info="Mobility-related characteristic length of second lateral profile" unit="m" ); parameter real BETW1 = 0.0 `P(info="First higher-order width scaling coefficient of BETN" unit="" ); parameter real BETW2 = 0.0 `P(info="Second higher-order width scaling coefficient of BETN" unit="" ); parameter real WBET = 1e-9 `from( 1e-10,inf ) `P(info="Characteristic width for width scaling of BETN" unit="m" ); parameter real STBETO = 1.0 `P(info="Geometry independent temperature dependence of BETN" unit="" ); parameter real STBETL = 0.0 `P(info="Length dependence of temperature dependence of BETN" unit="" ); parameter real STBETW = 0.0 `P(info="Width dependence of temperature dependence of BETN" unit="" ); parameter real STBETLW = 0.0 `P(info="Area dependence of temperature dependence of BETN" unit="" ); parameter real MUEO = 0.5 `P(info="Geometry independent mobility reduction coefficient at TR" unit="m/V" ); parameter real MUEW = 0.0 `P(info="Width dependence of mobility reduction coefficient at TR" unit="" ); parameter real STMUEO = 0.0 `P(info="Temperature dependence of MUE" unit="" ); parameter real THEMUO = 1.5 `P(info="Mobility reduction exponent at TR" unit="" ); parameter real STTHEMUO = 1.5 `P(info="Temperature dependence of THEMU" unit="" ); parameter real CSO = 0.0 `P(info="Geometry independent coulomb scattering parameter at TR" unit="" ); parameter real CSL = 0.0 `P(info="Length dependence of CS" unit="" ); parameter real CSLEXP = 0.0 `P(info="Exponent for length dependence of CS" unit="" ); parameter real CSW = 0.0 `P(info="Width dependence of CS" unit="" ); parameter real CSLW = 0.0 `P(info="Area dependence of CS" unit="" ); parameter real STCSO = 0.0 `P(info="Temperature dependence of CS" unit="" ); parameter real XCORO = 0.0 `P(info="Geometry independent non-universality parameter" unit="V^-1" ); parameter real XCORL = 0.0 `P(info="Length dependence of non-universality parameter" unit="" ); parameter real XCORW = 0.0 `P(info="Width dependence of non-universality parameter" unit="" ); parameter real XCORLW = 0.0 `P(info="Area dependence of non-universality parameter" unit="" ); parameter real STXCORO = 0.0 `P(info="Temperature dependence of XCOR" unit="" ); parameter real FETAO = 1.0 `P(info="Effective field parameter" unit="" ); // Series Resistance parameter real RSW1 = 2.5e3 `P(info="Source/drain series resistance for 1 um wide channel at TR" unit="Ohm" ); parameter real RSW2 = 0.0 `P(info="Higher-order width scaling of RS" unit="" ); parameter real STRSO = 1.0 `P(info="Temperature dependence of RS" unit="" ); parameter real RSBO = 0.0 `P(info="Back-bias dependence of series resistance" unit="V^-1" ); parameter real RSGO = 0.0 `P(info="Gate-bias dependence of series resistance" unit="V^-1" ); // Velocity Saturation parameter real THESATO = 0.0 `P(info="Geometry independent velocity saturation parameter at TR" unit="V^-1" ); parameter real THESATL = 0.05 `P(info="Length dependence of THESAT" unit="V^-1" ); parameter real THESATLEXP= 1.0 `P(info="Exponent for length dependence of THESAT" unit="" ); parameter real THESATW = 0.0 `P(info="Width dependence of velocity saturation parameter" unit="" ); parameter real THESATLW = 0.0 `P(info="Area dependence of velocity saturation parameter" unit="" ); parameter real STTHESATO= 1.0 `P(info="Geometry independent temperature dependence of THESAT" unit="" ); parameter real STTHESATL= 0.0 `P(info="Length dependence of temperature dependence of THESAT" unit="" ); parameter real STTHESATW= 0.0 `P(info="Width dependence of temperature dependence of THESAT" unit="" ); parameter real STTHESATLW= 0.0 `P(info="Area dependence of temperature dependence of THESAT" unit="" ); parameter real THESATBO = 0.0 `P(info="Back-bias dependence of velocity saturation" unit="V^-1" ); parameter real THESATGO = 0.0 `P(info="Gate-bias dependence of velocity saturation" unit="V^-1" ); // Saturation Voltage parameter real AXO = 18 `P(info="Geometry independent linear/saturation transition factor" unit="" ); parameter real AXL = 0.4 `from( 0.0,inf ) `P(info="Length dependence of AX" unit="" ); // Channel Length Modulation parameter real ALPL = 5e-4 `P(info="Length dependence of ALP" unit="" ); parameter real ALPLEXP = 1.0 `P(info="Exponent for length dependence of ALP" unit="" ); parameter real ALPW = 0.0 `P(info="Width dependence of ALP" unit="" ); parameter real ALP1L1 = 0.0 `P(info="Length dependence of CLM enhancement factor above threshold" unit="V" ); parameter real ALP1LEXP = 0.5 `P(info="Exponent for length dependence of ALP1" unit="" ); parameter real ALP1L2 = 0.0 `from( 0.0,inf ) `P(info="Second_order length dependence of ALP1" unit="" ); parameter real ALP1W = 0.0 `P(info="Width dependence of ALP1" unit="" ); parameter real ALP2L1 = 0.0 `P(info="Length dependence of CLM enhancement factor below threshold" unit="V^-1" ); parameter real ALP2LEXP = 0.5 `P(info="Exponent for length dependence of ALP2" unit="" ); parameter real ALP2L2 = 0.0 `from( 0.0,inf ) `P(info="Second_order length dependence of ALP2" unit="" ); parameter real ALP2W = 0.0 `P(info="Width dependence of ALP2" unit="" ); parameter real VPO = 0.05 `P(info="CLM logarithmic dependence parameter" unit="V" ); // Weak-avalanche parameters parameter real A1O = 1.0 `P(info="Geometry independent impact-ionization pre-factor" unit="" ); parameter real A1L = 0.0 `P(info="Length dependence of A1" unit="" ); parameter real A1W = 0.0 `P(info="Width dependence of A1" unit="" ); parameter real A2O = 10 `P(info="Impact-ionization exponent at TR" unit="V" ); parameter real STA2O = 0.0 `P(info="Temperature dependence of A2" unit="V" ); parameter real A3O = 1.0 `P(info="Geometry independent saturation-voltage dependence of II" unit="" ); parameter real A3L = 0.0 `P(info="Length dependence of A3" unit="" ); parameter real A3W = 0.0 `P(info="Width dependence of A3" unit="" ); parameter real A4O = 0.0 `P(info="Geometry independent back-bias dependence of II" unit="V^-0.5" ); parameter real A4L = 0.0 `P(info="Length dependence of A4" unit="" ); parameter real A4W = 0.0 `P(info="Width dependence of A4" unit="" ); // Gate current parameters parameter real GCOO = 0.0 `P(info="Gate tunnelling energy adjustment" unit="" ); parameter real IGINVLW = 0.0 `P(info="Gate channel current pre-factor for 1 um^2 channel area" unit="A" ); parameter real IGOVW = 0.0 `P(info="Gate overlap current pre-factor for 1 um wide channel" unit="A" ); parameter real STIGO = 2.0 `P(info="Temperature dependence of IGINV and IGOV" unit="" ); parameter real GC2O = 0.375 `P(info="Gate current slope factor" unit="" ); parameter real GC3O = 0.063 `P(info="Gate current curvature factor" unit="" ); parameter real CHIBO = 3.1 `P(info="Tunnelling barrier height" unit="V" ); // Gate-induced drain leakage parameters parameter real AGIDLW = 0.0 `P(info="Width dependence of GIDL pre-factor" unit="A/V^3" ); parameter real BGIDLO = 41 `P(info="GIDL probability factor at TR" unit="V" ); parameter real STBGIDLO = 0.0 `P(info="Temperature dependence of BGIDL" unit="V/K" ); parameter real CGIDLO = 0.0 `P(info="Back-bias dependence of GIDL" unit="" ); // Charge Model Parameters parameter real CGBOVL = 0.0 `P(info="Oxide capacitance for gate-bulk overlap for 1 um^2 area" unit="F" ); parameter real CFRW = 0.0 `P(info="Outer fringe capacitance for 1 um wide channel" unit="F" ); // Noise Model Parameters parameter real FNTO = 1.0 `P(info="Thermal noise coefficient" unit="" ); parameter real NFALW = 8e22 `P(info="First coefficient of flicker noise for 1 um^2 channel area" unit="V^-1/m^4" ); parameter real NFBLW = 3e7 `P(info="Second coefficient of flicker noise for 1 um^2 channel area" unit="V^-1/m^2" ); parameter real NFCLW = 0.0 `P(info="Third coefficient of flicker noise for 1 um^2 channel area" unit="V^-1" ); // Other Parameters parameter real DTA = 0 `P(info="Temperature offset w.r.t. ambient circuit temperature" unit="K" ); `endif // Binning `ifdef NQSmodel // NQS parameters parameter real SWNQS = 0.0 `from( 0.0,9.0 ) `P(info="Flag for NQS, 0=off, 1, 2, 3, 5, or 9=number of collocation points" unit="" ); parameter real MUNQSO = 1.0 `P(info="Relative mobility for NQS modelling" ); parameter real RGO = 1.0e-3 `P(info="Gate resistance" ); parameter real RBULKO = 1.0e-3 `P(info="Bulk resistance between node BP and BI" unit="Ohm" ); parameter real RWELLO = 1.0e-3 `P(info="Well resistance between node BI and B" unit="Ohm" ); parameter real RJUNSO = 1.0e-3 `P(info="Source-side bulk resistance between node BI and BS" unit="Ohm" ); parameter real RJUNDO = 1.0e-3 `P(info="Drain-side bulk resistance between node BI and BD" unit="Ohm" ); `endif // NQSmodel // Stress Model Parameters parameter real SAREF = 1.0e-6 `from( 1e-9,inf ) `P(info="Reference distance beteen OD-edge to poly from one side" unit="m" ); parameter real SBREF = 1.0e-6 `from( 1e-9,inf ) `P(info="Reference distance beteen OD-edge to poly from other side" unit="m" ); parameter real WLOD = 0 `P(info="Width parameter" unit="m" ); parameter real KUO = 0 `P(info="Mobility degradation/enhancement coefficient" unit="m" ); parameter real KVSAT = 0 `from( -1.0,1.0 ) `P(info="Saturation velocity degradation/enhancement coefficient" unit="m" ); parameter real TKUO = 0 `P(info="Temperature dependence of KUO" unit="" ); parameter real LKUO = 0 `P(info="Length dependence of KUO" unit="m^LLODKUO" ); parameter real WKUO = 0 `P(info="Width dependence of KUO" unit="m^WLODKUO" ); parameter real PKUO = 0 `P(info="Cross-term dependence of KUO" unit="m^(LLODKUO+WLODKUO)" ); parameter real LLODKUO = 0 `from( 0.0,inf ) `P(info="Length parameter for UO stress effect" unit="" ); parameter real WLODKUO = 0 `from( 0.0,inf ) `P(info="Width parameter for UO stress effect" unit="" ); parameter real KVTHO = 0 `P(info="Threshold shift parameter" unit="Vm" ); parameter real LKVTHO = 0 `P(info="Length dependence of KVTHO" unit="m^LLODVTH" ); parameter real WKVTHO = 0 `P(info="Width dependence of KVTHO" unit="m^WLODVTH" ); parameter real PKVTHO = 0 `P(info="Cross-term dependence of KVTHO" unit="m^(LLODVTH+WLODVTH)" ); parameter real LLODVTH = 0 `from( 0.0,inf ) `P(info="Length parameter for VTH-stress effect" unit="" ); parameter real WLODVTH = 0 `from( 0.0,inf ) `P(info="Width parameter for VTH-stress effect" unit="" ); parameter real STETAO = 0 `P(info="eta0 shift factor related to VTHO change" unit="m" ); parameter real LODETAO = 1.0 `from( 0.0,inf ) `P(info="eta0 shift modifaction factor for stress effect" unit="" ); // JUNCAP Parameters parameter real TRJ = 21 `from(`TRJ_cliplow,inf) `P(info="reference temperature" unit="C"); `include "JUNCAP200_parlist.include" // Instance parameters parameter real L = 10e-6 `from( 1e-9,inf ) `P(type="instance" info="Design length" unit="m" ); parameter real W = 10e-6 `from( 1e-9,inf ) `P(type="instance" info="Design width" unit="m" ); parameter real SA = 0.0 `P(type="instance" info="Distance beteen OD-edge to poly from one side" unit="m" ); parameter real SB = 0.0 `P(type="instance" info="Distance beteen OD-edge to poly from other side" unit="m" ); parameter real ABSOURCE = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2" ); parameter real LSSOURCE = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of source junction" unit="m" ); parameter real LGSOURCE = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of source junction" unit="m" ); parameter real ABDRAIN = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2" ); parameter real LSDRAIN = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="STI-edge length of drain junction" unit="m" ); parameter real LGDRAIN = 1E-6 `from(`LG_cliplow,inf) `P(type="instance" info="Gate-edge length of drain junction" unit="m" ); parameter real AS = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of source junction" unit="m^2" ); parameter real PS = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of source junction" unit="m" ); parameter real AD = 1E-12 `from(`AB_cliplow,inf) `P(type="instance" info="Bottom area of drain junction" unit="m^2" ); parameter real PD = 1E-6 `from(`LS_cliplow,inf) `P(type="instance" info="Perimeter of drain junction" unit="m" ); parameter real MULT = 1.0 `from( 0.0,inf ) `P(type="instance" info="Number of devices in parallel" unit="" ); ////////////////////////// // // Variables // ////////////////////////// // Variables for geometrical scaling rules real L_i, W_i, SA_i, SB_i; real LEN, WEN, iL, iW, delLPS, delWOD, LE, WE, iLE, iWE, Lcv, Wcv, LEcv, WEcv; `ifdef Binning // Auxiliary variables for binning-rules real iLEWE, iiLE, iiWE, iiLEWE, iiiLEWE; real iLEcv, iiLEcv, iiWEcv, iiLEWEcv, iiiLEWEcv; real iLcv, iiLcv, iiWcv, iiLWcv, iiiLWcv; `else // Binning // Intermediate variables used for geometry-scaling real NSUBO_i, WSEG_i, NPCK_i, WSEGP_i, LPCK_i, LOV_i; real LP1_i, LP2_i, WBET_i, AXL_i, ALP1L2_i, ALP2L2_i; real NSUB, AA, BB, NSUB0e, NPCKe, LPCKe; real FBET1e, LP1e, GPE, GWE, tmpx; `endif // Binning // List of local parameters real VFB, STVFB, TOX, NEFF, VNSUB, NSLP, DNSUB, DPHIB, NP, CT; real TOXOV, NOV, CF, CFB; real BETN, STBET, MUE, STMUE, THEMU, STTHEMU, CS, STCS, XCOR, STXCOR, FETA; real RS, STRS, RSB, RSG; real THESAT, STTHESAT, THESATB, THESATG; real AX; real ALP, ALP1, ALP2, VP; real A1, A2, STA2, A3, A4; real GCO, IGINV, IGOV, STIG, GC2, GC3, CHIB; real AGIDL, BGIDL, STBGIDL, CGIDL; real COX, CGOV, CGBOV, CFR; real FNT, NFA, NFB, NFC; `ifdef NQSmodel real MUNQS, RG, RBULK, RWELL, RJUNS, RJUND; `endif // NQSmodel // Variables for stress-model real SAREF_i, SBREF_i, KVSAT_i, LLODKUO_i, WLODKUO_i, LLODVTH_i, WLODVTH_i, LODETAO_i; real Invsa, Invsb, Invsaref, Invsbref, Kstressu0, rhobeta, rhobetaref, Kstressvth0; real temp0, templ, tempw, Lx, Wx; `endif // LocalModel // Variables used in electrical equations real VFB_i, STVFB_i, TOX_i, NEFF_i, VNSUB_i, NSLP_i, DNSUB_i, NP_i, QMC_i, CT_i, TOXOV_i, NOV_i; real CF_i, CFB_i, DPHIB_i; real BET_i, STBET_i, MUE_i, STMUE_i, THEMU_i, STTHEMU_i, CS_i, STCS_i, XCOR_i, STXCOR_i, FETA_i; real RS_i, THER_i, STRS_i, RSB_i, RSG_i; real THESAT_i, STTHESAT_i, THESATB_i, THESATG_i; real AX_i, ALP_i, ALP1_i, ALP2_i, VP_i; real A1_i, A2_i, STA2_i, A3_i, A4_i; real GCO_i, IGINV_i, IGOV_i, STIG_i, GC2_i, GC3_i, CHIB_i; real AGIDL_i, BGIDL_i, STBGIDL_i, CGIDL_i; real COX_i, CGOV_i, CGBOV_i, CFR_i; real FNT_i, NFA_i, NFB_i, NFC_i; real TR_i, MULT_i; real temp, temp1, temp2, tempM; real help; real TKR, TKD, TKD_sq, dT, rT, rTn; real phit, inv_phit, Eg, phibFac, CoxPrime, tox_sq; real delVg, CoxovPrime, GOV, GOV2; real np, kp, qq, qb0, dphibq, qlim2; real E_eff0, eta_mu, BCH, BOV, inv_CHIB, GCQ, Dch, Dov; real tf_bet, tf_mue, tf_cs, tf_xcor, tf_ther, tf_thesat, tf_ig; real xi_ov, inv_xi_ov, x_mrg_ov, x1, inv_xg1, Vdsat_lim; real nt, Cox_over_q; real phib, sqrt_phib, phix, aphi, bphi, phix1, phix2, G_0, phit1, inv_phit1, alpha_b; real inv_VP, inv_AX, Sfl_prefac; real Vgs, Vgd, Vds, Vsb, Vsbstar; real Vgb, Vgb1, Vgbstar, Vdb, Vdbstar, Vdsx, Vsbx; real Dnsub; real Igidl, Igisl, Vtovd, Vtovs; real x_s, sqm, alpha, alpha1, eta_p, phi_inf, za, xitsb, rhob; real thesat1, wsat, ysat, zsat, r1, r2, dL, GdL, dL1, FdL, GR, Gmob, Gmob_dL, Gvsat, Gvsatinv, QCLM; real xgm, Voxm, dps, qim, qim1, qim1_1, xgs_ov, xgd_ov, sigVds; real Ux, xg; real mu, nu, xn_s, delta_ns; real Gf, Gf2, inv_Gf2, xi, inv_xi, margin; real qeff, COX_qm; real SP_xg1, SP_S_temp,SP_S_temp1,SP_S_temp2; real SP_S_yg, SP_S_ysub, SP_S_y0, SP_S_a, SP_S_b, SP_S_c; real SP_S_bx, SP_S_tau, SP_S_eta, SP_S_delta0, SP_S_delta1; real SP_S_pC, SP_S_qC, SP_S_A_fac; real SP_S_x1, SP_S_w, SP_S_xbar, SP_S_x0; real SP_S_xi0, SP_S_xi1, SP_S_xi2; real SP_OV_yg, SP_OV_z, SP_OV_eta, SP_OV_a, SP_OV_c; real SP_OV_tau, SP_OV_D0, SP_OV_y0, SP_OV_xi, SP_OV_temp; real SP_OV_p, SP_OV_q, SP_OV_w, SP_OV_Afac, SP_OV_xbar; real SP_OV_x0, SP_OV_u; real x_d, x_m, x_ds, Rxcor, delta_1s, xi0s, xi1s, xi2s, xi0d; real Es, Em, Ed, Ds, Dm, Dd, Ps, xgs, qis, qbs, qbm, Eeffm, Vm; real Phi_0, Phi_2, asat, Phi_0_2, Phi0_Phi2; real Vdse, Vdsat, xn_d, k_ds, Udse; real Mutmp, Phi_sat, delta_nd; real pC, qC, Pm; real d0, D_bar, km, x_pm, xi_pd, p_pd, u_pd, q_pd; real xs_ov, xd_ov, Vovs, Vovd, psi_t; real zg, delVsat, TP, Dsi, Dgate, u0, u0_div_H, x, xsq, inv_x, ex, inv_ex, Ag, Bg, Sg; real H, Fj, Fj2; real N1, Nm1, Delta_N1, Sfl; real H0, t1, t2, sqt2, r, lc, lcinv2, g_ideal, CGeff, mid, mig, migid, c_igid, sqid, sqig; real shot_igs, shot_igsx, shot_igd, shot_igdx, shot_iavl; real Ids, Iimpact, mavl, Igdov, Igsov, Igc0, igc, igcd_h; real Igc, Igcd, Igcs, Igb, Igs, Igd; real Idse, Igbe, Igse, Igde, Igidle, Igisle, Iimpacte; real QI, QD, QB, QG, Qg, Qd, Qb, Qs, Qgs_ov, Qgd_ov; real Qfgs, Qfgd, Qgb_ov; real arg1, arg2max, arg2mina; integer CHNL_TYPE; `ifdef NQSmodel // Variables used in NQS-calculations real SWNQS_i, MUNQS_i, RG_i, RBULK_i, RWELL_i, RJUNS_i, RJUND_i; real Qp1_0, Qp2_0, Qp3_0, Qp4_0, Qp5_0, Qp6_0, Qp7_0, Qp8_0, Qp9_0; real fk1, fk2, fk3, fk4, fk5, fk6, fk7, fk8, fk9; real phi_p1, phi_p2, phi_p3; real phi_p4, phi_p5, phi_p6; real phi_p7, phi_p8, phi_p9; real Qp1, Qp2, Qp3; real Qp4, Qp5, Qp6; real Qp7, Qp8, Qp9; real Qp0, QpN; real QG_NQS, QS_NQS, QD_NQS; real pd, Gp, Gp2, a_factrp, marginp, x_sp, x_dp; real dfQi, fQi, dQis, dQis_1, d2Qis, dQbs, dQy, d2Qy, dpsy2; real ym, inorm, Tnorm, Qb_tmp, QbSIGN; real r_nqs, vnorm, vnorm_inv; real NQS_xg1, NQS_yg, NQS_z, NQS_eta, NQS_a, NQS_c, NQS_tau, NQS_D0, NQS_xi, NQS_p; real NQS_q, NQS_temp, NQS_A_fac, NQS_xbar, NQS_w, NQS_x0, NQS_u, NQS_y0; real xphi, fk0, thesat2, Fvsat; real Vrg, Vrbulk, Vrwell, Vrjund, Vrjuns; real ggate, gbulk, gwell, gjund, gjuns, nt0; real rgatenoise, rbulknoise, rwellnoise, rjundnoise, rjunsnoise; real temp3, temp4, temp5, temp6, temp7, temp8, temp9; `endif // NQSmodel // JUNCAP2 variables `include "JUNCAP200_varlist.include" real isjunbot, qsjunbot, isjunsti, qsjunsti, isjungat, qsjungat, isjun, qsjun, sjnoise, sjnoisex; real idjunbot, qdjunbot, idjunsti, qdjunsti, idjungat, qdjungat, idjun, qdjun, djnoise, djnoisex; real Vjuns, Vjund, VMAXS, VMAXD; real vbimins, vchs, vfmins, vbbtlims, vbimind, vchd, vfmind, vbbtlimd; real ABSOURCE_i, LSSOURCE_i, LGSOURCE_i; real ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, juncapwidth; `ifdef insideADMS // OPinfo ///////////////////////////////////////////////////////////////////////////// // // Variables for operating point info // ///////////////////////////////////////////////////////////////////////////// real id_op, is, ig, ib, P_D, facvsb, facvsb0, sig1k; real ctype `P(ask="yes" info="Flag for channel type" unit=""); real sdint `P(ask="yes" info="Flag for source-drain interchange" unit=""); real ise `P(ask="yes" info="Total source current" unit="A"); real ige `P(ask="yes" info="Total gate current" unit="A"); real ide `P(ask="yes" info="Total drain current" unit="A"); real ibe `P(ask="yes" info="Total bulk current" unit="A"); real ids `P(ask="yes" info="Drain current, excl. avalanche, tunnel, GISL, GIDL, and junction currents" unit="A"); real idb `P(ask="yes" info="Drain to bulk current" unit="A"); real isb `P(ask="yes" info="Source to bulk current" unit="A"); real igs `P(ask="yes" info="Gate-source tunneling current" unit="A"); real igd `P(ask="yes" info="Gate-drain tunneling current" unit="A"); real igb `P(ask="yes" info="Gate-bulk tunneling current" unit="A"); real igcs `P(ask="yes" info="Gate-channel tunneling current (source component)" unit="A"); real igcd `P(ask="yes" info="Gate-channel tunneling current (drain component)" unit="A"); real iavl `P(ask="yes" info="Substrate current due to weak avelanche" unit="A"); real igisl `P(ask="yes" info="Gate-induced source leakage current" unit="A"); real igidl `P(ask="yes" info="Gate-induced drain leakage current" unit="A"); real ijs `P(ask="yes" info="Total source junction current" unit="A"); real ijsbot `P(ask="yes" info="Source junction current (bottom component)" unit="A"); real ijsgat `P(ask="yes" info="Source junction current (gate-edge component)" unit="A"); real ijssti `P(ask="yes" info="Source junction current (STI-edge component)" unit="A"); real ijd `P(ask="yes" info="Total drain junction current" unit="A"); real ijdbot `P(ask="yes" info="Drain junction current (bottom component)" unit="A"); real ijdgat `P(ask="yes" info="Drain junction current (gate-edge component)" unit="A"); real ijdsti `P(ask="yes" info="Drain junction current (STI-edge component)" unit="A"); real vds `P(ask="yes" info="Drain-source voltage" unit="V"); real vgs `P(ask="yes" info="Gate-source voltage" unit="V"); real vsb `P(ask="yes" info="Source-bulk voltage" unit="V"); real vto `P(ask="yes" info="Zero-bias threshold voltage" unit="V"); real vts `P(ask="yes" info="Threshold voltage including back bias effects" unit="V"); real vth `P(ask="yes" info="Threshold voltage including back bias and drain bias effects" unit="V"); real vgt `P(ask="yes" info="Effective gate drive voltage including back bias and drain bias effects" unit="V"); real vdss `P(ask="yes" info="Drain saturation voltage at actual bias" unit="V"); real vsat `P(ask="yes" info="Saturation limit" unit="V"); real gm `P(ask="yes" info="Transconductance" unit="1/Ohm"); real gmb `P(ask="yes" info="Substrate transconductance" unit="1/Ohm"); real gds `P(ask="yes" info="Output conductance" unit="1/Ohm"); real gjs `P(ask="yes" info="Source junction conductance" unit="1/Ohm"); real gjd `P(ask="yes" info="Drain junction conductance" unit="1/Ohm"); real cdd `P(ask="yes" info="Drain capacitance" unit="F"); real cdg `P(ask="yes" info="Drain-gate capacitance" unit="F"); real cds `P(ask="yes" info="Drain-source capacitance" unit="F"); real cdb `P(ask="yes" info="Drain-bulk capacitance" unit="F"); real cgd `P(ask="yes" info="Gate-drain capacitance" unit="F"); real cgg `P(ask="yes" info="Gate capacitance" unit="F"); real cgs `P(ask="yes" info="Gate-source capacitance" unit="F"); real cgb `P(ask="yes" info="Gate-bulk capacitance" unit="F"); real csd `P(ask="yes" info="Source-drain capacitance" unit="F"); real csg `P(ask="yes" info="Source-gate capacitance" unit="F"); real css `P(ask="yes" info="Source capacitance" unit="F"); real csb `P(ask="yes" info="Source-bulk capacitance" unit="F"); real cbd `P(ask="yes" info="Bulk-drain capacitance" unit="F"); real cbg `P(ask="yes" info="Bulk-gate capacitance" unit="F"); real cbs `P(ask="yes" info="Bulk-source capacitance" unit="F"); real cbb `P(ask="yes" info="Bulk capacitance" unit="F"); real cgsol `P(ask="yes" info="Total gate-source overlap capacitance" unit="F"); real cgdol `P(ask="yes" info="Total gate-drain overlap capacitance" unit="F"); real cjs `P(ask="yes" info="Total source junction capacitance" unit="F"); real cjsbot `P(ask="yes" info="Source junction capacitance (bottom component)" unit="F"); real cjsgat `P(ask="yes" info="Source junction capacitance (gate-edge component)" unit="F"); real cjssti `P(ask="yes" info="Source junction capacitance (STI-edge component)" unit="F"); real cjd `P(ask="yes" info="Total drain junction capacitance" unit="F"); real cjdbot `P(ask="yes" info="Drain junction capacitance (bottom component)" unit="F"); real cjdgat `P(ask="yes" info="Drain junction capacitance (gate-edge component)" unit="F"); real cjdsti `P(ask="yes" info="Drain junction capacitance (STI-edge component)" unit="F"); real weff `P(ask="yes" info="Effective channel width for geometrical models" unit="m"); real leff `P(ask="yes" info="Effective channel length for geometrical models" unit="m"); real u `P(ask="yes" info="Transistor gain" unit=""); real rout `P(ask="yes" info="Small-signal output resistance" unit="Ohm"); real vearly `P(ask="yes" info="Equivalent Early voltage" unit="V"); real beff `P(ask="yes" info="Gain factor" unit="A/V^2"); real fug `P(ask="yes" info="Unity gain frequency at actual bias" unit="Hz"); real sfl `P(ask="yes" info="Flicker noise current density at 1 Hz" unit="A/Hz"); real sqrtsff `P(ask="yes" info="Input-referred RMS white noise voltage density at 1 kHz" unit="V/sqrt(Hz)"); real sqrtsfw `P(ask="yes" info="Input-referred RMS white noise voltage density" unit="V/sqrt(Hz)"); real sid `P(ask="yes" info="White noise current density" unit="A^2/Hz"); real sig `P(ask="yes" info="Induced gate noise current density at 1 Hz" unit="A^2/Hz"); real cigid `P(ask="yes" info="Imaginary part of correlation coefficient between Sig and Sid" unit=""); real fknee `P(ask="yes" info="Cross-over frequency above which white noise is dominant" unit="Hz"); real sigs `P(ask="yes" info="Gate-source current noise spectral density" unit="A^2/Hz"); real sigd `P(ask="yes" info="Gate-drain current noise spectral density" unit="A^2/Hz"); real siavl `P(ask="yes" info="Impact ionization current noise spectral density" unit="A^2/Hz"); real ssi `P(ask="yes" info="Total source junction current noise spectral density" unit="A^2/Hz"); real sdi `P(ask="yes" info="Total drain junction current noise specral density" unit="A^2/Hz"); `endif // OPinfo ///////////////////////////////////////////////////////////////////////////// // // Analog block with all calculations and contribs // ///////////////////////////////////////////////////////////////////////////// analog begin begin : initial_model // Code independent of bias or instance parameters // This block needs to be evaluated only once `ifdef LocalModel // Do nothing `else // LocalModel `ifdef Binning // There are no binning parameters that need clipping `else // Binning // Clipping of global model parameters TOX_i = `CLIP_LOW(TOXO, 1e-10); NSUBO_i = `CLIP_LOW(NSUBO, 1e20); WSEG_i = `CLIP_LOW(WSEG, 1e-10); NPCK_i = `CLIP_LOW(NPCK, 0.0); WSEGP_i = `CLIP_LOW(WSEGP, 1e-10); LPCK_i = `CLIP_LOW(LPCK, 1e-10); TOXOV_i = `CLIP_LOW(TOXOVO, 1e-10); LOV_i = `CLIP_LOW(LOV, 0.0); LP1_i = `CLIP_LOW(LP1, 1e-10); LP2_i = `CLIP_LOW(LP2, 1e-10); WBET_i = `CLIP_LOW(WBET, 1e-10); AXL_i = `CLIP_LOW(AXL, 0.0); ALP1L2_i = `CLIP_LOW(ALP1L2, 0.0); ALP2L2_i = `CLIP_LOW(ALP2L2, 0.0); `endif // Binning KVSAT_i = `CLIP_BOTH(KVSAT, -1.0, 1.0); LLODKUO_i = `CLIP_LOW(LLODKUO, 0.0); WLODKUO_i = `CLIP_LOW(WLODKUO, 0.0); LLODVTH_i = `CLIP_LOW(LLODVTH, 0.0); WLODVTH_i = `CLIP_LOW(WLODVTH, 0.0); LODETAO_i = `CLIP_LOW(LODETAO, 0.0); `endif // LocalModel // 4.1 Internal parameters (including temperature scaling) // (only internal parameters independent on instance parameters // are calculated in this section) if (TYPE >= 0) begin CHNL_TYPE = `NMOS; end else begin CHNL_TYPE = `PMOS; end // Transistor temperature TR_i = `CLIP_LOW(TR, -273); TKR = `KELVINCONVERSION + TR_i; TKD = $temperature + DTA; TKD_sq = TKD * TKD; dT = TKD - TKR; rT = TKD / TKR; rTn = TKR / TKD; phit = TKD * `KBOL / `QELE; inv_phit = 1.0 / phit; // Local process parameters Eg = 1.179 - 9.025e-5 * TKD - 3.05e-7 * TKD_sq; phibFac = (1.045 + 4.5e-4 * TKD) * (0.523 + 1.4e-3 * TKD - 1.48e-6 * TKD_sq) * TKD_sq / 9.0E4; phibFac = `MAX(phibFac, 1.0E-3); `ifdef NQSmodel // Round SWNQS to nearest allowed value if (SWNQS < 0.5) begin SWNQS_i = 0.0; end else begin if (SWNQS < 1.5) begin SWNQS_i = 1.0; end else begin if (SWNQS < 2.5) begin SWNQS_i = 2.0; end else begin if (SWNQS < 4.0) begin SWNQS_i = 3.0; end else begin if (SWNQS < 7.0) begin SWNQS_i = 5.0; end else begin SWNQS_i = 9.0; end end end end end inorm = 1.0e-12; r_nqs = 1.0e+3; vnorm = 10.0; vnorm_inv = 1.0 / vnorm; nt0 = 4 * `KBOL * TKD; // parameter for white noise of parasitic resistances `endif // NQSmodel // JUNCAP2 `include "JUNCAP200_InitModel.include" end // initial_model begin : initial_instance // Code independent of bias, but dependent on instance parameters, // (including code dependent on parameters which could IN PRINCIPLE be scaled) // This block needs to be evaluated only once for each instance `ifdef LocalModel juncapwidth= JW; `else // LocalModel // Clipping of the instance parameters SAREF_i = `CLIP_LOW(SAREF, 1e-9); SBREF_i = `CLIP_LOW(SBREF, 1e-9); L_i = `CLIP_LOW(L, 1e-9); W_i = `CLIP_LOW(W, 1e-9); SA_i = SA; SB_i = SB; /////////////////////////////////////////// // GEOMETRICAL PARAMETERSCALING /////////////////////////////////////////// // 3.2 Transistor geometry LEN = 1e-6; WEN = 1e-6; iL = LEN / L_i; iW = WEN / W_i; `ifdef Binning delLPS = LVARO * (1.0 + LVARL * iL); delWOD = WVARO * (1.0 + WVARW * iW); `else // Binning delLPS = LVARO * (1.0 + LVARL * iL) * (1.0 + LVARW * iW); delWOD = WVARO * (1.0 + WVARL * iL) * (1.0 + WVARW * iW); `endif // Binning LE = `CLIP_LOW(L_i + delLPS - 2.0 * LAP, 1e-9); WE = `CLIP_LOW(W_i + delWOD - 2.0 * WOT, 1e-9); LEcv = `CLIP_LOW(L_i + delLPS - 2.0 * LAP + DLQ, 1e-9); WEcv = `CLIP_LOW(W_i + delWOD - 2.0 * WOT + DWQ, 1e-9); Lcv = `CLIP_LOW(L_i + delLPS + DLQ, 1e-9); Wcv = `CLIP_LOW(W_i + delWOD + DWQ, 1e-9); iLE = LEN / LE; iWE = WEN / WE; juncapwidth= WE; `ifdef Binning // 3.4 Geometry scaling with binning scaling rules `include "PSP102_binning.include" `else // Binning // 3.3 Geometry scaling with physical scaling rules // Process parameters VFB = VFBO * (1.0 + VFBL * iLE) * (1.0 + VFBW * iWE) * (1.0 + VFBLW * iLE * iWE); STVFB = STVFBO * (1.0 + STVFBL * iLE) * (1.0 + STVFBW * iWE) * (1.0 + STVFBLW * iLE * iWE); TOX = TOXO; NSUB0e = NSUBO_i * `MAX(( 1.0 + NSUBW * iWE * ln( 1.0 + WE / WSEG_i )), 1.0E-03); NPCKe = NPCK_i * `MAX(( 1.0 + NPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0E-03); LPCKe = LPCK_i * `MAX(( 1.0 + LPCKW * iWE * ln( 1.0 + WE / WSEGP_i )), 1.0E-03); if (LE > (2 * LPCKe)) begin AA = 7.5e10; BB = sqrt(NSUB0e + 0.5 * NPCKe) - sqrt(NSUB0e); NSUB = sqrt(NSUB0e) + AA * ln(1 + 2 * LPCKe / LE * (exp(BB / AA) - 1)); NSUB = NSUB * NSUB; end else begin if (LE >= LPCKe) begin NSUB = NSUB0e + NPCKe * LPCKe / LE; end else begin // LE < LPCK NSUB = NSUB0e + NPCKe * (2 - LE / LPCKe); end end NEFF = NSUB * (1 - FOL1 * iLE - FOL2 * iLE * iLE); VNSUB = VNSUBO; NSLP = NSLPO; DNSUB = DNSUBO; DPHIB = (DPHIBO + DPHIBL * pow(iLE, DPHIBLEXP)) * (1.0 + DPHIBW * iWE) * (1.0 + DPHIBLW * iLE * iWE); NP = NPO * `MAX(1e-6, (1.0 + NPL * iLE)); CT = (CTO + CTL * pow(iLE, CTLEXP)) * (1.0 + CTW * iWE) * (1.0 + CTLW * iLE * iWE); TOXOV = TOXOVO; NOV = NOVO; // DIBL parameters CF = CFL * pow(iLE, CFLEXP) * (1.0 + CFW * iWE); CFB = CFBO; // Mobility parameters FBET1e = FBET1 * (1.0 + FBET1W * iWE); LP1e = LP1_i * `MAX(1.0 + LP1W * iWE, 1.0E-03); GPE = 1.0 + FBET1e * LP1e / LE * (1.0 - exp(-LE / LP1e)) + FBET2 * LP2_i / LE * (1.0 - exp(-LE / LP2_i)); GPE = `MAX(GPE, 1e-15); GWE = 1.0 + BETW1 * iWE + BETW2 * iWE * ln(1.0 + WE / WBET_i); BETN = UO * WE / (GPE * LE) * GWE; STBET = STBETO * (1.0 + STBETL * iLE) * (1.0 + STBETW * iWE) * (1.0 + STBETLW * iLE * iWE); MUE = MUEO * (1.0 + MUEW * iWE); STMUE = STMUEO; THEMU = THEMUO; STTHEMU = STTHEMUO; CS = (CSO + CSL * pow(iLE, CSLEXP)) * (1.0 + CSW * iWE) * (1.0 + CSLW * iLE * iWE); STCS = STCSO; XCOR = XCORO * (1.0 + XCORL * iLE) * (1.0 + XCORW * iWE) * (1.0 + XCORLW * iLE * iWE); STXCOR = STXCORO; FETA = FETAO; // Series resistance RS = RSW1 * iWE * (1.0 + RSW2 * iWE); STRS = STRSO; RSB = RSBO; RSG = RSGO; // Velocity saturation THESAT = (THESATO + THESATL* GWE / GPE * pow(iLE, THESATLEXP)) * (1.0 + THESATW * iWE) * (1.0 + THESATLW * iLE * iWE); STTHESAT = STTHESATO * (1.0 + STTHESATL * iLE) * (1.0 + STTHESATW * iWE) * (1.0 + STTHESATLW * iLE * iWE); THESATB = THESATBO; THESATG = THESATGO; // Saturation voltage AX = AXO / (1.0 + AXL_i * iLE); // Channel length modulation ALP = ALPL * pow(iLE, ALPLEXP) * (1.0 + ALPW * iWE); tmpx = pow(iLE, ALP1LEXP); ALP1 = ALP1L1 * tmpx * (1.0 + ALP1W * iWE) / (1.0 + ALP1L2_i * iLE * tmpx); tmpx = pow(iLE, ALP2LEXP); ALP2 = ALP2L1 * tmpx * (1.0 + ALP2W * iWE) / (1.0 + ALP2L2_i * iLE * tmpx); VP = VPO; // Impact ionization A1 = A1O * (1.0 + A1L * iLE) * (1.0 + A1W * iWE); A2 = A2O; STA2 = STA2O; A3 = A3O * (1.0 + A3L * iLE) * (1.0 + A3W * iWE); A4 = A4O * (1.0 + A4L * iLE) * (1.0 + A4W * iWE); // Gate current GCO = GCOO; IGINV = IGINVLW / (iWE * iLE); IGOV = IGOVW * LOV_i / (LEN * iWE); STIG = STIGO; GC2 = GC2O; GC3 = GC3O; CHIB = CHIBO; // GIDL AGIDL = AGIDLW * LOV_i / (LEN * iWE); BGIDL = BGIDLO; STBGIDL = STBGIDLO; CGIDL = CGIDLO; // Charge model parameters COX = `EPSOX * WEcv * LEcv / TOX_i; CGOV = `EPSOX * WEcv * LOV_i / TOXOV_i; CGBOV = CGBOVL * Lcv / LEN; CFR = CFRW * Wcv / WEN; FNT = FNTO; // Noise model parameters NFA = iWE * iLE * NFALW; NFB = iWE * iLE * NFBLW; NFC = iWE * iLE * NFCLW; `endif // Binning `ifdef NQSmodel MUNQS = MUNQSO; RG = RGO; RWELL = RWELLO; RBULK = RBULKO; RJUNS = RJUNSO; RJUND = RJUNDO; `endif // NQSModel /////////////////////////////////////////// // STRESSMODEL /////////////////////////////////////////// // 3.5 Stress equations if ((SA_i > 0) && (SB_i > 0)) begin // Auxiliary variables Invsa = 1.0 / (SA_i + 0.5 * L_i); Invsb = 1.0 / (SB_i + 0.5 * L_i); Invsaref = 1.0 / (SAREF_i + 0.5 * L_i); Invsbref = 1.0 / (SBREF_i + 0.5 * L_i); Lx = `MAX(L_i + delLPS, 1e-9); Wx = `MAX(W_i + delWOD + WLOD, 1e-9); templ = 1.0 / pow(Lx, LLODKUO_i); tempw = 1.0 / pow(Wx, WLODKUO_i); Kstressu0 = (1.0 + LKUO * templ + WKUO * tempw + PKUO * templ * tempw) * (1.0 + TKUO * (rT - 1.0)); rhobeta = KUO * (Invsa + Invsb) / Kstressu0; rhobetaref = KUO * (Invsaref + Invsbref) / Kstressu0; templ = 1.0 / pow(Lx, LLODVTH_i); tempw = 1.0 / pow(Wx, WLODVTH_i); Kstressvth0= 1.0 + LKVTHO * templ + WKVTHO * tempw + PKVTHO * templ * tempw; temp0 = Invsa + Invsb - Invsaref - Invsbref; // Parameter adaptations BETN = BETN * (1.0 + rhobeta) / (1.0 + rhobetaref); THESAT = THESAT * (1.0 + rhobeta) * (1.0 + KVSAT_i * rhobetaref) / ((1.0 + rhobetaref) * (1.0 + KVSAT_i * rhobeta)); VFB = VFB + KVTHO * temp0 / Kstressvth0; CF = CF + STETAO * temp0 / pow(Kstressvth0, LODETAO_i); end /////////////////////////////////////////// // END OF SCALINGRULES AND STRESSMODEL /////////////////////////////////////////// `endif // LocalModel // 4.1 Internal parameters (including temperature scaling) // Clipping of the local model parameters VFB_i = VFB; STVFB_i = STVFB; TOX_i = `CLIP_LOW(TOX, 1e-10); NEFF_i = `CLIP_BOTH(NEFF, 1e20, 1e26); VNSUB_i = VNSUB; NSLP_i = `CLIP_LOW(NSLP, 1e-3); DNSUB_i = `CLIP_BOTH(DNSUB, 0.0, 1.0); DPHIB_i = DPHIB; NP_i = `CLIP_LOW(NP, 0.0); QMC_i = `CLIP_LOW(QMC, 0.0); CT_i = `CLIP_LOW(CT, 0.0); TOXOV_i = `CLIP_LOW(TOXOV, 1e-10); NOV_i = `CLIP_BOTH(NOV, 1e20, 1e27); CF_i = `CLIP_LOW(CF, 0.0); CFB_i = `CLIP_BOTH(CFB, 0.0, 1.0); BET_i = `CLIP_LOW(BETN, 0.0); STBET_i = STBET; MUE_i = `CLIP_LOW(MUE, 0.0); STMUE_i = STMUE; THEMU_i = `CLIP_LOW(THEMU, 0.0); STTHEMU_i = STTHEMU; CS_i = `CLIP_LOW(CS, 0.0); STCS_i = STCS; XCOR_i = `CLIP_LOW(XCOR, 0.0); STXCOR_i = STXCOR; FETA_i = `CLIP_LOW(FETA, 0.0); RS_i = `CLIP_LOW(RS, 0.0); STRS_i = STRS; RSB_i = `CLIP_BOTH(RSB, -0.5, 1.0); RSG_i = `CLIP_LOW(RSG, -0.5); THESAT_i = `CLIP_LOW(THESAT, 0.0); STTHESAT_i = STTHESAT; THESATB_i = `CLIP_BOTH(THESATB, -0.5, 1.0); THESATG_i = `CLIP_LOW(THESATG, -0.5); AX_i = `CLIP_LOW(AX, 2.0); ALP_i = `CLIP_LOW(ALP, 0.0); ALP1_i = `CLIP_LOW(ALP1, 0.0); ALP2_i = `CLIP_LOW(ALP2, 0.0); VP_i = `CLIP_LOW(VP, 1.0e-10); A1_i = `CLIP_LOW(A1, 0.0); A2_i = `CLIP_LOW(A2, 0.0); STA2_i = STA2; A3_i = `CLIP_LOW(A3, 0.0); A4_i = `CLIP_LOW(A4, 0.0); GCO_i = `CLIP_BOTH(GCO, -10.0, 10.0); IGINV_i = `CLIP_LOW(IGINV, 0.0); IGOV_i = `CLIP_LOW(IGOV, 0.0); STIG_i = STIG; GC2_i = `CLIP_BOTH(GC2, 0.0, 10.0); GC3_i = `CLIP_BOTH(GC3, -10.0, 10.0); CHIB_i = `CLIP_LOW(CHIB, 1.0); AGIDL_i = `CLIP_LOW(AGIDL, 0.0); BGIDL_i = `CLIP_LOW(BGIDL, 0.0); STBGIDL_i = STBGIDL; CGIDL_i = CGIDL; COX_i = `CLIP_LOW(COX, 0.0); CGOV_i = `CLIP_LOW(CGOV, 0.0); CGBOV_i = `CLIP_LOW(CGBOV, 0.0); CFR_i = `CLIP_LOW(CFR, 0.0); FNT_i = `CLIP_LOW(FNT, 0.0); NFA_i = `CLIP_LOW(NFA, 0.0); NFB_i = `CLIP_LOW(NFB, 0.0); NFC_i = `CLIP_LOW(NFC, 0.0); MULT_i = `CLIP_LOW(MULT, 0.0); // Local process parameters phit1 = phit * (1.0 + CT_i * rTn); inv_phit1 = 1.0 / phit1; VFB_i = VFB_i + STVFB_i * dT; phib = Eg + DPHIB_i + 2.0 * phit * ln(NEFF_i * pow(phibFac, -0.75) * 4.0e-26); phib = `MAX(phib, 5.0E-2); CoxPrime = `EPSOX / TOX_i; tox_sq = TOX_i * TOX_i; G_0 = sqrt(2.0 * `QELE * NEFF_i * `EPSSI * inv_phit) / CoxPrime; // Poly-silicon depletion kp = 0.0; if (NP_i > 0.0) begin arg2max = 8.0e7 / tox_sq; np = `MAX(NP_i, arg2max); np = `MAX(3.0e25, np); kp = 2.0 * CoxPrime * CoxPrime * phit / (`QELE * np * `EPSSI); end // QM corrections qlim2 = 100.0 * phit * phit; qq = 0.0; if (QMC_i > 0.0) begin qq = 0.4 * `QMN * QMC_i * pow(CoxPrime, `twoThirds); if (CHNL_TYPE==`PMOS) begin qq = `QMP / `QMN * qq; end qb0 = sqrt(phit * G_0 * G_0 * phib); dphibq = 0.75 * qq * pow(qb0, `twoThirds); phib = phib + dphibq; G_0 = G_0 * (1.0 + 2.0 * `twoThirds * dphibq / qb0); end sqrt_phib = sqrt(phib); phix = 0.95 * phib; aphi = 0.0025 * phib * phib; bphi = aphi; phix2 = 0.5 * sqrt(bphi); phix1 = `MINA(phix - phix2, 0, aphi); // Gate overlap CoxovPrime = `EPSOX / TOXOV_i; GOV = sqrt(2.0 * `QELE * NOV_i * `EPSSI * inv_phit) / CoxovPrime; GOV2 = GOV * GOV; xi_ov = 1.0 + GOV * `invSqrt2; inv_xi_ov = 1.0 / xi_ov; x_mrg_ov = 1.0e-5 * xi_ov; // Mobility parameters tf_bet = pow(rTn, STBET_i); BET_i = BET_i * CoxPrime * tf_bet; THEMU_i = THEMU_i * pow(rTn, STTHEMU_i); tf_mue = pow(rTn, STMUE_i); MUE_i = MUE_i * tf_mue; tf_cs = pow(rTn, STCS_i); CS_i = CS_i * tf_cs; tf_xcor = pow(rTn, STXCOR_i); XCOR_i = XCOR_i * tf_xcor; E_eff0 = 1.0e-8 * CoxPrime / `EPSSI; eta_mu = 0.5 * FETA_i; if (CHNL_TYPE == `PMOS) begin eta_mu = `oneThird * FETA_i; end // Series resistance tf_ther = pow(rTn, STRS_i); RS_i = RS_i * tf_ther; THER_i = 2 * BET_i * RS_i; // Velocity saturation tf_thesat = pow(rTn, STTHESAT_i); THESAT_i = THESAT_i * tf_thesat; Vdsat_lim = 3.912023005 * phit1; inv_AX = 1.0 / AX_i; inv_VP = 1.0 / VP_i; // Impact ionization A2_i = A2_i * pow(rT, STA2_i); // Gate current tf_ig = pow(rT, STIG_i); IGINV_i = IGINV_i * tf_ig; IGOV_i = IGOV_i * tf_ig; inv_CHIB = 1.0 / CHIB_i; tempM = 4.0 * `oneThird * sqrt(2 * `QELE * `MELE * CHIB_i) / `HBAR; BCH = tempM * TOX_i; BOV = tempM * TOXOV_i; GCQ = 0; if (GC3_i < 0) begin GCQ = -0.495 * GC2_i / GC3_i; end alpha_b = 0.5 * (phib + Eg); Dch = GCO_i * phit1; Dov = GCO_i * phit; // GIDL AGIDL_i = AGIDL_i * 4e-18 / (TOXOV_i * TOXOV_i); tempM = `MAX(1.0 + STBGIDL_i * dT, 0); BGIDL_i = BGIDL_i * tempM * TOXOV_i * 5e8; // Noise nt = FNT_i * 4 * `KBOL * TKD; Cox_over_q = CoxPrime / `QELE; Sfl_prefac = phit * phit * BET_i / Cox_over_q; // Additional internal parameters x1 = 1.25; inv_xg1 = 1.0 / (x1 + GOV * 7.324648775608221e-1); // = 1.0/(x1+GOV*sqrt(exp(-x1)+x1-1)); `ifdef NQSmodel // NQS parameters and variables MUNQS_i = `CLIP_LOW(MUNQS, 0.0); RG_i = `CLIP_LOW(RG, 1.0e-6); RBULK_i = `CLIP_LOW(RBULK, 1.0e-6); RJUNS_i = `CLIP_LOW(RJUNS, 1.0e-6); RJUND_i = `CLIP_LOW(RJUND, 1.0e-6); RWELL_i = `CLIP_LOW(RWELL, 1.0e-6); // Conductance of parasitic resistance ggate = MULT_i / RG_i; gbulk = MULT_i / RBULK_i; gjuns = MULT_i / RJUNS_i; gjund = MULT_i / RJUND_i; gwell = MULT_i / RWELL_i; `endif // NQSmodel // JUNCAP2 vbimins = 0.0; vfmins = 0.0; vchs = 0.0; vbbtlims = 0.0; vbimind = 0.0; vfmind = 0.0; vchd = 0.0; vbbtlimd = 0.0; vj = 0.0; idmult = 0.0; vjsrh = 0.0; zinv = 0.0; wdep = 0.0; wsrh = 0.0; asrh = 0.0; vav = 0.0; vbi_minus_vjsrh = 0.0; if (SWJUNCAP == 0.0) begin ABSOURCE_i = 0.0; LSSOURCE_i = 0.0; LGSOURCE_i = 0.0; ABDRAIN_i = 0.0; LSDRAIN_i = 0.0; LGDRAIN_i = 0.0; VMAXS = 0.0; VMAXD = 0.0; end else begin if (SWJUNCAP == 2.0) begin ABSOURCE_i = `CLIP_LOW(AS, `AB_cliplow); LSSOURCE_i = `CLIP_LOW(PS, `LS_cliplow); LGSOURCE_i = juncapwidth; ABDRAIN_i = `CLIP_LOW(AD, `AB_cliplow); LSDRAIN_i = `CLIP_LOW(PD, `LS_cliplow); LGDRAIN_i = juncapwidth; end else begin if (SWJUNCAP == 3.0) begin ABSOURCE_i = `CLIP_LOW(AS, `AB_cliplow); ABDRAIN_i = `CLIP_LOW(AD, `AB_cliplow); LSSOURCE_i = `CLIP_LOW(PS - juncapwidth, `LS_cliplow); LGSOURCE_i = juncapwidth; LSDRAIN_i = `CLIP_LOW(PD - juncapwidth, `LS_cliplow); LGDRAIN_i = juncapwidth; end else begin ABSOURCE_i = `CLIP_LOW(ABSOURCE, `AB_cliplow); LSSOURCE_i = `CLIP_LOW(LSSOURCE, `LS_cliplow); LGSOURCE_i = `CLIP_LOW(LGSOURCE, `LG_cliplow); ABDRAIN_i = `CLIP_LOW(ABDRAIN, `AB_cliplow); LSDRAIN_i = `CLIP_LOW(LSDRAIN, `LS_cliplow); LGDRAIN_i = `CLIP_LOW(LGDRAIN, `LG_cliplow); end end `JuncapInitInstance(ABSOURCE_i, LSSOURCE_i, LGSOURCE_i, VMAXS, vbimins, vchs, vfmins, vbbtlims) `JuncapInitInstance(ABDRAIN_i, LSDRAIN_i, LGDRAIN_i, VMAXD, vbimind, vchd, vfmind, vbbtlimd) end end // initial_instance ///////////////////////////////////////////////////////////////////////////// // // DC bias dependent quantities (calculations for current contribs) // ///////////////////////////////////////////////////////////////////////////// begin : evaluateStatic // Initialisation of some variables SP_S_x1 = 0.0; x_s = 0.0; sqm = 0.0; alpha = 0.0; eta_p = 1.0; xitsb = 0.0; rhob = 0.0; GdL = 1.0; FdL = 1.0; Gmob = 1.0; Gmob_dL = 1.0; Udse = 0.0; QCLM = 0.0; thesat1 = 0.0; Gvsat = 1.0; Gvsatinv = 1.0; xgm = 0.0; dps = 0.0; qim = 0.0; qim1 = 0.0; H = 1.0; xs_ov = 0.0; xd_ov = 0.0; Vovs = 0.0; Vovd = 0.0; Iimpact = 0.0; mavl = 0.0; `ifdef NQSmodel // Initialization of variables for NQS model pd = 1.0; ym = 0.0; Vrg = V(G ,GP); Vrjuns = V(BS,BI); Vrjund = V(BD,BI); Vrbulk = V(BP,BI); Vrwell = V(B ,BI); `endif // NQSmodel if (CHNL_TYPE == `NMOS) begin Vgs = V(`Gint, S); Vds = V(D, S); Vsb = V(S, `Bint); Vjuns = -V(S, `Bjs); Vjund = -V(D, `Bjd); end else begin Vgs = -V(`Gint, S); Vds = -V(D, S); Vsb = -V(S, `Bint); Vjuns = V(S, `Bjs); Vjund = V(D, `Bjd); end // Source-drain interchange sigVds = 1.0; if (Vds < 0.0) begin sigVds = -1.0; Vgs = Vgs - Vds; Vsb = Vsb + Vds; Vds = -Vds; end Vgd = Vgs - Vds; Vdb = Vds + Vsb; Vgb = Vgs + Vsb; xgs_ov = -Vgs * inv_phit; xgd_ov = -Vgd * inv_phit; // 4.2.1 Conditioning of terminal voltages temp = `MINA(Vdb, Vsb, bphi) + phix; Vsbstar = Vsb - `MINA(temp, 0, aphi) + phix1; Vdbstar = Vds + Vsbstar; Vgbstar = Vgs + Vsbstar; Vgb1 = Vgbstar - VFB_i; Vdsx = sqrt(Vds * Vds + 0.01) - 0.1; Vsbx = Vsbstar + 0.5 * (Vds - Vdsx); delVg = CF_i * (Vdsx * (1 + CFB_i * Vsbx)); // DIBL Vgb1 = Vgb1 + delVg; xg = Vgb1 * inv_phit1; // 4.2.2 Bias dependent body factor if (DNSUB_i > 0.0) begin Dnsub = DNSUB_i * `MAXA(0, Vgs + Vsb - VNSUB_i, NSLP_i); Gf = G_0 * sqrt(1.0 + Dnsub); end else begin Gf = G_0; end // 4.2.3 Surface potential at source side Gf2 = Gf * Gf; inv_Gf2 = 1.0 / Gf2; xi = 1.0 + Gf * `invSqrt2; inv_xi = 1.0 / xi; Ux = Vsbstar * inv_phit1; xn_s = phib * inv_phit1 + Ux; if (xn_s < `se) delta_ns = exp(-xn_s); else delta_ns = `ke / `P3(xn_s - `se); margin = 1e-5 * xi; `sp_s(x_s, xg, xn_s, delta_ns) x_d = x_s; x_m = x_s; x_ds = 0.0; // // Core PSP current calculation // if (xg <= 0.0) begin qis = 0.0; Ids = 0.0; xgm = xg - x_s; Voxm = xgm * phit1; qeff = Voxm; Vdsat = Vdsat_lim; end else begin // (xg > 0) delta_1s = 0.0; temp = 1.0 / (2.0 + x_s * x_s); xi0s = x_s * x_s * temp; xi1s = 4.0 * (x_s * temp * temp); xi2s = (8.0 * temp - 12.0 * xi0s) * temp * temp; if (x_s < `se05) begin delta_1s = exp(x_s); Es = 1.0 / delta_1s; delta_1s = delta_ns * delta_1s; end else if (x_s > (xn_s - `se05)) begin delta_1s = exp(x_s - xn_s); Es = delta_ns / delta_1s; end else begin delta_1s = `ke05 / `P3(xn_s - x_s - `se05); Es = `ke05 / `P3(x_s - `se05); end Ds = delta_1s - delta_ns * (x_s + 1.0 + xi0s); if (x_s < 1.0e-5) begin Ps = 0.5 * (x_s * x_s * (1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s)))); Ds = `oneSixth * (delta_ns * x_s * x_s * x_s * (1.0 + 1.75 * x_s)); temp = sqrt(1.0 - `oneThird * (x_s * (1.0 - 0.25 * x_s))); sqm = `invSqrt2 * (x_s * temp); alpha = 1.0 + Gf * `invSqrt2 * (1.0 - 0.5 * x_s + `oneSixth * (x_s * x_s)) / temp; end else begin Ps = x_s - 1.0 + Es; sqm = sqrt(Ps); alpha = 1.0 + 0.5 * (Gf * (1.0 - Es) / sqm); end Em = Es; Ed = Em; Dm = Ds; Dd = Dm; // 4.2.4 Drain saturation voltage Rxcor = (1.0 + 0.2 * XCOR_i * Vsbx) / (1.0 + XCOR_i * Vsbx); if ( Ds > `ke05) begin xgs = Gf * sqrt(Ps + Ds); qis = Gf2 * Ds * phit1 / (xgs + Gf * sqm); qbs = sqm * Gf * phit1; if (RSB_i < 0) begin rhob = 1.0 / (1.0 - RSB_i * Vsbx); end else begin rhob = 1.0 + RSB_i * Vsbx; end if (RSG_i < 0) begin temp = 1.0 - RSG_i * qis; end else begin temp = 1.0 / (1.0 + RSG_i * qis); end GR = THER_i * (rhob * temp * qis); Eeffm = E_eff0 * (qbs + eta_mu * qis); Mutmp = pow(Eeffm * MUE_i, THEMU_i) + CS_i * (Ps / (Ps + Ds + 1.0e-14)); Gmob = (1.0 + Mutmp + GR) * Rxcor; if (THESATB_i < 0) begin xitsb = 1.0 / (1.0 - THESATB_i * Vsbx); end else begin xitsb = 1.0 + THESATB_i * Vsbx; end temp2 = qis * xitsb; wsat = 100.0 * (temp2 / (100.0 + temp2)); if (THESATG_i < 0) begin temp = 1 / (1 - THESATG_i * wsat); end else begin temp = 1 + THESATG_i * wsat; end thesat1 = THESAT_i * (temp / Gmob); phi_inf = qis / alpha + phit1; ysat = thesat1 * phi_inf * `invSqrt2; if (CHNL_TYPE==`PMOS) begin ysat = ysat / sqrt(1.0 + ysat); end za = 2.0 / (1.0 + sqrt(1.0 + 4.0 * ysat)); temp1 = za * ysat; Phi_0 = phi_inf * za * (1.0 + 0.86 * (temp1 * (1.0 - temp1 * za) / (1.0 + 4.0 * (temp1 * temp1 * za)))); asat = xgs + 0.5 * Gf2; Phi_2 = 0.98 * (Gf2 * Ds * phit1 / (asat + sqrt(asat * asat - Gf2 * Ds * 0.98))); Phi_0_2 = Phi_0 + Phi_2; Phi0_Phi2 = 2.0 * (Phi_0 * Phi_2); Phi_sat = Phi0_Phi2 / (Phi_0_2 + sqrt(Phi_0_2 * Phi_0_2 - 1.98 * Phi0_Phi2)); Vdsat = Phi_sat - phit1 * ln(1.0 + Phi_sat * (Phi_sat - 2.0 * asat * phit1) * inv_Gf2 / (phit1 * phit1 * Ds)); end else begin Vdsat = Vdsat_lim; end temp = pow(Vds / Vdsat, AX_i); Vdse = Vds * pow(1.0 + temp, -inv_AX); // 4.2.5 Surface potential at drain side Udse = Vdse * inv_phit1; xn_d = xn_s + Udse; if (Udse < `se) begin k_ds = exp(-Udse); end else begin k_ds = `ke / `P3(Udse - `se); end delta_nd = delta_ns * k_ds; `sp_s_d(x_d, xg, xn_d, delta_nd) x_ds = x_d - x_s; // // Approximations for extremely small x_ds: capacitance calulation // if (x_ds < 1.0E-10) begin pC = 2.0 * (xg - x_s) + Gf2 * (1.0 - Es + delta_1s * k_ds - delta_nd * (1.0 + xi1s)); qC = Gf2 * (1.0 - k_ds) * Ds; temp = 2.0 - Gf2 * (Es + delta_1s * k_ds - delta_nd * xi2s); temp = pC * pC - 2.0 * (temp * qC); x_ds = 2.0 * (qC / (pC + sqrt(temp))); x_d = x_s + x_ds; end dps = x_ds * phit1; // deltaPsi xi0d = x_d * x_d / (2.0 + x_d * x_d); if (x_d < `se05) begin Ed = exp(-x_d); if (x_d < 1.0e-5) begin Dd = `oneSixth * delta_nd * x_d * x_d * x_d * (1.0 + 1.75 * x_d); end else begin Dd = delta_nd * (1.0 / Ed - x_d - 1.0 - xi0d); end end else begin if (x_d > (xn_d - `se05)) begin temp = exp(x_d - xn_d); Ed = delta_nd / temp; Dd = temp - delta_nd * (x_d + 1.0 + xi0d); end else begin Ed = `ke05 / `P3(x_d - `se05); temp = `ke05 / `P3(xn_d - x_d - `se05); Dd = temp - delta_nd * (x_d + 1.0 + xi0d); end end // 4.2.6 Mid-point surface potential x_m = 0.5 * (x_s + x_d); Em = 0.0; temp = Ed * Es; if (temp > 0.0) begin Em = sqrt(temp); end D_bar = 0.5 * (Ds + Dd); Dm = D_bar + 0.125 * (x_ds * x_ds * (Em - 2.0 * inv_Gf2)); if (x_m < 1.0e-5) begin Pm = 0.5 * (x_m * x_m * (1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m)))); xgm = Gf * sqrt(Dm + Pm); // 4.2.7 Polysilicon depletion if (kp > 0.0) begin eta_p = 1.0 / sqrt(1.0 + kp * xgm); end // (kp > 0.0) temp = sqrt(1.0 - `oneThird * (x_m * (1.0 - 0.25 * x_m))); sqm = `invSqrt2 * (x_m * temp); alpha = eta_p + `invSqrt2 * (Gf * (1.0 - 0.5 * x_m + `oneSixth * (x_m * x_m)) / temp); end else begin Pm = x_m - 1.0 + Em; xgm = Gf * sqrt(Dm + Pm); // 4.2.7 Polysilicon depletion if (kp > 0.0) begin d0 = 1.0 - Em + 2.0 * (xgm * inv_Gf2); eta_p = 1.0 / sqrt(1.0 + kp * xgm); temp = eta_p / (eta_p + 1.0); x_pm = kp * (temp * temp * Gf2 * Dm); p_pd = 2.0 * (xgm - x_pm) + Gf2 * (1.0 - Em + Dm); q_pd = x_pm * (x_pm - 2.0 * xgm); xi_pd = 1.0 - 0.5 * (Gf2 * (Em + Dm)); u_pd = q_pd * p_pd / (p_pd * p_pd - xi_pd * q_pd); x_m = x_m + u_pd; km = exp(u_pd); Em = Em / km; Dm = Dm * km; Pm = x_m - 1.0 + Em; xgm = Gf * sqrt(Dm + Pm); help = 1.0 - Em + 2.0 * (xgm * eta_p * inv_Gf2); x_ds = x_ds * km * (d0 + D_bar) / (help + km * D_bar); dps = x_ds * phit1; end // (kp > 0.0) sqm = sqrt(Pm); alpha = eta_p + 0.5 * (Gf * (1.0 - Em) / sqm); end // 4.2.8 Potential midpoint inversion charge qim = phit1 * (Gf2 * Dm / (xgm + Gf * sqm)); // 4.2.8 Potential midpoint inversion charge (continued) qim1 = qim + phit1 * alpha; qim1_1 = 1.0 / qim1; qbm = sqm * Gf * phit1; // Series resistance if (RSG_i < 0) begin temp = 1.0 - RSG_i * qim; end else begin temp = 1.0 / (1.0 + RSG_i * qim); end GR = THER_i * (rhob * temp * qim); // Mobility reduction qeff = qbm + eta_mu * qim; Eeffm = E_eff0 * qeff; Mutmp = pow(Eeffm * MUE_i, THEMU_i) + CS_i * (Pm / (Pm + Dm + 1.0e-14)); Gmob = (1.0 + Mutmp + GR) * Rxcor; // 4.2.9 Drain-source channel current // Channel length modulation r1 = qim * qim1_1; r2 = phit1 * (alpha * qim1_1); temp = ln((1.0 + (Vds - dps) * inv_VP) / (1.0 + (Vdse - dps) * inv_VP)); temp1 = ln(1.0 + Vdsx * inv_VP); dL = ALP_i * temp; GdL = 1.0 / (1.0 + dL + dL * dL); dL1 = dL + ALP1_i * (qim1_1 * r1 * temp) + ALP2_i * (qbm * r2 * r2 * temp1); FdL = (1.0 + dL1 + dL1 * dL1) * GdL; // Velocity saturation temp2 = qim * xitsb; wsat = 100.0 * (temp2 / (100.0 + temp2)); Gmob_dL = Gmob * GdL; if (THESATG_i < 0) begin temp = 1 / (1 - THESATG_i * wsat); end else begin temp = 1 + THESATG_i * wsat; end thesat1 = THESAT_i * (temp / Gmob_dL); zsat = thesat1 * thesat1 * dps * dps; if (CHNL_TYPE == `PMOS) begin zsat = zsat / (1.0 + thesat1 * dps); end Gvsat = 0.5 * (Gmob_dL * (1.0 + sqrt(1.0 + 2.0 * zsat))); Gvsatinv = 1.0 / Gvsat; // Drain-source current Ids = BET_i * (FdL * qim1 * dps * Gvsatinv); // 4.2.10 Variables for calculation of intrinsic charges and gate current Voxm = xgm * phit1; temp = Gmob_dL * Gvsatinv; alpha1 = alpha * (1.0 + 0.5 * (zsat * temp * temp)); H = temp * qim1 / alpha1; // 4.2.11 Impact-Ionization if (SWIMPACT != 0) begin delVsat = Vds - A3_i * dps; if (delVsat > 0) begin temp2 = A2_i * ((1.0 + A4_i * (sqrt(phib + Vsbstar) - sqrt_phib)) / delVsat); `expl_low(-temp2, temp) mavl = A1_i * (delVsat * temp); Iimpact = Ids * mavl; end end end // (xg > 0) // 4.2.12 Surface potential in gate overlap regions if (((SWIGATE != 0) && (IGOV_i > 0)) || ((SWGIDL != 0) && (AGIDL_i > 0)) || (CGOV_i > 0)) begin `sp_ov(xs_ov, xgs_ov) `sp_ov(xd_ov, xgd_ov) Vovs = -phit * (xgs_ov + xs_ov); Vovd = -phit * (xgd_ov + xd_ov); end // 4.2.13 Gate current Igsov = 0.0; Igdov = 0.0; Igc = 0.0; Igs = 0.0; Igd = 0.0; Igb = 0.0; Igcs = 0.0; Igcd = 0.0; if (SWIGATE != 0) begin if (IGOV_i > 0) begin // Gate-source overlap component of gate current arg2mina = Vovs + Dov; psi_t = `MINA(0.0, arg2mina, 0.01); zg = sqrt(Vovs * Vovs + 1.0e-6) * inv_CHIB; if (GC3_i < 0) begin zg = `MINA(zg, GCQ, 1.0e-6); end arg1 = (3.0 + xs_ov + psi_t * inv_phit); `expl(arg1, Dsi) arg1 = -Vgs * inv_phit; `expl(arg1, temp) Dgate = Dsi * temp; temp = BOV * (-1.5 + zg * (GC2_i + GC3_i * zg)); if (temp > 0) begin TP = `P3(temp); end else begin `expl_low(temp, TP) end Igsov = IGOV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate))); // Gate-drain overlap component of gate current arg2mina = Vovd + Dov; psi_t = `MINA(0.0, arg2mina, 0.01); zg = sqrt(Vovd * Vovd + 1.0e-6) * inv_CHIB; if (GC3_i < 0) begin zg = `MINA(zg, GCQ, 1.0e-6); end arg1 = (3.0 + xd_ov + psi_t * inv_phit); `expl(arg1, Dsi) arg1 = -Vgd * inv_phit; `expl(arg1, temp) Dgate = Dsi * temp; temp = BOV * (-1.5 + zg * (GC2_i + GC3_i * zg)); if (temp > 0) begin TP = `P3(temp); end else begin `expl_low(temp, TP) end Igdov = IGOV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate))); end // Gate-channel component of gate current if (IGINV_i > 0) begin if (xg <= 0.0) begin temp = pow(Vds / Vdsat_lim, AX_i); Udse = Vds * pow(1.0 + temp, -inv_AX) * inv_phit1; end `expl_low(x_ds-Udse, temp) Vm = Vsbstar + phit1 * (0.5 * x_ds - ln(0.5 * (1.0 + temp))); arg2mina = Voxm + Dch; psi_t = `MINA(0.0, arg2mina, 0.01); zg = sqrt(Voxm * Voxm + 1.0e-6) * inv_CHIB; if (GC3_i < 0) begin zg = `MINA(zg, GCQ, 1.0e-06); end arg1 = (x_m + (psi_t - alpha_b - Vm) * inv_phit1); `expl(arg1,Dsi) arg1 = -(Vgs + Vsbstar - Vm) * inv_phit1; `expl(arg1,temp) Dgate = Dsi * temp; temp = BCH * (-1.5 + zg * (GC2_i + GC3_i * zg)); if (temp > 0) begin TP = `P3(temp); end else begin `expl_low(temp, TP) end Igc0 = IGINV_i * (TP * ln((1.0 + Dsi) / (1.0 + Dgate))); // Source/drain partitioning of gate-channel current if ((xg <= 0) || ((GC2_i == 0) && (GC3_i == 0))) begin igc = 1.0; igcd_h = 0.5; end else begin temp = GC2_i + 2.0 * GC3_i * zg; u0 = CHIB_i / (temp * BCH); x = 0.5 * (dps / u0); u0_div_H = u0 / H; Bg = u0_div_H * (1.0 - u0_div_H) * 0.5; Ag = 0.5 - 3.0 * Bg; if (x < 1.0e-3) begin xsq = x * x; igc = 1.0 + xsq * (`oneSixth + u0_div_H * `oneThird + `oneSixth * (xsq * (0.05 + 0.2 * u0_div_H))); igcd_h = 0.5 * igc - `oneSixth * (x * (1.0 + xsq * (0.4 * (Bg + 0.25) + 0.0285714285714 * (xsq * (0.125 + Bg))))); end else begin inv_x = 1.0 / x; `expl(x, ex) inv_ex = 1.0 / ex; temp = ex - inv_ex; temp2 = ex + inv_ex; igc = 0.5 * ((1.0 - u0_div_H) * temp * inv_x + u0_div_H * temp2); igcd_h = 0.5 * (igc - temp * (Bg - Ag * inv_x * inv_x) - Ag * temp2 * inv_x); end end Sg = 0.5 * (1.0 + xg / sqrt(xg * xg + 1.0e-6)); Igc = Igc0 * igc * Sg; Igcd = Igc0 * igcd_h * Sg; Igcs = Igc - Igcd; Igb = Igc0 * igc * (1.0 - Sg); end // (IGINV >0) Igs = Igsov + Igcs; Igd = Igdov + Igcd; end // (SWIGATE != 0) // 4.2.14 GIDL/GISL current Igidl = 0.0; Igisl = 0.0; if ((SWGIDL != 0) && (AGIDL_i > 0)) begin // GIDL current computation if (Vovd < 0) begin Vtovd = sqrt(Vovd * Vovd + CGIDL_i * CGIDL_i * (Vdb * Vdb) + 1.0e-6); temp = -BGIDL_i / Vtovd; `expl_low(temp, temp2) Igidl = -AGIDL_i * (Vdb * Vovd * Vtovd * temp2); end // GISL current computation if (Vovs < 0) begin Vtovs = sqrt(Vovs * Vovs + CGIDL_i * CGIDL_i * (Vsb * Vsb) + 1.0e-6); temp = -BGIDL_i / Vtovs; `expl_low(temp, temp2) Igisl = -AGIDL_i * (Vsb * Vovs * Vtovs * temp2); end end // (SWGIDL != 0) end // evaluateStatic ///////////////////////////////////////////////////////////////////////////// // // AC bias dependent quantities (calculations for charge contribs) // ///////////////////////////////////////////////////////////////////////////// begin : evaluateDynamic // 4.2.16 Quantum mechanical corrections COX_qm = COX_i; if (qq > 0.0) begin COX_qm = COX_i / (1.0 + qq * pow(qeff * qeff + qlim2, -1.0 * `oneSixth)); end // 4.2.17 Intrinsic charge model if (xg <= 0.0) begin QG = Voxm; QI = 0.0; QD = 0.0; QB = QG; end else begin Fj = 0.5 * (dps / H); Fj2 = Fj * Fj; QCLM = (1.0 - GdL) * (qim - 0.5 * (alpha * dps)); QG = Voxm + 0.5 * (eta_p * dps * (Fj * GdL * `oneThird - 1.0 + GdL)); temp = alpha * dps * `oneSixth; QI = GdL * (qim + temp * Fj) + QCLM; QD = 0.5 * (GdL * GdL * (qim - temp * (1.0 - Fj - 0.2 * Fj2)) + QCLM * (1.0 + GdL)); QB = QG - QI; end Qg = QG * COX_qm; Qd = -QD * COX_qm; Qb = -QB * COX_qm; // 4.2.18 Extrinsic charge model Qgs_ov = CGOV_i * Vovs; Qgd_ov = CGOV_i * Vovd; Qgb_ov = CGBOV_i * Vgb; // Outer fringe charge Qfgs = CFR_i * Vgs; Qfgd = CFR_i * Vgd; `ifdef NQSmodel // Variables for NQS model Gp = 0.0; Gp2 = 0.0; a_factrp = 0.0; marginp = 0.0; if (SWNQS_i != 0) begin if (xg <= 0.0) begin ym = 0.5; pd = 1.0; Gp = Gf; end else begin ym = 0.5 * ( 1.0 + 0.25 * (dps / H)); pd = xgm / (xg - x_m); Gp = Gf / pd; end Gp2 = Gp * Gp; a_factrp = 1.0 + Gp * `invSqrt2; marginp = 1e-5 * a_factrp; end `endif // NQSmodel end // evaluateDynamic ///////////////////////////////////////////////////////////////////////////// // // JUNCAP2 contribs // ///////////////////////////////////////////////////////////////////////////// begin : evaluateStaticDynamic // Source side VAK = Vjuns; VMAX = VMAXS; vbimin = vbimins; vfmin = vfmins; vch = vchs; vbbtlim = vbbtlims; `juncapcommon(ABSOURCE_i,LSSOURCE_i,LGSOURCE_i,isjunbot,qsjunbot,isjunsti,qsjunsti,isjungat,qsjungat) // Drain side VAK = Vjund; VMAX = VMAXD; vbimin = vbimind; vfmin = vfmind; vch = vchd; vbbtlim = vbbtlimd; `juncapcommon(ABDRAIN_i,LSDRAIN_i,LGDRAIN_i,idjunbot,qdjunbot,idjunsti,qdjunsti,idjungat,qdjungat) `ifdef NQSmodel // Set initial conditions for NQS model `include "PSP102_InitNQS.include" `endif // NQSmodel end // evaluateStaticDynamic ///////////////////////////////////////////////////////////////////////////// // // Current contribs // ///////////////////////////////////////////////////////////////////////////// begin : loadStatic // 4.2.15 Total terminal currents // Intrinsic MOSFET current Idse = MULT_i * Ids; // Gate (tunneling) current components Igbe = MULT_i * Igb; Igse = MULT_i * Igs; Igde = MULT_i * Igd; // GIDL/GISL current Igidle = MULT_i * Igidl; Igisle = MULT_i * Igisl; // Impact ionization current Iimpacte = MULT_i * Iimpact; // JUNCAP2 isjun = MULT_i * (ABSOURCE_i * isjunbot + LSSOURCE_i * isjunsti + LGSOURCE_i * isjungat); idjun = MULT_i * (ABDRAIN_i * idjunbot + LSDRAIN_i * idjunsti + LGDRAIN_i * idjungat); // Convert back for NMOS-PMOS and Source-Drain interchange if (sigVds > 0) begin I(D, `Bint) <+ CHNL_TYPE * (Iimpacte + Igidle); I(D, S) <+ CHNL_TYPE * Idse; I(`Gint, S) <+ CHNL_TYPE * Igse; I(`Gint, D) <+ CHNL_TYPE * Igde; I(S, `Bint) <+ CHNL_TYPE * Igisle; end else begin I(S, `Bint) <+ CHNL_TYPE * (Iimpacte + Igidle); I(S, D) <+ CHNL_TYPE * Idse; I(`Gint, D) <+ CHNL_TYPE * Igse; I(`Gint, S) <+ CHNL_TYPE * Igde; I(D, `Bint) <+ CHNL_TYPE * Igisle; end I(`Gint, `Bint) <+ CHNL_TYPE * Igbe; I(`Bjs, S) <+ CHNL_TYPE * isjun; I(`Bjd, D) <+ CHNL_TYPE * idjun; `ifdef NQSmodel I(G, GP) <+ Vrg * ggate; I(BP, BI) <+ Vrbulk * gbulk; I(BS, BI) <+ Vrjuns * gjuns; I(BD, BI) <+ Vrjund * gjund; I(B, BI) <+ Vrwell * gwell; `endif // NQSmodel I(D, S) <+ Vds * `GMIN; end // loadStatic ///////////////////////////////////////////////////////////////////////////// // // ddt() contribs from charges (Note: MULT is handled explicitly) // ///////////////////////////////////////////////////////////////////////////// begin : loadDynamic `ifdef NQSmodel // Calculate NQS charge contributions `include "PSP102_ChargesNQS.include" `endif // NQSmodel // 4.2.19 Total terminal charges // Intrinsic MOSFET charges Qg = MULT_i * Qg; Qb = MULT_i * Qb; Qd = MULT_i * Qd; Qs = -(Qg + Qb + Qd); // Total outerFringe + overlap for // gate-source and gate-drain. Qfgs = MULT_i * (Qfgs + Qgs_ov); Qfgd = MULT_i * (Qfgd + Qgd_ov); // Gate-bulk overlap charge Qgb_ov = MULT_i * Qgb_ov; // JUNCAP2 qsjun = MULT_i * (ABSOURCE_i * qsjunbot + LSSOURCE_i * qsjunsti + LGSOURCE_i * qsjungat); qdjun = MULT_i * (ABDRAIN_i * qdjunbot + LSDRAIN_i * qdjunsti + LGDRAIN_i * qdjungat); // Convert back (undo S-D interchange) if (sigVds < 0) begin temp = Qd; // Qd <--> Qs Qd = Qs; Qs = temp; temp = Qfgd; // Qfgd <--> Qfgs Qfgd = Qfgs; Qfgs = temp; end I(`Gint, S) <+ ddt(CHNL_TYPE * Qg); I(`Bint, S) <+ ddt(CHNL_TYPE * Qb); I(D, S) <+ ddt(CHNL_TYPE * Qd); I(`Gint, S) <+ ddt(CHNL_TYPE * Qfgs); I(`Gint, D) <+ ddt(CHNL_TYPE * Qfgd); I(`Gint, `Bint) <+ ddt(CHNL_TYPE * Qgb_ov); I(`Bjs, S) <+ ddt(CHNL_TYPE * qsjun); I(`Bjd, D) <+ ddt(CHNL_TYPE * qdjun); end // loadDynamic ///////////////////////////////////////////////////////////////////////////// // // Noise // ///////////////////////////////////////////////////////////////////////////// begin : noise // 4.2.20 Noise variable calculation Sfl = 0.0; mid = 0.0; mig = 0.0; migid = 0.0; c_igid = 0.0; CGeff = COX_qm * eta_p; sqid = 0.0; sqig = 0.0; if ((xg > 0.0) && (MULT_i > 0) && (BET_i > 0)) begin N1 = Cox_over_q * alpha * phit; Nm1 = Cox_over_q * qim1; Delta_N1 = Cox_over_q * (alpha * dps); Sfl = (NFA_i - NFB_i * N1 + NFC_i * (N1 * N1)) * ln((Nm1 + 0.5 * Delta_N1) / (Nm1 - 0.5 * Delta_N1)); Sfl = Sfl + (NFB_i + NFC_i * (Nm1 - 2.0 * N1)) * Delta_N1; Sfl = Sfl_prefac * Ids * Gvsatinv * Sfl / N1; H0 = qim1 / alpha; t1 = qim / qim1; sqt2 = 0.5 * `oneSixth * (dps / H0); t2 = sqt2 * sqt2; r = H0 / H - 1.0; lc = `CLIP_LOW(1.0 - 12 * (r * t2), 1e-20); lcinv2 = 1 / (lc * lc); g_ideal = BET_i * (FdL * qim1 * Gvsatinv); CGeff = Gvsat * Gvsat * COX_qm * eta_p / (Gmob_dL * Gmob_dL); mid = t1 + 12 * t2 - 24 * ((1.0 + t1) * t2 * r); mid = `CLIP_LOW(mid, 1e-40); mid = g_ideal * lcinv2 * mid; mig = t1 / 12 - t2 * (t1 + 0.2 - 12 * t2) - 1.6 * (t2 * (t1 + 1.0 - 12 * t2) * r); mig = `CLIP_LOW(mig, 1e-40); mig = lcinv2 / g_ideal * mig; migid = lcinv2 * sqt2 * (1.0 - 12 * t2 - (t1 + 19.2 * t2 - 12 * (t1 * t2)) * r); sqid = sqrt(MULT_i * nt * mid); sqig = sqrt(MULT_i * nt / mig); c_igid = (sqid == 0) ? 0.0 : (migid * sqig / sqid); // = migid / sqrt(mig * mid); c_igid = `CLIP_BOTH(c_igid, 0.0, 1.0); end shot_igsx = 2.0 * `QELE * abs(Igse); shot_igdx = 2.0 * `QELE * abs(Igde); shot_iavl = 2.0 * `QELE * ((mavl + 1) * abs(Iimpacte)); // JUNCAP2 sjnoisex = 2.0 * `QELE * abs(isjun); djnoisex = 2.0 * `QELE * abs(idjun); if (sigVds > 0) begin shot_igs = shot_igsx; shot_igd = shot_igdx; sjnoise = sjnoisex; djnoise = djnoisex + shot_iavl; end else begin shot_igs = shot_igdx; shot_igd = shot_igsx; sjnoise = sjnoisex + shot_iavl; djnoise = djnoisex; end `ifdef NQSmodel rgatenoise = nt0 * ggate; rbulknoise = nt0 * gbulk; rjunsnoise = nt0 * gjuns; rjundnoise = nt0 * gjund; rwellnoise = nt0 * gwell; `endif // NQSmodel // Important note: // In Verilog-A, correlated noise sources can only be implemented by using two additional // internal nodes (NOI and NOI2). When implementing PSP in a circuit simlutor, it is // generally not necessary to retain these internal nodes and therefore (for execution // speed reasons) should be avoided. // Noise contribs I(NOI2) <+ V(NOI2); I(NOI2) <+ white_noise(c_igid); I(NOII) <+ white_noise(sqig * sqig * (1.0 - c_igid)); I(NOII) <+ -sqig * V(NOI2); I(NOIR) <+ V(NOIR); I(NOIC) <+ ddt(mig * CGeff * V(NOIC)); I(D,S) <+ flicker_noise(MULT_i * Sfl, 1.0); I(D,S) <+ white_noise(sqid * sqid * (1.0 - c_igid)); I(D,S) <+ sqid * V(NOI2); I(`Gint,S)<+ ddt(0.5 * ((1.0 + sigVds) * mig * CGeff * V(NOIC))); I(`Gint,D)<+ ddt(0.5 * ((1.0 - sigVds) * mig * CGeff * V(NOIC))); I(`Gint,S)<+ white_noise(shot_igs); I(`Gint,D)<+ white_noise(shot_igd); // JUNCAP2 I(`Bjs,S) <+ white_noise(sjnoise, "shot"); I(`Bjd,D) <+ white_noise(djnoise, "shot"); `ifdef NQSmodel // Parasitic resistances I(GP,G) <+ white_noise(rgatenoise); I(BP,BI) <+ white_noise(rbulknoise); I(BS,BI) <+ white_noise(rjunsnoise); I(BD,BI) <+ white_noise(rjundnoise); I(B ,BI) <+ white_noise(rwellnoise); `endif // NQSmodel end // noise `ifdef insideADMS // OPinfo ///////////////////////////////////////////////////////////////////////////// // // Operating point info // ///////////////////////////////////////////////////////////////////////////// begin : OPinfo // The output variables defined below are currently not available in // Verilog-A, but only in the SiMKit-C-code which was generated from // this source. Similar functionality will be available in Verilog-A // from Verilog-A version 2.2 onwards. However, a different syntax is // to be used (see Verilog AMS language reference manual, version 2.2, // november 2004, Accellera). // Auxiliary variables id_op = Idse + Iimpacte + Igidle - Igde; is = -Idse + Igisle - Igse; ig = Igse + Igde + Igbe; ib = -Iimpacte - Igbe - Igidle - Igisle; P_D = 1 + 0.25 * (Gf * kp); facvsb0 = phib + 2 * phit1; facvsb = Vsbstar + facvsb0; sig1k = 2 * `PI * 1000 * CGeff; sig1k = sig1k * sig1k * mig; //////////////////////////////////////////////////////////////////////////////////// // // Actual operation point output variables // //////////////////////////////////////////////////////////////////////////////////// // Note: In this section (and ONLY in this section) `drain' always refers to // the highest-potential end of the channel. Therefore, care has to be // taken for derivatives w.r.t. terminal voltages when sigVds == -1. sdint = sigVds; ctype = CHNL_TYPE; if (sigVds < 0) begin // All variables in the actual model refering to junctions are // not subject to SD-interchange. In the OP-output variables, // SD-interchange is also done for the junctions, so that's // what is happening here. Similar precautions have to be taken // for those variables that are derivatives w.r.t. voltage branches ise = is - idjun; ige = ig; ide = id_op - isjun; ibe = ib + isjun + idjun; ids = Idse; idb = Iimpacte + Igidle - isjun; isb = Igisle - idjun; igs = Igse; igd = Igde; igb = Igbe; igcs = MULT_i * Igcs; igcd = MULT_i * Igcd; iavl = Iimpacte; igisl = Igisle; igidl = Igidle; ijsbot = MULT_i * ABDRAIN_i * idjunbot; ijsgat = MULT_i * LGDRAIN_i * idjungat; ijssti = MULT_i * LSDRAIN_i * idjunsti; ijs = ijsbot + ijsgat + ijssti; ijdbot = MULT_i * ABSOURCE_i * isjunbot; ijdgat = MULT_i * LGSOURCE_i * isjungat; ijdsti = MULT_i * LSSOURCE_i * isjunsti; ijd = ijdbot + ijdgat + ijdsti; vds = Vds; vgs = Vgs; vsb = Vsb; vto = VFB_i + P_D * facvsb0 + Gf * sqrt(phit1 * facvsb0); vts = VFB_i + P_D * facvsb - Vsbstar + Gf * sqrt(phit1 * facvsb ); vth = vts - delVg; vgt = vgs - vth; vdss = Vdsat; vsat = Vds - vdss; temp = Idse + Iimpacte + Igidle - Igde - isjun; // Total drain-current gm = CHNL_TYPE * ddx(temp, V(`Gint, S)); gmb = -CHNL_TYPE * ddx(temp, V(S, `Bint)); gds = -CHNL_TYPE * ddx(temp, V(D, S)) - (gm + gmb); gjs = -ddx(idjun, V(D, `Bjd)); gjd = -ddx(isjun, V(S, `Bjs)); css = CHNL_TYPE * ddx(Qd, V(D, S)); csg = -CHNL_TYPE * ddx(Qd, V(`Gint, S)); csb = CHNL_TYPE * ddx(Qd, V(S, `Bint)); csd = css - csg - csb; cgs = -CHNL_TYPE * ddx(Qg, V(D, S)); cgg = CHNL_TYPE * ddx(Qg, V(`Gint, S)); cgb = CHNL_TYPE * ddx(Qg, V(S, `Bint)); cgd = cgg - cgs - cgb; cds = -CHNL_TYPE * ddx(Qs, V(D, S)); cdg = -CHNL_TYPE * ddx(Qs, V(`Gint, S)); cdb = CHNL_TYPE * ddx(Qs, V(S, `Bint)); cdd = cdg + cds + cdb; cbs = -CHNL_TYPE * ddx(Qb, V(D, S)); cbg = -CHNL_TYPE * ddx(Qb, V(`Gint, S)); cbb = -CHNL_TYPE * ddx(Qb, V(S, `Bint)); cbd = cbb - cbs - cbg; cgsol = -CHNL_TYPE * ddx(Qfgd, V(D, S)); cgdol = CHNL_TYPE * ddx(Qfgs, V(`Gint, S)); cjsbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qdjunbot, V(D, `Bjd)); cjsgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qdjungat, V(D, `Bjd)); cjssti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qdjunsti, V(D, `Bjd)); cjs = cjsbot + cjsgat + cjssti; cjdbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qsjunbot, V(S, `Bjs)); cjdgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qsjungat, V(S, `Bjs)); cjdsti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qsjunsti, V(S, `Bjs)); cjd = cjdbot + cjdgat + cjdsti; end else begin ise = is - isjun; ige = ig; ide = id_op - idjun; ibe = ib + isjun + idjun; ids = Idse; idb = Iimpacte + Igidle - idjun; isb = Igisle - isjun; igs = Igse; igd = Igde; igb = Igbe; igcs = MULT_i * Igcs; igcd = MULT_i * Igcd; iavl = Iimpacte; igisl = Igisle; igidl = Igidle; ijsbot = MULT_i * ABSOURCE_i * isjunbot; ijsgat = MULT_i * LGSOURCE_i * isjungat; ijssti = MULT_i * LSSOURCE_i * isjunsti; ijs = ijsbot + ijsgat + ijssti; ijdbot = MULT_i * ABDRAIN_i * idjunbot; ijdgat = MULT_i * LGDRAIN_i * idjungat; ijdsti = MULT_i * LSDRAIN_i * idjunsti; ijd = ijdbot + ijdgat + ijdsti; vds = Vds; vgs = Vgs; vsb = Vsb; vto = VFB_i + P_D * facvsb0 + Gf * sqrt(phit1 * facvsb0); vts = VFB_i + P_D * facvsb - Vsbstar + Gf * sqrt(phit1 * facvsb ); vth = vts - delVg; vgt = vgs - vth; vdss = Vdsat; vsat = Vds - vdss; temp = Idse + Iimpacte + Igidle - Igde - idjun; gm = CHNL_TYPE * ddx(temp, V(`Gint, S)); gmb = -CHNL_TYPE * ddx(temp, V(S, `Bint)); gds = CHNL_TYPE * ddx(temp, V(D, S)); gjs = -ddx(isjun, V(S, `Bjs)); gjd = -ddx(idjun, V(D, `Bjd)); cdd = CHNL_TYPE * ddx(Qd, V(D, S)); cdg = -CHNL_TYPE * ddx(Qd, V(`Gint, S)); cdb = CHNL_TYPE * ddx(Qd, V(S, `Bint)); cds = cdd - cdg - cdb; cgd = -CHNL_TYPE * ddx(Qg, V(D, S)); cgg = CHNL_TYPE * ddx(Qg, V(`Gint, S)); cgb = CHNL_TYPE * ddx(Qg, V(S, `Bint)); cgs = cgg - cgd - cgb; csd = -CHNL_TYPE * ddx(Qs, V(D, S)); csg = -CHNL_TYPE * ddx(Qs, V(`Gint, S)); csb = CHNL_TYPE * ddx(Qs, V(S, `Bint)); css = csg + csd + csb; cbd = -CHNL_TYPE * ddx(Qb, V(D, S)); cbg = -CHNL_TYPE * ddx(Qb, V(`Gint, S)); cbb = -CHNL_TYPE * ddx(Qb, V(S, `Bint)); cbs = cbb - cbd - cbg; cgsol = CHNL_TYPE * ddx(Qfgs, V(`Gint, S)); cgdol = -CHNL_TYPE * ddx(Qfgd, V(D, S)); cjsbot = -MULT_i * CHNL_TYPE * ABSOURCE_i * ddx(qsjunbot, V(S, `Bjs)); cjsgat = -MULT_i * CHNL_TYPE * LGSOURCE_i * ddx(qsjungat, V(S, `Bjs)); cjssti = -MULT_i * CHNL_TYPE * LSSOURCE_i * ddx(qsjunsti, V(S, `Bjs)); cjs = cjsbot + cjsgat + cjssti; cjdbot = -MULT_i * CHNL_TYPE * ABDRAIN_i * ddx(qdjunbot, V(D, `Bjd)); cjdgat = -MULT_i * CHNL_TYPE * LGDRAIN_i * ddx(qdjungat, V(D, `Bjd)); cjdsti = -MULT_i * CHNL_TYPE * LSDRAIN_i * ddx(qdjunsti, V(D, `Bjd)); cjd = cjdbot + cjdgat + cjdsti; end `ifdef LocalModel weff = 0; leff = 0; `else weff = WE; leff = LE; `endif u = (abs(gds) < 1e-18) ? 0 : (gm / gds); rout = (abs(gds) < 1e-18) ? 0 : (1.0 / gds); vearly = (abs(gds) < 1e-18) ? 0 : (ide / gds); beff = (abs(vgt) < 1e-12) ? 0 : (2 * abs(ide) / (vgt * vgt)); fug = (abs(cgg + cgsol + cgdol) < 1e-30) ? 0.0 : gm / (2 * `PI * (cgg + cgsol + cgdol)); sfl = Sfl; sqrtsff = (abs(gm) < 1e-18) ? 0 : (sqrt(MULT_i * Sfl / 1000) / gm); sqrtsfw = (abs(gm) < 1e-18) ? 0 : (sqid / gm); sid = sqid * sqid; sig = MULT_i * nt * sig1k / (1 + sig1k * mig); cigid = c_igid; fknee = (sid == 0) ? 0 : Sfl / sid; sigs = shot_igsx; sigd = shot_igdx; siavl = shot_iavl; if (sigVds < 0) begin ssi = djnoisex; sdi = sjnoisex; end else begin ssi = sjnoisex; sdi = djnoisex; end end // OPinfo `endif // OPinfo end // analogBlock ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_macrodefs.include0000644000265600020320000002670512264261473025747 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_macrodefs.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ///////////////////////////////////////////// // // Macros and constants used in PSP // ///////////////////////////////////////////// // Explicit Gmin `define GMIN 1E-15 `define PMOS -1 `define NMOS +1 // Some functions `define MINA(x,y,a) 0.5*((x)+(y)-sqrt(((x)-(y))*((x)-(y))+(a))) `define MAXA(x,y,a) 0.5*((x)+(y)+sqrt(((x)-(y))*((x)-(y))+(a))) // Physical constants `define EPSOX 3.453E-11 `define QMN 5.951993 `define QMP 7.448711 // Other constants (PSP-mos) `define DELTA1 0.02 `define invSqrt2 7.0710678118654746e-01 `define oneSixth 1.6666666666666667e-01 `define exp80 5.5406223843935098e+34 `define exp160 3.0698496406442424e+69 `ifdef NQSmodel `define Gint GP `define Bint BP `define Bjs BS `define Bjd BD `else // NQSmodel `define Gint G `define Bint B `define Bjs B `define Bjd B `endif // NQSModel ///////////////////////////////////////////////////////////////////////////// // // Macro definitions. // // Note that because at present locally scoped variables // can only be in named blocks, the intermediate variables // used in the macros below must be explicitly declared // as variables in the main code. // ///////////////////////////////////////////////////////////////////////////// // sigma function used in surface potential and other calculations // (one call uses expressions for arguments so parentheses // around the arguments in the expressions are necessary) `define sigma(a,c,tau,eta,y) \ nu = (a) + (c); \ mu = nu * nu / (tau) + 0.5 * ((c) * (c)) - (a); \ y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a))); // modified version of sigma, which takes 4 arguments `define sigma2(a,b,c,tau,eta,y) \ nu = (a) + (c); \ if (abs(tau) < 1e-120) begin /*sometimes tau is extremely small...*/\ y = (eta); \ end else begin \ mu = (nu) * (nu) / (tau) + 0.5 * ((c) * (c)) - (a) * (b); \ y = (eta) + (a) * nu / (mu + (nu / mu) * (c) * ((c) * (c) * `oneThird - (a) * (b))); \ end // // sp_s surface potential calculation // `define sp_s(sp,xg,xn,delta) \ if (abs(xg) <= margin) begin \ SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \ sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \ end else begin \ if (xg < -margin) begin \ SP_S_yg = -xg; \ SP_S_ysub = 1.25 * (SP_S_yg * inv_xi); \ SP_S_eta = 0.5 * (SP_S_ysub + 10 - sqrt((SP_S_ysub - 6.0) * (SP_S_ysub - 6.0) + 64.0)); \ SP_S_temp = SP_S_yg - SP_S_eta; \ SP_S_a = SP_S_temp * SP_S_temp + Gf2*(SP_S_eta + 1.0);\ SP_S_c = 2.0 * SP_S_temp - Gf2; \ SP_S_tau = -SP_S_eta + ln(SP_S_a * inv_Gf2); \ `sigma(SP_S_a, SP_S_c, SP_S_tau, SP_S_eta, SP_S_y0) \ `expl_high(SP_S_y0, SP_S_delta0) \ SP_S_delta1 = 1.0 / SP_S_delta0; \ SP_S_temp = 1.0 / (2.0 + SP_S_y0 * SP_S_y0); \ SP_S_xi0 = SP_S_y0 * SP_S_y0 * SP_S_temp; \ SP_S_xi1 = 4.0 * (SP_S_y0 * SP_S_temp * SP_S_temp); \ SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ SP_S_temp = SP_S_yg - SP_S_y0; \ SP_S_temp1 = (delta) * SP_S_delta1; \ SP_S_pC = 2.0 * SP_S_temp + Gf2 * (SP_S_delta0 - 1.0 - SP_S_temp1 + (delta) * (1.0 - SP_S_xi1)); \ SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta0 - SP_S_y0 - 1.0 + SP_S_temp1 + (delta) * (SP_S_y0 - 1.0 - SP_S_xi0)); \ SP_S_temp = 2.0 - Gf2 * (SP_S_delta0 + SP_S_temp1 - (delta) * SP_S_xi2); \ SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ sp = -SP_S_y0 - 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \ end else begin \ SP_xg1 = 1.0 / (x1 + Gf * 7.324648775608221e-001); \ SP_S_A_fac= (xi * x1 * SP_xg1 - 1.0) * SP_xg1; \ SP_S_xbar = xg * inv_xi * (1.0 + SP_S_A_fac * xg); \ `expl_low(-SP_S_xbar, SP_S_temp) \ SP_S_w = 1.0 - SP_S_temp; \ SP_S_x1 = xg + Gf2 * 0.5 - Gf * sqrt(xg + Gf2 * 0.25 - SP_S_w); \ SP_S_bx = (xn) + 3.0; \ SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \ SP_S_temp = xg - SP_S_eta; \ SP_S_temp1= exp(-SP_S_eta); \ SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \ SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \ SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \ SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \ SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \ SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \ SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \ SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \ `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \ if (SP_S_x0 < `se05) begin \ SP_S_delta0 = exp(SP_S_x0); \ SP_S_delta1 = 1.0 / SP_S_delta0; \ SP_S_delta0 = (delta) * SP_S_delta0; \ end else begin \ if (SP_S_x0 > (xn) - `se05) begin \ SP_S_delta0 = exp(SP_S_x0 - (xn)); \ SP_S_delta1 = (delta) / SP_S_delta0; \ end else begin \ SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \ SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \ end \ end \ SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \ SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \ SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \ SP_S_xi2 = (8.0 * SP_S_temp - 12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ SP_S_temp = xg - SP_S_x0; \ SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \ SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \ SP_S_temp = 2.0 - Gf2 * (SP_S_delta1 + SP_S_delta0 - (delta) * SP_S_xi2); \ SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp))); \ end \ end // // sp_s_d surface potential calculation at drain (subset of function sp_s) // `define sp_s_d(sp,xg,xn,delta) \ if (abs(xg) <= margin) begin \ SP_S_temp1 = inv_xi * inv_xi * `oneSixth * `invSqrt2; \ sp = xg * inv_xi * (1.0 + xg * (1.0 - (delta)) * Gf * SP_S_temp1); \ end else begin \ SP_S_bx = (xn) + 3; \ SP_S_eta = `MINA(SP_S_x1, SP_S_bx, 5.0) - 0.5 * (SP_S_bx - sqrt(SP_S_bx * SP_S_bx + 5.0)); \ SP_S_temp = xg - SP_S_eta; \ SP_S_temp1= exp(-SP_S_eta); \ SP_S_temp2= 1.0 / (2.0 + SP_S_eta * SP_S_eta); \ SP_S_xi0 = SP_S_eta * SP_S_eta * SP_S_temp2; \ SP_S_xi1 = 4.0 * (SP_S_eta * SP_S_temp2 * SP_S_temp2); \ SP_S_xi2 = (8.0 * SP_S_temp2 - 12.0 * SP_S_xi0) * SP_S_temp2 * SP_S_temp2; \ SP_S_a = max(1.0e-40, SP_S_temp * SP_S_temp - Gf2 * (SP_S_temp1 + SP_S_eta - 1.0 - (delta) * (SP_S_eta + 1.0 + SP_S_xi0))); \ SP_S_b = 1.0 - 0.5 * (Gf2 * (SP_S_temp1 - (delta) * SP_S_xi2)); \ SP_S_c = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_temp1 - (delta) * (1.0 + SP_S_xi1)); \ SP_S_tau = (xn) - SP_S_eta + ln(SP_S_a / Gf2); \ `sigma2(SP_S_a, SP_S_b, SP_S_c, SP_S_tau, SP_S_eta, SP_S_x0) \ if (SP_S_x0 < `se05) begin \ SP_S_delta0 = exp(SP_S_x0); \ SP_S_delta1 = 1.0 / SP_S_delta0; \ SP_S_delta0 = (delta) * SP_S_delta0; \ end else begin \ if (SP_S_x0 > (xn) - `se05) begin \ SP_S_delta0 = exp(SP_S_x0 - (xn)); \ SP_S_delta1 = (delta) / SP_S_delta0; \ end else begin \ SP_S_delta0 = `ke05 / `P3((xn) - SP_S_x0 - `se05); \ SP_S_delta1 = `ke05 / `P3(SP_S_x0 - `se05); \ end \ end \ SP_S_temp = 1.0 / (2.0 + SP_S_x0 * SP_S_x0); \ SP_S_xi0 = SP_S_x0 * SP_S_x0 * SP_S_temp; \ SP_S_xi1 = 4.0 * (SP_S_x0 * SP_S_temp * SP_S_temp); \ SP_S_xi2 = (8.0 * SP_S_temp-12.0 * SP_S_xi0) * SP_S_temp * SP_S_temp; \ SP_S_temp = xg - SP_S_x0; \ SP_S_pC = 2.0 * SP_S_temp + Gf2 * (1.0 - SP_S_delta1 + SP_S_delta0 - (delta) * (1.0 + SP_S_xi1)); \ SP_S_qC = SP_S_temp * SP_S_temp - Gf2 * (SP_S_delta1 + SP_S_x0 - 1.0 + SP_S_delta0 - (delta) * (SP_S_x0 + 1.0 + SP_S_xi0)); \ SP_S_temp = 2.0 - Gf2*(SP_S_delta1+SP_S_delta0-(delta)*SP_S_xi2); \ SP_S_temp = SP_S_pC * SP_S_pC - 2.0 * (SP_S_qC * SP_S_temp); \ sp = SP_S_x0 + 2.0 * (SP_S_qC / (SP_S_pC + sqrt(SP_S_temp)));\ end // // sp_ov surface potential calculation for the overlap regions // `define sp_ov(sp,xg) \ if (abs(xg) <= x_mrg_ov) begin \ sp = (-(xg) * inv_xi_ov); \ end else begin \ if (xg < -x_mrg_ov) begin \ SP_OV_yg = -xg; \ SP_OV_z = x1 * SP_OV_yg * inv_xi_ov; \ SP_OV_eta = 0.5 * (SP_OV_z + 10.0 - sqrt((SP_OV_z - 6.0) * (SP_OV_z - 6.0) + 64.0)); \ SP_OV_a = (SP_OV_yg - SP_OV_eta) * (SP_OV_yg - SP_OV_eta) + GOV2 * (SP_OV_eta + 1.0); \ SP_OV_c = 2.0 * (SP_OV_yg - SP_OV_eta) - GOV2; \ SP_OV_tau = ln(SP_OV_a / GOV2) - SP_OV_eta; \ `sigma(SP_OV_a, SP_OV_c, SP_OV_tau, SP_OV_eta, SP_OV_y0) \ SP_OV_D0 = exp(SP_OV_y0); \ SP_OV_temp = SP_OV_yg - SP_OV_y0; \ SP_OV_p = 2.0 * SP_OV_temp + GOV2 * (SP_OV_D0 - 1.0); \ SP_OV_q = SP_OV_temp * SP_OV_temp + GOV2 * (SP_OV_y0 + 1.0 - SP_OV_D0); \ SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \ SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \ SP_OV_w = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \ sp = -(SP_OV_y0 + SP_OV_w); \ end else begin \ SP_OV_Afac = (xi_ov * x1 * inv_xg1 - 1.0) * inv_xg1; \ SP_OV_xbar = xg * inv_xi_ov * (1.0 + SP_OV_Afac * xg); \ `expl_low(-SP_OV_xbar, SP_OV_temp) \ SP_OV_w = 1.0 - SP_OV_temp; \ SP_OV_x0 = xg + GOV2 * 0.5 - GOV * sqrt(xg + GOV2 * 0.25 - SP_OV_w); \ `expl_low(-SP_OV_x0, SP_OV_D0) \ SP_OV_p = 2.0 * (xg - SP_OV_x0) + GOV2 * (1 - SP_OV_D0); \ SP_OV_q = (xg - SP_OV_x0) * (xg - SP_OV_x0) - GOV2 * (SP_OV_x0 - 1.0 + SP_OV_D0); \ SP_OV_xi = 1.0 - GOV2 * 0.5 * SP_OV_D0; \ SP_OV_temp = SP_OV_p * SP_OV_p - 4.0 * (SP_OV_xi * SP_OV_q); \ SP_OV_u = 2.0 * (SP_OV_q / (SP_OV_p + sqrt(SP_OV_temp))); \ sp = SP_OV_x0 + SP_OV_u; \ end \ sp = -sp; \ end ngspice-26/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_varlist.include0000644000265600020320000000673012264261473026001 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: JUNCAP200_varlist.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1 (PSP), 200.2 (JUNCAP), April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // // declaration of variables needed in macro "calcerfcexpmtat" real ysq, terfc, erfcpos; // declaration of variables needed in hypfunction 5 real h1, h2, h2d, h3, h4, h5; // declaration of variables used within macro "juncapfunction" real tmp, id; real isrh, vbi_minus_vjsrh, wsrhstep, dwsrh, wsrh, wdep, asrh; real itat, btat, twoatatoverthreebtat, umaxbeforelimiting, umax, sqrtumax, umaxpoweronepointfive; real wgamma, wtat, ktat, ltat, mtat, xerfc, erfctimesexpmtat, gammamax; real ibbt, Fmaxr; real fbreakdown; // declaration of clipped parameters real TRJ_i, IMAX_i; real CJORBOT_i, CJORSTI_i, CJORGAT_i, VBIRBOT_i, VBIRSTI_i, VBIRGAT_i; real PBOT_i, PSTI_i, PGAT_i; real IDSATRBOT_i, IDSATRSTI_i, IDSATRGAT_i, XJUNSTI_i, XJUNGAT_i; real CSRHBOT_i, CSRHSTI_i, CSRHGAT_i, CTATBOT_i, CTATSTI_i, CTATGAT_i; real MEFFTATBOT_i, MEFFTATSTI_i, MEFFTATGAT_i; real CBBTBOT_i, CBBTSTI_i, CBBTGAT_i; real VBRBOT_i, VBRSTI_i, VBRGAT_i, PBRBOT_i, PBRSTI_i, PBRGAT_i; // declaration of variables calculated outside macro "juncapfunction", voltage-independent part real tkr, tkd, auxt, KBOL_over_QELE, phitr, phitrinv, phitd, phitdinv; real deltaphigr, phigrbot, phigrsti, phigrgat, deltaphigd, phigdbot, phigdsti, phigdgat; real ftdbot, ftdsti, ftdgat, idsatbot, idsatsti, idsatgat, exp_VMAX_over_phitd; real ubibot, ubisti, ubigat, vbibot, vbisti, vbigat; real vbibot2, vbisti2, vbigat2, vbibot2r, vbisti2r, vbigat2r; real vbiinvbot, vbiinvsti, vbiinvgat; real one_minus_PBOT, one_minus_PSTI, one_minus_PGAT; real one_over_one_minus_PBOT, one_over_one_minus_PSTI, one_over_one_minus_PGAT; real cjobot, cjosti, cjogat, qprefbot, qprefsti, qprefgat; real vbimin, vch, vfmin, vbbtlim; real qpref2bot, qpref2sti, qpref2gat; real wdepnulrbot, wdepnulrsti, wdepnulrgat, wdepnulrinvbot, wdepnulrinvsti, wdepnulrinvgat; real VBIRBOTinv, VBIRSTIinv, VBIRGATinv; real perfc, berfc, cerfc; real deltaEbot, deltaEsti, deltaEgat, atatbot, atatsti, atatgat; real btatpartbot, btatpartsti, btatpartgat; real fbbtbot, fbbtsti, fbbtgat; real fstopbot, fstopsti, fstopgat, VBRinvbot, VBRinvsti, VBRinvgat; real slopebot, slopesti, slopegat; real vmaxbot, vmaxsti, vmaxgat, VMAX; // declaration of variables calculated outside macro "juncapfunction", voltage-dependent part real VAK, idmult, vj, z, zinv, two_psistar, vjlim, vjsrh, vbbt, vav; ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_binpars.include0000644000265600020320000007014412264261473025436 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_binpars.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // /////////////////////////////////////////////////// // PSP global model parameters (binning) /////////////////////////////////////////////////// parameter real LEVEL = 1021 `P(info="Model level" unit="" ); parameter real TYPE = 1 `from( -1.0,1.0 ) `P(info="Channel type parameter, +1=NMOS -1=PMOS" unit="" ); parameter real TR = 21 `from( -273.0,inf ) `P(info="nominal (reference) temperature" unit="C" ); // Switch parameters parameter real SWIGATE = 0 `from( 0.0,1.0 ) `P(info="Flag for gate current, 0=turn off IG" unit="" ); parameter real SWIMPACT = 0 `from( 0.0,1.0 ) `P(info="Flag for impact ionization current, 0=turn off II" unit="" ); parameter real SWGIDL = 0 `from( 0.0,1.0 ) `P(info="Flag for GIDL current, 0=turn off IGIDL" unit="" ); parameter real SWJUNCAP = 0 `from( 0.0,3.0 ) `P(info="Flag for juncap, 0=turn off juncap" unit="" ); parameter real QMC = 1 `from( 0.0,inf ) `P(info="Quantum-mechanical correction factor" unit="" ); // Process parameters parameter real LVARO = 0 `P(info="Geometry independent difference between actual and programmed poly-silicon gate length" unit="m" ); parameter real LVARL = 0 `P(info="Length dependence of difference between actual and programmed poly-silicon gate length" unit="" ); parameter real LAP = 0 `P(info="Effective channel length reduction per side due to lateral diffusion of source/drain dopant ions" unit="m" ); parameter real WVARO = 0 `P(info="Geometry independent difference between actual and programmed field-oxide opening" unit="m" ); parameter real WVARW = 0 `P(info="Width dependence of difference between actual and programmed field-oxide opening" unit="" ); parameter real WOT = 0 `P(info="Effective reduction of channel width per side due to lateral diffusion of channel-stop dopant ions" unit="m" ); parameter real DLQ = 0 `P(info="Effective channel length reduction for CV" unit="m" ); parameter real DWQ = 0 `P(info="Effective channel width reduction for CV" unit="m" ); parameter real POVFB = -1 `P(info="Coefficient for the geometry independent part of VFB" unit="V" ); parameter real PLVFB = 0.0 `P(info="Coefficient for the length dependence of VFB" unit="V" ); parameter real PWVFB = 0.0 `P(info="Coefficient for the width dependence of VFB" unit="V" ); parameter real PLWVFB = 0.0 `P(info="Coefficient for the length times width dependence of VFB" unit="V" ); parameter real POSTVFB = 0.0005 `P(info="Coefficient for the geometry independent part of STVFB" unit="V/K" ); parameter real PLSTVFB = 0.0 `P(info="Coefficient for the length dependence of STVFB" unit="V/K" ); parameter real PWSTVFB = 0.0 `P(info="Coefficient for the width dependence of STVFB" unit="V/K" ); parameter real PLWSTVFB = 0.0 `P(info="Coefficient for the length times width dependence of STVFB" unit="V/K" ); parameter real POTOX = 2E-09 `P(info="Coefficient for the geometry independent part of TOX" unit="m" ); parameter real PONEFF = 5E+23 `P(info="Coefficient for the geometry independent part of NEFF" unit="m^-3" ); parameter real PLNEFF = 0.0 `P(info="Coefficient for the length dependence of NEFF" unit="m^-3" ); parameter real PWNEFF = 0.0 `P(info="Coefficient for the width dependence of NEFF" unit="m^-3" ); parameter real PLWNEFF = 0.0 `P(info="Coefficient for the length times width dependence of NEFF" unit="m^-3" ); parameter real POVNSUB = 0 `P(info="Coefficient for the geometry independent part of VNSUB" unit="V" ); parameter real PONSLP = 0.05 `P(info="Coefficient for the geometry independent part of NSLP" unit="V" ); parameter real PODNSUB = 0 `P(info="Coefficient for the geometry independent part of DNSUB" unit="V^-1" ); parameter real PODPHIB = 0 `P(info="Coefficient for the geometry independent part of DPHIB" unit="V" ); parameter real PLDPHIB = 0.0 `P(info="Coefficient for the length dependence of DPHIB" unit="V" ); parameter real PWDPHIB = 0.0 `P(info="Coefficient for the width dependence of DPHIB" unit="V" ); parameter real PLWDPHIB = 0.0 `P(info="Coefficient for the length times width dependence of DPHIB" unit="V" ); parameter real PONP = 1E+26 `P(info="Coefficient for the geometry independent part of NP" unit="m^-3" ); parameter real PLNP = 0.0 `P(info="Coefficient for the length dependence of NP" unit="m^-3" ); parameter real PWNP = 0.0 `P(info="Coefficient for the width dependence of NP" unit="m^-3" ); parameter real PLWNP = 0.0 `P(info="Coefficient for the length times width dependence of NP" unit="m^-3" ); parameter real POCT = 0 `P(info="Coefficient for the geometry independent part of CT" unit="" ); parameter real PLCT = 0.0 `P(info="Coefficient for the length dependence of CT" unit="" ); parameter real PWCT = 0.0 `P(info="Coefficient for the width dependence of CT" unit="" ); parameter real PLWCT = 0.0 `P(info="Coefficient for the length times width dependence of CT" unit="" ); parameter real POTOXOV = 2E-09 `P(info="Coefficient for the geometry independent part of TOXOV" unit="m" ); parameter real PONOV = 5E+25 `P(info="Coefficient for the geometry independent part of NOV" unit="m^-3" ); parameter real PLNOV = 0.0 `P(info="Coefficient for the length dependence of NOV" unit="m^-3" ); parameter real PWNOV = 0.0 `P(info="Coefficient for the width dependence of NOV" unit="m^-3" ); parameter real PLWNOV = 0.0 `P(info="Coefficient for the length times width dependence of NOV" unit="m^-3" ); // DIBL parameters parameter real POCF = 0 `P(info="Coefficient for the geometry independent part of CF" unit="V^-1" ); parameter real PLCF = 0.0 `P(info="Coefficient for the length dependence of CF" unit="V^-1" ); parameter real PWCF = 0.0 `P(info="Coefficient for the width dependence of CF" unit="V^-1" ); parameter real PLWCF = 0.0 `P(info="Coefficient for the length times width dependence of CF" unit="V^-1" ); parameter real POCFB = 0 `P(info="Coefficient for the geometry independent part of CFB" unit="V^-1" ); // Mobility parameters parameter real POBETN = 0.07 `P(info="Coefficient for the geometry independent part of BETN" unit="m^2/V/s" ); parameter real PLBETN = 0.0 `P(info="Coefficient for the length dependence of BETN" unit="m^2/V/s" ); parameter real PWBETN = 0.0 `P(info="Coefficient for the width dependence of BETN" unit="m^2/V/s" ); parameter real PLWBETN = 0.0 `P(info="Coefficient for the length times width dependence of BETN" unit="m^2/V/s" ); parameter real POSTBET = 1 `P(info="Coefficient for the geometry independent part of STBET" unit="" ); parameter real PLSTBET = 0.0 `P(info="Coefficient for the length dependence of STBET" unit="" ); parameter real PWSTBET = 0.0 `P(info="Coefficient for the width dependence of STBET" unit="" ); parameter real PLWSTBET = 0.0 `P(info="Coefficient for the length times width dependence of STBET" unit="" ); parameter real POMUE = 0.5 `P(info="Coefficient for the geometry independent part of MUE" unit="m/V" ); parameter real PLMUE = 0.0 `P(info="Coefficient for the length dependence of MUE" unit="m/V" ); parameter real PWMUE = 0.0 `P(info="Coefficient for the width dependence of MUE" unit="m/V" ); parameter real PLWMUE = 0.0 `P(info="Coefficient for the length times width dependence of MUE" unit="m/V" ); parameter real POSTMUE = 0 `P(info="Coefficient for the geometry independent part of STMUE" unit="" ); parameter real POTHEMU = 1.5 `P(info="Coefficient for the geometry independent part of THEMU" unit="" ); parameter real POSTTHEMU = 1.5 `P(info="Coefficient for the geometry independent part of STTHEMU" unit="" ); parameter real POCS = 0 `P(info="Coefficient for the geometry independent part of CS" unit="" ); parameter real PLCS = 0.0 `P(info="Coefficient for the length dependence of CS" unit="" ); parameter real PWCS = 0.0 `P(info="Coefficient for the width dependence of CS" unit="" ); parameter real PLWCS = 0.0 `P(info="Coefficient for the length times width dependence of CS" unit="" ); parameter real POSTCS = 0 `P(info="Coefficient for the geometry independent part of STCS" unit="" ); parameter real POXCOR = 0 `P(info="Coefficient for the geometry independent part of XCOR" unit="V^-1" ); parameter real PLXCOR = 0.0 `P(info="Coefficient for the length dependence of XCOR" unit="V^-1" ); parameter real PWXCOR = 0.0 `P(info="Coefficient for the width dependence of XCOR" unit="V^-1" ); parameter real PLWXCOR = 0.0 `P(info="Coefficient for the length times width dependence of XCOR" unit="V^-1" ); parameter real POSTXCOR = 0 `P(info="Coefficient for the geometry independent part of STXCOR" unit="" ); parameter real POFETA = 1 `P(info="Coefficient for the geometry independent part of FETA" unit="" ); // Series resistance parameters parameter real PORS = 30 `P(info="Coefficient for the geometry independent part of RS" unit="Ohm" ); parameter real PLRS = 0.0 `P(info="Coefficient for the length dependence of RS" unit="Ohm" ); parameter real PWRS = 0.0 `P(info="Coefficient for the width dependence of RS" unit="Ohm" ); parameter real PLWRS = 0.0 `P(info="Coefficient for the length times width dependence of RS" unit="Ohm" ); parameter real POSTRS = 1 `P(info="Coefficient for the geometry independent part of STRS" unit="" ); parameter real PORSB = 0 `P(info="Coefficient for the geometry independent part of RSB" unit="V^-1" ); parameter real PORSG = 0 `P(info="Coefficient for the geometry independent part of RSG" unit="V^-1" ); // Velocity saturation parameters parameter real POTHESAT = 1 `P(info="Coefficient for the geometry independent part of THESAT" unit="V^-1" ); parameter real PLTHESAT = 0.0 `P(info="Coefficient for the length dependence of THESAT" unit="V^-1" ); parameter real PWTHESAT = 0.0 `P(info="Coefficient for the width dependence of THESAT" unit="V^-1" ); parameter real PLWTHESAT = 0.0 `P(info="Coefficient for the length times width dependence of THESAT" unit="V^-1" ); parameter real POSTTHESAT = 1 `P(info="Coefficient for the geometry independent part of STTHESAT" unit="" ); parameter real PLSTTHESAT = 0.0 `P(info="Coefficient for the length dependence of STTHESAT" unit="" ); parameter real PWSTTHESAT = 0.0 `P(info="Coefficient for the width dependence of STTHESAT" unit="" ); parameter real PLWSTTHESAT = 0.0 `P(info="Coefficient for the length times width dependence of STTHESAT" unit="" ); parameter real POTHESATB = 0 `P(info="Coefficient for the geometry independent part of THESATB" unit="V^-1" ); parameter real PLTHESATB = 0.0 `P(info="Coefficient for the length dependence of THESATB" unit="V^-1" ); parameter real PWTHESATB = 0.0 `P(info="Coefficient for the width dependence of THESATB" unit="V^-1" ); parameter real PLWTHESATB = 0.0 `P(info="Coefficient for the length times width dependence of THESATB" unit="V^-1" ); parameter real POTHESATG = 0 `P(info="Coefficient for the geometry independent part of THESATG" unit="V^-1" ); parameter real PLTHESATG = 0.0 `P(info="Coefficient for the length dependence of THESATG" unit="V^-1" ); parameter real PWTHESATG = 0.0 `P(info="Coefficient for the width dependence of THESATG" unit="V^-1" ); parameter real PLWTHESATG = 0.0 `P(info="Coefficient for the length times width dependence of THESATG" unit="V^-1" ); // Saturation voltage parameters parameter real POAX = 3 `P(info="Coefficient for the geometry independent part of AX" unit="" ); parameter real PLAX = 0.0 `P(info="Coefficient for the length dependence of AX" unit="" ); parameter real PWAX = 0.0 `P(info="Coefficient for the width dependence of AX" unit="" ); parameter real PLWAX = 0.0 `P(info="Coefficient for the length times width dependence of AX" unit="" ); // Channel length modulation (CLM) parameters parameter real POALP = 0.01 `P(info="Coefficient for the geometry independent part of ALP" unit="" ); parameter real PLALP = 0.0 `P(info="Coefficient for the length dependence of ALP" unit="" ); parameter real PWALP = 0.0 `P(info="Coefficient for the width dependence of ALP" unit="" ); parameter real PLWALP = 0.0 `P(info="Coefficient for the length times width dependence of ALP" unit="" ); parameter real POALP1 = 0 `P(info="Coefficient for the geometry independent part of ALP1" unit="V" ); parameter real PLALP1 = 0.0 `P(info="Coefficient for the length dependence of ALP1" unit="V" ); parameter real PWALP1 = 0.0 `P(info="Coefficient for the width dependence of ALP1" unit="V" ); parameter real PLWALP1 = 0.0 `P(info="Coefficient for the length times width dependence of ALP1" unit="V" ); parameter real POALP2 = 0 `P(info="Coefficient for the geometry independent part of ALP2" unit="V^-1" ); parameter real PLALP2 = 0.0 `P(info="Coefficient for the length dependence of ALP2" unit="V^-1" ); parameter real PWALP2 = 0.0 `P(info="Coefficient for the width dependence of ALP2" unit="V^-1" ); parameter real PLWALP2 = 0.0 `P(info="Coefficient for the length times width dependence of ALP2" unit="V^-1" ); parameter real POVP = 0.05 `P(info="Coefficient for the geometry independent part of VP" unit="V" ); // Impact ionization parameters parameter real POA1 = 1 `P(info="Coefficient for the geometry independent part of A1" unit="" ); parameter real PLA1 = 0.0 `P(info="Coefficient for the length dependence of A1" unit="" ); parameter real PWA1 = 0.0 `P(info="Coefficient for the width dependence of A1" unit="" ); parameter real PLWA1 = 0.0 `P(info="Coefficient for the length times width dependence of A1" unit="" ); parameter real POA2 = 10 `P(info="Coefficient for the geometry independent part of A2" unit="V" ); parameter real POSTA2 = 0 `P(info="Coefficient for the geometry independent part of STA2" unit="V" ); parameter real POA3 = 1 `P(info="Coefficient for the geometry independent part of A3" unit="" ); parameter real PLA3 = 0.0 `P(info="Coefficient for the length dependence of A3" unit="" ); parameter real PWA3 = 0.0 `P(info="Coefficient for the width dependence of A3" unit="" ); parameter real PLWA3 = 0.0 `P(info="Coefficient for the length times width dependence of A3" unit="" ); parameter real POA4 = 0 `P(info="Coefficient for the geometry independent part of A4" unit="V^-0.5" ); parameter real PLA4 = 0.0 `P(info="Coefficient for the length dependence of A4" unit="V^-0.5" ); parameter real PWA4 = 0.0 `P(info="Coefficient for the width dependence of A4" unit="V^-0.5" ); parameter real PLWA4 = 0.0 `P(info="Coefficient for the length times width dependence of A4" unit="V^-0.5" ); parameter real POGCO = 0 `P(info="Coefficient for the geometry independent part of GCO" unit="" ); // Gate current parameters parameter real POIGINV = 0 `P(info="Coefficient for the geometry independent part of IGINV" unit="A" ); parameter real PLIGINV = 0.0 `P(info="Coefficient for the length dependence of IGINV" unit="A" ); parameter real PWIGINV = 0.0 `P(info="Coefficient for the width dependence of IGINV" unit="A" ); parameter real PLWIGINV = 0.0 `P(info="Coefficient for the length times width dependence of IGINV" unit="A" ); parameter real POIGOV = 0 `P(info="Coefficient for the geometry independent part of IGOV" unit="A" ); parameter real PLIGOV = 0.0 `P(info="Coefficient for the length dependence of IGOV" unit="A" ); parameter real PWIGOV = 0.0 `P(info="Coefficient for the width dependence of IGOV" unit="A" ); parameter real PLWIGOV = 0.0 `P(info="Coefficient for the length times width dependence of IGOV" unit="A" ); parameter real POSTIG = 2 `P(info="Coefficient for the geometry independent part of STIG" unit="" ); parameter real POGC2 = 0.375 `P(info="Coefficient for the geometry independent part of GC2" unit="" ); parameter real POGC3 = 0.063 `P(info="Coefficient for the geometry independent part of GC3" unit="" ); parameter real POCHIB = 3.1 `P(info="Coefficient for the geometry independent part of CHIB" unit="V" ); // Gate-induced drain leakage (GIDL) parameters parameter real POAGIDL = 0 `P(info="Coefficient for the geometry independent part of AGIDL" unit="A/V^3" ); parameter real PLAGIDL = 0.0 `P(info="Coefficient for the length dependence of AGIDL" unit="A/V^3" ); parameter real PWAGIDL = 0.0 `P(info="Coefficient for the width dependence of AGIDL" unit="A/V^3" ); parameter real PLWAGIDL = 0.0 `P(info="Coefficient for the length times width dependence of AGIDL" unit="A/V^3" ); parameter real POBGIDL = 41 `P(info="Coefficient for the geometry independent part of BGIDL" unit="V" ); parameter real POSTBGIDL = 0 `P(info="Coefficient for the geometry independent part of STBGIDL" unit="V/K" ); parameter real POCGIDL = 0 `P(info="Coefficient for the geometry independent part of CGIDL" unit="" ); // Charge model parameters parameter real POCOX = 1E-14 `P(info="Coefficient for the geometry independent part of COX" unit="F" ); parameter real PLCOX = 0.0 `P(info="Coefficient for the length dependence of COX" unit="F" ); parameter real PWCOX = 0.0 `P(info="Coefficient for the width dependence of COX" unit="F" ); parameter real PLWCOX = 0.0 `P(info="Coefficient for the length times width dependence of COX" unit="F" ); parameter real POCGOV = 1E-15 `P(info="Coefficient for the geometry independent part of CGOV" unit="F" ); parameter real PLCGOV = 0.0 `P(info="Coefficient for the length dependence of CGOV" unit="F" ); parameter real PWCGOV = 0.0 `P(info="Coefficient for the width dependence of CGOV" unit="F" ); parameter real PLWCGOV = 0.0 `P(info="Coefficient for the length times width dependence of CGOV" unit="F" ); parameter real POCGBOV = 0 `P(info="Coefficient for the geometry independent part of CGBOV" unit="F" ); parameter real PLCGBOV = 0.0 `P(info="Coefficient for the length dependence of CGBOV" unit="F" ); parameter real PWCGBOV = 0.0 `P(info="Coefficient for the width dependence of CGBOV" unit="F" ); parameter real PLWCGBOV = 0.0 `P(info="Coefficient for the length times width dependence of CGBOV" unit="F" ); parameter real POCFR = 0 `P(info="Coefficient for the geometry independent part of CFR" unit="F" ); parameter real PLCFR = 0.0 `P(info="Coefficient for the length dependence of CFR" unit="F" ); parameter real PWCFR = 0.0 `P(info="Coefficient for the width dependence of CFR" unit="F" ); parameter real PLWCFR = 0.0 `P(info="Coefficient for the length times width dependence of CFR" unit="F" ); // Noise model parameters parameter real POFNT = 1 `P(info="Coefficient for the geometry independent part of FNT" unit="" ); parameter real PONFA = 8E+22 `P(info="Coefficient for the geometry independent part of NFA" unit="V^-1/m^4" ); parameter real PLNFA = 0.0 `P(info="Coefficient for the length dependence of NFA" unit="V^-1/m^4" ); parameter real PWNFA = 0.0 `P(info="Coefficient for the width dependence of NFA" unit="V^-1/m^4" ); parameter real PLWNFA = 0.0 `P(info="Coefficient for the length times width dependence of NFA" unit="V^-1/m^4" ); parameter real PONFB = 3E+07 `P(info="Coefficient for the geometry independent part of NFB" unit="V^-1/m^2" ); parameter real PLNFB = 0.0 `P(info="Coefficient for the length dependence of NFB" unit="V^-1/m^2" ); parameter real PWNFB = 0.0 `P(info="Coefficient for the width dependence of NFB" unit="V^-1/m^2" ); parameter real PLWNFB = 0.0 `P(info="Coefficient for the length times width dependence of NFB" unit="V^-1/m^2" ); parameter real PONFC = 0 `P(info="Coefficient for the geometry independent part of NFC" unit="V^-1" ); parameter real PLNFC = 0.0 `P(info="Coefficient for the length dependence of NFC" unit="V^-1" ); parameter real PWNFC = 0.0 `P(info="Coefficient for the width dependence of NFC" unit="V^-1" ); parameter real PLWNFC = 0.0 `P(info="Coefficient for the length times width dependence of NFC" unit="V^-1" ); // Other parameters parameter real DTA = 0 `P(info="Temperature offset w.r.t. ambient temperature" unit="K" ); ngspice-26/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_InitModel.include0000644000265600020320000002247312264261473026203 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: JUNCAP200_InitModel.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1 (PSP), 200.2 (JUNCAP), April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ////////////////////////////////////////////////////////////// // // Calculation of internal paramters which are independent // on instance parameters // ////////////////////////////////////////////////////////////// TRJ_i = `CLIP_LOW( TRJ , `TRJ_cliplow); IMAX_i = `CLIP_LOW( IMAX , `IMAX_cliplow); CJORBOT_i = `CLIP_LOW( CJORBOT , `CJORBOT_cliplow); CJORSTI_i = `CLIP_LOW( CJORSTI , `CJORSTI_cliplow); CJORGAT_i = `CLIP_LOW( CJORGAT , `CJORGAT_cliplow); VBIRBOT_i = `CLIP_LOW( VBIRBOT , `VBIR_cliplow); VBIRSTI_i = `CLIP_LOW( VBIRSTI , `VBIR_cliplow); VBIRGAT_i = `CLIP_LOW( VBIRGAT , `VBIR_cliplow); PBOT_i = `CLIP_BOTH(PBOT , `P_cliplow,`P_cliphigh); PSTI_i = `CLIP_BOTH(PSTI , `P_cliplow,`P_cliphigh); PGAT_i = `CLIP_BOTH(PGAT , `P_cliplow,`P_cliphigh); IDSATRBOT_i = `CLIP_LOW( IDSATRBOT , `IDSATR_cliplow); IDSATRSTI_i = `CLIP_LOW( IDSATRSTI , `IDSATR_cliplow); IDSATRGAT_i = `CLIP_LOW( IDSATRGAT , `IDSATR_cliplow); CSRHBOT_i = `CLIP_LOW( CSRHBOT , `CSRH_cliplow); CSRHSTI_i = `CLIP_LOW( CSRHSTI , `CSRH_cliplow); CSRHGAT_i = `CLIP_LOW( CSRHGAT , `CSRH_cliplow); XJUNSTI_i = `CLIP_LOW( XJUNSTI , `XJUN_cliplow); XJUNGAT_i = `CLIP_LOW( XJUNGAT , `XJUN_cliplow); CTATBOT_i = `CLIP_LOW( CTATBOT , `CTAT_cliplow); CTATSTI_i = `CLIP_LOW( CTATSTI , `CTAT_cliplow); CTATGAT_i = `CLIP_LOW( CTATGAT , `CTAT_cliplow); MEFFTATBOT_i = `CLIP_LOW( MEFFTATBOT, `MEFFTAT_cliplow); MEFFTATSTI_i = `CLIP_LOW( MEFFTATSTI, `MEFFTAT_cliplow); MEFFTATGAT_i = `CLIP_LOW( MEFFTATGAT, `MEFFTAT_cliplow); CBBTBOT_i = `CLIP_LOW( CBBTBOT , `CBBT_cliplow); CBBTSTI_i = `CLIP_LOW( CBBTSTI , `CBBT_cliplow); CBBTGAT_i = `CLIP_LOW( CBBTGAT , `CBBT_cliplow); VBRBOT_i = `CLIP_LOW( VBRBOT , `VBR_cliplow); VBRSTI_i = `CLIP_LOW( VBRSTI , `VBR_cliplow); VBRGAT_i = `CLIP_LOW( VBRGAT , `VBR_cliplow); PBRBOT_i = `CLIP_LOW( PBRBOT , `PBR_cliplow); PBRSTI_i = `CLIP_LOW( PBRSTI , `PBR_cliplow); PBRGAT_i = `CLIP_LOW( PBRGAT , `PBR_cliplow); tkr = `KELVINCONVERSION + TRJ_i; tkd = max($temperature + DTA, `KELVINCONVERSION + `MINTEMP); auxt = tkd / tkr; KBOL_over_QELE = `KBOL / `QELE; phitr = KBOL_over_QELE * tkr; phitrinv = 1.0 / phitr; phitd = KBOL_over_QELE * tkd; phitdinv = 1.0 / phitd; // bandgap voltages at reference temperature deltaphigr = -(7.02e-4 * tkr * tkr) / (1108.0 + tkr); phigrbot = PHIGBOT + deltaphigr; phigrsti = PHIGSTI + deltaphigr; phigrgat = PHIGGAT + deltaphigr; // bandgap voltages at device temperature deltaphigd = -(7.02e-4 * tkd * tkd) / (1108.0 + tkd); phigdbot = PHIGBOT + deltaphigd; phigdsti = PHIGSTI + deltaphigd; phigdgat = PHIGGAT + deltaphigd; // factors ftd for ideal-current model ftdbot = (pow(auxt, 1.5)) * exp(0.5 * ((phigrbot * phitrinv) - (phigdbot * phitdinv))); ftdsti = (pow(auxt, 1.5)) * exp(0.5 * ((phigrsti * phitrinv) - (phigdsti * phitdinv))); ftdgat = (pow(auxt, 1.5)) * exp(0.5 * ((phigrgat * phitrinv) - (phigdgat * phitdinv))); // temperature-scaled saturation current for ideal-current model idsatbot = IDSATRBOT_i * ftdbot * ftdbot; idsatsti = IDSATRSTI_i * ftdsti * ftdsti; idsatgat = IDSATRGAT_i * ftdgat * ftdgat; // built-in voltages before limiting ubibot = VBIRBOT_i * auxt - 2 * phitd * ln(ftdbot); ubisti = VBIRSTI_i * auxt - 2 * phitd * ln(ftdsti); ubigat = VBIRGAT_i * auxt - 2 * phitd * ln(ftdgat); // built-in voltages limited to phitd vbibot = ubibot + phitd * ln(1 + exp((`vbilow - ubibot) * phitdinv)); vbisti = ubisti + phitd * ln(1 + exp((`vbilow - ubisti) * phitdinv)); vbigat = ubigat + phitd * ln(1 + exp((`vbilow - ubigat) * phitdinv)); // inverse values of built-in voltages vbiinvbot = 1.0 / vbibot; vbiinvsti = 1.0 / vbisti; vbiinvgat = 1.0 / vbigat; // one minus the grading coefficient one_minus_PBOT = 1 - PBOT_i; one_minus_PSTI = 1 - PSTI_i; one_minus_PGAT = 1 - PGAT_i; // one over "one minus the grading coefficient" one_over_one_minus_PBOT = 1 / one_minus_PBOT; one_over_one_minus_PSTI = 1 / one_minus_PSTI; one_over_one_minus_PGAT = 1 / one_minus_PGAT; // temperature-scaled zero-bias capacitance cjobot = CJORBOT_i * pow((VBIRBOT_i * vbiinvbot), PBOT_i); cjosti = CJORSTI_i * pow((VBIRSTI_i * vbiinvsti), PSTI_i); cjogat = CJORGAT_i * pow((VBIRGAT_i * vbiinvgat), PGAT_i); // prefactor in physical part of charge model qprefbot = cjobot * vbibot * one_over_one_minus_PBOT; qprefsti = cjosti * vbisti * one_over_one_minus_PSTI; qprefgat = cjogat * vbigat * one_over_one_minus_PGAT; // prefactor in mathematical extension of charge model qpref2bot = `a * cjobot; qpref2sti = `a * cjosti; qpref2gat = `a * cjogat; // zero-bias depletion widths at reference temperature, needed in SRH and TAT model wdepnulrbot = `EPSSI / CJORBOT_i; wdepnulrsti = XJUNSTI_i * `EPSSI / CJORSTI_i; wdepnulrgat = XJUNGAT_i * `EPSSI / CJORGAT_i; // inverse values of "wdepnulr", used in BBT model wdepnulrinvbot = 1 / wdepnulrbot; wdepnulrinvsti = 1 / wdepnulrsti; wdepnulrinvgat = 1 / wdepnulrgat; // inverse values of built-in voltages at reference temperature, needed in SRH and BBT model VBIRBOTinv = 1 / VBIRBOT_i; VBIRSTIinv = 1 / VBIRSTI_i; VBIRGATinv = 1 / VBIRGAT_i; // some constants needed in erfc-approximation, needed in TAT model perfc = (`SQRTPI * `aerfc); berfc = ((-5 * (`aerfc) + 6 - pow((perfc), -2)) / 3); cerfc = (1.0 - (`aerfc) - (berfc)); // half the bandgap energy, limited to values > phitd, needed in TAT model deltaEbot = max(0.5 * phigdbot, phitd); deltaEsti = max(0.5 * phigdsti, phitd); deltaEgat = max(0.5 * phigdgat, phitd); // values of atat, needed in TAT model atatbot = deltaEbot * phitdinv; atatsti = deltaEsti * phitdinv; atatgat = deltaEgat * phitdinv; // values of btatpart, needed in TAT model btatpartbot = sqrt(32 * MEFFTATBOT_i * `MELE * `QELE * (deltaEbot * deltaEbot * deltaEbot)) / (3 * `HBAR); btatpartsti = sqrt(32 * MEFFTATSTI_i * `MELE * `QELE * (deltaEsti * deltaEsti * deltaEsti)) / (3 * `HBAR); btatpartgat = sqrt(32 * MEFFTATGAT_i * `MELE * `QELE * (deltaEgat * deltaEgat * deltaEgat)) / (3 * `HBAR); // temperature-scaled values of FBBT, needed in BBT model fbbtbot = FBBTRBOT * (1 + STFBBTBOT * (tkd - tkr)); fbbtsti = FBBTRSTI * (1 + STFBBTSTI * (tkd - tkr)); fbbtgat = FBBTRGAT * (1 + STFBBTGAT * (tkd - tkr)); // values of fstop, needed in avalanche/breakdown model fstopbot = 1 / (1 - pow(`alphaav, PBRBOT_i)); fstopsti = 1 / (1 - pow(`alphaav, PBRSTI_i)); fstopgat = 1 / (1 - pow(`alphaav, PBRGAT_i)); // inverse values of breakdown voltages, needed in avalanche/breakdown model VBRinvbot = 1 / VBRBOT_i; VBRinvsti = 1 / VBRSTI_i; VBRinvgat = 1 / VBRGAT_i; // slopes for linear extraploation close to and beyond breakdown, needed in avalanche/breakdown model slopebot = -(fstopbot * fstopbot * pow(`alphaav, (PBRBOT_i - 1))) * PBRBOT_i * VBRinvbot; slopesti = -(fstopsti * fstopsti * pow(`alphaav, (PBRSTI_i - 1))) * PBRSTI_i * VBRinvsti; slopegat = -(fstopgat * fstopgat * pow(`alphaav, (PBRGAT_i - 1))) * PBRGAT_i * VBRinvgat; ngspice-26/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_macrodefs.include0000644000265600020320000002451212264261473026256 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: JUNCAP200_macrodefs.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1 (PSP), 200.2 (JUNCAP), April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // /////////////////////////////////////////// // // Macros and constants used in JUNCAP2 // /////////////////////////////////////////// // Other constants `define MINTEMP -250 `define vbilow 0.050 `define a 2 `define epsch 0.1 `define dvbi 0.050 `define epsav 1E-6 `define vbrmax 1000 `define alphaav 0.999 `define vmaxlarge 1E8 `define aerfc 0.29214664 `define twothirds 0.666666666666667 // Clipping values `define levelnumber 200 `define AB_cliplow 0 `define LS_cliplow 0 `define LG_cliplow 0 `define MULT_cliplow 0 `define TRJ_cliplow `MINTEMP `define IMAX_cliplow 1E-12 `define CJORBOT_cliplow 1E-12 `define CJORSTI_cliplow 1E-18 `define CJORGAT_cliplow 1E-18 `define VBIR_cliplow `vbilow `define P_cliplow 0.05 `define P_cliphigh 0.95 `define IDSATR_cliplow 0 `define CSRH_cliplow 0 `define XJUN_cliplow 1E-9 `define CTAT_cliplow 0 `define MEFFTAT_cliplow 0.01 `define CBBT_cliplow 0 `define VBR_cliplow 0.1 `define PBR_cliplow 0.1 ///////////////////////////////////////////////////////////////////////////// // // Macro definitions. // // Note that because at present locally scoped variables // can only be in named blocks, the intermediate variables // used in the macros below must be explicitly declared // as variables. // ///////////////////////////////////////////////////////////////////////////// // Instance parameter dependent initialization `define JuncapInitInstance(AB_i, LS_i, LG_i, VMAX, vbimin, vch, vfmin, vbbtlim) \ if (idsatbot * AB_i > 0) begin \ vmaxbot = phitd * ln(IMAX_i / (idsatbot * AB_i) + 1); \ end else begin \ vmaxbot = `vmaxlarge; \ end \ if (idsatsti * LS_i > 0) begin \ vmaxsti = phitd * ln(IMAX_i / (idsatsti * LS_i) + 1); \ end else begin \ vmaxsti = `vmaxlarge; \ end \ if (idsatgat * LG_i > 0) begin \ vmaxgat = phitd * ln(IMAX_i / (idsatgat * LG_i) + 1); \ end else begin \ vmaxgat = `vmaxlarge; \ end \ VMAX = min(min(vmaxbot, vmaxsti), vmaxgat); \ \ /* determination of minimum value of the relevant built-in voltages */ \ vbibot2 = vbibot; \ vbisti2 = vbisti; \ vbigat2 = vbigat; \ if (AB_i == 0) begin vbibot2 = vbisti + vbigat; end \ if (LS_i == 0) begin vbisti2 = vbibot + vbigat; end \ if (LG_i == 0) begin vbigat2 = vbibot + vbisti; end \ vbimin = min(min(vbibot2, vbisti2), vbigat2); \ vch = vbimin * `epsch; \ if (vbimin == vbibot) begin vfmin = vbibot * (1 - (pow(`a, (-1.0 / PBOT_i)))); end \ if (vbimin == vbisti) begin vfmin = vbisti * (1 - (pow(`a, (-1.0 / PSTI_i)))); end \ if (vbimin == vbigat) begin vfmin = vbigat * (1 - (pow(`a, (-1.0 / PGAT_i)))); end \ \ /* determination of limiting value of conditioned voltage for BBT calculation */ \ vbibot2r = VBIRBOT_i; \ vbisti2r = VBIRSTI_i; \ vbigat2r = VBIRGAT_i; \ if (AB_i == 0) begin vbibot2r = VBIRSTI_i + VBIRGAT_i; end \ if (LS_i == 0) begin vbisti2r = VBIRBOT_i + VBIRGAT_i; end \ if (LG_i == 0) begin vbigat2r = VBIRBOT_i + VBIRSTI_i; end \ vbbtlim = min(min(vbibot2r, vbisti2r), vbigat2r) - `dvbi; \ // Special power-functions `define mypower(x,power,result) \ if (power == 0.5) begin \ result = sqrt(x); \ end else begin \ result = pow(x, power); \ end `define mypower2(x,power,result) \ if (power == -1) begin \ result = 1 / (x); \ end else begin \ result = pow(x, power); \ end `define mypower3(x,power,result) \ if (power == 4) begin \ result = (x) * (x) * (x) * (x); \ end else begin \ result = pow(x, power); \ end // Smoothing functions `define hypfunction2(x,x0,eps,hyp2) \ hyp2 = 0.5 * ((x) + (x0) - sqrt(((x) - (x0)) * ((x) - (x0)) + 4 * (eps) * (eps))); `define hypfunction5(x,x0,eps,hyp5) \ h1 = 4.0 * (eps) * (eps); \ h2 = (eps) / (x0); \ h2d = (x) + (eps) * h2; \ h3 = (x0) + h2d; \ h4 = (x0) - h2d; \ h5 = sqrt(h4 * h4 + h1); \ hyp5 = 2.0 * ((x) * (x0) / (h3 + h5)); // A special function used to calculate TAT-currents, // including an approximation of the erfc-function `define calcerfcexpmtat(y,m,result) \ ysq = y * y; \ if (y > 0) begin \ terfc = 1 / (1 + perfc * y); \ end else begin \ terfc = 1 / (1 - perfc * y); \ end \ `expl_low(-ysq + m, tmp) \ erfcpos = (`aerfc * terfc + berfc * (terfc * terfc) + cerfc * (terfc * terfc * terfc)) * tmp; \ if (y > 0) begin \ result = erfcpos; \ end else begin\ `expl_low(m, tmp) \ result = 2 * tmp - erfcpos; \ end // This is the main function of the JUNCAP2-model. It returns the current and charge // for a single diode `define juncapfunction(qpref,qpref2,vbiinv,one_minus_P,idsat,CSRH,CTAT,vbi,wdepnulr,VBIRinv,P,ftd,btatpart,atat,one_over_one_minus_P,CBBT,VBIR,wdepnulrinv,fbbt,VBR,VBRinv,PBR,fstop,slope,Ijprime,Qjprime) \ `mypower((1 - vj * vbiinv), one_minus_P, tmp) \ Qjprime = qpref * (1 - tmp) + qpref2 * (VAK - vj); \ id = idsat * idmult; \ if ((CSRH == 0) && (CTAT == 0)) begin \ isrh = 0; \ end else begin \ vbi_minus_vjsrh = vbi-vjsrh; \ wsrhstep = 1 - sqrt(1 - two_psistar / vbi_minus_vjsrh); \ if (P == 0.5) begin \ dwsrh = 0; \ end else begin \ dwsrh = ((wsrhstep * wsrhstep * ln(wsrhstep) / (1 - wsrhstep)) + wsrhstep) * (1 - 2 * P); \ end \ wsrh = wsrhstep + dwsrh; \ `mypower(vbi_minus_vjsrh * VBIRinv, P, tmp) \ wdep = wdepnulr * tmp; \ asrh = ftd * ((zinv - 1) * wdep); \ isrh = CSRH * (asrh * wsrh); \ end \ if (CTAT == 0) begin \ itat = 0; \ end else begin \ btat = btatpart * ((wdep * one_minus_P) / vbi_minus_vjsrh); \ twoatatoverthreebtat = (`twothirds * atat) / btat; \ umaxbeforelimiting = twoatatoverthreebtat * twoatatoverthreebtat; \ umax = sqrt(umaxbeforelimiting * umaxbeforelimiting / (umaxbeforelimiting * umaxbeforelimiting + 1)); \ sqrtumax = sqrt(abs(umax)); \ umaxpoweronepointfive = umax * sqrtumax; \ `mypower2((1 + btat * umaxpoweronepointfive), (-P * one_over_one_minus_P), wgamma) \ wtat = wsrh * wgamma / (wsrh + wgamma); \ ktat = sqrt(0.375 * (btat / sqrtumax)); \ ltat = 2 * (twoatatoverthreebtat * sqrtumax) - umax; \ mtat = atat * twoatatoverthreebtat * sqrtumax - atat * umax + 0.5 * (btat * umaxpoweronepointfive); \ xerfc = (ltat - 1) * ktat; \ `calcerfcexpmtat(xerfc, mtat, erfctimesexpmtat) \ gammamax = `SQRTPI * 0.5 * (atat * erfctimesexpmtat / ktat); \ itat = CTAT * (asrh * gammamax * wtat); \ end \ if (CBBT == 0) begin \ ibbt = 0; \ end else begin \ `mypower(((VBIR - vbbt) * VBIRinv), P, tmp) \ Fmaxr = one_over_one_minus_P * ((VBIR - vbbt) * wdepnulrinv / tmp); \ `expl(-fbbt / Fmaxr, tmp) \ ibbt = CBBT * (VAK * Fmaxr * Fmaxr * tmp); \ end \ if (VBR > `vbrmax) begin \ fbreakdown = 1; \ end else begin \ if (vav > -`alphaav * VBR) begin \ `mypower3(abs(vav * VBRinv), PBR, tmp) \ fbreakdown = 1 / (1 - tmp); \ end else begin \ fbreakdown = fstop + (vav + `alphaav * VBR) * slope; \ end \ end \ Ijprime = (id + isrh + itat + ibbt) * fbreakdown; // The following code is written as a macro because the naming of the instance parameters is // different for JUNCAP2 stand-alone and JUNCAP2-in-PSP: AB, LS, LG for JUNCAP2 stand-alone, // ABSOURCE, LSSOURCE, LGSOURCE for source junction in PSP and ABDRAIN, LSDRAIN, LGDRAIN for // drain junction in PSP `define juncapcommon(AB_i,LS_i,LG_i,ijunbot,qjunbot,ijunsti,qjunsti,ijungat,qjungat) \ vbbt = 0.0; \ two_psistar = 0.0; \ if ( !( ((AB_i) == 0) && ((LS_i) == 0) && ((LG_i) == 0) ) ) begin \ `hypfunction5(VAK, vfmin, vch, vj) \ if (VAK < VMAX) begin \ `expl(0.5 * (VAK * phitdinv), zinv) \ idmult = zinv * zinv; \ end else begin \ `expl(VMAX * phitdinv, exp_VMAX_over_phitd) \ idmult = (1 + (VAK - VMAX) * phitdinv) * exp_VMAX_over_phitd; \ zinv = sqrt(idmult); \ end \ idmult = idmult - 1.0; \ z = 1 / zinv; \ if (VAK > 0) begin \ two_psistar = 2.0 * (phitd * ln(2.0 + z + sqrt((z + 1.0) * (z + 3.0)))); \ end else begin \ two_psistar = -VAK + 2.0 * (phitd * ln(2 * zinv + 1 + sqrt((1 + zinv) * (1 + 3 * zinv)))); \ end \ vjlim = vbimin - two_psistar; \ `hypfunction2(VAK, vjlim, phitd, vjsrh) \ `hypfunction2(VAK, vbbtlim, phitr, vbbt) \ `hypfunction2(VAK, 0, `epsav, vav) \ end \ if ((AB_i) == 0) begin \ ijunbot = 0; \ qjunbot = 0; \ end else begin \ `juncapfunction(qprefbot,qpref2bot,vbiinvbot,one_minus_PBOT,idsatbot,CSRHBOT_i,CTATBOT_i,vbibot,wdepnulrbot,VBIRBOTinv,PBOT_i,ftdbot,btatpartbot,atatbot,one_over_one_minus_PBOT,CBBTBOT_i,VBIRBOT_i,wdepnulrinvbot,fbbtbot,VBRBOT_i,VBRinvbot,PBRBOT_i,fstopbot,slopebot,ijunbot, qjunbot) \ end \ if ((LS_i) == 0) begin \ ijunsti = 0; \ qjunsti = 0; \ end else begin \ `juncapfunction(qprefsti,qpref2sti,vbiinvsti,one_minus_PSTI,idsatsti,CSRHSTI_i,CTATSTI_i,vbisti,wdepnulrsti,VBIRSTIinv,PSTI_i,ftdsti,btatpartsti,atatsti,one_over_one_minus_PSTI,CBBTSTI_i,VBIRSTI_i,wdepnulrinvsti,fbbtsti,VBRSTI_i,VBRinvsti,PBRSTI_i,fstopsti,slopesti,ijunsti, qjunsti) \ end \ if ((LG_i) == 0) begin \ ijungat = 0; \ qjungat = 0; \ end else begin \ `juncapfunction(qprefgat,qpref2gat,vbiinvgat,one_minus_PGAT,idsatgat,CSRHGAT_i,CTATGAT_i,vbigat,wdepnulrgat,VBIRGATinv,PGAT_i,ftdgat,btatpartgat,atatgat,one_over_one_minus_PGAT,CBBTGAT_i,VBIRGAT_i,wdepnulrinvgat,fbbtgat,VBRGAT_i,VBRinvgat,PBRGAT_i,fstopgat,slopegat,ijungat, qjungat) \ end ngspice-26/src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include0000644000265600020320000001723712264261473025777 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: JUNCAP200_parlist.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1 (PSP), 200.2 (JUNCAP), April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ////////////////////////////////////////// // // JUNCAP2 - Reduced parameterlist // ////////////////////////////////////////// parameter real IMAX = 1000 `from(`IMAX_cliplow ,inf ) `P(info="Maximum current up to which forward current behaves exponentially" unit="A" ); parameter real CJORBOT = 1E-3 `from(`CJORBOT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-area of bottom component" unit="Fm^-2" ); parameter real CJORSTI = 1E-9 `from(`CJORSTI_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of STI-edge component" unit="Fm^-1" ); parameter real CJORGAT = 1E-9 `from(`CJORGAT_cliplow ,inf ) `P(info="Zero-bias capacitance per unit-of-length of gate-edge component" unit="Fm^-1" ); parameter real VBIRBOT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of bottom component" unit="V" ); parameter real VBIRSTI = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of STI-edge component" unit="V" ); parameter real VBIRGAT = 1 `from(`VBIR_cliplow ,inf ) `P(info="Built-in voltage at the reference temperature of gate-edge component" unit="V" ); parameter real PBOT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of bottom component" unit="" ); parameter real PSTI = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of STI-edge component" unit="" ); parameter real PGAT = 0.5 `from(`P_cliplow ,`P_cliphigh ) `P(info="Grading coefficient of gate-edge component" unit="" ); parameter real PHIGBOT = 1.16 `P(info="Zero-temperature bandgap voltage of bottom component" unit="V" ); parameter real PHIGSTI = 1.16 `P(info="Zero-temperature bandgap voltage of STI-edge component" unit="V" ); parameter real PHIGGAT = 1.16 `P(info="Zero-temperature bandgap voltage of gate-edge component" unit="V" ); parameter real IDSATRBOT = 1E-12 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of bottom component" unit="Am^-2" ); parameter real IDSATRSTI = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of STI-edge component" unit="Am^-1" ); parameter real IDSATRGAT = 1E-18 `from(`IDSATR_cliplow ,inf ) `P(info="Saturation current density at the reference temperature of gate-edge component" unit="Am^-1" ); parameter real CSRHBOT = 1E2 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of bottom component" unit="Am^-3" ); parameter real CSRHSTI = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of STI-edge component" unit="Am^-2" ); parameter real CSRHGAT = 1E-4 `from(`CSRH_cliplow ,inf ) `P(info="Shockley-Read-Hall prefactor of gate-edge component" unit="Am^-2" ); parameter real XJUNSTI = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of STI-edge component" unit="m" ); parameter real XJUNGAT = 100E-9 `from(`XJUN_cliplow ,inf ) `P(info="Junction depth of gate-edge component" unit="m" ); parameter real CTATBOT = 1E2 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of bottom component" unit="Am^-3" ); parameter real CTATSTI = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of STI-edge component" unit="Am^-2" ); parameter real CTATGAT = 1E-4 `from(`CTAT_cliplow ,inf ) `P(info="Trap-assisted tunneling prefactor of gate-edge component" unit="Am^-2" ); parameter real MEFFTATBOT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of bottom component" unit="" ); parameter real MEFFTATSTI = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of STI-edge component" unit="" ); parameter real MEFFTATGAT = 0.25 `from(`MEFFTAT_cliplow ,inf ) `P(info="Effective mass (in units of m0) for trap-assisted tunneling of gate-edge component" unit="" ); parameter real CBBTBOT = 1E-12 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of bottom component" unit="AV^-3" ); parameter real CBBTSTI = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of STI-edge component" unit="AV^-3m" ); parameter real CBBTGAT = 1E-18 `from(`CBBT_cliplow ,inf ) `P(info="Band-to-band tunneling prefactor of gate-edge component" unit="AV^-3m" ); parameter real FBBTRBOT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of bottom component" unit="Vm^-1" ); parameter real FBBTRSTI = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of STI-edge component" unit="Vm^-1" ); parameter real FBBTRGAT = 1E9 `P(info="Normalization field at the reference temperature for band-to-band tunneling of gate-edge component" unit="Vm^-1" ); parameter real STFBBTBOT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of bottom component" unit="K^-1" ); parameter real STFBBTSTI = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of STI-edge component" unit="K^-1" ); parameter real STFBBTGAT = -1E-3 `P(info="Temperature scaling parameter for band-to-band tunneling of gate-edge component" unit="K^-1" ); parameter real VBRBOT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of bottom component" unit="V" ); parameter real VBRSTI = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of STI-edge component" unit="V" ); parameter real VBRGAT = 10 `from(`VBR_cliplow ,inf ) `P(info="Breakdown voltage of gate-edge component" unit="V" ); parameter real PBRBOT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of bottom component" unit="V" ); parameter real PBRSTI = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of STI-edge component" unit="V" ); parameter real PBRGAT = 4 `from(`PBR_cliplow ,inf ) `P(info="Breakdown onset tuning parameter of gate-edge component" unit="V" ); ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_InitNQS.include0000644000265600020320000001706412264261473025267 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_InitNQS.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ///////////////////////////////////////////////////////////////////////////// // // Computing initial (dc) values for internal nodes. // This code is independent of internal-node voltages // ///////////////////////////////////////////////////////////////////////////// Qp1_0 = 0.0; Qp2_0 = 0.0; Qp3_0 = 0.0; Qp4_0 = 0.0; Qp5_0 = 0.0; Qp6_0 = 0.0; Qp7_0 = 0.0; Qp8_0 = 0.0; Qp9_0 = 0.0; fk1 = 0.0; fk2 = 0.0; fk3 = 0.0; fk4 = 0.0; fk5 = 0.0; fk6 = 0.0; fk7 = 0.0; fk8 = 0.0; fk9 = 0.0; if (SWNQS_i != 0) begin dQis = 0.0; dQy = 0.0; dfQi = 0.0; fQi = 0.0; d2Qy = 0.0; Qp1 = 0.0; Qp2 = 0.0; Qp3 = 0.0; Qp4 = 0.0; Qp5 = 0.0; Qp6 = 0.0; Qp7 = 0.0; Qp8 = 0.0; Qp9 = 0.0; phi_p1 = 0.0; phi_p2 = 0.0; phi_p3 = 0.0; phi_p4 = 0.0; phi_p5 = 0.0; phi_p6 = 0.0; phi_p7 = 0.0; phi_p8 = 0.0; phi_p9 = 0.0; // Setting initial values for charge along the channel // from interpolated DC-solution if (xg > 0) begin if (SWNQS_i == 1) begin phi_p1 = `Phiy(0.5); `PhiToQb(phi_p1,Qb_tmp) Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp; end else if (SWNQS_i == 2) begin phi_p1 = `Phiy(`oneThird); `PhiToQb(phi_p1,Qb_tmp) Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp; phi_p2 = `Phiy(`twoThirds); `PhiToQb(phi_p2,Qb_tmp) Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp; if (sigVds < 0) begin `swap(Qp1_0, Qp2_0) end end else if (SWNQS_i == 3) begin phi_p1 = `Phiy(0.25); `PhiToQb(phi_p1,Qb_tmp) Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp; phi_p2 = `Phiy(0.5); `PhiToQb(phi_p2,Qb_tmp) Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp; phi_p3 = `Phiy(0.75); `PhiToQb(phi_p3,Qb_tmp) Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp; if (sigVds < 0) begin `swap(Qp1_0, Qp3_0) end end else if (SWNQS_i == 5) begin phi_p1 = `Phiy(`oneSixth); `PhiToQb(phi_p1,Qb_tmp) Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp; phi_p2 = `Phiy(`oneThird); `PhiToQb(phi_p2,Qb_tmp) Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp; phi_p3 = `Phiy(0.5); `PhiToQb(phi_p3,Qb_tmp) Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp; phi_p4 = `Phiy(`twoThirds); `PhiToQb(phi_p4,Qb_tmp) Qp4_0 = -pd * (xg - phi_p4) - Qb_tmp; phi_p5 = `Phiy(0.8333333333333333); `PhiToQb(phi_p5,Qb_tmp) Qp5_0 = -pd * (xg - phi_p5) - Qb_tmp; if (sigVds < 0) begin `swap(Qp1_0, Qp5_0) `swap(Qp2_0, Qp4_0) end end else if (SWNQS_i == 9) begin phi_p1 = `Phiy(0.1); `PhiToQb(phi_p1,Qb_tmp) Qp1_0 = -pd * (xg - phi_p1) - Qb_tmp; phi_p2 = `Phiy(0.2); `PhiToQb(phi_p2,Qb_tmp) Qp2_0 = -pd * (xg - phi_p2) - Qb_tmp; phi_p3 = `Phiy(0.3); `PhiToQb(phi_p3,Qb_tmp) Qp3_0 = -pd * (xg - phi_p3) - Qb_tmp; phi_p4 = `Phiy(0.4); `PhiToQb(phi_p4,Qb_tmp) Qp4_0 = -pd * (xg - phi_p4) - Qb_tmp; phi_p5 = `Phiy(0.5); `PhiToQb(phi_p5,Qb_tmp) Qp5_0 = -pd * (xg - phi_p5) - Qb_tmp; phi_p6 = `Phiy(0.6); `PhiToQb(phi_p6,Qb_tmp) Qp6_0 = -pd * (xg - phi_p6) - Qb_tmp; phi_p7 = `Phiy(0.7); `PhiToQb(phi_p7,Qb_tmp) Qp7_0 = -pd * (xg - phi_p7) - Qb_tmp; phi_p8 = `Phiy(0.8); `PhiToQb(phi_p8,Qb_tmp) Qp8_0 = -pd * (xg - phi_p8) - Qb_tmp; phi_p9 = `Phiy(0.9); `PhiToQb(phi_p9,Qb_tmp) Qp9_0 = -pd * (xg - phi_p9) - Qb_tmp; if (sigVds < 0) begin `swap(Qp1_0, Qp9_0) `swap(Qp2_0, Qp8_0) `swap(Qp3_0, Qp7_0) `swap(Qp4_0, Qp6_0) end end end // (x_g >0) end // (SWNQS_i != 0) x_sp = 0.0; x_dp = 0.0; Qp0 = 0.0; QpN = 0.0; if (SWNQS_i != 0.0) begin x_sp = x_m - sigVds * 0.5 * dps * inv_phit1; x_dp = x_m + sigVds * 0.5 * dps * inv_phit1; Qp0 = 0.0; QpN = 0.0; if (x_sp > 0) begin `PhiToQb(x_sp, QbSIGN) Qp0 = -pd * (xg - x_sp) - QbSIGN; end if (x_dp > 0) begin `PhiToQb(x_dp, QbSIGN) QpN = -pd * (xg - x_dp) - QbSIGN; end end ngspice-26/src/spicelib/devices/adms/psp102/admsva/readme.txt0000644000265600020320000001354212264261473023463 0ustar andreasadmin====================================================================================== ====================================================================================== --------------------------- Verilog-A definition of PSP --------------------------- (c) Copyright 2007, All Rights Reserved, NXP Semiconductors Version: PSP 102.1 (including JUNCAP2 200.2), April 2007 (Simkit 2.5) ====================================================================================== ====================================================================================== Authors: G.D.J. Smit, A.J. Scholten, and D.B.M. Klaassen (NXP Semiconductors Research) R. van Langevelde (Philips Research) G. Gildenblat, X. Li, and W. Wu (The Arizona State University) The most recent version of the model code, the documentation, and contact information can be found on: http://PSPmodel.asu.edu/ or http://www.nxp.com/Philips_Models/ ====================================================================================== ====================================================================================== This package consists of several files: - readme.txt This file - psp102.va Main file for global ("geometrical") model - psp102b.va Main file for global binning model - psp102e.va Main file for local ("electrical") model - psp102_nqs.va Main file for global ("geometrical") model with NQS-effects - psp102b_nqs.va Main file for global binning model with NQS-effects - psp102e_nqs.va Main file for local ("electrical") model with NQS-effects - juncap200.va Main file for JUNCAP2 stand-alone model - SIMKIT_macrodefs.include Common macro definitions - PSP102_macrodefs.include Macro definitions for PSP - PSP102_module.include Actual model code for intrinsic MOS model - PSP102_binning.include Geometry scaling equation for binning - PSP102_binpars.include Parameterlist for global PSP binning model - PSP102_nqs_macrodefs.include Macro definitions for PSP-NQS - PSP102_InitNQS.include PSP-NQS initialization code - PSP102_ChargesNQS.include Calculation of NQS-charge contributions - JUNCAP200_macrodefs.include Macro definitions for JUNCAP2 model - JUNCAP200_parlist.include JUNCAP2 parameter list - JUNCAP200_varlist.include JUNCAP2 variable declarations - JUNCAP200_InitModel.include JUNCAP2 model initialization code ====================================================================================== ====================================================================================== Usage ----- Depending which model one wants to use, one should compile one of the seven .va-files (psp102.va, psp102b.va, psp102e.va, psp102_nqs.va, psp102b_nqs.va, psp102e_nqs.va, and juncap200.va). The module names are "PSP102VA" and "PSPNQS102VA" for the global PSP-model (QS and NQS, respectively), and similarly "PSP102BVA" and "PSPNQS102BVA" for the binning PSP-model, "PSP102EVA" and "PSPNQS102EVA" for the local PSP-model, and "JUNCAP200" for the JUNCAP2-model. ====================================================================================== ====================================================================================== Release notes va-code of PSP 102.1, including JUNCAP2 200.2 (April 2007) ------------------------------------------------------------------------ Focus in this release has been on improving the simulation speed of PSP and JUNCAP2. The model equations in this release of PSP 102.1 are identical to those in the October 2006 release. This version features some minor impelementation changes w.r.t. the previous release. The main changes have been in the SiMKit version generated from this verilog-A implementation: improvements in the automatic C-code generation process and compilation of the C-code. The result is reflected in the SiMKit 2.5 version of PSP, which shows a very significant simulation speed improvement w.r.t SiMKit 2.4. The minor implementation changes in the verilog-A code will have some positive effect on the simulation speed of the verilog-A version as well. Note, however, that the simulation speed of the verilog-A version of PSP and the improvement w.r.t. the previous version strongly depend on the verilog-A compiler used. PSP 102.1 is backwards compatible with the previous version, PSP 102.0. ====================================================================================== ====================================================================================== The functionality of the Verilog-A code in this package is the same as that of the C-code, which is contained in SIMKIT version 2.5. Note that Operating Point information is available only in the C-code, not in Verilog-A code. The PSP-NQS model is provided as Verilog-A code. In SiMKit 2.5, a test version of the PSP-NQS model is included (identical to that in SiMKit 2.4). This implementation circumvents the problem of the SpectreVerilog-A-generated C-code being too large to compile. Moreover, it is computationally more efficient as it uses less rows in the simulator matrix. On the other hand, this implementation has some known limitations. More information is available from the authors. Further improvements are expected in future releases. This Verilog-A code of PSP is primarily intended as a source for C-code generation using ADMS. Most of the testing has been done on the C-code which was generated from it. The authors want to thank Laurent Lemaitre and Colin McAndrew (Freescale) for their help with ADMS and the implementation of the model code. Geoffrey Coram (Analog Devices) is acknowledged for useful comments on the Verilog-A code. ngspice-26/src/spicelib/devices/adms/psp102/admsva/SIMKIT_macrodefs.include0000644000265600020320000001011212264261473026043 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: SIMKIT_macrodefs.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ////////////////////////////////////////////////////////////// // // General macros and constants for compact va-models // ////////////////////////////////////////////////////////////// `define VERS "0.0" `define VREV "0.0" `define VERSreal 0.0 `define VREVreal 0.0 `define CLIP_LOW(val,min) ((val)>(min)?(val):(min)) `define CLIP_HIGH(val,max) ((val)<(max)?(val):(max)) `define CLIP_BOTH(val,min,max) ((val)>(min)?((val)<(max)?(val):(max)):(min)) // Note 1: In this va-code, the `P-macro is defined such that its argument // is ignored during compilation; in this source code it acts as // a comment // Note 2: In this va-code, the "from" keyword in the parameter // list is not used. Silent clipping is used instead. One could enable // the Verilog-A range checking by redefining the `from-macro below. `define P(txt) `define AT_MODEL `define AT_INSTANCE `define AT_NOISE `define from(lower,upper) // `define from(lower,upper) from[lower:upper] // Some functions `define MAX(x,y) ((x)>(y)?(x):(y)) `define MIN(x,y) ((x)<(y)?(x):(y)) // Mathematical constants `define PI 3.1415926535897931 `define SQRTPI 1.77245385090551603 // Physical constants `define KELVINCONVERSION 273.15 `define KBOL 1.3806505E-23 `define QELE 1.6021918E-19 `define HBAR 1.05457168E-34 `define MELE 9.1093826E-31 `define EPSSI 1.045E-10 // Other constants `define oneThird 3.3333333333333333e-01 `define twoThirds 6.6666666666666667e-01 // Constants needed in safe exponential function (called "expl") `define se 4.6051701859880916e+02 `define se05 2.3025850929940458e+02 `define ke 1.0e-200 `define ke05 1.0e-100 `define keinv 1.0e200 `define ke05inv 1.0e100 ///////////////////////////////////////////////////////////////////////////// // // Macro definitions. // // Note that because variables in macros are not locally scoped, // the intermediate variables used in the macros below must be // explicitly declared in the main code. // ///////////////////////////////////////////////////////////////////////////// // P3 3rd order polynomial expansion of exp() `define P3(u) (1.0 + (u) * (1.0 + 0.5 * ((u) * (1.0 + (u) * `oneThird)))) // expl exp() with 3rd order polynomial extrapolation // for very low values (exp_low), very high // values (exp_high), or both (expl), to avoid overflows // and underflows and retain C-3 continuity `define expl(x, res) \ if (abs(x) < `se05) begin\ res = exp(x); \ end else begin \ if ((x) < -`se05) begin\ res = `ke05 / `P3(-`se05 - (x)); \ end else begin\ res = `ke05inv * `P3((x) - `se05); \ end \ end `define expl_low(x, res) \ if ((x) > -`se05) begin\ res = exp(x); \ end else begin\ res = `ke05 / `P3(-`se05 - (x)); \ end `define expl_high(x, res) \ if ((x) < `se05) begin\ res = exp(x); \ end else begin \ res = `ke05inv * `P3((x) - `se05); \ end `define swap(a, b) \ temp = a; \ a = b; \ b = temp; ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_nqs_macrodefs.include0000644000265600020320000001105612264261473026621 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_nqs_macrodefs.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // ////////////////////////////////////////// // // Macros used in PSP-NQS // ////////////////////////////////////////// // Function to calculate bulk charge from surface potential `define PhiToQb(phi,Qb_tmp) \ if (abs(phi) <= margin) \ Qb_tmp = -0.70710678 * phi * Gf * (1.0 - `oneSixth * phi * (1.0 - `oneSixth * phi)); \ else begin \ `expl((-phi), temp) \ Qb_tmp = Gf * sqrt(temp + phi - 1.0); \ if (phi > margin) \ Qb_tmp = -Qb_tmp; \ end // Function used in fq-macro `define PhiTod2Qis(xphi,d2Qis) \ if (abs(xphi) <= margin) begin \ Qb_tmp = -0.70710678 * xphi * Gf * (1.0 - `oneSixth * xphi * (1.0 - `oneSixth * xphi)); \ dQbs = -0.70710678 * Gf * (1.0 - `oneThird * xphi * (1.0 - 0.25 * xphi)); \ d2Qis = -0.235702 * Gf * (1.0 - 0.5 * xphi); \ end else begin \ `expl((-xphi),temp) \ Qb_tmp = Gf * sqrt(temp + xphi - 1.0); \ if (xphi > margin) \ Qb_tmp = -Qb_tmp; \ dQbs = 0.5 * Gf2 * (1.0 - temp) / Qb_tmp; \ d2Qis = (dQbs * dQbs - 0.5 * Gf * Gf) / Qb_tmp + dQbs; \ end // Function used in QiToPhi `define sps(sp, xg) \ if (abs(xg) <= marginp) begin \ sp = xg / a_factrp; \ end else begin \ if (xg < -marginp) begin \ NQS_yg = -xg; \ NQS_z = 1.25 * NQS_yg / a_factrp; \ NQS_eta = (NQS_z + 10.0 - sqrt((NQS_z - 6.0) * (NQS_z - 6.0) + 64.0)) * 0.5; \ NQS_a = (NQS_yg - NQS_eta) * (NQS_yg - NQS_eta) + Gp2 * (NQS_eta + 1.0); \ NQS_c = 2.0 * (NQS_yg - NQS_eta) - Gp2; \ NQS_tau = ln(NQS_a / Gp2) - NQS_eta; \ `sigma(NQS_a, NQS_c, NQS_tau, NQS_eta, NQS_y0) \ `expl(NQS_y0, NQS_D0) \ NQS_xi = 1.0 - Gp2 * NQS_D0 * 0.5; \ NQS_p = 2.0 * (NQS_yg - NQS_y0) + Gp2 * (NQS_D0 - 1.0); \ NQS_q = (NQS_yg - NQS_y0) * (NQS_yg - NQS_y0) + Gp2 * (NQS_y0 + 1.0 - NQS_D0); \ NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \ NQS_w = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \ sp = -(NQS_y0 + NQS_w); \ end else begin \ NQS_xg1 = 1.0 / ( 1.25 + 7.32464877560822e-01 * Gp); \ NQS_A_fac = (1.25 * a_factrp * NQS_xg1 - 1.0) * NQS_xg1; \ NQS_xbar = xg / a_factrp * (1.0 + NQS_A_fac * xg); \ `expl(-NQS_xbar, NQS_temp) \ NQS_w = 1.0 - NQS_temp; \ NQS_x0 = xg + Gp2 * 0.5 - Gp * sqrt(xg + Gp2 * 0.25 - NQS_w); \ `expl((-NQS_x0), NQS_D0) \ NQS_xi = 1.0 - Gp2 * 0.5 * NQS_D0; \ NQS_p = 2.0 * (xg - NQS_x0) + Gp2 * (1.0 - NQS_D0); \ NQS_q = (xg - NQS_x0) * (xg - NQS_x0) - Gp2 * (NQS_x0 - 1.0 + NQS_D0); \ NQS_temp = NQS_p * NQS_p - 4.0 * NQS_xi * NQS_q; \ NQS_u = 2.0 * NQS_q / (NQS_p + sqrt(NQS_temp)); \ sp = NQS_x0 + NQS_u; \ end \ end // Function to calculate surface potential from inversion charge `define QiToPhi(Qi,xg,xphi) \ temp = Qi / pd + xg; \ `sps(xphi,temp) // Calculation of fk `define fq(Qi,xg,dQy,d2Qy,fk) \ `QiToPhi(Qi, xg, xphi) \ `PhiTod2Qis(xphi, d2Qis) \ dQis = pd - dQbs; \ dQis_1 = 1.0 / dQis; \ fQi = Qi * dQis_1 - 1.0; \ dfQi = (1.0 - Qi * d2Qis * dQis_1 * dQis_1) * dQis_1; \ fk0 = dfQi * dQy * dQy + fQi * d2Qy; \ dpsy2 = dQy * dQy * dQis_1 * dQis_1; \ zsat = thesat2 * dpsy2; \ if (CHNL_TYPE == `PMOS) \ zsat = zsat / (1.0 + thesat1 * dps); \ temp = sqrt(1.0 + 2.0 * zsat); \ Fvsat = 2.0 / (1.0 + temp); \ temp1 = d2Qy - dpsy2 * d2Qis; \ fk = Fvsat * (fk0 - zsat * fQi * temp1 * Fvsat / temp); // Interpolation of surface potential along channel `define Phiy(y) \ x_m + H * (1.0 - sqrt(1.0 - 2.0 * dps / H * ((y) - ym))) * inv_phit1 ngspice-26/src/spicelib/devices/adms/psp102/admsva/PSP102_binning.include0000644000265600020320000001352312264261473025422 0ustar andreasadmin//====================================================================================== //====================================================================================== // Filename: PSP102_binning.include //====================================================================================== //====================================================================================== // // (c) Copyright 2007, All Rights Reserved, NXP Semiconductors // // // Version: 102.1, April 2007 (Simkit 2.5) // //====================================================================================== //====================================================================================== // // Further information can be found in the file readme.txt // // auxiliary variables iLEWE = iLE * iWE; iiLE = LE / LEN; iiWE = WE / WEN; iiLEWE = iiLE * iiWE; iiiLEWE = iiWE / iiLE; // auxiliary variables for COX only iiLEcv = LEcv / LEN; iiWEcv = WEcv / WEN; iiLEWEcv = iiLEcv * iiWEcv; // auxiliary variables for CGOV only iLEcv = LEN / LEcv; iiiLEWEcv = iiWEcv / iiLEcv; // auxiliary variables for CGBOV only iiLcv = Lcv / LEN; iiWcv = Wcv / WEN; iiLWcv = iiLcv * iiWcv; // auxiliary variables for CFR only iLcv = LEN / Lcv; iiiLWcv = iiWcv / iiLcv; // Process parameters VFB = POVFB + iLE * PLVFB + iWE * PWVFB + iLEWE * PLWVFB; STVFB = POSTVFB + iLE * PLSTVFB + iWE * PWSTVFB + iLEWE * PLWSTVFB; TOX = POTOX; NEFF = PONEFF + iLE * PLNEFF + iWE * PWNEFF + iLEWE * PLWNEFF; VNSUB = POVNSUB; NSLP = PONSLP; DNSUB = PODNSUB; DPHIB = PODPHIB + iLE * PLDPHIB + iWE * PWDPHIB + iLEWE * PLWDPHIB; NP = PONP + iLE * PLNP + iWE * PWNP + iLEWE * PLWNP; CT = POCT + iLE * PLCT + iWE * PWCT + iLEWE * PLWCT; TOXOV = POTOXOV; NOV = PONOV + iLE * PLNOV + iWE * PWNOV + iLEWE * PLWNOV; // DIBL parameters CF = POCF + iLE * PLCF + iWE * PWCF + iLEWE * PLWCF; CFB = POCFB; // Mobility parameters BETN = POBETN + iLE * PLBETN + iiWE * PWBETN + iiiLEWE * PLWBETN; STBET = POSTBET + iLE * PLSTBET + iWE * PWSTBET + iLEWE * PLWSTBET; MUE = POMUE + iLE * PLMUE + iWE * PWMUE + iLEWE * PLWMUE; STMUE = POSTMUE; THEMU = POTHEMU; STTHEMU = POSTTHEMU; CS = POCS + iLE * PLCS + iWE * PWCS + iLEWE * PLWCS; STCS = POSTCS; XCOR = POXCOR + iLE * PLXCOR + iWE * PWXCOR + iLEWE * PLWXCOR; STXCOR = POSTXCOR; FETA = POFETA; // Series resistance parameters RS = PORS + iLE * PLRS + iWE * PWRS + iLEWE * PLWRS; STRS = POSTRS; RSB = PORSB; RSG = PORSG; // Velocity saturation parameters THESAT = POTHESAT + iLE * PLTHESAT + iWE * PWTHESAT + iLEWE * PLWTHESAT; STTHESAT = POSTTHESAT + iLE * PLSTTHESAT + iWE * PWSTTHESAT + iLEWE * PLWSTTHESAT; THESATB = POTHESATB + iLE * PLTHESATB + iWE * PWTHESATB + iLEWE * PLWTHESATB; THESATG = POTHESATG + iLE * PLTHESATG + iWE * PWTHESATG + iLEWE * PLWTHESATG; // Saturation voltage parameters AX = POAX + iLE * PLAX + iWE * PWAX + iLEWE * PLWAX; // Channel length modulation (CLM) parameters ALP = POALP + iLE * PLALP + iWE * PWALP + iLEWE * PLWALP; ALP1 = POALP1 + iLE * PLALP1 + iWE * PWALP1 + iLEWE * PLWALP1; ALP2 = POALP2 + iLE * PLALP2 + iWE * PWALP2 + iLEWE * PLWALP2; VP = POVP; // Impact ionization parameters A1 = POA1 + iLE * PLA1 + iWE * PWA1 + iLEWE * PLWA1; A2 = POA2; STA2 = POSTA2; A3 = POA3 + iLE * PLA3 + iWE * PWA3 + iLEWE * PLWA3; A4 = POA4 + iLE * PLA4 + iWE * PWA4 + iLEWE * PLWA4; GCO = POGCO; // Gate current parameters IGINV = POIGINV + iiLE * PLIGINV + iiWE * PWIGINV + iiLEWE * PLWIGINV; IGOV = POIGOV + iLE * PLIGOV + iiWE * PWIGOV + iiiLEWE * PLWIGOV; STIG = POSTIG; GC2 = POGC2; GC3 = POGC3; CHIB = POCHIB; // Gate-induced drain leakage (GIDL) parameters AGIDL = POAGIDL + iLE * PLAGIDL + iiWE * PWAGIDL + iiiLEWE * PLWAGIDL; BGIDL = POBGIDL; STBGIDL = POSTBGIDL; CGIDL = POCGIDL; // Charge model parameters COX = POCOX + iiLEcv * PLCOX + iiWEcv * PWCOX + iiLEWEcv * PLWCOX; CGOV = POCGOV + iLEcv * PLCGOV + iiWEcv * PWCGOV + iiiLEWEcv * PLWCGOV; CGBOV = POCGBOV + iiLcv * PLCGBOV + iiWcv * PWCGBOV + iiLWcv * PLWCGBOV; CFR = POCFR + iLcv * PLCFR + iiWcv * PWCFR + iiiLWcv * PLWCFR; // Noise model parameters FNT = POFNT; NFA = PONFA + iLE * PLNFA + iWE * PWNFA + iLEWE * PLWNFA; NFB = PONFB + iLE * PLNFB + iWE * PWNFB + iLEWE * PLWNFB; NFC = PONFC + iLE * PLNFC + iWE * PWNFC + iLEWE * PLWNFC; ngspice-26/src/spicelib/devices/adms/psp102/admsva/readme.ngspice0000644000265600020320000000061112264261473024265 0ustar andreasadminngspice customizations of package psp102.1 ------------------------------------------ - Mon Apr 30 15:28:25 WEDT 2007 (Berlin) o renamed 'initializeModel/initializeInstance' to 'initial_model/initial_instance'. (this issue should go away when auto-partionning done in adms.) o redefined macro P(txt) in order to 'see' instance parameters o status: psp code created by adms compiles ngspice-26/src/spicelib/devices/adms/mextram/0000755000265600020320000000000012264261473020635 5ustar andreasadminngspice-26/src/spicelib/devices/adms/mextram/admsva/0000755000265600020320000000000012264261473022110 5ustar andreasadminngspice-26/src/spicelib/devices/adms/mextram/admsva/variables.inc0000644000265600020320000001062512264261473024557 0ustar andreasadmin// Declaration of variables real _x, _x0, _a, _dxa; real _circuit_gmin; // Model constants real An, Bn; // Temperature scaling variables real Tk, Trk, tN, Tamb; real Vt, Vtr, VtINV, VtrINV, VdtINV; real Vdt; real UdeT, VDE_T, UdcT, VDC_T; real CJE_T, CJC_T, XP_T; real CJCscale, CJCscaleINV; real RE_T, RBV_T, RBC_T, RCV_T; // RvdT: 30-01-2007, new collector resistances: real RCCxx_T, RCCex_T, RCCin_T; real BF_T, BRI_T; real IS_T, IK_T, IBF_T, IBR_T, VEF_T, VER_T; // RvdT: November 2008, Zener tunneling parameters and variables: real Izteb, IZEB_T, E0BE, dE0BE,nZEB_T, pow2_2mPE, pow2_PEm2, inv_VDE, inv_VDE_T; real eZEB, edZEB, DZEB, VGZEB_T, VGZEB_Tr, inv_VGZEB_Tr, CJE_T_div_CJE ; // RvdT: March 2009, Zener tunneling parameters and variables: real VGZEBOK; // end Zener tunneling parameters real TAUE_T, TAUB_T, TEPI_T, TAUR_T; real BnT, DEG_T, Tk300; `ifdef SELFHEATING real RTH_Tamb; `endif `ifdef SUBSTRATE real UdsT, VDS_T, CJS_T, ISS_T, ICSS_T, IKS_T; `endif // MULT - scaling variables real invMULT; real IS_TM, IK_TM, IBF_TM, IBR_TM, IHC_M; // RvdT: November 2008, Zener tunneling parameters real IZEB_TM ; // end Zener tunneling parameters real CJE_TM, CJC_TM; real RE_TM, RBC_TM, RBV_TM, RCV_TM, SCRCV_M; // RvdT: 30-01-2007, new collector resistances: real RCCxx_TM, RCCex_TM, RCCin_TM; // RvdT: 03-12-2007, new collector conductances: real GCCxx_TM, GCCex_TM, GCCin_TM; real KF_M, KFN_M; `ifdef SELFHEATING real RTH_Tamb_M, CTH_M; `endif `ifdef SUBSTRATE real ISS_TM, ICSS_TM, IKS_TM, CJS_TM; `endif // Epilayer model variables real K0, Kw, pW, Ec, Ic1c2; real Vqs_th, Vqs, Iqs; real alpha, vyi, yi, xi_w, xi_w1; real gp0, gp02, p0star, Vb2c2star, eVb2c2star; real B1, B2, Vxi0, Vch, Icap, pav; // Effective emitter and collector junction bias variables real Vfe, Vje, Vte; real Vjunc, bjc, Vfc, Vjc, fI, Vcv, Vtc; // Transfer current variables real If0, f1, f2, n0, nB; real q0I, q1I, qBI, Ir, If, In; // Base and substrate current(s) variables real Xext1; real Ib1, Ib1_s, Ib2, Ib3; real Ibf0, Iex; real g1, g2, pWex, nBex; real Xg1, XnBex, XIMex, XIMsub, Vex, VBex, Fex, XIex; `ifdef SUBSTRATE real Isub, XIsub, Isf; `endif // Distributed base effects variables real q0Q, q1Q, qBQ, Rb2, Ib1b2; real dVteVb2e1, dVteVje, dVjeVb2e1; real dQteVb2e1, dQbeVb2e1, dQeVb2e1; real dn0Vb2e1; // Weak-avalanche current variables real dEdx0, xd, Weff, Wd, Eav, E0, Em, SHw, Efi, Ew; real lambda, Gem, Gmax, Iavl; real Icap_IHC; `ifdef SELFHEATING real Tki, power; `endif // Charges and capacitances variables real Qte, Vje_s, Qte_s; real Qtc; real Qb0, Qbe, Qbc, Qb1b2; real Qbe_qs, Qbc_qs; real Vjcex, Vtexv, Qtex, XVjcex, XVtexv, XQtex; `ifdef SUBSTRATE real Vfs, Vjs, Qts; `endif real Qe0, Qe; real Qepi0, Qepi, Xg2, XpWex, XQex; real Qex; real CBEO_M, CBCO_M; // Biases and exponential terms variables real Vb2c1, Vb2c2, Vb2e1, Vb1e1, Vb1b2, Vb1c4, Vc1c2; // RvdT, 30-01-2007: new variables Vc3c4, Vc4c1 real Vc3c4, Vc4c1; // RvdT, 25-02-2008: new variables Vsc3, Vsc4 `ifdef SUBSTRATE real Vsc1, Vsc3, Vsc4, eVsc1; `endif real Vee1, Vbb1, Vbc3, Vcc3, Vbe, Vbc; real eVb2c2, eVb2e1, eVb1e1, eVb1b2, eVb1c4, eVbc3; real eVb1c4VDC, eVb2c2VDC, eVbc3VDC, eVb2c1VDC; // Help variables // RvdT, November 2008, lntN introduced to speed up T-scaling: // Acknowledgements due to Geoffrey Coram real lntN ; // RvdT, November 2008 variables for local use; may be re-used globally: real x, y ; real dxa, sqr_arg; real eps2, x2; real alpha1, vdif, Ic1c2_Iqs, gp0_help; real EmEav_Em, Vb2e1Vfe, termE, termC; real Vex_bias; real eps_VDC, a_VDE, a_VDC; real expl, tmpExp, tmpV; `ifdef SUBSTRATE real a_VDS; `endif // Noise variables real common; real powerREC, powerRBC, powerRCCxx, powerRCCex, powerRCCin, powerRBV; real powerCCS; real powerFBCS, powerFBC1fB1, exponentFBC1fB2, powerFBC1fB2; real powerEBSCS, powerEBSC1f; real powerRBCS, powerRBC1f; real powerExCS, powerExCSMOD, powerExC1f, powerExC1fMOD; `ifdef SUBSTRATE real powerSubsCS_B1S, powerSubsCS_BS; `endif //real twoqIavl, powerCCS_A, powerFBCS_A, powerAVL_B2C2; real twoqIavl, cor_exp_1, cor_exp_2, powerCCS_A; ngspice-26/src/spicelib/devices/adms/mextram/admsva/opinfo.inc0000644000265600020320000002254012264261473024100 0ustar andreasadmin// Evaluate the operating point (outout) variables begin `ifdef __VAMS_COMPACT_MODELING__ // The external currents and the current gain OP_ic = I(); // External DC collector current OP_ib = I(); // External DC base Current OP_betadc = OP_ic / OP_ib; // External DC Current gain // begin added in MXT 504.9: OP_ie = I(); // External DC emitter current OP_vbe = V(b, e); // External base-emitter bias OP_vce = V(c, e); // External collector-emitter bias OP_vbc = V(b, c); // External base-collector bias `ifdef SUBSTRATE OP_is = I(); // External DC emitter current OP_vse = V(s, e); // External substrate-emitter bias OP_vbs = V(b, s); // External base-substrate bias OP_vsc = V(s, c); // External substrate-collector bias `endif // end added in MXT 504.9: // The internal voltage differences OP_vb2e1 = Vb2e1; // Internal base-emiter bias OP_vb2c2 = Vb2c2; // Internal base-emiter bias OP_vb2c1 = Vb2c1; // Internal base-collector bias including epilayer OP_vb1c1 = Vb1b2 + Vb2c1; // External base-collector bias without contact resistances OP_vc4c1 = Vc4c1; // Bias over intrinsic buried layer OP_vc3c4 = Vc3c4; // Bias over extrinsic buried layer OP_ve1e = - Vee1; // Bias over emiter resistance // The branch currents OP_in = In; // Main current OP_ic1c2 = Ic1c2; // Epilayer current OP_ib1b2 = Ib1b2; // Pinched-base current OP_ib1 = Ib1; // Ideal forward base current OP_sib1 = Ib1_s; // Ideal side-wall base current // // 504.8, RvdT, TU-Delft April. 2009: // OP_izteb = Izteb ; // Zener tunneling current // OP_ib2 = Ib2; // Non-ideal forward base current OP_ib3 = Ib3; // Non-ideal reverse base current OP_iavl = Iavl; // Avalanche current OP_iex = Iex; // Extrinsic reverse base current OP_xiex = XIex; // Extrinsic reverse base current `ifdef SUBSTRATE OP_isub = Isub; // Substrate current OP_xisub = XIsub; // Substrate current OP_isf = Isf; // Substrate-collector current `endif OP_ire = - Vee1 / RE_TM; // Current through emiter resistance OP_irbc = Vbb1 / RBC_TM; // Current through constant base resistance OP_ircc = Vcc3 * GCCxx_TM; // Current through collector contact resistance OP_ircblx = Vc3c4 * GCCex_TM; // Current through extrinsic buried layer resistance OP_ircbli = Vc4c1 * GCCin_TM; // Current through extrinsic buried layer resistance // The branch charges OP_qe = Qe; // Emitter charge or emitter neutral charge OP_qte = Qte; // Base-emiter depletion charge OP_sqte = Qte_s; // Sidewall base-emiter depletion charge OP_qbe = Qbe; // Base-emiter diffusion charge OP_qbc = Qbc; // Base-collector diffusion charge OP_qtc = Qtc; // Base-colector depletion charge OP_qepi = Qepi; // Epilayer diffusion charge OP_qb1b2 = Qb1b2; // AC current crowding charge OP_qtex = Qtex; // Extrinsic base-collector depletion charge OP_xqtex = XQtex; // Extrinsic base-collector depletion charge OP_qex = Qex; // Extrinsic base-collector diffusion charge OP_xqex = XQex; // Extrinsic base-collector diffusion charge `ifdef SUBSTRATE OP_qts = Qts; // Collector substrate depletion charge `endif // Small signal equivalent circuit conductances and resistances OP_gx = - ddx(In, V(e1)); // Forward transconductance OP_gy = - ddx(In, V(c2)); // Reverse transconductance OP_gz = - ddx(In, V(c1)); // Reverse transconductance OP_sgpi = - ddx(Ib1_s, V(e)) - ddx(Ib1_s, V(e1)); // Conductance sidewal b-e junction OP_gpix = - ddx(Ib1+Ib2, V(e1)); // Conductance floor b-e junction OP_gpiy = - ddx(Ib1, V(c2)); // Early effect on recombination base current OP_gpiz = - ddx(Ib1, V(c1)); // Early effect on recombination base current OP_gmux = ddx( Iavl, V(e1)); // Early effect on avalanche current limitting OP_gmuy = ddx( Iavl, V(c2)); // Conductance of avalanche current OP_gmuz = - ddx(- Iavl, V(c1)); // Conductance of avalanche current // Conductance extrinsic b-c current : OP_gmuex = ddx(Iex+Ib3, V(e)) + ddx(Iex+Ib3, V(b1)) + ddx(Iex+Ib3, V(b2)) + ddx(Iex+Ib3, V(e1)) + ddx(Iex+Ib3, V(c2)); OP_xgmuex = ddx(XIex, V(b)) ; // Conductance extrinsic b-c current OP_grcvy = - ddx(Ic1c2, V(c2)); // Conductance of epilayer current OP_grcvz = - ddx(Ic1c2, V(c1)); // Conductance of epilayer current OP_rbv = 1.0 / (- ddx(Ib1b2, V(b2)) - ddx(Ib1b2, V(c2))); // Base resistance OP_grbvx = - ddx(Ib1b2, V(e)) - ddx(Ib1b2, V(e1)); // Early effect on base resistance OP_grbvy = - ddx(Ib1b2, V(c2)); // Early effect on base resistance OP_grbvz = - ddx(Ib1b2, V(c1)); // Early effect on base resistance OP_re = RE_TM; // Emiter resistance OP_rbc = RBC_TM; // Constant base resistance OP_rcc = RCCxx_TM; // Collector Contact resistance OP_rcblx = RCCex_TM; // Extrinsic buried layer resistance OP_rcbli = RCCin_TM; // Extrinsic buried layer resistance `ifdef SUBSTRATE OP_gs = ddx(Isub, V(b)) + ddx(Isub, V(b1)); // Conductance parasitic PNP transitor OP_xgs = ddx(XIsub, V(b)) ; // Conductance parasitic PNP transistor OP_gsf = ddx(Isf, V(s)) ; // Conductance substrate-collector current `endif // Small signal equivalent circuit capacitances OP_scbe = - ddx(Qte_s, V(e)) - ddx(Qte_s, V(e1)); // Capacitance sidewall b-e junction OP_cbex = - ddx(Qte + Qbe + Qe, V(e1)) ; // Capacitance floor b-e junction OP_cbey = - ddx(Qbe, V(c2)); // Early effect on b-e diffusion junction OP_cbez = - ddx(Qbe, V(c1)); // Early effect on b-e diffusion junction OP_cbcx = - ddx(Qbc, V(e)) - ddx(Qbc, V(e1)); // Early effect on b-c diffusion junction OP_cbcy = - ddx(Qtc + Qbc + Qepi, V(c2)); // Capacitance floor b-c junction OP_cbcz = - ddx(Qtc + Qbc + Qepi, V(c1)); // Capacitance floor b-c junction // Capacitance extrinsic b-c junction : OP_cbcex = ddx(Qtex + Qex,V(e)) + ddx(Qtex + Qex,V(b1 )) + ddx(Qtex + Qex,V(b2)) + ddx(Qtex + Qex,V(e1)) + ddx(Qtex + Qex,V(c2)) ; // Capacitance extrinsic b-c junction : OP_xcbcex = ddx(XQtex + XQex, V(b)) ; OP_cb1b2 = - ddx(Qb1b2, V(b2)) - ddx(Qb1b2, V(c2)); // Capacitance AC current crowding OP_cb1b2x = - ddx(Qb1b2, V(e)) - ddx(Qb1b2, V(e1)); // Cross-capacitance AC current crowding OP_cb1b2y = - ddx(Qb1b2, V(c2)); // Cross-capacitance AC current crowding OP_cb1b2z = - ddx(Qb1b2, V(c1)) ; // Cross-capacitance AC current crowding `ifdef SUBSTRATE OP_cts = ddx(Qts, V(s)) ; // Capacitance s-c junction `endif // Approximate small signal equivalent circuit dydx = (OP_gx - OP_gmux) / (OP_grcvy + OP_gmuy - OP_gy); dydz = (OP_gz - OP_grcvz - OP_gmuz) / (OP_grcvy + OP_gmuy - OP_gy); gpi = OP_sgpi + OP_gpix + OP_gmux + OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * (dydx + dydz); OP_gm = (OP_grcvy * (OP_gx - OP_gmux + // Transconductance OP_gz - OP_gmuz) - OP_grcvz * (OP_gy - OP_gmuy)) / (OP_grcvy + OP_gmuy - OP_gy); OP_beta = OP_gm / gpi; // Current amplification OP_gout = ((OP_gy - OP_gmuy) * OP_grcvz - // Output conductance (OP_gz - OP_gmuz) * OP_grcvy) / (OP_grcvy + OP_gmuy - OP_gy); OP_gmu = OP_gpiz + OP_gmuz + (OP_gpiy + OP_gmuy) * dydz + // Feedback transconductance OP_gmuex + OP_xgmuex; OP_rb = RBC_TM + OP_rbv; // Base resistance OP_rc = OP_rcc + OP_rcblx + OP_rcbli; // Collector resistance OP_cbe = OP_cbex + OP_scbe + OP_cbcx + // Base-emitter capacitance (OP_cbey + OP_cbcy) * dydx + CBEO_M; OP_cbc = (OP_cbey + OP_cbcy) * dydz + OP_cbcz + // Base-collector capacitance OP_cbcex + OP_xcbcex + CBCO_M; // Quantities to describe internal state of the model gammax = (OP_gpix + OP_gmux - OP_grbvx) * OP_rbv; gammay = (OP_gpiy + OP_gmuy - OP_grbvy) * OP_rbv; gammaz = (OP_gpiz + OP_gmuz - OP_grbvz) * OP_rbv; gbfx = OP_gpix + OP_sgpi * (1.0 + gammax); gbfy = OP_gpiy + OP_sgpi * gammay; gbfz = OP_gpiz + OP_sgpi * gammaz; // RvdT March 2008: alpha_ft = (1.0 + (OP_grcvy * dydx * OP_rc) + (OP_gx + gbfx + (OP_gy + gbfy) * dydx) * RE_TM)/ (1.0 - (OP_grcvz + OP_grcvy * dydz) * OP_rc - (OP_gz + gbfz + (OP_gy + gbfy) * dydz) * RE_TM); rx = pow((OP_grcvy * dydx + alpha_ft * (OP_grcvz + OP_grcvy * dydz)), -1); rz = alpha_ft * rx; ry = (1.0 - OP_grcvz * rz) / OP_grcvy; rb1b2 = gammax * rx + gammay * ry + gammaz * rz; rex = rz + rb1b2 - OP_rcbli; xrex = rex + RBC_TM * ((gbfx + OP_gmux) * rx + (gbfy + OP_gmuy) * ry + (gbfz + OP_gmuz) * rz) - OP_rcbli - OP_rcblx; taut = OP_scbe * (rx + rb1b2) + (OP_cbex + OP_cbcx) * rx + (OP_cbey + OP_cbcy) * ry + (OP_cbez + OP_cbcz) * rz + OP_cbcex * rex + OP_xcbcex * xrex + (CBEO_M + CBCO_M) * (xrex - RCCxx_TM); OP_ft = 1.0 / (2.0 * `PI * taut); // Good approximation for cut-off frequency OP_iqs = Iqs; // Current at onset of quasi-saturation OP_xiwepi = xi_w; // Thickness of injection layer OP_vb2c2star = Vb2c2star; // Physical value of internal base-collector bias //self-heating `ifdef SELFHEATING OP_pdiss = power; // Dissipation `endif OP_tk = Tk; // Actual temperature `endif end ngspice-26/src/spicelib/devices/adms/mextram/admsva/opvars.inc0000644000265600020320000001503012264261473024114 0ustar andreasadmin// // Operation point (output) variables // // The external currents and current gain `OPP(OP_ic, A, External DC collector current) `OPP(OP_ib, A, External DC base current) `OPP(OP_betadc, , External DC current gain Ic/Ib) // begin added in MXT 504.9: `OPP(OP_ie, A, External DC emitter current) // The external biases `OPP(OP_vbe, V, External base-emitter bias) `OPP(OP_vce, V, External collector-emitter bias) `OPP(OP_vbc, V, External base-collector bias) `ifdef SUBSTRATE `OPP(OP_is, A, External DC substrate current) `OPP(OP_vse, V, External substrate-emitter bias) `OPP(OP_vbs, V, External base-substrate bias) `OPP(OP_vsc, V, External substrate-collector bias) `endif // end added in MXT 504.9 // The internal biases `OPP(OP_vb2e1, V, Internal base-emitter bias) `OPP(OP_vb2c2, V, Internal base-collector bias) `OPP(OP_vb2c1, V, Internal base-collector bias including epilayer) `OPP(OP_vb1c1, V, External base-collector bias without contact resistances) `OPP(OP_vc4c1, V, Bias over intrinsic buried layer) `OPP(OP_vc3c4, V, Bias over extrinsic buried layer) `OPP(OP_ve1e, V, Bias over emitter resistance) // The actual currents `OPP(OP_in, A, Main current) `OPP(OP_ic1c2, A, Epilayer current) `OPP(OP_ib1b2, A, Pinched-base current) `OPP(OP_ib1, A, Ideal forward base current) `OPP(OP_sib1, A, Ideal side-wall base current) // // 504.8, RvdT, TU-Delft April. 2009, Zener tunneling current: // `OPP(OP_izteb, A, Zener tunneling current in the emitter base junction) // `OPP(OP_ib2, A, Non-ideal forward base current) `OPP(OP_ib3, A, Non-ideal reverse base current) `OPP(OP_iavl, A, Avalanche current) `OPP(OP_iex, A, Extrinsic reverse base current) `OPP(OP_xiex, A, Extrinsic reverse base current) `ifdef SUBSTRATE `OPP(OP_isub, A, Substrate current) `OPP(OP_xisub, A, Substrate current) `OPP(OP_isf, A, Substrate failure current) `endif `OPP(OP_ire, A, Current through emitter resistance) `OPP(OP_irbc, A, Current through constant base resistance) `OPP(OP_ircblx, A, Current through extrinsic buried layer resistance) `OPP(OP_ircbli, A, Current through intrinsic buried layer resistance) `OPP(OP_ircc, A, Current through collector contact resistance) //The actual charges `OPP(OP_qe, C, Emitter charge or emitter neutral charge) `OPP(OP_qte, C, Base-emitter depletion charge) `OPP(OP_sqte, C, Sidewall base-emitter depletion charge) `OPP(OP_qbe, C, Base-emitter diffusion charge) `OPP(OP_qbc, C, Base_collector diffusion charge) `OPP(OP_qtc, C, Base-collector depletion charge) `OPP(OP_qepi, C, Epilayer diffusion charge) `OPP(OP_qb1b2, C, AC current crowding charge) `OPP(OP_qtex, C, Extrinsic base-collector depletion charge) `OPP(OP_xqtex, C, Extrinsic base-collector depletion charge) `OPP(OP_qex, C, Extrinsic base-collector diffusion charge) `OPP(OP_xqex, C, Extrinsic base-collector diffusion charge) `ifdef SUBSTRATE `OPP(OP_qts, C, Collector-substrate depletion charge) `endif //Small signal equivalent circuit conductances and resistances `OPP(OP_gx, S, Forward transconductance) `OPP(OP_gy, S, Reverse transconductance) `OPP(OP_gz, S, Reverse transconductance) `OPP(OP_sgpi, S, Conductance sidewall b-e junction) `OPP(OP_gpix, S, Conductance floor b-e junction) `OPP(OP_gpiy, S, Early effect on recombination base current) `OPP(OP_gpiz, S, Early effect on recombination base current) `OPP(OP_gmux, S, Early effect on avalanche current limiting) `OPP(OP_gmuy, S, Conductance of avalanche current) `OPP(OP_gmuz, S, Conductance of avalanche current) `OPP(OP_gmuex, S, Conductance of extrinsic b-c junction) `OPP(OP_xgmuex, S, Conductance of extrinsic b-c junction) `OPP(OP_grcvy, S, Conductance of epilayer current) `OPP(OP_grcvz, S, Conductance of epilayer current) `OPP(OP_rbv, Ohm, Base resistance) `OPP(OP_grbvx, S, Early effect on base resistance) `OPP(OP_grbvy, S, Early effect on base resistance) `OPP(OP_grbvz, S, Early effect on base resistance) `OPP(OP_re, Ohm, Emitter resistance) `OPP(OP_rbc, Ohm, Constant base resistance) `OPP(OP_rcc, Ohm, Collector contact resistance) `OPP(OP_rcblx, Ohm, Extrinsic buried layer resistance) `OPP(OP_rcbli, Ohm, Intrinsic buried layer resistance) `ifdef SUBSTRATE `OPP(OP_gs, S, Conductance parasistic PNP transistor) `OPP(OP_xgs, S, Conductance parasistic PNP transistor) `OPP(OP_gsf, S, Conductance substrate failure current) `endif //Small signal equivalent circuit capacitances `OPP(OP_scbe, F, Capacitance sidewall b-e junction) `OPP(OP_cbex, F, Capacitance floor b-e junction) `OPP(OP_cbey, F, Early effect on b-e diffusion charge) `OPP(OP_cbez, F, Early effect on b-e diffusion charge) `OPP(OP_cbcx, F, Early effect on b-c diffusion charge) `OPP(OP_cbcy, F, Capacitance floor b-c junction) `OPP(OP_cbcz, F, Capacitance floor b-c junction) `OPP(OP_cbcex, F, Capacitance extrinsic b-c junction) `OPP(OP_xcbcex, F, Capacitance extrinsic b-c junction) `OPP(OP_cb1b2, F, Capacitance AC current crowding) `OPP(OP_cb1b2x, F, Cross-capacitance AC current crowding) `OPP(OP_cb1b2y, F, Cross-capacitance AC current crowding) `OPP(OP_cb1b2z, F, Cross-capacitance AC current crowding) `ifdef SUBSTRATE `OPP(OP_cts, F, Capacitance s-c junction) `endif //Approximate small signal equivalent circuit `OPP(OP_gm, S,transconductance) `OPP(OP_beta, , Current amplification) `OPP(OP_gout, S, Output conductance) `OPP(OP_gmu, S, Feedback transconductance) `OPP(OP_rb, Ohm, Base resistance) `OPP(OP_rc, Ohm, Collector resistance) `OPP(OP_cbe, C, Base-emitter capacitance) `OPP(OP_cbc, C, Base-collector capacitance) //quantities to describe internal state of the model `OPP(OP_ft, , Good approximation for cut-off frequency) `OPP(OP_iqs, A, Current at onset of quasi-saturation) `OPP(OP_xiwepi, m, Thickness of injection layer) `OPP(OP_vb2c2star, V, Physical value of internal base-collector bias) //self-heating `ifdef SELFHEATING `OPP(OP_pdiss, W, Dissipation) `endif `OPP(OP_tk, K, Actual temperature) //help variables real dydx, dydz, gpi; real gammax, gammay, gammaz, gbfx, gbfy, gbfz, alpha_ft; real rx, ry, rz, rb1b2, rex, xrex, taut; ngspice-26/src/spicelib/devices/adms/mextram/admsva/initialize.inc0000644000265600020320000000375312264261473024754 0ustar andreasadmin// Initialze model constants // Impact ionization constants (NPN - PNP) if (TYPE == 1) begin An = 7.03e7; Bn = 1.23e8; end else begin An = 1.58e8; Bn = 2.04e8; end Xext1 = 1.0 - XEXT; // Temperature independent MULT scaling `ifdef SELFHEATING CTH_M = CTH * MULT; `endif CBEO_M = CBEO * MULT; CBCO_M = CBCO * MULT; invMULT = 1.0 / MULT; SCRCV_M = SCRCV * invMULT; KF_M = KF * pow(MULT, 1.0 - AF); KFN_M = KFN * pow(MULT, 1.0 - (2.0 * (MLF - 1.0) + AF * (2.0 - MLF))); // begin: RvdT, November 2008 ; Zener tunneling current model pow2_2mPE = pow(2.0, 2.0 - PE); pow2_PEm2 = 1.0 / pow2_2mPE; // Reference Temperature expressed in Kelvin: Trk = TREF + `C2K; // begin: RvdT, November 2008 ; Zener tunneling current model // // Comment added March 2009: this assumes VGZEBOK as a model parameter. // // Bandgap for Zener tunnel current model at reference temperature in eV: // VGZEB_Tr = VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB) ; // `max_logexp(VGZEB_Tr, VGZEBOK - AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1) ; // end: RvdT, November 2008 // begin: RvdT March 2009: // to decrease parameter interdependency, // use VGZEB as a parameter, instead of VGZEBOK: // VGZEB : bandgap for Zener tunneling at T = Tref, // VGZEBOK : bandgap for Zener tunneling at T = 0 K. // `max_logexp(VGZEBOK, VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB), 0.05, 0.1); //dw can't expand the macro `max_logexp here - using the code _x = VGZEB + AVGEB*Trk*Trk / (Trk + TVGEB); _x0 = 0.05; _a = 0.1; _dxa = (_x - _x0) / (_a); if (_x < _x0) VGZEBOK = _x0 + _a * ln(1.0 + exp(_dxa)); else VGZEBOK = _x + _a * ln(1.0 + exp(-_dxa)); VGZEB_Tr = VGZEB; // end: RvdT March 2009: use VGZEB as a parameter, instead of VGZEBOK: inv_VGZEB_Tr = 1.0 / VGZEB_Tr; inv_VDE = 1.0 / VDE; // end: RvdT, November 2008 ; Zener tunneling current model ngspice-26/src/spicelib/devices/adms/mextram/admsva/frontdef.inc0000644000265600020320000000422112264261473024411 0ustar andreasadmin// Front definitions `include "discipline.h" // Numerical, physical and model constants `define TEN_M40 1.0e-40 `define TEN_M07 1.0e-7 `define C2K 273.15 `define KB 1.3806226e-23 `define QQ 1.6021918e-19 `define KBdivQQ 8.61708691805812512584e-5 `define one_third 0.33333333333333333333 `define one_sixth 0.16666666666666666667 `define VDLOW 0.05 `define AJE 3.0 `define AJC 2.0 `define AJS 2.0 `define VEXLIM 200.0 `define PI 3.1415926 // Desriptions and units `ifdef __VAMS_COMPACT_MODELING__ `define OPP(nam,uni,des) (* desc="des", units="uni" *) real nam; `define PAR(des,uni) (* desc="des", units="uni" *) parameter real `define PAI(des,uni) (* desc="des", units="uni" *) parameter integer `else `define OPP(nam,uni,des) `define PAR(des,uni) parameter real `define PAI(des,uni) parameter integer `endif // ADMS specific definitions `ifdef insideADMS `define MODEL @(initial_model) `define INSTANCE @(initial_instance) `define NOISE @(noise) `define ATTR(txt) (*txt*) `else `define MODEL `define INSTANCE `define NOISE `define ATTR(txt) `endif // Smooth limitting functions `define max_hyp0(result, x, epsilon)\ eps2 = epsilon * epsilon;\ x2 = x * x;\ if (x < 0.0)\ result = 0.5 * eps2 / (sqrt(x2 + eps2) - x);\ else\ result = 0.5 * (sqrt(x2 + eps2) + x);\ result=result `define min_logexp(result, x, x0, a)\ dxa = (x - x0) / (a);\ if (x < x0)\ result = x - a * ln(1.0 + exp(dxa));\ else\ result = x0 - a * ln(1.0 + exp(-dxa));\ result=result `define max_logexp(result, x, x0, a)\ dxa = (x - x0) / (a);\ if (x < x0)\ result = x0 + a * ln(1.0 + exp(dxa));\ else\ result = x + a * ln(1.0 + exp(-dxa));\ result=result `define expLin(result, x)\ if (x < `VEXLIM)\ result = exp(x);\ else begin\ expl = exp(`VEXLIM);\ result = expl * (1.0 + (x - `VEXLIM));\ end `define linLog(result, x, vlim)\ if (x < vlim)\ result = x;\ else\ result = vlim + ln(1.0 + (x - vlim));\ result=result ngspice-26/src/spicelib/devices/adms/mextram/admsva/tscaling.inc0000644000265600020320000001477612264261473024426 0ustar andreasadmin// Temperature scaling of parameters // The excess transistor temperature due to the self-heating `ifdef SELFHEATING Tki = V(dt); // *** Convergence related smoothing *** if (Tki < 0.0) begin Tki = - ln(1.0 - Tki); end `linLog(Vdt, Tki, 200.0); // `min_logexp(Vdt, Tki, 200.0, 10.0); `else Vdt = 0.0; `endif // Temperature variables `ifdef insideADMS Tk = Trk + DTA + Vdt; Tamb = Trk + DTA; `else Tk = $temperature + DTA + Vdt; Tamb = $temperature + DTA; `endif tN = Tk / Trk; Vt = `KBdivQQ * Tk; Vtr = `KBdivQQ * Trk; VtINV = 1.0 / Vt; VtrINV = 1.0 / Vtr; VdtINV = VtINV - VtrINV; lntN = ln(tN) ; // begin: RvdT, November 2008, "Zener tunneling model" // VGZEB_T = VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB) ; `max_logexp(VGZEB_T, VGZEBOK - AVGEB*Tk*Tk / (Tk + TVGEB), 0.05, 0.1) ; // end: RvdT, November 2008, "Zener tunneling model" // Depletion capacitances UdeT = -3.0 * Vt * ln(tN) + VDE * tN + (1.0 - tN) * VGB; `max_logexp(VDE_T, `VDLOW, UdeT, Vt); UdcT = -3.0 * Vt * ln(tN) + VDC * tN + (1.0 - tN) * VGC; `max_logexp(VDC_T, `VDLOW, UdcT, Vt); `ifdef SUBSTRATE UdsT = -3.0 * Vt * ln(tN) + VDS * tN + (1.0 - tN) * VGS; `max_logexp(VDS_T, `VDLOW, UdsT, Vt); `endif inv_VDE_T = 1.0 / VDE_T ; CJE_T_div_CJE = pow(VDE * inv_VDE_T, PE); CJE_T = CJE * CJE_T_div_CJE ; `ifdef SUBSTRATE CJS_T = CJS * pow(VDS / VDS_T, PS); `endif CJCscale = ((1.0 - XP) * pow(VDC / VDC_T, PC) + XP); CJCscaleINV = 1.0 / CJCscale; CJC_T = CJC * CJCscale; XP_T = XP * CJCscaleINV; // Resistances // RvdT, November 2008: // Instead of the following definition // RE_T = RE * pow(tN, AE); // we use, here, and in all following powers of tN, // the following computationally cheaper implementation: RE_T = RE * exp(lntN * AE); // This is based on the observation that exp() is faster than pow(). // Acknowledgement due to Geoffrey Coram. RBV_T = RBV * exp(lntN * (AB - AQBO)); RBC_T = RBC * exp(lntN * AEX); // RvdT, 30-11-2007: new collector resistances RCCxx_T, RCCex_T, RCCin_T RCCxx_T = RCC * exp(lntN * AC); RCCex_T = RCBLX * exp(lntN * ACBL); RCCin_T = RCBLI * exp(lntN * ACBL); RCV_T = RCV * exp(lntN * AEPI); // Current gains BF_T = BF * exp(lntN * (AE - AB - AQBO)) * exp(-DVGBF * VdtINV); BRI_T = BRI * exp(-DVGBR * VdtINV); // Currents and voltages IS_T = IS * exp(lntN * (4.0 - AB - AQBO + DAIS)) * exp(-VGB * VdtINV); IK_T = IK * exp(lntN * (1.0 - AB)); IBF_T = IBF * exp(lntN * (6.0 - 2.0 * MLF)) * exp(-VGJ * VdtINV / MLF); IBR_T = IBR * tN * tN * exp(-VGC * VdtINV / 2.0); // begin RvdT, November 2008, MXT504.8_alpha // T-scaling BE tunneling: // x = pow(VGZEB_T * inv_VGZEB_Tr, -0.5) ; // y = pow(VDE_T * inv_VDE, PE) ; // more efficient, because we need both y and 1.0 / y: y = 1.0 / CJE_T_div_CJE ; // definition: // nZEB_T = NZEB* pow(VGZEB_T/VGZEB_Tr, 1.5) * pow(VDE_T / VDE, PE-1) ; // more efficient implementation: // nZEB_T = NZEB* VGZEB_T * VGZEB_T * x * y * VDE /(VDE_T*VGZEB_Tr*VGZEB_Tr) ; nZEB_T = NZEB* VGZEB_T * VGZEB_T * x * y * VDE * inv_VDE_T*inv_VGZEB_Tr*inv_VGZEB_Tr ; // definition: // IZEB_T = IZEB* pow(VGZEB_T/VGZEB_Tr, -0.5) * pow(VDE_T / VDE, 2-PE) * exp(NZEB-nZEB_T); // more efficient implementation: IZEB_T = IZEB* x * VDE_T * VDE_T * inv_VDE * inv_VDE * CJE_T_div_CJE * exp(NZEB-nZEB_T) ; // // end RvdT, November 2008, MXT504.8_alpha x = exp(lntN * AQBO) ; VEF_T = VEF * x * CJCscaleINV; // VER_T = VER * x * pow(VDE / VDE_T, -PE); VER_T = VER * x * y; `ifdef SUBSTRATE ISS_T = ISS * exp(lntN * (4.0 - AS)) * exp(-VGS * VdtINV); // New 504.9: ICSS_T = ICSS * exp(lntN * (3.5 - 0.5 * ASUB)) * exp(-VGS * VdtINV); // End New 504.9. if ((ISS_T > 0.0)) IKS_T = IKS * exp(lntN * (1.0 - AS)) * (IS_T / IS) * (ISS / ISS_T); else IKS_T = IKS * exp(lntN * (1.0 - AS)); `endif // Transit times TAUE_T = TAUE * exp(lntN * (AB - 2.0)) * exp(-DVGTE * VdtINV); TAUB_T = TAUB * exp(lntN * (AQBO + AB - 1.0)); TEPI_T = TEPI * exp(lntN * (AEPI - 1.0)); TAUR_T = TAUR * (TAUB_T + TEPI_T) / (TAUB + TEPI); // Avalanche constant Tk300 = Tk - 300.0; // RvdT, 15-02-2008: prevent division by zero and overflow at high temperatures: if (Tk < 525.0) begin BnT = Bn * (1.0 + 7.2e-4 * Tk300 - 1.6e-6 * Tk300 * Tk300) ; end else begin BnT = Bn * 1.081 ; end // Heterojunction features DEG_T = DEG * exp(lntN * AQBO); `ifdef SELFHEATING // Tempearature scaling of the thermal resistance RTH_Tamb = RTH * pow(Tamb / Trk, ATH); `endif // MULT - scaling IS_TM = IS_T * MULT; IK_TM = IK_T * MULT; IBF_TM = IBF_T * MULT; IBR_TM = IBR_T * MULT; // RvdT: November 2008, Zener tunneling parameters IZEB_TM = IZEB_T * MULT ; // end Zener tunneling parameters IHC_M = IHC * MULT; `ifdef SUBSTRATE ISS_TM = ISS_T * MULT; // New: 504.9 ICSS_TM = ICSS_T * MULT; IKS_TM = IKS_T * MULT; `endif CJE_TM = CJE_T * MULT; CJC_TM = CJC_T * MULT; // begin RvdT, 28-10-2008, MXT504.8_alpha // Base-emitter tunneling current Mult scaling: // BTJE_TM = BTJE_T * MULT; // end RvdT, 28-10-2008, MXT504.8_alpha `ifdef SUBSTRATE CJS_TM = CJS_T * MULT; `endif RE_TM = RE_T * invMULT; RBC_TM = RBC_T * invMULT; RBV_TM = RBV_T * invMULT; // RvdT, 30-01-2007: new collector resistances: RCCxx_TM = RCCxx_T * invMULT; RCCex_TM = RCCex_T * invMULT; RCCin_TM = RCCin_T * invMULT; RCV_TM = RCV_T * invMULT; // RvdT, 03-12-2007: new collector conductances if (RCC > 0.0) begin GCCxx_TM = 1.0 / RCCxx_TM ; end else begin GCCxx_TM = 0 ; end if (RCBLX > 0.0) begin GCCex_TM = 1.0 / RCCex_TM ; end else begin GCCex_TM = 0 ; end if (RCBLI > 0.0) begin GCCin_TM = 1.0 / RCCin_TM ; end else begin GCCin_TM = 0 ; end `ifdef SELFHEATING RTH_Tamb_M = RTH_Tamb * invMULT; `endif ngspice-26/src/spicelib/devices/adms/mextram/admsva/bjt504t.va0000644000265600020320000000250112264261473023632 0ustar andreasadmin`include "frontdef.inc" `define SELFHEATING `define SUBSTRATE module bjt504tva (c, b, e, s, dt); `ifdef insideADMS `define P(p) (*p*) `else `define P(p) `endif // External ports inout c, b, e, s, dt; electrical c `P(info="external collector node"); electrical b `P(info="external base node"); electrical e `P(info="external emitter node"); electrical s `P(info="external substrate node"); electrical dt `P(info="external thermal node"); // Internal nodes electrical c1 `P(info="internal collector node 1"); electrical e1 `P(info="internal emitter node"); electrical b1 `P(info="internal base node 1"); electrical b2 `P(info="internal base node 2"); electrical c2 `P(info="internal collector node 2"); electrical c3 `P(info="internal collector node 3"); electrical c4 `P(info="internal collector node 4"); // For correlated noise implementation electrical noi `P(info="internal noise node"); `include "parameters.inc" `include "variables.inc" `include "opvars.inc" analog begin `include "initialize.inc" `include "tscaling.inc" `include "evaluate.inc" `include "opinfo.inc" end // analog endmodule ngspice-26/src/spicelib/devices/adms/mextram/admsva/COPYRIGHT_NOTICE0000644000265600020320000000435512264261473024453 0ustar andreasadminVerilog-A implementation of the Mextram Bipolar Transistor Model, including variants of the Mextram model released by Delft University. Copyright (c) 2006 Delft University of Technology Licensed under the Educational Community License version 1.0 This Original Work, including software, source code, documents, or other related items, is being provided by the copyright holder(s) subject to the terms of the Educational Community License. By obtaining, using and/or copying this Original Work, you agree that you have read, understand, and will comply with the following terms and conditions of the Educational Community License: Permission to use, copy, modify, merge, publish, distribute, and sublicense this Original Work and its documentation, with or without modification, for any purpose, and without fee or royalty to the copyright holder(s) is hereby granted, provided that you include the following on ALL copies of the Original Work or portions thereof, including modifications or derivatives, that you make: The full text of the Educational Community License in a location viewable to users of the redistributed or derivative work. Any pre-existing intellectual property disclaimers, notices, or terms and conditions. Notice of any changes or modifications to the Original Work, including the date the changes were made. Any modifications of the Original Work must be distributed in such a manner as to avoid any confusion with the Original Work of the copyright holders. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The name and trademarks of copyright holder(s) may NOT be used in advertising or publicity pertaining to the Original or Derivative Works without specific, written prior permission. Title to copyright in the Original Work and any associated documentation will at all times remain with the copyright holders. ngspice-26/src/spicelib/devices/adms/mextram/admsva/parameters.inc0000644000265600020320000003061712264261473024755 0ustar andreasadmin// Mextram parameters parameter integer LEVEL = 504 from [504:505) `ATTR(info="Model level"); parameter real TREF = 25.0 from [-273.0:inf) `ATTR(info="Reference temperature"); parameter real DTA = 0.0 `ATTR(info="Difference between the local and global ambient temperatures"); parameter integer EXMOD = 1 from [0:1] `ATTR(info="Flag for extended modeling of the reverse current gain"); parameter integer EXPHI = 1 from [0:1] `ATTR(info="Flag for the distributed high-frequency effects in transient"); parameter integer EXAVL = 0 from [0:1] `ATTR(info="Flag for extended modeling of avalanche currents"); parameter real IS = 22.0a from (0.0:inf) `ATTR(info="Collector-emitter saturation current"); parameter real IK = 0.1 from [1.0p:inf) `ATTR(info="Collector-emitter high injection knee current"); parameter real VER = 2.5 from [0.01:inf) `ATTR(info="Reverse Early voltage"); parameter real VEF = 44.0 from [0.01:inf) `ATTR(info="Forward Early voltage"); parameter real BF = 215.0 from [0.1m:inf) `ATTR(info="Ideal forward current gain"); parameter real IBF = 2.7f from [0.0:inf) `ATTR(info="Saturation current of the non-ideal forward base current"); parameter real MLF = 2.0 from [0.1:inf) `ATTR(info="Non-ideality factor of the non-ideal forward base current"); parameter real XIBI = 0.0 from [0.0:1.0] `ATTR(info="Part of ideal base current that belongs to the sidewall"); // begin: RvdT, November 2008, BE tunneling current parameters: parameter real IZEB = 0.0 from [0.0:inf) `ATTR(info="Pre-factor of emitter-base Zener tunneling current"); parameter real NZEB = 22.0 from [0.0:inf) `ATTR(info="Coefficient of emitter-base Zener tunneling current"); // end: RvdT, November 2008, EB tunneling current parameters: parameter real BRI = 7.0 from [1.0e-4:inf) `ATTR(info="Ideal reverse current gain"); parameter real IBR = 1.0f from [0.0:inf) `ATTR(info="Saturation current of the non-ideal reverse base current"); parameter real VLR = 0.2 `ATTR(info="Cross-over voltage of the non-ideal reverse base current"); parameter real XEXT = 0.63 from [0.0:1.0] `ATTR(info="Part of currents and charges that belong to extrinsic region"); parameter real WAVL = 1.1u from [1.0n:inf) `ATTR(info="Epilayer thickness used in weak-avalanche model"); parameter real VAVL = 3.0 from [0.01:inf) `ATTR(info="Voltage determining curvature of avalanche current"); parameter real SFH = 0.3 from [0.0:inf) `ATTR(info="Current spreading factor of avalanche model when EXAVL=1"); // RvdT, 22-02-2008: for MXT 504.7 // increased lower clipping values RE, RBC, RBV, RCC, RCV, SCRCV // from 1u to 1m: parameter real RE = 5.0 from [1.0m:inf) `ATTR(info="Emitter resistance"); parameter real RBC = 23.0 from [1.0m:inf) `ATTR(info="Constant part of the base resistance"); parameter real RBV = 18.0 from [1.0m:inf) `ATTR(info="Zero-bias value of the variable part of the base resistance"); parameter real RCC = 12.0 from [1.0m:inf) `ATTR(info="Constant part of the collector resistance"); parameter real RCV = 150.0 from [1.0m:inf) `ATTR(info="Resistance of the un-modulated epilayer"); parameter real SCRCV = 1250.0 from [1.0m:inf) `ATTR(info="Space charge resistance of the epilayer"); parameter real IHC = 4.0m from [1.0p:inf) `ATTR(info="Critical current for velocity saturation in the epilayer"); parameter real AXI = 0.3 from [0.02:inf) `ATTR(info="Smoothness parameter for the onset of quasi-saturation"); parameter real CJE = 73.0f from [0.0:inf) `ATTR(info="Zero-bias emitter-base depletion capacitance"); parameter real VDE = 0.95 from [0.05:inf) `ATTR(info="Emitter-base diffusion voltage"); parameter real PE = 0.4 from [0.01:0.99) `ATTR(info="Emitter-base grading coefficient"); parameter real XCJE = 0.4 from [0.0:1.0] `ATTR(info="Sidewall fraction of the emitter-base depletion capacitance"); parameter real CBEO = 0.0 from [0.0:inf) `ATTR(info="Emitter-base overlap capacitance"); parameter real CJC = 78.0f from [0.0:inf) `ATTR(info="Zero-bias collector-base depletion capacitance"); parameter real VDC = 0.68 from [0.05:inf) `ATTR(info="Collector-base diffusion voltage"); parameter real PC = 0.5 from [0.01:0.99) `ATTR(info="Collector-base grading coefficient"); parameter real XP = 0.35 from [0.0:0.99) `ATTR(info="Constant part of Cjc"); parameter real MC = 0.5 from [0.0:1.0) `ATTR(info="Coefficient for current modulation of CB depletion capacitance"); parameter real XCJC = 32.0m from [0.0:1.0] `ATTR(info="Fraction of CB depletion capacitance under the emitter"); // RvdT, 30-11-2007: introduced RCBLX and RCBLI: parameter real RCBLX = 0.0 from [0.0:inf) `ATTR(info="Resistance Collector Buried Layer eXtrinsic"); parameter real RCBLI = 0.0 from [0.0:inf) `ATTR(info="Resistance Collector Buried Layer Intrinsic"); parameter real CBCO = 0.0 from [0.0:inf) `ATTR(info="Collector-base overlap capacitance"); parameter real MTAU = 1.0 from [0.1:inf) `ATTR(info="Non-ideality factor of the emitter stored charge"); parameter real TAUE = 2.0p from [0.0:inf) `ATTR(info="Minimum transit time of stored emitter charge"); parameter real TAUB = 4.2p from (0.0:inf) `ATTR(info="Transit time of stored base sharge"); parameter real TEPI = 41.0p from [0.0:inf) `ATTR(info="Transit time of stored epilayer charge"); parameter real TAUR = 520.0p from [0.0:inf) `ATTR(info="Transit time of reverse extrinsic stored base charge"); parameter real DEG = 0.0 `ATTR(info="Bandgap difference over the base"); parameter real XREC = 0.0 from [0.0:inf) `ATTR(info="Pre-factor of the recombination part of Ib1"); parameter real AQBO = 0.3 `ATTR(info="Temperature coefficient of the zero-bias base charge"); parameter real AE = 0.0 `ATTR(info="Temperature coefficient of the resistivity of the emitter"); parameter real AB = 1.0 `ATTR(info="Temperature coefficient of the resistivity of the base"); parameter real AEPI = 2.5 `ATTR(info="Temperature coefficient of the resistivity of the epilayer"); parameter real AEX = 0.62 `ATTR(info="Temperature coefficient of the resistivity of the extrinsic base"); parameter real AC = 2.0 `ATTR(info="Temperature coefficient of the resistivity of the collector contact"); // RvdT, 30-01-2007: introduced ACBL parameter real ACBL = 2.0 from [0.0:inf) `ATTR(info="Temperature coefficient of the resistivity of the collector buried layer"); parameter real DVGBF = 50.0m `ATTR(info="Band-gap voltage difference of the forward current gain"); parameter real DVGBR = 45.0m `ATTR(info="Band-gap voltage difference of the reverse current gain"); parameter real VGB = 1.17 from [0.1:inf) `ATTR(info="Band-gap voltage of the base"); parameter real VGC = 1.18 from [0.1:inf) `ATTR(info="Band-gap voltage of the collector"); parameter real VGJ = 1.15 from [0.1:inf) `ATTR(info="Band-gap voltage recombination emitter-base junction"); parameter real VGZEB = 1.15 from [0.1:inf) `ATTR(info="Band-gap voltage at Tref of Zener effect emitter-base junction"); parameter real AVGEB = 4.73e-4 from (-inf:inf) `ATTR(info="Temperature coefficient band-gap voltage for Zener effect emitter-base junction"); parameter real TVGEB = 636.0 from [0.0:inf) `ATTR(info="Temperature coefficient band-gap voltage for Zener effect emitter-base junction"); parameter real DVGTE = 0.05 `ATTR(info="Band-gap voltage difference of emitter stored charge"); parameter real DAIS = 0.0 `ATTR(info="Fine tuning of temperature dependence of C-E saturation current"); parameter real AF = 2.0 from [0.01:inf) `ATTR(info="Exponent of the Flicker-noise"); parameter real KF = 20.0p from [0.0:inf) `ATTR(info="Flicker-noise coefficient of the ideal base current"); parameter real KFN = 20.0p from [0.0:inf) `ATTR(info="Flicker-noise coefficient of the non-ideal base current"); parameter integer KAVL = 0 from [0:1] `ATTR(info="Switch for white noise contribution due to avalanche"); `ifdef SUBSTRATE parameter real ISS = 48.0a from [0.0:inf) `ATTR(info="Base-substrate saturation current"); parameter real ICSS = -1.0 from (-inf:inf) `ATTR(info="Collector-substrate ideal saturation current"); parameter real IKS = 250.0u from [1.0p:inf) `ATTR(info="Base-substrate high injection knee current"); parameter real CJS = 315.0f from [0:inf) `ATTR(info="Zero-bias collector-substrate depletion capacitance"); parameter real VDS = 0.62 from (0.05:inf) `ATTR(info="Collector-substrate diffusion voltage"); parameter real PS = 0.34 from (0.01:0.99) `ATTR(info="Collector-substrate grading coefficient"); parameter real VGS = 1.20 from [0.1:inf) `ATTR(info="band-gap voltage of the substrate"); parameter real AS = 1.58 `ATTR(info="Substrate temperature coefficient"); parameter real ASUB = 2.0 `ATTR(info="Temperature coefficient for mobility of minorities in the substrate"); `endif `ifdef SELFHEATING parameter real RTH = 300.0 from (0.0:inf) `ATTR(info="Thermal resistance"); parameter real CTH = 3.0n from [0.0:inf) `ATTR(info="Thermal capacitance"); parameter real ATH = 0.0 `ATTR(info="Temperature coefficient of the thermal resistance"); `endif parameter real MULT = 1.0 from (0.0:inf) `ATTR(info="Multiplication factor"); // Non-standard (additional) model parameters // (introduced for the users' convenience) `ifdef insideADMS parameter integer TYPE = 1 from [-1:1] `ATTR(info="Flag for NPN (1) or PNP (-1) transistor type"); `else parameter integer TYPE = 1 from [-1:1] exclude 0; `endif parameter real GMIN = 1.0e-13 from (0:1e-10] `ATTR(info="Minimum conductance"); ngspice-26/src/spicelib/devices/adms/mextram/admsva/evaluate.inc0000644000265600020320000005312012264261473024412 0ustar andreasadmin// Evaluate model equations begin // Currents and sharges // Nodal biases Vb2c1 = TYPE * V(b2, c1); Vb2c2 = TYPE * V(b2, c2); Vb2e1 = TYPE * V(b2, e1); Vb1e1 = TYPE * V(b1, e1); Vb1b2 = TYPE * V(b1, b2); `ifdef SUBSTRATE Vsc1 = TYPE * V(s, c1); `endif Vc1c2 = TYPE * V(c1, c2); Vee1 = TYPE * V(e, e1); Vbb1 = TYPE * V(b, b1); Vbe = TYPE * V(b, e); Vbc = TYPE * V(b, c); /* RvdT, 03-12-2007, voltage differences associated with distributed parasitic collector. Evaluated taking values of resistances into account: in case of vanishing resistance corresponding node is not addressed: */ if (RCBLX > 0.0) begin if (RCBLI > 0.0) begin Vc4c1 = TYPE * V(c4, c1); Vc3c4 = TYPE * V(c3, c4); end else begin Vc4c1 = 0 ; Vc3c4 = TYPE * V(c3, c1); end end else begin if (RCBLI > 0.0) begin Vc4c1 = TYPE * V(c4, c1); Vc3c4 = 0 ; end else begin Vc4c1 = 0 ; Vc3c4 = 0 ; end end Vb1c4 = Vb1b2 + Vb2c2 - Vc1c2 - Vc4c1 ; Vcc3 = - Vbc + Vbb1 + Vb1c4 - Vc3c4 ; Vbc3 = Vbc + Vcc3 ; `ifdef SUBSTRATE Vsc4 = Vsc1 - Vc4c1 ; Vsc3 = Vsc4 - Vc3c4 ; `endif // Exponential bias terms `expLin(eVb2c2,Vb2c2 * VtINV) `expLin(eVb2e1,Vb2e1 * VtINV) `expLin(eVb1e1,Vb1e1 * VtINV) `expLin(eVb1c4,Vb1c4 * VtINV) `expLin(eVb1b2,Vb1b2 * VtINV) `expLin(eVbc3,Vbc3 * VtINV) `ifdef SUBSTRATE `expLin(eVsc1,Vsc1 * VtINV) `endif `expLin(eVbc3VDC,(Vbc3 - VDC_T) * VtINV) `expLin(eVb1c4VDC,(Vb1c4 - VDC_T) * VtINV) `expLin(eVb2c2VDC,(Vb2c2 - VDC_T) * VtINV) `expLin(eVb2c1VDC,(Vb2c1 - VDC_T) * VtINV) // Governing equations // Epilayer model K0 = sqrt(1.0 + 4.0 * eVb2c2VDC); Kw = sqrt(1.0 + 4.0 * eVb2c1VDC); pW = 2.0 * eVb2c1VDC / (1.0 + Kw); if (pW < `TEN_M40) pW = 0; Ec = Vt * (K0 - Kw - ln((K0 + 1.0) / (Kw + 1.0)) ); Ic1c2 = (Ec + Vc1c2) / RCV_TM + _circuit_gmin * Vc1c2; if (Ic1c2 > 0.0) begin `linLog(tmpV,Vb2c1,100.0); Vqs_th = VDC_T + 2.0 * Vt * ln(0.5 * Ic1c2 * RCV_TM * VtINV + 1.0) - tmpV; eps_VDC = 0.2 * VDC_T; `max_hyp0(Vqs, Vqs_th, eps_VDC); Iqs = Vqs * (Vqs + IHC_M * SCRCV_M) / (SCRCV_M * (Vqs + IHC_M * RCV_TM)); Ic1c2_Iqs = Ic1c2 / Iqs; `max_logexp(alpha1, Ic1c2_Iqs, 1.0, AXI); alpha = alpha1 / (1.0 + AXI * ln(1.0 + exp(-1.0 / AXI))); vyi = Vqs / (IHC_M * SCRCV_M); yi = (1.0 + sqrt(1.0 + 4.0 * alpha * vyi * (1.0 + vyi))) / (2.0 * alpha * (1.0 + vyi)); xi_w = 1.0 - yi / (1.0 + pW * yi); gp0 = 0.5 * Ic1c2 * RCV_TM * xi_w * VtINV; gp0_help = 2.0 * gp0 + pW * (pW + gp0 + 1.0); gp02 = 0.5 * (gp0 - 1.0); sqr_arg = gp02 * gp02 + gp0_help; if (gp0 >= 1.0) p0star = gp02 + sqrt(sqr_arg); else p0star = gp0_help / (sqrt(sqr_arg) - gp02); if (p0star < `TEN_M40) p0star = 0.0; eVb2c2star = p0star * (p0star + 1.0) * exp(VDC_T * VtINV); B1 = 0.5 * SCRCV_M * (Ic1c2 - IHC_M); B2 = SCRCV_M * RCV_TM * IHC_M * Ic1c2; Vxi0 = B1 + sqrt(B1 * B1 + B2); Vch = VDC_T * (0.1 + 2.0 * Ic1c2 / (Ic1c2 + Iqs)); Icap = IHC_M * Ic1c2 / (IHC_M + Ic1c2); Icap_IHC = IHC_M / (IHC_M + Ic1c2); end else begin p0star = 2.0 * eVb2c2VDC / (1.0 + K0); eVb2c2star = eVb2c2; if ((abs(Vc1c2) < 1.0e-5 * Vt) || (abs(Ec) < `TEN_M40 * Vt * (K0 + Kw))) begin pav = 0.5 * (p0star + pW); xi_w = pav / (pav + 1.0); end else begin xi_w = Ec / (Ec + Vb2c2 - Vb2c1); end Vxi0 = Vc1c2; Vch = 0.1 * VDC_T; Icap = Ic1c2; Icap_IHC = 1.0 - Icap / IHC_M; end // Effective emitter junction capacitance bias Vfe = VDE_T * (1.0 - pow(`AJE , -1.0 / PE)); a_VDE = 0.1 * VDE_T; `min_logexp(Vje, Vb2e1, Vfe, a_VDE); // RvdT, November 2008, E0BE to be re-used in EB- Zener tunnel model: E0BE = pow(1.0 - Vje * inv_VDE_T, 1.0 - PE) ; Vte = VDE_T / (1.0 - PE) * (1.0 - E0BE) + `AJE * (Vb2e1 - Vje); // Effective collector junction capacitance bias Vjunc = Vb2c1 + Vxi0; bjc = (`AJC - XP_T) / (1.0 - XP_T); Vfc = VDC_T * (1.0 - pow(bjc, -1.0 / PC)); `min_logexp(Vjc, Vjunc, Vfc, Vch); fI = pow(Icap_IHC, MC); Vcv = VDC_T / (1.0 - PC) * (1.0 - fI * pow(1.0 - Vjc / VDC_T, 1.0 - PC)) + fI * bjc * (Vjunc - Vjc); Vtc = (1.0 - XP_T) * Vcv + XP_T * Vb2c1; // Transfer current If0 = 4.0 * IS_TM / IK_TM; f1 = If0 * eVb2e1; n0 = f1 / (1.0 + sqrt(1.0 + f1)); f2 = If0 * eVb2c2star; nB = f2 / (1.0 + sqrt(1.0 + f2)); if (DEG == 0.0) q0I = 1.0 + Vte / VER_T + Vtc / VEF_T; else begin termE = (Vte / VER_T + 1.0) * DEG_T * VtINV; termC = -Vtc / VEF_T * DEG_T * VtINV; q0I = (exp(termE) - exp(termC)) / (exp(DEG_T * VtINV) - 1.0); end `max_hyp0(q1I, q0I, 0.1); qBI = q1I * (1.0 + 0.5 * (n0 + nB)); Ir = IS_TM * eVb2c2star; If = IS_TM * eVb2e1; In = (If - Ir) / qBI; // Base and substrate current(s) Ibf0 = IS_TM / BF_T; if (XREC == 0.0) Ib1 = (1.0 - XIBI) * Ibf0 * (eVb2e1 - 1.0); else Ib1 = (1.0 - XIBI) * Ibf0 * ((1.0 - XREC) * (eVb2e1 - 1.0) + XREC * (eVb2e1 + eVb2c2star - 2.0) * (1.0 + Vtc / VEF_T)); Ib1_s = XIBI * Ibf0 * (eVb1e1 - 1.0); `expLin(tmpExp,Vb2e1 * VtINV / MLF) Ib2 = IBF_TM * (tmpExp - 1.0) + _circuit_gmin * Vb2e1; `expLin(tmpExp,0.5 * Vb1c4 * VtINV) Ib3 = IBR_TM * (eVb1c4 - 1.0) / (tmpExp + exp(0.5 * VLR * VtINV)) + _circuit_gmin * Vb1c4; // begin RvdT, November 2008, MXT504.8_alpha // Base-emitter tunneling current // max E-field E0BE calculated in BE depletion charge model: if (IZEB > 0.0 && NZEB > 0.0 && Vb2e1 < 0) begin `expLin(eZEB, nZEB_T * (1 - (pow2_2mPE/(2.0*E0BE)))) // Force all derivatives at Vb2e1=0 to zero by using in DZEB a // modified dE0BE expression for E0BE: x = Vb2e1 * inv_VDE_T ; dE0BE = pow(- x, -2.0-PE)*(PE*(1-PE*PE-3*x*(PE-1))-6*x*x*(PE-1+x)) * `one_sixth ; `expLin(edZEB, Vb2e1 * pow2_2mPE * nZEB_T / (VGZEB_T * dE0BE )) DZEB = - Vb2e1 - VGZEB_T * dE0BE * (1 - edZEB) / (pow2_2mPE * nZEB_T) ; Izteb = 2.0 * IZEB_TM * DZEB * E0BE * eZEB * inv_VDE_T * pow2_PEm2 ; end else begin DZEB = 0 ; Izteb = 0 ; end // end RvdT, November 2008, MXT504.8_alpha // Iex, Isub (XIex, XIsub) g1 = If0 * eVb1c4; g2 = 4.0 * eVb1c4VDC; nBex = g1 / (1.0 + sqrt(1.0 + g1)); pWex = g2 / (1.0 + sqrt(1.0 + g2)); Iex = (1.0 / BRI_T) * (0.5 * IK_TM * nBex - IS_TM); `ifdef SUBSTRATE Isub = 2.0 * ISS_TM * (eVb1c4 - 1.0) / (1.0 + sqrt(1.0 + 4.0 * (IS_TM / IKS_TM) * eVb1c4)); // until504.8: Isf = ISS_TM * (eVsc1 - 1.0); // New 504.9: if (ICSS < 0.0) // this clause is to implement backwards compatibility begin Isf = ISS_TM * (eVsc1 - 1.0); end else begin Isf = ICSS_TM * (eVsc1 - 1.0); end // End: New 504.9. `endif XIex =0.0; `ifdef SUBSTRATE XIsub = 0.0; `endif if (EXMOD == 1) begin Iex = Iex * Xext1; `ifdef SUBSTRATE Isub = Isub * Xext1; `endif Xg1 = If0 * eVbc3; XnBex = Xg1 / (1.0 + sqrt(1.0 + Xg1)); XIMex = XEXT * (0.5 * IK_TM * XnBex - IS_TM) / BRI_T; `ifdef SUBSTRATE XIMsub = XEXT * 2.0 * ISS_TM * (eVbc3 - 1.0) / (1.0 + sqrt(1.0 + 4.0 * IS_T / IKS_T * eVbc3)); Vex_bias = XEXT * (IS_TM / BRI_T + ISS_TM) * RCCxx_TM; `else XIMsub = 0.0; Vex_bias = XEXT * (IS_TM / BRI_T) * RCCxx_TM; `endif Vex = Vt * (2.0 - ln( Vex_bias * VtINV)); vdif = Vbc3 - Vex; `max_hyp0(VBex, vdif, 0.11); Fex = VBex /(Vex_bias + (XIMex + XIMsub) * RCCxx_TM + VBex); XIex = Fex * XIMex; `ifdef SUBSTRATE XIsub = Fex * XIMsub; `endif end else begin Fex = 0; XnBex = 0 ; end // Variable base resistance q0Q = 1.0 + Vte / VER_T + Vtc / VEF_T; `max_hyp0(q1Q, q0Q, 0.1); qBQ = q1Q * (1.0 + 0.5 * (n0 + nB)); Rb2 = 3.0 * RBV_TM / qBQ; Ib1b2 = (2.0 * Vt * (eVb1b2 - 1.0) + Vb1b2) / Rb2 + _circuit_gmin * Vb1b2; // Weak-avalanche current Iavl = 0.0; Gem = 0.0; if ((Ic1c2 > 0.0) && (Vb2c1 < VDC_T)) begin dEdx0 = 2.0 * VAVL / (WAVL * WAVL); sqr_arg = (VDC_T - Vb2c1) / Icap_IHC; xd = sqrt(2.0 * sqr_arg / dEdx0); if (EXAVL == 0.0) Weff = WAVL; else begin xi_w1 = 1.0 - 0.5 * xi_w; Weff = WAVL * xi_w1 * xi_w1; end Wd = xd * Weff / sqrt(xd * xd + Weff * Weff); Eav = (VDC_T - Vb2c1) / Wd; E0 = Eav + 0.5 * Wd * dEdx0 * Icap_IHC; if (EXAVL == 0) Em = E0; else begin SHw = 1.0 + 2.0 * SFH * (1.0 + 2.0 * xi_w); Efi = (1.0 + SFH) / (1.0 + 2.0 * SFH); Ew = Eav - 0.5 * Wd * dEdx0 * (Efi - Ic1c2 / (IHC_M * SHw)); sqr_arg = (Ew - E0) * (Ew - E0) + 0.1 * Eav * Eav * Icap / IHC_M; Em = 0.5 * (Ew + E0 + sqrt(sqr_arg)); end EmEav_Em = (Em - Eav) / Em; if (abs(EmEav_Em) > `TEN_M07) begin lambda = 0.5 * Wd / EmEav_Em; Gem = An / BnT * Em * lambda * (exp(-BnT / Em) - exp(-BnT / Em * (1.0 + Weff / lambda)) ); end else Gem = An * Weff * exp(-BnT / Em); Gmax = Vt / (Ic1c2 * (RBC_TM + Rb2)) + qBI / BF_T + RE_TM / (RBC_TM + Rb2); Iavl = Ic1c2 * Gem / (Gem +Gem / Gmax + 1.0); end if (eVb2c2star > 0.0) Vb2c2star = Vt * ln(eVb2c2star); else Vb2c2star = Vb2c2; `ifdef SELFHEATING // Power dissipation // RvdT 03-12-2007, modified power equation due to distribution collector resistance power = In * (Vb2e1 - Vb2c2star) + Ic1c2 * (Vb2c2star - Vb2c1) - Iavl * Vb2c2star + Vee1 * Vee1 / RE_TM + Vcc3 * Vcc3 * GCCxx_TM + Vc3c4 * Vc3c4 * GCCex_TM + Vc4c1 * Vc4c1 * GCCin_TM + Vbb1 * Vbb1 / RBC_TM + Ib1b2 * Vb1b2 + // 504.8: Nov. 2008, RvdT, TU_Delft: Zener current contribution added: // Izteb > 0 for Vb2e1 < 0, hence the minus sign: (Ib1 + Ib2 - Izteb) * Vb2e1 + Ib1_s * Vb1e1 + `ifdef SUBSTRATE (Iex + Ib3) * Vb1c4 + XIex * Vbc3 + Isub * (Vb1c4 - Vsc4) + XIsub * (Vbc3 - Vsc3) + Isf * Vsc1; `else (Iex + Ib3) * Vb1c4 + XIex * Vbc3; `endif `endif // Charges Qte = (1.0 - XCJE) * CJE_TM * Vte; `min_logexp(Vje_s, Vb1e1, Vfe, a_VDE); Qte_s = XCJE * CJE_TM * (VDE_T / (1.0 - PE) * (1.0 - pow(1.0 - Vje_s * inv_VDE_T, 1.0 - PE)) + `AJE * (Vb1e1 - Vje_s)); Qtc = XCJC * CJC_TM * Vtc; Qb0 = TAUB_T * IK_TM; Qbe_qs = 0.5 * Qb0 * n0 * q1Q; Qbc_qs = 0.5 * Qb0 * nB * q1Q; a_VDC = 0.1 * VDC_T; `min_logexp(Vjcex, Vb1c4, Vfc, a_VDC); Vtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - Vjcex / VDC_T, 1.0 - PC)) + bjc * (Vb1c4 - Vjcex); Qtex = CJC_TM * ((1.0 - XP_T) * Vtexv + XP_T * Vb1c4) * (1.0 - XCJC) * (1.0 - XEXT); `min_logexp(XVjcex, Vbc3, Vfc, a_VDC); XVtexv = VDC_T / (1.0 - PC) * (1.0 - pow(1.0 - XVjcex / VDC_T, 1.0 - PC)) + bjc * (Vbc3 - XVjcex); XQtex = CJC_TM * ((1.0 - XP_T) * XVtexv + XP_T * Vbc3) * (1.0 - XCJC) * XEXT; `ifdef SUBSTRATE a_VDS = 0.1 * VDS_T; Vfs = VDS_T * (1.0 - pow(`AJS , -1.0 / PS)); `min_logexp(Vjs, Vsc1, Vfs, a_VDS); Qts = CJS_TM * (VDS_T / (1.0 - PS) * (1.0 - pow(1.0 - Vjs / VDS_T, 1.0 - PS)) + `AJS * (Vsc1 - Vjs)); `endif Qe0 = TAUE_T * IK_TM * pow(IS_TM / IK_TM, 1.0 / MTAU); `expLin(tmpExp,Vb2e1 / (MTAU * Vt)) Qe = Qe0 * (tmpExp - 1.0); Qepi0 = 4.0 * TEPI_T * Vt / RCV_TM; Qepi = 0.5 * Qepi0 * xi_w * (p0star + pW + 2.0); Qex = TAUR_T * 0.5 * (Qb0 * nBex + Qepi0 * pWex) / (TAUB_T + TEPI_T); XQex = 0.0; if (EXMOD == 1) begin Qex = Qex * (1.0 - XEXT); Xg2 = 4.0 * eVbc3VDC; XpWex = Xg2 / (1.0 + sqrt(1.0 + Xg2)); XQex = 0.5 * Fex * XEXT * TAUR_T * (Qb0 * XnBex + Qepi0 * XpWex) / (TAUB_T + TEPI_T); end Qb1b2 = 0.0; if (EXPHI == 1) begin dVteVje = pow(1.0 - Vje * inv_VDE_T, -PE) - `AJE; Vb2e1Vfe = (Vb2e1 - Vfe) / a_VDE; if (Vb2e1Vfe < 0.0) dVjeVb2e1 = 1.0 / (1.0 + exp(Vb2e1Vfe)); else dVjeVb2e1 = exp(- Vb2e1Vfe) / (1.0 + exp(- Vb2e1Vfe)); dVteVb2e1 = dVteVje * dVjeVb2e1 + `AJE; dQteVb2e1 = (1.0 - XCJE) * CJE_TM * dVteVb2e1; dn0Vb2e1 = If0 * eVb2e1 * VtINV * (0.5 / sqrt(1.0 + f1)); dQbeVb2e1 = 0.5 * Qb0 * q1Q * dn0Vb2e1; dQeVb2e1 = (Qe + Qe0) / (MTAU * Vt); Qb1b2 = 0.2 * Vb1b2 * (dQteVb2e1 + dQbeVb2e1 + dQeVb2e1); Qbc = Qbe_qs * `one_third + Qbc_qs; Qbe = 2.0 * Qbe_qs * `one_third ; end else begin Qbe = Qbe_qs; Qbc = Qbc_qs; end // Add branch current contributions // Static currents I(c1, c2) <+ TYPE * Ic1c2; I(c2, e1) <+ TYPE * In; I(b1, e1) <+ TYPE * Ib1_s; // begin RvdT, 28-10-2008, MXT504.8_alpha // contribution tunnel current added I(b2, e1) <+ TYPE * (Ib1 + Ib2 - Izteb); `ifdef SUBSTRATE I(b1, s) <+ TYPE * Isub; I(b, s) <+ TYPE * XIsub; I(s, c1) <+ TYPE * Isf; `endif I(b1, b2) <+ TYPE * Ib1b2; I(b2, c2) <+ TYPE * (-1.0 * Iavl); I(e, e1) <+ TYPE * Vee1 / RE_TM; I(b, b1) <+ TYPE * Vbb1 / RBC_TM; `ifdef SELFHEATING // Electrical equivalent for the thermal network I(dt) <+ V(dt) / RTH_Tamb_M; I(dt) <+ ddt(CTH_M * V(dt)); I(dt) <+ -1.0 * power; `endif // Electrical equivalent for the correlated noise I(noi, e1) <+ V(noi, e1); cor_exp_1 = sqrt(1.0 + 2.0 * Gem) * V(noi,e1); I(b2, e1) <+ cor_exp_1; cor_exp_2 = (2.0 + 2.0 * Gem) / sqrt(1.0 + 2.0 * Gem) * V(noi, e1); I(e1, c2) <+ cor_exp_2; // Dynamic currents I(b2, e1) <+ ddt(TYPE * (Qte + Qbe + Qe)); I(b1, e1) <+ ddt(TYPE * (Qte_s)); I(b2, c2) <+ ddt(TYPE * (Qtc + Qbc + Qepi)); `ifdef SUBSTRATE I(s, c1) <+ ddt(TYPE * Qts); `endif I(b1, b2) <+ ddt(TYPE * Qb1b2); I(b, e) <+ ddt(TYPE * CBEO_M * Vbe); I(b, c) <+ ddt(TYPE * CBCO_M * Vbc); end // Currents and charges /* RvdT, Delft Univ. Tech. 03-12-2007. Distribution of parasitic collector resistance. This construct supports the case RCBLI = 0.0 and or RCBLX = 0.0 . It is up to the compiler to adjust the circuit topology and perform a node-collapse in such cases. */ if (RCBLX > 0.0) begin I(b, c3) <+ TYPE * XIex; I(c, c3) <+ TYPE * Vcc3 * GCCxx_TM ; I(b, c3) <+ ddt(TYPE * (XQtex + XQex)); if (RCBLI > 0.0) begin I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM; I(b1, c4) <+ TYPE * (Ib3 + Iex); I(c3, c4) <+ TYPE * Vc3c4 * GCCex_TM ; I(b1, c4) <+ ddt(TYPE * (Qtex + Qex)); end else begin V(c4, c1) <+ 0.0 ; I(b1, c1) <+ TYPE * (Ib3 + Iex); I(b1, c1) <+ ddt(TYPE * (Qtex + Qex)); I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ; end end else begin V(c3, c4) <+ 0 ; if (RCBLI > 0.0) begin I(b, c4) <+ TYPE * XIex; I(c, c4) <+ TYPE * Vcc3 * GCCxx_TM ; I(c4, c1) <+ TYPE * Vc4c1 * GCCin_TM; I(b1, c4) <+ TYPE * (Ib3 + Iex); I(b1, c4) <+ ddt(TYPE * (Qtex + Qex)); I(b, c4) <+ ddt(TYPE * (XQtex + XQex)); end else begin I(b, c1) <+ TYPE * XIex; I(c, c1) <+ TYPE * Vcc3 * GCCxx_TM ; V(c4, c1) <+ 0.0 ; I(b1, c1) <+ TYPE * (Ib3 + Iex); I(b1, c1) <+ ddt(TYPE * (Qtex + Qex)); I(b, c1) <+ ddt(TYPE * (XQtex + XQex)); I(c3, c1) <+ TYPE * Vc3c4 * GCCex_TM ; end end // Noise sources `NOISE begin // Thermal noise common = 4.0 * `KB * Tk; powerREC = common / RE_TM; // Emitter resistance powerRBC = common / RBC_TM; // Base resistance // RvdT, 03-12-2007: distributed collector resistance powerRCCxx = common * GCCxx_TM; // Collector resistance powerRCCex = common * GCCex_TM; // Collector resistance powerRCCin = common * GCCin_TM; // Collector resistance powerRBV = common / Rb2 * (4.0 * eVb1b2 + 5.0) * `one_third ; // Variable base resistance // Collector current shot noise powerCCS = 2.0 * `QQ * (If + Ir) / qBI; // Forward base current shot noise and 1/f noise // 504.8, Nov. 2008, RvdT, TU-Delft: added Zener current to shot noise powerFBCS = 2.0 * `QQ * (abs(Ib1) + abs(Ib2) + abs(Izteb)); powerFBC1fB1 = (1.0 - XIBI) * pow((abs(Ib1) / (1 - XIBI)), AF) * KF_M; exponentFBC1fB2 = (2.0 * (MLF - 1.0)) + (AF * (2.0 - MLF)); powerFBC1fB2 = KFN_M * pow(abs(Ib2), exponentFBC1fB2); // Emitter-base sidewall current shot and 1/f noise powerEBSCS = 2.0 * `QQ * abs(Ib1_s); if (XIBI == 0) powerEBSC1f = 0.0; else powerEBSC1f = KF_M * XIBI * pow((abs(Ib1_s / XIBI)), AF); // Reverse base current shot noise and 1/f noise powerRBCS = 2.0 * `QQ * abs(Ib3); powerRBC1f = KF_M * pow(abs(Ib3), AF); // Extrinsic current shot noise and 1/f noise powerExCS = 2.0 * `QQ * abs(Iex); powerExC1f = KF_M * (1 - (EXMOD * XEXT)) * pow((abs(Iex) / (1 - (EXMOD * XEXT))), AF); powerExCSMOD = 2.0 * `QQ * abs(XIex) * EXMOD; if (XEXT == 0.0) powerExC1fMOD = 0.0; else powerExC1fMOD = KF_M * EXMOD * XEXT * pow((abs(XIex) / XEXT), AF); `ifdef SUBSTRATE // Substrate current shot noise (between nodes B1 and S, resp. B and S) powerSubsCS_B1S = 2.0 * `QQ * abs(Isub); powerSubsCS_BS = 2.0 * `QQ * abs(XIsub); `endif // Noise due to the avalanche // twoqIavl = KAVL * 2.0 * `QQ * Iavl; twoqIavl = KAVL*Gem*powerCCS; powerCCS_A = powerCCS + twoqIavl * (3.0 + 2.0 * Gem - (2.0 + 2.0 * Gem)*(2.0 + 2.0 * Gem)/(1.0 + 2.0 * Gem) ); // Add noise sources I(e, e1) <+ white_noise(powerREC); // "emitter resistance" I(b, b1) <+ white_noise(powerRBC); // "base resistance" I(b1, b2) <+ white_noise(powerRBV); // "variable baseresistance" I(noi, e1) <+ white_noise(twoqIavl); // "avalanche" I(c2, e1) <+ white_noise(powerCCS_A); // "col_emi_shot" I(b2, e1) <+ white_noise(powerFBCS); // "bas_emi_forw" I(b2, e1) <+ flicker_noise(powerFBC1fB1, 1); // "bas_emi_forw" I(b2, e1) <+ flicker_noise(powerFBC1fB2, 1); // "bas_emi_forw" I(e1, b1) <+ white_noise(powerEBSCS); // "emi_bas_side" I(e1, b1) <+ flicker_noise(powerEBSC1f, 1); // "emi_bas_side" I(b1, c4) <+ white_noise(powerRBCS); // "bas_col_reve" I(b1, c4) <+ flicker_noise(powerRBC1f, 1); // "bas_col_reve" I(b1, c4) <+ white_noise(powerExCS); // "Ext_bas_col" I(b1, c4) <+ flicker_noise(powerExC1f, 1); // "Ext_bas_col" I(b, c3) <+ white_noise(powerExCSMOD); // "Ext_bas_col" I(b, c3) <+ flicker_noise(powerExC1fMOD, 1); // "Ext_bas_col" `ifdef SUBSTRATE I(b1, s) <+ white_noise(powerSubsCS_B1S); // "bas_sub_current" I(b, s) <+ white_noise(powerSubsCS_BS); // "bas_sub_current" `endif /* RvdT, Delft University of Technology 03-12-2007, Noise voltage associated with distributed parasitic collector. In case of vanishing resistance corresponding node is not addressed: */ // RvdT, 31-01-2007: distributed collector resistance if (RCBLX > 0.0) begin if (RCBLI > 0.0) begin /* all branches exist */ I(c, c3) <+ white_noise(powerRCCxx); // "collector plug resistance" I(c3, c4) <+ white_noise(powerRCCex); // "extrinsic collector BL resistance" I(c4, c1) <+ white_noise(powerRCCin); // "intrinsic collector BL resistance" end else begin /* only Rcblx exists */ I(c, c3) <+ white_noise(powerRCCxx); // "collector plug resistance" I(c3, c1) <+ white_noise(powerRCCex); // "extrinsic collector BL resistance" end end else begin if (RCBLI > 0.0) begin /* only Rcbli exists */ I(c, c4) <+ white_noise(powerRCCxx); // "collector plug resistance" I(c4, c1) <+ white_noise(powerRCCin); // "intrinsic collector BL resistance" end else begin /* neither Rcblx nor Rcbli exists */ I(c, c1) <+ white_noise(powerRCCxx); // "collector plug resistance" end end end // Noise sources ngspice-26/src/spicelib/devices/adms/hicum2/0000755000265600020320000000000012264261473020347 5ustar andreasadminngspice-26/src/spicelib/devices/adms/hicum2/admsva/0000755000265600020320000000000012264261473021622 5ustar andreasadminngspice-26/src/spicelib/devices/adms/hicum2/admsva/hicum2.va0000644000265600020320000020234312264261473023345 0ustar andreasadmin//HICUM Level_2 Version_2.24: A Verilog-A Description //dw 09/10: Modifications for ngspice and adms: // backup to ddx for capacitance calculation // all V(...) <+ 0.0; are replaced by I(...) < V(...)/`MIN_R; // using GMIN from ngspice: _circuit_gmin // switch of section for correlated noise (see below) // removed obsolete variables S_avl, f_p // don't like internal variable declaration //**************New Implementations***************** //****************************************************************************** //This code contains a Verilog-A implementation of Vertical Non-Quasi-Static(NQS) //Effects using adjunct gyrator networks. To turn on this effect please set FLNQS=1. //Although Vertical NQS effects have been taken into account in HICUM from the very //beginning (see original FTN code and built-in v2.1 HICUM model inside most of the //existing circuit simulators) their implementation has been based on Weil's approach. //However, using Verilog, it is presently not possible to implement Weil's approach, //since there does not exist access to previous time-steps of the simulatior. //The nearly available Verilog-A solution reproduces the results of previous //HICUM versions (cf. documentation). //****************************************************************************** //****************************************************************************** // Implementation of noise correlation // Please turn-off (by front slash “//”) the noise correlation code section for simulation with Spectre //****************************************************************************** // ***************Bug fix and optimization************* // 12/09: Elimination of 'ddx' operator for internal capacitance determination // Capacitances will be calculated by Analytical Equations // 10/09: Temperature coefficient (ZETAxyz) range modified to [-10:10] // 09/09: VPT ranges modified from [0:inf] to (0:inf] // 07/09: DT0H rabge modified from no range to (-inf:inf) // 03/09: Simplified input NQS adjacent circuit (RC network) // 04/08: New range has been defined for FDQR0. // 11/07: Bugs have been fixed in macro HICFCI and HICQFC // 10/06: in @(initial_model), external if-block for HICTUN_T removed // 11/06: within HICQFC, minor changes made for LATB<=0.01; // also HICFCI and HICFCT are changed accordingly // to ensure correct derivatives // Upper limit of FGEO parameter was changed to infinity. // 12/06: expressions for Cdei and Cdci are corrected not to include // Ccdei and Cbdci respectively (used in Crbi expression). // 01/06: FCdf1_dw assigned expression (missing in v2.21) // FCa and FCa1 are found to have same expression: FCa is omitted in those cases // FCa1 written instead of FCa in the expression for FCf_ci // Thermal node "tnode" set as external // zetasct = mg+1-2.5 changed to zetasct = mg-1.5; // Code optimization: Temperature dependent parts are moduled in two separate blocks: // within @(initial_model) when self-heating is OFF // outside @(initial_model) when self-heating is ON // 03/06 : Further fix // vlim_t,ibcis_t,ibcxs_t,itss_t,iscs_t considered in compatibility block // ddt() operators are separated in contribution expressions. // FLCOMP parameter is given different values // 05/06: // all if-else blocks marked with begin-end // unused variables deleted // all series resistors and RTH are allowed to have a minimum value MIN_R // only tunelling current source contribution within if-then-else // 06/06: HICRBI deleted and instead the code changed (hyperbolic smoothing in // conductivity modulation part) and put in relevant portion of the code. // 07/06: ddx() operator used to find out capacitances from charges: // QJMODF,QJMOD,HICJQ changed accordingly // Lateral NQS effect modified with ddx() operator. // HICFCT included for downward compatibility reason. // Few macros are taken inside the code: HICICK, HICAVL, HICTUN (more optimized), // internal base resistance (Qjci included under conductivity modulation, hyperbolic smoothing used) // Gmin added at (bi,ei) and (bi,ci) branches. // 08/06: Units added in the parameter descriptions. // ********************************************************************************* // 06/06: Comment on NODE COLLAPSING: // Presently this verilog code permits a minimum of 1 milli-Ohm resistance for any // series resistance as well as for thermal resistance RTH. If any of the resistance // values drops below this minimum value, the corresponding nodes are shorted with // zero voltage contribution. We want the model compilers/simulators deal this // situation in such a manner that the corresponding node is COLLAPSED. // We expect that the simulators should permit current contribution statement // for any branch with resistance value more than (or equal to) 1 milli-Ohm without // any convergence problem. In fact, we wish NOT to have to use a voltage contribution // statement in our Verilog code, except as an indication for the model compiler/simulator // to interprete a zero branch voltage as NODE-COLLAPSING action. // ********************************************************************************** //Default simulator: Spectre `ifdef insideADMS `define MODEL @(initial_model) `define NOISE @(noise) `define ATTR(txt) (*txt*) `else `define MODEL `define NOISE `define ATTR(txt) `endif `define VPT_thresh 1.0e2 `define Dexp_lim 80.0 `define Cexp_lim 80.0 `define DFa_fj 1.921812 `define RTOLC 1.0e-5 `define l_itmax 100 `define TMAX 326.85 `define TMIN -100.0 `define LN_EXP_LIMIT 11.0 `define MIN_R 0.001 //`define Gmin 1.0e-12 //`define Gmin $simparam("gmin",1e-12) //suggested by L.L //ADS //`include "constants.vams" //`include "disciplines.vams" //`include "compact.vams" //Spectre `include "constants.h" `include "discipline.h" //////////////Explicit Capacitance and Charge Expression/////////////// // DEPLETION CHARGE CALCULATION // Hyperbolic smoothing used; no punch-through // INPUT: // c_0 : zero-bias capacitance // u_d : built-in voltage // z : exponent coefficient // a_j : control parameter for C peak value at high forward bias // U_cap : voltage across junction // IMPLICIT INPUT: // VT : thermal voltage // OUTPUT: // Qz : depletion Charge // C : depletion capacitance `define QJMODF(c_0,u_d,z,a_j,U_cap,C,Qz)\ if(c_0 > 0.0) begin\ DFV_f = u_d*(1.0-exp(-ln(a_j)/z));\ DFv_e = (DFV_f-U_cap)/VT;\ DFs_q = sqrt(DFv_e*DFv_e+`DFa_fj);\ DFs_q2 = (DFv_e+DFs_q)*0.5;\ DFv_j = DFV_f-VT*DFs_q2;\ DFdvj_dv = DFs_q2/DFs_q;\ DFb = ln(1.0-DFv_j/u_d);\ DFC_j1 = c_0*exp(-z*DFb)*DFdvj_dv;\ C = DFC_j1+a_j*c_0*(1.0-DFdvj_dv);\ DFQ_j = c_0*u_d*(1.0-exp(DFb*(1.0-z)))/(1.0-z);\ Qz = DFQ_j+a_j*c_0*(U_cap-DFv_j);\ end else begin\ C = 0.0;\ Qz = 0.0;\ end //////////////////////////////////////////////////////////////// //////////////Explicit Capacitance and Charge Expression/////////////// // DEPLETION CHARGE CALCULATION CONSIDERING PUNCH THROUGH // smoothing of reverse bias region (punch-through) // and limiting to a_j=Cj,max/Cj0 for forward bias. // Important for base-collector and collector-substrate junction // INPUT: // c_0 : zero-bias capacitance // u_d : built-in voltage // z : exponent coefficient // a_j : control parameter for C peak value at high forward bias // v_pt : punch-through voltage (defined as qNw^2/2e) // U_cap : voltage across junction // IMPLICIT INPUT: // VT : thermal voltage // OUTPUT: // Qz : depletion charge // C : depletion capacitance `define QJMOD(c_0,u_d,z,a_j,v_pt,U_cap,C,Qz)\ if(c_0 > 0.0) begin\ Dz_r = z/4.0;\ Dv_p = v_pt-u_d;\ DV_f = u_d*(1.0-exp(-ln(a_j)/z));\ DC_max = a_j*c_0;\ DC_c = c_0*exp((Dz_r-z)*ln(v_pt/u_d));\ Dv_e = (DV_f-U_cap)/VT;\ if(Dv_e < `Cexp_lim) begin\ De = exp(Dv_e);\ De_1 = De/(1.0+De);\ Dv_j1 = DV_f-VT*ln(1.0+De);\ end else begin\ De_1 = 1.0;\ Dv_j1 = U_cap;\ end\ Da = 0.1*Dv_p+4.0*VT;\ Dv_r = (Dv_p+Dv_j1)/Da;\ if(Dv_r < `Cexp_lim) begin\ De = exp(Dv_r);\ De_2 = De/(1.0+De);\ Dv_j2 = -Dv_p+Da*ln(1.0+De);\ end else begin\ De_2 = 1.0;\ Dv_j2 = Dv_j1;\ end\ Dv_j4 = U_cap-Dv_j1;\ DCln1 = ln(1.0-Dv_j1/u_d);\ DCln2 = ln(1.0-Dv_j2/u_d);\ Dz1 = 1.0-z;\ Dzr1 = 1.0-Dz_r;\ DC_j1 = c_0*exp(DCln2*(-z))*De_1*De_2;\ DC_j2 = DC_c*exp(DCln1*(-Dz_r))*(1.0-De_2);\ DC_j3 = DC_max*(1.0-De_1);\ C = DC_j1+DC_j2+DC_j3;\ DQ_j1 = c_0*(1.0-exp(DCln2*Dz1))/Dz1;\ DQ_j2 = DC_c*(1.0-exp(DCln1*Dzr1))/Dzr1;\ DQ_j3 = DC_c*(1.0-exp(DCln2*Dzr1))/Dzr1;\ Qz = (DQ_j1+DQ_j2-DQ_j3)*u_d+DC_max*Dv_j4;\ end else begin\ C = 0.0;\ Qz = 0.0;\ end // DEPLETION CHARGE & CAPACITANCE CALCULATION SELECTOR // Dependent on junction punch-through voltage // Important for collector related junctions `define HICJQ(c_0,u_d,z,v_pt,U_cap,C,Qz)\ if(v_pt < `VPT_thresh) begin\ `QJMOD(c_0,u_d,z,2.4,v_pt,U_cap,C,Qz)\ end else begin\ `QJMODF(c_0,u_d,z,2.4,U_cap,C,Qz)\ end // A CALCULATION NEEDED FOR COLLECTOR MINORITY CHARGE FORMULATION // INPUT: // zb,zl : zeta_b and zeta_l (model parameters, TED 10/96) // w : normalized injection width // OUTPUT: // hicfcio : function of equation (2.1.17-10) `define HICFCI(zb,zl,w,hicfcio,dhicfcio_dw)\ z = zb*w;\ lnzb = ln(1+zb*w);\ if(z > 1.0e-6) begin\ x = 1.0+z;\ a = x*x;\ a2 = 0.250*(a*(2.0*lnzb-1.0)+1.0);\ a3 = (a*x*(3.0*lnzb-1.0)+1.0)/9.0;\ r = zl/zb;\ hicfcio = ((1.0-r)*a2+r*a3)/zb;\ dhicfcio_dw = ((1.0-r)*x+r*a)*lnzb;\ end else begin\ a = z*z;\ a2 = 3.0+z-0.25*a+0.10*z*a;\ a3 = 2.0*z+0.75*a-0.20*a*z;\ hicfcio = (zb*a2+zl*a3)*w*w/6.0;\ dhicfcio_dw = (1+zl*w)*(1+z)*lnzb;\ end // NEEDED TO CALCULATE WEIGHTED ICCR COLLECTOR MINORITY CHARGE // INPUT: // z : zeta_b or zeta_l // w : normalized injection width // OUTPUT: // hicfcto : output // dhicfcto_dw : derivative of output wrt w `define HICFCT(z,w,hicfcto,dhicfcto_dw)\ a = z*w;\ lnz = ln(1+z*w);\ if (a > 1.0e-6) begin\ hicfcto = (a - lnz)/z;\ dhicfcto_dw = a / (1.0 + a);\ end else begin\ hicfcto = 0.5 * a * w;\ dhicfcto_dw = a;\ end // COLLECTOR CURRENT SPREADING CALCULATION // collector minority charge incl. 2D/3D current spreading (TED 10/96) // INPUT: // Ix : forward transport current component (itf) // I_CK : critical current // FFT_pcS : dependent on fthc and thcs (parameters) // IMPLICIT INPUT: // ahc, latl, latb : model parameters // VT : thermal voltage // OUTPUT: // Q_fC, Q_CT: actual and ICCR (weighted) hole charge // T_fC, T_cT: actual and ICCR (weighted) transit time // Derivative dfCT_ditf not properly implemented yet `define HICQFC(Ix,I_CK,FFT_pcS,Q_fC,Q_CT,T_fC,T_cT)\ Q_fC = FFT_pcS*Ix;\ FCa = 1.0-I_CK/Ix;\ FCrt = sqrt(FCa*FCa+ahc);\ FCa_ck = 1.0-(FCa+FCrt)/(1.0+sqrt(1.0+ahc));\ FCdaick_ditf = (FCa_ck-1.0)*(1-FCa)/(FCrt*Ix);\ if(latb > latl) begin\ FCz = latb-latl;\ FCxl = 1.0+latl;\ FCxb = 1.0+latb;\ if(latb > 0.01) begin\ FCln = ln(FCxb/FCxl);\ FCa1 = exp((FCa_ck-1.0)*FCln);\ FCd_a = 1.0/(latl-FCa1*latb);\ FCw = (FCa1-1.0)*FCd_a;\ FCdw_daick = -FCz*FCa1*FCln*FCd_a*FCd_a;\ FCa1 = ln((1.0+latb*FCw)/(1.0+latl*FCw));\ FCda1_dw = latb/(1.0+latb*FCw) - latl/(1.0+latl*FCw);\ end else begin\ FCf1 = 1.0-FCa_ck;\ FCd_a = 1.0/(1.0+FCa_ck*latb);\ FCw = FCf1*FCd_a;\ FCdw_daick = -1.0*FCd_a*FCd_a*FCxb*FCd_a;\ FCa1 = FCz*FCw;\ FCda1_dw = FCz;\ end\ FCf_CT = 2.0/FCz;\ FCw2 = FCw*FCw;\ FCf1 = latb*latl*FCw*FCw2/3.0+(latb+latl)*FCw2/2.0+FCw;\ FCdf1_dw = latb*latl*FCw2 + (latb+latl)*FCw + 1.0;\ `HICFCI(latb,latl,FCw,FCf2,FCdf2_dw)\ `HICFCI(latl,latb,FCw,FCf3,FCdf3_dw)\ FCf_ci = FCf_CT*(FCa1*FCf1-FCf2+FCf3);\ FCdfc_dw = FCf_CT*(FCa1*FCdf1_dw+FCda1_dw*FCf1-FCdf2_dw+FCdf3_dw);\ FCdw_ditf = FCdw_daick*FCdaick_ditf;\ FCdfc_ditf = FCdfc_dw*FCdw_ditf;\ if(flcomp == 0.0 || flcomp == 2.1) begin\ `HICFCT(latb,FCw,FCf2,FCdf2_dw)\ `HICFCT(latl,FCw,FCf3,FCdf3_dw)\ FCf_CT = FCf_CT*(FCf2-FCf3);\ FCdfCT_dw = FCf_CT*(FCdf2_dw-FCdf3_dw);\ FCdfCT_ditf = FCdfCT_dw*FCdw_ditf;\ end else begin\ FCf_CT = FCf_ci;\ FCdfCT_ditf = FCdfc_ditf;\ end\ end else begin\ if(latb > 0.01) begin\ FCd_a = 1.0/(1.0+FCa_ck*latb);\ FCw = (1.0-FCa_ck)*FCd_a;\ FCdw_daick = -(1.0+latb)*FCd_a*FCd_a;\ end else begin\ FCw = 1.0-FCa_ck-FCa_ck*latb;\ FCdw_daick = -(1.0+latb);\ end\ FCw2 = FCw*FCw;\ FCz = latb*FCw;\ FCz_1 = 1.0+FCz;\ FCd_f = 1.0/(FCz_1);\ FCf_ci = FCw2*(1.0+FCz/3.0)*FCd_f;\ FCdfc_dw = 2.0*FCw*(FCz_1+FCz*FCz/3.0)*FCd_f*FCd_f;\ FCdw_ditf = FCdw_daick*FCdaick_ditf;\ FCdfc_ditf = FCdfc_dw*FCdw_ditf;\ if(flcomp == 0.0 || flcomp == 2.1) begin\ if (FCz > 0.001) begin\ FCf_CT = 2.0*(FCz_1*ln(FCz_1)-FCz)/(latb*latb*FCz_1);\ FCdfCT_dw = 2.0*FCw*FCd_f*FCd_f;\ end else begin\ FCf_CT = FCw2*(1.0-FCz/3.0)*FCd_f;\ FCdfCT_dw = 2.0*FCw*(1.0-FCz*FCz/3.0)*FCd_f*FCd_f;\ end\ FCdfCT_ditf = FCdfCT_dw*FCdw_ditf;\ end else begin\ FCf_CT = FCf_ci;\ FCdfCT_ditf = FCdfc_ditf;\ end\ end\ Q_CT = Q_fC*FCf_CT;\ Q_fC = Q_fC*FCf_ci;\ T_fC = FFT_pcS*(FCf_ci+Ix*FCdfc_ditf);\ T_cT = FFT_pcS*(FCf_CT+Ix*FCdfCT_ditf); // TRANSIT-TIME AND STORED MINORITY CHARGE // INPUT: // itf : forward transport current // I_CK : critical current // T_f : transit time \ // Q_f : minority charge / for low current // IMPLICIT INPUT: // tef0, gtfe, fthc, thcs, ahc, latl, latb : model parameters // OUTPUT: // T_f : transit time \ // Q_f : minority charge / transient analysis // T_fT : transit time \ // Q_fT : minority charge / ICCR (transfer current) // Q_bf : excess base charge `define HICQFF(itf,I_CK,T_f,Q_f,T_fT,Q_fT,Q_bf)\ if(itf < 1.0e-6*I_CK) begin\ Q_fT = Q_f;\ T_fT = T_f;\ end else begin\ FFa = I_CK/itf;\ FFd_TfE = tef0_t*exp(-gtfe*ln(FFa));\ FFd_QfE = FFd_TfE*itf/(gtfe+1.0);\ FFT_fbS = (1.0-fthc)*thcs_t;\ FFx = 1.0-FFa;\ FFs = sqrt(FFx*FFx+ahc);\ FFw = (FFx+FFs)/(1.0+sqrt(1.0+ahc));\ FFw_2 = FFw*FFw;\ FFd_QfB = FFT_fbS*itf*FFw_2;\ Q_bf = FFd_QfB;\ FFa_w = FFw_2*(1.0+2.0*FFa/FFs);\ FFd_TfB = FFT_fbS*FFa_w;\ FFT_pcS = fthc*thcs_t;\ if(latb <= 0.0 && latl <= 0.0) begin\ FFQ_fC = FFT_pcS*itf*FFw_2;\ FFT_fC = FFT_pcS*FFa_w;\ FFQ_cT = FFQ_fC;\ FFT_cT = FFT_fC;\ end else begin\ `HICQFC(itf,I_CK,FFT_pcS,FFQ_fC,FFQ_cT,FFT_fC,FFT_cT)\ end\ Q_f = Q_f+FFd_QfB;\ T_f = T_f+FFd_TfB;\ Q_fT = Q_f+hfe*FFd_QfE+hfc*FFQ_cT;\ T_fT = T_f+hfe*FFd_TfE+hfc*FFT_cT;\ Q_f = Q_f+FFd_QfE+FFQ_fC;\ T_f = T_f+FFd_TfE+FFT_fC;\ end // IDEAL DIODE (WITHOUT CAPACITANCE): // conductance calculation not required // INPUT: // IS, IST : saturation currents (model parameter related) // UM1 : ideality factor // U : branch voltage // IMPLICIT INPUT: // VT : thermal voltage // OUTPUT: // Iz : diode current `define HICDIO(IS,IST,UM1,U,Iz)\ DIOY = U/(UM1*VT);\ if (IS > 0.0) begin\ if (DIOY > `Dexp_lim) begin\ le = (1 + (DIOY - `Dexp_lim));\ DIOY = `Dexp_lim;\ end else begin\ le = 1;\ end\ le = le*limexp(DIOY);\ Iz = IST*(le-1.0);\ if(DIOY <= -14.0) begin\ Iz = -IST;\ end\ end else begin\ Iz = 0.0;\ end // TEMPERATURE UPDATE OF JUNCTION CAPACITANCE RELATED PARAMETERS // INPUT: // mostly model parameters // x : zero bias junction capacitance // y : junction built-in potencial // z : grading co-efficient // w : ratio of maximum to zero-bias value of capacitance or punch-through voltage // is_al : condition factor to check what "w" stands for // vgeff : band-gap voltage // IMPLICIT INPUT: // VT : thermal voltage // vt0,qtt0,ln_qtt0,mg : other model variables // OUTPUT: // c_j_t : temperature update of "c_j" // vd_t : temperature update of "vd0" // w_t : temperature update of "w" `define TMPHICJ(c_j,vd0,z,w,is_al,vgeff,c_j_t,vd_t,w_t)\ if (c_j > 0.0) begin\ vdj0 = 2*vt0*ln(exp(vd0*0.5/vt0)-exp(-0.5*vd0/vt0));\ vdjt = vdj0*qtt0+vgeff*(1-qtt0)-mg*VT*ln_qtt0;\ vdt = vdjt+2*VT*ln(0.5*(1+sqrt(1+4*exp(-vdjt/VT))));\ vd_t = vdt;\ c_j_t = c_j*exp(z*ln(vd0/vd_t));\ if (is_al == 1) begin\ w_t = w*vd_t/vd0;\ end else begin\ w_t = w;\ end\ end else begin\ c_j_t = c_j;\ vd_t = vd0;\ w_t = w;\ end module hic2_full (c,b,e,s,tnode); //Node definitions inout c,b,e,s,tnode; electrical c,b,e,s,ci,ei,bp,bi,si; electrical xf1,xf2; electrical xf; //RC nw electrical tnode; electrical n1,n2; //Branch definitions branch (b,bp) br_bbp_i; branch (b,bp) br_bbp_v; branch (ci,c) br_cic_i; branch (ci,c) br_cic_v; branch (ei,e) br_eie_i; branch (ei,e) br_eie_v; branch (bp,bi) br_bpbi_i; branch (bp,bi) br_bpbi_v; branch (si,s) br_sis_i; branch (si,s) br_sis_v; branch (bi,ei) br_biei; branch (bi,ci) br_bici; branch (ci,bi) br_cibi; branch (ci,ei) br_ciei; branch (ei,ci) br_eici; branch (bp,e) br_bpe; branch (b,e) br_be; branch (bp,ei) br_bpei; branch (bp,ci) br_bpci; branch (b,ci) br_bci; branch (si,ci) br_sici; branch (bp,si) br_bpsi; branch (tnode ) br_sht; //Phase network for ITF branch (xf1 ) br_bxf1; branch (xf1 ) br_cxf1; branch (xf2 ) br_bxf2; branch (xf2 ) br_cxf2; //Phase network for QF branch (xf ) br_bxf; //for RC nw branch (xf ) br_cxf; //for RC nw //Noise branch (n1 ) b_n1; branch (n2 ) b_n2; // -- ########################################################### // -- ########### Parameters initialization ################ // -- ########################################################### //Transfer current parameter real c10 = 2.0E-30 from [0:1] `ATTR(info="GICCR constant" unit="A^2s"); parameter real qp0 = 2.0E-14 from (0:1] `ATTR(info="Zero-bias hole charge" unit="Coul"); parameter real ich = 0.0 from [0:inf) `ATTR(info="High-current correction for 2D and 3D effects" unit="A"); //`0' signifies infinity parameter real hfe = 1.0 from [0:inf] `ATTR(info="Emitter minority charge weighting factor in HBTs"); parameter real hfc = 1.0 from [0:inf] `ATTR(info="Collector minority charge weighting factor in HBTs"); parameter real hjei = 1.0 from [0:100] `ATTR(info="B-E depletion charge weighting factor in HBTs"); parameter real hjci = 1.0 from [0:100] `ATTR(info="B-C depletion charge weighting factor in HBTs"); //Base-Emitter diode currents parameter real ibeis = 1.0E-18 from [0:1] `ATTR(info="Internal B-E saturation current" unit="A"); parameter real mbei = 1.0 from (0:10] `ATTR(info="Internal B-E current ideality factor"); parameter real ireis = 0.0 from [0:1] `ATTR(info="Internal B-E recombination saturation current" unit="A"); parameter real mrei = 2.0 from (0:10] `ATTR(info="Internal B-E recombination current ideality factor"); parameter real ibeps = 0.0 from [0:1] `ATTR(info="Peripheral B-E saturation current" unit="A"); parameter real mbep = 1.0 from (0:10] `ATTR(info="Peripheral B-E current ideality factor"); parameter real ireps = 0.0 from [0:1] `ATTR(info="Peripheral B-E recombination saturation current" unit="A"); parameter real mrep = 2.0 from (0:10] `ATTR(info="Peripheral B-E recombination current ideality factor"); parameter real mcf = 1.0 from (0:10] `ATTR(info="Non-ideality factor for III-V HBTs"); //Transit time for excess recombination current at b-c barrier parameter real tbhrec = 0.0 from [0:inf) `ATTR(info="Base current recombination time constant at B-C barrier for high forward injection" unit="s"); //Base-Collector diode currents parameter real ibcis = 1.0E-16 from [0:1.0] `ATTR(info="Internal B-C saturation current" unit="A"); parameter real mbci = 1.0 from (0:10] `ATTR(info="Internal B-C current ideality factor"); parameter real ibcxs = 0.0 from [0:1.0] `ATTR(info="External B-C saturation current" unit="A"); parameter real mbcx = 1.0 from (0:10] `ATTR(info="External B-C current ideality factor"); //Base-Emitter tunneling current parameter real ibets = 0.0 from [0:1] `ATTR(info="B-E tunneling saturation current" unit="A"); parameter real abet = 40 from [0:inf) `ATTR(info="Exponent factor for tunneling current"); parameter integer tunode= 1 from [0:1] `ATTR(info="Specifies the base node connection for the tunneling current"); // =1 signifies perimeter node //Base-Collector avalanche current parameter real favl = 0.0 from [0:inf) `ATTR(info="Avalanche current factor" unit="1/V"); parameter real qavl = 0.0 from [0:inf) `ATTR(info="Exponent factor for avalanche current" unit="Coul"); parameter real alfav = 0.0 `ATTR(info="Relative TC for FAVL" unit="1/K"); parameter real alqav = 0.0 `ATTR(info="Relative TC for QAVL" unit="1/K"); //Series resistances parameter real rbi0 = 0.0 from [0:inf) `ATTR(info="Zero bias internal base resistance" unit="Ohm"); parameter real rbx = 0.0 from [0:inf) `ATTR(info="External base series resistance" unit="Ohm"); parameter real fgeo = 0.6557 from [0:inf] `ATTR(info="Factor for geometry dependence of emitter current crowding"); parameter real fdqr0 = 0.0 from [-0.5:100] `ATTR(info="Correction factor for modulation by B-E and B-C space charge layer"); parameter real fcrbi = 0.0 from [0:1] `ATTR(info="Ratio of HF shunt to total internal capacitance (lateral NQS effect)"); parameter real fqi = 1.0 from [0:1] `ATTR(info="Ration of internal to total minority charge"); parameter real re = 0.0 from [0:inf) `ATTR(info="Emitter series resistance" unit="Ohm"); parameter real rcx = 0.0 from [0:inf) `ATTR(info="External collector series resistance" unit="Ohm"); //Substrate transistor parameter real itss = 0.0 from [0:1.0] `ATTR(info="Substrate transistor transfer saturation current" unit="A"); parameter real msf = 1.0 from (0:10] `ATTR(info="Forward ideality factor of substrate transfer current"); parameter real iscs = 0.0 from [0:1.0] `ATTR(info="C-S diode saturation current" unit="A"); parameter real msc = 1.0 from (0:10] `ATTR(info="Ideality factor of C-S diode current"); parameter real tsf = 0.0 from [0:inf) `ATTR(info="Transit time for forward operation of substrate transistor" unit="s"); //Intra-device substrate coupling parameter real rsu = 0.0 from [0:inf) `ATTR(info="Substrate series resistance" unit="Ohm"); parameter real csu = 0.0 from [0:inf) `ATTR(info="Substrate shunt capacitance" unit="F"); //Depletion Capacitances parameter real cjei0 = 1.0E-20 from [0:inf) `ATTR(info="Internal B-E zero-bias depletion capacitance" unit="F"); parameter real vdei = 0.9 from (0:10] `ATTR(info="Internal B-E built-in potential" unit="V"); parameter real zei = 0.5 from (0:1] `ATTR(info="Internal B-E grading coefficient"); parameter real ajei = 2.5 from [1:inf) `ATTR(info="Ratio of maximum to zero-bias value of internal B-E capacitance"); parameter real cjep0 = 1.0E-20 from [0:inf) `ATTR(info="Peripheral B-E zero-bias depletion capacitance" unit="F"); parameter real vdep = 0.9 from (0:10] `ATTR(info="Peripheral B-E built-in potential" unit="V"); parameter real zep = 0.5 from (0:1] `ATTR(info="Peripheral B-E grading coefficient"); parameter real ajep = 2.5 from [1:inf) `ATTR(info="Ratio of maximum to zero-bias value of peripheral B-E capacitance"); parameter real cjci0 = 1.0E-20 from [0:inf) `ATTR(info="Internal B-C zero-bias depletion capacitance" unit="F"); parameter real vdci = 0.7 from (0:10] `ATTR(info="Internal B-C built-in potential" unit="V"); parameter real zci = 0.4 from (0:1] `ATTR(info="Internal B-C grading coefficient"); parameter real vptci = 100 from (0:100] `ATTR(info="Internal B-C punch-through voltage" unit="V"); parameter real cjcx0 = 1.0E-20 from [0:inf) `ATTR(info="External B-C zero-bias depletion capacitance" unit="F"); parameter real vdcx = 0.7 from (0:10] `ATTR(info="External B-C built-in potential" unit="V"); parameter real zcx = 0.4 from (0:1] `ATTR(info="External B-C grading coefficient"); parameter real vptcx = 100 from (0:100] `ATTR(info="External B-C punch-through voltage" unit="V"); parameter real fbcpar = 0.0 from [0:1] `ATTR(info="Partitioning factor of parasitic B-C cap"); parameter real fbepar = 1.0 from [0:1] `ATTR(info="Partitioning factor of parasitic B-E cap"); parameter real cjs0 = 0.0 from [0:inf) `ATTR(info="C-S zero-bias depletion capacitance" unit="F"); parameter real vds = 0.6 from (0:10] `ATTR(info="C-S built-in potential" unit="V"); parameter real zs = 0.5 from (0:1] `ATTR(info="C-S grading coefficient"); parameter real vpts = 100 from (0:100] `ATTR(info="C-S punch-through voltage" unit="V"); //Diffusion Capacitances parameter real t0 = 0.0 from [0:inf) `ATTR(info="Low current forward transit time at VBC=0V" unit="s"); parameter real dt0h = 0.0 from (-inf:inf) `ATTR(info="Time constant for base and B-C space charge layer width modulation" unit="s"); parameter real tbvl = 0.0 from [0:inf) `ATTR(info="Time constant for modelling carrier jam at low VCE" unit="s"); parameter real tef0 = 0.0 from [0:inf) `ATTR(info="Neutral emitter storage time" unit="s"); parameter real gtfe = 1.0 from (0:10] `ATTR(info="Exponent factor for current dependence of neutral emitter storage time"); parameter real thcs = 0.0 from [0:inf) `ATTR(info="Saturation time constant at high current densities" unit="s"); parameter real ahc = 0.1 from (0:10] `ATTR(info="Smoothing factor for current dependence of base and collector transit time"); parameter real fthc = 0.0 from [0:1] `ATTR(info="Partitioning factor for base and collector portion"); parameter real rci0 = 150 from (0:inf) `ATTR(info="Internal collector resistance at low electric field" unit="Ohm"); parameter real vlim = 0.5 from (0:10] `ATTR(info="Voltage separating ohmic and saturation velocity regime" unit="V"); parameter real vces = 0.1 from [0:1] `ATTR(info="Internal C-E saturation voltage" unit="V"); parameter real vpt = 100.0 from (0:inf] `ATTR(info="Collector punch-through voltage" unit="V"); // `0' signifies infinity parameter real tr = 0.0 from [0:inf) `ATTR(info="Storage time for inverse operation" unit="s"); //Isolation Capacitances parameter real cbepar = 0.0 from [0:inf) `ATTR(info="Total parasitic B-E capacitance" unit="F"); parameter real cbcpar = 0.0 from [0:inf) `ATTR(info="Total parasitic B-C capacitance" unit="F"); //Non-quasi-static Effect parameter real alqf = 0.0 from [0:1] `ATTR(info="Factor for additional delay time of minority charge"); parameter real alit = 0.0 from [0:1] `ATTR(info="Factor for additional delay time of transfer current"); parameter integer flnqs = 0 from [0:1] `ATTR(info="Flag for turning on and off of vertical NQS effect"); //Noise parameter real kf = 0.0 from [0:inf) `ATTR(info="Flicker noise coefficient"); parameter real af = 2.0 from (0:10] `ATTR(info="Flicker noise exponent factor"); parameter integer cfbe = -1 from [-2:-1] `ATTR(info="Flag for determining where to tag the flicker noise source"); //Lateral Geometry Scaling (at high current densities) parameter real latb = 0.0 from [0:inf) `ATTR(info="Scaling factor for collector minority charge in direction of emitter width"); parameter real latl = 0.0 from [0:inf) `ATTR(info="Scaling factor for collector minority charge in direction of emitter length"); //Temperature dependence parameter real vgb = 1.17 from (0:10] `ATTR(info="Bandgap voltage extrapolated to 0 K" unit="V"); parameter real alt0 = 0.0 `ATTR(info="First order relative TC of parameter T0" unit="1/K"); parameter real kt0 = 0.0 `ATTR(info="Second order relative TC of parameter T0"); parameter real zetaci = 0.0 from [-10:10] `ATTR(info="Temperature exponent for RCI0"); parameter real alvs = 0.0 `ATTR(info="Relative TC of saturation drift velocity" unit="1/K"); parameter real alces = 0.0 `ATTR(info="Relative TC of VCES" unit="1/K"); parameter real zetarbi = 0.0 from [-10:10] `ATTR(info="Temperature exponent of internal base resistance"); parameter real zetarbx = 0.0 from [-10:10] `ATTR(info="Temperature exponent of external base resistance"); parameter real zetarcx = 0.0 from [-10:10] `ATTR(info="Temperature exponent of external collector resistance"); parameter real zetare = 0.0 from [-10:10] `ATTR(info="Temperature exponent of emitter resistance"); parameter real zetacx = 1.0 from [-10:10] `ATTR(info="Temperature exponent of mobility in substrate transistor transit time"); parameter real vge = 1.17 from (0:10] `ATTR(info="Effective emitter bandgap voltage" unit="V"); parameter real vgc = 1.17 from (0:10] `ATTR(info="Effective collector bandgap voltage" unit="V"); parameter real vgs = 1.17 from (0:10] `ATTR(info="Effective substrate bandgap voltage" unit="V"); parameter real f1vg =-1.02377e-4 `ATTR(info="Coefficient K1 in T-dependent band-gap equation"); parameter real f2vg = 4.3215e-4 `ATTR(info="Coefficient K2 in T-dependent band-gap equation"); parameter real zetact = 3.0 from [-10:10] `ATTR(info="Exponent coefficient in transfer current temperature dependence"); parameter real zetabet = 3.5 from [-10:10] `ATTR(info="Exponent coefficient in B-E junction current temperature dependence"); parameter real alb = 0.0 `ATTR(info="Relative TC of forward current gain for V2.1 model" unit="1/K"); //Self-Heating parameter integer flsh = 0 from [0:2] `ATTR(info="Flag for turning on and off self-heating effect"); parameter real rth = 0.0 from [0:inf) `ATTR(info="Thermal resistance" unit="K/W"); parameter real cth = 0.0 from [0:inf) `ATTR(info="Thermal capacitance" unit="J/W"); //Compatibility with V2.1 parameter real flcomp = 0.0 from [0:inf) `ATTR(info="Flag for compatibility with v2.1 model (0=v2.1)"); //Circuit simulator specific parameters parameter real tnom = 27.0 `ATTR(info="Temperature at which parameters are specified" unit="C"); parameter real dt = 0.0 `ATTR(info="Temperature change w.r.t. chip temperature for particular transistor" unit="K"); // //======================== Transistor model formulation =================== // //Declaration of variables real _circuit_gmin; //Temperature and drift real VT,Tdev,qtt0,ln_qtt0,r_VgVT,V_gT,dT,k; real ireis_t,ibeis_t,ibcxs_t,ibcis_t,iscs_t,cjci0_t; real cjs0_t,rci0_t,vlim_t,vces_t,thcs_t,tef0_t,rbi0_t; real rbx_t,rcx_t,re_t,t0_t,vdei_t,vdci_t,vpts_t,itss_t,tsf_t; real c10_t,cjei0_t,qp0_t,vdcx_t,vptcx_t,cjcx01_t,cjcx02_t; real qjcx0_t_i,qjcx0_t_ii,cratio_t,c_dummy; real ibeps_t,ireps_t,cjep0_t; real ajei_t,qavl_t,favl_t,ibets_t,abet_t,vptci_t,vdep_t,ajep_t,zetatef; real k1,k2,dvg0,vge_t,vgb_t,vgbe_t,vds_t,vt0,Tnom,Tamb,a,avs; real zetabci,zetabcxt,zetasct,vgbe0,mg,vgb_t0,vge_t0,vgbe_t0,vgbc0,vgsc0; real cbcpar1,cbcpar2,cbepar2,cbepar1,Oich,Ovpt,Otbhrec; //Charges, capacitances and currents real Qjci,Qjei,Qjep; real it,ibei,irei,ibci,ibep,irep,ibh_rec; real Qdei,Qdci,qrbi; real ibet,iavl; real ijbcx,ijsc,Qjs,HSUM,HSI_Tsu,Qdsu; //Base resistance and self-heating power real rbi,pterm; //Variables for macro TMPHICJ real vdj0,vdjt,vdt; //Model initialization real k10,k20,C_1; //Model evaluation real Cjci,Cjcit,cc,Cjei,Cjep; real itf,itr,Tf,Tr,VT_f,i_0f,i_0r,a_bpt,Q_0,Q_p,Q_bpt; real Orci0_t,b_q,Q_fC,T_fC,T_cT,I_Tf1,T_f0,Q_fT,T_fT,Q_bf; real ICKa,d1; real A,a_h,Q_pT,d_Q,d_Q0; real Qf,Cdei,Qr,Cdci,Crbi; real ick,vc,vceff,cjcx01,cjcx02,HSa,HSb; integer l_it; //Variables for macros real DIOY,le;//HICDIO real FFT_fbS,FFa,FFx,FFs,FFw,FFw_2,FFd_QfB,FFd_TfB,FFT_pcS,FFQ_fC,FFT_fC,FFQ_cT,FFT_cT,FFd_TfE,FFd_QfE,FFa_w;//HICQFF real FCz,FCw2,FCf1,FCf2,FCf3,FCf_ci,FCz_1,FCa1,FCa_ck,FCxl,FCxb;//HICQFC real FCd_a,FCdaick_ditf,FCa,FCw,FCdw_daick,FCdfc_dw,FCdw_ditf,FCdfc_ditf,FCf_CT,FCdfCT_ditf,FCrt,FCln,lnz,FCda1_dw,FCdf1_dw,FCdf2_dw,FCdf3_dw,FCd_f,FCdfCT_dw;//HICQFC real Dz_r,Dv_p,DV_f,DC_max,DC_c,Da,Dv_e,De,De_1,Dv_j1,Dv_r,De_2,Dv_j2,Dv_j4,DQ_j1,DQ_j2,DQ_j3,DCln1,DCln2,Dz1,Dzr1,DC_j1,DC_j2,DC_j3;//QJMOD real DFV_f,DFv_e,DFv_j,DFb,DFQ_j,DFs_q,DFs_q2,DFdvj_dv,DFC_j1;//QJMODF real z,a2,a3,r,x;//HICFCI real zb,zl,lnzb,w,hicfcio,dhicfcio_dw; //HICFCT //Noise real fourkt,twoq,flicker_Pwr; real thermal_Rbx,thermal_Rbi,thermal_Rcx,thermal_Re,betad,betan,betadin,betadc,icn,icn1,icn2; //NQS real Ixf1,Ixf2,Qxf1,Qxf2,Vxf1,Vxf2,Itxf,TD1,Qdeix; real T, Vxf, Ixf, Qxf,fact; real pocce,czz; real Qz_nom,f_QR,ETA,Qz0,fQz; real v_bord,v_q,U0,av,avl; real cV_f,cv_e,cs_q,cs_q2,cv_j,cdvj_dv; real a_eg,ab,aa; //end of variables analog begin `MODEL begin : Model_initialization Tnom = tnom+`P_CELSIUS0; Tamb = $temperature; vt0 = `P_K*Tnom /`P_Q; k10 = f1vg*Tnom*ln(Tnom); k20 = f2vg*Tnom; avs = alvs*Tnom; vgb_t0 = vgb+k10+k20; vge_t0 = vge+k10+k20; vgbe_t0 = (vgb_t0+vge_t0)/2; vgbe0 = (vgb+vge)/2; vgbc0 = (vgb+vgc)/2; vgsc0 = (vgs+vgc)/2; mg = 3-`P_Q*f1vg/`P_K; zetabci = mg+1-zetaci; zetabcxt= mg+1-zetacx; zetasct = mg-1.5; //Depletion capacitance splitting at b-c junction //Capacitances at peripheral and external base node C_1 = (1.0-fbcpar)*(cjcx0+cbcpar); if (C_1 >= cbcpar) begin cbcpar1 = cbcpar; cbcpar2 = 0.0; cjcx01 = C_1-cbcpar; cjcx02 = cjcx0-cjcx01; end else begin cbcpar1 = C_1; cbcpar2 = cbcpar-cbcpar1; cjcx01 = 0.0; cjcx02 = cjcx0; end //Parasitic b-e capacitance partitioning: No temperature dependence cbepar2 = fbepar*cbepar; cbepar1 = cbepar-cbepar2; //Avoid devide-by-zero and define infinity other way //High current correction for 2D and 3D effects if (ich != 0.0) begin Oich = 1.0/ich; end else begin Oich = 0.0; end //Base current recombination time constant at b-c barrier if (tbhrec != 0.0) begin Otbhrec = 1.0/tbhrec; end else begin Otbhrec = 0.0; end // Temperature and resulting parameter drift if (flsh==0 || rth < `MIN_R) begin : Thermal_updat_without_self_heating Tdev = Tamb+dt; if(Tdev < `TMIN + 273.15) begin Tdev = `TMIN + 273.15; end else begin if (Tdev > `TMAX + 273.15) begin Tdev = `TMAX + 273.15; end end VT = `P_K*Tdev /`P_Q; dT = Tdev-Tnom; qtt0 = Tdev/Tnom; ln_qtt0 = ln(qtt0); k1 = f1vg*Tdev*ln(Tdev); k2 = f2vg*Tdev; vgb_t = vgb+k1+k2; vge_t = vge+k1+k2; vgbe_t = (vgb_t+vge_t)/2; //Internal b-e junction capacitance `TMPHICJ(cjei0,vdei,zei,ajei,1,vgbe0,cjei0_t,vdei_t,ajei_t) if (flcomp == 0.0 || flcomp == 2.1) begin V_gT = 3.0*VT*ln_qtt0 + vgb*(qtt0-1.0); r_VgVT = V_gT/VT; //Internal b-e diode saturation currents a = mcf*r_VgVT/mbei - alb*dT; ibeis_t = ibeis*exp(a); a = mcf*r_VgVT/mrei - alb*dT; ireis_t = ireis*exp(a); a = mcf*r_VgVT/mbep - alb*dT; //Peripheral b-e diode saturation currents ibeps_t = ibeps*exp(a); a = mcf*r_VgVT/mrep - alb*dT; ireps_t = ireps*exp(a); //Internal b-c diode saturation current a = r_VgVT/mbci; ibcis_t = ibcis*exp(a); //External b-c diode saturation currents a = r_VgVT/mbcx; ibcxs_t = ibcxs*exp(a); //Saturation transfer current for substrate transistor a = r_VgVT/msf; itss_t = itss*exp(a); //Saturation current for c-s diode a = r_VgVT/msc; iscs_t = iscs*exp(a); //Zero bias hole charge a = vdei_t/vdei; qp0_t = qp0*(1.0+0.5*zei*(1.0-a)); //Voltage separating ohmic and saturation velocity regime a = vlim*(1.0-alvs*dT)*exp(zetaci*ln_qtt0); k = (a-VT)/VT; if (k < `LN_EXP_LIMIT) begin vlim_t = VT + VT*ln(1.0+exp(k)); end else begin vlim_t = a; end //Neutral emitter storage time a = 1.0+alb*dT; k = 0.5*(a+sqrt(a*a+0.01)); tef0_t = tef0*qtt0/k; end else begin //Internal b-e diode saturation currents ibeis_t = ibeis*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1)); ireis_t = ireis*exp(0.5*mg*ln_qtt0+0.5*vgbe0/VT*(qtt0-1)); //Peripheral b-e diode saturation currents ibeps_t = ibeps*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1)); ireps_t = ireps*exp(0.5*mg*ln_qtt0+0.5*vgbe0/VT*(qtt0-1)); //Internal b-c diode saturation currents ibcis_t = ibcis*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1)); //External b-c diode saturation currents ibcxs_t = ibcxs*exp(zetabcxt*ln_qtt0+vgc/VT*(qtt0-1)); //Saturation transfer current for substrate transistor itss_t = itss*exp(zetasct*ln_qtt0+vgc/VT*(qtt0-1)); //Saturation current for c-s diode iscs_t = iscs*exp(zetasct*ln_qtt0+vgs/VT*(qtt0-1)); //Zero bias hole charge a = exp(zei*ln(vdei_t/vdei)); qp0_t = qp0*(2.0-a); //Voltage separating ohmic and saturation velocity regime vlim_t = vlim*exp((zetaci-avs)*ln_qtt0); //Neutral emitter storage time zetatef = zetabet-zetact-0.5; dvg0 = vgb-vge; tef0_t = tef0*exp(zetatef*ln_qtt0-dvg0/VT*(qtt0-1)); end //GICCR prefactor c10_t = c10*exp(zetact*ln_qtt0+vgb/VT*(qtt0-1)); // Low-field internal collector resistance rci0_t = rci0*exp(zetaci*ln_qtt0); //Voltage separating ohmic and saturation velocity regime //vlim_t = vlim*exp((zetaci-avs)*ln_qtt0); //Internal c-e saturation voltage vces_t = vces*(1+alces*dT); //Internal b-c diode saturation current //ibcis_t = ibcis*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1)); //Internal b-c junction capacitance `TMPHICJ(cjci0,vdci,zci,vptci,0,vgbc0,cjci0_t,vdci_t,vptci_t) //Low-current forward transit time t0_t = t0*(1+alt0*dT+kt0*dT*dT); //Saturation time constant at high current densities thcs_t = thcs*exp((zetaci-1)*ln_qtt0); //Avalanche caurrent factors favl_t = favl*exp(alfav*dT); qavl_t = qavl*exp(alqav*dT); //Zero bias internal base resistance rbi0_t = rbi0*exp(zetarbi*ln_qtt0); //Peripheral b-e junction capacitance `TMPHICJ(cjep0,vdep,zep,ajep,1,vgbe0,cjep0_t,vdep_t,ajep_t) //Tunneling current factors begin : HICTUN_T // real a_eg,ab,aa; ab = 1.0; aa = 1.0; a_eg=vgbe_t0/vgbe_t; if(tunode==1 && cjep0 > 0.0 && vdep >0.0) begin ab = (cjep0_t/cjep0)*sqrt(a_eg)*vdep_t*vdep_t/(vdep*vdep); aa = (vdep/vdep_t)*(cjep0/cjep0_t)*pow(a_eg,-1.5); end else if (tunode==0 && cjei0 > 0.0 && vdei >0.0) begin ab = (cjei0_t/cjei0)*sqrt(a_eg)*vdei_t*vdei_t/(vdei*vdei); aa = (vdei/vdei_t)*(cjei0/cjei0_t)*pow(a_eg,-1.5); end ibets_t = ibets*ab; abet_t = abet*aa; end //Temperature mapping for tunneling current is done inside HICTUN `TMPHICJ(1.0,vdcx,zcx,vptcx,0,vgbc0,cratio_t,vdcx_t,vptcx_t) cjcx01_t=cratio_t*cjcx01; cjcx02_t=cratio_t*cjcx02; //External b-c diode saturation currents //ibcxs_t = ibcxs*exp(zetabcxt*ln_qtt0+vgc/VT*(qtt0-1)); //Constant external series resistances rcx_t = rcx*exp(zetarcx*ln_qtt0); rbx_t = rbx*exp(zetarbx*ln_qtt0); re_t = re*exp(zetare*ln_qtt0); //Forward transit time in substrate transistor tsf_t = tsf*exp((zetacx-1.0)*ln_qtt0); //Capacitance for c-s junction `TMPHICJ(cjs0,vds,zs,vpts,0,vgsc0,cjs0_t,vds_t,vpts_t) end // of Thermal_update_without_self_heating end //of Model_initialization if (flsh!=0 && rth >= `MIN_R) begin : Thermal_update_with_self_heating Tdev = Tamb+dt+V(br_sht); // Limit temperature to avoid FPEs in equations if(Tdev < `TMIN + 273.15) begin Tdev = `TMIN + 273.15; end else begin if (Tdev > `TMAX + 273.15) begin Tdev = `TMAX + 273.15; end end VT = `P_K*Tdev /`P_Q; dT = Tdev-Tnom; qtt0 = Tdev/Tnom; ln_qtt0 = ln(qtt0); k1 = f1vg*Tdev*ln(Tdev); k2 = f2vg*Tdev; vgb_t = vgb+k1+k2; vge_t = vge+k1+k2; vgbe_t = (vgb_t+vge_t)/2; //Internal b-e junction capacitance `TMPHICJ(cjei0,vdei,zei,ajei,1,vgbe0,cjei0_t,vdei_t,ajei_t) if (flcomp == 0.0 || flcomp == 2.1) begin V_gT = 3.0*VT*ln_qtt0 + vgb*(qtt0-1.0); r_VgVT = V_gT/VT; //Internal b-e diode saturation currents a = mcf*r_VgVT/mbei - alb*dT; ibeis_t = ibeis*exp(a); a = mcf*r_VgVT/mrei - alb*dT; ireis_t = ireis*exp(a); a = mcf*r_VgVT/mbep - alb*dT; //Peripheral b-e diode saturation currents ibeps_t = ibeps*exp(a); a = mcf*r_VgVT/mrep - alb*dT; ireps_t = ireps*exp(a); //Internal b-c diode saturation current a = r_VgVT/mbci; ibcis_t = ibcis*exp(a); //External b-c diode saturation currents a = r_VgVT/mbcx; ibcxs_t = ibcxs*exp(a); //Saturation transfer current for substrate transistor a = r_VgVT/msf; itss_t = itss*exp(a); //Saturation current for c-s diode a = r_VgVT/msc; iscs_t = iscs*exp(a); //Zero bias hole charge a = vdei_t/vdei; qp0_t = qp0*(1.0+0.5*zei*(1.0-a)); //Voltage separating ohmic and saturation velocity regime a = vlim*(1.0-alvs*dT)*exp(zetaci*ln_qtt0); k = (a-VT)/VT; if (k < `LN_EXP_LIMIT) begin vlim_t = VT + VT*ln(1.0+exp(k)); end else begin vlim_t = a; end //Neutral emitter storage time a = 1.0+alb*dT; k = 0.5*(a+sqrt(a*a+0.01)); tef0_t = tef0*qtt0/k; end else begin //Internal b-e diode saturation currents ibeis_t = ibeis*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1)); ireis_t = ireis*exp(0.5*mg*ln_qtt0+0.5*vgbe0/VT*(qtt0-1)); //Peripheral b-e diode saturation currents ibeps_t = ibeps*exp(zetabet*ln_qtt0+vge/VT*(qtt0-1)); ireps_t = ireps*exp(0.5*mg*ln_qtt0+0.5*vgbe0/VT*(qtt0-1)); //Internal b-c diode saturation currents ibcis_t = ibcis*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1)); //External b-c diode saturation currents ibcxs_t = ibcxs*exp(zetabcxt*ln_qtt0+vgc/VT*(qtt0-1)); //Saturation transfer current for substrate transistor itss_t = itss*exp(zetasct*ln_qtt0+vgc/VT*(qtt0-1)); //Saturation current for c-s diode iscs_t = iscs*exp(zetasct*ln_qtt0+vgs/VT*(qtt0-1)); //Zero bias hole charge a = exp(zei*ln(vdei_t/vdei)); qp0_t = qp0*(2.0-a); //Voltage separating ohmic and saturation velocity regime vlim_t = vlim*exp((zetaci-avs)*ln_qtt0); //Neutral emitter storage time zetatef = zetabet-zetact-0.5; dvg0 = vgb-vge; tef0_t = tef0*exp(zetatef*ln_qtt0-dvg0/VT*(qtt0-1)); end //GICCR prefactor c10_t = c10*exp(zetact*ln_qtt0+vgb/VT*(qtt0-1)); // Low-field internal collector resistance rci0_t = rci0*exp(zetaci*ln_qtt0); //Voltage separating ohmic and saturation velocity regime //vlim_t = vlim*exp((zetaci-avs)*ln_qtt0); //Internal c-e saturation voltage vces_t = vces*(1+alces*dT); //Internal b-c diode saturation current //ibcis_t = ibcis*exp(zetabci*ln_qtt0+vgc/VT*(qtt0-1)); //Internal b-c junction capacitance `TMPHICJ(cjci0,vdci,zci,vptci,0,vgbc0,cjci0_t,vdci_t,vptci_t) //Low-current forward transit time t0_t = t0*(1+alt0*dT+kt0*dT*dT); //Saturation time constant at high current densities thcs_t = thcs*exp((zetaci-1)*ln_qtt0); //Avalanche caurrent factors favl_t = favl*exp(alfav*dT); qavl_t = qavl*exp(alqav*dT); //Zero bias internal base resistance rbi0_t = rbi0*exp(zetarbi*ln_qtt0); //Peripheral b-e junction capacitance `TMPHICJ(cjep0,vdep,zep,ajep,1,vgbe0,cjep0_t,vdep_t,ajep_t) //Tunneling current factors if (V(br_bpei) < 0.0 || V(br_biei) < 0.0) begin : HICTUN_T // real a_eg,ab,aa; ab = 1.0; aa = 1.0; a_eg=vgbe_t0/vgbe_t; if(tunode==1 && cjep0 > 0.0 && vdep >0.0) begin ab = (cjep0_t/cjep0)*sqrt(a_eg)*vdep_t*vdep_t/(vdep*vdep); aa = (vdep/vdep_t)*(cjep0/cjep0_t)*pow(a_eg,-1.5); end else if (tunode==0 && cjei0 > 0.0 && vdei >0.0) begin ab = (cjei0_t/cjei0)*sqrt(a_eg)*vdei_t*vdei_t/(vdei*vdei); aa = (vdei/vdei_t)*(cjei0/cjei0_t)*pow(a_eg,-1.5); end ibets_t = ibets*ab; abet_t = abet*aa; end //Temperature mapping for tunneling current is done inside HICTUN `TMPHICJ(1.0,vdcx,zcx,vptcx,0,vgbc0,cratio_t,vdcx_t,vptcx_t) cjcx01_t=cratio_t*cjcx01; cjcx02_t=cratio_t*cjcx02; //External b-c diode saturation currents //ibcxs_t = ibcxs*exp(zetabcxt*ln_qtt0+vgc/VT*(qtt0-1)); //Constant external series resistances rcx_t = rcx*exp(zetarcx*ln_qtt0); rbx_t = rbx*exp(zetarbx*ln_qtt0); re_t = re*exp(zetare*ln_qtt0); //Forward transit time in substrate transistor tsf_t = tsf*exp((zetacx-1.0)*ln_qtt0); //Capacitance for c-s junction `TMPHICJ(cjs0,vds,zs,vpts,0,vgsc0,cjs0_t,vds_t,vpts_t) end //of Thermal_update_with_self_heating begin : Model_evaluation //Intrinsic transistor //Internal base currents across b-e junction `HICDIO(ibeis,ibeis_t,mbei,V(br_biei),ibei) `HICDIO(ireis,ireis_t,mrei,V(br_biei),irei) //HICCR: begin //Inverse of low-field internal collector resistance: needed in HICICK Orci0_t = 1.0/rci0_t; //Initialization //Transfer current, minority charges and transit times Tr = tr; VT_f = mcf*VT; i_0f = c10_t * limexp(V(br_biei)/VT_f); i_0r = c10_t * limexp(V(br_bici)/VT); //Internal b-e and b-c junction capacitances and charges //`QJMODF(cjei0_t,vdei_t,zei,ajei_t,V(br_biei),Qjei) //Cjei = ddx(Qjei,V(bi)); `QJMODF(cjei0_t,vdei_t,zei,ajei_t,V(br_biei),Cjei,Qjei) //`HICJQ(cjci0_t,vdci_t,zci,vptci_t,V(br_bici),Qjci) //Cjci = ddx(Qjci,V(bi)); `HICJQ(cjci0_t,vdci_t,zci,vptci_t,V(br_bici),Cjci,Qjci) //Hole charge at low bias a_bpt = 0.05; Q_0 = qp0_t + hjei*Qjei + hjci*Qjci; Q_bpt = a_bpt*qp0_t; b_q = Q_0/Q_bpt-1; Q_0 = Q_bpt*(1+(b_q +sqrt(b_q*b_q+1.921812))/2); //Transit time calculation at low current density if(cjci0_t > 0.0) begin : CJMODF // real cV_f,cv_e,cs_q,cs_q2,cv_j,cdvj_dv; cV_f = vdci_t*(1.0-exp(-ln(2.4)/zci)); cv_e = (cV_f-V(br_bici))/VT; cs_q = sqrt(cv_e*cv_e+1.921812); cs_q2 = (cv_e+cs_q)*0.5; cv_j = cV_f-VT*cs_q2; cdvj_dv = cs_q2/cs_q; Cjcit = cjci0_t*exp(-zci*ln(1.0-cv_j/vdci_t))*cdvj_dv+2.4*cjci0_t*(1.0-cdvj_dv); end else begin Cjcit = 0.0; end if(Cjcit > 0.0) begin cc = cjci0_t/Cjcit; end else begin cc = 1.0; end T_f0 = t0_t+dt0h*(cc-1.0)+tbvl*(1/cc-1.0); //Effective collector voltage vc = V(br_ciei)-vces_t; //Critical current for onset of high-current effects begin : HICICK Ovpt = 1.0/vpt; a = vc/VT; d1 = a-1; vceff = (1.0+((d1+sqrt(d1*d1+1.921812))/2))*VT; a = vceff/vlim_t; ick = vceff*Orci0_t/sqrt(1.0+a*a); ICKa = (vceff-vlim_t)*Ovpt; ick = ick*(1.0+0.5*(ICKa+sqrt(ICKa*ICKa+1.0e-3))); end //Initial formulation of forward and reverse component of transfer current Q_p = Q_0; if (T_f0 > 0.0 || Tr > 0.0) begin A = 0.5*Q_0; Q_p = A+sqrt(A*A+T_f0*i_0f+Tr*i_0r); end I_Tf1 =i_0f/Q_p; a_h = Oich*I_Tf1; itf = I_Tf1*(1.0+a_h); itr = i_0r/Q_p; //Initial formulation of forward transit time, diffusion, GICCR and excess b-c charge Q_bf = 0.0; Tf = T_f0; Qf = T_f0*itf; `HICQFF(itf,ick,Tf,Qf,T_fT,Q_fT,Q_bf) //Initial formulation of reverse diffusion charge Qr = Tr*itr; //Preparation for iteration to get total hole charge and related variables l_it = 0; if(Qf > `RTOLC*Q_p || a_h > `RTOLC) begin //Iteration for Q_pT is required for improved initial solution Qf = sqrt(T_f0*itf*Q_fT); Q_pT = Q_0+Qf+Qr; d_Q = Q_pT; while (abs(d_Q) >= `RTOLC*abs(Q_pT) && l_it <= `l_itmax) begin d_Q0 = d_Q; I_Tf1 = i_0f/Q_pT; a_h = Oich*I_Tf1; itf = I_Tf1*(1.0+a_h); itr = i_0r/Q_pT; Tf = T_f0; Qf = T_f0*itf; `HICQFF(itf,ick,Tf,Qf,T_fT,Q_fT,Q_bf) Qr = Tr*itr; if(Oich == 0.0) begin a = 1.0+(T_fT*itf+Qr)/Q_pT; end else begin a = 1.0+(T_fT*I_Tf1*(1.0+2.0*a_h)+Qr)/Q_pT; end d_Q = -(Q_pT-(Q_0+Q_fT+Qr))/a; //Limit maximum change of Q_pT a = abs(0.3*Q_pT); if(abs(d_Q) > a) begin if (d_Q>=0) begin d_Q = a; end else begin d_Q = -a; end end Q_pT = Q_pT+d_Q; l_it = l_it+1; end //while I_Tf1 = i_0f/Q_pT; a_h = Oich*I_Tf1; itf = I_Tf1*(1.0+a_h); itr = i_0r/Q_pT; //Final transit times, charges and transport current components Tf = T_f0; Qf = T_f0*itf; `HICQFF(itf,ick,Tf,Qf,T_fT,Q_fT,Q_bf) Qr = Tr*itr; end //if //NQS effect implemented with LCR networks //Once the delay in ITF is considered, IT_NQS is calculated afterwards it = itf-itr; //Diffusion charges for further use Qdei = Qf; Qdci = Qr; //High-frequency emitter current crowding (lateral NQS) Cdei = -1*ddx(Qdei,V(ei)); Cdci = -1*ddx(Qdci,V(ci)); Crbi = fcrbi*(Cjei+Cjci+Cdei+Cdci); qrbi = Crbi*V(br_bpbi_v); // qrbi = fcrbi*(Qjei+Qjci+Qdei+Qdci); //HICCR: end //Internal base current across b-c junction `HICDIO(ibcis,ibcis_t,mbci,V(br_bici),ibci) //Avalanche current if((V(br_bici) < 0.0) && (favl_t > 0.0) && (cjci0_t > 0.0)) begin : HICAVL // real v_bord,v_q,U0,av,avl; v_bord = vdci_t-V(br_bici); v_q = qavl_t/Cjci; U0 = qavl_t/cjci0_t; if(v_bord > U0) begin av = favl_t*exp(-v_q/U0); avl = av*(U0+(1.0+v_q/U0)*(v_bord-U0)); end else begin avl = favl_t*v_bord*exp(-v_q/v_bord); end iavl = itf*avl; end else begin iavl = 0.0; end //Excess base current from recombination at the b-c barrier ibh_rec = Q_bf*Otbhrec; //Internal base resistance if(rbi0_t > 0.0) begin : HICRBI // real Qz_nom,f_QR,ETA,Qz0,fQz; // Consideration of conductivity modulation // To avoid convergence problem hyperbolic smoothing used f_QR = (1+fdqr0)*qp0_t; Qz0 = Qjei+Qjci+Qf; Qz_nom = 1+Qz0/f_QR; fQz = 0.5*(Qz_nom+sqrt(Qz_nom*Qz_nom+0.01)); rbi = rbi0_t/fQz; // Consideration of emitter current crowding if( ibei > 0.0) begin ETA = rbi*ibei*fgeo/VT; if(ETA < 1.0e-6) begin rbi = rbi*(1.0-0.5*ETA); end else begin rbi = rbi*ln(1.0+ETA)/ETA; end end // Consideration of peripheral charge if(Qf > 0.0) begin rbi = rbi*(Qjei+Qf*fqi)/(Qjei+Qf); end end else begin rbi = 0.0; end //Base currents across peripheral b-e junction `HICDIO(ibeps,ibeps_t,mbep,V(br_bpei),ibep) `HICDIO(ireps,ireps_t,mrep,V(br_bpei),irep) //Peripheral b-e junction capacitance and charge `QJMODF(cjep0_t,vdep_t,zep,ajep_t,V(br_bpei),Cjep,Qjep) //Tunelling current if (V(br_bpei) <0.0 || V(br_biei) < 0.0) begin : HICTUN // real pocce,czz; if(tunode==1 && cjep0_t > 0.0 && vdep_t >0.0) begin pocce = exp((1-1/zep)*ln(Cjep/cjep0_t)); czz = -(V(br_bpei)/vdep_t)*ibets_t*pocce; ibet = czz*exp(-abet_t/pocce); end else if (tunode==0 && cjei0_t > 0.0 && vdei_t >0.0) begin pocce = exp((1-1/zei)*ln(Cjei/cjei0_t)); czz = -(V(br_biei)/vdei_t)*ibets_t*pocce; ibet = czz*exp(-abet_t/pocce); end else begin ibet = 0.0; end end else begin ibet = 0.0; end //Depletion capacitance and charge at peripheral b-c junction (bp,ci) `HICJQ(cjcx02_t,vdcx_t,zcx,vptcx_t,V(br_bpci),c_dummy,qjcx0_t_ii) //Base currents across peripheral b-c junction (bp,ci) `HICDIO(ibcxs,ibcxs_t,mbcx,V(br_bpci),ijbcx) //Depletion capacitance and charge at external b-c junction (b,ci) `HICJQ(cjcx01_t,vdcx_t,zcx,vptcx_t,V(br_bci),c_dummy,qjcx0_t_i) //Depletion substrate capacitance and charge at s-c junction (si,ci) `HICJQ(cjs0_t,vds_t,zs,vpts_t,V(br_sici),c_dummy,Qjs) //Parasitic substrate transistor transfer current and diffusion charge if(itss > 0.0) begin : Sub_Transfer HSUM = msf*VT; HSa = limexp(V(br_bpci)/HSUM); HSb = limexp(V(br_sici)/HSUM); HSI_Tsu = itss_t*(HSa-HSb); if(tsf > 0.0) begin Qdsu = tsf_t*itss_t*HSa; end else begin Qdsu = 0.0; end end else begin HSI_Tsu = 0.0; Qdsu = 0.0; end // Current gain computation for correlated noise implementation betad=ibei; if (betad > 0.0) begin betadin=betad; betan=it; betadc=betan/betad; end else begin betadc=0.0; end //Diode current for s-c junction (si,ci) `HICDIO(iscs,iscs_t,msc,V(br_sici),ijsc) //Self-heating calculation if (flsh == 1 && rth >= `MIN_R) begin pterm = V(br_ciei)*it + (vdci_t-V(br_bici))*iavl; end else if (flsh == 2 && rth >= `MIN_R) begin pterm = V(br_ciei)*it + (vdci_t-V(br_bici))*iavl + ibei*V(br_biei) + ibci*V(br_bici) + ibep*V(br_bpei) + ijbcx*V(br_bpci) + ijsc*V(br_sici); if (rbi >= `MIN_R) begin pterm = pterm + V(br_bpbi_i)*V(br_bpbi_i)/rbi; end if (re_t >= `MIN_R) begin pterm = pterm + V(br_eie_i)*V(br_eie_i)/re_t; end if (rcx_t >= `MIN_R) begin pterm = pterm + V(br_cic_i)*V(br_cic_i)/rcx_t; end if (rbx_t >= `MIN_R) begin pterm = pterm + V(br_bbp_i)*V(br_bbp_i)/rbx_t; end end Itxf = itf; Qdeix = Qdei; // Excess Phase calculation if (flnqs != 0 && Tf != 0) begin Vxf1 = V(br_bxf1); Vxf2 = V(br_bxf2); Ixf1 = (Vxf2-itf)/Tf*t0; Ixf2 = (Vxf2-Vxf1)/Tf*t0; Qxf1 = alit*Vxf1*t0; Qxf2 = alit*Vxf2/3*t0; Itxf = Vxf2; Vxf = V(br_bxf); //for RC nw fact = t0/Tf; //for RC nw Ixf = (Vxf - Qdei)*fact; //for RC nw Qxf = alqf*Vxf*t0; //for RC nw Qdeix = Vxf; //for RC nw end else begin Ixf1 = V(br_bxf1); Ixf2 = V(br_bxf2); Qxf1 = 0; Qxf2 = 0; Ixf = V(br_bxf); Qxf = 0; end end //of Model_evaluation begin : Load_sources I(br_biei) <+ _circuit_gmin*V(br_biei); I(br_bici) <+ _circuit_gmin*V(br_bici); I(br_bci) <+ ddt(qjcx0_t_i); I(br_bci) <+ ddt(cbcpar1*V(br_bci)); I(br_bpci) <+ ddt(cbcpar2*V(br_bpci)); if (rbx >= `MIN_R) begin I(br_bbp_i) <+ V(br_bbp_i)/rbx_t; end else begin // V(br_bbp_v) <+ 0.0; I(br_bbp_i) <+ V(br_bbp_i)/`MIN_R; end if(rbi0 >= `MIN_R) begin I(br_bpbi_i) <+ V(br_bpbi_i)/rbi; I(br_bpbi_i) <+ ddt(qrbi); end else begin // V(br_bpbi_v) <+ 0.0; I(br_bpbi_i) <+ V(br_bpbi_i)/`MIN_R; end if (tunode==1.0) begin I(br_bpei) <+ -ibet; end else begin I(br_biei) <+ -ibet; end I(br_bpei) <+ ibep; I(br_bpei) <+ irep; I(br_bpei) <+ ddt(Qjep); I(br_biei) <+ ibei; I(br_biei) <+ irei; I(br_biei) <+ ibh_rec; I(br_biei) <+ ddt(Qdeix+Qjei); I(br_bpsi) <+ HSI_Tsu; I(br_bpci) <+ ijbcx; I(br_bpci) <+ ddt(qjcx0_t_ii+Qdsu); I(br_be) <+ ddt(cbepar1*V(br_be)); I(br_bpe) <+ ddt(cbepar2*V(br_bpe)); I(br_bici) <+ ibci-iavl; I(br_bici) <+ ddt(Qdci+Qjci); I(br_sici) <+ ijsc; I(br_sici) <+ ddt(Qjs); I(br_ciei) <+ Itxf; I(br_eici) <+ itr; if (rcx >= `MIN_R) begin I(br_cic_i) <+ V(br_cic_i)/rcx_t; end else begin // V(br_cic_v) <+ 0.0; I(br_cic_i) <+ V(br_cic_i)/`MIN_R; end if (re >= `MIN_R) begin I(br_eie_i) <+ V(br_eie_i)/re_t; end else begin // V(br_eie_v) <+ 0.0; I(br_eie_i) <+ V(br_eie_i)/`MIN_R; end if(rsu >= `MIN_R) begin I(br_sis_i) <+ V(br_sis_i)/rsu; I(br_sis_i) <+ ddt(csu*V(br_sis_i)); end else begin // V(br_sis_v) <+ 0.0; I(br_sis_i) <+ V(br_sis_i)/`MIN_R; end // Following code is an intermediate solution (if branch contribution is not supported): // ****************************************** if(flsh == 0 || rth < `MIN_R) begin I(br_sht) <+ V(br_sht)/`MIN_R; end else begin I(br_sht) <+ V(br_sht)/rth-pterm; I(br_sht) <+ ddt(cth*V(br_sht)); end // ****************************************** // For simulators having no problem with V(br_sht) <+ 0.0 // with external thermal node, follwing code may be used. // Note that external thermal node should remain accessible // even without self-heating. // ******************************************** //if(flsh == 0 || rth < `MIN_R) begin // V(br_sht) <+ 0.0; //end else begin // I(br_sht) <+ V(br_sht)/rth-pterm; // I(br_sht) <+ ddt(cth*V(br_sht)); //end // ******************************************** // NQS effect I(br_bxf1) <+ Ixf1; I(br_cxf1) <+ ddt(Qxf1); I(br_bxf2) <+ Ixf2; I(br_cxf2) <+ ddt(Qxf2); I(br_bxf) <+ Ixf; //for RC nw I(br_cxf) <+ ddt(Qxf); //for RC nw end //of Load_sources `NOISE begin : Noise_sources //Thermal noise fourkt = 4.0 * `P_K * Tdev; if(rbx >= `MIN_R) begin I(br_bbp_i) <+ white_noise(fourkt/rbx_t, "thermal"); end if(rbi0 >= `MIN_R) begin I(br_bpbi_i) <+ white_noise(fourkt/rbi, "thermal"); end if(rcx >= `MIN_R) begin I(br_cic_i) <+ white_noise(fourkt/rcx_t, "thermal"); end if(re >= `MIN_R) begin I(br_eie_i) <+ white_noise(fourkt/re_t, "thermal"); end if(rsu >= `MIN_R) begin I(br_sis_i) <+ white_noise(fourkt/rsu, "thermal"); end //Flicker noise : Fully correlated between the perimeter and internal base-node flicker_Pwr = kf*pow((ibei+ibep),af); if (cfbe == -1) begin I(br_biei) <+ flicker_noise(flicker_Pwr,1.0); end else begin I(br_bpei) <+ flicker_noise(flicker_Pwr,1.0); end //Shot noise twoq = 2.0 * `P_Q; // I(br_ciei) <+ white_noise(twoq*it, "shot"); I(br_cibi) <+ white_noise(twoq*iavl, "shot"); // I(br_biei) <+ white_noise(twoq*ibei, "shot"); I(br_bici) <+ white_noise(twoq*abs(ibci), "shot"); I(br_bpei) <+ white_noise(twoq*ibep, "shot"); I(br_bpci) <+ white_noise(twoq*abs(ijbcx), "shot"); I(br_sici) <+ white_noise(twoq*abs(ijsc), "shot"); // Code section for correlated noise // Please turn-off this code section by "//" in order to run the code with Spectre // I(b_n1) <+ white_noise(2 * `P_Q * ibei, "shot"); // I(b_n1) <+ V(b_n1); // I(b_n2) <+ white_noise(2 * `P_Q * it, "shot"); // I(b_n2) <+ V(b_n2); // // I(bi,ei) <+ V(b_n1); // I(ci,ei) <+ V(b_n2)+ddt((betadc/2)*alit*Tf*alit*Tf*ddt(V(b_n2))); // I(ci,ei) <+ betadc*ddt(-(Tf*alit)*V(b_n1)); end //of Noise_sources end //analog endmodule ngspice-26/src/spicelib/devices/adms/ekv/0000755000265600020320000000000012264261473017745 5ustar andreasadminngspice-26/src/spicelib/devices/adms/ekv/admsva/0000755000265600020320000000000012264261473021220 5ustar andreasadminngspice-26/src/spicelib/devices/adms/ekv/admsva/ekv.va0000644000265600020320000005437512264261473022353 0ustar andreasadmin// EPFL-EKV version 2.6: A Verilog-A description. // The intrinsic device is coded according to the official manual // (revision II) available at http://legwww.epfl.ch/ekv. // contribution of Ivan Riis Nielsen 11/2006, modified by Dietmar Warning 01/2009 //Default simulator: Spectre `ifdef insideADMS `define P(txt) (*txt*) `define PGIVEN(p) $given(p) `define INITIAL_MODEL @(initial_model) `define INSTANCE @(initial_instance) `define NOISE @(noise) `else `define P(txt) (txt) `define PGIVEN(p) p `define INITIAL_MODEL `define INSTANCE `define NOISE `endif //ADS //`include "constants.vams" //`include "disciplines.vams" //`include "compact.vams" //Spectre `include "constants.h" `include "discipline.h" `define NMOS 1 `define PMOS -1 `define EPSSI `P_EPS0*11.7 `define EPSOX `P_EPS0*3.9 `define TREF 300.15 `define SQR(x) ((x)*(x)) `define VT(temp) (`P_K*temp/`P_Q) `define EG(temp) (1.16-0.000702*`SQR(temp)/(temp+1108)) `define NI(temp) (1.45e16*(temp/`TREF)*exp(`EG(`TREF)/(2*`VT(`TREF))-`EG(temp)/(2*`VT(temp)))) `define oneThird 3.3333333333333333e-01 // Constants needed in safe exponential function (called "expl") `define se05 2.3025850929940458e+02 `define ke05 1.0e-100 `define ke05inv 1.0e100 // P3 3rd order polynomial expansion of exp() `define P3(u) (1.0 + (u) * (1.0 + 0.5 * ((u) * (1.0 + (u) * `oneThird)))) // expl exp() with 3rd order polynomial extrapolation // to avoid overflows and underflows and retain C-3 continuity `define expl(x, res) \ if (abs(x) < `se05) begin\ res = exp(x); \ end else begin \ if ((x) < -`se05) begin\ res = `ke05 / `P3(-`se05 - (x)); \ end else begin\ res = `ke05inv * `P3((x) - `se05); \ end \ end module ekv (d,g,s,b); // Node definitions inout d,g,s,b; electrical d,g,s,b,di,si; // Model parameters parameter integer nmos=1 from [0:1] `P(info="MOS type : nmos:0"); parameter integer pmos=1 from [0:1] `P(info="MOS type : pmos:0"); parameter integer MTYPE=(nmos==0 ? (pmos==0 ? 0 : 1) : (pmos==0 ? -1 : 1)); parameter real TNOM=27 from (-273.15:inf) `P(info="Nominal temperature [degC]"); parameter real IMAX=1 from (0:inf) `P(info="Maximum forward junction current before linearization [A]"); // - intrinsic model (optional, section 4.2.1) parameter real TOX=0 from [0:inf) `P(info="Oxide thickness [m]"); parameter real NSUB=0 from [0:inf) `P(info="Channel doping [cm^-3]"); parameter real VFB=1001.0 from (-inf:inf) // use 1001V as "not specified" `P(info="Flat-band voltage [V]"); parameter real UO=0 from [0:inf) `P(info="Low-field mobility [cm^2/Vs]"); parameter real VMAX=0 from [0:inf) `P(info="Saturation velocity [m/s]"); parameter real THETA=0 from [0:inf) `P(info="Mobility reduction coefficient [V^-1]"); // - intrinsic model (process related, section 4.1) parameter real COX=((TOX>0) ? (`EPSOX/TOX) : 0.7m) from [0:inf) `P(info="Oxide capacitance [F/m^2]"); parameter real XJ=0.1u from [1n:inf) `P(info="Junction depth [m]"); parameter real DL=0 from (-inf:inf) `P(info="Length correction [m]"); parameter real DW=0 from (-inf:inf) `P(info="Width correction [m]"); // - intrinsic model (basic, section 4.2) parameter real GAMMA=((NSUB>0) ? (sqrt(2*`P_Q*`EPSSI*NSUB*1e6)/COX) : 1) from [0:inf) `P(info="Body effect parameter [V^0.5]"); parameter real PHI=((NSUB>0) ? (2*`VT((TNOM+273.15))*ln(max(NSUB,1)*1e6/`NI((TNOM+273.15)))) : 0.7) from [0.1:inf) `P(info="Bulk Fermi potential (*2) [V]"); parameter real VTO=((VFB<1000.0) ? (VFB+MTYPE*(PHI+GAMMA*sqrt(PHI))) : 0.5) from (-inf:inf) `P(info="Long-channel threshold voltage [V]"); parameter real KP=((UO>0) ? (UO*1e-4*COX) : 50u) from (0:inf) `P(info="Transconductance parameter [A/V^2]"); parameter real UCRIT=(((VMAX>0) && (UO>0)) ? (VMAX/(UO*1e-4)) : 2e6 ) from [100k:inf) `P(info="Longitudinal critical field [V/m]"); parameter real E0=((THETA>0) ? 0 : 1e12) from [100k:inf) `P(info="Mobility reduction coefficient [V/m]"); // - intrinsic model (channel length modulation and charge sharing, section 4.3) parameter real LAMBDA=0.5 from [0:inf) `P(info="Depletion length coefficient (CLM)"); parameter real WETA=0.25 from (-inf:inf) `P(info="Narrow-channel effect coefficient"); parameter real LETA=0.1 from (-inf:inf) `P(info="Short-channel effect coefficient"); // - intrinsic model (reverse short channel effect, section 4.4) parameter real Q0=0 from (-inf:inf) `P(info="RSCE peak charge density [C/m^2]"); parameter real LK=0.29u from [10n:inf) `P(info="RSCE characteristic length [m]"); // - intrinsic model (impact ionization, section 4.5) parameter real IBA=0 from (-inf:inf) `P(info="First impact ionization coefficient [m^-1]"); parameter real IBB=3e8 from [1e8:inf) `P(info="Second impact ionization coefficient [V/m]"); parameter real IBN=1 from [0.1:inf) `P(info="Saturation voltage factor for impact ionization"); // - intrinsic model (temperature, section 4.6) parameter real TCV=1m from (-inf:inf) `P(info="Threshold voltage TC [V/K]"); parameter real BEX=-1.5 from (-inf:inf) `P(info="Mobility temperature exponent"); parameter real UCEX=0.8 from (-inf:inf) `P(info="Longitudinal critical field temperature exponent"); parameter real IBBT=9e-4 from (-inf:inf) `P(info="Temperature coefficient for IBB [K^-1]"); // - intrinsic model (matching, section 4.7) parameter real AVTO=0 from (-inf:inf) `P(info="Area related VTO mismatch parameter [Vm]"); parameter real AKP=0 from (-inf:inf) `P(info="Area related KP mismatch parameter [m]"); parameter real AGAMMA=0 from (-inf:inf) `P(info="Area related GAMMA mismatch parameter [V^0.5*m]"); // - intrinsic model (flicker noise, section 4.8) parameter real KF=0 from [0:inf) `P(info="Flicker noise coefficient"); parameter real AF=1 from (-inf:inf) `P(info="Flicker noise exponent"); // - intrinsic model (setup, section 4.9) parameter real NQS=0 from [0:1] `P(info="Non-quasi-static operation switch"); parameter real SATLIM=exp(4) from (0:inf) `P(info="Saturation limit (if/ir)"); parameter real XQC=0.4 from [0:1] `P(info="Charge/capacitance model selector"); // - external parasitic parameters parameter real HDIF=0 from [0:inf) `P(info="S/D diffusion length (/2) [m]"); parameter real RSH=0 from [0:inf) `P(info="S/D sheet resistance [ohm]"); parameter real JS=0 from [0:inf) `P(info="S/D junction saturation current density [A/m^2]"); parameter real JSW=0 from [0:inf) `P(info="S/D junction sidewall saturation current density [A/m]"); parameter real XTI=0 from [0:inf) `P(info="S/D diode saturation current temperature exponent"); parameter real N=1 from [0.5:10] `P(info="S/D diode emission coefficient"); parameter real CJ=0 from [0:inf) `P(info="S/D zero-bias junction capacitance per area [F/m^2]"); parameter real CJSW=0 from [0:inf) `P(info="S/D zero-bias junction capacitance per perimeter [F/m]"); parameter real PB=0.8 from (0:inf) `P(info="S/D bottom junction builtin potential [V]"); parameter real PBSW=PB from (0:inf) `P(info="S/D sidewall junction builtin potential [V]"); parameter real MJ=0.5 from (0:inf) `P(info="S/D bottom junction grading coefficient"); parameter real MJSW=0.333 from (0:inf) `P(info="S/D sidewall junction grading coefficient"); parameter real FC=0.5 from (0:inf) `P(info="S/D bottom junction forward-bias threshold"); parameter real FCSW=FC from (0:inf) `P(info="S/D sidewall junction forward-bias threshold"); parameter real CGSO=0 from [0:inf) `P(info="Gate-source overlap capacitance per width [F/m]"); parameter real CGDO=0 from [0:inf) `P(info="Gate-drain overlap capacitance per width [F/m]"); parameter real CGBO=0 from [0:inf) `P(info="Gate-bulk overlap capacitance per length [F/m]"); // Instance parameters // - intrinsic model parameter real L=10u from [0:inf] `P(type="instance" info="Drawn length [m]" unit="m"); parameter real W=10u from [0:inf] `P(type="instance" info="Drawn width [m]" unit="m"); parameter real M=1 from [0:inf] `P(type="instance" info="Parallel multiplier" unit="m"); // parameter real N=1 from [0:inf] // `P(type="instance" info="Series multiplier" unit="m"); // - external parasitics parameter real AD=((HDIF>0) ? (2*HDIF*W) : 0) from [0:inf) `P(info="Drain area [m^2]" type="instance"); parameter real AS=((HDIF>0) ? (2*HDIF*W) : 0) from [0:inf) `P(info="Source area [m^2]" type="instance"); parameter real PD=((HDIF>0) ? (4*HDIF+2*W) : 0) from [0:inf) `P(info="Drain perimeter [m]" type="instance"); parameter real PS=((HDIF>0) ? (4*HDIF+2*W) : 0) from [0:inf) `P(info="Source perimeter [m]" type="instance"); parameter real NRD=((HDIF>0) ? (HDIF/W) : 0) from [0:inf) `P(info="Drain no. squares" type="instance"); parameter real NRS=((HDIF>0) ? (HDIF/W) : 0) from [0:inf) `P(info="Source no. squares" type="instance"); parameter real RS=((RSH>0) ? (RSH*NRS) : 0) from [0:inf) `P(info="Source resistance [ohms]" type="instance"); parameter real RD=((RSH>0) ? (RSH*NRD) : 0) from [0:inf) `P(info="Drain resistance [ohms]" type="instance"); // Declaration of variables integer mode; real lc,isat_s,vexp_s,gexp_s,isat_d,vexp_d,gexp_d,fact, weff,leff,np,ns,lmin,rd,rs,ceps,ca,xsi,dvrsce, tempk,vt,sqrt_A,vto_a,kp_a,gamma_a,ucrit,phi,ibb,vc,qb0, vg,vd,vs,tmp,vgprime,vp0,vsprime,vdprime,gamma0,gammaprime,vp,n,ifwd, vdss,vdssprime,dv,vds,vip,dl,lprime,leq,irprime,irev,beta0,nau, nq,xf,xr,qd,qs,qi,qb,qg,beta0prime,beta,vpprime,is,ids,vib, idb,ibdj,ibsj,coxt,qdt,qst,qgt,qbt, cbs0,cbs0sw,cbs,cbd0,cbd0sw,cbd, fv,z0,z1,y; real cgso,cgdo,cgbo; analog begin `INITIAL_MODEL begin // Model Initialization lc = sqrt(`EPSSI/COX*XJ); end // INITIAL_MODEL `INSTANCE begin // temperature independent device initialization weff = W+DW; leff = L+DL; np = M; ns = 1; // eq. 54 lmin = 0.1*ns*leff; rs = ns/np*RS; rd = ns/np*RD; ceps = 4*22e-3*22e-3; ca = 0.028; xsi = ca*(10*leff/LK-1); dvrsce = 2*Q0/COX/`SQR(1+0.5*(xsi+sqrt(xsi*xsi+ceps))); coxt = np*ns*COX*weff*leff; end // temperature independent `INSTANCE begin // temperature dependent device initialization tempk = $temperature; vt = `VT(tempk); sqrt_A = sqrt(np*weff*ns*leff); vto_a = MTYPE*(VTO+TCV*(tempk-(TNOM+273.15)))+AVTO/sqrt_A; kp_a = KP*pow(tempk/(TNOM+273.15),BEX)*(1+AKP/sqrt_A); gamma_a = GAMMA+AGAMMA/sqrt_A; ucrit = UCRIT*pow(tempk/(TNOM+273.15),UCEX); phi = PHI*tempk/(TNOM+273.15)-3*vt*ln(tempk/(TNOM+273.15))-`EG(TNOM+273.15)*tempk/(TNOM+273.15)+`EG(tempk); ibb = IBB*(1+IBBT*(tempk-(TNOM+273.15))); vc = ucrit*ns*leff; // eq. 60 qb0 = gamma_a*sqrt(phi); fact = (`EG(TNOM+273.15)/`VT(TNOM+273.15)-`EG(tempk)/vt) * pow(tempk/(TNOM+273.15),XTI); `expl(fact,tmp) isat_s = np*ns*(JS*AS+JSW*PS)*tmp; isat_d = np*ns*(JS*AD+JSW*PD)*tmp; if (isat_s>0) begin vexp_s = vt*ln(IMAX/isat_s+1); gexp_s = (IMAX+isat_s)/vt; end else begin vexp_s = -1e9; gexp_s = 0; end if (isat_d>0) begin vexp_d = vt*ln(IMAX/isat_d+1); gexp_d = (IMAX+isat_d)/vt; end else begin vexp_d = -1e9; gexp_d = 0; end cbs0 = np*ns*CJ*AS; cbd0 = np*ns*CJ*AD; cbs0sw = np*ns*CJSW*PS; cbd0sw = np*ns*CJSW*PD; cgso = np*ns*CGSO*weff; cgdo = np*ns*CGDO*weff; cgbo = np*ns*CGBO*leff; end // temperature dependent begin //Bias-dependent model evaluation vg = MTYPE*V(g,b); vd = MTYPE*V(di,b); vs = MTYPE*V(si,b); // $strobe("vg=%e vd=%e vs=%e",vg,vd,vs); if (vd>=vs) mode = 1; else begin mode = -1; tmp = vs; vs = vd; vd = tmp; end // eq. 33 vgprime = vg-vto_a-dvrsce+phi+gamma_a*sqrt(phi); // eq. 35 vsprime = 0.5*(vs+phi+sqrt(`SQR(vs+phi)+16*`SQR(vt))); vdprime = 0.5*(vd+phi+sqrt(`SQR(vd+phi)+16*`SQR(vt))); // $strobe("vgprime=%e vdprime=%e vsprime=%e",vgprime,vdprime,vsprime); // eq. 34 if (vgprime>=0) begin vp0 = vgprime-phi-gamma_a*(sqrt(vgprime+0.25*`SQR(gamma_a))-0.5*gamma_a); // eq. 36 gamma0 = gamma_a-`EPSSI/COX*(LETA/leff*(sqrt(vsprime)+sqrt(vdprime))-3*WETA/weff*sqrt(vp0+phi)); end else begin vp0 = -phi; // eq. 36 - skipped sqrt(vp0+phi) here, it produces inf on derivative gamma0 = gamma_a-`EPSSI/COX*(LETA/leff*(sqrt(vsprime)+sqrt(vdprime)) ); end // eq. 37 gammaprime = 0.5*(gamma0+sqrt(`SQR(gamma0)+0.1*vt)); // eq. 38 if (vgprime>=0) vp = vgprime-phi-gammaprime*(sqrt(vgprime+0.25*`SQR(gammaprime))-0.5*gammaprime); else vp = -phi; // $strobe("vp0=%e vp=%e gamma0=%e gammaprime=%e",vp0,vp,gamma0,gammaprime); // eq. 39 n = 1+gamma_a*0.5/sqrt(vp+phi+4*vt); // Forward current (43-44) fv=(vp-vs)/vt; if (fv > -0.35) begin z0 = 2.0/(1.3 + fv - ln(fv+1.6)); z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -15) begin `expl(-fv,tmp) z0 = 1.55 + tmp; z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -23.0) begin `expl(-fv,tmp) y = 1.0 / (2.0 + tmp); end else begin `expl(fv,tmp) y = tmp + 1.0e-64; end ifwd = y*(1.0 + y); z0 = 1; z1 = 1; // eq. 46 vdss = vc*(sqrt(0.25+vt/vc*sqrt(ifwd))-0.5); // eq. 47 vdssprime = vc*(sqrt(0.25+vt/vc*(sqrt(ifwd)-0.75*ln(ifwd)))-0.5)+vt*(ln(0.5*vc/vt)-0.6); // $strobe("ifwd=%e vdss=%e vdssprime=%e",ifwd,vdss,vdssprime); // eq. 48 dv = 4*vt*sqrt(LAMBDA*(sqrt(ifwd)-vdss/vt)+1.0/64); // eq. 49 vds = 0.5*(vd-vs); // eq. 50 vip = sqrt(`SQR(vdss)+`SQR(dv))-sqrt(`SQR(vds-vdss)+`SQR(dv)); // eq. 52 dl = LAMBDA*lc*ln(1+(vds-vip)/(lc*ucrit)); // eq. 53 lprime = ns*leff-dl+(vds+vip)/ucrit; // eq. 55 leq = 0.5*(lprime+sqrt(`SQR(lprime)+`SQR(lmin))); // eq. 56 fv=(vp-vds-vs-sqrt(`SQR(vdssprime)+`SQR(dv))+sqrt(`SQR(vds-vdssprime)+`SQR(dv)))/vt; if (fv > -0.35) begin z0 = 2.0/(1.3 + fv - ln(fv+1.6)); z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -15) begin `expl(-fv,tmp) z0 = 1.55 + tmp; z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -23.0) begin `expl(-fv,tmp) y = 1.0 / (2.0 + tmp); end else begin `expl(fv,tmp) y = tmp + 1.0e-64; end irprime = y*(1.0 + y); z0 = 1; z1 = 1; // eq. 57 fv=(vp-vd)/vt; if (fv > -0.35) begin z0 = 2.0/(1.3 + fv - ln(fv+1.6)); z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -15) begin `expl(-fv,tmp) z0 = 1.55 + tmp; z1 = (2.0 + z0) / (1.0 + fv + ln(z0)); y = (1.0 + fv + ln(z1)) / (2.0 + z1); end else if (fv > -23.0) begin `expl(-fv,tmp) y = 1.0 / (2.0 + tmp); end else begin `expl(fv,tmp) y = tmp + 1.0e-64; end irev = y*(1.0 + y); // eq. 58 beta0 = kp_a*np*weff/leq; // eq. 59 nau = (5+MTYPE)/12.0; // eq. 69 nq = 1+0.5*gamma_a/sqrt(vp+phi+1e-6); // eq. 70 xf = sqrt(0.25+ifwd); // eq. 71 xr = sqrt(0.25+irev); // eq. 72 qd = -nq*(4.0/15*(3*`SQR(xr)*(xr+2*xf)+2*`SQR(xf)*(xf+2*xr))/`SQR(xf+xr)-0.5); // eq. 73 qs = -nq*(4.0/15*(3*`SQR(xf)*(xf+2*xr)+2*`SQR(xr)*(xr+2*xf))/`SQR(xf+xr)-0.5); // eq. 74 qi = qs+qd; // eq. 75 if (vgprime>=0) qb = (-gamma_a*sqrt(vp+phi+1e-6))/vt-(nq-1)/nq*qi; else qb = -vgprime/vt; // eq. 76 (qox removed since it is assumed to be zero) qg = -qi-qb; if (E0!=0) begin // eq. 61 beta0prime = beta0*(1+COX/(E0*`EPSSI)*qb0); // eq. 62 beta = beta0prime/(1+COX/(E0*`EPSSI)*vt*abs(qb+nau*qi)); end else begin // eq. 63 vpprime = 0.5*(vp+sqrt(`SQR(vp)+2*`SQR(vt))); // eq. 64 beta = beta0/(1+THETA*vpprime); end // else: !if(e0!=0) // eq. 65 is = 2*n*beta*`SQR(vt); // $strobe("beta0=%e beta0prime=%e beta=%e E0=%e qb0=%e qb=%e qi=%e",beta0,beta0prime,beta,E0,qb0,qb,qi); // eq. 66 ids = is*(ifwd-irprime); // eq. 67 vib = vd-vs-IBN*2*vdss; // eq. 68 if (vib>0) begin `expl((-ibb*lc)/vib,tmp) idb = ids*IBA/ibb*vib*tmp; end else idb = 0; // $strobe("ids=%e idb=%e",ids,idb); if (mode>1) begin if (isat_s>0) begin if (-vs>vexp_s) ibsj = IMAX+gexp_s*(-vs-vexp_s); else begin `expl(-vs/(N*vt),tmp) ibsj = isat_s*(tmp-1); end end else ibsj = 0; if (isat_d>0) begin if (-vd>vexp_d) ibdj = IMAX+gexp_d*(-vd-vexp_d); else begin `expl(-vd/(N*vt),tmp) ibdj = isat_d*(tmp-1); end end else ibdj = 0; end else begin // if (mode>1) if (isat_s>0) begin if (-vd>vexp_s) ibsj = IMAX+gexp_s*(-vd-vexp_s); else begin `expl(-vd/(N*vt),tmp) ibsj = isat_s*(tmp-1); end end else ibsj = 0; if (isat_d>0) begin if (-vs>vexp_d) ibdj = IMAX+gexp_d*(-vs-vexp_d); else begin `expl(-vs/(N*vt),tmp) ibdj = isat_d*(tmp-1); end end else ibdj = 0; end // else: !if(mode>1) qdt = coxt*vt*qd; qst = coxt*vt*qs; qgt = coxt*vt*qg; qbt = coxt*vt*qb; cbs = 0; cbd = 0; if (cbs0>0) begin if (MTYPE*V(b,si)>FC*PB) cbs = cbs+cbs0/pow(1-FC,MJ)*(1+MJ*(MTYPE*V(b,si)-PB*FC))/(PB*(1-FC)); else cbs = cbs+cbs0/pow(1-MTYPE*V(b,si),MJ); end if (cbd0>0) begin if (MTYPE*V(b,di)>FC*PB) cbd = cbd+cbd0/pow(1-FC,MJ)*(1+MJ*(MTYPE*V(b,di)-PB*FC))/(PB*(1-FC)); else cbd = cbd+cbd0/pow(1-MTYPE*V(b,di),MJ); end if (cbs0sw>0) begin if (MTYPE*V(b,si)>FCSW*PBSW) cbs = cbs+cbs0sw/pow(1-FCSW,MJSW)*(1+MJSW*(MTYPE*V(b,si)-PBSW*FCSW))/(PBSW*(1-FCSW)); else cbs = cbs+cbs0sw/pow(1-MTYPE*V(b,si),MJSW); end if (cbd0sw>0) begin if (MTYPE*V(b,di)>FCSW*PBSW) cbd = cbd+cbd0sw/pow(1-FCSW,MJSW)*(1+MJSW*(MTYPE*V(b,di)-PBSW*FCSW))/(PBSW*(1-FCSW)); else cbd = cbd+cbd0sw/pow(1-MTYPE*V(b,di),MJSW); end end //Bias-dependent model evaluation begin //Define branch sources I(di,si) <+ MTYPE*mode*ids; if (mode>0) begin I(di,b) <+ MTYPE*idb; I(di,g) <+ MTYPE*ddt(qdt); I(si,g) <+ MTYPE*ddt(qst); end else begin I(si,b) <+ MTYPE*idb; I(si,g) <+ MTYPE*ddt(qdt); I(di,g) <+ MTYPE*ddt(qst); end // else: !if(mode>0) I(b,si) <+ MTYPE*ibsj; I(b,di) <+ MTYPE*ibdj; I(b,g) <+ MTYPE*ddt(qbt); I(g,si) <+ cgso*ddt(V(g,si)); I(g,di) <+ cgdo*ddt(V(g,di)); I(g,b) <+ cgbo*ddt(V(g,b)); if (RD>0) I(d,di) <+ V(d,di)/rd; else V(d,di) <+ 0.0; if (RS>0) I(s,si) <+ V(s,si)/rs; else V(s,si) <+ 0.0; I(b,si) <+ cbs*ddt(V(b,si)); I(b,di) <+ cbd*ddt(V(b,di)); end // begin // `NOISE begin //Define noise sources // // end // noise end //analog endmodule ngspice-26/src/spicelib/devices/numd/0000755000265600020320000000000012264261711017172 5ustar andreasadminngspice-26/src/spicelib/devices/numd/numdload.c0000644000265600020320000002746212264261473021161 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "numddefs.h" #include "ngspice/numenum.h" #include "ngspice/trandefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward declarations */ int NUMDinitSmSig(NUMDinstance *); /* External Declarations */ extern int ONEdcDebug; extern int ONEtranDebug; extern int ONEacDebug; int NUMDload(GENmodel *inModel, CKTcircuit *ckt) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; register ONEdevice *pDevice; double startTime, startTime2, totalTime, totalTime2; double tol; /* temporary for tolerance calculations */ double id; double ideq; double idhat = 0.0; double delVd; double vd; /* current diode voltage */ double gd; double xfact; int check; int i; double deltaNorm[7]; int devConverged = FALSE; int numDevNonCon; int deviceType; int doInitSolve; int doVoltPred; char *initStateName; /* loop through all the diode models */ for (; model != NULL; model = model->NUMDnextModel) { /* Do model things */ FieldDepMobility = model->NUMDmodels->MODLfieldDepMobility; Srh = model->NUMDmodels->MODLsrh; Auger = model->NUMDmodels->MODLauger; AvalancheGen = model->NUMDmodels->MODLavalancheGen; MobDeriv = model->NUMDmethods->METHmobDeriv; MaxIterations = model->NUMDmethods->METHitLim; ONEdcDebug = model->NUMDoutputs->OUTPdcDebug; ONEtranDebug = model->NUMDoutputs->OUTPtranDebug; ONEacDebug = model->NUMDoutputs->OUTPacDebug; deviceType = model->NUMDoptions->OPTNdeviceType; doVoltPred = model->NUMDmethods->METHvoltPred; if (ckt->CKTmode & MODEINITPRED) { /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { model->NUMDpInfo->order = ckt->CKTorder; model->NUMDpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMDpInfo->intCoeff, deltaNorm); computePredCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMDpInfo->predCoeff, deltaNorm); } } else if (ckt->CKTmode & MODEINITTRAN) { model->NUMDpInfo->order = ckt->CKTorder; model->NUMDpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMDpInfo->intCoeff, deltaNorm); } /* Now do instance things */ for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { pDevice = inst->NUMDpDevice; totalTime = 0.0; startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMDglobals)); /* * this routine loads diodes for dc and transient analyses. */ pDevice->devStates = ckt->CKTstates; /* * initialization */ check = 1; doInitSolve = FALSE; initStateName = NULL; if (ckt->CKTmode & MODEINITSMSIG) { vd = *(ckt->CKTstate0 + inst->NUMDvoltage); delVd = 0.0; NUMDsetBCs(pDevice, vd); } else if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + inst->NUMDvoltage) = *(ckt->CKTstate1 + inst->NUMDvoltage); vd = *(ckt->CKTstate1 + inst->NUMDvoltage); ONEsaveState(pDevice); delVd = 0.0; } else if ((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { doInitSolve = TRUE; initStateName = inst->NUMDicFile; vd = 0.0; delVd = vd; } else if ((ckt->CKTmode & MODEINITJCT) && inst->NUMDoff) { doInitSolve = TRUE; vd = 0.0; delVd = vd; } else if (ckt->CKTmode & MODEINITJCT) { doInitSolve = TRUE; initStateName = inst->NUMDicFile; if (deviceType == OPTN_DIODE) { vd = inst->NUMDtype * 0.5; } else if (deviceType == OPTN_MOSCAP) { vd = inst->NUMDtype * 0.8; } else { vd = 0.0; } delVd = vd; } else if (ckt->CKTmode & MODEINITFIX && inst->NUMDoff) { vd = 0.0; delVd = vd; } else { if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + inst->NUMDvoltage) = *(ckt->CKTstate1 + inst->NUMDvoltage); *(ckt->CKTstate0 + inst->NUMDid) = *(ckt->CKTstate1 + inst->NUMDid); *(ckt->CKTstate0 + inst->NUMDconduct) = *(ckt->CKTstate1 + inst->NUMDconduct); /* compute the normalized deltas */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { /* no linear prediction on device voltages */ vd = *(ckt->CKTstate1 + inst->NUMDvoltage); ONEpredict(pDevice, model->NUMDpInfo); } else { if (doVoltPred) { /* linear prediction */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; vd = (1+xfact) * (*(ckt->CKTstate1 + inst->NUMDvoltage)) - (xfact) * (*(ckt->CKTstate2 + inst->NUMDvoltage)); } else { vd = *(ckt->CKTstate1 + inst->NUMDvoltage); } } } else { vd = *(ckt->CKTrhsOld + inst->NUMDposNode) - *(ckt->CKTrhsOld + inst->NUMDnegNode); } delVd = vd - *(ckt->CKTstate0 + inst->NUMDvoltage); idhat = *(ckt->CKTstate0 + inst->NUMDid) + *(ckt->CKTstate0 + inst->NUMDconduct) * delVd; /* * bypass if solution has not changed */ if ((ckt->CKTbypass) && pDevice->converged && !(ckt->CKTmode & MODEINITPRED)) { tol = ckt->CKTvoltTol + ckt->CKTreltol * MAX(fabs(vd), fabs(*(ckt->CKTstate0 + inst->NUMDvoltage))); if (fabs(delVd) < tol) { tol = ckt->CKTreltol * MAX(fabs(idhat), fabs(*(ckt->CKTstate0 + inst->NUMDid))) + ckt->CKTabstol; if (fabs(idhat - *(ckt->CKTstate0 + inst->NUMDid)) < tol) { vd = *(ckt->CKTstate0 + inst->NUMDvoltage); id = *(ckt->CKTstate0 + inst->NUMDid); gd = *(ckt->CKTstate0 + inst->NUMDconduct); goto load; } } } /* * limit new junction voltage */ if (deviceType == OPTN_DIODE) { vd = inst->NUMDtype * limitJunctionVoltage(inst->NUMDtype * vd, inst->NUMDtype * *(ckt->CKTstate0 + inst->NUMDvoltage), &check); } else if (deviceType == OPTN_MOSCAP) { vd = inst->NUMDtype * limitVgb(inst->NUMDtype * vd, inst->NUMDtype * *(ckt->CKTstate0 + inst->NUMDvoltage), &check); } else { vd = inst->NUMDtype * limitResistorVoltage(inst->NUMDtype * vd, inst->NUMDtype * *(ckt->CKTstate0 + inst->NUMDvoltage), &check); } delVd = vd - *(ckt->CKTstate0 + inst->NUMDvoltage); } if (doInitSolve) { if (ONEdcDebug) { printVoltages(stdout, model->NUMDmodName, inst->NUMDname, deviceType, 1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } startTime2 = SPfrontEnd->IFseconds(); ONEequilSolve(pDevice); totalTime2 = SPfrontEnd->IFseconds() - startTime2; pDevice->pStats->totalTime[STAT_SETUP] += totalTime2; pDevice->pStats->totalTime[STAT_DC] -= totalTime2; ONEbiasSolve(pDevice, MaxIterations, FALSE, NULL); *(ckt->CKTstate0 + inst->NUMDvoltage) = 0.0; if (initStateName != NULL) { if (ONEreadState(pDevice, initStateName, 1, &vd, NULL ) < 0) { fprintf(stderr, "NUMDload: trouble reading state-file %s\n", initStateName); } else { NUMDsetBCs(pDevice, vd); delVd = 0.0; } } } /* * compute dc current and derivatives */ /* use the routines for numerical simulation */ if (ckt->CKTmode & (MODEDCOP | MODETRANOP | MODEDCTRANCURVE | MODEINITSMSIG)) { numDevNonCon = 0; inst->NUMDc11 = inst->NUMDy11r = inst->NUMDy11i = 0.0; inst->NUMDsmSigAvail = FALSE; devNonCon: NUMDproject(pDevice, delVd); if (ONEdcDebug) { printVoltages(stdout, model->NUMDmodName, inst->NUMDname, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); } ONEbiasSolve(pDevice, MaxIterations, FALSE, NULL); devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* Get the current and conductance information. */ NUMDcurrent(pDevice, FALSE, NULL, &id); NUMDconductance(pDevice, FALSE, NULL, &gd); } else { /* reduce the voltage step until converged */ /* restore the boundary potential to previous value */ NUMDsetBCs(pDevice, vd - delVd); ONEstoreInitialGuess(pDevice); ONEresetJacobian(pDevice); delVd *= 0.5; vd = delVd + *(ckt->CKTstate0 + inst->NUMDvoltage); numDevNonCon++; check = 1; if (numDevNonCon > 10) { printVoltages(stderr, model->NUMDmodName, inst->NUMDname, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); fprintf(stderr, "*** Non-convergence during load ***\n"); totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } else { goto devNonCon; } } } if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { /* * store small-signal parameters */ if ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) { if (ckt->CKTmode & MODEINITSMSIG) { totalTime = SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; startTime2 = SPfrontEnd->IFseconds(); NUMDinitSmSig(inst); pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime2; continue; } else { inst->NUMDsmSigAvail = FALSE; } /* * transient analysis */ if (ckt->CKTmode & MODEINITPRED) { NUMDsetBCs(pDevice, vd); ONEstoreInitialGuess(pDevice); } else { NUMDupdate(pDevice, delVd, TRUE); } if (ONEtranDebug) { printVoltages(stdout, model->NUMDmodName, inst->NUMDname, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); } ONEbiasSolve(pDevice, 0, TRUE, model->NUMDpInfo); if (!finite(pDevice->rhsNorm)) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_TRAN] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } pDevice->converged = devConverged = ONEdeviceConverged(pDevice); /* extract the current and conductance information */ NUMDcurrent(pDevice, TRUE, model->NUMDpInfo->intCoeff, &id); NUMDconductance(pDevice, TRUE, model->NUMDpInfo->intCoeff, &gd); } } /* * check convergence */ if ((!(ckt->CKTmode & MODEINITFIX)) || (!(inst->NUMDoff))) { if (check == 1 || !devConverged) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(idhat), fabs(id)) + ckt->CKTabstol; if (fabs(idhat - id) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } } } *(ckt->CKTstate0 + inst->NUMDvoltage) = vd; *(ckt->CKTstate0 + inst->NUMDid) = id; *(ckt->CKTstate0 + inst->NUMDconduct) = gd; load: /* * load current vector */ ideq = id - gd * vd; *(ckt->CKTrhs + inst->NUMDnegNode) += ideq; *(ckt->CKTrhs + inst->NUMDposNode) -= ideq; /* * load matrix */ *(inst->NUMDposPosPtr) += gd; *(inst->NUMDnegNegPtr) += gd; *(inst->NUMDnegPosPtr) -= gd; *(inst->NUMDposNegPtr) -= gd; totalTime += SPfrontEnd->IFseconds() - startTime; if (ckt->CKTmode & MODETRAN) { pDevice->pStats->totalTime[STAT_TRAN] += totalTime; } else { pDevice->pStats->totalTime[STAT_DC] += totalTime; } } } return (OK); } int NUMDinitSmSig(NUMDinstance *inst) { SPcomplex yd; double omega = inst->NUMDmodPtr->NUMDmethods->METHomega; AcAnalysisMethod = SOR_ONLY; (void) NUMDadmittance(inst->NUMDpDevice, omega, &yd); inst->NUMDc11 = yd.imag / omega; inst->NUMDy11r = yd.real; inst->NUMDy11i = yd.imag; inst->NUMDsmSigAvail = TRUE; return (OK); } ngspice-26/src/spicelib/devices/numd/numd.c0000644000265600020320000000367512264261473020321 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "numddefs.h" #include "ngspice/suffix.h" IFparm NUMDpTable[] = { /* parameters */ IP("off", NUMD_OFF, IF_FLAG, "Initially off"), IP("ic.file", NUMD_IC_FILE, IF_REAL, "Initial conditions file"), IOP("area", NUMD_AREA, IF_REAL, "Area factor"), IP("save", NUMD_PRINT, IF_INTEGER, "Save Solutions"), IP("print", NUMD_PRINT, IF_INTEGER, "Print Solutions"), OP("vd", NUMD_VD, IF_REAL, "Voltage"), OP("id", NUMD_ID, IF_REAL, "Current"), OP("g11", NUMD_G11, IF_REAL, "Conductance"), OP("c11", NUMD_C11, IF_REAL, "Capacitance"), OP("y11", NUMD_Y11, IF_COMPLEX, "Admittance"), OPU("g12", NUMD_G12, IF_REAL, "Conductance"), OPU("c12", NUMD_C12, IF_REAL, "Capacitance"), OPU("y12", NUMD_Y12, IF_COMPLEX, "Admittance"), OPU("g21", NUMD_G21, IF_REAL, "Conductance"), OPU("c21", NUMD_C21, IF_REAL, "Capacitance"), OPU("y21", NUMD_Y21, IF_COMPLEX, "Admittance"), OPU("g22", NUMD_G22, IF_REAL, "Conductance"), OPU("c22", NUMD_C22, IF_REAL, "Capacitance"), OPU("y22", NUMD_Y22, IF_COMPLEX, "Admittance"), OPR("voltage", NUMD_VD, IF_REAL, "Voltage"), OPR("current", NUMD_ID, IF_REAL, "Current"), OPR("conductance", NUMD_G11, IF_REAL, "Conductance"), OPR("capacitance", NUMD_C11, IF_REAL, "Capacitance"), IOP("temp", NUMD_TEMP, IF_REAL, "Instance Temperature") }; IFparm NUMDmPTable[] = { /* model parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("numd", NUMD_MOD_NUMD, IF_REAL, "Numerical Diode") }; char *NUMDnames[] = { "D+", "D-" }; int NUMDnSize = NUMELEMS(NUMDnames); int NUMDpTSize = NUMELEMS(NUMDpTable); int NUMDmPTSize = NUMELEMS(NUMDmPTable); int NUMDiSize = sizeof(NUMDinstance); int NUMDmSize = sizeof(NUMDmodel); ngspice-26/src/spicelib/devices/numd/numdset.c0000644000265600020320000001636312264261473021033 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "numddefs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/ciderinp.h" #include "ngspice/suffix.h" #include "ngspice/meshext.h" #define TSCALLOC(var, size, type)\ if (size && (var =(type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NUMDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the structure with those pointers needed later for fast matrix * loading */ { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; char *icFileName = NULL; size_t nameLen; int error; int xMeshSize; ONEdevice *pDevice; ONEcoord *xCoordList = NULL; ONEdomain *domainList = NULL; ONEmaterial *pM, *pMaterial = NULL, *materialList = NULL; DOPprofile *profileList = NULL; DOPtable *dopTableList = NULL; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NUMDnextModel) { if (!model->NUMDpInfo) { TSCALLOC(model->NUMDpInfo, 1, ONEtranInfo); } methods = model->NUMDmethods; if (!methods) { TSCALLOC(methods, 1, METHcard); model->NUMDmethods = methods; } models = model->NUMDmodels; if (!models) { TSCALLOC(models, 1, MODLcard); model->NUMDmodels = models; } options = model->NUMDoptions; if (!options) { TSCALLOC(options, 1, OPTNcard); model->NUMDoptions = options; } outputs = model->NUMDoutputs; if (!outputs) { TSCALLOC(outputs, 1, OUTPcard); model->NUMDoutputs = outputs; } if (!methods->METHvoltPredGiven) { methods->METHvoltPred = FALSE; } if (!methods->METHmobDerivGiven) { methods->METHmobDeriv = TRUE; } if (!methods->METHoneCarrierGiven) { methods->METHoneCarrier = FALSE; } if (!methods->METHacAnalysisMethodGiven) { methods->METHacAnalysisMethod = SOR; } if (!methods->METHdabstolGiven) { methods->METHdabstol = DABSTOL1D; } if (!methods->METHdreltolGiven) { methods->METHdreltol = ckt->CKTreltol; } if (!methods->METHitLimGiven) { methods->METHitLim = 20; } if (!methods->METHomegaGiven || methods->METHomega <= 0.0) { methods->METHomega = 2.0 * M_PI /* radians/sec */ ; } if (!options->OPTNdefaGiven || options->OPTNdefa <= 0.0) { options->OPTNdefa = 1.0e4 /* cm^2 */ ; } if (!options->OPTNdeviceTypeGiven) { options->OPTNdeviceType = OPTN_DIODE; } if (!options->OPTNicFileGiven) { options->OPTNicFile = NULL; options->OPTNunique = FALSE; /* Can't form a unique name. */ } if (!options->OPTNuniqueGiven) { options->OPTNunique = FALSE; } /* Set up the rest of the card lists */ if ((error = MODLsetup(model->NUMDmodels)) != 0) return (error); BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; if ((error = OUTPsetup(model->NUMDoutputs)) != 0) return (error); if ((error = MATLsetup(model->NUMDmaterials, &materialList)) != 0) return (error); if ((error = MOBsetup(model->NUMDmobility, materialList)) != 0) return (error); if ((error = MESHsetup('x', model->NUMDxMeshes, &xCoordList, &xMeshSize)) != 0) return (error); if ((error = DOMNsetup(model->NUMDdomains, &domainList, xCoordList, NULL, materialList)) != 0) return (error); if ((error = BDRYsetup(model->NUMDboundaries, xCoordList, NULL, domainList)) != 0) return (error); if ((error = CONTsetup(model->NUMDcontacts, NULL)) != 0) return (error); if ((error = DOPsetup(model->NUMDdopings, &profileList, &dopTableList, xCoordList, NULL)) != 0) return (error); model->NUMDmatlInfo = materialList; model->NUMDprofiles = profileList; model->NUMDdopTables = dopTableList; /* loop through all the instances of the model */ for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { startTime = SPfrontEnd->IFseconds(); if ((!inst->NUMDprintGiven)) { inst->NUMDprint = 0; } else if (inst->NUMDprint <= 0) { inst->NUMDprint = 1; } if ((!inst->NUMDicFileGiven)) { if (options->OPTNunique) { nameLen = strlen(options->OPTNicFile) + strlen(inst->NUMDname) + 1; TSCALLOC(icFileName, nameLen+1, char); sprintf(icFileName, "%s.%s", options->OPTNicFile, inst->NUMDname); icFileName[nameLen] = '\0'; inst->NUMDicFile = icFileName; } else if (options->OPTNicFile != NULL) { nameLen = strlen(options->OPTNicFile); TSCALLOC(icFileName, nameLen+1, char); icFileName = strcpy(icFileName, options->OPTNicFile); inst->NUMDicFile = icFileName; } else { inst->NUMDicFile = NULL; } } inst->NUMDstate = *states; *states += NUMDnumStates; if (!inst->NUMDpDevice) { /* Assign the mesh info to each instance. */ TSCALLOC(pDevice, 1, ONEdevice); TSCALLOC(pDevice->pStats, 1, ONEstats); pDevice->name = inst->NUMDname; pDevice->solverType = SLV_NONE; pDevice->numNodes = xMeshSize; pDevice->abstol = methods->METHdabstol; pDevice->reltol = methods->METHdreltol; pDevice->rhsImag = NULL; TSCALLOC(pDevice->elemArray, pDevice->numNodes, ONEelem *); /* Create a copy of material data that can change with temperature. */ pDevice->pMaterials = NULL; for (pM = materialList; pM != NULL; pM = pM->next) { if (pDevice->pMaterials == NULL) { TSCALLOC(pMaterial, 1, ONEmaterial); pDevice->pMaterials = pMaterial; } else { TSCALLOC(pMaterial->next, 1, ONEmaterial); pMaterial = pMaterial->next; } /* Copy everything, then fix the incorrect pointer. */ bcopy(pM, pMaterial, sizeof(ONEmaterial)); pMaterial->next = NULL; } /* generate the mesh structure for the device */ ONEbuildMesh(pDevice, xCoordList, domainList, pDevice->pMaterials); /* store the device info in the instance */ inst->NUMDpDevice = pDevice; } /* Now update the state pointers. */ ONEgetStatePointers(inst->NUMDpDevice, states); /* Wipe out statistics from previous runs (if any). */ bzero(inst->NUMDpDevice->pStats, sizeof(ONEstats)); inst->NUMDpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(NUMDposPosPtr, NUMDposNode, NUMDposNode); TSTALLOC(NUMDnegNegPtr, NUMDnegNode, NUMDnegNode); TSTALLOC(NUMDnegPosPtr, NUMDnegNode, NUMDposNode); TSTALLOC(NUMDposNegPtr, NUMDposNode, NUMDnegNode); } /* Clean up lists */ killCoordInfo(xCoordList); killDomainInfo(domainList); } return (OK); } ngspice-26/src/spicelib/devices/numd/numddel.c0000644000265600020320000000145712264261473021002 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMDdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { NUMDmodel *model = (NUMDmodel *) inModel; NUMDinstance **fast = (NUMDinstance **) kill; NUMDinstance **prev = NULL; NUMDinstance *inst; for (; model; model = model->NUMDnextModel) { prev = &(model->NUMDinstances); for (inst = *prev; inst; inst = *prev) { if (inst->NUMDname == name || (fast && inst == *fast)) { *prev = inst->NUMDnextInstance; FREE(inst); return (OK); } prev = &(inst->NUMDnextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/numd/numditf.h0000644000265600020320000000027012264261473021015 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NUMD #define DEV_NUMD extern SPICEdev *get_numd_info(void); #endif ngspice-26/src/spicelib/devices/numd/numdinit.c0000644000265600020320000000405212264261473021173 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "numditf.h" #include "numdext.h" #include "numdinit.h" SPICEdev NUMDinfo = { { "NUMD", "1D Numerical Junction Diode model", &NUMDnSize, &NUMDnSize, NUMDnames, &NUMDpTSize, NUMDpTable, &NUMDmPTSize, NUMDmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NUMDparam, /* DEVmodParam */ NUMDmParam, /* DEVload */ NUMDload, /* DEVsetup */ NUMDsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NUMDsetup, /* DEVtemperature*/ NUMDtemp, /* DEVtrunc */ NUMDtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NUMDacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ NUMDdestroy, /* DEVmodDelete */ NUMDmDelete, /* DEVdelete */ NUMDdelete, /* DEVsetic */ NULL, /* DEVask */ NUMDask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NUMDpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NUMDdump, /* DEVacct */ NUMDacct, #endif /* DEVinstSize */ &NUMDiSize, /* DEVmodSize */ &NUMDmSize }; SPICEdev * get_numd_info(void) { return &NUMDinfo; } ngspice-26/src/spicelib/devices/numd/numdacld.c0000644000265600020320000000440112264261473021131 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/numglobs.h" #include "ngspice/suffix.h" /* External Declarations */ extern int ONEacDebug; int NUMDacLoad(GENmodel *inModel, CKTcircuit *ckt) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; SPcomplex y; double startTime; /* loop through all the diode models */ for (; model != NULL; model = model->NUMDnextModel) { FieldDepMobility = model->NUMDmodels->MODLfieldDepMobility; Srh = model->NUMDmodels->MODLsrh; Auger = model->NUMDmodels->MODLauger; AvalancheGen = model->NUMDmodels->MODLavalancheGen; AcAnalysisMethod = model->NUMDmethods->METHacAnalysisMethod; MobDeriv = model->NUMDmethods->METHmobDeriv; ONEacDebug = model->NUMDoutputs->OUTPacDebug; for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMDglobals)); model->NUMDmethods->METHacAnalysisMethod = NUMDadmittance(inst->NUMDpDevice, ckt->CKTomega, &y); *(inst->NUMDposPosPtr) += y.real; *(inst->NUMDposPosPtr + 1) += y.imag; *(inst->NUMDnegNegPtr) += y.real; *(inst->NUMDnegNegPtr + 1) += y.imag; *(inst->NUMDnegPosPtr) -= y.real; *(inst->NUMDnegPosPtr + 1) -= y.imag; *(inst->NUMDposNegPtr) -= y.real; *(inst->NUMDposNegPtr + 1) -= y.imag; if (ckt->CKTomega != 0.0) { inst->NUMDc11 = y.imag / ckt->CKTomega; } else { inst->NUMDc11 = 0.0; /* XXX What else can be done?! */ } inst->NUMDy11r = y.real; inst->NUMDy11i = y.imag; inst->NUMDsmSigAvail = TRUE; inst->NUMDpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd/numdmpar.c0000644000265600020320000000133612264261473021171 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NUMDs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMDmParam(int param, IFvalue *value, GENmodel *inModel) { NG_IGNORE(value); NG_IGNORE(inModel); switch (param) { case NUMD_MOD_NUMD: /* no action - already know it is a 1d-numerical diode, but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numd/numdmdel.c0000644000265600020320000000173512264261473021156 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { NUMDmodel **model = (NUMDmodel **) inModel; NUMDmodel *modfast = (NUMDmodel *) kill; NUMDinstance *inst; NUMDinstance *prev = NULL; NUMDmodel **oldmod; oldmod = model; for (; *model; model = &((*model)->NUMDnextModel)) { if ((*model)->NUMDmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: *oldmod = (*model)->NUMDnextModel; /* cut deleted device out of list */ for (inst = (*model)->NUMDinstances; inst; inst = inst->NUMDnextInstance) { if (prev) FREE(prev); prev = inst; } if (prev) FREE(prev); FREE(*model); return (OK); } ngspice-26/src/spicelib/devices/numd/numdext.h0000644000265600020320000000177612264261473021047 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef NUMDEXT_H #define NUMDEXT_H extern int NUMDacLoad(GENmodel *, CKTcircuit *); extern int NUMDask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NUMDdelete(GENmodel *, IFuid, GENinstance **); extern void NUMDdestroy(GENmodel **); extern int NUMDgetic(GENmodel *, CKTcircuit *); extern int NUMDload(GENmodel *, CKTcircuit *); extern int NUMDmDelete(GENmodel **, IFuid, GENmodel *); extern int NUMDmParam(int, IFvalue *, GENmodel *); extern int NUMDparam(int, IFvalue *, GENinstance *, IFvalue *); extern int NUMDpzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NUMDsetup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NUMDtemp(GENmodel *, CKTcircuit *); extern int NUMDtrunc(GENmodel *, CKTcircuit *, double *); extern void NUMDdump(GENmodel *, CKTcircuit *); extern void NUMDacct(GENmodel *, CKTcircuit *, FILE *); #endif /* NUMDEXT_H */ ngspice-26/src/spicelib/devices/numd/numdtemp.c0000644000265600020320000000706112264261473021200 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numddefs.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMDtemp(GENmodel *inModel, CKTcircuit *ckt) /* * perform the temperature update to the diode */ { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; ONEmaterial *pM, *pMaterial, *pNextMaterial; double startTime; /* loop through all the diode models */ for (; model != NULL; model = model->NUMDnextModel) { methods = model->NUMDmethods; models = model->NUMDmodels; options = model->NUMDoptions; outputs = model->NUMDoutputs; if (!options->OPTNtnomGiven) { options->OPTNtnom = ckt->CKTnomTemp; } for (pM = model->NUMDmatlInfo; pM != NULL; pM = pM->next) { pM->tnom = options->OPTNtnom; } BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NUMDtempGiven) { inst->NUMDtemp = ckt->CKTtemp; } if (!inst->NUMDareaGiven || inst->NUMDarea <= 0.0) { inst->NUMDarea = 1.0; } inst->NUMDpDevice->area = inst->NUMDarea * options->OPTNdefa; /* Compute and save globals for this instance. */ GLOBcomputeGlobals(&(inst->NUMDglobals), inst->NUMDtemp); if (outputs->OUTPglobals) { GLOBprnGlobals(stdout, &(inst->NUMDglobals)); } /* Calculate new sets of material parameters. */ pM = model->NUMDmatlInfo; pMaterial = inst->NUMDpDevice->pMaterials; for (; pM != NULL; pM = pM->next, pMaterial = pMaterial->next) { /* Copy the original values, then fix the incorrect pointer. */ pNextMaterial = pMaterial->next; bcopy(pM, pMaterial, sizeof(ONEmaterial)); pMaterial->next = pNextMaterial; /* Now do the temperature dependence. */ MATLtempDep(pMaterial, pMaterial->tnom); if (outputs->OUTPmaterial) { printMaterialInfo(pMaterial); } } /* Assign doping to the mesh. */ ONEsetDoping(inst->NUMDpDevice, model->NUMDprofiles, model->NUMDdopTables); /* Assign other physical parameters to the mesh. */ ONEsetup(inst->NUMDpDevice); /* Assign boundary condition parameters. */ ONEsetBCparams(inst->NUMDpDevice, model->NUMDboundaries, model->NUMDcontacts); /* Normalize everything. */ ONEnormalize(inst->NUMDpDevice); /* Find the device's polarity type. */ switch (options->OPTNdeviceType) { case OPTN_DIODE: if (inst->NUMDpDevice->elemArray[1] ->pNodes[0]->netConc < 0.0) { inst->NUMDtype = PN; } else { inst->NUMDtype = NP; } break; case OPTN_MOSCAP: if (inst->NUMDpDevice->elemArray[inst->NUMDpDevice->numNodes - 1] ->pNodes[1]->netConc < 0.0) { inst->NUMDtype = PN; } else { inst->NUMDtype = NP; } break; default: inst->NUMDtype = PN; break; } inst->NUMDpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd/numddest.c0000644000265600020320000000160512264261473021170 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes all NUMDs from the circuit and frees all storage they * were using. The current implementation has memory leaks. */ #include "ngspice/ngspice.h" #include "numddefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" void NUMDdestroy(GENmodel **inModel) { NUMDmodel **model = (NUMDmodel **) inModel; NUMDmodel *mod, *nextMod; NUMDinstance *inst, *nextInst; for (mod = *model; mod;) { for (inst = mod->NUMDinstances; inst;) { ONEdestroy(inst->NUMDpDevice); nextInst = inst->NUMDnextInstance; FREE(inst); inst = nextInst; } nextMod = mod->NUMDnextModel; FREE(mod); mod = nextMod; } *model = NULL; } ngspice-26/src/spicelib/devices/numd/Makefile.am0000644000265600020320000000074712264261473021243 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libnumd.la libnumd_la_SOURCES = \ numd.c \ numdacld.c \ numdask.c \ numddefs.h \ numddel.c \ numddest.c \ numddump.c \ numdext.h \ numdinit.c \ numdinit.h \ numditf.h \ numdload.c \ numdmdel.c \ numdmpar.c \ numdparm.c \ numdpzld.c \ numdset.c \ numdtemp.c \ numdtrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/numd/Makefile.in0000644000265600020320000004242012264261537021247 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/numd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnumd_la_LIBADD = am_libnumd_la_OBJECTS = numd.lo numdacld.lo numdask.lo numddel.lo \ numddest.lo numddump.lo numdinit.lo numdload.lo numdmdel.lo \ numdmpar.lo numdparm.lo numdpzld.lo numdset.lo numdtemp.lo \ numdtrun.lo libnumd_la_OBJECTS = $(am_libnumd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnumd_la_SOURCES) DIST_SOURCES = $(libnumd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnumd.la libnumd_la_SOURCES = \ numd.c \ numdacld.c \ numdask.c \ numddefs.h \ numddel.c \ numddest.c \ numddump.c \ numdext.h \ numdinit.c \ numdinit.h \ numditf.h \ numdload.c \ numdmdel.c \ numdmpar.c \ numdparm.c \ numdpzld.c \ numdset.c \ numdtemp.c \ numdtrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/numd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/numd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnumd.la: $(libnumd_la_OBJECTS) $(libnumd_la_DEPENDENCIES) $(EXTRA_libnumd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnumd_la_OBJECTS) $(libnumd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numddel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numddest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numddump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numdtrun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/numd/numdparm.c0000644000265600020320000000176612264261473021200 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/const.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMDparam(int param, IFvalue *value, GENinstance *inInst, IFvalue *select) { NUMDinstance *inst = (NUMDinstance *) inInst; NG_IGNORE(select); switch (param) { case NUMD_AREA: inst->NUMDarea = value->rValue; inst->NUMDareaGiven = TRUE; break; case NUMD_OFF: inst->NUMDoff = TRUE; break; case NUMD_IC_FILE: inst->NUMDicFile = value->sValue; inst->NUMDicFileGiven = TRUE; break; case NUMD_PRINT: inst->NUMDprint = value->iValue; inst->NUMDprintGiven = TRUE; break; case NUMD_TEMP: inst->NUMDtemp = value->rValue + CONSTCtoK; inst->NUMDtempGiven = TRUE; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numd/numddefs.h0000644000265600020320000001073312264261473021161 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef NUMD_H #define NUMD_H /* data structures used to describe 1D numerical diodes */ /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* device level includes */ #include "ngspice/onemesh.h" #include "ngspice/onedev.h" #include "ngspice/profile.h" #include "ngspice/numglobs.h" #include "ngspice/carddefs.h" /* information needed per instance */ typedef struct sNUMDinstance { struct sNUMDmodel *NUMDmodPtr;/* back pointer to model */ struct sNUMDinstance *NUMDnextInstance; /* pointer to next instance * of current model */ IFuid NUMDname; /* pointer to character string naming this * instance */ int NUMDstate; /* pointer to start of state vector for diode */ #define NUMDvoltage NUMDstate #define NUMDid NUMDstate+1 #define NUMDconduct NUMDstate+2 #define NUMDnumStates 3 int NUMDposNode; /* number of positive node of diode */ int NUMDnegNode; /* number of negative node of diode */ ONEdevice *NUMDpDevice; GLOBvalues NUMDglobals; /* Temp.-Dep. Global Parameters */ int NUMDtype; /* device type pn or np */ double NUMDarea; /* area factor for the diode */ double NUMDtemp; /* instance temperature */ double NUMDc11; /* small-signal capacitance */ double NUMDy11r; /* small-signal admittance, real part */ double NUMDy11i; /* small-signal admittance, imag part */ int NUMDprint; /* number of timesteps after which print * internal */ char *NUMDicFile; /* Name of initial condition file */ double *NUMDnegPosPtr; /* pointer to sparse matrix at * (negative,positive) */ double *NUMDposNegPtr; /* pointer to sparse matrix at * (positive,negative) */ double *NUMDposPosPtr; /* pointer to sparse matrix at * (positive,positive) */ double *NUMDnegNegPtr; /* pointer to sparse matrix at * (negative,negative) */ int NUMDoff; /* 'off' flag for diode */ unsigned NUMDsmSigAvail:1; /* flag to indicate small-signal done */ unsigned NUMDareaGiven:1; /* flag to indicate area was specified */ unsigned NUMDicFileGiven:1; /* flag to indicate init. cond. file given */ unsigned NUMDtempGiven:1; /* flag to indicate temp was specified */ unsigned NUMDprintGiven:1; /* flag to indicate if print was specified */ } NUMDinstance; /* per model data */ typedef struct sNUMDmodel { /* model structure for a diode */ int NUMDmodType; /* type index of this device type */ struct sNUMDmodel *NUMDnextModel; /* pointer to next possible model in * linked list */ NUMDinstance *NUMDinstances; /* pointer to list of instances that have * this model */ IFuid NUMDmodName; /* pointer to character string naming this * model */ /* Everything below here is numerical-device-specific */ MESHcard *NUMDxMeshes; /* list of xmesh cards */ MESHcard *NUMDyMeshes; /* list of ymesh cards */ DOMNcard *NUMDdomains; /* list of domain cards */ BDRYcard *NUMDboundaries; /* list of boundary cards */ DOPcard *NUMDdopings; /* list of doping cards */ ELCTcard *NUMDelectrodes; /* list of electrode cards */ CONTcard *NUMDcontacts; /* list of contact cards */ MODLcard *NUMDmodels; /* list of model cards */ MATLcard *NUMDmaterials; /* list of material cards */ MOBcard *NUMDmobility; /* list of mobility cards */ METHcard *NUMDmethods; /* list of method cards */ OPTNcard *NUMDoptions; /* list of option cards */ OUTPcard *NUMDoutputs; /* list of output cards */ ONEtranInfo *NUMDpInfo; /* transient analysis information */ DOPprofile *NUMDprofiles; /* expanded list of doping profiles */ DOPtable *NUMDdopTables; /* list of tables used by profiles */ ONEmaterial *NUMDmatlInfo; /* list of material info structures */ } NUMDmodel; /* type of 1D diode */ #define PN 1 #define NP -1 /* device parameters */ #define NUMD_AREA 1 #define NUMD_IC_FILE 2 #define NUMD_OFF 3 #define NUMD_PRINT 4 #define NUMD_TEMP 5 #define NUMD_VD 6 #define NUMD_ID 7 #define NUMD_G11 8 #define NUMD_C11 9 #define NUMD_Y11 10 #define NUMD_G12 11 #define NUMD_C12 12 #define NUMD_Y12 13 #define NUMD_G21 14 #define NUMD_C21 15 #define NUMD_Y21 16 #define NUMD_G22 17 #define NUMD_C22 18 #define NUMD_Y22 19 /* model parameters */ /* NOTE: all true model parameters have been moved to IFcardInfo structures */ #define NUMD_MOD_NUMD 101 /* device questions */ /* model questions */ #include "numdext.h" #endif /* NUMD_H */ ngspice-26/src/spicelib/devices/numd/numdpzld.c0000644000265600020320000000346312264261473021206 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "numddefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* External Declarations */ extern int ONEacDebug; int NUMDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; SPcomplex y; double startTime; NG_IGNORE(ckt); /* loop through all the diode models */ for (; model != NULL; model = model->NUMDnextModel) { FieldDepMobility = model->NUMDmodels->MODLfieldDepMobility; Srh = model->NUMDmodels->MODLsrh; Auger = model->NUMDmodels->MODLauger; AvalancheGen = model->NUMDmodels->MODLavalancheGen; AcAnalysisMethod = model->NUMDmethods->METHacAnalysisMethod; MobDeriv = model->NUMDmethods->METHmobDeriv; ONEacDebug = model->NUMDoutputs->OUTPacDebug; for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMDglobals)); NUMDys(inst->NUMDpDevice, s, &y); *(inst->NUMDposPosPtr) += y.real; *(inst->NUMDposPosPtr + 1) += y.imag; *(inst->NUMDnegNegPtr) += y.real; *(inst->NUMDnegNegPtr + 1) += y.imag; *(inst->NUMDnegPosPtr) -= y.real; *(inst->NUMDnegPosPtr + 1) -= y.imag; *(inst->NUMDposNegPtr) -= y.real; *(inst->NUMDposNegPtr + 1) -= y.imag; inst->NUMDpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd/numdask.c0000644000265600020320000000572712264261473021020 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "numddefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Check out this one */ extern int NUMDinitSmSig(NUMDinstance *); /* ARGSUSED */ int NUMDask(CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select) { NUMDinstance *inst = (NUMDinstance *) inInst; NG_IGNORE(select); switch (which) { case NUMD_AREA: value->rValue = inst->NUMDarea; return (OK); case NUMD_TEMP: value->rValue = inst->NUMDtemp - CONSTCtoK; return (OK); case NUMD_VD: value->rValue = *(ckt->CKTstate0 + inst->NUMDvoltage); return (OK); case NUMD_ID: value->rValue = *(ckt->CKTstate0 + inst->NUMDid); return (OK); case NUMD_G11: value->rValue = *(ckt->CKTstate0 + inst->NUMDconduct); return (OK); case NUMD_G12: value->rValue = -*(ckt->CKTstate0 + inst->NUMDconduct); return (OK); case NUMD_G21: value->rValue = -*(ckt->CKTstate0 + inst->NUMDconduct); return (OK); case NUMD_G22: value->rValue = *(ckt->CKTstate0 + inst->NUMDconduct); return (OK); case NUMD_C11: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->rValue = inst->NUMDc11; return (OK); case NUMD_C12: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->rValue = -inst->NUMDc11; return (OK); case NUMD_C21: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->rValue = -inst->NUMDc11; return (OK); case NUMD_C22: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->rValue = inst->NUMDc11; return (OK); case NUMD_Y11: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->cValue.real = inst->NUMDy11r; value->cValue.imag = inst->NUMDy11i; return (OK); case NUMD_Y12: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->cValue.real = -inst->NUMDy11r; value->cValue.imag = -inst->NUMDy11i; return (OK); case NUMD_Y21: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->cValue.real = -inst->NUMDy11r; value->cValue.imag = -inst->NUMDy11i; return (OK); case NUMD_Y22: if (!inst->NUMDsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMDinitSmSig(inst); } value->cValue.real = inst->NUMDy11r; value->cValue.imag = inst->NUMDy11i; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/numd/numddump.c0000644000265600020320000001017612264261473021201 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numddefs.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ static void NUMDputHeader(FILE *, CKTcircuit *, NUMDinstance *); /* State Counter */ static int state_numOP = 0; static int state_numDC = 0; static int state_numTR = 0; void NUMDdump(GENmodel *inModel, CKTcircuit *ckt) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; OUTPcard *output; FILE *fpState; char fileName[BSIZE_SP]; char description[BSIZE_SP]; char *prefix; int *state_num; int anyOutput = 0; if (ckt->CKTmode & MODEDCOP) { prefix = "OP"; state_num = &state_numOP; sprintf(description, "..."); } else if (ckt->CKTmode & MODEDCTRANCURVE) { prefix = "DC"; state_num = &state_numDC; sprintf(description, "sweep = % e", ckt->CKTtime); } else if (ckt->CKTmode & MODETRAN) { prefix = "TR"; state_num = &state_numTR; sprintf(description, "time = % e", ckt->CKTtime); } else { /* Not a recognized CKT mode. */ return; } for (; model != NULL; model = model->NUMDnextModel) { output = model->NUMDoutputs; for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { if (inst->NUMDprintGiven) { if ((ckt->CKTmode & MODETRAN) && ((ckt->CKTstat->STATaccepted - 1) % inst->NUMDprint != 0)) { continue; } anyOutput = 1; sprintf(fileName, "%s%s.%d.%s", output->OUTProotFile, prefix, *state_num, inst->NUMDname); if ((fpState = fopen(fileName, "wb")) == NULL) { perror(fileName); } else { NUMDputHeader(fpState, ckt, inst); ONEprnSolution(fpState, inst->NUMDpDevice, model->NUMDoutputs); fclose(fpState); LOGmakeEntry(fileName, description); } } } } if (anyOutput) { (*state_num)++; } } #define NUMDnumOutputs 4 static void NUMDputHeader(FILE *file, CKTcircuit *ckt, NUMDinstance *inst) { char *reference; double refVal = 0.0; int numVars = NUMDnumOutputs; if (ckt->CKTmode & MODEDCOP) { reference = NULL; } else if (ckt->CKTmode & MODEDCTRANCURVE) { reference = "sweep"; refVal = ckt->CKTtime; numVars++; } else if (ckt->CKTmode & MODETRAN) { reference = "time"; refVal = ckt->CKTtime; numVars++; } else { reference = NULL; } fprintf(file, "Title: Device %s external state\n", inst->NUMDname); fprintf(file, "Plotname: Device Operating Point\n"); fprintf(file, "Command: deftype v conductance S\n"); fprintf(file, "Flags: real\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: 1\n"); numVars = 0; fprintf(file, "Variables:\n"); if (reference) { fprintf(file, "\t%d %s unknown\n", numVars++, reference); } fprintf(file, "\t%d v12 voltage\n", numVars++); fprintf(file, "\t%d i1 current\n", numVars++); fprintf(file, "\t%d i2 current\n", numVars++); fprintf(file, "\t%d g11 conductance\n", numVars++); fprintf(file, "Values:\n0"); if (reference) { fprintf(file, "\t% e\n", refVal); } fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMDvoltage)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMDid)); fprintf(file, "\t% e\n", - *(ckt->CKTstate0 + inst->NUMDid)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMDconduct)); } void NUMDacct(GENmodel *inModel, CKTcircuit *ckt, FILE *file) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; OUTPcard *output; NG_IGNORE(ckt); for (; model != NULL; model = model->NUMDnextModel) { output = model->NUMDoutputs; for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { if (output->OUTPstats) { ONEmemStats(file, inst->NUMDpDevice); ONEcpuStats(file, inst->NUMDpDevice); } } } } ngspice-26/src/spicelib/devices/numd/numdinit.h0000644000265600020320000000037012264261473021177 0ustar andreasadmin#ifndef _NUMDINIT_H #define _NUMDINIT_H extern IFparm NUMDpTable[ ]; extern IFparm NUMDmPTable[ ]; extern char *NUMDnames[ ]; extern int NUMDpTSize; extern int NUMDmPTSize; extern int NUMDnSize; extern int NUMDiSize; extern int NUMDmSize; #endif ngspice-26/src/spicelib/devices/numd/numdtrun.c0000644000265600020320000000240412264261473021217 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/oned/onedext.h" #include "ngspice/suffix.h" #include "ngspice/cidersupt.h" int NUMDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register NUMDmodel *model = (NUMDmodel *) inModel; register NUMDinstance *inst; double deltaNew; double deltaNorm[7]; double startTime; int i; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } for (; model != NULL; model = model->NUMDnextModel) { model->NUMDpInfo->order = ckt->CKTorder; model->NUMDpInfo->delta = deltaNorm; model->NUMDpInfo->lteCoeff = computeLTECoeff(model->NUMDpInfo); for (inst = model->NUMDinstances; inst != NULL; inst = inst->NUMDnextInstance) { startTime = SPfrontEnd->IFseconds(); deltaNew = ONEtrunc(inst->NUMDpDevice, model->NUMDpInfo, ckt->CKTdelta); *timeStep = MIN(*timeStep, deltaNew); inst->NUMDpDevice->pStats->totalTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/bsim3v32/0000755000265600020320000000000012264261706017603 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3v32/b3v32check.c0000644000265600020320000005000112264261473021601 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3check.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/14, 2001. * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM3v32checkModel (BSIM3v32model *model, BSIM3v32instance *here, CKTcircuit *ckt) { struct bsim3v32SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3v32check.log", "w")) != NULL) { pParam = here->pParam; fprintf (fplog, "BSIM3 Model (Supports: v3.2, v3.2.2, v3.2.3, v3.2.4)\n"); fprintf (fplog, "Parameter Checking.\n"); fprintf (fplog, "Model = %s\n", model->BSIM3v32modName); fprintf (fplog, "W = %g, L = %g, M = %g\n", here->BSIM3v32w, here->BSIM3v32l, here->BSIM3v32m); if ((strcmp(model->BSIM3v32version, "3.2.4")) && (strcmp(model->BSIM3v32version, "3.24")) && (strcmp(model->BSIM3v32version, "3.2.3")) && (strcmp(model->BSIM3v32version, "3.23")) && (strcmp(model->BSIM3v32version, "3.2.2")) && (strcmp(model->BSIM3v32version, "3.22")) && (strcmp(model->BSIM3v32version, "3.2")) && (strcmp(model->BSIM3v32version, "3.20"))) { fprintf (fplog, "Warning: This model supports BSIM3v3.2, BSIM3v3.2.2, BSIM3v3.2.3, BSIM3v3.2.4\n"); fprintf (fplog, "You specified a wrong version number. Working now with BSIM3v3.2.4.\n"); printf ("Warning: This model supports BSIM3v3.2, BSIM3v3.2.2, BSIM3v3.2.3, BSIM3v3.2.4\n"); printf ("You specified a wrong version number. Working now with BSIM3v3.2.4.\n"); } if (pParam->BSIM3v32nlx < -pParam->BSIM3v32leff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3v32nlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3v32nlx); Fatal_Flag = 1; } if (model->BSIM3v32tox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->BSIM3v32tox); printf("Fatal: Tox = %g is not positive.\n", model->BSIM3v32tox); Fatal_Flag = 1; } if (model->BSIM3v32toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM3v32toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM3v32toxm); Fatal_Flag = 1; } if (pParam->BSIM3v32npeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->BSIM3v32npeak); printf("Fatal: Nch = %g is not positive.\n", pParam->BSIM3v32npeak); Fatal_Flag = 1; } if (pParam->BSIM3v32nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM3v32nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM3v32nsub); Fatal_Flag = 1; } if (pParam->BSIM3v32ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM3v32ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM3v32ngate); Fatal_Flag = 1; } if (pParam->BSIM3v32ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM3v32ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM3v32ngate); Fatal_Flag = 1; } if (pParam->BSIM3v32xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM3v32xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3v32xj); Fatal_Flag = 1; } if (pParam->BSIM3v32dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3v32dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3v32dvt1); Fatal_Flag = 1; } if (pParam->BSIM3v32dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3v32dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3v32dvt1w); Fatal_Flag = 1; } if (pParam->BSIM3v32w0 == -pParam->BSIM3v32weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3v32dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3v32dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3v32dsub); Fatal_Flag = 1; } if (pParam->BSIM3v32b1 == -pParam->BSIM3v32weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3v32u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3v32u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3v32u0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->BSIM3v32delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM3v32delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3v32delta); Fatal_Flag = 1; } if (pParam->BSIM3v32vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3v32vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3v32vsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->BSIM3v32pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3v32pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3v32pclm); Fatal_Flag = 1; } if (pParam->BSIM3v32drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3v32drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3v32drout); Fatal_Flag = 1; } if (pParam->BSIM3v32pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3v32pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM3v32pscbe2); } /* ACM model */ if (model->BSIM3v32acmMod == 0) { if (model->BSIM3v32unitLengthSidewallJctCap > 0.0 || model->BSIM3v32unitLengthGateSidewallJctCap > 0.0) { if (here->BSIM3v32drainPerimeter < pParam->BSIM3v32weff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->BSIM3v32drainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->BSIM3v32drainPerimeter); } if (here->BSIM3v32sourcePerimeter < pParam->BSIM3v32weff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->BSIM3v32sourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->BSIM3v32sourcePerimeter); } } } if ((model->BSIM3v32calcacm > 0) && (model->BSIM3v32acmMod != 12)) { fprintf(fplog, "Warning: CALCACM = %d is wrong. Set back to 0.\n", model->BSIM3v32calcacm); printf("Warning: CALCACM = %d is wrong. Set back to 0.\n", model->BSIM3v32calcacm); model->BSIM3v32calcacm = 0; } if (pParam->BSIM3v32noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM3v32noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM3v32noff); } if (pParam->BSIM3v32noff > 4.0) { fprintf(fplog, "Warning: Noff = %g is too large.\n", pParam->BSIM3v32noff); printf("Warning: Noff = %g is too large.\n", pParam->BSIM3v32noff); } if (pParam->BSIM3v32voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM3v32voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM3v32voffcv); } if (pParam->BSIM3v32voffcv > 0.5) { fprintf(fplog, "Warning: Voffcv = %g is too large.\n", pParam->BSIM3v32voffcv); printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM3v32voffcv); } if (model->BSIM3v32ijth < 0.0) { fprintf(fplog, "Fatal: Ijth = %g cannot be negative.\n", model->BSIM3v32ijth); printf("Fatal: Ijth = %g cannot be negative.\n", model->BSIM3v32ijth); Fatal_Flag = 1; } /* Check capacitance parameters */ if (pParam->BSIM3v32clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3v32clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3v32clc); Fatal_Flag = 1; } if (pParam->BSIM3v32moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM3v32moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM3v32moin); } if (pParam->BSIM3v32moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM3v32moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM3v32moin); } if(model->BSIM3v32capMod ==3) { if (pParam->BSIM3v32acde < 0.4) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM3v32acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM3v32acde); } if (pParam->BSIM3v32acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM3v32acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM3v32acde); } } if (model->BSIM3v32paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM3v32leff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->BSIM3v32leff); printf("Warning: Leff = %g may be too small.\n", pParam->BSIM3v32leff); } if (pParam->BSIM3v32leffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3v32leffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3v32leffCV); } if (pParam->BSIM3v32weff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->BSIM3v32weff); printf("Warning: Weff = %g may be too small.\n", pParam->BSIM3v32weff); } if (pParam->BSIM3v32weffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3v32weffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3v32weffCV); } /* Check threshold voltage parameters */ if (pParam->BSIM3v32nlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3v32nlx); printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3v32nlx); } if (model->BSIM3v32tox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->BSIM3v32tox); printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3v32tox); } if (pParam->BSIM3v32npeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->BSIM3v32npeak); printf("Warning: Nch = %g may be too small.\n", pParam->BSIM3v32npeak); } else if (pParam->BSIM3v32npeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->BSIM3v32npeak); printf("Warning: Nch = %g may be too large.\n", pParam->BSIM3v32npeak); } if (pParam->BSIM3v32nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM3v32nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM3v32nsub); } else if (pParam->BSIM3v32nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM3v32nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM3v32nsub); } if ((pParam->BSIM3v32ngate > 0.0) && (pParam->BSIM3v32ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3v32ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3v32ngate); } if (pParam->BSIM3v32dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM3v32dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3v32dvt0); } if (fabs(1.0e-6 / (pParam->BSIM3v32w0 + pParam->BSIM3v32weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM3v32nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM3v32nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3v32nfactor); } if (pParam->BSIM3v32cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM3v32cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3v32cdsc); } if (pParam->BSIM3v32cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM3v32cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3v32cdscd); } /* Check DIBL parameters */ if (pParam->BSIM3v32eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->BSIM3v32eta0); printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3v32eta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->BSIM3v32b1 + pParam->BSIM3v32weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM3v32a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3v32a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3v32a2); pParam->BSIM3v32a2 = 0.01; } else if (pParam->BSIM3v32a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3v32a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3v32a2); pParam->BSIM3v32a2 = 1.0; pParam->BSIM3v32a1 = 0.0; } if (pParam->BSIM3v32rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3v32rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3v32rdsw); pParam->BSIM3v32rdsw = 0.0; pParam->BSIM3v32rds0 = 0.0; } else if ((pParam->BSIM3v32rds0 > 0.0) && (pParam->BSIM3v32rds0 < 0.001)) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3v32rds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3v32rds0); pParam->BSIM3v32rds0 = 0.0; } if (pParam->BSIM3v32vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3v32vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3v32vsattemp); } if (pParam->BSIM3v32pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3v32pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3v32pdibl1); } if (pParam->BSIM3v32pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3v32pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3v32pdibl2); } /* Check overlap capacitance parameters */ if (model->BSIM3v32cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3v32cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3v32cgdo); model->BSIM3v32cgdo = 0.0; } if (model->BSIM3v32cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3v32cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3v32cgso); model->BSIM3v32cgso = 0.0; } if (model->BSIM3v32cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3v32cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3v32cgbo); model->BSIM3v32cgbo = 0.0; } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32mask.c0000644000265600020320000013023512264261473021467 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3mask.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32mAsk (CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM3v32model *model = (BSIM3v32model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM3v32_MOD_MOBMOD: value->iValue = model->BSIM3v32mobMod; return(OK); case BSIM3v32_MOD_PARAMCHK: value->iValue = model->BSIM3v32paramChk; return(OK); case BSIM3v32_MOD_BINUNIT: value->iValue = model->BSIM3v32binUnit; return(OK); case BSIM3v32_MOD_CAPMOD: value->iValue = model->BSIM3v32capMod; return(OK); case BSIM3v32_MOD_NOIMOD: value->iValue = model->BSIM3v32noiMod; return(OK); case BSIM3v32_MOD_NQSMOD: value->iValue = model->BSIM3v32nqsMod; return(OK); case BSIM3v32_MOD_ACMMOD: value->iValue = model->BSIM3v32acmMod; return(OK); case BSIM3v32_MOD_CALCACM: value->iValue = model->BSIM3v32calcacm; return(OK); case BSIM3v32_MOD_VERSION : value->sValue = model->BSIM3v32version; return(OK); case BSIM3v32_MOD_TOX : value->rValue = model->BSIM3v32tox; return(OK); case BSIM3v32_MOD_TOXM : value->rValue = model->BSIM3v32toxm; return(OK); case BSIM3v32_MOD_CDSC : value->rValue = model->BSIM3v32cdsc; return(OK); case BSIM3v32_MOD_CDSCB : value->rValue = model->BSIM3v32cdscb; return(OK); case BSIM3v32_MOD_CDSCD : value->rValue = model->BSIM3v32cdscd; return(OK); case BSIM3v32_MOD_CIT : value->rValue = model->BSIM3v32cit; return(OK); case BSIM3v32_MOD_NFACTOR : value->rValue = model->BSIM3v32nfactor; return(OK); case BSIM3v32_MOD_XJ: value->rValue = model->BSIM3v32xj; return(OK); case BSIM3v32_MOD_VSAT: value->rValue = model->BSIM3v32vsat; return(OK); case BSIM3v32_MOD_AT: value->rValue = model->BSIM3v32at; return(OK); case BSIM3v32_MOD_A0: value->rValue = model->BSIM3v32a0; return(OK); case BSIM3v32_MOD_AGS: value->rValue = model->BSIM3v32ags; return(OK); case BSIM3v32_MOD_A1: value->rValue = model->BSIM3v32a1; return(OK); case BSIM3v32_MOD_A2: value->rValue = model->BSIM3v32a2; return(OK); case BSIM3v32_MOD_KETA: value->rValue = model->BSIM3v32keta; return(OK); case BSIM3v32_MOD_NSUB: value->rValue = model->BSIM3v32nsub; return(OK); case BSIM3v32_MOD_NPEAK: value->rValue = model->BSIM3v32npeak; return(OK); case BSIM3v32_MOD_NGATE: value->rValue = model->BSIM3v32ngate; return(OK); case BSIM3v32_MOD_GAMMA1: value->rValue = model->BSIM3v32gamma1; return(OK); case BSIM3v32_MOD_GAMMA2: value->rValue = model->BSIM3v32gamma2; return(OK); case BSIM3v32_MOD_VBX: value->rValue = model->BSIM3v32vbx; return(OK); case BSIM3v32_MOD_VBM: value->rValue = model->BSIM3v32vbm; return(OK); case BSIM3v32_MOD_XT: value->rValue = model->BSIM3v32xt; return(OK); case BSIM3v32_MOD_K1: value->rValue = model->BSIM3v32k1; return(OK); case BSIM3v32_MOD_KT1: value->rValue = model->BSIM3v32kt1; return(OK); case BSIM3v32_MOD_KT1L: value->rValue = model->BSIM3v32kt1l; return(OK); case BSIM3v32_MOD_KT2 : value->rValue = model->BSIM3v32kt2; return(OK); case BSIM3v32_MOD_K2 : value->rValue = model->BSIM3v32k2; return(OK); case BSIM3v32_MOD_K3: value->rValue = model->BSIM3v32k3; return(OK); case BSIM3v32_MOD_K3B: value->rValue = model->BSIM3v32k3b; return(OK); case BSIM3v32_MOD_W0: value->rValue = model->BSIM3v32w0; return(OK); case BSIM3v32_MOD_NLX: value->rValue = model->BSIM3v32nlx; return(OK); case BSIM3v32_MOD_DVT0 : value->rValue = model->BSIM3v32dvt0; return(OK); case BSIM3v32_MOD_DVT1 : value->rValue = model->BSIM3v32dvt1; return(OK); case BSIM3v32_MOD_DVT2 : value->rValue = model->BSIM3v32dvt2; return(OK); case BSIM3v32_MOD_DVT0W : value->rValue = model->BSIM3v32dvt0w; return(OK); case BSIM3v32_MOD_DVT1W : value->rValue = model->BSIM3v32dvt1w; return(OK); case BSIM3v32_MOD_DVT2W : value->rValue = model->BSIM3v32dvt2w; return(OK); case BSIM3v32_MOD_DROUT : value->rValue = model->BSIM3v32drout; return(OK); case BSIM3v32_MOD_DSUB : value->rValue = model->BSIM3v32dsub; return(OK); case BSIM3v32_MOD_VTH0: value->rValue = model->BSIM3v32vth0; return(OK); case BSIM3v32_MOD_UA: value->rValue = model->BSIM3v32ua; return(OK); case BSIM3v32_MOD_UA1: value->rValue = model->BSIM3v32ua1; return(OK); case BSIM3v32_MOD_UB: value->rValue = model->BSIM3v32ub; return(OK); case BSIM3v32_MOD_UB1: value->rValue = model->BSIM3v32ub1; return(OK); case BSIM3v32_MOD_UC: value->rValue = model->BSIM3v32uc; return(OK); case BSIM3v32_MOD_UC1: value->rValue = model->BSIM3v32uc1; return(OK); case BSIM3v32_MOD_U0: value->rValue = model->BSIM3v32u0; return(OK); case BSIM3v32_MOD_UTE: value->rValue = model->BSIM3v32ute; return(OK); case BSIM3v32_MOD_VOFF: value->rValue = model->BSIM3v32voff; return(OK); case BSIM3v32_MOD_DELTA: value->rValue = model->BSIM3v32delta; return(OK); case BSIM3v32_MOD_RDSW: value->rValue = model->BSIM3v32rdsw; return(OK); case BSIM3v32_MOD_PRWG: value->rValue = model->BSIM3v32prwg; return(OK); case BSIM3v32_MOD_PRWB: value->rValue = model->BSIM3v32prwb; return(OK); case BSIM3v32_MOD_PRT: value->rValue = model->BSIM3v32prt; return(OK); case BSIM3v32_MOD_ETA0: value->rValue = model->BSIM3v32eta0; return(OK); case BSIM3v32_MOD_ETAB: value->rValue = model->BSIM3v32etab; return(OK); case BSIM3v32_MOD_PCLM: value->rValue = model->BSIM3v32pclm; return(OK); case BSIM3v32_MOD_PDIBL1: value->rValue = model->BSIM3v32pdibl1; return(OK); case BSIM3v32_MOD_PDIBL2: value->rValue = model->BSIM3v32pdibl2; return(OK); case BSIM3v32_MOD_PDIBLB: value->rValue = model->BSIM3v32pdiblb; return(OK); case BSIM3v32_MOD_PSCBE1: value->rValue = model->BSIM3v32pscbe1; return(OK); case BSIM3v32_MOD_PSCBE2: value->rValue = model->BSIM3v32pscbe2; return(OK); case BSIM3v32_MOD_PVAG: value->rValue = model->BSIM3v32pvag; return(OK); case BSIM3v32_MOD_WR: value->rValue = model->BSIM3v32wr; return(OK); case BSIM3v32_MOD_DWG: value->rValue = model->BSIM3v32dwg; return(OK); case BSIM3v32_MOD_DWB: value->rValue = model->BSIM3v32dwb; return(OK); case BSIM3v32_MOD_B0: value->rValue = model->BSIM3v32b0; return(OK); case BSIM3v32_MOD_B1: value->rValue = model->BSIM3v32b1; return(OK); case BSIM3v32_MOD_ALPHA0: value->rValue = model->BSIM3v32alpha0; return(OK); case BSIM3v32_MOD_ALPHA1: value->rValue = model->BSIM3v32alpha1; return(OK); case BSIM3v32_MOD_BETA0: value->rValue = model->BSIM3v32beta0; return(OK); case BSIM3v32_MOD_IJTH: value->rValue = model->BSIM3v32ijth; return(OK); case BSIM3v32_MOD_VFB: value->rValue = model->BSIM3v32vfb; return(OK); case BSIM3v32_MOD_ELM: value->rValue = model->BSIM3v32elm; return(OK); case BSIM3v32_MOD_CGSL: value->rValue = model->BSIM3v32cgsl; return(OK); case BSIM3v32_MOD_CGDL: value->rValue = model->BSIM3v32cgdl; return(OK); case BSIM3v32_MOD_CKAPPA: value->rValue = model->BSIM3v32ckappa; return(OK); case BSIM3v32_MOD_CF: value->rValue = model->BSIM3v32cf; return(OK); case BSIM3v32_MOD_CLC: value->rValue = model->BSIM3v32clc; return(OK); case BSIM3v32_MOD_CLE: value->rValue = model->BSIM3v32cle; return(OK); case BSIM3v32_MOD_DWC: value->rValue = model->BSIM3v32dwc; return(OK); case BSIM3v32_MOD_DLC: value->rValue = model->BSIM3v32dlc; return(OK); case BSIM3v32_MOD_VFBCV: value->rValue = model->BSIM3v32vfbcv; return(OK); case BSIM3v32_MOD_ACDE: value->rValue = model->BSIM3v32acde; return(OK); case BSIM3v32_MOD_MOIN: value->rValue = model->BSIM3v32moin; return(OK); case BSIM3v32_MOD_NOFF: value->rValue = model->BSIM3v32noff; return(OK); case BSIM3v32_MOD_VOFFCV: value->rValue = model->BSIM3v32voffcv; return(OK); case BSIM3v32_MOD_TCJ: value->rValue = model->BSIM3v32tcj; return(OK); case BSIM3v32_MOD_TPB: value->rValue = model->BSIM3v32tpb; return(OK); case BSIM3v32_MOD_TCJSW: value->rValue = model->BSIM3v32tcjsw; return(OK); case BSIM3v32_MOD_TPBSW: value->rValue = model->BSIM3v32tpbsw; return(OK); case BSIM3v32_MOD_TCJSWG: value->rValue = model->BSIM3v32tcjswg; return(OK); case BSIM3v32_MOD_TPBSWG: value->rValue = model->BSIM3v32tpbswg; return(OK); /* ACM model */ case BSIM3v32_MOD_HDIF: value->rValue = model->BSIM3v32hdif; return(OK); case BSIM3v32_MOD_LDIF: value->rValue = model->BSIM3v32ldif; return(OK); case BSIM3v32_MOD_LD: value->rValue = model->BSIM3v32ld; return(OK); case BSIM3v32_MOD_RD: value->rValue = model->BSIM3v32rd; return(OK); case BSIM3v32_MOD_RS: value->rValue = model->BSIM3v32rs; return(OK); case BSIM3v32_MOD_RDC: value->rValue = model->BSIM3v32rdc; return(OK); case BSIM3v32_MOD_RSC: value->rValue = model->BSIM3v32rsc; return(OK); case BSIM3v32_MOD_WMLT: value->rValue = model->BSIM3v32wmlt; return(OK); /* Length dependence */ case BSIM3v32_MOD_LCDSC : value->rValue = model->BSIM3v32lcdsc; return(OK); case BSIM3v32_MOD_LCDSCB : value->rValue = model->BSIM3v32lcdscb; return(OK); case BSIM3v32_MOD_LCDSCD : value->rValue = model->BSIM3v32lcdscd; return(OK); case BSIM3v32_MOD_LCIT : value->rValue = model->BSIM3v32lcit; return(OK); case BSIM3v32_MOD_LNFACTOR : value->rValue = model->BSIM3v32lnfactor; return(OK); case BSIM3v32_MOD_LXJ: value->rValue = model->BSIM3v32lxj; return(OK); case BSIM3v32_MOD_LVSAT: value->rValue = model->BSIM3v32lvsat; return(OK); case BSIM3v32_MOD_LAT: value->rValue = model->BSIM3v32lat; return(OK); case BSIM3v32_MOD_LA0: value->rValue = model->BSIM3v32la0; return(OK); case BSIM3v32_MOD_LAGS: value->rValue = model->BSIM3v32lags; return(OK); case BSIM3v32_MOD_LA1: value->rValue = model->BSIM3v32la1; return(OK); case BSIM3v32_MOD_LA2: value->rValue = model->BSIM3v32la2; return(OK); case BSIM3v32_MOD_LKETA: value->rValue = model->BSIM3v32lketa; return(OK); case BSIM3v32_MOD_LNSUB: value->rValue = model->BSIM3v32lnsub; return(OK); case BSIM3v32_MOD_LNPEAK: value->rValue = model->BSIM3v32lnpeak; return(OK); case BSIM3v32_MOD_LNGATE: value->rValue = model->BSIM3v32lngate; return(OK); case BSIM3v32_MOD_LGAMMA1: value->rValue = model->BSIM3v32lgamma1; return(OK); case BSIM3v32_MOD_LGAMMA2: value->rValue = model->BSIM3v32lgamma2; return(OK); case BSIM3v32_MOD_LVBX: value->rValue = model->BSIM3v32lvbx; return(OK); case BSIM3v32_MOD_LVBM: value->rValue = model->BSIM3v32lvbm; return(OK); case BSIM3v32_MOD_LXT: value->rValue = model->BSIM3v32lxt; return(OK); case BSIM3v32_MOD_LK1: value->rValue = model->BSIM3v32lk1; return(OK); case BSIM3v32_MOD_LKT1: value->rValue = model->BSIM3v32lkt1; return(OK); case BSIM3v32_MOD_LKT1L: value->rValue = model->BSIM3v32lkt1l; return(OK); case BSIM3v32_MOD_LKT2 : value->rValue = model->BSIM3v32lkt2; return(OK); case BSIM3v32_MOD_LK2 : value->rValue = model->BSIM3v32lk2; return(OK); case BSIM3v32_MOD_LK3: value->rValue = model->BSIM3v32lk3; return(OK); case BSIM3v32_MOD_LK3B: value->rValue = model->BSIM3v32lk3b; return(OK); case BSIM3v32_MOD_LW0: value->rValue = model->BSIM3v32lw0; return(OK); case BSIM3v32_MOD_LNLX: value->rValue = model->BSIM3v32lnlx; return(OK); case BSIM3v32_MOD_LDVT0: value->rValue = model->BSIM3v32ldvt0; return(OK); case BSIM3v32_MOD_LDVT1 : value->rValue = model->BSIM3v32ldvt1; return(OK); case BSIM3v32_MOD_LDVT2 : value->rValue = model->BSIM3v32ldvt2; return(OK); case BSIM3v32_MOD_LDVT0W : value->rValue = model->BSIM3v32ldvt0w; return(OK); case BSIM3v32_MOD_LDVT1W : value->rValue = model->BSIM3v32ldvt1w; return(OK); case BSIM3v32_MOD_LDVT2W : value->rValue = model->BSIM3v32ldvt2w; return(OK); case BSIM3v32_MOD_LDROUT : value->rValue = model->BSIM3v32ldrout; return(OK); case BSIM3v32_MOD_LDSUB : value->rValue = model->BSIM3v32ldsub; return(OK); case BSIM3v32_MOD_LVTH0: value->rValue = model->BSIM3v32lvth0; return(OK); case BSIM3v32_MOD_LUA: value->rValue = model->BSIM3v32lua; return(OK); case BSIM3v32_MOD_LUA1: value->rValue = model->BSIM3v32lua1; return(OK); case BSIM3v32_MOD_LUB: value->rValue = model->BSIM3v32lub; return(OK); case BSIM3v32_MOD_LUB1: value->rValue = model->BSIM3v32lub1; return(OK); case BSIM3v32_MOD_LUC: value->rValue = model->BSIM3v32luc; return(OK); case BSIM3v32_MOD_LUC1: value->rValue = model->BSIM3v32luc1; return(OK); case BSIM3v32_MOD_LU0: value->rValue = model->BSIM3v32lu0; return(OK); case BSIM3v32_MOD_LUTE: value->rValue = model->BSIM3v32lute; return(OK); case BSIM3v32_MOD_LVOFF: value->rValue = model->BSIM3v32lvoff; return(OK); case BSIM3v32_MOD_LDELTA: value->rValue = model->BSIM3v32ldelta; return(OK); case BSIM3v32_MOD_LRDSW: value->rValue = model->BSIM3v32lrdsw; return(OK); case BSIM3v32_MOD_LPRWB: value->rValue = model->BSIM3v32lprwb; return(OK); case BSIM3v32_MOD_LPRWG: value->rValue = model->BSIM3v32lprwg; return(OK); case BSIM3v32_MOD_LPRT: value->rValue = model->BSIM3v32lprt; return(OK); case BSIM3v32_MOD_LETA0: value->rValue = model->BSIM3v32leta0; return(OK); case BSIM3v32_MOD_LETAB: value->rValue = model->BSIM3v32letab; return(OK); case BSIM3v32_MOD_LPCLM: value->rValue = model->BSIM3v32lpclm; return(OK); case BSIM3v32_MOD_LPDIBL1: value->rValue = model->BSIM3v32lpdibl1; return(OK); case BSIM3v32_MOD_LPDIBL2: value->rValue = model->BSIM3v32lpdibl2; return(OK); case BSIM3v32_MOD_LPDIBLB: value->rValue = model->BSIM3v32lpdiblb; return(OK); case BSIM3v32_MOD_LPSCBE1: value->rValue = model->BSIM3v32lpscbe1; return(OK); case BSIM3v32_MOD_LPSCBE2: value->rValue = model->BSIM3v32lpscbe2; return(OK); case BSIM3v32_MOD_LPVAG: value->rValue = model->BSIM3v32lpvag; return(OK); case BSIM3v32_MOD_LWR: value->rValue = model->BSIM3v32lwr; return(OK); case BSIM3v32_MOD_LDWG: value->rValue = model->BSIM3v32ldwg; return(OK); case BSIM3v32_MOD_LDWB: value->rValue = model->BSIM3v32ldwb; return(OK); case BSIM3v32_MOD_LB0: value->rValue = model->BSIM3v32lb0; return(OK); case BSIM3v32_MOD_LB1: value->rValue = model->BSIM3v32lb1; return(OK); case BSIM3v32_MOD_LALPHA0: value->rValue = model->BSIM3v32lalpha0; return(OK); case BSIM3v32_MOD_LALPHA1: value->rValue = model->BSIM3v32lalpha1; return(OK); case BSIM3v32_MOD_LBETA0: value->rValue = model->BSIM3v32lbeta0; return(OK); case BSIM3v32_MOD_LVFB: value->rValue = model->BSIM3v32lvfb; return(OK); case BSIM3v32_MOD_LELM: value->rValue = model->BSIM3v32lelm; return(OK); case BSIM3v32_MOD_LCGSL: value->rValue = model->BSIM3v32lcgsl; return(OK); case BSIM3v32_MOD_LCGDL: value->rValue = model->BSIM3v32lcgdl; return(OK); case BSIM3v32_MOD_LCKAPPA: value->rValue = model->BSIM3v32lckappa; return(OK); case BSIM3v32_MOD_LCF: value->rValue = model->BSIM3v32lcf; return(OK); case BSIM3v32_MOD_LCLC: value->rValue = model->BSIM3v32lclc; return(OK); case BSIM3v32_MOD_LCLE: value->rValue = model->BSIM3v32lcle; return(OK); case BSIM3v32_MOD_LVFBCV: value->rValue = model->BSIM3v32lvfbcv; return(OK); case BSIM3v32_MOD_LACDE: value->rValue = model->BSIM3v32lacde; return(OK); case BSIM3v32_MOD_LMOIN: value->rValue = model->BSIM3v32lmoin; return(OK); case BSIM3v32_MOD_LNOFF: value->rValue = model->BSIM3v32lnoff; return(OK); case BSIM3v32_MOD_LVOFFCV: value->rValue = model->BSIM3v32lvoffcv; return(OK); /* Width dependence */ case BSIM3v32_MOD_WCDSC : value->rValue = model->BSIM3v32wcdsc; return(OK); case BSIM3v32_MOD_WCDSCB : value->rValue = model->BSIM3v32wcdscb; return(OK); case BSIM3v32_MOD_WCDSCD : value->rValue = model->BSIM3v32wcdscd; return(OK); case BSIM3v32_MOD_WCIT : value->rValue = model->BSIM3v32wcit; return(OK); case BSIM3v32_MOD_WNFACTOR : value->rValue = model->BSIM3v32wnfactor; return(OK); case BSIM3v32_MOD_WXJ: value->rValue = model->BSIM3v32wxj; return(OK); case BSIM3v32_MOD_WVSAT: value->rValue = model->BSIM3v32wvsat; return(OK); case BSIM3v32_MOD_WAT: value->rValue = model->BSIM3v32wat; return(OK); case BSIM3v32_MOD_WA0: value->rValue = model->BSIM3v32wa0; return(OK); case BSIM3v32_MOD_WAGS: value->rValue = model->BSIM3v32wags; return(OK); case BSIM3v32_MOD_WA1: value->rValue = model->BSIM3v32wa1; return(OK); case BSIM3v32_MOD_WA2: value->rValue = model->BSIM3v32wa2; return(OK); case BSIM3v32_MOD_WKETA: value->rValue = model->BSIM3v32wketa; return(OK); case BSIM3v32_MOD_WNSUB: value->rValue = model->BSIM3v32wnsub; return(OK); case BSIM3v32_MOD_WNPEAK: value->rValue = model->BSIM3v32wnpeak; return(OK); case BSIM3v32_MOD_WNGATE: value->rValue = model->BSIM3v32wngate; return(OK); case BSIM3v32_MOD_WGAMMA1: value->rValue = model->BSIM3v32wgamma1; return(OK); case BSIM3v32_MOD_WGAMMA2: value->rValue = model->BSIM3v32wgamma2; return(OK); case BSIM3v32_MOD_WVBX: value->rValue = model->BSIM3v32wvbx; return(OK); case BSIM3v32_MOD_WVBM: value->rValue = model->BSIM3v32wvbm; return(OK); case BSIM3v32_MOD_WXT: value->rValue = model->BSIM3v32wxt; return(OK); case BSIM3v32_MOD_WK1: value->rValue = model->BSIM3v32wk1; return(OK); case BSIM3v32_MOD_WKT1: value->rValue = model->BSIM3v32wkt1; return(OK); case BSIM3v32_MOD_WKT1L: value->rValue = model->BSIM3v32wkt1l; return(OK); case BSIM3v32_MOD_WKT2 : value->rValue = model->BSIM3v32wkt2; return(OK); case BSIM3v32_MOD_WK2 : value->rValue = model->BSIM3v32wk2; return(OK); case BSIM3v32_MOD_WK3: value->rValue = model->BSIM3v32wk3; return(OK); case BSIM3v32_MOD_WK3B: value->rValue = model->BSIM3v32wk3b; return(OK); case BSIM3v32_MOD_WW0: value->rValue = model->BSIM3v32ww0; return(OK); case BSIM3v32_MOD_WNLX: value->rValue = model->BSIM3v32wnlx; return(OK); case BSIM3v32_MOD_WDVT0: value->rValue = model->BSIM3v32wdvt0; return(OK); case BSIM3v32_MOD_WDVT1 : value->rValue = model->BSIM3v32wdvt1; return(OK); case BSIM3v32_MOD_WDVT2 : value->rValue = model->BSIM3v32wdvt2; return(OK); case BSIM3v32_MOD_WDVT0W : value->rValue = model->BSIM3v32wdvt0w; return(OK); case BSIM3v32_MOD_WDVT1W : value->rValue = model->BSIM3v32wdvt1w; return(OK); case BSIM3v32_MOD_WDVT2W : value->rValue = model->BSIM3v32wdvt2w; return(OK); case BSIM3v32_MOD_WDROUT : value->rValue = model->BSIM3v32wdrout; return(OK); case BSIM3v32_MOD_WDSUB : value->rValue = model->BSIM3v32wdsub; return(OK); case BSIM3v32_MOD_WVTH0: value->rValue = model->BSIM3v32wvth0; return(OK); case BSIM3v32_MOD_WUA: value->rValue = model->BSIM3v32wua; return(OK); case BSIM3v32_MOD_WUA1: value->rValue = model->BSIM3v32wua1; return(OK); case BSIM3v32_MOD_WUB: value->rValue = model->BSIM3v32wub; return(OK); case BSIM3v32_MOD_WUB1: value->rValue = model->BSIM3v32wub1; return(OK); case BSIM3v32_MOD_WUC: value->rValue = model->BSIM3v32wuc; return(OK); case BSIM3v32_MOD_WUC1: value->rValue = model->BSIM3v32wuc1; return(OK); case BSIM3v32_MOD_WU0: value->rValue = model->BSIM3v32wu0; return(OK); case BSIM3v32_MOD_WUTE: value->rValue = model->BSIM3v32wute; return(OK); case BSIM3v32_MOD_WVOFF: value->rValue = model->BSIM3v32wvoff; return(OK); case BSIM3v32_MOD_WDELTA: value->rValue = model->BSIM3v32wdelta; return(OK); case BSIM3v32_MOD_WRDSW: value->rValue = model->BSIM3v32wrdsw; return(OK); case BSIM3v32_MOD_WPRWB: value->rValue = model->BSIM3v32wprwb; return(OK); case BSIM3v32_MOD_WPRWG: value->rValue = model->BSIM3v32wprwg; return(OK); case BSIM3v32_MOD_WPRT: value->rValue = model->BSIM3v32wprt; return(OK); case BSIM3v32_MOD_WETA0: value->rValue = model->BSIM3v32weta0; return(OK); case BSIM3v32_MOD_WETAB: value->rValue = model->BSIM3v32wetab; return(OK); case BSIM3v32_MOD_WPCLM: value->rValue = model->BSIM3v32wpclm; return(OK); case BSIM3v32_MOD_WPDIBL1: value->rValue = model->BSIM3v32wpdibl1; return(OK); case BSIM3v32_MOD_WPDIBL2: value->rValue = model->BSIM3v32wpdibl2; return(OK); case BSIM3v32_MOD_WPDIBLB: value->rValue = model->BSIM3v32wpdiblb; return(OK); case BSIM3v32_MOD_WPSCBE1: value->rValue = model->BSIM3v32wpscbe1; return(OK); case BSIM3v32_MOD_WPSCBE2: value->rValue = model->BSIM3v32wpscbe2; return(OK); case BSIM3v32_MOD_WPVAG: value->rValue = model->BSIM3v32wpvag; return(OK); case BSIM3v32_MOD_WWR: value->rValue = model->BSIM3v32wwr; return(OK); case BSIM3v32_MOD_WDWG: value->rValue = model->BSIM3v32wdwg; return(OK); case BSIM3v32_MOD_WDWB: value->rValue = model->BSIM3v32wdwb; return(OK); case BSIM3v32_MOD_WB0: value->rValue = model->BSIM3v32wb0; return(OK); case BSIM3v32_MOD_WB1: value->rValue = model->BSIM3v32wb1; return(OK); case BSIM3v32_MOD_WALPHA0: value->rValue = model->BSIM3v32walpha0; return(OK); case BSIM3v32_MOD_WALPHA1: value->rValue = model->BSIM3v32walpha1; return(OK); case BSIM3v32_MOD_WBETA0: value->rValue = model->BSIM3v32wbeta0; return(OK); case BSIM3v32_MOD_WVFB: value->rValue = model->BSIM3v32wvfb; return(OK); case BSIM3v32_MOD_WELM: value->rValue = model->BSIM3v32welm; return(OK); case BSIM3v32_MOD_WCGSL: value->rValue = model->BSIM3v32wcgsl; return(OK); case BSIM3v32_MOD_WCGDL: value->rValue = model->BSIM3v32wcgdl; return(OK); case BSIM3v32_MOD_WCKAPPA: value->rValue = model->BSIM3v32wckappa; return(OK); case BSIM3v32_MOD_WCF: value->rValue = model->BSIM3v32wcf; return(OK); case BSIM3v32_MOD_WCLC: value->rValue = model->BSIM3v32wclc; return(OK); case BSIM3v32_MOD_WCLE: value->rValue = model->BSIM3v32wcle; return(OK); case BSIM3v32_MOD_WVFBCV: value->rValue = model->BSIM3v32wvfbcv; return(OK); case BSIM3v32_MOD_WACDE: value->rValue = model->BSIM3v32wacde; return(OK); case BSIM3v32_MOD_WMOIN: value->rValue = model->BSIM3v32wmoin; return(OK); case BSIM3v32_MOD_WNOFF: value->rValue = model->BSIM3v32wnoff; return(OK); case BSIM3v32_MOD_WVOFFCV: value->rValue = model->BSIM3v32wvoffcv; return(OK); /* Cross-term dependence */ case BSIM3v32_MOD_PCDSC : value->rValue = model->BSIM3v32pcdsc; return(OK); case BSIM3v32_MOD_PCDSCB : value->rValue = model->BSIM3v32pcdscb; return(OK); case BSIM3v32_MOD_PCDSCD : value->rValue = model->BSIM3v32pcdscd; return(OK); case BSIM3v32_MOD_PCIT : value->rValue = model->BSIM3v32pcit; return(OK); case BSIM3v32_MOD_PNFACTOR : value->rValue = model->BSIM3v32pnfactor; return(OK); case BSIM3v32_MOD_PXJ: value->rValue = model->BSIM3v32pxj; return(OK); case BSIM3v32_MOD_PVSAT: value->rValue = model->BSIM3v32pvsat; return(OK); case BSIM3v32_MOD_PAT: value->rValue = model->BSIM3v32pat; return(OK); case BSIM3v32_MOD_PA0: value->rValue = model->BSIM3v32pa0; return(OK); case BSIM3v32_MOD_PAGS: value->rValue = model->BSIM3v32pags; return(OK); case BSIM3v32_MOD_PA1: value->rValue = model->BSIM3v32pa1; return(OK); case BSIM3v32_MOD_PA2: value->rValue = model->BSIM3v32pa2; return(OK); case BSIM3v32_MOD_PKETA: value->rValue = model->BSIM3v32pketa; return(OK); case BSIM3v32_MOD_PNSUB: value->rValue = model->BSIM3v32pnsub; return(OK); case BSIM3v32_MOD_PNPEAK: value->rValue = model->BSIM3v32pnpeak; return(OK); case BSIM3v32_MOD_PNGATE: value->rValue = model->BSIM3v32pngate; return(OK); case BSIM3v32_MOD_PGAMMA1: value->rValue = model->BSIM3v32pgamma1; return(OK); case BSIM3v32_MOD_PGAMMA2: value->rValue = model->BSIM3v32pgamma2; return(OK); case BSIM3v32_MOD_PVBX: value->rValue = model->BSIM3v32pvbx; return(OK); case BSIM3v32_MOD_PVBM: value->rValue = model->BSIM3v32pvbm; return(OK); case BSIM3v32_MOD_PXT: value->rValue = model->BSIM3v32pxt; return(OK); case BSIM3v32_MOD_PK1: value->rValue = model->BSIM3v32pk1; return(OK); case BSIM3v32_MOD_PKT1: value->rValue = model->BSIM3v32pkt1; return(OK); case BSIM3v32_MOD_PKT1L: value->rValue = model->BSIM3v32pkt1l; return(OK); case BSIM3v32_MOD_PKT2 : value->rValue = model->BSIM3v32pkt2; return(OK); case BSIM3v32_MOD_PK2 : value->rValue = model->BSIM3v32pk2; return(OK); case BSIM3v32_MOD_PK3: value->rValue = model->BSIM3v32pk3; return(OK); case BSIM3v32_MOD_PK3B: value->rValue = model->BSIM3v32pk3b; return(OK); case BSIM3v32_MOD_PW0: value->rValue = model->BSIM3v32pw0; return(OK); case BSIM3v32_MOD_PNLX: value->rValue = model->BSIM3v32pnlx; return(OK); case BSIM3v32_MOD_PDVT0 : value->rValue = model->BSIM3v32pdvt0; return(OK); case BSIM3v32_MOD_PDVT1 : value->rValue = model->BSIM3v32pdvt1; return(OK); case BSIM3v32_MOD_PDVT2 : value->rValue = model->BSIM3v32pdvt2; return(OK); case BSIM3v32_MOD_PDVT0W : value->rValue = model->BSIM3v32pdvt0w; return(OK); case BSIM3v32_MOD_PDVT1W : value->rValue = model->BSIM3v32pdvt1w; return(OK); case BSIM3v32_MOD_PDVT2W : value->rValue = model->BSIM3v32pdvt2w; return(OK); case BSIM3v32_MOD_PDROUT : value->rValue = model->BSIM3v32pdrout; return(OK); case BSIM3v32_MOD_PDSUB : value->rValue = model->BSIM3v32pdsub; return(OK); case BSIM3v32_MOD_PVTH0: value->rValue = model->BSIM3v32pvth0; return(OK); case BSIM3v32_MOD_PUA: value->rValue = model->BSIM3v32pua; return(OK); case BSIM3v32_MOD_PUA1: value->rValue = model->BSIM3v32pua1; return(OK); case BSIM3v32_MOD_PUB: value->rValue = model->BSIM3v32pub; return(OK); case BSIM3v32_MOD_PUB1: value->rValue = model->BSIM3v32pub1; return(OK); case BSIM3v32_MOD_PUC: value->rValue = model->BSIM3v32puc; return(OK); case BSIM3v32_MOD_PUC1: value->rValue = model->BSIM3v32puc1; return(OK); case BSIM3v32_MOD_PU0: value->rValue = model->BSIM3v32pu0; return(OK); case BSIM3v32_MOD_PUTE: value->rValue = model->BSIM3v32pute; return(OK); case BSIM3v32_MOD_PVOFF: value->rValue = model->BSIM3v32pvoff; return(OK); case BSIM3v32_MOD_PDELTA: value->rValue = model->BSIM3v32pdelta; return(OK); case BSIM3v32_MOD_PRDSW: value->rValue = model->BSIM3v32prdsw; return(OK); case BSIM3v32_MOD_PPRWB: value->rValue = model->BSIM3v32pprwb; return(OK); case BSIM3v32_MOD_PPRWG: value->rValue = model->BSIM3v32pprwg; return(OK); case BSIM3v32_MOD_PPRT: value->rValue = model->BSIM3v32pprt; return(OK); case BSIM3v32_MOD_PETA0: value->rValue = model->BSIM3v32peta0; return(OK); case BSIM3v32_MOD_PETAB: value->rValue = model->BSIM3v32petab; return(OK); case BSIM3v32_MOD_PPCLM: value->rValue = model->BSIM3v32ppclm; return(OK); case BSIM3v32_MOD_PPDIBL1: value->rValue = model->BSIM3v32ppdibl1; return(OK); case BSIM3v32_MOD_PPDIBL2: value->rValue = model->BSIM3v32ppdibl2; return(OK); case BSIM3v32_MOD_PPDIBLB: value->rValue = model->BSIM3v32ppdiblb; return(OK); case BSIM3v32_MOD_PPSCBE1: value->rValue = model->BSIM3v32ppscbe1; return(OK); case BSIM3v32_MOD_PPSCBE2: value->rValue = model->BSIM3v32ppscbe2; return(OK); case BSIM3v32_MOD_PPVAG: value->rValue = model->BSIM3v32ppvag; return(OK); case BSIM3v32_MOD_PWR: value->rValue = model->BSIM3v32pwr; return(OK); case BSIM3v32_MOD_PDWG: value->rValue = model->BSIM3v32pdwg; return(OK); case BSIM3v32_MOD_PDWB: value->rValue = model->BSIM3v32pdwb; return(OK); case BSIM3v32_MOD_PB0: value->rValue = model->BSIM3v32pb0; return(OK); case BSIM3v32_MOD_PB1: value->rValue = model->BSIM3v32pb1; return(OK); case BSIM3v32_MOD_PALPHA0: value->rValue = model->BSIM3v32palpha0; return(OK); case BSIM3v32_MOD_PALPHA1: value->rValue = model->BSIM3v32palpha1; return(OK); case BSIM3v32_MOD_PBETA0: value->rValue = model->BSIM3v32pbeta0; return(OK); case BSIM3v32_MOD_PVFB: value->rValue = model->BSIM3v32pvfb; return(OK); case BSIM3v32_MOD_PELM: value->rValue = model->BSIM3v32pelm; return(OK); case BSIM3v32_MOD_PCGSL: value->rValue = model->BSIM3v32pcgsl; return(OK); case BSIM3v32_MOD_PCGDL: value->rValue = model->BSIM3v32pcgdl; return(OK); case BSIM3v32_MOD_PCKAPPA: value->rValue = model->BSIM3v32pckappa; return(OK); case BSIM3v32_MOD_PCF: value->rValue = model->BSIM3v32pcf; return(OK); case BSIM3v32_MOD_PCLC: value->rValue = model->BSIM3v32pclc; return(OK); case BSIM3v32_MOD_PCLE: value->rValue = model->BSIM3v32pcle; return(OK); case BSIM3v32_MOD_PVFBCV: value->rValue = model->BSIM3v32pvfbcv; return(OK); case BSIM3v32_MOD_PACDE: value->rValue = model->BSIM3v32pacde; return(OK); case BSIM3v32_MOD_PMOIN: value->rValue = model->BSIM3v32pmoin; return(OK); case BSIM3v32_MOD_PNOFF: value->rValue = model->BSIM3v32pnoff; return(OK); case BSIM3v32_MOD_PVOFFCV: value->rValue = model->BSIM3v32pvoffcv; return(OK); case BSIM3v32_MOD_TNOM : value->rValue = model->BSIM3v32tnom; return(OK); case BSIM3v32_MOD_CGSO: value->rValue = model->BSIM3v32cgso; return(OK); case BSIM3v32_MOD_CGDO: value->rValue = model->BSIM3v32cgdo; return(OK); case BSIM3v32_MOD_CGBO: value->rValue = model->BSIM3v32cgbo; return(OK); case BSIM3v32_MOD_XPART: value->rValue = model->BSIM3v32xpart; return(OK); case BSIM3v32_MOD_RSH: value->rValue = model->BSIM3v32sheetResistance; return(OK); case BSIM3v32_MOD_JS: value->rValue = model->BSIM3v32jctSatCurDensity; return(OK); case BSIM3v32_MOD_JSW: value->rValue = model->BSIM3v32jctSidewallSatCurDensity; return(OK); case BSIM3v32_MOD_PB: value->rValue = model->BSIM3v32bulkJctPotential; return(OK); case BSIM3v32_MOD_MJ: value->rValue = model->BSIM3v32bulkJctBotGradingCoeff; return(OK); case BSIM3v32_MOD_PBSW: value->rValue = model->BSIM3v32sidewallJctPotential; return(OK); case BSIM3v32_MOD_MJSW: value->rValue = model->BSIM3v32bulkJctSideGradingCoeff; return(OK); case BSIM3v32_MOD_CJ: value->rValue = model->BSIM3v32unitAreaJctCap; return(OK); case BSIM3v32_MOD_CJSW: value->rValue = model->BSIM3v32unitLengthSidewallJctCap; return(OK); case BSIM3v32_MOD_PBSWG: value->rValue = model->BSIM3v32GatesidewallJctPotential; return(OK); case BSIM3v32_MOD_MJSWG: value->rValue = model->BSIM3v32bulkJctGateSideGradingCoeff; return(OK); case BSIM3v32_MOD_CJSWG: value->rValue = model->BSIM3v32unitLengthGateSidewallJctCap; return(OK); case BSIM3v32_MOD_NJ: value->rValue = model->BSIM3v32jctEmissionCoeff; return(OK); case BSIM3v32_MOD_XTI: value->rValue = model->BSIM3v32jctTempExponent; return(OK); case BSIM3v32_MOD_LINT: value->rValue = model->BSIM3v32Lint; return(OK); case BSIM3v32_MOD_LL: value->rValue = model->BSIM3v32Ll; return(OK); case BSIM3v32_MOD_LLC: value->rValue = model->BSIM3v32Llc; return(OK); case BSIM3v32_MOD_LLN: value->rValue = model->BSIM3v32Lln; return(OK); case BSIM3v32_MOD_LW: value->rValue = model->BSIM3v32Lw; return(OK); case BSIM3v32_MOD_LWC: value->rValue = model->BSIM3v32Lwc; return(OK); case BSIM3v32_MOD_LWN: value->rValue = model->BSIM3v32Lwn; return(OK); case BSIM3v32_MOD_LWL: value->rValue = model->BSIM3v32Lwl; return(OK); case BSIM3v32_MOD_LWLC: value->rValue = model->BSIM3v32Lwlc; return(OK); case BSIM3v32_MOD_LMIN: value->rValue = model->BSIM3v32Lmin; return(OK); case BSIM3v32_MOD_LMAX: value->rValue = model->BSIM3v32Lmax; return(OK); case BSIM3v32_MOD_WINT: value->rValue = model->BSIM3v32Wint; return(OK); case BSIM3v32_MOD_WL: value->rValue = model->BSIM3v32Wl; return(OK); case BSIM3v32_MOD_WLC: value->rValue = model->BSIM3v32Wlc; return(OK); case BSIM3v32_MOD_WLN: value->rValue = model->BSIM3v32Wln; return(OK); case BSIM3v32_MOD_WW: value->rValue = model->BSIM3v32Ww; return(OK); case BSIM3v32_MOD_WWC: value->rValue = model->BSIM3v32Wwc; return(OK); case BSIM3v32_MOD_WWN: value->rValue = model->BSIM3v32Wwn; return(OK); case BSIM3v32_MOD_WWL: value->rValue = model->BSIM3v32Wwl; return(OK); case BSIM3v32_MOD_WWLC: value->rValue = model->BSIM3v32Wwlc; return(OK); case BSIM3v32_MOD_WMIN: value->rValue = model->BSIM3v32Wmin; return(OK); case BSIM3v32_MOD_WMAX: value->rValue = model->BSIM3v32Wmax; return(OK); case BSIM3v32_MOD_XL: value->rValue = model->BSIM3v32xl; return(OK); case BSIM3v32_MOD_XW: value->rValue = model->BSIM3v32xw; return(OK); case BSIM3v32_MOD_NOIA: value->rValue = model->BSIM3v32oxideTrapDensityA; return(OK); case BSIM3v32_MOD_NOIB: value->rValue = model->BSIM3v32oxideTrapDensityB; return(OK); case BSIM3v32_MOD_NOIC: value->rValue = model->BSIM3v32oxideTrapDensityC; return(OK); case BSIM3v32_MOD_EM: value->rValue = model->BSIM3v32em; return(OK); case BSIM3v32_MOD_EF: value->rValue = model->BSIM3v32ef; return(OK); case BSIM3v32_MOD_AF: value->rValue = model->BSIM3v32af; return(OK); case BSIM3v32_MOD_KF: value->rValue = model->BSIM3v32kf; return(OK); case BSIM3v32_MOD_VGS_MAX: value->rValue = model->BSIM3v32vgsMax; return(OK); case BSIM3v32_MOD_VGD_MAX: value->rValue = model->BSIM3v32vgdMax; return(OK); case BSIM3v32_MOD_VGB_MAX: value->rValue = model->BSIM3v32vgbMax; return(OK); case BSIM3v32_MOD_VDS_MAX: value->rValue = model->BSIM3v32vdsMax; return(OK); case BSIM3v32_MOD_VBS_MAX: value->rValue = model->BSIM3v32vbsMax; return(OK); case BSIM3v32_MOD_VBD_MAX: value->rValue = model->BSIM3v32vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v32/b3v32set.c0000644000265600020320000013055112264261473021330 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3set.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int BSIM3v32setup (SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; int error; CKTnode *tmp; CKTnode *tmpNode; IFuid tmpName; /* loop through all the BSIM3v32 device models */ for( ; model != NULL; model = model->BSIM3v32nextModel ) { /* Default value Processing for BSIM3v32 MOSFET Models */ if (!model->BSIM3v32typeGiven) model->BSIM3v32type = NMOS; if (!model->BSIM3v32mobModGiven) model->BSIM3v32mobMod = 1; if (!model->BSIM3v32binUnitGiven) model->BSIM3v32binUnit = 1; if (!model->BSIM3v32paramChkGiven) model->BSIM3v32paramChk = 0; if (!model->BSIM3v32capModGiven) model->BSIM3v32capMod = 3; if (!model->BSIM3v32acmModGiven) model->BSIM3v32acmMod = 0; if (!model->BSIM3v32calcacmGiven) model->BSIM3v32calcacm = 0; if (!model->BSIM3v32noiModGiven) model->BSIM3v32noiMod = 1; if (!model->BSIM3v32nqsModGiven) model->BSIM3v32nqsMod = 0; else if ((model->BSIM3v32nqsMod != 0) && (model->BSIM3v32nqsMod != 1)) { model->BSIM3v32nqsMod = 0; printf("Warning: nqsMod has been set to its default value: 0.\n"); } /* If the user does not provide the model revision, * we always choose the most recent. */ if (!model->BSIM3v32versionGiven) model->BSIM3v32version = copy("3.2.4"); /* I have added below the code that translate model string * into an integer. This trick is meant to speed up the * revision testing instruction, since comparing integer * is faster than comparing strings. * Paolo Nenzi 2002 */ if ((!strcmp(model->BSIM3v32version, "3.2.4"))||(!strcmp(model->BSIM3v32version, "3.24"))) model->BSIM3v32intVersion = BSIM3v32V324; else if ((!strcmp(model->BSIM3v32version, "3.2.3"))||(!strcmp(model->BSIM3v32version, "3.23"))) model->BSIM3v32intVersion = BSIM3v32V323; else if ((!strcmp(model->BSIM3v32version, "3.2.2"))||(!strcmp(model->BSIM3v32version, "3.22"))) model->BSIM3v32intVersion = BSIM3v32V322; else if ((!strcmp(model->BSIM3v32version, "3.2"))||(!strcmp(model->BSIM3v32version, "3.20"))) model->BSIM3v32intVersion = BSIM3v32V32; else model->BSIM3v32intVersion = BSIM3v32V3OLD; /* BSIM3v32V3OLD is a placeholder for pre 3.2 revision * This model should not be used for pre 3.2 models. */ if (!model->BSIM3v32toxGiven) model->BSIM3v32tox = 150.0e-10; model->BSIM3v32cox = 3.453133e-11 / model->BSIM3v32tox; if (!model->BSIM3v32toxmGiven) model->BSIM3v32toxm = model->BSIM3v32tox; if (!model->BSIM3v32cdscGiven) model->BSIM3v32cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM3v32cdscbGiven) model->BSIM3v32cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v32cdscdGiven) model->BSIM3v32cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v32citGiven) model->BSIM3v32cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v32nfactorGiven) model->BSIM3v32nfactor = 1; if (!model->BSIM3v32xjGiven) model->BSIM3v32xj = .15e-6; if (!model->BSIM3v32vsatGiven) model->BSIM3v32vsat = 8.0e4; /* unit m/s */ if (!model->BSIM3v32atGiven) model->BSIM3v32at = 3.3e4; /* unit m/s */ if (!model->BSIM3v32a0Given) model->BSIM3v32a0 = 1.0; if (!model->BSIM3v32agsGiven) model->BSIM3v32ags = 0.0; if (!model->BSIM3v32a1Given) model->BSIM3v32a1 = 0.0; if (!model->BSIM3v32a2Given) model->BSIM3v32a2 = 1.0; if (!model->BSIM3v32ketaGiven) model->BSIM3v32keta = -0.047; /* unit / V */ if (!model->BSIM3v32nsubGiven) model->BSIM3v32nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM3v32npeakGiven) model->BSIM3v32npeak = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM3v32ngateGiven) model->BSIM3v32ngate = 0; /* unit 1/cm3 */ if (!model->BSIM3v32vbmGiven) model->BSIM3v32vbm = -3.0; if (!model->BSIM3v32xtGiven) model->BSIM3v32xt = 1.55e-7; if (!model->BSIM3v32kt1Given) model->BSIM3v32kt1 = -0.11; /* unit V */ if (!model->BSIM3v32kt1lGiven) model->BSIM3v32kt1l = 0.0; /* unit V*m */ if (!model->BSIM3v32kt2Given) model->BSIM3v32kt2 = 0.022; /* No unit */ if (!model->BSIM3v32k3Given) model->BSIM3v32k3 = 80.0; if (!model->BSIM3v32k3bGiven) model->BSIM3v32k3b = 0.0; if (!model->BSIM3v32w0Given) model->BSIM3v32w0 = 2.5e-6; if (!model->BSIM3v32nlxGiven) model->BSIM3v32nlx = 1.74e-7; if (!model->BSIM3v32dvt0Given) model->BSIM3v32dvt0 = 2.2; if (!model->BSIM3v32dvt1Given) model->BSIM3v32dvt1 = 0.53; if (!model->BSIM3v32dvt2Given) model->BSIM3v32dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM3v32dvt0wGiven) model->BSIM3v32dvt0w = 0.0; if (!model->BSIM3v32dvt1wGiven) model->BSIM3v32dvt1w = 5.3e6; if (!model->BSIM3v32dvt2wGiven) model->BSIM3v32dvt2w = -0.032; if (!model->BSIM3v32droutGiven) model->BSIM3v32drout = 0.56; if (!model->BSIM3v32dsubGiven) model->BSIM3v32dsub = model->BSIM3v32drout; if (!model->BSIM3v32vth0Given) model->BSIM3v32vth0 = (model->BSIM3v32type == NMOS) ? 0.7 : -0.7; if (!model->BSIM3v32uaGiven) model->BSIM3v32ua = 2.25e-9; /* unit m/V */ if (!model->BSIM3v32ua1Given) model->BSIM3v32ua1 = 4.31e-9; /* unit m/V */ if (!model->BSIM3v32ubGiven) model->BSIM3v32ub = 5.87e-19; /* unit (m/V)**2 */ if (!model->BSIM3v32ub1Given) model->BSIM3v32ub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->BSIM3v32ucGiven) model->BSIM3v32uc = (model->BSIM3v32mobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->BSIM3v32uc1Given) model->BSIM3v32uc1 = (model->BSIM3v32mobMod == 3) ? -0.056 : -0.056e-9; if (!model->BSIM3v32u0Given) model->BSIM3v32u0 = (model->BSIM3v32type == NMOS) ? 0.067 : 0.025; if (!model->BSIM3v32uteGiven) model->BSIM3v32ute = -1.5; if (!model->BSIM3v32voffGiven) model->BSIM3v32voff = -0.08; if (!model->BSIM3v32deltaGiven) model->BSIM3v32delta = 0.01; if (!model->BSIM3v32rdswGiven) model->BSIM3v32rdsw = 0; if (!model->BSIM3v32prwgGiven) model->BSIM3v32prwg = 0.0; /* unit 1/V */ if (!model->BSIM3v32prwbGiven) model->BSIM3v32prwb = 0.0; if (!model->BSIM3v32prtGiven) model->BSIM3v32prt = 0.0; if (!model->BSIM3v32eta0Given) model->BSIM3v32eta0 = 0.08; /* no unit */ if (!model->BSIM3v32etabGiven) model->BSIM3v32etab = -0.07; /* unit 1/V */ if (!model->BSIM3v32pclmGiven) model->BSIM3v32pclm = 1.3; /* no unit */ if (!model->BSIM3v32pdibl1Given) model->BSIM3v32pdibl1 = .39; /* no unit */ if (!model->BSIM3v32pdibl2Given) model->BSIM3v32pdibl2 = 0.0086; /* no unit */ if (!model->BSIM3v32pdiblbGiven) model->BSIM3v32pdiblb = 0.0; /* 1/V */ if (!model->BSIM3v32pscbe1Given) model->BSIM3v32pscbe1 = 4.24e8; if (!model->BSIM3v32pscbe2Given) model->BSIM3v32pscbe2 = 1.0e-5; if (!model->BSIM3v32pvagGiven) model->BSIM3v32pvag = 0.0; if (!model->BSIM3v32wrGiven) model->BSIM3v32wr = 1.0; if (!model->BSIM3v32dwgGiven) model->BSIM3v32dwg = 0.0; if (!model->BSIM3v32dwbGiven) model->BSIM3v32dwb = 0.0; if (!model->BSIM3v32b0Given) model->BSIM3v32b0 = 0.0; if (!model->BSIM3v32b1Given) model->BSIM3v32b1 = 0.0; if (!model->BSIM3v32alpha0Given) model->BSIM3v32alpha0 = 0.0; if (!model->BSIM3v32alpha1Given) model->BSIM3v32alpha1 = 0.0; if (!model->BSIM3v32beta0Given) model->BSIM3v32beta0 = 30.0; if (!model->BSIM3v32ijthGiven) model->BSIM3v32ijth = 0.1; /* unit A */ if (!model->BSIM3v32elmGiven) model->BSIM3v32elm = 5.0; if (!model->BSIM3v32cgslGiven) model->BSIM3v32cgsl = 0.0; if (!model->BSIM3v32cgdlGiven) model->BSIM3v32cgdl = 0.0; if (!model->BSIM3v32ckappaGiven) model->BSIM3v32ckappa = 0.6; if (!model->BSIM3v32clcGiven) model->BSIM3v32clc = 0.1e-6; if (!model->BSIM3v32cleGiven) model->BSIM3v32cle = 0.6; if (!model->BSIM3v32vfbcvGiven) model->BSIM3v32vfbcv = -1.0; if (!model->BSIM3v32acdeGiven) model->BSIM3v32acde = 1.0; if (!model->BSIM3v32moinGiven) model->BSIM3v32moin = 15.0; if (!model->BSIM3v32noffGiven) model->BSIM3v32noff = 1.0; if (!model->BSIM3v32voffcvGiven) model->BSIM3v32voffcv = 0.0; if (!model->BSIM3v32tcjGiven) model->BSIM3v32tcj = 0.0; if (!model->BSIM3v32tpbGiven) model->BSIM3v32tpb = 0.0; if (!model->BSIM3v32tcjswGiven) model->BSIM3v32tcjsw = 0.0; if (!model->BSIM3v32tpbswGiven) model->BSIM3v32tpbsw = 0.0; if (!model->BSIM3v32tcjswgGiven) model->BSIM3v32tcjswg = 0.0; if (!model->BSIM3v32tpbswgGiven) model->BSIM3v32tpbswg = 0.0; /* ACM model */ if (!model->BSIM3v32hdifGiven) model->BSIM3v32hdif = 0.0; if (!model->BSIM3v32ldifGiven) model->BSIM3v32ldif = 0.0; if (!model->BSIM3v32ldGiven) model->BSIM3v32ld = 0.0; if (!model->BSIM3v32rdGiven) model->BSIM3v32rd = 0.0; if (!model->BSIM3v32rsGiven) model->BSIM3v32rs = 0.0; if (!model->BSIM3v32rdcGiven) model->BSIM3v32rdc = 0.0; if (!model->BSIM3v32rscGiven) model->BSIM3v32rsc = 0.0; if (!model->BSIM3v32wmltGiven) model->BSIM3v32wmlt = 1.0; /* Length dependence */ if (!model->BSIM3v32lcdscGiven) model->BSIM3v32lcdsc = 0.0; if (!model->BSIM3v32lcdscbGiven) model->BSIM3v32lcdscb = 0.0; if (!model->BSIM3v32lcdscdGiven) model->BSIM3v32lcdscd = 0.0; if (!model->BSIM3v32lcitGiven) model->BSIM3v32lcit = 0.0; if (!model->BSIM3v32lnfactorGiven) model->BSIM3v32lnfactor = 0.0; if (!model->BSIM3v32lxjGiven) model->BSIM3v32lxj = 0.0; if (!model->BSIM3v32lvsatGiven) model->BSIM3v32lvsat = 0.0; if (!model->BSIM3v32latGiven) model->BSIM3v32lat = 0.0; if (!model->BSIM3v32la0Given) model->BSIM3v32la0 = 0.0; if (!model->BSIM3v32lagsGiven) model->BSIM3v32lags = 0.0; if (!model->BSIM3v32la1Given) model->BSIM3v32la1 = 0.0; if (!model->BSIM3v32la2Given) model->BSIM3v32la2 = 0.0; if (!model->BSIM3v32lketaGiven) model->BSIM3v32lketa = 0.0; if (!model->BSIM3v32lnsubGiven) model->BSIM3v32lnsub = 0.0; if (!model->BSIM3v32lnpeakGiven) model->BSIM3v32lnpeak = 0.0; if (!model->BSIM3v32lngateGiven) model->BSIM3v32lngate = 0.0; if (!model->BSIM3v32lvbmGiven) model->BSIM3v32lvbm = 0.0; if (!model->BSIM3v32lxtGiven) model->BSIM3v32lxt = 0.0; if (!model->BSIM3v32lkt1Given) model->BSIM3v32lkt1 = 0.0; if (!model->BSIM3v32lkt1lGiven) model->BSIM3v32lkt1l = 0.0; if (!model->BSIM3v32lkt2Given) model->BSIM3v32lkt2 = 0.0; if (!model->BSIM3v32lk3Given) model->BSIM3v32lk3 = 0.0; if (!model->BSIM3v32lk3bGiven) model->BSIM3v32lk3b = 0.0; if (!model->BSIM3v32lw0Given) model->BSIM3v32lw0 = 0.0; if (!model->BSIM3v32lnlxGiven) model->BSIM3v32lnlx = 0.0; if (!model->BSIM3v32ldvt0Given) model->BSIM3v32ldvt0 = 0.0; if (!model->BSIM3v32ldvt1Given) model->BSIM3v32ldvt1 = 0.0; if (!model->BSIM3v32ldvt2Given) model->BSIM3v32ldvt2 = 0.0; if (!model->BSIM3v32ldvt0wGiven) model->BSIM3v32ldvt0w = 0.0; if (!model->BSIM3v32ldvt1wGiven) model->BSIM3v32ldvt1w = 0.0; if (!model->BSIM3v32ldvt2wGiven) model->BSIM3v32ldvt2w = 0.0; if (!model->BSIM3v32ldroutGiven) model->BSIM3v32ldrout = 0.0; if (!model->BSIM3v32ldsubGiven) model->BSIM3v32ldsub = 0.0; if (!model->BSIM3v32lvth0Given) model->BSIM3v32lvth0 = 0.0; if (!model->BSIM3v32luaGiven) model->BSIM3v32lua = 0.0; if (!model->BSIM3v32lua1Given) model->BSIM3v32lua1 = 0.0; if (!model->BSIM3v32lubGiven) model->BSIM3v32lub = 0.0; if (!model->BSIM3v32lub1Given) model->BSIM3v32lub1 = 0.0; if (!model->BSIM3v32lucGiven) model->BSIM3v32luc = 0.0; if (!model->BSIM3v32luc1Given) model->BSIM3v32luc1 = 0.0; if (!model->BSIM3v32lu0Given) model->BSIM3v32lu0 = 0.0; if (!model->BSIM3v32luteGiven) model->BSIM3v32lute = 0.0; if (!model->BSIM3v32lvoffGiven) model->BSIM3v32lvoff = 0.0; if (!model->BSIM3v32ldeltaGiven) model->BSIM3v32ldelta = 0.0; if (!model->BSIM3v32lrdswGiven) model->BSIM3v32lrdsw = 0.0; if (!model->BSIM3v32lprwbGiven) model->BSIM3v32lprwb = 0.0; if (!model->BSIM3v32lprwgGiven) model->BSIM3v32lprwg = 0.0; if (!model->BSIM3v32lprtGiven) model->BSIM3v32lprt = 0.0; if (!model->BSIM3v32leta0Given) model->BSIM3v32leta0 = 0.0; if (!model->BSIM3v32letabGiven) model->BSIM3v32letab = -0.0; if (!model->BSIM3v32lpclmGiven) model->BSIM3v32lpclm = 0.0; if (!model->BSIM3v32lpdibl1Given) model->BSIM3v32lpdibl1 = 0.0; if (!model->BSIM3v32lpdibl2Given) model->BSIM3v32lpdibl2 = 0.0; if (!model->BSIM3v32lpdiblbGiven) model->BSIM3v32lpdiblb = 0.0; if (!model->BSIM3v32lpscbe1Given) model->BSIM3v32lpscbe1 = 0.0; if (!model->BSIM3v32lpscbe2Given) model->BSIM3v32lpscbe2 = 0.0; if (!model->BSIM3v32lpvagGiven) model->BSIM3v32lpvag = 0.0; if (!model->BSIM3v32lwrGiven) model->BSIM3v32lwr = 0.0; if (!model->BSIM3v32ldwgGiven) model->BSIM3v32ldwg = 0.0; if (!model->BSIM3v32ldwbGiven) model->BSIM3v32ldwb = 0.0; if (!model->BSIM3v32lb0Given) model->BSIM3v32lb0 = 0.0; if (!model->BSIM3v32lb1Given) model->BSIM3v32lb1 = 0.0; if (!model->BSIM3v32lalpha0Given) model->BSIM3v32lalpha0 = 0.0; if (!model->BSIM3v32lalpha1Given) model->BSIM3v32lalpha1 = 0.0; if (!model->BSIM3v32lbeta0Given) model->BSIM3v32lbeta0 = 0.0; if (!model->BSIM3v32lvfbGiven) model->BSIM3v32lvfb = 0.0; if (!model->BSIM3v32lelmGiven) model->BSIM3v32lelm = 0.0; if (!model->BSIM3v32lcgslGiven) model->BSIM3v32lcgsl = 0.0; if (!model->BSIM3v32lcgdlGiven) model->BSIM3v32lcgdl = 0.0; if (!model->BSIM3v32lckappaGiven) model->BSIM3v32lckappa = 0.0; if (!model->BSIM3v32lclcGiven) model->BSIM3v32lclc = 0.0; if (!model->BSIM3v32lcleGiven) model->BSIM3v32lcle = 0.0; if (!model->BSIM3v32lcfGiven) model->BSIM3v32lcf = 0.0; if (!model->BSIM3v32lvfbcvGiven) model->BSIM3v32lvfbcv = 0.0; if (!model->BSIM3v32lacdeGiven) model->BSIM3v32lacde = 0.0; if (!model->BSIM3v32lmoinGiven) model->BSIM3v32lmoin = 0.0; if (!model->BSIM3v32lnoffGiven) model->BSIM3v32lnoff = 0.0; if (!model->BSIM3v32lvoffcvGiven) model->BSIM3v32lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM3v32wcdscGiven) model->BSIM3v32wcdsc = 0.0; if (!model->BSIM3v32wcdscbGiven) model->BSIM3v32wcdscb = 0.0; if (!model->BSIM3v32wcdscdGiven) model->BSIM3v32wcdscd = 0.0; if (!model->BSIM3v32wcitGiven) model->BSIM3v32wcit = 0.0; if (!model->BSIM3v32wnfactorGiven) model->BSIM3v32wnfactor = 0.0; if (!model->BSIM3v32wxjGiven) model->BSIM3v32wxj = 0.0; if (!model->BSIM3v32wvsatGiven) model->BSIM3v32wvsat = 0.0; if (!model->BSIM3v32watGiven) model->BSIM3v32wat = 0.0; if (!model->BSIM3v32wa0Given) model->BSIM3v32wa0 = 0.0; if (!model->BSIM3v32wagsGiven) model->BSIM3v32wags = 0.0; if (!model->BSIM3v32wa1Given) model->BSIM3v32wa1 = 0.0; if (!model->BSIM3v32wa2Given) model->BSIM3v32wa2 = 0.0; if (!model->BSIM3v32wketaGiven) model->BSIM3v32wketa = 0.0; if (!model->BSIM3v32wnsubGiven) model->BSIM3v32wnsub = 0.0; if (!model->BSIM3v32wnpeakGiven) model->BSIM3v32wnpeak = 0.0; if (!model->BSIM3v32wngateGiven) model->BSIM3v32wngate = 0.0; if (!model->BSIM3v32wvbmGiven) model->BSIM3v32wvbm = 0.0; if (!model->BSIM3v32wxtGiven) model->BSIM3v32wxt = 0.0; if (!model->BSIM3v32wkt1Given) model->BSIM3v32wkt1 = 0.0; if (!model->BSIM3v32wkt1lGiven) model->BSIM3v32wkt1l = 0.0; if (!model->BSIM3v32wkt2Given) model->BSIM3v32wkt2 = 0.0; if (!model->BSIM3v32wk3Given) model->BSIM3v32wk3 = 0.0; if (!model->BSIM3v32wk3bGiven) model->BSIM3v32wk3b = 0.0; if (!model->BSIM3v32ww0Given) model->BSIM3v32ww0 = 0.0; if (!model->BSIM3v32wnlxGiven) model->BSIM3v32wnlx = 0.0; if (!model->BSIM3v32wdvt0Given) model->BSIM3v32wdvt0 = 0.0; if (!model->BSIM3v32wdvt1Given) model->BSIM3v32wdvt1 = 0.0; if (!model->BSIM3v32wdvt2Given) model->BSIM3v32wdvt2 = 0.0; if (!model->BSIM3v32wdvt0wGiven) model->BSIM3v32wdvt0w = 0.0; if (!model->BSIM3v32wdvt1wGiven) model->BSIM3v32wdvt1w = 0.0; if (!model->BSIM3v32wdvt2wGiven) model->BSIM3v32wdvt2w = 0.0; if (!model->BSIM3v32wdroutGiven) model->BSIM3v32wdrout = 0.0; if (!model->BSIM3v32wdsubGiven) model->BSIM3v32wdsub = 0.0; if (!model->BSIM3v32wvth0Given) model->BSIM3v32wvth0 = 0.0; if (!model->BSIM3v32wuaGiven) model->BSIM3v32wua = 0.0; if (!model->BSIM3v32wua1Given) model->BSIM3v32wua1 = 0.0; if (!model->BSIM3v32wubGiven) model->BSIM3v32wub = 0.0; if (!model->BSIM3v32wub1Given) model->BSIM3v32wub1 = 0.0; if (!model->BSIM3v32wucGiven) model->BSIM3v32wuc = 0.0; if (!model->BSIM3v32wuc1Given) model->BSIM3v32wuc1 = 0.0; if (!model->BSIM3v32wu0Given) model->BSIM3v32wu0 = 0.0; if (!model->BSIM3v32wuteGiven) model->BSIM3v32wute = 0.0; if (!model->BSIM3v32wvoffGiven) model->BSIM3v32wvoff = 0.0; if (!model->BSIM3v32wdeltaGiven) model->BSIM3v32wdelta = 0.0; if (!model->BSIM3v32wrdswGiven) model->BSIM3v32wrdsw = 0.0; if (!model->BSIM3v32wprwbGiven) model->BSIM3v32wprwb = 0.0; if (!model->BSIM3v32wprwgGiven) model->BSIM3v32wprwg = 0.0; if (!model->BSIM3v32wprtGiven) model->BSIM3v32wprt = 0.0; if (!model->BSIM3v32weta0Given) model->BSIM3v32weta0 = 0.0; if (!model->BSIM3v32wetabGiven) model->BSIM3v32wetab = 0.0; if (!model->BSIM3v32wpclmGiven) model->BSIM3v32wpclm = 0.0; if (!model->BSIM3v32wpdibl1Given) model->BSIM3v32wpdibl1 = 0.0; if (!model->BSIM3v32wpdibl2Given) model->BSIM3v32wpdibl2 = 0.0; if (!model->BSIM3v32wpdiblbGiven) model->BSIM3v32wpdiblb = 0.0; if (!model->BSIM3v32wpscbe1Given) model->BSIM3v32wpscbe1 = 0.0; if (!model->BSIM3v32wpscbe2Given) model->BSIM3v32wpscbe2 = 0.0; if (!model->BSIM3v32wpvagGiven) model->BSIM3v32wpvag = 0.0; if (!model->BSIM3v32wwrGiven) model->BSIM3v32wwr = 0.0; if (!model->BSIM3v32wdwgGiven) model->BSIM3v32wdwg = 0.0; if (!model->BSIM3v32wdwbGiven) model->BSIM3v32wdwb = 0.0; if (!model->BSIM3v32wb0Given) model->BSIM3v32wb0 = 0.0; if (!model->BSIM3v32wb1Given) model->BSIM3v32wb1 = 0.0; if (!model->BSIM3v32walpha0Given) model->BSIM3v32walpha0 = 0.0; if (!model->BSIM3v32walpha1Given) model->BSIM3v32walpha1 = 0.0; if (!model->BSIM3v32wbeta0Given) model->BSIM3v32wbeta0 = 0.0; if (!model->BSIM3v32wvfbGiven) model->BSIM3v32wvfb = 0.0; if (!model->BSIM3v32welmGiven) model->BSIM3v32welm = 0.0; if (!model->BSIM3v32wcgslGiven) model->BSIM3v32wcgsl = 0.0; if (!model->BSIM3v32wcgdlGiven) model->BSIM3v32wcgdl = 0.0; if (!model->BSIM3v32wckappaGiven) model->BSIM3v32wckappa = 0.0; if (!model->BSIM3v32wcfGiven) model->BSIM3v32wcf = 0.0; if (!model->BSIM3v32wclcGiven) model->BSIM3v32wclc = 0.0; if (!model->BSIM3v32wcleGiven) model->BSIM3v32wcle = 0.0; if (!model->BSIM3v32wvfbcvGiven) model->BSIM3v32wvfbcv = 0.0; if (!model->BSIM3v32wacdeGiven) model->BSIM3v32wacde = 0.0; if (!model->BSIM3v32wmoinGiven) model->BSIM3v32wmoin = 0.0; if (!model->BSIM3v32wnoffGiven) model->BSIM3v32wnoff = 0.0; if (!model->BSIM3v32wvoffcvGiven) model->BSIM3v32wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM3v32pcdscGiven) model->BSIM3v32pcdsc = 0.0; if (!model->BSIM3v32pcdscbGiven) model->BSIM3v32pcdscb = 0.0; if (!model->BSIM3v32pcdscdGiven) model->BSIM3v32pcdscd = 0.0; if (!model->BSIM3v32pcitGiven) model->BSIM3v32pcit = 0.0; if (!model->BSIM3v32pnfactorGiven) model->BSIM3v32pnfactor = 0.0; if (!model->BSIM3v32pxjGiven) model->BSIM3v32pxj = 0.0; if (!model->BSIM3v32pvsatGiven) model->BSIM3v32pvsat = 0.0; if (!model->BSIM3v32patGiven) model->BSIM3v32pat = 0.0; if (!model->BSIM3v32pa0Given) model->BSIM3v32pa0 = 0.0; if (!model->BSIM3v32pagsGiven) model->BSIM3v32pags = 0.0; if (!model->BSIM3v32pa1Given) model->BSIM3v32pa1 = 0.0; if (!model->BSIM3v32pa2Given) model->BSIM3v32pa2 = 0.0; if (!model->BSIM3v32pketaGiven) model->BSIM3v32pketa = 0.0; if (!model->BSIM3v32pnsubGiven) model->BSIM3v32pnsub = 0.0; if (!model->BSIM3v32pnpeakGiven) model->BSIM3v32pnpeak = 0.0; if (!model->BSIM3v32pngateGiven) model->BSIM3v32pngate = 0.0; if (!model->BSIM3v32pvbmGiven) model->BSIM3v32pvbm = 0.0; if (!model->BSIM3v32pxtGiven) model->BSIM3v32pxt = 0.0; if (!model->BSIM3v32pkt1Given) model->BSIM3v32pkt1 = 0.0; if (!model->BSIM3v32pkt1lGiven) model->BSIM3v32pkt1l = 0.0; if (!model->BSIM3v32pkt2Given) model->BSIM3v32pkt2 = 0.0; if (!model->BSIM3v32pk3Given) model->BSIM3v32pk3 = 0.0; if (!model->BSIM3v32pk3bGiven) model->BSIM3v32pk3b = 0.0; if (!model->BSIM3v32pw0Given) model->BSIM3v32pw0 = 0.0; if (!model->BSIM3v32pnlxGiven) model->BSIM3v32pnlx = 0.0; if (!model->BSIM3v32pdvt0Given) model->BSIM3v32pdvt0 = 0.0; if (!model->BSIM3v32pdvt1Given) model->BSIM3v32pdvt1 = 0.0; if (!model->BSIM3v32pdvt2Given) model->BSIM3v32pdvt2 = 0.0; if (!model->BSIM3v32pdvt0wGiven) model->BSIM3v32pdvt0w = 0.0; if (!model->BSIM3v32pdvt1wGiven) model->BSIM3v32pdvt1w = 0.0; if (!model->BSIM3v32pdvt2wGiven) model->BSIM3v32pdvt2w = 0.0; if (!model->BSIM3v32pdroutGiven) model->BSIM3v32pdrout = 0.0; if (!model->BSIM3v32pdsubGiven) model->BSIM3v32pdsub = 0.0; if (!model->BSIM3v32pvth0Given) model->BSIM3v32pvth0 = 0.0; if (!model->BSIM3v32puaGiven) model->BSIM3v32pua = 0.0; if (!model->BSIM3v32pua1Given) model->BSIM3v32pua1 = 0.0; if (!model->BSIM3v32pubGiven) model->BSIM3v32pub = 0.0; if (!model->BSIM3v32pub1Given) model->BSIM3v32pub1 = 0.0; if (!model->BSIM3v32pucGiven) model->BSIM3v32puc = 0.0; if (!model->BSIM3v32puc1Given) model->BSIM3v32puc1 = 0.0; if (!model->BSIM3v32pu0Given) model->BSIM3v32pu0 = 0.0; if (!model->BSIM3v32puteGiven) model->BSIM3v32pute = 0.0; if (!model->BSIM3v32pvoffGiven) model->BSIM3v32pvoff = 0.0; if (!model->BSIM3v32pdeltaGiven) model->BSIM3v32pdelta = 0.0; if (!model->BSIM3v32prdswGiven) model->BSIM3v32prdsw = 0.0; if (!model->BSIM3v32pprwbGiven) model->BSIM3v32pprwb = 0.0; if (!model->BSIM3v32pprwgGiven) model->BSIM3v32pprwg = 0.0; if (!model->BSIM3v32pprtGiven) model->BSIM3v32pprt = 0.0; if (!model->BSIM3v32peta0Given) model->BSIM3v32peta0 = 0.0; if (!model->BSIM3v32petabGiven) model->BSIM3v32petab = 0.0; if (!model->BSIM3v32ppclmGiven) model->BSIM3v32ppclm = 0.0; if (!model->BSIM3v32ppdibl1Given) model->BSIM3v32ppdibl1 = 0.0; if (!model->BSIM3v32ppdibl2Given) model->BSIM3v32ppdibl2 = 0.0; if (!model->BSIM3v32ppdiblbGiven) model->BSIM3v32ppdiblb = 0.0; if (!model->BSIM3v32ppscbe1Given) model->BSIM3v32ppscbe1 = 0.0; if (!model->BSIM3v32ppscbe2Given) model->BSIM3v32ppscbe2 = 0.0; if (!model->BSIM3v32ppvagGiven) model->BSIM3v32ppvag = 0.0; if (!model->BSIM3v32pwrGiven) model->BSIM3v32pwr = 0.0; if (!model->BSIM3v32pdwgGiven) model->BSIM3v32pdwg = 0.0; if (!model->BSIM3v32pdwbGiven) model->BSIM3v32pdwb = 0.0; if (!model->BSIM3v32pb0Given) model->BSIM3v32pb0 = 0.0; if (!model->BSIM3v32pb1Given) model->BSIM3v32pb1 = 0.0; if (!model->BSIM3v32palpha0Given) model->BSIM3v32palpha0 = 0.0; if (!model->BSIM3v32palpha1Given) model->BSIM3v32palpha1 = 0.0; if (!model->BSIM3v32pbeta0Given) model->BSIM3v32pbeta0 = 0.0; if (!model->BSIM3v32pvfbGiven) model->BSIM3v32pvfb = 0.0; if (!model->BSIM3v32pelmGiven) model->BSIM3v32pelm = 0.0; if (!model->BSIM3v32pcgslGiven) model->BSIM3v32pcgsl = 0.0; if (!model->BSIM3v32pcgdlGiven) model->BSIM3v32pcgdl = 0.0; if (!model->BSIM3v32pckappaGiven) model->BSIM3v32pckappa = 0.0; if (!model->BSIM3v32pcfGiven) model->BSIM3v32pcf = 0.0; if (!model->BSIM3v32pclcGiven) model->BSIM3v32pclc = 0.0; if (!model->BSIM3v32pcleGiven) model->BSIM3v32pcle = 0.0; if (!model->BSIM3v32pvfbcvGiven) model->BSIM3v32pvfbcv = 0.0; if (!model->BSIM3v32pacdeGiven) model->BSIM3v32pacde = 0.0; if (!model->BSIM3v32pmoinGiven) model->BSIM3v32pmoin = 0.0; if (!model->BSIM3v32pnoffGiven) model->BSIM3v32pnoff = 0.0; if (!model->BSIM3v32pvoffcvGiven) model->BSIM3v32pvoffcv = 0.0; /* unit degree celcius */ if (!model->BSIM3v32tnomGiven) model->BSIM3v32tnom = ckt->CKTnomTemp; /* else model->BSIM3v32tnom = model->BSIM3v32tnom + 273.15; we make this transform in b3v32mpar.c in the first run */ if (!model->BSIM3v32LintGiven) model->BSIM3v32Lint = 0.0; if (!model->BSIM3v32LlGiven) model->BSIM3v32Ll = 0.0; if (!model->BSIM3v32LlcGiven) model->BSIM3v32Llc = model->BSIM3v32Ll; if (!model->BSIM3v32LlnGiven) model->BSIM3v32Lln = 1.0; if (!model->BSIM3v32LwGiven) model->BSIM3v32Lw = 0.0; if (!model->BSIM3v32LwcGiven) model->BSIM3v32Lwc = model->BSIM3v32Lw; if (!model->BSIM3v32LwnGiven) model->BSIM3v32Lwn = 1.0; if (!model->BSIM3v32LwlGiven) model->BSIM3v32Lwl = 0.0; if (!model->BSIM3v32LwlcGiven) model->BSIM3v32Lwlc = model->BSIM3v32Lwl; if (!model->BSIM3v32LminGiven) model->BSIM3v32Lmin = 0.0; if (!model->BSIM3v32LmaxGiven) model->BSIM3v32Lmax = 1.0; if (!model->BSIM3v32WintGiven) model->BSIM3v32Wint = 0.0; if (!model->BSIM3v32WlGiven) model->BSIM3v32Wl = 0.0; if (!model->BSIM3v32WlcGiven) model->BSIM3v32Wlc = model->BSIM3v32Wl; if (!model->BSIM3v32WlnGiven) model->BSIM3v32Wln = 1.0; if (!model->BSIM3v32WwGiven) model->BSIM3v32Ww = 0.0; if (!model->BSIM3v32WwcGiven) model->BSIM3v32Wwc = model->BSIM3v32Ww; if (!model->BSIM3v32WwnGiven) model->BSIM3v32Wwn = 1.0; if (!model->BSIM3v32WwlGiven) model->BSIM3v32Wwl = 0.0; if (!model->BSIM3v32WwlcGiven) model->BSIM3v32Wwlc = model->BSIM3v32Wwl; if (!model->BSIM3v32WminGiven) model->BSIM3v32Wmin = 0.0; if (!model->BSIM3v32WmaxGiven) model->BSIM3v32Wmax = 1.0; if (!model->BSIM3v32dwcGiven) model->BSIM3v32dwc = model->BSIM3v32Wint; if (!model->BSIM3v32dlcGiven) model->BSIM3v32dlc = model->BSIM3v32Lint; if (!model->BSIM3v32xlGiven) model->BSIM3v32xl = 0.0; if (!model->BSIM3v32xwGiven) model->BSIM3v32xw = 0.0; if (!model->BSIM3v32cfGiven) model->BSIM3v32cf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->BSIM3v32tox); if (!model->BSIM3v32cgdoGiven) { if (model->BSIM3v32dlcGiven && (model->BSIM3v32dlc > 0.0)) { model->BSIM3v32cgdo = model->BSIM3v32dlc * model->BSIM3v32cox - model->BSIM3v32cgdl ; } else model->BSIM3v32cgdo = 0.6 * model->BSIM3v32xj * model->BSIM3v32cox; } if (!model->BSIM3v32cgsoGiven) { if (model->BSIM3v32dlcGiven && (model->BSIM3v32dlc > 0.0)) { model->BSIM3v32cgso = model->BSIM3v32dlc * model->BSIM3v32cox - model->BSIM3v32cgsl ; } else model->BSIM3v32cgso = 0.6 * model->BSIM3v32xj * model->BSIM3v32cox; } if (!model->BSIM3v32cgboGiven) { model->BSIM3v32cgbo = 2.0 * model->BSIM3v32dwc * model->BSIM3v32cox; } if (!model->BSIM3v32xpartGiven) model->BSIM3v32xpart = 0.0; if (!model->BSIM3v32sheetResistanceGiven) model->BSIM3v32sheetResistance = 0.0; if (!model->BSIM3v32unitAreaJctCapGiven) model->BSIM3v32unitAreaJctCap = 5.0E-4; if (!model->BSIM3v32unitLengthSidewallJctCapGiven) model->BSIM3v32unitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM3v32unitLengthGateSidewallJctCapGiven) model->BSIM3v32unitLengthGateSidewallJctCap = model->BSIM3v32unitLengthSidewallJctCap ; if (!model->BSIM3v32jctSatCurDensityGiven) model->BSIM3v32jctSatCurDensity = 1.0E-4; if (!model->BSIM3v32jctSidewallSatCurDensityGiven) model->BSIM3v32jctSidewallSatCurDensity = 0.0; if (!model->BSIM3v32bulkJctPotentialGiven) model->BSIM3v32bulkJctPotential = 1.0; if (!model->BSIM3v32sidewallJctPotentialGiven) model->BSIM3v32sidewallJctPotential = 1.0; if (!model->BSIM3v32GatesidewallJctPotentialGiven) model->BSIM3v32GatesidewallJctPotential = model->BSIM3v32sidewallJctPotential; if (!model->BSIM3v32bulkJctBotGradingCoeffGiven) model->BSIM3v32bulkJctBotGradingCoeff = 0.5; if (!model->BSIM3v32bulkJctSideGradingCoeffGiven) model->BSIM3v32bulkJctSideGradingCoeff = 0.33; if (!model->BSIM3v32bulkJctGateSideGradingCoeffGiven) model->BSIM3v32bulkJctGateSideGradingCoeff = model->BSIM3v32bulkJctSideGradingCoeff; if (!model->BSIM3v32jctEmissionCoeffGiven) model->BSIM3v32jctEmissionCoeff = 1.0; if (!model->BSIM3v32jctTempExponentGiven) model->BSIM3v32jctTempExponent = 3.0; if (!model->BSIM3v32oxideTrapDensityAGiven) { if (model->BSIM3v32type == NMOS) model->BSIM3v32oxideTrapDensityA = 1e20; else model->BSIM3v32oxideTrapDensityA=9.9e18; } if (!model->BSIM3v32oxideTrapDensityBGiven) { if (model->BSIM3v32type == NMOS) model->BSIM3v32oxideTrapDensityB = 5e4; else model->BSIM3v32oxideTrapDensityB = 2.4e3; } if (!model->BSIM3v32oxideTrapDensityCGiven) { if (model->BSIM3v32type == NMOS) model->BSIM3v32oxideTrapDensityC = -1.4e-12; else model->BSIM3v32oxideTrapDensityC = 1.4e-12; } if (!model->BSIM3v32emGiven) model->BSIM3v32em = 4.1e7; /* V/m */ if (!model->BSIM3v32efGiven) model->BSIM3v32ef = 1.0; if (!model->BSIM3v32afGiven) model->BSIM3v32af = 1.0; if (!model->BSIM3v32kfGiven) model->BSIM3v32kf = 0.0; if (!model->BSIM3v32vgsMaxGiven) model->BSIM3v32vgsMax = 1e99; if (!model->BSIM3v32vgdMaxGiven) model->BSIM3v32vgdMax = 1e99; if (!model->BSIM3v32vgbMaxGiven) model->BSIM3v32vgbMax = 1e99; if (!model->BSIM3v32vdsMaxGiven) model->BSIM3v32vdsMax = 1e99; if (!model->BSIM3v32vbsMaxGiven) model->BSIM3v32vbsMax = 1e99; if (!model->BSIM3v32vbdMaxGiven) model->BSIM3v32vbdMax = 1e99; /* loop through all the instances of the model */ for (here = model->BSIM3v32instances; here != NULL ; here=here->BSIM3v32nextInstance) { /* allocate a chunk of the state vector */ here->BSIM3v32states = *states; *states += BSIM3v32numStates; /* perform the parameter defaulting */ if (!here->BSIM3v32drainAreaGiven) here->BSIM3v32drainArea = 0.0; if (!here->BSIM3v32drainPerimeterGiven) here->BSIM3v32drainPerimeter = 0.0; if (!here->BSIM3v32drainSquaresGiven) { if (model->BSIM3v32acmMod == 0) here->BSIM3v32drainSquares = 1.0; else here->BSIM3v32drainSquares = 0.0; } if (!here->BSIM3v32delvtoGiven) here->BSIM3v32delvto = 0.0; if (!here->BSIM3v32mulu0Given) here->BSIM3v32mulu0 = 1.0; if (!here->BSIM3v32icVBSGiven) here->BSIM3v32icVBS = 0.0; if (!here->BSIM3v32icVDSGiven) here->BSIM3v32icVDS = 0.0; if (!here->BSIM3v32icVGSGiven) here->BSIM3v32icVGS = 0.0; if (!here->BSIM3v32lGiven) here->BSIM3v32l = 5.0e-6; if (!here->BSIM3v32sourceAreaGiven) here->BSIM3v32sourceArea = 0.0; if (!here->BSIM3v32sourcePerimeterGiven) here->BSIM3v32sourcePerimeter = 0.0; if (!here->BSIM3v32sourceSquaresGiven) { if (model->BSIM3v32acmMod == 0) here->BSIM3v32sourceSquares = 1.0; else here->BSIM3v32sourceSquares = 0.0; } if (!here->BSIM3v32wGiven) here->BSIM3v32w = 5.0e-6; if (!here->BSIM3v32nqsModGiven) here->BSIM3v32nqsMod = model->BSIM3v32nqsMod; else if ((here->BSIM3v32nqsMod != 0) && (here->BSIM3v32nqsMod != 1)) { here->BSIM3v32nqsMod = model->BSIM3v32nqsMod; printf("Warning: nqsMod has been set to its global value %d.\n", model->BSIM3v32nqsMod); } if (!here->BSIM3v32geoGiven) here->BSIM3v32geo = 0; if (!here->BSIM3v32mGiven) here->BSIM3v32m = 1; /* process drain series resistance */ if ( ((model->BSIM3v32sheetResistance > 0.0) && (here->BSIM3v32drainSquares > 0.0)) ||((model->BSIM3v32sheetResistance > 0.0) && (model->BSIM3v32hdif > 0.0)) ||((model->BSIM3v32rd > 0.0) && (model->BSIM3v32ldif > 0.0)) ||((model->BSIM3v32rd > 0.0) && (model->BSIM3v32ld > 0.0)) ||((model->BSIM3v32rdc > 0.0)) ) { if(here->BSIM3v32dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v32name,"drain"); if(error) return(error); here->BSIM3v32dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v32dNodePrime = here->BSIM3v32dNode; } /* process source series resistance */ if ( ((model->BSIM3v32sheetResistance > 0.0) && (here->BSIM3v32sourceSquares > 0.0)) ||((model->BSIM3v32sheetResistance > 0.0) && (model->BSIM3v32hdif > 0.0)) ||((model->BSIM3v32rs > 0.0) && (model->BSIM3v32ldif > 0.0)) ||((model->BSIM3v32rs > 0.0) && (model->BSIM3v32ld > 0.0)) ||((model->BSIM3v32rsc > 0.0)) ) { if(here->BSIM3v32sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v32name,"source"); if(error) return(error); here->BSIM3v32sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v32sNodePrime = here->BSIM3v32sNode; } /* internal charge node */ if (here->BSIM3v32nqsMod) { if(here->BSIM3v32qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v32name,"charge"); if(error) return(error); here->BSIM3v32qNode = tmp->number; } } else { here->BSIM3v32qNode = 0; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM3v32DdPtr, BSIM3v32dNode, BSIM3v32dNode); TSTALLOC(BSIM3v32GgPtr, BSIM3v32gNode, BSIM3v32gNode); TSTALLOC(BSIM3v32SsPtr, BSIM3v32sNode, BSIM3v32sNode); TSTALLOC(BSIM3v32BbPtr, BSIM3v32bNode, BSIM3v32bNode); TSTALLOC(BSIM3v32DPdpPtr, BSIM3v32dNodePrime, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32SPspPtr, BSIM3v32sNodePrime, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32DdpPtr, BSIM3v32dNode, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32GbPtr, BSIM3v32gNode, BSIM3v32bNode); TSTALLOC(BSIM3v32GdpPtr, BSIM3v32gNode, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32GspPtr, BSIM3v32gNode, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32SspPtr, BSIM3v32sNode, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32BdpPtr, BSIM3v32bNode, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32BspPtr, BSIM3v32bNode, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32DPspPtr, BSIM3v32dNodePrime, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32DPdPtr, BSIM3v32dNodePrime, BSIM3v32dNode); TSTALLOC(BSIM3v32BgPtr, BSIM3v32bNode, BSIM3v32gNode); TSTALLOC(BSIM3v32DPgPtr, BSIM3v32dNodePrime, BSIM3v32gNode); TSTALLOC(BSIM3v32SPgPtr, BSIM3v32sNodePrime, BSIM3v32gNode); TSTALLOC(BSIM3v32SPsPtr, BSIM3v32sNodePrime, BSIM3v32sNode); TSTALLOC(BSIM3v32DPbPtr, BSIM3v32dNodePrime, BSIM3v32bNode); TSTALLOC(BSIM3v32SPbPtr, BSIM3v32sNodePrime, BSIM3v32bNode); TSTALLOC(BSIM3v32SPdpPtr, BSIM3v32sNodePrime, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32QqPtr, BSIM3v32qNode, BSIM3v32qNode); TSTALLOC(BSIM3v32QdpPtr, BSIM3v32qNode, BSIM3v32dNodePrime); TSTALLOC(BSIM3v32QspPtr, BSIM3v32qNode, BSIM3v32sNodePrime); TSTALLOC(BSIM3v32QgPtr, BSIM3v32qNode, BSIM3v32gNode); TSTALLOC(BSIM3v32QbPtr, BSIM3v32qNode, BSIM3v32bNode); TSTALLOC(BSIM3v32DPqPtr, BSIM3v32dNodePrime, BSIM3v32qNode); TSTALLOC(BSIM3v32SPqPtr, BSIM3v32sNodePrime, BSIM3v32qNode); TSTALLOC(BSIM3v32GqPtr, BSIM3v32gNode, BSIM3v32qNode); TSTALLOC(BSIM3v32BqPtr, BSIM3v32bNode, BSIM3v32qNode); } } return(OK); } int BSIM3v32unsetup( GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model; BSIM3v32instance *here; for (model = (BSIM3v32model *)inModel; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here != NULL; here=here->BSIM3v32nextInstance) { if (here->BSIM3v32dNodePrime && here->BSIM3v32dNodePrime != here->BSIM3v32dNode) { CKTdltNNum(ckt, here->BSIM3v32dNodePrime); here->BSIM3v32dNodePrime = 0; } if (here->BSIM3v32sNodePrime && here->BSIM3v32sNodePrime != here->BSIM3v32sNode) { CKTdltNNum(ckt, here->BSIM3v32sNodePrime); here->BSIM3v32sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3v32/bsim3v32init.h0000644000265600020320000000044012264261473022207 0ustar andreasadmin#ifndef _BSIM3v32INIT_H #define _BSIM3v32INIT_H extern IFparm BSIM3v32pTable[ ]; extern IFparm BSIM3v32mPTable[ ]; extern char *BSIM3v32names[ ]; extern int BSIM3v32pTSize; extern int BSIM3v32mPTSize; extern int BSIM3v32nSize; extern int BSIM3v32iSize; extern int BSIM3v32mSize; #endif ngspice-26/src/spicelib/devices/bsim3v32/b3v32mpar.c0000644000265600020320000017125212264261473021477 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3mpar.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "bsim3v32def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32mParam(int param, IFvalue *value, GENmodel *inMod) { BSIM3v32model *mod = (BSIM3v32model*)inMod; switch(param) { case BSIM3v32_MOD_MOBMOD : mod->BSIM3v32mobMod = value->iValue; mod->BSIM3v32mobModGiven = TRUE; break; case BSIM3v32_MOD_BINUNIT : mod->BSIM3v32binUnit = value->iValue; mod->BSIM3v32binUnitGiven = TRUE; break; case BSIM3v32_MOD_PARAMCHK : mod->BSIM3v32paramChk = value->iValue; mod->BSIM3v32paramChkGiven = TRUE; break; case BSIM3v32_MOD_CAPMOD : mod->BSIM3v32capMod = value->iValue; mod->BSIM3v32capModGiven = TRUE; break; case BSIM3v32_MOD_ACMMOD: mod->BSIM3v32acmMod = value->iValue; mod->BSIM3v32acmModGiven = TRUE; break; case BSIM3v32_MOD_CALCACM: mod->BSIM3v32calcacm = value->iValue; mod->BSIM3v32calcacmGiven = TRUE; break; case BSIM3v32_MOD_NOIMOD : mod->BSIM3v32noiMod = value->iValue; mod->BSIM3v32noiModGiven = TRUE; break; case BSIM3v32_MOD_NQSMOD : mod->BSIM3v32nqsMod = value->iValue; mod->BSIM3v32nqsModGiven = TRUE; break; case BSIM3v32_MOD_VERSION : mod->BSIM3v32version = value->sValue; mod->BSIM3v32versionGiven = TRUE; break; case BSIM3v32_MOD_TOX : mod->BSIM3v32tox = value->rValue; mod->BSIM3v32toxGiven = TRUE; break; case BSIM3v32_MOD_TOXM : mod->BSIM3v32toxm = value->rValue; mod->BSIM3v32toxmGiven = TRUE; break; case BSIM3v32_MOD_CDSC : mod->BSIM3v32cdsc = value->rValue; mod->BSIM3v32cdscGiven = TRUE; break; case BSIM3v32_MOD_CDSCB : mod->BSIM3v32cdscb = value->rValue; mod->BSIM3v32cdscbGiven = TRUE; break; case BSIM3v32_MOD_CDSCD : mod->BSIM3v32cdscd = value->rValue; mod->BSIM3v32cdscdGiven = TRUE; break; case BSIM3v32_MOD_CIT : mod->BSIM3v32cit = value->rValue; mod->BSIM3v32citGiven = TRUE; break; case BSIM3v32_MOD_NFACTOR : mod->BSIM3v32nfactor = value->rValue; mod->BSIM3v32nfactorGiven = TRUE; break; case BSIM3v32_MOD_XJ: mod->BSIM3v32xj = value->rValue; mod->BSIM3v32xjGiven = TRUE; break; case BSIM3v32_MOD_VSAT: mod->BSIM3v32vsat = value->rValue; mod->BSIM3v32vsatGiven = TRUE; break; case BSIM3v32_MOD_A0: mod->BSIM3v32a0 = value->rValue; mod->BSIM3v32a0Given = TRUE; break; case BSIM3v32_MOD_AGS: mod->BSIM3v32ags= value->rValue; mod->BSIM3v32agsGiven = TRUE; break; case BSIM3v32_MOD_A1: mod->BSIM3v32a1 = value->rValue; mod->BSIM3v32a1Given = TRUE; break; case BSIM3v32_MOD_A2: mod->BSIM3v32a2 = value->rValue; mod->BSIM3v32a2Given = TRUE; break; case BSIM3v32_MOD_AT: mod->BSIM3v32at = value->rValue; mod->BSIM3v32atGiven = TRUE; break; case BSIM3v32_MOD_KETA: mod->BSIM3v32keta = value->rValue; mod->BSIM3v32ketaGiven = TRUE; break; case BSIM3v32_MOD_NSUB: mod->BSIM3v32nsub = value->rValue; mod->BSIM3v32nsubGiven = TRUE; break; case BSIM3v32_MOD_NPEAK: mod->BSIM3v32npeak = value->rValue; mod->BSIM3v32npeakGiven = TRUE; if (mod->BSIM3v32npeak > 1.0e20) mod->BSIM3v32npeak *= 1.0e-6; break; case BSIM3v32_MOD_NGATE: mod->BSIM3v32ngate = value->rValue; mod->BSIM3v32ngateGiven = TRUE; if (mod->BSIM3v32ngate > 1.0e23) mod->BSIM3v32ngate *= 1.0e-6; break; case BSIM3v32_MOD_GAMMA1: mod->BSIM3v32gamma1 = value->rValue; mod->BSIM3v32gamma1Given = TRUE; break; case BSIM3v32_MOD_GAMMA2: mod->BSIM3v32gamma2 = value->rValue; mod->BSIM3v32gamma2Given = TRUE; break; case BSIM3v32_MOD_VBX: mod->BSIM3v32vbx = value->rValue; mod->BSIM3v32vbxGiven = TRUE; break; case BSIM3v32_MOD_VBM: mod->BSIM3v32vbm = value->rValue; mod->BSIM3v32vbmGiven = TRUE; break; case BSIM3v32_MOD_XT: mod->BSIM3v32xt = value->rValue; mod->BSIM3v32xtGiven = TRUE; break; case BSIM3v32_MOD_K1: mod->BSIM3v32k1 = value->rValue; mod->BSIM3v32k1Given = TRUE; break; case BSIM3v32_MOD_KT1: mod->BSIM3v32kt1 = value->rValue; mod->BSIM3v32kt1Given = TRUE; break; case BSIM3v32_MOD_KT1L: mod->BSIM3v32kt1l = value->rValue; mod->BSIM3v32kt1lGiven = TRUE; break; case BSIM3v32_MOD_KT2: mod->BSIM3v32kt2 = value->rValue; mod->BSIM3v32kt2Given = TRUE; break; case BSIM3v32_MOD_K2: mod->BSIM3v32k2 = value->rValue; mod->BSIM3v32k2Given = TRUE; break; case BSIM3v32_MOD_K3: mod->BSIM3v32k3 = value->rValue; mod->BSIM3v32k3Given = TRUE; break; case BSIM3v32_MOD_K3B: mod->BSIM3v32k3b = value->rValue; mod->BSIM3v32k3bGiven = TRUE; break; case BSIM3v32_MOD_NLX: mod->BSIM3v32nlx = value->rValue; mod->BSIM3v32nlxGiven = TRUE; break; case BSIM3v32_MOD_W0: mod->BSIM3v32w0 = value->rValue; mod->BSIM3v32w0Given = TRUE; break; case BSIM3v32_MOD_DVT0: mod->BSIM3v32dvt0 = value->rValue; mod->BSIM3v32dvt0Given = TRUE; break; case BSIM3v32_MOD_DVT1: mod->BSIM3v32dvt1 = value->rValue; mod->BSIM3v32dvt1Given = TRUE; break; case BSIM3v32_MOD_DVT2: mod->BSIM3v32dvt2 = value->rValue; mod->BSIM3v32dvt2Given = TRUE; break; case BSIM3v32_MOD_DVT0W: mod->BSIM3v32dvt0w = value->rValue; mod->BSIM3v32dvt0wGiven = TRUE; break; case BSIM3v32_MOD_DVT1W: mod->BSIM3v32dvt1w = value->rValue; mod->BSIM3v32dvt1wGiven = TRUE; break; case BSIM3v32_MOD_DVT2W: mod->BSIM3v32dvt2w = value->rValue; mod->BSIM3v32dvt2wGiven = TRUE; break; case BSIM3v32_MOD_DROUT: mod->BSIM3v32drout = value->rValue; mod->BSIM3v32droutGiven = TRUE; break; case BSIM3v32_MOD_DSUB: mod->BSIM3v32dsub = value->rValue; mod->BSIM3v32dsubGiven = TRUE; break; case BSIM3v32_MOD_VTH0: mod->BSIM3v32vth0 = value->rValue; mod->BSIM3v32vth0Given = TRUE; break; case BSIM3v32_MOD_UA: mod->BSIM3v32ua = value->rValue; mod->BSIM3v32uaGiven = TRUE; break; case BSIM3v32_MOD_UA1: mod->BSIM3v32ua1 = value->rValue; mod->BSIM3v32ua1Given = TRUE; break; case BSIM3v32_MOD_UB: mod->BSIM3v32ub = value->rValue; mod->BSIM3v32ubGiven = TRUE; break; case BSIM3v32_MOD_UB1: mod->BSIM3v32ub1 = value->rValue; mod->BSIM3v32ub1Given = TRUE; break; case BSIM3v32_MOD_UC: mod->BSIM3v32uc = value->rValue; mod->BSIM3v32ucGiven = TRUE; break; case BSIM3v32_MOD_UC1: mod->BSIM3v32uc1 = value->rValue; mod->BSIM3v32uc1Given = TRUE; break; case BSIM3v32_MOD_U0 : mod->BSIM3v32u0 = value->rValue; mod->BSIM3v32u0Given = TRUE; break; case BSIM3v32_MOD_UTE : mod->BSIM3v32ute = value->rValue; mod->BSIM3v32uteGiven = TRUE; break; case BSIM3v32_MOD_VOFF: mod->BSIM3v32voff = value->rValue; mod->BSIM3v32voffGiven = TRUE; break; case BSIM3v32_MOD_DELTA : mod->BSIM3v32delta = value->rValue; mod->BSIM3v32deltaGiven = TRUE; break; case BSIM3v32_MOD_RDSW: mod->BSIM3v32rdsw = value->rValue; mod->BSIM3v32rdswGiven = TRUE; break; case BSIM3v32_MOD_PRWG: mod->BSIM3v32prwg = value->rValue; mod->BSIM3v32prwgGiven = TRUE; break; case BSIM3v32_MOD_PRWB: mod->BSIM3v32prwb = value->rValue; mod->BSIM3v32prwbGiven = TRUE; break; case BSIM3v32_MOD_PRT: mod->BSIM3v32prt = value->rValue; mod->BSIM3v32prtGiven = TRUE; break; case BSIM3v32_MOD_ETA0: mod->BSIM3v32eta0 = value->rValue; mod->BSIM3v32eta0Given = TRUE; break; case BSIM3v32_MOD_ETAB: mod->BSIM3v32etab = value->rValue; mod->BSIM3v32etabGiven = TRUE; break; case BSIM3v32_MOD_PCLM: mod->BSIM3v32pclm = value->rValue; mod->BSIM3v32pclmGiven = TRUE; break; case BSIM3v32_MOD_PDIBL1: mod->BSIM3v32pdibl1 = value->rValue; mod->BSIM3v32pdibl1Given = TRUE; break; case BSIM3v32_MOD_PDIBL2: mod->BSIM3v32pdibl2 = value->rValue; mod->BSIM3v32pdibl2Given = TRUE; break; case BSIM3v32_MOD_PDIBLB: mod->BSIM3v32pdiblb = value->rValue; mod->BSIM3v32pdiblbGiven = TRUE; break; case BSIM3v32_MOD_PSCBE1: mod->BSIM3v32pscbe1 = value->rValue; mod->BSIM3v32pscbe1Given = TRUE; break; case BSIM3v32_MOD_PSCBE2: mod->BSIM3v32pscbe2 = value->rValue; mod->BSIM3v32pscbe2Given = TRUE; break; case BSIM3v32_MOD_PVAG: mod->BSIM3v32pvag = value->rValue; mod->BSIM3v32pvagGiven = TRUE; break; case BSIM3v32_MOD_WR : mod->BSIM3v32wr = value->rValue; mod->BSIM3v32wrGiven = TRUE; break; case BSIM3v32_MOD_DWG : mod->BSIM3v32dwg = value->rValue; mod->BSIM3v32dwgGiven = TRUE; break; case BSIM3v32_MOD_DWB : mod->BSIM3v32dwb = value->rValue; mod->BSIM3v32dwbGiven = TRUE; break; case BSIM3v32_MOD_B0 : mod->BSIM3v32b0 = value->rValue; mod->BSIM3v32b0Given = TRUE; break; case BSIM3v32_MOD_B1 : mod->BSIM3v32b1 = value->rValue; mod->BSIM3v32b1Given = TRUE; break; case BSIM3v32_MOD_ALPHA0 : mod->BSIM3v32alpha0 = value->rValue; mod->BSIM3v32alpha0Given = TRUE; break; case BSIM3v32_MOD_ALPHA1 : mod->BSIM3v32alpha1 = value->rValue; mod->BSIM3v32alpha1Given = TRUE; break; case BSIM3v32_MOD_BETA0 : mod->BSIM3v32beta0 = value->rValue; mod->BSIM3v32beta0Given = TRUE; break; case BSIM3v32_MOD_IJTH : mod->BSIM3v32ijth = value->rValue; mod->BSIM3v32ijthGiven = TRUE; break; case BSIM3v32_MOD_VFB : mod->BSIM3v32vfb = value->rValue; mod->BSIM3v32vfbGiven = TRUE; break; case BSIM3v32_MOD_ELM : mod->BSIM3v32elm = value->rValue; mod->BSIM3v32elmGiven = TRUE; break; case BSIM3v32_MOD_CGSL : mod->BSIM3v32cgsl = value->rValue; mod->BSIM3v32cgslGiven = TRUE; break; case BSIM3v32_MOD_CGDL : mod->BSIM3v32cgdl = value->rValue; mod->BSIM3v32cgdlGiven = TRUE; break; case BSIM3v32_MOD_CKAPPA : mod->BSIM3v32ckappa = value->rValue; mod->BSIM3v32ckappaGiven = TRUE; break; case BSIM3v32_MOD_CF : mod->BSIM3v32cf = value->rValue; mod->BSIM3v32cfGiven = TRUE; break; case BSIM3v32_MOD_CLC : mod->BSIM3v32clc = value->rValue; mod->BSIM3v32clcGiven = TRUE; break; case BSIM3v32_MOD_CLE : mod->BSIM3v32cle = value->rValue; mod->BSIM3v32cleGiven = TRUE; break; case BSIM3v32_MOD_DWC : mod->BSIM3v32dwc = value->rValue; mod->BSIM3v32dwcGiven = TRUE; break; case BSIM3v32_MOD_DLC : mod->BSIM3v32dlc = value->rValue; mod->BSIM3v32dlcGiven = TRUE; break; case BSIM3v32_MOD_VFBCV : mod->BSIM3v32vfbcv = value->rValue; mod->BSIM3v32vfbcvGiven = TRUE; break; case BSIM3v32_MOD_ACDE : mod->BSIM3v32acde = value->rValue; mod->BSIM3v32acdeGiven = TRUE; break; case BSIM3v32_MOD_MOIN : mod->BSIM3v32moin = value->rValue; mod->BSIM3v32moinGiven = TRUE; break; case BSIM3v32_MOD_NOFF : mod->BSIM3v32noff = value->rValue; mod->BSIM3v32noffGiven = TRUE; break; case BSIM3v32_MOD_VOFFCV : mod->BSIM3v32voffcv = value->rValue; mod->BSIM3v32voffcvGiven = TRUE; break; case BSIM3v32_MOD_TCJ : mod->BSIM3v32tcj = value->rValue; mod->BSIM3v32tcjGiven = TRUE; break; case BSIM3v32_MOD_TPB : mod->BSIM3v32tpb = value->rValue; mod->BSIM3v32tpbGiven = TRUE; break; case BSIM3v32_MOD_TCJSW : mod->BSIM3v32tcjsw = value->rValue; mod->BSIM3v32tcjswGiven = TRUE; break; case BSIM3v32_MOD_TPBSW : mod->BSIM3v32tpbsw = value->rValue; mod->BSIM3v32tpbswGiven = TRUE; break; case BSIM3v32_MOD_TCJSWG : mod->BSIM3v32tcjswg = value->rValue; mod->BSIM3v32tcjswgGiven = TRUE; break; case BSIM3v32_MOD_TPBSWG : mod->BSIM3v32tpbswg = value->rValue; mod->BSIM3v32tpbswgGiven = TRUE; break; /* acm model */ case BSIM3v32_MOD_HDIF: mod->BSIM3v32hdif = value->rValue; mod->BSIM3v32hdifGiven = TRUE; break; case BSIM3v32_MOD_LDIF: mod->BSIM3v32ldif = value->rValue; mod->BSIM3v32ldifGiven = TRUE; break; case BSIM3v32_MOD_LD: mod->BSIM3v32ld = value->rValue; mod->BSIM3v32ldGiven = TRUE; break; case BSIM3v32_MOD_RD: mod->BSIM3v32rd = value->rValue; mod->BSIM3v32rdGiven = TRUE; break; case BSIM3v32_MOD_RS: mod->BSIM3v32rs = value->rValue; mod->BSIM3v32rsGiven = TRUE; break; case BSIM3v32_MOD_RDC: mod->BSIM3v32rdc = value->rValue; mod->BSIM3v32rdcGiven = TRUE; break; case BSIM3v32_MOD_RSC: mod->BSIM3v32rsc = value->rValue; mod->BSIM3v32rscGiven = TRUE; break; case BSIM3v32_MOD_WMLT: mod->BSIM3v32wmlt = value->rValue; mod->BSIM3v32wmltGiven = TRUE; break; /* Length dependence */ case BSIM3v32_MOD_LCDSC : mod->BSIM3v32lcdsc = value->rValue; mod->BSIM3v32lcdscGiven = TRUE; break; case BSIM3v32_MOD_LCDSCB : mod->BSIM3v32lcdscb = value->rValue; mod->BSIM3v32lcdscbGiven = TRUE; break; case BSIM3v32_MOD_LCDSCD : mod->BSIM3v32lcdscd = value->rValue; mod->BSIM3v32lcdscdGiven = TRUE; break; case BSIM3v32_MOD_LCIT : mod->BSIM3v32lcit = value->rValue; mod->BSIM3v32lcitGiven = TRUE; break; case BSIM3v32_MOD_LNFACTOR : mod->BSIM3v32lnfactor = value->rValue; mod->BSIM3v32lnfactorGiven = TRUE; break; case BSIM3v32_MOD_LXJ: mod->BSIM3v32lxj = value->rValue; mod->BSIM3v32lxjGiven = TRUE; break; case BSIM3v32_MOD_LVSAT: mod->BSIM3v32lvsat = value->rValue; mod->BSIM3v32lvsatGiven = TRUE; break; case BSIM3v32_MOD_LA0: mod->BSIM3v32la0 = value->rValue; mod->BSIM3v32la0Given = TRUE; break; case BSIM3v32_MOD_LAGS: mod->BSIM3v32lags = value->rValue; mod->BSIM3v32lagsGiven = TRUE; break; case BSIM3v32_MOD_LA1: mod->BSIM3v32la1 = value->rValue; mod->BSIM3v32la1Given = TRUE; break; case BSIM3v32_MOD_LA2: mod->BSIM3v32la2 = value->rValue; mod->BSIM3v32la2Given = TRUE; break; case BSIM3v32_MOD_LAT: mod->BSIM3v32lat = value->rValue; mod->BSIM3v32latGiven = TRUE; break; case BSIM3v32_MOD_LKETA: mod->BSIM3v32lketa = value->rValue; mod->BSIM3v32lketaGiven = TRUE; break; case BSIM3v32_MOD_LNSUB: mod->BSIM3v32lnsub = value->rValue; mod->BSIM3v32lnsubGiven = TRUE; break; case BSIM3v32_MOD_LNPEAK: mod->BSIM3v32lnpeak = value->rValue; mod->BSIM3v32lnpeakGiven = TRUE; if (mod->BSIM3v32lnpeak > 1.0e20) mod->BSIM3v32lnpeak *= 1.0e-6; break; case BSIM3v32_MOD_LNGATE: mod->BSIM3v32lngate = value->rValue; mod->BSIM3v32lngateGiven = TRUE; if (mod->BSIM3v32lngate > 1.0e23) mod->BSIM3v32lngate *= 1.0e-6; break; case BSIM3v32_MOD_LGAMMA1: mod->BSIM3v32lgamma1 = value->rValue; mod->BSIM3v32lgamma1Given = TRUE; break; case BSIM3v32_MOD_LGAMMA2: mod->BSIM3v32lgamma2 = value->rValue; mod->BSIM3v32lgamma2Given = TRUE; break; case BSIM3v32_MOD_LVBX: mod->BSIM3v32lvbx = value->rValue; mod->BSIM3v32lvbxGiven = TRUE; break; case BSIM3v32_MOD_LVBM: mod->BSIM3v32lvbm = value->rValue; mod->BSIM3v32lvbmGiven = TRUE; break; case BSIM3v32_MOD_LXT: mod->BSIM3v32lxt = value->rValue; mod->BSIM3v32lxtGiven = TRUE; break; case BSIM3v32_MOD_LK1: mod->BSIM3v32lk1 = value->rValue; mod->BSIM3v32lk1Given = TRUE; break; case BSIM3v32_MOD_LKT1: mod->BSIM3v32lkt1 = value->rValue; mod->BSIM3v32lkt1Given = TRUE; break; case BSIM3v32_MOD_LKT1L: mod->BSIM3v32lkt1l = value->rValue; mod->BSIM3v32lkt1lGiven = TRUE; break; case BSIM3v32_MOD_LKT2: mod->BSIM3v32lkt2 = value->rValue; mod->BSIM3v32lkt2Given = TRUE; break; case BSIM3v32_MOD_LK2: mod->BSIM3v32lk2 = value->rValue; mod->BSIM3v32lk2Given = TRUE; break; case BSIM3v32_MOD_LK3: mod->BSIM3v32lk3 = value->rValue; mod->BSIM3v32lk3Given = TRUE; break; case BSIM3v32_MOD_LK3B: mod->BSIM3v32lk3b = value->rValue; mod->BSIM3v32lk3bGiven = TRUE; break; case BSIM3v32_MOD_LNLX: mod->BSIM3v32lnlx = value->rValue; mod->BSIM3v32lnlxGiven = TRUE; break; case BSIM3v32_MOD_LW0: mod->BSIM3v32lw0 = value->rValue; mod->BSIM3v32lw0Given = TRUE; break; case BSIM3v32_MOD_LDVT0: mod->BSIM3v32ldvt0 = value->rValue; mod->BSIM3v32ldvt0Given = TRUE; break; case BSIM3v32_MOD_LDVT1: mod->BSIM3v32ldvt1 = value->rValue; mod->BSIM3v32ldvt1Given = TRUE; break; case BSIM3v32_MOD_LDVT2: mod->BSIM3v32ldvt2 = value->rValue; mod->BSIM3v32ldvt2Given = TRUE; break; case BSIM3v32_MOD_LDVT0W: mod->BSIM3v32ldvt0w = value->rValue; mod->BSIM3v32ldvt0wGiven = TRUE; break; case BSIM3v32_MOD_LDVT1W: mod->BSIM3v32ldvt1w = value->rValue; mod->BSIM3v32ldvt1wGiven = TRUE; break; case BSIM3v32_MOD_LDVT2W: mod->BSIM3v32ldvt2w = value->rValue; mod->BSIM3v32ldvt2wGiven = TRUE; break; case BSIM3v32_MOD_LDROUT: mod->BSIM3v32ldrout = value->rValue; mod->BSIM3v32ldroutGiven = TRUE; break; case BSIM3v32_MOD_LDSUB: mod->BSIM3v32ldsub = value->rValue; mod->BSIM3v32ldsubGiven = TRUE; break; case BSIM3v32_MOD_LVTH0: mod->BSIM3v32lvth0 = value->rValue; mod->BSIM3v32lvth0Given = TRUE; break; case BSIM3v32_MOD_LUA: mod->BSIM3v32lua = value->rValue; mod->BSIM3v32luaGiven = TRUE; break; case BSIM3v32_MOD_LUA1: mod->BSIM3v32lua1 = value->rValue; mod->BSIM3v32lua1Given = TRUE; break; case BSIM3v32_MOD_LUB: mod->BSIM3v32lub = value->rValue; mod->BSIM3v32lubGiven = TRUE; break; case BSIM3v32_MOD_LUB1: mod->BSIM3v32lub1 = value->rValue; mod->BSIM3v32lub1Given = TRUE; break; case BSIM3v32_MOD_LUC: mod->BSIM3v32luc = value->rValue; mod->BSIM3v32lucGiven = TRUE; break; case BSIM3v32_MOD_LUC1: mod->BSIM3v32luc1 = value->rValue; mod->BSIM3v32luc1Given = TRUE; break; case BSIM3v32_MOD_LU0 : mod->BSIM3v32lu0 = value->rValue; mod->BSIM3v32lu0Given = TRUE; break; case BSIM3v32_MOD_LUTE : mod->BSIM3v32lute = value->rValue; mod->BSIM3v32luteGiven = TRUE; break; case BSIM3v32_MOD_LVOFF: mod->BSIM3v32lvoff = value->rValue; mod->BSIM3v32lvoffGiven = TRUE; break; case BSIM3v32_MOD_LDELTA : mod->BSIM3v32ldelta = value->rValue; mod->BSIM3v32ldeltaGiven = TRUE; break; case BSIM3v32_MOD_LRDSW: mod->BSIM3v32lrdsw = value->rValue; mod->BSIM3v32lrdswGiven = TRUE; break; case BSIM3v32_MOD_LPRWB: mod->BSIM3v32lprwb = value->rValue; mod->BSIM3v32lprwbGiven = TRUE; break; case BSIM3v32_MOD_LPRWG: mod->BSIM3v32lprwg = value->rValue; mod->BSIM3v32lprwgGiven = TRUE; break; case BSIM3v32_MOD_LPRT: mod->BSIM3v32lprt = value->rValue; mod->BSIM3v32lprtGiven = TRUE; break; case BSIM3v32_MOD_LETA0: mod->BSIM3v32leta0 = value->rValue; mod->BSIM3v32leta0Given = TRUE; break; case BSIM3v32_MOD_LETAB: mod->BSIM3v32letab = value->rValue; mod->BSIM3v32letabGiven = TRUE; break; case BSIM3v32_MOD_LPCLM: mod->BSIM3v32lpclm = value->rValue; mod->BSIM3v32lpclmGiven = TRUE; break; case BSIM3v32_MOD_LPDIBL1: mod->BSIM3v32lpdibl1 = value->rValue; mod->BSIM3v32lpdibl1Given = TRUE; break; case BSIM3v32_MOD_LPDIBL2: mod->BSIM3v32lpdibl2 = value->rValue; mod->BSIM3v32lpdibl2Given = TRUE; break; case BSIM3v32_MOD_LPDIBLB: mod->BSIM3v32lpdiblb = value->rValue; mod->BSIM3v32lpdiblbGiven = TRUE; break; case BSIM3v32_MOD_LPSCBE1: mod->BSIM3v32lpscbe1 = value->rValue; mod->BSIM3v32lpscbe1Given = TRUE; break; case BSIM3v32_MOD_LPSCBE2: mod->BSIM3v32lpscbe2 = value->rValue; mod->BSIM3v32lpscbe2Given = TRUE; break; case BSIM3v32_MOD_LPVAG: mod->BSIM3v32lpvag = value->rValue; mod->BSIM3v32lpvagGiven = TRUE; break; case BSIM3v32_MOD_LWR : mod->BSIM3v32lwr = value->rValue; mod->BSIM3v32lwrGiven = TRUE; break; case BSIM3v32_MOD_LDWG : mod->BSIM3v32ldwg = value->rValue; mod->BSIM3v32ldwgGiven = TRUE; break; case BSIM3v32_MOD_LDWB : mod->BSIM3v32ldwb = value->rValue; mod->BSIM3v32ldwbGiven = TRUE; break; case BSIM3v32_MOD_LB0 : mod->BSIM3v32lb0 = value->rValue; mod->BSIM3v32lb0Given = TRUE; break; case BSIM3v32_MOD_LB1 : mod->BSIM3v32lb1 = value->rValue; mod->BSIM3v32lb1Given = TRUE; break; case BSIM3v32_MOD_LALPHA0 : mod->BSIM3v32lalpha0 = value->rValue; mod->BSIM3v32lalpha0Given = TRUE; break; case BSIM3v32_MOD_LALPHA1 : mod->BSIM3v32lalpha1 = value->rValue; mod->BSIM3v32lalpha1Given = TRUE; break; case BSIM3v32_MOD_LBETA0 : mod->BSIM3v32lbeta0 = value->rValue; mod->BSIM3v32lbeta0Given = TRUE; break; case BSIM3v32_MOD_LVFB : mod->BSIM3v32lvfb = value->rValue; mod->BSIM3v32lvfbGiven = TRUE; break; case BSIM3v32_MOD_LELM : mod->BSIM3v32lelm = value->rValue; mod->BSIM3v32lelmGiven = TRUE; break; case BSIM3v32_MOD_LCGSL : mod->BSIM3v32lcgsl = value->rValue; mod->BSIM3v32lcgslGiven = TRUE; break; case BSIM3v32_MOD_LCGDL : mod->BSIM3v32lcgdl = value->rValue; mod->BSIM3v32lcgdlGiven = TRUE; break; case BSIM3v32_MOD_LCKAPPA : mod->BSIM3v32lckappa = value->rValue; mod->BSIM3v32lckappaGiven = TRUE; break; case BSIM3v32_MOD_LCF : mod->BSIM3v32lcf = value->rValue; mod->BSIM3v32lcfGiven = TRUE; break; case BSIM3v32_MOD_LCLC : mod->BSIM3v32lclc = value->rValue; mod->BSIM3v32lclcGiven = TRUE; break; case BSIM3v32_MOD_LCLE : mod->BSIM3v32lcle = value->rValue; mod->BSIM3v32lcleGiven = TRUE; break; case BSIM3v32_MOD_LVFBCV : mod->BSIM3v32lvfbcv = value->rValue; mod->BSIM3v32lvfbcvGiven = TRUE; break; case BSIM3v32_MOD_LACDE : mod->BSIM3v32lacde = value->rValue; mod->BSIM3v32lacdeGiven = TRUE; break; case BSIM3v32_MOD_LMOIN : mod->BSIM3v32lmoin = value->rValue; mod->BSIM3v32lmoinGiven = TRUE; break; case BSIM3v32_MOD_LNOFF : mod->BSIM3v32lnoff = value->rValue; mod->BSIM3v32lnoffGiven = TRUE; break; case BSIM3v32_MOD_LVOFFCV : mod->BSIM3v32lvoffcv = value->rValue; mod->BSIM3v32lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM3v32_MOD_WCDSC : mod->BSIM3v32wcdsc = value->rValue; mod->BSIM3v32wcdscGiven = TRUE; break; case BSIM3v32_MOD_WCDSCB : mod->BSIM3v32wcdscb = value->rValue; mod->BSIM3v32wcdscbGiven = TRUE; break; case BSIM3v32_MOD_WCDSCD : mod->BSIM3v32wcdscd = value->rValue; mod->BSIM3v32wcdscdGiven = TRUE; break; case BSIM3v32_MOD_WCIT : mod->BSIM3v32wcit = value->rValue; mod->BSIM3v32wcitGiven = TRUE; break; case BSIM3v32_MOD_WNFACTOR : mod->BSIM3v32wnfactor = value->rValue; mod->BSIM3v32wnfactorGiven = TRUE; break; case BSIM3v32_MOD_WXJ: mod->BSIM3v32wxj = value->rValue; mod->BSIM3v32wxjGiven = TRUE; break; case BSIM3v32_MOD_WVSAT: mod->BSIM3v32wvsat = value->rValue; mod->BSIM3v32wvsatGiven = TRUE; break; case BSIM3v32_MOD_WA0: mod->BSIM3v32wa0 = value->rValue; mod->BSIM3v32wa0Given = TRUE; break; case BSIM3v32_MOD_WAGS: mod->BSIM3v32wags = value->rValue; mod->BSIM3v32wagsGiven = TRUE; break; case BSIM3v32_MOD_WA1: mod->BSIM3v32wa1 = value->rValue; mod->BSIM3v32wa1Given = TRUE; break; case BSIM3v32_MOD_WA2: mod->BSIM3v32wa2 = value->rValue; mod->BSIM3v32wa2Given = TRUE; break; case BSIM3v32_MOD_WAT: mod->BSIM3v32wat = value->rValue; mod->BSIM3v32watGiven = TRUE; break; case BSIM3v32_MOD_WKETA: mod->BSIM3v32wketa = value->rValue; mod->BSIM3v32wketaGiven = TRUE; break; case BSIM3v32_MOD_WNSUB: mod->BSIM3v32wnsub = value->rValue; mod->BSIM3v32wnsubGiven = TRUE; break; case BSIM3v32_MOD_WNPEAK: mod->BSIM3v32wnpeak = value->rValue; mod->BSIM3v32wnpeakGiven = TRUE; if (mod->BSIM3v32wnpeak > 1.0e20) mod->BSIM3v32wnpeak *= 1.0e-6; break; case BSIM3v32_MOD_WNGATE: mod->BSIM3v32wngate = value->rValue; mod->BSIM3v32wngateGiven = TRUE; if (mod->BSIM3v32wngate > 1.0e23) mod->BSIM3v32wngate *= 1.0e-6; break; case BSIM3v32_MOD_WGAMMA1: mod->BSIM3v32wgamma1 = value->rValue; mod->BSIM3v32wgamma1Given = TRUE; break; case BSIM3v32_MOD_WGAMMA2: mod->BSIM3v32wgamma2 = value->rValue; mod->BSIM3v32wgamma2Given = TRUE; break; case BSIM3v32_MOD_WVBX: mod->BSIM3v32wvbx = value->rValue; mod->BSIM3v32wvbxGiven = TRUE; break; case BSIM3v32_MOD_WVBM: mod->BSIM3v32wvbm = value->rValue; mod->BSIM3v32wvbmGiven = TRUE; break; case BSIM3v32_MOD_WXT: mod->BSIM3v32wxt = value->rValue; mod->BSIM3v32wxtGiven = TRUE; break; case BSIM3v32_MOD_WK1: mod->BSIM3v32wk1 = value->rValue; mod->BSIM3v32wk1Given = TRUE; break; case BSIM3v32_MOD_WKT1: mod->BSIM3v32wkt1 = value->rValue; mod->BSIM3v32wkt1Given = TRUE; break; case BSIM3v32_MOD_WKT1L: mod->BSIM3v32wkt1l = value->rValue; mod->BSIM3v32wkt1lGiven = TRUE; break; case BSIM3v32_MOD_WKT2: mod->BSIM3v32wkt2 = value->rValue; mod->BSIM3v32wkt2Given = TRUE; break; case BSIM3v32_MOD_WK2: mod->BSIM3v32wk2 = value->rValue; mod->BSIM3v32wk2Given = TRUE; break; case BSIM3v32_MOD_WK3: mod->BSIM3v32wk3 = value->rValue; mod->BSIM3v32wk3Given = TRUE; break; case BSIM3v32_MOD_WK3B: mod->BSIM3v32wk3b = value->rValue; mod->BSIM3v32wk3bGiven = TRUE; break; case BSIM3v32_MOD_WNLX: mod->BSIM3v32wnlx = value->rValue; mod->BSIM3v32wnlxGiven = TRUE; break; case BSIM3v32_MOD_WW0: mod->BSIM3v32ww0 = value->rValue; mod->BSIM3v32ww0Given = TRUE; break; case BSIM3v32_MOD_WDVT0: mod->BSIM3v32wdvt0 = value->rValue; mod->BSIM3v32wdvt0Given = TRUE; break; case BSIM3v32_MOD_WDVT1: mod->BSIM3v32wdvt1 = value->rValue; mod->BSIM3v32wdvt1Given = TRUE; break; case BSIM3v32_MOD_WDVT2: mod->BSIM3v32wdvt2 = value->rValue; mod->BSIM3v32wdvt2Given = TRUE; break; case BSIM3v32_MOD_WDVT0W: mod->BSIM3v32wdvt0w = value->rValue; mod->BSIM3v32wdvt0wGiven = TRUE; break; case BSIM3v32_MOD_WDVT1W: mod->BSIM3v32wdvt1w = value->rValue; mod->BSIM3v32wdvt1wGiven = TRUE; break; case BSIM3v32_MOD_WDVT2W: mod->BSIM3v32wdvt2w = value->rValue; mod->BSIM3v32wdvt2wGiven = TRUE; break; case BSIM3v32_MOD_WDROUT: mod->BSIM3v32wdrout = value->rValue; mod->BSIM3v32wdroutGiven = TRUE; break; case BSIM3v32_MOD_WDSUB: mod->BSIM3v32wdsub = value->rValue; mod->BSIM3v32wdsubGiven = TRUE; break; case BSIM3v32_MOD_WVTH0: mod->BSIM3v32wvth0 = value->rValue; mod->BSIM3v32wvth0Given = TRUE; break; case BSIM3v32_MOD_WUA: mod->BSIM3v32wua = value->rValue; mod->BSIM3v32wuaGiven = TRUE; break; case BSIM3v32_MOD_WUA1: mod->BSIM3v32wua1 = value->rValue; mod->BSIM3v32wua1Given = TRUE; break; case BSIM3v32_MOD_WUB: mod->BSIM3v32wub = value->rValue; mod->BSIM3v32wubGiven = TRUE; break; case BSIM3v32_MOD_WUB1: mod->BSIM3v32wub1 = value->rValue; mod->BSIM3v32wub1Given = TRUE; break; case BSIM3v32_MOD_WUC: mod->BSIM3v32wuc = value->rValue; mod->BSIM3v32wucGiven = TRUE; break; case BSIM3v32_MOD_WUC1: mod->BSIM3v32wuc1 = value->rValue; mod->BSIM3v32wuc1Given = TRUE; break; case BSIM3v32_MOD_WU0 : mod->BSIM3v32wu0 = value->rValue; mod->BSIM3v32wu0Given = TRUE; break; case BSIM3v32_MOD_WUTE : mod->BSIM3v32wute = value->rValue; mod->BSIM3v32wuteGiven = TRUE; break; case BSIM3v32_MOD_WVOFF: mod->BSIM3v32wvoff = value->rValue; mod->BSIM3v32wvoffGiven = TRUE; break; case BSIM3v32_MOD_WDELTA : mod->BSIM3v32wdelta = value->rValue; mod->BSIM3v32wdeltaGiven = TRUE; break; case BSIM3v32_MOD_WRDSW: mod->BSIM3v32wrdsw = value->rValue; mod->BSIM3v32wrdswGiven = TRUE; break; case BSIM3v32_MOD_WPRWB: mod->BSIM3v32wprwb = value->rValue; mod->BSIM3v32wprwbGiven = TRUE; break; case BSIM3v32_MOD_WPRWG: mod->BSIM3v32wprwg = value->rValue; mod->BSIM3v32wprwgGiven = TRUE; break; case BSIM3v32_MOD_WPRT: mod->BSIM3v32wprt = value->rValue; mod->BSIM3v32wprtGiven = TRUE; break; case BSIM3v32_MOD_WETA0: mod->BSIM3v32weta0 = value->rValue; mod->BSIM3v32weta0Given = TRUE; break; case BSIM3v32_MOD_WETAB: mod->BSIM3v32wetab = value->rValue; mod->BSIM3v32wetabGiven = TRUE; break; case BSIM3v32_MOD_WPCLM: mod->BSIM3v32wpclm = value->rValue; mod->BSIM3v32wpclmGiven = TRUE; break; case BSIM3v32_MOD_WPDIBL1: mod->BSIM3v32wpdibl1 = value->rValue; mod->BSIM3v32wpdibl1Given = TRUE; break; case BSIM3v32_MOD_WPDIBL2: mod->BSIM3v32wpdibl2 = value->rValue; mod->BSIM3v32wpdibl2Given = TRUE; break; case BSIM3v32_MOD_WPDIBLB: mod->BSIM3v32wpdiblb = value->rValue; mod->BSIM3v32wpdiblbGiven = TRUE; break; case BSIM3v32_MOD_WPSCBE1: mod->BSIM3v32wpscbe1 = value->rValue; mod->BSIM3v32wpscbe1Given = TRUE; break; case BSIM3v32_MOD_WPSCBE2: mod->BSIM3v32wpscbe2 = value->rValue; mod->BSIM3v32wpscbe2Given = TRUE; break; case BSIM3v32_MOD_WPVAG: mod->BSIM3v32wpvag = value->rValue; mod->BSIM3v32wpvagGiven = TRUE; break; case BSIM3v32_MOD_WWR : mod->BSIM3v32wwr = value->rValue; mod->BSIM3v32wwrGiven = TRUE; break; case BSIM3v32_MOD_WDWG : mod->BSIM3v32wdwg = value->rValue; mod->BSIM3v32wdwgGiven = TRUE; break; case BSIM3v32_MOD_WDWB : mod->BSIM3v32wdwb = value->rValue; mod->BSIM3v32wdwbGiven = TRUE; break; case BSIM3v32_MOD_WB0 : mod->BSIM3v32wb0 = value->rValue; mod->BSIM3v32wb0Given = TRUE; break; case BSIM3v32_MOD_WB1 : mod->BSIM3v32wb1 = value->rValue; mod->BSIM3v32wb1Given = TRUE; break; case BSIM3v32_MOD_WALPHA0 : mod->BSIM3v32walpha0 = value->rValue; mod->BSIM3v32walpha0Given = TRUE; break; case BSIM3v32_MOD_WALPHA1 : mod->BSIM3v32walpha1 = value->rValue; mod->BSIM3v32walpha1Given = TRUE; break; case BSIM3v32_MOD_WBETA0 : mod->BSIM3v32wbeta0 = value->rValue; mod->BSIM3v32wbeta0Given = TRUE; break; case BSIM3v32_MOD_WVFB : mod->BSIM3v32wvfb = value->rValue; mod->BSIM3v32wvfbGiven = TRUE; break; case BSIM3v32_MOD_WELM : mod->BSIM3v32welm = value->rValue; mod->BSIM3v32welmGiven = TRUE; break; case BSIM3v32_MOD_WCGSL : mod->BSIM3v32wcgsl = value->rValue; mod->BSIM3v32wcgslGiven = TRUE; break; case BSIM3v32_MOD_WCGDL : mod->BSIM3v32wcgdl = value->rValue; mod->BSIM3v32wcgdlGiven = TRUE; break; case BSIM3v32_MOD_WCKAPPA : mod->BSIM3v32wckappa = value->rValue; mod->BSIM3v32wckappaGiven = TRUE; break; case BSIM3v32_MOD_WCF : mod->BSIM3v32wcf = value->rValue; mod->BSIM3v32wcfGiven = TRUE; break; case BSIM3v32_MOD_WCLC : mod->BSIM3v32wclc = value->rValue; mod->BSIM3v32wclcGiven = TRUE; break; case BSIM3v32_MOD_WCLE : mod->BSIM3v32wcle = value->rValue; mod->BSIM3v32wcleGiven = TRUE; break; case BSIM3v32_MOD_WVFBCV : mod->BSIM3v32wvfbcv = value->rValue; mod->BSIM3v32wvfbcvGiven = TRUE; break; case BSIM3v32_MOD_WACDE : mod->BSIM3v32wacde = value->rValue; mod->BSIM3v32wacdeGiven = TRUE; break; case BSIM3v32_MOD_WMOIN : mod->BSIM3v32wmoin = value->rValue; mod->BSIM3v32wmoinGiven = TRUE; break; case BSIM3v32_MOD_WNOFF : mod->BSIM3v32wnoff = value->rValue; mod->BSIM3v32wnoffGiven = TRUE; break; case BSIM3v32_MOD_WVOFFCV : mod->BSIM3v32wvoffcv = value->rValue; mod->BSIM3v32wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM3v32_MOD_PCDSC : mod->BSIM3v32pcdsc = value->rValue; mod->BSIM3v32pcdscGiven = TRUE; break; case BSIM3v32_MOD_PCDSCB : mod->BSIM3v32pcdscb = value->rValue; mod->BSIM3v32pcdscbGiven = TRUE; break; case BSIM3v32_MOD_PCDSCD : mod->BSIM3v32pcdscd = value->rValue; mod->BSIM3v32pcdscdGiven = TRUE; break; case BSIM3v32_MOD_PCIT : mod->BSIM3v32pcit = value->rValue; mod->BSIM3v32pcitGiven = TRUE; break; case BSIM3v32_MOD_PNFACTOR : mod->BSIM3v32pnfactor = value->rValue; mod->BSIM3v32pnfactorGiven = TRUE; break; case BSIM3v32_MOD_PXJ: mod->BSIM3v32pxj = value->rValue; mod->BSIM3v32pxjGiven = TRUE; break; case BSIM3v32_MOD_PVSAT: mod->BSIM3v32pvsat = value->rValue; mod->BSIM3v32pvsatGiven = TRUE; break; case BSIM3v32_MOD_PA0: mod->BSIM3v32pa0 = value->rValue; mod->BSIM3v32pa0Given = TRUE; break; case BSIM3v32_MOD_PAGS: mod->BSIM3v32pags = value->rValue; mod->BSIM3v32pagsGiven = TRUE; break; case BSIM3v32_MOD_PA1: mod->BSIM3v32pa1 = value->rValue; mod->BSIM3v32pa1Given = TRUE; break; case BSIM3v32_MOD_PA2: mod->BSIM3v32pa2 = value->rValue; mod->BSIM3v32pa2Given = TRUE; break; case BSIM3v32_MOD_PAT: mod->BSIM3v32pat = value->rValue; mod->BSIM3v32patGiven = TRUE; break; case BSIM3v32_MOD_PKETA: mod->BSIM3v32pketa = value->rValue; mod->BSIM3v32pketaGiven = TRUE; break; case BSIM3v32_MOD_PNSUB: mod->BSIM3v32pnsub = value->rValue; mod->BSIM3v32pnsubGiven = TRUE; break; case BSIM3v32_MOD_PNPEAK: mod->BSIM3v32pnpeak = value->rValue; mod->BSIM3v32pnpeakGiven = TRUE; if (mod->BSIM3v32pnpeak > 1.0e20) mod->BSIM3v32pnpeak *= 1.0e-6; break; case BSIM3v32_MOD_PNGATE: mod->BSIM3v32pngate = value->rValue; mod->BSIM3v32pngateGiven = TRUE; if (mod->BSIM3v32pngate > 1.0e23) mod->BSIM3v32pngate *= 1.0e-6; break; case BSIM3v32_MOD_PGAMMA1: mod->BSIM3v32pgamma1 = value->rValue; mod->BSIM3v32pgamma1Given = TRUE; break; case BSIM3v32_MOD_PGAMMA2: mod->BSIM3v32pgamma2 = value->rValue; mod->BSIM3v32pgamma2Given = TRUE; break; case BSIM3v32_MOD_PVBX: mod->BSIM3v32pvbx = value->rValue; mod->BSIM3v32pvbxGiven = TRUE; break; case BSIM3v32_MOD_PVBM: mod->BSIM3v32pvbm = value->rValue; mod->BSIM3v32pvbmGiven = TRUE; break; case BSIM3v32_MOD_PXT: mod->BSIM3v32pxt = value->rValue; mod->BSIM3v32pxtGiven = TRUE; break; case BSIM3v32_MOD_PK1: mod->BSIM3v32pk1 = value->rValue; mod->BSIM3v32pk1Given = TRUE; break; case BSIM3v32_MOD_PKT1: mod->BSIM3v32pkt1 = value->rValue; mod->BSIM3v32pkt1Given = TRUE; break; case BSIM3v32_MOD_PKT1L: mod->BSIM3v32pkt1l = value->rValue; mod->BSIM3v32pkt1lGiven = TRUE; break; case BSIM3v32_MOD_PKT2: mod->BSIM3v32pkt2 = value->rValue; mod->BSIM3v32pkt2Given = TRUE; break; case BSIM3v32_MOD_PK2: mod->BSIM3v32pk2 = value->rValue; mod->BSIM3v32pk2Given = TRUE; break; case BSIM3v32_MOD_PK3: mod->BSIM3v32pk3 = value->rValue; mod->BSIM3v32pk3Given = TRUE; break; case BSIM3v32_MOD_PK3B: mod->BSIM3v32pk3b = value->rValue; mod->BSIM3v32pk3bGiven = TRUE; break; case BSIM3v32_MOD_PNLX: mod->BSIM3v32pnlx = value->rValue; mod->BSIM3v32pnlxGiven = TRUE; break; case BSIM3v32_MOD_PW0: mod->BSIM3v32pw0 = value->rValue; mod->BSIM3v32pw0Given = TRUE; break; case BSIM3v32_MOD_PDVT0: mod->BSIM3v32pdvt0 = value->rValue; mod->BSIM3v32pdvt0Given = TRUE; break; case BSIM3v32_MOD_PDVT1: mod->BSIM3v32pdvt1 = value->rValue; mod->BSIM3v32pdvt1Given = TRUE; break; case BSIM3v32_MOD_PDVT2: mod->BSIM3v32pdvt2 = value->rValue; mod->BSIM3v32pdvt2Given = TRUE; break; case BSIM3v32_MOD_PDVT0W: mod->BSIM3v32pdvt0w = value->rValue; mod->BSIM3v32pdvt0wGiven = TRUE; break; case BSIM3v32_MOD_PDVT1W: mod->BSIM3v32pdvt1w = value->rValue; mod->BSIM3v32pdvt1wGiven = TRUE; break; case BSIM3v32_MOD_PDVT2W: mod->BSIM3v32pdvt2w = value->rValue; mod->BSIM3v32pdvt2wGiven = TRUE; break; case BSIM3v32_MOD_PDROUT: mod->BSIM3v32pdrout = value->rValue; mod->BSIM3v32pdroutGiven = TRUE; break; case BSIM3v32_MOD_PDSUB: mod->BSIM3v32pdsub = value->rValue; mod->BSIM3v32pdsubGiven = TRUE; break; case BSIM3v32_MOD_PVTH0: mod->BSIM3v32pvth0 = value->rValue; mod->BSIM3v32pvth0Given = TRUE; break; case BSIM3v32_MOD_PUA: mod->BSIM3v32pua = value->rValue; mod->BSIM3v32puaGiven = TRUE; break; case BSIM3v32_MOD_PUA1: mod->BSIM3v32pua1 = value->rValue; mod->BSIM3v32pua1Given = TRUE; break; case BSIM3v32_MOD_PUB: mod->BSIM3v32pub = value->rValue; mod->BSIM3v32pubGiven = TRUE; break; case BSIM3v32_MOD_PUB1: mod->BSIM3v32pub1 = value->rValue; mod->BSIM3v32pub1Given = TRUE; break; case BSIM3v32_MOD_PUC: mod->BSIM3v32puc = value->rValue; mod->BSIM3v32pucGiven = TRUE; break; case BSIM3v32_MOD_PUC1: mod->BSIM3v32puc1 = value->rValue; mod->BSIM3v32puc1Given = TRUE; break; case BSIM3v32_MOD_PU0 : mod->BSIM3v32pu0 = value->rValue; mod->BSIM3v32pu0Given = TRUE; break; case BSIM3v32_MOD_PUTE : mod->BSIM3v32pute = value->rValue; mod->BSIM3v32puteGiven = TRUE; break; case BSIM3v32_MOD_PVOFF: mod->BSIM3v32pvoff = value->rValue; mod->BSIM3v32pvoffGiven = TRUE; break; case BSIM3v32_MOD_PDELTA : mod->BSIM3v32pdelta = value->rValue; mod->BSIM3v32pdeltaGiven = TRUE; break; case BSIM3v32_MOD_PRDSW: mod->BSIM3v32prdsw = value->rValue; mod->BSIM3v32prdswGiven = TRUE; break; case BSIM3v32_MOD_PPRWB: mod->BSIM3v32pprwb = value->rValue; mod->BSIM3v32pprwbGiven = TRUE; break; case BSIM3v32_MOD_PPRWG: mod->BSIM3v32pprwg = value->rValue; mod->BSIM3v32pprwgGiven = TRUE; break; case BSIM3v32_MOD_PPRT: mod->BSIM3v32pprt = value->rValue; mod->BSIM3v32pprtGiven = TRUE; break; case BSIM3v32_MOD_PETA0: mod->BSIM3v32peta0 = value->rValue; mod->BSIM3v32peta0Given = TRUE; break; case BSIM3v32_MOD_PETAB: mod->BSIM3v32petab = value->rValue; mod->BSIM3v32petabGiven = TRUE; break; case BSIM3v32_MOD_PPCLM: mod->BSIM3v32ppclm = value->rValue; mod->BSIM3v32ppclmGiven = TRUE; break; case BSIM3v32_MOD_PPDIBL1: mod->BSIM3v32ppdibl1 = value->rValue; mod->BSIM3v32ppdibl1Given = TRUE; break; case BSIM3v32_MOD_PPDIBL2: mod->BSIM3v32ppdibl2 = value->rValue; mod->BSIM3v32ppdibl2Given = TRUE; break; case BSIM3v32_MOD_PPDIBLB: mod->BSIM3v32ppdiblb = value->rValue; mod->BSIM3v32ppdiblbGiven = TRUE; break; case BSIM3v32_MOD_PPSCBE1: mod->BSIM3v32ppscbe1 = value->rValue; mod->BSIM3v32ppscbe1Given = TRUE; break; case BSIM3v32_MOD_PPSCBE2: mod->BSIM3v32ppscbe2 = value->rValue; mod->BSIM3v32ppscbe2Given = TRUE; break; case BSIM3v32_MOD_PPVAG: mod->BSIM3v32ppvag = value->rValue; mod->BSIM3v32ppvagGiven = TRUE; break; case BSIM3v32_MOD_PWR : mod->BSIM3v32pwr = value->rValue; mod->BSIM3v32pwrGiven = TRUE; break; case BSIM3v32_MOD_PDWG : mod->BSIM3v32pdwg = value->rValue; mod->BSIM3v32pdwgGiven = TRUE; break; case BSIM3v32_MOD_PDWB : mod->BSIM3v32pdwb = value->rValue; mod->BSIM3v32pdwbGiven = TRUE; break; case BSIM3v32_MOD_PB0 : mod->BSIM3v32pb0 = value->rValue; mod->BSIM3v32pb0Given = TRUE; break; case BSIM3v32_MOD_PB1 : mod->BSIM3v32pb1 = value->rValue; mod->BSIM3v32pb1Given = TRUE; break; case BSIM3v32_MOD_PALPHA0 : mod->BSIM3v32palpha0 = value->rValue; mod->BSIM3v32palpha0Given = TRUE; break; case BSIM3v32_MOD_PALPHA1 : mod->BSIM3v32palpha1 = value->rValue; mod->BSIM3v32palpha1Given = TRUE; break; case BSIM3v32_MOD_PBETA0 : mod->BSIM3v32pbeta0 = value->rValue; mod->BSIM3v32pbeta0Given = TRUE; break; case BSIM3v32_MOD_PVFB : mod->BSIM3v32pvfb = value->rValue; mod->BSIM3v32pvfbGiven = TRUE; break; case BSIM3v32_MOD_PELM : mod->BSIM3v32pelm = value->rValue; mod->BSIM3v32pelmGiven = TRUE; break; case BSIM3v32_MOD_PCGSL : mod->BSIM3v32pcgsl = value->rValue; mod->BSIM3v32pcgslGiven = TRUE; break; case BSIM3v32_MOD_PCGDL : mod->BSIM3v32pcgdl = value->rValue; mod->BSIM3v32pcgdlGiven = TRUE; break; case BSIM3v32_MOD_PCKAPPA : mod->BSIM3v32pckappa = value->rValue; mod->BSIM3v32pckappaGiven = TRUE; break; case BSIM3v32_MOD_PCF : mod->BSIM3v32pcf = value->rValue; mod->BSIM3v32pcfGiven = TRUE; break; case BSIM3v32_MOD_PCLC : mod->BSIM3v32pclc = value->rValue; mod->BSIM3v32pclcGiven = TRUE; break; case BSIM3v32_MOD_PCLE : mod->BSIM3v32pcle = value->rValue; mod->BSIM3v32pcleGiven = TRUE; break; case BSIM3v32_MOD_PVFBCV : mod->BSIM3v32pvfbcv = value->rValue; mod->BSIM3v32pvfbcvGiven = TRUE; break; case BSIM3v32_MOD_PACDE : mod->BSIM3v32pacde = value->rValue; mod->BSIM3v32pacdeGiven = TRUE; break; case BSIM3v32_MOD_PMOIN : mod->BSIM3v32pmoin = value->rValue; mod->BSIM3v32pmoinGiven = TRUE; break; case BSIM3v32_MOD_PNOFF : mod->BSIM3v32pnoff = value->rValue; mod->BSIM3v32pnoffGiven = TRUE; break; case BSIM3v32_MOD_PVOFFCV : mod->BSIM3v32pvoffcv = value->rValue; mod->BSIM3v32pvoffcvGiven = TRUE; break; case BSIM3v32_MOD_TNOM : mod->BSIM3v32tnom = value->rValue + CONSTCtoK; mod->BSIM3v32tnomGiven = TRUE; break; case BSIM3v32_MOD_CGSO : mod->BSIM3v32cgso = value->rValue; mod->BSIM3v32cgsoGiven = TRUE; break; case BSIM3v32_MOD_CGDO : mod->BSIM3v32cgdo = value->rValue; mod->BSIM3v32cgdoGiven = TRUE; break; case BSIM3v32_MOD_CGBO : mod->BSIM3v32cgbo = value->rValue; mod->BSIM3v32cgboGiven = TRUE; break; case BSIM3v32_MOD_XPART : mod->BSIM3v32xpart = value->rValue; mod->BSIM3v32xpartGiven = TRUE; break; case BSIM3v32_MOD_RSH : mod->BSIM3v32sheetResistance = value->rValue; mod->BSIM3v32sheetResistanceGiven = TRUE; break; case BSIM3v32_MOD_JS : mod->BSIM3v32jctSatCurDensity = value->rValue; mod->BSIM3v32jctSatCurDensityGiven = TRUE; break; case BSIM3v32_MOD_JSW : mod->BSIM3v32jctSidewallSatCurDensity = value->rValue; mod->BSIM3v32jctSidewallSatCurDensityGiven = TRUE; break; case BSIM3v32_MOD_PB : mod->BSIM3v32bulkJctPotential = value->rValue; mod->BSIM3v32bulkJctPotentialGiven = TRUE; break; case BSIM3v32_MOD_MJ : mod->BSIM3v32bulkJctBotGradingCoeff = value->rValue; mod->BSIM3v32bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM3v32_MOD_PBSW : mod->BSIM3v32sidewallJctPotential = value->rValue; mod->BSIM3v32sidewallJctPotentialGiven = TRUE; break; case BSIM3v32_MOD_MJSW : mod->BSIM3v32bulkJctSideGradingCoeff = value->rValue; mod->BSIM3v32bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM3v32_MOD_CJ : mod->BSIM3v32unitAreaJctCap = value->rValue; mod->BSIM3v32unitAreaJctCapGiven = TRUE; break; case BSIM3v32_MOD_CJSW : mod->BSIM3v32unitLengthSidewallJctCap = value->rValue; mod->BSIM3v32unitLengthSidewallJctCapGiven = TRUE; break; case BSIM3v32_MOD_NJ : mod->BSIM3v32jctEmissionCoeff = value->rValue; mod->BSIM3v32jctEmissionCoeffGiven = TRUE; break; case BSIM3v32_MOD_PBSWG : mod->BSIM3v32GatesidewallJctPotential = value->rValue; mod->BSIM3v32GatesidewallJctPotentialGiven = TRUE; break; case BSIM3v32_MOD_MJSWG : mod->BSIM3v32bulkJctGateSideGradingCoeff = value->rValue; mod->BSIM3v32bulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM3v32_MOD_CJSWG : mod->BSIM3v32unitLengthGateSidewallJctCap = value->rValue; mod->BSIM3v32unitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM3v32_MOD_XTI : mod->BSIM3v32jctTempExponent = value->rValue; mod->BSIM3v32jctTempExponentGiven = TRUE; break; case BSIM3v32_MOD_LINT : mod->BSIM3v32Lint = value->rValue; mod->BSIM3v32LintGiven = TRUE; break; case BSIM3v32_MOD_LL : mod->BSIM3v32Ll = value->rValue; mod->BSIM3v32LlGiven = TRUE; break; case BSIM3v32_MOD_LLC : mod->BSIM3v32Llc = value->rValue; mod->BSIM3v32LlcGiven = TRUE; break; case BSIM3v32_MOD_LLN : mod->BSIM3v32Lln = value->rValue; mod->BSIM3v32LlnGiven = TRUE; break; case BSIM3v32_MOD_LW : mod->BSIM3v32Lw = value->rValue; mod->BSIM3v32LwGiven = TRUE; break; case BSIM3v32_MOD_LWC : mod->BSIM3v32Lwc = value->rValue; mod->BSIM3v32LwcGiven = TRUE; break; case BSIM3v32_MOD_LWN : mod->BSIM3v32Lwn = value->rValue; mod->BSIM3v32LwnGiven = TRUE; break; case BSIM3v32_MOD_LWL : mod->BSIM3v32Lwl = value->rValue; mod->BSIM3v32LwlGiven = TRUE; break; case BSIM3v32_MOD_LWLC : mod->BSIM3v32Lwlc = value->rValue; mod->BSIM3v32LwlcGiven = TRUE; break; case BSIM3v32_MOD_LMIN : mod->BSIM3v32Lmin = value->rValue; mod->BSIM3v32LminGiven = TRUE; break; case BSIM3v32_MOD_LMAX : mod->BSIM3v32Lmax = value->rValue; mod->BSIM3v32LmaxGiven = TRUE; break; case BSIM3v32_MOD_WINT : mod->BSIM3v32Wint = value->rValue; mod->BSIM3v32WintGiven = TRUE; break; case BSIM3v32_MOD_WL : mod->BSIM3v32Wl = value->rValue; mod->BSIM3v32WlGiven = TRUE; break; case BSIM3v32_MOD_WLC : mod->BSIM3v32Wlc = value->rValue; mod->BSIM3v32WlcGiven = TRUE; break; case BSIM3v32_MOD_WLN : mod->BSIM3v32Wln = value->rValue; mod->BSIM3v32WlnGiven = TRUE; break; case BSIM3v32_MOD_WW : mod->BSIM3v32Ww = value->rValue; mod->BSIM3v32WwGiven = TRUE; break; case BSIM3v32_MOD_WWC : mod->BSIM3v32Wwc = value->rValue; mod->BSIM3v32WwcGiven = TRUE; break; case BSIM3v32_MOD_WWN : mod->BSIM3v32Wwn = value->rValue; mod->BSIM3v32WwnGiven = TRUE; break; case BSIM3v32_MOD_WWL : mod->BSIM3v32Wwl = value->rValue; mod->BSIM3v32WwlGiven = TRUE; break; case BSIM3v32_MOD_WWLC : mod->BSIM3v32Wwlc = value->rValue; mod->BSIM3v32WwlcGiven = TRUE; break; case BSIM3v32_MOD_WMIN : mod->BSIM3v32Wmin = value->rValue; mod->BSIM3v32WminGiven = TRUE; break; case BSIM3v32_MOD_WMAX : mod->BSIM3v32Wmax = value->rValue; mod->BSIM3v32WmaxGiven = TRUE; break; case BSIM3v32_MOD_XL: mod->BSIM3v32xl = value->rValue; mod->BSIM3v32xlGiven = TRUE; break; case BSIM3v32_MOD_XW: mod->BSIM3v32xw = value->rValue; mod->BSIM3v32xwGiven = TRUE; break; case BSIM3v32_MOD_NOIA : mod->BSIM3v32oxideTrapDensityA = value->rValue; mod->BSIM3v32oxideTrapDensityAGiven = TRUE; break; case BSIM3v32_MOD_NOIB : mod->BSIM3v32oxideTrapDensityB = value->rValue; mod->BSIM3v32oxideTrapDensityBGiven = TRUE; break; case BSIM3v32_MOD_NOIC : mod->BSIM3v32oxideTrapDensityC = value->rValue; mod->BSIM3v32oxideTrapDensityCGiven = TRUE; break; case BSIM3v32_MOD_EM : mod->BSIM3v32em = value->rValue; mod->BSIM3v32emGiven = TRUE; break; case BSIM3v32_MOD_EF : mod->BSIM3v32ef = value->rValue; mod->BSIM3v32efGiven = TRUE; break; case BSIM3v32_MOD_AF : mod->BSIM3v32af = value->rValue; mod->BSIM3v32afGiven = TRUE; break; case BSIM3v32_MOD_KF : mod->BSIM3v32kf = value->rValue; mod->BSIM3v32kfGiven = TRUE; break; case BSIM3v32_MOD_VGS_MAX: mod->BSIM3v32vgsMax = value->rValue; mod->BSIM3v32vgsMaxGiven = TRUE; break; case BSIM3v32_MOD_VGD_MAX: mod->BSIM3v32vgdMax = value->rValue; mod->BSIM3v32vgdMaxGiven = TRUE; break; case BSIM3v32_MOD_VGB_MAX: mod->BSIM3v32vgbMax = value->rValue; mod->BSIM3v32vgbMaxGiven = TRUE; break; case BSIM3v32_MOD_VDS_MAX: mod->BSIM3v32vdsMax = value->rValue; mod->BSIM3v32vdsMaxGiven = TRUE; break; case BSIM3v32_MOD_VBS_MAX: mod->BSIM3v32vbsMax = value->rValue; mod->BSIM3v32vbsMaxGiven = TRUE; break; case BSIM3v32_MOD_VBD_MAX: mod->BSIM3v32vbdMax = value->rValue; mod->BSIM3v32vbdMaxGiven = TRUE; break; case BSIM3v32_MOD_NMOS : if(value->iValue) { mod->BSIM3v32type = 1; mod->BSIM3v32typeGiven = TRUE; } break; case BSIM3v32_MOD_PMOS : if(value->iValue) { mod->BSIM3v32type = - 1; mod->BSIM3v32typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32acld.c0000644000265600020320000003627112264261473021444 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3acld.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32acLoad (GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega; double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb; double xcqgb = 0.0, xcqdb = 0.0, xcqsb = 0.0, xcqbb = 0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here!= NULL; here = here->BSIM3v32nextInstance) { if (here->BSIM3v32mode >= 0) { Gm = here->BSIM3v32gm; Gmbs = here->BSIM3v32gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -here->BSIM3v32gbds; gbbsp = here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs; gbdpg = here->BSIM3v32gbgs; gbdpb = here->BSIM3v32gbbs; gbdpdp = here->BSIM3v32gbds; gbdpsp = -(gbdpg + gbdpb + gbdpdp); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (here->BSIM3v32nqsMod == 0) { cggb = here->BSIM3v32cggb; cgsb = here->BSIM3v32cgsb; cgdb = here->BSIM3v32cgdb; cbgb = here->BSIM3v32cbgb; cbsb = here->BSIM3v32cbsb; cbdb = here->BSIM3v32cbdb; cdgb = here->BSIM3v32cdgb; cdsb = here->BSIM3v32cdsb; cddb = here->BSIM3v32cddb; xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3v32gtg; xgtd = here->BSIM3v32gtd; xgts = here->BSIM3v32gts; xgtb = here->BSIM3v32gtb; xcqgb = here->BSIM3v32cqgb * omega; xcqdb = here->BSIM3v32cqdb * omega; xcqsb = here->BSIM3v32cqsb * omega; xcqbb = here->BSIM3v32cqbb * omega; CoxWL = model->BSIM3v32cox * here->pParam->BSIM3v32weffCV * here->pParam->BSIM3v32leffCV; qcheq = -(here->BSIM3v32qgate + here->BSIM3v32qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM3v32qdrn / qcheq; Cdd = here->BSIM3v32cddb; Csd = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3v32cdgb; Csg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3v32cdsb; Css = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM3v32gm; Gmbs = -here->BSIM3v32gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -here->BSIM3v32gbds; gbbdp = here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3v32gbgs; gbspsp = here->BSIM3v32gbds; gbspb = here->BSIM3v32gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (here->BSIM3v32nqsMod == 0) { cggb = here->BSIM3v32cggb; cgsb = here->BSIM3v32cgdb; cgdb = here->BSIM3v32cgsb; cbgb = here->BSIM3v32cbgb; cbsb = here->BSIM3v32cbdb; cbdb = here->BSIM3v32cbsb; cdgb = -(here->BSIM3v32cdgb + cggb + cbgb); cdsb = -(here->BSIM3v32cddb + cgsb + cbsb); cddb = -(here->BSIM3v32cdsb + cgdb + cbdb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3v32gtg; xgtd = here->BSIM3v32gts; xgts = here->BSIM3v32gtd; xgtb = here->BSIM3v32gtb; xcqgb = here->BSIM3v32cqgb * omega; xcqdb = here->BSIM3v32cqsb * omega; xcqsb = here->BSIM3v32cqdb * omega; xcqbb = here->BSIM3v32cqbb * omega; CoxWL = model->BSIM3v32cox * here->pParam->BSIM3v32weffCV * here->pParam->BSIM3v32leffCV; qcheq = -(here->BSIM3v32qgate + here->BSIM3v32qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM3v32qdrn / qcheq; Css = here->BSIM3v32cddb; Cds = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3v32cdgb; Cdg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3v32cdsb; Cdd = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } T1 = *(ckt->CKTstate0 + here->BSIM3v32qdef) * here->BSIM3v32gtau; gdpr = here->BSIM3v32drainConductance; gspr = here->BSIM3v32sourceConductance; gds = here->BSIM3v32gds; gbd = here->BSIM3v32gbd; gbs = here->BSIM3v32gbs; capbd = here->BSIM3v32capbd; capbs = here->BSIM3v32capbs; GSoverlapCap = here->BSIM3v32cgso; GDoverlapCap = here->BSIM3v32cgdo; GBoverlapCap = here->pParam->BSIM3v32cgbo; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + capbd + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcbgb = (cbgb - GBoverlapCap) * omega; xcbdb = (cbdb - capbd ) * omega; xcbsb = (cbsb - capbs ) * omega; m = here->BSIM3v32m; *(here->BSIM3v32GgPtr + 1) += m * xcggb; *(here->BSIM3v32BbPtr + 1) -= m * (xcbgb + xcbdb + xcbsb); *(here->BSIM3v32DPdpPtr + 1) += m * xcddb; *(here->BSIM3v32SPspPtr + 1) += m * xcssb; *(here->BSIM3v32GbPtr + 1) -= m * (xcggb + xcgdb + xcgsb); *(here->BSIM3v32GdpPtr + 1) += m * xcgdb; *(here->BSIM3v32GspPtr + 1) += m * xcgsb; *(here->BSIM3v32BgPtr + 1) += m * xcbgb; *(here->BSIM3v32BdpPtr + 1) += m * xcbdb; *(here->BSIM3v32BspPtr + 1) += m * xcbsb; *(here->BSIM3v32DPgPtr + 1) += m * xcdgb; *(here->BSIM3v32DPbPtr + 1) -= m * (xcdgb + xcddb + xcdsb); *(here->BSIM3v32DPspPtr + 1) += m * xcdsb; *(here->BSIM3v32SPgPtr + 1) += m * xcsgb; *(here->BSIM3v32SPbPtr + 1) -= m * (xcsgb + xcsdb + xcssb); *(here->BSIM3v32SPdpPtr + 1) += m * xcsdb; *(here->BSIM3v32DdPtr) += m * gdpr; *(here->BSIM3v32SsPtr) += m * gspr; *(here->BSIM3v32BbPtr) += m * (gbd + gbs - here->BSIM3v32gbbs); *(here->BSIM3v32DPdpPtr) += m * (gdpr + gds + gbd + RevSum + dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp); *(here->BSIM3v32SPspPtr) += m * (gspr + gds + gbs + FwdSum + sxpart * xgts + T1 * dsxpart_dVs + gbspsp); *(here->BSIM3v32DdpPtr) -= m * gdpr; *(here->BSIM3v32SspPtr) -= m * gspr; *(here->BSIM3v32BgPtr) -= m * here->BSIM3v32gbgs; *(here->BSIM3v32BdpPtr) -= m * (gbd - gbbdp); *(here->BSIM3v32BspPtr) -= m * (gbs - gbbsp); *(here->BSIM3v32DPdPtr) -= m * gdpr; *(here->BSIM3v32DPgPtr) += m * (Gm + dxpart * xgtg + T1 * ddxpart_dVg + gbdpg); *(here->BSIM3v32DPbPtr) -= m * (gbd - Gmbs - dxpart * xgtb - T1 * ddxpart_dVb - gbdpb); *(here->BSIM3v32DPspPtr) -= m * (gds + FwdSum - dxpart * xgts - T1 * ddxpart_dVs - gbdpsp); *(here->BSIM3v32SPgPtr) -= m * (Gm - sxpart * xgtg - T1 * dsxpart_dVg - gbspg); *(here->BSIM3v32SPsPtr) -= m * gspr; *(here->BSIM3v32SPbPtr) -= m * (gbs + Gmbs - sxpart * xgtb - T1 * dsxpart_dVb - gbspb); *(here->BSIM3v32SPdpPtr) -= m * (gds + RevSum - sxpart * xgtd - T1 * dsxpart_dVd - gbspdp); *(here->BSIM3v32GgPtr) -= m * xgtg; *(here->BSIM3v32GbPtr) -= m * xgtb; *(here->BSIM3v32GdpPtr) -= m * xgtd; *(here->BSIM3v32GspPtr) -= m * xgts; if (here->BSIM3v32nqsMod) { *(here->BSIM3v32QqPtr + 1) += m * omega * ScalingFactor; *(here->BSIM3v32QgPtr + 1) -= m * xcqgb; *(here->BSIM3v32QdpPtr + 1) -= m * xcqdb; *(here->BSIM3v32QspPtr + 1) -= m * xcqsb; *(here->BSIM3v32QbPtr + 1) -= m * xcqbb; *(here->BSIM3v32QqPtr) += m * here->BSIM3v32gtau; *(here->BSIM3v32DPqPtr) += m * (dxpart * here->BSIM3v32gtau); *(here->BSIM3v32SPqPtr) += m * (sxpart * here->BSIM3v32gtau); *(here->BSIM3v32GqPtr) -= m * here->BSIM3v32gtau; *(here->BSIM3v32QgPtr) += m * xgtg; *(here->BSIM3v32QdpPtr) += m * xgtd; *(here->BSIM3v32QspPtr) += m * xgts; *(here->BSIM3v32QbPtr) += m * xgtb; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32soachk.c0000644000265600020320000000730612264261473022006 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BSIM3v32soaCheck(CKTcircuit *ckt, GENmodel *inModel) { BSIM3v32model *model = (BSIM3v32model *) inModel; BSIM3v32instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->BSIM3v32gNode] - ckt->CKTrhsOld [here->BSIM3v32sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->BSIM3v32gNode] - ckt->CKTrhsOld [here->BSIM3v32dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->BSIM3v32gNode] - ckt->CKTrhsOld [here->BSIM3v32bNode]); vds = fabs(ckt->CKTrhsOld [here->BSIM3v32dNodePrime] - ckt->CKTrhsOld [here->BSIM3v32sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->BSIM3v32bNode] - ckt->CKTrhsOld [here->BSIM3v32sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->BSIM3v32bNode] - ckt->CKTrhsOld [here->BSIM3v32dNodePrime]); if (vgs > model->BSIM3v32vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->BSIM3v32vgsMax); warns_vgs++; } if (vgd > model->BSIM3v32vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->BSIM3v32vgdMax); warns_vgd++; } if (vgb > model->BSIM3v32vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->BSIM3v32vgbMax); warns_vgb++; } if (vds > model->BSIM3v32vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->BSIM3v32vdsMax); warns_vds++; } if (vbs > model->BSIM3v32vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->BSIM3v32vbsMax); warns_vbs++; } if (vbd > model->BSIM3v32vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->BSIM3v32vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3v32/bsim3v32init.c0000644000265600020320000000432312264261473022206 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim3v32itf.h" #include "bsim3v32ext.h" #include "bsim3v32init.h" SPICEdev BSIM3v32info = { { "BSIM3v32", "Berkeley Short Channel IGFET Model Version-3", &BSIM3v32nSize, &BSIM3v32nSize, BSIM3v32names, &BSIM3v32pTSize, BSIM3v32pTable, &BSIM3v32mPTSize, BSIM3v32mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ BSIM3v32param, /* DEVmodParam */ BSIM3v32mParam, /* DEVload */ BSIM3v32load, /* DEVsetup */ BSIM3v32setup, /* DEVunsetup */ BSIM3v32unsetup, /* DEVpzSetup */ BSIM3v32setup, /* DEVtemperature*/ BSIM3v32temp, /* DEVtrunc */ BSIM3v32trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ BSIM3v32acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ BSIM3v32destroy, /* DEVmodDelete */ BSIM3v32mDelete, /* DEVdelete */ BSIM3v32delete, /* DEVsetic */ BSIM3v32getic, /* DEVask */ BSIM3v32ask, /* DEVmodAsk */ BSIM3v32mAsk, /* DEVpzLoad */ BSIM3v32pzLoad, /* DEVconvTest */ BSIM3v32convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ BSIM3v32noise, /* DEVsoaCheck */ BSIM3v32soaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &BSIM3v32iSize, /* DEVmodSize */ &BSIM3v32mSize }; SPICEdev * get_bsim3v32_info(void) { return &BSIM3v32info; } ngspice-26/src/spicelib/devices/bsim3v32/b3v32pzld.c0000644000265600020320000004036312264261473021507 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3pzld.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim3v32def.h" #include "ngspice/suffix.h" int BSIM3v32pzLoad (GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb; double xcqgb = 0.0, xcqdb = 0.0, xcqsb = 0.0, xcqbb = 0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; double m; for (; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here!= NULL; here = here->BSIM3v32nextInstance) { if (here->BSIM3v32mode >= 0) { Gm = here->BSIM3v32gm; Gmbs = here->BSIM3v32gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -here->BSIM3v32gbds; gbbsp = here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs; gbdpg = here->BSIM3v32gbgs; gbdpdp = here->BSIM3v32gbds; gbdpb = here->BSIM3v32gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (here->BSIM3v32nqsMod == 0) { cggb = here->BSIM3v32cggb; cgsb = here->BSIM3v32cgsb; cgdb = here->BSIM3v32cgdb; cbgb = here->BSIM3v32cbgb; cbsb = here->BSIM3v32cbsb; cbdb = here->BSIM3v32cbdb; cdgb = here->BSIM3v32cdgb; cdsb = here->BSIM3v32cdsb; cddb = here->BSIM3v32cddb; xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3v32gtg; xgtd = here->BSIM3v32gtd; xgts = here->BSIM3v32gts; xgtb = here->BSIM3v32gtb; xcqgb = here->BSIM3v32cqgb; xcqdb = here->BSIM3v32cqdb; xcqsb = here->BSIM3v32cqsb; xcqbb = here->BSIM3v32cqbb; CoxWL = model->BSIM3v32cox * here->pParam->BSIM3v32weffCV * here->pParam->BSIM3v32leffCV; qcheq = -(here->BSIM3v32qgate + here->BSIM3v32qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM3v32qdrn / qcheq; Cdd = here->BSIM3v32cddb; Csd = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3v32cdgb; Csg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3v32cdsb; Css = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM3v32gm; Gmbs = -here->BSIM3v32gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -here->BSIM3v32gbds; gbbdp = here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3v32gbgs; gbspsp = here->BSIM3v32gbds; gbspb = here->BSIM3v32gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (here->BSIM3v32nqsMod == 0) { cggb = here->BSIM3v32cggb; cgsb = here->BSIM3v32cgdb; cgdb = here->BSIM3v32cgsb; cbgb = here->BSIM3v32cbgb; cbsb = here->BSIM3v32cbdb; cbdb = here->BSIM3v32cbsb; cdgb = -(here->BSIM3v32cdgb + cggb + cbgb); cdsb = -(here->BSIM3v32cddb + cgsb + cbsb); cddb = -(here->BSIM3v32cdsb + cgdb + cbdb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { cggb = cgdb = cgsb = 0.0; cbgb = cbdb = cbsb = 0.0; cdgb = cddb = cdsb = 0.0; xgtg = here->BSIM3v32gtg; xgtd = here->BSIM3v32gts; xgts = here->BSIM3v32gtd; xgtb = here->BSIM3v32gtb; xcqgb = here->BSIM3v32cqgb; xcqdb = here->BSIM3v32cqsb; xcqsb = here->BSIM3v32cqdb; xcqbb = here->BSIM3v32cqbb; CoxWL = model->BSIM3v32cox * here->pParam->BSIM3v32weffCV * here->pParam->BSIM3v32leffCV; qcheq = -(here->BSIM3v32qgate + here->BSIM3v32qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM3v32qdrn / qcheq; Css = here->BSIM3v32cddb; Cds = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3v32cdgb; Cdg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3v32cdsb; Cdd = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } T1 = *(ckt->CKTstate0 + here->BSIM3v32qdef) * here->BSIM3v32gtau; gdpr = here->BSIM3v32drainConductance; gspr = here->BSIM3v32sourceConductance; gds = here->BSIM3v32gds; gbd = here->BSIM3v32gbd; gbs = here->BSIM3v32gbs; capbd = here->BSIM3v32capbd; capbs = here->BSIM3v32capbs; GSoverlapCap = here->BSIM3v32cgso; GDoverlapCap = here->BSIM3v32cgdo; GBoverlapCap = here->pParam->BSIM3v32cgbo; xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcdbb = -(xcdgb + xcddb + xcdsb); xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)); xcsbb = -(xcsgb + xcsdb + xcssb); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcgbb = -(xcggb + xcgdb + xcgsb); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); xcbbb = -(xcbgb + xcbdb + xcbsb); m = here->BSIM3v32m; *(here->BSIM3v32GgPtr ) += m * (xcggb * s->real); *(here->BSIM3v32GgPtr +1) += m * (xcggb * s->imag); *(here->BSIM3v32BbPtr ) += m * (xcbbb * s->real); *(here->BSIM3v32BbPtr +1) += m * (xcbbb * s->imag); *(here->BSIM3v32DPdpPtr ) += m * (xcddb * s->real); *(here->BSIM3v32DPdpPtr +1) += m * (xcddb * s->imag); *(here->BSIM3v32SPspPtr ) += m * (xcssb * s->real); *(here->BSIM3v32SPspPtr +1) += m * (xcssb * s->imag); *(here->BSIM3v32GbPtr ) += m * (xcgbb * s->real); *(here->BSIM3v32GbPtr +1) += m * (xcgbb * s->imag); *(here->BSIM3v32GdpPtr ) += m * (xcgdb * s->real); *(here->BSIM3v32GdpPtr +1) += m * (xcgdb * s->imag); *(here->BSIM3v32GspPtr ) += m * (xcgsb * s->real); *(here->BSIM3v32GspPtr +1) += m * (xcgsb * s->imag); *(here->BSIM3v32BgPtr ) += m * (xcbgb * s->real); *(here->BSIM3v32BgPtr +1) += m * (xcbgb * s->imag); *(here->BSIM3v32BdpPtr ) += m * (xcbdb * s->real); *(here->BSIM3v32BdpPtr +1) += m * (xcbdb * s->imag); *(here->BSIM3v32BspPtr ) += m * (xcbsb * s->real); *(here->BSIM3v32BspPtr +1) += m * (xcbsb * s->imag); *(here->BSIM3v32DPgPtr ) += m * (xcdgb * s->real); *(here->BSIM3v32DPgPtr +1) += m * (xcdgb * s->imag); *(here->BSIM3v32DPbPtr ) += m * (xcdbb * s->real); *(here->BSIM3v32DPbPtr +1) += m * (xcdbb * s->imag); *(here->BSIM3v32DPspPtr ) += m * (xcdsb * s->real); *(here->BSIM3v32DPspPtr +1) += m * (xcdsb * s->imag); *(here->BSIM3v32SPgPtr ) += m * (xcsgb * s->real); *(here->BSIM3v32SPgPtr +1) += m * (xcsgb * s->imag); *(here->BSIM3v32SPbPtr ) += m * (xcsbb * s->real); *(here->BSIM3v32SPbPtr +1) += m * (xcsbb * s->imag); *(here->BSIM3v32SPdpPtr ) += m * (xcsdb * s->real); *(here->BSIM3v32SPdpPtr +1) += m * (xcsdb * s->imag); *(here->BSIM3v32DdPtr) += m * gdpr; *(here->BSIM3v32DdpPtr) -= m * gdpr; *(here->BSIM3v32DPdPtr) -= m * gdpr; *(here->BSIM3v32SsPtr) += m * gspr; *(here->BSIM3v32SspPtr) -= m * gspr; *(here->BSIM3v32SPsPtr) -= m * gspr; *(here->BSIM3v32BgPtr) -= m * here->BSIM3v32gbgs; *(here->BSIM3v32BbPtr) += m * (gbd + gbs - here->BSIM3v32gbbs); *(here->BSIM3v32BdpPtr) -= m * (gbd - gbbdp); *(here->BSIM3v32BspPtr) -= m * (gbs - gbbsp); *(here->BSIM3v32DPgPtr) += Gm + dxpart * xgtg + T1 * ddxpart_dVg + gbdpg; *(here->BSIM3v32DPdpPtr) += gdpr + gds + gbd + RevSum + dxpart * xgtd + T1 * ddxpart_dVd + gbdpdp; *(here->BSIM3v32DPspPtr) -= gds + FwdSum - dxpart * xgts - T1 * ddxpart_dVs - gbdpsp; *(here->BSIM3v32DPbPtr) -= gbd - Gmbs - dxpart * xgtb - T1 * ddxpart_dVb - gbdpb; *(here->BSIM3v32SPgPtr) -= Gm - sxpart * xgtg - T1 * dsxpart_dVg - gbspg; *(here->BSIM3v32SPspPtr) += gspr + gds + gbs + FwdSum + sxpart * xgts + T1 * dsxpart_dVs + gbspsp; *(here->BSIM3v32SPbPtr) -= gbs + Gmbs - sxpart * xgtb - T1 * dsxpart_dVb - gbspb; *(here->BSIM3v32SPdpPtr) -= gds + RevSum - sxpart * xgtd - T1 * dsxpart_dVd - gbspdp; *(here->BSIM3v32GgPtr) -= xgtg; *(here->BSIM3v32GbPtr) -= xgtb; *(here->BSIM3v32GdpPtr) -= xgtd; *(here->BSIM3v32GspPtr) -= xgts; if (here->BSIM3v32nqsMod) { *(here->BSIM3v32QqPtr ) += m * (s->real * ScalingFactor); *(here->BSIM3v32QqPtr +1) += m * (s->imag * ScalingFactor); *(here->BSIM3v32QgPtr ) -= m * (xcqgb * s->real); *(here->BSIM3v32QgPtr +1) -= m * (xcqgb * s->imag); *(here->BSIM3v32QdpPtr ) -= m * (xcqdb * s->real); *(here->BSIM3v32QdpPtr +1) -= m * (xcqdb * s->imag); *(here->BSIM3v32QbPtr ) -= m * (xcqbb * s->real); *(here->BSIM3v32QbPtr +1) -= m * (xcqbb * s->imag); *(here->BSIM3v32QspPtr ) -= m * (xcqsb * s->real); *(here->BSIM3v32QspPtr +1) -= m * (xcqsb * s->imag); *(here->BSIM3v32GqPtr) -= m * (here->BSIM3v32gtau); *(here->BSIM3v32DPqPtr) += m * (dxpart * here->BSIM3v32gtau); *(here->BSIM3v32SPqPtr) += m * (sxpart * here->BSIM3v32gtau); *(here->BSIM3v32QqPtr) += m * (here->BSIM3v32gtau); *(here->BSIM3v32QgPtr) += m * xgtg; *(here->BSIM3v32QdpPtr) += m * xgtd; *(here->BSIM3v32QbPtr) += m * xgtb; *(here->BSIM3v32QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32ld.c0000644000265600020320000043175312264261473021144 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3ld.c of BSIM3v3.2.4 * Author: 1991 JianHui Huang and Min-Chie Jeng. * Modified by Mansun Chan (1995). * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/21, 2001. * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 int BSIM3v32load (GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; double SourceSatCurrent, DrainSatCurrent; double ag0, qgd, qgs, qgb, von, cbhat, VgstNVt, ExpVgst; double cdrain, cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVd = 0.0, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; #ifndef NEWCONV double tol; #endif double gcsgb, gcssb, MJ, MJSW, MJSWG; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double qgate = 0.0, qbulk = 0.0, qdrn = 0.0, qsrc; double qinoi, cqgate, cqbulk, cqdrn; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb = 0.0, dVfb_dVd = 0.0; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtm; double Vtm; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double ExpArg, V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg, dDeltaPhi_dVd, dDeltaPhi_dVb; double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVg, dCoxeff_dVd, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4; double T5; double T6; double T7; double T8; double T9; double T10; double T11, T12; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot, Ibtot; #ifndef NOBYPASS double tempv; #endif double a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double qcheq = 0.0, qdef, gqdef = 0.0, cqdef, cqcheq, gtau_diff, gtau_drift; double gcqdb = 0.0,gcqsb = 0.0, gcqgb = 0.0,gcqbb = 0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVd = 0.0, dQac0_dVb, dQsub0_dVg; double dQsub0_dVd, dQsub0_dVb; double m; struct bsim3v32SizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded, error; ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEDCTRANCURVE | MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; for (; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here != NULL; here = here->BSIM3v32nextInstance) { Check = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->BSIM3v32vbs); vgs = *(ckt->CKTstate0 + here->BSIM3v32vgs); vds = *(ckt->CKTstate0 + here->BSIM3v32vds); qdef = *(ckt->CKTstate0 + here->BSIM3v32qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->BSIM3v32vbs); vgs = *(ckt->CKTstate1 + here->BSIM3v32vgs); vds = *(ckt->CKTstate1 + here->BSIM3v32vds); qdef = *(ckt->CKTstate1 + here->BSIM3v32qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM3v32off) { vds = model->BSIM3v32type * here->BSIM3v32icVDS; vgs = model->BSIM3v32type * here->BSIM3v32icVGS; vbs = model->BSIM3v32type * here->BSIM3v32icVBS; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = model->BSIM3v32type * here->BSIM3v32vth0 + 0.1; vds = 0.1; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM3v32off)) { qdef = vbs = vgs = vds = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM3v32vbs) = *(ckt->CKTstate1 + here->BSIM3v32vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v32vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v32vbs))); *(ckt->CKTstate0 + here->BSIM3v32vgs) = *(ckt->CKTstate1 + here->BSIM3v32vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v32vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v32vgs))); *(ckt->CKTstate0 + here->BSIM3v32vds) = *(ckt->CKTstate1 + here->BSIM3v32vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v32vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v32vds))); *(ckt->CKTstate0 + here->BSIM3v32vbd) = *(ckt->CKTstate0 + here->BSIM3v32vbs) - *(ckt->CKTstate0 + here->BSIM3v32vds); *(ckt->CKTstate0 + here->BSIM3v32qdef) = *(ckt->CKTstate1 + here->BSIM3v32qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v32qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM3v32qdef))); } else { #endif /* PREDICTOR */ vbs = model->BSIM3v32type * (*(ckt->CKTrhsOld + here->BSIM3v32bNode) - *(ckt->CKTrhsOld + here->BSIM3v32sNodePrime)); vgs = model->BSIM3v32type * (*(ckt->CKTrhsOld + here->BSIM3v32gNode) - *(ckt->CKTrhsOld + here->BSIM3v32sNodePrime)); vds = model->BSIM3v32type * (*(ckt->CKTrhsOld + here->BSIM3v32dNodePrime) - *(ckt->CKTrhsOld + here->BSIM3v32sNodePrime)); qdef = model->BSIM3v32type * (*(ckt->CKTrhsOld + here->BSIM3v32qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v32vgs) - *(ckt->CKTstate0 + here->BSIM3v32vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v32vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v32vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v32vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v32vds); delvgd = vgd - vgdo; if (here->BSIM3v32mode >= 0) { Idtot = here->BSIM3v32cd + here->BSIM3v32csub - here->BSIM3v32cbd; cdhat = Idtot - here->BSIM3v32gbd * delvbd + (here->BSIM3v32gmbs + here->BSIM3v32gbbs) * delvbs + (here->BSIM3v32gm + here->BSIM3v32gbgs) * delvgs + (here->BSIM3v32gds + here->BSIM3v32gbds) * delvds; Ibtot = here->BSIM3v32cbs + here->BSIM3v32cbd - here->BSIM3v32csub; cbhat = Ibtot + here->BSIM3v32gbd * delvbd + (here->BSIM3v32gbs - here->BSIM3v32gbbs) * delvbs - here->BSIM3v32gbgs * delvgs - here->BSIM3v32gbds * delvds; } else { Idtot = here->BSIM3v32cd - here->BSIM3v32cbd; cdhat = Idtot - (here->BSIM3v32gbd - here->BSIM3v32gmbs) * delvbd + here->BSIM3v32gm * delvgd - here->BSIM3v32gds * delvds; Ibtot = here->BSIM3v32cbs + here->BSIM3v32cbd - here->BSIM3v32csub; cbhat = Ibtot + here->BSIM3v32gbs * delvbs + (here->BSIM3v32gbd - here->BSIM3v32gbbs) * delvbd - here->BSIM3v32gbgs * delvgd + here->BSIM3v32gbds * delvds; } #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->BSIM3v32vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->BSIM3v32vbd))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->BSIM3v32vgs))) + ckt->CKTvoltTol))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->BSIM3v32vds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(Idtot)) + ckt->CKTabstol)) { tempv = MAX(fabs(cbhat),fabs(Ibtot)) + ckt->CKTabstol; if ((fabs(cbhat - Ibtot)) < ckt->CKTreltol * tempv) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->BSIM3v32vbs); vbd = *(ckt->CKTstate0 + here->BSIM3v32vbd); vgs = *(ckt->CKTstate0 + here->BSIM3v32vgs); vds = *(ckt->CKTstate0 + here->BSIM3v32vds); qdef = *(ckt->CKTstate0 + here->BSIM3v32qdef); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->BSIM3v32cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM3v32qgate; qbulk = here->BSIM3v32qbulk; qdrn = here->BSIM3v32qdrn; goto line755; } else { goto line850; } } } #endif /*NOBYPASS*/ von = here->BSIM3v32von; if (*(ckt->CKTstate0 + here->BSIM3v32vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0+here->BSIM3v32vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM3v32vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0+here->BSIM3v32vds))); vgs = vgd + vds; } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM3v32vbs), CONSTvt0, model->BSIM3v32vcrit, &Check); vbd = vbs - vds; } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM3v32vbd), CONSTvt0, model->BSIM3v32vcrit, &Check); vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* Source/drain junction diode DC model begins */ Nvtm = model->BSIM3v32vtm * model->BSIM3v32jctEmissionCoeff; /* acm model */ if (model->BSIM3v32acmMod == 0) { if ((here->BSIM3v32sourceArea <= 0.0) && (here->BSIM3v32sourcePerimeter <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM3v32sourceArea * model->BSIM3v32jctTempSatCurDensity + here->BSIM3v32sourcePerimeter * model->BSIM3v32jctSidewallTempSatCurDensity; } if ((here->BSIM3v32drainArea <= 0.0) && (here->BSIM3v32drainPerimeter <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM3v32drainArea * model->BSIM3v32jctTempSatCurDensity + here->BSIM3v32drainPerimeter * model->BSIM3v32jctSidewallTempSatCurDensity; } } else { error = ACM_saturationCurrents( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, model->BSIM3v32hdif, model->BSIM3v32wmlt, here->BSIM3v32w, model->BSIM3v32xw, model->BSIM3v32jctTempSatCurDensity, model->BSIM3v32jctSidewallTempSatCurDensity, here->BSIM3v32drainAreaGiven, here->BSIM3v32drainArea, here->BSIM3v32drainPerimeterGiven, here->BSIM3v32drainPerimeter, here->BSIM3v32sourceAreaGiven, here->BSIM3v32sourceArea, here->BSIM3v32sourcePerimeterGiven, here->BSIM3v32sourcePerimeter, &DrainSatCurrent, &SourceSatCurrent ); if (error) return(error); } if (SourceSatCurrent <= 0.0) { here->BSIM3v32gbs = ckt->CKTgmin; here->BSIM3v32cbs = here->BSIM3v32gbs * vbs; } else { if (model->BSIM3v32ijth == 0.0) { evbs = exp(vbs / Nvtm); here->BSIM3v32gbs = SourceSatCurrent * evbs / Nvtm + ckt->CKTgmin; here->BSIM3v32cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { if (vbs < here->BSIM3v32vjsm) { evbs = exp(vbs / Nvtm); here->BSIM3v32gbs = SourceSatCurrent * evbs / Nvtm + ckt->CKTgmin; here->BSIM3v32cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: T0 = here->BSIM3v32IsEvjsm / Nvtm; here->BSIM3v32gbs = T0 + (ckt->CKTgmin); here->BSIM3v32cbs = here->BSIM3v32IsEvjsm - SourceSatCurrent + T0 * (vbs - here->BSIM3v32vjsm) + (ckt->CKTgmin) * vbs; break; case BSIM3v32V32: default: T0 = (SourceSatCurrent + model->BSIM3v32ijth) / Nvtm; here->BSIM3v32gbs = T0 + (ckt->CKTgmin); here->BSIM3v32cbs = model->BSIM3v32ijth + (ckt->CKTgmin) * vbs + T0 * (vbs - here->BSIM3v32vjsm); } } } } if (DrainSatCurrent <= 0.0) { here->BSIM3v32gbd = ckt->CKTgmin; here->BSIM3v32cbd = here->BSIM3v32gbd * vbd; } else { if (model->BSIM3v32ijth == 0.0) { evbd = exp(vbd / Nvtm); here->BSIM3v32gbd = DrainSatCurrent * evbd / Nvtm + ckt->CKTgmin; here->BSIM3v32cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { if (vbd < here->BSIM3v32vjdm) { evbd = exp(vbd / Nvtm); here->BSIM3v32gbd = DrainSatCurrent * evbd / Nvtm + ckt->CKTgmin; here->BSIM3v32cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: T0 = here->BSIM3v32IsEvjdm / Nvtm; here->BSIM3v32gbd = T0 + (ckt->CKTgmin); here->BSIM3v32cbd = here->BSIM3v32IsEvjdm - DrainSatCurrent + T0 * (vbd - here->BSIM3v32vjdm) + (ckt->CKTgmin) * vbd; break; case BSIM3v32V32: default: T0 = (DrainSatCurrent + model->BSIM3v32ijth) / Nvtm; here->BSIM3v32gbd = T0 + (ckt->CKTgmin); here->BSIM3v32cbd = model->BSIM3v32ijth + (ckt->CKTgmin) * vbd + T0 * (vbd - here->BSIM3v32vjdm); } } } } /* End of diode DC model */ if (vds >= 0.0) { /* normal mode */ here->BSIM3v32mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; } else { /* inverse mode */ here->BSIM3v32mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; } T0 = Vbs - pParam->BSIM3v32vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * pParam->BSIM3v32vbsc); Vbseff = pParam->BSIM3v32vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); if (Vbseff < Vbs) { Vbseff = Vbs; } if (Vbseff > 0.0) { T0 = pParam->BSIM3v32phi / (pParam->BSIM3v32phi + Vbseff); Phis = pParam->BSIM3v32phi * T0; dPhis_dVb = -T0 * T0; sqrtPhis = pParam->BSIM3v32phis3 / (pParam->BSIM3v32phi + 0.5 * Vbseff); dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis / pParam->BSIM3v32phis3; } else { Phis = pParam->BSIM3v32phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; } Xdep = pParam->BSIM3v32Xdep0 * sqrtPhis / pParam->BSIM3v32sqrtPhi; dXdep_dVb = (pParam->BSIM3v32Xdep0 / pParam->BSIM3v32sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM3v32leff; Vtm = model->BSIM3v32vtm; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM3v32vbi - pParam->BSIM3v32phi; T0 = pParam->BSIM3v32dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3v32dvt2; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3v32dvt2 * T4 * T4; } lt1 = model->BSIM3v32factor1 * T3 * T1; dlt1_dVb = model->BSIM3v32factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM3v32dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3v32dvt2w; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3v32dvt2w * T4 * T4; } ltw = model->BSIM3v32factor1 * T3 * T1; dltw_dVb = model->BSIM3v32factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->BSIM3v32dvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->BSIM3v32thetavth = pParam->BSIM3v32dvt0 * Theta0; Delt_vth = here->BSIM3v32thetavth * V0; dDelt_vth_dVb = pParam->BSIM3v32dvt0 * dTheta0_dVb * V0; T0 = -0.5 * pParam->BSIM3v32dvt1w * pParam->BSIM3v32weff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->BSIM3v32dvt0w * T2; T2 = T0 * V0; dT2_dVb = pParam->BSIM3v32dvt0w * dT2_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM3v32tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM3v32nlx / Leff); T1 = pParam->BSIM3v32k1ox * (T0 - 1.0) * pParam->BSIM3v32sqrtPhi + (pParam->BSIM3v32kt1 + pParam->BSIM3v32kt1l / Leff + pParam->BSIM3v32kt2 * Vbseff) * TempRatio; tmp2 = model->BSIM3v32tox * pParam->BSIM3v32phi / (pParam->BSIM3v32weff + pParam->BSIM3v32w0); T3 = pParam->BSIM3v32eta0 + pParam->BSIM3v32etab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM3v32theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Vth = model->BSIM3v32type * here->BSIM3v32vth0 - pParam->BSIM3v32k1 * pParam->BSIM3v32sqrtPhi + pParam->BSIM3v32k1ox * sqrtPhis - pParam->BSIM3v32k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM3v32k3 + pParam->BSIM3v32k3b * Vbseff) * tmp2 + T1 - DIBL_Sft; here->BSIM3v32von = Vth; dVth_dVb = pParam->BSIM3v32k1ox * dsqrtPhis_dVb - pParam->BSIM3v32k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM3v32k3b * tmp2 - pParam->BSIM3v32etab * Vds * pParam->BSIM3v32theta0vb0 * T4 + pParam->BSIM3v32kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp2 = pParam->BSIM3v32nfactor * EPSSI / Xdep; tmp3 = pParam->BSIM3v32cdsc + pParam->BSIM3v32cdscb * Vbseff + pParam->BSIM3v32cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM3v32cit) / model->BSIM3v32cox; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3v32cdscb * Theta0) / model->BSIM3v32cox; dn_dVd = pParam->BSIM3v32cdscd * Theta0 / model->BSIM3v32cox; } else /* avoid discontinuity problems caused by tmp4 */ { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3v32cdscb * Theta0) / model->BSIM3v32cox * T0; dn_dVd = pParam->BSIM3v32cdscd * Theta0 / model->BSIM3v32cox * T0; } /* Poly Gate Si Depletion Effect */ T0 = here->BSIM3v32vfb + pParam->BSIM3v32phi; if ((pParam->BSIM3v32ngate > 1.e18) && (pParam->BSIM3v32ngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->BSIM3v32ngate / (model->BSIM3v32cox * model->BSIM3v32cox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Vgst = Vgs_eff - Vth; /* Effective Vgst (Vgsteff) Calculation */ T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->BSIM3v32voff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (ExpArg > EXP_THRESHOLD) { T0 = (Vgst - pParam->BSIM3v32voff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->BSIM3v32cdep0 / model->BSIM3v32cox * ExpVgst; dVgsteff_dVg = Vgsteff / (n * Vtm); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + T0 * Vtm * dn_dVd); dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg *= dVgs_eff_dVg; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; dT2_dVg = -model->BSIM3v32cox / (Vtm * pParam->BSIM3v32cdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; Vgsteff = T1 / T2; T3 = T2 * T2; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; } /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V323) { here->BSIM3v32Vgsteff = Vgsteff; } /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM3v32sqrtPhi; Weff = pParam->BSIM3v32weff - 2.0 * (pParam->BSIM3v32dwg * Vgsteff + pParam->BSIM3v32dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM3v32dwg; dWeff_dVb = -2.0 * pParam->BSIM3v32dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->BSIM3v32prwg * Vgsteff + pParam->BSIM3v32prwb * T9; if (T0 >= -0.9) { Rds = pParam->BSIM3v32rds0 * (1.0 + T0); dRds_dVg = pParam->BSIM3v32rds0 * pParam->BSIM3v32prwg; dRds_dVb = pParam->BSIM3v32rds0 * pParam->BSIM3v32prwb * dsqrtPhis_dVb; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = pParam->BSIM3v32rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = pParam->BSIM3v32rds0 * pParam->BSIM3v32prwg * T1; dRds_dVb = pParam->BSIM3v32rds0 * pParam->BSIM3v32prwb * dsqrtPhis_dVb * T1; } /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V323) { here->BSIM3v32rds = Rds; /* Noise Bugfix */ } /* Calculate Abulk */ T1 = 0.5 * pParam->BSIM3v32k1ox / sqrtPhis; dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM3v32xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM3v32a0 * T5; tmp3 = pParam->BSIM3v32weff + pParam->BSIM3v32b1; tmp4 = pParam->BSIM3v32b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM3v32ags * pParam->BSIM3v32a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) /* added to avoid the problems caused by Abulk */ { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V32) { T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } else { dAbulk_dVb *= T9 * T9; } } /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V323) { here->BSIM3v32Abulk = Abulk; } T2 = pParam->BSIM3v32keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM3v32keta * T0 * T0; } else /* added to avoid the problems caused by Keta */ { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM3v32keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM3v32mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM3v32ua + pParam->BSIM3v32uc * Vbseff; T3 = T0 / model->BSIM3v32tox; T5 = T3 * (T2 + pParam->BSIM3v32ub * T3); dDenomi_dVg = (T2 + 2.0 * pParam->BSIM3v32ub * T3) / model->BSIM3v32tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3v32uc * T3; } else if (model->BSIM3v32mobMod == 2) { T5 = Vgsteff / model->BSIM3v32tox * (pParam->BSIM3v32ua + pParam->BSIM3v32uc * Vbseff + pParam->BSIM3v32ub * Vgsteff / model->BSIM3v32tox); dDenomi_dVg = (pParam->BSIM3v32ua + pParam->BSIM3v32uc * Vbseff + 2.0 * pParam->BSIM3v32ub * Vgsteff / model->BSIM3v32tox) / model->BSIM3v32tox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * pParam->BSIM3v32uc / model->BSIM3v32tox; } else { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM3v32uc * Vbseff; T3 = T0 / model->BSIM3v32tox; T4 = T3 * (pParam->BSIM3v32ua + pParam->BSIM3v32ub * T3); T5 = T4 * T2; dDenomi_dVg = (pParam->BSIM3v32ua + 2.0 * pParam->BSIM3v32ub * T3) * T2 / model->BSIM3v32tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3v32uc * T4; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM3v32ueff = ueff = here->BSIM3v32u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * pParam->BSIM3v32vsattemp * model->BSIM3v32cox; WVCoxRds = WVCox * Rds; Esat = 2.0 * pParam->BSIM3v32vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM3v32a1; if (a1 == 0.0) { Lambda = pParam->BSIM3v32a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->BSIM3v32a2; T1 = T0 - pParam->BSIM3v32a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM3v32a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3v32a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM3v32a2 + pParam->BSIM3v32a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM3v32a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3v32a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V323) { here->BSIM3v32AbovVgst2Vtm = Abulk / Vgst2Vtm; } if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM3v32vdsat = Vdsat; /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->BSIM3v32delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM3v32delta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->BSIM3v32delta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: /* Added to eliminate non-zero Vdseff at Vds=0.0 */ if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } break; case BSIM3v32V32: default: /* Do nothing */ break; } /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; /* Added revision dependent code */ if (model->BSIM3v32intVersion > BSIM3v32V323) { here->BSIM3v32Vdseff = Vdseff; } /* Calculate VACLM */ if ((pParam->BSIM3v32pclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->BSIM3v32pclm * Abulk * pParam->BSIM3v32litl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg = -T0 / Abulk * dAbulk_dVg; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg); dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM3v32thetaRout > 0.0) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM3v32thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM3v32pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM3v32pdiblb) * T3; dVADIBL_dVd *= T3; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM3v32pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate VA */ T8 = pParam->BSIM3v32pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; /* Calculate VASCBE */ if (pParam->BSIM3v32pscbe2 > 0.0) { if (diffVds > pParam->BSIM3v32pscbe1 * pParam->BSIM3v32litl / EXP_THRESHOLD) { T0 = pParam->BSIM3v32pscbe1 * pParam->BSIM3v32litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM3v32pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM3v32pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Calculate Ids */ CoxWovL = model->BSIM3v32cox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; T9 = diffVds / Va; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; Gds += Gm * dVgsteff_dVd; Gmb += Gm * dVgsteff_dVb; Gm *= dVgsteff_dVg; Gmb *= dVbseff_dVb; /* Substrate current begins */ tmp = pParam->BSIM3v32alpha0 + pParam->BSIM3v32alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM3v32beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM3v32beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM3v32beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } Isub = T1 * Idsa; Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg; Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd; Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; /* bug fixing */ } cdrain = Ids; here->BSIM3v32gds = Gds; here->BSIM3v32gm = Gm; here->BSIM3v32gmbs = Gmb; here->BSIM3v32gbbs = Gbb; here->BSIM3v32gbgs = Gbg; here->BSIM3v32gbds = Gbd; here->BSIM3v32csub = Isub; /* BSIM3v32 thermal noise Qinv calculated from all capMod * 0, 1, 2 & 3 stored in here->BSIM3v32qinv 1/1998 */ if ((model->BSIM3v32xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM3v32cggb = here->BSIM3v32cgsb = here->BSIM3v32cgdb = 0.0; here->BSIM3v32cdgb = here->BSIM3v32cdsb = here->BSIM3v32cddb = 0.0; here->BSIM3v32cbgb = here->BSIM3v32cbsb = here->BSIM3v32cbdb = 0.0; here->BSIM3v32cqdb = here->BSIM3v32cqsb = here->BSIM3v32cqgb = here->BSIM3v32cqbb = 0.0; here->BSIM3v32gtau = 0.0; goto finished; } else if (model->BSIM3v32capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = pParam->BSIM3v32phi - Phis; dVbseff_dVb = -dPhis_dVb; } Vfb = pParam->BSIM3v32vfbcv; Vth = Vfb + pParam->BSIM3v32phi + pParam->BSIM3v32k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM3v32k1ox * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM3v32cggb = CoxWL * dVgs_eff_dVg; here->BSIM3v32cgdb = 0.0; here->BSIM3v32cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3v32cdgb = 0.0; here->BSIM3v32cddb = 0.0; here->BSIM3v32cdsb = 0.0; here->BSIM3v32cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM3v32cbdb = 0.0; here->BSIM3v32cbsb = -here->BSIM3v32cgsb; here->BSIM3v32qinv = 0.0; } else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM3v32k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM3v32k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM3v32cggb = T0 * dVgs_eff_dVg; here->BSIM3v32cgdb = 0.0; here->BSIM3v32cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3v32cdgb = 0.0; here->BSIM3v32cddb = 0.0; here->BSIM3v32cdsb = 0.0; here->BSIM3v32cbgb = -here->BSIM3v32cggb; here->BSIM3v32cbdb = 0.0; here->BSIM3v32cbsb = -here->BSIM3v32cgsb; here->BSIM3v32qinv = 0.0; } else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v32abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v32abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; if (model->BSIM3v32xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM3v32cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v32cgsb = -(here->BSIM3v32cggb + T2); here->BSIM3v32cgdb = 0.0; here->BSIM3v32cdgb = 0.0; here->BSIM3v32cddb = 0.0; here->BSIM3v32cdsb = 0.0; here->BSIM3v32cbgb = -(here->BSIM3v32cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v32cbsb = -(here->BSIM3v32cbgb + T3); here->BSIM3v32cbdb = 0.0; here->BSIM3v32qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM3v32cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v32cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v32cgsb = -(here->BSIM3v32cggb + T11 + here->BSIM3v32cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM3v32cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM3v32cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM3v32cdsb = -(here->BSIM3v32cdgb + T12 + here->BSIM3v32cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM3v32cbgb = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + T10); here->BSIM3v32cbdb = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + T12); here->BSIM3v32cbsb = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + T0); here->BSIM3v32qinv = -(qgate + qbulk); } } else if (model->BSIM3v32xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM3v32cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v32cgsb = -(here->BSIM3v32cggb + T2); here->BSIM3v32cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM3v32cdgb = -T3 * dVgs_eff_dVg; here->BSIM3v32cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM3v32cdsb = -(T4 + here->BSIM3v32cdgb); here->BSIM3v32cbgb = -(here->BSIM3v32cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v32cbsb = -(here->BSIM3v32cbgb + T3); here->BSIM3v32cbdb = 0.0; here->BSIM3v32qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3v32cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v32cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v32cgsb = -(here->BSIM3v32cggb + here->BSIM3v32cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM3v32cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM3v32cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM3v32cdsb = -(here->BSIM3v32cdgb + T10 + here->BSIM3v32cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - here->BSIM3v32cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM3v32cddb; tmp = -(T10 + T11 + T12); here->BSIM3v32cbgb = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + T12); here->BSIM3v32cbdb = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + T10); /* bug fix */ here->BSIM3v32cbsb = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + tmp); here->BSIM3v32qinv = -(qgate + qbulk); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM3v32cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v32cgsb = -(here->BSIM3v32cggb + T2); here->BSIM3v32cgdb = 0.0; here->BSIM3v32cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM3v32cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM3v32cdsb = -(T4 + here->BSIM3v32cdgb); here->BSIM3v32cbgb = -(here->BSIM3v32cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v32cbsb = -(here->BSIM3v32cbgb + T3); here->BSIM3v32cbdb = 0.0; here->BSIM3v32qinv = -(qgate + qbulk); } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v32phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3v32cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v32cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v32cgsb = -(here->BSIM3v32cggb + here->BSIM3v32cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM3v32cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM3v32cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM3v32cdsb = -(here->BSIM3v32cdgb + T12 + here->BSIM3v32cddb); here->BSIM3v32cbgb = -(here->BSIM3v32cggb + 2.0 * here->BSIM3v32cdgb); here->BSIM3v32cbdb = -(here->BSIM3v32cgdb + 2.0 * here->BSIM3v32cddb); here->BSIM3v32cbsb = -(here->BSIM3v32cgsb + 2.0 * here->BSIM3v32cdsb); here->BSIM3v32qinv = -(qgate + qbulk); } } } } else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM3v32phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV; /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM3v32noff; dnoff_dVd = pParam->BSIM3v32noff * dn_dVd; dnoff_dVb = pParam->BSIM3v32noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM3v32voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV */ if (model->BSIM3v32capMod == 1) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Vfb = here->BSIM3v32vfbzb; break; case BSIM3v32V32: Vfb = here->BSIM3v32vfbzb; dVfb_dVb = dVfb_dVd = 0.0; break; default: Vfb = Vth - pParam->BSIM3v32phi - pParam->BSIM3v32k1ox * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->BSIM3v32k1ox * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; } Arg1 = Vgs_eff - VbseffCV - Vfb - Vgsteff; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; Cgg = CoxWL * (dVgs_eff_dVg - dVgsteff_dVg); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Cgd = -CoxWL * dVgsteff_dVd; Cgb = -CoxWL * (dVbseffCV_dVb + dVgsteff_dVb); break; case BSIM3v32V32: default: Cgd = -CoxWL * (dVfb_dVd + dVgsteff_dVd); Cgb = -CoxWL * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } } else { T0 = 0.5 * pParam->BSIM3v32k1ox; T1 = sqrt(T0 * T0 + Arg1); T2 = CoxWL * T0 / T1; qgate = CoxWL * pParam->BSIM3v32k1ox * (T1 - T0); Cgg = T2 * (dVgs_eff_dVg - dVgsteff_dVg); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Cgd = -T2 * dVgsteff_dVd; Cgb = -T2 * (dVbseffCV_dVb + dVgsteff_dVb); break; case BSIM3v32V32: default: Cgd = -T2 * (dVfb_dVd + dVgsteff_dVd); Cgb = -T2 * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } } qbulk = -qgate; Cbg = -Cgg; Cbd = -Cgd; Cbb = -Cgb; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v32abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v32abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; if (VdsatCV < Vds) { dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T0 = Vgsteff - VdsatCV / 3.0; dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0; dT0_dVb = -dVdsatCV_dVb / 3.0; qgate += CoxWL * T0; Cgg1 = CoxWL * dT0_dVg; Cgb1 = CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; T0 = VdsatCV - Vgsteff; dT0_dVg = dVdsatCV_dVg - 1.0; dT0_dVb = dVdsatCV_dVb; qbulk += One_Third_CoxWL * T0; Cbg1 = One_Third_CoxWL * dT0_dVg; Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb; Cbd1 = Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v32xpart > 0.5) T0 = -Two_Third_CoxWL; else if (model->BSIM3v32xpart < 0.5) T0 = -0.4 * CoxWL; else T0 = -One_Third_CoxWL; qsrc = T0 * Vgsteff; Csg = T0 * dVgsteff_dVg; Csb = T0 * dVgsteff_dVb; Csd = T0 * dVgsteff_dVd; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } else { T0 = AbulkCV * Vds; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.e-20); T2 = Vds / T1; T3 = T0 * T2; dT3_dVg = -12.0 * T2 * T2 * AbulkCV; dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5; dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb * Vgsteff; qgate += CoxWL * (Vgsteff - 0.5 * Vds + T3); Cgg1 = CoxWL * (1.0 + dT3_dVg); Cgb1 = CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; qbulk += CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3); Cbg1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVg); Cbb1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVb + (0.5 * Vds - T3) * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbd1 = -CoxWL * (1.0 - AbulkCV) * dT3_dVd + Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v32xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); Csg = -CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV); Csb = -CoxWL * (0.25 * Vds * dAbulkCV_dVb - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0) * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csd = -CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0 / T1 / T1 * (4.0 * Vgsteff - T0)) + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else if (model->BSIM3v32xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb + Csg * dVgsteff_dVb; Csd = (qsrc / T1 + T2 * T4) * AbulkCV + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } qdrn = -(qgate + qbulk + qsrc); here->BSIM3v32cggb = Cgg; here->BSIM3v32cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v32cgdb = Cgd; here->BSIM3v32cdgb = -(Cgg + Cbg + Csg); here->BSIM3v32cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v32cddb = -(Cgd + Cbd + Csd); here->BSIM3v32cbgb = Cbg; here->BSIM3v32cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v32cbdb = Cbd; here->BSIM3v32qinv = -(qgate + qbulk); } else if (model->BSIM3v32capMod == 2) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Vfb = here->BSIM3v32vfbzb; break; case BSIM3v32V32: Vfb = here->BSIM3v32vfbzb; dVfb_dVb = dVfb_dVd = 0.0; break; default: /* old code prior to v3.2 */ Vfb = Vth - pParam->BSIM3v32phi - pParam->BSIM3v32k1ox * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->BSIM3v32k1ox * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; } V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: /* Do nothing */ break; case BSIM3v32V32: default: dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; } dVfbeff_dVg = T1 * dVgs_eff_dVg; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: dVfbeff_dVb = -T1 * dVbseffCV_dVb; break; case BSIM3v32V32: default: dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1 * dVbseffCV_dVb; } Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: /* Do nothing */ break; case BSIM3v32V32: default: dQac0_dVd = CoxWL * (dVfbeff_dVd - dVfb_dVd); } /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: dQac0_dVb = CoxWL * dVfbeff_dVb; break; case BSIM3v32V32: default: dQac0_dVb = CoxWL * (dVfbeff_dVb - dVfb_dVb); } T0 = 0.5 * pParam->BSIM3v32k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM3v32k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM3v32k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM3v32k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: dQsub0_dVd = -T2 * dVgsteff_dVd; break; case BSIM3v32V32: default: dQsub0_dVd = -T2 * (dVfbeff_dVd + dVgsteff_dVd); } dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM3v32abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v32abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: /* Added to eliminate non-zero VdseffCV at Vds=0.0 */ if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } break; case BSIM3v32V32: default: /* Do nothing */ break; } T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qinoi = -CoxWL * (Vgsteff - 0.5 * T0 + AbulkCV * T3); qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM3v32xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM3v32xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Cgd = dQsub0_dVd + Cgd1; break; case BSIM3v32V32: default: Cgd = dQac0_dVd + dQsub0_dVd + Cgd1; } Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: Cbd = Cbd1 - dQsub0_dVd; break; case BSIM3v32V32: default: Cbd = Cbd1 - dQac0_dVd - dQsub0_dVd; } Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3v32cggb = Cgg; here->BSIM3v32cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v32cgdb = Cgd; here->BSIM3v32cdgb = -(Cgg + Cbg + Csg); here->BSIM3v32cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v32cddb = -(Cgd + Cbd + Csd); here->BSIM3v32cbgb = Cbg; here->BSIM3v32cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v32cbdb = Cbd; here->BSIM3v32qinv = qinoi; } /* New Charge-Thickness capMod (CTM) begins */ else if (model->BSIM3v32capMod == 3) { V3 = here->BSIM3v32vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM3v32vfbzb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM3v32vfbzb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM3v32vfbzb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM3v32vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM3v32cox; Tox = 1.0e8 * model->BSIM3v32tox; T0 = (Vgs_eff - VbseffCV - here->BSIM3v32vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; tmp = T0 * pParam->BSIM3v32acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM3v32ldeb * exp(tmp); dTcen_dVg = pParam->BSIM3v32acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM3v32ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM3v32ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM3v32tox; V3 = pParam->BSIM3v32ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM3v32ldeb); Tcen = pParam->BSIM3v32ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = EPSSI / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / Cox; Qac0 = CoxWLcen * (Vfbeff - here->BSIM3v32vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM3v32k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM3v32k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM3v32k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM3v32k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM3v32k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM3v32moin * Vtm; T0 = 0.5 * pParam->BSIM3v32sqrtPhi; } else { Denomi = pParam->BSIM3v32moin * Vtm * pParam->BSIM3v32k1ox * pParam->BSIM3v32k1ox; T0 = pParam->BSIM3v32k1ox * pParam->BSIM3v32sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); dDeltaPhi_dVd = dDeltaPhi_dVg * dVgsteff_dVd; dDeltaPhi_dVb = dDeltaPhi_dVg * dVgsteff_dVb; /* End of delta Phis */ T3 = 4.0 * (Vth - here->BSIM3v32vfbzb - pParam->BSIM3v32phi); Tox += Tox; if (T3 >= 0.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: T0 = (Vgsteff + T3) / Tox; dT0_dVd = (dVgsteff_dVd + 4.0 * dVth_dVd) / Tox; dT0_dVb = (dVgsteff_dVb + 4.0 * dVth_dVb) / Tox; break; case BSIM3v32V32: default: T0 = (Vgsteff + T3) / Tox; } } else { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: T0 = (Vgsteff + 1.0e-20) / Tox; dT0_dVd = dVgsteff_dVd / Tox; dT0_dVb = dVgsteff_dVb / Tox; break; case BSIM3v32V32: default: T0 = (Vgsteff + 1.0e-20) / Tox; } } tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = -1.9e-9 * T2 / T1 /T1; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: dTcen_dVd = Tox * dTcen_dVg; dTcen_dVb = dTcen_dVd * dT0_dVb; dTcen_dVd *= dT0_dVd; break; case BSIM3v32V32: default: dTcen_dVd = dTcen_dVg * (4.0 * dVth_dVd + dVgsteff_dVd); dTcen_dVb = dTcen_dVg * (4.0 * dVth_dVb + dVgsteff_dVb); } dTcen_dVg *= dVgsteff_dVg; Ccen = EPSSI / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / Cox; AbulkCV = Abulk0 * pParam->BSIM3v32abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v32abulkCVfactor * dAbulk0_dVb; VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; T4 = T3 * ( 1.0 - dDeltaPhi_dVg); dVdseffCV_dVg = T4; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: /* Added to eliminate non-zero VdseffCV at Vds=0.0 */ if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } break; case BSIM3v32V32: default: /* Do nothing */ break; } T0 = AbulkCV * VdseffCV; T1 = Vgsteff - DeltaPhi; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * (1.0 - dDeltaPhi_dVg) + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * (1.0 - dDeltaPhi_dVg); T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM3v32xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * (1.0 - dDeltaPhi_dVg); T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM3v32xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * (1.0 - dDeltaPhi_dVg) + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3v32cggb = Cgg; here->BSIM3v32cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v32cgdb = Cgd; here->BSIM3v32cdgb = -(Cgg + Cbg + Csg); here->BSIM3v32cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v32cddb = -(Cgd + Cbd + Csd); here->BSIM3v32cbgb = Cbg; here->BSIM3v32cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v32cbdb = Cbd; here->BSIM3v32qinv = -qinoi; } /* End of CTM */ } finished: /* Returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->BSIM3v32qgate = qgate; here->BSIM3v32qbulk = qbulk; here->BSIM3v32qdrn = qdrn; here->BSIM3v32cd = cdrain; if (ChargeComputationNeeded) { /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw: zero bias drain junction sidewall capacitance along field oxide * czbssw: zero bias source junction sidewall capacitance along field oxide * czbdswg: zero bias drain junction sidewall capacitance along gate side * czbsswg: zero bias source junction sidewall capacitance along gate side */ if (model->BSIM3v32acmMod == 0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: czbd = model->BSIM3v32unitAreaTempJctCap * here->BSIM3v32drainArea; /*bug fix */ czbs = model->BSIM3v32unitAreaTempJctCap * here->BSIM3v32sourceArea; break; case BSIM3v32V322: case BSIM3v32V32: default: czbd = model->BSIM3v32unitAreaJctCap * here->BSIM3v32drainArea; czbs = model->BSIM3v32unitAreaJctCap * here->BSIM3v32sourceArea; } if (here->BSIM3v32drainPerimeter < pParam->BSIM3v32weff) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: czbdswg = model->BSIM3v32unitLengthGateSidewallTempJctCap * here->BSIM3v32drainPerimeter; break; case BSIM3v32V322: case BSIM3v32V32: default: czbdswg = model->BSIM3v32unitLengthGateSidewallJctCap * here->BSIM3v32drainPerimeter; } czbdsw = 0.0; } else { czbdsw = model->BSIM3v32unitLengthSidewallTempJctCap * (here->BSIM3v32drainPerimeter - pParam->BSIM3v32weff); czbdswg = model->BSIM3v32unitLengthGateSidewallTempJctCap * pParam->BSIM3v32weff; } if (here->BSIM3v32sourcePerimeter < pParam->BSIM3v32weff) { czbssw = 0.0; /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: czbsswg = model->BSIM3v32unitLengthGateSidewallTempJctCap * here->BSIM3v32sourcePerimeter; break; case BSIM3v32V322: case BSIM3v32V32: default: czbsswg = model->BSIM3v32unitLengthGateSidewallJctCap * here->BSIM3v32sourcePerimeter; } } else { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: czbssw = model->BSIM3v32unitLengthSidewallTempJctCap * (here->BSIM3v32sourcePerimeter - pParam->BSIM3v32weff); czbsswg = model->BSIM3v32unitLengthGateSidewallTempJctCap * pParam->BSIM3v32weff; break; case BSIM3v32V322: case BSIM3v32V32: default: czbssw = model->BSIM3v32unitLengthSidewallJctCap * (here->BSIM3v32sourcePerimeter - pParam->BSIM3v32weff); czbsswg = model->BSIM3v32unitLengthGateSidewallJctCap * pParam->BSIM3v32weff; } } } else { error = ACM_junctionCapacitances( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, model->BSIM3v32hdif, model->BSIM3v32wmlt, here->BSIM3v32w, model->BSIM3v32xw, here->BSIM3v32drainAreaGiven, here->BSIM3v32drainArea, here->BSIM3v32drainPerimeterGiven, here->BSIM3v32drainPerimeter, here->BSIM3v32sourceAreaGiven, here->BSIM3v32sourceArea, here->BSIM3v32sourcePerimeterGiven, here->BSIM3v32sourcePerimeter, model->BSIM3v32unitAreaTempJctCap, model->BSIM3v32unitLengthSidewallTempJctCap, model->BSIM3v32unitLengthGateSidewallJctCap, &czbd, &czbdsw, &czbdswg, &czbs, &czbssw, &czbsswg ); if (error) return(error); } MJ = model->BSIM3v32bulkJctBotGradingCoeff; MJSW = model->BSIM3v32bulkJctSideGradingCoeff; MJSWG = model->BSIM3v32bulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs == 0.0) { *(ckt->CKTstate0 + here->BSIM3v32qbs) = 0.0; here->BSIM3v32capbs = czbs + czbssw + czbsswg; } else if (vbs < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs / model->BSIM3v32PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbs) = model->BSIM3v32PhiB * czbs * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v32capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v32qbs) = 0.0; here->BSIM3v32capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs / model->BSIM3v32PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbs) += model->BSIM3v32PhiBSW * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v32capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs / model->BSIM3v32PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbs) += model->BSIM3v32PhiBSWG * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3v32capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs * (czbs * MJ / model->BSIM3v32PhiB + czbssw * MJSW / model->BSIM3v32PhiBSW + czbsswg * MJSWG / model->BSIM3v32PhiBSWG); *(ckt->CKTstate0 + here->BSIM3v32qbs) = vbs * (T0 + 0.5 * T1); here->BSIM3v32capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd == 0.0) { *(ckt->CKTstate0 + here->BSIM3v32qbd) = 0.0; here->BSIM3v32capbd = czbd + czbdsw + czbdswg; } else if (vbd < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd / model->BSIM3v32PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbd) = model->BSIM3v32PhiB * czbd * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v32capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v32qbd) = 0.0; here->BSIM3v32capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd / model->BSIM3v32PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbd) += model->BSIM3v32PhiBSW * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v32capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd / model->BSIM3v32PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3v32qbd) += model->BSIM3v32PhiBSWG * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3v32capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd * (czbd * MJ / model->BSIM3v32PhiB + czbdsw * MJSW / model->BSIM3v32PhiBSW + czbdswg * MJSWG / model->BSIM3v32PhiBSWG); *(ckt->CKTstate0 + here->BSIM3v32qbd) = vbd * (T0 + 0.5 * T1); here->BSIM3v32capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM3v32off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM3v32mode >= 0) { Idtot = here->BSIM3v32cd + here->BSIM3v32csub - here->BSIM3v32cbd; } else { Idtot = here->BSIM3v32cd - here->BSIM3v32cbd; } tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; if (fabs(cdhat - Idtot) >= tol) { ckt->CKTnoncon++; } else { Ibtot = here->BSIM3v32cbs + here->BSIM3v32cbd - here->BSIM3v32csub; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM3v32vbs) = vbs; *(ckt->CKTstate0 + here->BSIM3v32vbd) = vbd; *(ckt->CKTstate0 + here->BSIM3v32vgs) = vgs; *(ckt->CKTstate0 + here->BSIM3v32vds) = vds; *(ckt->CKTstate0 + here->BSIM3v32qdef) = qdef; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif /* NQS begins */ if (here->BSIM3v32nqsMod) { qcheq = -(qbulk + qgate); here->BSIM3v32cqgb = -(here->BSIM3v32cggb + here->BSIM3v32cbgb); here->BSIM3v32cqdb = -(here->BSIM3v32cgdb + here->BSIM3v32cbdb); here->BSIM3v32cqsb = -(here->BSIM3v32cgsb + here->BSIM3v32cbsb); here->BSIM3v32cqbb = -(here->BSIM3v32cqgb + here->BSIM3v32cqdb + here->BSIM3v32cqsb); gtau_drift = fabs(here->BSIM3v32tconst * qcheq) * ScalingFactor; T0 = pParam->BSIM3v32leffCV * pParam->BSIM3v32leffCV; gtau_diff = 16.0 * here->BSIM3v32u0temp * model->BSIM3v32vtm / T0 * ScalingFactor; here->BSIM3v32gtau = gtau_drift + gtau_diff; } if (model->BSIM3v32capMod == 0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: /* code merge -JX */ cgdo = pParam->BSIM3v32cgdo; qgdo = pParam->BSIM3v32cgdo * vgd; cgso = pParam->BSIM3v32cgso; qgso = pParam->BSIM3v32cgso * vgs; break; case BSIM3v32V322: case BSIM3v32V32: default: if (vgd < 0.0) { cgdo = pParam->BSIM3v32cgdo; qgdo = pParam->BSIM3v32cgdo * vgd; } else { cgdo = pParam->BSIM3v32cgdo; qgdo = pParam->BSIM3v32cgdo * vgd; } if (vgs < 0.0) { cgso = pParam->BSIM3v32cgso; qgso = pParam->BSIM3v32cgso * vgs; } else { cgso = pParam->BSIM3v32cgso; qgso = pParam->BSIM3v32cgso * vgs; } } } else if (model->BSIM3v32capMod == 1) { if (vgd < 0.0) { T1 = sqrt(1.0 - 4.0 * vgd / pParam->BSIM3v32ckappa); cgdo = pParam->BSIM3v32cgdo + pParam->BSIM3v32weffCV * pParam->BSIM3v32cgdl / T1; qgdo = pParam->BSIM3v32cgdo * vgd - pParam->BSIM3v32weffCV * 0.5 * pParam->BSIM3v32cgdl * pParam->BSIM3v32ckappa * (T1 - 1.0); } else { cgdo = pParam->BSIM3v32cgdo + pParam->BSIM3v32weffCV * pParam->BSIM3v32cgdl; qgdo = (pParam->BSIM3v32weffCV * pParam->BSIM3v32cgdl + pParam->BSIM3v32cgdo) * vgd; } if (vgs < 0.0) { T1 = sqrt(1.0 - 4.0 * vgs / pParam->BSIM3v32ckappa); cgso = pParam->BSIM3v32cgso + pParam->BSIM3v32weffCV * pParam->BSIM3v32cgsl / T1; qgso = pParam->BSIM3v32cgso * vgs - pParam->BSIM3v32weffCV * 0.5 * pParam->BSIM3v32cgsl * pParam->BSIM3v32ckappa * (T1 - 1.0); } else { cgso = pParam->BSIM3v32cgso + pParam->BSIM3v32weffCV * pParam->BSIM3v32cgsl; qgso = (pParam->BSIM3v32weffCV * pParam->BSIM3v32cgsl + pParam->BSIM3v32cgso) * vgs; } } else { T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v32weffCV * pParam->BSIM3v32cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v32ckappa); cgdo = pParam->BSIM3v32cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM3v32cgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->BSIM3v32ckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v32weffCV * pParam->BSIM3v32cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v32ckappa); cgso = pParam->BSIM3v32cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM3v32cgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->BSIM3v32ckappa * (T4 - 1.0)); } here->BSIM3v32cgdo = cgdo; here->BSIM3v32cgso = cgso; ag0 = ckt->CKTag[0]; if (here->BSIM3v32mode > 0) { if (here->BSIM3v32nqsMod == 0) { gcggb = (here->BSIM3v32cggb + cgdo + cgso + pParam->BSIM3v32cgbo ) * ag0; gcgdb = (here->BSIM3v32cgdb - cgdo) * ag0; gcgsb = (here->BSIM3v32cgsb - cgso) * ag0; gcdgb = (here->BSIM3v32cdgb - cgdo) * ag0; gcddb = (here->BSIM3v32cddb + here->BSIM3v32capbd + cgdo) * ag0; gcdsb = here->BSIM3v32cdsb * ag0; gcsgb = -(here->BSIM3v32cggb + here->BSIM3v32cbgb + here->BSIM3v32cdgb + cgso) * ag0; gcsdb = -(here->BSIM3v32cgdb + here->BSIM3v32cbdb + here->BSIM3v32cddb) * ag0; gcssb = (here->BSIM3v32capbs + cgso - (here->BSIM3v32cgsb + here->BSIM3v32cbsb + here->BSIM3v32cdsb)) * ag0; gcbgb = (here->BSIM3v32cbgb - pParam->BSIM3v32cgbo) * ag0; gcbdb = (here->BSIM3v32cbdb - here->BSIM3v32capbd) * ag0; gcbsb = (here->BSIM3v32cbsb - here->BSIM3v32capbs) * ag0; qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v32cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qdrn -= qgd; qsrc = -(qgate + qbulk + qdrn); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { if (qcheq > 0.0) T0 = here->BSIM3v32tconst * qdef * ScalingFactor; else T0 = -here->BSIM3v32tconst * qdef * ScalingFactor; ggtg = here->BSIM3v32gtg = T0 * here->BSIM3v32cqgb; ggtd = here->BSIM3v32gtd = T0 * here->BSIM3v32cqdb; ggts = here->BSIM3v32gts = T0 * here->BSIM3v32cqsb; ggtb = here->BSIM3v32gtb = T0 * here->BSIM3v32cqbb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM3v32cqgb * ag0; gcqdb = here->BSIM3v32cqdb * ag0; gcqsb = here->BSIM3v32cqsb * ag0; gcqbb = here->BSIM3v32cqbb * ag0; gcggb = (cgdo + cgso + pParam->BSIM3v32cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcdgb = -cgdo * ag0; gcddb = (here->BSIM3v32capbd + cgdo) * ag0; gcdsb = 0.0; gcsgb = -cgso * ag0; gcsdb = 0.0; gcssb = (here->BSIM3v32capbs + cgso) * ag0; gcbgb = -pParam->BSIM3v32cgbo * ag0; gcbdb = -here->BSIM3v32capbd * ag0; gcbsb = -here->BSIM3v32capbs * ag0; CoxWL = model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM3v32cddb; Csd = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM3v32cdgb; Csg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM3v32cdsb; Css = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v32cgbo * vgb; qgate = qgd + qgs + qgb; qbulk = -qgb; qdrn = -qgd; qsrc = -(qgate + qbulk + qdrn); } } else { if (here->BSIM3v32nqsMod == 0) { gcggb = (here->BSIM3v32cggb + cgdo + cgso + pParam->BSIM3v32cgbo ) * ag0; gcgdb = (here->BSIM3v32cgsb - cgdo) * ag0; gcgsb = (here->BSIM3v32cgdb - cgso) * ag0; gcdgb = -(here->BSIM3v32cggb + here->BSIM3v32cbgb + here->BSIM3v32cdgb + cgdo) * ag0; gcddb = (here->BSIM3v32capbd + cgdo - (here->BSIM3v32cgsb + here->BSIM3v32cbsb + here->BSIM3v32cdsb)) * ag0; gcdsb = -(here->BSIM3v32cgdb + here->BSIM3v32cbdb + here->BSIM3v32cddb) * ag0; gcsgb = (here->BSIM3v32cdgb - cgso) * ag0; gcsdb = here->BSIM3v32cdsb * ag0; gcssb = (here->BSIM3v32cddb + here->BSIM3v32capbs + cgso) * ag0; gcbgb = (here->BSIM3v32cbgb - pParam->BSIM3v32cgbo) * ag0; gcbdb = (here->BSIM3v32cbsb - here->BSIM3v32capbd) * ag0; gcbsb = (here->BSIM3v32cbdb - here->BSIM3v32capbs) * ag0; qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v32cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qsrc = qdrn - qgs; qdrn = -(qgate + qbulk + qsrc); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { if (qcheq > 0.0) T0 = here->BSIM3v32tconst * qdef * ScalingFactor; else T0 = -here->BSIM3v32tconst * qdef * ScalingFactor; ggtg = here->BSIM3v32gtg = T0 * here->BSIM3v32cqgb; ggts = here->BSIM3v32gtd = T0 * here->BSIM3v32cqdb; ggtd = here->BSIM3v32gts = T0 * here->BSIM3v32cqsb; ggtb = here->BSIM3v32gtb = T0 * here->BSIM3v32cqbb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM3v32cqgb * ag0; gcqdb = here->BSIM3v32cqsb * ag0; gcqsb = here->BSIM3v32cqdb * ag0; gcqbb = here->BSIM3v32cqbb * ag0; gcggb = (cgdo + cgso + pParam->BSIM3v32cgbo) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcdgb = -cgdo * ag0; gcddb = (here->BSIM3v32capbd + cgdo) * ag0; gcdsb = 0.0; gcsgb = -cgso * ag0; gcsdb = 0.0; gcssb = (here->BSIM3v32capbs + cgso) * ag0; gcbgb = -pParam->BSIM3v32cgbo * ag0; gcbdb = -here->BSIM3v32capbd * ag0; gcbsb = -here->BSIM3v32capbs * ag0; CoxWL = model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM3v32xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM3v32xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM3v32cddb; Cds = -(here->BSIM3v32cgdb + here->BSIM3v32cddb + here->BSIM3v32cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM3v32cdgb; Cdg = -(here->BSIM3v32cggb + here->BSIM3v32cdgb + here->BSIM3v32cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM3v32cdsb; Cdd = -(here->BSIM3v32cgsb + here->BSIM3v32cdsb + here->BSIM3v32cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v32cgbo * vgb; qgate = qgd + qgs + qgb; qbulk = -qgb; qsrc = -qgs; qdrn = -(qgate + qbulk + qsrc); } } cqdef = cqcheq = 0.0; if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM3v32qg) = qgate; *(ckt->CKTstate0 + here->BSIM3v32qd) = qdrn - *(ckt->CKTstate0 + here->BSIM3v32qbd); *(ckt->CKTstate0 + here->BSIM3v32qb) = qbulk + *(ckt->CKTstate0 + here->BSIM3v32qbd) + *(ckt->CKTstate0 + here->BSIM3v32qbs); if (here->BSIM3v32nqsMod) { *(ckt->CKTstate0 + here->BSIM3v32qcdump) = qdef * ScalingFactor; *(ckt->CKTstate0 + here->BSIM3v32qcheq) = qcheq; } /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v32qb) = *(ckt->CKTstate0 + here->BSIM3v32qb); *(ckt->CKTstate1 + here->BSIM3v32qg) = *(ckt->CKTstate0 + here->BSIM3v32qg); *(ckt->CKTstate1 + here->BSIM3v32qd) = *(ckt->CKTstate0 + here->BSIM3v32qd); if (here->BSIM3v32nqsMod) { *(ckt->CKTstate1 + here->BSIM3v32qcheq) = *(ckt->CKTstate0 + here->BSIM3v32qcheq); *(ckt->CKTstate1 + here->BSIM3v32qcdump) = *(ckt->CKTstate0 + here->BSIM3v32qcdump); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v32qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v32qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v32qd); if (error) return(error); if (here->BSIM3v32nqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v32qcdump); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v32qcheq); if (error) return(error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM3v32mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM3v32nqsMod) here->BSIM3v32gtau = 16.0 * here->BSIM3v32u0temp * model->BSIM3v32vtm / pParam->BSIM3v32leffCV / pParam->BSIM3v32leffCV * ScalingFactor; else here->BSIM3v32gtau = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM3v32cqg); cqbulk = *(ckt->CKTstate0 + here->BSIM3v32cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM3v32cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs; if (here->BSIM3v32nqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM3v32gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM3v32cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM3v32cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v32cqb) = *(ckt->CKTstate0 + here->BSIM3v32cqb); *(ckt->CKTstate1 + here->BSIM3v32cqg) = *(ckt->CKTstate0 + here->BSIM3v32cqg); *(ckt->CKTstate1 + here->BSIM3v32cqd) = *(ckt->CKTstate0 + here->BSIM3v32cqd); if (here->BSIM3v32nqsMod) { *(ckt->CKTstate1 + here->BSIM3v32cqcheq) = *(ckt->CKTstate0 + here->BSIM3v32cqcheq); *(ckt->CKTstate1 + here->BSIM3v32cqcdump) = *(ckt->CKTstate0 + here->BSIM3v32cqcdump); } } /* * load current vector */ line900: if (here->BSIM3v32mode >= 0) { Gm = here->BSIM3v32gm; Gmbs = here->BSIM3v32gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cdreq = model->BSIM3v32type * (cdrain - here->BSIM3v32gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = -model->BSIM3v32type * (here->BSIM3v32csub - here->BSIM3v32gbds * vds - here->BSIM3v32gbgs * vgs - here->BSIM3v32gbbs * vbs); ceqbs = 0.0; gbbdp = -here->BSIM3v32gbds; gbbsp = (here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs); gbdpg = here->BSIM3v32gbgs; gbdpdp = here->BSIM3v32gbds; gbdpb = here->BSIM3v32gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; } else { Gm = -here->BSIM3v32gm; Gmbs = -here->BSIM3v32gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); cdreq = -model->BSIM3v32type * (cdrain + here->BSIM3v32gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = -model->BSIM3v32type * (here->BSIM3v32csub + here->BSIM3v32gbds * vds - here->BSIM3v32gbgs * vgd - here->BSIM3v32gbbs * vbd); ceqbd = 0.0; gbbsp = -here->BSIM3v32gbds; gbbdp = (here->BSIM3v32gbds + here->BSIM3v32gbgs + here->BSIM3v32gbbs); gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM3v32gbgs; gbspsp = here->BSIM3v32gbds; gbspb = here->BSIM3v32gbbs; gbspdp = -(gbspg + gbspsp + gbspb); } if (model->BSIM3v32type > 0) { ceqbs += (here->BSIM3v32cbs - here->BSIM3v32gbs * vbs); ceqbd += (here->BSIM3v32cbd - here->BSIM3v32gbd * vbd); /* ceqqg = ceqqg; ceqqb = ceqqb; ceqqd = ceqqd; cqdef = cqdef; cqcheq = cqcheq; */ } else { ceqbs -= (here->BSIM3v32cbs - here->BSIM3v32gbs * vbs); ceqbd -= (here->BSIM3v32cbd - here->BSIM3v32gbd * vbd); ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; cqdef = -cqdef; cqcheq = -cqcheq; } m = here->BSIM3v32m; (*(ckt->CKTrhs + here->BSIM3v32gNode) -= m * ceqqg); (*(ckt->CKTrhs + here->BSIM3v32bNode) -= m * (ceqbs + ceqbd + ceqqb)); (*(ckt->CKTrhs + here->BSIM3v32dNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->BSIM3v32sNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd)); if (here->BSIM3v32nqsMod) *(ckt->CKTrhs + here->BSIM3v32qNode) += m * (cqcheq - cqdef); /* * load y matrix */ T1 = qdef * here->BSIM3v32gtau; (*(here->BSIM3v32DdPtr) += m * here->BSIM3v32drainConductance); (*(here->BSIM3v32GgPtr) += m * (gcggb - ggtg)); (*(here->BSIM3v32SsPtr) += m * here->BSIM3v32sourceConductance); (*(here->BSIM3v32BbPtr) += m * (here->BSIM3v32gbd + here->BSIM3v32gbs - gcbgb - gcbdb - gcbsb - here->BSIM3v32gbbs)); (*(here->BSIM3v32DPdpPtr) += m * (here->BSIM3v32drainConductance + here->BSIM3v32gds + here->BSIM3v32gbd + RevSum + gcddb + dxpart * ggtd + T1 * ddxpart_dVd + gbdpdp)); (*(here->BSIM3v32SPspPtr) += m * (here->BSIM3v32sourceConductance + here->BSIM3v32gds + here->BSIM3v32gbs + FwdSum + gcssb + sxpart * ggts + T1 * dsxpart_dVs + gbspsp)); (*(here->BSIM3v32DdpPtr) -= m * here->BSIM3v32drainConductance); (*(here->BSIM3v32GbPtr) -= m * (gcggb + gcgdb + gcgsb + ggtb)); (*(here->BSIM3v32GdpPtr) += m * (gcgdb - ggtd)); (*(here->BSIM3v32GspPtr) += m * (gcgsb - ggts)); (*(here->BSIM3v32SspPtr) -= m * here->BSIM3v32sourceConductance); (*(here->BSIM3v32BgPtr) += m * (gcbgb - here->BSIM3v32gbgs)); (*(here->BSIM3v32BdpPtr) += m * (gcbdb - here->BSIM3v32gbd + gbbdp)); (*(here->BSIM3v32BspPtr) += m * (gcbsb - here->BSIM3v32gbs + gbbsp)); (*(here->BSIM3v32DPdPtr) -= m * here->BSIM3v32drainConductance); (*(here->BSIM3v32DPgPtr) += m * (Gm + gcdgb + dxpart * ggtg + T1 * ddxpart_dVg + gbdpg)); (*(here->BSIM3v32DPbPtr) -= m * (here->BSIM3v32gbd - Gmbs + gcdgb + gcddb + gcdsb - dxpart * ggtb - T1 * ddxpart_dVb - gbdpb)); (*(here->BSIM3v32DPspPtr) -= m * (here->BSIM3v32gds + FwdSum - gcdsb - dxpart * ggts - T1 * ddxpart_dVs - gbdpsp)); (*(here->BSIM3v32SPgPtr) += m * (gcsgb - Gm + sxpart * ggtg + T1 * dsxpart_dVg + gbspg)); (*(here->BSIM3v32SPsPtr) -= m * here->BSIM3v32sourceConductance); (*(here->BSIM3v32SPbPtr) -= m * (here->BSIM3v32gbs + Gmbs + gcsgb + gcsdb + gcssb - sxpart * ggtb - T1 * dsxpart_dVb - gbspb)); (*(here->BSIM3v32SPdpPtr) -= m * (here->BSIM3v32gds + RevSum - gcsdb - sxpart * ggtd - T1 * dsxpart_dVd - gbspdp)); if (here->BSIM3v32nqsMod) { *(here->BSIM3v32QqPtr) += m * (gqdef + here->BSIM3v32gtau); *(here->BSIM3v32DPqPtr) += m * (dxpart * here->BSIM3v32gtau); *(here->BSIM3v32SPqPtr) += m * (sxpart * here->BSIM3v32gtau); *(here->BSIM3v32GqPtr) -= m * here->BSIM3v32gtau; *(here->BSIM3v32QgPtr) += m * (ggtg - gcqgb); *(here->BSIM3v32QdpPtr) += m * (ggtd - gcqdb); *(here->BSIM3v32QspPtr) += m * (ggts - gcqsb); *(here->BSIM3v32QbPtr) += m * (ggtb - gcqbb); } line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/bsim3v32itf.h0000644000265600020320000000043112264261473022026 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. Modified by Paolo Nenzi 2002 File: bsim3itf.h **********/ #ifndef DEV_BSIM3v32 #define DEV_BSIM3v32 SPICEdev *get_bsim3v32_info(void); #endif ngspice-26/src/spicelib/devices/bsim3v32/b3v32getic.c0000644000265600020320000000257512264261473021634 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3getic.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32getic (GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; for (; model ; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) { if (!here->BSIM3v32icVBSGiven) { here->BSIM3v32icVBS = *(ckt->CKTrhs + here->BSIM3v32bNode) - *(ckt->CKTrhs + here->BSIM3v32sNode); } if (!here->BSIM3v32icVDSGiven) { here->BSIM3v32icVDS = *(ckt->CKTrhs + here->BSIM3v32dNode) - *(ckt->CKTrhs + here->BSIM3v32sNode); } if (!here->BSIM3v32icVGSGiven) { here->BSIM3v32icVGS = *(ckt->CKTrhs + here->BSIM3v32gNode) - *(ckt->CKTrhs + here->BSIM3v32sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32temp.c0000644000265600020320000015050512264261473021503 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3temp.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int BSIM3v32temp (GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model = (BSIM3v32model*) inModel; BSIM3v32instance *here; struct bsim3v32SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, Ldrn, Wdrn; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double Nvtm, SourceSatCurrent, DrainSatCurrent; int Size_Not_Found, error; /* loop through all the BSIM3v32 device models */ for (; model != NULL; model = model->BSIM3v32nextModel) { Temp = ckt->CKTtemp; if (model->BSIM3v32bulkJctPotential < 0.1) { model->BSIM3v32bulkJctPotential = 0.1; fprintf(stderr, "Given pb is less than 0.1. Pb is set to 0.1.\n"); } if (model->BSIM3v32sidewallJctPotential < 0.1) { model->BSIM3v32sidewallJctPotential = 0.1; fprintf(stderr, "Given pbsw is less than 0.1. Pbsw is set to 0.1.\n"); } if (model->BSIM3v32GatesidewallJctPotential < 0.1) { model->BSIM3v32GatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswg is less than 0.1. Pbswg is set to 0.1.\n"); } model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM3v32tnom; TRatio = Temp / Tnom; model->BSIM3v32vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM3v32factor1 = sqrt(EPSSI / EPSOX * model->BSIM3v32tox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); model->BSIM3v32vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM3v32vtm + model->BSIM3v32jctTempExponent * log(Temp / Tnom); T1 = exp(T0 / model->BSIM3v32jctEmissionCoeff); model->BSIM3v32jctTempSatCurDensity = model->BSIM3v32jctSatCurDensity * T1; model->BSIM3v32jctSidewallTempSatCurDensity = model->BSIM3v32jctSidewallSatCurDensity * T1; } else { model->BSIM3v32jctTempSatCurDensity = model->BSIM3v32jctSatCurDensity; model->BSIM3v32jctSidewallTempSatCurDensity = model->BSIM3v32jctSidewallSatCurDensity; } if (model->BSIM3v32jctTempSatCurDensity < 0.0) model->BSIM3v32jctTempSatCurDensity = 0.0; if (model->BSIM3v32jctSidewallTempSatCurDensity < 0.0) model->BSIM3v32jctSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM3v32tnom; T0 = model->BSIM3v32tcj * delTemp; if (T0 >= -1.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitAreaTempJctCap = model->BSIM3v32unitAreaJctCap * (1.0 + T0); break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitAreaJctCap *= 1.0 + T0; } } else if (model->BSIM3v32unitAreaJctCap > 0.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitAreaTempJctCap = 0.0; break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitAreaJctCap = 0.0; } fprintf(stderr, "Temperature effect has caused cj to be negative. Cj is clamped to zero.\n"); } T0 = model->BSIM3v32tcjsw * delTemp; if (T0 >= -1.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitLengthSidewallTempJctCap = model->BSIM3v32unitLengthSidewallJctCap * (1.0 + T0); break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitLengthSidewallJctCap *= 1.0 + T0; } } else if (model->BSIM3v32unitLengthSidewallJctCap > 0.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitLengthSidewallTempJctCap = 0.0; break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitLengthSidewallJctCap = 0.0; } fprintf(stderr, "Temperature effect has caused cjsw to be negative. Cjsw is clamped to zero.\n"); } T0 = model->BSIM3v32tcjswg * delTemp; if (T0 >= -1.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitLengthGateSidewallTempJctCap = model->BSIM3v32unitLengthGateSidewallJctCap * (1.0 + T0); break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitLengthGateSidewallJctCap *= 1.0 + T0; } } else if (model->BSIM3v32unitLengthGateSidewallJctCap > 0.0) { /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: model->BSIM3v32unitLengthGateSidewallTempJctCap = 0.0; break; case BSIM3v32V322: case BSIM3v32V32: default: model->BSIM3v32unitLengthGateSidewallJctCap = 0.0; } fprintf(stderr, "Temperature effect has caused cjswg to be negative. Cjswg is clamped to zero.\n"); } model->BSIM3v32PhiB = model->BSIM3v32bulkJctPotential - model->BSIM3v32tpb * delTemp; if (model->BSIM3v32PhiB < 0.01) { model->BSIM3v32PhiB = 0.01; fprintf(stderr, "Temperature effect has caused pb to be less than 0.01. Pb is clamped to 0.01.\n"); } model->BSIM3v32PhiBSW = model->BSIM3v32sidewallJctPotential - model->BSIM3v32tpbsw * delTemp; if (model->BSIM3v32PhiBSW <= 0.01) { model->BSIM3v32PhiBSW = 0.01; fprintf(stderr, "Temperature effect has caused pbsw to be less than 0.01. Pbsw is clamped to 0.01.\n"); } model->BSIM3v32PhiBSWG = model->BSIM3v32GatesidewallJctPotential - model->BSIM3v32tpbswg * delTemp; if (model->BSIM3v32PhiBSWG <= 0.01) { model->BSIM3v32PhiBSWG = 0.01; fprintf(stderr, "Temperature effect has caused pbswg to be less than 0.01. Pbswg is clamped to 0.01.\n"); } /* End of junction capacitance */ /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->BSIM3v32instances; here != NULL; here = here->BSIM3v32nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM3v32l == pSizeDependParamKnot->Length) && (here->BSIM3v32w == pSizeDependParamKnot->Width)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; if (model->BSIM3v32intVersion > BSIM3v32V322) { pParam = here->pParam; /*bug-fix */ } } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct bsim3v32SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->BSIM3v32l; Wdrn = here->BSIM3v32w; pParam->Length = Ldrn; pParam->Width = Wdrn; T0 = pow(Ldrn, model->BSIM3v32Lln); T1 = pow(Wdrn, model->BSIM3v32Lwn); tmp1 = model->BSIM3v32Ll / T0 + model->BSIM3v32Lw / T1 + model->BSIM3v32Lwl / (T0 * T1); pParam->BSIM3v32dl = model->BSIM3v32Lint + tmp1; tmp2 = model->BSIM3v32Llc / T0 + model->BSIM3v32Lwc / T1 + model->BSIM3v32Lwlc / (T0 * T1); pParam->BSIM3v32dlc = model->BSIM3v32dlc + tmp2; T2 = pow(Ldrn, model->BSIM3v32Wln); T3 = pow(Wdrn, model->BSIM3v32Wwn); tmp1 = model->BSIM3v32Wl / T2 + model->BSIM3v32Ww / T3 + model->BSIM3v32Wwl / (T2 * T3); pParam->BSIM3v32dw = model->BSIM3v32Wint + tmp1; tmp2 = model->BSIM3v32Wlc / T2 + model->BSIM3v32Wwc / T3 + model->BSIM3v32Wwlc / (T2 * T3); pParam->BSIM3v32dwc = model->BSIM3v32dwc + tmp2; pParam->BSIM3v32leff = here->BSIM3v32l + model->BSIM3v32xl - 2.0 * pParam->BSIM3v32dl; if (pParam->BSIM3v32leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v32modName; namarray[1] = here->BSIM3v32name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v32: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v32weff = here->BSIM3v32w + model->BSIM3v32xw - 2.0 * pParam->BSIM3v32dw; if (pParam->BSIM3v32weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v32modName; namarray[1] = here->BSIM3v32name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v32: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v32leffCV = here->BSIM3v32l + model->BSIM3v32xl - 2.0 * pParam->BSIM3v32dlc; if (pParam->BSIM3v32leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v32modName; namarray[1] = here->BSIM3v32name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v32: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v32weffCV = here->BSIM3v32w + model->BSIM3v32xw - 2.0 * pParam->BSIM3v32dwc; if (pParam->BSIM3v32weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v32modName; namarray[1] = here->BSIM3v32name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v32: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } if (model->BSIM3v32binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM3v32leff; Inv_W = 1.0e-6 / pParam->BSIM3v32weff; Inv_LW = 1.0e-12 / (pParam->BSIM3v32leff * pParam->BSIM3v32weff); } else { Inv_L = 1.0 / pParam->BSIM3v32leff; Inv_W = 1.0 / pParam->BSIM3v32weff; Inv_LW = 1.0 / (pParam->BSIM3v32leff * pParam->BSIM3v32weff); } pParam->BSIM3v32cdsc = model->BSIM3v32cdsc + model->BSIM3v32lcdsc * Inv_L + model->BSIM3v32wcdsc * Inv_W + model->BSIM3v32pcdsc * Inv_LW; pParam->BSIM3v32cdscb = model->BSIM3v32cdscb + model->BSIM3v32lcdscb * Inv_L + model->BSIM3v32wcdscb * Inv_W + model->BSIM3v32pcdscb * Inv_LW; pParam->BSIM3v32cdscd = model->BSIM3v32cdscd + model->BSIM3v32lcdscd * Inv_L + model->BSIM3v32wcdscd * Inv_W + model->BSIM3v32pcdscd * Inv_LW; pParam->BSIM3v32cit = model->BSIM3v32cit + model->BSIM3v32lcit * Inv_L + model->BSIM3v32wcit * Inv_W + model->BSIM3v32pcit * Inv_LW; pParam->BSIM3v32nfactor = model->BSIM3v32nfactor + model->BSIM3v32lnfactor * Inv_L + model->BSIM3v32wnfactor * Inv_W + model->BSIM3v32pnfactor * Inv_LW; pParam->BSIM3v32xj = model->BSIM3v32xj + model->BSIM3v32lxj * Inv_L + model->BSIM3v32wxj * Inv_W + model->BSIM3v32pxj * Inv_LW; pParam->BSIM3v32vsat = model->BSIM3v32vsat + model->BSIM3v32lvsat * Inv_L + model->BSIM3v32wvsat * Inv_W + model->BSIM3v32pvsat * Inv_LW; pParam->BSIM3v32at = model->BSIM3v32at + model->BSIM3v32lat * Inv_L + model->BSIM3v32wat * Inv_W + model->BSIM3v32pat * Inv_LW; pParam->BSIM3v32a0 = model->BSIM3v32a0 + model->BSIM3v32la0 * Inv_L + model->BSIM3v32wa0 * Inv_W + model->BSIM3v32pa0 * Inv_LW; pParam->BSIM3v32ags = model->BSIM3v32ags + model->BSIM3v32lags * Inv_L + model->BSIM3v32wags * Inv_W + model->BSIM3v32pags * Inv_LW; pParam->BSIM3v32a1 = model->BSIM3v32a1 + model->BSIM3v32la1 * Inv_L + model->BSIM3v32wa1 * Inv_W + model->BSIM3v32pa1 * Inv_LW; pParam->BSIM3v32a2 = model->BSIM3v32a2 + model->BSIM3v32la2 * Inv_L + model->BSIM3v32wa2 * Inv_W + model->BSIM3v32pa2 * Inv_LW; pParam->BSIM3v32keta = model->BSIM3v32keta + model->BSIM3v32lketa * Inv_L + model->BSIM3v32wketa * Inv_W + model->BSIM3v32pketa * Inv_LW; pParam->BSIM3v32nsub = model->BSIM3v32nsub + model->BSIM3v32lnsub * Inv_L + model->BSIM3v32wnsub * Inv_W + model->BSIM3v32pnsub * Inv_LW; pParam->BSIM3v32npeak = model->BSIM3v32npeak + model->BSIM3v32lnpeak * Inv_L + model->BSIM3v32wnpeak * Inv_W + model->BSIM3v32pnpeak * Inv_LW; pParam->BSIM3v32ngate = model->BSIM3v32ngate + model->BSIM3v32lngate * Inv_L + model->BSIM3v32wngate * Inv_W + model->BSIM3v32pngate * Inv_LW; pParam->BSIM3v32gamma1 = model->BSIM3v32gamma1 + model->BSIM3v32lgamma1 * Inv_L + model->BSIM3v32wgamma1 * Inv_W + model->BSIM3v32pgamma1 * Inv_LW; pParam->BSIM3v32gamma2 = model->BSIM3v32gamma2 + model->BSIM3v32lgamma2 * Inv_L + model->BSIM3v32wgamma2 * Inv_W + model->BSIM3v32pgamma2 * Inv_LW; pParam->BSIM3v32vbx = model->BSIM3v32vbx + model->BSIM3v32lvbx * Inv_L + model->BSIM3v32wvbx * Inv_W + model->BSIM3v32pvbx * Inv_LW; pParam->BSIM3v32vbm = model->BSIM3v32vbm + model->BSIM3v32lvbm * Inv_L + model->BSIM3v32wvbm * Inv_W + model->BSIM3v32pvbm * Inv_LW; pParam->BSIM3v32xt = model->BSIM3v32xt + model->BSIM3v32lxt * Inv_L + model->BSIM3v32wxt * Inv_W + model->BSIM3v32pxt * Inv_LW; pParam->BSIM3v32vfb = model->BSIM3v32vfb + model->BSIM3v32lvfb * Inv_L + model->BSIM3v32wvfb * Inv_W + model->BSIM3v32pvfb * Inv_LW; pParam->BSIM3v32k1 = model->BSIM3v32k1 + model->BSIM3v32lk1 * Inv_L + model->BSIM3v32wk1 * Inv_W + model->BSIM3v32pk1 * Inv_LW; pParam->BSIM3v32kt1 = model->BSIM3v32kt1 + model->BSIM3v32lkt1 * Inv_L + model->BSIM3v32wkt1 * Inv_W + model->BSIM3v32pkt1 * Inv_LW; pParam->BSIM3v32kt1l = model->BSIM3v32kt1l + model->BSIM3v32lkt1l * Inv_L + model->BSIM3v32wkt1l * Inv_W + model->BSIM3v32pkt1l * Inv_LW; pParam->BSIM3v32k2 = model->BSIM3v32k2 + model->BSIM3v32lk2 * Inv_L + model->BSIM3v32wk2 * Inv_W + model->BSIM3v32pk2 * Inv_LW; pParam->BSIM3v32kt2 = model->BSIM3v32kt2 + model->BSIM3v32lkt2 * Inv_L + model->BSIM3v32wkt2 * Inv_W + model->BSIM3v32pkt2 * Inv_LW; pParam->BSIM3v32k3 = model->BSIM3v32k3 + model->BSIM3v32lk3 * Inv_L + model->BSIM3v32wk3 * Inv_W + model->BSIM3v32pk3 * Inv_LW; pParam->BSIM3v32k3b = model->BSIM3v32k3b + model->BSIM3v32lk3b * Inv_L + model->BSIM3v32wk3b * Inv_W + model->BSIM3v32pk3b * Inv_LW; pParam->BSIM3v32w0 = model->BSIM3v32w0 + model->BSIM3v32lw0 * Inv_L + model->BSIM3v32ww0 * Inv_W + model->BSIM3v32pw0 * Inv_LW; pParam->BSIM3v32nlx = model->BSIM3v32nlx + model->BSIM3v32lnlx * Inv_L + model->BSIM3v32wnlx * Inv_W + model->BSIM3v32pnlx * Inv_LW; pParam->BSIM3v32dvt0 = model->BSIM3v32dvt0 + model->BSIM3v32ldvt0 * Inv_L + model->BSIM3v32wdvt0 * Inv_W + model->BSIM3v32pdvt0 * Inv_LW; pParam->BSIM3v32dvt1 = model->BSIM3v32dvt1 + model->BSIM3v32ldvt1 * Inv_L + model->BSIM3v32wdvt1 * Inv_W + model->BSIM3v32pdvt1 * Inv_LW; pParam->BSIM3v32dvt2 = model->BSIM3v32dvt2 + model->BSIM3v32ldvt2 * Inv_L + model->BSIM3v32wdvt2 * Inv_W + model->BSIM3v32pdvt2 * Inv_LW; pParam->BSIM3v32dvt0w = model->BSIM3v32dvt0w + model->BSIM3v32ldvt0w * Inv_L + model->BSIM3v32wdvt0w * Inv_W + model->BSIM3v32pdvt0w * Inv_LW; pParam->BSIM3v32dvt1w = model->BSIM3v32dvt1w + model->BSIM3v32ldvt1w * Inv_L + model->BSIM3v32wdvt1w * Inv_W + model->BSIM3v32pdvt1w * Inv_LW; pParam->BSIM3v32dvt2w = model->BSIM3v32dvt2w + model->BSIM3v32ldvt2w * Inv_L + model->BSIM3v32wdvt2w * Inv_W + model->BSIM3v32pdvt2w * Inv_LW; pParam->BSIM3v32drout = model->BSIM3v32drout + model->BSIM3v32ldrout * Inv_L + model->BSIM3v32wdrout * Inv_W + model->BSIM3v32pdrout * Inv_LW; pParam->BSIM3v32dsub = model->BSIM3v32dsub + model->BSIM3v32ldsub * Inv_L + model->BSIM3v32wdsub * Inv_W + model->BSIM3v32pdsub * Inv_LW; pParam->BSIM3v32vth0 = model->BSIM3v32vth0 + model->BSIM3v32lvth0 * Inv_L + model->BSIM3v32wvth0 * Inv_W + model->BSIM3v32pvth0 * Inv_LW; pParam->BSIM3v32ua = model->BSIM3v32ua + model->BSIM3v32lua * Inv_L + model->BSIM3v32wua * Inv_W + model->BSIM3v32pua * Inv_LW; pParam->BSIM3v32ua1 = model->BSIM3v32ua1 + model->BSIM3v32lua1 * Inv_L + model->BSIM3v32wua1 * Inv_W + model->BSIM3v32pua1 * Inv_LW; pParam->BSIM3v32ub = model->BSIM3v32ub + model->BSIM3v32lub * Inv_L + model->BSIM3v32wub * Inv_W + model->BSIM3v32pub * Inv_LW; pParam->BSIM3v32ub1 = model->BSIM3v32ub1 + model->BSIM3v32lub1 * Inv_L + model->BSIM3v32wub1 * Inv_W + model->BSIM3v32pub1 * Inv_LW; pParam->BSIM3v32uc = model->BSIM3v32uc + model->BSIM3v32luc * Inv_L + model->BSIM3v32wuc * Inv_W + model->BSIM3v32puc * Inv_LW; pParam->BSIM3v32uc1 = model->BSIM3v32uc1 + model->BSIM3v32luc1 * Inv_L + model->BSIM3v32wuc1 * Inv_W + model->BSIM3v32puc1 * Inv_LW; pParam->BSIM3v32u0 = model->BSIM3v32u0 + model->BSIM3v32lu0 * Inv_L + model->BSIM3v32wu0 * Inv_W + model->BSIM3v32pu0 * Inv_LW; pParam->BSIM3v32ute = model->BSIM3v32ute + model->BSIM3v32lute * Inv_L + model->BSIM3v32wute * Inv_W + model->BSIM3v32pute * Inv_LW; pParam->BSIM3v32voff = model->BSIM3v32voff + model->BSIM3v32lvoff * Inv_L + model->BSIM3v32wvoff * Inv_W + model->BSIM3v32pvoff * Inv_LW; pParam->BSIM3v32delta = model->BSIM3v32delta + model->BSIM3v32ldelta * Inv_L + model->BSIM3v32wdelta * Inv_W + model->BSIM3v32pdelta * Inv_LW; pParam->BSIM3v32rdsw = model->BSIM3v32rdsw + model->BSIM3v32lrdsw * Inv_L + model->BSIM3v32wrdsw * Inv_W + model->BSIM3v32prdsw * Inv_LW; pParam->BSIM3v32prwg = model->BSIM3v32prwg + model->BSIM3v32lprwg * Inv_L + model->BSIM3v32wprwg * Inv_W + model->BSIM3v32pprwg * Inv_LW; pParam->BSIM3v32prwb = model->BSIM3v32prwb + model->BSIM3v32lprwb * Inv_L + model->BSIM3v32wprwb * Inv_W + model->BSIM3v32pprwb * Inv_LW; pParam->BSIM3v32prt = model->BSIM3v32prt + model->BSIM3v32lprt * Inv_L + model->BSIM3v32wprt * Inv_W + model->BSIM3v32pprt * Inv_LW; pParam->BSIM3v32eta0 = model->BSIM3v32eta0 + model->BSIM3v32leta0 * Inv_L + model->BSIM3v32weta0 * Inv_W + model->BSIM3v32peta0 * Inv_LW; pParam->BSIM3v32etab = model->BSIM3v32etab + model->BSIM3v32letab * Inv_L + model->BSIM3v32wetab * Inv_W + model->BSIM3v32petab * Inv_LW; pParam->BSIM3v32pclm = model->BSIM3v32pclm + model->BSIM3v32lpclm * Inv_L + model->BSIM3v32wpclm * Inv_W + model->BSIM3v32ppclm * Inv_LW; pParam->BSIM3v32pdibl1 = model->BSIM3v32pdibl1 + model->BSIM3v32lpdibl1 * Inv_L + model->BSIM3v32wpdibl1 * Inv_W + model->BSIM3v32ppdibl1 * Inv_LW; pParam->BSIM3v32pdibl2 = model->BSIM3v32pdibl2 + model->BSIM3v32lpdibl2 * Inv_L + model->BSIM3v32wpdibl2 * Inv_W + model->BSIM3v32ppdibl2 * Inv_LW; pParam->BSIM3v32pdiblb = model->BSIM3v32pdiblb + model->BSIM3v32lpdiblb * Inv_L + model->BSIM3v32wpdiblb * Inv_W + model->BSIM3v32ppdiblb * Inv_LW; pParam->BSIM3v32pscbe1 = model->BSIM3v32pscbe1 + model->BSIM3v32lpscbe1 * Inv_L + model->BSIM3v32wpscbe1 * Inv_W + model->BSIM3v32ppscbe1 * Inv_LW; pParam->BSIM3v32pscbe2 = model->BSIM3v32pscbe2 + model->BSIM3v32lpscbe2 * Inv_L + model->BSIM3v32wpscbe2 * Inv_W + model->BSIM3v32ppscbe2 * Inv_LW; pParam->BSIM3v32pvag = model->BSIM3v32pvag + model->BSIM3v32lpvag * Inv_L + model->BSIM3v32wpvag * Inv_W + model->BSIM3v32ppvag * Inv_LW; pParam->BSIM3v32wr = model->BSIM3v32wr + model->BSIM3v32lwr * Inv_L + model->BSIM3v32wwr * Inv_W + model->BSIM3v32pwr * Inv_LW; pParam->BSIM3v32dwg = model->BSIM3v32dwg + model->BSIM3v32ldwg * Inv_L + model->BSIM3v32wdwg * Inv_W + model->BSIM3v32pdwg * Inv_LW; pParam->BSIM3v32dwb = model->BSIM3v32dwb + model->BSIM3v32ldwb * Inv_L + model->BSIM3v32wdwb * Inv_W + model->BSIM3v32pdwb * Inv_LW; pParam->BSIM3v32b0 = model->BSIM3v32b0 + model->BSIM3v32lb0 * Inv_L + model->BSIM3v32wb0 * Inv_W + model->BSIM3v32pb0 * Inv_LW; pParam->BSIM3v32b1 = model->BSIM3v32b1 + model->BSIM3v32lb1 * Inv_L + model->BSIM3v32wb1 * Inv_W + model->BSIM3v32pb1 * Inv_LW; pParam->BSIM3v32alpha0 = model->BSIM3v32alpha0 + model->BSIM3v32lalpha0 * Inv_L + model->BSIM3v32walpha0 * Inv_W + model->BSIM3v32palpha0 * Inv_LW; pParam->BSIM3v32alpha1 = model->BSIM3v32alpha1 + model->BSIM3v32lalpha1 * Inv_L + model->BSIM3v32walpha1 * Inv_W + model->BSIM3v32palpha1 * Inv_LW; pParam->BSIM3v32beta0 = model->BSIM3v32beta0 + model->BSIM3v32lbeta0 * Inv_L + model->BSIM3v32wbeta0 * Inv_W + model->BSIM3v32pbeta0 * Inv_LW; /* CV model */ pParam->BSIM3v32elm = model->BSIM3v32elm + model->BSIM3v32lelm * Inv_L + model->BSIM3v32welm * Inv_W + model->BSIM3v32pelm * Inv_LW; pParam->BSIM3v32cgsl = model->BSIM3v32cgsl + model->BSIM3v32lcgsl * Inv_L + model->BSIM3v32wcgsl * Inv_W + model->BSIM3v32pcgsl * Inv_LW; pParam->BSIM3v32cgdl = model->BSIM3v32cgdl + model->BSIM3v32lcgdl * Inv_L + model->BSIM3v32wcgdl * Inv_W + model->BSIM3v32pcgdl * Inv_LW; pParam->BSIM3v32ckappa = model->BSIM3v32ckappa + model->BSIM3v32lckappa * Inv_L + model->BSIM3v32wckappa * Inv_W + model->BSIM3v32pckappa * Inv_LW; pParam->BSIM3v32cf = model->BSIM3v32cf + model->BSIM3v32lcf * Inv_L + model->BSIM3v32wcf * Inv_W + model->BSIM3v32pcf * Inv_LW; pParam->BSIM3v32clc = model->BSIM3v32clc + model->BSIM3v32lclc * Inv_L + model->BSIM3v32wclc * Inv_W + model->BSIM3v32pclc * Inv_LW; pParam->BSIM3v32cle = model->BSIM3v32cle + model->BSIM3v32lcle * Inv_L + model->BSIM3v32wcle * Inv_W + model->BSIM3v32pcle * Inv_LW; pParam->BSIM3v32vfbcv = model->BSIM3v32vfbcv + model->BSIM3v32lvfbcv * Inv_L + model->BSIM3v32wvfbcv * Inv_W + model->BSIM3v32pvfbcv * Inv_LW; pParam->BSIM3v32acde = model->BSIM3v32acde + model->BSIM3v32lacde * Inv_L + model->BSIM3v32wacde * Inv_W + model->BSIM3v32pacde * Inv_LW; pParam->BSIM3v32moin = model->BSIM3v32moin + model->BSIM3v32lmoin * Inv_L + model->BSIM3v32wmoin * Inv_W + model->BSIM3v32pmoin * Inv_LW; pParam->BSIM3v32noff = model->BSIM3v32noff + model->BSIM3v32lnoff * Inv_L + model->BSIM3v32wnoff * Inv_W + model->BSIM3v32pnoff * Inv_LW; pParam->BSIM3v32voffcv = model->BSIM3v32voffcv + model->BSIM3v32lvoffcv * Inv_L + model->BSIM3v32wvoffcv * Inv_W + model->BSIM3v32pvoffcv * Inv_LW; pParam->BSIM3v32abulkCVfactor = 1.0 + pow((pParam->BSIM3v32clc / pParam->BSIM3v32leffCV), pParam->BSIM3v32cle); T0 = (TRatio - 1.0); pParam->BSIM3v32ua = pParam->BSIM3v32ua + pParam->BSIM3v32ua1 * T0; pParam->BSIM3v32ub = pParam->BSIM3v32ub + pParam->BSIM3v32ub1 * T0; pParam->BSIM3v32uc = pParam->BSIM3v32uc + pParam->BSIM3v32uc1 * T0; if (pParam->BSIM3v32u0 > 1.0) pParam->BSIM3v32u0 = pParam->BSIM3v32u0 / 1.0e4; pParam->BSIM3v32u0temp = pParam->BSIM3v32u0 * pow(TRatio, pParam->BSIM3v32ute); pParam->BSIM3v32vsattemp = pParam->BSIM3v32vsat - pParam->BSIM3v32at * T0; pParam->BSIM3v32rds0 = (pParam->BSIM3v32rdsw + pParam->BSIM3v32prt * T0) / pow(pParam->BSIM3v32weff * 1E6, pParam->BSIM3v32wr); if (BSIM3v32checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM3v32modName; namarray[1] = here->BSIM3v32name; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM3v32V3.2 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->BSIM3v32cgdo = (model->BSIM3v32cgdo + pParam->BSIM3v32cf) * pParam->BSIM3v32weffCV; pParam->BSIM3v32cgso = (model->BSIM3v32cgso + pParam->BSIM3v32cf) * pParam->BSIM3v32weffCV; pParam->BSIM3v32cgbo = model->BSIM3v32cgbo * pParam->BSIM3v32leffCV; T0 = pParam->BSIM3v32leffCV * pParam->BSIM3v32leffCV; pParam->BSIM3v32tconst = pParam->BSIM3v32u0temp * pParam->BSIM3v32elm / (model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV * T0); if (!model->BSIM3v32npeakGiven && model->BSIM3v32gamma1Given) { T0 = pParam->BSIM3v32gamma1 * model->BSIM3v32cox; pParam->BSIM3v32npeak = 3.021E22 * T0 * T0; } pParam->BSIM3v32phi = 2.0 * Vtm0 * log(pParam->BSIM3v32npeak / ni); pParam->BSIM3v32sqrtPhi = sqrt(pParam->BSIM3v32phi); pParam->BSIM3v32phis3 = pParam->BSIM3v32sqrtPhi * pParam->BSIM3v32phi; pParam->BSIM3v32Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM3v32npeak * 1.0e6)) * pParam->BSIM3v32sqrtPhi; pParam->BSIM3v32sqrtXdep0 = sqrt(pParam->BSIM3v32Xdep0); pParam->BSIM3v32litl = sqrt(3.0 * pParam->BSIM3v32xj * model->BSIM3v32tox); pParam->BSIM3v32vbi = Vtm0 * log(1.0e20 * pParam->BSIM3v32npeak / (ni * ni)); pParam->BSIM3v32cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM3v32npeak * 1.0e6 / 2.0 / pParam->BSIM3v32phi); pParam->BSIM3v32ldeb = sqrt(EPSSI * Vtm0 / (Charge_q * pParam->BSIM3v32npeak * 1.0e6)) / 3.0; pParam->BSIM3v32acde *= pow((pParam->BSIM3v32npeak / 2.0e16), -0.25); if (model->BSIM3v32k1Given || model->BSIM3v32k2Given) { if (!model->BSIM3v32k1Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3v32k1 = 0.53; } if (!model->BSIM3v32k2Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3v32k2 = -0.0186; } if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) { /* don't print in sensitivity */ if (model->BSIM3v32nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM3v32xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM3v32vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM3v32gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM3v32gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } } else { if (!model->BSIM3v32vbxGiven) pParam->BSIM3v32vbx = pParam->BSIM3v32phi - 7.7348e-4 * pParam->BSIM3v32npeak * pParam->BSIM3v32xt * pParam->BSIM3v32xt; if (pParam->BSIM3v32vbx > 0.0) pParam->BSIM3v32vbx = -pParam->BSIM3v32vbx; if (pParam->BSIM3v32vbm > 0.0) pParam->BSIM3v32vbm = -pParam->BSIM3v32vbm; if (!model->BSIM3v32gamma1Given) pParam->BSIM3v32gamma1 = 5.753e-12 * sqrt(pParam->BSIM3v32npeak) / model->BSIM3v32cox; if (!model->BSIM3v32gamma2Given) pParam->BSIM3v32gamma2 = 5.753e-12 * sqrt(pParam->BSIM3v32nsub) / model->BSIM3v32cox; T0 = pParam->BSIM3v32gamma1 - pParam->BSIM3v32gamma2; T1 = sqrt(pParam->BSIM3v32phi - pParam->BSIM3v32vbx) - pParam->BSIM3v32sqrtPhi; T2 = sqrt(pParam->BSIM3v32phi * (pParam->BSIM3v32phi - pParam->BSIM3v32vbm)) - pParam->BSIM3v32phi; pParam->BSIM3v32k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM3v32vbm); pParam->BSIM3v32k1 = pParam->BSIM3v32gamma2 - 2.0 * pParam->BSIM3v32k2 * sqrt(pParam->BSIM3v32phi - pParam->BSIM3v32vbm); } if (pParam->BSIM3v32k2 < 0.0) { T0 = 0.5 * pParam->BSIM3v32k1 / pParam->BSIM3v32k2; pParam->BSIM3v32vbsc = 0.9 * (pParam->BSIM3v32phi - T0 * T0); if (pParam->BSIM3v32vbsc > -3.0) pParam->BSIM3v32vbsc = -3.0; else if (pParam->BSIM3v32vbsc < -30.0) pParam->BSIM3v32vbsc = -30.0; } else { pParam->BSIM3v32vbsc = -30.0; } if (pParam->BSIM3v32vbsc > pParam->BSIM3v32vbm) pParam->BSIM3v32vbsc = pParam->BSIM3v32vbm; if (!model->BSIM3v32vfbGiven) { if (model->BSIM3v32vth0Given) { pParam->BSIM3v32vfb = model->BSIM3v32type * pParam->BSIM3v32vth0 - pParam->BSIM3v32phi - pParam->BSIM3v32k1 * pParam->BSIM3v32sqrtPhi; } else { pParam->BSIM3v32vfb = -1.0; } } if (!model->BSIM3v32vth0Given) { pParam->BSIM3v32vth0 = model->BSIM3v32type * (pParam->BSIM3v32vfb + pParam->BSIM3v32phi + pParam->BSIM3v32k1 * pParam->BSIM3v32sqrtPhi); } pParam->BSIM3v32k1ox = pParam->BSIM3v32k1 * model->BSIM3v32tox / model->BSIM3v32toxm; pParam->BSIM3v32k2ox = pParam->BSIM3v32k2 * model->BSIM3v32tox / model->BSIM3v32toxm; T1 = sqrt(EPSSI / EPSOX * model->BSIM3v32tox * pParam->BSIM3v32Xdep0); T0 = exp(-0.5 * pParam->BSIM3v32dsub * pParam->BSIM3v32leff / T1); pParam->BSIM3v32theta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->BSIM3v32drout * pParam->BSIM3v32leff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->BSIM3v32thetaRout = pParam->BSIM3v32pdibl1 * T2 + pParam->BSIM3v32pdibl2; tmp = sqrt(pParam->BSIM3v32Xdep0); tmp1 = pParam->BSIM3v32vbi - pParam->BSIM3v32phi; tmp2 = model->BSIM3v32factor1 * tmp; T0 = -0.5 * pParam->BSIM3v32dvt1w * pParam->BSIM3v32weff * pParam->BSIM3v32leff / tmp2; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->BSIM3v32dvt0w * T2; T2 = T0 * tmp1; T0 = -0.5 * pParam->BSIM3v32dvt1 * pParam->BSIM3v32leff / tmp2; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T3 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXP; T3 = T1 * (1.0 + 2.0 * T1); } T3 = pParam->BSIM3v32dvt0 * T3 * tmp1; T4 = model->BSIM3v32tox * pParam->BSIM3v32phi / (pParam->BSIM3v32weff + pParam->BSIM3v32w0); T0 = sqrt(1.0 + pParam->BSIM3v32nlx / pParam->BSIM3v32leff); T5 = pParam->BSIM3v32k1ox * (T0 - 1.0) * pParam->BSIM3v32sqrtPhi + (pParam->BSIM3v32kt1 + pParam->BSIM3v32kt1l / pParam->BSIM3v32leff) * (TRatio - 1.0); tmp3 = model->BSIM3v32type * pParam->BSIM3v32vth0 - T2 - T3 + pParam->BSIM3v32k3 * T4 + T5; pParam->BSIM3v32vfbzb = tmp3 - pParam->BSIM3v32phi - pParam->BSIM3v32k1 * pParam->BSIM3v32sqrtPhi; /* End of vfbzb */ } /* adding delvto */ here->BSIM3v32vth0 = pParam->BSIM3v32vth0 + here->BSIM3v32delvto; here->BSIM3v32vfb = pParam->BSIM3v32vfb + model->BSIM3v32type * here->BSIM3v32delvto; here->BSIM3v32vfbzb = pParam->BSIM3v32vfbzb + model->BSIM3v32type * here->BSIM3v32delvto; /* low field mobility multiplier */ here->BSIM3v32u0temp = pParam->BSIM3v32u0temp * here->BSIM3v32mulu0; here->BSIM3v32tconst = here->BSIM3v32u0temp * pParam->BSIM3v32elm / (model->BSIM3v32cox * pParam->BSIM3v32weffCV * pParam->BSIM3v32leffCV * T0); /* process source/drain series resistance */ /* ACM model */ if (model->BSIM3v32acmMod == 0) { here->BSIM3v32drainConductance = model->BSIM3v32sheetResistance * here->BSIM3v32drainSquares; here->BSIM3v32sourceConductance = model->BSIM3v32sheetResistance * here->BSIM3v32sourceSquares; } else /* ACM > 0 */ { error = ACM_SourceDrainResistances( model->BSIM3v32acmMod, model->BSIM3v32ld, model->BSIM3v32ldif, model->BSIM3v32hdif, model->BSIM3v32wmlt, here->BSIM3v32w, model->BSIM3v32xw, model->BSIM3v32sheetResistance, here->BSIM3v32drainSquaresGiven, model->BSIM3v32rd, model->BSIM3v32rdc, here->BSIM3v32drainSquares, here->BSIM3v32sourceSquaresGiven, model->BSIM3v32rs, model->BSIM3v32rsc, here->BSIM3v32sourceSquares, &(here->BSIM3v32drainConductance), &(here->BSIM3v32sourceConductance) ); if (error) return(error); } if (here->BSIM3v32drainConductance > 0.0) here->BSIM3v32drainConductance = 1.0 / here->BSIM3v32drainConductance; else here->BSIM3v32drainConductance = 0.0; if (here->BSIM3v32sourceConductance > 0.0) here->BSIM3v32sourceConductance = 1.0 / here->BSIM3v32sourceConductance; else here->BSIM3v32sourceConductance = 0.0; here->BSIM3v32cgso = pParam->BSIM3v32cgso; here->BSIM3v32cgdo = pParam->BSIM3v32cgdo; Nvtm = model->BSIM3v32vtm * model->BSIM3v32jctEmissionCoeff; if (model->BSIM3v32acmMod == 0) { if ((here->BSIM3v32sourceArea <= 0.0) && (here->BSIM3v32sourcePerimeter <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM3v32sourceArea * model->BSIM3v32jctTempSatCurDensity + here->BSIM3v32sourcePerimeter * model->BSIM3v32jctSidewallTempSatCurDensity; } if ((here->BSIM3v32drainArea <= 0.0) && (here->BSIM3v32drainPerimeter <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM3v32drainArea * model->BSIM3v32jctTempSatCurDensity + here->BSIM3v32drainPerimeter * model->BSIM3v32jctSidewallTempSatCurDensity; } } else /* ACM > 0 */ { error = ACM_saturationCurrents( model->BSIM3v32acmMod, model->BSIM3v32calcacm, here->BSIM3v32geo, model->BSIM3v32hdif, model->BSIM3v32wmlt, here->BSIM3v32w, model->BSIM3v32xw, model->BSIM3v32jctTempSatCurDensity, model->BSIM3v32jctSidewallTempSatCurDensity, here->BSIM3v32drainAreaGiven, here->BSIM3v32drainArea, here->BSIM3v32drainPerimeterGiven, here->BSIM3v32drainPerimeter, here->BSIM3v32sourceAreaGiven, here->BSIM3v32sourceArea, here->BSIM3v32sourcePerimeterGiven, here->BSIM3v32sourcePerimeter, &DrainSatCurrent, &SourceSatCurrent ); if (error) return(error); } if ((SourceSatCurrent > 0.0) && (model->BSIM3v32ijth > 0.0)) { here->BSIM3v32vjsm = Nvtm * log(model->BSIM3v32ijth / SourceSatCurrent + 1.0); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: here->BSIM3v32IsEvjsm = SourceSatCurrent * exp(here->BSIM3v32vjsm / Nvtm); break; case BSIM3v32V32: default: /* Do nothing */ break; } } if ((DrainSatCurrent > 0.0) && (model->BSIM3v32ijth > 0.0)) { here->BSIM3v32vjdm = Nvtm * log(model->BSIM3v32ijth / DrainSatCurrent + 1.0); /* Added revision dependent code */ switch (model->BSIM3v32intVersion) { case BSIM3v32V324: case BSIM3v32V323: case BSIM3v32V322: here->BSIM3v32IsEvjdm = DrainSatCurrent * exp(here->BSIM3v32vjdm / Nvtm); break; case BSIM3v32V32: default: /* Do nothing */ break; } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32par.c0000644000265600020320000000753412264261473021323 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3par.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM3v32param (int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM3v32instance *here = (BSIM3v32instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM3v32_W: here->BSIM3v32w = value->rValue*scale; here->BSIM3v32wGiven = TRUE; break; case BSIM3v32_L: here->BSIM3v32l = value->rValue*scale; here->BSIM3v32lGiven = TRUE; break; case BSIM3v32_M: here->BSIM3v32m = value->rValue; here->BSIM3v32mGiven = TRUE; break; case BSIM3v32_AS: here->BSIM3v32sourceArea = value->rValue*scale*scale; here->BSIM3v32sourceAreaGiven = TRUE; break; case BSIM3v32_AD: here->BSIM3v32drainArea = value->rValue*scale*scale; here->BSIM3v32drainAreaGiven = TRUE; break; case BSIM3v32_PS: here->BSIM3v32sourcePerimeter = value->rValue*scale; here->BSIM3v32sourcePerimeterGiven = TRUE; break; case BSIM3v32_PD: here->BSIM3v32drainPerimeter = value->rValue*scale; here->BSIM3v32drainPerimeterGiven = TRUE; break; case BSIM3v32_NRS: here->BSIM3v32sourceSquares = value->rValue; here->BSIM3v32sourceSquaresGiven = TRUE; break; case BSIM3v32_NRD: here->BSIM3v32drainSquares = value->rValue; here->BSIM3v32drainSquaresGiven = TRUE; break; case BSIM3v32_OFF: here->BSIM3v32off = value->iValue; break; case BSIM3v32_IC_VBS: here->BSIM3v32icVBS = value->rValue; here->BSIM3v32icVBSGiven = TRUE; break; case BSIM3v32_IC_VDS: here->BSIM3v32icVDS = value->rValue; here->BSIM3v32icVDSGiven = TRUE; break; case BSIM3v32_IC_VGS: here->BSIM3v32icVGS = value->rValue; here->BSIM3v32icVGSGiven = TRUE; break; case BSIM3v32_NQSMOD: here->BSIM3v32nqsMod = value->iValue; here->BSIM3v32nqsModGiven = TRUE; break; case BSIM3v32_GEO: here->BSIM3v32geo = value->iValue; here->BSIM3v32geoGiven = TRUE; break; case BSIM3v32_DELVTO: here->BSIM3v32delvto = value->rValue; here->BSIM3v32delvtoGiven = TRUE; break; case BSIM3v32_MULU0: here->BSIM3v32mulu0 = value->rValue; here->BSIM3v32mulu0Given = TRUE; break; case BSIM3v32_IC: switch(value->v.numValue){ case 3: here->BSIM3v32icVBS = *(value->v.vec.rVec+2); here->BSIM3v32icVBSGiven = TRUE; case 2: here->BSIM3v32icVGS = *(value->v.vec.rVec+1); here->BSIM3v32icVGSGiven = TRUE; case 1: here->BSIM3v32icVDS = *(value->v.vec.rVec); here->BSIM3v32icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32ask.c0000644000265600020320000002012012264261473021301 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3ask.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified bt Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32ask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM3v32instance *here = (BSIM3v32instance*)inst; NG_IGNORE(select); switch(which) { case BSIM3v32_L: value->rValue = here->BSIM3v32l; return(OK); case BSIM3v32_W: value->rValue = here->BSIM3v32w; return(OK); case BSIM3v32_M: value->rValue = here->BSIM3v32m; return (OK); case BSIM3v32_AS: value->rValue = here->BSIM3v32sourceArea; return(OK); case BSIM3v32_AD: value->rValue = here->BSIM3v32drainArea; return(OK); case BSIM3v32_PS: value->rValue = here->BSIM3v32sourcePerimeter; return(OK); case BSIM3v32_PD: value->rValue = here->BSIM3v32drainPerimeter; return(OK); case BSIM3v32_NRS: value->rValue = here->BSIM3v32sourceSquares; return(OK); case BSIM3v32_NRD: value->rValue = here->BSIM3v32drainSquares; return(OK); case BSIM3v32_OFF: value->rValue = here->BSIM3v32off; return(OK); case BSIM3v32_NQSMOD: value->iValue = here->BSIM3v32nqsMod; return(OK); case BSIM3v32_GEO: value->iValue = here->BSIM3v32geo; return(OK); case BSIM3v32_DELVTO: value->rValue = here->BSIM3v32delvto; return(OK); case BSIM3v32_MULU0: value->rValue = here->BSIM3v32mulu0; return(OK); case BSIM3v32_IC_VBS: value->rValue = here->BSIM3v32icVBS; return(OK); case BSIM3v32_IC_VDS: value->rValue = here->BSIM3v32icVDS; return(OK); case BSIM3v32_IC_VGS: value->rValue = here->BSIM3v32icVGS; return(OK); case BSIM3v32_DNODE: value->iValue = here->BSIM3v32dNode; return(OK); case BSIM3v32_GNODE: value->iValue = here->BSIM3v32gNode; return(OK); case BSIM3v32_SNODE: value->iValue = here->BSIM3v32sNode; return(OK); case BSIM3v32_BNODE: value->iValue = here->BSIM3v32bNode; return(OK); case BSIM3v32_DNODEPRIME: value->iValue = here->BSIM3v32dNodePrime; return(OK); case BSIM3v32_SNODEPRIME: value->iValue = here->BSIM3v32sNodePrime; return(OK); case BSIM3v32_SOURCECONDUCT: value->rValue = here->BSIM3v32sourceConductance; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_DRAINCONDUCT: value->rValue = here->BSIM3v32drainConductance; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32vbd); return(OK); case BSIM3v32_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32vbs); return(OK); case BSIM3v32_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32vgs); return(OK); case BSIM3v32_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32vds); return(OK); case BSIM3v32_CD: value->rValue = here->BSIM3v32cd; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CBS: value->rValue = here->BSIM3v32cbs; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CBD: value->rValue = here->BSIM3v32cbd; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_GM: value->rValue = here->BSIM3v32gm; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_GDS: value->rValue = here->BSIM3v32gds; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_GMBS: value->rValue = here->BSIM3v32gmbs; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_GBD: value->rValue = here->BSIM3v32gbd; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_GBS: value->rValue = here->BSIM3v32gbs; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32qb); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32cqb); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32qg); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32cqg); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32qd); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32cqd); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CGG: value->rValue = here->BSIM3v32cggb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CGD: value->rValue = here->BSIM3v32cgdb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CGS: value->rValue = here->BSIM3v32cgsb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CDG: value->rValue = here->BSIM3v32cdgb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CDD: value->rValue = here->BSIM3v32cddb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CDS: value->rValue = here->BSIM3v32cdsb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CBG: value->rValue = here->BSIM3v32cbgb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CBDB: value->rValue = here->BSIM3v32cbdb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CBSB: value->rValue = here->BSIM3v32cbsb; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CAPBD: value->rValue = here->BSIM3v32capbd; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_CAPBS: value->rValue = here->BSIM3v32capbs; value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_VON: value->rValue = here->BSIM3v32von; return(OK); case BSIM3v32_VDSAT: value->rValue = here->BSIM3v32vdsat; return(OK); case BSIM3v32_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32qbs); value->rValue *= here->BSIM3v32m; return(OK); case BSIM3v32_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v32qbd); value->rValue *= here->BSIM3v32m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v32/b3v32.c0000644000265600020320000010534312264261473020615 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim3v32def.h" #include "ngspice/suffix.h" IFparm BSIM3v32pTable[] = { /* parameters */ IOP( "l", BSIM3v32_L, IF_REAL , "Length"), IOP( "w", BSIM3v32_W, IF_REAL , "Width"), IOP( "m", BSIM3v32_M, IF_REAL , "Parallel multiplier"), IOP( "ad", BSIM3v32_AD, IF_REAL , "Drain area"), IOP( "as", BSIM3v32_AS, IF_REAL , "Source area"), IOP( "pd", BSIM3v32_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM3v32_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM3v32_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM3v32_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM3v32_OFF, IF_FLAG , "Device is initially off"), IOP( "nqsmod", BSIM3v32_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "geo", BSIM3v32_GEO, IF_INTEGER, "ACM model drain/source connection"), IOP( "delvto", BSIM3v32_DELVTO, IF_REAL , "Zero bias threshold voltage variation"), IOP( "mulu0", BSIM3v32_MULU0, IF_REAL , "Low field mobility multiplier"), IP( "ic", BSIM3v32_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM3v32_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM3v32_GM, IF_REAL, "Gm"), OP( "gds", BSIM3v32_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM3v32_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM3v32_VON, IF_REAL, "Vth"), OP( "id", BSIM3v32_CD, IF_REAL, "Ids"), OP( "vbs", BSIM3v32_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM3v32_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM3v32_VDS, IF_REAL, "Vds"), OP( "ibd", BSIM3v32_CBD, IF_REAL, "Ibd"), /* newly added from here */ OP( "ibs", BSIM3v32_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM3v32_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM3v32_GBS, IF_REAL, "gbs"), OP( "qb", BSIM3v32_QB, IF_REAL, "Qbulk"), OP( "cqb", BSIM3v32_CQB, IF_REAL, "CQbulk"), OP( "qg", BSIM3v32_QG, IF_REAL, "Qgate"), OP( "cqg", BSIM3v32_CQG, IF_REAL, "CQgate"), OP( "qd", BSIM3v32_QD, IF_REAL, "Qdrain"), OP( "cqd", BSIM3v32_CQD, IF_REAL, "CQdrain"), OP( "cgg", BSIM3v32_CGG, IF_REAL, "Cggb"), OP( "cgd", BSIM3v32_CGD, IF_REAL, "Cgdb"), OP( "cgs", BSIM3v32_CGS, IF_REAL, "Cgsb"), OP( "cdg", BSIM3v32_CDG, IF_REAL, "Cdgb"), OP( "cdd", BSIM3v32_CDD, IF_REAL, "Cddb"), OP( "cds", BSIM3v32_CDS, IF_REAL, "Cdsb"), OP( "cbg", BSIM3v32_CBG, IF_REAL, "Cbgb"), OP( "cbd", BSIM3v32_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM3v32_CBSB, IF_REAL, "Cbsb"), OP( "capbd", BSIM3v32_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM3v32_CAPBS, IF_REAL, "Capbs"), }; IFparm BSIM3v32mPTable[] = { /* model parameters */ IOP( "capmod", BSIM3v32_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", BSIM3v32_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", BSIM3v32_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "nqsmod", BSIM3v32_MOD_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "acm", BSIM3v32_MOD_ACMMOD, IF_INTEGER, "Area calculation method selector"), IOP( "calcacm", BSIM3v32_MOD_CALCACM, IF_INTEGER, "Area calculation method ACM=12"), IOP( "paramchk", BSIM3v32_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM3v32_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM3v32_MOD_VERSION, IF_STRING, " parameter for model version"), IOP( "tox", BSIM3v32_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "toxm", BSIM3v32_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"), IOP( "cdsc", BSIM3v32_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM3v32_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM3v32_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM3v32_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM3v32_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM3v32_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM3v32_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM3v32_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM3v32_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM3v32_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM3v32_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM3v32_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM3v32_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM3v32_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "nch", BSIM3v32_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", BSIM3v32_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM3v32_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM3v32_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM3v32_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM3v32_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM3v32_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM3v32_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM3v32_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM3v32_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM3v32_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM3v32_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM3v32_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM3v32_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM3v32_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", BSIM3v32_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", BSIM3v32_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM3v32_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM3v32_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM3v32_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM3v32_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM3v32_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM3v32_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM3v32_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM3v32_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM3v32_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM3v32_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM3v32_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM3v32_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM3v32_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM3v32_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM3v32_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", BSIM3v32_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", BSIM3v32_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM3v32_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", BSIM3v32_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM3v32_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM3v32_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM3v32_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM3v32_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "elm", BSIM3v32_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"), IOP( "delta", BSIM3v32_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM3v32_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM3v32_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", BSIM3v32_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM3v32_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM3v32_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM3v32_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM3v32_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM3v32_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM3v32_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM3v32_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM3v32_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pscbe1", BSIM3v32_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM3v32_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM3v32_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "js", BSIM3v32_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"), IOP( "jsw", BSIM3v32_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"), IOP( "pb", BSIM3v32_MOD_PB, IF_REAL, "Source/drain junction built-in potential"), IOP( "nj", BSIM3v32_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"), IOP( "xti", BSIM3v32_MOD_XTI, IF_REAL, "Junction current temperature exponent"), IOP( "mj", BSIM3v32_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"), IOP( "pbsw", BSIM3v32_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"), IOP( "mjsw", BSIM3v32_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP( "pbswg", BSIM3v32_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", BSIM3v32_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cj", BSIM3v32_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"), IOP( "vfbcv", BSIM3v32_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM3v32_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "cjsw", BSIM3v32_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"), IOP( "cjswg", BSIM3v32_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "tpb", BSIM3v32_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM3v32_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM3v32_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM3v32_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM3v32_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM3v32_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM3v32_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM3v32_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM3v32_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM3v32_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "lint", BSIM3v32_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM3v32_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM3v32_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM3v32_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM3v32_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM3v32_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM3v32_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM3v32_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM3v32_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM3v32_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM3v32_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "xl", BSIM3v32_MOD_XL, IF_REAL, "Length correction parameter"), IOP( "xw", BSIM3v32_MOD_XW, IF_REAL, "Width correction parameter"), IOP( "wr", BSIM3v32_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM3v32_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM3v32_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM3v32_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM3v32_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM3v32_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM3v32_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM3v32_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM3v32_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM3v32_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM3v32_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM3v32_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM3v32_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM3v32_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM3v32_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM3v32_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM3v32_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM3v32_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", BSIM3v32_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", BSIM3v32_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM3v32_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM3v32_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM3v32_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM3v32_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "hdif", BSIM3v32_MOD_HDIF, IF_REAL, "ACM Parameter: Distance Gate - contact"), IOP( "ldif", BSIM3v32_MOD_LDIF, IF_REAL, "ACM Parameter: Length of LDD Gate-Source/Drain"), IOP( "ld", BSIM3v32_MOD_LD, IF_REAL, "ACM Parameter: Length of LDD under Gate"), IOP( "rd", BSIM3v32_MOD_RD, IF_REAL, "ACM Parameter: Resistance of LDD drain side"), IOP( "rs", BSIM3v32_MOD_RS, IF_REAL, "ACM Parameter: Resistance of LDD source side"), IOP( "rdc", BSIM3v32_MOD_RDC, IF_REAL, "ACM Parameter: Resistance contact drain side"), IOP( "rsc", BSIM3v32_MOD_RSC, IF_REAL, "ACM Parameter: Resistance contact source side"), IOP( "wmlt", BSIM3v32_MOD_WMLT, IF_REAL, "ACM Parameter: Width shrink factor"), IOP( "alpha0", BSIM3v32_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM3v32_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM3v32_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "ijth", BSIM3v32_MOD_IJTH, IF_REAL, "Diode limiting current"), IOP( "lcdsc", BSIM3v32_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM3v32_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM3v32_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM3v32_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM3v32_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM3v32_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM3v32_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM3v32_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM3v32_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM3v32_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM3v32_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM3v32_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM3v32_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM3v32_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lnch", BSIM3v32_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lngate", BSIM3v32_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM3v32_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM3v32_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM3v32_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM3v32_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM3v32_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM3v32_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM3v32_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM3v32_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM3v32_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM3v32_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM3v32_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM3v32_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM3v32_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", BSIM3v32_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", BSIM3v32_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM3v32_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM3v32_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM3v32_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM3v32_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM3v32_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM3v32_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM3v32_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM3v32_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM3v32_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM3v32_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM3v32_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM3v32_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM3v32_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM3v32_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM3v32_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lu0", BSIM3v32_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM3v32_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM3v32_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lelm", BSIM3v32_MOD_LELM, IF_REAL, "Length dependence of elm"), IOP( "ldelta", BSIM3v32_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM3v32_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwg", BSIM3v32_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM3v32_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM3v32_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM3v32_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM3v32_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM3v32_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM3v32_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM3v32_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM3v32_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpscbe1", BSIM3v32_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM3v32_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM3v32_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM3v32_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM3v32_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM3v32_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM3v32_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM3v32_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM3v32_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM3v32_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappa", BSIM3v32_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"), IOP( "lcf", BSIM3v32_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM3v32_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM3v32_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM3v32_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM3v32_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM3v32_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lvfbcv", BSIM3v32_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM3v32_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM3v32_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM3v32_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM3v32_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM3v32_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "wcdsc", BSIM3v32_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM3v32_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM3v32_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM3v32_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM3v32_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM3v32_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM3v32_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM3v32_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM3v32_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM3v32_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM3v32_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM3v32_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM3v32_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM3v32_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wnch", BSIM3v32_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wngate", BSIM3v32_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM3v32_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM3v32_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM3v32_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM3v32_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM3v32_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM3v32_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM3v32_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM3v32_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM3v32_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM3v32_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM3v32_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM3v32_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM3v32_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", BSIM3v32_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", BSIM3v32_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM3v32_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM3v32_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM3v32_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM3v32_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM3v32_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM3v32_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM3v32_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM3v32_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM3v32_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM3v32_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM3v32_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM3v32_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM3v32_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM3v32_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM3v32_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wu0", BSIM3v32_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM3v32_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM3v32_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "welm", BSIM3v32_MOD_WELM, IF_REAL, "Width dependence of elm"), IOP( "wdelta", BSIM3v32_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM3v32_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwg", BSIM3v32_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM3v32_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM3v32_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM3v32_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM3v32_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM3v32_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM3v32_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM3v32_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM3v32_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpscbe1", BSIM3v32_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM3v32_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM3v32_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM3v32_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM3v32_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM3v32_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM3v32_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM3v32_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM3v32_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM3v32_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappa", BSIM3v32_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"), IOP( "wcf", BSIM3v32_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM3v32_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM3v32_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM3v32_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM3v32_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM3v32_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wvfbcv", BSIM3v32_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM3v32_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM3v32_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM3v32_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM3v32_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM3v32_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "pcdsc", BSIM3v32_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM3v32_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM3v32_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM3v32_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM3v32_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM3v32_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM3v32_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM3v32_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM3v32_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM3v32_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM3v32_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM3v32_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM3v32_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM3v32_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pnch", BSIM3v32_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pngate", BSIM3v32_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM3v32_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM3v32_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM3v32_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM3v32_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM3v32_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM3v32_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM3v32_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM3v32_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM3v32_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM3v32_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM3v32_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM3v32_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM3v32_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", BSIM3v32_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", BSIM3v32_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM3v32_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM3v32_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM3v32_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM3v32_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM3v32_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM3v32_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM3v32_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM3v32_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM3v32_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM3v32_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM3v32_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM3v32_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM3v32_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM3v32_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM3v32_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pu0", BSIM3v32_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM3v32_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM3v32_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pelm", BSIM3v32_MOD_PELM, IF_REAL, "Cross-term dependence of elm"), IOP( "pdelta", BSIM3v32_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM3v32_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwg", BSIM3v32_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM3v32_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM3v32_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM3v32_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM3v32_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM3v32_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM3v32_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM3v32_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM3v32_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppscbe1", BSIM3v32_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM3v32_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM3v32_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM3v32_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM3v32_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM3v32_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM3v32_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM3v32_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM3v32_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM3v32_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappa", BSIM3v32_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"), IOP( "pcf", BSIM3v32_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM3v32_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM3v32_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM3v32_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM3v32_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM3v32_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pvfbcv", BSIM3v32_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM3v32_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM3v32_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM3v32_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM3v32_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM3v32_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "noia", BSIM3v32_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM3v32_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM3v32_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", BSIM3v32_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM3v32_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM3v32_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM3v32_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP("vgs_max", BSIM3v32_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", BSIM3v32_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", BSIM3v32_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", BSIM3v32_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", BSIM3v32_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", BSIM3v32_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", BSIM3v32_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM3v32_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM3v32names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM3v32nSize = NUMELEMS(BSIM3v32names); int BSIM3v32pTSize = NUMELEMS(BSIM3v32pTable); int BSIM3v32mPTSize = NUMELEMS(BSIM3v32mPTable); int BSIM3v32iSize = sizeof(BSIM3v32instance); int BSIM3v32mSize = sizeof(BSIM3v32model); ngspice-26/src/spicelib/devices/bsim3v32/b3v32del.c0000644000265600020320000000225412264261473021277 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3del.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/14, 2001. * Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM3v32delete (GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM3v32instance **fast = (BSIM3v32instance**)inInst; BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance **prev = NULL; BSIM3v32instance *here; for (; model ; model = model->BSIM3v32nextModel) { prev = &(model->BSIM3v32instances); for (here = *prev; here ; here = *prev) { if (here->BSIM3v32name == name || (fast && here==*fast)) { *prev= here->BSIM3v32nextInstance; FREE(here); return(OK); } prev = &(here->BSIM3v32nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32noi.c0000644000265600020320000005666112264261473021333 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3noi.c of BSIM3v3.2.4 * Author: 1995 Gary W. Ng and Min-Chie Jeng. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Xuemei Xi, 10/05, 12/21, 2001. * Modified bt Paolo Nenzi 2002 and Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "bsim3v32def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * BSIM3v32noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->BSIM3v32noiMod. If model->BSIM3v32noiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->BSIM3v32noiMod = 2, Channel thermal noise = BSIM3v32 model Flicker noise = BSIM3v32 model If model->BSIM3v32noiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = BSIM3v32 model If model->BSIM3v32noiMod = 4, Channel thermal noise = BSIM3v32 model Flicker noise = SPICE2 model */ /* * The StrongInversionNoiseEval function has been modified in * the release 3.2.4 of BSIM3v32 model. To accomodate both the old * and the new code, I have renamed according to the following: * * * BSIM3v3.2.4 -> StrongInversionNoiseEvalNew * Previous -> StrongInversionNoiseEvalOld * * 2002 Paolo Nenzi */ /* * JX: 1/f noise model is smoothed out 12/18/01. */ static double StrongInversionNoiseEvalNew(double Vds, BSIM3v32model *model, BSIM3v32instance *here, double freq, double temp) { struct bsim3v32SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM3v32cd); esat = 2.0 * pParam->BSIM3v32vsattemp / here->BSIM3v32ueff; if(model->BSIM3v32em<=0.0) DelClm = 0.0; else { T0 = ((((Vds - here->BSIM3v32Vdseff) / pParam->BSIM3v32litl) + model->BSIM3v32em) / esat); DelClm = pParam->BSIM3v32litl * log (MAX(T0, N_MINLOG)); } EffFreq = pow(freq, model->BSIM3v32ef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3v32ueff; T2 = 1.0e8 * EffFreq * here->BSIM3v32Abulk * model->BSIM3v32cox * pParam->BSIM3v32leff * pParam->BSIM3v32leff; N0 = model->BSIM3v32cox * here->BSIM3v32Vgsteff / CHARGE; Nl = model->BSIM3v32cox * here->BSIM3v32Vgsteff * (1.0 - here->BSIM3v32AbovVgst2Vtm * here->BSIM3v32Vdseff) / CHARGE; T3 = model->BSIM3v32oxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->BSIM3v32oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM3v32oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->BSIM3v32leff * pParam->BSIM3v32leff * pParam->BSIM3v32weff; T8 = model->BSIM3v32oxideTrapDensityA + model->BSIM3v32oxideTrapDensityB * Nl + model->BSIM3v32oxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } /* * The code for releases: BSIM3V32, BSIM3V322, BSIM3V323 * follows */ static double StrongInversionNoiseEvalOld(double vgs, double vds, BSIM3v32model *model, BSIM3v32instance *here, double freq, double temp) { struct bsim3v32SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Vgst; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs (here->BSIM3v32cd); /* Added revision dependent code */ if (model->BSIM3v32intVersion < BSIM3v32V323) { if (vds > here->BSIM3v32vdsat) { esat = 2.0 * pParam->BSIM3v32vsattemp / here->BSIM3v32ueff; T0 = ((((vds - here->BSIM3v32vdsat) / pParam->BSIM3v32litl) + model->BSIM3v32em) / esat); DelClm = pParam->BSIM3v32litl * log (MAX (T0, N_MINLOG)); } else DelClm = 0.0; } else { if (model->BSIM3v32em <= 0.0) /* flicker noise modified -JX */ DelClm = 0.0; else if (vds > here->BSIM3v32vdsat) { esat = 2.0 * pParam->BSIM3v32vsattemp / here->BSIM3v32ueff; T0 = ((((vds - here->BSIM3v32vdsat) / pParam->BSIM3v32litl) + model->BSIM3v32em) / esat); DelClm = pParam->BSIM3v32litl * log (MAX (T0, N_MINLOG)); } else DelClm = 0.0; } EffFreq = pow (freq, model->BSIM3v32ef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3v32ueff; T2 = 1.0e8 * EffFreq * model->BSIM3v32cox * pParam->BSIM3v32leff * pParam->BSIM3v32leff; Vgst = vgs - here->BSIM3v32von; N0 = model->BSIM3v32cox * Vgst / CHARGE; if (N0 < 0.0) N0 = 0.0; Nl = model->BSIM3v32cox * (Vgst - MIN (vds, here->BSIM3v32vdsat)) / CHARGE; if (Nl < 0.0) Nl = 0.0; T3 = model->BSIM3v32oxideTrapDensityA * log (MAX (((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->BSIM3v32oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM3v32oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->BSIM3v32leff * pParam->BSIM3v32leff * pParam->BSIM3v32weff; T8 = model->BSIM3v32oxideTrapDensityA + model->BSIM3v32oxideTrapDensityB * Nl + model->BSIM3v32oxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM3v32noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM3v32model *model = (BSIM3v32model *)inModel; BSIM3v32instance *here; struct bsim3v32SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM3v32NSRCS]; double lnNdens[BSIM3v32NSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; double m; int i; /* define the names of the noise sources */ static char *BSIM3v32nNames[BSIM3v32NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in BSIM3v32defs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here != NULL; here = here->BSIM3v32nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM3v32NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM3v32name, BSIM3v32nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM3v32NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM3v32name, BSIM3v32nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM3v32name, BSIM3v32nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM3v32m; switch (mode) { case N_DENS: NevalSrc(&noizDens[BSIM3v32RDNOIZ], &lnNdens[BSIM3v32RDNOIZ], ckt, THERMNOISE, here->BSIM3v32dNodePrime, here->BSIM3v32dNode, here->BSIM3v32drainConductance * m); NevalSrc(&noizDens[BSIM3v32RSNOIZ], &lnNdens[BSIM3v32RSNOIZ], ckt, THERMNOISE, here->BSIM3v32sNodePrime, here->BSIM3v32sNode, here->BSIM3v32sourceConductance * m); switch( model->BSIM3v32noiMod ) { case 1: case 3: NevalSrc(&noizDens[BSIM3v32IDNOIZ], &lnNdens[BSIM3v32IDNOIZ], ckt, THERMNOISE, here->BSIM3v32dNodePrime, here->BSIM3v32sNodePrime, (2.0 / 3.0 * fabs(here->BSIM3v32gm + here->BSIM3v32gds + here->BSIM3v32gmbs)) * m); break; case 2: case 4: /* Added revision dependent code */ if (model->BSIM3v32intVersion == BSIM3v32V324) { NevalSrc(&noizDens[BSIM3v32IDNOIZ], &lnNdens[BSIM3v32IDNOIZ], ckt, THERMNOISE, here->BSIM3v32dNodePrime, here->BSIM3v32sNodePrime, (m * here->BSIM3v32ueff * fabs(here->BSIM3v32qinv) / (pParam->BSIM3v32leff * pParam->BSIM3v32leff + here->BSIM3v32ueff * fabs(here->BSIM3v32qinv) * here->BSIM3v32rds))); /* bugfix */ } else { /* for all versions lower then 3.2.4 */ NevalSrc(&noizDens[BSIM3v32IDNOIZ], &lnNdens[BSIM3v32IDNOIZ], ckt, THERMNOISE, here->BSIM3v32dNodePrime, here->BSIM3v32sNodePrime, (m * here->BSIM3v32ueff * fabs(here->BSIM3v32qinv / (pParam->BSIM3v32leff * pParam->BSIM3v32leff)))); } break; } NevalSrc(&noizDens[BSIM3v32FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v32dNodePrime, here->BSIM3v32sNodePrime, (double) 0.0); switch( model->BSIM3v32noiMod ) { case 1: case 4: noizDens[BSIM3v32FLNOIZ] *= m * model->BSIM3v32kf * exp(model->BSIM3v32af * log(MAX(fabs(here->BSIM3v32cd), N_MINLOG))) / (pow(data->freq, model->BSIM3v32ef) * pParam->BSIM3v32leff * pParam->BSIM3v32leff * model->BSIM3v32cox); break; case 2: case 3: vgs = *(ckt->CKTstates[0] + here->BSIM3v32vgs); vds = *(ckt->CKTstates[0] + here->BSIM3v32vds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } /* Added revision dependent code */ if (model->BSIM3v32intVersion == BSIM3v32V324) { Ssi = StrongInversionNoiseEvalNew(vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM3v32oxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->BSIM3v32weff * pParam->BSIM3v32leff * pow(data->freq, model->BSIM3v32ef) * 4.0e36; Swi = T10 / T11 * here->BSIM3v32cd * here->BSIM3v32cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM3v32FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM3v32FLNOIZ] *= 0.0; } else { /* for all versions lower then 3.2.4 */ if (vgs >= here->BSIM3v32von + 0.1) { Ssi = StrongInversionNoiseEvalOld(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[BSIM3v32FLNOIZ] *= m * Ssi; } else { pParam = here->pParam; T10 = model->BSIM3v32oxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->BSIM3v32weff * pParam-> BSIM3v32leff * pow (data->freq, model->BSIM3v32ef) * 4.0e36; Swi = T10 / T11 * here->BSIM3v32cd * here->BSIM3v32cd; Slimit = StrongInversionNoiseEvalOld( here->BSIM3v32von + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[BSIM3v32FLNOIZ] *= m * (Slimit * Swi) / T1; else noizDens[BSIM3v32FLNOIZ] *= 0.0; } } break; } lnNdens[BSIM3v32FLNOIZ] = log(MAX(noizDens[BSIM3v32FLNOIZ], N_MINLOG)); noizDens[BSIM3v32TOTNOIZ] = noizDens[BSIM3v32RDNOIZ] + noizDens[BSIM3v32RSNOIZ] + noizDens[BSIM3v32IDNOIZ] + noizDens[BSIM3v32FLNOIZ]; lnNdens[BSIM3v32TOTNOIZ] = log(MAX(noizDens[BSIM3v32TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM3v32TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM3v32NSRCS; i++) { here->BSIM3v32nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM3v32NSRCS; i++) { here->BSIM3v32nVar[OUTNOIZ][i] = 0.0; here->BSIM3v32nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM3v32NSRCS; i++) { if (i != BSIM3v32TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM3v32nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM3v32nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM3v32nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM3v32nVar[OUTNOIZ][i] += tempOnoise; here->BSIM3v32nVar[OUTNOIZ][BSIM3v32TOTNOIZ] += tempOnoise; here->BSIM3v32nVar[INNOIZ][i] += tempInoise; here->BSIM3v32nVar[INNOIZ][BSIM3v32TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM3v32NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM3v32NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM3v32nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM3v32nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32trunc.c0000644000265600020320000000251712264261473021670 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3trunc.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Poalo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32trunc (GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM3v32nextModel) { for (here = model->BSIM3v32instances; here != NULL; here = here->BSIM3v32nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM3v32qb,ckt,timeStep); CKTterr(here->BSIM3v32qg,ckt,timeStep); CKTterr(here->BSIM3v32qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM3v32name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/bsim3v32ext.h0000644000265600020320000000314112264261473022045 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. Modified by Yuhua Cheng to use BSIM3v3 in Spice3f5 (Jan. 1997) Modified by Paolo Nenzi 2002 File: bsim3ext.h **********/ extern int BSIM3v32acLoad(GENmodel *,CKTcircuit*); extern int BSIM3v32ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM3v32convTest(GENmodel *,CKTcircuit*); extern int BSIM3v32delete(GENmodel*,IFuid,GENinstance**); extern void BSIM3v32destroy(GENmodel**); extern int BSIM3v32getic(GENmodel*,CKTcircuit*); extern int BSIM3v32load(GENmodel*,CKTcircuit*); extern int BSIM3v32mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM3v32mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM3v32mParam(int,IFvalue*,GENmodel*); extern void BSIM3v32mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM3v32param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM3v32pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM3v32setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM3v32temp(GENmodel*,CKTcircuit*); extern int BSIM3v32trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM3v32noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM3v32unsetup(GENmodel*,CKTcircuit*); extern int BSIM3v32soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsim3v32/bsim3v32def.h0000644000265600020320000016235612264261473022021 0ustar andreasadmin/********** Copyright 2001 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. Author: 1997-1999 Weidong Liu. Author: 2001 Xuemei Xi Modified by Paolo Nenzi 2002 and Dietmar Warning 2003 File: bsim3v32def.h **********/ #ifndef BSIM3v32 #define BSIM3v32 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM3v32instance { struct sBSIM3v32model *BSIM3v32modPtr; struct sBSIM3v32instance *BSIM3v32nextInstance; IFuid BSIM3v32name; int BSIM3v32states; /* index into state table for this device */ int BSIM3v32dNode; int BSIM3v32gNode; int BSIM3v32sNode; int BSIM3v32bNode; int BSIM3v32dNodePrime; int BSIM3v32sNodePrime; int BSIM3v32qNode; /* MCJ */ /* MCJ */ double BSIM3v32ueff; double BSIM3v32thetavth; double BSIM3v32von; double BSIM3v32vdsat; double BSIM3v32cgdo; double BSIM3v32cgso; double BSIM3v32vjsm; double BSIM3v32IsEvjsm; double BSIM3v32vjdm; double BSIM3v32IsEvjdm; double BSIM3v32l; double BSIM3v32w; double BSIM3v32m; double BSIM3v32drainArea; double BSIM3v32sourceArea; double BSIM3v32drainSquares; double BSIM3v32sourceSquares; double BSIM3v32drainPerimeter; double BSIM3v32sourcePerimeter; double BSIM3v32sourceConductance; double BSIM3v32drainConductance; double BSIM3v32delvto; double BSIM3v32mulu0; double BSIM3v32vth0; double BSIM3v32vfb; double BSIM3v32vfbzb; double BSIM3v32u0temp; double BSIM3v32tconst; double BSIM3v32icVBS; double BSIM3v32icVDS; double BSIM3v32icVGS; int BSIM3v32off; int BSIM3v32mode; int BSIM3v32nqsMod; int BSIM3v32geo; /* OP point */ double BSIM3v32qinv; double BSIM3v32cd; double BSIM3v32cbs; double BSIM3v32cbd; double BSIM3v32csub; double BSIM3v32gm; double BSIM3v32gds; double BSIM3v32gmbs; double BSIM3v32gbd; double BSIM3v32gbs; double BSIM3v32gbbs; double BSIM3v32gbgs; double BSIM3v32gbds; double BSIM3v32cggb; double BSIM3v32cgdb; double BSIM3v32cgsb; double BSIM3v32cbgb; double BSIM3v32cbdb; double BSIM3v32cbsb; double BSIM3v32cdgb; double BSIM3v32cddb; double BSIM3v32cdsb; double BSIM3v32capbd; double BSIM3v32capbs; double BSIM3v32cqgb; double BSIM3v32cqdb; double BSIM3v32cqsb; double BSIM3v32cqbb; double BSIM3v32qgate; double BSIM3v32qbulk; double BSIM3v32qdrn; double BSIM3v32gtau; double BSIM3v32gtg; double BSIM3v32gtd; double BSIM3v32gts; double BSIM3v32gtb; double BSIM3v32rds; /* Noise bugfix */ double BSIM3v32Vgsteff; double BSIM3v32Vdseff; double BSIM3v32Abulk; double BSIM3v32AbovVgst2Vtm; struct bsim3v32SizeDependParam *pParam; unsigned BSIM3v32lGiven :1; unsigned BSIM3v32wGiven :1; unsigned BSIM3v32mGiven :1; unsigned BSIM3v32drainAreaGiven :1; unsigned BSIM3v32sourceAreaGiven :1; unsigned BSIM3v32drainSquaresGiven :1; unsigned BSIM3v32sourceSquaresGiven :1; unsigned BSIM3v32drainPerimeterGiven :1; unsigned BSIM3v32sourcePerimeterGiven :1; unsigned BSIM3v32delvtoGiven :1; unsigned BSIM3v32mulu0Given :1; unsigned BSIM3v32dNodePrimeSet :1; unsigned BSIM3v32sNodePrimeSet :1; unsigned BSIM3v32icVBSGiven :1; unsigned BSIM3v32icVDSGiven :1; unsigned BSIM3v32icVGSGiven :1; unsigned BSIM3v32nqsModGiven :1; unsigned BSIM3v32geoGiven :1; double *BSIM3v32DdPtr; double *BSIM3v32GgPtr; double *BSIM3v32SsPtr; double *BSIM3v32BbPtr; double *BSIM3v32DPdpPtr; double *BSIM3v32SPspPtr; double *BSIM3v32DdpPtr; double *BSIM3v32GbPtr; double *BSIM3v32GdpPtr; double *BSIM3v32GspPtr; double *BSIM3v32SspPtr; double *BSIM3v32BdpPtr; double *BSIM3v32BspPtr; double *BSIM3v32DPspPtr; double *BSIM3v32DPdPtr; double *BSIM3v32BgPtr; double *BSIM3v32DPgPtr; double *BSIM3v32SPgPtr; double *BSIM3v32SPsPtr; double *BSIM3v32DPbPtr; double *BSIM3v32SPbPtr; double *BSIM3v32SPdpPtr; double *BSIM3v32QqPtr; double *BSIM3v32QdpPtr; double *BSIM3v32QgPtr; double *BSIM3v32QspPtr; double *BSIM3v32QbPtr; double *BSIM3v32DPqPtr; double *BSIM3v32GqPtr; double *BSIM3v32SPqPtr; double *BSIM3v32BqPtr; #define BSIM3v32vbd BSIM3v32states+ 0 #define BSIM3v32vbs BSIM3v32states+ 1 #define BSIM3v32vgs BSIM3v32states+ 2 #define BSIM3v32vds BSIM3v32states+ 3 #define BSIM3v32qb BSIM3v32states+ 4 #define BSIM3v32cqb BSIM3v32states+ 5 #define BSIM3v32qg BSIM3v32states+ 6 #define BSIM3v32cqg BSIM3v32states+ 7 #define BSIM3v32qd BSIM3v32states+ 8 #define BSIM3v32cqd BSIM3v32states+ 9 #define BSIM3v32qbs BSIM3v32states+ 10 #define BSIM3v32qbd BSIM3v32states+ 11 #define BSIM3v32qcheq BSIM3v32states+ 12 #define BSIM3v32cqcheq BSIM3v32states+ 13 #define BSIM3v32qcdump BSIM3v32states+ 14 #define BSIM3v32cqcdump BSIM3v32states+ 15 #define BSIM3v32qdef BSIM3v32states+ 16 #define BSIM3v32numStates 17 /* indices to the array of BSIM3v32 NOISE SOURCES */ #define BSIM3v32RDNOIZ 0 #define BSIM3v32RSNOIZ 1 #define BSIM3v32IDNOIZ 2 #define BSIM3v32FLNOIZ 3 #define BSIM3v32TOTNOIZ 4 #define BSIM3v32NSRCS 5 /* the number of BSIM3v32 MOSFET noise sources */ #ifndef NONOISE double BSIM3v32nVar[NSTATVARS][BSIM3v32NSRCS]; #else /* NONOISE */ double **BSIM3v32nVar; #endif /* NONOISE */ } BSIM3v32instance ; struct bsim3v32SizeDependParam { double Width; double Length; double BSIM3v32cdsc; double BSIM3v32cdscb; double BSIM3v32cdscd; double BSIM3v32cit; double BSIM3v32nfactor; double BSIM3v32xj; double BSIM3v32vsat; double BSIM3v32at; double BSIM3v32a0; double BSIM3v32ags; double BSIM3v32a1; double BSIM3v32a2; double BSIM3v32keta; double BSIM3v32nsub; double BSIM3v32npeak; double BSIM3v32ngate; double BSIM3v32gamma1; double BSIM3v32gamma2; double BSIM3v32vbx; double BSIM3v32vbi; double BSIM3v32vbm; double BSIM3v32vbsc; double BSIM3v32xt; double BSIM3v32phi; double BSIM3v32litl; double BSIM3v32k1; double BSIM3v32kt1; double BSIM3v32kt1l; double BSIM3v32kt2; double BSIM3v32k2; double BSIM3v32k3; double BSIM3v32k3b; double BSIM3v32w0; double BSIM3v32nlx; double BSIM3v32dvt0; double BSIM3v32dvt1; double BSIM3v32dvt2; double BSIM3v32dvt0w; double BSIM3v32dvt1w; double BSIM3v32dvt2w; double BSIM3v32drout; double BSIM3v32dsub; double BSIM3v32vth0; double BSIM3v32ua; double BSIM3v32ua1; double BSIM3v32ub; double BSIM3v32ub1; double BSIM3v32uc; double BSIM3v32uc1; double BSIM3v32u0; double BSIM3v32ute; double BSIM3v32voff; double BSIM3v32vfb; double BSIM3v32delta; double BSIM3v32rdsw; double BSIM3v32rds0; double BSIM3v32prwg; double BSIM3v32prwb; double BSIM3v32prt; double BSIM3v32eta0; double BSIM3v32etab; double BSIM3v32pclm; double BSIM3v32pdibl1; double BSIM3v32pdibl2; double BSIM3v32pdiblb; double BSIM3v32pscbe1; double BSIM3v32pscbe2; double BSIM3v32pvag; double BSIM3v32wr; double BSIM3v32dwg; double BSIM3v32dwb; double BSIM3v32b0; double BSIM3v32b1; double BSIM3v32alpha0; double BSIM3v32alpha1; double BSIM3v32beta0; /* CV model */ double BSIM3v32elm; double BSIM3v32cgsl; double BSIM3v32cgdl; double BSIM3v32ckappa; double BSIM3v32cf; double BSIM3v32clc; double BSIM3v32cle; double BSIM3v32vfbcv; double BSIM3v32noff; double BSIM3v32voffcv; double BSIM3v32acde; double BSIM3v32moin; /* Pre-calculated constants */ double BSIM3v32dw; double BSIM3v32dl; double BSIM3v32leff; double BSIM3v32weff; double BSIM3v32dwc; double BSIM3v32dlc; double BSIM3v32leffCV; double BSIM3v32weffCV; double BSIM3v32abulkCVfactor; double BSIM3v32cgso; double BSIM3v32cgdo; double BSIM3v32cgbo; double BSIM3v32tconst; double BSIM3v32u0temp; double BSIM3v32vsattemp; double BSIM3v32sqrtPhi; double BSIM3v32phis3; double BSIM3v32Xdep0; double BSIM3v32sqrtXdep0; double BSIM3v32theta0vb0; double BSIM3v32thetaRout; double BSIM3v32cof1; double BSIM3v32cof2; double BSIM3v32cof3; double BSIM3v32cof4; double BSIM3v32cdep0; double BSIM3v32vfbzb; double BSIM3v32ldeb; double BSIM3v32k1ox; double BSIM3v32k2ox; struct bsim3v32SizeDependParam *pNext; }; typedef struct sBSIM3v32model { int BSIM3v32modType; struct sBSIM3v32model *BSIM3v32nextModel; BSIM3v32instance *BSIM3v32instances; IFuid BSIM3v32modName; int BSIM3v32type; int BSIM3v32mobMod; int BSIM3v32capMod; int BSIM3v32acmMod; int BSIM3v32calcacm; int BSIM3v32noiMod; int BSIM3v32nqsMod; int BSIM3v32binUnit; int BSIM3v32paramChk; char *BSIM3v32version; /* The following field is an integer coding * of BSIM3v32version. */ int BSIM3v32intVersion; #define BSIM3v32V324 324 /* BSIM3v32 V3.2.4 */ #define BSIM3v32V323 323 /* BSIM3v32 V3.2.3 */ #define BSIM3v32V322 322 /* BSIM3v32 V3.2.2 */ #define BSIM3v32V32 32 /* BSIM3v32 V3.2 */ #define BSIM3v32V3OLD 0 /* Old model */ double BSIM3v32tox; double BSIM3v32toxm; double BSIM3v32cdsc; double BSIM3v32cdscb; double BSIM3v32cdscd; double BSIM3v32cit; double BSIM3v32nfactor; double BSIM3v32xj; double BSIM3v32vsat; double BSIM3v32at; double BSIM3v32a0; double BSIM3v32ags; double BSIM3v32a1; double BSIM3v32a2; double BSIM3v32keta; double BSIM3v32nsub; double BSIM3v32npeak; double BSIM3v32ngate; double BSIM3v32gamma1; double BSIM3v32gamma2; double BSIM3v32vbx; double BSIM3v32vbm; double BSIM3v32xt; double BSIM3v32k1; double BSIM3v32kt1; double BSIM3v32kt1l; double BSIM3v32kt2; double BSIM3v32k2; double BSIM3v32k3; double BSIM3v32k3b; double BSIM3v32w0; double BSIM3v32nlx; double BSIM3v32dvt0; double BSIM3v32dvt1; double BSIM3v32dvt2; double BSIM3v32dvt0w; double BSIM3v32dvt1w; double BSIM3v32dvt2w; double BSIM3v32drout; double BSIM3v32dsub; double BSIM3v32vth0; double BSIM3v32ua; double BSIM3v32ua1; double BSIM3v32ub; double BSIM3v32ub1; double BSIM3v32uc; double BSIM3v32uc1; double BSIM3v32u0; double BSIM3v32ute; double BSIM3v32voff; double BSIM3v32delta; double BSIM3v32rdsw; double BSIM3v32prwg; double BSIM3v32prwb; double BSIM3v32prt; double BSIM3v32eta0; double BSIM3v32etab; double BSIM3v32pclm; double BSIM3v32pdibl1; double BSIM3v32pdibl2; double BSIM3v32pdiblb; double BSIM3v32pscbe1; double BSIM3v32pscbe2; double BSIM3v32pvag; double BSIM3v32wr; double BSIM3v32dwg; double BSIM3v32dwb; double BSIM3v32b0; double BSIM3v32b1; double BSIM3v32alpha0; double BSIM3v32alpha1; double BSIM3v32beta0; double BSIM3v32ijth; double BSIM3v32vfb; /* CV model */ double BSIM3v32elm; double BSIM3v32cgsl; double BSIM3v32cgdl; double BSIM3v32ckappa; double BSIM3v32cf; double BSIM3v32vfbcv; double BSIM3v32clc; double BSIM3v32cle; double BSIM3v32dwc; double BSIM3v32dlc; double BSIM3v32noff; double BSIM3v32voffcv; double BSIM3v32acde; double BSIM3v32moin; double BSIM3v32tcj; double BSIM3v32tcjsw; double BSIM3v32tcjswg; double BSIM3v32tpb; double BSIM3v32tpbsw; double BSIM3v32tpbswg; /* ACM model */ double BSIM3v32xl; double BSIM3v32xw; double BSIM3v32hdif; double BSIM3v32ldif; double BSIM3v32ld; double BSIM3v32rd; double BSIM3v32rs; double BSIM3v32rdc; double BSIM3v32rsc; double BSIM3v32wmlt; /* Length Dependence */ double BSIM3v32lcdsc; double BSIM3v32lcdscb; double BSIM3v32lcdscd; double BSIM3v32lcit; double BSIM3v32lnfactor; double BSIM3v32lxj; double BSIM3v32lvsat; double BSIM3v32lat; double BSIM3v32la0; double BSIM3v32lags; double BSIM3v32la1; double BSIM3v32la2; double BSIM3v32lketa; double BSIM3v32lnsub; double BSIM3v32lnpeak; double BSIM3v32lngate; double BSIM3v32lgamma1; double BSIM3v32lgamma2; double BSIM3v32lvbx; double BSIM3v32lvbm; double BSIM3v32lxt; double BSIM3v32lk1; double BSIM3v32lkt1; double BSIM3v32lkt1l; double BSIM3v32lkt2; double BSIM3v32lk2; double BSIM3v32lk3; double BSIM3v32lk3b; double BSIM3v32lw0; double BSIM3v32lnlx; double BSIM3v32ldvt0; double BSIM3v32ldvt1; double BSIM3v32ldvt2; double BSIM3v32ldvt0w; double BSIM3v32ldvt1w; double BSIM3v32ldvt2w; double BSIM3v32ldrout; double BSIM3v32ldsub; double BSIM3v32lvth0; double BSIM3v32lua; double BSIM3v32lua1; double BSIM3v32lub; double BSIM3v32lub1; double BSIM3v32luc; double BSIM3v32luc1; double BSIM3v32lu0; double BSIM3v32lute; double BSIM3v32lvoff; double BSIM3v32ldelta; double BSIM3v32lrdsw; double BSIM3v32lprwg; double BSIM3v32lprwb; double BSIM3v32lprt; double BSIM3v32leta0; double BSIM3v32letab; double BSIM3v32lpclm; double BSIM3v32lpdibl1; double BSIM3v32lpdibl2; double BSIM3v32lpdiblb; double BSIM3v32lpscbe1; double BSIM3v32lpscbe2; double BSIM3v32lpvag; double BSIM3v32lwr; double BSIM3v32ldwg; double BSIM3v32ldwb; double BSIM3v32lb0; double BSIM3v32lb1; double BSIM3v32lalpha0; double BSIM3v32lalpha1; double BSIM3v32lbeta0; double BSIM3v32lvfb; /* CV model */ double BSIM3v32lelm; double BSIM3v32lcgsl; double BSIM3v32lcgdl; double BSIM3v32lckappa; double BSIM3v32lcf; double BSIM3v32lclc; double BSIM3v32lcle; double BSIM3v32lvfbcv; double BSIM3v32lnoff; double BSIM3v32lvoffcv; double BSIM3v32lacde; double BSIM3v32lmoin; /* Width Dependence */ double BSIM3v32wcdsc; double BSIM3v32wcdscb; double BSIM3v32wcdscd; double BSIM3v32wcit; double BSIM3v32wnfactor; double BSIM3v32wxj; double BSIM3v32wvsat; double BSIM3v32wat; double BSIM3v32wa0; double BSIM3v32wags; double BSIM3v32wa1; double BSIM3v32wa2; double BSIM3v32wketa; double BSIM3v32wnsub; double BSIM3v32wnpeak; double BSIM3v32wngate; double BSIM3v32wgamma1; double BSIM3v32wgamma2; double BSIM3v32wvbx; double BSIM3v32wvbm; double BSIM3v32wxt; double BSIM3v32wk1; double BSIM3v32wkt1; double BSIM3v32wkt1l; double BSIM3v32wkt2; double BSIM3v32wk2; double BSIM3v32wk3; double BSIM3v32wk3b; double BSIM3v32ww0; double BSIM3v32wnlx; double BSIM3v32wdvt0; double BSIM3v32wdvt1; double BSIM3v32wdvt2; double BSIM3v32wdvt0w; double BSIM3v32wdvt1w; double BSIM3v32wdvt2w; double BSIM3v32wdrout; double BSIM3v32wdsub; double BSIM3v32wvth0; double BSIM3v32wua; double BSIM3v32wua1; double BSIM3v32wub; double BSIM3v32wub1; double BSIM3v32wuc; double BSIM3v32wuc1; double BSIM3v32wu0; double BSIM3v32wute; double BSIM3v32wvoff; double BSIM3v32wdelta; double BSIM3v32wrdsw; double BSIM3v32wprwg; double BSIM3v32wprwb; double BSIM3v32wprt; double BSIM3v32weta0; double BSIM3v32wetab; double BSIM3v32wpclm; double BSIM3v32wpdibl1; double BSIM3v32wpdibl2; double BSIM3v32wpdiblb; double BSIM3v32wpscbe1; double BSIM3v32wpscbe2; double BSIM3v32wpvag; double BSIM3v32wwr; double BSIM3v32wdwg; double BSIM3v32wdwb; double BSIM3v32wb0; double BSIM3v32wb1; double BSIM3v32walpha0; double BSIM3v32walpha1; double BSIM3v32wbeta0; double BSIM3v32wvfb; /* CV model */ double BSIM3v32welm; double BSIM3v32wcgsl; double BSIM3v32wcgdl; double BSIM3v32wckappa; double BSIM3v32wcf; double BSIM3v32wclc; double BSIM3v32wcle; double BSIM3v32wvfbcv; double BSIM3v32wnoff; double BSIM3v32wvoffcv; double BSIM3v32wacde; double BSIM3v32wmoin; /* Cross-term Dependence */ double BSIM3v32pcdsc; double BSIM3v32pcdscb; double BSIM3v32pcdscd; double BSIM3v32pcit; double BSIM3v32pnfactor; double BSIM3v32pxj; double BSIM3v32pvsat; double BSIM3v32pat; double BSIM3v32pa0; double BSIM3v32pags; double BSIM3v32pa1; double BSIM3v32pa2; double BSIM3v32pketa; double BSIM3v32pnsub; double BSIM3v32pnpeak; double BSIM3v32pngate; double BSIM3v32pgamma1; double BSIM3v32pgamma2; double BSIM3v32pvbx; double BSIM3v32pvbm; double BSIM3v32pxt; double BSIM3v32pk1; double BSIM3v32pkt1; double BSIM3v32pkt1l; double BSIM3v32pkt2; double BSIM3v32pk2; double BSIM3v32pk3; double BSIM3v32pk3b; double BSIM3v32pw0; double BSIM3v32pnlx; double BSIM3v32pdvt0; double BSIM3v32pdvt1; double BSIM3v32pdvt2; double BSIM3v32pdvt0w; double BSIM3v32pdvt1w; double BSIM3v32pdvt2w; double BSIM3v32pdrout; double BSIM3v32pdsub; double BSIM3v32pvth0; double BSIM3v32pua; double BSIM3v32pua1; double BSIM3v32pub; double BSIM3v32pub1; double BSIM3v32puc; double BSIM3v32puc1; double BSIM3v32pu0; double BSIM3v32pute; double BSIM3v32pvoff; double BSIM3v32pdelta; double BSIM3v32prdsw; double BSIM3v32pprwg; double BSIM3v32pprwb; double BSIM3v32pprt; double BSIM3v32peta0; double BSIM3v32petab; double BSIM3v32ppclm; double BSIM3v32ppdibl1; double BSIM3v32ppdibl2; double BSIM3v32ppdiblb; double BSIM3v32ppscbe1; double BSIM3v32ppscbe2; double BSIM3v32ppvag; double BSIM3v32pwr; double BSIM3v32pdwg; double BSIM3v32pdwb; double BSIM3v32pb0; double BSIM3v32pb1; double BSIM3v32palpha0; double BSIM3v32palpha1; double BSIM3v32pbeta0; double BSIM3v32pvfb; /* CV model */ double BSIM3v32pelm; double BSIM3v32pcgsl; double BSIM3v32pcgdl; double BSIM3v32pckappa; double BSIM3v32pcf; double BSIM3v32pclc; double BSIM3v32pcle; double BSIM3v32pvfbcv; double BSIM3v32pnoff; double BSIM3v32pvoffcv; double BSIM3v32pacde; double BSIM3v32pmoin; double BSIM3v32tnom; double BSIM3v32cgso; double BSIM3v32cgdo; double BSIM3v32cgbo; double BSIM3v32xpart; double BSIM3v32cFringOut; double BSIM3v32cFringMax; double BSIM3v32sheetResistance; double BSIM3v32jctSatCurDensity; double BSIM3v32jctSidewallSatCurDensity; double BSIM3v32bulkJctPotential; double BSIM3v32bulkJctBotGradingCoeff; double BSIM3v32bulkJctSideGradingCoeff; double BSIM3v32bulkJctGateSideGradingCoeff; double BSIM3v32sidewallJctPotential; double BSIM3v32GatesidewallJctPotential; double BSIM3v32unitAreaJctCap; double BSIM3v32unitLengthSidewallJctCap; double BSIM3v32unitLengthGateSidewallJctCap; double BSIM3v32jctEmissionCoeff; double BSIM3v32jctTempExponent; double BSIM3v32Lint; double BSIM3v32Ll; double BSIM3v32Llc; double BSIM3v32Lln; double BSIM3v32Lw; double BSIM3v32Lwc; double BSIM3v32Lwn; double BSIM3v32Lwl; double BSIM3v32Lwlc; double BSIM3v32Lmin; double BSIM3v32Lmax; double BSIM3v32Wint; double BSIM3v32Wl; double BSIM3v32Wlc; double BSIM3v32Wln; double BSIM3v32Ww; double BSIM3v32Wwc; double BSIM3v32Wwn; double BSIM3v32Wwl; double BSIM3v32Wwlc; double BSIM3v32Wmin; double BSIM3v32Wmax; /* Pre-calculated constants */ /* MCJ: move to size-dependent param. */ double BSIM3v32vtm; double BSIM3v32cox; double BSIM3v32cof1; double BSIM3v32cof2; double BSIM3v32cof3; double BSIM3v32cof4; double BSIM3v32vcrit; double BSIM3v32factor1; double BSIM3v32PhiB; double BSIM3v32PhiBSW; double BSIM3v32PhiBSWG; double BSIM3v32jctTempSatCurDensity; double BSIM3v32jctSidewallTempSatCurDensity; double BSIM3v32unitAreaTempJctCap; double BSIM3v32unitLengthSidewallTempJctCap; double BSIM3v32unitLengthGateSidewallTempJctCap; double BSIM3v32oxideTrapDensityA; double BSIM3v32oxideTrapDensityB; double BSIM3v32oxideTrapDensityC; double BSIM3v32em; double BSIM3v32ef; double BSIM3v32af; double BSIM3v32kf; double BSIM3v32vgsMax; double BSIM3v32vgdMax; double BSIM3v32vgbMax; double BSIM3v32vdsMax; double BSIM3v32vbsMax; double BSIM3v32vbdMax; struct bsim3v32SizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned BSIM3v32mobModGiven :1; unsigned BSIM3v32binUnitGiven :1; unsigned BSIM3v32capModGiven :1; unsigned BSIM3v32acmModGiven :1; unsigned BSIM3v32calcacmGiven :1; unsigned BSIM3v32paramChkGiven :1; unsigned BSIM3v32noiModGiven :1; unsigned BSIM3v32nqsModGiven :1; unsigned BSIM3v32typeGiven :1; unsigned BSIM3v32toxGiven :1; unsigned BSIM3v32versionGiven :1; unsigned BSIM3v32toxmGiven :1; unsigned BSIM3v32cdscGiven :1; unsigned BSIM3v32cdscbGiven :1; unsigned BSIM3v32cdscdGiven :1; unsigned BSIM3v32citGiven :1; unsigned BSIM3v32nfactorGiven :1; unsigned BSIM3v32xjGiven :1; unsigned BSIM3v32vsatGiven :1; unsigned BSIM3v32atGiven :1; unsigned BSIM3v32a0Given :1; unsigned BSIM3v32agsGiven :1; unsigned BSIM3v32a1Given :1; unsigned BSIM3v32a2Given :1; unsigned BSIM3v32ketaGiven :1; unsigned BSIM3v32nsubGiven :1; unsigned BSIM3v32npeakGiven :1; unsigned BSIM3v32ngateGiven :1; unsigned BSIM3v32gamma1Given :1; unsigned BSIM3v32gamma2Given :1; unsigned BSIM3v32vbxGiven :1; unsigned BSIM3v32vbmGiven :1; unsigned BSIM3v32xtGiven :1; unsigned BSIM3v32k1Given :1; unsigned BSIM3v32kt1Given :1; unsigned BSIM3v32kt1lGiven :1; unsigned BSIM3v32kt2Given :1; unsigned BSIM3v32k2Given :1; unsigned BSIM3v32k3Given :1; unsigned BSIM3v32k3bGiven :1; unsigned BSIM3v32w0Given :1; unsigned BSIM3v32nlxGiven :1; unsigned BSIM3v32dvt0Given :1; unsigned BSIM3v32dvt1Given :1; unsigned BSIM3v32dvt2Given :1; unsigned BSIM3v32dvt0wGiven :1; unsigned BSIM3v32dvt1wGiven :1; unsigned BSIM3v32dvt2wGiven :1; unsigned BSIM3v32droutGiven :1; unsigned BSIM3v32dsubGiven :1; unsigned BSIM3v32vth0Given :1; unsigned BSIM3v32uaGiven :1; unsigned BSIM3v32ua1Given :1; unsigned BSIM3v32ubGiven :1; unsigned BSIM3v32ub1Given :1; unsigned BSIM3v32ucGiven :1; unsigned BSIM3v32uc1Given :1; unsigned BSIM3v32u0Given :1; unsigned BSIM3v32uteGiven :1; unsigned BSIM3v32voffGiven :1; unsigned BSIM3v32rdswGiven :1; unsigned BSIM3v32prwgGiven :1; unsigned BSIM3v32prwbGiven :1; unsigned BSIM3v32prtGiven :1; unsigned BSIM3v32eta0Given :1; unsigned BSIM3v32etabGiven :1; unsigned BSIM3v32pclmGiven :1; unsigned BSIM3v32pdibl1Given :1; unsigned BSIM3v32pdibl2Given :1; unsigned BSIM3v32pdiblbGiven :1; unsigned BSIM3v32pscbe1Given :1; unsigned BSIM3v32pscbe2Given :1; unsigned BSIM3v32pvagGiven :1; unsigned BSIM3v32deltaGiven :1; unsigned BSIM3v32wrGiven :1; unsigned BSIM3v32dwgGiven :1; unsigned BSIM3v32dwbGiven :1; unsigned BSIM3v32b0Given :1; unsigned BSIM3v32b1Given :1; unsigned BSIM3v32alpha0Given :1; unsigned BSIM3v32alpha1Given :1; unsigned BSIM3v32beta0Given :1; unsigned BSIM3v32ijthGiven :1; unsigned BSIM3v32vfbGiven :1; /* CV model */ unsigned BSIM3v32elmGiven :1; unsigned BSIM3v32cgslGiven :1; unsigned BSIM3v32cgdlGiven :1; unsigned BSIM3v32ckappaGiven :1; unsigned BSIM3v32cfGiven :1; unsigned BSIM3v32vfbcvGiven :1; unsigned BSIM3v32clcGiven :1; unsigned BSIM3v32cleGiven :1; unsigned BSIM3v32dwcGiven :1; unsigned BSIM3v32dlcGiven :1; unsigned BSIM3v32noffGiven :1; unsigned BSIM3v32voffcvGiven :1; unsigned BSIM3v32acdeGiven :1; unsigned BSIM3v32moinGiven :1; unsigned BSIM3v32tcjGiven :1; unsigned BSIM3v32tcjswGiven :1; unsigned BSIM3v32tcjswgGiven :1; unsigned BSIM3v32tpbGiven :1; unsigned BSIM3v32tpbswGiven :1; unsigned BSIM3v32tpbswgGiven :1; /* ACM model */ unsigned BSIM3v32xlGiven :1; unsigned BSIM3v32xwGiven :1; unsigned BSIM3v32hdifGiven :1; unsigned BSIM3v32ldifGiven :1; unsigned BSIM3v32ldGiven :1; unsigned BSIM3v32rdGiven :1; unsigned BSIM3v32rsGiven :1; unsigned BSIM3v32rdcGiven :1; unsigned BSIM3v32rscGiven :1; unsigned BSIM3v32wmltGiven :1; /* Length dependence */ unsigned BSIM3v32lcdscGiven :1; unsigned BSIM3v32lcdscbGiven :1; unsigned BSIM3v32lcdscdGiven :1; unsigned BSIM3v32lcitGiven :1; unsigned BSIM3v32lnfactorGiven :1; unsigned BSIM3v32lxjGiven :1; unsigned BSIM3v32lvsatGiven :1; unsigned BSIM3v32latGiven :1; unsigned BSIM3v32la0Given :1; unsigned BSIM3v32lagsGiven :1; unsigned BSIM3v32la1Given :1; unsigned BSIM3v32la2Given :1; unsigned BSIM3v32lketaGiven :1; unsigned BSIM3v32lnsubGiven :1; unsigned BSIM3v32lnpeakGiven :1; unsigned BSIM3v32lngateGiven :1; unsigned BSIM3v32lgamma1Given :1; unsigned BSIM3v32lgamma2Given :1; unsigned BSIM3v32lvbxGiven :1; unsigned BSIM3v32lvbmGiven :1; unsigned BSIM3v32lxtGiven :1; unsigned BSIM3v32lk1Given :1; unsigned BSIM3v32lkt1Given :1; unsigned BSIM3v32lkt1lGiven :1; unsigned BSIM3v32lkt2Given :1; unsigned BSIM3v32lk2Given :1; unsigned BSIM3v32lk3Given :1; unsigned BSIM3v32lk3bGiven :1; unsigned BSIM3v32lw0Given :1; unsigned BSIM3v32lnlxGiven :1; unsigned BSIM3v32ldvt0Given :1; unsigned BSIM3v32ldvt1Given :1; unsigned BSIM3v32ldvt2Given :1; unsigned BSIM3v32ldvt0wGiven :1; unsigned BSIM3v32ldvt1wGiven :1; unsigned BSIM3v32ldvt2wGiven :1; unsigned BSIM3v32ldroutGiven :1; unsigned BSIM3v32ldsubGiven :1; unsigned BSIM3v32lvth0Given :1; unsigned BSIM3v32luaGiven :1; unsigned BSIM3v32lua1Given :1; unsigned BSIM3v32lubGiven :1; unsigned BSIM3v32lub1Given :1; unsigned BSIM3v32lucGiven :1; unsigned BSIM3v32luc1Given :1; unsigned BSIM3v32lu0Given :1; unsigned BSIM3v32luteGiven :1; unsigned BSIM3v32lvoffGiven :1; unsigned BSIM3v32lrdswGiven :1; unsigned BSIM3v32lprwgGiven :1; unsigned BSIM3v32lprwbGiven :1; unsigned BSIM3v32lprtGiven :1; unsigned BSIM3v32leta0Given :1; unsigned BSIM3v32letabGiven :1; unsigned BSIM3v32lpclmGiven :1; unsigned BSIM3v32lpdibl1Given :1; unsigned BSIM3v32lpdibl2Given :1; unsigned BSIM3v32lpdiblbGiven :1; unsigned BSIM3v32lpscbe1Given :1; unsigned BSIM3v32lpscbe2Given :1; unsigned BSIM3v32lpvagGiven :1; unsigned BSIM3v32ldeltaGiven :1; unsigned BSIM3v32lwrGiven :1; unsigned BSIM3v32ldwgGiven :1; unsigned BSIM3v32ldwbGiven :1; unsigned BSIM3v32lb0Given :1; unsigned BSIM3v32lb1Given :1; unsigned BSIM3v32lalpha0Given :1; unsigned BSIM3v32lalpha1Given :1; unsigned BSIM3v32lbeta0Given :1; unsigned BSIM3v32lvfbGiven :1; /* CV model */ unsigned BSIM3v32lelmGiven :1; unsigned BSIM3v32lcgslGiven :1; unsigned BSIM3v32lcgdlGiven :1; unsigned BSIM3v32lckappaGiven :1; unsigned BSIM3v32lcfGiven :1; unsigned BSIM3v32lclcGiven :1; unsigned BSIM3v32lcleGiven :1; unsigned BSIM3v32lvfbcvGiven :1; unsigned BSIM3v32lnoffGiven :1; unsigned BSIM3v32lvoffcvGiven :1; unsigned BSIM3v32lacdeGiven :1; unsigned BSIM3v32lmoinGiven :1; /* Width dependence */ unsigned BSIM3v32wcdscGiven :1; unsigned BSIM3v32wcdscbGiven :1; unsigned BSIM3v32wcdscdGiven :1; unsigned BSIM3v32wcitGiven :1; unsigned BSIM3v32wnfactorGiven :1; unsigned BSIM3v32wxjGiven :1; unsigned BSIM3v32wvsatGiven :1; unsigned BSIM3v32watGiven :1; unsigned BSIM3v32wa0Given :1; unsigned BSIM3v32wagsGiven :1; unsigned BSIM3v32wa1Given :1; unsigned BSIM3v32wa2Given :1; unsigned BSIM3v32wketaGiven :1; unsigned BSIM3v32wnsubGiven :1; unsigned BSIM3v32wnpeakGiven :1; unsigned BSIM3v32wngateGiven :1; unsigned BSIM3v32wgamma1Given :1; unsigned BSIM3v32wgamma2Given :1; unsigned BSIM3v32wvbxGiven :1; unsigned BSIM3v32wvbmGiven :1; unsigned BSIM3v32wxtGiven :1; unsigned BSIM3v32wk1Given :1; unsigned BSIM3v32wkt1Given :1; unsigned BSIM3v32wkt1lGiven :1; unsigned BSIM3v32wkt2Given :1; unsigned BSIM3v32wk2Given :1; unsigned BSIM3v32wk3Given :1; unsigned BSIM3v32wk3bGiven :1; unsigned BSIM3v32ww0Given :1; unsigned BSIM3v32wnlxGiven :1; unsigned BSIM3v32wdvt0Given :1; unsigned BSIM3v32wdvt1Given :1; unsigned BSIM3v32wdvt2Given :1; unsigned BSIM3v32wdvt0wGiven :1; unsigned BSIM3v32wdvt1wGiven :1; unsigned BSIM3v32wdvt2wGiven :1; unsigned BSIM3v32wdroutGiven :1; unsigned BSIM3v32wdsubGiven :1; unsigned BSIM3v32wvth0Given :1; unsigned BSIM3v32wuaGiven :1; unsigned BSIM3v32wua1Given :1; unsigned BSIM3v32wubGiven :1; unsigned BSIM3v32wub1Given :1; unsigned BSIM3v32wucGiven :1; unsigned BSIM3v32wuc1Given :1; unsigned BSIM3v32wu0Given :1; unsigned BSIM3v32wuteGiven :1; unsigned BSIM3v32wvoffGiven :1; unsigned BSIM3v32wrdswGiven :1; unsigned BSIM3v32wprwgGiven :1; unsigned BSIM3v32wprwbGiven :1; unsigned BSIM3v32wprtGiven :1; unsigned BSIM3v32weta0Given :1; unsigned BSIM3v32wetabGiven :1; unsigned BSIM3v32wpclmGiven :1; unsigned BSIM3v32wpdibl1Given :1; unsigned BSIM3v32wpdibl2Given :1; unsigned BSIM3v32wpdiblbGiven :1; unsigned BSIM3v32wpscbe1Given :1; unsigned BSIM3v32wpscbe2Given :1; unsigned BSIM3v32wpvagGiven :1; unsigned BSIM3v32wdeltaGiven :1; unsigned BSIM3v32wwrGiven :1; unsigned BSIM3v32wdwgGiven :1; unsigned BSIM3v32wdwbGiven :1; unsigned BSIM3v32wb0Given :1; unsigned BSIM3v32wb1Given :1; unsigned BSIM3v32walpha0Given :1; unsigned BSIM3v32walpha1Given :1; unsigned BSIM3v32wbeta0Given :1; unsigned BSIM3v32wvfbGiven :1; /* CV model */ unsigned BSIM3v32welmGiven :1; unsigned BSIM3v32wcgslGiven :1; unsigned BSIM3v32wcgdlGiven :1; unsigned BSIM3v32wckappaGiven :1; unsigned BSIM3v32wcfGiven :1; unsigned BSIM3v32wclcGiven :1; unsigned BSIM3v32wcleGiven :1; unsigned BSIM3v32wvfbcvGiven :1; unsigned BSIM3v32wnoffGiven :1; unsigned BSIM3v32wvoffcvGiven :1; unsigned BSIM3v32wacdeGiven :1; unsigned BSIM3v32wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM3v32pcdscGiven :1; unsigned BSIM3v32pcdscbGiven :1; unsigned BSIM3v32pcdscdGiven :1; unsigned BSIM3v32pcitGiven :1; unsigned BSIM3v32pnfactorGiven :1; unsigned BSIM3v32pxjGiven :1; unsigned BSIM3v32pvsatGiven :1; unsigned BSIM3v32patGiven :1; unsigned BSIM3v32pa0Given :1; unsigned BSIM3v32pagsGiven :1; unsigned BSIM3v32pa1Given :1; unsigned BSIM3v32pa2Given :1; unsigned BSIM3v32pketaGiven :1; unsigned BSIM3v32pnsubGiven :1; unsigned BSIM3v32pnpeakGiven :1; unsigned BSIM3v32pngateGiven :1; unsigned BSIM3v32pgamma1Given :1; unsigned BSIM3v32pgamma2Given :1; unsigned BSIM3v32pvbxGiven :1; unsigned BSIM3v32pvbmGiven :1; unsigned BSIM3v32pxtGiven :1; unsigned BSIM3v32pk1Given :1; unsigned BSIM3v32pkt1Given :1; unsigned BSIM3v32pkt1lGiven :1; unsigned BSIM3v32pkt2Given :1; unsigned BSIM3v32pk2Given :1; unsigned BSIM3v32pk3Given :1; unsigned BSIM3v32pk3bGiven :1; unsigned BSIM3v32pw0Given :1; unsigned BSIM3v32pnlxGiven :1; unsigned BSIM3v32pdvt0Given :1; unsigned BSIM3v32pdvt1Given :1; unsigned BSIM3v32pdvt2Given :1; unsigned BSIM3v32pdvt0wGiven :1; unsigned BSIM3v32pdvt1wGiven :1; unsigned BSIM3v32pdvt2wGiven :1; unsigned BSIM3v32pdroutGiven :1; unsigned BSIM3v32pdsubGiven :1; unsigned BSIM3v32pvth0Given :1; unsigned BSIM3v32puaGiven :1; unsigned BSIM3v32pua1Given :1; unsigned BSIM3v32pubGiven :1; unsigned BSIM3v32pub1Given :1; unsigned BSIM3v32pucGiven :1; unsigned BSIM3v32puc1Given :1; unsigned BSIM3v32pu0Given :1; unsigned BSIM3v32puteGiven :1; unsigned BSIM3v32pvoffGiven :1; unsigned BSIM3v32prdswGiven :1; unsigned BSIM3v32pprwgGiven :1; unsigned BSIM3v32pprwbGiven :1; unsigned BSIM3v32pprtGiven :1; unsigned BSIM3v32peta0Given :1; unsigned BSIM3v32petabGiven :1; unsigned BSIM3v32ppclmGiven :1; unsigned BSIM3v32ppdibl1Given :1; unsigned BSIM3v32ppdibl2Given :1; unsigned BSIM3v32ppdiblbGiven :1; unsigned BSIM3v32ppscbe1Given :1; unsigned BSIM3v32ppscbe2Given :1; unsigned BSIM3v32ppvagGiven :1; unsigned BSIM3v32pdeltaGiven :1; unsigned BSIM3v32pwrGiven :1; unsigned BSIM3v32pdwgGiven :1; unsigned BSIM3v32pdwbGiven :1; unsigned BSIM3v32pb0Given :1; unsigned BSIM3v32pb1Given :1; unsigned BSIM3v32palpha0Given :1; unsigned BSIM3v32palpha1Given :1; unsigned BSIM3v32pbeta0Given :1; unsigned BSIM3v32pvfbGiven :1; /* CV model */ unsigned BSIM3v32pelmGiven :1; unsigned BSIM3v32pcgslGiven :1; unsigned BSIM3v32pcgdlGiven :1; unsigned BSIM3v32pckappaGiven :1; unsigned BSIM3v32pcfGiven :1; unsigned BSIM3v32pclcGiven :1; unsigned BSIM3v32pcleGiven :1; unsigned BSIM3v32pvfbcvGiven :1; unsigned BSIM3v32pnoffGiven :1; unsigned BSIM3v32pvoffcvGiven :1; unsigned BSIM3v32pacdeGiven :1; unsigned BSIM3v32pmoinGiven :1; unsigned BSIM3v32useFringeGiven :1; unsigned BSIM3v32tnomGiven :1; unsigned BSIM3v32cgsoGiven :1; unsigned BSIM3v32cgdoGiven :1; unsigned BSIM3v32cgboGiven :1; unsigned BSIM3v32xpartGiven :1; unsigned BSIM3v32sheetResistanceGiven :1; unsigned BSIM3v32jctSatCurDensityGiven :1; unsigned BSIM3v32jctSidewallSatCurDensityGiven :1; unsigned BSIM3v32bulkJctPotentialGiven :1; unsigned BSIM3v32bulkJctBotGradingCoeffGiven :1; unsigned BSIM3v32sidewallJctPotentialGiven :1; unsigned BSIM3v32GatesidewallJctPotentialGiven :1; unsigned BSIM3v32bulkJctSideGradingCoeffGiven :1; unsigned BSIM3v32unitAreaJctCapGiven :1; unsigned BSIM3v32unitLengthSidewallJctCapGiven :1; unsigned BSIM3v32bulkJctGateSideGradingCoeffGiven :1; unsigned BSIM3v32unitLengthGateSidewallJctCapGiven :1; unsigned BSIM3v32jctEmissionCoeffGiven :1; unsigned BSIM3v32jctTempExponentGiven :1; unsigned BSIM3v32oxideTrapDensityAGiven :1; unsigned BSIM3v32oxideTrapDensityBGiven :1; unsigned BSIM3v32oxideTrapDensityCGiven :1; unsigned BSIM3v32emGiven :1; unsigned BSIM3v32efGiven :1; unsigned BSIM3v32afGiven :1; unsigned BSIM3v32kfGiven :1; unsigned BSIM3v32LintGiven :1; unsigned BSIM3v32LlGiven :1; unsigned BSIM3v32LlcGiven :1; unsigned BSIM3v32LlnGiven :1; unsigned BSIM3v32LwGiven :1; unsigned BSIM3v32LwcGiven :1; unsigned BSIM3v32LwnGiven :1; unsigned BSIM3v32LwlGiven :1; unsigned BSIM3v32LwlcGiven :1; unsigned BSIM3v32LminGiven :1; unsigned BSIM3v32LmaxGiven :1; unsigned BSIM3v32WintGiven :1; unsigned BSIM3v32WlGiven :1; unsigned BSIM3v32WlcGiven :1; unsigned BSIM3v32WlnGiven :1; unsigned BSIM3v32WwGiven :1; unsigned BSIM3v32WwcGiven :1; unsigned BSIM3v32WwnGiven :1; unsigned BSIM3v32WwlGiven :1; unsigned BSIM3v32WwlcGiven :1; unsigned BSIM3v32WminGiven :1; unsigned BSIM3v32WmaxGiven :1; unsigned BSIM3v32vgsMaxGiven :1; unsigned BSIM3v32vgdMaxGiven :1; unsigned BSIM3v32vgbMaxGiven :1; unsigned BSIM3v32vdsMaxGiven :1; unsigned BSIM3v32vbsMaxGiven :1; unsigned BSIM3v32vbdMaxGiven :1; } BSIM3v32model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM3v32_W 1 #define BSIM3v32_L 2 #define BSIM3v32_AS 3 #define BSIM3v32_AD 4 #define BSIM3v32_PS 5 #define BSIM3v32_PD 6 #define BSIM3v32_NRS 7 #define BSIM3v32_NRD 8 #define BSIM3v32_OFF 9 #define BSIM3v32_IC_VBS 10 #define BSIM3v32_IC_VDS 11 #define BSIM3v32_IC_VGS 12 #define BSIM3v32_IC 13 #define BSIM3v32_NQSMOD 14 #define BSIM3v32_M 15 #define BSIM3v32_DELVTO 16 #define BSIM3v32_MULU0 17 #define BSIM3v32_GEO 18 /* model parameters */ #define BSIM3v32_MOD_CAPMOD 100 #define BSIM3v32_MOD_ACMMOD 101 #define BSIM3v32_MOD_CALCACM 102 #define BSIM3v32_MOD_MOBMOD 103 #define BSIM3v32_MOD_NOIMOD 104 #define BSIM3v32_MOD_NQSMOD 105 #define BSIM3v32_MOD_TOX 106 #define BSIM3v32_MOD_CDSC 107 #define BSIM3v32_MOD_CDSCB 108 #define BSIM3v32_MOD_CIT 109 #define BSIM3v32_MOD_NFACTOR 110 #define BSIM3v32_MOD_XJ 111 #define BSIM3v32_MOD_VSAT 112 #define BSIM3v32_MOD_AT 113 #define BSIM3v32_MOD_A0 114 #define BSIM3v32_MOD_A1 115 #define BSIM3v32_MOD_A2 116 #define BSIM3v32_MOD_KETA 117 #define BSIM3v32_MOD_NSUB 118 #define BSIM3v32_MOD_NPEAK 119 #define BSIM3v32_MOD_NGATE 120 #define BSIM3v32_MOD_GAMMA1 121 #define BSIM3v32_MOD_GAMMA2 122 #define BSIM3v32_MOD_VBX 123 #define BSIM3v32_MOD_BINUNIT 124 #define BSIM3v32_MOD_VBM 125 #define BSIM3v32_MOD_XT 128 #define BSIM3v32_MOD_K1 129 #define BSIM3v32_MOD_KT1 130 #define BSIM3v32_MOD_KT1L 131 #define BSIM3v32_MOD_K2 132 #define BSIM3v32_MOD_KT2 133 #define BSIM3v32_MOD_K3 134 #define BSIM3v32_MOD_K3B 135 #define BSIM3v32_MOD_W0 136 #define BSIM3v32_MOD_NLX 137 #define BSIM3v32_MOD_DVT0 138 #define BSIM3v32_MOD_DVT1 139 #define BSIM3v32_MOD_DVT2 140 #define BSIM3v32_MOD_DVT0W 141 #define BSIM3v32_MOD_DVT1W 142 #define BSIM3v32_MOD_DVT2W 143 #define BSIM3v32_MOD_DROUT 144 #define BSIM3v32_MOD_DSUB 145 #define BSIM3v32_MOD_VTH0 146 #define BSIM3v32_MOD_UA 147 #define BSIM3v32_MOD_UA1 148 #define BSIM3v32_MOD_UB 149 #define BSIM3v32_MOD_UB1 150 #define BSIM3v32_MOD_UC 151 #define BSIM3v32_MOD_UC1 152 #define BSIM3v32_MOD_U0 153 #define BSIM3v32_MOD_UTE 154 #define BSIM3v32_MOD_VOFF 155 #define BSIM3v32_MOD_DELTA 156 #define BSIM3v32_MOD_RDSW 157 #define BSIM3v32_MOD_PRT 158 #define BSIM3v32_MOD_LDD 159 #define BSIM3v32_MOD_ETA 160 #define BSIM3v32_MOD_ETA0 161 #define BSIM3v32_MOD_ETAB 162 #define BSIM3v32_MOD_PCLM 163 #define BSIM3v32_MOD_PDIBL1 164 #define BSIM3v32_MOD_PDIBL2 165 #define BSIM3v32_MOD_PSCBE1 166 #define BSIM3v32_MOD_PSCBE2 167 #define BSIM3v32_MOD_PVAG 168 #define BSIM3v32_MOD_WR 169 #define BSIM3v32_MOD_DWG 170 #define BSIM3v32_MOD_DWB 171 #define BSIM3v32_MOD_B0 172 #define BSIM3v32_MOD_B1 173 #define BSIM3v32_MOD_ALPHA0 174 #define BSIM3v32_MOD_BETA0 175 #define BSIM3v32_MOD_PDIBLB 178 #define BSIM3v32_MOD_PRWG 179 #define BSIM3v32_MOD_PRWB 180 #define BSIM3v32_MOD_CDSCD 181 #define BSIM3v32_MOD_AGS 182 #define BSIM3v32_MOD_FRINGE 184 #define BSIM3v32_MOD_ELM 185 #define BSIM3v32_MOD_CGSL 186 #define BSIM3v32_MOD_CGDL 187 #define BSIM3v32_MOD_CKAPPA 188 #define BSIM3v32_MOD_CF 189 #define BSIM3v32_MOD_CLC 190 #define BSIM3v32_MOD_CLE 191 #define BSIM3v32_MOD_PARAMCHK 192 #define BSIM3v32_MOD_VERSION 193 #define BSIM3v32_MOD_VFBCV 194 #define BSIM3v32_MOD_ACDE 195 #define BSIM3v32_MOD_MOIN 196 #define BSIM3v32_MOD_NOFF 197 #define BSIM3v32_MOD_IJTH 198 #define BSIM3v32_MOD_ALPHA1 199 #define BSIM3v32_MOD_VFB 200 #define BSIM3v32_MOD_TOXM 201 #define BSIM3v32_MOD_TCJ 202 #define BSIM3v32_MOD_TCJSW 203 #define BSIM3v32_MOD_TCJSWG 204 #define BSIM3v32_MOD_TPB 205 #define BSIM3v32_MOD_TPBSW 206 #define BSIM3v32_MOD_TPBSWG 207 #define BSIM3v32_MOD_VOFFCV 208 /* Length dependence */ #define BSIM3v32_MOD_LCDSC 251 #define BSIM3v32_MOD_LCDSCB 252 #define BSIM3v32_MOD_LCIT 253 #define BSIM3v32_MOD_LNFACTOR 254 #define BSIM3v32_MOD_LXJ 255 #define BSIM3v32_MOD_LVSAT 256 #define BSIM3v32_MOD_LAT 257 #define BSIM3v32_MOD_LA0 258 #define BSIM3v32_MOD_LA1 259 #define BSIM3v32_MOD_LA2 260 #define BSIM3v32_MOD_LKETA 261 #define BSIM3v32_MOD_LNSUB 262 #define BSIM3v32_MOD_LNPEAK 263 #define BSIM3v32_MOD_LNGATE 265 #define BSIM3v32_MOD_LGAMMA1 266 #define BSIM3v32_MOD_LGAMMA2 267 #define BSIM3v32_MOD_LVBX 268 #define BSIM3v32_MOD_LVBM 270 #define BSIM3v32_MOD_LXT 272 #define BSIM3v32_MOD_LK1 275 #define BSIM3v32_MOD_LKT1 276 #define BSIM3v32_MOD_LKT1L 277 #define BSIM3v32_MOD_LK2 278 #define BSIM3v32_MOD_LKT2 279 #define BSIM3v32_MOD_LK3 280 #define BSIM3v32_MOD_LK3B 281 #define BSIM3v32_MOD_LW0 282 #define BSIM3v32_MOD_LNLX 283 #define BSIM3v32_MOD_LDVT0 284 #define BSIM3v32_MOD_LDVT1 285 #define BSIM3v32_MOD_LDVT2 286 #define BSIM3v32_MOD_LDVT0W 287 #define BSIM3v32_MOD_LDVT1W 288 #define BSIM3v32_MOD_LDVT2W 289 #define BSIM3v32_MOD_LDROUT 290 #define BSIM3v32_MOD_LDSUB 291 #define BSIM3v32_MOD_LVTH0 292 #define BSIM3v32_MOD_LUA 293 #define BSIM3v32_MOD_LUA1 294 #define BSIM3v32_MOD_LUB 295 #define BSIM3v32_MOD_LUB1 296 #define BSIM3v32_MOD_LUC 297 #define BSIM3v32_MOD_LUC1 298 #define BSIM3v32_MOD_LU0 299 #define BSIM3v32_MOD_LUTE 300 #define BSIM3v32_MOD_LVOFF 301 #define BSIM3v32_MOD_LDELTA 302 #define BSIM3v32_MOD_LRDSW 303 #define BSIM3v32_MOD_LPRT 304 #define BSIM3v32_MOD_LLDD 305 #define BSIM3v32_MOD_LETA 306 #define BSIM3v32_MOD_LETA0 307 #define BSIM3v32_MOD_LETAB 308 #define BSIM3v32_MOD_LPCLM 309 #define BSIM3v32_MOD_LPDIBL1 310 #define BSIM3v32_MOD_LPDIBL2 311 #define BSIM3v32_MOD_LPSCBE1 312 #define BSIM3v32_MOD_LPSCBE2 313 #define BSIM3v32_MOD_LPVAG 314 #define BSIM3v32_MOD_LWR 315 #define BSIM3v32_MOD_LDWG 316 #define BSIM3v32_MOD_LDWB 317 #define BSIM3v32_MOD_LB0 318 #define BSIM3v32_MOD_LB1 319 #define BSIM3v32_MOD_LALPHA0 320 #define BSIM3v32_MOD_LBETA0 321 #define BSIM3v32_MOD_LPDIBLB 324 #define BSIM3v32_MOD_LPRWG 325 #define BSIM3v32_MOD_LPRWB 326 #define BSIM3v32_MOD_LCDSCD 327 #define BSIM3v32_MOD_LAGS 328 #define BSIM3v32_MOD_LFRINGE 331 #define BSIM3v32_MOD_LELM 332 #define BSIM3v32_MOD_LCGSL 333 #define BSIM3v32_MOD_LCGDL 334 #define BSIM3v32_MOD_LCKAPPA 335 #define BSIM3v32_MOD_LCF 336 #define BSIM3v32_MOD_LCLC 337 #define BSIM3v32_MOD_LCLE 338 #define BSIM3v32_MOD_LVFBCV 339 #define BSIM3v32_MOD_LACDE 340 #define BSIM3v32_MOD_LMOIN 341 #define BSIM3v32_MOD_LNOFF 342 #define BSIM3v32_MOD_LALPHA1 344 #define BSIM3v32_MOD_LVFB 345 #define BSIM3v32_MOD_LVOFFCV 346 /* Width dependence */ #define BSIM3v32_MOD_WCDSC 381 #define BSIM3v32_MOD_WCDSCB 382 #define BSIM3v32_MOD_WCIT 383 #define BSIM3v32_MOD_WNFACTOR 384 #define BSIM3v32_MOD_WXJ 385 #define BSIM3v32_MOD_WVSAT 386 #define BSIM3v32_MOD_WAT 387 #define BSIM3v32_MOD_WA0 388 #define BSIM3v32_MOD_WA1 389 #define BSIM3v32_MOD_WA2 390 #define BSIM3v32_MOD_WKETA 391 #define BSIM3v32_MOD_WNSUB 392 #define BSIM3v32_MOD_WNPEAK 393 #define BSIM3v32_MOD_WNGATE 395 #define BSIM3v32_MOD_WGAMMA1 396 #define BSIM3v32_MOD_WGAMMA2 397 #define BSIM3v32_MOD_WVBX 398 #define BSIM3v32_MOD_WVBM 400 #define BSIM3v32_MOD_WXT 402 #define BSIM3v32_MOD_WK1 405 #define BSIM3v32_MOD_WKT1 406 #define BSIM3v32_MOD_WKT1L 407 #define BSIM3v32_MOD_WK2 408 #define BSIM3v32_MOD_WKT2 409 #define BSIM3v32_MOD_WK3 410 #define BSIM3v32_MOD_WK3B 411 #define BSIM3v32_MOD_WW0 412 #define BSIM3v32_MOD_WNLX 413 #define BSIM3v32_MOD_WDVT0 414 #define BSIM3v32_MOD_WDVT1 415 #define BSIM3v32_MOD_WDVT2 416 #define BSIM3v32_MOD_WDVT0W 417 #define BSIM3v32_MOD_WDVT1W 418 #define BSIM3v32_MOD_WDVT2W 419 #define BSIM3v32_MOD_WDROUT 420 #define BSIM3v32_MOD_WDSUB 421 #define BSIM3v32_MOD_WVTH0 422 #define BSIM3v32_MOD_WUA 423 #define BSIM3v32_MOD_WUA1 424 #define BSIM3v32_MOD_WUB 425 #define BSIM3v32_MOD_WUB1 426 #define BSIM3v32_MOD_WUC 427 #define BSIM3v32_MOD_WUC1 428 #define BSIM3v32_MOD_WU0 429 #define BSIM3v32_MOD_WUTE 430 #define BSIM3v32_MOD_WVOFF 431 #define BSIM3v32_MOD_WDELTA 432 #define BSIM3v32_MOD_WRDSW 433 #define BSIM3v32_MOD_WPRT 434 #define BSIM3v32_MOD_WLDD 435 #define BSIM3v32_MOD_WETA 436 #define BSIM3v32_MOD_WETA0 437 #define BSIM3v32_MOD_WETAB 438 #define BSIM3v32_MOD_WPCLM 439 #define BSIM3v32_MOD_WPDIBL1 440 #define BSIM3v32_MOD_WPDIBL2 441 #define BSIM3v32_MOD_WPSCBE1 442 #define BSIM3v32_MOD_WPSCBE2 443 #define BSIM3v32_MOD_WPVAG 444 #define BSIM3v32_MOD_WWR 445 #define BSIM3v32_MOD_WDWG 446 #define BSIM3v32_MOD_WDWB 447 #define BSIM3v32_MOD_WB0 448 #define BSIM3v32_MOD_WB1 449 #define BSIM3v32_MOD_WALPHA0 450 #define BSIM3v32_MOD_WBETA0 451 #define BSIM3v32_MOD_WPDIBLB 454 #define BSIM3v32_MOD_WPRWG 455 #define BSIM3v32_MOD_WPRWB 456 #define BSIM3v32_MOD_WCDSCD 457 #define BSIM3v32_MOD_WAGS 458 #define BSIM3v32_MOD_WFRINGE 461 #define BSIM3v32_MOD_WELM 462 #define BSIM3v32_MOD_WCGSL 463 #define BSIM3v32_MOD_WCGDL 464 #define BSIM3v32_MOD_WCKAPPA 465 #define BSIM3v32_MOD_WCF 466 #define BSIM3v32_MOD_WCLC 467 #define BSIM3v32_MOD_WCLE 468 #define BSIM3v32_MOD_WVFBCV 469 #define BSIM3v32_MOD_WACDE 470 #define BSIM3v32_MOD_WMOIN 471 #define BSIM3v32_MOD_WNOFF 472 #define BSIM3v32_MOD_WALPHA1 474 #define BSIM3v32_MOD_WVFB 475 #define BSIM3v32_MOD_WVOFFCV 476 /* Cross-term dependence */ #define BSIM3v32_MOD_PCDSC 511 #define BSIM3v32_MOD_PCDSCB 512 #define BSIM3v32_MOD_PCIT 513 #define BSIM3v32_MOD_PNFACTOR 514 #define BSIM3v32_MOD_PXJ 515 #define BSIM3v32_MOD_PVSAT 516 #define BSIM3v32_MOD_PAT 517 #define BSIM3v32_MOD_PA0 518 #define BSIM3v32_MOD_PA1 519 #define BSIM3v32_MOD_PA2 520 #define BSIM3v32_MOD_PKETA 521 #define BSIM3v32_MOD_PNSUB 522 #define BSIM3v32_MOD_PNPEAK 523 #define BSIM3v32_MOD_PNGATE 525 #define BSIM3v32_MOD_PGAMMA1 526 #define BSIM3v32_MOD_PGAMMA2 527 #define BSIM3v32_MOD_PVBX 528 #define BSIM3v32_MOD_PVBM 530 #define BSIM3v32_MOD_PXT 532 #define BSIM3v32_MOD_PK1 535 #define BSIM3v32_MOD_PKT1 536 #define BSIM3v32_MOD_PKT1L 537 #define BSIM3v32_MOD_PK2 538 #define BSIM3v32_MOD_PKT2 539 #define BSIM3v32_MOD_PK3 540 #define BSIM3v32_MOD_PK3B 541 #define BSIM3v32_MOD_PW0 542 #define BSIM3v32_MOD_PNLX 543 #define BSIM3v32_MOD_PDVT0 544 #define BSIM3v32_MOD_PDVT1 545 #define BSIM3v32_MOD_PDVT2 546 #define BSIM3v32_MOD_PDVT0W 547 #define BSIM3v32_MOD_PDVT1W 548 #define BSIM3v32_MOD_PDVT2W 549 #define BSIM3v32_MOD_PDROUT 550 #define BSIM3v32_MOD_PDSUB 551 #define BSIM3v32_MOD_PVTH0 552 #define BSIM3v32_MOD_PUA 553 #define BSIM3v32_MOD_PUA1 554 #define BSIM3v32_MOD_PUB 555 #define BSIM3v32_MOD_PUB1 556 #define BSIM3v32_MOD_PUC 557 #define BSIM3v32_MOD_PUC1 558 #define BSIM3v32_MOD_PU0 559 #define BSIM3v32_MOD_PUTE 560 #define BSIM3v32_MOD_PVOFF 561 #define BSIM3v32_MOD_PDELTA 562 #define BSIM3v32_MOD_PRDSW 563 #define BSIM3v32_MOD_PPRT 564 #define BSIM3v32_MOD_PLDD 565 #define BSIM3v32_MOD_PETA 566 #define BSIM3v32_MOD_PETA0 567 #define BSIM3v32_MOD_PETAB 568 #define BSIM3v32_MOD_PPCLM 569 #define BSIM3v32_MOD_PPDIBL1 570 #define BSIM3v32_MOD_PPDIBL2 571 #define BSIM3v32_MOD_PPSCBE1 572 #define BSIM3v32_MOD_PPSCBE2 573 #define BSIM3v32_MOD_PPVAG 574 #define BSIM3v32_MOD_PWR 575 #define BSIM3v32_MOD_PDWG 576 #define BSIM3v32_MOD_PDWB 577 #define BSIM3v32_MOD_PB0 578 #define BSIM3v32_MOD_PB1 579 #define BSIM3v32_MOD_PALPHA0 580 #define BSIM3v32_MOD_PBETA0 581 #define BSIM3v32_MOD_PPDIBLB 584 #define BSIM3v32_MOD_PPRWG 585 #define BSIM3v32_MOD_PPRWB 586 #define BSIM3v32_MOD_PCDSCD 587 #define BSIM3v32_MOD_PAGS 588 #define BSIM3v32_MOD_PFRINGE 591 #define BSIM3v32_MOD_PELM 592 #define BSIM3v32_MOD_PCGSL 593 #define BSIM3v32_MOD_PCGDL 594 #define BSIM3v32_MOD_PCKAPPA 595 #define BSIM3v32_MOD_PCF 596 #define BSIM3v32_MOD_PCLC 597 #define BSIM3v32_MOD_PCLE 598 #define BSIM3v32_MOD_PVFBCV 599 #define BSIM3v32_MOD_PACDE 600 #define BSIM3v32_MOD_PMOIN 601 #define BSIM3v32_MOD_PNOFF 602 #define BSIM3v32_MOD_PALPHA1 604 #define BSIM3v32_MOD_PVFB 605 #define BSIM3v32_MOD_PVOFFCV 606 #define BSIM3v32_MOD_TNOM 651 #define BSIM3v32_MOD_CGSO 652 #define BSIM3v32_MOD_CGDO 653 #define BSIM3v32_MOD_CGBO 654 #define BSIM3v32_MOD_XPART 655 #define BSIM3v32_MOD_RSH 656 #define BSIM3v32_MOD_JS 657 #define BSIM3v32_MOD_PB 658 #define BSIM3v32_MOD_MJ 659 #define BSIM3v32_MOD_PBSW 660 #define BSIM3v32_MOD_MJSW 661 #define BSIM3v32_MOD_CJ 662 #define BSIM3v32_MOD_CJSW 663 #define BSIM3v32_MOD_NMOS 664 #define BSIM3v32_MOD_PMOS 665 #define BSIM3v32_MOD_NOIA 666 #define BSIM3v32_MOD_NOIB 667 #define BSIM3v32_MOD_NOIC 668 #define BSIM3v32_MOD_LINT 669 #define BSIM3v32_MOD_LL 670 #define BSIM3v32_MOD_LLN 671 #define BSIM3v32_MOD_LW 672 #define BSIM3v32_MOD_LWN 673 #define BSIM3v32_MOD_LWL 674 #define BSIM3v32_MOD_LMIN 675 #define BSIM3v32_MOD_LMAX 676 #define BSIM3v32_MOD_WINT 677 #define BSIM3v32_MOD_WL 678 #define BSIM3v32_MOD_WLN 679 #define BSIM3v32_MOD_WW 680 #define BSIM3v32_MOD_WWN 681 #define BSIM3v32_MOD_WWL 682 #define BSIM3v32_MOD_WMIN 683 #define BSIM3v32_MOD_WMAX 684 #define BSIM3v32_MOD_DWC 685 #define BSIM3v32_MOD_DLC 686 #define BSIM3v32_MOD_EM 687 #define BSIM3v32_MOD_EF 688 #define BSIM3v32_MOD_AF 689 #define BSIM3v32_MOD_KF 690 #define BSIM3v32_MOD_NJ 691 #define BSIM3v32_MOD_XTI 692 #define BSIM3v32_MOD_PBSWG 693 #define BSIM3v32_MOD_MJSWG 694 #define BSIM3v32_MOD_CJSWG 695 #define BSIM3v32_MOD_JSW 696 #define BSIM3v32_MOD_LLC 697 #define BSIM3v32_MOD_LWC 698 #define BSIM3v32_MOD_LWLC 699 #define BSIM3v32_MOD_WLC 700 #define BSIM3v32_MOD_WWC 701 #define BSIM3v32_MOD_WWLC 702 /* ACM parameters */ #define BSIM3v32_MOD_XL 703 #define BSIM3v32_MOD_XW 704 #define BSIM3v32_MOD_HDIF 711 #define BSIM3v32_MOD_LDIF 712 #define BSIM3v32_MOD_LD 713 #define BSIM3v32_MOD_RD 714 #define BSIM3v32_MOD_RS 715 #define BSIM3v32_MOD_RDC 716 #define BSIM3v32_MOD_RSC 717 #define BSIM3v32_MOD_WMLT 718 /* device questions */ #define BSIM3v32_DNODE 751 #define BSIM3v32_GNODE 752 #define BSIM3v32_SNODE 753 #define BSIM3v32_BNODE 754 #define BSIM3v32_DNODEPRIME 755 #define BSIM3v32_SNODEPRIME 756 #define BSIM3v32_VBD 757 #define BSIM3v32_VBS 758 #define BSIM3v32_VGS 759 #define BSIM3v32_VDS 760 #define BSIM3v32_CD 761 #define BSIM3v32_CBS 762 #define BSIM3v32_CBD 763 #define BSIM3v32_GM 764 #define BSIM3v32_GDS 765 #define BSIM3v32_GMBS 766 #define BSIM3v32_GBD 767 #define BSIM3v32_GBS 768 #define BSIM3v32_QB 769 #define BSIM3v32_CQB 770 #define BSIM3v32_QG 771 #define BSIM3v32_CQG 772 #define BSIM3v32_QD 773 #define BSIM3v32_CQD 774 #define BSIM3v32_CGG 775 #define BSIM3v32_CGD 776 #define BSIM3v32_CGS 777 #define BSIM3v32_CBG 778 #define BSIM3v32_CAPBD 779 #define BSIM3v32_CQBD 780 #define BSIM3v32_CAPBS 781 #define BSIM3v32_CQBS 782 #define BSIM3v32_CDG 783 #define BSIM3v32_CDD 784 #define BSIM3v32_CDS 785 #define BSIM3v32_VON 786 #define BSIM3v32_VDSAT 787 #define BSIM3v32_QBS 788 #define BSIM3v32_QBD 789 #define BSIM3v32_SOURCECONDUCT 790 #define BSIM3v32_DRAINCONDUCT 791 #define BSIM3v32_CBDB 792 #define BSIM3v32_CBSB 793 #define BSIM3v32_MOD_VGS_MAX 801 #define BSIM3v32_MOD_VGD_MAX 802 #define BSIM3v32_MOD_VGB_MAX 803 #define BSIM3v32_MOD_VDS_MAX 804 #define BSIM3v32_MOD_VBS_MAX 805 #define BSIM3v32_MOD_VBD_MAX 806 #include "bsim3v32ext.h" extern void BSIM3v32evaluate(double,double,double,BSIM3v32instance*,BSIM3v32model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM3v32debug(BSIM3v32model*, BSIM3v32instance*, CKTcircuit*, int); extern int BSIM3v32checkModel(BSIM3v32model*, BSIM3v32instance*, CKTcircuit*); #endif /*BSIM3v32*/ ngspice-26/src/spicelib/devices/bsim3v32/b3v32dest.c0000644000265600020320000000276312264261473021477 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3dest.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "bsim3v32def.h" #include "ngspice/suffix.h" void BSIM3v32destroy (GENmodel **inModel) { BSIM3v32model **model = (BSIM3v32model**)inModel; BSIM3v32instance *here; BSIM3v32instance *prev = NULL; BSIM3v32model *mod = *model; BSIM3v32model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v32nextModel) { /** added to get rid of link list pSizeDependParamKnot **/ struct bsim3v32SizeDependParam *pParam, *pParamOld=NULL; pParam = mod->pSizeDependParamKnot; for (; pParam ; pParam = pParam->pNext) { FREE(pParamOld); pParamOld = pParam; } FREE(pParamOld); pParam = NULL; /** end of extra code **/ if(oldmod) { FREE(oldmod->BSIM3v32version); FREE(oldmod); } oldmod = mod; prev = NULL; for (here = mod->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) { FREE(oldmod->BSIM3v32version); FREE(oldmod); } *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3v32/Makefile.am0000644000265600020320000000117412264261473021643 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3v32.la libbsim3v32_la_SOURCES = \ b3v32.c \ b3v32acld.c \ b3v32ask.c \ b3v32check.c \ b3v32cvtest.c \ b3v32del.c \ b3v32dest.c \ b3v32getic.c \ b3v32ld.c \ b3v32mask.c \ b3v32mdel.c \ b3v32mpar.c \ b3v32noi.c \ b3v32par.c \ b3v32pzld.c \ b3v32set.c \ b3v32soachk.c \ b3v32temp.c \ b3v32trunc.c \ bsim3v32def.h \ bsim3v32ext.h \ bsim3v32init.c \ bsim3v32init.h \ bsim3v32itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B3TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim3v32/Makefile.in0000644000265600020320000004367712264261536021672 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3v32 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3v32_la_LIBADD = am_libbsim3v32_la_OBJECTS = b3v32.lo b3v32acld.lo b3v32ask.lo \ b3v32check.lo b3v32cvtest.lo b3v32del.lo b3v32dest.lo \ b3v32getic.lo b3v32ld.lo b3v32mask.lo b3v32mdel.lo \ b3v32mpar.lo b3v32noi.lo b3v32par.lo b3v32pzld.lo b3v32set.lo \ b3v32soachk.lo b3v32temp.lo b3v32trunc.lo bsim3v32init.lo libbsim3v32_la_OBJECTS = $(am_libbsim3v32_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3v32_la_SOURCES) DIST_SOURCES = $(libbsim3v32_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3v32.la libbsim3v32_la_SOURCES = \ b3v32.c \ b3v32acld.c \ b3v32ask.c \ b3v32check.c \ b3v32cvtest.c \ b3v32del.c \ b3v32dest.c \ b3v32getic.c \ b3v32ld.c \ b3v32mask.c \ b3v32mdel.c \ b3v32mpar.c \ b3v32noi.c \ b3v32par.c \ b3v32pzld.c \ b3v32set.c \ b3v32soachk.c \ b3v32temp.c \ b3v32trunc.c \ bsim3v32def.h \ bsim3v32ext.h \ bsim3v32init.c \ bsim3v32init.h \ bsim3v32itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B3TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v32/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v32/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3v32.la: $(libbsim3v32_la_OBJECTS) $(libbsim3v32_la_DEPENDENCIES) $(EXTRA_libbsim3v32_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3v32_la_OBJECTS) $(libbsim3v32_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v32trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim3v32init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3v32/b3v32mdel.c0000644000265600020320000000234512264261473021455 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/21/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3mdel.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan. * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "bsim3v32def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32mDelete (GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM3v32model **model = (BSIM3v32model**)inModel; BSIM3v32model *modfast = (BSIM3v32model*)kill; BSIM3v32instance *here; BSIM3v32instance *prev = NULL; BSIM3v32model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM3v32nextModel)) { if ((*model)->BSIM3v32modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM3v32nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM3v32instances; here; here = here->BSIM3v32nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/b3v32cvtest.c0000644000265600020320000001034212264261473022040 0ustar andreasadmin/**** BSIM3v3.2.4, Released by Xuemei Xi 12/14/2001 ****/ /********** * Copyright 2001 Regents of the University of California. All rights reserved. * File: b3cvtest.c of BSIM3v3.2.4 * Author: 1995 Min-Chie Jeng and Mansun Chan * Author: 1997-1999 Weidong Liu. * Author: 2001 Xuemei Xi * Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v32def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v32convTest (GENmodel *inModel, CKTcircuit *ckt) { BSIM3v32model *model = (BSIM3v32model*)inModel; BSIM3v32instance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the BSIM3v32 device models */ for (; model != NULL; model = model->BSIM3v32nextModel) { /* loop through all the instances of the model */ for (here = model->BSIM3v32instances; here != NULL ; here=here->BSIM3v32nextInstance) { vbs = model->BSIM3v32type * (*(ckt->CKTrhsOld+here->BSIM3v32bNode) - *(ckt->CKTrhsOld+here->BSIM3v32sNodePrime)); vgs = model->BSIM3v32type * (*(ckt->CKTrhsOld+here->BSIM3v32gNode) - *(ckt->CKTrhsOld+here->BSIM3v32sNodePrime)); vds = model->BSIM3v32type * (*(ckt->CKTrhsOld+here->BSIM3v32dNodePrime) - *(ckt->CKTrhsOld+here->BSIM3v32sNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v32vgs) - *(ckt->CKTstate0 + here->BSIM3v32vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v32vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v32vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v32vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v32vds); delvgd = vgd-vgdo; cd = here->BSIM3v32cd - here->BSIM3v32cbd; if (here->BSIM3v32mode >= 0) { cd += here->BSIM3v32csub; cdhat = cd - here->BSIM3v32gbd * delvbd + (here->BSIM3v32gmbs + here->BSIM3v32gbbs) * delvbs + (here->BSIM3v32gm + here->BSIM3v32gbgs) * delvgs + (here->BSIM3v32gds + here->BSIM3v32gbds) * delvds; } else { cdhat = cd + (here->BSIM3v32gmbs - here->BSIM3v32gbd) * delvbd + here->BSIM3v32gm * delvgd - here->BSIM3v32gds * delvds; } /* * check convergence */ if ((here->BSIM3v32off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->BSIM3v32cbs; cbd = here->BSIM3v32cbd; if (here->BSIM3v32mode >= 0) { cbhat = cbs + cbd - here->BSIM3v32csub + here->BSIM3v32gbd * delvbd + (here->BSIM3v32gbs - here->BSIM3v32gbbs) * delvbs - here->BSIM3v32gbgs * delvgs - here->BSIM3v32gbds * delvds; } else { cbhat = cbs + cbd - here->BSIM3v32csub + here->BSIM3v32gbs * delvbs + (here->BSIM3v32gbd - here->BSIM3v32gbbs) * delvbd - here->BSIM3v32gbgs * delvgd + here->BSIM3v32gbds * delvds; } tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd - here->BSIM3v32csub)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd - here->BSIM3v32csub)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v32/B3TERMS_OF_USE0000644000265600020320000000247512264261473021716 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsim3soi_dd/0000755000265600020320000000000012264261706020432 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddmdel.c0000644000265600020320000000232212264261473022767 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddmdel.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { B3SOIDDmodel **model = (B3SOIDDmodel**)inModel; B3SOIDDmodel *modfast = (B3SOIDDmodel*)kill; B3SOIDDinstance *here; B3SOIDDinstance *prev = NULL; B3SOIDDmodel **oldmod; oldmod = model; for (; *model ; model = &((*model)->B3SOIDDnextModel)) { if ((*model)->B3SOIDDmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B3SOIDDnextModel; /* cut deleted device out of list */ for (here = (*model)->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddtrunc.c0000644000265600020320000000240112264261473023177 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddtrunc.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here != NULL; here = here->B3SOIDDnextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B3SOIDDqb,ckt,timeStep); CKTterr(here->B3SOIDDqg,ckt,timeStep); CKTterr(here->B3SOIDDqd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B3SOIDDname,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c0000644000265600020320000010550412264261473023021 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Pin Su, Wei Jin 99/9/27 File: b3soiddtemp.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int B3SOIDDtemp(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model = (B3SOIDDmodel*) inModel; B3SOIDDinstance *here; struct b3soiddSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, T6, Ldrn, Wdrn; double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double SDphi, SDgamma; int Size_Not_Found; /* loop through all the B3SOIDD device models */ for (; model != NULL; model = model->B3SOIDDnextModel) { Temp = ckt->CKTtemp; if (model->B3SOIDDGatesidewallJctPotential < 0.1) model->B3SOIDDGatesidewallJctPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->B3SOIDDtnom; TRatio = Temp / Tnom; model->B3SOIDDvcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->B3SOIDDfactor1 = sqrt(EPSSI / EPSOX * model->B3SOIDDtox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); model->B3SOIDDeg0 = Eg0; model->B3SOIDDvtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); /* ni is in cm^-3 */ ni = 1.45e10 * (Temp / 300.15) * sqrt(Temp / 300.15) * exp(21.5565981 - Eg / (2.0 * model->B3SOIDDvtm)); /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->B3SOIDDinstances; here != NULL; here = here->B3SOIDDnextInstance) { here->B3SOIDDrbodyext = here->B3SOIDDbodySquares * model->B3SOIDDrbsh; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->B3SOIDDl == pSizeDependParamKnot->Length) && (here->B3SOIDDw == pSizeDependParamKnot->Width) && (here->B3SOIDDrth0 == pSizeDependParamKnot->Rth0) && (here->B3SOIDDcth0 == pSizeDependParamKnot->Cth0)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct b3soiddSizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->B3SOIDDl; Wdrn = here->B3SOIDDw; pParam->Length = Ldrn; pParam->Width = Wdrn; pParam->Rth0 = here->B3SOIDDrth0; pParam->Cth0 = here->B3SOIDDcth0; T0 = pow(Ldrn, model->B3SOIDDLln); T1 = pow(Wdrn, model->B3SOIDDLwn); tmp1 = model->B3SOIDDLl / T0 + model->B3SOIDDLw / T1 + model->B3SOIDDLwl / (T0 * T1); pParam->B3SOIDDdl = model->B3SOIDDLint + tmp1; pParam->B3SOIDDdlc = model->B3SOIDDdlc + tmp1; T2 = pow(Ldrn, model->B3SOIDDWln); T3 = pow(Wdrn, model->B3SOIDDWwn); tmp2 = model->B3SOIDDWl / T2 + model->B3SOIDDWw / T3 + model->B3SOIDDWwl / (T2 * T3); pParam->B3SOIDDdw = model->B3SOIDDWint + tmp2; pParam->B3SOIDDdwc = model->B3SOIDDdwc + tmp2; pParam->B3SOIDDleff = here->B3SOIDDl - 2.0 * pParam->B3SOIDDdl; if (pParam->B3SOIDDleff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIDDmodName; namarray[1] = here->B3SOIDDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIDD: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->B3SOIDDweff = here->B3SOIDDw - 2.0 * pParam->B3SOIDDdw; if (pParam->B3SOIDDweff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIDDmodName; namarray[1] = here->B3SOIDDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIDD: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->B3SOIDDleffCV = here->B3SOIDDl - 2.0 * pParam->B3SOIDDdlc; if (pParam->B3SOIDDleffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIDDmodName; namarray[1] = here->B3SOIDDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIDD: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->B3SOIDDweffCV = here->B3SOIDDw - 2.0 * pParam->B3SOIDDdwc; if (pParam->B3SOIDDweffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIDDmodName; namarray[1] = here->B3SOIDDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIDD: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } /* Not binned - START */ pParam->B3SOIDDat = model->B3SOIDDat; pParam->B3SOIDDgamma1 = model->B3SOIDDgamma1; pParam->B3SOIDDgamma2 = model->B3SOIDDgamma2; pParam->B3SOIDDvbx = model->B3SOIDDvbx; pParam->B3SOIDDvbm = model->B3SOIDDvbm; pParam->B3SOIDDxt = model->B3SOIDDxt; pParam->B3SOIDDkt1 = model->B3SOIDDkt1; pParam->B3SOIDDkt1l = model->B3SOIDDkt1l; pParam->B3SOIDDkt2 = model->B3SOIDDkt2; pParam->B3SOIDDua1 = model->B3SOIDDua1; pParam->B3SOIDDub1 = model->B3SOIDDub1; pParam->B3SOIDDuc1 = model->B3SOIDDuc1; pParam->B3SOIDDute = model->B3SOIDDute; pParam->B3SOIDDprt = model->B3SOIDDprt; /* Not binned - END */ /* CV model */ pParam->B3SOIDDcgsl = model->B3SOIDDcgsl; pParam->B3SOIDDcgdl = model->B3SOIDDcgdl; pParam->B3SOIDDckappa = model->B3SOIDDckappa; pParam->B3SOIDDcf = model->B3SOIDDcf; pParam->B3SOIDDclc = model->B3SOIDDclc; pParam->B3SOIDDcle = model->B3SOIDDcle; pParam->B3SOIDDabulkCVfactor = pow(1.0+(pParam->B3SOIDDclc / pParam->B3SOIDDleff), pParam->B3SOIDDcle); /* Added for binning - START */ if (model->B3SOIDDbinUnit == 1) { Inv_L = 1.0e-6 / pParam->B3SOIDDleff; Inv_W = 1.0e-6 / pParam->B3SOIDDweff; Inv_LW = 1.0e-12 / (pParam->B3SOIDDleff * pParam->B3SOIDDweff); } else { Inv_L = 1.0 / pParam->B3SOIDDleff; Inv_W = 1.0 / pParam->B3SOIDDweff; Inv_LW = 1.0 / (pParam->B3SOIDDleff * pParam->B3SOIDDweff); } pParam->B3SOIDDnpeak = model->B3SOIDDnpeak + model->B3SOIDDlnpeak * Inv_L + model->B3SOIDDwnpeak * Inv_W + model->B3SOIDDpnpeak * Inv_LW; pParam->B3SOIDDnsub = model->B3SOIDDnsub + model->B3SOIDDlnsub * Inv_L + model->B3SOIDDwnsub * Inv_W + model->B3SOIDDpnsub * Inv_LW; pParam->B3SOIDDngate = model->B3SOIDDngate + model->B3SOIDDlngate * Inv_L + model->B3SOIDDwngate * Inv_W + model->B3SOIDDpngate * Inv_LW; pParam->B3SOIDDvth0 = model->B3SOIDDvth0 + model->B3SOIDDlvth0 * Inv_L + model->B3SOIDDwvth0 * Inv_W + model->B3SOIDDpvth0 * Inv_LW; pParam->B3SOIDDk1 = model->B3SOIDDk1 + model->B3SOIDDlk1 * Inv_L + model->B3SOIDDwk1 * Inv_W + model->B3SOIDDpk1 * Inv_LW; pParam->B3SOIDDk2 = model->B3SOIDDk2 + model->B3SOIDDlk2 * Inv_L + model->B3SOIDDwk2 * Inv_W + model->B3SOIDDpk2 * Inv_LW; pParam->B3SOIDDk3 = model->B3SOIDDk3 + model->B3SOIDDlk3 * Inv_L + model->B3SOIDDwk3 * Inv_W + model->B3SOIDDpk3 * Inv_LW; pParam->B3SOIDDk3b = model->B3SOIDDk3b + model->B3SOIDDlk3b * Inv_L + model->B3SOIDDwk3b * Inv_W + model->B3SOIDDpk3b * Inv_LW; pParam->B3SOIDDvbsa = model->B3SOIDDvbsa + model->B3SOIDDlvbsa * Inv_L + model->B3SOIDDwvbsa * Inv_W + model->B3SOIDDpvbsa * Inv_LW; pParam->B3SOIDDdelp = model->B3SOIDDdelp + model->B3SOIDDldelp * Inv_L + model->B3SOIDDwdelp * Inv_W + model->B3SOIDDpdelp * Inv_LW; pParam->B3SOIDDkb1 = model->B3SOIDDkb1 + model->B3SOIDDlkb1 * Inv_L + model->B3SOIDDwkb1 * Inv_W + model->B3SOIDDpkb1 * Inv_LW; pParam->B3SOIDDkb3 = model->B3SOIDDkb3 + model->B3SOIDDlkb3 * Inv_L + model->B3SOIDDwkb3 * Inv_W + model->B3SOIDDpkb3 * Inv_LW; pParam->B3SOIDDdvbd0 = model->B3SOIDDdvbd0 + model->B3SOIDDldvbd0 * Inv_L + model->B3SOIDDwdvbd0 * Inv_W + model->B3SOIDDpdvbd0 * Inv_LW; pParam->B3SOIDDdvbd1 = model->B3SOIDDdvbd1 + model->B3SOIDDldvbd1 * Inv_L + model->B3SOIDDwdvbd1 * Inv_W + model->B3SOIDDpdvbd1 * Inv_LW; pParam->B3SOIDDw0 = model->B3SOIDDw0 + model->B3SOIDDlw0 * Inv_L + model->B3SOIDDww0 * Inv_W + model->B3SOIDDpw0 * Inv_LW; pParam->B3SOIDDnlx = model->B3SOIDDnlx + model->B3SOIDDlnlx * Inv_L + model->B3SOIDDwnlx * Inv_W + model->B3SOIDDpnlx * Inv_LW; pParam->B3SOIDDdvt0 = model->B3SOIDDdvt0 + model->B3SOIDDldvt0 * Inv_L + model->B3SOIDDwdvt0 * Inv_W + model->B3SOIDDpdvt0 * Inv_LW; pParam->B3SOIDDdvt1 = model->B3SOIDDdvt1 + model->B3SOIDDldvt1 * Inv_L + model->B3SOIDDwdvt1 * Inv_W + model->B3SOIDDpdvt1 * Inv_LW; pParam->B3SOIDDdvt2 = model->B3SOIDDdvt2 + model->B3SOIDDldvt2 * Inv_L + model->B3SOIDDwdvt2 * Inv_W + model->B3SOIDDpdvt2 * Inv_LW; pParam->B3SOIDDdvt0w = model->B3SOIDDdvt0w + model->B3SOIDDldvt0w * Inv_L + model->B3SOIDDwdvt0w * Inv_W + model->B3SOIDDpdvt0w * Inv_LW; pParam->B3SOIDDdvt1w = model->B3SOIDDdvt1w + model->B3SOIDDldvt1w * Inv_L + model->B3SOIDDwdvt1w * Inv_W + model->B3SOIDDpdvt1w * Inv_LW; pParam->B3SOIDDdvt2w = model->B3SOIDDdvt2w + model->B3SOIDDldvt2w * Inv_L + model->B3SOIDDwdvt2w * Inv_W + model->B3SOIDDpdvt2w * Inv_LW; pParam->B3SOIDDu0 = model->B3SOIDDu0 + model->B3SOIDDlu0 * Inv_L + model->B3SOIDDwu0 * Inv_W + model->B3SOIDDpu0 * Inv_LW; pParam->B3SOIDDua = model->B3SOIDDua + model->B3SOIDDlua * Inv_L + model->B3SOIDDwua * Inv_W + model->B3SOIDDpua * Inv_LW; pParam->B3SOIDDub = model->B3SOIDDub + model->B3SOIDDlub * Inv_L + model->B3SOIDDwub * Inv_W + model->B3SOIDDpub * Inv_LW; pParam->B3SOIDDuc = model->B3SOIDDuc + model->B3SOIDDluc * Inv_L + model->B3SOIDDwuc * Inv_W + model->B3SOIDDpuc * Inv_LW; pParam->B3SOIDDvsat = model->B3SOIDDvsat + model->B3SOIDDlvsat * Inv_L + model->B3SOIDDwvsat * Inv_W + model->B3SOIDDpvsat * Inv_LW; pParam->B3SOIDDa0 = model->B3SOIDDa0 + model->B3SOIDDla0 * Inv_L + model->B3SOIDDwa0 * Inv_W + model->B3SOIDDpa0 * Inv_LW; pParam->B3SOIDDags = model->B3SOIDDags + model->B3SOIDDlags * Inv_L + model->B3SOIDDwags * Inv_W + model->B3SOIDDpags * Inv_LW; pParam->B3SOIDDb0 = model->B3SOIDDb0 + model->B3SOIDDlb0 * Inv_L + model->B3SOIDDwb0 * Inv_W + model->B3SOIDDpb0 * Inv_LW; pParam->B3SOIDDb1 = model->B3SOIDDb1 + model->B3SOIDDlb1 * Inv_L + model->B3SOIDDwb1 * Inv_W + model->B3SOIDDpb1 * Inv_LW; pParam->B3SOIDDketa = model->B3SOIDDketa + model->B3SOIDDlketa * Inv_L + model->B3SOIDDwketa * Inv_W + model->B3SOIDDpketa * Inv_LW; pParam->B3SOIDDabp = model->B3SOIDDabp + model->B3SOIDDlabp * Inv_L + model->B3SOIDDwabp * Inv_W + model->B3SOIDDpabp * Inv_LW; pParam->B3SOIDDmxc = model->B3SOIDDmxc + model->B3SOIDDlmxc * Inv_L + model->B3SOIDDwmxc * Inv_W + model->B3SOIDDpmxc * Inv_LW; pParam->B3SOIDDadice0 = model->B3SOIDDadice0 + model->B3SOIDDladice0 * Inv_L + model->B3SOIDDwadice0 * Inv_W + model->B3SOIDDpadice0 * Inv_LW; pParam->B3SOIDDa1 = model->B3SOIDDa1 + model->B3SOIDDla1 * Inv_L + model->B3SOIDDwa1 * Inv_W + model->B3SOIDDpa1 * Inv_LW; pParam->B3SOIDDa2 = model->B3SOIDDa2 + model->B3SOIDDla2 * Inv_L + model->B3SOIDDwa2 * Inv_W + model->B3SOIDDpa2 * Inv_LW; pParam->B3SOIDDrdsw = model->B3SOIDDrdsw + model->B3SOIDDlrdsw * Inv_L + model->B3SOIDDwrdsw * Inv_W + model->B3SOIDDprdsw * Inv_LW; pParam->B3SOIDDprwb = model->B3SOIDDprwb + model->B3SOIDDlprwb * Inv_L + model->B3SOIDDwprwb * Inv_W + model->B3SOIDDpprwb * Inv_LW; pParam->B3SOIDDprwg = model->B3SOIDDprwg + model->B3SOIDDlprwg * Inv_L + model->B3SOIDDwprwg * Inv_W + model->B3SOIDDpprwg * Inv_LW; pParam->B3SOIDDwr = model->B3SOIDDwr + model->B3SOIDDlwr * Inv_L + model->B3SOIDDwwr * Inv_W + model->B3SOIDDpwr * Inv_LW; pParam->B3SOIDDnfactor = model->B3SOIDDnfactor + model->B3SOIDDlnfactor * Inv_L + model->B3SOIDDwnfactor * Inv_W + model->B3SOIDDpnfactor * Inv_LW; pParam->B3SOIDDdwg = model->B3SOIDDdwg + model->B3SOIDDldwg * Inv_L + model->B3SOIDDwdwg * Inv_W + model->B3SOIDDpdwg * Inv_LW; pParam->B3SOIDDdwb = model->B3SOIDDdwb + model->B3SOIDDldwb * Inv_L + model->B3SOIDDwdwb * Inv_W + model->B3SOIDDpdwb * Inv_LW; pParam->B3SOIDDvoff = model->B3SOIDDvoff + model->B3SOIDDlvoff * Inv_L + model->B3SOIDDwvoff * Inv_W + model->B3SOIDDpvoff * Inv_LW; pParam->B3SOIDDeta0 = model->B3SOIDDeta0 + model->B3SOIDDleta0 * Inv_L + model->B3SOIDDweta0 * Inv_W + model->B3SOIDDpeta0 * Inv_LW; pParam->B3SOIDDetab = model->B3SOIDDetab + model->B3SOIDDletab * Inv_L + model->B3SOIDDwetab * Inv_W + model->B3SOIDDpetab * Inv_LW; pParam->B3SOIDDdsub = model->B3SOIDDdsub + model->B3SOIDDldsub * Inv_L + model->B3SOIDDwdsub * Inv_W + model->B3SOIDDpdsub * Inv_LW; pParam->B3SOIDDcit = model->B3SOIDDcit + model->B3SOIDDlcit * Inv_L + model->B3SOIDDwcit * Inv_W + model->B3SOIDDpcit * Inv_LW; pParam->B3SOIDDcdsc = model->B3SOIDDcdsc + model->B3SOIDDlcdsc * Inv_L + model->B3SOIDDwcdsc * Inv_W + model->B3SOIDDpcdsc * Inv_LW; pParam->B3SOIDDcdscb = model->B3SOIDDcdscb + model->B3SOIDDlcdscb * Inv_L + model->B3SOIDDwcdscb * Inv_W + model->B3SOIDDpcdscb * Inv_LW; pParam->B3SOIDDcdscd = model->B3SOIDDcdscd + model->B3SOIDDlcdscd * Inv_L + model->B3SOIDDwcdscd * Inv_W + model->B3SOIDDpcdscd * Inv_LW; pParam->B3SOIDDpclm = model->B3SOIDDpclm + model->B3SOIDDlpclm * Inv_L + model->B3SOIDDwpclm * Inv_W + model->B3SOIDDppclm * Inv_LW; pParam->B3SOIDDpdibl1 = model->B3SOIDDpdibl1 + model->B3SOIDDlpdibl1 * Inv_L + model->B3SOIDDwpdibl1 * Inv_W + model->B3SOIDDppdibl1 * Inv_LW; pParam->B3SOIDDpdibl2 = model->B3SOIDDpdibl2 + model->B3SOIDDlpdibl2 * Inv_L + model->B3SOIDDwpdibl2 * Inv_W + model->B3SOIDDppdibl2 * Inv_LW; pParam->B3SOIDDpdiblb = model->B3SOIDDpdiblb + model->B3SOIDDlpdiblb * Inv_L + model->B3SOIDDwpdiblb * Inv_W + model->B3SOIDDppdiblb * Inv_LW; pParam->B3SOIDDdrout = model->B3SOIDDdrout + model->B3SOIDDldrout * Inv_L + model->B3SOIDDwdrout * Inv_W + model->B3SOIDDpdrout * Inv_LW; pParam->B3SOIDDpvag = model->B3SOIDDpvag + model->B3SOIDDlpvag * Inv_L + model->B3SOIDDwpvag * Inv_W + model->B3SOIDDppvag * Inv_LW; pParam->B3SOIDDdelta = model->B3SOIDDdelta + model->B3SOIDDldelta * Inv_L + model->B3SOIDDwdelta * Inv_W + model->B3SOIDDpdelta * Inv_LW; pParam->B3SOIDDaii = model->B3SOIDDaii + model->B3SOIDDlaii * Inv_L + model->B3SOIDDwaii * Inv_W + model->B3SOIDDpaii * Inv_LW; pParam->B3SOIDDbii = model->B3SOIDDbii + model->B3SOIDDlbii * Inv_L + model->B3SOIDDwbii * Inv_W + model->B3SOIDDpbii * Inv_LW; pParam->B3SOIDDcii = model->B3SOIDDcii + model->B3SOIDDlcii * Inv_L + model->B3SOIDDwcii * Inv_W + model->B3SOIDDpcii * Inv_LW; pParam->B3SOIDDdii = model->B3SOIDDdii + model->B3SOIDDldii * Inv_L + model->B3SOIDDwdii * Inv_W + model->B3SOIDDpdii * Inv_LW; pParam->B3SOIDDalpha0 = model->B3SOIDDalpha0 + model->B3SOIDDlalpha0 * Inv_L + model->B3SOIDDwalpha0 * Inv_W + model->B3SOIDDpalpha0 * Inv_LW; pParam->B3SOIDDalpha1 = model->B3SOIDDalpha1 + model->B3SOIDDlalpha1 * Inv_L + model->B3SOIDDwalpha1 * Inv_W + model->B3SOIDDpalpha1 * Inv_LW; pParam->B3SOIDDbeta0 = model->B3SOIDDbeta0 + model->B3SOIDDlbeta0 * Inv_L + model->B3SOIDDwbeta0 * Inv_W + model->B3SOIDDpbeta0 * Inv_LW; pParam->B3SOIDDagidl = model->B3SOIDDagidl + model->B3SOIDDlagidl * Inv_L + model->B3SOIDDwagidl * Inv_W + model->B3SOIDDpagidl * Inv_LW; pParam->B3SOIDDbgidl = model->B3SOIDDbgidl + model->B3SOIDDlbgidl * Inv_L + model->B3SOIDDwbgidl * Inv_W + model->B3SOIDDpbgidl * Inv_LW; pParam->B3SOIDDngidl = model->B3SOIDDngidl + model->B3SOIDDlngidl * Inv_L + model->B3SOIDDwngidl * Inv_W + model->B3SOIDDpngidl * Inv_LW; pParam->B3SOIDDntun = model->B3SOIDDntun + model->B3SOIDDlntun * Inv_L + model->B3SOIDDwntun * Inv_W + model->B3SOIDDpntun * Inv_LW; pParam->B3SOIDDndiode = model->B3SOIDDndiode + model->B3SOIDDlndiode * Inv_L + model->B3SOIDDwndiode * Inv_W + model->B3SOIDDpndiode * Inv_LW; pParam->B3SOIDDisbjt = model->B3SOIDDisbjt + model->B3SOIDDlisbjt * Inv_L + model->B3SOIDDwisbjt * Inv_W + model->B3SOIDDpisbjt * Inv_LW; pParam->B3SOIDDisdif = model->B3SOIDDisdif + model->B3SOIDDlisdif * Inv_L + model->B3SOIDDwisdif * Inv_W + model->B3SOIDDpisdif * Inv_LW; pParam->B3SOIDDisrec = model->B3SOIDDisrec + model->B3SOIDDlisrec * Inv_L + model->B3SOIDDwisrec * Inv_W + model->B3SOIDDpisrec * Inv_LW; pParam->B3SOIDDistun = model->B3SOIDDistun + model->B3SOIDDlistun * Inv_L + model->B3SOIDDwistun * Inv_W + model->B3SOIDDpistun * Inv_LW; pParam->B3SOIDDedl = model->B3SOIDDedl + model->B3SOIDDledl * Inv_L + model->B3SOIDDwedl * Inv_W + model->B3SOIDDpedl * Inv_LW; pParam->B3SOIDDkbjt1 = model->B3SOIDDkbjt1 + model->B3SOIDDlkbjt1 * Inv_L + model->B3SOIDDwkbjt1 * Inv_W + model->B3SOIDDpkbjt1 * Inv_LW; /* CV model */ pParam->B3SOIDDvsdfb = model->B3SOIDDvsdfb + model->B3SOIDDlvsdfb * Inv_L + model->B3SOIDDwvsdfb * Inv_W + model->B3SOIDDpvsdfb * Inv_LW; pParam->B3SOIDDvsdth = model->B3SOIDDvsdth + model->B3SOIDDlvsdth * Inv_L + model->B3SOIDDwvsdth * Inv_W + model->B3SOIDDpvsdth * Inv_LW; /* Added for binning - END */ T0 = (TRatio - 1.0); pParam->B3SOIDDuatemp = pParam->B3SOIDDua; /* save ua, ub, and uc for b3soiddld.c */ pParam->B3SOIDDubtemp = pParam->B3SOIDDub; pParam->B3SOIDDuctemp = pParam->B3SOIDDuc; pParam->B3SOIDDrds0denom = pow(pParam->B3SOIDDweff * 1E6, pParam->B3SOIDDwr); pParam->B3SOIDDrth = here->B3SOIDDrth0 * sqrt(model->B3SOIDDtbox / model->B3SOIDDtsi) / pParam->B3SOIDDweff; pParam->B3SOIDDcth = here->B3SOIDDcth0 * model->B3SOIDDtsi; pParam->B3SOIDDrbody = model->B3SOIDDrbody * pParam->B3SOIDDweff / pParam->B3SOIDDleff; pParam->B3SOIDDua = pParam->B3SOIDDua + pParam->B3SOIDDua1 * T0; pParam->B3SOIDDub = pParam->B3SOIDDub + pParam->B3SOIDDub1 * T0; pParam->B3SOIDDuc = pParam->B3SOIDDuc + pParam->B3SOIDDuc1 * T0; if (pParam->B3SOIDDu0 > 1.0) pParam->B3SOIDDu0 = pParam->B3SOIDDu0 / 1.0e4; pParam->B3SOIDDu0temp = pParam->B3SOIDDu0 * pow(TRatio, pParam->B3SOIDDute); pParam->B3SOIDDvsattemp = pParam->B3SOIDDvsat - pParam->B3SOIDDat * T0; pParam->B3SOIDDrds0 = (pParam->B3SOIDDrdsw + pParam->B3SOIDDprt * T0) / pow(pParam->B3SOIDDweff * 1E6, pParam->B3SOIDDwr); if (B3SOIDDcheckModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->B3SOIDDmodName; namarray[1] = here->B3SOIDDname; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during B3SOIDDV3 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->B3SOIDDcgdo = (model->B3SOIDDcgdo + pParam->B3SOIDDcf) * pParam->B3SOIDDweffCV; pParam->B3SOIDDcgso = (model->B3SOIDDcgso + pParam->B3SOIDDcf) * pParam->B3SOIDDweffCV; pParam->B3SOIDDcgeo = model->B3SOIDDcgeo * pParam->B3SOIDDleffCV; if (!model->B3SOIDDnpeakGiven && model->B3SOIDDgamma1Given) { T0 = pParam->B3SOIDDgamma1 * model->B3SOIDDcox; pParam->B3SOIDDnpeak = 3.021E22 * T0 * T0; } T0 = pow(TRatio, model->B3SOIDDxbjt / pParam->B3SOIDDndiode); T1 = pow(TRatio, model->B3SOIDDxdif / pParam->B3SOIDDndiode); T2 = pow(TRatio, model->B3SOIDDxrec / pParam->B3SOIDDndiode / 2); T4 = -Eg0 / pParam->B3SOIDDndiode / model->B3SOIDDvtm * (1 - TRatio); T5 = exp(T4); T6 = sqrt(T5); pParam->B3SOIDDjbjt = pParam->B3SOIDDisbjt * T0 * T5; pParam->B3SOIDDjdif = pParam->B3SOIDDisdif * T1 * T5; pParam->B3SOIDDjrec = pParam->B3SOIDDisrec * T2 * T6; T0 = pow(TRatio, model->B3SOIDDxtun / pParam->B3SOIDDntun); pParam->B3SOIDDjtun = pParam->B3SOIDDistun * T0 ; if (pParam->B3SOIDDnsub > 0) pParam->B3SOIDDvfbb = -model->B3SOIDDtype * model->B3SOIDDvtm * log(pParam->B3SOIDDnpeak/ pParam->B3SOIDDnsub); else pParam->B3SOIDDvfbb = -model->B3SOIDDtype * model->B3SOIDDvtm * log(-pParam->B3SOIDDnpeak* pParam->B3SOIDDnsub/ni/ni); if (!model->B3SOIDDvsdfbGiven) { if (pParam->B3SOIDDnsub > 0) pParam->B3SOIDDvsdfb = -model->B3SOIDDtype * (model->B3SOIDDvtm*log(1e20 * pParam->B3SOIDDnsub / ni /ni) - 0.3); else if (pParam->B3SOIDDnsub < 0) pParam->B3SOIDDvsdfb = -model->B3SOIDDtype * (model->B3SOIDDvtm*log(-1e20 / pParam->B3SOIDDnsub) + 0.3); } /* Phi & Gamma */ SDphi = 2.0*model->B3SOIDDvtm*log(fabs(pParam->B3SOIDDnsub) / ni); SDgamma = 5.753e-12 * sqrt(fabs(pParam->B3SOIDDnsub)) / model->B3SOIDDcbox; if (!model->B3SOIDDvsdthGiven) { if ( ((pParam->B3SOIDDnsub > 0) && (model->B3SOIDDtype > 0)) || ((pParam->B3SOIDDnsub < 0) && (model->B3SOIDDtype < 0)) ) pParam->B3SOIDDvsdth = pParam->B3SOIDDvsdfb + SDphi + SDgamma * sqrt(SDphi); else pParam->B3SOIDDvsdth = pParam->B3SOIDDvsdfb - SDphi - SDgamma * sqrt(SDphi); } if (!model->B3SOIDDcsdminGiven) { /* Cdmin */ tmp = sqrt(2.0 * EPSSI * SDphi / (Charge_q * fabs(pParam->B3SOIDDnsub) * 1.0e6)); tmp1 = EPSSI / tmp; model->B3SOIDDcsdmin = tmp1 * model->B3SOIDDcbox / (tmp1 + model->B3SOIDDcbox); } T0 = model->B3SOIDDcsdesw * log(1 + model->B3SOIDDtsi / model->B3SOIDDtbox); T1 = here->B3SOIDDsourcePerimeter - pParam->B3SOIDDweff; if (T1 > 0.0) pParam->B3SOIDDcsesw = T0 * T1; else pParam->B3SOIDDcsesw = 0.0; T1 = here->B3SOIDDdrainPerimeter - pParam->B3SOIDDweff; if (T1 > 0.0) pParam->B3SOIDDcdesw = T0 * T1; else pParam->B3SOIDDcdesw = 0.0; pParam->B3SOIDDphi = 2.0 * model->B3SOIDDvtm * log(pParam->B3SOIDDnpeak / ni); pParam->B3SOIDDsqrtPhi = sqrt(pParam->B3SOIDDphi); pParam->B3SOIDDphis3 = pParam->B3SOIDDsqrtPhi * pParam->B3SOIDDphi; pParam->B3SOIDDXdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIDDnpeak * 1.0e6)) * pParam->B3SOIDDsqrtPhi; pParam->B3SOIDDsqrtXdep0 = sqrt(pParam->B3SOIDDXdep0); pParam->B3SOIDDlitl = sqrt(3.0 * model->B3SOIDDxj * model->B3SOIDDtox); pParam->B3SOIDDvbi = model->B3SOIDDvtm * log(1.0e20 * pParam->B3SOIDDnpeak / (ni * ni)); pParam->B3SOIDDcdep0 = sqrt(Charge_q * EPSSI * pParam->B3SOIDDnpeak * 1.0e6 / 2.0 / pParam->B3SOIDDphi); if (model->B3SOIDDk1Given || model->B3SOIDDk2Given) { if (!model->B3SOIDDk1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->B3SOIDDk1 = 0.53; } if (!model->B3SOIDDk2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->B3SOIDDk2 = -0.0186; } if (model->B3SOIDDxtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->B3SOIDDvbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->B3SOIDDvbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->B3SOIDDgamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->B3SOIDDgamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->B3SOIDDvbxGiven) pParam->B3SOIDDvbx = pParam->B3SOIDDphi - 7.7348e-4 * pParam->B3SOIDDnpeak * pParam->B3SOIDDxt * pParam->B3SOIDDxt; if (pParam->B3SOIDDvbx > 0.0) pParam->B3SOIDDvbx = -pParam->B3SOIDDvbx; if (pParam->B3SOIDDvbm > 0.0) pParam->B3SOIDDvbm = -pParam->B3SOIDDvbm; if (!model->B3SOIDDgamma1Given) pParam->B3SOIDDgamma1 = 5.753e-12 * sqrt(pParam->B3SOIDDnpeak) / model->B3SOIDDcox; if (!model->B3SOIDDgamma2Given) pParam->B3SOIDDgamma2 = 5.753e-12 * sqrt(pParam->B3SOIDDnsub) / model->B3SOIDDcox; T0 = pParam->B3SOIDDgamma1 - pParam->B3SOIDDgamma2; T1 = sqrt(pParam->B3SOIDDphi - pParam->B3SOIDDvbx) - pParam->B3SOIDDsqrtPhi; T2 = sqrt(pParam->B3SOIDDphi * (pParam->B3SOIDDphi - pParam->B3SOIDDvbm)) - pParam->B3SOIDDphi; pParam->B3SOIDDk2 = T0 * T1 / (2.0 * T2 + pParam->B3SOIDDvbm); pParam->B3SOIDDk1 = pParam->B3SOIDDgamma2 - 2.0 * pParam->B3SOIDDk2 * sqrt(pParam->B3SOIDDphi - pParam->B3SOIDDvbm); } if (pParam->B3SOIDDk2 < 0.0) { T0 = 0.5 * pParam->B3SOIDDk1 / pParam->B3SOIDDk2; pParam->B3SOIDDvbsc = 0.9 * (pParam->B3SOIDDphi - T0 * T0); if (pParam->B3SOIDDvbsc > -3.0) pParam->B3SOIDDvbsc = -3.0; else if (pParam->B3SOIDDvbsc < -30.0) pParam->B3SOIDDvbsc = -30.0; } else { pParam->B3SOIDDvbsc = -30.0; } if (pParam->B3SOIDDvbsc > pParam->B3SOIDDvbm) pParam->B3SOIDDvbsc = pParam->B3SOIDDvbm; if (model->B3SOIDDvth0Given) { pParam->B3SOIDDvfb = model->B3SOIDDtype * pParam->B3SOIDDvth0 - pParam->B3SOIDDphi - pParam->B3SOIDDk1 * pParam->B3SOIDDsqrtPhi; } else { pParam->B3SOIDDvfb = -1.0; pParam->B3SOIDDvth0 = model->B3SOIDDtype * (pParam->B3SOIDDvfb + pParam->B3SOIDDphi + pParam->B3SOIDDk1 * pParam->B3SOIDDsqrtPhi); } T1 = sqrt(EPSSI / EPSOX * model->B3SOIDDtox * pParam->B3SOIDDXdep0); T0 = exp(-0.5 * pParam->B3SOIDDdsub * pParam->B3SOIDDleff / T1); pParam->B3SOIDDtheta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->B3SOIDDdrout * pParam->B3SOIDDleff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->B3SOIDDthetaRout = pParam->B3SOIDDpdibl1 * T2 + pParam->B3SOIDDpdibl2; here->B3SOIDDminIsub = 5.0e-2 * pParam->B3SOIDDweff * model->B3SOIDDtsi * MAX(pParam->B3SOIDDisdif, pParam->B3SOIDDisrec); } here->B3SOIDDcsbox = model->B3SOIDDcbox*here->B3SOIDDsourceArea; here->B3SOIDDcsmin = model->B3SOIDDcsdmin*here->B3SOIDDsourceArea; here->B3SOIDDcdbox = model->B3SOIDDcbox*here->B3SOIDDdrainArea; here->B3SOIDDcdmin = model->B3SOIDDcsdmin*here->B3SOIDDdrainArea; if ( ((pParam->B3SOIDDnsub > 0) && (model->B3SOIDDtype > 0)) || ((pParam->B3SOIDDnsub < 0) && (model->B3SOIDDtype < 0)) ) { T0 = pParam->B3SOIDDvsdth - pParam->B3SOIDDvsdfb; pParam->B3SOIDDsdt1 = pParam->B3SOIDDvsdfb + model->B3SOIDDasd * T0; T1 = here->B3SOIDDcsbox - here->B3SOIDDcsmin; T2 = T1 / T0 / T0; pParam->B3SOIDDst2 = T2 / model->B3SOIDDasd; pParam->B3SOIDDst3 = T2 /( 1 - model->B3SOIDDasd); here->B3SOIDDst4 = T0 * T1 * (1 + model->B3SOIDDasd) / 3 - here->B3SOIDDcsmin * pParam->B3SOIDDvsdfb; T1 = here->B3SOIDDcdbox - here->B3SOIDDcdmin; T2 = T1 / T0 / T0; pParam->B3SOIDDdt2 = T2 / model->B3SOIDDasd; pParam->B3SOIDDdt3 = T2 /( 1 - model->B3SOIDDasd); here->B3SOIDDdt4 = T0 * T1 * (1 + model->B3SOIDDasd) / 3 - here->B3SOIDDcdmin * pParam->B3SOIDDvsdfb; } else { T0 = pParam->B3SOIDDvsdfb - pParam->B3SOIDDvsdth; pParam->B3SOIDDsdt1 = pParam->B3SOIDDvsdth + model->B3SOIDDasd * T0; T1 = here->B3SOIDDcsmin - here->B3SOIDDcsbox; T2 = T1 / T0 / T0; pParam->B3SOIDDst2 = T2 / model->B3SOIDDasd; pParam->B3SOIDDst3 = T2 /( 1 - model->B3SOIDDasd); here->B3SOIDDst4 = T0 * T1 * (1 + model->B3SOIDDasd) / 3 - here->B3SOIDDcsbox * pParam->B3SOIDDvsdth; T1 = here->B3SOIDDcdmin - here->B3SOIDDcdbox; T2 = T1 / T0 / T0; pParam->B3SOIDDdt2 = T2 / model->B3SOIDDasd; pParam->B3SOIDDdt3 = T2 /( 1 - model->B3SOIDDasd); here->B3SOIDDdt4 = T0 * T1 * (1 + model->B3SOIDDasd) / 3 - here->B3SOIDDcdbox * pParam->B3SOIDDvsdth; } here->B3SOIDDphi = pParam->B3SOIDDphi; /* process source/drain series resistance */ here->B3SOIDDdrainConductance = model->B3SOIDDsheetResistance * here->B3SOIDDdrainSquares; if (here->B3SOIDDdrainConductance > 0.0) here->B3SOIDDdrainConductance = 1.0 / here->B3SOIDDdrainConductance; else here->B3SOIDDdrainConductance = 0.0; here->B3SOIDDsourceConductance = model->B3SOIDDsheetResistance * here->B3SOIDDsourceSquares; if (here->B3SOIDDsourceConductance > 0.0) here->B3SOIDDsourceConductance = 1.0 / here->B3SOIDDsourceConductance; else here->B3SOIDDsourceConductance = 0.0; here->B3SOIDDcgso = pParam->B3SOIDDcgso; here->B3SOIDDcgdo = pParam->B3SOIDDcgdo; } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddld.c0000644000265600020320000053172212264261473022460 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Pin Su, Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 File: b3soiddld.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* controlled_exit() */ #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define KboQ 8.617087e-5 /* Kb / q */ #define Eg300 1.115 /* energy gap at 300K */ #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define DELT_Vbs0eff 0.02 #define DELT_Vbsmos 0.005 #define DELT_Vbseff 0.005 #define DELT_Xcsat 0.2 #define DELT_Vbs0dio 1e-7 #define DELTA_VFB 0.02 #define DELTA_Vcscv 0.0004 #define DELT_Vbsdio 0.01 #define CONST_2OV3 0.6666666666 #define OFF_Vbsdio 2e-2 #define OFF_Vbs0_dio 2.02e-2 #define QEX_FACT 20 /* B3SOIDDSmartVbs(Vbs, Old, here, check) * Smart Vbs guess. */ static double B3SOIDDSmartVbs(double New, double Old, B3SOIDDinstance *here, CKTcircuit *ckt, int *check) { NG_IGNORE(Old); NG_IGNORE(check); /* only do it for floating body and DC */ if (here->B3SOIDDfloat && (ckt->CKTmode & (MODEDC | MODEDCOP))) { /* Vbs cannot be negative in DC */ if (New < 0.0) New = 0.0; } return(New); } /* B3SOIDDlimit(vnew,vold) * limits the per-iteration change of any absolute voltage value */ static double B3SOIDDlimit(double vnew, double vold, double limit, int *check) { double T0, T1; if (isnan (vnew) || isnan (vold)) { fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n"); fprintf(stderr, "New prediction returns to 0.0!\n"); vnew = 0.0; *check = 1; } T0 = vnew - vold; T1 = fabs(T0); if (T1 > limit) { if (T0 > 0.0) vnew = vold + limit; else vnew = vold - limit; *check = 1; } return vnew; } int B3SOIDDload(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; int selfheat; double Gmin; double ag0, qgd, qgs, von, cbhat, VgstNVt, ExpVgst = 0.0; double cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double arg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVd, dVfbeff_dVb, V3, V4; double PhiBSWG, MJSWG; double gcgdb, gcggb, gcgsb, gcgeb, gcgT; double gcsdb, gcsgb, gcssb, gcseb, gcsT; double gcddb, gcdgb, gcdsb, gcdeb, gcdT; double gcbdb, gcbgb, gcbsb, gcbeb, gcbT; double gcedb, gcegb, gcesb, gceeb, gceT; double gcTt, gTtg, gTtb, gTte, gTtdp, gTtt, gTtsp; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vg, vd, vs, vp, ve, vb; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd, dVfb_dT; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth = 0.0; double dVth_dVb, dVth_dVd, dVth_dT; double Vgst, dVgs_eff_dVg; double n, dn_dVb, Vtm; double ExpArg, V0; double ueff = 0.0, dueff_dVg, dueff_dVd, dueff_dVb, dueff_dT; double Esat, Vdsat = 0.0; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb, dEsatL_dT; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, dVdsat_dT, Vasat; double dVasat_dVg, dVasat_dVb, dVasat_dVd, dVasat_dT; double Va, dVa_dVd, dVa_dVg, dVa_dVb, dVa_dT; double Vbseff, dVbseff_dVb; double One_Third_CoxWL, Two_Third_CoxWL, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb, dT0_dVc, dT0_dVe, dT0_dT; double T1, dT1_dVg, dT1_dVd, dT1_dVb, dT1_dVc, dT1_dVe, dT1_dT; double T2, dT2_dVg, dT2_dVd, dT2_dVb, dT2_dVc, dT2_dVe, dT2_dT; double T3, dT3_dVg, dT3_dVd, dT3_dVb, dT3_dVc, dT3_dVe, dT3_dT; double T4, dT4_dVg, dT4_dVd, dT4_dVb, dT4_dVc, dT4_dVe, dT4_dT; double T5, dT5_dVg, dT5_dVd, dT5_dVb, dT5_dVc, dT5_dVe, dT5_dT; double T6, dT6_dVg, dT6_dVd, dT6_dVb, dT6_dVc, dT6_dVe, dT6_dT; double T7; double T8; double T9; double T10; double T11, T12; double Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb, dVACLM_dT; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb, dVADIBL_dT; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb; double Delt_vth, dDelt_vth_dVb, dDelt_vth_dT; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double a1; double Vgsteff = 0.0, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double dVgsteff_dVe, dVgsteff_dT; double Vdseff = 0.0, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb, dVdseff_dT; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds; double dAbulk_dVg, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb, dbeta_dT; double gche, dgche_dVg, dgche_dVd, dgche_dVb, dgche_dT; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb, dfgche1_dT; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb, dfgche2_dT; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb, dIdl_dT; double Ids = 0.0, Gm, Gds = 0.0, Gmb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, dRds_dT, WVCox, WVCoxRds; double Vgst2Vtm, dVgst2Vtm_dT, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double dxpart, sxpart; struct b3soiddSizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded = 0, error; double gbbsp, gbbdp, gbbg, gbbb, gbbe, gbbp, gbbT; double gddpsp, gddpdp, gddpg, gddpb, gddpe, gddpT; double gsspsp, gsspdp, gsspg, gsspb, gsspe, gsspT; double Gbpbs, Gbpgs, Gbpds, Gbpes, Gbpps, GbpT; double ves, ved, veb, vge = 0.0, delves, vedo, delved; double vps, vpd, Vps, delvps; double Vbd, Ves, Vesfb, sqrtXdep, DeltVthtemp, dDeltVthtemp_dT; double Vbp, dVbp_dVp, dVbp_dVb, dVbp_dVg, dVbp_dVd, dVbp_dVe, dVbp_dT; double Vpsdio, dVpsdio_dVg, dVpsdio_dVd, dVpsdio_dVe, dVpsdio_dVp, dVpsdio_dT; double DeltVthw, dDeltVthw_dVb, dDeltVthw_dT; double dVbseff_dVd, dVbseff_dVe, dVbseff_dT; double dVdsat_dVc, dVasat_dVc, dVACLM_dVc, dVADIBL_dVc, dVa_dVc; double dfgche1_dVc, dfgche2_dVc, dgche_dVc, dVdseff_dVc, dIdl_dVc; double Gm0, Gds0, Gmb0, GmT0, Gmc, Gme, GmT, dVbseff_dVg; double dDIBL_Sft_dVb, BjtA, dBjtA_dVd; double diffVdsii ; double Idgidl = 0.0, Gdgidld, Gdgidlg, Isgidl = 0.0, Gsgidlg; double Gjsd, Gjsb, GjsT, Gjdd, Gjdb, GjdT; double Ibp = 0.0, Iii = 0.0, Giid, Giig, Giib, Giie, GiiT, Gcd, Gcb, GcT; double ceqbody, ceqbodcon = 0.0; double gppg = 0.0, gppdp = 0.0, gppb = 0.0, gppe = 0.0, gppp = 0.0; double gppsp = 0.0, gppT; double delTemp, deldelTemp, Temp; double ceqth, ceqqth; double K1; double qjs = 0.0, gcjsbs, gcjsT; double qjd = 0.0, gcjdbs, gcjdds, gcjdT; double qge; double ceqqe; double ni, Eg, Cbox, Nfb, CboxWL; double cjsbs; double Qbf0, Qsicv, dVfbeff_dVrg, Cbe = 0.0; double qinv = 0.0, qgate = 0.0, qbody = 0.0, qdrn = 0.0, qsrc, qsub = 0.0; double cqgate, cqbody = 0.0, cqdrn = 0.0, cqsub, cqtemp; double Cgg, Cgd, Cgb, Cge; double Csg, Csd, Csb, Cse, Cbg = 0.0, Cbd = 0.0, Cbb = 0.0; double Cgg1, Cgb1, Cgd1, Csg1, Csd1, Csb1; double Vbs0t = 0.0, dVbs0t_dT ; double Vbs0 = 0.0 ,dVbs0_dVe, dVbs0_dT; double Vbs0eff = 0.0 ,dVbs0eff_dVg ,dVbs0eff_dVd ,dVbs0eff_dVe, dVbs0eff_dT; double Vbs0teff = 0.0,dVbs0teff_dVg ,dVbs0teff_dVd, dVbs0teff_dVe; double dVbs0teff_dT; double Vbsdio = 0.0, dVbsdio_dVg, dVbsdio_dVd, dVbsdio_dVe, dVbsdio_dVb; double dVbsdio_dT; double Vthfd = 0.0 ,dVthfd_dVd ,dVthfd_dVe, dVthfd_dT; double Vbs0mos = 0.0 ,dVbs0mos_dVe, dVbs0mos_dT; double Vbsmos ,dVbsmos_dVg ,dVbsmos_dVb ,dVbsmos_dVd, dVbsmos_dVe, dVbsmos_dT; double Abeff ,dAbeff_dVg ,dAbeff_dVb, dAbeff_dVc; double Vcs ,dVcs_dVg ,dVcs_dVb ,dVcs_dVd ,dVcs_dVe, dVcs_dT; double Xcsat = 0.0, dXcsat_dVg, dXcsat_dVc; double Vdsatii ,dVdsatii_dVg ,dVdsatii_dVd, dVdsatii_dVb, dVdsatii_dT; double Vdseffii ,dVdseffii_dVg ,dVdseffii_dVd, dVdseffii_dVb, dVdseffii_dT; double VcsCV = 0.0 ,dVcsCV_dVg = 0.0 ,dVcsCV_dVb = 0.0; double dVcsCV_dVd = 0.0 ,dVcsCV_dVc = 0.0; double VdsCV = 0.0 ,dVdsCV_dVg = 0.0 ,dVdsCV_dVb = 0.0; double dVdsCV_dVd = 0.0 ,dVdsCV_dVc = 0.0; double Phisc ,dPhisc_dVg ,dPhisc_dVb ,dPhisc_dVd, dPhisc_dVc; double Phisd ,dPhisd_dVg ,dPhisd_dVb ,dPhisd_dVd, dPhisd_dVc; double sqrtPhisc; double sqrtPhisd; double Xc = 0.0 ,dXc_dVg = 0.0 ,dXc_dVb = 0.0 ,dXc_dVd = 0.0 ,dXc_dVc = 0.0; double Ibjt = 0.0 ,dIbjt_dVb ,dIbjt_dVd ,dIbjt_dT = 0.0; double Ibs1 ,dIbs1_dVb ,dIbs1_dT = 0.0; double Ibs2 ,dIbs2_dVb ,dIbs2_dT = 0.0; double Ibs3 ,dIbs3_dVb ,dIbs3_dVd, dIbs3_dT = 0.0; double Ibs4 ,dIbs4_dVb ,dIbs4_dT = 0.0; double Ibd1 ,dIbd1_dVb ,dIbd1_dVd ,dIbd1_dT = 0.0; double Ibd2 ,dIbd2_dVb ,dIbd2_dVd ,dIbd2_dT = 0.0; double Ibd3 ,dIbd3_dVb ,dIbd3_dVd ,dIbd3_dT = 0.0; double Ibd4 ,dIbd4_dVb ,dIbd4_dVd ,dIbd4_dT = 0.0; double ExpVbs1, dExpVbs1_dVb, dExpVbs1_dT = 0.0; double ExpVbs2, dExpVbs2_dVb, dExpVbs2_dT = 0.0; double ExpVbs4 = 0.0, dExpVbs4_dVb = 0.0, dExpVbs4_dT = 0.0; double ExpVbd1, dExpVbd1_dVb, dExpVbd1_dT = 0.0; double ExpVbd2, dExpVbd2_dVb, dExpVbd2_dT = 0.0; double ExpVbd4 = 0.0, dExpVbd4_dVb = 0.0, dExpVbd4_dT = 0.0; double WTsi, NVtm1, NVtm2; double Ic = 0.0; double Ibs = 0.0; double Ibd = 0.0; double Nomi ,dNomi_dVg ,dNomi_dVb ,dNomi_dVd ,dNomi_dVc; double Denomi ,dDenomi_dVg ,dDenomi_dVd ,dDenomi_dVb ,dDenomi_dVc, dDenomi_dT; double Qbf = 0.0 ,dQbf_dVg = 0.0 ,dQbf_dVb = 0.0 ,dQbf_dVd = 0.0; double dQbf_dVc = 0.0 ,dQbf_dVe = 0.0; double Qsubs1 = 0.0 ,dQsubs1_dVg ,dQsubs1_dVb ,dQsubs1_dVd ,dQsubs1_dVc; double Qsubs2 = 0.0 ,dQsubs2_dVg ,dQsubs2_dVb ,dQsubs2_dVd ,dQsubs2_dVc ,dQsubs2_dVe; double Qsub0 = 0.0 ,dQsub0_dVg ,dQsub0_dVb ,dQsub0_dVd ; double Qac0 = 0.0 ,dQac0_dVb ,dQac0_dVd; double Qdep0 ,dQdep0_dVb; double Qe1 = 0.0 , dQe1_dVg ,dQe1_dVb, dQe1_dVd, dQe1_dVe, dQe1_dT; double Ce1g ,Ce1b ,Ce1d ,Ce1e, Ce1T; double Ce2g ,Ce2b ,Ce2d ,Ce2e, Ce2T; double Qe2 = 0.0 , dQe2_dVg ,dQe2_dVb, dQe2_dVd, dQe2_dVe, dQe2_dT; double dQbf_dVrg = 0.0, dQac0_dVrg, dQsub0_dVrg; double dQsubs2_dVrg, dQbf0_dVe, dQbf0_dT; /* for self-heating */ double vbi, vfbb, phi, sqrtPhi, Xdep0, jbjt, jdif, jrec, jtun, u0temp, vsattemp; double rds0, ua, ub, uc; double dvbi_dT, dvfbb_dT, djbjt_dT, djdif_dT, djrec_dT, djtun_dT, du0temp_dT; double dvsattemp_dT, drds0_dT, dua_dT, dub_dT, duc_dT, dni_dT, dVtm_dT; double dVfbeff_dT, dQac0_dT, dQsub0_dT; double dQbf_dT = 0.0, dVdsCV_dT = 0.0, dPhisd_dT; double dNomi_dT, dXc_dT = 0.0, dQsubs1_dT, dQsubs2_dT; double dVcsCV_dT = 0.0, dPhisc_dT, dQsicv_dT; double CbT, CsT, CgT; double Qex, dQex_dVg, dQex_dVb, dQex_dVd, dQex_dVe, dQex_dT; /* clean up last */ FILE *fpdebug = NULL; /* end clean up */ int nandetect; static int nanfound = 0; char nanmessage [12]; double m; for (; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here != NULL; here = here->B3SOIDDnextInstance) { Check = 0; ByPass = 0; selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0); pParam = here->pParam; if (here->B3SOIDDdebugMod > 3) { if (model->B3SOIDDtype > 0) fpdebug = fopen("b3soiddn.log", "a"); else fpdebug = fopen("b3soiddp.log", "a"); fprintf(fpdebug, "******* Time : %.5e ******* Device: %s Iteration: %d\n", ckt->CKTtime, here->B3SOIDDname, here->B3SOIDDiterations); } if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->B3SOIDDvbs); vgs = *(ckt->CKTstate0 + here->B3SOIDDvgs); ves = *(ckt->CKTstate0 + here->B3SOIDDves); vps = *(ckt->CKTstate0 + here->B3SOIDDvps); vds = *(ckt->CKTstate0 + here->B3SOIDDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIDDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIDDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIDDdNodePrime); vs = *(ckt->CKTrhsOld + here->B3SOIDDsNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIDDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIDDeNode); vb = *(ckt->CKTrhsOld + here->B3SOIDDbNode); if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "... INIT SMSIG ...\n"); } if (here->B3SOIDDdebugMod > 0) { fprintf(stderr,"DC op. point converge with %d iterations\n", here->B3SOIDDiterations); } } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->B3SOIDDvbs); vgs = *(ckt->CKTstate1 + here->B3SOIDDvgs); ves = *(ckt->CKTstate1 + here->B3SOIDDves); vps = *(ckt->CKTstate1 + here->B3SOIDDvps); vds = *(ckt->CKTstate1 + here->B3SOIDDvds); delTemp = *(ckt->CKTstate1 + here->B3SOIDDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIDDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIDDdNodePrime); vs = *(ckt->CKTrhsOld + here->B3SOIDDsNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIDDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIDDeNode); vb = *(ckt->CKTrhsOld + here->B3SOIDDbNode); if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "... Init Transient ....\n"); } if (here->B3SOIDDdebugMod > 0) { fprintf(stderr, "Transient operation point converge with %d iterations\n", here->B3SOIDDiterations); } here->B3SOIDDiterations = 0; } else if ((ckt->CKTmode & MODEINITJCT) && !here->B3SOIDDoff) { vds = model->B3SOIDDtype * here->B3SOIDDicVDS; vgs = model->B3SOIDDtype * here->B3SOIDDicVGS; ves = model->B3SOIDDtype * here->B3SOIDDicVES; vbs = model->B3SOIDDtype * here->B3SOIDDicVBS; vps = model->B3SOIDDtype * here->B3SOIDDicVPS; vg = vd = vs = vp = ve = 0.0; here->B3SOIDDiterations = 0; /* initialize iteration number */ delTemp = 0.0; here->B3SOIDDphi = pParam->B3SOIDDphi; if (here->B3SOIDDdebugMod > 2) fprintf(fpdebug, "... INIT JCT ...\n"); if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = model->B3SOIDDtype*0.1 + pParam->B3SOIDDvth0; vds = 0.0; ves = 0.0; vps = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->B3SOIDDoff)) { delTemp = vps = vbs = vgs = vds = ves = 0.0; vg = vd = vs = vp = ve = 0.0; here->B3SOIDDiterations = 0; /* initialize iteration number */ } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B3SOIDDvbs) = *(ckt->CKTstate1 + here->B3SOIDDvbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDvbs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDvbs))); *(ckt->CKTstate0 + here->B3SOIDDvgs) = *(ckt->CKTstate1 + here->B3SOIDDvgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDvgs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDvgs))); *(ckt->CKTstate0 + here->B3SOIDDves) = *(ckt->CKTstate1 + here->B3SOIDDves); ves = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDves)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDves))); *(ckt->CKTstate0 + here->B3SOIDDvps) = *(ckt->CKTstate1 + here->B3SOIDDvps); vps = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDvps)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDvps))); *(ckt->CKTstate0 + here->B3SOIDDvds) = *(ckt->CKTstate1 + here->B3SOIDDvds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDvds)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDvds))); *(ckt->CKTstate0 + here->B3SOIDDvbd) = *(ckt->CKTstate0 + here->B3SOIDDvbs) - *(ckt->CKTstate0 + here->B3SOIDDvds); *(ckt->CKTstate0 + here->B3SOIDDvg) = *(ckt->CKTstate1 + here->B3SOIDDvg); *(ckt->CKTstate0 + here->B3SOIDDvd) = *(ckt->CKTstate1 + here->B3SOIDDvd); *(ckt->CKTstate0 + here->B3SOIDDvs) = *(ckt->CKTstate1 + here->B3SOIDDvs); *(ckt->CKTstate0 + here->B3SOIDDvp) = *(ckt->CKTstate1 + here->B3SOIDDvp); *(ckt->CKTstate0 + here->B3SOIDDve) = *(ckt->CKTstate1 + here->B3SOIDDve); /* Only predict ve */ ve = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDve)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIDDve))); /* Then update vg, vs, vb, vd, vp base on ve */ vs = ve - model->B3SOIDDtype * ves; vg = model->B3SOIDDtype * vgs + vs; vd = model->B3SOIDDtype * vds + vs; vb = model->B3SOIDDtype * vbs + vs; vp = model->B3SOIDDtype * vps + vs; delTemp = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIDDdeltemp))-(xfact * (*(ckt->CKTstate2 + here->B3SOIDDdeltemp))); if (selfheat) { here->B3SOIDDphi = 2.0 * here->B3SOIDDvtm * log (pParam->B3SOIDDnpeak / here->B3SOIDDni); } if (here->B3SOIDDdebugMod > 0) { fprintf(stderr, "Time = %.6e converge with %d iterations\n", ckt->CKTtime, here->B3SOIDDiterations); } if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "... PREDICTOR calculation ....\n"); } here->B3SOIDDiterations = 0; } else { #endif /* PREDICTOR */ vg = B3SOIDDlimit(*(ckt->CKTrhsOld + here->B3SOIDDgNode), *(ckt->CKTstate0 + here->B3SOIDDvg), 3.0, &Check); vd = B3SOIDDlimit(*(ckt->CKTrhsOld + here->B3SOIDDdNodePrime), *(ckt->CKTstate0 + here->B3SOIDDvd), 3.0, &Check); vs = B3SOIDDlimit(*(ckt->CKTrhsOld + here->B3SOIDDsNodePrime), *(ckt->CKTstate0 + here->B3SOIDDvs), 3.0, &Check); vp = B3SOIDDlimit(*(ckt->CKTrhsOld + here->B3SOIDDpNode), *(ckt->CKTstate0 + here->B3SOIDDvp), 3.0, &Check); ve = B3SOIDDlimit(*(ckt->CKTrhsOld + here->B3SOIDDeNode), *(ckt->CKTstate0 + here->B3SOIDDve), 3.0, &Check); delTemp = *(ckt->CKTrhsOld + here->B3SOIDDtempNode); vbs = model->B3SOIDDtype * (*(ckt->CKTrhsOld+here->B3SOIDDbNode) - *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime)); vps = model->B3SOIDDtype * (vp - vs); vgs = model->B3SOIDDtype * (vg - vs); ves = model->B3SOIDDtype * (ve - vs); vds = model->B3SOIDDtype * (vd - vs); if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "... DC calculation ....\n"); fprintf(fpdebug, "Vg = %.10f; Vb = %.10f; Vs = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIDDgNode), *(ckt->CKTrhsOld + here->B3SOIDDbNode), *(ckt->CKTrhsOld + here->B3SOIDDsNode)); fprintf(fpdebug, "Vd = %.10f; Vsp = %.10f; Vdp = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIDDdNode), *(ckt->CKTrhsOld + here->B3SOIDDsNodePrime), *(ckt->CKTrhsOld + here->B3SOIDDdNodePrime)); fprintf(fpdebug, "Ve = %.10f; Vp = %.10f; delTemp = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIDDeNode), *(ckt->CKTrhsOld + here->B3SOIDDpNode), *(ckt->CKTrhsOld + here->B3SOIDDtempNode)); } #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; ved = ves - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIDDvgs) - *(ckt->CKTstate0 + here->B3SOIDDvds); vedo = *(ckt->CKTstate0 + here->B3SOIDDves) - *(ckt->CKTstate0 + here->B3SOIDDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIDDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIDDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIDDvgs); delves = ves - *(ckt->CKTstate0 + here->B3SOIDDves); delvps = vps - *(ckt->CKTstate0 + here->B3SOIDDvps); deldelTemp = delTemp - *(ckt->CKTstate0 + here->B3SOIDDdeltemp); delvds = vds - *(ckt->CKTstate0 + here->B3SOIDDvds); delvgd = vgd - vgdo; delved = ved - vedo; if (here->B3SOIDDmode >= 0) { cdhat = here->B3SOIDDcd + (here->B3SOIDDgm-here->B3SOIDDgjdg) * delvgs + (here->B3SOIDDgds - here->B3SOIDDgjdd) * delvds + (here->B3SOIDDgmbs - here->B3SOIDDgjdb) * delvbs + (here->B3SOIDDgme - here->B3SOIDDgjde) * delves + (here->B3SOIDDgmT - here->B3SOIDDgjdT) * deldelTemp; } else { cdhat = here->B3SOIDDcd + (here->B3SOIDDgm-here->B3SOIDDgjdg) * delvgd - (here->B3SOIDDgds - here->B3SOIDDgjdd) * delvds + (here->B3SOIDDgmbs - here->B3SOIDDgjdb) * delvbd + (here->B3SOIDDgme - here->B3SOIDDgjde) * delved + (here->B3SOIDDgmT - here->B3SOIDDgjdT) * deldelTemp; } cbhat = here->B3SOIDDcb + here->B3SOIDDgbgs * delvgs + here->B3SOIDDgbbs * delvbs + here->B3SOIDDgbds * delvds + here->B3SOIDDgbes * delves + here->B3SOIDDgbps * delvps + here->B3SOIDDgbT * deldelTemp; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if (here->B3SOIDDdebugMod > 3) { fprintf(fpdebug, "Convergent Criteria : vbs %d vds %d vgs %d ves %d vps %d temp %d\n", ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B3SOIDDvbs))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B3SOIDDvds))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B3SOIDDvgs))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B3SOIDDves))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B3SOIDDvps))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B3SOIDDdeltemp))) + ckt->CKTvoltTol*1e4))) ? 1 : 0); fprintf(fpdebug, "delCd %.4e, delCb %.4e\n", fabs(cdhat - here->B3SOIDDcd) , fabs(cbhat - here->B3SOIDDcb)); } if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) && Check == 0) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B3SOIDDvbs))) + ckt->CKTvoltTol)) ) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B3SOIDDvbd))) + ckt->CKTvoltTol)) ) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B3SOIDDvgs))) + ckt->CKTvoltTol))) if ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B3SOIDDves))) + ckt->CKTvoltTol))) if ( (here->B3SOIDDbodyMod == 0) || (here->B3SOIDDbodyMod == 2) || (fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B3SOIDDvps))) + ckt->CKTvoltTol)) ) if ( (here->B3SOIDDtempNode == 0) || (fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B3SOIDDdeltemp))) + ckt->CKTvoltTol*1e4))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B3SOIDDvds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->B3SOIDDcd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->B3SOIDDcd)) + ckt->CKTabstol)) if ((fabs(cbhat - here->B3SOIDDcb) < ckt->CKTreltol * MAX(fabs(cbhat),fabs(here->B3SOIDDcb)) + ckt->CKTabstol) ) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B3SOIDDvbs); vbd = *(ckt->CKTstate0 + here->B3SOIDDvbd); vgs = *(ckt->CKTstate0 + here->B3SOIDDvgs); ves = *(ckt->CKTstate0 + here->B3SOIDDves); vps = *(ckt->CKTstate0 + here->B3SOIDDvps); vds = *(ckt->CKTstate0 + here->B3SOIDDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIDDdeltemp); /* calculate Vds for temperature conductance calculation in bypass (used later when filling Temp node matrix) */ Vds = here->B3SOIDDmode > 0 ? vds : -vds; vgd = vgs - vds; vgb = vgs - vbs; veb = ves - vbs; if (here->B3SOIDDdebugMod > 2) { fprintf(stderr, "Bypass for %s...\n", here->B3SOIDDname); fprintf(fpdebug, "... By pass ....\n"); fprintf(fpdebug, "vgs=%.4f, vds=%.4f, vbs=%.4f, ", vgs, vds, vbs); fprintf(fpdebug, "ves=%.4f, vps=%.4f\n", ves, vps); } if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = here->B3SOIDDvon; if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1)) { here->B3SOIDDdum1 = here->B3SOIDDdum2 = here->B3SOIDDdum3 = 0.0; here->B3SOIDDdum4 = here->B3SOIDDdum5 = 0.0; Qac0 = Qsub0 = Qsubs1 = Qsubs2 = Qbf = Qe1 = Qe2 = 0.0; qjs = qjd = Cbg = Cbb = Cbd = Cbe = Xc = qdrn = qgate = 0.0; qbody = qsub = 0.0; } if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "Limited : vgs = %.8f\n", vgs); fprintf(fpdebug, "Limited : vds = %.8f\n", vds); } if (*(ckt->CKTstate0 + here->B3SOIDDvds) >= 0.0) T0 = *(ckt->CKTstate0 + here->B3SOIDDvbs); else T0 = *(ckt->CKTstate0 + here->B3SOIDDvbd); if (here->B3SOIDDdebugMod > 2) fprintf(fpdebug, "Before lim : vbs = %.8f, after = ", T0); if (vds >= 0.0) { vbs = B3SOIDDlimit(vbs, T0, 0.2, &Check); vbs = B3SOIDDSmartVbs(vbs, T0, here, ckt, &Check); vbd = vbs - vds; vb = model->B3SOIDDtype * vbs + vs; if (here->B3SOIDDdebugMod > 2) fprintf(fpdebug, "%.8f\n", vbs); } else { vbd = B3SOIDDlimit(vbd, T0, 0.2, &Check); vbd = B3SOIDDSmartVbs(vbd, T0, here, ckt, &Check); vbs = vbd + vds; vb = model->B3SOIDDtype * vbs + vd; if (here->B3SOIDDdebugMod > 2) fprintf(fpdebug, "%.8f\n", vbd); } delTemp =B3SOIDDlimit(delTemp, *(ckt->CKTstate0 + here->B3SOIDDdeltemp),5.0,&Check); } /* Calculate temperature dependent values for self-heating effect */ Temp = delTemp + ckt->CKTtemp; /* for debugging Temp = ckt->CKTtemp; selfheat = 1; if (here->B3SOIDDname[1] == '2') { Temp += 0.01; } */ TempRatio = Temp / model->B3SOIDDtnom; if (selfheat) { Vtm = KboQ * Temp; T0 = 1108.0 + Temp; T5 = Temp * Temp; Eg = 1.16 - 7.02e-4 * T5 / T0; T1 = ((7.02e-4 * T5) - T0 * (14.04e-4 * Temp)) / T0 / T0; /* T1 = dEg / dT */ T2 = 1.9230584e-4; /* T2 = 1 / 300.15^(3/2) */ T5 = sqrt(Temp); T3 = 1.45e10 * Temp * T5 * T2; T4 = exp(21.5565981 - Eg / (2.0 * Vtm)); ni = T3 * T4; dni_dT = 2.175e10 * T2 * T5 * T4 + T3 * T4 * (-Vtm * T1 + Eg * KboQ) / (2.0 * Vtm * Vtm); T0 = log(1.0e20 * pParam->B3SOIDDnpeak / (ni * ni)); vbi = Vtm * T0; dvbi_dT = KboQ * T0 + Vtm * (-2.0 * dni_dT / ni); if (pParam->B3SOIDDnsub > 0) { T0 = log(pParam->B3SOIDDnpeak / pParam->B3SOIDDnsub); vfbb = -model->B3SOIDDtype * Vtm*T0; dvfbb_dT = -model->B3SOIDDtype * KboQ*T0; } else { T0 = log(-pParam->B3SOIDDnpeak*pParam->B3SOIDDnsub/ni/ni); vfbb = -model->B3SOIDDtype * Vtm*T0; dvfbb_dT = -model->B3SOIDDtype * (KboQ * T0 + Vtm * 2.0 * dni_dT / ni); } /* phi = 2.0 * Vtm * log(pParam->B3SOIDDnpeak / ni); */ phi = here->B3SOIDDphi; sqrtPhi = sqrt(phi); Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIDDnpeak * 1.0e6)) * sqrtPhi; /* Save the values below for phi calculation in B3SOIDDaccept() */ here->B3SOIDDvtm = Vtm; here->B3SOIDDni = ni; /* Use dTx_dVe variables to act as dTx_dT variables */ T8 = 1 / model->B3SOIDDtnom; T7 = model->B3SOIDDxbjt / pParam->B3SOIDDndiode; T0 = pow(TempRatio, T7); dT0_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T7 = model->B3SOIDDxdif / pParam->B3SOIDDndiode; T1 = pow(TempRatio, T7); dT1_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T7 = model->B3SOIDDxrec / pParam->B3SOIDDndiode / 2.0; T2 = pow(TempRatio, T7); dT2_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T3 = TempRatio - 1.0; T4 = Eg300 / pParam->B3SOIDDndiode / Vtm * T3; dT4_dVe = Eg300 / pParam->B3SOIDDndiode / Vtm / Vtm * (Vtm * T8 - T3 * KboQ); T5 = exp(T4); dT5_dVe = dT4_dVe * T5; T6 = sqrt(T5); dT6_dVe = 0.5 / T6 * dT5_dVe; jbjt = pParam->B3SOIDDisbjt * T0 * T5; jdif = pParam->B3SOIDDisdif * T1 * T5; jrec = pParam->B3SOIDDisrec * T2 * T6; djbjt_dT = pParam->B3SOIDDisbjt * (T0 * dT5_dVe + T5 * dT0_dVe); djdif_dT = pParam->B3SOIDDisdif * (T1 * dT5_dVe + T5 * dT1_dVe); djrec_dT = pParam->B3SOIDDisrec * (T2 * dT6_dVe + T6 * dT2_dVe); T7 = model->B3SOIDDxtun / pParam->B3SOIDDntun; T0 = pow(TempRatio, T7); jtun = model->B3SOIDDistun * T0; djtun_dT = model->B3SOIDDistun * T7 * pow(TempRatio, T7 - 1.0) * T8; u0temp = pParam->B3SOIDDu0 * pow(TempRatio, pParam->B3SOIDDute); du0temp_dT = pParam->B3SOIDDu0 * pParam->B3SOIDDute * pow(TempRatio, pParam->B3SOIDDute - 1.0) * T8; vsattemp = pParam->B3SOIDDvsat - pParam->B3SOIDDat * T3; dvsattemp_dT = -pParam->B3SOIDDat * T8; rds0 = (pParam->B3SOIDDrdsw + pParam->B3SOIDDprt * T3) / pParam->B3SOIDDrds0denom; drds0_dT = pParam->B3SOIDDprt / pParam->B3SOIDDrds0denom * T8; ua = pParam->B3SOIDDuatemp + pParam->B3SOIDDua1 * T3; ub = pParam->B3SOIDDubtemp + pParam->B3SOIDDub1 * T3; uc = pParam->B3SOIDDuctemp + pParam->B3SOIDDuc1 * T3; dua_dT = pParam->B3SOIDDua1 * T8; dub_dT = pParam->B3SOIDDub1 * T8; duc_dT = pParam->B3SOIDDuc1 * T8; } else { vbi = pParam->B3SOIDDvbi; vfbb = pParam->B3SOIDDvfbb; phi = pParam->B3SOIDDphi; sqrtPhi = pParam->B3SOIDDsqrtPhi; Xdep0 = pParam->B3SOIDDXdep0; jbjt = pParam->B3SOIDDjbjt; jdif = pParam->B3SOIDDjdif; jrec = pParam->B3SOIDDjrec; jtun = pParam->B3SOIDDjtun; u0temp = pParam->B3SOIDDu0temp; vsattemp = pParam->B3SOIDDvsattemp; rds0 = pParam->B3SOIDDrds0; ua = pParam->B3SOIDDua; ub = pParam->B3SOIDDub; uc = pParam->B3SOIDDuc; dni_dT = dvbi_dT = dvfbb_dT = djbjt_dT = djdif_dT = 0.0; djrec_dT = djtun_dT = du0temp_dT = dvsattemp_dT = 0.0; drds0_dT = dua_dT = dub_dT = duc_dT = 0.0; } /* TempRatio used for Vth and mobility */ if (selfheat) { TempRatio = Temp / model->B3SOIDDtnom - 1.0; } else { TempRatio = ckt->CKTtemp / model->B3SOIDDtnom - 1.0; } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; ved = ves - vds; veb = ves - vbs; vge = vgs - ves; vpd = vps - vds; if (vds >= 0.0) { /* normal mode */ here->B3SOIDDmode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vbd = vbd; Ves = ves; Vps = vps; } else { /* inverse mode */ here->B3SOIDDmode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vbd = vbs; Ves = ved; Vps = vpd; } if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "Vgs=%.4f, Vds=%.4f, Vbs=%.4f, ", Vgs, Vds, Vbs); fprintf(fpdebug, "Ves=%.4f, Vps=%.4f, Temp=%.1f\n", Ves, Vps, Temp); } Vesfb = Ves - vfbb; Cbox = model->B3SOIDDcbox; K1 = pParam->B3SOIDDk1; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; if (here->B3SOIDDdebugMod == -1) ChargeComputationNeeded = 1; /* Poly Gate Si Depletion Effect */ T0 = pParam->B3SOIDDvfb + phi; if ((pParam->B3SOIDDngate > 1.e18) && (pParam->B3SOIDDngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->B3SOIDDngate / (model->B3SOIDDcox * model->B3SOIDDcox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Leff = pParam->B3SOIDDleff; if (selfheat) { Vtm = KboQ * Temp; dVtm_dT = KboQ; } else { Vtm = model->B3SOIDDvtm; dVtm_dT = 0.0; } V0 = vbi - phi; /* Prepare Vbs0t */ T0 = -pParam->B3SOIDDdvbd1 * pParam->B3SOIDDleff / pParam->B3SOIDDlitl; T1 = pParam->B3SOIDDdvbd0 * (exp(0.5*T0) + 2*exp(T0)); T2 = T1 * (vbi - phi); T3 = 0.5 * model->B3SOIDDqsi / model->B3SOIDDcsi; Vbs0t = phi - T3 + pParam->B3SOIDDvbsa + T2; if (selfheat) dVbs0t_dT = T1 * dvbi_dT; else dVbs0t_dT = 0.0; /* Prepare Vbs0 */ T0 = 1 + model->B3SOIDDcsieff / Cbox; T1 = pParam->B3SOIDDkb1 / T0; T2 = T1 * (Vbs0t - Vesfb); /* T6 is Vbs0 before limiting */ T6 = Vbs0t - T2; dT6_dVe = T1; if (selfheat) dT6_dT = dVbs0t_dT - T1 * (dVbs0t_dT + dvfbb_dT); else dT6_dT = 0.0; /* limit Vbs0 to below phi */ T1 = phi - pParam->B3SOIDDdelp; T2 = T1 - T6 - DELT_Vbseff; T3 = sqrt(T2 * T2 + 4.0 * DELT_Vbseff); Vbs0 = T1 - 0.5 * (T2 + T3); T4 = 0.5 * (1 + T2/T3); dVbs0_dVe = T4 * dT6_dVe; if (selfheat) dVbs0_dT = T4 * dT6_dT; else dVbs0_dT = 0.0; T1 = Vbs0t - Vbs0 - DELT_Vbsmos; T2 = sqrt(T1 * T1 + DELT_Vbsmos * DELT_Vbsmos); T3 = 0.5 * (T1 + T2); T4 = T3 * model->B3SOIDDcsieff / model->B3SOIDDqsieff; Vbs0mos = Vbs0 - 0.5 * T3 * T4; T5 = 0.5 * T4 * (1 + T1 / T2); dVbs0mos_dVe = dVbs0_dVe * (1 + T5); if (selfheat) dVbs0mos_dT = dVbs0_dT - (dVbs0t_dT - dVbs0_dT) * T5; else dVbs0mos_dT = 0.0; /* Prepare Vthfd - treat Vbs0mos as if it were independent variable Vb */ Phis = phi - Vbs0mos; dPhis_dVb = -1; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; sqrtXdep = sqrt(Xdep); T0 = pParam->B3SOIDDdvt2 * Vbs0mos; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIDDdvt2; } else /* Added to avoid any discontinuity problems caused by dvt2*/ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIDDdvt2 * T4 * T4; } lt1 = model->B3SOIDDfactor1 * sqrtXdep * T1; dlt1_dVb = model->B3SOIDDfactor1 * (0.5 / sqrtXdep * T1 * dXdep_dVb + sqrtXdep * T2); T0 = pParam->B3SOIDDdvt2w * Vbs0mos; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIDDdvt2w; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIDDdvt2w * T4 * T4; } ltw= model->B3SOIDDfactor1 * sqrtXdep * T1; dltw_dVb = model->B3SOIDDfactor1 * (0.5 / sqrtXdep * T1 * dXdep_dVb + sqrtXdep * T2); T0 = -0.5 * pParam->B3SOIDDdvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->B3SOIDDthetavth = pParam->B3SOIDDdvt0 * Theta0; Delt_vth = here->B3SOIDDthetavth * V0; dDelt_vth_dVb = pParam->B3SOIDDdvt0 * dTheta0_dVb * V0; if (selfheat) dDelt_vth_dT = here->B3SOIDDthetavth * dvbi_dT; else dDelt_vth_dT = 0.0; T0 = -0.5*pParam->B3SOIDDdvt1w * pParam->B3SOIDDweff*Leff/ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->B3SOIDDdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B3SOIDDdvt0w * dT2_dVb * V0; if (selfheat) dDeltVthw_dT = T0 * dvbi_dT; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B3SOIDDnlx / Leff); T1 = (pParam->B3SOIDDkt1 + pParam->B3SOIDDkt1l / Leff + pParam->B3SOIDDkt2 * Vbs0mos); DeltVthtemp = pParam->B3SOIDDk1 * (T0 - 1.0) * sqrtPhi + T1 * TempRatio; if (selfheat) dDeltVthtemp_dT = T1 / model->B3SOIDDtnom; else dDeltVthtemp_dT = 0.0; tmp2 = model->B3SOIDDtox * phi / (pParam->B3SOIDDweff + pParam->B3SOIDDw0); T3 = pParam->B3SOIDDeta0 + pParam->B3SOIDDetab * Vbs0mos; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B3SOIDDetab; dT3_dVb = T4; } else { dT3_dVb = pParam->B3SOIDDetab; } DIBL_Sft = T3 * pParam->B3SOIDDtheta0vb0 * Vds; dDIBL_Sft_dVd = T3 * pParam->B3SOIDDtheta0vb0; dDIBL_Sft_dVb = pParam->B3SOIDDtheta0vb0 * Vds * dT3_dVb; Vthfd = model->B3SOIDDtype * pParam->B3SOIDDvth0 + pParam->B3SOIDDk1 * (sqrtPhis - sqrtPhi) - pParam->B3SOIDDk2 * Vbs0mos-Delt_vth-DeltVthw +(pParam->B3SOIDDk3 +pParam->B3SOIDDk3b * Vbs0mos) * tmp2 + DeltVthtemp - DIBL_Sft; T6 = pParam->B3SOIDDk3b * tmp2 - pParam->B3SOIDDk2 + pParam->B3SOIDDkt2 * TempRatio; dVthfd_dVd = -dDIBL_Sft_dVd; T7 = pParam->B3SOIDDk1 * dsqrtPhis_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb; dVthfd_dVe = T7 * dVbs0mos_dVe; if (selfheat) dVthfd_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT + T7 * dVbs0mos_dT; else dVthfd_dT = 0.0; /* Effective Vbs0 and Vbs0t for all Vgs */ T1 = Vthfd - Vgs_eff - DELT_Vbs0eff; T2 = sqrt(T1 * T1 + DELT_Vbs0eff * DELT_Vbs0eff ); Vbs0teff = Vbs0t - 0.5 * (T1 + T2); dVbs0teff_dVg = 0.5 * (1 + T1/T2) * dVgs_eff_dVg; dVbs0teff_dVd = - 0.5 * (1 + T1 / T2) * dVthfd_dVd; dVbs0teff_dVe = - 0.5 * (1 + T1 / T2) * dVthfd_dVe; if (selfheat) dVbs0teff_dT = dVbs0t_dT - 0.5 * (1 + T1 / T2) * dVthfd_dT; else dVbs0teff_dT = 0.0; /* Calculate nfb */ T3 = 1 / (K1 * K1); T4 = pParam->B3SOIDDkb3 * Cbox / model->B3SOIDDcox; T8 = sqrt(phi - Vbs0mos); T5 = sqrt(1 + 4 * T3 * (phi + K1 * T8 - Vbs0mos)); T6 = 1 + T4 * T5; Nfb = model->B3SOIDDnfb = 1 / T6; T7 = 2 * T3 * T4 * Nfb * Nfb / T5 * (0.5 * K1 / T8 + 1); Vbs0eff = Vbs0 - Nfb * 0.5 * (T1 + T2); dVbs0eff_dVg = Nfb * 0.5 * (1 + T1/T2) * dVgs_eff_dVg; dVbs0eff_dVd = - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dVd; dVbs0eff_dVe = dVbs0_dVe - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dVe - T7 * 0.5 * (T1 + T2) * dVbs0mos_dVe; if (selfheat) dVbs0eff_dT = dVbs0_dT - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dT - T7 * 0.5 * (T1 + T2) * dVbs0mos_dT; else dVbs0eff_dT = 0.0; /* Simple check of Vbs */ /* Prepare Vbsdio */ T1 = Vbs - (Vbs0eff + OFF_Vbsdio) - DELT_Vbsdio; T2 = sqrt(T1*T1 + DELT_Vbsdio * DELT_Vbsdio); T3 = 0.5 * (1 + T1/T2); Vbsdio = Vbs0eff + OFF_Vbsdio + 0.5 * (T1 + T2); dVbsdio_dVg = (1 - T3) * dVbs0eff_dVg; dVbsdio_dVd = (1 - T3) * dVbs0eff_dVd; dVbsdio_dVe = (1 - T3) * dVbs0eff_dVe; if (selfheat) dVbsdio_dT = (1 - T3) * dVbs0eff_dT; else dVbsdio_dT = 0.0; dVbsdio_dVb = T3; /* Prepare Vbseff */ T1 = Vbs0teff - Vbsdio - DELT_Vbsmos; T2 = sqrt(T1 * T1 + DELT_Vbsmos * DELT_Vbsmos); T3 = 0.5 * (T1 + T2); T5 = 0.5 * (1 + T1/T2); dT3_dVg = T5 * (dVbs0teff_dVg - dVbsdio_dVg); dT3_dVd = T5 * (dVbs0teff_dVd - dVbsdio_dVd); dT3_dVb = - T5 * dVbsdio_dVb; dT3_dVe = T5 * (dVbs0teff_dVe - dVbsdio_dVe); if (selfheat) dT3_dT = T5 * (dVbs0teff_dT - dVbsdio_dT); else dT3_dT = 0.0; T4 = T3 * model->B3SOIDDcsieff / model->B3SOIDDqsieff; Vbsmos = Vbsdio - 0.5 * T3 * T4; dVbsmos_dVg = dVbsdio_dVg - T4 * dT3_dVg; dVbsmos_dVd = dVbsdio_dVd - T4 * dT3_dVd; dVbsmos_dVb = dVbsdio_dVb - T4 * dT3_dVb; dVbsmos_dVe = dVbsdio_dVe - T4 * dT3_dVe; if (selfheat) dVbsmos_dT = dVbsdio_dT - T4 * dT3_dT; else dVbsmos_dT = 0.0; /* Prepare Vcs */ Vcs = Vbsdio - Vbs0eff; dVcs_dVb = dVbsdio_dVb; dVcs_dVg = dVbsdio_dVg - dVbs0eff_dVg; dVcs_dVd = dVbsdio_dVd - dVbs0eff_dVd; dVcs_dVe = dVbsdio_dVe - dVbs0eff_dVe; dVcs_dT = dVbsdio_dT - dVbs0eff_dT; /* Check Vps */ /* Note : if Vps is less Vbs0eff => non-physical */ T1 = Vps - Vbs0eff + DELT_Vbs0dio; T2 = sqrt(T1 * T1 + DELT_Vbs0dio * DELT_Vbs0dio); T3 = 0.5 * (1 + T1/T2); Vpsdio = Vbs0eff + 0.5 * (T1 + T2); dVpsdio_dVg = (1 - T3) * dVbs0eff_dVg; dVpsdio_dVd = (1 - T3) * dVbs0eff_dVd; dVpsdio_dVe = (1 - T3) * dVbs0eff_dVe; if (selfheat) dVpsdio_dT = (1 - T3) * dVbs0eff_dT; else dVpsdio_dT = 0.0; dVpsdio_dVp = T3; Vbp = Vbsdio - Vpsdio; dVbp_dVb = dVbsdio_dVb; dVbp_dVg = dVbsdio_dVg - dVpsdio_dVg; dVbp_dVd = dVbsdio_dVd - dVpsdio_dVd; dVbp_dVe = dVbsdio_dVe - dVpsdio_dVe; dVbp_dT = dVbsdio_dT - dVpsdio_dT; dVbp_dVp = - dVpsdio_dVp; here->B3SOIDDvbsdio = Vbsdio; here->B3SOIDDvbs0eff = Vbs0eff; T1 = phi - pParam->B3SOIDDdelp; T2 = T1 - Vbsmos - DELT_Vbseff; T3 = sqrt(T2 * T2 + 4.0 * DELT_Vbseff * T1); Vbseff = T1 - 0.5 * (T2 + T3); T4 = 0.5 * (1 + T2/T3); dVbseff_dVg = T4 * dVbsmos_dVg; dVbseff_dVd = T4 * dVbsmos_dVd; dVbseff_dVb = T4 * dVbsmos_dVb; dVbseff_dVe = T4 * dVbsmos_dVe; if (selfheat) dVbseff_dT = T4 * dVbsmos_dT; else dVbseff_dT = 0.0; here->B3SOIDDvbseff = Vbseff; Phis = phi - Vbseff; dPhis_dVb = -1; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis ; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; /* Vth Calculation */ T3 = sqrt(Xdep); T0 = pParam->B3SOIDDdvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIDDdvt2 ; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIDDdvt2 * T4 * T4 ; } lt1 = model->B3SOIDDfactor1 * T3 * T1; dlt1_dVb =model->B3SOIDDfactor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->B3SOIDDdvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIDDdvt2w ; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIDDdvt2w * T4 * T4 ; } ltw= model->B3SOIDDfactor1 * T3 * T1; dltw_dVb=model->B3SOIDDfactor1*(0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->B3SOIDDdvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->B3SOIDDthetavth = pParam->B3SOIDDdvt0 * Theta0; Delt_vth = here->B3SOIDDthetavth * V0; dDelt_vth_dVb = pParam->B3SOIDDdvt0 * dTheta0_dVb * V0; if (selfheat) dDelt_vth_dT = here->B3SOIDDthetavth * dvbi_dT; else dDelt_vth_dT = 0.0; T0 = -0.5 * pParam->B3SOIDDdvt1w * pParam->B3SOIDDweff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->B3SOIDDdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B3SOIDDdvt0w * dT2_dVb * V0; if (selfheat) dDeltVthw_dT = T0 * dvbi_dT; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B3SOIDDnlx / Leff); T1 = (pParam->B3SOIDDkt1 + pParam->B3SOIDDkt1l / Leff + pParam->B3SOIDDkt2 * Vbseff); DeltVthtemp = pParam->B3SOIDDk1 * (T0 - 1.0) * sqrtPhi + T1 * TempRatio; if (selfheat) dDeltVthtemp_dT = T1 / model->B3SOIDDtnom; else dDeltVthtemp_dT = 0.0; tmp2 = model->B3SOIDDtox * phi / (pParam->B3SOIDDweff + pParam->B3SOIDDw0); T3 = pParam->B3SOIDDeta0 + pParam->B3SOIDDetab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B3SOIDDetab; dT3_dVb = T4 ; } else { dT3_dVb = pParam->B3SOIDDetab ; } DIBL_Sft = T3 * pParam->B3SOIDDtheta0vb0 * Vds; dDIBL_Sft_dVd = pParam->B3SOIDDtheta0vb0 * T3; dDIBL_Sft_dVb = pParam->B3SOIDDtheta0vb0 * Vds * dT3_dVb; Vth = model->B3SOIDDtype * pParam->B3SOIDDvth0 + pParam->B3SOIDDk1 * (sqrtPhis - sqrtPhi) - pParam->B3SOIDDk2 * Vbseff- Delt_vth - DeltVthw +(pParam->B3SOIDDk3 + pParam->B3SOIDDk3b * Vbseff) * tmp2 + DeltVthtemp - DIBL_Sft; here->B3SOIDDvon = Vth; T6 = pParam->B3SOIDDk3b * tmp2 - pParam->B3SOIDDk2 + pParam->B3SOIDDkt2 * TempRatio; dVth_dVb = pParam->B3SOIDDk1 * dsqrtPhis_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb; /* this is actually dVth_dVbseff */ dVth_dVd = -dDIBL_Sft_dVd; if (selfheat) dVth_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT; else dVth_dT = 0.0; /* Calculate n */ T2 = pParam->B3SOIDDnfactor * EPSSI / Xdep; dT2_dVb = - T2 / Xdep * dXdep_dVb; T3 = pParam->B3SOIDDcdsc + pParam->B3SOIDDcdscb * Vbseff + pParam->B3SOIDDcdscd * Vds; dT3_dVb = pParam->B3SOIDDcdscb; dT3_dVd = pParam->B3SOIDDcdscd; T4 = (T2 + T3 * Theta0 + pParam->B3SOIDDcit) / model->B3SOIDDcox; dT4_dVb = (dT2_dVb + Theta0 * dT3_dVb + dTheta0_dVb * T3) / model->B3SOIDDcox; dT4_dVd = Theta0 * dT3_dVd / model->B3SOIDDcox; if (T4 >= -0.5) { n = 1.0 + T4; dn_dVb = dT4_dVb; dn_dVd = dT4_dVd; } else /* avoid discontinuity problems caused by T4 */ { T0 = 1.0 / (3.0 + 8.0 * T4); n = (1.0 + 3.0 * T4) * T0; T0 *= T0; dn_dVb = T0 * dT4_dVb; dn_dVd = T0 * dT4_dVd; } /* Effective Vgst (Vgsteff) Calculation */ Vgst = Vgs_eff - Vth; T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->B3SOIDDvoff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst; /* T0 is dVgsteff_dVbseff */ T0 = -dVth_dVb; dVgsteff_dVg = dVgs_eff_dVg + T0 * dVbseff_dVg; dVgsteff_dVd = -dVth_dVd + T0 * dVbseff_dVd; dVgsteff_dVb = T0 * dVbseff_dVb; dVgsteff_dVe = T0 * dVbseff_dVe; if (selfheat) dVgsteff_dT = -dVth_dT + T0 * dVbseff_dT; else dVgsteff_dT = 0.0; } else if (ExpArg > EXP_THRESHOLD) { T0 = (Vgst - pParam->B3SOIDDvoff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->B3SOIDDcdep0 / model->B3SOIDDcox * ExpVgst; T3 = Vgsteff / (n * Vtm) ; /* T1 is dVgsteff_dVbseff */ T1 = -T3 * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg = T3 * dVgs_eff_dVg + T1 * dVbseff_dVg; dVgsteff_dVd = -T3 * (dVth_dVd + T0 * Vtm * dn_dVd) + T1 * dVbseff_dVd; dVgsteff_dVe = T1 * dVbseff_dVe; dVgsteff_dVb = T1 * dVbseff_dVb; if (selfheat) dVgsteff_dT = -T3 * (dVth_dT + T0 * dVtm_dT * n) + Vgsteff / Temp + T1 * dVbseff_dT; else dVgsteff_dT = 0.0; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; T3 = (1.0 / Temp); if (selfheat) dT1_dT = -dT1_dVg * (dVth_dT + Vgst * T3) + T1 * T3; else dT1_dT = 0.0; dT2_dVg = -model->B3SOIDDcox / (Vtm * pParam->B3SOIDDcdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; if (selfheat) dT2_dT = -dT2_dVg * (dVth_dT - ExpArg * T10 * T3); else dT2_dT = 0.0; Vgsteff = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff_dVb = T4 * dVbseff_dVb; dVgsteff_dVe = T4 * dVbseff_dVe; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg + T4 * dVbseff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3 + T4 * dVbseff_dVd; if (selfheat) dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3 + T4 * dVbseff_dT; else dVgsteff_dT = 0.0; } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (selfheat) dVgst2Vtm_dT = 2.0 * dVtm_dT; else dVgst2Vtm_dT = 0.0; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - sqrtPhi; Weff = pParam->B3SOIDDweff - 2.0 * (pParam->B3SOIDDdwg * Vgsteff + pParam->B3SOIDDdwb * T9); dWeff_dVg = -2.0 * pParam->B3SOIDDdwg; dWeff_dVb = -2.0 * pParam->B3SOIDDdwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->B3SOIDDprwg * Vgsteff + pParam->B3SOIDDprwb * T9; if (T0 >= -0.9) { Rds = rds0 * (1.0 + T0); dRds_dVg = rds0 * pParam->B3SOIDDprwg; dRds_dVb = rds0 * pParam->B3SOIDDprwb * dsqrtPhis_dVb; if (selfheat) dRds_dT = (1.0 + T0) * drds0_dT; else dRds_dT = 0.0; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = rds0 * pParam->B3SOIDDprwg * T1; dRds_dVb = rds0 * pParam->B3SOIDDprwb * dsqrtPhis_dVb * T1; if (selfheat) dRds_dT = (0.8 + T0) * T1 * drds0_dT; else dRds_dT = 0.0; } /* Calculate Abulk */ if (pParam->B3SOIDDa0 == 0.0) { Abulk0 = Abulk = dAbulk0_dVb = dAbulk_dVg = dAbulk_dVb = 0.0; } else { T1 = 0.5 * pParam->B3SOIDDk1 / sqrtPhi; T9 = sqrt(model->B3SOIDDxj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->B3SOIDDa0 * T5; tmp3 = pParam->B3SOIDDweff + pParam->B3SOIDDb1; tmp4 = pParam->B3SOIDDb0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 * tmp2 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = T1 * T2; dAbulk0_dVb = T1 * dT2_dVb; T8 = pParam->B3SOIDDags * pParam->B3SOIDDa0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * 3.0 * T1 * dT2_dVb / tmp2; } if (Abulk0 < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk0); Abulk0 = (0.02 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk); Abulk = (0.02 - Abulk) * T9; dAbulk_dVb *= T9 * T9; } T2 = pParam->B3SOIDDketa * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->B3SOIDDketa * T0 * T0 ; } else /* added to avoid the problems caused by Keta */ { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->B3SOIDDketa * T1 * T1 ; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; Abulk += 1; Abulk0 += 1; /* Prepare Abeff */ T0 = pParam->B3SOIDDabp * Vgst2Vtm; T1 = 1 - Vcs / T0 - DELT_Xcsat; T2 = sqrt(T1 * T1 + DELT_Xcsat * DELT_Xcsat); T3 = 1 - 0.5 * (T1 + T2); T5 = -0.5 * (1 + T1 / T2); dT1_dVg = Vcs / Vgst2Vtm / T0; dT3_dVg = T5 * dT1_dVg; dT1_dVc = - 1 / T0; dT3_dVc = T5 * dT1_dVc; Xcsat = pParam->B3SOIDDmxc * T3 * T3 + (1 - pParam->B3SOIDDmxc)*T3; T4 = 2 * pParam->B3SOIDDmxc * T3 + (1 - pParam->B3SOIDDmxc); dXcsat_dVg = T4 * dT3_dVg; dXcsat_dVc = T4 * dT3_dVc; Abeff = Xcsat * Abulk + (1 - Xcsat) * model->B3SOIDDadice; T0 = Xcsat * dAbulk_dVg + Abulk * dXcsat_dVg; dAbeff_dVg = T0 - model->B3SOIDDadice * dXcsat_dVg; dAbeff_dVb = Xcsat * dAbulk_dVb; dAbeff_dVc = (Abulk - model->B3SOIDDadice) * dXcsat_dVc; here->B3SOIDDabeff = Abeff; /* Mobility calculation */ if (model->B3SOIDDmobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = ua + uc * Vbseff; T3 = T0 / model->B3SOIDDtox; T5 = T3 * (T2 + ub * T3); dDenomi_dVg = (T2 + 2.0 * ub * T3) / model->B3SOIDDtox; dDenomi_dVd = dDenomi_dVg * 2 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2 * dVth_dVb + uc * T3 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2 * dVth_dT + (dua_dT + Vbseff * duc_dT + dub_dT * T3 ) * T3; else dDenomi_dT = 0.0; } else if (model->B3SOIDDmobMod == 2) { T5 = Vgsteff / model->B3SOIDDtox * (ua + uc * Vbseff + ub * Vgsteff / model->B3SOIDDtox); dDenomi_dVg = (ua + uc * Vbseff + 2.0 * ub * Vgsteff / model->B3SOIDDtox) / model->B3SOIDDtox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * uc / model->B3SOIDDtox ; if (selfheat) dDenomi_dT = Vgsteff / model->B3SOIDDtox * (dua_dT + Vbseff * duc_dT + dub_dT * Vgsteff / model->B3SOIDDtox); else dDenomi_dT = 0.0; } else /* mobMod == 3 */ { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + uc * Vbseff; T3 = T0 / model->B3SOIDDtox; T4 = T3 * (ua + ub * T3); T5 = T4 * T2; dDenomi_dVg = (ua + 2.0 * ub * T3) * T2 / model->B3SOIDDtox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + uc * T4 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2.0 * dVth_dT + (dua_dT + dub_dT * T3) * T3 * T2 + T4 * Vbseff * duc_dT; else dDenomi_dT = 0.0; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; if (selfheat) dDenomi_dT *= T9; else dDenomi_dT = 0.0; } here->B3SOIDDueff = ueff = u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; if (selfheat) dueff_dT = T9 * dDenomi_dT + du0temp_dT / Denomi; else dueff_dT = 0.0; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * vsattemp * model->B3SOIDDcox; WVCoxRds = WVCox * Rds; /* dWVCoxRds_dT = WVCox * dRds_dT + Weff * model->B3SOIDDcox * Rds * dvsattemp_dT; */ Esat = 2.0 * vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; if (selfheat) dEsatL_dT = T0 * dueff_dT + EsatL / vsattemp * dvsattemp_dT; else dEsatL_dT = 0.0; /* Sqrt() */ a1 = pParam->B3SOIDDa1; if (a1 == 0.0) { Lambda = pParam->B3SOIDDa2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->B3SOIDDa2; T1 = T0 - pParam->B3SOIDDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->B3SOIDDa2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIDDa1 * (1.0 + T1 / T2); } else { T1 = pParam->B3SOIDDa2 + pParam->B3SOIDDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->B3SOIDDa2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIDDa1 * (1.0 + T1 / T2); } if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abeff * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abeff * dEsatL_dVg + EsatL * dAbeff_dVg + 1.0) * T1; dT0_dVd = -(Abeff * dEsatL_dVd) * T1; dT0_dVb = -(Abeff * dEsatL_dVb + EsatL * dAbeff_dVb) * T1; dT0_dVc = -(EsatL * dAbeff_dVc) * T1; if (selfheat) dT0_dT = -(Abeff * dEsatL_dT + dVgst2Vtm_dT) * T1; else dT0_dT = 0.0; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; dVdsat_dVc = T3 * dT0_dVc; if (selfheat) dVdsat_dT = T3 * dT0_dT + T2 * dEsatL_dT + EsatL * T0 * dVgst2Vtm_dT; else dVdsat_dT = 0.0; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abeff * WVCoxRds; T8 = Abeff * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abeff * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abeff * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbeff_dVg); /* dT0_dVb = 2.0 * (T8 * tmp3 this is equivalent to one below, but simpler + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbeff_dVg); */ dT0_dVb = 2.0 * (T8 * (2.0 / Abeff * dAbeff_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbeff_dVb); dT0_dVd = 0.0; dT0_dVc = 4.0 * T9 * dAbeff_dVc; if (selfheat) { tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; dT0_dT = 2.0 * T8 * tmp4; } else tmp4 = dT0_dT = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abeff * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abeff * dEsatL_dVg + EsatL * dAbeff_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbeff_dVg); dT1_dVb = Abeff * dEsatL_dVb + EsatL * dAbeff_dVb + 3.0 * (T6 * dAbeff_dVb + T7 * tmp3); dT1_dVd = Abeff * dEsatL_dVd; dT1_dVc = EsatL * dAbeff_dVc + 3.0 * T6 * dAbeff_dVc; if (selfheat) { tmp4 += dVgst2Vtm_dT / Vgst2Vtm; dT1_dT = (2.0 / Lambda - 1.0) * dVgst2Vtm_dT + Abeff * dEsatL_dT + 3.0 * T7 * tmp4; } else dT1_dT = 0.0; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; if (selfheat) dT2_dT = Vgst2Vtm * dEsatL_dT + EsatL * dVgst2Vtm_dT + 2.0 * T6 * (dVgst2Vtm_dT + Vgst2Vtm * tmp4); else dT2_dT = 0.0; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; dVdsat_dVc = (dT1_dVc - (T1 * dT1_dVc - dT0_dVc * T2) / T3 - Vdsat * dT0_dVc) / T0; if (selfheat) dVdsat_dT = (dT1_dT - (T1 * dT1_dT - dT0_dT * T2 - T0 * dT2_dT) / T3 - Vdsat * dT0_dT) / T0; else dVdsat_dT = 0.0; } here->B3SOIDDvdsat = Vdsat; /* Vdsatii for impact ionization */ if (pParam->B3SOIDDaii > 0.0) { if (pParam->B3SOIDDcii != 0.0) { T0 = pParam->B3SOIDDcii / sqrt(3.0) + pParam->B3SOIDDdii; /* Hard limit Vds to T0 => T4 i.e. limit T0 to 3.0 */ T1 = Vds - T0 - 0.1; T2 = sqrt(T1 * T1 + 0.4); T3 = T0 + 0.5 * (T1 + T2); dT3_dVd = 0.5 * (1.0 + T1/T2); T4 = T3 - pParam->B3SOIDDdii; T5 = pParam->B3SOIDDcii / T4; T0 = T5 * T5; dT0_dVd = - 2 * T0 / T4 * dT3_dVd; } else { T0 = dT0_dVd = 0.0; } T0 += 1.0; T3 = pParam->B3SOIDDaii + pParam->B3SOIDDbii / Leff; T4 = 1.0 / (T0 * Vgsteff + T3 * EsatL); T5 = -T4 * T4; T6 = Vgsteff * T4; T7 = EsatL * Vgsteff; Vdsatii = T7 * T4; dT4_dVg = T5 * (T0 + T3 * dEsatL_dVg); dT4_dVb = T5 * T3 * dEsatL_dVb; dT4_dVd = T5 * (Vgsteff * dT0_dVd + T3 * dEsatL_dVd); if (selfheat) dT4_dT = T5 * (T3 * dEsatL_dT); else dT4_dT = 0.0; T8 = T4 * Vgsteff; dVdsatii_dVg = T7 * dT4_dVg + T4 * (EsatL + Vgsteff * dEsatL_dVg); dVdsatii_dVb = T7 * dT4_dVb + T8 * dEsatL_dVb; dVdsatii_dVd = T7 * dT4_dVd + T8 * dEsatL_dVd; if (selfheat) dVdsatii_dT = T7 * dT4_dT + T8 * dEsatL_dT; else dVdsatii_dT = 0.0; } else { Vdsatii = Vdsat; dVdsatii_dVg = dVdsat_dVg; dVdsatii_dVb = dVdsat_dVb; dVdsatii_dVd = dVdsat_dVd; dVdsatii_dT = dVdsat_dT; } /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->B3SOIDDdelta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; dT1_dVc = dVdsat_dVc; dT1_dT = dVdsat_dT; T2 = sqrt(T1 * T1 + 4.0 * pParam->B3SOIDDdelta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->B3SOIDDdelta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; dT2_dVc = T0 * dT1_dVc + T3 * dVdsat_dVc; if (selfheat) dT2_dT = T0 * dT1_dT + T3 * dVdsat_dT; else dT2_dT = 0.0; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); dVdseff_dVc = dVdsat_dVc - 0.5 * (dT1_dVc + dT2_dVc); if (selfheat) dVdseff_dT = dVdsat_dT - 0.5 * (dT1_dT + dT2_dT); else dVdseff_dT = 0.0; if (Vdseff > Vds) Vdseff = Vds; /* This code is added to fixed the problem caused by computer precision when Vds is very close to Vdseff. */ diffVds = Vds - Vdseff; /* Effective Vdsii for Iii calculation */ T1 = Vdsatii - Vds - pParam->B3SOIDDdelta; T2 = sqrt(T1 * T1 + 4.0 * pParam->B3SOIDDdelta * Vdsatii); T0 = T1 / T2; T3 = 2.0 * pParam->B3SOIDDdelta / T2; T4 = T0 + T3; dT2_dVg = T4 * dVdsatii_dVg; dT2_dVd = T4 * dVdsatii_dVd - T0; dT2_dVb = T4 * dVdsatii_dVb; if (selfheat) dT2_dT = T4*dVdsatii_dT; else dT2_dT = 0.0; Vdseffii = Vdsatii - 0.5 * (T1 + T2); dVdseffii_dVg = 0.5 * (dVdsatii_dVg - dT2_dVg); dVdseffii_dVd = 0.5 * (dVdsatii_dVd - dT2_dVd + 1.0); dVdseffii_dVb = 0.5 * (dVdsatii_dVb - dT2_dVb); if (selfheat) dVdseffii_dT = 0.5 * (dVdsatii_dT - dT2_dT); else dVdseffii_dT = 0.0; diffVdsii = Vds - Vdseffii; /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abeff * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abeff * dVdsat_dVg - Abeff * Vdsat / Vgst2Vtm + Vdsat * dAbeff_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbeff_dVb * Vdsat + Abeff * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abeff * dVdsat_dVd; dT0_dVc = dVdsat_dVc - T8 * (Abeff * dVdsat_dVc + Vdsat * dAbeff_dVc); if (selfheat) { tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; dT0_dT = dEsatL_dT + dVdsat_dT + T7 * tmp4 * Vgsteff - T8 * (Abeff * dVdsat_dT - Abeff * Vdsat * dVgst2Vtm_dT / Vgst2Vtm); } else dT0_dT = 0.0; T9 = WVCoxRds * Abeff; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abeff * tmp2 + dAbeff_dVg); dT1_dVb = dAbeff_dVb * WVCoxRds + T9 * tmp3; dT1_dVc = dAbeff_dVc * WVCoxRds; if (selfheat) dT1_dT = T9 * tmp4; else dT1_dT = 0.0; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; dVasat_dVc = (dT0_dVc - Vasat * dT1_dVc) / T1; if (selfheat) dVasat_dT = (dT0_dT - Vasat * dT1_dT) / T1; else dVasat_dT = 0.0; /* Calculate VACLM */ if ((pParam->B3SOIDDpclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->B3SOIDDpclm * Abeff * pParam->B3SOIDDlitl); dT0_dVb = -T0 / Abeff * dAbeff_dVb; dT0_dVg = -T0 / Abeff * dAbeff_dVg; dT0_dVc = -T0 / Abeff * dAbeff_dVc; T2 = Vgsteff / EsatL; T1 = Leff * (Abeff + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbeff_dVg); dT1_dVb = Leff * (dAbeff_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; dT1_dVc = Leff * dAbeff_dVc; if (selfheat) dT1_dT = -T2 * dEsatL_dT / Esat; else dT1_dT = 0.0; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); dVACLM_dVc = (T1 * dT0_dVc + T0 * dT1_dVc) * diffVds - T9 * dVdseff_dVc; if (selfheat) dVACLM_dT = T0 * dT1_dT * diffVds - T9 * dVdseff_dT; else dVACLM_dT = 0.0; } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = dVACLM_dVc = dVACLM_dT = 0.0; } /* Calculate VADIBL */ if (pParam->B3SOIDDthetaRout > 0.0) { T8 = Abeff * Vdsat; T0 = Vgst2Vtm * T8; T1 = Vgst2Vtm + T8; dT0_dVg = Vgst2Vtm * Abeff * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbeff_dVg; dT1_dVg = 1.0 + Abeff * dVdsat_dVg + Vdsat * dAbeff_dVg; dT1_dVb = dAbeff_dVb * Vdsat + Abeff * dVdsat_dVb; dT0_dVb = Vgst2Vtm * dT1_dVb; dT1_dVd = Abeff * dVdsat_dVd; dT0_dVd = Vgst2Vtm * dT1_dVd; dT1_dVc = (Abeff * dVdsat_dVc + Vdsat * dAbeff_dVc); dT0_dVc = Vgst2Vtm * dT1_dVc; if (selfheat) { dT0_dT = dVgst2Vtm_dT * T8 + Abeff * Vgst2Vtm * dVdsat_dT; dT1_dT = dVgst2Vtm_dT + Abeff * dVdsat_dT; } else dT0_dT = dT1_dT = 0.0; T9 = T1 * T1; T2 = pParam->B3SOIDDthetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; dVADIBL_dVc = (-dT0_dVc / T1 + T0 * dT1_dVc / T9) / T2; if (selfheat) dVADIBL_dT = (dVgst2Vtm_dT - dT0_dT/T1 + T0*dT1_dT/T9) / T2; else dVADIBL_dT = 0.0; T7 = pParam->B3SOIDDpdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->B3SOIDDpdiblb) * T3; dVADIBL_dVd *= T3; dVADIBL_dVc *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->B3SOIDDpdiblb * T4 * T4; dVADIBL_dVd *= T3; dVADIBL_dVc *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; VADIBL *= T3; } } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = dVADIBL_dVc = dVADIBL_dT = 0.0; } /* Calculate VA */ T8 = pParam->B3SOIDDpvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; if (selfheat) dT0_dT = -T9 * dEsatL_dT / EsatL; else dT0_dT = 0.0; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; if (selfheat) dT0_dT = -T9 * dEsatL_dT; else dT0_dT = 0.0; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; dT1_dVc = (tmp1 * dVADIBL_dVc + tmp2 * dVACLM_dVc) / tmp3; if (selfheat) dT1_dT = (tmp1 * dVADIBL_dT + tmp2 * dVACLM_dT ) / tmp3; else dT1_dT = 0.0; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; dVa_dVc = dVasat_dVc + T0 * dT1_dVc; if (selfheat) dVa_dT = dVasat_dT + T1 * dT0_dT + T0 * dT1_dT; else dVa_dT = 0.0; /* Calculate Ids */ CoxWovL = model->B3SOIDDcox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; if (selfheat) dbeta_dT = CoxWovL * dueff_dT; else dbeta_dT = 0.0; T0 = 1.0 - 0.5 * Abeff * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abeff * dVdseff_dVg - Abeff * Vdseff / Vgst2Vtm + Vdseff * dAbeff_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abeff * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abeff * dVdseff_dVb + dAbeff_dVb * Vdseff) / Vgst2Vtm; dT0_dVc = -0.5 * (Abeff * dVdseff_dVc + dAbeff_dVc * Vdseff) / Vgst2Vtm; if (selfheat) dT0_dT = -0.5 * (Abeff * dVdseff_dT - Abeff * Vdseff / Vgst2Vtm * dVgst2Vtm_dT) / Vgst2Vtm; else dT0_dT = 0.0; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; dfgche1_dVc = Vgsteff * dT0_dVc; if (selfheat) dfgche1_dT = Vgsteff * dT0_dT; else dfgche1_dT = 0.0; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; dfgche2_dVc = (dVdseff_dVc) / EsatL; if (selfheat) dfgche2_dT = (dVdseff_dT - T9 * dEsatL_dT) / EsatL; else dfgche2_dT = 0.0; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; dgche_dVc = (beta * dfgche1_dVc - gche * dfgche2_dVc) / fgche2; if (selfheat) dgche_dT = (beta * dfgche1_dT + fgche1 * dbeta_dT - gche * dfgche2_dT) / fgche2; else dgche_dT = 0.0; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; /* Whoa, these formulas for the derivatives of Idl are convoluted, but I verified them to be correct */ dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; dIdl_dVc = (gche * dVdseff_dVc + T9 * dgche_dVc) / T0; if (selfheat) dIdl_dT = (gche * dVdseff_dT + T9 * dgche_dT - Idl * dRds_dT * gche) / T0; else dIdl_dT = 0.0; T9 = diffVds / Va; T0 = 1.0 + T9; here->B3SOIDDids = Ids = Idl * T0; Gm0 = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; Gds0 = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; Gmb0 = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; Gmc = T0 * dIdl_dVc - Idl * (dVdseff_dVc + T9 * dVa_dVc) / Va; if (selfheat) GmT0 = T0 * dIdl_dT - Idl * (dVdseff_dT + T9 * dVa_dT) / Va; else GmT0 = 0.0; /* This includes all dependencies from Vgsteff, Vbseff, Vcs */ Gm = Gm0 * dVgsteff_dVg + Gmb0 * dVbseff_dVg + Gmc * dVcs_dVg; Gmb = Gm0 * dVgsteff_dVb + Gmb0 * dVbseff_dVb + Gmc * dVcs_dVb; Gds = Gm0 * dVgsteff_dVd + Gmb0 * dVbseff_dVd + Gmc * dVcs_dVd + Gds0; Gme = Gm0 * dVgsteff_dVe + Gmb0 * dVbseff_dVe + Gmc * dVcs_dVe; if (selfheat) GmT = Gm0 * dVgsteff_dT + Gmb0 * dVbseff_dT + Gmc * dVcs_dT + GmT0; else GmT = 0.0; /* calculate substrate current Iii */ T2 = pParam->B3SOIDDalpha1 + pParam->B3SOIDDalpha0 / Leff; if ((T2 <= 0.0) || (pParam->B3SOIDDbeta0 <= 0.0)) { Giig = Giib = Giid = Giie = GiiT = 0.0; here->B3SOIDDiii = Iii = 0.0; } else { T5 = pParam->B3SOIDDbeta0; if (diffVdsii > T5 / EXP_THRESHOLD) { T0 = -T5 / diffVdsii; T10 = T0 / diffVdsii; dT0_dVg = T10 * dVdseffii_dVg; T1 = T2 * diffVdsii * exp(T0); T3 = T1 / diffVdsii * (T0 - 1.0); dT1_dVg = T1 * (dT0_dVg - dVdseffii_dVg / diffVdsii); dT1_dVd = -T3 * (1.0 - dVdseffii_dVd); dT1_dVb = T3 * dVdseffii_dVb; if (selfheat) dT1_dT = T3 * dVdseffii_dT; else dT1_dT = 0.0; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVdsii; dT1_dVg = -T3 * dVdseffii_dVg; dT1_dVd = T3 * (1.0 - dVdseffii_dVd); dT1_dVb = -T3 * dVdseffii_dVb; if (selfheat) dT1_dT = -T3 * dVdseffii_dT; else dT1_dT = 0.0; } here->B3SOIDDiii = Iii = T1 * Ids; T2 = T1 * Gm0 + Ids * dT1_dVg; T3 = T1 * Gds0 + Ids * dT1_dVd; T4 = T1 * Gmb0 + Ids * dT1_dVb; T5 = T1 * Gmc; if (selfheat) T6 = T1 * GmT0 + Ids * dT1_dT; else T6 = 0.0; Giig = T2 * dVgsteff_dVg + T4 * dVbseff_dVg + T5 * dVcs_dVg; Giib = T2 * dVgsteff_dVb + T4 * dVbseff_dVb + T5 * dVcs_dVb; Giid = T2 * dVgsteff_dVd + T4 * dVbseff_dVd + T5 * dVcs_dVd + T3; Giie = T2 * dVgsteff_dVe + T4 * dVbseff_dVe + T5 * dVcs_dVe; if (selfheat) GiiT = T2 * dVgsteff_dT + T4 * dVbseff_dT + T5 * dVcs_dT + T6; else GiiT = 0.0; } /* calculate GIDL current */ T0 = 3 * model->B3SOIDDtox; /* For drain side */ T1 = (Vds - Vgs_eff - pParam->B3SOIDDngidl) / T0; if ((pParam->B3SOIDDagidl <= 0.0) || (pParam->B3SOIDDbgidl <= 0.0) || (T1 <= 0.0)) { Idgidl = Gdgidld = Gdgidlg = 0.0; } else { dT1_dVd = 1 / T0; dT1_dVg = - dT1_dVd * dVgs_eff_dVg; T2 = pParam->B3SOIDDbgidl / T1; if (T2 < EXP_THRESHOLD) { Idgidl = pParam->B3SOIDDweff * pParam->B3SOIDDagidl * T1 * exp(-T2); T3 = Idgidl / T1 * (T2 + 1); Gdgidld = T3 * dT1_dVd; Gdgidlg = T3 * dT1_dVg; } else { T3 = pParam->B3SOIDDweff * pParam->B3SOIDDagidl * MIN_EXP; Idgidl = T3 * T1 ; Gdgidld = T3 * dT1_dVd; Gdgidlg = T3 * dT1_dVg; } } here->B3SOIDDigidl = Idgidl; /* For source side */ T1 = (- Vgs_eff - pParam->B3SOIDDngidl) / T0; if ((pParam->B3SOIDDagidl <= 0.0) || (pParam->B3SOIDDbgidl <= 0.0) || (T1 <= 0.0)) { Isgidl = Gsgidlg = 0; } else { dT1_dVg = - dVgs_eff_dVg / T0; T2 = pParam->B3SOIDDbgidl / T1; if (T2 < EXP_THRESHOLD) { Isgidl = pParam->B3SOIDDweff * pParam->B3SOIDDagidl * T1 * exp(-T2); T3 = Isgidl / T1 * (T2 + 1); Gsgidlg = T3 * dT1_dVg; } else { T3 = pParam->B3SOIDDweff * pParam->B3SOIDDagidl * MIN_EXP; Isgidl = T3 * T1 ; Gsgidlg = T3 * dT1_dVg; } } /* calculate diode and BJT current */ WTsi = pParam->B3SOIDDweff * model->B3SOIDDtsi; NVtm1 = Vtm * pParam->B3SOIDDndiode; NVtm2 = Vtm * pParam->B3SOIDDntun; /* Create exponents first */ T0 = Vbs / NVtm1; if (T0 < 30) { ExpVbs1 = exp(T0); dExpVbs1_dVb = ExpVbs1 / NVtm1; if (selfheat) dExpVbs1_dT = - T0 * ExpVbs1 / Temp; } else { T1 = 1.0686e13; /* exp(30) */ dExpVbs1_dVb = T1 / NVtm1; ExpVbs1 = dExpVbs1_dVb * Vbs - 29.0 * T1; if (selfheat) dExpVbs1_dT = - dExpVbs1_dVb * Vbs / Temp; } T0 = Vbd / NVtm1; if (T0 < 30) { ExpVbd1 = exp(T0); dExpVbd1_dVb = ExpVbd1 / NVtm1; if (selfheat) dExpVbd1_dT = - T0 * ExpVbd1 / Temp; } else { T1 = 1.0686e13; /* exp(30) */ dExpVbd1_dVb = T1 / NVtm1; ExpVbd1 = dExpVbd1_dVb * Vbd - 29.0 * T1; if (selfheat) dExpVbd1_dT = - dExpVbd1_dVb * Vbd / Temp; } if (jtun > 0.0) { T0 = -Vbs / NVtm2; if (T0 < 30) { ExpVbs4 = exp(T0); dExpVbs4_dVb = - ExpVbs4 / NVtm2; if (selfheat) dExpVbs4_dT = - T0 * ExpVbs4 / Temp; } else { T1 = 1.0686e13; /* exp(30) */ dExpVbs4_dVb = - T1 / NVtm2; ExpVbs4 = dExpVbs4_dVb * Vbs - 29.0 * T1; if (selfheat) dExpVbs4_dT = - dExpVbs4_dVb * Vbs / Temp; } T0 = -Vbd / NVtm2; if (T0 < 30) { ExpVbd4 = exp(T0); dExpVbd4_dVb = - ExpVbd4 / NVtm2; if (selfheat) dExpVbd4_dT = - T0 * ExpVbd4 / Temp; } else { T1 = 1.0686e13; /* exp(30) */ dExpVbd4_dVb = - T1 / NVtm2; ExpVbd4 = dExpVbd4_dVb * Vbd - 29.0 * T1; if (selfheat) dExpVbd4_dT = - dExpVbd4_dVb * Vbd / Temp; } } /* Ibs1 / Ibd1 */ if (jdif == 0.0) { Ibs1 = dIbs1_dVb = dIbs1_dT = 0.0; Ibd1 = dIbd1_dVd = dIbd1_dVb = dIbd1_dT = 0.0; } else { T5 = WTsi * jdif; Ibs1 = T5 * (ExpVbs1 - 1.0); dIbs1_dVb = T5 * dExpVbs1_dVb; if (selfheat) dIbs1_dT = Ibs1 / jdif * djdif_dT + T5 * dExpVbs1_dT; Ibd1 = T5 * (ExpVbd1 - 1.0); dIbd1_dVb = T5 * dExpVbd1_dVb; dIbd1_dVd = -dIbd1_dVb; if (selfheat) dIbd1_dT = Ibd1 / jdif * djdif_dT + T5 * dExpVbd1_dT; } /* Ibs2 */ if (jrec == 0.0) { Ibs2 = dIbs2_dVb = dIbs2_dT = 0.0; Ibd2 = dIbd2_dVb = dIbd2_dVd = dIbd2_dT = 0.0; } else { ExpVbs2 = sqrt(ExpVbs1); if (ExpVbs2 > 1e-20) { dExpVbs2_dVb = 0.5 / ExpVbs2 * dExpVbs1_dVb; if (selfheat) dExpVbs2_dT = 0.5 / ExpVbs2 * dExpVbs1_dT; } else { dExpVbs2_dVb = dExpVbs2_dT = 0.0; } ExpVbd2 = sqrt(ExpVbd1); if (ExpVbd2 > 1e-20) { dExpVbd2_dVb = 0.5 / ExpVbd2 * dExpVbd1_dVb; if (selfheat) dExpVbd2_dT = 0.5 / ExpVbd2 * dExpVbd1_dT; } else { dExpVbd2_dVb = dExpVbd2_dT = 0.0; } T8 = WTsi * jrec; T9 = 0.5 * T8 / NVtm1; Ibs2 = T8 * (ExpVbs2 - 1.0); dIbs2_dVb = T8 * dExpVbs2_dVb; if (selfheat) dIbs2_dT = Ibs2 / jrec * djrec_dT + T8 * dExpVbs2_dT; T8 = WTsi * jrec; T9 = 0.5 * T8 / NVtm1; Ibd2 = T8 * (ExpVbd2 - 1.0); dIbd2_dVb = T8 * dExpVbd2_dVb; dIbd2_dVd = -dIbd2_dVb; if (selfheat) dIbd2_dT = Ibd2 / jrec * djrec_dT + T8 * dExpVbd2_dT; } /* Ibjt */ if ((here->B3SOIDDbjtoff == 1) || (Vds == 0.0) || (jbjt == 0.0)) { Ibs3 = dIbs3_dVb = dIbs3_dVd = dIbs3_dT = 0.0; Ibd3 = dIbd3_dVb = dIbd3_dVd = dIbd3_dT = 0.0; here->B3SOIDDic = Ic = Gcd = Gcb = GcT = 0.0; } else { T0 = Leff - pParam->B3SOIDDkbjt1 * Vds; T1 = T0 / pParam->B3SOIDDedl; dT1_dVd = - pParam->B3SOIDDkbjt1 / pParam->B3SOIDDedl; if (T1 < 1e-3) /* Limit to 1/2e4 */ { T2 = 1.0 / (3.0 - 2.0e3 * T1); T1 = (2.0e-3 - T1) * T2; dT1_dVd *= T2 * T2; } else if (T1 > 1.0) { T1 = 1.0; dT1_dVd = 0.0; } BjtA = 1 - 0.5 * T1 * T1; dBjtA_dVd = - T1 * dT1_dVd; T5 = WTsi * jbjt; Ibjt = T5 * (ExpVbs1 - ExpVbd1); dIbjt_dVb = T5 * (dExpVbs1_dVb - dExpVbd1_dVb); dIbjt_dVd = T5 * dExpVbd1_dVb; if (selfheat) dIbjt_dT = T5 * (dExpVbs1_dT - dExpVbd1_dT) + Ibjt / jbjt * djbjt_dT; T3 = (1.0 - BjtA) * T5; T4 = - T5 * dBjtA_dVd; Ibs3 = T3 * ExpVbs1; dIbs3_dVb = T3 * dExpVbs1_dVb; dIbs3_dVd = T4 * ExpVbs1; if (selfheat) dIbs3_dT = Ibs3 / jbjt * djbjt_dT + T3 * dExpVbs1_dT; Ibd3 = T3 * ExpVbd1; dIbd3_dVb = T3 * dExpVbd1_dVb; dIbd3_dVd = T4 * ExpVbd1 - dIbd3_dVb; if (selfheat) dIbd3_dT = Ibd3 / jbjt * djbjt_dT + T3 * dExpVbd1_dT; here->B3SOIDDic = Ic = Ibjt - Ibs3 + Ibd3; Gcd = dIbjt_dVd - dIbs3_dVd + dIbd3_dVd; Gcb = dIbjt_dVb - dIbs3_dVb + dIbd3_dVb; if (selfheat) GcT = dIbjt_dT - dIbs3_dT + dIbd3_dT; else GcT = 0.0; } if (jtun == 0.0) { Ibs4 = dIbs4_dVb = dIbs4_dT = 0.0; Ibd4 = dIbd4_dVb = dIbd4_dVd = dIbd4_dT = 0.0; } else { T5 = WTsi * jtun; Ibs4 = T5 * (1.0 - ExpVbs4); dIbs4_dVb = - T5 * dExpVbs4_dVb; if (selfheat) dIbs4_dT = Ibs4 / jtun * djtun_dT - T5 * dExpVbs4_dT; Ibd4 = T5 * (1.0 - ExpVbd4); dIbd4_dVb = - T5 * dExpVbd4_dVb; dIbd4_dVd = -dIbd4_dVb; if (selfheat) dIbd4_dT = Ibd4 / jtun * djtun_dT - T5 * dExpVbd4_dT; } here->B3SOIDDdum1 = Ibs3 + Ibd4; here->B3SOIDDdum2 = Ibs1; here->B3SOIDDdum3 = Ibjt; here->B3SOIDDdum4 = Ic; here->B3SOIDDitun = - Ibd3 - Ibd4; here->B3SOIDDibs = Ibs = Ibs1 + Ibs2 + Ibs3 + Ibs4; here->B3SOIDDibd = Ibd = Ibd1 + Ibd2 + Ibd3 + Ibd4; Gjsb = dIbs1_dVb + dIbs2_dVb + dIbs3_dVb + dIbs4_dVb; Gjsd = dIbs3_dVd; if (selfheat) GjsT = dIbs1_dT + dIbs2_dT + dIbs3_dT + dIbs4_dT; else GjsT = 0.0; Gjdb = dIbd1_dVb + dIbd2_dVb + dIbd3_dVb + dIbd4_dVb; Gjdd = dIbd1_dVd + dIbd2_dVd + dIbd3_dVd + dIbd4_dVd; if (selfheat) GjdT = dIbd1_dT + dIbd2_dT + dIbd3_dT + dIbd4_dT; else GjdT = 0.0; /* Current through body resistor */ /* Current going out is +ve */ if ((here->B3SOIDDbodyMod == 0) || (here->B3SOIDDbodyMod == 2)) { Ibp = Gbpbs = Gbpgs = Gbpds = Gbpes = Gbpps = GbpT = 0.0; } else { /* here->B3SOIDDbodyMod == 1 */ if (pParam->B3SOIDDrbody < 1e-30) { if (here->B3SOIDDrbodyext <= 1e-30) T0 = 1.0 / 1e-30; else T0 = 1.0 / here->B3SOIDDrbodyext; Ibp = Vbp * T0; Gbpbs = T0 * dVbp_dVb; Gbpps = T0 * dVbp_dVp; Gbpgs = T0 * dVbp_dVg; Gbpds = T0 * dVbp_dVd; Gbpes = 0.0; if (selfheat) GbpT = T0 * dVbp_dT; else GbpT = 0.0; } else { T0 = 1.0 / pParam->B3SOIDDrbody; if (Vbp >= 0.0) { T1 = sqrt(Vcs); T3 = T1 * T0; T5 = 1.0 + here->B3SOIDDrbodyext * T3; T6 = T3 / T5; T2 = 0.5 * T0 / T1; T7 = T2 / (T5 * T5); Ibp = Vbp * T6; /* Whoa, again these derivatives are convoluted, but correct */ Gbpbs = T6 * dVbp_dVb + Vbp * T7 * dVcs_dVb; Gbpps = T6 * dVbp_dVp; Gbpgs = T6 * dVbp_dVg + Vbp * T7 * dVcs_dVg; Gbpds = T6 * dVbp_dVg + Vbp * T7 * dVcs_dVd; Gbpes = T6 * dVbp_dVg + Vbp * T7 * dVcs_dVe; if (selfheat) GbpT = T6 * dVbp_dT + Vbp * T7 * dVcs_dT; else GbpT = 0.0; } else { T1 = sqrt(Vpsdio - Vbs0eff); T3 = T1 * T0; T5 = 1.0 + here->B3SOIDDrbodyext * T3; T6 = T3 / T5; T2 = 0.5 * T0 / T1; Ibp = Vbp * T6; T7 = T2 / (T5 * T5); Gbpbs = T6 * dVbp_dVb; Gbpps = T6 * dVbp_dVp + Vbp * T7 * dVpsdio_dVp; Gbpgs = Vbp * T7 * (dVpsdio_dVg - dVbs0eff_dVg); Gbpds = Vbp * T7 * (dVpsdio_dVd - dVbs0eff_dVd); Gbpes = Vbp * T7 * (dVpsdio_dVe - dVbs0eff_dVe); if (selfheat) GbpT = Vbp * T7 * (dVpsdio_dT - dVbs0eff_dT); else GbpT = 0.0; } } } here->B3SOIDDibp = Ibp; here->B3SOIDDgbpbs = Gbpbs; here->B3SOIDDgbpgs = Gbpgs; here->B3SOIDDgbpds = Gbpds; here->B3SOIDDgbpes = Gbpes; here->B3SOIDDgbpps = Gbpps; if (selfheat) here->B3SOIDDgbpT = GbpT; else { GbpT = 0.0; here->B3SOIDDgbpT = 0.0; } here->B3SOIDDcbodcon = Ibp - (Gbpbs * Vbs + Gbpgs * Vgs + Gbpds * Vds + Gbpes * Ves + Gbpps * Vps + GbpT * delTemp); /* Current going out of drainprime node into the drain of device */ /* "node" means the SPICE circuit node */ here->B3SOIDDcdrain = Ids + Ic; here->B3SOIDDcd = Ids + Ic - Ibd + Iii + Idgidl; here->B3SOIDDcb = Ibs + Ibd + Ibp - Iii - Idgidl - Isgidl; here->B3SOIDDgds = Gds + Gcd; here->B3SOIDDgm = Gm; here->B3SOIDDgmbs = Gmb + Gcb; here->B3SOIDDgme = Gme; if (selfheat) here->B3SOIDDgmT = GmT + GcT; else here->B3SOIDDgmT = 0.0; /* note that sign is switched because power flows out of device into the temperature node. Currently ommit self-heating due to bipolar current because it can cause convergence problem*/ here->B3SOIDDgtempg = -Gm * Vds; here->B3SOIDDgtempb = -Gmb * Vds; here->B3SOIDDgtempe = -Gme * Vds; here->B3SOIDDgtempT = -GmT * Vds; here->B3SOIDDgtempd = -Gds * Vds - Ids; here->B3SOIDDcth = - Ids * Vds - model->B3SOIDDtype * (here->B3SOIDDgtempg * Vgs + here->B3SOIDDgtempb * Vbs + here->B3SOIDDgtempe * Ves + here->B3SOIDDgtempd * Vds) - here->B3SOIDDgtempT * delTemp; /* Body current which flows into drainprime node from the drain of device */ here->B3SOIDDgjdb = Gjdb - Giib; here->B3SOIDDgjdd = Gjdd - (Giid + Gdgidld); here->B3SOIDDgjdg = - (Giig + Gdgidlg); here->B3SOIDDgjde = - Giie; if (selfheat) here->B3SOIDDgjdT = GjdT - GiiT; else here->B3SOIDDgjdT = 0.0; here->B3SOIDDcjd = Ibd - Iii - Idgidl - here->B3SOIDDminIsub/2 - (here->B3SOIDDgjdb * Vbs + here->B3SOIDDgjdd * Vds + here->B3SOIDDgjdg * Vgs + here->B3SOIDDgjde * Ves + here->B3SOIDDgjdT * delTemp); /* Body current which flows into sourceprime node from the source of device */ here->B3SOIDDgjsb = Gjsb; here->B3SOIDDgjsd = Gjsd; here->B3SOIDDgjsg = - Gsgidlg; if (selfheat) here->B3SOIDDgjsT = GjsT; else here->B3SOIDDgjsT = 0.0; here->B3SOIDDcjs = Ibs - Isgidl - here->B3SOIDDminIsub/2 - (here->B3SOIDDgjsb * Vbs + here->B3SOIDDgjsd * Vds + here->B3SOIDDgjsg * Vgs + here->B3SOIDDgjsT * delTemp); /* Current flowing into body node */ here->B3SOIDDgbbs = Giib - Gjsb - Gjdb - Gbpbs; here->B3SOIDDgbgs = Giig + Gdgidlg + Gsgidlg - Gbpgs; here->B3SOIDDgbds = Giid + Gdgidld - Gjsd - Gjdd - Gbpds; here->B3SOIDDgbes = Giie - Gbpes; here->B3SOIDDgbps = - Gbpps; if (selfheat) here->B3SOIDDgbT = GiiT - GjsT - GjdT - GbpT; else here->B3SOIDDgbT = 0.0; here->B3SOIDDcbody = Iii + Idgidl + Isgidl - Ibs - Ibd - Ibp + here->B3SOIDDminIsub - (here->B3SOIDDgbbs * Vbs + here->B3SOIDDgbgs * Vgs + here->B3SOIDDgbds * Vds + here->B3SOIDDgbps * Vps + here->B3SOIDDgbes * Ves + here->B3SOIDDgbT * delTemp); /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abeff * Vdseff / Vgst2Vtm); here->B3SOIDDqinv = -model->B3SOIDDcox * pParam->B3SOIDDweff * Leff * T1; /* Begin CV (charge) model */ if ((model->B3SOIDDxpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbody = 0.0; here->B3SOIDDcggb = here->B3SOIDDcgsb = here->B3SOIDDcgdb = 0.0; here->B3SOIDDcdgb = here->B3SOIDDcdsb = here->B3SOIDDcddb = 0.0; here->B3SOIDDcbgb = here->B3SOIDDcbsb = here->B3SOIDDcbdb = 0.0; goto finished; } else { CoxWL = model->B3SOIDDcox * pParam->B3SOIDDweffCV * pParam->B3SOIDDleffCV; /* By using this Vgsteff,cv, discontinuity in moderate inversion charges can be avoid. However, in capMod=3, Vdsat from IV is used. The dVdsat_dVg is referred to the IV Vgsteff and therefore induces error in the charges derivatives. Fortunately, Vgsteff,iv and Vgsteff,cv are different only in subthreshold where Qsubs is neglectible. So the errors in derivatives is not a serious problem */ if ((VgstNVt > -EXP_THRESHOLD) && (VgstNVt < EXP_THRESHOLD)) { ExpVgst *= ExpVgst; Vgsteff = n * Vtm * log(1.0 + ExpVgst); T0 = ExpVgst / (1.0 + ExpVgst); T1 = -T0 * (dVth_dVb + Vgst / n * dn_dVb) + Vgsteff / n * dn_dVb; dVgsteff_dVd = -T0 * (dVth_dVd + Vgst / n * dn_dVd) + Vgsteff / n * dn_dVd + T1 * dVbseff_dVd; dVgsteff_dVg = T0 * dVgs_eff_dVg + T1 * dVbseff_dVg; dVgsteff_dVb = T1 * dVbseff_dVb; dVgsteff_dVe = T1 * dVbseff_dVe; if (selfheat) dVgsteff_dT = -T0 * (dVth_dT + Vgst / Temp) + Vgsteff / Temp + T1 * dVbseff_dT; else dVgsteff_dT = 0.0; } Vfb = Vth - phi - pParam->B3SOIDDk1 * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->B3SOIDDk1 * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; dVfb_dT = dVth_dT; if ((model->B3SOIDDcapMod == 2) || (model->B3SOIDDcapMod == 3)) { /* Necessary because charge behaviour very strange at Vgsteff = 0 */ Vgsteff += 1e-4; /* Something common in capMod 2 and 3 */ V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1; dVfbeff_dVrg = T1 * dVgs_eff_dVg; if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfb_dT; else dVfbeff_dT = 0.0; Qac0 = -CoxWL * (Vfbeff - Vfb); dQac0_dVrg = -CoxWL * dVfbeff_dVrg; dQac0_dVd = -CoxWL * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = -CoxWL * (dVfbeff_dVb - dVfb_dVb); if (selfheat) dQac0_dT = -CoxWL * (dVfbeff_dT - dVfb_dT); else dQac0_dT = 0.0; T0 = 0.5 * K1; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B3SOIDDk1 == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B3SOIDDk1; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * K1 * (T0 - T1); dQsub0_dVrg = T2 * (dVfbeff_dVrg - dVgs_eff_dVg); dQsub0_dVg = T2; dQsub0_dVd = T2 * dVfbeff_dVd; dQsub0_dVb = T2 * (dVfbeff_dVb + 1); if (selfheat) dQsub0_dT = T2 * dVfbeff_dT; else dQsub0_dT = 0.0; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->B3SOIDDabulkCVfactor; dAbulkCV_dVb = pParam->B3SOIDDabulkCVfactor * dAbulk0_dVb; /* This is actually capMod=2 calculation */ VdsatCV = Vgsteff / AbulkCV; dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; VdsatCV += 1e-5; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; if (model->B3SOIDDcapMod == 2) { /* VdsCV Make it compatible with capMod 3 */ VdsCV = VdseffCV; dVdsCV_dVg = dVdseffCV_dVg; dVdsCV_dVd = dVdseffCV_dVd; dVdsCV_dVb = dVdseffCV_dVb; dVdsCV_dVc = 0.0; /* This is good for Xc calculation */ VdsCV += 1e-5; if (VdsCV > (VdsatCV-1e-7)) VdsCV=VdsatCV-1e-7; /* VcsCV calculation */ T1 = VdsCV - Vcs - VdsCV * VdsCV * DELTA_Vcscv; T5 = 2 * DELTA_Vcscv; T2 = sqrt(T1 * T1 + T5 * VdsCV * VdsCV); dT1_dVb = dVdsCV_dVb * (1.0 - 2.0 * VdsCV * DELTA_Vcscv); dT2_dVb = (T1 * dT1_dVb + T5 * VdsCV * dVdsCV_dVb)/T2; dT1_dVd = dVdsCV_dVd * (1.0 - 2.0 * VdsCV * DELTA_Vcscv); dT2_dVd = (T1 * dT1_dVd + T5 * VdsCV * dVdsCV_dVd)/ T2; dT1_dVg = dVdsCV_dVg * (1.0 - 2.0 * VdsCV * DELTA_Vcscv) ; dT2_dVg = (T1 * dT1_dVg + T5 * VdsCV * dVdsCV_dVg)/T2; dT1_dVc = -1; dT2_dVc = T1 * dT1_dVc / T2; VcsCV = Vcs + 0.5 * (T1 - T2); dVcsCV_dVb = 0.5 * (dT1_dVb - dT2_dVb); dVcsCV_dVg = 0.5 * (dT1_dVg - dT2_dVg); dVcsCV_dVd = 0.5 * (dT1_dVd - dT2_dVd); dVcsCV_dVc = 1.0 + 0.5 * (dT1_dVc - dT2_dVc); if (VcsCV < 0.0) VcsCV = 0.0; else if (VcsCV > VdsCV) VcsCV = VdsCV; /* Xc calculation */ T3 = 2 * VdsatCV - VcsCV; T4 = 2 * VdsatCV - VdsCV; dT4_dVg = 2 * dVdsatCV_dVg - dVdsCV_dVg; dT4_dVd = - dVdsCV_dVd; dT4_dVb = 2 * dVdsatCV_dVb - dVdsCV_dVb; T0 = T3 * VcsCV; T1 = T4 * VdsCV; Xc = T0 / T1; dT0_dVb = VcsCV * (2 * dVdsatCV_dVb - dVcsCV_dVb) + T3 * dVcsCV_dVb; dT0_dVg = VcsCV * (2 * dVdsatCV_dVg - dVcsCV_dVg) + T3 * dVcsCV_dVg; dT0_dVd = 2 * dVcsCV_dVd * (VdsatCV - VcsCV); dT0_dVc = 2 * dVcsCV_dVc * (VdsatCV - VcsCV); dT1_dVb = VdsCV * dT4_dVb + T4 * dVdsCV_dVb; dT1_dVg = VdsCV * dT4_dVg + T4 * dVdsCV_dVg; dT1_dVd = dVdsCV_dVd * T4 + VdsCV * dT4_dVd; T3 = T1 * T1; dXc_dVb = (dT0_dVb - dT1_dVb * Xc) / T1; dXc_dVg = (dT0_dVg - dT1_dVg * Xc) / T1; dXc_dVd = (dT0_dVd - dT1_dVd * Xc) / T1; dXc_dVc = dT0_dVc / T1; T0 = AbulkCV * VcsCV; dT0_dVb = dAbulkCV_dVb * VcsCV + dVcsCV_dVb * AbulkCV; dT0_dVg = dVcsCV_dVg * AbulkCV; dT0_dVd = AbulkCV * dVcsCV_dVd; dT0_dVc = AbulkCV * dVcsCV_dVc; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); dT1_dVb = -6.0 * dT0_dVb; dT1_dVg = 12.0 * (1.0 - 0.5 * dT0_dVg); dT1_dVd = -6.0 * dT0_dVd; dT1_dVc = -6.0 * dT0_dVc; T2 = VcsCV / T1; T4 = T1 * T1; dT2_dVb = ( dVcsCV_dVb * T1 - dT1_dVb * VcsCV ) / T4; dT2_dVg = ( dVcsCV_dVg * T1 - dT1_dVg * VcsCV ) / T4; dT2_dVd = ( dVcsCV_dVd * T1 - dT1_dVd * VcsCV ) / T4; dT2_dVc = ( dVcsCV_dVc * T1 - dT1_dVc * VcsCV ) / T4; T3 = T0 * T2; dT3_dVb = dT0_dVb * T2 + dT2_dVb * T0; dT3_dVg = dT0_dVg * T2 + dT2_dVg * T0; dT3_dVd = dT0_dVd * T2 + dT2_dVd * T0; dT3_dVc = dT0_dVc * T2 + dT2_dVc * T0; T4 = 1.0 - AbulkCV; dT4_dVb = - dAbulkCV_dVb; T5 = 0.5 * VcsCV - T3; dT5_dVb = 0.5 * dVcsCV_dVb - dT3_dVb; dT5_dVg = 0.5 * dVcsCV_dVg - dT3_dVg; dT5_dVd = 0.5 * dVcsCV_dVd - dT3_dVd; dT5_dVc = 0.5 * dVcsCV_dVc - dT3_dVc; T6 = T4 * T5 * CoxWL; T7 = CoxWL * Xc; Qsubs1 = CoxWL * Xc * T4 * T5; dQsubs1_dVb = T6 * dXc_dVb + T7 * ( T4*dT5_dVb + dT4_dVb*T5 ); dQsubs1_dVg = T6 * dXc_dVg + T7 * T4 * dT5_dVg; dQsubs1_dVd = T6 * dXc_dVd + T7 * T4 * dT5_dVd; dQsubs1_dVc = T6 * dXc_dVc + T7 * T4 * dT5_dVc; Qsubs2 = -CoxWL * (1-Xc) * (AbulkCV - 1.0) * Vcs; T2 = CoxWL * (AbulkCV - 1.0) * Vcs; dQsubs2_dVb = T2 * dXc_dVb - CoxWL * (1-Xc) * Vcs * dAbulkCV_dVb; dQsubs2_dVg = T2 * dXc_dVg; dQsubs2_dVd = T2 * dXc_dVd; dQsubs2_dVc = T2 * dXc_dVc - CoxWL * (1-Xc) * (AbulkCV - 1.0); Qbf = Qac0 + Qsub0 + Qsubs1 + Qsubs2; dQbf_dVrg = dQac0_dVrg + dQsub0_dVrg; dQbf_dVg = dQsub0_dVg + dQsubs1_dVg + dQsubs2_dVg; dQbf_dVd = dQac0_dVd + dQsub0_dVd + dQsubs1_dVd + dQsubs2_dVd; dQbf_dVb = dQac0_dVb + dQsub0_dVb + dQsubs1_dVb + dQsubs2_dVb; dQbf_dVc = dQsubs1_dVc + dQsubs2_dVc; dQbf_dVe = 0.0; if (selfheat) dQbf_dT = dQac0_dT + dQsub0_dT; else dQbf_dT = 0.0; } /* End of if (capMod == 2) */ else if (model->B3SOIDDcapMod == 3) { /* Front gate strong inversion depletion charge */ /* VdssatCV calculation */ T1 = Vgsteff + K1*sqrtPhis + 0.5*K1*K1; T2 = Vgsteff + K1*sqrtPhis + Phis + 0.25*K1*K1; dT1_dVb = K1*dsqrtPhis_dVb; dT2_dVb = dT1_dVb + dPhis_dVb; dT1_dVg = dT2_dVg = 1; /* Note VdsatCV is redefined in capMod = 3 */ VdsatCV = T1 - K1*sqrt(T2); dVdsatCV_dVb = dT1_dVb - K1/2/sqrt(T2)*dT2_dVb; dVdsatCV_dVg = dT1_dVg - K1/2/sqrt(T2)*dT2_dVg; T1 = VdsatCV - Vdsat; dT1_dVg = dVdsatCV_dVg - dVdsat_dVg; dT1_dVb = dVdsatCV_dVb - dVdsat_dVb; dT1_dVd = - dVdsat_dVd; dT1_dVc = - dVdsat_dVc; dT1_dT = - dVdsat_dT; if (!(T1 == 0.0)) { T3 = -0.5 * Vdsat / T1; /* Vdsmax */ T2 = T3 * Vdsat; T4 = T2 + T1 * T3 * T3; /* fmax */ if ((Vdseff > T2) && (T1 < 0)) { VdsCV = T4; T5 = -0.5 / (T1 * T1); dT3_dVg = T5 * (T1 * dVdsat_dVg - Vdsat * dT1_dVg); dT3_dVb = T5 * (T1 * dVdsat_dVb - Vdsat * dT1_dVb); dT3_dVd = T5 * (T1 * dVdsat_dVd - Vdsat * dT1_dVd); dT3_dVc = T5 * (T1 * dVdsat_dVc - Vdsat * dT1_dVc); if (selfheat) dT3_dT=T5 * (T1 * dVdsat_dT - Vdsat * dT1_dT); else dT3_dT=0.0; dVdsCV_dVd = T3 * dVdsat_dVd + Vdsat * dT3_dVd + T3 * (2 * T1 * dT3_dVd + T3 * dT1_dVd); dVdsCV_dVg = T3 * dVdsat_dVg + Vdsat * dT3_dVg + T3 * (2 * T1 * dT3_dVg + T3 * dT1_dVg); dVdsCV_dVb = T3 * dVdsat_dVb + Vdsat * dT3_dVb + T3 * (2 * T1 * dT3_dVb + T3 * dT1_dVb); dVdsCV_dVc = T3 * dVdsat_dVc + Vdsat * dT3_dVc + T3 * (2 * T1 * dT3_dVc + T3 * dT1_dVc); if (selfheat) dVdsCV_dT = T3 * dVdsat_dT + Vdsat * dT3_dT + T3 * (2 * T1 * dT3_dT + T3 * dT1_dT ); else dVdsCV_dT = 0.0; } else { T5 = Vdseff / Vdsat; T6 = T5 * T5; T7 = 2 * T1 * T5 / Vdsat; T8 = T7 / Vdsat; VdsCV = Vdseff + T1 * T6; dVdsCV_dVd = dVdseff_dVd + T8 * ( Vdsat * dVdseff_dVd - Vdseff * dVdsat_dVd) + T6 * dT1_dVd; dVdsCV_dVb = dVdseff_dVb + T8 * ( Vdsat * dVdseff_dVb - Vdseff * dVdsat_dVb) + T6 * dT1_dVb; dVdsCV_dVg = dVdseff_dVg + T8 * ( Vdsat * dVdseff_dVg - Vdseff * dVdsat_dVg) + T6 * dT1_dVg; dVdsCV_dVc = dVdseff_dVc + T8 * ( Vdsat * dVdseff_dVc - Vdseff * dVdsat_dVc) + T6 * dT1_dVc; if (selfheat) dVdsCV_dT = dVdseff_dT + T8 * ( Vdsat * dVdseff_dT - Vdseff * dVdsat_dT ) + T6 * dT1_dT ; else dVdsCV_dT = 0.0; } } else { VdsCV = Vdseff; dVdsCV_dVb = dVdseff_dVb; dVdsCV_dVd = dVdseff_dVd; dVdsCV_dVg = dVdseff_dVg; dVdsCV_dVc = dVdseff_dVc; dVdsCV_dT = dVdseff_dT; } if (VdsCV < 0.0) VdsCV = 0.0; VdsCV += 1e-4; if (VdsCV > (VdsatCV - 1e-7)) { VdsCV = VdsatCV - 1e-7; } Phisd = Phis + VdsCV; dPhisd_dVb = dPhis_dVb + dVdsCV_dVb; dPhisd_dVd = dVdsCV_dVd; dPhisd_dVg = dVdsCV_dVg; dPhisd_dVc = dVdsCV_dVc; dPhisd_dT = dVdsCV_dT; sqrtPhisd = sqrt(Phisd); /* Qdep0 - Depletion charge at Vgs=Vth */ T10 = CoxWL * K1; Qdep0 = T10 * sqrtPhis; dQdep0_dVb = T10 * dsqrtPhis_dVb; /* VcsCV calculation */ T1 = VdsCV - Vcs - VdsCV * VdsCV * DELTA_Vcscv; T5 = 2 * DELTA_Vcscv; T2 = sqrt(T1 * T1 + T5 * VdsCV * VdsCV); dT1_dVb = dVdsCV_dVb * (1.0 - 2.0 * VdsCV * DELTA_Vcscv); dT2_dVb = (T1 * dT1_dVb + T5 * VdsCV * dVdsCV_dVb)/T2; dT1_dVd = dVdsCV_dVd * (1.0 - 2.0 * VdsCV * DELTA_Vcscv); dT2_dVd = (T1 * dT1_dVd + T5 * VdsCV * dVdsCV_dVd)/ T2; dT1_dVg = dVdsCV_dVg * (1.0 - 2.0 * VdsCV * DELTA_Vcscv) ; dT2_dVg = (T1 * dT1_dVg + T5 * VdsCV * dVdsCV_dVg)/T2; dT1_dVc = dVdsCV_dVc * (1.0 - 2.0 * VdsCV * DELTA_Vcscv) - 1; dT2_dVc = (T1 * dT1_dVc + T5 * VdsCV * dVdsCV_dVc)/T2; if (selfheat) { dT1_dT = dVdsCV_dT * (1.0 - 2.0 * VdsCV * DELTA_Vcscv); dT2_dT = (T1 * dT1_dT + T5 * VdsCV * dVdsCV_dT )/ T2; } else dT1_dT = dT2_dT = 0.0; VcsCV = Vcs + 0.5*(T1 - T2); dVcsCV_dVb = 0.5 * (dT1_dVb - dT2_dVb); dVcsCV_dVg = 0.5 * (dT1_dVg - dT2_dVg); dVcsCV_dVd = 0.5 * (dT1_dVd - dT2_dVd); dVcsCV_dVc = 1 + 0.5 * (dT1_dVc - dT2_dVc); if (selfheat) dVcsCV_dT = 0.5 * (dT1_dT - dT2_dT); else dVcsCV_dT = 0.0; Phisc = Phis + VcsCV; dPhisc_dVb = dPhis_dVb + dVcsCV_dVb; dPhisc_dVd = dVcsCV_dVd; dPhisc_dVg = dVcsCV_dVg; dPhisc_dVc = dVcsCV_dVc; dPhisc_dT = dVcsCV_dT; sqrtPhisc = sqrt(Phisc); /* Xc calculation */ T1 = Vgsteff + K1*sqrtPhis - 0.5*VdsCV; T2 = CONST_2OV3*K1*(Phisd*sqrtPhisd - Phis*sqrtPhis); T3 = Vgsteff + K1*sqrtPhis - 0.5*VcsCV; T4 = CONST_2OV3*K1*(Phisc*sqrtPhisc - Phis*sqrtPhis); T5 = T1*VdsCV - T2; T6 = T3*VcsCV - T4; Xc = T6/T5; dT1_dVb = K1*dsqrtPhis_dVb - 0.5*dVdsCV_dVb; dT2_dVb = K1*(sqrtPhisd*dPhisd_dVb - sqrtPhis*dPhis_dVb); dT3_dVb = K1*dsqrtPhis_dVb - 0.5*dVcsCV_dVb; dT4_dVb = K1*(sqrtPhisc*dPhisc_dVb - sqrtPhis*dPhis_dVb); dT1_dVd = - 0.5*dVdsCV_dVd; dT2_dVd = K1 * (sqrtPhisd*dPhisd_dVd); dT3_dVd = - 0.5*dVcsCV_dVd; dT4_dVd = K1 * (sqrtPhisc*dPhisc_dVd); dT1_dVg = 1 - 0.5*dVdsCV_dVg; dT2_dVg = K1 * (sqrtPhisd*dPhisd_dVg); dT3_dVg = 1 - 0.5*dVcsCV_dVg; dT4_dVg = K1 * (sqrtPhisc*dPhisc_dVg); dT1_dVc = - 0.5*dVdsCV_dVc; dT2_dVc = K1 * (sqrtPhisd*dPhisd_dVc); dT3_dVc = - 0.5*dVcsCV_dVc; dT4_dVc = K1 * (sqrtPhisc*dPhisc_dVc); if (selfheat) { dT1_dT = - 0.5*dVdsCV_dT; dT2_dT = K1 * (sqrtPhisd*dPhisd_dT); dT3_dT = - 0.5*dVcsCV_dT; dT4_dT = K1 * (sqrtPhisc*dPhisc_dT); } else dT1_dT = dT2_dT = dT3_dT = dT4_dT = 0.0; dT5_dVb = T1 * dVdsCV_dVb + VdsCV * dT1_dVb - dT2_dVb; dT6_dVb = T3 * dVcsCV_dVb + VcsCV * dT3_dVb - dT4_dVb; dT5_dVd = T1 * dVdsCV_dVd + VdsCV * dT1_dVd - dT2_dVd; dT6_dVd = T3 * dVcsCV_dVd + VcsCV * dT3_dVd - dT4_dVd; dT5_dVg = T1 * dVdsCV_dVg + VdsCV * dT1_dVg - dT2_dVg; dT6_dVg = T3 * dVcsCV_dVg + VcsCV * dT3_dVg - dT4_dVg; dT5_dVc = T1 * dVdsCV_dVc + VdsCV * dT1_dVc - dT2_dVc; dT6_dVc = T3 * dVcsCV_dVc + VcsCV * dT3_dVc - dT4_dVc; if (selfheat) { dT5_dT = T1 * dVdsCV_dT + VdsCV * dT1_dT - dT2_dT; dT6_dT = T3 * dVcsCV_dT + VcsCV * dT3_dT - dT4_dT; } else dT5_dT = dT6_dT = 0.0; dXc_dVb = (dT6_dVb - T6/T5 * dT5_dVb) / T5; dXc_dVd = (dT6_dVd - T6/T5 * dT5_dVd) / T5; dXc_dVg = (dT6_dVg - T6/T5 * dT5_dVg) / T5; dXc_dVc = (dT6_dVc - T6/T5 * dT5_dVc) / T5; if (selfheat) dXc_dT = (dT6_dT - T6/T5 * dT5_dT ) / T5; else dXc_dT = 0.0; T10 = Phis * sqrtPhis ; T5 = Phisc * sqrtPhisc; T0 = T5 - T10; T1 = Vgsteff + K1*sqrtPhis + Phis; T2 = Phisc*T5 - Phis*T10; T3 = K1*VcsCV*(Phis + 0.5*VcsCV); dT0_dVb = 1.5 *(sqrtPhisc*dPhisc_dVb-sqrtPhis*dPhis_dVb); dT1_dVb = (0.5*K1/sqrtPhis + 1) * dPhis_dVb; dT2_dVb = 2.5 * (T5 * dPhisc_dVb - T10 * dPhis_dVb); dT3_dVb = K1 * ( VcsCV * (dPhis_dVb + 0.5 * dVcsCV_dVb) + dVcsCV_dVb * (Phis + 0.5*VcsCV)); dT0_dVd = 1.5 * sqrtPhisc * dPhisc_dVd; dT1_dVd = 0; dT2_dVd = 2.5 * T5 * dPhisc_dVd; dT3_dVd = K1 * (Phis + VcsCV) * dVcsCV_dVd; dT0_dVg = 1.5 * sqrtPhisc * dPhisc_dVg; dT1_dVg = 1; dT2_dVg = 2.5 * T5 * dPhisc_dVg; dT3_dVg = K1 * (VcsCV * 0.5 * dVcsCV_dVg + dVcsCV_dVg * (Phis + 0.5*VcsCV)); dT0_dVc = 1.5 * sqrtPhisc * dPhisc_dVc; dT1_dVc = 0.0; dT2_dVc = 2.5 * T5 * dPhisc_dVc; dT3_dVc = K1 * (VcsCV * 0.5 * dVcsCV_dVc + dVcsCV_dVc * (Phis + 0.5*VcsCV)); if (selfheat) { dT0_dT = 1.5 * sqrtPhisc * dPhisc_dT; dT1_dT = 0; dT2_dT = 2.5 * T5 * dPhisc_dT; dT3_dT = K1 * (Phis + VcsCV) * dVcsCV_dT; } else dT0_dT = dT1_dT = dT2_dT = dT3_dT = 0.0; Nomi = K1*(CONST_2OV3*T1*T0 - 0.4*T2 - T3); dNomi_dVb = K1*(CONST_2OV3 * (T1 * dT0_dVb + T0*dT1_dVb) - 0.4 * dT2_dVb - dT3_dVb); dNomi_dVd = K1*(CONST_2OV3 * (T1 * dT0_dVd + T0*dT1_dVd) - 0.4 * dT2_dVd - dT3_dVd); dNomi_dVg = K1*(CONST_2OV3 * (T1 * dT0_dVg + T0*dT1_dVg) - 0.4 * dT2_dVg - dT3_dVg); dNomi_dVc = K1*(CONST_2OV3 * (T1 * dT0_dVc + T0*dT1_dVc) - 0.4 * dT2_dVc - dT3_dVc); if (selfheat) dNomi_dT = K1*(CONST_2OV3 * (T1 * dT0_dT + T0*dT1_dT ) - 0.4 * dT2_dT - dT3_dT ); else dNomi_dT = 0.0; T4 = Vgsteff + K1*sqrtPhis - 0.5*VdsCV; T5 = CONST_2OV3*K1*(Phisd*sqrtPhisd - T10); dT4_dVb = K1 * dsqrtPhis_dVb - 0.5*dVdsCV_dVb; dT5_dVb = K1*(sqrtPhisd*dPhisd_dVb - sqrtPhis*dPhis_dVb); dT4_dVd = - 0.5*dVdsCV_dVd; dT5_dVd = K1*( sqrtPhisd * dPhisd_dVd); dT4_dVg = 1 - 0.5 * dVdsCV_dVg; dT5_dVg = K1* sqrtPhisd * dPhisd_dVg; dT4_dVc = - 0.5 * dVdsCV_dVc; dT5_dVc = K1* sqrtPhisd * dPhisd_dVc; if (selfheat) { dT4_dT = - 0.5 * dVdsCV_dT; dT5_dT = K1* sqrtPhisd * dPhisd_dT; } else dT4_dT = dT5_dT = 0.0; Denomi = T4*VdsCV - T5; dDenomi_dVb = VdsCV*dT4_dVb + T4*dVdsCV_dVb - dT5_dVb; dDenomi_dVd = VdsCV*dT4_dVd + T4*dVdsCV_dVd - dT5_dVd; dDenomi_dVg = VdsCV*dT4_dVg + T4*dVdsCV_dVg - dT5_dVg; dDenomi_dVc = VdsCV*dT4_dVc + T4*dVdsCV_dVc - dT5_dVc; if (selfheat) dDenomi_dT = VdsCV*dT4_dT + T4*dVdsCV_dT - dT5_dT; else dDenomi_dT = 0.0; T6 = -CoxWL / Denomi; Qsubs1 = T6 * Nomi; dQsubs1_dVb = T6*(dNomi_dVb - Nomi / Denomi*dDenomi_dVb); dQsubs1_dVg = T6*(dNomi_dVg - Nomi / Denomi*dDenomi_dVg); dQsubs1_dVd = T6*(dNomi_dVd - Nomi / Denomi*dDenomi_dVd); dQsubs1_dVc = T6*(dNomi_dVc - Nomi / Denomi*dDenomi_dVc); if (selfheat) dQsubs1_dT = T6*(dNomi_dT - Nomi / Denomi*dDenomi_dT ); else dQsubs1_dT = 0.0; T6 = sqrt(1e-4 + phi - Vbs0eff); T7 = K1 * CoxWL; T8 = 1 - Xc; T10 = T7 * T6; T11 = T7 * T8 * 0.5 / T6; Qsubs2 = -T10 * T8 ; dQsubs2_dVg = T10 * dXc_dVg; dQsubs2_dVb = T10 * dXc_dVb; dQsubs2_dVd = T10 * dXc_dVd + T11 * dVbs0eff_dVd; dQsubs2_dVc = T10 * dXc_dVc; dQsubs2_dVe = T11 * dVbs0eff_dVe; dQsubs2_dVrg = T11 * dVbs0eff_dVg; if (selfheat) dQsubs2_dT = T10 * dXc_dT + T11 * dVbs0eff_dT; else dQsubs2_dT = 0.0; Qbf = Qac0 + Qsub0 + Qsubs1 + Qsubs2 + Qdep0; dQbf_dVrg = dQac0_dVrg + dQsub0_dVrg + dQsubs2_dVrg; dQbf_dVg = dQsub0_dVg + dQsubs1_dVg + dQsubs2_dVg ; dQbf_dVd = dQac0_dVd + dQsub0_dVd + dQsubs1_dVd + dQsubs2_dVd; dQbf_dVb = dQac0_dVb + dQsub0_dVb + dQsubs1_dVb + dQsubs2_dVb + dQdep0_dVb; dQbf_dVc = dQsubs1_dVc + dQsubs2_dVc; dQbf_dVe = dQsubs2_dVe; if (selfheat) dQbf_dT = dQac0_dT + dQsub0_dT + dQsubs1_dT + dQsubs2_dT; else dQbf_dT = 0.0; } /* End of if capMod == 3 */ /* Something common in both capMod 2 or 3 */ /* Backgate charge */ CboxWL = pParam->B3SOIDDkb3 * Cbox * pParam->B3SOIDDweffCV * pParam->B3SOIDDleffCV; T0 = 0.5 * K1; T2 = sqrt(phi - Vbs0t); T3 = phi + K1 * T2 - Vbs0t; T4 = sqrt(T0 * T0 + T3); Qsicv = K1 * CoxWL * ( T0 - T4); T6 = CoxWL * T0 / T4 * (1 + T0 / T2); if (selfheat) dQsicv_dT = T6 * dVbs0t_dT; else dQsicv_dT = 0.0; T2 = sqrt(phi - Vbs0mos); T3 = phi + K1 * T2 - Vbs0mos; T4 = sqrt(T0 * T0 + T3); Qbf0 = K1 * CoxWL * ( T0 - T4); T6 = CoxWL * T0 / T4 * (1 + T0 / T2); dQbf0_dVe = T6 * dVbs0mos_dVe; if (selfheat) dQbf0_dT = T6 * dVbs0mos_dT; else dQbf0_dT = 0.0; T5 = -CboxWL * (Vbsdio - Vbs0); T6 = CboxWL * Xc; Qe1 = -Qsicv + Qbf0 + T5 * Xc; dQe1_dVg = T5 * (dXc_dVg * dVgsteff_dVg + dXc_dVb * dVbseff_dVg + dXc_dVc * dVcs_dVg) - T6 * dVbsdio_dVg; dQe1_dVb = T5 * (dXc_dVg * dVgsteff_dVb + dXc_dVb * dVbseff_dVb + dXc_dVc * dVcs_dVb) - T6 * dVbsdio_dVb; dQe1_dVd = T5 * (dXc_dVg * dVgsteff_dVd + dXc_dVb * dVbseff_dVd + dXc_dVc * dVcs_dVd + dXc_dVd) - T6 * dVbsdio_dVd; dQe1_dVe = dQbf0_dVe + T6 * (dVbs0_dVe - dVbsdio_dVe); if (selfheat) dQe1_dT = -dQsicv_dT + dQbf0_dT + T5 * (dXc_dVg * dVgsteff_dT + dXc_dVb * dVbseff_dT + dXc_dVc * dVcs_dT + dXc_dT ) + T6 * (dVbs0_dT - dVbsdio_dT); else dQe1_dT = 0.0; T2 = -model->B3SOIDDcboxt * pParam->B3SOIDDweffCV * pParam->B3SOIDDleffCV; T3 = T2 * 0.5 * (1 - Xc); T4 = T2 * 0.5 * (VdsCV - VcsCV); Qe2 = T2 * 0.5 * (1 - Xc) * (VdsCV - VcsCV); /* T10 - dVgsteff, T11 - dVbseff, T12 - dVcs */ T10 = T3 * (dVdsCV_dVg - dVcsCV_dVg) - T4 * dXc_dVg; T11 = T3 * (dVdsCV_dVb - dVcsCV_dVb) - T4 * dXc_dVb; T12 = T3 * (dVdsCV_dVc - dVcsCV_dVc) - T4 * dXc_dVc; dQe2_dVg = T10 * dVgsteff_dVg + T11 * dVbseff_dVg + T12 * dVcs_dVg; dQe2_dVb = T10 * dVgsteff_dVb + T11 * dVbseff_dVb + T12 * dVcs_dVb; dQe2_dVd = T10 * dVgsteff_dVd + T11 * dVbseff_dVd + T12 * dVcs_dVd + T3 * (dVdsCV_dVd - dVcsCV_dVd) - T4 * dXc_dVd; dQe2_dVe = T10 * dVgsteff_dVe + T11 * dVbseff_dVe + T12 * dVcs_dVe; if (selfheat) dQe2_dT = T10 * dVgsteff_dT + T11 * dVbseff_dT + T12 * dVcs_dT + T3 * (dVdsCV_dT - dVcsCV_dT ) - T4 * dXc_dT; else dQe2_dT = 0.0; /* This transform all the dependency on Vgsteff, Vbseff, Vcs into real ones */ Cbg = dQbf_dVrg + dQbf_dVg * dVgsteff_dVg + dQbf_dVb * dVbseff_dVg + dQbf_dVc * dVcs_dVg; Cbb = dQbf_dVg * dVgsteff_dVb + dQbf_dVb * dVbseff_dVb + dQbf_dVc * dVcs_dVb; Cbd = dQbf_dVg * dVgsteff_dVd + dQbf_dVb * dVbseff_dVd + dQbf_dVc * dVcs_dVd + dQbf_dVd; Cbe = dQbf_dVg * dVgsteff_dVe + dQbf_dVb * dVbseff_dVe + dQbf_dVc * dVcs_dVe + dQbf_dVe; if (selfheat) CbT = dQbf_dVg * dVgsteff_dT + dQbf_dVb * dVbseff_dT + dQbf_dVc * dVcs_dT + dQbf_dT; else CbT = 0.0; Ce1g = dQe1_dVg; Ce1b = dQe1_dVb; Ce1d = dQe1_dVd; Ce1e = dQe1_dVe; Ce1T = dQe1_dT; Ce2g = dQe2_dVg; Ce2b = dQe2_dVb; Ce2d = dQe2_dVd; Ce2e = dQe2_dVe; Ce2T = dQe2_dT; /* Total inversion charge */ T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qinv = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); /* Inversion charge partitioning into S / D */ if (model->B3SOIDDxpart > 0.5) { /* 0/100 Charge partition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd1 = CoxWL * T5 * dVdseffCV_dVd; Csb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); } else if (model->B3SOIDDxpart < 0.5) { /* 40/60 Charge partition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg1 = T4 + T5 * dVdseffCV_dVg; Csd1 = T5 * dVdseffCV_dVd; Csb1 = T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb; } else { /* 50/50 Charge partition model */ qsrc = - 0.5 * qinv; Csg1 = - 0.5 * Cgg1; Csb1 = - 0.5 * Cgb1; Csd1 = - 0.5 * Cgd1; } Csg = Csg1 * dVgsteff_dVg + Csb1 * dVbseff_dVg; Csd = Csd1 + Csg1 * dVgsteff_dVd + Csb1 * dVbseff_dVd; Csb = Csg1 * dVgsteff_dVb + Csb1 * dVbseff_dVb; Cse = Csg1 * dVgsteff_dVe + Csb1 * dVbseff_dVe; if (selfheat) CsT = Csg1 * dVgsteff_dT + Csb1 * dVbseff_dT; else CsT = 0.0; T0 = QEX_FACT * K1 * CoxWL; Qex = T0 * (Vbs - Vbsdio); dQex_dVg = - T0 * dVbsdio_dVg; dQex_dVb = T0 * (1 - dVbsdio_dVb); dQex_dVd = - T0 * dVbsdio_dVd; dQex_dVe = - T0 * dVbsdio_dVe; if (selfheat) dQex_dT = - T0 * dVbsdio_dT; else dQex_dT = 0.0; qgate = qinv - (Qbf + Qe2); qbody = (Qbf - Qe1 + Qex); qsub = Qe1 + Qe2 - Qex; qdrn = -(qinv + qsrc); Cgg = (Cgg1 * dVgsteff_dVg + Cgb1 * dVbseff_dVg) - Cbg ; Cgd = (Cgd1 + Cgg1 * dVgsteff_dVd + Cgb1 * dVbseff_dVd)-Cbd; Cgb = (Cgb1 * dVbseff_dVb + Cgg1 * dVgsteff_dVb) - Cbb; Cge = (Cgg1 * dVgsteff_dVe + Cgb1 * dVbseff_dVe) - Cbe; if (selfheat) CgT = (Cgg1 * dVgsteff_dT + Cgb1 * dVbseff_dT ) - CbT; else CgT = 0.0; here->B3SOIDDcggb = Cgg - Ce2g; here->B3SOIDDcgsb = - (Cgg + Cgd + Cgb + Cge) + (Ce2g + Ce2d + Ce2b + Ce2e); here->B3SOIDDcgdb = Cgd - Ce2d; here->B3SOIDDcgeb = Cge - Ce2e; here->B3SOIDDcgT = CgT - Ce2T; here->B3SOIDDcbgb = Cbg - Ce1g + dQex_dVg; here->B3SOIDDcbsb = -(Cbg + Cbd + Cbb + Cbe) + (Ce1g + Ce1d + Ce1b + Ce1e) - (dQex_dVg + dQex_dVd + dQex_dVb + dQex_dVe); here->B3SOIDDcbdb = Cbd - Ce1d + dQex_dVd; here->B3SOIDDcbeb = Cbe - Ce1e + dQex_dVe; here->B3SOIDDcbT = CbT - Ce1T + dQex_dT; here->B3SOIDDcegb = Ce1g + Ce2g - dQex_dVg; here->B3SOIDDcesb = -(Ce1g + Ce1d + Ce1b + Ce1e) -(Ce2g + Ce2d + Ce2b + Ce2e) +(dQex_dVg + dQex_dVd + dQex_dVb + dQex_dVe); here->B3SOIDDcedb = Ce1d + Ce2d - dQex_dVd; here->B3SOIDDceeb = Ce1e + Ce2e - dQex_dVe; here->B3SOIDDceT = Ce1T + Ce2T - dQex_dT; here->B3SOIDDcdgb = -(Cgg + Cbg + Csg); here->B3SOIDDcddb = -(Cgd + Cbd + Csd); here->B3SOIDDcdeb = -(Cge + Cbe + Cse); here->B3SOIDDcdT = -(CgT + CbT + CsT); here->B3SOIDDcdsb = (Cgg + Cgd + Cgb + Cge + Cbg + Cbd + Cbb + Cbe + Csg + Csd + Csb + Cse); } /* End of if capMod == 2 or capMod ==3 */ } finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ if (ChargeComputationNeeded) { /* Intrinsic S/D junction charge */ PhiBSWG = model->B3SOIDDGatesidewallJctPotential; MJSWG = model->B3SOIDDbodyJctGateSideGradingCoeff; cjsbs = model->B3SOIDDunitLengthGateSidewallJctCap * pParam->B3SOIDDweff * model->B3SOIDDtsi / 1e-7; if (Vbs < 0.0) { arg = 1.0 - Vbs / PhiBSWG; if (MJSWG == 0.5) dT3_dVb = 1.0 / sqrt(arg); else dT3_dVb = exp(-MJSWG * log(arg)); T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); } else { T3 = Vbs * ( 1 + 0.5 * MJSWG * Vbs / PhiBSWG); dT3_dVb = 1 + MJSWG * Vbs / PhiBSWG; } qjs = cjsbs * T3 + model->B3SOIDDtt * Ibs1; gcjsbs = cjsbs * dT3_dVb + model->B3SOIDDtt * dIbs1_dVb; if (selfheat) gcjsT = model->B3SOIDDtt * dIbs1_dT; else gcjsT = 0.0; if (Vbd < 0.0) { arg = 1.0 - Vbd / PhiBSWG; if (MJSWG == 0.5) dT3_dVb = 1.0 / sqrt(arg); else dT3_dVb = exp(-MJSWG * log(arg)); T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); } else { T3 = Vbd * ( 1 + 0.5 * MJSWG * Vbd / PhiBSWG); dT3_dVb = 1 + MJSWG * Vbd / PhiBSWG; } dT3_dVd = - dT3_dVb; qjd = cjsbs * T3 + model->B3SOIDDtt * Ibd1; gcjdbs = cjsbs * dT3_dVb + model->B3SOIDDtt * dIbd1_dVb; gcjdds = cjsbs * dT3_dVd + model->B3SOIDDtt * dIbd1_dVd; if (selfheat) gcjdT = model->B3SOIDDtt * dIbd1_dT; else gcjdT = 0.0; qdrn -= qjd; qbody += (qjs + qjd); qsrc = -(qgate + qbody + qdrn + qsub); /* Update the conductance */ here->B3SOIDDcddb -= gcjdds; here->B3SOIDDcdT -= gcjdT; here->B3SOIDDcdsb += gcjdds + gcjdbs; here->B3SOIDDcbdb += (gcjdds); here->B3SOIDDcbT += (gcjdT + gcjsT); here->B3SOIDDcbsb -= (gcjdds + gcjdbs + gcjsbs); /* Extrinsic Bottom S/D to substrate charge */ T10 = -model->B3SOIDDtype * ves; /* T10 is vse without type conversion */ if ( ((pParam->B3SOIDDnsub > 0) && (model->B3SOIDDtype > 0)) || ((pParam->B3SOIDDnsub < 0) && (model->B3SOIDDtype < 0)) ) { if (T10 < pParam->B3SOIDDvsdfb) { here->B3SOIDDqse = here->B3SOIDDcsbox * (T10 - pParam->B3SOIDDvsdfb); here->B3SOIDDgcse = here->B3SOIDDcsbox; } else if (T10 < pParam->B3SOIDDsdt1) { T0 = T10 - pParam->B3SOIDDvsdfb; T1 = T0 * T0; here->B3SOIDDqse = T0 * (here->B3SOIDDcsbox - pParam->B3SOIDDst2 / 3 * T1) ; here->B3SOIDDgcse = here->B3SOIDDcsbox - pParam->B3SOIDDst2 * T1; } else if (T10 < pParam->B3SOIDDvsdth) { T0 = T10 - pParam->B3SOIDDvsdth; T1 = T0 * T0; here->B3SOIDDqse = here->B3SOIDDcsmin * T10 + here->B3SOIDDst4 + pParam->B3SOIDDst3 / 3 * T0 * T1; here->B3SOIDDgcse = here->B3SOIDDcsmin + pParam->B3SOIDDst3 * T1; } else { here->B3SOIDDqse = here->B3SOIDDcsmin * T10 + here->B3SOIDDst4; here->B3SOIDDgcse = here->B3SOIDDcsmin; } } else { if (T10 < pParam->B3SOIDDvsdth) { here->B3SOIDDqse = here->B3SOIDDcsmin * (T10 - pParam->B3SOIDDvsdth); here->B3SOIDDgcse = here->B3SOIDDcsmin; } else if (T10 < pParam->B3SOIDDsdt1) { T0 = T10 - pParam->B3SOIDDvsdth; T1 = T0 * T0; here->B3SOIDDqse = T0 * (here->B3SOIDDcsmin - pParam->B3SOIDDst2 / 3 * T1) ; here->B3SOIDDgcse = here->B3SOIDDcsmin - pParam->B3SOIDDst2 * T1; } else if (T10 < pParam->B3SOIDDvsdfb) { T0 = T10 - pParam->B3SOIDDvsdfb; T1 = T0 * T0; here->B3SOIDDqse = here->B3SOIDDcsbox * T10 + here->B3SOIDDst4 + pParam->B3SOIDDst3 / 3 * T0 * T1; here->B3SOIDDgcse = here->B3SOIDDcsbox + pParam->B3SOIDDst3 * T1; } else { here->B3SOIDDqse = here->B3SOIDDcsbox * T10 + here->B3SOIDDst4; here->B3SOIDDgcse = here->B3SOIDDcsbox; } } /* T11 is vde without type conversion */ T11 = model->B3SOIDDtype * (vds - ves); if ( ((pParam->B3SOIDDnsub > 0) && (model->B3SOIDDtype > 0)) || ((pParam->B3SOIDDnsub < 0) && (model->B3SOIDDtype < 0)) ) { if (T11 < pParam->B3SOIDDvsdfb) { here->B3SOIDDqde = here->B3SOIDDcdbox * (T11 - pParam->B3SOIDDvsdfb); here->B3SOIDDgcde = here->B3SOIDDcdbox; } else if (T11 < pParam->B3SOIDDsdt1) { T0 = T11 - pParam->B3SOIDDvsdfb; T1 = T0 * T0; here->B3SOIDDqde = T0 * (here->B3SOIDDcdbox - pParam->B3SOIDDdt2 / 3 * T1) ; here->B3SOIDDgcde = here->B3SOIDDcdbox - pParam->B3SOIDDdt2 * T1; } else if (T11 < pParam->B3SOIDDvsdth) { T0 = T11 - pParam->B3SOIDDvsdth; T1 = T0 * T0; here->B3SOIDDqde = here->B3SOIDDcdmin * T11 + here->B3SOIDDdt4 + pParam->B3SOIDDdt3 / 3 * T0 * T1; here->B3SOIDDgcde = here->B3SOIDDcdmin + pParam->B3SOIDDdt3 * T1; } else { here->B3SOIDDqde = here->B3SOIDDcdmin * T11 + here->B3SOIDDdt4; here->B3SOIDDgcde = here->B3SOIDDcdmin; } } else { if (T11 < pParam->B3SOIDDvsdth) { here->B3SOIDDqde = here->B3SOIDDcdmin * (T11 - pParam->B3SOIDDvsdth); here->B3SOIDDgcde = here->B3SOIDDcdmin; } else if (T11 < pParam->B3SOIDDsdt1) { T0 = T11 - pParam->B3SOIDDvsdth; T1 = T0 * T0; here->B3SOIDDqde = T0 * (here->B3SOIDDcdmin - pParam->B3SOIDDdt2 / 3 * T1) ; here->B3SOIDDgcde = here->B3SOIDDcdmin - pParam->B3SOIDDdt2 * T1; } else if (T11 < pParam->B3SOIDDvsdfb) { T0 = T11 - pParam->B3SOIDDvsdfb; T1 = T0 * T0; here->B3SOIDDqde = here->B3SOIDDcdbox * T11 + here->B3SOIDDdt4 + pParam->B3SOIDDdt3 / 3 * T0 * T1; here->B3SOIDDgcde = here->B3SOIDDcdbox + pParam->B3SOIDDdt3 * T1; } else { here->B3SOIDDqde = here->B3SOIDDcdbox * T11 + here->B3SOIDDdt4; here->B3SOIDDgcde = here->B3SOIDDcdbox; } } /* Extrinsic : Sidewall fringing S/D charge */ here->B3SOIDDqse += pParam->B3SOIDDcsesw * T10; here->B3SOIDDgcse += pParam->B3SOIDDcsesw; here->B3SOIDDqde += pParam->B3SOIDDcdesw * T11; here->B3SOIDDgcde += pParam->B3SOIDDcdesw; /* All charge are mutliplied with type at the end, but qse and qde have true polarity => so pre-mutliplied with type */ here->B3SOIDDqse *= model->B3SOIDDtype; here->B3SOIDDqde *= model->B3SOIDDtype; } here->B3SOIDDxc = Xc; here->B3SOIDDcbb = Cbb; here->B3SOIDDcbd = Cbd; here->B3SOIDDcbg = Cbg; here->B3SOIDDqbf = Qbf; here->B3SOIDDqjs = qjs; here->B3SOIDDqjd = qjd; if (here->B3SOIDDdebugMod == -1) ChargeComputationNeeded = 0; /* * check convergence */ if ((here->B3SOIDDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; if (here->B3SOIDDdebugMod > 2) fprintf(fpdebug, "Check is on, noncon=%d\n", ckt->CKTnoncon++); } } *(ckt->CKTstate0 + here->B3SOIDDvg) = vg; *(ckt->CKTstate0 + here->B3SOIDDvd) = vd; *(ckt->CKTstate0 + here->B3SOIDDvs) = vs; *(ckt->CKTstate0 + here->B3SOIDDvp) = vp; *(ckt->CKTstate0 + here->B3SOIDDve) = ve; *(ckt->CKTstate0 + here->B3SOIDDvbs) = vbs; *(ckt->CKTstate0 + here->B3SOIDDvbd) = vbd; *(ckt->CKTstate0 + here->B3SOIDDvgs) = vgs; *(ckt->CKTstate0 + here->B3SOIDDvds) = vds; *(ckt->CKTstate0 + here->B3SOIDDves) = ves; *(ckt->CKTstate0 + here->B3SOIDDvps) = vps; *(ckt->CKTstate0 + here->B3SOIDDdeltemp) = delTemp; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->B3SOIDDweffCV * pParam->B3SOIDDcgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIDDckappa); cgdo = pParam->B3SOIDDcgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->B3SOIDDcgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->B3SOIDDckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->B3SOIDDweffCV * pParam->B3SOIDDcgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIDDckappa); cgso = pParam->B3SOIDDcgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->B3SOIDDcgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->B3SOIDDckappa * (T4 - 1.0)); if (here->B3SOIDDmode > 0) { gcdgb = (here->B3SOIDDcdgb - cgdo) * ag0; gcddb = (here->B3SOIDDcddb + cgdo + here->B3SOIDDgcde) * ag0; gcdsb = here->B3SOIDDcdsb * ag0; gcdeb = (here->B3SOIDDcdeb - here->B3SOIDDgcde) * ag0; gcdT = model->B3SOIDDtype * here->B3SOIDDcdT * ag0; gcsgb = -(here->B3SOIDDcggb + here->B3SOIDDcbgb + here->B3SOIDDcdgb + here->B3SOIDDcegb + cgso) * ag0; gcsdb = -(here->B3SOIDDcgdb + here->B3SOIDDcbdb + here->B3SOIDDcddb + here->B3SOIDDcedb) * ag0; gcssb = (cgso + here->B3SOIDDgcse - (here->B3SOIDDcgsb + here->B3SOIDDcbsb + here->B3SOIDDcdsb + here->B3SOIDDcesb)) * ag0; gcseb = -(here->B3SOIDDgcse + here->B3SOIDDcgeb + here->B3SOIDDcbeb + here->B3SOIDDcdeb + here->B3SOIDDceeb) * ag0; gcsT = - model->B3SOIDDtype * (here->B3SOIDDcgT + here->B3SOIDDcbT + here->B3SOIDDcdT + here->B3SOIDDceT) * ag0; gcggb = (here->B3SOIDDcggb + cgdo + cgso + pParam->B3SOIDDcgeo) * ag0; gcgdb = (here->B3SOIDDcgdb - cgdo) * ag0; gcgsb = (here->B3SOIDDcgsb - cgso) * ag0; gcgeb = (here->B3SOIDDcgeb - pParam->B3SOIDDcgeo) * ag0; gcgT = model->B3SOIDDtype * here->B3SOIDDcgT * ag0; gcbgb = here->B3SOIDDcbgb * ag0; gcbdb = here->B3SOIDDcbdb * ag0; gcbsb = here->B3SOIDDcbsb * ag0; gcbeb = here->B3SOIDDcbeb * ag0; gcbT = model->B3SOIDDtype * here->B3SOIDDcbT * ag0; gcegb = (here->B3SOIDDcegb - pParam->B3SOIDDcgeo) * ag0; gcedb = (here->B3SOIDDcedb - here->B3SOIDDgcde) * ag0; gcesb = (here->B3SOIDDcesb - here->B3SOIDDgcse) * ag0; gceeb = (here->B3SOIDDgcse + here->B3SOIDDgcde + here->B3SOIDDceeb + pParam->B3SOIDDcgeo) * ag0; gceT = model->B3SOIDDtype * here->B3SOIDDceT * ag0; gcTt = pParam->B3SOIDDcth * ag0; sxpart = 0.6; dxpart = 0.4; /* Lump the overlap capacitance and S/D parasitics */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIDDcgeo * vge; qgate += qgd + qgs + qge; qdrn += here->B3SOIDDqde - qgd; qsub -= qge + here->B3SOIDDqse + here->B3SOIDDqde; qsrc = -(qgate + qbody + qdrn + qsub); } else { gcsgb = (here->B3SOIDDcdgb - cgso) * ag0; gcssb = (here->B3SOIDDcddb + cgso + here->B3SOIDDgcse) * ag0; gcsdb = here->B3SOIDDcdsb * ag0; gcseb = (here->B3SOIDDcdeb - here->B3SOIDDgcse) * ag0; gcsT = model->B3SOIDDtype * here->B3SOIDDcdT * ag0; gcdgb = -(here->B3SOIDDcggb + here->B3SOIDDcbgb + here->B3SOIDDcdgb + here->B3SOIDDcegb + cgdo) * ag0; gcdsb = -(here->B3SOIDDcgdb + here->B3SOIDDcbdb + here->B3SOIDDcddb + here->B3SOIDDcedb) * ag0; gcddb = (cgdo + here->B3SOIDDgcde - (here->B3SOIDDcgsb + here->B3SOIDDcbsb + here->B3SOIDDcdsb + here->B3SOIDDcesb)) * ag0; gcdeb = -(here->B3SOIDDgcde + here->B3SOIDDcgeb + here->B3SOIDDcbeb + here->B3SOIDDcdeb + here->B3SOIDDceeb) * ag0; gcdT = - model->B3SOIDDtype * (here->B3SOIDDcgT + here->B3SOIDDcbT + here->B3SOIDDcdT + here->B3SOIDDceT) * ag0; gcggb = (here->B3SOIDDcggb + cgdo + cgso + pParam->B3SOIDDcgeo) * ag0; gcgsb = (here->B3SOIDDcgdb - cgso) * ag0; gcgdb = (here->B3SOIDDcgsb - cgdo) * ag0; gcgeb = (here->B3SOIDDcgeb - pParam->B3SOIDDcgeo) * ag0; gcgT = model->B3SOIDDtype * here->B3SOIDDcgT * ag0; gcbgb = here->B3SOIDDcbgb * ag0; gcbsb = here->B3SOIDDcbdb * ag0; gcbdb = here->B3SOIDDcbsb * ag0; gcbeb = here->B3SOIDDcbeb * ag0; gcbT = model->B3SOIDDtype * here->B3SOIDDcbT * ag0; gcegb = (here->B3SOIDDcegb - pParam->B3SOIDDcgeo) * ag0; gcesb = (here->B3SOIDDcedb - here->B3SOIDDgcse) * ag0; gcedb = (here->B3SOIDDcesb - here->B3SOIDDgcde) * ag0; gceeb = (here->B3SOIDDceeb + pParam->B3SOIDDcgeo + here->B3SOIDDgcse + here->B3SOIDDgcde) * ag0; gceT = model->B3SOIDDtype * here->B3SOIDDceT * ag0; gcTt = pParam->B3SOIDDcth * ag0; dxpart = 0.6; sxpart = 0.4; /* Lump the overlap capacitance */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIDDcgeo * vge; qgate += qgd + qgs + qge; qsrc = qdrn - qgs + here->B3SOIDDqse; qsub -= qge + here->B3SOIDDqse + here->B3SOIDDqde; qdrn = -(qgate + qbody + qsrc + qsub); } here->B3SOIDDcgdo = cgdo; here->B3SOIDDcgso = cgso; if (ByPass) goto line860; *(ckt->CKTstate0 + here->B3SOIDDqe) = qsub; *(ckt->CKTstate0 + here->B3SOIDDqg) = qgate; *(ckt->CKTstate0 + here->B3SOIDDqd) = qdrn; *(ckt->CKTstate0 + here->B3SOIDDqb) = qbody; if ((model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0!=0.0)) *(ckt->CKTstate0 + here->B3SOIDDqth) = pParam->B3SOIDDcth * delTemp; /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIDDqb) = *(ckt->CKTstate0 + here->B3SOIDDqb); *(ckt->CKTstate1 + here->B3SOIDDqg) = *(ckt->CKTstate0 + here->B3SOIDDqg); *(ckt->CKTstate1 + here->B3SOIDDqd) = *(ckt->CKTstate0 + here->B3SOIDDqd); *(ckt->CKTstate1 + here->B3SOIDDqe) = *(ckt->CKTstate0 + here->B3SOIDDqe); *(ckt->CKTstate1 + here->B3SOIDDqth) = *(ckt->CKTstate0 + here->B3SOIDDqth); } error = NIintegrate(ckt, &geq, &ceq,0.0,here->B3SOIDDqb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIDDqg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIDDqd); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIDDqe); if (error) return(error); if ((model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0!=0.0)) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIDDqth); if (error) return (error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqe = ceqqg = ceqqb = ceqqd = ceqqth= 0.0; gcdgb = gcddb = gcdsb = gcdeb = gcdT = 0.0; gcsgb = gcsdb = gcssb = gcseb = gcsT = 0.0; gcggb = gcgdb = gcgsb = gcgeb = gcgT = 0.0; gcbgb = gcbdb = gcbsb = gcbeb = gcbT = 0.0; gcegb = gcedb = gceeb = gcesb = gceT = 0.0; gcTt = 0.0; sxpart = (1.0 - (dxpart = (here->B3SOIDDmode > 0) ? 0.4 : 0.6)); goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B3SOIDDcqg); cqbody = *(ckt->CKTstate0 + here->B3SOIDDcqb); cqdrn = *(ckt->CKTstate0 + here->B3SOIDDcqd); cqsub = *(ckt->CKTstate0 + here->B3SOIDDcqe); cqtemp = *(ckt->CKTstate0 + here->B3SOIDDcqth); here->B3SOIDDcb += cqbody; here->B3SOIDDcd += cqdrn; ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs - gcgeb * veb - gcgT * delTemp; ceqqb = cqbody - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs - gcbeb * veb - gcbT * delTemp; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs - gcdeb * veb - gcdT * delTemp; ceqqe = cqsub - gcegb * vgb + gcedb * vbd + gcesb * vbs - gceeb * veb - gceT * delTemp;; ceqqth = cqtemp - gcTt * delTemp; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIDDcqe) = *(ckt->CKTstate0 + here->B3SOIDDcqe); *(ckt->CKTstate1 + here->B3SOIDDcqb) = *(ckt->CKTstate0 + here->B3SOIDDcqb); *(ckt->CKTstate1 + here->B3SOIDDcqg) = *(ckt->CKTstate0 + here->B3SOIDDcqg); *(ckt->CKTstate1 + here->B3SOIDDcqd) = *(ckt->CKTstate0 + here->B3SOIDDcqd); *(ckt->CKTstate1 + here->B3SOIDDcqth) = *(ckt->CKTstate0 + here->B3SOIDDcqth); } /* * load current vector */ line900: m = here->B3SOIDDm; if (here->B3SOIDDmode >= 0) { Gm = here->B3SOIDDgm; Gmbs = here->B3SOIDDgmbs; Gme = here->B3SOIDDgme; GmT = model->B3SOIDDtype * here->B3SOIDDgmT; FwdSum = Gm + Gmbs + Gme; RevSum = 0.0; cdreq = model->B3SOIDDtype * (here->B3SOIDDcdrain - here->B3SOIDDgds * vds - Gm * vgs - Gmbs * vbs - Gme * ves - GmT * delTemp); /* ceqbs now is compatible with cdreq, ie. going in is +ve */ /* Equivalent current source from the diode */ ceqbs = here->B3SOIDDcjs; ceqbd = here->B3SOIDDcjd; /* Current going in is +ve */ ceqbody = -here->B3SOIDDcbody; ceqth = here->B3SOIDDcth; ceqbodcon = here->B3SOIDDcbodcon; gbbg = -here->B3SOIDDgbgs; gbbdp = -here->B3SOIDDgbds; gbbb = -here->B3SOIDDgbbs; gbbe = -here->B3SOIDDgbes; gbbp = -here->B3SOIDDgbps; gbbT = -model->B3SOIDDtype * here->B3SOIDDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIDDgjdg; gddpdp = -here->B3SOIDDgjdd; gddpb = -here->B3SOIDDgjdb; gddpe = -here->B3SOIDDgjde; gddpT = -model->B3SOIDDtype * here->B3SOIDDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B3SOIDDgjsg; gsspdp = -here->B3SOIDDgjsd; gsspb = -here->B3SOIDDgjsb; gsspe = 0.0; gsspT = -model->B3SOIDDtype * here->B3SOIDDgjsT; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppg = -here->B3SOIDDgbpgs; gppdp = -here->B3SOIDDgbpds; gppb = -here->B3SOIDDgbpbs; gppe = -here->B3SOIDDgbpes; gppp = -here->B3SOIDDgbpps; gppT = -model->B3SOIDDtype * here->B3SOIDDgbpT; gppsp = - (gppg + gppdp + gppb + gppe + gppp); gTtg = here->B3SOIDDgtempg; gTtb = here->B3SOIDDgtempb; gTte = here->B3SOIDDgtempe; gTtdp = here->B3SOIDDgtempd; gTtt = here->B3SOIDDgtempT; gTtsp = - (gTtg + gTtb + gTte + gTtdp); } else { Gm = -here->B3SOIDDgm; Gmbs = -here->B3SOIDDgmbs; Gme = -here->B3SOIDDgme; GmT = -model->B3SOIDDtype * here->B3SOIDDgmT; FwdSum = 0.0; RevSum = -(Gm + Gmbs + Gme); cdreq = -model->B3SOIDDtype * (here->B3SOIDDcdrain + here->B3SOIDDgds*vds + Gm * vgd + Gmbs * vbd + Gme * (ves - vds) + GmT * delTemp); ceqbs = here->B3SOIDDcjd; ceqbd = here->B3SOIDDcjs; /* Current going in is +ve */ ceqbody = -here->B3SOIDDcbody; ceqth = here->B3SOIDDcth; ceqbodcon = here->B3SOIDDcbodcon; gbbg = -here->B3SOIDDgbgs; gbbb = -here->B3SOIDDgbbs; gbbe = -here->B3SOIDDgbes; gbbp = -here->B3SOIDDgbps; gbbsp = -here->B3SOIDDgbds; gbbT = -model->B3SOIDDtype * here->B3SOIDDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIDDgjsg; gddpsp = -here->B3SOIDDgjsd; gddpb = -here->B3SOIDDgjsb; gddpe = 0.0; gddpT = -model->B3SOIDDtype * here->B3SOIDDgjsT; gddpdp = - (gddpg + gddpsp + gddpb + gddpe); gsspg = -here->B3SOIDDgjdg; gsspsp = -here->B3SOIDDgjdd; gsspb = -here->B3SOIDDgjdb; gsspe = -here->B3SOIDDgjde; gsspT = -model->B3SOIDDtype * here->B3SOIDDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe); gppg = -here->B3SOIDDgbpgs; gppsp = -here->B3SOIDDgbpds; gppb = -here->B3SOIDDgbpbs; gppe = -here->B3SOIDDgbpes; gppp = -here->B3SOIDDgbpps; gppT = -model->B3SOIDDtype * here->B3SOIDDgbpT; gppdp = - (gppg + gppsp + gppb + gppe + gppp); gTtg = here->B3SOIDDgtempg; gTtb = here->B3SOIDDgtempb; gTte = here->B3SOIDDgtempe; gTtsp = here->B3SOIDDgtempd; gTtt = here->B3SOIDDgtempT; gTtdp = - (gTtg + gTtb + gTte + gTtsp); } if (model->B3SOIDDtype > 0) { ceqqg = ceqqg; ceqqb = ceqqb; ceqqe = ceqqe; ceqqd = ceqqd; } else { ceqbodcon = -ceqbodcon; ceqbody = -ceqbody; ceqbs = -ceqbs; ceqbd = -ceqbd; ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; ceqqe = -ceqqe; } (*(ckt->CKTrhs + here->B3SOIDDbNode) -= m * (ceqbody+ceqqb)); (*(ckt->CKTrhs + here->B3SOIDDgNode) -= m * ceqqg); (*(ckt->CKTrhs + here->B3SOIDDdNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->B3SOIDDsNodePrime) += m * ((cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe))); (*(ckt->CKTrhs + here->B3SOIDDeNode) -= m * ceqqe); if (here->B3SOIDDbodyMod == 1) { (*(ckt->CKTrhs + here->B3SOIDDpNode) += m * ceqbodcon); } if (selfheat) { (*(ckt->CKTrhs + here->B3SOIDDtempNode) -= m * (ceqth + ceqqth)); } if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1)) { *(ckt->CKTrhs + here->B3SOIDDvbsNode) = here->B3SOIDDvbsdio; *(ckt->CKTrhs + here->B3SOIDDidsNode) = here->B3SOIDDids; *(ckt->CKTrhs + here->B3SOIDDicNode) = here->B3SOIDDic; *(ckt->CKTrhs + here->B3SOIDDibsNode) = here->B3SOIDDibs; *(ckt->CKTrhs + here->B3SOIDDibdNode) = here->B3SOIDDibd; *(ckt->CKTrhs + here->B3SOIDDiiiNode) = here->B3SOIDDiii; *(ckt->CKTrhs + here->B3SOIDDigidlNode) = here->B3SOIDDigidl; *(ckt->CKTrhs + here->B3SOIDDitunNode) = here->B3SOIDDitun; *(ckt->CKTrhs + here->B3SOIDDibpNode) = here->B3SOIDDibp; *(ckt->CKTrhs + here->B3SOIDDabeffNode) = here->B3SOIDDabeff; *(ckt->CKTrhs + here->B3SOIDDvbs0effNode) = here->B3SOIDDvbs0eff; *(ckt->CKTrhs + here->B3SOIDDvbseffNode) = here->B3SOIDDvbseff; *(ckt->CKTrhs + here->B3SOIDDxcNode) = here->B3SOIDDxc; *(ckt->CKTrhs + here->B3SOIDDcbbNode) = here->B3SOIDDcbb; *(ckt->CKTrhs + here->B3SOIDDcbdNode) = here->B3SOIDDcbd; *(ckt->CKTrhs + here->B3SOIDDcbgNode) = here->B3SOIDDcbg; *(ckt->CKTrhs + here->B3SOIDDqbfNode) = here->B3SOIDDqbf; *(ckt->CKTrhs + here->B3SOIDDqjsNode) = here->B3SOIDDqjs; *(ckt->CKTrhs + here->B3SOIDDqjdNode) = here->B3SOIDDqjd; /* clean up last */ *(ckt->CKTrhs + here->B3SOIDDgmNode) = Gm; *(ckt->CKTrhs + here->B3SOIDDgmbsNode) = Gmbs; *(ckt->CKTrhs + here->B3SOIDDgdsNode) = Gds; *(ckt->CKTrhs + here->B3SOIDDgmeNode) = Gme; *(ckt->CKTrhs + here->B3SOIDDqdNode) = qdrn; *(ckt->CKTrhs + here->B3SOIDDcbeNode) = Cbe; *(ckt->CKTrhs + here->B3SOIDDvbs0teffNode) = Vbs0teff; *(ckt->CKTrhs + here->B3SOIDDvthNode) = here->B3SOIDDvon; *(ckt->CKTrhs + here->B3SOIDDvgsteffNode) = Vgsteff; *(ckt->CKTrhs + here->B3SOIDDxcsatNode) = Xcsat; *(ckt->CKTrhs + here->B3SOIDDqaccNode) = -Qac0; *(ckt->CKTrhs + here->B3SOIDDqsub0Node) = Qsub0; *(ckt->CKTrhs + here->B3SOIDDqsubs1Node) = Qsubs1; *(ckt->CKTrhs + here->B3SOIDDqsubs2Node) = Qsubs2; *(ckt->CKTrhs + here->B3SOIDDvdscvNode) = VdsCV; *(ckt->CKTrhs + here->B3SOIDDvcscvNode) = VcsCV; *(ckt->CKTrhs + here->B3SOIDDqgNode) = qgate; *(ckt->CKTrhs + here->B3SOIDDqbNode) = qbody; *(ckt->CKTrhs + here->B3SOIDDqeNode) = qsub; *(ckt->CKTrhs + here->B3SOIDDdum1Node) = here->B3SOIDDdum1; *(ckt->CKTrhs + here->B3SOIDDdum2Node) = here->B3SOIDDdum2; *(ckt->CKTrhs + here->B3SOIDDdum3Node) = here->B3SOIDDdum3; *(ckt->CKTrhs + here->B3SOIDDdum4Node) = here->B3SOIDDdum4; *(ckt->CKTrhs + here->B3SOIDDdum5Node) = here->B3SOIDDdum5; /* end clean up last */ } /* * load y matrix */ (*(here->B3SOIDDEgPtr) += m * gcegb); (*(here->B3SOIDDEdpPtr) += m * gcedb); (*(here->B3SOIDDEspPtr) += m * gcesb); (*(here->B3SOIDDGePtr) += m * gcgeb); (*(here->B3SOIDDDPePtr) += m * (Gme + gddpe + gcdeb)); (*(here->B3SOIDDSPePtr) += m * (gsspe - Gme + gcseb)); Gmin = ckt->CKTgmin * 1e-6; (*(here->B3SOIDDEbPtr) -= m * (gcegb + gcedb + gcesb + gceeb)); (*(here->B3SOIDDGbPtr) -= m * (gcggb + gcgdb + gcgsb + gcgeb)); (*(here->B3SOIDDDPbPtr) -= m * (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb)); (*(here->B3SOIDDSPbPtr) -= m * (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb)); (*(here->B3SOIDDBePtr) += m * (gbbe + gcbeb)); (*(here->B3SOIDDBgPtr) += m * (gcbgb + gbbg)); (*(here->B3SOIDDBdpPtr) += m * (gcbdb + gbbdp)); (*(here->B3SOIDDBspPtr) += m * (gcbsb + gbbsp - Gmin)); (*(here->B3SOIDDBbPtr) += m * (gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin)) ; (*(here->B3SOIDDEePtr) += m * gceeb); (*(here->B3SOIDDGgPtr) += m * (gcggb + ckt->CKTgmin)); (*(here->B3SOIDDGdpPtr) += m * (gcgdb - ckt->CKTgmin)); (*(here->B3SOIDDGspPtr) += m * gcgsb ); (*(here->B3SOIDDDPgPtr) += m * ((Gm + gcdgb) + gddpg - ckt->CKTgmin)); (*(here->B3SOIDDDPdpPtr) += m * ((here->B3SOIDDdrainConductance + here->B3SOIDDgds + gddpdp + RevSum + gcddb) + ckt->CKTgmin)); (*(here->B3SOIDDDPspPtr) -= m * (-gddpsp + here->B3SOIDDgds + FwdSum - gcdsb)); (*(here->B3SOIDDDPdPtr) -= m * here->B3SOIDDdrainConductance); (*(here->B3SOIDDSPgPtr) += m * (gcsgb - Gm + gsspg)); (*(here->B3SOIDDSPdpPtr) -= m * (here->B3SOIDDgds - gsspdp + RevSum - gcsdb)); (*(here->B3SOIDDSPspPtr) += m * (here->B3SOIDDsourceConductance + here->B3SOIDDgds + gsspsp + FwdSum + gcssb)); (*(here->B3SOIDDSPsPtr) -= m * here->B3SOIDDsourceConductance); (*(here->B3SOIDDDdPtr) += m * here->B3SOIDDdrainConductance); (*(here->B3SOIDDDdpPtr) -= m * here->B3SOIDDdrainConductance); (*(here->B3SOIDDSsPtr) += m * here->B3SOIDDsourceConductance); (*(here->B3SOIDDSspPtr) -= m * here->B3SOIDDsourceConductance); if (here->B3SOIDDbodyMod == 1) { (*(here->B3SOIDDBpPtr) -= m * gppp); (*(here->B3SOIDDPbPtr) += m * gppb); (*(here->B3SOIDDPpPtr) += m * gppp); (*(here->B3SOIDDPgPtr) += m * gppg); (*(here->B3SOIDDPdpPtr) += m * gppdp); (*(here->B3SOIDDPspPtr) += m * gppsp); (*(here->B3SOIDDPePtr) += m * gppe); } if (selfheat) { (*(here->B3SOIDDDPtempPtr) += m * (GmT + gddpT + gcdT)); (*(here->B3SOIDDSPtempPtr) += m * (-GmT + gsspT + gcsT)); (*(here->B3SOIDDBtempPtr) += m * (gbbT + gcbT)); (*(here->B3SOIDDEtempPtr) += m * (gceT)); (*(here->B3SOIDDGtempPtr) += m * (gcgT)); if (here->B3SOIDDbodyMod == 1) { (*(here->B3SOIDDPtempPtr) += m * gppT); } (*(here->B3SOIDDTemptempPtr) += m * (gTtt + 1/pParam->B3SOIDDrth + gcTt)); (*(here->B3SOIDDTempgPtr) += m * gTtg); (*(here->B3SOIDDTempbPtr) += m * gTtb); (*(here->B3SOIDDTempePtr) += m * gTte); (*(here->B3SOIDDTempdpPtr) += m * gTtdp); (*(here->B3SOIDDTempspPtr) += m * gTtsp); } if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1)) { *(here->B3SOIDDVbsPtr) += m * 1; *(here->B3SOIDDIdsPtr) += m * 1; *(here->B3SOIDDIcPtr) += m * 1; *(here->B3SOIDDIbsPtr) += m * 1; *(here->B3SOIDDIbdPtr) += m * 1; *(here->B3SOIDDIiiPtr) += m * 1; *(here->B3SOIDDIgidlPtr) += m * 1; *(here->B3SOIDDItunPtr) += m * 1; *(here->B3SOIDDIbpPtr) += m * 1; *(here->B3SOIDDAbeffPtr) += m * 1; *(here->B3SOIDDVbs0effPtr) += m * 1; *(here->B3SOIDDVbseffPtr) += m * 1; *(here->B3SOIDDXcPtr) += m * 1; *(here->B3SOIDDCbgPtr) += m * 1; *(here->B3SOIDDCbbPtr) += m * 1; *(here->B3SOIDDCbdPtr) += m * 1; *(here->B3SOIDDqbPtr) += m * 1; *(here->B3SOIDDQbfPtr) += m * 1; *(here->B3SOIDDQjsPtr) += m * 1; *(here->B3SOIDDQjdPtr) += m * 1; /* clean up last */ *(here->B3SOIDDGmPtr) += m * 1; *(here->B3SOIDDGmbsPtr) += m * 1; *(here->B3SOIDDGdsPtr) += m * 1; *(here->B3SOIDDGmePtr) += m * 1; *(here->B3SOIDDVbs0teffPtr) += m * 1; *(here->B3SOIDDVgsteffPtr) += m * 1; *(here->B3SOIDDCbePtr) += m * 1; *(here->B3SOIDDVthPtr) += m * 1; *(here->B3SOIDDXcsatPtr) += m * 1; *(here->B3SOIDDVdscvPtr) += m * 1; *(here->B3SOIDDVcscvPtr) += m * 1; *(here->B3SOIDDQaccPtr) += m * 1; *(here->B3SOIDDQsub0Ptr) += m * 1; *(here->B3SOIDDQsubs1Ptr) += m * 1; *(here->B3SOIDDQsubs2Ptr) += m * 1; *(here->B3SOIDDqgPtr) += m * 1; *(here->B3SOIDDqdPtr) += m * 1; *(here->B3SOIDDqePtr) += m * 1; *(here->B3SOIDDDum1Ptr) += m * 1; *(here->B3SOIDDDum2Ptr) += m * 1; *(here->B3SOIDDDum3Ptr) += m * 1; *(here->B3SOIDDDum4Ptr) += m * 1; *(here->B3SOIDDDum5Ptr) += m * 1; /* end clean up last */ } line1000: ; /* Here NaN will be detected in any conductance or equivalent current. Note that nandetect is initialized within the "if" statements */ if ((nandetect = isnan (*(here->B3SOIDDGbPtr))) != 0) { strcpy (nanmessage, "GbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDEbPtr))) != 0) { strcpy (nanmessage, "EbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPbPtr))) != 0) { strcpy (nanmessage, "DPbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPbPtr))) != 0) { strcpy (nanmessage, "SPbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBbPtr))) != 0) { strcpy (nanmessage, "BbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBgPtr))) != 0) { strcpy (nanmessage, "BgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBePtr))) != 0) { strcpy (nanmessage, "BePtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBdpPtr))) != 0) { strcpy (nanmessage, "BdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBspPtr))) != 0) { strcpy (nanmessage, "BspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDGgPtr))) != 0) { strcpy (nanmessage, "GgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDGdpPtr))) != 0) { strcpy (nanmessage, "GdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDGspPtr))) != 0) { strcpy (nanmessage, "GspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPgPtr))) != 0) { strcpy (nanmessage, "DPgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPdpPtr))) != 0) { strcpy (nanmessage, "DPdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPspPtr))) != 0) { strcpy (nanmessage, "DPspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPgPtr))) != 0) { strcpy (nanmessage, "SPgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPdpPtr))) != 0) { strcpy (nanmessage, "SPdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPspPtr))) != 0) { strcpy (nanmessage, "SPspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDEePtr))) != 0) { strcpy (nanmessage, "EePtr"); } /* At this point, nandetect = 0 if none of the conductances checked so far are NaN */ if (nandetect == 0) { if ((nandetect = isnan (*(here->B3SOIDDEgPtr))) != 0) { strcpy (nanmessage, "EgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDEdpPtr))) != 0) { strcpy (nanmessage, "EdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDEspPtr))) != 0) { strcpy (nanmessage, "EspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDGePtr))) != 0) { strcpy (nanmessage, "GePtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPePtr))) != 0) { strcpy (nanmessage, "DPePtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPePtr))) != 0) { strcpy (nanmessage, "SPePtr"); } } /* Now check if self-heating caused NaN if nothing else has so far (check tempnode current also) */ if (selfheat && nandetect == 0) { if ((nandetect = isnan (*(here->B3SOIDDTemptempPtr))) != 0) { strcpy (nanmessage, "TemptempPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDTempgPtr))) != 0) { strcpy (nanmessage, "TempgPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDTempbPtr))) != 0) { strcpy (nanmessage, "TempbPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDTempePtr))) != 0) { strcpy (nanmessage, "TempePtr"); } else if ((nandetect = isnan (*(here->B3SOIDDTempdpPtr))) != 0) { strcpy (nanmessage, "TempdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDTempspPtr))) != 0) { strcpy (nanmessage, "TempspPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDGtempPtr))) != 0) { strcpy (nanmessage, "GtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDDPtempPtr))) != 0) { strcpy (nanmessage, "DPtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDSPtempPtr))) != 0) { strcpy (nanmessage, "SPtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDEtempPtr))) != 0) { strcpy (nanmessage, "EtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIDDBtempPtr))) != 0) { strcpy (nanmessage, "BtempPtr"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDtempNode))) != 0) { strcpy (nanmessage, "tempNode"); } } /* Lastly, check all equivalent currents (tempnode is checked above */ if (nandetect == 0) { if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDgNode))) != 0) { strcpy (nanmessage, "gNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDbNode))) != 0) { strcpy (nanmessage, "bNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDdNodePrime))) != 0) { strcpy (nanmessage, "dpNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDsNodePrime))) != 0) { strcpy (nanmessage, "spNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIDDeNode))) != 0) { strcpy (nanmessage, "eNode"); } } /* Now print error message if NaN detected. Note that error will only be printed once (the first time it is encountered) each time SPICE is run since nanfound is static variable */ if (nanfound == 0 && nandetect) { fprintf(stderr, "Alberto says: YOU TURKEY! %s is NaN for instance %s at time %g!\n", nanmessage, here->B3SOIDDname, ckt->CKTtime); nanfound = nandetect; fprintf(stderr, " The program exit!\n"); controlled_exit(EXIT_FAILURE); } if (here->B3SOIDDdebugMod > 2) { fprintf(fpdebug, "Ids = %.4e, Ic = %.4e, cqdrn = %.4e, gmin=%.3e\n", Ids, Ic, cqdrn, ckt->CKTgmin); fprintf(fpdebug, "Iii = %.4e, Idgidl = %.4e, Ibs = %.14e\n", Iii, Idgidl, Ibs); fprintf(fpdebug, "Ibd = %.4e, Ibp = %.4e\n", Ibd, Ibp); fprintf(fpdebug, "qbody = %.5e, qbf = %.5e, qbe = %.5e\n", qbody, Qbf, -(Qe1+Qe2)); fprintf(fpdebug, "qbs = %.5e, qbd = %.5e\n", qjs, qjd); fprintf(fpdebug, "qdrn = %.5e, qinv = %.5e\n", qdrn, qinv); /* I am trying to debug the convergence problems here by printing out the entire Jacobian and equivalent current matrix */ if (here->B3SOIDDdebugMod > 4) { fprintf(fpdebug, "Ibtot = %.6e;\t Cbtot = %.6e;\n", Ibs+Ibp+Ibd-Iii-Idgidl-Isgidl, cqbody); fprintf(fpdebug, "ceqg = %.6e;\t ceqb = %.6e;\t ceqdp = %.6e;\t ceqsp = %.6e;\n", *(ckt->CKTrhs + here->B3SOIDDgNode), *(ckt->CKTrhs + here->B3SOIDDbNode), *(ckt->CKTrhs + here->B3SOIDDdNodePrime), *(ckt->CKTrhs + here->B3SOIDDsNodePrime)); fprintf(fpdebug, "ceqe = %.6e;\t ceqp = %.6e;\t ceqth = %.6e;\n", *(ckt->CKTrhs + here->B3SOIDDeNode), *(ckt->CKTrhs + here->B3SOIDDpNode), *(ckt->CKTrhs + here->B3SOIDDtempNode)); fprintf(fpdebug, "Eg = %.5e;\t Edp = %.5e;\t Esp = %.5e;\t Eb = %.5e;\n", *(here->B3SOIDDEgPtr), *(here->B3SOIDDEdpPtr), *(here->B3SOIDDEspPtr), *(here->B3SOIDDEbPtr)); fprintf(fpdebug, "Ee = %.5e;\t Gg = %.5e;\t Gdp = %.5e;\t Gsp = %.5e;\n", *(here->B3SOIDDEePtr), *(here->B3SOIDDGgPtr), *(here->B3SOIDDGdpPtr), *(here->B3SOIDDGspPtr)); fprintf(fpdebug, "Gb = %.5e;\t Ge = %.5e;\t DPg = %.5e;\t DPdp = %.5e;\n", *(here->B3SOIDDGbPtr), *(here->B3SOIDDGePtr), *(here->B3SOIDDDPgPtr), *(here->B3SOIDDDPdpPtr)); fprintf(fpdebug, "DPsp = %.5e;\t DPb = %.5e;\t DPe = %.5e;\t\n", *(here->B3SOIDDDPspPtr), *(here->B3SOIDDDPbPtr), *(here->B3SOIDDDPePtr)); fprintf(fpdebug, "DPd = %.5e;\t SPg = %.5e;\t SPdp = %.5e;\t SPsp = %.5e;\n", *(here->B3SOIDDDPdPtr), *(here->B3SOIDDSPgPtr), *(here->B3SOIDDSPdpPtr), *(here->B3SOIDDSPspPtr)); fprintf(fpdebug, "SPb = %.5e;\t SPe = %.5e;\t SPs = %.5e;\n", *(here->B3SOIDDSPbPtr), *(here->B3SOIDDSPePtr), *(here->B3SOIDDSPsPtr)); fprintf(fpdebug, "Dd = %.5e;\t Ddp = %.5e;\t Ss = %.5e;\t Ssp = %.5e;\n", *(here->B3SOIDDDdPtr), *(here->B3SOIDDDdpPtr), *(here->B3SOIDDSsPtr), *(here->B3SOIDDSspPtr)); fprintf(fpdebug, "Bg = %.5e;\t Bdp = %.5e;\t Bsp = %.5e;\t Bb = %.5e;\n", *(here->B3SOIDDBgPtr), *(here->B3SOIDDBdpPtr), *(here->B3SOIDDBspPtr), *(here->B3SOIDDBbPtr)); fprintf(fpdebug, "Be = %.5e;\t Btot = %.5e;\t DPtot = %.5e;\n", *(here->B3SOIDDBePtr), *(here->B3SOIDDBgPtr) + *(here->B3SOIDDBdpPtr) + *(here->B3SOIDDBspPtr) + *(here->B3SOIDDBbPtr) + *(here->B3SOIDDBePtr), *(here->B3SOIDDDPePtr) + *(here->B3SOIDDDPgPtr) + *(here->B3SOIDDDPdpPtr) + *(here->B3SOIDDDPspPtr) + *(here->B3SOIDDDPbPtr)); if (selfheat) { fprintf (fpdebug, "DPtemp = %.5e;\t SPtemp = %.5e;\t Btemp = %.5e;\n", *(here->B3SOIDDDPtempPtr), *(here->B3SOIDDSPtempPtr), *(here->B3SOIDDBtempPtr)); fprintf (fpdebug, "Gtemp = %.5e;\t Etemp = %.5e;\n", *(here->B3SOIDDGtempPtr), *(here->B3SOIDDEtempPtr)); fprintf (fpdebug, "Tempg = %.5e;\t Tempdp = %.5e;\t Tempsp = %.5e;\t Tempb = %.5e;\n", *(here->B3SOIDDTempgPtr), *(here->B3SOIDDTempdpPtr), *(here->B3SOIDDTempspPtr), *(here->B3SOIDDTempbPtr)); fprintf (fpdebug, "Tempe = %.5e;\t TempT = %.5e;\t Temptot = %.5e;\n", *(here->B3SOIDDTempePtr), *(here->B3SOIDDTemptempPtr), *(here->B3SOIDDTempgPtr) + *(here->B3SOIDDTempdpPtr) + *(here->B3SOIDDTempspPtr)+ *(here->B3SOIDDTempbPtr) + *(here->B3SOIDDTempePtr)); } if (here->B3SOIDDbodyMod == 1) { fprintf(fpdebug, "ceqbodcon=%.5e;\t", ceqbodcon); fprintf(fpdebug, "Bp = %.5e;\t Pb = %.5e;\t Pp = %.5e;\n", -gppp, gppb, gppp); fprintf(fpdebug, "Pg=%.5e;\t Pdp=%.5e;\t Psp=%.5e;\t Pe=%.5e;\n", gppg, gppdp, gppsp, gppe); } } if (here->B3SOIDDdebugMod > 3) { fprintf(fpdebug, "Vth = %.4f, Vbs0eff = %.8f, Vdsat = %.4f\n", Vth, Vbs0eff, Vdsat); fprintf(fpdebug, "ueff = %g, Vgsteff = %.4f, Vdseff = %.4f\n", ueff, Vgsteff, Vdseff); fprintf(fpdebug, "Vthfd = %.4f, Vbs0mos = %.4f, Vbs0 = %.4f\n", Vthfd, Vbs0mos, Vbs0); fprintf(fpdebug, "Vbs0t = %.4f, Vbsdio = %.8f\n", Vbs0t, Vbsdio); } fclose(fpdebug); } here->B3SOIDDiterations++; /* increment the iteration counter */ } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddext.h0000644000265600020320000000270612264261473022661 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soiddext.h Modifed by Paolo Nenzi 2002 **********/ extern int B3SOIDDacLoad(GENmodel *,CKTcircuit*); extern int B3SOIDDask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B3SOIDDconvTest(GENmodel *,CKTcircuit*); extern int B3SOIDDdelete(GENmodel*,IFuid,GENinstance**); extern void B3SOIDDdestroy(GENmodel**); extern int B3SOIDDgetic(GENmodel*,CKTcircuit*); extern int B3SOIDDload(GENmodel*,CKTcircuit*); extern int B3SOIDDmAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B3SOIDDmDelete(GENmodel**,IFuid,GENmodel*); extern int B3SOIDDmParam(int,IFvalue*,GENmodel*); extern void B3SOIDDmosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B3SOIDDparam(int,IFvalue*,GENinstance*,IFvalue*); extern int B3SOIDDpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B3SOIDDsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B3SOIDDtemp(GENmodel*,CKTcircuit*); extern int B3SOIDDtrunc(GENmodel*,CKTcircuit*,double*); extern int B3SOIDDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int B3SOIDDunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c0000644000265600020320000003251012264261473022635 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddnoi.c 98/5/01 Modofied by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "b3soidddef.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * B3SOIDDnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->B3SOIDDnoiMod. If model->B3SOIDDnoiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->B3SOIDDnoiMod = 2, Channel thermal noise = B3SOIDD model Flicker noise = B3SOIDD model If model->B3SOIDDnoiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = B3SOIDD model If model->B3SOIDDnoiMod = 4, Channel thermal noise = B3SOIDD model Flicker noise = SPICE2 model */ static double B3SOIDDStrongInversionNoiseEval(double vgs, double vds, B3SOIDDmodel *model, B3SOIDDinstance *here, double freq, double temp) { struct b3soiddSizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Vgst; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->B3SOIDDcd) * here->B3SOIDDm; if (vds > here->B3SOIDDvdsat) { esat = 2.0 * pParam->B3SOIDDvsattemp / here->B3SOIDDueff; T0 = ((((vds - here->B3SOIDDvdsat) / pParam->B3SOIDDlitl) + model->B3SOIDDem) / esat); DelClm = pParam->B3SOIDDlitl * log (MAX(T0, N_MINLOG)); } else DelClm = 0.0; EffFreq = pow(freq, model->B3SOIDDef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->B3SOIDDueff; T2 = 1.0e8 * EffFreq * model->B3SOIDDcox * pParam->B3SOIDDleff * pParam->B3SOIDDleff; Vgst = vgs - here->B3SOIDDvon; N0 = model->B3SOIDDcox * Vgst / CHARGE; if (N0 < 0.0) N0 = 0.0; Nl = model->B3SOIDDcox * (Vgst - MIN(vds, here->B3SOIDDvdsat)) / CHARGE; if (Nl < 0.0) Nl = 0.0; T3 = model->B3SOIDDoxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->B3SOIDDoxideTrapDensityB * (N0 - Nl); T5 = model->B3SOIDDoxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->B3SOIDDleff * pParam->B3SOIDDleff * pParam->B3SOIDDweff * here->B3SOIDDm; T8 = model->B3SOIDDoxideTrapDensityA + model->B3SOIDDoxideTrapDensityB * Nl + model->B3SOIDDoxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int B3SOIDDnoise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; B3SOIDDmodel *model = (B3SOIDDmodel *)inModel; B3SOIDDinstance *here; struct b3soiddSizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B3SOIDDNSRCS]; double lnNdens[B3SOIDDNSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; int i; /* define the names of the noise sources */ static char *B3SOIDDnNames[B3SOIDDNSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in B3SOIDDdefs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".fb", /* noise due to floating body */ "" /* total transistor noise */ }; for (; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here != NULL; here = here->B3SOIDDnextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < B3SOIDDNSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->B3SOIDDname, B3SOIDDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < B3SOIDDNSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->B3SOIDDname, B3SOIDDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->B3SOIDDname, B3SOIDDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[B3SOIDDRDNOIZ], &lnNdens[B3SOIDDRDNOIZ], ckt, THERMNOISE, here->B3SOIDDdNodePrime, here->B3SOIDDdNode, here->B3SOIDDdrainConductance * here->B3SOIDDm); NevalSrc(&noizDens[B3SOIDDRSNOIZ], &lnNdens[B3SOIDDRSNOIZ], ckt, THERMNOISE, here->B3SOIDDsNodePrime, here->B3SOIDDsNode, here->B3SOIDDsourceConductance * here->B3SOIDDm); switch( model->B3SOIDDnoiMod ) { case 1: case 3: NevalSrc(&noizDens[B3SOIDDIDNOIZ], &lnNdens[B3SOIDDIDNOIZ], ckt, THERMNOISE, here->B3SOIDDdNodePrime, here->B3SOIDDsNodePrime, (2.0 / 3.0 * fabs(here->B3SOIDDm * (here->B3SOIDDgm + here->B3SOIDDgds + here->B3SOIDDgmbs)))); break; case 2: case 4: NevalSrc(&noizDens[B3SOIDDIDNOIZ], &lnNdens[B3SOIDDIDNOIZ], ckt, THERMNOISE, here->B3SOIDDdNodePrime, here->B3SOIDDsNodePrime, (here->B3SOIDDueff * fabs((here->B3SOIDDqinv * here->B3SOIDDm) / (pParam->B3SOIDDleff * pParam->B3SOIDDleff)))); break; } NevalSrc(&noizDens[B3SOIDDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIDDdNodePrime, here->B3SOIDDsNodePrime, (double) 0.0); switch( model->B3SOIDDnoiMod ) { case 1: case 4: noizDens[B3SOIDDFLNOIZ] *= model->B3SOIDDkf * exp(model->B3SOIDDaf * log(MAX(fabs(here->B3SOIDDcd * here->B3SOIDDm), N_MINLOG))) / (pow(data->freq, model->B3SOIDDef) * pParam->B3SOIDDleff * pParam->B3SOIDDleff * model->B3SOIDDcox); break; case 2: case 3: vgs = *(ckt->CKTstates[0] + here->B3SOIDDvgs); vds = *(ckt->CKTstates[0] + here->B3SOIDDvds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } if (vgs >= here->B3SOIDDvon + 0.1) { Ssi = B3SOIDDStrongInversionNoiseEval(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[B3SOIDDFLNOIZ] *= Ssi; } else { pParam = here->pParam; T10 = model->B3SOIDDoxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->B3SOIDDweff * here->B3SOIDDm * pParam->B3SOIDDleff * pow(data->freq, model->B3SOIDDef) * 4.0e36; Swi = T10 / T11 * here->B3SOIDDcd * here->B3SOIDDm * here->B3SOIDDcd * here->B3SOIDDm; Slimit = B3SOIDDStrongInversionNoiseEval( here->B3SOIDDvon + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[B3SOIDDFLNOIZ] *= (Slimit * Swi) / T1; else noizDens[B3SOIDDFLNOIZ] *= 0.0; } break; } lnNdens[B3SOIDDFLNOIZ] = log(MAX(noizDens[B3SOIDDFLNOIZ], N_MINLOG)); /* Low frequency excess noise due to FBE */ NevalSrc(&noizDens[B3SOIDDFBNOIZ], &lnNdens[B3SOIDDFBNOIZ], ckt, SHOTNOISE, here->B3SOIDDsNodePrime, here->B3SOIDDbNode, 2.0 * model->B3SOIDDnoif * here->B3SOIDDibs * here->B3SOIDDm); noizDens[B3SOIDDTOTNOIZ] = noizDens[B3SOIDDRDNOIZ] + noizDens[B3SOIDDRSNOIZ] + noizDens[B3SOIDDIDNOIZ] + noizDens[B3SOIDDFLNOIZ] + noizDens[B3SOIDDFBNOIZ]; lnNdens[B3SOIDDTOTNOIZ] = log(MAX(noizDens[B3SOIDDTOTNOIZ], N_MINLOG)); *OnDens += noizDens[B3SOIDDTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < B3SOIDDNSRCS; i++) { here->B3SOIDDnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < B3SOIDDNSRCS; i++) { here->B3SOIDDnVar[OUTNOIZ][i] = 0.0; here->B3SOIDDnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < B3SOIDDNSRCS; i++) { if (i != B3SOIDDTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->B3SOIDDnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->B3SOIDDnVar[LNLSTDENS][i] + data->lnGainInv, data); here->B3SOIDDnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->B3SOIDDnVar[OUTNOIZ][i] += tempOnoise; here->B3SOIDDnVar[OUTNOIZ][B3SOIDDTOTNOIZ] += tempOnoise; here->B3SOIDDnVar[INNOIZ][i] += tempInoise; here->B3SOIDDnVar[INNOIZ][B3SOIDDTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < B3SOIDDNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < B3SOIDDNSRCS; i++) { data->outpVector[data->outNumber++] = here->B3SOIDDnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->B3SOIDDnVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddcvtest.c0000644000265600020320000000612512264261473023363 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddcvtest.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDconvTest(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the B3SOIDD device models */ for (; model != NULL; model = model->B3SOIDDnextModel) { /* loop through all the instances of the model */ for (here = model->B3SOIDDinstances; here != NULL ; here=here->B3SOIDDnextInstance) { vbs = model->B3SOIDDtype * (*(ckt->CKTrhsOld+here->B3SOIDDbNode) - *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime)); vgs = model->B3SOIDDtype * (*(ckt->CKTrhsOld+here->B3SOIDDgNode) - *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime)); vds = model->B3SOIDDtype * (*(ckt->CKTrhsOld+here->B3SOIDDdNodePrime) - *(ckt->CKTrhsOld+here->B3SOIDDsNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIDDvgs) - *(ckt->CKTstate0 + here->B3SOIDDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIDDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIDDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIDDvgs); delvds = vds - *(ckt->CKTstate0 + here->B3SOIDDvds); delvgd = vgd-vgdo; cd = here->B3SOIDDcd; if (here->B3SOIDDmode >= 0) { cdhat = cd - here->B3SOIDDgjdb * delvbd + here->B3SOIDDgmbs * delvbs + here->B3SOIDDgm * delvgs + here->B3SOIDDgds * delvds; } else { cdhat = cd - (here->B3SOIDDgjdb - here->B3SOIDDgmbs) * delvbd - here->B3SOIDDgm * delvgd + here->B3SOIDDgds * delvds; } /* * check convergence */ if ((here->B3SOIDDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->B3SOIDDcjs; cbd = here->B3SOIDDcjd; cbhat = cbs + cbd + here->B3SOIDDgjdb * delvbd + here->B3SOIDDgjsb * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddcheck.c0000644000265600020320000004271412264261473023134 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddcheck.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B3SOIDDcheckModel(B3SOIDDmodel *model, B3SOIDDinstance *here, CKTcircuit *ckt) { struct b3soiddSizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3soiddv2check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "B3SOI(DD)V2.1 Parameter Check\n"); fprintf(fplog, "Model = %s\n", model->B3SOIDDmodName); fprintf(fplog, "W = %g, L = %g\n, M = %g\n", here->B3SOIDDw, here->B3SOIDDl, here->B3SOIDDm); if (pParam->B3SOIDDnlx < -pParam->B3SOIDDleff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIDDnlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIDDnlx); Fatal_Flag = 1; } if (model->B3SOIDDtox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->B3SOIDDtox); printf("Fatal: Tox = %g is not positive.\n", model->B3SOIDDtox); Fatal_Flag = 1; } if (model->B3SOIDDtbox <= 0.0) { fprintf(fplog, "Fatal: Tbox = %g is not positive.\n", model->B3SOIDDtbox); printf("Fatal: Tbox = %g is not positive.\n", model->B3SOIDDtbox); Fatal_Flag = 1; } if (pParam->B3SOIDDnpeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->B3SOIDDnpeak); printf("Fatal: Nch = %g is not positive.\n", pParam->B3SOIDDnpeak); Fatal_Flag = 1; } if (pParam->B3SOIDDngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->B3SOIDDngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->B3SOIDDngate); Fatal_Flag = 1; } if (pParam->B3SOIDDngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->B3SOIDDngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->B3SOIDDngate); Fatal_Flag = 1; } if (model->B3SOIDDdvbd1 < 0.0) { fprintf(fplog, "Fatal: Dvbd1 = %g is negative.\n", model->B3SOIDDdvbd1); printf("Fatal: Dvbd1 = %g is negative.\n", model->B3SOIDDdvbd1); Fatal_Flag = 1; } if (pParam->B3SOIDDdvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIDDdvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIDDdvt1); Fatal_Flag = 1; } if (pParam->B3SOIDDdvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIDDdvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIDDdvt1w); Fatal_Flag = 1; } if (pParam->B3SOIDDw0 == -pParam->B3SOIDDweff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIDDdsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->B3SOIDDdsub); printf("Fatal: Dsub = %g is negative.\n", pParam->B3SOIDDdsub); Fatal_Flag = 1; } if (pParam->B3SOIDDb1 == -pParam->B3SOIDDweff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIDDu0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIDDu0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIDDu0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->B3SOIDDdelta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->B3SOIDDdelta); printf("Fatal: Delta = %g is less than zero.\n", pParam->B3SOIDDdelta); Fatal_Flag = 1; } if (pParam->B3SOIDDvsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIDDvsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIDDvsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->B3SOIDDpclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->B3SOIDDpclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->B3SOIDDpclm); Fatal_Flag = 1; } if (pParam->B3SOIDDdrout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->B3SOIDDdrout); printf("Fatal: Drout = %g is negative.\n", pParam->B3SOIDDdrout); Fatal_Flag = 1; } if ( model->B3SOIDDunitLengthGateSidewallJctCap > 0.0) { if (here->B3SOIDDdrainPerimeter < pParam->B3SOIDDweff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->B3SOIDDdrainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->B3SOIDDdrainPerimeter); here->B3SOIDDdrainPerimeter =pParam->B3SOIDDweff; } if (here->B3SOIDDsourcePerimeter < pParam->B3SOIDDweff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->B3SOIDDsourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->B3SOIDDsourcePerimeter); here->B3SOIDDsourcePerimeter =pParam->B3SOIDDweff; } } /* Check capacitance parameters */ if (pParam->B3SOIDDclc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->B3SOIDDclc); printf("Fatal: Clc = %g is negative.\n", pParam->B3SOIDDclc); Fatal_Flag = 1; } if (model->B3SOIDDparamChk ==1) { /* Check L and W parameters */ if (pParam->B3SOIDDleff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->B3SOIDDleff); printf("Warning: Leff = %g may be too small.\n", pParam->B3SOIDDleff); } if (pParam->B3SOIDDleffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIDDleffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIDDleffCV); } if (pParam->B3SOIDDweff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->B3SOIDDweff); printf("Warning: Weff = %g may be too small.\n", pParam->B3SOIDDweff); } if (pParam->B3SOIDDweffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIDDweffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIDDweffCV); } /* Check threshold voltage parameters */ if (pParam->B3SOIDDnlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->B3SOIDDnlx); printf("Warning: Nlx = %g is negative.\n", pParam->B3SOIDDnlx); } if (model->B3SOIDDtox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->B3SOIDDtox); printf("Warning: Tox = %g is less than 10A.\n", model->B3SOIDDtox); } if (pParam->B3SOIDDnpeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->B3SOIDDnpeak); printf("Warning: Nch = %g may be too small.\n", pParam->B3SOIDDnpeak); } else if (pParam->B3SOIDDnpeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->B3SOIDDnpeak); printf("Warning: Nch = %g may be too large.\n", pParam->B3SOIDDnpeak); } if (fabs(pParam->B3SOIDDnsub) >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->B3SOIDDnsub); printf("Warning: Nsub = %g may be too large.\n", pParam->B3SOIDDnsub); } if ((pParam->B3SOIDDngate > 0.0) && (pParam->B3SOIDDngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIDDngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIDDngate); } if (model->B3SOIDDdvbd0 < 0.0) { fprintf(fplog, "Warning: Dvbd0 = %g is negative.\n", model->B3SOIDDdvbd0); printf("Warning: Dvbd0 = %g is negative.\n", model->B3SOIDDdvbd0); } if (pParam->B3SOIDDdvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->B3SOIDDdvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->B3SOIDDdvt0); } if (fabs(1.0e-6 / (pParam->B3SOIDDw0 + pParam->B3SOIDDweff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->B3SOIDDnfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->B3SOIDDnfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->B3SOIDDnfactor); } if (model->B3SOIDDkb3 < 0.0) { fprintf(fplog, "Warning: Kb3 = %g is negative.\n", model->B3SOIDDkb3); printf("Warning: Kb3 = %g is negative.\n", model->B3SOIDDkb3); } if (pParam->B3SOIDDcdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->B3SOIDDcdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->B3SOIDDcdsc); } if (pParam->B3SOIDDcdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->B3SOIDDcdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->B3SOIDDcdscd); } /* Check DIBL parameters */ if (pParam->B3SOIDDeta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->B3SOIDDeta0); printf("Warning: Eta0 = %g is negative.\n", pParam->B3SOIDDeta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->B3SOIDDb1 + pParam->B3SOIDDweff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } if (model->B3SOIDDadice0 > 1.0) { fprintf(fplog, "Warning: Adice0 = %g should be smaller than 1.\n", model->B3SOIDDadice0); printf("Warning: Adice0 = %g should be smaller than 1.\n", model->B3SOIDDadice0); } if (model->B3SOIDDabp < 0.2) { fprintf(fplog, "Warning: Abp = %g is too small.\n", model->B3SOIDDabp); printf("Warning: Abp = %g is too small.\n", model->B3SOIDDabp); } if ((model->B3SOIDDmxc < -1.0) || (model->B3SOIDDmxc > 1.0)) { fprintf(fplog, "Warning: Mxc = %g should be within (-1, 1).\n", model->B3SOIDDmxc); printf("Warning: Mxc = %g should be within (-1, 1).\n", model->B3SOIDDmxc); } /* Check Saturation parameters */ if (pParam->B3SOIDDa2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIDDa2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIDDa2); pParam->B3SOIDDa2 = 0.01; } else if (pParam->B3SOIDDa2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIDDa2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIDDa2); pParam->B3SOIDDa2 = 1.0; pParam->B3SOIDDa1 = 0.0; } if (pParam->B3SOIDDrdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIDDrdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIDDrdsw); pParam->B3SOIDDrdsw = 0.0; pParam->B3SOIDDrds0 = 0.0; } else if ((pParam->B3SOIDDrds0 > 0.0) && (pParam->B3SOIDDrds0 < 0.001)) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIDDrds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIDDrds0); pParam->B3SOIDDrds0 = 0.0; } if (pParam->B3SOIDDvsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIDDvsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIDDvsattemp); } if (pParam->B3SOIDDpdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIDDpdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIDDpdibl1); } if (pParam->B3SOIDDpdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIDDpdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIDDpdibl2); } /* Check overlap capacitance parameters */ if (model->B3SOIDDcgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIDDcgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIDDcgdo); model->B3SOIDDcgdo = 0.0; } if (model->B3SOIDDcgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIDDcgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIDDcgso); model->B3SOIDDcgso = 0.0; } if (model->B3SOIDDcgeo < 0.0) { fprintf(fplog, "Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIDDcgeo); printf("Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIDDcgeo); model->B3SOIDDcgeo = 0.0; } if (model->B3SOIDDntun < 0.0) { fprintf(fplog, "Warning: Ntun = %g is negative.\n", model->B3SOIDDntun); printf("Warning: Ntun = %g is negative.\n", model->B3SOIDDntun); } if (model->B3SOIDDndiode < 0.0) { fprintf(fplog, "Warning: Ndiode = %g is negative.\n", model->B3SOIDDndiode); printf("Warning: Ndiode = %g is negative.\n", model->B3SOIDDndiode); } if (model->B3SOIDDisbjt < 0.0) { fprintf(fplog, "Warning: Isbjt = %g is negative.\n", model->B3SOIDDisbjt); printf("Warning: Isbjt = %g is negative.\n", model->B3SOIDDisbjt); } if (model->B3SOIDDisdif < 0.0) { fprintf(fplog, "Warning: Isdif = %g is negative.\n", model->B3SOIDDisdif); printf("Warning: Isdif = %g is negative.\n", model->B3SOIDDisdif); } if (model->B3SOIDDisrec < 0.0) { fprintf(fplog, "Warning: Isrec = %g is negative.\n", model->B3SOIDDisrec); printf("Warning: Isrec = %g is negative.\n", model->B3SOIDDisrec); } if (model->B3SOIDDistun < 0.0) { fprintf(fplog, "Warning: Istun = %g is negative.\n", model->B3SOIDDistun); printf("Warning: Istun = %g is negative.\n", model->B3SOIDDistun); } if (model->B3SOIDDedl < 0.0) { fprintf(fplog, "Warning: Edl = %g is negative.\n", model->B3SOIDDedl); printf("Warning: Edl = %g is negative.\n", model->B3SOIDDedl); } if (model->B3SOIDDkbjt1 < 0.0) { fprintf(fplog, "Warning: Kbjt1 = %g is negative.\n", model->B3SOIDDkbjt1); printf("Warning: kbjt1 = %g is negative.\n", model->B3SOIDDkbjt1); } if (model->B3SOIDDtt < 0.0) { fprintf(fplog, "Warning: Tt = %g is negative.\n", model->B3SOIDDtt); printf("Warning: Tt = %g is negative.\n", model->B3SOIDDtt); } if (model->B3SOIDDcsdmin < 0.0) { fprintf(fplog, "Warning: Csdmin = %g is negative.\n", model->B3SOIDDcsdmin); printf("Warning: Csdmin = %g is negative.\n", model->B3SOIDDcsdmin); } if (model->B3SOIDDcsdesw < 0.0) { fprintf(fplog, "Warning: Csdesw = %g is negative.\n", model->B3SOIDDcsdesw); printf("Warning: Csdesw = %g is negative.\n", model->B3SOIDDcsdesw); } if ((model->B3SOIDDasd < 0.0) || (model->B3SOIDDmxc > 1.0)) { fprintf(fplog, "Warning: Asd = %g should be within (0, 1).\n", model->B3SOIDDasd); printf("Warning: Asd = %g should be within (0, 1).\n", model->B3SOIDDasd); } if (model->B3SOIDDrth0 < 0.0) { fprintf(fplog, "Warning: Rth0 = %g is negative.\n", model->B3SOIDDrth0); printf("Warning: Rth0 = %g is negative.\n", model->B3SOIDDrth0); } if (model->B3SOIDDcth0 < 0.0) { fprintf(fplog, "Warning: Cth0 = %g is negative.\n", model->B3SOIDDcth0); printf("Warning: Cth0 = %g is negative.\n", model->B3SOIDDcth0); } if (model->B3SOIDDrbody < 0.0) { fprintf(fplog, "Warning: Rbody = %g is negative.\n", model->B3SOIDDrbody); printf("Warning: Rbody = %g is negative.\n", model->B3SOIDDrbody); } if (model->B3SOIDDrbsh < 0.0) { fprintf(fplog, "Warning: Rbsh = %g is negative.\n", model->B3SOIDDrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B3SOIDDrbsh); } if (model->B3SOIDDxj > model->B3SOIDDtsi) { fprintf(fplog, "Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIDDxj, model->B3SOIDDtsi); printf("Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIDDxj, model->B3SOIDDtsi); } if (model->B3SOIDDcapMod < 2) { fprintf(fplog, "Warning: capMod < 2 is not supported by BSIM3SOI.\n"); printf("Warning: Warning: capMod < 2 is not supported by BSIM3SOI.\n"); } if (model->B3SOIDDcii > 2.0) { fprintf(fplog, "Warning: Cii = %g is larger than 2.0.\n", model->B3SOIDDcii); printf("Warning: Cii = %g is larger than 2.0.\n", model->B3SOIDDcii); } if (model->B3SOIDDdii > 1.5) { fprintf(fplog, "Warning: Dii = %g is larger than 1.5.\n", model->B3SOIDDcii); printf("Warning: Dii = %g is too larger than 1.5.\n", model->B3SOIDDcii); } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soidddef.h0000644000265600020320000017072412264261473022625 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung Modified by Pin Su, Wei Jin 99/9/27 File: b3soidddef.h Modified by Paolo Nenzi 2002 **********/ #ifndef B3SOIDD #define B3SOIDD #define SOICODE /* #define BULKCODE */ #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sB3SOIDDinstance { struct sB3SOIDDmodel *B3SOIDDmodPtr; struct sB3SOIDDinstance *B3SOIDDnextInstance; IFuid B3SOIDDname; int B3SOIDDstates; /* index into state table for this device */ int B3SOIDDdNode; int B3SOIDDgNode; int B3SOIDDsNode; int B3SOIDDeNode; int B3SOIDDbNode; int B3SOIDDtempNode; int B3SOIDDpNode; int B3SOIDDdNodePrime; int B3SOIDDsNodePrime; int B3SOIDDvbsNode; /* for Debug */ int B3SOIDDidsNode; int B3SOIDDicNode; int B3SOIDDibsNode; int B3SOIDDibdNode; int B3SOIDDiiiNode; int B3SOIDDigidlNode; int B3SOIDDitunNode; int B3SOIDDibpNode; int B3SOIDDabeffNode; int B3SOIDDvbs0effNode; int B3SOIDDvbseffNode; int B3SOIDDxcNode; int B3SOIDDcbbNode; int B3SOIDDcbdNode; int B3SOIDDcbeNode; int B3SOIDDcbgNode; int B3SOIDDqbNode; int B3SOIDDqbfNode; int B3SOIDDqjsNode; int B3SOIDDqjdNode; /* clean up last */ int B3SOIDDgmNode; int B3SOIDDgmbsNode; int B3SOIDDgdsNode; int B3SOIDDgmeNode; int B3SOIDDqgNode; int B3SOIDDqdNode; int B3SOIDDqeNode; int B3SOIDDiterations; int B3SOIDDvbs0teffNode; int B3SOIDDvthNode; int B3SOIDDvgsteffNode; int B3SOIDDxcsatNode; int B3SOIDDqaccNode; int B3SOIDDqsub0Node; int B3SOIDDqsubs1Node; int B3SOIDDqsubs2Node; int B3SOIDDvcscvNode; int B3SOIDDvdscvNode; int B3SOIDDdum1Node; int B3SOIDDdum2Node; int B3SOIDDdum3Node; int B3SOIDDdum4Node; int B3SOIDDdum5Node; /* end clean up last */ double B3SOIDDphi; double B3SOIDDvtm; double B3SOIDDni; double B3SOIDDueff; double B3SOIDDthetavth; double B3SOIDDvon; double B3SOIDDvbsdio; double B3SOIDDvdsat; double B3SOIDDcgdo; double B3SOIDDcgso; double B3SOIDDcgeo; double B3SOIDDids; double B3SOIDDic; double B3SOIDDibs; double B3SOIDDibd; double B3SOIDDiii; double B3SOIDDigidl; double B3SOIDDitun; double B3SOIDDibp; double B3SOIDDabeff; double B3SOIDDvbs0eff; double B3SOIDDvbseff; double B3SOIDDxc; double B3SOIDDcbg; double B3SOIDDcbb; double B3SOIDDcbd; double B3SOIDDqb; double B3SOIDDqbf; double B3SOIDDqjs; double B3SOIDDqjd; double B3SOIDDminIsub; int B3SOIDDfloat; /* clean up last */ double B3SOIDDdum1; double B3SOIDDdum2; double B3SOIDDdum3; double B3SOIDDdum4; double B3SOIDDdum5; /* end clean up last */ double B3SOIDDl; double B3SOIDDw; double B3SOIDDm; double B3SOIDDdrainArea; double B3SOIDDsourceArea; double B3SOIDDdrainSquares; double B3SOIDDsourceSquares; double B3SOIDDdrainPerimeter; double B3SOIDDsourcePerimeter; double B3SOIDDsourceConductance; double B3SOIDDdrainConductance; double B3SOIDDicVBS; double B3SOIDDicVDS; double B3SOIDDicVGS; double B3SOIDDicVES; double B3SOIDDicVPS; int B3SOIDDbjtoff; int B3SOIDDbodyMod; int B3SOIDDdebugMod; double B3SOIDDrth0; double B3SOIDDcth0; double B3SOIDDbodySquares; double B3SOIDDrbodyext; double B3SOIDDcsbox; double B3SOIDDcdbox; double B3SOIDDcsmin; double B3SOIDDcdmin; double B3SOIDDst4; double B3SOIDDdt4; int B3SOIDDoff; int B3SOIDDmode; /* OP point */ double B3SOIDDqinv; double B3SOIDDcd; double B3SOIDDcjs; double B3SOIDDcjd; double B3SOIDDcbody; double B3SOIDDcbodcon; double B3SOIDDcth; double B3SOIDDcsubstrate; double B3SOIDDgm; double B3SOIDDgme; double B3SOIDDcb; double B3SOIDDcdrain; double B3SOIDDgds; double B3SOIDDgmbs; double B3SOIDDgmT; double B3SOIDDgbbs; double B3SOIDDgbgs; double B3SOIDDgbds; double B3SOIDDgbes; double B3SOIDDgbps; double B3SOIDDgbT; double B3SOIDDgjsd; double B3SOIDDgjsb; double B3SOIDDgjsg; double B3SOIDDgjsT; double B3SOIDDgjdb; double B3SOIDDgjdd; double B3SOIDDgjdg; double B3SOIDDgjde; double B3SOIDDgjdT; double B3SOIDDgbpbs; double B3SOIDDgbpgs; double B3SOIDDgbpds; double B3SOIDDgbpes; double B3SOIDDgbpps; double B3SOIDDgbpT; double B3SOIDDgtempb; double B3SOIDDgtempg; double B3SOIDDgtempd; double B3SOIDDgtempe; double B3SOIDDgtempT; double B3SOIDDcggb; double B3SOIDDcgdb; double B3SOIDDcgsb; double B3SOIDDcgeb; double B3SOIDDcgT; double B3SOIDDcbgb; double B3SOIDDcbdb; double B3SOIDDcbsb; double B3SOIDDcbeb; double B3SOIDDcbT; double B3SOIDDcdgb; double B3SOIDDcddb; double B3SOIDDcdsb; double B3SOIDDcdeb; double B3SOIDDcdT; double B3SOIDDcegb; double B3SOIDDcedb; double B3SOIDDcesb; double B3SOIDDceeb; double B3SOIDDceT; double B3SOIDDqse; double B3SOIDDgcse; double B3SOIDDqde; double B3SOIDDgcde; struct b3soiddSizeDependParam *pParam; unsigned B3SOIDDlGiven :1; unsigned B3SOIDDwGiven :1; unsigned B3SOIDDmGiven :1; unsigned B3SOIDDdrainAreaGiven :1; unsigned B3SOIDDsourceAreaGiven :1; unsigned B3SOIDDdrainSquaresGiven :1; unsigned B3SOIDDsourceSquaresGiven :1; unsigned B3SOIDDdrainPerimeterGiven :1; unsigned B3SOIDDsourcePerimeterGiven :1; unsigned B3SOIDDdNodePrimeSet :1; unsigned B3SOIDDsNodePrimeSet :1; unsigned B3SOIDDicVBSGiven :1; unsigned B3SOIDDicVDSGiven :1; unsigned B3SOIDDicVGSGiven :1; unsigned B3SOIDDicVESGiven :1; unsigned B3SOIDDicVPSGiven :1; unsigned B3SOIDDbjtoffGiven :1; unsigned B3SOIDDdebugModGiven :1; unsigned B3SOIDDrth0Given :1; unsigned B3SOIDDcth0Given :1; unsigned B3SOIDDbodySquaresGiven :1; unsigned B3SOIDDoffGiven :1; double *B3SOIDDEePtr; double *B3SOIDDEbPtr; double *B3SOIDDBePtr; double *B3SOIDDEgPtr; double *B3SOIDDEdpPtr; double *B3SOIDDEspPtr; double *B3SOIDDTemptempPtr; double *B3SOIDDTempdpPtr; double *B3SOIDDTempspPtr; double *B3SOIDDTempgPtr; double *B3SOIDDTempbPtr; double *B3SOIDDTempePtr; double *B3SOIDDGtempPtr; double *B3SOIDDDPtempPtr; double *B3SOIDDSPtempPtr; double *B3SOIDDEtempPtr; double *B3SOIDDBtempPtr; double *B3SOIDDPtempPtr; double *B3SOIDDBpPtr; double *B3SOIDDPbPtr; double *B3SOIDDPpPtr; double *B3SOIDDPgPtr; double *B3SOIDDPdpPtr; double *B3SOIDDPspPtr; double *B3SOIDDPePtr; double *B3SOIDDDPePtr; double *B3SOIDDSPePtr; double *B3SOIDDGePtr; double *B3SOIDDDdPtr; double *B3SOIDDGgPtr; double *B3SOIDDSsPtr; double *B3SOIDDBbPtr; double *B3SOIDDDPdpPtr; double *B3SOIDDSPspPtr; double *B3SOIDDDdpPtr; double *B3SOIDDGbPtr; double *B3SOIDDGdpPtr; double *B3SOIDDGspPtr; double *B3SOIDDSspPtr; double *B3SOIDDBdpPtr; double *B3SOIDDBspPtr; double *B3SOIDDDPspPtr; double *B3SOIDDDPdPtr; double *B3SOIDDBgPtr; double *B3SOIDDDPgPtr; double *B3SOIDDSPgPtr; double *B3SOIDDSPsPtr; double *B3SOIDDDPbPtr; double *B3SOIDDSPbPtr; double *B3SOIDDSPdpPtr; double *B3SOIDDVbsPtr; /* Debug */ double *B3SOIDDIdsPtr; double *B3SOIDDIcPtr; double *B3SOIDDIbsPtr; double *B3SOIDDIbdPtr; double *B3SOIDDIiiPtr; double *B3SOIDDIgidlPtr; double *B3SOIDDItunPtr; double *B3SOIDDIbpPtr; double *B3SOIDDAbeffPtr; double *B3SOIDDVbs0effPtr; double *B3SOIDDVbseffPtr; double *B3SOIDDXcPtr; double *B3SOIDDCbbPtr; double *B3SOIDDCbdPtr; double *B3SOIDDCbgPtr; double *B3SOIDDqbPtr; double *B3SOIDDQbfPtr; double *B3SOIDDQjsPtr; double *B3SOIDDQjdPtr; /* clean up last */ double *B3SOIDDGmPtr; double *B3SOIDDGmbsPtr; double *B3SOIDDGdsPtr; double *B3SOIDDGmePtr; double *B3SOIDDVbs0teffPtr; double *B3SOIDDVthPtr; double *B3SOIDDVgsteffPtr; double *B3SOIDDXcsatPtr; double *B3SOIDDQaccPtr; double *B3SOIDDQsub0Ptr; double *B3SOIDDQsubs1Ptr; double *B3SOIDDQsubs2Ptr; double *B3SOIDDVdscvPtr; double *B3SOIDDVcscvPtr; double *B3SOIDDCbePtr; double *B3SOIDDqgPtr; double *B3SOIDDqdPtr; double *B3SOIDDqePtr; double *B3SOIDDDum1Ptr; double *B3SOIDDDum2Ptr; double *B3SOIDDDum3Ptr; double *B3SOIDDDum4Ptr; double *B3SOIDDDum5Ptr; /* End clean up last */ #define B3SOIDDvbd B3SOIDDstates+ 0 #define B3SOIDDvbs B3SOIDDstates+ 1 #define B3SOIDDvgs B3SOIDDstates+ 2 #define B3SOIDDvds B3SOIDDstates+ 3 #define B3SOIDDves B3SOIDDstates+ 4 #define B3SOIDDvps B3SOIDDstates+ 5 #define B3SOIDDvg B3SOIDDstates+ 6 #define B3SOIDDvd B3SOIDDstates+ 7 #define B3SOIDDvs B3SOIDDstates+ 8 #define B3SOIDDvp B3SOIDDstates+ 9 #define B3SOIDDve B3SOIDDstates+ 10 #define B3SOIDDdeltemp B3SOIDDstates+ 11 #define B3SOIDDqb B3SOIDDstates+ 12 #define B3SOIDDcqb B3SOIDDstates+ 13 #define B3SOIDDqg B3SOIDDstates+ 14 #define B3SOIDDcqg B3SOIDDstates+ 15 #define B3SOIDDqd B3SOIDDstates+ 16 #define B3SOIDDcqd B3SOIDDstates+ 17 #define B3SOIDDqe B3SOIDDstates+ 18 #define B3SOIDDcqe B3SOIDDstates+ 19 #define B3SOIDDqbs B3SOIDDstates+ 20 #define B3SOIDDqbd B3SOIDDstates+ 21 #define B3SOIDDqbe B3SOIDDstates+ 22 #define B3SOIDDqth B3SOIDDstates+ 23 #define B3SOIDDcqth B3SOIDDstates+ 24 #define B3SOIDDnumStates 25 /* indices to the array of B3SOIDD NOISE SOURCES */ #define B3SOIDDRDNOIZ 0 #define B3SOIDDRSNOIZ 1 #define B3SOIDDIDNOIZ 2 #define B3SOIDDFLNOIZ 3 #define B3SOIDDFBNOIZ 4 #define B3SOIDDTOTNOIZ 5 #define B3SOIDDNSRCS 6 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double B3SOIDDnVar[NSTATVARS][B3SOIDDNSRCS]; #else /* NONOISE */ double **B3SOIDDnVar; #endif /* NONOISE */ } B3SOIDDinstance ; struct b3soiddSizeDependParam { double Width; double Length; double Rth0; double Cth0; double B3SOIDDcdsc; double B3SOIDDcdscb; double B3SOIDDcdscd; double B3SOIDDcit; double B3SOIDDnfactor; double B3SOIDDvsat; double B3SOIDDat; double B3SOIDDa0; double B3SOIDDags; double B3SOIDDa1; double B3SOIDDa2; double B3SOIDDketa; double B3SOIDDnpeak; double B3SOIDDnsub; double B3SOIDDngate; double B3SOIDDgamma1; double B3SOIDDgamma2; double B3SOIDDvbx; double B3SOIDDvbi; double B3SOIDDvbm; double B3SOIDDvbsc; double B3SOIDDxt; double B3SOIDDphi; double B3SOIDDlitl; double B3SOIDDk1; double B3SOIDDkt1; double B3SOIDDkt1l; double B3SOIDDkt2; double B3SOIDDk2; double B3SOIDDk3; double B3SOIDDk3b; double B3SOIDDw0; double B3SOIDDnlx; double B3SOIDDdvt0; double B3SOIDDdvt1; double B3SOIDDdvt2; double B3SOIDDdvt0w; double B3SOIDDdvt1w; double B3SOIDDdvt2w; double B3SOIDDdrout; double B3SOIDDdsub; double B3SOIDDvth0; double B3SOIDDua; double B3SOIDDua1; double B3SOIDDub; double B3SOIDDub1; double B3SOIDDuc; double B3SOIDDuc1; double B3SOIDDu0; double B3SOIDDute; double B3SOIDDvoff; double B3SOIDDvfb; double B3SOIDDuatemp; double B3SOIDDubtemp; double B3SOIDDuctemp; double B3SOIDDrbody; double B3SOIDDrth; double B3SOIDDcth; double B3SOIDDrds0denom; double B3SOIDDvfbb; double B3SOIDDjbjt; double B3SOIDDjdif; double B3SOIDDjrec; double B3SOIDDjtun; double B3SOIDDcsesw; double B3SOIDDcdesw; /* Added */ double B3SOIDDsdt1; double B3SOIDDst2; double B3SOIDDst3; double B3SOIDDdt2; double B3SOIDDdt3; /* Added */ double B3SOIDDdelta; double B3SOIDDrdsw; double B3SOIDDrds0; double B3SOIDDprwg; double B3SOIDDprwb; double B3SOIDDprt; double B3SOIDDeta0; double B3SOIDDetab; double B3SOIDDpclm; double B3SOIDDpdibl1; double B3SOIDDpdibl2; double B3SOIDDpdiblb; double B3SOIDDpvag; double B3SOIDDwr; double B3SOIDDdwg; double B3SOIDDdwb; double B3SOIDDb0; double B3SOIDDb1; double B3SOIDDalpha0; double B3SOIDDalpha1; double B3SOIDDbeta0; /* CV model */ double B3SOIDDcgsl; double B3SOIDDcgdl; double B3SOIDDckappa; double B3SOIDDcf; double B3SOIDDclc; double B3SOIDDcle; /* Added for binning - START0 */ double B3SOIDDvbsa; double B3SOIDDdelp; double B3SOIDDkb1; double B3SOIDDkb3; double B3SOIDDdvbd0; double B3SOIDDdvbd1; double B3SOIDDabp; double B3SOIDDmxc; double B3SOIDDadice0; double B3SOIDDaii; double B3SOIDDbii; double B3SOIDDcii; double B3SOIDDdii; double B3SOIDDagidl; double B3SOIDDbgidl; double B3SOIDDngidl; double B3SOIDDntun; double B3SOIDDndiode; double B3SOIDDisbjt; double B3SOIDDisdif; double B3SOIDDisrec; double B3SOIDDistun; double B3SOIDDedl; double B3SOIDDkbjt1; double B3SOIDDvsdfb; double B3SOIDDvsdth; /* Added for binning - END0 */ /* Pre-calculated constants */ double B3SOIDDdw; double B3SOIDDdl; double B3SOIDDleff; double B3SOIDDweff; double B3SOIDDdwc; double B3SOIDDdlc; double B3SOIDDleffCV; double B3SOIDDweffCV; double B3SOIDDabulkCVfactor; double B3SOIDDcgso; double B3SOIDDcgdo; double B3SOIDDcgeo; double B3SOIDDu0temp; double B3SOIDDvsattemp; double B3SOIDDsqrtPhi; double B3SOIDDphis3; double B3SOIDDXdep0; double B3SOIDDsqrtXdep0; double B3SOIDDtheta0vb0; double B3SOIDDthetaRout; double B3SOIDDcof1; double B3SOIDDcof2; double B3SOIDDcof3; double B3SOIDDcof4; double B3SOIDDcdep0; struct b3soiddSizeDependParam *pNext; }; typedef struct sB3SOIDDmodel { int B3SOIDDmodType; struct sB3SOIDDmodel *B3SOIDDnextModel; B3SOIDDinstance *B3SOIDDinstances; IFuid B3SOIDDmodName; int B3SOIDDtype; int B3SOIDDmobMod; int B3SOIDDcapMod; int B3SOIDDnoiMod; int B3SOIDDshMod; int B3SOIDDbinUnit; int B3SOIDDparamChk; double B3SOIDDversion; double B3SOIDDtox; double B3SOIDDcdsc; double B3SOIDDcdscb; double B3SOIDDcdscd; double B3SOIDDcit; double B3SOIDDnfactor; double B3SOIDDvsat; double B3SOIDDat; double B3SOIDDa0; double B3SOIDDags; double B3SOIDDa1; double B3SOIDDa2; double B3SOIDDketa; double B3SOIDDnsub; double B3SOIDDnpeak; double B3SOIDDngate; double B3SOIDDgamma1; double B3SOIDDgamma2; double B3SOIDDvbx; double B3SOIDDvbm; double B3SOIDDxt; double B3SOIDDk1; double B3SOIDDkt1; double B3SOIDDkt1l; double B3SOIDDkt2; double B3SOIDDk2; double B3SOIDDk3; double B3SOIDDk3b; double B3SOIDDw0; double B3SOIDDnlx; double B3SOIDDdvt0; double B3SOIDDdvt1; double B3SOIDDdvt2; double B3SOIDDdvt0w; double B3SOIDDdvt1w; double B3SOIDDdvt2w; double B3SOIDDdrout; double B3SOIDDdsub; double B3SOIDDvth0; double B3SOIDDua; double B3SOIDDua1; double B3SOIDDub; double B3SOIDDub1; double B3SOIDDuc; double B3SOIDDuc1; double B3SOIDDu0; double B3SOIDDute; double B3SOIDDvoff; double B3SOIDDdelta; double B3SOIDDrdsw; double B3SOIDDprwg; double B3SOIDDprwb; double B3SOIDDprt; double B3SOIDDeta0; double B3SOIDDetab; double B3SOIDDpclm; double B3SOIDDpdibl1; double B3SOIDDpdibl2; double B3SOIDDpdiblb; double B3SOIDDpvag; double B3SOIDDwr; double B3SOIDDdwg; double B3SOIDDdwb; double B3SOIDDb0; double B3SOIDDb1; double B3SOIDDalpha0; double B3SOIDDalpha1; double B3SOIDDbeta0; double B3SOIDDtbox; double B3SOIDDtsi; double B3SOIDDxj; double B3SOIDDkb1; double B3SOIDDkb3; double B3SOIDDdvbd0; double B3SOIDDdvbd1; double B3SOIDDvbsa; double B3SOIDDdelp; double B3SOIDDrbody; double B3SOIDDrbsh; double B3SOIDDadice0; double B3SOIDDabp; double B3SOIDDmxc; double B3SOIDDrth0; double B3SOIDDcth0; double B3SOIDDaii; double B3SOIDDbii; double B3SOIDDcii; double B3SOIDDdii; double B3SOIDDngidl; double B3SOIDDagidl; double B3SOIDDbgidl; double B3SOIDDndiode; double B3SOIDDntun; double B3SOIDDisbjt; double B3SOIDDisdif; double B3SOIDDisrec; double B3SOIDDistun; double B3SOIDDxbjt; double B3SOIDDxdif; double B3SOIDDxrec; double B3SOIDDxtun; double B3SOIDDedl; double B3SOIDDkbjt1; double B3SOIDDtt; double B3SOIDDvsdfb; double B3SOIDDvsdth; double B3SOIDDcsdmin; double B3SOIDDasd; /* CV model */ double B3SOIDDcgsl; double B3SOIDDcgdl; double B3SOIDDckappa; double B3SOIDDcf; double B3SOIDDclc; double B3SOIDDcle; double B3SOIDDdwc; double B3SOIDDdlc; double B3SOIDDtnom; double B3SOIDDcgso; double B3SOIDDcgdo; double B3SOIDDcgeo; double B3SOIDDxpart; double B3SOIDDcFringOut; double B3SOIDDcFringMax; double B3SOIDDsheetResistance; double B3SOIDDbodyJctGateSideGradingCoeff; double B3SOIDDGatesidewallJctPotential; double B3SOIDDunitLengthGateSidewallJctCap; double B3SOIDDcsdesw; double B3SOIDDLint; double B3SOIDDLl; double B3SOIDDLln; double B3SOIDDLw; double B3SOIDDLwn; double B3SOIDDLwl; double B3SOIDDLmin; double B3SOIDDLmax; double B3SOIDDWint; double B3SOIDDWl; double B3SOIDDWln; double B3SOIDDWw; double B3SOIDDWwn; double B3SOIDDWwl; double B3SOIDDWmin; double B3SOIDDWmax; /* Added for binning - START1 */ /* Length Dependence */ double B3SOIDDlnpeak; double B3SOIDDlnsub; double B3SOIDDlngate; double B3SOIDDlvth0; double B3SOIDDlk1; double B3SOIDDlk2; double B3SOIDDlk3; double B3SOIDDlk3b; double B3SOIDDlvbsa; double B3SOIDDldelp; double B3SOIDDlkb1; double B3SOIDDlkb3; double B3SOIDDldvbd0; double B3SOIDDldvbd1; double B3SOIDDlw0; double B3SOIDDlnlx; double B3SOIDDldvt0; double B3SOIDDldvt1; double B3SOIDDldvt2; double B3SOIDDldvt0w; double B3SOIDDldvt1w; double B3SOIDDldvt2w; double B3SOIDDlu0; double B3SOIDDlua; double B3SOIDDlub; double B3SOIDDluc; double B3SOIDDlvsat; double B3SOIDDla0; double B3SOIDDlags; double B3SOIDDlb0; double B3SOIDDlb1; double B3SOIDDlketa; double B3SOIDDlabp; double B3SOIDDlmxc; double B3SOIDDladice0; double B3SOIDDla1; double B3SOIDDla2; double B3SOIDDlrdsw; double B3SOIDDlprwb; double B3SOIDDlprwg; double B3SOIDDlwr; double B3SOIDDlnfactor; double B3SOIDDldwg; double B3SOIDDldwb; double B3SOIDDlvoff; double B3SOIDDleta0; double B3SOIDDletab; double B3SOIDDldsub; double B3SOIDDlcit; double B3SOIDDlcdsc; double B3SOIDDlcdscb; double B3SOIDDlcdscd; double B3SOIDDlpclm; double B3SOIDDlpdibl1; double B3SOIDDlpdibl2; double B3SOIDDlpdiblb; double B3SOIDDldrout; double B3SOIDDlpvag; double B3SOIDDldelta; double B3SOIDDlaii; double B3SOIDDlbii; double B3SOIDDlcii; double B3SOIDDldii; double B3SOIDDlalpha0; double B3SOIDDlalpha1; double B3SOIDDlbeta0; double B3SOIDDlagidl; double B3SOIDDlbgidl; double B3SOIDDlngidl; double B3SOIDDlntun; double B3SOIDDlndiode; double B3SOIDDlisbjt; double B3SOIDDlisdif; double B3SOIDDlisrec; double B3SOIDDlistun; double B3SOIDDledl; double B3SOIDDlkbjt1; /* CV model */ double B3SOIDDlvsdfb; double B3SOIDDlvsdth; /* Width Dependence */ double B3SOIDDwnpeak; double B3SOIDDwnsub; double B3SOIDDwngate; double B3SOIDDwvth0; double B3SOIDDwk1; double B3SOIDDwk2; double B3SOIDDwk3; double B3SOIDDwk3b; double B3SOIDDwvbsa; double B3SOIDDwdelp; double B3SOIDDwkb1; double B3SOIDDwkb3; double B3SOIDDwdvbd0; double B3SOIDDwdvbd1; double B3SOIDDww0; double B3SOIDDwnlx; double B3SOIDDwdvt0; double B3SOIDDwdvt1; double B3SOIDDwdvt2; double B3SOIDDwdvt0w; double B3SOIDDwdvt1w; double B3SOIDDwdvt2w; double B3SOIDDwu0; double B3SOIDDwua; double B3SOIDDwub; double B3SOIDDwuc; double B3SOIDDwvsat; double B3SOIDDwa0; double B3SOIDDwags; double B3SOIDDwb0; double B3SOIDDwb1; double B3SOIDDwketa; double B3SOIDDwabp; double B3SOIDDwmxc; double B3SOIDDwadice0; double B3SOIDDwa1; double B3SOIDDwa2; double B3SOIDDwrdsw; double B3SOIDDwprwb; double B3SOIDDwprwg; double B3SOIDDwwr; double B3SOIDDwnfactor; double B3SOIDDwdwg; double B3SOIDDwdwb; double B3SOIDDwvoff; double B3SOIDDweta0; double B3SOIDDwetab; double B3SOIDDwdsub; double B3SOIDDwcit; double B3SOIDDwcdsc; double B3SOIDDwcdscb; double B3SOIDDwcdscd; double B3SOIDDwpclm; double B3SOIDDwpdibl1; double B3SOIDDwpdibl2; double B3SOIDDwpdiblb; double B3SOIDDwdrout; double B3SOIDDwpvag; double B3SOIDDwdelta; double B3SOIDDwaii; double B3SOIDDwbii; double B3SOIDDwcii; double B3SOIDDwdii; double B3SOIDDwalpha0; double B3SOIDDwalpha1; double B3SOIDDwbeta0; double B3SOIDDwagidl; double B3SOIDDwbgidl; double B3SOIDDwngidl; double B3SOIDDwntun; double B3SOIDDwndiode; double B3SOIDDwisbjt; double B3SOIDDwisdif; double B3SOIDDwisrec; double B3SOIDDwistun; double B3SOIDDwedl; double B3SOIDDwkbjt1; /* CV model */ double B3SOIDDwvsdfb; double B3SOIDDwvsdth; /* Cross-term Dependence */ double B3SOIDDpnpeak; double B3SOIDDpnsub; double B3SOIDDpngate; double B3SOIDDpvth0; double B3SOIDDpk1; double B3SOIDDpk2; double B3SOIDDpk3; double B3SOIDDpk3b; double B3SOIDDpvbsa; double B3SOIDDpdelp; double B3SOIDDpkb1; double B3SOIDDpkb3; double B3SOIDDpdvbd0; double B3SOIDDpdvbd1; double B3SOIDDpw0; double B3SOIDDpnlx; double B3SOIDDpdvt0; double B3SOIDDpdvt1; double B3SOIDDpdvt2; double B3SOIDDpdvt0w; double B3SOIDDpdvt1w; double B3SOIDDpdvt2w; double B3SOIDDpu0; double B3SOIDDpua; double B3SOIDDpub; double B3SOIDDpuc; double B3SOIDDpvsat; double B3SOIDDpa0; double B3SOIDDpags; double B3SOIDDpb0; double B3SOIDDpb1; double B3SOIDDpketa; double B3SOIDDpabp; double B3SOIDDpmxc; double B3SOIDDpadice0; double B3SOIDDpa1; double B3SOIDDpa2; double B3SOIDDprdsw; double B3SOIDDpprwb; double B3SOIDDpprwg; double B3SOIDDpwr; double B3SOIDDpnfactor; double B3SOIDDpdwg; double B3SOIDDpdwb; double B3SOIDDpvoff; double B3SOIDDpeta0; double B3SOIDDpetab; double B3SOIDDpdsub; double B3SOIDDpcit; double B3SOIDDpcdsc; double B3SOIDDpcdscb; double B3SOIDDpcdscd; double B3SOIDDppclm; double B3SOIDDppdibl1; double B3SOIDDppdibl2; double B3SOIDDppdiblb; double B3SOIDDpdrout; double B3SOIDDppvag; double B3SOIDDpdelta; double B3SOIDDpaii; double B3SOIDDpbii; double B3SOIDDpcii; double B3SOIDDpdii; double B3SOIDDpalpha0; double B3SOIDDpalpha1; double B3SOIDDpbeta0; double B3SOIDDpagidl; double B3SOIDDpbgidl; double B3SOIDDpngidl; double B3SOIDDpntun; double B3SOIDDpndiode; double B3SOIDDpisbjt; double B3SOIDDpisdif; double B3SOIDDpisrec; double B3SOIDDpistun; double B3SOIDDpedl; double B3SOIDDpkbjt1; /* CV model */ double B3SOIDDpvsdfb; double B3SOIDDpvsdth; /* Added for binning - END1 */ /* Pre-calculated constants */ double B3SOIDDcbox; double B3SOIDDcsi; double B3SOIDDcsieff; double B3SOIDDcoxt; double B3SOIDDcboxt; double B3SOIDDcsit; double B3SOIDDnfb; double B3SOIDDadice; double B3SOIDDqsi; double B3SOIDDqsieff; double B3SOIDDeg0; /* MCJ: move to size-dependent param. */ double B3SOIDDvtm; double B3SOIDDcox; double B3SOIDDcof1; double B3SOIDDcof2; double B3SOIDDcof3; double B3SOIDDcof4; double B3SOIDDvcrit; double B3SOIDDfactor1; double B3SOIDDoxideTrapDensityA; double B3SOIDDoxideTrapDensityB; double B3SOIDDoxideTrapDensityC; double B3SOIDDem; double B3SOIDDef; double B3SOIDDaf; double B3SOIDDkf; double B3SOIDDnoif; struct b3soiddSizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned B3SOIDDtboxGiven:1; unsigned B3SOIDDtsiGiven :1; unsigned B3SOIDDxjGiven :1; unsigned B3SOIDDkb1Given :1; unsigned B3SOIDDkb3Given :1; unsigned B3SOIDDdvbd0Given :1; unsigned B3SOIDDdvbd1Given :1; unsigned B3SOIDDvbsaGiven :1; unsigned B3SOIDDdelpGiven :1; unsigned B3SOIDDrbodyGiven :1; unsigned B3SOIDDrbshGiven :1; unsigned B3SOIDDadice0Given :1; unsigned B3SOIDDabpGiven :1; unsigned B3SOIDDmxcGiven :1; unsigned B3SOIDDrth0Given :1; unsigned B3SOIDDcth0Given :1; unsigned B3SOIDDaiiGiven :1; unsigned B3SOIDDbiiGiven :1; unsigned B3SOIDDciiGiven :1; unsigned B3SOIDDdiiGiven :1; unsigned B3SOIDDngidlGiven :1; unsigned B3SOIDDagidlGiven :1; unsigned B3SOIDDbgidlGiven :1; unsigned B3SOIDDndiodeGiven :1; unsigned B3SOIDDntunGiven :1; unsigned B3SOIDDisbjtGiven :1; unsigned B3SOIDDisdifGiven :1; unsigned B3SOIDDisrecGiven :1; unsigned B3SOIDDistunGiven :1; unsigned B3SOIDDxbjtGiven :1; unsigned B3SOIDDxdifGiven :1; unsigned B3SOIDDxrecGiven :1; unsigned B3SOIDDxtunGiven :1; unsigned B3SOIDDedlGiven :1; unsigned B3SOIDDkbjt1Given :1; unsigned B3SOIDDttGiven :1; unsigned B3SOIDDvsdfbGiven :1; unsigned B3SOIDDvsdthGiven :1; unsigned B3SOIDDasdGiven :1; unsigned B3SOIDDcsdminGiven :1; unsigned B3SOIDDmobModGiven :1; unsigned B3SOIDDbinUnitGiven :1; unsigned B3SOIDDcapModGiven :1; unsigned B3SOIDDparamChkGiven :1; unsigned B3SOIDDnoiModGiven :1; unsigned B3SOIDDshModGiven :1; unsigned B3SOIDDtypeGiven :1; unsigned B3SOIDDtoxGiven :1; unsigned B3SOIDDversionGiven :1; unsigned B3SOIDDcdscGiven :1; unsigned B3SOIDDcdscbGiven :1; unsigned B3SOIDDcdscdGiven :1; unsigned B3SOIDDcitGiven :1; unsigned B3SOIDDnfactorGiven :1; unsigned B3SOIDDvsatGiven :1; unsigned B3SOIDDatGiven :1; unsigned B3SOIDDa0Given :1; unsigned B3SOIDDagsGiven :1; unsigned B3SOIDDa1Given :1; unsigned B3SOIDDa2Given :1; unsigned B3SOIDDketaGiven :1; unsigned B3SOIDDnsubGiven :1; unsigned B3SOIDDnpeakGiven :1; unsigned B3SOIDDngateGiven :1; unsigned B3SOIDDgamma1Given :1; unsigned B3SOIDDgamma2Given :1; unsigned B3SOIDDvbxGiven :1; unsigned B3SOIDDvbmGiven :1; unsigned B3SOIDDxtGiven :1; unsigned B3SOIDDk1Given :1; unsigned B3SOIDDkt1Given :1; unsigned B3SOIDDkt1lGiven :1; unsigned B3SOIDDkt2Given :1; unsigned B3SOIDDk2Given :1; unsigned B3SOIDDk3Given :1; unsigned B3SOIDDk3bGiven :1; unsigned B3SOIDDw0Given :1; unsigned B3SOIDDnlxGiven :1; unsigned B3SOIDDdvt0Given :1; unsigned B3SOIDDdvt1Given :1; unsigned B3SOIDDdvt2Given :1; unsigned B3SOIDDdvt0wGiven :1; unsigned B3SOIDDdvt1wGiven :1; unsigned B3SOIDDdvt2wGiven :1; unsigned B3SOIDDdroutGiven :1; unsigned B3SOIDDdsubGiven :1; unsigned B3SOIDDvth0Given :1; unsigned B3SOIDDuaGiven :1; unsigned B3SOIDDua1Given :1; unsigned B3SOIDDubGiven :1; unsigned B3SOIDDub1Given :1; unsigned B3SOIDDucGiven :1; unsigned B3SOIDDuc1Given :1; unsigned B3SOIDDu0Given :1; unsigned B3SOIDDuteGiven :1; unsigned B3SOIDDvoffGiven :1; unsigned B3SOIDDrdswGiven :1; unsigned B3SOIDDprwgGiven :1; unsigned B3SOIDDprwbGiven :1; unsigned B3SOIDDprtGiven :1; unsigned B3SOIDDeta0Given :1; unsigned B3SOIDDetabGiven :1; unsigned B3SOIDDpclmGiven :1; unsigned B3SOIDDpdibl1Given :1; unsigned B3SOIDDpdibl2Given :1; unsigned B3SOIDDpdiblbGiven :1; unsigned B3SOIDDpvagGiven :1; unsigned B3SOIDDdeltaGiven :1; unsigned B3SOIDDwrGiven :1; unsigned B3SOIDDdwgGiven :1; unsigned B3SOIDDdwbGiven :1; unsigned B3SOIDDb0Given :1; unsigned B3SOIDDb1Given :1; unsigned B3SOIDDalpha0Given :1; unsigned B3SOIDDalpha1Given :1; unsigned B3SOIDDbeta0Given :1; /* CV model */ unsigned B3SOIDDcgslGiven :1; unsigned B3SOIDDcgdlGiven :1; unsigned B3SOIDDckappaGiven :1; unsigned B3SOIDDcfGiven :1; unsigned B3SOIDDclcGiven :1; unsigned B3SOIDDcleGiven :1; unsigned B3SOIDDdwcGiven :1; unsigned B3SOIDDdlcGiven :1; /* Added for binning - START2 */ /* Length Dependence */ unsigned B3SOIDDlnpeakGiven :1; unsigned B3SOIDDlnsubGiven :1; unsigned B3SOIDDlngateGiven :1; unsigned B3SOIDDlvth0Given :1; unsigned B3SOIDDlk1Given :1; unsigned B3SOIDDlk2Given :1; unsigned B3SOIDDlk3Given :1; unsigned B3SOIDDlk3bGiven :1; unsigned B3SOIDDlvbsaGiven :1; unsigned B3SOIDDldelpGiven :1; unsigned B3SOIDDlkb1Given :1; unsigned B3SOIDDlkb3Given :1; unsigned B3SOIDDldvbd0Given :1; unsigned B3SOIDDldvbd1Given :1; unsigned B3SOIDDlw0Given :1; unsigned B3SOIDDlnlxGiven :1; unsigned B3SOIDDldvt0Given :1; unsigned B3SOIDDldvt1Given :1; unsigned B3SOIDDldvt2Given :1; unsigned B3SOIDDldvt0wGiven :1; unsigned B3SOIDDldvt1wGiven :1; unsigned B3SOIDDldvt2wGiven :1; unsigned B3SOIDDlu0Given :1; unsigned B3SOIDDluaGiven :1; unsigned B3SOIDDlubGiven :1; unsigned B3SOIDDlucGiven :1; unsigned B3SOIDDlvsatGiven :1; unsigned B3SOIDDla0Given :1; unsigned B3SOIDDlagsGiven :1; unsigned B3SOIDDlb0Given :1; unsigned B3SOIDDlb1Given :1; unsigned B3SOIDDlketaGiven :1; unsigned B3SOIDDlabpGiven :1; unsigned B3SOIDDlmxcGiven :1; unsigned B3SOIDDladice0Given :1; unsigned B3SOIDDla1Given :1; unsigned B3SOIDDla2Given :1; unsigned B3SOIDDlrdswGiven :1; unsigned B3SOIDDlprwbGiven :1; unsigned B3SOIDDlprwgGiven :1; unsigned B3SOIDDlwrGiven :1; unsigned B3SOIDDlnfactorGiven :1; unsigned B3SOIDDldwgGiven :1; unsigned B3SOIDDldwbGiven :1; unsigned B3SOIDDlvoffGiven :1; unsigned B3SOIDDleta0Given :1; unsigned B3SOIDDletabGiven :1; unsigned B3SOIDDldsubGiven :1; unsigned B3SOIDDlcitGiven :1; unsigned B3SOIDDlcdscGiven :1; unsigned B3SOIDDlcdscbGiven :1; unsigned B3SOIDDlcdscdGiven :1; unsigned B3SOIDDlpclmGiven :1; unsigned B3SOIDDlpdibl1Given :1; unsigned B3SOIDDlpdibl2Given :1; unsigned B3SOIDDlpdiblbGiven :1; unsigned B3SOIDDldroutGiven :1; unsigned B3SOIDDlpvagGiven :1; unsigned B3SOIDDldeltaGiven :1; unsigned B3SOIDDlaiiGiven :1; unsigned B3SOIDDlbiiGiven :1; unsigned B3SOIDDlciiGiven :1; unsigned B3SOIDDldiiGiven :1; unsigned B3SOIDDlalpha0Given :1; unsigned B3SOIDDlalpha1Given :1; unsigned B3SOIDDlbeta0Given :1; unsigned B3SOIDDlagidlGiven :1; unsigned B3SOIDDlbgidlGiven :1; unsigned B3SOIDDlngidlGiven :1; unsigned B3SOIDDlntunGiven :1; unsigned B3SOIDDlndiodeGiven :1; unsigned B3SOIDDlisbjtGiven :1; unsigned B3SOIDDlisdifGiven :1; unsigned B3SOIDDlisrecGiven :1; unsigned B3SOIDDlistunGiven :1; unsigned B3SOIDDledlGiven :1; unsigned B3SOIDDlkbjt1Given :1; /* CV model */ unsigned B3SOIDDlvsdfbGiven :1; unsigned B3SOIDDlvsdthGiven :1; /* Width Dependence */ unsigned B3SOIDDwnpeakGiven :1; unsigned B3SOIDDwnsubGiven :1; unsigned B3SOIDDwngateGiven :1; unsigned B3SOIDDwvth0Given :1; unsigned B3SOIDDwk1Given :1; unsigned B3SOIDDwk2Given :1; unsigned B3SOIDDwk3Given :1; unsigned B3SOIDDwk3bGiven :1; unsigned B3SOIDDwvbsaGiven :1; unsigned B3SOIDDwdelpGiven :1; unsigned B3SOIDDwkb1Given :1; unsigned B3SOIDDwkb3Given :1; unsigned B3SOIDDwdvbd0Given :1; unsigned B3SOIDDwdvbd1Given :1; unsigned B3SOIDDww0Given :1; unsigned B3SOIDDwnlxGiven :1; unsigned B3SOIDDwdvt0Given :1; unsigned B3SOIDDwdvt1Given :1; unsigned B3SOIDDwdvt2Given :1; unsigned B3SOIDDwdvt0wGiven :1; unsigned B3SOIDDwdvt1wGiven :1; unsigned B3SOIDDwdvt2wGiven :1; unsigned B3SOIDDwu0Given :1; unsigned B3SOIDDwuaGiven :1; unsigned B3SOIDDwubGiven :1; unsigned B3SOIDDwucGiven :1; unsigned B3SOIDDwvsatGiven :1; unsigned B3SOIDDwa0Given :1; unsigned B3SOIDDwagsGiven :1; unsigned B3SOIDDwb0Given :1; unsigned B3SOIDDwb1Given :1; unsigned B3SOIDDwketaGiven :1; unsigned B3SOIDDwabpGiven :1; unsigned B3SOIDDwmxcGiven :1; unsigned B3SOIDDwadice0Given :1; unsigned B3SOIDDwa1Given :1; unsigned B3SOIDDwa2Given :1; unsigned B3SOIDDwrdswGiven :1; unsigned B3SOIDDwprwbGiven :1; unsigned B3SOIDDwprwgGiven :1; unsigned B3SOIDDwwrGiven :1; unsigned B3SOIDDwnfactorGiven :1; unsigned B3SOIDDwdwgGiven :1; unsigned B3SOIDDwdwbGiven :1; unsigned B3SOIDDwvoffGiven :1; unsigned B3SOIDDweta0Given :1; unsigned B3SOIDDwetabGiven :1; unsigned B3SOIDDwdsubGiven :1; unsigned B3SOIDDwcitGiven :1; unsigned B3SOIDDwcdscGiven :1; unsigned B3SOIDDwcdscbGiven :1; unsigned B3SOIDDwcdscdGiven :1; unsigned B3SOIDDwpclmGiven :1; unsigned B3SOIDDwpdibl1Given :1; unsigned B3SOIDDwpdibl2Given :1; unsigned B3SOIDDwpdiblbGiven :1; unsigned B3SOIDDwdroutGiven :1; unsigned B3SOIDDwpvagGiven :1; unsigned B3SOIDDwdeltaGiven :1; unsigned B3SOIDDwaiiGiven :1; unsigned B3SOIDDwbiiGiven :1; unsigned B3SOIDDwciiGiven :1; unsigned B3SOIDDwdiiGiven :1; unsigned B3SOIDDwalpha0Given :1; unsigned B3SOIDDwalpha1Given :1; unsigned B3SOIDDwbeta0Given :1; unsigned B3SOIDDwagidlGiven :1; unsigned B3SOIDDwbgidlGiven :1; unsigned B3SOIDDwngidlGiven :1; unsigned B3SOIDDwntunGiven :1; unsigned B3SOIDDwndiodeGiven :1; unsigned B3SOIDDwisbjtGiven :1; unsigned B3SOIDDwisdifGiven :1; unsigned B3SOIDDwisrecGiven :1; unsigned B3SOIDDwistunGiven :1; unsigned B3SOIDDwedlGiven :1; unsigned B3SOIDDwkbjt1Given :1; /* CV model */ unsigned B3SOIDDwvsdfbGiven :1; unsigned B3SOIDDwvsdthGiven :1; /* Cross-term Dependence */ unsigned B3SOIDDpnpeakGiven :1; unsigned B3SOIDDpnsubGiven :1; unsigned B3SOIDDpngateGiven :1; unsigned B3SOIDDpvth0Given :1; unsigned B3SOIDDpk1Given :1; unsigned B3SOIDDpk2Given :1; unsigned B3SOIDDpk3Given :1; unsigned B3SOIDDpk3bGiven :1; unsigned B3SOIDDpvbsaGiven :1; unsigned B3SOIDDpdelpGiven :1; unsigned B3SOIDDpkb1Given :1; unsigned B3SOIDDpkb3Given :1; unsigned B3SOIDDpdvbd0Given :1; unsigned B3SOIDDpdvbd1Given :1; unsigned B3SOIDDpw0Given :1; unsigned B3SOIDDpnlxGiven :1; unsigned B3SOIDDpdvt0Given :1; unsigned B3SOIDDpdvt1Given :1; unsigned B3SOIDDpdvt2Given :1; unsigned B3SOIDDpdvt0wGiven :1; unsigned B3SOIDDpdvt1wGiven :1; unsigned B3SOIDDpdvt2wGiven :1; unsigned B3SOIDDpu0Given :1; unsigned B3SOIDDpuaGiven :1; unsigned B3SOIDDpubGiven :1; unsigned B3SOIDDpucGiven :1; unsigned B3SOIDDpvsatGiven :1; unsigned B3SOIDDpa0Given :1; unsigned B3SOIDDpagsGiven :1; unsigned B3SOIDDpb0Given :1; unsigned B3SOIDDpb1Given :1; unsigned B3SOIDDpketaGiven :1; unsigned B3SOIDDpabpGiven :1; unsigned B3SOIDDpmxcGiven :1; unsigned B3SOIDDpadice0Given :1; unsigned B3SOIDDpa1Given :1; unsigned B3SOIDDpa2Given :1; unsigned B3SOIDDprdswGiven :1; unsigned B3SOIDDpprwbGiven :1; unsigned B3SOIDDpprwgGiven :1; unsigned B3SOIDDpwrGiven :1; unsigned B3SOIDDpnfactorGiven :1; unsigned B3SOIDDpdwgGiven :1; unsigned B3SOIDDpdwbGiven :1; unsigned B3SOIDDpvoffGiven :1; unsigned B3SOIDDpeta0Given :1; unsigned B3SOIDDpetabGiven :1; unsigned B3SOIDDpdsubGiven :1; unsigned B3SOIDDpcitGiven :1; unsigned B3SOIDDpcdscGiven :1; unsigned B3SOIDDpcdscbGiven :1; unsigned B3SOIDDpcdscdGiven :1; unsigned B3SOIDDppclmGiven :1; unsigned B3SOIDDppdibl1Given :1; unsigned B3SOIDDppdibl2Given :1; unsigned B3SOIDDppdiblbGiven :1; unsigned B3SOIDDpdroutGiven :1; unsigned B3SOIDDppvagGiven :1; unsigned B3SOIDDpdeltaGiven :1; unsigned B3SOIDDpaiiGiven :1; unsigned B3SOIDDpbiiGiven :1; unsigned B3SOIDDpciiGiven :1; unsigned B3SOIDDpdiiGiven :1; unsigned B3SOIDDpalpha0Given :1; unsigned B3SOIDDpalpha1Given :1; unsigned B3SOIDDpbeta0Given :1; unsigned B3SOIDDpagidlGiven :1; unsigned B3SOIDDpbgidlGiven :1; unsigned B3SOIDDpngidlGiven :1; unsigned B3SOIDDpntunGiven :1; unsigned B3SOIDDpndiodeGiven :1; unsigned B3SOIDDpisbjtGiven :1; unsigned B3SOIDDpisdifGiven :1; unsigned B3SOIDDpisrecGiven :1; unsigned B3SOIDDpistunGiven :1; unsigned B3SOIDDpedlGiven :1; unsigned B3SOIDDpkbjt1Given :1; /* CV model */ unsigned B3SOIDDpvsdfbGiven :1; unsigned B3SOIDDpvsdthGiven :1; /* Added for binning - END2 */ unsigned B3SOIDDuseFringeGiven :1; unsigned B3SOIDDtnomGiven :1; unsigned B3SOIDDcgsoGiven :1; unsigned B3SOIDDcgdoGiven :1; unsigned B3SOIDDcgeoGiven :1; unsigned B3SOIDDxpartGiven :1; unsigned B3SOIDDsheetResistanceGiven :1; unsigned B3SOIDDGatesidewallJctPotentialGiven :1; unsigned B3SOIDDbodyJctGateSideGradingCoeffGiven :1; unsigned B3SOIDDunitLengthGateSidewallJctCapGiven :1; unsigned B3SOIDDcsdeswGiven :1; unsigned B3SOIDDoxideTrapDensityAGiven :1; unsigned B3SOIDDoxideTrapDensityBGiven :1; unsigned B3SOIDDoxideTrapDensityCGiven :1; unsigned B3SOIDDemGiven :1; unsigned B3SOIDDefGiven :1; unsigned B3SOIDDafGiven :1; unsigned B3SOIDDkfGiven :1; unsigned B3SOIDDnoifGiven :1; unsigned B3SOIDDLintGiven :1; unsigned B3SOIDDLlGiven :1; unsigned B3SOIDDLlnGiven :1; unsigned B3SOIDDLwGiven :1; unsigned B3SOIDDLwnGiven :1; unsigned B3SOIDDLwlGiven :1; unsigned B3SOIDDLminGiven :1; unsigned B3SOIDDLmaxGiven :1; unsigned B3SOIDDWintGiven :1; unsigned B3SOIDDWlGiven :1; unsigned B3SOIDDWlnGiven :1; unsigned B3SOIDDWwGiven :1; unsigned B3SOIDDWwnGiven :1; unsigned B3SOIDDWwlGiven :1; unsigned B3SOIDDWminGiven :1; unsigned B3SOIDDWmaxGiven :1; } B3SOIDDmodel; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define B3SOIDD_W 1 #define B3SOIDD_L 2 #define B3SOIDD_M 22 #define B3SOIDD_AS 3 #define B3SOIDD_AD 4 #define B3SOIDD_PS 5 #define B3SOIDD_PD 6 #define B3SOIDD_NRS 7 #define B3SOIDD_NRD 8 #define B3SOIDD_OFF 9 #define B3SOIDD_IC_VBS 10 #define B3SOIDD_IC_VDS 11 #define B3SOIDD_IC_VGS 12 #define B3SOIDD_IC_VES 13 #define B3SOIDD_IC_VPS 14 #define B3SOIDD_BJTOFF 15 #define B3SOIDD_RTH0 16 #define B3SOIDD_CTH0 17 #define B3SOIDD_NRB 18 #define B3SOIDD_IC 19 #define B3SOIDD_NQSMOD 20 #define B3SOIDD_DEBUG 21 /* model parameters */ #define B3SOIDD_MOD_CAPMOD 101 #define B3SOIDD_MOD_NQSMOD 102 #define B3SOIDD_MOD_MOBMOD 103 #define B3SOIDD_MOD_NOIMOD 104 #define B3SOIDD_MOD_SHMOD 105 #define B3SOIDD_MOD_DDMOD 106 #define B3SOIDD_MOD_TOX 107 #define B3SOIDD_MOD_CDSC 108 #define B3SOIDD_MOD_CDSCB 109 #define B3SOIDD_MOD_CIT 110 #define B3SOIDD_MOD_NFACTOR 111 #define B3SOIDD_MOD_XJ 112 #define B3SOIDD_MOD_VSAT 113 #define B3SOIDD_MOD_AT 114 #define B3SOIDD_MOD_A0 115 #define B3SOIDD_MOD_A1 116 #define B3SOIDD_MOD_A2 117 #define B3SOIDD_MOD_KETA 118 #define B3SOIDD_MOD_NSUB 119 #define B3SOIDD_MOD_NPEAK 120 #define B3SOIDD_MOD_NGATE 121 #define B3SOIDD_MOD_GAMMA1 122 #define B3SOIDD_MOD_GAMMA2 123 #define B3SOIDD_MOD_VBX 124 #define B3SOIDD_MOD_BINUNIT 125 #define B3SOIDD_MOD_VBM 126 #define B3SOIDD_MOD_XT 127 #define B3SOIDD_MOD_K1 129 #define B3SOIDD_MOD_KT1 130 #define B3SOIDD_MOD_KT1L 131 #define B3SOIDD_MOD_K2 132 #define B3SOIDD_MOD_KT2 133 #define B3SOIDD_MOD_K3 134 #define B3SOIDD_MOD_K3B 135 #define B3SOIDD_MOD_W0 136 #define B3SOIDD_MOD_NLX 137 #define B3SOIDD_MOD_DVT0 138 #define B3SOIDD_MOD_DVT1 139 #define B3SOIDD_MOD_DVT2 140 #define B3SOIDD_MOD_DVT0W 141 #define B3SOIDD_MOD_DVT1W 142 #define B3SOIDD_MOD_DVT2W 143 #define B3SOIDD_MOD_DROUT 144 #define B3SOIDD_MOD_DSUB 145 #define B3SOIDD_MOD_VTH0 146 #define B3SOIDD_MOD_UA 147 #define B3SOIDD_MOD_UA1 148 #define B3SOIDD_MOD_UB 149 #define B3SOIDD_MOD_UB1 150 #define B3SOIDD_MOD_UC 151 #define B3SOIDD_MOD_UC1 152 #define B3SOIDD_MOD_U0 153 #define B3SOIDD_MOD_UTE 154 #define B3SOIDD_MOD_VOFF 155 #define B3SOIDD_MOD_DELTA 156 #define B3SOIDD_MOD_RDSW 157 #define B3SOIDD_MOD_PRT 158 #define B3SOIDD_MOD_LDD 159 #define B3SOIDD_MOD_ETA 160 #define B3SOIDD_MOD_ETA0 161 #define B3SOIDD_MOD_ETAB 162 #define B3SOIDD_MOD_PCLM 163 #define B3SOIDD_MOD_PDIBL1 164 #define B3SOIDD_MOD_PDIBL2 165 #define B3SOIDD_MOD_PSCBE1 166 #define B3SOIDD_MOD_PSCBE2 167 #define B3SOIDD_MOD_PVAG 168 #define B3SOIDD_MOD_WR 169 #define B3SOIDD_MOD_DWG 170 #define B3SOIDD_MOD_DWB 171 #define B3SOIDD_MOD_B0 172 #define B3SOIDD_MOD_B1 173 #define B3SOIDD_MOD_ALPHA0 174 #define B3SOIDD_MOD_BETA0 175 #define B3SOIDD_MOD_PDIBLB 178 #define B3SOIDD_MOD_PRWG 179 #define B3SOIDD_MOD_PRWB 180 #define B3SOIDD_MOD_CDSCD 181 #define B3SOIDD_MOD_AGS 182 #define B3SOIDD_MOD_FRINGE 184 #define B3SOIDD_MOD_CGSL 186 #define B3SOIDD_MOD_CGDL 187 #define B3SOIDD_MOD_CKAPPA 188 #define B3SOIDD_MOD_CF 189 #define B3SOIDD_MOD_CLC 190 #define B3SOIDD_MOD_CLE 191 #define B3SOIDD_MOD_PARAMCHK 192 #define B3SOIDD_MOD_VERSION 193 #define B3SOIDD_MOD_TBOX 195 #define B3SOIDD_MOD_TSI 196 #define B3SOIDD_MOD_KB1 197 #define B3SOIDD_MOD_KB3 198 #define B3SOIDD_MOD_DVBD0 199 #define B3SOIDD_MOD_DVBD1 200 #define B3SOIDD_MOD_DELP 201 #define B3SOIDD_MOD_VBSA 202 #define B3SOIDD_MOD_RBODY 204 #define B3SOIDD_MOD_ADICE0 205 #define B3SOIDD_MOD_ABP 206 #define B3SOIDD_MOD_MXC 207 #define B3SOIDD_MOD_RTH0 208 #define B3SOIDD_MOD_CTH0 209 #define B3SOIDD_MOD_AII 210 #define B3SOIDD_MOD_BII 211 #define B3SOIDD_MOD_CII 212 #define B3SOIDD_MOD_DII 213 #define B3SOIDD_MOD_ALPHA1 214 #define B3SOIDD_MOD_NGIDL 215 #define B3SOIDD_MOD_AGIDL 216 #define B3SOIDD_MOD_BGIDL 217 #define B3SOIDD_MOD_NDIODE 218 #define B3SOIDD_MOD_LDIOF 219 #define B3SOIDD_MOD_LDIOR 220 #define B3SOIDD_MOD_NTUN 221 #define B3SOIDD_MOD_ISBJT 222 #define B3SOIDD_MOD_ISDIF 223 #define B3SOIDD_MOD_ISREC 224 #define B3SOIDD_MOD_ISTUN 225 #define B3SOIDD_MOD_XBJT 226 #define B3SOIDD_MOD_XDIF 227 #define B3SOIDD_MOD_XREC 228 #define B3SOIDD_MOD_XTUN 229 #define B3SOIDD_MOD_EDL 230 #define B3SOIDD_MOD_KBJT1 231 #define B3SOIDD_MOD_TT 232 #define B3SOIDD_MOD_VSDTH 233 #define B3SOIDD_MOD_VSDFB 234 #define B3SOIDD_MOD_ASD 235 #define B3SOIDD_MOD_CSDMIN 236 #define B3SOIDD_MOD_RBSH 237 /* Added for binning - START3 */ /* Length dependence */ #define B3SOIDD_MOD_LNPEAK 301 #define B3SOIDD_MOD_LNSUB 302 #define B3SOIDD_MOD_LNGATE 303 #define B3SOIDD_MOD_LVTH0 304 #define B3SOIDD_MOD_LK1 305 #define B3SOIDD_MOD_LK2 306 #define B3SOIDD_MOD_LK3 307 #define B3SOIDD_MOD_LK3B 308 #define B3SOIDD_MOD_LVBSA 309 #define B3SOIDD_MOD_LDELP 310 #define B3SOIDD_MOD_LKB1 311 #define B3SOIDD_MOD_LKB3 312 #define B3SOIDD_MOD_LDVBD0 313 #define B3SOIDD_MOD_LDVBD1 314 #define B3SOIDD_MOD_LW0 315 #define B3SOIDD_MOD_LNLX 316 #define B3SOIDD_MOD_LDVT0 317 #define B3SOIDD_MOD_LDVT1 318 #define B3SOIDD_MOD_LDVT2 319 #define B3SOIDD_MOD_LDVT0W 320 #define B3SOIDD_MOD_LDVT1W 321 #define B3SOIDD_MOD_LDVT2W 322 #define B3SOIDD_MOD_LU0 323 #define B3SOIDD_MOD_LUA 324 #define B3SOIDD_MOD_LUB 325 #define B3SOIDD_MOD_LUC 326 #define B3SOIDD_MOD_LVSAT 327 #define B3SOIDD_MOD_LA0 328 #define B3SOIDD_MOD_LAGS 329 #define B3SOIDD_MOD_LB0 330 #define B3SOIDD_MOD_LB1 331 #define B3SOIDD_MOD_LKETA 332 #define B3SOIDD_MOD_LABP 333 #define B3SOIDD_MOD_LMXC 334 #define B3SOIDD_MOD_LADICE0 335 #define B3SOIDD_MOD_LA1 336 #define B3SOIDD_MOD_LA2 337 #define B3SOIDD_MOD_LRDSW 338 #define B3SOIDD_MOD_LPRWB 339 #define B3SOIDD_MOD_LPRWG 340 #define B3SOIDD_MOD_LWR 341 #define B3SOIDD_MOD_LNFACTOR 342 #define B3SOIDD_MOD_LDWG 343 #define B3SOIDD_MOD_LDWB 344 #define B3SOIDD_MOD_LVOFF 345 #define B3SOIDD_MOD_LETA0 346 #define B3SOIDD_MOD_LETAB 347 #define B3SOIDD_MOD_LDSUB 348 #define B3SOIDD_MOD_LCIT 349 #define B3SOIDD_MOD_LCDSC 350 #define B3SOIDD_MOD_LCDSCB 351 #define B3SOIDD_MOD_LCDSCD 352 #define B3SOIDD_MOD_LPCLM 353 #define B3SOIDD_MOD_LPDIBL1 354 #define B3SOIDD_MOD_LPDIBL2 355 #define B3SOIDD_MOD_LPDIBLB 356 #define B3SOIDD_MOD_LDROUT 357 #define B3SOIDD_MOD_LPVAG 358 #define B3SOIDD_MOD_LDELTA 359 #define B3SOIDD_MOD_LAII 360 #define B3SOIDD_MOD_LBII 361 #define B3SOIDD_MOD_LCII 362 #define B3SOIDD_MOD_LDII 363 #define B3SOIDD_MOD_LALPHA0 364 #define B3SOIDD_MOD_LALPHA1 365 #define B3SOIDD_MOD_LBETA0 366 #define B3SOIDD_MOD_LAGIDL 367 #define B3SOIDD_MOD_LBGIDL 368 #define B3SOIDD_MOD_LNGIDL 369 #define B3SOIDD_MOD_LNTUN 370 #define B3SOIDD_MOD_LNDIODE 371 #define B3SOIDD_MOD_LISBJT 372 #define B3SOIDD_MOD_LISDIF 373 #define B3SOIDD_MOD_LISREC 374 #define B3SOIDD_MOD_LISTUN 375 #define B3SOIDD_MOD_LEDL 376 #define B3SOIDD_MOD_LKBJT1 377 #define B3SOIDD_MOD_LVSDFB 378 #define B3SOIDD_MOD_LVSDTH 379 /* Width dependence */ #define B3SOIDD_MOD_WNPEAK 401 #define B3SOIDD_MOD_WNSUB 402 #define B3SOIDD_MOD_WNGATE 403 #define B3SOIDD_MOD_WVTH0 404 #define B3SOIDD_MOD_WK1 405 #define B3SOIDD_MOD_WK2 406 #define B3SOIDD_MOD_WK3 407 #define B3SOIDD_MOD_WK3B 408 #define B3SOIDD_MOD_WVBSA 409 #define B3SOIDD_MOD_WDELP 410 #define B3SOIDD_MOD_WKB1 411 #define B3SOIDD_MOD_WKB3 412 #define B3SOIDD_MOD_WDVBD0 413 #define B3SOIDD_MOD_WDVBD1 414 #define B3SOIDD_MOD_WW0 415 #define B3SOIDD_MOD_WNLX 416 #define B3SOIDD_MOD_WDVT0 417 #define B3SOIDD_MOD_WDVT1 418 #define B3SOIDD_MOD_WDVT2 419 #define B3SOIDD_MOD_WDVT0W 420 #define B3SOIDD_MOD_WDVT1W 421 #define B3SOIDD_MOD_WDVT2W 422 #define B3SOIDD_MOD_WU0 423 #define B3SOIDD_MOD_WUA 424 #define B3SOIDD_MOD_WUB 425 #define B3SOIDD_MOD_WUC 426 #define B3SOIDD_MOD_WVSAT 427 #define B3SOIDD_MOD_WA0 428 #define B3SOIDD_MOD_WAGS 429 #define B3SOIDD_MOD_WB0 430 #define B3SOIDD_MOD_WB1 431 #define B3SOIDD_MOD_WKETA 432 #define B3SOIDD_MOD_WABP 433 #define B3SOIDD_MOD_WMXC 434 #define B3SOIDD_MOD_WADICE0 435 #define B3SOIDD_MOD_WA1 436 #define B3SOIDD_MOD_WA2 437 #define B3SOIDD_MOD_WRDSW 438 #define B3SOIDD_MOD_WPRWB 439 #define B3SOIDD_MOD_WPRWG 440 #define B3SOIDD_MOD_WWR 441 #define B3SOIDD_MOD_WNFACTOR 442 #define B3SOIDD_MOD_WDWG 443 #define B3SOIDD_MOD_WDWB 444 #define B3SOIDD_MOD_WVOFF 445 #define B3SOIDD_MOD_WETA0 446 #define B3SOIDD_MOD_WETAB 447 #define B3SOIDD_MOD_WDSUB 448 #define B3SOIDD_MOD_WCIT 449 #define B3SOIDD_MOD_WCDSC 450 #define B3SOIDD_MOD_WCDSCB 451 #define B3SOIDD_MOD_WCDSCD 452 #define B3SOIDD_MOD_WPCLM 453 #define B3SOIDD_MOD_WPDIBL1 454 #define B3SOIDD_MOD_WPDIBL2 455 #define B3SOIDD_MOD_WPDIBLB 456 #define B3SOIDD_MOD_WDROUT 457 #define B3SOIDD_MOD_WPVAG 458 #define B3SOIDD_MOD_WDELTA 459 #define B3SOIDD_MOD_WAII 460 #define B3SOIDD_MOD_WBII 461 #define B3SOIDD_MOD_WCII 462 #define B3SOIDD_MOD_WDII 463 #define B3SOIDD_MOD_WALPHA0 464 #define B3SOIDD_MOD_WALPHA1 465 #define B3SOIDD_MOD_WBETA0 466 #define B3SOIDD_MOD_WAGIDL 467 #define B3SOIDD_MOD_WBGIDL 468 #define B3SOIDD_MOD_WNGIDL 469 #define B3SOIDD_MOD_WNTUN 470 #define B3SOIDD_MOD_WNDIODE 471 #define B3SOIDD_MOD_WISBJT 472 #define B3SOIDD_MOD_WISDIF 473 #define B3SOIDD_MOD_WISREC 474 #define B3SOIDD_MOD_WISTUN 475 #define B3SOIDD_MOD_WEDL 476 #define B3SOIDD_MOD_WKBJT1 477 #define B3SOIDD_MOD_WVSDFB 478 #define B3SOIDD_MOD_WVSDTH 479 /* Cross-term dependence */ #define B3SOIDD_MOD_PNPEAK 501 #define B3SOIDD_MOD_PNSUB 502 #define B3SOIDD_MOD_PNGATE 503 #define B3SOIDD_MOD_PVTH0 504 #define B3SOIDD_MOD_PK1 505 #define B3SOIDD_MOD_PK2 506 #define B3SOIDD_MOD_PK3 507 #define B3SOIDD_MOD_PK3B 508 #define B3SOIDD_MOD_PVBSA 509 #define B3SOIDD_MOD_PDELP 510 #define B3SOIDD_MOD_PKB1 511 #define B3SOIDD_MOD_PKB3 512 #define B3SOIDD_MOD_PDVBD0 513 #define B3SOIDD_MOD_PDVBD1 514 #define B3SOIDD_MOD_PW0 515 #define B3SOIDD_MOD_PNLX 516 #define B3SOIDD_MOD_PDVT0 517 #define B3SOIDD_MOD_PDVT1 518 #define B3SOIDD_MOD_PDVT2 519 #define B3SOIDD_MOD_PDVT0W 520 #define B3SOIDD_MOD_PDVT1W 521 #define B3SOIDD_MOD_PDVT2W 522 #define B3SOIDD_MOD_PU0 523 #define B3SOIDD_MOD_PUA 524 #define B3SOIDD_MOD_PUB 525 #define B3SOIDD_MOD_PUC 526 #define B3SOIDD_MOD_PVSAT 527 #define B3SOIDD_MOD_PA0 528 #define B3SOIDD_MOD_PAGS 529 #define B3SOIDD_MOD_PB0 530 #define B3SOIDD_MOD_PB1 531 #define B3SOIDD_MOD_PKETA 532 #define B3SOIDD_MOD_PABP 533 #define B3SOIDD_MOD_PMXC 534 #define B3SOIDD_MOD_PADICE0 535 #define B3SOIDD_MOD_PA1 536 #define B3SOIDD_MOD_PA2 537 #define B3SOIDD_MOD_PRDSW 538 #define B3SOIDD_MOD_PPRWB 539 #define B3SOIDD_MOD_PPRWG 540 #define B3SOIDD_MOD_PWR 541 #define B3SOIDD_MOD_PNFACTOR 542 #define B3SOIDD_MOD_PDWG 543 #define B3SOIDD_MOD_PDWB 544 #define B3SOIDD_MOD_PVOFF 545 #define B3SOIDD_MOD_PETA0 546 #define B3SOIDD_MOD_PETAB 547 #define B3SOIDD_MOD_PDSUB 548 #define B3SOIDD_MOD_PCIT 549 #define B3SOIDD_MOD_PCDSC 550 #define B3SOIDD_MOD_PCDSCB 551 #define B3SOIDD_MOD_PCDSCD 552 #define B3SOIDD_MOD_PPCLM 553 #define B3SOIDD_MOD_PPDIBL1 554 #define B3SOIDD_MOD_PPDIBL2 555 #define B3SOIDD_MOD_PPDIBLB 556 #define B3SOIDD_MOD_PDROUT 557 #define B3SOIDD_MOD_PPVAG 558 #define B3SOIDD_MOD_PDELTA 559 #define B3SOIDD_MOD_PAII 560 #define B3SOIDD_MOD_PBII 561 #define B3SOIDD_MOD_PCII 562 #define B3SOIDD_MOD_PDII 563 #define B3SOIDD_MOD_PALPHA0 564 #define B3SOIDD_MOD_PALPHA1 565 #define B3SOIDD_MOD_PBETA0 566 #define B3SOIDD_MOD_PAGIDL 567 #define B3SOIDD_MOD_PBGIDL 568 #define B3SOIDD_MOD_PNGIDL 569 #define B3SOIDD_MOD_PNTUN 570 #define B3SOIDD_MOD_PNDIODE 571 #define B3SOIDD_MOD_PISBJT 572 #define B3SOIDD_MOD_PISDIF 573 #define B3SOIDD_MOD_PISREC 574 #define B3SOIDD_MOD_PISTUN 575 #define B3SOIDD_MOD_PEDL 576 #define B3SOIDD_MOD_PKBJT1 577 #define B3SOIDD_MOD_PVSDFB 578 #define B3SOIDD_MOD_PVSDTH 579 /* Added for binning - END3 */ #define B3SOIDD_MOD_TNOM 701 #define B3SOIDD_MOD_CGSO 702 #define B3SOIDD_MOD_CGDO 703 #define B3SOIDD_MOD_CGEO 704 #define B3SOIDD_MOD_XPART 705 #define B3SOIDD_MOD_RSH 706 #define B3SOIDD_MOD_NMOS 814 #define B3SOIDD_MOD_PMOS 815 #define B3SOIDD_MOD_NOIA 816 #define B3SOIDD_MOD_NOIB 817 #define B3SOIDD_MOD_NOIC 818 #define B3SOIDD_MOD_LINT 819 #define B3SOIDD_MOD_LL 820 #define B3SOIDD_MOD_LLN 821 #define B3SOIDD_MOD_LW 822 #define B3SOIDD_MOD_LWN 823 #define B3SOIDD_MOD_LWL 824 #define B3SOIDD_MOD_WINT 827 #define B3SOIDD_MOD_WL 828 #define B3SOIDD_MOD_WLN 829 #define B3SOIDD_MOD_WW 830 #define B3SOIDD_MOD_WWN 831 #define B3SOIDD_MOD_WWL 832 #define B3SOIDD_MOD_DWC 835 #define B3SOIDD_MOD_DLC 836 #define B3SOIDD_MOD_EM 837 #define B3SOIDD_MOD_EF 838 #define B3SOIDD_MOD_AF 839 #define B3SOIDD_MOD_KF 840 #define B3SOIDD_MOD_NOIF 841 #define B3SOIDD_MOD_PBSWG 843 #define B3SOIDD_MOD_MJSWG 844 #define B3SOIDD_MOD_CJSWG 845 #define B3SOIDD_MOD_CSDESW 846 /* device questions */ #define B3SOIDD_DNODE 901 #define B3SOIDD_GNODE 902 #define B3SOIDD_SNODE 903 #define B3SOIDD_BNODE 904 #define B3SOIDD_ENODE 905 #define B3SOIDD_DNODEPRIME 906 #define B3SOIDD_SNODEPRIME 907 #define B3SOIDD_VBD 908 #define B3SOIDD_VBS 909 #define B3SOIDD_VGS 910 #define B3SOIDD_VES 911 #define B3SOIDD_VDS 912 #define B3SOIDD_CD 913 #define B3SOIDD_CBS 914 #define B3SOIDD_CBD 915 #define B3SOIDD_GM 916 #define B3SOIDD_GDS 917 #define B3SOIDD_GMBS 918 #define B3SOIDD_GBD 919 #define B3SOIDD_GBS 920 #define B3SOIDD_QB 921 #define B3SOIDD_CQB 922 #define B3SOIDD_QG 923 #define B3SOIDD_CQG 924 #define B3SOIDD_QD 925 #define B3SOIDD_CQD 926 #define B3SOIDD_CGG 927 #define B3SOIDD_CGD 928 #define B3SOIDD_CGS 929 #define B3SOIDD_CBG 930 #define B3SOIDD_CAPBD 931 #define B3SOIDD_CQBD 932 #define B3SOIDD_CAPBS 933 #define B3SOIDD_CQBS 934 #define B3SOIDD_CDG 935 #define B3SOIDD_CDD 936 #define B3SOIDD_CDS 937 #define B3SOIDD_VON 938 #define B3SOIDD_VDSAT 939 #define B3SOIDD_QBS 940 #define B3SOIDD_QBD 941 #define B3SOIDD_SOURCECONDUCT 942 #define B3SOIDD_DRAINCONDUCT 943 #define B3SOIDD_CBDB 944 #define B3SOIDD_CBSB 945 #define B3SOIDD_GMID 946 #include "b3soiddext.h" extern void B3SOIDDevaluate(double,double,double,B3SOIDDinstance*,B3SOIDDmodel*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int B3SOIDDdebug(B3SOIDDmodel*, B3SOIDDinstance*, CKTcircuit*, int); extern int B3SOIDDcheckModel(B3SOIDDmodel*, B3SOIDDinstance*, CKTcircuit*); #endif /*B3SOIDD*/ ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddask.c0000644000265600020320000001774112264261473022637 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddask.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B3SOIDDinstance *here = (B3SOIDDinstance*)inst; NG_IGNORE(select); switch(which) { case B3SOIDD_L: value->rValue = here->B3SOIDDl; return(OK); case B3SOIDD_W: value->rValue = here->B3SOIDDw; return(OK); case B3SOIDD_AS: value->rValue = here->B3SOIDDsourceArea; return(OK); case B3SOIDD_AD: value->rValue = here->B3SOIDDdrainArea; return(OK); case B3SOIDD_PS: value->rValue = here->B3SOIDDsourcePerimeter; return(OK); case B3SOIDD_PD: value->rValue = here->B3SOIDDdrainPerimeter; return(OK); case B3SOIDD_NRS: value->rValue = here->B3SOIDDsourceSquares; return(OK); case B3SOIDD_NRD: value->rValue = here->B3SOIDDdrainSquares; return(OK); case B3SOIDD_OFF: value->rValue = here->B3SOIDDoff; return(OK); case B3SOIDD_BJTOFF: value->iValue = here->B3SOIDDbjtoff; return(OK); case B3SOIDD_RTH0: value->rValue = here->B3SOIDDrth0; value->rValue /= here->B3SOIDDm; return(OK); case B3SOIDD_CTH0: value->rValue = here->B3SOIDDcth0; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_NRB: value->rValue = here->B3SOIDDbodySquares; return(OK); case B3SOIDD_IC_VBS: value->rValue = here->B3SOIDDicVBS; return(OK); case B3SOIDD_IC_VDS: value->rValue = here->B3SOIDDicVDS; return(OK); case B3SOIDD_IC_VGS: value->rValue = here->B3SOIDDicVGS; return(OK); case B3SOIDD_IC_VES: value->rValue = here->B3SOIDDicVES; return(OK); case B3SOIDD_IC_VPS: value->rValue = here->B3SOIDDicVPS; return(OK); case B3SOIDD_DNODE: value->iValue = here->B3SOIDDdNode; return(OK); case B3SOIDD_GNODE: value->iValue = here->B3SOIDDgNode; return(OK); case B3SOIDD_SNODE: value->iValue = here->B3SOIDDsNode; return(OK); case B3SOIDD_BNODE: value->iValue = here->B3SOIDDbNode; return(OK); case B3SOIDD_ENODE: value->iValue = here->B3SOIDDeNode; return(OK); case B3SOIDD_DNODEPRIME: value->iValue = here->B3SOIDDdNodePrime; return(OK); case B3SOIDD_SNODEPRIME: value->iValue = here->B3SOIDDsNodePrime; return(OK); case B3SOIDD_SOURCECONDUCT: value->rValue = here->B3SOIDDsourceConductance; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_DRAINCONDUCT: value->rValue = here->B3SOIDDdrainConductance; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_VBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDvbd); return(OK); case B3SOIDD_VBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDvbs); return(OK); case B3SOIDD_VGS: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDvgs); return(OK); case B3SOIDD_VES: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDves); return(OK); case B3SOIDD_VDS: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDvds); return(OK); case B3SOIDD_CD: value->rValue = here->B3SOIDDcd; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CBS: value->rValue = here->B3SOIDDcjs; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CBD: value->rValue = here->B3SOIDDcjd; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_GM: value->rValue = here->B3SOIDDgm; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_GMID: value->rValue = here->B3SOIDDgm/here->B3SOIDDcd; return(OK); case B3SOIDD_GDS: value->rValue = here->B3SOIDDgds; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_GMBS: value->rValue = here->B3SOIDDgmbs; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_GBD: value->rValue = here->B3SOIDDgjdb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_GBS: value->rValue = here->B3SOIDDgjsb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_QB: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqb); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CQB: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqb); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_QG: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqg); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CQG: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqg); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_QD: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqd); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CQD: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDcqd); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CGG: value->rValue = here->B3SOIDDcggb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CGD: value->rValue = here->B3SOIDDcgdb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CGS: value->rValue = here->B3SOIDDcgsb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CDG: value->rValue = here->B3SOIDDcdgb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CDD: value->rValue = here->B3SOIDDcddb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CDS: value->rValue = here->B3SOIDDcdsb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CBG: value->rValue = here->B3SOIDDcbgb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CBDB: value->rValue = here->B3SOIDDcbdb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_CBSB: value->rValue = here->B3SOIDDcbsb; value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_VON: value->rValue = here->B3SOIDDvon; return(OK); case B3SOIDD_VDSAT: value->rValue = here->B3SOIDDvdsat; return(OK); case B3SOIDD_QBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqbs); value->rValue *= here->B3SOIDDm; return(OK); case B3SOIDD_QBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIDDqbd); value->rValue *= here->B3SOIDDm; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddmask.c0000644000265600020320000012075712264261473023016 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Wei Jin 99/9/27 File: b3soiddmask.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B3SOIDDmodel *model = (B3SOIDDmodel *)inst; NG_IGNORE(ckt); switch(which) { case B3SOIDD_MOD_MOBMOD: value->iValue = model->B3SOIDDmobMod; return(OK); case B3SOIDD_MOD_PARAMCHK: value->iValue = model->B3SOIDDparamChk; return(OK); case B3SOIDD_MOD_BINUNIT: value->iValue = model->B3SOIDDbinUnit; return(OK); case B3SOIDD_MOD_CAPMOD: value->iValue = model->B3SOIDDcapMod; return(OK); case B3SOIDD_MOD_SHMOD: value->iValue = model->B3SOIDDshMod; return(OK); case B3SOIDD_MOD_NOIMOD: value->iValue = model->B3SOIDDnoiMod; return(OK); case B3SOIDD_MOD_VERSION : value->rValue = model->B3SOIDDversion; return(OK); case B3SOIDD_MOD_TOX : value->rValue = model->B3SOIDDtox; return(OK); case B3SOIDD_MOD_CDSC : value->rValue = model->B3SOIDDcdsc; return(OK); case B3SOIDD_MOD_CDSCB : value->rValue = model->B3SOIDDcdscb; return(OK); case B3SOIDD_MOD_CDSCD : value->rValue = model->B3SOIDDcdscd; return(OK); case B3SOIDD_MOD_CIT : value->rValue = model->B3SOIDDcit; return(OK); case B3SOIDD_MOD_NFACTOR : value->rValue = model->B3SOIDDnfactor; return(OK); case B3SOIDD_MOD_VSAT: value->rValue = model->B3SOIDDvsat; return(OK); case B3SOIDD_MOD_AT: value->rValue = model->B3SOIDDat; return(OK); case B3SOIDD_MOD_A0: value->rValue = model->B3SOIDDa0; return(OK); case B3SOIDD_MOD_AGS: value->rValue = model->B3SOIDDags; return(OK); case B3SOIDD_MOD_A1: value->rValue = model->B3SOIDDa1; return(OK); case B3SOIDD_MOD_A2: value->rValue = model->B3SOIDDa2; return(OK); case B3SOIDD_MOD_KETA: value->rValue = model->B3SOIDDketa; return(OK); case B3SOIDD_MOD_NSUB: value->rValue = model->B3SOIDDnsub; return(OK); case B3SOIDD_MOD_NPEAK: value->rValue = model->B3SOIDDnpeak; return(OK); case B3SOIDD_MOD_NGATE: value->rValue = model->B3SOIDDngate; return(OK); case B3SOIDD_MOD_GAMMA1: value->rValue = model->B3SOIDDgamma1; return(OK); case B3SOIDD_MOD_GAMMA2: value->rValue = model->B3SOIDDgamma2; return(OK); case B3SOIDD_MOD_VBX: value->rValue = model->B3SOIDDvbx; return(OK); case B3SOIDD_MOD_VBM: value->rValue = model->B3SOIDDvbm; return(OK); case B3SOIDD_MOD_XT: value->rValue = model->B3SOIDDxt; return(OK); case B3SOIDD_MOD_K1: value->rValue = model->B3SOIDDk1; return(OK); case B3SOIDD_MOD_KT1: value->rValue = model->B3SOIDDkt1; return(OK); case B3SOIDD_MOD_KT1L: value->rValue = model->B3SOIDDkt1l; return(OK); case B3SOIDD_MOD_KT2 : value->rValue = model->B3SOIDDkt2; return(OK); case B3SOIDD_MOD_K2 : value->rValue = model->B3SOIDDk2; return(OK); case B3SOIDD_MOD_K3: value->rValue = model->B3SOIDDk3; return(OK); case B3SOIDD_MOD_K3B: value->rValue = model->B3SOIDDk3b; return(OK); case B3SOIDD_MOD_W0: value->rValue = model->B3SOIDDw0; return(OK); case B3SOIDD_MOD_NLX: value->rValue = model->B3SOIDDnlx; return(OK); case B3SOIDD_MOD_DVT0 : value->rValue = model->B3SOIDDdvt0; return(OK); case B3SOIDD_MOD_DVT1 : value->rValue = model->B3SOIDDdvt1; return(OK); case B3SOIDD_MOD_DVT2 : value->rValue = model->B3SOIDDdvt2; return(OK); case B3SOIDD_MOD_DVT0W : value->rValue = model->B3SOIDDdvt0w; return(OK); case B3SOIDD_MOD_DVT1W : value->rValue = model->B3SOIDDdvt1w; return(OK); case B3SOIDD_MOD_DVT2W : value->rValue = model->B3SOIDDdvt2w; return(OK); case B3SOIDD_MOD_DROUT : value->rValue = model->B3SOIDDdrout; return(OK); case B3SOIDD_MOD_DSUB : value->rValue = model->B3SOIDDdsub; return(OK); case B3SOIDD_MOD_VTH0: value->rValue = model->B3SOIDDvth0; return(OK); case B3SOIDD_MOD_UA: value->rValue = model->B3SOIDDua; return(OK); case B3SOIDD_MOD_UA1: value->rValue = model->B3SOIDDua1; return(OK); case B3SOIDD_MOD_UB: value->rValue = model->B3SOIDDub; return(OK); case B3SOIDD_MOD_UB1: value->rValue = model->B3SOIDDub1; return(OK); case B3SOIDD_MOD_UC: value->rValue = model->B3SOIDDuc; return(OK); case B3SOIDD_MOD_UC1: value->rValue = model->B3SOIDDuc1; return(OK); case B3SOIDD_MOD_U0: value->rValue = model->B3SOIDDu0; return(OK); case B3SOIDD_MOD_UTE: value->rValue = model->B3SOIDDute; return(OK); case B3SOIDD_MOD_VOFF: value->rValue = model->B3SOIDDvoff; return(OK); case B3SOIDD_MOD_DELTA: value->rValue = model->B3SOIDDdelta; return(OK); case B3SOIDD_MOD_RDSW: value->rValue = model->B3SOIDDrdsw; return(OK); case B3SOIDD_MOD_PRWG: value->rValue = model->B3SOIDDprwg; return(OK); case B3SOIDD_MOD_PRWB: value->rValue = model->B3SOIDDprwb; return(OK); case B3SOIDD_MOD_PRT: value->rValue = model->B3SOIDDprt; return(OK); case B3SOIDD_MOD_ETA0: value->rValue = model->B3SOIDDeta0; return(OK); case B3SOIDD_MOD_ETAB: value->rValue = model->B3SOIDDetab; return(OK); case B3SOIDD_MOD_PCLM: value->rValue = model->B3SOIDDpclm; return(OK); case B3SOIDD_MOD_PDIBL1: value->rValue = model->B3SOIDDpdibl1; return(OK); case B3SOIDD_MOD_PDIBL2: value->rValue = model->B3SOIDDpdibl2; return(OK); case B3SOIDD_MOD_PDIBLB: value->rValue = model->B3SOIDDpdiblb; return(OK); case B3SOIDD_MOD_PVAG: value->rValue = model->B3SOIDDpvag; return(OK); case B3SOIDD_MOD_WR: value->rValue = model->B3SOIDDwr; return(OK); case B3SOIDD_MOD_DWG: value->rValue = model->B3SOIDDdwg; return(OK); case B3SOIDD_MOD_DWB: value->rValue = model->B3SOIDDdwb; return(OK); case B3SOIDD_MOD_B0: value->rValue = model->B3SOIDDb0; return(OK); case B3SOIDD_MOD_B1: value->rValue = model->B3SOIDDb1; return(OK); case B3SOIDD_MOD_ALPHA0: value->rValue = model->B3SOIDDalpha0; return(OK); case B3SOIDD_MOD_ALPHA1: value->rValue = model->B3SOIDDalpha1; return(OK); case B3SOIDD_MOD_BETA0: value->rValue = model->B3SOIDDbeta0; return(OK); case B3SOIDD_MOD_CGSL: value->rValue = model->B3SOIDDcgsl; return(OK); case B3SOIDD_MOD_CGDL: value->rValue = model->B3SOIDDcgdl; return(OK); case B3SOIDD_MOD_CKAPPA: value->rValue = model->B3SOIDDckappa; return(OK); case B3SOIDD_MOD_CF: value->rValue = model->B3SOIDDcf; return(OK); case B3SOIDD_MOD_CLC: value->rValue = model->B3SOIDDclc; return(OK); case B3SOIDD_MOD_CLE: value->rValue = model->B3SOIDDcle; return(OK); case B3SOIDD_MOD_DWC: value->rValue = model->B3SOIDDdwc; return(OK); case B3SOIDD_MOD_DLC: value->rValue = model->B3SOIDDdlc; return(OK); case B3SOIDD_MOD_TBOX: value->rValue = model->B3SOIDDtbox; return(OK); case B3SOIDD_MOD_TSI: value->rValue = model->B3SOIDDtsi; return(OK); case B3SOIDD_MOD_KB1: value->rValue = model->B3SOIDDkb1; return(OK); case B3SOIDD_MOD_KB3: value->rValue = model->B3SOIDDkb3; return(OK); case B3SOIDD_MOD_DVBD0: value->rValue = model->B3SOIDDdvbd0; return(OK); case B3SOIDD_MOD_DVBD1: value->rValue = model->B3SOIDDdvbd1; return(OK); case B3SOIDD_MOD_DELP: value->rValue = model->B3SOIDDdelp; return(OK); case B3SOIDD_MOD_VBSA: value->rValue = model->B3SOIDDvbsa; return(OK); case B3SOIDD_MOD_RBODY: value->rValue = model->B3SOIDDrbody; return(OK); case B3SOIDD_MOD_RBSH: value->rValue = model->B3SOIDDrbsh; return(OK); case B3SOIDD_MOD_ADICE0: value->rValue = model->B3SOIDDadice0; return(OK); case B3SOIDD_MOD_ABP: value->rValue = model->B3SOIDDabp; return(OK); case B3SOIDD_MOD_MXC: value->rValue = model->B3SOIDDmxc; return(OK); case B3SOIDD_MOD_RTH0: value->rValue = model->B3SOIDDrth0; return(OK); case B3SOIDD_MOD_CTH0: value->rValue = model->B3SOIDDcth0; return(OK); case B3SOIDD_MOD_AII: value->rValue = model->B3SOIDDaii; return(OK); case B3SOIDD_MOD_BII: value->rValue = model->B3SOIDDbii; return(OK); case B3SOIDD_MOD_CII: value->rValue = model->B3SOIDDcii; return(OK); case B3SOIDD_MOD_DII: value->rValue = model->B3SOIDDdii; return(OK); case B3SOIDD_MOD_NDIODE: value->rValue = model->B3SOIDDndiode; return(OK); case B3SOIDD_MOD_NTUN: value->rValue = model->B3SOIDDntun; return(OK); case B3SOIDD_MOD_ISBJT: value->rValue = model->B3SOIDDisbjt; return(OK); case B3SOIDD_MOD_ISDIF: value->rValue = model->B3SOIDDisdif; return(OK); case B3SOIDD_MOD_ISREC: value->rValue = model->B3SOIDDisrec; return(OK); case B3SOIDD_MOD_ISTUN: value->rValue = model->B3SOIDDistun; return(OK); case B3SOIDD_MOD_XBJT: value->rValue = model->B3SOIDDxbjt; return(OK); case B3SOIDD_MOD_XREC: value->rValue = model->B3SOIDDxrec; return(OK); case B3SOIDD_MOD_XTUN: value->rValue = model->B3SOIDDxtun; return(OK); case B3SOIDD_MOD_EDL: value->rValue = model->B3SOIDDedl; return(OK); case B3SOIDD_MOD_KBJT1: value->rValue = model->B3SOIDDkbjt1; return(OK); case B3SOIDD_MOD_TT: value->rValue = model->B3SOIDDtt; return(OK); case B3SOIDD_MOD_VSDTH: value->rValue = model->B3SOIDDvsdth; return(OK); case B3SOIDD_MOD_VSDFB: value->rValue = model->B3SOIDDvsdfb; return(OK); case B3SOIDD_MOD_CSDMIN: value->rValue = model->B3SOIDDcsdmin; return(OK); case B3SOIDD_MOD_ASD: value->rValue = model->B3SOIDDasd; return(OK); case B3SOIDD_MOD_TNOM : value->rValue = model->B3SOIDDtnom; return(OK); case B3SOIDD_MOD_CGSO: value->rValue = model->B3SOIDDcgso; return(OK); case B3SOIDD_MOD_CGDO: value->rValue = model->B3SOIDDcgdo; return(OK); case B3SOIDD_MOD_CGEO: value->rValue = model->B3SOIDDcgeo; return(OK); case B3SOIDD_MOD_XPART: value->rValue = model->B3SOIDDxpart; return(OK); case B3SOIDD_MOD_RSH: value->rValue = model->B3SOIDDsheetResistance; return(OK); case B3SOIDD_MOD_PBSWG: value->rValue = model->B3SOIDDGatesidewallJctPotential; return(OK); case B3SOIDD_MOD_MJSWG: value->rValue = model->B3SOIDDbodyJctGateSideGradingCoeff; return(OK); case B3SOIDD_MOD_CJSWG: value->rValue = model->B3SOIDDunitLengthGateSidewallJctCap; return(OK); case B3SOIDD_MOD_CSDESW: value->rValue = model->B3SOIDDcsdesw; return(OK); case B3SOIDD_MOD_LINT: value->rValue = model->B3SOIDDLint; return(OK); case B3SOIDD_MOD_LL: value->rValue = model->B3SOIDDLl; return(OK); case B3SOIDD_MOD_LLN: value->rValue = model->B3SOIDDLln; return(OK); case B3SOIDD_MOD_LW: value->rValue = model->B3SOIDDLw; return(OK); case B3SOIDD_MOD_LWN: value->rValue = model->B3SOIDDLwn; return(OK); case B3SOIDD_MOD_LWL: value->rValue = model->B3SOIDDLwl; return(OK); case B3SOIDD_MOD_WINT: value->rValue = model->B3SOIDDWint; return(OK); case B3SOIDD_MOD_WL: value->rValue = model->B3SOIDDWl; return(OK); case B3SOIDD_MOD_WLN: value->rValue = model->B3SOIDDWln; return(OK); case B3SOIDD_MOD_WW: value->rValue = model->B3SOIDDWw; return(OK); case B3SOIDD_MOD_WWN: value->rValue = model->B3SOIDDWwn; return(OK); case B3SOIDD_MOD_WWL: value->rValue = model->B3SOIDDWwl; return(OK); case B3SOIDD_MOD_NOIA: value->rValue = model->B3SOIDDoxideTrapDensityA; return(OK); case B3SOIDD_MOD_NOIB: value->rValue = model->B3SOIDDoxideTrapDensityB; return(OK); case B3SOIDD_MOD_NOIC: value->rValue = model->B3SOIDDoxideTrapDensityC; return(OK); case B3SOIDD_MOD_NOIF: value->rValue = model->B3SOIDDnoif; return(OK); case B3SOIDD_MOD_EM: value->rValue = model->B3SOIDDem; return(OK); case B3SOIDD_MOD_EF: value->rValue = model->B3SOIDDef; return(OK); case B3SOIDD_MOD_AF: value->rValue = model->B3SOIDDaf; return(OK); case B3SOIDD_MOD_KF: value->rValue = model->B3SOIDDkf; return(OK); /* Added for binning - START */ /* Length Dependence */ case B3SOIDD_MOD_LNPEAK: value->rValue = model->B3SOIDDlnpeak; return(OK); case B3SOIDD_MOD_LNSUB: value->rValue = model->B3SOIDDlnsub; return(OK); case B3SOIDD_MOD_LNGATE: value->rValue = model->B3SOIDDlngate; return(OK); case B3SOIDD_MOD_LVTH0: value->rValue = model->B3SOIDDlvth0; return(OK); case B3SOIDD_MOD_LK1: value->rValue = model->B3SOIDDlk1; return(OK); case B3SOIDD_MOD_LK2: value->rValue = model->B3SOIDDlk2; return(OK); case B3SOIDD_MOD_LK3: value->rValue = model->B3SOIDDlk3; return(OK); case B3SOIDD_MOD_LK3B: value->rValue = model->B3SOIDDlk3b; return(OK); case B3SOIDD_MOD_LVBSA: value->rValue = model->B3SOIDDlvbsa; return(OK); case B3SOIDD_MOD_LDELP: value->rValue = model->B3SOIDDldelp; return(OK); case B3SOIDD_MOD_LKB1: value->rValue = model->B3SOIDDlkb1; return(OK); case B3SOIDD_MOD_LKB3: value->rValue = model->B3SOIDDlkb3; return(OK); case B3SOIDD_MOD_LDVBD0: value->rValue = model->B3SOIDDdvbd0; return(OK); case B3SOIDD_MOD_LDVBD1: value->rValue = model->B3SOIDDdvbd1; return(OK); case B3SOIDD_MOD_LW0: value->rValue = model->B3SOIDDlw0; return(OK); case B3SOIDD_MOD_LNLX: value->rValue = model->B3SOIDDlnlx; return(OK); case B3SOIDD_MOD_LDVT0 : value->rValue = model->B3SOIDDldvt0; return(OK); case B3SOIDD_MOD_LDVT1 : value->rValue = model->B3SOIDDldvt1; return(OK); case B3SOIDD_MOD_LDVT2 : value->rValue = model->B3SOIDDldvt2; return(OK); case B3SOIDD_MOD_LDVT0W : value->rValue = model->B3SOIDDldvt0w; return(OK); case B3SOIDD_MOD_LDVT1W : value->rValue = model->B3SOIDDldvt1w; return(OK); case B3SOIDD_MOD_LDVT2W : value->rValue = model->B3SOIDDldvt2w; return(OK); case B3SOIDD_MOD_LU0: value->rValue = model->B3SOIDDlu0; return(OK); case B3SOIDD_MOD_LUA: value->rValue = model->B3SOIDDlua; return(OK); case B3SOIDD_MOD_LUB: value->rValue = model->B3SOIDDlub; return(OK); case B3SOIDD_MOD_LUC: value->rValue = model->B3SOIDDluc; return(OK); case B3SOIDD_MOD_LVSAT: value->rValue = model->B3SOIDDlvsat; return(OK); case B3SOIDD_MOD_LA0: value->rValue = model->B3SOIDDla0; return(OK); case B3SOIDD_MOD_LAGS: value->rValue = model->B3SOIDDlags; return(OK); case B3SOIDD_MOD_LB0: value->rValue = model->B3SOIDDlb0; return(OK); case B3SOIDD_MOD_LB1: value->rValue = model->B3SOIDDlb1; return(OK); case B3SOIDD_MOD_LKETA: value->rValue = model->B3SOIDDlketa; return(OK); case B3SOIDD_MOD_LABP: value->rValue = model->B3SOIDDlabp; return(OK); case B3SOIDD_MOD_LMXC: value->rValue = model->B3SOIDDlmxc; return(OK); case B3SOIDD_MOD_LADICE0: value->rValue = model->B3SOIDDladice0; return(OK); case B3SOIDD_MOD_LA1: value->rValue = model->B3SOIDDla1; return(OK); case B3SOIDD_MOD_LA2: value->rValue = model->B3SOIDDla2; return(OK); case B3SOIDD_MOD_LRDSW: value->rValue = model->B3SOIDDlrdsw; return(OK); case B3SOIDD_MOD_LPRWB: value->rValue = model->B3SOIDDlprwb; return(OK); case B3SOIDD_MOD_LPRWG: value->rValue = model->B3SOIDDlprwg; return(OK); case B3SOIDD_MOD_LWR: value->rValue = model->B3SOIDDlwr; return(OK); case B3SOIDD_MOD_LNFACTOR : value->rValue = model->B3SOIDDlnfactor; return(OK); case B3SOIDD_MOD_LDWG: value->rValue = model->B3SOIDDldwg; return(OK); case B3SOIDD_MOD_LDWB: value->rValue = model->B3SOIDDldwb; return(OK); case B3SOIDD_MOD_LVOFF: value->rValue = model->B3SOIDDlvoff; return(OK); case B3SOIDD_MOD_LETA0: value->rValue = model->B3SOIDDleta0; return(OK); case B3SOIDD_MOD_LETAB: value->rValue = model->B3SOIDDletab; return(OK); case B3SOIDD_MOD_LDSUB : value->rValue = model->B3SOIDDldsub; return(OK); case B3SOIDD_MOD_LCIT : value->rValue = model->B3SOIDDlcit; return(OK); case B3SOIDD_MOD_LCDSC : value->rValue = model->B3SOIDDlcdsc; return(OK); case B3SOIDD_MOD_LCDSCB : value->rValue = model->B3SOIDDlcdscb; return(OK); case B3SOIDD_MOD_LCDSCD : value->rValue = model->B3SOIDDlcdscd; return(OK); case B3SOIDD_MOD_LPCLM: value->rValue = model->B3SOIDDlpclm; return(OK); case B3SOIDD_MOD_LPDIBL1: value->rValue = model->B3SOIDDlpdibl1; return(OK); case B3SOIDD_MOD_LPDIBL2: value->rValue = model->B3SOIDDlpdibl2; return(OK); case B3SOIDD_MOD_LPDIBLB: value->rValue = model->B3SOIDDlpdiblb; return(OK); case B3SOIDD_MOD_LDROUT : value->rValue = model->B3SOIDDldrout; return(OK); case B3SOIDD_MOD_LPVAG: value->rValue = model->B3SOIDDlpvag; return(OK); case B3SOIDD_MOD_LDELTA: value->rValue = model->B3SOIDDldelta; return(OK); case B3SOIDD_MOD_LAII: value->rValue = model->B3SOIDDlaii; return(OK); case B3SOIDD_MOD_LBII: value->rValue = model->B3SOIDDlbii; return(OK); case B3SOIDD_MOD_LCII: value->rValue = model->B3SOIDDlcii; return(OK); case B3SOIDD_MOD_LDII: value->rValue = model->B3SOIDDldii; return(OK); case B3SOIDD_MOD_LALPHA0: value->rValue = model->B3SOIDDlalpha0; return(OK); case B3SOIDD_MOD_LALPHA1: value->rValue = model->B3SOIDDlalpha1; return(OK); case B3SOIDD_MOD_LBETA0: value->rValue = model->B3SOIDDlbeta0; return(OK); case B3SOIDD_MOD_LAGIDL: value->rValue = model->B3SOIDDlagidl; return(OK); case B3SOIDD_MOD_LBGIDL: value->rValue = model->B3SOIDDlbgidl; return(OK); case B3SOIDD_MOD_LNGIDL: value->rValue = model->B3SOIDDlngidl; return(OK); case B3SOIDD_MOD_LNTUN: value->rValue = model->B3SOIDDlntun; return(OK); case B3SOIDD_MOD_LNDIODE: value->rValue = model->B3SOIDDlndiode; return(OK); case B3SOIDD_MOD_LISBJT: value->rValue = model->B3SOIDDlisbjt; return(OK); case B3SOIDD_MOD_LISDIF: value->rValue = model->B3SOIDDlisdif; return(OK); case B3SOIDD_MOD_LISREC: value->rValue = model->B3SOIDDlisrec; return(OK); case B3SOIDD_MOD_LISTUN: value->rValue = model->B3SOIDDlistun; return(OK); case B3SOIDD_MOD_LEDL: value->rValue = model->B3SOIDDledl; return(OK); case B3SOIDD_MOD_LKBJT1: value->rValue = model->B3SOIDDlkbjt1; return(OK); /* CV Model */ case B3SOIDD_MOD_LVSDFB: value->rValue = model->B3SOIDDlvsdfb; return(OK); case B3SOIDD_MOD_LVSDTH: value->rValue = model->B3SOIDDlvsdth; return(OK); /* Width Dependence */ case B3SOIDD_MOD_WNPEAK: value->rValue = model->B3SOIDDwnpeak; return(OK); case B3SOIDD_MOD_WNSUB: value->rValue = model->B3SOIDDwnsub; return(OK); case B3SOIDD_MOD_WNGATE: value->rValue = model->B3SOIDDwngate; return(OK); case B3SOIDD_MOD_WVTH0: value->rValue = model->B3SOIDDwvth0; return(OK); case B3SOIDD_MOD_WK1: value->rValue = model->B3SOIDDwk1; return(OK); case B3SOIDD_MOD_WK2: value->rValue = model->B3SOIDDwk2; return(OK); case B3SOIDD_MOD_WK3: value->rValue = model->B3SOIDDwk3; return(OK); case B3SOIDD_MOD_WK3B: value->rValue = model->B3SOIDDwk3b; return(OK); case B3SOIDD_MOD_WVBSA: value->rValue = model->B3SOIDDwvbsa; return(OK); case B3SOIDD_MOD_WDELP: value->rValue = model->B3SOIDDwdelp; return(OK); case B3SOIDD_MOD_WKB1: value->rValue = model->B3SOIDDwkb1; return(OK); case B3SOIDD_MOD_WKB3: value->rValue = model->B3SOIDDwkb3; return(OK); case B3SOIDD_MOD_WDVBD0: value->rValue = model->B3SOIDDdvbd0; return(OK); case B3SOIDD_MOD_WDVBD1: value->rValue = model->B3SOIDDdvbd1; return(OK); case B3SOIDD_MOD_WW0: value->rValue = model->B3SOIDDww0; return(OK); case B3SOIDD_MOD_WNLX: value->rValue = model->B3SOIDDwnlx; return(OK); case B3SOIDD_MOD_WDVT0 : value->rValue = model->B3SOIDDwdvt0; return(OK); case B3SOIDD_MOD_WDVT1 : value->rValue = model->B3SOIDDwdvt1; return(OK); case B3SOIDD_MOD_WDVT2 : value->rValue = model->B3SOIDDwdvt2; return(OK); case B3SOIDD_MOD_WDVT0W : value->rValue = model->B3SOIDDwdvt0w; return(OK); case B3SOIDD_MOD_WDVT1W : value->rValue = model->B3SOIDDwdvt1w; return(OK); case B3SOIDD_MOD_WDVT2W : value->rValue = model->B3SOIDDwdvt2w; return(OK); case B3SOIDD_MOD_WU0: value->rValue = model->B3SOIDDwu0; return(OK); case B3SOIDD_MOD_WUA: value->rValue = model->B3SOIDDwua; return(OK); case B3SOIDD_MOD_WUB: value->rValue = model->B3SOIDDwub; return(OK); case B3SOIDD_MOD_WUC: value->rValue = model->B3SOIDDwuc; return(OK); case B3SOIDD_MOD_WVSAT: value->rValue = model->B3SOIDDwvsat; return(OK); case B3SOIDD_MOD_WA0: value->rValue = model->B3SOIDDwa0; return(OK); case B3SOIDD_MOD_WAGS: value->rValue = model->B3SOIDDwags; return(OK); case B3SOIDD_MOD_WB0: value->rValue = model->B3SOIDDwb0; return(OK); case B3SOIDD_MOD_WB1: value->rValue = model->B3SOIDDwb1; return(OK); case B3SOIDD_MOD_WKETA: value->rValue = model->B3SOIDDwketa; return(OK); case B3SOIDD_MOD_WABP: value->rValue = model->B3SOIDDwabp; return(OK); case B3SOIDD_MOD_WMXC: value->rValue = model->B3SOIDDwmxc; return(OK); case B3SOIDD_MOD_WADICE0: value->rValue = model->B3SOIDDwadice0; return(OK); case B3SOIDD_MOD_WA1: value->rValue = model->B3SOIDDwa1; return(OK); case B3SOIDD_MOD_WA2: value->rValue = model->B3SOIDDwa2; return(OK); case B3SOIDD_MOD_WRDSW: value->rValue = model->B3SOIDDwrdsw; return(OK); case B3SOIDD_MOD_WPRWB: value->rValue = model->B3SOIDDwprwb; return(OK); case B3SOIDD_MOD_WPRWG: value->rValue = model->B3SOIDDwprwg; return(OK); case B3SOIDD_MOD_WWR: value->rValue = model->B3SOIDDwwr; return(OK); case B3SOIDD_MOD_WNFACTOR : value->rValue = model->B3SOIDDwnfactor; return(OK); case B3SOIDD_MOD_WDWG: value->rValue = model->B3SOIDDwdwg; return(OK); case B3SOIDD_MOD_WDWB: value->rValue = model->B3SOIDDwdwb; return(OK); case B3SOIDD_MOD_WVOFF: value->rValue = model->B3SOIDDwvoff; return(OK); case B3SOIDD_MOD_WETA0: value->rValue = model->B3SOIDDweta0; return(OK); case B3SOIDD_MOD_WETAB: value->rValue = model->B3SOIDDwetab; return(OK); case B3SOIDD_MOD_WDSUB : value->rValue = model->B3SOIDDwdsub; return(OK); case B3SOIDD_MOD_WCIT : value->rValue = model->B3SOIDDwcit; return(OK); case B3SOIDD_MOD_WCDSC : value->rValue = model->B3SOIDDwcdsc; return(OK); case B3SOIDD_MOD_WCDSCB : value->rValue = model->B3SOIDDwcdscb; return(OK); case B3SOIDD_MOD_WCDSCD : value->rValue = model->B3SOIDDwcdscd; return(OK); case B3SOIDD_MOD_WPCLM: value->rValue = model->B3SOIDDwpclm; return(OK); case B3SOIDD_MOD_WPDIBL1: value->rValue = model->B3SOIDDwpdibl1; return(OK); case B3SOIDD_MOD_WPDIBL2: value->rValue = model->B3SOIDDwpdibl2; return(OK); case B3SOIDD_MOD_WPDIBLB: value->rValue = model->B3SOIDDwpdiblb; return(OK); case B3SOIDD_MOD_WDROUT : value->rValue = model->B3SOIDDwdrout; return(OK); case B3SOIDD_MOD_WPVAG: value->rValue = model->B3SOIDDwpvag; return(OK); case B3SOIDD_MOD_WDELTA: value->rValue = model->B3SOIDDwdelta; return(OK); case B3SOIDD_MOD_WAII: value->rValue = model->B3SOIDDwaii; return(OK); case B3SOIDD_MOD_WBII: value->rValue = model->B3SOIDDwbii; return(OK); case B3SOIDD_MOD_WCII: value->rValue = model->B3SOIDDwcii; return(OK); case B3SOIDD_MOD_WDII: value->rValue = model->B3SOIDDwdii; return(OK); case B3SOIDD_MOD_WALPHA0: value->rValue = model->B3SOIDDwalpha0; return(OK); case B3SOIDD_MOD_WALPHA1: value->rValue = model->B3SOIDDwalpha1; return(OK); case B3SOIDD_MOD_WBETA0: value->rValue = model->B3SOIDDwbeta0; return(OK); case B3SOIDD_MOD_WAGIDL: value->rValue = model->B3SOIDDwagidl; return(OK); case B3SOIDD_MOD_WBGIDL: value->rValue = model->B3SOIDDwbgidl; return(OK); case B3SOIDD_MOD_WNGIDL: value->rValue = model->B3SOIDDwngidl; return(OK); case B3SOIDD_MOD_WNTUN: value->rValue = model->B3SOIDDwntun; return(OK); case B3SOIDD_MOD_WNDIODE: value->rValue = model->B3SOIDDwndiode; return(OK); case B3SOIDD_MOD_WISBJT: value->rValue = model->B3SOIDDwisbjt; return(OK); case B3SOIDD_MOD_WISDIF: value->rValue = model->B3SOIDDwisdif; return(OK); case B3SOIDD_MOD_WISREC: value->rValue = model->B3SOIDDwisrec; return(OK); case B3SOIDD_MOD_WISTUN: value->rValue = model->B3SOIDDwistun; return(OK); case B3SOIDD_MOD_WEDL: value->rValue = model->B3SOIDDwedl; return(OK); case B3SOIDD_MOD_WKBJT1: value->rValue = model->B3SOIDDwkbjt1; return(OK); /* CV Model */ case B3SOIDD_MOD_WVSDFB: value->rValue = model->B3SOIDDwvsdfb; return(OK); case B3SOIDD_MOD_WVSDTH: value->rValue = model->B3SOIDDwvsdth; return(OK); /* Cross-term Dependence */ case B3SOIDD_MOD_PNPEAK: value->rValue = model->B3SOIDDpnpeak; return(OK); case B3SOIDD_MOD_PNSUB: value->rValue = model->B3SOIDDpnsub; return(OK); case B3SOIDD_MOD_PNGATE: value->rValue = model->B3SOIDDpngate; return(OK); case B3SOIDD_MOD_PVTH0: value->rValue = model->B3SOIDDpvth0; return(OK); case B3SOIDD_MOD_PK1: value->rValue = model->B3SOIDDpk1; return(OK); case B3SOIDD_MOD_PK2: value->rValue = model->B3SOIDDpk2; return(OK); case B3SOIDD_MOD_PK3: value->rValue = model->B3SOIDDpk3; return(OK); case B3SOIDD_MOD_PK3B: value->rValue = model->B3SOIDDpk3b; return(OK); case B3SOIDD_MOD_PVBSA: value->rValue = model->B3SOIDDpvbsa; return(OK); case B3SOIDD_MOD_PDELP: value->rValue = model->B3SOIDDpdelp; return(OK); case B3SOIDD_MOD_PKB1: value->rValue = model->B3SOIDDpkb1; return(OK); case B3SOIDD_MOD_PKB3: value->rValue = model->B3SOIDDpkb3; return(OK); case B3SOIDD_MOD_PDVBD0: value->rValue = model->B3SOIDDdvbd0; return(OK); case B3SOIDD_MOD_PDVBD1: value->rValue = model->B3SOIDDdvbd1; return(OK); case B3SOIDD_MOD_PW0: value->rValue = model->B3SOIDDpw0; return(OK); case B3SOIDD_MOD_PNLX: value->rValue = model->B3SOIDDpnlx; return(OK); case B3SOIDD_MOD_PDVT0 : value->rValue = model->B3SOIDDpdvt0; return(OK); case B3SOIDD_MOD_PDVT1 : value->rValue = model->B3SOIDDpdvt1; return(OK); case B3SOIDD_MOD_PDVT2 : value->rValue = model->B3SOIDDpdvt2; return(OK); case B3SOIDD_MOD_PDVT0W : value->rValue = model->B3SOIDDpdvt0w; return(OK); case B3SOIDD_MOD_PDVT1W : value->rValue = model->B3SOIDDpdvt1w; return(OK); case B3SOIDD_MOD_PDVT2W : value->rValue = model->B3SOIDDpdvt2w; return(OK); case B3SOIDD_MOD_PU0: value->rValue = model->B3SOIDDpu0; return(OK); case B3SOIDD_MOD_PUA: value->rValue = model->B3SOIDDpua; return(OK); case B3SOIDD_MOD_PUB: value->rValue = model->B3SOIDDpub; return(OK); case B3SOIDD_MOD_PUC: value->rValue = model->B3SOIDDpuc; return(OK); case B3SOIDD_MOD_PVSAT: value->rValue = model->B3SOIDDpvsat; return(OK); case B3SOIDD_MOD_PA0: value->rValue = model->B3SOIDDpa0; return(OK); case B3SOIDD_MOD_PAGS: value->rValue = model->B3SOIDDpags; return(OK); case B3SOIDD_MOD_PB0: value->rValue = model->B3SOIDDpb0; return(OK); case B3SOIDD_MOD_PB1: value->rValue = model->B3SOIDDpb1; return(OK); case B3SOIDD_MOD_PKETA: value->rValue = model->B3SOIDDpketa; return(OK); case B3SOIDD_MOD_PABP: value->rValue = model->B3SOIDDpabp; return(OK); case B3SOIDD_MOD_PMXC: value->rValue = model->B3SOIDDpmxc; return(OK); case B3SOIDD_MOD_PADICE0: value->rValue = model->B3SOIDDpadice0; return(OK); case B3SOIDD_MOD_PA1: value->rValue = model->B3SOIDDpa1; return(OK); case B3SOIDD_MOD_PA2: value->rValue = model->B3SOIDDpa2; return(OK); case B3SOIDD_MOD_PRDSW: value->rValue = model->B3SOIDDprdsw; return(OK); case B3SOIDD_MOD_PPRWB: value->rValue = model->B3SOIDDpprwb; return(OK); case B3SOIDD_MOD_PPRWG: value->rValue = model->B3SOIDDpprwg; return(OK); case B3SOIDD_MOD_PWR: value->rValue = model->B3SOIDDpwr; return(OK); case B3SOIDD_MOD_PNFACTOR : value->rValue = model->B3SOIDDpnfactor; return(OK); case B3SOIDD_MOD_PDWG: value->rValue = model->B3SOIDDpdwg; return(OK); case B3SOIDD_MOD_PDWB: value->rValue = model->B3SOIDDpdwb; return(OK); case B3SOIDD_MOD_PVOFF: value->rValue = model->B3SOIDDpvoff; return(OK); case B3SOIDD_MOD_PETA0: value->rValue = model->B3SOIDDpeta0; return(OK); case B3SOIDD_MOD_PETAB: value->rValue = model->B3SOIDDpetab; return(OK); case B3SOIDD_MOD_PDSUB : value->rValue = model->B3SOIDDpdsub; return(OK); case B3SOIDD_MOD_PCIT : value->rValue = model->B3SOIDDpcit; return(OK); case B3SOIDD_MOD_PCDSC : value->rValue = model->B3SOIDDpcdsc; return(OK); case B3SOIDD_MOD_PCDSCB : value->rValue = model->B3SOIDDpcdscb; return(OK); case B3SOIDD_MOD_PCDSCD : value->rValue = model->B3SOIDDpcdscd; return(OK); case B3SOIDD_MOD_PPCLM: value->rValue = model->B3SOIDDppclm; return(OK); case B3SOIDD_MOD_PPDIBL1: value->rValue = model->B3SOIDDppdibl1; return(OK); case B3SOIDD_MOD_PPDIBL2: value->rValue = model->B3SOIDDppdibl2; return(OK); case B3SOIDD_MOD_PPDIBLB: value->rValue = model->B3SOIDDppdiblb; return(OK); case B3SOIDD_MOD_PDROUT : value->rValue = model->B3SOIDDpdrout; return(OK); case B3SOIDD_MOD_PPVAG: value->rValue = model->B3SOIDDppvag; return(OK); case B3SOIDD_MOD_PDELTA: value->rValue = model->B3SOIDDpdelta; return(OK); case B3SOIDD_MOD_PAII: value->rValue = model->B3SOIDDpaii; return(OK); case B3SOIDD_MOD_PBII: value->rValue = model->B3SOIDDpbii; return(OK); case B3SOIDD_MOD_PCII: value->rValue = model->B3SOIDDpcii; return(OK); case B3SOIDD_MOD_PDII: value->rValue = model->B3SOIDDpdii; return(OK); case B3SOIDD_MOD_PALPHA0: value->rValue = model->B3SOIDDpalpha0; return(OK); case B3SOIDD_MOD_PALPHA1: value->rValue = model->B3SOIDDpalpha1; return(OK); case B3SOIDD_MOD_PBETA0: value->rValue = model->B3SOIDDpbeta0; return(OK); case B3SOIDD_MOD_PAGIDL: value->rValue = model->B3SOIDDpagidl; return(OK); case B3SOIDD_MOD_PBGIDL: value->rValue = model->B3SOIDDpbgidl; return(OK); case B3SOIDD_MOD_PNGIDL: value->rValue = model->B3SOIDDpngidl; return(OK); case B3SOIDD_MOD_PNTUN: value->rValue = model->B3SOIDDpntun; return(OK); case B3SOIDD_MOD_PNDIODE: value->rValue = model->B3SOIDDpndiode; return(OK); case B3SOIDD_MOD_PISBJT: value->rValue = model->B3SOIDDpisbjt; return(OK); case B3SOIDD_MOD_PISDIF: value->rValue = model->B3SOIDDpisdif; return(OK); case B3SOIDD_MOD_PISREC: value->rValue = model->B3SOIDDpisrec; return(OK); case B3SOIDD_MOD_PISTUN: value->rValue = model->B3SOIDDpistun; return(OK); case B3SOIDD_MOD_PEDL: value->rValue = model->B3SOIDDpedl; return(OK); case B3SOIDD_MOD_PKBJT1: value->rValue = model->B3SOIDDpkbjt1; return(OK); /* CV Model */ case B3SOIDD_MOD_PVSDFB: value->rValue = model->B3SOIDDpvsdfb; return(OK); case B3SOIDD_MOD_PVSDTH: value->rValue = model->B3SOIDDpvsdth; return(OK); /* Added for binning - END */ default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_dd/BsimTerms_use0000644000265600020320000000247312264261473023145 0ustar andreasadminThe terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddacld.c0000644000265600020320000004537012264261473022763 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddacld.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDacLoad(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; int selfheat; double xcggb, xcgdb, xcgsb, xcgeb, xcgT; double xcdgb, xcddb, xcdsb, xcdeb, xcdT; double xcsgb, xcsdb, xcssb, xcseb, xcsT; double xcbgb, xcbdb, xcbsb, xcbeb, xcbT; double xcegb, xcedb, xcesb, xceeb, xceT; double gdpr, gspr, gds; double cggb, cgdb, cgsb, cgeb, cgT; double cdgb, cddb, cdsb, cdeb, cdT; double cbgb, cbdb, cbsb, cbeb, cbT; double cegb, cedb, cesb, ceeb, ceT; double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs, Gme, GmT; double omega; double dxpart, sxpart; double gbbg, gbbdp, gbbb, gbbe, gbbp, gbbsp, gbbT; double gddpg, gddpdp, gddpsp, gddpb, gddpe, gddpT; double gsspg, gsspdp, gsspsp, gsspb, gsspe, gsspT; double gppg, gppdp, gppb, gppe, gppp, gppsp, gppT; double xcTt, cTt, gTtt, gTtg, gTtb, gTte, gTtdp, gTtsp; FILE *fpdebug = NULL; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here!= NULL; here = here->B3SOIDDnextInstance) { selfheat = (model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0 != 0.0); if (here->B3SOIDDdebugMod > 2) { fpdebug = fopen("b3soiddac.log", "a"); fprintf(fpdebug, ".......omega=%.5e\n", omega); } if (here->B3SOIDDmode >= 0) { Gm = here->B3SOIDDgm; Gmbs = here->B3SOIDDgmbs; Gme = here->B3SOIDDgme; GmT = model->B3SOIDDtype * here->B3SOIDDgmT; FwdSum = Gm + Gmbs + Gme; RevSum = 0.0; cbgb = here->B3SOIDDcbgb; cbsb = here->B3SOIDDcbsb; cbdb = here->B3SOIDDcbdb; cbeb = here->B3SOIDDcbeb; cbT = model->B3SOIDDtype * here->B3SOIDDcbT; cegb = here->B3SOIDDcegb; cesb = here->B3SOIDDcesb; cedb = here->B3SOIDDcedb; ceeb = here->B3SOIDDceeb; ceT = model->B3SOIDDtype * here->B3SOIDDceT; cggb = here->B3SOIDDcggb; cgsb = here->B3SOIDDcgsb; cgdb = here->B3SOIDDcgdb; cgeb = here->B3SOIDDcgeb; cgT = model->B3SOIDDtype * here->B3SOIDDcgT; cdgb = here->B3SOIDDcdgb; cdsb = here->B3SOIDDcdsb; cddb = here->B3SOIDDcddb; cdeb = here->B3SOIDDcdeb; cdT = model->B3SOIDDtype * here->B3SOIDDcdT; cTt = here->pParam->B3SOIDDcth; gbbg = -here->B3SOIDDgbgs; gbbdp = -here->B3SOIDDgbds; gbbb = -here->B3SOIDDgbbs; gbbe = -here->B3SOIDDgbes; gbbp = -here->B3SOIDDgbps; gbbT = -model->B3SOIDDtype * here->B3SOIDDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIDDgjdg; gddpdp = -here->B3SOIDDgjdd; gddpb = -here->B3SOIDDgjdb; gddpe = -here->B3SOIDDgjde; gddpT = -model->B3SOIDDtype * here->B3SOIDDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B3SOIDDgjsg; gsspdp = -here->B3SOIDDgjsd; gsspb = -here->B3SOIDDgjsb; gsspe = 0.0; gsspT = -model->B3SOIDDtype * here->B3SOIDDgjsT; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppg = -here->B3SOIDDgbpgs; gppdp = -here->B3SOIDDgbpds; gppb = -here->B3SOIDDgbpbs; gppe = -here->B3SOIDDgbpes; gppp = -here->B3SOIDDgbpps; gppT = -model->B3SOIDDtype * here->B3SOIDDgbpT; gppsp = - (gppg + gppdp + gppb + gppe + gppp); gTtg = here->B3SOIDDgtempg; gTtb = here->B3SOIDDgtempb; gTte = here->B3SOIDDgtempe; gTtdp = here->B3SOIDDgtempd; gTtt = here->B3SOIDDgtempT; gTtsp = - (gTtg + gTtb + gTte + gTtdp); sxpart = 0.6; dxpart = 0.4; } else { Gm = -here->B3SOIDDgm; Gmbs = -here->B3SOIDDgmbs; Gme = -here->B3SOIDDgme; GmT = -model->B3SOIDDtype * here->B3SOIDDgmT; FwdSum = 0.0; RevSum = -Gm - Gmbs - Gme; cdgb = - (here->B3SOIDDcdgb + here->B3SOIDDcggb + here->B3SOIDDcbgb + here->B3SOIDDcegb); cdsb = - (here->B3SOIDDcddb + here->B3SOIDDcgdb + here->B3SOIDDcbdb + here->B3SOIDDcedb); cddb = - (here->B3SOIDDcdsb + here->B3SOIDDcgsb + here->B3SOIDDcbsb + here->B3SOIDDcesb); cdeb = - (here->B3SOIDDcdeb + here->B3SOIDDcgeb + here->B3SOIDDcbeb + here->B3SOIDDceeb); cdT = - model->B3SOIDDtype * (here->B3SOIDDcgT + here->B3SOIDDcbT + here->B3SOIDDcdT + here->B3SOIDDceT); cegb = here->B3SOIDDcegb; cesb = here->B3SOIDDcedb; cedb = here->B3SOIDDcesb; ceeb = here->B3SOIDDceeb; ceT = model->B3SOIDDtype * here->B3SOIDDceT; cggb = here->B3SOIDDcggb; cgsb = here->B3SOIDDcgdb; cgdb = here->B3SOIDDcgsb; cgeb = here->B3SOIDDcgeb; cgT = model->B3SOIDDtype * here->B3SOIDDcgT; cbgb = here->B3SOIDDcbgb; cbsb = here->B3SOIDDcbdb; cbdb = here->B3SOIDDcbsb; cbeb = here->B3SOIDDcbeb; cbT = model->B3SOIDDtype * here->B3SOIDDcbT; cTt = here->pParam->B3SOIDDcth; gbbg = -here->B3SOIDDgbgs; gbbb = -here->B3SOIDDgbbs; gbbe = -here->B3SOIDDgbes; gbbp = -here->B3SOIDDgbps; gbbsp = -here->B3SOIDDgbds; gbbT = -model->B3SOIDDtype * here->B3SOIDDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIDDgjsg; gddpsp = -here->B3SOIDDgjsd; gddpb = -here->B3SOIDDgjsb; gddpe = 0.0; gddpT = -model->B3SOIDDtype * here->B3SOIDDgjsT; gddpdp = - (gddpg + gddpsp + gddpb + gddpe); gsspg = -here->B3SOIDDgjdg; gsspsp = -here->B3SOIDDgjdd; gsspb = -here->B3SOIDDgjdb; gsspe = -here->B3SOIDDgjde; gsspT = -model->B3SOIDDtype * here->B3SOIDDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe); gppg = -here->B3SOIDDgbpgs; gppsp = -here->B3SOIDDgbpds; gppb = -here->B3SOIDDgbpbs; gppe = -here->B3SOIDDgbpes; gppp = -here->B3SOIDDgbpps; gppT = -model->B3SOIDDtype * here->B3SOIDDgbpT; gppdp = - (gppg + gppsp + gppb + gppe + gppp); gTtt = here->B3SOIDDgtempT; gTtg = here->B3SOIDDgtempg; gTtb = here->B3SOIDDgtempb; gTte = here->B3SOIDDgtempe; gTtdp = here->B3SOIDDgtempd; gTtsp = - (gTtt + gTtg + gTtb + gTte + gTtdp); gTtg = here->B3SOIDDgtempg; gTtb = here->B3SOIDDgtempb; gTte = here->B3SOIDDgtempe; gTtsp = here->B3SOIDDgtempd; gTtt = here->B3SOIDDgtempT; gTtdp = - (gTtg + gTtb + gTte + gTtsp); sxpart = 0.6; sxpart = 0.4; dxpart = 0.6; } gdpr=here->B3SOIDDdrainConductance; gspr=here->B3SOIDDsourceConductance; gds= here->B3SOIDDgds; GSoverlapCap = here->B3SOIDDcgso; GDoverlapCap = here->B3SOIDDcgdo; GEoverlapCap = here->pParam->B3SOIDDcgeo; xcegb = (cegb - GEoverlapCap) * omega; xcedb = cedb * omega; xcesb = cesb * omega; xceeb = (ceeb + GEoverlapCap) * omega; xceT = ceT * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcgeb = (cgeb - GEoverlapCap) * omega; xcgT = cgT * omega; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcdeb = cdeb * omega; xcdT = cdT * omega; xcsgb = -(cggb + cbgb + cdgb + cegb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb + cedb) * omega; xcssb = (GSoverlapCap - (cgsb + cbsb + cdsb + cesb)) * omega; xcseb = -(cgeb + cbeb + cdeb + ceeb) * omega; xcsT = -(cgT + cbT + cdT + ceT) * omega; xcbgb = cbgb * omega; xcbdb = cbdb * omega; xcbsb = cbsb * omega; xcbeb = cbeb * omega; xcbT = cbT * omega; xcTt = cTt * omega; m = here->B3SOIDDm; *(here->B3SOIDDEgPtr +1) += m * xcegb; *(here->B3SOIDDEdpPtr +1) += m * xcedb; *(here->B3SOIDDEspPtr +1) += m * xcesb; *(here->B3SOIDDGePtr +1) += m * xcgeb; *(here->B3SOIDDDPePtr +1) += m * xcdeb; *(here->B3SOIDDSPePtr +1) += m * xcseb; *(here->B3SOIDDEePtr +1) += m * xceeb; *(here->B3SOIDDGgPtr +1) += m * xcggb; *(here->B3SOIDDGdpPtr +1) += m * xcgdb; *(here->B3SOIDDGspPtr +1) += m * xcgsb; *(here->B3SOIDDDPgPtr +1) += m * xcdgb; *(here->B3SOIDDDPdpPtr +1) += m * xcddb; *(here->B3SOIDDDPspPtr +1) += m * xcdsb; *(here->B3SOIDDSPgPtr +1) += m * xcsgb; *(here->B3SOIDDSPdpPtr +1) += m * xcsdb; *(here->B3SOIDDSPspPtr +1) += m * xcssb; *(here->B3SOIDDBePtr +1) += m * xcbeb; *(here->B3SOIDDBgPtr +1) += m * xcbgb; *(here->B3SOIDDBdpPtr +1) += m * xcbdb; *(here->B3SOIDDBspPtr +1) += m * xcbsb; *(here->B3SOIDDEbPtr +1) -= m * (xcegb + xcedb + xcesb + xceeb); *(here->B3SOIDDGbPtr +1) -= m * (xcggb + xcgdb + xcgsb + xcgeb); *(here->B3SOIDDDPbPtr +1) -= m * (xcdgb + xcddb + xcdsb + xcdeb); *(here->B3SOIDDSPbPtr +1) -= m * (xcsgb + xcsdb + xcssb + xcseb); *(here->B3SOIDDBbPtr +1) -= m * (xcbgb + xcbdb + xcbsb + xcbeb); if (selfheat) { *(here->B3SOIDDTemptempPtr + 1) += m * xcTt; *(here->B3SOIDDDPtempPtr + 1) += m * xcdT; *(here->B3SOIDDSPtempPtr + 1) += m * xcsT; *(here->B3SOIDDBtempPtr + 1) += m * xcbT; *(here->B3SOIDDEtempPtr + 1) += m * xceT; *(here->B3SOIDDGtempPtr + 1) += m * xcgT; } if (here->B3SOIDDdebugMod > 3) { fprintf(fpdebug, "Cbg+Cbs+Cbe = %.5e; Cbd = %.5e;\n", (xcbgb+xcbsb+xcbeb)/omega, xcbdb/omega); fprintf(fpdebug, "gbs = %.5e; gbd = %.5e\n", gbbsp, gbbdp); fprintf(fpdebug, "AC condunctance...\n"); fprintf(fpdebug, "Eg=%.5e; Edp=%.5e; Esp=%.5e;\nEb=%.5e; Ee=%.5e\n", xcegb, xcedb, xcesb, -(xcegb+xcedb+xcesb+xceeb), xceeb); fprintf(fpdebug, "Gg=%.5e; Gdp=%.5e; Gsp=%.5e;\nGb=%.5e; Ge=%.5e\n", xcggb, xcgdb, xcgsb, -(xcggb+xcgdb+xcgsb+xcgeb), xcgeb); fprintf(fpdebug, "Bg=%.5e; Bdp=%.5e; Bsp=%.5e;\nBb=%.5e; Be=%.5e\n", xcbgb, xcbdb, xcbsb, -(xcbgb+xcbdb+xcbsb+xcbeb), xcbeb); fprintf(fpdebug, "DPg=%.5e; DPdp=%.5e; DPsp=%.5e;\nDPb=%.5e; DPe=%.5e\n", xcdgb, xcddb, xcdsb, -(xcdgb+xcddb+xcdsb+xcdeb), xcdeb); fprintf(fpdebug, "SPg=%.5e; SPdp=%.5e; SPsp=%.5e;\nSPb=%.5e; SPe=%.5e\n", xcsgb, xcsdb, xcssb, -(xcsgb+xcsdb+xcssb+xcseb), xcseb); } *(here->B3SOIDDEgPtr) += 0.0; *(here->B3SOIDDEdpPtr) += 0.0; *(here->B3SOIDDEspPtr) += 0.0; *(here->B3SOIDDGePtr) -= 0.0; *(here->B3SOIDDDPePtr) += m * (Gme + gddpe); *(here->B3SOIDDSPePtr) += m * (gsspe - Gme); *(here->B3SOIDDEePtr) += 0.0; *(here->B3SOIDDDPgPtr) += m * (Gm + gddpg); *(here->B3SOIDDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum); *(here->B3SOIDDDPspPtr) -= m * (gds + FwdSum - gddpsp); *(here->B3SOIDDDPdPtr) -= m * gdpr; *(here->B3SOIDDSPgPtr) -= m * (Gm - gsspg); *(here->B3SOIDDSPdpPtr) -= m * (gds + RevSum - gsspdp); *(here->B3SOIDDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp); *(here->B3SOIDDSPsPtr) -= m * gspr; *(here->B3SOIDDBePtr) += m * gbbe; *(here->B3SOIDDBgPtr) += m * gbbg; *(here->B3SOIDDBdpPtr) += m * gbbdp; *(here->B3SOIDDBspPtr) += m * gbbsp; *(here->B3SOIDDBbPtr) += m * gbbb; *(here->B3SOIDDEbPtr) += 0.0; *(here->B3SOIDDSPbPtr) -= m * (Gmbs - gsspb); *(here->B3SOIDDDPbPtr) -= m * (-gddpb - Gmbs); if (selfheat) { *(here->B3SOIDDDPtempPtr) += m * (GmT + gddpT); *(here->B3SOIDDSPtempPtr) += m * (-GmT + gsspT); *(here->B3SOIDDBtempPtr) += m * gbbT; if (here->B3SOIDDbodyMod == 1) { (*(here->B3SOIDDPtempPtr) += m * gppT); } *(here->B3SOIDDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIDDrth); *(here->B3SOIDDTempgPtr) += m * gTtg; *(here->B3SOIDDTempbPtr) += m * gTtb; *(here->B3SOIDDTempePtr) += m * gTte; *(here->B3SOIDDTempdpPtr) += m * gTtdp; *(here->B3SOIDDTempspPtr) += m * gTtsp; } if (here->B3SOIDDdebugMod > 3) { fprintf(fpdebug, "Static condunctance...\n"); fprintf(fpdebug, "Gg=%.5e; Gdp=%.5e; Gsp=%.5e;\nGb=%.5e; Ge=%.5e\n", *(here->B3SOIDDGgPtr), *(here->B3SOIDDGdpPtr), *(here->B3SOIDDGspPtr), *(here->B3SOIDDGbPtr), *(here->B3SOIDDGePtr)); fprintf(fpdebug, "DPg=%.5e; DPdp=%.5e; DPsp=%.5e;\nDPb=%.5e; DPe=%.5e\n", *(here->B3SOIDDDPgPtr), *(here->B3SOIDDDPdpPtr), *(here->B3SOIDDDPspPtr), *(here->B3SOIDDDPbPtr), *(here->B3SOIDDDPePtr)); fprintf(fpdebug, "SPg=%.5e; SPdp=%.5e; SPsp=%.5e;\nSPb=%.5e; SPe=%.5e\n", *(here->B3SOIDDSPgPtr), *(here->B3SOIDDSPdpPtr), *(here->B3SOIDDSPspPtr), *(here->B3SOIDDSPbPtr), *(here->B3SOIDDSPePtr)); fprintf(fpdebug, "Bg=%.5e; Bdp=%.5e; Bsp=%.5e;\nBb=%.5e; Be=%.5e\n", gbbg, gbbdp, gbbsp, gbbb, gbbe); } *(here->B3SOIDDDdPtr) += m * gdpr; *(here->B3SOIDDDdpPtr) -= m * gdpr; *(here->B3SOIDDSsPtr) += m * gspr; *(here->B3SOIDDSspPtr) -= m * gspr; if (here->B3SOIDDbodyMod == 1) { (*(here->B3SOIDDBpPtr) -= m * gppp); (*(here->B3SOIDDPbPtr) += m * gppb); (*(here->B3SOIDDPpPtr) += m * gppp); (*(here->B3SOIDDPgPtr) += m * gppg); (*(here->B3SOIDDPdpPtr) += m * gppdp); (*(here->B3SOIDDPspPtr) += m * gppsp); (*(here->B3SOIDDPePtr) += m * gppe); } if (here->B3SOIDDdebugMod > 1) { *(here->B3SOIDDVbsPtr) += m * 1; *(here->B3SOIDDIdsPtr) += m * 1; *(here->B3SOIDDIcPtr) += m * 1; *(here->B3SOIDDIbsPtr) += m * 1; *(here->B3SOIDDIbdPtr) += m * 1; *(here->B3SOIDDIiiPtr) += m * 1; *(here->B3SOIDDIgidlPtr) += m * 1; *(here->B3SOIDDItunPtr) += m * 1; *(here->B3SOIDDIbpPtr) += m * 1; *(here->B3SOIDDAbeffPtr) += m * 1; *(here->B3SOIDDVbs0effPtr) += m * 1; *(here->B3SOIDDVbseffPtr) += 1; *(here->B3SOIDDXcPtr) += m * 1; *(here->B3SOIDDCbgPtr) += m * 1; *(here->B3SOIDDCbbPtr) += m * 1; *(here->B3SOIDDCbdPtr) += m * 1; *(here->B3SOIDDqbPtr) += m * 1; *(here->B3SOIDDQbfPtr) += m * 1; *(here->B3SOIDDQjsPtr) += m * 1; *(here->B3SOIDDQjdPtr) += m * 1; /* clean up last */ *(here->B3SOIDDGmPtr) += m * 1; *(here->B3SOIDDGmbsPtr) += m * 1; *(here->B3SOIDDGdsPtr) += m * 1; *(here->B3SOIDDGmePtr) += m * 1; *(here->B3SOIDDVbs0teffPtr) += m * 1; *(here->B3SOIDDVgsteffPtr) += m * 1; *(here->B3SOIDDCbePtr) += m * 1; *(here->B3SOIDDVthPtr) += m * 1; *(here->B3SOIDDXcsatPtr) += m * 1; *(here->B3SOIDDVdscvPtr) += m * 1; *(here->B3SOIDDVcscvPtr) += m * 1; *(here->B3SOIDDQaccPtr) += m * 1; *(here->B3SOIDDQsub0Ptr) += m * 1; *(here->B3SOIDDQsubs1Ptr) += m * 1; *(here->B3SOIDDQsubs2Ptr) += m * 1; *(here->B3SOIDDqgPtr) += m * 1; *(here->B3SOIDDqdPtr) += m * 1; *(here->B3SOIDDqePtr) += m * 1; *(here->B3SOIDDDum1Ptr) += m * 1; *(here->B3SOIDDDum2Ptr) += m * 1; *(here->B3SOIDDDum3Ptr) += m * 1; *(here->B3SOIDDDum4Ptr) += m * 1; *(here->B3SOIDDDum5Ptr) += m * 1; } if (here->B3SOIDDdebugMod > 2) fclose(fpdebug); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddpzld.c0000644000265600020320000001433012264261473023021 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddpzld.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "b3soidddef.h" #include "ngspice/suffix.h" int B3SOIDDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd = 0.0, capbs = 0.0; double xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap = 0.0; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here!= NULL; here = here->B3SOIDDnextInstance) { if (here->B3SOIDDmode >= 0) { Gm = here->B3SOIDDgm; Gmbs = here->B3SOIDDgmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->B3SOIDDcggb; cgsb = here->B3SOIDDcgsb; cgdb = here->B3SOIDDcgdb; cbgb = here->B3SOIDDcbgb; cbsb = here->B3SOIDDcbsb; cbdb = here->B3SOIDDcbdb; cdgb = here->B3SOIDDcdgb; cdsb = here->B3SOIDDcdsb; cddb = here->B3SOIDDcddb; } else { Gm = -here->B3SOIDDgm; Gmbs = -here->B3SOIDDgmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->B3SOIDDcggb; cgsb = here->B3SOIDDcgdb; cgdb = here->B3SOIDDcgsb; cbgb = here->B3SOIDDcbgb; cbsb = here->B3SOIDDcbdb; cbdb = here->B3SOIDDcbsb; cdgb = -(here->B3SOIDDcdgb + cggb + cbgb); cdsb = -(here->B3SOIDDcddb + cgsb + cbsb); cddb = -(here->B3SOIDDcdsb + cgdb + cbdb); } gdpr=here->B3SOIDDdrainConductance; gspr=here->B3SOIDDsourceConductance; gds= here->B3SOIDDgds; gbd= here->B3SOIDDgjdb; gbs= here->B3SOIDDgjsb; #ifdef BULKCODE capbd= here->B3SOIDDcapbd; capbs= here->B3SOIDDcapbs; #endif GSoverlapCap = here->B3SOIDDcgso; GDoverlapCap = here->B3SOIDDcgdo; #ifdef BULKCODE GBoverlapCap = here->pParam->B3SOIDDcgbo; #endif xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->B3SOIDDm; *(here->B3SOIDDGgPtr ) += m * (xcggb * s->real); *(here->B3SOIDDGgPtr +1) += m * (xcggb * s->imag); *(here->B3SOIDDBbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->B3SOIDDBbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->B3SOIDDDPdpPtr ) += m * (xcddb * s->real); *(here->B3SOIDDDPdpPtr +1) += m * (xcddb * s->imag); *(here->B3SOIDDSPspPtr ) += m * (xcssb * s->real); *(here->B3SOIDDSPspPtr +1) += m * (xcssb * s->imag); *(here->B3SOIDDGbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->B3SOIDDGbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->B3SOIDDGdpPtr ) += m * (xcgdb * s->real); *(here->B3SOIDDGdpPtr +1) += m * (xcgdb * s->imag); *(here->B3SOIDDGspPtr ) += m * (xcgsb * s->real); *(here->B3SOIDDGspPtr +1) += m * (xcgsb * s->imag); *(here->B3SOIDDBgPtr ) += m * (xcbgb * s->real); *(here->B3SOIDDBgPtr +1) += m * (xcbgb * s->imag); *(here->B3SOIDDBdpPtr ) += m * (xcbdb * s->real); *(here->B3SOIDDBdpPtr +1) += m * (xcbdb * s->imag); *(here->B3SOIDDBspPtr ) += m * (xcbsb * s->real); *(here->B3SOIDDBspPtr +1) += (xcbsb * s->imag); *(here->B3SOIDDDPgPtr ) += m * (xcdgb * s->real); *(here->B3SOIDDDPgPtr +1) += m * (xcdgb * s->imag); *(here->B3SOIDDDPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->B3SOIDDDPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->B3SOIDDDPspPtr ) += m * (xcdsb * s->real); *(here->B3SOIDDDPspPtr +1) += m * (xcdsb * s->imag); *(here->B3SOIDDSPgPtr ) += m * (xcsgb * s->real); *(here->B3SOIDDSPgPtr +1) += m * (xcsgb * s->imag); *(here->B3SOIDDSPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->B3SOIDDSPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->B3SOIDDSPdpPtr ) += m * (xcsdb * s->real); *(here->B3SOIDDSPdpPtr +1) += m * (xcsdb * s->imag); *(here->B3SOIDDDdPtr) += m * gdpr; *(here->B3SOIDDSsPtr) += m * gspr; *(here->B3SOIDDBbPtr) += m * (gbd + gbs); *(here->B3SOIDDDPdpPtr) += m * (gdpr + gds + gbd + RevSum); *(here->B3SOIDDSPspPtr) += m * (gspr + gds + gbs + FwdSum); *(here->B3SOIDDDdpPtr) -= m * gdpr; *(here->B3SOIDDSspPtr) -= m * gspr; *(here->B3SOIDDBdpPtr) -= m * gbd; *(here->B3SOIDDBspPtr) -= m * gbs; *(here->B3SOIDDDPdPtr) -= m * gdpr; *(here->B3SOIDDDPgPtr) += m * Gm; *(here->B3SOIDDDPbPtr) -= m * (gbd - Gmbs); *(here->B3SOIDDDPspPtr) -= m * (gds + FwdSum); *(here->B3SOIDDSPgPtr) -= m * Gm; *(here->B3SOIDDSPsPtr) -= m * gspr; *(here->B3SOIDDSPbPtr) -= m * (gbs + Gmbs); *(here->B3SOIDDSPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soidddest.c0000644000265600020320000000166512264261473023016 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soidddest.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "b3soidddef.h" #include "ngspice/suffix.h" void B3SOIDDdestroy(GENmodel **inModel) { B3SOIDDmodel **model = (B3SOIDDmodel**)inModel; B3SOIDDinstance *here; B3SOIDDinstance *prev = NULL; B3SOIDDmodel *mod = *model; B3SOIDDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIDDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3soi_dd/Makefile.am0000644000265600020320000000121412264261473022465 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3soidd.la libbsim3soidd_la_SOURCES = \ b3soidd.c \ b3soiddacld.c \ b3soiddask.c \ b3soiddcheck.c \ b3soiddcvtest.c \ b3soidddel.c \ b3soidddest.c \ b3soiddgetic.c \ b3soiddld.c \ b3soiddmask.c \ b3soiddmdel.c \ b3soiddmpar.c \ b3soiddnoi.c \ b3soiddpar.c \ b3soiddpzld.c \ b3soiddset.c \ b3soiddtemp.c \ b3soiddtrunc.c \ b3soidddef.h \ b3soiddext.h \ b3soiddinit.c \ b3soiddinit.h \ b3soidditf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddinit.h0000644000265600020320000000042312264261473023016 0ustar andreasadmin#ifndef _B3SOIDDINIT_H #define _B3SOIDDINIT_H extern IFparm B3SOIDDpTable[]; extern IFparm B3SOIDDmPTable[]; extern char *B3SOIDDnames[]; extern int B3SOIDDpTSize; extern int B3SOIDDmPTSize; extern int B3SOIDDnSize; extern int B3SOIDDiSize; extern int B3SOIDDmSize; #endif ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soidd.c0000644000265600020320000007667612264261473022154 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soidd.c 98/5/01 Modified by Wei Jin 99/9/27 Modified by Paolo Nenzi 2001 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "b3soidddef.h" #include "ngspice/suffix.h" IFparm B3SOIDDpTable[] = { /* parameters */ IOP( "l", B3SOIDD_L, IF_REAL , "Length"), IOP( "w", B3SOIDD_W, IF_REAL , "Width"), IOP( "m", B3SOIDD_M, IF_REAL , "Parallel Multiplier"), IOP( "ad", B3SOIDD_AD, IF_REAL , "Drain area"), IOP( "as", B3SOIDD_AS, IF_REAL , "Source area"), IOP( "pd", B3SOIDD_PD, IF_REAL , "Drain perimeter"), IOP( "ps", B3SOIDD_PS, IF_REAL , "Source perimeter"), IOP( "nrd", B3SOIDD_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", B3SOIDD_NRS, IF_REAL , "Number of squares in source"), IOP( "off", B3SOIDD_OFF, IF_FLAG , "Device is initially off"), IP( "ic", B3SOIDD_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", B3SOIDD_GMBS, IF_REAL, "Gmb"), OP( "gm", B3SOIDD_GM, IF_REAL, "Gm"), OP( "gm/ids", B3SOIDD_GMID, IF_REAL, "Gm/Ids"), OP( "gds", B3SOIDD_GDS, IF_REAL, "Gds"), OP( "vdsat", B3SOIDD_VDSAT, IF_REAL, "Vdsat"), OP( "vth", B3SOIDD_VON, IF_REAL, "Vth"), OP( "ids", B3SOIDD_CD, IF_REAL, "Ids"), OP( "vbs", B3SOIDD_VBS, IF_REAL, "Vbs"), OP( "vgs", B3SOIDD_VGS, IF_REAL, "Vgs"), OP( "vds", B3SOIDD_VDS, IF_REAL, "Vds"), OP( "ves", B3SOIDD_VES, IF_REAL, "Ves"), IOP( "bjtoff", B3SOIDD_BJTOFF, IF_INTEGER, "BJT on/off flag"), IOP( "debug", B3SOIDD_DEBUG, IF_INTEGER, "BJT on/off flag"), IOP( "rth0", B3SOIDD_RTH0, IF_REAL, "Instance Thermal Resistance"), IOP( "cth0", B3SOIDD_CTH0, IF_REAL, "Instance Thermal Capacitance"), IOP( "nrb", B3SOIDD_NRB, IF_REAL, "Number of squares in body"), }; IFparm B3SOIDDmPTable[] = { /* model parameters */ IOP( "capmod", B3SOIDD_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", B3SOIDD_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", B3SOIDD_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "paramchk", B3SOIDD_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", B3SOIDD_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", B3SOIDD_MOD_VERSION, IF_REAL, " parameter for model version"), IOP( "tox", B3SOIDD_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "cdsc", B3SOIDD_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", B3SOIDD_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", B3SOIDD_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", B3SOIDD_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", B3SOIDD_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "vsat", B3SOIDD_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", B3SOIDD_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", B3SOIDD_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", B3SOIDD_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", B3SOIDD_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", B3SOIDD_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", B3SOIDD_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", B3SOIDD_MOD_NSUB, IF_REAL, "Substrate doping concentration with polarity"), IOP( "nch", B3SOIDD_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", B3SOIDD_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", B3SOIDD_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", B3SOIDD_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", B3SOIDD_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", B3SOIDD_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", B3SOIDD_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", B3SOIDD_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", B3SOIDD_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", B3SOIDD_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", B3SOIDD_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", B3SOIDD_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", B3SOIDD_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", B3SOIDD_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", B3SOIDD_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", B3SOIDD_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", B3SOIDD_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", B3SOIDD_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", B3SOIDD_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", B3SOIDD_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", B3SOIDD_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", B3SOIDD_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", B3SOIDD_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", B3SOIDD_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", B3SOIDD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", B3SOIDD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", B3SOIDD_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", B3SOIDD_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", B3SOIDD_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", B3SOIDD_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", B3SOIDD_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", B3SOIDD_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", B3SOIDD_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", B3SOIDD_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", B3SOIDD_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", B3SOIDD_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", B3SOIDD_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", B3SOIDD_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgeo", B3SOIDD_MOD_CGEO, IF_REAL, "Gate-substrate overlap capacitance"), IOP( "xpart", B3SOIDD_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", B3SOIDD_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", B3SOIDD_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", B3SOIDD_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", B3SOIDD_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", B3SOIDD_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", B3SOIDD_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", B3SOIDD_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", B3SOIDD_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", B3SOIDD_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", B3SOIDD_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", B3SOIDD_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", B3SOIDD_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pvag", B3SOIDD_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "shmod", B3SOIDD_MOD_SHMOD, IF_INTEGER, "Self heating mode selector"), IOP( "tbox", B3SOIDD_MOD_TBOX, IF_REAL, "Back gate oxide thickness in meters"), IOP( "tsi", B3SOIDD_MOD_TSI, IF_REAL, "Silicon-on-insulator thickness in meters"), IOP( "xj", B3SOIDD_MOD_XJ, IF_REAL, "Junction Depth"), IOP( "kb1", B3SOIDD_MOD_KB1, IF_REAL, "Backgate coupling coefficient at strong inversion"), IOP( "kb3", B3SOIDD_MOD_KB3, IF_REAL, "Backgate coupling coefficient at subthreshold"), IOP( "dvbd0", B3SOIDD_MOD_DVBD0, IF_REAL, "First coefficient of short-channel effect on Vbs0t"), IOP( "dvbd1", B3SOIDD_MOD_DVBD1, IF_REAL, "Second coefficient of short-channel effect on Vbs0t"), IOP( "vbsa", B3SOIDD_MOD_VBSA, IF_REAL, "Vbs0t offset voltage"), IOP( "delp", B3SOIDD_MOD_DELP, IF_REAL, "Offset constant for limiting Vbseff to Phis"), IOP( "rbody", B3SOIDD_MOD_RBODY, IF_REAL, "Intrinsic body contact sheet resistance"), IOP( "rbsh", B3SOIDD_MOD_RBSH, IF_REAL, "Extrinsic body contact sheet resistance"), IOP( "adice0", B3SOIDD_MOD_ADICE0, IF_REAL, "DICE constant for bulk charge effect"), IOP( "abp", B3SOIDD_MOD_ABP, IF_REAL, "Gate bias coefficient for Xcsat calculation"), IOP( "mxc", B3SOIDD_MOD_MXC, IF_REAL, "A smoothing parameter for Xcsat calculation"), IOP( "rth0", B3SOIDD_MOD_RTH0, IF_REAL, "Self-heating thermal resistance"), IOP( "cth0", B3SOIDD_MOD_CTH0, IF_REAL, "Self-heating thermal capacitance"), IOP( "aii", B3SOIDD_MOD_AII, IF_REAL, "1st Vdsatii parameter"), IOP( "bii", B3SOIDD_MOD_BII, IF_REAL, "2nd Vdsatii parameter"), IOP( "cii", B3SOIDD_MOD_CII, IF_REAL, "3rd Vdsatii parameter"), IOP( "dii", B3SOIDD_MOD_DII, IF_REAL, "4th Vdsatii parameter"), IOP( "ngidl", B3SOIDD_MOD_NGIDL, IF_REAL, "GIDL first parameter"), IOP( "agidl", B3SOIDD_MOD_AGIDL, IF_REAL, "GIDL second parameter"), IOP( "bgidl", B3SOIDD_MOD_BGIDL, IF_REAL, "GIDL third parameter"), IOP( "ndiode", B3SOIDD_MOD_NDIODE, IF_REAL, "Diode non-ideality factor"), IOP( "ntun", B3SOIDD_MOD_NTUN, IF_REAL, "Reverse tunneling non-ideality factor"), IOP( "isbjt", B3SOIDD_MOD_ISBJT, IF_REAL, "BJT emitter injection constant"), IOP( "isdif", B3SOIDD_MOD_ISDIF, IF_REAL, "Body to S/D injection constant"), IOP( "isrec", B3SOIDD_MOD_ISREC, IF_REAL, "Recombination in depletion constant"), IOP( "istun", B3SOIDD_MOD_ISTUN, IF_REAL, "Tunneling diode constant"), IOP( "xbjt", B3SOIDD_MOD_XBJT, IF_REAL, "Temperature coefficient for Isbjt"), IOP( "xdif", B3SOIDD_MOD_XBJT, IF_REAL, "Temperature coefficient for Isdif"), IOP( "xrec", B3SOIDD_MOD_XREC, IF_REAL, "Temperature coefficient for Isrec"), IOP( "xtun", B3SOIDD_MOD_XTUN, IF_REAL, "Temperature coefficient for Istun"), IOP( "edl", B3SOIDD_MOD_EDL, IF_REAL, "Electron diffusion length"), IOP( "kbjt1", B3SOIDD_MOD_KBJT1, IF_REAL, "Vds dependency on BJT base width"), IOP( "tt", B3SOIDD_MOD_TT, IF_REAL, "Diffusion capacitance transit time coefficient"), IOP( "vsdth", B3SOIDD_MOD_VSDTH, IF_REAL, "Source/Drain diffusion threshold voltage"), IOP( "vsdfb", B3SOIDD_MOD_VSDFB, IF_REAL, "Source/Drain diffusion flatband voltage"), IOP( "csdmin", B3SOIDD_MOD_CSDMIN, IF_REAL, "Source/Drain diffusion bottom minimum capacitance"), IOP( "asd", B3SOIDD_MOD_ASD, IF_REAL, "Source/Drain diffusion smoothing parameter"), IOP( "pbswg", B3SOIDD_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", B3SOIDD_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjswg", B3SOIDD_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "csdesw", B3SOIDD_MOD_CSDESW, IF_REAL, "Source/drain sidewall fringing constant"), IOP( "lint", B3SOIDD_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", B3SOIDD_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "lln", B3SOIDD_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", B3SOIDD_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwn", B3SOIDD_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", B3SOIDD_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "wr", B3SOIDD_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", B3SOIDD_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", B3SOIDD_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", B3SOIDD_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", B3SOIDD_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wln", B3SOIDD_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", B3SOIDD_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwn", B3SOIDD_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", B3SOIDD_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "b0", B3SOIDD_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", B3SOIDD_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", B3SOIDD_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", B3SOIDD_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", B3SOIDD_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", B3SOIDD_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", B3SOIDD_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", B3SOIDD_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", B3SOIDD_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", B3SOIDD_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", B3SOIDD_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", B3SOIDD_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", B3SOIDD_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "noia", B3SOIDD_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", B3SOIDD_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", B3SOIDD_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", B3SOIDD_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", B3SOIDD_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", B3SOIDD_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", B3SOIDD_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP( "noif", B3SOIDD_MOD_NOIF, IF_REAL, "Floating body excess noise ideality factor"), /* Added for binning - START */ /* Length Dependence */ IOP( "lnch", B3SOIDD_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lnsub", B3SOIDD_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lngate", B3SOIDD_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lvth0", B3SOIDD_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lk1", B3SOIDD_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lk2", B3SOIDD_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", B3SOIDD_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", B3SOIDD_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lvbsa", B3SOIDD_MOD_LVBSA, IF_REAL, "Length dependence of vbsa"), IOP( "ldelp", B3SOIDD_MOD_LDELP, IF_REAL, "Length dependence of delp"), IOP( "lkb1", B3SOIDD_MOD_LKB1, IF_REAL, "Length dependence of kb1"), IOP( "lkb3", B3SOIDD_MOD_LKB3, IF_REAL, "Length dependence of kb3"), IOP( "ldvbd0", B3SOIDD_MOD_LDVBD0, IF_REAL, "Length dependence of dvbd0"), IOP( "ldvbd1", B3SOIDD_MOD_LDVBD1, IF_REAL, "Length dependence of dvbd1"), IOP( "lw0", B3SOIDD_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", B3SOIDD_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", B3SOIDD_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", B3SOIDD_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", B3SOIDD_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", B3SOIDD_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", B3SOIDD_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", B3SOIDD_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "lu0", B3SOIDD_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lua", B3SOIDD_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lub", B3SOIDD_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "luc", B3SOIDD_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "lvsat", B3SOIDD_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "la0", B3SOIDD_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", B3SOIDD_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "lb0", B3SOIDD_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", B3SOIDD_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lketa", B3SOIDD_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "labp", B3SOIDD_MOD_LABP, IF_REAL, "Length dependence of abp"), IOP( "lmxc", B3SOIDD_MOD_LMXC, IF_REAL, "Length dependence of mxc"), IOP( "ladice0", B3SOIDD_MOD_LADICE0, IF_REAL, "Length dependence of adice0"), IOP( "la1", B3SOIDD_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", B3SOIDD_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lrdsw", B3SOIDD_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwb", B3SOIDD_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprwg", B3SOIDD_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lwr", B3SOIDD_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "lnfactor", B3SOIDD_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "ldwg", B3SOIDD_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", B3SOIDD_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lvoff", B3SOIDD_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "leta0", B3SOIDD_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", B3SOIDD_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "ldsub", B3SOIDD_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lcit", B3SOIDD_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lcdsc", B3SOIDD_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", B3SOIDD_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", B3SOIDD_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lpclm", B3SOIDD_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", B3SOIDD_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", B3SOIDD_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", B3SOIDD_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "ldrout", B3SOIDD_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "lpvag", B3SOIDD_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "ldelta", B3SOIDD_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "laii", B3SOIDD_MOD_LAII, IF_REAL, "Length dependence of aii"), IOP( "lbii", B3SOIDD_MOD_LBII, IF_REAL, "Length dependence of bii"), IOP( "lcii", B3SOIDD_MOD_LCII, IF_REAL, "Length dependence of cii"), IOP( "ldii", B3SOIDD_MOD_LDII, IF_REAL, "Length dependence of dii"), IOP( "lalpha0", B3SOIDD_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", B3SOIDD_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", B3SOIDD_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", B3SOIDD_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", B3SOIDD_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lngidl", B3SOIDD_MOD_LNGIDL, IF_REAL, "Length dependence of ngidl"), IOP( "lntun", B3SOIDD_MOD_LNTUN, IF_REAL, "Length dependence of ntun"), IOP( "lndiode", B3SOIDD_MOD_LNDIODE, IF_REAL, "Length dependence of ndiode"), IOP( "lisbjt", B3SOIDD_MOD_LISBJT, IF_REAL, "Length dependence of isbjt"), IOP( "lisdif", B3SOIDD_MOD_LISDIF, IF_REAL, "Length dependence of isdif"), IOP( "lisrec", B3SOIDD_MOD_LISREC, IF_REAL, "Length dependence of isrec"), IOP( "listun", B3SOIDD_MOD_LISTUN, IF_REAL, "Length dependence of istun"), IOP( "ledl", B3SOIDD_MOD_LEDL, IF_REAL, "Length dependence of edl"), IOP( "lkbjt1", B3SOIDD_MOD_LKBJT1, IF_REAL, "Length dependence of kbjt1"), IOP( "lvsdfb", B3SOIDD_MOD_LVSDFB, IF_REAL, "Length dependence of vsdfb"), IOP( "lvsdth", B3SOIDD_MOD_LVSDTH, IF_REAL, "Length dependence of vsdth"), /* Width Dependence */ IOP( "wnch", B3SOIDD_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wnsub", B3SOIDD_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wngate", B3SOIDD_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wvth0", B3SOIDD_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wk1", B3SOIDD_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wk2", B3SOIDD_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", B3SOIDD_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", B3SOIDD_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "wvbsa", B3SOIDD_MOD_WVBSA, IF_REAL, "Width dependence of vbsa"), IOP( "wdelp", B3SOIDD_MOD_WDELP, IF_REAL, "Width dependence of delp"), IOP( "wkb1", B3SOIDD_MOD_WKB1, IF_REAL, "Width dependence of kb1"), IOP( "wkb3", B3SOIDD_MOD_WKB3, IF_REAL, "Width dependence of kb3"), IOP( "wdvbd0", B3SOIDD_MOD_WDVBD0, IF_REAL, "Width dependence of dvbd0"), IOP( "wdvbd1", B3SOIDD_MOD_WDVBD1, IF_REAL, "Width dependence of dvbd1"), IOP( "ww0", B3SOIDD_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", B3SOIDD_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", B3SOIDD_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", B3SOIDD_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", B3SOIDD_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", B3SOIDD_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", B3SOIDD_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", B3SOIDD_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wu0", B3SOIDD_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wua", B3SOIDD_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wub", B3SOIDD_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wuc", B3SOIDD_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wvsat", B3SOIDD_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wa0", B3SOIDD_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", B3SOIDD_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wb0", B3SOIDD_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", B3SOIDD_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wketa", B3SOIDD_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wabp", B3SOIDD_MOD_WABP, IF_REAL, "Width dependence of abp"), IOP( "wmxc", B3SOIDD_MOD_WMXC, IF_REAL, "Width dependence of mxc"), IOP( "wadice0", B3SOIDD_MOD_WADICE0, IF_REAL, "Width dependence of adice0"), IOP( "wa1", B3SOIDD_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", B3SOIDD_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wrdsw", B3SOIDD_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwb", B3SOIDD_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprwg", B3SOIDD_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wwr", B3SOIDD_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wnfactor", B3SOIDD_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wdwg", B3SOIDD_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", B3SOIDD_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wvoff", B3SOIDD_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "weta0", B3SOIDD_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", B3SOIDD_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wdsub", B3SOIDD_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wcit", B3SOIDD_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wcdsc", B3SOIDD_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", B3SOIDD_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", B3SOIDD_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wpclm", B3SOIDD_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", B3SOIDD_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", B3SOIDD_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", B3SOIDD_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wdrout", B3SOIDD_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wpvag", B3SOIDD_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wdelta", B3SOIDD_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "waii", B3SOIDD_MOD_WAII, IF_REAL, "Width dependence of aii"), IOP( "wbii", B3SOIDD_MOD_WBII, IF_REAL, "Width dependence of bii"), IOP( "wcii", B3SOIDD_MOD_WCII, IF_REAL, "Width dependence of cii"), IOP( "wdii", B3SOIDD_MOD_WDII, IF_REAL, "Width dependence of dii"), IOP( "walpha0", B3SOIDD_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", B3SOIDD_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", B3SOIDD_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", B3SOIDD_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", B3SOIDD_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wngidl", B3SOIDD_MOD_WNGIDL, IF_REAL, "Width dependence of ngidl"), IOP( "wntun", B3SOIDD_MOD_WNTUN, IF_REAL, "Width dependence of ntun"), IOP( "wndiode", B3SOIDD_MOD_WNDIODE, IF_REAL, "Width dependence of ndiode"), IOP( "wisbjt", B3SOIDD_MOD_WISBJT, IF_REAL, "Width dependence of isbjt"), IOP( "wisdif", B3SOIDD_MOD_WISDIF, IF_REAL, "Width dependence of isdif"), IOP( "wisrec", B3SOIDD_MOD_WISREC, IF_REAL, "Width dependence of isrec"), IOP( "wistun", B3SOIDD_MOD_WISTUN, IF_REAL, "Width dependence of istun"), IOP( "wedl", B3SOIDD_MOD_WEDL, IF_REAL, "Width dependence of edl"), IOP( "wkbjt1", B3SOIDD_MOD_WKBJT1, IF_REAL, "Width dependence of kbjt1"), IOP( "wvsdfb", B3SOIDD_MOD_WVSDFB, IF_REAL, "Width dependence of vsdfb"), IOP( "wvsdth", B3SOIDD_MOD_WVSDTH, IF_REAL, "Width dependence of vsdth"), /* Cross-term Dependence */ IOP( "pnch", B3SOIDD_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pnsub", B3SOIDD_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pngate", B3SOIDD_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pvth0", B3SOIDD_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pk1", B3SOIDD_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pk2", B3SOIDD_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", B3SOIDD_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", B3SOIDD_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pvbsa", B3SOIDD_MOD_PVBSA, IF_REAL, "Cross-term dependence of vbsa"), IOP( "pdelp", B3SOIDD_MOD_PDELP, IF_REAL, "Cross-term dependence of delp"), IOP( "pkb1", B3SOIDD_MOD_PKB1, IF_REAL, "Cross-term dependence of kb1"), IOP( "pkb3", B3SOIDD_MOD_PKB3, IF_REAL, "Cross-term dependence of kb3"), IOP( "pdvbd0", B3SOIDD_MOD_PDVBD0, IF_REAL, "Cross-term dependence of dvbd0"), IOP( "pdvbd1", B3SOIDD_MOD_PDVBD1, IF_REAL, "Cross-term dependence of dvbd1"), IOP( "pw0", B3SOIDD_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", B3SOIDD_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", B3SOIDD_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", B3SOIDD_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", B3SOIDD_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", B3SOIDD_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", B3SOIDD_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", B3SOIDD_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pu0", B3SOIDD_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pua", B3SOIDD_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pub", B3SOIDD_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "puc", B3SOIDD_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "pvsat", B3SOIDD_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pa0", B3SOIDD_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", B3SOIDD_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pb0", B3SOIDD_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", B3SOIDD_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pketa", B3SOIDD_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pabp", B3SOIDD_MOD_PABP, IF_REAL, "Cross-term dependence of abp"), IOP( "pmxc", B3SOIDD_MOD_PMXC, IF_REAL, "Cross-term dependence of mxc"), IOP( "padice0", B3SOIDD_MOD_PADICE0, IF_REAL, "Cross-term dependence of adice0"), IOP( "pa1", B3SOIDD_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", B3SOIDD_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "prdsw", B3SOIDD_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwb", B3SOIDD_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprwg", B3SOIDD_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pwr", B3SOIDD_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pnfactor", B3SOIDD_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pdwg", B3SOIDD_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", B3SOIDD_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pvoff", B3SOIDD_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "peta0", B3SOIDD_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", B3SOIDD_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "pdsub", B3SOIDD_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pcit", B3SOIDD_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pcdsc", B3SOIDD_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", B3SOIDD_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", B3SOIDD_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "ppclm", B3SOIDD_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", B3SOIDD_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", B3SOIDD_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", B3SOIDD_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pdrout", B3SOIDD_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "ppvag", B3SOIDD_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pdelta", B3SOIDD_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "paii", B3SOIDD_MOD_PAII, IF_REAL, "Cross-term dependence of aii"), IOP( "pbii", B3SOIDD_MOD_PBII, IF_REAL, "Cross-term dependence of bii"), IOP( "pcii", B3SOIDD_MOD_PCII, IF_REAL, "Cross-term dependence of cii"), IOP( "pdii", B3SOIDD_MOD_PDII, IF_REAL, "Cross-term dependence of dii"), IOP( "palpha0", B3SOIDD_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", B3SOIDD_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", B3SOIDD_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", B3SOIDD_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", B3SOIDD_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pngidl", B3SOIDD_MOD_PNGIDL, IF_REAL, "Cross-term dependence of ngidl"), IOP( "pntun", B3SOIDD_MOD_PNTUN, IF_REAL, "Cross-term dependence of ntun"), IOP( "pndiode", B3SOIDD_MOD_PNDIODE, IF_REAL, "Cross-term dependence of ndiode"), IOP( "pisbjt", B3SOIDD_MOD_PISBJT, IF_REAL, "Cross-term dependence of isbjt"), IOP( "pisdif", B3SOIDD_MOD_PISDIF, IF_REAL, "Cross-term dependence of isdif"), IOP( "pisrec", B3SOIDD_MOD_PISREC, IF_REAL, "Cross-term dependence of isrec"), IOP( "pistun", B3SOIDD_MOD_PISTUN, IF_REAL, "Cross-term dependence of istun"), IOP( "pedl", B3SOIDD_MOD_PEDL, IF_REAL, "Cross-term dependence of edl"), IOP( "pkbjt1", B3SOIDD_MOD_PKBJT1, IF_REAL, "Cross-term dependence of kbjt1"), IOP( "pvsdfb", B3SOIDD_MOD_PVSDFB, IF_REAL, "Cross-term dependence of vsdfb"), IOP( "pvsdth", B3SOIDD_MOD_PVSDTH, IF_REAL, "Cross-term dependence of vsdth"), /* Added for binning - END */ IP( "nmos", B3SOIDD_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", B3SOIDD_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B3SOIDDnames[] = { "Drain", "Gate", "Source", "Backgate", "", "Body", "Temp", "Charge", }; int B3SOIDDnSize = NUMELEMS(B3SOIDDnames); int B3SOIDDpTSize = NUMELEMS(B3SOIDDpTable); int B3SOIDDmPTSize = NUMELEMS(B3SOIDDmPTable); int B3SOIDDiSize = sizeof(B3SOIDDinstance); int B3SOIDDmSize = sizeof(B3SOIDDmodel); ngspice-26/src/spicelib/devices/bsim3soi_dd/Makefile.in0000644000265600020320000004373312264261535022511 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3soi_dd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3soidd_la_LIBADD = am_libbsim3soidd_la_OBJECTS = b3soidd.lo b3soiddacld.lo b3soiddask.lo \ b3soiddcheck.lo b3soiddcvtest.lo b3soidddel.lo b3soidddest.lo \ b3soiddgetic.lo b3soiddld.lo b3soiddmask.lo b3soiddmdel.lo \ b3soiddmpar.lo b3soiddnoi.lo b3soiddpar.lo b3soiddpzld.lo \ b3soiddset.lo b3soiddtemp.lo b3soiddtrunc.lo b3soiddinit.lo libbsim3soidd_la_OBJECTS = $(am_libbsim3soidd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3soidd_la_SOURCES) DIST_SOURCES = $(libbsim3soidd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3soidd.la libbsim3soidd_la_SOURCES = \ b3soidd.c \ b3soiddacld.c \ b3soiddask.c \ b3soiddcheck.c \ b3soiddcvtest.c \ b3soidddel.c \ b3soidddest.c \ b3soiddgetic.c \ b3soiddld.c \ b3soiddmask.c \ b3soiddmdel.c \ b3soiddmpar.c \ b3soiddnoi.c \ b3soiddpar.c \ b3soiddpzld.c \ b3soiddset.c \ b3soiddtemp.c \ b3soiddtrunc.c \ b3soidddef.h \ b3soiddext.h \ b3soiddinit.c \ b3soiddinit.h \ b3soidditf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_dd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_dd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3soidd.la: $(libbsim3soidd_la_OBJECTS) $(libbsim3soidd_la_DEPENDENCIES) $(EXTRA_libbsim3soidd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3soidd_la_OBJECTS) $(libbsim3soidd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soidd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddcvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soidddel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soidddest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddnoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soiddtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddgetic.c0000644000265600020320000000311012264261473023135 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddgetic.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDgetic(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; for (; model ; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here; here = here->B3SOIDDnextInstance) { if(!here->B3SOIDDicVBSGiven) { here->B3SOIDDicVBS = *(ckt->CKTrhs + here->B3SOIDDbNode) - *(ckt->CKTrhs + here->B3SOIDDsNode); } if (!here->B3SOIDDicVDSGiven) { here->B3SOIDDicVDS = *(ckt->CKTrhs + here->B3SOIDDdNode) - *(ckt->CKTrhs + here->B3SOIDDsNode); } if (!here->B3SOIDDicVGSGiven) { here->B3SOIDDicVGS = *(ckt->CKTrhs + here->B3SOIDDgNode) - *(ckt->CKTrhs + here->B3SOIDDsNode); } if (!here->B3SOIDDicVESGiven) { here->B3SOIDDicVES = *(ckt->CKTrhs + here->B3SOIDDeNode) - *(ckt->CKTrhs + here->B3SOIDDsNode); } if (!here->B3SOIDDicVPSGiven) { here->B3SOIDDicVPS = *(ckt->CKTrhs + here->B3SOIDDpNode) - *(ckt->CKTrhs + here->B3SOIDDsNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddset.c0000644000265600020320000015451612264261473022656 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Pin Su, Wei Jin 99/9/27 File: b3soiddset.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soidddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int B3SOIDDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance *here; int error; CKTnode *tmp; double tmp1, tmp2; double nfb0, Cboxt; CKTnode *tmpNode; IFuid tmpName; /* loop through all the B3SOIDD device models */ for( ; model != NULL; model = model->B3SOIDDnextModel ) { /* Default value Processing for B3SOIDD MOSFET Models */ if (!model->B3SOIDDtypeGiven) model->B3SOIDDtype = NMOS; if (!model->B3SOIDDmobModGiven) model->B3SOIDDmobMod = 1; if (!model->B3SOIDDbinUnitGiven) model->B3SOIDDbinUnit = 1; if (!model->B3SOIDDparamChkGiven) model->B3SOIDDparamChk = 0; if (!model->B3SOIDDcapModGiven) model->B3SOIDDcapMod = 2; if (!model->B3SOIDDnoiModGiven) model->B3SOIDDnoiMod = 1; if (!model->B3SOIDDshModGiven) model->B3SOIDDshMod = 0; if (!model->B3SOIDDversionGiven) model->B3SOIDDversion = 2.0; if (!model->B3SOIDDtoxGiven) model->B3SOIDDtox = 100.0e-10; model->B3SOIDDcox = 3.453133e-11 / model->B3SOIDDtox; if (!model->B3SOIDDcdscGiven) model->B3SOIDDcdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->B3SOIDDcdscbGiven) model->B3SOIDDcdscb = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIDDcdscdGiven) model->B3SOIDDcdscd = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIDDcitGiven) model->B3SOIDDcit = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIDDnfactorGiven) model->B3SOIDDnfactor = 1; if (!model->B3SOIDDvsatGiven) model->B3SOIDDvsat = 8.0e4; /* unit m/s */ if (!model->B3SOIDDatGiven) model->B3SOIDDat = 3.3e4; /* unit m/s */ if (!model->B3SOIDDa0Given) model->B3SOIDDa0 = 1.0; if (!model->B3SOIDDagsGiven) model->B3SOIDDags = 0.0; if (!model->B3SOIDDa1Given) model->B3SOIDDa1 = 0.0; if (!model->B3SOIDDa2Given) model->B3SOIDDa2 = 1.0; if (!model->B3SOIDDketaGiven) model->B3SOIDDketa = -0.6; /* unit / V */ if (!model->B3SOIDDnsubGiven) model->B3SOIDDnsub = 6.0e16; /* unit 1/cm3 */ if (!model->B3SOIDDnpeakGiven) model->B3SOIDDnpeak = 1.7e17; /* unit 1/cm3 */ if (!model->B3SOIDDngateGiven) model->B3SOIDDngate = 0; /* unit 1/cm3 */ if (!model->B3SOIDDvbmGiven) model->B3SOIDDvbm = -3.0; if (!model->B3SOIDDxtGiven) model->B3SOIDDxt = 1.55e-7; if (!model->B3SOIDDkt1Given) model->B3SOIDDkt1 = -0.11; /* unit V */ if (!model->B3SOIDDkt1lGiven) model->B3SOIDDkt1l = 0.0; /* unit V*m */ if (!model->B3SOIDDkt2Given) model->B3SOIDDkt2 = 0.022; /* No unit */ if (!model->B3SOIDDk3Given) model->B3SOIDDk3 = 0.0; if (!model->B3SOIDDk3bGiven) model->B3SOIDDk3b = 0.0; if (!model->B3SOIDDw0Given) model->B3SOIDDw0 = 2.5e-6; if (!model->B3SOIDDnlxGiven) model->B3SOIDDnlx = 1.74e-7; if (!model->B3SOIDDdvt0Given) model->B3SOIDDdvt0 = 2.2; if (!model->B3SOIDDdvt1Given) model->B3SOIDDdvt1 = 0.53; if (!model->B3SOIDDdvt2Given) model->B3SOIDDdvt2 = -0.032; /* unit 1 / V */ if (!model->B3SOIDDdvt0wGiven) model->B3SOIDDdvt0w = 0.0; if (!model->B3SOIDDdvt1wGiven) model->B3SOIDDdvt1w = 5.3e6; if (!model->B3SOIDDdvt2wGiven) model->B3SOIDDdvt2w = -0.032; if (!model->B3SOIDDdroutGiven) model->B3SOIDDdrout = 0.56; if (!model->B3SOIDDdsubGiven) model->B3SOIDDdsub = model->B3SOIDDdrout; if (!model->B3SOIDDvth0Given) model->B3SOIDDvth0 = (model->B3SOIDDtype == NMOS) ? 0.7 : -0.7; if (!model->B3SOIDDuaGiven) model->B3SOIDDua = 2.25e-9; /* unit m/V */ if (!model->B3SOIDDua1Given) model->B3SOIDDua1 = 4.31e-9; /* unit m/V */ if (!model->B3SOIDDubGiven) model->B3SOIDDub = 5.87e-19; /* unit (m/V)**2 */ if (!model->B3SOIDDub1Given) model->B3SOIDDub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->B3SOIDDucGiven) model->B3SOIDDuc = (model->B3SOIDDmobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->B3SOIDDuc1Given) model->B3SOIDDuc1 = (model->B3SOIDDmobMod == 3) ? -0.056 : -0.056e-9; if (!model->B3SOIDDu0Given) model->B3SOIDDu0 = (model->B3SOIDDtype == NMOS) ? 0.067 : 0.025; if (!model->B3SOIDDuteGiven) model->B3SOIDDute = -1.5; if (!model->B3SOIDDvoffGiven) model->B3SOIDDvoff = -0.08; if (!model->B3SOIDDdeltaGiven) model->B3SOIDDdelta = 0.01; if (!model->B3SOIDDrdswGiven) model->B3SOIDDrdsw = 100; if (!model->B3SOIDDprwgGiven) model->B3SOIDDprwg = 0.0; /* unit 1/V */ if (!model->B3SOIDDprwbGiven) model->B3SOIDDprwb = 0.0; if (!model->B3SOIDDprtGiven) if (!model->B3SOIDDprtGiven) model->B3SOIDDprt = 0.0; if (!model->B3SOIDDeta0Given) model->B3SOIDDeta0 = 0.08; /* no unit */ if (!model->B3SOIDDetabGiven) model->B3SOIDDetab = -0.07; /* unit 1/V */ if (!model->B3SOIDDpclmGiven) model->B3SOIDDpclm = 1.3; /* no unit */ if (!model->B3SOIDDpdibl1Given) model->B3SOIDDpdibl1 = .39; /* no unit */ if (!model->B3SOIDDpdibl2Given) model->B3SOIDDpdibl2 = 0.0086; /* no unit */ if (!model->B3SOIDDpdiblbGiven) model->B3SOIDDpdiblb = 0.0; /* 1/V */ if (!model->B3SOIDDpvagGiven) model->B3SOIDDpvag = 0.0; if (!model->B3SOIDDwrGiven) model->B3SOIDDwr = 1.0; if (!model->B3SOIDDdwgGiven) model->B3SOIDDdwg = 0.0; if (!model->B3SOIDDdwbGiven) model->B3SOIDDdwb = 0.0; if (!model->B3SOIDDb0Given) model->B3SOIDDb0 = 0.0; if (!model->B3SOIDDb1Given) model->B3SOIDDb1 = 0.0; if (!model->B3SOIDDalpha0Given) model->B3SOIDDalpha0 = 0.0; if (!model->B3SOIDDalpha1Given) model->B3SOIDDalpha1 = 1.0; if (!model->B3SOIDDbeta0Given) model->B3SOIDDbeta0 = 30.0; if (!model->B3SOIDDcgslGiven) model->B3SOIDDcgsl = 0.0; if (!model->B3SOIDDcgdlGiven) model->B3SOIDDcgdl = 0.0; if (!model->B3SOIDDckappaGiven) model->B3SOIDDckappa = 0.6; if (!model->B3SOIDDclcGiven) model->B3SOIDDclc = 0.1e-7; if (!model->B3SOIDDcleGiven) model->B3SOIDDcle = 0.0; if (!model->B3SOIDDtboxGiven) model->B3SOIDDtbox = 3e-7; if (!model->B3SOIDDtsiGiven) model->B3SOIDDtsi = 1e-7; if (!model->B3SOIDDxjGiven) model->B3SOIDDxj = model->B3SOIDDtsi; if (!model->B3SOIDDkb1Given) model->B3SOIDDkb1 = 1; if (!model->B3SOIDDkb3Given) model->B3SOIDDkb3 = 1; if (!model->B3SOIDDdvbd0Given) model->B3SOIDDdvbd0 = 0.0; if (!model->B3SOIDDdvbd1Given) model->B3SOIDDdvbd1 = 0.0; if (!model->B3SOIDDvbsaGiven) model->B3SOIDDvbsa = 0.0; if (!model->B3SOIDDdelpGiven) model->B3SOIDDdelp = 0.02; if (!model->B3SOIDDrbodyGiven) model->B3SOIDDrbody = 0.0; if (!model->B3SOIDDrbshGiven) model->B3SOIDDrbsh = 0.0; if (!model->B3SOIDDadice0Given) model->B3SOIDDadice0 = 1; if (!model->B3SOIDDabpGiven) model->B3SOIDDabp = 1; if (!model->B3SOIDDmxcGiven) model->B3SOIDDmxc = -0.9; if (!model->B3SOIDDrth0Given) model->B3SOIDDrth0 = 0; if (!model->B3SOIDDcth0Given) model->B3SOIDDcth0 = 0; if (!model->B3SOIDDaiiGiven) model->B3SOIDDaii = 0.0; if (!model->B3SOIDDbiiGiven) model->B3SOIDDbii = 0.0; if (!model->B3SOIDDciiGiven) model->B3SOIDDcii = 0.0; if (!model->B3SOIDDdiiGiven) model->B3SOIDDdii = -1.0; if (!model->B3SOIDDagidlGiven) model->B3SOIDDagidl = 0.0; if (!model->B3SOIDDbgidlGiven) model->B3SOIDDbgidl = 0.0; if (!model->B3SOIDDngidlGiven) model->B3SOIDDngidl = 1.2; if (!model->B3SOIDDndiodeGiven) model->B3SOIDDndiode = 1.0; if (!model->B3SOIDDntunGiven) model->B3SOIDDntun = 10.0; if (!model->B3SOIDDisbjtGiven) model->B3SOIDDisbjt = 1e-6; if (!model->B3SOIDDisdifGiven) model->B3SOIDDisdif = 0.0; if (!model->B3SOIDDisrecGiven) model->B3SOIDDisrec = 1e-5; if (!model->B3SOIDDistunGiven) model->B3SOIDDistun = 0.0; if (!model->B3SOIDDxbjtGiven) model->B3SOIDDxbjt = 2; if (!model->B3SOIDDxdifGiven) model->B3SOIDDxdif = 2; if (!model->B3SOIDDxrecGiven) model->B3SOIDDxrec = 20; if (!model->B3SOIDDxtunGiven) model->B3SOIDDxtun = 0; if (!model->B3SOIDDedlGiven) model->B3SOIDDedl = 2e-6; if (!model->B3SOIDDkbjt1Given) model->B3SOIDDkbjt1 = 0; if (!model->B3SOIDDttGiven) model->B3SOIDDtt = 1e-12; if (!model->B3SOIDDasdGiven) model->B3SOIDDasd = 0.3; /* unit degree celcius */ if (!model->B3SOIDDtnomGiven) model->B3SOIDDtnom = ckt->CKTnomTemp; if (!model->B3SOIDDLintGiven) model->B3SOIDDLint = 0.0; if (!model->B3SOIDDLlGiven) model->B3SOIDDLl = 0.0; if (!model->B3SOIDDLlnGiven) model->B3SOIDDLln = 1.0; if (!model->B3SOIDDLwGiven) model->B3SOIDDLw = 0.0; if (!model->B3SOIDDLwnGiven) model->B3SOIDDLwn = 1.0; if (!model->B3SOIDDLwlGiven) model->B3SOIDDLwl = 0.0; if (!model->B3SOIDDLminGiven) model->B3SOIDDLmin = 0.0; if (!model->B3SOIDDLmaxGiven) model->B3SOIDDLmax = 1.0; if (!model->B3SOIDDWintGiven) model->B3SOIDDWint = 0.0; if (!model->B3SOIDDWlGiven) model->B3SOIDDWl = 0.0; if (!model->B3SOIDDWlnGiven) model->B3SOIDDWln = 1.0; if (!model->B3SOIDDWwGiven) model->B3SOIDDWw = 0.0; if (!model->B3SOIDDWwnGiven) model->B3SOIDDWwn = 1.0; if (!model->B3SOIDDWwlGiven) model->B3SOIDDWwl = 0.0; if (!model->B3SOIDDWminGiven) model->B3SOIDDWmin = 0.0; if (!model->B3SOIDDWmaxGiven) model->B3SOIDDWmax = 1.0; if (!model->B3SOIDDdwcGiven) model->B3SOIDDdwc = model->B3SOIDDWint; if (!model->B3SOIDDdlcGiven) model->B3SOIDDdlc = model->B3SOIDDLint; /* Added for binning - START */ /* Length dependence */ if (!model->B3SOIDDlnpeakGiven) model->B3SOIDDlnpeak = 0.0; if (!model->B3SOIDDlnsubGiven) model->B3SOIDDlnsub = 0.0; if (!model->B3SOIDDlngateGiven) model->B3SOIDDlngate = 0.0; if (!model->B3SOIDDlvth0Given) model->B3SOIDDlvth0 = 0.0; if (!model->B3SOIDDlk1Given) model->B3SOIDDlk1 = 0.0; if (!model->B3SOIDDlk2Given) model->B3SOIDDlk2 = 0.0; if (!model->B3SOIDDlk3Given) model->B3SOIDDlk3 = 0.0; if (!model->B3SOIDDlk3bGiven) model->B3SOIDDlk3b = 0.0; if (!model->B3SOIDDlvbsaGiven) model->B3SOIDDlvbsa = 0.0; if (!model->B3SOIDDldelpGiven) model->B3SOIDDldelp = 0.0; if (!model->B3SOIDDlkb1Given) model->B3SOIDDlkb1 = 0.0; if (!model->B3SOIDDlkb3Given) model->B3SOIDDlkb3 = 1.0; if (!model->B3SOIDDldvbd0Given) model->B3SOIDDldvbd0 = 1.0; if (!model->B3SOIDDldvbd1Given) model->B3SOIDDldvbd1 = 1.0; if (!model->B3SOIDDlw0Given) model->B3SOIDDlw0 = 0.0; if (!model->B3SOIDDlnlxGiven) model->B3SOIDDlnlx = 0.0; if (!model->B3SOIDDldvt0Given) model->B3SOIDDldvt0 = 0.0; if (!model->B3SOIDDldvt1Given) model->B3SOIDDldvt1 = 0.0; if (!model->B3SOIDDldvt2Given) model->B3SOIDDldvt2 = 0.0; if (!model->B3SOIDDldvt0wGiven) model->B3SOIDDldvt0w = 0.0; if (!model->B3SOIDDldvt1wGiven) model->B3SOIDDldvt1w = 0.0; if (!model->B3SOIDDldvt2wGiven) model->B3SOIDDldvt2w = 0.0; if (!model->B3SOIDDlu0Given) model->B3SOIDDlu0 = 0.0; if (!model->B3SOIDDluaGiven) model->B3SOIDDlua = 0.0; if (!model->B3SOIDDlubGiven) model->B3SOIDDlub = 0.0; if (!model->B3SOIDDlucGiven) model->B3SOIDDluc = 0.0; if (!model->B3SOIDDlvsatGiven) model->B3SOIDDlvsat = 0.0; if (!model->B3SOIDDla0Given) model->B3SOIDDla0 = 0.0; if (!model->B3SOIDDlagsGiven) model->B3SOIDDlags = 0.0; if (!model->B3SOIDDlb0Given) model->B3SOIDDlb0 = 0.0; if (!model->B3SOIDDlb1Given) model->B3SOIDDlb1 = 0.0; if (!model->B3SOIDDlketaGiven) model->B3SOIDDlketa = 0.0; if (!model->B3SOIDDlabpGiven) model->B3SOIDDlabp = 0.0; if (!model->B3SOIDDlmxcGiven) model->B3SOIDDlmxc = 0.0; if (!model->B3SOIDDladice0Given) model->B3SOIDDladice0 = 0.0; if (!model->B3SOIDDla1Given) model->B3SOIDDla1 = 0.0; if (!model->B3SOIDDla2Given) model->B3SOIDDla2 = 0.0; if (!model->B3SOIDDlrdswGiven) model->B3SOIDDlrdsw = 0.0; if (!model->B3SOIDDlprwbGiven) model->B3SOIDDlprwb = 0.0; if (!model->B3SOIDDlprwgGiven) model->B3SOIDDlprwg = 0.0; if (!model->B3SOIDDlwrGiven) model->B3SOIDDlwr = 0.0; if (!model->B3SOIDDlnfactorGiven) model->B3SOIDDlnfactor = 0.0; if (!model->B3SOIDDldwgGiven) model->B3SOIDDldwg = 0.0; if (!model->B3SOIDDldwbGiven) model->B3SOIDDldwb = 0.0; if (!model->B3SOIDDlvoffGiven) model->B3SOIDDlvoff = 0.0; if (!model->B3SOIDDleta0Given) model->B3SOIDDleta0 = 0.0; if (!model->B3SOIDDletabGiven) model->B3SOIDDletab = 0.0; if (!model->B3SOIDDldsubGiven) model->B3SOIDDldsub = 0.0; if (!model->B3SOIDDlcitGiven) model->B3SOIDDlcit = 0.0; if (!model->B3SOIDDlcdscGiven) model->B3SOIDDlcdsc = 0.0; if (!model->B3SOIDDlcdscbGiven) model->B3SOIDDlcdscb = 0.0; if (!model->B3SOIDDlcdscdGiven) model->B3SOIDDlcdscd = 0.0; if (!model->B3SOIDDlpclmGiven) model->B3SOIDDlpclm = 0.0; if (!model->B3SOIDDlpdibl1Given) model->B3SOIDDlpdibl1 = 0.0; if (!model->B3SOIDDlpdibl2Given) model->B3SOIDDlpdibl2 = 0.0; if (!model->B3SOIDDlpdiblbGiven) model->B3SOIDDlpdiblb = 0.0; if (!model->B3SOIDDldroutGiven) model->B3SOIDDldrout = 0.0; if (!model->B3SOIDDlpvagGiven) model->B3SOIDDlpvag = 0.0; if (!model->B3SOIDDldeltaGiven) model->B3SOIDDldelta = 0.0; if (!model->B3SOIDDlaiiGiven) model->B3SOIDDlaii = 0.0; if (!model->B3SOIDDlbiiGiven) model->B3SOIDDlbii = 0.0; if (!model->B3SOIDDlciiGiven) model->B3SOIDDlcii = 0.0; if (!model->B3SOIDDldiiGiven) model->B3SOIDDldii = 0.0; if (!model->B3SOIDDlalpha0Given) model->B3SOIDDlalpha0 = 0.0; if (!model->B3SOIDDlalpha1Given) model->B3SOIDDlalpha1 = 0.0; if (!model->B3SOIDDlbeta0Given) model->B3SOIDDlbeta0 = 0.0; if (!model->B3SOIDDlagidlGiven) model->B3SOIDDlagidl = 0.0; if (!model->B3SOIDDlbgidlGiven) model->B3SOIDDlbgidl = 0.0; if (!model->B3SOIDDlngidlGiven) model->B3SOIDDlngidl = 0.0; if (!model->B3SOIDDlntunGiven) model->B3SOIDDlntun = 0.0; if (!model->B3SOIDDlndiodeGiven) model->B3SOIDDlndiode = 0.0; if (!model->B3SOIDDlisbjtGiven) model->B3SOIDDlisbjt = 0.0; if (!model->B3SOIDDlisdifGiven) model->B3SOIDDlisdif = 0.0; if (!model->B3SOIDDlisrecGiven) model->B3SOIDDlisrec = 0.0; if (!model->B3SOIDDlistunGiven) model->B3SOIDDlistun = 0.0; if (!model->B3SOIDDledlGiven) model->B3SOIDDledl = 0.0; if (!model->B3SOIDDlkbjt1Given) model->B3SOIDDlkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIDDlvsdfbGiven) model->B3SOIDDlvsdfb = 0.0; if (!model->B3SOIDDlvsdthGiven) model->B3SOIDDlvsdth = 0.0; /* Width dependence */ if (!model->B3SOIDDwnpeakGiven) model->B3SOIDDwnpeak = 0.0; if (!model->B3SOIDDwnsubGiven) model->B3SOIDDwnsub = 0.0; if (!model->B3SOIDDwngateGiven) model->B3SOIDDwngate = 0.0; if (!model->B3SOIDDwvth0Given) model->B3SOIDDwvth0 = 0.0; if (!model->B3SOIDDwk1Given) model->B3SOIDDwk1 = 0.0; if (!model->B3SOIDDwk2Given) model->B3SOIDDwk2 = 0.0; if (!model->B3SOIDDwk3Given) model->B3SOIDDwk3 = 0.0; if (!model->B3SOIDDwk3bGiven) model->B3SOIDDwk3b = 0.0; if (!model->B3SOIDDwvbsaGiven) model->B3SOIDDwvbsa = 0.0; if (!model->B3SOIDDwdelpGiven) model->B3SOIDDwdelp = 0.0; if (!model->B3SOIDDwkb1Given) model->B3SOIDDwkb1 = 0.0; if (!model->B3SOIDDwkb3Given) model->B3SOIDDwkb3 = 1.0; if (!model->B3SOIDDwdvbd0Given) model->B3SOIDDwdvbd0 = 1.0; if (!model->B3SOIDDwdvbd1Given) model->B3SOIDDwdvbd1 = 1.0; if (!model->B3SOIDDww0Given) model->B3SOIDDww0 = 0.0; if (!model->B3SOIDDwnlxGiven) model->B3SOIDDwnlx = 0.0; if (!model->B3SOIDDwdvt0Given) model->B3SOIDDwdvt0 = 0.0; if (!model->B3SOIDDwdvt1Given) model->B3SOIDDwdvt1 = 0.0; if (!model->B3SOIDDwdvt2Given) model->B3SOIDDwdvt2 = 0.0; if (!model->B3SOIDDwdvt0wGiven) model->B3SOIDDwdvt0w = 0.0; if (!model->B3SOIDDwdvt1wGiven) model->B3SOIDDwdvt1w = 0.0; if (!model->B3SOIDDwdvt2wGiven) model->B3SOIDDwdvt2w = 0.0; if (!model->B3SOIDDwu0Given) model->B3SOIDDwu0 = 0.0; if (!model->B3SOIDDwuaGiven) model->B3SOIDDwua = 0.0; if (!model->B3SOIDDwubGiven) model->B3SOIDDwub = 0.0; if (!model->B3SOIDDwucGiven) model->B3SOIDDwuc = 0.0; if (!model->B3SOIDDwvsatGiven) model->B3SOIDDwvsat = 0.0; if (!model->B3SOIDDwa0Given) model->B3SOIDDwa0 = 0.0; if (!model->B3SOIDDwagsGiven) model->B3SOIDDwags = 0.0; if (!model->B3SOIDDwb0Given) model->B3SOIDDwb0 = 0.0; if (!model->B3SOIDDwb1Given) model->B3SOIDDwb1 = 0.0; if (!model->B3SOIDDwketaGiven) model->B3SOIDDwketa = 0.0; if (!model->B3SOIDDwabpGiven) model->B3SOIDDwabp = 0.0; if (!model->B3SOIDDwmxcGiven) model->B3SOIDDwmxc = 0.0; if (!model->B3SOIDDwadice0Given) model->B3SOIDDwadice0 = 0.0; if (!model->B3SOIDDwa1Given) model->B3SOIDDwa1 = 0.0; if (!model->B3SOIDDwa2Given) model->B3SOIDDwa2 = 0.0; if (!model->B3SOIDDwrdswGiven) model->B3SOIDDwrdsw = 0.0; if (!model->B3SOIDDwprwbGiven) model->B3SOIDDwprwb = 0.0; if (!model->B3SOIDDwprwgGiven) model->B3SOIDDwprwg = 0.0; if (!model->B3SOIDDwwrGiven) model->B3SOIDDwwr = 0.0; if (!model->B3SOIDDwnfactorGiven) model->B3SOIDDwnfactor = 0.0; if (!model->B3SOIDDwdwgGiven) model->B3SOIDDwdwg = 0.0; if (!model->B3SOIDDwdwbGiven) model->B3SOIDDwdwb = 0.0; if (!model->B3SOIDDwvoffGiven) model->B3SOIDDwvoff = 0.0; if (!model->B3SOIDDweta0Given) model->B3SOIDDweta0 = 0.0; if (!model->B3SOIDDwetabGiven) model->B3SOIDDwetab = 0.0; if (!model->B3SOIDDwdsubGiven) model->B3SOIDDwdsub = 0.0; if (!model->B3SOIDDwcitGiven) model->B3SOIDDwcit = 0.0; if (!model->B3SOIDDwcdscGiven) model->B3SOIDDwcdsc = 0.0; if (!model->B3SOIDDwcdscbGiven) model->B3SOIDDwcdscb = 0.0; if (!model->B3SOIDDwcdscdGiven) model->B3SOIDDwcdscd = 0.0; if (!model->B3SOIDDwpclmGiven) model->B3SOIDDwpclm = 0.0; if (!model->B3SOIDDwpdibl1Given) model->B3SOIDDwpdibl1 = 0.0; if (!model->B3SOIDDwpdibl2Given) model->B3SOIDDwpdibl2 = 0.0; if (!model->B3SOIDDwpdiblbGiven) model->B3SOIDDwpdiblb = 0.0; if (!model->B3SOIDDwdroutGiven) model->B3SOIDDwdrout = 0.0; if (!model->B3SOIDDwpvagGiven) model->B3SOIDDwpvag = 0.0; if (!model->B3SOIDDwdeltaGiven) model->B3SOIDDwdelta = 0.0; if (!model->B3SOIDDwaiiGiven) model->B3SOIDDwaii = 0.0; if (!model->B3SOIDDwbiiGiven) model->B3SOIDDwbii = 0.0; if (!model->B3SOIDDwciiGiven) model->B3SOIDDwcii = 0.0; if (!model->B3SOIDDwdiiGiven) model->B3SOIDDwdii = 0.0; if (!model->B3SOIDDwalpha0Given) model->B3SOIDDwalpha0 = 0.0; if (!model->B3SOIDDwalpha1Given) model->B3SOIDDwalpha1 = 0.0; if (!model->B3SOIDDwbeta0Given) model->B3SOIDDwbeta0 = 0.0; if (!model->B3SOIDDwagidlGiven) model->B3SOIDDwagidl = 0.0; if (!model->B3SOIDDwbgidlGiven) model->B3SOIDDwbgidl = 0.0; if (!model->B3SOIDDwngidlGiven) model->B3SOIDDwngidl = 0.0; if (!model->B3SOIDDwntunGiven) model->B3SOIDDwntun = 0.0; if (!model->B3SOIDDwndiodeGiven) model->B3SOIDDwndiode = 0.0; if (!model->B3SOIDDwisbjtGiven) model->B3SOIDDwisbjt = 0.0; if (!model->B3SOIDDwisdifGiven) model->B3SOIDDwisdif = 0.0; if (!model->B3SOIDDwisrecGiven) model->B3SOIDDwisrec = 0.0; if (!model->B3SOIDDwistunGiven) model->B3SOIDDwistun = 0.0; if (!model->B3SOIDDwedlGiven) model->B3SOIDDwedl = 0.0; if (!model->B3SOIDDwkbjt1Given) model->B3SOIDDwkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIDDwvsdfbGiven) model->B3SOIDDwvsdfb = 0.0; if (!model->B3SOIDDwvsdthGiven) model->B3SOIDDwvsdth = 0.0; /* Cross-term dependence */ if (!model->B3SOIDDpnpeakGiven) model->B3SOIDDpnpeak = 0.0; if (!model->B3SOIDDpnsubGiven) model->B3SOIDDpnsub = 0.0; if (!model->B3SOIDDpngateGiven) model->B3SOIDDpngate = 0.0; if (!model->B3SOIDDpvth0Given) model->B3SOIDDpvth0 = 0.0; if (!model->B3SOIDDpk1Given) model->B3SOIDDpk1 = 0.0; if (!model->B3SOIDDpk2Given) model->B3SOIDDpk2 = 0.0; if (!model->B3SOIDDpk3Given) model->B3SOIDDpk3 = 0.0; if (!model->B3SOIDDpk3bGiven) model->B3SOIDDpk3b = 0.0; if (!model->B3SOIDDpvbsaGiven) model->B3SOIDDpvbsa = 0.0; if (!model->B3SOIDDpdelpGiven) model->B3SOIDDpdelp = 0.0; if (!model->B3SOIDDpkb1Given) model->B3SOIDDpkb1 = 0.0; if (!model->B3SOIDDpkb3Given) model->B3SOIDDpkb3 = 1.0; if (!model->B3SOIDDpdvbd0Given) model->B3SOIDDpdvbd0 = 1.0; if (!model->B3SOIDDpdvbd1Given) model->B3SOIDDpdvbd1 = 1.0; if (!model->B3SOIDDpw0Given) model->B3SOIDDpw0 = 0.0; if (!model->B3SOIDDpnlxGiven) model->B3SOIDDpnlx = 0.0; if (!model->B3SOIDDpdvt0Given) model->B3SOIDDpdvt0 = 0.0; if (!model->B3SOIDDpdvt1Given) model->B3SOIDDpdvt1 = 0.0; if (!model->B3SOIDDpdvt2Given) model->B3SOIDDpdvt2 = 0.0; if (!model->B3SOIDDpdvt0wGiven) model->B3SOIDDpdvt0w = 0.0; if (!model->B3SOIDDpdvt1wGiven) model->B3SOIDDpdvt1w = 0.0; if (!model->B3SOIDDpdvt2wGiven) model->B3SOIDDpdvt2w = 0.0; if (!model->B3SOIDDpu0Given) model->B3SOIDDpu0 = 0.0; if (!model->B3SOIDDpuaGiven) model->B3SOIDDpua = 0.0; if (!model->B3SOIDDpubGiven) model->B3SOIDDpub = 0.0; if (!model->B3SOIDDpucGiven) model->B3SOIDDpuc = 0.0; if (!model->B3SOIDDpvsatGiven) model->B3SOIDDpvsat = 0.0; if (!model->B3SOIDDpa0Given) model->B3SOIDDpa0 = 0.0; if (!model->B3SOIDDpagsGiven) model->B3SOIDDpags = 0.0; if (!model->B3SOIDDpb0Given) model->B3SOIDDpb0 = 0.0; if (!model->B3SOIDDpb1Given) model->B3SOIDDpb1 = 0.0; if (!model->B3SOIDDpketaGiven) model->B3SOIDDpketa = 0.0; if (!model->B3SOIDDpabpGiven) model->B3SOIDDpabp = 0.0; if (!model->B3SOIDDpmxcGiven) model->B3SOIDDpmxc = 0.0; if (!model->B3SOIDDpadice0Given) model->B3SOIDDpadice0 = 0.0; if (!model->B3SOIDDpa1Given) model->B3SOIDDpa1 = 0.0; if (!model->B3SOIDDpa2Given) model->B3SOIDDpa2 = 0.0; if (!model->B3SOIDDprdswGiven) model->B3SOIDDprdsw = 0.0; if (!model->B3SOIDDpprwbGiven) model->B3SOIDDpprwb = 0.0; if (!model->B3SOIDDpprwgGiven) model->B3SOIDDpprwg = 0.0; if (!model->B3SOIDDpwrGiven) model->B3SOIDDpwr = 0.0; if (!model->B3SOIDDpnfactorGiven) model->B3SOIDDpnfactor = 0.0; if (!model->B3SOIDDpdwgGiven) model->B3SOIDDpdwg = 0.0; if (!model->B3SOIDDpdwbGiven) model->B3SOIDDpdwb = 0.0; if (!model->B3SOIDDpvoffGiven) model->B3SOIDDpvoff = 0.0; if (!model->B3SOIDDpeta0Given) model->B3SOIDDpeta0 = 0.0; if (!model->B3SOIDDpetabGiven) model->B3SOIDDpetab = 0.0; if (!model->B3SOIDDpdsubGiven) model->B3SOIDDpdsub = 0.0; if (!model->B3SOIDDpcitGiven) model->B3SOIDDpcit = 0.0; if (!model->B3SOIDDpcdscGiven) model->B3SOIDDpcdsc = 0.0; if (!model->B3SOIDDpcdscbGiven) model->B3SOIDDpcdscb = 0.0; if (!model->B3SOIDDpcdscdGiven) model->B3SOIDDpcdscd = 0.0; if (!model->B3SOIDDppclmGiven) model->B3SOIDDppclm = 0.0; if (!model->B3SOIDDppdibl1Given) model->B3SOIDDppdibl1 = 0.0; if (!model->B3SOIDDppdibl2Given) model->B3SOIDDppdibl2 = 0.0; if (!model->B3SOIDDppdiblbGiven) model->B3SOIDDppdiblb = 0.0; if (!model->B3SOIDDpdroutGiven) model->B3SOIDDpdrout = 0.0; if (!model->B3SOIDDppvagGiven) model->B3SOIDDppvag = 0.0; if (!model->B3SOIDDpdeltaGiven) model->B3SOIDDpdelta = 0.0; if (!model->B3SOIDDpaiiGiven) model->B3SOIDDpaii = 0.0; if (!model->B3SOIDDpbiiGiven) model->B3SOIDDpbii = 0.0; if (!model->B3SOIDDpciiGiven) model->B3SOIDDpcii = 0.0; if (!model->B3SOIDDpdiiGiven) model->B3SOIDDpdii = 0.0; if (!model->B3SOIDDpalpha0Given) model->B3SOIDDpalpha0 = 0.0; if (!model->B3SOIDDpalpha1Given) model->B3SOIDDpalpha1 = 0.0; if (!model->B3SOIDDpbeta0Given) model->B3SOIDDpbeta0 = 0.0; if (!model->B3SOIDDpagidlGiven) model->B3SOIDDpagidl = 0.0; if (!model->B3SOIDDpbgidlGiven) model->B3SOIDDpbgidl = 0.0; if (!model->B3SOIDDpngidlGiven) model->B3SOIDDpngidl = 0.0; if (!model->B3SOIDDpntunGiven) model->B3SOIDDpntun = 0.0; if (!model->B3SOIDDpndiodeGiven) model->B3SOIDDpndiode = 0.0; if (!model->B3SOIDDpisbjtGiven) model->B3SOIDDpisbjt = 0.0; if (!model->B3SOIDDpisdifGiven) model->B3SOIDDpisdif = 0.0; if (!model->B3SOIDDpisrecGiven) model->B3SOIDDpisrec = 0.0; if (!model->B3SOIDDpistunGiven) model->B3SOIDDpistun = 0.0; if (!model->B3SOIDDpedlGiven) model->B3SOIDDpedl = 0.0; if (!model->B3SOIDDpkbjt1Given) model->B3SOIDDpkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIDDpvsdfbGiven) model->B3SOIDDpvsdfb = 0.0; if (!model->B3SOIDDpvsdthGiven) model->B3SOIDDpvsdth = 0.0; /* Added for binning - END */ if (!model->B3SOIDDcfGiven) model->B3SOIDDcf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->B3SOIDDtox); if (!model->B3SOIDDcgdoGiven) { if (model->B3SOIDDdlcGiven && (model->B3SOIDDdlc > 0.0)) { model->B3SOIDDcgdo = model->B3SOIDDdlc * model->B3SOIDDcox - model->B3SOIDDcgdl ; } else model->B3SOIDDcgdo = 0.6 * model->B3SOIDDxj * model->B3SOIDDcox; } if (!model->B3SOIDDcgsoGiven) { if (model->B3SOIDDdlcGiven && (model->B3SOIDDdlc > 0.0)) { model->B3SOIDDcgso = model->B3SOIDDdlc * model->B3SOIDDcox - model->B3SOIDDcgsl ; } else model->B3SOIDDcgso = 0.6 * model->B3SOIDDxj * model->B3SOIDDcox; } if (!model->B3SOIDDcgeoGiven) { model->B3SOIDDcgeo = 0.0; } if (!model->B3SOIDDxpartGiven) model->B3SOIDDxpart = 0.0; if (!model->B3SOIDDsheetResistanceGiven) model->B3SOIDDsheetResistance = 0.0; if (!model->B3SOIDDcsdeswGiven) model->B3SOIDDcsdesw = 0.0; if (!model->B3SOIDDunitLengthGateSidewallJctCapGiven) model->B3SOIDDunitLengthGateSidewallJctCap = 1e-10; if (!model->B3SOIDDGatesidewallJctPotentialGiven) model->B3SOIDDGatesidewallJctPotential = 0.7; if (!model->B3SOIDDbodyJctGateSideGradingCoeffGiven) model->B3SOIDDbodyJctGateSideGradingCoeff = 0.5; if (!model->B3SOIDDoxideTrapDensityAGiven) { if (model->B3SOIDDtype == NMOS) model->B3SOIDDoxideTrapDensityA = 1e20; else model->B3SOIDDoxideTrapDensityA=9.9e18; } if (!model->B3SOIDDoxideTrapDensityBGiven) { if (model->B3SOIDDtype == NMOS) model->B3SOIDDoxideTrapDensityB = 5e4; else model->B3SOIDDoxideTrapDensityB = 2.4e3; } if (!model->B3SOIDDoxideTrapDensityCGiven) { if (model->B3SOIDDtype == NMOS) model->B3SOIDDoxideTrapDensityC = -1.4e-12; else model->B3SOIDDoxideTrapDensityC = 1.4e-12; } if (!model->B3SOIDDemGiven) model->B3SOIDDem = 4.1e7; /* V/m */ if (!model->B3SOIDDefGiven) model->B3SOIDDef = 1.0; if (!model->B3SOIDDafGiven) model->B3SOIDDaf = 1.0; if (!model->B3SOIDDkfGiven) model->B3SOIDDkf = 0.0; if (!model->B3SOIDDnoifGiven) model->B3SOIDDnoif = 1.0; /* loop through all the instances of the model */ for (here = model->B3SOIDDinstances; here != NULL ; here=here->B3SOIDDnextInstance) { /* allocate a chunk of the state vector */ here->B3SOIDDstates = *states; *states += B3SOIDDnumStates; /* perform the parameter defaulting */ if (!here->B3SOIDDdrainAreaGiven) here->B3SOIDDdrainArea = 0.0; if (!here->B3SOIDDdrainPerimeterGiven) here->B3SOIDDdrainPerimeter = 0.0; if (!here->B3SOIDDdrainSquaresGiven) here->B3SOIDDdrainSquares = 1.0; if (!here->B3SOIDDicVBSGiven) here->B3SOIDDicVBS = 0; if (!here->B3SOIDDicVDSGiven) here->B3SOIDDicVDS = 0; if (!here->B3SOIDDicVGSGiven) here->B3SOIDDicVGS = 0; if (!here->B3SOIDDicVESGiven) here->B3SOIDDicVES = 0; if (!here->B3SOIDDicVPSGiven) here->B3SOIDDicVPS = 0; if (!here->B3SOIDDbjtoffGiven) here->B3SOIDDbjtoff = 0; if (!here->B3SOIDDdebugModGiven) here->B3SOIDDdebugMod = 0; if (!here->B3SOIDDrth0Given) here->B3SOIDDrth0 = model->B3SOIDDrth0; if (!here->B3SOIDDcth0Given) here->B3SOIDDcth0 = model->B3SOIDDcth0; if (!here->B3SOIDDbodySquaresGiven) here->B3SOIDDbodySquares = 1.0; if (!here->B3SOIDDlGiven) here->B3SOIDDl = 5e-6; if (!here->B3SOIDDsourceAreaGiven) here->B3SOIDDsourceArea = 0; if (!here->B3SOIDDsourcePerimeterGiven) here->B3SOIDDsourcePerimeter = 0; if (!here->B3SOIDDsourceSquaresGiven) here->B3SOIDDsourceSquares = 1; if (!here->B3SOIDDwGiven) here->B3SOIDDw = 5e-6; if (!here->B3SOIDDmGiven) here->B3SOIDDm = 1; if (!here->B3SOIDDoffGiven) here->B3SOIDDoff = 0; /* process drain series resistance */ if ((model->B3SOIDDsheetResistance > 0.0) && (here->B3SOIDDdrainSquares > 0.0 ) && (here->B3SOIDDdNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"drain"); if(error) return(error); here->B3SOIDDdNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIDDdNodePrime = here->B3SOIDDdNode; } /* process source series resistance */ if ((model->B3SOIDDsheetResistance > 0.0) && (here->B3SOIDDsourceSquares > 0.0 ) && (here->B3SOIDDsNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"source"); if(error) return(error); here->B3SOIDDsNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIDDsNodePrime = here->B3SOIDDsNode; } /* process effective silicon film thickness */ model->B3SOIDDcbox = 3.453133e-11 / model->B3SOIDDtbox; model->B3SOIDDcsi = 1.03594e-10 / model->B3SOIDDtsi; Cboxt = model->B3SOIDDcbox * model->B3SOIDDcsi / (model->B3SOIDDcbox + model->B3SOIDDcsi); model->B3SOIDDqsi = Charge_q*model->B3SOIDDnpeak*1e6*model->B3SOIDDtsi; /* Tsieff */ tmp1 = 2.0 * EPSSI * model->B3SOIDDvbsa / Charge_q / (1e6*model->B3SOIDDnpeak); tmp2 = model->B3SOIDDtsi * model->B3SOIDDtsi; if (tmp2 < tmp1) { fprintf(stderr, "vbsa = %.3f is too large for this tsi = %.3e and is automatically set to zero\n", model->B3SOIDDvbsa, model->B3SOIDDtsi); model->B3SOIDDcsieff = model->B3SOIDDcsi; model->B3SOIDDqsieff = model->B3SOIDDqsi; } else { tmp1 = sqrt(model->B3SOIDDtsi * model->B3SOIDDtsi - 2.0 * EPSSI * model->B3SOIDDvbsa / Charge_q / (1e6*model->B3SOIDDnpeak)); model->B3SOIDDcsieff = 1.03594e-10 / tmp1; model->B3SOIDDqsieff = Charge_q*model->B3SOIDDnpeak*1e6*tmp1; } model->B3SOIDDcsit = 1/(1/model->B3SOIDDcox + 1/model->B3SOIDDcsieff); model->B3SOIDDcboxt = 1/(1/model->B3SOIDDcbox + 1/model->B3SOIDDcsieff); nfb0 = 1/(1 + model->B3SOIDDcbox / model->B3SOIDDcsit); model->B3SOIDDnfb = model->B3SOIDDkb3 * nfb0; model->B3SOIDDadice = model->B3SOIDDadice0 / ( 1 + Cboxt / model->B3SOIDDcox); here->B3SOIDDfloat = 0; if (here->B3SOIDDbNode == -1) /* no body contact but bNode to be created for SPICE iteration */ { error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"Body"); if(error) return(error); here->B3SOIDDbNode = tmp->number; here->B3SOIDDpNode = 0; here->B3SOIDDfloat = 1; here->B3SOIDDbodyMod = 0; } else /* if body tied */ { /* ideal body tie */ if ((model->B3SOIDDrbody == 0.0) && (model->B3SOIDDrbsh == 0.0)) { here->B3SOIDDbodyMod = 2; /* pNode is not used in this case */ } else { error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Body"); if(error) return(error); here->B3SOIDDbodyMod = 1; here->B3SOIDDpNode = here->B3SOIDDbNode; here->B3SOIDDbNode = tmp->number; } } if ((model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0!=0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIDDname,"Temp"); if(error) return(error); here->B3SOIDDtempNode = tmp->number; } else { here->B3SOIDDtempNode = 0; } /* here for debugging purpose only */ if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1)) { /* The real Vbs value */ error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vbs"); if(error) return(error); here->B3SOIDDvbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Ids"); if(error) return(error); here->B3SOIDDidsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Ic"); if(error) return(error); here->B3SOIDDicNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Ibs"); if(error) return(error); here->B3SOIDDibsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Ibd"); if(error) return(error); here->B3SOIDDibdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Iii"); if(error) return(error); here->B3SOIDDiiiNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Igidl"); if(error) return(error); here->B3SOIDDigidlNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Itun"); if(error) return(error); here->B3SOIDDitunNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Ibp"); if(error) return(error); here->B3SOIDDibpNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Abeff"); if(error) return(error); here->B3SOIDDabeffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vbs0eff"); if(error) return(error); here->B3SOIDDvbs0effNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vbseff"); if(error) return(error); here->B3SOIDDvbseffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Xc"); if(error) return(error); here->B3SOIDDxcNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Cbb"); if(error) return(error); here->B3SOIDDcbbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Cbd"); if(error) return(error); here->B3SOIDDcbdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Cbg"); if(error) return(error); here->B3SOIDDcbgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qbody"); if(error) return(error); here->B3SOIDDqbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qbf"); if(error) return(error); here->B3SOIDDqbfNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qjs"); if(error) return(error); here->B3SOIDDqjsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qjd"); if(error) return(error); here->B3SOIDDqjdNode = tmp->number; /* clean up last */ error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Gm"); if(error) return(error); here->B3SOIDDgmNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Gmbs"); if(error) return(error); here->B3SOIDDgmbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Gds"); if(error) return(error); here->B3SOIDDgdsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Gme"); if(error) return(error); here->B3SOIDDgmeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vbs0teff"); if(error) return(error); here->B3SOIDDvbs0teffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vth"); if(error) return(error); here->B3SOIDDvthNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vgsteff"); if(error) return(error); here->B3SOIDDvgsteffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Xcsat"); if(error) return(error); here->B3SOIDDxcsatNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qac0"); if(error) return(error); here->B3SOIDDqaccNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qsub0"); if(error) return(error); here->B3SOIDDqsub0Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qsubs1"); if(error) return(error); here->B3SOIDDqsubs1Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qsubs2"); if(error) return(error); here->B3SOIDDqsubs2Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qsub"); if(error) return(error); here->B3SOIDDqeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qdrn"); if(error) return(error); here->B3SOIDDqdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Qgate"); if(error) return(error); here->B3SOIDDqgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vdscv"); if(error) return(error); here->B3SOIDDvdscvNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Vcscv"); if(error) return(error); here->B3SOIDDvcscvNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Cbe"); if(error) return(error); here->B3SOIDDcbeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Dum1"); if(error) return(error); here->B3SOIDDdum1Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Dum2"); if(error) return(error); here->B3SOIDDdum2Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Dum3"); if(error) return(error); here->B3SOIDDdum3Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Dum4"); if(error) return(error); here->B3SOIDDdum4Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIDDname, "Dum5"); if(error) return(error); here->B3SOIDDdum5Node = tmp->number; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) if ((model->B3SOIDDshMod == 1) && (here->B3SOIDDrth0!=0.0)) { TSTALLOC(B3SOIDDTemptempPtr, B3SOIDDtempNode, B3SOIDDtempNode); TSTALLOC(B3SOIDDTempdpPtr, B3SOIDDtempNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDTempspPtr, B3SOIDDtempNode, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDTempgPtr, B3SOIDDtempNode, B3SOIDDgNode); TSTALLOC(B3SOIDDTempbPtr, B3SOIDDtempNode, B3SOIDDbNode); TSTALLOC(B3SOIDDTempePtr, B3SOIDDtempNode, B3SOIDDeNode); TSTALLOC(B3SOIDDGtempPtr, B3SOIDDgNode, B3SOIDDtempNode); TSTALLOC(B3SOIDDDPtempPtr, B3SOIDDdNodePrime, B3SOIDDtempNode); TSTALLOC(B3SOIDDSPtempPtr, B3SOIDDsNodePrime, B3SOIDDtempNode); TSTALLOC(B3SOIDDEtempPtr, B3SOIDDeNode, B3SOIDDtempNode); TSTALLOC(B3SOIDDBtempPtr, B3SOIDDbNode, B3SOIDDtempNode); if (here->B3SOIDDbodyMod == 1) { TSTALLOC(B3SOIDDPtempPtr, B3SOIDDpNode, B3SOIDDtempNode); } } if (here->B3SOIDDbodyMod == 2) { /* Don't create any Jacobian entry for pNode */ } else if (here->B3SOIDDbodyMod == 1) { TSTALLOC(B3SOIDDBpPtr, B3SOIDDbNode, B3SOIDDpNode); TSTALLOC(B3SOIDDPbPtr, B3SOIDDpNode, B3SOIDDbNode); TSTALLOC(B3SOIDDPpPtr, B3SOIDDpNode, B3SOIDDpNode); TSTALLOC(B3SOIDDPgPtr, B3SOIDDpNode, B3SOIDDgNode); TSTALLOC(B3SOIDDPdpPtr, B3SOIDDpNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDPspPtr, B3SOIDDpNode, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDPePtr, B3SOIDDpNode, B3SOIDDeNode); } TSTALLOC(B3SOIDDEgPtr, B3SOIDDeNode, B3SOIDDgNode); TSTALLOC(B3SOIDDEdpPtr, B3SOIDDeNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDEspPtr, B3SOIDDeNode, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDGePtr, B3SOIDDgNode, B3SOIDDeNode); TSTALLOC(B3SOIDDDPePtr, B3SOIDDdNodePrime, B3SOIDDeNode); TSTALLOC(B3SOIDDSPePtr, B3SOIDDsNodePrime, B3SOIDDeNode); TSTALLOC(B3SOIDDEbPtr, B3SOIDDeNode, B3SOIDDbNode); TSTALLOC(B3SOIDDGbPtr, B3SOIDDgNode, B3SOIDDbNode); TSTALLOC(B3SOIDDDPbPtr, B3SOIDDdNodePrime, B3SOIDDbNode); TSTALLOC(B3SOIDDSPbPtr, B3SOIDDsNodePrime, B3SOIDDbNode); TSTALLOC(B3SOIDDBePtr, B3SOIDDbNode, B3SOIDDeNode); TSTALLOC(B3SOIDDBgPtr, B3SOIDDbNode, B3SOIDDgNode); TSTALLOC(B3SOIDDBdpPtr, B3SOIDDbNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDBspPtr, B3SOIDDbNode, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDBbPtr, B3SOIDDbNode, B3SOIDDbNode); TSTALLOC(B3SOIDDEePtr, B3SOIDDeNode, B3SOIDDeNode); TSTALLOC(B3SOIDDGgPtr, B3SOIDDgNode, B3SOIDDgNode); TSTALLOC(B3SOIDDGdpPtr, B3SOIDDgNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDGspPtr, B3SOIDDgNode, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDDPgPtr, B3SOIDDdNodePrime, B3SOIDDgNode); TSTALLOC(B3SOIDDDPdpPtr, B3SOIDDdNodePrime, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDDPspPtr, B3SOIDDdNodePrime, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDDPdPtr, B3SOIDDdNodePrime, B3SOIDDdNode); TSTALLOC(B3SOIDDSPgPtr, B3SOIDDsNodePrime, B3SOIDDgNode); TSTALLOC(B3SOIDDSPdpPtr, B3SOIDDsNodePrime, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDSPspPtr, B3SOIDDsNodePrime, B3SOIDDsNodePrime); TSTALLOC(B3SOIDDSPsPtr, B3SOIDDsNodePrime, B3SOIDDsNode); TSTALLOC(B3SOIDDDdPtr, B3SOIDDdNode, B3SOIDDdNode); TSTALLOC(B3SOIDDDdpPtr, B3SOIDDdNode, B3SOIDDdNodePrime); TSTALLOC(B3SOIDDSsPtr, B3SOIDDsNode, B3SOIDDsNode); TSTALLOC(B3SOIDDSspPtr, B3SOIDDsNode, B3SOIDDsNodePrime); /* here for debugging purpose only */ if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1)) { TSTALLOC(B3SOIDDVbsPtr, B3SOIDDvbsNode, B3SOIDDvbsNode) ; TSTALLOC(B3SOIDDIdsPtr, B3SOIDDidsNode, B3SOIDDidsNode); TSTALLOC(B3SOIDDIcPtr, B3SOIDDicNode, B3SOIDDicNode); TSTALLOC(B3SOIDDIbsPtr, B3SOIDDibsNode, B3SOIDDibsNode); TSTALLOC(B3SOIDDIbdPtr, B3SOIDDibdNode, B3SOIDDibdNode); TSTALLOC(B3SOIDDIiiPtr, B3SOIDDiiiNode, B3SOIDDiiiNode); TSTALLOC(B3SOIDDIgidlPtr, B3SOIDDigidlNode, B3SOIDDigidlNode); TSTALLOC(B3SOIDDItunPtr, B3SOIDDitunNode, B3SOIDDitunNode); TSTALLOC(B3SOIDDIbpPtr, B3SOIDDibpNode, B3SOIDDibpNode); TSTALLOC(B3SOIDDAbeffPtr, B3SOIDDabeffNode, B3SOIDDabeffNode); TSTALLOC(B3SOIDDVbs0effPtr, B3SOIDDvbs0effNode, B3SOIDDvbs0effNode); TSTALLOC(B3SOIDDVbseffPtr, B3SOIDDvbseffNode, B3SOIDDvbseffNode); TSTALLOC(B3SOIDDXcPtr, B3SOIDDxcNode, B3SOIDDxcNode); TSTALLOC(B3SOIDDCbbPtr, B3SOIDDcbbNode, B3SOIDDcbbNode); TSTALLOC(B3SOIDDCbdPtr, B3SOIDDcbdNode, B3SOIDDcbdNode); TSTALLOC(B3SOIDDCbgPtr, B3SOIDDcbgNode, B3SOIDDcbgNode); TSTALLOC(B3SOIDDqbPtr, B3SOIDDqbNode, B3SOIDDqbNode); TSTALLOC(B3SOIDDQbfPtr, B3SOIDDqbfNode, B3SOIDDqbfNode); TSTALLOC(B3SOIDDQjsPtr, B3SOIDDqjsNode, B3SOIDDqjsNode); TSTALLOC(B3SOIDDQjdPtr, B3SOIDDqjdNode, B3SOIDDqjdNode); /* clean up last */ TSTALLOC(B3SOIDDGmPtr, B3SOIDDgmNode, B3SOIDDgmNode); TSTALLOC(B3SOIDDGmbsPtr, B3SOIDDgmbsNode, B3SOIDDgmbsNode); TSTALLOC(B3SOIDDGdsPtr, B3SOIDDgdsNode, B3SOIDDgdsNode); TSTALLOC(B3SOIDDGmePtr, B3SOIDDgmeNode, B3SOIDDgmeNode); TSTALLOC(B3SOIDDVbs0teffPtr, B3SOIDDvbs0teffNode, B3SOIDDvbs0teffNode); TSTALLOC(B3SOIDDVthPtr, B3SOIDDvthNode, B3SOIDDvthNode); TSTALLOC(B3SOIDDVgsteffPtr, B3SOIDDvgsteffNode, B3SOIDDvgsteffNode); TSTALLOC(B3SOIDDXcsatPtr, B3SOIDDxcsatNode, B3SOIDDxcsatNode); TSTALLOC(B3SOIDDVcscvPtr, B3SOIDDvcscvNode, B3SOIDDvcscvNode); TSTALLOC(B3SOIDDVdscvPtr, B3SOIDDvdscvNode, B3SOIDDvdscvNode); TSTALLOC(B3SOIDDCbePtr, B3SOIDDcbeNode, B3SOIDDcbeNode); TSTALLOC(B3SOIDDDum1Ptr, B3SOIDDdum1Node, B3SOIDDdum1Node); TSTALLOC(B3SOIDDDum2Ptr, B3SOIDDdum2Node, B3SOIDDdum2Node); TSTALLOC(B3SOIDDDum3Ptr, B3SOIDDdum3Node, B3SOIDDdum3Node); TSTALLOC(B3SOIDDDum4Ptr, B3SOIDDdum4Node, B3SOIDDdum4Node); TSTALLOC(B3SOIDDDum5Ptr, B3SOIDDdum5Node, B3SOIDDdum5Node); TSTALLOC(B3SOIDDQaccPtr, B3SOIDDqaccNode, B3SOIDDqaccNode); TSTALLOC(B3SOIDDQsub0Ptr, B3SOIDDqsub0Node, B3SOIDDqsub0Node); TSTALLOC(B3SOIDDQsubs1Ptr, B3SOIDDqsubs1Node, B3SOIDDqsubs1Node); TSTALLOC(B3SOIDDQsubs2Ptr, B3SOIDDqsubs2Node, B3SOIDDqsubs2Node); TSTALLOC(B3SOIDDqePtr, B3SOIDDqeNode, B3SOIDDqeNode); TSTALLOC(B3SOIDDqdPtr, B3SOIDDqdNode, B3SOIDDqdNode); TSTALLOC(B3SOIDDqgPtr, B3SOIDDqgNode, B3SOIDDqgNode); } } } return(OK); } int B3SOIDDunsetup(GENmodel *inModel, CKTcircuit *ckt) { B3SOIDDmodel *model; B3SOIDDinstance *here; for (model = (B3SOIDDmodel *)inModel; model != NULL; model = model->B3SOIDDnextModel) { for (here = model->B3SOIDDinstances; here != NULL; here=here->B3SOIDDnextInstance) { if (here->B3SOIDDdNodePrime && here->B3SOIDDdNodePrime != here->B3SOIDDdNode) { CKTdltNNum(ckt, here->B3SOIDDdNodePrime); here->B3SOIDDdNodePrime = 0; } if (here->B3SOIDDsNodePrime && here->B3SOIDDsNodePrime != here->B3SOIDDsNode) { CKTdltNNum(ckt, here->B3SOIDDsNodePrime); here->B3SOIDDsNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soidditf.h0000644000265600020320000000040012264261473022630 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soidditf.h **********/ #ifndef DEV_B3SOIDD #define DEV_B3SOIDD #include "b3soiddext.h" SPICEdev *get_b3soidd_info (void); #endif ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddinit.c0000644000265600020320000000420612264261473023014 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "b3soidditf.h" #include "b3soiddinit.h" SPICEdev B3SOIDDinfo = { { "B3SOIDD", "Berkeley SOI MOSFET (DD) model version 2.1", &B3SOIDDnSize, &B3SOIDDnSize, B3SOIDDnames, &B3SOIDDpTSize, B3SOIDDpTable, &B3SOIDDmPTSize, B3SOIDDmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ B3SOIDDparam, /* DEVmodParam */ B3SOIDDmParam, /* DEVload */ B3SOIDDload, /* DEVsetup */ B3SOIDDsetup, /* DEVunsetup */ B3SOIDDunsetup, /* DEVpzSetup */ B3SOIDDsetup, /* DEVtemperature*/ B3SOIDDtemp, /* DEVtrunc */ B3SOIDDtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ B3SOIDDacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ B3SOIDDdestroy, /* DEVmodDelete */ B3SOIDDmDelete, /* DEVdelete */ B3SOIDDdelete, /* DEVsetic */ B3SOIDDgetic, /* DEVask */ B3SOIDDask, /* DEVmodAsk */ B3SOIDDmAsk, /* DEVpzLoad */ B3SOIDDpzLoad, /* DEVconvTest */ B3SOIDDconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ B3SOIDDnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &B3SOIDDiSize, /* DEVmodSize */ &B3SOIDDmSize }; SPICEdev * get_b3soidd_info (void) { return &B3SOIDDinfo; } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soidddel.c0000644000265600020320000000207012264261473022612 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soidddel.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B3SOIDDdelete(GENmodel *inModel, IFuid name, GENinstance **inInst) { B3SOIDDinstance **fast = (B3SOIDDinstance**)inInst; B3SOIDDmodel *model = (B3SOIDDmodel*)inModel; B3SOIDDinstance **prev = NULL; B3SOIDDinstance *here; for (; model ; model = model->B3SOIDDnextModel) { prev = &(model->B3SOIDDinstances); for (here = *prev; here ; here = *prev) { if (here->B3SOIDDname == name || (fast && here==*fast)) { *prev= here->B3SOIDDnextInstance; FREE(here); return(OK); } prev = &(here->B3SOIDDnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddmpar.c0000644000265600020320000016053712264261473023022 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Wei Jin 99/9/27 File: b3soiddmpar.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "b3soidddef.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDmParam(int param, IFvalue *value, GENmodel *inMod) { B3SOIDDmodel *mod = (B3SOIDDmodel*)inMod; switch(param) { case B3SOIDD_MOD_MOBMOD : mod->B3SOIDDmobMod = value->iValue; mod->B3SOIDDmobModGiven = TRUE; break; case B3SOIDD_MOD_BINUNIT : mod->B3SOIDDbinUnit = value->iValue; mod->B3SOIDDbinUnitGiven = TRUE; break; case B3SOIDD_MOD_PARAMCHK : mod->B3SOIDDparamChk = value->iValue; mod->B3SOIDDparamChkGiven = TRUE; break; case B3SOIDD_MOD_CAPMOD : mod->B3SOIDDcapMod = value->iValue; mod->B3SOIDDcapModGiven = TRUE; break; case B3SOIDD_MOD_SHMOD : mod->B3SOIDDshMod = value->iValue; mod->B3SOIDDshModGiven = TRUE; break; case B3SOIDD_MOD_NOIMOD : mod->B3SOIDDnoiMod = value->iValue; mod->B3SOIDDnoiModGiven = TRUE; break; case B3SOIDD_MOD_VERSION : mod->B3SOIDDversion = value->rValue; mod->B3SOIDDversionGiven = TRUE; break; case B3SOIDD_MOD_TOX : mod->B3SOIDDtox = value->rValue; mod->B3SOIDDtoxGiven = TRUE; break; case B3SOIDD_MOD_CDSC : mod->B3SOIDDcdsc = value->rValue; mod->B3SOIDDcdscGiven = TRUE; break; case B3SOIDD_MOD_CDSCB : mod->B3SOIDDcdscb = value->rValue; mod->B3SOIDDcdscbGiven = TRUE; break; case B3SOIDD_MOD_CDSCD : mod->B3SOIDDcdscd = value->rValue; mod->B3SOIDDcdscdGiven = TRUE; break; case B3SOIDD_MOD_CIT : mod->B3SOIDDcit = value->rValue; mod->B3SOIDDcitGiven = TRUE; break; case B3SOIDD_MOD_NFACTOR : mod->B3SOIDDnfactor = value->rValue; mod->B3SOIDDnfactorGiven = TRUE; break; case B3SOIDD_MOD_VSAT: mod->B3SOIDDvsat = value->rValue; mod->B3SOIDDvsatGiven = TRUE; break; case B3SOIDD_MOD_A0: mod->B3SOIDDa0 = value->rValue; mod->B3SOIDDa0Given = TRUE; break; case B3SOIDD_MOD_AGS: mod->B3SOIDDags= value->rValue; mod->B3SOIDDagsGiven = TRUE; break; case B3SOIDD_MOD_A1: mod->B3SOIDDa1 = value->rValue; mod->B3SOIDDa1Given = TRUE; break; case B3SOIDD_MOD_A2: mod->B3SOIDDa2 = value->rValue; mod->B3SOIDDa2Given = TRUE; break; case B3SOIDD_MOD_AT: mod->B3SOIDDat = value->rValue; mod->B3SOIDDatGiven = TRUE; break; case B3SOIDD_MOD_KETA: mod->B3SOIDDketa = value->rValue; mod->B3SOIDDketaGiven = TRUE; break; case B3SOIDD_MOD_NSUB: mod->B3SOIDDnsub = value->rValue; mod->B3SOIDDnsubGiven = TRUE; break; case B3SOIDD_MOD_NPEAK: mod->B3SOIDDnpeak = value->rValue; mod->B3SOIDDnpeakGiven = TRUE; if (mod->B3SOIDDnpeak > 1.0e20) mod->B3SOIDDnpeak *= 1.0e-6; break; case B3SOIDD_MOD_NGATE: mod->B3SOIDDngate = value->rValue; mod->B3SOIDDngateGiven = TRUE; if (mod->B3SOIDDngate > 1.0e23) mod->B3SOIDDngate *= 1.0e-6; break; case B3SOIDD_MOD_GAMMA1: mod->B3SOIDDgamma1 = value->rValue; mod->B3SOIDDgamma1Given = TRUE; break; case B3SOIDD_MOD_GAMMA2: mod->B3SOIDDgamma2 = value->rValue; mod->B3SOIDDgamma2Given = TRUE; break; case B3SOIDD_MOD_VBX: mod->B3SOIDDvbx = value->rValue; mod->B3SOIDDvbxGiven = TRUE; break; case B3SOIDD_MOD_VBM: mod->B3SOIDDvbm = value->rValue; mod->B3SOIDDvbmGiven = TRUE; break; case B3SOIDD_MOD_XT: mod->B3SOIDDxt = value->rValue; mod->B3SOIDDxtGiven = TRUE; break; case B3SOIDD_MOD_K1: mod->B3SOIDDk1 = value->rValue; mod->B3SOIDDk1Given = TRUE; break; case B3SOIDD_MOD_KT1: mod->B3SOIDDkt1 = value->rValue; mod->B3SOIDDkt1Given = TRUE; break; case B3SOIDD_MOD_KT1L: mod->B3SOIDDkt1l = value->rValue; mod->B3SOIDDkt1lGiven = TRUE; break; case B3SOIDD_MOD_KT2: mod->B3SOIDDkt2 = value->rValue; mod->B3SOIDDkt2Given = TRUE; break; case B3SOIDD_MOD_K2: mod->B3SOIDDk2 = value->rValue; mod->B3SOIDDk2Given = TRUE; break; case B3SOIDD_MOD_K3: mod->B3SOIDDk3 = value->rValue; mod->B3SOIDDk3Given = TRUE; break; case B3SOIDD_MOD_K3B: mod->B3SOIDDk3b = value->rValue; mod->B3SOIDDk3bGiven = TRUE; break; case B3SOIDD_MOD_NLX: mod->B3SOIDDnlx = value->rValue; mod->B3SOIDDnlxGiven = TRUE; break; case B3SOIDD_MOD_W0: mod->B3SOIDDw0 = value->rValue; mod->B3SOIDDw0Given = TRUE; break; case B3SOIDD_MOD_DVT0: mod->B3SOIDDdvt0 = value->rValue; mod->B3SOIDDdvt0Given = TRUE; break; case B3SOIDD_MOD_DVT1: mod->B3SOIDDdvt1 = value->rValue; mod->B3SOIDDdvt1Given = TRUE; break; case B3SOIDD_MOD_DVT2: mod->B3SOIDDdvt2 = value->rValue; mod->B3SOIDDdvt2Given = TRUE; break; case B3SOIDD_MOD_DVT0W: mod->B3SOIDDdvt0w = value->rValue; mod->B3SOIDDdvt0wGiven = TRUE; break; case B3SOIDD_MOD_DVT1W: mod->B3SOIDDdvt1w = value->rValue; mod->B3SOIDDdvt1wGiven = TRUE; break; case B3SOIDD_MOD_DVT2W: mod->B3SOIDDdvt2w = value->rValue; mod->B3SOIDDdvt2wGiven = TRUE; break; case B3SOIDD_MOD_DROUT: mod->B3SOIDDdrout = value->rValue; mod->B3SOIDDdroutGiven = TRUE; break; case B3SOIDD_MOD_DSUB: mod->B3SOIDDdsub = value->rValue; mod->B3SOIDDdsubGiven = TRUE; break; case B3SOIDD_MOD_VTH0: mod->B3SOIDDvth0 = value->rValue; mod->B3SOIDDvth0Given = TRUE; break; case B3SOIDD_MOD_UA: mod->B3SOIDDua = value->rValue; mod->B3SOIDDuaGiven = TRUE; break; case B3SOIDD_MOD_UA1: mod->B3SOIDDua1 = value->rValue; mod->B3SOIDDua1Given = TRUE; break; case B3SOIDD_MOD_UB: mod->B3SOIDDub = value->rValue; mod->B3SOIDDubGiven = TRUE; break; case B3SOIDD_MOD_UB1: mod->B3SOIDDub1 = value->rValue; mod->B3SOIDDub1Given = TRUE; break; case B3SOIDD_MOD_UC: mod->B3SOIDDuc = value->rValue; mod->B3SOIDDucGiven = TRUE; break; case B3SOIDD_MOD_UC1: mod->B3SOIDDuc1 = value->rValue; mod->B3SOIDDuc1Given = TRUE; break; case B3SOIDD_MOD_U0 : mod->B3SOIDDu0 = value->rValue; mod->B3SOIDDu0Given = TRUE; break; case B3SOIDD_MOD_UTE : mod->B3SOIDDute = value->rValue; mod->B3SOIDDuteGiven = TRUE; break; case B3SOIDD_MOD_VOFF: mod->B3SOIDDvoff = value->rValue; mod->B3SOIDDvoffGiven = TRUE; break; case B3SOIDD_MOD_DELTA : mod->B3SOIDDdelta = value->rValue; mod->B3SOIDDdeltaGiven = TRUE; break; case B3SOIDD_MOD_RDSW: mod->B3SOIDDrdsw = value->rValue; mod->B3SOIDDrdswGiven = TRUE; break; case B3SOIDD_MOD_PRWG: mod->B3SOIDDprwg = value->rValue; mod->B3SOIDDprwgGiven = TRUE; break; case B3SOIDD_MOD_PRWB: mod->B3SOIDDprwb = value->rValue; mod->B3SOIDDprwbGiven = TRUE; break; case B3SOIDD_MOD_PRT: mod->B3SOIDDprt = value->rValue; mod->B3SOIDDprtGiven = TRUE; break; case B3SOIDD_MOD_ETA0: mod->B3SOIDDeta0 = value->rValue; mod->B3SOIDDeta0Given = TRUE; break; case B3SOIDD_MOD_ETAB: mod->B3SOIDDetab = value->rValue; mod->B3SOIDDetabGiven = TRUE; break; case B3SOIDD_MOD_PCLM: mod->B3SOIDDpclm = value->rValue; mod->B3SOIDDpclmGiven = TRUE; break; case B3SOIDD_MOD_PDIBL1: mod->B3SOIDDpdibl1 = value->rValue; mod->B3SOIDDpdibl1Given = TRUE; break; case B3SOIDD_MOD_PDIBL2: mod->B3SOIDDpdibl2 = value->rValue; mod->B3SOIDDpdibl2Given = TRUE; break; case B3SOIDD_MOD_PDIBLB: mod->B3SOIDDpdiblb = value->rValue; mod->B3SOIDDpdiblbGiven = TRUE; break; case B3SOIDD_MOD_PVAG: mod->B3SOIDDpvag = value->rValue; mod->B3SOIDDpvagGiven = TRUE; break; case B3SOIDD_MOD_WR : mod->B3SOIDDwr = value->rValue; mod->B3SOIDDwrGiven = TRUE; break; case B3SOIDD_MOD_DWG : mod->B3SOIDDdwg = value->rValue; mod->B3SOIDDdwgGiven = TRUE; break; case B3SOIDD_MOD_DWB : mod->B3SOIDDdwb = value->rValue; mod->B3SOIDDdwbGiven = TRUE; break; case B3SOIDD_MOD_B0 : mod->B3SOIDDb0 = value->rValue; mod->B3SOIDDb0Given = TRUE; break; case B3SOIDD_MOD_B1 : mod->B3SOIDDb1 = value->rValue; mod->B3SOIDDb1Given = TRUE; break; case B3SOIDD_MOD_ALPHA0 : mod->B3SOIDDalpha0 = value->rValue; mod->B3SOIDDalpha0Given = TRUE; break; case B3SOIDD_MOD_ALPHA1 : mod->B3SOIDDalpha1 = value->rValue; mod->B3SOIDDalpha1Given = TRUE; break; case B3SOIDD_MOD_BETA0 : mod->B3SOIDDbeta0 = value->rValue; mod->B3SOIDDbeta0Given = TRUE; break; case B3SOIDD_MOD_CGSL : mod->B3SOIDDcgsl = value->rValue; mod->B3SOIDDcgslGiven = TRUE; break; case B3SOIDD_MOD_CGDL : mod->B3SOIDDcgdl = value->rValue; mod->B3SOIDDcgdlGiven = TRUE; break; case B3SOIDD_MOD_CKAPPA : mod->B3SOIDDckappa = value->rValue; mod->B3SOIDDckappaGiven = TRUE; break; case B3SOIDD_MOD_CF : mod->B3SOIDDcf = value->rValue; mod->B3SOIDDcfGiven = TRUE; break; case B3SOIDD_MOD_CLC : mod->B3SOIDDclc = value->rValue; mod->B3SOIDDclcGiven = TRUE; break; case B3SOIDD_MOD_CLE : mod->B3SOIDDcle = value->rValue; mod->B3SOIDDcleGiven = TRUE; break; case B3SOIDD_MOD_DWC : mod->B3SOIDDdwc = value->rValue; mod->B3SOIDDdwcGiven = TRUE; break; case B3SOIDD_MOD_DLC : mod->B3SOIDDdlc = value->rValue; mod->B3SOIDDdlcGiven = TRUE; break; case B3SOIDD_MOD_TBOX : mod->B3SOIDDtbox = value->rValue; mod->B3SOIDDtboxGiven = TRUE; break; case B3SOIDD_MOD_TSI : mod->B3SOIDDtsi = value->rValue; mod->B3SOIDDtsiGiven = TRUE; break; case B3SOIDD_MOD_XJ : mod->B3SOIDDxj = value->rValue; mod->B3SOIDDxjGiven = TRUE; break; case B3SOIDD_MOD_KB1 : mod->B3SOIDDkb1 = value->rValue; mod->B3SOIDDkb1Given = TRUE; break; case B3SOIDD_MOD_KB3 : mod->B3SOIDDkb3 = value->rValue; mod->B3SOIDDkb3Given = TRUE; break; case B3SOIDD_MOD_DVBD0 : mod->B3SOIDDdvbd0 = value->rValue; mod->B3SOIDDdvbd0Given = TRUE; break; case B3SOIDD_MOD_DVBD1 : mod->B3SOIDDdvbd1 = value->rValue; mod->B3SOIDDdvbd1Given = TRUE; break; case B3SOIDD_MOD_DELP : mod->B3SOIDDdelp = value->rValue; mod->B3SOIDDdelpGiven = TRUE; break; case B3SOIDD_MOD_VBSA : mod->B3SOIDDvbsa = value->rValue; mod->B3SOIDDvbsaGiven = TRUE; break; case B3SOIDD_MOD_RBODY : mod->B3SOIDDrbody = value->rValue; mod->B3SOIDDrbodyGiven = TRUE; break; case B3SOIDD_MOD_RBSH : mod->B3SOIDDrbsh = value->rValue; mod->B3SOIDDrbshGiven = TRUE; break; case B3SOIDD_MOD_ADICE0 : mod->B3SOIDDadice0 = value->rValue; mod->B3SOIDDadice0Given = TRUE; break; case B3SOIDD_MOD_ABP : mod->B3SOIDDabp = value->rValue; mod->B3SOIDDabpGiven = TRUE; break; case B3SOIDD_MOD_MXC : mod->B3SOIDDmxc = value->rValue; mod->B3SOIDDmxcGiven = TRUE; break; case B3SOIDD_MOD_RTH0 : mod->B3SOIDDrth0 = value->rValue; mod->B3SOIDDrth0Given = TRUE; break; case B3SOIDD_MOD_CTH0 : mod->B3SOIDDcth0 = value->rValue; mod->B3SOIDDcth0Given = TRUE; break; case B3SOIDD_MOD_AII : mod->B3SOIDDaii = value->rValue; mod->B3SOIDDaiiGiven = TRUE; break; case B3SOIDD_MOD_BII : mod->B3SOIDDbii = value->rValue; mod->B3SOIDDbiiGiven = TRUE; break; case B3SOIDD_MOD_CII : mod->B3SOIDDcii = value->rValue; mod->B3SOIDDciiGiven = TRUE; break; case B3SOIDD_MOD_DII : mod->B3SOIDDdii = value->rValue; mod->B3SOIDDdiiGiven = TRUE; break; case B3SOIDD_MOD_NGIDL : mod->B3SOIDDngidl = value->rValue; mod->B3SOIDDngidlGiven = TRUE; break; case B3SOIDD_MOD_AGIDL : mod->B3SOIDDagidl = value->rValue; mod->B3SOIDDagidlGiven = TRUE; break; case B3SOIDD_MOD_BGIDL : mod->B3SOIDDbgidl = value->rValue; mod->B3SOIDDbgidlGiven = TRUE; break; case B3SOIDD_MOD_NDIODE : mod->B3SOIDDndiode = value->rValue; mod->B3SOIDDndiodeGiven = TRUE; break; case B3SOIDD_MOD_NTUN : mod->B3SOIDDntun = value->rValue; mod->B3SOIDDntunGiven = TRUE; break; case B3SOIDD_MOD_ISBJT : mod->B3SOIDDisbjt = value->rValue; mod->B3SOIDDisbjtGiven = TRUE; break; case B3SOIDD_MOD_ISDIF : mod->B3SOIDDisdif = value->rValue; mod->B3SOIDDisdifGiven = TRUE; break; case B3SOIDD_MOD_ISREC : mod->B3SOIDDisrec = value->rValue; mod->B3SOIDDisrecGiven = TRUE; break; case B3SOIDD_MOD_ISTUN : mod->B3SOIDDistun = value->rValue; mod->B3SOIDDistunGiven = TRUE; break; case B3SOIDD_MOD_XBJT : mod->B3SOIDDxbjt = value->rValue; mod->B3SOIDDxbjtGiven = TRUE; break; case B3SOIDD_MOD_XREC : mod->B3SOIDDxrec = value->rValue; mod->B3SOIDDxrecGiven = TRUE; break; case B3SOIDD_MOD_XTUN : mod->B3SOIDDxtun = value->rValue; mod->B3SOIDDxtunGiven = TRUE; break; case B3SOIDD_MOD_EDL : mod->B3SOIDDedl = value->rValue; mod->B3SOIDDedlGiven = TRUE; break; case B3SOIDD_MOD_KBJT1 : mod->B3SOIDDkbjt1 = value->rValue; mod->B3SOIDDkbjt1Given = TRUE; break; case B3SOIDD_MOD_TT : mod->B3SOIDDtt = value->rValue; mod->B3SOIDDttGiven = TRUE; break; case B3SOIDD_MOD_VSDTH : mod->B3SOIDDvsdth = value->rValue; mod->B3SOIDDvsdthGiven = TRUE; break; case B3SOIDD_MOD_VSDFB : mod->B3SOIDDvsdfb = value->rValue; mod->B3SOIDDvsdfbGiven = TRUE; break; case B3SOIDD_MOD_CSDMIN : mod->B3SOIDDcsdmin = value->rValue; mod->B3SOIDDcsdminGiven = TRUE; break; case B3SOIDD_MOD_ASD : mod->B3SOIDDasd = value->rValue; mod->B3SOIDDasdGiven = TRUE; break; case B3SOIDD_MOD_TNOM : mod->B3SOIDDtnom = value->rValue + 273.15; mod->B3SOIDDtnomGiven = TRUE; break; case B3SOIDD_MOD_CGSO : mod->B3SOIDDcgso = value->rValue; mod->B3SOIDDcgsoGiven = TRUE; break; case B3SOIDD_MOD_CGDO : mod->B3SOIDDcgdo = value->rValue; mod->B3SOIDDcgdoGiven = TRUE; break; case B3SOIDD_MOD_CGEO : mod->B3SOIDDcgeo = value->rValue; mod->B3SOIDDcgeoGiven = TRUE; break; case B3SOIDD_MOD_XPART : mod->B3SOIDDxpart = value->rValue; mod->B3SOIDDxpartGiven = TRUE; break; case B3SOIDD_MOD_RSH : mod->B3SOIDDsheetResistance = value->rValue; mod->B3SOIDDsheetResistanceGiven = TRUE; break; case B3SOIDD_MOD_PBSWG : mod->B3SOIDDGatesidewallJctPotential = value->rValue; mod->B3SOIDDGatesidewallJctPotentialGiven = TRUE; break; case B3SOIDD_MOD_MJSWG : mod->B3SOIDDbodyJctGateSideGradingCoeff = value->rValue; mod->B3SOIDDbodyJctGateSideGradingCoeffGiven = TRUE; break; case B3SOIDD_MOD_CJSWG : mod->B3SOIDDunitLengthGateSidewallJctCap = value->rValue; mod->B3SOIDDunitLengthGateSidewallJctCapGiven = TRUE; break; case B3SOIDD_MOD_CSDESW : mod->B3SOIDDcsdesw = value->rValue; mod->B3SOIDDcsdeswGiven = TRUE; break; case B3SOIDD_MOD_LINT : mod->B3SOIDDLint = value->rValue; mod->B3SOIDDLintGiven = TRUE; break; case B3SOIDD_MOD_LL : mod->B3SOIDDLl = value->rValue; mod->B3SOIDDLlGiven = TRUE; break; case B3SOIDD_MOD_LLN : mod->B3SOIDDLln = value->rValue; mod->B3SOIDDLlnGiven = TRUE; break; case B3SOIDD_MOD_LW : mod->B3SOIDDLw = value->rValue; mod->B3SOIDDLwGiven = TRUE; break; case B3SOIDD_MOD_LWN : mod->B3SOIDDLwn = value->rValue; mod->B3SOIDDLwnGiven = TRUE; break; case B3SOIDD_MOD_LWL : mod->B3SOIDDLwl = value->rValue; mod->B3SOIDDLwlGiven = TRUE; break; case B3SOIDD_MOD_WINT : mod->B3SOIDDWint = value->rValue; mod->B3SOIDDWintGiven = TRUE; break; case B3SOIDD_MOD_WL : mod->B3SOIDDWl = value->rValue; mod->B3SOIDDWlGiven = TRUE; break; case B3SOIDD_MOD_WLN : mod->B3SOIDDWln = value->rValue; mod->B3SOIDDWlnGiven = TRUE; break; case B3SOIDD_MOD_WW : mod->B3SOIDDWw = value->rValue; mod->B3SOIDDWwGiven = TRUE; break; case B3SOIDD_MOD_WWN : mod->B3SOIDDWwn = value->rValue; mod->B3SOIDDWwnGiven = TRUE; break; case B3SOIDD_MOD_WWL : mod->B3SOIDDWwl = value->rValue; mod->B3SOIDDWwlGiven = TRUE; break; case B3SOIDD_MOD_NOIA : mod->B3SOIDDoxideTrapDensityA = value->rValue; mod->B3SOIDDoxideTrapDensityAGiven = TRUE; break; case B3SOIDD_MOD_NOIB : mod->B3SOIDDoxideTrapDensityB = value->rValue; mod->B3SOIDDoxideTrapDensityBGiven = TRUE; break; case B3SOIDD_MOD_NOIC : mod->B3SOIDDoxideTrapDensityC = value->rValue; mod->B3SOIDDoxideTrapDensityCGiven = TRUE; break; case B3SOIDD_MOD_NOIF : mod->B3SOIDDnoif = value->rValue; mod->B3SOIDDnoifGiven = TRUE; break; case B3SOIDD_MOD_EM : mod->B3SOIDDem = value->rValue; mod->B3SOIDDemGiven = TRUE; break; case B3SOIDD_MOD_EF : mod->B3SOIDDef = value->rValue; mod->B3SOIDDefGiven = TRUE; break; case B3SOIDD_MOD_AF : mod->B3SOIDDaf = value->rValue; mod->B3SOIDDafGiven = TRUE; break; case B3SOIDD_MOD_KF : mod->B3SOIDDkf = value->rValue; mod->B3SOIDDkfGiven = TRUE; break; /* Added for binning - START */ /* Length Dependence */ case B3SOIDD_MOD_LNPEAK: mod->B3SOIDDlnpeak = value->rValue; mod->B3SOIDDlnpeakGiven = TRUE; break; case B3SOIDD_MOD_LNSUB: mod->B3SOIDDlnsub = value->rValue; mod->B3SOIDDlnsubGiven = TRUE; break; case B3SOIDD_MOD_LNGATE: mod->B3SOIDDlngate = value->rValue; mod->B3SOIDDlngateGiven = TRUE; break; case B3SOIDD_MOD_LVTH0: mod->B3SOIDDlvth0 = value->rValue; mod->B3SOIDDlvth0Given = TRUE; break; case B3SOIDD_MOD_LK1: mod->B3SOIDDlk1 = value->rValue; mod->B3SOIDDlk1Given = TRUE; break; case B3SOIDD_MOD_LK2: mod->B3SOIDDlk2 = value->rValue; mod->B3SOIDDlk2Given = TRUE; break; case B3SOIDD_MOD_LK3: mod->B3SOIDDlk3 = value->rValue; mod->B3SOIDDlk3Given = TRUE; break; case B3SOIDD_MOD_LK3B: mod->B3SOIDDlk3b = value->rValue; mod->B3SOIDDlk3bGiven = TRUE; break; case B3SOIDD_MOD_LVBSA: mod->B3SOIDDlvbsa = value->rValue; mod->B3SOIDDlvbsaGiven = TRUE; break; case B3SOIDD_MOD_LDELP: mod->B3SOIDDldelp = value->rValue; mod->B3SOIDDldelpGiven = TRUE; break; case B3SOIDD_MOD_LKB1 : mod->B3SOIDDlkb1 = value->rValue; mod->B3SOIDDlkb1Given = TRUE; break; case B3SOIDD_MOD_LKB3 : mod->B3SOIDDlkb3 = value->rValue; mod->B3SOIDDlkb3Given = TRUE; break; case B3SOIDD_MOD_LDVBD0 : mod->B3SOIDDldvbd0 = value->rValue; mod->B3SOIDDldvbd0Given = TRUE; break; case B3SOIDD_MOD_LDVBD1 : mod->B3SOIDDldvbd1 = value->rValue; mod->B3SOIDDldvbd1Given = TRUE; break; case B3SOIDD_MOD_LW0: mod->B3SOIDDlw0 = value->rValue; mod->B3SOIDDlw0Given = TRUE; break; case B3SOIDD_MOD_LNLX: mod->B3SOIDDlnlx = value->rValue; mod->B3SOIDDlnlxGiven = TRUE; break; case B3SOIDD_MOD_LDVT0: mod->B3SOIDDldvt0 = value->rValue; mod->B3SOIDDldvt0Given = TRUE; break; case B3SOIDD_MOD_LDVT1: mod->B3SOIDDldvt1 = value->rValue; mod->B3SOIDDldvt1Given = TRUE; break; case B3SOIDD_MOD_LDVT2: mod->B3SOIDDldvt2 = value->rValue; mod->B3SOIDDldvt2Given = TRUE; break; case B3SOIDD_MOD_LDVT0W: mod->B3SOIDDldvt0w = value->rValue; mod->B3SOIDDldvt0wGiven = TRUE; break; case B3SOIDD_MOD_LDVT1W: mod->B3SOIDDldvt1w = value->rValue; mod->B3SOIDDldvt1wGiven = TRUE; break; case B3SOIDD_MOD_LDVT2W: mod->B3SOIDDldvt2w = value->rValue; mod->B3SOIDDldvt2wGiven = TRUE; break; case B3SOIDD_MOD_LU0 : mod->B3SOIDDlu0 = value->rValue; mod->B3SOIDDlu0Given = TRUE; break; case B3SOIDD_MOD_LUA: mod->B3SOIDDlua = value->rValue; mod->B3SOIDDluaGiven = TRUE; break; case B3SOIDD_MOD_LUB: mod->B3SOIDDlub = value->rValue; mod->B3SOIDDlubGiven = TRUE; break; case B3SOIDD_MOD_LUC: mod->B3SOIDDluc = value->rValue; mod->B3SOIDDlucGiven = TRUE; break; case B3SOIDD_MOD_LVSAT: mod->B3SOIDDlvsat = value->rValue; mod->B3SOIDDlvsatGiven = TRUE; break; case B3SOIDD_MOD_LA0: mod->B3SOIDDla0 = value->rValue; mod->B3SOIDDla0Given = TRUE; break; case B3SOIDD_MOD_LAGS: mod->B3SOIDDlags= value->rValue; mod->B3SOIDDlagsGiven = TRUE; break; case B3SOIDD_MOD_LB0 : mod->B3SOIDDlb0 = value->rValue; mod->B3SOIDDlb0Given = TRUE; break; case B3SOIDD_MOD_LB1 : mod->B3SOIDDlb1 = value->rValue; mod->B3SOIDDlb1Given = TRUE; break; case B3SOIDD_MOD_LKETA: mod->B3SOIDDlketa = value->rValue; mod->B3SOIDDlketaGiven = TRUE; break; case B3SOIDD_MOD_LABP: mod->B3SOIDDlabp = value->rValue; mod->B3SOIDDlabpGiven = TRUE; break; case B3SOIDD_MOD_LMXC: mod->B3SOIDDlmxc = value->rValue; mod->B3SOIDDlmxcGiven = TRUE; break; case B3SOIDD_MOD_LADICE0: mod->B3SOIDDladice0 = value->rValue; mod->B3SOIDDladice0Given = TRUE; break; case B3SOIDD_MOD_LA1: mod->B3SOIDDla1 = value->rValue; mod->B3SOIDDla1Given = TRUE; break; case B3SOIDD_MOD_LA2: mod->B3SOIDDla2 = value->rValue; mod->B3SOIDDla2Given = TRUE; break; case B3SOIDD_MOD_LRDSW: mod->B3SOIDDlrdsw = value->rValue; mod->B3SOIDDlrdswGiven = TRUE; break; case B3SOIDD_MOD_LPRWB: mod->B3SOIDDlprwb = value->rValue; mod->B3SOIDDlprwbGiven = TRUE; break; case B3SOIDD_MOD_LPRWG: mod->B3SOIDDlprwg = value->rValue; mod->B3SOIDDlprwgGiven = TRUE; break; case B3SOIDD_MOD_LWR : mod->B3SOIDDlwr = value->rValue; mod->B3SOIDDlwrGiven = TRUE; break; case B3SOIDD_MOD_LNFACTOR : mod->B3SOIDDlnfactor = value->rValue; mod->B3SOIDDlnfactorGiven = TRUE; break; case B3SOIDD_MOD_LDWG : mod->B3SOIDDldwg = value->rValue; mod->B3SOIDDldwgGiven = TRUE; break; case B3SOIDD_MOD_LDWB : mod->B3SOIDDldwb = value->rValue; mod->B3SOIDDldwbGiven = TRUE; break; case B3SOIDD_MOD_LVOFF: mod->B3SOIDDlvoff = value->rValue; mod->B3SOIDDlvoffGiven = TRUE; break; case B3SOIDD_MOD_LETA0: mod->B3SOIDDleta0 = value->rValue; mod->B3SOIDDleta0Given = TRUE; break; case B3SOIDD_MOD_LETAB: mod->B3SOIDDletab = value->rValue; mod->B3SOIDDletabGiven = TRUE; break; case B3SOIDD_MOD_LDSUB: mod->B3SOIDDldsub = value->rValue; mod->B3SOIDDldsubGiven = TRUE; break; case B3SOIDD_MOD_LCIT : mod->B3SOIDDlcit = value->rValue; mod->B3SOIDDlcitGiven = TRUE; break; case B3SOIDD_MOD_LCDSC : mod->B3SOIDDlcdsc = value->rValue; mod->B3SOIDDlcdscGiven = TRUE; break; case B3SOIDD_MOD_LCDSCB : mod->B3SOIDDlcdscb = value->rValue; mod->B3SOIDDlcdscbGiven = TRUE; break; case B3SOIDD_MOD_LCDSCD : mod->B3SOIDDlcdscd = value->rValue; mod->B3SOIDDlcdscdGiven = TRUE; break; case B3SOIDD_MOD_LPCLM: mod->B3SOIDDlpclm = value->rValue; mod->B3SOIDDlpclmGiven = TRUE; break; case B3SOIDD_MOD_LPDIBL1: mod->B3SOIDDlpdibl1 = value->rValue; mod->B3SOIDDlpdibl1Given = TRUE; break; case B3SOIDD_MOD_LPDIBL2: mod->B3SOIDDlpdibl2 = value->rValue; mod->B3SOIDDlpdibl2Given = TRUE; break; case B3SOIDD_MOD_LPDIBLB: mod->B3SOIDDlpdiblb = value->rValue; mod->B3SOIDDlpdiblbGiven = TRUE; break; case B3SOIDD_MOD_LDROUT: mod->B3SOIDDldrout = value->rValue; mod->B3SOIDDldroutGiven = TRUE; break; case B3SOIDD_MOD_LPVAG: mod->B3SOIDDlpvag = value->rValue; mod->B3SOIDDlpvagGiven = TRUE; break; case B3SOIDD_MOD_LDELTA : mod->B3SOIDDldelta = value->rValue; mod->B3SOIDDldeltaGiven = TRUE; break; case B3SOIDD_MOD_LAII : mod->B3SOIDDlaii = value->rValue; mod->B3SOIDDlaiiGiven = TRUE; break; case B3SOIDD_MOD_LBII : mod->B3SOIDDlbii = value->rValue; mod->B3SOIDDlbiiGiven = TRUE; break; case B3SOIDD_MOD_LCII : mod->B3SOIDDlcii = value->rValue; mod->B3SOIDDlciiGiven = TRUE; break; case B3SOIDD_MOD_LDII : mod->B3SOIDDldii = value->rValue; mod->B3SOIDDldiiGiven = TRUE; break; case B3SOIDD_MOD_LALPHA0 : mod->B3SOIDDlalpha0 = value->rValue; mod->B3SOIDDlalpha0Given = TRUE; break; case B3SOIDD_MOD_LALPHA1 : mod->B3SOIDDlalpha1 = value->rValue; mod->B3SOIDDlalpha1Given = TRUE; break; case B3SOIDD_MOD_LBETA0 : mod->B3SOIDDlbeta0 = value->rValue; mod->B3SOIDDlbeta0Given = TRUE; break; case B3SOIDD_MOD_LAGIDL : mod->B3SOIDDlagidl = value->rValue; mod->B3SOIDDlagidlGiven = TRUE; break; case B3SOIDD_MOD_LBGIDL : mod->B3SOIDDlbgidl = value->rValue; mod->B3SOIDDlbgidlGiven = TRUE; break; case B3SOIDD_MOD_LNGIDL : mod->B3SOIDDlngidl = value->rValue; mod->B3SOIDDlngidlGiven = TRUE; break; case B3SOIDD_MOD_LNTUN : mod->B3SOIDDlntun = value->rValue; mod->B3SOIDDlntunGiven = TRUE; break; case B3SOIDD_MOD_LNDIODE : mod->B3SOIDDlndiode = value->rValue; mod->B3SOIDDlndiodeGiven = TRUE; break; case B3SOIDD_MOD_LISBJT : mod->B3SOIDDlisbjt = value->rValue; mod->B3SOIDDlisbjtGiven = TRUE; break; case B3SOIDD_MOD_LISDIF : mod->B3SOIDDlisdif = value->rValue; mod->B3SOIDDlisdifGiven = TRUE; break; case B3SOIDD_MOD_LISREC : mod->B3SOIDDlisrec = value->rValue; mod->B3SOIDDlisrecGiven = TRUE; break; case B3SOIDD_MOD_LISTUN : mod->B3SOIDDlistun = value->rValue; mod->B3SOIDDlistunGiven = TRUE; break; case B3SOIDD_MOD_LEDL : mod->B3SOIDDledl = value->rValue; mod->B3SOIDDledlGiven = TRUE; break; case B3SOIDD_MOD_LKBJT1 : mod->B3SOIDDlkbjt1 = value->rValue; mod->B3SOIDDlkbjt1Given = TRUE; break; /* CV Model */ case B3SOIDD_MOD_LVSDFB : mod->B3SOIDDlvsdfb = value->rValue; mod->B3SOIDDlvsdfbGiven = TRUE; break; case B3SOIDD_MOD_LVSDTH : mod->B3SOIDDlvsdth = value->rValue; mod->B3SOIDDlvsdthGiven = TRUE; break; /* Width Dependence */ case B3SOIDD_MOD_WNPEAK: mod->B3SOIDDwnpeak = value->rValue; mod->B3SOIDDwnpeakGiven = TRUE; break; case B3SOIDD_MOD_WNSUB: mod->B3SOIDDwnsub = value->rValue; mod->B3SOIDDwnsubGiven = TRUE; break; case B3SOIDD_MOD_WNGATE: mod->B3SOIDDwngate = value->rValue; mod->B3SOIDDwngateGiven = TRUE; break; case B3SOIDD_MOD_WVTH0: mod->B3SOIDDwvth0 = value->rValue; mod->B3SOIDDwvth0Given = TRUE; break; case B3SOIDD_MOD_WK1: mod->B3SOIDDwk1 = value->rValue; mod->B3SOIDDwk1Given = TRUE; break; case B3SOIDD_MOD_WK2: mod->B3SOIDDwk2 = value->rValue; mod->B3SOIDDwk2Given = TRUE; break; case B3SOIDD_MOD_WK3: mod->B3SOIDDwk3 = value->rValue; mod->B3SOIDDwk3Given = TRUE; break; case B3SOIDD_MOD_WK3B: mod->B3SOIDDwk3b = value->rValue; mod->B3SOIDDwk3bGiven = TRUE; break; case B3SOIDD_MOD_WVBSA: mod->B3SOIDDwvbsa = value->rValue; mod->B3SOIDDwvbsaGiven = TRUE; break; case B3SOIDD_MOD_WDELP: mod->B3SOIDDwdelp = value->rValue; mod->B3SOIDDwdelpGiven = TRUE; break; case B3SOIDD_MOD_WKB1 : mod->B3SOIDDwkb1 = value->rValue; mod->B3SOIDDwkb1Given = TRUE; break; case B3SOIDD_MOD_WKB3 : mod->B3SOIDDwkb3 = value->rValue; mod->B3SOIDDwkb3Given = TRUE; break; case B3SOIDD_MOD_WDVBD0 : mod->B3SOIDDwdvbd0 = value->rValue; mod->B3SOIDDwdvbd0Given = TRUE; break; case B3SOIDD_MOD_WDVBD1 : mod->B3SOIDDwdvbd1 = value->rValue; mod->B3SOIDDwdvbd1Given = TRUE; break; case B3SOIDD_MOD_WW0: mod->B3SOIDDww0 = value->rValue; mod->B3SOIDDww0Given = TRUE; break; case B3SOIDD_MOD_WNLX: mod->B3SOIDDwnlx = value->rValue; mod->B3SOIDDwnlxGiven = TRUE; break; case B3SOIDD_MOD_WDVT0: mod->B3SOIDDwdvt0 = value->rValue; mod->B3SOIDDwdvt0Given = TRUE; break; case B3SOIDD_MOD_WDVT1: mod->B3SOIDDwdvt1 = value->rValue; mod->B3SOIDDwdvt1Given = TRUE; break; case B3SOIDD_MOD_WDVT2: mod->B3SOIDDwdvt2 = value->rValue; mod->B3SOIDDwdvt2Given = TRUE; break; case B3SOIDD_MOD_WDVT0W: mod->B3SOIDDwdvt0w = value->rValue; mod->B3SOIDDwdvt0wGiven = TRUE; break; case B3SOIDD_MOD_WDVT1W: mod->B3SOIDDwdvt1w = value->rValue; mod->B3SOIDDwdvt1wGiven = TRUE; break; case B3SOIDD_MOD_WDVT2W: mod->B3SOIDDwdvt2w = value->rValue; mod->B3SOIDDwdvt2wGiven = TRUE; break; case B3SOIDD_MOD_WU0 : mod->B3SOIDDwu0 = value->rValue; mod->B3SOIDDwu0Given = TRUE; break; case B3SOIDD_MOD_WUA: mod->B3SOIDDwua = value->rValue; mod->B3SOIDDwuaGiven = TRUE; break; case B3SOIDD_MOD_WUB: mod->B3SOIDDwub = value->rValue; mod->B3SOIDDwubGiven = TRUE; break; case B3SOIDD_MOD_WUC: mod->B3SOIDDwuc = value->rValue; mod->B3SOIDDwucGiven = TRUE; break; case B3SOIDD_MOD_WVSAT: mod->B3SOIDDwvsat = value->rValue; mod->B3SOIDDwvsatGiven = TRUE; break; case B3SOIDD_MOD_WA0: mod->B3SOIDDwa0 = value->rValue; mod->B3SOIDDwa0Given = TRUE; break; case B3SOIDD_MOD_WAGS: mod->B3SOIDDwags= value->rValue; mod->B3SOIDDwagsGiven = TRUE; break; case B3SOIDD_MOD_WB0 : mod->B3SOIDDwb0 = value->rValue; mod->B3SOIDDwb0Given = TRUE; break; case B3SOIDD_MOD_WB1 : mod->B3SOIDDwb1 = value->rValue; mod->B3SOIDDwb1Given = TRUE; break; case B3SOIDD_MOD_WKETA: mod->B3SOIDDwketa = value->rValue; mod->B3SOIDDwketaGiven = TRUE; break; case B3SOIDD_MOD_WABP: mod->B3SOIDDwabp = value->rValue; mod->B3SOIDDwabpGiven = TRUE; break; case B3SOIDD_MOD_WMXC: mod->B3SOIDDwmxc = value->rValue; mod->B3SOIDDwmxcGiven = TRUE; break; case B3SOIDD_MOD_WADICE0: mod->B3SOIDDwadice0 = value->rValue; mod->B3SOIDDwadice0Given = TRUE; break; case B3SOIDD_MOD_WA1: mod->B3SOIDDwa1 = value->rValue; mod->B3SOIDDwa1Given = TRUE; break; case B3SOIDD_MOD_WA2: mod->B3SOIDDwa2 = value->rValue; mod->B3SOIDDwa2Given = TRUE; break; case B3SOIDD_MOD_WRDSW: mod->B3SOIDDwrdsw = value->rValue; mod->B3SOIDDwrdswGiven = TRUE; break; case B3SOIDD_MOD_WPRWB: mod->B3SOIDDwprwb = value->rValue; mod->B3SOIDDwprwbGiven = TRUE; break; case B3SOIDD_MOD_WPRWG: mod->B3SOIDDwprwg = value->rValue; mod->B3SOIDDwprwgGiven = TRUE; break; case B3SOIDD_MOD_WWR : mod->B3SOIDDwwr = value->rValue; mod->B3SOIDDwwrGiven = TRUE; break; case B3SOIDD_MOD_WNFACTOR : mod->B3SOIDDwnfactor = value->rValue; mod->B3SOIDDwnfactorGiven = TRUE; break; case B3SOIDD_MOD_WDWG : mod->B3SOIDDwdwg = value->rValue; mod->B3SOIDDwdwgGiven = TRUE; break; case B3SOIDD_MOD_WDWB : mod->B3SOIDDwdwb = value->rValue; mod->B3SOIDDwdwbGiven = TRUE; break; case B3SOIDD_MOD_WVOFF: mod->B3SOIDDwvoff = value->rValue; mod->B3SOIDDwvoffGiven = TRUE; break; case B3SOIDD_MOD_WETA0: mod->B3SOIDDweta0 = value->rValue; mod->B3SOIDDweta0Given = TRUE; break; case B3SOIDD_MOD_WETAB: mod->B3SOIDDwetab = value->rValue; mod->B3SOIDDwetabGiven = TRUE; break; case B3SOIDD_MOD_WDSUB: mod->B3SOIDDwdsub = value->rValue; mod->B3SOIDDwdsubGiven = TRUE; break; case B3SOIDD_MOD_WCIT : mod->B3SOIDDwcit = value->rValue; mod->B3SOIDDwcitGiven = TRUE; break; case B3SOIDD_MOD_WCDSC : mod->B3SOIDDwcdsc = value->rValue; mod->B3SOIDDwcdscGiven = TRUE; break; case B3SOIDD_MOD_WCDSCB : mod->B3SOIDDwcdscb = value->rValue; mod->B3SOIDDwcdscbGiven = TRUE; break; case B3SOIDD_MOD_WCDSCD : mod->B3SOIDDwcdscd = value->rValue; mod->B3SOIDDwcdscdGiven = TRUE; break; case B3SOIDD_MOD_WPCLM: mod->B3SOIDDwpclm = value->rValue; mod->B3SOIDDwpclmGiven = TRUE; break; case B3SOIDD_MOD_WPDIBL1: mod->B3SOIDDwpdibl1 = value->rValue; mod->B3SOIDDwpdibl1Given = TRUE; break; case B3SOIDD_MOD_WPDIBL2: mod->B3SOIDDwpdibl2 = value->rValue; mod->B3SOIDDwpdibl2Given = TRUE; break; case B3SOIDD_MOD_WPDIBLB: mod->B3SOIDDwpdiblb = value->rValue; mod->B3SOIDDwpdiblbGiven = TRUE; break; case B3SOIDD_MOD_WDROUT: mod->B3SOIDDwdrout = value->rValue; mod->B3SOIDDwdroutGiven = TRUE; break; case B3SOIDD_MOD_WPVAG: mod->B3SOIDDwpvag = value->rValue; mod->B3SOIDDwpvagGiven = TRUE; break; case B3SOIDD_MOD_WDELTA : mod->B3SOIDDwdelta = value->rValue; mod->B3SOIDDwdeltaGiven = TRUE; break; case B3SOIDD_MOD_WAII : mod->B3SOIDDwaii = value->rValue; mod->B3SOIDDwaiiGiven = TRUE; break; case B3SOIDD_MOD_WBII : mod->B3SOIDDwbii = value->rValue; mod->B3SOIDDwbiiGiven = TRUE; break; case B3SOIDD_MOD_WCII : mod->B3SOIDDwcii = value->rValue; mod->B3SOIDDwciiGiven = TRUE; break; case B3SOIDD_MOD_WDII : mod->B3SOIDDwdii = value->rValue; mod->B3SOIDDwdiiGiven = TRUE; break; case B3SOIDD_MOD_WALPHA0 : mod->B3SOIDDwalpha0 = value->rValue; mod->B3SOIDDwalpha0Given = TRUE; break; case B3SOIDD_MOD_WALPHA1 : mod->B3SOIDDwalpha1 = value->rValue; mod->B3SOIDDwalpha1Given = TRUE; break; case B3SOIDD_MOD_WBETA0 : mod->B3SOIDDwbeta0 = value->rValue; mod->B3SOIDDwbeta0Given = TRUE; break; case B3SOIDD_MOD_WAGIDL : mod->B3SOIDDwagidl = value->rValue; mod->B3SOIDDwagidlGiven = TRUE; break; case B3SOIDD_MOD_WBGIDL : mod->B3SOIDDwbgidl = value->rValue; mod->B3SOIDDwbgidlGiven = TRUE; break; case B3SOIDD_MOD_WNGIDL : mod->B3SOIDDwngidl = value->rValue; mod->B3SOIDDwngidlGiven = TRUE; break; case B3SOIDD_MOD_WNTUN : mod->B3SOIDDwntun = value->rValue; mod->B3SOIDDwntunGiven = TRUE; break; case B3SOIDD_MOD_WNDIODE : mod->B3SOIDDwndiode = value->rValue; mod->B3SOIDDwndiodeGiven = TRUE; break; case B3SOIDD_MOD_WISBJT : mod->B3SOIDDwisbjt = value->rValue; mod->B3SOIDDwisbjtGiven = TRUE; break; case B3SOIDD_MOD_WISDIF : mod->B3SOIDDwisdif = value->rValue; mod->B3SOIDDwisdifGiven = TRUE; break; case B3SOIDD_MOD_WISREC : mod->B3SOIDDwisrec = value->rValue; mod->B3SOIDDwisrecGiven = TRUE; break; case B3SOIDD_MOD_WISTUN : mod->B3SOIDDwistun = value->rValue; mod->B3SOIDDwistunGiven = TRUE; break; case B3SOIDD_MOD_WEDL : mod->B3SOIDDwedl = value->rValue; mod->B3SOIDDwedlGiven = TRUE; break; case B3SOIDD_MOD_WKBJT1 : mod->B3SOIDDwkbjt1 = value->rValue; mod->B3SOIDDwkbjt1Given = TRUE; break; /* CV Model */ case B3SOIDD_MOD_WVSDFB : mod->B3SOIDDwvsdfb = value->rValue; mod->B3SOIDDwvsdfbGiven = TRUE; break; case B3SOIDD_MOD_WVSDTH : mod->B3SOIDDwvsdth = value->rValue; mod->B3SOIDDwvsdthGiven = TRUE; break; /* Cross-term Dependence */ case B3SOIDD_MOD_PNPEAK: mod->B3SOIDDpnpeak = value->rValue; mod->B3SOIDDpnpeakGiven = TRUE; break; case B3SOIDD_MOD_PNSUB: mod->B3SOIDDpnsub = value->rValue; mod->B3SOIDDpnsubGiven = TRUE; break; case B3SOIDD_MOD_PNGATE: mod->B3SOIDDpngate = value->rValue; mod->B3SOIDDpngateGiven = TRUE; break; case B3SOIDD_MOD_PVTH0: mod->B3SOIDDpvth0 = value->rValue; mod->B3SOIDDpvth0Given = TRUE; break; case B3SOIDD_MOD_PK1: mod->B3SOIDDpk1 = value->rValue; mod->B3SOIDDpk1Given = TRUE; break; case B3SOIDD_MOD_PK2: mod->B3SOIDDpk2 = value->rValue; mod->B3SOIDDpk2Given = TRUE; break; case B3SOIDD_MOD_PK3: mod->B3SOIDDpk3 = value->rValue; mod->B3SOIDDpk3Given = TRUE; break; case B3SOIDD_MOD_PK3B: mod->B3SOIDDpk3b = value->rValue; mod->B3SOIDDpk3bGiven = TRUE; break; case B3SOIDD_MOD_PVBSA: mod->B3SOIDDpvbsa = value->rValue; mod->B3SOIDDpvbsaGiven = TRUE; break; case B3SOIDD_MOD_PDELP: mod->B3SOIDDpdelp = value->rValue; mod->B3SOIDDpdelpGiven = TRUE; break; case B3SOIDD_MOD_PKB1 : mod->B3SOIDDpkb1 = value->rValue; mod->B3SOIDDpkb1Given = TRUE; break; case B3SOIDD_MOD_PKB3 : mod->B3SOIDDpkb3 = value->rValue; mod->B3SOIDDpkb3Given = TRUE; break; case B3SOIDD_MOD_PDVBD0 : mod->B3SOIDDpdvbd0 = value->rValue; mod->B3SOIDDpdvbd0Given = TRUE; break; case B3SOIDD_MOD_PDVBD1 : mod->B3SOIDDpdvbd1 = value->rValue; mod->B3SOIDDpdvbd1Given = TRUE; break; case B3SOIDD_MOD_PW0: mod->B3SOIDDpw0 = value->rValue; mod->B3SOIDDpw0Given = TRUE; break; case B3SOIDD_MOD_PNLX: mod->B3SOIDDpnlx = value->rValue; mod->B3SOIDDpnlxGiven = TRUE; break; case B3SOIDD_MOD_PDVT0: mod->B3SOIDDpdvt0 = value->rValue; mod->B3SOIDDpdvt0Given = TRUE; break; case B3SOIDD_MOD_PDVT1: mod->B3SOIDDpdvt1 = value->rValue; mod->B3SOIDDpdvt1Given = TRUE; break; case B3SOIDD_MOD_PDVT2: mod->B3SOIDDpdvt2 = value->rValue; mod->B3SOIDDpdvt2Given = TRUE; break; case B3SOIDD_MOD_PDVT0W: mod->B3SOIDDpdvt0w = value->rValue; mod->B3SOIDDpdvt0wGiven = TRUE; break; case B3SOIDD_MOD_PDVT1W: mod->B3SOIDDpdvt1w = value->rValue; mod->B3SOIDDpdvt1wGiven = TRUE; break; case B3SOIDD_MOD_PDVT2W: mod->B3SOIDDpdvt2w = value->rValue; mod->B3SOIDDpdvt2wGiven = TRUE; break; case B3SOIDD_MOD_PU0 : mod->B3SOIDDpu0 = value->rValue; mod->B3SOIDDpu0Given = TRUE; break; case B3SOIDD_MOD_PUA: mod->B3SOIDDpua = value->rValue; mod->B3SOIDDpuaGiven = TRUE; break; case B3SOIDD_MOD_PUB: mod->B3SOIDDpub = value->rValue; mod->B3SOIDDpubGiven = TRUE; break; case B3SOIDD_MOD_PUC: mod->B3SOIDDpuc = value->rValue; mod->B3SOIDDpucGiven = TRUE; break; case B3SOIDD_MOD_PVSAT: mod->B3SOIDDpvsat = value->rValue; mod->B3SOIDDpvsatGiven = TRUE; break; case B3SOIDD_MOD_PA0: mod->B3SOIDDpa0 = value->rValue; mod->B3SOIDDpa0Given = TRUE; break; case B3SOIDD_MOD_PAGS: mod->B3SOIDDpags= value->rValue; mod->B3SOIDDpagsGiven = TRUE; break; case B3SOIDD_MOD_PB0 : mod->B3SOIDDpb0 = value->rValue; mod->B3SOIDDpb0Given = TRUE; break; case B3SOIDD_MOD_PB1 : mod->B3SOIDDpb1 = value->rValue; mod->B3SOIDDpb1Given = TRUE; break; case B3SOIDD_MOD_PKETA: mod->B3SOIDDpketa = value->rValue; mod->B3SOIDDpketaGiven = TRUE; break; case B3SOIDD_MOD_PABP: mod->B3SOIDDpabp = value->rValue; mod->B3SOIDDpabpGiven = TRUE; break; case B3SOIDD_MOD_PMXC: mod->B3SOIDDpmxc = value->rValue; mod->B3SOIDDpmxcGiven = TRUE; break; case B3SOIDD_MOD_PADICE0: mod->B3SOIDDpadice0 = value->rValue; mod->B3SOIDDpadice0Given = TRUE; break; case B3SOIDD_MOD_PA1: mod->B3SOIDDpa1 = value->rValue; mod->B3SOIDDpa1Given = TRUE; break; case B3SOIDD_MOD_PA2: mod->B3SOIDDpa2 = value->rValue; mod->B3SOIDDpa2Given = TRUE; break; case B3SOIDD_MOD_PRDSW: mod->B3SOIDDprdsw = value->rValue; mod->B3SOIDDprdswGiven = TRUE; break; case B3SOIDD_MOD_PPRWB: mod->B3SOIDDpprwb = value->rValue; mod->B3SOIDDpprwbGiven = TRUE; break; case B3SOIDD_MOD_PPRWG: mod->B3SOIDDpprwg = value->rValue; mod->B3SOIDDpprwgGiven = TRUE; break; case B3SOIDD_MOD_PWR : mod->B3SOIDDpwr = value->rValue; mod->B3SOIDDpwrGiven = TRUE; break; case B3SOIDD_MOD_PNFACTOR : mod->B3SOIDDpnfactor = value->rValue; mod->B3SOIDDpnfactorGiven = TRUE; break; case B3SOIDD_MOD_PDWG : mod->B3SOIDDpdwg = value->rValue; mod->B3SOIDDpdwgGiven = TRUE; break; case B3SOIDD_MOD_PDWB : mod->B3SOIDDpdwb = value->rValue; mod->B3SOIDDpdwbGiven = TRUE; break; case B3SOIDD_MOD_PVOFF: mod->B3SOIDDpvoff = value->rValue; mod->B3SOIDDpvoffGiven = TRUE; break; case B3SOIDD_MOD_PETA0: mod->B3SOIDDpeta0 = value->rValue; mod->B3SOIDDpeta0Given = TRUE; break; case B3SOIDD_MOD_PETAB: mod->B3SOIDDpetab = value->rValue; mod->B3SOIDDpetabGiven = TRUE; break; case B3SOIDD_MOD_PDSUB: mod->B3SOIDDpdsub = value->rValue; mod->B3SOIDDpdsubGiven = TRUE; break; case B3SOIDD_MOD_PCIT : mod->B3SOIDDpcit = value->rValue; mod->B3SOIDDpcitGiven = TRUE; break; case B3SOIDD_MOD_PCDSC : mod->B3SOIDDpcdsc = value->rValue; mod->B3SOIDDpcdscGiven = TRUE; break; case B3SOIDD_MOD_PCDSCB : mod->B3SOIDDpcdscb = value->rValue; mod->B3SOIDDpcdscbGiven = TRUE; break; case B3SOIDD_MOD_PCDSCD : mod->B3SOIDDpcdscd = value->rValue; mod->B3SOIDDpcdscdGiven = TRUE; break; case B3SOIDD_MOD_PPCLM: mod->B3SOIDDppclm = value->rValue; mod->B3SOIDDppclmGiven = TRUE; break; case B3SOIDD_MOD_PPDIBL1: mod->B3SOIDDppdibl1 = value->rValue; mod->B3SOIDDppdibl1Given = TRUE; break; case B3SOIDD_MOD_PPDIBL2: mod->B3SOIDDppdibl2 = value->rValue; mod->B3SOIDDppdibl2Given = TRUE; break; case B3SOIDD_MOD_PPDIBLB: mod->B3SOIDDppdiblb = value->rValue; mod->B3SOIDDppdiblbGiven = TRUE; break; case B3SOIDD_MOD_PDROUT: mod->B3SOIDDpdrout = value->rValue; mod->B3SOIDDpdroutGiven = TRUE; break; case B3SOIDD_MOD_PPVAG: mod->B3SOIDDppvag = value->rValue; mod->B3SOIDDppvagGiven = TRUE; break; case B3SOIDD_MOD_PDELTA : mod->B3SOIDDpdelta = value->rValue; mod->B3SOIDDpdeltaGiven = TRUE; break; case B3SOIDD_MOD_PAII : mod->B3SOIDDpaii = value->rValue; mod->B3SOIDDpaiiGiven = TRUE; break; case B3SOIDD_MOD_PBII : mod->B3SOIDDpbii = value->rValue; mod->B3SOIDDpbiiGiven = TRUE; break; case B3SOIDD_MOD_PCII : mod->B3SOIDDpcii = value->rValue; mod->B3SOIDDpciiGiven = TRUE; break; case B3SOIDD_MOD_PDII : mod->B3SOIDDpdii = value->rValue; mod->B3SOIDDpdiiGiven = TRUE; break; case B3SOIDD_MOD_PALPHA0 : mod->B3SOIDDpalpha0 = value->rValue; mod->B3SOIDDpalpha0Given = TRUE; break; case B3SOIDD_MOD_PALPHA1 : mod->B3SOIDDpalpha1 = value->rValue; mod->B3SOIDDpalpha1Given = TRUE; break; case B3SOIDD_MOD_PBETA0 : mod->B3SOIDDpbeta0 = value->rValue; mod->B3SOIDDpbeta0Given = TRUE; break; case B3SOIDD_MOD_PAGIDL : mod->B3SOIDDpagidl = value->rValue; mod->B3SOIDDpagidlGiven = TRUE; break; case B3SOIDD_MOD_PBGIDL : mod->B3SOIDDpbgidl = value->rValue; mod->B3SOIDDpbgidlGiven = TRUE; break; case B3SOIDD_MOD_PNGIDL : mod->B3SOIDDpngidl = value->rValue; mod->B3SOIDDpngidlGiven = TRUE; break; case B3SOIDD_MOD_PNTUN : mod->B3SOIDDpntun = value->rValue; mod->B3SOIDDpntunGiven = TRUE; break; case B3SOIDD_MOD_PNDIODE : mod->B3SOIDDpndiode = value->rValue; mod->B3SOIDDpndiodeGiven = TRUE; break; case B3SOIDD_MOD_PISBJT : mod->B3SOIDDpisbjt = value->rValue; mod->B3SOIDDpisbjtGiven = TRUE; break; case B3SOIDD_MOD_PISDIF : mod->B3SOIDDpisdif = value->rValue; mod->B3SOIDDpisdifGiven = TRUE; break; case B3SOIDD_MOD_PISREC : mod->B3SOIDDpisrec = value->rValue; mod->B3SOIDDpisrecGiven = TRUE; break; case B3SOIDD_MOD_PISTUN : mod->B3SOIDDpistun = value->rValue; mod->B3SOIDDpistunGiven = TRUE; break; case B3SOIDD_MOD_PEDL : mod->B3SOIDDpedl = value->rValue; mod->B3SOIDDpedlGiven = TRUE; break; case B3SOIDD_MOD_PKBJT1 : mod->B3SOIDDpkbjt1 = value->rValue; mod->B3SOIDDpkbjt1Given = TRUE; break; /* CV Model */ case B3SOIDD_MOD_PVSDFB : mod->B3SOIDDpvsdfb = value->rValue; mod->B3SOIDDpvsdfbGiven = TRUE; break; case B3SOIDD_MOD_PVSDTH : mod->B3SOIDDpvsdth = value->rValue; mod->B3SOIDDpvsdthGiven = TRUE; break; /* Added for binning - END */ case B3SOIDD_MOD_NMOS : if(value->iValue) { mod->B3SOIDDtype = 1; mod->B3SOIDDtypeGiven = TRUE; } break; case B3SOIDD_MOD_PMOS : if(value->iValue) { mod->B3SOIDDtype = - 1; mod->B3SOIDDtypeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_dd/b3soiddpar.c0000644000265600020320000001037012264261473022632 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soiddpar.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMDD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "b3soidddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIDDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { B3SOIDDinstance *here = (B3SOIDDinstance*)inst; NG_IGNORE(select); switch(param) { case B3SOIDD_W: here->B3SOIDDw = value->rValue; here->B3SOIDDwGiven = TRUE; break; case B3SOIDD_L: here->B3SOIDDl = value->rValue; here->B3SOIDDlGiven = TRUE; break; case B3SOIDD_M: here->B3SOIDDm = value->rValue; here->B3SOIDDmGiven = TRUE; break; case B3SOIDD_AS: here->B3SOIDDsourceArea = value->rValue; here->B3SOIDDsourceAreaGiven = TRUE; break; case B3SOIDD_AD: here->B3SOIDDdrainArea = value->rValue; here->B3SOIDDdrainAreaGiven = TRUE; break; case B3SOIDD_PS: here->B3SOIDDsourcePerimeter = value->rValue; here->B3SOIDDsourcePerimeterGiven = TRUE; break; case B3SOIDD_PD: here->B3SOIDDdrainPerimeter = value->rValue; here->B3SOIDDdrainPerimeterGiven = TRUE; break; case B3SOIDD_NRS: here->B3SOIDDsourceSquares = value->rValue; here->B3SOIDDsourceSquaresGiven = TRUE; break; case B3SOIDD_NRD: here->B3SOIDDdrainSquares = value->rValue; here->B3SOIDDdrainSquaresGiven = TRUE; break; case B3SOIDD_OFF: here->B3SOIDDoff = value->iValue; break; case B3SOIDD_IC_VBS: here->B3SOIDDicVBS = value->rValue; here->B3SOIDDicVBSGiven = TRUE; break; case B3SOIDD_IC_VDS: here->B3SOIDDicVDS = value->rValue; here->B3SOIDDicVDSGiven = TRUE; break; case B3SOIDD_IC_VGS: here->B3SOIDDicVGS = value->rValue; here->B3SOIDDicVGSGiven = TRUE; break; case B3SOIDD_IC_VES: here->B3SOIDDicVES = value->rValue; here->B3SOIDDicVESGiven = TRUE; break; case B3SOIDD_IC_VPS: here->B3SOIDDicVPS = value->rValue; here->B3SOIDDicVPSGiven = TRUE; break; case B3SOIDD_BJTOFF: here->B3SOIDDbjtoff = value->iValue; here->B3SOIDDbjtoffGiven= TRUE; break; case B3SOIDD_DEBUG: here->B3SOIDDdebugMod = value->iValue; here->B3SOIDDdebugModGiven= TRUE; break; case B3SOIDD_RTH0: here->B3SOIDDrth0= value->rValue; here->B3SOIDDrth0Given = TRUE; break; case B3SOIDD_CTH0: here->B3SOIDDcth0= value->rValue; here->B3SOIDDcth0Given = TRUE; break; case B3SOIDD_NRB: here->B3SOIDDbodySquares = value->rValue; here->B3SOIDDbodySquaresGiven = TRUE; break; case B3SOIDD_IC: switch(value->v.numValue){ case 5: here->B3SOIDDicVPS = *(value->v.vec.rVec+4); here->B3SOIDDicVPSGiven = TRUE; case 4: here->B3SOIDDicVES = *(value->v.vec.rVec+3); here->B3SOIDDicVESGiven = TRUE; case 3: here->B3SOIDDicVBS = *(value->v.vec.rVec+2); here->B3SOIDDicVBSGiven = TRUE; case 2: here->B3SOIDDicVGS = *(value->v.vec.rVec+1); here->B3SOIDDicVGSGiven = TRUE; case 1: here->B3SOIDDicVDS = *(value->v.vec.rVec); here->B3SOIDDicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cktinit.c0000644000265600020320000000761712264261473020060 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modifed: 2000 AlansFixes **********/ #include "ngspice/config.h" #include "ngspice/memory.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "dev.h" #ifdef XSPICE /* gtri - add - wbk - 11/26/90 - add include for MIF global data */ #include "ngspice/mif.h" /* gtri - end - wbk - 11/26/90 */ #endif int CKTinit(CKTcircuit **ckt) /* new circuit to create */ { int i; CKTcircuit *sckt = TMALLOC(CKTcircuit, 1); *ckt = sckt; if (sckt == NULL) return(E_NOMEM); /* gtri - begin - dynamically allocate the array of model lists */ /* CKThead used to be statically sized in CKTdefs.h, but has been changed */ /* to a ** pointer */ sckt->CKThead = TMALLOC(GENmodel *, DEVmaxnum); if(sckt->CKThead == NULL) return(E_NOMEM); /* gtri - end - dynamically allocate the array of model lists */ for (i = 0; i < DEVmaxnum; i++) sckt->CKThead[i] = NULL; sckt->CKTmaxEqNum = 1; sckt->CKTnodes = NULL; sckt->CKTlastNode = NULL; sckt->CKTmatrix = NULL; sckt->CKTgmin = 1e-12; sckt->CKTgshunt=0; sckt->CKTabstol = 1e-12; sckt->CKTreltol = 1e-3; sckt->CKTchgtol = 1e-14; sckt->CKTvoltTol = 1e-6; sckt->CKTtrtol = 7; sckt->CKTbypass = 0; sckt->CKTisSetup = 0; #ifdef XSPICE sckt->CKTadevFlag = 0; /* flag indicates A devices in the circuit */ #endif sckt->CKTtranMaxIter = 10; sckt->CKTdcMaxIter = 100; sckt->CKTdcTrcvMaxIter = 50; sckt->CKTintegrateMethod = TRAPEZOIDAL; sckt->CKTorder = 1; sckt->CKTmaxOrder = 2; sckt->CKTpivotAbsTol = 1e-13; sckt->CKTpivotRelTol = 1e-3; sckt->CKTtemp = 300.15; sckt->CKTnomTemp = 300.15; sckt->CKTdefaultMosM = 1; sckt->CKTdefaultMosL = 1e-4; sckt->CKTdefaultMosW = 1e-4; sckt->CKTdefaultMosAD = 0; sckt->CKTdefaultMosAS = 0; sckt->CKTsrcFact=1; sckt->CKTdiagGmin=0; /* PN: additions for circuit inventory */ sckt->CKTstat = TMALLOC(STATistics, 1); if(sckt->CKTstat == NULL) return(E_NOMEM); sckt->CKTstat->STATdevNum = TMALLOC(STATdevList, DEVmaxnum); if(sckt->CKTstat->STATdevNum == NULL) return(E_NOMEM); sckt->CKTtroubleNode = 0; sckt->CKTtroubleElt = NULL; sckt->CKTtimePoints = NULL; if (sckt->CKTstat == NULL) return E_NOMEM; sckt->CKTnodeDamping = 0; sckt->CKTabsDv = 0.5; sckt->CKTrelDv = 2.0; sckt->CKTvarHertz = 0; sckt->DEVnameHash = nghash_init_pointer(100); sckt->MODnameHash = nghash_init_pointer(100); #ifdef XSPICE /* gtri - begin - wbk - allocate/initialize substructs */ /* Allocate evt data structure */ sckt->evt = TMALLOC(Evt_Ckt_Data_t, 1); if(! sckt->evt) return(E_NOMEM); /* Initialize options data */ sckt->evt->options.op_alternate = MIF_TRUE; /* Allocate enh data structure */ sckt->enh = TMALLOC(Enh_Ckt_Data_t, 1); if(! sckt->enh) return(E_NOMEM); /* Initialize non-zero, non-NULL data */ sckt->enh->breakpoint.current = 1.0e30; sckt->enh->breakpoint.last = 1.0e30; sckt->enh->ramp.ramptime = 0.0; sckt->enh->conv_limit.enabled = MIF_TRUE; sckt->enh->conv_limit.step = 0.25; sckt->enh->conv_limit.abs_step = 0.1; sckt->enh->rshunt_data.enabled = MIF_FALSE; /* gtri - end - wbk - allocate/initialize substructs */ /* gtri - add - wbk - 01/12/91 - initialize g_mif_info */ g_mif_info.circuit.init = MIF_TRUE; g_mif_info.circuit.anal_init = MIF_TRUE; g_mif_info.circuit.anal_type = MIF_DC; g_mif_info.instance = NULL; g_mif_info.ckt = sckt; g_mif_info.errmsg = NULL; g_mif_info.auto_partial.global = MIF_FALSE; g_mif_info.auto_partial.local = MIF_FALSE; /* gtri - end - wbk - 01/12/91 */ #endif return OK; } ngspice-26/src/spicelib/devices/mes/0000755000265600020320000000000012264261710017012 5ustar andreasadminngspice-26/src/spicelib/devices/mes/mesitf.h0000644000265600020320000000025512264261473020462 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MES #define DEV_MES SPICEdev *get_mes_info(void); #endif ngspice-26/src/spicelib/devices/mes/mespzld.c0000644000265600020320000000633712264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "ngspice/suffix.h" int MESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MESmodel *model = (MESmodel*)inModel; MESinstance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->MESnextModel ) { for( here = model->MESinstances; here != NULL; here = here->MESnextInstance) { m = here->MESm; gdpr=model->MESdrainConduct * here->MESarea; gspr=model->MESsourceConduct * here->MESarea; gm= *(ckt->CKTstate0 + here->MESgm) ; gds= *(ckt->CKTstate0 + here->MESgds) ; ggs= *(ckt->CKTstate0 + here->MESggs) ; xgs= *(ckt->CKTstate0 + here->MESqgs) ; ggd= *(ckt->CKTstate0 + here->MESggd) ; xgd= *(ckt->CKTstate0 + here->MESqgd) ; *(here->MESdrainDrainPtr ) += m * gdpr; *(here->MESgateGatePtr ) += m * ggd+ggs; *(here->MESgateGatePtr ) += m * (xgd+xgs)*s->real; *(here->MESgateGatePtr +1) += m * (xgd+xgs)*s->imag; *(here->MESsourceSourcePtr ) += m * gspr; *(here->MESdrainPrimeDrainPrimePtr ) += m * gdpr+gds+ggd; *(here->MESdrainPrimeDrainPrimePtr ) += m * xgd*s->real; *(here->MESdrainPrimeDrainPrimePtr +1) += m * xgd*s->imag; *(here->MESsourcePrimeSourcePrimePtr ) += m * gspr+gds+gm+ggs; *(here->MESsourcePrimeSourcePrimePtr ) += m * xgs*s->real; *(here->MESsourcePrimeSourcePrimePtr +1) += m * xgs*s->imag; *(here->MESdrainDrainPrimePtr ) -= m * gdpr; *(here->MESgateDrainPrimePtr ) -= m * ggd; *(here->MESgateDrainPrimePtr ) -= m * xgd*s->real; *(here->MESgateDrainPrimePtr +1) -= m * xgd*s->imag; *(here->MESgateSourcePrimePtr ) -= m * ggs; *(here->MESgateSourcePrimePtr ) -= m * xgs*s->real; *(here->MESgateSourcePrimePtr +1) -= m * xgs*s->imag; *(here->MESsourceSourcePrimePtr ) -= m * gspr; *(here->MESdrainPrimeDrainPtr ) -= m * gdpr; *(here->MESdrainPrimeGatePtr ) += m * (-ggd+gm); *(here->MESdrainPrimeGatePtr ) -= m * xgd*s->real; *(here->MESdrainPrimeGatePtr +1) -= m * xgd*s->imag; *(here->MESdrainPrimeSourcePrimePtr ) += m * (-gds-gm); *(here->MESsourcePrimeGatePtr ) += m * (-ggs-gm); *(here->MESsourcePrimeGatePtr ) -= m * xgs*s->real; *(here->MESsourcePrimeGatePtr +1) -= m * xgs*s->imag; *(here->MESsourcePrimeSourcePtr ) -= m * gspr; *(here->MESsourcePrimeDrainPrimePtr ) -= m * gds; } } return(OK); } ngspice-26/src/spicelib/devices/mes/mesdset.c0000644000265600020320000002757412264261473020647 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/distodef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESdSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { MESmodel *model = (MESmodel*)inModel; MESinstance *here; double afact; double beta; double betap; double cdrain; double cg; double cgd; double csat; double czgd; double czgs; double denom; double evgd; double evgs; double gdpr; double gspr; double invdenom; double lfact; double phib; double prod; double vcap; double vcrit; double vds; double vgd; double vgs; double vgst; double vto; double lggd1; double lggd2; double lggd3; double lggs1; double lggs2; double lggs3; Dderivs d_cdrain, d_qgs, d_qgd; Dderivs d_p, d_q, d_r, d_zero; /* loop through all the models */ for( ; model != NULL; model = model->MESnextModel ) { /* loop through all the instances of the model */ for (here = model->MESinstances; here != NULL ; here=here->MESnextInstance) { /* * dc model parameters */ beta = model->MESbeta * here->MESm * here->MESarea; gdpr = model->MESdrainConduct * here->MESm * here->MESarea; gspr = model->MESsourceConduct * here->MESm * here->MESarea; csat = model->MESgateSatCurrent * here->MESm * here->MESarea; vcrit = model->MESvcrit; vto = model->MESthreshold; /* * initialization */ /* * compute new nonlinear branch voltages */ vgs = model->MEStype* (*(ckt->CKTrhsOld+ here->MESgateNode)- *(ckt->CKTrhsOld+ here->MESsourcePrimeNode)); vgd = model->MEStype* (*(ckt->CKTrhsOld+here->MESgateNode)- *(ckt->CKTrhsOld+ here->MESdrainPrimeNode)); /* * determine dc current and derivatives */ vds = vgs-vgd; if (vgs <= -5*CONSTvt0) { lggs1 = -csat/vgs+ckt->CKTgmin; lggs2=lggs3=0; cg = lggs1*vgs; } else { evgs = exp(vgs/CONSTvt0); lggs1 = csat*evgs/CONSTvt0+ckt->CKTgmin; lggs2 = (lggs1-ckt->CKTgmin)/(CONSTvt0*2); lggs3 = lggs2/(3*CONSTvt0); cg = csat*(evgs-1)+ckt->CKTgmin*vgs; } if (vgd <= -5*CONSTvt0) { lggd1 = -csat/vgd+ckt->CKTgmin; lggd2=lggd3=0; cgd = lggd1*vgd; } else { evgd = exp(vgd/CONSTvt0); lggd1 = csat*evgd/CONSTvt0+ckt->CKTgmin; lggd2 = (lggd1-ckt->CKTgmin)/(CONSTvt0*2); lggd3 = lggd2/(3*CONSTvt0); cgd = csat*(evgd-1)+ckt->CKTgmin*vgd; } cg = cg+cgd; /* * compute drain current and derivitives for normal mode */ /* until now, we were using the real vgs, vgd, and vds */ { /* converting (temporarily) to local vgs, vgd, and vds */ double vgsreal=vgs; double vgdreal=vgd; double vdsreal=vds; Dderivs d_afact, d_lfact; Dderivs d_betap, d_denom, d_invdenom; Dderivs d_prod; Dderivs d_vgst; if (vdsreal < 0.0) { vgs = vgdreal; vgd = vgsreal; vds = -vdsreal; here->MESmode = -1; /* source-drain interchange */ } else here->MESmode = 1; d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2r = 0.0; d_p.d3_p2q = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q,&d_p); EqualDeriv(&d_r,&d_p); EqualDeriv(&d_zero,&d_p); d_q.d1_p = d_r.d1_p = d_zero.d1_p = 0.0; d_q.d1_q = d_r.d1_r = 1.0; d_p.value = vgs; d_r.value = vds; /* p =vgs; q= nothing in particular ; r = vds */ vgst = vgs-model->MESthreshold; EqualDeriv(&d_vgst,&d_p); d_vgst.value = vgst; /* * normal mode, cutoff region */ if (vgst <= 0) { cdrain = 0; EqualDeriv(&d_cdrain,&d_zero); } else { prod = 1 + model->MESlModulation * vds; TimesDeriv(&d_prod,&d_r,model->MESlModulation); d_prod.value = prod; betap = beta * prod; TimesDeriv(&d_betap,&d_prod,beta); denom = 1 + model->MESb * vgst; TimesDeriv(&d_denom,&d_vgst,model->MESb); d_denom.value = denom; invdenom = 1 / denom; InvDeriv(&d_invdenom,&d_denom); /* * normal mode, saturation region */ cdrain = betap * vgst * vgst * invdenom; MultDeriv(&d_cdrain,&d_betap,&d_vgst); MultDeriv(&d_cdrain,&d_cdrain,&d_vgst); MultDeriv(&d_cdrain,&d_cdrain,&d_invdenom); if (vds < ( 3 / model->MESalpha ) ) { /* * normal mode, linear region */ afact = 1 - model->MESalpha * vds / 3; TimesDeriv(&d_afact,&d_r,-model->MESalpha/3.0); d_afact.value = afact; lfact = 1 - afact * afact * afact; CubeDeriv(&d_lfact,&d_afact); TimesDeriv(&d_lfact,&d_lfact,-1.0); d_lfact.value += 1.0; cdrain = betap*vgst*vgst*invdenom*lfact; MultDeriv(&d_cdrain,&d_betap,&d_vgst); MultDeriv(&d_cdrain,&d_cdrain,&d_vgst); MultDeriv(&d_cdrain,&d_cdrain,&d_invdenom); MultDeriv(&d_cdrain,&d_cdrain,&d_lfact); } } /* converting back to real vgs, vgd, vds */ if (here->MESmode == -1) { vgs = vgsreal; vgd = vgdreal; vds = vdsreal; } } /* * charge storage elements */ { /* code block */ czgs = model->MEScapGS * here->MESm * here->MESarea; czgd = model->MEScapGD * here->MESm * here->MESarea; phib = model->MESgatePotential; vcap = 1 / model->MESalpha; /* * qgga = qggnew(vgs,vgd,phib,vcap,vto,czgs,czgd,&cgsna,&cgdna); */ /* function qggnew - private, used by MESload*/ { double veroot,veff1,veff2,del,vnroot,vnew1,vnew3,vmax,ext; double qroot,par1,cfact,cplus,cminus; Dderivs d_vnroot; Dderivs d_cgsnew, d_cgdnew, d_dummy, d_dummy2; Dderivs d_ext, d_qroot, d_par1, d_cfact, d_cplus, d_cminus; Dderivs d_veroot, d_veff1, d_veff2, d_vnew1, d_vnew3; /* now p=vgs, q=vgd, r= nothing */ d_q.value = vgd; d_p.value = vgs; veroot = sqrt( (vgs - vgd) * (vgs - vgd) + vcap*vcap ); TimesDeriv(&d_veroot,&d_q,-1.0); PlusDeriv(&d_veroot,&d_veroot,&d_p); MultDeriv(&d_veroot,&d_veroot,&d_veroot); d_veroot.value += vcap*vcap; SqrtDeriv(&d_veroot,&d_veroot); veff1 = 0.5 * (vgs + vgd + veroot); PlusDeriv(&d_veff1,&d_veroot,&d_p); PlusDeriv(&d_veff1,&d_veff1,&d_q); TimesDeriv(&d_veff1,&d_veff1,0.5); veff2 = veff1 - veroot; TimesDeriv(&d_veff2,&d_veroot,-1.0); PlusDeriv(&d_veff2,&d_veff2,&d_veff1); del = 0.2;/*const*/ vnroot = sqrt( (veff1 - vto)*(veff1 - vto) + del * del ); EqualDeriv(&d_vnroot,&d_veff1); d_vnroot.value -= vto; MultDeriv(&d_vnroot,&d_vnroot,&d_vnroot); d_vnroot.value += del*del; SqrtDeriv(&d_vnroot,&d_vnroot); vnew1 = 0.5 * (veff1 + vto + vnroot); PlusDeriv(&d_vnew1,&d_veff1,&d_vnroot); d_vnew1.value += vto; TimesDeriv(&d_vnew1,&d_vnew1,0.5); vnew3 = vnew1; EqualDeriv(&d_vnew3,&d_vnew1); vmax = 0.5;/*const*/ if ( vnew1 < vmax ) { ext=0; EqualDeriv(&d_ext,&d_zero); } else { vnew1 = vmax; EqualDeriv(&d_vnew1,&d_zero); d_vnew1.value = vmax; ext = (vnew3 - vmax)/sqrt(1 - vmax/phib); EqualDeriv(&d_ext,&d_vnew3); d_ext.value -= vmax; TimesDeriv(&d_ext,&d_ext,1/sqrt(1 - vmax/phib)); } qroot = sqrt(1 - vnew1/phib); TimesDeriv(&d_qroot,&d_vnew1,-1/phib); d_qroot.value += 1.0; SqrtDeriv(&d_qroot,&d_qroot); /* * qggval = czgs * (2*phib*(1-qroot) + ext) + czgd*veff2; */ par1 = 0.5 * ( 1 + (veff1-vto)/vnroot); EqualDeriv(&d_par1,&d_veff1); d_par1.value -= vto; DivDeriv(&d_par1,&d_par1,&d_vnroot); d_par1.value += 1.0; TimesDeriv(&d_par1,&d_par1,0.5); cfact = (vgs- vgd)/veroot; TimesDeriv(&d_cfact,&d_q,-1.0); PlusDeriv(&d_cfact,&d_cfact,&d_p); DivDeriv(&d_cfact,&d_cfact,&d_veroot); cplus = 0.5 * (1 + cfact); TimesDeriv(&d_cplus,&d_cfact,0.5); d_cplus.value += 0.5; cminus = cplus - cfact; TimesDeriv(&d_cminus,&d_cfact,-0.5); d_cminus.value += 0.5; /* *cgsnew = czgs/qroot*par1*cplus + czgd*cminus; *cgdnew = czgs/qroot*par1*cminus + czgd*cplus; * * assuming qgs = vgs*cgsnew * and qgd = vgd*cgsnew * * This is probably wrong but then so is the a.c. analysis * routine and everything else * */ MultDeriv(&d_dummy,&d_qroot,&d_par1); InvDeriv(&d_dummy,&d_dummy); TimesDeriv(&d_dummy,&d_dummy,czgs); TimesDeriv(&d_cgsnew,&d_cminus,czgd); MultDeriv(&d_dummy2,&d_dummy,&d_cplus); PlusDeriv(&d_cgsnew,&d_cgsnew,&d_dummy2); TimesDeriv(&d_cgdnew,&d_cplus,czgd); MultDeriv(&d_dummy2,&d_dummy,&d_cminus); PlusDeriv(&d_cgdnew,&d_cgdnew,&d_dummy2); MultDeriv(&d_qgs,&d_cgsnew,&d_p); MultDeriv(&d_qgd,&d_cgdnew,&d_q); } } if (here->MESmode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x = d_cdrain.d1_p; here->cdr_z = d_cdrain.d1_r; here->cdr_x2 = d_cdrain.d2_p2; here->cdr_z2 = d_cdrain.d2_r2; here->cdr_xz = d_cdrain.d2_pr; here->cdr_x3 = d_cdrain.d3_p3; here->cdr_z3 = d_cdrain.d3_r3;; here->cdr_x2z = d_cdrain.d3_p2r; here->cdr_xz2 = d_cdrain.d3_pr2; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x = -d_cdrain.d1_p; here->cdr_z = d_cdrain.d1_p + d_cdrain.d1_r; here->cdr_x2 = -d_cdrain.d2_p2; here->cdr_z2 = -(d_cdrain.d2_p2 + d_cdrain.d2_r2 + 2*d_cdrain.d2_pr); here->cdr_xz = d_cdrain.d2_p2 + d_cdrain.d2_pr; here->cdr_x3 = -d_cdrain.d3_p3; here->cdr_z3 = d_cdrain.d3_p3 + d_cdrain.d3_r3 + 3*(d_cdrain.d3_p2r + d_cdrain.d3_pr2 ) ; here->cdr_x2z = d_cdrain.d3_p3 + d_cdrain.d3_p2r; here->cdr_xz2 = -(d_cdrain.d3_p3 + 2*d_cdrain.d3_p2r + d_cdrain.d3_pr2); } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->MEStype*here->cdr_x2; here->cdr_z2 = 0.5*model->MEStype*here->cdr_z2; here->cdr_xz = model->MEStype*here->cdr_xz; here->cdr_x3 = here->cdr_x3/6.; here->cdr_z3 = here->cdr_z3/6.; here->cdr_x2z = 0.5*here->cdr_x2z; here->cdr_xz2 = 0.5*here->cdr_xz2; here->ggs3 = lggs3; here->ggd3 = lggd3; here->ggs2 = model->MEStype*lggs2; here->ggd2 = model->MEStype*lggd2; here->qgs_x2 = 0.5*model->MEStype*d_qgs.d2_p2; here->qgs_y2 = 0.5*model->MEStype*d_qgs.d2_q2; here->qgs_xy = model->MEStype*d_qgs.d2_pq; here->qgs_x3 = d_qgs.d3_p3/6.; here->qgs_y3 = d_qgs.d3_q3/6.; here->qgs_x2y = 0.5*d_qgs.d3_p2q; here->qgs_xy2 = 0.5*d_qgs.d3_pq2; here->qgd_x2 = 0.5*model->MEStype*d_qgd.d2_p2; here->qgd_y2 = 0.5*model->MEStype*d_qgd.d2_q2; here->qgd_xy = model->MEStype*d_qgd.d2_pq; here->qgd_x3 = d_qgd.d3_p3/6.; here->qgd_y3 = d_qgd.d3_q3/6.; here->qgd_x2y = 0.5*d_qgd.d3_p2q; here->qgd_xy2 = 0.5*d_qgd.d3_pq2; } } return(OK); } ngspice-26/src/spicelib/devices/mes/mesparam.c0000644000265600020320000000301512264261473020770 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { MESinstance *here = (MESinstance*)inst; NG_IGNORE(select); switch(param) { case MES_AREA: here->MESarea = value->rValue; here->MESareaGiven = TRUE; break; case MES_M: here->MESm = value->rValue; here->MESmGiven = TRUE; break; case MES_IC_VDS: here->MESicVDS = value->rValue; here->MESicVDSGiven = TRUE; break; case MES_IC_VGS: here->MESicVGS = value->rValue; here->MESicVGSGiven = TRUE; break; case MES_OFF: here->MESoff = value->iValue; break; case MES_IC: switch(value->v.numValue) { case 2: here->MESicVGS = *(value->v.vec.rVec+1); here->MESicVGSGiven = TRUE; case 1: here->MESicVDS = *(value->v.vec.rVec); here->MESicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mes/mesdest.c0000644000265600020320000000136412264261473020634 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "mesdefs.h" #include "ngspice/suffix.h" void MESdestroy(GENmodel **inModel) { MESmodel **model = (MESmodel**)inModel; MESinstance *here; MESinstance *prev = NULL; MESmodel *mod = *model; MESmodel *oldmod = NULL; for( ; mod ; mod = mod->MESnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MESinstances ; here ; here = here->MESnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mes/messetup.c0000644000265600020320000001376012264261473021040 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the diode structure with those pointers needed later * for fast matrix loading */ { MESmodel *model = (MESmodel*)inModel; MESinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->MESnextModel ) { if( (model->MEStype != NMF) && (model->MEStype != PMF) ) { model->MEStype = NMF; } if(!model->MESthresholdGiven) { model->MESthreshold = -2; } if(!model->MESbetaGiven) { model->MESbeta = 2.5e-3; } if(!model->MESbGiven) { model->MESb = 0.3; } if(!model->MESalphaGiven) { model->MESalpha = 2; } if(!model->MESlModulationGiven) { model->MESlModulation = 0; } if(!model->MESdrainResistGiven) { model->MESdrainResist = 0; } if(!model->MESsourceResistGiven) { model->MESsourceResist = 0; } if(!model->MEScapGSGiven) { model->MEScapGS = 0; } if(!model->MEScapGDGiven) { model->MEScapGD = 0; } if(!model->MESgatePotentialGiven) { model->MESgatePotential = 1; } if(!model->MESgateSatCurrentGiven) { model->MESgateSatCurrent = 1e-14; } if(!model->MESdepletionCapCoeffGiven) { model->MESdepletionCapCoeff = .5; } if(!model->MESfNcoefGiven) { model->MESfNcoef = 0; } if(!model->MESfNexpGiven) { model->MESfNexp = 1; } /* loop through all the instances of the model */ for (here = model->MESinstances; here != NULL ; here=here->MESnextInstance) { if(!here->MESareaGiven) { here->MESarea = 1.0; } if(!here->MESmGiven) { here->MESm = 1.0; } here->MESstate = *states; *states += MESnumStates; if(model->MESsourceResist != 0) { if(here->MESsourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESname,"source"); if(error) return(error); here->MESsourcePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESsourcePrimeNode = here->MESsourceNode; } if(model->MESdrainResist != 0) { if(here->MESdrainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->MESname,"drain"); if(error) return(error); here->MESdrainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MESdrainPrimeNode = here->MESdrainNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MESdrainDrainPrimePtr,MESdrainNode,MESdrainPrimeNode); TSTALLOC(MESgateDrainPrimePtr,MESgateNode,MESdrainPrimeNode); TSTALLOC(MESgateSourcePrimePtr,MESgateNode,MESsourcePrimeNode); TSTALLOC(MESsourceSourcePrimePtr,MESsourceNode,MESsourcePrimeNode); TSTALLOC(MESdrainPrimeDrainPtr,MESdrainPrimeNode,MESdrainNode); TSTALLOC(MESdrainPrimeGatePtr,MESdrainPrimeNode,MESgateNode); TSTALLOC(MESdrainPrimeSourcePrimePtr,MESdrainPrimeNode,MESsourcePrimeNode); TSTALLOC(MESsourcePrimeGatePtr,MESsourcePrimeNode,MESgateNode); TSTALLOC(MESsourcePrimeSourcePtr,MESsourcePrimeNode,MESsourceNode); TSTALLOC(MESsourcePrimeDrainPrimePtr,MESsourcePrimeNode,MESdrainPrimeNode); TSTALLOC(MESdrainDrainPtr,MESdrainNode,MESdrainNode); TSTALLOC(MESgateGatePtr,MESgateNode,MESgateNode); TSTALLOC(MESsourceSourcePtr,MESsourceNode,MESsourceNode); TSTALLOC(MESdrainPrimeDrainPrimePtr,MESdrainPrimeNode,MESdrainPrimeNode); TSTALLOC(MESsourcePrimeSourcePrimePtr,MESsourcePrimeNode,MESsourcePrimeNode); } } return(OK); } int MESunsetup(GENmodel *inModel, CKTcircuit *ckt) { MESmodel *model; MESinstance *here; for (model = (MESmodel *)inModel; model != NULL; model = model->MESnextModel) { for (here = model->MESinstances; here != NULL; here=here->MESnextInstance) { if (here->MESsourcePrimeNode && here->MESsourcePrimeNode != here->MESsourceNode) { CKTdltNNum(ckt, here->MESsourcePrimeNode); here->MESsourcePrimeNode = 0; } if (here->MESdrainPrimeNode && here->MESdrainPrimeNode != here->MESdrainNode) { CKTdltNNum(ckt, here->MESdrainPrimeNode); here->MESdrainPrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/mes/mestemp.c0000644000265600020320000000276512264261473020650 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MEStemp(GENmodel *inModel, CKTcircuit *ckt) /* load the mes structure with those pointers needed later * for fast matrix loading */ { MESmodel *model = (MESmodel*)inModel; double xfc, temp; NG_IGNORE(ckt); /* loop through all the diode models */ for( ; model != NULL; model = model->MESnextModel ) { if(model->MESdrainResist != 0) { model->MESdrainConduct = 1/model->MESdrainResist; } else { model->MESdrainConduct = 0; } if(model->MESsourceResist != 0) { model->MESsourceConduct = 1/model->MESsourceResist; } else { model->MESsourceConduct = 0; } model->MESdepletionCap = model->MESdepletionCapCoeff * model->MESgatePotential; xfc = (1 - model->MESdepletionCapCoeff); temp = sqrt(xfc); model->MESf1 = model->MESgatePotential * (1 - temp)/(1-.5); model->MESf2 = temp * temp * temp; model->MESf3 = 1 - model->MESdepletionCapCoeff * (1 + .5); model->MESvcrit = CONSTvt0 * log(CONSTvt0/ (CONSTroot2 * model->MESgateSatCurrent)); } return(OK); } ngspice-26/src/spicelib/devices/mes/mesmpar.c0000644000265600020320000000504112264261473020630 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESmParam(int param, IFvalue *value, GENmodel *inModel) { MESmodel *model = (MESmodel*)inModel; switch(param) { case MES_MOD_VTO: model->MESthresholdGiven = TRUE; model->MESthreshold = value->rValue; break; case MES_MOD_ALPHA: model->MESalphaGiven = TRUE; model->MESalpha = value->rValue; break; case MES_MOD_BETA: model->MESbetaGiven = TRUE; model->MESbeta = value->rValue; break; case MES_MOD_LAMBDA: model->MESlModulationGiven = TRUE; model->MESlModulation = value->rValue; break; case MES_MOD_B: model->MESbGiven = TRUE; model->MESb = value->rValue; break; case MES_MOD_RD: model->MESdrainResistGiven = TRUE; model->MESdrainResist = value->rValue; break; case MES_MOD_RS: model->MESsourceResistGiven = TRUE; model->MESsourceResist = value->rValue; break; case MES_MOD_CGS: model->MEScapGSGiven = TRUE; model->MEScapGS = value->rValue; break; case MES_MOD_CGD: model->MEScapGDGiven = TRUE; model->MEScapGD = value->rValue; break; case MES_MOD_PB: model->MESgatePotentialGiven = TRUE; model->MESgatePotential = value->rValue; break; case MES_MOD_IS: model->MESgateSatCurrentGiven = TRUE; model->MESgateSatCurrent = value->rValue; break; case MES_MOD_FC: model->MESdepletionCapCoeffGiven = TRUE; model->MESdepletionCapCoeff = value->rValue; break; case MES_MOD_NMF: if(value->iValue) { model->MEStype = NMF; } break; case MES_MOD_PMF: if(value->iValue) { model->MEStype = PMF; } break; case MES_MOD_KF: model->MESfNcoefGiven = TRUE; model->MESfNcoef = value->rValue; break; case MES_MOD_AF: model->MESfNexpGiven = TRUE; model->MESfNexp = value->rValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mes/mesask.c0000644000265600020320000001110212264261473020442 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MESinstance *here = (MESinstance*)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case MES_AREA: value->rValue = here->MESarea; value->rValue *= here->MESm; return (OK); case MES_IC_VDS: value->rValue = here->MESicVDS; return (OK); case MES_IC_VGS: value->rValue = here->MESicVGS; return (OK); case MES_OFF: value->iValue = here->MESoff; return (OK); case MES_DRAINNODE: value->iValue = here->MESdrainNode; return (OK); case MES_GATENODE: value->iValue = here->MESgateNode; return (OK); case MES_SOURCENODE: value->iValue = here->MESsourceNode; return (OK); case MES_DRAINPRIMENODE: value->iValue = here->MESdrainPrimeNode; return (OK); case MES_VGS: value->rValue = *(ckt->CKTstate0 + here->MESvgs); return (OK); case MES_VGD: value->rValue = *(ckt->CKTstate0 + here->MESvgd); return (OK); case MES_CG: value->rValue = *(ckt->CKTstate0 + here->MEScg); value->rValue *= here->MESm; return (OK); case MES_CD: value->rValue = *(ckt->CKTstate0 + here->MEScd); value->rValue *= here->MESm; return (OK); case MES_CGD: value->rValue = *(ckt->CKTstate0 + here->MEScgd); value->rValue *= here->MESm; return (OK); case MES_GM: value->rValue = *(ckt->CKTstate0 + here->MESgm); value->rValue *= here->MESm; return (OK); case MES_GDS: value->rValue = *(ckt->CKTstate0 + here->MESgds); value->rValue *= here->MESm; return (OK); case MES_GGS: value->rValue = *(ckt->CKTstate0 + here->MESggs); value->rValue *= here->MESm; return (OK); case MES_GGD: value->rValue = *(ckt->CKTstate0 + here->MESggd); value->rValue *= here->MESm; return (OK); case MES_QGS: value->rValue = *(ckt->CKTstate0 + here->MESqgs); value->rValue *= here->MESm; return (OK); case MES_CQGS: value->rValue = *(ckt->CKTstate0 + here->MEScqgs); value->rValue *= here->MESm; return (OK); case MES_QGD: value->rValue = *(ckt->CKTstate0 + here->MESqgd); value->rValue *= here->MESm; return (OK); case MES_CQGD: value->rValue = *(ckt->CKTstate0 + here->MEScqgd); value->rValue *= here->MESm; return (OK); case MES_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MESask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->MEScd); value->rValue -= *(ckt->CKTstate0 + here->MEScg); value->rValue *= here->MESm; } return(OK); case MES_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MESask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->MEScd) * *(ckt->CKTrhsOld + here->MESdrainNode); value->rValue += *(ckt->CKTstate0 + here->MEScg) * *(ckt->CKTrhsOld + here->MESgateNode); value->rValue -= (*(ckt->CKTstate0+here->MEScd) + *(ckt->CKTstate0 + here->MEScg)) * *(ckt->CKTrhsOld + here->MESsourceNode); value->rValue *= here->MESm; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mes/mesinit.h0000644000265600020320000000035612264261473020645 0ustar andreasadmin#ifndef _MESINIT_H #define _MESINIT_H extern IFparm MESpTable[ ]; extern IFparm MESmPTable[ ]; extern char *MESnames[ ]; extern int MESpTSize; extern int MESmPTSize; extern int MESnSize; extern int MESiSize; extern int MESmSize; #endif ngspice-26/src/spicelib/devices/mes/mesdefs.h0000644000265600020320000002041112264261473020615 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ #ifndef MES #define MES #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" #define MESnumStates 13 /* structures used to describe MESFET Transistors */ /* information used to describe a single instance */ typedef struct sMESinstance { struct sMESmodel *MESmodPtr; /* backpointer to model */ struct sMESinstance *MESnextInstance; /* pointer to next instance of * current model*/ IFuid MESname; /* pointer to character string naming this instance */ int MESstate; /* pointer to start of state vector for mesfet */ int MESdrainNode; /* number of drain node of mesfet */ int MESgateNode; /* number of gate node of mesfet */ int MESsourceNode; /* number of source node of mesfet */ int MESdrainPrimeNode; /* number of internal drain node of mesfet */ int MESsourcePrimeNode; /* number of internal source node of mesfet */ double MESarea; /* area factor for the mesfet */ double MESm; /* Parallel multiplier */ double MESicVDS; /* initial condition voltage D-S*/ double MESicVGS; /* initial condition voltage G-S*/ double *MESdrainDrainPrimePtr; /* pointer to sparse matrix at * (drain,drain prime) */ double *MESgateDrainPrimePtr; /* pointer to sparse matrix at * (gate,drain prime) */ double *MESgateSourcePrimePtr; /* pointer to sparse matrix at * (gate,source prime) */ double *MESsourceSourcePrimePtr; /* pointer to sparse matrix at * (source,source prime) */ double *MESdrainPrimeDrainPtr; /* pointer to sparse matrix at * (drain prime,drain) */ double *MESdrainPrimeGatePtr; /* pointer to sparse matrix at * (drain prime,gate) */ double *MESdrainPrimeSourcePrimePtr; /* pointer to sparse matrix * (drain prime,source prime) */ double *MESsourcePrimeGatePtr; /* pointer to sparse matrix at * (source prime,gate) */ double *MESsourcePrimeSourcePtr; /* pointer to sparse matrix at * (source prime,source) */ double *MESsourcePrimeDrainPrimePtr; /* pointer to sparse matrix * (source prime,drain prime) */ double *MESdrainDrainPtr; /* pointer to sparse matrix at * (drain,drain) */ double *MESgateGatePtr; /* pointer to sparse matrix at * (gate,gate) */ double *MESsourceSourcePtr; /* pointer to sparse matrix at * (source,source) */ double *MESdrainPrimeDrainPrimePtr; /* pointer to sparse matrix * (drain prime,drain prime) */ double *MESsourcePrimeSourcePrimePtr; /* pointer to sparse matrix * (source prime,source prime) */ int MESoff; /* 'off' flag for mesfet */ unsigned MESareaGiven : 1; /* flag to indicate area was specified */ unsigned MESmGiven : 1; /* flag to indicate multiplier specified*/ unsigned MESicVDSGiven : 1; /* initial condition given flag for V D-S*/ unsigned MESicVGSGiven : 1; /* initial condition given flag for V G-S*/ int MESmode; /* * naming convention: * x = vgs * y = vgd * z = vds * cdr = cdrain */ #define MESNDCOEFFS 27 #ifndef NODISTO double MESdCoeffs[MESNDCOEFFS]; #else /* NODISTO */ double *MESdCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define cdr_x MESdCoeffs[0] #define cdr_z MESdCoeffs[1] #define cdr_x2 MESdCoeffs[2] #define cdr_z2 MESdCoeffs[3] #define cdr_xz MESdCoeffs[4] #define cdr_x3 MESdCoeffs[5] #define cdr_z3 MESdCoeffs[6] #define cdr_x2z MESdCoeffs[7] #define cdr_xz2 MESdCoeffs[8] #define ggs3 MESdCoeffs[9] #define ggd3 MESdCoeffs[10] #define ggs2 MESdCoeffs[11] #define ggd2 MESdCoeffs[12] #define qgs_x2 MESdCoeffs[13] #define qgs_y2 MESdCoeffs[14] #define qgs_xy MESdCoeffs[15] #define qgs_x3 MESdCoeffs[16] #define qgs_y3 MESdCoeffs[17] #define qgs_x2y MESdCoeffs[18] #define qgs_xy2 MESdCoeffs[19] #define qgd_x2 MESdCoeffs[20] #define qgd_y2 MESdCoeffs[21] #define qgd_xy MESdCoeffs[22] #define qgd_x3 MESdCoeffs[23] #define qgd_y3 MESdCoeffs[24] #define qgd_x2y MESdCoeffs[25] #define qgd_xy2 MESdCoeffs[26] #endif /* indices to the array of MESFET noise sources */ #define MESRDNOIZ 0 #define MESRSNOIZ 1 #define MESIDNOIZ 2 #define MESFLNOIZ 3 #define MESTOTNOIZ 4 #define MESNSRCS 5 /* the number of MESFET noise sources */ #ifndef NONOISE double MESnVar[NSTATVARS][MESNSRCS]; #else /* NONOISE */ double **MESnVar; #endif /* NONOISE */ } MESinstance ; #define MESvgs MESstate #define MESvgd MESstate+1 #define MEScg MESstate+2 #define MEScd MESstate+3 #define MEScgd MESstate+4 #define MESgm MESstate+5 #define MESgds MESstate+6 #define MESggs MESstate+7 #define MESggd MESstate+8 #define MESqgs MESstate+9 #define MEScqgs MESstate+10 #define MESqgd MESstate+11 #define MEScqgd MESstate+12 /* per model data */ typedef struct sMESmodel { /* model structure for a mesfet */ int MESmodType; /* type index of this device type */ struct sMESmodel *MESnextModel; /* pointer to next possible model in * linked list */ MESinstance * MESinstances; /* pointer to list of instances * that have this model */ IFuid MESmodName; /* pointer to character string naming this model */ int MEStype; double MESthreshold; double MESalpha; double MESbeta; double MESlModulation; double MESb; double MESdrainResist; double MESsourceResist; double MEScapGS; double MEScapGD; double MESgatePotential; double MESgateSatCurrent; double MESdepletionCapCoeff; double MESfNcoef; double MESfNexp; double MESdrainConduct; double MESsourceConduct; double MESdepletionCap; double MESf1; double MESf2; double MESf3; double MESvcrit; unsigned MESthresholdGiven : 1; unsigned MESalphaGiven : 1; unsigned MESbetaGiven : 1; unsigned MESlModulationGiven : 1; unsigned MESbGiven : 1; unsigned MESdrainResistGiven : 1; unsigned MESsourceResistGiven : 1; unsigned MEScapGSGiven : 1; unsigned MEScapGDGiven : 1; unsigned MESgatePotentialGiven : 1; unsigned MESgateSatCurrentGiven : 1; unsigned MESdepletionCapCoeffGiven : 1; unsigned MESfNcoefGiven : 1; unsigned MESfNexpGiven : 1; } MESmodel; #ifndef NMF #define NMF 1 #define PMF -1 #endif /*NMF*/ /* device parameters */ #define MES_AREA 1 #define MES_IC_VDS 2 #define MES_IC_VGS 3 #define MES_IC 4 #define MES_OFF 5 #define MES_CS 6 #define MES_POWER 7 #define MES_M 8 /* model parameters */ #define MES_MOD_VTO 101 #define MES_MOD_ALPHA 102 #define MES_MOD_BETA 103 #define MES_MOD_LAMBDA 104 #define MES_MOD_B 105 #define MES_MOD_RD 106 #define MES_MOD_RS 107 #define MES_MOD_CGS 108 #define MES_MOD_CGD 109 #define MES_MOD_PB 110 #define MES_MOD_IS 111 #define MES_MOD_FC 112 #define MES_MOD_NMF 113 #define MES_MOD_PMF 114 #define MES_MOD_KF 115 #define MES_MOD_AF 116 /* device questions */ #define MES_DRAINNODE 201 #define MES_GATENODE 202 #define MES_SOURCENODE 203 #define MES_DRAINPRIMENODE 204 #define MES_SOURCEPRIMENODE 205 #define MES_VGS 206 #define MES_VGD 207 #define MES_CG 208 #define MES_CD 209 #define MES_CGD 210 #define MES_GM 211 #define MES_GDS 212 #define MES_GGS 213 #define MES_GGD 214 #define MES_QGS 215 #define MES_CQGS 216 #define MES_QGD 217 #define MES_CQGD 218 /* model questions */ #define MES_MOD_DRAINCONDUCT 301 #define MES_MOD_SOURCECONDUCT 302 #define MES_MOD_DEPLETIONCAP 303 #define MES_MOD_VCRIT 304 #define MES_MOD_TYPE 305 #include "mesext.h" #endif /*MES*/ ngspice-26/src/spicelib/devices/mes/mesdel.c0000644000265600020320000000152712264261473020442 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { MESmodel *model = (MESmodel*)inModel; MESinstance **fast = (MESinstance**)inst; MESinstance **prev = NULL; MESinstance *here; for( ; model ; model = model->MESnextModel) { prev = &(model->MESinstances); for(here = *prev; here ; here = *prev) { if(here->MESname == name || (fast && here==*fast) ) { *prev= here->MESnextInstance; FREE(here); return(OK); } prev = &(here->MESnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mes/mestrunc.c0000644000265600020320000000124012264261473021021 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MEStrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MESmodel *model = (MESmodel*)inModel; MESinstance *here; for( ; model != NULL; model = model->MESnextModel) { for(here=model->MESinstances;here!=NULL;here = here->MESnextInstance){ CKTterr(here->MESqgs,ckt,timeStep); CKTterr(here->MESqgd,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mes/mesacl.c0000644000265600020320000000527212264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESacLoad(GENmodel *inModel, CKTcircuit *ckt) { MESmodel *model = (MESmodel*)inModel; MESinstance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->MESnextModel ) { for( here = model->MESinstances; here != NULL; here = here->MESnextInstance) { m = here->MESm; gdpr=model->MESdrainConduct * here->MESarea; gspr=model->MESsourceConduct * here->MESarea; gm= *(ckt->CKTstate0 + here->MESgm) ; gds= *(ckt->CKTstate0 + here->MESgds) ; ggs= *(ckt->CKTstate0 + here->MESggs) ; xgs= *(ckt->CKTstate0 + here->MESqgs) * ckt->CKTomega ; ggd= *(ckt->CKTstate0 + here->MESggd) ; xgd= *(ckt->CKTstate0 + here->MESqgd) * ckt->CKTomega ; *(here->MESdrainDrainPtr ) += m * (gdpr); *(here->MESgateGatePtr ) += m * (ggd+ggs); *(here->MESgateGatePtr +1) += m * (xgd+xgs); *(here->MESsourceSourcePtr ) += m * (gspr); *(here->MESdrainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->MESdrainPrimeDrainPrimePtr +1) += m * (xgd); *(here->MESsourcePrimeSourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->MESsourcePrimeSourcePrimePtr +1) += m * (xgs); *(here->MESdrainDrainPrimePtr ) -= m * (gdpr); *(here->MESgateDrainPrimePtr ) -= m * (ggd); *(here->MESgateDrainPrimePtr +1) -= m * (xgd); *(here->MESgateSourcePrimePtr ) -= m * (ggs); *(here->MESgateSourcePrimePtr +1) -= m * (xgs); *(here->MESsourceSourcePrimePtr ) -= m * (gspr); *(here->MESdrainPrimeDrainPtr ) -= m * (gdpr); *(here->MESdrainPrimeGatePtr ) += m * (-ggd+gm); *(here->MESdrainPrimeGatePtr +1) -= m * (xgd); *(here->MESdrainPrimeSourcePrimePtr ) += m * (-gds-gm); *(here->MESsourcePrimeGatePtr ) += m * (-ggs-gm); *(here->MESsourcePrimeGatePtr +1) -= m * (xgs); *(here->MESsourcePrimeSourcePtr ) -= m * (gspr); *(here->MESsourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/mes/mesdisto.c0000644000265600020320000006652612264261473021032 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int MESdisto(int mode,GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { MESmodel *model = (MESmodel *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double temp, itemp; MESinstance *here; if (mode == D_SETUP) return(MESdSetup(genmodel,ckt)); /* AFN: Oh what a wonderful thing!!! */ if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the MES models */ for( ; model != NULL; model = model->MESnextModel ) { /* loop through all the instances of the model */ for (here = model->MESinstances; here != NULL ; here=here->MESnextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MESgateNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->MESgateNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->MESdrainPrimeNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->MESdrainPrimeNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); itemp = DFi2F1(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n2F1(here->ggs2, r1h1x, i1h1x); itemp = D1i2F1(here->ggs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n2F1(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = D1i2F1(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* ggd over */ /* loading qgs term */ temp = -ckt->CKTomega * DFi2F1(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0); itemp = ckt->CKTomega* DFn2F1(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* qgs term over */ /* loading qgd term */ temp = -ckt->CKTomega * DFi2F1(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0); itemp = ckt->CKTomega* DFn2F1(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* qgd term over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MESgateNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->MESgateNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->MESdrainPrimeNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->MESdrainPrimeNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r2h11x = *(job->r2H11ptr + (here->MESgateNode)) - *(job->r2H11ptr + (here->MESsourcePrimeNode)); i2h11x = *(job->i2H11ptr + (here->MESgateNode)) - *(job->i2H11ptr + (here->MESsourcePrimeNode)); r2h11y = *(job->r2H11ptr + (here->MESdrainPrimeNode)) - *(job->r2H11ptr + (here->MESsourcePrimeNode)); i2h11y = *(job->i2H11ptr + (here->MESdrainPrimeNode)) - *(job->i2H11ptr + (here->MESsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, here->cdr_x3, here->cdr_z3, 0.0, here->cdr_x2z, 0.0, here->cdr_xz2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); itemp = DFi3F1(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, here->cdr_x3, here->cdr_z3, 0.0, here->cdr_x2z, 0.0, here->cdr_xz2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n3F1(here->ggs2, here->ggs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = D1i3F1(here->ggs2, here->ggs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n3F1(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = D1i3F1(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* ggd over */ /* loading qgs term */ temp = -ckt->CKTomega* DFi3F1(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, here->qgs_x3, here->qgs_y3, 0.0, here->qgs_x2y, 0.0, here->qgs_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11x - r2h11y, i2h11x - i2h11y, 0.0, 0.0); itemp =ckt->CKTomega* DFn3F1(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, here->qgs_x3, here->qgs_y3, 0.0, here->qgs_x2y, 0.0, here->qgs_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11x - r2h11y, i2h11x - i2h11y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* qgs term over */ /* loading qgd term */ temp = -ckt->CKTomega* DFi3F1(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, here->qgd_x3, here->qgd_y3, 0.0, here->qgd_x2y, 0.0, here->qgd_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11x - r2h11y, i2h11x - i2h11y, 0.0, 0.0); itemp =ckt->CKTomega* DFn3F1(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, here->qgd_x3, here->qgd_y3, 0.0, here->qgd_x2y, 0.0, here->qgd_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11x - r2h11y, i2h11x - i2h11y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* qgd term over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra transform */ r1h1x = *(job->r1H1ptr + (here->MESgateNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->MESgateNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->MESdrainPrimeNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->MESdrainPrimeNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h2x = *(job->r1H2ptr + (here->MESgateNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1h2x = *(job->i1H2ptr + (here->MESgateNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode)); r1h2y = *(job->r1H2ptr + (here->MESdrainPrimeNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1h2y = *(job->i1H2ptr + (here->MESdrainPrimeNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); itemp = DFiF12(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1nF12(here->ggs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = D1iF12(here->ggs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1nF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = D1iF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* ggd over */ /* loading qgs term */ temp = -ckt->CKTomega* DFiF12(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2x - r1h2y, i1h2x - i1h2y, 0.0, 0.0); itemp =ckt->CKTomega* DFnF12(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2x - r1h2y, i1h2x - i1h2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* qgs term over */ /* loading qgd term */ temp = -ckt->CKTomega* DFiF12(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2x - r1h2y, i1h2x - i1h2y, 0.0, 0.0); itemp =ckt->CKTomega* DFnF12(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2x - r1h2y, i1h2x - i1h2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* qgd term over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MESgateNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->MESgateNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->MESdrainPrimeNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->MESdrainPrimeNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1hm2x = *(job->r1H2ptr + (here->MESgateNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1hm2x = -(*(job->i1H2ptr + (here->MESgateNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode))); r1hm2y = *(job->r1H2ptr + (here->MESdrainPrimeNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1hm2y = -(*(job->i1H2ptr + (here->MESdrainPrimeNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); itemp = DFiF12(here->cdr_x2, here->cdr_z2, 0.0, here->cdr_xz, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1nF12(here->ggs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = D1iF12(here->ggs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1nF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = D1iF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* ggd over */ /* loading qgs term */ temp = -ckt->CKTomega* DFiF12(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2x - r1hm2y, i1hm2x - i1hm2y, 0.0, 0.0); itemp = ckt->CKTomega* DFnF12(here->qgs_x2, here->qgs_y2, 0.0, here->qgs_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2x - r1hm2y, i1hm2x - i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* qgs term over */ /* loading qgd term */ temp = -ckt->CKTomega* DFiF12(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2x - r1hm2y, i1hm2x - i1hm2y, 0.0, 0.0); itemp = ckt->CKTomega* DFnF12(here->qgd_x2, here->qgd_y2, 0.0, here->qgd_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1x - r1h1y, i1h1x - i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2x - r1hm2y, i1hm2x - i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* qgd term over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MESgateNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->MESgateNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->MESdrainPrimeNode)) - *(job->r1H1ptr + (here->MESsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->MESdrainPrimeNode)) - *(job->i1H1ptr + (here->MESsourcePrimeNode)); r2h11x = *(job->r2H11ptr + (here->MESgateNode)) - *(job->r2H11ptr + (here->MESsourcePrimeNode)); i2h11x = *(job->i2H11ptr + (here->MESgateNode)) - *(job->i2H11ptr + (here->MESsourcePrimeNode)); r2h11y = *(job->r2H11ptr + (here->MESdrainPrimeNode)) - *(job->r2H11ptr + (here->MESsourcePrimeNode)); i2h11y = *(job->i2H11ptr + (here->MESdrainPrimeNode)) - *(job->i2H11ptr + (here->MESsourcePrimeNode)); r1hm2x = *(job->r1H2ptr + (here->MESgateNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1hm2x = -(*(job->i1H2ptr + (here->MESgateNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode))); r1hm2y = *(job->r1H2ptr + (here->MESdrainPrimeNode)) - *(job->r1H2ptr + (here->MESsourcePrimeNode)); i1hm2y = -(*(job->i1H2ptr + (here->MESdrainPrimeNode)) - *(job->i1H2ptr + (here->MESsourcePrimeNode))); r2h1m2x = *(job->r2H1m2ptr + (here->MESgateNode)) - *(job->r2H1m2ptr + (here->MESsourcePrimeNode)); i2h1m2x = *(job->i2H1m2ptr + (here->MESgateNode)) - *(job->i2H1m2ptr + (here->MESsourcePrimeNode)); r2h1m2y = *(job->r2H1m2ptr + (here->MESdrainPrimeNode)) - *(job->r2H1m2ptr + (here->MESsourcePrimeNode)); i2h1m2y = *(job->i2H1m2ptr + (here->MESdrainPrimeNode)) - *(job->i2H1m2ptr + (here->MESsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_z2; pass.czz = 0.0; pass.cxy = here->cdr_xz; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_z3; pass.czzz = 0.0; pass.cxxy = here->cdr_x2z; pass.cxxz = 0.0; pass.cxyy = here->cdr_xz2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->MESdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n2F12(here->ggs2, here->ggs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = D1i2F12(here->ggs2, here->ggs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n2F12(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = D1i2F12(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* ggd over */ /* loading qgs term */ pass.cxx = here->qgs_x2; pass.cyy = here->qgs_y2; pass.czz = 0.0; pass.cxy = here->qgs_xy; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->qgs_x3; pass.cyyy = here->qgs_y3; pass.czzz = 0.0; pass.cxxy = here->qgs_x2y; pass.cxxz = 0.0; pass.cxyy = here->qgs_xy2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1x - r1h1y; pass.i1h1y = i1h1x - i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2x - r1hm2y; pass.i1h2y = i1hm2x - i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11x - r2h11y; pass.i2h11y = i2h11x - i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2x - r2h1m2y; pass.ih2f1f2y = i2h1m2x - i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = -ckt->CKTomega*DFi2F12(&pass); itemp = ckt->CKTomega*DFn2F12(&pass); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->MESsourcePrimeNode)) += itemp; /* qgs term over */ /* loading qgd term */ pass.cxx = here->qgd_x2; pass.cyy = here->qgd_y2; pass.czz = 0.0; pass.cxy = here->qgd_xy; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->qgd_x3; pass.cyyy = here->qgd_y3; pass.czzz = 0.0; pass.cxxy = here->qgd_x2y; pass.cxxz = 0.0; pass.cxyy = here->qgd_xy2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1x - r1h1y; pass.i1h1y = i1h1x - i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2x - r1hm2y; pass.i1h2y = i1hm2x - i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11x - r2h11y; pass.i2h11y = i2h11x - i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2x - r2h1m2y; pass.ih2f1f2y = i2h1m2x - i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = -ckt->CKTomega*DFi2F12(&pass); itemp = ckt->CKTomega*DFn2F12(&pass); *(ckt->CKTrhs + (here->MESgateNode)) -= temp; *(ckt->CKTirhs + (here->MESgateNode)) -= itemp; *(ckt->CKTrhs + (here->MESdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->MESdrainPrimeNode)) += itemp; /* qgd term over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/mes/mes.c0000644000265600020320000000714612264261473017760 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "mesdefs.h" #include "ngspice/suffix.h" IFparm MESpTable[] = { /* parameters */ OPU("off", MES_OFF, IF_FLAG ,"Device initially off"), IOPU("area", MES_AREA, IF_REAL ,"Area factor"), IOPU("m", MES_AREA, IF_REAL ,"Parallel Multiplier"), IOPAU("icvds", MES_IC_VDS, IF_REAL ,"Initial D-S voltage"), IOPAU("icvgs", MES_IC_VGS, IF_REAL ,"Initial G-S voltage"), OPU("dnode", MES_DRAINNODE, IF_INTEGER,"Number of drain node"), OPU("gnode", MES_GATENODE, IF_INTEGER,"Number of gate node"), OPU("snode", MES_SOURCENODE, IF_INTEGER,"Number of source node"), OPU("dprimenode",MES_DRAINPRIMENODE,IF_INTEGER,"Number of internal drain node"), OPU("sprimenode",MES_SOURCEPRIMENODE,IF_INTEGER, "Number of internal source node"), OP("vgs", MES_VGS, IF_REAL,"Gate-Source voltage"), OP("vgd", MES_VGD, IF_REAL,"Gate-Drain voltage"), OP("cg", MES_CG, IF_REAL,"Gate capacitance"), OP("cd", MES_CD, IF_REAL,"Drain capacitance"), OP("cgd", MES_CGD, IF_REAL,"Gate-Drain capacitance"), OP("gm", MES_GM, IF_REAL,"Transconductance"), OP("gds", MES_GDS, IF_REAL,"Drain-Source conductance"), OP("ggs", MES_GGS, IF_REAL,"Gate-Source conductance"), OP("ggd", MES_GGD, IF_REAL,"Gate-Drain conductance"), OP("cqgs", MES_CQGS, IF_REAL,"Capacitance due to gate-source charge storage"), OP("cqgd", MES_CQGD, IF_REAL,"Capacitance due to gate-drain charge storage"), OPU("qgs", MES_QGS, IF_REAL,"Gate-Source charge storage"), OPU("qgd", MES_QGD, IF_REAL,"Gate-Drain charge storage"), OP("is", MES_CS, IF_REAL ,"Source current"), OP("p", MES_POWER, IF_REAL ,"Power dissipated by the mesfet") }; IFparm MESmPTable[] = { /* model parameters */ OP( "type", MES_MOD_TYPE, IF_FLAG,"N-type or P-type MESfet model"), IP( "nmf", MES_MOD_NMF, IF_FLAG,"N type MESfet model"), IP( "pmf", MES_MOD_PMF, IF_FLAG,"P type MESfet model"), IOP( "vt0", MES_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOPR( "vto", MES_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "alpha", MES_MOD_ALPHA, IF_REAL,"Saturation voltage parameter"), IOP( "beta", MES_MOD_BETA, IF_REAL,"Transconductance parameter"), IOP( "lambda", MES_MOD_LAMBDA, IF_REAL,"Channel length modulation parm."), IOP( "b", MES_MOD_B, IF_REAL,"Doping tail extending parameter"), IOP( "rd", MES_MOD_RD, IF_REAL,"Drain ohmic resistance"), OPU( "gd", MES_MOD_DRAINCONDUCT, IF_REAL,"Drain conductance"), IOP( "rs", MES_MOD_RS, IF_REAL,"Source ohmic resistance"), OPU( "gs", MES_MOD_SOURCECONDUCT, IF_REAL,"Source conductance"), IOPA( "cgs", MES_MOD_CGS, IF_REAL,"G-S junction capacitance"), IOPA( "cgd", MES_MOD_CGD, IF_REAL,"G-D junction capacitance"), IOP( "pb", MES_MOD_PB, IF_REAL,"Gate junction potential"), IOP( "is", MES_MOD_IS, IF_REAL,"Junction saturation current"), IOP( "fc", MES_MOD_FC, IF_REAL,"Forward bias junction fit parm."), OP( "depl_cap", MES_MOD_DEPLETIONCAP, IF_REAL,"Depletion capacitance"), OP( "vcrit", MES_MOD_VCRIT, IF_REAL,"Critical voltage"), IOP("kf", MES_MOD_KF, IF_REAL,"Flicker noise coefficient"), IOP("af", MES_MOD_AF, IF_REAL,"Flicker noise exponent") }; char *MESnames[] = { "Drain", "Gate", "Source" }; int MESnSize = NUMELEMS(MESnames); int MESpTSize = NUMELEMS(MESpTable); int MESmPTSize = NUMELEMS(MESmPTable); int MESiSize = sizeof(MESinstance); int MESmSize = sizeof(MESmodel); ngspice-26/src/spicelib/devices/mes/mesnoise.c0000644000265600020320000001453212264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "mesdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * MESnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MESFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MESFET's is summed with the variable "OnDens". */ int MESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; MESmodel *firstModel = (MESmodel *) genmodel; MESmodel *model; MESinstance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[MESNSRCS]; double lnNdens[MESNSRCS]; int i; /* define the names of the noise sources */ static char *MESnNames[MESNSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in MESdefs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->MESnextModel) { for (inst=model->MESinstances; inst != NULL; inst=inst->MESnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < MESNSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->MESname,MESnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < MESNSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->MESname,MESnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->MESname,MESnNames[i]); /* OUTname(name,SV_INPUT_NOISE_V_SQ); data->numPlots += 2; */ data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[MESRDNOIZ],&lnNdens[MESRDNOIZ], ckt,THERMNOISE,inst->MESdrainPrimeNode,inst->MESdrainNode, model->MESdrainConduct * inst->MESarea * inst->MESm); NevalSrc(&noizDens[MESRSNOIZ],&lnNdens[MESRSNOIZ], ckt,THERMNOISE,inst->MESsourcePrimeNode,inst->MESsourceNode, model->MESsourceConduct * inst->MESarea * inst->MESm); NevalSrc(&noizDens[MESIDNOIZ],&lnNdens[MESIDNOIZ], ckt,THERMNOISE,inst->MESdrainPrimeNode, inst->MESsourcePrimeNode, (2.0/3.0 * inst->MESm * fabs(*(ckt->CKTstate0 + inst->MESgm)))); NevalSrc(&noizDens[MESFLNOIZ], NULL, ckt, N_GAIN,inst->MESdrainPrimeNode, inst->MESsourcePrimeNode, (double)0.0); noizDens[MESFLNOIZ] *= inst->MESm * model->MESfNcoef * exp(model->MESfNexp * log(MAX(fabs(*(ckt->CKTstate0 + inst->MEScd)),N_MINLOG))) / data->freq; lnNdens[MESFLNOIZ] = log(MAX(noizDens[MESFLNOIZ],N_MINLOG)); noizDens[MESTOTNOIZ] = noizDens[MESRDNOIZ] + noizDens[MESRSNOIZ] + noizDens[MESIDNOIZ] + noizDens[MESFLNOIZ]; lnNdens[MESTOTNOIZ] = log(MAX(noizDens[MESTOTNOIZ], N_MINLOG)); *OnDens += noizDens[MESTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < MESNSRCS; i++) { inst->MESnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < MESNSRCS; i++) { inst->MESnVar[OUTNOIZ][i] = 0.0; inst->MESnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < MESNSRCS; i++) { if (i != MESTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->MESnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->MESnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->MESnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->MESnVar[OUTNOIZ][i] += tempOnoise; inst->MESnVar[OUTNOIZ][MESTOTNOIZ] += tempOnoise; inst->MESnVar[INNOIZ][i] += tempInoise; inst->MESnVar[INNOIZ][MESTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < MESNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < MESNSRCS; i++) { data->outpVector[data->outNumber++] = inst->MESnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->MESnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/mes/mesmask.c0000644000265600020320000000446512264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MESmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { MESmodel *here = (MESmodel*)inst; NG_IGNORE(ckt); switch(which) { case MES_MOD_VTO: value->rValue = here->MESthreshold; return (OK); case MES_MOD_ALPHA: value->rValue = here->MESalpha; return (OK); case MES_MOD_BETA: value->rValue = here->MESbeta; return (OK); case MES_MOD_LAMBDA: value->rValue = here->MESlModulation; return (OK); case MES_MOD_B: value->rValue = here->MESb; return (OK); case MES_MOD_RD: value->rValue = here->MESdrainResist; return (OK); case MES_MOD_RS: value->rValue = here->MESsourceResist; return (OK); case MES_MOD_CGS: value->rValue = here->MEScapGS; return (OK); case MES_MOD_CGD: value->rValue = here->MEScapGD; return (OK); case MES_MOD_PB: value->rValue = here->MESgatePotential; return (OK); case MES_MOD_IS: value->rValue = here->MESgateSatCurrent; return (OK); case MES_MOD_FC: value->rValue = here->MESdepletionCapCoeff; return (OK); case MES_MOD_DRAINCONDUCT: value->rValue = here->MESdrainConduct; return (OK); case MES_MOD_SOURCECONDUCT: value->rValue = here->MESsourceConduct; return (OK); case MES_MOD_DEPLETIONCAP: value->rValue = here->MESdepletionCap; return (OK); case MES_MOD_VCRIT: value->rValue = here->MESvcrit; return (OK); case MES_MOD_TYPE: if (here->MEStype == NMF) value->sValue = "nmf"; else value->sValue = "pmf"; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mes/Makefile.am0000644000265600020320000000101412264261473021050 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmes.la libmes_la_SOURCES = \ mes.c \ mesacl.c \ mesask.c \ mesdefs.h \ mesdel.c \ mesdest.c \ mesdisto.c \ mesdset.c \ mesext.h \ mesgetic.c \ mesinit.c \ mesinit.h \ mesitf.h \ mesload.c \ mesmask.c \ mesmdel.c \ mesmpar.c \ mesnoise.c \ mesparam.c \ mespzld.c \ messetup.c \ mestemp.c \ mestrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mes/Makefile.in0000644000265600020320000004314012264261537021070 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mes DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmes_la_LIBADD = am_libmes_la_OBJECTS = mes.lo mesacl.lo mesask.lo mesdel.lo mesdest.lo \ mesdisto.lo mesdset.lo mesgetic.lo mesinit.lo mesload.lo \ mesmask.lo mesmdel.lo mesmpar.lo mesnoise.lo mesparam.lo \ mespzld.lo messetup.lo mestemp.lo mestrunc.lo libmes_la_OBJECTS = $(am_libmes_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmes_la_SOURCES) DIST_SOURCES = $(libmes_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmes.la libmes_la_SOURCES = \ mes.c \ mesacl.c \ mesask.c \ mesdefs.h \ mesdel.c \ mesdest.c \ mesdisto.c \ mesdset.c \ mesext.h \ mesgetic.c \ mesinit.c \ mesinit.h \ mesitf.h \ mesload.c \ mesmask.c \ mesmdel.c \ mesmpar.c \ mesnoise.c \ mesparam.c \ mespzld.c \ messetup.c \ mestemp.c \ mestrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmes.la: $(libmes_la_OBJECTS) $(libmes_la_DEPENDENCIES) $(EXTRA_libmes_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmes_la_OBJECTS) $(libmes_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesdisto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mesparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mespzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/messetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mestemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mestrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mes/mesgetic.c0000644000265600020320000000211312264261473020761 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESgetic(GENmodel *inModel, CKTcircuit *ckt) { MESmodel *model = (MESmodel*)inModel; MESinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MESnextModel) { for(here = model->MESinstances; here ; here = here->MESnextInstance) { if(!here->MESicVDSGiven) { here->MESicVDS = *(ckt->CKTrhs + here->MESdrainNode) - *(ckt->CKTrhs + here->MESsourceNode); } if(!here->MESicVGSGiven) { here->MESicVGS = *(ckt->CKTrhs + here->MESgateNode) - *(ckt->CKTrhs + here->MESsourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mes/mesext.h0000644000265600020320000000205312264261473020476 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang Modified: 2000 AlansFixes **********/ extern int MESacLoad(GENmodel*,CKTcircuit*); extern int MESask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MESdelete(GENmodel*,IFuid,GENinstance**); extern void MESdestroy(GENmodel**); extern int MESgetic(GENmodel*,CKTcircuit*); extern int MESload(GENmodel*,CKTcircuit*); extern int MESmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int MESmDelete(GENmodel**,IFuid,GENmodel*); extern int MESmParam(int,IFvalue*,GENmodel*); extern int MESparam(int,IFvalue*,GENinstance*,IFvalue*); extern int MESpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MESsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MESunsetup(GENmodel*,CKTcircuit*); extern int MEStemp(GENmodel*,CKTcircuit*); extern int MEStrunc(GENmodel*,CKTcircuit*,double*); extern int MESdisto(int,GENmodel*,CKTcircuit*); extern int MESnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int MESdSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mes/mesmdel.c0000644000265600020320000000173512264261473020620 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* */ #include "ngspice/ngspice.h" #include "mesdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MESmodel **model = (MESmodel**)inModel; MESmodel *modfast = (MESmodel*)kill; MESinstance *here; MESinstance *prev = NULL; MESmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MESnextModel)) { if( (*model)->MESmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MESnextModel; /* cut deleted device out of list */ for(here = (*model)->MESinstances ; here ; here = here->MESnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mes/mesload.c0000644000265600020320000004703112264261473020615 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "mesdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* forward declaraction of our helper function */ static double qggnew(double,double,double,double,double,double,double, double*,double*); int MESload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { MESmodel *model = (MESmodel*)inModel; MESinstance *here; double afact; double beta; double betap; double capgd; double capgs; double cd; double cdhat = 0.0; double cdrain; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd; double cgdna,cgdnb,cgdnc,cgdnd; double cghat = 0.0; double cgsna,cgsnb,cgsnc,cgsnd; double csat; double czgd; double czgs; double delvds; double delvgd; double delvgs; double denom; double evgd; double evgs; double gdpr; double gds; double geq; double ggd; double ggs; double gm; double gspr; double invdenom; double lfact; double phib; double prod; double qgga,qggb,qggc,qggd; double vcap; double vcrit; double vds; double vgd; double vgd1; double vgdt; double vgs; double vgs1; double vgst; double vto; #ifndef PREDICTOR double xfact; #endif double arg; int icheck; int ichk1; int error; double m; /* loop through all the models */ for( ; model != NULL; model = model->MESnextModel ) { /* loop through all the instances of the model */ for (here = model->MESinstances; here != NULL ; here=here->MESnextInstance) { /* * dc model parameters */ beta = model->MESbeta * here->MESarea; gdpr = model->MESdrainConduct * here->MESarea; gspr = model->MESsourceConduct * here->MESarea; csat = model->MESgateSatCurrent * here->MESarea; vcrit = model->MESvcrit; vto = model->MESthreshold; /* * initialization */ icheck = 1; if( ckt->CKTmode & MODEINITSMSIG) { vgs = *(ckt->CKTstate0 + here->MESvgs); vgd = *(ckt->CKTstate0 + here->MESvgd); } else if (ckt->CKTmode & MODEINITTRAN) { vgs = *(ckt->CKTstate1 + here->MESvgs); vgd = *(ckt->CKTstate1 + here->MESvgd); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds = model->MEStype*here->MESicVDS; vgs = model->MEStype*here->MESicVGS; vgd = vgs-vds; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->MESoff == 0) ) { vgs = -1; vgd = -1; } else if( (ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->MESoff))) { vgs = 0; vgd = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MESvgs) = *(ckt->CKTstate1 + here->MESvgs); vgs = (1+xfact) * *(ckt->CKTstate1 + here->MESvgs) - xfact * *(ckt->CKTstate2 + here->MESvgs); *(ckt->CKTstate0 + here->MESvgd) = *(ckt->CKTstate1 + here->MESvgd); vgd = (1+xfact)* *(ckt->CKTstate1 + here->MESvgd) - xfact * *(ckt->CKTstate2 + here->MESvgd); *(ckt->CKTstate0 + here->MEScg) = *(ckt->CKTstate1 + here->MEScg); *(ckt->CKTstate0 + here->MEScd) = *(ckt->CKTstate1 + here->MEScd); *(ckt->CKTstate0 + here->MEScgd) = *(ckt->CKTstate1 + here->MEScgd); *(ckt->CKTstate0 + here->MESgm) = *(ckt->CKTstate1 + here->MESgm); *(ckt->CKTstate0 + here->MESgds) = *(ckt->CKTstate1 + here->MESgds); *(ckt->CKTstate0 + here->MESggs) = *(ckt->CKTstate1 + here->MESggs); *(ckt->CKTstate0 + here->MESggd) = *(ckt->CKTstate1 + here->MESggd); } else { #endif /* PREDICTOR */ /* * compute new nonlinear branch voltages */ vgs = model->MEStype* (*(ckt->CKTrhsOld+ here->MESgateNode)- *(ckt->CKTrhsOld+ here->MESsourcePrimeNode)); vgd = model->MEStype* (*(ckt->CKTrhsOld+here->MESgateNode)- *(ckt->CKTrhsOld+ here->MESdrainPrimeNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvgs=vgs - *(ckt->CKTstate0 + here->MESvgs); delvgd=vgd - *(ckt->CKTstate0 + here->MESvgd); delvds=delvgs - delvgd; cghat= *(ckt->CKTstate0 + here->MEScg) + *(ckt->CKTstate0 + here->MESggd)*delvgd + *(ckt->CKTstate0 + here->MESggs)*delvgs; cdhat= *(ckt->CKTstate0 + here->MEScd) + *(ckt->CKTstate0 + here->MESgm)*delvgs + *(ckt->CKTstate0 + here->MESgds)*delvds - *(ckt->CKTstate0 + here->MESggd)*delvgd; /* * bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->MESvgs)))+ ckt->CKTvoltTol) ) if ( (fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->MESvgd)))+ ckt->CKTvoltTol)) if ( (fabs(cghat-*(ckt->CKTstate0 + here->MEScg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->MEScg)))+ ckt->CKTabstol) ) if ( /* hack - expression too big */ (fabs(cdhat-*(ckt->CKTstate0 + here->MEScd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->MEScd)))+ ckt->CKTabstol) ) { /* we can do a bypass */ vgs= *(ckt->CKTstate0 + here->MESvgs); vgd= *(ckt->CKTstate0 + here->MESvgd); vds= vgs-vgd; cg= *(ckt->CKTstate0 + here->MEScg); cd= *(ckt->CKTstate0 + here->MEScd); cgd= *(ckt->CKTstate0 + here->MEScgd); gm= *(ckt->CKTstate0 + here->MESgm); gds= *(ckt->CKTstate0 + here->MESgds); ggs= *(ckt->CKTstate0 + here->MESggs); ggd= *(ckt->CKTstate0 + here->MESggd); goto load; } /* * limit nonlinear branch voltages */ ichk1=1; vgs = DEVpnjlim(vgs,*(ckt->CKTstate0 + here->MESvgs),CONSTvt0, vcrit, &icheck); vgd = DEVpnjlim(vgd,*(ckt->CKTstate0 + here->MESvgd),CONSTvt0, vcrit,&ichk1); if (ichk1 == 1) { icheck=1; } vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MESvgs), model->MESthreshold); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->MESvgd), model->MESthreshold); } /* * determine dc current and derivatives */ vds = vgs-vgd; if (vgs <= -3*CONSTvt0) { arg=3*CONSTvt0/(vgs*CONSTe); arg = arg * arg * arg; cg = -csat*(1+arg)+ckt->CKTgmin*vgs; ggs = csat*3*arg/vgs+ckt->CKTgmin; } else { evgs = exp(vgs/CONSTvt0); ggs = csat*evgs/CONSTvt0+ckt->CKTgmin; cg = csat*(evgs-1)+ckt->CKTgmin*vgs; } if (vgd <= -3*CONSTvt0) { arg=3*CONSTvt0/(vgd*CONSTe); arg = arg * arg * arg; cgd = -csat*(1+arg)+ckt->CKTgmin*vgd; ggd = csat*3*arg/vgd+ckt->CKTgmin; } else { evgd = exp(vgd/CONSTvt0); ggd = csat*evgd/CONSTvt0+ckt->CKTgmin; cgd = csat*(evgd-1)+ckt->CKTgmin*vgd; } cg = cg+cgd; /* * compute drain current and derivitives for normal mode */ if (vds >= 0) { vgst = vgs-model->MESthreshold; /* * normal mode, cutoff region */ if (vgst <= 0) { cdrain = 0; gm = 0; gds = 0; } else { prod = 1 + model->MESlModulation * vds; betap = beta * prod; denom = 1 + model->MESb * vgst; invdenom = 1 / denom; if (vds >= ( 3 / model->MESalpha ) ) { /* * normal mode, saturation region */ cdrain = betap * vgst * vgst * invdenom; gm = betap * vgst * (1 + denom) * invdenom * invdenom; gds = model->MESlModulation * beta * vgst * vgst * invdenom; } else { /* * normal mode, linear region */ afact = 1 - model->MESalpha * vds / 3; lfact = 1 - afact * afact * afact; cdrain = betap * vgst * vgst * invdenom * lfact; gm = betap * vgst * (1 + denom) * invdenom * invdenom * lfact; gds = beta * vgst * vgst * invdenom * (model->MESalpha * afact * afact * prod + lfact * model->MESlModulation); } } } else { /* * compute drain current and derivitives for inverse mode */ vgdt = vgd - model->MESthreshold; if (vgdt <= 0) { /* * inverse mode, cutoff region */ cdrain = 0; gm = 0; gds = 0; } else { /* * inverse mode, saturation region */ prod = 1 - model->MESlModulation * vds; betap = beta * prod; denom = 1 + model->MESb * vgdt; invdenom = 1 / denom; if ( -vds >= ( 3 / model->MESalpha ) ) { cdrain = -betap * vgdt * vgdt * invdenom; gm = -betap * vgdt * (1 + denom) * invdenom * invdenom; gds = model->MESlModulation * beta * vgdt * vgdt * invdenom-gm; } else { /* * inverse mode, linear region */ afact = 1 + model->MESalpha * vds / 3; lfact = 1 - afact * afact * afact; cdrain = -betap * vgdt * vgdt * invdenom * lfact; gm = -betap * vgdt * (1 + denom) * invdenom * invdenom * lfact; gds = beta * vgdt * vgdt * invdenom * (model->MESalpha * afact * afact * prod + lfact * model->MESlModulation)-gm; } } } /* * compute equivalent drain current source */ cd = cdrain - cgd; if ( (ckt->CKTmode & (MODETRAN|MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * charge storage elements */ czgs = model->MEScapGS * here->MESarea; czgd = model->MEScapGD * here->MESarea; phib = model->MESgatePotential; vgs1 = *(ckt->CKTstate1 + here->MESvgs); vgd1 = *(ckt->CKTstate1 + here->MESvgd); vcap = 1 / model->MESalpha; qgga = qggnew(vgs,vgd,phib,vcap,vto,czgs,czgd,&cgsna,&cgdna); qggb = qggnew(vgs1,vgd,phib,vcap,vto,czgs,czgd,&cgsnb,&cgdnb); qggc = qggnew(vgs,vgd1,phib,vcap,vto,czgs,czgd,&cgsnc,&cgdnc); qggd = qggnew(vgs1,vgd1,phib,vcap,vto,czgs,czgd,&cgsnd,&cgdnd); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MESqgs) = qgga; *(ckt->CKTstate1 + here->MESqgd) = qgga; } *(ckt->CKTstate0+here->MESqgs) = *(ckt->CKTstate1+here->MESqgs) + 0.5 * (qgga-qggb + qggc-qggd); *(ckt->CKTstate0+here->MESqgd) = *(ckt->CKTstate1+here->MESqgd) + 0.5 * (qgga-qggc + qggb-qggd); capgs = cgsna; capgd = cgdna; /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->MESqgs) = capgs; *(ckt->CKTstate0 + here->MESqgd) = capgd; continue; /*go to 1000*/ } /* * transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MESqgs) = *(ckt->CKTstate0 + here->MESqgs); *(ckt->CKTstate1 + here->MESqgd) = *(ckt->CKTstate0 + here->MESqgd); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->MESqgs); if(error) return(error); ggs = ggs + geq; cg = cg + *(ckt->CKTstate0 + here->MEScqgs); error = NIintegrate(ckt,&geq,&ceq,capgd,here->MESqgd); if(error) return(error); ggd = ggd + geq; cg = cg + *(ckt->CKTstate0 + here->MEScqgd); cd = cd - *(ckt->CKTstate0 + here->MEScqgd); cgd = cgd + *(ckt->CKTstate0 + here->MEScqgd); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MEScqgs) = *(ckt->CKTstate0 + here->MEScqgs); *(ckt->CKTstate1 + here->MEScqgd) = *(ckt->CKTstate0 + here->MEScqgd); } } } /* * check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if((icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol * MAX(fabs(cghat),fabs(cg))+ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol)) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->MESvgs) = vgs; *(ckt->CKTstate0 + here->MESvgd) = vgd; *(ckt->CKTstate0 + here->MEScg) = cg; *(ckt->CKTstate0 + here->MEScd) = cd; *(ckt->CKTstate0 + here->MEScgd) = cgd; *(ckt->CKTstate0 + here->MESgm) = gm; *(ckt->CKTstate0 + here->MESgds) = gds; *(ckt->CKTstate0 + here->MESggs) = ggs; *(ckt->CKTstate0 + here->MESggd) = ggd; /* * load current vector */ load: m = here->MESm; ceqgd=model->MEStype*(cgd-ggd*vgd); ceqgs=model->MEStype*((cg-cgd)-ggs*vgs); cdreq=model->MEStype*((cd+cgd)-gds*vds-gm*vgs); *(ckt->CKTrhs + here->MESgateNode) += m * (-ceqgs-ceqgd); *(ckt->CKTrhs + here->MESdrainPrimeNode) += m * (-cdreq+ceqgd); *(ckt->CKTrhs + here->MESsourcePrimeNode) += m * (cdreq+ceqgs); /* * load y matrix */ *(here->MESdrainDrainPrimePtr) += m * (-gdpr); *(here->MESgateDrainPrimePtr) += m * (-ggd); *(here->MESgateSourcePrimePtr) += m * (-ggs); *(here->MESsourceSourcePrimePtr) += m * (-gspr); *(here->MESdrainPrimeDrainPtr) += m * (-gdpr); *(here->MESdrainPrimeGatePtr) += m * (gm-ggd); *(here->MESdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->MESsourcePrimeGatePtr) += m * (-ggs-gm); *(here->MESsourcePrimeSourcePtr) += m * (-gspr); *(here->MESsourcePrimeDrainPrimePtr) += m * (-gds); *(here->MESdrainDrainPtr) += m * (gdpr); *(here->MESgateGatePtr) += m * (ggd+ggs); *(here->MESsourceSourcePtr) += m * (gspr); *(here->MESdrainPrimeDrainPrimePtr) += m * (gdpr+gds+ggd); *(here->MESsourcePrimeSourcePrimePtr) += m * (gspr+gds+gm+ggs); } } return(OK); } /* function qggnew - private, used by MESload*/ static double qggnew( double vgs, double vgd, double phib, double vcap, double vto, double cgs, double cgd, double *cgsnew, double *cgdnew) { double veroot,veff1,veff2,del,vnroot,vnew1,vnew3,vmax,ext; double qroot,qggval,par1,cfact,cplus,cminus; veroot = sqrt( (vgs - vgd) * (vgs - vgd) + vcap*vcap ); veff1 = 0.5 * (vgs + vgd + veroot); veff2 = veff1 - veroot; del = 0.2; vnroot = sqrt( (veff1 - vto)*(veff1 - vto) + del * del ); vnew1 = 0.5 * (veff1 + vto + vnroot); vnew3 = vnew1; vmax = 0.5; if ( vnew1 < vmax ) { ext=0; } else { vnew1 = vmax; ext = (vnew3 - vmax)/sqrt(1 - vmax/phib); } qroot = sqrt(1 - vnew1/phib); qggval = cgs * (2*phib*(1-qroot) + ext) + cgd*veff2; par1 = 0.5 * ( 1 + (veff1-vto)/vnroot); cfact = (vgs- vgd)/veroot; cplus = 0.5 * (1 + cfact); cminus = cplus - cfact; *cgsnew = cgs/qroot*par1*cplus + cgd*cminus; *cgdnew = cgs/qroot*par1*cminus + cgd*cplus; return(qggval); } ngspice-26/src/spicelib/devices/mes/mesinit.c0000644000265600020320000000402612264261473020636 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mesitf.h" #include "mesext.h" #include "mesinit.h" SPICEdev MESinfo = { { "MES", "GaAs MESFET model", &MESnSize, &MESnSize, MESnames, &MESpTSize, MESpTable, &MESmPTSize, MESmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MESparam, /* DEVmodParam */ MESmParam, /* DEVload */ MESload, /* DEVsetup */ MESsetup, /* DEVunsetup */ MESunsetup, /* DEVpzSetup */ MESsetup, /* DEVtemperature*/ MEStemp, /* DEVtrunc */ MEStrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MESacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MESdestroy, /* DEVmodDelete */ MESmDelete, /* DEVdelete */ MESdelete, /* DEVsetic */ MESgetic, /* DEVask */ MESask, /* DEVmodAsk */ MESmAsk, /* DEVpzLoad */ MESpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ MESdisto, /* DEVnoise */ MESnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MESiSize, /* DEVmodSize */ &MESmSize }; SPICEdev * get_mes_info(void) { return &MESinfo; } ngspice-26/src/spicelib/devices/cktcrte.c0000644000265600020320000000330612264261473020041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTcrtElement(ckt,type,inModPtr,inInstPtr,name,subname) * * Create a device of the specified type, with the given name, using * the specified model in the named circuit. */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "dev.h" #include "ngspice/memory.h" int CKTcrtElt(CKTcircuit *ckt, GENmodel *modPtr, GENinstance **inInstPtr, IFuid name) { GENinstance *instPtr = NULL; /* instPtr points to the data struct for per-instance data */ SPICEdev **DEVices; int type; DEVices = devices(); if(!modPtr) return E_NOMOD; instPtr = CKTfndDev(ckt, name); if (instPtr) { if (inInstPtr) *inInstPtr = instPtr; return E_EXISTS; } type = modPtr->GENmodType; #ifdef TRACE /*------ SDB debug statement -------*/ printf("In CKTcrtElt, about to tmalloc new model, type = %d. . . \n", type); #endif instPtr = (GENinstance *) tmalloc((size_t) *DEVices[type]->DEVinstSize); if (instPtr == NULL) return E_NOMEM; /* PN: adding instance number for statistical purpose */ ckt->CKTstat->STATdevNum[type].instNum ++; ckt->CKTstat->STATtotalDev ++; #if 0 printf("device: %s number %d\n", DEVices[type]->DEVpublic.name, ckt->CKTstat->STATdevNum[type].instNum); #endif instPtr->GENname = name; instPtr->GENmodPtr = modPtr; instPtr->GENnextInstance = modPtr->GENinstances; modPtr->GENinstances = instPtr; nghash_insert(ckt->DEVnameHash, name, instPtr); if(inInstPtr != NULL) *inInstPtr = instPtr; return OK; } ngspice-26/src/spicelib/devices/ccvs/0000755000265600020320000000000012264261707017172 5ustar andreasadminngspice-26/src/spicelib/devices/ccvs/ccvsdest.c0000644000265600020320000000141012264261473021150 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ccvsdefs.h" #include "ngspice/suffix.h" void CCVSdestroy(GENmodel **inModel) { CCVSmodel **model = (CCVSmodel**)inModel; CCVSinstance *here; CCVSinstance *prev = NULL; CCVSmodel *mod = *model; CCVSmodel *oldmod = NULL; for( ; mod ; mod = mod->CCVSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->CCVSinstances ; here ; here = here->CCVSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/ccvs/ccvsinit.h0000644000265600020320000000030212264261473021160 0ustar andreasadmin#ifndef _CCVSINIT_H #define _CCVSINIT_H extern IFparm CCVSpTable[ ]; extern char *CCVSnames[ ]; extern int CCVSpTSize; extern int CCVSnSize; extern int CCVSiSize; extern int CCVSmSize; #endif ngspice-26/src/spicelib/devices/ccvs/ccvsdel.c0000644000265600020320000000155512264261473020767 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance **fast = (CCVSinstance**)kill; CCVSinstance **prev = NULL; CCVSinstance *here; for( ; model ; model = model->CCVSnextModel) { prev = &(model->CCVSinstances); for(here = *prev; here ; here = *prev) { if(here->CCVSname == name || (fast && here==*fast) ) { *prev= here->CCVSnextInstance; FREE(here); return(OK); } prev = &(here->CCVSnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/ccvs/ccvsload.c0000644000265600020320000000213012264261473021130 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCVSload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current voltage value into the * sparse matrix previously provided */ { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { *(here->CCVSposIbrptr) += 1.0 ; *(here->CCVSnegIbrptr) -= 1.0 ; *(here->CCVSibrPosptr) += 1.0 ; *(here->CCVSibrNegptr) -= 1.0 ; *(here->CCVSibrContBrptr) -= here->CCVScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/ccvs/ccvsitf.h0000644000265600020320000000026012264261473021002 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_CCVS #define DEV_CCVS SPICEdev *get_ccvs_info(void); #endif ngspice-26/src/spicelib/devices/ccvs/ccvsinit.c0000644000265600020320000000414612264261473021165 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ccvsitf.h" #include "ccvsext.h" #include "ccvsinit.h" SPICEdev CCVSinfo = { { "CCVS", "Linear current controlled current source", &CCVSnSize, &CCVSnSize, CCVSnames, &CCVSpTSize, CCVSpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ CCVSparam, /* DEVmodParam */ NULL, /* DEVload */ CCVSload, /* DEVsetup */ CCVSsetup, /* DEVunsetup */ CCVSunsetup, /* DEVpzSetup */ CCVSsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ CCVSfindBr, /* DEVacLoad */ CCVSload, /* ac and normal load functions identical */ /* DEVaccept */ NULL, /* DEVdestroy */ CCVSdestroy, /* DEVmodDelete */ CCVSmDelete, /* DEVdelete */ CCVSdelete, /* DEVsetic */ NULL, /* DEVask */ CCVSask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ CCVSpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ CCVSsSetup, /* DEVsenLoad */ CCVSsLoad, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ CCVSsAcLoad, /* DEVsenPrint */ CCVSsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &CCVSiSize, /* DEVmodSize */ &CCVSmSize }; SPICEdev * get_ccvs_info(void) { return &CCVSinfo; } ngspice-26/src/spicelib/devices/ccvs/ccvsdefs.h0000644000265600020320000000617512264261473021154 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef CCVS #define CCVS #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* structures used to describe current controlled voltage sources */ /* information used to describe a single instance */ typedef struct sCCVSinstance { struct sCCVSmodel *CCVSmodPtr; /* backpointer to model */ struct sCCVSinstance *CCVSnextInstance; /* pointer to next instance of *current model*/ IFuid CCVSname; /* pointer to character string naming this instance */ int CCVSstate; /* not used */ int CCVSposNode; /* number of positive node of source */ int CCVSnegNode; /* number of negative node of source */ IFuid CCVScontName; /* pointer to name of controlling instance */ int CCVSbranch; /* equation number of branch equation added for v source */ int CCVScontBranch; /* number of branch eq of controlling source */ double CCVScoeff; /* coefficient */ double *CCVSposIbrptr; /* pointer to sparse matrix element at * (positive node, branch equation) */ double *CCVSnegIbrptr; /* pointer to sparse matrix element at * (negative node, branch equation) */ double *CCVSibrPosptr; /* pointer to sparse matrix element at * (branch equation, positive node) */ double *CCVSibrNegptr; /* pointer to sparse matrix element at * (branch equation, negative node) */ double *CCVSibrContBrptr; /* pointer to sparse matrix element at *(branch equation, control branch eq)*/ unsigned CCVScoeffGiven :1 ; /* flag to indicate coeff given */ int CCVSsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } CCVSinstance ; /* per model data */ typedef struct sCCVSmodel { /* model structure for a CCVsource */ int CCVSmodType; /* type index of this device type */ struct sCCVSmodel *CCVSnextModel; /* pointer to next possible model *in linked list */ CCVSinstance * CCVSinstances; /* pointer to list of instances that have this model */ IFuid CCVSmodName; /* pointer to character string naming this model */ } CCVSmodel; /* device parameters */ #define CCVS_TRANS 1 #define CCVS_CONTROL 2 #define CCVS_POS_NODE 3 #define CCVS_NEG_NODE 4 #define CCVS_BR 5 #define CCVS_CONT_BR 6 #define CCVS_TRANS_SENS 7 #define CCVS_CURRENT 8 #define CCVS_POWER 9 #define CCVS_VOLTS 10 /* model parameters */ /* device questions */ #define CCVS_QUEST_SENS_REAL 201 #define CCVS_QUEST_SENS_IMAG 202 #define CCVS_QUEST_SENS_MAG 203 #define CCVS_QUEST_SENS_PH 204 #define CCVS_QUEST_SENS_CPLX 205 #define CCVS_QUEST_SENS_DC 206 /* model questions */ #include "ccvsext.h" #endif /*CCVS*/ ngspice-26/src/spicelib/devices/ccvs/ccvspzld.c0000644000265600020320000000222712264261473021171 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ccvsdefs.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCVSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current voltage value into the * sparse matrix previously provided */ { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; NG_IGNORE(ckt); NG_IGNORE(s); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { *(here->CCVSposIbrptr) += 1.0 ; *(here->CCVSnegIbrptr) -= 1.0 ; *(here->CCVSibrPosptr) += 1.0 ; *(here->CCVSibrNegptr) -= 1.0 ; *(here->CCVSibrContBrptr) += here->CCVScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/ccvs/ccvsmdel.c0000644000265600020320000000176412264261473021146 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { CCVSmodel **model = (CCVSmodel**)inModel; CCVSmodel *modfast = (CCVSmodel*)kill; CCVSinstance *here; CCVSinstance *prev = NULL; CCVSmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->CCVSnextModel)) { if( (*model)->CCVSmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->CCVSnextModel; /* cut deleted device out of list */ for(here = (*model)->CCVSinstances ; here ; here = here->CCVSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/ccvs/ccvsext.h0000644000265600020320000000152012264261473021020 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int CCVSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int CCVSdelete(GENmodel*,IFuid,GENinstance**); extern void CCVSdestroy(GENmodel**); extern int CCVSfindBr(CKTcircuit*,GENmodel*,IFuid); extern int CCVSload(GENmodel*,CKTcircuit*); extern int CCVSmDelete(GENmodel**,IFuid,GENmodel*); extern int CCVSparam(int,IFvalue*,GENinstance*,IFvalue*); extern int CCVSpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int CCVSsAcLoad(GENmodel*,CKTcircuit*); extern int CCVSsLoad(GENmodel*,CKTcircuit*); extern void CCVSsPrint(GENmodel*,CKTcircuit*); extern int CCVSsSetup(SENstruct*,GENmodel*); extern int CCVSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int CCVSunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/ccvs/ccvssset.c0000644000265600020320000000161712264261473021200 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSsSetup(SENstruct *info, GENmodel *inModel) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { if(here->CCVSsenParmNo){ here->CCVSsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/ccvs/ccvssld.c0000644000265600020320000000205412264261473021000 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current sensitivity information * into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSsLoad(GENmodel *inModel, CKTcircuit *ckt) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; double ic; /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { if(here->CCVSsenParmNo){ ic = *(ckt->CKTrhsOld + here->CCVScontBranch); *(ckt->CKTsenInfo->SEN_RHS[here->CCVSbranch] + here->CCVSsenParmNo) -= ic; } } } return(OK); } ngspice-26/src/spicelib/devices/ccvs/ccvssprt.c0000644000265600020320000000312112264261473021202 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* Pretty print the sensitivity info for all * the CCVS in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void CCVSsPrint(GENmodel *inModel, CKTcircuit *ckt) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; printf("CURRENT CONTROLLED VOLTAGE SOURCES-----------------\n"); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { printf("Model name:%s\n",model->CCVSmodName); /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { printf(" Instance name:%s\n",here->CCVSname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->CCVSposNode), CKTnodName(ckt,here->CCVSnegNode)); printf(" Controlling source name: %s\n", here->CCVScontName); printf(" Branch equation number: %s\n", CKTnodName(ckt,here->CCVSbranch)); printf(" Controlling Branch equation number: %s\n", CKTnodName(ckt,here->CCVScontBranch)); printf(" Coefficient: %f\n",here->CCVScoeff); printf(" CCVSsenParmNo:%d\n",here->CCVSsenParmNo); } } } ngspice-26/src/spicelib/devices/ccvs/ccvs.c0000644000265600020320000000306712264261473020302 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ccvsdefs.h" #include "ngspice/suffix.h" /* current controlled voltage source */ IFparm CCVSpTable[] = { /* parameters */ IOPU("gain", CCVS_TRANS, IF_REAL ,"Transresistance (gain)"), IOPU("control", CCVS_CONTROL, IF_INSTANCE,"Controlling voltage source"), IP("sens_trans",CCVS_TRANS_SENS,IF_FLAG, "flag to request sens. WRT transimpedance"), OPU("pos_node", CCVS_POS_NODE,IF_INTEGER, "Positive node of source"), OPU("neg_node", CCVS_NEG_NODE,IF_INTEGER, "Negative node of source"), OP("i", CCVS_CURRENT, IF_REAL, "CCVS output current"), OP("v", CCVS_VOLTS, IF_REAL, "CCVS output voltage"), OP("p", CCVS_POWER, IF_REAL, "CCVS power"), OPU("sens_dc", CCVS_QUEST_SENS_DC, IF_REAL,"dc sensitivity "), OPU("sens_real", CCVS_QUEST_SENS_REAL,IF_REAL,"real part of ac sensitivity"), OPU("sens_imag", CCVS_QUEST_SENS_IMAG,IF_REAL,"imag part of ac sensitivity"), OPU("sens_mag", CCVS_QUEST_SENS_MAG, IF_REAL,"sensitivity of ac magnitude"), OPU("sens_ph", CCVS_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx", CCVS_QUEST_SENS_CPLX,IF_COMPLEX,"ac sensitivity") }; char *CCVSnames[] = { "H+", "H-" }; int CCVSnSize = NUMELEMS(CCVSnames); int CCVSpTSize = NUMELEMS(CCVSpTable); int CCVSmPTSize = 0; int CCVSiSize = sizeof(CCVSinstance); int CCVSmSize = sizeof(CCVSmodel); ngspice-26/src/spicelib/devices/ccvs/Makefile.am0000644000265600020320000000074512264261473021234 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libccvs.la libccvs_la_SOURCES = \ ccvs.c \ ccvsask.c \ ccvsdefs.h \ ccvsdel.c \ ccvsdest.c \ ccvsext.h \ ccvsfbr.c \ ccvsinit.c \ ccvsinit.h \ ccvsitf.h \ ccvsload.c \ ccvsmdel.c \ ccvspar.c \ ccvspzld.c \ ccvssacl.c \ ccvsset.c \ ccvssld.c \ ccvssprt.c \ ccvssset.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/ccvs/ccvspar.c0000644000265600020320000000153112264261473020777 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CCVSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { CCVSinstance *here = (CCVSinstance*)inst; NG_IGNORE(select); switch(param) { case CCVS_TRANS: here->CCVScoeff = value->rValue; here->CCVScoeffGiven = TRUE; break; case CCVS_CONTROL: here->CCVScontName = value->uValue; break; case CCVS_TRANS_SENS: here->CCVSsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/ccvs/Makefile.in0000644000265600020320000004240712264261536021246 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/ccvs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libccvs_la_LIBADD = am_libccvs_la_OBJECTS = ccvs.lo ccvsask.lo ccvsdel.lo ccvsdest.lo \ ccvsfbr.lo ccvsinit.lo ccvsload.lo ccvsmdel.lo ccvspar.lo \ ccvspzld.lo ccvssacl.lo ccvsset.lo ccvssld.lo ccvssprt.lo \ ccvssset.lo libccvs_la_OBJECTS = $(am_libccvs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libccvs_la_SOURCES) DIST_SOURCES = $(libccvs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libccvs.la libccvs_la_SOURCES = \ ccvs.c \ ccvsask.c \ ccvsdefs.h \ ccvsdel.c \ ccvsdest.c \ ccvsext.h \ ccvsfbr.c \ ccvsinit.c \ ccvsinit.h \ ccvsitf.h \ ccvsload.c \ ccvsmdel.c \ ccvspar.c \ ccvspzld.c \ ccvssacl.c \ ccvsset.c \ ccvssld.c \ ccvssprt.c \ ccvssset.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/ccvs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/ccvs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libccvs.la: $(libccvs_la_OBJECTS) $(libccvs_la_DEPENDENCIES) $(EXTRA_libccvs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libccvs_la_OBJECTS) $(libccvs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsfbr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvspar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvspzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvssacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvssld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvssprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ccvssset.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/ccvs/ccvsset.c0000644000265600020320000000526012264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* load the voltage source structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; int error; CKTnode *tmp; NG_IGNORE(states); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { if(here->CCVSposNode == here->CCVSnegNode) { SPfrontEnd->IFerror (ERR_FATAL, "instance %s is a shorted CCVS", &here->CCVSname); return(E_UNSUPP); } if(here->CCVSbranch==0) { error = CKTmkCur(ckt,&tmp,here->CCVSname, "branch"); if(error) return(error); here->CCVSbranch = tmp->number; } here->CCVScontBranch = CKTfndBranch(ckt,here->CCVScontName); if(here->CCVScontBranch == 0) { IFuid namarray[2]; namarray[0] = here->CCVSname; namarray[1] = here->CCVScontName; SPfrontEnd->IFerror (ERR_FATAL, "%s: unknown controlling source %s",namarray); return(E_BADPARM); } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(CCVSposIbrptr, CCVSposNode, CCVSbranch); TSTALLOC(CCVSnegIbrptr, CCVSnegNode, CCVSbranch); TSTALLOC(CCVSibrNegptr, CCVSbranch, CCVSnegNode); TSTALLOC(CCVSibrPosptr, CCVSbranch, CCVSposNode); TSTALLOC(CCVSibrContBrptr, CCVSbranch, CCVScontBranch); } } return(OK); } int CCVSunsetup(GENmodel *inModel, CKTcircuit *ckt) { CCVSmodel *model; CCVSinstance *here; for (model = (CCVSmodel *)inModel; model != NULL; model = model->CCVSnextModel) { for (here = model->CCVSinstances; here != NULL; here=here->CCVSnextInstance) { if (here->CCVSbranch) { CKTdltNNum(ckt, here->CCVSbranch); here->CCVSbranch = 0; } } } return OK; } ngspice-26/src/spicelib/devices/ccvs/ccvsfbr.c0000644000265600020320000000171412264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; int error; CKTnode *tmp; for( ; model != NULL; model = model->CCVSnextModel) { for (here = model->CCVSinstances; here != NULL; here = here->CCVSnextInstance) { if(here->CCVSname == name) { if(here->CCVSbranch == 0) { error = CKTmkCur(ckt,&tmp, here->CCVSname,"branch"); if(error) return(error); here->CCVSbranch = tmp->number; } return(here->CCVSbranch); } } } return(0); } ngspice-26/src/spicelib/devices/ccvs/ccvsask.c0000644000265600020320000001147312264261473021001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* * This routine gives access to the internal device parameters * of Current Controlled Voltage Source */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CCVSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { CCVSinstance *here = (CCVSinstance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case CCVS_TRANS: value->rValue = here->CCVScoeff; return (OK); case CCVS_CONTROL: value->uValue = here->CCVScontName; return (OK); case CCVS_POS_NODE: value->iValue = here->CCVSposNode; return (OK); case CCVS_NEG_NODE: value->iValue = here->CCVSnegNode; return (OK); case CCVS_BR: value->iValue = here->CCVSbranch; return (OK); case CCVS_CONT_BR: value->iValue = here->CCVScontBranch; return (OK); case CCVS_CURRENT : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CCVSask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = *(ckt->CKTrhsOld+here->CCVSbranch); } return(OK); case CCVS_VOLTS : value->rValue = (*(ckt->CKTrhsOld + here->CCVSposNode) - *(ckt->CKTrhsOld + here->CCVSnegNode)); return(OK); case CCVS_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CCVSask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTrhsOld + here->CCVSbranch) * (*(ckt->CKTrhsOld + here->CCVSposNode) - *(ckt->CKTrhsOld + here->CCVSnegNode)); } return(OK); case CCVS_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->CCVSsenParmNo); } return(OK); case CCVS_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCVSsenParmNo); } return(OK); case CCVS_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCVSsenParmNo); } return(OK); case CCVS_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCVSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCVSsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case CCVS_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCVSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCVSsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case CCVS_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCVSsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCVSsenParmNo); } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/ccvs/ccvssacl.c0000644000265600020320000000234312264261473021141 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current ac sensitivity information * into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ccvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCVSsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { CCVSmodel *model = (CCVSmodel*)inModel; CCVSinstance *here; double ic,i_ic; /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCVSinstances; here != NULL ; here=here->CCVSnextInstance) { if(here->CCVSsenParmNo){ ic = *(ckt->CKTrhsOld + here->CCVScontBranch); i_ic = *(ckt->CKTirhsOld + here->CCVScontBranch); *(ckt->CKTsenInfo->SEN_RHS[here->CCVSbranch] + here->CCVSsenParmNo) -= ic; *(ckt->CKTsenInfo->SEN_iRHS[here->CCVSbranch] + here->CCVSsenParmNo) -= i_ic; } } } return(OK); } ngspice-26/src/spicelib/devices/vbic/0000755000265600020320000000000012264261711017152 5ustar andreasadminngspice-26/src/spicelib/devices/vbic/vbictemp.c0000644000265600020320000004140112264261473021134 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "vbicdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" /* ARGSUSED */ int iret, vbic_4T_it_cf_t(double *, double *, double *); int VBICtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-compute many useful parameters */ { VBICmodel *model = (VBICmodel *)inModel; VBICinstance *here; double p[108], pnom[108], TAMB; double vt; /* loop through all the bipolar models */ for( ; model != NULL; model = model->VBICnextModel ) { if(!model->VBICtnomGiven) model->VBICtnom = ckt->CKTnomTemp - CONSTCtoK; if(model->VBICextCollResistGiven && model->VBICextCollResist != 0.0) { model->VBICcollectorConduct = 1.0 / model->VBICextCollResist; } else { model->VBICcollectorConduct = 0.0; } if(model->VBICextBaseResistGiven && model->VBICextBaseResist != 0.0) { model->VBICbaseConduct = 1.0 / model->VBICextBaseResist; } else { model->VBICbaseConduct = 0.0; } if(model->VBICemitterResistGiven && model->VBICemitterResist != 0.0) { model->VBICemitterConduct = 1.0 / model->VBICemitterResist; } else { model->VBICemitterConduct = 0.0; } if(model->VBICsubstrateResistGiven && model->VBICsubstrateResist != 0.0) { model->VBICsubstrateConduct = 1.0 / model->VBICsubstrateResist; } else { model->VBICsubstrateConduct = 0.0; } if(model->VBICtempExpRBGiven && !model->VBICtempExpRBIGiven) { model->VBICtempExpRBI = model->VBICtempExpRB; } if(model->VBICtempExpRBGiven && !model->VBICtempExpRBXGiven) { model->VBICtempExpRBX = model->VBICtempExpRB; } if(model->VBICtempExpRCGiven && !model->VBICtempExpRCIGiven) { model->VBICtempExpRCI = model->VBICtempExpRC; } if(model->VBICtempExpRCGiven && !model->VBICtempExpRCXGiven) { model->VBICtempExpRCX = model->VBICtempExpRC; } /* loop through all the instances of the model */ for (here = model->VBICinstances; here != NULL ; here=here->VBICnextInstance) { if(!here->VBICtempGiven) here->VBICtemp = ckt->CKTtemp; if(here->VBICdtempGiven) here->VBICtemp = here->VBICtemp + here->VBICdtemp; TAMB = here->VBICtemp - CONSTCtoK; pnom[0] = model->VBICtnom; pnom[1] = model->VBICextCollResist; pnom[2] = model->VBICintCollResist; pnom[3] = model->VBICepiSatVoltage; pnom[4] = model->VBICepiDoping; pnom[5] = model->VBIChighCurFac; pnom[6] = model->VBICextBaseResist; pnom[7] = model->VBICintBaseResist; pnom[8] = model->VBICemitterResist; pnom[9] = model->VBICsubstrateResist; pnom[10] = model->VBICparBaseResist; pnom[11] = model->VBICsatCur; pnom[12] = model->VBICemissionCoeffF; pnom[13] = model->VBICemissionCoeffR; pnom[14] = model->VBICdeplCapLimitF; pnom[15] = model->VBICextOverlapCapBE; pnom[16] = model->VBICdepletionCapBE; pnom[17] = model->VBICpotentialBE; pnom[18] = model->VBICjunctionExpBE; pnom[19] = model->VBICsmoothCapBE; pnom[20] = model->VBICextOverlapCapBC; pnom[21] = model->VBICdepletionCapBC; pnom[22] = model->VBICepiCharge; pnom[23] = model->VBICextCapBC; pnom[24] = model->VBICpotentialBC; pnom[25] = model->VBICjunctionExpBC; pnom[26] = model->VBICsmoothCapBC; pnom[27] = model->VBICextCapSC; pnom[28] = model->VBICpotentialSC; pnom[29] = model->VBICjunctionExpSC; pnom[30] = model->VBICsmoothCapSC; pnom[31] = model->VBICidealSatCurBE; pnom[32] = model->VBICportionIBEI; pnom[33] = model->VBICidealEmissCoeffBE; pnom[34] = model->VBICnidealSatCurBE; pnom[35] = model->VBICnidealEmissCoeffBE; pnom[36] = model->VBICidealSatCurBC; pnom[37] = model->VBICidealEmissCoeffBC; pnom[38] = model->VBICnidealSatCurBC; pnom[39] = model->VBICnidealEmissCoeffBC; pnom[40] = model->VBICavalanchePar1BC; pnom[41] = model->VBICavalanchePar2BC; pnom[42] = model->VBICparasitSatCur; pnom[43] = model->VBICportionICCP; pnom[44] = model->VBICparasitFwdEmissCoeff; pnom[45] = model->VBICidealParasitSatCurBE; pnom[46] = model->VBICnidealParasitSatCurBE; pnom[47] = model->VBICidealParasitSatCurBC; pnom[48] = model->VBICidealParasitEmissCoeffBC; pnom[49] = model->VBICnidealParasitSatCurBC; pnom[50] = model->VBICnidealParasitEmissCoeffBC; pnom[51] = model->VBICearlyVoltF; pnom[52] = model->VBICearlyVoltR; pnom[53] = model->VBICrollOffF; pnom[54] = model->VBICrollOffR; pnom[55] = model->VBICparRollOff; pnom[56] = model->VBICtransitTimeF; pnom[57] = model->VBICvarTransitTimeF; pnom[58] = model->VBICtransitTimeBiasCoeffF; pnom[59] = model->VBICtransitTimeFVBC; pnom[60] = model->VBICtransitTimeHighCurrentF; pnom[61] = model->VBICtransitTimeR; pnom[62] = model->VBICdelayTimeF; pnom[63] = model->VBICfNcoef; pnom[64] = model->VBICfNexpA; pnom[65] = model->VBICfNexpB; pnom[66] = model->VBICtempExpRE; pnom[67] = model->VBICtempExpRBI; pnom[68] = model->VBICtempExpRCI; pnom[69] = model->VBICtempExpRS; pnom[70] = model->VBICtempExpVO; pnom[71] = model->VBICactivEnergyEA; pnom[72] = model->VBICactivEnergyEAIE; pnom[73] = model->VBICactivEnergyEAIC; pnom[74] = model->VBICactivEnergyEAIS; pnom[75] = model->VBICactivEnergyEANE; pnom[76] = model->VBICactivEnergyEANC; pnom[77] = model->VBICactivEnergyEANS; pnom[78] = model->VBICtempExpIS; pnom[79] = model->VBICtempExpII; pnom[80] = model->VBICtempExpIN; pnom[81] = model->VBICtempExpNF; pnom[82] = model->VBICtempExpAVC; pnom[83] = model->VBICthermalResist; pnom[84] = model->VBICthermalCapacitance; pnom[85] = model->VBICpunchThroughVoltageBC; pnom[86] = model->VBICdeplCapCoeff1; pnom[87] = model->VBICfixedCapacitanceCS; pnom[88] = model->VBICsgpQBselector; pnom[89] = model->VBIChighCurrentBetaRolloff; pnom[90] = model->VBICtempExpIKF; pnom[91] = model->VBICtempExpRCX; pnom[92] = model->VBICtempExpRBX; pnom[93] = model->VBICtempExpRBP; pnom[94] = model->VBICsepISRR; pnom[95] = model->VBICtempExpXISR; pnom[96] = model->VBICdear; pnom[97] = model->VBICeap; pnom[98] = model->VBICvbbe; pnom[99] = model->VBICnbbe; pnom[100] = model->VBICibbe; pnom[101] = model->VBICtvbbe1; pnom[102] = model->VBICtvbbe2; pnom[103] = model->VBICtnbbe; pnom[104] = model->VBICebbe; pnom[105] = model->VBIClocTempDiff; pnom[106] = model->VBICrevVersion; pnom[107] = model->VBICrefVersion; iret = vbic_4T_it_cf_t(p,pnom,&TAMB); here->VBICttnom = p[0]; here->VBICtextCollResist = p[1]; here->VBICtintCollResist = p[2]; here->VBICtepiSatVoltage = p[3]; here->VBICtepiDoping = p[4]; here->VBICtextBaseResist = p[6]; here->VBICtintBaseResist = p[7]; here->VBICtemitterResist = p[8]; here->VBICtsubstrateResist = p[9]; here->VBICtparBaseResist = p[10]; here->VBICtsatCur = p[11]; here->VBICtemissionCoeffF = p[12]; here->VBICtemissionCoeffR = p[13]; here->VBICtdepletionCapBE = p[16]; here->VBICtpotentialBE = p[17]; here->VBICtdepletionCapBC = p[21]; here->VBICtextCapBC = p[23]; here->VBICtpotentialBC = p[24]; here->VBICtextCapSC = p[27]; here->VBICtpotentialSC = p[28]; here->VBICtidealSatCurBE = p[31]; here->VBICtnidealSatCurBE = p[34]; here->VBICtidealSatCurBC = p[36]; here->VBICtnidealSatCurBC = p[38]; here->VBICtavalanchePar2BC = p[41]; here->VBICtparasitSatCur = p[42]; here->VBICtidealParasitSatCurBE = p[45]; here->VBICtnidealParasitSatCurBE = p[46]; here->VBICtidealParasitSatCurBC = p[47]; here->VBICtnidealParasitSatCurBC = p[49]; here->VBICtrollOffF = p[53]; here->VBICtsepISRR = p[94]; here->VBICtvbbe = p[98]; here->VBICtnbbe = p[99]; vt = here->VBICtemp * CONSTKoverQ; here->VBICtVcrit = vt * log(vt / (CONSTroot2*model->VBICsatCur*here->VBICarea*here->VBICm)); } } return(OK); } int vbic_4T_it_cf_t(double *p, double *pnom, double *TAMB) { double Tini, Tdev, Vtv, rT, dT, xvar1; double xvar2, xvar3, xvar4, xvar5, xvar6, psiio; double psiin; /* Direct copy p<-pnom for temperature independent parameters */ p[5]=pnom[5]; p[14]=pnom[14]; p[15]=pnom[15]; p[18]=pnom[18]; p[19]=pnom[19]; p[20]=pnom[20]; p[22]=pnom[22]; p[25]=pnom[25]; p[26]=pnom[26]; p[29]=pnom[29]; p[30]=pnom[30]; p[32]=pnom[32]; p[33]=pnom[33]; p[35]=pnom[35]; p[37]=pnom[37]; p[39]=pnom[39]; p[40]=pnom[40]; p[43]=pnom[43]; p[44]=pnom[44]; p[48]=pnom[48]; p[50]=pnom[50]; p[51]=pnom[51]; p[52]=pnom[52]; p[54]=pnom[54]; p[55]=pnom[55]; p[56]=pnom[56]; p[57]=pnom[57]; p[58]=pnom[58]; p[59]=pnom[59]; p[60]=pnom[60]; p[61]=pnom[61]; p[62]=pnom[62]; p[63]=pnom[63]; p[64]=pnom[64]; p[65]=pnom[65]; p[66]=pnom[66]; p[67]=pnom[67]; p[68]=pnom[68]; p[69]=pnom[69]; p[70]=pnom[70]; p[71]=pnom[71]; p[72]=pnom[72]; p[73]=pnom[73]; p[74]=pnom[74]; p[75]=pnom[75]; p[76]=pnom[76]; p[77]=pnom[77]; p[78]=pnom[78]; p[79]=pnom[79]; p[80]=pnom[80]; p[81]=pnom[81]; p[82]=pnom[82]; p[83]=pnom[83]; p[84]=pnom[84]; p[85]=pnom[85]; p[86]=pnom[86]; p[87]=pnom[87]; p[88]=pnom[88]; p[89]=pnom[89]; p[90]=pnom[90]; p[91]=pnom[91]; p[92]=pnom[92]; p[93]=pnom[93]; p[95]=pnom[95]; p[96]=pnom[96]; p[97]=pnom[97]; p[100]=pnom[100]; p[101]=pnom[101]; p[102]=pnom[102]; p[103]=pnom[103]; p[105]=pnom[105]; p[106]=pnom[106]; p[107]=pnom[107]; /* Temperature mappings for model parameters */ Tini=2.731500e+02+pnom[0]; Tdev=(2.731500e+02+(*TAMB))+pnom[105]; Vtv=1.380662e-23*Tdev/1.602189e-19; rT=Tdev/Tini; dT=Tdev-Tini; xvar1=pow(rT,pnom[90]); p[53]=pnom[53]*xvar1; xvar1=pow(rT,pnom[91]); p[1]=pnom[1]*xvar1; xvar1=pow(rT,pnom[68]); p[2]=pnom[2]*xvar1; xvar1=pow(rT,pnom[92]); p[6]=pnom[6]*xvar1; xvar1=pow(rT,pnom[67]); p[7]=pnom[7]*xvar1; xvar1=pow(rT,pnom[66]); p[8]=pnom[8]*xvar1; xvar1=pow(rT,pnom[69]); p[9]=pnom[9]*xvar1; xvar1=pow(rT,pnom[93]); p[10]=pnom[10]*xvar1; xvar2=pow(rT,pnom[78]); xvar3=-pnom[71]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[12]); xvar6=pow(xvar1,xvar5); p[11]=pnom[11]*xvar6; xvar2=pow(rT,pnom[95]); xvar3=-pnom[96]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[13]); xvar6=pow(xvar1,xvar5); p[94]=pnom[94]*xvar6; xvar2=pow(rT,pnom[78]); xvar3=-pnom[97]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[44]); xvar6=pow(xvar1,xvar5); p[42]=pnom[42]*xvar6; xvar2=pow(rT,pnom[79]); xvar3=-pnom[72]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[33]); xvar6=pow(xvar1,xvar5); p[31]=pnom[31]*xvar6; xvar2=pow(rT,pnom[80]); xvar3=-pnom[75]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[35]); xvar6=pow(xvar1,xvar5); p[34]=pnom[34]*xvar6; xvar2=pow(rT,pnom[79]); xvar3=-pnom[73]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[37]); xvar6=pow(xvar1,xvar5); p[36]=pnom[36]*xvar6; xvar2=pow(rT,pnom[80]); xvar3=-pnom[76]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[39]); xvar6=pow(xvar1,xvar5); p[38]=pnom[38]*xvar6; xvar2=pow(rT,pnom[79]); xvar3=-pnom[73]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[37]); xvar6=pow(xvar1,xvar5); p[45]=pnom[45]*xvar6; xvar2=pow(rT,pnom[80]); xvar3=-pnom[76]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[39]); xvar6=pow(xvar1,xvar5); p[46]=pnom[46]*xvar6; xvar2=pow(rT,pnom[79]); xvar3=-pnom[74]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[48]); xvar6=pow(xvar1,xvar5); p[47]=pnom[47]*xvar6; xvar2=pow(rT,pnom[80]); xvar3=-pnom[77]*(1.0-rT)/Vtv; xvar4=exp(xvar3); xvar1=(xvar2*xvar4); xvar5=(1.0/pnom[50]); xvar6=pow(xvar1,xvar5); p[49]=pnom[49]*xvar6; p[12]=pnom[12]*(1.0+dT*pnom[81]); p[13]=pnom[13]*(1.0+dT*pnom[81]); p[41]=pnom[41]*(1.0+dT*pnom[82]); p[98]=pnom[98]*(1.0+dT*(pnom[101]+dT*pnom[102])); p[99]=pnom[99]*(1.0+dT*pnom[103]); xvar2=0.5*pnom[17]*rT/Vtv; xvar3=exp(xvar2); xvar4=-0.5*pnom[17]*rT/Vtv; xvar5=exp(xvar4); xvar1=xvar3-xvar5; xvar6=log(xvar1); psiio=2.0*(Vtv/rT)*xvar6; xvar1=log(rT); psiin=psiio*rT-3.0*Vtv*xvar1-pnom[72]*(rT-1.0); xvar2=-psiin/Vtv; xvar3=exp(xvar2); xvar1=0.5*(1.0+sqrt(1.0+4.0*xvar3)); xvar4=log(xvar1); p[17]=psiin+2.0*Vtv*xvar4; xvar2=0.5*pnom[24]*rT/Vtv; xvar3=exp(xvar2); xvar4=-0.5*pnom[24]*rT/Vtv; xvar5=exp(xvar4); xvar1=xvar3-xvar5; xvar6=log(xvar1); psiio=2.0*(Vtv/rT)*xvar6; xvar1=log(rT); psiin=psiio*rT-3.0*Vtv*xvar1-pnom[73]*(rT-1.0); xvar2=-psiin/Vtv; xvar3=exp(xvar2); xvar1=0.5*(1.0+sqrt(1.0+4.0*xvar3)); xvar4=log(xvar1); p[24]=psiin+2.0*Vtv*xvar4; xvar2=0.5*pnom[28]*rT/Vtv; xvar3=exp(xvar2); xvar4=-0.5*pnom[28]*rT/Vtv; xvar5=exp(xvar4); xvar1=xvar3-xvar5; xvar6=log(xvar1); psiio=2.0*(Vtv/rT)*xvar6; xvar1=log(rT); psiin=psiio*rT-3.0*Vtv*xvar1-pnom[74]*(rT-1.0); xvar2=-psiin/Vtv; xvar3=exp(xvar2); xvar1=0.5*(1.0+sqrt(1.0+4.0*xvar3)); xvar4=log(xvar1); p[28]=psiin+2.0*Vtv*xvar4; xvar1=pnom[17]/p[17]; xvar2=pow(xvar1,pnom[18]); p[16]=pnom[16]*xvar2; xvar1=pnom[24]/p[24]; xvar2=pow(xvar1,pnom[25]); p[21]=pnom[21]*xvar2; xvar1=pnom[24]/p[24]; xvar2=pow(xvar1,pnom[25]); p[23]=pnom[23]*xvar2; xvar1=pnom[28]/p[28]; xvar2=pow(xvar1,pnom[29]); p[27]=pnom[27]*xvar2; xvar1=pow(rT,pnom[78]); xvar2=-pnom[71]*(1.0-rT)/Vtv; xvar3=exp(xvar2); p[4]=pnom[4]*xvar1*xvar3; xvar1=pow(rT,pnom[70]); p[3]=pnom[3]*xvar1; xvar1=-p[98]/(p[99]*Vtv); p[104]=exp(xvar1); p[0]=(*TAMB)+p[105]; return(0); } ngspice-26/src/spicelib/devices/vbic/vbicgetic.c0000644000265600020320000000243612264261473021267 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine gets the device initial conditions for the VBICs * from the RHS vector */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICgetic(GENmodel *inModel, CKTcircuit *ckt) { VBICmodel *model = (VBICmodel*)inModel; VBICinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->VBICnextModel) { for(here = model->VBICinstances; here ; here = here->VBICnextInstance) { if(!here->VBICicVBEGiven) { here->VBICicVBE = *(ckt->CKTrhs + here->VBICbaseNode) - *(ckt->CKTrhs + here->VBICemitNode); } if(!here->VBICicVCEGiven) { here->VBICicVCE = *(ckt->CKTrhs + here->VBICcollNode) - *(ckt->CKTrhs + here->VBICemitNode); } } } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicparam.c0000644000265600020320000000401512264261473021267 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine sets instance parameters for * VBICs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VBICparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select) { VBICinstance *here = (VBICinstance*)instPtr; NG_IGNORE(select); switch(param) { case VBIC_AREA: here->VBICarea = value->rValue; here->VBICareaGiven = TRUE; break; case VBIC_OFF: here->VBICoff = (value->iValue != 0); break; case VBIC_IC_VBE: here->VBICicVBE = value->rValue; here->VBICicVBEGiven = TRUE; break; case VBIC_IC_VCE: here->VBICicVCE = value->rValue; here->VBICicVCEGiven = TRUE; break; case VBIC_TEMP: here->VBICtemp = value->rValue+CONSTCtoK; here->VBICtempGiven = TRUE; break; case VBIC_DTEMP: here->VBICdtemp = value->rValue; here->VBICdtempGiven = TRUE; break; case VBIC_M: here->VBICm = value->rValue; here->VBICmGiven = TRUE; break; case VBIC_IC : switch(value->v.numValue) { case 2: here->VBICicVCE = *(value->v.vec.rVec+1); here->VBICicVCEGiven = TRUE; case 1: here->VBICicVBE = *(value->v.vec.rVec); here->VBICicVBEGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicdefs.h0000644000265600020320000007044412264261473021126 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #ifndef VBIC #define VBIC #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures to describe Bipolar Junction Transistors */ /* data needed to describe a single instance */ typedef struct sVBICinstance { struct sVBICmodel *VBICmodPtr; /* backpointer to model */ struct sVBICinstance *VBICnextInstance; /* pointer to next instance of current model*/ IFuid VBICname; /* pointer to character string naming this instance */ int VBICstate; /* pointer to start of state vector for vbic */ int VBICcollNode; /* number of collector node of vbic */ int VBICbaseNode; /* number of base node of vbic */ int VBICemitNode; /* number of emitter node of vbic */ int VBICsubsNode; /* number of substrate node of vbic */ int VBICcollCXNode; /* number of internal collector node of vbic */ int VBICcollCINode; /* number of internal collector node of vbic */ int VBICbaseBXNode; /* number of internal base node of vbic */ int VBICbaseBINode; /* number of internal base node of vbic */ int VBICemitEINode; /* number of internal emitter node of vbic */ int VBICbaseBPNode; /* number of internal base node of vbic */ int VBICsubsSINode; /* number of internal substrate node */ double VBICarea; /* area factor for the vbic */ double VBICicVBE; /* initial condition voltage B-E*/ double VBICicVCE; /* initial condition voltage C-E*/ double VBICtemp; /* instance temperature */ double VBICdtemp; /* instance delta temperature */ double VBICm; /* multiply factor for the vbic */ double VBICtVcrit; double VBICttnom; /* temperature adjusted model parameters per instance */ double VBICtextCollResist; double VBICtintCollResist; double VBICtepiSatVoltage; double VBICtepiDoping; double VBICtextBaseResist; double VBICtintBaseResist; double VBICtemitterResist; double VBICtsubstrateResist; double VBICtparBaseResist; double VBICtsatCur; double VBICtemissionCoeffF; double VBICtemissionCoeffR; double VBICtdepletionCapBE; double VBICtpotentialBE; double VBICtdepletionCapBC; double VBICtextCapBC; double VBICtpotentialBC; double VBICtextCapSC; double VBICtpotentialSC; double VBICtidealSatCurBE; double VBICtnidealSatCurBE; double VBICtidealSatCurBC; double VBICtnidealSatCurBC; double VBICtavalanchePar2BC; double VBICtparasitSatCur; double VBICtidealParasitSatCurBE; double VBICtnidealParasitSatCurBE; double VBICtidealParasitSatCurBC; double VBICtnidealParasitSatCurBC; double VBICtrollOffF; double VBICtsepISRR; double VBICtvbbe; double VBICtnbbe; double *VBICcollCollPtr; /* pointer to sparse matrix at * (collector,collector) */ double *VBICbaseBasePtr; /* pointer to sparse matrix at * (base,base) */ double *VBICemitEmitPtr; /* pointer to sparse matrix at * (emitter,emitter) */ double *VBICsubsSubsPtr; /* pointer to sparse matrix at * (substrate,substrate) */ double *VBICcollCXCollCXPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICcollCICollCIPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICbaseBXBaseBXPtr; /* pointer to sparse matrix at * (base prime,base prime) */ double *VBICbaseBIBaseBIPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICbaseBPBaseBPPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICemitEIEmitEIPtr; /* pointer to sparse matrix at * (emitter prime,emitter prime) */ double *VBICsubsSISubsSIPtr; /* pointer to sparse matrix at * (substrate prime, substrate prime) */ double *VBICbaseEmitPtr; /* pointer to sparse matrix at * (base,emit) */ double *VBICemitBasePtr; /* pointer to sparse matrix at * (emit,base) */ double *VBICbaseCollPtr; /* pointer to sparse matrix at * (base,coll) */ double *VBICcollBasePtr; /* pointer to sparse matrix at * (coll,base) */ double *VBICcollCollCXPtr; /* pointer to sparse matrix at * (collector,collector prime) */ double *VBICbaseBaseBXPtr; /* pointer to sparse matrix at * (base,base prime) */ double *VBICemitEmitEIPtr; /* pointer to sparse matrix at * (emitter,emitter prime) */ double *VBICsubsSubsSIPtr; /* pointer to sparse matrix at * (substrate, Substrate connection) */ double *VBICcollCXCollCIPtr; /* pointer to sparse matrix at * (collector prime,base prime) */ double *VBICcollCXBaseBXPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICcollCXBaseBIPtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *VBICcollCXBaseBPPtr; /* pointer to sparse matrix at * (collector prime,base prime) */ double *VBICcollCIBaseBIPtr; /* pointer to sparse matrix at * (collector prime,base) */ double *VBICcollCIEmitEIPtr; /* pointer to sparse matrix at * (collector prime,emitter prime) */ double *VBICbaseBXBaseBIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBXEmitEIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBXBaseBPPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBXSubsSIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBIEmitEIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBPSubsSIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICcollCXCollPtr; /* pointer to sparse matrix at * (collector prime,collector) */ double *VBICbaseBXBasePtr; /* pointer to sparse matrix at * (base prime,base ) */ double *VBICemitEIEmitPtr; /* pointer to sparse matrix at * (emitter prime,emitter) */ double *VBICsubsSISubsPtr; /* pointer to sparse matrix at * (Substrate connection, substrate) */ double *VBICcollCICollCXPtr; /* pointer to sparse matrix at * (collector prime,base prime) */ double *VBICbaseBICollCXPtr; /* pointer to sparse matrix at * (base prime,collector prime) */ double *VBICbaseBPCollCXPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICbaseBXCollCIPtr; /* pointer to sparse matrix at * (base,collector prime) */ double *VBICbaseBICollCIPtr; /* pointer to sparse matrix at * (base,collector prime) */ double *VBICemitEICollCIPtr; /* pointer to sparse matrix at * (emitter prime,collector prime) */ double *VBICbaseBPCollCIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICsubsSICollCIPtr; /* pointer to sparse matrix at * (substrate,collector prime) */ double *VBICbaseBIBaseBXPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICemitEIBaseBXPtr; /* pointer to sparse matrix at * (emitter prime,base prime) */ double *VBICbaseBPBaseBXPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICsubsSIBaseBXPtr; /* pointer to sparse matrix at * (substrate,substrate) */ double *VBICemitEIBaseBIPtr; /* pointer to sparse matrix at * (emitter prime,base prime) */ double *VBICbaseBPBaseBIPtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *VBICsubsSIBaseBIPtr; /* pointer to sparse matrix at * (substrate,base prime) */ double *VBICsubsSIBaseBPPtr; /* pointer to sparse matrix at * (substrate,substrate) */ unsigned VBICareaGiven :1; /* flag to indicate area was specified */ unsigned VBICoff :1; /* 'off' flag for vbic */ unsigned VBICicVBEGiven :1; /* flag to indicate VBE init. cond. given */ unsigned VBICicVCEGiven :1; /* flag to indicate VCE init. cond. given */ unsigned VBICtempGiven :1; /* temperature given for vbic instance*/ unsigned VBICdtempGiven :1; /* delta temperature given for vbic instance*/ unsigned VBICmGiven :1; /* flag to indicate multiplier was specified */ unsigned VBICsenPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ int VBICsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter */ double VBICcapbe; double VBICcapbex; double VBICcapbc; double VBICcapbcx; double VBICcapbep; double VBICcapbcp; double *VBICsens; #define VBICsenGpi VBICsens /* stores the perturbed values of gpi */ #define VBICsenGmu VBICsens+5 /* stores the perturbed values of gmu */ #define VBICsenGm VBICsens+10 /* stores the perturbed values of gm */ #define VBICsenGo VBICsens+15 /* stores the perturbed values of go */ #define VBICsenGx VBICsens+20 /* stores the perturbed values of gx */ #define VBICsenCpi VBICsens+25 /* stores the perturbed values of cpi */ #define VBICsenCmu VBICsens+30 /* stores the perturbed values of cmu */ #define VBICsenCbx VBICsens+35 /* stores the perturbed values of cbx */ #define VBICsenCmcb VBICsens+40 /* stores the perturbed values of cmcb */ #define VBICsenCsub VBICsens+45 /* stores the perturbed values of csub */ /* indices to array of VBIC noise sources */ #define VBICRCNOIZ 0 #define VBICRCINOIZ 1 #define VBICRBNOIZ 2 #define VBICRBINOIZ 3 #define VBICRENOIZ 4 #define VBICRBPNOIZ 5 #define VBICRSNOIZ 6 #define VBICICNOIZ 7 #define VBICIBNOIZ 8 #define VBICIBEPNOIZ 9 #define VBICICCPNOIZ 10 #define VBICFLBENOIZ 11 #define VBICFLBEPNOIZ 12 #define VBICTOTNOIZ 13 #define VBICNSRCS 14 /* the number of VBIC noise sources */ #ifndef NONOISE double VBICnVar[NSTATVARS][VBICNSRCS]; #else /*NONOISE*/ double **VBICnVar; #endif /*NONOISE*/ /* the above to avoid allocating memory when it is not needed */ } VBICinstance ; /* entries in the state vector for vbic: */ #define VBICvbei VBICstate #define VBICvbex VBICstate+1 #define VBICvbci VBICstate+2 #define VBICvbcx VBICstate+3 #define VBICvbep VBICstate+4 #define VBICvrci VBICstate+5 #define VBICvrbi VBICstate+6 #define VBICvrbp VBICstate+7 #define VBICvbcp VBICstate+8 #define VBICibe VBICstate+9 #define VBICibe_Vbei VBICstate+10 #define VBICibex VBICstate+11 #define VBICibex_Vbex VBICstate+12 #define VBICitzf VBICstate+13 #define VBICitzf_Vbei VBICstate+14 #define VBICitzf_Vbci VBICstate+15 #define VBICitzr VBICstate+16 #define VBICitzr_Vbci VBICstate+17 #define VBICitzr_Vbei VBICstate+18 #define VBICibc VBICstate+19 #define VBICibc_Vbci VBICstate+20 #define VBICibc_Vbei VBICstate+21 #define VBICibep VBICstate+22 #define VBICibep_Vbep VBICstate+23 #define VBICirci VBICstate+24 #define VBICirci_Vrci VBICstate+25 #define VBICirci_Vbci VBICstate+26 #define VBICirci_Vbcx VBICstate+27 #define VBICirbi VBICstate+28 #define VBICirbi_Vrbi VBICstate+29 #define VBICirbi_Vbei VBICstate+30 #define VBICirbi_Vbci VBICstate+31 #define VBICirbp VBICstate+32 #define VBICirbp_Vrbp VBICstate+33 #define VBICirbp_Vbep VBICstate+34 #define VBICirbp_Vbci VBICstate+35 #define VBICqbe VBICstate+36 #define VBICcqbe VBICstate+37 #define VBICcqbeci VBICstate+38 #define VBICqbex VBICstate+39 #define VBICcqbex VBICstate+40 #define VBICqbc VBICstate+41 #define VBICcqbc VBICstate+42 #define VBICqbcx VBICstate+43 #define VBICcqbcx VBICstate+44 #define VBICqbep VBICstate+45 #define VBICcqbep VBICstate+46 #define VBICcqbepci VBICstate+47 #define VBICqbeo VBICstate+48 #define VBICcqbeo VBICstate+49 #define VBICgqbeo VBICstate+50 #define VBICqbco VBICstate+51 #define VBICcqbco VBICstate+52 #define VBICgqbco VBICstate+53 #define VBICibcp VBICstate+54 #define VBICibcp_Vbcp VBICstate+55 #define VBICiccp VBICstate+56 #define VBICiccp_Vbep VBICstate+57 #define VBICiccp_Vbci VBICstate+58 #define VBICiccp_Vbcp VBICstate+59 #define VBICqbcp VBICstate+60 #define VBICcqbcp VBICstate+61 #define VBICircx_Vrcx VBICstate+62 #define VBICirbx_Vrbx VBICstate+63 #define VBICirs_Vrs VBICstate+64 #define VBICire_Vre VBICstate+65 #define VBICnumStates 66 #define VBICsensxpbe VBICstate+66 /* charge sensitivities and their derivatives. +67 for the derivatives - pointer to the beginning of the array */ #define VBICsensxpbex VBICstate+68 #define VBICsensxpbc VBICstate+70 #define VBICsensxpbcx VBICstate+72 #define VBICsensxpbep VBICstate+74 #define VBICnumSenStates 10 /* per model data */ typedef struct sVBICmodel { /* model structure for a vbic */ int VBICmodType; /* type index of this device type */ struct sVBICmodel *VBICnextModel; /* pointer to next possible model in linked list */ VBICinstance * VBICinstances; /* pointer to list of instances that have this model */ IFuid VBICmodName; /* pointer to character string naming this model */ int VBICtype; double VBICtnom; double VBICextCollResist; double VBICintCollResist; double VBICepiSatVoltage; double VBICepiDoping; double VBIChighCurFac; double VBICextBaseResist; double VBICintBaseResist; double VBICemitterResist; double VBICsubstrateResist; double VBICparBaseResist; double VBICsatCur; double VBICemissionCoeffF; double VBICemissionCoeffR; double VBICdeplCapLimitF; double VBICextOverlapCapBE; double VBICdepletionCapBE; double VBICpotentialBE; double VBICjunctionExpBE; double VBICsmoothCapBE; double VBICextOverlapCapBC; double VBICdepletionCapBC; double VBICepiCharge; double VBICextCapBC; double VBICpotentialBC; double VBICjunctionExpBC; double VBICsmoothCapBC; double VBICextCapSC; double VBICpotentialSC; double VBICjunctionExpSC; double VBICsmoothCapSC; double VBICidealSatCurBE; double VBICportionIBEI; double VBICidealEmissCoeffBE; double VBICnidealSatCurBE; double VBICnidealEmissCoeffBE; double VBICidealSatCurBC; double VBICidealEmissCoeffBC; double VBICnidealSatCurBC; double VBICnidealEmissCoeffBC; double VBICavalanchePar1BC; double VBICavalanchePar2BC; double VBICparasitSatCur; double VBICportionICCP; double VBICparasitFwdEmissCoeff; double VBICidealParasitSatCurBE; double VBICnidealParasitSatCurBE; double VBICidealParasitSatCurBC; double VBICidealParasitEmissCoeffBC; double VBICnidealParasitSatCurBC; double VBICnidealParasitEmissCoeffBC; double VBICearlyVoltF; double VBICearlyVoltR; double VBICrollOffF; double VBICrollOffR; double VBICparRollOff; double VBICtransitTimeF; double VBICvarTransitTimeF; double VBICtransitTimeBiasCoeffF; double VBICtransitTimeFVBC; double VBICtransitTimeHighCurrentF; double VBICtransitTimeR; double VBICdelayTimeF; double VBICfNcoef; double VBICfNexpA; double VBICfNexpB; double VBICtempExpRE; double VBICtempExpRB; double VBICtempExpRBI; double VBICtempExpRC; double VBICtempExpRCI; double VBICtempExpRS; double VBICtempExpVO; double VBICactivEnergyEA; double VBICactivEnergyEAIE; double VBICactivEnergyEAIC; double VBICactivEnergyEAIS; double VBICactivEnergyEANE; double VBICactivEnergyEANC; double VBICactivEnergyEANS; double VBICtempExpIS; double VBICtempExpII; double VBICtempExpIN; double VBICtempExpNF; double VBICtempExpAVC; double VBICthermalResist; double VBICthermalCapacitance; double VBICpunchThroughVoltageBC; double VBICdeplCapCoeff1; double VBICfixedCapacitanceCS; double VBICsgpQBselector; double VBIChighCurrentBetaRolloff; double VBICtempExpIKF; double VBICtempExpRCX; double VBICtempExpRBX; double VBICtempExpRBP; double VBICsepISRR; double VBICtempExpXISR; double VBICdear; double VBICeap; double VBICvbbe; double VBICnbbe; double VBICibbe; double VBICtvbbe1; double VBICtvbbe2; double VBICtnbbe; double VBICebbe; double VBIClocTempDiff; double VBICrevVersion; double VBICrefVersion; double VBICcollectorConduct; /* collector conductance */ double VBICbaseConduct; /* base conductance */ double VBICemitterConduct; /* emitter conductance */ double VBICsubstrateConduct; /* substrate conductance */ double VBICvbeMax; /* maximum voltage over B-E junction */ double VBICvbcMax; /* maximum voltage over B-C junction */ double VBICvceMax; /* maximum voltage over C-E branch */ unsigned VBICtnomGiven : 1; unsigned VBICextCollResistGiven : 1; unsigned VBICintCollResistGiven : 1; unsigned VBICepiSatVoltageGiven : 1; unsigned VBICepiDopingGiven : 1; unsigned VBIChighCurFacGiven : 1; unsigned VBICextBaseResistGiven : 1; unsigned VBICintBaseResistGiven : 1; unsigned VBICemitterResistGiven : 1; unsigned VBICsubstrateResistGiven : 1; unsigned VBICparBaseResistGiven : 1; unsigned VBICsatCurGiven : 1; unsigned VBICemissionCoeffFGiven : 1; unsigned VBICemissionCoeffRGiven : 1; unsigned VBICdeplCapLimitFGiven : 1; unsigned VBICextOverlapCapBEGiven : 1; unsigned VBICdepletionCapBEGiven : 1; unsigned VBICpotentialBEGiven : 1; unsigned VBICjunctionExpBEGiven : 1; unsigned VBICsmoothCapBEGiven : 1; unsigned VBICextOverlapCapBCGiven : 1; unsigned VBICdepletionCapBCGiven : 1; unsigned VBICepiChargeGiven : 1; unsigned VBICextCapBCGiven : 1; unsigned VBICpotentialBCGiven : 1; unsigned VBICjunctionExpBCGiven : 1; unsigned VBICsmoothCapBCGiven : 1; unsigned VBICextCapSCGiven : 1; unsigned VBICpotentialSCGiven : 1; unsigned VBICjunctionExpSCGiven : 1; unsigned VBICsmoothCapSCGiven : 1; unsigned VBICidealSatCurBEGiven : 1; unsigned VBICportionIBEIGiven : 1; unsigned VBICidealEmissCoeffBEGiven : 1; unsigned VBICnidealSatCurBEGiven : 1; unsigned VBICnidealEmissCoeffBEGiven : 1; unsigned VBICidealSatCurBCGiven : 1; unsigned VBICidealEmissCoeffBCGiven : 1; unsigned VBICnidealSatCurBCGiven : 1; unsigned VBICnidealEmissCoeffBCGiven : 1; unsigned VBICavalanchePar1BCGiven : 1; unsigned VBICavalanchePar2BCGiven : 1; unsigned VBICparasitSatCurGiven : 1; unsigned VBICportionICCPGiven : 1; unsigned VBICparasitFwdEmissCoeffGiven : 1; unsigned VBICidealParasitSatCurBEGiven : 1; unsigned VBICnidealParasitSatCurBEGiven : 1; unsigned VBICidealParasitSatCurBCGiven : 1; unsigned VBICidealParasitEmissCoeffBCGiven : 1; unsigned VBICnidealParasitSatCurBCGiven : 1; unsigned VBICnidealParasitEmissCoeffBCGiven : 1; unsigned VBICearlyVoltFGiven : 1; unsigned VBICearlyVoltRGiven : 1; unsigned VBICrollOffFGiven : 1; unsigned VBICrollOffRGiven : 1; unsigned VBICparRollOffGiven : 1; unsigned VBICtransitTimeFGiven : 1; unsigned VBICvarTransitTimeFGiven : 1; unsigned VBICtransitTimeBiasCoeffFGiven : 1; unsigned VBICtransitTimeFVBCGiven : 1; unsigned VBICtransitTimeHighCurrentFGiven : 1; unsigned VBICtransitTimeRGiven : 1; unsigned VBICdelayTimeFGiven : 1; unsigned VBICfNcoefGiven : 1; unsigned VBICfNexpAGiven : 1; unsigned VBICfNexpBGiven : 1; unsigned VBICtempExpREGiven : 1; unsigned VBICtempExpRBGiven : 1; unsigned VBICtempExpRBIGiven : 1; unsigned VBICtempExpRCGiven : 1; unsigned VBICtempExpRCIGiven : 1; unsigned VBICtempExpRSGiven : 1; unsigned VBICtempExpVOGiven : 1; unsigned VBICactivEnergyEAGiven : 1; unsigned VBICactivEnergyEAIEGiven : 1; unsigned VBICactivEnergyEAICGiven : 1; unsigned VBICactivEnergyEAISGiven : 1; unsigned VBICactivEnergyEANEGiven : 1; unsigned VBICactivEnergyEANCGiven : 1; unsigned VBICactivEnergyEANSGiven : 1; unsigned VBICtempExpISGiven : 1; unsigned VBICtempExpIIGiven : 1; unsigned VBICtempExpINGiven : 1; unsigned VBICtempExpNFGiven : 1; unsigned VBICtempExpAVCGiven : 1; unsigned VBICthermalResistGiven : 1; unsigned VBICthermalCapacitanceGiven : 1; unsigned VBICpunchThroughVoltageBCGiven : 1; unsigned VBICdeplCapCoeff1Given : 1; unsigned VBICfixedCapacitanceCSGiven : 1; unsigned VBICsgpQBselectorGiven : 1; unsigned VBIChighCurrentBetaRolloffGiven : 1; unsigned VBICtempExpIKFGiven : 1; unsigned VBICtempExpRCXGiven : 1; unsigned VBICtempExpRBXGiven : 1; unsigned VBICtempExpRBPGiven : 1; unsigned VBICsepISRRGiven : 1; unsigned VBICtempExpXISRGiven : 1; unsigned VBICdearGiven : 1; unsigned VBICeapGiven : 1; unsigned VBICvbbeGiven : 1; unsigned VBICnbbeGiven : 1; unsigned VBICibbeGiven : 1; unsigned VBICtvbbe1Given : 1; unsigned VBICtvbbe2Given : 1; unsigned VBICtnbbeGiven : 1; unsigned VBICebbeGiven : 1; unsigned VBIClocTempDiffGiven : 1; unsigned VBICrevVersionGiven : 1; unsigned VBICrefVersionGiven : 1; unsigned VBICvbeMaxGiven : 1; unsigned VBICvbcMaxGiven : 1; unsigned VBICvceMaxGiven : 1; } VBICmodel; #ifndef NPN #define NPN 1 #define PNP -1 #endif /*NPN*/ /* device parameters */ #define VBIC_AREA 1 #define VBIC_OFF 2 #define VBIC_IC 3 #define VBIC_IC_VBE 4 #define VBIC_IC_VCE 5 #define VBIC_TEMP 6 #define VBIC_DTEMP 7 #define VBIC_M 8 /* model parameters */ #define VBIC_MOD_NPN 101 #define VBIC_MOD_PNP 102 #define VBIC_MOD_TNOM 103 #define VBIC_MOD_RCX 104 #define VBIC_MOD_RCI 105 #define VBIC_MOD_VO 106 #define VBIC_MOD_GAMM 107 #define VBIC_MOD_HRCF 108 #define VBIC_MOD_RBX 109 #define VBIC_MOD_RBI 110 #define VBIC_MOD_RE 111 #define VBIC_MOD_RS 112 #define VBIC_MOD_RBP 113 #define VBIC_MOD_IS 114 #define VBIC_MOD_NF 115 #define VBIC_MOD_NR 116 #define VBIC_MOD_FC 117 #define VBIC_MOD_CBEO 118 #define VBIC_MOD_CJE 119 #define VBIC_MOD_PE 120 #define VBIC_MOD_ME 121 #define VBIC_MOD_AJE 122 #define VBIC_MOD_CBCO 123 #define VBIC_MOD_CJC 124 #define VBIC_MOD_QCO 125 #define VBIC_MOD_CJEP 126 #define VBIC_MOD_PC 127 #define VBIC_MOD_MC 128 #define VBIC_MOD_AJC 129 #define VBIC_MOD_CJCP 130 #define VBIC_MOD_PS 131 #define VBIC_MOD_MS 132 #define VBIC_MOD_AJS 133 #define VBIC_MOD_IBEI 134 #define VBIC_MOD_WBE 135 #define VBIC_MOD_NEI 136 #define VBIC_MOD_IBEN 137 #define VBIC_MOD_NEN 138 #define VBIC_MOD_IBCI 139 #define VBIC_MOD_NCI 140 #define VBIC_MOD_IBCN 141 #define VBIC_MOD_NCN 142 #define VBIC_MOD_AVC1 143 #define VBIC_MOD_AVC2 144 #define VBIC_MOD_ISP 145 #define VBIC_MOD_WSP 146 #define VBIC_MOD_NFP 147 #define VBIC_MOD_IBEIP 148 #define VBIC_MOD_IBENP 149 #define VBIC_MOD_IBCIP 150 #define VBIC_MOD_NCIP 151 #define VBIC_MOD_IBCNP 152 #define VBIC_MOD_NCNP 153 #define VBIC_MOD_VEF 154 #define VBIC_MOD_VER 155 #define VBIC_MOD_IKF 156 #define VBIC_MOD_IKR 157 #define VBIC_MOD_IKP 158 #define VBIC_MOD_TF 159 #define VBIC_MOD_QTF 160 #define VBIC_MOD_XTF 161 #define VBIC_MOD_VTF 162 #define VBIC_MOD_ITF 163 #define VBIC_MOD_TR 164 #define VBIC_MOD_TD 165 #define VBIC_MOD_KFN 166 #define VBIC_MOD_AFN 167 #define VBIC_MOD_BFN 168 #define VBIC_MOD_XRE 169 #define VBIC_MOD_XRB 170 #define VBIC_MOD_XRBI 171 #define VBIC_MOD_XRC 172 #define VBIC_MOD_XRCI 173 #define VBIC_MOD_XRS 174 #define VBIC_MOD_XVO 175 #define VBIC_MOD_EA 176 #define VBIC_MOD_EAIE 177 #define VBIC_MOD_EAIC 178 #define VBIC_MOD_EAIS 179 #define VBIC_MOD_EANE 180 #define VBIC_MOD_EANC 181 #define VBIC_MOD_EANS 182 #define VBIC_MOD_XIS 183 #define VBIC_MOD_XII 184 #define VBIC_MOD_XIN 185 #define VBIC_MOD_TNF 186 #define VBIC_MOD_TAVC 187 #define VBIC_MOD_RTH 188 #define VBIC_MOD_CTH 189 #define VBIC_MOD_VRT 190 #define VBIC_MOD_ART 191 #define VBIC_MOD_CCSO 192 #define VBIC_MOD_QBM 193 #define VBIC_MOD_NKF 194 #define VBIC_MOD_XIKF 195 #define VBIC_MOD_XRCX 196 #define VBIC_MOD_XRBX 197 #define VBIC_MOD_XRBP 198 #define VBIC_MOD_ISRR 199 #define VBIC_MOD_XISR 200 #define VBIC_MOD_DEAR 201 #define VBIC_MOD_EAP 202 #define VBIC_MOD_VBBE 203 #define VBIC_MOD_NBBE 204 #define VBIC_MOD_IBBE 205 #define VBIC_MOD_TVBBE1 206 #define VBIC_MOD_TVBBE2 207 #define VBIC_MOD_TNBBE 208 #define VBIC_MOD_EBBE 209 #define VBIC_MOD_DTEMP 210 #define VBIC_MOD_VERS 211 #define VBIC_MOD_VREF 212 #define VBIC_MOD_VBE_MAX 213 #define VBIC_MOD_VBC_MAX 214 #define VBIC_MOD_VCE_MAX 215 /* device questions */ #define VBIC_QUEST_FT 221 #define VBIC_QUEST_COLLNODE 222 #define VBIC_QUEST_BASENODE 223 #define VBIC_QUEST_EMITNODE 224 #define VBIC_QUEST_SUBSNODE 225 #define VBIC_QUEST_COLLCXNODE 226 #define VBIC_QUEST_COLLCINODE 227 #define VBIC_QUEST_BASEBXNODE 228 #define VBIC_QUEST_BASEBINODE 229 #define VBIC_QUEST_BASEBPNODE 230 #define VBIC_QUEST_EMITEINODE 231 #define VBIC_QUEST_SUBSSINODE 232 #define VBIC_QUEST_VBE 233 #define VBIC_QUEST_VBC 234 #define VBIC_QUEST_CC 235 #define VBIC_QUEST_CB 236 #define VBIC_QUEST_CE 237 #define VBIC_QUEST_CS 238 #define VBIC_QUEST_GM 239 #define VBIC_QUEST_GO 240 #define VBIC_QUEST_GPI 241 #define VBIC_QUEST_GMU 242 #define VBIC_QUEST_GX 243 #define VBIC_QUEST_QBE 244 #define VBIC_QUEST_CQBE 245 #define VBIC_QUEST_QBC 246 #define VBIC_QUEST_CQBC 247 #define VBIC_QUEST_QBX 248 #define VBIC_QUEST_CQBX 249 #define VBIC_QUEST_QBCP 250 #define VBIC_QUEST_CQBCP 251 #define VBIC_QUEST_CEXBC 252 #define VBIC_QUEST_GEQCB 253 #define VBIC_QUEST_GCSUB 254 #define VBIC_QUEST_GDSUB 255 #define VBIC_QUEST_GEQBX 256 #define VBIC_QUEST_CBE 257 #define VBIC_QUEST_CBEX 258 #define VBIC_QUEST_CBC 259 #define VBIC_QUEST_CBCX 260 #define VBIC_QUEST_CBEP 261 #define VBIC_QUEST_CBCP 262 #define VBIC_QUEST_SENS_REAL 263 #define VBIC_QUEST_SENS_IMAG 264 #define VBIC_QUEST_SENS_MAG 265 #define VBIC_QUEST_SENS_PH 266 #define VBIC_QUEST_SENS_CPLX 267 #define VBIC_QUEST_SENS_DC 268 #define VBIC_QUEST_POWER 269 /* model questions */ #define VBIC_MOD_COLLCONDUCT 301 #define VBIC_MOD_BASECONDUCT 302 #define VBIC_MOD_EMITTERCONDUCT 303 #define VBIC_MOD_SUBSTRATECONDUCT 304 #define VBIC_MOD_TYPE 305 #include "vbicext.h" #endif /*VBIC*/ ngspice-26/src/spicelib/devices/vbic/vbicsoachk.c0000644000265600020320000000423212264261473021440 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int VBICsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { VBICmodel *model = (VBICmodel *) inModel; VBICinstance *here; double vbe, vbc, vce; /* actual bjt voltages */ int maxwarns; static int warns_vbe = 0, warns_vbc = 0, warns_vce = 0; if (!ckt) { warns_vbe = 0; warns_vbc = 0; warns_vce = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->VBICnextModel) { for (here = model->VBICinstances; here; here=here->VBICnextInstance) { vbe = fabs(ckt->CKTrhsOld [here->VBICbaseNode] - ckt->CKTrhsOld [here->VBICemitNode]); vbc = fabs(ckt->CKTrhsOld [here->VBICbaseNode] - ckt->CKTrhsOld [here->VBICcollNode]); vce = fabs(ckt->CKTrhsOld [here->VBICcollNode] - ckt->CKTrhsOld [here->VBICemitNode]); if (vbe > model->VBICvbeMax) if (warns_vbe < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbe|=%g has exceeded Vbe_max=%g\n", vbe, model->VBICvbeMax); warns_vbe++; } if (vbc > model->VBICvbcMax) if (warns_vbc < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbc|=%g has exceeded Vbc_max=%g\n", vbc, model->VBICvbcMax); warns_vbc++; } if (vce > model->VBICvceMax) if (warns_vce < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vce|=%g has exceeded Vce_max=%g\n", vce, model->VBICvceMax); warns_vce++; } } } return OK; } ngspice-26/src/spicelib/devices/vbic/vbicnoise.c0000644000265600020320000003052612264261473021312 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #include "ngspice/ngspice.h" #include "vbicdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * VBICnoise (mode, operation, firstModel, ckt, data, OnDens) * * This routine names and evaluates all of the noise sources * associated with VBIC's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the VBIC's is summed with the variable "OnDens". */ int VBICnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; VBICmodel *firstModel = (VBICmodel *) genmodel; VBICmodel *model; VBICinstance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[VBICNSRCS]; double lnNdens[VBICNSRCS]; int i; /* define the names of the noise sources */ static char *VBICnNames[VBICNSRCS] = { /* Note that we have to keep the order consistent with the strchr definitions in VBICdefs.h */ "_rc", /* noise due to rc */ "_rci", /* noise due to rci */ "_rb", /* noise due to rb */ "_rbi", /* noise due to rbi */ "_re", /* noise due to re */ "_rbp", /* noise due to rbp */ "_rs", /* noise due to rs */ "_ic", /* noise due to ic */ "_ib", /* noise due to ib */ "_ibep", /* noise due to ibep */ "_iccp", /* noise due to iccp */ "_1overfbe", /* flicker (1/f) noise ibe */ "_1overfbep", /* flicker (1/f) noise ibep */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->VBICnextModel) { for (inst=model->VBICinstances; inst != NULL; inst=inst->VBICnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < VBICNSRCS; i++) { (void)sprintf(name,"onoise_%s%s", inst->VBICname,VBICnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < VBICNSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s", inst->VBICname,VBICnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s", inst->VBICname,VBICnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[VBICRCNOIZ],&lnNdens[VBICRCNOIZ], ckt,THERMNOISE,inst->VBICcollCXNode,inst->VBICcollNode, *(ckt->CKTstate0 + inst->VBICircx_Vrcx)); NevalSrc(&noizDens[VBICRCINOIZ],&lnNdens[VBICRCINOIZ], ckt,THERMNOISE,inst->VBICcollCXNode,inst->VBICcollCINode, *(ckt->CKTstate0 + inst->VBICirci_Vrci)); NevalSrc(&noizDens[VBICRBNOIZ],&lnNdens[VBICRBNOIZ], ckt,THERMNOISE,inst->VBICbaseBXNode,inst->VBICbaseNode, *(ckt->CKTstate0 + inst->VBICirbx_Vrbx)); NevalSrc(&noizDens[VBICRBINOIZ],&lnNdens[VBICRBINOIZ], ckt,THERMNOISE,inst->VBICbaseBXNode,inst->VBICbaseBINode, *(ckt->CKTstate0 + inst->VBICirbi_Vrbi)); NevalSrc(&noizDens[VBICRENOIZ],&lnNdens[VBICRENOIZ], ckt,THERMNOISE,inst->VBICemitEINode,inst->VBICemitNode, *(ckt->CKTstate0 + inst->VBICire_Vre)); NevalSrc(&noizDens[VBICRBPNOIZ],&lnNdens[VBICRBPNOIZ], ckt,THERMNOISE,inst->VBICemitEINode,inst->VBICemitNode, *(ckt->CKTstate0 + inst->VBICirbp_Vrbp)); NevalSrc(&noizDens[VBICRSNOIZ],&lnNdens[VBICRSNOIZ], ckt,THERMNOISE,inst->VBICsubsSINode,inst->VBICsubsNode, *(ckt->CKTstate0 + inst->VBICirs_Vrs)); NevalSrc(&noizDens[VBICICNOIZ],&lnNdens[VBICICNOIZ], ckt,SHOTNOISE,inst->VBICcollCINode, inst->VBICemitEINode, *(ckt->CKTstate0 + inst->VBICitzf)); NevalSrc(&noizDens[VBICIBNOIZ],&lnNdens[VBICIBNOIZ], ckt,SHOTNOISE,inst->VBICbaseBINode, inst->VBICemitEINode, *(ckt->CKTstate0 + inst->VBICibe)); NevalSrc(&noizDens[VBICIBEPNOIZ],&lnNdens[VBICIBEPNOIZ], ckt,SHOTNOISE,inst->VBICbaseBXNode, inst->VBICbaseBPNode, *(ckt->CKTstate0 + inst->VBICibep)); NevalSrc(&noizDens[VBICICCPNOIZ],&lnNdens[VBICICCPNOIZ], ckt,SHOTNOISE,inst->VBICbaseBXNode, inst->VBICsubsSINode, *(ckt->CKTstate0 + inst->VBICiccp)); NevalSrc(&noizDens[VBICFLBENOIZ], NULL, ckt, N_GAIN,inst->VBICbaseBINode, inst->VBICemitEINode, (double)0.0); noizDens[VBICFLBENOIZ] *= inst->VBICm * model->VBICfNcoef * exp(model->VBICfNexpA * log(MAX(fabs(*(ckt->CKTstate0 + inst->VBICibe)/inst->VBICm),N_MINLOG))) / pow(data->freq, model->VBICfNexpB); lnNdens[VBICFLBENOIZ] = log(MAX(noizDens[VBICFLBENOIZ],N_MINLOG)); NevalSrc(&noizDens[VBICFLBEPNOIZ], NULL, ckt, N_GAIN,inst->VBICbaseBXNode, inst->VBICbaseBPNode, (double)0.0); noizDens[VBICFLBEPNOIZ] *= inst->VBICm * model->VBICfNcoef * exp(model->VBICfNexpA * log(MAX(fabs(*(ckt->CKTstate0 + inst->VBICibep)/inst->VBICm),N_MINLOG))) / pow(data->freq, model->VBICfNexpB); lnNdens[VBICFLBEPNOIZ] = log(MAX(noizDens[VBICFLBEPNOIZ],N_MINLOG)); noizDens[VBICTOTNOIZ] = noizDens[VBICRCNOIZ] + noizDens[VBICRCINOIZ] + noizDens[VBICRBNOIZ] + noizDens[VBICRBINOIZ] + noizDens[VBICRENOIZ] + noizDens[VBICRBPNOIZ] + noizDens[VBICICNOIZ] + noizDens[VBICIBNOIZ] + noizDens[VBICIBEPNOIZ] + noizDens[VBICFLBENOIZ] + noizDens[VBICFLBEPNOIZ]; lnNdens[VBICTOTNOIZ] = log(noizDens[VBICTOTNOIZ]); *OnDens += noizDens[VBICTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < VBICNSRCS; i++) { inst->VBICnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < VBICNSRCS; i++) { inst->VBICnVar[OUTNOIZ][i] = 0.0; inst->VBICnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ /* In order to get the best curve fit, we have to integrate each component separately */ for (i=0; i < VBICNSRCS; i++) { if (i != VBICTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->VBICnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->VBICnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->VBICnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->VBICnVar[OUTNOIZ][i] += tempOnoise; inst->VBICnVar[OUTNOIZ][VBICTOTNOIZ] += tempOnoise; inst->VBICnVar[INNOIZ][i] += tempInoise; inst->VBICnVar[INNOIZ][VBICTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < VBICNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < VBICNSRCS; i++) { data->outpVector[data->outNumber++] = inst->VBICnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->VBICnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicacld.c0000644000265600020320000002730612264261473021102 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * Function to load the COMPLEX circuit matrix using the * small signal parameters saved during a previous DC operating * point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICacLoad(GENmodel *inModel, CKTcircuit *ckt) { VBICinstance *here; VBICmodel *model = (VBICmodel*)inModel; double Ibe_Vbei,Ibex_Vbex ,Itzf_Vbei,Itzf_Vbci,Itzr_Vbci,Itzr_Vbei,Ibc_Vbci ,Ibc_Vbei,Ibep_Vbep,Ircx_Vrcx,Irci_Vrci ,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei ,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci ,Ibcp_Vbcp,Iccp_Vbep,Irs_Vrs,Iccp_Vbci,Iccp_Vbcp; double XQbe_Vbei, XQbe_Vbci, XQbex_Vbex, XQbc_Vbci, XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci, XQbcp_Vbcp; /* loop through all the models */ for( ; model != NULL; model = model->VBICnextModel) { /* loop through all the instances of the model */ for( here = model->VBICinstances; here!= NULL; here = here->VBICnextInstance) { Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei); Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex); Itzf_Vbei = *(ckt->CKTstate0 + here->VBICitzf_Vbei); Itzf_Vbci = *(ckt->CKTstate0 + here->VBICitzf_Vbci); Itzr_Vbci = *(ckt->CKTstate0 + here->VBICitzr_Vbci); Itzr_Vbei = *(ckt->CKTstate0 + here->VBICitzr_Vbei); Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci); Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei); Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep); Irci_Vrci = *(ckt->CKTstate0 + here->VBICirci_Vrci); Irci_Vbci = *(ckt->CKTstate0 + here->VBICirci_Vbci); Irci_Vbcx = *(ckt->CKTstate0 + here->VBICirci_Vbcx); Irbi_Vrbi = *(ckt->CKTstate0 + here->VBICirbi_Vrbi); Irbi_Vbei = *(ckt->CKTstate0 + here->VBICirbi_Vbei); Irbi_Vbci = *(ckt->CKTstate0 + here->VBICirbi_Vbci); Irbp_Vrbp = *(ckt->CKTstate0 + here->VBICirbp_Vrbp); Irbp_Vbep = *(ckt->CKTstate0 + here->VBICirbp_Vbep); Irbp_Vbci = *(ckt->CKTstate0 + here->VBICirbp_Vbci); Ibcp_Vbcp = *(ckt->CKTstate0 + here->VBICibcp_Vbcp); Iccp_Vbep = *(ckt->CKTstate0 + here->VBICiccp_Vbep); Iccp_Vbci = *(ckt->CKTstate0 + here->VBICiccp_Vbci); Iccp_Vbcp = *(ckt->CKTstate0 + here->VBICiccp_Vbcp); Ircx_Vrcx = *(ckt->CKTstate0 + here->VBICircx_Vrcx); Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx); Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs); Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre); /* c The real part */ /* c Stamp element: Ibe */ *(here->VBICbaseBIBaseBIPtr) += Ibe_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibe_Vbei; *(here->VBICemitEIBaseBIPtr) += -Ibe_Vbei; *(here->VBICemitEIEmitEIPtr) += Ibe_Vbei; /* c Stamp element: Ibex */ *(here->VBICbaseBXBaseBXPtr) += Ibex_Vbex; *(here->VBICbaseBXEmitEIPtr) += -Ibex_Vbex; *(here->VBICemitEIBaseBXPtr) += -Ibex_Vbex; *(here->VBICemitEIEmitEIPtr) += Ibex_Vbex; /* c Stamp element: Itzf */ *(here->VBICcollCIBaseBIPtr) += Itzf_Vbei; *(here->VBICcollCIEmitEIPtr) += -Itzf_Vbei; *(here->VBICcollCIBaseBIPtr) += Itzf_Vbci; *(here->VBICcollCICollCIPtr) += -Itzf_Vbci; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbei; *(here->VBICemitEIEmitEIPtr) += Itzf_Vbei; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbci; *(here->VBICemitEICollCIPtr) += Itzf_Vbci; /* c Stamp element: Itzr */ *(here->VBICemitEIBaseBIPtr) += Itzr_Vbci; *(here->VBICemitEICollCIPtr) += -Itzr_Vbci; *(here->VBICemitEIBaseBIPtr) += Itzr_Vbei; *(here->VBICemitEIEmitEIPtr) += -Itzr_Vbei; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbci; *(here->VBICcollCICollCIPtr) += Itzr_Vbci; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbei; *(here->VBICcollCIEmitEIPtr) += Itzr_Vbei; /* c Stamp element: Ibc */ *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbci; *(here->VBICbaseBICollCIPtr) += -Ibc_Vbci; *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibc_Vbei; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbci; *(here->VBICcollCICollCIPtr) += Ibc_Vbci; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbei; *(here->VBICcollCIEmitEIPtr) += Ibc_Vbei; /* c Stamp element: Ibep */ *(here->VBICbaseBXBaseBXPtr) += Ibep_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Ibep_Vbep; *(here->VBICbaseBPBaseBXPtr) += -Ibep_Vbep; *(here->VBICbaseBPBaseBPPtr) += Ibep_Vbep; /* c Stamp element: Ircx */ *(here->VBICcollCollPtr) += Ircx_Vrcx; *(here->VBICcollCXCollCXPtr) += Ircx_Vrcx; *(here->VBICcollCXCollPtr) += -Ircx_Vrcx; *(here->VBICcollCollCXPtr) += -Ircx_Vrcx; /* c Stamp element: Irci */ *(here->VBICcollCXCollCXPtr) += Irci_Vrci; *(here->VBICcollCXCollCIPtr) += -Irci_Vrci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbci; *(here->VBICcollCXCollCIPtr) += -Irci_Vbci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbcx; *(here->VBICcollCXCollCXPtr) += -Irci_Vbcx; *(here->VBICcollCICollCXPtr) += -Irci_Vrci; *(here->VBICcollCICollCIPtr) += Irci_Vrci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbci; *(here->VBICcollCICollCIPtr) += Irci_Vbci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbcx; *(here->VBICcollCICollCXPtr) += Irci_Vbcx; /* c Stamp element: Irbx */ *(here->VBICbaseBasePtr) += Irbx_Vrbx; *(here->VBICbaseBXBaseBXPtr) += Irbx_Vrbx; *(here->VBICbaseBXBasePtr) += -Irbx_Vrbx; *(here->VBICbaseBaseBXPtr) += -Irbx_Vrbx; /* c Stamp element: Irbi */ *(here->VBICbaseBXBaseBXPtr) += Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += -Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbei; *(here->VBICbaseBXEmitEIPtr) += -Irbi_Vbei; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbci; *(here->VBICbaseBXCollCIPtr) += -Irbi_Vbci; *(here->VBICbaseBIBaseBXPtr) += -Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbei; *(here->VBICbaseBIEmitEIPtr) += Irbi_Vbei; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbci; *(here->VBICbaseBICollCIPtr) += Irbi_Vbci; /* c Stamp element: Ire */ *(here->VBICemitEmitPtr) += Ire_Vre; *(here->VBICemitEIEmitEIPtr) += Ire_Vre; *(here->VBICemitEIEmitPtr) += -Ire_Vre; *(here->VBICemitEmitEIPtr) += -Ire_Vre; /* c Stamp element: Irbp */ *(here->VBICbaseBPBaseBPPtr) += Irbp_Vrbp; *(here->VBICbaseBPCollCXPtr) += -Irbp_Vrbp; *(here->VBICbaseBPBaseBXPtr) += Irbp_Vbep; *(here->VBICbaseBPBaseBPPtr) += -Irbp_Vbep; *(here->VBICbaseBPBaseBIPtr) += Irbp_Vbci; *(here->VBICbaseBPCollCIPtr) += -Irbp_Vbci; *(here->VBICcollCXBaseBPPtr) += -Irbp_Vrbp; *(here->VBICcollCXCollCXPtr) += Irbp_Vrbp; *(here->VBICcollCXBaseBXPtr) += -Irbp_Vbep; *(here->VBICcollCXBaseBPPtr) += Irbp_Vbep; *(here->VBICcollCXBaseBIPtr) += -Irbp_Vbci; *(here->VBICcollCXCollCIPtr) += Irbp_Vbci; /* c Stamp element: Ibcp */ *(here->VBICsubsSISubsSIPtr) += Ibcp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += -Ibcp_Vbcp; *(here->VBICbaseBPSubsSIPtr) += -Ibcp_Vbcp; *(here->VBICbaseBPBaseBPPtr) += Ibcp_Vbcp; /* c Stamp element: Iccp */ *(here->VBICbaseBXBaseBXPtr) += Iccp_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbep; *(here->VBICbaseBXBaseBIPtr) += Iccp_Vbci; *(here->VBICbaseBXCollCIPtr) += -Iccp_Vbci; *(here->VBICbaseBXSubsSIPtr) += Iccp_Vbcp; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbcp; *(here->VBICsubsSIBaseBXPtr) += -Iccp_Vbep; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbep; *(here->VBICsubsSIBaseBIPtr) += -Iccp_Vbci; *(here->VBICsubsSICollCIPtr) += Iccp_Vbci; *(here->VBICsubsSISubsSIPtr) += -Iccp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbcp; /* c Stamp element: Irs */ *(here->VBICsubsSubsPtr) += Irs_Vrs; *(here->VBICsubsSISubsSIPtr) += Irs_Vrs; *(here->VBICsubsSISubsPtr) += -Irs_Vrs; *(here->VBICsubsSubsSIPtr) += -Irs_Vrs; /* c The complex part */ XQbe_Vbei = *(ckt->CKTstate0 + here->VBICcqbe) * ckt->CKTomega; XQbe_Vbci = *(ckt->CKTstate0 + here->VBICcqbeci) * ckt->CKTomega; XQbex_Vbex = *(ckt->CKTstate0 + here->VBICcqbex) * ckt->CKTomega; XQbc_Vbci = *(ckt->CKTstate0 + here->VBICcqbc) * ckt->CKTomega; XQbcx_Vbcx = *(ckt->CKTstate0 + here->VBICcqbcx) * ckt->CKTomega; XQbep_Vbep = *(ckt->CKTstate0 + here->VBICcqbep) * ckt->CKTomega; XQbep_Vbci = *(ckt->CKTstate0 + here->VBICcqbepci) * ckt->CKTomega; XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp) * ckt->CKTomega; /* c Stamp element: Qbe */ *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vbei; *(here->VBICbaseBIEmitEIPtr + 1) += -XQbe_Vbei; *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vbci; *(here->VBICbaseBICollCIPtr + 1) += -XQbe_Vbci; *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vbei; *(here->VBICemitEIEmitEIPtr + 1) += XQbe_Vbei; *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vbci; *(here->VBICemitEICollCIPtr + 1) += XQbe_Vbci; /* c Stamp element: Qbex */ *(here->VBICbaseBXBaseBXPtr + 1) += XQbex_Vbex; *(here->VBICbaseBXEmitEIPtr + 1) += -XQbex_Vbex; *(here->VBICemitEIBaseBXPtr + 1) += -XQbex_Vbex; *(here->VBICemitEIEmitEIPtr + 1) += XQbex_Vbex; /* c Stamp element: Qbc */ *(here->VBICbaseBIBaseBIPtr + 1) += XQbc_Vbci; *(here->VBICbaseBICollCIPtr + 1) += -XQbc_Vbci; *(here->VBICcollCIBaseBIPtr + 1) += -XQbc_Vbci; *(here->VBICcollCICollCIPtr + 1) += XQbc_Vbci; /* c Stamp element: Qbcx */ *(here->VBICbaseBIBaseBIPtr + 1) += XQbcx_Vbcx; *(here->VBICbaseBICollCXPtr + 1) += -XQbcx_Vbcx; *(here->VBICcollCXBaseBIPtr + 1) += -XQbcx_Vbcx; *(here->VBICcollCXCollCXPtr + 1) += XQbcx_Vbcx; /* c Stamp element: Qbep */ *(here->VBICbaseBXBaseBXPtr + 1) += XQbep_Vbep; *(here->VBICbaseBXBaseBPPtr + 1) += -XQbep_Vbep; *(here->VBICbaseBXBaseBIPtr + 1) += XQbep_Vbci; *(here->VBICbaseBXCollCIPtr + 1) += -XQbep_Vbci; *(here->VBICbaseBPBaseBXPtr + 1) += -XQbep_Vbep; *(here->VBICbaseBPBaseBPPtr + 1) += XQbep_Vbep; *(here->VBICbaseBPBaseBIPtr + 1) += -XQbep_Vbci; *(here->VBICbaseBPCollCIPtr + 1) += XQbep_Vbci; /* c Stamp element: Qbcp */ *(here->VBICsubsSISubsSIPtr + 1) += XQbcp_Vbcp; *(here->VBICsubsSIBaseBPPtr + 1) += -XQbcp_Vbcp; *(here->VBICbaseBPSubsSIPtr + 1) += -XQbcp_Vbcp; *(here->VBICbaseBPBaseBPPtr + 1) += XQbcp_Vbcp; } } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicitf.h0000644000265600020320000000047312264261473020762 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #ifndef DEV_VBIC #define DEV_VBIC extern SPICEdev *get_vbic_info(void); #endif ngspice-26/src/spicelib/devices/vbic/vbic.c0000644000265600020320000003147612264261473020261 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This file defines the VBIC data structures that are * available to the next level(s) up the calling hierarchy */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "vbicdefs.h" #include "ngspice/suffix.h" IFparm VBICpTable[] = { /* parameters */ IOPU("area", VBIC_AREA, IF_REAL, "Area factor"), IOPU("off", VBIC_OFF, IF_FLAG, "Device initially off"), IP("ic", VBIC_IC, IF_REALVEC, "Initial condition vector"), IOPAU("icvbe", VBIC_IC_VBE, IF_REAL, "Initial B-E voltage"), IOPAU("icvce", VBIC_IC_VCE, IF_REAL, "Initial C-E voltage"), IOPU("temp", VBIC_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", VBIC_DTEMP, IF_REAL, "Instance delta temperature"), IOPU("m", VBIC_M, IF_REAL, "Multiplier"), OPU("collnode", VBIC_QUEST_COLLNODE, IF_INTEGER, "Number of collector node"), OPU("basenode", VBIC_QUEST_BASENODE, IF_INTEGER, "Number of base node"), OPU("emitnode", VBIC_QUEST_EMITNODE, IF_INTEGER, "Number of emitter node"), OPU("subsnode", VBIC_QUEST_SUBSNODE, IF_INTEGER, "Number of substrate node"), OPU("collCXnode",VBIC_QUEST_COLLCXNODE,IF_INTEGER, "Internal collector node"), OPU("collCInode",VBIC_QUEST_COLLCINODE,IF_INTEGER, "Internal collector node"), OPU("baseBXnode",VBIC_QUEST_BASEBXNODE,IF_INTEGER, "Internal base node"), OPU("baseBInode",VBIC_QUEST_BASEBINODE,IF_INTEGER, "Internal base node"), OPU("baseBPnode",VBIC_QUEST_BASEBPNODE,IF_INTEGER, "Internal base node"), OPU("emitEInode",VBIC_QUEST_EMITEINODE,IF_INTEGER, "Internal emitter node"), OPU("subsSInode",VBIC_QUEST_SUBSSINODE,IF_INTEGER, "Internal substrate node"), OP("vbe", VBIC_QUEST_VBE, IF_REAL, "B-E voltage"), OP("vbc", VBIC_QUEST_VBC, IF_REAL, "B-C voltage"), OP("ic", VBIC_QUEST_CC, IF_REAL, "Collector current"), OP("ib", VBIC_QUEST_CB, IF_REAL, "Base current"), OP("ie", VBIC_QUEST_CE, IF_REAL, "Emitter current"), OP("is", VBIC_QUEST_CS, IF_REAL, "Substrate current"), OP("gm", VBIC_QUEST_GM, IF_REAL, "Small signal transconductance dIc/dVbe"), OP("go", VBIC_QUEST_GO, IF_REAL, "Small signal output conductance dIc/dVbc"), OP("gpi", VBIC_QUEST_GPI, IF_REAL, "Small signal input conductance dIb/dVbe"), OP("gmu", VBIC_QUEST_GMU, IF_REAL, "Small signal conductance dIb/dVbc"), OP("gx", VBIC_QUEST_GX, IF_REAL, "Conductance from base to internal base"), OP("cbe", VBIC_QUEST_CBE, IF_REAL, "Internal base to emitter capacitance"), OP("cbex", VBIC_QUEST_CBEX, IF_REAL, "External base to emitter capacitance"), OP("cbc", VBIC_QUEST_CBC, IF_REAL, "Internal base to collector capacitance"), OP("cbcx", VBIC_QUEST_CBCX, IF_REAL, "External Base to collector capacitance"), OP("cbep", VBIC_QUEST_CBEP, IF_REAL, "Parasitic Base to emitter capacitance"), OP("cbcp", VBIC_QUEST_CBCP, IF_REAL, "Parasitic Base to collector capacitance"), OP("p", VBIC_QUEST_POWER,IF_REAL, "Power dissipation"), OPU("geqcb",VBIC_QUEST_GEQCB,IF_REAL, "Internal C-B-base cap. equiv. cond."), OPU("geqbx",VBIC_QUEST_GEQBX,IF_REAL, "External C-B-base cap. equiv. cond."), OPU("qbe", VBIC_QUEST_QBE, IF_REAL, "Charge storage B-E junction"), OPU("cqbe", VBIC_QUEST_CQBE, IF_REAL, "Cap. due to charge storage in B-E jct."), OPU("qbc", VBIC_QUEST_QBC, IF_REAL, "Charge storage B-C junction"), OPU("cqbc", VBIC_QUEST_CQBC, IF_REAL, "Cap. due to charge storage in B-C jct."), OPU("qbx", VBIC_QUEST_QBX, IF_REAL, "Charge storage B-X junction"), OPU("cqbx", VBIC_QUEST_CQBX, IF_REAL, "Cap. due to charge storage in B-X jct."), OPU("sens_dc", VBIC_QUEST_SENS_DC, IF_REAL, "DC sensitivity "), OPU("sens_real",VBIC_QUEST_SENS_REAL, IF_REAL, "Real part of AC sensitivity"), OPU("sens_imag",VBIC_QUEST_SENS_IMAG,IF_REAL, "DC sens. & imag part of AC sens."), OPU("sens_mag", VBIC_QUEST_SENS_MAG, IF_REAL, "Sensitivity of AC magnitude"), OPU("sens_ph", VBIC_QUEST_SENS_PH, IF_REAL, "Sensitivity of AC phase"), OPU("sens_cplx",VBIC_QUEST_SENS_CPLX, IF_COMPLEX, "AC sensitivity") }; IFparm VBICmPTable[] = { /* model parameters */ OP("type", VBIC_MOD_TYPE, IF_STRING, "NPN or PNP"), IOPU("npn", VBIC_MOD_NPN, IF_FLAG, "NPN type device"), IOPU("pnp", VBIC_MOD_PNP, IF_FLAG, "PNP type device"), IOP("tnom", VBIC_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP("rcx", VBIC_MOD_RCX, IF_REAL, "Extrinsic coll resistance"), IOP("rci", VBIC_MOD_RCI, IF_REAL, "Intrinsic coll resistance"), IOP("vo", VBIC_MOD_VO, IF_REAL, "Epi drift saturation voltage"), IOP("gamm", VBIC_MOD_GAMM, IF_REAL, "Epi doping parameter"), IOP("hrcf", VBIC_MOD_HRCF, IF_REAL, "High current RC factor"), IOP("rbx", VBIC_MOD_RBX, IF_REAL, "Extrinsic base resistance"), IOP("rbi", VBIC_MOD_RBI, IF_REAL, "Intrinsic base resistance"), IOP("re", VBIC_MOD_RE, IF_REAL, "Intrinsic emitter resistance"), IOP("rs", VBIC_MOD_RS, IF_REAL, "Intrinsic substrate resistance"), IOP("rbp", VBIC_MOD_RBP, IF_REAL, "Parasitic base resistance"), IOP("is", VBIC_MOD_IS, IF_REAL, "Transport saturation current"), IOP("nf", VBIC_MOD_NF, IF_REAL, "Forward emission coefficient"), IOP("nr", VBIC_MOD_NR, IF_REAL, "Reverse emission coefficient"), IOP("fc", VBIC_MOD_FC, IF_REAL, "Fwd bias depletion capacitance limit"), IOP("cbeo", VBIC_MOD_CBEO, IF_REAL, "Extrinsic B-E overlap capacitance"), IOP("cje", VBIC_MOD_CJE, IF_REAL, "Zero bias B-E depletion capacitance"), IOP("pe", VBIC_MOD_PE, IF_REAL, "B-E built in potential"), IOP("me", VBIC_MOD_ME, IF_REAL, "B-E junction grading coefficient"), IOP("aje", VBIC_MOD_AJE, IF_REAL, "B-E capacitance smoothing factor"), IOP("cbco", VBIC_MOD_CBCO, IF_REAL, "Extrinsic B-C overlap capacitance"), IOP("cjc", VBIC_MOD_CJC, IF_REAL, "Zero bias B-C depletion capacitance"), IOP("qco", VBIC_MOD_QCO, IF_REAL, "Epi charge parameter"), IOP("cjep", VBIC_MOD_CJEP, IF_REAL, "B-C extrinsic zero bias capacitance"), IOP("pc", VBIC_MOD_PC, IF_REAL, "B-C built in potential"), IOP("mc", VBIC_MOD_MC, IF_REAL, "B-C junction grading coefficient"), IOP("ajc", VBIC_MOD_AJC, IF_REAL, "B-C capacitance smoothing factor"), IOP("cjcp", VBIC_MOD_CJCP, IF_REAL, "Zero bias S-C capacitance"), IOP("ps", VBIC_MOD_PS, IF_REAL, "S-C junction built in potential"), IOP("ms", VBIC_MOD_MS, IF_REAL, "S-C junction grading coefficient"), IOP("ajs", VBIC_MOD_AJS, IF_REAL, "S-C capacitance smoothing factor"), IOP("ibei", VBIC_MOD_IBEI, IF_REAL, "Ideal B-E saturation current"), IOP("wbe", VBIC_MOD_WBE, IF_REAL, "Portion of IBEI from Vbei, 1-WBE from Vbex"), IOP("nei", VBIC_MOD_NEI, IF_REAL, "Ideal B-E emission coefficient"), IOP("iben", VBIC_MOD_IBEN, IF_REAL, "Non-ideal B-E saturation current"), IOP("nen", VBIC_MOD_NEN, IF_REAL, "Non-ideal B-E emission coefficient"), IOP("ibci", VBIC_MOD_IBCI, IF_REAL, "Ideal B-C saturation current"), IOP("nci", VBIC_MOD_NCI, IF_REAL, "Ideal B-C emission coefficient"), IOP("ibcn", VBIC_MOD_IBCN, IF_REAL, "Non-ideal B-C saturation current"), IOP("ncn", VBIC_MOD_NCN, IF_REAL, "Non-ideal B-C emission coefficient"), IOP("avc1", VBIC_MOD_AVC1, IF_REAL, "B-C weak avalanche parameter 1"), IOP("avc2", VBIC_MOD_AVC2, IF_REAL, "B-C weak avalanche parameter 2"), IOP("isp", VBIC_MOD_ISP, IF_REAL, "Parasitic transport saturation current"), IOP("wsp", VBIC_MOD_WSP, IF_REAL, "Portion of ICCP"), IOP("nfp", VBIC_MOD_NFP, IF_REAL, "Parasitic fwd emission coefficient"), IOP("ibeip", VBIC_MOD_IBEIP, IF_REAL, "Ideal parasitic B-E saturation current"), IOP("ibenp", VBIC_MOD_IBENP, IF_REAL, "Non-ideal parasitic B-E saturation current"), IOP("ibcip", VBIC_MOD_IBCIP, IF_REAL, "Ideal parasitic B-C saturation current"), IOP("ncip", VBIC_MOD_NCIP, IF_REAL, "Ideal parasitic B-C emission coefficient"), IOP("ibcnp", VBIC_MOD_IBCNP, IF_REAL, "Nonideal parasitic B-C saturation current"), IOP("ncnp", VBIC_MOD_NCNP, IF_REAL, "Nonideal parasitic B-C emission coefficient"), IOP("vef", VBIC_MOD_VEF, IF_REAL, "Forward Early voltage"), IOP("ver", VBIC_MOD_VER, IF_REAL, "Reverse Early voltage"), IOP("ikf", VBIC_MOD_IKF, IF_REAL, "Forward knee current"), IOP("ikr", VBIC_MOD_IKR, IF_REAL, "Reverse knee current"), IOP("ikp", VBIC_MOD_IKP, IF_REAL, "Parasitic knee current"), IOP("tf", VBIC_MOD_TF, IF_REAL, "Ideal forward transit time"), IOP("qtf", VBIC_MOD_QTF, IF_REAL, "Variation of TF with base-width modulation"), IOP("xtf", VBIC_MOD_XTF, IF_REAL, "Coefficient for bias dependence of TF"), IOP("vtf", VBIC_MOD_VTF, IF_REAL, "Voltage giving VBC dependence of TF"), IOP("itf", VBIC_MOD_ITF, IF_REAL, "High current dependence of TF"), IOP("tr", VBIC_MOD_TR, IF_REAL, "Ideal reverse transit time"), IOP("td", VBIC_MOD_TD, IF_REAL, "Forward excess-phase delay time"), IOP("kfn", VBIC_MOD_KFN, IF_REAL, "B-E Flicker Noise Coefficient"), IOP("afn", VBIC_MOD_AFN, IF_REAL, "B-E Flicker Noise Exponent"), IOP("bfn", VBIC_MOD_BFN, IF_REAL, "B-E Flicker Noise 1/f dependence"), IOP("xre", VBIC_MOD_XRE, IF_REAL, "Temperature exponent of RE"), IOP("xrb", VBIC_MOD_XRB, IF_REAL, "Temperature exponent of RB"), IOP("xrbi", VBIC_MOD_XRBI, IF_REAL, "Temperature exponent of RBI"), IOP("xrc", VBIC_MOD_XRC, IF_REAL, "Temperature exponent of RC"), IOP("xrci", VBIC_MOD_XRCI, IF_REAL, "Temperature exponent of RCI"), IOP("xrs", VBIC_MOD_XRS, IF_REAL, "Temperature exponent of RS"), IOP("xvo", VBIC_MOD_XVO, IF_REAL, "Temperature exponent of VO"), IOP("ea", VBIC_MOD_EA, IF_REAL, "Activation energy for IS"), IOP("eaie", VBIC_MOD_EAIE, IF_REAL, "Activation energy for IBEI"), IOP("eaic", VBIC_MOD_EAIC, IF_REAL, "Activation energy for IBCI/IBEIP"), IOP("eais", VBIC_MOD_EAIS, IF_REAL, "Activation energy for IBCIP"), IOP("eane", VBIC_MOD_EANE, IF_REAL, "Activation energy for IBEN"), IOP("eanc", VBIC_MOD_EANC, IF_REAL, "Activation energy for IBCN/IBENP"), IOP("eans", VBIC_MOD_EANS, IF_REAL, "Activation energy for IBCNP"), IOP("xis", VBIC_MOD_XIS, IF_REAL, "Temperature exponent of IS"), IOP("xii", VBIC_MOD_XII, IF_REAL, "Temperature exponent of IBEI,IBCI,IBEIP,IBCIP"), IOP("xin", VBIC_MOD_XIN, IF_REAL, "Temperature exponent of IBEN,IBCN,IBENP,IBCNP"), IOP("tnf", VBIC_MOD_TNF, IF_REAL, "Temperature exponent of NF"), IOP("tavc", VBIC_MOD_TAVC, IF_REAL, "Temperature exponent of AVC2"), IOP("rth", VBIC_MOD_RTH, IF_REAL, "Thermal resistance"), IOP("cth", VBIC_MOD_CTH, IF_REAL, "Thermal capacitance"), IOP("vrt", VBIC_MOD_VRT, IF_REAL, "Punch-through voltage of internal B-C junction"), IOP("art", VBIC_MOD_ART, IF_REAL, "Smoothing parameter for reach-through"), IOP("ccso", VBIC_MOD_CCSO, IF_REAL, "Fixed C-S capacitance"), IOP("qbm", VBIC_MOD_QBM, IF_REAL, "Select SGP qb formulation"), IOP("nkf", VBIC_MOD_NKF, IF_REAL, "High current beta rolloff"), IOP("xikf", VBIC_MOD_XIKF, IF_REAL, "Temperature exponent of IKF"), IOP("xrcx", VBIC_MOD_XRCX, IF_REAL, "Temperature exponent of RCX"), IOP("xrbx", VBIC_MOD_XRBX, IF_REAL, "Temperature exponent of RBX"), IOP("xrbp", VBIC_MOD_XRBP, IF_REAL, "Temperature exponent of RBP"), IOP("isrr", VBIC_MOD_ISRR, IF_REAL, "Separate IS for fwd and rev"), IOP("xisr", VBIC_MOD_XISR, IF_REAL, "Temperature exponent of ISR"), IOP("dear", VBIC_MOD_DEAR, IF_REAL, "Delta activation energy for ISRR"), IOP("eap", VBIC_MOD_EAP, IF_REAL, "Exitivation energy for ISP"), IOP("vbbe", VBIC_MOD_VBBE, IF_REAL, "B-E breakdown voltage"), IOP("nbbe", VBIC_MOD_NBBE, IF_REAL, "B-E breakdown emission coefficient"), IOP("ibbe", VBIC_MOD_IBBE, IF_REAL, "B-E breakdown current"), IOP("tvbbe1",VBIC_MOD_TVBBE1,IF_REAL, "Linear temperature coefficient of VBBE"), IOP("tvbbe2",VBIC_MOD_TVBBE2,IF_REAL, "Quadratic temperature coefficient of VBBE"), IOP("tnbbe", VBIC_MOD_TNBBE, IF_REAL, "Temperature coefficient of NBBE"), IOP("ebbe", VBIC_MOD_EBBE, IF_REAL, "exp(-VBBE/(NBBE*Vtv))"), IOP("dtemp", VBIC_MOD_DTEMP, IF_REAL, "Locale Temperature difference"), IOP("vers", VBIC_MOD_VERS, IF_REAL, "Revision Version"), IOP("vref", VBIC_MOD_VREF, IF_REAL, "Reference Version"), IOP("vbe_max", VBIC_MOD_VBE_MAX, IF_REAL, "maximum voltage B-E junction"), IOP("vbc_max", VBIC_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"), IOP("vce_max", VBIC_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch") }; char *VBICnames[] = { "collector", "base", "emitter", "substrate" }; int VBICnSize = NUMELEMS(VBICnames); int VBICpTSize = NUMELEMS(VBICpTable); int VBICmPTSize = NUMELEMS(VBICmPTable); int VBICiSize = sizeof(VBICinstance); int VBICmSize = sizeof(VBICmodel); ngspice-26/src/spicelib/devices/vbic/vbicpzld.c0000644000265600020320000003465412264261473021154 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * Function to load the COMPLEX circuit matrix using the * small signal parameters saved during a previous DC operating * point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { VBICinstance *here; VBICmodel *model = (VBICmodel*)inModel; double Ibe_Vbei,Ibex_Vbex ,Itzf_Vbei,Itzf_Vbci,Itzr_Vbci,Itzr_Vbei,Ibc_Vbci ,Ibc_Vbei,Ibep_Vbep,Ircx_Vrcx,Irci_Vrci ,Irci_Vbci,Irci_Vbcx,Irbx_Vrbx,Irbi_Vrbi,Irbi_Vbei ,Irbi_Vbci,Ire_Vre,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci ,Ibcp_Vbcp,Iccp_Vbep,Irs_Vrs,Iccp_Vbci,Iccp_Vbcp; double XQbe_Vbei, XQbe_Vbci, XQbex_Vbex, XQbc_Vbci, XQbcx_Vbcx, XQbep_Vbep, XQbep_Vbci, XQbcp_Vbcp; /* loop through all the models */ for( ; model != NULL; model = model->VBICnextModel) { /* loop through all the instances of the model */ for( here = model->VBICinstances; here!= NULL; here = here->VBICnextInstance) { Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei); Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex); Itzf_Vbei = *(ckt->CKTstate0 + here->VBICitzf_Vbei); Itzf_Vbci = *(ckt->CKTstate0 + here->VBICitzf_Vbci); Itzr_Vbci = *(ckt->CKTstate0 + here->VBICitzr_Vbci); Itzr_Vbei = *(ckt->CKTstate0 + here->VBICitzr_Vbei); Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci); Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei); Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep); Irci_Vrci = *(ckt->CKTstate0 + here->VBICirci_Vrci); Irci_Vbci = *(ckt->CKTstate0 + here->VBICirci_Vbci); Irci_Vbcx = *(ckt->CKTstate0 + here->VBICirci_Vbcx); Irbi_Vrbi = *(ckt->CKTstate0 + here->VBICirbi_Vrbi); Irbi_Vbei = *(ckt->CKTstate0 + here->VBICirbi_Vbei); Irbi_Vbci = *(ckt->CKTstate0 + here->VBICirbi_Vbci); Irbp_Vrbp = *(ckt->CKTstate0 + here->VBICirbp_Vrbp); Irbp_Vbep = *(ckt->CKTstate0 + here->VBICirbp_Vbep); Irbp_Vbci = *(ckt->CKTstate0 + here->VBICirbp_Vbci); Ibcp_Vbcp = *(ckt->CKTstate0 + here->VBICibcp_Vbcp); Iccp_Vbep = *(ckt->CKTstate0 + here->VBICiccp_Vbep); Iccp_Vbci = *(ckt->CKTstate0 + here->VBICiccp_Vbci); Iccp_Vbcp = *(ckt->CKTstate0 + here->VBICiccp_Vbcp); Ircx_Vrcx = *(ckt->CKTstate0 + here->VBICircx_Vrcx); Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx); Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs); Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre); /* c The real part */ /* c Stamp element: Ibe */ *(here->VBICbaseBIBaseBIPtr) += Ibe_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibe_Vbei; *(here->VBICemitEIBaseBIPtr) += -Ibe_Vbei; *(here->VBICemitEIEmitEIPtr) += Ibe_Vbei; /* c Stamp element: Ibex */ *(here->VBICbaseBXBaseBXPtr) += Ibex_Vbex; *(here->VBICbaseBXEmitEIPtr) += -Ibex_Vbex; *(here->VBICemitEIBaseBXPtr) += -Ibex_Vbex; *(here->VBICemitEIEmitEIPtr) += Ibex_Vbex; /* c Stamp element: Itzf */ *(here->VBICcollCIBaseBIPtr) += Itzf_Vbei; *(here->VBICcollCIEmitEIPtr) += -Itzf_Vbei; *(here->VBICcollCIBaseBIPtr) += Itzf_Vbci; *(here->VBICcollCICollCIPtr) += -Itzf_Vbci; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbei; *(here->VBICemitEIEmitEIPtr) += Itzf_Vbei; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbci; *(here->VBICemitEICollCIPtr) += Itzf_Vbci; /* c Stamp element: Itzr */ *(here->VBICemitEIBaseBIPtr) += Itzr_Vbci; *(here->VBICemitEICollCIPtr) += -Itzr_Vbci; *(here->VBICemitEIBaseBIPtr) += Itzr_Vbei; *(here->VBICemitEIEmitEIPtr) += -Itzr_Vbei; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbci; *(here->VBICcollCICollCIPtr) += Itzr_Vbci; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbei; *(here->VBICcollCIEmitEIPtr) += Itzr_Vbei; /* c Stamp element: Ibc */ *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbci; *(here->VBICbaseBICollCIPtr) += -Ibc_Vbci; *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibc_Vbei; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbci; *(here->VBICcollCICollCIPtr) += Ibc_Vbci; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbei; *(here->VBICcollCIEmitEIPtr) += Ibc_Vbei; /* c Stamp element: Ibep */ *(here->VBICbaseBXBaseBXPtr) += Ibep_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Ibep_Vbep; *(here->VBICbaseBPBaseBXPtr) += -Ibep_Vbep; *(here->VBICbaseBPBaseBPPtr) += Ibep_Vbep; /* c Stamp element: Ircx */ *(here->VBICcollCollPtr) += Ircx_Vrcx; *(here->VBICcollCXCollCXPtr) += Ircx_Vrcx; *(here->VBICcollCXCollPtr) += -Ircx_Vrcx; *(here->VBICcollCollCXPtr) += -Ircx_Vrcx; /* c Stamp element: Irci */ *(here->VBICcollCXCollCXPtr) += Irci_Vrci; *(here->VBICcollCXCollCIPtr) += -Irci_Vrci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbci; *(here->VBICcollCXCollCIPtr) += -Irci_Vbci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbcx; *(here->VBICcollCXCollCXPtr) += -Irci_Vbcx; *(here->VBICcollCICollCXPtr) += -Irci_Vrci; *(here->VBICcollCICollCIPtr) += Irci_Vrci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbci; *(here->VBICcollCICollCIPtr) += Irci_Vbci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbcx; *(here->VBICcollCICollCXPtr) += Irci_Vbcx; /* c Stamp element: Irbx */ *(here->VBICbaseBasePtr) += Irbx_Vrbx; *(here->VBICbaseBXBaseBXPtr) += Irbx_Vrbx; *(here->VBICbaseBXBasePtr) += -Irbx_Vrbx; *(here->VBICbaseBaseBXPtr) += -Irbx_Vrbx; /* c Stamp element: Irbi */ *(here->VBICbaseBXBaseBXPtr) += Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += -Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbei; *(here->VBICbaseBXEmitEIPtr) += -Irbi_Vbei; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbci; *(here->VBICbaseBXCollCIPtr) += -Irbi_Vbci; *(here->VBICbaseBIBaseBXPtr) += -Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbei; *(here->VBICbaseBIEmitEIPtr) += Irbi_Vbei; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbci; *(here->VBICbaseBICollCIPtr) += Irbi_Vbci; /* c Stamp element: Ire */ *(here->VBICemitEmitPtr) += Ire_Vre; *(here->VBICemitEIEmitEIPtr) += Ire_Vre; *(here->VBICemitEIEmitPtr) += -Ire_Vre; *(here->VBICemitEmitEIPtr) += -Ire_Vre; /* c Stamp element: Irbp */ *(here->VBICbaseBPBaseBPPtr) += Irbp_Vrbp; *(here->VBICbaseBPCollCXPtr) += -Irbp_Vrbp; *(here->VBICbaseBPBaseBXPtr) += Irbp_Vbep; *(here->VBICbaseBPBaseBPPtr) += -Irbp_Vbep; *(here->VBICbaseBPBaseBIPtr) += Irbp_Vbci; *(here->VBICbaseBPCollCIPtr) += -Irbp_Vbci; *(here->VBICcollCXBaseBPPtr) += -Irbp_Vrbp; *(here->VBICcollCXCollCXPtr) += Irbp_Vrbp; *(here->VBICcollCXBaseBXPtr) += -Irbp_Vbep; *(here->VBICcollCXBaseBPPtr) += Irbp_Vbep; *(here->VBICcollCXBaseBIPtr) += -Irbp_Vbci; *(here->VBICcollCXCollCIPtr) += Irbp_Vbci; /* c Stamp element: Ibcp */ *(here->VBICsubsSISubsSIPtr) += Ibcp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += -Ibcp_Vbcp; *(here->VBICbaseBPSubsSIPtr) += -Ibcp_Vbcp; *(here->VBICbaseBPBaseBPPtr) += Ibcp_Vbcp; /* c Stamp element: Iccp */ *(here->VBICbaseBXBaseBXPtr) += Iccp_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbep; *(here->VBICbaseBXBaseBIPtr) += Iccp_Vbci; *(here->VBICbaseBXCollCIPtr) += -Iccp_Vbci; *(here->VBICbaseBXSubsSIPtr) += Iccp_Vbcp; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbcp; *(here->VBICsubsSIBaseBXPtr) += -Iccp_Vbep; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbep; *(here->VBICsubsSIBaseBIPtr) += -Iccp_Vbci; *(here->VBICsubsSICollCIPtr) += Iccp_Vbci; *(here->VBICsubsSISubsSIPtr) += -Iccp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbcp; /* c Stamp element: Irs */ *(here->VBICsubsSubsPtr) += Irs_Vrs; *(here->VBICsubsSISubsSIPtr) += Irs_Vrs; *(here->VBICsubsSISubsPtr) += -Irs_Vrs; *(here->VBICsubsSubsSIPtr) += -Irs_Vrs; /* c The complex part */ XQbe_Vbei = *(ckt->CKTstate0 + here->VBICcqbe); XQbe_Vbci = *(ckt->CKTstate0 + here->VBICcqbeci); XQbex_Vbex = *(ckt->CKTstate0 + here->VBICcqbex); XQbc_Vbci = *(ckt->CKTstate0 + here->VBICcqbc); XQbcx_Vbcx = *(ckt->CKTstate0 + here->VBICcqbcx); XQbep_Vbep = *(ckt->CKTstate0 + here->VBICcqbep); XQbep_Vbci = *(ckt->CKTstate0 + here->VBICcqbepci); XQbcp_Vbcp = *(ckt->CKTstate0 + here->VBICcqbcp); /* c Stamp element: Qbe */ *(here->VBICbaseBIBaseBIPtr) += XQbe_Vbei * (s->real); *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vbei * (s->imag); *(here->VBICbaseBIEmitEIPtr) += -XQbe_Vbei * (s->real); *(here->VBICbaseBIEmitEIPtr + 1) += -XQbe_Vbei * (s->imag); *(here->VBICbaseBIBaseBIPtr) += XQbe_Vbci * (s->real); *(here->VBICbaseBIBaseBIPtr + 1) += XQbe_Vbci * (s->imag); *(here->VBICbaseBICollCIPtr) += -XQbe_Vbci * (s->real); *(here->VBICbaseBICollCIPtr + 1) += -XQbe_Vbci * (s->imag); *(here->VBICemitEIBaseBIPtr) += -XQbe_Vbei * (s->real); *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vbei * (s->imag); *(here->VBICemitEIEmitEIPtr) += XQbe_Vbei * (s->real); *(here->VBICemitEIEmitEIPtr + 1) += XQbe_Vbei * (s->imag); *(here->VBICemitEIBaseBIPtr) += -XQbe_Vbci * (s->real); *(here->VBICemitEIBaseBIPtr + 1) += -XQbe_Vbci * (s->imag); *(here->VBICemitEICollCIPtr) += XQbe_Vbci * (s->real); *(here->VBICemitEICollCIPtr + 1) += XQbe_Vbci * (s->imag); /* c Stamp element: Qbex */ *(here->VBICbaseBXBaseBXPtr) += XQbex_Vbex * (s->real); *(here->VBICbaseBXBaseBXPtr + 1) += XQbex_Vbex * (s->imag); *(here->VBICbaseBXEmitEIPtr) += -XQbex_Vbex * (s->real); *(here->VBICbaseBXEmitEIPtr + 1) += -XQbex_Vbex * (s->imag); *(here->VBICemitEIBaseBXPtr) += -XQbex_Vbex * (s->real); *(here->VBICemitEIBaseBXPtr + 1) += -XQbex_Vbex * (s->imag); *(here->VBICemitEIEmitEIPtr ) += XQbex_Vbex * (s->real); *(here->VBICemitEIEmitEIPtr + 1) += XQbex_Vbex * (s->imag); /* c Stamp element: Qbc */ *(here->VBICbaseBIBaseBIPtr) += XQbc_Vbci * (s->real); *(here->VBICbaseBIBaseBIPtr + 1) += XQbc_Vbci * (s->imag); *(here->VBICbaseBICollCIPtr) += -XQbc_Vbci * (s->real); *(here->VBICbaseBICollCIPtr + 1) += -XQbc_Vbci * (s->imag); *(here->VBICcollCIBaseBIPtr) += -XQbc_Vbci * (s->real); *(here->VBICcollCIBaseBIPtr + 1) += -XQbc_Vbci * (s->imag); *(here->VBICcollCICollCIPtr) += XQbc_Vbci * (s->real); *(here->VBICcollCICollCIPtr + 1) += XQbc_Vbci * (s->imag); /* c Stamp element: Qbcx */ *(here->VBICbaseBIBaseBIPtr) += XQbcx_Vbcx * (s->real); *(here->VBICbaseBIBaseBIPtr + 1) += XQbcx_Vbcx * (s->imag); *(here->VBICbaseBICollCXPtr) += -XQbcx_Vbcx * (s->real); *(here->VBICbaseBICollCXPtr + 1) += -XQbcx_Vbcx * (s->imag); *(here->VBICcollCXBaseBIPtr) += -XQbcx_Vbcx * (s->real); *(here->VBICcollCXBaseBIPtr + 1) += -XQbcx_Vbcx * (s->imag); *(here->VBICcollCXCollCXPtr) += XQbcx_Vbcx * (s->real); *(here->VBICcollCXCollCXPtr + 1) += XQbcx_Vbcx * (s->imag); /* c Stamp element: Qbep */ *(here->VBICbaseBXBaseBXPtr) += XQbep_Vbep * (s->real); *(here->VBICbaseBXBaseBXPtr + 1) += XQbep_Vbep * (s->imag); *(here->VBICbaseBXBaseBPPtr) += -XQbep_Vbep * (s->real); *(here->VBICbaseBXBaseBPPtr + 1) += -XQbep_Vbep * (s->imag); *(here->VBICbaseBXBaseBIPtr) += XQbep_Vbci * (s->real); *(here->VBICbaseBXBaseBIPtr + 1) += XQbep_Vbci * (s->imag); *(here->VBICbaseBXCollCIPtr) += -XQbep_Vbci * (s->real); *(here->VBICbaseBXCollCIPtr + 1) += -XQbep_Vbci * (s->imag); *(here->VBICbaseBPBaseBXPtr) += -XQbep_Vbep * (s->real); *(here->VBICbaseBPBaseBXPtr + 1) += -XQbep_Vbep * (s->imag); *(here->VBICbaseBPBaseBPPtr) += XQbep_Vbep * (s->real); *(here->VBICbaseBPBaseBPPtr + 1) += XQbep_Vbep * (s->imag); *(here->VBICbaseBPBaseBIPtr) += -XQbep_Vbci * (s->real); *(here->VBICbaseBPBaseBIPtr + 1) += -XQbep_Vbci * (s->imag); *(here->VBICbaseBPCollCIPtr) += XQbep_Vbci * (s->real); *(here->VBICbaseBPCollCIPtr + 1) += XQbep_Vbci * (s->imag); /* c Stamp element: Qbcp */ *(here->VBICsubsSISubsSIPtr) += XQbcp_Vbcp * (s->real); *(here->VBICsubsSISubsSIPtr + 1) += XQbcp_Vbcp * (s->imag); *(here->VBICsubsSIBaseBPPtr) += -XQbcp_Vbcp * (s->real); *(here->VBICsubsSIBaseBPPtr + 1) += -XQbcp_Vbcp * (s->imag); *(here->VBICbaseBPSubsSIPtr) += -XQbcp_Vbcp * (s->real); *(here->VBICbaseBPSubsSIPtr + 1) += -XQbcp_Vbcp * (s->imag); *(here->VBICbaseBPBaseBPPtr) += XQbcp_Vbcp * (s->real); *(here->VBICbaseBPBaseBPPtr + 1) += XQbcp_Vbcp * (s->imag); } } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicinit.h0000644000265600020320000000037012264261473021137 0ustar andreasadmin#ifndef _VBICINIT_H #define _VBICINIT_H extern IFparm VBICpTable[ ]; extern IFparm VBICmPTable[ ]; extern char *VBICnames[ ]; extern int VBICpTSize; extern int VBICmPTSize; extern int VBICnSize; extern int VBICiSize; extern int VBICmSize; #endif ngspice-26/src/spicelib/devices/vbic/vbicask.c0000644000265600020320000002020612264261473020745 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Mathew Lew and Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine gives access to the internal device * parameters for VBICs */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VBICask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select) { VBICinstance *here = (VBICinstance*)instPtr; int itmp; double vr; double vi; double sr; double si; double vm; switch(which) { case VBIC_AREA: value->rValue = here->VBICarea; return(OK); case VBIC_OFF: value->iValue = here->VBICoff; return(OK); case VBIC_IC_VBE: value->rValue = here->VBICicVBE; return(OK); case VBIC_IC_VCE: value->rValue = here->VBICicVCE; return(OK); case VBIC_TEMP: value->rValue = here->VBICtemp - CONSTCtoK; return(OK); case VBIC_M: value->rValue = here->VBICm; return(OK); case VBIC_QUEST_COLLNODE: value->iValue = here->VBICcollNode; return(OK); case VBIC_QUEST_BASENODE: value->iValue = here->VBICbaseNode; return(OK); case VBIC_QUEST_EMITNODE: value->iValue = here->VBICemitNode; return(OK); case VBIC_QUEST_SUBSNODE: value->iValue = here->VBICsubsNode; return(OK); case VBIC_QUEST_COLLCXNODE: value->iValue = here->VBICcollCXNode; return(OK); case VBIC_QUEST_BASEBXNODE: value->iValue = here->VBICbaseBXNode; return(OK); case VBIC_QUEST_EMITEINODE: value->iValue = here->VBICemitEINode; return(OK); case VBIC_QUEST_SUBSSINODE: value->iValue = here->VBICsubsSINode; return(OK); case VBIC_QUEST_VBE: value->rValue = *(ckt->CKTstate0 + here->VBICvbei); return(OK); case VBIC_QUEST_VBC: value->rValue = *(ckt->CKTstate0 + here->VBICvbci); return(OK); case VBIC_QUEST_CC: value->rValue = *(ckt->CKTstate0 + here->VBICitzf) - *(ckt->CKTstate0 + here->VBICitzr) - *(ckt->CKTstate0 + here->VBICibc); return(OK); case VBIC_QUEST_CB: value->rValue = *(ckt->CKTstate0 + here->VBICibe) + *(ckt->CKTstate0 + here->VBICibc) + *(ckt->CKTstate0 + here->VBICibex) + *(ckt->CKTstate0 + here->VBICibep) + *(ckt->CKTstate0 + here->VBICiccp); return(OK); case VBIC_QUEST_CE: value->rValue = - *(ckt->CKTstate0 + here->VBICibe) - *(ckt->CKTstate0 + here->VBICibex) - *(ckt->CKTstate0 + here->VBICitzf) + *(ckt->CKTstate0 + here->VBICitzr); return(OK); case VBIC_QUEST_CS: value->rValue = *(ckt->CKTstate0 + here->VBICiccp) - *(ckt->CKTstate0 + here->VBICibcp); return(OK); case VBIC_QUEST_POWER: value->rValue = fabs(*(ckt->CKTstate0 + here->VBICitzf) - *(ckt->CKTstate0 + here->VBICitzr)) * fabs(*(ckt->CKTstate0 + here->VBICvbei) - *(ckt->CKTstate0 + here->VBICvbci)) + fabs(*(ckt->CKTstate0 + here->VBICibe) * *(ckt->CKTstate0 + here->VBICvbei)) + fabs(*(ckt->CKTstate0 + here->VBICibex) * *(ckt->CKTstate0 + here->VBICvbex)) + fabs(*(ckt->CKTstate0 + here->VBICibc) * *(ckt->CKTstate0 + here->VBICvbci)) + fabs(*(ckt->CKTstate0 + here->VBICibcp) * *(ckt->CKTstate0 + here->VBICvbcp)) + fabs(*(ckt->CKTstate0 + here->VBICiccp)) * fabs(*(ckt->CKTstate0 + here->VBICvbep) - *(ckt->CKTstate0 + here->VBICvbcp)); return(OK); case VBIC_QUEST_GM: value->rValue = *(ckt->CKTstate0 + here->VBICitzf_Vbei); return(OK); case VBIC_QUEST_GO: value->rValue = *(ckt->CKTstate0 + here->VBICitzf_Vbci); return(OK); case VBIC_QUEST_GPI: value->rValue = *(ckt->CKTstate0 + here->VBICibe_Vbei); return(OK); case VBIC_QUEST_GMU: value->rValue = *(ckt->CKTstate0 + here->VBICibc_Vbci); return(OK); case VBIC_QUEST_GX: value->rValue = *(ckt->CKTstate0 + here->VBICirbi_Vrbi); return(OK); case VBIC_QUEST_CBE: value->rValue = here->VBICcapbe; return(OK); case VBIC_QUEST_CBEX: value->rValue = here->VBICcapbex; return(OK); case VBIC_QUEST_CBC: value->rValue = here->VBICcapbc; return(OK); case VBIC_QUEST_CBCX: value->rValue = here->VBICcapbcx; return(OK); case VBIC_QUEST_CBEP: value->rValue = here->VBICcapbep; return(OK); case VBIC_QUEST_CBCP: value->rValue = here->VBICcapbcp; return(OK); case VBIC_QUEST_QBE: value->rValue = *(ckt->CKTstate0 + here->VBICqbe); return(OK); case VBIC_QUEST_QBC: value->rValue = *(ckt->CKTstate0 + here->VBICqbc); return(OK); case VBIC_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->VBICsenParmNo); } return(OK); case VBIC_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VBICsenParmNo); } return(OK); case VBIC_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VBICsenParmNo); } return(OK); case VBIC_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VBICsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VBICsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case VBIC_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VBICsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VBICsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case VBIC_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ itmp = select->iValue + 1; value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[itmp]+ here->VBICsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[itmp]+ here->VBICsenParmNo); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/vbic/vbicmdel.c0000644000265600020320000000210612264261473021107 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine deletes a VBIC model from the circuit and frees * the storage it was using. * returns an error if the model has instances */ #include "ngspice/ngspice.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICmDelete(GENmodel **inModels, IFuid modname, GENmodel *kill) { VBICmodel **model = (VBICmodel**)inModels; VBICmodel *modfast = (VBICmodel*)kill; VBICmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->VBICnextModel)) { if( (*model)->VBICmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: if( (*model)->VBICinstances ) return(E_NOTEMPTY); *oldmod = (*model)->VBICnextModel; /* cut deleted device out of list */ FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicsetup.c0000644000265600020320000005254012264261473021335 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine should only be called when circuit topology * changes, since its computations do not depend on most * device or model parameters, only on topology (as * affected by emitter, collector, and base resistances) */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "vbicdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int VBICsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the VBIC structure with those pointers needed later * for fast matrix loading */ { VBICmodel *model = (VBICmodel*)inModel; VBICinstance *here; int error; CKTnode *tmp; /* loop through all the transistor models */ for( ; model != NULL; model = model->VBICnextModel ) { if(model->VBICtype != NPN && model->VBICtype != PNP) { model->VBICtype = NPN; } if(!model->VBICtnomGiven) { model->VBICtnom = 27.0; } if(!model->VBICextCollResistGiven) { model->VBICextCollResist = 0.0; } if(!model->VBICintCollResistGiven) { model->VBICintCollResist = 0.1; } if(!model->VBICepiSatVoltageGiven) { model->VBICepiSatVoltage = 0.0; } if(!model->VBICepiDopingGiven) { model->VBICepiDoping = 0.0; } if(!model->VBIChighCurFacGiven) { model->VBIChighCurFac = 1.0; } if(!model->VBICextBaseResistGiven) { model->VBICextBaseResist = 0.0; } if(!model->VBICintBaseResistGiven) { model->VBICintBaseResist = 0.1; } if(!model->VBICemitterResistGiven) { model->VBICemitterResist = 0.0; } if(!model->VBICsubstrateResistGiven) { model->VBICsubstrateResist = 0.0; } if(!model->VBICparBaseResistGiven) { model->VBICparBaseResist = 0.1; } if(!model->VBICsatCurGiven) { model->VBICsatCur = 1e-16; } if(!model->VBICemissionCoeffFGiven) { model->VBICemissionCoeffF = 1.0; } if(!model->VBICemissionCoeffRGiven) { model->VBICemissionCoeffR = 1.0; } if(!model->VBICdeplCapLimitFGiven) { model->VBICdeplCapLimitF = 0.9; } if(!model->VBICextOverlapCapBEGiven) { model->VBICextOverlapCapBE = 0.0; } if(!model->VBICdepletionCapBEGiven) { model->VBICdepletionCapBE = 0.0; } if(!model->VBICpotentialBEGiven) { model->VBICpotentialBE = 0.75; } if(!model->VBICjunctionExpBEGiven) { model->VBICjunctionExpBE = 0.33; } if(!model->VBICsmoothCapBEGiven) { model->VBICsmoothCapBE = -0.5; } if(!model->VBICextOverlapCapBCGiven) { model->VBICextOverlapCapBC = 0.0; } if(!model->VBICdepletionCapBCGiven) { model->VBICdepletionCapBC = 0.0; } if(!model->VBICepiChargeGiven) { model->VBICepiCharge = 0.0; } if(!model->VBICextCapBCGiven) { model->VBICextCapBC = 0.0; } if(!model->VBICpotentialBCGiven) { model->VBICpotentialBC = 0.75; } if(!model->VBICjunctionExpBCGiven) { model->VBICjunctionExpBC = 0.33; } if(!model->VBICsmoothCapBCGiven) { model->VBICsmoothCapBC = -0.5; } if(!model->VBICextCapSCGiven) { model->VBICextCapSC = 0.0; } if(!model->VBICpotentialSCGiven) { model->VBICpotentialSC = 0.75; } if(!model->VBICjunctionExpSCGiven) { model->VBICjunctionExpSC = 0.33; } if(!model->VBICsmoothCapSCGiven) { model->VBICsmoothCapSC = -0.5; } if(!model->VBICidealSatCurBEGiven) { model->VBICidealSatCurBE = 1e-18; } if(!model->VBICportionIBEIGiven) { model->VBICportionIBEI = 1.0; } if(!model->VBICidealEmissCoeffBEGiven) { model->VBICidealEmissCoeffBE = 1.0; } if(!model->VBICnidealSatCurBEGiven) { model->VBICnidealSatCurBE = 0.0; } if(!model->VBICnidealEmissCoeffBEGiven) { model->VBICnidealEmissCoeffBE = 2.0; } if(!model->VBICidealSatCurBCGiven) { model->VBICidealSatCurBC = 1e-16; } if(!model->VBICidealEmissCoeffBCGiven) { model->VBICidealEmissCoeffBC = 1.0; } if(!model->VBICnidealSatCurBCGiven) { model->VBICnidealSatCurBC = 0.0; } if(!model->VBICnidealEmissCoeffBCGiven) { model->VBICnidealEmissCoeffBC = 2.0; } if(!model->VBICavalanchePar1BCGiven) { model->VBICavalanchePar1BC = 0.0; } if(!model->VBICavalanchePar2BCGiven) { model->VBICavalanchePar2BC = 0.0; } if(!model->VBICparasitSatCurGiven) { model->VBICparasitSatCur = 0.0; } if(!model->VBICportionICCPGiven) { model->VBICportionICCP = 1.0; } if(!model->VBICparasitFwdEmissCoeffGiven) { model->VBICparasitFwdEmissCoeff = 1.0; } if(!model->VBICidealParasitSatCurBEGiven) { model->VBICidealParasitSatCurBE = 0.0; } if(!model->VBICnidealParasitSatCurBEGiven) { model->VBICnidealParasitSatCurBE = 0.0; } if(!model->VBICidealParasitSatCurBCGiven) { model->VBICidealParasitSatCurBC = 0.0; } if(!model->VBICidealParasitEmissCoeffBCGiven) { model->VBICidealParasitEmissCoeffBC = 1.0; } if(!model->VBICnidealParasitSatCurBCGiven) { model->VBICnidealParasitSatCurBC = 0.0; } if(!model->VBICnidealParasitEmissCoeffBCGiven) { model->VBICnidealParasitEmissCoeffBC = 2.0; } if(!model->VBICearlyVoltFGiven) { model->VBICearlyVoltF = 0.0; } if(!model->VBICearlyVoltRGiven) { model->VBICearlyVoltR = 0.0; } if(!model->VBICrollOffFGiven) { model->VBICrollOffF = 0.0; } if(!model->VBICrollOffRGiven) { model->VBICrollOffR = 0.0; } if(!model->VBICparRollOffGiven) { model->VBICparRollOff = 0.0; } if(!model->VBICtransitTimeFGiven) { model->VBICtransitTimeF = 0.0; } if(!model->VBICvarTransitTimeFGiven) { model->VBICvarTransitTimeF = 0.0; } if(!model->VBICtransitTimeBiasCoeffFGiven) { model->VBICtransitTimeBiasCoeffF = 0.0; } if(!model->VBICtransitTimeFVBCGiven) { model->VBICtransitTimeFVBC = 0.0; } if(!model->VBICtransitTimeHighCurrentFGiven) { model->VBICtransitTimeHighCurrentF = 0.0; } if(!model->VBICtransitTimeRGiven) { model->VBICtransitTimeR = 0.0; } if(!model->VBICdelayTimeFGiven) { model->VBICdelayTimeF = 0.0; } if(!model->VBICfNcoefGiven) { model->VBICfNcoef = 0.0; } if(!model->VBICfNexpAGiven) { model->VBICfNexpA = 1.0; } if(!model->VBICfNexpBGiven) { model->VBICfNexpB = 1.0; } if(!model->VBICtempExpREGiven) { model->VBICtempExpRE = 0.0; } if(!model->VBICtempExpRBGiven) { model->VBICtempExpRB = 0.0; } if(!model->VBICtempExpRBIGiven) { model->VBICtempExpRBI = 0.0; } if(!model->VBICtempExpRCGiven) { model->VBICtempExpRC = 0.0; } if(!model->VBICtempExpRCIGiven) { model->VBICtempExpRCI = 0.0; } if(!model->VBICtempExpRSGiven) { model->VBICtempExpRS = 0.0; } if(!model->VBICtempExpVOGiven) { model->VBICtempExpVO = 0.0; } if(!model->VBICactivEnergyEAGiven) { model->VBICactivEnergyEA = 1.12; } if(!model->VBICactivEnergyEAIEGiven) { model->VBICactivEnergyEAIE = 1.12; } if(!model->VBICactivEnergyEAICGiven) { model->VBICactivEnergyEAIC = 1.12; } if(!model->VBICactivEnergyEAISGiven) { model->VBICactivEnergyEAIS = 1.12; } if(!model->VBICactivEnergyEANEGiven) { model->VBICactivEnergyEANE = 1.12; } if(!model->VBICactivEnergyEANCGiven) { model->VBICactivEnergyEANC = 1.12; } if(!model->VBICactivEnergyEANSGiven) { model->VBICactivEnergyEANS = 1.12; } if(!model->VBICtempExpISGiven) { model->VBICtempExpIS = 3.0; } if(!model->VBICtempExpIIGiven) { model->VBICtempExpII = 3.0; } if(!model->VBICtempExpINGiven) { model->VBICtempExpIN = 3.0; } if(!model->VBICtempExpNFGiven) { model->VBICtempExpNF = 0.0; } if(!model->VBICtempExpAVCGiven) { model->VBICtempExpAVC = 0.0; } if(!model->VBICthermalResistGiven) { model->VBICthermalResist = 0.0; } if(!model->VBICthermalCapacitanceGiven) { model->VBICthermalCapacitance = 0.0; } if(!model->VBICpunchThroughVoltageBCGiven) { model->VBICpunchThroughVoltageBC = 0.0; } if(!model->VBICdeplCapCoeff1Given) { model->VBICdeplCapCoeff1 = 0.1; } if(!model->VBICfixedCapacitanceCSGiven) { model->VBICfixedCapacitanceCS = 0.0; } if(!model->VBICsgpQBselectorGiven) { model->VBICsgpQBselector = 0.0; } if(!model->VBIChighCurrentBetaRolloffGiven) { model->VBIChighCurrentBetaRolloff = 0.5; } if(!model->VBICtempExpIKFGiven) { model->VBICtempExpIKF = 0.0; } if(!model->VBICtempExpRCXGiven) { model->VBICtempExpRCX = 0.0; } if(!model->VBICtempExpRBXGiven) { model->VBICtempExpRBX = 0.0; } if(!model->VBICtempExpRBPGiven) { model->VBICtempExpRBP = 0.0; } if(!model->VBICsepISRRGiven) { model->VBICsepISRR = 1.0; } if(!model->VBICtempExpXISRGiven) { model->VBICtempExpXISR = 0.0; } if(!model->VBICdearGiven) { model->VBICdear = 0.0; } if(!model->VBICeapGiven) { model->VBICeap = 1.12; } if(!model->VBICvbbeGiven) { model->VBICvbbe = 0.0; } if(!model->VBICnbbeGiven) { model->VBICnbbe = 1.0; } if(!model->VBICibbeGiven) { model->VBICibbe = 1e-06; } if(!model->VBICtvbbe1Given) { model->VBICtvbbe1 = 0.0; } if(!model->VBICtvbbe2Given) { model->VBICtvbbe2 = 0.0; } if(!model->VBICtnbbeGiven) { model->VBICtnbbe = 0.0; } if(!model->VBICebbeGiven) { model->VBICebbe = 0.0; } if(!model->VBIClocTempDiffGiven) { model->VBIClocTempDiff = 0.0; } if(!model->VBICrevVersionGiven) { model->VBICrevVersion = 1.2; } if(!model->VBICrefVersionGiven) { model->VBICrefVersion = 0.0; } if(!model->VBICvbeMaxGiven) { model->VBICvbeMax = 1e99; } if(!model->VBICvbcMaxGiven) { model->VBICvbcMax = 1e99; } if(!model->VBICvceMaxGiven) { model->VBICvceMax = 1e99; } /* loop through all the instances of the model */ for (here = model->VBICinstances; here != NULL ; here=here->VBICnextInstance) { CKTnode *tmpNode; IFuid tmpName; if(!here->VBICareaGiven) { here->VBICarea = 1.0; } if(!here->VBICmGiven) { here->VBICm = 1.0; } if(!here->VBICdtempGiven) { here->VBICdtemp = 0.0; } here->VBICstate = *states; *states += VBICnumStates; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 8 * (ckt->CKTsenInfo->SENparms); } if(model->VBICextCollResist == 0) { here->VBICcollCXNode = here->VBICcollNode; } else if(here->VBICcollCXNode == 0) { error = CKTmkVolt(ckt,&tmp,here->VBICname,"collector"); if(error) return(error); here->VBICcollCXNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if(model->VBICextBaseResist == 0) { here->VBICbaseBXNode = here->VBICbaseNode; } else if(here->VBICbaseBXNode == 0){ error = CKTmkVolt(ckt,&tmp,here->VBICname, "base"); if(error) return(error); here->VBICbaseBXNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if(model->VBICemitterResist == 0) { here->VBICemitEINode = here->VBICemitNode; } else if(here->VBICemitEINode == 0) { error = CKTmkVolt(ckt,&tmp,here->VBICname, "emitter"); if(error) return(error); here->VBICemitEINode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if(model->VBICsubstrateResist == 0) { here->VBICsubsSINode = here->VBICsubsNode; } else if(here->VBICsubsSINode == 0) { error = CKTmkVolt(ckt,&tmp,here->VBICname, "substrate"); if(error) return(error); here->VBICsubsSINode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if(here->VBICcollCINode == 0) { error = CKTmkVolt(ckt, &tmp, here->VBICname, "collCI"); if(error) return(error); here->VBICcollCINode = tmp->number; } if(here->VBICbaseBPNode == 0) { error = CKTmkVolt(ckt, &tmp, here->VBICname, "baseBP"); if(error) return(error); here->VBICbaseBPNode = tmp->number; } if(here->VBICbaseBINode == 0) { error = CKTmkVolt(ckt, &tmp, here->VBICname, "baseBI"); if(error) return(error); here->VBICbaseBINode = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(VBICcollCollPtr,VBICcollNode,VBICcollNode); TSTALLOC(VBICbaseBasePtr,VBICbaseNode,VBICbaseNode); TSTALLOC(VBICemitEmitPtr,VBICemitNode,VBICemitNode); TSTALLOC(VBICsubsSubsPtr,VBICsubsNode,VBICsubsNode); TSTALLOC(VBICcollCXCollCXPtr,VBICcollCXNode,VBICcollCXNode); TSTALLOC(VBICcollCICollCIPtr,VBICcollCINode,VBICcollCINode); TSTALLOC(VBICbaseBXBaseBXPtr,VBICbaseBXNode,VBICbaseBXNode); TSTALLOC(VBICbaseBIBaseBIPtr,VBICbaseBINode,VBICbaseBINode); TSTALLOC(VBICemitEIEmitEIPtr,VBICemitEINode,VBICemitEINode); TSTALLOC(VBICbaseBPBaseBPPtr,VBICbaseBPNode,VBICbaseBPNode); TSTALLOC(VBICsubsSISubsSIPtr,VBICsubsSINode,VBICsubsSINode); TSTALLOC(VBICbaseEmitPtr,VBICbaseNode,VBICemitNode); TSTALLOC(VBICemitBasePtr,VBICemitNode,VBICbaseNode); TSTALLOC(VBICbaseCollPtr,VBICbaseNode,VBICcollNode); TSTALLOC(VBICcollBasePtr,VBICcollNode,VBICbaseNode); TSTALLOC(VBICcollCollCXPtr,VBICcollNode,VBICcollCXNode); TSTALLOC(VBICbaseBaseBXPtr,VBICbaseNode,VBICbaseBXNode); TSTALLOC(VBICemitEmitEIPtr,VBICemitNode,VBICemitEINode); TSTALLOC(VBICsubsSubsSIPtr,VBICsubsNode,VBICsubsSINode); TSTALLOC(VBICcollCXCollCIPtr,VBICcollCXNode,VBICcollCINode); TSTALLOC(VBICcollCXBaseBXPtr,VBICcollCXNode,VBICbaseBXNode); TSTALLOC(VBICcollCXBaseBIPtr,VBICcollCXNode,VBICbaseBINode); TSTALLOC(VBICcollCXBaseBPPtr,VBICcollCXNode,VBICbaseBPNode); TSTALLOC(VBICcollCIBaseBIPtr,VBICcollCINode,VBICbaseBINode); TSTALLOC(VBICcollCIEmitEIPtr,VBICcollCINode,VBICemitEINode); TSTALLOC(VBICbaseBXBaseBIPtr,VBICbaseBXNode,VBICbaseBINode); TSTALLOC(VBICbaseBXEmitEIPtr,VBICbaseBXNode,VBICemitEINode); TSTALLOC(VBICbaseBXBaseBPPtr,VBICbaseBXNode,VBICbaseBPNode); TSTALLOC(VBICbaseBXSubsSIPtr,VBICbaseBXNode,VBICsubsSINode); TSTALLOC(VBICbaseBIEmitEIPtr,VBICbaseBINode,VBICemitEINode); TSTALLOC(VBICbaseBPSubsSIPtr,VBICbaseBPNode,VBICsubsSINode); TSTALLOC(VBICcollCXCollPtr,VBICcollCXNode,VBICcollNode); TSTALLOC(VBICbaseBXBasePtr,VBICbaseBXNode,VBICbaseNode); TSTALLOC(VBICemitEIEmitPtr,VBICemitEINode,VBICemitNode); TSTALLOC(VBICsubsSISubsPtr,VBICsubsSINode,VBICsubsNode); TSTALLOC(VBICcollCICollCXPtr,VBICcollCINode,VBICcollCXNode); TSTALLOC(VBICbaseBICollCXPtr,VBICbaseBINode,VBICcollCXNode); TSTALLOC(VBICbaseBPCollCXPtr,VBICbaseBPNode,VBICcollCXNode); TSTALLOC(VBICbaseBXCollCIPtr,VBICbaseBXNode,VBICcollCINode); TSTALLOC(VBICbaseBICollCIPtr,VBICbaseBINode,VBICcollCINode); TSTALLOC(VBICemitEICollCIPtr,VBICemitEINode,VBICcollCINode); TSTALLOC(VBICbaseBPCollCIPtr,VBICbaseBPNode,VBICcollCINode); TSTALLOC(VBICbaseBIBaseBXPtr,VBICbaseBINode,VBICbaseBXNode); TSTALLOC(VBICemitEIBaseBXPtr,VBICemitEINode,VBICbaseBXNode); TSTALLOC(VBICbaseBPBaseBXPtr,VBICbaseBPNode,VBICbaseBXNode); TSTALLOC(VBICsubsSIBaseBXPtr,VBICsubsSINode,VBICbaseBXNode); TSTALLOC(VBICemitEIBaseBIPtr,VBICemitEINode,VBICbaseBINode); TSTALLOC(VBICbaseBPBaseBIPtr,VBICbaseBPNode,VBICbaseBINode); TSTALLOC(VBICsubsSICollCIPtr,VBICsubsSINode,VBICcollCINode); TSTALLOC(VBICsubsSIBaseBIPtr,VBICsubsSINode,VBICbaseBINode); TSTALLOC(VBICsubsSIBaseBPPtr,VBICsubsSINode,VBICbaseBPNode); } } return(OK); } int VBICunsetup( GENmodel *inModel, CKTcircuit *ckt) { VBICmodel *model; VBICinstance *here; for (model = (VBICmodel *)inModel; model != NULL; model = model->VBICnextModel) { for (here = model->VBICinstances; here != NULL; here=here->VBICnextInstance) { if (here->VBICcollCXNode && here->VBICcollCXNode != here->VBICcollNode) { CKTdltNNum(ckt, here->VBICcollCXNode); here->VBICcollCXNode = 0; } if (here->VBICbaseBXNode && here->VBICbaseBXNode != here->VBICbaseNode) { CKTdltNNum(ckt, here->VBICbaseBXNode); here->VBICbaseBXNode = 0; } if (here->VBICemitEINode && here->VBICemitEINode != here->VBICemitNode) { CKTdltNNum(ckt, here->VBICemitEINode); here->VBICemitEINode = 0; } if (here->VBICsubsSINode && here->VBICsubsSINode != here->VBICsubsNode) { CKTdltNNum(ckt, here->VBICsubsSINode); here->VBICsubsSINode = 0; } if (here->VBICcollCINode) { CKTdltNNum(ckt, here->VBICcollCINode); here->VBICcollCINode = 0; } if (here->VBICbaseBINode) { CKTdltNNum(ckt, here->VBICbaseBINode); here->VBICbaseBINode = 0; } if (here->VBICbaseBPNode) { CKTdltNNum(ckt, here->VBICbaseBPNode); here->VBICbaseBPNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/vbic/vbicmpar.c0000644000265600020320000004315512264261473021136 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine sets model parameters for * VBICs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICmParam(int param, IFvalue *value, GENmodel *inModel) { VBICmodel *mods = (VBICmodel*)inModel; switch(param) { case VBIC_MOD_NPN: if(value->iValue) { mods->VBICtype = NPN; } break; case VBIC_MOD_PNP: if(value->iValue) { mods->VBICtype = PNP; } break; case VBIC_MOD_TNOM: mods->VBICtnom = value->rValue; mods->VBICtnomGiven = TRUE; break; case VBIC_MOD_RCX: mods->VBICextCollResist = value->rValue; if (mods->VBICextCollResist < 0.1) mods->VBICextCollResist = 0.1; mods->VBICextCollResistGiven = TRUE; break; case VBIC_MOD_RCI: mods->VBICintCollResist = value->rValue; if (mods->VBICintCollResist < 0.1) mods->VBICintCollResist = 0.1; mods->VBICintCollResistGiven = TRUE; break; case VBIC_MOD_VO: mods->VBICepiSatVoltage = value->rValue; mods->VBICepiSatVoltageGiven = TRUE; break; case VBIC_MOD_GAMM: mods->VBICepiDoping = value->rValue; mods->VBICepiDopingGiven = TRUE; break; case VBIC_MOD_HRCF: mods->VBIChighCurFac = value->rValue; mods->VBIChighCurFacGiven = TRUE; break; case VBIC_MOD_RBX: mods->VBICextBaseResist = value->rValue; if (mods->VBICextBaseResist < 0.1) mods->VBICextBaseResist = 0.1; mods->VBICextBaseResistGiven = TRUE; break; case VBIC_MOD_RBI: mods->VBICintBaseResist = value->rValue; if (mods->VBICintBaseResist < 0.1) mods->VBICintBaseResist = 0.1; mods->VBICintBaseResistGiven = TRUE; break; case VBIC_MOD_RE: mods->VBICemitterResist = value->rValue; if (mods->VBICemitterResist < 0.01) mods->VBICemitterResist = 0.01; mods->VBICemitterResistGiven = TRUE; break; case VBIC_MOD_RS: mods->VBICsubstrateResist = value->rValue; if (mods->VBICsubstrateResist < 0.1) mods->VBICsubstrateResist = 0.1; mods->VBICsubstrateResistGiven = TRUE; break; case VBIC_MOD_RBP: mods->VBICparBaseResist = value->rValue; if (mods->VBICparBaseResist < 0.1) mods->VBICparBaseResist = 0.1; mods->VBICparBaseResistGiven = TRUE; break; case VBIC_MOD_IS: mods->VBICsatCur = value->rValue; mods->VBICsatCurGiven = TRUE; break; case VBIC_MOD_NF: mods->VBICemissionCoeffF = value->rValue; mods->VBICemissionCoeffFGiven = TRUE; break; case VBIC_MOD_NR: mods->VBICemissionCoeffR = value->rValue; mods->VBICemissionCoeffRGiven = TRUE; break; case VBIC_MOD_FC: mods->VBICdeplCapLimitF = value->rValue; mods->VBICdeplCapLimitFGiven = TRUE; break; case VBIC_MOD_CBEO: mods->VBICextOverlapCapBE = value->rValue; mods->VBICextOverlapCapBEGiven=TRUE; break; case VBIC_MOD_CJE: mods->VBICdepletionCapBE = value->rValue; mods->VBICdepletionCapBEGiven = TRUE; break; case VBIC_MOD_PE: mods->VBICpotentialBE = value->rValue; mods->VBICpotentialBEGiven = TRUE; break; case VBIC_MOD_ME: mods->VBICjunctionExpBE = value->rValue; mods->VBICjunctionExpBEGiven = TRUE; break; case VBIC_MOD_AJE: mods->VBICsmoothCapBE = value->rValue; mods->VBICsmoothCapBEGiven = TRUE; break; case VBIC_MOD_CBCO: mods->VBICextOverlapCapBC = value->rValue; mods->VBICextOverlapCapBCGiven=TRUE; break; case VBIC_MOD_CJC: mods->VBICdepletionCapBC = value->rValue; mods->VBICdepletionCapBCGiven = TRUE; break; case VBIC_MOD_QCO: mods->VBICepiCharge = value->rValue; mods->VBICepiChargeGiven = TRUE; break; case VBIC_MOD_CJEP: mods->VBICextCapBC = value->rValue; mods->VBICextCapBCGiven = TRUE; break; case VBIC_MOD_PC: mods->VBICpotentialBC = value->rValue; mods->VBICpotentialBCGiven = TRUE; break; case VBIC_MOD_MC: mods->VBICjunctionExpBC = value->rValue; mods->VBICjunctionExpBCGiven = TRUE; break; case VBIC_MOD_AJC: mods->VBICsmoothCapBC = value->rValue; mods->VBICsmoothCapBCGiven = TRUE; break; case VBIC_MOD_CJCP: mods->VBICextCapSC = value->rValue; mods->VBICextCapSCGiven = TRUE; break; case VBIC_MOD_PS: mods->VBICpotentialSC = value->rValue; mods->VBICpotentialSCGiven = TRUE; break; case VBIC_MOD_MS: mods->VBICjunctionExpSC = value->rValue; mods->VBICjunctionExpSCGiven = TRUE; break; case VBIC_MOD_AJS: mods->VBICsmoothCapSC = value->rValue; mods->VBICsmoothCapSCGiven = TRUE; break; case VBIC_MOD_IBEI: mods->VBICidealSatCurBE = value->rValue; mods->VBICidealSatCurBEGiven = TRUE; break; case VBIC_MOD_WBE: mods->VBICportionIBEI = value->rValue; mods->VBICportionIBEIGiven = TRUE; break; case VBIC_MOD_NEI: mods->VBICidealEmissCoeffBE = value->rValue; mods->VBICidealEmissCoeffBEGiven = TRUE; break; case VBIC_MOD_IBEN: mods->VBICnidealSatCurBE = value->rValue; mods->VBICnidealSatCurBEGiven = TRUE; break; case VBIC_MOD_NEN: mods->VBICnidealEmissCoeffBE = value->rValue; mods->VBICnidealEmissCoeffBEGiven = TRUE; break; case VBIC_MOD_IBCI: mods->VBICidealSatCurBC = value->rValue; mods->VBICidealSatCurBCGiven = TRUE; break; case VBIC_MOD_NCI: mods->VBICidealEmissCoeffBC = value->rValue; mods->VBICidealEmissCoeffBCGiven = TRUE; break; case VBIC_MOD_IBCN: mods->VBICnidealSatCurBC = value->rValue; mods->VBICnidealSatCurBCGiven = TRUE; break; case VBIC_MOD_NCN: mods->VBICnidealEmissCoeffBC = value->rValue; mods->VBICnidealEmissCoeffBCGiven = TRUE; break; case VBIC_MOD_AVC1: mods->VBICavalanchePar1BC = value->rValue; mods->VBICavalanchePar1BCGiven = TRUE; break; case VBIC_MOD_AVC2: mods->VBICavalanchePar2BC = value->rValue; mods->VBICavalanchePar2BCGiven = TRUE; break; case VBIC_MOD_ISP: mods->VBICparasitSatCur = value->rValue; mods->VBICparasitSatCurGiven = TRUE; break; case VBIC_MOD_WSP: mods->VBICportionICCP = value->rValue; mods->VBICportionICCPGiven = TRUE; break; case VBIC_MOD_NFP: mods->VBICparasitFwdEmissCoeff = value->rValue; mods->VBICparasitFwdEmissCoeffGiven = TRUE; break; case VBIC_MOD_IBEIP: mods->VBICidealParasitSatCurBE = value->rValue; mods->VBICidealParasitSatCurBEGiven = TRUE; break; case VBIC_MOD_IBENP: mods->VBICnidealParasitSatCurBE = value->rValue; mods->VBICnidealParasitSatCurBEGiven = TRUE; break; case VBIC_MOD_IBCIP: mods->VBICidealParasitSatCurBC = value->rValue; mods->VBICidealParasitSatCurBCGiven = TRUE; break; case VBIC_MOD_NCIP: mods->VBICidealParasitEmissCoeffBC = value->rValue; mods->VBICidealParasitEmissCoeffBCGiven = TRUE; break; case VBIC_MOD_IBCNP: mods->VBICnidealParasitSatCurBC = value->rValue; mods->VBICnidealParasitSatCurBCGiven = TRUE; break; case VBIC_MOD_NCNP: mods->VBICnidealParasitEmissCoeffBC = value->rValue; mods->VBICnidealParasitEmissCoeffBCGiven = TRUE; break; case VBIC_MOD_VEF: mods->VBICearlyVoltF = value->rValue; mods->VBICearlyVoltFGiven = TRUE; break; case VBIC_MOD_VER: mods->VBICearlyVoltR = value->rValue; mods->VBICearlyVoltRGiven = TRUE; break; case VBIC_MOD_IKF: mods->VBICrollOffF = value->rValue; mods->VBICrollOffFGiven = TRUE; break; case VBIC_MOD_IKR: mods->VBICrollOffR = value->rValue; mods->VBICrollOffRGiven = TRUE; break; case VBIC_MOD_IKP: mods->VBICparRollOff = value->rValue; mods->VBICparRollOffGiven = TRUE; break; case VBIC_MOD_TF: mods->VBICtransitTimeF = value->rValue; mods->VBICtransitTimeFGiven = TRUE; break; case VBIC_MOD_QTF: mods->VBICvarTransitTimeF = value->rValue; mods->VBICvarTransitTimeFGiven = TRUE; break; case VBIC_MOD_XTF: mods->VBICtransitTimeBiasCoeffF = value->rValue; mods->VBICtransitTimeBiasCoeffFGiven = TRUE; break; case VBIC_MOD_VTF: mods->VBICtransitTimeFVBC = value->rValue; mods->VBICtransitTimeFVBCGiven = TRUE; break; case VBIC_MOD_ITF: mods->VBICtransitTimeHighCurrentF = value->rValue; mods->VBICtransitTimeHighCurrentFGiven = TRUE; break; case VBIC_MOD_TR: mods->VBICtransitTimeR = value->rValue; mods->VBICtransitTimeRGiven = TRUE; break; case VBIC_MOD_TD: mods->VBICdelayTimeF = value->rValue; mods->VBICdelayTimeFGiven = TRUE; break; case VBIC_MOD_KFN: mods->VBICfNcoef = value->rValue; mods->VBICfNcoefGiven = TRUE; break; case VBIC_MOD_AFN: mods->VBICfNexpA = value->rValue; mods->VBICfNexpAGiven = TRUE; break; case VBIC_MOD_BFN: mods->VBICfNexpB = value->rValue; mods->VBICfNexpBGiven = TRUE; break; case VBIC_MOD_XRE: mods->VBICtempExpRE = value->rValue; mods->VBICtempExpREGiven = TRUE; break; case VBIC_MOD_XRB: mods->VBICtempExpRB = value->rValue; mods->VBICtempExpRBGiven = TRUE; break; case VBIC_MOD_XRBI: mods->VBICtempExpRBI = value->rValue; mods->VBICtempExpRBIGiven = TRUE; break; case VBIC_MOD_XRC: mods->VBICtempExpRC = value->rValue; mods->VBICtempExpRCGiven = TRUE; break; case VBIC_MOD_XRCI: mods->VBICtempExpRCI = value->rValue; mods->VBICtempExpRCIGiven = TRUE; break; case VBIC_MOD_XRS: mods->VBICtempExpRS = value->rValue; mods->VBICtempExpRSGiven = TRUE; break; case VBIC_MOD_XVO: mods->VBICtempExpVO = value->rValue; mods->VBICtempExpVOGiven = TRUE; break; case VBIC_MOD_EA: mods->VBICactivEnergyEA = value->rValue; mods->VBICactivEnergyEAGiven = TRUE; break; case VBIC_MOD_EAIE: mods->VBICactivEnergyEAIE = value->rValue; mods->VBICactivEnergyEAIEGiven = TRUE; break; case VBIC_MOD_EAIC: mods->VBICactivEnergyEAIC = value->rValue; mods->VBICactivEnergyEAICGiven = TRUE; break; case VBIC_MOD_EAIS: mods->VBICactivEnergyEAIS = value->rValue; mods->VBICactivEnergyEAISGiven = TRUE; break; case VBIC_MOD_EANE: mods->VBICactivEnergyEANE = value->rValue; mods->VBICactivEnergyEANEGiven = TRUE; break; case VBIC_MOD_EANC: mods->VBICactivEnergyEANC = value->rValue; mods->VBICactivEnergyEANCGiven = TRUE; break; case VBIC_MOD_EANS: mods->VBICactivEnergyEANS = value->rValue; mods->VBICactivEnergyEANSGiven = TRUE; break; case VBIC_MOD_XIS: mods->VBICtempExpIS = value->rValue; mods->VBICtempExpISGiven = TRUE; break; case VBIC_MOD_XII: mods->VBICtempExpII = value->rValue; mods->VBICtempExpIIGiven = TRUE; break; case VBIC_MOD_XIN: mods->VBICtempExpIN = value->rValue; mods->VBICtempExpINGiven = TRUE; break; case VBIC_MOD_TNF: mods->VBICtempExpNF = value->rValue; mods->VBICtempExpNFGiven = TRUE; break; case VBIC_MOD_TAVC: mods->VBICtempExpAVC = value->rValue; mods->VBICtempExpAVCGiven = TRUE; break; case VBIC_MOD_RTH: mods->VBICthermalResist = value->rValue; mods->VBICthermalResistGiven = TRUE; break; case VBIC_MOD_CTH: mods->VBICthermalCapacitance = value->rValue; mods->VBICthermalCapacitanceGiven = TRUE; break; case VBIC_MOD_VRT: mods->VBICpunchThroughVoltageBC = value->rValue; mods->VBICpunchThroughVoltageBCGiven = TRUE; break; case VBIC_MOD_ART: mods->VBICdeplCapCoeff1 = value->rValue; mods->VBICdeplCapCoeff1Given = TRUE; break; case VBIC_MOD_CCSO: mods->VBICfixedCapacitanceCS = value->rValue; mods->VBICfixedCapacitanceCSGiven = TRUE; break; case VBIC_MOD_QBM: mods->VBICsgpQBselector = value->rValue; mods->VBICsgpQBselectorGiven = TRUE; break; case VBIC_MOD_NKF: mods->VBIChighCurrentBetaRolloff = value->rValue; mods->VBIChighCurrentBetaRolloffGiven = TRUE; break; case VBIC_MOD_XIKF: mods->VBICtempExpIKF = value->rValue; mods->VBICtempExpIKFGiven = TRUE; break; case VBIC_MOD_XRCX: mods->VBICtempExpRCX = value->rValue; mods->VBICtempExpRCXGiven = TRUE; break; case VBIC_MOD_XRBX: mods->VBICtempExpRBX = value->rValue; mods->VBICtempExpRBXGiven = TRUE; break; case VBIC_MOD_XRBP: mods->VBICtempExpRBP = value->rValue; mods->VBICtempExpRBPGiven = TRUE; break; case VBIC_MOD_ISRR: mods->VBICsepISRR = value->rValue; mods->VBICsepISRRGiven = TRUE; break; case VBIC_MOD_XISR: mods->VBICtempExpXISR = value->rValue; mods->VBICtempExpXISRGiven = TRUE; break; case VBIC_MOD_DEAR: mods->VBICdear = value->rValue; mods->VBICdearGiven = TRUE; break; case VBIC_MOD_EAP: mods->VBICeap = value->rValue; mods->VBICeapGiven = TRUE; break; case VBIC_MOD_VBBE: mods->VBICvbbe = value->rValue; mods->VBICvbbeGiven = TRUE; break; case VBIC_MOD_NBBE: mods->VBICnbbe = value->rValue; mods->VBICnbbeGiven = TRUE; break; case VBIC_MOD_IBBE: mods->VBICibbe = value->rValue; mods->VBICibbeGiven = TRUE; break; case VBIC_MOD_TVBBE1: mods->VBICtvbbe1 = value->rValue; mods->VBICtvbbe1Given = TRUE; break; case VBIC_MOD_TVBBE2: mods->VBICtvbbe2 = value->rValue; mods->VBICtvbbe2Given = TRUE; break; case VBIC_MOD_TNBBE: mods->VBICtnbbe = value->rValue; mods->VBICtnbbeGiven = TRUE; break; case VBIC_MOD_EBBE: mods->VBICebbe = value->rValue; mods->VBICebbeGiven = TRUE; break; case VBIC_MOD_DTEMP: mods->VBIClocTempDiff = value->rValue; mods->VBIClocTempDiffGiven = TRUE; break; case VBIC_MOD_VERS: mods->VBICrevVersion = value->rValue; mods->VBICrevVersionGiven = TRUE; break; case VBIC_MOD_VREF: mods->VBICrefVersion = value->rValue; mods->VBICrefVersionGiven = TRUE; break; case VBIC_MOD_VBE_MAX: mods->VBICvbeMax = value->rValue; mods->VBICvbeMaxGiven = TRUE; break; case VBIC_MOD_VBC_MAX: mods->VBICvbcMax = value->rValue; mods->VBICvbcMaxGiven = TRUE; break; case VBIC_MOD_VCE_MAX: mods->VBICvceMax = value->rValue; mods->VBICvceMaxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/vbic/Makefile.am0000644000265600020320000000105012264261473021207 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libvbic.la libvbic_la_SOURCES = \ vbic.c \ vbicacld.c \ vbicask.c \ vbicconv.c \ vbicdefs.h \ vbicdel.c \ vbicdest.c \ vbicext.h \ vbicgetic.c \ vbicinit.c \ vbicinit.h \ vbicitf.h \ vbicload.c \ vbicmask.c \ vbicmdel.c \ vbicmpar.c \ vbicnoise.c \ vbicparam.c \ vbicpzld.c \ vbicsetup.c \ vbicsoachk.c \ vbictemp.c \ vbictrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/vbic/vbicdest.c0000644000265600020320000000216012264261473021125 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine deletes all VBICs from the circuit and frees * all storage they were using. */ #include "ngspice/ngspice.h" #include "vbicdefs.h" #include "ngspice/suffix.h" void VBICdestroy(GENmodel **inModel) { VBICmodel **model = (VBICmodel**)inModel; VBICinstance *here; VBICinstance *prev = NULL; VBICmodel *mod = *model; VBICmodel *oldmod = NULL; for( ; mod ; mod = mod->VBICnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->VBICinstances ; here ; here = here->VBICnextInstance) { if(prev){ if(prev->VBICsens) FREE(prev->VBICsens); FREE(prev); } prev = here; } if(prev){ if(prev->VBICsens) FREE(prev->VBICsens); FREE(prev); } } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/vbic/Makefile.in0000644000265600020320000004326712264261540021233 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/vbic DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvbic_la_LIBADD = am_libvbic_la_OBJECTS = vbic.lo vbicacld.lo vbicask.lo vbicconv.lo \ vbicdel.lo vbicdest.lo vbicgetic.lo vbicinit.lo vbicload.lo \ vbicmask.lo vbicmdel.lo vbicmpar.lo vbicnoise.lo vbicparam.lo \ vbicpzld.lo vbicsetup.lo vbicsoachk.lo vbictemp.lo \ vbictrunc.lo libvbic_la_OBJECTS = $(am_libvbic_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libvbic_la_SOURCES) DIST_SOURCES = $(libvbic_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libvbic.la libvbic_la_SOURCES = \ vbic.c \ vbicacld.c \ vbicask.c \ vbicconv.c \ vbicdefs.h \ vbicdel.c \ vbicdest.c \ vbicext.h \ vbicgetic.c \ vbicinit.c \ vbicinit.h \ vbicitf.h \ vbicload.c \ vbicmask.c \ vbicmdel.c \ vbicmpar.c \ vbicnoise.c \ vbicparam.c \ vbicpzld.c \ vbicsetup.c \ vbicsoachk.c \ vbictemp.c \ vbictrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/vbic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/vbic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvbic.la: $(libvbic_la_OBJECTS) $(libvbic_la_DEPENDENCIES) $(EXTRA_libvbic_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libvbic_la_OBJECTS) $(libvbic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbicsoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbictemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbictrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/vbic/vbictrunc.c0000644000265600020320000000224612264261473021326 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine performs truncation error calculations for * VBICs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { VBICmodel *model = (VBICmodel*)inModel; VBICinstance *here; for( ; model != NULL; model = model->VBICnextModel) { for(here=model->VBICinstances;here!=NULL; here = here->VBICnextInstance){ CKTterr(here->VBICqbe,ckt,timeStep); CKTterr(here->VBICqbex,ckt,timeStep); CKTterr(here->VBICqbc,ckt,timeStep); CKTterr(here->VBICqbcx,ckt,timeStep); CKTterr(here->VBICqbep,ckt,timeStep); CKTterr(here->VBICqbeo,ckt,timeStep); CKTterr(here->VBICqbco,ckt,timeStep); CKTterr(here->VBICqbcp,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicinit.c0000644000265600020320000000462012264261473021134 0ustar andreasadmin/* * vbicinit.c */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "vbicitf.h" #include "vbicext.h" #include "vbicinit.h" SPICEdev VBICinfo = { { "VBIC", "Vertical Bipolar Inter-Company Model", &VBICnSize, &VBICnSize, VBICnames, &VBICpTSize, VBICpTable, &VBICmPTSize, VBICmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, VBICparam, /* DEVparam */ VBICmParam, /* DEVmodParam */ VBICload, /* DEVload */ VBICsetup, /* DEVsetup */ VBICunsetup, /* DEVunsetup */ VBICsetup, /* DEVpzSetup */ VBICtemp, /* DEVtemperature */ VBICtrunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ VBICacLoad, /* DEVacLoad */ NULL, /* DEVaccept */ VBICdestroy, /* DEVdestroy */ VBICmDelete, /* DEVmodDelete */ VBICdelete, /* DEVdelete */ VBICgetic, /* DEVsetic */ VBICask, /* DEVask */ VBICmAsk, /* DEVmodAsk */ VBICpzLoad, /* DEVpzLoad */ VBICconvTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ VBICnoise, /* DEVnoise */ VBICsoaCheck, /* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &VBICiSize, /* DEVinstSize */ &VBICmSize /* DEVmodSize */ }; SPICEdev * get_vbic_info(void) { return &VBICinfo; } ngspice-26/src/spicelib/devices/vbic/vbicdel.c0000644000265600020320000000206412264261473020735 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine deletes a VBIC instance from the circuit and frees * the storage it was using. */ #include "ngspice/ngspice.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { VBICmodel *model = (VBICmodel*)inModel; VBICinstance **fast = (VBICinstance**)kill; VBICinstance **prev = NULL; VBICinstance *here; for( ; model ; model = model->VBICnextModel) { prev = &(model->VBICinstances); for(here = *prev; here ; here = *prev) { if(here->VBICname == name || (fast && here==*fast) ) { *prev= here->VBICnextInstance; FREE(here); return(OK); } prev = &(here->VBICnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/vbic/vbicload.c0000644000265600020320000030501612264261473021113 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This is the function called each iteration to evaluate the * VBICs in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" int vbic_4T_it_cf_fj(double *, double *,double *,double *,double *,double *,double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *, double *, double *,double *,double *,double *,double *,double *); int VBICload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { VBICmodel *model = (VBICmodel*)inModel; VBICinstance *here; double p[108] ,Vbei,Vbex,Vbci,Vbep,Vbcp,Vrcx ,Vbcx,Vrci,Vrbx,Vrbi,Vre,Vrbp,Vrs ,Vbe,Vbc,Ibe,Ibe_Vbei,Ibex,Ibex_Vbex,Itzf ,Itzf_Vbei,Itzf_Vbci,Itzr,Itzr_Vbci,Itzr_Vbei,Ibc,Ibc_Vbci ,Ibc_Vbei,Ibep,Ibep_Vbep,Ircx,Ircx_Vrcx,Irci,Irci_Vrci ,Irci_Vbci,Irci_Vbcx,Irbx,Irbx_Vrbx,Irbi,Irbi_Vrbi,Irbi_Vbei ,Irbi_Vbci,Ire,Ire_Vre,Irbp,Irbp_Vrbp,Irbp_Vbep,Irbp_Vbci ,Qbe,Qbe_Vbei,Qbe_Vbci,Qbex,Qbex_Vbex,Qbc,Qbc_Vbci ,Qbcx,Qbcx_Vbcx,Qbep,Qbep_Vbep,Qbep_Vbci,Qbeo,Qbeo_Vbe ,Qbco,Qbco_Vbc,Ibcp,Ibcp_Vbcp,Iccp,Iccp_Vbep,Iccp_Vbci ,Iccp_Vbcp,Irs,Irs_Vrs,Qbcp,Qbcp_Vbcp,SCALE; int iret; double vce; #ifndef PREDICTOR double xfact; #endif double vt; double delvbei; double delvbex; double delvbci; double delvbcx; double delvbep; double delvrci; double delvrbi; double delvrbp; double delvbcp; double ibehat; double ibexhat; double itzfhat; double itzrhat; double ibchat; double ibephat; double ircihat; double irbihat; double irbphat; double ibcphat; double iccphat; double ceq, geq, rhs_current; int icheck = 0; int ichk1, ichk2, ichk3, ichk4, ichk5; int error; int SenCond=0; double gqbeo, cqbeo, gqbco, cqbco, gbcx, cbcx; /* loop through all the models */ for( ; model != NULL; model = model->VBICnextModel ) { /* loop through all the instances of the model */ for (here = model->VBICinstances; here != NULL ; here=here->VBICnextInstance) { vt = here->VBICtemp * CONSTKoverQ; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("VBICload\n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENstatus == PERTURBATION)&& (here->VBICsenPertFlag == OFF)) continue; SenCond = here->VBICsenPertFlag; } gbcx = 0.0; cbcx = 0.0; gqbeo = 0.0; cqbeo = 0.0; gqbco = 0.0; cqbco = 0.0; /* * dc model paramters */ p[0] = here->VBICttnom; p[1] = here->VBICtextCollResist; p[2] = here->VBICtintCollResist; p[3] = here->VBICtepiSatVoltage; p[4] = here->VBICtepiDoping; p[5] = model->VBIChighCurFac; p[6] = here->VBICtextBaseResist; p[7] = here->VBICtintBaseResist; p[8] = here->VBICtemitterResist; p[9] = here->VBICtsubstrateResist; p[10] = here->VBICtparBaseResist; p[11] = here->VBICtsatCur; p[12] = here->VBICtemissionCoeffF; p[13] = here->VBICtemissionCoeffR; p[14] = model->VBICdeplCapLimitF; p[15] = model->VBICextOverlapCapBE; p[16] = here->VBICtdepletionCapBE; p[17] = here->VBICtpotentialBE; p[18] = model->VBICjunctionExpBE; p[19] = model->VBICsmoothCapBE; p[20] = model->VBICextOverlapCapBC; p[21] = here->VBICtdepletionCapBC; p[22] = model->VBICepiCharge; p[23] = here->VBICtextCapBC; p[24] = here->VBICtpotentialBC; p[25] = model->VBICjunctionExpBC; p[26] = model->VBICsmoothCapBC; p[27] = here->VBICtextCapSC; p[28] = here->VBICtpotentialSC; p[29] = model->VBICjunctionExpSC; p[30] = model->VBICsmoothCapSC; p[31] = here->VBICtidealSatCurBE; p[32] = model->VBICportionIBEI; p[33] = model->VBICidealEmissCoeffBE; p[34] = here->VBICtnidealSatCurBE; p[35] = model->VBICnidealEmissCoeffBE; p[36] = here->VBICtidealSatCurBC; p[37] = model->VBICidealEmissCoeffBC; p[38] = here->VBICtnidealSatCurBC; p[39] = model->VBICnidealEmissCoeffBC; p[40] = model->VBICavalanchePar1BC; p[41] = here->VBICtavalanchePar2BC; p[42] = here->VBICtparasitSatCur; p[43] = model->VBICportionICCP; p[44] = model->VBICparasitFwdEmissCoeff; p[45] = here->VBICtidealParasitSatCurBE; p[46] = here->VBICtnidealParasitSatCurBE; p[47] = here->VBICtidealParasitSatCurBC; p[48] = model->VBICidealParasitEmissCoeffBC; p[49] = here->VBICtnidealParasitSatCurBC; p[50] = model->VBICnidealParasitEmissCoeffBC; p[51] = model->VBICearlyVoltF; p[52] = model->VBICearlyVoltR; p[53] = here->VBICtrollOffF; p[54] = model->VBICrollOffR; p[55] = model->VBICparRollOff; p[56] = model->VBICtransitTimeF; p[57] = model->VBICvarTransitTimeF; p[58] = model->VBICtransitTimeBiasCoeffF; p[59] = model->VBICtransitTimeFVBC; p[60] = model->VBICtransitTimeHighCurrentF; p[61] = model->VBICtransitTimeR; p[62] = model->VBICdelayTimeF; p[63] = model->VBICfNcoef; p[64] = model->VBICfNexpA; p[65] = model->VBICfNexpB; p[66] = model->VBICtempExpRE; p[67] = model->VBICtempExpRBI; p[68] = model->VBICtempExpRCI; p[69] = model->VBICtempExpRS; p[70] = model->VBICtempExpVO; p[71] = model->VBICactivEnergyEA; p[72] = model->VBICactivEnergyEAIE; p[73] = model->VBICactivEnergyEAIC; p[74] = model->VBICactivEnergyEAIS; p[75] = model->VBICactivEnergyEANE; p[76] = model->VBICactivEnergyEANC; p[77] = model->VBICactivEnergyEANS; p[78] = model->VBICtempExpIS; p[79] = model->VBICtempExpII; p[80] = model->VBICtempExpIN; p[81] = model->VBICtempExpNF; p[82] = model->VBICtempExpAVC; p[83] = model->VBICthermalResist; p[84] = model->VBICthermalCapacitance; p[85] = model->VBICpunchThroughVoltageBC; p[86] = model->VBICdeplCapCoeff1; p[87] = model->VBICfixedCapacitanceCS; p[88] = model->VBICsgpQBselector; p[89] = model->VBIChighCurrentBetaRolloff; p[90] = model->VBICtempExpIKF; p[91] = model->VBICtempExpRCX; p[92] = model->VBICtempExpRBX; p[93] = model->VBICtempExpRBP; p[94] = here->VBICtsepISRR; p[95] = model->VBICtempExpXISR; p[96] = model->VBICdear; p[97] = model->VBICeap; p[98] = here->VBICtvbbe; p[99] = here->VBICtnbbe; p[100] = model->VBICibbe; p[101] = model->VBICtvbbe1; p[102] = model->VBICtvbbe2; p[103] = model->VBICtnbbe; p[104] = model->VBICebbe; p[105] = model->VBIClocTempDiff; p[106] = model->VBICrevVersion; p[107] = model->VBICrefVersion; SCALE = here->VBICarea * here->VBICm; if(SenCond){ #ifdef SENSDEBUG printf("VBICsenPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN)&& (ckt->CKTmode & MODEINITTRAN)) { Vbe = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICcollNode)); Vbei = *(ckt->CKTstate1 + here->VBICvbei); Vbex = *(ckt->CKTstate1 + here->VBICvbex); Vbci = *(ckt->CKTstate1 + here->VBICvbci); Vbcx = *(ckt->CKTstate1 + here->VBICvbcx); Vbep = *(ckt->CKTstate1 + here->VBICvbep); Vrci = *(ckt->CKTstate1 + here->VBICvrci); Vrbi = *(ckt->CKTstate1 + here->VBICvrbi); Vrbp = *(ckt->CKTstate1 + here->VBICvrbp); Vrcx = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICcollNode)- *(ckt->CKTrhsOp+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICemitNode)- *(ckt->CKTrhsOp+here->VBICemitEINode)); Vbcp = *(ckt->CKTstate1 + here->VBICvbcp); Vrs = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICsubsNode)- *(ckt->CKTrhsOp+here->VBICsubsSINode)); } else{ Vbei = *(ckt->CKTstate0 + here->VBICvbei); Vbex = *(ckt->CKTstate0 + here->VBICvbex); Vbci = *(ckt->CKTstate0 + here->VBICvbci); Vbcx = *(ckt->CKTstate0 + here->VBICvbcx); Vbep = *(ckt->CKTstate0 + here->VBICvbep); Vrci = *(ckt->CKTstate0 + here->VBICvrci); Vrbi = *(ckt->CKTstate0 + here->VBICvrbi); Vrbp = *(ckt->CKTstate0 + here->VBICvrbp); Vbcp = *(ckt->CKTstate0 + here->VBICvbcp); if((ckt->CKTsenInfo->SENmode == DCSEN)|| (ckt->CKTsenInfo->SENmode == TRANSEN)){ Vbe = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICcollNode)); Vrcx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICemitNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vrs = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsNode)- *(ckt->CKTrhsOld+here->VBICsubsSINode)); } if(ckt->CKTsenInfo->SENmode == ACSEN){ Vbe = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICcollNode)); Vrcx = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICcollNode)- *(ckt->CKTrhsOp+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICbaseNode)- *(ckt->CKTrhsOp+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICemitNode)- *(ckt->CKTrhsOp+here->VBICemitEINode)); Vrs = model->VBICtype*( *(ckt->CKTrhsOp+here->VBICsubsNode)- *(ckt->CKTrhsOp+here->VBICsubsSINode)); } } goto next1; } /* * initialization */ icheck=1; if(ckt->CKTmode & MODEINITSMSIG) { Vbe = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICcollNode)); Vbei = *(ckt->CKTstate0 + here->VBICvbei); Vbex = *(ckt->CKTstate0 + here->VBICvbex); Vbci = *(ckt->CKTstate0 + here->VBICvbci); Vbcx = *(ckt->CKTstate0 + here->VBICvbcx); Vbep = *(ckt->CKTstate0 + here->VBICvbep); Vrci = *(ckt->CKTstate0 + here->VBICvrci); Vrbi = *(ckt->CKTstate0 + here->VBICvrbi); Vrbp = *(ckt->CKTstate0 + here->VBICvrbp); Vrcx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICemitNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbcp = *(ckt->CKTstate0 + here->VBICvbcp); Vrs = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsNode)- *(ckt->CKTrhsOld+here->VBICsubsSINode)); } else if(ckt->CKTmode & MODEINITTRAN) { Vbe = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICcollNode)); Vbei = *(ckt->CKTstate1 + here->VBICvbei); Vbex = *(ckt->CKTstate1 + here->VBICvbex); Vbci = *(ckt->CKTstate1 + here->VBICvbci); Vbcx = *(ckt->CKTstate1 + here->VBICvbcx); Vbep = *(ckt->CKTstate1 + here->VBICvbep); Vrci = *(ckt->CKTstate1 + here->VBICvrci); Vrbi = *(ckt->CKTstate1 + here->VBICvrbi); Vrbp = *(ckt->CKTstate1 + here->VBICvrbp); Vrcx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICemitNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbcp = *(ckt->CKTstate1 + here->VBICvbcp); Vrs = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsNode)- *(ckt->CKTrhsOld+here->VBICsubsSINode)); if( (ckt->CKTmode & MODETRAN) && (ckt->CKTmode & MODEUIC) ) { Vbc = model->VBICtype * (here->VBICicVBE-here->VBICicVCE); } } else if((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)){ Vbe=model->VBICtype*here->VBICicVBE; Vbei=Vbex=Vbe; vce=model->VBICtype*here->VBICicVCE; Vbc=Vbe-vce; Vbci=Vbcx=Vbc; Vbep=Vbcp=0.0; Vrci=Vrbi=Vrbp=0.0; Vrcx=Vrbx=Vre=Vrs=0.0; } else if((ckt->CKTmode & MODEINITJCT) && (here->VBICoff==0)) { Vbe=Vbei=Vbex=model->VBICtype*here->VBICtVcrit; Vbc=Vbci=Vbcx=Vbep=0.0; Vbcp=Vbc-Vbe; Vrci=Vrbi=Vrbp=0.0; Vrcx=Vrbx=Vre=Vrs=0.0; } else if((ckt->CKTmode & MODEINITJCT) || ( (ckt->CKTmode & MODEINITFIX) && (here->VBICoff!=0))) { Vbe=0.0; Vbei=Vbex=Vbe; Vbc=0.0; Vbci=Vbcx=Vbc; Vbep=Vbcp=0.0; Vrci=Vrbi=Vrbp=0.0; Vrcx=Vrbx=Vre=Vrs=0.0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[1]; Vbei = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbei)- xfact * *(ckt->CKTstate2 + here->VBICvbei); Vbex = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbex)- xfact * *(ckt->CKTstate2 + here->VBICvbex); Vbci = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbci)- xfact * *(ckt->CKTstate2 + here->VBICvbci); Vbcx = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbcx)- xfact * *(ckt->CKTstate2 + here->VBICvbcx); Vbep = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbep)- xfact * *(ckt->CKTstate2 + here->VBICvbep); Vrci = (1+xfact) * *(ckt->CKTstate1 + here->VBICvrci)- xfact * *(ckt->CKTstate2 + here->VBICvrci); Vrbi = (1+xfact) * *(ckt->CKTstate1 + here->VBICvrbi)- xfact * *(ckt->CKTstate2 + here->VBICvrbi); Vrbp = (1+xfact) * *(ckt->CKTstate1 + here->VBICvrbp)- xfact * *(ckt->CKTstate2 + here->VBICvrbp); Vbcp = (1+xfact) * *(ckt->CKTstate1 + here->VBICvbcp)- xfact * *(ckt->CKTstate2 + here->VBICvbcp); *(ckt->CKTstate0 + here->VBICvbei) = *(ckt->CKTstate1 + here->VBICvbei); *(ckt->CKTstate0 + here->VBICvbex) = *(ckt->CKTstate1 + here->VBICvbex); *(ckt->CKTstate0 + here->VBICvbci) = *(ckt->CKTstate1 + here->VBICvbci); *(ckt->CKTstate0 + here->VBICvbcx) = *(ckt->CKTstate1 + here->VBICvbcx); *(ckt->CKTstate0 + here->VBICvbep) = *(ckt->CKTstate1 + here->VBICvbep); *(ckt->CKTstate0 + here->VBICvrci) = *(ckt->CKTstate1 + here->VBICvrci); *(ckt->CKTstate0 + here->VBICvrbi) = *(ckt->CKTstate1 + here->VBICvrbi); *(ckt->CKTstate0 + here->VBICvrbp) = *(ckt->CKTstate1 + here->VBICvrbp); *(ckt->CKTstate0 + here->VBICvbcp) = *(ckt->CKTstate1 + here->VBICvbcp); *(ckt->CKTstate0 + here->VBICibe) = *(ckt->CKTstate1 + here->VBICibe); *(ckt->CKTstate0 + here->VBICibe_Vbei) = *(ckt->CKTstate1 + here->VBICibe_Vbei); *(ckt->CKTstate0 + here->VBICibex) = *(ckt->CKTstate1 + here->VBICibex); *(ckt->CKTstate0 + here->VBICibex_Vbex) = *(ckt->CKTstate1 + here->VBICibex_Vbex); *(ckt->CKTstate0 + here->VBICitzf) = *(ckt->CKTstate1 + here->VBICitzf); *(ckt->CKTstate0 + here->VBICitzf_Vbei) = *(ckt->CKTstate1 + here->VBICitzf_Vbei); *(ckt->CKTstate0 + here->VBICitzf_Vbci) = *(ckt->CKTstate1 + here->VBICitzf_Vbci); *(ckt->CKTstate0 + here->VBICitzr) = *(ckt->CKTstate1 + here->VBICitzr); *(ckt->CKTstate0 + here->VBICitzr_Vbei) = *(ckt->CKTstate1 + here->VBICitzf_Vbei); *(ckt->CKTstate0 + here->VBICitzr_Vbci) = *(ckt->CKTstate1 + here->VBICitzr_Vbci); *(ckt->CKTstate0 + here->VBICibc) = *(ckt->CKTstate1 + here->VBICibc); *(ckt->CKTstate0 + here->VBICibc_Vbci) = *(ckt->CKTstate1 + here->VBICibc_Vbci); *(ckt->CKTstate0 + here->VBICibc_Vbei) = *(ckt->CKTstate1 + here->VBICibc_Vbei); *(ckt->CKTstate0 + here->VBICibep) = *(ckt->CKTstate1 + here->VBICibep); *(ckt->CKTstate0 + here->VBICibep_Vbep) = *(ckt->CKTstate1 + here->VBICibep_Vbep); *(ckt->CKTstate0 + here->VBICirci) = *(ckt->CKTstate1 + here->VBICirci); *(ckt->CKTstate0 + here->VBICirci_Vrci) = *(ckt->CKTstate1 + here->VBICirci_Vrci); *(ckt->CKTstate0 + here->VBICirci_Vbci) = *(ckt->CKTstate1 + here->VBICirci_Vbci); *(ckt->CKTstate0 + here->VBICirci_Vbcx) = *(ckt->CKTstate1 + here->VBICirci_Vbcx); *(ckt->CKTstate0 + here->VBICirbi) = *(ckt->CKTstate1 + here->VBICirbi); *(ckt->CKTstate0 + here->VBICirbi_Vrbi) = *(ckt->CKTstate1 + here->VBICirbi_Vrbi); *(ckt->CKTstate0 + here->VBICirbi_Vbei) = *(ckt->CKTstate1 + here->VBICirbi_Vbei); *(ckt->CKTstate0 + here->VBICirbi_Vbci) = *(ckt->CKTstate1 + here->VBICirbi_Vbci); *(ckt->CKTstate0 + here->VBICirbp) = *(ckt->CKTstate1 + here->VBICirbp); *(ckt->CKTstate0 + here->VBICirbp_Vrbp) = *(ckt->CKTstate1 + here->VBICirbp_Vrbp); *(ckt->CKTstate0 + here->VBICirbp_Vbep) = *(ckt->CKTstate1 + here->VBICirbp_Vbep); *(ckt->CKTstate0 + here->VBICirbp_Vbci) = *(ckt->CKTstate1 + here->VBICirbp_Vbci); *(ckt->CKTstate0 + here->VBICibcp) = *(ckt->CKTstate1 + here->VBICibcp); *(ckt->CKTstate0 + here->VBICibcp_Vbcp) = *(ckt->CKTstate1 + here->VBICibcp_Vbcp); *(ckt->CKTstate0 + here->VBICiccp) = *(ckt->CKTstate1 + here->VBICiccp); *(ckt->CKTstate0 + here->VBICiccp_Vbep) = *(ckt->CKTstate1 + here->VBICiccp_Vbep); *(ckt->CKTstate0 + here->VBICiccp_Vbci) = *(ckt->CKTstate1 + here->VBICiccp_Vbci); *(ckt->CKTstate0 + here->VBICiccp_Vbcp) = *(ckt->CKTstate1 + here->VBICiccp_Vbcp); *(ckt->CKTstate0 + here->VBICgqbeo) = *(ckt->CKTstate1 + here->VBICgqbeo); *(ckt->CKTstate0 + here->VBICgqbco) = *(ckt->CKTstate1 + here->VBICgqbco); *(ckt->CKTstate0 + here->VBICircx_Vrcx) = *(ckt->CKTstate1 + here->VBICircx_Vrcx); *(ckt->CKTstate0 + here->VBICirbx_Vrbx) = *(ckt->CKTstate1 + here->VBICirbx_Vrbx); *(ckt->CKTstate0 + here->VBICirs_Vrs) = *(ckt->CKTstate1 + here->VBICirs_Vrs); *(ckt->CKTstate0 + here->VBICire_Vre) = *(ckt->CKTstate1 + here->VBICire_Vre); } else { #endif /* PREDICTOR */ /* * compute new nonlinear branch voltages */ Vbei = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbex = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbci = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICcollCINode)); Vbcx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vbep = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICbaseBPNode)); Vrci = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollCXNode)- *(ckt->CKTrhsOld+here->VBICcollCINode)); Vrbi = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICbaseBINode)); Vrbp = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBPNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vbcp = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsSINode)- *(ckt->CKTrhsOld+here->VBICbaseBPNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvbei = Vbei - *(ckt->CKTstate0 + here->VBICvbei); delvbex = Vbex - *(ckt->CKTstate0 + here->VBICvbex); delvbci = Vbci - *(ckt->CKTstate0 + here->VBICvbci); delvbcx = Vbcx - *(ckt->CKTstate0 + here->VBICvbcx); delvbep = Vbep - *(ckt->CKTstate0 + here->VBICvbep); delvrci = Vrci - *(ckt->CKTstate0 + here->VBICvrci); delvrbi = Vrbi - *(ckt->CKTstate0 + here->VBICvrbi); delvrbp = Vrbp - *(ckt->CKTstate0 + here->VBICvrbp); delvbcp = Vbcp - *(ckt->CKTstate0 + here->VBICvbcp); Vbe = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICemitNode)); Vbc = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICcollNode)); Vrcx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vrbx = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseNode)- *(ckt->CKTrhsOld+here->VBICbaseBXNode)); Vre = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICemitNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vrs = model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsNode)- *(ckt->CKTrhsOld+here->VBICsubsSINode)); ibehat = *(ckt->CKTstate0 + here->VBICibe) + *(ckt->CKTstate0 + here->VBICibe_Vbei)*delvbei; ibexhat = *(ckt->CKTstate0 + here->VBICibex) + *(ckt->CKTstate0 + here->VBICibex_Vbex)*delvbex; itzfhat = *(ckt->CKTstate0 + here->VBICitzf) + *(ckt->CKTstate0 + here->VBICitzf_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzf_Vbci)*delvbci; itzrhat = *(ckt->CKTstate0 + here->VBICitzr) + *(ckt->CKTstate0 + here->VBICitzr_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzr_Vbci)*delvbci; ibchat = *(ckt->CKTstate0 + here->VBICibc) + *(ckt->CKTstate0 + here->VBICibc_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICibc_Vbci)*delvbci; ibephat = *(ckt->CKTstate0 + here->VBICibep) + *(ckt->CKTstate0 + here->VBICibep_Vbep)*delvbep; ircihat = *(ckt->CKTstate0 + here->VBICirci) + *(ckt->CKTstate0 + here->VBICirci_Vrci)*delvrci + *(ckt->CKTstate0 + here->VBICirci_Vbcx)*delvbcx + *(ckt->CKTstate0 + here->VBICirci_Vbci)*delvbci; irbihat = *(ckt->CKTstate0 + here->VBICirbi) + *(ckt->CKTstate0 + here->VBICirbi_Vrbi)*delvrbi + *(ckt->CKTstate0 + here->VBICirbi_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICirbi_Vbci)*delvbci; irbphat = *(ckt->CKTstate0 + here->VBICirbp) + *(ckt->CKTstate0 + here->VBICirbp_Vrbp)*delvrbp + *(ckt->CKTstate0 + here->VBICirbp_Vbep)*delvbep + *(ckt->CKTstate0 + here->VBICirbp_Vbci)*delvbci; ibcphat = *(ckt->CKTstate0 + here->VBICibcp) + *(ckt->CKTstate0 + here->VBICibcp_Vbcp)*delvbcp; iccphat = *(ckt->CKTstate0 + here->VBICiccp) + *(ckt->CKTstate0 + here->VBICiccp_Vbep)*delvbep + *(ckt->CKTstate0 + here->VBICiccp_Vbci)*delvbci + *(ckt->CKTstate0 + here->VBICiccp_Vbcp)*delvbcp; /* * bypass if solution has not changed */ /* the following collections of if's would be just one * if the average compiler could handle it, but many * find the expression too complicated, thus the split. */ if( (ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvbei) < (ckt->CKTreltol*MAX(fabs(Vbei), fabs(*(ckt->CKTstate0 + here->VBICvbei)))+ ckt->CKTvoltTol)) ) if( (fabs(delvbex) < ckt->CKTreltol*MAX(fabs(Vbex), fabs(*(ckt->CKTstate0 + here->VBICvbex)))+ ckt->CKTvoltTol) ) if( (fabs(delvbci) < ckt->CKTreltol*MAX(fabs(Vbci), fabs(*(ckt->CKTstate0 + here->VBICvbci)))+ ckt->CKTvoltTol) ) if( (fabs(delvbcx) < ckt->CKTreltol*MAX(fabs(Vbcx), fabs(*(ckt->CKTstate0 + here->VBICvbcx)))+ ckt->CKTvoltTol) ) if( (fabs(delvbep) < ckt->CKTreltol*MAX(fabs(Vbep), fabs(*(ckt->CKTstate0 + here->VBICvbep)))+ ckt->CKTvoltTol) ) if( (fabs(delvrci) < ckt->CKTreltol*MAX(fabs(Vrci), fabs(*(ckt->CKTstate0 + here->VBICvrci)))+ ckt->CKTvoltTol) ) if( (fabs(delvrbi) < ckt->CKTreltol*MAX(fabs(Vrbi), fabs(*(ckt->CKTstate0 + here->VBICvrbi)))+ ckt->CKTvoltTol) ) if( (fabs(delvrbp) < ckt->CKTreltol*MAX(fabs(Vrbp), fabs(*(ckt->CKTstate0 + here->VBICvrbp)))+ ckt->CKTvoltTol) ) if( (fabs(delvbcp) < ckt->CKTreltol*MAX(fabs(Vbcp), fabs(*(ckt->CKTstate0 + here->VBICvbcp)))+ ckt->CKTvoltTol) ) if( (fabs(ibehat-*(ckt->CKTstate0 + here->VBICibe)) < ckt->CKTreltol* MAX(fabs(ibehat), fabs(*(ckt->CKTstate0 + here->VBICibe)))+ ckt->CKTabstol) ) if( (fabs(ibexhat-*(ckt->CKTstate0 + here->VBICibex)) < ckt->CKTreltol* MAX(fabs(ibexhat), fabs(*(ckt->CKTstate0 + here->VBICibex)))+ ckt->CKTabstol) ) if( (fabs(itzfhat-*(ckt->CKTstate0 + here->VBICitzf)) < ckt->CKTreltol* MAX(fabs(itzfhat), fabs(*(ckt->CKTstate0 + here->VBICitzf)))+ ckt->CKTabstol) ) if( (fabs(itzrhat-*(ckt->CKTstate0 + here->VBICitzr)) < ckt->CKTreltol* MAX(fabs(itzrhat), fabs(*(ckt->CKTstate0 + here->VBICitzr)))+ ckt->CKTabstol) ) if( (fabs(ibchat-*(ckt->CKTstate0 + here->VBICibc)) < ckt->CKTreltol* MAX(fabs(ibchat), fabs(*(ckt->CKTstate0 + here->VBICibc)))+ ckt->CKTabstol) ) if( (fabs(ibephat-*(ckt->CKTstate0 + here->VBICibep)) < ckt->CKTreltol* MAX(fabs(ibephat), fabs(*(ckt->CKTstate0 + here->VBICibep)))+ ckt->CKTabstol) ) if( (fabs(ircihat-*(ckt->CKTstate0 + here->VBICirci)) < ckt->CKTreltol* MAX(fabs(ircihat), fabs(*(ckt->CKTstate0 + here->VBICirci)))+ ckt->CKTabstol) ) if( (fabs(irbihat-*(ckt->CKTstate0 + here->VBICirbi)) < ckt->CKTreltol* MAX(fabs(irbihat), fabs(*(ckt->CKTstate0 + here->VBICirbi)))+ ckt->CKTabstol) ) if( (fabs(irbphat-*(ckt->CKTstate0 + here->VBICirbp)) < ckt->CKTreltol* MAX(fabs(irbphat), fabs(*(ckt->CKTstate0 + here->VBICirbp)))+ ckt->CKTabstol) ) if( (fabs(ibcphat-*(ckt->CKTstate0 + here->VBICibcp)) < ckt->CKTreltol* MAX(fabs(ibcphat), fabs(*(ckt->CKTstate0 + here->VBICibcp)))+ ckt->CKTabstol) ) if( (fabs(iccphat-*(ckt->CKTstate0 + here->VBICiccp)) < ckt->CKTreltol* MAX(fabs(iccphat), fabs(*(ckt->CKTstate0 + here->VBICiccp)))+ ckt->CKTabstol) ) { /* * bypassing.... */ Vbei = *(ckt->CKTstate0 + here->VBICvbei); Vbex = *(ckt->CKTstate0 + here->VBICvbex); Vbci = *(ckt->CKTstate0 + here->VBICvbci); Vbcx = *(ckt->CKTstate0 + here->VBICvbcx); Vbep = *(ckt->CKTstate0 + here->VBICvbep); Vrci = *(ckt->CKTstate0 + here->VBICvrci); Vrbi = *(ckt->CKTstate0 + here->VBICvrbi); Vrbp = *(ckt->CKTstate0 + here->VBICvrbp); Vbcp = *(ckt->CKTstate0 + here->VBICvbcp); Ibe = *(ckt->CKTstate0 + here->VBICibe); Ibe_Vbei = *(ckt->CKTstate0 + here->VBICibe_Vbei); Ibex = *(ckt->CKTstate0 + here->VBICibex); Ibex_Vbex = *(ckt->CKTstate0 + here->VBICibex_Vbex); Itzf = *(ckt->CKTstate0 + here->VBICitzf); Itzf_Vbei = *(ckt->CKTstate0 + here->VBICitzf_Vbei); Itzf_Vbci = *(ckt->CKTstate0 + here->VBICitzf_Vbci); Itzr = *(ckt->CKTstate0 + here->VBICitzr); Itzr_Vbci = *(ckt->CKTstate0 + here->VBICitzr_Vbci); Itzr_Vbei = *(ckt->CKTstate0 + here->VBICitzr_Vbei); Ibc = *(ckt->CKTstate0 + here->VBICibc); Ibc_Vbci = *(ckt->CKTstate0 + here->VBICibc_Vbci); Ibc_Vbei = *(ckt->CKTstate0 + here->VBICibc_Vbei); Ibep = *(ckt->CKTstate0 + here->VBICibep); Ibep_Vbep = *(ckt->CKTstate0 + here->VBICibep_Vbep); Irci = *(ckt->CKTstate0 + here->VBICirci); Irci_Vrci = *(ckt->CKTstate0 + here->VBICirci_Vrci); Irci_Vbci = *(ckt->CKTstate0 + here->VBICirci_Vbci); Irci_Vbcx = *(ckt->CKTstate0 + here->VBICirci_Vbcx); Irbi = *(ckt->CKTstate0 + here->VBICirbi); Irbi_Vrbi = *(ckt->CKTstate0 + here->VBICirbi_Vrbi); Irbi_Vbei = *(ckt->CKTstate0 + here->VBICirbi_Vbei); Irbi_Vbci = *(ckt->CKTstate0 + here->VBICirbi_Vbci); Irbp = *(ckt->CKTstate0 + here->VBICirbp); Irbp_Vrbp = *(ckt->CKTstate0 + here->VBICirbp_Vrbp); Irbp_Vbep = *(ckt->CKTstate0 + here->VBICirbp_Vbep); Irbp_Vbci = *(ckt->CKTstate0 + here->VBICirbp_Vbci); Ibcp = *(ckt->CKTstate0 + here->VBICibcp); Ibcp_Vbcp = *(ckt->CKTstate0 + here->VBICibcp_Vbcp); Iccp = *(ckt->CKTstate0 + here->VBICiccp); Iccp_Vbep = *(ckt->CKTstate0 + here->VBICiccp_Vbep); Iccp_Vbci = *(ckt->CKTstate0 + here->VBICiccp_Vbci); Iccp_Vbcp = *(ckt->CKTstate0 + here->VBICiccp_Vbcp); gqbeo = *(ckt->CKTstate0 + here->VBICgqbeo); gqbco = *(ckt->CKTstate0 + here->VBICgqbco); Ircx_Vrcx = *(ckt->CKTstate0 + here->VBICircx_Vrcx); Irbx_Vrbx = *(ckt->CKTstate0 + here->VBICirbx_Vrbx); Irs_Vrs = *(ckt->CKTstate0 + here->VBICirs_Vrs); Ire_Vre = *(ckt->CKTstate0 + here->VBICire_Vre); goto load; } /* * limit nonlinear branch voltages */ ichk1 = 1; Vbei = DEVpnjlim(Vbei,*(ckt->CKTstate0 + here->VBICvbei),vt, here->VBICtVcrit,&icheck); Vbex = DEVpnjlim(Vbex,*(ckt->CKTstate0 + here->VBICvbex),vt, here->VBICtVcrit,&ichk1); Vbci = DEVpnjlim(Vbci,*(ckt->CKTstate0 + here->VBICvbci),vt, here->VBICtVcrit,&ichk2); Vbcx = DEVpnjlim(Vbcx,*(ckt->CKTstate0 + here->VBICvbcx),vt, here->VBICtVcrit,&ichk3); Vbep = DEVpnjlim(Vbep,*(ckt->CKTstate0 + here->VBICvbep),vt, here->VBICtVcrit,&ichk4); Vbcp = DEVpnjlim(Vbcp,*(ckt->CKTstate0 + here->VBICvbcp),vt, here->VBICtVcrit,&ichk5); if ((ichk1 == 1) || (ichk2 == 1) || (ichk3 == 1) || (ichk4 == 1) || (ichk5 == 1)) icheck=1; } /* * determine dc current and derivitives */ next1: iret = vbic_4T_it_cf_fj(p ,&Vbei,&Vbex,&Vbci,&Vbep,&Vbcp,&Vrcx ,&Vbcx,&Vrci,&Vrbx,&Vrbi,&Vre,&Vrbp,&Vrs ,&Vbe,&Vbc,&Ibe,&Ibe_Vbei,&Ibex,&Ibex_Vbex,&Itzf ,&Itzf_Vbei,&Itzf_Vbci,&Itzr,&Itzr_Vbci,&Itzr_Vbei,&Ibc,&Ibc_Vbci ,&Ibc_Vbei,&Ibep,&Ibep_Vbep,&Ircx,&Ircx_Vrcx,&Irci,&Irci_Vrci ,&Irci_Vbci,&Irci_Vbcx,&Irbx,&Irbx_Vrbx,&Irbi,&Irbi_Vrbi,&Irbi_Vbei ,&Irbi_Vbci,&Ire,&Ire_Vre,&Irbp,&Irbp_Vrbp,&Irbp_Vbep,&Irbp_Vbci ,&Qbe,&Qbe_Vbei,&Qbe_Vbci,&Qbex,&Qbex_Vbex,&Qbc,&Qbc_Vbci ,&Qbcx,&Qbcx_Vbcx,&Qbep,&Qbep_Vbep,&Qbep_Vbci,&Qbeo,&Qbeo_Vbe ,&Qbco,&Qbco_Vbc,&Ibcp,&Ibcp_Vbcp,&Iccp,&Iccp_Vbep,&Iccp_Vbci ,&Iccp_Vbcp,&Irs,&Irs_Vrs,&Qbcp,&Qbcp_Vbcp,&SCALE); Ibe += ckt->CKTgmin*Vbei; Ibe_Vbei += ckt->CKTgmin; Ibex += ckt->CKTgmin*Vbex; Ibex_Vbex += ckt->CKTgmin; Ibc += ckt->CKTgmin*Vbci; Ibc_Vbci += ckt->CKTgmin; Ibep += ckt->CKTgmin*Vbep; Ibep_Vbep += ckt->CKTgmin; Irci += ckt->CKTgmin*Vrci; Irci_Vrci += ckt->CKTgmin; Irci_Vbci += ckt->CKTgmin; Irci_Vbcx += ckt->CKTgmin; Ibcp += ckt->CKTgmin*Vbcp; Ibcp_Vbcp += ckt->CKTgmin; if( (ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG)) { /* * charge storage elements */ *(ckt->CKTstate0 + here->VBICqbe) = Qbe; *(ckt->CKTstate0 + here->VBICqbex) = Qbex; *(ckt->CKTstate0 + here->VBICqbc) = Qbc; *(ckt->CKTstate0 + here->VBICqbcx) = Qbcx; *(ckt->CKTstate0 + here->VBICqbep) = Qbep; *(ckt->CKTstate0 + here->VBICqbeo) = Qbeo; *(ckt->CKTstate0 + here->VBICqbco) = Qbco; *(ckt->CKTstate0 + here->VBICqbcp) = Qbcp; here->VBICcapbe = Qbe_Vbei; here->VBICcapbex = Qbex_Vbex; here->VBICcapbc = Qbc_Vbci; here->VBICcapbcx = Qbcx_Vbcx; here->VBICcapbep = Qbep_Vbep; here->VBICcapbcp = Qbcp_Vbcp; /* * store small-signal parameters */ if ( (!(ckt->CKTmode & MODETRANOP))|| (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->VBICcqbe) = Qbe_Vbei; *(ckt->CKTstate0 + here->VBICcqbeci) = Qbe_Vbci; *(ckt->CKTstate0 + here->VBICcqbex) = Qbex_Vbex; *(ckt->CKTstate0 + here->VBICcqbc) = Qbc_Vbci; *(ckt->CKTstate0 + here->VBICcqbcx) = Qbcx_Vbcx; *(ckt->CKTstate0 + here->VBICcqbep) = Qbep_Vbep; *(ckt->CKTstate0 + here->VBICcqbepci) = Qbep_Vbci; *(ckt->CKTstate0 + here->VBICcqbeo) = Qbeo_Vbe; *(ckt->CKTstate0 + here->VBICcqbco) = Qbco_Vbc; *(ckt->CKTstate0 + here->VBICcqbcp) = Qbcp_Vbcp; if(SenCond) { *(ckt->CKTstate0 + here->VBICibe) = Ibe; *(ckt->CKTstate0 + here->VBICibe_Vbei) = Ibe_Vbei; *(ckt->CKTstate0 + here->VBICibex) = Ibex; *(ckt->CKTstate0 + here->VBICibex_Vbex) = Ibex_Vbex; *(ckt->CKTstate0 + here->VBICitzf) = Itzf; *(ckt->CKTstate0 + here->VBICitzf_Vbei) = Itzf_Vbei; *(ckt->CKTstate0 + here->VBICitzf_Vbci) = Itzf_Vbci; *(ckt->CKTstate0 + here->VBICitzr) = Itzr; *(ckt->CKTstate0 + here->VBICitzr_Vbci) = Itzr_Vbci; *(ckt->CKTstate0 + here->VBICitzr_Vbei) = Itzr_Vbei; *(ckt->CKTstate0 + here->VBICibc) = Ibc; *(ckt->CKTstate0 + here->VBICibc_Vbci) = Ibc_Vbci; *(ckt->CKTstate0 + here->VBICibc_Vbei) = Ibc_Vbei; *(ckt->CKTstate0 + here->VBICibep) = Ibep; *(ckt->CKTstate0 + here->VBICibep_Vbep) = Ibep_Vbep; *(ckt->CKTstate0 + here->VBICirci) = Irci; *(ckt->CKTstate0 + here->VBICirci_Vrci) = Irci_Vrci; *(ckt->CKTstate0 + here->VBICirci_Vbci) = Irci_Vbci; *(ckt->CKTstate0 + here->VBICirci_Vbcx) = Irci_Vbcx; *(ckt->CKTstate0 + here->VBICirbi) = Irbi; *(ckt->CKTstate0 + here->VBICirbi_Vrbi) = Irbi_Vrbi; *(ckt->CKTstate0 + here->VBICirbi_Vbei) = Irbi_Vbei; *(ckt->CKTstate0 + here->VBICirbi_Vbci) = Irbi_Vbci; *(ckt->CKTstate0 + here->VBICirbp) = Irbp; *(ckt->CKTstate0 + here->VBICirbp_Vrbp) = Irbp_Vrbp; *(ckt->CKTstate0 + here->VBICirbp_Vbep) = Irbp_Vbep; *(ckt->CKTstate0 + here->VBICirbp_Vbci) = Irbp_Vbci; *(ckt->CKTstate0 + here->VBICibcp) = Ibcp; *(ckt->CKTstate0 + here->VBICibcp_Vbcp) = Ibcp_Vbcp; *(ckt->CKTstate0 + here->VBICiccp) = Iccp; *(ckt->CKTstate0 + here->VBICiccp_Vbep) = Iccp_Vbep; *(ckt->CKTstate0 + here->VBICiccp_Vbci) = Iccp_Vbci; *(ckt->CKTstate0 + here->VBICiccp_Vbcp) = Iccp_Vbcp; *(ckt->CKTstate0 + here->VBICgqbeo) = gqbeo; *(ckt->CKTstate0 + here->VBICgqbco) = gqbco; *(ckt->CKTstate0 + here->VBICircx_Vrcx) = Ircx_Vrcx; *(ckt->CKTstate0 + here->VBICirbx_Vrbx) = Irbx_Vrbx; *(ckt->CKTstate0 + here->VBICirs_Vrs) = Irs_Vrs; *(ckt->CKTstate0 + here->VBICire_Vre) = Ire_Vre; } #ifdef SENSDEBUG printf("storing small signal parameters for op\n"); printf("Cbe = %.7e, Cbex = %.7e\n", Qbe_Vbei, Qbex_Vbex); printf("Cbc = %.7e, Cbcx = %.7e\n", Qbc_Vbci, Qbcx_Vbcx); printf("gpi = %.7e\n", Ibe_Vbei); printf("gmu = %.7e, gm = %.7e\n", Ibc_Vbci, Itzf_Vbei); printf("go = %.7e, gx = %.7e\n", Itzf_Vbci, Irbi_Vrbi); printf("cc = %.7e, cb = %.7e\n", Ibe+Itzf, Ibe); #endif /* SENSDEBUG */ continue; /* go to 1000 */ } /* * transient analysis */ if(SenCond && ckt->CKTsenInfo->SENmode == TRANSEN) { *(ckt->CKTstate0 + here->VBICibe) = Ibe; *(ckt->CKTstate0 + here->VBICibex) = Ibex; *(ckt->CKTstate0 + here->VBICitzf) = Itzf; *(ckt->CKTstate0 + here->VBICitzr) = Itzr; *(ckt->CKTstate0 + here->VBICibc) = Ibc; *(ckt->CKTstate0 + here->VBICibep) = Ibep; *(ckt->CKTstate0 + here->VBICirci) = Irci; *(ckt->CKTstate0 + here->VBICirbi) = Irbi; *(ckt->CKTstate0 + here->VBICirbp) = Irbp; *(ckt->CKTstate0 + here->VBICibcp) = Ibcp; *(ckt->CKTstate0 + here->VBICiccp) = Iccp; continue; } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->VBICqbe) = *(ckt->CKTstate0 + here->VBICqbe) ; *(ckt->CKTstate1 + here->VBICqbex) = *(ckt->CKTstate0 + here->VBICqbex) ; *(ckt->CKTstate1 + here->VBICqbc) = *(ckt->CKTstate0 + here->VBICqbc) ; *(ckt->CKTstate1 + here->VBICqbcx) = *(ckt->CKTstate0 + here->VBICqbcx) ; *(ckt->CKTstate1 + here->VBICqbep) = *(ckt->CKTstate0 + here->VBICqbep) ; *(ckt->CKTstate1 + here->VBICqbeo) = *(ckt->CKTstate0 + here->VBICqbeo) ; *(ckt->CKTstate1 + here->VBICqbco) = *(ckt->CKTstate0 + here->VBICqbco) ; *(ckt->CKTstate1 + here->VBICqbcp) = *(ckt->CKTstate0 + here->VBICqbcp) ; } error = NIintegrate(ckt,&geq,&ceq,Qbe_Vbei,here->VBICqbe); if(error) return(error); Ibe_Vbei = Ibe_Vbei + geq; Ibe = Ibe + *(ckt->CKTstate0 + here->VBICcqbe); error = NIintegrate(ckt,&geq,&ceq,Qbex_Vbex,here->VBICqbex); if(error) return(error); Ibex_Vbex = Ibex_Vbex + geq; Ibex = Ibex + *(ckt->CKTstate0 + here->VBICcqbex); error = NIintegrate(ckt,&geq,&ceq,Qbc_Vbci,here->VBICqbc); if(error) return(error); Ibc_Vbci = Ibc_Vbci + geq; Ibc = Ibc + *(ckt->CKTstate0 + here->VBICcqbc); error = NIintegrate(ckt,&geq,&ceq,Qbcx_Vbcx,here->VBICqbcx); if(error) return(error); gbcx = geq; cbcx = *(ckt->CKTstate0 + here->VBICcqbcx); error = NIintegrate(ckt,&geq,&ceq,Qbep_Vbep,here->VBICqbep); if(error) return(error); Ibep_Vbep = Ibep_Vbep + geq; Ibep = Ibep + *(ckt->CKTstate0 + here->VBICcqbep); error = NIintegrate(ckt,&geq,&ceq,Qbcp_Vbcp,here->VBICqbcp); if(error) return(error); Ibcp_Vbcp = Ibcp_Vbcp + geq; Ibcp = Ibcp + *(ckt->CKTstate0 + here->VBICcqbcp); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->VBICcqbe) = *(ckt->CKTstate0 + here->VBICcqbe); *(ckt->CKTstate1 + here->VBICcqbex) = *(ckt->CKTstate0 + here->VBICcqbex); *(ckt->CKTstate1 + here->VBICcqbc) = *(ckt->CKTstate0 + here->VBICcqbc); *(ckt->CKTstate1 + here->VBICcqbcx) = *(ckt->CKTstate0 + here->VBICcqbcx); *(ckt->CKTstate1 + here->VBICcqbep) = *(ckt->CKTstate0 + here->VBICcqbep); *(ckt->CKTstate1 + here->VBICcqbcp) = *(ckt->CKTstate0 + here->VBICcqbcp); } } } if(SenCond) goto next2; /* * check convergence */ if ( (!(ckt->CKTmode & MODEINITFIX))||(!(here->VBICoff))) { if (icheck == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* * charge storage for outer b-e and b-c junctions */ if(ckt->CKTmode & (MODETRAN | MODEAC)) { error = NIintegrate(ckt,&gqbeo,&cqbeo,Qbeo_Vbe,here->VBICqbeo); if(error) return(error); error = NIintegrate(ckt,&gqbco,&cqbco,Qbco_Vbc,here->VBICqbco); if(error) return(error); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->VBICcqbeo) = *(ckt->CKTstate0 + here->VBICcqbeo); *(ckt->CKTstate1 + here->VBICcqbco) = *(ckt->CKTstate0 + here->VBICcqbco); } } next2: *(ckt->CKTstate0 + here->VBICvbei) = Vbei; *(ckt->CKTstate0 + here->VBICvbex) = Vbex; *(ckt->CKTstate0 + here->VBICvbci) = Vbci; *(ckt->CKTstate0 + here->VBICvbcx) = Vbcx; *(ckt->CKTstate0 + here->VBICvbep) = Vbep; *(ckt->CKTstate0 + here->VBICvrci) = Vrci; *(ckt->CKTstate0 + here->VBICvrbi) = Vrbi; *(ckt->CKTstate0 + here->VBICvrbp) = Vrbp; *(ckt->CKTstate0 + here->VBICvbcp) = Vbcp; *(ckt->CKTstate0 + here->VBICibe) = Ibe; *(ckt->CKTstate0 + here->VBICibe_Vbei) = Ibe_Vbei; *(ckt->CKTstate0 + here->VBICibex) = Ibex; *(ckt->CKTstate0 + here->VBICibex_Vbex) = Ibex_Vbex; *(ckt->CKTstate0 + here->VBICitzf) = Itzf; *(ckt->CKTstate0 + here->VBICitzf_Vbei) = Itzf_Vbei; *(ckt->CKTstate0 + here->VBICitzf_Vbci) = Itzf_Vbci; *(ckt->CKTstate0 + here->VBICitzr) = Itzr; *(ckt->CKTstate0 + here->VBICitzr_Vbci) = Itzr_Vbci; *(ckt->CKTstate0 + here->VBICitzr_Vbei) = Itzr_Vbei; *(ckt->CKTstate0 + here->VBICibc) = Ibc; *(ckt->CKTstate0 + here->VBICibc_Vbci) = Ibc_Vbci; *(ckt->CKTstate0 + here->VBICibc_Vbei) = Ibc_Vbei; *(ckt->CKTstate0 + here->VBICibep) = Ibep; *(ckt->CKTstate0 + here->VBICibep_Vbep) = Ibep_Vbep; *(ckt->CKTstate0 + here->VBICirci) = Irci; *(ckt->CKTstate0 + here->VBICirci_Vrci) = Irci_Vrci; *(ckt->CKTstate0 + here->VBICirci_Vbci) = Irci_Vbci; *(ckt->CKTstate0 + here->VBICirci_Vbcx) = Irci_Vbcx; *(ckt->CKTstate0 + here->VBICirbi) = Irbi; *(ckt->CKTstate0 + here->VBICirbi_Vrbi) = Irbi_Vrbi; *(ckt->CKTstate0 + here->VBICirbi_Vbei) = Irbi_Vbei; *(ckt->CKTstate0 + here->VBICirbi_Vbci) = Irbi_Vbci; *(ckt->CKTstate0 + here->VBICirbp) = Irbp; *(ckt->CKTstate0 + here->VBICirbp_Vrbp) = Irbp_Vrbp; *(ckt->CKTstate0 + here->VBICirbp_Vbep) = Irbp_Vbep; *(ckt->CKTstate0 + here->VBICirbp_Vbci) = Irbp_Vbci; *(ckt->CKTstate0 + here->VBICibcp) = Ibcp; *(ckt->CKTstate0 + here->VBICibcp_Vbcp) = Ibcp_Vbcp; *(ckt->CKTstate0 + here->VBICiccp) = Iccp; *(ckt->CKTstate0 + here->VBICiccp_Vbep) = Iccp_Vbep; *(ckt->CKTstate0 + here->VBICiccp_Vbci) = Iccp_Vbci; *(ckt->CKTstate0 + here->VBICiccp_Vbcp) = Iccp_Vbcp; *(ckt->CKTstate0 + here->VBICgqbeo) = gqbeo; *(ckt->CKTstate0 + here->VBICgqbco) = gqbco; *(ckt->CKTstate0 + here->VBICircx_Vrcx) = Ircx_Vrcx; *(ckt->CKTstate0 + here->VBICirbx_Vrbx) = Irbx_Vrbx; *(ckt->CKTstate0 + here->VBICirs_Vrs) = Irs_Vrs; *(ckt->CKTstate0 + here->VBICire_Vre) = Ire_Vre; /* Do not load the Jacobian and the rhs if perturbation is being carried out */ if(SenCond) continue; load: /* * load current excitation vector and matrix */ rhs_current = model->VBICtype * (*(ckt->CKTstate0 + here->VBICcqbeo) - Vbe * gqbeo); *(ckt->CKTrhs + here->VBICbaseNode) += -rhs_current; *(ckt->CKTrhs + here->VBICemitNode) += rhs_current; *(here->VBICbaseBasePtr) += gqbeo; *(here->VBICemitEmitPtr) += gqbeo; *(here->VBICbaseEmitPtr) += -gqbeo; *(here->VBICemitBasePtr) += -gqbeo; rhs_current = model->VBICtype * (*(ckt->CKTstate0 + here->VBICcqbco) - Vbc * gqbco); *(ckt->CKTrhs + here->VBICbaseNode) += -rhs_current; *(ckt->CKTrhs + here->VBICcollNode) += rhs_current; *(here->VBICbaseBasePtr) += gqbco; *(here->VBICcollCollPtr) += gqbco; *(here->VBICbaseCollPtr) += -gqbco; *(here->VBICcollBasePtr) += -gqbco; *(ckt->CKTrhs + here->VBICbaseBINode) += -cbcx; *(ckt->CKTrhs + here->VBICcollCXNode) += cbcx; *(here->VBICbaseBIBaseBIPtr) += gbcx; *(here->VBICcollCXCollCXPtr) += gbcx; *(here->VBICbaseBICollCXPtr) += -gbcx; *(here->VBICcollCXBaseBIPtr) += -gbcx; /* c KCL at internal nodes c c Stamp element: Ibe */ rhs_current = model->VBICtype * (Ibe - Ibe_Vbei*Vbei); *(ckt->CKTrhs + here->VBICbaseBINode) += -rhs_current; *(here->VBICbaseBIBaseBIPtr) += Ibe_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibe_Vbei; *(ckt->CKTrhs + here->VBICemitEINode) += rhs_current; *(here->VBICemitEIBaseBIPtr) += -Ibe_Vbei; *(here->VBICemitEIEmitEIPtr) += Ibe_Vbei; /* c Stamp element: Ibex */ rhs_current = model->VBICtype * (Ibex - Ibex_Vbex*Vbex); *(ckt->CKTrhs + here->VBICbaseBXNode) += -rhs_current; *(here->VBICbaseBXBaseBXPtr) += Ibex_Vbex; *(here->VBICbaseBXEmitEIPtr) += -Ibex_Vbex; *(ckt->CKTrhs + here->VBICemitEINode) += rhs_current; *(here->VBICemitEIBaseBXPtr) += -Ibex_Vbex; *(here->VBICemitEIEmitEIPtr) += Ibex_Vbex; /* c Stamp element: Itzf */ rhs_current = model->VBICtype * (Itzf - Itzf_Vbei*Vbei - Itzf_Vbci*Vbci); *(ckt->CKTrhs + here->VBICcollCINode) += -rhs_current; *(here->VBICcollCIBaseBIPtr) += Itzf_Vbei; *(here->VBICcollCIEmitEIPtr) += -Itzf_Vbei; *(here->VBICcollCIBaseBIPtr) += Itzf_Vbci; *(here->VBICcollCICollCIPtr) += -Itzf_Vbci; *(ckt->CKTrhs + here->VBICemitEINode) += rhs_current; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbei; *(here->VBICemitEIEmitEIPtr) += Itzf_Vbei; *(here->VBICemitEIBaseBIPtr) += -Itzf_Vbci; *(here->VBICemitEICollCIPtr) += Itzf_Vbci; /* c Stamp element: Itzr */ rhs_current = model->VBICtype * (Itzr - Itzr_Vbei*Vbei - Itzr_Vbci*Vbci); *(ckt->CKTrhs + here->VBICemitEINode) += -rhs_current; *(here->VBICemitEIBaseBIPtr) += Itzr_Vbei; *(here->VBICemitEIEmitEIPtr) += -Itzr_Vbei; *(here->VBICemitEIBaseBIPtr) += Itzr_Vbci; *(here->VBICemitEICollCIPtr) += -Itzr_Vbci; *(ckt->CKTrhs + here->VBICcollCINode) += rhs_current; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbei; *(here->VBICcollCIEmitEIPtr) += Itzr_Vbei; *(here->VBICcollCIBaseBIPtr) += -Itzr_Vbci; *(here->VBICcollCICollCIPtr) += Itzr_Vbci; /* c Stamp element: Ibc */ rhs_current = model->VBICtype * (Ibc - Ibc_Vbci*Vbci - Ibc_Vbei*Vbei); *(ckt->CKTrhs + here->VBICbaseBINode) += -rhs_current; *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbci; *(here->VBICbaseBICollCIPtr) += -Ibc_Vbci; *(here->VBICbaseBIBaseBIPtr) += Ibc_Vbei; *(here->VBICbaseBIEmitEIPtr) += -Ibc_Vbei; *(ckt->CKTrhs + here->VBICcollCINode) += rhs_current; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbci; *(here->VBICcollCICollCIPtr) += Ibc_Vbci; *(here->VBICcollCIBaseBIPtr) += -Ibc_Vbei; *(here->VBICcollCIEmitEIPtr) += Ibc_Vbei; /* c Stamp element: Ibep */ rhs_current = model->VBICtype * (Ibep - Ibep_Vbep*Vbep); *(ckt->CKTrhs + here->VBICbaseBXNode) += -rhs_current; *(here->VBICbaseBXBaseBXPtr) += Ibep_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Ibep_Vbep; *(ckt->CKTrhs + here->VBICbaseBPNode) += rhs_current; *(here->VBICbaseBPBaseBXPtr) += -Ibep_Vbep; *(here->VBICbaseBPBaseBPPtr) += Ibep_Vbep; /* c Stamp element: Rcx */ *(here->VBICcollCollPtr) += Ircx_Vrcx; *(here->VBICcollCXCollCXPtr) += Ircx_Vrcx; *(here->VBICcollCXCollPtr) += -Ircx_Vrcx; *(here->VBICcollCollCXPtr) += -Ircx_Vrcx; /* c Stamp element: Irci */ rhs_current = model->VBICtype * (Irci - Irci_Vrci*Vrci - Irci_Vbci*Vbci - Irci_Vbcx*Vbcx); *(ckt->CKTrhs + here->VBICcollCXNode) += -rhs_current; *(here->VBICcollCXCollCXPtr) += Irci_Vrci; *(here->VBICcollCXCollCIPtr) += -Irci_Vrci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbci; *(here->VBICcollCXCollCIPtr) += -Irci_Vbci; *(here->VBICcollCXBaseBIPtr) += Irci_Vbcx; *(here->VBICcollCXCollCXPtr) += -Irci_Vbcx; *(ckt->CKTrhs + here->VBICcollCINode) += rhs_current; *(here->VBICcollCICollCXPtr) += -Irci_Vrci; *(here->VBICcollCICollCIPtr) += Irci_Vrci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbci; *(here->VBICcollCICollCIPtr) += Irci_Vbci; *(here->VBICcollCIBaseBIPtr) += -Irci_Vbcx; *(here->VBICcollCICollCXPtr) += Irci_Vbcx; /* c Stamp element: Rbx */ *(here->VBICbaseBasePtr) += Irbx_Vrbx; *(here->VBICbaseBXBaseBXPtr) += Irbx_Vrbx; *(here->VBICbaseBXBasePtr) += -Irbx_Vrbx; *(here->VBICbaseBaseBXPtr) += -Irbx_Vrbx; /* c Stamp element: Irbi */ rhs_current = model->VBICtype * (Irbi - Irbi_Vrbi*Vrbi - Irbi_Vbei*Vbei - Irbi_Vbci*Vbci); *(ckt->CKTrhs + here->VBICbaseBXNode) += -rhs_current; *(here->VBICbaseBXBaseBXPtr) += Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += -Irbi_Vrbi; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbei; *(here->VBICbaseBXEmitEIPtr) += -Irbi_Vbei; *(here->VBICbaseBXBaseBIPtr) += Irbi_Vbci; *(here->VBICbaseBXCollCIPtr) += -Irbi_Vbci; *(ckt->CKTrhs + here->VBICbaseBINode) += rhs_current; *(here->VBICbaseBIBaseBXPtr) += -Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += Irbi_Vrbi; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbei; *(here->VBICbaseBIEmitEIPtr) += Irbi_Vbei; *(here->VBICbaseBIBaseBIPtr) += -Irbi_Vbci; *(here->VBICbaseBICollCIPtr) += Irbi_Vbci; /* c Stamp element: Re */ *(here->VBICemitEmitPtr) += Ire_Vre; *(here->VBICemitEIEmitEIPtr) += Ire_Vre; *(here->VBICemitEIEmitPtr) += -Ire_Vre; *(here->VBICemitEmitEIPtr) += -Ire_Vre; /* c Stamp element: Irbp */ rhs_current = model->VBICtype * (Irbp - Irbp_Vrbp*Vrbp - Irbp_Vbep*Vbep - Irbp_Vbci*Vbci); *(ckt->CKTrhs + here->VBICbaseBPNode) += -rhs_current; *(here->VBICbaseBPBaseBPPtr) += Irbp_Vrbp; *(here->VBICbaseBPCollCXPtr) += -Irbp_Vrbp; *(here->VBICbaseBPBaseBXPtr) += Irbp_Vbep; *(here->VBICbaseBPBaseBPPtr) += -Irbp_Vbep; *(here->VBICbaseBPBaseBIPtr) += Irbp_Vbci; *(here->VBICbaseBPCollCIPtr) += -Irbp_Vbci; *(ckt->CKTrhs + here->VBICcollCXNode) += rhs_current; *(here->VBICcollCXBaseBPPtr) += -Irbp_Vrbp; *(here->VBICcollCXCollCXPtr) += Irbp_Vrbp; *(here->VBICcollCXBaseBXPtr) += -Irbp_Vbep; *(here->VBICcollCXBaseBPPtr) += Irbp_Vbep; *(here->VBICcollCXBaseBIPtr) += -Irbp_Vbci; *(here->VBICcollCXCollCIPtr) += Irbp_Vbci; /* c Stamp element: Ibcp */ rhs_current = model->VBICtype * (Ibcp - Ibcp_Vbcp*Vbcp); *(ckt->CKTrhs + here->VBICsubsSINode) += -rhs_current; *(here->VBICsubsSISubsSIPtr) += Ibcp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += -Ibcp_Vbcp; *(ckt->CKTrhs + here->VBICbaseBPNode) += rhs_current; *(here->VBICbaseBPSubsSIPtr) += -Ibcp_Vbcp; *(here->VBICbaseBPBaseBPPtr) += Ibcp_Vbcp; /* c Stamp element: Iccp */ rhs_current = model->VBICtype * (Iccp - Iccp_Vbep*Vbep - Iccp_Vbci*Vbci - Iccp_Vbcp*Vbcp); *(ckt->CKTrhs + here->VBICbaseBXNode) += -rhs_current; *(here->VBICbaseBXBaseBXPtr) += Iccp_Vbep; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbep; *(here->VBICbaseBXBaseBIPtr) += Iccp_Vbci; *(here->VBICbaseBXCollCIPtr) += -Iccp_Vbci; *(here->VBICbaseBXSubsSIPtr) += Iccp_Vbcp; *(here->VBICbaseBXBaseBPPtr) += -Iccp_Vbcp; *(ckt->CKTrhs + here->VBICsubsSINode) += rhs_current; *(here->VBICsubsSIBaseBXPtr) += -Iccp_Vbep; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbep; *(here->VBICsubsSIBaseBIPtr) += -Iccp_Vbci; *(here->VBICsubsSICollCIPtr) += Iccp_Vbci; *(here->VBICsubsSISubsSIPtr) += -Iccp_Vbcp; *(here->VBICsubsSIBaseBPPtr) += Iccp_Vbcp; /* c Stamp element: Rs */ *(here->VBICsubsSubsPtr) += Irs_Vrs; *(here->VBICsubsSISubsSIPtr) += Irs_Vrs; *(here->VBICsubsSISubsPtr) += -Irs_Vrs; *(here->VBICsubsSubsSIPtr) += -Irs_Vrs; } } return(OK); } int vbic_4T_it_cf_fj( double *p , double *Vbei, double *Vbex, double *Vbci, double *Vbep, double *Vbcp, double *Vrcx , double *Vbcx, double *Vrci, double *Vrbx, double *Vrbi, double *Vre, double *Vrbp, double *Vrs , double *Vbe, double *Vbc, double *Ibe, double *Ibe_Vbei, double *Ibex, double *Ibex_Vbex, double *Itzf , double *Itzf_Vbei, double *Itzf_Vbci, double *Itzr, double *Itzr_Vbci, double *Itzr_Vbei, double *Ibc, double *Ibc_Vbci , double *Ibc_Vbei, double *Ibep, double *Ibep_Vbep, double *Ircx, double *Ircx_Vrcx, double *Irci, double *Irci_Vrci , double *Irci_Vbci, double *Irci_Vbcx, double *Irbx, double *Irbx_Vrbx, double *Irbi, double *Irbi_Vrbi, double *Irbi_Vbei , double *Irbi_Vbci, double *Ire, double *Ire_Vre, double *Irbp, double *Irbp_Vrbp, double *Irbp_Vbep, double *Irbp_Vbci , double *Qbe, double *Qbe_Vbei, double *Qbe_Vbci, double *Qbex, double *Qbex_Vbex, double *Qbc, double *Qbc_Vbci , double *Qbcx, double *Qbcx_Vbcx, double *Qbep, double *Qbep_Vbep, double *Qbep_Vbci, double *Qbeo, double *Qbeo_Vbe , double *Qbco, double *Qbco_Vbc, double *Ibcp, double *Ibcp_Vbcp, double *Iccp, double *Iccp_Vbep, double *Iccp_Vbci , double *Iccp_Vbcp, double *Irs, double *Irs_Vrs, double *Qbcp, double *Qbcp_Vbcp, double *SCALE) { double Vtv,IVEF,IVER,IIKF,IIKR,IIKP,IVO; double IHRCF,IVTF,IITF,slTF,dv0,dvh,dvh_Vbei; double xvar1,xvar2,pwq,qlo,qlo_Vbei,qhi,qhi_dvh; double qhi_Vbei,xvar1_Vbei,xvar3,xvar3_xvar1,xvar3_Vbei,qlo_xvar3,qdbe; double qdbe_qlo,qdbe_Vbei,qdbe_qhi,mv0,vl0,q0,dv; double dv_Vbei,mv,mv_dv,mv_Vbei,vl,vl_dv,vl_Vbei; double vl_mv,xvar1_vl,qdbe_vl,dvh_Vbex,qlo_Vbex,qhi_Vbex,xvar1_Vbex; double xvar3_Vbex,qdbex,qdbex_qlo,qdbex_Vbex,qdbex_qhi,dv_Vbex,mv_Vbex; double vl_Vbex,qdbex_vl,dvh_Vbci,qlo_Vbci,qhi_Vbci,xvar1_Vbci,xvar3_Vbci; double qdbc,qdbc_qlo,qdbc_Vbci,qdbc_qhi,vn0,vnl0,qlo0; double vn,vn_Vbci,vnl,vnl_vn,vnl_Vbci,vl_vnl,vl_Vbci; double sel,sel_vnl,sel_Vbci,crt,cmx,cl,cl_sel; double cl_Vbci,ql,ql_Vbci,ql_vl,ql_cl,qdbc_ql,dv_Vbci; double mv_Vbci,qdbc_vl,dvh_Vbep,qlo_Vbep,qhi_Vbep,xvar1_Vbep,xvar3_Vbep; double qdbep,qdbep_qlo,qdbep_Vbep,qdbep_qhi,vn_Vbep,vnl_Vbep,vl_Vbep; double sel_Vbep,cl_Vbep,ql_Vbep,qdbep_ql,dv_Vbep,mv_Vbep,qdbep_vl; double dvh_Vbcp,qlo_Vbcp,qhi_Vbcp,xvar1_Vbcp,xvar3_Vbcp,qdbcp,qdbcp_qlo; double qdbcp_Vbcp,qdbcp_Vbep,qdbcp_qhi,dv_Vbcp,mv_Vbcp,vl_Vbcp,qdbcp_vl; double argi,argi_Vbei,expi,expi_argi,expi_Vbei,Ifi,Ifi_expi; double Ifi_Vbei,argi_Vbci,expi_Vbci,Iri,Iri_expi,Iri_Vbci,q1z; double q1z_qdbe,q1z_Vbei,q1z_qdbc,q1z_Vbci,q1,q1_q1z,q1_Vbei; double q1_Vbci,q2,q2_Ifi,q2_Vbei,q2_Iri,q2_Vbci,xvar3_q1; double xvar1_xvar3,xvar1_q2,xvar4,xvar4_xvar1,xvar4_Vbei,xvar4_Vbci,qb; double qb_q1,qb_Vbei,qb_Vbci,qb_xvar4,xvar2_xvar1,xvar2_Vbei,xvar2_Vbci; double qb_xvar2,Itzr_Iri,Itzr_qb,Itzf_Ifi,Itzf_qb,argi_Vbep,expi_Vbep; double argx,argx_Vbci,expx,expx_argx,expx_Vbci,Ifp,Ifp_expi; double Ifp_Vbep,Ifp_expx,Ifp_Vbci,q2p,q2p_Ifp,q2p_Vbep,q2p_Vbci; double qbp,qbp_q2p,qbp_Vbep,qbp_Vbci,argi_Vbcp,expi_Vbcp,Irp; double Irp_expi,Irp_Vbcp,Iccp_Ifp,Iccp_Irp,Iccp_qbp,argn,argn_Vbei; double expn,expn_argn,expn_Vbei,argx_Vbei,expx_Vbei,Ibe_expi,Ibe_expn; double Ibe_expx,argi_Vbex,expi_Vbex,argn_Vbex,expn_Vbex,argx_Vbex,expx_Vbex; double Ibex_expi,Ibex_expn,Ibex_expx,argn_Vbci,expn_Vbci,Ibcj,Ibcj_expi; double Ibcj_Vbci,Ibcj_expn,argn_Vbep,expn_Vbep,Ibep_expi,Ibep_expn,xvar3_vl; double avalf,avalf_vl,avalf_Vbci,avalf_xvar4,Igc,Igc_Itzf,Igc_Vbei; double Igc_Vbci,Igc_Itzr,Igc_Ibcj,Igc_avalf,Ibc_Ibcj,Ibc_Igc,argx_Vbcx; double expx_Vbcx,Kbci,Kbci_expi,Kbci_Vbci,Kbcx,Kbcx_expx,Kbcx_Vbcx; double rKp1,rKp1_Kbci,rKp1_Vbci,rKp1_Kbcx,rKp1_Vbcx,xvar1_rKp1,xvar1_Vbcx; double Iohm,Iohm_Vrci,Iohm_Kbci,Iohm_Vbci,Iohm_Kbcx,Iohm_Vbcx,Iohm_xvar1; double derf,derf_Iohm,derf_Vrci,derf_Vbci,derf_Vbcx,Irci_Iohm,Irci_derf; double Irbi_qb,Irbp_qbp,argn_Vbcp,expn_Vbcp,Ibcp_expi,Ibcp_expn,sgIf; double rIf,rIf_Ifi,rIf_Vbei,mIf,mIf_rIf,mIf_Vbei,tff; double tff_q1,tff_Vbei,tff_Vbci,tff_xvar2,tff_mIf,Qbe_qdbe,Qbe_tff; double Qbe_Ifi,Qbe_qb,Qbex_qdbex,Qbc_qdbc,Qbc_Iri,Qbc_Kbci,Qbcx_Kbcx; double Qbep_qdbep,Qbep_Ifp,Qbcp_qdbcp; /* Function and derivative code */ Vtv=1.380662e-23*(2.731500e+02+p[0])/1.602189e-19; if(p[51]>0.0){ IVEF=1.0/p[51]; }else{ IVEF=0.0; } if(p[52]>0.0){ IVER=1.0/p[52]; }else{ IVER=0.0; } if(p[53]>0.0){ IIKF=1.0/p[53]; }else{ IIKF=0.0; } if(p[54]>0.0){ IIKR=1.0/p[54]; }else{ IIKR=0.0; } if(p[55]>0.0){ IIKP=1.0/p[55]; }else{ IIKP=0.0; } if(p[3]>0.0){ IVO=1.0/p[3]; }else{ IVO=0.0; } if(p[5]>0.0){ IHRCF=1.0/p[5]; }else{ IHRCF=0.0; } if(p[59]>0.0){ IVTF=1.0/p[59]; }else{ IVTF=0.0; } if(p[60]>0.0){ IITF=1.0/p[60]; }else{ IITF=0.0; } if(p[60]>0.0){ slTF=0.0; }else{ slTF=1.0; } dv0=-p[17]*p[14]; if(p[19]<=0.0){ dvh=(*Vbei)+dv0; dvh_Vbei=1.0; if(dvh>0.0){ xvar1=(1.0-p[14]); xvar2=(-1.0-p[18]); pwq=pow(xvar1,xvar2); qlo=p[17]*(1.0-pwq*(1.0-p[14])*(1.0-p[14]))/(1.0-p[18]); qlo_Vbei=0.0; qhi=dvh*(1.0-p[14]+0.5*p[18]*dvh/p[17])*pwq; qhi_dvh=(0.5*dvh*p[18]/p[17]-p[14]+1.0)*pwq+0.5*dvh*p[18]*pwq/p[17]; qhi_Vbei=qhi_dvh*dvh_Vbei; }else{ xvar1=(1.0-(*Vbei)/p[17]); xvar1_Vbei=-1.0/p[17]; xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbei=xvar3_xvar1*xvar1_Vbei; qlo=p[17]*(1.0-xvar3)/(1.0-p[18]); qlo_xvar3=-p[17]/(1.0-p[18]); qlo_Vbei=qlo_xvar3*xvar3_Vbei; qhi=0.0; qhi_Vbei=0.0; } qdbe=qlo+qhi; qdbe_qlo=1.0; qdbe_qhi=1.0; qdbe_Vbei=qdbe_qlo*qlo_Vbei; qdbe_Vbei=qdbe_Vbei+qdbe_qhi*qhi_Vbei; }else{ mv0=sqrt(dv0*dv0+4.0*p[19]*p[19]); vl0=-0.5*(dv0+mv0); xvar1=(1.0-vl0/p[17]); xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); q0=-p[17]*xvar3/(1.0-p[18]); dv=(*Vbei)+dv0; dv_Vbei=1.0; mv=sqrt(dv*dv+4.0*p[19]*p[19]); mv_dv=dv/sqrt((dv*dv)+4.0*(p[19]*p[19])); mv_Vbei=mv_dv*dv_Vbei; vl=0.5*(dv-mv)-dv0; vl_dv=0.5; vl_mv=-0.5; vl_Vbei=vl_dv*dv_Vbei; vl_Vbei=vl_Vbei+vl_mv*mv_Vbei; xvar1=(1.0-vl/p[17]); xvar1_vl=-1.0/p[17]; xvar1_Vbei=xvar1_vl*vl_Vbei; xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbei=xvar3_xvar1*xvar1_Vbei; qlo=-p[17]*xvar3/(1.0-p[18]); qlo_xvar3=-p[17]/(1.0-p[18]); qlo_Vbei=qlo_xvar3*xvar3_Vbei; xvar1=(1.0-p[14]); xvar2=(-p[18]); xvar3=pow(xvar1,xvar2); qdbe=qlo+xvar3*((*Vbei)-vl+vl0)-q0; qdbe_qlo=1.0; qdbe_Vbei=xvar3; qdbe_vl=-xvar3; qdbe_Vbei=qdbe_Vbei+qdbe_qlo*qlo_Vbei; qdbe_Vbei=qdbe_Vbei+qdbe_vl*vl_Vbei; } dv0=-p[17]*p[14]; if(p[19]<=0.0){ dvh=(*Vbex)+dv0; dvh_Vbex=1.0; if(dvh>0.0){ xvar1=(1.0-p[14]); xvar2=(-1.0-p[18]); pwq=pow(xvar1,xvar2); qlo=p[17]*(1.0-pwq*(1.0-p[14])*(1.0-p[14]))/(1.0-p[18]); qlo_Vbex=0.0; qhi=dvh*(1.0-p[14]+0.5*p[18]*dvh/p[17])*pwq; qhi_dvh=(0.5*dvh*p[18]/p[17]-p[14]+1.0)*pwq+0.5*dvh*p[18]*pwq/p[17]; qhi_Vbex=qhi_dvh*dvh_Vbex; }else{ xvar1=(1.0-(*Vbex)/p[17]); xvar1_Vbex=-1.0/p[17]; xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbex=xvar3_xvar1*xvar1_Vbex; qlo=p[17]*(1.0-xvar3)/(1.0-p[18]); qlo_xvar3=-p[17]/(1.0-p[18]); qlo_Vbex=qlo_xvar3*xvar3_Vbex; qhi=0.0; qhi_Vbex=0.0; } qdbex=qlo+qhi; qdbex_qlo=1.0; qdbex_qhi=1.0; qdbex_Vbex=qdbex_qlo*qlo_Vbex; qdbex_Vbex=qdbex_Vbex+qdbex_qhi*qhi_Vbex; }else{ mv0=sqrt(dv0*dv0+4.0*p[19]*p[19]); vl0=-0.5*(dv0+mv0); xvar1=(1.0-vl0/p[17]); xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); q0=-p[17]*xvar3/(1.0-p[18]); dv=(*Vbex)+dv0; dv_Vbex=1.0; mv=sqrt(dv*dv+4.0*p[19]*p[19]); mv_dv=dv/sqrt((dv*dv)+4.0*(p[19]*p[19])); mv_Vbex=mv_dv*dv_Vbex; vl=0.5*(dv-mv)-dv0; vl_dv=0.5; vl_mv=-0.5; vl_Vbex=vl_dv*dv_Vbex; vl_Vbex=vl_Vbex+vl_mv*mv_Vbex; xvar1=(1.0-vl/p[17]); xvar1_vl=-1.0/p[17]; xvar1_Vbex=xvar1_vl*vl_Vbex; xvar2=(1.0-p[18]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbex=xvar3_xvar1*xvar1_Vbex; qlo=-p[17]*xvar3/(1.0-p[18]); qlo_xvar3=-p[17]/(1.0-p[18]); qlo_Vbex=qlo_xvar3*xvar3_Vbex; xvar1=(1.0-p[14]); xvar2=(-p[18]); xvar3=pow(xvar1,xvar2); qdbex=qlo+xvar3*((*Vbex)-vl+vl0)-q0; qdbex_qlo=1.0; qdbex_Vbex=xvar3; qdbex_vl=-xvar3; qdbex_Vbex=qdbex_Vbex+qdbex_qlo*qlo_Vbex; qdbex_Vbex=qdbex_Vbex+qdbex_vl*vl_Vbex; } dv0=-p[24]*p[14]; if(p[26]<=0.0){ dvh=(*Vbci)+dv0; dvh_Vbci=1.0; if(dvh>0.0){ xvar1=(1.0-p[14]); xvar2=(-1.0-p[25]); pwq=pow(xvar1,xvar2); qlo=p[24]*(1.0-pwq*(1.0-p[14])*(1.0-p[14]))/(1.0-p[25]); qlo_Vbci=0.0; qhi=dvh*(1.0-p[14]+0.5*p[25]*dvh/p[24])*pwq; qhi_dvh=(0.5*dvh*p[25]/p[24]-p[14]+1.0)*pwq+0.5*dvh*p[25]*pwq/p[24]; qhi_Vbci=qhi_dvh*dvh_Vbci; }else{ if((p[85]>0.0)&&((*Vbci)<-p[85])){ xvar1=(1.0+p[85]/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); qlo=p[24]*(1.0-xvar3*(1.0-((1.0-p[25])*((*Vbci)+p[85]))/(p[24]+p[85])))/(1.0-p[25]); qlo_Vbci=p[24]*xvar3/(p[85]+p[24]); }else{ xvar1=(1.0-(*Vbci)/p[24]); xvar1_Vbci=-1.0/p[24]; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbci=xvar3_xvar1*xvar1_Vbci; qlo=p[24]*(1.0-xvar3)/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbci=qlo_xvar3*xvar3_Vbci; } qhi=0.0; qhi_Vbci=0.0; } qdbc=qlo+qhi; qdbc_qlo=1.0; qdbc_qhi=1.0; qdbc_Vbci=qdbc_qlo*qlo_Vbci; qdbc_Vbci=qdbc_Vbci+qdbc_qhi*qhi_Vbci; }else{ if((p[85]>0.0)&&(p[86]>0.0)){ vn0=(p[85]+dv0)/(p[85]-dv0); vnl0=2.0*vn0/(sqrt((vn0-1.0)*(vn0-1.0)+4.0*p[26]*p[26])+sqrt((vn0+1.0)*(vn0+1.0)+4.0*p[86]*p[86])); vl0=0.5*(vnl0*(p[85]-dv0)-p[85]-dv0); xvar1=(1.0-vl0/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); qlo0=p[24]*(1.0-xvar3)/(1.0-p[25]); vn=(2.0*(*Vbci)+p[85]+dv0)/(p[85]-dv0); vn_Vbci=2.0/(p[85]-dv0); vnl=2.0*vn/(sqrt((vn-1.0)*(vn-1.0)+4.0*p[26]*p[26])+sqrt((vn+1.0)*(vn+1.0)+4.0*p[86]*p[86])); vnl_vn=2.0/(sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))-2.0*vn*((vn+1.0)/sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+(vn-1.0)/sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))/((sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))*(sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))); vnl_Vbci=vnl_vn*vn_Vbci; vl=0.5*(vnl*(p[85]-dv0)-p[85]-dv0); vl_vnl=0.5*(p[85]-dv0); vl_Vbci=vl_vnl*vnl_Vbci; xvar1=(1.0-vl/p[24]); xvar1_vl=-1.0/p[24]; xvar1_Vbci=xvar1_vl*vl_Vbci; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbci=xvar3_xvar1*xvar1_Vbci; qlo=p[24]*(1.0-xvar3)/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbci=qlo_xvar3*xvar3_Vbci; sel=0.5*(vnl+1.0); sel_vnl=0.5; sel_Vbci=sel_vnl*vnl_Vbci; xvar1=(1.0+p[85]/p[24]); xvar2=(-p[25]); crt=pow(xvar1,xvar2); xvar1=(1.0+dv0/p[24]); xvar2=(-p[25]); cmx=pow(xvar1,xvar2); cl=(1.0-sel)*crt+sel*cmx; cl_sel=cmx-crt; cl_Vbci=cl_sel*sel_Vbci; ql=((*Vbci)-vl+vl0)*cl; ql_Vbci=cl; ql_vl=-cl; ql_cl=vl0-vl+(*Vbci); ql_Vbci=ql_Vbci+ql_vl*vl_Vbci; ql_Vbci=ql_Vbci+ql_cl*cl_Vbci; qdbc=ql+qlo-qlo0; qdbc_ql=1.0; qdbc_qlo=1.0; qdbc_Vbci=qdbc_ql*ql_Vbci; qdbc_Vbci=qdbc_Vbci+qdbc_qlo*qlo_Vbci; }else{ mv0=sqrt(dv0*dv0+4.0*p[26]*p[26]); vl0=-0.5*(dv0+mv0); xvar1=(1.0-vl0/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); q0=-p[24]*xvar3/(1.0-p[25]); dv=(*Vbci)+dv0; dv_Vbci=1.0; mv=sqrt(dv*dv+4.0*p[26]*p[26]); mv_dv=dv/sqrt((dv*dv)+4.0*(p[26]*p[26])); mv_Vbci=mv_dv*dv_Vbci; vl=0.5*(dv-mv)-dv0; vl_dv=0.5; vl_mv=-0.5; vl_Vbci=vl_dv*dv_Vbci; vl_Vbci=vl_Vbci+vl_mv*mv_Vbci; xvar1=(1.0-vl/p[24]); xvar1_vl=-1.0/p[24]; xvar1_Vbci=xvar1_vl*vl_Vbci; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbci=xvar3_xvar1*xvar1_Vbci; qlo=-p[24]*xvar3/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbci=qlo_xvar3*xvar3_Vbci; xvar1=(1.0-p[14]); xvar2=(-p[25]); xvar3=pow(xvar1,xvar2); qdbc=qlo+xvar3*((*Vbci)-vl+vl0)-q0; qdbc_qlo=1.0; qdbc_Vbci=xvar3; qdbc_vl=-xvar3; qdbc_Vbci=qdbc_Vbci+qdbc_qlo*qlo_Vbci; qdbc_Vbci=qdbc_Vbci+qdbc_vl*vl_Vbci; } } dv0=-p[24]*p[14]; if(p[26]<=0.0){ dvh=(*Vbep)+dv0; dvh_Vbep=1.0; if(dvh>0.0){ xvar1=(1.0-p[14]); xvar2=(-1.0-p[25]); pwq=pow(xvar1,xvar2); qlo=p[24]*(1.0-pwq*(1.0-p[14])*(1.0-p[14]))/(1.0-p[25]); qlo_Vbep=0.0; qhi=dvh*(1.0-p[14]+0.5*p[25]*dvh/p[24])*pwq; qhi_dvh=(0.5*dvh*p[25]/p[24]-p[14]+1.0)*pwq+0.5*dvh*p[25]*pwq/p[24]; qhi_Vbep=qhi_dvh*dvh_Vbep; }else{ if((p[85]>0.0)&&((*Vbep)<-p[85])){ xvar1=(1.0+p[85]/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); qlo=p[24]*(1.0-xvar3*(1.0-((1.0-p[25])*((*Vbep)+p[85]))/(p[24]+p[85])))/(1.0-p[25]); qlo_Vbep=p[24]*xvar3/(p[85]+p[24]); }else{ xvar1=(1.0-(*Vbep)/p[24]); xvar1_Vbep=-1.0/p[24]; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbep=xvar3_xvar1*xvar1_Vbep; qlo=p[24]*(1.0-xvar3)/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbep=qlo_xvar3*xvar3_Vbep; } qhi=0.0; qhi_Vbep=0.0; } qdbep=qlo+qhi; qdbep_qlo=1.0; qdbep_qhi=1.0; qdbep_Vbep=qdbep_qlo*qlo_Vbep; qdbep_Vbep=qdbep_Vbep+qdbep_qhi*qhi_Vbep; }else{ if((p[85]>0.0)&&(p[86]>0.0)){ vn0=(p[85]+dv0)/(p[85]-dv0); vnl0=2.0*vn0/(sqrt((vn0-1.0)*(vn0-1.0)+4.0*p[26]*p[26])+sqrt((vn0+1.0)*(vn0+1.0)+4.0*p[86]*p[86])); vl0=0.5*(vnl0*(p[85]-dv0)-p[85]-dv0); xvar1=(1.0-vl0/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); qlo0=p[24]*(1.0-xvar3)/(1.0-p[25]); vn=(2.0*(*Vbep)+p[85]+dv0)/(p[85]-dv0); vn_Vbep=2.0/(p[85]-dv0); vnl=2.0*vn/(sqrt((vn-1.0)*(vn-1.0)+4.0*p[26]*p[26])+sqrt((vn+1.0)*(vn+1.0)+4.0*p[86]*p[86])); vnl_vn=2.0/(sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))-2.0*vn*((vn+1.0)/sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+(vn-1.0)/sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))/((sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))*(sqrt(((vn+1.0)*(vn+1.0))+4.0*(p[86]*p[86]))+sqrt(((vn-1.0)*(vn-1.0))+4.0*(p[26]*p[26])))); vnl_Vbep=vnl_vn*vn_Vbep; vl=0.5*(vnl*(p[85]-dv0)-p[85]-dv0); vl_vnl=0.5*(p[85]-dv0); vl_Vbep=vl_vnl*vnl_Vbep; xvar1=(1.0-vl/p[24]); xvar1_vl=-1.0/p[24]; xvar1_Vbep=xvar1_vl*vl_Vbep; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbep=xvar3_xvar1*xvar1_Vbep; qlo=p[24]*(1.0-xvar3)/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbep=qlo_xvar3*xvar3_Vbep; sel=0.5*(vnl+1.0); sel_vnl=0.5; sel_Vbep=sel_vnl*vnl_Vbep; xvar1=(1.0+p[85]/p[24]); xvar2=(-p[25]); crt=pow(xvar1,xvar2); xvar1=(1.0+dv0/p[24]); xvar2=(-p[25]); cmx=pow(xvar1,xvar2); cl=(1.0-sel)*crt+sel*cmx; cl_sel=cmx-crt; cl_Vbep=cl_sel*sel_Vbep; ql=((*Vbep)-vl+vl0)*cl; ql_Vbep=cl; ql_vl=-cl; ql_cl=vl0-vl+(*Vbep); ql_Vbep=ql_Vbep+ql_vl*vl_Vbep; ql_Vbep=ql_Vbep+ql_cl*cl_Vbep; qdbep=ql+qlo-qlo0; qdbep_ql=1.0; qdbep_qlo=1.0; qdbep_Vbep=qdbep_ql*ql_Vbep; qdbep_Vbep=qdbep_Vbep+qdbep_qlo*qlo_Vbep; }else{ mv0=sqrt(dv0*dv0+4.0*p[26]*p[26]); vl0=-0.5*(dv0+mv0); xvar1=(1.0-vl0/p[24]); xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); q0=-p[24]*xvar3/(1.0-p[25]); dv=(*Vbep)+dv0; dv_Vbep=1.0; mv=sqrt(dv*dv+4.0*p[26]*p[26]); mv_dv=dv/sqrt((dv*dv)+4.0*(p[26]*p[26])); mv_Vbep=mv_dv*dv_Vbep; vl=0.5*(dv-mv)-dv0; vl_dv=0.5; vl_mv=-0.5; vl_Vbep=vl_dv*dv_Vbep; vl_Vbep=vl_Vbep+vl_mv*mv_Vbep; xvar1=(1.0-vl/p[24]); xvar1_vl=-1.0/p[24]; xvar1_Vbep=xvar1_vl*vl_Vbep; xvar2=(1.0-p[25]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbep=xvar3_xvar1*xvar1_Vbep; qlo=-p[24]*xvar3/(1.0-p[25]); qlo_xvar3=-p[24]/(1.0-p[25]); qlo_Vbep=qlo_xvar3*xvar3_Vbep; xvar1=(1.0-p[14]); xvar2=(-p[25]); xvar3=pow(xvar1,xvar2); qdbep=qlo+xvar3*((*Vbep)-vl+vl0)-q0; qdbep_qlo=1.0; qdbep_Vbep=xvar3; qdbep_vl=-xvar3; qdbep_Vbep=qdbep_Vbep+qdbep_qlo*qlo_Vbep; qdbep_Vbep=qdbep_Vbep+qdbep_vl*vl_Vbep; } } if(p[27]>0.0){ dv0=-p[28]*p[14]; if(p[30]<=0.0){ dvh=(*Vbcp)+dv0; dvh_Vbcp=1.0; if(dvh>0.0){ xvar1=(1.0-p[14]); xvar2=(-1.0-p[29]); pwq=pow(xvar1,xvar2); qlo=p[28]*(1.0-pwq*(1.0-p[14])*(1.0-p[14]))/(1.0-p[29]); qlo_Vbep=0.0; qlo_Vbcp=0.0; qhi=dvh*(1.0-p[14]+0.5*p[29]*dvh/p[28])*pwq; qhi_dvh=(0.5*dvh*p[29]/p[28]-p[14]+1.0)*pwq+0.5*dvh*p[29]*pwq/p[28]; qhi_Vbep=0.0; qhi_Vbcp=qhi_dvh*dvh_Vbcp; }else{ xvar1=(1.0-(*Vbcp)/p[28]); xvar1_Vbcp=-1.0/p[28]; xvar2=(1.0-p[29]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbcp=xvar3_xvar1*xvar1_Vbcp; qlo=p[28]*(1.0-xvar3)/(1.0-p[29]); qlo_xvar3=-p[28]/(1.0-p[29]); qlo_Vbep=0.0; qlo_Vbcp=qlo_xvar3*xvar3_Vbcp; qhi=0.0; qhi_Vbep=0.0; qhi_Vbcp=0.0; } qdbcp=qlo+qhi; qdbcp_qlo=1.0; qdbcp_qhi=1.0; qdbcp_Vbcp=qdbcp_qlo*qlo_Vbcp; qdbcp_Vbep=qdbcp_qlo*qlo_Vbep; qdbcp_Vbep=qdbcp_Vbep+qdbcp_qhi*qhi_Vbep; qdbcp_Vbcp=qdbcp_Vbcp+qdbcp_qhi*qhi_Vbcp; }else{ mv0=sqrt(dv0*dv0+4.0*p[30]*p[30]); vl0=-0.5*(dv0+mv0); xvar1=(1.0-vl0/p[28]); xvar2=(1.0-p[29]); xvar3=pow(xvar1,xvar2); q0=-p[28]*xvar3/(1.0-p[29]); dv=(*Vbcp)+dv0; dv_Vbcp=1.0; mv=sqrt(dv*dv+4.0*p[30]*p[30]); mv_dv=dv/sqrt((dv*dv)+4.0*(p[30]*p[30])); mv_Vbcp=mv_dv*dv_Vbcp; vl=0.5*(dv-mv)-dv0; vl_dv=0.5; vl_mv=-0.5; vl_Vbcp=vl_dv*dv_Vbcp; vl_Vbcp=vl_Vbcp+vl_mv*mv_Vbcp; xvar1=(1.0-vl/p[28]); xvar1_vl=-1.0/p[28]; xvar1_Vbcp=xvar1_vl*vl_Vbcp; xvar2=(1.0-p[29]); xvar3=pow(xvar1,xvar2); xvar3_xvar1=xvar3*xvar2/xvar1; xvar3_Vbcp=xvar3_xvar1*xvar1_Vbcp; qlo=-p[28]*xvar3/(1.0-p[29]); qlo_xvar3=-p[28]/(1.0-p[29]); qlo_Vbep=0.0; qlo_Vbcp=qlo_xvar3*xvar3_Vbcp; xvar1=(1.0-p[14]); xvar2=(-p[29]); xvar3=pow(xvar1,xvar2); qdbcp=qlo+xvar3*((*Vbcp)-vl+vl0)-q0; qdbcp_qlo=1.0; qdbcp_Vbcp=xvar3; qdbcp_vl=-xvar3; qdbcp_Vbcp=qdbcp_Vbcp+qdbcp_qlo*qlo_Vbcp; qdbcp_Vbep=qdbcp_qlo*qlo_Vbep; qdbcp_Vbcp=qdbcp_Vbcp+qdbcp_vl*vl_Vbcp; } }else{ qdbcp=0.0; qdbcp_Vbcp=0.0; } argi=(*Vbei)/(p[12]*Vtv); argi_Vbei=1.0/(p[12]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbei=expi_argi*argi_Vbei; Ifi=p[11]*(expi-1.0); Ifi_expi=p[11]; Ifi_Vbei=Ifi_expi*expi_Vbei; argi=(*Vbci)/(p[13]*Vtv); argi_Vbci=1.0/(p[13]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbci=expi_argi*argi_Vbci; Iri=p[11]*p[94]*(expi-1.0); Iri_expi=p[11]*p[94]; Iri_Vbci=Iri_expi*expi_Vbci; q1z=1.0+qdbe*IVER+qdbc*IVEF; q1z_qdbe=IVER; q1z_qdbc=IVEF; q1z_Vbei=q1z_qdbe*qdbe_Vbei; q1z_Vbci=q1z_qdbc*qdbc_Vbci; q1=0.5*(sqrt((q1z-1.0e-4)*(q1z-1.0e-4)+1.0e-8)+q1z-1.0e-4)+1.0e-4; q1_q1z=0.5*((q1z-1.0e-4)/sqrt(((q1z-1.0e-4)*(q1z-1.0e-4))+1.0e-8)+1.0); q1_Vbei=q1_q1z*q1z_Vbei; q1_Vbci=q1_q1z*q1z_Vbci; q2=Ifi*IIKF+Iri*IIKR; q2_Ifi=IIKF; q2_Iri=IIKR; q2_Vbei=q2_Ifi*Ifi_Vbei; q2_Vbci=q2_Iri*Iri_Vbci; if(p[88]<0.5){ xvar2=1.0/p[89]; xvar3=pow(q1,xvar2); xvar3_q1=xvar3*xvar2/q1; xvar3_Vbei=xvar3_q1*q1_Vbei; xvar3_Vbci=xvar3_q1*q1_Vbci; xvar1=(xvar3+4.0*q2); xvar1_xvar3=1.0; xvar1_q2=4.0; xvar1_Vbei=xvar1_xvar3*xvar3_Vbei; xvar1_Vbci=xvar1_xvar3*xvar3_Vbci; xvar1_Vbei=xvar1_Vbei+xvar1_q2*q2_Vbei; xvar1_Vbci=xvar1_Vbci+xvar1_q2*q2_Vbci; xvar4=pow(xvar1,p[89]); xvar4_xvar1=xvar4*p[89]/xvar1; xvar4_Vbei=xvar4_xvar1*xvar1_Vbei; xvar4_Vbci=xvar4_xvar1*xvar1_Vbci; qb=0.5*(q1+xvar4); qb_q1=0.5; qb_xvar4=0.5; qb_Vbei=qb_q1*q1_Vbei; qb_Vbci=qb_q1*q1_Vbci; qb_Vbei=qb_Vbei+qb_xvar4*xvar4_Vbei; qb_Vbci=qb_Vbci+qb_xvar4*xvar4_Vbci; }else{ xvar1=(1.0+4.0*q2); xvar1_q2=4.0; xvar1_Vbei=xvar1_q2*q2_Vbei; xvar1_Vbci=xvar1_q2*q2_Vbci; xvar2=pow(xvar1,p[89]); xvar2_xvar1=xvar2*p[89]/xvar1; xvar2_Vbei=xvar2_xvar1*xvar1_Vbei; xvar2_Vbci=xvar2_xvar1*xvar1_Vbci; qb=0.5*q1*(1.0+xvar2); qb_q1=0.5*(xvar2+1.0); qb_xvar2=0.5*q1; qb_Vbei=qb_q1*q1_Vbei; qb_Vbci=qb_q1*q1_Vbci; qb_Vbei=qb_Vbei+qb_xvar2*xvar2_Vbei; qb_Vbci=qb_Vbci+qb_xvar2*xvar2_Vbci; } (*Itzr)=Iri/qb; Itzr_Iri=1.0/qb; Itzr_qb=-Iri/(qb*qb); *Itzr_Vbci=Itzr_Iri*Iri_Vbci; *Itzr_Vbei=Itzr_qb*qb_Vbei; *Itzr_Vbci=(*Itzr_Vbci)+Itzr_qb*qb_Vbci; (*Itzf)=Ifi/qb; Itzf_Ifi=1.0/qb; Itzf_qb=-Ifi/(qb*qb); *Itzf_Vbei=Itzf_Ifi*Ifi_Vbei; *Itzf_Vbei=(*Itzf_Vbei)+Itzf_qb*qb_Vbei; *Itzf_Vbci=Itzf_qb*qb_Vbci; if(p[42]>0.0){ argi=(*Vbep)/(p[44]*Vtv); argi_Vbep=1.0/(p[44]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbep=expi_argi*argi_Vbep; argx=(*Vbci)/(p[44]*Vtv); argx_Vbci=1.0/(p[44]*Vtv); expx=exp(argx); expx_argx=expx; expx_Vbci=expx_argx*argx_Vbci; Ifp=p[42]*(p[43]*expi+(1.0-p[43])*expx-1.0); Ifp_expi=p[42]*p[43]; Ifp_expx=p[42]*(1.0-p[43]); Ifp_Vbep=Ifp_expi*expi_Vbep; Ifp_Vbci=Ifp_expx*expx_Vbci; q2p=Ifp*IIKP; q2p_Ifp=IIKP; q2p_Vbep=q2p_Ifp*Ifp_Vbep; q2p_Vbci=q2p_Ifp*Ifp_Vbci; qbp=0.5*(1.0+sqrt(1.0+4.0*q2p)); qbp_q2p=1.0/sqrt(4.0*q2p+1.0); qbp_Vbep=qbp_q2p*q2p_Vbep; qbp_Vbci=qbp_q2p*q2p_Vbci; argi=(*Vbcp)/(p[44]*Vtv); argi_Vbcp=1.0/(p[44]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbcp=expi_argi*argi_Vbcp; Irp=p[42]*(expi-1.0); Irp_expi=p[42]; Irp_Vbcp=Irp_expi*expi_Vbcp; (*Iccp)=(Ifp-Irp)/qbp; Iccp_Ifp=1.0/qbp; Iccp_Irp=-1.0/qbp; Iccp_qbp=-(Ifp-Irp)/(qbp*qbp); *Iccp_Vbep=Iccp_Ifp*Ifp_Vbep; *Iccp_Vbci=Iccp_Ifp*Ifp_Vbci; *Iccp_Vbcp=Iccp_Irp*Irp_Vbcp; *Iccp_Vbep=(*Iccp_Vbep)+Iccp_qbp*qbp_Vbep; *Iccp_Vbci=(*Iccp_Vbci)+Iccp_qbp*qbp_Vbci; }else{ Ifp=0.0; Ifp_Vbep=0.0; Ifp_Vbci=0.0; qbp=1.0; qbp_Vbep=0.0; qbp_Vbci=0.0; (*Iccp)=0.0; *Iccp_Vbep=0.0; *Iccp_Vbci=0.0; *Iccp_Vbcp=0.0; } if(p[32]==1.0){ argi=(*Vbei)/(p[33]*Vtv); argi_Vbei=1.0/(p[33]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbei=expi_argi*argi_Vbei; argn=(*Vbei)/(p[35]*Vtv); argn_Vbei=1.0/(p[35]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbei=expn_argn*argn_Vbei; if(p[98]>0.0){ argx=(-p[98]-(*Vbei))/(p[99]*Vtv); argx_Vbei=-1.0/(p[99]*Vtv); expx=exp(argx); expx_argx=expx; expx_Vbei=expx_argx*argx_Vbei; (*Ibe)=p[31]*(expi-1.0)+p[34]*(expn-1.0)-p[100]*(expx-p[104]); Ibe_expi=p[31]; Ibe_expn=p[34]; Ibe_expx=-p[100]; *Ibe_Vbei=Ibe_expi*expi_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expn*expn_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expx*expx_Vbei; }else{ (*Ibe)=p[31]*(expi-1.0)+p[34]*(expn-1.0); Ibe_expi=p[31]; Ibe_expn=p[34]; *Ibe_Vbei=Ibe_expi*expi_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expn*expn_Vbei; } (*Ibex)=0.0; *Ibex_Vbex=0.0; }else if(p[32]==0.0){ (*Ibe)=0.0; *Ibe_Vbei=0.0; argi=(*Vbex)/(p[33]*Vtv); argi_Vbex=1.0/(p[33]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbex=expi_argi*argi_Vbex; argn=(*Vbex)/(p[35]*Vtv); argn_Vbex=1.0/(p[35]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbex=expn_argn*argn_Vbex; if(p[98]>0.0){ argx=(-p[98]-(*Vbex))/(p[99]*Vtv); argx_Vbex=-1.0/(p[99]*Vtv); expx=exp(argx); expx_argx=expx; expx_Vbex=expx_argx*argx_Vbex; (*Ibex)=p[31]*(expi-1.0)+p[34]*(expn-1.0)-p[100]*(expx-p[104]); Ibex_expi=p[31]; Ibex_expn=p[34]; Ibex_expx=-p[100]; *Ibex_Vbex=Ibex_expi*expi_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expn*expn_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expx*expx_Vbex; }else{ (*Ibex)=p[31]*(expi-1.0)+p[34]*(expn-1.0); Ibex_expi=p[31]; Ibex_expn=p[34]; *Ibex_Vbex=Ibex_expi*expi_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expn*expn_Vbex; } }else{ argi=(*Vbei)/(p[33]*Vtv); argi_Vbei=1.0/(p[33]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbei=expi_argi*argi_Vbei; argn=(*Vbei)/(p[35]*Vtv); argn_Vbei=1.0/(p[35]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbei=expn_argn*argn_Vbei; if(p[98]>0.0){ argx=(-p[98]-(*Vbei))/(p[99]*Vtv); argx_Vbei=-1.0/(p[99]*Vtv); expx=exp(argx); expx_argx=expx; expx_Vbei=expx_argx*argx_Vbei; (*Ibe)=p[32]*(p[31]*(expi-1.0)+p[34]*(expn-1.0)-p[100]*(expx-p[104])); Ibe_expi=p[31]*p[32]; Ibe_expn=p[34]*p[32]; Ibe_expx=-p[100]*p[32]; *Ibe_Vbei=Ibe_expi*expi_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expn*expn_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expx*expx_Vbei; }else{ (*Ibe)=p[32]*(p[31]*(expi-1.0)+p[34]*(expn-1.0)); Ibe_expi=p[31]*p[32]; Ibe_expn=p[34]*p[32]; *Ibe_Vbei=Ibe_expi*expi_Vbei; *Ibe_Vbei=(*Ibe_Vbei)+Ibe_expn*expn_Vbei; } argi=(*Vbex)/(p[33]*Vtv); argi_Vbex=1.0/(p[33]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbex=expi_argi*argi_Vbex; argn=(*Vbex)/(p[35]*Vtv); argn_Vbex=1.0/(p[35]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbex=expn_argn*argn_Vbex; if(p[98]>0.0){ argx=(-p[98]-(*Vbex))/(p[99]*Vtv); argx_Vbex=-1.0/(p[99]*Vtv); expx=exp(argx); expx_argx=expx; expx_Vbex=expx_argx*argx_Vbex; (*Ibex)=(1.0-p[32])*(p[31]*(expi-1.0)+p[34]*(expn-1.0)-p[100]*(expx-p[104])); Ibex_expi=p[31]*(1.0-p[32]); Ibex_expn=p[34]*(1.0-p[32]); Ibex_expx=-p[100]*(1.0-p[32]); *Ibex_Vbex=Ibex_expi*expi_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expn*expn_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expx*expx_Vbex; }else{ (*Ibex)=(1.0-p[32])*(p[31]*(expi-1.0)+p[34]*(expn-1.0)); Ibex_expi=p[31]*(1.0-p[32]); Ibex_expn=p[34]*(1.0-p[32]); *Ibex_Vbex=Ibex_expi*expi_Vbex; *Ibex_Vbex=(*Ibex_Vbex)+Ibex_expn*expn_Vbex; } } argi=(*Vbci)/(p[37]*Vtv); argi_Vbci=1.0/(p[37]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbci=expi_argi*argi_Vbci; argn=(*Vbci)/(p[39]*Vtv); argn_Vbci=1.0/(p[39]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbci=expn_argn*argn_Vbci; Ibcj=p[36]*(expi-1.0)+p[38]*(expn-1.0); Ibcj_expi=p[36]; Ibcj_expn=p[38]; Ibcj_Vbci=Ibcj_expi*expi_Vbci; Ibcj_Vbci=Ibcj_Vbci+Ibcj_expn*expn_Vbci; if((p[45]>0.0)||(p[46]>0.0)){ argi=(*Vbep)/(p[37]*Vtv); argi_Vbep=1.0/(p[37]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbep=expi_argi*argi_Vbep; argn=(*Vbep)/(p[39]*Vtv); argn_Vbep=1.0/(p[39]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbep=expn_argn*argn_Vbep; (*Ibep)=p[45]*(expi-1.0)+p[46]*(expn-1.0); Ibep_expi=p[45]; Ibep_expn=p[46]; *Ibep_Vbep=Ibep_expi*expi_Vbep; *Ibep_Vbep=(*Ibep_Vbep)+Ibep_expn*expn_Vbep; }else{ (*Ibep)=0.0; *Ibep_Vbep=0.0; } if(p[40]>0.0){ vl=0.5*(sqrt((p[24]-(*Vbci))*(p[24]-(*Vbci))+0.01)+(p[24]-(*Vbci))); vl_Vbci=0.5*(-(p[24]-(*Vbci))/sqrt(((p[24]-(*Vbci))*(p[24]-(*Vbci)))+0.01)-1.0); xvar2=(p[25]-1.0); xvar3=pow(vl,xvar2); xvar3_vl=xvar3*xvar2/vl; xvar3_Vbci=xvar3_vl*vl_Vbci; xvar1=-p[41]*xvar3; xvar1_xvar3=-p[41]; xvar1_Vbci=xvar1_xvar3*xvar3_Vbci; xvar4=exp(xvar1); xvar4_xvar1=xvar4; xvar4_Vbci=xvar4_xvar1*xvar1_Vbci; avalf=p[40]*vl*xvar4; avalf_vl=p[40]*xvar4; avalf_xvar4=p[40]*vl; avalf_Vbci=avalf_vl*vl_Vbci; avalf_Vbci=avalf_Vbci+avalf_xvar4*xvar4_Vbci; Igc=((*Itzf)-(*Itzr)-Ibcj)*avalf; Igc_Itzf=avalf; Igc_Itzr=-avalf; Igc_Ibcj=-avalf; Igc_avalf=-(*Itzr)+(*Itzf)-Ibcj; Igc_Vbei=Igc_Itzf*(*Itzf_Vbei); Igc_Vbci=Igc_Itzf*(*Itzf_Vbci); Igc_Vbci=Igc_Vbci+Igc_Itzr*(*Itzr_Vbci); Igc_Vbei=Igc_Vbei+Igc_Itzr*(*Itzr_Vbei); Igc_Vbci=Igc_Vbci+Igc_Ibcj*Ibcj_Vbci; Igc_Vbci=Igc_Vbci+Igc_avalf*avalf_Vbci; }else{ Igc=0.0; Igc_Vbei=0.0; Igc_Vbci=0.0; } (*Ibc)=Ibcj-Igc; Ibc_Ibcj=1.0; Ibc_Igc=-1.0; *Ibc_Vbci=Ibc_Ibcj*Ibcj_Vbci; *Ibc_Vbei=Ibc_Igc*Igc_Vbei; *Ibc_Vbci=(*Ibc_Vbci)+Ibc_Igc*Igc_Vbci; if(p[1]>0.0){ (*Ircx)=(*Vrcx)/p[1]; *Ircx_Vrcx=1.0/p[1]; }else{ (*Ircx)=0.0; *Ircx_Vrcx=0.0; } argi=(*Vbci)/Vtv; argi_Vbci=1.0/Vtv; expi=exp(argi); expi_argi=expi; expi_Vbci=expi_argi*argi_Vbci; argx=(*Vbcx)/Vtv; argx_Vbcx=1.0/Vtv; expx=exp(argx); expx_argx=expx; expx_Vbcx=expx_argx*argx_Vbcx; Kbci=sqrt(1.0+p[4]*expi); Kbci_expi=p[4]/(2.0*sqrt(expi*p[4]+1.0)); Kbci_Vbci=Kbci_expi*expi_Vbci; Kbcx=sqrt(1.0+p[4]*expx); Kbcx_expx=p[4]/(2.0*sqrt(expx*p[4]+1.0)); Kbcx_Vbcx=Kbcx_expx*expx_Vbcx; if(p[2]>0.0){ rKp1=(Kbci+1.0)/(Kbcx+1.0); rKp1_Kbci=1.0/(Kbcx+1.0); rKp1_Kbcx=-(Kbci+1.0)/((Kbcx+1.0)*(Kbcx+1.0)); rKp1_Vbci=rKp1_Kbci*Kbci_Vbci; rKp1_Vbcx=rKp1_Kbcx*Kbcx_Vbcx; xvar1=log(rKp1); xvar1_rKp1=1.0/rKp1; xvar1_Vbci=xvar1_rKp1*rKp1_Vbci; xvar1_Vbcx=xvar1_rKp1*rKp1_Vbcx; Iohm=((*Vrci)+Vtv*(Kbci-Kbcx-xvar1))/p[2]; Iohm_Vrci=1.0/p[2]; Iohm_Kbci=Vtv/p[2]; Iohm_Kbcx=-Vtv/p[2]; Iohm_xvar1=-Vtv/p[2]; Iohm_Vbci=Iohm_Kbci*Kbci_Vbci; Iohm_Vbcx=Iohm_Kbcx*Kbcx_Vbcx; Iohm_Vbci=Iohm_Vbci+Iohm_xvar1*xvar1_Vbci; Iohm_Vbcx=Iohm_Vbcx+Iohm_xvar1*xvar1_Vbcx; derf=IVO*p[2]*Iohm/(1.0+0.5*IVO*IHRCF*sqrt((*Vrci)*(*Vrci)+0.01)); derf_Iohm=IVO*p[2]/(0.5*IHRCF*IVO*sqrt(((*Vrci)*(*Vrci))+0.01)+1.0); derf_Vrci=-0.5*IHRCF*Iohm*(IVO*IVO)*p[2]*(*Vrci)/(sqrt(((*Vrci)*(*Vrci))+0.01)*((0.5*IHRCF*IVO*sqrt(((*Vrci)*(*Vrci))+0.01)+1.0)*(0.5*IHRCF*IVO*sqrt(((*Vrci)*(*Vrci))+0.01)+1.0))); derf_Vrci=derf_Vrci+derf_Iohm*Iohm_Vrci; derf_Vbci=derf_Iohm*Iohm_Vbci; derf_Vbcx=derf_Iohm*Iohm_Vbcx; (*Irci)=Iohm/sqrt(1.0+derf*derf); Irci_Iohm=1.0/sqrt((derf*derf)+1.0); Irci_derf=-derf*Iohm/pow(((derf*derf)+1.0),(3.0/2.0)); *Irci_Vrci=Irci_Iohm*Iohm_Vrci; *Irci_Vbci=Irci_Iohm*Iohm_Vbci; *Irci_Vbcx=Irci_Iohm*Iohm_Vbcx; *Irci_Vrci=(*Irci_Vrci)+Irci_derf*derf_Vrci; *Irci_Vbci=(*Irci_Vbci)+Irci_derf*derf_Vbci; *Irci_Vbcx=(*Irci_Vbcx)+Irci_derf*derf_Vbcx; }else{ (*Irci)=0.0; *Irci_Vrci=0.0; *Irci_Vbci=0.0; *Irci_Vbcx=0.0; } if(p[6]>0.0){ (*Irbx)=(*Vrbx)/p[6]; *Irbx_Vrbx=1.0/p[6]; }else{ (*Irbx)=0.0; *Irbx_Vrbx=0.0; } if(p[7]>0.0){ (*Irbi)=(*Vrbi)*qb/p[7]; *Irbi_Vrbi=qb/p[7]; Irbi_qb=(*Vrbi)/p[7]; *Irbi_Vbei=Irbi_qb*qb_Vbei; *Irbi_Vbci=Irbi_qb*qb_Vbci; }else{ (*Irbi)=0.0; *Irbi_Vrbi=0.0; *Irbi_Vbei=0.0; *Irbi_Vbci=0.0; } if(p[8]>0.0){ (*Ire)=(*Vre)/p[8]; *Ire_Vre=1.0/p[8]; }else{ (*Ire)=0.0; *Ire_Vre=0.0; } if(p[10]>0.0){ (*Irbp)=(*Vrbp)*qbp/p[10]; *Irbp_Vrbp=qbp/p[10]; Irbp_qbp=(*Vrbp)/p[10]; *Irbp_Vbep=Irbp_qbp*qbp_Vbep; *Irbp_Vbci=Irbp_qbp*qbp_Vbci; }else{ (*Irbp)=0.0; *Irbp_Vrbp=0.0; *Irbp_Vbep=0.0; *Irbp_Vbci=0.0; } if((p[47]>0.0)||(p[49]>0.0)){ argi=(*Vbcp)/(p[48]*Vtv); argi_Vbcp=1.0/(p[48]*Vtv); expi=exp(argi); expi_argi=expi; expi_Vbcp=expi_argi*argi_Vbcp; argn=(*Vbcp)/(p[50]*Vtv); argn_Vbcp=1.0/(p[50]*Vtv); expn=exp(argn); expn_argn=expn; expn_Vbcp=expn_argn*argn_Vbcp; (*Ibcp)=p[47]*(expi-1.0)+p[49]*(expn-1.0); Ibcp_expi=p[47]; Ibcp_expn=p[49]; *Ibcp_Vbcp=Ibcp_expi*expi_Vbcp; *Ibcp_Vbcp=(*Ibcp_Vbcp)+Ibcp_expn*expn_Vbcp; }else{ (*Ibcp)=0.0; *Ibcp_Vbcp=0.0; } if(p[9]>0.0){ (*Irs)=(*Vrs)/p[9]; *Irs_Vrs=1.0/p[9]; }else{ (*Irs)=0.0; *Irs_Vrs=0.0; } if(Ifi>0.0){ sgIf=1.0; }else{ sgIf=0.0; } rIf=Ifi*sgIf*IITF; rIf_Ifi=IITF*sgIf; rIf_Vbei=rIf_Ifi*Ifi_Vbei; mIf=rIf/(rIf+1.0); mIf_rIf=1.0/(rIf+1.0)-rIf/((rIf+1.0)*(rIf+1.0)); mIf_Vbei=mIf_rIf*rIf_Vbei; xvar1=(*Vbci)*IVTF/1.44; xvar1_Vbci=0.6944444*IVTF; xvar2=exp(xvar1); xvar2_xvar1=xvar2; xvar2_Vbci=xvar2_xvar1*xvar1_Vbci; tff=p[56]*(1.0+p[57]*q1)*(1.0+p[58]*xvar2*(slTF+mIf*mIf)*sgIf); tff_q1=p[57]*p[56]*(sgIf*(slTF+(mIf*mIf))*p[58]*xvar2+1.0); tff_xvar2=(q1*p[57]+1.0)*sgIf*(slTF+(mIf*mIf))*p[56]*p[58]; tff_mIf=2.0*mIf*(q1*p[57]+1.0)*sgIf*p[56]*p[58]*xvar2; tff_Vbei=tff_q1*q1_Vbei; tff_Vbci=tff_q1*q1_Vbci; tff_Vbci=tff_Vbci+tff_xvar2*xvar2_Vbci; tff_Vbei=tff_Vbei+tff_mIf*mIf_Vbei; (*Qbe)=p[16]*qdbe*p[32]+tff*Ifi/qb; Qbe_qdbe=p[16]*p[32]; Qbe_tff=Ifi/qb; Qbe_Ifi=tff/qb; Qbe_qb=-Ifi*tff/(qb*qb); *Qbe_Vbei=Qbe_qdbe*qdbe_Vbei; *Qbe_Vbei=(*Qbe_Vbei)+Qbe_tff*tff_Vbei; *Qbe_Vbci=Qbe_tff*tff_Vbci; *Qbe_Vbei=(*Qbe_Vbei)+Qbe_Ifi*Ifi_Vbei; *Qbe_Vbei=(*Qbe_Vbei)+Qbe_qb*qb_Vbei; *Qbe_Vbci=(*Qbe_Vbci)+Qbe_qb*qb_Vbci; (*Qbex)=p[16]*qdbex*(1.0-p[32]); Qbex_qdbex=p[16]*(1.0-p[32]); *Qbex_Vbex=Qbex_qdbex*qdbex_Vbex; (*Qbc)=p[21]*qdbc+p[61]*Iri+p[22]*Kbci; Qbc_qdbc=p[21]; Qbc_Iri=p[61]; Qbc_Kbci=p[22]; *Qbc_Vbci=Qbc_qdbc*qdbc_Vbci; *Qbc_Vbci=(*Qbc_Vbci)+Qbc_Iri*Iri_Vbci; *Qbc_Vbci=(*Qbc_Vbci)+Qbc_Kbci*Kbci_Vbci; (*Qbcx)=p[22]*Kbcx; Qbcx_Kbcx=p[22]; *Qbcx_Vbcx=Qbcx_Kbcx*Kbcx_Vbcx; (*Qbep)=p[23]*qdbep+p[61]*Ifp; Qbep_qdbep=p[23]; Qbep_Ifp=p[61]; *Qbep_Vbep=Qbep_qdbep*qdbep_Vbep; *Qbep_Vbep=(*Qbep_Vbep)+Qbep_Ifp*Ifp_Vbep; *Qbep_Vbci=Qbep_Ifp*Ifp_Vbci; (*Qbcp)=p[27]*qdbcp+p[87]*(*Vbcp); Qbcp_qdbcp=p[27]; *Qbcp_Vbcp=p[87]; *Qbcp_Vbcp=(*Qbcp_Vbcp)+Qbcp_qdbcp*qdbcp_Vbcp; (*Qbeo)=(*Vbe)*p[15]; *Qbeo_Vbe=p[15]; (*Qbco)=(*Vbc)*p[20]; *Qbco_Vbc=p[20]; /* Scale outputs */ if((*SCALE)!=1.0){ *Ibe=(*SCALE)*(*Ibe); *Ibe_Vbei=(*SCALE)*(*Ibe_Vbei); *Ibex=(*SCALE)*(*Ibex); *Ibex_Vbex=(*SCALE)*(*Ibex_Vbex); *Itzf=(*SCALE)*(*Itzf); *Itzf_Vbei=(*SCALE)*(*Itzf_Vbei); *Itzf_Vbci=(*SCALE)*(*Itzf_Vbci); *Itzr=(*SCALE)*(*Itzr); *Itzr_Vbci=(*SCALE)*(*Itzr_Vbci); *Itzr_Vbei=(*SCALE)*(*Itzr_Vbei); *Ibc=(*SCALE)*(*Ibc); *Ibc_Vbci=(*SCALE)*(*Ibc_Vbci); *Ibc_Vbei=(*SCALE)*(*Ibc_Vbei); *Ibep=(*SCALE)*(*Ibep); *Ibep_Vbep=(*SCALE)*(*Ibep_Vbep); *Ircx=(*SCALE)*(*Ircx); *Ircx_Vrcx=(*SCALE)*(*Ircx_Vrcx); *Irci=(*SCALE)*(*Irci); *Irci_Vrci=(*SCALE)*(*Irci_Vrci); *Irci_Vbci=(*SCALE)*(*Irci_Vbci); *Irci_Vbcx=(*SCALE)*(*Irci_Vbcx); *Irbx=(*SCALE)*(*Irbx); *Irbx_Vrbx=(*SCALE)*(*Irbx_Vrbx); *Irbi=(*SCALE)*(*Irbi); *Irbi_Vrbi=(*SCALE)*(*Irbi_Vrbi); *Irbi_Vbei=(*SCALE)*(*Irbi_Vbei); *Irbi_Vbci=(*SCALE)*(*Irbi_Vbci); *Ire=(*SCALE)*(*Ire); *Ire_Vre=(*SCALE)*(*Ire_Vre); *Irbp=(*SCALE)*(*Irbp); *Irbp_Vrbp=(*SCALE)*(*Irbp_Vrbp); *Irbp_Vbep=(*SCALE)*(*Irbp_Vbep); *Irbp_Vbci=(*SCALE)*(*Irbp_Vbci); *Qbe=(*SCALE)*(*Qbe); *Qbe_Vbei=(*SCALE)*(*Qbe_Vbei); *Qbe_Vbci=(*SCALE)*(*Qbe_Vbci); *Qbex=(*SCALE)*(*Qbex); *Qbex_Vbex=(*SCALE)*(*Qbex_Vbex); *Qbc=(*SCALE)*(*Qbc); *Qbc_Vbci=(*SCALE)*(*Qbc_Vbci); *Qbcx=(*SCALE)*(*Qbcx); *Qbcx_Vbcx=(*SCALE)*(*Qbcx_Vbcx); *Qbep=(*SCALE)*(*Qbep); *Qbep_Vbep=(*SCALE)*(*Qbep_Vbep); *Qbep_Vbci=(*SCALE)*(*Qbep_Vbci); *Qbeo=(*SCALE)*(*Qbeo); *Qbeo_Vbe=(*SCALE)*(*Qbeo_Vbe); *Qbco=(*SCALE)*(*Qbco); *Qbco_Vbc=(*SCALE)*(*Qbco_Vbc); *Ibcp=(*SCALE)*(*Ibcp); *Ibcp_Vbcp=(*SCALE)*(*Ibcp_Vbcp); *Iccp=(*SCALE)*(*Iccp); *Iccp_Vbep=(*SCALE)*(*Iccp_Vbep); *Iccp_Vbci=(*SCALE)*(*Iccp_Vbci); *Iccp_Vbcp=(*SCALE)*(*Iccp_Vbcp); *Irs=(*SCALE)*(*Irs); *Irs_Vrs=(*SCALE)*(*Irs_Vrs); *Qbcp=(*SCALE)*(*Qbcp); *Qbcp_Vbcp=(*SCALE)*(*Qbcp_Vbcp); } return(0); } ngspice-26/src/spicelib/devices/vbic/vbicext.h0000644000265600020320000000231112264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #ifndef __VBICEXT_H #define __VBICEXT_H extern int VBICacLoad(GENmodel *,CKTcircuit*); extern int VBICask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int VBICconvTest(GENmodel*,CKTcircuit*); extern int VBICdelete(GENmodel*,IFuid,GENinstance**); extern void VBICdestroy(GENmodel**); extern int VBICgetic(GENmodel*,CKTcircuit*); extern int VBICload(GENmodel*,CKTcircuit*); extern int VBICmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int VBICmDelete(GENmodel**,IFuid,GENmodel*); extern int VBICmParam(int,IFvalue*,GENmodel*); extern int VBICparam(int,IFvalue*,GENinstance*,IFvalue*); extern int VBICpzLoad(GENmodel*, CKTcircuit*, SPcomplex*); extern int VBICsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int VBICunsetup(GENmodel*,CKTcircuit*); extern int VBICtemp(GENmodel*,CKTcircuit*); extern int VBICtrunc(GENmodel*,CKTcircuit*,double*); extern int VBICnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int VBICsoaCheck(CKTcircuit *, GENmodel *); #endif ngspice-26/src/spicelib/devices/vbic/vbicconv.c0000644000265600020320000002523012264261473021136 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ /* * This routine performs the device convergence test for * VBICs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VBICconvTest(GENmodel *inModel, CKTcircuit *ckt) { VBICinstance *here; VBICmodel *model = (VBICmodel *) inModel; double tol; double delvbei; double delvbex; double delvbci; double delvbcx; double delvbep; double delvrci; double delvrbi; double delvrbp; double delvbcp; double ibehat; double ibexhat; double itzfhat; double itzrhat; double ibchat; double ibephat; double ircihat; double irbihat; double irbphat; double ibcphat; double iccphat; double Vbei, Vbex, Vbci, Vbcx, Vbep, Vrci, Vrbi, Vrbp, Vbcp; double Ibe, Ibex, Itzf, Itzr, Ibc, Ibep, Irci, Irbi, Irbp, Ibcp, Iccp; for( ; model != NULL; model = model->VBICnextModel) { for(here=model->VBICinstances;here!=NULL;here = here->VBICnextInstance) { Vbei=model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbex=model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICemitEINode)); Vbci =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICcollCINode)); Vbcx =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBINode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vbep =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICbaseBPNode)); Vrci =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICcollCXNode)- *(ckt->CKTrhsOld+here->VBICcollCINode)); Vrbi =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBXNode)- *(ckt->CKTrhsOld+here->VBICbaseBINode)); Vrbp =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICbaseBPNode)- *(ckt->CKTrhsOld+here->VBICcollCXNode)); Vbcp =model->VBICtype*( *(ckt->CKTrhsOld+here->VBICsubsSINode)- *(ckt->CKTrhsOld+here->VBICbaseBPNode)); delvbei = Vbei - *(ckt->CKTstate0 + here->VBICvbei); delvbex = Vbex - *(ckt->CKTstate0 + here->VBICvbex); delvbci = Vbci - *(ckt->CKTstate0 + here->VBICvbci); delvbcx = Vbcx - *(ckt->CKTstate0 + here->VBICvbcx); delvbep = Vbep - *(ckt->CKTstate0 + here->VBICvbep); delvrci = Vrci - *(ckt->CKTstate0 + here->VBICvrci); delvrbi = Vrbi - *(ckt->CKTstate0 + here->VBICvrbi); delvrbp = Vrbp - *(ckt->CKTstate0 + here->VBICvrbp); delvbcp = Vbcp - *(ckt->CKTstate0 + here->VBICvbcp); ibehat = *(ckt->CKTstate0 + here->VBICibe) + *(ckt->CKTstate0 + here->VBICibe_Vbei)*delvbei; ibexhat = *(ckt->CKTstate0 + here->VBICibex) + *(ckt->CKTstate0 + here->VBICibex_Vbex)*delvbex; itzfhat = *(ckt->CKTstate0 + here->VBICitzf) + *(ckt->CKTstate0 + here->VBICitzf_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzf_Vbci)*delvbci; itzrhat = *(ckt->CKTstate0 + here->VBICitzr) + *(ckt->CKTstate0 + here->VBICitzr_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICitzr_Vbci)*delvbci; ibchat = *(ckt->CKTstate0 + here->VBICibc) + *(ckt->CKTstate0 + here->VBICibc_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICibc_Vbci)*delvbci; ibephat = *(ckt->CKTstate0 + here->VBICibep) + *(ckt->CKTstate0 + here->VBICibep_Vbep)*delvbep; ircihat = *(ckt->CKTstate0 + here->VBICirci) + *(ckt->CKTstate0 + here->VBICirci_Vrci)*delvrci + *(ckt->CKTstate0 + here->VBICirci_Vbcx)*delvbcx + *(ckt->CKTstate0 + here->VBICirci_Vbci)*delvbci; irbihat = *(ckt->CKTstate0 + here->VBICirbi) + *(ckt->CKTstate0 + here->VBICirbi_Vrbi)*delvrbi + *(ckt->CKTstate0 + here->VBICirbi_Vbei)*delvbei + *(ckt->CKTstate0 + here->VBICirbi_Vbci)*delvbci; irbphat = *(ckt->CKTstate0 + here->VBICirbp) + *(ckt->CKTstate0 + here->VBICirbp_Vrbp)*delvrbp + *(ckt->CKTstate0 + here->VBICirbp_Vbep)*delvbep + *(ckt->CKTstate0 + here->VBICirbp_Vbci)*delvbci; ibcphat = *(ckt->CKTstate0 + here->VBICibcp) + *(ckt->CKTstate0 + here->VBICibcp_Vbcp)*delvbcp; iccphat = *(ckt->CKTstate0 + here->VBICiccp) + *(ckt->CKTstate0 + here->VBICiccp_Vbep)*delvbep + *(ckt->CKTstate0 + here->VBICiccp_Vbci)*delvbci + *(ckt->CKTstate0 + here->VBICiccp_Vbcp)*delvbcp; Ibe = *(ckt->CKTstate0 + here->VBICibe); Ibex = *(ckt->CKTstate0 + here->VBICibex); Itzf = *(ckt->CKTstate0 + here->VBICitzf); Itzr = *(ckt->CKTstate0 + here->VBICitzr); Ibc = *(ckt->CKTstate0 + here->VBICibc); Ibep = *(ckt->CKTstate0 + here->VBICibep); Irci = *(ckt->CKTstate0 + here->VBICirci); Irbi = *(ckt->CKTstate0 + here->VBICirbi); Irbp = *(ckt->CKTstate0 + here->VBICirbp); Ibcp = *(ckt->CKTstate0 + here->VBICibcp); Iccp = *(ckt->CKTstate0 + here->VBICiccp); /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(ibehat),fabs(Ibe))+ckt->CKTabstol; if (fabs(ibehat-Ibe) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(ibexhat),fabs(Ibex))+ckt->CKTabstol; if (fabs(ibexhat-Ibex) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(itzfhat),fabs(Itzf))+ckt->CKTabstol; if (fabs(itzfhat-Itzf) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(itzrhat),fabs(Itzr))+ckt->CKTabstol; if (fabs(itzrhat-Itzr) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(ibchat),fabs(Ibc))+ckt->CKTabstol; if (fabs(ibchat-Ibc) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(ibephat),fabs(Ibep))+ckt->CKTabstol; if (fabs(ibephat-Ibep) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(ircihat),fabs(Irci))+ckt->CKTabstol; if (fabs(ircihat-Irci) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(irbihat),fabs(Irbi))+ckt->CKTabstol; if (fabs(irbihat-Irbi) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(irbphat),fabs(Irbp))+ckt->CKTabstol; if (fabs(irbphat-Irbp) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(ibcphat),fabs(Ibcp))+ckt->CKTabstol; if (fabs(ibcphat-Ibcp) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(iccphat),fabs(Iccp))+ckt->CKTabstol; if (fabs(iccphat-Iccp) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } } } } } } } } } } } } } return(OK); } ngspice-26/src/spicelib/devices/vbic/vbicmask.c0000644000265600020320000003046312264261473021130 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Model Author: 1995 Colin McAndrew Motorola Spice3 Implementation: 2003 Dietmar Warning DAnalyse GmbH **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "vbicdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VBICmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value) { VBICmodel *here = (VBICmodel*)instPtr; NG_IGNORE(ckt); switch(which) { case VBIC_MOD_TNOM: value->rValue = here->VBICtnom; return(OK); case VBIC_MOD_RCX: value->rValue = here->VBICextCollResist; return(OK); case VBIC_MOD_RCI: value->rValue = here->VBICintCollResist; return(OK); case VBIC_MOD_VO: value->rValue = here->VBICepiSatVoltage; return(OK); case VBIC_MOD_GAMM: value->rValue = here->VBICepiDoping; return(OK); case VBIC_MOD_HRCF: value->rValue = here->VBIChighCurFac; return(OK); case VBIC_MOD_RBX: value->rValue = here->VBICextBaseResist; return(OK); case VBIC_MOD_RBI: value->rValue = here->VBICintBaseResist; return(OK); case VBIC_MOD_RE: value->rValue = here->VBICemitterResist; return(OK); case VBIC_MOD_RS: value->rValue = here->VBICsubstrateResist; return(OK); case VBIC_MOD_RBP: value->rValue = here->VBICparBaseResist; return(OK); case VBIC_MOD_IS: value->rValue = here->VBICsatCur; return(OK); case VBIC_MOD_NF: value->rValue = here->VBICemissionCoeffF; return(OK); case VBIC_MOD_NR: value->rValue = here->VBICemissionCoeffR; return(OK); case VBIC_MOD_FC: value->rValue = here->VBICdeplCapLimitF; return(OK); case VBIC_MOD_CBEO: value->rValue = here->VBICextOverlapCapBE; return(OK); case VBIC_MOD_CJE: value->rValue = here->VBICdepletionCapBE; return(OK); case VBIC_MOD_PE: value->rValue = here->VBICpotentialBE; return(OK); case VBIC_MOD_ME: value->rValue = here->VBICjunctionExpBE; return(OK); case VBIC_MOD_AJE: value->rValue = here->VBICsmoothCapBE; return(OK); case VBIC_MOD_CBCO: value->rValue = here->VBICextOverlapCapBC; return(OK); case VBIC_MOD_CJC: value->rValue = here->VBICdepletionCapBC; return(OK); case VBIC_MOD_QCO: value->rValue = here->VBICepiCharge; return(OK); case VBIC_MOD_CJEP: value->rValue = here->VBICextCapBC; return(OK); case VBIC_MOD_PC: value->rValue = here->VBICpotentialBC; return(OK); case VBIC_MOD_MC: value->rValue = here->VBICjunctionExpBC; return(OK); case VBIC_MOD_AJC: value->rValue = here->VBICsmoothCapBC; return(OK); case VBIC_MOD_CJCP: value->rValue = here->VBICextCapSC; return(OK); case VBIC_MOD_PS: value->rValue = here->VBICpotentialSC; return(OK); case VBIC_MOD_MS: value->rValue = here->VBICjunctionExpSC; return(OK); case VBIC_MOD_AJS: value->rValue = here->VBICsmoothCapSC; return(OK); case VBIC_MOD_IBEI: value->rValue = here->VBICidealSatCurBE; return(OK); case VBIC_MOD_WBE: value->rValue = here->VBICportionIBEI; return(OK); case VBIC_MOD_NEI: value->rValue = here->VBICidealEmissCoeffBE; return(OK); case VBIC_MOD_IBEN: value->rValue = here->VBICnidealSatCurBE; return(OK); case VBIC_MOD_NEN: value->rValue = here->VBICnidealEmissCoeffBE; return(OK); case VBIC_MOD_IBCI: value->rValue = here->VBICidealSatCurBC; return(OK); case VBIC_MOD_NCI: value->rValue = here->VBICidealEmissCoeffBC; return(OK); case VBIC_MOD_IBCN: value->rValue = here->VBICnidealSatCurBC; return(OK); case VBIC_MOD_NCN: value->rValue = here->VBICnidealEmissCoeffBC; return(OK); case VBIC_MOD_AVC1: value->rValue = here->VBICavalanchePar1BC; return(OK); case VBIC_MOD_AVC2: value->rValue = here->VBICavalanchePar2BC; return(OK); case VBIC_MOD_ISP: value->rValue = here->VBICparasitSatCur; return(OK); case VBIC_MOD_WSP: value->rValue = here->VBICportionICCP; return(OK); case VBIC_MOD_NFP: value->rValue = here->VBICparasitFwdEmissCoeff; return(OK); case VBIC_MOD_IBEIP: value->rValue = here->VBICidealParasitSatCurBE; return(OK); case VBIC_MOD_IBENP: value->rValue = here->VBICnidealParasitSatCurBE; return(OK); case VBIC_MOD_IBCIP: value->rValue = here->VBICidealParasitSatCurBC; return(OK); case VBIC_MOD_NCIP: value->rValue = here->VBICidealParasitEmissCoeffBC; return(OK); case VBIC_MOD_IBCNP: value->rValue = here->VBICnidealParasitSatCurBC; return(OK); case VBIC_MOD_NCNP: value->rValue = here->VBICnidealParasitEmissCoeffBC; return(OK); case VBIC_MOD_VEF: value->rValue = here->VBICearlyVoltF; return(OK); case VBIC_MOD_VER: value->rValue = here->VBICearlyVoltR; return(OK); case VBIC_MOD_IKF: value->rValue = here->VBICrollOffF; return(OK); case VBIC_MOD_IKR: value->rValue = here->VBICrollOffR; return(OK); case VBIC_MOD_IKP: value->rValue = here->VBICparRollOff; return(OK); case VBIC_MOD_TF: value->rValue = here->VBICtransitTimeF; return(OK); case VBIC_MOD_QTF: value->rValue = here->VBICvarTransitTimeF; return(OK); case VBIC_MOD_XTF: value->rValue = here->VBICtransitTimeBiasCoeffF; return(OK); case VBIC_MOD_VTF: value->rValue = here->VBICtransitTimeFVBC; return(OK); case VBIC_MOD_ITF: value->rValue = here->VBICtransitTimeHighCurrentF; return(OK); case VBIC_MOD_TR: value->rValue = here->VBICtransitTimeR; return(OK); case VBIC_MOD_TD: value->rValue = here->VBICdelayTimeF; return(OK); case VBIC_MOD_KFN: value->rValue = here->VBICfNcoef; return(OK); case VBIC_MOD_AFN: value->rValue = here->VBICfNexpA; return(OK); case VBIC_MOD_BFN: value->rValue = here->VBICfNexpB; return(OK); case VBIC_MOD_XRE: value->rValue = here->VBICtempExpRE; return(OK); case VBIC_MOD_XRB: value->rValue = here->VBICtempExpRB; return(OK); case VBIC_MOD_XRBI: value->rValue = here->VBICtempExpRBI; return(OK); case VBIC_MOD_XRC: value->rValue = here->VBICtempExpRC; return(OK); case VBIC_MOD_XRCI: value->rValue = here->VBICtempExpRCI; return(OK); case VBIC_MOD_XRS: value->rValue = here->VBICtempExpRS; return(OK); case VBIC_MOD_XVO: value->rValue = here->VBICtempExpVO; return(OK); case VBIC_MOD_EA: value->rValue = here->VBICactivEnergyEA; return(OK); case VBIC_MOD_EAIE: value->rValue = here->VBICactivEnergyEAIE; return(OK); case VBIC_MOD_EAIC: value->rValue = here->VBICactivEnergyEAIC; return(OK); case VBIC_MOD_EAIS: value->rValue = here->VBICactivEnergyEAIS; return(OK); case VBIC_MOD_EANE: value->rValue = here->VBICactivEnergyEANE; return(OK); case VBIC_MOD_EANC: value->rValue = here->VBICactivEnergyEANC; return(OK); case VBIC_MOD_EANS: value->rValue = here->VBICactivEnergyEANS; return(OK); case VBIC_MOD_XIS: value->rValue = here->VBICtempExpIS; return(OK); case VBIC_MOD_XII: value->rValue = here->VBICtempExpII; return(OK); case VBIC_MOD_XIN: value->rValue = here->VBICtempExpIN; return(OK); case VBIC_MOD_TNF: value->rValue = here->VBICtempExpNF; return(OK); case VBIC_MOD_TAVC: value->rValue = here->VBICtempExpAVC; return(OK); case VBIC_MOD_RTH: value->rValue = here->VBICthermalResist; return(OK); case VBIC_MOD_CTH: value->rValue = here->VBICthermalCapacitance; return(OK); case VBIC_MOD_VRT: value->rValue = here->VBICpunchThroughVoltageBC; return(OK); case VBIC_MOD_ART: value->rValue = here->VBICdeplCapCoeff1; return(OK); case VBIC_MOD_CCSO: value->rValue = here->VBICfixedCapacitanceCS; return(OK); case VBIC_MOD_QBM: value->rValue = here->VBICsgpQBselector; return(OK); case VBIC_MOD_NKF: value->rValue = here->VBIChighCurrentBetaRolloff; return(OK); case VBIC_MOD_XIKF: value->rValue = here->VBICtempExpIKF; return(OK); case VBIC_MOD_XRCX: value->rValue = here->VBICtempExpRCX; return(OK); case VBIC_MOD_XRBX: value->rValue = here->VBICtempExpRBX; return(OK); case VBIC_MOD_XRBP: value->rValue = here->VBICtempExpRBP; return(OK); case VBIC_MOD_ISRR: value->rValue = here->VBICsepISRR; return(OK); case VBIC_MOD_XISR: value->rValue = here->VBICtempExpXISR; return(OK); case VBIC_MOD_DEAR: value->rValue = here->VBICdear; return(OK); case VBIC_MOD_EAP: value->rValue = here->VBICeap; return(OK); case VBIC_MOD_VBBE: value->rValue = here->VBICvbbe; return(OK); case VBIC_MOD_NBBE: value->rValue = here->VBICnbbe; return(OK); case VBIC_MOD_IBBE: value->rValue = here->VBICibbe; return(OK); case VBIC_MOD_TVBBE1: value->rValue = here->VBICtvbbe1; return(OK); case VBIC_MOD_TVBBE2: value->rValue = here->VBICtvbbe2; return(OK); case VBIC_MOD_TNBBE: value->rValue = here->VBICtnbbe; return(OK); case VBIC_MOD_EBBE: value->rValue = here->VBICebbe; return(OK); case VBIC_MOD_DTEMP: value->rValue = here->VBIClocTempDiff; return(OK); case VBIC_MOD_VERS: value->rValue = here->VBICrevVersion; return(OK); case VBIC_MOD_VREF: value->rValue = here->VBICrefVersion; return(OK); case VBIC_MOD_VBE_MAX: value->rValue = here->VBICvbeMax; return(OK); case VBIC_MOD_VBC_MAX: value->rValue = here->VBICvbcMax; return(OK); case VBIC_MOD_VCE_MAX: value->rValue = here->VBICvceMax; return(OK); case VBIC_MOD_TYPE: if (here->VBICtype == NPN) value->sValue = "npn"; else value->sValue = "pnp"; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v1/0000755000265600020320000000000012264261706017517 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3v1/b3v1par.c0000644000265600020320000000646112264261473021151 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3par.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM3v1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM3v1instance *here = (BSIM3v1instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM3v1_W: here->BSIM3v1w = value->rValue*scale; here->BSIM3v1wGiven = TRUE; break; case BSIM3v1_L: here->BSIM3v1l = value->rValue*scale; here->BSIM3v1lGiven = TRUE; break; case BSIM3v1_M: here->BSIM3v1m = value->rValue; here->BSIM3v1mGiven = TRUE; break; case BSIM3v1_AS: here->BSIM3v1sourceArea = value->rValue*scale*scale; here->BSIM3v1sourceAreaGiven = TRUE; break; case BSIM3v1_AD: here->BSIM3v1drainArea = value->rValue*scale*scale; here->BSIM3v1drainAreaGiven = TRUE; break; case BSIM3v1_PS: here->BSIM3v1sourcePerimeter = value->rValue*scale; here->BSIM3v1sourcePerimeterGiven = TRUE; break; case BSIM3v1_PD: here->BSIM3v1drainPerimeter = value->rValue*scale; here->BSIM3v1drainPerimeterGiven = TRUE; break; case BSIM3v1_NRS: here->BSIM3v1sourceSquares = value->rValue; here->BSIM3v1sourceSquaresGiven = TRUE; break; case BSIM3v1_NRD: here->BSIM3v1drainSquares = value->rValue; here->BSIM3v1drainSquaresGiven = TRUE; break; case BSIM3v1_OFF: here->BSIM3v1off = value->iValue; break; case BSIM3v1_IC_VBS: here->BSIM3v1icVBS = value->rValue; here->BSIM3v1icVBSGiven = TRUE; break; case BSIM3v1_IC_VDS: here->BSIM3v1icVDS = value->rValue; here->BSIM3v1icVDSGiven = TRUE; break; case BSIM3v1_IC_VGS: here->BSIM3v1icVGS = value->rValue; here->BSIM3v1icVGSGiven = TRUE; break; case BSIM3v1_NQSMOD: here->BSIM3v1nqsMod = value->iValue; here->BSIM3v1nqsModGiven = TRUE; break; case BSIM3v1_IC: switch(value->v.numValue){ case 3: here->BSIM3v1icVBS = *(value->v.vec.rVec+2); here->BSIM3v1icVBSGiven = TRUE; case 2: here->BSIM3v1icVGS = *(value->v.vec.rVec+1); here->BSIM3v1icVGSGiven = TRUE; case 1: here->BSIM3v1icVDS = *(value->v.vec.rVec); here->BSIM3v1icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/bsim3v1init.c0000644000265600020320000000432712264261473022042 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim3v1itf.h" #include "bsim3v1ext.h" #include "bsim3v1init.h" SPICEdev BSIM3v1info = { { "BSIM3v1", "Berkeley Short Channel IGFET Model Version-3 (3.1)", &BSIM3v1nSize, &BSIM3v1nSize, BSIM3v1names, &BSIM3v1pTSize, BSIM3v1pTable, &BSIM3v1mPTSize, BSIM3v1mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ BSIM3v1param, /* DEVmodParam */ BSIM3v1mParam, /* DEVload */ BSIM3v1load, /* DEVsetup */ BSIM3v1setup, /* DEVunsetup */ BSIM3v1unsetup, /* DEVpzSetup */ BSIM3v1setup, /* DEVtemperature*/ BSIM3v1temp, /* DEVtrunc */ BSIM3v1trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ BSIM3v1acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ BSIM3v1destroy, /* DEVmodDelete */ BSIM3v1mDelete, /* DEVdelete */ BSIM3v1delete, /* DEVsetic */ BSIM3v1getic, /* DEVask */ BSIM3v1ask, /* DEVmodAsk */ BSIM3v1mAsk, /* DEVpzLoad */ BSIM3v1pzLoad, /* DEVconvTest */ BSIM3v1convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ BSIM3v1noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &BSIM3v1iSize, /* DEVmodSize */ &BSIM3v1mSize }; SPICEdev * get_bsim3v1_info(void) { return &BSIM3v1info; } ngspice-26/src/spicelib/devices/bsim3v1/b3v1.c0000644000265600020320000007151012264261473020443 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim3v1def.h" #include "ngspice/suffix.h" IFparm BSIM3v1pTable[] = { /* parameters */ IOP( "l", BSIM3v1_L, IF_REAL , "Length"), IOP( "w", BSIM3v1_W, IF_REAL , "Width"), IOP( "m", BSIM3v1_M, IF_REAL , "Parallel multiplier"), IOP( "ad", BSIM3v1_AD, IF_REAL , "Drain area"), IOP( "as", BSIM3v1_AS, IF_REAL , "Source area"), IOP( "pd", BSIM3v1_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM3v1_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM3v1_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM3v1_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM3v1_OFF, IF_FLAG , "Device is initially off"), IOP( "nqsmod", BSIM3v1_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IP( "ic", BSIM3v1_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM3v1_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM3v1_GM, IF_REAL, "Gm"), OP( "gds", BSIM3v1_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM3v1_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM3v1_VON, IF_REAL, "Vth"), OP( "id", BSIM3v1_CD, IF_REAL, "Ids"), OP( "vbs", BSIM3v1_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM3v1_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM3v1_VDS, IF_REAL, "Vds"), }; IFparm BSIM3v1mPTable[] = { /* model parameters */ IOP( "capmod", BSIM3v1_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "nqsmod", BSIM3v1_MOD_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "mobmod", BSIM3v1_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", BSIM3v1_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "paramchk", BSIM3v1_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM3v1_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM3v1_MOD_VERSION, IF_REAL, " parameter for model version"), IOP( "tox", BSIM3v1_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "cdsc", BSIM3v1_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM3v1_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM3v1_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM3v1_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM3v1_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM3v1_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM3v1_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM3v1_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM3v1_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM3v1_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM3v1_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM3v1_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM3v1_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM3v1_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "nch", BSIM3v1_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", BSIM3v1_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM3v1_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM3v1_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM3v1_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM3v1_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM3v1_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM3v1_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM3v1_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM3v1_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM3v1_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM3v1_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM3v1_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM3v1_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM3v1_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", BSIM3v1_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", BSIM3v1_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM3v1_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM3v1_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM3v1_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM3v1_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM3v1_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM3v1_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM3v1_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM3v1_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM3v1_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM3v1_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM3v1_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM3v1_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM3v1_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM3v1_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM3v1_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", BSIM3v1_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", BSIM3v1_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM3v1_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", BSIM3v1_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM3v1_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM3v1_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM3v1_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM3v1_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "elm", BSIM3v1_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"), IOP( "delta", BSIM3v1_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM3v1_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM3v1_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", BSIM3v1_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM3v1_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM3v1_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM3v1_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM3v1_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM3v1_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM3v1_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM3v1_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM3v1_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pscbe1", BSIM3v1_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM3v1_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM3v1_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "js", BSIM3v1_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"), IOP( "jsw", BSIM3v1_MOD_JSW, IF_REAL, "Sidewall junction reverse saturation current density"), IOP( "pb", BSIM3v1_MOD_PB, IF_REAL, "Source/drain junction built-in potential"), IOP( "nj", BSIM3v1_MOD_NJ, IF_REAL, "Source/drain junction emission coefficient"), IOP( "xti", BSIM3v1_MOD_XTI, IF_REAL, "Junction current temperature exponent"), IOP( "mj", BSIM3v1_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"), IOP( "pbsw", BSIM3v1_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"), IOP( "mjsw", BSIM3v1_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP( "pbswg", BSIM3v1_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", BSIM3v1_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cj", BSIM3v1_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"), IOP( "vfbcv", BSIM3v1_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "cjsw", BSIM3v1_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit periphery"), IOP( "cjswg", BSIM3v1_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "lint", BSIM3v1_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM3v1_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "lln", BSIM3v1_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM3v1_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwn", BSIM3v1_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM3v1_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lmin", BSIM3v1_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM3v1_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM3v1_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM3v1_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM3v1_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM3v1_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM3v1_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wln", BSIM3v1_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM3v1_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwn", BSIM3v1_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM3v1_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wmin", BSIM3v1_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM3v1_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM3v1_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM3v1_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM3v1_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM3v1_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", BSIM3v1_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", BSIM3v1_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM3v1_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM3v1_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM3v1_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM3v1_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", BSIM3v1_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM3v1_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "lcdsc", BSIM3v1_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM3v1_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM3v1_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM3v1_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM3v1_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM3v1_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM3v1_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM3v1_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM3v1_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM3v1_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM3v1_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM3v1_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM3v1_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM3v1_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lnch", BSIM3v1_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lngate", BSIM3v1_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM3v1_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM3v1_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM3v1_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM3v1_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM3v1_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM3v1_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM3v1_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM3v1_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM3v1_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM3v1_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM3v1_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM3v1_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM3v1_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", BSIM3v1_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", BSIM3v1_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM3v1_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM3v1_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM3v1_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM3v1_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM3v1_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM3v1_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM3v1_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM3v1_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM3v1_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM3v1_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM3v1_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM3v1_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM3v1_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM3v1_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM3v1_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lu0", BSIM3v1_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM3v1_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM3v1_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lelm", BSIM3v1_MOD_LELM, IF_REAL, "Length dependence of elm"), IOP( "ldelta", BSIM3v1_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM3v1_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwg", BSIM3v1_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM3v1_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM3v1_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM3v1_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM3v1_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM3v1_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM3v1_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM3v1_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM3v1_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpscbe1", BSIM3v1_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM3v1_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM3v1_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM3v1_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM3v1_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM3v1_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM3v1_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM3v1_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM3v1_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM3v1_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappa", BSIM3v1_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"), IOP( "lcf", BSIM3v1_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM3v1_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM3v1_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM3v1_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lbeta0", BSIM3v1_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lvfbcv", BSIM3v1_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "wcdsc", BSIM3v1_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM3v1_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM3v1_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM3v1_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM3v1_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM3v1_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM3v1_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM3v1_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM3v1_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM3v1_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM3v1_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM3v1_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM3v1_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM3v1_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wnch", BSIM3v1_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wngate", BSIM3v1_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM3v1_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM3v1_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM3v1_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM3v1_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM3v1_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM3v1_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM3v1_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM3v1_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM3v1_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM3v1_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM3v1_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM3v1_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM3v1_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", BSIM3v1_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", BSIM3v1_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM3v1_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM3v1_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM3v1_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM3v1_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM3v1_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM3v1_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM3v1_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM3v1_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM3v1_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM3v1_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM3v1_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM3v1_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM3v1_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM3v1_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM3v1_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wu0", BSIM3v1_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM3v1_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM3v1_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "welm", BSIM3v1_MOD_WELM, IF_REAL, "Width dependence of elm"), IOP( "wdelta", BSIM3v1_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM3v1_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwg", BSIM3v1_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM3v1_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM3v1_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM3v1_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM3v1_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM3v1_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM3v1_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM3v1_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM3v1_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpscbe1", BSIM3v1_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM3v1_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM3v1_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM3v1_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM3v1_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM3v1_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM3v1_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM3v1_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM3v1_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM3v1_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappa", BSIM3v1_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"), IOP( "wcf", BSIM3v1_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM3v1_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM3v1_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM3v1_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "wbeta0", BSIM3v1_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wvfbcv", BSIM3v1_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "pcdsc", BSIM3v1_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM3v1_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM3v1_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM3v1_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM3v1_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM3v1_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM3v1_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM3v1_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM3v1_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM3v1_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM3v1_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM3v1_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM3v1_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM3v1_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pnch", BSIM3v1_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pngate", BSIM3v1_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM3v1_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM3v1_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM3v1_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM3v1_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM3v1_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM3v1_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM3v1_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM3v1_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM3v1_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM3v1_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM3v1_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM3v1_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM3v1_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", BSIM3v1_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", BSIM3v1_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM3v1_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM3v1_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM3v1_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM3v1_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM3v1_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM3v1_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM3v1_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM3v1_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM3v1_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM3v1_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM3v1_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM3v1_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM3v1_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM3v1_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM3v1_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pu0", BSIM3v1_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM3v1_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM3v1_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pelm", BSIM3v1_MOD_PELM, IF_REAL, "Cross-term dependence of elm"), IOP( "pdelta", BSIM3v1_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM3v1_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwg", BSIM3v1_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM3v1_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM3v1_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM3v1_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM3v1_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM3v1_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM3v1_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM3v1_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM3v1_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppscbe1", BSIM3v1_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM3v1_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM3v1_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM3v1_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM3v1_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM3v1_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM3v1_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM3v1_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM3v1_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM3v1_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappa", BSIM3v1_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"), IOP( "pcf", BSIM3v1_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM3v1_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM3v1_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM3v1_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "pbeta0", BSIM3v1_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pvfbcv", BSIM3v1_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "noia", BSIM3v1_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM3v1_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM3v1_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", BSIM3v1_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM3v1_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM3v1_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM3v1_MOD_KF, IF_REAL, "Flicker noise coefficient"), IP( "nmos", BSIM3v1_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM3v1_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), /* serban */ IOP( "hdif", BSIM3v1_MOD_HDIF, IF_REAL, "S/D junction extension"), }; char *BSIM3v1names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM3v1nSize = NUMELEMS(BSIM3v1names); int BSIM3v1pTSize = NUMELEMS(BSIM3v1pTable); int BSIM3v1mPTSize = NUMELEMS(BSIM3v1mPTable); int BSIM3v1iSize = sizeof(BSIM3v1instance); int BSIM3v1mSize = sizeof(BSIM3v1model); ngspice-26/src/spicelib/devices/bsim3v1/bsim3v1init.h0000644000265600020320000000042612264261473022043 0ustar andreasadmin#ifndef _BSIM3v1INIT_H #define _BSIM3v1INIT_H extern IFparm BSIM3v1pTable[ ]; extern IFparm BSIM3v1mPTable[ ]; extern char *BSIM3v1names[ ]; extern int BSIM3v1pTSize; extern int BSIM3v1mPTSize; extern int BSIM3v1nSize; extern int BSIM3v1iSize; extern int BSIM3v1mSize; #endif ngspice-26/src/spicelib/devices/bsim3v1/b3v1ld.c0000644000265600020320000027256012264261473020773 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3ld.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Mansun Chan (1995) * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 int BSIM3v1load(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; double SourceSatCurrent, DrainSatCurrent; double ag0, qgd, qgs, qgb, von, cbhat, VgstNVt, ExpVgst = 0.0; double cdrain, cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVd, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; double gcsgb, gcssb, PhiB, PhiBSW, MJ, MJSW, PhiBSWG, MJSWG; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double qgate = 0.0, qbulk = 0.0, qdrn = 0.0, qsrc, cqgate, cqbulk, cqdrn; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtm; double n, dn_dVb, Vtm; double ExpArg, V0; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4; double T5; double T6; double T7; double T8; double T9; double T10; double T11, T12; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; #ifndef NOBYPASS double tempv; #endif double a1; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds; double dAbulk_dVg, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff = 0.0, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double qcheq, qdef, gqdef, cqdef, cqcheq, gtau_diff, gtau_drift; double gcqdb,gcqsb,gcqgb,gcqbb; double dxpart, sxpart; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double Cgg, Cgd, Cgb; double Csg, Csd, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVd, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double m = 1.0; struct bsim3v1SizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded = 0, error; for (; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here != NULL; here = here->BSIM3v1nextInstance) { Check = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->BSIM3v1vbs); vgs = *(ckt->CKTstate0 + here->BSIM3v1vgs); vds = *(ckt->CKTstate0 + here->BSIM3v1vds); qdef = *(ckt->CKTstate0 + here->BSIM3v1qcdump); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->BSIM3v1vbs); vgs = *(ckt->CKTstate1 + here->BSIM3v1vgs); vds = *(ckt->CKTstate1 + here->BSIM3v1vds); qdef = *(ckt->CKTstate1 + here->BSIM3v1qcdump); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM3v1off) { vds = model->BSIM3v1type * here->BSIM3v1icVDS; vgs = model->BSIM3v1type * here->BSIM3v1icVGS; vbs = model->BSIM3v1type * here->BSIM3v1icVBS; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = pParam->BSIM3v1vth0 + 0.1; vds = 0.1; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM3v1off)) { qdef = vbs = vgs = vds = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM3v1vbs) = *(ckt->CKTstate1 + here->BSIM3v1vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v1vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v1vbs))); *(ckt->CKTstate0 + here->BSIM3v1vgs) = *(ckt->CKTstate1 + here->BSIM3v1vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v1vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v1vgs))); *(ckt->CKTstate0 + here->BSIM3v1vds) = *(ckt->CKTstate1 + here->BSIM3v1vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v1vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v1vds))); *(ckt->CKTstate0 + here->BSIM3v1vbd) = *(ckt->CKTstate0 + here->BSIM3v1vbs) - *(ckt->CKTstate0 + here->BSIM3v1vds); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v1qcdump)) -(xfact * (*(ckt->CKTstate2 + here->BSIM3v1qcdump))); } else { #endif /* PREDICTOR */ vbs = model->BSIM3v1type * (*(ckt->CKTrhsOld + here->BSIM3v1bNode) - *(ckt->CKTrhsOld + here->BSIM3v1sNodePrime)); vgs = model->BSIM3v1type * (*(ckt->CKTrhsOld + here->BSIM3v1gNode) - *(ckt->CKTrhsOld + here->BSIM3v1sNodePrime)); vds = model->BSIM3v1type * (*(ckt->CKTrhsOld + here->BSIM3v1dNodePrime) - *(ckt->CKTrhsOld + here->BSIM3v1sNodePrime)); qdef = *(ckt->CKTrhsOld + here->BSIM3v1qNode); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v1vgs) - *(ckt->CKTstate0 + here->BSIM3v1vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v1vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v1vds); delvgd = vgd - vgdo; if (here->BSIM3v1mode >= 0) { cdhat = here->BSIM3v1cd - here->BSIM3v1gbd * delvbd + here->BSIM3v1gmbs * delvbs + here->BSIM3v1gm * delvgs + here->BSIM3v1gds * delvds; } else { cdhat = here->BSIM3v1cd - (here->BSIM3v1gbd - here->BSIM3v1gmbs) * delvbd - here->BSIM3v1gm * delvgd + here->BSIM3v1gds * delvds; } cbhat = here->BSIM3v1cbs + here->BSIM3v1cbd + here->BSIM3v1gbd * delvbd + here->BSIM3v1gbs * delvbs; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->BSIM3v1vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->BSIM3v1vbd))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->BSIM3v1vgs))) + ckt->CKTvoltTol))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->BSIM3v1vds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->BSIM3v1cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->BSIM3v1cd)) + ckt->CKTabstol)) { tempv = MAX(fabs(cbhat),fabs(here->BSIM3v1cbs + here->BSIM3v1cbd)) + ckt->CKTabstol; if ((fabs(cbhat - (here->BSIM3v1cbs + here->BSIM3v1cbd)) < ckt->CKTreltol * tempv)) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->BSIM3v1vbs); vbd = *(ckt->CKTstate0 + here->BSIM3v1vbd); vgs = *(ckt->CKTstate0 + here->BSIM3v1vgs); vds = *(ckt->CKTstate0 + here->BSIM3v1vds); qcheq = *(ckt->CKTstate0 + here->BSIM3v1qcheq); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->BSIM3v1mode * (here->BSIM3v1cd + here->BSIM3v1cbd); if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } } #endif /*NOBYPASS*/ von = here->BSIM3v1von; if (*(ckt->CKTstate0 + here->BSIM3v1vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0+here->BSIM3v1vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM3v1vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0+here->BSIM3v1vds))); vgs = vgd + vds; } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM3v1vbs), CONSTvt0, model->BSIM3v1vcrit, &Check); vbd = vbs - vds; } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM3v1vbd), CONSTvt0, model->BSIM3v1vcrit, &Check); vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; m = here->BSIM3v1m; /* the following code has been changed for the calculation of S/B and D/B diodes*/ if ((here->BSIM3v1sourceArea <= 0.0) && (here->BSIM3v1sourcePerimeter <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM3v1sourceArea * model->BSIM3v1jctTempSatCurDensity + here->BSIM3v1sourcePerimeter * model->BSIM3v1jctSidewallTempSatCurDensity; } Nvtm = model->BSIM3v1vtm * model->BSIM3v1jctEmissionCoeff; if (SourceSatCurrent <= 0.0) { here->BSIM3v1gbs = ckt->CKTgmin; here->BSIM3v1cbs = here->BSIM3v1gbs * vbs; } else if (vbs < 0.5) { evbs = exp(vbs / Nvtm); here->BSIM3v1gbs = SourceSatCurrent * evbs / Nvtm + ckt->CKTgmin; here->BSIM3v1cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { evbs = exp(0.5 / Nvtm); T0 = SourceSatCurrent * evbs / Nvtm; here->BSIM3v1gbs = T0 + ckt->CKTgmin; here->BSIM3v1cbs = SourceSatCurrent * (evbs - 1.0) + T0 * (vbs - 0.5) + ckt->CKTgmin * vbs; } if ((here->BSIM3v1drainArea <= 0.0) && (here->BSIM3v1drainPerimeter <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM3v1drainArea * model->BSIM3v1jctTempSatCurDensity + here->BSIM3v1drainPerimeter * model->BSIM3v1jctSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) { here->BSIM3v1gbd = ckt->CKTgmin; here->BSIM3v1cbd = here->BSIM3v1gbd * vbd; } else if (vbd < 0.5) { evbd = exp(vbd / Nvtm); here->BSIM3v1gbd = DrainSatCurrent * evbd / Nvtm + ckt->CKTgmin; here->BSIM3v1cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { evbd = exp(0.5 / Nvtm); T0 = DrainSatCurrent * evbd / Nvtm; here->BSIM3v1gbd = T0 + ckt->CKTgmin; here->BSIM3v1cbd = DrainSatCurrent * (evbd - 1.0) + T0 * (vbd - 0.5) + ckt->CKTgmin * vbd; } /* S/B and D/B diodes code change ends */ if (vds >= 0.0) { /* normal mode */ here->BSIM3v1mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; } else { /* inverse mode */ here->BSIM3v1mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; } ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; T0 = Vbs - pParam->BSIM3v1vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * pParam->BSIM3v1vbsc); Vbseff = pParam->BSIM3v1vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); if (Vbseff < Vbs) { Vbseff = Vbs; } /* Added to avoid the possible numerical problems due to computer accuracy. See comments for diffVds */ if (Vbseff > 0.0) { T0 = pParam->BSIM3v1phi / (pParam->BSIM3v1phi + Vbseff); Phis = pParam->BSIM3v1phi * T0; dPhis_dVb = -T0 * T0; sqrtPhis = pParam->BSIM3v1phis3 / (pParam->BSIM3v1phi + 0.5 * Vbseff); dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis / pParam->BSIM3v1phis3; } else { Phis = pParam->BSIM3v1phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; } Xdep = pParam->BSIM3v1Xdep0 * sqrtPhis / pParam->BSIM3v1sqrtPhi; dXdep_dVb = (pParam->BSIM3v1Xdep0 / pParam->BSIM3v1sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM3v1leff; Vtm = model->BSIM3v1vtm; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM3v1vbi - pParam->BSIM3v1phi; T0 = pParam->BSIM3v1dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3v1dvt2; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3v1dvt2 * T4 * T4; } lt1 = model->BSIM3v1factor1 * T3 * T1; dlt1_dVb = model->BSIM3v1factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM3v1dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM3v1dvt2w; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM3v1dvt2w * T4 * T4; } ltw = model->BSIM3v1factor1 * T3 * T1; dltw_dVb = model->BSIM3v1factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->BSIM3v1dvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->BSIM3v1thetavth = pParam->BSIM3v1dvt0 * Theta0; Delt_vth = here->BSIM3v1thetavth * V0; dDelt_vth_dVb = pParam->BSIM3v1dvt0 * dTheta0_dVb * V0; T0 = -0.5 * pParam->BSIM3v1dvt1w * pParam->BSIM3v1weff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->BSIM3v1dvt0w * T2; T2 = T0 * V0; dT2_dVb = pParam->BSIM3v1dvt0w * dT2_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM3v1tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM3v1nlx / Leff); T1 = pParam->BSIM3v1k1 * (T0 - 1.0) * pParam->BSIM3v1sqrtPhi + (pParam->BSIM3v1kt1 + pParam->BSIM3v1kt1l / Leff + pParam->BSIM3v1kt2 * Vbseff) * TempRatio; tmp2 = model->BSIM3v1tox * pParam->BSIM3v1phi / (pParam->BSIM3v1weff + pParam->BSIM3v1w0); T3 = pParam->BSIM3v1eta0 + pParam->BSIM3v1etab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM3v1theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Vth = model->BSIM3v1type * pParam->BSIM3v1vth0 + pParam->BSIM3v1k1 * (sqrtPhis - pParam->BSIM3v1sqrtPhi) - pParam->BSIM3v1k2 * Vbseff - Delt_vth - T2 + (pParam->BSIM3v1k3 + pParam->BSIM3v1k3b * Vbseff) * tmp2 + T1 - DIBL_Sft; here->BSIM3v1von = Vth; dVth_dVb = pParam->BSIM3v1k1 * dsqrtPhis_dVb - pParam->BSIM3v1k2 - dDelt_vth_dVb - dT2_dVb + pParam->BSIM3v1k3b * tmp2 - pParam->BSIM3v1etab * Vds * pParam->BSIM3v1theta0vb0 * T4 + pParam->BSIM3v1kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp2 = pParam->BSIM3v1nfactor * EPSSI / Xdep; tmp3 = pParam->BSIM3v1cdsc + pParam->BSIM3v1cdscb * Vbseff + pParam->BSIM3v1cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM3v1cit) / model->BSIM3v1cox; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3v1cdscb * Theta0) / model->BSIM3v1cox; dn_dVd = pParam->BSIM3v1cdscd * Theta0 / model->BSIM3v1cox; } else /* avoid discontinuity problems caused by tmp4 */ { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3v1cdscb * Theta0) / model->BSIM3v1cox * T0; dn_dVd = pParam->BSIM3v1cdscd * Theta0 / model->BSIM3v1cox * T0; } /* Poly Gate Si Depletion Effect */ T0 = pParam->BSIM3v1vfb + pParam->BSIM3v1phi; if ((pParam->BSIM3v1ngate > 1.e18) && (pParam->BSIM3v1ngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->BSIM3v1ngate / (model->BSIM3v1cox * model->BSIM3v1cox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Vgst = Vgs_eff - Vth; /* Effective Vgst (Vgsteff) Calculation */ T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->BSIM3v1voff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (ExpArg > EXP_THRESHOLD) { T0 = (Vgst - pParam->BSIM3v1voff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->BSIM3v1cdep0 / model->BSIM3v1cox * ExpVgst; dVgsteff_dVg = Vgsteff / (n * Vtm); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + T0 * Vtm * dn_dVd); dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg *= dVgs_eff_dVg; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; dT2_dVg = -model->BSIM3v1cox / (Vtm * pParam->BSIM3v1cdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; Vgsteff = T1 / T2; T3 = T2 * T2; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; } /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM3v1sqrtPhi; Weff = pParam->BSIM3v1weff - 2.0 * (pParam->BSIM3v1dwg * Vgsteff + pParam->BSIM3v1dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM3v1dwg; dWeff_dVb = -2.0 * pParam->BSIM3v1dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->BSIM3v1prwg * Vgsteff + pParam->BSIM3v1prwb * T9; if (T0 >= -0.9) { Rds = pParam->BSIM3v1rds0 * (1.0 + T0); dRds_dVg = pParam->BSIM3v1rds0 * pParam->BSIM3v1prwg; dRds_dVb = pParam->BSIM3v1rds0 * pParam->BSIM3v1prwb * dsqrtPhis_dVb; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = pParam->BSIM3v1rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = pParam->BSIM3v1rds0 * pParam->BSIM3v1prwg * T1; dRds_dVb = pParam->BSIM3v1rds0 * pParam->BSIM3v1prwb * dsqrtPhis_dVb * T1; } /* Calculate Abulk */ T1 = 0.5 * pParam->BSIM3v1k1 / sqrtPhis; dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM3v1xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM3v1a0 * T5; tmp3 = pParam->BSIM3v1weff + pParam->BSIM3v1b1; tmp4 = pParam->BSIM3v1b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM3v1ags * pParam->BSIM3v1a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) /* added to avoid the problems caused by Abulk */ { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; dAbulk_dVb *= T9 * T9; } T2 = pParam->BSIM3v1keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM3v1keta * T0 * T0; } else /* added to avoid the problems caused by Keta */ { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM3v1keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM3v1mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM3v1ua + pParam->BSIM3v1uc * Vbseff; T3 = T0 / model->BSIM3v1tox; T5 = T3 * (T2 + pParam->BSIM3v1ub * T3); dDenomi_dVg = (T2 + 2.0 * pParam->BSIM3v1ub * T3) / model->BSIM3v1tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3v1uc * T3; } else if (model->BSIM3v1mobMod == 2) { T5 = Vgsteff / model->BSIM3v1tox * (pParam->BSIM3v1ua + pParam->BSIM3v1uc * Vbseff + pParam->BSIM3v1ub * Vgsteff / model->BSIM3v1tox); dDenomi_dVg = (pParam->BSIM3v1ua + pParam->BSIM3v1uc * Vbseff + 2.0 * pParam->BSIM3v1ub * Vgsteff / model->BSIM3v1tox) / model->BSIM3v1tox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * pParam->BSIM3v1uc / model->BSIM3v1tox; } else { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM3v1uc * Vbseff; T3 = T0 / model->BSIM3v1tox; T4 = T3 * (pParam->BSIM3v1ua + pParam->BSIM3v1ub * T3); T5 = T4 * T2; dDenomi_dVg = (pParam->BSIM3v1ua + 2.0 * pParam->BSIM3v1ub * T3) * T2 / model->BSIM3v1tox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM3v1uc * T4; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM3v1ueff = ueff = pParam->BSIM3v1u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * pParam->BSIM3v1vsattemp * model->BSIM3v1cox; WVCoxRds = WVCox * Rds; Esat = 2.0 * pParam->BSIM3v1vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM3v1a1; if (a1 == 0.0) { Lambda = pParam->BSIM3v1a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->BSIM3v1a2; T1 = T0 - pParam->BSIM3v1a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM3v1a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3v1a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM3v1a2 + pParam->BSIM3v1a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM3v1a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM3v1a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM3v1vdsat = Vdsat; /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->BSIM3v1delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM3v1delta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->BSIM3v1delta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; if (Vdseff > Vds) Vdseff = Vds; /* This code is added to fixed the problem caused by computer precision when Vds is very close to Vdseff. */ diffVds = Vds - Vdseff; /* Calculate VACLM */ if ((pParam->BSIM3v1pclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->BSIM3v1pclm * Abulk * pParam->BSIM3v1litl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg = -T0 / Abulk * dAbulk_dVg; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg); dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM3v1thetaRout > 0.0) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM3v1thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM3v1pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM3v1pdiblb) * T3; dVADIBL_dVd *= T3; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM3v1pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate VA */ T8 = pParam->BSIM3v1pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; /* Calculate VASCBE */ if (pParam->BSIM3v1pscbe2 > 0.0) { if (diffVds > pParam->BSIM3v1pscbe1 * pParam->BSIM3v1litl / EXP_THRESHOLD) { T0 = pParam->BSIM3v1pscbe1 * pParam->BSIM3v1litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM3v1pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM3v1pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Calculate Ids */ CoxWovL = model->BSIM3v1cox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; T9 = diffVds / Va; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; Gds += Gm * dVgsteff_dVd; Gmb += Gm * dVgsteff_dVb; Gm *= dVgsteff_dVg; Gmb *= dVbseff_dVb; /* calculate substrate current Isub */ if ((pParam->BSIM3v1alpha0 <= 0.0) || (pParam->BSIM3v1beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = pParam->BSIM3v1alpha0 / Leff; if (diffVds > pParam->BSIM3v1beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM3v1beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = -T3 * (1.0 - dVdseff_dVd); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } Isub = T1 * Idsa; Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg; Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd; Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; /* bug fixing */ } cdrain = Ids; here->BSIM3v1gds = Gds; here->BSIM3v1gm = Gm; here->BSIM3v1gmbs = Gmb; here->BSIM3v1gbbs = Gbb; here->BSIM3v1gbgs = Gbg; here->BSIM3v1gbds = Gbd; here->BSIM3v1csub = Isub - (Gbb * Vbseff + Gbd * Vds + Gbg * Vgs); /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm); here->BSIM3v1qinv = -model->BSIM3v1cox * Weff * Leff * T1; if ((model->BSIM3v1xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM3v1cggb = here->BSIM3v1cgsb = here->BSIM3v1cgdb = 0.0; here->BSIM3v1cdgb = here->BSIM3v1cdsb = here->BSIM3v1cddb = 0.0; here->BSIM3v1cbgb = here->BSIM3v1cbsb = here->BSIM3v1cbdb = 0.0; here->BSIM3v1cqdb = here->BSIM3v1cqsb = here->BSIM3v1cqgb = here->BSIM3v1cqbb = 0.0; here->BSIM3v1gtau = 0.0; goto finished; } else if (model->BSIM3v1capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = pParam->BSIM3v1phi - Phis; dVbseff_dVb = -dPhis_dVb; } Vfb = pParam->BSIM3v1vfbcv; Vth = Vfb + pParam->BSIM3v1phi + pParam->BSIM3v1k1 * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM3v1k1 * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM3v1cox * pParam->BSIM3v1weffCV * pParam->BSIM3v1leffCV; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM3v1cggb = CoxWL * dVgs_eff_dVg; here->BSIM3v1cgdb = 0.0; here->BSIM3v1cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3v1cdgb = 0.0; here->BSIM3v1cddb = 0.0; here->BSIM3v1cdsb = 0.0; here->BSIM3v1cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM3v1cbdb = 0.0; here->BSIM3v1cbsb = -here->BSIM3v1cgsb; } else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM3v1k1; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM3v1k1 * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM3v1cggb = T0 * dVgs_eff_dVg; here->BSIM3v1cgdb = 0.0; here->BSIM3v1cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM3v1cdgb = 0.0; here->BSIM3v1cddb = 0.0; here->BSIM3v1cdsb = 0.0; here->BSIM3v1cbgb = -here->BSIM3v1cggb; here->BSIM3v1cbdb = 0.0; here->BSIM3v1cbsb = -here->BSIM3v1cgsb; } else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v1abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v1abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; if (model->BSIM3v1xpart > 0.5) { /* 0/100 Charge petition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM3v1cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v1cgsb = -(here->BSIM3v1cggb + T2); here->BSIM3v1cgdb = 0.0; here->BSIM3v1cdgb = 0.0; here->BSIM3v1cddb = 0.0; here->BSIM3v1cdsb = 0.0; here->BSIM3v1cbgb = -(here->BSIM3v1cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v1cbsb = -(here->BSIM3v1cbgb + T3); here->BSIM3v1cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM3v1cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v1cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v1cgsb = -(here->BSIM3v1cggb + T11 + here->BSIM3v1cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM3v1cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM3v1cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM3v1cdsb = -(here->BSIM3v1cdgb + T12 + here->BSIM3v1cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM3v1cbgb = -(here->BSIM3v1cggb + here->BSIM3v1cdgb + T10); here->BSIM3v1cbdb = -(here->BSIM3v1cgdb + here->BSIM3v1cddb + T12); here->BSIM3v1cbsb = -(here->BSIM3v1cgsb + here->BSIM3v1cdsb + T0); } } else if (model->BSIM3v1xpart < 0.5) { /* 40/60 Charge petition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM3v1cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v1cgsb = -(here->BSIM3v1cggb + T2); here->BSIM3v1cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM3v1cdgb = -T3 * dVgs_eff_dVg; here->BSIM3v1cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM3v1cdsb = -(T4 + here->BSIM3v1cdgb); here->BSIM3v1cbgb = -(here->BSIM3v1cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v1cbsb = -(here->BSIM3v1cbgb + T3); here->BSIM3v1cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3v1cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v1cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v1cgsb = -(here->BSIM3v1cggb + here->BSIM3v1cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM3v1cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM3v1cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM3v1cdsb = -(here->BSIM3v1cdgb + T10 + here->BSIM3v1cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - here->BSIM3v1cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM3v1cddb; tmp = -(T10 + T11 + T12); here->BSIM3v1cbgb = -(here->BSIM3v1cggb + here->BSIM3v1cdgb + T12); here->BSIM3v1cbdb = -(here->BSIM3v1cgdb + here->BSIM3v1cddb + T11); here->BSIM3v1cbsb = -(here->BSIM3v1cgsb + here->BSIM3v1cdsb + tmp); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM3v1cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM3v1cgsb = -(here->BSIM3v1cggb + T2); here->BSIM3v1cgdb = 0.0; here->BSIM3v1cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM3v1cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM3v1cdsb = -(T4 + here->BSIM3v1cdgb); here->BSIM3v1cbgb = -(here->BSIM3v1cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM3v1cbsb = -(here->BSIM3v1cbgb + T3); here->BSIM3v1cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM3v1phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM3v1cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM3v1cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM3v1cgsb = -(here->BSIM3v1cggb + here->BSIM3v1cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM3v1cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM3v1cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM3v1cdsb = -(here->BSIM3v1cdgb + T12 + here->BSIM3v1cddb); here->BSIM3v1cbgb = -(here->BSIM3v1cggb + 2.0 * here->BSIM3v1cdgb); here->BSIM3v1cbdb = -(here->BSIM3v1cgdb + 2.0 * here->BSIM3v1cddb); here->BSIM3v1cbsb = -(here->BSIM3v1cgsb + 2.0 * here->BSIM3v1cdsb); } } } } else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM3v1phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM3v1cox * pParam->BSIM3v1weffCV * pParam->BSIM3v1leffCV; Vfb = Vth - pParam->BSIM3v1phi - pParam->BSIM3v1k1 * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->BSIM3v1k1 * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; if ((VgstNVt > -EXP_THRESHOLD) && (VgstNVt < EXP_THRESHOLD)) { ExpVgst *= ExpVgst; Vgsteff = n * Vtm * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgs_eff - Vth) / n * dn_dVd) + Vgsteff / n * dn_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgs_eff - Vth) / n * dn_dVb) + Vgsteff / n * dn_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } if (model->BSIM3v1capMod == 1) { Arg1 = Vgs_eff - VbseffCV - Vfb - Vgsteff; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; Cgg = CoxWL * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -CoxWL * (dVfb_dVd + dVgsteff_dVd); Cgb = -CoxWL * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } else { T0 = 0.5 * pParam->BSIM3v1k1; T1 = sqrt(T0 * T0 + Arg1); T2 = CoxWL * T0 / T1; qgate = CoxWL * pParam->BSIM3v1k1 * (T1 - T0); Cgg = T2 * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -T2 * (dVfb_dVd + dVgsteff_dVd); Cgb = -T2 * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } qbulk = -qgate; Cbg = -Cgg; Cbd = -Cgd; Cbb = -Cgb; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v1abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v1abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; if (VdsatCV < Vds) { dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T0 = Vgsteff - VdsatCV / 3.0; dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0; dT0_dVb = -dVdsatCV_dVb / 3.0; qgate += CoxWL * T0; Cgg1 = CoxWL * dT0_dVg; Cgb1 = CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; T0 = VdsatCV - Vgsteff; dT0_dVg = dVdsatCV_dVg - 1.0; dT0_dVb = dVdsatCV_dVb; qbulk += One_Third_CoxWL * T0; Cbg1 = One_Third_CoxWL * dT0_dVg; Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb; Cbd1 = Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v1xpart > 0.5) T0 = -Two_Third_CoxWL; else if (model->BSIM3v1xpart < 0.5) T0 = -0.4 * CoxWL; else T0 = -One_Third_CoxWL; qsrc = T0 * Vgsteff; Csg = T0 * dVgsteff_dVg; Csb = T0 * dVgsteff_dVb; Csd = T0 * dVgsteff_dVd; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } else { T0 = AbulkCV * Vds; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.e-20); T2 = Vds / T1; T3 = T0 * T2; dT3_dVg = -12.0 * T2 * T2 * AbulkCV; dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5; dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb * Vgsteff; qgate += CoxWL * (Vgsteff - 0.5 * Vds + T3); Cgg1 = CoxWL * (1.0 + dT3_dVg); Cgb1 = CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; qbulk += CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3); Cbg1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVg); Cbb1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVb + (0.5 * Vds - T3) * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbd1 = -CoxWL * (1.0 - AbulkCV) * dT3_dVd + Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v1xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); Csg = -CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV); Csb = -CoxWL * (0.25 * Vds * dAbulkCV_dVb - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0) * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csd = -CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0 / T1 / T1 * (4.0 * Vgsteff - T0)) + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else if (model->BSIM3v1xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb + Csg * dVgsteff_dVb; Csd = (qsrc / T1 + T2 * T4) * AbulkCV + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } qdrn = -(qgate + qbulk + qsrc); here->BSIM3v1cggb = Cgg; here->BSIM3v1cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v1cgdb = Cgd; here->BSIM3v1cdgb = -(Cgg + Cbg + Csg); here->BSIM3v1cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v1cddb = -(Cgd + Cbd + Csd); here->BSIM3v1cbgb = Cbg; here->BSIM3v1cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v1cbdb = Cbd; } else if (model->BSIM3v1capMod == 2) { V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVd = CoxWL * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = CoxWL * (dVfbeff_dVb - dVfb_dVb); T0 = 0.5 * pParam->BSIM3v1k1; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM3v1k1 == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM3v1k1; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM3v1k1 * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * (dVfbeff_dVd + dVgsteff_dVd); dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v1abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v1abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM3v1xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM3v1xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQac0_dVd + dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQac0_dVd - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3v1cggb = Cgg; here->BSIM3v1cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v1cgdb = Cgd; here->BSIM3v1cdgb = -(Cgg + Cbg + Csg); here->BSIM3v1cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v1cddb = -(Cgd + Cbd + Csd); here->BSIM3v1cbgb = Cbg; here->BSIM3v1cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v1cbdb = Cbd; } /* Non-quasi-static Model */ if (here->BSIM3v1nqsMod) { qcheq = -qbulk - qgate; qbulk = qgate = qdrn = qsrc = 0.0; here->BSIM3v1cqgb = -(here->BSIM3v1cggb + here->BSIM3v1cbgb); here->BSIM3v1cqdb = -(here->BSIM3v1cgdb + here->BSIM3v1cbdb); here->BSIM3v1cqsb = -(here->BSIM3v1cgsb + here->BSIM3v1cbsb); here->BSIM3v1cqbb = here->BSIM3v1cggb + here->BSIM3v1cgdb + here->BSIM3v1cgsb + here->BSIM3v1cbgb + here->BSIM3v1cbdb + here->BSIM3v1cbsb; here->BSIM3v1cggb = here->BSIM3v1cgsb = here->BSIM3v1cgdb = 0.0; here->BSIM3v1cdgb = here->BSIM3v1cdsb = here->BSIM3v1cddb = 0.0; here->BSIM3v1cbgb = here->BSIM3v1cbsb = here->BSIM3v1cbdb = 0.0; T0 = pParam->BSIM3v1leffCV * pParam->BSIM3v1leffCV; here->BSIM3v1tconst = pParam->BSIM3v1u0temp * pParam->BSIM3v1elm / CoxWL / T0; if (qcheq == 0.0) here->BSIM3v1tconst = 0.0; else if (qcheq < 0.0) here->BSIM3v1tconst = -here->BSIM3v1tconst; gtau_drift = fabs(here->BSIM3v1tconst * qcheq); gtau_diff = 16.0 * pParam->BSIM3v1u0temp * model->BSIM3v1vtm / T0; here->BSIM3v1gtau = gtau_drift + gtau_diff; *(ckt->CKTstate0 + here->BSIM3v1qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM3v1qcheq) = *(ckt->CKTstate0 + here->BSIM3v1qcheq); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v1qcheq); if (error) return (error); } else { here->BSIM3v1cqgb = here->BSIM3v1cqdb = here->BSIM3v1cqsb = here->BSIM3v1cqbb = 0.0; here->BSIM3v1gtau = 0.0; } } finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->BSIM3v1cd = here->BSIM3v1mode * cdrain - here->BSIM3v1cbd; if (ChargeComputationNeeded) { /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw: zero bias drain junction sidewall capacitance along field oxide * czbssw: zero bias source junction sidewall capacitance along field oxide * czbdswg: zero bias drain junction sidewall capacitance along gate side * czbsswg: zero bias source junction sidewall capacitance along gate side */ czbd = model->BSIM3v1unitAreaJctCap * here->BSIM3v1drainArea; czbs = model->BSIM3v1unitAreaJctCap * here->BSIM3v1sourceArea; if (here->BSIM3v1drainPerimeter < pParam->BSIM3v1weff) { czbdswg = model->BSIM3v1unitLengthGateSidewallJctCap * here->BSIM3v1drainPerimeter; czbdsw = 0.0; } else { czbdsw = model->BSIM3v1unitLengthSidewallJctCap * (here->BSIM3v1drainPerimeter - pParam->BSIM3v1weff); czbdswg = model->BSIM3v1unitLengthGateSidewallJctCap * pParam->BSIM3v1weff; } if (here->BSIM3v1sourcePerimeter < pParam->BSIM3v1weff) { czbssw = 0.0; czbsswg = model->BSIM3v1unitLengthGateSidewallJctCap * here->BSIM3v1sourcePerimeter; } else { czbssw = model->BSIM3v1unitLengthSidewallJctCap * (here->BSIM3v1sourcePerimeter - pParam->BSIM3v1weff); czbsswg = model->BSIM3v1unitLengthGateSidewallJctCap * pParam->BSIM3v1weff; } PhiB = model->BSIM3v1bulkJctPotential; PhiBSW = model->BSIM3v1sidewallJctPotential; PhiBSWG = model->BSIM3v1GatesidewallJctPotential; MJ = model->BSIM3v1bulkJctBotGradingCoeff; MJSW = model->BSIM3v1bulkJctSideGradingCoeff; MJSWG = model->BSIM3v1bulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs == 0.0) { *(ckt->CKTstate0 + here->BSIM3v1qbs) = 0.0; here->BSIM3v1capbs = czbs + czbssw + czbsswg; } else if (vbs < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs / PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbs) = PhiB * czbs * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v1capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v1qbs) = 0.0; here->BSIM3v1capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs / PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbs) += PhiBSW * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v1capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs / PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbs) += PhiBSWG * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3v1capbs += czbsswg * sarg; } } else { *(ckt->CKTstate0+here->BSIM3v1qbs) = vbs * (czbs + czbssw + czbsswg) + vbs * vbs * (czbs * MJ * 0.5 / PhiB + czbssw * MJSW * 0.5 / PhiBSW + czbsswg * MJSWG * 0.5 / PhiBSWG); here->BSIM3v1capbs = czbs + czbssw + czbsswg + vbs * (czbs * MJ / PhiB + czbssw * MJSW / PhiBSW + czbsswg * MJSWG / PhiBSWG); } /* Drain Bulk Junction */ if (vbd == 0.0) { *(ckt->CKTstate0 + here->BSIM3v1qbd) = 0.0; here->BSIM3v1capbd = czbd + czbdsw + czbdswg; } else if (vbd < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd / PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbd) = PhiB * czbd * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v1capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v1qbd) = 0.0; here->BSIM3v1capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd / PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbd) += PhiBSW * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v1capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd / PhiBSWG; if (MJSWG == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWG * log(arg)); *(ckt->CKTstate0 + here->BSIM3v1qbd) += PhiBSWG * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWG); here->BSIM3v1capbd += czbdswg * sarg; } } else { *(ckt->CKTstate0+here->BSIM3v1qbd) = vbd * (czbd + czbdsw + czbdswg) + vbd * vbd * (czbd * MJ * 0.5 / PhiB + czbdsw * MJSW * 0.5 / PhiBSW + czbdswg * MJSWG * 0.5 / PhiBSWG); here->BSIM3v1capbd = czbd + czbdsw + czbdswg + vbd * (czbd * MJ / PhiB + czbdsw * MJSW / PhiBSW + czbdswg * MJSWG / PhiBSWG); } } /* * check convergence */ if ((here->BSIM3v1off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(here->BSIM3v1cd)) + ckt->CKTabstol; if (fabs(cdhat - here->BSIM3v1cd) >= tol) { ckt->CKTnoncon++; } else { tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(here->BSIM3v1cbs + here->BSIM3v1cbd)) + ckt->CKTabstol; if (fabs(cbhat - (here->BSIM3v1cbs + here->BSIM3v1cbd)) > tol) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM3v1vbs) = vbs; *(ckt->CKTstate0 + here->BSIM3v1vbd) = vbd; *(ckt->CKTstate0 + here->BSIM3v1vgs) = vgs; *(ckt->CKTstate0 + here->BSIM3v1vds) = vds; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (model->BSIM3v1capMod == 0) { if (vgd < 0.0) { cgdo = pParam->BSIM3v1cgdo; qgdo = pParam->BSIM3v1cgdo * vgd; } else { cgdo = pParam->BSIM3v1cgdo; qgdo = pParam->BSIM3v1cgdo * vgd; } if (vgs < 0.0) { cgso = pParam->BSIM3v1cgso; qgso = pParam->BSIM3v1cgso * vgs; } else { cgso = pParam->BSIM3v1cgso; qgso = pParam->BSIM3v1cgso * vgs; } } else if (model->BSIM3v1capMod == 1) { if (vgd < 0.0) { T1 = sqrt(1.0 - 4.0 * vgd / pParam->BSIM3v1ckappa); cgdo = pParam->BSIM3v1cgdo + pParam->BSIM3v1weffCV * pParam->BSIM3v1cgdl / T1; qgdo = pParam->BSIM3v1cgdo * vgd - pParam->BSIM3v1weffCV * 0.5 * pParam->BSIM3v1cgdl * pParam->BSIM3v1ckappa * (T1 - 1.0); } else { cgdo = pParam->BSIM3v1cgdo + pParam->BSIM3v1weffCV * pParam->BSIM3v1cgdl; qgdo = (pParam->BSIM3v1weffCV * pParam->BSIM3v1cgdl + pParam->BSIM3v1cgdo) * vgd; } if (vgs < 0.0) { T1 = sqrt(1.0 - 4.0 * vgs / pParam->BSIM3v1ckappa); cgso = pParam->BSIM3v1cgso + pParam->BSIM3v1weffCV * pParam->BSIM3v1cgsl / T1; qgso = pParam->BSIM3v1cgso * vgs - pParam->BSIM3v1weffCV * 0.5 * pParam->BSIM3v1cgsl * pParam->BSIM3v1ckappa * (T1 - 1.0); } else { cgso = pParam->BSIM3v1cgso + pParam->BSIM3v1weffCV * pParam->BSIM3v1cgsl; qgso = (pParam->BSIM3v1weffCV * pParam->BSIM3v1cgsl + pParam->BSIM3v1cgso) * vgs; } } else { T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v1weffCV * pParam->BSIM3v1cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v1ckappa); cgdo = pParam->BSIM3v1cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM3v1cgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->BSIM3v1ckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v1weffCV * pParam->BSIM3v1cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v1ckappa); cgso = pParam->BSIM3v1cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM3v1cgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->BSIM3v1ckappa * (T4 - 1.0)); } if (here->BSIM3v1mode > 0) { gcdgb = (here->BSIM3v1cdgb - cgdo) * ag0; gcddb = (here->BSIM3v1cddb + here->BSIM3v1capbd + cgdo) * ag0; gcdsb = here->BSIM3v1cdsb * ag0; gcsgb = -(here->BSIM3v1cggb + here->BSIM3v1cbgb + here->BSIM3v1cdgb + cgso) * ag0; gcsdb = -(here->BSIM3v1cgdb + here->BSIM3v1cbdb + here->BSIM3v1cddb) * ag0; gcssb = (here->BSIM3v1capbs + cgso - (here->BSIM3v1cgsb + here->BSIM3v1cbsb + here->BSIM3v1cdsb)) * ag0; gcggb = (here->BSIM3v1cggb + cgdo + cgso + pParam->BSIM3v1cgbo ) * ag0; gcgdb = (here->BSIM3v1cgdb - cgdo) * ag0; gcgsb = (here->BSIM3v1cgsb - cgso) * ag0; gcbgb = (here->BSIM3v1cbgb - pParam->BSIM3v1cgbo) * ag0; gcbdb = (here->BSIM3v1cbdb - here->BSIM3v1capbd) * ag0; gcbsb = (here->BSIM3v1cbsb - here->BSIM3v1capbs) * ag0; gcqgb = here->BSIM3v1cqgb * ag0; gcqdb = here->BSIM3v1cqdb * ag0; gcqsb = here->BSIM3v1cqsb * ag0; gcqbb = here->BSIM3v1cqbb * ag0; T0 = here->BSIM3v1tconst * qdef; here->BSIM3v1gtg = T0 * here->BSIM3v1cqgb; here->BSIM3v1gtb = T0 * here->BSIM3v1cqbb; here->BSIM3v1gtd = T0 * here->BSIM3v1cqdb; here->BSIM3v1gts = T0 * here->BSIM3v1cqsb; sxpart = 0.6; dxpart = 0.4; /* compute total terminal charge */ qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v1cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qdrn -= qgd; qsrc = -(qgate + qbulk + qdrn); } else { gcsgb = (here->BSIM3v1cdgb - cgso) * ag0; gcsdb = here->BSIM3v1cdsb * ag0; gcssb = (here->BSIM3v1cddb + here->BSIM3v1capbs + cgso) * ag0; gcdgb = -(here->BSIM3v1cggb + here->BSIM3v1cbgb + here->BSIM3v1cdgb + cgdo) * ag0; gcdsb = -(here->BSIM3v1cgdb + here->BSIM3v1cbdb + here->BSIM3v1cddb) * ag0; gcddb = (here->BSIM3v1capbd + cgdo - (here->BSIM3v1cgsb + here->BSIM3v1cbsb + here->BSIM3v1cdsb)) * ag0; gcggb = (here->BSIM3v1cggb + cgdo + cgso + pParam->BSIM3v1cgbo ) * ag0; gcgdb = (here->BSIM3v1cgsb - cgdo) * ag0; gcgsb = (here->BSIM3v1cgdb - cgso) * ag0; gcbgb = (here->BSIM3v1cbgb - pParam->BSIM3v1cgbo) * ag0; gcbdb = (here->BSIM3v1cbsb - here->BSIM3v1capbd) * ag0; gcbsb = (here->BSIM3v1cbdb - here->BSIM3v1capbs) * ag0; gcqgb = here->BSIM3v1cqgb * ag0; gcqdb = here->BSIM3v1cqsb * ag0; gcqsb = here->BSIM3v1cqdb * ag0; gcqbb = here->BSIM3v1cqbb * ag0; T0 = here->BSIM3v1tconst * qdef; here->BSIM3v1gtg = T0 * here->BSIM3v1cqgb; here->BSIM3v1gtb = T0 * here->BSIM3v1cqbb; here->BSIM3v1gtd = T0 * here->BSIM3v1cqdb; here->BSIM3v1gts = T0 * here->BSIM3v1cqsb; dxpart = 0.6; sxpart = 0.4; /* compute total terminal charge */ qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v1cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qsrc = qdrn - qgs; qdrn = -(qgate + qbulk + qsrc); } here->BSIM3v1cgdo = cgdo; here->BSIM3v1cgso = cgso; /* added by Mansun 11/1/93 */ if (here->BSIM3v1nqsMod) { *(ckt->CKTstate0 + here->BSIM3v1qcdump) = qdef; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM3v1qcdump) = *(ckt->CKTstate0 + here->BSIM3v1qcdump); error = NIintegrate(ckt, &gqdef, &cqdef, 1.0, here->BSIM3v1qcdump); if (error) return (error); } else { gqdef = cqdef = 0.0; } if (ByPass) goto line860; /* End added by Mansun 11/1/93 */ *(ckt->CKTstate0 + here->BSIM3v1qg) = qgate; *(ckt->CKTstate0 + here->BSIM3v1qd) = qdrn - *(ckt->CKTstate0 + here->BSIM3v1qbd); *(ckt->CKTstate0 + here->BSIM3v1qb) = qbulk + *(ckt->CKTstate0 + here->BSIM3v1qbd) + *(ckt->CKTstate0 + here->BSIM3v1qbs); /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v1qb) = *(ckt->CKTstate0 + here->BSIM3v1qb); *(ckt->CKTstate1 + here->BSIM3v1qg) = *(ckt->CKTstate0 + here->BSIM3v1qg); *(ckt->CKTstate1 + here->BSIM3v1qd) = *(ckt->CKTstate0 + here->BSIM3v1qd); } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v1qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v1qg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->BSIM3v1qd); if (error) return(error); goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; gcqgb = gcqdb = gcqsb = gcqbb = 0.0; here->BSIM3v1gtg = here->BSIM3v1gtd = here->BSIM3v1gts = here->BSIM3v1gtb = 0.0; gqdef = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM3v1mode > 0) ? 0.4 : 0.6)); if (here->BSIM3v1nqsMod) here->BSIM3v1gtau = 16.0 * pParam->BSIM3v1u0temp * model->BSIM3v1vtm / Leff / Leff; else here->BSIM3v1gtau = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM3v1cqg); cqbulk = *(ckt->CKTstate0 + here->BSIM3v1cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM3v1cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs + (here->BSIM3v1gtg * vgb - here->BSIM3v1gtd * vbd - here->BSIM3v1gts * vbs); ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs - dxpart * (here->BSIM3v1gtg * vgb - here->BSIM3v1gtd * vbd - here->BSIM3v1gts * vbs); cqcheq = *(ckt->CKTstate0 + here->BSIM3v1cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + (here->BSIM3v1gtg * vgb - here->BSIM3v1gtd * vbd - here->BSIM3v1gts * vbs); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v1cqb) = *(ckt->CKTstate0 + here->BSIM3v1cqb); *(ckt->CKTstate1 + here->BSIM3v1cqg) = *(ckt->CKTstate0 + here->BSIM3v1cqg); *(ckt->CKTstate1 + here->BSIM3v1cqd) = *(ckt->CKTstate0 + here->BSIM3v1cqd); *(ckt->CKTstate1 + here->BSIM3v1cqcheq) = *(ckt->CKTstate0 + here->BSIM3v1cqcheq); *(ckt->CKTstate1 + here->BSIM3v1cqcdump) = *(ckt->CKTstate0 + here->BSIM3v1cqcdump); } /* * load current vector */ line900: if (here->BSIM3v1mode >= 0) { Gm = here->BSIM3v1gm; Gmbs = here->BSIM3v1gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cdreq = model->BSIM3v1type * (cdrain - here->BSIM3v1gds * vds - Gm * vgs - Gmbs * vbs); ceqbs = -here->BSIM3v1csub; ceqbd = 0.0; gbspsp = -here->BSIM3v1gbds - here->BSIM3v1gbgs - here->BSIM3v1gbbs; gbbdp = -here->BSIM3v1gbds; gbbsp = here->BSIM3v1gbds + here->BSIM3v1gbgs + here->BSIM3v1gbbs; gbspg = here->BSIM3v1gbgs; gbspb = here->BSIM3v1gbbs; gbspdp = here->BSIM3v1gbds; gbdpdp = 0.0; gbdpg = 0.0; gbdpb = 0.0; gbdpsp = 0.0; } else { Gm = -here->BSIM3v1gm; Gmbs = -here->BSIM3v1gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); cdreq = -model->BSIM3v1type * (cdrain + here->BSIM3v1gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = 0.0; ceqbd = -here->BSIM3v1csub; gbspsp = 0.0; gbbdp = here->BSIM3v1gbds + here->BSIM3v1gbgs + here->BSIM3v1gbbs; gbbsp = -here->BSIM3v1gbds; gbspg = 0.0; gbspb = 0.0; gbspdp = 0.0; gbdpdp = -here->BSIM3v1gbds - here->BSIM3v1gbgs - here->BSIM3v1gbbs; gbdpg = here->BSIM3v1gbgs; gbdpb = here->BSIM3v1gbbs; gbdpsp = here->BSIM3v1gbds; } if (model->BSIM3v1type > 0) { ceqbs += (here->BSIM3v1cbs - (here->BSIM3v1gbs - ckt->CKTgmin) * vbs); ceqbd += (here->BSIM3v1cbd - (here->BSIM3v1gbd - ckt->CKTgmin) * vbd); ceqqg = ceqqg; ceqqb = ceqqb; ceqqd = ceqqd; cqcheq = cqcheq; } else { ceqbs = -ceqbs - (here->BSIM3v1cbs - (here->BSIM3v1gbs - ckt->CKTgmin) * vbs); ceqbd = -ceqbd - (here->BSIM3v1cbd - (here->BSIM3v1gbd - ckt->CKTgmin) * vbd); ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; cqcheq = -cqcheq; } (*(ckt->CKTrhs + here->BSIM3v1gNode) -= m * ceqqg); (*(ckt->CKTrhs + here->BSIM3v1bNode) -= m * (ceqbs + ceqbd + ceqqb)); (*(ckt->CKTrhs + here->BSIM3v1dNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->BSIM3v1sNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd)); *(ckt->CKTrhs + here->BSIM3v1qNode) += m * (cqcheq - cqdef); /* * load y matrix */ (*(here->BSIM3v1DdPtr) += m * here->BSIM3v1drainConductance); (*(here->BSIM3v1GgPtr) += m * (gcggb - here->BSIM3v1gtg)); (*(here->BSIM3v1SsPtr) += m * here->BSIM3v1sourceConductance); (*(here->BSIM3v1BbPtr) += m * ((here->BSIM3v1gbd + here->BSIM3v1gbs - gcbgb - gcbdb - gcbsb) - here->BSIM3v1gbbs)); (*(here->BSIM3v1DPdpPtr) += m * ((here->BSIM3v1drainConductance + here->BSIM3v1gds + here->BSIM3v1gbd + RevSum + gcddb) + dxpart * here->BSIM3v1gtd + gbdpdp)); (*(here->BSIM3v1SPspPtr) += m * ((here->BSIM3v1sourceConductance + here->BSIM3v1gds + here->BSIM3v1gbs + FwdSum + gcssb) + sxpart * here->BSIM3v1gts + gbspsp)); (*(here->BSIM3v1DdpPtr) -= m * here->BSIM3v1drainConductance); (*(here->BSIM3v1GbPtr) -= m * (gcggb + gcgdb + gcgsb + here->BSIM3v1gtb)); (*(here->BSIM3v1GdpPtr) += m * (gcgdb - here->BSIM3v1gtd)); (*(here->BSIM3v1GspPtr) += m * (gcgsb - here->BSIM3v1gts)); (*(here->BSIM3v1SspPtr) -= m * here->BSIM3v1sourceConductance); (*(here->BSIM3v1BgPtr) += m * (gcbgb - here->BSIM3v1gbgs)); (*(here->BSIM3v1BdpPtr) += m * (gcbdb - here->BSIM3v1gbd + gbbdp)); (*(here->BSIM3v1BspPtr) += m * (gcbsb - here->BSIM3v1gbs + gbbsp)); (*(here->BSIM3v1DPdPtr) -= m * here->BSIM3v1drainConductance); (*(here->BSIM3v1DPgPtr) += m * ((Gm + gcdgb) + dxpart * here->BSIM3v1gtg + gbdpg)); (*(here->BSIM3v1DPbPtr) -= m * ((here->BSIM3v1gbd - Gmbs + gcdgb + gcddb + gcdsb - dxpart * here->BSIM3v1gtb) - gbdpb)); (*(here->BSIM3v1DPspPtr) -= m * ((here->BSIM3v1gds + FwdSum - gcdsb - dxpart * here->BSIM3v1gts) - gbdpsp)); (*(here->BSIM3v1SPgPtr) += m * (gcsgb - Gm + sxpart * here->BSIM3v1gtg + gbspg)); (*(here->BSIM3v1SPsPtr) -= m * here->BSIM3v1sourceConductance); (*(here->BSIM3v1SPbPtr) -= m * ((here->BSIM3v1gbs + Gmbs + gcsgb + gcsdb + gcssb - sxpart * here->BSIM3v1gtb) - gbspb)); (*(here->BSIM3v1SPdpPtr) -= m * ((here->BSIM3v1gds + RevSum - gcsdb - sxpart * here->BSIM3v1gtd - here->BSIM3v1gbd) - gbspdp)); *(here->BSIM3v1QqPtr) += m * ((gqdef + here->BSIM3v1gtau)); *(here->BSIM3v1DPqPtr) += m * ((dxpart * here->BSIM3v1gtau)); *(here->BSIM3v1SPqPtr) += m * ((sxpart * here->BSIM3v1gtau)); *(here->BSIM3v1GqPtr) -= m * here->BSIM3v1gtau; *(here->BSIM3v1QgPtr) += m * (-gcqgb + here->BSIM3v1gtg); *(here->BSIM3v1QdpPtr) += m * (-gcqdb + here->BSIM3v1gtd); *(here->BSIM3v1QspPtr) += m * (-gcqsb + here->BSIM3v1gts); *(here->BSIM3v1QbPtr) += m * (-gcqbb + here->BSIM3v1gtb); line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1dest.c0000644000265600020320000000165212264261473021323 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1dest.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "bsim3v1def.h" #include "ngspice/suffix.h" void BSIM3v1destroy(GENmodel **inModel) { BSIM3v1model **model = (BSIM3v1model**)inModel; BSIM3v1instance *here; BSIM3v1instance *prev = NULL; BSIM3v1model *mod = *model; BSIM3v1model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3v1/b3v1mask.c0000644000265600020320000011542012264261473021316 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1mask.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM3v1model *model = (BSIM3v1model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM3v1_MOD_MOBMOD: value->iValue = model->BSIM3v1mobMod; return(OK); case BSIM3v1_MOD_PARAMCHK: value->iValue = model->BSIM3v1paramChk; return(OK); case BSIM3v1_MOD_BINUNIT: value->iValue = model->BSIM3v1binUnit; return(OK); case BSIM3v1_MOD_CAPMOD: value->iValue = model->BSIM3v1capMod; return(OK); case BSIM3v1_MOD_NQSMOD: value->iValue = model->BSIM3v1nqsMod; return(OK); case BSIM3v1_MOD_NOIMOD: value->iValue = model->BSIM3v1noiMod; return(OK); case BSIM3v1_MOD_VERSION : value->rValue = model->BSIM3v1version; return(OK); case BSIM3v1_MOD_TOX : value->rValue = model->BSIM3v1tox; return(OK); case BSIM3v1_MOD_CDSC : value->rValue = model->BSIM3v1cdsc; return(OK); case BSIM3v1_MOD_CDSCB : value->rValue = model->BSIM3v1cdscb; return(OK); case BSIM3v1_MOD_CDSCD : value->rValue = model->BSIM3v1cdscd; return(OK); case BSIM3v1_MOD_CIT : value->rValue = model->BSIM3v1cit; return(OK); case BSIM3v1_MOD_NFACTOR : value->rValue = model->BSIM3v1nfactor; return(OK); case BSIM3v1_MOD_XJ: value->rValue = model->BSIM3v1xj; return(OK); case BSIM3v1_MOD_VSAT: value->rValue = model->BSIM3v1vsat; return(OK); case BSIM3v1_MOD_AT: value->rValue = model->BSIM3v1at; return(OK); case BSIM3v1_MOD_A0: value->rValue = model->BSIM3v1a0; return(OK); case BSIM3v1_MOD_AGS: value->rValue = model->BSIM3v1ags; return(OK); case BSIM3v1_MOD_A1: value->rValue = model->BSIM3v1a1; return(OK); case BSIM3v1_MOD_A2: value->rValue = model->BSIM3v1a2; return(OK); case BSIM3v1_MOD_KETA: value->rValue = model->BSIM3v1keta; return(OK); case BSIM3v1_MOD_NSUB: value->rValue = model->BSIM3v1nsub; return(OK); case BSIM3v1_MOD_NPEAK: value->rValue = model->BSIM3v1npeak; return(OK); case BSIM3v1_MOD_NGATE: value->rValue = model->BSIM3v1ngate; return(OK); case BSIM3v1_MOD_GAMMA1: value->rValue = model->BSIM3v1gamma1; return(OK); case BSIM3v1_MOD_GAMMA2: value->rValue = model->BSIM3v1gamma2; return(OK); case BSIM3v1_MOD_VBX: value->rValue = model->BSIM3v1vbx; return(OK); case BSIM3v1_MOD_VBM: value->rValue = model->BSIM3v1vbm; return(OK); case BSIM3v1_MOD_XT: value->rValue = model->BSIM3v1xt; return(OK); case BSIM3v1_MOD_K1: value->rValue = model->BSIM3v1k1; return(OK); case BSIM3v1_MOD_KT1: value->rValue = model->BSIM3v1kt1; return(OK); case BSIM3v1_MOD_KT1L: value->rValue = model->BSIM3v1kt1l; return(OK); case BSIM3v1_MOD_KT2 : value->rValue = model->BSIM3v1kt2; return(OK); case BSIM3v1_MOD_K2 : value->rValue = model->BSIM3v1k2; return(OK); case BSIM3v1_MOD_K3: value->rValue = model->BSIM3v1k3; return(OK); case BSIM3v1_MOD_K3B: value->rValue = model->BSIM3v1k3b; return(OK); case BSIM3v1_MOD_W0: value->rValue = model->BSIM3v1w0; return(OK); case BSIM3v1_MOD_NLX: value->rValue = model->BSIM3v1nlx; return(OK); case BSIM3v1_MOD_DVT0 : value->rValue = model->BSIM3v1dvt0; return(OK); case BSIM3v1_MOD_DVT1 : value->rValue = model->BSIM3v1dvt1; return(OK); case BSIM3v1_MOD_DVT2 : value->rValue = model->BSIM3v1dvt2; return(OK); case BSIM3v1_MOD_DVT0W : value->rValue = model->BSIM3v1dvt0w; return(OK); case BSIM3v1_MOD_DVT1W : value->rValue = model->BSIM3v1dvt1w; return(OK); case BSIM3v1_MOD_DVT2W : value->rValue = model->BSIM3v1dvt2w; return(OK); case BSIM3v1_MOD_DROUT : value->rValue = model->BSIM3v1drout; return(OK); case BSIM3v1_MOD_DSUB : value->rValue = model->BSIM3v1dsub; return(OK); case BSIM3v1_MOD_VTH0: value->rValue = model->BSIM3v1vth0; return(OK); case BSIM3v1_MOD_UA: value->rValue = model->BSIM3v1ua; return(OK); case BSIM3v1_MOD_UA1: value->rValue = model->BSIM3v1ua1; return(OK); case BSIM3v1_MOD_UB: value->rValue = model->BSIM3v1ub; return(OK); case BSIM3v1_MOD_UB1: value->rValue = model->BSIM3v1ub1; return(OK); case BSIM3v1_MOD_UC: value->rValue = model->BSIM3v1uc; return(OK); case BSIM3v1_MOD_UC1: value->rValue = model->BSIM3v1uc1; return(OK); case BSIM3v1_MOD_U0: value->rValue = model->BSIM3v1u0; return(OK); case BSIM3v1_MOD_UTE: value->rValue = model->BSIM3v1ute; return(OK); case BSIM3v1_MOD_VOFF: value->rValue = model->BSIM3v1voff; return(OK); case BSIM3v1_MOD_DELTA: value->rValue = model->BSIM3v1delta; return(OK); case BSIM3v1_MOD_RDSW: value->rValue = model->BSIM3v1rdsw; return(OK); case BSIM3v1_MOD_PRWG: value->rValue = model->BSIM3v1prwg; return(OK); case BSIM3v1_MOD_PRWB: value->rValue = model->BSIM3v1prwb; return(OK); case BSIM3v1_MOD_PRT: value->rValue = model->BSIM3v1prt; return(OK); case BSIM3v1_MOD_ETA0: value->rValue = model->BSIM3v1eta0; return(OK); case BSIM3v1_MOD_ETAB: value->rValue = model->BSIM3v1etab; return(OK); case BSIM3v1_MOD_PCLM: value->rValue = model->BSIM3v1pclm; return(OK); case BSIM3v1_MOD_PDIBL1: value->rValue = model->BSIM3v1pdibl1; return(OK); case BSIM3v1_MOD_PDIBL2: value->rValue = model->BSIM3v1pdibl2; return(OK); case BSIM3v1_MOD_PDIBLB: value->rValue = model->BSIM3v1pdiblb; return(OK); case BSIM3v1_MOD_PSCBE1: value->rValue = model->BSIM3v1pscbe1; return(OK); case BSIM3v1_MOD_PSCBE2: value->rValue = model->BSIM3v1pscbe2; return(OK); case BSIM3v1_MOD_PVAG: value->rValue = model->BSIM3v1pvag; return(OK); case BSIM3v1_MOD_WR: value->rValue = model->BSIM3v1wr; return(OK); case BSIM3v1_MOD_DWG: value->rValue = model->BSIM3v1dwg; return(OK); case BSIM3v1_MOD_DWB: value->rValue = model->BSIM3v1dwb; return(OK); case BSIM3v1_MOD_B0: value->rValue = model->BSIM3v1b0; return(OK); case BSIM3v1_MOD_B1: value->rValue = model->BSIM3v1b1; return(OK); case BSIM3v1_MOD_ALPHA0: value->rValue = model->BSIM3v1alpha0; return(OK); case BSIM3v1_MOD_BETA0: value->rValue = model->BSIM3v1beta0; return(OK); case BSIM3v1_MOD_ELM: value->rValue = model->BSIM3v1elm; return(OK); case BSIM3v1_MOD_CGSL: value->rValue = model->BSIM3v1cgsl; return(OK); case BSIM3v1_MOD_CGDL: value->rValue = model->BSIM3v1cgdl; return(OK); case BSIM3v1_MOD_CKAPPA: value->rValue = model->BSIM3v1ckappa; return(OK); case BSIM3v1_MOD_CF: value->rValue = model->BSIM3v1cf; return(OK); case BSIM3v1_MOD_CLC: value->rValue = model->BSIM3v1clc; return(OK); case BSIM3v1_MOD_CLE: value->rValue = model->BSIM3v1cle; return(OK); case BSIM3v1_MOD_DWC: value->rValue = model->BSIM3v1dwc; return(OK); case BSIM3v1_MOD_DLC: value->rValue = model->BSIM3v1dlc; return(OK); case BSIM3v1_MOD_VFBCV: value->rValue = model->BSIM3v1vfbcv; return(OK); /* Length dependence */ case BSIM3v1_MOD_LCDSC : value->rValue = model->BSIM3v1lcdsc; return(OK); case BSIM3v1_MOD_LCDSCB : value->rValue = model->BSIM3v1lcdscb; return(OK); case BSIM3v1_MOD_LCDSCD : value->rValue = model->BSIM3v1lcdscd; return(OK); case BSIM3v1_MOD_LCIT : value->rValue = model->BSIM3v1lcit; return(OK); case BSIM3v1_MOD_LNFACTOR : value->rValue = model->BSIM3v1lnfactor; return(OK); case BSIM3v1_MOD_LXJ: value->rValue = model->BSIM3v1lxj; return(OK); case BSIM3v1_MOD_LVSAT: value->rValue = model->BSIM3v1lvsat; return(OK); case BSIM3v1_MOD_LAT: value->rValue = model->BSIM3v1lat; return(OK); case BSIM3v1_MOD_LA0: value->rValue = model->BSIM3v1la0; return(OK); case BSIM3v1_MOD_LAGS: value->rValue = model->BSIM3v1lags; return(OK); case BSIM3v1_MOD_LA1: value->rValue = model->BSIM3v1la1; return(OK); case BSIM3v1_MOD_LA2: value->rValue = model->BSIM3v1la2; return(OK); case BSIM3v1_MOD_LKETA: value->rValue = model->BSIM3v1lketa; return(OK); case BSIM3v1_MOD_LNSUB: value->rValue = model->BSIM3v1lnsub; return(OK); case BSIM3v1_MOD_LNPEAK: value->rValue = model->BSIM3v1lnpeak; return(OK); case BSIM3v1_MOD_LNGATE: value->rValue = model->BSIM3v1lngate; return(OK); case BSIM3v1_MOD_LGAMMA1: value->rValue = model->BSIM3v1lgamma1; return(OK); case BSIM3v1_MOD_LGAMMA2: value->rValue = model->BSIM3v1lgamma2; return(OK); case BSIM3v1_MOD_LVBX: value->rValue = model->BSIM3v1lvbx; return(OK); case BSIM3v1_MOD_LVBM: value->rValue = model->BSIM3v1lvbm; return(OK); case BSIM3v1_MOD_LXT: value->rValue = model->BSIM3v1lxt; return(OK); case BSIM3v1_MOD_LK1: value->rValue = model->BSIM3v1lk1; return(OK); case BSIM3v1_MOD_LKT1: value->rValue = model->BSIM3v1lkt1; return(OK); case BSIM3v1_MOD_LKT1L: value->rValue = model->BSIM3v1lkt1l; return(OK); case BSIM3v1_MOD_LKT2 : value->rValue = model->BSIM3v1lkt2; return(OK); case BSIM3v1_MOD_LK2 : value->rValue = model->BSIM3v1lk2; return(OK); case BSIM3v1_MOD_LK3: value->rValue = model->BSIM3v1lk3; return(OK); case BSIM3v1_MOD_LK3B: value->rValue = model->BSIM3v1lk3b; return(OK); case BSIM3v1_MOD_LW0: value->rValue = model->BSIM3v1lw0; return(OK); case BSIM3v1_MOD_LNLX: value->rValue = model->BSIM3v1lnlx; return(OK); case BSIM3v1_MOD_LDVT0: value->rValue = model->BSIM3v1ldvt0; return(OK); case BSIM3v1_MOD_LDVT1 : value->rValue = model->BSIM3v1ldvt1; return(OK); case BSIM3v1_MOD_LDVT2 : value->rValue = model->BSIM3v1ldvt2; return(OK); case BSIM3v1_MOD_LDVT0W : value->rValue = model->BSIM3v1ldvt0w; return(OK); case BSIM3v1_MOD_LDVT1W : value->rValue = model->BSIM3v1ldvt1w; return(OK); case BSIM3v1_MOD_LDVT2W : value->rValue = model->BSIM3v1ldvt2w; return(OK); case BSIM3v1_MOD_LDROUT : value->rValue = model->BSIM3v1ldrout; return(OK); case BSIM3v1_MOD_LDSUB : value->rValue = model->BSIM3v1ldsub; return(OK); case BSIM3v1_MOD_LVTH0: value->rValue = model->BSIM3v1lvth0; return(OK); case BSIM3v1_MOD_LUA: value->rValue = model->BSIM3v1lua; return(OK); case BSIM3v1_MOD_LUA1: value->rValue = model->BSIM3v1lua1; return(OK); case BSIM3v1_MOD_LUB: value->rValue = model->BSIM3v1lub; return(OK); case BSIM3v1_MOD_LUB1: value->rValue = model->BSIM3v1lub1; return(OK); case BSIM3v1_MOD_LUC: value->rValue = model->BSIM3v1luc; return(OK); case BSIM3v1_MOD_LUC1: value->rValue = model->BSIM3v1luc1; return(OK); case BSIM3v1_MOD_LU0: value->rValue = model->BSIM3v1lu0; return(OK); case BSIM3v1_MOD_LUTE: value->rValue = model->BSIM3v1lute; return(OK); case BSIM3v1_MOD_LVOFF: value->rValue = model->BSIM3v1lvoff; return(OK); case BSIM3v1_MOD_LDELTA: value->rValue = model->BSIM3v1ldelta; return(OK); case BSIM3v1_MOD_LRDSW: value->rValue = model->BSIM3v1lrdsw; return(OK); case BSIM3v1_MOD_LPRWB: value->rValue = model->BSIM3v1lprwb; return(OK); case BSIM3v1_MOD_LPRWG: value->rValue = model->BSIM3v1lprwg; return(OK); case BSIM3v1_MOD_LPRT: value->rValue = model->BSIM3v1lprt; return(OK); case BSIM3v1_MOD_LETA0: value->rValue = model->BSIM3v1leta0; return(OK); case BSIM3v1_MOD_LETAB: value->rValue = model->BSIM3v1letab; return(OK); case BSIM3v1_MOD_LPCLM: value->rValue = model->BSIM3v1lpclm; return(OK); case BSIM3v1_MOD_LPDIBL1: value->rValue = model->BSIM3v1lpdibl1; return(OK); case BSIM3v1_MOD_LPDIBL2: value->rValue = model->BSIM3v1lpdibl2; return(OK); case BSIM3v1_MOD_LPDIBLB: value->rValue = model->BSIM3v1lpdiblb; return(OK); case BSIM3v1_MOD_LPSCBE1: value->rValue = model->BSIM3v1lpscbe1; return(OK); case BSIM3v1_MOD_LPSCBE2: value->rValue = model->BSIM3v1lpscbe2; return(OK); case BSIM3v1_MOD_LPVAG: value->rValue = model->BSIM3v1lpvag; return(OK); case BSIM3v1_MOD_LWR: value->rValue = model->BSIM3v1lwr; return(OK); case BSIM3v1_MOD_LDWG: value->rValue = model->BSIM3v1ldwg; return(OK); case BSIM3v1_MOD_LDWB: value->rValue = model->BSIM3v1ldwb; return(OK); case BSIM3v1_MOD_LB0: value->rValue = model->BSIM3v1lb0; return(OK); case BSIM3v1_MOD_LB1: value->rValue = model->BSIM3v1lb1; return(OK); case BSIM3v1_MOD_LALPHA0: value->rValue = model->BSIM3v1lalpha0; return(OK); case BSIM3v1_MOD_LBETA0: value->rValue = model->BSIM3v1lbeta0; return(OK); case BSIM3v1_MOD_LELM: value->rValue = model->BSIM3v1lelm; return(OK); case BSIM3v1_MOD_LCGSL: value->rValue = model->BSIM3v1lcgsl; return(OK); case BSIM3v1_MOD_LCGDL: value->rValue = model->BSIM3v1lcgdl; return(OK); case BSIM3v1_MOD_LCKAPPA: value->rValue = model->BSIM3v1lckappa; return(OK); case BSIM3v1_MOD_LCF: value->rValue = model->BSIM3v1lcf; return(OK); case BSIM3v1_MOD_LCLC: value->rValue = model->BSIM3v1lclc; return(OK); case BSIM3v1_MOD_LCLE: value->rValue = model->BSIM3v1lcle; return(OK); case BSIM3v1_MOD_LVFBCV: value->rValue = model->BSIM3v1lvfbcv; return(OK); /* Width dependence */ case BSIM3v1_MOD_WCDSC : value->rValue = model->BSIM3v1wcdsc; return(OK); case BSIM3v1_MOD_WCDSCB : value->rValue = model->BSIM3v1wcdscb; return(OK); case BSIM3v1_MOD_WCDSCD : value->rValue = model->BSIM3v1wcdscd; return(OK); case BSIM3v1_MOD_WCIT : value->rValue = model->BSIM3v1wcit; return(OK); case BSIM3v1_MOD_WNFACTOR : value->rValue = model->BSIM3v1wnfactor; return(OK); case BSIM3v1_MOD_WXJ: value->rValue = model->BSIM3v1wxj; return(OK); case BSIM3v1_MOD_WVSAT: value->rValue = model->BSIM3v1wvsat; return(OK); case BSIM3v1_MOD_WAT: value->rValue = model->BSIM3v1wat; return(OK); case BSIM3v1_MOD_WA0: value->rValue = model->BSIM3v1wa0; return(OK); case BSIM3v1_MOD_WAGS: value->rValue = model->BSIM3v1wags; return(OK); case BSIM3v1_MOD_WA1: value->rValue = model->BSIM3v1wa1; return(OK); case BSIM3v1_MOD_WA2: value->rValue = model->BSIM3v1wa2; return(OK); case BSIM3v1_MOD_WKETA: value->rValue = model->BSIM3v1wketa; return(OK); case BSIM3v1_MOD_WNSUB: value->rValue = model->BSIM3v1wnsub; return(OK); case BSIM3v1_MOD_WNPEAK: value->rValue = model->BSIM3v1wnpeak; return(OK); case BSIM3v1_MOD_WNGATE: value->rValue = model->BSIM3v1wngate; return(OK); case BSIM3v1_MOD_WGAMMA1: value->rValue = model->BSIM3v1wgamma1; return(OK); case BSIM3v1_MOD_WGAMMA2: value->rValue = model->BSIM3v1wgamma2; return(OK); case BSIM3v1_MOD_WVBX: value->rValue = model->BSIM3v1wvbx; return(OK); case BSIM3v1_MOD_WVBM: value->rValue = model->BSIM3v1wvbm; return(OK); case BSIM3v1_MOD_WXT: value->rValue = model->BSIM3v1wxt; return(OK); case BSIM3v1_MOD_WK1: value->rValue = model->BSIM3v1wk1; return(OK); case BSIM3v1_MOD_WKT1: value->rValue = model->BSIM3v1wkt1; return(OK); case BSIM3v1_MOD_WKT1L: value->rValue = model->BSIM3v1wkt1l; return(OK); case BSIM3v1_MOD_WKT2 : value->rValue = model->BSIM3v1wkt2; return(OK); case BSIM3v1_MOD_WK2 : value->rValue = model->BSIM3v1wk2; return(OK); case BSIM3v1_MOD_WK3: value->rValue = model->BSIM3v1wk3; return(OK); case BSIM3v1_MOD_WK3B: value->rValue = model->BSIM3v1wk3b; return(OK); case BSIM3v1_MOD_WW0: value->rValue = model->BSIM3v1ww0; return(OK); case BSIM3v1_MOD_WNLX: value->rValue = model->BSIM3v1wnlx; return(OK); case BSIM3v1_MOD_WDVT0: value->rValue = model->BSIM3v1wdvt0; return(OK); case BSIM3v1_MOD_WDVT1 : value->rValue = model->BSIM3v1wdvt1; return(OK); case BSIM3v1_MOD_WDVT2 : value->rValue = model->BSIM3v1wdvt2; return(OK); case BSIM3v1_MOD_WDVT0W : value->rValue = model->BSIM3v1wdvt0w; return(OK); case BSIM3v1_MOD_WDVT1W : value->rValue = model->BSIM3v1wdvt1w; return(OK); case BSIM3v1_MOD_WDVT2W : value->rValue = model->BSIM3v1wdvt2w; return(OK); case BSIM3v1_MOD_WDROUT : value->rValue = model->BSIM3v1wdrout; return(OK); case BSIM3v1_MOD_WDSUB : value->rValue = model->BSIM3v1wdsub; return(OK); case BSIM3v1_MOD_WVTH0: value->rValue = model->BSIM3v1wvth0; return(OK); case BSIM3v1_MOD_WUA: value->rValue = model->BSIM3v1wua; return(OK); case BSIM3v1_MOD_WUA1: value->rValue = model->BSIM3v1wua1; return(OK); case BSIM3v1_MOD_WUB: value->rValue = model->BSIM3v1wub; return(OK); case BSIM3v1_MOD_WUB1: value->rValue = model->BSIM3v1wub1; return(OK); case BSIM3v1_MOD_WUC: value->rValue = model->BSIM3v1wuc; return(OK); case BSIM3v1_MOD_WUC1: value->rValue = model->BSIM3v1wuc1; return(OK); case BSIM3v1_MOD_WU0: value->rValue = model->BSIM3v1wu0; return(OK); case BSIM3v1_MOD_WUTE: value->rValue = model->BSIM3v1wute; return(OK); case BSIM3v1_MOD_WVOFF: value->rValue = model->BSIM3v1wvoff; return(OK); case BSIM3v1_MOD_WDELTA: value->rValue = model->BSIM3v1wdelta; return(OK); case BSIM3v1_MOD_WRDSW: value->rValue = model->BSIM3v1wrdsw; return(OK); case BSIM3v1_MOD_WPRWB: value->rValue = model->BSIM3v1wprwb; return(OK); case BSIM3v1_MOD_WPRWG: value->rValue = model->BSIM3v1wprwg; return(OK); case BSIM3v1_MOD_WPRT: value->rValue = model->BSIM3v1wprt; return(OK); case BSIM3v1_MOD_WETA0: value->rValue = model->BSIM3v1weta0; return(OK); case BSIM3v1_MOD_WETAB: value->rValue = model->BSIM3v1wetab; return(OK); case BSIM3v1_MOD_WPCLM: value->rValue = model->BSIM3v1wpclm; return(OK); case BSIM3v1_MOD_WPDIBL1: value->rValue = model->BSIM3v1wpdibl1; return(OK); case BSIM3v1_MOD_WPDIBL2: value->rValue = model->BSIM3v1wpdibl2; return(OK); case BSIM3v1_MOD_WPDIBLB: value->rValue = model->BSIM3v1wpdiblb; return(OK); case BSIM3v1_MOD_WPSCBE1: value->rValue = model->BSIM3v1wpscbe1; return(OK); case BSIM3v1_MOD_WPSCBE2: value->rValue = model->BSIM3v1wpscbe2; return(OK); case BSIM3v1_MOD_WPVAG: value->rValue = model->BSIM3v1wpvag; return(OK); case BSIM3v1_MOD_WWR: value->rValue = model->BSIM3v1wwr; return(OK); case BSIM3v1_MOD_WDWG: value->rValue = model->BSIM3v1wdwg; return(OK); case BSIM3v1_MOD_WDWB: value->rValue = model->BSIM3v1wdwb; return(OK); case BSIM3v1_MOD_WB0: value->rValue = model->BSIM3v1wb0; return(OK); case BSIM3v1_MOD_WB1: value->rValue = model->BSIM3v1wb1; return(OK); case BSIM3v1_MOD_WALPHA0: value->rValue = model->BSIM3v1walpha0; return(OK); case BSIM3v1_MOD_WBETA0: value->rValue = model->BSIM3v1wbeta0; return(OK); case BSIM3v1_MOD_WELM: value->rValue = model->BSIM3v1welm; return(OK); case BSIM3v1_MOD_WCGSL: value->rValue = model->BSIM3v1wcgsl; return(OK); case BSIM3v1_MOD_WCGDL: value->rValue = model->BSIM3v1wcgdl; return(OK); case BSIM3v1_MOD_WCKAPPA: value->rValue = model->BSIM3v1wckappa; return(OK); case BSIM3v1_MOD_WCF: value->rValue = model->BSIM3v1wcf; return(OK); case BSIM3v1_MOD_WCLC: value->rValue = model->BSIM3v1wclc; return(OK); case BSIM3v1_MOD_WCLE: value->rValue = model->BSIM3v1wcle; return(OK); case BSIM3v1_MOD_WVFBCV: value->rValue = model->BSIM3v1wvfbcv; return(OK); /* Cross-term dependence */ case BSIM3v1_MOD_PCDSC : value->rValue = model->BSIM3v1pcdsc; return(OK); case BSIM3v1_MOD_PCDSCB : value->rValue = model->BSIM3v1pcdscb; return(OK); case BSIM3v1_MOD_PCDSCD : value->rValue = model->BSIM3v1pcdscd; return(OK); case BSIM3v1_MOD_PCIT : value->rValue = model->BSIM3v1pcit; return(OK); case BSIM3v1_MOD_PNFACTOR : value->rValue = model->BSIM3v1pnfactor; return(OK); case BSIM3v1_MOD_PXJ: value->rValue = model->BSIM3v1pxj; return(OK); case BSIM3v1_MOD_PVSAT: value->rValue = model->BSIM3v1pvsat; return(OK); case BSIM3v1_MOD_PAT: value->rValue = model->BSIM3v1pat; return(OK); case BSIM3v1_MOD_PA0: value->rValue = model->BSIM3v1pa0; return(OK); case BSIM3v1_MOD_PAGS: value->rValue = model->BSIM3v1pags; return(OK); case BSIM3v1_MOD_PA1: value->rValue = model->BSIM3v1pa1; return(OK); case BSIM3v1_MOD_PA2: value->rValue = model->BSIM3v1pa2; return(OK); case BSIM3v1_MOD_PKETA: value->rValue = model->BSIM3v1pketa; return(OK); case BSIM3v1_MOD_PNSUB: value->rValue = model->BSIM3v1pnsub; return(OK); case BSIM3v1_MOD_PNPEAK: value->rValue = model->BSIM3v1pnpeak; return(OK); case BSIM3v1_MOD_PNGATE: value->rValue = model->BSIM3v1pngate; return(OK); case BSIM3v1_MOD_PGAMMA1: value->rValue = model->BSIM3v1pgamma1; return(OK); case BSIM3v1_MOD_PGAMMA2: value->rValue = model->BSIM3v1pgamma2; return(OK); case BSIM3v1_MOD_PVBX: value->rValue = model->BSIM3v1pvbx; return(OK); case BSIM3v1_MOD_PVBM: value->rValue = model->BSIM3v1pvbm; return(OK); case BSIM3v1_MOD_PXT: value->rValue = model->BSIM3v1pxt; return(OK); case BSIM3v1_MOD_PK1: value->rValue = model->BSIM3v1pk1; return(OK); case BSIM3v1_MOD_PKT1: value->rValue = model->BSIM3v1pkt1; return(OK); case BSIM3v1_MOD_PKT1L: value->rValue = model->BSIM3v1pkt1l; return(OK); case BSIM3v1_MOD_PKT2 : value->rValue = model->BSIM3v1pkt2; return(OK); case BSIM3v1_MOD_PK2 : value->rValue = model->BSIM3v1pk2; return(OK); case BSIM3v1_MOD_PK3: value->rValue = model->BSIM3v1pk3; return(OK); case BSIM3v1_MOD_PK3B: value->rValue = model->BSIM3v1pk3b; return(OK); case BSIM3v1_MOD_PW0: value->rValue = model->BSIM3v1pw0; return(OK); case BSIM3v1_MOD_PNLX: value->rValue = model->BSIM3v1pnlx; return(OK); case BSIM3v1_MOD_PDVT0 : value->rValue = model->BSIM3v1pdvt0; return(OK); case BSIM3v1_MOD_PDVT1 : value->rValue = model->BSIM3v1pdvt1; return(OK); case BSIM3v1_MOD_PDVT2 : value->rValue = model->BSIM3v1pdvt2; return(OK); case BSIM3v1_MOD_PDVT0W : value->rValue = model->BSIM3v1pdvt0w; return(OK); case BSIM3v1_MOD_PDVT1W : value->rValue = model->BSIM3v1pdvt1w; return(OK); case BSIM3v1_MOD_PDVT2W : value->rValue = model->BSIM3v1pdvt2w; return(OK); case BSIM3v1_MOD_PDROUT : value->rValue = model->BSIM3v1pdrout; return(OK); case BSIM3v1_MOD_PDSUB : value->rValue = model->BSIM3v1pdsub; return(OK); case BSIM3v1_MOD_PVTH0: value->rValue = model->BSIM3v1pvth0; return(OK); case BSIM3v1_MOD_PUA: value->rValue = model->BSIM3v1pua; return(OK); case BSIM3v1_MOD_PUA1: value->rValue = model->BSIM3v1pua1; return(OK); case BSIM3v1_MOD_PUB: value->rValue = model->BSIM3v1pub; return(OK); case BSIM3v1_MOD_PUB1: value->rValue = model->BSIM3v1pub1; return(OK); case BSIM3v1_MOD_PUC: value->rValue = model->BSIM3v1puc; return(OK); case BSIM3v1_MOD_PUC1: value->rValue = model->BSIM3v1puc1; return(OK); case BSIM3v1_MOD_PU0: value->rValue = model->BSIM3v1pu0; return(OK); case BSIM3v1_MOD_PUTE: value->rValue = model->BSIM3v1pute; return(OK); case BSIM3v1_MOD_PVOFF: value->rValue = model->BSIM3v1pvoff; return(OK); case BSIM3v1_MOD_PDELTA: value->rValue = model->BSIM3v1pdelta; return(OK); case BSIM3v1_MOD_PRDSW: value->rValue = model->BSIM3v1prdsw; return(OK); case BSIM3v1_MOD_PPRWB: value->rValue = model->BSIM3v1pprwb; return(OK); case BSIM3v1_MOD_PPRWG: value->rValue = model->BSIM3v1pprwg; return(OK); case BSIM3v1_MOD_PPRT: value->rValue = model->BSIM3v1pprt; return(OK); case BSIM3v1_MOD_PETA0: value->rValue = model->BSIM3v1peta0; return(OK); case BSIM3v1_MOD_PETAB: value->rValue = model->BSIM3v1petab; return(OK); case BSIM3v1_MOD_PPCLM: value->rValue = model->BSIM3v1ppclm; return(OK); case BSIM3v1_MOD_PPDIBL1: value->rValue = model->BSIM3v1ppdibl1; return(OK); case BSIM3v1_MOD_PPDIBL2: value->rValue = model->BSIM3v1ppdibl2; return(OK); case BSIM3v1_MOD_PPDIBLB: value->rValue = model->BSIM3v1ppdiblb; return(OK); case BSIM3v1_MOD_PPSCBE1: value->rValue = model->BSIM3v1ppscbe1; return(OK); case BSIM3v1_MOD_PPSCBE2: value->rValue = model->BSIM3v1ppscbe2; return(OK); case BSIM3v1_MOD_PPVAG: value->rValue = model->BSIM3v1ppvag; return(OK); case BSIM3v1_MOD_PWR: value->rValue = model->BSIM3v1pwr; return(OK); case BSIM3v1_MOD_PDWG: value->rValue = model->BSIM3v1pdwg; return(OK); case BSIM3v1_MOD_PDWB: value->rValue = model->BSIM3v1pdwb; return(OK); case BSIM3v1_MOD_PB0: value->rValue = model->BSIM3v1pb0; return(OK); case BSIM3v1_MOD_PB1: value->rValue = model->BSIM3v1pb1; return(OK); case BSIM3v1_MOD_PALPHA0: value->rValue = model->BSIM3v1palpha0; return(OK); case BSIM3v1_MOD_PBETA0: value->rValue = model->BSIM3v1pbeta0; return(OK); case BSIM3v1_MOD_PELM: value->rValue = model->BSIM3v1pelm; return(OK); case BSIM3v1_MOD_PCGSL: value->rValue = model->BSIM3v1pcgsl; return(OK); case BSIM3v1_MOD_PCGDL: value->rValue = model->BSIM3v1pcgdl; return(OK); case BSIM3v1_MOD_PCKAPPA: value->rValue = model->BSIM3v1pckappa; return(OK); case BSIM3v1_MOD_PCF: value->rValue = model->BSIM3v1pcf; return(OK); case BSIM3v1_MOD_PCLC: value->rValue = model->BSIM3v1pclc; return(OK); case BSIM3v1_MOD_PCLE: value->rValue = model->BSIM3v1pcle; return(OK); case BSIM3v1_MOD_PVFBCV: value->rValue = model->BSIM3v1pvfbcv; return(OK); case BSIM3v1_MOD_TNOM : value->rValue = model->BSIM3v1tnom; return(OK); case BSIM3v1_MOD_CGSO: value->rValue = model->BSIM3v1cgso; return(OK); case BSIM3v1_MOD_CGDO: value->rValue = model->BSIM3v1cgdo; return(OK); case BSIM3v1_MOD_CGBO: value->rValue = model->BSIM3v1cgbo; return(OK); case BSIM3v1_MOD_XPART: value->rValue = model->BSIM3v1xpart; return(OK); case BSIM3v1_MOD_RSH: value->rValue = model->BSIM3v1sheetResistance; return(OK); case BSIM3v1_MOD_JS: value->rValue = model->BSIM3v1jctSatCurDensity; return(OK); case BSIM3v1_MOD_JSW: value->rValue = model->BSIM3v1jctSidewallSatCurDensity; return(OK); case BSIM3v1_MOD_PB: value->rValue = model->BSIM3v1bulkJctPotential; return(OK); case BSIM3v1_MOD_MJ: value->rValue = model->BSIM3v1bulkJctBotGradingCoeff; return(OK); case BSIM3v1_MOD_PBSW: value->rValue = model->BSIM3v1sidewallJctPotential; return(OK); case BSIM3v1_MOD_MJSW: value->rValue = model->BSIM3v1bulkJctSideGradingCoeff; return(OK); case BSIM3v1_MOD_CJ: value->rValue = model->BSIM3v1unitAreaJctCap; return(OK); case BSIM3v1_MOD_CJSW: value->rValue = model->BSIM3v1unitLengthSidewallJctCap; return(OK); case BSIM3v1_MOD_PBSWG: value->rValue = model->BSIM3v1GatesidewallJctPotential; return(OK); case BSIM3v1_MOD_MJSWG: value->rValue = model->BSIM3v1bulkJctGateSideGradingCoeff; return(OK); case BSIM3v1_MOD_CJSWG: value->rValue = model->BSIM3v1unitLengthGateSidewallJctCap; return(OK); case BSIM3v1_MOD_NJ: value->rValue = model->BSIM3v1jctEmissionCoeff; return(OK); case BSIM3v1_MOD_XTI: value->rValue = model->BSIM3v1jctTempExponent; return(OK); case BSIM3v1_MOD_LINT: value->rValue = model->BSIM3v1Lint; return(OK); case BSIM3v1_MOD_LL: value->rValue = model->BSIM3v1Ll; return(OK); case BSIM3v1_MOD_LLN: value->rValue = model->BSIM3v1Lln; return(OK); case BSIM3v1_MOD_LW: value->rValue = model->BSIM3v1Lw; return(OK); case BSIM3v1_MOD_LWN: value->rValue = model->BSIM3v1Lwn; return(OK); case BSIM3v1_MOD_LWL: value->rValue = model->BSIM3v1Lwl; return(OK); case BSIM3v1_MOD_LMIN: value->rValue = model->BSIM3v1Lmin; return(OK); case BSIM3v1_MOD_LMAX: value->rValue = model->BSIM3v1Lmax; return(OK); case BSIM3v1_MOD_WINT: value->rValue = model->BSIM3v1Wint; return(OK); case BSIM3v1_MOD_WL: value->rValue = model->BSIM3v1Wl; return(OK); case BSIM3v1_MOD_WLN: value->rValue = model->BSIM3v1Wln; return(OK); case BSIM3v1_MOD_WW: value->rValue = model->BSIM3v1Ww; return(OK); case BSIM3v1_MOD_WWN: value->rValue = model->BSIM3v1Wwn; return(OK); case BSIM3v1_MOD_WWL: value->rValue = model->BSIM3v1Wwl; return(OK); case BSIM3v1_MOD_WMIN: value->rValue = model->BSIM3v1Wmin; return(OK); case BSIM3v1_MOD_WMAX: value->rValue = model->BSIM3v1Wmax; return(OK); case BSIM3v1_MOD_NOIA: value->rValue = model->BSIM3v1oxideTrapDensityA; return(OK); case BSIM3v1_MOD_NOIB: value->rValue = model->BSIM3v1oxideTrapDensityB; return(OK); case BSIM3v1_MOD_NOIC: value->rValue = model->BSIM3v1oxideTrapDensityC; return(OK); case BSIM3v1_MOD_EM: value->rValue = model->BSIM3v1em; return(OK); case BSIM3v1_MOD_EF: value->rValue = model->BSIM3v1ef; return(OK); case BSIM3v1_MOD_AF: value->rValue = model->BSIM3v1af; return(OK); case BSIM3v1_MOD_KF: value->rValue = model->BSIM3v1kf; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v1/bsim3v1def.h0000644000265600020320000014462112264261473021644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. Modified: 2002 Paolo Nenzi. File: bsim3v1def.h **********/ #ifndef BSIM3v1 #define BSIM3v1 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM3v1instance { struct sBSIM3v1model *BSIM3v1modPtr; struct sBSIM3v1instance *BSIM3v1nextInstance; IFuid BSIM3v1name; int BSIM3v1states; /* index into state table for this device */ int BSIM3v1dNode; int BSIM3v1gNode; int BSIM3v1sNode; int BSIM3v1bNode; int BSIM3v1dNodePrime; int BSIM3v1sNodePrime; int BSIM3v1qNode; /* MCJ */ /* MCJ */ double BSIM3v1ueff; double BSIM3v1thetavth; double BSIM3v1von; double BSIM3v1vdsat; double BSIM3v1cgdo; double BSIM3v1cgso; double BSIM3v1l; double BSIM3v1w; double BSIM3v1m; double BSIM3v1drainArea; double BSIM3v1sourceArea; double BSIM3v1drainSquares; double BSIM3v1sourceSquares; double BSIM3v1drainPerimeter; double BSIM3v1sourcePerimeter; double BSIM3v1sourceConductance; double BSIM3v1drainConductance; double BSIM3v1icVBS; double BSIM3v1icVDS; double BSIM3v1icVGS; int BSIM3v1off; int BSIM3v1mode; int BSIM3v1nqsMod; /* OP point */ double BSIM3v1qinv; double BSIM3v1cd; double BSIM3v1cbs; double BSIM3v1cbd; double BSIM3v1csub; double BSIM3v1gm; double BSIM3v1gds; double BSIM3v1gmbs; double BSIM3v1gbd; double BSIM3v1gbs; double BSIM3v1gbbs; double BSIM3v1gbgs; double BSIM3v1gbds; double BSIM3v1cggb; double BSIM3v1cgdb; double BSIM3v1cgsb; double BSIM3v1cbgb; double BSIM3v1cbdb; double BSIM3v1cbsb; double BSIM3v1cdgb; double BSIM3v1cddb; double BSIM3v1cdsb; double BSIM3v1capbd; double BSIM3v1capbs; double BSIM3v1cqgb; double BSIM3v1cqdb; double BSIM3v1cqsb; double BSIM3v1cqbb; double BSIM3v1gtau; double BSIM3v1gtg; double BSIM3v1gtd; double BSIM3v1gts; double BSIM3v1gtb; double BSIM3v1tconst; struct bsim3v1SizeDependParam *pParam; unsigned BSIM3v1lGiven :1; unsigned BSIM3v1wGiven :1; unsigned BSIM3v1mGiven :1; unsigned BSIM3v1drainAreaGiven :1; unsigned BSIM3v1sourceAreaGiven :1; unsigned BSIM3v1drainSquaresGiven :1; unsigned BSIM3v1sourceSquaresGiven :1; unsigned BSIM3v1drainPerimeterGiven :1; unsigned BSIM3v1sourcePerimeterGiven :1; unsigned BSIM3v1dNodePrimeSet :1; unsigned BSIM3v1sNodePrimeSet :1; unsigned BSIM3v1icVBSGiven :1; unsigned BSIM3v1icVDSGiven :1; unsigned BSIM3v1icVGSGiven :1; unsigned BSIM3v1nqsModGiven :1; double *BSIM3v1DdPtr; double *BSIM3v1GgPtr; double *BSIM3v1SsPtr; double *BSIM3v1BbPtr; double *BSIM3v1DPdpPtr; double *BSIM3v1SPspPtr; double *BSIM3v1DdpPtr; double *BSIM3v1GbPtr; double *BSIM3v1GdpPtr; double *BSIM3v1GspPtr; double *BSIM3v1SspPtr; double *BSIM3v1BdpPtr; double *BSIM3v1BspPtr; double *BSIM3v1DPspPtr; double *BSIM3v1DPdPtr; double *BSIM3v1BgPtr; double *BSIM3v1DPgPtr; double *BSIM3v1SPgPtr; double *BSIM3v1SPsPtr; double *BSIM3v1DPbPtr; double *BSIM3v1SPbPtr; double *BSIM3v1SPdpPtr; double *BSIM3v1QqPtr; double *BSIM3v1QdpPtr; double *BSIM3v1QgPtr; double *BSIM3v1QspPtr; double *BSIM3v1QbPtr; double *BSIM3v1DPqPtr; double *BSIM3v1GqPtr; double *BSIM3v1SPqPtr; double *BSIM3v1BqPtr; #define BSIM3v1vbd BSIM3v1states+ 0 #define BSIM3v1vbs BSIM3v1states+ 1 #define BSIM3v1vgs BSIM3v1states+ 2 #define BSIM3v1vds BSIM3v1states+ 3 #define BSIM3v1qb BSIM3v1states+ 4 #define BSIM3v1cqb BSIM3v1states+ 5 #define BSIM3v1qg BSIM3v1states+ 6 #define BSIM3v1cqg BSIM3v1states+ 7 #define BSIM3v1qd BSIM3v1states+ 8 #define BSIM3v1cqd BSIM3v1states+ 9 #define BSIM3v1qbs BSIM3v1states+ 10 #define BSIM3v1qbd BSIM3v1states+ 11 #define BSIM3v1qcheq BSIM3v1states+ 12 #define BSIM3v1cqcheq BSIM3v1states+ 13 #define BSIM3v1qcdump BSIM3v1states+ 14 #define BSIM3v1cqcdump BSIM3v1states+ 15 #define BSIM3v1tau BSIM3v1states+ 16 #define BSIM3v1qdef BSIM3v1states+ 17 #define BSIM3v1numStates 18 /* indices to the array of BSIM3v1 NOISE SOURCES */ #define BSIM3v1RDNOIZ 0 #define BSIM3v1RSNOIZ 1 #define BSIM3v1IDNOIZ 2 #define BSIM3v1FLNOIZ 3 #define BSIM3v1TOTNOIZ 4 #define BSIM3v1NSRCS 5 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double BSIM3v1nVar[NSTATVARS][BSIM3v1NSRCS]; #else /* NONOISE */ double **BSIM3v1nVar; #endif /* NONOISE */ } BSIM3v1instance ; struct bsim3v1SizeDependParam { double Width; double Length; double BSIM3v1cdsc; double BSIM3v1cdscb; double BSIM3v1cdscd; double BSIM3v1cit; double BSIM3v1nfactor; double BSIM3v1xj; double BSIM3v1vsat; double BSIM3v1at; double BSIM3v1a0; double BSIM3v1ags; double BSIM3v1a1; double BSIM3v1a2; double BSIM3v1keta; double BSIM3v1nsub; double BSIM3v1npeak; double BSIM3v1ngate; double BSIM3v1gamma1; double BSIM3v1gamma2; double BSIM3v1vbx; double BSIM3v1vbi; double BSIM3v1vbm; double BSIM3v1vbsc; double BSIM3v1xt; double BSIM3v1phi; double BSIM3v1litl; double BSIM3v1k1; double BSIM3v1kt1; double BSIM3v1kt1l; double BSIM3v1kt2; double BSIM3v1k2; double BSIM3v1k3; double BSIM3v1k3b; double BSIM3v1w0; double BSIM3v1nlx; double BSIM3v1dvt0; double BSIM3v1dvt1; double BSIM3v1dvt2; double BSIM3v1dvt0w; double BSIM3v1dvt1w; double BSIM3v1dvt2w; double BSIM3v1drout; double BSIM3v1dsub; double BSIM3v1vth0; double BSIM3v1ua; double BSIM3v1ua1; double BSIM3v1ub; double BSIM3v1ub1; double BSIM3v1uc; double BSIM3v1uc1; double BSIM3v1u0; double BSIM3v1ute; double BSIM3v1voff; double BSIM3v1vfb; double BSIM3v1delta; double BSIM3v1rdsw; double BSIM3v1rds0; double BSIM3v1prwg; double BSIM3v1prwb; double BSIM3v1prt; double BSIM3v1eta0; double BSIM3v1etab; double BSIM3v1pclm; double BSIM3v1pdibl1; double BSIM3v1pdibl2; double BSIM3v1pdiblb; double BSIM3v1pscbe1; double BSIM3v1pscbe2; double BSIM3v1pvag; double BSIM3v1wr; double BSIM3v1dwg; double BSIM3v1dwb; double BSIM3v1b0; double BSIM3v1b1; double BSIM3v1alpha0; double BSIM3v1beta0; /* CV model */ double BSIM3v1elm; double BSIM3v1cgsl; double BSIM3v1cgdl; double BSIM3v1ckappa; double BSIM3v1cf; double BSIM3v1clc; double BSIM3v1cle; double BSIM3v1vfbcv; /* Pre-calculated constants */ double BSIM3v1dw; double BSIM3v1dl; double BSIM3v1leff; double BSIM3v1weff; double BSIM3v1dwc; double BSIM3v1dlc; double BSIM3v1leffCV; double BSIM3v1weffCV; double BSIM3v1abulkCVfactor; double BSIM3v1cgso; double BSIM3v1cgdo; double BSIM3v1cgbo; double BSIM3v1u0temp; double BSIM3v1vsattemp; double BSIM3v1sqrtPhi; double BSIM3v1phis3; double BSIM3v1Xdep0; double BSIM3v1sqrtXdep0; double BSIM3v1theta0vb0; double BSIM3v1thetaRout; double BSIM3v1cof1; double BSIM3v1cof2; double BSIM3v1cof3; double BSIM3v1cof4; double BSIM3v1cdep0; struct bsim3v1SizeDependParam *pNext; }; typedef struct sBSIM3v1model { int BSIM3v1modType; struct sBSIM3v1model *BSIM3v1nextModel; BSIM3v1instance *BSIM3v1instances; IFuid BSIM3v1modName; int BSIM3v1type; int BSIM3v1mobMod; int BSIM3v1capMod; int BSIM3v1nqsMod; int BSIM3v1noiMod; int BSIM3v1binUnit; int BSIM3v1paramChk; double BSIM3v1version; double BSIM3v1tox; double BSIM3v1cdsc; double BSIM3v1cdscb; double BSIM3v1cdscd; double BSIM3v1cit; double BSIM3v1nfactor; double BSIM3v1xj; double BSIM3v1vsat; double BSIM3v1at; double BSIM3v1a0; double BSIM3v1ags; double BSIM3v1a1; double BSIM3v1a2; double BSIM3v1keta; double BSIM3v1nsub; double BSIM3v1npeak; double BSIM3v1ngate; double BSIM3v1gamma1; double BSIM3v1gamma2; double BSIM3v1vbx; double BSIM3v1vbm; double BSIM3v1xt; double BSIM3v1k1; double BSIM3v1kt1; double BSIM3v1kt1l; double BSIM3v1kt2; double BSIM3v1k2; double BSIM3v1k3; double BSIM3v1k3b; double BSIM3v1w0; double BSIM3v1nlx; double BSIM3v1dvt0; double BSIM3v1dvt1; double BSIM3v1dvt2; double BSIM3v1dvt0w; double BSIM3v1dvt1w; double BSIM3v1dvt2w; double BSIM3v1drout; double BSIM3v1dsub; double BSIM3v1vth0; double BSIM3v1ua; double BSIM3v1ua1; double BSIM3v1ub; double BSIM3v1ub1; double BSIM3v1uc; double BSIM3v1uc1; double BSIM3v1u0; double BSIM3v1ute; double BSIM3v1voff; double BSIM3v1delta; double BSIM3v1rdsw; double BSIM3v1prwg; double BSIM3v1prwb; double BSIM3v1prt; double BSIM3v1eta0; double BSIM3v1etab; double BSIM3v1pclm; double BSIM3v1pdibl1; double BSIM3v1pdibl2; double BSIM3v1pdiblb; double BSIM3v1pscbe1; double BSIM3v1pscbe2; double BSIM3v1pvag; double BSIM3v1wr; double BSIM3v1dwg; double BSIM3v1dwb; double BSIM3v1b0; double BSIM3v1b1; double BSIM3v1alpha0; double BSIM3v1beta0; /* serban */ double BSIM3v1hdif; /* CV model */ double BSIM3v1elm; double BSIM3v1cgsl; double BSIM3v1cgdl; double BSIM3v1ckappa; double BSIM3v1cf; double BSIM3v1vfbcv; double BSIM3v1clc; double BSIM3v1cle; double BSIM3v1dwc; double BSIM3v1dlc; /* Length Dependence */ double BSIM3v1lcdsc; double BSIM3v1lcdscb; double BSIM3v1lcdscd; double BSIM3v1lcit; double BSIM3v1lnfactor; double BSIM3v1lxj; double BSIM3v1lvsat; double BSIM3v1lat; double BSIM3v1la0; double BSIM3v1lags; double BSIM3v1la1; double BSIM3v1la2; double BSIM3v1lketa; double BSIM3v1lnsub; double BSIM3v1lnpeak; double BSIM3v1lngate; double BSIM3v1lgamma1; double BSIM3v1lgamma2; double BSIM3v1lvbx; double BSIM3v1lvbm; double BSIM3v1lxt; double BSIM3v1lk1; double BSIM3v1lkt1; double BSIM3v1lkt1l; double BSIM3v1lkt2; double BSIM3v1lk2; double BSIM3v1lk3; double BSIM3v1lk3b; double BSIM3v1lw0; double BSIM3v1lnlx; double BSIM3v1ldvt0; double BSIM3v1ldvt1; double BSIM3v1ldvt2; double BSIM3v1ldvt0w; double BSIM3v1ldvt1w; double BSIM3v1ldvt2w; double BSIM3v1ldrout; double BSIM3v1ldsub; double BSIM3v1lvth0; double BSIM3v1lua; double BSIM3v1lua1; double BSIM3v1lub; double BSIM3v1lub1; double BSIM3v1luc; double BSIM3v1luc1; double BSIM3v1lu0; double BSIM3v1lute; double BSIM3v1lvoff; double BSIM3v1ldelta; double BSIM3v1lrdsw; double BSIM3v1lprwg; double BSIM3v1lprwb; double BSIM3v1lprt; double BSIM3v1leta0; double BSIM3v1letab; double BSIM3v1lpclm; double BSIM3v1lpdibl1; double BSIM3v1lpdibl2; double BSIM3v1lpdiblb; double BSIM3v1lpscbe1; double BSIM3v1lpscbe2; double BSIM3v1lpvag; double BSIM3v1lwr; double BSIM3v1ldwg; double BSIM3v1ldwb; double BSIM3v1lb0; double BSIM3v1lb1; double BSIM3v1lalpha0; double BSIM3v1lbeta0; /* CV model */ double BSIM3v1lelm; double BSIM3v1lcgsl; double BSIM3v1lcgdl; double BSIM3v1lckappa; double BSIM3v1lcf; double BSIM3v1lclc; double BSIM3v1lcle; double BSIM3v1lvfbcv; /* Width Dependence */ double BSIM3v1wcdsc; double BSIM3v1wcdscb; double BSIM3v1wcdscd; double BSIM3v1wcit; double BSIM3v1wnfactor; double BSIM3v1wxj; double BSIM3v1wvsat; double BSIM3v1wat; double BSIM3v1wa0; double BSIM3v1wags; double BSIM3v1wa1; double BSIM3v1wa2; double BSIM3v1wketa; double BSIM3v1wnsub; double BSIM3v1wnpeak; double BSIM3v1wngate; double BSIM3v1wgamma1; double BSIM3v1wgamma2; double BSIM3v1wvbx; double BSIM3v1wvbm; double BSIM3v1wxt; double BSIM3v1wk1; double BSIM3v1wkt1; double BSIM3v1wkt1l; double BSIM3v1wkt2; double BSIM3v1wk2; double BSIM3v1wk3; double BSIM3v1wk3b; double BSIM3v1ww0; double BSIM3v1wnlx; double BSIM3v1wdvt0; double BSIM3v1wdvt1; double BSIM3v1wdvt2; double BSIM3v1wdvt0w; double BSIM3v1wdvt1w; double BSIM3v1wdvt2w; double BSIM3v1wdrout; double BSIM3v1wdsub; double BSIM3v1wvth0; double BSIM3v1wua; double BSIM3v1wua1; double BSIM3v1wub; double BSIM3v1wub1; double BSIM3v1wuc; double BSIM3v1wuc1; double BSIM3v1wu0; double BSIM3v1wute; double BSIM3v1wvoff; double BSIM3v1wdelta; double BSIM3v1wrdsw; double BSIM3v1wprwg; double BSIM3v1wprwb; double BSIM3v1wprt; double BSIM3v1weta0; double BSIM3v1wetab; double BSIM3v1wpclm; double BSIM3v1wpdibl1; double BSIM3v1wpdibl2; double BSIM3v1wpdiblb; double BSIM3v1wpscbe1; double BSIM3v1wpscbe2; double BSIM3v1wpvag; double BSIM3v1wwr; double BSIM3v1wdwg; double BSIM3v1wdwb; double BSIM3v1wb0; double BSIM3v1wb1; double BSIM3v1walpha0; double BSIM3v1wbeta0; /* CV model */ double BSIM3v1welm; double BSIM3v1wcgsl; double BSIM3v1wcgdl; double BSIM3v1wckappa; double BSIM3v1wcf; double BSIM3v1wclc; double BSIM3v1wcle; double BSIM3v1wvfbcv; /* Cross-term Dependence */ double BSIM3v1pcdsc; double BSIM3v1pcdscb; double BSIM3v1pcdscd; double BSIM3v1pcit; double BSIM3v1pnfactor; double BSIM3v1pxj; double BSIM3v1pvsat; double BSIM3v1pat; double BSIM3v1pa0; double BSIM3v1pags; double BSIM3v1pa1; double BSIM3v1pa2; double BSIM3v1pketa; double BSIM3v1pnsub; double BSIM3v1pnpeak; double BSIM3v1pngate; double BSIM3v1pgamma1; double BSIM3v1pgamma2; double BSIM3v1pvbx; double BSIM3v1pvbm; double BSIM3v1pxt; double BSIM3v1pk1; double BSIM3v1pkt1; double BSIM3v1pkt1l; double BSIM3v1pkt2; double BSIM3v1pk2; double BSIM3v1pk3; double BSIM3v1pk3b; double BSIM3v1pw0; double BSIM3v1pnlx; double BSIM3v1pdvt0; double BSIM3v1pdvt1; double BSIM3v1pdvt2; double BSIM3v1pdvt0w; double BSIM3v1pdvt1w; double BSIM3v1pdvt2w; double BSIM3v1pdrout; double BSIM3v1pdsub; double BSIM3v1pvth0; double BSIM3v1pua; double BSIM3v1pua1; double BSIM3v1pub; double BSIM3v1pub1; double BSIM3v1puc; double BSIM3v1puc1; double BSIM3v1pu0; double BSIM3v1pute; double BSIM3v1pvoff; double BSIM3v1pdelta; double BSIM3v1prdsw; double BSIM3v1pprwg; double BSIM3v1pprwb; double BSIM3v1pprt; double BSIM3v1peta0; double BSIM3v1petab; double BSIM3v1ppclm; double BSIM3v1ppdibl1; double BSIM3v1ppdibl2; double BSIM3v1ppdiblb; double BSIM3v1ppscbe1; double BSIM3v1ppscbe2; double BSIM3v1ppvag; double BSIM3v1pwr; double BSIM3v1pdwg; double BSIM3v1pdwb; double BSIM3v1pb0; double BSIM3v1pb1; double BSIM3v1palpha0; double BSIM3v1pbeta0; /* CV model */ double BSIM3v1pelm; double BSIM3v1pcgsl; double BSIM3v1pcgdl; double BSIM3v1pckappa; double BSIM3v1pcf; double BSIM3v1pclc; double BSIM3v1pcle; double BSIM3v1pvfbcv; double BSIM3v1tnom; double BSIM3v1cgso; double BSIM3v1cgdo; double BSIM3v1cgbo; double BSIM3v1xpart; double BSIM3v1cFringOut; double BSIM3v1cFringMax; double BSIM3v1sheetResistance; double BSIM3v1jctSatCurDensity; double BSIM3v1jctSidewallSatCurDensity; double BSIM3v1bulkJctPotential; double BSIM3v1bulkJctBotGradingCoeff; double BSIM3v1bulkJctSideGradingCoeff; double BSIM3v1bulkJctGateSideGradingCoeff; double BSIM3v1sidewallJctPotential; double BSIM3v1GatesidewallJctPotential; double BSIM3v1unitAreaJctCap; double BSIM3v1unitLengthSidewallJctCap; double BSIM3v1unitLengthGateSidewallJctCap; double BSIM3v1jctEmissionCoeff; double BSIM3v1jctTempExponent; double BSIM3v1Lint; double BSIM3v1Ll; double BSIM3v1Lln; double BSIM3v1Lw; double BSIM3v1Lwn; double BSIM3v1Lwl; double BSIM3v1Lmin; double BSIM3v1Lmax; double BSIM3v1Wint; double BSIM3v1Wl; double BSIM3v1Wln; double BSIM3v1Ww; double BSIM3v1Wwn; double BSIM3v1Wwl; double BSIM3v1Wmin; double BSIM3v1Wmax; /* Pre-calculated constants */ /* MCJ: move to size-dependent param. */ double BSIM3v1vtm; double BSIM3v1cox; double BSIM3v1cof1; double BSIM3v1cof2; double BSIM3v1cof3; double BSIM3v1cof4; double BSIM3v1vcrit; double BSIM3v1factor1; double BSIM3v1jctTempSatCurDensity; double BSIM3v1jctSidewallTempSatCurDensity; double BSIM3v1oxideTrapDensityA; double BSIM3v1oxideTrapDensityB; double BSIM3v1oxideTrapDensityC; double BSIM3v1em; double BSIM3v1ef; double BSIM3v1af; double BSIM3v1kf; struct bsim3v1SizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned BSIM3v1mobModGiven :1; unsigned BSIM3v1binUnitGiven :1; unsigned BSIM3v1capModGiven :1; unsigned BSIM3v1paramChkGiven :1; unsigned BSIM3v1nqsModGiven :1; unsigned BSIM3v1noiModGiven :1; unsigned BSIM3v1typeGiven :1; unsigned BSIM3v1toxGiven :1; unsigned BSIM3v1versionGiven :1; unsigned BSIM3v1cdscGiven :1; unsigned BSIM3v1cdscbGiven :1; unsigned BSIM3v1cdscdGiven :1; unsigned BSIM3v1citGiven :1; unsigned BSIM3v1nfactorGiven :1; unsigned BSIM3v1xjGiven :1; unsigned BSIM3v1vsatGiven :1; unsigned BSIM3v1atGiven :1; unsigned BSIM3v1a0Given :1; unsigned BSIM3v1agsGiven :1; unsigned BSIM3v1a1Given :1; unsigned BSIM3v1a2Given :1; unsigned BSIM3v1ketaGiven :1; unsigned BSIM3v1nsubGiven :1; unsigned BSIM3v1npeakGiven :1; unsigned BSIM3v1ngateGiven :1; unsigned BSIM3v1gamma1Given :1; unsigned BSIM3v1gamma2Given :1; unsigned BSIM3v1vbxGiven :1; unsigned BSIM3v1vbmGiven :1; unsigned BSIM3v1xtGiven :1; unsigned BSIM3v1k1Given :1; unsigned BSIM3v1kt1Given :1; unsigned BSIM3v1kt1lGiven :1; unsigned BSIM3v1kt2Given :1; unsigned BSIM3v1k2Given :1; unsigned BSIM3v1k3Given :1; unsigned BSIM3v1k3bGiven :1; unsigned BSIM3v1w0Given :1; unsigned BSIM3v1nlxGiven :1; unsigned BSIM3v1dvt0Given :1; unsigned BSIM3v1dvt1Given :1; unsigned BSIM3v1dvt2Given :1; unsigned BSIM3v1dvt0wGiven :1; unsigned BSIM3v1dvt1wGiven :1; unsigned BSIM3v1dvt2wGiven :1; unsigned BSIM3v1droutGiven :1; unsigned BSIM3v1dsubGiven :1; unsigned BSIM3v1vth0Given :1; unsigned BSIM3v1uaGiven :1; unsigned BSIM3v1ua1Given :1; unsigned BSIM3v1ubGiven :1; unsigned BSIM3v1ub1Given :1; unsigned BSIM3v1ucGiven :1; unsigned BSIM3v1uc1Given :1; unsigned BSIM3v1u0Given :1; unsigned BSIM3v1uteGiven :1; unsigned BSIM3v1voffGiven :1; unsigned BSIM3v1rdswGiven :1; unsigned BSIM3v1prwgGiven :1; unsigned BSIM3v1prwbGiven :1; unsigned BSIM3v1prtGiven :1; unsigned BSIM3v1eta0Given :1; unsigned BSIM3v1etabGiven :1; unsigned BSIM3v1pclmGiven :1; unsigned BSIM3v1pdibl1Given :1; unsigned BSIM3v1pdibl2Given :1; unsigned BSIM3v1pdiblbGiven :1; unsigned BSIM3v1pscbe1Given :1; unsigned BSIM3v1pscbe2Given :1; unsigned BSIM3v1pvagGiven :1; unsigned BSIM3v1deltaGiven :1; unsigned BSIM3v1wrGiven :1; unsigned BSIM3v1dwgGiven :1; unsigned BSIM3v1dwbGiven :1; unsigned BSIM3v1b0Given :1; unsigned BSIM3v1b1Given :1; unsigned BSIM3v1alpha0Given :1; unsigned BSIM3v1beta0Given :1; unsigned BSIM3v1hdifGiven :1; /* CV model */ unsigned BSIM3v1elmGiven :1; unsigned BSIM3v1cgslGiven :1; unsigned BSIM3v1cgdlGiven :1; unsigned BSIM3v1ckappaGiven :1; unsigned BSIM3v1cfGiven :1; unsigned BSIM3v1vfbcvGiven :1; unsigned BSIM3v1clcGiven :1; unsigned BSIM3v1cleGiven :1; unsigned BSIM3v1dwcGiven :1; unsigned BSIM3v1dlcGiven :1; /* Length dependence */ unsigned BSIM3v1lcdscGiven :1; unsigned BSIM3v1lcdscbGiven :1; unsigned BSIM3v1lcdscdGiven :1; unsigned BSIM3v1lcitGiven :1; unsigned BSIM3v1lnfactorGiven :1; unsigned BSIM3v1lxjGiven :1; unsigned BSIM3v1lvsatGiven :1; unsigned BSIM3v1latGiven :1; unsigned BSIM3v1la0Given :1; unsigned BSIM3v1lagsGiven :1; unsigned BSIM3v1la1Given :1; unsigned BSIM3v1la2Given :1; unsigned BSIM3v1lketaGiven :1; unsigned BSIM3v1lnsubGiven :1; unsigned BSIM3v1lnpeakGiven :1; unsigned BSIM3v1lngateGiven :1; unsigned BSIM3v1lgamma1Given :1; unsigned BSIM3v1lgamma2Given :1; unsigned BSIM3v1lvbxGiven :1; unsigned BSIM3v1lvbmGiven :1; unsigned BSIM3v1lxtGiven :1; unsigned BSIM3v1lk1Given :1; unsigned BSIM3v1lkt1Given :1; unsigned BSIM3v1lkt1lGiven :1; unsigned BSIM3v1lkt2Given :1; unsigned BSIM3v1lk2Given :1; unsigned BSIM3v1lk3Given :1; unsigned BSIM3v1lk3bGiven :1; unsigned BSIM3v1lw0Given :1; unsigned BSIM3v1lnlxGiven :1; unsigned BSIM3v1ldvt0Given :1; unsigned BSIM3v1ldvt1Given :1; unsigned BSIM3v1ldvt2Given :1; unsigned BSIM3v1ldvt0wGiven :1; unsigned BSIM3v1ldvt1wGiven :1; unsigned BSIM3v1ldvt2wGiven :1; unsigned BSIM3v1ldroutGiven :1; unsigned BSIM3v1ldsubGiven :1; unsigned BSIM3v1lvth0Given :1; unsigned BSIM3v1luaGiven :1; unsigned BSIM3v1lua1Given :1; unsigned BSIM3v1lubGiven :1; unsigned BSIM3v1lub1Given :1; unsigned BSIM3v1lucGiven :1; unsigned BSIM3v1luc1Given :1; unsigned BSIM3v1lu0Given :1; unsigned BSIM3v1luteGiven :1; unsigned BSIM3v1lvoffGiven :1; unsigned BSIM3v1lrdswGiven :1; unsigned BSIM3v1lprwgGiven :1; unsigned BSIM3v1lprwbGiven :1; unsigned BSIM3v1lprtGiven :1; unsigned BSIM3v1leta0Given :1; unsigned BSIM3v1letabGiven :1; unsigned BSIM3v1lpclmGiven :1; unsigned BSIM3v1lpdibl1Given :1; unsigned BSIM3v1lpdibl2Given :1; unsigned BSIM3v1lpdiblbGiven :1; unsigned BSIM3v1lpscbe1Given :1; unsigned BSIM3v1lpscbe2Given :1; unsigned BSIM3v1lpvagGiven :1; unsigned BSIM3v1ldeltaGiven :1; unsigned BSIM3v1lwrGiven :1; unsigned BSIM3v1ldwgGiven :1; unsigned BSIM3v1ldwbGiven :1; unsigned BSIM3v1lb0Given :1; unsigned BSIM3v1lb1Given :1; unsigned BSIM3v1lalpha0Given :1; unsigned BSIM3v1lbeta0Given :1; /* CV model */ unsigned BSIM3v1lelmGiven :1; unsigned BSIM3v1lcgslGiven :1; unsigned BSIM3v1lcgdlGiven :1; unsigned BSIM3v1lckappaGiven :1; unsigned BSIM3v1lcfGiven :1; unsigned BSIM3v1lclcGiven :1; unsigned BSIM3v1lcleGiven :1; unsigned BSIM3v1lvfbcvGiven :1; /* Width dependence */ unsigned BSIM3v1wcdscGiven :1; unsigned BSIM3v1wcdscbGiven :1; unsigned BSIM3v1wcdscdGiven :1; unsigned BSIM3v1wcitGiven :1; unsigned BSIM3v1wnfactorGiven :1; unsigned BSIM3v1wxjGiven :1; unsigned BSIM3v1wvsatGiven :1; unsigned BSIM3v1watGiven :1; unsigned BSIM3v1wa0Given :1; unsigned BSIM3v1wagsGiven :1; unsigned BSIM3v1wa1Given :1; unsigned BSIM3v1wa2Given :1; unsigned BSIM3v1wketaGiven :1; unsigned BSIM3v1wnsubGiven :1; unsigned BSIM3v1wnpeakGiven :1; unsigned BSIM3v1wngateGiven :1; unsigned BSIM3v1wgamma1Given :1; unsigned BSIM3v1wgamma2Given :1; unsigned BSIM3v1wvbxGiven :1; unsigned BSIM3v1wvbmGiven :1; unsigned BSIM3v1wxtGiven :1; unsigned BSIM3v1wk1Given :1; unsigned BSIM3v1wkt1Given :1; unsigned BSIM3v1wkt1lGiven :1; unsigned BSIM3v1wkt2Given :1; unsigned BSIM3v1wk2Given :1; unsigned BSIM3v1wk3Given :1; unsigned BSIM3v1wk3bGiven :1; unsigned BSIM3v1ww0Given :1; unsigned BSIM3v1wnlxGiven :1; unsigned BSIM3v1wdvt0Given :1; unsigned BSIM3v1wdvt1Given :1; unsigned BSIM3v1wdvt2Given :1; unsigned BSIM3v1wdvt0wGiven :1; unsigned BSIM3v1wdvt1wGiven :1; unsigned BSIM3v1wdvt2wGiven :1; unsigned BSIM3v1wdroutGiven :1; unsigned BSIM3v1wdsubGiven :1; unsigned BSIM3v1wvth0Given :1; unsigned BSIM3v1wuaGiven :1; unsigned BSIM3v1wua1Given :1; unsigned BSIM3v1wubGiven :1; unsigned BSIM3v1wub1Given :1; unsigned BSIM3v1wucGiven :1; unsigned BSIM3v1wuc1Given :1; unsigned BSIM3v1wu0Given :1; unsigned BSIM3v1wuteGiven :1; unsigned BSIM3v1wvoffGiven :1; unsigned BSIM3v1wrdswGiven :1; unsigned BSIM3v1wprwgGiven :1; unsigned BSIM3v1wprwbGiven :1; unsigned BSIM3v1wprtGiven :1; unsigned BSIM3v1weta0Given :1; unsigned BSIM3v1wetabGiven :1; unsigned BSIM3v1wpclmGiven :1; unsigned BSIM3v1wpdibl1Given :1; unsigned BSIM3v1wpdibl2Given :1; unsigned BSIM3v1wpdiblbGiven :1; unsigned BSIM3v1wpscbe1Given :1; unsigned BSIM3v1wpscbe2Given :1; unsigned BSIM3v1wpvagGiven :1; unsigned BSIM3v1wdeltaGiven :1; unsigned BSIM3v1wwrGiven :1; unsigned BSIM3v1wdwgGiven :1; unsigned BSIM3v1wdwbGiven :1; unsigned BSIM3v1wb0Given :1; unsigned BSIM3v1wb1Given :1; unsigned BSIM3v1walpha0Given :1; unsigned BSIM3v1wbeta0Given :1; /* CV model */ unsigned BSIM3v1welmGiven :1; unsigned BSIM3v1wcgslGiven :1; unsigned BSIM3v1wcgdlGiven :1; unsigned BSIM3v1wckappaGiven :1; unsigned BSIM3v1wcfGiven :1; unsigned BSIM3v1wclcGiven :1; unsigned BSIM3v1wcleGiven :1; unsigned BSIM3v1wvfbcvGiven :1; /* Cross-term dependence */ unsigned BSIM3v1pcdscGiven :1; unsigned BSIM3v1pcdscbGiven :1; unsigned BSIM3v1pcdscdGiven :1; unsigned BSIM3v1pcitGiven :1; unsigned BSIM3v1pnfactorGiven :1; unsigned BSIM3v1pxjGiven :1; unsigned BSIM3v1pvsatGiven :1; unsigned BSIM3v1patGiven :1; unsigned BSIM3v1pa0Given :1; unsigned BSIM3v1pagsGiven :1; unsigned BSIM3v1pa1Given :1; unsigned BSIM3v1pa2Given :1; unsigned BSIM3v1pketaGiven :1; unsigned BSIM3v1pnsubGiven :1; unsigned BSIM3v1pnpeakGiven :1; unsigned BSIM3v1pngateGiven :1; unsigned BSIM3v1pgamma1Given :1; unsigned BSIM3v1pgamma2Given :1; unsigned BSIM3v1pvbxGiven :1; unsigned BSIM3v1pvbmGiven :1; unsigned BSIM3v1pxtGiven :1; unsigned BSIM3v1pk1Given :1; unsigned BSIM3v1pkt1Given :1; unsigned BSIM3v1pkt1lGiven :1; unsigned BSIM3v1pkt2Given :1; unsigned BSIM3v1pk2Given :1; unsigned BSIM3v1pk3Given :1; unsigned BSIM3v1pk3bGiven :1; unsigned BSIM3v1pw0Given :1; unsigned BSIM3v1pnlxGiven :1; unsigned BSIM3v1pdvt0Given :1; unsigned BSIM3v1pdvt1Given :1; unsigned BSIM3v1pdvt2Given :1; unsigned BSIM3v1pdvt0wGiven :1; unsigned BSIM3v1pdvt1wGiven :1; unsigned BSIM3v1pdvt2wGiven :1; unsigned BSIM3v1pdroutGiven :1; unsigned BSIM3v1pdsubGiven :1; unsigned BSIM3v1pvth0Given :1; unsigned BSIM3v1puaGiven :1; unsigned BSIM3v1pua1Given :1; unsigned BSIM3v1pubGiven :1; unsigned BSIM3v1pub1Given :1; unsigned BSIM3v1pucGiven :1; unsigned BSIM3v1puc1Given :1; unsigned BSIM3v1pu0Given :1; unsigned BSIM3v1puteGiven :1; unsigned BSIM3v1pvoffGiven :1; unsigned BSIM3v1prdswGiven :1; unsigned BSIM3v1pprwgGiven :1; unsigned BSIM3v1pprwbGiven :1; unsigned BSIM3v1pprtGiven :1; unsigned BSIM3v1peta0Given :1; unsigned BSIM3v1petabGiven :1; unsigned BSIM3v1ppclmGiven :1; unsigned BSIM3v1ppdibl1Given :1; unsigned BSIM3v1ppdibl2Given :1; unsigned BSIM3v1ppdiblbGiven :1; unsigned BSIM3v1ppscbe1Given :1; unsigned BSIM3v1ppscbe2Given :1; unsigned BSIM3v1ppvagGiven :1; unsigned BSIM3v1pdeltaGiven :1; unsigned BSIM3v1pwrGiven :1; unsigned BSIM3v1pdwgGiven :1; unsigned BSIM3v1pdwbGiven :1; unsigned BSIM3v1pb0Given :1; unsigned BSIM3v1pb1Given :1; unsigned BSIM3v1palpha0Given :1; unsigned BSIM3v1pbeta0Given :1; /* CV model */ unsigned BSIM3v1pelmGiven :1; unsigned BSIM3v1pcgslGiven :1; unsigned BSIM3v1pcgdlGiven :1; unsigned BSIM3v1pckappaGiven :1; unsigned BSIM3v1pcfGiven :1; unsigned BSIM3v1pclcGiven :1; unsigned BSIM3v1pcleGiven :1; unsigned BSIM3v1pvfbcvGiven :1; unsigned BSIM3v1useFringeGiven :1; unsigned BSIM3v1tnomGiven :1; unsigned BSIM3v1cgsoGiven :1; unsigned BSIM3v1cgdoGiven :1; unsigned BSIM3v1cgboGiven :1; unsigned BSIM3v1xpartGiven :1; unsigned BSIM3v1sheetResistanceGiven :1; unsigned BSIM3v1jctSatCurDensityGiven :1; unsigned BSIM3v1jctSidewallSatCurDensityGiven :1; unsigned BSIM3v1bulkJctPotentialGiven :1; unsigned BSIM3v1bulkJctBotGradingCoeffGiven :1; unsigned BSIM3v1sidewallJctPotentialGiven :1; unsigned BSIM3v1GatesidewallJctPotentialGiven :1; unsigned BSIM3v1bulkJctSideGradingCoeffGiven :1; unsigned BSIM3v1unitAreaJctCapGiven :1; unsigned BSIM3v1unitLengthSidewallJctCapGiven :1; unsigned BSIM3v1bulkJctGateSideGradingCoeffGiven :1; unsigned BSIM3v1unitLengthGateSidewallJctCapGiven :1; unsigned BSIM3v1jctEmissionCoeffGiven :1; unsigned BSIM3v1jctTempExponentGiven :1; unsigned BSIM3v1oxideTrapDensityAGiven :1; unsigned BSIM3v1oxideTrapDensityBGiven :1; unsigned BSIM3v1oxideTrapDensityCGiven :1; unsigned BSIM3v1emGiven :1; unsigned BSIM3v1efGiven :1; unsigned BSIM3v1afGiven :1; unsigned BSIM3v1kfGiven :1; unsigned BSIM3v1LintGiven :1; unsigned BSIM3v1LlGiven :1; unsigned BSIM3v1LlnGiven :1; unsigned BSIM3v1LwGiven :1; unsigned BSIM3v1LwnGiven :1; unsigned BSIM3v1LwlGiven :1; unsigned BSIM3v1LminGiven :1; unsigned BSIM3v1LmaxGiven :1; unsigned BSIM3v1WintGiven :1; unsigned BSIM3v1WlGiven :1; unsigned BSIM3v1WlnGiven :1; unsigned BSIM3v1WwGiven :1; unsigned BSIM3v1WwnGiven :1; unsigned BSIM3v1WwlGiven :1; unsigned BSIM3v1WminGiven :1; unsigned BSIM3v1WmaxGiven :1; } BSIM3v1model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM3v1_W 1 #define BSIM3v1_L 2 #define BSIM3v1_M 15 #define BSIM3v1_AS 3 #define BSIM3v1_AD 4 #define BSIM3v1_PS 5 #define BSIM3v1_PD 6 #define BSIM3v1_NRS 7 #define BSIM3v1_NRD 8 #define BSIM3v1_OFF 9 #define BSIM3v1_IC_VBS 10 #define BSIM3v1_IC_VDS 11 #define BSIM3v1_IC_VGS 12 #define BSIM3v1_IC 13 #define BSIM3v1_NQSMOD 14 /* model parameters */ #define BSIM3v1_MOD_CAPMOD 101 #define BSIM3v1_MOD_NQSMOD 102 #define BSIM3v1_MOD_MOBMOD 103 #define BSIM3v1_MOD_NOIMOD 104 #define BSIM3v1_MOD_TOX 105 #define BSIM3v1_MOD_CDSC 106 #define BSIM3v1_MOD_CDSCB 107 #define BSIM3v1_MOD_CIT 108 #define BSIM3v1_MOD_NFACTOR 109 #define BSIM3v1_MOD_XJ 110 #define BSIM3v1_MOD_VSAT 111 #define BSIM3v1_MOD_AT 112 #define BSIM3v1_MOD_A0 113 #define BSIM3v1_MOD_A1 114 #define BSIM3v1_MOD_A2 115 #define BSIM3v1_MOD_KETA 116 #define BSIM3v1_MOD_NSUB 117 #define BSIM3v1_MOD_NPEAK 118 #define BSIM3v1_MOD_NGATE 120 #define BSIM3v1_MOD_GAMMA1 121 #define BSIM3v1_MOD_GAMMA2 122 #define BSIM3v1_MOD_VBX 123 #define BSIM3v1_MOD_BINUNIT 124 #define BSIM3v1_MOD_VBM 125 #define BSIM3v1_MOD_XT 126 #define BSIM3v1_MOD_K1 129 #define BSIM3v1_MOD_KT1 130 #define BSIM3v1_MOD_KT1L 131 #define BSIM3v1_MOD_K2 132 #define BSIM3v1_MOD_KT2 133 #define BSIM3v1_MOD_K3 134 #define BSIM3v1_MOD_K3B 135 #define BSIM3v1_MOD_W0 136 #define BSIM3v1_MOD_NLX 137 #define BSIM3v1_MOD_DVT0 138 #define BSIM3v1_MOD_DVT1 139 #define BSIM3v1_MOD_DVT2 140 #define BSIM3v1_MOD_DVT0W 141 #define BSIM3v1_MOD_DVT1W 142 #define BSIM3v1_MOD_DVT2W 143 #define BSIM3v1_MOD_DROUT 144 #define BSIM3v1_MOD_DSUB 145 #define BSIM3v1_MOD_VTH0 146 #define BSIM3v1_MOD_UA 147 #define BSIM3v1_MOD_UA1 148 #define BSIM3v1_MOD_UB 149 #define BSIM3v1_MOD_UB1 150 #define BSIM3v1_MOD_UC 151 #define BSIM3v1_MOD_UC1 152 #define BSIM3v1_MOD_U0 153 #define BSIM3v1_MOD_UTE 154 #define BSIM3v1_MOD_VOFF 155 #define BSIM3v1_MOD_DELTA 156 #define BSIM3v1_MOD_RDSW 157 #define BSIM3v1_MOD_PRT 158 #define BSIM3v1_MOD_LDD 159 #define BSIM3v1_MOD_ETA 160 #define BSIM3v1_MOD_ETA0 161 #define BSIM3v1_MOD_ETAB 162 #define BSIM3v1_MOD_PCLM 163 #define BSIM3v1_MOD_PDIBL1 164 #define BSIM3v1_MOD_PDIBL2 165 #define BSIM3v1_MOD_PSCBE1 166 #define BSIM3v1_MOD_PSCBE2 167 #define BSIM3v1_MOD_PVAG 168 #define BSIM3v1_MOD_WR 169 #define BSIM3v1_MOD_DWG 170 #define BSIM3v1_MOD_DWB 171 #define BSIM3v1_MOD_B0 172 #define BSIM3v1_MOD_B1 173 #define BSIM3v1_MOD_ALPHA0 174 #define BSIM3v1_MOD_BETA0 175 #define BSIM3v1_MOD_PDIBLB 178 #define BSIM3v1_MOD_PRWG 179 #define BSIM3v1_MOD_PRWB 180 #define BSIM3v1_MOD_CDSCD 181 #define BSIM3v1_MOD_AGS 182 #define BSIM3v1_MOD_FRINGE 184 #define BSIM3v1_MOD_ELM 185 #define BSIM3v1_MOD_CGSL 186 #define BSIM3v1_MOD_CGDL 187 #define BSIM3v1_MOD_CKAPPA 188 #define BSIM3v1_MOD_CF 189 #define BSIM3v1_MOD_CLC 190 #define BSIM3v1_MOD_CLE 191 #define BSIM3v1_MOD_PARAMCHK 192 #define BSIM3v1_MOD_VERSION 193 #define BSIM3v1_MOD_VFBCV 194 #define BSIM3v1_MOD_HDIF 198 /* Length dependence */ #define BSIM3v1_MOD_LCDSC 201 #define BSIM3v1_MOD_LCDSCB 202 #define BSIM3v1_MOD_LCIT 203 #define BSIM3v1_MOD_LNFACTOR 204 #define BSIM3v1_MOD_LXJ 205 #define BSIM3v1_MOD_LVSAT 206 #define BSIM3v1_MOD_LAT 207 #define BSIM3v1_MOD_LA0 208 #define BSIM3v1_MOD_LA1 209 #define BSIM3v1_MOD_LA2 210 #define BSIM3v1_MOD_LKETA 211 #define BSIM3v1_MOD_LNSUB 212 #define BSIM3v1_MOD_LNPEAK 213 #define BSIM3v1_MOD_LNGATE 215 #define BSIM3v1_MOD_LGAMMA1 216 #define BSIM3v1_MOD_LGAMMA2 217 #define BSIM3v1_MOD_LVBX 218 #define BSIM3v1_MOD_LVBM 220 #define BSIM3v1_MOD_LXT 222 #define BSIM3v1_MOD_LK1 225 #define BSIM3v1_MOD_LKT1 226 #define BSIM3v1_MOD_LKT1L 227 #define BSIM3v1_MOD_LK2 228 #define BSIM3v1_MOD_LKT2 229 #define BSIM3v1_MOD_LK3 230 #define BSIM3v1_MOD_LK3B 231 #define BSIM3v1_MOD_LW0 232 #define BSIM3v1_MOD_LNLX 233 #define BSIM3v1_MOD_LDVT0 234 #define BSIM3v1_MOD_LDVT1 235 #define BSIM3v1_MOD_LDVT2 236 #define BSIM3v1_MOD_LDVT0W 237 #define BSIM3v1_MOD_LDVT1W 238 #define BSIM3v1_MOD_LDVT2W 239 #define BSIM3v1_MOD_LDROUT 240 #define BSIM3v1_MOD_LDSUB 241 #define BSIM3v1_MOD_LVTH0 242 #define BSIM3v1_MOD_LUA 243 #define BSIM3v1_MOD_LUA1 244 #define BSIM3v1_MOD_LUB 245 #define BSIM3v1_MOD_LUB1 246 #define BSIM3v1_MOD_LUC 247 #define BSIM3v1_MOD_LUC1 248 #define BSIM3v1_MOD_LU0 249 #define BSIM3v1_MOD_LUTE 250 #define BSIM3v1_MOD_LVOFF 251 #define BSIM3v1_MOD_LDELTA 252 #define BSIM3v1_MOD_LRDSW 253 #define BSIM3v1_MOD_LPRT 254 #define BSIM3v1_MOD_LLDD 255 #define BSIM3v1_MOD_LETA 256 #define BSIM3v1_MOD_LETA0 257 #define BSIM3v1_MOD_LETAB 258 #define BSIM3v1_MOD_LPCLM 259 #define BSIM3v1_MOD_LPDIBL1 260 #define BSIM3v1_MOD_LPDIBL2 261 #define BSIM3v1_MOD_LPSCBE1 262 #define BSIM3v1_MOD_LPSCBE2 263 #define BSIM3v1_MOD_LPVAG 264 #define BSIM3v1_MOD_LWR 265 #define BSIM3v1_MOD_LDWG 266 #define BSIM3v1_MOD_LDWB 267 #define BSIM3v1_MOD_LB0 268 #define BSIM3v1_MOD_LB1 269 #define BSIM3v1_MOD_LALPHA0 270 #define BSIM3v1_MOD_LBETA0 271 #define BSIM3v1_MOD_LPDIBLB 274 #define BSIM3v1_MOD_LPRWG 275 #define BSIM3v1_MOD_LPRWB 276 #define BSIM3v1_MOD_LCDSCD 277 #define BSIM3v1_MOD_LAGS 278 #define BSIM3v1_MOD_LFRINGE 281 #define BSIM3v1_MOD_LELM 282 #define BSIM3v1_MOD_LCGSL 283 #define BSIM3v1_MOD_LCGDL 284 #define BSIM3v1_MOD_LCKAPPA 285 #define BSIM3v1_MOD_LCF 286 #define BSIM3v1_MOD_LCLC 287 #define BSIM3v1_MOD_LCLE 288 #define BSIM3v1_MOD_LVFBCV 289 /* Width dependence */ #define BSIM3v1_MOD_WCDSC 301 #define BSIM3v1_MOD_WCDSCB 302 #define BSIM3v1_MOD_WCIT 303 #define BSIM3v1_MOD_WNFACTOR 304 #define BSIM3v1_MOD_WXJ 305 #define BSIM3v1_MOD_WVSAT 306 #define BSIM3v1_MOD_WAT 307 #define BSIM3v1_MOD_WA0 308 #define BSIM3v1_MOD_WA1 309 #define BSIM3v1_MOD_WA2 310 #define BSIM3v1_MOD_WKETA 311 #define BSIM3v1_MOD_WNSUB 312 #define BSIM3v1_MOD_WNPEAK 313 #define BSIM3v1_MOD_WNGATE 315 #define BSIM3v1_MOD_WGAMMA1 316 #define BSIM3v1_MOD_WGAMMA2 317 #define BSIM3v1_MOD_WVBX 318 #define BSIM3v1_MOD_WVBM 320 #define BSIM3v1_MOD_WXT 322 #define BSIM3v1_MOD_WK1 325 #define BSIM3v1_MOD_WKT1 326 #define BSIM3v1_MOD_WKT1L 327 #define BSIM3v1_MOD_WK2 328 #define BSIM3v1_MOD_WKT2 329 #define BSIM3v1_MOD_WK3 330 #define BSIM3v1_MOD_WK3B 331 #define BSIM3v1_MOD_WW0 332 #define BSIM3v1_MOD_WNLX 333 #define BSIM3v1_MOD_WDVT0 334 #define BSIM3v1_MOD_WDVT1 335 #define BSIM3v1_MOD_WDVT2 336 #define BSIM3v1_MOD_WDVT0W 337 #define BSIM3v1_MOD_WDVT1W 338 #define BSIM3v1_MOD_WDVT2W 339 #define BSIM3v1_MOD_WDROUT 340 #define BSIM3v1_MOD_WDSUB 341 #define BSIM3v1_MOD_WVTH0 342 #define BSIM3v1_MOD_WUA 343 #define BSIM3v1_MOD_WUA1 344 #define BSIM3v1_MOD_WUB 345 #define BSIM3v1_MOD_WUB1 346 #define BSIM3v1_MOD_WUC 347 #define BSIM3v1_MOD_WUC1 348 #define BSIM3v1_MOD_WU0 349 #define BSIM3v1_MOD_WUTE 350 #define BSIM3v1_MOD_WVOFF 351 #define BSIM3v1_MOD_WDELTA 352 #define BSIM3v1_MOD_WRDSW 353 #define BSIM3v1_MOD_WPRT 354 #define BSIM3v1_MOD_WLDD 355 #define BSIM3v1_MOD_WETA 356 #define BSIM3v1_MOD_WETA0 357 #define BSIM3v1_MOD_WETAB 358 #define BSIM3v1_MOD_WPCLM 359 #define BSIM3v1_MOD_WPDIBL1 360 #define BSIM3v1_MOD_WPDIBL2 361 #define BSIM3v1_MOD_WPSCBE1 362 #define BSIM3v1_MOD_WPSCBE2 363 #define BSIM3v1_MOD_WPVAG 364 #define BSIM3v1_MOD_WWR 365 #define BSIM3v1_MOD_WDWG 366 #define BSIM3v1_MOD_WDWB 367 #define BSIM3v1_MOD_WB0 368 #define BSIM3v1_MOD_WB1 369 #define BSIM3v1_MOD_WALPHA0 370 #define BSIM3v1_MOD_WBETA0 371 #define BSIM3v1_MOD_WPDIBLB 374 #define BSIM3v1_MOD_WPRWG 375 #define BSIM3v1_MOD_WPRWB 376 #define BSIM3v1_MOD_WCDSCD 377 #define BSIM3v1_MOD_WAGS 378 #define BSIM3v1_MOD_WFRINGE 381 #define BSIM3v1_MOD_WELM 382 #define BSIM3v1_MOD_WCGSL 383 #define BSIM3v1_MOD_WCGDL 384 #define BSIM3v1_MOD_WCKAPPA 385 #define BSIM3v1_MOD_WCF 386 #define BSIM3v1_MOD_WCLC 387 #define BSIM3v1_MOD_WCLE 388 #define BSIM3v1_MOD_WVFBCV 389 /* Cross-term dependence */ #define BSIM3v1_MOD_PCDSC 401 #define BSIM3v1_MOD_PCDSCB 402 #define BSIM3v1_MOD_PCIT 403 #define BSIM3v1_MOD_PNFACTOR 404 #define BSIM3v1_MOD_PXJ 405 #define BSIM3v1_MOD_PVSAT 406 #define BSIM3v1_MOD_PAT 407 #define BSIM3v1_MOD_PA0 408 #define BSIM3v1_MOD_PA1 409 #define BSIM3v1_MOD_PA2 410 #define BSIM3v1_MOD_PKETA 411 #define BSIM3v1_MOD_PNSUB 412 #define BSIM3v1_MOD_PNPEAK 413 #define BSIM3v1_MOD_PNGATE 415 #define BSIM3v1_MOD_PGAMMA1 416 #define BSIM3v1_MOD_PGAMMA2 417 #define BSIM3v1_MOD_PVBX 418 #define BSIM3v1_MOD_PVBM 420 #define BSIM3v1_MOD_PXT 422 #define BSIM3v1_MOD_PK1 425 #define BSIM3v1_MOD_PKT1 426 #define BSIM3v1_MOD_PKT1L 427 #define BSIM3v1_MOD_PK2 428 #define BSIM3v1_MOD_PKT2 429 #define BSIM3v1_MOD_PK3 430 #define BSIM3v1_MOD_PK3B 431 #define BSIM3v1_MOD_PW0 432 #define BSIM3v1_MOD_PNLX 433 #define BSIM3v1_MOD_PDVT0 434 #define BSIM3v1_MOD_PDVT1 435 #define BSIM3v1_MOD_PDVT2 436 #define BSIM3v1_MOD_PDVT0W 437 #define BSIM3v1_MOD_PDVT1W 438 #define BSIM3v1_MOD_PDVT2W 439 #define BSIM3v1_MOD_PDROUT 440 #define BSIM3v1_MOD_PDSUB 441 #define BSIM3v1_MOD_PVTH0 442 #define BSIM3v1_MOD_PUA 443 #define BSIM3v1_MOD_PUA1 444 #define BSIM3v1_MOD_PUB 445 #define BSIM3v1_MOD_PUB1 446 #define BSIM3v1_MOD_PUC 447 #define BSIM3v1_MOD_PUC1 448 #define BSIM3v1_MOD_PU0 449 #define BSIM3v1_MOD_PUTE 450 #define BSIM3v1_MOD_PVOFF 451 #define BSIM3v1_MOD_PDELTA 452 #define BSIM3v1_MOD_PRDSW 453 #define BSIM3v1_MOD_PPRT 454 #define BSIM3v1_MOD_PLDD 455 #define BSIM3v1_MOD_PETA 456 #define BSIM3v1_MOD_PETA0 457 #define BSIM3v1_MOD_PETAB 458 #define BSIM3v1_MOD_PPCLM 459 #define BSIM3v1_MOD_PPDIBL1 460 #define BSIM3v1_MOD_PPDIBL2 461 #define BSIM3v1_MOD_PPSCBE1 462 #define BSIM3v1_MOD_PPSCBE2 463 #define BSIM3v1_MOD_PPVAG 464 #define BSIM3v1_MOD_PWR 465 #define BSIM3v1_MOD_PDWG 466 #define BSIM3v1_MOD_PDWB 467 #define BSIM3v1_MOD_PB0 468 #define BSIM3v1_MOD_PB1 469 #define BSIM3v1_MOD_PALPHA0 470 #define BSIM3v1_MOD_PBETA0 471 #define BSIM3v1_MOD_PPDIBLB 474 #define BSIM3v1_MOD_PPRWG 475 #define BSIM3v1_MOD_PPRWB 476 #define BSIM3v1_MOD_PCDSCD 477 #define BSIM3v1_MOD_PAGS 478 #define BSIM3v1_MOD_PFRINGE 481 #define BSIM3v1_MOD_PELM 482 #define BSIM3v1_MOD_PCGSL 483 #define BSIM3v1_MOD_PCGDL 484 #define BSIM3v1_MOD_PCKAPPA 485 #define BSIM3v1_MOD_PCF 486 #define BSIM3v1_MOD_PCLC 487 #define BSIM3v1_MOD_PCLE 488 #define BSIM3v1_MOD_PVFBCV 489 #define BSIM3v1_MOD_TNOM 501 #define BSIM3v1_MOD_CGSO 502 #define BSIM3v1_MOD_CGDO 503 #define BSIM3v1_MOD_CGBO 504 #define BSIM3v1_MOD_XPART 505 #define BSIM3v1_MOD_RSH 506 #define BSIM3v1_MOD_JS 507 #define BSIM3v1_MOD_PB 508 #define BSIM3v1_MOD_MJ 509 #define BSIM3v1_MOD_PBSW 510 #define BSIM3v1_MOD_MJSW 511 #define BSIM3v1_MOD_CJ 512 #define BSIM3v1_MOD_CJSW 513 #define BSIM3v1_MOD_NMOS 514 #define BSIM3v1_MOD_PMOS 515 #define BSIM3v1_MOD_NOIA 516 #define BSIM3v1_MOD_NOIB 517 #define BSIM3v1_MOD_NOIC 518 #define BSIM3v1_MOD_LINT 519 #define BSIM3v1_MOD_LL 520 #define BSIM3v1_MOD_LLN 521 #define BSIM3v1_MOD_LW 522 #define BSIM3v1_MOD_LWN 523 #define BSIM3v1_MOD_LWL 524 #define BSIM3v1_MOD_LMIN 525 #define BSIM3v1_MOD_LMAX 526 #define BSIM3v1_MOD_WINT 527 #define BSIM3v1_MOD_WL 528 #define BSIM3v1_MOD_WLN 529 #define BSIM3v1_MOD_WW 530 #define BSIM3v1_MOD_WWN 531 #define BSIM3v1_MOD_WWL 532 #define BSIM3v1_MOD_WMIN 533 #define BSIM3v1_MOD_WMAX 534 #define BSIM3v1_MOD_DWC 535 #define BSIM3v1_MOD_DLC 536 #define BSIM3v1_MOD_EM 537 #define BSIM3v1_MOD_EF 538 #define BSIM3v1_MOD_AF 539 #define BSIM3v1_MOD_KF 540 #define BSIM3v1_MOD_NJ 541 #define BSIM3v1_MOD_XTI 542 #define BSIM3v1_MOD_PBSWG 543 #define BSIM3v1_MOD_MJSWG 544 #define BSIM3v1_MOD_CJSWG 545 #define BSIM3v1_MOD_JSW 546 /* device questions */ #define BSIM3v1_DNODE 601 #define BSIM3v1_GNODE 602 #define BSIM3v1_SNODE 603 #define BSIM3v1_BNODE 604 #define BSIM3v1_DNODEPRIME 605 #define BSIM3v1_SNODEPRIME 606 #define BSIM3v1_VBD 607 #define BSIM3v1_VBS 608 #define BSIM3v1_VGS 609 #define BSIM3v1_VDS 610 #define BSIM3v1_CD 611 #define BSIM3v1_CBS 612 #define BSIM3v1_CBD 613 #define BSIM3v1_GM 614 #define BSIM3v1_GDS 615 #define BSIM3v1_GMBS 616 #define BSIM3v1_GBD 617 #define BSIM3v1_GBS 618 #define BSIM3v1_QB 619 #define BSIM3v1_CQB 620 #define BSIM3v1_QG 621 #define BSIM3v1_CQG 622 #define BSIM3v1_QD 623 #define BSIM3v1_CQD 624 #define BSIM3v1_CGG 625 #define BSIM3v1_CGD 626 #define BSIM3v1_CGS 627 #define BSIM3v1_CBG 628 #define BSIM3v1_CAPBD 629 #define BSIM3v1_CQBD 630 #define BSIM3v1_CAPBS 631 #define BSIM3v1_CQBS 632 #define BSIM3v1_CDG 633 #define BSIM3v1_CDD 634 #define BSIM3v1_CDS 635 #define BSIM3v1_VON 636 #define BSIM3v1_VDSAT 637 #define BSIM3v1_QBS 638 #define BSIM3v1_QBD 639 #define BSIM3v1_SOURCECONDUCT 640 #define BSIM3v1_DRAINCONDUCT 641 #define BSIM3v1_CBDB 642 #define BSIM3v1_CBSB 643 #include "bsim3v1ext.h" extern void BSIM3v1evaluate(double,double,double,BSIM3v1instance*,BSIM3v1model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM3v1debug(BSIM3v1model*, BSIM3v1instance*, CKTcircuit*, int); extern int BSIM3v1checkModel(BSIM3v1model*, BSIM3v1instance*, CKTcircuit*); #endif /*BSIM3v1*/ ngspice-26/src/spicelib/devices/bsim3v1/b3v1trunc.c0000644000265600020320000000235712264261473021522 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1ld.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here != NULL; here = here->BSIM3v1nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM3v1qb,ckt,timeStep); CKTterr(here->BSIM3v1qg,ckt,timeStep); CKTterr(here->BSIM3v1qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM3v1name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1check.c0000644000265600020320000003135712264261473021446 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1check.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM3v1checkModel(BSIM3v1model *model, BSIM3v1instance *here, CKTcircuit *ckt) { struct bsim3v1SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3v3_1check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM3V3.1 Parameter Check\n"); fprintf(fplog, "Model = %s\n", model->BSIM3v1modName); fprintf(fplog, "W = %g, L = %g\n", here->BSIM3v1w, here->BSIM3v1l); if (pParam->BSIM3v1nlx < -pParam->BSIM3v1leff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3v1nlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->BSIM3v1nlx); Fatal_Flag = 1; } if (model->BSIM3v1tox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->BSIM3v1tox); printf("Fatal: Tox = %g is not positive.\n", model->BSIM3v1tox); Fatal_Flag = 1; } if (pParam->BSIM3v1npeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->BSIM3v1npeak); printf("Fatal: Nch = %g is not positive.\n", pParam->BSIM3v1npeak); Fatal_Flag = 1; } if (pParam->BSIM3v1nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM3v1nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM3v1nsub); Fatal_Flag = 1; } if (pParam->BSIM3v1ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM3v1ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM3v1ngate); Fatal_Flag = 1; } if (pParam->BSIM3v1ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM3v1ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM3v1ngate); Fatal_Flag = 1; } if (pParam->BSIM3v1xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM3v1xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM3v1xj); Fatal_Flag = 1; } if (pParam->BSIM3v1dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3v1dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM3v1dvt1); Fatal_Flag = 1; } if (pParam->BSIM3v1dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3v1dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM3v1dvt1w); Fatal_Flag = 1; } if (pParam->BSIM3v1w0 == -pParam->BSIM3v1weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3v1dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM3v1dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM3v1dsub); Fatal_Flag = 1; } if (pParam->BSIM3v1b1 == -pParam->BSIM3v1weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM3v1u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3v1u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM3v1u0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->BSIM3v1delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM3v1delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM3v1delta); Fatal_Flag = 1; } if (pParam->BSIM3v1vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3v1vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM3v1vsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->BSIM3v1pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM3v1pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM3v1pclm); Fatal_Flag = 1; } if (pParam->BSIM3v1drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM3v1drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM3v1drout); Fatal_Flag = 1; } if (model->BSIM3v1unitLengthSidewallJctCap > 0.0 || model->BSIM3v1unitLengthGateSidewallJctCap > 0.0) { if (here->BSIM3v1drainPerimeter < pParam->BSIM3v1weff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->BSIM3v1drainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->BSIM3v1drainPerimeter); here->BSIM3v1drainPerimeter =pParam->BSIM3v1weff; } if (here->BSIM3v1sourcePerimeter < pParam->BSIM3v1weff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->BSIM3v1sourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->BSIM3v1sourcePerimeter); here->BSIM3v1sourcePerimeter =pParam->BSIM3v1weff; } } /* Check capacitance parameters */ if (pParam->BSIM3v1clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM3v1clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM3v1clc); Fatal_Flag = 1; } if (model->BSIM3v1paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM3v1leff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->BSIM3v1leff); printf("Warning: Leff = %g may be too small.\n", pParam->BSIM3v1leff); } if (pParam->BSIM3v1leffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3v1leffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->BSIM3v1leffCV); } if (pParam->BSIM3v1weff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->BSIM3v1weff); printf("Warning: Weff = %g may be too small.\n", pParam->BSIM3v1weff); } if (pParam->BSIM3v1weffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3v1weffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->BSIM3v1weffCV); } /* Check threshold voltage parameters */ if (pParam->BSIM3v1nlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->BSIM3v1nlx); printf("Warning: Nlx = %g is negative.\n", pParam->BSIM3v1nlx); } if (model->BSIM3v1tox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->BSIM3v1tox); printf("Warning: Tox = %g is less than 10A.\n", model->BSIM3v1tox); } if (pParam->BSIM3v1npeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->BSIM3v1npeak); printf("Warning: Nch = %g may be too small.\n", pParam->BSIM3v1npeak); } else if (pParam->BSIM3v1npeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->BSIM3v1npeak); printf("Warning: Nch = %g may be too large.\n", pParam->BSIM3v1npeak); } if (pParam->BSIM3v1nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM3v1nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM3v1nsub); } else if (pParam->BSIM3v1nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM3v1nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM3v1nsub); } if ((pParam->BSIM3v1ngate > 0.0) && (pParam->BSIM3v1ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3v1ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM3v1ngate); } if (pParam->BSIM3v1dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM3v1dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM3v1dvt0); } if (fabs(1.0e-6 / (pParam->BSIM3v1w0 + pParam->BSIM3v1weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM3v1nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM3v1nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM3v1nfactor); } if (pParam->BSIM3v1cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM3v1cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM3v1cdsc); } if (pParam->BSIM3v1cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM3v1cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM3v1cdscd); } /* Check DIBL parameters */ if (pParam->BSIM3v1eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->BSIM3v1eta0); printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM3v1eta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->BSIM3v1b1 + pParam->BSIM3v1weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM3v1a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3v1a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM3v1a2); pParam->BSIM3v1a2 = 0.01; } else if (pParam->BSIM3v1a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3v1a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM3v1a2); pParam->BSIM3v1a2 = 1.0; pParam->BSIM3v1a1 = 0.0; } if (pParam->BSIM3v1rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3v1rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM3v1rdsw); pParam->BSIM3v1rdsw = 0.0; pParam->BSIM3v1rds0 = 0.0; } else if ((pParam->BSIM3v1rds0 > 0.0) && (pParam->BSIM3v1rds0 < 0.001)) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3v1rds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->BSIM3v1rds0); pParam->BSIM3v1rds0 = 0.0; } if (pParam->BSIM3v1vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3v1vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM3v1vsattemp); } if (pParam->BSIM3v1pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3v1pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM3v1pdibl1); } if (pParam->BSIM3v1pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3v1pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM3v1pdibl2); } /* Check overlap capacitance parameters */ if (model->BSIM3v1cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3v1cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM3v1cgdo); model->BSIM3v1cgdo = 0.0; } if (model->BSIM3v1cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3v1cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM3v1cgso); model->BSIM3v1cgso = 0.0; } if (model->BSIM3v1cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3v1cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM3v1cgbo); model->BSIM3v1cgbo = 0.0; } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1pzld.c0000644000265600020320000001412212264261473021331 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1pzld.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim3v1def.h" #include "ngspice/suffix.h" int BSIM3v1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here!= NULL; here = here->BSIM3v1nextInstance) { if (here->BSIM3v1mode >= 0) { Gm = here->BSIM3v1gm; Gmbs = here->BSIM3v1gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->BSIM3v1cggb; cgsb = here->BSIM3v1cgsb; cgdb = here->BSIM3v1cgdb; cbgb = here->BSIM3v1cbgb; cbsb = here->BSIM3v1cbsb; cbdb = here->BSIM3v1cbdb; cdgb = here->BSIM3v1cdgb; cdsb = here->BSIM3v1cdsb; cddb = here->BSIM3v1cddb; } else { Gm = -here->BSIM3v1gm; Gmbs = -here->BSIM3v1gmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->BSIM3v1cggb; cgsb = here->BSIM3v1cgdb; cgdb = here->BSIM3v1cgsb; cbgb = here->BSIM3v1cbgb; cbsb = here->BSIM3v1cbdb; cbdb = here->BSIM3v1cbsb; cdgb = -(here->BSIM3v1cdgb + cggb + cbgb); cdsb = -(here->BSIM3v1cddb + cgsb + cbsb); cddb = -(here->BSIM3v1cdsb + cgdb + cbdb); } gdpr=here->BSIM3v1drainConductance; gspr=here->BSIM3v1sourceConductance; gds= here->BSIM3v1gds; gbd= here->BSIM3v1gbd; gbs= here->BSIM3v1gbs; capbd= here->BSIM3v1capbd; capbs= here->BSIM3v1capbs; GSoverlapCap = here->BSIM3v1cgso; GDoverlapCap = here->BSIM3v1cgdo; GBoverlapCap = here->pParam->BSIM3v1cgbo; xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->BSIM3v1m; *(here->BSIM3v1GgPtr ) += m * (xcggb * s->real); *(here->BSIM3v1GgPtr +1) += m * (xcggb * s->imag); *(here->BSIM3v1BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->BSIM3v1BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->BSIM3v1DPdpPtr ) += m * (xcddb * s->real); *(here->BSIM3v1DPdpPtr +1) += xcddb * s->imag; *(here->BSIM3v1SPspPtr ) += m * (xcssb * s->real); *(here->BSIM3v1SPspPtr +1) += m * (xcssb * s->imag); *(here->BSIM3v1GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->BSIM3v1GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->BSIM3v1GdpPtr ) += m * (xcgdb * s->real); *(here->BSIM3v1GdpPtr +1) += m * (xcgdb * s->imag); *(here->BSIM3v1GspPtr ) += m * (xcgsb * s->real); *(here->BSIM3v1GspPtr +1) += m * (xcgsb * s->imag); *(here->BSIM3v1BgPtr ) += m * (xcbgb * s->real); *(here->BSIM3v1BgPtr +1) += m * (xcbgb * s->imag); *(here->BSIM3v1BdpPtr ) += m * (xcbdb * s->real); *(here->BSIM3v1BdpPtr +1) += m * (xcbdb * s->imag); *(here->BSIM3v1BspPtr ) += m * (xcbsb * s->real); *(here->BSIM3v1BspPtr +1) += m * (xcbsb * s->imag); *(here->BSIM3v1DPgPtr ) += m * (xcdgb * s->real); *(here->BSIM3v1DPgPtr +1) += m * (xcdgb * s->imag); *(here->BSIM3v1DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->BSIM3v1DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->BSIM3v1DPspPtr ) += m * (xcdsb * s->real); *(here->BSIM3v1DPspPtr +1) += m * (xcdsb * s->imag); *(here->BSIM3v1SPgPtr ) += m * (xcsgb * s->real); *(here->BSIM3v1SPgPtr +1) += m * (xcsgb * s->imag); *(here->BSIM3v1SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->BSIM3v1SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->BSIM3v1SPdpPtr ) += m * (xcsdb * s->real); *(here->BSIM3v1SPdpPtr +1) += m * (xcsdb * s->imag); *(here->BSIM3v1DdPtr) += m * gdpr; *(here->BSIM3v1SsPtr) += m * gspr; *(here->BSIM3v1BbPtr) += m * (gbd + gbs); *(here->BSIM3v1DPdpPtr) += m * (gdpr + gds + gbd + RevSum); *(here->BSIM3v1SPspPtr) += m * (gspr + gds + gbs + FwdSum); *(here->BSIM3v1DdpPtr) -= m * gdpr; *(here->BSIM3v1SspPtr) -= m * gspr; *(here->BSIM3v1BdpPtr) -= m * gbd; *(here->BSIM3v1BspPtr) -= m * gbs; *(here->BSIM3v1DPdPtr) -= m * gdpr; *(here->BSIM3v1DPgPtr) += m * Gm; *(here->BSIM3v1DPbPtr) -= m * (gbd - Gmbs); *(here->BSIM3v1DPspPtr) -= m * (gds + FwdSum); *(here->BSIM3v1SPgPtr) -= m * Gm; *(here->BSIM3v1SPsPtr) -= m * gspr; *(here->BSIM3v1SPbPtr) -= m * (gbs + Gmbs); *(here->BSIM3v1SPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1acld.c0000644000265600020320000001366212264261473021273 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1acld.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1acLoad (GENmodel * inModel, CKTcircuit * ckt) { BSIM3v1model *model = (BSIM3v1model *) inModel; BSIM3v1instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega; double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs; double dxpart, sxpart, cqgb, cqdb, cqsb, cqbb, xcqgb, xcqdb, xcqsb, xcqbb; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here != NULL; here = here->BSIM3v1nextInstance) { if (here->BSIM3v1mode >= 0) { Gm = here->BSIM3v1gm; Gmbs = here->BSIM3v1gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->BSIM3v1cggb; cgsb = here->BSIM3v1cgsb; cgdb = here->BSIM3v1cgdb; cbgb = here->BSIM3v1cbgb; cbsb = here->BSIM3v1cbsb; cbdb = here->BSIM3v1cbdb; cdgb = here->BSIM3v1cdgb; cdsb = here->BSIM3v1cdsb; cddb = here->BSIM3v1cddb; cqgb = here->BSIM3v1cqgb; cqdb = here->BSIM3v1cqdb; cqsb = here->BSIM3v1cqsb; cqbb = here->BSIM3v1cqbb; sxpart = 0.6; dxpart = 0.4; } else { Gm = -here->BSIM3v1gm; Gmbs = -here->BSIM3v1gmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->BSIM3v1cggb; cgsb = here->BSIM3v1cgdb; cgdb = here->BSIM3v1cgsb; cbgb = here->BSIM3v1cbgb; cbsb = here->BSIM3v1cbdb; cbdb = here->BSIM3v1cbsb; cdgb = -(here->BSIM3v1cdgb + cggb + cbgb); cdsb = -(here->BSIM3v1cddb + cgsb + cbsb); cddb = -(here->BSIM3v1cdsb + cgdb + cbdb); cqgb = here->BSIM3v1cqgb; cqdb = here->BSIM3v1cqsb; cqsb = here->BSIM3v1cqdb; cqbb = here->BSIM3v1cqbb; sxpart = 0.4; dxpart = 0.6; } gdpr = here->BSIM3v1drainConductance; gspr = here->BSIM3v1sourceConductance; gds = here->BSIM3v1gds; gbd = here->BSIM3v1gbd; gbs = here->BSIM3v1gbs; capbd = here->BSIM3v1capbd; capbs = here->BSIM3v1capbs; GSoverlapCap = here->BSIM3v1cgso; GDoverlapCap = here->BSIM3v1cgdo; GBoverlapCap = here->pParam->BSIM3v1cgbo; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + capbd + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcbgb = (cbgb - GBoverlapCap) * omega; xcbdb = (cbdb - capbd) * omega; xcbsb = (cbsb - capbs) * omega; xcqgb = cqgb * omega; xcqdb = cqdb * omega; xcqsb = cqsb * omega; xcqbb = cqbb * omega; m = here->BSIM3v1m; *(here->BSIM3v1GgPtr + 1) += m * xcggb; *(here->BSIM3v1BbPtr + 1) -= m * (xcbgb + xcbdb + xcbsb); *(here->BSIM3v1DPdpPtr + 1) += m * xcddb; *(here->BSIM3v1SPspPtr + 1) += m * xcssb; *(here->BSIM3v1GbPtr + 1) -= m * (xcggb + xcgdb + xcgsb); *(here->BSIM3v1GdpPtr + 1) += m * xcgdb; *(here->BSIM3v1GspPtr + 1) += m * xcgsb; *(here->BSIM3v1BgPtr + 1) += m * xcbgb; *(here->BSIM3v1BdpPtr + 1) += m * xcbdb; *(here->BSIM3v1BspPtr + 1) += m * xcbsb; *(here->BSIM3v1DPgPtr + 1) += m * xcdgb; *(here->BSIM3v1DPbPtr + 1) -= m * (xcdgb + xcddb + xcdsb); *(here->BSIM3v1DPspPtr + 1) += m * xcdsb; *(here->BSIM3v1SPgPtr + 1) += m * xcsgb; *(here->BSIM3v1SPbPtr + 1) -= m * (xcsgb + xcsdb + xcssb); *(here->BSIM3v1SPdpPtr + 1) += m * xcsdb; *(here->BSIM3v1QqPtr + 1) += m * omega; *(here->BSIM3v1QgPtr + 1) -= m * xcqgb; *(here->BSIM3v1QdpPtr + 1) -= m * xcqdb; *(here->BSIM3v1QspPtr + 1) -= m * xcqsb; *(here->BSIM3v1QbPtr + 1) -= m * xcqbb; *(here->BSIM3v1DdPtr) += m * gdpr; *(here->BSIM3v1SsPtr) += m * gspr; *(here->BSIM3v1BbPtr) += m * (gbd + gbs); *(here->BSIM3v1DPdpPtr) += m * (gdpr + gds + gbd + RevSum + dxpart * here->BSIM3v1gtd); *(here->BSIM3v1SPspPtr) += m * (gspr + gds + gbs + FwdSum + sxpart * here->BSIM3v1gts); *(here->BSIM3v1DdpPtr) -= m * gdpr; *(here->BSIM3v1SspPtr) -= m * gspr; *(here->BSIM3v1BdpPtr) -= m * gbd; *(here->BSIM3v1BspPtr) -= m * gbs; *(here->BSIM3v1DPdPtr) -= m * gdpr; *(here->BSIM3v1DPgPtr) += m * (Gm + dxpart * here->BSIM3v1gtg); *(here->BSIM3v1DPbPtr) -= m * (gbd - Gmbs - dxpart * here->BSIM3v1gtb); *(here->BSIM3v1DPspPtr) -= m * (gds + FwdSum - dxpart * here->BSIM3v1gts); *(here->BSIM3v1SPgPtr) -= m * (Gm - sxpart * here->BSIM3v1gtg); *(here->BSIM3v1SPsPtr) -= m * gspr; *(here->BSIM3v1SPbPtr) -= m * (gbs + Gmbs - sxpart * here->BSIM3v1gtg); *(here->BSIM3v1SPdpPtr) -= m * (gds + RevSum - sxpart * here->BSIM3v1gtd); *(here->BSIM3v1GgPtr) -= m * here->BSIM3v1gtg; *(here->BSIM3v1GbPtr) -= m * here->BSIM3v1gtb; *(here->BSIM3v1GdpPtr) -= m * here->BSIM3v1gtd; *(here->BSIM3v1GspPtr) -= m * here->BSIM3v1gts; *(here->BSIM3v1QqPtr) += m * here->BSIM3v1gtau; *(here->BSIM3v1DPqPtr) += m * dxpart * here->BSIM3v1gtau; *(here->BSIM3v1SPqPtr) += m * sxpart * here->BSIM3v1gtau; *(here->BSIM3v1GqPtr) -= m * here->BSIM3v1gtau; *(here->BSIM3v1QgPtr) += m * here->BSIM3v1gtg; *(here->BSIM3v1QdpPtr) += m * here->BSIM3v1gtd; *(here->BSIM3v1QspPtr) += m * here->BSIM3v1gts; *(here->BSIM3v1QbPtr) += m * here->BSIM3v1gtb; } } return (OK); } ngspice-26/src/spicelib/devices/bsim3v1/ChangeLog0000644000265600020320000000077712264261473021305 0ustar andreasadmin22-10-2012 Francesco Lannutti * b3v1acld.c, b3v1cvtest.c, b3v1getic.c, b3v1ld.c, b3v1pzld.c, b3v1set.c, b3v1temp.c, b3v1trunc.c, bsim3v1def.h: Deleted the BSIM3V1owner field 27-01-2000 Paolo Nenzi * bsim3v1def.h: added BSIM3V1owner varialbe to the BSIM3V1instance structure to support "parallel" processing with Cider * b3v1acld.c, b3v1cvtest.c, b3v1getic.c, b3v1ld.c, b3v1pzld.c, b3v1set.c, b3v1temp.c, b3v1trunc.c: added the BSIM3V1owner check in these files ngspice-26/src/spicelib/devices/bsim3v1/b3v1ask.c0000644000265600020320000001503012264261473021135 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3ask.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1ask (CKTcircuit * ckt, GENinstance * inst, int which, IFvalue * value, IFvalue * select) { BSIM3v1instance *here = (BSIM3v1instance *) inst; NG_IGNORE(select); switch (which) { case BSIM3v1_L: value->rValue = here->BSIM3v1l; return(OK); case BSIM3v1_W: value->rValue = here->BSIM3v1w; return(OK); case BSIM3v1_M: value->rValue = here->BSIM3v1m; return(OK); case BSIM3v1_AS: value->rValue = here->BSIM3v1sourceArea; return(OK); case BSIM3v1_AD: value->rValue = here->BSIM3v1drainArea; return(OK); case BSIM3v1_PS: value->rValue = here->BSIM3v1sourcePerimeter; return(OK); case BSIM3v1_PD: value->rValue = here->BSIM3v1drainPerimeter; return(OK); case BSIM3v1_NRS: value->rValue = here->BSIM3v1sourceSquares; return(OK); case BSIM3v1_NRD: value->rValue = here->BSIM3v1drainSquares; return(OK); case BSIM3v1_OFF: value->rValue = here->BSIM3v1off; return(OK); case BSIM3v1_NQSMOD: value->iValue = here->BSIM3v1nqsMod; return(OK); case BSIM3v1_IC_VBS: value->rValue = here->BSIM3v1icVBS; return(OK); case BSIM3v1_IC_VDS: value->rValue = here->BSIM3v1icVDS; return(OK); case BSIM3v1_IC_VGS: value->rValue = here->BSIM3v1icVGS; return(OK); case BSIM3v1_DNODE: value->iValue = here->BSIM3v1dNode; return(OK); case BSIM3v1_GNODE: value->iValue = here->BSIM3v1gNode; return(OK); case BSIM3v1_SNODE: value->iValue = here->BSIM3v1sNode; return(OK); case BSIM3v1_BNODE: value->iValue = here->BSIM3v1bNode; return(OK); case BSIM3v1_DNODEPRIME: value->iValue = here->BSIM3v1dNodePrime; return(OK); case BSIM3v1_SNODEPRIME: value->iValue = here->BSIM3v1sNodePrime; return(OK); case BSIM3v1_SOURCECONDUCT: value->rValue = here->BSIM3v1sourceConductance; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_DRAINCONDUCT: value->rValue = here->BSIM3v1drainConductance; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1vbd); return(OK); case BSIM3v1_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1vbs); return(OK); case BSIM3v1_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1vgs); return(OK); case BSIM3v1_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1vds); return(OK); case BSIM3v1_CD: value->rValue = here->BSIM3v1cd; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CBS: value->rValue = here->BSIM3v1cbs; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CBD: value->rValue = here->BSIM3v1cbd; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_GM: value->rValue = here->BSIM3v1gm; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_GDS: value->rValue = here->BSIM3v1gds; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_GMBS: value->rValue = here->BSIM3v1gmbs; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_GBD: value->rValue = here->BSIM3v1gbd; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_GBS: value->rValue = here->BSIM3v1gbs; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1qb); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1cqb); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1qg); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1cqg); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1qd); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1cqd); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CGG: value->rValue = here->BSIM3v1cggb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CGD: value->rValue = here->BSIM3v1cgdb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CGS: value->rValue = here->BSIM3v1cgsb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CDG: value->rValue = here->BSIM3v1cdgb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CDD: value->rValue = here->BSIM3v1cddb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CDS: value->rValue = here->BSIM3v1cdsb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CBG: value->rValue = here->BSIM3v1cbgb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CBDB: value->rValue = here->BSIM3v1cbdb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CBSB: value->rValue = here->BSIM3v1cbsb; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CAPBD: value->rValue = here->BSIM3v1capbd; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_CAPBS: value->rValue = here->BSIM3v1capbs; value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_VON: value->rValue = here->BSIM3v1von; return(OK); case BSIM3v1_VDSAT: value->rValue = here->BSIM3v1vdsat; return(OK); case BSIM3v1_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1qbs); value->rValue *= here->BSIM3v1m; return(OK); case BSIM3v1_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v1qbd); value->rValue *= here->BSIM3v1m; return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v1/b3v1noi.c0000644000265600020320000003140612264261473021151 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3noi.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "bsim3v1def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * BSIM3v1noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->BSIM3v1noiMod. If model->BSIM3v1noiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->BSIM3v1noiMod = 2, Channel thermal noise = BSIM3v1 model Flicker noise = BSIM3v1 model If model->BSIM3v1noiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = BSIM3v1 model If model->BSIM3v1noiMod = 4, Channel thermal noise = BSIM3v1 model Flicker noise = SPICE2 model */ static double StrongInversionNoiseEval_b3(double vgs, double vds, BSIM3v1model *model, BSIM3v1instance *here, double freq, double temp) { struct bsim3v1SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Vgst; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM3v1cd) * here->BSIM3v1m; if (vds > here->BSIM3v1vdsat) { esat = 2.0 * pParam->BSIM3v1vsattemp / here->BSIM3v1ueff; T0 = ((((vds - here->BSIM3v1vdsat) / pParam->BSIM3v1litl) + model->BSIM3v1em) / esat); DelClm = pParam->BSIM3v1litl * log (MAX(T0, N_MINLOG)); } else DelClm = 0.0; EffFreq = pow(freq, model->BSIM3v1ef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->BSIM3v1ueff; T2 = 1.0e8 * EffFreq * model->BSIM3v1cox * pParam->BSIM3v1leff * pParam->BSIM3v1leff; Vgst = vgs - here->BSIM3v1von; N0 = model->BSIM3v1cox * Vgst / CHARGE; if (N0 < 0.0) N0 = 0.0; Nl = model->BSIM3v1cox * (Vgst - MIN(vds, here->BSIM3v1vdsat)) / CHARGE; if (Nl < 0.0) Nl = 0.0; T3 = model->BSIM3v1oxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->BSIM3v1oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM3v1oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->BSIM3v1leff * pParam->BSIM3v1leff * pParam->BSIM3v1weff * here->BSIM3v1m; T8 = model->BSIM3v1oxideTrapDensityA + model->BSIM3v1oxideTrapDensityB * Nl + model->BSIM3v1oxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM3v1noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM3v1model *model = (BSIM3v1model *)inModel; BSIM3v1instance *here; struct bsim3v1SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM3v1NSRCS]; double lnNdens[BSIM3v1NSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; int i; /* define the names of the noise sources */ static char *BSIM3v1nNames[BSIM3v1NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in BSIM3v1defs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here != NULL; here = here->BSIM3v1nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM3v1NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM3v1name, BSIM3v1nNames[i]); data->namelist = TREALLOC( IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM3v1NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM3v1name, BSIM3v1nNames[i]); data->namelist = TREALLOC( IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM3v1name, BSIM3v1nNames[i]); data->namelist = TREALLOC( IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[BSIM3v1RDNOIZ], &lnNdens[BSIM3v1RDNOIZ], ckt, THERMNOISE, here->BSIM3v1dNodePrime, here->BSIM3v1dNode, here->BSIM3v1drainConductance * here->BSIM3v1m); NevalSrc(&noizDens[BSIM3v1RSNOIZ], &lnNdens[BSIM3v1RSNOIZ], ckt, THERMNOISE, here->BSIM3v1sNodePrime, here->BSIM3v1sNode, here->BSIM3v1sourceConductance * here->BSIM3v1m); switch( model->BSIM3v1noiMod ) { case 1: case 3: NevalSrc(&noizDens[BSIM3v1IDNOIZ], &lnNdens[BSIM3v1IDNOIZ], ckt, THERMNOISE, here->BSIM3v1dNodePrime, here->BSIM3v1sNodePrime, (2.0 / 3.0 * fabs(here->BSIM3v1gm + here->BSIM3v1gds + here->BSIM3v1gmbs) * here->BSIM3v1m)); break; case 2: case 4: NevalSrc(&noizDens[BSIM3v1IDNOIZ], &lnNdens[BSIM3v1IDNOIZ], ckt, THERMNOISE, here->BSIM3v1dNodePrime, here->BSIM3v1sNodePrime, (here->BSIM3v1ueff * fabs((here->BSIM3v1qinv * here->BSIM3v1m) / (pParam->BSIM3v1leff * pParam->BSIM3v1leff)))); break; } NevalSrc(&noizDens[BSIM3v1FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v1dNodePrime, here->BSIM3v1sNodePrime, (double) 0.0); switch( model->BSIM3v1noiMod ) { case 1: case 4: noizDens[BSIM3v1FLNOIZ] *= model->BSIM3v1kf * exp(model->BSIM3v1af * log(MAX(fabs(here->BSIM3v1cd * here->BSIM3v1m), N_MINLOG))) / (pow(data->freq, model->BSIM3v1ef) * pParam->BSIM3v1leff * pParam->BSIM3v1leff * model->BSIM3v1cox); break; case 2: case 3: vgs = *(ckt->CKTstates[0] + here->BSIM3v1vgs); vds = *(ckt->CKTstates[0] + here->BSIM3v1vds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } if (vgs >= here->BSIM3v1von + 0.1) { Ssi = StrongInversionNoiseEval_b3(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[BSIM3v1FLNOIZ] *= Ssi; } else { pParam = here->pParam; T10 = model->BSIM3v1oxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->BSIM3v1weff * here->BSIM3v1m * pParam->BSIM3v1leff * pow(data->freq, model->BSIM3v1ef) * 4.0e36; Swi = T10 / T11 * here->BSIM3v1cd * here->BSIM3v1m * here->BSIM3v1cd * here->BSIM3v1m; Slimit = StrongInversionNoiseEval_b3( here->BSIM3v1von + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[BSIM3v1FLNOIZ] *= (Slimit * Swi) / T1; else noizDens[BSIM3v1FLNOIZ] *= 0.0; } break; } lnNdens[BSIM3v1FLNOIZ] = log(MAX(noizDens[BSIM3v1FLNOIZ], N_MINLOG)); noizDens[BSIM3v1TOTNOIZ] = noizDens[BSIM3v1RDNOIZ] + noizDens[BSIM3v1RSNOIZ] + noizDens[BSIM3v1IDNOIZ] + noizDens[BSIM3v1FLNOIZ]; lnNdens[BSIM3v1TOTNOIZ] = log(MAX(noizDens[BSIM3v1TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM3v1TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM3v1NSRCS; i++) { here->BSIM3v1nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM3v1NSRCS; i++) { here->BSIM3v1nVar[OUTNOIZ][i] = 0.0; here->BSIM3v1nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM3v1NSRCS; i++) { if (i != BSIM3v1TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM3v1nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM3v1nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM3v1nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM3v1nVar[OUTNOIZ][i] += tempOnoise; here->BSIM3v1nVar[OUTNOIZ][BSIM3v1TOTNOIZ] += tempOnoise; here->BSIM3v1nVar[INNOIZ][i] += tempInoise; here->BSIM3v1nVar[INNOIZ][BSIM3v1TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM3v1NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM3v1NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM3v1nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM3v1nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1mdel.c0000644000265600020320000000222712264261473021304 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1mdel.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM3v1model **model = (BSIM3v1model**)inModel; BSIM3v1model *modfast = (BSIM3v1model*)kill; BSIM3v1instance *here; BSIM3v1instance *prev = NULL; BSIM3v1model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM3v1nextModel)) { if ((*model)->BSIM3v1modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM3v1nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1set.c0000644000265600020320000011111312264261473021151 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3set.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int BSIM3v1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; int error; CKTnode *tmp; CKTnode *tmpNode; IFuid tmpName; /* loop through all the BSIM3v1 device models */ for( ; model != NULL; model = model->BSIM3v1nextModel ) { /* Default value Processing for BSIM3v1 MOSFET Models */ if (!model->BSIM3v1typeGiven) model->BSIM3v1type = NMOS; if (!model->BSIM3v1mobModGiven) model->BSIM3v1mobMod = 1; if (!model->BSIM3v1binUnitGiven) model->BSIM3v1binUnit = 1; if (!model->BSIM3v1paramChkGiven) model->BSIM3v1paramChk = 0; if (!model->BSIM3v1capModGiven) model->BSIM3v1capMod = 2; if (!model->BSIM3v1nqsModGiven) model->BSIM3v1nqsMod = 0; if (!model->BSIM3v1noiModGiven) model->BSIM3v1noiMod = 1; if (!model->BSIM3v1versionGiven) model->BSIM3v1version = 3.1; if (!model->BSIM3v1toxGiven) model->BSIM3v1tox = 150.0e-10; model->BSIM3v1cox = 3.453133e-11 / model->BSIM3v1tox; if (!model->BSIM3v1cdscGiven) model->BSIM3v1cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM3v1cdscbGiven) model->BSIM3v1cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v1cdscdGiven) model->BSIM3v1cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v1citGiven) model->BSIM3v1cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v1nfactorGiven) model->BSIM3v1nfactor = 1; if (!model->BSIM3v1xjGiven) model->BSIM3v1xj = .15e-6; if (!model->BSIM3v1vsatGiven) model->BSIM3v1vsat = 8.0e4; /* unit m/s */ if (!model->BSIM3v1atGiven) model->BSIM3v1at = 3.3e4; /* unit m/s */ if (!model->BSIM3v1a0Given) model->BSIM3v1a0 = 1.0; if (!model->BSIM3v1agsGiven) model->BSIM3v1ags = 0.0; if (!model->BSIM3v1a1Given) model->BSIM3v1a1 = 0.0; if (!model->BSIM3v1a2Given) model->BSIM3v1a2 = 1.0; if (!model->BSIM3v1ketaGiven) model->BSIM3v1keta = -0.047; /* unit / V */ if (!model->BSIM3v1nsubGiven) model->BSIM3v1nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM3v1npeakGiven) model->BSIM3v1npeak = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM3v1ngateGiven) model->BSIM3v1ngate = 0; /* unit 1/cm3 */ if (!model->BSIM3v1vbmGiven) model->BSIM3v1vbm = -3.0; if (!model->BSIM3v1xtGiven) model->BSIM3v1xt = 1.55e-7; if (!model->BSIM3v1kt1Given) model->BSIM3v1kt1 = -0.11; /* unit V */ if (!model->BSIM3v1kt1lGiven) model->BSIM3v1kt1l = 0.0; /* unit V*m */ if (!model->BSIM3v1kt2Given) model->BSIM3v1kt2 = 0.022; /* No unit */ if (!model->BSIM3v1k3Given) model->BSIM3v1k3 = 80.0; if (!model->BSIM3v1k3bGiven) model->BSIM3v1k3b = 0.0; if (!model->BSIM3v1w0Given) model->BSIM3v1w0 = 2.5e-6; if (!model->BSIM3v1nlxGiven) model->BSIM3v1nlx = 1.74e-7; if (!model->BSIM3v1dvt0Given) model->BSIM3v1dvt0 = 2.2; if (!model->BSIM3v1dvt1Given) model->BSIM3v1dvt1 = 0.53; if (!model->BSIM3v1dvt2Given) model->BSIM3v1dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM3v1dvt0wGiven) model->BSIM3v1dvt0w = 0.0; if (!model->BSIM3v1dvt1wGiven) model->BSIM3v1dvt1w = 5.3e6; if (!model->BSIM3v1dvt2wGiven) model->BSIM3v1dvt2w = -0.032; if (!model->BSIM3v1droutGiven) model->BSIM3v1drout = 0.56; if (!model->BSIM3v1dsubGiven) model->BSIM3v1dsub = model->BSIM3v1drout; if (!model->BSIM3v1vth0Given) model->BSIM3v1vth0 = (model->BSIM3v1type == NMOS) ? 0.7 : -0.7; if (!model->BSIM3v1uaGiven) model->BSIM3v1ua = 2.25e-9; /* unit m/V */ if (!model->BSIM3v1ua1Given) model->BSIM3v1ua1 = 4.31e-9; /* unit m/V */ if (!model->BSIM3v1ubGiven) model->BSIM3v1ub = 5.87e-19; /* unit (m/V)**2 */ if (!model->BSIM3v1ub1Given) model->BSIM3v1ub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->BSIM3v1ucGiven) model->BSIM3v1uc = (model->BSIM3v1mobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->BSIM3v1uc1Given) model->BSIM3v1uc1 = (model->BSIM3v1mobMod == 3) ? -0.056 : -0.056e-9; if (!model->BSIM3v1u0Given) model->BSIM3v1u0 = (model->BSIM3v1type == NMOS) ? 0.067 : 0.025; if (!model->BSIM3v1uteGiven) model->BSIM3v1ute = -1.5; if (!model->BSIM3v1voffGiven) model->BSIM3v1voff = -0.08; if (!model->BSIM3v1deltaGiven) model->BSIM3v1delta = 0.01; if (!model->BSIM3v1rdswGiven) model->BSIM3v1rdsw = 0; if (!model->BSIM3v1prwgGiven) model->BSIM3v1prwg = 0.0; /* unit 1/V */ if (!model->BSIM3v1prwbGiven) model->BSIM3v1prwb = 0.0; if (!model->BSIM3v1prtGiven) if (!model->BSIM3v1prtGiven) model->BSIM3v1prt = 0.0; if (!model->BSIM3v1eta0Given) model->BSIM3v1eta0 = 0.08; /* no unit */ if (!model->BSIM3v1etabGiven) model->BSIM3v1etab = -0.07; /* unit 1/V */ if (!model->BSIM3v1pclmGiven) model->BSIM3v1pclm = 1.3; /* no unit */ if (!model->BSIM3v1pdibl1Given) model->BSIM3v1pdibl1 = .39; /* no unit */ if (!model->BSIM3v1pdibl2Given) model->BSIM3v1pdibl2 = 0.0086; /* no unit */ if (!model->BSIM3v1pdiblbGiven) model->BSIM3v1pdiblb = 0.0; /* 1/V */ if (!model->BSIM3v1pscbe1Given) model->BSIM3v1pscbe1 = 4.24e8; if (!model->BSIM3v1pscbe2Given) model->BSIM3v1pscbe2 = 1.0e-5; if (!model->BSIM3v1pvagGiven) model->BSIM3v1pvag = 0.0; if (!model->BSIM3v1wrGiven) model->BSIM3v1wr = 1.0; if (!model->BSIM3v1dwgGiven) model->BSIM3v1dwg = 0.0; if (!model->BSIM3v1dwbGiven) model->BSIM3v1dwb = 0.0; if (!model->BSIM3v1b0Given) model->BSIM3v1b0 = 0.0; if (!model->BSIM3v1b1Given) model->BSIM3v1b1 = 0.0; if (!model->BSIM3v1alpha0Given) model->BSIM3v1alpha0 = 0.0; if (!model->BSIM3v1beta0Given) model->BSIM3v1beta0 = 30.0; if (!model->BSIM3v1elmGiven) model->BSIM3v1elm = 5.0; if (!model->BSIM3v1cgslGiven) model->BSIM3v1cgsl = 0.0; if (!model->BSIM3v1cgdlGiven) model->BSIM3v1cgdl = 0.0; if (!model->BSIM3v1ckappaGiven) model->BSIM3v1ckappa = 0.6; if (!model->BSIM3v1clcGiven) model->BSIM3v1clc = 0.1e-6; if (!model->BSIM3v1cleGiven) model->BSIM3v1cle = 0.6; if (!model->BSIM3v1vfbcvGiven) model->BSIM3v1vfbcv = -1.0; /* Length dependence */ if (!model->BSIM3v1lcdscGiven) model->BSIM3v1lcdsc = 0.0; if (!model->BSIM3v1lcdscbGiven) model->BSIM3v1lcdscb = 0.0; if (!model->BSIM3v1lcdscdGiven) model->BSIM3v1lcdscd = 0.0; if (!model->BSIM3v1lcitGiven) model->BSIM3v1lcit = 0.0; if (!model->BSIM3v1lnfactorGiven) model->BSIM3v1lnfactor = 0.0; if (!model->BSIM3v1lxjGiven) model->BSIM3v1lxj = 0.0; if (!model->BSIM3v1lvsatGiven) model->BSIM3v1lvsat = 0.0; if (!model->BSIM3v1latGiven) model->BSIM3v1lat = 0.0; if (!model->BSIM3v1la0Given) model->BSIM3v1la0 = 0.0; if (!model->BSIM3v1lagsGiven) model->BSIM3v1lags = 0.0; if (!model->BSIM3v1la1Given) model->BSIM3v1la1 = 0.0; if (!model->BSIM3v1la2Given) model->BSIM3v1la2 = 0.0; if (!model->BSIM3v1lketaGiven) model->BSIM3v1lketa = 0.0; if (!model->BSIM3v1lnsubGiven) model->BSIM3v1lnsub = 0.0; if (!model->BSIM3v1lnpeakGiven) model->BSIM3v1lnpeak = 0.0; if (!model->BSIM3v1lngateGiven) model->BSIM3v1lngate = 0.0; if (!model->BSIM3v1lvbmGiven) model->BSIM3v1lvbm = 0.0; if (!model->BSIM3v1lxtGiven) model->BSIM3v1lxt = 0.0; if (!model->BSIM3v1lkt1Given) model->BSIM3v1lkt1 = 0.0; if (!model->BSIM3v1lkt1lGiven) model->BSIM3v1lkt1l = 0.0; if (!model->BSIM3v1lkt2Given) model->BSIM3v1lkt2 = 0.0; if (!model->BSIM3v1lk3Given) model->BSIM3v1lk3 = 0.0; if (!model->BSIM3v1lk3bGiven) model->BSIM3v1lk3b = 0.0; if (!model->BSIM3v1lw0Given) model->BSIM3v1lw0 = 0.0; if (!model->BSIM3v1lnlxGiven) model->BSIM3v1lnlx = 0.0; if (!model->BSIM3v1ldvt0Given) model->BSIM3v1ldvt0 = 0.0; if (!model->BSIM3v1ldvt1Given) model->BSIM3v1ldvt1 = 0.0; if (!model->BSIM3v1ldvt2Given) model->BSIM3v1ldvt2 = 0.0; if (!model->BSIM3v1ldvt0wGiven) model->BSIM3v1ldvt0w = 0.0; if (!model->BSIM3v1ldvt1wGiven) model->BSIM3v1ldvt1w = 0.0; if (!model->BSIM3v1ldvt2wGiven) model->BSIM3v1ldvt2w = 0.0; if (!model->BSIM3v1ldroutGiven) model->BSIM3v1ldrout = 0.0; if (!model->BSIM3v1ldsubGiven) model->BSIM3v1ldsub = 0.0; if (!model->BSIM3v1lvth0Given) model->BSIM3v1lvth0 = 0.0; if (!model->BSIM3v1luaGiven) model->BSIM3v1lua = 0.0; if (!model->BSIM3v1lua1Given) model->BSIM3v1lua1 = 0.0; if (!model->BSIM3v1lubGiven) model->BSIM3v1lub = 0.0; if (!model->BSIM3v1lub1Given) model->BSIM3v1lub1 = 0.0; if (!model->BSIM3v1lucGiven) model->BSIM3v1luc = 0.0; if (!model->BSIM3v1luc1Given) model->BSIM3v1luc1 = 0.0; if (!model->BSIM3v1lu0Given) model->BSIM3v1lu0 = 0.0; if (!model->BSIM3v1luteGiven) model->BSIM3v1lute = 0.0; if (!model->BSIM3v1lvoffGiven) model->BSIM3v1lvoff = 0.0; if (!model->BSIM3v1ldeltaGiven) model->BSIM3v1ldelta = 0.0; if (!model->BSIM3v1lrdswGiven) model->BSIM3v1lrdsw = 0.0; if (!model->BSIM3v1lprwbGiven) model->BSIM3v1lprwb = 0.0; if (!model->BSIM3v1lprwgGiven) model->BSIM3v1lprwg = 0.0; if (!model->BSIM3v1lprtGiven) if (!model->BSIM3v1lprtGiven) model->BSIM3v1lprt = 0.0; if (!model->BSIM3v1leta0Given) model->BSIM3v1leta0 = 0.0; if (!model->BSIM3v1letabGiven) model->BSIM3v1letab = -0.0; if (!model->BSIM3v1lpclmGiven) model->BSIM3v1lpclm = 0.0; if (!model->BSIM3v1lpdibl1Given) model->BSIM3v1lpdibl1 = 0.0; if (!model->BSIM3v1lpdibl2Given) model->BSIM3v1lpdibl2 = 0.0; if (!model->BSIM3v1lpdiblbGiven) model->BSIM3v1lpdiblb = 0.0; if (!model->BSIM3v1lpscbe1Given) model->BSIM3v1lpscbe1 = 0.0; if (!model->BSIM3v1lpscbe2Given) model->BSIM3v1lpscbe2 = 0.0; if (!model->BSIM3v1lpvagGiven) model->BSIM3v1lpvag = 0.0; if (!model->BSIM3v1lwrGiven) model->BSIM3v1lwr = 0.0; if (!model->BSIM3v1ldwgGiven) model->BSIM3v1ldwg = 0.0; if (!model->BSIM3v1ldwbGiven) model->BSIM3v1ldwb = 0.0; if (!model->BSIM3v1lb0Given) model->BSIM3v1lb0 = 0.0; if (!model->BSIM3v1lb1Given) model->BSIM3v1lb1 = 0.0; if (!model->BSIM3v1lalpha0Given) model->BSIM3v1lalpha0 = 0.0; if (!model->BSIM3v1lbeta0Given) model->BSIM3v1lbeta0 = 0.0; if (!model->BSIM3v1lelmGiven) model->BSIM3v1lelm = 0.0; if (!model->BSIM3v1lcgslGiven) model->BSIM3v1lcgsl = 0.0; if (!model->BSIM3v1lcgdlGiven) model->BSIM3v1lcgdl = 0.0; if (!model->BSIM3v1lckappaGiven) model->BSIM3v1lckappa = 0.0; if (!model->BSIM3v1lclcGiven) model->BSIM3v1lclc = 0.0; if (!model->BSIM3v1lcleGiven) model->BSIM3v1lcle = 0.0; if (!model->BSIM3v1lcfGiven) model->BSIM3v1lcf = 0.0; if (!model->BSIM3v1lvfbcvGiven) model->BSIM3v1lvfbcv = 0.0; /* Width dependence */ if (!model->BSIM3v1wcdscGiven) model->BSIM3v1wcdsc = 0.0; if (!model->BSIM3v1wcdscbGiven) model->BSIM3v1wcdscb = 0.0; if (!model->BSIM3v1wcdscdGiven) model->BSIM3v1wcdscd = 0.0; if (!model->BSIM3v1wcitGiven) model->BSIM3v1wcit = 0.0; if (!model->BSIM3v1wnfactorGiven) model->BSIM3v1wnfactor = 0.0; if (!model->BSIM3v1wxjGiven) model->BSIM3v1wxj = 0.0; if (!model->BSIM3v1wvsatGiven) model->BSIM3v1wvsat = 0.0; if (!model->BSIM3v1watGiven) model->BSIM3v1wat = 0.0; if (!model->BSIM3v1wa0Given) model->BSIM3v1wa0 = 0.0; if (!model->BSIM3v1wagsGiven) model->BSIM3v1wags = 0.0; if (!model->BSIM3v1wa1Given) model->BSIM3v1wa1 = 0.0; if (!model->BSIM3v1wa2Given) model->BSIM3v1wa2 = 0.0; if (!model->BSIM3v1wketaGiven) model->BSIM3v1wketa = 0.0; if (!model->BSIM3v1wnsubGiven) model->BSIM3v1wnsub = 0.0; if (!model->BSIM3v1wnpeakGiven) model->BSIM3v1wnpeak = 0.0; if (!model->BSIM3v1wngateGiven) model->BSIM3v1wngate = 0.0; if (!model->BSIM3v1wvbmGiven) model->BSIM3v1wvbm = 0.0; if (!model->BSIM3v1wxtGiven) model->BSIM3v1wxt = 0.0; if (!model->BSIM3v1wkt1Given) model->BSIM3v1wkt1 = 0.0; if (!model->BSIM3v1wkt1lGiven) model->BSIM3v1wkt1l = 0.0; if (!model->BSIM3v1wkt2Given) model->BSIM3v1wkt2 = 0.0; if (!model->BSIM3v1wk3Given) model->BSIM3v1wk3 = 0.0; if (!model->BSIM3v1wk3bGiven) model->BSIM3v1wk3b = 0.0; if (!model->BSIM3v1ww0Given) model->BSIM3v1ww0 = 0.0; if (!model->BSIM3v1wnlxGiven) model->BSIM3v1wnlx = 0.0; if (!model->BSIM3v1wdvt0Given) model->BSIM3v1wdvt0 = 0.0; if (!model->BSIM3v1wdvt1Given) model->BSIM3v1wdvt1 = 0.0; if (!model->BSIM3v1wdvt2Given) model->BSIM3v1wdvt2 = 0.0; if (!model->BSIM3v1wdvt0wGiven) model->BSIM3v1wdvt0w = 0.0; if (!model->BSIM3v1wdvt1wGiven) model->BSIM3v1wdvt1w = 0.0; if (!model->BSIM3v1wdvt2wGiven) model->BSIM3v1wdvt2w = 0.0; if (!model->BSIM3v1wdroutGiven) model->BSIM3v1wdrout = 0.0; if (!model->BSIM3v1wdsubGiven) model->BSIM3v1wdsub = 0.0; if (!model->BSIM3v1wvth0Given) model->BSIM3v1wvth0 = 0.0; if (!model->BSIM3v1wuaGiven) model->BSIM3v1wua = 0.0; if (!model->BSIM3v1wua1Given) model->BSIM3v1wua1 = 0.0; if (!model->BSIM3v1wubGiven) model->BSIM3v1wub = 0.0; if (!model->BSIM3v1wub1Given) model->BSIM3v1wub1 = 0.0; if (!model->BSIM3v1wucGiven) model->BSIM3v1wuc = 0.0; if (!model->BSIM3v1wuc1Given) model->BSIM3v1wuc1 = 0.0; if (!model->BSIM3v1wu0Given) model->BSIM3v1wu0 = 0.0; if (!model->BSIM3v1wuteGiven) model->BSIM3v1wute = 0.0; if (!model->BSIM3v1wvoffGiven) model->BSIM3v1wvoff = 0.0; if (!model->BSIM3v1wdeltaGiven) model->BSIM3v1wdelta = 0.0; if (!model->BSIM3v1wrdswGiven) model->BSIM3v1wrdsw = 0.0; if (!model->BSIM3v1wprwbGiven) model->BSIM3v1wprwb = 0.0; if (!model->BSIM3v1wprwgGiven) model->BSIM3v1wprwg = 0.0; if (!model->BSIM3v1wprtGiven) model->BSIM3v1wprt = 0.0; if (!model->BSIM3v1weta0Given) model->BSIM3v1weta0 = 0.0; if (!model->BSIM3v1wetabGiven) model->BSIM3v1wetab = 0.0; if (!model->BSIM3v1wpclmGiven) model->BSIM3v1wpclm = 0.0; if (!model->BSIM3v1wpdibl1Given) model->BSIM3v1wpdibl1 = 0.0; if (!model->BSIM3v1wpdibl2Given) model->BSIM3v1wpdibl2 = 0.0; if (!model->BSIM3v1wpdiblbGiven) model->BSIM3v1wpdiblb = 0.0; if (!model->BSIM3v1wpscbe1Given) model->BSIM3v1wpscbe1 = 0.0; if (!model->BSIM3v1wpscbe2Given) model->BSIM3v1wpscbe2 = 0.0; if (!model->BSIM3v1wpvagGiven) model->BSIM3v1wpvag = 0.0; if (!model->BSIM3v1wwrGiven) model->BSIM3v1wwr = 0.0; if (!model->BSIM3v1wdwgGiven) model->BSIM3v1wdwg = 0.0; if (!model->BSIM3v1wdwbGiven) model->BSIM3v1wdwb = 0.0; if (!model->BSIM3v1wb0Given) model->BSIM3v1wb0 = 0.0; if (!model->BSIM3v1wb1Given) model->BSIM3v1wb1 = 0.0; if (!model->BSIM3v1walpha0Given) model->BSIM3v1walpha0 = 0.0; if (!model->BSIM3v1wbeta0Given) model->BSIM3v1wbeta0 = 0.0; if (!model->BSIM3v1welmGiven) model->BSIM3v1welm = 0.0; if (!model->BSIM3v1wcgslGiven) model->BSIM3v1wcgsl = 0.0; if (!model->BSIM3v1wcgdlGiven) model->BSIM3v1wcgdl = 0.0; if (!model->BSIM3v1wckappaGiven) model->BSIM3v1wckappa = 0.0; if (!model->BSIM3v1wcfGiven) model->BSIM3v1wcf = 0.0; if (!model->BSIM3v1wclcGiven) model->BSIM3v1wclc = 0.0; if (!model->BSIM3v1wcleGiven) model->BSIM3v1wcle = 0.0; if (!model->BSIM3v1wvfbcvGiven) model->BSIM3v1wvfbcv = 0.0; /* Cross-term dependence */ if (!model->BSIM3v1pcdscGiven) model->BSIM3v1pcdsc = 0.0; if (!model->BSIM3v1pcdscbGiven) model->BSIM3v1pcdscb = 0.0; if (!model->BSIM3v1pcdscdGiven) model->BSIM3v1pcdscd = 0.0; if (!model->BSIM3v1pcitGiven) model->BSIM3v1pcit = 0.0; if (!model->BSIM3v1pnfactorGiven) model->BSIM3v1pnfactor = 0.0; if (!model->BSIM3v1pxjGiven) model->BSIM3v1pxj = 0.0; if (!model->BSIM3v1pvsatGiven) model->BSIM3v1pvsat = 0.0; if (!model->BSIM3v1patGiven) model->BSIM3v1pat = 0.0; if (!model->BSIM3v1pa0Given) model->BSIM3v1pa0 = 0.0; if (!model->BSIM3v1pagsGiven) model->BSIM3v1pags = 0.0; if (!model->BSIM3v1pa1Given) model->BSIM3v1pa1 = 0.0; if (!model->BSIM3v1pa2Given) model->BSIM3v1pa2 = 0.0; if (!model->BSIM3v1pketaGiven) model->BSIM3v1pketa = 0.0; if (!model->BSIM3v1pnsubGiven) model->BSIM3v1pnsub = 0.0; if (!model->BSIM3v1pnpeakGiven) model->BSIM3v1pnpeak = 0.0; if (!model->BSIM3v1pngateGiven) model->BSIM3v1pngate = 0.0; if (!model->BSIM3v1pvbmGiven) model->BSIM3v1pvbm = 0.0; if (!model->BSIM3v1pxtGiven) model->BSIM3v1pxt = 0.0; if (!model->BSIM3v1pkt1Given) model->BSIM3v1pkt1 = 0.0; if (!model->BSIM3v1pkt1lGiven) model->BSIM3v1pkt1l = 0.0; if (!model->BSIM3v1pkt2Given) model->BSIM3v1pkt2 = 0.0; if (!model->BSIM3v1pk3Given) model->BSIM3v1pk3 = 0.0; if (!model->BSIM3v1pk3bGiven) model->BSIM3v1pk3b = 0.0; if (!model->BSIM3v1pw0Given) model->BSIM3v1pw0 = 0.0; if (!model->BSIM3v1pnlxGiven) model->BSIM3v1pnlx = 0.0; if (!model->BSIM3v1pdvt0Given) model->BSIM3v1pdvt0 = 0.0; if (!model->BSIM3v1pdvt1Given) model->BSIM3v1pdvt1 = 0.0; if (!model->BSIM3v1pdvt2Given) model->BSIM3v1pdvt2 = 0.0; if (!model->BSIM3v1pdvt0wGiven) model->BSIM3v1pdvt0w = 0.0; if (!model->BSIM3v1pdvt1wGiven) model->BSIM3v1pdvt1w = 0.0; if (!model->BSIM3v1pdvt2wGiven) model->BSIM3v1pdvt2w = 0.0; if (!model->BSIM3v1pdroutGiven) model->BSIM3v1pdrout = 0.0; if (!model->BSIM3v1pdsubGiven) model->BSIM3v1pdsub = 0.0; if (!model->BSIM3v1pvth0Given) model->BSIM3v1pvth0 = 0.0; if (!model->BSIM3v1puaGiven) model->BSIM3v1pua = 0.0; if (!model->BSIM3v1pua1Given) model->BSIM3v1pua1 = 0.0; if (!model->BSIM3v1pubGiven) model->BSIM3v1pub = 0.0; if (!model->BSIM3v1pub1Given) model->BSIM3v1pub1 = 0.0; if (!model->BSIM3v1pucGiven) model->BSIM3v1puc = 0.0; if (!model->BSIM3v1puc1Given) model->BSIM3v1puc1 = 0.0; if (!model->BSIM3v1pu0Given) model->BSIM3v1pu0 = 0.0; if (!model->BSIM3v1puteGiven) model->BSIM3v1pute = 0.0; if (!model->BSIM3v1pvoffGiven) model->BSIM3v1pvoff = 0.0; if (!model->BSIM3v1pdeltaGiven) model->BSIM3v1pdelta = 0.0; if (!model->BSIM3v1prdswGiven) model->BSIM3v1prdsw = 0.0; if (!model->BSIM3v1pprwbGiven) model->BSIM3v1pprwb = 0.0; if (!model->BSIM3v1pprwgGiven) model->BSIM3v1pprwg = 0.0; if (!model->BSIM3v1pprtGiven) model->BSIM3v1pprt = 0.0; if (!model->BSIM3v1peta0Given) model->BSIM3v1peta0 = 0.0; if (!model->BSIM3v1petabGiven) model->BSIM3v1petab = 0.0; if (!model->BSIM3v1ppclmGiven) model->BSIM3v1ppclm = 0.0; if (!model->BSIM3v1ppdibl1Given) model->BSIM3v1ppdibl1 = 0.0; if (!model->BSIM3v1ppdibl2Given) model->BSIM3v1ppdibl2 = 0.0; if (!model->BSIM3v1ppdiblbGiven) model->BSIM3v1ppdiblb = 0.0; if (!model->BSIM3v1ppscbe1Given) model->BSIM3v1ppscbe1 = 0.0; if (!model->BSIM3v1ppscbe2Given) model->BSIM3v1ppscbe2 = 0.0; if (!model->BSIM3v1ppvagGiven) model->BSIM3v1ppvag = 0.0; if (!model->BSIM3v1pwrGiven) model->BSIM3v1pwr = 0.0; if (!model->BSIM3v1pdwgGiven) model->BSIM3v1pdwg = 0.0; if (!model->BSIM3v1pdwbGiven) model->BSIM3v1pdwb = 0.0; if (!model->BSIM3v1pb0Given) model->BSIM3v1pb0 = 0.0; if (!model->BSIM3v1pb1Given) model->BSIM3v1pb1 = 0.0; if (!model->BSIM3v1palpha0Given) model->BSIM3v1palpha0 = 0.0; if (!model->BSIM3v1pbeta0Given) model->BSIM3v1pbeta0 = 0.0; if (!model->BSIM3v1pelmGiven) model->BSIM3v1pelm = 0.0; if (!model->BSIM3v1pcgslGiven) model->BSIM3v1pcgsl = 0.0; if (!model->BSIM3v1pcgdlGiven) model->BSIM3v1pcgdl = 0.0; if (!model->BSIM3v1pckappaGiven) model->BSIM3v1pckappa = 0.0; if (!model->BSIM3v1pcfGiven) model->BSIM3v1pcf = 0.0; if (!model->BSIM3v1pclcGiven) model->BSIM3v1pclc = 0.0; if (!model->BSIM3v1pcleGiven) model->BSIM3v1pcle = 0.0; if (!model->BSIM3v1pvfbcvGiven) model->BSIM3v1pvfbcv = 0.0; /* unit degree celcius */ if (!model->BSIM3v1tnomGiven) model->BSIM3v1tnom = ckt->CKTnomTemp; if (!model->BSIM3v1LintGiven) model->BSIM3v1Lint = 0.0; if (!model->BSIM3v1LlGiven) model->BSIM3v1Ll = 0.0; if (!model->BSIM3v1LlnGiven) model->BSIM3v1Lln = 1.0; if (!model->BSIM3v1LwGiven) model->BSIM3v1Lw = 0.0; if (!model->BSIM3v1LwnGiven) model->BSIM3v1Lwn = 1.0; if (!model->BSIM3v1LwlGiven) model->BSIM3v1Lwl = 0.0; if (!model->BSIM3v1LminGiven) model->BSIM3v1Lmin = 0.0; if (!model->BSIM3v1LmaxGiven) model->BSIM3v1Lmax = 1.0; if (!model->BSIM3v1WintGiven) model->BSIM3v1Wint = 0.0; if (!model->BSIM3v1WlGiven) model->BSIM3v1Wl = 0.0; if (!model->BSIM3v1WlnGiven) model->BSIM3v1Wln = 1.0; if (!model->BSIM3v1WwGiven) model->BSIM3v1Ww = 0.0; if (!model->BSIM3v1WwnGiven) model->BSIM3v1Wwn = 1.0; if (!model->BSIM3v1WwlGiven) model->BSIM3v1Wwl = 0.0; if (!model->BSIM3v1WminGiven) model->BSIM3v1Wmin = 0.0; if (!model->BSIM3v1WmaxGiven) model->BSIM3v1Wmax = 1.0; if (!model->BSIM3v1dwcGiven) model->BSIM3v1dwc = model->BSIM3v1Wint; if (!model->BSIM3v1dlcGiven) model->BSIM3v1dlc = model->BSIM3v1Lint; if (!model->BSIM3v1cfGiven) model->BSIM3v1cf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->BSIM3v1tox); if (!model->BSIM3v1cgdoGiven) { if (model->BSIM3v1dlcGiven && (model->BSIM3v1dlc > 0.0)) { model->BSIM3v1cgdo = model->BSIM3v1dlc * model->BSIM3v1cox - model->BSIM3v1cgdl ; } else model->BSIM3v1cgdo = 0.6 * model->BSIM3v1xj * model->BSIM3v1cox; } if (!model->BSIM3v1cgsoGiven) { if (model->BSIM3v1dlcGiven && (model->BSIM3v1dlc > 0.0)) { model->BSIM3v1cgso = model->BSIM3v1dlc * model->BSIM3v1cox - model->BSIM3v1cgsl ; } else model->BSIM3v1cgso = 0.6 * model->BSIM3v1xj * model->BSIM3v1cox; } if (!model->BSIM3v1cgboGiven) { model->BSIM3v1cgbo = 2.0 * model->BSIM3v1dwc * model->BSIM3v1cox; } if (!model->BSIM3v1xpartGiven) model->BSIM3v1xpart = 0.0; if (!model->BSIM3v1sheetResistanceGiven) model->BSIM3v1sheetResistance = 0.0; if (!model->BSIM3v1unitAreaJctCapGiven) model->BSIM3v1unitAreaJctCap = 5.0E-4; if (!model->BSIM3v1unitLengthSidewallJctCapGiven) model->BSIM3v1unitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM3v1unitLengthGateSidewallJctCapGiven) model->BSIM3v1unitLengthGateSidewallJctCap = model->BSIM3v1unitLengthSidewallJctCap ; if (!model->BSIM3v1jctSatCurDensityGiven) model->BSIM3v1jctSatCurDensity = 1.0E-4; if (!model->BSIM3v1jctSidewallSatCurDensityGiven) model->BSIM3v1jctSidewallSatCurDensity = 0.0; if (!model->BSIM3v1bulkJctPotentialGiven) model->BSIM3v1bulkJctPotential = 1.0; if (!model->BSIM3v1sidewallJctPotentialGiven) model->BSIM3v1sidewallJctPotential = 1.0; if (!model->BSIM3v1GatesidewallJctPotentialGiven) model->BSIM3v1GatesidewallJctPotential = model->BSIM3v1sidewallJctPotential; if (!model->BSIM3v1bulkJctBotGradingCoeffGiven) model->BSIM3v1bulkJctBotGradingCoeff = 0.5; if (!model->BSIM3v1bulkJctSideGradingCoeffGiven) model->BSIM3v1bulkJctSideGradingCoeff = 0.33; if (!model->BSIM3v1bulkJctGateSideGradingCoeffGiven) model->BSIM3v1bulkJctGateSideGradingCoeff = model->BSIM3v1bulkJctSideGradingCoeff; if (!model->BSIM3v1jctEmissionCoeffGiven) model->BSIM3v1jctEmissionCoeff = 1.0; if (!model->BSIM3v1jctTempExponentGiven) model->BSIM3v1jctTempExponent = 3.0; if (!model->BSIM3v1oxideTrapDensityAGiven) if (!model->BSIM3v1oxideTrapDensityAGiven) { if (model->BSIM3v1type == NMOS) model->BSIM3v1oxideTrapDensityA = 1e20; else model->BSIM3v1oxideTrapDensityA=9.9e18; } if (!model->BSIM3v1oxideTrapDensityBGiven) { if (model->BSIM3v1type == NMOS) model->BSIM3v1oxideTrapDensityB = 5e4; else model->BSIM3v1oxideTrapDensityB = 2.4e3; } if (!model->BSIM3v1oxideTrapDensityCGiven) { if (model->BSIM3v1type == NMOS) model->BSIM3v1oxideTrapDensityC = -1.4e-12; else model->BSIM3v1oxideTrapDensityC = 1.4e-12; } if (!model->BSIM3v1emGiven) model->BSIM3v1em = 4.1e7; /* V/m */ if (!model->BSIM3v1efGiven) model->BSIM3v1ef = 1.0; if (!model->BSIM3v1afGiven) model->BSIM3v1af = 1.0; if (!model->BSIM3v1kfGiven) model->BSIM3v1kf = 0.0; /* loop through all the instances of the model */ for (here = model->BSIM3v1instances; here != NULL ; here=here->BSIM3v1nextInstance) { /* allocate a chunk of the state vector */ here->BSIM3v1states = *states; *states += BSIM3v1numStates; /* perform the parameter defaulting */ if(here->BSIM3v1m == 0.0) here->BSIM3v1m = 1.0; if (!here->BSIM3v1wGiven) here->BSIM3v1w = 5e-6; if (!here->BSIM3v1drainAreaGiven) { if(model->BSIM3v1hdifGiven) here->BSIM3v1drainArea = here->BSIM3v1w * 2 * model->BSIM3v1hdif; else here->BSIM3v1drainArea = 0.0; } if (!here->BSIM3v1drainPerimeterGiven) { if(model->BSIM3v1hdifGiven) here->BSIM3v1drainPerimeter = 2 * here->BSIM3v1w + 4 * model->BSIM3v1hdif; else here->BSIM3v1drainPerimeter = 0.0; } if (!here->BSIM3v1drainSquaresGiven) here->BSIM3v1drainSquares = 1.0; if (!here->BSIM3v1icVBSGiven) here->BSIM3v1icVBS = 0; if (!here->BSIM3v1icVDSGiven) here->BSIM3v1icVDS = 0; if (!here->BSIM3v1icVGSGiven) here->BSIM3v1icVGS = 0; if (!here->BSIM3v1lGiven) here->BSIM3v1l = 5e-6; if (!here->BSIM3v1sourceAreaGiven) { if(model->BSIM3v1hdifGiven) here->BSIM3v1sourceArea = here->BSIM3v1w * 2 * model->BSIM3v1hdif; else here->BSIM3v1sourceArea = 0.0; } if (!here->BSIM3v1sourcePerimeterGiven) { if(model->BSIM3v1hdifGiven) here->BSIM3v1sourcePerimeter = 2 * here->BSIM3v1w + 4 * model->BSIM3v1hdif; else here->BSIM3v1sourcePerimeter = 0.0; } if (!here->BSIM3v1sourceSquaresGiven) here->BSIM3v1sourceSquares = 1; if (!here->BSIM3v1wGiven) here->BSIM3v1w = 5e-6; if (!here->BSIM3v1mGiven) here->BSIM3v1m = 1; if (!here->BSIM3v1nqsModGiven) here->BSIM3v1nqsMod = model->BSIM3v1nqsMod; /* process drain series resistance */ if ((model->BSIM3v1sheetResistance > 0.0) && (here->BSIM3v1drainSquares > 0.0 )) { if(here->BSIM3v1dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v1name,"drain"); if(error) return(error); here->BSIM3v1dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v1dNodePrime = here->BSIM3v1dNode; } /* process source series resistance */ if ((model->BSIM3v1sheetResistance > 0.0) && (here->BSIM3v1sourceSquares > 0.0 )) { if(here->BSIM3v1sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v1name,"source"); if(error) return(error); here->BSIM3v1sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v1sNodePrime = here->BSIM3v1sNode; } /* internal charge node */ if ((here->BSIM3v1nqsMod)) { if(here->BSIM3v1qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v1name,"charge"); if(error) return(error); here->BSIM3v1qNode = tmp->number; } } else { here->BSIM3v1qNode = 0; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM3v1DdPtr, BSIM3v1dNode, BSIM3v1dNode); TSTALLOC(BSIM3v1GgPtr, BSIM3v1gNode, BSIM3v1gNode); TSTALLOC(BSIM3v1SsPtr, BSIM3v1sNode, BSIM3v1sNode); TSTALLOC(BSIM3v1BbPtr, BSIM3v1bNode, BSIM3v1bNode); TSTALLOC(BSIM3v1DPdpPtr, BSIM3v1dNodePrime, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1SPspPtr, BSIM3v1sNodePrime, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1DdpPtr, BSIM3v1dNode, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1GbPtr, BSIM3v1gNode, BSIM3v1bNode); TSTALLOC(BSIM3v1GdpPtr, BSIM3v1gNode, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1GspPtr, BSIM3v1gNode, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1SspPtr, BSIM3v1sNode, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1BdpPtr, BSIM3v1bNode, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1BspPtr, BSIM3v1bNode, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1DPspPtr, BSIM3v1dNodePrime, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1DPdPtr, BSIM3v1dNodePrime, BSIM3v1dNode); TSTALLOC(BSIM3v1BgPtr, BSIM3v1bNode, BSIM3v1gNode); TSTALLOC(BSIM3v1DPgPtr, BSIM3v1dNodePrime, BSIM3v1gNode); TSTALLOC(BSIM3v1SPgPtr, BSIM3v1sNodePrime, BSIM3v1gNode); TSTALLOC(BSIM3v1SPsPtr, BSIM3v1sNodePrime, BSIM3v1sNode); TSTALLOC(BSIM3v1DPbPtr, BSIM3v1dNodePrime, BSIM3v1bNode); TSTALLOC(BSIM3v1SPbPtr, BSIM3v1sNodePrime, BSIM3v1bNode); TSTALLOC(BSIM3v1SPdpPtr, BSIM3v1sNodePrime, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1QqPtr, BSIM3v1qNode, BSIM3v1qNode); TSTALLOC(BSIM3v1QdpPtr, BSIM3v1qNode, BSIM3v1dNodePrime); TSTALLOC(BSIM3v1QspPtr, BSIM3v1qNode, BSIM3v1sNodePrime); TSTALLOC(BSIM3v1QgPtr, BSIM3v1qNode, BSIM3v1gNode); TSTALLOC(BSIM3v1QbPtr, BSIM3v1qNode, BSIM3v1bNode); TSTALLOC(BSIM3v1DPqPtr, BSIM3v1dNodePrime, BSIM3v1qNode); TSTALLOC(BSIM3v1SPqPtr, BSIM3v1sNodePrime, BSIM3v1qNode); TSTALLOC(BSIM3v1GqPtr, BSIM3v1gNode, BSIM3v1qNode); TSTALLOC(BSIM3v1BqPtr, BSIM3v1bNode, BSIM3v1qNode); } } return(OK); } int BSIM3v1unsetup(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v1model *model; BSIM3v1instance *here; for (model = (BSIM3v1model *)inModel; model != NULL; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here != NULL; here=here->BSIM3v1nextInstance) { if (here->BSIM3v1dNodePrime && here->BSIM3v1dNodePrime != here->BSIM3v1dNode) { CKTdltNNum(ckt, here->BSIM3v1dNodePrime); here->BSIM3v1dNodePrime = 0; } if (here->BSIM3v1sNodePrime && here->BSIM3v1sNodePrime != here->BSIM3v1sNode) { CKTdltNNum(ckt, here->BSIM3v1sNodePrime); here->BSIM3v1sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3v1/b3v1mpar.c0000644000265600020320000015215012264261473021323 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3mpar.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v1v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "bsim3v1def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1mParam(int param, IFvalue *value, GENmodel *inMod) { BSIM3v1model *mod = (BSIM3v1model*)inMod; switch(param) { case BSIM3v1_MOD_MOBMOD : mod->BSIM3v1mobMod = value->iValue; mod->BSIM3v1mobModGiven = TRUE; break; case BSIM3v1_MOD_BINUNIT : mod->BSIM3v1binUnit = value->iValue; mod->BSIM3v1binUnitGiven = TRUE; break; case BSIM3v1_MOD_PARAMCHK : mod->BSIM3v1paramChk = value->iValue; mod->BSIM3v1paramChkGiven = TRUE; break; case BSIM3v1_MOD_CAPMOD : mod->BSIM3v1capMod = value->iValue; mod->BSIM3v1capModGiven = TRUE; break; case BSIM3v1_MOD_NQSMOD : mod->BSIM3v1nqsMod = value->iValue; mod->BSIM3v1nqsModGiven = TRUE; break; case BSIM3v1_MOD_NOIMOD : mod->BSIM3v1noiMod = value->iValue; mod->BSIM3v1noiModGiven = TRUE; break; case BSIM3v1_MOD_VERSION : mod->BSIM3v1version = value->rValue; mod->BSIM3v1versionGiven = TRUE; break; case BSIM3v1_MOD_TOX : mod->BSIM3v1tox = value->rValue; mod->BSIM3v1toxGiven = TRUE; break; case BSIM3v1_MOD_CDSC : mod->BSIM3v1cdsc = value->rValue; mod->BSIM3v1cdscGiven = TRUE; break; case BSIM3v1_MOD_CDSCB : mod->BSIM3v1cdscb = value->rValue; mod->BSIM3v1cdscbGiven = TRUE; break; case BSIM3v1_MOD_CDSCD : mod->BSIM3v1cdscd = value->rValue; mod->BSIM3v1cdscdGiven = TRUE; break; case BSIM3v1_MOD_CIT : mod->BSIM3v1cit = value->rValue; mod->BSIM3v1citGiven = TRUE; break; case BSIM3v1_MOD_NFACTOR : mod->BSIM3v1nfactor = value->rValue; mod->BSIM3v1nfactorGiven = TRUE; break; case BSIM3v1_MOD_XJ: mod->BSIM3v1xj = value->rValue; mod->BSIM3v1xjGiven = TRUE; break; case BSIM3v1_MOD_VSAT: mod->BSIM3v1vsat = value->rValue; mod->BSIM3v1vsatGiven = TRUE; break; case BSIM3v1_MOD_A0: mod->BSIM3v1a0 = value->rValue; mod->BSIM3v1a0Given = TRUE; break; case BSIM3v1_MOD_AGS: mod->BSIM3v1ags= value->rValue; mod->BSIM3v1agsGiven = TRUE; break; case BSIM3v1_MOD_A1: mod->BSIM3v1a1 = value->rValue; mod->BSIM3v1a1Given = TRUE; break; case BSIM3v1_MOD_A2: mod->BSIM3v1a2 = value->rValue; mod->BSIM3v1a2Given = TRUE; break; case BSIM3v1_MOD_AT: mod->BSIM3v1at = value->rValue; mod->BSIM3v1atGiven = TRUE; break; case BSIM3v1_MOD_KETA: mod->BSIM3v1keta = value->rValue; mod->BSIM3v1ketaGiven = TRUE; break; case BSIM3v1_MOD_NSUB: mod->BSIM3v1nsub = value->rValue; mod->BSIM3v1nsubGiven = TRUE; break; case BSIM3v1_MOD_NPEAK: mod->BSIM3v1npeak = value->rValue; mod->BSIM3v1npeakGiven = TRUE; if (mod->BSIM3v1npeak > 1.0e20) mod->BSIM3v1npeak *= 1.0e-6; break; case BSIM3v1_MOD_NGATE: mod->BSIM3v1ngate = value->rValue; mod->BSIM3v1ngateGiven = TRUE; if (mod->BSIM3v1ngate > 1.0e23) mod->BSIM3v1ngate *= 1.0e-6; break; case BSIM3v1_MOD_GAMMA1: mod->BSIM3v1gamma1 = value->rValue; mod->BSIM3v1gamma1Given = TRUE; break; case BSIM3v1_MOD_GAMMA2: mod->BSIM3v1gamma2 = value->rValue; mod->BSIM3v1gamma2Given = TRUE; break; case BSIM3v1_MOD_VBX: mod->BSIM3v1vbx = value->rValue; mod->BSIM3v1vbxGiven = TRUE; break; case BSIM3v1_MOD_VBM: mod->BSIM3v1vbm = value->rValue; mod->BSIM3v1vbmGiven = TRUE; break; case BSIM3v1_MOD_XT: mod->BSIM3v1xt = value->rValue; mod->BSIM3v1xtGiven = TRUE; break; case BSIM3v1_MOD_K1: mod->BSIM3v1k1 = value->rValue; mod->BSIM3v1k1Given = TRUE; break; case BSIM3v1_MOD_KT1: mod->BSIM3v1kt1 = value->rValue; mod->BSIM3v1kt1Given = TRUE; break; case BSIM3v1_MOD_KT1L: mod->BSIM3v1kt1l = value->rValue; mod->BSIM3v1kt1lGiven = TRUE; break; case BSIM3v1_MOD_KT2: mod->BSIM3v1kt2 = value->rValue; mod->BSIM3v1kt2Given = TRUE; break; case BSIM3v1_MOD_K2: mod->BSIM3v1k2 = value->rValue; mod->BSIM3v1k2Given = TRUE; break; case BSIM3v1_MOD_K3: mod->BSIM3v1k3 = value->rValue; mod->BSIM3v1k3Given = TRUE; break; case BSIM3v1_MOD_K3B: mod->BSIM3v1k3b = value->rValue; mod->BSIM3v1k3bGiven = TRUE; break; case BSIM3v1_MOD_NLX: mod->BSIM3v1nlx = value->rValue; mod->BSIM3v1nlxGiven = TRUE; break; case BSIM3v1_MOD_W0: mod->BSIM3v1w0 = value->rValue; mod->BSIM3v1w0Given = TRUE; break; case BSIM3v1_MOD_DVT0: mod->BSIM3v1dvt0 = value->rValue; mod->BSIM3v1dvt0Given = TRUE; break; case BSIM3v1_MOD_DVT1: mod->BSIM3v1dvt1 = value->rValue; mod->BSIM3v1dvt1Given = TRUE; break; case BSIM3v1_MOD_DVT2: mod->BSIM3v1dvt2 = value->rValue; mod->BSIM3v1dvt2Given = TRUE; break; case BSIM3v1_MOD_DVT0W: mod->BSIM3v1dvt0w = value->rValue; mod->BSIM3v1dvt0wGiven = TRUE; break; case BSIM3v1_MOD_DVT1W: mod->BSIM3v1dvt1w = value->rValue; mod->BSIM3v1dvt1wGiven = TRUE; break; case BSIM3v1_MOD_DVT2W: mod->BSIM3v1dvt2w = value->rValue; mod->BSIM3v1dvt2wGiven = TRUE; break; case BSIM3v1_MOD_DROUT: mod->BSIM3v1drout = value->rValue; mod->BSIM3v1droutGiven = TRUE; break; case BSIM3v1_MOD_DSUB: mod->BSIM3v1dsub = value->rValue; mod->BSIM3v1dsubGiven = TRUE; break; case BSIM3v1_MOD_VTH0: mod->BSIM3v1vth0 = value->rValue; mod->BSIM3v1vth0Given = TRUE; break; case BSIM3v1_MOD_UA: mod->BSIM3v1ua = value->rValue; mod->BSIM3v1uaGiven = TRUE; break; case BSIM3v1_MOD_UA1: mod->BSIM3v1ua1 = value->rValue; mod->BSIM3v1ua1Given = TRUE; break; case BSIM3v1_MOD_UB: mod->BSIM3v1ub = value->rValue; mod->BSIM3v1ubGiven = TRUE; break; case BSIM3v1_MOD_UB1: mod->BSIM3v1ub1 = value->rValue; mod->BSIM3v1ub1Given = TRUE; break; case BSIM3v1_MOD_UC: mod->BSIM3v1uc = value->rValue; mod->BSIM3v1ucGiven = TRUE; break; case BSIM3v1_MOD_UC1: mod->BSIM3v1uc1 = value->rValue; mod->BSIM3v1uc1Given = TRUE; break; case BSIM3v1_MOD_U0 : mod->BSIM3v1u0 = value->rValue; mod->BSIM3v1u0Given = TRUE; break; case BSIM3v1_MOD_UTE : mod->BSIM3v1ute = value->rValue; mod->BSIM3v1uteGiven = TRUE; break; case BSIM3v1_MOD_VOFF: mod->BSIM3v1voff = value->rValue; mod->BSIM3v1voffGiven = TRUE; break; case BSIM3v1_MOD_DELTA : mod->BSIM3v1delta = value->rValue; mod->BSIM3v1deltaGiven = TRUE; break; case BSIM3v1_MOD_RDSW: mod->BSIM3v1rdsw = value->rValue; mod->BSIM3v1rdswGiven = TRUE; break; case BSIM3v1_MOD_PRWG: mod->BSIM3v1prwg = value->rValue; mod->BSIM3v1prwgGiven = TRUE; break; case BSIM3v1_MOD_PRWB: mod->BSIM3v1prwb = value->rValue; mod->BSIM3v1prwbGiven = TRUE; break; case BSIM3v1_MOD_PRT: mod->BSIM3v1prt = value->rValue; mod->BSIM3v1prtGiven = TRUE; break; case BSIM3v1_MOD_ETA0: mod->BSIM3v1eta0 = value->rValue; mod->BSIM3v1eta0Given = TRUE; break; case BSIM3v1_MOD_ETAB: mod->BSIM3v1etab = value->rValue; mod->BSIM3v1etabGiven = TRUE; break; case BSIM3v1_MOD_PCLM: mod->BSIM3v1pclm = value->rValue; mod->BSIM3v1pclmGiven = TRUE; break; case BSIM3v1_MOD_PDIBL1: mod->BSIM3v1pdibl1 = value->rValue; mod->BSIM3v1pdibl1Given = TRUE; break; case BSIM3v1_MOD_PDIBL2: mod->BSIM3v1pdibl2 = value->rValue; mod->BSIM3v1pdibl2Given = TRUE; break; case BSIM3v1_MOD_PDIBLB: mod->BSIM3v1pdiblb = value->rValue; mod->BSIM3v1pdiblbGiven = TRUE; break; case BSIM3v1_MOD_PSCBE1: mod->BSIM3v1pscbe1 = value->rValue; mod->BSIM3v1pscbe1Given = TRUE; break; case BSIM3v1_MOD_PSCBE2: mod->BSIM3v1pscbe2 = value->rValue; mod->BSIM3v1pscbe2Given = TRUE; break; case BSIM3v1_MOD_PVAG: mod->BSIM3v1pvag = value->rValue; mod->BSIM3v1pvagGiven = TRUE; break; case BSIM3v1_MOD_WR : mod->BSIM3v1wr = value->rValue; mod->BSIM3v1wrGiven = TRUE; break; case BSIM3v1_MOD_DWG : mod->BSIM3v1dwg = value->rValue; mod->BSIM3v1dwgGiven = TRUE; break; case BSIM3v1_MOD_DWB : mod->BSIM3v1dwb = value->rValue; mod->BSIM3v1dwbGiven = TRUE; break; case BSIM3v1_MOD_B0 : mod->BSIM3v1b0 = value->rValue; mod->BSIM3v1b0Given = TRUE; break; case BSIM3v1_MOD_B1 : mod->BSIM3v1b1 = value->rValue; mod->BSIM3v1b1Given = TRUE; break; case BSIM3v1_MOD_ALPHA0 : mod->BSIM3v1alpha0 = value->rValue; mod->BSIM3v1alpha0Given = TRUE; break; case BSIM3v1_MOD_BETA0 : mod->BSIM3v1beta0 = value->rValue; mod->BSIM3v1beta0Given = TRUE; break; case BSIM3v1_MOD_ELM : mod->BSIM3v1elm = value->rValue; mod->BSIM3v1elmGiven = TRUE; break; case BSIM3v1_MOD_CGSL : mod->BSIM3v1cgsl = value->rValue; mod->BSIM3v1cgslGiven = TRUE; break; case BSIM3v1_MOD_CGDL : mod->BSIM3v1cgdl = value->rValue; mod->BSIM3v1cgdlGiven = TRUE; break; case BSIM3v1_MOD_CKAPPA : mod->BSIM3v1ckappa = value->rValue; mod->BSIM3v1ckappaGiven = TRUE; break; case BSIM3v1_MOD_CF : mod->BSIM3v1cf = value->rValue; mod->BSIM3v1cfGiven = TRUE; break; case BSIM3v1_MOD_CLC : mod->BSIM3v1clc = value->rValue; mod->BSIM3v1clcGiven = TRUE; break; case BSIM3v1_MOD_CLE : mod->BSIM3v1cle = value->rValue; mod->BSIM3v1cleGiven = TRUE; break; case BSIM3v1_MOD_DWC : mod->BSIM3v1dwc = value->rValue; mod->BSIM3v1dwcGiven = TRUE; break; case BSIM3v1_MOD_DLC : mod->BSIM3v1dlc = value->rValue; mod->BSIM3v1dlcGiven = TRUE; break; case BSIM3v1_MOD_VFBCV : mod->BSIM3v1vfbcv = value->rValue; mod->BSIM3v1vfbcvGiven = TRUE; break; /* Length dependence */ case BSIM3v1_MOD_LCDSC : mod->BSIM3v1lcdsc = value->rValue; mod->BSIM3v1lcdscGiven = TRUE; break; case BSIM3v1_MOD_LCDSCB : mod->BSIM3v1lcdscb = value->rValue; mod->BSIM3v1lcdscbGiven = TRUE; break; case BSIM3v1_MOD_LCDSCD : mod->BSIM3v1lcdscd = value->rValue; mod->BSIM3v1lcdscdGiven = TRUE; break; case BSIM3v1_MOD_LCIT : mod->BSIM3v1lcit = value->rValue; mod->BSIM3v1lcitGiven = TRUE; break; case BSIM3v1_MOD_LNFACTOR : mod->BSIM3v1lnfactor = value->rValue; mod->BSIM3v1lnfactorGiven = TRUE; break; case BSIM3v1_MOD_LXJ: mod->BSIM3v1lxj = value->rValue; mod->BSIM3v1lxjGiven = TRUE; break; case BSIM3v1_MOD_LVSAT: mod->BSIM3v1lvsat = value->rValue; mod->BSIM3v1lvsatGiven = TRUE; break; case BSIM3v1_MOD_LA0: mod->BSIM3v1la0 = value->rValue; mod->BSIM3v1la0Given = TRUE; break; case BSIM3v1_MOD_LAGS: mod->BSIM3v1lags = value->rValue; mod->BSIM3v1lagsGiven = TRUE; break; case BSIM3v1_MOD_LA1: mod->BSIM3v1la1 = value->rValue; mod->BSIM3v1la1Given = TRUE; break; case BSIM3v1_MOD_LA2: mod->BSIM3v1la2 = value->rValue; mod->BSIM3v1la2Given = TRUE; break; case BSIM3v1_MOD_LAT: mod->BSIM3v1lat = value->rValue; mod->BSIM3v1latGiven = TRUE; break; case BSIM3v1_MOD_LKETA: mod->BSIM3v1lketa = value->rValue; mod->BSIM3v1lketaGiven = TRUE; break; case BSIM3v1_MOD_LNSUB: mod->BSIM3v1lnsub = value->rValue; mod->BSIM3v1lnsubGiven = TRUE; break; case BSIM3v1_MOD_LNPEAK: mod->BSIM3v1lnpeak = value->rValue; mod->BSIM3v1lnpeakGiven = TRUE; if (mod->BSIM3v1lnpeak > 1.0e20) mod->BSIM3v1lnpeak *= 1.0e-6; break; case BSIM3v1_MOD_LNGATE: mod->BSIM3v1lngate = value->rValue; mod->BSIM3v1lngateGiven = TRUE; if (mod->BSIM3v1lngate > 1.0e23) mod->BSIM3v1lngate *= 1.0e-6; break; case BSIM3v1_MOD_LGAMMA1: mod->BSIM3v1lgamma1 = value->rValue; mod->BSIM3v1lgamma1Given = TRUE; break; case BSIM3v1_MOD_LGAMMA2: mod->BSIM3v1lgamma2 = value->rValue; mod->BSIM3v1lgamma2Given = TRUE; break; case BSIM3v1_MOD_LVBX: mod->BSIM3v1lvbx = value->rValue; mod->BSIM3v1lvbxGiven = TRUE; break; case BSIM3v1_MOD_LVBM: mod->BSIM3v1lvbm = value->rValue; mod->BSIM3v1lvbmGiven = TRUE; break; case BSIM3v1_MOD_LXT: mod->BSIM3v1lxt = value->rValue; mod->BSIM3v1lxtGiven = TRUE; break; case BSIM3v1_MOD_LK1: mod->BSIM3v1lk1 = value->rValue; mod->BSIM3v1lk1Given = TRUE; break; case BSIM3v1_MOD_LKT1: mod->BSIM3v1lkt1 = value->rValue; mod->BSIM3v1lkt1Given = TRUE; break; case BSIM3v1_MOD_LKT1L: mod->BSIM3v1lkt1l = value->rValue; mod->BSIM3v1lkt1lGiven = TRUE; break; case BSIM3v1_MOD_LKT2: mod->BSIM3v1lkt2 = value->rValue; mod->BSIM3v1lkt2Given = TRUE; break; case BSIM3v1_MOD_LK2: mod->BSIM3v1lk2 = value->rValue; mod->BSIM3v1lk2Given = TRUE; break; case BSIM3v1_MOD_LK3: mod->BSIM3v1lk3 = value->rValue; mod->BSIM3v1lk3Given = TRUE; break; case BSIM3v1_MOD_LK3B: mod->BSIM3v1lk3b = value->rValue; mod->BSIM3v1lk3bGiven = TRUE; break; case BSIM3v1_MOD_LNLX: mod->BSIM3v1lnlx = value->rValue; mod->BSIM3v1lnlxGiven = TRUE; break; case BSIM3v1_MOD_LW0: mod->BSIM3v1lw0 = value->rValue; mod->BSIM3v1lw0Given = TRUE; break; case BSIM3v1_MOD_LDVT0: mod->BSIM3v1ldvt0 = value->rValue; mod->BSIM3v1ldvt0Given = TRUE; break; case BSIM3v1_MOD_LDVT1: mod->BSIM3v1ldvt1 = value->rValue; mod->BSIM3v1ldvt1Given = TRUE; break; case BSIM3v1_MOD_LDVT2: mod->BSIM3v1ldvt2 = value->rValue; mod->BSIM3v1ldvt2Given = TRUE; break; case BSIM3v1_MOD_LDVT0W: mod->BSIM3v1ldvt0w = value->rValue; mod->BSIM3v1ldvt0Given = TRUE; break; case BSIM3v1_MOD_LDVT1W: mod->BSIM3v1ldvt1w = value->rValue; mod->BSIM3v1ldvt1wGiven = TRUE; break; case BSIM3v1_MOD_LDVT2W: mod->BSIM3v1ldvt2w = value->rValue; mod->BSIM3v1ldvt2wGiven = TRUE; break; case BSIM3v1_MOD_LDROUT: mod->BSIM3v1ldrout = value->rValue; mod->BSIM3v1ldroutGiven = TRUE; break; case BSIM3v1_MOD_LDSUB: mod->BSIM3v1ldsub = value->rValue; mod->BSIM3v1ldsubGiven = TRUE; break; case BSIM3v1_MOD_LVTH0: mod->BSIM3v1lvth0 = value->rValue; mod->BSIM3v1lvth0Given = TRUE; break; case BSIM3v1_MOD_LUA: mod->BSIM3v1lua = value->rValue; mod->BSIM3v1luaGiven = TRUE; break; case BSIM3v1_MOD_LUA1: mod->BSIM3v1lua1 = value->rValue; mod->BSIM3v1lua1Given = TRUE; break; case BSIM3v1_MOD_LUB: mod->BSIM3v1lub = value->rValue; mod->BSIM3v1lubGiven = TRUE; break; case BSIM3v1_MOD_LUB1: mod->BSIM3v1lub1 = value->rValue; mod->BSIM3v1lub1Given = TRUE; break; case BSIM3v1_MOD_LUC: mod->BSIM3v1luc = value->rValue; mod->BSIM3v1lucGiven = TRUE; break; case BSIM3v1_MOD_LUC1: mod->BSIM3v1luc1 = value->rValue; mod->BSIM3v1luc1Given = TRUE; break; case BSIM3v1_MOD_LU0 : mod->BSIM3v1lu0 = value->rValue; mod->BSIM3v1lu0Given = TRUE; break; case BSIM3v1_MOD_LUTE : mod->BSIM3v1lute = value->rValue; mod->BSIM3v1luteGiven = TRUE; break; case BSIM3v1_MOD_LVOFF: mod->BSIM3v1lvoff = value->rValue; mod->BSIM3v1lvoffGiven = TRUE; break; case BSIM3v1_MOD_LDELTA : mod->BSIM3v1ldelta = value->rValue; mod->BSIM3v1ldeltaGiven = TRUE; break; case BSIM3v1_MOD_LRDSW: mod->BSIM3v1lrdsw = value->rValue; mod->BSIM3v1lrdswGiven = TRUE; break; case BSIM3v1_MOD_LPRWB: mod->BSIM3v1lprwb = value->rValue; mod->BSIM3v1lprwbGiven = TRUE; break; case BSIM3v1_MOD_LPRWG: mod->BSIM3v1lprwg = value->rValue; mod->BSIM3v1lprwgGiven = TRUE; break; case BSIM3v1_MOD_LPRT: mod->BSIM3v1lprt = value->rValue; mod->BSIM3v1lprtGiven = TRUE; break; case BSIM3v1_MOD_LETA0: mod->BSIM3v1leta0 = value->rValue; mod->BSIM3v1leta0Given = TRUE; break; case BSIM3v1_MOD_LETAB: mod->BSIM3v1letab = value->rValue; mod->BSIM3v1letabGiven = TRUE; break; case BSIM3v1_MOD_LPCLM: mod->BSIM3v1lpclm = value->rValue; mod->BSIM3v1lpclmGiven = TRUE; break; case BSIM3v1_MOD_LPDIBL1: mod->BSIM3v1lpdibl1 = value->rValue; mod->BSIM3v1lpdibl1Given = TRUE; break; case BSIM3v1_MOD_LPDIBL2: mod->BSIM3v1lpdibl2 = value->rValue; mod->BSIM3v1lpdibl2Given = TRUE; break; case BSIM3v1_MOD_LPDIBLB: mod->BSIM3v1lpdiblb = value->rValue; mod->BSIM3v1lpdiblbGiven = TRUE; break; case BSIM3v1_MOD_LPSCBE1: mod->BSIM3v1lpscbe1 = value->rValue; mod->BSIM3v1lpscbe1Given = TRUE; break; case BSIM3v1_MOD_LPSCBE2: mod->BSIM3v1lpscbe2 = value->rValue; mod->BSIM3v1lpscbe2Given = TRUE; break; case BSIM3v1_MOD_LPVAG: mod->BSIM3v1lpvag = value->rValue; mod->BSIM3v1lpvagGiven = TRUE; break; case BSIM3v1_MOD_LWR : mod->BSIM3v1lwr = value->rValue; mod->BSIM3v1lwrGiven = TRUE; break; case BSIM3v1_MOD_LDWG : mod->BSIM3v1ldwg = value->rValue; mod->BSIM3v1ldwgGiven = TRUE; break; case BSIM3v1_MOD_LDWB : mod->BSIM3v1ldwb = value->rValue; mod->BSIM3v1ldwbGiven = TRUE; break; case BSIM3v1_MOD_LB0 : mod->BSIM3v1lb0 = value->rValue; mod->BSIM3v1lb0Given = TRUE; break; case BSIM3v1_MOD_LB1 : mod->BSIM3v1lb1 = value->rValue; mod->BSIM3v1lb1Given = TRUE; break; case BSIM3v1_MOD_LALPHA0 : mod->BSIM3v1lalpha0 = value->rValue; mod->BSIM3v1lalpha0Given = TRUE; break; case BSIM3v1_MOD_LBETA0 : mod->BSIM3v1lbeta0 = value->rValue; mod->BSIM3v1lbeta0Given = TRUE; break; case BSIM3v1_MOD_LELM : mod->BSIM3v1lelm = value->rValue; mod->BSIM3v1lelmGiven = TRUE; break; case BSIM3v1_MOD_LCGSL : mod->BSIM3v1lcgsl = value->rValue; mod->BSIM3v1lcgslGiven = TRUE; break; case BSIM3v1_MOD_LCGDL : mod->BSIM3v1lcgdl = value->rValue; mod->BSIM3v1lcgdlGiven = TRUE; break; case BSIM3v1_MOD_LCKAPPA : mod->BSIM3v1lckappa = value->rValue; mod->BSIM3v1lckappaGiven = TRUE; break; case BSIM3v1_MOD_LCF : mod->BSIM3v1lcf = value->rValue; mod->BSIM3v1lcfGiven = TRUE; break; case BSIM3v1_MOD_LCLC : mod->BSIM3v1lclc = value->rValue; mod->BSIM3v1lclcGiven = TRUE; break; case BSIM3v1_MOD_LCLE : mod->BSIM3v1lcle = value->rValue; mod->BSIM3v1lcleGiven = TRUE; break; case BSIM3v1_MOD_LVFBCV : mod->BSIM3v1lvfbcv = value->rValue; mod->BSIM3v1lvfbcvGiven = TRUE; break; /* Width dependence */ case BSIM3v1_MOD_WCDSC : mod->BSIM3v1wcdsc = value->rValue; mod->BSIM3v1wcdscGiven = TRUE; break; case BSIM3v1_MOD_WCDSCB : mod->BSIM3v1wcdscb = value->rValue; mod->BSIM3v1wcdscbGiven = TRUE; break; case BSIM3v1_MOD_WCDSCD : mod->BSIM3v1wcdscd = value->rValue; mod->BSIM3v1wcdscdGiven = TRUE; break; case BSIM3v1_MOD_WCIT : mod->BSIM3v1wcit = value->rValue; mod->BSIM3v1wcitGiven = TRUE; break; case BSIM3v1_MOD_WNFACTOR : mod->BSIM3v1wnfactor = value->rValue; mod->BSIM3v1wnfactorGiven = TRUE; break; case BSIM3v1_MOD_WXJ: mod->BSIM3v1wxj = value->rValue; mod->BSIM3v1wxjGiven = TRUE; break; case BSIM3v1_MOD_WVSAT: mod->BSIM3v1wvsat = value->rValue; mod->BSIM3v1wvsatGiven = TRUE; break; case BSIM3v1_MOD_WA0: mod->BSIM3v1wa0 = value->rValue; mod->BSIM3v1wa0Given = TRUE; break; case BSIM3v1_MOD_WAGS: mod->BSIM3v1wags = value->rValue; mod->BSIM3v1wagsGiven = TRUE; break; case BSIM3v1_MOD_WA1: mod->BSIM3v1wa1 = value->rValue; mod->BSIM3v1wa1Given = TRUE; break; case BSIM3v1_MOD_WA2: mod->BSIM3v1wa2 = value->rValue; mod->BSIM3v1wa2Given = TRUE; break; case BSIM3v1_MOD_WAT: mod->BSIM3v1wat = value->rValue; mod->BSIM3v1watGiven = TRUE; break; case BSIM3v1_MOD_WKETA: mod->BSIM3v1wketa = value->rValue; mod->BSIM3v1wketaGiven = TRUE; break; case BSIM3v1_MOD_WNSUB: mod->BSIM3v1wnsub = value->rValue; mod->BSIM3v1wnsubGiven = TRUE; break; case BSIM3v1_MOD_WNPEAK: mod->BSIM3v1wnpeak = value->rValue; mod->BSIM3v1wnpeakGiven = TRUE; if (mod->BSIM3v1wnpeak > 1.0e20) mod->BSIM3v1wnpeak *= 1.0e-6; break; case BSIM3v1_MOD_WNGATE: mod->BSIM3v1wngate = value->rValue; mod->BSIM3v1wngateGiven = TRUE; if (mod->BSIM3v1wngate > 1.0e23) mod->BSIM3v1wngate *= 1.0e-6; break; case BSIM3v1_MOD_WGAMMA1: mod->BSIM3v1wgamma1 = value->rValue; mod->BSIM3v1wgamma1Given = TRUE; break; case BSIM3v1_MOD_WGAMMA2: mod->BSIM3v1wgamma2 = value->rValue; mod->BSIM3v1wgamma2Given = TRUE; break; case BSIM3v1_MOD_WVBX: mod->BSIM3v1wvbx = value->rValue; mod->BSIM3v1wvbxGiven = TRUE; break; case BSIM3v1_MOD_WVBM: mod->BSIM3v1wvbm = value->rValue; mod->BSIM3v1wvbmGiven = TRUE; break; case BSIM3v1_MOD_WXT: mod->BSIM3v1wxt = value->rValue; mod->BSIM3v1wxtGiven = TRUE; break; case BSIM3v1_MOD_WK1: mod->BSIM3v1wk1 = value->rValue; mod->BSIM3v1wk1Given = TRUE; break; case BSIM3v1_MOD_WKT1: mod->BSIM3v1wkt1 = value->rValue; mod->BSIM3v1wkt1Given = TRUE; break; case BSIM3v1_MOD_WKT1L: mod->BSIM3v1wkt1l = value->rValue; mod->BSIM3v1wkt1lGiven = TRUE; break; case BSIM3v1_MOD_WKT2: mod->BSIM3v1wkt2 = value->rValue; mod->BSIM3v1wkt2Given = TRUE; break; case BSIM3v1_MOD_WK2: mod->BSIM3v1wk2 = value->rValue; mod->BSIM3v1wk2Given = TRUE; break; case BSIM3v1_MOD_WK3: mod->BSIM3v1wk3 = value->rValue; mod->BSIM3v1wk3Given = TRUE; break; case BSIM3v1_MOD_WK3B: mod->BSIM3v1wk3b = value->rValue; mod->BSIM3v1wk3bGiven = TRUE; break; case BSIM3v1_MOD_WNLX: mod->BSIM3v1wnlx = value->rValue; mod->BSIM3v1wnlxGiven = TRUE; break; case BSIM3v1_MOD_WW0: mod->BSIM3v1ww0 = value->rValue; mod->BSIM3v1ww0Given = TRUE; break; case BSIM3v1_MOD_WDVT0: mod->BSIM3v1wdvt0 = value->rValue; mod->BSIM3v1wdvt0Given = TRUE; break; case BSIM3v1_MOD_WDVT1: mod->BSIM3v1wdvt1 = value->rValue; mod->BSIM3v1wdvt1Given = TRUE; break; case BSIM3v1_MOD_WDVT2: mod->BSIM3v1wdvt2 = value->rValue; mod->BSIM3v1wdvt2Given = TRUE; break; case BSIM3v1_MOD_WDVT0W: mod->BSIM3v1wdvt0w = value->rValue; mod->BSIM3v1wdvt0wGiven = TRUE; break; case BSIM3v1_MOD_WDVT1W: mod->BSIM3v1wdvt1w = value->rValue; mod->BSIM3v1wdvt1wGiven = TRUE; break; case BSIM3v1_MOD_WDVT2W: mod->BSIM3v1wdvt2w = value->rValue; mod->BSIM3v1wdvt2wGiven = TRUE; break; case BSIM3v1_MOD_WDROUT: mod->BSIM3v1wdrout = value->rValue; mod->BSIM3v1wdroutGiven = TRUE; break; case BSIM3v1_MOD_WDSUB: mod->BSIM3v1wdsub = value->rValue; mod->BSIM3v1wdsubGiven = TRUE; break; case BSIM3v1_MOD_WVTH0: mod->BSIM3v1wvth0 = value->rValue; mod->BSIM3v1wvth0Given = TRUE; break; case BSIM3v1_MOD_WUA: mod->BSIM3v1wua = value->rValue; mod->BSIM3v1wuaGiven = TRUE; break; case BSIM3v1_MOD_WUA1: mod->BSIM3v1wua1 = value->rValue; mod->BSIM3v1wua1Given = TRUE; break; case BSIM3v1_MOD_WUB: mod->BSIM3v1wub = value->rValue; mod->BSIM3v1wubGiven = TRUE; break; case BSIM3v1_MOD_WUB1: mod->BSIM3v1wub1 = value->rValue; mod->BSIM3v1wub1Given = TRUE; break; case BSIM3v1_MOD_WUC: mod->BSIM3v1wuc = value->rValue; mod->BSIM3v1wucGiven = TRUE; break; case BSIM3v1_MOD_WUC1: mod->BSIM3v1wuc1 = value->rValue; mod->BSIM3v1wuc1Given = TRUE; break; case BSIM3v1_MOD_WU0 : mod->BSIM3v1wu0 = value->rValue; mod->BSIM3v1wu0Given = TRUE; break; case BSIM3v1_MOD_WUTE : mod->BSIM3v1wute = value->rValue; mod->BSIM3v1wuteGiven = TRUE; break; case BSIM3v1_MOD_WVOFF: mod->BSIM3v1wvoff = value->rValue; mod->BSIM3v1wvoffGiven = TRUE; break; case BSIM3v1_MOD_WDELTA : mod->BSIM3v1wdelta = value->rValue; mod->BSIM3v1wdeltaGiven = TRUE; break; case BSIM3v1_MOD_WRDSW: mod->BSIM3v1wrdsw = value->rValue; mod->BSIM3v1wrdswGiven = TRUE; break; case BSIM3v1_MOD_WPRWB: mod->BSIM3v1wprwb = value->rValue; mod->BSIM3v1wprwbGiven = TRUE; break; case BSIM3v1_MOD_WPRWG: mod->BSIM3v1wprwg = value->rValue; mod->BSIM3v1wprwgGiven = TRUE; break; case BSIM3v1_MOD_WPRT: mod->BSIM3v1wprt = value->rValue; mod->BSIM3v1wprtGiven = TRUE; break; case BSIM3v1_MOD_WETA0: mod->BSIM3v1weta0 = value->rValue; mod->BSIM3v1weta0Given = TRUE; break; case BSIM3v1_MOD_WETAB: mod->BSIM3v1wetab = value->rValue; mod->BSIM3v1wetabGiven = TRUE; break; case BSIM3v1_MOD_WPCLM: mod->BSIM3v1wpclm = value->rValue; mod->BSIM3v1wpclmGiven = TRUE; break; case BSIM3v1_MOD_WPDIBL1: mod->BSIM3v1wpdibl1 = value->rValue; mod->BSIM3v1wpdibl1Given = TRUE; break; case BSIM3v1_MOD_WPDIBL2: mod->BSIM3v1wpdibl2 = value->rValue; mod->BSIM3v1wpdibl2Given = TRUE; break; case BSIM3v1_MOD_WPDIBLB: mod->BSIM3v1wpdiblb = value->rValue; mod->BSIM3v1wpdiblbGiven = TRUE; break; case BSIM3v1_MOD_WPSCBE1: mod->BSIM3v1wpscbe1 = value->rValue; mod->BSIM3v1wpscbe1Given = TRUE; break; case BSIM3v1_MOD_WPSCBE2: mod->BSIM3v1wpscbe2 = value->rValue; mod->BSIM3v1wpscbe2Given = TRUE; break; case BSIM3v1_MOD_WPVAG: mod->BSIM3v1wpvag = value->rValue; mod->BSIM3v1wpvagGiven = TRUE; break; case BSIM3v1_MOD_WWR : mod->BSIM3v1wwr = value->rValue; mod->BSIM3v1wwrGiven = TRUE; break; case BSIM3v1_MOD_WDWG : mod->BSIM3v1wdwg = value->rValue; mod->BSIM3v1wdwgGiven = TRUE; break; case BSIM3v1_MOD_WDWB : mod->BSIM3v1wdwb = value->rValue; mod->BSIM3v1wdwbGiven = TRUE; break; case BSIM3v1_MOD_WB0 : mod->BSIM3v1wb0 = value->rValue; mod->BSIM3v1wb0Given = TRUE; break; case BSIM3v1_MOD_WB1 : mod->BSIM3v1wb1 = value->rValue; mod->BSIM3v1wb1Given = TRUE; break; case BSIM3v1_MOD_WALPHA0 : mod->BSIM3v1walpha0 = value->rValue; mod->BSIM3v1walpha0Given = TRUE; break; case BSIM3v1_MOD_WBETA0 : mod->BSIM3v1wbeta0 = value->rValue; mod->BSIM3v1wbeta0Given = TRUE; break; case BSIM3v1_MOD_WELM : mod->BSIM3v1welm = value->rValue; mod->BSIM3v1welmGiven = TRUE; break; case BSIM3v1_MOD_WCGSL : mod->BSIM3v1wcgsl = value->rValue; mod->BSIM3v1wcgslGiven = TRUE; break; case BSIM3v1_MOD_WCGDL : mod->BSIM3v1wcgdl = value->rValue; mod->BSIM3v1wcgdlGiven = TRUE; break; case BSIM3v1_MOD_WCKAPPA : mod->BSIM3v1wckappa = value->rValue; mod->BSIM3v1wckappaGiven = TRUE; break; case BSIM3v1_MOD_WCF : mod->BSIM3v1wcf = value->rValue; mod->BSIM3v1wcfGiven = TRUE; break; case BSIM3v1_MOD_WCLC : mod->BSIM3v1wclc = value->rValue; mod->BSIM3v1wclcGiven = TRUE; break; case BSIM3v1_MOD_WCLE : mod->BSIM3v1wcle = value->rValue; mod->BSIM3v1wcleGiven = TRUE; break; case BSIM3v1_MOD_WVFBCV : mod->BSIM3v1wvfbcv = value->rValue; mod->BSIM3v1wvfbcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM3v1_MOD_PCDSC : mod->BSIM3v1pcdsc = value->rValue; mod->BSIM3v1pcdscGiven = TRUE; break; case BSIM3v1_MOD_PCDSCB : mod->BSIM3v1pcdscb = value->rValue; mod->BSIM3v1pcdscbGiven = TRUE; break; case BSIM3v1_MOD_PCDSCD : mod->BSIM3v1pcdscd = value->rValue; mod->BSIM3v1pcdscdGiven = TRUE; break; case BSIM3v1_MOD_PCIT : mod->BSIM3v1pcit = value->rValue; mod->BSIM3v1pcitGiven = TRUE; break; case BSIM3v1_MOD_PNFACTOR : mod->BSIM3v1pnfactor = value->rValue; mod->BSIM3v1pnfactorGiven = TRUE; break; case BSIM3v1_MOD_PXJ: mod->BSIM3v1pxj = value->rValue; mod->BSIM3v1pxjGiven = TRUE; break; case BSIM3v1_MOD_PVSAT: mod->BSIM3v1pvsat = value->rValue; mod->BSIM3v1pvsatGiven = TRUE; break; case BSIM3v1_MOD_PA0: mod->BSIM3v1pa0 = value->rValue; mod->BSIM3v1pa0Given = TRUE; break; case BSIM3v1_MOD_PAGS: mod->BSIM3v1pags = value->rValue; mod->BSIM3v1pagsGiven = TRUE; break; case BSIM3v1_MOD_PA1: mod->BSIM3v1pa1 = value->rValue; mod->BSIM3v1pa1Given = TRUE; break; case BSIM3v1_MOD_PA2: mod->BSIM3v1pa2 = value->rValue; mod->BSIM3v1pa2Given = TRUE; break; case BSIM3v1_MOD_PAT: mod->BSIM3v1pat = value->rValue; mod->BSIM3v1patGiven = TRUE; break; case BSIM3v1_MOD_PKETA: mod->BSIM3v1pketa = value->rValue; mod->BSIM3v1pketaGiven = TRUE; break; case BSIM3v1_MOD_PNSUB: mod->BSIM3v1pnsub = value->rValue; mod->BSIM3v1pnsubGiven = TRUE; break; case BSIM3v1_MOD_PNPEAK: mod->BSIM3v1pnpeak = value->rValue; mod->BSIM3v1pnpeakGiven = TRUE; if (mod->BSIM3v1pnpeak > 1.0e20) mod->BSIM3v1pnpeak *= 1.0e-6; break; case BSIM3v1_MOD_PNGATE: mod->BSIM3v1pngate = value->rValue; mod->BSIM3v1pngateGiven = TRUE; if (mod->BSIM3v1pngate > 1.0e23) mod->BSIM3v1pngate *= 1.0e-6; break; case BSIM3v1_MOD_PGAMMA1: mod->BSIM3v1pgamma1 = value->rValue; mod->BSIM3v1pgamma1Given = TRUE; break; case BSIM3v1_MOD_PGAMMA2: mod->BSIM3v1pgamma2 = value->rValue; mod->BSIM3v1pgamma2Given = TRUE; break; case BSIM3v1_MOD_PVBX: mod->BSIM3v1pvbx = value->rValue; mod->BSIM3v1pvbxGiven = TRUE; break; case BSIM3v1_MOD_PVBM: mod->BSIM3v1pvbm = value->rValue; mod->BSIM3v1pvbmGiven = TRUE; break; case BSIM3v1_MOD_PXT: mod->BSIM3v1pxt = value->rValue; mod->BSIM3v1pxtGiven = TRUE; break; case BSIM3v1_MOD_PK1: mod->BSIM3v1pk1 = value->rValue; mod->BSIM3v1pk1Given = TRUE; break; case BSIM3v1_MOD_PKT1: mod->BSIM3v1pkt1 = value->rValue; mod->BSIM3v1pkt1Given = TRUE; break; case BSIM3v1_MOD_PKT1L: mod->BSIM3v1pkt1l = value->rValue; mod->BSIM3v1pkt1lGiven = TRUE; break; case BSIM3v1_MOD_PKT2: mod->BSIM3v1pkt2 = value->rValue; mod->BSIM3v1pkt2Given = TRUE; break; case BSIM3v1_MOD_PK2: mod->BSIM3v1pk2 = value->rValue; mod->BSIM3v1pk2Given = TRUE; break; case BSIM3v1_MOD_PK3: mod->BSIM3v1pk3 = value->rValue; mod->BSIM3v1pk3Given = TRUE; break; case BSIM3v1_MOD_PK3B: mod->BSIM3v1pk3b = value->rValue; mod->BSIM3v1pk3bGiven = TRUE; break; case BSIM3v1_MOD_PNLX: mod->BSIM3v1pnlx = value->rValue; mod->BSIM3v1pnlxGiven = TRUE; break; case BSIM3v1_MOD_PW0: mod->BSIM3v1pw0 = value->rValue; mod->BSIM3v1pw0Given = TRUE; break; case BSIM3v1_MOD_PDVT0: mod->BSIM3v1pdvt0 = value->rValue; mod->BSIM3v1pdvt0Given = TRUE; break; case BSIM3v1_MOD_PDVT1: mod->BSIM3v1pdvt1 = value->rValue; mod->BSIM3v1pdvt1Given = TRUE; break; case BSIM3v1_MOD_PDVT2: mod->BSIM3v1pdvt2 = value->rValue; mod->BSIM3v1pdvt2Given = TRUE; break; case BSIM3v1_MOD_PDVT0W: mod->BSIM3v1pdvt0w = value->rValue; mod->BSIM3v1pdvt0wGiven = TRUE; break; case BSIM3v1_MOD_PDVT1W: mod->BSIM3v1pdvt1w = value->rValue; mod->BSIM3v1pdvt1wGiven = TRUE; break; case BSIM3v1_MOD_PDVT2W: mod->BSIM3v1pdvt2w = value->rValue; mod->BSIM3v1pdvt2wGiven = TRUE; break; case BSIM3v1_MOD_PDROUT: mod->BSIM3v1pdrout = value->rValue; mod->BSIM3v1pdroutGiven = TRUE; break; case BSIM3v1_MOD_PDSUB: mod->BSIM3v1pdsub = value->rValue; mod->BSIM3v1pdsubGiven = TRUE; break; case BSIM3v1_MOD_PVTH0: mod->BSIM3v1pvth0 = value->rValue; mod->BSIM3v1pvth0Given = TRUE; break; case BSIM3v1_MOD_PUA: mod->BSIM3v1pua = value->rValue; mod->BSIM3v1puaGiven = TRUE; break; case BSIM3v1_MOD_PUA1: mod->BSIM3v1pua1 = value->rValue; mod->BSIM3v1pua1Given = TRUE; break; case BSIM3v1_MOD_PUB: mod->BSIM3v1pub = value->rValue; mod->BSIM3v1pubGiven = TRUE; break; case BSIM3v1_MOD_PUB1: mod->BSIM3v1pub1 = value->rValue; mod->BSIM3v1pub1Given = TRUE; break; case BSIM3v1_MOD_PUC: mod->BSIM3v1puc = value->rValue; mod->BSIM3v1pucGiven = TRUE; break; case BSIM3v1_MOD_PUC1: mod->BSIM3v1puc1 = value->rValue; mod->BSIM3v1puc1Given = TRUE; break; case BSIM3v1_MOD_PU0 : mod->BSIM3v1pu0 = value->rValue; mod->BSIM3v1pu0Given = TRUE; break; case BSIM3v1_MOD_PUTE : mod->BSIM3v1pute = value->rValue; mod->BSIM3v1puteGiven = TRUE; break; case BSIM3v1_MOD_PVOFF: mod->BSIM3v1pvoff = value->rValue; mod->BSIM3v1pvoffGiven = TRUE; break; case BSIM3v1_MOD_PDELTA : mod->BSIM3v1pdelta = value->rValue; mod->BSIM3v1pdeltaGiven = TRUE; break; case BSIM3v1_MOD_PRDSW: mod->BSIM3v1prdsw = value->rValue; mod->BSIM3v1prdswGiven = TRUE; break; case BSIM3v1_MOD_PPRWB: mod->BSIM3v1pprwb = value->rValue; mod->BSIM3v1pprwbGiven = TRUE; break; case BSIM3v1_MOD_PPRWG: mod->BSIM3v1pprwg = value->rValue; mod->BSIM3v1pprwgGiven = TRUE; break; case BSIM3v1_MOD_PPRT: mod->BSIM3v1pprt = value->rValue; mod->BSIM3v1pprtGiven = TRUE; break; case BSIM3v1_MOD_PETA0: mod->BSIM3v1peta0 = value->rValue; mod->BSIM3v1peta0Given = TRUE; break; case BSIM3v1_MOD_PETAB: mod->BSIM3v1petab = value->rValue; mod->BSIM3v1petabGiven = TRUE; break; case BSIM3v1_MOD_PPCLM: mod->BSIM3v1ppclm = value->rValue; mod->BSIM3v1ppclmGiven = TRUE; break; case BSIM3v1_MOD_PPDIBL1: mod->BSIM3v1ppdibl1 = value->rValue; mod->BSIM3v1ppdibl1Given = TRUE; break; case BSIM3v1_MOD_PPDIBL2: mod->BSIM3v1ppdibl2 = value->rValue; mod->BSIM3v1ppdibl2Given = TRUE; break; case BSIM3v1_MOD_PPDIBLB: mod->BSIM3v1ppdiblb = value->rValue; mod->BSIM3v1ppdiblbGiven = TRUE; break; case BSIM3v1_MOD_PPSCBE1: mod->BSIM3v1ppscbe1 = value->rValue; mod->BSIM3v1ppscbe1Given = TRUE; break; case BSIM3v1_MOD_PPSCBE2: mod->BSIM3v1ppscbe2 = value->rValue; mod->BSIM3v1ppscbe2Given = TRUE; break; case BSIM3v1_MOD_PPVAG: mod->BSIM3v1ppvag = value->rValue; mod->BSIM3v1ppvagGiven = TRUE; break; case BSIM3v1_MOD_PWR : mod->BSIM3v1pwr = value->rValue; mod->BSIM3v1pwrGiven = TRUE; break; case BSIM3v1_MOD_PDWG : mod->BSIM3v1pdwg = value->rValue; mod->BSIM3v1pdwgGiven = TRUE; break; case BSIM3v1_MOD_PDWB : mod->BSIM3v1pdwb = value->rValue; mod->BSIM3v1pdwbGiven = TRUE; break; case BSIM3v1_MOD_PB0 : mod->BSIM3v1pb0 = value->rValue; mod->BSIM3v1pb0Given = TRUE; break; case BSIM3v1_MOD_PB1 : mod->BSIM3v1pb1 = value->rValue; mod->BSIM3v1pb1Given = TRUE; break; case BSIM3v1_MOD_PALPHA0 : mod->BSIM3v1palpha0 = value->rValue; mod->BSIM3v1palpha0Given = TRUE; break; case BSIM3v1_MOD_PBETA0 : mod->BSIM3v1pbeta0 = value->rValue; mod->BSIM3v1pbeta0Given = TRUE; break; case BSIM3v1_MOD_PELM : mod->BSIM3v1pelm = value->rValue; mod->BSIM3v1pelmGiven = TRUE; break; case BSIM3v1_MOD_PCGSL : mod->BSIM3v1pcgsl = value->rValue; mod->BSIM3v1pcgslGiven = TRUE; break; case BSIM3v1_MOD_PCGDL : mod->BSIM3v1pcgdl = value->rValue; mod->BSIM3v1pcgdlGiven = TRUE; break; case BSIM3v1_MOD_PCKAPPA : mod->BSIM3v1pckappa = value->rValue; mod->BSIM3v1pckappaGiven = TRUE; break; case BSIM3v1_MOD_PCF : mod->BSIM3v1pcf = value->rValue; mod->BSIM3v1pcfGiven = TRUE; break; case BSIM3v1_MOD_PCLC : mod->BSIM3v1pclc = value->rValue; mod->BSIM3v1pclcGiven = TRUE; break; case BSIM3v1_MOD_PCLE : mod->BSIM3v1pcle = value->rValue; mod->BSIM3v1pcleGiven = TRUE; break; case BSIM3v1_MOD_PVFBCV : mod->BSIM3v1pvfbcv = value->rValue; mod->BSIM3v1pvfbcvGiven = TRUE; break; case BSIM3v1_MOD_TNOM : mod->BSIM3v1tnom = value->rValue + 273.15; mod->BSIM3v1tnomGiven = TRUE; break; case BSIM3v1_MOD_CGSO : mod->BSIM3v1cgso = value->rValue; mod->BSIM3v1cgsoGiven = TRUE; break; case BSIM3v1_MOD_CGDO : mod->BSIM3v1cgdo = value->rValue; mod->BSIM3v1cgdoGiven = TRUE; break; case BSIM3v1_MOD_CGBO : mod->BSIM3v1cgbo = value->rValue; mod->BSIM3v1cgboGiven = TRUE; break; case BSIM3v1_MOD_XPART : mod->BSIM3v1xpart = value->rValue; mod->BSIM3v1xpartGiven = TRUE; break; case BSIM3v1_MOD_RSH : mod->BSIM3v1sheetResistance = value->rValue; mod->BSIM3v1sheetResistanceGiven = TRUE; break; case BSIM3v1_MOD_JS : mod->BSIM3v1jctSatCurDensity = value->rValue; mod->BSIM3v1jctSatCurDensityGiven = TRUE; break; case BSIM3v1_MOD_JSW : mod->BSIM3v1jctSidewallSatCurDensity = value->rValue; mod->BSIM3v1jctSidewallSatCurDensityGiven = TRUE; break; case BSIM3v1_MOD_PB : mod->BSIM3v1bulkJctPotential = value->rValue; mod->BSIM3v1bulkJctPotentialGiven = TRUE; break; case BSIM3v1_MOD_MJ : mod->BSIM3v1bulkJctBotGradingCoeff = value->rValue; mod->BSIM3v1bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM3v1_MOD_PBSW : mod->BSIM3v1sidewallJctPotential = value->rValue; mod->BSIM3v1sidewallJctPotentialGiven = TRUE; break; case BSIM3v1_MOD_MJSW : mod->BSIM3v1bulkJctSideGradingCoeff = value->rValue; mod->BSIM3v1bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM3v1_MOD_CJ : mod->BSIM3v1unitAreaJctCap = value->rValue; mod->BSIM3v1unitAreaJctCapGiven = TRUE; break; case BSIM3v1_MOD_CJSW : mod->BSIM3v1unitLengthSidewallJctCap = value->rValue; mod->BSIM3v1unitLengthSidewallJctCapGiven = TRUE; break; case BSIM3v1_MOD_NJ : mod->BSIM3v1jctEmissionCoeff = value->rValue; mod->BSIM3v1jctEmissionCoeffGiven = TRUE; break; case BSIM3v1_MOD_PBSWG : mod->BSIM3v1GatesidewallJctPotential = value->rValue; mod->BSIM3v1GatesidewallJctPotentialGiven = TRUE; break; case BSIM3v1_MOD_MJSWG : mod->BSIM3v1bulkJctGateSideGradingCoeff = value->rValue; mod->BSIM3v1bulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM3v1_MOD_CJSWG : mod->BSIM3v1unitLengthGateSidewallJctCap = value->rValue; mod->BSIM3v1unitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM3v1_MOD_XTI : mod->BSIM3v1jctTempExponent = value->rValue; mod->BSIM3v1jctTempExponentGiven = TRUE; break; case BSIM3v1_MOD_LINT : mod->BSIM3v1Lint = value->rValue; mod->BSIM3v1LintGiven = TRUE; break; case BSIM3v1_MOD_LL : mod->BSIM3v1Ll = value->rValue; mod->BSIM3v1LlGiven = TRUE; break; case BSIM3v1_MOD_LLN : mod->BSIM3v1Lln = value->rValue; mod->BSIM3v1LlnGiven = TRUE; break; case BSIM3v1_MOD_LW : mod->BSIM3v1Lw = value->rValue; mod->BSIM3v1LwGiven = TRUE; break; case BSIM3v1_MOD_LWN : mod->BSIM3v1Lwn = value->rValue; mod->BSIM3v1LwnGiven = TRUE; break; case BSIM3v1_MOD_LWL : mod->BSIM3v1Lwl = value->rValue; mod->BSIM3v1LwlGiven = TRUE; break; case BSIM3v1_MOD_LMIN : mod->BSIM3v1Lmin = value->rValue; mod->BSIM3v1LminGiven = TRUE; break; case BSIM3v1_MOD_LMAX : mod->BSIM3v1Lmax = value->rValue; mod->BSIM3v1LmaxGiven = TRUE; break; case BSIM3v1_MOD_WINT : mod->BSIM3v1Wint = value->rValue; mod->BSIM3v1WintGiven = TRUE; break; case BSIM3v1_MOD_WL : mod->BSIM3v1Wl = value->rValue; mod->BSIM3v1WlGiven = TRUE; break; case BSIM3v1_MOD_WLN : mod->BSIM3v1Wln = value->rValue; mod->BSIM3v1WlnGiven = TRUE; break; case BSIM3v1_MOD_WW : mod->BSIM3v1Ww = value->rValue; mod->BSIM3v1WwGiven = TRUE; break; case BSIM3v1_MOD_WWN : mod->BSIM3v1Wwn = value->rValue; mod->BSIM3v1WwnGiven = TRUE; break; case BSIM3v1_MOD_WWL : mod->BSIM3v1Wwl = value->rValue; mod->BSIM3v1WwlGiven = TRUE; break; case BSIM3v1_MOD_WMIN : mod->BSIM3v1Wmin = value->rValue; mod->BSIM3v1WminGiven = TRUE; break; case BSIM3v1_MOD_WMAX : mod->BSIM3v1Wmax = value->rValue; mod->BSIM3v1WmaxGiven = TRUE; break; case BSIM3v1_MOD_NOIA : mod->BSIM3v1oxideTrapDensityA = value->rValue; mod->BSIM3v1oxideTrapDensityAGiven = TRUE; break; case BSIM3v1_MOD_NOIB : mod->BSIM3v1oxideTrapDensityB = value->rValue; mod->BSIM3v1oxideTrapDensityBGiven = TRUE; break; case BSIM3v1_MOD_NOIC : mod->BSIM3v1oxideTrapDensityC = value->rValue; mod->BSIM3v1oxideTrapDensityCGiven = TRUE; break; case BSIM3v1_MOD_EM : mod->BSIM3v1em = value->rValue; mod->BSIM3v1emGiven = TRUE; break; case BSIM3v1_MOD_EF : mod->BSIM3v1ef = value->rValue; mod->BSIM3v1efGiven = TRUE; break; case BSIM3v1_MOD_AF : mod->BSIM3v1af = value->rValue; mod->BSIM3v1afGiven = TRUE; break; case BSIM3v1_MOD_KF : mod->BSIM3v1kf = value->rValue; mod->BSIM3v1kfGiven = TRUE; break; case BSIM3v1_MOD_NMOS : if(value->iValue) { mod->BSIM3v1type = 1; mod->BSIM3v1typeGiven = TRUE; } break; case BSIM3v1_MOD_PMOS : if(value->iValue) { mod->BSIM3v1type = - 1; mod->BSIM3v1typeGiven = TRUE; } break; /* serban */ case BSIM3v1_MOD_HDIF : mod->BSIM3v1hdif = value->rValue; mod->BSIM3v1hdifGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/Makefile.am0000644000265600020320000000106512264261473021556 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3v1.la libbsim3v1_la_SOURCES = \ b3v1.c \ b3v1acld.c \ b3v1ask.c \ b3v1check.c \ b3v1cvtest.c \ b3v1del.c \ b3v1dest.c \ b3v1getic.c \ b3v1ld.c \ b3v1mask.c \ b3v1mdel.c \ b3v1mpar.c \ b3v1noi.c \ b3v1par.c \ b3v1pzld.c \ b3v1set.c \ b3v1temp.c \ b3v1trunc.c \ bsim3v1def.h \ bsim3v1ext.h \ bsim3v1init.c \ bsim3v1init.h \ bsim3v1itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/bsim3v1/b3v1getic.c0000644000265600020320000000233212264261473021453 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1getic.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1getic(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; for (; model ; model = model->BSIM3v1nextModel) { for (here = model->BSIM3v1instances; here; here = here->BSIM3v1nextInstance) { if(!here->BSIM3v1icVBSGiven) { here->BSIM3v1icVBS = *(ckt->CKTrhs + here->BSIM3v1bNode) - *(ckt->CKTrhs + here->BSIM3v1sNode); } if (!here->BSIM3v1icVDSGiven) { here->BSIM3v1icVDS = *(ckt->CKTrhs + here->BSIM3v1dNode) - *(ckt->CKTrhs + here->BSIM3v1sNode); } if (!here->BSIM3v1icVGSGiven) { here->BSIM3v1icVGS = *(ckt->CKTrhs + here->BSIM3v1gNode) - *(ckt->CKTrhs + here->BSIM3v1sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/Makefile.in0000644000265600020320000004336012264261536021573 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3v1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3v1_la_LIBADD = am_libbsim3v1_la_OBJECTS = b3v1.lo b3v1acld.lo b3v1ask.lo b3v1check.lo \ b3v1cvtest.lo b3v1del.lo b3v1dest.lo b3v1getic.lo b3v1ld.lo \ b3v1mask.lo b3v1mdel.lo b3v1mpar.lo b3v1noi.lo b3v1par.lo \ b3v1pzld.lo b3v1set.lo b3v1temp.lo b3v1trunc.lo bsim3v1init.lo libbsim3v1_la_OBJECTS = $(am_libbsim3v1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3v1_la_SOURCES) DIST_SOURCES = $(libbsim3v1_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3v1.la libbsim3v1_la_SOURCES = \ b3v1.c \ b3v1acld.c \ b3v1ask.c \ b3v1check.c \ b3v1cvtest.c \ b3v1del.c \ b3v1dest.c \ b3v1getic.c \ b3v1ld.c \ b3v1mask.c \ b3v1mdel.c \ b3v1mpar.c \ b3v1noi.c \ b3v1par.c \ b3v1pzld.c \ b3v1set.c \ b3v1temp.c \ b3v1trunc.c \ bsim3v1def.h \ bsim3v1ext.h \ bsim3v1init.c \ bsim3v1init.h \ bsim3v1itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3v1.la: $(libbsim3v1_la_OBJECTS) $(libbsim3v1_la_DEPENDENCIES) $(EXTRA_libbsim3v1_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3v1_la_OBJECTS) $(libbsim3v1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v1trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim3v1init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3v1/bsim3v1ext.h0000644000265600020320000000306412264261473021701 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. Modified: 2002 Paolo Nenzi. File: bsim3v1ext.h **********/ extern int BSIM3v1acLoad(GENmodel *, CKTcircuit *); extern int BSIM3v1ask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int BSIM3v1convTest(GENmodel *, CKTcircuit *); extern int BSIM3v1delete(GENmodel *, IFuid, GENinstance **); extern void BSIM3v1destroy(GENmodel **); extern int BSIM3v1getic(GENmodel *, CKTcircuit *); extern int BSIM3v1load(GENmodel *, CKTcircuit *); extern int BSIM3v1mAsk(CKTcircuit *, GENmodel *, int, IFvalue *); extern int BSIM3v1mDelete(GENmodel **, IFuid, GENmodel *); extern int BSIM3v1mParam(int, IFvalue *, GENmodel *); extern void BSIM3v1mosCap(CKTcircuit *, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *, double *); extern int BSIM3v1param(int, IFvalue *, GENinstance *, IFvalue *); extern int BSIM3v1pzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int BSIM3v1setup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int BSIM3v1temp(GENmodel *, CKTcircuit *); extern int BSIM3v1trunc(GENmodel *, CKTcircuit *, double *); extern int BSIM3v1noise(int, int, GENmodel *, CKTcircuit *, Ndata *, double *); extern int BSIM3v1unsetup(GENmodel *, CKTcircuit *); ngspice-26/src/spicelib/devices/bsim3v1/bsim3v1itf.h0000644000265600020320000000043012264261473021655 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. Modified: 2002 Paolo Nenzi. File: bsim3v1itf.h **********/ #ifndef DEV_BSIM3v1 #define DEV_BSIM3v1 SPICEdev *get_bsim3v1_info(void); #endif ngspice-26/src/spicelib/devices/bsim3v1/b3v1temp.c0000644000265600020320000006575312264261473021345 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1ld.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int BSIM3v1temp(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v1model *model = (BSIM3v1model*) inModel; BSIM3v1instance *here; struct bsim3v1SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam = NULL; double tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, Ldrn, Wdrn; double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; int Size_Not_Found; /* loop through all the BSIM3v1 device models */ for (; model != NULL; model = model->BSIM3v1nextModel) { Temp = ckt->CKTtemp; if (model->BSIM3v1bulkJctPotential < 0.1) model->BSIM3v1bulkJctPotential = 0.1; if (model->BSIM3v1sidewallJctPotential < 0.1) model->BSIM3v1sidewallJctPotential = 0.1; if (model->BSIM3v1GatesidewallJctPotential < 0.1) model->BSIM3v1GatesidewallJctPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM3v1tnom; TRatio = Temp / Tnom; model->BSIM3v1vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM3v1factor1 = sqrt(EPSSI / EPSOX * model->BSIM3v1tox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); model->BSIM3v1vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM3v1vtm + model->BSIM3v1jctTempExponent * log(Temp / Tnom); T1 = exp(T0 / model->BSIM3v1jctEmissionCoeff); model->BSIM3v1jctTempSatCurDensity = model->BSIM3v1jctSatCurDensity * T1; model->BSIM3v1jctSidewallTempSatCurDensity = model->BSIM3v1jctSidewallSatCurDensity * T1; } else { model->BSIM3v1jctTempSatCurDensity = model->BSIM3v1jctSatCurDensity; model->BSIM3v1jctSidewallTempSatCurDensity = model->BSIM3v1jctSidewallSatCurDensity; } if (model->BSIM3v1jctTempSatCurDensity < 0.0) model->BSIM3v1jctTempSatCurDensity = 0.0; if (model->BSIM3v1jctSidewallTempSatCurDensity < 0.0) model->BSIM3v1jctSidewallTempSatCurDensity = 0.0; /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->BSIM3v1instances; here != NULL; here = here->BSIM3v1nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM3v1l == pSizeDependParamKnot->Length) && (here->BSIM3v1w == pSizeDependParamKnot->Width)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct bsim3v1SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->BSIM3v1l; Wdrn = here->BSIM3v1w; pParam->Length = Ldrn; pParam->Width = Wdrn; T0 = pow(Ldrn, model->BSIM3v1Lln); T1 = pow(Wdrn, model->BSIM3v1Lwn); tmp1 = model->BSIM3v1Ll / T0 + model->BSIM3v1Lw / T1 + model->BSIM3v1Lwl / (T0 * T1); pParam->BSIM3v1dl = model->BSIM3v1Lint + tmp1; pParam->BSIM3v1dlc = model->BSIM3v1dlc + tmp1; T2 = pow(Ldrn, model->BSIM3v1Wln); T3 = pow(Wdrn, model->BSIM3v1Wwn); tmp2 = model->BSIM3v1Wl / T2 + model->BSIM3v1Ww / T3 + model->BSIM3v1Wwl / (T2 * T3); pParam->BSIM3v1dw = model->BSIM3v1Wint + tmp2; pParam->BSIM3v1dwc = model->BSIM3v1dwc + tmp2; pParam->BSIM3v1leff = here->BSIM3v1l - 2.0 * pParam->BSIM3v1dl; if (pParam->BSIM3v1leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v1modName; namarray[1] = here->BSIM3v1name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v1: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v1weff = here->BSIM3v1w - 2.0 * pParam->BSIM3v1dw; if (pParam->BSIM3v1weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v1modName; namarray[1] = here->BSIM3v1name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v1: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v1leffCV = here->BSIM3v1l - 2.0 * pParam->BSIM3v1dlc; if (pParam->BSIM3v1leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v1modName; namarray[1] = here->BSIM3v1name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v1: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v1weffCV = here->BSIM3v1w - 2.0 * pParam->BSIM3v1dwc; if (pParam->BSIM3v1weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v1modName; namarray[1] = here->BSIM3v1name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v1: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } if (model->BSIM3v1binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM3v1leff; Inv_W = 1.0e-6 / pParam->BSIM3v1weff; Inv_LW = 1.0e-12 / (pParam->BSIM3v1leff * pParam->BSIM3v1weff); } else { Inv_L = 1.0 / pParam->BSIM3v1leff; Inv_W = 1.0 / pParam->BSIM3v1weff; Inv_LW = 1.0 / (pParam->BSIM3v1leff * pParam->BSIM3v1weff); } pParam->BSIM3v1cdsc = model->BSIM3v1cdsc + model->BSIM3v1lcdsc * Inv_L + model->BSIM3v1wcdsc * Inv_W + model->BSIM3v1pcdsc * Inv_LW; pParam->BSIM3v1cdscb = model->BSIM3v1cdscb + model->BSIM3v1lcdscb * Inv_L + model->BSIM3v1wcdscb * Inv_W + model->BSIM3v1pcdscb * Inv_LW; pParam->BSIM3v1cdscd = model->BSIM3v1cdscd + model->BSIM3v1lcdscd * Inv_L + model->BSIM3v1wcdscd * Inv_W + model->BSIM3v1pcdscd * Inv_LW; pParam->BSIM3v1cit = model->BSIM3v1cit + model->BSIM3v1lcit * Inv_L + model->BSIM3v1wcit * Inv_W + model->BSIM3v1pcit * Inv_LW; pParam->BSIM3v1nfactor = model->BSIM3v1nfactor + model->BSIM3v1lnfactor * Inv_L + model->BSIM3v1wnfactor * Inv_W + model->BSIM3v1pnfactor * Inv_LW; pParam->BSIM3v1xj = model->BSIM3v1xj + model->BSIM3v1lxj * Inv_L + model->BSIM3v1wxj * Inv_W + model->BSIM3v1pxj * Inv_LW; pParam->BSIM3v1vsat = model->BSIM3v1vsat + model->BSIM3v1lvsat * Inv_L + model->BSIM3v1wvsat * Inv_W + model->BSIM3v1pvsat * Inv_LW; pParam->BSIM3v1at = model->BSIM3v1at + model->BSIM3v1lat * Inv_L + model->BSIM3v1wat * Inv_W + model->BSIM3v1pat * Inv_LW; pParam->BSIM3v1a0 = model->BSIM3v1a0 + model->BSIM3v1la0 * Inv_L + model->BSIM3v1wa0 * Inv_W + model->BSIM3v1pa0 * Inv_LW; pParam->BSIM3v1ags = model->BSIM3v1ags + model->BSIM3v1lags * Inv_L + model->BSIM3v1wags * Inv_W + model->BSIM3v1pags * Inv_LW; pParam->BSIM3v1a1 = model->BSIM3v1a1 + model->BSIM3v1la1 * Inv_L + model->BSIM3v1wa1 * Inv_W + model->BSIM3v1pa1 * Inv_LW; pParam->BSIM3v1a2 = model->BSIM3v1a2 + model->BSIM3v1la2 * Inv_L + model->BSIM3v1wa2 * Inv_W + model->BSIM3v1pa2 * Inv_LW; pParam->BSIM3v1keta = model->BSIM3v1keta + model->BSIM3v1lketa * Inv_L + model->BSIM3v1wketa * Inv_W + model->BSIM3v1pketa * Inv_LW; pParam->BSIM3v1nsub = model->BSIM3v1nsub + model->BSIM3v1lnsub * Inv_L + model->BSIM3v1wnsub * Inv_W + model->BSIM3v1pnsub * Inv_LW; pParam->BSIM3v1npeak = model->BSIM3v1npeak + model->BSIM3v1lnpeak * Inv_L + model->BSIM3v1wnpeak * Inv_W + model->BSIM3v1pnpeak * Inv_LW; pParam->BSIM3v1ngate = model->BSIM3v1ngate + model->BSIM3v1lngate * Inv_L + model->BSIM3v1wngate * Inv_W + model->BSIM3v1pngate * Inv_LW; pParam->BSIM3v1gamma1 = model->BSIM3v1gamma1 + model->BSIM3v1lgamma1 * Inv_L + model->BSIM3v1wgamma1 * Inv_W + model->BSIM3v1pgamma1 * Inv_LW; pParam->BSIM3v1gamma2 = model->BSIM3v1gamma2 + model->BSIM3v1lgamma2 * Inv_L + model->BSIM3v1wgamma2 * Inv_W + model->BSIM3v1pgamma2 * Inv_LW; pParam->BSIM3v1vbx = model->BSIM3v1vbx + model->BSIM3v1lvbx * Inv_L + model->BSIM3v1wvbx * Inv_W + model->BSIM3v1pvbx * Inv_LW; pParam->BSIM3v1vbm = model->BSIM3v1vbm + model->BSIM3v1lvbm * Inv_L + model->BSIM3v1wvbm * Inv_W + model->BSIM3v1pvbm * Inv_LW; pParam->BSIM3v1xt = model->BSIM3v1xt + model->BSIM3v1lxt * Inv_L + model->BSIM3v1wxt * Inv_W + model->BSIM3v1pxt * Inv_LW; pParam->BSIM3v1k1 = model->BSIM3v1k1 + model->BSIM3v1lk1 * Inv_L + model->BSIM3v1wk1 * Inv_W + model->BSIM3v1pk1 * Inv_LW; pParam->BSIM3v1kt1 = model->BSIM3v1kt1 + model->BSIM3v1lkt1 * Inv_L + model->BSIM3v1wkt1 * Inv_W + model->BSIM3v1pkt1 * Inv_LW; pParam->BSIM3v1kt1l = model->BSIM3v1kt1l + model->BSIM3v1lkt1l * Inv_L + model->BSIM3v1wkt1l * Inv_W + model->BSIM3v1pkt1l * Inv_LW; pParam->BSIM3v1k2 = model->BSIM3v1k2 + model->BSIM3v1lk2 * Inv_L + model->BSIM3v1wk2 * Inv_W + model->BSIM3v1pk2 * Inv_LW; pParam->BSIM3v1kt2 = model->BSIM3v1kt2 + model->BSIM3v1lkt2 * Inv_L + model->BSIM3v1wkt2 * Inv_W + model->BSIM3v1pkt2 * Inv_LW; pParam->BSIM3v1k3 = model->BSIM3v1k3 + model->BSIM3v1lk3 * Inv_L + model->BSIM3v1wk3 * Inv_W + model->BSIM3v1pk3 * Inv_LW; pParam->BSIM3v1k3b = model->BSIM3v1k3b + model->BSIM3v1lk3b * Inv_L + model->BSIM3v1wk3b * Inv_W + model->BSIM3v1pk3b * Inv_LW; pParam->BSIM3v1w0 = model->BSIM3v1w0 + model->BSIM3v1lw0 * Inv_L + model->BSIM3v1ww0 * Inv_W + model->BSIM3v1pw0 * Inv_LW; pParam->BSIM3v1nlx = model->BSIM3v1nlx + model->BSIM3v1lnlx * Inv_L + model->BSIM3v1wnlx * Inv_W + model->BSIM3v1pnlx * Inv_LW; pParam->BSIM3v1dvt0 = model->BSIM3v1dvt0 + model->BSIM3v1ldvt0 * Inv_L + model->BSIM3v1wdvt0 * Inv_W + model->BSIM3v1pdvt0 * Inv_LW; pParam->BSIM3v1dvt1 = model->BSIM3v1dvt1 + model->BSIM3v1ldvt1 * Inv_L + model->BSIM3v1wdvt1 * Inv_W + model->BSIM3v1pdvt1 * Inv_LW; pParam->BSIM3v1dvt2 = model->BSIM3v1dvt2 + model->BSIM3v1ldvt2 * Inv_L + model->BSIM3v1wdvt2 * Inv_W + model->BSIM3v1pdvt2 * Inv_LW; pParam->BSIM3v1dvt0w = model->BSIM3v1dvt0w + model->BSIM3v1ldvt0w * Inv_L + model->BSIM3v1wdvt0w * Inv_W + model->BSIM3v1pdvt0w * Inv_LW; pParam->BSIM3v1dvt1w = model->BSIM3v1dvt1w + model->BSIM3v1ldvt1w * Inv_L + model->BSIM3v1wdvt1w * Inv_W + model->BSIM3v1pdvt1w * Inv_LW; pParam->BSIM3v1dvt2w = model->BSIM3v1dvt2w + model->BSIM3v1ldvt2w * Inv_L + model->BSIM3v1wdvt2w * Inv_W + model->BSIM3v1pdvt2w * Inv_LW; pParam->BSIM3v1drout = model->BSIM3v1drout + model->BSIM3v1ldrout * Inv_L + model->BSIM3v1wdrout * Inv_W + model->BSIM3v1pdrout * Inv_LW; pParam->BSIM3v1dsub = model->BSIM3v1dsub + model->BSIM3v1ldsub * Inv_L + model->BSIM3v1wdsub * Inv_W + model->BSIM3v1pdsub * Inv_LW; pParam->BSIM3v1vth0 = model->BSIM3v1vth0 + model->BSIM3v1lvth0 * Inv_L + model->BSIM3v1wvth0 * Inv_W + model->BSIM3v1pvth0 * Inv_LW; pParam->BSIM3v1ua = model->BSIM3v1ua + model->BSIM3v1lua * Inv_L + model->BSIM3v1wua * Inv_W + model->BSIM3v1pua * Inv_LW; pParam->BSIM3v1ua1 = model->BSIM3v1ua1 + model->BSIM3v1lua1 * Inv_L + model->BSIM3v1wua1 * Inv_W + model->BSIM3v1pua1 * Inv_LW; pParam->BSIM3v1ub = model->BSIM3v1ub + model->BSIM3v1lub * Inv_L + model->BSIM3v1wub * Inv_W + model->BSIM3v1pub * Inv_LW; pParam->BSIM3v1ub1 = model->BSIM3v1ub1 + model->BSIM3v1lub1 * Inv_L + model->BSIM3v1wub1 * Inv_W + model->BSIM3v1pub1 * Inv_LW; pParam->BSIM3v1uc = model->BSIM3v1uc + model->BSIM3v1luc * Inv_L + model->BSIM3v1wuc * Inv_W + model->BSIM3v1puc * Inv_LW; pParam->BSIM3v1uc1 = model->BSIM3v1uc1 + model->BSIM3v1luc1 * Inv_L + model->BSIM3v1wuc1 * Inv_W + model->BSIM3v1puc1 * Inv_LW; pParam->BSIM3v1u0 = model->BSIM3v1u0 + model->BSIM3v1lu0 * Inv_L + model->BSIM3v1wu0 * Inv_W + model->BSIM3v1pu0 * Inv_LW; pParam->BSIM3v1ute = model->BSIM3v1ute + model->BSIM3v1lute * Inv_L + model->BSIM3v1wute * Inv_W + model->BSIM3v1pute * Inv_LW; pParam->BSIM3v1voff = model->BSIM3v1voff + model->BSIM3v1lvoff * Inv_L + model->BSIM3v1wvoff * Inv_W + model->BSIM3v1pvoff * Inv_LW; pParam->BSIM3v1delta = model->BSIM3v1delta + model->BSIM3v1ldelta * Inv_L + model->BSIM3v1wdelta * Inv_W + model->BSIM3v1pdelta * Inv_LW; pParam->BSIM3v1rdsw = model->BSIM3v1rdsw + model->BSIM3v1lrdsw * Inv_L + model->BSIM3v1wrdsw * Inv_W + model->BSIM3v1prdsw * Inv_LW; pParam->BSIM3v1prwg = model->BSIM3v1prwg + model->BSIM3v1lprwg * Inv_L + model->BSIM3v1wprwg * Inv_W + model->BSIM3v1pprwg * Inv_LW; pParam->BSIM3v1prwb = model->BSIM3v1prwb + model->BSIM3v1lprwb * Inv_L + model->BSIM3v1wprwb * Inv_W + model->BSIM3v1pprwb * Inv_LW; pParam->BSIM3v1prt = model->BSIM3v1prt + model->BSIM3v1lprt * Inv_L + model->BSIM3v1wprt * Inv_W + model->BSIM3v1pprt * Inv_LW; pParam->BSIM3v1eta0 = model->BSIM3v1eta0 + model->BSIM3v1leta0 * Inv_L + model->BSIM3v1weta0 * Inv_W + model->BSIM3v1peta0 * Inv_LW; pParam->BSIM3v1etab = model->BSIM3v1etab + model->BSIM3v1letab * Inv_L + model->BSIM3v1wetab * Inv_W + model->BSIM3v1petab * Inv_LW; pParam->BSIM3v1pclm = model->BSIM3v1pclm + model->BSIM3v1lpclm * Inv_L + model->BSIM3v1wpclm * Inv_W + model->BSIM3v1ppclm * Inv_LW; pParam->BSIM3v1pdibl1 = model->BSIM3v1pdibl1 + model->BSIM3v1lpdibl1 * Inv_L + model->BSIM3v1wpdibl1 * Inv_W + model->BSIM3v1ppdibl1 * Inv_LW; pParam->BSIM3v1pdibl2 = model->BSIM3v1pdibl2 + model->BSIM3v1lpdibl2 * Inv_L + model->BSIM3v1wpdibl2 * Inv_W + model->BSIM3v1ppdibl2 * Inv_LW; pParam->BSIM3v1pdiblb = model->BSIM3v1pdiblb + model->BSIM3v1lpdiblb * Inv_L + model->BSIM3v1wpdiblb * Inv_W + model->BSIM3v1ppdiblb * Inv_LW; pParam->BSIM3v1pscbe1 = model->BSIM3v1pscbe1 + model->BSIM3v1lpscbe1 * Inv_L + model->BSIM3v1wpscbe1 * Inv_W + model->BSIM3v1ppscbe1 * Inv_LW; pParam->BSIM3v1pscbe2 = model->BSIM3v1pscbe2 + model->BSIM3v1lpscbe2 * Inv_L + model->BSIM3v1wpscbe2 * Inv_W + model->BSIM3v1ppscbe2 * Inv_LW; pParam->BSIM3v1pvag = model->BSIM3v1pvag + model->BSIM3v1lpvag * Inv_L + model->BSIM3v1wpvag * Inv_W + model->BSIM3v1ppvag * Inv_LW; pParam->BSIM3v1wr = model->BSIM3v1wr + model->BSIM3v1lwr * Inv_L + model->BSIM3v1wwr * Inv_W + model->BSIM3v1pwr * Inv_LW; pParam->BSIM3v1dwg = model->BSIM3v1dwg + model->BSIM3v1ldwg * Inv_L + model->BSIM3v1wdwg * Inv_W + model->BSIM3v1pdwg * Inv_LW; pParam->BSIM3v1dwb = model->BSIM3v1dwb + model->BSIM3v1ldwb * Inv_L + model->BSIM3v1wdwb * Inv_W + model->BSIM3v1pdwb * Inv_LW; pParam->BSIM3v1b0 = model->BSIM3v1b0 + model->BSIM3v1lb0 * Inv_L + model->BSIM3v1wb0 * Inv_W + model->BSIM3v1pb0 * Inv_LW; pParam->BSIM3v1b1 = model->BSIM3v1b1 + model->BSIM3v1lb1 * Inv_L + model->BSIM3v1wb1 * Inv_W + model->BSIM3v1pb1 * Inv_LW; pParam->BSIM3v1alpha0 = model->BSIM3v1alpha0 + model->BSIM3v1lalpha0 * Inv_L + model->BSIM3v1walpha0 * Inv_W + model->BSIM3v1palpha0 * Inv_LW; pParam->BSIM3v1beta0 = model->BSIM3v1beta0 + model->BSIM3v1lbeta0 * Inv_L + model->BSIM3v1wbeta0 * Inv_W + model->BSIM3v1pbeta0 * Inv_LW; /* CV model */ pParam->BSIM3v1elm = model->BSIM3v1elm + model->BSIM3v1lelm * Inv_L + model->BSIM3v1welm * Inv_W + model->BSIM3v1pelm * Inv_LW; pParam->BSIM3v1cgsl = model->BSIM3v1cgsl + model->BSIM3v1lcgsl * Inv_L + model->BSIM3v1wcgsl * Inv_W + model->BSIM3v1pcgsl * Inv_LW; pParam->BSIM3v1cgdl = model->BSIM3v1cgdl + model->BSIM3v1lcgdl * Inv_L + model->BSIM3v1wcgdl * Inv_W + model->BSIM3v1pcgdl * Inv_LW; pParam->BSIM3v1ckappa = model->BSIM3v1ckappa + model->BSIM3v1lckappa * Inv_L + model->BSIM3v1wckappa * Inv_W + model->BSIM3v1pckappa * Inv_LW; pParam->BSIM3v1cf = model->BSIM3v1cf + model->BSIM3v1lcf * Inv_L + model->BSIM3v1wcf * Inv_W + model->BSIM3v1pcf * Inv_LW; pParam->BSIM3v1clc = model->BSIM3v1clc + model->BSIM3v1lclc * Inv_L + model->BSIM3v1wclc * Inv_W + model->BSIM3v1pclc * Inv_LW; pParam->BSIM3v1cle = model->BSIM3v1cle + model->BSIM3v1lcle * Inv_L + model->BSIM3v1wcle * Inv_W + model->BSIM3v1pcle * Inv_LW; pParam->BSIM3v1vfbcv = model->BSIM3v1vfbcv + model->BSIM3v1lvfbcv * Inv_L + model->BSIM3v1wvfbcv * Inv_W + model->BSIM3v1pvfbcv * Inv_LW; pParam->BSIM3v1abulkCVfactor = 1.0 + pow((pParam->BSIM3v1clc / pParam->BSIM3v1leff), pParam->BSIM3v1cle); T0 = (TRatio - 1.0); pParam->BSIM3v1ua = pParam->BSIM3v1ua + pParam->BSIM3v1ua1 * T0; pParam->BSIM3v1ub = pParam->BSIM3v1ub + pParam->BSIM3v1ub1 * T0; pParam->BSIM3v1uc = pParam->BSIM3v1uc + pParam->BSIM3v1uc1 * T0; if (pParam->BSIM3v1u0 > 1.0) pParam->BSIM3v1u0 = pParam->BSIM3v1u0 / 1.0e4; pParam->BSIM3v1u0temp = pParam->BSIM3v1u0 * pow(TRatio, pParam->BSIM3v1ute); pParam->BSIM3v1vsattemp = pParam->BSIM3v1vsat - pParam->BSIM3v1at * T0; pParam->BSIM3v1rds0 = (pParam->BSIM3v1rdsw + pParam->BSIM3v1prt * T0) / pow(pParam->BSIM3v1weff * 1E6, pParam->BSIM3v1wr); if (BSIM3v1checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM3v1modName; namarray[1] = here->BSIM3v1name; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM3V3.1 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->BSIM3v1cgdo = (model->BSIM3v1cgdo + pParam->BSIM3v1cf) * pParam->BSIM3v1weffCV; pParam->BSIM3v1cgso = (model->BSIM3v1cgso + pParam->BSIM3v1cf) * pParam->BSIM3v1weffCV; pParam->BSIM3v1cgbo = model->BSIM3v1cgbo * pParam->BSIM3v1leffCV; if (!model->BSIM3v1npeakGiven && model->BSIM3v1gamma1Given) { T0 = pParam->BSIM3v1gamma1 * model->BSIM3v1cox; pParam->BSIM3v1npeak = 3.021E22 * T0 * T0; } pParam->BSIM3v1phi = 2.0 * Vtm0 * log(pParam->BSIM3v1npeak / ni); pParam->BSIM3v1sqrtPhi = sqrt(pParam->BSIM3v1phi); pParam->BSIM3v1phis3 = pParam->BSIM3v1sqrtPhi * pParam->BSIM3v1phi; pParam->BSIM3v1Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM3v1npeak * 1.0e6)) * pParam->BSIM3v1sqrtPhi; pParam->BSIM3v1sqrtXdep0 = sqrt(pParam->BSIM3v1Xdep0); pParam->BSIM3v1litl = sqrt(3.0 * pParam->BSIM3v1xj * model->BSIM3v1tox); pParam->BSIM3v1vbi = Vtm0 * log(1.0e20 * pParam->BSIM3v1npeak / (ni * ni)); pParam->BSIM3v1cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM3v1npeak * 1.0e6 / 2.0 / pParam->BSIM3v1phi); if (model->BSIM3v1k1Given || model->BSIM3v1k2Given) { if (!model->BSIM3v1k1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3v1k1 = 0.53; } if (!model->BSIM3v1k2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3v1k2 = -0.0186; } if (model->BSIM3v1nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM3v1xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM3v1vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM3v1vbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->BSIM3v1gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM3v1gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->BSIM3v1vbxGiven) pParam->BSIM3v1vbx = pParam->BSIM3v1phi - 7.7348e-4 * pParam->BSIM3v1npeak * pParam->BSIM3v1xt * pParam->BSIM3v1xt; if (pParam->BSIM3v1vbx > 0.0) pParam->BSIM3v1vbx = -pParam->BSIM3v1vbx; if (pParam->BSIM3v1vbm > 0.0) pParam->BSIM3v1vbm = -pParam->BSIM3v1vbm; if (!model->BSIM3v1gamma1Given) pParam->BSIM3v1gamma1 = 5.753e-12 * sqrt(pParam->BSIM3v1npeak) / model->BSIM3v1cox; if (!model->BSIM3v1gamma2Given) pParam->BSIM3v1gamma2 = 5.753e-12 * sqrt(pParam->BSIM3v1nsub) / model->BSIM3v1cox; T0 = pParam->BSIM3v1gamma1 - pParam->BSIM3v1gamma2; T1 = sqrt(pParam->BSIM3v1phi - pParam->BSIM3v1vbx) - pParam->BSIM3v1sqrtPhi; T2 = sqrt(pParam->BSIM3v1phi * (pParam->BSIM3v1phi - pParam->BSIM3v1vbm)) - pParam->BSIM3v1phi; pParam->BSIM3v1k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM3v1vbm); pParam->BSIM3v1k1 = pParam->BSIM3v1gamma2 - 2.0 * pParam->BSIM3v1k2 * sqrt(pParam->BSIM3v1phi - pParam->BSIM3v1vbm); } if (pParam->BSIM3v1k2 < 0.0) { T0 = 0.5 * pParam->BSIM3v1k1 / pParam->BSIM3v1k2; pParam->BSIM3v1vbsc = 0.9 * (pParam->BSIM3v1phi - T0 * T0); if (pParam->BSIM3v1vbsc > -3.0) pParam->BSIM3v1vbsc = -3.0; else if (pParam->BSIM3v1vbsc < -30.0) pParam->BSIM3v1vbsc = -30.0; } else { pParam->BSIM3v1vbsc = -30.0; } if (pParam->BSIM3v1vbsc > pParam->BSIM3v1vbm) pParam->BSIM3v1vbsc = pParam->BSIM3v1vbm; if (model->BSIM3v1vth0Given) { pParam->BSIM3v1vfb = model->BSIM3v1type * pParam->BSIM3v1vth0 - pParam->BSIM3v1phi - pParam->BSIM3v1k1 * pParam->BSIM3v1sqrtPhi; } else { pParam->BSIM3v1vfb = -1.0; pParam->BSIM3v1vth0 = model->BSIM3v1type * (pParam->BSIM3v1vfb + pParam->BSIM3v1phi + pParam->BSIM3v1k1 * pParam->BSIM3v1sqrtPhi); } T1 = sqrt(EPSSI / EPSOX * model->BSIM3v1tox * pParam->BSIM3v1Xdep0); T0 = exp(-0.5 * pParam->BSIM3v1dsub * pParam->BSIM3v1leff / T1); pParam->BSIM3v1theta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->BSIM3v1drout * pParam->BSIM3v1leff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->BSIM3v1thetaRout = pParam->BSIM3v1pdibl1 * T2 + pParam->BSIM3v1pdibl2; } /* process source/drain series resistance */ here->BSIM3v1drainConductance = model->BSIM3v1sheetResistance * here->BSIM3v1drainSquares; if (here->BSIM3v1drainConductance > 0.0) here->BSIM3v1drainConductance = 1.0 / here->BSIM3v1drainConductance; else here->BSIM3v1drainConductance = 0.0; here->BSIM3v1sourceConductance = model->BSIM3v1sheetResistance * here->BSIM3v1sourceSquares; if (here->BSIM3v1sourceConductance > 0.0) here->BSIM3v1sourceConductance = 1.0 / here->BSIM3v1sourceConductance; else here->BSIM3v1sourceConductance = 0.0; here->BSIM3v1cgso = pParam->BSIM3v1cgso; here->BSIM3v1cgdo = pParam->BSIM3v1cgdo; } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1del.c0000644000265600020320000000205612264261473021127 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1del.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "bsim3v1def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM3v1delete(GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM3v1instance **fast = (BSIM3v1instance**)inInst; BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance **prev = NULL; BSIM3v1instance *here; for (; model ; model = model->BSIM3v1nextModel) { prev = &(model->BSIM3v1instances); for (here = *prev; here ; here = *prev) { if (here->BSIM3v1name == name || (fast && here==*fast)) { *prev= here->BSIM3v1nextInstance; FREE(here); return(OK); } prev = &(here->BSIM3v1nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3v1/b3v1cvtest.c0000644000265600020320000000610412264261473021671 0ustar andreasadmin/********** * Copyright 1990 Regents of the University of California. All rights reserved. * File: b3v1cvtest.c * Author: 1995 Min-Chie Jeng and Mansun Chan. * Modified by Paolo Nenzi 2002 **********/ /* * Release Notes: * BSIM3v3.1, Released by yuhua 96/12/08 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v1convTest(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v1model *model = (BSIM3v1model*)inModel; BSIM3v1instance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the BSIM3v1 device models */ for (; model != NULL; model = model->BSIM3v1nextModel) { /* loop through all the instances of the model */ for (here = model->BSIM3v1instances; here != NULL ; here=here->BSIM3v1nextInstance) { vbs = model->BSIM3v1type * (*(ckt->CKTrhsOld+here->BSIM3v1bNode) - *(ckt->CKTrhsOld+here->BSIM3v1sNodePrime)); vgs = model->BSIM3v1type * (*(ckt->CKTrhsOld+here->BSIM3v1gNode) - *(ckt->CKTrhsOld+here->BSIM3v1sNodePrime)); vds = model->BSIM3v1type * (*(ckt->CKTrhsOld+here->BSIM3v1dNodePrime) - *(ckt->CKTrhsOld+here->BSIM3v1sNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v1vgs) - *(ckt->CKTstate0 + here->BSIM3v1vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v1vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v1vds); delvgd = vgd-vgdo; cd = here->BSIM3v1cd; if (here->BSIM3v1mode >= 0) { cdhat = cd - here->BSIM3v1gbd * delvbd + here->BSIM3v1gmbs * delvbs + here->BSIM3v1gm * delvgs + here->BSIM3v1gds * delvds; } else { cdhat = cd - (here->BSIM3v1gbd - here->BSIM3v1gmbs) * delvbd - here->BSIM3v1gm * delvgd + here->BSIM3v1gds * delvds; } /* * check convergence */ if ((here->BSIM3v1off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->BSIM3v1cbs; cbd = here->BSIM3v1cbd; cbhat = cbs + cbd + here->BSIM3v1gbd * delvbd + here->BSIM3v1gbs * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/dio/0000755000265600020320000000000012264261707017007 5ustar andreasadminngspice-26/src/spicelib/devices/dio/diomdel.c0000644000265600020320000000174612264261473020600 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { DIOmodel **model = (DIOmodel**)inModel; DIOmodel *modfast = (DIOmodel*)kill; DIOinstance *here; DIOinstance *prev = NULL; DIOmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->DIOnextModel)) { if( (*model)->DIOmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->DIOnextModel; /* cut deleted device out of list */ for(here = (*model)->DIOinstances ; here ; here = here->DIOnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/dio/dio.c0000644000265600020320000001465612264261473017742 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "diodefs.h" #include "ngspice/suffix.h" IFparm DIOpTable[] = { /* parameters */ IOPU("off", DIO_OFF, IF_FLAG, "Initially off"), IOPU("temp", DIO_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", DIO_DTEMP, IF_REAL, "Instance delta temperature"), IOPAU("ic", DIO_IC, IF_REAL, "Initial device voltage"), IOPU("area", DIO_AREA, IF_REAL, "Area factor"), IOPU("pj", DIO_PJ, IF_REAL, "Perimeter factor"), IOPU("w", DIO_W, IF_REAL, "Diode width"), IOPU("l", DIO_L, IF_REAL, "Diode length"), IOPU("m", DIO_M, IF_REAL, "Multiplier"), IP("sens_area",DIO_AREA_SENS,IF_FLAG,"flag to request sensitivity WRT area"), OP("vd", DIO_VOLTAGE,IF_REAL, "Diode voltage"), OP("id", DIO_CURRENT,IF_REAL, "Diode current"), OPR("c", DIO_CURRENT,IF_REAL, "Diode current"), OP("gd", DIO_CONDUCT,IF_REAL, "Diode conductance"), OP("cd", DIO_CAP, IF_REAL, "Diode capacitance"), OPU("charge", DIO_CHARGE, IF_REAL, "Diode capacitor charge"), OPU("capcur", DIO_CAPCUR, IF_REAL, "Diode capacitor current"), OPU("p", DIO_POWER, IF_REAL, "Diode power"), OPU("sens_dc",DIO_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU("sens_real", DIO_QUEST_SENS_REAL,IF_REAL, "dc sens. and real part of ac sensitivity"), OPU("sens_imag", DIO_QUEST_SENS_IMAG,IF_REAL, "imag part of ac sensitivity "), OPU("sens_mag", DIO_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU("sens_ph", DIO_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx", DIO_QUEST_SENS_CPLX,IF_COMPLEX,"ac sensitivity") }; IFparm DIOmPTable[] = { /* model parameters */ IOP( "level", DIO_MOD_LEVEL, IF_INTEGER, "Diode level selector"), IOP( "is", DIO_MOD_IS, IF_REAL, "Saturation current"), IOPR( "js", DIO_MOD_IS, IF_REAL, "Saturation current"), IOP( "jsw", DIO_MOD_JSW, IF_REAL, "Sidewall Saturation current"), IOPU( "tnom",DIO_MOD_TNOM,IF_REAL, "Parameter measurement temperature"), IOPR( "tref",DIO_MOD_TNOM,IF_REAL, "Parameter measurement temperature"), IOP( "rs", DIO_MOD_RS, IF_REAL, "Ohmic resistance"), IOP( "trs", DIO_MOD_TRS, IF_REAL, "Ohmic resistance 1st order temp. coeff."), IOPR( "trs1", DIO_MOD_TRS, IF_REAL, "Ohmic resistance 1st order temp. coeff."), IOP( "trs2", DIO_MOD_TRS2, IF_REAL, "Ohmic resistance 2nd order temp. coeff."), IOP( "n", DIO_MOD_N, IF_REAL, "Emission Coefficient"), IOP( "ns", DIO_MOD_NS, IF_REAL, "Sidewall emission Coefficient"), IOPA( "tt", DIO_MOD_TT, IF_REAL, "Transit Time"), IOPA( "ttt1", DIO_MOD_TTT1, IF_REAL, "Transit Time 1st order temp. coeff."), IOPA( "ttt2", DIO_MOD_TTT2, IF_REAL, "Transit Time 2nd order temp. coeff."), IOPA( "cjo", DIO_MOD_CJO, IF_REAL, "Junction capacitance"), IOPR( "cj0", DIO_MOD_CJO, IF_REAL, "Junction capacitance"), IOPR( "cj", DIO_MOD_CJO, IF_REAL, "Junction capacitance"), IOP( "vj", DIO_MOD_VJ, IF_REAL, "Junction potential"), IOPR( "pb", DIO_MOD_VJ, IF_REAL, "Junction potential"), IOP( "m", DIO_MOD_M, IF_REAL, "Grading coefficient"), IOPR( "mj", DIO_MOD_M, IF_REAL, "Grading coefficient"), IOP( "tm1", DIO_MOD_TM1, IF_REAL, "Grading coefficient 1st temp. coeff."), IOP( "tm2", DIO_MOD_TM2, IF_REAL, "Grading coefficient 2nd temp. coeff."), IOP( "cjp", DIO_MOD_CJSW, IF_REAL, "Sidewall junction capacitance"), IOPR( "cjsw", DIO_MOD_CJSW, IF_REAL, "Sidewall junction capacitance"), IOP( "php", DIO_MOD_VJSW, IF_REAL, "Sidewall junction potential"), IOP( "mjsw", DIO_MOD_MJSW, IF_REAL, "Sidewall Grading coefficient"), IOP( "ikf", DIO_MOD_IKF, IF_REAL, "Forward Knee current"), IOPR( "ik", DIO_MOD_IKF, IF_REAL, "Forward Knee current"), IOP( "ikr", DIO_MOD_IKR, IF_REAL, "Reverse Knee current"), IOP( "nbv", DIO_MOD_NBV, IF_REAL, "Breakdown Emission Coefficient"), IOP("area", DIO_MOD_AREA, IF_REAL, "Area factor"), IOP( "pj", DIO_MOD_PJ, IF_REAL, "Perimeter factor"), IOP( "tlev", DIO_MOD_TLEV, IF_INTEGER, "Diode temperature equation selector"), IOP( "tlevc", DIO_MOD_TLEVC, IF_INTEGER, "Diode temperature equation selector"), IOP( "eg", DIO_MOD_EG, IF_REAL, "Activation energy"), IOP( "xti", DIO_MOD_XTI, IF_REAL, "Saturation current temperature exp."), IOP( "cta", DIO_MOD_CTA, IF_REAL, "Area junction temperature coefficient"), IOPR( "ctc", DIO_MOD_CTA, IF_REAL, "Area junction capacitance temperature coefficient"), IOP( "ctp", DIO_MOD_CTP, IF_REAL, "Perimeter junction capacitance temperature coefficient"), IOP( "ctp", DIO_MOD_CTP, IF_REAL, "Perimeter junction capacitance temperature coefficient"), IOP( "tpb", DIO_MOD_TPB, IF_REAL, "Area junction potential temperature coefficient"), IOPR( "tvj", DIO_MOD_TPB, IF_REAL, "Area junction potential temperature coefficient"), IOP( "tphp", DIO_MOD_TPHP, IF_REAL, "Perimeter junction potential temperature coefficient"), IOP( "jtun", DIO_MOD_JTUN, IF_REAL, "Tunneling saturation current"), IOP( "jtunsw", DIO_MOD_JTUNSW, IF_REAL, "Tunneling sidewall saturation current"), IOP( "ntun", DIO_MOD_NTUN, IF_REAL, "Tunneling emission coefficient"), IOP( "xtitun", DIO_MOD_XTITUN, IF_REAL, "Tunneling saturation current exponential"), IOP( "keg", DIO_MOD_KEG, IF_REAL, "EG correction factor for tunneling"), IOP( "kf", DIO_MOD_KF, IF_REAL, "flicker noise coefficient"), IOP( "af", DIO_MOD_AF, IF_REAL, "flicker noise exponent"), IOP( "fc", DIO_MOD_FC, IF_REAL, "Forward bias junction fit parameter"), IOP( "fcs", DIO_MOD_FCS, IF_REAL, "Forward bias sidewall junction fit parameter"), IOP( "bv", DIO_MOD_BV, IF_REAL, "Reverse breakdown voltage"), IOP( "ibv", DIO_MOD_IBV, IF_REAL, "Current at reverse breakdown voltage"), IOPR( "ib", DIO_MOD_IBV, IF_REAL, "Current at reverse breakdown voltage"), IOP( "tcv", DIO_MOD_TCV, IF_REAL, "Reverse breakdown voltage temperature coefficient"), OPU( "cond", DIO_MOD_COND,IF_REAL, "Ohmic conductance"), IOP( "fv_max", DIO_MOD_FV_MAX, IF_REAL, "maximum voltage in forward direction"), IOP( "bv_max", DIO_MOD_BV_MAX, IF_REAL, "maximum voltage in reverse direction"), IP( "d", DIO_MOD_D, IF_FLAG, "Diode model") }; char *DIOnames[] = { "D+", "D-" }; int DIOnSize = NUMELEMS(DIOnames); int DIOpTSize = NUMELEMS(DIOpTable); int DIOmPTSize = NUMELEMS(DIOmPTable); int DIOiSize = sizeof(DIOinstance); int DIOmSize = sizeof(DIOmodel); ngspice-26/src/spicelib/devices/dio/diosacl.c0000644000265600020320000002250112264261473020571 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; double SaveState[5]; int error; int i; int iparmno; int flag; double A0; double DELA; double Apert; double DELAinv; double vte; double gspr0; double geq0; double xceq0; double vspr; double ivspr; double vd; double ivd; double vdOp; double gspr; double geq; double xceq; double cspr; double icspr; double cd; double icd; double cpos0; double icpos0; double cpos; double icpos; double cposprm0; double icposprm0; double cposprm; double icposprm; double cneg0; double icneg0; double cneg; double icneg; double DvdDp; SENstruct *info; #ifdef SENSDEBUG printf("DIOsenacload\n"); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; /* loop through all the models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 4; i++) { *(SaveState + i) = *(ckt->CKTstate0 + here->DIOstate + i); } vspr = *(ckt->CKTrhsOld + here->DIOposNode) - *(ckt->CKTrhsOld + here->DIOposPrimeNode) ; ivspr = *(ckt->CKTirhsOld + here->DIOposNode) - *(ckt->CKTirhsOld + here->DIOposPrimeNode) ; vd = *(ckt->CKTrhsOld + here->DIOposPrimeNode) - *(ckt->CKTrhsOld + here->DIOnegNode) ; ivd = *(ckt->CKTirhsOld + here->DIOposPrimeNode) - *(ckt->CKTirhsOld + here->DIOnegNode) ; vdOp = *(ckt->CKTrhsOp + here->DIOposPrimeNode) - *(ckt->CKTrhsOp + here->DIOnegNode); /* without perturbation */ #ifdef SENSDEBUG printf("without perturbation \n"); #endif /* SENSDEBUG */ *(ckt->CKTstate0 + here->DIOvoltage) = vdOp; here->DIOsenPertFlag = ON; if(info->SENacpertflag == 1){ if ((error = DIOload((GENmodel*)model,ckt)) != 0) return(error); *(here->DIOsenGeq) = *(ckt->CKTstate0 + here->DIOconduct); *(here->DIOsenCeq) = *(ckt->CKTstate0 + here->DIOcapCurrent); } geq0 = *(here->DIOsenGeq); xceq0 = *(here->DIOsenCeq) * ckt->CKTomega; A0 = here->DIOarea; gspr0=here->DIOtConductance*A0; cpos0 = gspr0 * vspr; icpos0 = gspr0 * ivspr; cposprm0 = geq0 * vd - xceq0 * ivd - cpos0; icposprm0 = geq0 * ivd + xceq0 * vd - icpos0; cneg0 = - geq0 * vd + xceq0 * ivd; icneg0 = - geq0 * ivd - xceq0 * vd; #ifdef SENSDEBUG printf("gspr0 = %.7e , geq0 = %.7e ,xceq0 = %.7e\n", gspr0 ,geq0,xceq0); printf("cpos0 = %.7e + j%.7e , cneg0 = %.7e + j%.7e\n", cpos0,icpos0,cneg0,icneg0); #endif /* SENSDEBUG */ /* Perturbation of Area */ #ifdef SENSDEBUG printf("Perturbation of Area\n"); #endif /* SENSDEBUG */ if(here->DIOsenParmNo == 0) goto pertvd; DELA = info->SENpertfac * A0; Apert = A0 + DELA; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ here->DIOarea = Apert; *(ckt->CKTstate0 + here->DIOvoltage) = vdOp; if ((error = DIOload((GENmodel*)model,ckt)) != 0) return(error); *(here->DIOsenGeq + 1) = *(ckt->CKTstate0 + here->DIOconduct); *(here->DIOsenCeq + 1)= *(ckt->CKTstate0 + here->DIOcapCurrent); here->DIOarea = A0; } gspr=here->DIOtConductance*Apert; geq = *(here->DIOsenGeq + 1); xceq = *(here->DIOsenCeq + 1) * ckt->CKTomega; flag = 0; goto load; pertvd: /* Perturbation of Diode Voltage */ #ifdef SENSDEBUG printf("Perturbation of vd\n"); #endif /* SENSDEBUG */ vte=model->DIOemissionCoeff * CONSTKoverQ * here->DIOtemp; A0 = vdOp; DELA = info->SENpertfac * vte; Apert = A0 + DELA; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ *(ckt->CKTstate0 + here->DIOvoltage) = Apert; if ((error = DIOload((GENmodel*)model,ckt)) != 0) return(error); *(here->DIOsenGeq + 2) = *(ckt->CKTstate0 + here->DIOconduct); *(here->DIOsenCeq + 2)= *(ckt->CKTstate0 + here->DIOcapCurrent); *(ckt->CKTstate0 + here->DIOvoltage) = A0; } gspr=here->DIOtConductance*here->DIOarea; geq = *(here->DIOsenGeq + 2); xceq = *(here->DIOsenCeq + 2) * ckt->CKTomega; flag = 1; load: cspr = gspr * vspr; icspr = gspr * ivspr; cd = geq * vd - xceq * ivd; icd = geq * ivd + xceq * vd; cpos = cspr; icpos = icspr; cposprm = ( - cspr + cd ); icposprm = ( - icspr + icd ); cneg = ( - cd ); icneg = ( - icd ); #ifdef SENSDEBUG printf("gspr = %.7e , geq = %.7e , xceq = %.7e\n", gspr,geq,xceq); printf("cspr = %.7e + j%.7e , cd = %.7e + j%.7e\n", cspr,icspr,cd,icd); printf("cpos = %.7e + j%.7e , cposprm = %.7e + j%.7e", cpos,icpos,cposprm,icposprm); printf(", cneg = %.7e + %.7e\n",cneg,icneg); printf("senpprm = %.7e " ,info->SEN_Sap[here->DIOposPrimeNode][here->DIOsenParmNo]); printf("senneg = %.7e \n", info->SEN_Sap[here->DIOnegNode][here->DIOsenParmNo]); printf("A0 = %.7e , Apert = %.7e ,factor = %.7e\n,vte = %.7e", A0 ,Apert,DELAinv,vte); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ /* calculate the DC sensitivities of operating points */ DvdDp = info->SEN_Sap[here->DIOposPrimeNode][iparmno] - info->SEN_Sap[here->DIOnegNode][iparmno]; if(flag == 0){ if (here->DIOsenParmNo != iparmno) continue; /* area : so no DC sensitivity term involved */ DvdDp =1; } /* load the RHS matrix */ if(here->DIOposNode != here->DIOposPrimeNode){ /* DcposDp */ *(info->SEN_RHS[here->DIOposNode] + iparmno) -= (cpos - cpos0) * DELAinv * DvdDp ; /* DicposDp */ *(info->SEN_iRHS[here->DIOposNode] + iparmno) -= (icpos - icpos0) * DELAinv * DvdDp ; } /* DcposprmDp */ *(info->SEN_RHS[here->DIOposPrimeNode] + iparmno) -= (cposprm - cposprm0) * DELAinv * DvdDp ; /* DicposprmDp */ *(info->SEN_iRHS[here->DIOposPrimeNode] + iparmno) -= (icposprm - icposprm0) * DELAinv * DvdDp ; /* DcnegDp */ *(info->SEN_RHS[here->DIOnegNode] + iparmno) -= (cneg - cneg0) * DELAinv * DvdDp ; /* DicnegDp */ *(info->SEN_iRHS[here->DIOnegNode] + iparmno) -= (icneg - icneg0) * DELAinv * DvdDp ; #ifdef SENSDEBUG printf("senpos = %.7e + j%.7e ", *(info->SEN_RHS[here->DIOposNode] + iparmno), *(info->SEN_iRHS[here->DIOposNode] + iparmno)); printf("senposprm = %.7e + j%.7e ", *(info->SEN_RHS[here->DIOposPrimeNode] + iparmno), *(info->SEN_iRHS[here->DIOposPrimeNode] + iparmno)); printf("senneg = %.7e + j%.7e ", *(info->SEN_RHS[here->DIOnegNode] + iparmno), *(info->SEN_iRHS[here->DIOnegNode] + iparmno)); printf("flag = %d ,DvdDp = %.7e ,iparmno = %d,senparmno = %d\n" ,flag,DvdDp,iparmno,here->DIOsenParmNo); #endif /* SENSDEBUG */ } if(!flag) goto pertvd; /* put the unperturbed values back into the state vector */ for(i=0; i <= 4; i++) { *(ckt->CKTstate0 + here->DIOstate + i) = *(SaveState + i); } here->DIOsenPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("DIOsenacload end \n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/dio/dioext.h0000644000265600020320000000257012264261473020460 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int DIOacLoad(GENmodel*,CKTcircuit*); extern int DIOask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int DIOconvTest(GENmodel *,CKTcircuit*); extern int DIOdelete(GENmodel*,IFuid,GENinstance**); extern void DIOdestroy(GENmodel**); extern int DIOgetic(GENmodel*,CKTcircuit*); extern int DIOload(GENmodel*,CKTcircuit*); extern int DIOmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int DIOmDelete(GENmodel**,IFuid,GENmodel*); extern int DIOmParam(int,IFvalue*,GENmodel*); extern int DIOparam(int,IFvalue*,GENinstance*,IFvalue*); extern int DIOpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int DIOsAcLoad(GENmodel*,CKTcircuit*); extern int DIOsLoad(GENmodel*,CKTcircuit*); extern int DIOsSetup(SENstruct*,GENmodel*); extern void DIOsPrint(GENmodel*,CKTcircuit*); extern int DIOsUpdate(GENmodel*,CKTcircuit*); extern int DIOsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int DIOunsetup(GENmodel*,CKTcircuit*); extern int DIOtemp(GENmodel*,CKTcircuit*); extern int DIOtrunc(GENmodel*,CKTcircuit*,double*); extern int DIOdisto(int,GENmodel*,CKTcircuit*); extern int DIOnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int DIOdSetup(DIOmodel*,CKTcircuit*); extern int DIOsoaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/dio/dionoise.c0000644000265600020320000001451212264261473020767 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified by Dietmar Warning 2003 **********/ #include "ngspice/ngspice.h" #include "diodefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * DIOnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with diodes. It starts with the model *firstModel and * traverses all of its instancess. It then proceeds to any other * models on the linked list. The total output noise density * generated by all of the diodes is summed with the variable * "OnDens". */ int DIOnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; DIOmodel *firstModel = (DIOmodel *) genmodel; DIOmodel *model; DIOinstance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[DIONSRCS]; double lnNdens[DIONSRCS]; int i; /* define the names of the noise sources */ static char *DIOnNames[DIONSRCS] = { /* Note that we have to keep the order */ "_rs", /* noise due to rs */ /* consistent with thestrchr definitions */ "_id", /* noise due to id */ /* in DIOdefs.h */ "_1overf", /* flicker (1/f) noise */ "" /* total diode noise */ }; for (model=firstModel; model != NULL; model=model->DIOnextModel) { for (inst=model->DIOinstances; inst != NULL; inst=inst->DIOnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < DIONSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->DIOname,DIOnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < DIONSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->DIOname,DIOnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->DIOname,DIOnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[DIORSNOIZ],&lnNdens[DIORSNOIZ], ckt,THERMNOISE,inst->DIOposPrimeNode,inst->DIOposNode, inst->DIOtConductance * inst->DIOarea * inst->DIOm); NevalSrc(&noizDens[DIOIDNOIZ],&lnNdens[DIOIDNOIZ], ckt,SHOTNOISE,inst->DIOposPrimeNode, inst->DIOnegNode, *(ckt->CKTstate0 + inst->DIOcurrent)); NevalSrc(&noizDens[DIOFLNOIZ], NULL, ckt, N_GAIN,inst->DIOposPrimeNode, inst->DIOnegNode, (double)0.0); noizDens[DIOFLNOIZ] *= model->DIOfNcoef * exp(model->DIOfNexp * log(MAX(fabs(*(ckt->CKTstate0 + inst->DIOcurrent)/inst->DIOm),N_MINLOG))) / data->freq * inst->DIOm; lnNdens[DIOFLNOIZ] = log(MAX(noizDens[DIOFLNOIZ],N_MINLOG)); noizDens[DIOTOTNOIZ] = noizDens[DIORSNOIZ] + noizDens[DIOIDNOIZ] + noizDens[DIOFLNOIZ]; lnNdens[DIOTOTNOIZ] = log(MAX(noizDens[DIOTOTNOIZ], N_MINLOG)); *OnDens += noizDens[DIOTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < DIONSRCS; i++) { inst->DIOnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < DIONSRCS; i++) { inst->DIOnVar[OUTNOIZ][i] = 0.0; inst->DIOnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ /* To insure accurracy, we have to integrate each component separately */ for (i=0; i < DIONSRCS; i++) { if (i != DIOTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->DIOnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->DIOnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->DIOnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->DIOnVar[OUTNOIZ][i] += tempOnoise; inst->DIOnVar[OUTNOIZ][DIOTOTNOIZ] += tempOnoise; inst->DIOnVar[INNOIZ][i] += tempInoise; inst->DIOnVar[INNOIZ][DIOTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < DIONSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < DIONSRCS; i++) { data->outpVector[data->outNumber++] = inst->DIOnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->DIOnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/dio/dioinit.h0000644000265600020320000000035612264261473020623 0ustar andreasadmin#ifndef _DIOINIT_H #define _DIOINIT_H extern IFparm DIOpTable[ ]; extern IFparm DIOmPTable[ ]; extern char *DIOnames[ ]; extern int DIOpTSize; extern int DIOmPTSize; extern int DIOnSize; extern int DIOiSize; extern int DIOmSize; #endif ngspice-26/src/spicelib/devices/dio/diodest.c0000644000265600020320000000137512264261473020614 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "diodefs.h" #include "ngspice/suffix.h" void DIOdestroy(GENmodel **inModel) { DIOmodel **model = (DIOmodel**)inModel; DIOinstance *here; DIOinstance *prev = NULL; DIOmodel *mod = *model; DIOmodel *oldmod = NULL; for( ; mod ; mod = mod->DIOnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->DIOinstances ; here ; here = here->DIOnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/dio/diosoachk.c0000644000265600020320000000301612264261473021117 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int DIOsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { DIOmodel *model = (DIOmodel *) inModel; DIOinstance *here; double vd; /* current diode voltage */ int maxwarns; static int warns_fv = 0, warns_bv = 0; if (!ckt) { warns_fv = 0; warns_bv = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->DIOnextModel) { for (here = model->DIOinstances; here; here = here->DIOnextInstance) { vd = ckt->CKTrhsOld [here->DIOposPrimeNode] - ckt->CKTrhsOld [here->DIOnegNode]; if (vd > model->DIOfv_max) if (warns_fv < maxwarns) { soa_printf(ckt, (GENinstance*) here, "Vj=%g has exceeded Fv_max=%g\n", vd, model->DIOfv_max); warns_fv++; } if (-vd > model->DIObv_max) if (warns_bv < maxwarns) { soa_printf(ckt, (GENinstance*) here, "Vj=%g has exceeded Bv_max=%g\n", vd, model->DIObv_max); warns_bv++; } } } return OK; } ngspice-26/src/spicelib/devices/dio/dioask.c0000644000265600020320000001201012264261473020417 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int DIOask (CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { DIOinstance *here = (DIOinstance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch (which) { case DIO_OFF: value->iValue = here->DIOoff; return(OK); case DIO_IC: value->rValue = here->DIOinitCond; return(OK); case DIO_AREA: value->rValue = here->DIOarea; return(OK); case DIO_PJ: value->rValue = here->DIOpj; return(OK); case DIO_W: value->rValue = here->DIOw; return(OK); case DIO_L: value->rValue = here->DIOl; return(OK); case DIO_M: value->rValue = here->DIOm; return(OK); case DIO_TEMP: value->rValue = here->DIOtemp-CONSTCtoK; return(OK); case DIO_DTEMP: value->rValue = here->DIOdtemp; return(OK); case DIO_VOLTAGE: value->rValue = *(ckt->CKTstate0+here->DIOvoltage); return(OK); case DIO_CURRENT: value->rValue = *(ckt->CKTstate0+here->DIOcurrent); return(OK); case DIO_CAP: value->rValue = here->DIOcap; return(OK); case DIO_CHARGE: value->rValue = *(ckt->CKTstate0+here->DIOcapCharge); return(OK); case DIO_CAPCUR: value->rValue = *(ckt->CKTstate0+here->DIOcapCurrent); return(OK); case DIO_CONDUCT: value->rValue = *(ckt->CKTstate0+here->DIOconduct); return(OK); case DIO_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "DIOask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->DIOcurrent) * *(ckt->CKTstate0 + here->DIOvoltage); } return(OK); case DIO_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->DIOsenParmNo); } return(OK); case DIO_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->DIOsenParmNo); } return(OK); case DIO_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->DIOsenParmNo); } return(OK); case DIO_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->DIOsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->DIOsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case DIO_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->DIOsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->DIOsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case DIO_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->DIOsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->DIOsenParmNo); } return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/dio/diotemp.c0000644000265600020320000002714712264261473020627 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ /* perform the temperature update to the diode */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOtemp(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; double xfc, xfcs; double vte; double cbv; double xbv; double xcbv; double tol; double vt; double vtnom; DIOinstance *here; int iter; #ifdef TRACE char *emsg; #endif double dt; double factor; double tBreakdownVoltage; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { if(!model->DIOnomTempGiven) { model->DIOnomTemp = ckt->CKTnomTemp; } vtnom = CONSTKoverQ * model->DIOnomTemp; /* limit grading coeff to max of .9 */ if(model->DIOgradingCoeff>.9) { SPfrontEnd->IFerror (ERR_WARNING, "%s: grading coefficient too large, limited to 0.9", &(model->DIOmodName)); model->DIOgradingCoeff=.9; } /* limit activation energy to min of .1 */ if(model->DIOactivationEnergy<.1) { SPfrontEnd->IFerror (ERR_WARNING, "%s: activation energy too small, limited to 0.1", &(model->DIOmodName)); model->DIOactivationEnergy=.1; } /* limit depletion cap coeff to max of .95 */ if(model->DIOdepletionCapCoeff>.95) { SPfrontEnd->IFerror (ERR_WARNING, "%s: coefficient Fc too large, limited to 0.95", &(model->DIOmodName)); model->DIOdepletionCapCoeff=.95; } /* limit sidewall depletion cap coeff to max of .95 */ if(model->DIOdepletionSWcapCoeff>.95) { SPfrontEnd->IFerror (ERR_WARNING, "%s: coefficient Fcs too large, limited to 0.95", &(model->DIOmodName)); model->DIOdepletionSWcapCoeff=.95; } if((!model->DIOresistGiven) || (model->DIOresist==0)) { model->DIOconductance = 0.0; } else { model->DIOconductance = 1/model->DIOresist; } xfc=log(1-model->DIOdepletionCapCoeff); xfcs=log(1-model->DIOdepletionSWcapCoeff); for(here=model->DIOinstances;here;here=here->DIOnextInstance) { double egfet1,arg1,fact1,pbfact1,pbo,gmaold,pboSW,gmaSWold; double fact2,pbfact,arg,egfet,gmanew,gmaSWnew; /* loop through all the instances */ if(!here->DIOdtempGiven) here->DIOdtemp = 0.0; if(!here->DIOtempGiven) here->DIOtemp = ckt->CKTtemp + here->DIOdtemp; dt = here->DIOtemp - model->DIOnomTemp; /* Junction grading temperature adjust */ factor = 1.0 + (model->DIOgradCoeffTemp1 * dt) + (model->DIOgradCoeffTemp2 * dt * dt); here->DIOtGradingCoeff = model->DIOgradingCoeff * factor; /* limit temperature adjusted grading coeff * to max of .9 */ if(here->DIOtGradingCoeff>.9) { SPfrontEnd->IFerror (ERR_WARNING, "%s: temperature adjusted grading coefficient too large, limited to 0.9", &(here->DIOname)); here->DIOtGradingCoeff=.9; } vt = CONSTKoverQ * here->DIOtemp; /* this part gets really ugly - I won't even try to * explain these equations */ fact2 = here->DIOtemp/REFTEMP; egfet = 1.16-(7.02e-4*here->DIOtemp*here->DIOtemp)/ (here->DIOtemp+1108); arg = -egfet/(2*CONSTboltz*here->DIOtemp) + 1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt*(1.5*log(fact2)+CHARGE*arg); egfet1 = 1.16 - (7.02e-4*model->DIOnomTemp*model->DIOnomTemp)/ (model->DIOnomTemp+1108); arg1 = -egfet1/(CONSTboltz*2*model->DIOnomTemp) + 1.1150877/(2*CONSTboltz*REFTEMP); fact1 = model->DIOnomTemp/REFTEMP; pbfact1 = -2 * vtnom*(1.5*log(fact1)+CHARGE*arg1); if (model->DIOtlevc == 0) { pbo = (model->DIOjunctionPot-pbfact1)/fact1; gmaold = (model->DIOjunctionPot-pbo)/pbo; here->DIOtJctCap = here->DIOjunctionCap / (1+here->DIOtGradingCoeff* (400e-6*(model->DIOnomTemp-REFTEMP)-gmaold) ); here->DIOtJctPot = pbfact+fact2*pbo; gmanew = (here->DIOtJctPot-pbo)/pbo; here->DIOtJctCap *= 1+here->DIOtGradingCoeff* (400e-6*(here->DIOtemp-REFTEMP)-gmanew); } else if (model->DIOtlevc == 1) { here->DIOtJctPot = model->DIOjunctionPot - model->DIOtpb*(here->DIOtemp-REFTEMP); here->DIOtJctCap = here->DIOjunctionCap * (model->DIOcta*(here->DIOtemp-REFTEMP)); } if (model->DIOtlevc == 0) { pboSW = (model->DIOjunctionSWPot-pbfact1)/fact1; gmaSWold = (model->DIOjunctionSWPot-pboSW)/pboSW; here->DIOtJctSWCap = here->DIOjunctionSWCap / (1+model->DIOgradingSWCoeff* (400e-6*(model->DIOnomTemp-REFTEMP)-gmaSWold) ); here->DIOtJctSWPot = pbfact+fact2*pboSW; gmaSWnew = (here->DIOtJctSWPot-pboSW)/pboSW; here->DIOtJctSWCap *= 1+model->DIOgradingSWCoeff* (400e-6*(here->DIOtemp-REFTEMP)-gmaSWnew); } else if (model->DIOtlevc == 1) { here->DIOtJctSWPot = model->DIOjunctionSWPot - model->DIOtphp*(here->DIOtemp-REFTEMP); here->DIOtJctSWCap = here->DIOjunctionSWCap * (model->DIOctp*(here->DIOtemp-REFTEMP)); } here->DIOtSatCur = model->DIOsatCur * here->DIOarea * exp( ((here->DIOtemp/model->DIOnomTemp)-1) * model->DIOactivationEnergy/(model->DIOemissionCoeff*vt) + model->DIOsaturationCurrentExp/model->DIOemissionCoeff * log(here->DIOtemp/model->DIOnomTemp) ); here->DIOtSatSWCur = model->DIOsatSWCur * here->DIOpj * exp( ((here->DIOtemp/model->DIOnomTemp)-1) * model->DIOactivationEnergy/(model->DIOswEmissionCoeff*vt) + model->DIOsaturationCurrentExp/model->DIOswEmissionCoeff * log(here->DIOtemp/model->DIOnomTemp) ); here->DIOtTunSatCur = model->DIOtunSatCur * here->DIOarea * exp( ((here->DIOtemp/model->DIOnomTemp)-1) * model->DIOtunEGcorrectionFactor*model->DIOactivationEnergy/vt + model->DIOtunSaturationCurrentExp * log(here->DIOtemp/model->DIOnomTemp) ); here->DIOtTunSatSWCur = model->DIOtunSatSWCur * here->DIOpj * exp( ((here->DIOtemp/model->DIOnomTemp)-1) * model->DIOtunEGcorrectionFactor*model->DIOactivationEnergy/vt + model->DIOtunSaturationCurrentExp * log(here->DIOtemp/model->DIOnomTemp) ); /* the defintion of f1, just recompute after temperature adjusting * all the variables used in it */ here->DIOtF1=here->DIOtJctPot* (1-exp((1-here->DIOtGradingCoeff)*xfc))/ (1-here->DIOtGradingCoeff); /* same for Depletion Capacitance */ here->DIOtDepCap=model->DIOdepletionCapCoeff* here->DIOtJctPot; /* and Vcrit */ vte=model->DIOemissionCoeff*vt; here->DIOtVcrit = vte * log(vte/(CONSTroot2*here->DIOtSatCur)); /* and now to compute the breakdown voltage, again, using * temperature adjusted basic parameters */ if (model->DIObreakdownVoltageGiven){ if (model->DIOtlev == 0) { tBreakdownVoltage = model->DIObreakdownVoltage - model->DIOtcv * dt; } else { tBreakdownVoltage = model->DIObreakdownVoltage * (1 - model->DIOtcv * dt); } if (model->DIOlevel == 1) { cbv = model->DIObreakdownCurrent; } else { /* level=3 */ cbv = model->DIObreakdownCurrent * here->DIOarea; } if (cbv < here->DIOtSatCur * tBreakdownVoltage/vt) { cbv=here->DIOtSatCur * tBreakdownVoltage/vt; #ifdef TRACE emsg = TMALLOC(char, 100); if(emsg == NULL) return(E_NOMEM); (void)sprintf(emsg, "%%s: breakdown current increased to %g to resolve", cbv); SPfrontEnd->IFerror (ERR_WARNING, emsg, &(here->DIOname)); FREE(emsg); SPfrontEnd->IFerror (ERR_WARNING, "incompatibility with specified saturation current", NULL); #endif xbv=tBreakdownVoltage; } else { tol=ckt->CKTreltol*cbv; xbv=tBreakdownVoltage-model->DIObrkdEmissionCoeff*vt*log(1+cbv/ (here->DIOtSatCur)); iter=0; for(iter=0 ; iter < 25 ; iter++) { xbv=tBreakdownVoltage-model->DIObrkdEmissionCoeff*vt*log(cbv/ (here->DIOtSatCur)+1-xbv/vt); xcbv=here->DIOtSatCur * (exp((tBreakdownVoltage-xbv)/(model->DIObrkdEmissionCoeff*vt))-1+xbv/vt); if (fabs(xcbv-cbv) <= tol) goto matched; } #ifdef TRACE emsg = TMALLOC(char, 100); if(emsg == NULL) return(E_NOMEM); (void)sprintf(emsg, "%%s: unable to match forward and reverse diode regions: bv = %g, ibv = %g", xbv,xcbv); SPfrontEnd->IFerror (ERR_WARNING, emsg, &here->DIOname); FREE(emsg); #endif } matched: here->DIOtBrkdwnV = xbv; } /* transit time temperature adjust */ factor = 1.0 + (model->DIOtranTimeTemp1 * dt) + (model->DIOtranTimeTemp2 * dt * dt); here->DIOtTransitTime = model->DIOtransitTime * factor; /* Series resistance temperature adjust */ here->DIOtConductance = model->DIOconductance; if(model->DIOresistGiven && model->DIOresist!=0.0) { factor = 1.0 + (model->DIOresistTemp1) * dt + (model->DIOresistTemp2 * dt * dt); here->DIOtConductance = model->DIOconductance / factor; } here->DIOtF2=exp((1+here->DIOtGradingCoeff)*xfc); here->DIOtF3=1-model->DIOdepletionCapCoeff* (1+here->DIOtGradingCoeff); here->DIOtF2SW=exp((1+model->DIOgradingSWCoeff)*xfcs); here->DIOtF3SW=1-model->DIOdepletionSWcapCoeff* (1+model->DIOgradingSWCoeff); } /* instance */ } /* model */ return(OK); } ngspice-26/src/spicelib/devices/dio/diosetup.c0000644000265600020320000002053312264261473021012 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ /* load the diode structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { if(!model->DIOlevelGiven) { model->DIOlevel = 1; } if(!model->DIOemissionCoeffGiven) { model->DIOemissionCoeff = 1; } if(!model->DIOsatCurGiven) { model->DIOsatCur = 1e-14; } if(!model->DIOsatSWCurGiven) { model->DIOsatSWCur = 0.0; } if(!model->DIOswEmissionCoeffGiven) { model->DIOswEmissionCoeff = 1; } if(!model->DIObreakdownCurrentGiven) { model->DIObreakdownCurrent = 1e-3; } if(!model->DIOjunctionPotGiven){ model->DIOjunctionPot = 1; } if(!model->DIOgradingCoeffGiven) { model->DIOgradingCoeff = .5; } if(!model->DIOgradCoeffTemp1Given) { model->DIOgradCoeffTemp1 = 0.0; } if(!model->DIOgradCoeffTemp2Given) { model->DIOgradCoeffTemp2 = 0.0; } if(!model->DIOdepletionCapCoeffGiven) { model->DIOdepletionCapCoeff = .5; } if(!model->DIOdepletionSWcapCoeffGiven) { model->DIOdepletionSWcapCoeff = .5; } if(!model->DIOtransitTimeGiven) { model->DIOtransitTime = 0; } if(!model->DIOtranTimeTemp1Given) { model->DIOtranTimeTemp1 = 0.0; } if(!model->DIOtranTimeTemp2Given) { model->DIOtranTimeTemp2 = 0.0; } if(!model->DIOjunctionCapGiven) { model->DIOjunctionCap = 0; } if(!model->DIOjunctionSWCapGiven) { model->DIOjunctionSWCap = 0; } if(!model->DIOjunctionSWPotGiven){ model->DIOjunctionSWPot = 1; } if(!model->DIOgradingSWCoeffGiven) { model->DIOgradingSWCoeff = .33; } if(!model->DIOforwardKneeCurrentGiven) { model->DIOforwardKneeCurrent = 0.0; } if(!model->DIOreverseKneeCurrentGiven) { model->DIOreverseKneeCurrent = 0.0; } if(!model->DIObrkdEmissionCoeffGiven) { model->DIObrkdEmissionCoeff = model->DIOemissionCoeff; } if(!model->DIOtlevGiven) { model->DIOtlev = 0; } if(!model->DIOtlevcGiven) { model->DIOtlevc = 0; } if(!model->DIOactivationEnergyGiven) { model->DIOactivationEnergy = 1.11; } if(!model->DIOsaturationCurrentExpGiven) { model->DIOsaturationCurrentExp = 3; } if(!model->DIOctaGiven) { model->DIOcta = 0.0; } if(!model->DIOctpGiven) { model->DIOctp = 0.0; } if(!model->DIOtpbGiven) { model->DIOtpb = 0.0; } if(!model->DIOtphpGiven) { model->DIOtphp = 0.0; } if(!model->DIOfNcoefGiven) { model->DIOfNcoef = 0.0; } if(!model->DIOfNexpGiven) { model->DIOfNexp = 1.0; } if(!model->DIOresistTemp1Given) { model->DIOresistTemp1 = 0.0; } if(!model->DIOresistTemp2Given) { model->DIOresistTemp2 = 0.0; } if(!model->DIOtcvGiven) { model->DIOtcv = 0.0; } if(!model->DIOareaGiven) { model->DIOarea = 1.0; } if(!model->DIOpjGiven) { model->DIOpj = 0.0; } if(!model->DIOtunSatCurGiven) { model->DIOtunSatCur = 0.0; } if(!model->DIOtunSatSWCurGiven) { model->DIOtunSatSWCur = 0.0; } if(!model->DIOtunEmissionCoeffGiven) { model->DIOtunEmissionCoeff = 30.0; } if(!model->DIOtunSaturationCurrentExpGiven) { model->DIOtunSaturationCurrentExp = 3.0; } if(!model->DIOtunEGcorrectionFactorGiven) { model->DIOtunEGcorrectionFactor = 1.0; } if(!model->DIOfv_maxGiven) { model->DIOfv_max = 1e99; } if(!model->DIObv_maxGiven) { model->DIObv_max = 1e99; } /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { if(!here->DIOareaGiven) { if((!here->DIOwGiven) && (!here->DIOlGiven)) { here->DIOarea = model->DIOarea; } else { here->DIOarea = 1; } } if(!here->DIOpjGiven) { if((!here->DIOwGiven) && (!here->DIOlGiven)) { here->DIOpj = model->DIOpj; } else { here->DIOpj = 0; } } if(!here->DIOmGiven) { here->DIOm = 1; } here->DIOarea = here->DIOarea * here->DIOm; here->DIOpj = here->DIOpj * here->DIOm; if (model->DIOlevel == 3) { if((here->DIOwGiven) && (here->DIOlGiven)) { here->DIOarea = here->DIOw * here->DIOl * here->DIOm; here->DIOpj = (2 * here->DIOw + 2 * here->DIOl) * here->DIOm; } } here->DIOforwardKneeCurrent = model->DIOforwardKneeCurrent * here->DIOarea; here->DIOreverseKneeCurrent = model->DIOreverseKneeCurrent * here->DIOarea; here->DIOjunctionCap = model->DIOjunctionCap * here->DIOarea; here->DIOjunctionSWCap = model->DIOjunctionSWCap * here->DIOpj; here->DIOstate = *states; *states += 5; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 2 * (ckt->CKTsenInfo->SENparms); } if(model->DIOresist == 0) { here->DIOposPrimeNode = here->DIOposNode; } else if(here->DIOposPrimeNode == 0) { CKTnode *tmpNode; IFuid tmpName; error = CKTmkVolt(ckt,&tmp,here->DIOname,"internal"); if(error) return(error); here->DIOposPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(DIOposPosPrimePtr,DIOposNode,DIOposPrimeNode); TSTALLOC(DIOnegPosPrimePtr,DIOnegNode,DIOposPrimeNode); TSTALLOC(DIOposPrimePosPtr,DIOposPrimeNode,DIOposNode); TSTALLOC(DIOposPrimeNegPtr,DIOposPrimeNode,DIOnegNode); TSTALLOC(DIOposPosPtr,DIOposNode,DIOposNode); TSTALLOC(DIOnegNegPtr,DIOnegNode,DIOnegNode); TSTALLOC(DIOposPrimePosPrimePtr,DIOposPrimeNode,DIOposPrimeNode); } } return(OK); } int DIOunsetup( GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model; DIOinstance *here; for (model = (DIOmodel *)inModel; model != NULL; model = model->DIOnextModel) { for (here = model->DIOinstances; here != NULL; here=here->DIOnextInstance) { if (here->DIOposPrimeNode && here->DIOposPrimeNode != here->DIOposNode) { CKTdltNNum(ckt, here->DIOposPrimeNode); here->DIOposPrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/dio/dioconv.c0000644000265600020320000000322212264261473020613 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOconvTest(GENmodel *inModel, CKTcircuit *ckt) /* Check the devices for convergence */ { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; double delvd,vd,cdhat,cd; double tol; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { /* * initialization */ vd = *(ckt->CKTrhsOld+here->DIOposPrimeNode)- *(ckt->CKTrhsOld + here->DIOnegNode); delvd=vd- *(ckt->CKTstate0 + here->DIOvoltage); cdhat= *(ckt->CKTstate0 + here->DIOcurrent) + *(ckt->CKTstate0 + here->DIOconduct) * delvd; cd= *(ckt->CKTstate0 + here->DIOcurrent); /* * check convergence */ tol=ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol; if (fabs(cdhat-cd) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* don't need to check any more device */ } } } return(OK); } ngspice-26/src/spicelib/devices/dio/dioparam.c0000644000265600020320000000351212264261473020750 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* ARGSUSED */ int DIOparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; DIOinstance *here = (DIOinstance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case DIO_AREA: here->DIOarea = value->rValue; here->DIOareaGiven = TRUE; break; case DIO_PJ: here->DIOpj = value->rValue; here->DIOpjGiven = TRUE; break; case DIO_W: here->DIOw = value->rValue * scale; here->DIOwGiven = TRUE; break; case DIO_L: here->DIOl = value->rValue * scale; here->DIOlGiven = TRUE; break; case DIO_M: here->DIOm = value->rValue; here->DIOmGiven = TRUE; break; case DIO_TEMP: here->DIOtemp = value->rValue+CONSTCtoK; here->DIOtempGiven = TRUE; break; case DIO_DTEMP: here->DIOdtemp = value->rValue; here->DIOdtempGiven = TRUE; break; case DIO_OFF: here->DIOoff = (value->iValue != 0); break; case DIO_IC: here->DIOinitCond = value->rValue; break; case DIO_AREA_SENS: here->DIOsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/dio/diodisto.c0000644000265600020320000002067312264261473021001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int DIOdisto( int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { DIOmodel *model = (DIOmodel *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; double g2,g3; double cdiff2,cdiff3; double cjunc2,cjunc3; double r1h1x,i1h1x; double r1h2x, i1h2x; double i1hm2x; double r2h11x,i2h11x; double r2h1m2x,i2h1m2x; double temp, itemp; DIOinstance *here; if (mode == D_SETUP) return(DIOdSetup(model,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the DIO models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: g2=here->id_x2; cdiff2=here->cdif_x2; cjunc2=here->cjnc_x2; /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->DIOposPrimeNode)) - *(job->r1H1ptr + (here->DIOnegNode)); i1h1x = *(job->i1H1ptr + (here->DIOposPrimeNode)) - *(job->i1H1ptr + (here->DIOnegNode)); /* formulae start here */ temp = D1n2F1(g2,r1h1x,i1h1x); itemp = D1i2F1(g2,r1h1x,i1h1x); /* the above are for the memoryless nonlinearity */ if ((cdiff2 + cjunc2) != 0.0) { temp += - ckt->CKTomega * D1i2F1 (cdiff2+cjunc2,r1h1x,i1h1x); itemp += ckt->CKTomega * D1n2F1 ((cdiff2 + cjunc2),r1h1x,i1h1x); } *(ckt->CKTrhs + (here->DIOposPrimeNode)) -= temp; *(ckt->CKTirhs + (here->DIOposPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->DIOnegNode)) += temp; *(ckt->CKTirhs + (here->DIOnegNode)) += itemp; break; case D_THRF1: g2=here->id_x2; g3=here->id_x3; cdiff2=here->cdif_x2; cdiff3=here->cdif_x3; cjunc2=here->cjnc_x2; cjunc3=here->cjnc_x3; /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->DIOposPrimeNode)) - *(job->r1H1ptr + (here->DIOnegNode)); i1h1x = *(job->i1H1ptr + (here->DIOposPrimeNode)) - *(job->i1H1ptr + (here->DIOnegNode)); /* getting second order kernel at (F1_F1) */ r2h11x = *(job->r2H11ptr + (here->DIOposPrimeNode)) - *(job->r2H11ptr + (here->DIOnegNode)); i2h11x = *(job->i2H11ptr + (here->DIOposPrimeNode)) - *(job->i2H11ptr + (here->DIOnegNode)); /* formulae start here */ temp = D1n3F1(g2,g3,r1h1x,i1h1x,r2h11x, i2h11x); itemp = D1i3F1(g2,g3,r1h1x,i1h1x,r2h11x, i2h11x); /* the above are for the memoryless nonlinearity */ /* the following are for the capacitors */ if ((cdiff2 + cjunc2) != 0.0) { temp += -ckt->CKTomega * D1i3F1 (cdiff2+cjunc2,cdiff3+cjunc3,r1h1x, i1h1x,r2h11x,i2h11x); itemp += ckt->CKTomega * D1n3F1 (cdiff2+cjunc2,cdiff3+cjunc3,r1h1x, i1h1x,r2h11x,i2h11x); } /* end of formulae */ *(ckt->CKTrhs + (here->DIOposPrimeNode)) -= temp; *(ckt->CKTirhs + (here->DIOposPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->DIOnegNode)) += temp; *(ckt->CKTirhs + (here->DIOnegNode)) += itemp; break; case D_F1PF2: g2=here->id_x2; g3=here->id_x3; cdiff2=here->cdif_x2; cdiff3=here->cdif_x3; cjunc2=here->cjnc_x2; cjunc3=here->cjnc_x3; /* getting first order (linear) Volterra kernel for F1*/ r1h1x = *(job->r1H1ptr + (here->DIOposPrimeNode)) - *(job->r1H1ptr + (here->DIOnegNode)); i1h1x = *(job->i1H1ptr + (here->DIOposPrimeNode)) - *(job->i1H1ptr + (here->DIOnegNode)); /* getting first order (linear) Volterra kernel for F2*/ r1h2x = *(job->r1H2ptr + (here->DIOposPrimeNode)) - *(job->r1H2ptr + (here->DIOnegNode)); i1h2x = *(job->i1H2ptr + (here->DIOposPrimeNode)) - *(job->i1H2ptr + (here->DIOnegNode)); /* formulae start here */ temp = D1nF12(g2,r1h1x,i1h1x,r1h2x,i1h2x); itemp = D1iF12(g2,r1h1x,i1h1x,r1h2x,i1h2x); /* the above are for the memoryless nonlinearity */ /* the following are for the capacitors */ if ((cdiff2 + cjunc2) != 0.0) { temp += - ckt->CKTomega * D1iF12 (cdiff2+cjunc2,r1h1x,i1h1x,r1h2x,i1h2x); itemp += ckt->CKTomega * D1nF12 (cdiff2+cjunc2,r1h1x,i1h1x,r1h2x,i1h2x); } /* end of formulae */ *(ckt->CKTrhs + (here->DIOposPrimeNode)) -= temp; *(ckt->CKTirhs + (here->DIOposPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->DIOnegNode)) += temp; *(ckt->CKTirhs + (here->DIOnegNode)) += itemp; break; case D_F1MF2: g2=here->id_x2; g3=here->id_x3; cdiff2=here->cdif_x2; cdiff3=here->cdif_x3; cjunc2=here->cjnc_x2; cjunc3=here->cjnc_x3; /* getting first order (linear) Volterra kernel for F1*/ r1h1x = *(job->r1H1ptr + (here->DIOposPrimeNode)) - *(job->r1H1ptr + (here->DIOnegNode)); i1h1x = *(job->i1H1ptr + (here->DIOposPrimeNode)) - *(job->i1H1ptr + (here->DIOnegNode)); /* getting first order (linear) Volterra kernel for F2*/ r1h2x = *(job->r1H2ptr + (here->DIOposPrimeNode)) - *(job->r1H2ptr + (here->DIOnegNode)); i1hm2x = -(*(job->i1H2ptr + (here->DIOposPrimeNode)) - *(job->i1H2ptr + (here->DIOnegNode))); /* formulae start here */ temp = D1nF12(g2,r1h1x,i1h1x,r1h2x,i1hm2x); itemp = D1iF12(g2,r1h1x,i1h1x,r1h2x,i1hm2x); /* the above are for the memoryless nonlinearity */ /* the following are for the capacitors */ if ((cdiff2 + cjunc2) != 0.0) { temp += - ckt->CKTomega * D1iF12 (cdiff2+cjunc2,r1h1x,i1h1x,r1h2x,i1hm2x); itemp += ckt->CKTomega * D1nF12 (cdiff2+cjunc2,r1h1x,i1h1x,r1h2x,i1hm2x); } /* end of formulae */ *(ckt->CKTrhs + (here->DIOposPrimeNode)) -= temp; *(ckt->CKTirhs + (here->DIOposPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->DIOnegNode)) += temp; *(ckt->CKTirhs + (here->DIOnegNode)) += itemp; break; case D_2F1MF2: g2=here->id_x2; g3=here->id_x3; cdiff2=here->cdif_x2; cdiff3=here->cdif_x3; cjunc2=here->cjnc_x2; cjunc3=here->cjnc_x3; /* getting first order (linear) Volterra kernel at F1*/ r1h1x = *(job->r1H1ptr + (here->DIOposPrimeNode)) - *(job->r1H1ptr + (here->DIOnegNode)); i1h1x = *(job->i1H1ptr + (here->DIOposPrimeNode)) - *(job->i1H1ptr + (here->DIOnegNode)); /* getting first order (linear) Volterra kernel at minusF2*/ r1h2x = *(job->r1H2ptr + (here->DIOposPrimeNode)) - *(job->r1H2ptr + (here->DIOnegNode)); i1hm2x = -(*(job->i1H2ptr + (here->DIOposPrimeNode)) - *(job->i1H2ptr + (here->DIOnegNode))); /* getting second order kernel at (F1_F1) */ r2h11x = *(job->r2H11ptr + (here->DIOposPrimeNode)) - *(job->r2H11ptr + (here->DIOnegNode)); i2h11x = *(job->i2H11ptr + (here->DIOposPrimeNode)) - *(job->i2H11ptr + (here->DIOnegNode)); /* getting second order kernel at (F1_minusF2) */ r2h1m2x = *(job->r2H1m2ptr + (here->DIOposPrimeNode)) - *(job->r2H1m2ptr + (here->DIOnegNode)); i2h1m2x = *(job->i2H1m2ptr + (here->DIOposPrimeNode)) - *(job->i2H1m2ptr + (here->DIOnegNode)); /* formulae start here */ temp = D1n2F12(g2,g3,r1h1x,i1h1x,r1h2x, i1hm2x,r2h11x,i2h11x, r2h1m2x,i2h1m2x); itemp = D1i2F12(g2,g3,r1h1x,i1h1x, r1h2x,i1hm2x,r2h11x,i2h11x, r2h1m2x,i2h1m2x); /* the above are for the memoryless nonlinearity */ /* the following are for the capacitors */ if ((cdiff2 + cjunc2) != 0.0) { temp += -ckt->CKTomega * D1i2F12(cdiff2+cjunc2,cdiff3+cjunc3, r1h1x,i1h1x,r1h2x,i1hm2x,r2h11x, i2h11x,r2h1m2x,i2h1m2x); itemp += ckt->CKTomega * D1n2F12(cdiff2+cjunc2,cdiff3+cjunc3, r1h1x,i1h1x,r1h2x,i1hm2x,r2h11x, i2h11x,r2h1m2x,i2h1m2x); } /* end of formulae */ *(ckt->CKTrhs + (here->DIOposPrimeNode)) -= temp; *(ckt->CKTirhs + (here->DIOposPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->DIOnegNode)) += temp; *(ckt->CKTirhs + (here->DIOnegNode)) += itemp; break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/dio/dioitf.h0000644000265600020320000000026412264261473020440 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_DIO #define DEV_DIO extern SPICEdev *get_dio_info(void); #endif ngspice-26/src/spicelib/devices/dio/diodset.c0000644000265600020320000001255612264261473020617 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified by Dietmar Warning 2003 and Paolo Nenzi 2003 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* actually load the current resistance value into the sparse matrix * previously provided - for distortion analysis */ /* * For some unknown reason the code in this fuction was based on the * spice2 diode implementation (the one with -5 nVt). I have changed * it with spice3 implementation. * * Paolo Nenzi 2003 */ int DIOdSetup(DIOmodel *model, CKTcircuit *ckt) { DIOinstance *here; double arg; double csat; /* area-scaled saturation current */ double czero; double czof2; double evd; double evrev; double gd; double sarg; double vd; /* current diode voltage */ double vt; /* K t / Q */ double vte; double g2,g3; double cdiff2,cdiff3; double cjunc1,cjunc2,cjunc3; double cd; double czeroSW; double cjunc1SW,cjunc2SW,cjunc3SW; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { /* * this routine loads diodes for dc and transient analyses. * PN 2003: High level injection is not taken into * account, since resulting equations are * very complex to deal with. * * This is an old analysis anyway.... */ csat=(here->DIOtSatCur*here->DIOarea+here->DIOtSatSWCur*here->DIOpj)*here->DIOm; vt = CONSTKoverQ * here->DIOtemp; vte=model->DIOemissionCoeff * vt; vd = *(ckt->CKTrhsOld + (here->DIOposPrimeNode)) - *(ckt->CKTrhsOld + (here->DIOnegNode)); /* * compute derivatives * Note: pn 2003 changed the code to the new spice 3 code */ if (vd >= -3*vte) { /* forward */ evd = exp(vd/vte); cd = csat*(evd-1); gd = csat*evd/vte; g2 = 0.5 * gd / vte; cdiff2 = g2 * here->DIOtTransitTime; g3 = g2 / 3 / vte; cdiff3 = g3 * here->DIOtTransitTime; gd = gd + ckt->CKTgmin; } else if((!(here->DIOtBrkdwnV))|| (vd >= -here->DIOtBrkdwnV)) { /* reverse */ arg=3*vte/(vd*CONSTe); arg = arg * arg * arg; cd = -csat * (1 + arg); gd = csat * 3 * arg / vd; g2 = -4 * gd / vd; g3 = 5 * g2 / vd; cdiff2 = cdiff3 = 0.0; gd = gd + ckt->CKTgmin; } else { /* breakdown*/ /* why using csat instead of breakdowncurrent? */ evrev=exp(-(here->DIOtBrkdwnV+vd)/vt); cd = -csat*evrev; gd = csat*evrev/vte; /* * cd = -csat*(evrev-1+here->DIOtBrkdwnV/vt); */ /* should there be a minus here above? */ gd=csat*evrev/vt; g2 = -gd/2/vt; g3 = -g2/3/vt; cdiff3 = cdiff2 = 0; } /* * junction charge storage elements */ czero=here->DIOtJctCap*here->DIOarea*here->DIOm; if (czero != 0.0) { if (vd < here->DIOtDepCap){ arg=1-vd/model->DIOjunctionPot; sarg=exp(-here->DIOtGradingCoeff*log(arg)); /* the expression for depletion charge model->DIOjunctionPot*czero* (1-arg*sarg)/(1-here->DIOtGradingCoeff); */ cjunc1 = czero*sarg; cjunc2 = cjunc1/2/model->DIOjunctionPot*here->DIOtGradingCoeff/arg; cjunc3 = cjunc2/3/model->DIOjunctionPot/arg*(here->DIOtGradingCoeff + 1); } else { czof2=czero/here->DIOtF2; /* depletion charge equation czero*here->DIOtF1+czof2* (model->DIOtF3*(vd-here->DIOtDepCap)+ (here->DIOtGradingCoeff/(model->DIOjunctionPot+ model->DIOjunctionPot))*(vd*vd-here->DIOtDepCap* here->DIOtDepCap)); */ cjunc2 = czof2/2/model->DIOjunctionPot*here->DIOtGradingCoeff; cjunc3 =0.0; } } else { cjunc1 = cjunc2 = cjunc3 = 0.0; } czeroSW=+here->DIOtJctSWCap*here->DIOpj*here->DIOm; if (czeroSW != 0.0) { if (vd < here->DIOtDepCap){ arg=1-vd/model->DIOjunctionSWPot; sarg=exp(-model->DIOgradingSWCoeff*log(arg)); cjunc1SW = czeroSW*sarg; cjunc2SW = cjunc1SW/2/model->DIOjunctionSWPot*model->DIOgradingSWCoeff/arg; cjunc3SW = cjunc2SW/3/model->DIOjunctionSWPot/arg*(model->DIOgradingSWCoeff + 1); } else { czof2=czeroSW/here->DIOtF2SW; cjunc2SW = czof2/2/model->DIOjunctionSWPot*model->DIOgradingSWCoeff; cjunc3SW = 0.0; } } else { cjunc1SW = cjunc2SW = cjunc3SW = 0.0; } /* * store small-signal parameters */ here->id_x2 = g2; here->id_x3 = g3; here->cdif_x2 = cdiff2; here->cdif_x3 = cdiff3; here->cjnc_x2 = cjunc2+cjunc2SW; here->cjnc_x3 = cjunc3+cjunc3SW; } } return(OK); } ngspice-26/src/spicelib/devices/dio/diodefs.h0000644000265600020320000003346712264261473020612 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ #ifndef DIO #define DIO #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* data structures used to describe diodes */ /* information needed per instance */ typedef struct sDIOinstance { struct sDIOmodel *DIOmodPtr; /* backpointer to model */ struct sDIOinstance *DIOnextInstance; /* pointer to next instance of * current model*/ IFuid DIOname; /* pointer to character string naming this instance */ int DIOstate; /* pointer to start of state vector for diode */ int DIOposNode; /* number of positive node of diode */ int DIOnegNode; /* number of negative node of diode */ int DIOposPrimeNode; /* number of positive prime node of diode */ double *DIOposPosPrimePtr; /* pointer to sparse matrix at * (positive,positive prime) */ double *DIOnegPosPrimePtr; /* pointer to sparse matrix at * (negative,positive prime) */ double *DIOposPrimePosPtr; /* pointer to sparse matrix at * (positive prime,positive) */ double *DIOposPrimeNegPtr; /* pointer to sparse matrix at * (positive prime,negative) */ double *DIOposPosPtr; /* pointer to sparse matrix at * (positive,positive) */ double *DIOnegNegPtr; /* pointer to sparse matrix at * (negative,negative) */ double *DIOposPrimePosPrimePtr; /* pointer to sparse matrix at * (positive prime,positive prime) */ double DIOcap; /* stores the diode capacitance */ double *DIOsens; /* stores the perturbed values of geq and ceq in ac sensitivity analyis */ int DIOsenParmNo ; /* parameter # for sensitivity use; * set equal to 0 if not a design parameter*/ unsigned DIOoff : 1; /* 'off' flag for diode */ unsigned DIOareaGiven : 1; /* flag to indicate area was specified */ unsigned DIOpjGiven : 1; /* flag to indicate perimeter was specified */ unsigned DIOwGiven : 1; /* flag to indicate width was specified */ unsigned DIOlGiven : 1; /* flag to indicate length was specified */ unsigned DIOmGiven : 1; /* flag to indicate multiplier was specified */ unsigned DIOinitCondGiven : 1; /* flag to indicate ic was specified */ unsigned DIOsenPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ unsigned DIOtempGiven : 1; /* flag to indicate temperature was specified */ unsigned DIOdtempGiven : 1; /* flag to indicate dtemp given */ double DIOarea; /* area factor for the diode */ double DIOpj; /* perimeter for the diode */ double DIOw; /* width for the diode */ double DIOl; /* length for the diode */ double DIOm; /* multiplier for the diode */ double DIOinitCond; /* initial condition */ double DIOtemp; /* temperature of the instance */ double DIOdtemp; /* delta temperature of instance */ double DIOtJctPot; /* temperature adjusted junction potential */ double DIOtJctCap; /* temperature adjusted junction capacitance */ double DIOtJctSWPot; /* temperature adjusted sidewall junction potential */ double DIOtJctSWCap; /* temperature adjusted sidewall junction capacitance */ double DIOtTransitTime; /* temperature adjusted transit time */ double DIOtGradingCoeff; /* temperature adjusted grading coefficient (MJ) */ double DIOtConductance; /* temperature adjusted series conductance */ double DIOtDepCap; /* temperature adjusted transition point in */ /* the curve matching (Fc * Vj ) */ double DIOtSatCur; /* temperature adjusted saturation current */ double DIOtSatSWCur; /* temperature adjusted side wall saturation current */ double DIOtTunSatCur; /* tunneling saturation current */ double DIOtTunSatSWCur; /* sidewall tunneling saturation current */ double DIOtVcrit; /* temperature adjusted V crit */ double DIOtF1; /* temperature adjusted f1 */ double DIOtBrkdwnV; /* temperature adjusted breakdown voltage */ double DIOtF2; /* coeff. for capacitance equation precomputation */ double DIOtF3; /* coeff. for capacitance equation precomputation */ double DIOtF2SW; /* coeff. for capacitance equation precomputation */ double DIOtF3SW; /* coeff. for capacitance equation precomputation */ double DIOforwardKneeCurrent; /* Forward Knee current */ double DIOreverseKneeCurrent; /* Reverse Knee current */ double DIOjunctionCap; /* geometry adjusted junction capacitance */ double DIOjunctionSWCap; /* geometry adjusted junction sidewall capacitance */ /* * naming convention: * x = vdiode */ /* the following are relevant to s.s. sinusoidal distortion analysis */ #define DIONDCOEFFS 6 #ifndef NODISTO double DIOdCoeffs[DIONDCOEFFS]; #else /* NODISTO */ double *DIOdCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define id_x2 DIOdCoeffs[0] #define id_x3 DIOdCoeffs[1] #define cdif_x2 DIOdCoeffs[2] #define cdif_x3 DIOdCoeffs[3] #define cjnc_x2 DIOdCoeffs[4] #define cjnc_x3 DIOdCoeffs[5] #endif /* indices to array of diode noise sources */ #define DIORSNOIZ 0 #define DIOIDNOIZ 1 #define DIOFLNOIZ 2 #define DIOTOTNOIZ 3 #define DIONSRCS 4 #ifndef NONOISE double DIOnVar[NSTATVARS][DIONSRCS]; #else /* NONOISE */ double **DIOnVar; #endif /* NONOISE */ } DIOinstance ; #define DIOsenGeq DIOsens /* stores the perturbed values of geq */ #define DIOsenCeq DIOsens + 3 /* stores the perturbed values of ceq */ #define DIOdphidp DIOsens + 6 #define DIOvoltage DIOstate #define DIOcurrent DIOstate+1 #define DIOconduct DIOstate+2 #define DIOcapCharge DIOstate+3 #define DIOcapCurrent DIOstate+4 #define DIOsensxp DIOstate+5 /* charge sensitivities and their derivatives. * +6 for the derivatives - pointer to the * beginning of the array */ /* per model data */ typedef struct sDIOmodel { /* model structure for a diode */ int DIOmodType; /* type index of this device type */ struct sDIOmodel *DIOnextModel; /* pointer to next possible model in * linked list */ DIOinstance * DIOinstances; /* pointer to list of instances * that have this model */ IFuid DIOmodName; /* pointer to character string naming this model */ unsigned DIOlevelGiven : 1; unsigned DIOsatCurGiven : 1; unsigned DIOsatSWCurGiven : 1; unsigned DIOresistGiven : 1; unsigned DIOresistTemp1Given : 1; unsigned DIOresistTemp2Given : 1; unsigned DIOemissionCoeffGiven : 1; unsigned DIOswEmissionCoeffGiven : 1; unsigned DIObrkdEmissionCoeffGiven : 1; unsigned DIOtransitTimeGiven : 1; unsigned DIOtranTimeTemp1Given : 1; unsigned DIOtranTimeTemp2Given : 1; unsigned DIOjunctionCapGiven : 1; unsigned DIOjunctionPotGiven : 1; unsigned DIOgradingCoeffGiven : 1; unsigned DIOgradCoeffTemp1Given : 1; unsigned DIOgradCoeffTemp2Given : 1; unsigned DIOjunctionSWCapGiven : 1; unsigned DIOjunctionSWPotGiven : 1; unsigned DIOgradingSWCoeffGiven : 1; unsigned DIOforwardKneeCurrentGiven : 1; unsigned DIOreverseKneeCurrentGiven : 1; unsigned DIOtlevGiven : 1; unsigned DIOtlevcGiven : 1; unsigned DIOactivationEnergyGiven : 1; unsigned DIOsaturationCurrentExpGiven : 1; unsigned DIOctaGiven : 1; unsigned DIOctpGiven : 1; unsigned DIOtpbGiven : 1; unsigned DIOtphpGiven : 1; unsigned DIOdepletionCapCoeffGiven : 1; unsigned DIOdepletionSWcapCoeffGiven :1; unsigned DIObreakdownVoltageGiven : 1; unsigned DIObreakdownCurrentGiven : 1; unsigned DIOtcvGiven : 1; unsigned DIOnomTempGiven : 1; unsigned DIOfNcoefGiven : 1; unsigned DIOfNexpGiven : 1; unsigned DIOareaGiven : 1; unsigned DIOpjGiven : 1; unsigned DIOtunSatCurGiven : 1; unsigned DIOtunSatSWCurGiven : 1; unsigned DIOtunEmissionCoeffGiven : 1; unsigned DIOtunSaturationCurrentExpGiven : 1; unsigned DIOtunEGcorrectionFactorGiven : 1; unsigned DIOfv_maxGiven : 1; unsigned DIObv_maxGiven : 1; int DIOlevel; /* level selector */ double DIOsatCur; /* saturation current */ double DIOsatSWCur; /* Sidewall saturation current */ double DIOresist; /* ohmic series resistance */ double DIOresistTemp1; /* series resistance 1st order temp. coeff. */ double DIOresistTemp2; /* series resistance 2nd order temp. coeff. */ double DIOconductance; /* conductance corresponding to ohmic R */ double DIOemissionCoeff; /* emission coefficient (N) */ double DIOswEmissionCoeff; /* Sidewall emission coefficient (NS) */ double DIObrkdEmissionCoeff; /* Breakdown emission coefficient (NBV) */ double DIOtransitTime; /* transit time (TT) */ double DIOtranTimeTemp1; /* transit time 1st order coefficient */ double DIOtranTimeTemp2; /* transit time 2nd order coefficient */ double DIOjunctionCap; /* Junction Capacitance (Cj0) */ double DIOjunctionPot; /* Junction Potential (Vj) or (PB) */ double DIOgradingCoeff; /* grading coefficient (m) or (mj) */ double DIOgradCoeffTemp1; /* grading coefficient 1st order temp. coeff.*/ double DIOgradCoeffTemp2; /* grading coefficient 2nd order temp. coeff.*/ double DIOjunctionSWCap; /* Sidewall Junction Capacitance (Cjsw) */ double DIOjunctionSWPot; /* Sidewall Junction Potential (Vjsw) or (PBSW) */ double DIOgradingSWCoeff; /* Sidewall grading coefficient (mjsw) */ double DIOforwardKneeCurrent; /* Forward Knee current (IKF) */ double DIOreverseKneeCurrent; /* Reverse Knee current (IKR) */ int DIOtlev; /* Diode temperature equation selector */ int DIOtlevc; /* Diode temperature equation selector */ double DIOactivationEnergy; /* activation energy (EG) */ double DIOsaturationCurrentExp; /* Saturation current exponential (XTI) */ double DIOcta; /* Area junction temperature coefficient */ double DIOctp; /* Perimeter junction temperature coefficient */ double DIOtpb; /* Area junction potential temperature coefficient */ double DIOtphp; /* Perimeter junction potential temperature coefficient */ double DIOdepletionCapCoeff; /* Depletion Cap fraction coefficient (FC)*/ double DIOdepletionSWcapCoeff; /* Depletion sw-Cap fraction coefficient (FCS)*/ double DIObreakdownVoltage; /* Voltage at reverse breakdown */ double DIObreakdownCurrent; /* Current at above voltage */ double DIOtcv; /* Reverse breakdown voltage temperature coefficient */ double DIOarea; /* area factor for the diode */ double DIOpj; /* perimeter for the diode */ double DIOnomTemp; /* nominal temperature at which parms measured */ double DIOfNcoef; double DIOfNexp; double DIOtunSatCur; /* tunneling saturation current (JTUN) */ double DIOtunSatSWCur; /* sidewall tunneling saturation current (JTUNSW) */ double DIOtunEmissionCoeff; /* tunneling emission coefficient (NTUN) */ double DIOtunSaturationCurrentExp; /* exponent for the tunneling current temperature (XTITUN) */ double DIOtunEGcorrectionFactor; /* EG correction factor for tunneling (KEG) */ double DIOfv_max; /* maximum voltage in forward direction */ double DIObv_max; /* maximum voltage in reverse direction */ } DIOmodel; /* device parameters */ #define DIO_AREA 1 #define DIO_IC 2 #define DIO_OFF 3 #define DIO_CURRENT 4 #define DIO_VOLTAGE 5 #define DIO_CHARGE 6 #define DIO_CAPCUR 7 #define DIO_CONDUCT 8 #define DIO_AREA_SENS 9 #define DIO_POWER 10 #define DIO_TEMP 11 #define DIO_QUEST_SENS_REAL 12 #define DIO_QUEST_SENS_IMAG 13 #define DIO_QUEST_SENS_MAG 14 #define DIO_QUEST_SENS_PH 15 #define DIO_QUEST_SENS_CPLX 16 #define DIO_QUEST_SENS_DC 17 #define DIO_CAP 18 #define DIO_PJ 19 #define DIO_W 20 #define DIO_L 21 #define DIO_M 22 #define DIO_DTEMP 23 /* model parameters */ #define DIO_MOD_LEVEL 100 #define DIO_MOD_IS 101 #define DIO_MOD_RS 102 #define DIO_MOD_N 103 #define DIO_MOD_TT 104 #define DIO_MOD_CJO 105 #define DIO_MOD_VJ 106 #define DIO_MOD_M 107 #define DIO_MOD_EG 108 #define DIO_MOD_XTI 109 #define DIO_MOD_FC 110 #define DIO_MOD_BV 111 #define DIO_MOD_IBV 112 #define DIO_MOD_D 113 #define DIO_MOD_COND 114 #define DIO_MOD_TNOM 115 #define DIO_MOD_KF 116 #define DIO_MOD_AF 117 #define DIO_MOD_JSW 118 #define DIO_MOD_CJSW 119 #define DIO_MOD_VJSW 120 #define DIO_MOD_MJSW 121 #define DIO_MOD_IKF 122 #define DIO_MOD_IKR 123 #define DIO_MOD_FCS 124 #define DIO_MOD_TTT1 125 #define DIO_MOD_TTT2 126 #define DIO_MOD_TM1 127 #define DIO_MOD_TM2 128 #define DIO_MOD_TRS 129 #define DIO_MOD_TRS2 130 #define DIO_MOD_TLEV 131 #define DIO_MOD_TLEVC 132 #define DIO_MOD_CTA 133 #define DIO_MOD_CTP 134 #define DIO_MOD_TPB 135 #define DIO_MOD_TPHP 136 #define DIO_MOD_TCV 137 #define DIO_MOD_NBV 138 #define DIO_MOD_AREA 139 #define DIO_MOD_PJ 140 #define DIO_MOD_NS 141 #define DIO_MOD_JTUN 142 #define DIO_MOD_JTUNSW 143 #define DIO_MOD_NTUN 144 #define DIO_MOD_XTITUN 145 #define DIO_MOD_KEG 146 #define DIO_MOD_FV_MAX 147 #define DIO_MOD_BV_MAX 148 #include "dioext.h" #endif /*DIO*/ ngspice-26/src/spicelib/devices/dio/dioinit.c0000644000265600020320000000413512264261473020615 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "dioitf.h" #include "dioinit.h" SPICEdev DIOinfo = { { "Diode", "Junction Diode model", &DIOnSize, &DIOnSize, DIOnames, &DIOpTSize, DIOpTable, &DIOmPTSize, DIOmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ DIOparam, /* DEVmodParam */ DIOmParam, /* DEVload */ DIOload, /* DEVsetup */ DIOsetup, /* DEVunsetup */ DIOunsetup, /* DEVpzSetup */ DIOsetup, /* DEVtemperature*/ DIOtemp, /* DEVtrunc */ DIOtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ DIOacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ DIOdestroy, /* DEVmodDelete */ DIOmDelete, /* DEVdelete */ DIOdelete, /* DEVsetic */ DIOgetic, /* DEVask */ DIOask, /* DEVmodAsk */ DIOmAsk, /* DEVpzLoad */ DIOpzLoad, /* DEVconvTest */ DIOconvTest, /* DEVsenSetup */ DIOsSetup, /* DEVsenLoad */ DIOsLoad, /* DEVsenUpdate */ DIOsUpdate, /* DEVsenAcLoad */ DIOsAcLoad, /* DEVsenPrint */ DIOsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ DIOdisto, /* DEVnoise */ DIOnoise, /* DEVsoaCheck */ DIOsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &DIOiSize, /* DEVmodSize */ &DIOmSize }; SPICEdev * get_dio_info(void) { return &DIOinfo; } ngspice-26/src/spicelib/devices/dio/diosupd.c0000644000265600020320000000464512264261473020633 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* update the charge sensitivities and their derivatives */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOsUpdate(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; int iparmno; double sposprm; double sneg; double sxp; double dummy1; double dummy2; SENstruct *info; info = ckt->CKTsenInfo; if(ckt->CKTtime == 0) return(OK); dummy1=0; dummy2=0; #ifdef SENSDEBUG printf("DIOsenUpdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %.5e\n",ckt->CKTorder); #endif /* SENSDEBUG */ /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { #ifdef SENSDEBUG printf("capd = %.7e \n",here->DIOcap); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sposprm = *(info->SEN_Sap[here->DIOposPrimeNode] + iparmno); sneg = *(info->SEN_Sap[here->DIOnegNode] + iparmno); sxp = (sposprm - sneg) * here->DIOcap; if(iparmno == here->DIOsenParmNo) sxp += *(here->DIOdphidp); *(ckt->CKTstate0 + here->DIOsensxp + 2 * (iparmno - 1)) = sxp; NIintegrate(ckt,&dummy1,&dummy2,here->DIOcap, (here->DIOsensxp + 2 * (iparmno -1 ))); if(ckt->CKTmode & MODEINITTRAN){ *(ckt->CKTstate1 + here->DIOsensxp + 2*(iparmno - 1)) = sxp; *(ckt->CKTstate1 + here->DIOsensxp + 2*(iparmno - 1)+1) = 0; } #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sposprm = %.7e,sneg = %.7e\n",sposprm,sneg); printf("sxp = %.7e,sdotxp = %.7e\n", sxp,*(ckt->CKTstate0 + here->DIOsensxp + 2*(iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } return(OK); } ngspice-26/src/spicelib/devices/dio/diopzld.c0000644000265600020320000000315712264261473020626 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Dietmar Warning 2003 **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "diodefs.h" #include "ngspice/suffix.h" int DIOpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { DIOmodel *model = (DIOmodel*)inModel; double gspr; double geq; double xceq; DIOinstance *here; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { gspr=here->DIOtConductance*here->DIOarea; geq= *(ckt->CKTstate0 + here->DIOconduct); xceq= *(ckt->CKTstate0 + here->DIOcapCurrent); *(here->DIOposPosPtr ) += gspr; *(here->DIOnegNegPtr ) += geq + xceq * s->real; *(here->DIOnegNegPtr +1 ) += xceq * s->imag; *(here->DIOposPrimePosPrimePtr ) += geq + gspr + xceq * s->real; *(here->DIOposPrimePosPrimePtr +1 ) += xceq * s->imag; *(here->DIOposPosPrimePtr ) -= gspr; *(here->DIOnegPosPrimePtr ) -= geq + xceq * s->real; *(here->DIOnegPosPrimePtr +1 ) -= xceq * s->imag; *(here->DIOposPrimePosPtr ) -= gspr; *(here->DIOposPrimeNegPtr ) -= geq + xceq * s->real; *(here->DIOposPrimeNegPtr +1 ) -= xceq * s->imag; } } return(OK); } ngspice-26/src/spicelib/devices/dio/dioacld.c0000644000265600020320000000274612264261473020563 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Dietmar Warning 2003 **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOacLoad(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; double gspr; double geq; double xceq; DIOinstance *here; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { gspr=here->DIOtConductance*here->DIOarea; geq= *(ckt->CKTstate0 + here->DIOconduct); xceq= *(ckt->CKTstate0 + here->DIOcapCurrent) * ckt->CKTomega; *(here->DIOposPosPtr ) += gspr; *(here->DIOnegNegPtr ) += geq; *(here->DIOnegNegPtr +1 ) += xceq; *(here->DIOposPrimePosPrimePtr ) += geq+gspr; *(here->DIOposPrimePosPrimePtr +1 ) += xceq; *(here->DIOposPosPrimePtr ) -= gspr; *(here->DIOnegPosPrimePtr ) -= geq; *(here->DIOnegPosPrimePtr +1 ) -= xceq; *(here->DIOposPrimePosPtr ) -= gspr; *(here->DIOposPrimeNegPtr ) -= geq; *(here->DIOposPrimeNegPtr +1 ) -= xceq; } } return(OK); } ngspice-26/src/spicelib/devices/dio/diodel.c0000644000265600020320000000154012264261473020413 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance **fast = (DIOinstance**)kill; DIOinstance **prev = NULL; DIOinstance *here; for( ; model ; model = model->DIOnextModel) { prev = &(model->DIOinstances); for(here = *prev; here ; here = *prev) { if(here->DIOname == name || (fast && here==*fast) ) { *prev= here->DIOnextInstance; FREE(here); return(OK); } prev = &(here->DIOnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/dio/Makefile.am0000644000265600020320000000115212264261473021042 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libdio.la libdio_la_SOURCES = \ dio.c \ dioacld.c \ dioask.c \ dioconv.c \ diodefs.h \ diodel.c \ diodest.c \ diodisto.c \ diodset.c \ dioext.h \ diogetic.c \ dioinit.c \ dioinit.h \ dioitf.h \ dioload.c \ diomask.c \ diomdel.c \ diompar.c \ dionoise.c \ dioparam.c \ diopzld.c \ diosacl.c \ diosetup.c \ diosload.c \ diosoachk.c \ diosprt.c \ diosset.c \ diosupd.c \ diotemp.c \ diotrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/dio/diotrunc.c0000644000265600020320000000117612264261473021007 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; for( ; model != NULL; model = model->DIOnextModel) { for(here=model->DIOinstances;here!=NULL;here = here->DIOnextInstance){ CKTterr(here->DIOcapCharge,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/dio/Makefile.in0000644000265600020320000004442212264261536021062 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/dio DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdio_la_LIBADD = am_libdio_la_OBJECTS = dio.lo dioacld.lo dioask.lo dioconv.lo \ diodel.lo diodest.lo diodisto.lo diodset.lo diogetic.lo \ dioinit.lo dioload.lo diomask.lo diomdel.lo diompar.lo \ dionoise.lo dioparam.lo diopzld.lo diosacl.lo diosetup.lo \ diosload.lo diosoachk.lo diosprt.lo diosset.lo diosupd.lo \ diotemp.lo diotrunc.lo libdio_la_OBJECTS = $(am_libdio_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libdio_la_SOURCES) DIST_SOURCES = $(libdio_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libdio.la libdio_la_SOURCES = \ dio.c \ dioacld.c \ dioask.c \ dioconv.c \ diodefs.h \ diodel.c \ diodest.c \ diodisto.c \ diodset.c \ dioext.h \ diogetic.c \ dioinit.c \ dioinit.h \ dioitf.h \ dioload.c \ diomask.c \ diomdel.c \ diompar.c \ dionoise.c \ dioparam.c \ diopzld.c \ diosacl.c \ diosetup.c \ diosload.c \ diosoachk.c \ diosprt.c \ diosset.c \ diosupd.c \ diotemp.c \ diotrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/dio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/dio/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdio.la: $(libdio_la_OBJECTS) $(libdio_la_DEPENDENCIES) $(EXTRA_libdio_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdio_la_OBJECTS) $(libdio_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diodel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diodest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diodisto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diodset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diogetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diomask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diomdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diompar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dionoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dioparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diopzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diosupd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diotemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/diotrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/dio/diogetic.c0000644000265600020320000000160212264261473020741 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOgetic(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->DIOnextModel) { for(here = model->DIOinstances; here ; here = here->DIOnextInstance) { if(!here->DIOinitCondGiven) { here->DIOinitCond = *(ckt->CKTrhs + here->DIOposNode) - *(ckt->CKTrhs + here->DIOnegNode); } } } return(OK); } ngspice-26/src/spicelib/devices/dio/dioload.c0000644000265600020320000003645212264261473020600 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; double arg; double argsw; double capd; double cd; double cdeq; double cdhat; double ceq; double csat; /* area-scaled saturation current */ double csatsw; /* perimeter-scaled saturation current */ double czero; double czof2; double argSW; double czeroSW; double czof2SW; double sargSW; double sqrt_ikr; double sqrt_ikf; double ikf_area_m; double ikr_area_m; double delvd; /* change in diode voltage temporary */ double evd; double evrev; double gd; double geq; double gspr; /* area-scaled conductance */ double sarg; #ifndef NOBYPASS double tol; /* temporary for tolerence calculations */ #endif double vd; /* current diode voltage */ double vdtemp; double vt; /* K t / Q */ double vte, vtesw, vtetun; double vtebrk; int Check; int error; int SenCond=0; /* sensitivity condition */ /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { /* * this routine loads diodes for dc and transient analyses. */ if(ckt->CKTsenInfo){ if((ckt->CKTsenInfo->SENstatus == PERTURBATION) && (here->DIOsenPertFlag == OFF))continue; SenCond = here->DIOsenPertFlag; #ifdef SENSDEBUG printf("DIOload \n"); #endif /* SENSDEBUG */ } cd = 0.0; gd = 0.0; csat = here->DIOtSatCur; csatsw = here->DIOtSatSWCur; gspr = here->DIOtConductance * here->DIOarea; vt = CONSTKoverQ * here->DIOtemp; vte = model->DIOemissionCoeff * vt; vtebrk = model->DIObrkdEmissionCoeff * vt; /* * initialization */ if(SenCond){ #ifdef SENSDEBUG printf("DIOsenPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN)&& (ckt->CKTmode & MODEINITTRAN)) { vd = *(ckt->CKTstate1 + here->DIOvoltage); } else{ vd = *(ckt->CKTstate0 + here->DIOvoltage); } #ifdef SENSDEBUG printf("vd = %.7e \n",vd); #endif /* SENSDEBUG */ goto next1; } Check=1; if(ckt->CKTmode & MODEINITSMSIG) { vd= *(ckt->CKTstate0 + here->DIOvoltage); } else if (ckt->CKTmode & MODEINITTRAN) { vd= *(ckt->CKTstate1 + here->DIOvoltage); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vd=here->DIOinitCond; } else if ( (ckt->CKTmode & MODEINITJCT) && here->DIOoff) { vd=0; } else if ( ckt->CKTmode & MODEINITJCT) { vd=here->DIOtVcrit; } else if ( ckt->CKTmode & MODEINITFIX && here->DIOoff) { vd=0; } else { #ifndef PREDICTOR if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + here->DIOvoltage) = *(ckt->CKTstate1 + here->DIOvoltage); vd = DEVpred(ckt,here->DIOvoltage); *(ckt->CKTstate0 + here->DIOcurrent) = *(ckt->CKTstate1 + here->DIOcurrent); *(ckt->CKTstate0 + here->DIOconduct) = *(ckt->CKTstate1 + here->DIOconduct); } else { #endif /* PREDICTOR */ vd = *(ckt->CKTrhsOld+here->DIOposPrimeNode)- *(ckt->CKTrhsOld + here->DIOnegNode); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvd=vd- *(ckt->CKTstate0 + here->DIOvoltage); cdhat= *(ckt->CKTstate0 + here->DIOcurrent) + *(ckt->CKTstate0 + here->DIOconduct) * delvd; /* * bypass if solution has not changed */ #ifndef NOBYPASS if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) { tol=ckt->CKTvoltTol + ckt->CKTreltol* MAX(fabs(vd),fabs(*(ckt->CKTstate0 +here->DIOvoltage))); if (fabs(delvd) < tol){ tol=ckt->CKTreltol* MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->DIOcurrent)))+ ckt->CKTabstol; if (fabs(cdhat- *(ckt->CKTstate0 + here->DIOcurrent)) < tol) { vd= *(ckt->CKTstate0 + here->DIOvoltage); cd= *(ckt->CKTstate0 + here->DIOcurrent); gd= *(ckt->CKTstate0 + here->DIOconduct); goto load; } } } #endif /* NOBYPASS */ /* * limit new junction voltage */ if ( (model->DIObreakdownVoltageGiven) && (vd < MIN(0,-here->DIOtBrkdwnV+10*vtebrk))) { vdtemp = -(vd+here->DIOtBrkdwnV); vdtemp = DEVpnjlim(vdtemp, -(*(ckt->CKTstate0 + here->DIOvoltage) + here->DIOtBrkdwnV),vtebrk, here->DIOtVcrit,&Check); vd = -(vdtemp+here->DIOtBrkdwnV); } else { vd = DEVpnjlim(vd,*(ckt->CKTstate0 + here->DIOvoltage), vte,here->DIOtVcrit,&Check); } } /* * compute dc current and derivitives */ next1: if (model->DIOsatSWCurGiven) { /* sidewall current */ if (model->DIOswEmissionCoeffGiven) { /* current with own characteristic */ vtesw = model->DIOswEmissionCoeff * vt; if (vd >= -3*vtesw) { /* forward */ evd = exp(vd/vtesw); cd = csatsw*(evd-1); gd = csatsw*evd/vtesw; } else if((!(model->DIObreakdownVoltageGiven)) || vd >= -here->DIOtBrkdwnV) { /* reverse */ argsw = 3*vtesw/(vd*CONSTe); argsw = argsw * argsw * argsw; cd = -csatsw*(1+argsw); gd = csatsw*3*argsw/vd; } else { /* breakdown */ evrev = exp(-(here->DIOtBrkdwnV+vd)/vtebrk); cd = -csatsw*evrev; gd = csatsw*evrev/vtebrk; } } else { /* merge saturation currents and use same characteristic as bottom diode */ csat = csat + csatsw; } } if (vd >= -3*vte) { /* bottom current forward */ evd = exp(vd/vte); cd = cd + csat*(evd-1); gd = gd + csat*evd/vte; } else if((!(model->DIObreakdownVoltageGiven)) || vd >= -here->DIOtBrkdwnV) { /* reverse */ arg = 3*vte/(vd*CONSTe); arg = arg * arg * arg; cd = cd - csat*(1+arg); gd = gd + csat*3*arg/vd; } else { /* breakdown */ evrev = exp(-(here->DIOtBrkdwnV+vd)/vtebrk); cd = cd - csat*evrev; gd = gd + csat*evrev/vtebrk; } if (model->DIOtunSatSWCurGiven) { /* tunnel sidewall current */ vtetun = model->DIOtunEmissionCoeff * vt; evd = exp(-vd/vtetun); cd = cd - here->DIOtTunSatSWCur * (evd - 1); gd = gd + here->DIOtTunSatSWCur * evd / vtetun; } if (model->DIOtunSatCurGiven) { /* tunnel bottom current */ vtetun = model->DIOtunEmissionCoeff * vt; evd = exp(-vd/vtetun); cd = cd - here->DIOtTunSatCur * (evd - 1); gd = gd + here->DIOtTunSatCur * evd / vtetun; } if (vd >= -3*vte) { /* limit forward */ if( (model->DIOforwardKneeCurrent > 0.0) && (cd > 1.0e-18) ) { ikf_area_m = here->DIOforwardKneeCurrent; sqrt_ikf = sqrt(cd/ikf_area_m); gd = ((1+sqrt_ikf)*gd - cd*gd/(2*sqrt_ikf*ikf_area_m))/(1+2*sqrt_ikf + cd/ikf_area_m) + ckt->CKTgmin; cd = cd/(1+sqrt_ikf) + ckt->CKTgmin*vd; } else { gd = gd + ckt->CKTgmin; cd = cd + ckt->CKTgmin*vd; } } else { /* limit reverse */ if( (model->DIOreverseKneeCurrent > 0.0) && (cd < -1.0e-18) ) { ikr_area_m = here->DIOreverseKneeCurrent; sqrt_ikr = sqrt(cd/(-ikr_area_m)); gd = ((1+sqrt_ikr)*gd + cd*gd/(2*sqrt_ikr*ikr_area_m))/(1+2*sqrt_ikr - cd/ikr_area_m) + ckt->CKTgmin; cd = cd/(1+sqrt_ikr) + ckt->CKTgmin*vd; } else { gd = gd + ckt->CKTgmin; cd = cd + ckt->CKTgmin*vd; } } if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { /* * charge storage elements */ czero=here->DIOtJctCap; czeroSW=here->DIOtJctSWCap; if (vd < here->DIOtDepCap){ arg=1-vd/here->DIOtJctPot; argSW=1-vd/here->DIOtJctSWPot; sarg=exp(-here->DIOtGradingCoeff*log(arg)); sargSW=exp(-model->DIOgradingSWCoeff*log(argSW)); *(ckt->CKTstate0 + here->DIOcapCharge) = here->DIOtTransitTime*cd+ here->DIOtJctPot*czero*(1-arg*sarg)/(1-here->DIOtGradingCoeff)+ here->DIOtJctSWPot*czeroSW*(1-argSW*sargSW)/(1-model->DIOgradingSWCoeff); capd=here->DIOtTransitTime*gd+czero*sarg+czeroSW*sargSW; } else { czof2=czero/here->DIOtF2; czof2SW=czeroSW/here->DIOtF2SW; *(ckt->CKTstate0 + here->DIOcapCharge) = here->DIOtTransitTime*cd+czero*here->DIOtF1+ czof2*(here->DIOtF3*(vd-here->DIOtDepCap)+(here->DIOtGradingCoeff/(here->DIOtJctPot+here->DIOtJctPot))*(vd*vd-here->DIOtDepCap*here->DIOtDepCap))+ czof2SW*(here->DIOtF3SW*(vd-here->DIOtDepCap)+(model->DIOgradingSWCoeff/(here->DIOtJctSWPot+here->DIOtJctSWPot))*(vd*vd-here->DIOtDepCap*here->DIOtDepCap)); capd=here->DIOtTransitTime*gd+ czof2*(here->DIOtF3+here->DIOtGradingCoeff*vd/here->DIOtJctPot)+ czof2SW*(here->DIOtF3SW+model->DIOgradingSWCoeff*vd/here->DIOtJctSWPot); } here->DIOcap = capd; /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if (ckt->CKTmode & MODEINITSMSIG){ *(ckt->CKTstate0 + here->DIOcapCurrent) = capd; if(SenCond){ *(ckt->CKTstate0 + here->DIOcurrent) = cd; *(ckt->CKTstate0 + here->DIOconduct) = gd; #ifdef SENSDEBUG printf("storing small signal parameters\n"); printf("cd = %.7e,vd = %.7e\n",cd,vd); printf("capd = %.7e ,gd = %.7e \n",capd,gd); #endif /* SENSDEBUG */ } continue; } /* * transient analysis */ if(SenCond && (ckt->CKTsenInfo->SENmode == TRANSEN)){ *(ckt->CKTstate0 + here->DIOcurrent) = cd; #ifdef SENSDEBUG printf("storing parameters for transient sensitivity\n" ); printf("qd = %.7e, capd = %.7e,cd = %.7e\n", *(ckt->CKTstate0 + here->DIOcapCharge),capd,cd); #endif /* SENSDEBUG */ continue; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->DIOcapCharge) = *(ckt->CKTstate0 + here->DIOcapCharge); } error = NIintegrate(ckt,&geq,&ceq,capd,here->DIOcapCharge); if(error) return(error); gd=gd+geq; cd=cd+*(ckt->CKTstate0 + here->DIOcapCurrent); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->DIOcapCurrent) = *(ckt->CKTstate0 + here->DIOcapCurrent); } } } if(SenCond) goto next2; /* * check convergence */ if ( (!(ckt->CKTmode & MODEINITFIX)) || (!(here->DIOoff)) ) { if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } next2: *(ckt->CKTstate0 + here->DIOvoltage) = vd; *(ckt->CKTstate0 + here->DIOcurrent) = cd; *(ckt->CKTstate0 + here->DIOconduct) = gd; if(SenCond) continue; #ifndef NOBYPASS load: #endif /* * load current vector */ cdeq=cd-gd*vd; *(ckt->CKTrhs + here->DIOnegNode) += cdeq; *(ckt->CKTrhs + here->DIOposPrimeNode) -= cdeq; /* * load matrix */ *(here->DIOposPosPtr) += gspr; *(here->DIOnegNegPtr) += gd; *(here->DIOposPrimePosPrimePtr) += (gd + gspr); *(here->DIOposPosPrimePtr) -= gspr; *(here->DIOnegPosPrimePtr) -= gd; *(here->DIOposPrimePosPtr) -= gspr; *(here->DIOposPrimeNegPtr) -= gd; } } return(OK); } ngspice-26/src/spicelib/devices/dio/diosload.c0000644000265600020320000001242212264261473020752 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOsLoad(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; int iparmno; int error; int i; double SaveState[6]; double A0; double Apert; double DELA; double DELAinv; double cspr0; double cd0; double cd; double qd0; double qd; double DcsprDp; double DcdDp; double DqdDp = 0.0; double tag0; double tag1; double Osxp; SENstruct *info; info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } #ifdef SENSDEBUG printf("DIOsenload\n"); fprintf(stdout,"DIOsenload\n"); fprintf(stdout,"CKTtime = %.5e\n",ckt->CKTtime); fprintf(stdout,"CKTorder = %.5e\n",ckt->CKTorder); fprintf(stdout,"tag0 = %.5e tag1 = %.5e\n",tag0,tag1); #endif /* SENSDEBUG */ /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { #ifdef SENSDEBUG fprintf(stdout,"pos = %d , posprm = %d ,neg = %d, senparmno = %d\n", here->DIOposNode ,here->DIOposPrimeNode,here->DIOnegNode, here->DIOsenParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 4; i++) { *(SaveState + i) = *(ckt->CKTstate0 + here->DIOstate + i); } *(SaveState + 5) = here->DIOcap; if(here->DIOsenParmNo == 0) goto next; cspr0 = *(ckt->CKTstate0 + here->DIOcurrent); here->DIOsenPertFlag = ON; error = DIOload((GENmodel*)model,ckt); cd0 = *(ckt->CKTstate0 + here->DIOcurrent); qd0 = *(ckt->CKTstate0 + here->DIOcapCharge ); #ifdef SENSDEBUG fprintf(stdout,"cd0 = %.7e \n",cd0); #endif /* SENSDEBUG */ A0 = here->DIOarea; DELA = info->SENpertfac * A0; Apert = A0 + DELA; DELAinv = 1.0/DELA; here->DIOarea = Apert; error = DIOload((GENmodel*)model,ckt); if(error) return(error); here->DIOarea = A0; here->DIOsenPertFlag = OFF; cd = *(ckt->CKTstate0 + here->DIOcurrent) ; qd = *(ckt->CKTstate0 + here->DIOcapCharge); DcdDp = (cd -cd0) * DELAinv; DcsprDp = 0; if(here->DIOposNode != here->DIOposPrimeNode) { DcsprDp = cspr0 * info->SENpertfac * DELAinv; } DqdDp = (qd - qd0)*DELAinv; *(here->DIOdphidp) = DqdDp; #ifdef SENSDEBUG fprintf(stdout,"cd0 = %.7e ,cd = %.7e,DcdDp=%.7e\n", cd0,cd,DcdDp); fprintf(stdout,"cspr0 = %.7e ,DcsprDp=%.7e\n", cspr0,DcsprDp); fprintf(stdout,"qd0 = %.7e ,qd = %.7e,DqdDp=%.7e\n", qd0,qd,DqdDp); #endif /* SENSDEBUG */ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ goto restore; } /* * load RHS matrices */ *(info->SEN_RHS[here->DIOposNode] + here->DIOsenParmNo) -= DcsprDp; *(info->SEN_RHS[here->DIOposPrimeNode] + here->DIOsenParmNo) += DcsprDp - DcdDp ; *(info->SEN_RHS[here->DIOnegNode] + here->DIOsenParmNo) += DcdDp ; next: if((info->SENmode == DCSEN)||(ckt->CKTmode&MODETRANOP))goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ goto restore; } for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ Osxp = tag0 * *(ckt->CKTstate1 + here->DIOsensxp + 2*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->DIOsensxp + 2*(iparmno - 1) + 1); #ifdef SENSDEBUG fprintf(stdout,"\n iparmno=%d,Osxp=%.7e\n",iparmno,Osxp); #endif /* SENSDEBUG */ if(iparmno == here->DIOsenParmNo) Osxp = Osxp - tag0 * DqdDp; #ifdef SENSDEBUG fprintf(stdout,"Osxp=%.7e\n",Osxp); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->DIOposPrimeNode] + iparmno) += Osxp; *(info->SEN_RHS[here->DIOnegNode] + iparmno) -= Osxp; } /* put the unperturbed values back into the state vector */ restore: for(i=0; i <= 4; i++) { *(ckt->CKTstate0 + here->DIOstate + i) = *(SaveState + i); } here->DIOcap = *(SaveState + 5); } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("DIOsenload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/dio/diomask.c0000644000265600020320000001257312264261473020612 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int DIOmAsk (CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { DIOmodel *model = (DIOmodel*)inModel; NG_IGNORE(ckt); switch (which) { case DIO_MOD_LEVEL: value->iValue = model->DIOlevel; return (OK); case DIO_MOD_IS: value->rValue = model->DIOsatCur; return(OK); case DIO_MOD_JSW: value->rValue = model->DIOsatSWCur; return(OK); case DIO_MOD_TNOM: value->rValue = model->DIOnomTemp-CONSTCtoK; return(OK); case DIO_MOD_RS: value->rValue = model->DIOresist; return(OK); case DIO_MOD_TRS: value->rValue = model->DIOresistTemp1; return(OK); case DIO_MOD_TRS2: value->rValue = model->DIOresistTemp2; return(OK); case DIO_MOD_N: value->rValue = model->DIOemissionCoeff; return(OK); case DIO_MOD_NS: value->rValue = model->DIOswEmissionCoeff; return(OK); case DIO_MOD_TT: value->rValue = model->DIOtransitTime; return(OK); case DIO_MOD_TTT1: value->rValue = model->DIOtranTimeTemp1; return(OK); case DIO_MOD_TTT2: value->rValue = model->DIOtranTimeTemp2; return(OK); case DIO_MOD_CJO: value->rValue = model->DIOjunctionCap; return(OK); case DIO_MOD_VJ: value->rValue = model->DIOjunctionPot; return(OK); case DIO_MOD_M: value->rValue = model->DIOgradingCoeff; return(OK); case DIO_MOD_TM1: value->rValue = model->DIOgradCoeffTemp1; return(OK); case DIO_MOD_TM2: value->rValue = model->DIOgradCoeffTemp2; return(OK); case DIO_MOD_CJSW: value->rValue = model->DIOjunctionSWCap; return(OK); case DIO_MOD_VJSW: value->rValue = model->DIOjunctionSWPot; return(OK); case DIO_MOD_MJSW: value->rValue = model->DIOgradingSWCoeff; return(OK); case DIO_MOD_IKF: value->rValue = model->DIOforwardKneeCurrent; return(OK); case DIO_MOD_IKR: value->rValue = model->DIOreverseKneeCurrent; return(OK); case DIO_MOD_NBV: value->rValue = model->DIObrkdEmissionCoeff; return(OK); case DIO_MOD_TLEV: value->iValue = model->DIOtlev; return (OK); case DIO_MOD_TLEVC: value->iValue = model->DIOtlevc; return (OK); case DIO_MOD_EG: value->rValue = model->DIOactivationEnergy; return (OK); case DIO_MOD_XTI: value->rValue = model->DIOsaturationCurrentExp; return(OK); case DIO_MOD_CTA: value->rValue = model->DIOcta; return(OK); case DIO_MOD_CTP: value->rValue = model->DIOctp; return(OK); case DIO_MOD_TPB: value->rValue = model->DIOtpb; return(OK); case DIO_MOD_TPHP: value->rValue = model->DIOtphp; return(OK); case DIO_MOD_FC: value->rValue = model->DIOdepletionCapCoeff; return(OK); case DIO_MOD_FCS: value->rValue = model->DIOdepletionSWcapCoeff; return(OK); case DIO_MOD_KF: value->rValue = model->DIOfNcoef; return(OK); case DIO_MOD_AF: value->rValue = model->DIOfNexp; return(OK); case DIO_MOD_BV: value->rValue = model->DIObreakdownVoltage; return(OK); case DIO_MOD_IBV: value->rValue = model->DIObreakdownCurrent; return(OK); case DIO_MOD_TCV: value->rValue = model->DIOtcv; return(OK); case DIO_MOD_AREA: value->rValue = model->DIOarea; return(OK); case DIO_MOD_PJ: value->rValue = model->DIOpj; return(OK); case DIO_MOD_COND: value->rValue = model->DIOconductance; return(OK); case DIO_MOD_JTUN: value->rValue = model->DIOtunSatCur; return(OK); case DIO_MOD_JTUNSW: value->rValue = model->DIOtunSatSWCur; return(OK); case DIO_MOD_NTUN: value->rValue = model->DIOtunEmissionCoeff; return(OK); case DIO_MOD_XTITUN: value->rValue = model->DIOtunSaturationCurrentExp; return(OK); case DIO_MOD_KEG: value->rValue = model->DIOtunEGcorrectionFactor; return(OK); case DIO_MOD_FV_MAX: value->rValue = model->DIOfv_max; return(OK); case DIO_MOD_BV_MAX: value->rValue = model->DIObv_max; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/dio/diompar.c0000644000265600020320000001645112264261473020615 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified by Paolo Nenzi 2003 and Dietmar Warning 2012 **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOmParam(int param, IFvalue *value, GENmodel *inModel) { DIOmodel *model = (DIOmodel*)inModel; switch(param) { case DIO_MOD_LEVEL: model->DIOlevel = value->iValue; model->DIOlevelGiven = TRUE; break; case DIO_MOD_IS: model->DIOsatCur = value->rValue; model->DIOsatCurGiven = TRUE; break; case DIO_MOD_JSW: model->DIOsatSWCur = value->rValue; model->DIOsatSWCurGiven = TRUE; break; case DIO_MOD_TNOM: model->DIOnomTemp = value->rValue+CONSTCtoK; model->DIOnomTempGiven = TRUE; break; case DIO_MOD_RS: model->DIOresist = value->rValue; model->DIOresistGiven = TRUE; break; case DIO_MOD_TRS: model->DIOresistTemp1 = value->rValue; model->DIOresistTemp1Given = TRUE; break; case DIO_MOD_TRS2: model->DIOresistTemp2 = value->rValue; model->DIOresistTemp2Given = TRUE; break; case DIO_MOD_N: model->DIOemissionCoeff = value->rValue; model->DIOemissionCoeffGiven = TRUE; break; case DIO_MOD_NS: model->DIOswEmissionCoeff = value->rValue; model->DIOswEmissionCoeffGiven = TRUE; break; case DIO_MOD_TT: model->DIOtransitTime = value->rValue; model->DIOtransitTimeGiven = TRUE; break; case DIO_MOD_TTT1: model->DIOtranTimeTemp1 = value->rValue; model->DIOtranTimeTemp1Given = TRUE; break; case DIO_MOD_TTT2: model->DIOtranTimeTemp2 = value->rValue; model->DIOtranTimeTemp2Given = TRUE; break; case DIO_MOD_CJO: model->DIOjunctionCap = value->rValue; model->DIOjunctionCapGiven = TRUE; break; case DIO_MOD_VJ: model->DIOjunctionPot = value->rValue; model->DIOjunctionPotGiven = TRUE; break; case DIO_MOD_M: model->DIOgradingCoeff = value->rValue; model->DIOgradingCoeffGiven = TRUE; break; case DIO_MOD_TM1: model->DIOgradCoeffTemp1 = value->rValue; model->DIOgradCoeffTemp1Given = TRUE; break; case DIO_MOD_TM2: model->DIOgradCoeffTemp2 = value->rValue; model->DIOgradCoeffTemp2Given = TRUE; break; case DIO_MOD_CJSW: model->DIOjunctionSWCap = value->rValue; model->DIOjunctionSWCapGiven = TRUE; break; case DIO_MOD_VJSW: model->DIOjunctionSWPot = value->rValue; model->DIOjunctionSWPotGiven = TRUE; break; case DIO_MOD_MJSW: model->DIOgradingSWCoeff = value->rValue; model->DIOgradingSWCoeffGiven = TRUE; break; case DIO_MOD_IKF: model->DIOforwardKneeCurrent = value->rValue; model->DIOforwardKneeCurrentGiven = TRUE; break; case DIO_MOD_IKR: model->DIOreverseKneeCurrent = value->rValue; model->DIOreverseKneeCurrentGiven = TRUE; break; case DIO_MOD_NBV: model->DIObrkdEmissionCoeff = value->rValue; model->DIObrkdEmissionCoeffGiven = TRUE; break; case DIO_MOD_AREA: model->DIOarea = value->rValue; model->DIOareaGiven = TRUE; break; case DIO_MOD_PJ: model->DIOpj = value->rValue; model->DIOpjGiven = TRUE; break; case DIO_MOD_TLEV: model->DIOtlev = value->iValue; model->DIOtlevGiven = TRUE; break; case DIO_MOD_TLEVC: model->DIOtlevc = value->iValue; model->DIOtlevcGiven = TRUE; break; case DIO_MOD_EG: model->DIOactivationEnergy = value->rValue; model->DIOactivationEnergyGiven = TRUE; break; case DIO_MOD_XTI: model->DIOsaturationCurrentExp = value->rValue; model->DIOsaturationCurrentExpGiven = TRUE; break; case DIO_MOD_CTA: model->DIOcta = value->rValue; model->DIOctaGiven = TRUE; break; case DIO_MOD_CTP: model->DIOctp = value->rValue; model->DIOctpGiven = TRUE; break; case DIO_MOD_TPB: model->DIOtpb = value->rValue; model->DIOtpbGiven = TRUE; break; case DIO_MOD_TPHP: model->DIOtphp = value->rValue; model->DIOtphpGiven = TRUE; break; case DIO_MOD_FC: model->DIOdepletionCapCoeff = value->rValue; model->DIOdepletionCapCoeffGiven = TRUE; break; case DIO_MOD_FCS: model->DIOdepletionSWcapCoeff = value->rValue; model->DIOdepletionSWcapCoeffGiven = TRUE; break; case DIO_MOD_BV: model->DIObreakdownVoltage = value->rValue; model->DIObreakdownVoltageGiven = TRUE; break; case DIO_MOD_IBV: model->DIObreakdownCurrent = value->rValue; model->DIObreakdownCurrentGiven = TRUE; break; case DIO_MOD_TCV: model->DIOtcv = value->rValue; model->DIOtcvGiven = TRUE; break; case DIO_MOD_KF: model->DIOfNcoef = value->rValue; model->DIOfNcoefGiven = TRUE; break; case DIO_MOD_AF: model->DIOfNexp = value->rValue; model->DIOfNexpGiven = TRUE; break; case DIO_MOD_JTUN: model->DIOtunSatCur = value->rValue; model->DIOtunSatCurGiven = TRUE; break; case DIO_MOD_JTUNSW: model->DIOtunSatSWCur = value->rValue; model->DIOtunSatSWCurGiven = TRUE; break; case DIO_MOD_NTUN: model->DIOtunEmissionCoeff = value->rValue; model->DIOtunEmissionCoeffGiven = TRUE; break; case DIO_MOD_XTITUN: model->DIOtunSaturationCurrentExp = value->rValue; model->DIOtunSaturationCurrentExpGiven = TRUE; break; case DIO_MOD_KEG: model->DIOtunEGcorrectionFactor = value->rValue; model->DIOtunEGcorrectionFactorGiven = TRUE; break; case DIO_MOD_FV_MAX: model->DIOfv_max = value->rValue; model->DIOfv_maxGiven = TRUE; break; case DIO_MOD_BV_MAX: model->DIObv_max = value->rValue; model->DIObv_maxGiven = TRUE; break; case DIO_MOD_D: /* no action - we already know we are a diode, but this */ /* makes life easier for spice-2 like parsers */ break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/dio/diosprt.c0000644000265600020320000000250412264261473020640 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* Pretty print the sensitivity info for all * the diodes in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void DIOsPrint(GENmodel *inModel, CKTcircuit *ckt) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; printf("DIOS-----------------\n"); /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { printf("Model name:%s\n",model->DIOmodName); /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { printf(" Instance name:%s\n",here->DIOname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->DIOposNode),CKTnodName(ckt,here->DIOnegNode)); printf(" Area: %g ",here->DIOarea); printf(here->DIOareaGiven ? "(specified)\n" : "(default)\n"); printf(" DIOsenParmNo:%d\n",here->DIOsenParmNo); } } } ngspice-26/src/spicelib/devices/dio/diosset.c0000644000265600020320000000215512264261473020630 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "diodefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int DIOsSetup(SENstruct *info, GENmodel *inModel) { DIOmodel *model = (DIOmodel*)inModel; DIOinstance *here; /* loop through all the diode models */ for( ; model != NULL; model = model->DIOnextModel ) { /* loop through all the instances of the model */ for (here = model->DIOinstances; here != NULL ; here=here->DIOnextInstance) { if(here->DIOsenParmNo){ here->DIOsenParmNo = ++(info->SENparms); here->DIOsenPertFlag = OFF; } if((here->DIOsens = TMALLOC(double, 7)) == NULL) return(E_NOMEM); } } return(OK); } ngspice-26/src/spicelib/devices/sw/0000755000265600020320000000000012264261711016660 5ustar andreasadminngspice-26/src/spicelib/devices/sw/swsetup.c0000644000265600020320000000376312264261473020554 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the switch conductance with those pointers needed later * for fast matrix loading */ { SWmodel *model = (SWmodel *)inModel; SWinstance *here; /* loop through all the current source models */ for( ; model != NULL; model = model->SWnextModel ) { /* Default Value Processing for Switch Model */ if (!model->SWthreshGiven) { model->SWvThreshold = 0; } if (!model->SWhystGiven) { model->SWvHysteresis = 0; } if (!model->SWonGiven) { model->SWonConduct = SW_ON_CONDUCTANCE; model->SWonResistance = 1.0/model->SWonConduct; } if (!model->SWoffGiven) { model->SWoffConduct = SW_OFF_CONDUCTANCE; model->SWoffResistance = 1.0/model->SWoffConduct; } /* loop through all the instances of the model */ for (here = model->SWinstances; here != NULL ; here=here->SWnextInstance) { here->SWstate = *states; *states += SW_NUM_STATES; /* Default Value Processing for Switch Instance */ /* none */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(SWposPosptr, SWposNode, SWposNode); TSTALLOC(SWposNegptr, SWposNode, SWnegNode); TSTALLOC(SWnegPosptr, SWnegNode, SWposNode); TSTALLOC(SWnegNegptr, SWnegNode, SWnegNode); } } return(OK); } ngspice-26/src/spicelib/devices/sw/swparam.c0000644000265600020320000000143512264261473020506 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int SWparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { SWinstance *here = (SWinstance *)inst; NG_IGNORE(select); switch(param) { case SW_IC_ON: if(value->iValue) { here->SWzero_stateGiven = TRUE; } break; case SW_IC_OFF: if(value->iValue) { here->SWzero_stateGiven = FALSE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/sw/sw.c0000644000265600020320000000304212264261473017461 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "swdefs.h" #include "ngspice/suffix.h" IFparm SWpTable[] = { /* parameters */ IP("on", SW_IC_ON, IF_FLAG,"Switch initially closed"), IP("off", SW_IC_OFF, IF_FLAG,"Switch initially open"), IOPU("pos_node", SW_POS_NODE,IF_INTEGER,"Positive node of switch"), IOPU("neg_node", SW_NEG_NODE,IF_INTEGER,"Negative node of switch"), OPU("cont_p_node",SW_POS_CONT_NODE,IF_INTEGER, "Positive contr. node of switch"), OPU("cont_n_node",SW_NEG_CONT_NODE,IF_INTEGER, "Positive contr. node of switch"), OP("i", SW_CURRENT, IF_REAL, "Switch current"), OP("p", SW_POWER, IF_REAL, "Switch power") }; IFparm SWmPTable[] = { /* model parameters */ IOPU( "sw", SW_MOD_SW, IF_FLAG,"Switch model"), IOPU( "vt", SW_MOD_VTH, IF_REAL,"Threshold voltage"), IOPU( "vh", SW_MOD_VHYS, IF_REAL,"Hysteresis voltage"), IOPU( "ron", SW_MOD_RON, IF_REAL,"Resistance when closed"), OPU( "gon", SW_MOD_GON, IF_REAL,"Conductance when closed"), IOPU( "roff", SW_MOD_ROFF, IF_REAL,"Resistance when open"), OPU( "goff", SW_MOD_GOFF, IF_REAL,"Conductance when open") }; char *SWnames[] = { "S+", "S-", "SC+", "SC-" }; int SWnSize = NUMELEMS(SWnames); int SWpTSize = NUMELEMS(SWpTable); int SWmPTSize = NUMELEMS(SWmPTable); int SWiSize = sizeof(SWinstance); int SWmSize = sizeof(SWmodel); ngspice-26/src/spicelib/devices/sw/swdest.c0000644000265600020320000000135612264261473020347 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/suffix.h" void SWdestroy(GENmodel **inModel) { SWmodel **model = (SWmodel**)inModel; SWinstance *here; SWinstance *prev = NULL; SWmodel *mod = *model; SWmodel *oldmod = NULL; for( ; mod ; mod = mod->SWnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->SWinstances ; here ; here = here->SWnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/sw/swinit.c0000644000265600020320000000404512264261473020351 0ustar andreasadmin/* Modified: Alansfixes */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "switf.h" #include "swext.h" #include "swinit.h" SPICEdev SWinfo = { { "Switch", "Ideal voltage controlled switch", &SWnSize, &SWnSize, SWnames, &SWpTSize, SWpTable, &SWmPTSize, SWmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ SWparam, /* DEVmodParam */ SWmParam, /* DEVload */ SWload, /* DEVsetup */ SWsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ SWsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ SWtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ SWacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ SWdestroy, /* DEVmodDelete */ SWmDelete, /* DEVdelete */ SWdelete, /* DEVsetic */ NULL, /* DEVask */ SWask, /* DEVmodAsk */ SWmAsk, /* DEVpzLoad */ SWpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ SWnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* CIDER */ /* DEVinstSize */ &SWiSize, /* DEVmodSize */ &SWmSize }; SPICEdev * get_sw_info(void) { return &SWinfo; } ngspice-26/src/spicelib/devices/sw/swload.c0000644000265600020320000001333112264261473020323 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs Modified: 2001 Jon Engelbert **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/fteext.h" #include "swdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ { SWmodel *model = (SWmodel *) inModel; SWinstance *here; double g_now; double v_ctrl; double previous_state = -1; double current_state = -1; double old_current_state = -1; double REALLY_OFF = 0, REALLY_ON = 1; // switch is on or off, not in hysteresis region. double HYST_OFF = 2, HYST_ON = 3; // switch is on or off while control value is in hysteresis region. // double previous_region = -1; // double current_region = -1; /* loop through all the switch models */ for( ; model != NULL; model = model->SWnextModel ) { /* loop through all the instances of the model */ for (here = model->SWinstances; here != NULL ; here=here->SWnextInstance) { old_current_state = *(ckt->CKTstates[0] + here->SWstate); previous_state = *(ckt->CKTstates[1] + here->SWstate); v_ctrl = *(ckt->CKTrhsOld + here->SWposCntrlNode) - *(ckt->CKTrhsOld + here->SWnegCntrlNode); /* decide the state of the switch */ if(ckt->CKTmode & (MODEINITFIX|MODEINITJCT)) { if(here->SWzero_stateGiven) { /* switch specified "on" */ if ((model->SWvHysteresis >= 0) && (v_ctrl > (model->SWvThreshold + model->SWvHysteresis))) current_state = REALLY_ON; else if ((model->SWvHysteresis < 0) && (v_ctrl > (model->SWvThreshold - model->SWvHysteresis))) current_state = REALLY_ON; else current_state = HYST_ON; } else { if ((model->SWvHysteresis >= 0) && (v_ctrl < (model->SWvThreshold - model->SWvHysteresis))) current_state = REALLY_OFF; else if ((model->SWvHysteresis < 0) && (v_ctrl < (model->SWvThreshold + model->SWvHysteresis))) current_state = REALLY_OFF; else current_state = HYST_OFF; } } else if (ckt->CKTmode & (MODEINITSMSIG)) { current_state = previous_state; } else if (ckt->CKTmode & (MODEINITFLOAT)) { /* use state0 since INITTRAN or INITPRED already called */ if (model->SWvHysteresis > 0) { if (v_ctrl > (model->SWvThreshold + model->SWvHysteresis)) { current_state = REALLY_ON; } else if (v_ctrl < (model->SWvThreshold - model->SWvHysteresis)) { current_state = REALLY_OFF; } else { current_state = old_current_state; } } else { // negative hysteresis case. if (v_ctrl > (model->SWvThreshold - model->SWvHysteresis)) { current_state = REALLY_ON; } else if (v_ctrl < (model->SWvThreshold + model->SWvHysteresis)) { current_state = REALLY_OFF; } else { // in hysteresis... change value if going from low to hysteresis, or from hi to hysteresis. // if previous state was in hysteresis, then don't change the state.. if ((previous_state == HYST_OFF) || (previous_state == HYST_ON)) { current_state = previous_state; } else if (previous_state == REALLY_ON) { current_state = HYST_OFF; } else if (previous_state == REALLY_OFF) { current_state = HYST_ON; } else internalerror("bad value for previous state in swload"); } } if(current_state != old_current_state) { ckt->CKTnoncon++; /* ensure one more iteration */ ckt->CKTtroubleElt = (GENinstance *) here; } } else if(ckt->CKTmode & (MODEINITTRAN|MODEINITPRED) ) { if (model->SWvHysteresis > 0) { if (v_ctrl > (model->SWvThreshold + model->SWvHysteresis)) current_state = REALLY_ON; else if (v_ctrl < (model->SWvThreshold - model->SWvHysteresis)) current_state = REALLY_OFF; else current_state = previous_state; } else { // negative hysteresis case. if (v_ctrl > (model->SWvThreshold - model->SWvHysteresis)) current_state = REALLY_ON; else if (v_ctrl < (model->SWvThreshold + model->SWvHysteresis)) current_state = REALLY_OFF; else { current_state = 0.0; if ((previous_state == HYST_ON) || (previous_state == HYST_OFF)) { current_state = previous_state; } else if (previous_state == REALLY_ON) { current_state = REALLY_OFF; } else if (previous_state == REALLY_OFF) { current_state = REALLY_ON; } } } } // code added to force the state to be updated. // there is a possible problem. What if, during the transient analysis, the time is stepped // forward enough to change the switch's state, but that time point is rejected as being too // distant and then the time is pushed back to a time before the switch changed states. // After analyzing the transient code, it seems that this is not a problem because state updating // occurs before the convergence loop in transient processing. *(ckt->CKTstates[0] + here->SWstate) = current_state; *(ckt->CKTstates[0] + here->SWstate + 1) = v_ctrl; if ((current_state == REALLY_ON) || (current_state == HYST_ON)) g_now = model->SWonConduct; else g_now = model->SWoffConduct; here->SWcond = g_now; *(here->SWposPosptr) += g_now; *(here->SWposNegptr) -= g_now; *(here->SWnegPosptr) -= g_now; *(here->SWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/sw/swpzload.c0000644000265600020320000000245112264261473020676 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "ngspice/suffix.h" /* ARGSUSED */ int SWpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* load the current values into the * sparse matrix previously provided * during AC analysis. */ { SWmodel *model = (SWmodel *)inModel; SWinstance *here; double g_now; int current_state; NG_IGNORE(s); /* loop through all the switch models */ for( ; model != NULL; model = model->SWnextModel ) { /* loop through all the instances of the model */ for (here = model->SWinstances; here != NULL ; here=here->SWnextInstance) { /* In AC analysis, just propogate the state... */ current_state = (int)*(ckt->CKTstate0 + here->SWstate); g_now = current_state?(model->SWonConduct):(model->SWoffConduct); *(here->SWposPosptr) += g_now; *(here->SWposNegptr) -= g_now; *(here->SWnegPosptr) -= g_now; *(here->SWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/sw/swdelete.c0000644000265600020320000000152112264261473020644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { SWmodel *model = (SWmodel *)inModel; SWinstance **fast = (SWinstance **)inst; SWinstance **prev = NULL; SWinstance *here; for( ; model ; model = model->SWnextModel) { prev = &(model->SWinstances); for(here = *prev; here ; here = *prev) { if(here->SWname == name || (fast && here==*fast) ) { *prev= here->SWnextInstance; FREE(here); return(OK); } prev = &(here->SWnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/sw/swask.c0000644000265600020320000000432312264261473020163 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameters * of voltage controlled SWitch */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int SWask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { SWinstance *here = (SWinstance *)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case SW_POS_NODE: value->iValue = here->SWposNode; return (OK); case SW_NEG_NODE: value->iValue = here->SWnegNode; return (OK); case SW_POS_CONT_NODE: value->iValue = here->SWposCntrlNode; return (OK); case SW_NEG_CONT_NODE: value->iValue = here->SWnegCntrlNode; return (OK); case SW_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SWask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = (*(ckt->CKTrhsOld + here->SWposNode) - *(ckt->CKTrhsOld + here->SWnegNode)) * here->SWcond; } return(OK); case SW_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "SWask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = (*(ckt->CKTrhsOld + here->SWposNode) - *(ckt->CKTrhsOld + here->SWnegNode)) * (*(ckt->CKTrhsOld + here->SWposNode) - *(ckt->CKTrhsOld + here->SWnegNode)) * here->SWcond; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/sw/swmdel.c0000644000265600020320000000172612264261473020332 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { SWmodel **model = (SWmodel **)inModel; SWmodel *modfast = (SWmodel *)kill; SWinstance *here; SWinstance *prev = NULL; SWmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->SWnextModel)) { if( (*model)->SWmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->SWnextModel; /* cut deleted device out of list */ for(here = (*model)->SWinstances ; here ; here = here->SWnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/sw/swtrunc.c0000644000265600020320000000332212264261473020536 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "swdefs.h" int SWtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { SWmodel *model = (SWmodel*)inModel; SWinstance *here; double lastChange, maxChange, maxStep, ref; for( ; model!= NULL; model = model->SWnextModel) { for(here = model->SWinstances ; here != NULL ; here = here->SWnextInstance) { lastChange = *(ckt->CKTstate0+(here->SWstate+1)) - *(ckt->CKTstate1+(here->SWstate+1)); if (*(ckt->CKTstate0+(here->SWstate))==0) { ref = (model->SWvThreshold + model->SWvHysteresis); if ((*(ckt->CKTstate0+(here->SWstate+1))0)) { maxChange = (ref - *(ckt->CKTstate0+(here->SWstate+1))) * 0.75 + 0.05; maxStep = maxChange/lastChange * ckt->CKTdeltaOld[0]; if (*timeStep > maxStep) { *timeStep = maxStep; } } } else { ref = (model->SWvThreshold - model->SWvHysteresis); if ((*(ckt->CKTstate0+(here->SWstate+1))>ref) && (lastChange<0)) { maxChange = (ref - *(ckt->CKTstate0+(here->SWstate+1))) * 0.75 - 0.05; maxStep = maxChange/lastChange * ckt->CKTdeltaOld[0]; if (*timeStep > maxStep) { *timeStep = maxStep; } } } } } return(OK); } ngspice-26/src/spicelib/devices/sw/swnoise.c0000644000265600020320000001020412264261473020515 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * SWnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with voltage- controlled switches. It starts with the * model *firstModel and traverses all of its instances. It then * proceeds to any other models on the linked list. The total output * noise density generated by the SW's is summed in the variable * "OnDens". */ int SWnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; SWmodel *firstModel = (SWmodel *) genmodel; SWmodel *model; SWinstance *inst; char name[N_MXVLNTH]; double tempOutNoise; double tempInNoise; double noizDens; double lnNdens; int current_state; for (model=firstModel; model != NULL; model=model->SWnextModel) { for (inst=model->SWinstances; inst != NULL; inst=inst->SWnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name the noise generator */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: (void)sprintf(name,"onoise_%s",inst->SWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; case INT_NOIZ: (void)sprintf(name,"onoise_total_%s",inst->SWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s",inst->SWname); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ break; } } break; case N_CALC: switch (mode) { case N_DENS: current_state = (int)*(ckt->CKTstate0 + inst->SWstate); NevalSrc(&noizDens,&lnNdens,ckt,THERMNOISE, inst->SWposNode,inst->SWnegNode, current_state?(model->SWonConduct):(model->SWoffConduct)); *OnDens += noizDens; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ inst->SWnVar[LNLSTDENS] = lnNdens; /* clear out our integration variable if it's the first pass */ if (data->freq == job->NstartFreq) { inst->SWnVar[OUTNOIZ] = 0.0; } } else { /* data->delFreq != 0.0 (we have to integrate) */ tempOutNoise = Nintegrate(noizDens, lnNdens, inst->SWnVar[LNLSTDENS], data); tempInNoise = Nintegrate(noizDens * data->GainSqInv ,lnNdens + data->lnGainInv, inst->SWnVar[LNLSTDENS] + data->lnGainInv, data); inst->SWnVar[OUTNOIZ] += tempOutNoise; inst->SWnVar[INNOIZ] += tempInNoise; data->outNoiz += tempOutNoise; data->inNoise += tempInNoise; inst->SWnVar[LNLSTDENS] = lnNdens; } if (data->prtSummary) { data->outpVector[data->outNumber++] = noizDens; } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { data->outpVector[data->outNumber++] = inst->SWnVar[OUTNOIZ]; data->outpVector[data->outNumber++] = inst->SWnVar[INNOIZ]; } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/sw/Makefile.am0000644000265600020320000000071612264261473020725 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libsw.la libsw_la_SOURCES = \ sw.c \ swacload.c \ swask.c \ swdefs.h \ swdelete.c \ swdest.c \ swext.h \ swinit.c \ swinit.h \ switf.h \ swload.c \ swmask.c \ swmdel.c \ swmparam.c \ swnoise.c \ swparam.c \ swpzload.c \ swsetup.c \ swtrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/sw/swmparam.c0000644000265600020320000000267412264261473020671 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs Modified: 2001 Jon Engelbert **********/ /* */ #include "ngspice/ngspice.h" #include "swdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWmParam(int param, IFvalue *value, GENmodel *inModel) { SWmodel *model = (SWmodel *)inModel; switch(param) { case SW_MOD_SW: /* just says that this is a switch */ break; case SW_MOD_RON: model->SWonResistance = value->rValue; model->SWonConduct = 1.0/(value->rValue); model->SWonGiven = TRUE; break; case SW_MOD_ROFF: model->SWoffResistance = value->rValue; model->SWoffConduct = 1.0/(value->rValue); model->SWoffGiven = TRUE; break; case SW_MOD_VTH: /* take absolute value of hysteresis voltage */ model->SWvThreshold = value->rValue; model->SWthreshGiven = TRUE; break; case SW_MOD_VHYS: /* take absolute value of hysteresis voltage */ // model->SWvHysteresis = (value->rValue < 0) ? -(value->rValue) : // value->rValue; model->SWvHysteresis = value->rValue; model->SWhystGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/sw/Makefile.in0000644000265600020320000004226612264261540020737 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/sw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsw_la_LIBADD = am_libsw_la_OBJECTS = sw.lo swacload.lo swask.lo swdelete.lo swdest.lo \ swinit.lo swload.lo swmask.lo swmdel.lo swmparam.lo swnoise.lo \ swparam.lo swpzload.lo swsetup.lo swtrunc.lo libsw_la_OBJECTS = $(am_libsw_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libsw_la_SOURCES) DIST_SOURCES = $(libsw_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libsw.la libsw_la_SOURCES = \ sw.c \ swacload.c \ swask.c \ swdefs.h \ swdelete.c \ swdest.c \ swext.h \ swinit.c \ swinit.h \ switf.h \ swload.c \ swmask.c \ swmdel.c \ swmparam.c \ swnoise.c \ swparam.c \ swpzload.c \ swsetup.c \ swtrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/sw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/sw/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsw.la: $(libsw_la_OBJECTS) $(libsw_la_DEPENDENCIES) $(EXTRA_libsw_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsw_la_OBJECTS) $(libsw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swacload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swdelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swmparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swpzload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/swtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/sw/swmask.c0000644000265600020320000000241112264261473020334 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal model parameter * of voltage controlled SWitch */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int SWmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { SWmodel *model = (SWmodel *)inModel; NG_IGNORE(ckt); switch(which) { case SW_MOD_RON: value->rValue = model->SWonResistance; return (OK); case SW_MOD_ROFF: value->rValue = model->SWoffResistance; return (OK); case SW_MOD_VTH: value->rValue = model->SWvThreshold; return (OK); case SW_MOD_VHYS: value->rValue = model->SWvHysteresis; return (OK); case SW_MOD_GON: value->rValue = model->SWonConduct; return (OK); case SW_MOD_GOFF: value->rValue = model->SWoffConduct; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/sw/swinit.h0000644000265600020320000000034412264261473020354 0ustar andreasadmin#ifndef _SWINIT_H #define _SWINIT_H extern IFparm SWpTable[ ]; extern IFparm SWmPTable[ ]; extern char *SWnames[ ]; extern int SWpTSize; extern int SWmPTSize; extern int SWnSize; extern int SWiSize; extern int SWmSize; #endif ngspice-26/src/spicelib/devices/sw/swacload.c0000644000265600020320000000233412264261473020630 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon Jacobs **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "swdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int SWacLoad(GENmodel *inModel, CKTcircuit *ckt) /* load the current values into the * sparse matrix previously provided * during AC analysis. */ { SWmodel *model = (SWmodel *)inModel; SWinstance *here; double g_now; int current_state; /* loop through all the switch models */ for( ; model != NULL; model = model->SWnextModel ) { /* loop through all the instances of the model */ for (here = model->SWinstances; here != NULL ; here=here->SWnextInstance) { /* In AC analysis, just propogate the state... */ current_state = (int)*(ckt->CKTstate0 + here->SWstate); g_now = current_state?(model->SWonConduct):(model->SWoffConduct); *(here->SWposPosptr) += g_now; *(here->SWposNegptr) -= g_now; *(here->SWnegPosptr) -= g_now; *(here->SWnegNegptr) += g_now; } } return(OK); } ngspice-26/src/spicelib/devices/sw/swext.h0000644000265600020320000000150312264261473020207 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon M. Jacobs Modified: 2000 AlansFixes **********/ extern int SWacLoad(GENmodel*,CKTcircuit*); extern int SWask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int SWdelete(GENmodel*,IFuid,GENinstance**); extern void SWdestroy(GENmodel**); extern int SWload(GENmodel*,CKTcircuit*); extern int SWmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int SWmDelete(GENmodel**,IFuid,GENmodel*); extern int SWmParam(int,IFvalue*,GENmodel*); extern int SWparam(int,IFvalue*,GENinstance*,IFvalue*); extern int SWpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int SWsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int SWnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int SWtrunc(GENmodel*,CKTcircuit*,double*); ngspice-26/src/spicelib/devices/sw/switf.h0000644000265600020320000000026112264261473020171 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_SW #define DEV_SW extern SPICEdev *get_sw_info(void); #endif ngspice-26/src/spicelib/devices/sw/swdefs.h0000644000265600020320000000721512264261473020336 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Gordon M. Jacobs Modified: 2000 AlansFixes **********/ #ifndef SW #define SW #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures used to describe voltage controlled switches */ /* information to describe each instance */ typedef struct sSWinstance { struct sSWmodel *SWmodPtr; /* backpointer to model */ struct sSWinstance *SWnextInstance; /* pointer to next instance of * current model*/ IFuid SWname; /* pointer to character string naming this instance */ int SWstate; /* pointer to start of switch's section of state vector */ int SWposNode; /* number of positive node of switch */ int SWnegNode; /* number of negative node of switch */ int SWposCntrlNode; /* number of positive controlling node of switch */ int SWnegCntrlNode; /* number of negative controlling node of switch */ double *SWposPosptr; /* pointer to sparse matrix diagonal at (positive,positive) for switch conductance */ double *SWnegPosptr; /* pointer to sparse matrix offdiagonal at (neagtive,positive) for switch conductance */ double *SWposNegptr; /* pointer to sparse matrix offdiagonal at (positive,neagtive) for switch conductance */ double *SWnegNegptr; /* pointer to sparse matrix diagonal at (neagtive,neagtive) for switch conductance */ double SWcond; /* conductance of the switch now */ unsigned SWzero_stateGiven : 1; /* flag to indicate initial state */ #ifndef NONOISE double SWnVar[NSTATVARS]; #else /* NONOISE */ double *SWnVar; #endif /* NONOISE */ } SWinstance ; /* data per model */ #define SW_ON_CONDUCTANCE 1.0 /* default on conductance = 1 mho */ #define SW_OFF_CONDUCTANCE ckt->CKTgmin /* default off conductance */ #define SW_NUM_STATES 2 typedef struct sSWmodel { /* model structure for a switch */ int SWmodType; /* type index of this device type */ struct sSWmodel *SWnextModel; /* pointer to next possible model in * linked list */ SWinstance *SWinstances; /* pointer to list of instances that have this * model */ IFuid SWmodName; /* pointer to character string naming this model */ double SWonResistance; /* switch "on" resistance */ double SWoffResistance; /* switch "off" resistance */ double SWvThreshold; /* switching threshold voltage */ double SWvHysteresis; /* switching hysteresis voltage */ double SWonConduct; /* switch "on" conductance */ double SWoffConduct; /* switch "off" conductance */ unsigned SWonGiven : 1; /* flag to indicate on-resistance was specified */ unsigned SWoffGiven : 1; /* flag to indicate off-resistance was " */ unsigned SWthreshGiven : 1; /* flag to indicate threshold volt was given */ unsigned SWhystGiven : 1; /* flag to indicate hysteresis volt was given */ } SWmodel; /* device parameters */ #define SW_IC_ON 1 #define SW_IC_OFF 2 #define SW_POS_NODE 3 #define SW_NEG_NODE 4 #define SW_POS_CONT_NODE 5 #define SW_NEG_CONT_NODE 6 #define SW_CURRENT 7 #define SW_POWER 8 /* model parameters */ #define SW_MOD_SW 101 #define SW_MOD_RON 102 #define SW_MOD_ROFF 103 #define SW_MOD_VTH 104 #define SW_MOD_VHYS 105 #define SW_MOD_GON 106 #define SW_MOD_GOFF 107 /* device questions */ /* model questions */ #include "swext.h" #endif /*SW*/ ngspice-26/src/spicelib/devices/bsimsoi/0000755000265600020320000000000012264261705017677 5ustar andreasadminngspice-26/src/spicelib/devices/bsimsoi/b4soidel.c0000644000265600020320000000261412264261473021555 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soidel.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soidel.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B4SOIdelete( GENmodel *inModel, IFuid name, GENinstance **inInst) { B4SOIinstance **fast = (B4SOIinstance**)inInst; B4SOImodel *model = (B4SOImodel*)inModel; B4SOIinstance **prev = NULL; B4SOIinstance *here; for (; model ; model = model->B4SOInextModel) { prev = &(model->B4SOIinstances); for (here = *prev; here ; here = *prev) { if (here->B4SOIname == name || (fast && here==*fast)) { *prev= here->B4SOInextInstance; FREE(here); return(OK); } prev = &(here->B4SOInextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsimsoi/b4soitrunc.c0000644000265600020320000000316112264261473022142 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soitrunc.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soitrunc.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOItrunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here != NULL; here = here->B4SOInextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B4SOIqb,ckt,timeStep); CKTterr(here->B4SOIqg,ckt,timeStep); CKTterr(here->B4SOIqd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B4SOIname,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soi.c0000644000265600020320000023037712264261473021101 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soi.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. * File: b4soi.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 12/16/2010 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "b4soidef.h" #include "ngspice/suffix.h" IFparm B4SOIpTable[] = { /* parameters */ IOP( "l", B4SOI_L, IF_REAL , "Length"), IOP( "w", B4SOI_W, IF_REAL , "Width"), IOP( "m", B4SOI_M, IF_REAL , "Parallel Multiplier"), IOP( "nf", B4SOI_NF, IF_REAL , "Number of fingers"), IOP( "sa", B4SOI_SA, IF_REAL , "distance between OD edge to poly of one side "), IOP( "sb", B4SOI_SB, IF_REAL , "distance between OD edge to poly of the other side"), IOP( "sd", B4SOI_SD, IF_REAL , "distance between neighbour fingers"), IOP( "ad", B4SOI_AD, IF_REAL , "Drain area"), IOP( "as", B4SOI_AS, IF_REAL , "Source area"), IOP( "pd", B4SOI_PD, IF_REAL , "Drain perimeter"), IOP( "ps", B4SOI_PS, IF_REAL , "Source perimeter"), IOP( "nrd", B4SOI_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", B4SOI_NRS, IF_REAL , "Number of squares in source"), IOP( "off", B4SOI_OFF, IF_FLAG , "Device is initially off"), IP( "ic", B4SOI_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", B4SOI_GMBS, IF_REAL, "Gmb"), OP( "gm", B4SOI_GM, IF_REAL, "Gm"), OP( "gmids", B4SOI_GMID, IF_REAL, "Gm/Ids"), OP( "gds", B4SOI_GDS, IF_REAL, "Gds"), OP( "vdsat", B4SOI_VDSAT, IF_REAL, "Vdsat"), OP( "vth", B4SOI_VON, IF_REAL, "Vth"), OP( "ids", B4SOI_CD, IF_REAL, "Ids"), OP( "vbs", B4SOI_VBS, IF_REAL, "Vbs"), OP( "vgs", B4SOI_VGS, IF_REAL, "Vgs"), OP( "vds", B4SOI_VDS, IF_REAL, "Vds"), OP( "ves", B4SOI_VES, IF_REAL, "Ves"), OP( "ibd", B4SOI_IBD, IF_REAL, "Ibd"), OP( "ibs", B4SOI_IBS, IF_REAL, "Ibs"), OP( "isub", B4SOI_ISUB, IF_REAL, "Isub"), OP( "igidl", B4SOI_IGIDL, IF_REAL, "Igidl"), OP( "igisl", B4SOI_IGISL, IF_REAL, "Igisl"), OP( "igs", B4SOI_IGS, IF_REAL, "Igs"), OP( "igd", B4SOI_IGD, IF_REAL, "Igd"), OP( "igb", B4SOI_IGB, IF_REAL, "Igb"), OP( "igcs", B4SOI_IGCS, IF_REAL, "Igcs"), OP( "igcd", B4SOI_IGCD, IF_REAL, "Igcd"), OP( "cgg", B4SOI_CGG, IF_REAL, "Cggb"), OP( "cgs", B4SOI_CGS, IF_REAL, "Cgsb"), OP( "cgd", B4SOI_CGD, IF_REAL, "Cgdb"), OP( "cbg", B4SOI_CBG, IF_REAL, "Cbgb"), OP( "cbd", B4SOI_CBD, IF_REAL, "Cbdb"), OP( "cbs", B4SOI_CBS, IF_REAL, "Cbsb"), OP( "cdg", B4SOI_CDG, IF_REAL, "Cdgb"), OP( "cdd", B4SOI_CDD, IF_REAL, "Cddb"), OP( "cds", B4SOI_CDS, IF_REAL, "Cdsb"), OP( "capbd", B4SOI_CAPBD, IF_REAL, "Capbd"), OP( "capbs", B4SOI_CAPBS, IF_REAL, "Capbs"), OP( "qg", B4SOI_QG, IF_REAL, "Qgate"), OP( "qb", B4SOI_QB, IF_REAL, "Qbulk"), OP( "qd", B4SOI_QD, IF_REAL, "Qdrain"), OP( "qs", B4SOI_QS, IF_REAL, "Qsource"), #ifdef B4SOI_DEBUG_OUT OP( "debug1", B4SOI_DEBUG1, IF_REAL, "DebugOut1"), OP( "debug2", B4SOI_DEBUG2, IF_REAL, "DebugOut2"), OP( "debug3", B4SOI_DEBUG3, IF_REAL, "DebugOut3"), #endif IOP( "bjtoff", B4SOI_BJTOFF, IF_INTEGER, "BJT on/off flag"), IOP( "debug", B4SOI_DEBUG, IF_INTEGER, "DEBUG on/off flag"), IOP( "rth0", B4SOI_RTH0, IF_REAL, "Instance Thermal Resistance"), IOP( "cth0", B4SOI_CTH0, IF_REAL, "Instance Thermal Capacitance"), IOP( "nrb", B4SOI_NRB, IF_REAL, "Number of squares in body"), IOP( "frbody", B4SOI_FRBODY, IF_REAL, "layout dependent body-resistance coefficient"), /* v4.0 */ IOP( "nf", B4SOI_NF, IF_REAL , "Number of fingers"), IOP( "rbdb", B4SOI_RBDB, IF_REAL , "Body resistance"), IOP( "rbsb", B4SOI_RBSB, IF_REAL , "Body resistance"), IOP( "delvto", B4SOI_DELVTO, IF_REAL, "Zero bias threshold voltage variation"), /* v4.0 end */ IOP( "soimod", B4SOI_SOIMOD, IF_INTEGER, "Instance model selector for PD/FD operation"), /* v3.2 */ /* v2.0 release */ IOP( "nbc", B4SOI_NBC, IF_REAL, "Number of body contact isolation edge"), IOP( "nseg", B4SOI_NSEG, IF_REAL, "Number segments for width partitioning"), IOP( "pdbcp", B4SOI_PDBCP, IF_REAL, "Perimeter length for bc parasitics at drain side"), IOP( "psbcp", B4SOI_PSBCP, IF_REAL, "Perimeter length for bc parasitics at source side"), IOP( "agbcp", B4SOI_AGBCP, IF_REAL, "Gate to body overlap area for bc parasitics"), IOP( "agbcp2", B4SOI_AGBCP2, IF_REAL, "Parasitic Gate to body overlap area for bc parasitics"), /* v4.1 improvement on BC */ IOP( "agbcpd", B4SOI_AGBCPD, IF_REAL, "Gate to body overlap area for bc parasitics in DC"), IOP( "aebcp", B4SOI_AEBCP, IF_REAL, "Substrate to body overlap area for bc prasitics"), IOP( "vbsusr", B4SOI_VBSUSR, IF_REAL, "Vbs specified by user"), IOP( "tnodeout", B4SOI_TNODEOUT, IF_FLAG, "Flag indicating external temp node"), /*v3.1 added rgatemod */ IOP( "rgatemod", B4SOI_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), /*v3.1 added rgatemod */ IOP( "rbodymod", B4SOI_RBODYMOD, IF_INTEGER, "Body R model selector"),/* v4.0 */ }; IFparm B4SOImPTable[] = { /* model parameters */ /*4.1*/ IOP( "mtrlmod", B4SOI_MOD_MTRLMOD, IF_INTEGER, "parameter for non-silicon substrate or metal gate selector"), IOP( "vgstcvmod", B4SOI_MOD_VGSTCVMOD, IF_INTEGER, "Improved VgsteffCV selector"), IOP( "gidlmod", B4SOI_MOD_GIDLMOD, IF_INTEGER, "parameter for GIDL selector"), IOP( "iiimod", B4SOI_MOD_IIIMOD, IF_INTEGER, "parameter for III selector"), IOP( "eot", B4SOI_MOD_EOT, IF_REAL, "Effective SiO2 thickness"), IOP( "epsrox", B4SOI_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), IOP( "epsrsub", B4SOI_MOD_EPSRSUB, IF_REAL, "Dielectric constant of substrate relative to vacuum"), IOP( "ni0sub", B4SOI_MOD_NI0SUB, IF_REAL, "Intrinsic carrier concentration of substrate at Tnom"), IOP( "bg0sub", B4SOI_MOD_BG0SUB, IF_REAL, "Band-gap of substrate at T=0K"), IOP( "tbgasub", B4SOI_MOD_TBGASUB, IF_REAL, "First parameter of band-gap change due to temperature"), IOP( "tbgbsub", B4SOI_MOD_TBGBSUB, IF_REAL, "Second parameter of band-gap change due to temperature"), IOP( "phig", B4SOI_MOD_PHIG, IF_REAL, "Work function of gate"), IOP( "easub",B4SOI_MOD_EASUB, IF_REAL, "Electron affinity of substrate"), IOP( "leffeot", B4SOI_MOD_LEFFEOT, IF_REAL, "Effective length for extraction of EOT"), IOP( "weffeot", B4SOI_MOD_WEFFEOT, IF_REAL, "Effective width for extraction of EOT"), IOP( "vddeot", B4SOI_MOD_VDDEOT, IF_REAL, "Voltage for extraction of EOT"), IOP( "tempeot", B4SOI_MOD_TEMPEOT, IF_REAL, " Temperature for extraction of EOT"), IOP( "ados", B4SOI_MOD_ADOS, IF_REAL, "Charge centroid parameter"), IOP( "bdos", B4SOI_MOD_BDOS, IF_REAL, "Charge centroid parameter"), IOP( "epsrgate", B4SOI_MOD_EPSRGATE, IF_REAL, "Dielectric constant of gate relative to vacuum"), IOP( "capmod", B4SOI_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", B4SOI_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), /*IOP( "noimod", B4SOI_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), v3.2 */ IOP( "paramchk", B4SOI_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", B4SOI_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", B4SOI_MOD_VERSION, IF_REAL, " parameter for model version"), IOP( "tox", B4SOI_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "toxp", B4SOI_MOD_TOXP, IF_REAL, " Physical gate oxide thickness"), IOP( "toxm", B4SOI_MOD_TOXM, IF_REAL, "Gate oxide thickness used in extraction"), /* v3.2 */ IOP( "dtoxcv", B4SOI_MOD_DTOXCV, IF_REAL, "Delta oxide thickness in meters in CapMod3"), /* v2.2.3 */ IOP( "cdsc", B4SOI_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", B4SOI_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", B4SOI_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", B4SOI_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", B4SOI_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "vsat", B4SOI_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", B4SOI_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", B4SOI_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", B4SOI_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", B4SOI_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", B4SOI_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", B4SOI_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", B4SOI_MOD_NSUB, IF_REAL, "Substrate doping concentration with polarity"), IOP( "nch", B4SOI_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", B4SOI_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "nsd", B4SOI_MOD_NSD, IF_REAL, "S/D doping concentration"), IOP( "gamma1", B4SOI_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", B4SOI_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", B4SOI_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", B4SOI_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", B4SOI_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", B4SOI_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", B4SOI_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", B4SOI_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", B4SOI_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", B4SOI_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", B4SOI_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", B4SOI_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", B4SOI_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "lpe0", B4SOI_MOD_LPE0, IF_REAL, "Lateral non-uniform doping effect"), IOP( "lpeb", B4SOI_MOD_LPEB, IF_REAL, "Lateral non-uniform doping effect for body bias"), IOP( "dvt0", B4SOI_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", B4SOI_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", B4SOI_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", B4SOI_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", B4SOI_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", B4SOI_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", B4SOI_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", B4SOI_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", B4SOI_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", B4SOI_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vfb", B4SOI_MOD_VFB, IF_REAL, "Flat Band Voltage"), /* v4.1 */ IOP( "ua", B4SOI_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", B4SOI_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", B4SOI_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", B4SOI_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", B4SOI_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", B4SOI_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", B4SOI_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "eu", B4SOI_MOD_EU, IF_REAL, "Mobility exponent"), IOP( "ute", B4SOI_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "ucs", B4SOI_MOD_UCS, IF_REAL, "Mobility exponent"), IOP( "ucste", B4SOI_MOD_UCSTE, IF_REAL, " Temperature coefficient of UCS"), IOP( "ud", B4SOI_MOD_UD, IF_REAL, "Coulomb scattering factor of mobility"), IOP( "ud1", B4SOI_MOD_UD1, IF_REAL, "Temperature coefficient of ud"), IOP( "voff", B4SOI_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", B4SOI_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", B4SOI_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", B4SOI_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "xpart", B4SOI_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", B4SOI_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", B4SOI_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", B4SOI_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "rsw", B4SOI_MOD_RSW, IF_REAL, "Source resistance per width"), /* v4.0 */ IOP( "rdw", B4SOI_MOD_RDW, IF_REAL, "Drain resistance per width"), /* v4.0 */ IOP( "rswmin", B4SOI_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), IOP( "rdwmin", B4SOI_MOD_RDWMIN, IF_REAL, "Drain resistance per width at hight Vg"), IOP( "prwg", B4SOI_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", B4SOI_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", B4SOI_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", B4SOI_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", B4SOI_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", B4SOI_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", B4SOI_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", B4SOI_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", B4SOI_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pvag", B4SOI_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "shmod", B4SOI_MOD_SHMOD, IF_INTEGER, "Self heating mode selector"), /* IOP( "ddmod", B4SOI_MOD_DDMOD, IF_INTEGER, "Dynamic depletion mode selector"), */ /*v4.2 soiMod = 1 now has the functionality */ IOP( "tbox", B4SOI_MOD_TBOX, IF_REAL, "Back gate oxide thickness in meters"), IOP( "tsi", B4SOI_MOD_TSI, IF_REAL, "Silicon-on-insulator thickness in meters"), IOP( "etsi", B4SOI_MOD_ETSI, IF_REAL, "Effective Silicon-on-insulator thickness in meters"), IOP( "xj", B4SOI_MOD_XJ, IF_REAL, "Junction Depth"), IOP( "rth0", B4SOI_MOD_RTH0, IF_REAL, "Self-heating thermal resistance"), IOP( "cth0", B4SOI_MOD_CTH0, IF_REAL, "Self-heating thermal capacitance"), IOP( "cfrcoeff", B4SOI_MOD_CFRCOEFF, IF_REAL, "Fringe Cap parameter"), /* v4.4 */ IOP( "egidl", B4SOI_MOD_EGIDL, IF_REAL, "GIDL first parameter"), IOP( "agidl", B4SOI_MOD_AGIDL, IF_REAL, "GIDL second parameter"), IOP( "bgidl", B4SOI_MOD_BGIDL, IF_REAL, "GIDL third parameter"), IOP( "cgidl", B4SOI_MOD_CGIDL, IF_REAL, "GIDL vb parameter"), IOP( "rgidl", B4SOI_MOD_RGIDL, IF_REAL, "GIDL vg parameter"), IOP( "kgidl", B4SOI_MOD_KGIDL, IF_REAL, "GIDL vb parameter"), IOP( "fgidl", B4SOI_MOD_FGIDL, IF_REAL, "GIDL vb parameter"), IOP( "egisl", B4SOI_MOD_EGISL, IF_REAL, "GISL first parameter"), IOP( "agisl", B4SOI_MOD_AGISL, IF_REAL, "GISL second parameter"), IOP( "bgisl", B4SOI_MOD_BGISL, IF_REAL, "GISL third parameter"), IOP( "cgisl", B4SOI_MOD_CGISL, IF_REAL, "GISL vb parameter"), IOP( "rgisl", B4SOI_MOD_RGISL, IF_REAL, "GISL vg parameter"), IOP( "kgisl", B4SOI_MOD_KGISL, IF_REAL, "GISL vb parameter"), IOP( "fgisl", B4SOI_MOD_FGISL, IF_REAL, "GISL vb parameter"), IOP( "ndiode", B4SOI_MOD_NDIODES, IF_REAL,"Diode non-ideality factor"),/*v4.0*/ IOP( "ndioded", B4SOI_MOD_NDIODED, IF_REAL,"Diode non-ideality factor"),/*v4.0*/ IOP( "xbjt", B4SOI_MOD_XBJT, IF_REAL, "Temperature coefficient for Isbjt"), IOP( "xdif", B4SOI_MOD_XDIFS, IF_REAL, "Temperature coefficient for Isdif"), IOP( "xrec", B4SOI_MOD_XRECS, IF_REAL, "Temperature coefficient for Isrec"), IOP( "xtun", B4SOI_MOD_XTUNS, IF_REAL, "Temperature coefficient for Istun"), IOP( "xdifd", B4SOI_MOD_XDIFD, IF_REAL, "Temperature coefficient for Iddif"), IOP( "xrecd", B4SOI_MOD_XRECD, IF_REAL, "Temperature coefficient for Idrec"), IOP( "xtund", B4SOI_MOD_XTUND, IF_REAL, "Temperature coefficient for Idtun"), IOP( "pbswg", B4SOI_MOD_PBSWGS, IF_REAL, "Source(gate side) sidewall junction capacitance built in potential"), /* v4.0 */ IOP( "pbswgd", B4SOI_MOD_PBSWGD, IF_REAL, "Drain(gate side) sidewall junction capacitance built in potential"), /* v4.0 */ IOP( "mjswg", B4SOI_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), /* v4.0 */ IOP( "mjswgd", B4SOI_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), /* v4.0 */ IOP( "cjswg", B4SOI_MOD_CJSWGS, IF_REAL, "Source(gate side) sidewall junction capacitance per unit width"), /* v4.0 */ IOP( "cjswgd", B4SOI_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), /* v4.0 */ IOP( "lint", B4SOI_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", B4SOI_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", B4SOI_MOD_LLC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "lln", B4SOI_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", B4SOI_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", B4SOI_MOD_LWC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "lwn", B4SOI_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", B4SOI_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", B4SOI_MOD_LWLC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "wr", B4SOI_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", B4SOI_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", B4SOI_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", B4SOI_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", B4SOI_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", B4SOI_MOD_WLC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "wln", B4SOI_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", B4SOI_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", B4SOI_MOD_WWC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "wwn", B4SOI_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", B4SOI_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", B4SOI_MOD_WWLC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "b0", B4SOI_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", B4SOI_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", B4SOI_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", B4SOI_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", B4SOI_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", B4SOI_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", B4SOI_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", B4SOI_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", B4SOI_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", B4SOI_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", B4SOI_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "noia", B4SOI_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", B4SOI_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", B4SOI_MOD_NOIC, IF_REAL, "Flicker noise parameter"), /* v3.2 */ IOP( "fnoimod", B4SOI_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), IOP( "tnoimod", B4SOI_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), IOP( "tnoia", B4SOI_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), IOP( "tnoib", B4SOI_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), IOP( "rnoia", B4SOI_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), IOP( "rnoib", B4SOI_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), IOP( "ntnoi", B4SOI_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), /* v3.2 */ /* v4.0 stress effect*/ IOP( "saref", B4SOI_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), IOP( "sbref", B4SOI_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), IOP( "wlod", B4SOI_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), IOP( "ku0", B4SOI_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), IOP( "kvsat", B4SOI_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), IOP( "kvth0", B4SOI_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), IOP( "tku0", B4SOI_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), IOP( "llodku0", B4SOI_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), IOP( "wlodku0", B4SOI_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), IOP( "llodvth", B4SOI_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), IOP( "wlodvth", B4SOI_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), IOP( "lku0", B4SOI_MOD_LKU0, IF_REAL, "Length dependence of ku0"), IOP( "wku0", B4SOI_MOD_WKU0, IF_REAL, "Width dependence of ku0"), IOP( "pku0", B4SOI_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), IOP( "lkvth0", B4SOI_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), IOP( "wkvth0", B4SOI_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), IOP( "pkvth0", B4SOI_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), IOP( "stk2", B4SOI_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), IOP( "lodk2", B4SOI_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), IOP( "steta0", B4SOI_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), IOP( "lodeta0", B4SOI_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), /* v4.0 stress effect end */ /* v4.0 */ IOP( "gbmin", B4SOI_MOD_GBMIN, IF_REAL, "Minimum body conductance"), IOP( "rbdb", B4SOI_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), IOP( "rbsb", B4SOI_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), IOP( "bf", B4SOI_MOD_BF, IF_REAL, "Flicker noise length dependence exponent"), IOP( "w0flk", B4SOI_MOD_W0FLK, IF_REAL, "Flicker noise width dependence"), IOP( "frbody", B4SOI_MOD_FRBODY,IF_REAL, "Layout dependent rbody multiplier "), IOP( "dvtp0", B4SOI_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), IOP( "ldvtp0", B4SOI_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), IOP( "wdvtp0", B4SOI_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), IOP( "pdvtp0", B4SOI_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), IOP( "dvtp1", B4SOI_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), IOP( "ldvtp1", B4SOI_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), IOP( "wdvtp1", B4SOI_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), IOP( "pdvtp1", B4SOI_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), IOP( "dvtp2", B4SOI_MOD_DVTP2, IF_REAL, "Third parameter for Vth shift due to pocket"), IOP( "ldvtp2", B4SOI_MOD_LDVTP2, IF_REAL, "Length dependence of dvtp2"), IOP( "wdvtp2", B4SOI_MOD_WDVTP2, IF_REAL, "Width dependence of dvtp2"), IOP( "pdvtp2", B4SOI_MOD_PDVTP2, IF_REAL, "Cross-term dependence of dvtp2"), IOP( "dvtp3", B4SOI_MOD_DVTP3, IF_REAL, "Third parameter for Vth shift due to pocket"), IOP( "ldvtp3", B4SOI_MOD_LDVTP3, IF_REAL, "Length dependence of dvtp3"), IOP( "wdvtp3", B4SOI_MOD_WDVTP3, IF_REAL, "Width dependence of dvtp3"), IOP( "pdvtp3", B4SOI_MOD_PDVTP3, IF_REAL, "Cross-term dependence of dvtp3"), IOP( "dvtp4", B4SOI_MOD_DVTP4, IF_REAL, "Forth parameter for Vth shift due to pocket"), IOP( "ldvtp4", B4SOI_MOD_LDVTP4, IF_REAL, "Length dependence of dvtp4"), IOP( "wdvtp4", B4SOI_MOD_WDVTP4, IF_REAL, "Width dependence of dvtp4"), IOP( "pdvtp4", B4SOI_MOD_PDVTP4, IF_REAL, "Cross-term dependence of dvtp4"), IOP( "minv", B4SOI_MOD_MINV, IF_REAL, "For moderate invversion in Vgsteff"), IOP( "lminv", B4SOI_MOD_LMINV, IF_REAL, "Length dependence of minv"), IOP( "wminv", B4SOI_MOD_WMINV, IF_REAL, "width dependence of minv"), IOP( "pminv", B4SOI_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), IOP( "pdits", B4SOI_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), IOP( "pditsl", B4SOI_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), IOP( "pditsd", B4SOI_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), IOP( "fprout", B4SOI_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), IOP( "lfprout", B4SOI_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpdits", B4SOI_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), IOP( "lpditsd", B4SOI_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), IOP( "wfprout", B4SOI_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpdits", B4SOI_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), IOP( "wpditsd", B4SOI_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), IOP( "pfprout", B4SOI_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppdits", B4SOI_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), IOP( "ppditsd", B4SOI_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), /* v4.0 */ IOP( "em", B4SOI_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", B4SOI_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", B4SOI_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", B4SOI_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP( "noif", B4SOI_MOD_NOIF, IF_REAL, "Floating body excess noise ideality factor"), /* v2.0 release */ IOP( "k1w1", B4SOI_MOD_K1W1, IF_REAL, "First Body effect width dependent parameter"), IOP( "k1w2", B4SOI_MOD_K1W2, IF_REAL, "Second Boby effect width dependent parameter"), IOP( "ketas", B4SOI_MOD_KETAS, IF_REAL, "Surface potential adjustment for bulk charge effect"), IOP( "dwbc", B4SOI_MOD_DWBC, IF_REAL, "Width offset for body contact isolation edge"), IOP( "beta0", B4SOI_MOD_BETA0, IF_REAL, "First Vds dependent parameter of impact ionizition current"), IOP( "beta1", B4SOI_MOD_BETA1, IF_REAL, "Second Vds dependent parameter of impact ionizition current"), IOP( "beta2", B4SOI_MOD_BETA2, IF_REAL, "Third Vds dependent parameter of impact ionizition current"), IOP( "vdsatii0", B4SOI_MOD_VDSATII0, IF_REAL, "Nominal drain saturation voltage at threshold for impact ionizition current"), IOP( "tii", B4SOI_MOD_TII, IF_REAL, "Temperature dependent parameter for impact ionizition"), IOP( "lii", B4SOI_MOD_LII, IF_REAL, "Channel length dependent parameter at threshold for impact ionizition current"), IOP( "sii0", B4SOI_MOD_SII0, IF_REAL, "First Vgs dependent parameter for impact ionizition current"), IOP( "sii1", B4SOI_MOD_SII1, IF_REAL, "Second Vgs dependent parameter for impact ionizition current"), IOP( "sii2", B4SOI_MOD_SII2, IF_REAL, "Third Vgs dependent parameter for impact ionizition current"), IOP( "siid", B4SOI_MOD_SIID, IF_REAL, "Vds dependent parameter of drain saturation voltage for impact ionizition current"), IOP( "fbjtii", B4SOI_MOD_FBJTII, IF_REAL, "Fraction of bipolar current affecting the impact ionization"), /*4.1*/ IOP( "ebjtii", B4SOI_MOD_EBJTII, IF_REAL, "Impact ionization parameter for BJT part"), IOP( "cbjtii", B4SOI_MOD_CBJTII, IF_REAL, "Length scaling parameter for II BJT part"), IOP( "vbci", B4SOI_MOD_VBCI, IF_REAL, "Internal B-C built-in potential"), IOP( "abjtii", B4SOI_MOD_ABJTII, IF_REAL, "Exponent factor for avalanche current"), IOP( "mbjtii", B4SOI_MOD_MBJTII, IF_REAL, "Internal B-C grading coefficient"), IOP( "tvbci", B4SOI_MOD_TVBCI, IF_REAL, "Temperature coefficient for VBCI"), IOP( "esatii", B4SOI_MOD_ESATII, IF_REAL, "Saturation electric field for impact ionization"), IOP( "ntun", B4SOI_MOD_NTUNS, IF_REAL,"Reverse tunneling non-ideality factor"), IOP( "ntund", B4SOI_MOD_NTUND, IF_REAL,"Reverse tunneling non-ideality factor"), IOP( "nrecf0", B4SOI_MOD_NRECF0S, IF_REAL, "Recombination non-ideality factor at forward bias"), IOP( "nrecf0d", B4SOI_MOD_NRECF0D, IF_REAL, "Recombination non-ideality factor at forward bias"), IOP( "nrecr0", B4SOI_MOD_NRECR0S, IF_REAL, "Recombination non-ideality factor at reversed bias"), IOP( "nrecr0d", B4SOI_MOD_NRECR0D, IF_REAL, "Recombination non-ideality factor at reversed bias"), IOP( "isbjt", B4SOI_MOD_ISBJT, IF_REAL, "BJT injection saturation current"), IOP( "idbjt", B4SOI_MOD_IDBJT, IF_REAL, "BJT injection saturation current"), IOP( "isdif", B4SOI_MOD_ISDIF, IF_REAL, "Body to source/drain injection saturation current"), IOP( "iddif", B4SOI_MOD_IDDIF, IF_REAL, "Body to source/drain injection saturation current"), /* v4.0 */ IOP( "isrec", B4SOI_MOD_ISREC, IF_REAL, "Recombination in depletion saturation current"), IOP( "idrec", B4SOI_MOD_IDREC, IF_REAL, "Recombination in depletion saturation current"), IOP( "istun", B4SOI_MOD_ISTUN, IF_REAL, "Reverse tunneling saturation current"), IOP( "idtun", B4SOI_MOD_IDTUN, IF_REAL, "Reverse tunneling saturation current"), IOP( "ln", B4SOI_MOD_LN, IF_REAL, "Electron/hole diffusion length"), IOP( "vrec0", B4SOI_MOD_VREC0S, IF_REAL, "Voltage dependent parameter for recombination current"), IOP( "vrec0d", B4SOI_MOD_VREC0D, IF_REAL, "Voltage dependent parameter for recombination current"), IOP( "vtun0", B4SOI_MOD_VTUN0S, IF_REAL, "Voltage dependent parameter for tunneling current"), IOP( "vtun0d", B4SOI_MOD_VTUN0D, IF_REAL, "Voltage dependent parameter for tunneling current"), IOP( "nbjt", B4SOI_MOD_NBJT, IF_REAL, "Power coefficient of channel length dependency for bipolar current"), IOP( "lbjt0", B4SOI_MOD_LBJT0, IF_REAL, "Refferenc channel length for bipolar cuurent"), IOP( "ldif0", B4SOI_MOD_LDIF0, IF_REAL, "Channel-length dependency coefficient of diffusion cap"), IOP( "vabjt", B4SOI_MOD_VABJT, IF_REAL, "Early voltage for bipolar current"), IOP( "aely", B4SOI_MOD_AELY, IF_REAL, "Channel length dependency of early voltage for bipolar cuurent"), IOP( "ahli", B4SOI_MOD_AHLIS, IF_REAL, "High level injection parameter for bipolar current"), /* v4.0 */ IOP( "ahlid", B4SOI_MOD_AHLID, IF_REAL, "High level injection parameter for bipolar current"), /* v4.0 */ IOP( "rbody", B4SOI_MOD_RBODY, IF_REAL, "Intrinsic body contact sheet resistance"), IOP( "rbsh", B4SOI_MOD_RBSH, IF_REAL, "Extrinsic body contact sheet resistance"), IOP( "cgeo", B4SOI_MOD_CGEO, IF_REAL, "Gate substrate overlap capacitance per unit channel length"), IOP( "tt", B4SOI_MOD_TT, IF_REAL, "Diffusion capacitance transit time coefficient"), IOP( "ndif", B4SOI_MOD_NDIF, IF_REAL, "Power coefficient of channel length dependency for diffusion capacitance"), IOP( "vsdfb", B4SOI_MOD_VSDFB, IF_REAL, "Source/drain bottom diffusion capacitance flatband voltage"), IOP( "vsdth", B4SOI_MOD_VSDTH, IF_REAL, "Source/drain bottom diffusion capacitance threshold voltage"), IOP( "csdmin", B4SOI_MOD_CSDMIN, IF_REAL, "Source/drain bottom diffusion minimum capacitance"), IOP( "asd", B4SOI_MOD_ASD, IF_REAL, "Source/drain bottom diffusion smoothing parameter"), IOP( "csdesw", B4SOI_MOD_CSDESW, IF_REAL, "Source/drain sidewall fringing capacitance per unit length"), IOP( "ntrecf", B4SOI_MOD_NTRECF, IF_REAL, "Temperature coefficient for Nrecf"), IOP( "ntrecr", B4SOI_MOD_NTRECR, IF_REAL, "Temperature coefficient for Nrecr"), IOP( "dlcb", B4SOI_MOD_DLCB, IF_REAL, "Length offset fitting parameter for body charge"), IOP( "fbody", B4SOI_MOD_FBODY, IF_REAL, "Scaling factor for body charge"), IOP( "tcjswg", B4SOI_MOD_TCJSWGS, IF_REAL, "Temperature coefficient of Cjswgs"), IOP( "tpbswg", B4SOI_MOD_TPBSWGS, IF_REAL, "Temperature coefficient of Pbswgs"), IOP( "tcjswgd", B4SOI_MOD_TCJSWGD, IF_REAL, "Temperature coefficient of Cjswgd"), IOP( "tpbswgd", B4SOI_MOD_TPBSWGD, IF_REAL, "Temperature coefficient of Pbswgd"), IOP( "acde", B4SOI_MOD_ACDE, IF_REAL, "Exponential coefficient for charge thickness in capMod=3 for accumulation and depletion regions"), IOP( "moin", B4SOI_MOD_MOIN, IF_REAL, "Coefficient for the gate-bias dependent surface potential"), IOP( "noff", B4SOI_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), /* v3.2 */ IOP( "delvt", B4SOI_MOD_DELVT, IF_REAL, "Threshold voltage adjust for CV"), IOP( "kb1", B4SOI_MOD_KB1, IF_REAL, "Scaling factor for backgate charge"), IOP( "dlbg", B4SOI_MOD_DLBG, IF_REAL, "Length offset fitting parameter for backgate charge"), /* v2.2 release */ IOP( "igmod", B4SOI_MOD_IGBMOD, IF_INTEGER, "gate-body tunneling current model selector"), /* v3.1.1 */ IOP( "igbmod", B4SOI_MOD_IGBMOD, IF_INTEGER, "gate-body tunneling current model selector"), /* v3.0 */ IOP( "igcmod", B4SOI_MOD_IGCMOD, IF_INTEGER, "gate-channel tunneling current model selector"), /* v3.0 */ IOP( "toxqm", B4SOI_MOD_TOXQM, IF_REAL, "effective oxide thickness considering quantum effect"), IOP( "wth0", B4SOI_MOD_WTH0, IF_REAL, "Minimum width for thermal resistance calculation"), IOP( "rhalo", B4SOI_MOD_RHALO, IF_REAL, "body halo sheet resistance"), IOP( "ntox", B4SOI_MOD_NTOX, IF_REAL, "power term of gate current"), IOP( "toxref", B4SOI_MOD_TOXREF, IF_REAL, "target oxide thickness"), IOP( "ebg", B4SOI_MOD_EBG, IF_REAL, "effective bandgap in gate current calcula."), IOP( "vevb", B4SOI_MOD_VEVB, IF_REAL, "Vaux parameter for valence-band electron tunneling"), IOP( "alphagb1", B4SOI_MOD_ALPHAGB1, IF_REAL, "First Vox dependent parameter for gate curent in inversion"), IOP( "betagb1", B4SOI_MOD_BETAGB1, IF_REAL, "Second Vox dependent parameter for gate currnt in inversion"), IOP( "vgb1", B4SOI_MOD_VGB1, IF_REAL, "Third Vox dependent parameter for gate current in inversion"), IOP( "vecb", B4SOI_MOD_VECB, IF_REAL, "Vaux parameter for conduction-band electron tunneling"), IOP( "alphagb2", B4SOI_MOD_ALPHAGB2, IF_REAL, "First Vox dependent parameter for gate current in accumulation"), IOP( "betagb2", B4SOI_MOD_BETAGB2, IF_REAL, "Second Vox dependent parameter for gate current in accumulation"), IOP( "vgb2", B4SOI_MOD_VGB2, IF_REAL, "Third Vox dependent parameter for gate current in accumulation"), IOP( "aigbcp2", B4SOI_MOD_AIGBCP2, IF_REAL, "First Vgp dependent parameter for gate current in accumulation in AGBCP2 region"), IOP( "bigbcp2", B4SOI_MOD_BIGBCP2, IF_REAL, "Second Vgp dependent parameter for gate current in accumulation in AGBCP2 region"), IOP( "cigbcp2", B4SOI_MOD_CIGBCP2, IF_REAL, "Third Vgp dependent parameter for gate current in accumulation in AGBCP2 region"), IOP( "voxh", B4SOI_MOD_VOXH, IF_REAL, "the limit of Vox in gate current calculation"), IOP( "deltavox", B4SOI_MOD_DELTAVOX, IF_REAL, "the smoothing parameter in the Vox smoothing function"), /* v3.0 */ IOP( "aigc", B4SOI_MOD_AIGC, IF_REAL, "Parameter for Igc"), IOP( "bigc", B4SOI_MOD_BIGC, IF_REAL, "Parameter for Igc"), IOP( "cigc", B4SOI_MOD_CIGC, IF_REAL, "Parameter for Igc"), IOP( "aigsd", B4SOI_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "bigsd", B4SOI_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "cigsd", B4SOI_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "nigc", B4SOI_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), IOP( "pigcd", B4SOI_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), IOP( "poxedge", B4SOI_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), IOP( "dlcig", B4SOI_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), /* v3.0 */ IOP( "soimod", B4SOI_MOD_SOIMOD, IF_INTEGER, "model selector for SOI technology"), /* v3.2 bug fix */ IOP( "vbs0pd", B4SOI_MOD_VBS0PD, IF_REAL, "Upper bound of built-in potential lowering for PD operation"), /* v3.2 */ IOP( "vbs0fd", B4SOI_MOD_VBS0FD, IF_REAL, "Lower bound of built-in potential lowering for FD operation"), /* v3.2 */ IOP( "vbsa", B4SOI_MOD_VBSA, IF_REAL, "Vbs0t offset voltage"), IOP( "nofffd", B4SOI_MOD_NOFFFD,IF_REAL, "smoothing parameter in FD module"), IOP( "vofffd", B4SOI_MOD_VOFFFD,IF_REAL, "smoothing parameter in FD module"), IOP( "k1b", B4SOI_MOD_K1B, IF_REAL, "first backgate body effect parameter"), IOP( "k2b", B4SOI_MOD_K2B, IF_REAL, "second backgate body effect parameter for short channel effect"), IOP( "dk2b", B4SOI_MOD_DK2B, IF_REAL, "third backgate body effect parameter for short channel effect"), IOP( "dvbd0", B4SOI_MOD_DVBD0, IF_REAL, "first short-channel effect parameter in FD module"), IOP( "dvbd1", B4SOI_MOD_DVBD1, IF_REAL, "second short-channel effect parameter in FD module"), IOP( "moinfd", B4SOI_MOD_MOINFD, IF_REAL, "Coefficient for the gate-bias dependent surface potential in FD"), /* v3.0 */ /* v3.1 added for RF */ IOP( "rgatemod", B4SOI_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), IOP("xrcrg1", B4SOI_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), IOP("xrcrg2", B4SOI_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), IOP("rshg", B4SOI_MOD_RSHG, IF_REAL, "Gate sheet resistance"), IOP("ngcon", B4SOI_MOD_NGCON, IF_REAL, "Number of gate contacts"), IOP( "xgw", B4SOI_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "xgl", B4SOI_MOD_XGL, IF_REAL, "Variation in Ldrawn"), /* v3.1 added for RF end */ /* 4.0 */ IOP( "rbodymod", B4SOI_MOD_RBODYMOD, IF_INTEGER, "Body R model selector"), /* 4.0 */ IOP( "rdsmod", B4SOI_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), /* v4.0 */ /* v4.1 */ IOP( "fdmod", B4SOI_MOD_FDMOD, IF_INTEGER, "Improved dVbi model selector"), IOP( "vsce", B4SOI_MOD_VSCE, IF_REAL, "SCE parameter for improved dVbi model"), IOP( "cdsbs", B4SOI_MOD_CDSBS, IF_REAL, "coupling from Vd to Vbs for improved dVbi model"), IOP( "minvcv", B4SOI_MOD_MINVCV, IF_REAL, "For moderate invversion in VgsteffCV"), IOP( "lminvcv", B4SOI_MOD_LMINVCV, IF_REAL, "Length dependence of minvcv"), IOP( "wminvcv", B4SOI_MOD_WMINVCV, IF_REAL, "width dependence of minvcv"), IOP( "pminvcv", B4SOI_MOD_PMINVCV, IF_REAL, "Cross-term dependence of minvcv"), IOP( "voffcv", B4SOI_MOD_VOFFCV, IF_REAL, "CV Threshold voltage offset"), IOP( "lvoffcv", B4SOI_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "wvoffcv", B4SOI_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "pvoffcv", B4SOI_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), /* Added for binning - START */ /* Length Dependence */ /* v3.1 */ IOP( "lxj", B4SOI_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lalphagb1", B4SOI_MOD_LALPHAGB1, IF_REAL, "Length dependence of alphagb1"), IOP( "lbetagb1", B4SOI_MOD_LBETAGB1, IF_REAL, "Length dependence of betagb1"), IOP( "lalphagb2", B4SOI_MOD_LALPHAGB2, IF_REAL, "Length dependence of alphagb2"), IOP( "lbetagb2", B4SOI_MOD_LBETAGB2, IF_REAL, "Length dependence of betagb2"), IOP( "laigbcp2", B4SOI_MOD_LAIGBCP2, IF_REAL, "Length dependence of aigbcp2"), IOP( "lbigbcp2", B4SOI_MOD_LBIGBCP2, IF_REAL, "Length dependence of bigbcp2"), IOP( "lcigbcp2", B4SOI_MOD_LCIGBCP2, IF_REAL, "Length dependence of cigbcp2"), IOP( "lcgsl", B4SOI_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", B4SOI_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappa", B4SOI_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"), IOP( "lndif", B4SOI_MOD_LNDIF, IF_REAL, "Length dependence of ndif"), IOP( "lute", B4SOI_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lkt1", B4SOI_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", B4SOI_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", B4SOI_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lua1", B4SOI_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub1", B4SOI_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc1", B4SOI_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lat", B4SOI_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "lprt", B4SOI_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "lntrecf", B4SOI_MOD_LNTRECF, IF_REAL, "Length dependence of ntrecf"), IOP( "lntrecr", B4SOI_MOD_LNTRECR, IF_REAL, "Length dependence of ntrecr"), IOP( "lxbjt", B4SOI_MOD_LXBJT, IF_REAL, "Length dependence of xbjt"), IOP( "lxdif", B4SOI_MOD_LXDIFS, IF_REAL, "Length dependence of xdif"), IOP( "lxrec", B4SOI_MOD_LXRECS, IF_REAL, "Length dependence of xrec"), IOP( "lxtun", B4SOI_MOD_LXTUNS, IF_REAL, "Length dependence of xtun"), IOP( "lxdifd", B4SOI_MOD_LXDIFD, IF_REAL, "Length dependence of xdifd"), IOP( "lxrecd", B4SOI_MOD_LXRECD, IF_REAL, "Length dependence of xrecd"), IOP( "lxtund", B4SOI_MOD_LXTUND, IF_REAL, "Length dependence of xtund"), /* v3.0 */ IOP( "laigc", B4SOI_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), IOP( "lbigc", B4SOI_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), IOP( "lcigc", B4SOI_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), IOP( "laigsd", B4SOI_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), IOP( "lbigsd", B4SOI_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), IOP( "lcigsd", B4SOI_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), IOP( "lnigc", B4SOI_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), IOP( "lpigcd", B4SOI_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), IOP( "lpoxedge", B4SOI_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), IOP( "lnch", B4SOI_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lnsub", B4SOI_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lngate", B4SOI_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lnsd", B4SOI_MOD_LNSD, IF_REAL, "Length dependence of nsd"), IOP( "lvth0", B4SOI_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvfb", B4SOI_MOD_LVFB, IF_REAL, "Length dependence of vfb"), /* v4.1 */ IOP( "lk1", B4SOI_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lk1w1", B4SOI_MOD_LK1W1, IF_REAL, "Length dependence of k1w1"), IOP( "lk1w2", B4SOI_MOD_LK1W2, IF_REAL, "Length dependence of k1w2"), IOP( "lk2", B4SOI_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", B4SOI_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", B4SOI_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lkb1", B4SOI_MOD_LKB1, IF_REAL, "Length dependence of kb1"), IOP( "lw0", B4SOI_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "llpe0", B4SOI_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), IOP( "llpeb", B4SOI_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), IOP( "ldvt0", B4SOI_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", B4SOI_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", B4SOI_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", B4SOI_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", B4SOI_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", B4SOI_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "lu0", B4SOI_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "leu", B4SOI_MOD_LEU, IF_REAL, " Length dependence of eu"), IOP( "lua", B4SOI_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lub", B4SOI_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "luc", B4SOI_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "lud", B4SOI_MOD_LUD, IF_REAL, "Length dependence of ud"), /* Bug fix # 32 Jul 09 */ IOP( "lud1", B4SOI_MOD_LUD1, IF_REAL, "Length dependence of ud1"), /* Bug fix # 32 Jul 09 */ IOP( "lucste", B4SOI_MOD_LUCSTE, IF_REAL, "Length dependence of ucste"), IOP( "lucs", B4SOI_MOD_LUCS, IF_REAL, "Length dependence of lucs"), IOP( "lvsat", B4SOI_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "la0", B4SOI_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", B4SOI_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "lb0", B4SOI_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", B4SOI_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lketa", B4SOI_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lketas", B4SOI_MOD_LKETAS, IF_REAL, "Length dependence of ketas"), IOP( "la1", B4SOI_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", B4SOI_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lrdsw", B4SOI_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lrsw", B4SOI_MOD_LRSW, IF_REAL, "Length dependence of rsw"), /* v4.0 */ IOP( "lrdw", B4SOI_MOD_LRDW, IF_REAL, "Length dependence of rdw"), /* v4.0 */ IOP( "lprwb", B4SOI_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprwg", B4SOI_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lwr", B4SOI_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "lnfactor", B4SOI_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "ldwg", B4SOI_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", B4SOI_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lvoff", B4SOI_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "leta0", B4SOI_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", B4SOI_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "ldsub", B4SOI_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lcit", B4SOI_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lcdsc", B4SOI_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", B4SOI_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", B4SOI_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lpclm", B4SOI_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", B4SOI_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", B4SOI_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", B4SOI_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "ldrout", B4SOI_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "lpvag", B4SOI_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "ldelta", B4SOI_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lalpha0", B4SOI_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lfbjtii", B4SOI_MOD_LFBJTII, IF_REAL, "Length dependence of fbjtii"), IOP( "labjtii", B4SOI_MOD_LABJTII, IF_REAL, "Length dependence of abjtii"), /*Bug fix # 32 Jul 09*/ IOP( "lcbjtii", B4SOI_MOD_LCBJTII, IF_REAL, "Length dependence of cbjtii"), /*Bug fix # 32 Jul 09*/ IOP( "lebjtii", B4SOI_MOD_LEBJTII, IF_REAL, "Length dependence of ebjtii"), /*Bug fix # 32 Jul 09*/ IOP( "lmbjtii", B4SOI_MOD_LMBJTII, IF_REAL, "Length dependence of mbjtii"), /*Bug fix # 32 Jul 09*/ IOP( "lvbci", B4SOI_MOD_LVBCI, IF_REAL, "Length dependence of vbci"), /*Bug fix # 32 Jul 09*/ IOP( "lbeta0", B4SOI_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lbeta1", B4SOI_MOD_LBETA1, IF_REAL, "Length dependence of beta1"), IOP( "lbeta2", B4SOI_MOD_LBETA2, IF_REAL, "Length dependence of beta2"), IOP( "lvdsatii0", B4SOI_MOD_LVDSATII0, IF_REAL, "Length dependence of vdsatii0"), IOP( "llii", B4SOI_MOD_LLII, IF_REAL, "Length dependence of lii"), IOP( "lesatii", B4SOI_MOD_LESATII, IF_REAL, "Length dependence of esatii"), IOP( "lsii0", B4SOI_MOD_LSII0, IF_REAL, "Length dependence of sii0"), IOP( "lsii1", B4SOI_MOD_LSII1, IF_REAL, "Length dependence of sii1"), IOP( "lsii2", B4SOI_MOD_LSII2, IF_REAL, "Length dependence of sii2"), IOP( "lsiid", B4SOI_MOD_LSIID, IF_REAL, "Length dependence of siid"), IOP( "lagidl", B4SOI_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", B4SOI_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lcgidl", B4SOI_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), IOP( "legidl", B4SOI_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), IOP( "lrgidl", B4SOI_MOD_LRGIDL, IF_REAL, "Length dependence of rgidl"), IOP( "lkgidl", B4SOI_MOD_LKGIDL, IF_REAL, "Length dependence of kgidl"), IOP( "lfgidl", B4SOI_MOD_LFGIDL, IF_REAL, "Length dependence of fgidl"), IOP( "lagisl", B4SOI_MOD_LAGISL, IF_REAL, "Length dependence of agisl"), IOP( "lbgisl", B4SOI_MOD_LBGISL, IF_REAL, "Length dependence of bgisl"), IOP( "lcgisl", B4SOI_MOD_LCGISL, IF_REAL, "Length dependence of cgisl"), IOP( "legisl", B4SOI_MOD_LEGISL, IF_REAL, "Length dependence of egisl"), IOP( "lrgisl", B4SOI_MOD_LRGISL, IF_REAL, "Length dependence of rgisl"), IOP( "lkgisl", B4SOI_MOD_LKGISL, IF_REAL, "Length dependence of kgisl"), IOP( "lfgisl", B4SOI_MOD_LFGISL, IF_REAL, "Length dependence of fgisl"), IOP( "lntun", B4SOI_MOD_LNTUNS, IF_REAL, "Length dependence of ntun"), IOP( "lntund", B4SOI_MOD_LNTUND, IF_REAL, "Length dependence of ntund"), IOP( "lndiode", B4SOI_MOD_LNDIODES, IF_REAL, "Length dependence of ndiode"), IOP( "lndioded", B4SOI_MOD_LNDIODED, IF_REAL, "Length dependence of ndioded"), IOP( "lnrecf0", B4SOI_MOD_LNRECF0S, IF_REAL, "Length dependence of nrecf0"), IOP( "lnrecf0d", B4SOI_MOD_LNRECF0D, IF_REAL, "Length dependence of nrecf0d"), IOP( "lnrecr0", B4SOI_MOD_LNRECR0S, IF_REAL, "Length dependence of nrecr0"), IOP( "lnrecr0d", B4SOI_MOD_LNRECR0D, IF_REAL, "Length dependence of nrecr0d"), IOP( "lisbjt", B4SOI_MOD_LISBJT, IF_REAL, "Length dependence of isbjt"), IOP( "lidbjt", B4SOI_MOD_LIDBJT, IF_REAL, "Length dependence of idbjt"), IOP( "lisdif", B4SOI_MOD_LISDIF, IF_REAL, "Length dependence of isdif"), IOP( "liddif", B4SOI_MOD_LIDDIF, IF_REAL, "Length dependence of iddif"), IOP( "lisrec", B4SOI_MOD_LISREC, IF_REAL, "Length dependence of isrec"), IOP( "lidrec", B4SOI_MOD_LIDREC, IF_REAL, "Length dependence of idrec"), IOP( "listun", B4SOI_MOD_LISTUN, IF_REAL, "Length dependence of istun"), IOP( "lidtun", B4SOI_MOD_LIDTUN, IF_REAL, "Length dependence of idtun"), IOP( "lvrec0", B4SOI_MOD_LVREC0S, IF_REAL, "Length dependence of vrec0"), IOP( "lvrec0d", B4SOI_MOD_LVREC0D, IF_REAL, "Length dependence of vrec0d"), IOP( "lvtun0", B4SOI_MOD_LVTUN0S, IF_REAL, "Length dependence of vtun0"), IOP( "lvtun0d", B4SOI_MOD_LVTUN0D, IF_REAL, "Length dependence of vtun0d"), IOP( "lnbjt", B4SOI_MOD_LNBJT, IF_REAL, "Length dependence of nbjt"), IOP( "llbjt0", B4SOI_MOD_LLBJT0, IF_REAL, "Length dependence of lbjt0"), IOP( "lvabjt", B4SOI_MOD_LVABJT, IF_REAL, "Length dependence of vabjt"), IOP( "laely", B4SOI_MOD_LAELY, IF_REAL, "Length dependence of aely"), IOP( "lahli", B4SOI_MOD_LAHLIS, IF_REAL, "Length dependence of ahli"),/*v4.0*/ IOP( "lahlid", B4SOI_MOD_LAHLID, IF_REAL, "Length dependence of ahlid"),/*v4.0*/ IOP( "lvsdfb", B4SOI_MOD_LVSDFB, IF_REAL, "Length dependence of vsdfb"), IOP( "lvsdth", B4SOI_MOD_LVSDTH, IF_REAL, "Length dependence of vsdth"), IOP( "ldelvt", B4SOI_MOD_LDELVT, IF_REAL, "Length dependence of delvt"), IOP( "lacde", B4SOI_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", B4SOI_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", B4SOI_MOD_LNOFF, IF_REAL, "Length dependence of noff"), /* v3.2 */ /* v3.1 added for RF */ IOP("lxrcrg1", B4SOI_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), IOP("lxrcrg2", B4SOI_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), /* v3.1 added for RF end*/ /* Width Dependence */ /* v3.1 */ IOP( "wxj", B4SOI_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "walphagb1", B4SOI_MOD_WALPHAGB1, IF_REAL, "Width dependence of alphagb1"), IOP( "wbetagb1", B4SOI_MOD_WBETAGB1, IF_REAL, "Width dependence of betagb1"), IOP( "walphagb2", B4SOI_MOD_WALPHAGB2, IF_REAL, "Width dependence of alphagb2"), IOP( "wbetagb2", B4SOI_MOD_WBETAGB2, IF_REAL, "Width dependence of betagb2"), IOP( "waigbcp2", B4SOI_MOD_WAIGBCP2, IF_REAL, "Width dependence of aigbcp2"), IOP( "wbigbcp2", B4SOI_MOD_WBIGBCP2, IF_REAL, "Width dependence of bigbcp2"), IOP( "wcigbcp2", B4SOI_MOD_WCIGBCP2, IF_REAL, "Width dependence of cigbcp2"), IOP( "wcgsl", B4SOI_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", B4SOI_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappa", B4SOI_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"), IOP( "wndif", B4SOI_MOD_WNDIF, IF_REAL, "Width dependence of ndif"), IOP( "wute", B4SOI_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wkt1", B4SOI_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", B4SOI_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", B4SOI_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wua1", B4SOI_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub1", B4SOI_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc1", B4SOI_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wat", B4SOI_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wprt", B4SOI_MOD_WPRT, IF_REAL, "Width dependence of prt "), IOP( "wntrecf", B4SOI_MOD_WNTRECF, IF_REAL, "Width dependence of ntrecf"), IOP( "wntrecr", B4SOI_MOD_WNTRECR, IF_REAL, "Width dependence of ntrecr"), IOP( "wxbjt", B4SOI_MOD_WXBJT, IF_REAL, "Width dependence of xbjt"), IOP( "wxdif", B4SOI_MOD_WXDIFS, IF_REAL, "Width dependence of xdif"), IOP( "wxrec", B4SOI_MOD_WXRECS, IF_REAL, "Width dependence of xrec"), IOP( "wxtun", B4SOI_MOD_WXTUNS, IF_REAL, "Width dependence of xtun"), IOP( "wxdifd", B4SOI_MOD_WXDIFD, IF_REAL, "Width dependence of xdifd"), IOP( "wxrecd", B4SOI_MOD_WXRECD, IF_REAL, "Width dependence of xrecd"), IOP( "wxtund", B4SOI_MOD_WXTUND, IF_REAL, "Width dependence of xtund"), /* v3.0 */ IOP( "waigc", B4SOI_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), IOP( "wbigc", B4SOI_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), IOP( "wcigc", B4SOI_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), IOP( "waigsd", B4SOI_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), IOP( "wbigsd", B4SOI_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), IOP( "wcigsd", B4SOI_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), IOP( "wnigc", B4SOI_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), IOP( "wpigcd", B4SOI_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), IOP( "wpoxedge", B4SOI_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), IOP( "wnch", B4SOI_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wnsub", B4SOI_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wngate", B4SOI_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wnsd", B4SOI_MOD_WNSD, IF_REAL, "Width dependence of nsd"), IOP( "wvth0", B4SOI_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvfb", B4SOI_MOD_WVFB, IF_REAL, "Width dependence of vfb"), /* v4.1 */ IOP( "wk1", B4SOI_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wk1w1", B4SOI_MOD_WK1W1, IF_REAL, "Width dependence of k1w1"), IOP( "wk1w2", B4SOI_MOD_WK1W2, IF_REAL, "Width dependence of k1w2"), IOP( "wk2", B4SOI_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", B4SOI_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", B4SOI_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "wkb1", B4SOI_MOD_WKB1, IF_REAL, "Width dependence of kb1"), IOP( "ww0", B4SOI_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wlpe0", B4SOI_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), IOP( "wlpeb", B4SOI_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), IOP( "wdvt0", B4SOI_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", B4SOI_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", B4SOI_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", B4SOI_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", B4SOI_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", B4SOI_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wu0", B4SOI_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "weu", B4SOI_MOD_WEU, IF_REAL, "Width dependence of eu"), IOP( "wua", B4SOI_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wub", B4SOI_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wuc", B4SOI_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wud", B4SOI_MOD_WUD, IF_REAL, "Width dependence of ud"), /* Bug fix # 32 Jul 09 */ IOP( "wud1", B4SOI_MOD_WUD1, IF_REAL, "Width dependence of ud1"), /* Bug fix # 32 Jul 09 */ IOP( "wucste", B4SOI_MOD_WUCSTE, IF_REAL, "Width dependence of ucste"), IOP( "wucs", B4SOI_MOD_WUCS, IF_REAL, "Width dependence of ucs"), IOP( "wvsat", B4SOI_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wa0", B4SOI_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", B4SOI_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wb0", B4SOI_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", B4SOI_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wketa", B4SOI_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wketas", B4SOI_MOD_WKETAS, IF_REAL, "Width dependence of ketas"), IOP( "wa1", B4SOI_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", B4SOI_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wrdsw", B4SOI_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wrsw", B4SOI_MOD_WRSW, IF_REAL, "Width dependence of rsw"), /* v4.0 */ IOP( "wrdw", B4SOI_MOD_WRDW, IF_REAL, "Width dependence of rdw"), /* v4.0 */ IOP( "wprwb", B4SOI_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprwg", B4SOI_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wwr", B4SOI_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wnfactor", B4SOI_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wdwg", B4SOI_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", B4SOI_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wvoff", B4SOI_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "weta0", B4SOI_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", B4SOI_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wdsub", B4SOI_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wcit", B4SOI_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wcdsc", B4SOI_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", B4SOI_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", B4SOI_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wpclm", B4SOI_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", B4SOI_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", B4SOI_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", B4SOI_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wdrout", B4SOI_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wpvag", B4SOI_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wdelta", B4SOI_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "walpha0", B4SOI_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "wfbjtii", B4SOI_MOD_WFBJTII, IF_REAL, "Width dependence of fbjtii"), IOP( "wabjtii", B4SOI_MOD_WABJTII, IF_REAL, "Width dependence of abjtii"), /*Bug fix # 32 Jul 09 */ IOP( "wcbjtii", B4SOI_MOD_WCBJTII, IF_REAL, "Width dependence of cbjtii"), /*Bug fix # 32 Jul 09 */ IOP( "webjtii", B4SOI_MOD_WEBJTII, IF_REAL, "Width dependence of ebjtii"), /*Bug fix # 32 Jul 09 */ IOP( "wmbjtii", B4SOI_MOD_WMBJTII, IF_REAL, "Width dependence of mbjtii"), /*Bug fix # 32 Jul 09 */ IOP( "wvbci", B4SOI_MOD_WVBCI, IF_REAL, "Width dependence of vbci"), /*Bug fix # 32 Jul 09*/ IOP( "wbeta0", B4SOI_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wbeta1", B4SOI_MOD_WBETA1, IF_REAL, "Width dependence of beta1"), IOP( "wbeta2", B4SOI_MOD_WBETA2, IF_REAL, "Width dependence of beta2"), IOP( "wvdsatii0", B4SOI_MOD_WVDSATII0, IF_REAL, "Width dependence of vdsatii0"), IOP( "wlii", B4SOI_MOD_WLII, IF_REAL, "Width dependence of lii"), IOP( "wesatii", B4SOI_MOD_WESATII, IF_REAL, "Width dependence of esatii"), IOP( "wsii0", B4SOI_MOD_WSII0, IF_REAL, "Width dependence of sii0"), IOP( "wsii1", B4SOI_MOD_WSII1, IF_REAL, "Width dependence of sii1"), IOP( "wsii2", B4SOI_MOD_WSII2, IF_REAL, "Width dependence of sii2"), IOP( "wsiid", B4SOI_MOD_WSIID, IF_REAL, "Width dependence of siid"), IOP( "wagidl", B4SOI_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", B4SOI_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wcgidl", B4SOI_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), IOP( "wegidl", B4SOI_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), IOP( "wrgidl", B4SOI_MOD_WRGIDL, IF_REAL, "Width dependence of rgidl"), IOP( "wkgidl", B4SOI_MOD_WKGIDL, IF_REAL, "Width dependence of kgidl"), IOP( "wfgidl", B4SOI_MOD_WFGIDL, IF_REAL, "Width dependence of fgidl"), IOP( "wagisl", B4SOI_MOD_WAGISL, IF_REAL, "Width dependence of agisl"), IOP( "wbgisl", B4SOI_MOD_WBGISL, IF_REAL, "Width dependence of bgisl"), IOP( "wcgisl", B4SOI_MOD_WCGISL, IF_REAL, "Width dependence of cgisl"), IOP( "wegisl", B4SOI_MOD_WEGISL, IF_REAL, "Width dependence of egisl"), IOP( "wrgisl", B4SOI_MOD_WRGISL, IF_REAL, "Width dependence of rgisl"), IOP( "wkgisl", B4SOI_MOD_WKGISL, IF_REAL, "Width dependence of kgisl"), IOP( "wfgisl", B4SOI_MOD_WFGISL, IF_REAL, "Width dependence of fgisl"), IOP( "wntun", B4SOI_MOD_WNTUNS, IF_REAL, "Width dependence of ntun"), IOP( "wntund", B4SOI_MOD_WNTUND, IF_REAL, "Width dependence of ntund"), IOP( "wndiode", B4SOI_MOD_WNDIODES, IF_REAL, "Width dependence of ndiode"), IOP( "wndioded", B4SOI_MOD_WNDIODED, IF_REAL, "Width dependence of ndioded"), IOP( "wnrecf0", B4SOI_MOD_WNRECF0S, IF_REAL, "Width dependence of nrecf0"), IOP( "wnrecf0d", B4SOI_MOD_WNRECF0D, IF_REAL, "Width dependence of nrecf0d"), IOP( "wnrecr0", B4SOI_MOD_WNRECR0S, IF_REAL, "Width dependence of nrecr0"), IOP( "wnrecr0d", B4SOI_MOD_WNRECR0D, IF_REAL, "Width dependence of nrecr0d"), IOP( "wisbjt", B4SOI_MOD_WISBJT, IF_REAL, "Width dependence of isbjt"), IOP( "widbjt", B4SOI_MOD_WIDBJT, IF_REAL, "Width dependence of idbjt"), IOP( "wisdif", B4SOI_MOD_WISDIF, IF_REAL, "Width dependence of isdif"), IOP( "widdif", B4SOI_MOD_WIDDIF, IF_REAL, "Width dependence of iddif"), IOP( "wisrec", B4SOI_MOD_WISREC, IF_REAL, "Width dependence of isrec"), IOP( "widrec", B4SOI_MOD_WIDREC, IF_REAL, "Width dependence of idrec"), IOP( "wistun", B4SOI_MOD_WISTUN, IF_REAL, "Width dependence of istun"), IOP( "widtun", B4SOI_MOD_WIDTUN, IF_REAL, "Width dependence of idtun"), IOP( "wvrec0", B4SOI_MOD_WVREC0S, IF_REAL, "Width dependence of vrec0"), IOP( "wvrec0d", B4SOI_MOD_WVREC0D, IF_REAL, "Width dependence of vrec0d"), IOP( "wvtun0", B4SOI_MOD_WVTUN0S, IF_REAL, "Width dependence of vtun0"), IOP( "wvtun0d", B4SOI_MOD_WVTUN0D, IF_REAL, "Width dependence of vtun0d"), IOP( "wnbjt", B4SOI_MOD_WNBJT, IF_REAL, "Width dependence of nbjt"), IOP( "wlbjt0", B4SOI_MOD_WLBJT0, IF_REAL, "Width dependence of lbjt0"), IOP( "wvabjt", B4SOI_MOD_WVABJT, IF_REAL, "Width dependence of vabjt"), IOP( "waely", B4SOI_MOD_WAELY, IF_REAL, "Width dependence of aely"), IOP( "wahli", B4SOI_MOD_WAHLIS,IF_REAL, "Width dependence of ahli"),/* v4.0 */ IOP( "wahlid", B4SOI_MOD_WAHLID,IF_REAL, "Width dependence of ahlid"),/* v4.0 */ IOP( "wvsdfb", B4SOI_MOD_WVSDFB, IF_REAL, "Width dependence of vsdfb"), IOP( "wvsdth", B4SOI_MOD_WVSDTH, IF_REAL, "Width dependence of vsdth"), IOP( "wdelvt", B4SOI_MOD_WDELVT, IF_REAL, "Width dependence of delvt"), IOP( "wacde", B4SOI_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", B4SOI_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", B4SOI_MOD_WNOFF, IF_REAL, "Width dependence of noff"), /* v3.2 */ /* v3.1 added for RF */ IOP("wxrcrg1", B4SOI_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), /* IOP("Wxrcrg2", B4SOI_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2") *//*Bug fix # 32 Jul 09 */ IOP("wxrcrg2", B4SOI_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), /* added for RF model end*/ /* Cross-term Dependence */ /* v3.1 */ IOP( "pxj", B4SOI_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "palphagb1", B4SOI_MOD_PALPHAGB1, IF_REAL, "Cross-term dependence of alphagb1"), IOP( "pbetagb1", B4SOI_MOD_PBETAGB1, IF_REAL, "Cross-term dependence of betagb1"), IOP( "palphagb2", B4SOI_MOD_PALPHAGB2, IF_REAL, "Cross-term dependence of alphagb2"), IOP( "pbetagb2", B4SOI_MOD_PBETAGB2, IF_REAL, "Cross-term dependence of betagb2"), IOP( "paigbcp2", B4SOI_MOD_PAIGBCP2, IF_REAL, "Cross-term dependence of aigbcp2"), IOP( "pbigbcp2", B4SOI_MOD_PBIGBCP2, IF_REAL, "Cross-term dependence of bigbcp2"), IOP( "pcigbcp2", B4SOI_MOD_PCIGBCP2, IF_REAL, "Cross-term dependence of cigbcp2"), IOP( "pcgsl", B4SOI_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", B4SOI_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappa", B4SOI_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"), IOP( "pndif", B4SOI_MOD_PNDIF, IF_REAL, "Cross-term dependence of ndif"), IOP( "pute", B4SOI_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pkt1", B4SOI_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", B4SOI_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", B4SOI_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pua1", B4SOI_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub1", B4SOI_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc1", B4SOI_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pat", B4SOI_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pprt", B4SOI_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "pntrecf", B4SOI_MOD_PNTRECF, IF_REAL, "Cross-term dependence of ntrecf"), IOP( "pntrecr", B4SOI_MOD_PNTRECR, IF_REAL, "Cross-term dependence of ntrecr"), IOP( "pxbjt", B4SOI_MOD_PXBJT, IF_REAL, "Cross-term dependence of xbjt"), IOP( "pxdif", B4SOI_MOD_PXDIFS, IF_REAL, "Cross-term dependence of xdif"), IOP( "pxrec", B4SOI_MOD_PXRECS, IF_REAL, "Cross-term dependence of xrec"), IOP( "pxtun", B4SOI_MOD_PXTUNS, IF_REAL, "Cross-term dependence of xtun"), IOP( "pxdifd", B4SOI_MOD_PXDIFD, IF_REAL, "Cross-term dependence of xdifd"), IOP( "pxrecd", B4SOI_MOD_PXRECD, IF_REAL, "Cross-term dependence of xrecd"), IOP( "pxtund", B4SOI_MOD_PXTUND, IF_REAL, "Cross-term dependence of xtund"), /* v3.0 */ IOP( "paigc", B4SOI_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), IOP( "pbigc", B4SOI_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), IOP( "pcigc", B4SOI_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), IOP( "paigsd", B4SOI_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), IOP( "pbigsd", B4SOI_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), IOP( "pcigsd", B4SOI_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), IOP( "pnigc", B4SOI_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), IOP( "ppigcd", B4SOI_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), IOP( "ppoxedge", B4SOI_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), IOP( "pnch", B4SOI_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pnsub", B4SOI_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pnsd", B4SOI_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), IOP( "pngate", B4SOI_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pvth0", B4SOI_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvfb", B4SOI_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), /* v4.1 */ IOP( "pk1", B4SOI_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pk1w1", B4SOI_MOD_PK1W1, IF_REAL, "Cross-term dependence of k1w1"), IOP( "pk1w2", B4SOI_MOD_PK1W2, IF_REAL, "Cross-term dependence of k1w2"), IOP( "pk2", B4SOI_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", B4SOI_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", B4SOI_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pkb1", B4SOI_MOD_PKB1, IF_REAL, "Cross-term dependence of kb1"), IOP( "pw0", B4SOI_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "plpe0", B4SOI_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), IOP( "plpeb", B4SOI_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), IOP( "pdvt0", B4SOI_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", B4SOI_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", B4SOI_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", B4SOI_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", B4SOI_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", B4SOI_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pu0", B4SOI_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "peu", B4SOI_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), IOP( "pua", B4SOI_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pub", B4SOI_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "puc", B4SOI_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "pud", B4SOI_MOD_PUD, IF_REAL, "Cross-term dependence of ud"), /*Bug fix # 32 Jul 09 */ IOP( "pud1", B4SOI_MOD_PUD1, IF_REAL, "Cross-term dependence of ud1"), /*Bug fix # 32 Jul 09 */ IOP( "pucste", B4SOI_MOD_PUCSTE, IF_REAL, "Cross-term dependence of ucste"), IOP( "pucs", B4SOI_MOD_PUCS, IF_REAL, "Cross-term dependence of ucs"), IOP( "pvsat", B4SOI_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pa0", B4SOI_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", B4SOI_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pb0", B4SOI_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", B4SOI_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pketa", B4SOI_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pketas", B4SOI_MOD_PKETAS, IF_REAL, "Cross-term dependence of ketas"), IOP( "pa1", B4SOI_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", B4SOI_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "prdsw", B4SOI_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "prsw", B4SOI_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw "),/*v4.0*/ IOP( "prdw", B4SOI_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw "),/*v4.0*/ IOP( "pprwb", B4SOI_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprwg", B4SOI_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pwr", B4SOI_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pnfactor", B4SOI_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pdwg", B4SOI_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", B4SOI_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pvoff", B4SOI_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "peta0", B4SOI_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", B4SOI_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "pdsub", B4SOI_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pcit", B4SOI_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pcdsc", B4SOI_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", B4SOI_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", B4SOI_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "ppclm", B4SOI_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", B4SOI_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", B4SOI_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", B4SOI_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pdrout", B4SOI_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "ppvag", B4SOI_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pdelta", B4SOI_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "palpha0", B4SOI_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "pfbjtii", B4SOI_MOD_PFBJTII, IF_REAL, "Cross-term dependence of fbjtii"), IOP( "pabjtii", B4SOI_MOD_PABJTII, IF_REAL, "Cross-term dependence of abjtii"), /* Bug fix # 32 Jul 09 */ IOP( "pcbjtii", B4SOI_MOD_PCBJTII, IF_REAL, "Cross-term dependence of cbjtii"), /* Bug fix # 32 Jul 09 */ IOP( "pebjtii", B4SOI_MOD_PEBJTII, IF_REAL, "Cross-term dependence of ebjtii"), /* Bug fix # 32 Jul 09 */ IOP( "pmbjtii", B4SOI_MOD_PMBJTII, IF_REAL, "Cross-term dependence of mbjtii"), /* Bug fix # 32 Jul 09 */ IOP( "pvbci", B4SOI_MOD_PVBCI, IF_REAL, "Cross-term dependence of vbci"), /* Bug fix # 32 Jul 09 */ IOP( "pbeta0", B4SOI_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pbeta1", B4SOI_MOD_PBETA1, IF_REAL, "Cross-term dependence of beta1"), IOP( "pbeta2", B4SOI_MOD_PBETA2, IF_REAL, "Cross-term dependence of beta2"), IOP( "pvdsatii0", B4SOI_MOD_PVDSATII0, IF_REAL, "Cross-term dependence of vdsatii0"), IOP( "plii", B4SOI_MOD_PLII, IF_REAL, "Cross-term dependence of lii"), IOP( "pesatii", B4SOI_MOD_PESATII, IF_REAL, "Cross-term dependence of esatii"), IOP( "psii0", B4SOI_MOD_PSII0, IF_REAL, "Cross-term dependence of sii0"), IOP( "psii1", B4SOI_MOD_PSII1, IF_REAL, "Cross-term dependence of sii1"), IOP( "psii2", B4SOI_MOD_PSII2, IF_REAL, "Cross-term dependence of sii2"), IOP( "psiid", B4SOI_MOD_PSIID, IF_REAL, "Cross-term dependence of siid"), IOP( "pagidl", B4SOI_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", B4SOI_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pcgidl", B4SOI_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), IOP( "pegidl", B4SOI_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), IOP( "prgidl", B4SOI_MOD_PRGIDL, IF_REAL, "Cross-term dependence of rgidl"), IOP( "pkgidl", B4SOI_MOD_PKGIDL, IF_REAL, "Cross-term dependence of kgidl"), IOP( "pfgidl", B4SOI_MOD_PFGIDL, IF_REAL, "Cross-term dependence of fgidl"), IOP( "pagisl", B4SOI_MOD_PAGISL, IF_REAL, "Cross-term dependence of agisl"), IOP( "pbgisl", B4SOI_MOD_PBGISL, IF_REAL, "Cross-term dependence of bgisl"), IOP( "pcgisl", B4SOI_MOD_PCGISL, IF_REAL, "Cross-term dependence of cgisl"), IOP( "pegisl", B4SOI_MOD_PEGISL, IF_REAL, "Cross-term dependence of egisl"), IOP( "prgisl", B4SOI_MOD_PRGISL, IF_REAL, "Cross-term dependence of rgisl"), IOP( "pkgisl", B4SOI_MOD_PKGISL, IF_REAL, "Cross-term dependence of kgisl"), IOP( "pfgisl", B4SOI_MOD_PFGISL, IF_REAL, "Cross-term dependence of fgisl"), IOP( "pntun", B4SOI_MOD_PNTUNS, IF_REAL, "Cross-term dependence of ntun"), IOP( "pntund", B4SOI_MOD_PNTUND, IF_REAL, "Cross-term dependence of ntund"), IOP( "pndiode", B4SOI_MOD_PNDIODES, IF_REAL,"Cross-term dependence of ndiode"), IOP( "pndioded", B4SOI_MOD_PNDIODED, IF_REAL,"Cross-term dependence of ndiode"), IOP( "pnrecf0", B4SOI_MOD_PNRECF0S, IF_REAL,"Cross-term dependence of nrecf0"), IOP( "pnrecf0d", B4SOI_MOD_PNRECF0D, IF_REAL,"Cross-term dependence of nrecf0"), IOP( "pnrecr0", B4SOI_MOD_PNRECR0S, IF_REAL,"Cross-term dependence of nrecr0"), IOP( "pnrecr0d", B4SOI_MOD_PNRECR0D, IF_REAL,"Cross-term dependence of nrecr0"), IOP( "pisbjt", B4SOI_MOD_PISBJT, IF_REAL, "Cross-term dependence of isbjt"), IOP( "pidbjt", B4SOI_MOD_PIDBJT, IF_REAL, "Cross-term dependence of idbjt"), IOP( "pisdif", B4SOI_MOD_PISDIF, IF_REAL, "Cross-term dependence of isdif"), IOP( "piddif", B4SOI_MOD_PIDDIF, IF_REAL, "Cross-term dependence of iddif"), IOP( "pisrec", B4SOI_MOD_PISREC, IF_REAL, "Cross-term dependence of isrec"), IOP( "pidrec", B4SOI_MOD_PIDREC, IF_REAL, "Cross-term dependence of idrec"), IOP( "pistun", B4SOI_MOD_PISTUN, IF_REAL, "Cross-term dependence of istun"), IOP( "pidtun", B4SOI_MOD_PIDTUN, IF_REAL, "Cross-term dependence of idtun"), IOP( "pvrec0", B4SOI_MOD_PVREC0S, IF_REAL, "Cross-term dependence of vrec0"), IOP( "pvrec0d", B4SOI_MOD_PVREC0D, IF_REAL, "Cross-term dependence of vrec0d"), IOP( "pvtun0", B4SOI_MOD_PVTUN0S, IF_REAL, "Cross-term dependence of vtun0"), IOP( "pvtun0d", B4SOI_MOD_PVTUN0D, IF_REAL, "Cross-term dependence of vtun0d"), IOP( "pnbjt", B4SOI_MOD_PNBJT, IF_REAL, "Cross-term dependence of nbjt"), IOP( "plbjt0", B4SOI_MOD_PLBJT0, IF_REAL, "Cross-term dependence of lbjt0"), IOP( "pvabjt", B4SOI_MOD_PVABJT, IF_REAL, "Cross-term dependence of vabjt"), IOP( "paely", B4SOI_MOD_PAELY, IF_REAL, "Cross-term dependence of aely"), IOP( "pahli",B4SOI_MOD_PAHLIS,IF_REAL, "X-term dependence of ahli"),/* v4.0 */ IOP( "pahlid",B4SOI_MOD_PAHLID,IF_REAL, "X-term dependence of ahlid"),/* v4.0 */ IOP( "pvsdfb", B4SOI_MOD_PVSDFB, IF_REAL, "Cross-term dependence of vsdfb"), IOP( "pvsdth", B4SOI_MOD_PVSDTH, IF_REAL, "Cross-term dependence of vsdth"), IOP( "pdelvt", B4SOI_MOD_PDELVT, IF_REAL, "Cross-term dependence of delvt"), IOP( "pacde", B4SOI_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", B4SOI_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", B4SOI_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), /* v3.2 */ /* v3.1 added for RF */ IOP("pxrcrg1", B4SOI_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), IOP("pxrcrg2", B4SOI_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), /* v3.1 added for RF end */ /* v4.0 backward compatibility */ IOP( "nlx", B4SOI_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "lnlx", B4SOI_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "wnlx", B4SOI_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "pnlx", B4SOI_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "ngidl", B4SOI_MOD_NGIDL, IF_REAL, "GIDL first parameter"), IOP( "lngidl", B4SOI_MOD_LNGIDL, IF_REAL, "Length dependence of ngidl"), IOP( "wngidl", B4SOI_MOD_WNGIDL, IF_REAL, "Width dependence of ngidl"), IOP( "pngidl", B4SOI_MOD_PNGIDL, IF_REAL, "Cross-term dependence of ngidl"), /* Added for binning - END */ IOP("vgs_max", B4SOI_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", B4SOI_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", B4SOI_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", B4SOI_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", B4SOI_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", B4SOI_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", B4SOI_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", B4SOI_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B4SOInames[] = { "Drain", "Gate", "Source", "Backgate", "", "Body", "Temp", "Charge", }; int B4SOInSize = NUMELEMS(B4SOInames); int B4SOIpTSize = NUMELEMS(B4SOIpTable); int B4SOImPTSize = NUMELEMS(B4SOImPTable); int B4SOIiSize = sizeof(B4SOIinstance); int B4SOImSize = sizeof(B4SOImodel); ngspice-26/src/spicelib/devices/bsimsoi/b4soidef.h0000644000265600020320000040470512264261473021563 0ustar andreasadmin/********** Copyright 2010 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung authors:1999-2004 Pin Su, Hui Wan b3soidef.h Authors:2005- Hui Wan, Jane Xi Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu Authors: 2009- Tanvir Morshed, Ali Niknejad, Chenming Hu Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu File: b4soidef.h **********/ #ifndef B4SOI #define B4SOI #define SOICODE /* Uncomment the following line to activate debugging variable output */ /* debug1, debug2, debug3, ... */ /* #define B4SOI_DEBUG_OUT */ #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sB4SOIinstance { struct sB4SOImodel *B4SOImodPtr; struct sB4SOIinstance *B4SOInextInstance; IFuid B4SOIname; int B4SOIstates; /* index into state table for this device */ int B4SOIdNode; int B4SOIgNodeExt; /* v3.1 changed gNode to gNodeExt */ int B4SOIsNode; int B4SOIeNode; int B4SOIpNode; int B4SOIbNode; int B4SOItempNode; int B4SOIdNodePrime; int B4SOIsNodePrime; int B4SOIgNode; /* v3.1 */ int B4SOIgNodeMid; /* v3.1 */ int B4SOIdbNode; /* v4.0 */ int B4SOIsbNode; /* v4.0 */ int B4SOIvbsNode; /* for Debug */ int B4SOIidsNode; int B4SOIicNode; int B4SOIibsNode; int B4SOIibdNode; int B4SOIiiiNode; int B4SOIigNode; int B4SOIgiggNode; int B4SOIgigdNode; int B4SOIgigbNode; int B4SOIigidlNode; int B4SOIitunNode; int B4SOIibpNode; int B4SOIcbbNode; int B4SOIcbdNode; int B4SOIcbgNode; int B4SOIqbfNode; int B4SOIqjsNode; int B4SOIqjdNode; double B4SOIphi; double B4SOIvtm; double B4SOIni; double B4SOIueff; double B4SOIthetavth; double B4SOIvon; double B4SOIvdsat; double B4SOIcgdo; double B4SOIcgso; double B4SOIcgeo; double B4SOIids; double B4SOIic; double B4SOIibs; double B4SOIibd; double B4SOIiii; double B4SOIig; double B4SOIgigg; double B4SOIgigd; double B4SOIgigb; double B4SOIgige; /* v3.0 */ /* v3.1 added for RF */ double B4SOIgcrg; double B4SOIgcrgd; double B4SOIgcrgg; double B4SOIgcrgs; double B4SOIgcrgb; /* v3.1 added for end */ double B4SOIInv_ODeff; /* v4.0 */ double B4SOIkvsat; /* v4.0 */ double B4SOIgrbsb; /* v4.0 */ double B4SOIgrbdb; /* v4.0 */ double B4SOIrbsb; /* v4.0 */ double B4SOIrbdb; /* v4.0 */ double B4SOIGGjdb; /* v4.0 */ double B4SOIGGjsb; /* v4.0 */ double B4SOIgbgiigbpb; /* v4.0 */ double B4SOIgiigidlb; /* v4.0 */ double B4SOIgiigidld; /* v4.0 */ double B4SOIdelvto; /* v4.0 */ double B4SOIgstot; /* v4.0 for rdsmod */ double B4SOIgstotd; /* v4.0 for rdsmod */ double B4SOIgstotg; /* v4.0 for rdsmod */ double B4SOIgstots; /* v4.0 for rdsmod */ double B4SOIgstotb; /* v4.0 for rdsmod */ double B4SOIgdtot; /* v4.0 for rdsmod */ double B4SOIgdtotd; /* v4.0 for rdsmod */ double B4SOIgdtotg; /* v4.0 for rdsmod */ double B4SOIgdtots; /* v4.0 for rdsmod */ double B4SOIgdtotb; /* v4.0 for rdsmod */ double B4SOIigp; /* v4.1 for Igb in the AGBCP2 region */ double B4SOIgigpg; /* v4.1 for Igb in the AGBCP2 region */ double B4SOIgigpp; /* v4.1 for Igb in the AGBCP2 region */ double B4SOITempSH; /* v4.2 for portability of SH temp */ double B4SOIigidl; double B4SOIigisl; double B4SOIitun; double B4SOIibp; /* double B4SOIabeff; */ /* v4.2 never used in the code */ double B4SOIvbseff; double B4SOIcbg; double B4SOIcbb; double B4SOIcbd; double B4SOIqb; double B4SOIqbf; double B4SOIqjs; double B4SOIqjd; int B4SOIfloat; /* v3.1 for RF */ double B4SOIgrgeltd; /* v3.1 for RF end */ double B4SOIl; double B4SOIw; double B4SOIm; double B4SOIdrainArea; double B4SOIsourceArea; double B4SOIdrainSquares; double B4SOIsourceSquares; double B4SOIdrainPerimeter; double B4SOIsourcePerimeter; double B4SOIsourceConductance; double B4SOIdrainConductance; /* v4.0 stress effect instance param */ double B4SOIsa; double B4SOIsb; double B4SOIsd; double B4SOIu0temp; double B4SOIvsattemp; double B4SOIvth0; double B4SOIvfb; double B4SOIvfbzb; double B4SOIk2; double B4SOIk2ox; double B4SOIeta0; /* end of v4.0 stress effect instance param */ /*4.1 mobmod=4*/ double B4SOIvtfbphi1; double B4SOIvgsteffvth; double B4SOIicVBS; double B4SOIicVDS; double B4SOIicVGS; double B4SOIicVES; double B4SOIicVPS; int B4SOIbjtoff; int B4SOIbodyMod; int B4SOIdebugMod; double B4SOIrth0; double B4SOIcth0; double B4SOIbodySquares; double B4SOIrbodyext; double B4SOIfrbody; /* v2.0 release */ double B4SOInbc; double B4SOInseg; double B4SOIpdbcp; double B4SOIpsbcp; double B4SOIagbcp; double B4SOIagbcp2; /* v4.1 improvement on BC */ double B4SOIagbcpd; /* v4.0 */ double B4SOIaebcp; double B4SOIvbsusr; int B4SOItnodeout; /* Deleted from pParam and moved to here */ double B4SOIcsesw; double B4SOIcdesw; double B4SOIcsbox; double B4SOIcdbox; double B4SOIcsmin; double B4SOIcdmin; double B4SOIst4; double B4SOIdt4; int B4SOIoff; int B4SOImode; /* v4.0 added */ double B4SOInf; /* v4.0 added end */ /* v3.2 added */ double B4SOInstar; double B4SOIAbulk; /* v3.2 added end */ int B4SOIsoiMod; /* v3.2 */ /* v3.1 for RF */ int B4SOIrgateMod; /* v3.1 for RF end */ /* v4.0 */ int B4SOIrbodyMod; /* v4.0 end */ /* OP point */ double B4SOIqinv; double B4SOIcd; double B4SOIcjs; double B4SOIcjd; double B4SOIcbody; double B4SOIcbs; double B4SOIIgb; /* v2.2 release */ double B4SOIcgate; double B4SOIgigs; double B4SOIgigT; double B4SOIcbodcon; double B4SOIcth; /* double B4SOIcsubstrate; */ /* v4.2 never used in the code */ double B4SOIgm; double B4SOIgme; /* v3.0 */ double B4SOIcb; double B4SOIcdrain; double B4SOIgds; double B4SOIgmbs; double B4SOIgmT; #ifdef B4SOI_DEBUG_OUT double B4SOIdebug1; double B4SOIdebug2; double B4SOIdebug3; #endif double B4SOIgbbs; double B4SOIgbgs; double B4SOIgbds; double B4SOIgbes; /* v3.0 */ double B4SOIgbps; double B4SOIgbT; /* v3.0 */ double B4SOIIgcs; double B4SOIgIgcsg; double B4SOIgIgcsd; double B4SOIgIgcss; double B4SOIgIgcsb; double B4SOIgIgcse; double B4SOIIgcd; double B4SOIgIgcdg; double B4SOIgIgcdd; double B4SOIgIgcds; double B4SOIgIgcdb; double B4SOIgIgcde; double B4SOIIgs; double B4SOIgIgsg; double B4SOIgIgss; double B4SOIIgd; double B4SOIgIgdg; double B4SOIgIgdd; double B4SOIgjsd; double B4SOIgjsb; double B4SOIgjsg; double B4SOIgjsT; double B4SOIgjdb; double B4SOIgjdd; double B4SOIgjdg; double B4SOIgjde; /* v3.0 */ double B4SOIgjdT; double B4SOIgbpbs; double B4SOIgbpps; double B4SOIgbpT; double B4SOIgtempb; double B4SOIgtempg; double B4SOIgtempd; double B4SOIgtempe; /* v3.0 */ double B4SOIgtempT; double B4SOIqgate; double B4SOIqdrn; double B4SOIqsrc; double B4SOIqbulk; double B4SOIcapbd; double B4SOIcapbs; double B4SOIcggb; double B4SOIcgdb; double B4SOIcgsb; double B4SOIcgeb; double B4SOIcgT; double B4SOIcbgb; double B4SOIcbdb; double B4SOIcbsb; double B4SOIcbeb; double B4SOIcbT; double B4SOIcdgb; double B4SOIcddb; double B4SOIcdsb; double B4SOIcdeb; double B4SOIcdT; double B4SOIceeb; double B4SOIceT; double B4SOIqse; double B4SOIgcse; double B4SOIqde; double B4SOIgcde; double B4SOIrds; /* v2.2.3 */ double B4SOIVgsteff; /* v2.2.3 */ double B4SOIVdseff; /* v2.2.3 */ double B4SOIAbovVgst2Vtm; /* v2.2.3 */ /* 4.0 */ double B4SOIidovVds; double B4SOIcjsb; double B4SOIcjdb; /* 4.0 end */ struct b4soiSizeDependParam *pParam; unsigned B4SOIlGiven :1; unsigned B4SOIwGiven :1; unsigned B4SOImGiven :1; unsigned B4SOIdrainAreaGiven :1; unsigned B4SOIsourceAreaGiven :1; unsigned B4SOIdrainSquaresGiven :1; unsigned B4SOIsourceSquaresGiven :1; unsigned B4SOIdrainPerimeterGiven :1; unsigned B4SOIsourcePerimeterGiven :1; unsigned B4SOIdNodePrimeSet :1; unsigned B4SOIsNodePrimeSet :1; unsigned B4SOIsaGiven :1; /* v4.0 for stress */ unsigned B4SOIsbGiven :1; /* v4.0 for stress */ unsigned B4SOIsdGiven :1; /* v4.0 for stress */ unsigned B4SOIrbdbGiven :1; /* v4.0 for rbody network */ unsigned B4SOIrbsbGiven :1; /* v4.0 for rbody network */ unsigned B4SOIicVBSGiven :1; unsigned B4SOIicVDSGiven :1; unsigned B4SOIicVGSGiven :1; unsigned B4SOIicVESGiven :1; unsigned B4SOIicVPSGiven :1; unsigned B4SOIbjtoffGiven :1; unsigned B4SOIdebugModGiven :1; unsigned B4SOIrth0Given :1; unsigned B4SOIcth0Given :1; unsigned B4SOIbodySquaresGiven :1; unsigned B4SOIfrbodyGiven: 1; /* v2.0 release */ unsigned B4SOInbcGiven :1; unsigned B4SOInsegGiven :1; unsigned B4SOIpdbcpGiven :1; unsigned B4SOIpsbcpGiven :1; unsigned B4SOIagbcpGiven :1; unsigned B4SOIagbcp2Given :1; /* v4.1 improvement on BC */ unsigned B4SOIagbcpdGiven :1; /* v4.0 */ unsigned B4SOIaebcpGiven :1; unsigned B4SOIvbsusrGiven :1; unsigned B4SOItnodeoutGiven :1; unsigned B4SOIoffGiven :1; unsigned B4SOIrgateModGiven :1; /* v3.1 */ unsigned B4SOIsoiModGiven :1; /* v3.2 */ /* v4.0 added */ unsigned B4SOInfGiven :1; unsigned B4SOIrbodyModGiven :1; unsigned B4SOIdelvtoGiven :1; /* v4.0 added end */ /* v4.0 */ double *B4SOIDBdpPtr; double *B4SOIDBdbPtr; double *B4SOIDBbPtr; double *B4SOIDPdbPtr; double *B4SOISBspPtr; double *B4SOISBbPtr; double *B4SOISBsbPtr; double *B4SOISPsbPtr; double *B4SOIBsbPtr; double *B4SOIBdbPtr; double *B4SOIDgPtr; /* v4.0 for rdsMod =1 */ double *B4SOIDspPtr; /* v4.0 for rdsMod =1 */ double *B4SOIDbPtr; /* v4.0 for rdsMod =1 */ double *B4SOISdpPtr; /* v4.0 for rdsMod =1 */ double *B4SOISgPtr; /* v4.0 for rdsMod =1 */ double *B4SOISbPtr; /* v4.0 for rdsMod =1 */ /* v4.0 end */ double *B4SOIPgPtr; /* v4.1 for Ig_agbcp2 */ double *B4SOIGpPtr; /* v4.1 for Ig_agbcp2 */ /* v3.1 added for RF */ double *B4SOIGgmPtr; double *B4SOIGgePtr; double *B4SOIGMdpPtr; double *B4SOIGMgPtr; double *B4SOIGMspPtr; double *B4SOIGMgmPtr; double *B4SOIGMgePtr; double *B4SOIGMePtr; double *B4SOIGMbPtr; double *B4SOISPgmPtr; double *B4SOIDPgmPtr; double *B4SOIEgmPtr; double *B4SOIGEdpPtr; double *B4SOIGEgPtr; double *B4SOIGEgmPtr; double *B4SOIGEgePtr; double *B4SOIGEspPtr; double *B4SOIGEbPtr; /* v3.1 added for RF end */ double *B4SOIGePtr; double *B4SOIDPePtr; double *B4SOISPePtr; double *B4SOIEePtr; double *B4SOIEbPtr; double *B4SOIBePtr; double *B4SOIEgPtr; double *B4SOIEdpPtr; double *B4SOIEspPtr; double *B4SOITemptempPtr; double *B4SOITempdpPtr; double *B4SOITempspPtr; double *B4SOITempgPtr; double *B4SOITempbPtr; double *B4SOITempePtr; /* v3.0 */ double *B4SOIGtempPtr; double *B4SOIDPtempPtr; double *B4SOISPtempPtr; double *B4SOIEtempPtr; double *B4SOIBtempPtr; double *B4SOIPtempPtr; double *B4SOIBpPtr; double *B4SOIPbPtr; double *B4SOIPpPtr; double *B4SOIDdPtr; double *B4SOIGgPtr; double *B4SOISsPtr; double *B4SOIBbPtr; double *B4SOIDPdpPtr; double *B4SOISPspPtr; double *B4SOIDdpPtr; double *B4SOIGbPtr; double *B4SOIGdpPtr; double *B4SOIGspPtr; double *B4SOISspPtr; double *B4SOIBdpPtr; double *B4SOIBspPtr; double *B4SOIDPspPtr; double *B4SOIDPdPtr; double *B4SOIBgPtr; double *B4SOIDPgPtr; double *B4SOISPgPtr; double *B4SOISPsPtr; double *B4SOIDPbPtr; double *B4SOISPbPtr; double *B4SOISPdpPtr; double *B4SOIVbsPtr; /* Debug */ double *B4SOIIdsPtr; double *B4SOIIcPtr; double *B4SOIIbsPtr; double *B4SOIIbdPtr; double *B4SOIIiiPtr; double *B4SOIIgPtr; double *B4SOIGiggPtr; double *B4SOIGigdPtr; double *B4SOIGigbPtr; double *B4SOIIgidlPtr; double *B4SOIItunPtr; double *B4SOIIbpPtr; double *B4SOICbbPtr; double *B4SOICbdPtr; double *B4SOICbgPtr; double *B4SOIqbPtr; double *B4SOIQbfPtr; double *B4SOIQjsPtr; double *B4SOIQjdPtr; #ifdef USE_OMP /* per instance storage of results, to update matrix at a later stge */ int B4SOINode_sh; double B4SOINode_1; double B4SOINode_2; double B4SOINode_3; double B4SOINode_4; double B4SOINode_5; double B4SOINode_6; double B4SOINode_7; double B4SOINode_8; double B4SOINode_9; double B4SOINode_10; double B4SOINode_11; double B4SOINode_12; double B4SOINode_13; double B4SOINode_14; double B4SOINode_15; double B4SOI_1; double B4SOI_2; double B4SOI_3; double B4SOI_4; double B4SOI_5; double B4SOI_6; double B4SOI_7; double B4SOI_8; double B4SOI_9; double B4SOI_10; double B4SOI_11; double B4SOI_12; double B4SOI_13; double B4SOI_14; double B4SOI_15; double B4SOI_16; double B4SOI_17; double B4SOI_18; double B4SOI_19; double B4SOI_20; double B4SOI_21; double B4SOI_22; double B4SOI_23; double B4SOI_24; double B4SOI_25; double B4SOI_26; double B4SOI_27; double B4SOI_28; double B4SOI_29; double B4SOI_30; double B4SOI_31; double B4SOI_32; double B4SOI_33; double B4SOI_34; double B4SOI_35; double B4SOI_36; double B4SOI_37; double B4SOI_38; double B4SOI_39; double B4SOI_40; double B4SOI_41; double B4SOI_42; double B4SOI_43; double B4SOI_44; double B4SOI_45; double B4SOI_46; double B4SOI_47; double B4SOI_48; double B4SOI_49; double B4SOI_50; double B4SOI_51; double B4SOI_52; double B4SOI_53; double B4SOI_54; double B4SOI_55; double B4SOI_56; double B4SOI_57; double B4SOI_58; double B4SOI_59; double B4SOI_60; double B4SOI_61; double B4SOI_62; double B4SOI_63; double B4SOI_64; double B4SOI_65; double B4SOI_66; double B4SOI_67; double B4SOI_68; double B4SOI_69; double B4SOI_70; double B4SOI_71; double B4SOI_72; double B4SOI_73; double B4SOI_74; double B4SOI_75; double B4SOI_76; double B4SOI_77; double B4SOI_78; double B4SOI_79; double B4SOI_80; double B4SOI_81; double B4SOI_82; double B4SOI_83; double B4SOI_84; double B4SOI_85; double B4SOI_86; double B4SOI_87; double B4SOI_88; double B4SOI_89; double B4SOI_90; double B4SOI_91; double B4SOI_92; double B4SOI_93; double B4SOI_94; double B4SOI_95; double B4SOI_96; double B4SOI_97; double B4SOI_98; double B4SOI_99; double B4SOI_100; double B4SOI_101; double B4SOI_102; #endif #define B4SOIvbd B4SOIstates+ 0 #define B4SOIvbs B4SOIstates+ 1 #define B4SOIvgs B4SOIstates+ 2 #define B4SOIvds B4SOIstates+ 3 #define B4SOIves B4SOIstates+ 4 #define B4SOIvps B4SOIstates+ 5 #define B4SOIvg B4SOIstates+ 6 #define B4SOIvd B4SOIstates+ 7 #define B4SOIvs B4SOIstates+ 8 #define B4SOIvp B4SOIstates+ 9 #define B4SOIve B4SOIstates+ 10 #define B4SOIdeltemp B4SOIstates+ 11 #define B4SOIqb B4SOIstates+ 12 #define B4SOIcqb B4SOIstates+ 13 #define B4SOIqg B4SOIstates+ 14 #define B4SOIcqg B4SOIstates+ 15 #define B4SOIqd B4SOIstates+ 16 #define B4SOIcqd B4SOIstates+ 17 #define B4SOIqe B4SOIstates+ 18 #define B4SOIcqe B4SOIstates+ 19 #define B4SOIqbs B4SOIstates+ 20 #define B4SOIcqbs B4SOIstates+ 21 /* v4.0 */ #define B4SOIqbd B4SOIstates+ 22 #define B4SOIcqbd B4SOIstates+ 23 /* v4.0 */ #define B4SOIqbe B4SOIstates+ 24 #define B4SOIqth B4SOIstates+ 25 #define B4SOIcqth B4SOIstates+ 26 /* v3.1 added or changed for RF */ #define B4SOIvges B4SOIstates+ 27 #define B4SOIvgms B4SOIstates+ 28 #define B4SOIvgge B4SOIstates+ 29 #define B4SOIvggm B4SOIstates+ 30 /* #define B4SOIcqgmid B4SOIstates+ 31 */ /* Bug # 29 */ /* #define B4SOIqgmid B4SOIstates + 32 */ /* Bug # 29 */ #define B4SOIqgmid B4SOIstates+ 31 /* Bug Fix # 29 Jul09*/ #define B4SOIcqgmid B4SOIstates + 32 /* Bug Fix # 29 Jul09*/ /* v3.1 added or changed for RF end */ /* v4.0 */ #define B4SOIvdbs B4SOIstates + 33 #define B4SOIvdbd B4SOIstates + 34 #define B4SOIvsbs B4SOIstates + 35 #define B4SOIvses B4SOIstates + 36 #define B4SOIvdes B4SOIstates + 37 /* v4.0 end */ #define B4SOInumStates 38 /* indices to the array of B4SOI NOISE SOURCES */ #define B4SOIRDNOIZ 0 #define B4SOIRSNOIZ 1 #define B4SOIRGNOIZ 2 #define B4SOIIDNOIZ 3 #define B4SOIFLNOIZ 4 #define B4SOIFB_IBSNOIZ 5 /* v4.0 */ #define B4SOIFB_IBDNOIZ 6 /* v4.0 */ #define B4SOIIGSNOIZ 7 #define B4SOIIGDNOIZ 8 #define B4SOIIGBNOIZ 9 #define B4SOIRBSBNOIZ 10 /* v4.0 */ #define B4SOIRBDBNOIZ 11 /* v4.0 */ #define B4SOIRBODYNOIZ 12 /* v4.0 */ #define B4SOITOTNOIZ 13 /* v4.0 */ #define B4SOINSRCS 14 /* Number of MOSFET(3) noise sources v3.2 */ #ifndef NONOISE double B4SOInVar[NSTATVARS][B4SOINSRCS]; #else /* NONOISE */ double **B4SOInVar; #endif /* NONOISE */ } B4SOIinstance ; struct b4soiSizeDependParam { double Width; double Length; double Rth0; double Cth0; double B4SOIcdsc; double B4SOIcdscb; double B4SOIcdscd; double B4SOIcit; double B4SOInfactor; double B4SOIvsat; double B4SOIat; double B4SOIa0; double B4SOIags; double B4SOIa1; double B4SOIa2; double B4SOIketa; double B4SOInpeak; double B4SOInsub; double B4SOIngate; double B4SOInsd; double B4SOIgamma1; double B4SOIgamma2; double B4SOIvbx; double B4SOIvbi; double B4SOIvbm; double B4SOIvbsc; double B4SOIxt; double B4SOIphi; double B4SOIlitl; double B4SOIk1; double B4SOIkt1; double B4SOIkt1l; double B4SOIkt2; double B4SOIk2; double B4SOIk3; double B4SOIk3b; double B4SOIw0; double B4SOIlpe0; double B4SOIdvt0; double B4SOIdvt1; double B4SOIdvt2; double B4SOIdvt0w; double B4SOIdvt1w; double B4SOIdvt2w; double B4SOIdrout; double B4SOIdsub; double B4SOIvth0; double B4SOIua; double B4SOIua1; double B4SOIub; double B4SOIub1; double B4SOIuc; double B4SOIuc1; double B4SOIu0; double B4SOIute; /*4.1 high k mobility*/ double B4SOIud; double B4SOIud1; double B4SOIeu; double B4SOIucs; double B4SOIucste; double B4SOIvoff; double B4SOIvfb; double B4SOIuatemp; double B4SOIubtemp; double B4SOIuctemp; double B4SOIrbody; double B4SOIrth; double B4SOIcth; double B4SOIrds0denom; double B4SOIvfbb; double B4SOIjbjts; /* v4.0 */ double B4SOIjbjtd; /* v4.0 */ double B4SOIjdifs; /* v4.0 */ double B4SOIjdifd; /* v4.0 */ double B4SOIjrecs; /* v4.0 */ double B4SOIjrecd; /* v4.0 */ double B4SOIjtuns; /* v4.0 */ double B4SOIjtund; /* v4.0 */ double B4SOIrdw; /* v4.0 for rdsMod = 1 */ double B4SOIrsw; /* v4.0 for rdsMod = 1 */ double B4SOIrdwmin; /* v4.0 for rdsMod = 1 */ double B4SOIrswmin; /* v4.0 for rdsMod = 1 */ double B4SOIrd0; /* v4.0 for rdsMod = 1 */ double B4SOIrs0; /* v4.0 for rdsMod = 1 */ double B4SOIsdt1; double B4SOIst2; double B4SOIst3; double B4SOIdt2; double B4SOIdt3; double B4SOIdelta; double B4SOIrdsw; double B4SOIrds0; double B4SOIprwg; double B4SOIprwb; double B4SOIprt; double B4SOIeta0; double B4SOIetab; double B4SOIpclm; double B4SOIpdibl1; double B4SOIpdibl2; double B4SOIpdiblb; double B4SOIpvag; double B4SOIwr; double B4SOIdwg; double B4SOIdwb; double B4SOIb0; double B4SOIb1; double B4SOIalpha0; double B4SOIbeta0; /* v3.0 */ double B4SOIaigc; double B4SOIbigc; double B4SOIcigc; double B4SOIaigsd; double B4SOIbigsd; double B4SOIcigsd; double B4SOInigc; double B4SOIpigcd; double B4SOIpoxedge; double B4SOIdlcig; /* v3.1 added for RF */ double B4SOIxrcrg1; double B4SOIxrcrg2; /* v3.1 added for RF end */ /* v4.0 */ /* added for stress effect */ double B4SOIku0; double B4SOIkvth0; double B4SOIku0temp; double B4SOIrho_ref; double B4SOIinv_od_ref; /* added for stress effect end */ double NFinger; /* v4.0 end */ /* CV model */ double B4SOIcgsl; double B4SOIcgdl; double B4SOIckappa; double B4SOIcf; double B4SOIclc; double B4SOIcle; /* Added for binning - START0 */ /* v3.1 */ double B4SOIxj; double B4SOIalphaGB1; double B4SOIbetaGB1; double B4SOIalphaGB2; double B4SOIbetaGB2; double B4SOIaigbcp2; /* 4.1 */ double B4SOIbigbcp2; /* 4.1 */ double B4SOIcigbcp2; /* 4.1 */ double B4SOIndif; double B4SOIntrecf; double B4SOIntrecr; double B4SOIxbjt; double B4SOIxdif; double B4SOIxrec; double B4SOIxtun; double B4SOIxdifd; double B4SOIxrecd; double B4SOIxtund; double B4SOIkb1; double B4SOIk1w1; double B4SOIk1w2; double B4SOIketas; double B4SOIfbjtii; /*4.1 Iii model*/ double B4SOIebjtii; double B4SOIcbjtii; double B4SOIvbci; double B4SOIabjtii; double B4SOImbjtii; double B4SOIbeta1; double B4SOIbeta2; double B4SOIvdsatii0; double B4SOIlii; double B4SOIesatii; double B4SOIsii0; double B4SOIsii1; double B4SOIsii2; double B4SOIsiid; double B4SOIagidl; double B4SOIbgidl; double B4SOIcgidl; /* v4.0 */ double B4SOIegidl; double B4SOIrgidl; double B4SOIkgidl; double B4SOIfgidl; double B4SOIagisl; double B4SOIbgisl; double B4SOIcgisl; /* v4.0 */ double B4SOIegisl; double B4SOIrgisl; double B4SOIkgisl; double B4SOIfgisl; double B4SOIntun; /* v4.0 */ double B4SOIntund; /* v4.0 */ double B4SOIndiode; /* v4.0 */ double B4SOIndioded; /* v4.0 */ double B4SOInrecf0; /* v4.0 */ double B4SOInrecf0d; /* v4.0 */ double B4SOInrecr0; /* v4.0 */ double B4SOInrecr0d; /* v4.0 */ double B4SOIisbjt; double B4SOIidbjt; /* v4.0 */ double B4SOIisdif; double B4SOIiddif; /* v4.0 */ double B4SOIisrec; double B4SOIidrec; /* v4.0 */ double B4SOIistun; double B4SOIidtun; /* v4.0 */ double B4SOIvrec0; /* v4.0 */ double B4SOIvrec0d; /* v4.0 */ double B4SOIvtun0; /* v4.0 */ double B4SOIvtun0d; /* v4.0 */ double B4SOInbjt; double B4SOIlbjt0; double B4SOIvabjt; double B4SOIaely; double B4SOIvsdfb; double B4SOIvsdth; double B4SOIdelvt; /* Added by binning - END0 */ /* Pre-calculated constants */ double B4SOIdw; double B4SOIdl; double B4SOIleff; double B4SOIweff; double B4SOIdwc; double B4SOIdlc; double B4SOIleffCV; double B4SOIweffCV; double B4SOIabulkCVfactor; double B4SOIcgso; double B4SOIcgdo; double B4SOIcgeo; double B4SOIu0temp; double B4SOIvsattemp; double B4SOIsqrtPhi; double B4SOIphis3; double B4SOIXdep0; double B4SOIsqrtXdep0; double B4SOItheta0vb0; double B4SOIthetaRout; /* v3.2 */ double B4SOIqsi; /* v2.2 release */ double B4SOIoxideRatio; /* v2.0 release */ double B4SOIk1eff; double B4SOIwdios; double B4SOIwdiod; double B4SOIwdiodCV; double B4SOIwdiosCV; double B4SOIarfabjt; double B4SOIlratio; double B4SOIlratiodif; double B4SOIvearly; double B4SOIahli; /* v4.0 */ double B4SOIahlid; /* v4.0 */ double B4SOIahli0s; /* v4.0 */ double B4SOIahli0d; /* v4.0 */ double B4SOIvfbzb; double B4SOIldeb; double B4SOIacde; double B4SOImoin; double B4SOInoff; /* v3.2 */ double B4SOIleffCVb; double B4SOIleffCVbg; /* double B4SOIcof1; double B4SOIcof2; double B4SOIcof3; double B4SOIcof4; */ /* v4.2 nover used in the code */ double B4SOIcdep0; /* v3.0 */ double B4SOIToxRatio; double B4SOIAechvb; double B4SOIBechvb; double B4SOIToxRatioEdge; double B4SOIAechvbEdges; /* LFW */ double B4SOIAechvbEdged; /* LFW */ double B4SOIBechvbEdge; double B4SOIvfbsd; /* v4.0 */ double B4SOIk1ox; /* v4.0 for Vth */ double B4SOIk2ox; /* v4.0 for Vth */ double B4SOIlpeb; /* v4.0 for Vth */ double B4SOIdvtp0; /* v4.0 for Vth */ double B4SOIdvtp1; /* v4.0 for Vth */ double B4SOIdvtp2; /* v4.1 for Vth */ double B4SOIdvtp3; /* v4.1 for Vth */ double B4SOIdvtp4; /* v4.1 for Vth */ double B4SOIminv; /* v4.0 for Vgsteff */ double B4SOImstar; /* v4.0 for Vgsteff */ double B4SOIfprout; /* v4.0 for DITS in Id */ double B4SOIpdits; /* v4.0 for DITS in Id */ double B4SOIpditsd; /* v4.0 for DITS in Id */ /*4.1*/ double B4SOImstarcv; double B4SOIminvcv; double B4SOIvoffcv; double B4SOIdvtp2factor; struct b4soiSizeDependParam *pNext; }; typedef struct sB4SOImodel { int B4SOImodType; struct sB4SOImodel *B4SOInextModel; B4SOIinstance *B4SOIinstances; IFuid B4SOImodName; int B4SOItype; int B4SOImobMod; int B4SOIcapMod; int B4SOIfnoiMod; /* v3.2 */ int B4SOItnoiMod; /* v3.2 */ int B4SOIshMod; int B4SOIbinUnit; int B4SOIparamChk; int B4SOImtrlMod; /*4.1*/ int B4SOIvgstcvMod; int B4SOIgidlMod; int B4SOIiiiMod; double B4SOIversion; double B4SOIeot; /*4.1*/ double B4SOIepsrox; double B4SOIepsrsub; double B4SOItoxp; double B4SOIleffeot; double B4SOIweffeot; double B4SOIvddeot; double B4SOItempeot; double B4SOIados; double B4SOIbdos; double B4SOIepsrgate; double B4SOIni0sub; double B4SOIbg0sub; double B4SOItbgasub; double B4SOItbgbsub; double B4SOIphig; double B4SOIeasub; double B4SOItvbci; double B4SOItox; double B4SOItoxm; /* v3.2 */ double B4SOIdtoxcv; /* v2.2.3 */ double B4SOIcdsc; double B4SOIcdscb; double B4SOIcdscd; double B4SOIcit; double B4SOInfactor; double B4SOIvsat; double B4SOIat; double B4SOIa0; double B4SOIags; double B4SOIa1; double B4SOIa2; double B4SOIketa; double B4SOInsub; double B4SOInpeak; double B4SOIngate; double B4SOInsd; double B4SOIlnsd; double B4SOIwnsd; double B4SOIpnsd; double B4SOIgamma1; double B4SOIgamma2; double B4SOIvbx; double B4SOIvbm; double B4SOIxt; double B4SOIk1; double B4SOIkt1; double B4SOIkt1l; double B4SOIkt2; double B4SOIk2; double B4SOIk3; double B4SOIk3b; double B4SOIw0; double B4SOIlpe0; double B4SOIdvt0; double B4SOIdvt1; double B4SOIdvt2; double B4SOIdvt0w; double B4SOIdvt1w; double B4SOIdvt2w; double B4SOIdrout; double B4SOIdsub; double B4SOIvth0; double B4SOIua; double B4SOIua1; double B4SOIub; double B4SOIub1; double B4SOIuc; double B4SOIuc1; double B4SOIu0; double B4SOIute; /*4.1 high k mobility*/ double B4SOIud; double B4SOIlud; double B4SOIwud; double B4SOIpud; double B4SOIud1; double B4SOIlud1; double B4SOIwud1; double B4SOIpud1; double B4SOIeu; double B4SOIleu; double B4SOIweu; double B4SOIpeu; double B4SOIucs; double B4SOIlucs; double B4SOIwucs; double B4SOIpucs; double B4SOIucste; double B4SOIlucste; double B4SOIwucste; double B4SOIpucste; double B4SOIvoff; double B4SOIdelta; double B4SOIrdsw; double B4SOIrdw; /* v4.0 for rdsMod = 1 */ double B4SOIrsw; /* v4.0 for rdsMod = 1 */ double B4SOIrdwmin; /* v4.0 for rdsMod = 1 */ double B4SOIrswmin; /* v4.0 for rdsMod = 1 */ double B4SOIprwg; double B4SOIprwb; double B4SOIprt; double B4SOIeta0; double B4SOIetab; double B4SOIpclm; double B4SOIpdibl1; double B4SOIpdibl2; double B4SOIpdiblb; double B4SOIpvag; double B4SOIwr; double B4SOIdwg; double B4SOIdwb; double B4SOIb0; double B4SOIb1; double B4SOIalpha0; double B4SOItbox; double B4SOItsi; double B4SOIetsi; double B4SOIxj; double B4SOIkb1; double B4SOIrth0; double B4SOIcth0; double B4SOIegidl; double B4SOIcfrcoeff; /* v4.4 */ double B4SOIagidl; double B4SOIbgidl; double B4SOIcgidl; /* v4.0 */ double B4SOIrgidl; double B4SOIkgidl; double B4SOIfgidl; double B4SOIegisl; double B4SOIagisl; double B4SOIbgisl; double B4SOIcgisl; double B4SOIrgisl; double B4SOIkgisl; double B4SOIfgisl; double B4SOIndiode; /* v4.0 */ double B4SOIndioded; /* v4.0 */ double B4SOIistun; double B4SOIidtun; /* v4.0 */ double B4SOIxbjt; double B4SOIxdif; double B4SOIxrec; double B4SOIxtun; double B4SOIxdifd; double B4SOIxrecd; double B4SOIxtund; /* v3.0 */ int B4SOIsoiMod; /* v3.2 bug fix */ double B4SOIvbs0pd; /* v3.2 */ double B4SOIvbs0fd; /* v3.2 */ double B4SOIvbsa; double B4SOInofffd; double B4SOIvofffd; double B4SOIk1b; double B4SOIk2b; double B4SOIdk2b; double B4SOIdvbd0; double B4SOIdvbd1; double B4SOImoinFD; /* v3.0 */ int B4SOIigbMod; int B4SOIigcMod; double B4SOIaigc; double B4SOIbigc; double B4SOIcigc; double B4SOIaigsd; double B4SOIbigsd; double B4SOIcigsd; double B4SOInigc; double B4SOIpigcd; double B4SOIpoxedge; double B4SOIdlcig; /* v3.1 added for RF */ int B4SOIrgateMod; double B4SOIxrcrg1; double B4SOIxrcrg2; double B4SOIrshg; double B4SOIngcon; double B4SOIxgw; double B4SOIxgl; /* v3.1 added for RF end */ /* v3.2 for noise */ double B4SOItnoia; double B4SOItnoib; double B4SOIrnoia; double B4SOIrnoib; double B4SOIntnoi; /* v3.2 for noise end */ /* v4.0 */ int B4SOIrbodyMod; double B4SOIrbdb; double B4SOIrbsb; double B4SOIgbmin; double B4SOIfrbody; int B4SOIrdsMod; /* v4.0 */ /* v4.0 end */ /* v4.1 */ int B4SOIfdMod; double B4SOIvfb; double B4SOIvsce; double B4SOIcdsbs; double B4SOIminvcv; double B4SOIlminvcv; double B4SOIwminvcv; double B4SOIpminvcv; double B4SOIvoffcv; double B4SOIlvoffcv; double B4SOIwvoffcv; double B4SOIpvoffcv; /* added end */ /* v2.2 release */ double B4SOIwth0; double B4SOIrhalo; double B4SOIntox; double B4SOItoxref; double B4SOIebg; double B4SOIvevb; double B4SOIalphaGB1; double B4SOIbetaGB1; double B4SOIvgb1; double B4SOIvecb; double B4SOIalphaGB2; double B4SOIbetaGB2; double B4SOIvgb2; double B4SOIaigbcp2; /* 4.1 */ double B4SOIbigbcp2; /* 4.1 */ double B4SOIcigbcp2; /* 4.1 */ double B4SOItoxqm; double B4SOIvoxh; double B4SOIdeltavox; /* v2.0 release */ double B4SOIk1w1; double B4SOIk1w2; double B4SOIketas; double B4SOIdwbc; double B4SOIbeta0; double B4SOIbeta1; double B4SOIbeta2; double B4SOIvdsatii0; double B4SOItii; double B4SOIlii; double B4SOIsii0; double B4SOIsii1; double B4SOIsii2; double B4SOIsiid; double B4SOIfbjtii; /*4.1 Iii model*/ double B4SOIebjtii; double B4SOIcbjtii; double B4SOIvbci; double B4SOIabjtii; double B4SOImbjtii; double B4SOIesatii; double B4SOIntun; /* v4.0 */ double B4SOIntund; /* v4.0 */ double B4SOInrecf0; /* v4.0 */ double B4SOInrecf0d; /* v4.0 */ double B4SOInrecr0; /* v4.0 */ double B4SOInrecr0d; /* v4.0 */ double B4SOIisbjt; double B4SOIidbjt; /* v4.0 */ double B4SOIisdif; double B4SOIiddif; /* v4.0 */ double B4SOIisrec; double B4SOIidrec; /* v4.0 */ double B4SOIln; double B4SOIvrec0; /* v4.0 */ double B4SOIvrec0d; /* v4.0 */ double B4SOIvtun0; /* v4.0 */ double B4SOIvtun0d; /* v4.0 */ double B4SOInbjt; double B4SOIlbjt0; double B4SOIldif0; double B4SOIvabjt; double B4SOIaely; double B4SOIahli; /* v4.0 */ double B4SOIahlid; /* v4.0 */ double B4SOIrbody; double B4SOIrbsh; double B4SOItt; double B4SOIndif; double B4SOIvsdfb; double B4SOIvsdth; double B4SOIcsdmin; double B4SOIasd; double B4SOIntrecf; double B4SOIntrecr; double B4SOIdlcb; double B4SOIfbody; double B4SOItcjswg; double B4SOItpbswg; double B4SOItcjswgd; double B4SOItpbswgd; double B4SOIacde; double B4SOImoin; double B4SOInoff; /* v3.2 */ double B4SOIdelvt; double B4SOIdlbg; /* CV model */ double B4SOIcgsl; double B4SOIcgdl; double B4SOIckappa; double B4SOIcf; double B4SOIclc; double B4SOIcle; double B4SOIdwc; double B4SOIdlc; double B4SOItnom; double B4SOIcgso; double B4SOIcgdo; double B4SOIcgeo; double B4SOIxpart; /* double B4SOIcFringOut; double B4SOIcFringMax; */ /* v4.2 never used in the code */ double B4SOIsheetResistance; double B4SOIbodyJctGateSideSGradingCoeff; /* v4.0 */ double B4SOIbodyJctGateSideDGradingCoeff; /* v4.0 */ double B4SOIGatesidewallJctSPotential; /* v4.0 */ double B4SOIGatesidewallJctDPotential; /* v4.0 */ double B4SOIunitLengthGateSidewallJctCapS; /* v4.0 */ double B4SOIunitLengthGateSidewallJctCapD; /* v4.0 */ double B4SOIcsdesw; double B4SOILint; double B4SOILl; double B4SOILlc; /* v2.2.3 */ double B4SOILln; double B4SOILw; double B4SOILwc; /* v2.2.3 */ double B4SOILwn; double B4SOILwl; double B4SOILwlc; /* v2.2.3 */ double B4SOILmin; double B4SOILmax; double B4SOIWint; double B4SOIWl; double B4SOIWlc; /* v2.2.3 */ double B4SOIWln; double B4SOIWw; double B4SOIWwc; /* v2.2.3 */ double B4SOIWwn; double B4SOIWwl; double B4SOIWwlc; /* v2.2.3 */ double B4SOIWmin; double B4SOIWmax; /* Added for binning - START1 */ /* Length Dependence */ /* v3.1 */ double B4SOIlxj; double B4SOIlalphaGB1; double B4SOIlbetaGB1; double B4SOIlalphaGB2; double B4SOIlbetaGB2; double B4SOIlaigbcp2; /* 4.1 */ double B4SOIlbigbcp2; /* 4.1 */ double B4SOIlcigbcp2; /* 4.1 */ double B4SOIlndif; double B4SOIlntrecf; double B4SOIlntrecr; double B4SOIlxbjt; double B4SOIlxdif; double B4SOIlxrec; double B4SOIlxtun; double B4SOIlxdifd; double B4SOIlxrecd; double B4SOIlxtund; double B4SOIlcgsl; double B4SOIlcgdl; double B4SOIlckappa; double B4SOIlua1; double B4SOIlub1; double B4SOIluc1; double B4SOIlute; double B4SOIlkt1; double B4SOIlkt1l; double B4SOIlkt2; double B4SOIlat; double B4SOIlprt; /* v3.0 */ double B4SOIlaigc; double B4SOIlbigc; double B4SOIlcigc; double B4SOIlaigsd; double B4SOIlbigsd; double B4SOIlcigsd; double B4SOIlnigc; double B4SOIlpigcd; double B4SOIlpoxedge; double B4SOIlnpeak; double B4SOIlnsub; double B4SOIlngate; double B4SOIlvth0; double B4SOIlvfb; /* v4.1 */ double B4SOIlk1; double B4SOIlk1w1; double B4SOIlk1w2; double B4SOIlk2; double B4SOIlk3; double B4SOIlk3b; double B4SOIlkb1; double B4SOIlw0; double B4SOIllpe0; double B4SOIldvt0; double B4SOIldvt1; double B4SOIldvt2; double B4SOIldvt0w; double B4SOIldvt1w; double B4SOIldvt2w; double B4SOIlu0; double B4SOIlua; double B4SOIlub; double B4SOIluc; double B4SOIlvsat; double B4SOIla0; double B4SOIlags; double B4SOIlb0; double B4SOIlb1; double B4SOIlketa; double B4SOIlketas; double B4SOIla1; double B4SOIla2; double B4SOIlrdsw; double B4SOIlrdw; /* v4.0 for rdsMod = 1 */ double B4SOIlrsw; /* v4.0 for rdsMod = 1 */ double B4SOIlprwb; double B4SOIlprwg; double B4SOIlwr; double B4SOIlnfactor; double B4SOIldwg; double B4SOIldwb; double B4SOIlvoff; double B4SOIleta0; double B4SOIletab; double B4SOIldsub; double B4SOIlcit; double B4SOIlcdsc; double B4SOIlcdscb; double B4SOIlcdscd; double B4SOIlpclm; double B4SOIlpdibl1; double B4SOIlpdibl2; double B4SOIlpdiblb; double B4SOIldrout; double B4SOIlpvag; double B4SOIldelta; double B4SOIlalpha0; double B4SOIlfbjtii; /*4.1 Iii model*/ double B4SOIlebjtii; double B4SOIlcbjtii; double B4SOIlvbci; double B4SOIlabjtii; double B4SOIlmbjtii; double B4SOIlbeta0; double B4SOIlbeta1; double B4SOIlbeta2; double B4SOIlvdsatii0; double B4SOIllii; double B4SOIlesatii; double B4SOIlsii0; double B4SOIlsii1; double B4SOIlsii2; double B4SOIlsiid; double B4SOIlagidl; double B4SOIlbgidl; double B4SOIlcgidl; double B4SOIlegidl; double B4SOIlrgidl; double B4SOIlkgidl; double B4SOIlfgidl; double B4SOIlagisl; double B4SOIlbgisl; double B4SOIlcgisl; double B4SOIlegisl; double B4SOIlrgisl; double B4SOIlkgisl; double B4SOIlfgisl; double B4SOIlntun; /* v4.0 */ double B4SOIlntund; /* v4.0 */ double B4SOIlndiode; /* v4.0 */ double B4SOIlndioded; /* v4.0 */ double B4SOIlnrecf0; /* v4.0 */ double B4SOIlnrecf0d; /* v4.0 */ double B4SOIlnrecr0; /* v4.0 */ double B4SOIlnrecr0d; /* v4.0 */ double B4SOIlisbjt; double B4SOIlidbjt; /* v4.0 */ double B4SOIlisdif; double B4SOIliddif; /* v4.0 */ double B4SOIlisrec; double B4SOIlidrec; /* v4.0 */ double B4SOIlistun; double B4SOIlidtun; /* v4.0 */ double B4SOIlvrec0; /* v4.0 */ double B4SOIlvrec0d; /* v4.0 */ double B4SOIlvtun0; /* v4.0 */ double B4SOIlvtun0d; /* v4.0 */ double B4SOIlnbjt; double B4SOIllbjt0; double B4SOIlvabjt; double B4SOIlaely; double B4SOIlahli; /* v4.0 */ double B4SOIlahlid; /* v4.0 */ /* v3.1 added for RF */ double B4SOIlxrcrg1; double B4SOIlxrcrg2; /* v3.1 added for RF end */ /* CV model */ double B4SOIlvsdfb; double B4SOIlvsdth; double B4SOIldelvt; double B4SOIlacde; double B4SOIlmoin; double B4SOIlnoff; /* v3.2 */ /* Width Dependence */ /* v3.1 */ double B4SOIwxj; double B4SOIwalphaGB1; double B4SOIwbetaGB1; double B4SOIwalphaGB2; double B4SOIwbetaGB2; double B4SOIwaigbcp2; /* 4.1 */ double B4SOIwbigbcp2; /* 4.1 */ double B4SOIwcigbcp2; /* 4.1 */ double B4SOIwndif; double B4SOIwntrecf; double B4SOIwntrecr; double B4SOIwxbjt; double B4SOIwxdif; double B4SOIwxrec; double B4SOIwxtun; double B4SOIwxdifd; double B4SOIwxrecd; double B4SOIwxtund; double B4SOIwcgsl; double B4SOIwcgdl; double B4SOIwckappa; double B4SOIwua1; double B4SOIwub1; double B4SOIwuc1; double B4SOIwute; double B4SOIwkt1; double B4SOIwkt1l; double B4SOIwkt2; double B4SOIwat; double B4SOIwprt; /* v3.0 */ double B4SOIwaigc; double B4SOIwbigc; double B4SOIwcigc; double B4SOIwaigsd; double B4SOIwbigsd; double B4SOIwcigsd; double B4SOIwnigc; double B4SOIwpigcd; double B4SOIwpoxedge; double B4SOIwnpeak; double B4SOIwnsub; double B4SOIwngate; double B4SOIwvth0; double B4SOIwvfb; /* v4.1 */ double B4SOIwk1; double B4SOIwk1w1; double B4SOIwk1w2; double B4SOIwk2; double B4SOIwk3; double B4SOIwk3b; double B4SOIwkb1; double B4SOIww0; double B4SOIwlpe0; double B4SOIwdvt0; double B4SOIwdvt1; double B4SOIwdvt2; double B4SOIwdvt0w; double B4SOIwdvt1w; double B4SOIwdvt2w; double B4SOIwu0; double B4SOIwua; double B4SOIwub; double B4SOIwuc; double B4SOIwvsat; double B4SOIwa0; double B4SOIwags; double B4SOIwb0; double B4SOIwb1; double B4SOIwketa; double B4SOIwketas; double B4SOIwa1; double B4SOIwa2; double B4SOIwrdsw; double B4SOIwrdw; /* v4.0 for rdsMod = 1 */ double B4SOIwrsw; /* v4.0 for rdsMod = 1 */ double B4SOIwprwb; double B4SOIwprwg; double B4SOIwwr; double B4SOIwnfactor; double B4SOIwdwg; double B4SOIwdwb; double B4SOIwvoff; double B4SOIweta0; double B4SOIwetab; double B4SOIwdsub; double B4SOIwcit; double B4SOIwcdsc; double B4SOIwcdscb; double B4SOIwcdscd; double B4SOIwpclm; double B4SOIwpdibl1; double B4SOIwpdibl2; double B4SOIwpdiblb; double B4SOIwdrout; double B4SOIwpvag; double B4SOIwdelta; double B4SOIwalpha0; double B4SOIwfbjtii; /*4.1 Iii model*/ double B4SOIwebjtii; double B4SOIwcbjtii; double B4SOIwvbci; double B4SOIwabjtii; double B4SOIwmbjtii; double B4SOIwbeta0; double B4SOIwbeta1; double B4SOIwbeta2; double B4SOIwvdsatii0; double B4SOIwlii; double B4SOIwesatii; double B4SOIwsii0; double B4SOIwsii1; double B4SOIwsii2; double B4SOIwsiid; double B4SOIwagidl; double B4SOIwbgidl; double B4SOIwcgidl; double B4SOIwegidl; double B4SOIwrgidl; double B4SOIwkgidl; double B4SOIwfgidl; double B4SOIwagisl; double B4SOIwbgisl; double B4SOIwcgisl; double B4SOIwegisl; double B4SOIwrgisl; double B4SOIwkgisl; double B4SOIwfgisl; double B4SOIwntun; /* v4.0 */ double B4SOIwntund; /* v4.0 */ double B4SOIwndiode; /* v4.0 */ double B4SOIwndioded; /* v4.0 */ double B4SOIwnrecf0; /* v4.0 */ double B4SOIwnrecf0d; /* v4.0 */ double B4SOIwnrecr0; /* v4.0 */ double B4SOIwnrecr0d; /* v4.0 */ double B4SOIwisbjt; double B4SOIwidbjt; /* v4.0 */ double B4SOIwisdif; double B4SOIwiddif; /* v4.0 */ double B4SOIwisrec; double B4SOIwidrec; /* v4.0 */ double B4SOIwistun; double B4SOIwidtun; /* v4.0 */ double B4SOIwvrec0; /* v4.0 */ double B4SOIwvrec0d; /* v4.0 */ double B4SOIwvtun0; /* v4.0 */ double B4SOIwvtun0d; /* v4.0 */ double B4SOIwnbjt; double B4SOIwlbjt0; double B4SOIwvabjt; double B4SOIwaely; double B4SOIwahli; /* v4.0 */ double B4SOIwahlid; /* v4.0 */ /* v3.1 added for RF */ double B4SOIwxrcrg1; double B4SOIwxrcrg2; /* v3.1 added for RF end */ /* CV model */ double B4SOIwvsdfb; double B4SOIwvsdth; double B4SOIwdelvt; double B4SOIwacde; double B4SOIwmoin; double B4SOIwnoff; /* v3.2 */ /* Cross-term Dependence */ /* v3.1 */ double B4SOIpxj; double B4SOIpalphaGB1; double B4SOIpbetaGB1; double B4SOIpalphaGB2; double B4SOIpbetaGB2; double B4SOIpaigbcp2; /* 4.1 */ double B4SOIpbigbcp2; /* 4.1 */ double B4SOIpcigbcp2; /* 4.1 */ double B4SOIpndif; double B4SOIpntrecf; double B4SOIpntrecr; double B4SOIpxbjt; double B4SOIpxdif; double B4SOIpxrec; double B4SOIpxtun; double B4SOIpxdifd; double B4SOIpxrecd; double B4SOIpxtund; double B4SOIpcgsl; double B4SOIpcgdl; double B4SOIpckappa; double B4SOIpua1; double B4SOIpub1; double B4SOIpuc1; double B4SOIpute; double B4SOIpkt1; double B4SOIpkt1l; double B4SOIpkt2; double B4SOIpat; double B4SOIpprt; /* v3.0 */ double B4SOIpaigc; double B4SOIpbigc; double B4SOIpcigc; double B4SOIpaigsd; double B4SOIpbigsd; double B4SOIpcigsd; double B4SOIpnigc; double B4SOIppigcd; double B4SOIppoxedge; double B4SOIpnpeak; double B4SOIpnsub; double B4SOIpngate; double B4SOIpvth0; double B4SOIpvfb; /* v4.1 */ double B4SOIpk1; double B4SOIpk1w1; double B4SOIpk1w2; double B4SOIpk2; double B4SOIpk3; double B4SOIpk3b; double B4SOIpkb1; double B4SOIpw0; double B4SOIplpe0; double B4SOIpdvt0; double B4SOIpdvt1; double B4SOIpdvt2; double B4SOIpdvt0w; double B4SOIpdvt1w; double B4SOIpdvt2w; double B4SOIpu0; double B4SOIpua; double B4SOIpub; double B4SOIpuc; double B4SOIpvsat; double B4SOIpa0; double B4SOIpags; double B4SOIpb0; double B4SOIpb1; double B4SOIpketa; double B4SOIpketas; double B4SOIpa1; double B4SOIpa2; double B4SOIprdsw; double B4SOIprdw; /* v4.0 for rdsMod = 1 */ double B4SOIprsw; /* v4.0 for rdsMod = 1 */ double B4SOIpprwb; double B4SOIpprwg; double B4SOIpwr; double B4SOIpnfactor; double B4SOIpdwg; double B4SOIpdwb; double B4SOIpvoff; double B4SOIpeta0; double B4SOIpetab; double B4SOIpdsub; double B4SOIpcit; double B4SOIpcdsc; double B4SOIpcdscb; double B4SOIpcdscd; double B4SOIppclm; double B4SOIppdibl1; double B4SOIppdibl2; double B4SOIppdiblb; double B4SOIpdrout; double B4SOIppvag; double B4SOIpdelta; double B4SOIpalpha0; double B4SOIpfbjtii; /*4.1 Iii model*/ double B4SOIpebjtii; double B4SOIpcbjtii; double B4SOIpvbci; double B4SOIpabjtii; double B4SOIpmbjtii; double B4SOIpbeta0; double B4SOIpbeta1; double B4SOIpbeta2; double B4SOIpvdsatii0; double B4SOIplii; double B4SOIpesatii; double B4SOIpsii0; double B4SOIpsii1; double B4SOIpsii2; double B4SOIpsiid; double B4SOIpagidl; double B4SOIpbgidl; double B4SOIpcgidl; double B4SOIpegidl; double B4SOIprgidl; double B4SOIpkgidl; double B4SOIpfgidl; double B4SOIpagisl; double B4SOIpbgisl; double B4SOIpcgisl; double B4SOIpegisl; double B4SOIprgisl; double B4SOIpkgisl; double B4SOIpfgisl; double B4SOIpntun; /* v4.0 */ double B4SOIpntund; /* v4.0 */ double B4SOIpndiode; /* v4.0 */ double B4SOIpndioded; /* v4.0 */ double B4SOIpnrecf0; /* v4.0 */ double B4SOIpnrecf0d; /* v4.0 */ double B4SOIpnrecr0; /* v4.0 */ double B4SOIpnrecr0d; /* v4.0 */ double B4SOIpisbjt; double B4SOIpidbjt; /* v4.0 */ double B4SOIpisdif; double B4SOIpiddif; /* v4.0 */ double B4SOIpisrec; double B4SOIpidrec; /* v4.0 */ double B4SOIpistun; double B4SOIpidtun; /* v4.0 */ double B4SOIpvrec0; /* v4.0 */ double B4SOIpvrec0d; /* v4.0 */ double B4SOIpvtun0; /* v4.0 */ double B4SOIpvtun0d; /* v4.0 */ double B4SOIpnbjt; double B4SOIplbjt0; double B4SOIpvabjt; double B4SOIpaely; double B4SOIpahli; /* v4.0 */ double B4SOIpahlid; /* v4.0 */ /* v3.1 added for RF */ double B4SOIpxrcrg1; double B4SOIpxrcrg2; /* v3.1 added for RF end */ /* CV model */ double B4SOIpvsdfb; double B4SOIpvsdth; double B4SOIpdelvt; double B4SOIpacde; double B4SOIpmoin; double B4SOIpnoff; /* v3.2 */ /* Added for binning - END1 */ /* Pre-calculated constants */ double B4SOIcbox; double B4SOIcsi; /* double B4SOIcsieff; double B4SOIcoxt; double B4SOInfb; double B4SOIadice */ /* v4.2 never used in the code */ double B4SOIeg0; double B4SOIeg; /* Jun 09*/ /* v4.0 added for stress effect */ double B4SOIsaref; double B4SOIsbref; double B4SOIwlod; double B4SOIku0; double B4SOIkvsat; double B4SOIkvth0; double B4SOItku0; double B4SOIllodku0; double B4SOIwlodku0; double B4SOIllodvth; double B4SOIwlodvth; double B4SOIlku0; double B4SOIwku0; double B4SOIpku0; double B4SOIlkvth0; double B4SOIwkvth0; double B4SOIpkvth0; double B4SOIstk2; double B4SOIlodk2; double B4SOIsteta0; double B4SOIlodeta0; /* v4.0 added for stress effect end */ /* MCJ: move to size-dependent param. */ double B4SOIvtm; double B4SOIcox; /* double B4SOIcof1; double B4SOIcof2; double B4SOIcof3; double B4SOIcof4 */ /* v4.2 never used in the code */ double B4SOIvcrit; double B4SOIfactor1; double B4SOIoxideTrapDensityA; double B4SOIoxideTrapDensityB; double B4SOIoxideTrapDensityC; double B4SOIem; double B4SOIef; double B4SOIaf; double B4SOIkf; double B4SOInoif; double B4SOIbf; /* v4.0 for noise */ double B4SOIw0flk; /* v4.0 for noise */ double B4SOIlpeb; /* v4.0 for Vth */ double B4SOIllpeb; /* v4.0 for Vth */ double B4SOIwlpeb; /* v4.0 for Vth */ double B4SOIplpeb; /* v4.0 for Vth */ double B4SOIdvtp0; /* v4.0 for Vth */ double B4SOIldvtp0; /* v4.0 for Vth */ double B4SOIwdvtp0; /* v4.0 for Vth */ double B4SOIpdvtp0; /* v4.0 for Vth */ double B4SOIdvtp1; /* v4.0 for Vth */ double B4SOIldvtp1; /* v4.0 for Vth */ double B4SOIwdvtp1; /* v4.0 for Vth */ double B4SOIpdvtp1; /* v4.0 for Vth */ double B4SOIdvtp2; /* v4.1 for Vth */ double B4SOIldvtp2; /* v4.1 for Vth */ double B4SOIwdvtp2; /* v4.1 for Vth */ double B4SOIpdvtp2; /* v4.1 for Vth */ double B4SOIdvtp3; /* v4.1 for Vth */ double B4SOIldvtp3; /* v4.1 for Vth */ double B4SOIwdvtp3; /* v4.1 for Vth */ double B4SOIpdvtp3; /* v4.1 for Vth */ double B4SOIdvtp4; /* v4.1 for Vth */ double B4SOIldvtp4; /* v4.1 for Vth */ double B4SOIwdvtp4; /* v4.1 for Vth */ double B4SOIpdvtp4; /* v4.1 for Vth */ double B4SOIminv; /* v4.0 for Vgsteff */ double B4SOIlminv; /* v4.0 for Vgsteff */ double B4SOIwminv; /* v4.0 for Vgsteff */ double B4SOIpminv; /* v4.0 for Vgsteff */ double B4SOIfprout; /* v4.0 for DITS in Id */ double B4SOIlfprout; /* v4.0 for DITS in Id */ double B4SOIwfprout; /* v4.0 for DITS in Id */ double B4SOIpfprout; /* v4.0 for DITS in Id */ double B4SOIpdits; /* v4.0 for DITS in Id */ double B4SOIlpdits; /* v4.0 for DITS in Id */ double B4SOIwpdits; /* v4.0 for DITS in Id */ double B4SOIppdits; /* v4.0 for DITS in Id */ double B4SOIpditsd; /* v4.0 for DITS in Id */ double B4SOIlpditsd; /* v4.0 for DITS in Id */ double B4SOIwpditsd; /* v4.0 for DITS in Id */ double B4SOIppditsd; /* v4.0 for DITS in Id */ double B4SOIpditsl; /* v4.0 for DITS in Id */ /* 4.0 backward compatibility */ double B4SOInlx; double B4SOIlnlx; double B4SOIwnlx; double B4SOIpnlx; unsigned B4SOInlxGiven :1; unsigned B4SOIlnlxGiven :1; unsigned B4SOIwnlxGiven :1; unsigned B4SOIpnlxGiven :1; double B4SOIngidl; double B4SOIlngidl; double B4SOIwngidl; double B4SOIpngidl; unsigned B4SOIngidlGiven :1; unsigned B4SOIlngidlGiven :1; unsigned B4SOIwngidlGiven :1; unsigned B4SOIpngidlGiven :1; double B4SOIvgsMax; double B4SOIvgdMax; double B4SOIvgbMax; double B4SOIvdsMax; double B4SOIvbsMax; double B4SOIvbdMax; unsigned B4SOIvgsMaxGiven :1; unsigned B4SOIvgdMaxGiven :1; unsigned B4SOIvgbMaxGiven :1; unsigned B4SOIvdsMaxGiven :1; unsigned B4SOIvbsMaxGiven :1; unsigned B4SOIvbdMaxGiven :1; struct b4soiSizeDependParam *pSizeDependParamKnot; #ifdef USE_OMP int B4SOIInstCount; struct sB4SOIinstance **B4SOIInstanceArray; #endif /* Flags */ unsigned B4SOIepsrgateGiven:1; unsigned B4SOIadosGiven :1; unsigned B4SOIbdosGiven :1; unsigned B4SOIleffeotGiven :1; unsigned B4SOIweffeotGiven :1; unsigned B4SOIvddeotGiven :1; unsigned B4SOItempeotGiven :1; unsigned B4SOItoxpGiven :1; unsigned B4SOImtrlModGiven :1; /*4.1*/ unsigned B4SOIvgstcvModGiven :1; unsigned B4SOIgidlModGiven :1; unsigned B4SOIiiiModGiven :1; unsigned B4SOIrdsModGiven :1; /* v4.0 */ unsigned B4SOIrbodyModGiven :1; /* v4.0 */ unsigned B4SOIrgateModGiven :1; /* v3.1 */ /* v3.0 */ unsigned B4SOIsoiModGiven: 1; unsigned B4SOIvbs0pdGiven: 1; /* v3.2 */ unsigned B4SOIvbs0fdGiven: 1; /* v3.2 */ unsigned B4SOIvbsaGiven : 1; unsigned B4SOInofffdGiven: 1; unsigned B4SOIvofffdGiven: 1; unsigned B4SOIk1bGiven: 1; unsigned B4SOIk2bGiven: 1; unsigned B4SOIdk2bGiven: 1; unsigned B4SOIdvbd0Given: 1; unsigned B4SOIdvbd1Given: 1; unsigned B4SOImoinFDGiven: 1; unsigned B4SOItboxGiven:1; unsigned B4SOItsiGiven :1; unsigned B4SOIetsiGiven :1; unsigned B4SOIxjGiven :1; unsigned B4SOIkb1Given :1; unsigned B4SOIrth0Given :1; unsigned B4SOIcth0Given :1; unsigned B4SOIcfrcoeffGiven :1; /* v4.4 */ unsigned B4SOIegidlGiven :1; unsigned B4SOIagidlGiven :1; unsigned B4SOIbgidlGiven :1; unsigned B4SOIcgidlGiven :1; unsigned B4SOIrgidlGiven :1; unsigned B4SOIkgidlGiven :1; unsigned B4SOIfgidlGiven :1; unsigned B4SOIegislGiven :1; unsigned B4SOIagislGiven :1; unsigned B4SOIbgislGiven :1; unsigned B4SOIcgislGiven :1; unsigned B4SOIrgislGiven :1; unsigned B4SOIkgislGiven :1; unsigned B4SOIfgislGiven :1; unsigned B4SOIndiodeGiven :1; /* v4.0 */ unsigned B4SOIndiodedGiven :1; /* v4.0 */ unsigned B4SOIxbjtGiven :1; unsigned B4SOIxdifGiven :1; unsigned B4SOIxrecGiven :1; unsigned B4SOIxtunGiven :1; unsigned B4SOIxdifdGiven :1; unsigned B4SOIxrecdGiven :1; unsigned B4SOIxtundGiven :1; unsigned B4SOIttGiven :1; unsigned B4SOIvsdfbGiven :1; unsigned B4SOIvsdthGiven :1; unsigned B4SOIasdGiven :1; unsigned B4SOIcsdminGiven :1; unsigned B4SOImobModGiven :1; unsigned B4SOIbinUnitGiven :1; unsigned B4SOIcapModGiven :1; unsigned B4SOIparamChkGiven :1; /* unsigned B4SOInoiModGiven :1; v3.2 */ unsigned B4SOIshModGiven :1; unsigned B4SOItypeGiven :1; unsigned B4SOItoxGiven :1; unsigned B4SOItoxmGiven :1; /* v3.2 */ unsigned B4SOIdtoxcvGiven :1; /* v2.2.3 */ unsigned B4SOIversionGiven :1; unsigned B4SOIcdscGiven :1; unsigned B4SOIcdscbGiven :1; unsigned B4SOIcdscdGiven :1; unsigned B4SOIcitGiven :1; unsigned B4SOInfactorGiven :1; unsigned B4SOIvsatGiven :1; unsigned B4SOIatGiven :1; unsigned B4SOIa0Given :1; unsigned B4SOIagsGiven :1; unsigned B4SOIa1Given :1; unsigned B4SOIa2Given :1; unsigned B4SOIketaGiven :1; unsigned B4SOInsubGiven :1; unsigned B4SOInpeakGiven :1; unsigned B4SOIngateGiven :1; unsigned B4SOInsdGiven :1; unsigned B4SOIgamma1Given :1; unsigned B4SOIgamma2Given :1; unsigned B4SOIvbxGiven :1; unsigned B4SOIvbmGiven :1; unsigned B4SOIxtGiven :1; unsigned B4SOIk1Given :1; unsigned B4SOIkt1Given :1; unsigned B4SOIkt1lGiven :1; unsigned B4SOIkt2Given :1; unsigned B4SOIk2Given :1; unsigned B4SOIk3Given :1; unsigned B4SOIk3bGiven :1; unsigned B4SOIw0Given :1; unsigned B4SOIlpe0Given :1; unsigned B4SOIdvt0Given :1; unsigned B4SOIdvt1Given :1; unsigned B4SOIdvt2Given :1; unsigned B4SOIdvt0wGiven :1; unsigned B4SOIdvt1wGiven :1; unsigned B4SOIdvt2wGiven :1; unsigned B4SOIdroutGiven :1; unsigned B4SOIdsubGiven :1; unsigned B4SOIvth0Given :1; unsigned B4SOIuaGiven :1; unsigned B4SOIua1Given :1; unsigned B4SOIubGiven :1; unsigned B4SOIub1Given :1; unsigned B4SOIucGiven :1; unsigned B4SOIuc1Given :1; unsigned B4SOIu0Given :1; unsigned B4SOIuteGiven :1; /*4.1 mobmod=4*/ unsigned B4SOIudGiven :1; unsigned B4SOIludGiven :1; unsigned B4SOIwudGiven :1; unsigned B4SOIpudGiven :1; unsigned B4SOIud1Given :1; unsigned B4SOIlud1Given :1; unsigned B4SOIwud1Given :1; unsigned B4SOIpud1Given :1; unsigned B4SOIeuGiven :1; unsigned B4SOIleuGiven :1; unsigned B4SOIweuGiven :1; unsigned B4SOIpeuGiven :1; unsigned B4SOIucsGiven :1; unsigned B4SOIlucsGiven :1; unsigned B4SOIwucsGiven :1; unsigned B4SOIpucsGiven :1; unsigned B4SOIucsteGiven :1; unsigned B4SOIlucsteGiven:1; unsigned B4SOIwucsteGiven:1; unsigned B4SOIpucsteGiven:1; unsigned B4SOIvoffGiven :1; unsigned B4SOIrdswGiven :1; unsigned B4SOIrdwGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIrswGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIrdwminGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIrswminGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIprwgGiven :1; unsigned B4SOIprwbGiven :1; unsigned B4SOIprtGiven :1; unsigned B4SOIeta0Given :1; unsigned B4SOIetabGiven :1; unsigned B4SOIpclmGiven :1; unsigned B4SOIpdibl1Given :1; unsigned B4SOIpdibl2Given :1; unsigned B4SOIpdiblbGiven :1; unsigned B4SOIpvagGiven :1; unsigned B4SOIdeltaGiven :1; unsigned B4SOIwrGiven :1; unsigned B4SOIdwgGiven :1; unsigned B4SOIdwbGiven :1; unsigned B4SOIb0Given :1; unsigned B4SOIb1Given :1; unsigned B4SOIalpha0Given :1; /*4.1*/ unsigned B4SOIepsroxGiven :1; unsigned B4SOIeotGiven :1; unsigned B4SOIepsrsubGiven :1; unsigned B4SOIni0subGiven :1; unsigned B4SOIbg0subGiven :1; unsigned B4SOItbgasubGiven:1; unsigned B4SOItbgbsubGiven:1; unsigned B4SOIphigGiven :1; unsigned B4SOIeasubGiven :1; /* v3.1 added for RF */ unsigned B4SOIxrcrg1Given :1; unsigned B4SOIxrcrg2Given :1; unsigned B4SOIrshgGiven :1; unsigned B4SOIngconGiven :1; unsigned B4SOIxgwGiven :1; unsigned B4SOIxglGiven :1; /* v3.1 added for RF end */ /* v3.2 */ unsigned B4SOIfnoiModGiven :1; unsigned B4SOItnoiModGiven :1; unsigned B4SOItnoiaGiven :1; unsigned B4SOItnoibGiven :1; unsigned B4SOIrnoiaGiven :1; unsigned B4SOIrnoibGiven :1; unsigned B4SOIntnoiGiven :1; /* v3.2 end */ /* v4.0 */ unsigned B4SOIvfbGiven :1; unsigned B4SOIgbminGiven :1; unsigned B4SOIrbdbGiven :1; unsigned B4SOIrbsbGiven :1; /* v4.0 end */ /* v4.1 */ unsigned B4SOIfdModGiven :1; unsigned B4SOIvsceGiven :1; unsigned B4SOIcdsbsGiven :1; unsigned B4SOIminvcvGiven :1; unsigned B4SOIlminvcvGiven :1; unsigned B4SOIwminvcvGiven :1; unsigned B4SOIpminvcvGiven :1; unsigned B4SOIvoffcvGiven :1; unsigned B4SOIlvoffcvGiven :1; unsigned B4SOIwvoffcvGiven :1; unsigned B4SOIpvoffcvGiven :1; /* v2.2 release */ unsigned B4SOIwth0Given :1; unsigned B4SOIrhaloGiven :1; unsigned B4SOIntoxGiven :1; unsigned B4SOItoxrefGiven :1; unsigned B4SOIebgGiven :1; unsigned B4SOIvevbGiven :1; unsigned B4SOIalphaGB1Given :1; unsigned B4SOIbetaGB1Given :1; unsigned B4SOIvgb1Given :1; unsigned B4SOIvecbGiven :1; unsigned B4SOIalphaGB2Given :1; unsigned B4SOIbetaGB2Given :1; unsigned B4SOIvgb2Given :1; unsigned B4SOIaigbcp2Given :1; /* 4.1 */ unsigned B4SOIbigbcp2Given :1; /* 4.1 */ unsigned B4SOIcigbcp2Given :1; /* 4.1 */ unsigned B4SOItoxqmGiven :1; unsigned B4SOIigbModGiven :1; /* v3.0 */ unsigned B4SOIvoxhGiven :1; unsigned B4SOIdeltavoxGiven :1; unsigned B4SOIigcModGiven :1; /* v3.0 */ /* v3.0 */ unsigned B4SOIaigcGiven :1; unsigned B4SOIbigcGiven :1; unsigned B4SOIcigcGiven :1; unsigned B4SOIaigsdGiven :1; unsigned B4SOIbigsdGiven :1; unsigned B4SOIcigsdGiven :1; unsigned B4SOInigcGiven :1; unsigned B4SOIpigcdGiven :1; unsigned B4SOIpoxedgeGiven :1; unsigned B4SOIdlcigGiven :1; /* v2.0 release */ unsigned B4SOIk1w1Given :1; unsigned B4SOIk1w2Given :1; unsigned B4SOIketasGiven :1; unsigned B4SOIdwbcGiven :1; unsigned B4SOIbeta0Given :1; unsigned B4SOIbeta1Given :1; unsigned B4SOIbeta2Given :1; unsigned B4SOIvdsatii0Given :1; unsigned B4SOItiiGiven :1; unsigned B4SOItvbciGiven :1; unsigned B4SOIliiGiven :1; unsigned B4SOIsii0Given :1; unsigned B4SOIsii1Given :1; unsigned B4SOIsii2Given :1; unsigned B4SOIsiidGiven :1; unsigned B4SOIfbjtiiGiven :1; /*4.1 Iii model*/ unsigned B4SOIebjtiiGiven :1; unsigned B4SOIcbjtiiGiven :1; unsigned B4SOIvbciGiven :1; unsigned B4SOIabjtiiGiven :1; unsigned B4SOImbjtiiGiven :1; unsigned B4SOIesatiiGiven :1; unsigned B4SOIntunGiven :1; /* v4.0 */ unsigned B4SOIntundGiven :1; /* v4.0 */ unsigned B4SOInrecf0Given :1; /* v4.0 */ unsigned B4SOInrecf0dGiven :1; /* v4.0 */ unsigned B4SOInrecr0Given :1; /* v4.0 */ unsigned B4SOInrecr0dGiven :1; /* v4.0 */ unsigned B4SOIisbjtGiven :1; unsigned B4SOIidbjtGiven :1; /* v4.0 */ unsigned B4SOIisdifGiven :1; unsigned B4SOIiddifGiven :1; /* v4.0 */ unsigned B4SOIisrecGiven :1; unsigned B4SOIidrecGiven :1; /* v4.0 */ unsigned B4SOIistunGiven :1; unsigned B4SOIidtunGiven :1; /* v4.0 */ unsigned B4SOIlnGiven :1; unsigned B4SOIvrec0Given :1; /* v4.0 */ unsigned B4SOIvrec0dGiven :1; /* v4.0 */ unsigned B4SOIvtun0Given :1; /* v4.0 */ unsigned B4SOIvtun0dGiven :1; /* v4.0 */ unsigned B4SOInbjtGiven :1; unsigned B4SOIlbjt0Given :1; unsigned B4SOIldif0Given :1; unsigned B4SOIvabjtGiven :1; unsigned B4SOIaelyGiven :1; unsigned B4SOIahliGiven :1; /* v4.0 */ unsigned B4SOIahlidGiven :1; /* v4.0 */ unsigned B4SOIrbodyGiven :1; unsigned B4SOIrbshGiven :1; unsigned B4SOIndifGiven :1; unsigned B4SOIntrecfGiven :1; unsigned B4SOIntrecrGiven :1; unsigned B4SOIdlcbGiven :1; unsigned B4SOIfbodyGiven :1; unsigned B4SOItcjswgGiven :1; unsigned B4SOItpbswgGiven :1; unsigned B4SOItcjswgdGiven :1; unsigned B4SOItpbswgdGiven :1; unsigned B4SOIacdeGiven :1; unsigned B4SOImoinGiven :1; unsigned B4SOInoffGiven: 1; /* v3.2 */ unsigned B4SOIdelvtGiven :1; unsigned B4SOIdlbgGiven :1; /* CV model */ unsigned B4SOIcgslGiven :1; unsigned B4SOIcgdlGiven :1; unsigned B4SOIckappaGiven :1; unsigned B4SOIcfGiven :1; unsigned B4SOIclcGiven :1; unsigned B4SOIcleGiven :1; unsigned B4SOIdwcGiven :1; unsigned B4SOIdlcGiven :1; /* Added for binning - START2 */ /* Length Dependence */ /* v3.1 */ unsigned B4SOIlxjGiven :1; unsigned B4SOIlalphaGB1Given :1; unsigned B4SOIlbetaGB1Given :1; unsigned B4SOIlalphaGB2Given :1; unsigned B4SOIlbetaGB2Given :1; unsigned B4SOIlaigbcp2Given :1; /* 4.1 */ unsigned B4SOIlbigbcp2Given :1; /* 4.1 */ unsigned B4SOIlcigbcp2Given :1; /* 4.1 */ unsigned B4SOIlndifGiven :1; unsigned B4SOIlntrecfGiven :1; unsigned B4SOIlntrecrGiven :1; unsigned B4SOIlxbjtGiven :1; unsigned B4SOIlxdifGiven :1; unsigned B4SOIlxrecGiven :1; unsigned B4SOIlxtunGiven :1; unsigned B4SOIlxdifdGiven :1; unsigned B4SOIlxrecdGiven :1; unsigned B4SOIlxtundGiven :1; unsigned B4SOIlcgslGiven :1; unsigned B4SOIlcgdlGiven :1; unsigned B4SOIlckappaGiven :1; unsigned B4SOIlua1Given :1; unsigned B4SOIlub1Given :1; unsigned B4SOIluc1Given :1; unsigned B4SOIluteGiven :1; unsigned B4SOIlkt1Given :1; unsigned B4SOIlkt1lGiven :1; unsigned B4SOIlkt2Given :1; unsigned B4SOIlatGiven :1; unsigned B4SOIlprtGiven :1; /* v3.0 */ unsigned B4SOIlaigcGiven :1; unsigned B4SOIlbigcGiven :1; unsigned B4SOIlcigcGiven :1; unsigned B4SOIlaigsdGiven :1; unsigned B4SOIlbigsdGiven :1; unsigned B4SOIlcigsdGiven :1; unsigned B4SOIlnigcGiven :1; unsigned B4SOIlpigcdGiven :1; unsigned B4SOIlpoxedgeGiven :1; unsigned B4SOIlnpeakGiven :1; unsigned B4SOIlnsubGiven :1; unsigned B4SOIlngateGiven :1; unsigned B4SOIlnsdGiven :1; unsigned B4SOIlvth0Given :1; unsigned B4SOIlvfbGiven :1; /* v4.1 */ unsigned B4SOIlk1Given :1; unsigned B4SOIlk1w1Given :1; unsigned B4SOIlk1w2Given :1; unsigned B4SOIlk2Given :1; unsigned B4SOIlk3Given :1; unsigned B4SOIlk3bGiven :1; unsigned B4SOIlkb1Given :1; unsigned B4SOIlw0Given :1; unsigned B4SOIllpe0Given :1; unsigned B4SOIldvt0Given :1; unsigned B4SOIldvt1Given :1; unsigned B4SOIldvt2Given :1; unsigned B4SOIldvt0wGiven :1; unsigned B4SOIldvt1wGiven :1; unsigned B4SOIldvt2wGiven :1; unsigned B4SOIlu0Given :1; unsigned B4SOIluaGiven :1; unsigned B4SOIlubGiven :1; unsigned B4SOIlucGiven :1; unsigned B4SOIlvsatGiven :1; unsigned B4SOIla0Given :1; unsigned B4SOIlagsGiven :1; unsigned B4SOIlb0Given :1; unsigned B4SOIlb1Given :1; unsigned B4SOIlketaGiven :1; unsigned B4SOIlketasGiven :1; unsigned B4SOIla1Given :1; unsigned B4SOIla2Given :1; unsigned B4SOIlrdswGiven :1; unsigned B4SOIlrdwGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIlrswGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIlprwbGiven :1; unsigned B4SOIlprwgGiven :1; unsigned B4SOIlwrGiven :1; unsigned B4SOIlnfactorGiven :1; unsigned B4SOIldwgGiven :1; unsigned B4SOIldwbGiven :1; unsigned B4SOIlvoffGiven :1; unsigned B4SOIleta0Given :1; unsigned B4SOIletabGiven :1; unsigned B4SOIldsubGiven :1; unsigned B4SOIlcitGiven :1; unsigned B4SOIlcdscGiven :1; unsigned B4SOIlcdscbGiven :1; unsigned B4SOIlcdscdGiven :1; unsigned B4SOIlpclmGiven :1; unsigned B4SOIlpdibl1Given :1; unsigned B4SOIlpdibl2Given :1; unsigned B4SOIlpdiblbGiven :1; unsigned B4SOIldroutGiven :1; unsigned B4SOIlpvagGiven :1; unsigned B4SOIldeltaGiven :1; unsigned B4SOIlalpha0Given :1; unsigned B4SOIlfbjtiiGiven :1; /*4.1 Iii model*/ unsigned B4SOIlebjtiiGiven :1; unsigned B4SOIlcbjtiiGiven :1; unsigned B4SOIlvbciGiven :1; unsigned B4SOIlabjtiiGiven :1; unsigned B4SOIlmbjtiiGiven :1; unsigned B4SOIlbeta0Given :1; unsigned B4SOIlbeta1Given :1; unsigned B4SOIlbeta2Given :1; unsigned B4SOIlvdsatii0Given :1; unsigned B4SOIlliiGiven :1; unsigned B4SOIlesatiiGiven :1; unsigned B4SOIlsii0Given :1; unsigned B4SOIlsii1Given :1; unsigned B4SOIlsii2Given :1; unsigned B4SOIlsiidGiven :1; unsigned B4SOIlagidlGiven :1; unsigned B4SOIlbgidlGiven :1; unsigned B4SOIlcgidlGiven :1; unsigned B4SOIlegidlGiven :1; unsigned B4SOIlrgidlGiven :1; unsigned B4SOIlkgidlGiven :1; unsigned B4SOIlfgidlGiven :1; unsigned B4SOIlagislGiven :1; unsigned B4SOIlbgislGiven :1; unsigned B4SOIlcgislGiven :1; unsigned B4SOIlegislGiven :1; unsigned B4SOIlrgislGiven :1; unsigned B4SOIlkgislGiven :1; unsigned B4SOIlfgislGiven :1; unsigned B4SOIlntunGiven :1; /* v4.0 */ unsigned B4SOIlntundGiven :1; /* v4.0 */ unsigned B4SOIlndiodeGiven :1; /* v4.0 */ unsigned B4SOIlndiodedGiven :1; /* v4.0 */ unsigned B4SOIlnrecf0Given :1; /* v4.0 */ unsigned B4SOIlnrecf0dGiven :1; /* v4.0 */ unsigned B4SOIlnrecr0Given :1; /* v4.0 */ unsigned B4SOIlnrecr0dGiven :1; /* v4.0 */ unsigned B4SOIlisbjtGiven :1; unsigned B4SOIlidbjtGiven :1; /* v4.0 */ unsigned B4SOIlisdifGiven :1; unsigned B4SOIliddifGiven :1; /* v4.0 */ unsigned B4SOIlisrecGiven :1; unsigned B4SOIlidrecGiven :1; /* v4.0 */ unsigned B4SOIlistunGiven :1; unsigned B4SOIlidtunGiven :1; /* v4.0 */ unsigned B4SOIlvrec0Given :1; /* v4.0 */ unsigned B4SOIlvrec0dGiven :1; /* v4.0 */ unsigned B4SOIlvtun0Given :1; /* v4.0 */ unsigned B4SOIlvtun0dGiven :1; /* v4.0 */ unsigned B4SOIlnbjtGiven :1; unsigned B4SOIllbjt0Given :1; unsigned B4SOIlvabjtGiven :1; unsigned B4SOIlaelyGiven :1; unsigned B4SOIlahliGiven :1; /* v4.0 */ unsigned B4SOIlahlidGiven :1; /* v4.0 */ /* v3.1 added for RF */ unsigned B4SOIlxrcrg1Given :1; unsigned B4SOIlxrcrg2Given :1; /* v3.1 added for RF end */ /* CV model */ unsigned B4SOIlvsdfbGiven :1; unsigned B4SOIlvsdthGiven :1; unsigned B4SOIldelvtGiven :1; unsigned B4SOIlacdeGiven :1; unsigned B4SOIlmoinGiven :1; unsigned B4SOIlnoffGiven :1; /* v3.2 */ /* Width Dependence */ /* v3.1 */ unsigned B4SOIwxjGiven :1; unsigned B4SOIwalphaGB1Given :1; unsigned B4SOIwbetaGB1Given :1; unsigned B4SOIwalphaGB2Given :1; unsigned B4SOIwbetaGB2Given :1; unsigned B4SOIwaigbcp2Given :1; /* 4.1 */ unsigned B4SOIwbigbcp2Given :1; /* 4.1 */ unsigned B4SOIwcigbcp2Given :1; /* 4.1 */ unsigned B4SOIwndifGiven :1; unsigned B4SOIwntrecfGiven :1; unsigned B4SOIwntrecrGiven :1; unsigned B4SOIwxbjtGiven :1; unsigned B4SOIwxdifGiven :1; unsigned B4SOIwxrecGiven :1; unsigned B4SOIwxtunGiven :1; unsigned B4SOIwxdifdGiven :1; unsigned B4SOIwxrecdGiven :1; unsigned B4SOIwxtundGiven :1; unsigned B4SOIwcgslGiven :1; unsigned B4SOIwcgdlGiven :1; unsigned B4SOIwckappaGiven :1; unsigned B4SOIwua1Given :1; unsigned B4SOIwub1Given :1; unsigned B4SOIwuc1Given :1; unsigned B4SOIwuteGiven :1; unsigned B4SOIwkt1Given :1; unsigned B4SOIwkt1lGiven :1; unsigned B4SOIwkt2Given :1; unsigned B4SOIwatGiven :1; unsigned B4SOIwprtGiven :1; /* v3.0 */ unsigned B4SOIwaigcGiven :1; unsigned B4SOIwbigcGiven :1; unsigned B4SOIwcigcGiven :1; unsigned B4SOIwaigsdGiven :1; unsigned B4SOIwbigsdGiven :1; unsigned B4SOIwcigsdGiven :1; unsigned B4SOIwnigcGiven :1; unsigned B4SOIwpigcdGiven :1; unsigned B4SOIwpoxedgeGiven :1; unsigned B4SOIwnpeakGiven :1; unsigned B4SOIwnsubGiven :1; unsigned B4SOIwngateGiven :1; unsigned B4SOIwnsdGiven :1; unsigned B4SOIwvth0Given :1; unsigned B4SOIwvfbGiven :1; /* v4.1 */ unsigned B4SOIwk1Given :1; unsigned B4SOIwk1w1Given :1; unsigned B4SOIwk1w2Given :1; unsigned B4SOIwk2Given :1; unsigned B4SOIwk3Given :1; unsigned B4SOIwk3bGiven :1; unsigned B4SOIwkb1Given :1; unsigned B4SOIww0Given :1; unsigned B4SOIwlpe0Given :1; unsigned B4SOIwdvt0Given :1; unsigned B4SOIwdvt1Given :1; unsigned B4SOIwdvt2Given :1; unsigned B4SOIwdvt0wGiven :1; unsigned B4SOIwdvt1wGiven :1; unsigned B4SOIwdvt2wGiven :1; unsigned B4SOIwu0Given :1; unsigned B4SOIwuaGiven :1; unsigned B4SOIwubGiven :1; unsigned B4SOIwucGiven :1; unsigned B4SOIwvsatGiven :1; unsigned B4SOIwa0Given :1; unsigned B4SOIwagsGiven :1; unsigned B4SOIwb0Given :1; unsigned B4SOIwb1Given :1; unsigned B4SOIwketaGiven :1; unsigned B4SOIwketasGiven :1; unsigned B4SOIwa1Given :1; unsigned B4SOIwa2Given :1; unsigned B4SOIwrdswGiven :1; unsigned B4SOIwrdwGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIwrswGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIwprwbGiven :1; unsigned B4SOIwprwgGiven :1; unsigned B4SOIwwrGiven :1; unsigned B4SOIwnfactorGiven :1; unsigned B4SOIwdwgGiven :1; unsigned B4SOIwdwbGiven :1; unsigned B4SOIwvoffGiven :1; unsigned B4SOIweta0Given :1; unsigned B4SOIwetabGiven :1; unsigned B4SOIwdsubGiven :1; unsigned B4SOIwcitGiven :1; unsigned B4SOIwcdscGiven :1; unsigned B4SOIwcdscbGiven :1; unsigned B4SOIwcdscdGiven :1; unsigned B4SOIwpclmGiven :1; unsigned B4SOIwpdibl1Given :1; unsigned B4SOIwpdibl2Given :1; unsigned B4SOIwpdiblbGiven :1; unsigned B4SOIwdroutGiven :1; unsigned B4SOIwpvagGiven :1; unsigned B4SOIwdeltaGiven :1; unsigned B4SOIwalpha0Given :1; unsigned B4SOIwfbjtiiGiven :1; /*4.1 Iii model*/ unsigned B4SOIwebjtiiGiven :1; unsigned B4SOIwcbjtiiGiven :1; unsigned B4SOIwvbciGiven :1; unsigned B4SOIwabjtiiGiven :1; unsigned B4SOIwmbjtiiGiven :1; unsigned B4SOIwbeta0Given :1; unsigned B4SOIwbeta1Given :1; unsigned B4SOIwbeta2Given :1; unsigned B4SOIwvdsatii0Given :1; unsigned B4SOIwliiGiven :1; unsigned B4SOIwesatiiGiven :1; unsigned B4SOIwsii0Given :1; unsigned B4SOIwsii1Given :1; unsigned B4SOIwsii2Given :1; unsigned B4SOIwsiidGiven :1; unsigned B4SOIwagidlGiven :1; unsigned B4SOIwbgidlGiven :1; unsigned B4SOIwcgidlGiven :1; unsigned B4SOIwegidlGiven :1; unsigned B4SOIwrgidlGiven :1; unsigned B4SOIwkgidlGiven :1; unsigned B4SOIwfgidlGiven :1; unsigned B4SOIwagislGiven :1; unsigned B4SOIwbgislGiven :1; unsigned B4SOIwcgislGiven :1; unsigned B4SOIwegislGiven :1; unsigned B4SOIwrgislGiven :1; unsigned B4SOIwkgislGiven :1; unsigned B4SOIwfgislGiven :1; unsigned B4SOIwntunGiven :1; /* v4.0 */ unsigned B4SOIwntundGiven :1; /* v4.0 */ unsigned B4SOIwndiodeGiven :1; /* v4.0 */ unsigned B4SOIwndiodedGiven :1; /* v4.0 */ unsigned B4SOIwnrecf0Given :1; /* v4.0 */ unsigned B4SOIwnrecf0dGiven :1; /* v4.0 */ unsigned B4SOIwnrecr0Given :1; /* v4.0 */ unsigned B4SOIwnrecr0dGiven :1; /* v4.0 */ unsigned B4SOIwisbjtGiven :1; unsigned B4SOIwidbjtGiven :1; /* v4.0 */ unsigned B4SOIwisdifGiven :1; unsigned B4SOIwiddifGiven :1; /* v4.0 */ unsigned B4SOIwisrecGiven :1; unsigned B4SOIwidrecGiven :1; /* v4.0 */ unsigned B4SOIwistunGiven :1; unsigned B4SOIwidtunGiven :1; /* v4.0 */ unsigned B4SOIwvrec0Given :1; /* v4.0 */ unsigned B4SOIwvrec0dGiven :1; /* v4.0 */ unsigned B4SOIwvtun0Given :1; /* v4.0 */ unsigned B4SOIwvtun0dGiven :1; /* v4.0 */ unsigned B4SOIwnbjtGiven :1; unsigned B4SOIwlbjt0Given :1; unsigned B4SOIwvabjtGiven :1; unsigned B4SOIwaelyGiven :1; unsigned B4SOIwahliGiven :1; /* v4.0 */ unsigned B4SOIwahlidGiven :1; /* v4.0 */ /* v3.1 added for RF */ unsigned B4SOIwxrcrg1Given :1; unsigned B4SOIwxrcrg2Given :1; /* v3.1 added for RF end */ /* CV model */ unsigned B4SOIwvsdfbGiven :1; unsigned B4SOIwvsdthGiven :1; unsigned B4SOIwdelvtGiven :1; unsigned B4SOIwacdeGiven :1; unsigned B4SOIwmoinGiven :1; unsigned B4SOIwnoffGiven :1; /* v3.2 */ /* Cross-term Dependence */ /* v3.1 */ unsigned B4SOIpxjGiven :1; unsigned B4SOIpalphaGB1Given :1; unsigned B4SOIpbetaGB1Given :1; unsigned B4SOIpalphaGB2Given :1; unsigned B4SOIpbetaGB2Given :1; unsigned B4SOIpaigbcp2Given :1; /* 4.1 */ unsigned B4SOIpbigbcp2Given :1; /* 4.1 */ unsigned B4SOIpcigbcp2Given :1; /* 4.1 */ unsigned B4SOIpndifGiven :1; unsigned B4SOIpntrecfGiven :1; unsigned B4SOIpntrecrGiven :1; unsigned B4SOIpxbjtGiven :1; unsigned B4SOIpxdifGiven :1; unsigned B4SOIpxrecGiven :1; unsigned B4SOIpxtunGiven :1; unsigned B4SOIpxdifdGiven :1; unsigned B4SOIpxrecdGiven :1; unsigned B4SOIpxtundGiven :1; unsigned B4SOIpcgslGiven :1; unsigned B4SOIpcgdlGiven :1; unsigned B4SOIpckappaGiven :1; unsigned B4SOIpua1Given :1; unsigned B4SOIpub1Given :1; unsigned B4SOIpuc1Given :1; unsigned B4SOIputeGiven :1; unsigned B4SOIpkt1Given :1; unsigned B4SOIpkt1lGiven :1; unsigned B4SOIpkt2Given :1; unsigned B4SOIpatGiven :1; unsigned B4SOIpprtGiven :1; /* v3.0 */ unsigned B4SOIpaigcGiven :1; unsigned B4SOIpbigcGiven :1; unsigned B4SOIpcigcGiven :1; unsigned B4SOIpaigsdGiven :1; unsigned B4SOIpbigsdGiven :1; unsigned B4SOIpcigsdGiven :1; unsigned B4SOIpnigcGiven :1; unsigned B4SOIppigcdGiven :1; unsigned B4SOIppoxedgeGiven :1; unsigned B4SOIpnpeakGiven :1; unsigned B4SOIpnsubGiven :1; unsigned B4SOIpngateGiven :1; unsigned B4SOIpnsdGiven :1; unsigned B4SOIpvth0Given :1; unsigned B4SOIpvfbGiven :1; /* v4.1 */ unsigned B4SOIpk1Given :1; unsigned B4SOIpk1w1Given :1; unsigned B4SOIpk1w2Given :1; unsigned B4SOIpk2Given :1; unsigned B4SOIpk3Given :1; unsigned B4SOIpk3bGiven :1; unsigned B4SOIpkb1Given :1; unsigned B4SOIpw0Given :1; unsigned B4SOIplpe0Given :1; unsigned B4SOIpdvt0Given :1; unsigned B4SOIpdvt1Given :1; unsigned B4SOIpdvt2Given :1; unsigned B4SOIpdvt0wGiven :1; unsigned B4SOIpdvt1wGiven :1; unsigned B4SOIpdvt2wGiven :1; unsigned B4SOIpu0Given :1; unsigned B4SOIpuaGiven :1; unsigned B4SOIpubGiven :1; unsigned B4SOIpucGiven :1; unsigned B4SOIpvsatGiven :1; unsigned B4SOIpa0Given :1; unsigned B4SOIpagsGiven :1; unsigned B4SOIpb0Given :1; unsigned B4SOIpb1Given :1; unsigned B4SOIpketaGiven :1; unsigned B4SOIpketasGiven :1; unsigned B4SOIpa1Given :1; unsigned B4SOIpa2Given :1; unsigned B4SOIprdswGiven :1; unsigned B4SOIprdwGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIprswGiven :1; /* v4.0 for rdsMod = 1 */ unsigned B4SOIpprwbGiven :1; unsigned B4SOIpprwgGiven :1; unsigned B4SOIpwrGiven :1; unsigned B4SOIpnfactorGiven :1; unsigned B4SOIpdwgGiven :1; unsigned B4SOIpdwbGiven :1; unsigned B4SOIpvoffGiven :1; unsigned B4SOIpeta0Given :1; unsigned B4SOIpetabGiven :1; unsigned B4SOIpdsubGiven :1; unsigned B4SOIpcitGiven :1; unsigned B4SOIpcdscGiven :1; unsigned B4SOIpcdscbGiven :1; unsigned B4SOIpcdscdGiven :1; unsigned B4SOIppclmGiven :1; unsigned B4SOIppdibl1Given :1; unsigned B4SOIppdibl2Given :1; unsigned B4SOIppdiblbGiven :1; unsigned B4SOIpdroutGiven :1; unsigned B4SOIppvagGiven :1; unsigned B4SOIpdeltaGiven :1; unsigned B4SOIpalpha0Given :1; unsigned B4SOIpfbjtiiGiven :1; /*4.1 Iii model*/ unsigned B4SOIpebjtiiGiven :1; unsigned B4SOIpcbjtiiGiven :1; unsigned B4SOIpvbciGiven :1; unsigned B4SOIpabjtiiGiven :1; unsigned B4SOIpmbjtiiGiven :1; unsigned B4SOIpbeta0Given :1; unsigned B4SOIpbeta1Given :1; unsigned B4SOIpbeta2Given :1; unsigned B4SOIpvdsatii0Given :1; unsigned B4SOIpliiGiven :1; unsigned B4SOIpesatiiGiven :1; unsigned B4SOIpsii0Given :1; unsigned B4SOIpsii1Given :1; unsigned B4SOIpsii2Given :1; unsigned B4SOIpsiidGiven :1; unsigned B4SOIpagidlGiven :1; unsigned B4SOIpbgidlGiven :1; unsigned B4SOIpcgidlGiven :1; unsigned B4SOIpegidlGiven :1; unsigned B4SOIprgidlGiven :1; unsigned B4SOIpkgidlGiven :1; unsigned B4SOIpfgidlGiven :1; unsigned B4SOIpagislGiven :1; unsigned B4SOIpbgislGiven :1; unsigned B4SOIpcgislGiven :1; unsigned B4SOIpegislGiven :1; unsigned B4SOIprgislGiven :1; unsigned B4SOIpkgislGiven :1; unsigned B4SOIpfgislGiven :1; unsigned B4SOIpntunGiven :1; /* v4.0 */ unsigned B4SOIpntundGiven :1; /* v4.0 */ unsigned B4SOIpndiodeGiven :1; /* v4.0 */ unsigned B4SOIpndiodedGiven :1; /* v4.0 */ unsigned B4SOIpnrecf0Given :1; /* v4.0 */ unsigned B4SOIpnrecf0dGiven :1; /* v4.0 */ unsigned B4SOIpnrecr0Given :1; /* v4.0 */ unsigned B4SOIpnrecr0dGiven :1; /* v4.0 */ unsigned B4SOIpisbjtGiven :1; unsigned B4SOIpidbjtGiven :1; /* v4.0 */ unsigned B4SOIpisdifGiven :1; unsigned B4SOIpiddifGiven :1; /* v4.0 */ unsigned B4SOIpisrecGiven :1; unsigned B4SOIpidrecGiven :1; /* v4.0 */ unsigned B4SOIpistunGiven :1; unsigned B4SOIpidtunGiven :1; /* v4.0 */ unsigned B4SOIpvrec0Given :1; /* v4.0 */ unsigned B4SOIpvrec0dGiven :1; /* v4.0 */ unsigned B4SOIpvtun0Given :1; /* v4.0 */ unsigned B4SOIpvtun0dGiven :1; /* v4.0 */ unsigned B4SOIpnbjtGiven :1; unsigned B4SOIplbjt0Given :1; unsigned B4SOIpvabjtGiven :1; unsigned B4SOIpaelyGiven :1; unsigned B4SOIpahliGiven :1; /* v4.0 */ unsigned B4SOIpahlidGiven :1; /* v4.0 */ /* v3.1 added for RF */ unsigned B4SOIpxrcrg1Given :1; unsigned B4SOIpxrcrg2Given :1; /* v3.1 added for RF end */ /* CV model */ unsigned B4SOIpvsdfbGiven :1; unsigned B4SOIpvsdthGiven :1; unsigned B4SOIpdelvtGiven :1; unsigned B4SOIpacdeGiven :1; unsigned B4SOIpmoinGiven :1; unsigned B4SOIpnoffGiven :1;/* v3.2 */ /* Added for binning - END2 */ unsigned B4SOIuseFringeGiven :1; unsigned B4SOItnomGiven :1; unsigned B4SOIcgsoGiven :1; unsigned B4SOIcgdoGiven :1; unsigned B4SOIcgeoGiven :1; unsigned B4SOIxpartGiven :1; unsigned B4SOIsheetResistanceGiven :1; unsigned B4SOIGatesidewallJctSPotentialGiven :1; /* v4.0 */ unsigned B4SOIGatesidewallJctDPotentialGiven :1; /* v4.0 */ unsigned B4SOIbodyJctGateSideSGradingCoeffGiven :1; /* v4.0 */ unsigned B4SOIbodyJctGateSideDGradingCoeffGiven :1; /* v4.0 */ unsigned B4SOIunitLengthGateSidewallJctCapSGiven :1; /* v4.0 */ unsigned B4SOIunitLengthGateSidewallJctCapDGiven :1; /* v4.0 */ unsigned B4SOIcsdeswGiven :1; unsigned B4SOIoxideTrapDensityAGiven :1; unsigned B4SOIoxideTrapDensityBGiven :1; unsigned B4SOIoxideTrapDensityCGiven :1; unsigned B4SOIemGiven :1; unsigned B4SOIefGiven :1; unsigned B4SOIafGiven :1; unsigned B4SOIkfGiven :1; unsigned B4SOInoifGiven :1; unsigned B4SOIbfGiven :1; /* v4.0 */ unsigned B4SOIw0flkGiven :1; /* v4.0 */ unsigned B4SOIfrbodyGiven :1; /* v4.0 */ unsigned B4SOILintGiven :1; unsigned B4SOILlGiven :1; unsigned B4SOILlcGiven :1; /* v2.2.3 */ unsigned B4SOILlnGiven :1; unsigned B4SOILwGiven :1; unsigned B4SOILwcGiven :1; /* v2.2.3 */ unsigned B4SOILwnGiven :1; unsigned B4SOILwlGiven :1; unsigned B4SOILwlcGiven :1; /* v2.2.3 */ unsigned B4SOILminGiven :1; unsigned B4SOILmaxGiven :1; unsigned B4SOIWintGiven :1; unsigned B4SOIWlGiven :1; unsigned B4SOIWlcGiven :1; /* v2.2.3 */ unsigned B4SOIWlnGiven :1; unsigned B4SOIWwGiven :1; unsigned B4SOIWwcGiven :1; /* v2.2.3 */ unsigned B4SOIWwnGiven :1; unsigned B4SOIWwlGiven :1; unsigned B4SOIWwlcGiven :1; /* v2.2.3 */ unsigned B4SOIWminGiven :1; unsigned B4SOIWmaxGiven :1; /* added for stress effect */ unsigned B4SOIsarefGiven :1; unsigned B4SOIsbrefGiven :1; unsigned B4SOIwlodGiven :1; unsigned B4SOIku0Given :1; unsigned B4SOIkvsatGiven :1; unsigned B4SOIkvth0Given :1; unsigned B4SOItku0Given :1; unsigned B4SOIllodku0Given :1; unsigned B4SOIwlodku0Given :1; unsigned B4SOIllodvthGiven :1; unsigned B4SOIwlodvthGiven :1; unsigned B4SOIlku0Given :1; unsigned B4SOIwku0Given :1; unsigned B4SOIpku0Given :1; unsigned B4SOIlkvth0Given :1; unsigned B4SOIwkvth0Given :1; unsigned B4SOIpkvth0Given :1; unsigned B4SOIstk2Given :1; unsigned B4SOIlodk2Given :1; unsigned B4SOIsteta0Given :1; unsigned B4SOIlodeta0Given :1; /* v4.0 added for stress effect end */ unsigned B4SOIlpebGiven :1; /* v4.0 for vth */ unsigned B4SOIllpebGiven :1; /* v4.0 for vth */ unsigned B4SOIwlpebGiven :1; /* v4.0 for vth */ unsigned B4SOIplpebGiven :1; /* v4.0 for vth */ unsigned B4SOIdvtp0Given :1; /* v4.0 for vth */ unsigned B4SOIldvtp0Given :1; /* v4.0 for vth */ unsigned B4SOIwdvtp0Given :1; /* v4.0 for vth */ unsigned B4SOIpdvtp0Given :1; /* v4.0 for vth */ unsigned B4SOIdvtp1Given :1; /* v4.0 for vth */ unsigned B4SOIldvtp1Given :1; /* v4.0 for vth */ unsigned B4SOIwdvtp1Given :1; /* v4.0 for vth */ unsigned B4SOIpdvtp1Given :1; /* v4.0 for vth */ unsigned B4SOIdvtp2Given :1; /* v4.1 for vth */ unsigned B4SOIldvtp2Given :1; /* v4.1 for vth */ unsigned B4SOIwdvtp2Given :1; /* v4.1 for vth */ unsigned B4SOIpdvtp2Given :1; /* v4.1 for vth */ unsigned B4SOIdvtp3Given :1; /* v4.1 for vth */ unsigned B4SOIldvtp3Given :1; /* v4.1 for vth */ unsigned B4SOIwdvtp3Given :1; /* v4.1 for vth */ unsigned B4SOIpdvtp3Given :1; /* v4.1 for vth */ unsigned B4SOIdvtp4Given :1; /* v4.1 for vth */ unsigned B4SOIldvtp4Given :1; /* v4.1 for vth */ unsigned B4SOIwdvtp4Given :1; /* v4.1 for vth */ unsigned B4SOIpdvtp4Given :1; /* v4.1 for vth */ unsigned B4SOIminvGiven :1; /* v4.0 for Vgsteff */ unsigned B4SOIlminvGiven :1; /* v4.0 for Vgsteff */ unsigned B4SOIwminvGiven :1; /* v4.0 for Vgsteff */ unsigned B4SOIpminvGiven :1; /* v4.0 for Vgsteff */ unsigned B4SOIfproutGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIlfproutGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIwfproutGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIpfproutGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIpditsGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIlpditsGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIwpditsGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIppditsGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIpditsdGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIlpditsdGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIwpditsdGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIppditsdGiven :1; /* v4.0 for DITS in ID */ unsigned B4SOIpditslGiven :1; /* v4.0 for DITS in ID */ } B4SOImodel; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define B4SOI_W 1 #define B4SOI_L 2 #define B4SOI_M 47 #define B4SOI_AS 3 #define B4SOI_AD 4 #define B4SOI_PS 5 #define B4SOI_PD 6 #define B4SOI_NRS 7 #define B4SOI_NRD 8 #define B4SOI_OFF 9 #define B4SOI_IC_VBS 10 #define B4SOI_IC_VDS 11 #define B4SOI_IC_VGS 12 #define B4SOI_IC_VES 13 #define B4SOI_IC_VPS 14 #define B4SOI_BJTOFF 15 #define B4SOI_RTH0 16 #define B4SOI_CTH0 17 #define B4SOI_NRB 18 #define B4SOI_IC 19 #define B4SOI_NQSMOD 20 #define B4SOI_DEBUG 21 /* v2.0 release */ #define B4SOI_NBC 22 #define B4SOI_NSEG 23 #define B4SOI_PDBCP 24 #define B4SOI_PSBCP 25 #define B4SOI_AGBCP 26 #define B4SOI_AEBCP 27 #define B4SOI_VBSUSR 28 #define B4SOI_TNODEOUT 29 #define B4SOI_FRBODY 30 /* v2.2.2 */ #define B4SOI_RGATEMOD 31 /* v3.1 */ #define B4SOI_SOIMOD 32 /* v3.2 */ #define B4SOI_NF 33 /* v4.0 */ #define B4SOI_RBODYMOD 34 /* v4.0 */ #define B4SOI_RBDB 35 /* v4.0 */ #define B4SOI_RBSB 36 /* v4.0 */ #define B4SOI_CJSB 37 /* v4.0 */ #define B4SOI_CJDB 38 /* v4.0 */ #define B4SOI_SA 41 /* v4.0 */ #define B4SOI_SB 42 /* v4.0 */ #define B4SOI_SD 43 /* v4.0 */ #define B4SOI_DELVTO 44 /* v4.0 */ #define B4SOI_AGBCPD 45 /* v4.0 */ #define B4SOI_AGBCP2 46 /* v4.1 improvement on BC */ /* model parameters */ #define B4SOI_MOD_PFGIDL 65 #define B4SOI_MOD_WFGIDL 66 #define B4SOI_MOD_LFGIDL 67 #define B4SOI_MOD_FGIDL 68 #define B4SOI_MOD_PKGIDL 69 #define B4SOI_MOD_WKGIDL 70 #define B4SOI_MOD_LKGIDL 71 #define B4SOI_MOD_KGIDL 72 #define B4SOI_MOD_PRGIDL 73 #define B4SOI_MOD_WRGIDL 74 #define B4SOI_MOD_LRGIDL 75 #define B4SOI_MOD_RGIDL 76 #define B4SOI_MOD_GIDLMOD 77 #define B4SOI_MOD_PNSD 78 #define B4SOI_MOD_WNSD 79 #define B4SOI_MOD_LNSD 80 #define B4SOI_MOD_NSD 81 #define B4SOI_MOD_PHIG 82 #define B4SOI_MOD_EASUB 83 #define B4SOI_MOD_TBGBSUB 84 #define B4SOI_MOD_TBGASUB 85 #define B4SOI_MOD_BG0SUB 86 #define B4SOI_MOD_NI0SUB 87 #define B4SOI_MOD_EPSRGATE 88 #define B4SOI_MOD_ADOS 89 #define B4SOI_MOD_BDOS 90 #define B4SOI_MOD_LEFFEOT 91 #define B4SOI_MOD_WEFFEOT 92 #define B4SOI_MOD_VDDEOT 93 #define B4SOI_MOD_TEMPEOT 94 #define B4SOI_MOD_TOXP 95 #define B4SOI_MOD_ETSI 96 #define B4SOI_MOD_EOT 97 #define B4SOI_MOD_EPSROX 98 #define B4SOI_MOD_EPSRSUB 99 #define B4SOI_MOD_MTRLMOD 100 /*4.1*/ #define B4SOI_MOD_CAPMOD 101 #define B4SOI_MOD_NQSMOD 102 #define B4SOI_MOD_MOBMOD 103 /*#define B4SOI_MOD_NOIMOD 104 v3.2 */ #define B4SOI_MOD_RDSMOD 104 /* v4.0 */ #define B4SOI_MOD_SHMOD 105 /*#define B4SOI_MOD_DDMOD 106 v4.2 ddmod is not used any more*/ #define B4SOI_MOD_TOX 107 #define B4SOI_MOD_CDSC 108 #define B4SOI_MOD_CDSCB 109 #define B4SOI_MOD_CIT 110 #define B4SOI_MOD_NFACTOR 111 #define B4SOI_MOD_XJ 112 #define B4SOI_MOD_VSAT 113 #define B4SOI_MOD_AT 114 #define B4SOI_MOD_A0 115 #define B4SOI_MOD_A1 116 #define B4SOI_MOD_A2 117 #define B4SOI_MOD_KETA 118 #define B4SOI_MOD_NSUB 119 #define B4SOI_MOD_NPEAK 120 #define B4SOI_MOD_NGATE 121 #define B4SOI_MOD_GAMMA1 122 #define B4SOI_MOD_GAMMA2 123 #define B4SOI_MOD_VBX 124 #define B4SOI_MOD_BINUNIT 125 #define B4SOI_MOD_VBM 126 #define B4SOI_MOD_XT 127 #define B4SOI_MOD_K1 129 #define B4SOI_MOD_KT1 130 #define B4SOI_MOD_KT1L 131 #define B4SOI_MOD_K2 132 #define B4SOI_MOD_KT2 133 #define B4SOI_MOD_K3 134 #define B4SOI_MOD_K3B 135 #define B4SOI_MOD_W0 136 #define B4SOI_MOD_LPE0 137 #define B4SOI_MOD_DVT0 138 #define B4SOI_MOD_DVT1 139 #define B4SOI_MOD_DVT2 140 #define B4SOI_MOD_DVT0W 141 #define B4SOI_MOD_DVT1W 142 #define B4SOI_MOD_DVT2W 143 #define B4SOI_MOD_DROUT 144 #define B4SOI_MOD_DSUB 145 #define B4SOI_MOD_VTH0 146 #define B4SOI_MOD_UA 147 #define B4SOI_MOD_UA1 148 #define B4SOI_MOD_UB 149 #define B4SOI_MOD_UB1 150 #define B4SOI_MOD_UC 151 #define B4SOI_MOD_UC1 152 #define B4SOI_MOD_U0 153 #define B4SOI_MOD_UTE 154 #define B4SOI_MOD_VOFF 155 #define B4SOI_MOD_DELTA 156 #define B4SOI_MOD_RDSW 157 #define B4SOI_MOD_PRT 158 #define B4SOI_MOD_LDD 159 #define B4SOI_MOD_ETA 160 #define B4SOI_MOD_ETA0 161 #define B4SOI_MOD_ETAB 162 #define B4SOI_MOD_PCLM 163 #define B4SOI_MOD_PDIBL1 164 #define B4SOI_MOD_PDIBL2 165 #define B4SOI_MOD_PSCBE1 166 #define B4SOI_MOD_PSCBE2 167 #define B4SOI_MOD_PVAG 168 #define B4SOI_MOD_WR 169 #define B4SOI_MOD_DWG 170 #define B4SOI_MOD_DWB 171 #define B4SOI_MOD_B0 172 #define B4SOI_MOD_B1 173 #define B4SOI_MOD_ALPHA0 174 #define B4SOI_MOD_PDIBLB 178 #define B4SOI_MOD_PRWG 179 #define B4SOI_MOD_PRWB 180 #define B4SOI_MOD_CDSCD 181 #define B4SOI_MOD_AGS 182 #define B4SOI_MOD_FRINGE 184 #define B4SOI_MOD_CGSL 186 #define B4SOI_MOD_CGDL 187 #define B4SOI_MOD_CKAPPA 188 #define B4SOI_MOD_CF 189 #define B4SOI_MOD_CLC 190 #define B4SOI_MOD_CLE 191 #define B4SOI_MOD_PARAMCHK 192 #define B4SOI_MOD_VERSION 193 #define B4SOI_MOD_TBOX 195 #define B4SOI_MOD_TSI 196 #define B4SOI_MOD_KB1 197 #define B4SOI_MOD_KB3 198 #define B4SOI_MOD_DELP 201 #define B4SOI_MOD_RBODY 204 #define B4SOI_MOD_ADICE0 205 #define B4SOI_MOD_ABP 206 #define B4SOI_MOD_MXC 207 #define B4SOI_MOD_RTH0 208 #define B4SOI_MOD_CTH0 209 #define B4SOI_MOD_ALPHA1 214 #define B4SOI_MOD_EGIDL 215 #define B4SOI_MOD_AGIDL 216 #define B4SOI_MOD_BGIDL 217 #define B4SOI_MOD_NDIODES 218 /* v4.0 */ #define B4SOI_MOD_LDIOF 219 #define B4SOI_MOD_LDIOR 220 #define B4SOI_MOD_NTUNS 221 /* v4.0 */ #define B4SOI_MOD_ISBJT 222 #define B4SOI_MOD_ISDIF 223 #define B4SOI_MOD_ISREC 224 #define B4SOI_MOD_ISTUN 225 #define B4SOI_MOD_XBJT 226 #define B4SOI_MOD_TT 232 #define B4SOI_MOD_VSDTH 233 #define B4SOI_MOD_VSDFB 234 #define B4SOI_MOD_ASD 235 #define B4SOI_MOD_CSDMIN 236 #define B4SOI_MOD_RBSH 237 #define B4SOI_MOD_ESATII 238 /* v2.0 release */ #define B4SOI_MOD_K1W1 239 #define B4SOI_MOD_K1W2 240 #define B4SOI_MOD_KETAS 241 #define B4SOI_MOD_DWBC 242 #define B4SOI_MOD_BETA0 243 #define B4SOI_MOD_BETA1 244 #define B4SOI_MOD_BETA2 245 #define B4SOI_MOD_VDSATII0 246 #define B4SOI_MOD_TII 247 #define B4SOI_MOD_LII 248 #define B4SOI_MOD_SII0 249 #define B4SOI_MOD_SII1 250 #define B4SOI_MOD_SII2 251 #define B4SOI_MOD_SIID 252 #define B4SOI_MOD_FBJTII 253 #define B4SOI_MOD_NRECF0S 255 #define B4SOI_MOD_NRECR0S 256 #define B4SOI_MOD_LN 257 #define B4SOI_MOD_VREC0S 258 #define B4SOI_MOD_VTUN0S 259 #define B4SOI_MOD_NBJT 260 #define B4SOI_MOD_LBJT0 261 #define B4SOI_MOD_VABJT 262 #define B4SOI_MOD_AELY 263 #define B4SOI_MOD_AHLIS 264 /* v4.0 */ #define B4SOI_MOD_NTRECF 265 #define B4SOI_MOD_NTRECR 266 #define B4SOI_MOD_DLCB 267 #define B4SOI_MOD_FBODY 268 #define B4SOI_MOD_NDIF 269 #define B4SOI_MOD_ACDE 272 #define B4SOI_MOD_MOIN 273 #define B4SOI_MOD_DELVT 274 #define B4SOI_MOD_DLBG 275 #define B4SOI_MOD_LDIF0 276 /* v2.2 release */ #define B4SOI_MOD_WTH0 277 #define B4SOI_MOD_RHALO 278 #define B4SOI_MOD_NTOX 279 #define B4SOI_MOD_TOXREF 280 #define B4SOI_MOD_EBG 281 #define B4SOI_MOD_VEVB 282 #define B4SOI_MOD_ALPHAGB1 283 #define B4SOI_MOD_BETAGB1 284 #define B4SOI_MOD_VGB1 285 #define B4SOI_MOD_VECB 286 #define B4SOI_MOD_ALPHAGB2 287 #define B4SOI_MOD_BETAGB2 288 #define B4SOI_MOD_VGB2 289 #define B4SOI_MOD_TOXQM 290 #define B4SOI_MOD_IGBMOD 291 /* v3.0 */ #define B4SOI_MOD_VOXH 292 #define B4SOI_MOD_DELTAVOX 293 #define B4SOI_MOD_IGCMOD 294 /* v3.0 */ /* v3.1 added for RF */ #define B4SOI_MOD_RGATEMOD 295 #define B4SOI_MOD_XRCRG1 296 #define B4SOI_MOD_XRCRG2 297 #define B4SOI_MOD_RSHG 298 #define B4SOI_MOD_NGCON 299 /* v3.1 added for RF end */ #define B4SOI_MOD_RBODYMOD 300 /* v4.0 */ /* Added for binning - START3 */ /* Length dependence */ #define B4SOI_MOD_LNPEAK 301 #define B4SOI_MOD_LNSUB 302 #define B4SOI_MOD_LNGATE 303 #define B4SOI_MOD_LVTH0 304 #define B4SOI_MOD_LK1 305 #define B4SOI_MOD_LK1W1 306 #define B4SOI_MOD_LK1W2 307 #define B4SOI_MOD_LK2 308 #define B4SOI_MOD_LK3 309 #define B4SOI_MOD_LK3B 310 #define B4SOI_MOD_LKB1 311 #define B4SOI_MOD_LW0 312 #define B4SOI_MOD_LLPE0 313 #define B4SOI_MOD_LDVT0 314 #define B4SOI_MOD_LDVT1 315 #define B4SOI_MOD_LDVT2 316 #define B4SOI_MOD_LDVT0W 317 #define B4SOI_MOD_LDVT1W 318 #define B4SOI_MOD_LDVT2W 319 #define B4SOI_MOD_LU0 320 #define B4SOI_MOD_LUA 321 #define B4SOI_MOD_LUB 322 #define B4SOI_MOD_LUC 323 #define B4SOI_MOD_LVSAT 324 #define B4SOI_MOD_LA0 325 #define B4SOI_MOD_LAGS 326 #define B4SOI_MOD_LB0 327 #define B4SOI_MOD_LB1 328 #define B4SOI_MOD_LKETA 329 #define B4SOI_MOD_LKETAS 330 #define B4SOI_MOD_LA1 331 #define B4SOI_MOD_LA2 332 #define B4SOI_MOD_LRDSW 333 #define B4SOI_MOD_LPRWB 334 #define B4SOI_MOD_LPRWG 335 #define B4SOI_MOD_LWR 336 #define B4SOI_MOD_LNFACTOR 337 #define B4SOI_MOD_LDWG 338 #define B4SOI_MOD_LDWB 339 #define B4SOI_MOD_LVOFF 340 #define B4SOI_MOD_LETA0 341 #define B4SOI_MOD_LETAB 342 #define B4SOI_MOD_LDSUB 343 #define B4SOI_MOD_LCIT 344 #define B4SOI_MOD_LCDSC 345 #define B4SOI_MOD_LCDSCB 346 #define B4SOI_MOD_LCDSCD 347 #define B4SOI_MOD_LPCLM 348 #define B4SOI_MOD_LPDIBL1 349 #define B4SOI_MOD_LPDIBL2 350 #define B4SOI_MOD_LPDIBLB 351 #define B4SOI_MOD_LDROUT 352 #define B4SOI_MOD_LPVAG 353 #define B4SOI_MOD_LDELTA 354 #define B4SOI_MOD_LALPHA0 355 #define B4SOI_MOD_LFBJTII 356 #define B4SOI_MOD_LBETA0 357 #define B4SOI_MOD_LBETA1 358 #define B4SOI_MOD_LBETA2 359 #define B4SOI_MOD_LVDSATII0 360 #define B4SOI_MOD_LLII 361 #define B4SOI_MOD_LESATII 362 #define B4SOI_MOD_LSII0 363 #define B4SOI_MOD_LSII1 364 #define B4SOI_MOD_LSII2 365 #define B4SOI_MOD_LSIID 366 #define B4SOI_MOD_LAGIDL 367 #define B4SOI_MOD_LBGIDL 368 #define B4SOI_MOD_LEGIDL 369 #define B4SOI_MOD_LNTUNS 370 /* v4.0 */ #define B4SOI_MOD_LNDIODES 371 #define B4SOI_MOD_LNRECF0S 372 #define B4SOI_MOD_LNRECR0S 373 #define B4SOI_MOD_LISBJT 374 #define B4SOI_MOD_LISDIF 375 #define B4SOI_MOD_LISREC 376 #define B4SOI_MOD_LISTUN 377 #define B4SOI_MOD_LVREC0S 378 #define B4SOI_MOD_LVTUN0S 379 #define B4SOI_MOD_LNBJT 380 #define B4SOI_MOD_LLBJT0 381 #define B4SOI_MOD_LVABJT 382 #define B4SOI_MOD_LAELY 383 #define B4SOI_MOD_LAHLIS 384 /* v4.0 */ #define B4SOI_MOD_LVSDFB 385 #define B4SOI_MOD_LVSDTH 386 #define B4SOI_MOD_LDELVT 387 #define B4SOI_MOD_LACDE 388 #define B4SOI_MOD_LMOIN 389 /* v3.1 added for RF */ #define B4SOI_MOD_LXRCRG1 390 #define B4SOI_MOD_LXRCRG2 391 #define B4SOI_MOD_XGW 392 #define B4SOI_MOD_XGL 393 /* v3.1 added for RF end */ #define B4SOI_MOD_CFRCOEFF 394 /* v4.4 */ /* Width dependence */ #define B4SOI_MOD_WNPEAK 401 #define B4SOI_MOD_WNSUB 402 #define B4SOI_MOD_WNGATE 403 #define B4SOI_MOD_WVTH0 404 #define B4SOI_MOD_WK1 405 #define B4SOI_MOD_WK1W1 406 #define B4SOI_MOD_WK1W2 407 #define B4SOI_MOD_WK2 408 #define B4SOI_MOD_WK3 409 #define B4SOI_MOD_WK3B 410 #define B4SOI_MOD_WKB1 411 #define B4SOI_MOD_WW0 412 #define B4SOI_MOD_WLPE0 413 #define B4SOI_MOD_WDVT0 414 #define B4SOI_MOD_WDVT1 415 #define B4SOI_MOD_WDVT2 416 #define B4SOI_MOD_WDVT0W 417 #define B4SOI_MOD_WDVT1W 418 #define B4SOI_MOD_WDVT2W 419 #define B4SOI_MOD_WU0 420 #define B4SOI_MOD_WUA 421 #define B4SOI_MOD_WUB 422 #define B4SOI_MOD_WUC 423 #define B4SOI_MOD_WVSAT 424 #define B4SOI_MOD_WA0 425 #define B4SOI_MOD_WAGS 426 #define B4SOI_MOD_WB0 427 #define B4SOI_MOD_WB1 428 #define B4SOI_MOD_WKETA 429 #define B4SOI_MOD_WKETAS 430 #define B4SOI_MOD_WA1 431 #define B4SOI_MOD_WA2 432 #define B4SOI_MOD_WRDSW 433 #define B4SOI_MOD_WPRWB 434 #define B4SOI_MOD_WPRWG 435 #define B4SOI_MOD_WWR 436 #define B4SOI_MOD_WNFACTOR 437 #define B4SOI_MOD_WDWG 438 #define B4SOI_MOD_WDWB 439 #define B4SOI_MOD_WVOFF 440 #define B4SOI_MOD_WETA0 441 #define B4SOI_MOD_WETAB 442 #define B4SOI_MOD_WDSUB 443 #define B4SOI_MOD_WCIT 444 #define B4SOI_MOD_WCDSC 445 #define B4SOI_MOD_WCDSCB 446 #define B4SOI_MOD_WCDSCD 447 #define B4SOI_MOD_WPCLM 448 #define B4SOI_MOD_WPDIBL1 449 #define B4SOI_MOD_WPDIBL2 450 #define B4SOI_MOD_WPDIBLB 451 #define B4SOI_MOD_WDROUT 452 #define B4SOI_MOD_WPVAG 453 #define B4SOI_MOD_WDELTA 454 #define B4SOI_MOD_WALPHA0 455 #define B4SOI_MOD_WFBJTII 456 #define B4SOI_MOD_WBETA0 457 #define B4SOI_MOD_WBETA1 458 #define B4SOI_MOD_WBETA2 459 #define B4SOI_MOD_WVDSATII0 460 #define B4SOI_MOD_WLII 461 #define B4SOI_MOD_WESATII 462 #define B4SOI_MOD_WSII0 463 #define B4SOI_MOD_WSII1 464 #define B4SOI_MOD_WSII2 465 #define B4SOI_MOD_WSIID 466 #define B4SOI_MOD_WAGIDL 467 #define B4SOI_MOD_WBGIDL 468 #define B4SOI_MOD_WEGIDL 469 #define B4SOI_MOD_WNTUNS 470 /* v4.0 */ #define B4SOI_MOD_WNDIODES 471 #define B4SOI_MOD_WNRECF0S 472 #define B4SOI_MOD_WNRECR0S 473 #define B4SOI_MOD_WISBJT 474 #define B4SOI_MOD_WISDIF 475 #define B4SOI_MOD_WISREC 476 #define B4SOI_MOD_WISTUN 477 #define B4SOI_MOD_WVREC0S 478 #define B4SOI_MOD_WVTUN0S 479 #define B4SOI_MOD_WNBJT 480 #define B4SOI_MOD_WLBJT0 481 #define B4SOI_MOD_WVABJT 482 #define B4SOI_MOD_WAELY 483 #define B4SOI_MOD_WAHLIS 484 /* v4.0 */ #define B4SOI_MOD_WVSDFB 485 #define B4SOI_MOD_WVSDTH 486 #define B4SOI_MOD_WDELVT 487 #define B4SOI_MOD_WACDE 488 #define B4SOI_MOD_WMOIN 489 /* v3.1 added for RF */ #define B4SOI_MOD_WXRCRG1 490 #define B4SOI_MOD_WXRCRG2 491 /* v3.1 added for RF end */ /* Cross-term dependence */ #define B4SOI_MOD_PNPEAK 501 #define B4SOI_MOD_PNSUB 502 #define B4SOI_MOD_PNGATE 503 #define B4SOI_MOD_PVTH0 504 #define B4SOI_MOD_PK1 505 #define B4SOI_MOD_PK1W1 506 #define B4SOI_MOD_PK1W2 507 #define B4SOI_MOD_PK2 508 #define B4SOI_MOD_PK3 509 #define B4SOI_MOD_PK3B 510 #define B4SOI_MOD_PKB1 511 #define B4SOI_MOD_PW0 512 #define B4SOI_MOD_PLPE0 513 #define B4SOI_MOD_PDVT0 514 #define B4SOI_MOD_PDVT1 515 #define B4SOI_MOD_PDVT2 516 #define B4SOI_MOD_PDVT0W 517 #define B4SOI_MOD_PDVT1W 518 #define B4SOI_MOD_PDVT2W 519 #define B4SOI_MOD_PU0 520 #define B4SOI_MOD_PUA 521 #define B4SOI_MOD_PUB 522 #define B4SOI_MOD_PUC 523 #define B4SOI_MOD_PVSAT 524 #define B4SOI_MOD_PA0 525 #define B4SOI_MOD_PAGS 526 #define B4SOI_MOD_PB0 527 #define B4SOI_MOD_PB1 528 #define B4SOI_MOD_PKETA 529 #define B4SOI_MOD_PKETAS 530 #define B4SOI_MOD_PA1 531 #define B4SOI_MOD_PA2 532 #define B4SOI_MOD_PRDSW 533 #define B4SOI_MOD_PPRWB 534 #define B4SOI_MOD_PPRWG 535 #define B4SOI_MOD_PWR 536 #define B4SOI_MOD_PNFACTOR 537 #define B4SOI_MOD_PDWG 538 #define B4SOI_MOD_PDWB 539 #define B4SOI_MOD_PVOFF 540 #define B4SOI_MOD_PETA0 541 #define B4SOI_MOD_PETAB 542 #define B4SOI_MOD_PDSUB 543 #define B4SOI_MOD_PCIT 544 #define B4SOI_MOD_PCDSC 545 #define B4SOI_MOD_PCDSCB 546 #define B4SOI_MOD_PCDSCD 547 #define B4SOI_MOD_PPCLM 548 #define B4SOI_MOD_PPDIBL1 549 #define B4SOI_MOD_PPDIBL2 550 #define B4SOI_MOD_PPDIBLB 551 #define B4SOI_MOD_PDROUT 552 #define B4SOI_MOD_PPVAG 553 #define B4SOI_MOD_PDELTA 554 #define B4SOI_MOD_PALPHA0 555 #define B4SOI_MOD_PFBJTII 556 #define B4SOI_MOD_PBETA0 557 #define B4SOI_MOD_PBETA1 558 #define B4SOI_MOD_PBETA2 559 #define B4SOI_MOD_PVDSATII0 560 #define B4SOI_MOD_PLII 561 #define B4SOI_MOD_PESATII 562 #define B4SOI_MOD_PSII0 563 #define B4SOI_MOD_PSII1 564 #define B4SOI_MOD_PSII2 565 #define B4SOI_MOD_PSIID 566 #define B4SOI_MOD_PAGIDL 567 #define B4SOI_MOD_PBGIDL 568 #define B4SOI_MOD_PEGIDL 569 #define B4SOI_MOD_PNTUNS 570 /* v4.0 */ #define B4SOI_MOD_PNDIODES 571 #define B4SOI_MOD_PNRECF0S 572 #define B4SOI_MOD_PNRECR0S 573 #define B4SOI_MOD_PISBJT 574 #define B4SOI_MOD_PISDIF 575 #define B4SOI_MOD_PISREC 576 #define B4SOI_MOD_PISTUN 577 #define B4SOI_MOD_PVREC0S 578 #define B4SOI_MOD_PVTUN0S 579 #define B4SOI_MOD_PNBJT 580 #define B4SOI_MOD_PLBJT0 581 #define B4SOI_MOD_PVABJT 582 #define B4SOI_MOD_PAELY 583 #define B4SOI_MOD_PAHLIS 584 /* v4.0 */ #define B4SOI_MOD_PVSDFB 585 #define B4SOI_MOD_PVSDTH 586 #define B4SOI_MOD_PDELVT 587 #define B4SOI_MOD_PACDE 588 #define B4SOI_MOD_PMOIN 589 #define B4SOI_MOD_PXRCRG1 590 /* v3.1 for RF */ #define B4SOI_MOD_PXRCRG2 591 /* v3.1 for RF */ #define B4SOI_MOD_EM 592 /* v3.2 for noise */ #define B4SOI_MOD_EF 593 /* v3.2 for noise */ #define B4SOI_MOD_AF 594 /* v3.2 for noise */ #define B4SOI_MOD_KF 595 /* v3.2 for noise */ #define B4SOI_MOD_NOIF 596 /* v3.2 for noise */ #define B4SOI_MOD_BF 597 /* v4.0 for noise */ #define B4SOI_MOD_W0FLK 598 /* v4.0 for noise */ #define B4SOI_MOD_FRBODY 599 /* v4.0 for Rbody */ #define B4SOI_MOD_CGIDL 600 /* v4.0 for gidl */ #define B4SOI_MOD_LCGIDL 601 /* v4.0 for gidl */ #define B4SOI_MOD_WCGIDL 602 /* v4.0 for gidl */ #define B4SOI_MOD_PCGIDL 603 /* v4.0 for gidl */ #define B4SOI_MOD_LPEB 604 /* v4.0 for Vth */ #define B4SOI_MOD_LLPEB 605 /* v4.0 for Vth */ #define B4SOI_MOD_WLPEB 606 /* v4.0 for Vth */ #define B4SOI_MOD_PLPEB 607 /* v4.0 for Vth */ #define B4SOI_MOD_DVTP0 608 /* v4.0 for Vth */ #define B4SOI_MOD_LDVTP0 609 /* v4.0 for Vth */ #define B4SOI_MOD_WDVTP0 610 /* v4.0 for Vth */ #define B4SOI_MOD_PDVTP0 611 /* v4.0 for Vth */ #define B4SOI_MOD_DVTP1 612 /* v4.0 for Vth */ #define B4SOI_MOD_LDVTP1 613 /* v4.0 for Vth */ #define B4SOI_MOD_WDVTP1 614 /* v4.0 for Vth */ #define B4SOI_MOD_PDVTP1 615 /* v4.0 for Vth */ #define B4SOI_MOD_MINV 616 /* v4.0 for Vgsteff */ #define B4SOI_MOD_LMINV 617 /* v4.0 for Vgsteff */ #define B4SOI_MOD_WMINV 618 /* v4.0 for Vgsteff */ #define B4SOI_MOD_PMINV 619 /* v4.0 for Vgsteff */ #define B4SOI_MOD_FPROUT 620 /* v4.0 for DITS in Id */ #define B4SOI_MOD_LFPROUT 621 /* v4.0 for DITS in Id */ #define B4SOI_MOD_WFPROUT 622 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PFPROUT 623 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PDITS 624 /* v4.0 for DITS in Id */ #define B4SOI_MOD_LPDITS 625 /* v4.0 for DITS in Id */ #define B4SOI_MOD_WPDITS 626 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PPDITS 627 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PDITSD 628 /* v4.0 for DITS in Id */ #define B4SOI_MOD_LPDITSD 629 /* v4.0 for DITS in Id */ #define B4SOI_MOD_WPDITSD 630 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PPDITSD 631 /* v4.0 for DITS in Id */ #define B4SOI_MOD_PDITSL 632 /* v4.0 for DITS in Id */ #define B4SOI_MOD_NDIODED 633 /* v4.0 */ #define B4SOI_MOD_LNDIODED 634 /* v4.0 */ #define B4SOI_MOD_WNDIODED 635 /* v4.0 */ #define B4SOI_MOD_PNDIODED 636 /* v4.0 */ #define B4SOI_MOD_IDDIF 637 /* v4.0 */ #define B4SOI_MOD_LIDDIF 638 /* v4.0 */ #define B4SOI_MOD_WIDDIF 639 /* v4.0 */ #define B4SOI_MOD_PIDDIF 640 /* v4.0 */ #define B4SOI_MOD_IDBJT 641 /* v4.0 */ #define B4SOI_MOD_LIDBJT 642 /* v4.0 */ #define B4SOI_MOD_WIDBJT 643 /* v4.0 */ #define B4SOI_MOD_PIDBJT 644 /* v4.0 */ #define B4SOI_MOD_IDREC 645 /* v4.0 */ #define B4SOI_MOD_LIDREC 646 /* v4.0 */ #define B4SOI_MOD_WIDREC 647 /* v4.0 */ #define B4SOI_MOD_PIDREC 648 /* v4.0 */ #define B4SOI_MOD_IDTUN 649 /* v4.0 */ #define B4SOI_MOD_LIDTUN 650 /* v4.0 */ #define B4SOI_MOD_WIDTUN 651 /* v4.0 */ #define B4SOI_MOD_PIDTUN 652 /* v4.0 */ #define B4SOI_MOD_NRECF0D 653 /* v4.0 */ #define B4SOI_MOD_LNRECF0D 654 /* v4.0 */ #define B4SOI_MOD_WNRECF0D 655 /* v4.0 */ #define B4SOI_MOD_PNRECF0D 656 /* v4.0 */ #define B4SOI_MOD_NRECR0D 657 /* v4.0 */ #define B4SOI_MOD_LNRECR0D 658 /* v4.0 */ #define B4SOI_MOD_WNRECR0D 659 /* v4.0 */ #define B4SOI_MOD_PNRECR0D 660 /* v4.0 */ #define B4SOI_MOD_VREC0D 661 /* v4.0 */ #define B4SOI_MOD_LVREC0D 662 /* v4.0 */ #define B4SOI_MOD_WVREC0D 663 /* v4.0 */ #define B4SOI_MOD_PVREC0D 664 /* v4.0 */ #define B4SOI_MOD_VTUN0D 665 /* v4.0 */ #define B4SOI_MOD_LVTUN0D 666 /* v4.0 */ #define B4SOI_MOD_WVTUN0D 667 /* v4.0 */ #define B4SOI_MOD_PVTUN0D 668 /* v4.0 */ #define B4SOI_MOD_NTUND 669 /* v4.0 */ #define B4SOI_MOD_LNTUND 670 /* v4.0 */ #define B4SOI_MOD_WNTUND 671 /* v4.0 */ #define B4SOI_MOD_PNTUND 672 /* v4.0 */ #define B4SOI_MOD_RDW 673 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_LRDW 674 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_WRDW 675 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_PRDW 676 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_RSW 677 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_LRSW 678 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_WRSW 679 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_PRSW 680 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_RDWMIN 681 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_RSWMIN 682 /* v4.0 for rdsMod =1 */ #define B4SOI_MOD_AHLID 683 /* v4.0 */ #define B4SOI_MOD_LAHLID 684 /* v4.0 */ #define B4SOI_MOD_WAHLID 685 /* v4.0 */ #define B4SOI_MOD_PAHLID 686 /* v4.0 */ #define B4SOI_MOD_DVTP2 687 /* v4.1 for Vth */ #define B4SOI_MOD_LDVTP2 688 /* v4.1 for Vth */ #define B4SOI_MOD_WDVTP2 689 /* v4.1 for Vth */ #define B4SOI_MOD_PDVTP2 690 /* v4.1 for Vth */ #define B4SOI_MOD_DVTP3 691 /* v4.1 for Vth */ #define B4SOI_MOD_LDVTP3 692 /* v4.1 for Vth */ #define B4SOI_MOD_WDVTP3 693 /* v4.1 for Vth */ #define B4SOI_MOD_PDVTP3 694 /* v4.1 for Vth */ #define B4SOI_MOD_DVTP4 695 /* v4.1 for Vth */ #define B4SOI_MOD_LDVTP4 696 /* v4.1 for Vth */ #define B4SOI_MOD_WDVTP4 697 /* v4.1 for Vth */ #define B4SOI_MOD_PDVTP4 698 /* v4.1 for Vth */ #define B4SOI_MOD_AIGBCP2 10001 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_LAIGBCP2 10002 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_WAIGBCP2 10003 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_PAIGBCP2 10004 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_BIGBCP2 10005 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_LBIGBCP2 10006 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_WBIGBCP2 10007 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_PBIGBCP2 10008 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_CIGBCP2 10009 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_LCIGBCP2 10010 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_WCIGBCP2 10011 /* v4.1 for Ig in AGBCP2 Region */ #define B4SOI_MOD_PCIGBCP2 10012 /* v4.1 for Ig in AGBCP2 Region */ /* Added for binning - END3 */ #define B4SOI_MOD_TNOM 701 #define B4SOI_MOD_CGSO 702 #define B4SOI_MOD_CGDO 703 #define B4SOI_MOD_CGEO 704 #define B4SOI_MOD_XPART 705 #define B4SOI_MOD_RSH 706 #define B4SOI_MOD_NMOS 814 #define B4SOI_MOD_PMOS 815 #define B4SOI_MOD_NOIA 816 #define B4SOI_MOD_NOIB 817 #define B4SOI_MOD_NOIC 818 #define B4SOI_MOD_LINT 819 #define B4SOI_MOD_LL 820 #define B4SOI_MOD_LLN 821 #define B4SOI_MOD_LW 822 #define B4SOI_MOD_LWN 823 #define B4SOI_MOD_LWL 824 #define B4SOI_MOD_WINT 827 #define B4SOI_MOD_WL 828 #define B4SOI_MOD_WLN 829 #define B4SOI_MOD_WW 830 #define B4SOI_MOD_WWN 831 #define B4SOI_MOD_WWL 832 /* v2.2.3 */ #define B4SOI_MOD_LWLC 841 #define B4SOI_MOD_LLC 842 #define B4SOI_MOD_LWC 843 #define B4SOI_MOD_WWLC 844 #define B4SOI_MOD_WLC 845 #define B4SOI_MOD_WWC 846 #define B4SOI_MOD_DTOXCV 847 #define B4SOI_MOD_DWC 848 #define B4SOI_MOD_DLC 849 #define B4SOI_MOD_PBSWGS 860 /* v4.0 */ #define B4SOI_MOD_MJSWGS 861 /* v4.0 */ #define B4SOI_MOD_CJSWGS 862 /* v4.0 */ #define B4SOI_MOD_CSDESW 863 #define B4SOI_MOD_XDIFS 870 #define B4SOI_MOD_XRECS 871 #define B4SOI_MOD_XTUNS 872 #define B4SOI_MOD_XDIFD 873 #define B4SOI_MOD_XRECD 874 #define B4SOI_MOD_XTUND 875 #define B4SOI_MOD_LXDIFS 876 #define B4SOI_MOD_LXRECS 877 #define B4SOI_MOD_LXTUNS 878 #define B4SOI_MOD_LXDIFD 879 #define B4SOI_MOD_LXRECD 880 #define B4SOI_MOD_LXTUND 881 #define B4SOI_MOD_WXDIFS 882 #define B4SOI_MOD_WXRECS 883 #define B4SOI_MOD_WXTUNS 884 #define B4SOI_MOD_WXDIFD 885 #define B4SOI_MOD_WXRECD 886 #define B4SOI_MOD_WXTUND 887 #define B4SOI_MOD_PXDIFS 888 #define B4SOI_MOD_PXRECS 889 #define B4SOI_MOD_PXTUNS 890 #define B4SOI_MOD_PXDIFD 891 #define B4SOI_MOD_PXRECD 892 #define B4SOI_MOD_PXTUND 893 #define B4SOI_MOD_TCJSWGS 894 #define B4SOI_MOD_TPBSWGS 895 #define B4SOI_MOD_TCJSWGD 896 #define B4SOI_MOD_TPBSWGD 897 /* device questions */ #define B4SOI_DNODE 901 #define B4SOI_GNODE 902 #define B4SOI_SNODE 903 #define B4SOI_BNODE 904 #define B4SOI_ENODE 905 #define B4SOI_DNODEPRIME 906 #define B4SOI_SNODEPRIME 907 #define B4SOI_VBD 908 #define B4SOI_VBS 909 #define B4SOI_VGS 910 #define B4SOI_VES 911 #define B4SOI_VDS 912 #define B4SOI_CD 913 #define B4SOI_CBS 914 #define B4SOI_CBD 915 #define B4SOI_GM 916 #define B4SOI_GDS 917 #define B4SOI_GMBS 918 #define B4SOI_GBD 919 #define B4SOI_GBS 920 #define B4SOI_QB 921 #define B4SOI_CQB 922 #define B4SOI_QG 923 #define B4SOI_CQG 924 #define B4SOI_QD 925 #define B4SOI_CQD 926 #define B4SOI_CGG 927 #define B4SOI_CGD 928 #define B4SOI_CGS 929 #define B4SOI_CBG 930 #define B4SOI_CAPBD 931 #define B4SOI_CQBD 932 #define B4SOI_CAPBS 933 #define B4SOI_CQBS 934 #define B4SOI_CDG 935 #define B4SOI_CDD 936 #define B4SOI_CDS 937 #define B4SOI_VON 938 #define B4SOI_VDSAT 939 #define B4SOI_QBS 940 #define B4SOI_QBD 941 #define B4SOI_SOURCECONDUCT 942 #define B4SOI_DRAINCONDUCT 943 #define B4SOI_CBDB 944 #define B4SOI_CBSB 945 #define B4SOI_GMID 946 #define B4SOI_QS 955 /* For debugging only */ #define B4SOI_DEBUG1 956 #define B4SOI_DEBUG2 957 #define B4SOI_DEBUG3 958 /* End debugging */ /* v3.1 added for RF */ #define B4SOI_GNODEEXT 947 #define B4SOI_GNODEMID 948 /* v3.1 added for RF end */ /* v4.0 */ #define B4SOI_DBNODE 949 #define B4SOI_SBNODE 950 /* v4.0 end */ /*4.1 mobmod=4*/ /*#define B4SOI_VGSTEFFVTH 3300*/ /*#define B4SOI_VTFBPHI1 3301*/ /*#define B4SOI_EG 3350*/ #define B4SOI_MOD_UD 3400 #define B4SOI_MOD_LUD 3401 #define B4SOI_MOD_WUD 3402 #define B4SOI_MOD_PUD 3403 #define B4SOI_MOD_UD1 3404 #define B4SOI_MOD_LUD1 3405 #define B4SOI_MOD_WUD1 3406 #define B4SOI_MOD_PUD1 3407 #define B4SOI_MOD_EU 3500 #define B4SOI_MOD_LEU 3501 #define B4SOI_MOD_WEU 3502 #define B4SOI_MOD_PEU 3503 #define B4SOI_MOD_UCS 3504 #define B4SOI_MOD_LUCS 3505 #define B4SOI_MOD_WUCS 3506 #define B4SOI_MOD_PUCS 3507 #define B4SOI_MOD_UCSTE 3508 #define B4SOI_MOD_LUCSTE 3509 #define B4SOI_MOD_WUCSTE 3510 #define B4SOI_MOD_PUCSTE 3511 /*4.1 Iii model*/ #define B4SOI_MOD_IIIMOD 4000 #define B4SOI_MOD_TVBCI 4001 #define B4SOI_MOD_EBJTII 4002 #define B4SOI_MOD_CBJTII 4003 #define B4SOI_MOD_VBCI 4004 #define B4SOI_MOD_ABJTII 4005 #define B4SOI_MOD_MBJTII 4006 #define B4SOI_MOD_LEBJTII 4007 #define B4SOI_MOD_LCBJTII 4008 #define B4SOI_MOD_LVBCI 4009 #define B4SOI_MOD_LABJTII 4010 #define B4SOI_MOD_LMBJTII 4011 #define B4SOI_MOD_WEBJTII 4012 #define B4SOI_MOD_WCBJTII 4013 #define B4SOI_MOD_WVBCI 4014 #define B4SOI_MOD_WABJTII 4015 #define B4SOI_MOD_WMBJTII 4016 #define B4SOI_MOD_PEBJTII 4017 #define B4SOI_MOD_PCBJTII 4018 #define B4SOI_MOD_PVBCI 4019 #define B4SOI_MOD_PABJTII 4020 #define B4SOI_MOD_PMBJTII 4021 #define B4SOI_MOD_EGISL 2500 #define B4SOI_MOD_AGISL 2501 #define B4SOI_MOD_BGISL 2502 #define B4SOI_MOD_CGISL 2503 #define B4SOI_MOD_RGISL 2504 #define B4SOI_MOD_KGISL 2505 #define B4SOI_MOD_FGISL 2506 #define B4SOI_MOD_LEGISL 2507 #define B4SOI_MOD_WEGISL 2508 #define B4SOI_MOD_PEGISL 2509 #define B4SOI_MOD_LAGISL 2510 #define B4SOI_MOD_WAGISL 2511 #define B4SOI_MOD_PAGISL 2512 #define B4SOI_MOD_LBGISL 2513 #define B4SOI_MOD_WBGISL 2514 #define B4SOI_MOD_PBGISL 2515 #define B4SOI_MOD_LCGISL 2516 #define B4SOI_MOD_WCGISL 2517 #define B4SOI_MOD_PCGISL 2518 #define B4SOI_MOD_LRGISL 2519 #define B4SOI_MOD_WRGISL 2520 #define B4SOI_MOD_PRGISL 2521 #define B4SOI_MOD_LKGISL 2522 #define B4SOI_MOD_WKGISL 2523 #define B4SOI_MOD_PKGISL 2524 #define B4SOI_MOD_LFGISL 2525 #define B4SOI_MOD_WFGISL 2526 #define B4SOI_MOD_PFGISL 2527 #define B4SOI_IGISL 3001 #define B4SOI_IBS 3002 #define B4SOI_IBD 3003 #define B4SOI_ISUB 3004 #define B4SOI_IGIDL 3005 #define B4SOI_IGS 3006 #define B4SOI_IGD 3007 #define B4SOI_IGB 3008 #define B4SOI_IGCS 3009 #define B4SOI_IGCD 3010 /* v3.2 */ #define B4SOI_MOD_TNOIA 951 #define B4SOI_MOD_TNOIB 952 #define B4SOI_MOD_RNOIA 953 #define B4SOI_MOD_RNOIB 954 #define B4SOI_MOD_NTNOI 955 #define B4SOI_MOD_FNOIMOD 956 #define B4SOI_MOD_TNOIMOD 957 #define B4SOI_MOD_NOFF 958 #define B4SOI_MOD_LNOFF 959 #define B4SOI_MOD_WNOFF 960 #define B4SOI_MOD_PNOFF 961 #define B4SOI_MOD_TOXM 962 #define B4SOI_MOD_VBS0PD 963 #define B4SOI_MOD_VBS0FD 964 /* v3.2 */ /* v4.0 added for stress */ #define B4SOI_MOD_SAREF 965 #define B4SOI_MOD_SBREF 966 #define B4SOI_MOD_KU0 967 #define B4SOI_MOD_KVSAT 968 #define B4SOI_MOD_TKU0 969 #define B4SOI_MOD_LLODKU0 970 #define B4SOI_MOD_WLODKU0 971 #define B4SOI_MOD_LLODVTH 972 #define B4SOI_MOD_WLODVTH 973 #define B4SOI_MOD_LKU0 974 #define B4SOI_MOD_WKU0 975 #define B4SOI_MOD_PKU0 976 #define B4SOI_MOD_KVTH0 977 #define B4SOI_MOD_LKVTH0 978 #define B4SOI_MOD_WKVTH0 979 #define B4SOI_MOD_PKVTH0 980 #define B4SOI_MOD_WLOD 981 #define B4SOI_MOD_STK2 982 #define B4SOI_MOD_LODK2 983 #define B4SOI_MOD_STETA0 984 #define B4SOI_MOD_LODETA0 985 /* v4.0 added for stress end */ #define B4SOI_MOD_GBMIN 986 /* v4.0 */ #define B4SOI_MOD_RBDB 987 /* v4.0 */ #define B4SOI_MOD_RBSB 988 /* v4.0 */ #define B4SOI_MOD_MJSWGD 989 /* v4.0 */ #define B4SOI_MOD_CJSWGD 990 /* v4.0 */ #define B4SOI_MOD_PBSWGD 991 /* v4.0 */ /*4.1*/ #define B4SOI_MOD_VFB 1201 /* v4.1 */ #define B4SOI_MOD_LVFB 1202 /* v4.1 */ #define B4SOI_MOD_WVFB 1203 /* v4.1 */ #define B4SOI_MOD_PVFB 1204 /* v4.1 */ #define B4SOI_MOD_FDMOD 1221 #define B4SOI_MOD_VSCE 1222 #define B4SOI_MOD_CDSBS 1223 #define B4SOI_MOD_VGSTCVMOD 1224 #define B4SOI_MOD_MINVCV 1225 #define B4SOI_MOD_LMINVCV 1226 #define B4SOI_MOD_WMINVCV 1227 #define B4SOI_MOD_PMINVCV 1228 #define B4SOI_MOD_VOFFCV 1229 #define B4SOI_MOD_LVOFFCV 1230 #define B4SOI_MOD_WVOFFCV 1231 #define B4SOI_MOD_PVOFFCV 1232 /* v3.0 */ #define B4SOI_MOD_SOIMOD 1001 #define B4SOI_MOD_VBSA 1002 #define B4SOI_MOD_NOFFFD 1003 #define B4SOI_MOD_VOFFFD 1004 #define B4SOI_MOD_K1B 1005 #define B4SOI_MOD_K2B 1006 #define B4SOI_MOD_DK2B 1007 #define B4SOI_MOD_DVBD0 1008 #define B4SOI_MOD_DVBD1 1009 #define B4SOI_MOD_MOINFD 1010 /* v3.0 */ #define B4SOI_MOD_AIGC 1021 #define B4SOI_MOD_BIGC 1022 #define B4SOI_MOD_CIGC 1023 #define B4SOI_MOD_AIGSD 1024 #define B4SOI_MOD_BIGSD 1025 #define B4SOI_MOD_CIGSD 1026 #define B4SOI_MOD_NIGC 1027 #define B4SOI_MOD_PIGCD 1028 #define B4SOI_MOD_POXEDGE 1029 #define B4SOI_MOD_DLCIG 1030 #define B4SOI_MOD_LAIGC 1031 #define B4SOI_MOD_LBIGC 1032 #define B4SOI_MOD_LCIGC 1033 #define B4SOI_MOD_LAIGSD 1034 #define B4SOI_MOD_LBIGSD 1035 #define B4SOI_MOD_LCIGSD 1036 #define B4SOI_MOD_LNIGC 1037 #define B4SOI_MOD_LPIGCD 1038 #define B4SOI_MOD_LPOXEDGE 1039 #define B4SOI_MOD_WAIGC 1041 #define B4SOI_MOD_WBIGC 1042 #define B4SOI_MOD_WCIGC 1043 #define B4SOI_MOD_WAIGSD 1044 #define B4SOI_MOD_WBIGSD 1045 #define B4SOI_MOD_WCIGSD 1046 #define B4SOI_MOD_WNIGC 1047 #define B4SOI_MOD_WPIGCD 1048 #define B4SOI_MOD_WPOXEDGE 1049 #define B4SOI_MOD_PAIGC 1051 #define B4SOI_MOD_PBIGC 1052 #define B4SOI_MOD_PCIGC 1053 #define B4SOI_MOD_PAIGSD 1054 #define B4SOI_MOD_PBIGSD 1055 #define B4SOI_MOD_PCIGSD 1056 #define B4SOI_MOD_PNIGC 1057 #define B4SOI_MOD_PPIGCD 1058 #define B4SOI_MOD_PPOXEDGE 1059 /* v3.1 */ #define B4SOI_MOD_LXJ 1061 #define B4SOI_MOD_LALPHAGB1 1062 #define B4SOI_MOD_LALPHAGB2 1063 #define B4SOI_MOD_LBETAGB1 1064 #define B4SOI_MOD_LBETAGB2 1065 #define B4SOI_MOD_LNDIF 1066 #define B4SOI_MOD_LNTRECF 1067 #define B4SOI_MOD_LNTRECR 1068 #define B4SOI_MOD_LXBJT 1069 #define B4SOI_MOD_LCGDL 1073 #define B4SOI_MOD_LCGSL 1074 #define B4SOI_MOD_LCKAPPA 1075 #define B4SOI_MOD_LUTE 1078 #define B4SOI_MOD_LKT1 1079 #define B4SOI_MOD_LKT2 1080 #define B4SOI_MOD_LKT1L 1081 #define B4SOI_MOD_LUA1 1082 #define B4SOI_MOD_LUB1 1083 #define B4SOI_MOD_LUC1 1084 #define B4SOI_MOD_LAT 1085 #define B4SOI_MOD_LPRT 1086 #define B4SOI_MOD_WXJ 1091 #define B4SOI_MOD_WALPHAGB1 1092 #define B4SOI_MOD_WALPHAGB2 1093 #define B4SOI_MOD_WBETAGB1 1094 #define B4SOI_MOD_WBETAGB2 1095 #define B4SOI_MOD_WNDIF 1096 #define B4SOI_MOD_WNTRECF 1097 #define B4SOI_MOD_WNTRECR 1098 #define B4SOI_MOD_WXBJT 1099 #define B4SOI_MOD_WCGDL 2003 #define B4SOI_MOD_WCGSL 2004 #define B4SOI_MOD_WCKAPPA 2005 #define B4SOI_MOD_WUTE 2008 #define B4SOI_MOD_WKT1 2009 #define B4SOI_MOD_WKT2 2010 #define B4SOI_MOD_WKT1L 2011 #define B4SOI_MOD_WUA1 2012 #define B4SOI_MOD_WUB1 2013 #define B4SOI_MOD_WUC1 2014 #define B4SOI_MOD_WAT 2015 #define B4SOI_MOD_WPRT 2016 #define B4SOI_MOD_PXJ 2021 #define B4SOI_MOD_PALPHAGB1 2022 #define B4SOI_MOD_PALPHAGB2 2023 #define B4SOI_MOD_PBETAGB1 2024 #define B4SOI_MOD_PBETAGB2 2025 #define B4SOI_MOD_PNDIF 2026 #define B4SOI_MOD_PNTRECF 2027 #define B4SOI_MOD_PNTRECR 2028 #define B4SOI_MOD_PXBJT 2029 #define B4SOI_MOD_PCGDL 2033 #define B4SOI_MOD_PCGSL 2034 #define B4SOI_MOD_PCKAPPA 2035 #define B4SOI_MOD_PUTE 2038 #define B4SOI_MOD_PKT1 2039 #define B4SOI_MOD_PKT2 2040 #define B4SOI_MOD_PKT1L 2041 #define B4SOI_MOD_PUA1 2042 #define B4SOI_MOD_PUB1 2043 #define B4SOI_MOD_PUC1 2044 #define B4SOI_MOD_PAT 2045 #define B4SOI_MOD_PPRT 2046 /* 4.0 backward compatibility */ #define B4SOI_MOD_NGIDL 2100 #define B4SOI_MOD_LNGIDL 2101 #define B4SOI_MOD_WNGIDL 2102 #define B4SOI_MOD_PNGIDL 2103 #define B4SOI_MOD_NLX 2104 #define B4SOI_MOD_LNLX 2105 #define B4SOI_MOD_WNLX 2106 #define B4SOI_MOD_PNLX 2107 #define B4SOI_MOD_VGS_MAX 2201 #define B4SOI_MOD_VGD_MAX 2202 #define B4SOI_MOD_VGB_MAX 2203 #define B4SOI_MOD_VDS_MAX 2204 #define B4SOI_MOD_VBS_MAX 2205 #define B4SOI_MOD_VBD_MAX 2206 #include "b4soiext.h" extern void B4SOIevaluate(double,double,double,B4SOIinstance*,B4SOImodel*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int B4SOIdebug(B4SOImodel*, B4SOIinstance*, CKTcircuit*, int); extern int B4SOIcheckModel(B4SOImodel*, B4SOIinstance*, CKTcircuit*); #endif /*B4SOI*/ ngspice-26/src/spicelib/devices/bsimsoi/b4soicheck.c0000644000265600020320000012510112264261473022063 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soicheck.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. * File: b4soicheck.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 12/16/2010 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B4SOIcheckModel( B4SOImodel *model, B4SOIinstance *here, CKTcircuit *ckt) { struct b4soiSizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b4soiv1check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "B4SOIV3 Parameter Check\n"); fprintf(fplog, "Model = %s\n", model->B4SOImodName); fprintf(fplog, "W = %g, L = %g\n", here->B4SOIw, here->B4SOIl); if (pParam->B4SOIlpe0 < -pParam->B4SOIleff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", pParam->B4SOIlpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", pParam->B4SOIlpe0); Fatal_Flag = 1; } if((here->B4SOIsa > 0.0) && (here->B4SOIsb > 0.0) && ((here->B4SOInf == 1.0) || ((here->B4SOInf > 1.0) && (here->B4SOIsd > 0.0))) ) { if (model->B4SOIsaref <= 0.0) { fprintf(fplog, "Fatal: SAref = %g is not positive.\n", model->B4SOIsaref); printf("Fatal: SAref = %g is not positive.\n", model->B4SOIsaref); Fatal_Flag = 1; } if (model->B4SOIsbref <= 0.0) { fprintf(fplog, "Fatal: SBref = %g is not positive.\n", model->B4SOIsbref); printf("Fatal: SBref = %g is not positive.\n", model->B4SOIsbref); Fatal_Flag = 1; } } if (pParam->B4SOIlpeb < -pParam->B4SOIleff) /* v4.0 for Vth */ { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", pParam->B4SOIlpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", pParam->B4SOIlpeb); Fatal_Flag = 1; } if (pParam->B4SOIfprout < 0.0) /* v4.0 for DITS */ { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->B4SOIfprout); printf("Fatal: fprout = %g is negative.\n", pParam->B4SOIfprout); Fatal_Flag = 1; } if (pParam->B4SOIpdits < 0.0) /* v4.0 for DITS */ { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->B4SOIpdits); printf("Fatal: pdits = %g is negative.\n", pParam->B4SOIpdits); Fatal_Flag = 1; } if (model->B4SOIpditsl < 0.0) /* v4.0 for DITS */ { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->B4SOIpditsl); printf("Fatal: pditsl = %g is negative.\n", model->B4SOIpditsl); Fatal_Flag = 1; } if (model->B4SOItox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->B4SOItox); printf("Fatal: Tox = %g is not positive.\n", model->B4SOItox); Fatal_Flag = 1; } if (model->B4SOIleffeot <= 0.0) { fprintf(fplog, "Fatal: leffeot = %g is not positive.\n", model->B4SOIleffeot); printf("Fatal: Leffeot = %g is not positive.\n", model->B4SOIleffeot); Fatal_Flag = 1; } if (model->B4SOIweffeot <= 0.0) { fprintf(fplog, "Fatal: weffeot = %g is not positive.\n", model->B4SOIweffeot); printf("Fatal: Weffeot = %g is not positive.\n", model->B4SOIweffeot); Fatal_Flag = 1; } if (model->B4SOItoxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", model->B4SOItoxp); printf("Fatal: Toxp = %g is not positive.\n", model->B4SOItoxp); Fatal_Flag = 1; } if (model->B4SOIepsrgate < 0.0) { fprintf(fplog, "Fatal: Epsrgate = %g is not positive.\n", model->B4SOIepsrgate); printf("Fatal: Epsrgate = %g is not positive.\n", model->B4SOIepsrgate); Fatal_Flag = 1; } if (model->B4SOItoxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->B4SOItoxm); printf("Fatal: Toxm = %g is not positive.\n", model->B4SOItoxm); Fatal_Flag = 1; } /* v3.2 */ if (here->B4SOInf < 1.0) { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->B4SOInf); printf("Fatal: Number of finger = %g is smaller than one.\n", here->B4SOInf); Fatal_Flag = 1; } /* v2.2.3 */ if (model->B4SOItox - model->B4SOIdtoxcv <= 0.0) { fprintf(fplog, "Fatal: Tox - dtoxcv = %g is not positive.\n", model->B4SOItox - model->B4SOIdtoxcv); printf("Fatal: Tox - dtoxcv = %g is not positive.\n", model->B4SOItox - model->B4SOIdtoxcv); Fatal_Flag = 1; } if (model->B4SOItbox <= 0.0) { fprintf(fplog, "Fatal: Tbox = %g is not positive.\n", model->B4SOItbox); printf("Fatal: Tbox = %g is not positive.\n", model->B4SOItbox); Fatal_Flag = 1; } if (pParam->B4SOInpeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->B4SOInpeak); printf("Fatal: Nch = %g is not positive.\n", pParam->B4SOInpeak); Fatal_Flag = 1; } if (pParam->B4SOIngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->B4SOIngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->B4SOIngate); Fatal_Flag = 1; } if (pParam->B4SOIngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->B4SOIngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->B4SOIngate); Fatal_Flag = 1; } if (pParam->B4SOIdvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->B4SOIdvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->B4SOIdvt1); Fatal_Flag = 1; } if (pParam->B4SOIdvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->B4SOIdvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->B4SOIdvt1w); Fatal_Flag = 1; } if (pParam->B4SOIw0 == -pParam->B4SOIweff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B4SOIdsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->B4SOIdsub); printf("Fatal: Dsub = %g is negative.\n", pParam->B4SOIdsub); Fatal_Flag = 1; } if (pParam->B4SOIb1 == -pParam->B4SOIweff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B4SOIu0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->B4SOIu0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->B4SOIu0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->B4SOIdelta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->B4SOIdelta); printf("Fatal: Delta = %g is less than zero.\n", pParam->B4SOIdelta); Fatal_Flag = 1; } if (pParam->B4SOIvsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B4SOIvsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B4SOIvsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->B4SOIpclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->B4SOIpclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->B4SOIpclm); Fatal_Flag = 1; } if (pParam->B4SOIdrout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->B4SOIdrout); printf("Fatal: Drout = %g is negative.\n", pParam->B4SOIdrout); Fatal_Flag = 1; } if ( model->B4SOIunitLengthGateSidewallJctCapD > 0.0) /* v4.0 */ { if (here->B4SOIdrainPerimeter < pParam->B4SOIweff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->B4SOIdrainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->B4SOIdrainPerimeter); here->B4SOIdrainPerimeter =pParam->B4SOIweff; } } if ( model->B4SOIunitLengthGateSidewallJctCapS > 0.0) /* v4.0 */ { if (here->B4SOIsourcePerimeter < pParam->B4SOIweff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->B4SOIsourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->B4SOIsourcePerimeter); here->B4SOIsourcePerimeter =pParam->B4SOIweff; } } /* Check capacitance parameters */ if (pParam->B4SOIclc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->B4SOIclc); printf("Fatal: Clc = %g is negative.\n", pParam->B4SOIclc); Fatal_Flag = 1; } /* v3.2 */ if (pParam->B4SOInoff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->B4SOInoff); printf("Warning: Noff = %g is too small.\n", pParam->B4SOInoff); } if (pParam->B4SOInoff > 4.0) { fprintf(fplog, "Warning: Noff = %g is too large.\n", pParam->B4SOInoff); printf("Warning: Noff = %g is too large.\n", pParam->B4SOInoff); } /* added for stress */ /* Check stress effect parameters */ if( (here->B4SOIsa > 0.0) && (here->B4SOIsb > 0.0) && ((here->B4SOInf == 1.0) || ((here->B4SOInf > 1.0) && (here->B4SOIsd > 0.0))) ) { if (model->B4SOIlodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->B4SOIlodk2); printf("Warning: LODK2 = %g is not positive.\n",model->B4SOIlodk2); } if (model->B4SOIlodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->B4SOIlodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->B4SOIlodeta0); } } /* added for stress end */ /* v2.2.3 */ if (pParam->B4SOImoin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->B4SOImoin); printf("Warning: Moin = %g is too small.\n", pParam->B4SOImoin); } if (pParam->B4SOImoin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->B4SOImoin); printf("Warning: Moin = %g is too large.\n", pParam->B4SOImoin); } /* v3.0 */ if (model->B4SOImoinFD < 5.0) { fprintf(fplog, "Warning: MoinFD = %g is too small.\n", model->B4SOImoinFD); printf("Warning: MoinFD = %g is too small.\n", model->B4SOImoinFD); } if (model->B4SOIcapMod == 3) { if (pParam->B4SOIacde < 0.1) /* v3.1.1 */ { fprintf (fplog, "Warning: Acde = %g is too small.\n", pParam->B4SOIacde); printf ("Warning: Acde = %g is too small.\n", pParam->B4SOIacde); } if (pParam->B4SOIacde > 1.6) { fprintf (fplog, "Warning: Acde = %g is too large.\n", pParam->B4SOIacde); printf ("Warning: Acde = %g is too large.\n", pParam->B4SOIacde); } } /* v4.2 always perform Fatal checks */ if (pParam->B4SOInigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->B4SOInigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->B4SOInigc); Fatal_Flag = 1; } if (pParam->B4SOIpoxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->B4SOIpoxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->B4SOIpoxedge); Fatal_Flag = 1; } if (pParam->B4SOIpigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->B4SOIpigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->B4SOIpigcd); Fatal_Flag = 1; } if (model->B4SOItoxref < 0.0) { fprintf(fplog, "Warning: TOXREF = %g is negative.\n", model->B4SOItoxref); printf("Warning: Toxref = %g is negative.\n", model->B4SOItoxref); Fatal_Flag = 1; } if (model->B4SOItoxqm <= 0.0) { fprintf(fplog, "Fatal: Toxqm = %g is not positive.\n", model->B4SOItoxqm); printf("Fatal: Toxqm = %g is not positive.\n", model->B4SOItoxqm); Fatal_Flag = 1; } if (model->B4SOIdeltavox <= 0.0) { fprintf(fplog, "Fatal: Deltavox = %g is not positive.\n", model->B4SOIdeltavox); printf("Fatal: Deltavox = %g is not positive.\n", model->B4SOIdeltavox); } /* v4.4 Tanvir */ if (pParam->B4SOIrdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B4SOIrdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B4SOIrdsw); pParam->B4SOIrdsw = 0.0; pParam->B4SOIrds0 = 0.0; } else if (pParam->B4SOIrds0 < 0.001) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B4SOIrds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B4SOIrds0); pParam->B4SOIrds0 = 0.0; } /* v4.4 */ if ((model->B4SOIcfrcoeff < 1.0)||(model->B4SOIcfrcoeff > 2.0)) { fprintf(fplog, "Warning: CfrCoeff = %g is out of range.\n", model->B4SOIcfrcoeff); printf("Warning: CfrCoeff = %g is outside valid range [1,2], set to 1.\n", model->B4SOIcfrcoeff); model->B4SOIcfrcoeff = 1; } /* v4.4 */ if (model->B4SOIparamChk ==1) { /* Check L and W parameters */ if (pParam->B4SOIleff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->B4SOIleff); printf("Warning: Leff = %g may be too small.\n", pParam->B4SOIleff); } if (pParam->B4SOIleffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->B4SOIleffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->B4SOIleffCV); } if (pParam->B4SOIweff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->B4SOIweff); printf("Warning: Weff = %g may be too small.\n", pParam->B4SOIweff); } if (pParam->B4SOIweffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->B4SOIweffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->B4SOIweffCV); } /* Check threshold voltage parameters */ if (pParam->B4SOIlpe0 < 0.0) { fprintf(fplog, "Warning: Lpe0 = %g is negative.\n", pParam->B4SOIlpe0); printf("Warning: Lpe0 = %g is negative.\n", pParam->B4SOIlpe0); } if (model->B4SOItox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->B4SOItox); printf("Warning: Tox = %g is less than 10A.\n", model->B4SOItox); } if (pParam->B4SOInpeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->B4SOInpeak); printf("Warning: Nch = %g may be too small.\n", pParam->B4SOInpeak); } else if (pParam->B4SOInpeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->B4SOInpeak); printf("Warning: Nch = %g may be too large.\n", pParam->B4SOInpeak); } if (fabs(pParam->B4SOInsub) >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->B4SOInsub); printf("Warning: Nsub = %g may be too large.\n", pParam->B4SOInsub); } if ((pParam->B4SOIngate > 0.0) && (pParam->B4SOIngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B4SOIngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B4SOIngate); } if (pParam->B4SOIdvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->B4SOIdvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->B4SOIdvt0); } if (fabs(1.0e-6 / (pParam->B4SOIw0 + pParam->B4SOIweff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check Nsd, Ngate and Npeak parameters*/ /* Bug Fix # 22 Jul09*/ if (model->B4SOInsd > 1.0e23) { fprintf(fplog, "Warning: Nsd = %g is too large, should be specified in cm^-3.\n", model->B4SOInsd); printf("Warning: Nsd = %g is too large, should be specified in cm^-3.\n", model->B4SOInsd); } if (model->B4SOIngate > 1.0e23) { fprintf(fplog, "Warning: Ngate = %g is too large, should be specified in cm^-3.\n", model->B4SOIngate); printf("Warning: Ngate = %g is too large, should be specified in cm^-3.\n", model->B4SOIngate); } if (model->B4SOInpeak > 1.0e20) { fprintf(fplog, "Warning: Npeak = %g is too large, should be less than 1.0e20, specified in cm^-3.\n", model->B4SOInpeak); printf("Warning: Npeak = %g is too large, should be less than 1.0e20, specified in cm^-3.\n", model->B4SOInpeak); } /* Check subthreshold parameters */ if (pParam->B4SOInfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->B4SOInfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->B4SOInfactor); } if (pParam->B4SOIcdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->B4SOIcdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->B4SOIcdsc); } if (pParam->B4SOIcdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->B4SOIcdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->B4SOIcdscd); } /* Check DIBL parameters */ if (pParam->B4SOIeta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->B4SOIeta0); printf("Warning: Eta0 = %g is negative.\n", pParam->B4SOIeta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->B4SOIb1 + pParam->B4SOIweff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->B4SOIa2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B4SOIa2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B4SOIa2); pParam->B4SOIa2 = 0.01; } else if (pParam->B4SOIa2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B4SOIa2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B4SOIa2); pParam->B4SOIa2 = 1.0; pParam->B4SOIa1 = 0.0; } /* if (pParam->B4SOIrdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B4SOIrdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B4SOIrdsw); pParam->B4SOIrdsw = 0.0; pParam->B4SOIrds0 = 0.0; } else if (pParam->B4SOIrds0 < 0.001) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B4SOIrds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B4SOIrds0); pParam->B4SOIrds0 = 0.0; } v4.4 */ if (pParam->B4SOIvsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->B4SOIvsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->B4SOIvsattemp); } if (pParam->B4SOIpdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->B4SOIpdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->B4SOIpdibl1); } if (pParam->B4SOIpdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->B4SOIpdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->B4SOIpdibl2); } /* Check overlap capacitance parameters */ if (model->B4SOIcgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->B4SOIcgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->B4SOIcgdo); model->B4SOIcgdo = 0.0; } if (model->B4SOIcgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->B4SOIcgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->B4SOIcgso); model->B4SOIcgso = 0.0; } if (model->B4SOIcgeo < 0.0) { fprintf(fplog, "Warning: cgeo = %g is negative. Set to zero.\n", model->B4SOIcgeo); printf("Warning: cgeo = %g is negative. Set to zero.\n", model->B4SOIcgeo); model->B4SOIcgeo = 0.0; } if (model->B4SOIntun < 0.0) { fprintf(fplog, "Warning: Ntuns = %g is negative.\n", model->B4SOIntun); printf("Warning: Ntuns = %g is negative.\n", model->B4SOIntun); } if (model->B4SOIntund < 0.0) { fprintf(fplog, "Warning: Ntund = %g is negative.\n", model->B4SOIntund); printf("Warning: Ntund = %g is negative.\n", model->B4SOIntund); } if (model->B4SOIndiode < 0.0) { fprintf(fplog, "Warning: Ndiode = %g is negative.\n", model->B4SOIndiode); printf("Warning: Ndiode = %g is negative.\n", model->B4SOIndiode); } if (model->B4SOIndioded < 0.0) { fprintf(fplog, "Warning: Ndioded = %g is negative.\n", model->B4SOIndioded); printf("Warning: Ndioded = %g is negative.\n", model->B4SOIndioded); } if (model->B4SOIisbjt < 0.0) { fprintf(fplog, "Warning: Isbjt = %g is negative.\n", model->B4SOIisbjt); printf("Warning: Isbjt = %g is negative.\n", model->B4SOIisbjt); } if (model->B4SOIidbjt < 0.0) { fprintf(fplog, "Warning: Idbjt = %g is negative.\n", model->B4SOIidbjt); printf("Warning: Idbjt = %g is negative.\n", model->B4SOIidbjt); } if (model->B4SOIisdif < 0.0) { fprintf(fplog, "Warning: Isdif = %g is negative.\n", model->B4SOIisdif); printf("Warning: Isdif = %g is negative.\n", model->B4SOIisdif); } if (model->B4SOIiddif < 0.0) { fprintf(fplog, "Warning: Iddif = %g is negative.\n", model->B4SOIiddif); printf("Warning: Iddif = %g is negative.\n", model->B4SOIiddif); } if (model->B4SOIisrec < 0.0) { fprintf(fplog, "Warning: Isrec = %g is negative.\n", model->B4SOIisrec); printf("Warning: Isrec = %g is negative.\n", model->B4SOIisrec); } if (model->B4SOIidrec < 0.0) { fprintf(fplog, "Warning: Idrec = %g is negative.\n", model->B4SOIidrec); printf("Warning: Idrec = %g is negative.\n", model->B4SOIidrec); } if (model->B4SOIistun < 0.0) { fprintf(fplog, "Warning: Istun = %g is negative.\n", model->B4SOIistun); printf("Warning: Istun = %g is negative.\n", model->B4SOIistun); } if (model->B4SOIidtun < 0.0) { fprintf(fplog, "Warning: Idtun = %g is negative.\n", model->B4SOIidtun); printf("Warning: Idtun = %g is negative.\n", model->B4SOIidtun); } if (model->B4SOItt < 0.0) { fprintf(fplog, "Warning: Tt = %g is negative.\n", model->B4SOItt); printf("Warning: Tt = %g is negative.\n", model->B4SOItt); } if (model->B4SOIcsdmin < 0.0) { fprintf(fplog, "Warning: Csdmin = %g is negative.\n", model->B4SOIcsdmin); printf("Warning: Csdmin = %g is negative.\n", model->B4SOIcsdmin); } if (model->B4SOIcsdesw < 0.0) { fprintf(fplog, "Warning: Csdesw = %g is negative.\n", model->B4SOIcsdesw); printf("Warning: Csdesw = %g is negative.\n", model->B4SOIcsdesw); } if (model->B4SOIasd < 0.0) { fprintf(fplog, "Warning: Asd = %g should be within (0, 1).\n", model->B4SOIasd); printf("Warning: Asd = %g should be within (0, 1).\n", model->B4SOIasd); } if (model->B4SOIrth0 < 0.0) { fprintf(fplog, "Warning: Rth0 = %g is negative.\n", model->B4SOIrth0); printf("Warning: Rth0 = %g is negative.\n", model->B4SOIrth0); } if (model->B4SOIcth0 < 0.0) { fprintf(fplog, "Warning: Cth0 = %g is negative.\n", model->B4SOIcth0); printf("Warning: Cth0 = %g is negative.\n", model->B4SOIcth0); } if (model->B4SOIrbody < 0.0) { fprintf(fplog, "Warning: Rbody = %g is negative.\n", model->B4SOIrbody); printf("Warning: Rbody = %g is negative.\n", model->B4SOIrbody); } if (model->B4SOIrbsh < 0.0) { fprintf(fplog, "Warning: Rbsh = %g is negative.\n", model->B4SOIrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B4SOIrbsh); } /* v2.2 release */ if (model->B4SOIwth0 < 0.0) { fprintf(fplog, "Warning: WTH0 = %g is negative.\n", model->B4SOIwth0); printf("Warning: Wth0 = %g is negative.\n", model->B4SOIwth0); } if (model->B4SOIrhalo < 0.0) { fprintf(fplog, "Warning: RHALO = %g is negative.\n", model->B4SOIrhalo); printf("Warning: Rhalo = %g is negative.\n", model->B4SOIrhalo); } if (model->B4SOIntox < 0.0) { fprintf(fplog, "Warning: NTOX = %g is negative.\n", model->B4SOIntox); printf("Warning: Ntox = %g is negative.\n", model->B4SOIntox); } if (model->B4SOIebg < 0.0) { fprintf(fplog, "Warning: EBG = %g is negative.\n", model->B4SOIebg); printf("Warning: Ebg = %g is negative.\n", model->B4SOIebg); } if (model->B4SOIvevb < 0.0) { fprintf(fplog, "Warning: VEVB = %g is negative.\n", model->B4SOIvevb); printf("Warning: Vevb = %g is negative.\n", model->B4SOIvevb); } if (pParam->B4SOIalphaGB1 < 0.0) { fprintf(fplog, "Warning: ALPHAGB1 = %g is negative.\n", pParam->B4SOIalphaGB1); printf("Warning: AlphaGB1 = %g is negative.\n", pParam->B4SOIalphaGB1); } if (pParam->B4SOIbetaGB1 < 0.0) { fprintf(fplog, "Warning: BETAGB1 = %g is negative.\n", pParam->B4SOIbetaGB1); printf("Warning: BetaGB1 = %g is negative.\n", pParam->B4SOIbetaGB1); } if (model->B4SOIvgb1 < 0.0) { fprintf(fplog, "Warning: VGB1 = %g is negative.\n", model->B4SOIvgb1); printf("Warning: Vgb1 = %g is negative.\n", model->B4SOIvgb1); } if (model->B4SOIvecb < 0.0) { fprintf(fplog, "Warning: VECB = %g is negative.\n", model->B4SOIvecb); printf("Warning: Vecb = %g is negative.\n", model->B4SOIvecb); } if (pParam->B4SOIalphaGB2 < 0.0) { fprintf(fplog, "Warning: ALPHAGB2 = %g is negative.\n", pParam->B4SOIalphaGB2); printf("Warning: AlphaGB2 = %g is negative.\n", pParam->B4SOIalphaGB2); } if (pParam->B4SOIbetaGB2 < 0.0) { fprintf(fplog, "Warning: BETAGB2 = %g is negative.\n", pParam->B4SOIbetaGB2); printf("Warning: BetaGB2 = %g is negative.\n", pParam->B4SOIbetaGB2); } if (model->B4SOIvgb2 < 0.0) { fprintf(fplog, "Warning: VGB2 = %g is negative.\n", model->B4SOIvgb2); printf("Warning: Vgb2 = %g is negative.\n", model->B4SOIvgb2); } if (model->B4SOIvoxh < 0.0) { fprintf(fplog, "Warning: Voxh = %g is negative.\n", model->B4SOIvoxh); printf("Warning: Voxh = %g is negative.\n", model->B4SOIvoxh); } /* v2.0 release */ if (model->B4SOIk1w1 < 0.0) { fprintf(fplog, "Warning: K1W1 = %g is negative.\n", model->B4SOIk1w1); printf("Warning: K1w1 = %g is negative.\n", model->B4SOIk1w1); } if (model->B4SOIk1w2 < 0.0) { fprintf(fplog, "Warning: K1W2 = %g is negative.\n", model->B4SOIk1w2); printf("Warning: K1w2 = %g is negative.\n", model->B4SOIk1w2); } if (model->B4SOIketas < 0.0) { fprintf(fplog, "Warning: KETAS = %g is negative.\n", model->B4SOIketas); printf("Warning: Ketas = %g is negative.\n", model->B4SOIketas); } if (model->B4SOIdwbc < 0.0) { fprintf(fplog, "Warning: DWBC = %g is negative.\n", model->B4SOIdwbc); printf("Warning: Dwbc = %g is negative.\n", model->B4SOIdwbc); } if (model->B4SOIbeta0 < 0.0) { fprintf(fplog, "Warning: BETA0 = %g is negative.\n", model->B4SOIbeta0); printf("Warning: Beta0 = %g is negative.\n", model->B4SOIbeta0); } if (model->B4SOIbeta1 < 0.0) { fprintf(fplog, "Warning: BETA1 = %g is negative.\n", model->B4SOIbeta1); printf("Warning: Beta1 = %g is negative.\n", model->B4SOIbeta1); } if (model->B4SOIbeta2 < 0.0) { fprintf(fplog, "Warning: BETA2 = %g is negative.\n", model->B4SOIbeta2); printf("Warning: Beta2 = %g is negative.\n", model->B4SOIbeta2); } if (model->B4SOItii < 0.0) { fprintf(fplog, "Warning: TII = %g is negative.\n", model->B4SOItii); printf("Warning: Tii = %g is negative.\n", model->B4SOItii); } if (model->B4SOIlii < 0.0) { fprintf(fplog, "Warning: LII = %g is negative.\n", model->B4SOIlii); printf("Warning: Lii = %g is negative.\n", model->B4SOIlii); } if (model->B4SOIsii1 < 0.0) { fprintf(fplog, "Warning: SII1 = %g is negative.\n", model->B4SOIsii1); printf("Warning: Sii1 = %g is negative.\n", model->B4SOIsii1); } if (model->B4SOIsii2 < 0.0) { fprintf(fplog, "Warning: SII2 = %g is negative.\n", model->B4SOIsii2); printf("Warning: Sii2 = %g is negative.\n", model->B4SOIsii1); } if (model->B4SOIsiid < 0.0) { fprintf(fplog, "Warning: SIID = %g is negative.\n", model->B4SOIsiid); printf("Warning: Siid = %g is negative.\n", model->B4SOIsiid); } if (model->B4SOIfbjtii < 0.0) { fprintf(fplog, "Warning: FBJTII = %g is negative.\n", model->B4SOIfbjtii); printf("Warning: fbjtii = %g is negative.\n", model->B4SOIfbjtii); } if (model->B4SOIvrec0 < 0.0) /* v4.0 */ { fprintf(fplog, "Warning: VREC0S = %g is negative.\n", model->B4SOIvrec0); printf("Warning: Vrec0s = %g is negative.\n", model->B4SOIvrec0); } if (model->B4SOIvrec0d < 0.0) /* v4.0 */ { fprintf(fplog, "Warning: VREC0D = %g is negative.\n", model->B4SOIvrec0d); printf("Warning: Vrec0d = %g is negative.\n", model->B4SOIvrec0d); } if (model->B4SOIvtun0 < 0.0) /* v4.0 */ { fprintf(fplog, "Warning: VTUN0S = %g is negative.\n", model->B4SOIvtun0); printf("Warning: Vtun0s = %g is negative.\n", model->B4SOIvtun0); } if (model->B4SOIvtun0d < 0.0) /* v4.0 */ { fprintf(fplog, "Warning: VTUN0D = %g is negative.\n", model->B4SOIvtun0d); printf("Warning: Vtun0d = %g is negative.\n", model->B4SOIvtun0d); } if (model->B4SOInbjt < 0.0) { fprintf(fplog, "Warning: NBJT = %g is negative.\n", model->B4SOInbjt); printf("Warning: Nbjt = %g is negative.\n", model->B4SOInbjt); } if (model->B4SOIaely < 0.0) { fprintf(fplog, "Warning: AELY = %g is negative.\n", model->B4SOIaely); printf("Warning: Aely = %g is negative.\n", model->B4SOIaely); } if (model->B4SOIahli < 0.0) { fprintf(fplog, "Warning: AHLIS = %g is negative.\n", model->B4SOIahli); printf("Warning: Ahlis = %g is negative.\n", model->B4SOIahli); } if (model->B4SOIahlid < 0.0) { fprintf(fplog, "Warning: AHLID = %g is negative.\n", model->B4SOIahlid); printf("Warning: Ahlid = %g is negative.\n", model->B4SOIahlid); } if (model->B4SOIrbody < 0.0) { fprintf(fplog, "Warning: RBODY = %g is negative.\n", model->B4SOIrbody); printf("Warning: Rbody = %g is negative.\n", model->B4SOIrbody); } if (model->B4SOIrbsh < 0.0) { fprintf(fplog, "Warning: RBSH = %g is negative.\n", model->B4SOIrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B4SOIrbsh); } /* if (pParam->B4SOIntrecf < 0.0) { fprintf(fplog, "Warning: NTRECF = %g is negative.\n", pParam->B4SOIntrecf); printf("Warning: Ntrecf = %g is negative.\n", pParam->B4SOIntrecf); } if (pParam->B4SOIntrecr < 0.0) { fprintf(fplog, "Warning: NTRECR = %g is negative.\n", pParam->B4SOIntrecr); printf("Warning: Ntrecr = %g is negative.\n", pParam->B4SOIntrecr); } v4.2 bugfix: QA Test uses negative temp co-efficients*/ /* v3.0 bug fix */ /* if (model->B4SOIndif < 0.0) { fprintf(fplog, "Warning: NDIF = %g is negative.\n", model->B4SOIndif); printf("Warning: Ndif = %g is negative.\n", model->B4SOIndif); } */ /* if (model->B4SOItcjswg < 0.0) { fprintf(fplog, "Warning: TCJSWGS = %g is negative.\n", model->B4SOItcjswg); printf("Warning: Tcjswg = %g is negative.\n", model->B4SOItcjswg); } if (model->B4SOItpbswg < 0.0) { fprintf(fplog, "Warning: TPBSWGS = %g is negative.\n", model->B4SOItpbswg); printf("Warning: Tpbswg = %g is negative.\n", model->B4SOItpbswg); } if (model->B4SOItcjswgd < 0.0) { fprintf(fplog, "Warning: TCJSWGD = %g is negative.\n", model->B4SOItcjswgd); printf("Warning: Tcjswgd = %g is negative.\n", model->B4SOItcjswgd); } if (model->B4SOItpbswgd < 0.0) { fprintf(fplog, "Warning: TPBSWGD = %g is negative.\n", model->B4SOItpbswgd); printf("Warning: Tpbswgd = %g is negative.\n", model->B4SOItpbswgd); } v4.2 bugfix: QA Test uses negative temp co-efficients*/ if ((model->B4SOIacde < 0.1) || (model->B4SOIacde > 1.6)) { fprintf(fplog, "Warning: ACDE = %g is out of range.\n", model->B4SOIacde); printf("Warning: Acde = %g is out of range.\n", model->B4SOIacde); } if ((model->B4SOImoin < 5.0)||(model->B4SOImoin > 25.0)) { fprintf(fplog, "Warning: MOIN = %g is out of range.\n", model->B4SOImoin); printf("Warning: Moin = %g is out of range.\n", model->B4SOImoin); } if (model->B4SOIdlbg < 0.0) { fprintf(fplog, "Warning: DLBG = %g is negative.\n", model->B4SOIdlbg); printf("Warning: dlbg = %g is negative.\n", model->B4SOIdlbg); } if (model->B4SOIagidl < 0.0) { fprintf(fplog, "Warning: AGIDL = %g is negative.\n", model->B4SOIagidl); printf("Warning: Agidl = %g is negative.\n", model->B4SOIagidl); } if (model->B4SOIbgidl < 0.0) { fprintf(fplog, "Warning: BGIDL = %g is negative.\n", model->B4SOIbgidl); printf("Warning: Bgidl = %g is negative.\n", model->B4SOIbgidl); } if (fabs(model->B4SOIcgidl) < 1e-9) { fprintf(fplog, "Warning: CGIDL = %g is smaller than 1e-9.\n", model->B4SOIcgidl); printf("Warning: Cgidl = %g is smaller than 1e-9.\n", model->B4SOIcgidl); } if (model->B4SOIegidl < 0.0) { fprintf(fplog, "Warning: EGIDL = %g is negative.\n", model->B4SOIegidl); printf("Warning: Egidl = %g is negative.\n", model->B4SOIegidl); } if (model->B4SOIagisl < 0.0) { fprintf(fplog, "Warning: AGISL = %g is negative.\n", model->B4SOIagisl); printf("Warning: Agidl = %g is negative.\n", model->B4SOIagidl); } if (model->B4SOIbgisl < 0.0) { fprintf(fplog, "Warning: BGISL = %g is negative.\n", model->B4SOIbgisl); printf("Warning: Bgisl = %g is negative.\n", model->B4SOIbgisl); } if (fabs(model->B4SOIcgisl) < 1e-9) { fprintf(fplog, "Warning: CGISL = %g is smaller than 1e-9.\n", model->B4SOIcgisl); printf("Warning: Cgisl = %g is smaller than 1e-9.\n", model->B4SOIcgisl); } if (model->B4SOIegisl < 0.0) { fprintf(fplog, "Warning: EGISL = %g is negative.\n", model->B4SOIegisl); printf("Warning: Egisl = %g is negative.\n", model->B4SOIegisl); } if (model->B4SOIesatii < 0.0) { fprintf(fplog, "Warning: Esatii = %g should be within positive.\n", model->B4SOIesatii); printf("Warning: Esatii = %g should be within (0, 1).\n", model->B4SOIesatii); } if (!model->B4SOIvgstcvModGiven) { fprintf(fplog, "Warning: The default vgstcvMod is changed in v4.2 from '0' to '1'.\n"); printf("Warning: The default vgstcvMod is changed in v4.2 from '0' to '1'.\n"); } if (pParam->B4SOIxj > model->B4SOItsi) { fprintf(fplog, "Warning: Xj = %g is thicker than Tsi = %g.\n", pParam->B4SOIxj, model->B4SOItsi); printf("Warning: Xj = %g is thicker than Tsi = %g.\n", pParam->B4SOIxj, model->B4SOItsi); } if (model->B4SOIcapMod < 2) { fprintf(fplog, "Warning: capMod < 2 is not supported by BSIM3SOI.\n"); printf("Warning: Warning: capMod < 2 is not supported by BSIM3SOI.\n"); } if (model->B4SOIcapMod > 3) { fprintf(fplog, "Warning: capMod > 3 is not supported by BSIMSOI4.2.\n"); printf("Warning: Warning: capMod > 3 is not supported by BSIMSOI4.2.\n"); } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsimsoi/b4soicvtest.c0000644000265600020320000000721312264261473022321 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soicvtest.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soicvtest.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOIconvTest( GENmodel *inModel, CKTcircuit *ckt) { register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the B4SOI device models */ for (; model != NULL; model = model->B4SOInextModel) { /* loop through all the instances of the model */ for (here = model->B4SOIinstances; here != NULL ; here=here->B4SOInextInstance) { vbs = model->B4SOItype * (*(ckt->CKTrhsOld+here->B4SOIbNode) - *(ckt->CKTrhsOld+here->B4SOIsNodePrime)); vgs = model->B4SOItype * (*(ckt->CKTrhsOld+here->B4SOIgNode) - *(ckt->CKTrhsOld+here->B4SOIsNodePrime)); vds = model->B4SOItype * (*(ckt->CKTrhsOld+here->B4SOIdNodePrime) - *(ckt->CKTrhsOld+here->B4SOIsNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->B4SOIvgs) - *(ckt->CKTstate0 + here->B4SOIvds); delvbs = vbs - *(ckt->CKTstate0 + here->B4SOIvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B4SOIvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B4SOIvgs); delvds = vds - *(ckt->CKTstate0 + here->B4SOIvds); delvgd = vgd-vgdo; cd = here->B4SOIcd; if (here->B4SOImode >= 0) { cdhat = cd - here->B4SOIgjdb * delvbd + here->B4SOIgmbs * delvbs + here->B4SOIgm * delvgs + here->B4SOIgds * delvds; } else { cdhat = cd - (here->B4SOIgjdb - here->B4SOIgmbs) * delvbd - here->B4SOIgm * delvgd + here->B4SOIgds * delvds; } /* * check convergence */ if ((here->B4SOIoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->B4SOIcjs; cbd = here->B4SOIcjd; cbhat = cbs + cbd + here->B4SOIgjdb * delvbd + here->B4SOIgjsb * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soiinit.h0000644000265600020320000000037712264261473021765 0ustar andreasadmin#ifndef _B4SOIINIT_H #define _B4SOIINIT_H extern IFparm B4SOIpTable[]; extern IFparm B4SOImPTable[]; extern char *B4SOInames[]; extern int B4SOIpTSize; extern int B4SOImPTSize; extern int B4SOInSize; extern int B4SOIiSize; extern int B4SOImSize; #endif ngspice-26/src/spicelib/devices/bsimsoi/b4soigetic.c0000644000265600020320000000405612264261473022106 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soigetic.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soigetic.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOIgetic( GENmodel *inModel, CKTcircuit *ckt) { B4SOImodel *model = (B4SOImodel*)inModel; B4SOIinstance *here; for (; model ; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance) { if(!here->B4SOIicVBSGiven) { here->B4SOIicVBS = *(ckt->CKTrhs + here->B4SOIbNode) - *(ckt->CKTrhs + here->B4SOIsNode); } if (!here->B4SOIicVDSGiven) { here->B4SOIicVDS = *(ckt->CKTrhs + here->B4SOIdNode) - *(ckt->CKTrhs + here->B4SOIsNode); } if (!here->B4SOIicVGSGiven) { here->B4SOIicVGS = *(ckt->CKTrhs + here->B4SOIgNode) - *(ckt->CKTrhs + here->B4SOIsNode); } if (!here->B4SOIicVESGiven) { here->B4SOIicVES = *(ckt->CKTrhs + here->B4SOIeNode) - *(ckt->CKTrhs + here->B4SOIsNode); } if (!here->B4SOIicVPSGiven) { here->B4SOIicVPS = *(ckt->CKTrhs + here->B4SOIpNode) - *(ckt->CKTrhs + here->B4SOIsNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soipzld.c0000644000265600020320000001462212264261473021764 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soipzld.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soipzld.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "b4soidef.h" #include "ngspice/suffix.h" int B4SOIpzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd=0.0, capbs=0.0, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap=0.0; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here!= NULL; here = here->B4SOInextInstance) { if (here->B4SOImode >= 0) { Gm = here->B4SOIgm; Gmbs = here->B4SOIgmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->B4SOIcggb; cgsb = here->B4SOIcgsb; cgdb = here->B4SOIcgdb; cbgb = here->B4SOIcbgb; cbsb = here->B4SOIcbsb; cbdb = here->B4SOIcbdb; cdgb = here->B4SOIcdgb; cdsb = here->B4SOIcdsb; cddb = here->B4SOIcddb; } else { Gm = -here->B4SOIgm; Gmbs = -here->B4SOIgmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->B4SOIcggb; cgsb = here->B4SOIcgdb; cgdb = here->B4SOIcgsb; cbgb = here->B4SOIcbgb; cbsb = here->B4SOIcbdb; cbdb = here->B4SOIcbsb; cdgb = -(here->B4SOIcdgb + cggb + cbgb); cdsb = -(here->B4SOIcddb + cgsb + cbsb); cddb = -(here->B4SOIcdsb + cgdb + cbdb); } gdpr=here->B4SOIdrainConductance; gspr=here->B4SOIsourceConductance; gds= here->B4SOIgds; gbd= here->B4SOIgjdb; gbs= here->B4SOIgjsb; #ifdef BULKCODE capbd= here->B4SOIcapbd; capbs= here->B4SOIcapbs; #endif GSoverlapCap = here->B4SOIcgso; GDoverlapCap = here->B4SOIcgdo; #ifdef BULKCODE GBoverlapCap = here->pParam->B4SOIcgbo; #endif xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->B4SOIm; *(here->B4SOIGgPtr ) += m * xcggb * s->real; *(here->B4SOIGgPtr +1) += m * xcggb * s->imag; *(here->B4SOIBbPtr ) += m * (-xcbgb-xcbdb-xcbsb) * s->real; *(here->B4SOIBbPtr +1) += m * (-xcbgb-xcbdb-xcbsb) * s->imag; *(here->B4SOIDPdpPtr ) += m * xcddb * s->real; *(here->B4SOIDPdpPtr +1) += m * xcddb * s->imag; *(here->B4SOISPspPtr ) += m * xcssb * s->real; *(here->B4SOISPspPtr +1) += m * xcssb * s->imag; *(here->B4SOIGbPtr ) += m * (-xcggb-xcgdb-xcgsb) * s->real; *(here->B4SOIGbPtr +1) += m * (-xcggb-xcgdb-xcgsb) * s->imag; *(here->B4SOIGdpPtr ) += m * xcgdb * s->real; *(here->B4SOIGdpPtr +1) += m * xcgdb * s->imag; *(here->B4SOIGspPtr ) += m * xcgsb * s->real; *(here->B4SOIGspPtr +1) += m * xcgsb * s->imag; *(here->B4SOIBgPtr ) += m * xcbgb * s->real; *(here->B4SOIBgPtr +1) += m * xcbgb * s->imag; *(here->B4SOIBdpPtr ) += m * xcbdb * s->real; *(here->B4SOIBdpPtr +1) += m * xcbdb * s->imag; *(here->B4SOIBspPtr ) += m * xcbsb * s->real; *(here->B4SOIBspPtr +1) += m * xcbsb * s->imag; *(here->B4SOIDPgPtr ) += m * xcdgb * s->real; *(here->B4SOIDPgPtr +1) += m * xcdgb * s->imag; *(here->B4SOIDPbPtr ) += m * (-xcdgb-xcddb-xcdsb) * s->real; *(here->B4SOIDPbPtr +1) += m * (-xcdgb-xcddb-xcdsb) * s->imag; *(here->B4SOIDPspPtr ) += m * xcdsb * s->real; *(here->B4SOIDPspPtr +1) += m * xcdsb * s->imag; *(here->B4SOISPgPtr ) += m * xcsgb * s->real; *(here->B4SOISPgPtr +1) += m * xcsgb * s->imag; *(here->B4SOISPbPtr ) += m * (-xcsgb-xcsdb-xcssb) * s->real; *(here->B4SOISPbPtr +1) += m * (-xcsgb-xcsdb-xcssb) * s->imag; *(here->B4SOISPdpPtr ) += m * xcsdb * s->real; *(here->B4SOISPdpPtr +1) += m * xcsdb * s->imag; *(here->B4SOIDdPtr) += m * gdpr; *(here->B4SOISsPtr) += m * gspr; *(here->B4SOIBbPtr) += m * (gbd+gbs); *(here->B4SOIDPdpPtr) += m * (gdpr+gds+gbd+RevSum); *(here->B4SOISPspPtr) += m * (gspr+gds+gbs+FwdSum); *(here->B4SOIDdpPtr) -= m * gdpr; *(here->B4SOISspPtr) -= m * gspr; *(here->B4SOIBdpPtr) -= m * gbd; *(here->B4SOIBspPtr) -= m * gbs; *(here->B4SOIDPdPtr) -= m * gdpr; *(here->B4SOIDPgPtr) += m * Gm; *(here->B4SOIDPbPtr) -= m * (gbd - Gmbs); *(here->B4SOIDPspPtr) -= m * (gds + FwdSum); *(here->B4SOISPgPtr) -= m * Gm; *(here->B4SOISPsPtr) -= m * gspr; *(here->B4SOISPbPtr) -= m * (gbs + Gmbs); *(here->B4SOISPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soimdel.c0000644000265600020320000000276012264261473021734 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soimdel.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soimdel.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOImDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { B4SOImodel **model = (B4SOImodel**)inModel; B4SOImodel *modfast = (B4SOImodel*)kill; B4SOIinstance *here; B4SOIinstance *prev = NULL; B4SOImodel **oldmod; oldmod = model; for (; *model ; model = &((*model)->B4SOInextModel)) { if ((*model)->B4SOImodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B4SOInextModel; /* cut deleted device out of list */ for (here = (*model)->B4SOIinstances; here; here = here->B4SOInextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soiext.h0000644000265600020320000000322312264261473021613 0ustar andreasadmin/********** Copyright 2010 Regents of the University of California. All rights reserved. Author: 2005 Hui Wan (based on Samuel Fung's b3soiext.h) Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. Authors: 2009- Tanvir Morshed, Ali Niknejad, Chenming Hu. Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. File: b4soiext.h **********/ extern int B4SOIacLoad(GENmodel *,CKTcircuit*); extern int B4SOIask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B4SOIconvTest(GENmodel *,CKTcircuit*); extern int B4SOIdelete(GENmodel*,IFuid,GENinstance**); extern void B4SOIdestroy(GENmodel**); extern int B4SOIgetic(GENmodel*,CKTcircuit*); extern int B4SOIload(GENmodel*,CKTcircuit*); extern int B4SOImAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B4SOImDelete(GENmodel**,IFuid,GENmodel*); extern int B4SOImParam(int,IFvalue*,GENmodel*); extern void B4SOImosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B4SOIparam(int,IFvalue*,GENinstance*,IFvalue*); extern int B4SOIpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B4SOIsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B4SOItemp(GENmodel*,CKTcircuit*); extern int B4SOItrunc(GENmodel*,CKTcircuit*,double*); extern int B4SOInoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int B4SOIunsetup(GENmodel*,CKTcircuit*); extern int B4SOIsoaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsimsoi/b4soild.c0000644000265600020320000205431612264261473021420 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soild.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soild.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Larry Wagner, Calvin Bittner, Geoffrey Coram, Tanvir Morshed 05/14/2010 * Modified by Larry Wagner, Calvin Bittner, 5 fixes. 08/04/2010 * Modified by Larry Wagner, Calvin Bittner, FD derivatives fixes. 08/25/2010 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define EPS0 8.85418e-12 /*4.1*/ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define KboQ 8.617087e-5 /* Kb / q */ #define Eg300 1.115 /* energy gap at 300K */ #define DELTA 1.0E-9 /* v4.0 */ #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 /* Original is 0.02, for matching IBM model, change to 0.08 */ #define DELTA_3_SOI 0.08 #define DELTA_4 0.02 #define DELT_Vbseff 0.005 #define DELTA_VFB 0.02 #define OFF_Vbsitf 0.02 /* v3.1*/ #define CONST_2OV3 0.6666666666 #define MAX_EXPL 2.688117142e+43 #define MIN_EXPL 3.720075976e-44 #define EXPL_THRESHOLD 100.0 #define DEXP(A,B,C) { \ if (A > EXPL_THRESHOLD) { \ B = MAX_EXPL*(1.0+(A)-EXPL_THRESHOLD); \ C = MAX_EXPL; \ } else if (A < -EXPL_THRESHOLD) { \ B = MIN_EXPL; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } #define FLOG(A) fabs(A) + 1e-14 #ifdef USE_OMP int B4SOILoadOMP(B4SOIinstance *here, CKTcircuit *ckt); void B4SOILoadRhsMat(GENmodel *inModel, CKTcircuit *ckt); #endif /* B4SOIlimit(vnew,vold) * limits the per-iteration change of any absolute voltage value */ static double B4SOIlimit( double vnew, double vold, double limit, int *check) { double T0, T1; if (isnan (vnew) || isnan (vold)) { fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n"); fprintf(stderr, "New prediction returns to 0.0!\n"); vnew = 0.0; *check = 1; } T0 = vnew - vold; T1 = fabs(T0); if (T1 > limit) { if (T0 > 0.0) vnew = vold + limit; else vnew = vold - limit; *check = 1; } return vnew; } int B4SOIload( GENmodel *inModel, CKTcircuit *ckt) { #ifdef USE_OMP int idx; B4SOImodel *model = (B4SOImodel*)inModel; int good = 0; B4SOIinstance *here; B4SOIinstance **InstArray; InstArray = model->B4SOIInstanceArray; #pragma omp parallel for private(here) for (idx = 0; idx < model->B4SOIInstCount; idx++) { here = InstArray[idx]; good = B4SOILoadOMP(here, ckt); } B4SOILoadRhsMat(inModel, ckt); return good; } int B4SOILoadOMP(B4SOIinstance *here, CKTcircuit *ckt) { B4SOImodel *model; #else register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; #endif register int selfheat; double Gmin; double dVgstNVt_dT, dVgstNVt2_dT; /* LFW_FD */ double ag0, qgd, qgs, von, cbhat, VgstNVt, ExpVgst, dExpVgst_dT; /* enhanced line Wagner */ /* LFW_FD next 4 lines */ double dVgstNVt_dVg, dVgstNVt_dVd, dVgstNVt_dVb, dVgstNVt_dVe; double dExpVgst_dVg, dExpVgst_dVd, dExpVgst_dVb, dExpVgst_dVe, dVgstNVt2_dVg; double dVgstNVt2_dVd, dVgstNVt2_dVb, dVgstNVt2_dVe, dExpArg2_dVd, dExpArg2_dVb, dExpArg2_dVe; double dExpVgst2_dVg, dExpVgst2_dVd, dExpVgst2_dVb, dExpVgst2_dVe; double cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double arg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVd, dVfbeff_dVe, dVfbeff_dVb, V3, V4; double PhiBSWG, MJSWG; double gcgdb, gcggb, gcgsb, gcgeb, gcgT; double gcsdb, gcsgb, gcssb, gcseb, gcsT; double gcddb, gcdgb, gcdsb, gcdeb, gcdT; double gcbdb, gcbgb, gcbsb, gcbeb, gcbT; double gcedb, gcegb, gcesb, gceeb, gceT; double gcTt, gTtg, gTtb, gTtdp, gTtt, gTtsp; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vg, vd, vs, vp, ve, vb; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd, dVfb_dVg, dVfb_dVe, dVfb_dT; double Phis, sqrtPhis, dsqrtPhis_dVd, dsqrtPhis_dVe, dsqrtPhis_dVb, dsqrtPhis_dVg; double Vth, dVth_dVb, dVth_dVd, dVth_dVg, dVth_dVe, dVth_dT; double Vgst, dVgst_dVg, dVgst_dVd, dVgst_dVb, dVgst_dVe, dVgst_dT, dVgs_eff_dVg, dVgs_eff_dT; double n, dn_dVb, dn_dVe, dn_dVg, Vtm; double ExpArg, dExpArg_dVg, dExpArg_dVd, dExpArg_dVb, dExpArg_dVe, dExpArg_dT, dExpArg2_dVg, dExpArg2_dT, V0; double ueff, dueff_dVg, dueff_dVd, dueff_dVb, dueff_dVe, dueff_dT; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb, dEsatL_dVe, dEsatL_dT; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, dVdsat_dVe, dVdsat_dT, Vasat; double dVasat_dVg, dVasat_dVb, dVasat_dVd, dVasat_dVe, dVasat_dT; double Va, dVa_dVd, dVa_dVg, dVa_dVb, dVa_dVe, dVa_dT; double Vbseff, dVbseff_dVb; double CoxWL; double T0=0.0, dT0_dVg, dT0_dVd, dT0_dVe, dT0_dVb, dT0_dT; double T1, dT1_dVg, dT1_dVd, dT1_dVb, dT1_dT; double T2, dT2_dVg, dT2_dVd, dT2_dVb, dT2_dT, dT2_dVp; double T3, dT3_dVg, dT3_dVd, dT3_dVe, dT3_dVb, dT3_dT; double T4, dT4_dVe, dT4_dVg, dT4_dVd, dT4_dVb, dT4_dT; double T5, dT5_dVg, dT5_dVd, dT5_dVb, dT5_dT; double T6, dT6_dVg, dT6_dVd, dT6_dVe, dT6_dVb, dT6_dT, dT6_dVp; double T7, dT7_dVg, dT7_dVb, dT7_dVd, dT7_dVe; double T8, dT8_dVd; double T9, dT9_dVd; double T10, dT10_dVb, dT10_dVd; double T11, T12; /* LFW_FD 2 new lines */ double dT02_dVg, dT02_dVd, dT02_dVb, dT02_dVe, dT12_dVg, dT12_dVd, dT12_dVb, dT12_dVe; double dT22_dVg, dT22_dVd, dT22_dVb, dT22_dVe; double dTL0_dT, TL1, dTL1_dT, TL2, dTL2_dT, TL3, dTL3_dT, TL4, dTL4_dT, dTL5_dT; /* new line Wagner */ /* LFW_FD 1 new line */ double dTL1_dVg, dTL1_dVd, dTL1_dVb, dTL1_dVe; double dTL6_dT, dTL7_dT, dTL8_dT, dTL9_dT; /* new line Wagner */ double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVg, dAbulk0_dVb, dAbulk0_dVd, dAbulk0_dVe; double dAbulk_dT, dAbulk0_dT, dAbulkCV_dT; /* new line Wagner */ double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb, dVACLM_dVe, dVACLM_dT; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb, dVADIBL_dVe, dVADIBL_dT; double Xdep, dXdep_dVd, dXdep_dVe, dXdep_dVb, dXdep_dVg; double lt1, dlt1_dVd, dlt1_dVe, dlt1_dVb, dlt1_dVg; double ltw, dltw_dVd, dltw_dVe, dltw_dVb, dltw_dVg; double Delt_vth, dDelt_vth_dVd, dDelt_vth_dVe, dDelt_vth_dVb, dDelt_vth_dVg, dDelt_vth_dT; double Theta0, dTheta0_dVd, dTheta0_dVe, dTheta0_dVb, dTheta0_dVg; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg, dLambda_dVb, dLambda_dVd, dLambda_dVe; double dLambda_dT; /* new line Wagner */ double a1; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb, dVgsteff_dT; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb, dVdseff_dVe, dVdseff_dT; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb, dVdseffCV_dVe; double dVdseffCV_dT; /* new line Wagner */ double diffVds; double dAbulk_dVg, dAbulk_dVd, dAbulk_dVe, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb, dbeta_dVe, dbeta_dT; double gche, dgche_dVg, dgche_dVd, dgche_dVb, dgche_dVe, dgche_dT; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb, dfgche1_dVe, dfgche1_dT; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb, dfgche2_dVe, dfgche2_dT; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb, dIdl_dVe, dIdl_dT; double Ids, Gm, Gds, Gmb, dIds_dVg, dIds_dVb, dIds_dVd, dIds_dVe, dIds_dT; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, dRds_dVd, dRds_dVe, dRds_dT, WVCox, WVCoxRds, dWVCoxRds_dT; double dWVCoxRds_dVg, dWVCoxRds_dVb, dWVCoxRds_dVd, dWVCoxRds_dVe; double Vgst2Vtm, dVgst2Vtm_dT, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVd, dVdsatCV_dVb, dVdsatCV_dVe, dVdsatCV_dT; double Leff, Weff, dWeff_dVg, dWeff_dVb, dWeff_dVd, dWeff_dVe, dWeff_dT; double AbulkCV, dAbulkCV_dVg, dAbulkCV_dVb, dAbulkCV_dVd, dAbulkCV_dVe; double qgdo, qgso, cgdo, cgso; double dxpart, sxpart; struct b4soiSizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded=0, error; double gbbsp, gbbdp, gbbg, gbbb, gbbp, gbbT; double gddpsp, gddpdp, gddpg, gddpb, gddpT; double gsspsp, gsspdp, gsspg, gsspb, gsspT; double Gbpbs=0.0, Gbpps; double ves, ved, veb, vge=0.0, delves, vedo, delved; double vps, vpd, Vps, delvps; double Vbd, Ves, Vesfb; double DeltVthtemp, dDeltVthtemp_dVd, dDeltVthtemp_dVe, dDeltVthtemp_dVb, dDeltVthtemp_dVg, dDeltVthtemp_dT; double Vbp, dVbp_dVb; double DeltVthw, dDeltVthw_dVd, dDeltVthw_dVe, dDeltVthw_dVb, dDeltVthw_dVg, dDeltVthw_dT; double Gm0, Gds0, Gmb0, Gme0, GmT0, GmT; double dDIBL_Sft_dVg, dDIBL_Sft_dVe, dDIBL_Sft_dVb; double Igidl, Ggidld=0.0, Ggidlg, Ggidlb=0.0, Ggidlt; /* enhanced line Wagner */ double Igisl, Ggisls=0.0, Ggislg, Ggislb=0.0, Ggislt; /* enhanced line Wagner */ double Gjsd, Gjsb=0.0, GjsT, Gjdd, Gjdb=0.0, GjdT; double Ibp, Iii, Giid=0.0, Giig, Giib=0.0, GiiT, Gcd, Gcb, GcT, ceqbody, ceqbodcon; double gppb, gppp; double delTemp, deldelTemp, Temp; double ceqth, ceqqth; double K1; double qjs=0.0, gcjsbs=0.0, gcjsT; double qjd=0.0, gcjdbs=0.0, gcjdT; double qge; double ceqqe; double ni, Eg, Cbox, CboxWL; double dEg_dT; /* new line Wagner */ double cjsbs; double dVfbeff_dVrg; double qinv, qgate=0.0, qbody=0.0, qdrn=0.0, qsrc, qsub=0.0, cqgate, cqbody, cqdrn, cqsub, cqtemp; double qgate1; /* new line Wagner */ double Cgg, Cgd, Cgb, Cge; double Csg, Csd, Csb, Cse, Cbg, Cbd, Cbb, Cbe; double Cgg1, Cgb1, Cgd1, Cge1, Cbg1, Cbb1, Cbd1, Cbe1, Csg1, Csd1, Csb1, Cse1; double Vdsatii; double Ibs1 ,dIbs1_dVb ,dIbs1_dT; double Ibs2 ,dIbs2_dVb ,dIbs2_dT; double Ibs3 ,dIbs3_dVb ,dIbs3_dVd, dIbs3_dT; double Ibs4 ,dIbs4_dVb ,dIbs4_dT; double Ibd1 ,dIbd1_dVb ,dIbd1_dVd ,dIbd1_dT; double Ibd2 ,dIbd2_dVb ,dIbd2_dVd ,dIbd2_dT; double Ibd3 ,dIbd3_dVb ,dIbd3_dVd ,dIbd3_dT; double Ibd4 ,dIbd4_dVb ,dIbd4_dVd ,dIbd4_dT; double WTsi, NVtm1, NVtm2; double Ic ,dIc_dVb ,dIc_dVd; double Ibs; double Ibd; double Denomi ,dDenomi_dVg, dDenomi_dVd, dDenomi_dVb, dDenomi_dVe, dDenomi_dT; double Qsub0 ,dQsub0_dVg ,dQsub0_dVb ,dQsub0_dVd, dQsub0_dVe ; double dqgate_dT, dqgate2_dT, dqbulk_dT, dqsrc_dT, dqdrn_dT, dqbody_dT, dqsub_dT; /* new line Wagner */ double Qac0 ,dQac0_dVb ,dQac0_dVd; double Qe1 , dQe1_dVb, dQe1_dVe, dQe1_dT; double Ce1b ,Ce1e, Ce1T; double dQac0_dVrg, dQsub0_dVrg; /* for self-heating */ double vbi, vfbb, phi, sqrtPhi, Xdep0, u0temp, vsattemp; double jdifs, jdifd, djdifs_dT, djdifd_dT; double jbjts, jbjtd, djbjts_dT, djbjtd_dT; double jrecs, jrecd, djrecs_dT, djrecd_dT; double jtuns, jtund, djtuns_dT, djtund_dT; double rds0=0.0, ua, ub, uc; double dvbi_dT, dvfbb_dT, du0temp_dT; double dvsattemp_dT, drds0_dT=0.0, dua_dT, dub_dT, duc_dT, dni_dT, dVtm_dT; double dVfbeff_dT, dQac0_dT, dQsub0_dT; double CbT, CsT, CgT; double CdT; /* new line Wagner */ double rho, rho_ref, ku0temp; /* v4.0 */ double drho_dT, drho_ref_dT, dku0temp_dT; /* v4.0 */ /* v2.0 release */ double Vbsh, dVbsh_dVb; double sqrtPhisExt, dsqrtPhisExt_dVd, dsqrtPhisExt_dVe, dsqrtPhisExt_dVb, dsqrtPhisExt_dVg; double T13, T14; double dT14_dT; /* new line Wagner */ double dT11_dVb, dT11_dVd, dT11_dVe, dT13_dVb, dT13_dVd, dT13_dVe, dT14_dVb, dT14_dVd, dT14_dVe, dT13_dVg, dT14_dVg; double Vdsatii0, dVdsatii0_dT; double VgsStep, dVgsStep_dT, Ratio, dRatio_dVg, dRatio_dVb, dRatio_dVd, dRatio_dT, dTempRatio_dT; double Vdiff, dVdiff_dVg, dVdiff_dVb, dVdiff_dVd, dVdiff_dT; double dNVtm1_dT; double NVtmf, NVtmr, dNVtmf_dT, dNVtmr_dT; double TempRatioMinus1; double Ahlis, dAhlis_dT, Ahlid, dAhlid_dT ; double WsTsi, WdTsi; double dPhiBSWG_dT, dcjsbs_dT, darg_dT, ddT3_dVb_dT; double dT7_dT, dT0_dT7, dT1_dT7, dT2_dT7; double CoxWLb, CoxWLcenb; double ExpVbsNVtm, dExpVbsNVtm_dVb, dExpVbsNVtm_dT; double ExpVbdNVtm, dExpVbdNVtm_dVb, dExpVbdNVtm_dVd, dExpVbdNVtm_dT; double Ien, dIen_dT, Iendif, dIendif_dT; double Ibsdif, dIbsdif_dVb, dIbsdif_dT; double Ibddif, dIbddif_dVb, dIbddif_dT; double Ehlis, dEhlis_dVb, dEhlis_dT; double EhlisFactor, dEhlisFactor_dVb, dEhlisFactor_dT; double Ehlid, dEhlid_dVb, dEhlid_dVd, dEhlid_dT; double EhlidFactor, dEhlidFactor_dVb, dEhlidFactor_dT; double E2ndFactor, dE2ndFactor_dVb, dE2ndFactor_dVd, dE2ndFactor_dT; double dT10_dT, dT11_dT, dT13_dT, DioMax; /* LFW_FD enhance line */ double cjdbs, dcjdbs_dT; double wdios, wdiod; /* for capMod3 */ double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVb, LINK, Ccen, Coxeff, dCoxeff_dVg, dCoxeff_dVb; double CoxWLcen, QovCox, dQac0_dVg, dQac0_dVe, DeltaPhi, dDeltaPhi_dVg, dDeltaPhi_dT; double dDeltaPhi_dVd, dDeltaPhi_dVb, dDeltaPhi_dVe; double dTcen_dVd, dTcen_dVe, dTcen_dT, dCoxeff_dVd, dCoxeff_dT, dCoxWLcenb_dT, qinoi, qbulk, qbulk1; double dCoxeff_dVe; double T3zb, lt1zb, ltwzb, Theta0zb; double Delt_vthzb, dDelt_vthzb_dT; double DeltVthwzb, dDeltVthwzb_dT; double DeltVthtempzb, dDeltVthtempzb_dT; double Vthzb, dVthzb_dT, Vfbzb, dVfbzb_dT; /* v3.2 */ double noff, dnoff_dVg, dnoff_dVd, dnoff_dVb, dnoff_dVe; double dnoff_dT; /* new line Wagner */ double vgmb; /* v3.1 added for RF */ double geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb, ceqgcrg; double vges, vgms, vgedo, vgmdo, vged, vgmd, delvged, delvgmd; double delvges, delvgms, vgme; double gcgmgmb=0.0, gcgmdb, gcgmsb, gcdgmb, gcsgmb; double gcgmeb, gcegmb, qgme, qgmid=0.0, ceqqgmid; double gcgbb; double vgge, vggm; /* v3.0 */ double Igc, dIgc_dVg, dIgc_dVd, dIgc_dVe, dIgc_dVb, Igs, dIgs_dVg, dIgs_dVs, Igd, dIgd_dVg, dIgd_dVd; double Igcs, dIgcs_dVg, dIgcs_dVd, dIgcs_dVb, dIgcs_dVe, Igcd, dIgcd_dVg, dIgcd_dVd, dIgcd_dVb, dIgcd_dVe; double dIgc_dT, dIgcs_dT, dIgcd_dT; /* new line Wagner */ double vgs_eff, dvgs_eff_dvg, vgd_eff, dvgd_eff_dvg; double VxNVt, ExpVxNVt; double dVxNVt_dT; /* new line Wagner */ double gIstotg, gIstotd, gIstotb, gIstots, Istoteq; double gIdtotg, gIdtotd, gIdtotb, gIdtots, Idtoteq; double gIgtotg, gIgtotd, gIgtotb, gIgtots, Igtoteq; /* v3.0 */ double Vbsitf, dVbsitf_dVg, dVbsitf_dVd, dVbsitf_dVb, dVbsitf_dVe, dVbsitf_dT, dVbs_dVb; double dVbs_dVg, dVbs_dVd, dVbs_dVe, dVbs_dT; double dIgb1_dVe, Giie, dRatio_dVe, dVdiff_dVe; double dT1_dVe, dT5_dVe, dIgb_dVe, dVox_dVe, dVoxdepinv_dVe, dVaux_dVe; double Gme, gTte, gbbe, gddpe, gsspe; double Vbs0, dVbs0_dVg, dVbs0_dVd, dVbs0_dVe, dVbs0_dT; double Vbs0mos, dVbs0mos_dVe, dVbs0mos_dT; double Vbsmos, dVbsmos_dVg, dVbsmos_dVd, dVbsmos_dVb, dVbsmos_dVe, dVbsmos_dT; double PhiON, dPhiON_dVg, dPhiON_dVd, dPhiON_dVe, dPhiON_dT; double PhiFD, dPhiFD_dVg, dPhiFD_dVd, dPhiFD_dVe, dPhiFD_dT; double Vbs0t, dVbs0t_dVg, dVbs0t_dVd, dVbs0t_dVe, dVbs0t_dT; double VthFD, dVthFD_dVd, dVthFD_dVb, dVthFD_dVe, dVthFD_dT; double VtgsFD, ExpVtgsFD, VgstFD, ExpVgstFD; double VtgseffFD, dVtgseffFD_dVd, dVtgseffFD_dVg, dVtgseffFD_dVe, dVtgseffFD_dT; double VgsteffFD, dVgsteffFD_dVd, dVgsteffFD_dVg, dVgsteffFD_dVe, dVgsteffFD_dT; double dT2_dVe, dVbsh_dVg, dVbsh_dVd, dVbsh_dVe, dVbsh_dT; double dVgsteff_dVe, dVbseff_dVg, dVbseff_dVd, dVbseff_dVe, dVbseff_dT; /* v2.2 release */ double Vgb, dVgb_dVg, dVgb_dVd, dVgb_dVe, dVgb_dVb, Vox, dVox_dVg, dVox_dVd, dVox_dVb; double OxideRatio, Vaux, dVaux_dVg, dVaux_dVd, dVaux_dVb; double Igb, dIgb_dVg, dIgb_dVd, dIgb_dVb; double ceqgate; double dT0_dVox, Voxeff, dVoxeff_dVox; double dVox_dT, dVaux_dT, dIgb_dT; double Voxacc, dVoxacc_dVg, dVoxacc_dVd, dVoxacc_dVe, dVoxacc_dVb, dVoxacc_dT; double Voxdepinv, dVoxdepinv_dVg, dVoxdepinv_dVb, dVoxdepinv_dVd, dVoxdepinv_dT; double Igb1, dIgb1_dVg, dIgb1_dVd, dIgb1_dVb, dIgb1_dT; double Igb2, dIgb2_dVg, dIgb2_dVd, dIgb2_dVb, dIgb2_dVe, dIgb2_dT; double gigs, gigd, gigb, gigg, gigT, gige; /* LFW_FD enhance line */ double gigpg, gigpp; /* v4.0 */ double IdlovVdseff, dIdlovVdseff_dVg, dIdlovVdseff_dVd, dIdlovVdseff_dVb; double vdbs, vsbs, vdbd=0.0, vsbd, vsbdo, vbs_jct, vbd_jct; double Vsbs, Vdbd, Vdbs; double delvdbd, delvsbs, delvdbs, delvbd_jct, delvbs_jct; double gcdbdb, gcsbsb, gcsbb, gcdbb; double ceqqjd=0.0, ceqqjs=0.0; double Lpe_Vb; /* v4.0 for Vth */ double DITS_Sft, DITS_Sft2, dDITS_Sft_dVb, dDITS_Sft_dVd, dDITS_Sft2_dVd, dDITS_Sft_dT; double FP, dFP_dT, dFP_dVg, dFP_dVb, dFP_dVd, dFP_dVe; double VADITS, dVADITS_dVg, dVADITS_dVd, dVADITS_dVb, dVADITS_dVe, dVADITS_dT; /* for DITS */ double Iii_Igidl, Giigidl_b, Giigidl_d, Giigidl_g, Giigidl_e, Giigidl_T; double gjsdb; double Idbdp=0.0, Isbsp=0.0, cdbdp, csbsp, gcjdbdp, gcjsbsp, GGjdb, GGjsb; double vdes, vses, vdedo, delvdes, delvses, delvded, Isestot, cseshat, Idedtot, cdedhat; double PowWeffWr, rd0=0.0, rs0=0.0, rdwmin=0.0, rswmin=0.0, drs0_dT=0.0, drd0_dT=0.0, drswmin_dT=0.0, drdwmin_dT=0.0, Rd, dRd_dVg, dRd_dVb, dRd_dT, Rs, dRs_dVg, dRs_dVb, dRs_dT; double dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb, dgstot_dve, dgstot_dT; double dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb, dgdtot_dve, dgdtot_dT; double gstot, gstotd, gstotg, gstots, gstotb, ceqgstot; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, ceqgdtot; double gdpr, gspr; /*4.1*/ double toxe, epsrox, epssub, epsgate; double Tnom, Eg0, Vtm0; double Vbci, Idsmosfet, Iiibjt; double dVbci_dT, dIiibjt_dVd, dIiibjt_dVb, dIiibjt_dT; double VgsteffVth, dT11_dVg; /* v4.1 */ /* Jun 09 */ double toxe_mob ; /* Jun 09 */ double dTheta0_dT, dn_dT, dsqrtPhisExt_dT, dT3zb_dT, dltwzb_dT, dlt1zb_dT, dTheta0zb_dT, dvth0_dT, dDIBL_Sft_dT,dtmp2_dT; /* v4.2 temp deriv */ double Vgd, Vgd_eff, dVgd_eff_dVg, dVgd_eff_dT; /* enhanced line Wagner */ double dVbs0mos_dVd; double Ig_agbcp2, dIg_agbcp2_dVg, dIg_agbcp2_dVp, dIg_agbcp2_dT; double vgp_eff, vgp=0.0, dvgp_eff_dvg, dvgp_eff_dvp, dvgp_eff_dT; /* improved body contact charge model */ double CoxWL2, CoxWLb2; double ExpVgst2, Vgsteff2, VgstNVt2, ExpArg2; double dVgsteff2_dVd, dVgsteff2_dVg, dVgsteff2_dVb, dVgsteff2_dVe, dVgsteff2_dT; double T02; double Qac02, dQac02_dVrg, dQac02_dVd, dQac02_dVg, dQac02_dVb, dQac02_dVe, dQac02_dT; double Vgs_eff2, dVgs_eff2_dVg; double Vfbzb2, dVfbzb2_dT; double Vfb2, dVfb2_dVg, dVfb2_dVd, dVfb2_dVb, dVfb2_dVe, dVfb2_dT; double Vfbeff2, dVfbeff2_dVd, dVfbeff2_dVrg, dVfbeff2_dVg, dVfbeff2_dVb, dVfbeff2_dVe, dVfbeff2_dT; double Qsub02, dQsub02_dVg, dQsub02_dVrg, dQsub02_dVd, dQsub02_dVb, dQsub02_dVe, dQsub02_dT; double VdsatCV2, dVdsatCV2_dVg, dVdsatCV2_dVb, dVdsatCV2_dVd, dVdsatCV2_dVe, dVdsatCV2_dT; double VdseffCV2, dVdseffCV2_dVg, dVdseffCV2_dVd, dVdseffCV2_dVb, dVdseffCV2_dVe, dVdseffCV2_dT; double Cbg12, Cbd12, Cbb12, Cbe12; double Cgg12, Cgd12, Cgb12, Cge12; double Csg12, Csd12, Csb12, Cse12; double Tcen2, dTcen2_dVg, dTcen2_dVd, dTcen2_dVb, dTcen2_dVe, dTcen2_dT; double Ccen2; double Coxeff2, dCoxeff2_dVg, dCoxeff2_dVd, dCoxeff2_dVb, dCoxeff2_dVe, dCoxeff2_dT; double CoxWLcenb2, dCoxWLcenb2_dT; double QovCox2; double DeltaPhi2, dDeltaPhi2_dVg, dDeltaPhi2_dVd, dDeltaPhi2_dVb, dDeltaPhi2_dVe; double dDeltaPhi2_dT; /* new line Wagner */ double CoxWLcen2; double T22, T52; double qsrc2, qbulk2; double dqsrc2_dT, dqbulk2_dT; /* new line Wagner */ double Csg2, Csd2, Csb2, Cse2; double DELTA_3_SOI2; double dphi_dT,dsqrtPhi_dT,dXdep0_dT,cdep0,theta0vb0,dtheta0vb0_dT; double thetaRout,dthetaRout_dT,dcdep0_dT; double dPhis_dT,dsqrtPhis_dT,dXdep_dT,dlt1_dT,dltw_dT; double agidl, bgidl, cgidl, egidl, rgidl, kgidl, fgidl; double agisl, bgisl, cgisl, egisl, rgisl, kgisl, fgisl; double ucs, ud; /* Bugfix # 21 Jul09*/ double ndiode, ndioded; /* v4.2 bugfix */ double nrecf0s, nrecf0d, nrecr0s, nrecr0d, vrec0s, vrec0d, ntuns, ntund, vtun0s,vtun0d;/*bugfix for junction DC swapping */ double eggbcp2, eggdep, agb1, bgb1, agb2, bgb2, agbc2n, agbc2p, bgbc2n, bgbc2p, Vtm00; /* v4.3.1 bugfix for mtrlMod=1 -Tanvir */ double m; #ifdef USE_OMP model = here->B4SOImodPtr; #endif #ifndef USE_OMP for (; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here != NULL; here = here->B4SOInextInstance) { #endif Check = 0; ByPass = 0; selfheat = (model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0); pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vs = *(ckt->CKTrhsOld + here->B4SOIsNodePrime); if (!here->B4SOIvbsusrGiven) { vbs = *(ckt->CKTstate0 + here->B4SOIvbs); vb = *(ckt->CKTrhsOld + here->B4SOIbNode); } else { vbs = here->B4SOIvbsusr; vb = here->B4SOIvbsusr + vs; } vgs = *(ckt->CKTstate0 + here->B4SOIvgs); ves = *(ckt->CKTstate0 + here->B4SOIves); vps = *(ckt->CKTstate0 + here->B4SOIvps); vds = *(ckt->CKTstate0 + here->B4SOIvds); delTemp = *(ckt->CKTstate0 + here->B4SOIdeltemp); /* v4.0 */ vdbs = *(ckt->CKTstate0 + here->B4SOIvdbs); /* v4.0 for rbody */ vdbd = *(ckt->CKTstate0 + here->B4SOIvdbd); /* v4.0 for rbody */ vsbs = *(ckt->CKTstate0 + here->B4SOIvsbs); /* v4.0 for rbody */ vses = *(ckt->CKTstate0 + here->B4SOIvses); /* v4.0 for rdsmod*/ vdes = *(ckt->CKTstate0 + here->B4SOIvdes); /* v4.0 for rdsmod*/ /* v4.0 end */ vg = *(ckt->CKTrhsOld + here->B4SOIgNode); vd = *(ckt->CKTrhsOld + here->B4SOIdNodePrime); vp = *(ckt->CKTrhsOld + here->B4SOIpNode); ve = *(ckt->CKTrhsOld + here->B4SOIeNode); /* v3.1 added for RF */ vgge = *(ckt->CKTrhsOld + here->B4SOIgNodeExt); vggm = *(ckt->CKTrhsOld + here->B4SOIgNodeMid); vges = *(ckt->CKTstate0 + here->B4SOIvges); vgms = *(ckt->CKTstate0 + here->B4SOIvgms); /* v3.1 added for RF end*/ } else if ((ckt->CKTmode & MODEINITTRAN)) { vs = *(ckt->CKTrhsOld + here->B4SOIsNodePrime); if (!here->B4SOIvbsusrGiven) { vbs = *(ckt->CKTstate1 + here->B4SOIvbs); vb = *(ckt->CKTrhsOld + here->B4SOIbNode); } else { vbs = here->B4SOIvbsusr; vb = here->B4SOIvbsusr + vs; } vgs = *(ckt->CKTstate1 + here->B4SOIvgs); ves = *(ckt->CKTstate1 + here->B4SOIves); vps = *(ckt->CKTstate1 + here->B4SOIvps); vds = *(ckt->CKTstate1 + here->B4SOIvds); delTemp = *(ckt->CKTstate1 + here->B4SOIdeltemp); /* v4.0 */ vdbs = *(ckt->CKTstate1 + here->B4SOIvdbs); /* v4.0 for rbody */ vsbs = *(ckt->CKTstate1 + here->B4SOIvsbs); /* v4.0 for rbody */ vses = *(ckt->CKTstate1 + here->B4SOIvses); /* v4.0 for rdsmod */ vdes = *(ckt->CKTstate1 + here->B4SOIvdes); /* v4.0 for rdsmod */ /* v4.0 end */ vg = *(ckt->CKTrhsOld + here->B4SOIgNode); vd = *(ckt->CKTrhsOld + here->B4SOIdNodePrime); vp = *(ckt->CKTrhsOld + here->B4SOIpNode); ve = *(ckt->CKTrhsOld + here->B4SOIeNode); /* v3.1 added for RF */ vgge = *(ckt->CKTrhsOld + here->B4SOIgNodeExt); vggm = *(ckt->CKTrhsOld + here->B4SOIgNodeMid); vges = *(ckt->CKTstate1 + here->B4SOIvges); vgms = *(ckt->CKTstate1 + here->B4SOIvgms); /* v3.1 added for RF end*/ } else if ((ckt->CKTmode & MODEINITJCT) && !here->B4SOIoff) { vds = model->B4SOItype * here->B4SOIicVDS; vgs = model->B4SOItype * here->B4SOIicVGS; ves = model->B4SOItype * here->B4SOIicVES; vbs = model->B4SOItype * here->B4SOIicVBS; vps = model->B4SOItype * here->B4SOIicVPS; vdbs = vsbs = vbs; /* v4.0 */ vg = vd = vs = vp = ve = 0.0; /* v3.1 added for RF */ vges = vgms = vgs; vgge = vggm =0.0; /* v3.1 added for RF end*/ if (vds > 0.0) /* v4.0 */ { vdes = vds + 0.01; vses = -0.01; } else if (vds < 0.0) { vdes = vds - 0.01; vses = 0.01; } else vdes = vses = 0.0; delTemp = 0.0; here->B4SOIphi = pParam->B4SOIphi; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; /* vgs = model->B4SOItype*0.1 + here->B4SOIvth0; */ vgs = model->B4SOItype * here->B4SOIvth0 + 0.1; /* v4.0 */ vds = 0.0; ves = 0.0; vps = 0.0; vges = vgms = vgs; /* v3.1 */ vbs = vdbs = vsbs = 0.0; /* v4.0 */ vdes = 0.01; /* v4.0 for rdsmod */ vses = -0.01; /* v4.0 for rdsmod */ } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->B4SOIoff)) { delTemp = vps = vbs = vgs = vds = ves = 0.0; vg = vd = vs = vp = ve = 0.0; vgge = vggm = 0.0; /* v3.1 */ vges = vgms =0.0; /* v3.1 */ vdbs = vsbs = vdes = vses = 0.0; /* v4.0 */ } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B4SOIvbs) = *(ckt->CKTstate1 + here->B4SOIvbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvbs)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvbs))); *(ckt->CKTstate0 + here->B4SOIvgs) = *(ckt->CKTstate1 + here->B4SOIvgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvgs)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvgs))); *(ckt->CKTstate0 + here->B4SOIves) = *(ckt->CKTstate1 + here->B4SOIves); ves = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIves)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIves))); *(ckt->CKTstate0 + here->B4SOIvps) = *(ckt->CKTstate1 + here->B4SOIvps); vps = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvps)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvps))); *(ckt->CKTstate0 + here->B4SOIvds) = *(ckt->CKTstate1 + here->B4SOIvds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvds)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvds))); *(ckt->CKTstate0 + here->B4SOIvbd) = *(ckt->CKTstate0 + here->B4SOIvbs) - *(ckt->CKTstate0 + here->B4SOIvds); /* v4.0 */ *(ckt->CKTstate0 + here->B4SOIvdbs) = *(ckt->CKTstate1 + here->B4SOIvdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvdbs)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvdbs))); *(ckt->CKTstate0 + here->B4SOIvdbd) = *(ckt->CKTstate0 + here->B4SOIvdbs) - *(ckt->CKTstate0 + here->B4SOIvds); *(ckt->CKTstate0 + here->B4SOIvsbs) = *(ckt->CKTstate1 + here->B4SOIvsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvsbs)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvsbs))); *(ckt->CKTstate0 + here->B4SOIvses) = *(ckt->CKTstate1 + here->B4SOIvses); vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvses)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvses))); *(ckt->CKTstate0 + here->B4SOIvdes) = *(ckt->CKTstate1 + here->B4SOIvdes); vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvdes)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvdes))); /* v4.0 end */ *(ckt->CKTstate0 + here->B4SOIvg) = *(ckt->CKTstate1 + here->B4SOIvg); *(ckt->CKTstate0 + here->B4SOIvd) = *(ckt->CKTstate1 + here->B4SOIvd); *(ckt->CKTstate0 + here->B4SOIvs) = *(ckt->CKTstate1 + here->B4SOIvs); *(ckt->CKTstate0 + here->B4SOIvp) = *(ckt->CKTstate1 + here->B4SOIvp); *(ckt->CKTstate0 + here->B4SOIve) = *(ckt->CKTstate1 + here->B4SOIve); /* v3.1 added for RF */ *(ckt->CKTstate0 + here->B4SOIvgge) = *(ckt->CKTstate1 + here->B4SOIvgge); *(ckt->CKTstate0 + here->B4SOIvggm) = *(ckt->CKTstate1 + here->B4SOIvggm); *(ckt->CKTstate0 + here->B4SOIvges) = *(ckt->CKTstate1 + here->B4SOIvges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvges)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvges))); *(ckt->CKTstate0 + here->B4SOIvgms) = *(ckt->CKTstate1 + here->B4SOIvgms); vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIvgms)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIvgms))); /* v3.1 added for RF end */ /* Only predict ve */ ve = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIve)) - (xfact * (*(ckt->CKTstate2 + here->B4SOIve))); /* Then update vg, vs, vb, vd, vp base on ve */ vs = ve - model->B4SOItype * ves; vg = model->B4SOItype * vgs + vs; vd = model->B4SOItype * vds + vs; vb = model->B4SOItype * vbs + vs; vp = model->B4SOItype * vps + vs; vgge = model->B4SOItype * vges + vs; /* v3.1 */ vggm = model->B4SOItype * vgms + vs; /* v3.1 */ delTemp = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B4SOIdeltemp))-(xfact * (*(ckt->CKTstate2 + here->B4SOIdeltemp))); /* v2.2.3 bug fix */ *(ckt->CKTstate0 + here->B4SOIdeltemp) = *(ckt->CKTstate1 + here->B4SOIdeltemp); /* if (selfheat) { here->B4SOIphi = 2.0 * here->B4SOIvtm * log(pParam->B4SOInpeak / here->B4SOIni); } v4.2 bugfix never used in the code */ } else { #endif /* PREDICTOR */ vg = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIgNode), *(ckt->CKTstate0 + here->B4SOIvg), 3.0, &Check); vd = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIdNodePrime), *(ckt->CKTstate0 + here->B4SOIvd), 3.0, &Check); vs = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIsNodePrime), *(ckt->CKTstate0 + here->B4SOIvs), 3.0, &Check); vp = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIpNode), *(ckt->CKTstate0 + here->B4SOIvp), 3.0, &Check); ve = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIeNode), *(ckt->CKTstate0 + here->B4SOIve), 3.0, &Check); /* v3.1 added for RF */ vgge = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIgNodeExt), *(ckt->CKTstate0 + here->B4SOIvgge), 3.0, &Check); vggm = B4SOIlimit(*(ckt->CKTrhsOld + here->B4SOIgNodeMid), *(ckt->CKTstate0 + here->B4SOIvggm), 3.0, &Check); /* v3.1 added for RF end */ delTemp = *(ckt->CKTrhsOld + here->B4SOItempNode); vbs = model->B4SOItype * (*(ckt->CKTrhsOld+here->B4SOIbNode) - *(ckt->CKTrhsOld+here->B4SOIsNodePrime)); vps = model->B4SOItype * (vp - vs); vgs = model->B4SOItype * (vg - vs); ves = model->B4SOItype * (ve - vs); vds = model->B4SOItype * (vd - vs); vges = model->B4SOItype * (vgge - vs); /* v3.1 */ vgms = model->B4SOItype * (vggm - vs); /* v3.1 */ /* v4.0 */ vdbs = model->B4SOItype * (*(ckt->CKTrhsOld + here->B4SOIdbNode) - *(ckt->CKTrhsOld + here->B4SOIsNodePrime)); vsbs = model->B4SOItype * (*(ckt->CKTrhsOld + here->B4SOIsbNode) - *(ckt->CKTrhsOld + here->B4SOIsNodePrime)); vses = model->B4SOItype * (*(ckt->CKTrhsOld + here->B4SOIsNode) - *(ckt->CKTrhsOld + here->B4SOIsNodePrime)); vdes = model->B4SOItype * (*(ckt->CKTrhsOld + here->B4SOIdNode) - *(ckt->CKTrhsOld + here->B4SOIsNodePrime)); /* v4.0 end */ #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vdbd = vdbs - vds; /* v4.0 */ vgd = vgs - vds; ved = ves - vds; vgdo = *(ckt->CKTstate0 + here->B4SOIvgs) - *(ckt->CKTstate0 + here->B4SOIvds); vedo = *(ckt->CKTstate0 + here->B4SOIves) - *(ckt->CKTstate0 + here->B4SOIvds); /* v3.1 for RF */ vgedo = *(ckt->CKTstate0 + here->B4SOIvges) - *(ckt->CKTstate0 + here->B4SOIvds); vgmdo = *(ckt->CKTstate0 + here->B4SOIvgms) - *(ckt->CKTstate0 + here->B4SOIvds); vged = vges - vds; vgmd = vgms - vds; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; /* v3.1 for RF end*/ delvbs = vbs - *(ckt->CKTstate0 + here->B4SOIvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B4SOIvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B4SOIvgs); delves = ves - *(ckt->CKTstate0 + here->B4SOIves); delvps = vps - *(ckt->CKTstate0 + here->B4SOIvps); deldelTemp = delTemp - *(ckt->CKTstate0 + here->B4SOIdeltemp); delvds = vds - *(ckt->CKTstate0 + here->B4SOIvds); delvgd = vgd - vgdo; delved = ved - vedo; delvges = vges - *(ckt->CKTstate0 + here->B4SOIvges); /* v3.1 */ delvgms = vgms - *(ckt->CKTstate0 + here->B4SOIvgms); /* v3.1 */ delvdbd = vdbd - *(ckt->CKTstate0 + here->B4SOIvdbd); /* v4.0 */ delvdbs = vdbs - *(ckt->CKTstate0 + here->B4SOIvdbs); /* v4.0 */ delvsbs = vsbs - *(ckt->CKTstate0 + here->B4SOIvsbs); /* v4.0 */ delvbd_jct = (!here->B4SOIrbodyMod) ? delvbd : delvdbd; /*v4.0*/ delvbs_jct = (!here->B4SOIrbodyMod) ? delvbs : delvsbs; /*v4.0*/ delvses = vses - *(ckt->CKTstate0 + here->B4SOIvses);/*v4.0*/ vdedo = *(ckt->CKTstate0 + here->B4SOIvdes) - *(ckt->CKTstate0 + here->B4SOIvds); /* v4.0 */ delvdes = vdes - *(ckt->CKTstate0 + here->B4SOIvdes); /* v4.0 */ delvded = vdes - vds - vdedo; /* v4.0 */ if (here->B4SOImode >= 0) { cdhat = here->B4SOIcd + (here->B4SOIgm-here->B4SOIgjdg) * delvgs + (here->B4SOIgds - here->B4SOIgjdd) * delvds + (here->B4SOIgmbs * delvbs - here->B4SOIgjdb * delvbs_jct ) /* v4.0 */ + (here->B4SOIgme - here->B4SOIgjde) * delves + (here->B4SOIgmT - here->B4SOIgjdT) * deldelTemp; /* v3.0 */ } else { cdhat = here->B4SOIcd + (here->B4SOIgm-here->B4SOIgjdg) * delvgd - (here->B4SOIgds - here->B4SOIgjdd) * delvds + (here->B4SOIgmbs * delvbd - here->B4SOIgjdb * delvbd_jct ) /*v4.0 */ + (here->B4SOIgme - here->B4SOIgjde) * delved + (here->B4SOIgmT - here->B4SOIgjdT) * deldelTemp; /* v3.0 */ } cbhat = here->B4SOIcb + here->B4SOIgbgs * delvgs + here->B4SOIgbbs * delvbs + here->B4SOIgbds * delvds + here->B4SOIgbes * delves + here->B4SOIgbps * delvps + here->B4SOIgbT * deldelTemp; /* v3.0 */ Isestot = here->B4SOIgstot * (*(ckt->CKTstate0 + here->B4SOIvses)); cseshat = Isestot + here->B4SOIgstot * delvses + here->B4SOIgstotd * delvds + here->B4SOIgstotg * delvgs + here->B4SOIgstotb * delvbs; Idedtot = here->B4SOIgdtot * vdedo; cdedhat = Idedtot + here->B4SOIgdtot * delvded + here->B4SOIgdtotd * delvds + here->B4SOIgdtotg * delvgs + here->B4SOIgdtotb * delvbs; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) && Check == 0) if ((here->B4SOIsoiMod == 2) || /* v3.2 */ (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B4SOIvbs))) + ckt->CKTvoltTol)) ) if ((here->B4SOIsoiMod == 2) || /* v3.2 */ (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B4SOIvbd))) + ckt->CKTvoltTol)) ) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B4SOIvgs))) + ckt->CKTvoltTol))) if ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B4SOIves))) + ckt->CKTvoltTol))) if ( (here->B4SOIbodyMod == 0) || (here->B4SOIbodyMod == 2) || (fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B4SOIvps))) + ckt->CKTvoltTol)) ) if ( (here->B4SOItempNode == 0) || (fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B4SOIdeltemp))) + ckt->CKTvoltTol*1e4))) /* v3.1 added for RF */ if ((here->B4SOIrgateMod == 0) || (here->B4SOIrgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->B4SOIvges))) + ckt->CKTvoltTol))) if ((here->B4SOIrgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->B4SOIvgms))) + ckt->CKTvoltTol))) /* v3.1 added for RF end */ /* v4.0 */ if ((!here->B4SOIrbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->B4SOIvdbs))) + ckt->CKTvoltTol))) if ((!here->B4SOIrbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->B4SOIvdbd))) + ckt->CKTvoltTol))) if ((!here->B4SOIrbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->B4SOIvsbs))) + ckt->CKTvoltTol))) if ((!model->B4SOIrdsMod) || (fabs(delvses) < (ckt->CKTreltol * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->B4SOIvses))) + ckt->CKTvoltTol))) if ((!model->B4SOIrdsMod) || (fabs(delvdes) < (ckt->CKTreltol * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->B4SOIvdes))) + ckt->CKTvoltTol))) if ((!model->B4SOIrdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) if ((!model->B4SOIrdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) /* v4.0 end */ if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B4SOIvds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->B4SOIcd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->B4SOIcd)) + ckt->CKTabstol)) if ((here->B4SOIsoiMod == 2) || /* v3.2 */ (fabs(cbhat - here->B4SOIcb) < ckt->CKTreltol * MAX(fabs(cbhat),fabs(here->B4SOIcb)) + ckt->CKTabstol) ) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B4SOIvbs); vbd = *(ckt->CKTstate0 + here->B4SOIvbd); vgs = *(ckt->CKTstate0 + here->B4SOIvgs); ves = *(ckt->CKTstate0 + here->B4SOIves); vps = *(ckt->CKTstate0 + here->B4SOIvps); vds = *(ckt->CKTstate0 + here->B4SOIvds); /* v3.1 added for RF */ vges = *(ckt->CKTstate0 + here->B4SOIvges); vgms = *(ckt->CKTstate0 + here->B4SOIvgms); vged = vges - vds; vgmd = vgms - vds; vgme = vgms - ves; /* v3.1 added for RF end */ vgmb = vgms - vbs; /* v3.2 bug fix */ /* v4.0 */ vdbs = *(ckt->CKTstate0 + here->B4SOIvdbs); vdbd = *(ckt->CKTstate0 + here->B4SOIvdbd); vsbs = *(ckt->CKTstate0 + here->B4SOIvsbs); vbs_jct = (!here->B4SOIrbodyMod) ? vbs : vsbs; vbd_jct = (!here->B4SOIrbodyMod) ? vbd : vdbd; vses = *(ckt->CKTstate0 + here->B4SOIvses); vdes = *(ckt->CKTstate0 + here->B4SOIvdes); /* v4.0 end */ delTemp = *(ckt->CKTstate0 + here->B4SOIdeltemp); /* calculate Vds for temperature conductance calculation in bypass (used later when filling Temp node matrix) */ Vds = here->B4SOImode > 0 ? vds : -vds; vgd = vgs - vds; vgb = vgs - vbs; veb = ves - vbs; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = here->B4SOIvon; if (*(ckt->CKTstate0 + here->B4SOIvds) >= 0.0) { T0 = *(ckt->CKTstate0 + here->B4SOIvbs); /* v3.1 added for RF */ if (here->B4SOIrgateMod == 3) { vged = vges - vds; vgmd = vgms - vds; } else if ((here->B4SOIrgateMod == 1) || (here->B4SOIrgateMod == 2)) { vged = vges - vds; } /* v3.1 added for RF end*/ } else { T0 = *(ckt->CKTstate0 + here->B4SOIvbd); /* added for RF */ if (here->B4SOIrgateMod == 3) { vges = vged + vds; vgms = vgmd + vds; } if ((here->B4SOIrgateMod == 1) || (here->B4SOIrgateMod == 2)) { vges = vged + vds; } /* added for RF end*/ } if (vds >= 0.0) { vbs = B4SOIlimit(vbs, T0, 0.2, &Check); vbd = vbs - vds; vb = model->B4SOItype * vbs + vs; if (here->B4SOIrbodyMod) /* v4.0 */ { vdbs = B4SOIlimit(vdbs, *(ckt->CKTstate0 + here->B4SOIvdbs), 0.2, &Check); vdbd = vdbs - vds; vsbs = B4SOIlimit(vsbs, *(ckt->CKTstate0 + here->B4SOIvsbs), 0.2, &Check); } } else { vbd = B4SOIlimit(vbd, T0, 0.2, &Check); vbs = vbd + vds; vb = model->B4SOItype * vbs + vd; /* v4.0 */ if (here->B4SOIrbodyMod) { vdbd = B4SOIlimit(vdbd, *(ckt->CKTstate0 + here->B4SOIvdbd), 0.2, &Check); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->B4SOIvsbs) - *(ckt->CKTstate0 + here->B4SOIvds); vsbd = vsbs - vds; vsbd = B4SOIlimit(vsbd, vsbdo, 0.2, &Check); vsbs = vsbd + vds; } /* v4.0 end */ } delTemp =B4SOIlimit(delTemp, *(ckt->CKTstate0 + here->B4SOIdeltemp),5.0,&Check); } if(model->B4SOImtrlMod) { epsrox = 3.9; toxe = model->B4SOIeot; epssub = EPS0 * model->B4SOIepsrsub; /* bugfix following constants should be replaced with model params -Tanvir */ eggbcp2 = 1.12; eggdep = 1.12; agb1 = 3.7622e-7; bgb1 = -3.1051e10; agb2 = 4.9758e-7; bgb2 = -2.357e10; agbc2n = 3.42537e-7; agbc2p = 4.97232e-7; bgbc2n = 1.16645e12; bgbc2p = 7.45669e11; } else { epsrox = model->B4SOIepsrox; toxe = model->B4SOItox; epssub = EPSSI; /* bugfix v4.3.1 following constants are valid for mtrlMod=0 -Tanvir */ eggbcp2 = 1.12; eggdep = 1.12; agb1 = 3.7622e-7; bgb1 = -3.1051e10; agb2 = 4.9758e-7; bgb2 = -2.357e10; agbc2n = 3.42537e-7; agbc2p = 4.97232e-7; bgbc2n = 1.16645e12; bgbc2p = 7.45669e11; } /* Calculate temperature dependent values for self-heating effect */ Temp = delTemp + ckt->CKTtemp; dTempRatio_dT = 1 / model->B4SOItnom; TempRatio = Temp * dTempRatio_dT; here->B4SOITempSH = Temp; /*v4.2 added for portability of SH Temp */ dEg_dT = 0.0; /* new line Wagner */ Vtm00= 0.026; /* v4.3.1 Vtm00 replaces hardcoded 0.026 -Tanvir */ if (selfheat) { if(model->B4SOImtrlMod==0) { Vtm = KboQ * Temp; T0 = 1108.0 + Temp; T5 = Temp * Temp; Eg = 1.16 - 7.02e-4 * T5 / T0; dEg_dT = T1 = ((7.02e-4 * T5) - T0 * (14.04e-4 * Temp)) / T0 / T0; /* enhanced line Wagner */ /* T1 = dEg / dT */ T2 = 1.9230584e-4; /* T2 = 1 / 300.15^(3/2) */ T5 = sqrt(Temp); T3 = 1.45e10 * Temp * T5 * T2; T4 = exp(21.5565981 - Eg / (2.0 * Vtm)); ni = T3 * T4; dni_dT = 2.175e10 * T2 * T5 * T4 + T3 * T4 * (-Vtm * T1 + Eg * KboQ) / (2.0 * Vtm * Vtm); T0 = log(1.0e20 * pParam->B4SOInpeak / (ni * ni)); vbi = Vtm * T0; dvbi_dT = KboQ * T0 + Vtm * (-2.0 * dni_dT / ni); } else { Tnom = model->B4SOItnom; Vtm = KboQ * Temp; Vtm0= KboQ * Tnom; Eg0 = model->B4SOIeg0; T0 = model->B4SOItbgbsub + Temp; T5 = Temp * Temp; Eg = model->B4SOIbg0sub - model->B4SOItbgasub * Temp * Temp / (Temp + model->B4SOItbgbsub); dEg_dT = T1 = ((model->B4SOItbgasub * T5) - T0 * (2.0*model->B4SOItbgasub * Temp)) / T0 / T0; /* enhanced line Wagner */ /* T1 = dEg / dT */ T2 = 1/sqrt(Tnom*Tnom*Tnom); T5 = sqrt(Temp); T3 = model->B4SOIni0sub * Temp * T5 * T2; T4 = exp(Eg0/(2.0*Vtm0) - Eg / (2.0 * Vtm)); ni = T3 * T4; dni_dT=1.5*model->B4SOIni0sub*T5*T2*T4+ T3*T4*(-Vtm * T1 + Eg * KboQ) / (2.0 * Vtm * Vtm); T0 = log(1.0e20 * pParam->B4SOInpeak / (ni * ni)); vbi = Vtm * T0; dvbi_dT = KboQ * T0 + Vtm * (-2.0 * dni_dT / ni); } if (pParam->B4SOInsub > 0) { T0 = log(pParam->B4SOInpeak / pParam->B4SOInsub); vfbb = -model->B4SOItype * Vtm * T0; dvfbb_dT = -model->B4SOItype * KboQ * T0; } else { T0 = log(-pParam->B4SOInpeak * pParam->B4SOInsub / ni / ni); vfbb = -model->B4SOItype * Vtm * T0; dvfbb_dT = -model->B4SOItype * (KboQ * T0 - Vtm * 2.0 * dni_dT / ni); } /* V4.0 changed phi */ phi = 2.0 * Vtm * log(pParam->B4SOInpeak / ni); /* phi = here->B4SOIphi; */ sqrtPhi = sqrt(phi); Xdep0 = sqrt(2.0 * epssub / (Charge_q * pParam->B4SOInpeak * 1.0e6)) * sqrtPhi; /* v4.1 SH bug fix */ /* dphi_dT = phi / Vtm * KboQ; v4.2 Temp Derivative bug fix */ dphi_dT = phi / Vtm * KboQ - 2.0 * Vtm * dni_dT / ni; dsqrtPhi_dT = 0.5 / sqrtPhi * dphi_dT; dXdep0_dT = Xdep0 / sqrtPhi * dsqrtPhi_dT; /* cdep0 = sqrt(Charge_q * EPSSI * pParam->B4SOInpeak * 1.0e6 / 2.0) / sqrtPhi; */ /* Bug fix #2 Jun 09 Body type is generalized for mtrlMod 1*/ cdep0 = sqrt(Charge_q * epssub /* Fix */ * pParam->B4SOInpeak * 1.0e6 / 2.0) / sqrtPhi; /* fix LHS name - Wagner */ /*dcep0_dT = cdep0 * sqrtPhi * (-1.0) / phi * dsqrtPhi_dT; */ dcdep0_dT = cdep0 * sqrtPhi * (-1.0) / phi * dsqrtPhi_dT; /* T1 = sqrt(EPSSI / (model->B4SOIepsrox * EPSOX / 3.9) Bug fix #3 Jun 09 Body type is generalized for mtrlMod 1*/ /* * model->B4SOItox * Xdep0); */ T1 = sqrt(epssub / (epsrox * EPS0) /* Fix */ * toxe * Xdep0); dT1_dT = 0.5 * T1 / Xdep0 * dXdep0_dT; T0 = exp(-0.5 * pParam->B4SOIdsub * pParam->B4SOIleff / T1); dT0_dT = T0 * 0.5 * pParam->B4SOIdsub * pParam->B4SOIleff / T1 / T1 * dT1_dT; theta0vb0 = (T0 + 2.0 * T0 * T0); dtheta0vb0_dT = (1.0 + 4.0 * T0) * dT0_dT; T0 = exp(-0.5 * pParam->B4SOIdrout * pParam->B4SOIleff / T1); dT0_dT = T0 * 0.5 * pParam->B4SOIdrout * pParam->B4SOIleff / T1 / T1 * dT1_dT; T2 = (T0 + 2.0 * T0 * T0); thetaRout = pParam->B4SOIpdibl1 * T2 + pParam->B4SOIpdibl2; dthetaRout_dT = pParam->B4SOIpdibl1 * (1.0 + 4.0 * T0) * dT0_dT; /* Save the values below for phi calculation in B4SOIaccept() */ here->B4SOIvtm = Vtm; /* here->B4SOIni = ni; v4.2 bugfix never used in the code */ T3 = TempRatio - 1.0; T8 = 1/ model->B4SOItnom; T4 = Eg300 / Vtm * T3; dT4_dT = Eg300 / Vtm / Vtm * (Vtm * T8 - T3 * KboQ); T7 = pParam->B4SOIxbjt * T4 / pParam->B4SOIndiode; dT7_dT = pParam->B4SOIxbjt * dT4_dT / pParam->B4SOIndiode; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; if (pParam->B4SOIxbjt == pParam->B4SOIxdif) { T1 = T0; dT1_dT = dT0_dT; } else { T7 = pParam->B4SOIxdif * T4 / pParam->B4SOIndiode; dT7_dT = pParam->B4SOIxdif * dT4_dT / pParam->B4SOIndiode; DEXP(T7, T1, dT1_dT7); dT1_dT = dT1_dT7 * dT7_dT; } T7 = pParam->B4SOIxrec * T4 / pParam->B4SOInrecf0; dT7_dT = pParam->B4SOIxrec * dT4_dT / pParam->B4SOInrecf0; DEXP(T7, T2, dT2_dT7); dT2_dT = dT2_dT7 * dT7_dT; /* high level injection */ Ahlis = pParam->B4SOIahli * T0; dAhlis_dT = pParam->B4SOIahli * dT0_dT; jbjts = pParam->B4SOIisbjt * T0; jdifs = pParam->B4SOIisdif * T1; jrecs = pParam->B4SOIisrec * T2; djbjts_dT = pParam->B4SOIisbjt * dT0_dT; djdifs_dT = pParam->B4SOIisdif * dT1_dT; djrecs_dT = pParam->B4SOIisrec * dT2_dT; T7 = pParam->B4SOIxtun * T3; dT7_dT = pParam->B4SOIxtun * T8; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; jtuns = pParam->B4SOIistun * T0; djtuns_dT = pParam->B4SOIistun * dT0_dT; /* drain side */ T7 = pParam->B4SOIxbjt * T4 / pParam->B4SOIndioded; dT7_dT = pParam->B4SOIxbjt * dT4_dT / pParam->B4SOIndioded; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; if (pParam->B4SOIxbjt == pParam->B4SOIxdifd) { T1 = T0; dT1_dT = dT0_dT; } else { T7 = pParam->B4SOIxdifd * T4 / pParam->B4SOIndioded; dT7_dT = pParam->B4SOIxdifd * dT4_dT / pParam->B4SOIndioded; DEXP(T7, T1, dT1_dT7); dT1_dT = dT1_dT7 * dT7_dT; } T7 = pParam->B4SOIxrecd * T4 / pParam->B4SOInrecf0d; dT7_dT = pParam->B4SOIxrecd * dT4_dT / pParam->B4SOInrecf0d; DEXP(T7, T2, dT2_dT7); dT2_dT = dT2_dT7 * dT7_dT; /* high level injection */ Ahlid = pParam->B4SOIahlid * T0; dAhlid_dT = pParam->B4SOIahlid * dT0_dT; jbjtd = pParam->B4SOIidbjt * T0; jdifd = pParam->B4SOIiddif * T1; jrecd = pParam->B4SOIidrec * T2; djbjtd_dT = pParam->B4SOIidbjt * dT0_dT; djdifd_dT = pParam->B4SOIiddif * dT1_dT; djrecd_dT = pParam->B4SOIidrec * dT2_dT; T7 = pParam->B4SOIxtund * T3; dT7_dT = pParam->B4SOIxtund * T8; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; jtund = pParam->B4SOIidtun * T0; djtund_dT = pParam->B4SOIidtun * dT0_dT; u0temp = pParam->B4SOIu0 * pow(TempRatio, pParam->B4SOIute); du0temp_dT = pParam->B4SOIu0 * pParam->B4SOIute * pow(TempRatio, pParam->B4SOIute - 1.0) * T8; ku0temp = pParam->B4SOIku0 * (1.0 /* + model->B4SOItku0 * TempRatio) + DELTA; v4.2 bugfix */ + model->B4SOItku0 * T3) + DELTA; dku0temp_dT = pParam->B4SOIku0 * model->B4SOItku0 * T8; T2 = ku0temp * ku0temp; T7 = model->B4SOIku0 * pParam->B4SOIinv_od_ref; rho_ref = T7 / ku0temp; drho_ref_dT = -T7 / T2 * dku0temp_dT; T4 = model->B4SOIku0 * here->B4SOIInv_ODeff; rho = T4 / ku0temp; drho_dT = -T4 / T2 * dku0temp_dT; T2 = (1.0 + rho); T7 = (1.0 + rho_ref); T0 = T2 / T7; dT0_dT = (drho_dT * T7 - drho_ref_dT * T2 ) / T7 / T7; du0temp_dT = T0 * du0temp_dT + u0temp * dT0_dT; u0temp *= T0; vsattemp = pParam->B4SOIvsat - pParam->B4SOIat * T3; dvsattemp_dT = -pParam->B4SOIat * T8; T2 = (1.0 + here->B4SOIkvsat * rho); T7 = (1.0 + here->B4SOIkvsat * rho_ref); T0 = T2 / T7; dT0_dT = (here->B4SOIkvsat * drho_dT * T7 - here->B4SOIkvsat * drho_ref_dT * T2) / T7 / T7; dvsattemp_dT = dvsattemp_dT * T0 + vsattemp * dT0_dT; vsattemp *= T0; here->B4SOIvsattemp = vsattemp; if (!model->B4SOIrdsMod) { rds0 = (pParam->B4SOIrdsw + pParam->B4SOIprt * T3) / pParam->B4SOIrds0denom; drds0_dT = pParam->B4SOIprt / pParam->B4SOIrds0denom * T8; } else { /* v4.0 */ PowWeffWr = pParam->B4SOIrds0denom * here->B4SOInf; T10 = pParam->B4SOIprt * T3; /* External Rd(V) */ T1 = pParam->B4SOIrdw + T10; T2 = model->B4SOIrdwmin + T10; rd0 = T1 / PowWeffWr; rdwmin = T2 / PowWeffWr; drd0_dT = pParam->B4SOIprt / PowWeffWr * T8; drdwmin_dT = drd0_dT; /* External Rs(V) */ T7 = pParam->B4SOIrsw + T10; T4 = model->B4SOIrswmin + T10; rs0 = T7 / PowWeffWr; rswmin = T4 / PowWeffWr; drs0_dT = drswmin_dT = drd0_dT; } ua = pParam->B4SOIuatemp + pParam->B4SOIua1 * T3; ub = pParam->B4SOIubtemp + pParam->B4SOIub1 * T3; uc = pParam->B4SOIuctemp + pParam->B4SOIuc1 * T3; dua_dT = pParam->B4SOIua1 * T8; dub_dT = pParam->B4SOIub1 * T8; duc_dT = pParam->B4SOIuc1 * T8; } else { vbi = pParam->B4SOIvbi; vfbb = pParam->B4SOIvfbb; phi = pParam->B4SOIphi; sqrtPhi = pParam->B4SOIsqrtPhi; Xdep0 = pParam->B4SOIXdep0; /* Eg = model->B4SOIeg0; */ /* Bug fix #11 Jun 09 'Eg is evaluated at Temp, not Tnom' */ Eg = model->B4SOIeg; /* 'model->B4SOIeg' computed in b4soitemp.c */ /* v4.1 */ /* Since selfheat=0, using Eg from b4soitemp.c*/ cdep0 = pParam->B4SOIcdep0; theta0vb0 = pParam->B4SOItheta0vb0; thetaRout = pParam->B4SOIthetaRout; jbjts = pParam->B4SOIjbjts; /* v4.0 */ jbjtd = pParam->B4SOIjbjtd; jdifs = pParam->B4SOIjdifs; jdifd = pParam->B4SOIjdifd; jrecs = pParam->B4SOIjrecs; jrecd = pParam->B4SOIjrecd; jtuns = pParam->B4SOIjtuns; jtund = pParam->B4SOIjtund; /* v2.2.2 bug fix */ Ahlis = pParam->B4SOIahli0s; Ahlid = pParam->B4SOIahli0d; u0temp = here->B4SOIu0temp; vsattemp = here->B4SOIvsattemp; ua = pParam->B4SOIua; ub = pParam->B4SOIub; uc = pParam->B4SOIuc; dni_dT = dvbi_dT = dvfbb_dT = 0.0; djbjts_dT = djdifs_dT = djrecs_dT = djtuns_dT = 0.0; djbjtd_dT = djdifd_dT = djrecd_dT = djtund_dT = 0.0; du0temp_dT = dvsattemp_dT = 0.0; dua_dT = dub_dT = duc_dT = 0.0; /* v4.1 */ dphi_dT = dsqrtPhi_dT = dXdep0_dT = 0.0; dcdep0_dT = dtheta0vb0_dT = dthetaRout_dT = 0.0; if (!model->B4SOIrdsMod) { rds0 = pParam->B4SOIrds0; drds0_dT = 0.0; } else { rd0 = pParam->B4SOIrd0; rs0 = pParam->B4SOIrs0; rdwmin = pParam->B4SOIrdwmin; rswmin = pParam->B4SOIrswmin; drd0_dT = drs0_dT = drdwmin_dT = drswmin_dT = 0.0; } dAhlis_dT = dAhlid_dT = 0; } /* TempRatio used for Vth and mobility */ if (selfheat) { TempRatioMinus1 = Temp / model->B4SOItnom - 1.0; } else { TempRatioMinus1 = ckt->CKTtemp / model->B4SOItnom - 1.0; } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; ved = ves - vds; veb = ves - vbs; vge = vgs - ves; vpd = vps - vds; vgp = vgs - vps; /* v3.1 added for RF */ vged = vges - vds; vgmd = vgms - vds; vgme = vgms - ves; /* v3.1 added for RF end */ vgmb = vgms - vbs; /* v3.2 bug fix */ agidl = pParam->B4SOIagidl; bgidl = pParam->B4SOIbgidl; cgidl = pParam->B4SOIcgidl; egidl = pParam->B4SOIegidl; rgidl = pParam->B4SOIrgidl; kgidl = pParam->B4SOIkgidl; fgidl = pParam->B4SOIfgidl; agisl = pParam->B4SOIagisl; bgisl = pParam->B4SOIbgisl; cgisl = pParam->B4SOIcgisl; egisl = pParam->B4SOIegisl; rgisl = pParam->B4SOIrgisl; kgisl = pParam->B4SOIkgisl; fgisl = pParam->B4SOIfgisl; if (vds >= 0.0) { /* normal mode */ here->B4SOImode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vbd = vbd; Ves = ves; Vps = vps; Vsbs = vsbs; /* v4.0 */ Vdbs = vdbs; /* v4.0 */ Vdbd = Vdbs - Vds; /* v4.0 */ Vgd = vgd; /* v4.1 */ wdios = pParam->B4SOIwdios; wdiod = pParam->B4SOIwdiod; ndiode = pParam->B4SOIndiode; /* v4.2 bugfix*/ ndioded = pParam->B4SOIndioded; /* v4.2 bugfix*/ nrecf0s = pParam->B4SOInrecf0; /* bugfix_snps start for junction DC part*/ nrecf0d = pParam->B4SOInrecf0d; nrecr0s = pParam->B4SOInrecr0; nrecr0d = pParam->B4SOInrecr0d; vrec0s = pParam->B4SOIvrec0; vrec0d = pParam->B4SOIvrec0d; ntuns = pParam->B4SOIntun; ntund = pParam->B4SOIntund; vtun0s = pParam->B4SOIvtun0; vtun0d = pParam->B4SOIvtun0d; /* bugfix_snps end for junction DC part*/ } else { /* inverse mode */ here->B4SOImode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vbd = vbs; Ves = ved; Vps = vpd; Vsbs = vdbd; /* v4.0 */ Vdbd = vsbs; /* v4.0 */ Vdbs = Vdbd + Vds; /* v4.0 */ Vgd = vgs; /* v4.1 */ wdios = pParam->B4SOIwdiod; wdiod = pParam->B4SOIwdios; ndiode = pParam->B4SOIndioded; /* v4.2 bugfix*/ ndioded = pParam->B4SOIndiode; /* v4.2 bugfix*/ nrecf0s = pParam->B4SOInrecf0d; /* bugfix_snps start for junction DC part*/ nrecf0d = pParam->B4SOInrecf0; nrecr0s = pParam->B4SOInrecr0d; nrecr0d = pParam->B4SOInrecr0; vrec0s = pParam->B4SOIvrec0d; vrec0d = pParam->B4SOIvrec0; ntuns = pParam->B4SOIntund; ntund = pParam->B4SOIntun; vtun0s = pParam->B4SOIvtun0d; vtun0d = pParam->B4SOIvtun0; /* bugfix_snps end for junction DC part*/ } if( vds < 0.0) {/*Diode current*/ T0 = jbjts; T1 = djbjts_dT; jbjts = jbjtd; djbjts_dT = djbjtd_dT; jbjtd = T0; djbjtd_dT = T1; T0 = jdifs; T1 = djdifs_dT; jdifs = jdifd; djdifs_dT = djdifd_dT; jdifd = T0; djdifd_dT = T1; T0 = jrecs; T1 = djrecs_dT; jrecs = jrecd; djrecs_dT = djrecd_dT; jrecd = T0; djrecd_dT = T1; T0 = jtuns; T1 = djtuns_dT; jtuns = jtund; djtuns_dT = djtund_dT; jtund = T0; djtund_dT = T1; /*GISL/GIDL*/ T0 = agidl; agidl = agisl; agisl = T0; T0 = bgidl; bgidl = bgisl; bgisl = T0; T0 = cgidl; cgidl = cgisl; cgisl = T0; T0 = egidl; egidl = egisl; egisl = T0; T0 = rgidl; rgidl = rgisl; rgisl = T0; T0 = kgidl; kgidl = kgisl; kgisl = T0; T0 = fgidl; fgidl = fgisl; fgisl = T0; T0 = Ahlis; /* bugfix_snps */ Ahlis = Ahlid; /* bugfix_snps */ Ahlid = T0; /* bugfix_snps */ T0 = dAhlis_dT; /* bugfix_snps */ dAhlis_dT = dAhlid_dT; /* bugfix_snps */ dAhlid_dT = T0; /* bugfix_snps */ } vbs_jct = (!here->B4SOIrbodyMod) ? Vbs : Vsbs; /* v4.0 */ vbd_jct = (!here->B4SOIrbodyMod) ? Vbd : Vdbd; /* v4.0 */ Vesfb = Ves - vfbb; Cbox = model->B4SOIcbox; K1 = pParam->B4SOIk1eff; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; if (here->B4SOIdebugMod <0) ChargeComputationNeeded = 1; #ifdef B4SOI_DEBUG_OUT ChargeComputationNeeded = 1; here->B4SOIdebug1 = 0.0; here->B4SOIdebug2 = 0.0; here->B4SOIdebug3 = 0.0; #endif /* Poly Gate Si Depletion Effect */ T0 = here->B4SOIvfb + phi; if (model->B4SOImtrlMod==0) epsgate = epssub; else epsgate = model->B4SOIepsrgate * EPS0; if ((pParam->B4SOIngate > 1.e18) && (pParam->B4SOIngate < 1.e25) && (Vgs > T0)&& (epsgate!=0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * epsgate * pParam->B4SOIngate / (model->B4SOIcox * model->B4SOIcox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ /* T7 = 1.12 - T3 - 0.05; */ T7 = eggdep - T3 - 0.05; /* bugfix: v4.3.1 -Tanvir */ T6 = sqrt(T7 * T7 + 0.224); /* T5 = 1.12 - 0.5 * (T7 + T6); */ T5 = eggdep - 0.5 * (T7 + T6); /* bugfix: v4.3.1 -Tanvir */ Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); /* 7 new lines Wagner */ if (selfheat) { dTL2_dT = - dphi_dT / T4; dTL3_dT = T2 * dTL2_dT / T1; dTL6_dT = - T7 * dTL3_dT / T6; dVgs_eff_dT = 0.5 * (dTL6_dT - dTL3_dT); } else dVgs_eff_dT = 0.0; } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; dVgs_eff_dT = 0.0; /* new line Wagner */ } if ((pParam->B4SOIngate > 1.e18) && (pParam->B4SOIngate < 1.e25)/* Bug fix # 25/26 Vgd_eff defined */ && (Vgd > T0)&& (epsgate!=0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * epsgate * pParam->B4SOIngate / (model->B4SOIcox * model->B4SOIcox); T4 = sqrt(1.0 + 2.0 * (Vgd - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ /* T7 = 1.12 - T3 - 0.05; */ T7 = eggdep - T3 - 0.05; /* bugfix: v4.3.1 -Tanvir */ T6 = sqrt(T7 * T7 + 0.224); /* T5 = 1.12 - 0.5 * (T7 + T6); */ T5 = eggdep - 0.5 * (T7 + T6); /* bugfix: v4.3.1 -Tanvir */ Vgd_eff = Vgd - T5; dVgd_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); /* 7 new lines Wagner */ if (selfheat) { dTL2_dT = - dphi_dT / T4; dTL3_dT = T2 * dTL2_dT / T1; dTL6_dT = - T7 * dTL3_dT / T6; dVgd_eff_dT = 0.5 * (dTL6_dT - dTL3_dT); } else dVgd_eff_dT = 0.0; } else { Vgd_eff = Vgd; dVgd_eff_dVg = 1.0; dVgd_eff_dT = 0.0; /* new line Wagner */ } /* if( here->B4SOImode != 1){ T1=Vgs_eff; Vgs_eff=Vgd_eff; Vgd_eff=T1; T2=dVgs_eff_dVg; dVgs_eff_dVg=dVgd_eff_dVg; dVgd_eff_dVg=T2; } */ /* v4.1 for improved BT charge model, no poly depletion */ Vgs_eff2 = Vgs; dVgs_eff2_dVg = 1.0; /* end v4.1 for improved BT charge model */ Leff = pParam->B4SOIleff; if (selfheat) { Vtm = KboQ * Temp; dVtm_dT = KboQ; } else { Vtm = model->B4SOIvtm; dVtm_dT = 0.0; } V0 = vbi - phi; /* begin of v3.0 block addition */ /* B/S built-in potential lowering calculation */ if (here->B4SOIsoiMod == 0) /* BSIMPD */ /* v3.2 */ { Vbsmos = Vbs; dVbsmos_dVg = 0.0; dVbsmos_dVd = 0.0; dVbsmos_dVb = 1.0; dVbsmos_dVe = 0.0; /* LFW_FD 5 new lines */ dVbs_dVg = 0.0; dVbs_dVd = 0.0; dVbs_dVb = 1.0; dVbs_dVe = 0.0; dVbs_dT = 0.0; if (selfheat) dVbsmos_dT = 0.0; else dVbsmos_dT = 0.0; Vbp = Vbs - Vps; dVbp_dVb = 1; } else /* soiMod = 1 or 2: adding FD module on top of BSIMPD */ { /* prepare Vbs0 & Vbs0mos for VthFD calculation */ if (model->B4SOIfdMod == 0) /* v4.0 */ { T0 = -model->B4SOIdvbd1 * pParam->B4SOIleff / pParam->B4SOIlitl; T1 = model->B4SOIdvbd0 * (exp(0.5*T0) + 2*exp(T0)); T2 = T1 * (vbi - phi); T3 = 0.5 * pParam->B4SOIqsi / model->B4SOIcsi; /* v3.2 */ Vbs0t = phi - T3 + model->B4SOIvbsa + T2; dVbs0t_dVd = 0.0; dVbs0_dVd = 0.0; if (selfheat) /* dVbs0t_dT = T1 * dvbi_dT; */ dVbs0t_dT = (1.0 - T1) * dphi_dT + T1 * dvbi_dT; /* LFW_FD new line */ else dVbs0t_dT = 0.0; T0 = 1 + model->B4SOIcsi / Cbox; T3 = -model->B4SOIdk2b * pParam->B4SOIleff / pParam->B4SOIlitl; T5 = model->B4SOIk2b * (exp(0.5*T3) + 2*exp(T3)); T1 = (model->B4SOIk1b - T5) / T0; T2 = T1 * Vesfb; T4 = 1.0/(1 + Cbox / model->B4SOIcsi); Vbs0 = T4 * Vbs0t + T2; dVbs0_dVe = T1; dVbs0_dVd = 0.0; /* flexilint */ if (selfheat) dVbs0_dT = T4 * dVbs0t_dT - T1 * dvfbb_dT; else dVbs0_dT = 0.0; } else { T0 = 1.0/(model->B4SOIcsi + Cbox + model->B4SOIcdsbs); T1 = -model->B4SOIdvbd1 * pParam->B4SOIleff / pParam->B4SOIlitl; T2 = model->B4SOIdvbd0 * (exp(0.5*T1) + 2*exp(T1)); T3 = T2 * (Vds + model->B4SOIvsce); T4 = 0.5 * pParam->B4SOIqsi / model->B4SOIcsi; T5 = model->B4SOIcsi * T0 * (phi - T4 + model->B4SOIvbsa); T6 = model->B4SOIcdsbs * T0 * T3; Vbs0t = T5 + T6; dVbs0t_dVd = model->B4SOIcdsbs * T0 * T2; if (selfheat) /* dVbs0t_dT = 0.0; LFW_FD changed line */ dVbs0t_dT = model->B4SOIcsi * T0 * dphi_dT; else dVbs0t_dT = 0.0; T7 = Cbox * T0 * Vesfb; Vbs0 = Vbs0t + T7; dVbs0_dVe = Cbox * T0; dVbs0_dVd = dVbs0t_dVd; if (selfheat) dVbs0_dT = dVbs0t_dT - Cbox * T0 * dvfbb_dT; else dVbs0_dT = 0.0; } /* zero field body potential cal. */ T1 = Vbs0t - Vbs0 - 0.005; T2 = sqrt(T1 * T1 + (2.5e-5)); T3 = 0.5 * (T1 + T2); T4 = T3 * model->B4SOIcsi / pParam->B4SOIqsi; /* v3.2 */ Vbs0mos = Vbs0 - 0.5 * T3 * T4; T5 = 0.5 * T4 * (1 + T1 / T2); dVbs0mos_dVe = dVbs0_dVe * (1 + T5); /* dVbs0mos_dVd = dVbs0_dVd + T5 * (dVbs0t_dVd - dVbs0_dVd); LFW_FD */ dVbs0mos_dVd = dVbs0_dVd * (1 + T5) - T5 * dVbs0t_dVd; if (selfheat) dVbs0mos_dT = dVbs0_dT * (1 + T5) - T5 * dVbs0t_dT; else dVbs0mos_dT = 0.0; /* set the upperbound of Vbs0mos to be phi for square root calc. */ T1 = phi - 0.02; T2 = T1 - Vbs0mos - 0.005; T3 = sqrt(T2 * T2 + 4.0 * 0.005); Vbs0mos = T1 - 0.5 * (T2 + T3); T4 = 0.5 * (1 + T2 / T3); dVbs0mos_dVe = T4 * dVbs0mos_dVe; dVbs0mos_dVd = T4 * dVbs0mos_dVd; /* v4.1 */ if (selfheat) /* dVbs0mos_dT = T4 * dVbs0mos_dT; */ dVbs0mos_dT = dphi_dT - T4 * (dphi_dT - dVbs0mos_dT); /* v4.1 */ else dVbs0mos_dT = 0.0; /* VthFD calculation */ Phis = phi - Vbs0mos; /* dPhis_dVb = -1; LFW_FD not used */ sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; /* v4.2 bugfix temp deriv */ if (selfheat) { dPhis_dT = dphi_dT - dVbs0mos_dT; dsqrtPhis_dT = 0.5 / sqrtPhis * dPhis_dT; dXdep_dT = dXdep0_dT * sqrtPhis / sqrtPhi + Xdep0 * (dsqrtPhis_dT * sqrtPhi - sqrtPhis * dsqrtPhi_dT) / phi; } else { dPhis_dT = 0.0; dsqrtPhis_dT = 0.0; dXdep_dT = 0.0; }/* v4.2 bugfix temp deriv */ T3 = sqrt(Xdep); T0 = pParam->B4SOIdvt2 * Vbs0mos; dT3_dT = 1.0 / (2.0 * T3) * dXdep_dT; /* v4.2 bugfix temp deriv */ dT0_dT = pParam->B4SOIdvt2 * dVbs0mos_dT; /* v4.2 bugfix temp deriv */ if (T0 >= - 0.5) { T1 = 1.0 + T0; dT1_dT = dT0_dT; /* v4.2 bugfix temp deriv */ T2 = pParam->B4SOIdvt2 ; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); /* T1 = (1.0 + 3.0 * T0) * T4; */ /* v4.2 bugfix temp deriv */ T5 = 1.0 + 3.0 * T0; /* v4.2 bugfix temp deriv */ T1 = T4 * T5; /* v4.2 bugfix temp deriv */ T2 = pParam->B4SOIdvt2 * T4 * T4 ; dT1_dT = T4 * (3.0 - 8.0 * T5 * T4) * dT0_dT; /* v4.2 bugfix temp deriv */ } lt1 = model->B4SOIfactor1 * T3 * T1; dlt1_dVb =model->B4SOIfactor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); dlt1_dT = model->B4SOIfactor1 * ( dT3_dT * T1+ T3 * dT1_dT); /* v4.2 bugfix temp deriv */ T0 = pParam->B4SOIdvt2w * Vbs0mos; dT0_dT = pParam->B4SOIdvt2w * dVbs0mos_dT; /* v4.2 bugfix temp deriv */ if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B4SOIdvt2w ; dT1_dT = dT0_dT; /* v4.2 bugfix temp deriv */ } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); /* T1 = (1.0 + 3.0 * T0) * T4; */ /* v4.2 bugfix temp deriv */ T5 = 1.0 + 3.0 * T0; /* v4.2 bugfix temp deriv */ T1 = T4 * T5; /* v4.2 bugfix temp deriv */ T2 = pParam->B4SOIdvt2w * T4 * T4 ; dT1_dT=T4*(3.0-8.0*T5*T4)*dT0_dT ; /* v4.2 bugfix temp deriv */ } ltw= model->B4SOIfactor1 * T3 * T1; dltw_dVb=model->B4SOIfactor1*(0.5 / T3 * T1 * dXdep_dVb + T3 * T2); dltw_dT=model->B4SOIfactor1 *( dT3_dT * T1+ T3 *dT1_dT);/* v4.2 bugfix temp deriv */ T0 = -0.5 * pParam->B4SOIdvt1 * Leff / lt1; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; dT1_dT = -T0 / lt1 * T1 * dlt1_dT; /* v4.2 bugfix temp deriv */ dTheta0_dT = (1.0 + 4.0 * T1) * dT1_dT; /* v4.2 bugfix temp deriv */ } else { T1 = MIN_EXPL; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; dTheta0_dT = 0; /* v4.2 bugfix temp deriv */ } T2 = pParam->B4SOInfactor * epssub / Xdep; dT2_dVb = - T2 / Xdep * dXdep_dVb; dT2_dT = - T2 / Xdep * dXdep_dT; /* v4.2 bugfix temp deriv */ /* T3 = pParam->B4SOIcdsc + pParam->B4SOIcdscb * Vbseff + pParam->B4SOIcdscd * Vds;*/ /* v4.1 */ T3 = pParam->B4SOIcdsc + pParam->B4SOIcdscb * Vbs0mos + pParam->B4SOIcdscd * Vds; dT3_dVb = pParam->B4SOIcdscb; dT3_dVd = pParam->B4SOIcdscd; T4 = (T2 + T3 * Theta0 + pParam->B4SOIcit) / model->B4SOIcox; dT4_dVb = (dT2_dVb + Theta0 * dT3_dVb + dTheta0_dVb * T3) / model->B4SOIcox; dT4_dVd = Theta0 * dT3_dVd / model->B4SOIcox; dT4_dT = (dT2_dT + T3 * dTheta0_dT + pParam->B4SOIcdscb * dVbs0mos_dT * Theta0) / model->B4SOIcox; /* v4.2 bugfix temp deriv */ if (T4 >= -0.5) { n = 1.0 + T4; dn_dVb = dT4_dVb; dn_dVd = dT4_dVd; dn_dT = dT4_dT; /* v4.2 bugfix temp deriv */ } else { /* avoid discontinuity problems caused by T4 */ T0 = 1.0 / (3.0 + 8.0 * T4); /*n = (1.0 + 3.0 * T4) * T0;*/ /* v4.2 bugfix temp deriv */ T5 = 1.0 + 3.0 * T4; /* v4.2 bugfix temp deriv */ n = T0 * T5;/* v4.2 bugfix temp deriv */ T0 *= T0; dn_dVb = T0 * dT4_dVb; dn_dVd = T0 * dT4_dVd; dn_dT = T0 * (3.0 - 8.0 * T5 * T0) * dT4_dT; /* v4.2 bugfix temp deriv */ } if (pParam->B4SOIdvtp0 > 0.0) { /* v4.0 */ T0 = -pParam->B4SOIdvtp1 * Vds; if (T0 < -EXPL_THRESHOLD) { T2 = MIN_EXPL; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->B4SOIdvtp1 * T2; } T3 = Leff + pParam->B4SOIdvtp0 * (1.0 + T2); dT3_dVd = pParam->B4SOIdvtp0 * dT2_dVd; T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; DITS_Sft = n * T4; dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; if (selfheat) { /* dDITS_Sft_dT = n * KboQ * log(Leff / T3); *//* v4.2 bugfix temp deriv */ dDITS_Sft_dT = n * KboQ * log(Leff / T3) + dn_dT * T4; /* v4.2 bugfix temp deriv */ } else dDITS_Sft_dT = 0.0; } else { DITS_Sft = dDITS_Sft_dVd = dDITS_Sft_dVb = 0.0; dDITS_Sft_dT = 0.0; } here->B4SOIthetavth = pParam->B4SOIdvt0 * Theta0; Delt_vth = here->B4SOIthetavth * V0; dDelt_vth_dVb = pParam->B4SOIdvt0 * dTheta0_dVb * V0; if (selfheat) /*dDelt_vth_dT = here->B4SOIthetavth * dvbi_dT;*/ /*dDelt_vth_dT = here->B4SOIthetavth * (dvbi_dT - dphi_dT); */ dDelt_vth_dT = pParam->B4SOIdvt0 * (dTheta0_dT * V0 + Theta0 * (dvbi_dT - dphi_dT)); /* v4.2 bugfix temp deriv */ else dDelt_vth_dT = 0.0; T0 = -0.5 * pParam->B4SOIdvt1w * pParam->B4SOIweff * Leff / ltw; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; dT2_dT = -(1.0 + 4.0 * T1) * T1 * T0/ltw * dltw_dT; } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; dT2_dT = 0; } T0 = pParam->B4SOIdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B4SOIdvt0w * dT2_dVb * V0; if (selfheat) /* dDeltVthw_dT = T0 * dvbi_dT; */ /* dDeltVthw_dT = T0 * (dvbi_dT - dphi_dT); v4.1 */ /* v4.2 bugfix temp deriv */ dDeltVthw_dT = T0 * (dvbi_dT - dphi_dT) + pParam->B4SOIdvt0w * dT2_dT * V0; /* v4.2 bugfix temp deriv */ else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B4SOIlpe0 / Leff); T1 = (pParam->B4SOIkt1 + pParam->B4SOIkt1l / Leff + pParam->B4SOIkt2 * Vbs0mos); /* v4.0 */ /* DeltVthtemp = pParam->B4SOIk1eff * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; */ DeltVthtemp = pParam->B4SOIk1ox * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; /* v4.0 end */ if (selfheat) /* dDeltVthtemp_dT = T1 / model->B4SOItnom; */ /* dDeltVthtemp_dT = pParam->B4SOIk1ox * (T0 - 1.0) * dsqrtPhi_dT + T1 / model->B4SOItnom; v4.1 */ /* v4.2 bugfix temp deriv */ dDeltVthtemp_dT = pParam->B4SOIk1ox * (T0 - 1.0) * dsqrtPhi_dT + T1 / model-> B4SOItnom+ pParam->B4SOIkt2 * dVbs0mos_dT* TempRatioMinus1;/* v4.2 bugfix temp deriv */ else dDeltVthtemp_dT = 0.0; tmp2 = toxe * phi / (pParam->B4SOIweff + pParam->B4SOIw0); dtmp2_dT = toxe * dphi_dT / (pParam->B4SOIweff + pParam->B4SOIw0); /* v4.2 bugfix temp deriv */ T3 = here->B4SOIeta0 + pParam->B4SOIetab * Vbs0mos;/*v4.0*/ dT3_dT = pParam->B4SOIetab * dVbs0mos_dT; /*v4.2 temp deriv*/ if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T5 = (2.0e-4 - T3); /*v4.2 temp deriv*/ T3 = T5 * T9; /*(2.0e-4 - T3) * T9;*/ /*v4.2 temp deriv*/ T4 = T9 * T9 * pParam->B4SOIetab; dT3_dVb = T4 ; dT3_dT = (2.0e4 * T5 * T9 * T9 - T9) * dT3_dT; /*v4.2 temp deriv*/ } else { dT3_dVb = pParam->B4SOIetab ; } /* DIBL_Sft = T3 * pParam->B4SOItheta0vb0 * Vds; dDIBL_Sft_dVd = pParam->B4SOItheta0vb0 * T3; dDIBL_Sft_dVb = pParam->B4SOItheta0vb0 * Vds * dT3_dVb; */ /* v4.2 bug fix */ DIBL_Sft = T3 * theta0vb0 * Vds; dDIBL_Sft_dVd = theta0vb0 * T3; dDIBL_Sft_dVb = theta0vb0 * Vds * dT3_dVb; dDIBL_Sft_dT = Vds * (dT3_dT * theta0vb0 + T3 * dtheta0vb0_dT); /* v4.2 bug fix */ Lpe_Vb = sqrt(1.0 + pParam->B4SOIlpeb / Leff); /* 4.1 */ T0 = exp(2.0 * pParam->B4SOIdvtp4 * Vds); DITS_Sft2 = pParam->B4SOIdvtp2factor * (T0-1) / (T0+1); dDITS_Sft2_dVd = pParam->B4SOIdvtp2factor * pParam->B4SOIdvtp4 * 4.0 * T0 / ((T0+1) * (T0+1)); VthFD = model->B4SOItype * here->B4SOIvth0 + (pParam->B4SOIk1ox * sqrtPhis - pParam->B4SOIk1eff * sqrtPhi) * Lpe_Vb - here->B4SOIk2ox * Vbs0mos- Delt_vth - DeltVthw + (pParam->B4SOIk3 + pParam->B4SOIk3b * Vbs0mos) * tmp2 + DeltVthtemp - DIBL_Sft - DITS_Sft - DITS_Sft2; T6 = pParam->B4SOIk3b * tmp2 - here->B4SOIk2ox + pParam->B4SOIkt2 * TempRatioMinus1; dVthFD_dVb = Lpe_Vb * pParam->B4SOIk1ox * dsqrtPhis_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb - dDITS_Sft_dVb; /* v4.0 */ /* this is actually dVth_dVbs0mos */ dVthFD_dVe = dVthFD_dVb * dVbs0mos_dVe; /* dVthFD_dVd = -dDIBL_Sft_dVd -dDITS_Sft_dVd; */ /* v4.0 */ dVthFD_dVd = dVthFD_dVb * dVbs0mos_dVd - dDIBL_Sft_dVd - dDITS_Sft_dVd - dDITS_Sft2_dVd; /* v4.1 */ if (selfheat) /* dVthFD_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT + dVthFD_dVb * dVbs0mos_dT - dDITS_Sft_dT ; */ /* dVthFD_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT + dVthFD_dVb * dVbs0mos_dT - dDITS_Sft_dT + Lpe_Vb * ( pParam->B4SOIk1ox * 0.5 / sqrtPhis * dphi_dT - pParam->B4SOIk1eff * dsqrtPhi_dT); v4.1 */ /* LFW_FD fixed expression */ dVthFD_dT = (pParam->B4SOIk1ox * dsqrtPhis_dT - pParam->B4SOIk1eff * dsqrtPhi_dT) * Lpe_Vb - here->B4SOIk2ox * dVbs0mos_dT - dDelt_vth_dT - dDeltVthw_dT + pParam->B4SOIk3b * dVbs0mos_dT * tmp2 + (pParam->B4SOIk3 + pParam->B4SOIk3b * Vbs0mos) * dtmp2_dT + dDeltVthtemp_dT - dDIBL_Sft_dT - dDITS_Sft_dT; else dVthFD_dT = 0.0; /* VtgseffFD calculation for PhiFD */ VtgsFD = VthFD - Vgs_eff; T10 = model->B4SOInofffd * Vtm; DEXP( ((VtgsFD - model->B4SOIvofffd)/ T10), ExpVtgsFD, T0); VtgseffFD = T10 * log(1.0 + ExpVtgsFD); T0 /= (1.0 + ExpVtgsFD); dVtgseffFD_dVd = T0 * dVthFD_dVd; dVtgseffFD_dVg = -T0 * dVgs_eff_dVg; dVtgseffFD_dVe = T0 * dVthFD_dVe; if (selfheat) /* fix below 1st line of expression - Wagner */ /*dVtgseffFD_dT = T0 * (dVthFD_dT - (VtgsFD - model->B4SOIvofffd)/Temp) */ dVtgseffFD_dT = T0 * (dVthFD_dT - dVgs_eff_dT - (VtgsFD - model->B4SOIvofffd)/Temp) + VtgseffFD/Temp; else dVtgseffFD_dT = 0.0; /* surface potential modeling at strong inversion: PhiON */ VgstFD = Vgs_eff - VthFD; DEXP( ((VgstFD - model->B4SOIvofffd)/ T10), ExpVgstFD, T0); VgsteffFD = T10 * log(1.0 + ExpVgstFD); T0 /= (1.0 + ExpVgstFD); dVgsteffFD_dVd = -T0 * dVthFD_dVd; dVgsteffFD_dVg = T0 * dVgs_eff_dVg; dVgsteffFD_dVe = -T0 * dVthFD_dVe; if (selfheat) /* fix below 1st line of expression - Wagner */ /*dVgsteffFD_dT = T0 * (-dVthFD_dT */ dVgsteffFD_dT = T0 * (dVgs_eff_dT - dVthFD_dT - (VgstFD - model->B4SOIvofffd)/Temp) + VgsteffFD/Temp; else dVgsteffFD_dT = 0.0; /* T1 = model->B4SOImoinFD*pParam->B4SOIk1eff*Vtm*Vtm; */ T1 = model->B4SOImoinFD*pParam->B4SOIk1ox*Vtm*Vtm; if (selfheat) dT1_dT = 2*T1/Temp; else dT1_dT=0.0; T2 = VgsteffFD+ 2*pParam->B4SOIk1eff*sqrt(phi); dT2_dVg = dVgsteffFD_dVg; dT2_dVd = dVgsteffFD_dVd; dT2_dVe = dVgsteffFD_dVe; /* if (selfheat) dT2_dT = dVgsteffFD_dT; */ if (selfheat) dT2_dT = dVgsteffFD_dT + 2*pParam->B4SOIk1eff*dsqrtPhi_dT; /* v4.1 */ else dT2_dT = 0.0; T0 = 1+ VgsteffFD * T2 / T1; dT0_dVg = (VgsteffFD * dT2_dVg + T2 * dVgsteffFD_dVg) / T1; dT0_dVd = (VgsteffFD * dT2_dVd + T2 * dVgsteffFD_dVd) / T1; dT0_dVe = (VgsteffFD * dT2_dVe + T2 * dVgsteffFD_dVe) / T1; if (selfheat) dT0_dT = (VgsteffFD * (dT2_dT - T2/T1 * dT1_dT) + T2 * dVgsteffFD_dT) / T1; else dT0_dT = 0.0; PhiON = phi + Vtm* log(T0) ; dPhiON_dVg = Vtm* dT0_dVg/T0 ; dPhiON_dVd = Vtm* dT0_dVd/T0 ; dPhiON_dVe = Vtm* dT0_dVe/T0 ; if (selfheat) dPhiON_dT = dphi_dT + Vtm* dT0_dT/T0 + (PhiON-phi)/Temp ; /* v4.1 */ else dPhiON_dT = 0.0; /* surface potential from subthreshold to inversion: PhiFD */ T0 = model->B4SOIcox / (model->B4SOIcox + 1.0/(1.0/model->B4SOIcsi + 1.0/Cbox)); PhiFD = PhiON - T0 * VtgseffFD; dPhiFD_dVg = dPhiON_dVg - T0 * dVtgseffFD_dVg; dPhiFD_dVd = dPhiON_dVd - T0 * dVtgseffFD_dVd; dPhiFD_dVe = dPhiON_dVe - T0 * dVtgseffFD_dVe; if (selfheat) dPhiFD_dT = dPhiON_dT - T0 * dVtgseffFD_dT; else dPhiFD_dT = 0; /* built-in potential lowering: Vbs0 */ if (model->B4SOIfdMod == 0) /* v4.0 */ { T0 = -model->B4SOIdvbd1 * pParam->B4SOIleff / pParam->B4SOIlitl; T1 = model->B4SOIdvbd0 * (exp(0.5*T0) + 2*exp(T0)); T2 = T1 * (vbi - phi); T3 = 0.5 * pParam->B4SOIqsi / model->B4SOIcsi; /* v3.2 */ Vbs0t = PhiFD - T3 + model->B4SOIvbsa + T2; dVbs0t_dVg = dPhiFD_dVg; dVbs0t_dVd = dPhiFD_dVd; dVbs0t_dVe = dPhiFD_dVe; if (selfheat) dVbs0t_dT = dPhiFD_dT + T1 * (dvbi_dT - dphi_dT); /* v4.1 */ else dVbs0t_dT = 0; T0 = 1 + model->B4SOIcsi / Cbox; T3 = -model->B4SOIdk2b * pParam->B4SOIleff / pParam->B4SOIlitl; T5 = model->B4SOIk2b * (exp(0.5*T3) + 2*exp(T3)); T1 = (model->B4SOIk1b - T5) / T0; T2 = T1 * Vesfb; T0 = 1.0/(1 + Cbox / model->B4SOIcsi); Vbs0 = T0 * Vbs0t + T2; dVbs0_dVg = T0 * dVbs0t_dVg; dVbs0_dVd = T0 * dVbs0t_dVd; dVbs0_dVe = T0 * dVbs0t_dVe + T1; if (selfheat) dVbs0_dT = T0 * dVbs0t_dT - T1 * dvfbb_dT; else dVbs0_dT = 0.0; } else /* v4.1 */ { T0 = 1.0/(model->B4SOIcsi + Cbox + model->B4SOIcdsbs); T1 = -model->B4SOIdvbd1 * pParam->B4SOIleff / pParam->B4SOIlitl; T2 = model->B4SOIdvbd0 * (exp(0.5*T1) + 2*exp(T1)); T3 = T2 * (Vds + model->B4SOIvsce); T4 = 0.5 * pParam->B4SOIqsi / model->B4SOIcsi; T5 = model->B4SOIcsi * T0 * (PhiFD - T4 + model->B4SOIvbsa); T6 = model->B4SOIcdsbs * T0 * T3; Vbs0t = T5 + T6; T8 = model->B4SOIcsi * T0; dVbs0t_dVg = T8 * dPhiFD_dVg; dVbs0t_dVd = T8 * dPhiFD_dVd + model->B4SOIcdsbs * T0 * T2; dVbs0t_dVe = T8 * dPhiFD_dVe; if (selfheat) dVbs0t_dT = T8 * dPhiFD_dT; else dVbs0t_dT = 0.0; T7 = Cbox * T0 * Vesfb; Vbs0 = Vbs0t + T7; dVbs0_dVg = dVbs0t_dVg; dVbs0_dVe = dVbs0t_dVe + Cbox * T0; dVbs0_dVd = dVbs0t_dVd; if (selfheat) dVbs0_dT = dVbs0t_dT - Cbox * T0 * dvfbb_dT; else dVbs0_dT = 0.0; } /* set lowerbound of Vbs (from SPICE) to Vbs0: Vbsitf (Vbs at back interface) */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* v3.1 ideal FD: Vbsitf is pinned at Vbs0 */ { Vbs = Vbsitf = Vbs0 + OFF_Vbsitf; dVbsitf_dVg = dVbs0_dVg; dVbsitf_dVd = dVbs0_dVd; dVbsitf_dVe = dVbs0_dVe; /*dVbsitf_dVb = 0.0; */ /*if (selfheat) dVbsitf_dT = dVbs0_dT; */ /*else dVbsitf_dT = 0; */ /* LFW_FD fix */ dVbs_dVg = dVbsitf_dVg; dVbs_dVd = dVbsitf_dVd; dVbs_dVb = dVbsitf_dVb = 0.0; dVbs_dVe = dVbsitf_dVe; if (selfheat) {dVbsitf_dT = dVbs0_dT; dVbs_dT = dVbsitf_dT;} else {dVbsitf_dT = 0; dVbs_dT = 0;} } else /* soiMod = 1 */ { T1 = Vbs - (Vbs0 + OFF_Vbsitf) - 0.01; T2 = sqrt(T1*T1 + 0.0001); T3 = 0.5 * (1 + T1/T2); Vbsitf = (Vbs0 + OFF_Vbsitf) + 0.5 * (T1 + T2); dVbsitf_dVg = (1 - T3) * dVbs0_dVg; dVbsitf_dVd = (1 - T3) * dVbs0_dVd; dVbsitf_dVe = (1 - T3) * dVbs0_dVe; dVbsitf_dVb = T3 ; /* LFW_FD 7 new lines */ /* Note that Vbs has not been redefined */ /* dVbs_dVb = dVbsitf_dVb; */ dVbs_dVg = 0.0; dVbs_dVd = 0.0; dVbs_dVb = 1.0; dVbs_dVe = 0.0; dVbs_dT = 0.0; if (selfheat) dVbsitf_dT = (1 - T3) * dVbs0_dT; else dVbsitf_dT = 0.0; } /* Based on Vbsitf, calculate zero-field body potential for MOS: Vbsmos */ T1 = Vbs0t - Vbsitf - 0.005; T2 = sqrt(T1 * T1 + (2.5e-5)); T3 = 0.5 * (T1 + T2); T4 = T3 * model->B4SOIcsi / pParam->B4SOIqsi; /* v3.2 */ Vbsmos = Vbsitf - 0.5 * T3 * T4; T5 = 0.5 * T4 * (1 + T1 / T2); dVbsmos_dVg = dVbsitf_dVg * (1 + T5) - T5 * dVbs0t_dVg; dVbsmos_dVd = dVbsitf_dVd * (1 + T5) - T5 * dVbs0t_dVd; dVbsmos_dVb = dVbsitf_dVb * (1 + T5); dVbsmos_dVe = dVbsitf_dVe * (1 + T5) - T5 * dVbs0t_dVe; if (selfheat) dVbsmos_dT = dVbsitf_dT * (1 + T5) - T5 * dVbs0t_dT; else dVbsmos_dT = 0.0; /* Vbsmos should be used in MOS after some limiting (Vbseff) */ Vbp = Vbs - Vps; dVbp_dVb = 1; } /* end of v3.0 block edition */ /* v3.0 modification */ /* T2 is Vbsmos limited above Vbsc=-5 */ T0 = Vbsmos + 5 - 0.001; T1 = sqrt(T0 * T0 - 0.004 * (-5)); T2 = (-5) + 0.5 * (T0 + T1); dT2_dVb = (0.5 * (1.0 + T0 / T1)) * dVbsmos_dVb; dT2_dVg = (0.5 * (1.0 + T0 / T1)) * dVbsmos_dVg; dT2_dVd = (0.5 * (1.0 + T0 / T1)) * dVbsmos_dVd; dT2_dVe = (0.5 * (1.0 + T0 / T1)) * dVbsmos_dVe; if (selfheat) dT2_dT = (0.5 * (1.0 + T0 / T1)) * dVbsmos_dT; else dT2_dT = 0.0; /* Vbsh is T2 limited below 1.5 */ T0 = 1.5; T1 = T0 - T2 - 0.002; T3 = sqrt(T1 * T1 + 0.008 * T0); Vbsh = T0 - 0.5 * (T1 + T3); dVbsh_dVb = 0.5 * (1.0 + T1 / T3) * dT2_dVb; dVbsh_dVg = 0.5 * (1.0 + T1 / T3) * dT2_dVg; dVbsh_dVd = 0.5 * (1.0 + T1 / T3) * dT2_dVd; dVbsh_dVe = 0.5 * (1.0 + T1 / T3) * dT2_dVe; if (selfheat) dVbsh_dT = 0.5 * (1.0 + T1 / T3) * dT2_dT; else dVbsh_dT = 0.0; /* Vbseff is Vbsh limited to 0.95*phi */ T0 = 0.95 * phi; T1 = T0 - Vbsh - 0.002; T2 = sqrt(T1 * T1 + 0.008 * T0); Vbseff = T0 - 0.5 * (T1 + T2); dVbseff_dVb = 0.5 * (1.0 + T1 / T2) * dVbsh_dVb; dVbseff_dVg = 0.5 * (1.0 + T1 / T2) * dVbsh_dVg; dVbseff_dVd = 0.5 * (1.0 + T1 / T2) * dVbsh_dVd; dVbseff_dVe = 0.5 * (1.0 + T1 / T2) * dVbsh_dVe; /* if (selfheat) dVbseff_dT = 0.5 * (1.0 + T1 / T2) * dVbsh_dT; */ if (selfheat) { dT0_dT = 0.95 * dphi_dT; dT1_dT = dT0_dT - dVbsh_dT; dVbseff_dT = dT0_dT - 0.5 * (1.0 + T1 / T2) * dT1_dT - 0.002 * dT0_dT / T2; } /* v4.1 */ else dVbseff_dT = 0.0; here->B4SOIvbseff = Vbseff; /* SPICE sol. */ /* end of v3.0 modification */ /* Below all the variables refer to Vbseff */ /* LFW_FD comment out next 6 lines */ /*if (dVbseff_dVb < 1e-20) { */ /* dVbseff_dVb = 1e-20; */ /* dVbsh_dVb *= 1e20; */ /*} */ /*else */ /* dVbsh_dVb /= dVbseff_dVb; */ /*=======================================================================*/ /* Some derivatives were originally taken w.r.t. Vbseff, and named *_dVb */ /* Later in the code, they were corrected by multiplying or dividing */ /* by dVbseff_dVb. */ /* Now, all derivatives labeled *_dVb are taken w.r.t. Vbs */ /* The correction factor "dVbseff_dVb" has been removed where it is */ /* no longer needed. */ /*=======================================================================*/ Phis = phi - Vbseff; /* dPhis_dVb = -1; LFW_FD not uesed */ sqrtPhis = sqrt(Phis); /*dsqrtPhis_dVb = -0.5 / sqrtPhis; */ /* LFW_FD fix/add 4 lines */ dsqrtPhis_dVg = -0.5 * dVbseff_dVg / sqrtPhis; dsqrtPhis_dVd = -0.5 * dVbseff_dVd / sqrtPhis; dsqrtPhis_dVb = -0.5 * dVbseff_dVb / sqrtPhis; dsqrtPhis_dVe = -0.5 * dVbseff_dVe / sqrtPhis; Xdep = Xdep0 * sqrtPhis / sqrtPhi; /*dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; */ /* LFW_FD fix/add 4 lines */ dXdep_dVg = Xdep0 * dsqrtPhis_dVg / sqrtPhi; dXdep_dVd = Xdep0 * dsqrtPhis_dVd / sqrtPhi; dXdep_dVb = Xdep0 * dsqrtPhis_dVb / sqrtPhi; dXdep_dVe = Xdep0 * dsqrtPhis_dVe / sqrtPhi; /* v4.1 */ if (selfheat) { dPhis_dT = dphi_dT - dVbseff_dT; dsqrtPhis_dT = 0.5 / sqrtPhis * dPhis_dT; /* dXdep_dT = dXdep0_dT * sqrtPhis / sqrtPhi + (dsqrtPhis_dT * sqrtPhi - sqrtPhis * dsqrtPhi_dT) / phi; v4.2 Temp Deriv bugfix */ dXdep_dT = dXdep0_dT * sqrtPhis / sqrtPhi + Xdep0 * (dsqrtPhis_dT * sqrtPhi - sqrtPhis * dsqrtPhi_dT) / phi; } else { dPhis_dT = 0.0; dsqrtPhis_dT = 0.0; dXdep_dT = 0.0; } /* end v4.1 */ /* Calculate nstar v3.2 */ /* here->B4SOInstar = model->B4SOIvtm / Charge_q * */ here->B4SOInstar = Vtm / Charge_q * (model->B4SOIcox + epssub / Xdep + pParam->B4SOIcit); /* Vth Calculation */ T3 = sqrt(Xdep); T0 = pParam->B4SOIdvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B4SOIdvt2 ; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B4SOIdvt2 * T4 * T4 ; } lt1 = model->B4SOIfactor1 * T3 * T1; /* dlt1_dVb =model->B4SOIfactor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); */ /* LFW_FD fix/add 4 lines */ dlt1_dVg = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVg + 0.5 * T1 * dXdep_dVg / T3); dlt1_dVd = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVd + 0.5 * T1 * dXdep_dVd / T3); dlt1_dVb = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVb + 0.5 * T1 * dXdep_dVb / T3); dlt1_dVe = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVe + 0.5 * T1 * dXdep_dVe / T3); /* fix below expression Wagner */ /*if (selfheat) dlt1_dT = model->B4SOIfactor1 * T1 * 0.5 / T3 * dXdep_dT;*/ if (selfheat) dlt1_dT = model->B4SOIfactor1 * (T1 * 0.5 / T3 * dXdep_dT + T3 * pParam->B4SOIdvt2 * dVbseff_dT); else dlt1_dT = 0.0; /* v4.1 */ T0 = pParam->B4SOIdvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B4SOIdvt2w ; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B4SOIdvt2w * T4 * T4 ; } ltw= model->B4SOIfactor1 * T3 * T1; /* dltw_dVb=model->B4SOIfactor1*(0.5 / T3 * T1 * dXdep_dVb + T3 * T2); */ /* LFW_FD fix/add 4 lines */ dltw_dVg = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVg + 0.5 * T1 * dXdep_dVg / T3); dltw_dVd = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVd + 0.5 * T1 * dXdep_dVd / T3); dltw_dVb = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVb + 0.5 * T1 * dXdep_dVb / T3); dltw_dVe = model->B4SOIfactor1 * (T3 * T2 * dVbseff_dVe + 0.5 * T1 * dXdep_dVe / T3); /* fix next expression Wagner */ /*if (selfheat) dltw_dT = model->B4SOIfactor1 * T1 * 0.5 / T3 * dXdep_dT; */ if (selfheat) dltw_dT = model->B4SOIfactor1 * (T1 * 0.5 / T3 * dXdep_dT + T3 * pParam->B4SOIdvt2w * dVbseff_dT); else dltw_dT = 0.0; /* v4.1 */ T0 = -0.5 * pParam->B4SOIdvt1 * Leff / lt1; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); /*dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; */ /*dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; */ /*dT1_dT = -T0 / lt1 * T1 * dlt1_dT; v4.2 bugfix temp deriv */ /*dTheta0_dT = (1.0 + 4.0 * T1) * dT1_dT; v4.2 bugfix temp deriv */ /* LFW_FD fix 5 derivatives */ dTheta0_dVg = -(1.0 + 4.0 * T1) * T1 * T0 * dlt1_dVg / lt1; dTheta0_dVd = -(1.0 + 4.0 * T1) * T1 * T0 * dlt1_dVd / lt1; dTheta0_dVb = -(1.0 + 4.0 * T1) * T1 * T0 * dlt1_dVb / lt1; dTheta0_dVe = -(1.0 + 4.0 * T1) * T1 * T0 * dlt1_dVe / lt1; dTheta0_dT = -(1.0 + 4.0 * T1) * T1 * T0 * dlt1_dT / lt1; } else { T1 = MIN_EXPL; Theta0 = T1 * (1.0 + 2.0 * T1); /* LFW_FD fix 5 derivatives */ dTheta0_dVg = 0.0; dTheta0_dVd = 0.0; dTheta0_dVb = 0.0; dTheta0_dVe = 0.0; dTheta0_dT = 0; /* v4.2 bugfix temp deriv */ } /* Calculate n */ T2 = pParam->B4SOInfactor * epssub / Xdep; /* LFW_FD add 3 derivatives */ dT2_dVg = - T2 / Xdep * dXdep_dVg; dT2_dVd = - T2 / Xdep * dXdep_dVd; dT2_dVb = - T2 / Xdep * dXdep_dVb; dT2_dVe = - T2 / Xdep * dXdep_dVe; dT2_dT = - T2 / Xdep * dXdep_dT; /* v4.2 bugfix temp deriv */ T3 = pParam->B4SOIcdsc + pParam->B4SOIcdscb * Vbseff + pParam->B4SOIcdscd * Vds; /* LFW_FD add/fix 5 derivatives */ dT3_dVg = pParam->B4SOIcdscb * dVbseff_dVg; dT3_dVd = pParam->B4SOIcdscb * dVbseff_dVd + pParam->B4SOIcdscd; dT3_dVb = pParam->B4SOIcdscb * dVbseff_dVb; dT3_dVe = pParam->B4SOIcdscb * dVbseff_dVe; dT3_dT = pParam->B4SOIcdscb * dVbseff_dT; /* LFW */ T4 = (T2 + T3 * Theta0 + pParam->B4SOIcit) / model->B4SOIcox; /* LFW_FD add/fix 5 derivatives */ dT4_dVg = (dT2_dVg + T3 * dTheta0_dVg + Theta0 * dT3_dVg) / model->B4SOIcox; dT4_dVd = (dT2_dVd + T3 * dTheta0_dVd + Theta0 * dT3_dVd) / model->B4SOIcox; dT4_dVb = (dT2_dVb + T3 * dTheta0_dVb + Theta0 * dT3_dVb) / model->B4SOIcox; dT4_dVe = (dT2_dVe + T3 * dTheta0_dVe + Theta0 * dT3_dVe) / model->B4SOIcox; dT4_dT = (dT2_dT + dTheta0_dT* T3 + Theta0*dT3_dT)/ model->B4SOIcox; /* LFW */ if (T4 >= -0.5) { n = 1.0 + T4; dn_dVg = dT4_dVg; dn_dVb = dT4_dVb; dn_dVd = dT4_dVd; dn_dVe = dT4_dVe; dn_dT = dT4_dT; /* v4.2 bugfix temp deriv */ } else /* avoid discontinuity problems caused by T4 */ { T0 = 1.0 / (3.0 + 8.0 * T4); /* n = (1.0 + 3.0 * T4) * T0; */ /* v4.2 bugfix temp deriv */ T5 = 1.0 + 3.0 * T4; /* v4.2 bugfix temp deriv */ n = T0 * T5; /* v4.2 bugfix temp deriv */ dn_dT = T0 * (3.0 - 8.0 * T5 * T0) * dT4_dT; /* Wagner - moved line up from 3 lines below */ T0 *= T0; dn_dVg = T0 * dT4_dVg; dn_dVb = T0 * dT4_dVb; dn_dVd = T0 * dT4_dVd; dn_dVe = T0 * dT4_dVe; } /* v4.0 DITS */ if (pParam->B4SOIdvtp0 > 0.0) { T0 = -pParam->B4SOIdvtp1 * Vds; if (T0 < -EXPL_THRESHOLD) { T2 = MIN_EXPL; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->B4SOIdvtp1 * T2; } T3 = Leff + pParam->B4SOIdvtp0 * (1.0 + T2); dT3_dVd = pParam->B4SOIdvtp0 * dT2_dVd; T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; DITS_Sft = n * T4; dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; if (selfheat) { /* dDITS_Sft_dT = n * KboQ * log(Leff / T3); */ /* v4.2 bugfix temp deriv */ dDITS_Sft_dT = n * KboQ * log(Leff / T3) + dn_dT * T4; /* v4.2 bugfix temp deriv */ } else dDITS_Sft_dT = 0.0; } else { DITS_Sft = dDITS_Sft_dVd = dDITS_Sft_dVb = 0.0; dDITS_Sft_dT = 0.0; } here->B4SOIthetavth = pParam->B4SOIdvt0 * Theta0; Delt_vth = here->B4SOIthetavth * V0; /* LFW_FD add/fix 4 derivatives */ dDelt_vth_dVg = pParam->B4SOIdvt0 * dTheta0_dVg * V0; dDelt_vth_dVd = pParam->B4SOIdvt0 * dTheta0_dVd * V0; dDelt_vth_dVb = pParam->B4SOIdvt0 * dTheta0_dVb * V0; dDelt_vth_dVe = pParam->B4SOIdvt0 * dTheta0_dVe * V0; if (selfheat) /* dDelt_vth_dT = here->B4SOIthetavth * dvbi_dT; */ /* v4.2 bugfix temp deriv */ dDelt_vth_dT = pParam->B4SOIdvt0 * (dTheta0_dT * V0 + Theta0 * (dvbi_dT - dphi_dT)); /* v4.2 bugfix temp deriv */ else dDelt_vth_dT = 0.0; T0 = -0.5 * pParam->B4SOIdvt1w * pParam->B4SOIweff * Leff / ltw; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); /*dT1_dVb = -T0 / ltw * T1 * dltw_dVb; */ /*dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; */ /*dT1_dT = -T0 / ltw * T1 * dltw_dT; v4.2 bugfix temp deriv */ /*dT2_dT = (1.0 + 4.0 * T1) * dT1_dT; v4.2 bugfix temp deriv */ /* LFW_FD add/fix 5 derivatives */ dT2_dVg = -(1.0 + 4.0 * T1) * T1 * T0 * dltw_dVg / ltw; dT2_dVd = -(1.0 + 4.0 * T1) * T1 * T0 * dltw_dVd / ltw; dT2_dVb = -(1.0 + 4.0 * T1) * T1 * T0 * dltw_dVb / ltw; dT2_dVe = -(1.0 + 4.0 * T1) * T1 * T0 * dltw_dVe / ltw; dT2_dT = -(1.0 + 4.0 * T1) * T1 * T0 * dltw_dT / ltw; } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); /* LFW_FD add/fix 5 derivatives */ dT2_dVg = 0.0; dT2_dVd = 0.0; dT2_dVb = 0.0; dT2_dVe = 0.0; dT2_dT = 0.0; } T0 = pParam->B4SOIdvt0w * T2; DeltVthw = T0 * V0; /* LFW_FD add/fix 5 derivatives */ dDeltVthw_dVg = pParam->B4SOIdvt0w * dT2_dVg * V0; dDeltVthw_dVd = pParam->B4SOIdvt0w * dT2_dVd * V0; dDeltVthw_dVb = pParam->B4SOIdvt0w * dT2_dVb * V0; dDeltVthw_dVe = pParam->B4SOIdvt0w * dT2_dVe * V0; if (selfheat) dDeltVthw_dT = T0 * (dvbi_dT - dphi_dT) + pParam->B4SOIdvt0w * dT2_dT * V0; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B4SOIlpe0 / Leff); T1 = (pParam->B4SOIkt1 + pParam->B4SOIkt1l / Leff + pParam->B4SOIkt2 * Vbseff); DeltVthtemp = pParam->B4SOIk1ox * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; /* v4.0 */ /* LFW_FD add/fix 5 derivatives */ dDeltVthtemp_dVg = TempRatioMinus1 * pParam->B4SOIkt2 * dVbseff_dVg; dDeltVthtemp_dVd = TempRatioMinus1 * pParam->B4SOIkt2 * dVbseff_dVd; dDeltVthtemp_dVb = TempRatioMinus1 * pParam->B4SOIkt2 * dVbseff_dVb; dDeltVthtemp_dVe = TempRatioMinus1 * pParam->B4SOIkt2 * dVbseff_dVe; if (selfheat) dDeltVthtemp_dT = pParam->B4SOIk1ox * (T0 - 1.0) * dsqrtPhi_dT + T1 / model-> B4SOItnom + pParam->B4SOIkt2 * TempRatioMinus1 * dVbseff_dT; else dDeltVthtemp_dT = 0.0; tmp2 = toxe * phi / (pParam->B4SOIweff + pParam->B4SOIw0); dtmp2_dT = toxe * dphi_dT / (pParam->B4SOIweff + pParam->B4SOIw0); /* v4.2 bugfix temp deriv */ T3 = here->B4SOIeta0 + pParam->B4SOIetab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B4SOIetab; /* LFW_FD add/fix 4 derivatives */ dT3_dVg = T4 * dVbseff_dVg; dT3_dVd = T4 * dVbseff_dVd; dT3_dVb = T4 * dVbseff_dVb; dT3_dVe = T4 * dVbseff_dVe; } else { /* LFW_FD add/fix 4 derivatives */ dT3_dVg = pParam->B4SOIetab * dVbseff_dVg; dT3_dVd = pParam->B4SOIetab * dVbseff_dVd; dT3_dVb = pParam->B4SOIetab * dVbseff_dVb; dT3_dVe = pParam->B4SOIetab * dVbseff_dVe; } /* DIBL_Sft = T3 * pParam->B4SOItheta0vb0 * Vds; dDIBL_Sft_dVd = pParam->B4SOItheta0vb0 * T3; dDIBL_Sft_dVb = pParam->B4SOItheta0vb0 * Vds * dT3_dVb; v4.2 bugfix */ DIBL_Sft = T3 * theta0vb0 * Vds; /* LFW_FD add/fix 4 derivatives */ dDIBL_Sft_dVg = theta0vb0 * Vds * dT3_dVg; dDIBL_Sft_dVd = theta0vb0 * (Vds * dT3_dVd + T3) ; dDIBL_Sft_dVb = theta0vb0 * Vds * dT3_dVb; dDIBL_Sft_dVe = theta0vb0 * Vds * dT3_dVe; dDIBL_Sft_dT = T3 * Vds * dtheta0vb0_dT + pParam->B4SOIetab * dVbseff_dT * theta0vb0 * Vds; Lpe_Vb = sqrt(1.0 + pParam->B4SOIlpeb / Leff); T9 = 2.2361 / sqrtPhi; sqrtPhisExt = sqrtPhis - T9 * (Vbsh - Vbseff); /* LFW_FD add/fix 4 derivatives */ dsqrtPhisExt_dVg = dsqrtPhis_dVg - T9 * (dVbsh_dVg - dVbseff_dVg); dsqrtPhisExt_dVd = dsqrtPhis_dVd - T9 * (dVbsh_dVd - dVbseff_dVd); dsqrtPhisExt_dVb = dsqrtPhis_dVb - T9 * (dVbsh_dVb - dVbseff_dVb); dsqrtPhisExt_dVe = dsqrtPhis_dVe - T9 * (dVbsh_dVe - dVbseff_dVe); dsqrtPhisExt_dT = dsqrtPhis_dT - T9 * (dVbsh_dT - dVbseff_dT) + 2.2361 * dsqrtPhi_dT * (Vbsh - Vbseff) / phi; /* v4.2 bugfix temp deriv */ /* 4.1 */ T0 = exp(2.0 * pParam->B4SOIdvtp4 * Vds); DITS_Sft2 = pParam->B4SOIdvtp2factor * (T0-1) / (T0+1); dDITS_Sft2_dVd = pParam->B4SOIdvtp2factor * pParam->B4SOIdvtp4 * 4.0 * T0 / ((T0+1) * (T0+1)); Vth = model->B4SOItype * here->B4SOIvth0 + (pParam->B4SOIk1ox * sqrtPhisExt - pParam->B4SOIk1eff * sqrtPhi) * Lpe_Vb - here->B4SOIk2ox * Vbseff- Delt_vth - DeltVthw +(pParam->B4SOIk3 + pParam->B4SOIk3b * Vbseff) * tmp2 + DeltVthtemp - DIBL_Sft - DITS_Sft - DITS_Sft2; /* LFW_FD add/fix 2 derivatives */ dVth_dVg = pParam->B4SOIk1ox * dsqrtPhisExt_dVg * Lpe_Vb - here->B4SOIk2ox * dVbseff_dVg - dDelt_vth_dVg - dDeltVthw_dVg + pParam->B4SOIk3b * dVbseff_dVg * tmp2 + dDeltVthtemp_dVg - dDIBL_Sft_dVg; /* LFW_FD fix line */ dvth0_dT=0; here->B4SOIvon = Vth; T6 = pParam->B4SOIk3b * tmp2 - here->B4SOIk2ox + pParam->B4SOIkt2 * TempRatioMinus1; /* LFW_FD add/fix 4 derivatives */ /* this is actually dVth_dVbseff */ dVth_dVb = pParam->B4SOIk1ox * dsqrtPhisExt_dVb * Lpe_Vb - here->B4SOIk2ox * dVbseff_dVb - dDelt_vth_dVb - dDeltVthw_dVb + pParam->B4SOIk3b * dVbseff_dVb * tmp2 + dDeltVthtemp_dVb - dDIBL_Sft_dVb - dDITS_Sft_dVb; dVth_dVd = pParam->B4SOIk1ox * dsqrtPhisExt_dVd * Lpe_Vb - here->B4SOIk2ox * dVbseff_dVd - dDelt_vth_dVd - dDeltVthw_dVd + pParam->B4SOIk3b * dVbseff_dVd * tmp2 + dDeltVthtemp_dVd - dDIBL_Sft_dVd - dDITS_Sft_dVd - dDITS_Sft2_dVd; dVth_dVe = pParam->B4SOIk1ox * dsqrtPhisExt_dVe * Lpe_Vb - here->B4SOIk2ox * dVbseff_dVe - dDelt_vth_dVe - dDeltVthw_dVe + pParam->B4SOIk3b * dVbseff_dVe * tmp2 + dDeltVthtemp_dVe - dDIBL_Sft_dVe; /* LFW_FD fix line */ if (selfheat) /* dVth_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT - dDITS_Sft_dT; */ dVth_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT +(pParam->B4SOIk1ox * dsqrtPhisExt_dT- pParam->B4SOIk1eff * dsqrtPhi_dT) * Lpe_Vb - here->B4SOIk2ox*dVbseff_dT + pParam->B4SOIk3b*tmp2*dVbseff_dT + (pParam->B4SOIk3 + pParam->B4SOIk3b * Vbseff)*dtmp2_dT + model->B4SOItype * dvth0_dT - dDIBL_Sft_dT - dDITS_Sft_dT; /* v4.2 temp deriv */ else dVth_dT = 0.0; /* dVthzb_dT calculation */ if ((model->B4SOIcapMod == 3) && (selfheat == 1)) { T3zb = sqrt(Xdep0); ltwzb = lt1zb = model->B4SOIfactor1 * T3zb; dT3zb_dT = 1.0 / (2.0 * T3zb) * dXdep0_dT; /* v4.2 bugfix temp deriv */ dltwzb_dT = dlt1zb_dT = model->B4SOIfactor1 * dT3zb_dT; /* v4.2 bugfix temp deriv */ T0 = -0.5 * pParam->B4SOIdvt1 * Leff / lt1zb; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0zb = T1 * (1.0 + 2.0 * T1); dT0_dT = -(T0 / lt1zb) * dlt1zb_dT; /* v4.2 bugfix temp deriv */ dT1_dT = T1 * dT0_dT; /* v4.2 bugfix temp deriv */ dTheta0zb_dT = (1.0 + 4.0 * T1) * dT1_dT; /* v4.2 bugfix temp deriv */ } else { T1 = MIN_EXPL; Theta0zb = T1 * (1.0 + 2.0 * T1); dTheta0zb_dT=0; /* v4.2 bugfix temp deriv */ } Delt_vthzb = pParam->B4SOIdvt0 * Theta0zb * V0; /* dDelt_vthzb_dT = pParam->B4SOIdvt0 * Theta0zb * dvbi_dT; */ /* v4.2 bugfix temp deriv */ dDelt_vthzb_dT = pParam->B4SOIdvt0 *( Theta0zb * (dvbi_dT - dphi_dT) + dTheta0zb_dT *V0); /* v4.2 bugfix temp deriv */ T0 = -0.5 * pParam->B4SOIdvt1w * pParam->B4SOIweff * Leff / ltwzb; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT0_dT = -(T0 / ltwzb) * dltwzb_dT; /* v4.2 bugfix temp deriv */ dT1_dT = T1 * dT0_dT; /* v4.2 bugfix temp deriv */ dT2_dT = (1.0 + 4.0 * T1) * dT1_dT; /* v4.2 bugfix temp deriv */ } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); dT2_dT=0; /* v4.2 bugfix temp deriv */ } T0 = pParam->B4SOIdvt0w * T2; dT0_dT= pParam->B4SOIdvt0w * dT2_dT; /* v4.2 bugfix temp deriv */ DeltVthwzb = T0 * V0; /* dDeltVthwzb_dT = T0 * dvbi_dT; *//* v4.2 bugfix temp deriv */ dDeltVthwzb_dT = ( T0 * (dvbi_dT - dphi_dT)+ dT0_dT *V0); /* v4.2 bugfix temp deriv */ T0 = sqrt(1.0 + pParam->B4SOIlpe0 / Leff); T1 = (pParam->B4SOIkt1 + pParam->B4SOIkt1l / Leff); DeltVthtempzb = pParam->B4SOIk1ox * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; dDeltVthtempzb_dT = pParam->B4SOIk1ox * (T0 - 1.0) * dsqrtPhi_dT + T1 / model->B4SOItnom; /* v4.2 bugfix temp deriv */ Vthzb = model->B4SOItype * here->B4SOIvth0 - Delt_vthzb - DeltVthwzb + pParam->B4SOIk3 * tmp2 + DeltVthtempzb; dVthzb_dT = model->B4SOItype * dvth0_dT - dDelt_vthzb_dT - dDeltVthwzb_dT + pParam->B4SOIk3 * dtmp2_dT + dDeltVthtempzb_dT; /* v4.2 bugfix temp deriv */ /* Vthzb2 = Vthzb + 1.12; v4.1 */ /* v4.2 never used */ } else /* LFW_FD */ Vthzb = dVthzb_dT = 0.0; /* LFW_FD flexilint */ /* Effective Vgst (Vgsteff) Calculation */ Vgst = Vgs_eff - Vth; dVgst_dVg = dVgs_eff_dVg - dVth_dVg; /* LFW_FD fix derivative */ dVgst_dVd = -dVth_dVd; dVgst_dVb = -dVth_dVb; dVgst_dVe = -dVth_dVe; /* LFW_FD new line */ if (selfheat) { dVgst_dT = dVgs_eff_dT - dVth_dT; } else dVgst_dT = 0.0; T10 = n * Vtm; /* v4.0 */ VgstNVt = pParam->B4SOImstar * Vgst / T10; /* v4.0 */ /* LFW_FD add/fix 4 derivatives */ dVgstNVt_dVg = (pParam->B4SOImstar * dVgst_dVg - VgstNVt * dn_dVg * Vtm) / T10; dVgstNVt_dVd = (pParam->B4SOImstar * dVgst_dVd - VgstNVt * dn_dVd * Vtm) / T10; dVgstNVt_dVb = (pParam->B4SOImstar * dVgst_dVb - VgstNVt * dn_dVb * Vtm) / T10; dVgstNVt_dVe = (pParam->B4SOImstar * dVgst_dVe - VgstNVt * dn_dVe * Vtm) / T10; ExpArg = (pParam->B4SOIvoff - (1- pParam->B4SOImstar) * Vgst)/T10; /* LFW_FD */ /* LFW_FD add/fix 4 derivatives */ dExpArg_dVg = (-(1- pParam->B4SOImstar) * dVgst_dVg - ExpArg * dn_dVg * Vtm) / T10; dExpArg_dVd = (-(1- pParam->B4SOImstar) * dVgst_dVd - ExpArg * dn_dVd * Vtm) / T10; dExpArg_dVb = (-(1- pParam->B4SOImstar) * dVgst_dVb - ExpArg * dn_dVb * Vtm) / T10; dExpArg_dVe = (-(1- pParam->B4SOImstar) * dVgst_dVe - ExpArg * dn_dVe * Vtm) / T10; if (selfheat) { dT10_dT = n * dVtm_dT + dn_dT * Vtm; dVgstNVt_dT = -(-pParam->B4SOImstar*dVgst_dT + VgstNVt*dT10_dT)/T10; dExpArg_dT = -(1- pParam->B4SOImstar)*dVgst_dT/T10 -ExpArg*dT10_dT/T10; } else { dT10_dT = 0.0; dVgstNVt_dT = 0.0; dExpArg_dT = 0.0; } /* LFW_FD new line */ dExpVgst_dVg = dExpVgst_dVd = dExpVgst_dVb = dExpVgst_dVe = dExpVgst_dT = 0.0; /* MCJ: Very small Vgst */ if (VgstNVt > EXPL_THRESHOLD) { ExpVgst = 1.0; /* LFW_FD flexilint */ Vgsteff = Vgst; /* T0 is dVgsteff_dVbseff */ T0 = -dVth_dVb; /* LFW_FD add/fix 5 derivatives */ dVgsteff_dVg = dVgst_dVg; dVgsteff_dVd = dVgst_dVd; dVgsteff_dVb = dVgst_dVb; dVgsteff_dVe = dVgst_dVe; if (selfheat) dVgsteff_dT = dVgst_dT ; /* LFW */ else dVgsteff_dT = 0.0; } else if (ExpArg > EXPL_THRESHOLD) { T0 = (Vgst - pParam->B4SOIvoff) / (n * Vtm); ExpVgst = exp(T0); /* LFW_FD add/fix 4 derivatives */ dExpVgst_dVg = (dVgst_dVg - T0 * dn_dVg * Vtm) /(n * Vtm); dExpVgst_dVd = (dVgst_dVd - T0 * dn_dVd * Vtm) /(n * Vtm); dExpVgst_dVb = (dVgst_dVb - T0 * dn_dVb * Vtm) /(n * Vtm); dExpVgst_dVe = (dVgst_dVe - T0 * dn_dVe * Vtm) /(n * Vtm); /*Vgsteff = Vtm * pParam->B4SOIcdep0 / model->B4SOIcox * ExpVgst; *//*v4.2 bug fix */ Vgsteff = Vtm * cdep0 / model->B4SOIcox * ExpVgst; /* v4.2 bug fix */ T3 = Vgsteff / (n * Vtm) ; /* T1 is dVgsteff_dVbseff */ /*T1 = -T3 * (dVth_dVb + T0 * Vtm * dn_dVb);*/ /* LFW_FD fix T1 and 4 derivatives */ T1 = -T3 * ( T0 * Vtm * dn_dVb); dVgsteff_dVg = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVg; dVgsteff_dVd = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVd; dVgsteff_dVb = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVb; dVgsteff_dVe = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVe; /* enhance next if-then-else block - Wagner*/ if (selfheat) { /* dVgsteff_dT = -T3 * (dVth_dT + T0 * dVtm_dT * n) + Vgsteff / Temp+ T1 * dVbseff_dT; v3.0 */ /* v4.2 temp deriv*/ dVgsteff_dT = -T3 * (-dVgst_dT + T0 * dVtm_dT * n + Vtm * dn_dT) + Vgsteff / Temp+ T1 * dVbseff_dT; /*v4.2 temp deriv*/ dTL0_dT = (dVgst_dT - T0 * (dn_dT * Vtm + n * dVtm_dT)) / (n * Vtm); dExpVgst_dT = ExpVgst * dTL0_dT; dVgsteff_dT = Vgsteff * (dVtm_dT/Vtm + dcdep0_dT/cdep0 + dExpVgst_dT/ExpVgst); } else { dExpVgst_dT = 0.0; dVgsteff_dT = 0.0; } } else { ExpVgst = exp(VgstNVt); /* LFW_FD add/fix 4 derivatives */ dExpVgst_dVg = ExpVgst * dVgstNVt_dVg; dExpVgst_dVd = ExpVgst * dVgstNVt_dVd; dExpVgst_dVb = ExpVgst * dVgstNVt_dVb; dExpVgst_dVe = ExpVgst * dVgstNVt_dVe; /* 4 new lines Wagner */ if (selfheat) dExpVgst_dT = ExpVgst * dVgstNVt_dT; else dExpVgst_dT = 0.0; T1 = T10 * log(1.0 + ExpVgst); /* LFW_FD add/fix 4 derivatives */ dT1_dVg = T10 * dExpVgst_dVg / (1.0 + ExpVgst) + T1 * dn_dVg / n; dT1_dVd = T10 * dExpVgst_dVd / (1.0 + ExpVgst) + T1 * dn_dVd / n; dT1_dVb = T10 * dExpVgst_dVb / (1.0 + ExpVgst) + T1 * dn_dVb / n; dT1_dVe = T10 * dExpVgst_dVe / (1.0 + ExpVgst) + T1 * dn_dVe / n; /*T3 = (1.0 / Temp); */ T3 = (1.0 / Temp + dn_dT / n); /* v4.2 temp deriv */ if (selfheat) /* fix below expression Wagner */ /*dT1_dT = -dT1_dVg * (dVth_dT + Vgst * T3) + T1 * T3;*/ dT1_dT = dT10_dT*log(1.0 + ExpVgst) + T10 * dExpVgst_dT / (1.0 + ExpVgst); else dT1_dT = 0.0; /*dT2_dVg = -model->B4SOIcox / (Vtm * pParam->B4SOIcdep0) * exp(ExpArg) * (1 - pParam->B4SOImstar);*/ /*v4.2 bug fix*/ dT2_dVg = -model->B4SOIcox / (Vtm * cdep0) * exp(ExpArg) * (1 - pParam->B4SOImstar); /*v4.2 bug fix*/ T2 = pParam->B4SOImstar - T10 * dT2_dVg / (1.0 - pParam->B4SOImstar); /* LFW_FD fix all 5 T2 derivatives */ TL1 = dT2_dVg; dTL1_dVg = TL1 * dExpArg_dVg; dTL1_dVd = TL1 * dExpArg_dVd; dTL1_dVb = TL1 * dExpArg_dVb; dTL1_dVe = TL1 * dExpArg_dVe; dT2_dVg = -(dn_dVg * Vtm * TL1 + T10 * dTL1_dVg) / (1.0 - pParam->B4SOImstar); dT2_dVd = -(dn_dVd * Vtm * TL1 + T10 * dTL1_dVd) / (1.0 - pParam->B4SOImstar); dT2_dVb = -(dn_dVb * Vtm * TL1 + T10 * dTL1_dVb) / (1.0 - pParam->B4SOImstar); dT2_dVe = -(dn_dVe * Vtm * TL1 + T10 * dTL1_dVe) / (1.0 - pParam->B4SOImstar); if (selfheat) dT2_dT = -(dT10_dT * TL1 +T10*TL1*(-dVtm_dT/Vtm-dcdep0_dT/cdep0+dExpArg_dT) )/(1.0 - pParam->B4SOImstar); else dT2_dT = 0.0; Vgsteff = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; /* LFW_FD fix 4 derivatives */ dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff_dVe = (T2 * dT1_dVe - T1 * dT2_dVe) / T3; if (selfheat) dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3; else dVgsteff_dT = 0.0; } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (selfheat) dVgst2Vtm_dT = dVgsteff_dT + 2.0 * dVtm_dT; /* v3.1.1 bug fix */ else dVgst2Vtm_dT = 0.0; here->B4SOIVgsteff = Vgsteff; /* v2.2.3 bug fix */ /* v4.0 F-factor (degradation factor due to pocket implant) */ if (pParam->B4SOIfprout <= 0.0) { FP = 1.0; /* LFW_FD enhance line */ dFP_dVg = dFP_dVb = dFP_dVd = dFP_dVe = dFP_dT = 0.0; } else { T9 = pParam->B4SOIfprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); /* LFW_FD fix/add 5 derivatives */ dFP_dVg = FP * FP * T9 / Vgst2Vtm * dVgsteff_dVg; dFP_dVb = FP * FP * T9 / Vgst2Vtm * dVgsteff_dVb; dFP_dVd = FP * FP * T9 / Vgst2Vtm * dVgsteff_dVd; dFP_dVe = FP * FP * T9 / Vgst2Vtm * dVgsteff_dVe; if (selfheat) dFP_dT = FP * T9 * dVgst2Vtm_dT / (1.0 + T9) / Vgst2Vtm; else dFP_dT = 0.0; } /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - sqrtPhi; Weff = pParam->B4SOIweff - (2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * Vgsteff + pParam->B4SOIdwb * T9); /* LFW_FD fix/add 4 derivatives */ dWeff_dVg = -(2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * dVgsteff_dVg + pParam->B4SOIdwb * dsqrtPhis_dVg); dWeff_dVb = -(2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * dVgsteff_dVb + pParam->B4SOIdwb * dsqrtPhis_dVb); dWeff_dVd = -(2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * dVgsteff_dVd + pParam->B4SOIdwb * dsqrtPhis_dVd); dWeff_dVe = -(2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * dVgsteff_dVe + pParam->B4SOIdwb * dsqrtPhis_dVe); /* New - next 5 lines - Wagner */ if (selfheat) dWeff_dT = -(2.0 - here->B4SOInbc) * (pParam->B4SOIdwg * dVgsteff_dT + pParam->B4SOIdwb*(dsqrtPhis_dT - dsqrtPhi_dT)); else dWeff_dT = 0.0; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; /* LFW_FD add 2 derivatives */ dWeff_dVd *= T0; dWeff_dVe *= T0; dWeff_dT *= T0; /* new line - Wagner */ } if (model->B4SOIrdsMod == 1) /* v4.0 */ /* LFW_FD enhance line */ Rds = dRds_dVg = dRds_dVb = dRds_dVd = dRds_dVe = dRds_dT = 0.0; else { T0 = pParam->B4SOIprwg * Vgsteff + pParam->B4SOIprwb * T9; /* LFW_FD add 4 derivatives */ dT0_dVg = pParam->B4SOIprwg * dVgsteff_dVg + pParam->B4SOIprwb * dsqrtPhis_dVg; dT0_dVb = pParam->B4SOIprwg * dVgsteff_dVb + pParam->B4SOIprwb * dsqrtPhis_dVb; dT0_dVd = pParam->B4SOIprwg * dVgsteff_dVd + pParam->B4SOIprwb * dsqrtPhis_dVd; dT0_dVe = pParam->B4SOIprwg * dVgsteff_dVe + pParam->B4SOIprwb * dsqrtPhis_dVe; dT0_dT = pParam->B4SOIprwg*dVgsteff_dT + pParam->B4SOIprwb*(dsqrtPhis_dT - dsqrtPhi_dT); /* new expression Wagner */ if (T0 >= -0.9) { Rds = rds0 * (1.0 + T0); /* LFW_FD add/fix 4 derivatives */ dRds_dVg = rds0 * dT0_dVg; dRds_dVb = rds0 * dT0_dVb; dRds_dVd = rds0 * dT0_dVd; dRds_dVe = rds0 * dT0_dVe; if (selfheat && (Rds!=0.0)) /*fix below expression Wagner */ /*dRds_dT = (1.0 + T0) * drds0_dT;*/ dRds_dT = (1.0 + T0) * drds0_dT + rds0 * dT0_dT; else dRds_dT = 0.0; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = rds0 * (0.8 + T0) * T1; /* LFW_FD add/fix 4 derivatives */ dRds_dVg = (rds0*T1- 20*Rds*T1) * dT0_dVg; dRds_dVb = (rds0*T1- 20*Rds*T1) * dT0_dVb; dRds_dVd = (rds0*T1- 20*Rds*T1) * dT0_dVd; dRds_dVe = (rds0*T1- 20*Rds*T1) * dT0_dVe; if (selfheat && (Rds!=0.0)) /*fix below expression Wagner */ /*dRds_dT = (0.8 + T0) * T1 * drds0_dT;*/ dRds_dT = (0.8 + T0) * T1 * drds0_dT + (rds0*T1- 20*Rds*T1) * dT0_dT; else dRds_dT = 0.0; } /* here->B4SOIrds = Rds; v2.2.3 bug fix */ /* v4.2 bugfix # 39 */ } here->B4SOIrds = Rds / here->B4SOInf; /* LFW_FD fix */ /* Calculate Abulk */ if (pParam->B4SOIa0 == 0.0) { Abulk0 = Abulk = 1.0; /* LFW_FD expand next 3 lines */ dAbulk_dVg = dAbulk_dVb = dAbulk_dVd = dAbulk_dVe = 0.0; dAbulk0_dVg = dAbulk0_dVb = dAbulk0_dVd = dAbulk0_dVe = 0.0; dAbulk0_dT = dAbulk_dT = 0.0; } else { T10 = pParam->B4SOIketa * Vbsh; if (T10 >= -0.9) { T11 = 1.0 / (1.0 + T10); /* LFW_FD add/fix 5 derivatives */ dT11_dVg = -pParam->B4SOIketa * T11 * T11 * dVbsh_dVg; dT11_dVb = -pParam->B4SOIketa * T11 * T11 * dVbsh_dVb; dT11_dVd = -pParam->B4SOIketa * T11 * T11 * dVbsh_dVd; dT11_dVe = -pParam->B4SOIketa * T11 * T11 * dVbsh_dVe; dT11_dT = -pParam->B4SOIketa * T11 * T11 * dVbsh_dT; } else { /* added to avoid the problems caused by Keta */ T12 = 1.0 / (0.8 + T10); T11 = (17.0 + 20.0 * T10) * T12; /* LFW_FD add/fix 5 derivatives */ dT11_dVg = (20.0-T11) * T12 * pParam->B4SOIketa * dVbsh_dVg; dT11_dVb = (20.0-T11) * T12 * pParam->B4SOIketa * dVbsh_dVb; dT11_dVd = (20.0-T11) * T12 * pParam->B4SOIketa * dVbsh_dVd; dT11_dVe = (20.0-T11) * T12 * pParam->B4SOIketa * dVbsh_dVe; dT11_dT = (20.0-T11) * T12 * pParam->B4SOIketa * dVbsh_dT; } /* v3.0 bug fix */ T10 = phi + pParam->B4SOIketas; T13 = (Vbsh * T11) / T10; /* LFW_FD add/fix 5 derivatives */ dT13_dVg = (Vbsh * dT11_dVg + T11 * dVbsh_dVg) / T10; dT13_dVb = (Vbsh * dT11_dVb + T11 * dVbsh_dVb) / T10; dT13_dVd = (Vbsh * dT11_dVd + T11 * dVbsh_dVd) / T10; dT13_dVe = (Vbsh * dT11_dVe + T11 * dVbsh_dVe) / T10; dT13_dT = (dVbsh_dT * T11 + Vbsh * dT11_dT - T13 * dphi_dT) / T10; /* limit 1/sqrt(1-T13) to 6, starting at T13=0.96 */ if (T13 < 0.96) { T14 = 1 / sqrt(1-T13); T10 = 0.5 * T14 / (1-T13); /* LFW_FD add/fix 5 derivatives */ dT14_dVg = T10 * dT13_dVg; dT14_dVb = T10 * dT13_dVb; dT14_dVd = T10 * dT13_dVd; dT14_dVe = T10 * dT13_dVe; dT14_dT = T10 * dT13_dT; } else { /* IBM tweak */ T11 = 1.0 / (1.0 - 1.0593220339*T13); T14 = (6.0169491525 - 6.3559322034 * T13) * T11; /* T10 = 0.0179546 * T11 * T11; never used - Wagner */ /* LFW_FD add/fix 5 derivatives */ dT14_dVg = (T14 * 1.0593220339 - 6.3559322034) * T11 * dT13_dVg; dT14_dVb = (T14 * 1.0593220339 - 6.3559322034) * T11 * dT13_dVb; dT14_dVd = (T14 * 1.0593220339 - 6.3559322034) * T11 * dT13_dVd; dT14_dVe = (T14 * 1.0593220339 - 6.3559322034) * T11 * dT13_dVe; dT14_dT = (T14 * 1.0593220339 - 6.3559322034) * T11 * dT13_dT; } /* v3.0 bug fix */ /* T10 = 0.5 * pParam->B4SOIk1eff / sqrt(phi + pParam->B4SOIketas); */ T10 = 0.5 * pParam->B4SOIk1ox * Lpe_Vb / sqrt(phi + pParam->B4SOIketas); /* v4.0 */ T1 = T10 * T14; /* LFW_FD add/fix 4 derivatives */ dT1_dVg = T10 * dT14_dVg; dT1_dVb = T10 * dT14_dVb; dT1_dVd = T10 * dT14_dVd; dT1_dVe = T10 * dT14_dVe; T9 = sqrt(pParam->B4SOIxj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->B4SOIa0 * T5; tmp3 = pParam->B4SOIweff + pParam->B4SOIb1; tmp4 = pParam->B4SOIb0 / tmp3; T2 = tmp2 + tmp4; /* LFW_FD add/fix 4 derivatives */ dT2_dVg = -tmp2 / tmp1 * pParam->B4SOIxj * dXdep_dVg / T9; dT2_dVb = -tmp2 / tmp1 * pParam->B4SOIxj * dXdep_dVb / T9; dT2_dVd = -tmp2 / tmp1 * pParam->B4SOIxj * dXdep_dVd / T9; dT2_dVe = -tmp2 / tmp1 * pParam->B4SOIxj * dXdep_dVe / T9; T6 = T5 * T5; T7 = T5 * T6; /* LFW_FD add 4 derivatives */ dT7_dVg = -3.0 * T7 / tmp1 * pParam->B4SOIxj * dXdep_dVg / T9; dT7_dVb = -3.0 * T7 / tmp1 * pParam->B4SOIxj * dXdep_dVb / T9; dT7_dVd = -3.0 * T7 / tmp1 * pParam->B4SOIxj * dXdep_dVd / T9; dT7_dVe = -3.0 * T7 / tmp1 * pParam->B4SOIxj * dXdep_dVe / T9; Abulk0 = 1 + T1 * T2; /* LFW_FD add/fix 4 derivatives */ dAbulk0_dVg = T1 * dT2_dVg + T2 * dT1_dVg; dAbulk0_dVb = T1 * dT2_dVb + T2 * dT1_dVb; dAbulk0_dVd = T1 * dT2_dVd + T2 * dT1_dVd; dAbulk0_dVe = T1 * dT2_dVe + T2 * dT1_dVe; T8 = pParam->B4SOIags * pParam->B4SOIa0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; /* LFW_FD add/fix 4 derivatives */ dAbulk_dVg = dAbulk0_dVg + dAbulk_dVg * dVgsteff_dVg - (T1 * pParam->B4SOIags * pParam->B4SOIa0 * dT7_dVg + T8 * dT1_dVg) * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T1 * T8 * dVgsteff_dVb - (T1 * pParam->B4SOIags * pParam->B4SOIa0 * dT7_dVb + T8 * dT1_dVb) * Vgsteff; dAbulk_dVd = dAbulk0_dVd - T1 * T8 * dVgsteff_dVd - (T1 * pParam->B4SOIags * pParam->B4SOIa0 * dT7_dVd + T8 * dT1_dVd) * Vgsteff; dAbulk_dVe = dAbulk0_dVe - T1 * T8 * dVgsteff_dVe - (T1 * pParam->B4SOIags * pParam->B4SOIa0 * dT7_dVe + T8 * dT1_dVe) * Vgsteff; /* 21 new lines Wagner */ /* need temperature derivs of Abulk & Abulk0 */ TL2 = phi + pParam->B4SOIketas; dTL1_dT = -0.5*T10/TL2*dphi_dT; /* TL2 = T14; not used - Wagner */ dTL3_dT = (0.5*pParam->B4SOIxj/T9)*dXdep_dT; dTL4_dT = -2*tmp2*dTL3_dT/tmp1; /* dTL5_dT = -T13*dphi_dT/(phi + pParam->B4SOIketas); not used - Wagner */ /* dTL6_dT = 0.5*T14*dTL5_dT/(1-T13); not used - Wagner */ /* fix line below - Wagner */ /* dTL7_dT = T10*dTL6_dT + T14*dTL1_dT; */ dTL7_dT = T10*dT14_dT + T14*dTL1_dT; dTL8_dT = -pParam->B4SOIags*pParam->B4SOIa0*6*T7*dTL3_dT/tmp1; dTL9_dT = -dTL7_dT*T8 - T1*dTL8_dT; if (selfheat) { dAbulk0_dT = T1*dTL4_dT + T2*dTL7_dT; dAbulk_dT = dAbulk0_dT + dTL9_dT*Vgsteff + dAbulk_dVg*dVgsteff_dT; } else { dAbulk0_dT = 0.0; dAbulk_dT = 0.0; } } if (Abulk0 < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk0); Abulk0 = (0.02 - Abulk0) * T9; /* fix line below - Wagner */ /* dAbulk0_dVb *= T9 * T9; */ T10 = (200.0 * Abulk0 - 1.0) * T9; /* LFW_FD add/fix 5 derivatives */ dAbulk0_dVg *= T10; dAbulk0_dVb *= T10; dAbulk0_dVd *= T10; dAbulk0_dVe *= T10; dAbulk0_dT *= T10; } if (Abulk < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk); Abulk = (0.02 - Abulk) * T9; /* fix line below - Wagner */ /* dAbulk_dVb *= T9 * T9; */ /* T10 = T9 * T9; 3.2 bug fix */ T10 = (200.0 * Abulk - 1.0) * T9; /* LFW_FD add/fix 5 derivatives */ dAbulk_dVg *= T10; /* 3.2 bug fix */ dAbulk_dVb *= T10; /* 3.2 bug fix */ dAbulk_dVd *= T10; /* 3.2 bug fix */ dAbulk_dVe *= T10; dAbulk_dT *= T10; } here->B4SOIAbulk = Abulk; /*v3.2 for noise */ /* Mobility calculation */ if (model->B4SOImtrlMod) { /* extend "then" block Wagner */ /*T14 = 2.0 * model->B4SOItype *(model->B4SOIphig - model->B4SOIeasub - 0.5 * Eg + 0.45); toxe_mob = model->B4SOIeot * model->B4SOIepsrsub / 3.9;} Bug fix #4 Jun 09 implementing Eeff correctly*/ T14 = 2.0 * model->B4SOItype *(model->B4SOIphig - model->B4SOIeasub - 0.5 * Eg + 0.45); toxe_mob = model->B4SOIeot * model->B4SOIepsrsub / 3.9; /* Bug fix #4 Jun 09 implementing Eeff correctly*/ /* 3 new lines Wagner */ if (selfheat) dT14_dT = - model->B4SOItype * dEg_dT; else dT14_dT = 0.0;} else { T14 = 0.0; /* extend "else" block Wagner */ /*toxe_mob = model->B4SOItox;}*/ toxe_mob = model->B4SOItox; dT14_dT = 0.0;} /* new line Wagner */ if (model->B4SOImobMod == 1) { T0 = Vgsteff + Vth + Vth - T14; T2 = ua + uc * Vbseff; T3 = T0 / toxe_mob; /* Bug fix #4 Jun 09 implementing Eeff correctly*/ T5 = T3 * (T2 + ub * T3); /* LFW_FD fix 5 derivatives */ dDenomi_dVg = (T2 + 2.0 * ub * T3) / toxe_mob * (dVgsteff_dVg + 2 * dVth_dVg) + T3 * uc * dVbseff_dVg; dDenomi_dVb = (T2 + 2.0 * ub * T3) / toxe_mob * (dVgsteff_dVb + 2 * dVth_dVb) + T3 * uc * dVbseff_dVb; dDenomi_dVd = (T2 + 2.0 * ub * T3) / toxe_mob * (dVgsteff_dVd + 2 * dVth_dVd) + T3 * uc * dVbseff_dVd; dDenomi_dVe = (T2 + 2.0 * ub * T3) / toxe_mob * (dVgsteff_dVe + 2 * dVth_dVe) + T3 * uc * dVbseff_dVe; if (selfheat) dDenomi_dT = (T2 + 2.0 * ub * T3) / toxe_mob * (2 * dVth_dT + dVgsteff_dT - dT14_dT) + (dua_dT + Vbseff * duc_dT + uc * dVbseff_dT + dub_dT * T3 ) * T3; else dDenomi_dT = 0.0; } else if (model->B4SOImobMod == 2) /* Bug fix #5 Jun 09 implementing Eeff correctly*/ { T5 = (Vgsteff -T14)/ toxe * (ua /* MobMod=2 does not use Eeff */ + uc * Vbseff + ub * (Vgsteff -T14) /* 'toxe' keeps code consistent with BSIMSOI4.1 Manual*/ / toxe); /* LFW_FD fix 5 derivatives */ dDenomi_dVg = (ua + uc * Vbseff + 2.0 * ub * (Vgsteff -T14) / toxe) / toxe * dVgsteff_dVg + (Vgsteff -T14) /toxe * uc * dVbseff_dVg; dDenomi_dVb = (ua + uc * Vbseff + 2.0 * ub * (Vgsteff -T14) / toxe) / toxe * dVgsteff_dVb + (Vgsteff -T14) /toxe * uc * dVbseff_dVb; dDenomi_dVd = (ua + uc * Vbseff + 2.0 * ub * (Vgsteff -T14) / toxe) / toxe * dVgsteff_dVd + (Vgsteff -T14) /toxe * uc * dVbseff_dVd; dDenomi_dVe = (ua + uc * Vbseff + 2.0 * ub * (Vgsteff -T14) / toxe) / toxe * dVgsteff_dVe + (Vgsteff -T14) / toxe * uc * dVbseff_dVe; if (selfheat) dDenomi_dT = (ua + uc * Vbseff + 2.0 * ub * (Vgsteff -T14) / toxe) / toxe * (dVgsteff_dT-dT14_dT) + (Vgsteff -T14)/ toxe * (dua_dT + Vbseff * duc_dT + uc * dVbseff_dT + dub_dT * (Vgsteff -T14)/ toxe); else dDenomi_dT = 0.0; } else if (model->B4SOImobMod == 3) /* mobMod == 3 */ { T0 = Vgsteff + Vth + Vth - T14; T2 = 1.0 + uc * Vbseff; T3 = T0 / toxe_mob; /* Bug fix #4 Jun 09 implementing Eeff correctly*/ T4 = T3 * (ua + ub * T3); T5 = T4 * T2; /* LFW_FD fix 5 derivatives */ dDenomi_dVg = (ua + 2.0 * ub * T3) * T2 * (dVgsteff_dVg + 2 * dVth_dVg) / toxe_mob + T4 * uc * dVbseff_dVg; dDenomi_dVb = (ua + 2.0 * ub * T3) * T2 * (dVgsteff_dVb + 2 * dVth_dVb) / toxe_mob + T4 * uc * dVbseff_dVb; dDenomi_dVd = (ua + 2.0 * ub * T3) * T2 * (dVgsteff_dVd + 2 * dVth_dVd) / toxe_mob + T4 * uc * dVbseff_dVd; dDenomi_dVe = (ua + 2.0 * ub * T3) * T2 * (dVgsteff_dVe + 2 * dVth_dVe) / toxe_mob + T4 * uc * dVbseff_dVe; if (selfheat) dDenomi_dT = (ua + 2.0 * ub * T3) * T2 * (dVgsteff_dT + 2 * dVth_dT) / toxe_mob + (dua_dT + dub_dT * T3) * T3 * T2 + T4 * (Vbseff * duc_dT + uc * dVbseff_dT); else dDenomi_dT = 0.0; } else /* mobMod == 4 */ { /*universal mobility*/ T0 = (Vgsteff + here->B4SOIvtfbphi1)* 1.0e-8 / toxe/6.0; T1 = exp(pParam->B4SOIeu * log(T0)); /* MobMod=4 does not use Eeff */ /* using 'toxe' keeps code consistent with BSIM4 formulation */ /* LFW_FD add/fix 5 derivatives */ dT1_dVg = T1 * pParam->B4SOIeu * 1.0e-8/ T0 / toxe/6.0 * dVgsteff_dVg; dT1_dVb = T1 * pParam->B4SOIeu * 1.0e-8/ T0 / toxe/6.0 * dVgsteff_dVb; dT1_dVd = T1 * pParam->B4SOIeu * 1.0e-8/ T0 / toxe/6.0 * dVgsteff_dVd; dT1_dVe = T1 * pParam->B4SOIeu * 1.0e-8/ T0 / toxe/6.0 * dVgsteff_dVe; dT1_dT = T1 * pParam->B4SOIeu * 1.0e-8/ T0 / toxe/6.0 * dVgsteff_dT; /*T2 = pParam->B4SOIua + pParam->B4SOIuc * Vbseff; */ /* v4.2 bugfix # 35 */ T2 = ua + uc * Vbseff; /*Coulombic*/ /* pParam->B4SOIucs = pParam->B4SOIucs * pow(TempRatio, pParam->B4SOIucste); Bug# 21 Jul09*/ /* pParam->B4SOIud = pParam->B4SOIud * pow(TempRatio, pParam->B4SOIud1) ; Bug# 21 Jul09 */ ucs = pParam->B4SOIucs * pow(TempRatio, pParam->B4SOIucste); ud = pParam->B4SOIud * pow(TempRatio, pParam->B4SOIud1) ; VgsteffVth = here->B4SOIvgsteffvth; /*T10 = exp(pParam->B4SOIucs * log(0.5 + 0.5 * Vgsteff/VgsteffVth));*/ /* T10 = exp(pParam->B4SOIucs * log(1.0 + Vgsteff/VgsteffVth)); Bug# 21 Jul09 */ /* T11 = pParam->B4SOIud/T10; Bug# 21 Jul09 */ T10 = exp(ucs * log(1.0 + Vgsteff/VgsteffVth)); /* Bug Fix # 21 Jul09*/ T11 = ud/T10; /* Bug Fix # 21 Jul09*/ /*dT11_dVg = - 0.5 * pParam->B4SOIucs * T11 /(0.5 + 0.5*Vgsteff/VgsteffVth)/VgsteffVth;*/ /* dT11_dVg = (pParam->B4SOIucs - 1.0)*pParam->B4SOIud/(VgsteffVth* exp((pParam->B4SOIucs-1.0) * log(1.0 + Vgsteff/VgsteffVth))); Bug# 21 Jul09*/ /* LFW_FD add/fix 5 derivatives */ dT11_dVg = - ud * ucs * exp(-(ucs+1.0) * log(1.0 + Vgsteff/VgsteffVth)) * dVgsteff_dVg / VgsteffVth; dT11_dVb = - ud * ucs * exp(-(ucs+1.0) * log(1.0 + Vgsteff/VgsteffVth)) * dVgsteff_dVb / VgsteffVth; dT11_dVd = - ud * ucs * exp(-(ucs+1.0) * log(1.0 + Vgsteff/VgsteffVth)) * dVgsteff_dVd / VgsteffVth; dT11_dVe = - ud * ucs * exp(-(ucs+1.0) * log(1.0 + Vgsteff/VgsteffVth)) * dVgsteff_dVe / VgsteffVth; dT11_dT = - ud * ucs * exp(-(ucs+1.0) * log(1.0 + Vgsteff/VgsteffVth)) * dVgsteff_dT / VgsteffVth; T5 = T1 * T2 + T11; /* LFW_FD add/fix 5 derivatives */ dDenomi_dVg = T2 * dT1_dVg + T1 * uc * dVbseff_dVg + dT11_dVg; dDenomi_dVb = T2 * dT1_dVb + T1 * uc * dVbseff_dVb + dT11_dVb; dDenomi_dVd = T2 * dT1_dVd + T1 * uc * dVbseff_dVd + dT11_dVd; dDenomi_dVe = T2 * dT1_dVe + T1 * uc * dVbseff_dVe + dT11_dVe; if (selfheat) dDenomi_dT = T2 * dT1_dT + T1 * (dua_dT + Vbseff * duc_dT + uc * dVbseff_dT) + dT11_dT; else dDenomi_dT = 0.0; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; dDenomi_dVe *= T9; /* LFW_FD new line */ if (selfheat) dDenomi_dT *= T9; else dDenomi_dT = 0.0; } here->B4SOIueff = ueff = u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; dueff_dVe = T9 * dDenomi_dVe; /* LFW_FD new line */ if (selfheat) dueff_dT = T9 * dDenomi_dT + du0temp_dT / Denomi; else dueff_dT = 0.0; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * vsattemp * model->B4SOIcox; WVCoxRds = WVCox * Rds; /* LFW_FD add 4 derivatives */ dWVCoxRds_dVg = WVCox * dRds_dVg + Rds * vsattemp * model->B4SOIcox * dWeff_dVg; dWVCoxRds_dVb = WVCox * dRds_dVb + Rds * vsattemp * model->B4SOIcox * dWeff_dVb; dWVCoxRds_dVd = WVCox * dRds_dVd + Rds * vsattemp * model->B4SOIcox * dWeff_dVd; dWVCoxRds_dVe = WVCox * dRds_dVe + Rds * vsattemp * model->B4SOIcox * dWeff_dVe; /* 5 lines new - Wagner */ if (selfheat) dWVCoxRds_dT = model->B4SOIcox * Rds * (vsattemp * dWeff_dT + Weff * dvsattemp_dT) + WVCox * dRds_dT; else dWVCoxRds_dT = 0; /* dWVCoxRds_dT = WVCox * dRds_dT + Weff * model->B4SOIcox * Rds * dvsattemp_dT; */ Esat = 2.0 * vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; dEsatL_dVe = T0 * dueff_dVe; /* LFW_FD new line */ if (selfheat) dEsatL_dT = T0 * dueff_dT + EsatL / vsattemp * dvsattemp_dT; else dEsatL_dT = 0.0; /* Sqrt() */ a1 = pParam->B4SOIa1; if (a1 == 0.0) { Lambda = pParam->B4SOIa2; /* LFW_FD add/fix 5 derivatives */ dLambda_dVg = 0.0; dLambda_dVb = 0.0; dLambda_dVd = 0.0; dLambda_dVe = 0.0; dLambda_dT = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->B4SOIa2; T1 = T0 - pParam->B4SOIa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->B4SOIa2 + T0 - 0.5 * (T1 + T2); /* LFW_FD add/fix 5 derivatives */ dLambda_dVg = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVg; dLambda_dVb = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVb; dLambda_dVd = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVd; dLambda_dVe = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVe; if (selfheat) { dT1_dT = - pParam->B4SOIa1 * dVgsteff_dT; dT2_dT = T1 * dT1_dT / T2; dLambda_dT = -0.5 * (dT1_dT + dT2_dT); } else dLambda_dT = 0.0; } else { T1 = pParam->B4SOIa2 + pParam->B4SOIa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->B4SOIa2); Lambda = 0.5 * (T1 + T2); /* LFW_FD add/fix 5 derivatives */ dLambda_dVg = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVg; dLambda_dVb = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVb; dLambda_dVd = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVd; dLambda_dVe = 0.5 * pParam->B4SOIa1 * (1.0 + T1 / T2) * dVgsteff_dVe; if (selfheat) { dT1_dT = pParam->B4SOIa1 * dVgsteff_dT; dT2_dT = T1 * dT1_dT / T2; dLambda_dT = 0.5 * (dT1_dT + dT2_dT); } else dLambda_dT = 0.0; } here->B4SOIAbovVgst2Vtm = Abulk /Vgst2Vtm; /* v2.2.3 bug fix */ if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; /* LFW_FD add/fix 5 derivatives */ dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + dVgsteff_dVg) * T1; dT0_dVd = -(Abulk * dEsatL_dVd + EsatL * dAbulk_dVd + dVgsteff_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + dVgsteff_dVb) * T1; dT0_dVe = -(Abulk * dEsatL_dVe + EsatL * dAbulk_dVe + dVgsteff_dVe) * T1; if (selfheat) dT0_dT = -(Abulk * dEsatL_dT + dVgst2Vtm_dT) * T1; else dT0_dT = 0.0; /* LFW_FD add/fix 5 derivatives */ dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0 *dVgsteff_dVg; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb + EsatL * T0 *dVgsteff_dVb; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd + EsatL * T0 *dVgsteff_dVd; dVdsat_dVe = T3 * dT0_dVe + T2 * dEsatL_dVe + EsatL * T0 *dVgsteff_dVe; if (selfheat) dVdsat_dT = T3 * dT0_dT + T2 * dEsatL_dT + EsatL * T0 * dVgst2Vtm_dT; else dVdsat_dT = 0.0; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); /* LFW_FD add/fix 4 derivatives */ dT0_dVg = 2.0 * ((2.0 * Abulk * WVCoxRds - 1.0 + 1.0 / Lambda) * dAbulk_dVg + Abulk * Abulk * dWVCoxRds_dVg - Abulk * dLambda_dVg / (Lambda * Lambda)); dT0_dVb = 2.0 * ((2.0 * Abulk * WVCoxRds - 1.0 + 1.0 / Lambda) * dAbulk_dVb + Abulk * Abulk * dWVCoxRds_dVb - Abulk * dLambda_dVb / (Lambda * Lambda)); dT0_dVd = 2.0 * ((2.0 * Abulk * WVCoxRds - 1.0 + 1.0 / Lambda) * dAbulk_dVd + Abulk * Abulk * dWVCoxRds_dVd - Abulk * dLambda_dVd / (Lambda * Lambda)); dT0_dVe = 2.0 * ((2.0 * Abulk * WVCoxRds - 1.0 + 1.0 / Lambda) * dAbulk_dVe + Abulk * Abulk * dWVCoxRds_dVe - Abulk * dLambda_dVe / (Lambda * Lambda)); if (selfheat) { if (Rds!=0.0) tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; else tmp4 = dvsattemp_dT / vsattemp; /*fix below expression Wagner */ /*dT0_dT = 2.0 * T8 * tmp4; */ /*dT0_dT = 2.0 * T8 * tmp4 */ /* + 2.0 * dAbulk_dT * (T9-1.0+1.0/Lambda) */ /* + 2.0 * Abulk * (WVCoxRds*dAbulk_dT-dLambda_dT/(Lambda*Lambda)); */ /*fix again below expression Wagner */ dT0_dT = 2.0 * dAbulk_dT * (T9-1.0+1.0/Lambda) + 2.0 * Abulk * (WVCoxRds*dAbulk_dT+Abulk*dWVCoxRds_dT-dLambda_dT/(Lambda*Lambda)); } else tmp4 = dT0_dT = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; /* LFW_FD add/fix 4 derivatives */ dT1_dVg = (2.0 / Lambda - 1.0) * dVgsteff_dVg - 2.0 * Vgst2Vtm * dLambda_dVg / (Lambda * Lambda) + EsatL * dAbulk_dVg + Abulk * dEsatL_dVg + 3.0 * (dVgsteff_dVg * Abulk * WVCoxRds + Vgst2Vtm * dAbulk_dVg * WVCoxRds + Vgst2Vtm * Abulk * dWVCoxRds_dVg); dT1_dVb = (2.0 / Lambda - 1.0) * dVgsteff_dVb - 2.0 * Vgst2Vtm * dLambda_dVb / (Lambda * Lambda) + EsatL * dAbulk_dVb + Abulk * dEsatL_dVb + 3.0 * (dVgsteff_dVb * Abulk * WVCoxRds + Vgst2Vtm * dAbulk_dVb * WVCoxRds + Vgst2Vtm * Abulk * dWVCoxRds_dVb); dT1_dVd = (2.0 / Lambda - 1.0) * dVgsteff_dVd - 2.0 * Vgst2Vtm * dLambda_dVd / (Lambda * Lambda) + EsatL * dAbulk_dVd + Abulk * dEsatL_dVd + 3.0 * (dVgsteff_dVd * Abulk * WVCoxRds + Vgst2Vtm * dAbulk_dVd * WVCoxRds + Vgst2Vtm * Abulk * dWVCoxRds_dVd); dT1_dVe = (2.0 / Lambda - 1.0) * dVgsteff_dVe - 2.0 * Vgst2Vtm * dLambda_dVe / (Lambda * Lambda) + EsatL * dAbulk_dVe + Abulk * dEsatL_dVe + 3.0 * (dVgsteff_dVe * Abulk * WVCoxRds + Vgst2Vtm * dAbulk_dVe * WVCoxRds + Vgst2Vtm * Abulk * dWVCoxRds_dVe); /* fix below "if" expresssion - Wagner */ /*if (selfheat) { tmp4 += dVgst2Vtm_dT / Vgst2Vtm; dT1_dT = (2.0 / Lambda - 1.0) * dVgst2Vtm_dT + Abulk * dEsatL_dT + 3.0 * T7 * tmp4; } else dT1_dT = 0.0; */ if (selfheat) dT1_dT = (2.0 / Lambda - 1.0) * dVgst2Vtm_dT - Vgst2Vtm * 2 * dLambda_dT / (Lambda*Lambda) + dAbulk_dT * EsatL + Abulk * dEsatL_dT + 3.0 * Vgst2Vtm * dAbulk_dT * WVCoxRds + 3.0 * dVgst2Vtm_dT * Abulk * WVCoxRds + 3.0 * T7 * tmp4; else dT1_dT = 0.0; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); /* LFW_FD add/fix 4 derivatives */ dT2_dVg = dVgsteff_dVg * (EsatL + 4.0 * T6) + Vgst2Vtm * (dEsatL_dVg + 2 * Vgst2Vtm * dWVCoxRds_dVg); dT2_dVb = dVgsteff_dVb * (EsatL + 4.0 * T6) + Vgst2Vtm * (dEsatL_dVb + 2 * Vgst2Vtm * dWVCoxRds_dVb); dT2_dVd = dVgsteff_dVd * (EsatL + 4.0 * T6) + Vgst2Vtm * (dEsatL_dVd + 2 * Vgst2Vtm * dWVCoxRds_dVd); dT2_dVe = dVgsteff_dVe * (EsatL + 4.0 * T6) + Vgst2Vtm * (dEsatL_dVe + 2 * Vgst2Vtm * dWVCoxRds_dVe); if (selfheat) /* fix below expression - Wagner */ /*dT2_dT = Vgst2Vtm * dEsatL_dT + EsatL * dVgst2Vtm_dT + 2.0 * T6 * (dVgst2Vtm_dT + Vgst2Vtm * tmp4); */ dT2_dT = dVgst2Vtm_dT * (EsatL + 2.0 * T6) + Vgst2Vtm * (dEsatL_dT + 2.0 * T6 * tmp4 + 2.0 * dVgst2Vtm_dT * WVCoxRds); else dT2_dT = 0.0; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; /* LFW_FD add/fix 2 derivatives */ dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - dT0_dVd * T2 - T0 * dT2_dVd) / T3 - Vdsat * dT0_dVd) / T0; dVdsat_dVe = (dT1_dVe - (T1 * dT1_dVe - dT0_dVe * T2 - T0 * dT2_dVe) / T3 - Vdsat * dT0_dVe) / T0; if (selfheat) dVdsat_dT = (dT1_dT - (T1 * dT1_dT - dT0_dT * T2 - T0 * dT2_dT) / T3 - Vdsat * dT0_dT) / T0; else dVdsat_dT = 0.0; } here->B4SOIvdsat = Vdsat; /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->B4SOIdelta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; dT1_dVe = dVdsat_dVe; /* LFW_FD new line */ dT1_dT = dVdsat_dT; T2 = sqrt(T1 * T1 + 4.0 * pParam->B4SOIdelta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->B4SOIdelta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; dT2_dVe = T0 * dT1_dVe + T3 * dVdsat_dVe; /* LFW_FD new line */ if (selfheat) dT2_dT = T0 * dT1_dT + T3 * dVdsat_dT; else dT2_dT = 0.0; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); dVdseff_dVe = dVdsat_dVe - 0.5 * (dT1_dVe + dT2_dVe); /* LFW_FD new line */ if (selfheat) dVdseff_dT = dVdsat_dT - 0.5 * (dT1_dT + dT2_dT); else dVdseff_dT = 0.0; if (Vdseff > Vds) Vdseff = Vds; /* This code is added to fixed the problem caused by computer precision when Vds is very close to Vdseff. */ diffVds = Vds - Vdseff; here->B4SOIVdseff = Vdseff; /* v2.2.3 bug fix */ /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; /* LFW_FD fix/add 4 derivatives */ dT0_dVg = dEsatL_dVg + dVdsat_dVg + 2.0 * (tmp4 * (WVCoxRds * dVgsteff_dVg + dWVCoxRds_dVg * Vgsteff) - T9 * (0.5 * (Abulk * dVdsat_dVg + dAbulk_dVg * Vdsat - Abulk * Vdsat * dVgsteff_dVg / Vgst2Vtm) / Vgst2Vtm)); dT0_dVb = dEsatL_dVb + dVdsat_dVb + 2.0 * (tmp4 * (WVCoxRds * dVgsteff_dVb + dWVCoxRds_dVb * Vgsteff) - T9 * (0.5 * (Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat - Abulk * Vdsat * dVgsteff_dVb / Vgst2Vtm) / Vgst2Vtm)); dT0_dVd = dEsatL_dVd + dVdsat_dVd + 2.0 * (tmp4 * (WVCoxRds * dVgsteff_dVd + dWVCoxRds_dVd * Vgsteff) - T9 * (0.5 * (Abulk * dVdsat_dVd + dAbulk_dVd * Vdsat - Abulk * Vdsat * dVgsteff_dVd / Vgst2Vtm) / Vgst2Vtm)); dT0_dVe = dEsatL_dVe + dVdsat_dVe + 2.0 * (tmp4 * (WVCoxRds * dVgsteff_dVe + dWVCoxRds_dVe * Vgsteff) - T9 * (0.5 * (Abulk * dVdsat_dVe + dAbulk_dVe * Vdsat - Abulk * Vdsat * dVgsteff_dVe / Vgst2Vtm) / Vgst2Vtm)); if (selfheat) { if (Rds!=0.0) tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; else tmp4 = dvsattemp_dT / vsattemp; /* fix below expression - Wagner */ /*dT0_dT = dEsatL_dT + dVdsat_dT + T7 * tmp4 * Vgsteff - T8 * (Abulk * dVdsat_dT - Abulk * Vdsat * dVgst2Vtm_dT / Vgst2Vtm); */ dT0_dT = dEsatL_dT + dVdsat_dT + T7 * (dVgsteff_dT + Vgsteff * tmp4) - T9 * (dAbulk_dT * Vdsat + Abulk * dVdsat_dT - Abulk * Vdsat * dVgst2Vtm_dT / Vgst2Vtm) / Vgst2Vtm; } else dT0_dT = 0.0; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; /* LFW_FD fix/add 4 derivatives */ dT1_dVg = -2.0 * dLambda_dVg / (Lambda * Lambda) + WVCoxRds * dAbulk_dVg + dWVCoxRds_dVg * Abulk; dT1_dVb = -2.0 * dLambda_dVb / (Lambda * Lambda) + WVCoxRds * dAbulk_dVb + dWVCoxRds_dVb * Abulk; dT1_dVd = -2.0 * dLambda_dVd / (Lambda * Lambda) + WVCoxRds * dAbulk_dVd + dWVCoxRds_dVd * Abulk; dT1_dVe = -2.0 * dLambda_dVe / (Lambda * Lambda) + WVCoxRds * dAbulk_dVe + dWVCoxRds_dVe * Abulk; if (selfheat) /* fix below expression - Wagner */ /*dT1_dT = T9 * tmp4;*/ dT1_dT = - 2.0 * dLambda_dT / (Lambda*Lambda) /* + T9 * tmp4 + WVCoxRds * dAbulk_dT; fix again */ + WVCoxRds * dAbulk_dT + dWVCoxRds_dT * Abulk; else dT1_dT = 0.0; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; /* LFW_FD fix/add 2 derivatives */ dVasat_dVd = (dT0_dVd - Vasat * dT1_dVd) / T1; dVasat_dVe = (dT0_dVe - Vasat * dT1_dVe) / T1; if (selfheat) dVasat_dT = (dT0_dT - Vasat * dT1_dT) / T1; else dVasat_dT = 0.0; /* Calculate VACLM */ if ((pParam->B4SOIpclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->B4SOIpclm * Abulk * pParam->B4SOIlitl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg = -T0 / Abulk * dAbulk_dVg; /* LFW_FD add 2 derivatives */ dT0_dVd = -T0 / Abulk * dAbulk_dVd; dT0_dVe = -T0 / Abulk * dAbulk_dVe; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); /* LFW_FD add/fix 4 derivatives */ dT1_dVg = Leff * (dAbulk_dVg + (dVgsteff_dVg - T2 * dEsatL_dVg) / EsatL); dT1_dVb = Leff * (dAbulk_dVb + (dVgsteff_dVb - T2 * dEsatL_dVb) / EsatL); dT1_dVd = Leff * (dAbulk_dVd + (dVgsteff_dVd - T2 * dEsatL_dVd) / EsatL); dT1_dVe = Leff * (dAbulk_dVe + (dVgsteff_dVe - T2 * dEsatL_dVe) / EsatL); /* fix below expression - Wagner */ /*if (selfheat) dT1_dT = -T2 * dEsatL_dT / Esat; */ if (selfheat) dT1_dT = Leff * (dAbulk_dT + (dVgsteff_dT - T2 * dEsatL_dT) / EsatL); else dT1_dT = 0.0; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; /* LFW_FD add/fix 2 derivatives */ dVACLM_dVd = (dT0_dVd * T1 + T0 * dT1_dVd) * diffVds + T9 * (1.0 - dVdseff_dVd); dVACLM_dVe = (dT0_dVe * T1 + T0 * dT1_dVe) * diffVds - T9 * dVdseff_dVe; if (selfheat) /* fix below expression - Wagner */ /*dVACLM_dT = T0 * dT1_dT * diffVds - T9 * dVdseff_dT;*/ dVACLM_dT = - T9 * dVdseff_dT + diffVds * (T0 * dT1_dT - T1 * T0 * dAbulk_dT / Abulk); else dVACLM_dT = 0.0; } else { VACLM = MAX_EXPL; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = dVACLM_dVe = dVACLM_dT = 0.0; /* LFW_FD expand line */ } /* Calculate VADIBL */ /* if (pParam->B4SOIthetaRout > 0.0) */ /* v4.2 bugfix # 36 */ if (thetaRout > 0.0) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; T1 = Vgst2Vtm + T8; /* LFW_FD fix/add 4 derivatives */ dT0_dVg = T8 * dVgsteff_dVg + Vgst2Vtm * (Abulk * dVdsat_dVg + dAbulk_dVg * Vdsat); dT0_dVb = T8 * dVgsteff_dVb + Vgst2Vtm * (Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat); dT0_dVd = T8 * dVgsteff_dVd + Vgst2Vtm * (Abulk * dVdsat_dVd + dAbulk_dVd * Vdsat); dT0_dVe = T8 * dVgsteff_dVe + Vgst2Vtm * (Abulk * dVdsat_dVe + dAbulk_dVe * Vdsat); /* LFW_FD fix/add 4 derivatives */ dT1_dVg = dVgsteff_dVg + Abulk * dVdsat_dVg + dAbulk_dVg * Vdsat; dT1_dVb = dVgsteff_dVb + Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = dVgsteff_dVd + Abulk * dVdsat_dVd + dAbulk_dVd * Vdsat; dT1_dVe = dVgsteff_dVe + Abulk * dVdsat_dVe + dAbulk_dVe * Vdsat; if (selfheat) { /* fix below expression - Wagner */ /*dT0_dT = dVgst2Vtm_dT * T8 + Abulk * Vgst2Vtm * dVdsat_dT;*/ dT0_dT = dVgst2Vtm_dT * T8 + Vgst2Vtm * dAbulk_dT * Vdsat + Vgst2Vtm * Abulk * dVdsat_dT; /* fix below expression - Wagner */ /*dT1_dT = dVgst2Vtm_dT + Abulk * dVdsat_dT;*/ dT1_dT = dVgst2Vtm_dT + dAbulk_dT * Vdsat + Abulk * dVdsat_dT; } else dT0_dT = dT1_dT = 0.0; T9 = T1 * T1; /*T2 = pParam->B4SOIthetaRout; */ /* v4.2 bugfix # 36 */ T2 = thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; /* LFW_FD fix/add 4 derivatives */ dVADIBL_dVg = (dVgsteff_dVg - (dT0_dVg - T0 * dT1_dVg /T1 )/T1) / T2; dVADIBL_dVb = (dVgsteff_dVb - (dT0_dVb - T0 * dT1_dVb /T1 )/T1) / T2; dVADIBL_dVd = (dVgsteff_dVd - (dT0_dVd - T0 * dT1_dVd /T1 )/T1) / T2; dVADIBL_dVe = (dVgsteff_dVe - (dT0_dVe - T0 * dT1_dVe /T1 )/T1) / T2; if (selfheat) /*fix below expression Wagner */ /*dVADIBL_dT = (dVgst2Vtm_dT - dT0_dT/T1 + T0*dT1_dT/T9) / T2;*/ dVADIBL_dT = (dVgst2Vtm_dT - dT0_dT/T1 + T0*dT1_dT/T9) / T2 - VADIBL * dthetaRout_dT / T2; else dVADIBL_dT = 0.0; T7 = pParam->B4SOIpdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; /* LFW_FD fix/add 4 derivatives */ dVADIBL_dVg = (dVADIBL_dVg - VADIBL * pParam->B4SOIpdiblb * dVbseff_dVg) * T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->B4SOIpdiblb * dVbseff_dVb) * T3; dVADIBL_dVd = (dVADIBL_dVd - VADIBL * pParam->B4SOIpdiblb * dVbseff_dVd) * T3; dVADIBL_dVe = (dVADIBL_dVe - VADIBL * pParam->B4SOIpdiblb * dVbseff_dVe) * T3; /*fix below expression Wagner */ /*if (selfheat) dVADIBL_dT *= T3;*/ if (selfheat) dVADIBL_dT = T3 * dVADIBL_dT - VADIBL*pParam->B4SOIpdiblb*dVbseff_dT/(1.0+T7); else dVADIBL_dT = 0.0; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; /* LFW_FD fix/add 4 derivatives */ dVADIBL_dVg = dVADIBL_dVg * T3 + VADIBL * (20.0 - T3) * T4 * pParam->B4SOIpdiblb * dVbseff_dVg; dVADIBL_dVb = dVADIBL_dVb * T3 + VADIBL * (20.0 - T3) * T4 * pParam->B4SOIpdiblb * dVbseff_dVb; dVADIBL_dVd = dVADIBL_dVd * T3 + VADIBL * (20.0 - T3) * T4 * pParam->B4SOIpdiblb * dVbseff_dVd; dVADIBL_dVe = dVADIBL_dVe * T3 + VADIBL * (20.0 - T3) * T4 * pParam->B4SOIpdiblb * dVbseff_dVe; /*fix below expression Wagner */ /*if (selfheat) dVADIBL_dT *= T3;*/ if (selfheat) dVADIBL_dT = T3 * dVADIBL_dT + VADIBL * (20.0*T4 - T3/(0.8 + T7)) * pParam->B4SOIpdiblb*dVbseff_dT; else dVADIBL_dT = 0.0; VADIBL *= T3; } } else { VADIBL = MAX_EXPL; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = dVADIBL_dVe = dVADIBL_dT = 0.0; /* LFW_FD enhance line */ } /* v4.0 DITS */ T0 = pParam->B4SOIpditsd * Vds; if (T0 > EXPL_THRESHOLD) { T1 = MAX_EXPL; dT1_dVd = 0; } else { T1 = exp(T0); dT1_dVd = T1 * pParam->B4SOIpditsd; } if (pParam->B4SOIpdits > MIN_EXPL) { T2 = 1.0 + model->B4SOIpditsl * Leff; VADITS = (1.0 + T2 * T1) / pParam->B4SOIpdits; dVADITS_dVg = VADITS * dFP_dVg; /* LFW_FD fix/add 3 derivatives */ dVADITS_dVd = VADITS * dFP_dVd + FP * T2 * dT1_dVd / pParam->B4SOIpdits; dVADITS_dVb = VADITS * dFP_dVb; dVADITS_dVe = VADITS * dFP_dVe; VADITS *= FP; if (selfheat) dVADITS_dT = VADITS * dFP_dT / FP; else dVADITS_dT = 0.0; } else { VADITS = MAX_EXPL; dVADITS_dVg = dVADITS_dVd = dVADITS_dVb = dVADITS_dVe = dVADITS_dT = 0; /* LFW_FD enhance line */ } /* Calculate VA */ T8 = pParam->B4SOIpvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; /* LFW_FD fix/add 4 derivatives */ dT0_dVg = T8 * dVgsteff_dVg - T9 * dEsatL_dVg / EsatL; dT0_dVb = T8 * dVgsteff_dVb - T9 * dEsatL_dVb / EsatL; dT0_dVd = T8 * dVgsteff_dVd - T9 * dEsatL_dVd / EsatL; dT0_dVe = T8 * dVgsteff_dVe - T9 * dEsatL_dVe / EsatL; if (selfheat) /* fix below expression - Wagner */ /*dT0_dT = -T9 * dEsatL_dT / EsatL;*/ dT0_dT = T8 * dVgsteff_dT - T9 * dEsatL_dT / EsatL; else dT0_dT = 0.0; } else /* Added to avoid the discontinuity problems caused by pvag */ { TL1 = T1 = 1.0 / (17.0 + 20.0 * T9); /* change LHS name - Wagner */ T0 = (0.8 + T9) * T1; T1 *= T1; T9 *= T1 / EsatL; /* LFW_FD fix/add 4 derivatives */ dT0_dVg = (1.0 - 20.0 * T0) * TL1 * (T8 * dVgsteff_dVg - T9 * dEsatL_dVg / EsatL); dT0_dVb = (1.0 - 20.0 * T0) * TL1 * (T8 * dVgsteff_dVb - T9 * dEsatL_dVb / EsatL); dT0_dVd = (1.0 - 20.0 * T0) * TL1 * (T8 * dVgsteff_dVd - T9 * dEsatL_dVd / EsatL); dT0_dVe = (1.0 - 20.0 * T0) * TL1 * (T8 * dVgsteff_dVe - T9 * dEsatL_dVe / EsatL); if (selfheat) /* fix below expression - Wagner */ /*dT0_dT = -T9 * dEsatL_dT;*/ dT0_dT = TL1 * (1.0 - 20.0 * T0) * (T8 * dVgsteff_dT - T8 * Vgsteff * dEsatL_dT / EsatL); else dT0_dT = 0.0; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; dT1_dVe = (tmp1 * dVADIBL_dVe + tmp2 * dVACLM_dVe) / tmp3; /* LFW_FD new line */ if (selfheat) /*fix below expression - Wagner */ /*dT1_dT = (tmp1 * dVADIBL_dT + tmp2 * dVACLM_dT ) / tmp3;*/ dT1_dT = (dVACLM_dT * VADIBL + VACLM * dVADIBL_dT - T1 * (dVACLM_dT + dVADIBL_dT))/ (VACLM + VADIBL); else dT1_dT = 0.0; /* v4.0 adding DITS */ tmp1 = T1 * T1; tmp2 = VADITS * VADITS; tmp3 = T1 + VADITS; T2 = T1 * VADITS / tmp3; tmp3 *= tmp3; dT2_dVg = (tmp1 * dVADITS_dVg + tmp2 * dT1_dVg) / tmp3; dT2_dVd = (tmp1 * dVADITS_dVd + tmp2 * dT1_dVd) / tmp3; /* LFW_FD fix/add 2 derivatives */ dT2_dVb = (tmp1 * dVADITS_dVb + tmp2 * dT1_dVb) / tmp3; dT2_dVe = (tmp1 * dVADITS_dVe + tmp2 * dT1_dVe) / tmp3; if (selfheat) /*fix below expression - Wagner */ /*dT2_dT = (tmp1 * dVADITS_dT + tmp2 * dT1_dT ) / tmp3;*/ dT2_dT = (dT1_dT * VADITS + T1 * dVADITS_dT - T2 * (dT1_dT + dVADITS_dT))/(T1 + VADITS); else dT2_dT = 0.0; /* Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; if (selfheat) dVa_dT = dVasat_dT + T1 * dT0_dT + T0 * dT1_dT; else dVa_dT = 0.0; */ /* v4.0 */ Va = Vasat + T0 * T2; dVa_dVg = dVasat_dVg + T2 * dT0_dVg + T0 * dT2_dVg; dVa_dVd = dVasat_dVd + T2 * dT0_dVd + T0 * dT2_dVd; dVa_dVb = dVasat_dVb + T2 * dT0_dVb + T0 * dT2_dVb; dVa_dVe = dVasat_dVe + T2 * dT0_dVe + T0 * dT2_dVe; /* LFW_FD new line */ if (selfheat) dVa_dT = dVasat_dT + T2 * dT0_dT + T0 * dT2_dT; else dVa_dT = 0.0; /* Calculate Ids */ CoxWovL = model->B4SOIcox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff ; /* LFW_FD fix/add 3 derivatives */ dbeta_dVd = CoxWovL * dueff_dVd + beta * dWeff_dVd / Weff ; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff ; dbeta_dVe = CoxWovL * dueff_dVe + beta * dWeff_dVe / Weff ; /* fix below if expresssion - Wagner */ /*if (selfheat) dbeta_dT = CoxWovL * dueff_dT; */ if (selfheat) dbeta_dT = CoxWovL * dueff_dT + beta * dWeff_dT / Weff ; else dbeta_dT = 0.0; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; /* LFW_FD fix/add 4 derivatives */ dT0_dVg = -0.5 * (Abulk * dVdseff_dVg + dAbulk_dVg * Vdseff -Abulk * Vdseff * dVgsteff_dVg / Vgst2Vtm) / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff -Abulk * Vdseff * dVgsteff_dVb / Vgst2Vtm) / Vgst2Vtm; dT0_dVd = -0.5 * (Abulk * dVdseff_dVd + dAbulk_dVd * Vdseff -Abulk * Vdseff * dVgsteff_dVd / Vgst2Vtm) / Vgst2Vtm; dT0_dVe = -0.5 * (Abulk * dVdseff_dVe + dAbulk_dVe * Vdseff -Abulk * Vdseff * dVgsteff_dVe / Vgst2Vtm) / Vgst2Vtm; if (selfheat) /* fix first line of below expression - Wagner */ /*dT0_dT = -0.5 * (Abulk * dVdseff_dT */ dT0_dT = -0.5 * (Abulk * dVdseff_dT + dAbulk_dT * Vdseff - Abulk * Vdseff / Vgst2Vtm * dVgst2Vtm_dT) / Vgst2Vtm; else dT0_dT = 0.0; fgche1 = Vgsteff * T0; /* LFW_FD fix/add 4 derivatives */ dfgche1_dVg = Vgsteff * dT0_dVg + dVgsteff_dVg * T0; dfgche1_dVb = Vgsteff * dT0_dVb + dVgsteff_dVb * T0; dfgche1_dVd = Vgsteff * dT0_dVd + dVgsteff_dVd * T0; dfgche1_dVe = Vgsteff * dT0_dVe + dVgsteff_dVe * T0; /* fix below expression - Wagner */ /*if (selfheat) dfgche1_dT = Vgsteff * dT0_dT;*/ if (selfheat) dfgche1_dT = Vgsteff * dT0_dT + T0 * dVgsteff_dT; else dfgche1_dT = 0.0; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; dfgche2_dVe = (dVdseff_dVe - T9 * dEsatL_dVe) / EsatL; /* LFW_FD new line */ if (selfheat) dfgche2_dT = (dVdseff_dT - T9 * dEsatL_dT) / EsatL; else dfgche2_dT = 0.0; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; /* LFW_FD add 1 derivative */ dgche_dVe = (beta * dfgche1_dVe + fgche1 * dbeta_dVe - gche * dfgche2_dVe) / fgche2; if (selfheat) dgche_dT = (beta * dfgche1_dT + fgche1 * dbeta_dT - gche * dfgche2_dT) / fgche2; else dgche_dT = 0.0; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; IdlovVdseff = gche / T0; /* Whoa, these formulas for the derivatives of Idl are convoluted, but I verified them to be correct */ dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; /* LFW_FD fix/add 3 derivatives */ dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd - Idl * dRds_dVd * gche) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; dIdl_dVe = (gche * dVdseff_dVe + T9 * dgche_dVe - Idl * dRds_dVe * gche) / T0; if (selfheat) dIdl_dT = (gche * dVdseff_dT + T9 * dgche_dT - Idl * dRds_dT * gche) / T0; else dIdl_dT = 0.0; T9 = diffVds / Va; T0 = 1.0 + T9; here->B4SOIids = Ids = Idl * T0 / here->B4SOInseg; /* LFW_FD add 4 derivatives */ dIds_dVg = (dIdl_dVg * T0 - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va)/ here->B4SOInseg; dIds_dVb = (dIdl_dVb * T0 - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va)/ here->B4SOInseg; dIds_dVd = (dIdl_dVd * T0 + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va)/ here->B4SOInseg; dIds_dVe = (dIdl_dVe * T0 - Idl * (dVdseff_dVe + T9 * dVa_dVe) / Va)/ here->B4SOInseg; /* 5 new lines Wagner */ if (selfheat) dIds_dT = dIdl_dT * T0 / here->B4SOInseg + Idl * (-dVdseff_dT/Va -diffVds/Va/Va*dVa_dT) / here->B4SOInseg; else dIds_dT = 0.0; here->B4SOIidovVds = IdlovVdseff * T0 / here->B4SOInseg; /* v4.0 bug fix */ /* IdovVds = IdlovVdseff * T0 / here->B4SOInseg; LFW_FD not needed */ Gm0 = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; Gds0 = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; Gmb0 = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; Gme0 = dIdl_dVe * T0 - Idl * (dVdseff_dVe + T9 * dVa_dVe) / Va; /* LFW_FD new line */ /*Gmc = 0.0; LFW_FD not used */ if (selfheat) GmT0 = T0 * dIdl_dT - Idl * (dVdseff_dT + T9 * dVa_dT) / Va; else GmT0 = 0.0; /* This includes all dependencies from Vgsteff, Vbseff */ /*Gm = (Gm0 * dVgsteff_dVg+ Gmb0 * dVbseff_dVg) / here->B4SOInseg; v3.0 */ /*Gmb = (Gm0 * dVgsteff_dVb + Gmb0 * dVbseff_dVb) / here->B4SOInseg; */ /*Gds = (Gm0 * dVgsteff_dVd+ Gmb0 * dVbseff_dVd + Gds0) / here->B4SOInseg; v3.0 */ /*Gme = (Gm0 * dVgsteff_dVe + Gmb0 * dVbseff_dVe) / here->B4SOInseg; v3.0 */ /* LFW_FD fix 4 derivatives */ Gm = dIds_dVg; Gmb = dIds_dVb; Gds = dIds_dVd; Gme = dIds_dVe; if (selfheat) /* fix below expression Wagner */ /* GmT = (Gm0 * dVgsteff_dT + Gmb0 * dVbseff_dT + GmT0) / here->B4SOInseg; v3.0 */ GmT = dIds_dT; else GmT = 0.0; /* LFW_FD flexilint inits */ Ibsdif = dIbsdif_dVb = dIbsdif_dT = 0; Ibddif = dIbddif_dVb = dIbddif_dT = 0; Ibs1 = dIbs1_dVb = dIbs1_dT = Ibd1 = dIbd1_dVb = dIbd1_dVd = dIbd1_dT = 0; Ibs2 = dIbs2_dVb = dIbs2_dT = Ibd2 = dIbd2_dVb = dIbd2_dVd = dIbd2_dT = 0; Ibs3 = dIbs3_dVb = dIbs3_dT = Ibd3 = dIbd3_dVb = dIbd3_dVd = dIbd3_dT = 0; Ibs4 = dIbs4_dVb = dIbs4_dT = Ibd4 = dIbd4_dVb = dIbd4_dVd = dIbd4_dT = 0; Igisl = Ggisls = Ggislg = Ggislb = 0.0; dIc_dVd = dIc_dVb = 0.0; /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { /* calculate GISL/GIDL current */ /*4.1*/ if(model->B4SOImtrlMod == 0) T0 = 3.0 * 3.9 / epsrox * toxe; else T0 = model->B4SOIepsrsub * toxe / epsrox; if (model->B4SOIgidlMod==0) { /*fix next if-then-else block Wagner */ if (model->B4SOImtrlMod==0) { /* T1 = (- Vds - Vgs_eff - egisl) / T0; *//* Bug # 25 Jul09*/ T1 = (- Vds - Vgd_eff - egisl) / T0; dTL1_dT = -dVgd_eff_dT / T0; } else { /* T1 = (- Vds - Vgs_eff - egisl+pParam->B4SOIvfbsd) / T0; */ T1 = (- Vds - Vgd_eff - egisl + pParam->B4SOIvfbsd) / T0; dTL1_dT = -dVgd_eff_dT / T0; } /* GISL */ if ((agisl <= 0.0) || (bgisl <= 0.0) || (T1 <= 0.0) || /*(cgisl < 0.0) || (Vbd > 0.0) ) */ /* v4.2 Bug # 24 Jul09*/ (cgisl < 0.0) || (Vbs > 0.0) ) Igisl = Ggisls = Ggislg = Ggislb = Ggislt = 0.0; /* enhanced line Wagner */ else { dT1_dVd = 1 / T0; /* dT1_dVg = - dT1_dVd * dVgs_eff_dVg; *//* Bug fix # 25 Jul09 */ dT1_dVg = - dT1_dVd * dVgd_eff_dVg; T2 = bgisl / T1; if (T2 < EXPL_THRESHOLD) { Igisl = wdios * agisl * T1 * exp(-T2); T3 = Igisl / T1 * (T2 + 1); Ggisls = T3 * dT1_dVd; /* Ggisls = T3 * dT1_dVg; */ /* Bug # 28 Jul09*/ Ggislg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggislt = T3 * dTL1_dT; else Ggislt = 0.0; } else { T3 = wdios * agisl * MIN_EXPL; Igisl = T3 * T1 ; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggislt = T3 * dTL1_dT; else Ggislt = 0.0; } if(cgisl >= MIN_EXPL) { T4 = Vbs * Vbs; T5 = -Vbs * T4; T6 = cgisl + T5; T7 = T5 / T6; T8 = 3.0 * cgisl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; /* 3 new lines Wagner */ if (selfheat) Ggislt = Ggislt * T7; else Ggislt = 0.0; Igisl *= T7; } else Ggislb = 0.0; } here->B4SOIigisl = Igisl; /* End of GISL */ /* enhance next if-then-else block Wagner */ if (model->B4SOImtrlMod==0) { T1 = (Vds - Vgs_eff - egidl) / T0; dTL1_dT = -dVgs_eff_dT / T0; } else { T1 = (Vds - Vgs_eff - egidl+pParam->B4SOIvfbsd) / T0; dTL1_dT = -dVgs_eff_dT / T0; } /* GIDL */ if ((agidl <= 0.0) || (bgidl <= 0.0) || (T1 <= 0.0) || (cgidl < 0.0) || (Vbd > 0.0) ) Igidl = Ggidld = Ggidlg = Ggidlb = Ggidlt = 0.0; /* enhanced line Wagner */ else { dT1_dVd = 1 / T0; dT1_dVg = - dT1_dVd * dVgs_eff_dVg; T2 = bgidl / T1; if (T2 < EXPL_THRESHOLD) { Igidl = wdiod * agidl * T1 * exp(-T2); T3 = Igidl / T1 * (T2 + 1); Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggidlt = T3 * dTL1_dT; else Ggidlt = 0.0; } else { T3 = wdiod * agidl * MIN_EXPL; Igidl = T3 * T1 ; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggidlt = T3 * dTL1_dT; else Ggidlt = 0.0; } if(cgidl >= MIN_EXPL) { T4 = Vbd * Vbd; T5 = -Vbd * T4; T6 = cgidl + T5; T7 = T5 / T6; T8 = 3.0 * cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; /* 3 new lines Wagner */ if (selfheat) Ggidlt = Ggidlt * T7; else Ggidlt = 0.0; Igidl *= T7; } else Ggidlb = 0.0; } here->B4SOIigidl = Igidl; /* End of GIDL*/ } else { /* enhance next if-then-else block Wagner */ if (model->B4SOImtrlMod==0) { /* T1 = (-Vds - rgisl*Vgs_eff - pParam->B4SOIegisl) / T0;*/ T1 = (-Vds - rgisl*Vgd_eff - egisl) / T0; /* Bug # 26 Jul09*/ dTL1_dT = -rgisl * dVgd_eff_dT / T0; } else { /* T1 = (-Vds - rgisl*Vgs_eff - pParam->B4SOIegisl+pParam->B4SOIvfbsd) / T0; */ T1 = (-Vds - rgisl*Vgd_eff - egisl + pParam->B4SOIvfbsd) / T0; /* Bug # 26 Jul09*/ dTL1_dT = -rgisl * dVgd_eff_dT / T0; } /* GISL */ if ((agisl <= 0.0) || (bgisl <= 0.0) || (T1 <= 0.0) || (cgisl < 0.0) ) Igisl = Ggisls = Ggislg = Ggislb = Ggislt = 0.0; /* enhanced line Wagner */ else { dT1_dVd = 1 / T0; /* dT1_dVg = - rgisl*dT1_dVd * dVgs_eff_dVg;*//*Bug fix #26*/ dT1_dVg = - rgisl*dT1_dVd * dVgd_eff_dVg; T2 = bgisl / T1; if (T2 < EXPL_THRESHOLD) { Igisl = wdios * agisl * T1 * exp(-T2); T3 = Igisl / T1 * (T2 + 1); Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggislt = T3 * dTL1_dT; else Ggislt = 0.0; } else { T3 = wdios * agisl * MIN_EXPL; Igisl = T3 * T1 ; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggislt = T3 * dTL1_dT; else Ggislt = 0.0; } T4 = Vbs - fgisl; /*if (T4==0) T5 =1; else T5 = kgisl/T4; T6 = exp(T5); if (T6B4SOIigisl = Igisl; /* End of GISL */ /* enhance next if-then-else block Wagner */ if (model->B4SOImtrlMod==0) { /*T1 = (Vds - rgidl*Vgs_eff - pParam->B4SOIegidl) / T0; *//* v4.2 bugfix #26 */ T1 = (Vds - rgidl*Vgs_eff - egidl) / T0; dTL1_dT = -rgidl * dVgs_eff_dT / T0; } else { /*T1 = (Vds - rgidl*Vgs_eff - pParam->B4SOIegidl+pParam->B4SOIvfbsd) / T0;*/ /* v4.2 bugfix #26 */ T1 = (Vds - rgidl * Vgs_eff - egidl + pParam->B4SOIvfbsd) / T0; dTL1_dT = -rgidl * dVgs_eff_dT / T0; } /* GIDL */ if ((agidl <= 0.0) || (bgidl <= 0.0) || (T1 <= 0.0) || (cgidl < 0.0) ) Igidl = Ggidld = Ggidlg = Ggidlb = Ggidlt = 0.0; /* enhanced line Wagner */ else { dT1_dVd = 1 / T0; dT1_dVg = - rgidl*dT1_dVd * dVgs_eff_dVg; T2 = bgidl / T1; if (T2 < EXPL_THRESHOLD) { Igidl = wdiod * agidl * T1 * exp(-T2); T3 = Igidl / T1 * (T2 + 1); Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggidlt = T3 * dTL1_dT; else Ggidlt = 0.0; } else { T3 = wdiod * agidl * MIN_EXPL; Igidl = T3 * T1 ; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; /* 3 new lines Wagner */ if (selfheat) Ggidlt = T3 * dTL1_dT; else Ggidlt = 0.0; } T4 = Vbd - fgidl; /*if (T4==0) T5 =1; else T5 = kgidl/T4; T6 = exp(T5); if (T6B4SOIigidl = Igidl; /* End of GIDL */ } /* calculate diode and BJT current */ WsTsi = wdios * model->B4SOItsi; WdTsi = wdiod * model->B4SOItsi; /* NVtm1 = Vtm * pParam->B4SOIndiode; v4.2 bugfix */ NVtm1 = Vtm * ndiode; if (selfheat) /*dNVtm1_dT = pParam->B4SOIndiode * dVtm_dT; v4.2 bugfix */ dNVtm1_dT = ndiode * dVtm_dT; else dNVtm1_dT = 0; T0 = vbs_jct / NVtm1; /* v4.0 */ dT0_dVb = 1.0 / NVtm1; if (selfheat) dT0_dT = -vbs_jct / NVtm1 / NVtm1 * dNVtm1_dT; else dT0_dT = 0; DEXP(T0, ExpVbsNVtm, T1); dExpVbsNVtm_dVb = T1 * dT0_dVb; if (selfheat) dExpVbsNVtm_dT = T1 * dT0_dT; else dExpVbsNVtm_dT = 0; /* NVtm1 = Vtm * pParam->B4SOIndioded; v4.2 bugfix */ NVtm1 = Vtm * ndioded; /* v4.0 drain side */ if (selfheat) /*dNVtm1_dT = pParam->B4SOIndioded* dVtm_dT; v4.2 bugfix */ dNVtm1_dT = ndioded * dVtm_dT; else dNVtm1_dT = 0; T0 = vbd_jct / NVtm1; /* v4.0 */ dT0_dVb = 1.0 / NVtm1; dT0_dVd = -dT0_dVb; if (selfheat) dT0_dT = -vbd_jct / NVtm1 / NVtm1 * dNVtm1_dT; else dT0_dT = 0; DEXP(T0, ExpVbdNVtm, T1); dExpVbdNVtm_dVb = T1 * dT0_dVb; dExpVbdNVtm_dVd = -dExpVbdNVtm_dVb; if (selfheat) dExpVbdNVtm_dT = T1 * dT0_dT; else dExpVbdNVtm_dT = 0; /* Ibs1: diffusion current */ if (jdifs == 0) { Ibs1 = dIbs1_dVb = dIbs1_dT = 0; } else { T0 = WsTsi * jdifs; if (selfheat) dT0_dT = WsTsi * djdifs_dT; else dT0_dT = 0; Ibs1 = T0 * (ExpVbsNVtm - 1); dIbs1_dVb = T0 * dExpVbsNVtm_dVb; if (selfheat) dIbs1_dT = T0 * dExpVbsNVtm_dT + (ExpVbsNVtm - 1) * dT0_dT; else dIbs1_dT = 0; } /* Ibd1: diffusion current */ if (jdifd == 0) { Ibd1 = dIbd1_dVb = dIbd1_dVd = dIbd1_dT = 0; } else { T0 = WdTsi * jdifd; if (selfheat) dT0_dT = WdTsi * djdifd_dT; else dT0_dT = 0; Ibd1 = T0 * (ExpVbdNVtm - 1); dIbd1_dVb = T0 * dExpVbdNVtm_dVb; dIbd1_dVd = -dIbd1_dVb; if (selfheat) dIbd1_dT = T0 * dExpVbdNVtm_dT + (ExpVbdNVtm -1) * dT0_dT; else dIbd1_dT = 0; } /* Ibs2:recombination/trap-assisted tunneling current */ if (jrecs == 0) { Ibs2 = dIbs2_dVb = dIbs2_dT = 0; } else { /* forward bias */ /* NVtmf = 0.026 * nrecf0s bugfix_snps for DC swapping * (1 + pParam->B4SOIntrecf * (TempRatio - 1)); NVtmr = 0.026 * nrecr0s bugfix_snps for DC swapping * (1 + pParam->B4SOIntrecr * (TempRatio - 1)); */ NVtmf = Vtm00 * nrecf0s /* bugfix_snps for DC swapping*/ * (1 + pParam->B4SOIntrecf * (TempRatio - 1)); /* v4.3.1 -Tanvir */ NVtmr = Vtm00 * nrecr0s /* bugfix_snps for DC swapping*/ * (1 + pParam->B4SOIntrecr * (TempRatio - 1)); /* v4.3.1 -Tanvir */ if (selfheat) { /* dNVtmf_dT = nrecf0s * 0.026 bugfix_snps for DC swapping * pParam->B4SOIntrecf * dTempRatio_dT; dNVtmr_dT = nrecr0s * 0.026 bugfix_snps for DC swapping * pParam->B4SOIntrecr * dTempRatio_dT; */ dNVtmf_dT = nrecf0s * Vtm00 /* bugfix_snps for DC swapping*/ * pParam->B4SOIntrecf * dTempRatio_dT; /* v4.3.1 -Tanvir */ dNVtmr_dT = nrecr0s * Vtm00 /* bugfix_snps for DC swapping*/ * pParam->B4SOIntrecr * dTempRatio_dT; /* v4.3.1 -Tanvir */ } else dNVtmf_dT = dNVtmr_dT = 0; T0 = vbs_jct / NVtmf; /* v4.0 */ DEXP(T0,T10,T2); T4 = 1 / NVtmf; dT10_dVb = T4 * T2; if (selfheat) dT10_dT = - T4 * T2 * vbs_jct / NVtmf * dNVtmf_dT ; else dT10_dT = 0.0; /* reverse bias */ if ((vrec0s- vbs_jct) < 1e-3) { /* bugfix_snps for DC swapping*/ /* v2.2.3 bug fix */ T1 = 1e3; T0 = -vbs_jct / NVtmr * vrec0s * T1; /* bugfix_snps for DC swapping*/ T11 = -exp(T0); dT11_dVb = dT11_dT = 0; } else { T1 = 1 / (vrec0s - vbs_jct); /* bugfix_snps for DC swapping*/ T0 = -vbs_jct / NVtmr * vrec0s * T1; /* bugfix_snps for DC swapping*/ dT0_dVb = -vrec0s / NVtmr * /* bugfix_snps for DC swapping*/ (T1 + vbs_jct * T1 * T1) ; if (selfheat) dT0_dT = -T0 / NVtmr * dNVtmr_dT; else dT0_dT = 0; DEXP(T0, T11, T2); T11 = -T11; dT11_dVb = -T2 * dT0_dVb; if (selfheat) dT11_dT = -T2 * dT0_dT; else dT11_dT = 0; } T3 = WsTsi * jrecs; Ibs2 = T3 * (T10 + T11); dIbs2_dVb = T3 * (dT10_dVb + dT11_dVb); if (selfheat) dIbs2_dT = T3 * (dT10_dT + dT11_dT) + WsTsi * (T10 + T11) * djrecs_dT; else dIbs2_dT = 0; } if (jrecd == 0) { Ibd2 = dIbd2_dVb = dIbd2_dVd = dIbd2_dT = 0; } else { /*NVtmf = 0.026 * nrecf0d bugfix_snps for DC swapping * (1 + pParam->B4SOIntrecf * (TempRatio - 1)); NVtmr = 0.026 * nrecr0d bugfix_snps for DC swapping * (1 + pParam->B4SOIntrecr * (TempRatio - 1)); */ NVtmf = Vtm00 * nrecf0d /* bugfix_snps for DC swapping*/ * (1 + pParam->B4SOIntrecf * (TempRatio - 1)); /* v4.3.1 -Tanvir */ NVtmr = Vtm00 * nrecr0d /* bugfix_snps for DC swapping*/ * (1 + pParam->B4SOIntrecr * (TempRatio - 1)); /* v4.3.1 -Tanvir */ if (selfheat) { /* dNVtmf_dT = nrecf0d * 0.026 bugfix_snps for DC swapping * pParam->B4SOIntrecf * dTempRatio_dT; dNVtmr_dT = nrecr0d * 0.026 * pParam->B4SOIntrecr * dTempRatio_dT; bugfix_snps for DC swapping */ dNVtmf_dT = nrecf0d * Vtm00 /*bugfix_snps for DC swapping*/ * pParam->B4SOIntrecf * dTempRatio_dT; /* v4.3.1 -Tanvir */ dNVtmr_dT = nrecr0d * Vtm00 /* v4.3.1 -Tanvir */ * pParam->B4SOIntrecr * dTempRatio_dT; /* bugfix_snps for DC swapping*/ } else dNVtmf_dT = dNVtmr_dT = 0; T0 = vbd_jct / NVtmf; DEXP(T0,T10,T2); T4 = 1 / NVtmf; dT10_dVb = T4 * T2; if (selfheat) dT10_dT = - T4 * T2 * vbd_jct / NVtmf * dNVtmf_dT ; else dT10_dT = 0.0; if ((vrec0d - vbd_jct) < 1e-3) { /* bugfix_snps for DC swapping*/ /* v2.2.3 bug fix */ T1 = 1e3; T0 = -vbd_jct / NVtmr * vrec0d * T1; /* bugfix_snps for DC swapping*/ T11 = -exp(T0); dT11_dVb = dT11_dT = 0; } else { T1 = 1 / (vrec0d - vbd_jct); /* bugfix_snps for DC swapping*/ T0 = -vbd_jct / NVtmr * vrec0d * T1; /* bugfix_snps for DC swapping*/ dT0_dVb = -vrec0d / NVtmr /* bugfix_snps for DC swapping*/ * (T1 + vbd_jct * T1 * T1) ; if (selfheat) dT0_dT = -T0 / NVtmr * dNVtmr_dT; else dT0_dT = 0; DEXP(T0, T11, T2); T11 = - T11; dT11_dVb = -T2 * dT0_dVb; if (selfheat) dT11_dT = -T2 * dT0_dT; else dT11_dT = 0; } T3 = WdTsi * jrecd; Ibd2 = T3 * (T10 + T11); dIbd2_dVb = T3 * (dT10_dVb + dT11_dVb); dIbd2_dVd = -dIbd2_dVb; if (selfheat) dIbd2_dT = T3 * (dT10_dT + dT11_dT) + WdTsi * (T10 + T11) * djrecd_dT; else dIbd2_dT = 0; } /* Ibs3/Ibd3: recombination current in neutral body */ WTsi = pParam->B4SOIweff / here->B4SOInseg * model->B4SOItsi; if (jbjts == 0.0 && jbjtd == 0.0) { Ibs3 = dIbs3_dVb = dIbs3_dVd = dIbs3_dT = 0.0; Ibd3 = dIbd3_dVb = dIbd3_dVd = dIbd3_dT = 0.0; Ibsdif = dIbsdif_dVb = dIbsdif_dT = 0; /*Ibddif = dIbddif_dVb = dIbddif_dT = 0; v4.2 */ Ibddif = dIbddif_dVb = dIbddif_dT = 0; here->B4SOIic = Ic = Gcd = Gcb = GcT = 0.0; } else { Ien = WTsi * jbjts * pParam->B4SOIlratio; if (selfheat) dIen_dT = WTsi * djbjts_dT * pParam->B4SOIlratio; else dIen_dT = 0; /* high level injection of source side */ if ((Ehlis = Ahlis * (ExpVbsNVtm - 1)) < 1e-5) { Ehlis = dEhlis_dVb = dEhlis_dT = 0; EhlisFactor = 1; dEhlisFactor_dVb = dEhlisFactor_dT = 0; } else { dEhlis_dVb = Ahlis * dExpVbsNVtm_dVb; if (selfheat) dEhlis_dT = Ahlis * dExpVbsNVtm_dT + (ExpVbsNVtm - 1) * dAhlis_dT; else dEhlis_dT = 0; EhlisFactor = 1.0 / sqrt(1 + Ehlis); T0 = -0.5 * EhlisFactor / (1 + Ehlis); dEhlisFactor_dVb = T0 * dEhlis_dVb; if (selfheat) dEhlisFactor_dT = T0 * dEhlis_dT; else dEhlisFactor_dT = 0; } /* high level injection of drain side */ if ((Ehlid = Ahlid * (ExpVbdNVtm - 1)) < 1e-5) { Ehlid = dEhlid_dVb = dEhlid_dVd = dEhlid_dT = 0; EhlidFactor = 1; dEhlidFactor_dVb = dEhlidFactor_dT = 0; /* LFW_FD flexilint */ } else { dEhlid_dVb = Ahlid * dExpVbdNVtm_dVb; dEhlid_dVd = -dEhlid_dVb; if (selfheat) dEhlid_dT = Ahlid * dExpVbdNVtm_dT + (ExpVbdNVtm - 1) * dAhlid_dT; else dEhlid_dT = 0; EhlidFactor = 1.0 / sqrt(1 + Ehlid); T0 = -0.5 * EhlidFactor / (1 + Ehlid); dEhlidFactor_dVb = T0 * dEhlid_dVb; if (selfheat) dEhlidFactor_dT = T0 * dEhlid_dT; else dEhlidFactor_dT = 0; } /* v3.1.1 bug fix for Ibjt(L) discontinuity */ T0 = 1 - pParam->B4SOIarfabjt; T1 = T0 * Ien; if (selfheat) dT1_dT = T0 * dIen_dT; else dT1_dT = 0; Ibs3 = T1 * (ExpVbsNVtm - 1) * EhlisFactor; dIbs3_dVb = T1 * (dExpVbsNVtm_dVb * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dVb); dIbs3_dVd = 0; if (selfheat) dIbs3_dT = dT1_dT * (ExpVbsNVtm - 1) * EhlisFactor + T1 * (dExpVbsNVtm_dT * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dT); else dIbs3_dT = 0.0; Ien = WTsi * jbjtd * pParam->B4SOIlratio; if (selfheat) dIen_dT = WTsi * djbjtd_dT * pParam->B4SOIlratio; else dIen_dT = 0; T1 = T0 * Ien; if (selfheat) dT1_dT = T0 * dIen_dT; else dT1_dT = 0; Ibd3 = T1 * (ExpVbdNVtm - 1) * EhlidFactor; dIbd3_dVb = T1 * (dExpVbdNVtm_dVb * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dVb); dIbd3_dVd = -dIbd3_dVb; if (selfheat) dIbd3_dT = dT1_dT * (ExpVbdNVtm - 1) * EhlidFactor + T1 * (dExpVbdNVtm_dT * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dT); else dIbd3_dT = 0.0; /* effective diffusion current for capacitance calcu. */ Iendif = WTsi * jbjts * pParam->B4SOIlratiodif; if (selfheat) dIendif_dT = WTsi * djbjts_dT * pParam->B4SOIlratiodif; else dIendif_dT = 0; Ibsdif = Iendif * (ExpVbsNVtm - 1) * EhlisFactor; dIbsdif_dVb = Iendif * (dExpVbsNVtm_dVb * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dVb); if (selfheat) dIbsdif_dT = dIendif_dT * (ExpVbsNVtm - 1) * EhlisFactor + Iendif * (dExpVbsNVtm_dT * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dT); else dIbsdif_dT = 0; Iendif = WTsi * jbjtd * pParam->B4SOIlratiodif; if (selfheat) dIendif_dT = WTsi * djbjtd_dT * pParam->B4SOIlratiodif; else dIendif_dT = 0; Ibddif = Iendif * (ExpVbdNVtm - 1) * EhlidFactor; dIbddif_dVb = Iendif * (dExpVbdNVtm_dVb * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dVb); /*dIbddif_dVd = -dIbddif_dVb; v4.2 */ if (selfheat) dIbddif_dT = dIendif_dT * (ExpVbdNVtm - 1) * EhlidFactor + Iendif * (dExpVbdNVtm_dT * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dT); else dIbddif_dT = 0; /* Ic: Bjt collector current */ if ((here->B4SOIbjtoff == 1) || (Vds == 0.0)) { here->B4SOIic = Ic = Gcd = Gcb = GcT = 0.0; dIc_dVb = dIc_dVd = 0.0; /*bugfix_snps for setting zero */ } else { /* second order effects */ /* T0 = 1 + (Vbs + Vbd) / pParam->B4SOIvearly; v4.3 bugfix */ T0 = 1 + (vbs_jct + vbd_jct) / pParam->B4SOIvearly; dT0_dVb = 2.0 / pParam->B4SOIvearly; dT0_dVd = -1.0 / pParam->B4SOIvearly; T1 = Ehlis + Ehlid; dT1_dVb = dEhlis_dVb + dEhlid_dVb; dT1_dVd = dEhlid_dVd; if (selfheat) dT1_dT = dEhlis_dT + dEhlid_dT; else dT1_dT = 0; T3 = sqrt(T0 * T0 + 4 * T1); dT3_dVb = 0.5 / T3 * (2 * T0 * dT0_dVb + 4 * dT1_dVb); dT3_dVd = 0.5 / T3 * (2 * T0 * dT0_dVd + 4 * dT1_dVd); if (selfheat) dT3_dT = 2 * dT1_dT / T3; else dT3_dT = 0; T2 = (T0 + T3) / 2.0; dT2_dVb = (dT0_dVb + dT3_dVb) / 2.0; dT2_dVd = (dT0_dVd + dT3_dVd) / 2.0; if (selfheat) dT2_dT = dT3_dT /2.0; else dT2_dT = 0; if (T2 < .1) { E2ndFactor = 10.0; dE2ndFactor_dVb = dE2ndFactor_dVd = dE2ndFactor_dT = 0; } else { E2ndFactor = 1.0 / T2; dE2ndFactor_dVb = -E2ndFactor / T2 * dT2_dVb; dE2ndFactor_dVd = -E2ndFactor / T2 * dT2_dVd; if (selfheat) dE2ndFactor_dT = -E2ndFactor / T2 * dT2_dT; else dE2ndFactor_dT = 0; } T0 = pParam->B4SOIarfabjt * Ien; /* here Ien refers to the drain side to simplify the code */ if (selfheat) dT0_dT = pParam->B4SOIarfabjt * dIen_dT; else dT0_dT = 0; here->B4SOIic = Ic = T0 * (ExpVbsNVtm - ExpVbdNVtm) * E2ndFactor; Gcb = dIc_dVb = T0 * ((dExpVbsNVtm_dVb - dExpVbdNVtm_dVb) * E2ndFactor + (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dVb); Gcd = dIc_dVd = T0 * (-dExpVbdNVtm_dVd * E2ndFactor + (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dVd); if (selfheat) GcT = T0 * (dExpVbsNVtm_dT - dExpVbdNVtm_dT) * E2ndFactor + dT0_dT * (ExpVbsNVtm - ExpVbdNVtm) * E2ndFactor + T0 * (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dT; else GcT = 0; } } /* Ibs4/Ibd4 : tunneling */ if (jtuns == 0 && jtund == 0) { Ibs4 = Ibd4 = dIbs4_dVb = dIbs4_dT = dIbd4_dVb = dIbd4_dVd = dIbd4_dT = 0; } else { /* NVtm2 = 0.026 * ntuns; */ /* bugfix_snps for junction DC swapping*/ NVtm2 = Vtm00 * ntuns; /* bugfix_snps for junction DC swapping*/ /* v4.3.1 -Tanvir */ if ((vtun0s - vbs_jct) < 1e-3) /* bugfix_snps for junction DC swapping*/ { /* v2.2.3 bug fix */ T1=1e3; T0 = -vbs_jct / NVtm2 * vtun0s * T1; /* bugfix_snps for junction DC swapping*/ T1 = exp(T0); T3 = WsTsi * jtuns; Ibs4 = T3 * (1- T1); /*dIbs4_dVb = dIbs4_dT = 0; */ dIbs4_dVb = 0.0; if (selfheat) dIbs4_dT = (1 - T1) * WsTsi * djtuns_dT; else dIbs4_dT = 0; } else { T1 = 1 / (vtun0s - vbs_jct); /*bugfix for junction DC swapping*/ T0 = -vbs_jct / NVtm2 * vtun0s * T1; /*bugfix for junction DC swapping*/ dT0_dVb = -vtun0s / NVtm2 * (T1 + vbs_jct * T1 * T1) ; /*bugfix for junction DC swapping*/ DEXP(T0, T1, T2); T3 = WsTsi * jtuns; Ibs4 = T3 * (1- T1); dIbs4_dVb = -T3 * T2 * dT0_dVb; if (selfheat) dIbs4_dT = (1 - T1) * WsTsi * djtuns_dT; else dIbs4_dT = 0; } /*NVtm2 = 0.026 * ntund;*/ /* bugfix_snps for junction DC swapping*/ NVtm2 = Vtm00 * ntund; /* v4.3.1 -Tanvir */ if ((vtun0d - vbd_jct) < 1e-3) { /* bugfix_snps for junction DC swapping*/ /* v2.2.3 bug fix */ T1=1e3; T0 = -vbd_jct / NVtm2 * vtun0d * T1; /* bugfix_snps for junction DC swapping*/ T1 = exp(T0); T3 = WdTsi * jtund; Ibd4 = T3 * (1- T1); /*dIbd4_dVb = dIbd4_dT = 0;*/ dIbd4_dVb = 0; dIbd4_dVd = 0; if (selfheat) /* dIbs4_dT = (1 - T1) * WsTsi * djtuns_dT; Bug fix #8 Jun 09 'typo's corrected for Drain side */ /* else dIbs4_dT = 0; */ dIbd4_dT = (1 - T1) * WdTsi * djtund_dT; /* Fix */ else dIbd4_dT = 0; } else { T1 = 1 / (vtun0d - vbd_jct); /* bugfix_snps for junction DC swapping*/ T0 = -vbd_jct / NVtm2 * vtun0d * T1; /* bugfix_snps for junction DC swapping*/ dT0_dVb = -vtun0d / NVtm2 * (T1 + vbd_jct * T1 * T1) ; /* bugfix_snps for junction DC swapping*/ DEXP(T0, T1, T2); T3 = WdTsi * jtund; Ibd4 = T3 * (1- T1); dIbd4_dVb = -T3 * T2 * dT0_dVb; dIbd4_dVd = -dIbd4_dVb; if (selfheat) dIbd4_dT = (1 - T1) * WdTsi * djtund_dT; else dIbd4_dT = 0; } } here->B4SOIitun = - Ibd3 - Ibd4; Ibs = Ibs1 + Ibs2 + Ibs3 + Ibs4; Ibd = Ibd1 + Ibd2 + Ibd3 + Ibd4; Gjsb = dIbs1_dVb + dIbs2_dVb + dIbs3_dVb + dIbs4_dVb; Gjsd = dIbs3_dVd; if (selfheat) GjsT = dIbs1_dT + dIbs2_dT + dIbs3_dT + dIbs4_dT; else GjsT = 0.0; Gjdb = dIbd1_dVb + dIbd2_dVb + dIbd3_dVb + dIbd4_dVb; Gjdd = dIbd1_dVd + dIbd2_dVd + dIbd3_dVd + dIbd4_dVd; if (selfheat) GjdT = dIbd1_dT + dIbd2_dT + dIbd3_dT + dIbd4_dT; else GjdT = 0.0; } else /* v3.1 soiMod=2: ideal FD */ { here->B4SOIigidl= Igidl = Ggidld = Ggidlg = Ggidlb = Ggidlt = 0.0; /* LFW_FD inits */ here->B4SOIigisl= Igisl /* Bug fix #9 Jun 09 Code added to set Igisl components to zero */ = Ggisls = Ggislg = Ggislb = Ggislt = 0.0; /* This is an appx solution */ here->B4SOIitun = 0; Ibs = 0; Ibd = 0; Gjsb = 0.0; Gjdb = 0.0; Gjsd = 0.0; Gjdd = 0.0; /* here->B4SOIigidl= Igidl */ /* = Ggidld = Ggidlg = Ggidlb = Ggidlt = 0.0; LFW_FD enhance line */ /* here->B4SOIigisl= Igisl Bug fix #9 Jun 09 Code added to set Igisl components to zero */ /* = Ggisls = Ggislg = Ggislb = Ggislt = 0.0; This is an appx solution - LFW_FD enhance line */ /* Final code will comply with BSIM MG in future releases */ /* here->B4SOIitun = 0; */ /* LFW_FD next 21 lines; fix Ibs, Ibd, and derivatives Gjs* and Gjd* */ /* Ibs = 0; */ /* Ibd = 0; */ /* Add Gmin since body node is floating - LFW - DIDN'T Converge */ /* Connect to electrical source, since source is BSIM reference */ /* Also option to connect to both source and drain */ /* if (here->B4SOImode == 1) */ /* { */ /* Ibs = 1.0e-18 * vbs; */ /* Ibd = 1.0e-18 * vbd; */ /* } */ /* else */ /* { */ /* Ibs = 1.0e-18 * vbd; */ /* Ibd = 1.0e-18 * vbs; */ /* } */ /* Gjsb = 1.0e-18; */ /* Gjdb = 1.0e-18; */ /* Gjsd = 0.0; */ /* Gjdd = -1.0e-18; */ GjsT = 0; GjdT = 0; here->B4SOIic = Ic = Gcd = Gcb = GcT = 0.0; } if (here->B4SOImode > 0) { here->B4SOIibs = Ibs; here->B4SOIibd = Ibd; } else { here->B4SOIibd = Ibs; here->B4SOIibs = Ibd; } /* LFW_FD 12 new lines per flexilint */ Vfb = 0.0; Voxacc = dVoxacc_dVg = dVoxacc_dVd = dVoxacc_dVb = dVoxacc_dVe = 0.0; Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = dVoxdepinv_dT= dVoxdepinv_dVe = 0.0; Vgb = Vgs_eff - Vbs; /* flexilint - moved from below if stmt */ dVgb_dVg = dVgs_eff_dVg - dVbs_dVg; dVgb_dVd = - dVbs_dVd; dVgb_dVe = - dVbs_dVe; dVgb_dVb = - dVbs_dVb; dVoxacc_dT = 0.0; dVfb_dT = 0.0; /* v3.0: gate-tunneling */ if ((model->B4SOIigbMod != 0) || (model->B4SOIigcMod != 0)) { /* Calculate Vox first */ Vfb = model->B4SOItype * here->B4SOIvth0 /* v4.0 */ - phi - pParam->B4SOIk1eff * sqrtPhi; dVfb_dT = - dphi_dT - pParam->B4SOIk1eff*dsqrtPhi_dT; /* new line Wagner */ T3 = Vfb - Vgs_eff + Vbs - DELTA_3; /* LFW_FD add/fix 5 derivatives */ dT3_dVg = -dVgs_eff_dVg + dVbs_dVg; dT3_dVd = dVbs_dVd; dT3_dVe = dVbs_dVe; dT3_dVb = dVbs_dVb; dTL3_dT = dVfb_dT - dVgs_eff_dT + dVbs_dT; if (Vfb <= 0.0) { T0 = sqrt(T3 * T3 - 4.0 * DELTA_3 * Vfb); dT0_dVg = 1.0/(2.0 * T0) * 2.0*T3 * dT3_dVg; dT0_dVb = 0.5*(1.0/T0) * 2.0*T3 * dT3_dVb; /* LFW_FD add 2 derivatives */ dT0_dVd = T3 * dT3_dVd / T0; dT0_dVe = T3 * dT3_dVe / T0; dTL0_dT = (T3 * dTL3_dT - 2.0 * DELTA_3 * dVfb_dT) / T0; /* new line Wagner */ TL1 = -1.0; /* new line Wagner */ } else { T0 = sqrt(T3 * T3 + 4.0 * DELTA_3 * Vfb); dT0_dVg = 1.0/(2.0 * T0) * 2.0*T3 * dT3_dVg; dT0_dVb = 0.5*(1.0/T0) * 2.0*T3 * dT3_dVb; /* LFW_FD add 2 derivatives */ dT0_dVd = T3 * dT3_dVd / T0; dT0_dVe = T3 * dT3_dVe / T0; dTL0_dT = (T3 * dTL3_dT + 2.0 * DELTA_3 * dVfb_dT) / T0; /* new line Wagner */ TL1 = 1.0; /* new line Wagner */ } Vfbeff = Vfb - 0.5 * (T3 + T0); dVfbeff_dVg = -0.5 * (dT3_dVg + dT0_dVg); dVfbeff_dVb = -0.5 * (dT3_dVb + dT0_dVb); /* LFW_FD add 2 derivatives */ dVfbeff_dVd = -0.5 * (dT3_dVd + dT0_dVd); dVfbeff_dVe = -0.5 * (dT3_dVe + dT0_dVe); /* 2 new lines - Wagner */ if (selfheat) dVfbeff_dT = dVfb_dT - 0.5 * (dTL3_dT + dTL0_dT); else dVfbeff_dT = 0.0; Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; /* LFW_FD add/fix 2 derivatives */ dVoxacc_dVd = -dVfbeff_dVd; dVoxacc_dVe = -dVfbeff_dVe; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) Voxacc = dVoxacc_dVg = dVoxacc_dVb = dVoxacc_dVd = dVoxacc_dVe = 0.0; /* LFW_FD enhance line */ /* 2 new lines Wagner */ if (selfheat) dVoxacc_dT = dVfb_dT - dVfbeff_dT; else dVoxacc_dT = 0.0; T0 = Vgs_eff - Vgsteff - Vfbeff - Vbseff; /* LFW_FD add/fix 4 derivatives */ dT0_dVg = dVgs_eff_dVg - dVgsteff_dVg - dVfbeff_dVg - dVbseff_dVg; /* v3.0 */ dT0_dVd = -dVgsteff_dVd - dVbseff_dVd - dVfbeff_dVd; dT0_dVb = -dVgsteff_dVb - dVbseff_dVb - dVfbeff_dVb; dT0_dVe = -dVgsteff_dVe - dVbseff_dVe - dVfbeff_dVe; dVoxdepinv_dT = 0.0; /* flexilint */ if (selfheat) /* fix below expression Wagner */ /*dT0_dT = -dVgsteff_dT - dVbseff_dT; v3.0 */ dT0_dT = dVgs_eff_dT - dVgsteff_dT - dVfbeff_dT - dVbseff_dT; /* v3.0 */ if (pParam->B4SOIk1ox == 0.0) /* v4.0 */ { Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = dVoxdepinv_dT = 0.0; } else { if (T0 < 0.0) { T1 = T0/pParam->B4SOIk1ox; dT1_dVg = dT0_dVg/pParam->B4SOIk1ox; dT1_dVd = dT0_dVd/pParam->B4SOIk1ox; dT1_dVb = dT0_dVb/pParam->B4SOIk1ox; dT1_dVe = dT0_dVe/pParam->B4SOIk1ox; /* v3.0 */ if (selfheat) dT1_dT = dT0_dT/pParam->B4SOIk1ox; else dT1_dT = 0.0; /* new line Wagner */ } else { T1 = pParam->B4SOIk1ox/2*(-1 + sqrt(1 + 4*T0/pParam->B4SOIk1ox/pParam->B4SOIk1ox)); T2 = pParam->B4SOIk1ox/2 * 0.5/sqrt(1 + 4*T0/pParam->B4SOIk1ox/pParam->B4SOIk1ox) * 4/pParam->B4SOIk1ox/pParam->B4SOIk1ox; dT1_dVg = T2 * dT0_dVg; dT1_dVd = T2 * dT0_dVd; dT1_dVb = T2 * dT0_dVb; dT1_dVe = T2 * dT0_dVe; /* v3.0 */ if (selfheat) dT1_dT = T2 * dT0_dT; else dT1_dT = 0.0; /* new line Wagner */ } Voxdepinv = Vgs_eff - (T1*T1 + Vbs) - Vfb; /* LFW_FD add/fix 5 derivatives */ dVoxdepinv_dVg = dVgs_eff_dVg - (2.0*T1*dT1_dVg) - dVbs_dVg; dVoxdepinv_dVd = -(2.0*T1*dT1_dVd) - dVbs_dVd; dVoxdepinv_dVb = -(2.0*T1*dT1_dVb) - dVbs_dVb; dVoxdepinv_dVe = -(2.0*T1*dT1_dVe) - dVbs_dVe; if (selfheat) dVoxdepinv_dT = dVgs_eff_dT -(2.0*T1*dT1_dT) - dVbs_dT - dVfb_dT; else dVoxdepinv_dT = 0.0; } } /* gate-channel tunneling component */ /* LFW_FD next 6 lines - flexilint inits */ Igd = dIgd_dVg = dIgd_dVd = 0.0; Igcd = dIgcd_dVg = dIgcd_dVd = dIgcd_dVb = dIgcd_dVe = 0.0; Igs = dIgs_dVg = dIgs_dVs = 0.0; Igcs = dIgcs_dVg = dIgcs_dVd = dIgcs_dVb = dIgcs_dVe = 0.0; ExpVxNVt = 0.0; dIgcd_dT = dIgcs_dT = 0.0; if (model->B4SOIigcMod) { T0 = Vtm * pParam->B4SOInigc; /* 2 new lines Wagner */ if (selfheat) dT0_dT = pParam->B4SOInigc * dVtm_dT; else dT0_dT = 0.0; VxNVt = (Vgs_eff - model->B4SOItype * here->B4SOIvth0) / T0; /* Vth instead of Vth0 may be used */ /* 2 new lines Wagner */ if (selfheat) dVxNVt_dT = (dVgs_eff_dT - VxNVt * dT0_dT) /T0; else dVxNVt_dT = 0.0; if (VxNVt > EXPL_THRESHOLD) { Vaux = Vgs_eff - model->B4SOItype * here->B4SOIvth0; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; /* 3 new lines Wagner */ if (selfheat) dVaux_dT = dVgs_eff_dT; else dVaux_dT = 0.0; } else if (VxNVt < -EXPL_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXPL); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; /* 3 new lines Wagner */ if (selfheat) dVaux_dT = dT0_dT * log(1.0 + MIN_EXPL); else dVaux_dT = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = -dVaux_dVg * 0.0; dVaux_dVb = -dVaux_dVg * 0.0; dVaux_dVg *= dVgs_eff_dVg; /* Wagner New fix (moved from below into else block */ if (selfheat) dVaux_dT = dT0_dT*log(1.0+ExpVxNVt) + T0*ExpVxNVt*dVxNVt_dT/(1.0+ExpVxNVt); else dVaux_dT = 0.0; } T2 = Vgs_eff * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + Vgs_eff * dVaux_dVg; dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; /* 2 new lines Wagner */ if (selfheat) dT2_dT = dVgs_eff_dT * Vaux + Vgs_eff * dVaux_dT; else dT2_dT = 0.0; T11 = pParam->B4SOIAechvb; T12 = pParam->B4SOIBechvb; T3 = pParam->B4SOIaigc * pParam->B4SOIcigc - pParam->B4SOIbigc; T4 = pParam->B4SOIbigc * pParam->B4SOIcigc; T5 = T12 * (pParam->B4SOIaigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); /* LFW_FD fix derivative */ if (selfheat) dT5_dT = T12 * (T3 - 2 * T4 * Voxdepinv) * dVoxdepinv_dT; else dT5_dT = 0.0; if (T5 > EXPL_THRESHOLD) { T6 = MAX_EXPL; dT6_dVg = dT6_dVd = dT6_dVb = dT6_dVe = dT6_dT = 0.0; /* LFW_FD enhance line */ } else if (T5 < -EXPL_THRESHOLD) { T6 = MIN_EXPL; dT6_dVg = dT6_dVd = dT6_dVb = dT6_dVe = dT6_dT = 0.0; /* LFW_FD enhance line */ } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVe = dT6_dVg * dVoxdepinv_dVe; /* LFW_FD new line */ dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; /* LFW_FD fix - move from below into this else block */ if (selfheat) dT6_dT = T6 * dT5_dT; else dT6_dT = 0.0; } Igc = T11 * T2 * T6; dIgc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVe = T11 * (T2 * dT6_dVe); /* LFW_FD new line */ dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); /* 3 new lines Wagner */ if (selfheat) dIgc_dT = T11 * T2 * dT6_dT + T11 * dT2_dT * T6; else dIgc_dT = 0.0; T7 = -pParam->B4SOIpigcd * Vds; T8 = T7 * T7 + 2.0e-4; dT8_dVd = -2.0 * pParam->B4SOIpigcd * T7; if (T7 > EXPL_THRESHOLD) { T9 = MAX_EXPL; dT9_dVd = 0.0; } else if (T7 < -EXPL_THRESHOLD) { T9 = MIN_EXPL; dT9_dVd = 0.0; } else { T9 = exp(T7); dT9_dVd = -T9 * pParam->B4SOIpigcd; } T0 = T8 * T8; T1 = T9 - 1.0 + 1.0e-4; T10 = (T1 - T7) / T8; dT10_dVd = ((pParam->B4SOIpigcd + dT9_dVd) * T8 - (T1 - T7) * dT8_dVd) / T0; Igcs = Igc * T10; dIgcs_dVg = dIgc_dVg * T10; dIgcs_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcs_dVb = dIgc_dVb * T10; dIgcs_dVe = dIgc_dVe * T10; /* LFW_FD new line */ /* 3 new lines Wagner */ if (selfheat) dIgcs_dT = dIgc_dT * T10; else dIgcs_dT = 0.0; T1 = T9 - 1.0 - 1.0e-4; T10 = (T7 * T9 - T1) / T8; dT10_dVd = (-pParam->B4SOIpigcd * T9 + (T7 - 1.0) * dT9_dVd - T10 * dT8_dVd) / T8; Igcd = Igc * T10; dIgcd_dVg = dIgc_dVg * T10; dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10; dIgcd_dVe = dIgc_dVe * T10; /* LFW_FD new line */ /* 3 new lines Wagner */ if (selfheat) dIgcd_dT = dIgc_dT * T10; else dIgcd_dT = 0.0; here->B4SOIIgcs = Igcs; here->B4SOIgIgcsg = dIgcs_dVg; here->B4SOIgIgcsd = dIgcs_dVd; /* fix below expression Wagner */ /*here->B4SOIgIgcsb = dIgcs_dVb * dVbseff_dVb;*/ here->B4SOIgIgcsb = dIgcs_dVb; here->B4SOIgIgcse = dIgcs_dVe; /* LFW_FD new line */ here->B4SOIIgcd = Igcd; here->B4SOIgIgcdg = dIgcd_dVg; here->B4SOIgIgcdd = dIgcd_dVd; /* fix below expression Wagner */ /*here->B4SOIgIgcdb = dIgcd_dVb * dVbseff_dVb;*/ here->B4SOIgIgcdb = dIgcd_dVb; here->B4SOIgIgcde = dIgcd_dVe; /* LFW_FD new line */ T0 = vgs - pParam->B4SOIvfbsd; vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; /* T11 = pParam->B4SOIAechvbEdge; */ T13 = pParam->B4SOIAechvbEdges; T14 = pParam->B4SOIAechvbEdged; T12 = pParam->B4SOIBechvbEdge; T3 = pParam->B4SOIaigsd * pParam->B4SOIcigsd - pParam->B4SOIbigsd; T4 = pParam->B4SOIbigsd * pParam->B4SOIcigsd; T5 = T12 * (pParam->B4SOIaigsd + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXPL_THRESHOLD) { T6 = MAX_EXPL; dT6_dVg = 0.0; } else if (T5 < -EXPL_THRESHOLD) { T6 = MIN_EXPL; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgs_eff) * dvgs_eff_dvg; } /* Igs = T11 * T2 * T6; */ Igs = T13 * T2 * T6; dIgs_dVg = T13 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgs_dVs = -dIgs_dVg; T0 = vgd - pParam->B4SOIvfbsd; vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; T5 = T12 * (pParam->B4SOIaigsd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXPL_THRESHOLD) { T6 = MAX_EXPL; dT6_dVg = 0.0; } else if (T5 < -EXPL_THRESHOLD) { T6 = MIN_EXPL; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgd_eff) * dvgd_eff_dvg; } /* Igd = T11 * T2 * T6; */ Igd = T14 * T2 * T6; dIgd_dVg = T14 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; here->B4SOIIgs = Igs; here->B4SOIgIgsg = dIgs_dVg; here->B4SOIgIgss = dIgs_dVs; here->B4SOIIgd = Igd; here->B4SOIgIgdg = dIgd_dVg; here->B4SOIgIgdd = dIgd_dVd; } else { here->B4SOIIgcs = here->B4SOIgIgcsg = here->B4SOIgIgcsd = here->B4SOIgIgcsb = 0.0; here->B4SOIIgcd = here->B4SOIgIgcdg = here->B4SOIgIgcdd = here->B4SOIgIgcdb = 0.0; here->B4SOIIgs = here->B4SOIgIgsg = here->B4SOIgIgss = 0.0; here->B4SOIIgd = here->B4SOIgIgdg = here->B4SOIgIgdd = 0.0; } here->B4SOIgIgcss = -(here->B4SOIgIgcsg + here->B4SOIgIgcsd + here->B4SOIgIgcsb + here->B4SOIgIgcse); /* LFW_FD fix line */ here->B4SOIgIgcds = -(here->B4SOIgIgcdg + here->B4SOIgIgcdd + here->B4SOIgIgcdb + here->B4SOIgIgcde); /* LFW_FD fix line */ Vfb2 = dVox_dT = 0.0; /* gate-body tunneling component */ if ((model->B4SOIigbMod!= 0) && (here->B4SOIsoiMod != 2)) /* v3.2 */ /* v3.1: the Igb calculation is skipped for the ideal FD mode */ { OxideRatio = pParam->B4SOIoxideRatio; Vox = Voxdepinv; /* Voxeff is Vox limited below Voxh */ T0 = model->B4SOIvoxh; T1 = T0 - Vox - model->B4SOIdeltavox; T3 = sqrt(T1 * T1 + 4*model->B4SOIdeltavox * T0); Voxeff = T0 - 0.5 * (T1 + T3); dVoxeff_dVox = 0.5 * (1.0 + T1 / T3); Vox = Voxeff; dVox_dVg = dVoxdepinv_dVg * dVoxeff_dVox; dVox_dVd = dVoxdepinv_dVd * dVoxeff_dVox; dVox_dVb = dVoxdepinv_dVb * dVoxeff_dVox; dVox_dVe = dVoxdepinv_dVe * dVoxeff_dVox; /* v3.0 */ if (selfheat) /* v4.2 Bug # 23 Jul09 */ dVox_dT = dVoxdepinv_dT * dVoxeff_dVox; T0 = (Vox - model->B4SOIebg)/model->B4SOIvevb; if (selfheat) dT0_dT = dVox_dT /model->B4SOIvevb; DEXP(T0, T1, T2); /* T1=exp(T0), T2=dT1_dT0 */ if (selfheat) dT1_dT = T2 * dT0_dT; Vaux = model->B4SOIvevb * log(1 + T1); dVaux_dVg = T2 / (1 + T1) * dVox_dVg; dVaux_dVd = T2 / (1 + T1) * dVox_dVd; dVaux_dVb = T2 / (1 + T1) * dVox_dVb; dVaux_dVe = T2 / (1 + T1) * dVox_dVe; /* v3.0 */ if (selfheat) dVaux_dT = T2 / (1 + T1) * dVox_dT; /* LFW_FD fix line */ else dVaux_dT = 0.0; if (model->B4SOIvgb1 != 0) { T0 = 1 - Vox / model->B4SOIvgb1; dT0_dVox = -1.0/model->B4SOIvgb1; if (selfheat) dT0_dT = -dVox_dT / model->B4SOIvgb1; } else { T0 = 1; dT0_dVox = dT0_dT = 0.0; } if (T0 < 0.01) { T0 = 0.01; dT0_dVox = dT0_dT = 0.0; } /* v2.2.3 bug fix */ /* T1 = (Leff * Weff / here->B4SOInseg + here->B4SOIagbcpd/here->B4SOInf) * 3.7622e-7 * OxideRatio; T2 = -3.1051e10 * model->B4SOItoxqm; */ T1 = (Leff * Weff / here->B4SOInseg + here->B4SOIagbcpd/here->B4SOInf) * agb1 * OxideRatio; /* bugfix v4.3.1 -Tanvir */ T2 = bgb1 * model->B4SOItoxqm; /* bugfix v4.3.1 -Tanvir */ T3 = pParam->B4SOIalphaGB1; T4 = pParam->B4SOIbetaGB1; T6 = T2*(T3 - T4 * Vox) / T0; if (selfheat) dT6_dT = -T2 * T4 * dVox_dT / T0 - T6/T0 * dT0_dT; else dT6_dT = 0.0; /* flexilint */ DEXP(T6, T5, T7); /* T5=exp(T6), T7=dT5_dT6 */ dT5_dVg = -T7 * dVox_dVg * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVd = -T7 * dVox_dVd * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVb = -T7 * dVox_dVb * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVe = -T7 * dVox_dVe * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); /* v3.0 */ if (selfheat) dT5_dT = T7 * dT6_dT; else dT5_dT = 0.0; /* flexilint */ Igb1 = T1 * Vgb * Vaux * T5; /* LFW_FD fix 5 derivatives */ dIgb1_dVg = T1 * (Vgb*Vaux*dT5_dVg + dVgb_dVg*Vaux*T5 + Vgb*T5*dVaux_dVg) + Vgb * Vaux * T5 * Leff * dWeff_dVg * agb1 * OxideRatio / here->B4SOInseg; dIgb1_dVd = T1 * (Vgb*Vaux*dT5_dVd + Vgb*T5*dVaux_dVd + dVgb_dVd*Vaux*T5); dIgb1_dVb = T1 * (Vgb*Vaux*dT5_dVb + dVgb_dVb*Vaux*T5 + Vgb*T5*dVaux_dVb) + Vgb * Vaux * T5 * Leff * dWeff_dVb * agb1 * OxideRatio / here->B4SOInseg; dIgb1_dVe = T1 * (Vgb*Vaux*dT5_dVe + Vgb*T5*dVaux_dVe + dVgb_dVe*Vaux*T5); if (selfheat) dIgb1_dT = T1 * Vgb * (Vaux*dT5_dT + T5*dVaux_dT) + Vgb * Vaux * T5 * Leff * dWeff_dT * agb1 * OxideRatio / here->B4SOInseg + T1 * dVgs_eff_dT * Vaux * T5; else dIgb1_dT = 0.0; Vox = Voxacc; /* Voxeff is Vox limited below Voxh */ T0 = model->B4SOIvoxh; T1 = T0 - Vox - model->B4SOIdeltavox; T3 = sqrt(T1 * T1 + 4*model->B4SOIdeltavox * T0); Voxeff = T0 - 0.5 * (T1 + T3); dVoxeff_dVox = 0.5 * (1.0 + T1 / T3); Vox = Voxeff; dVox_dVg = dVoxacc_dVg * dVoxeff_dVox; dVox_dVd = dVoxacc_dVd * dVoxeff_dVox; dVox_dVe = dVoxacc_dVe * dVoxeff_dVox; /* LFW_FD new line */ dVox_dVb = dVoxacc_dVb * dVoxeff_dVox; /* fix below expression Wagner */ /*dVox_dT = 0;*/ dVox_dT = dVoxeff_dVox * dVoxacc_dT; T0 = (-Vgb+(Vfb))/model->B4SOIvecb; /* fix below expression Wagner */ /*if (selfheat) dT0_dT = 0;*/ if (selfheat) dT0_dT = dVfb_dT/model->B4SOIvecb; else dT0_dT = 0; DEXP(T0, T1, T2); /* T1=exp(T0), T2=dT1_dT0 */ /* fix below expression - Wagner */ /*if (selfheat) dT1_dT = 0;*/ if (selfheat) dT1_dT = T2 * dT0_dT; else dT1_dT = 0; Vaux = model->B4SOIvecb* log(1 + T1); /* LFW_FD fix/add 4 derivatives */ dVaux_dVg = - T2 / (1 + T1) * dVgb_dVg; dVaux_dVd = - T2 / (1 + T1) * dVgb_dVd; dVaux_dVe = - T2 / (1 + T1) * dVgb_dVe; dVaux_dVb = - T2 / (1 + T1) * dVgb_dVb; /* fix below expression - Wagner */ /*if (selfheat) dVaux_dT = 0;*/ if (selfheat) dVaux_dT = model->B4SOIvecb * dT1_dT / (1 + T1); else dVaux_dT = 0.0; if (model->B4SOIvgb2 != 0) { T0 = 1 - Vox / model->B4SOIvgb2; dT0_dVox = -1.0/model->B4SOIvgb2; if (selfheat) dT0_dT = -dVox_dT / model->B4SOIvgb2; } else { T0 = 1; dT0_dVox = dT0_dT =0.0; } if (T0 < 0.01) { T0 = 0.01; dT0_dVox = dT0_dT =0.0; } /* v2.2.3 bug fix */ /* T1 = (Leff * Weff / here->B4SOInseg + here->B4SOIagbcpd/here->B4SOInf) * 4.9758e-7 * OxideRatio; T2 = -2.357e10 * model->B4SOItoxqm; */ T1 = (Leff * Weff / here->B4SOInseg + here->B4SOIagbcpd/here->B4SOInf) * agb2 * OxideRatio; /* bugfix v4.3.1 -Tanvir */ T2 = bgb2 * model->B4SOItoxqm; /* bugfix v4.3.1 -Tanvir */ T3 = pParam->B4SOIalphaGB2; T4 = pParam->B4SOIbetaGB2; T6 = T2*(T3 - T4 * Vox) / T0; if (selfheat) dT6_dT = -T2 * T4 * dVox_dT / T0 - T6/T0 * dT0_dT; else dT6_dT = 0.0; /* flexilint */ DEXP(T6, T5, T7); /* T5=exp(T6), T7=dT5_dT6 */ dT5_dVg = -T7 * dVox_dVg * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVd = -T7 * dVox_dVd * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVb = -T7 * dVox_dVb * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVe = -T7 * dVox_dVe * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); /* LFW_FD new line */ if (selfheat) dT5_dT = T7 * dT6_dT; else dT5_dT = 0.0; /* flexilint */ Igb2 = T1 * Vgb * Vaux * T5; /* LFW_FD fix 5 derivatives */ dIgb2_dVg = T1 * (Vgb*Vaux*dT5_dVg + dVgb_dVg*Vaux*T5 + Vgb*T5*dVaux_dVg) + Vgb * Vaux * T5 * Leff * dWeff_dVg *agb2 * OxideRatio / here->B4SOInseg; dIgb2_dVd = T1 * (Vgb*Vaux*dT5_dVd + dVgb_dVd*Vaux*T5 + Vgb*T5*dVaux_dVd); dIgb2_dVb = T1 * (Vgb*Vaux*dT5_dVb + dVgb_dVb*Vaux*T5 + Vgb*T5*dVaux_dVb) + Vgb * Vaux * T5 * Leff * dWeff_dVb * agb2 * OxideRatio / here->B4SOInseg; dIgb2_dVe = T1 * (Vgb*Vaux*dT5_dVe + dVgb_dVe*Vaux*T5 + Vgb*T5*dVaux_dVe); if (selfheat) dIgb2_dT = T1 * Vgb * (Vaux*dT5_dT + T5*dVaux_dT) + Vgb * Vaux * T5 * Leff * dWeff_dT * agb2 * OxideRatio / here->B4SOInseg + T1 * dVgs_eff_dT * Vaux * T5; else dIgb2_dT = 0.0; /* Igb1 dominates in inversion region, while Igb2 dominates in accumulation */ /* v2.2.3 bug fix for residue at low Vgb */ if (Vgb >= 0) { Igb = Igb1; dIgb_dVg = dIgb1_dVg; dIgb_dVd = dIgb1_dVd; dIgb_dVb = dIgb1_dVb; dIgb_dVe = dIgb1_dVe; /* v3.0 */ dIgb_dT = dIgb1_dT; } else { Igb = Igb2; dIgb_dVg = dIgb2_dVg; dIgb_dVd = dIgb2_dVd; dIgb_dVb = dIgb2_dVb; dIgb_dVe = dIgb2_dVe; /* LFW_FD fix line */ dIgb_dT = dIgb2_dT; } /*Vfb2 = Vfb + 1.12; Bug fix #18 Jul09*/ Vfb2 = Vfb + eggbcp2; /* bugfix 4.3.1 -Tanvir */ } else { Igb = 0.0; dIgb_dVg = 0.0; dIgb_dVd = 0.0; dIgb_dVb = 0.0; dIgb_dVe = 0.0; /* v3.0 */ dIgb_dT = 0.0; } here->B4SOIig = Igb; here->B4SOIgigg = dIgb_dVg; here->B4SOIgigd = dIgb_dVd; here->B4SOIgigb = dIgb_dVb; here->B4SOIgige = dIgb_dVe; /* v3.0 */ here->B4SOIgigs = -(dIgb_dVg + dIgb_dVd + dIgb_dVb + dIgb_dVe); /* v3.0 */ here->B4SOIgigT = dIgb_dT; /* v4.1 */ /* gate tunneling component in the AGBCP2 region */ /* Vfb2 = Vfb + 1.12; Bug fix #18 Jul09 Code moved to 4370 where Vfb definition is valid*/ if ((model->B4SOIigbMod!= 0) && (here->B4SOIsoiMod != 2) && (here->B4SOIbodyMod != 0) && (here->B4SOIagbcp2 > 0) && (vgp < Vfb2)) /* v4.1: the Igb2_agbcp2 calculation is skipped for the ideal FD mode or if there is no "p" node */ { /* Vfb, Vfb2 are taken as constants in derivative calculation for simplicity */ T0 = vgp - Vfb2; T1 = sqrt(T0 * T0 + 1.0e-4); vgp_eff = 0.5 * (-T0 + T1 - 1.0e-2); dvgp_eff_dvg = 0.5 * (-1.0 + T0 / T1); dvgp_eff_dvp = -dvgp_eff_dvg; dvgp_eff_dT = 0.5 * (1.0 - T0 / T1) * dVfb_dT; /* LFW_FD new line */ /* T11=A* T12=B* */ /*T11 = (model->B4SOItype == NMOS) ? 3.42537e-7 : 4.97232e-7; T12 = (model->B4SOItype == NMOS) ? 1.16645e12 : 7.45669e11; */ T11 = (model->B4SOItype == NMOS) ? agbc2n : agbc2p; /* bugfix 4.3.1 -Tanvir */ T12 = (model->B4SOItype == NMOS) ? bgbc2n : bgbc2p; /* bugfix 4.3.1 -Tanvir */ T2 = vgp * vgp_eff; dT2_dVg = vgp * dvgp_eff_dvg + vgp_eff; dT2_dVp = vgp * dvgp_eff_dvp - vgp_eff; dT2_dT = vgp * dvgp_eff_dT; /* LFW_FD new line */ T3 = pParam->B4SOIaigbcp2 * pParam->B4SOIcigbcp2 - pParam->B4SOIbigbcp2; T4 = pParam->B4SOIbigbcp2 * pParam->B4SOIcigbcp2; T5 = (-T12) * model->B4SOItoxqm * (pParam->B4SOIaigbcp2 + T3 * vgp_eff - T4 * vgp_eff * vgp_eff); if (T5 > EXPL_THRESHOLD) { T6 = MAX_EXPL; dT6_dVg = 0.0; dT6_dVp = 0.0; dT6_dT = 0.0; /* LFW_FD new line */ } else if (T5 < -EXPL_THRESHOLD) { T6 = MIN_EXPL; dT6_dVg = 0.0; dT6_dVp = 0.0; dT6_dT = 0.0; /* LFW_FD new line */ } else { T6 = exp(T5); T7 = T6 * (-T12) * model->B4SOItoxqm * (T3 - 2.0 * T4 * vgp_eff); dT6_dVg = T7 * dvgp_eff_dvg; dT6_dVp = T7 * dvgp_eff_dvg; dT6_dT = T7 * dvgp_eff_dT; /* LFW_FD new line */ } T11 = T11 * here->B4SOIagbcp2 * pParam->B4SOIoxideRatio; Ig_agbcp2 = T11 * T2 * T6; dIg_agbcp2_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIg_agbcp2_dVp = -dIg_agbcp2_dVg; dIg_agbcp2_dT = T11 * (T2 * dT6_dT + T6 * dT2_dT); /* LFW_FD new line */ } else { Ig_agbcp2 = 0.0; dIg_agbcp2_dVg = 0.0; dIg_agbcp2_dVp = 0.0; dIg_agbcp2_dT = 0.0; /* LFW_FD new line */ } here->B4SOIigp = Ig_agbcp2; here->B4SOIgigpg = dIg_agbcp2_dVg; here->B4SOIgigpp = dIg_agbcp2_dVp; /* end of gate-body tunneling */ /* end of v3.0 gate-tunneling */ /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { Idsmosfet = 0.0; Ratio = dRatio_dVg = dRatio_dVd = dRatio_dVb = dRatio_dVe = dRatio_dT = 0.0; if (model->B4SOIiiiMod == 0 ) { /* calculate substrate current Iii */ if (pParam->B4SOIalpha0 <= 0.0) { Giig = Giib = Giid = GiiT = 0.0; Giie = 0; /* v3.0 */ here->B4SOIiii = Iii = Idsmosfet = dIiibjt_dVb = dIiibjt_dVd = dIiibjt_dT = 0.0; } else { Vdsatii0 = pParam->B4SOIvdsatii0 * (1 + model->B4SOItii * (TempRatio-1.0)) - pParam->B4SOIlii / Leff; if (selfheat) dVdsatii0_dT = pParam->B4SOIvdsatii0 * model->B4SOItii * dTempRatio_dT; else dVdsatii0_dT = 0; /* Calculate VgsStep */ T0 = pParam->B4SOIesatii * Leff; /* v3.0 bug fix: T0 is dimentionless (i.e., scaled by 1V) */ T1 = pParam->B4SOIsii0 * T0 / (1.0 + T0); T0 = 1 / (1 + pParam->B4SOIsii1 * Vgsteff); if (selfheat) dT0_dT = - pParam->B4SOIsii1 * T0 * T0 *dVgsteff_dT; else dT0_dT = 0; T3 = T0 + pParam->B4SOIsii2; T4 = Vgst * pParam->B4SOIsii1 * T0 * T0; T2 = Vgst * T3; dT2_dVg = T3 * (dVgst_dVg - dVth_dVb * dVbseff_dVg) - T4 * dVgsteff_dVg; /* v3.0 */ dT2_dVb = T3 * dVgst_dVb * dVbseff_dVb - T4 * dVgsteff_dVb; dT2_dVe = T3 * dVgst_dVb * dVbseff_dVe - T4 * dVgsteff_dVe; /* v3.0 */ dT2_dVd = T3 * (dVgst_dVd - dVth_dVb * dVbseff_dVd) - T4 * dVgsteff_dVd; /* v3.0 */ if (selfheat) /* fix below expression Wagner */ /*dT2_dT = -(dVth_dT + dVth_dVb * dVbseff_dT) * T3 + Vgst * dT0_dT; v3.0 */ dT2_dT = (dVgst_dT ) * T3 + Vgst * dT0_dT; /* v3.0 */ else dT2_dT = 0; T3 = 1 / (1 + pParam->B4SOIsiid * Vds); dT3_dVd = - pParam->B4SOIsiid * T3 * T3; VgsStep = T1 * T2 * T3; if (selfheat) dVgsStep_dT = T1 * T3 * dT2_dT; else dVgsStep_dT = 0; Vdsatii = Vdsatii0 + VgsStep; Vdiff = Vds - Vdsatii; dVdiff_dVg = - T1 * T3 * dT2_dVg; dVdiff_dVb = - T1 * T3 * dT2_dVb; dVdiff_dVe = - T1 * T3 * dT2_dVe; /* v3.0 */ dVdiff_dVd = 1.0 - T1 * (T3 * dT2_dVd + T2 * dT3_dVd); if (selfheat) dVdiff_dT = -(dVdsatii0_dT + dVgsStep_dT); else dVdiff_dT = 0; T0 = pParam->B4SOIbeta2 + pParam->B4SOIbeta1 * Vdiff + pParam->B4SOIbeta0 * Vdiff * Vdiff; if (T0 < 1e-5) { T0 = 1e-5; dT0_dVg = dT0_dVd = dT0_dVb = dT0_dT = 0.0; dT0_dVe = 0; /* v3.0 */ } else { T1 = pParam->B4SOIbeta1 + 2 * pParam->B4SOIbeta0 * Vdiff; dT0_dVg = T1 * dVdiff_dVg; dT0_dVb = T1 * dVdiff_dVb; dT0_dVd = T1 * dVdiff_dVd; dT0_dVe = T1 * dVdiff_dVe; /* v3.0 */ if (selfheat) dT0_dT = T1 * dVdiff_dT; else dT0_dT = 0; } if ((T0 < Vdiff / EXPL_THRESHOLD) && (Vdiff > 0.0)) { Ratio = pParam->B4SOIalpha0 * MAX_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } else if ((T0 < -Vdiff / EXPL_THRESHOLD) && (Vdiff < 0.0)) { Ratio = pParam->B4SOIalpha0 * MIN_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } else { Ratio = pParam->B4SOIalpha0 * exp(Vdiff / T0); T1 = Ratio / T0 / T0; dRatio_dVg = T1 * (T0 * dVdiff_dVg - Vdiff * dT0_dVg); dRatio_dVb = T1 * (T0 * dVdiff_dVb - Vdiff * dT0_dVb); dRatio_dVd = T1 * (T0 * dVdiff_dVd - Vdiff * dT0_dVd); /* v3.0 */ dRatio_dVe = T1 * (T0 * dVdiff_dVe - Vdiff * dT0_dVe); if (selfheat) dRatio_dT = T1 * (T0 * dVdiff_dT - Vdiff * dT0_dT); else dRatio_dT = 0; } /* Avoid too high ratio */ if (Ratio > 10.0) { Ratio = 10.0; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } T0 = Ids + pParam->B4SOIfbjtii * Ic; here->B4SOIiii = Iii = Ratio * T0; Giig = Ratio * Gm + T0 * dRatio_dVg; Giib = Ratio * (Gmb + pParam->B4SOIfbjtii * Gcb) + T0 * dRatio_dVb; Giid = Ratio * (Gds + pParam->B4SOIfbjtii * Gcd) + T0 * dRatio_dVd; /* v3.0 */ Giie = Ratio * Gme + T0 * dRatio_dVe; if (selfheat) GiiT = Ratio * (GmT + pParam->B4SOIfbjtii * GcT) + T0 * dRatio_dT; else GiiT = 0.0; } } else /*new Iii model*/ { /*Idsmosfet part*/ if (pParam->B4SOIalpha0 <= 0.0) { /* Giig = Giib = Giid = GiiT = 0.0; */ Giie = 0; /* v3.0 */ /* here->B4SOIiii = Iii = 0.0; v4.2 bugfix #38 */ /* Idsmosfet = 0.0; v4.2 bugfix #38 */ /*dIiibjt_dVb = 0.0; v4.2 bugfix #38 */ /*dIiibjt_dVd = 0.0; */ /*dIiibjt_dT = 0.0; */ Ratio = 0; /* v4.2 bugfix # 38 */ } else { Vdsatii0 = pParam->B4SOIvdsatii0 * (1 + model->B4SOItii * (TempRatio-1.0)) - pParam->B4SOIlii / Leff; if (selfheat) dVdsatii0_dT = pParam->B4SOIvdsatii0 * model->B4SOItii * dTempRatio_dT; else dVdsatii0_dT = 0; /* Calculate VgsStep */ T0 = pParam->B4SOIesatii * Leff; /* v3.0 bug fix: T0 is dimensionless (i.e., scaled by 1V) */ T1 = pParam->B4SOIsii0 * T0 / (1.0 + T0); T0 = 1 / (1 + pParam->B4SOIsii1 * Vgsteff); if (selfheat) dT0_dT = - pParam->B4SOIsii1 * T0 * T0 *dVgsteff_dT; else dT0_dT = 0; T3 = T0 + pParam->B4SOIsii2; T4 = Vgst * pParam->B4SOIsii1 * T0 * T0; T2 = Vgst * T3; dT2_dVg = T3 * (dVgst_dVg - dVth_dVb * dVbseff_dVg) - T4 * dVgsteff_dVg; /* v3.0 */ dT2_dVb = T3 * dVgst_dVb * dVbseff_dVb - T4 * dVgsteff_dVb; dT2_dVe = T3 * dVgst_dVb * dVbseff_dVe - T4 * dVgsteff_dVe; /* v3.0 */ dT2_dVd = T3 * (dVgst_dVd - dVth_dVb * dVbseff_dVd) - T4 * dVgsteff_dVd; /* v3.0 */ if (selfheat) /* fix below expression Wagner */ /*dT2_dT = -(dVth_dT + dVth_dVb * dVbseff_dT) * T3 + Vgst * dT0_dT; v3.0 */ dT2_dT = (dVgst_dT ) * T3 + Vgst * dT0_dT; /* v3.0 */ else dT2_dT = 0; T3 = 1 / (1 + pParam->B4SOIsiid * Vds); dT3_dVd = - pParam->B4SOIsiid * T3 * T3; VgsStep = T1 * T2 * T3; if (selfheat) dVgsStep_dT = T1 * T3 * dT2_dT; else dVgsStep_dT = 0; Vdsatii = Vdsatii0 + VgsStep; Vdiff = Vds - Vdsatii; dVdiff_dVg = - T1 * T3 * dT2_dVg; dVdiff_dVb = - T1 * T3 * dT2_dVb; dVdiff_dVe = - T1 * T3 * dT2_dVe; /* v3.0 */ dVdiff_dVd = 1.0 - T1 * (T3 * dT2_dVd + T2 * dT3_dVd); if (selfheat) dVdiff_dT = -(dVdsatii0_dT + dVgsStep_dT); else dVdiff_dT = 0; T0 = pParam->B4SOIbeta2 + pParam->B4SOIbeta1 * Vdiff + pParam->B4SOIbeta0 * Vdiff * Vdiff; if (T0 < 1e-5) { T0 = 1e-5; dT0_dVg = dT0_dVd = dT0_dVb = dT0_dT = 0.0; dT0_dVe = 0; /* v3.0 */ } else { T1 = pParam->B4SOIbeta1 + 2 * pParam->B4SOIbeta0 * Vdiff; dT0_dVg = T1 * dVdiff_dVg; dT0_dVb = T1 * dVdiff_dVb; dT0_dVd = T1 * dVdiff_dVd; dT0_dVe = T1 * dVdiff_dVe; /* v3.0 */ if (selfheat) dT0_dT = T1 * dVdiff_dT; else dT0_dT = 0; } if ((T0 < Vdiff / EXPL_THRESHOLD) && (Vdiff > 0.0)) { Ratio = pParam->B4SOIalpha0 * MAX_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } else if ((T0 < -Vdiff / EXPL_THRESHOLD) && (Vdiff < 0.0)) { Ratio = pParam->B4SOIalpha0 * MIN_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } else { Ratio = pParam->B4SOIalpha0 * exp(Vdiff / T0); T1 = Ratio / T0 / T0; dRatio_dVg = T1 * (T0 * dVdiff_dVg - Vdiff * dT0_dVg); dRatio_dVb = T1 * (T0 * dVdiff_dVb - Vdiff * dT0_dVb); dRatio_dVd = T1 * (T0 * dVdiff_dVd - Vdiff * dT0_dVd); /* v3.0 */ dRatio_dVe = T1 * (T0 * dVdiff_dVe - Vdiff * dT0_dVe); if (selfheat) dRatio_dT = T1 * (T0 * dVdiff_dT - Vdiff * dT0_dT); else dRatio_dT = 0; } /* Avoid too high ratio */ if (Ratio > 10.0) { Ratio = 10.0; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; dRatio_dVe = 0; /* v3.0 */ } T0 = Ids; Idsmosfet = Ratio * T0; } /*New BJT part*/ T0 = (pParam->B4SOIcbjtii + pParam->B4SOIebjtii * Leff)/Leff; Vbci= pParam->B4SOIvbci*(1.0+model->B4SOItvbci*(TempRatio-1.0)); /*T1 = Vbci - (Vbs - Vds); v4.3 bugfix*/ T1 = Vbci - (vbs_jct - Vds); T2 = pParam->B4SOImbjtii -1.0; /* if(T1 == 0.0) T3 =1.0; else T3 = -pParam->B4SOIabjtii * pow(T1,T2); */ if(T1<=0.0) T3 = 0.0; else T3 = -pParam->B4SOIabjtii * pow(T1,T2); if (T3> EXPL_THRESHOLD) T4 = MAX_EXPL; else if (T3 < -EXPL_THRESHOLD) T4 = MIN_EXPL; else T4 = exp(T3); if (T1==0.0) {if(T3> EXPL_THRESHOLD) { dT4_dVd = 0.0; dT4_dVb = 0.0; } else if (T3 < -EXPL_THRESHOLD) { dT4_dVd = 0.0; dT4_dVb = 0.0; } else { dT4_dVd = - T4 * pParam->B4SOIabjtii* T2 ; dT4_dVb = T4 * pParam->B4SOIabjtii* T2 ; } } else { if(T3> EXPL_THRESHOLD) { dT4_dVd = 0.0; dT4_dVb = 0.0; } else if (T3 < -EXPL_THRESHOLD) { dT4_dVd = 0.0; dT4_dVb = 0.0; } else {T5 = T2-1.0; if (T1<=0.0) { dT4_dVd = 0.0; dT4_dVb = 0.0; } else { dT4_dVd = - T4 * pParam->B4SOIabjtii* T2 * pow(T1,T5); dT4_dVb = T4 * pParam->B4SOIabjtii* T2 * pow(T1,T5); } } } Iiibjt = T0 * Ic * T1 * T4; if (selfheat) {T5= T2-1.0; dVbci_dT = pParam->B4SOIvbci * model->B4SOItvbci *model->B4SOItnom; if(T1<=0.0) dT4_dT = 0.0; else dT4_dT = -T4 * pParam->B4SOIabjtii* T2 * pow(T1,T5)*dVbci_dT; dIiibjt_dT = T0 * Ic * T4 * dVbci_dT + T0 *Ic *T1 * dT4_dT + T0 * GcT *T1 * T4; /* Samuel Mertens */ } else { dVbci_dT = 0.0; dT4_dT =0.0; dIiibjt_dT = 0.0; } /* Xue fix 10/29/2009 */ dIiibjt_dVd = T0 * Ic *T4 + T0 *Ic *T1*dT4_dVd + T0 * dIc_dVd * T1 * T4; dIiibjt_dVb = -T0 * Ic *T4 + T0*Ic*T1*dT4_dVb + T0 * dIc_dVb * T1 * T4; /*Total Iii*/ T0 = Ids; here->B4SOIiii = Iii = Idsmosfet + Iiibjt; Giig = Ratio * Gm + T0 * dRatio_dVg; Giib = Ratio * Gmb + T0 * dRatio_dVb + dIiibjt_dVb; Giid = Ratio * Gds + T0 * dRatio_dVd + dIiibjt_dVd; Giie = Ratio * Gme + T0 * dRatio_dVe; if (selfheat) GiiT = Ratio * GmT + T0 * dRatio_dT + dIiibjt_dT ; else GiiT = 0.0; } /* Current through body resistor */ /* Current going out is +ve */ if ((here->B4SOIbodyMod == 0) || (here->B4SOIbodyMod == 2)) { Ibp = Gbpbs = Gbpps = 0.0; } else { /* here->B4SOIbodyMod == 1 */ if (pParam->B4SOIrbody < 1e-3) /* 3.2 bug fix */ { if (here->B4SOIrbodyext <= 1e-3) /* 3.2 bug fix */ T0 = 1.0 / 1e-3; /* 3.2 bug fix */ else T0 = 1.0 / here->B4SOIrbodyext; Ibp = Vbp * T0; Gbpbs = T0 * dVbp_dVb; Gbpps = -T0 * dVbp_dVb; } else { Gbpbs = 1.0 / (pParam->B4SOIrbody + here->B4SOIrbodyext); Ibp = Vbp * Gbpbs; Gbpps = - Gbpbs; } } here->B4SOIibp = Ibp; here->B4SOIgbpbs = Gbpbs; here->B4SOIgbpps = Gbpps; here->B4SOIgbpT = 0.0; here->B4SOIcbodcon = (Ibp - (Gbpbs * Vbs + Gbpps * Vps)); } else /* v3.1 soiMod=2: ideal FD */ { Giig = Giib = Giid = Giie = GiiT = 0.0; here->B4SOIiii = Iii = 0.0; here->B4SOIibp = Ibp = 0.0; here->B4SOIgbpbs = 0.0; here->B4SOIgbpps = here->B4SOIgbpT = here->B4SOIcbodcon = 0.0; Gbpbs = Gbpps = 0.0; } /* v3.1 */ /* Current going out of drainprime node into the drain of device */ /* "node" means the SPICE circuit node */ here->B4SOIcdrain = Ids + Ic; here->B4SOIcd = Ids + Ic - Ibd + Iii + Igidl; here->B4SOIcb = Ibs + Ibd + Ibp / here->B4SOInf - Iii - Igidl - Igisl - Igb; /* v4.2 bug fix # 27*/ here->B4SOIgds = Gds + Gcd; here->B4SOIgm = Gm; here->B4SOIgmbs = Gmb + Gcb; /* v3.0 */ here->B4SOIgme = Gme; /* v3.1 for RF */ /* Calculate Rg */ if (here->B4SOIrgateMod >1) { T9 = pParam->B4SOIxrcrg2 * model->B4SOIvtm; T0 = T9 *beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; T1 = 1 + gche * Rds; T2 = 1 / T1; here->B4SOIgcrg = pParam->B4SOIxrcrg1 * (T0 + here->B4SOIidovVds); dIdlovVdseff_dVg = (T2 * dgche_dVg - IdlovVdseff * gche * dRds_dVg) / T1; dIdlovVdseff_dVd = T2 * dgche_dVd / T1; dIdlovVdseff_dVb = (T2 * dgche_dVb - IdlovVdseff * gche * dRds_dVb) / T1; T9 = diffVds / Va; T3 = 1.0 + T9; T4 = T3 * dIdlovVdseff_dVg - IdlovVdseff * (dVdseff_dVg + T9 * dVa_dVg) / Va; T5 = T3 * dIdlovVdseff_dVd + IdlovVdseff * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; T6 = T3 * dIdlovVdseff_dVb - IdlovVdseff * (dVdseff_dVb + T9 * dVa_dVb) / Va; tmp1 = (T4 * dVgsteff_dVd + T6 * dVbseff_dVd + T5) / here->B4SOInseg; tmp2 = (T4 * dVgsteff_dVg + T6 * dVbseff_dVg) / here->B4SOInseg; tmp3 = (T4 * dVgsteff_dVb + T6 * dVbseff_dVb) / here->B4SOInseg; here->B4SOIgcrgd = pParam->B4SOIxrcrg1 * (dT0_dVd +tmp1); here->B4SOIgcrgg = pParam->B4SOIxrcrg1 * (dT0_dVg * dVgsteff_dVg + tmp2); here->B4SOIgcrgb = pParam->B4SOIxrcrg1 * (dT0_dVb * dVbseff_dVb + tmp3); if (here->B4SOInf != 1.0) { here->B4SOIgcrg *= here->B4SOInf; here->B4SOIgcrgg *= here->B4SOInf; here->B4SOIgcrgd *= here->B4SOInf; here->B4SOIgcrgb *= here->B4SOInf; } if (here->B4SOIrgateMod == 2) { T10 = here->B4SOIgrgeltd * here->B4SOIgrgeltd; T11 = here->B4SOIgrgeltd + here->B4SOIgcrg; here->B4SOIgcrg = here->B4SOIgrgeltd * here->B4SOIgcrg / T11; T12 = T10 / T11 /T11; here->B4SOIgcrgg *= T12; here->B4SOIgcrgd *= T12; here->B4SOIgcrgb *= T12; } here->B4SOIgcrgs = -(here->B4SOIgcrgg + here->B4SOIgcrgd + here->B4SOIgcrgb); } /* v3.1 added Rg for RF end */ /* v4.0 Calculate bias-dependent external S/D resistance */ Rs = Rd = 0.0; /* flexilint */ if (model->B4SOIrdsMod) { /* Rs(V) */ T0 = vgs - pParam->B4SOIvfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; T0 = 1.0 + pParam->B4SOIprwg * vgs_eff; dT0_dVg = -pParam->B4SOIprwg / T0 / T0 * dvgs_eff_dvg; T1 = -pParam->B4SOIprwb * vbs; dT1_dVb = -pParam->B4SOIprwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dVg = T3 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; T4 = rs0 * 0.5; Rs = rswmin + T3 * T4; dRs_dVg = T4 * dT3_dVg; dRs_dVb = T4 * dT3_dVb; T0 = 1.0 + here->B4SOIsourceConductance * Rs; here->B4SOIgstot = here->B4SOIsourceConductance / T0; T0 = -here->B4SOIgstot * here->B4SOIgstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dve = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dVg; dgstot_dvb = T0 * dRs_dVb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd + dgstot_dve); if (selfheat) { dRs_dT = drswmin_dT + T3 * 0.5 * drs0_dT; dgstot_dT = T0 * dRs_dT; } else dRs_dT = dgstot_dT = 0.0; /* Rd(V) */ T0 = vgd - pParam->B4SOIvfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; T0 = 1.0 + pParam->B4SOIprwg * vgd_eff; dT0_dVg = -pParam->B4SOIprwg / T0 / T0 * dvgd_eff_dvg; T1 = -pParam->B4SOIprwb * vbd; dT1_dVb = -pParam->B4SOIprwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dVg = T3 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; /*T4 = pParam->B4SOIrd0 * 0.5;*/ /* v4.2 bugfix # 37 */ /*Rd = pParam->B4SOIrdwmin + T3 * T4;*/ /* v4.2 bugfix # 37 */ T4 = rd0 * 0.5; Rd = rdwmin + T3 * T4; dRd_dVg = T4 * dT3_dVg; dRd_dVb = T4 * dT3_dVb; T0 = 1.0 + here->B4SOIdrainConductance * Rd; here->B4SOIgdtot = here->B4SOIdrainConductance / T0; T0 = -here->B4SOIgdtot * here->B4SOIgdtot; dgdtot_dvs = 0.0; dgdtot_dve = 0.0; dgdtot_dvg = T0 * dRd_dVg; dgdtot_dvb = T0 * dRd_dVb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs + dgdtot_dve); if (selfheat) { dRd_dT = drdwmin_dT + T3 * 0.5 * drd0_dT; dgdtot_dT = T0 * dRd_dT; } else dRd_dT = dgdtot_dT = 0.0; here->B4SOIgstotd = vses * dgstot_dvd; here->B4SOIgstotg = vses * dgstot_dvg; here->B4SOIgstots = vses * dgstot_dvs; here->B4SOIgstotb = vses * dgstot_dvb; T2 = vdes - vds; here->B4SOIgdtotd = T2 * dgdtot_dvd; here->B4SOIgdtotg = T2 * dgdtot_dvg; here->B4SOIgdtots = T2 * dgdtot_dvs; here->B4SOIgdtotb = T2 * dgdtot_dvb; } else { here->B4SOIgstot = here->B4SOIgstotd = here->B4SOIgstotg = here->B4SOIgstots = here->B4SOIgstotb = 0.0; here->B4SOIgdtot = here->B4SOIgdtotd = here->B4SOIgdtotg = here->B4SOIgdtots = here->B4SOIgdtotb = 0.0; } if (selfheat) here->B4SOIgmT = GmT + GcT; else here->B4SOIgmT = 0.0; /* note that sign is switched because power flows out of device into the temperature node. Currently omit self-heating due to bipolar current because it can cause convergence problem*/ here->B4SOIgtempg = -model->B4SOItype*Gm * Vds; here->B4SOIgtempb = -model->B4SOItype*Gmb * Vds; /* v3.0 */ here->B4SOIgtempe = -model->B4SOItype*Gme * Vds; here->B4SOIgtempT = -GmT * Vds; here->B4SOIgtempd = -model->B4SOItype* (Gds * Vds + Ids); here->B4SOIcth = - Ids * Vds - model->B4SOItype * (here->B4SOIgtempg * Vgs + here->B4SOIgtempb * Vbs + here->B4SOIgtempe * Ves + here->B4SOIgtempd * Vds) - here->B4SOIgtempT * delTemp; /* v3.0 */ /* Body current which flows into drainprime node from the drain of device */ here->B4SOIgjdb = Gjdb - Giib -Ggidlb - Ggislb; /* v4.0 */ here->B4SOIgjdd = Gjdd - (Giid + Ggidld); here->B4SOIgjdg = - (Giig + Ggidlg + Ggislg); here->B4SOIgjde = - Giie; if (selfheat) here->B4SOIgjdT = GjdT - GiiT; else here->B4SOIgjdT = 0.0; here->B4SOIcjd = Ibd - Iii - Igidl - (here->B4SOIgjdb * Vbs + here->B4SOIgjdd * Vds + here->B4SOIgjdg * Vgs + here->B4SOIgjde * Ves + here->B4SOIgjdT * delTemp); /* v3.0 */ if (!here->B4SOIrbodyMod) { Giigidl_b = Giigidl_d = Giigidl_g = Giigidl_e = Giigidl_T = Iii_Igidl = 0.0; } else { here->B4SOIgiigidlb = Giib + Ggidlb + Ggislb; here->B4SOIgiigidld = Giid + Ggidld; Giigidl_b = - Giib -Ggidlb - Ggislb; Giigidl_d = - Giid -Ggidld; Giigidl_g = - Giig -Ggidlg - Ggislg; Giigidl_e = - Giie; if (selfheat) Giigidl_T = -GiiT; else GiiT = Giigidl_T = 0.0; /*Idbdp = Ibd - ( Gjdb * vbs_jct + Gjdd * Vds + GjdT * delTemp); v4.2 bugfix */ Idbdp = Ibd - ( Gjdb * vbd_jct + Gjdd * Vds + GjdT * delTemp); /* Iii_Igidl = - Iii - Igidl + Giigidl_b * Vbs + Giigidl_d * Vds + Giigidl_g * Vgs + Giigidl_e * Ves + Giigidl_T * delTemp ; */ } /* Body current which flows into sourceprime node from the source of device */ here->B4SOIgjsg = 0.0; here->B4SOIgjsd = Gjsd; here->B4SOIgjsb = Gjsb; /* v4.0 */ if (selfheat) here->B4SOIgjsT = GjsT; else here->B4SOIgjsT = 0.0; here->B4SOIcjs = Ibs - Igisl -( here->B4SOIgjsb * Vbs + here->B4SOIgjsd * Vds + here->B4SOIgjsg * Vgs + here->B4SOIgjsT * delTemp); if (here->B4SOIrbodyMod) { Isbsp = Ibs - ( Gjsb * vbs_jct + Gjsd * Vds + GjsT * delTemp ); } /* Current flowing into body node */ here->B4SOIgbbs = Giib - Gjsb - Gjdb - Gbpbs / here->B4SOInf; /* v4.2 bug fix #27 */ here->B4SOIgbgs = Giig + Ggidlg + Ggislg; here->B4SOIgbds = Giid + Ggidld + Ggisls - Gjsd - Gjdd; here->B4SOIgbes = Giie; here->B4SOIgbps = - Gbpps / here->B4SOInf; /* v4.2 bug fix #27 */ if (selfheat) here->B4SOIgbT = GiiT - GjsT - GjdT; else here->B4SOIgbT = 0.0; if (!here->B4SOIrbodyMod) { here->B4SOIcbody = Iii + Igidl + Igisl - Ibs - Ibd - Ibp / here->B4SOInf + Igb /* v4.2 bug fix #27 */ - ( (here->B4SOIgbbs + dIgb_dVb) * Vbs + (here->B4SOIgbgs + dIgb_dVg) * Vgs + (here->B4SOIgbds + dIgb_dVd) * Vds + here->B4SOIgbps * Vps + (here->B4SOIgbes + dIgb_dVe) * Ves + (here->B4SOIgbT + dIgb_dT) * delTemp); } if (here->B4SOIrbodyMod) { here->B4SOIgbgiigbpb = Giib - Gbpbs / here->B4SOInf; /* v4.3 bug fix */ here->B4SOIcbody = Iii + Igidl + Igisl - Ibp / here->B4SOInf + Igb /* v4.2 bug fix #27 */ - ( (Giib - Gbpbs / here->B4SOInf + dIgb_dVb) * Vbs /* v4.2 bug fix #27 */ + (here->B4SOIgbgs + dIgb_dVg) * Vgs + (Giid + Ggidld + dIgb_dVd) * Vds + here->B4SOIgbps * Vps + (here->B4SOIgbes + dIgb_dVe) * Ves + (GiiT + dIgb_dT) * delTemp ); } here->B4SOIcgate = Igb - (dIgb_dVb * Vbs + dIgb_dVe * Ves + dIgb_dVg * Vgs + dIgb_dVd * Vds + dIgb_dT * delTemp); /* v3.0 */ /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm); here->B4SOIqinv = -model->B4SOIcox * pParam->B4SOIweff * here->B4SOInf * Leff * T1; /* v4.0 */ if (here->B4SOInf != 1) { here->B4SOIcdrain *= here->B4SOInf; here->B4SOIcd *= here->B4SOInf; here->B4SOIcb *= here->B4SOInf; /* Fix NF problem with tnoimod=1 - LFW */ here->B4SOIidovVds *= here->B4SOInf; here->B4SOIgds *= here->B4SOInf; here->B4SOIgm *= here->B4SOInf; here->B4SOIgmbs *= here->B4SOInf; here->B4SOIgme *= here->B4SOInf; /* Xue fix 10/29/2009 */ /* here->B4SOIgmT *= here->B4SOInf; *added in line 5424 */ here->B4SOIcbody *= here->B4SOInf; here->B4SOIcgate *= here->B4SOInf; here->B4SOIIgcs *= here->B4SOInf; here->B4SOIgIgcsg *= here->B4SOInf; here->B4SOIgIgcsd *= here->B4SOInf; here->B4SOIgIgcsb *= here->B4SOInf; here->B4SOIgIgcse *= here->B4SOInf; /* LFW_FD new line */ here->B4SOIIgcd *= here->B4SOInf; here->B4SOIgIgcdg *= here->B4SOInf; here->B4SOIgIgcdd *= here->B4SOInf; here->B4SOIgIgcdb *= here->B4SOInf; here->B4SOIgIgcde *= here->B4SOInf; /* LFW_FD new line */ here->B4SOIIgs *= here->B4SOInf; here->B4SOIgIgsg *= here->B4SOInf; here->B4SOIgIgss *= here->B4SOInf; here->B4SOIIgd *= here->B4SOInf; here->B4SOIgIgdg *= here->B4SOInf; here->B4SOIgIgdd *= here->B4SOInf; here->B4SOIig *= here->B4SOInf; here->B4SOIgigg *= here->B4SOInf; here->B4SOIgigd *= here->B4SOInf; here->B4SOIgigb *= here->B4SOInf; here->B4SOIgige *= here->B4SOInf; here->B4SOIgigT *= here->B4SOInf; here->B4SOIcjs *= here->B4SOInf; here->B4SOIcjd *= here->B4SOInf; here->B4SOIibs *= here->B4SOInf; here->B4SOIibd *= here->B4SOInf; Idbdp *= here->B4SOInf; /*v4.2 bug fix Idbdp needs update as Ibd for nf!=1*/ Isbsp *= here->B4SOInf; /*v4.2 bug fix Isbsp needs update as Ibd for nf!=1*/ here->B4SOIgbbs *= here->B4SOInf; here->B4SOIgbgs *= here->B4SOInf; here->B4SOIgbds *= here->B4SOInf; here->B4SOIgbes *= here->B4SOInf; here->B4SOIgbps *= here->B4SOInf; here->B4SOIgbT *= here->B4SOInf; here->B4SOIigidl *= here->B4SOInf; here->B4SOIigisl *= here->B4SOInf; /* bugfix_snps NF*/ here->B4SOIgjdb *= here->B4SOInf; here->B4SOIgjdd *= here->B4SOInf; here->B4SOIgjdg *= here->B4SOInf; here->B4SOIgjde *= here->B4SOInf; here->B4SOIgjdT *= here->B4SOInf; here->B4SOIgjsb *= here->B4SOInf; here->B4SOIgjsd *= here->B4SOInf; here->B4SOIgjsg *= here->B4SOInf; here->B4SOIgjsT *= here->B4SOInf; here->B4SOIcth *= here->B4SOInf; here->B4SOIgmT *= here->B4SOInf; here->B4SOIgtempg *= here->B4SOInf; here->B4SOIgtempb *= here->B4SOInf; here->B4SOIgtempe *= here->B4SOInf; here->B4SOIgtempT *= here->B4SOInf; here->B4SOIgtempd *= here->B4SOInf; here->B4SOIiii *= here->B4SOInf; /* bugfix NF ends */ } here->B4SOIgigs = -(here->B4SOIgigg + here->B4SOIgigd + here->B4SOIgigb + here->B4SOIgige); /* LFW_FD fix 2 derivatives */ here->B4SOIgIgcss = -(here->B4SOIgIgcsg + here->B4SOIgIgcsd + here->B4SOIgIgcsb + here->B4SOIgIgcse); here->B4SOIgIgcds = -(here->B4SOIgIgcdg + here->B4SOIgIgcdd + here->B4SOIgIgcdb + here->B4SOIgIgcde); /* Begin CV (charge) model */ /* LFW_FD 9 new lines - flexilint */ Cbb = Cbd = Cbg = 0.0; Qsub0 = Qac0 = 0.0; qjs = qjd = 0.0; CboxWL = 0.0; Qe1 = dQe1_dVb = dQe1_dVe = dQe1_dT = 0; Vfbeff2=dVfbeff2_dVd=dVfbeff2_dVrg=dVfbeff2_dVg=dVfbeff2_dVb=dVfbeff2_dVe=dVfbeff2_dT=0.0; VdseffCV2 = dVdseffCV2_dVg = dVdseffCV2_dVd = dVdseffCV2_dVb = dVdseffCV2_dVe = 0.0; Vgsteff2 = 0.0; dVgsteff2_dVd=dVgsteff2_dVg=dVgsteff2_dVb=dVgsteff2_dVe=dVgsteff2_dT=0.0; if ((model->B4SOIxpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbody = qsub = 0.0; /* v2.2.3 bug fix */ Qsub0=Qac0=Cbb=Cbg=Cbd=0; /* Bugfix #19 Jul09*/ here->B4SOIcggb = here->B4SOIcgsb = here->B4SOIcgdb = 0.0; here->B4SOIcdgb = here->B4SOIcdsb = here->B4SOIcddb = 0.0; here->B4SOIcbgb = here->B4SOIcbsb = here->B4SOIcbdb = 0.0; goto finished; } else { qgate = qdrn = qsrc = qbody = qsub = 0.0; /* flexilint */ CoxWL = model->B4SOIcox * (pParam->B4SOIweffCV / here->B4SOInseg * here->B4SOInf /* v4.0 */ * pParam->B4SOIleffCV + here->B4SOIagbcp); CoxWLb = model->B4SOIfbody * model->B4SOIcox * (pParam->B4SOIweffCV / here->B4SOInseg * here->B4SOInf /* v4.0 */ * pParam->B4SOIleffCVb + here->B4SOIagbcp); /* v4.1 for improved BT charge model */ CoxWL2 = model->B4SOIcox * here->B4SOIagbcp2; CoxWLb2 = model->B4SOIfbody * model->B4SOIcox * here->B4SOIagbcp2; /* end v4.1 */ /* v3.2 Seperate VgsteffCV with noff */ noff = n * pParam->B4SOInoff; dnoff_dVg = pParam->B4SOInoff * dn_dVg; /* LFW_FD new line */ dnoff_dVd = pParam->B4SOInoff * dn_dVd; dnoff_dVb = pParam->B4SOInoff * dn_dVb; dnoff_dVe = pParam->B4SOInoff * dn_dVe; /* LFW_FD new line */ dnoff_dT = pParam->B4SOInoff * dn_dT; /* new line Wagner */ if (model->B4SOIvgstcvMod == 0) { if ((VgstNVt > -EXPL_THRESHOLD) && (VgstNVt < EXPL_THRESHOLD)) { TL1 = ExpVgst; /* LFW_FD new line */ ExpVgst *= ExpVgst; ExpVgst *= exp( -(pParam->B4SOIdelvt / (noff * Vtm))); /* LFW_FD 4 new derivatives */ dExpVgst_dVg = 2.0 * TL1 * dExpVgst_dVg * exp( -pParam->B4SOIdelvt / (noff * Vtm)) + ExpVgst * pParam->B4SOIdelvt * dnoff_dVg / (noff * noff * Vtm); dExpVgst_dVd = 2.0 * TL1 * dExpVgst_dVd * exp( -pParam->B4SOIdelvt / (noff * Vtm)) + ExpVgst * pParam->B4SOIdelvt * dnoff_dVd / (noff * noff * Vtm); dExpVgst_dVb = 2.0 * TL1 * dExpVgst_dVb * exp( -pParam->B4SOIdelvt / (noff * Vtm)) + ExpVgst * pParam->B4SOIdelvt * dnoff_dVb / (noff * noff * Vtm); dExpVgst_dVe = 2.0 * TL1 * dExpVgst_dVe * exp( -pParam->B4SOIdelvt / (noff * Vtm)) + ExpVgst * pParam->B4SOIdelvt * dnoff_dVe / (noff * noff * Vtm); Vgsteff = noff * Vtm * log(1.0 + ExpVgst); /* LFW_FD 4 fix derivatives */ dVgsteff_dVg = Vgsteff * dnoff_dVg / noff + noff * Vtm * dExpVgst_dVg / (1.0 + ExpVgst); dVgsteff_dVd = Vgsteff * dnoff_dVd / noff + noff * Vtm * dExpVgst_dVd / (1.0 + ExpVgst); dVgsteff_dVb = Vgsteff * dnoff_dVb / noff + noff * Vtm * dExpVgst_dVb / (1.0 + ExpVgst); dVgsteff_dVe = Vgsteff * dnoff_dVe / noff + noff * Vtm * dExpVgst_dVe / (1.0 + ExpVgst); T0 = ExpVgst / (1.0 + ExpVgst); T2 = 2.0 * pParam->B4SOImstar * pParam->B4SOInoff; /* LFW_FD new line */ T1 = -T0 * (T2*dVth_dVb + (T2*Vgst-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; /* LFW_FD fix line */ /* LFW_FD fix _dT derivatives */ if (selfheat) { dExpVgst_dT = 2.0 * TL1 * dExpVgst_dT * exp( -pParam->B4SOIdelvt / (noff * Vtm)) + ExpVgst * pParam->B4SOIdelvt * (dVtm_dT / Vtm + dnoff_dT / noff) / (noff * Vtm); dVgsteff_dT = Vgsteff * (dnoff_dT / noff + dVtm_dT / Vtm) + noff * Vtm * dExpVgst_dT / (1.0 + ExpVgst); } else dVgsteff_dT = 0.0; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { /* ExpVgst2 = ExpVgst * exp(-1.12 / noff / Vtm); */ ExpVgst2 = ExpVgst * exp(-eggbcp2 / noff / Vtm); /* bugfix 4.3.1 -Tanvir */ /* LFW_FD add 4 derivatives */ dExpVgst2_dVg = dExpVgst_dVg * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVg / (noff * noff * Vtm); dExpVgst2_dVd = dExpVgst_dVd * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVd / (noff * noff * Vtm); dExpVgst2_dVb = dExpVgst_dVb * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVb / (noff * noff * Vtm); dExpVgst2_dVe = dExpVgst_dVe * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVe / (noff * noff * Vtm); Vgsteff2 = noff * Vtm * log(1.0 + ExpVgst2); /* LFW_FD fix 4 derivatives */ dVgsteff2_dVg = Vgsteff2 * dnoff_dVg / noff + noff * Vtm * dExpVgst2_dVg / (1.0 + ExpVgst2); dVgsteff2_dVd = Vgsteff2 * dnoff_dVd / noff + noff * Vtm * dExpVgst2_dVd / (1.0 + ExpVgst2); dVgsteff2_dVb = Vgsteff2 * dnoff_dVb / noff + noff * Vtm * dExpVgst2_dVb / (1.0 + ExpVgst2); dVgsteff2_dVe = Vgsteff2 * dnoff_dVe / noff + noff * Vtm * dExpVgst2_dVe / (1.0 + ExpVgst2); T02 = ExpVgst2 / (1.0 + ExpVgst2); /* T12 = -T02 * (dVth_dVb + (Vgst-1.12-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff2 / noff * dnoff_dVb; */ T12 = -T02 * (dVth_dVb + (Vgst-eggbcp2-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff2 / noff * dnoff_dVb; /* bugfix 4.3.1 -Tanvir */ if (selfheat) /*fix below expression Wagner */ /*dVgsteff2_dT = -T02 * (dVth_dT+dVth_dVb*dVbseff_dT */ /* dVgsteff2_dT = -T02 * (-dVgst_dT + (Vgst - 1.12 - pParam->B4SOIdelvt) / Temp) + Vgsteff2 / Temp; */ /* bugfix 4.3.1 -Tanvir */ dVgsteff2_dT = -T02 * (-dVgst_dT + (Vgst - eggbcp2 - pParam->B4SOIdelvt) / Temp) + Vgsteff2 / Temp; else dVgsteff2_dT = 0.0; } } } else if (model->B4SOIvgstcvMod == 1) { ExpVgst = exp(VgstNVt/(pParam->B4SOImstar * pParam->B4SOInoff)); ExpVgst *= exp( -(pParam->B4SOIdelvt / (noff * Vtm))); /* LFW_FD add 4 derivatives */ dExpVgst_dVg = ExpVgst * (dVgstNVt_dVg/(pParam->B4SOImstar * pParam->B4SOInoff) + pParam->B4SOIdelvt * dnoff_dVg / (noff * noff * Vtm)); dExpVgst_dVd = ExpVgst * (dVgstNVt_dVd/(pParam->B4SOImstar * pParam->B4SOInoff) + pParam->B4SOIdelvt * dnoff_dVd / (noff * noff * Vtm)); dExpVgst_dVb = ExpVgst * (dVgstNVt_dVb/(pParam->B4SOImstar * pParam->B4SOInoff) + pParam->B4SOIdelvt * dnoff_dVb / (noff * noff * Vtm)); dExpVgst_dVe = ExpVgst * (dVgstNVt_dVe/(pParam->B4SOImstar * pParam->B4SOInoff) + pParam->B4SOIdelvt * dnoff_dVe / (noff * noff * Vtm)); Vgsteff = noff * Vtm * log(1.0 + ExpVgst); /* LFW_FD fix 4 derivatives */ dVgsteff_dVg = Vgsteff * dnoff_dVg / noff + noff * Vtm * dExpVgst_dVg / (1.0 + ExpVgst); dVgsteff_dVd = Vgsteff * dnoff_dVd / noff + noff * Vtm * dExpVgst_dVd / (1.0 + ExpVgst); dVgsteff_dVb = Vgsteff * dnoff_dVb / noff + noff * Vtm * dExpVgst_dVb / (1.0 + ExpVgst); dVgsteff_dVe = Vgsteff * dnoff_dVe / noff + noff * Vtm * dExpVgst_dVe / (1.0 + ExpVgst); T0 = ExpVgst / (1.0 + ExpVgst); T1 = -T0 * (dVth_dVb + (Vgst-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; if (selfheat) /*fix below expression Wagner */ /*dVgsteff_dT = -T0 * (dVth_dT+dVth_dVb*dVbseff_dT */ dVgsteff_dT = -T0 * (-dVgst_dT + (Vgst - pParam->B4SOIdelvt) / Temp) + Vgsteff / Temp; else dVgsteff_dT = 0.0; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { /* ExpVgst2 = ExpVgst * exp(-1.12 / noff / Vtm); */ ExpVgst2 = ExpVgst * exp(-eggbcp2 / noff / Vtm); /* bugfix 4.3.1 -Tanvir */ /* LFW_FD add 4 derivatives */ dExpVgst2_dVg = dExpVgst_dVg * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVg / (noff * noff * Vtm); dExpVgst2_dVd = dExpVgst_dVd * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVd / (noff * noff * Vtm); dExpVgst2_dVb = dExpVgst_dVb * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVb / (noff * noff * Vtm); dExpVgst2_dVe = dExpVgst_dVe * exp(-eggbcp2 / noff / Vtm) + ExpVgst2 * eggbcp2 * dnoff_dVe / (noff * noff * Vtm); Vgsteff2 = noff * Vtm * log(1.0 + ExpVgst2); /* LFW_FD fix 4 derivatives */ dVgsteff2_dVg = Vgsteff2 * dnoff_dVg / noff + noff * Vtm * dExpVgst2_dVg / (1.0 + ExpVgst2); dVgsteff2_dVd = Vgsteff2 * dnoff_dVd / noff + noff * Vtm * dExpVgst2_dVd / (1.0 + ExpVgst2); dVgsteff2_dVb = Vgsteff2 * dnoff_dVb / noff + noff * Vtm * dExpVgst2_dVb / (1.0 + ExpVgst2); dVgsteff2_dVe = Vgsteff2 * dnoff_dVe / noff + noff * Vtm * dExpVgst2_dVe / (1.0 + ExpVgst2); T02 = ExpVgst2 / (1.0 + ExpVgst2); /* T12 = -T02 * (dVth_dVb + (Vgst-1.12-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff2 / noff * dnoff_dVb; */ T12 = -T02 * (dVth_dVb + (Vgst-eggbcp2-pParam->B4SOIdelvt) / noff * dnoff_dVb) + Vgsteff2 / noff * dnoff_dVb; /* bugfix 4.3.1 -Tanvir */ dVgsteff2_dVb = T12 * dVbseff_dVb; dVgsteff2_dVe = T12 * dVbseff_dVe; if (selfheat) /*fix below expression Wagner */ /*dVgsteff2_dT = -T02 * (dVth_dT+dVth_dVb*dVbseff_dT */ /* dVgsteff2_dT = -T02 * (-dVgst_dT + (Vgst - 1.12 - pParam->B4SOIdelvt) / Temp) + Vgsteff2 / Temp; */ dVgsteff2_dT = -T02 * (-dVgst_dT + (Vgst - eggbcp2 - pParam->B4SOIdelvt) / Temp) + Vgsteff2 / Temp; /* bugfix 4.3.1 -Tanvir */ else dVgsteff2_dT = 0.0; } } else { T10 = noff * Vtm; VgstNVt = pParam->B4SOImstarcv * (Vgst - pParam->B4SOIdelvt) / T10; /* LFW_FD add 4 derivatives */ dVgstNVt_dVg = (pParam->B4SOImstarcv * dVgst_dVg - VgstNVt * dnoff_dVg * Vtm) / T10; dVgstNVt_dVd = (pParam->B4SOImstarcv * dVgst_dVd - VgstNVt * dnoff_dVd * Vtm) / T10; dVgstNVt_dVb = (pParam->B4SOImstarcv * dVgst_dVb - VgstNVt * dnoff_dVb * Vtm) / T10; dVgstNVt_dVe = (pParam->B4SOImstarcv * dVgst_dVe - VgstNVt * dnoff_dVe * Vtm) / T10; ExpArg = (pParam->B4SOIvoffcv - (1- pParam->B4SOImstarcv) * (Vgst - pParam->B4SOIdelvt))/ T10; /* LFW_FD add 4 derivatives */ dExpArg_dVg = (-(1- pParam->B4SOImstarcv) * dVgst_dVg - ExpArg * dnoff_dVg * Vtm) / T10; dExpArg_dVd = (-(1- pParam->B4SOImstarcv) * dVgst_dVd - ExpArg * dnoff_dVd * Vtm) / T10; dExpArg_dVb = (-(1- pParam->B4SOImstarcv) * dVgst_dVb - ExpArg * dnoff_dVb * Vtm) / T10; dExpArg_dVe = (-(1- pParam->B4SOImstarcv) * dVgst_dVe - ExpArg * dnoff_dVe * Vtm) / T10; /* 11 lines new Wagner */ if (selfheat) { dT10_dT = noff * dVtm_dT + dnoff_dT * Vtm; /* fix below expression Wagner */ /*dVgstNVt_dT = -(pParam->B4SOImstarcv*dVth_dT + VgstNVt*dT10_dT)/T10; */ dVgstNVt_dT = -(-pParam->B4SOImstarcv*dVgst_dT + VgstNVt*dT10_dT)/T10; /* fix below expression Wagner */ dExpArg_dT = -(1- pParam->B4SOImstarcv)*dVgst_dT/T10 -ExpArg*dT10_dT/T10; } else { dT10_dT = 0.0; dVgstNVt_dT = 0.0; dExpArg_dT = 0.0; } /* MCJ: Very small Vgst */ if (VgstNVt > EXPL_THRESHOLD) { Vgsteff = Vgst - pParam->B4SOIdelvt; /* T0 is dVgsteff_dVbseff */ T0 = -dVth_dVb; /* LFW_FD fix 4 derivatives */ dVgsteff_dVg = dVgst_dVg; dVgsteff_dVd = dVgst_dVd; dVgsteff_dVb = dVgst_dVb; dVgsteff_dVe = dVgst_dVe; if (selfheat) /*fix below expression Wagner */ /*dVgsteff_dT = -dVth_dT + T0 * dVbseff_dT; */ dVgsteff_dT = dVgst_dT; else dVgsteff_dT = 0.0; } else if (ExpArg > EXPL_THRESHOLD) { T0 = (Vgst - pParam->B4SOIdelvt - pParam->B4SOIvoffcv) / (noff * Vtm); ExpVgst = exp(T0); /* LFW_FD add 4 derivatives */ dExpVgst_dVg = (dVgst_dVg - T0 * dnoff_dVg * Vtm) /(noff * Vtm); dExpVgst_dVd = (dVgst_dVd - T0 * dnoff_dVd * Vtm) /(noff * Vtm); dExpVgst_dVb = (dVgst_dVb - T0 * dnoff_dVb * Vtm) /(noff * Vtm); dExpVgst_dVe = (dVgst_dVe - T0 * dnoff_dVe * Vtm) /(noff * Vtm); /*Vgsteff = Vtm * pParam->B4SOIcdep0 / model->B4SOIcox * ExpVgst;*/ /*v4.2 bug fix*/ Vgsteff = Vtm * cdep0 / model->B4SOIcox * ExpVgst; /* v4.2 bug fix */ T3 = Vgsteff / (noff * Vtm) ; /* T1 is dVgsteff_dVbseff */ /* T1 = -T3 * (dVth_dVb + T0 * Vtm * dnoff_dVb); */ T1 = -T3 * ( T0 * Vtm * dnoff_dVb); /* LFW_FD fixed line */ /* LFW_FD fix 4 derivatives */ dVgsteff_dVg = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVg; dVgsteff_dVd = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVd; dVgsteff_dVb = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVb; dVgsteff_dVe = Vtm * cdep0 / model->B4SOIcox * dExpVgst_dVe; if (selfheat) /*fix below expression Wagner */ /*dVgsteff_dT = -T3 * (dVth_dT + T0 * dVtm_dT * noff) + Vgsteff / Temp+ T1 * dVbseff_dT;*/ dVgsteff_dT = -T3 * (-dVgst_dT + T0 * dVtm_dT * noff + Vtm * dnoff_dT) + Vgsteff / Temp; else dVgsteff_dT = 0.0; } else { ExpVgst = exp(VgstNVt); /* LFW_FD add 4 derivatives */ dExpVgst_dVg = ExpVgst * dVgstNVt_dVg; dExpVgst_dVd = ExpVgst * dVgstNVt_dVd; dExpVgst_dVb = ExpVgst * dVgstNVt_dVb; dExpVgst_dVe = ExpVgst * dVgstNVt_dVe; T1 = T10 * log(1.0 + ExpVgst); /* LFW_FD fix 4 derivatives */ dT1_dVg = T10 * dExpVgst_dVg / (1.0 + ExpVgst) + T1 * dnoff_dVg / noff; dT1_dVd = T10 * dExpVgst_dVd / (1.0 + ExpVgst) + T1 * dnoff_dVd / noff; dT1_dVb = T10 * dExpVgst_dVb / (1.0 + ExpVgst) + T1 * dnoff_dVb / noff; dT1_dVe = T10 * dExpVgst_dVe / (1.0 + ExpVgst) + T1 * dnoff_dVe / noff; /*fix below expression Wagner */ /*T3 = (1.0 / Temp); */ T3 = (1.0 / Temp + dnoff_dT / noff); if (selfheat) /*fix below expression Wagner */ /*dT1_dT = -dT1_dVg * (dVth_dT + (Vgst-pParam->B4SOIdelvt) * T3) + T1 * T3;*/ dT1_dT = dT10_dT * log(1.0 + ExpVgst) + T10 * ExpVgst / (1.0 + ExpVgst) * dVgstNVt_dT; else dT1_dT = 0.0; /* dT2_dVg = -model->B4SOIcox / (Vtm * pParam->B4SOIcdep0) */ /* * exp(ExpArg) * (1 - pParam->B4SOImstarcv); v4.2 bug fix */ dT2_dVg = -model->B4SOIcox / (Vtm * cdep0) * exp(ExpArg) * (1 - pParam->B4SOImstarcv); /* v4.2 bug fix */ T2 = pParam->B4SOImstarcv - T10 * dT2_dVg / (1.0 - pParam->B4SOImstarcv); /* LFW_FD 5 new lines */ TL1 = dT2_dVg; dTL1_dVg = TL1 * dExpArg_dVg; dTL1_dVd = TL1 * dExpArg_dVd; dTL1_dVb = TL1 * dExpArg_dVb; dTL1_dVe = TL1 * dExpArg_dVe; /* LFW_FD fix/add 5 derivatives */ dT2_dVg = -(dnoff_dVg * Vtm * TL1 + T10 * dTL1_dVg) / (1.0 - pParam->B4SOImstarcv); dT2_dVd = -(dnoff_dVd * Vtm * TL1 + T10 * dTL1_dVd) / (1.0 - pParam->B4SOImstarcv); dT2_dVb = -(dnoff_dVb * Vtm * TL1 + T10 * dTL1_dVb) / (1.0 - pParam->B4SOImstarcv); dT2_dVe = -(dnoff_dVe * Vtm * TL1 + T10 * dTL1_dVe) / (1.0 - pParam->B4SOImstarcv); if (selfheat) dT2_dT = -(dT10_dT*TL1 +T10*TL1*(-dVtm_dT/Vtm-dcdep0_dT/cdep0+dExpArg_dT) )/(1.0 - pParam->B4SOImstarcv); else dT2_dT = 0.0; Vgsteff = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; /* LFW_FD fix 4 derivatives */ dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff_dVe = (T2 * dT1_dVe - T1 * dT2_dVe) / T3; if (selfheat) /*fix below expression Wagner */ /*dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3+ T4 * dVbseff_dT; */ dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3; else dVgsteff_dT = 0.0; } if (here->B4SOIagbcp2 > 0) { /* VgstNVt2 = pParam->B4SOImstarcv * (Vgst - pParam->B4SOIdelvt - 1.12) / T10; */ VgstNVt2 = pParam->B4SOImstarcv * (Vgst - pParam->B4SOIdelvt - eggbcp2) / T10; /* bugfix 4.3.1 -Tanvir */ /* LFW_FD add 4 derivatives */ dVgstNVt2_dVg = (pParam->B4SOImstarcv * dVgst_dVg - VgstNVt2 * dnoff_dVg * Vtm) / T10; dVgstNVt2_dVd = (pParam->B4SOImstarcv * dVgst_dVd - VgstNVt2 * dnoff_dVd * Vtm) / T10; dVgstNVt2_dVb = (pParam->B4SOImstarcv * dVgst_dVb - VgstNVt2 * dnoff_dVb * Vtm) / T10; dVgstNVt2_dVe = (pParam->B4SOImstarcv * dVgst_dVe - VgstNVt2 * dnoff_dVe * Vtm) / T10; /* ExpArg2 = (pParam->B4SOIvoffcv - (1- pParam->B4SOImstarcv) * (Vgst - pParam->B4SOIdelvt - 1.12))/ T10; */ ExpArg2 = (pParam->B4SOIvoffcv - (1- pParam->B4SOImstarcv) * (Vgst - pParam->B4SOIdelvt - eggbcp2))/ T10; /* bugfix 4.3.1 -Tanvir */ /* LFW_FD add 4 derivatives */ dExpArg2_dVg = (-(1- pParam->B4SOImstarcv) * dVgst_dVg - ExpArg2 * dnoff_dVg * Vtm) / T10; dExpArg2_dVd = (-(1- pParam->B4SOImstarcv) * dVgst_dVd - ExpArg2 * dnoff_dVd * Vtm) / T10; dExpArg2_dVb = (-(1- pParam->B4SOImstarcv) * dVgst_dVb - ExpArg2 * dnoff_dVb * Vtm) / T10; dExpArg2_dVe = (-(1- pParam->B4SOImstarcv) * dVgst_dVe - ExpArg2 * dnoff_dVe * Vtm) / T10; /* 11 new lines Wagner */ if (selfheat) { /*fix below expression Wagner */ /*dVgstNVt2_dT = -(pParam->B4SOImstarcv*dVth_dT + VgstNVt2*dT10_dT)/T10;*/ dVgstNVt2_dT = -(-pParam->B4SOImstarcv*dVgst_dT + VgstNVt2*dT10_dT)/T10; /*fix 1st line of below expression Wagner */ /*dExpArg2_dT = (1- pParam->B4SOImstarcv)*dVth_dT/T10 */ dExpArg2_dT = -(1- pParam->B4SOImstarcv)*dVgst_dT/T10 -ExpArg2*dT10_dT/T10; } else { dT10_dT = 0.0; dVgstNVt_dT = 0.0; dExpArg_dT = 0.0; dExpArg2_dT = 0.0; } /* MCJ: Very small Vgst */ if (VgstNVt2 > EXPL_THRESHOLD) { /* Vgsteff2 = Vgst - pParam->B4SOIdelvt - 1.12; */ Vgsteff2 = Vgst - pParam->B4SOIdelvt - eggbcp2; /* bugfix 4.3.1 -Tanvir */ T0 = -dVth_dVb; /* LFW_FD fix 4 derivatives */ dVgsteff2_dVg = dVgst_dVg; dVgsteff2_dVd = dVgst_dVd; dVgsteff2_dVb = dVgst_dVb; dVgsteff2_dVe = dVgst_dVe; if (selfheat) /*fix below expression Wagner */ /*dVgsteff2_dT = -dVth_dT + T0 * dVbseff_dT;*/ dVgsteff2_dT = dVgst_dT; else dVgsteff2_dT = 0.0; } else if (ExpArg2 > EXPL_THRESHOLD) { /* T0 = (Vgst - pParam->B4SOIdelvt - pParam->B4SOIvoffcv - 1.12) / (noff * Vtm); ExpVgst2 = exp(T0); */ T0 = (Vgst - pParam->B4SOIdelvt - pParam->B4SOIvoffcv - eggbcp2) / (noff * Vtm); ExpVgst2 = exp(T0); /* bugfix 4.3.1 -Tanvir */ /*Vgsteff2 = Vtm * pParam->B4SOIcdep0 / model->B4SOIcox * ExpVgst*/ Vgsteff2 = Vtm * cdep0 / model->B4SOIcox * ExpVgst2; /*v4.2 bug fix */ T3 = Vgsteff2 / (noff * Vtm) ; /* T1 is dVgsteff2_dVbseff */ T1 = -T3 * (dVth_dVb + T0 * Vtm * dnoff_dVb); /* LFW_FD fix 4 derivatives */ dVgsteff2_dVg = Vgsteff2 * (dVgst_dVg / Vtm - T0 * dnoff_dVg) / noff; dVgsteff2_dVd = Vgsteff2 * (dVgst_dVd / Vtm - T0 * dnoff_dVd) / noff; dVgsteff2_dVb = Vgsteff2 * (dVgst_dVb / Vtm - T0 * dnoff_dVb) / noff; dVgsteff2_dVe = Vgsteff2 * (dVgst_dVe / Vtm - T0 * dnoff_dVe) / noff; if (selfheat) /* fix 1st line in below expression Wagner */ /*dVgsteff2_dT = -T3 * (dVth_dT + T0 * dVtm_dT * noff) */ dVgsteff2_dT = -T3 * (-dVgst_dT + T0 * dVtm_dT * noff) + Vgsteff2 / Temp+ T1 * dVbseff_dT; else dVgsteff2_dT = 0.0; } else { ExpVgst2 = exp(VgstNVt2); T1 = T10 * log(1.0 + ExpVgst2); /* LFW_FD fix 4 derivatives */ dT1_dVg = dnoff_dVg * T1 / noff + T10 * ExpVgst2 * dVgstNVt2_dVg / (1.0 + ExpVgst2); dT1_dVd = dnoff_dVg * T1 / noff + T10 * ExpVgst2 * dVgstNVt2_dVd / (1.0 + ExpVgst2); dT1_dVb = dnoff_dVg * T1 / noff + T10 * ExpVgst2 * dVgstNVt2_dVb / (1.0 + ExpVgst2); dT1_dVe = dnoff_dVg * T1 / noff + T10 * ExpVgst2 * dVgstNVt2_dVe / (1.0 + ExpVgst2); /*fix below expression Wagner */ /*T3 = (1.0 / Temp); */ T3 = (1.0 / Temp + dnoff_dT / noff); if (selfheat) /*fix below expression */ /*dT1_dT = -dT1_dVg * (dVth_dT + (Vgst - pParam->B4SOIdelvt - 1.12) * T3) + T1 * T3;*/ /* dT1_dT = -dT1_dVg * (-dVgst_dT + (Vgst-pParam->B4SOIdelvt-1.12) * T3) + T1 * T3; */ dT1_dT = -dT1_dVg * (-dVgst_dT + (Vgst-pParam->B4SOIdelvt-eggbcp2) * T3) + T1 * T3; /* bugfix 4.3.1 -Tanvir */ else dT1_dT = 0.0; /* dT2_dVg = -model->B4SOIcox / (Vtm * pParam->B4SOIcdep0) * exp(ExpArg2) * (1 - pParam->B4SOImstarcv);*/ dT2_dVg = -model->B4SOIcox / (Vtm * cdep0) * exp(ExpArg2) * (1 - pParam->B4SOImstarcv); /*v4.2 bug fix */ T2 = pParam->B4SOImstarcv - T10 * dT2_dVg / (1.0 - pParam->B4SOImstarcv); /* LFW_FD next 5 lines new */ TL1 = dT2_dVg; dTL1_dVg = TL1 * dExpArg2_dVg; dTL1_dVd = TL1 * dExpArg2_dVd; dTL1_dVb = TL1 * dExpArg2_dVb; dTL1_dVe = TL1 * dExpArg2_dVe; /* LFW_FD fix next 5 derivatives */ dT2_dVg = -(dnoff_dVg * Vtm * TL1 + T10 * dTL1_dVg) / (1.0 - pParam->B4SOImstarcv); dT2_dVd = -(dnoff_dVg * Vtm * TL1 + T10 * dTL1_dVd) / (1.0 - pParam->B4SOImstarcv); dT2_dVb = -(dnoff_dVg * Vtm * TL1 + T10 * dTL1_dVb) / (1.0 - pParam->B4SOImstarcv); dT2_dVe = -(dnoff_dVg * Vtm * TL1 + T10 * dTL1_dVe) / (1.0 - pParam->B4SOImstarcv); if (selfheat) dT2_dT = -(dT10_dT*TL1 +T10*TL1*(-dVtm_dT/Vtm-dcdep0_dT/cdep0+dExpArg2_dT) )/(1.0 - pParam->B4SOImstarcv); else dT2_dT = 0.0; Vgsteff2 = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff2_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; /* LFW_FD fix next 4 derivatives */ dVgsteff2_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3; dVgsteff2_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; dVgsteff2_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff2_dVe = (T2 * dT1_dVe - T1 * dT2_dVe) / T3; if (selfheat) /*fix below expression Wagner */ /*dVgsteff2_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3+ T4 * dVbseff_dT; */ dVgsteff2_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3; else dVgsteff2_dT = 0.0; } } } /* v3.2 */ /* v3.2 */ /* LFW_FD flexilint initializations next 9 lines */ Qsub02 = dQsub02_dVrg = dQsub02_dVg = dQsub02_dVd = dQsub02_dVb = dQsub02_dVe = dQsub02_dT = 0.0; Qac02 = dQac02_dVrg = dQac02_dVg = dQac02_dVd = dQac02_dVb = dQac02_dVe = dQac02_dT = 0.0; dqsrc_dT = 0.0; dVdseffCV2_dT = 0; T02 = dT02_dVg = dT02_dVd = dT02_dVb = dT02_dVe = 0.0; T12 = dT12_dVg = dT12_dVd = dT12_dVb = dT12_dVe = 0.0; T22 = dT22_dVg = dT22_dVd = dT22_dVb = dT22_dVe = 0.0; if (model->B4SOIcapMod == 2) { /* v3.1 */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { /* LFW_FD flexilint initializations next 4 lines */ Qac0 = dQac0_dVrg = dQac0_dVg = dQac0_dVd = dQac0_dVb = dQac0_dVe = dQac0_dT = 0.0; dQac02_dVrg = dQac02_dVg = dQac02_dVd = dQac02_dVb = dQac02_dVe = dQac02_dT = 0.0; Qsub0 = dQsub0_dVrg = dQsub0_dVg = dQsub0_dVd = dQsub0_dVb = dQsub0_dVe = dQsub0_dT = 0.0; dQsub02_dVrg = dQsub02_dVg = dQsub02_dVd = dQsub02_dVb = dQsub02_dVe = dQsub02_dT = 0.0; } else /* soiMod = 0 or 1 */ { Vfb = Vth - phi - pParam->B4SOIk1eff * sqrtPhis + pParam->B4SOIdelvt; dVfb_dVb = dVth_dVb - pParam->B4SOIk1eff * dsqrtPhis_dVb; /* LFW_FD fix/add next 3 derivatives */ dVfb_dVd = dVth_dVd - pParam->B4SOIk1eff * dsqrtPhis_dVd; dVfb_dVg = dVth_dVg - pParam->B4SOIk1eff * dsqrtPhis_dVg; dVfb_dVe = dVth_dVe - pParam->B4SOIk1eff * dsqrtPhis_dVe; /*fix below expression Wagner */ /*dVfb_dT = dVth_dT; */ dVfb_dT = dVth_dT - dphi_dT - pParam->B4SOIk1eff*dsqrtPhis_dT; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3_SOI; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3_SOI * Vfb); T2 = -DELTA_3_SOI / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3_SOI * Vfb); T2 = DELTA_3_SOI / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); /* LFW_FD fix/add next 4 derivatives */ dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd - T1 * dVbseff_dVd; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1 * dVbseff_dVb; dVfbeff_dVg = (1.0 - T1 - T2) * dVfb_dVg - T1 * (dVbseff_dVg - dVgs_eff_dVg); dVfbeff_dVe = (1.0 - T1 - T2) * dVfb_dVe - T1 * dVbseff_dVe; dVfbeff_dVrg = T1 * dVgs_eff_dVg; /*fix below expression Wagner */ /*if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfb_dT; - T1*dVbseff_dT; */ if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfb_dT + T1*(dVgs_eff_dT-dVbseff_dT); else dVfbeff_dT = 0.0; Qac0 = CoxWLb * (Vfbeff - Vfb); dQac0_dVrg = CoxWLb * dVfbeff_dVrg; dQac0_dVd = CoxWLb * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = CoxWLb * (dVfbeff_dVb - dVfb_dVb); /* LFW_FD add next 2 derivatives */ dQac0_dVg = CoxWLb * (dVfbeff_dVg - dVfb_dVg); dQac0_dVe = CoxWLb * (dVfbeff_dVe - dVfb_dVe); if (selfheat) dQac0_dT = CoxWLb * (dVfbeff_dT - dVfb_dT); else dQac0_dT = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' Jun 09 */ ( here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { /* Vfb2 = Vfb + 1.12; */ Vfb2 = Vfb + eggbcp2; /* bugfix 4.3.1 -Tanvir */ dVfb2_dVb = dVfb_dVb; dVfb2_dVd = dVfb_dVd; /* LFW_FD add next 2 derivatives */ dVfb2_dVg = dVfb_dVg; dVfb2_dVe = dVfb_dVe; dVfb2_dT = dVfb_dT; DELTA_3_SOI2 = DELTA_3_SOI; V3 = Vfb2 - Vgs_eff2 + Vbseff - DELTA_3_SOI2; if (Vfb2 <= 0.0) { T0 = sqrt(V3 * V3 - 100.0 * DELTA_3_SOI2 * Vfb2); T2 = -25.0 * DELTA_3_SOI2 / T0; } else { T0 = sqrt(V3 * V3 + 100.0 * DELTA_3_SOI2 * Vfb2); T2 = 25.0 * DELTA_3_SOI2 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff2 = Vfb2 - 0.5 * (V3 + T0); /* LFW_FD fix/add next 4 derivatives */ dVfbeff2_dVg = (1.0 - T2) * dVfb2_dVg - T1 * (dVfb2_dVg - dVgs_eff2_dVg + dVbseff_dVg); dVfbeff2_dVd = (1.0 - T2) * dVfb2_dVd - T1 * (dVfb2_dVd + dVbseff_dVd); dVfbeff2_dVb = (1.0 - T2) * dVfb2_dVb - T1 * (dVfb2_dVb + dVbseff_dVb); dVfbeff2_dVe = (1.0 - T2) * dVfb2_dVe - T1 * (dVfb2_dVe + dVbseff_dVe); dVfbeff2_dVrg = T1 * dVgs_eff2_dVg; /*fix below expression Wagner */ /*if (selfheat) dVfbeff2_dT = (1.0 - T1 - T2) * dVfb2_dT; */ if (selfheat) dVfbeff2_dT = (1.0 - T1 - T2) * dVfb2_dT - T1*dVfbeff2_dT; else dVfbeff2_dT = 0.0; Qac0 += CoxWLb2 * (Vfbeff2 - Vfb2); dQac02_dVrg = CoxWLb2 * dVfbeff2_dVrg; dQac02_dVd = CoxWLb2 * (dVfbeff2_dVd - dVfb2_dVd); dQac02_dVb = CoxWLb2 * (dVfbeff2_dVb - dVfb2_dVb); /* LFW_FD add next 2 derivatives */ dQac02_dVg = CoxWLb2 * (dVfbeff2_dVg - dVfb2_dVg); dQac02_dVe = CoxWLb2 * (dVfbeff2_dVe - dVfb2_dVe); if (selfheat) dQac02_dT = CoxWLb2 * (dVfbeff2_dT - dVfb2_dT); else dQac02_dT = 0.0; dQac0_dT += dQac02_dT; /* new line Wagner */ } /* end v4.1 */ T0 = 0.5 * pParam->B4SOIk1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B4SOIk1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B4SOIk1ox; T2 = CoxWLb; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLb * T0 / T1; } Qsub0 = CoxWLb * pParam->B4SOIk1ox * (T1 - T0); /* 4.1 bug fix */ dQsub0_dVrg = T2 * (dVgs_eff_dVg - dVfbeff_dVrg); /* LFW_FD fix/add next 4 derivatives */ dQsub0_dVd = -T2 * (dVfbeff_dVd + dVbseff_dVd + dVgsteff_dVd); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVbseff_dVg - dVgsteff_dVg); dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseff_dVb + dVgsteff_dVb); dQsub0_dVe = -T2 * (dVfbeff_dVe + dVbseff_dVe + dVgsteff_dVe); /*fix below expression Wagner */ /*if (selfheat) dQsub0_dT = -T2 * dVfbeff_dT; */ if (selfheat) dQsub0_dT = -T2 * (-dVgs_eff_dT + dVfbeff_dT + dVbseff_dT + dVgsteff_dT); else dQsub0_dT = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T3 = Vgs_eff2- Vfbeff2 - Vbseff - Vgsteff2; if (T3 < 0.0) { T1 = T0 + T3 / pParam->B4SOIk1ox; T2 = CoxWLb2; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLb2 * T0 / T1; } Qsub0 += CoxWLb2 * pParam->B4SOIk1ox * (T1 - T0); dQsub02_dVrg = T2 * (dVgs_eff2_dVg - dVfbeff2_dVrg); /* LFW_FD fix/add next 4 derivatives */ dQsub02_dVg = T2 * (dVgs_eff2_dVg - dVfbeff2_dVg - dVbseff_dVg - dVgsteff2_dVg); dQsub02_dVd = -T2 * ( dVfbeff2_dVd + dVbseff_dVd + dVgsteff2_dVd); dQsub02_dVb = -T2 * ( dVfbeff2_dVb + dVbseff_dVb + dVgsteff2_dVb); dQsub02_dVe = -T2 * ( dVfbeff2_dVe + dVbseff_dVe + dVgsteff2_dVe); /*fix below expression Wagner */ /*if (selfheat) dQsub02_dT = -T2 * dVfbeff2_dT; */ if (selfheat) dQsub02_dT = -T2 * (dVfbeff2_dT + dVbseff_dT + dVgsteff2_dT); else dQsub02_dT = 0.0; dQsub0_dT += dQsub02_dT; /* new line Wagner */ } } /* v3.1 */ AbulkCV = Abulk0 * pParam->B4SOIabulkCVfactor; /* LFW_FD add next 3 derivatives */ dAbulkCV_dVg = pParam->B4SOIabulkCVfactor * dAbulk0_dVg; dAbulkCV_dVd = pParam->B4SOIabulkCVfactor * dAbulk0_dVd; dAbulkCV_dVe = pParam->B4SOIabulkCVfactor * dAbulk0_dVe; dAbulkCV_dVb = pParam->B4SOIabulkCVfactor * dAbulk0_dVb; dAbulkCV_dT = dAbulk0_dT * pParam->B4SOIabulkCVfactor; /* new line Wagner */ VdsatCV = Vgsteff / AbulkCV; /* LFW_FD fix/add next 4 derivatives */ dVdsatCV_dVg = (dVgsteff_dVg -VdsatCV * dAbulkCV_dVg) / AbulkCV; dVdsatCV_dVd = (dVgsteff_dVd -VdsatCV * dAbulkCV_dVd) / AbulkCV; dVdsatCV_dVb = (dVgsteff_dVb -VdsatCV * dAbulkCV_dVb) / AbulkCV; dVdsatCV_dVe = (dVgsteff_dVe -VdsatCV * dAbulkCV_dVe) / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; /* LFW_FD fix/add next 4 derivatives */ dVdseffCV_dVg = ( 1.0 - T1 - T2) * dVdsatCV_dVg; dVdseffCV_dVd = ( 1.0 - T1 - T2) * dVdsatCV_dVd + T1; dVdseffCV_dVb = ( 1.0 - T1 - T2) * dVdsatCV_dVb; dVdseffCV_dVe = ( 1.0 - T1 - T2) * dVdsatCV_dVe; /* 10 new lines Wagner */ if (selfheat) { dVdsatCV_dT = dVgsteff_dT/AbulkCV -VdsatCV*dAbulkCV_dT/AbulkCV; dTL1_dT = (V4 + 2.0 * DELTA_4) * dVdsatCV_dT / T0; dVdseffCV_dT = 0.5*dVdsatCV_dT - 0.5*dTL1_dT; } else { dVdsatCV_dT = 0; dVdseffCV_dT = 0; } /* v4.1 */ if (here->B4SOIagbcp2 > 0) { VdsatCV2 = Vgsteff2 / AbulkCV; /* LFW_FD fix/add next 4 derivatives */ dVdsatCV2_dVg = (dVgsteff2_dVg - VdsatCV2 * dAbulkCV_dVg) / AbulkCV; dVdsatCV2_dVd = (dVgsteff2_dVd - VdsatCV2 * dAbulkCV_dVd) / AbulkCV; dVdsatCV2_dVb = (dVgsteff2_dVb - VdsatCV2 * dAbulkCV_dVb) / AbulkCV; dVdsatCV2_dVe = (dVgsteff2_dVe - VdsatCV2 * dAbulkCV_dVe) / AbulkCV; V4 = VdsatCV2 - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV2); VdseffCV2 = VdsatCV2 - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; /* LFW_FD fix/add next 4 derivatives */ dVdseffCV2_dVg = (1.0 - T1 - T2 ) * dVdsatCV2_dVg; dVdseffCV2_dVd = (1.0 - T1 - T2 ) * dVdsatCV2_dVd + T1; dVdseffCV2_dVb = (1.0 - T1 - T2 ) * dVdsatCV2_dVb; dVdseffCV2_dVe = (1.0 - T1 - T2 ) * dVdsatCV2_dVe; /* 10 new lines Wagner */ if (selfheat) { dVdsatCV2_dT = dVgsteff2_dT/AbulkCV -VdsatCV2*dAbulkCV_dT/AbulkCV; dTL1_dT = (V4 + 2.0 * DELTA_4) * dVdsatCV2_dT / T0; dVdseffCV2_dT = 0.5*dVdsatCV2_dT - 0.5*dTL1_dT; } else { dVdsatCV2_dT = 0; dVdseffCV2_dT = 0; } } /* end v4.1 */ /* v3.1 */ Cbg12 = Cbd12 = Cbb12 = Cbe12 = 0; /* LFW_FD flexilint */ dqbulk_dT = 0; /* new line Wagner */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { qbulk = Cbg1 = Cbd1 = Cbb1 = Cbe1 = 0; /* LFW_FD enhance 2 lines */ Cbg12 = Cbd12 = Cbb12 = Cbe12 = 0; /* v4.1 */ } else { T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff- T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; T7 = 1.0 - AbulkCV; qbulk = CoxWLb * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); /* LFW_FD fix next 3 lines with next 20 lines */ /* Cbg1 = CoxWLb * (T4 + T5 * dVdseffCV_dVg); */ /* Cbd1 = CoxWLb * T5 * dVdseffCV_dVd ; */ /* Cbb1 = CoxWLb * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb);*/ dT0_dVg = AbulkCV * dVdseffCV_dVg + dAbulkCV_dVg * VdseffCV; dT0_dVd = AbulkCV * dVdseffCV_dVd + dAbulkCV_dVd * VdseffCV; dT0_dVb = AbulkCV * dVdseffCV_dVb + dAbulkCV_dVb * VdseffCV; dT0_dVe = AbulkCV * dVdseffCV_dVe + dAbulkCV_dVe * VdseffCV; dT1_dVg = 12.0 * (dVgsteff_dVg - 0.5 * dT0_dVg); dT1_dVd = 12.0 * (dVgsteff_dVd - 0.5 * dT0_dVd); dT1_dVb = 12.0 * (dVgsteff_dVb - 0.5 * dT0_dVb); dT1_dVe = 12.0 * (dVgsteff_dVe - 0.5 * dT0_dVe); Cbg1 = CoxWLb * (T7 * (0.5 - T0 / T1) * dVdseffCV_dVg - T7 * VdseffCV * ((dT0_dVg - T0 * dT1_dVg / T1) / T1) - dAbulkCV_dVg * (0.5 * VdseffCV - T3) ); Cbd1 = CoxWLb * (T7 * (0.5 - T0 / T1) * dVdseffCV_dVd - T7 * VdseffCV * ((dT0_dVd - T0 * dT1_dVd / T1) / T1) - dAbulkCV_dVd * (0.5 * VdseffCV - T3) ); Cbb1 = CoxWLb * (T7 * (0.5 - T0 / T1) * dVdseffCV_dVb - T7 * VdseffCV * ((dT0_dVb - T0 * dT1_dVb / T1) / T1) - dAbulkCV_dVb * (0.5 * VdseffCV - T3) ); Cbe1 = CoxWLb * (T7 * (0.5 - T0 / T1) * dVdseffCV_dVe - T7 * VdseffCV * ((dT0_dVe - T0 * dT1_dVe / T1) / T1) - dAbulkCV_dVe * (0.5 * VdseffCV - T3) ); /* 10 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = 12.0 * (dVgsteff_dT -0.5 * dTL1_dT); dTL3_dT = (dVdseffCV_dT - T2 * dTL2_dT) / T1; dTL4_dT = T0 * dTL3_dT + dTL1_dT * T2; dqbulk_dT = CoxWLb * (-dAbulk_dT * (0.5 * VdseffCV - T3) + T7 * (0.5 * dVdseffCV_dT - dTL4_dT)); } else dqbulk_dT = 0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T0 = AbulkCV * VdseffCV2; T1 = 12.0 * (Vgsteff2 - 0.5 * T0 + 1e-20); T2 = VdseffCV2 / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff2 - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff2; T7 = 1.0 - AbulkCV; qbulk += CoxWLb2 * T7 * (0.5 * VdseffCV2 - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV2 - T3)); /* LFW_FD fix next 3 lines with next 20 lines */ /* Cbg12 = CoxWLb2 * (T4 + T5 * dVdseffCV2_dVg);*/ /* Cbd12 = CoxWLb2 * T5 * dVdseffCV2_dVd ; */ /* Cbb12 = CoxWLb2 * (T5 * dVdseffCV2_dVb + T6 * dAbulkCV_dVb);*/ dT0_dVg = AbulkCV * dVdseffCV2_dVg + dAbulkCV_dVg * VdseffCV2; dT0_dVd = AbulkCV * dVdseffCV2_dVd + dAbulkCV_dVd * VdseffCV2; dT0_dVb = AbulkCV * dVdseffCV2_dVb + dAbulkCV_dVb * VdseffCV2; dT0_dVe = AbulkCV * dVdseffCV2_dVe + dAbulkCV_dVe * VdseffCV2; dT1_dVg = 12.0 * (dVgsteff2_dVg - 0.5 * dT0_dVg); dT1_dVd = 12.0 * (dVgsteff2_dVd - 0.5 * dT0_dVd); dT1_dVb = 12.0 * (dVgsteff2_dVb - 0.5 * dT0_dVb); dT1_dVe = 12.0 * (dVgsteff2_dVe - 0.5 * dT0_dVe); Cbg12 = CoxWLb2 * (T7 * (0.5 - T0 / T1) * dVdseffCV2_dVg - T7 * VdseffCV2 * ((dT0_dVg - T0 * dT1_dVg / T1) / T1) - dAbulkCV_dVg * (0.5 * VdseffCV2 - T3) ); Cbd12 = CoxWLb2 * (T7 * (0.5 - T0 / T1) * dVdseffCV2_dVd - T7 * VdseffCV2 * ((dT0_dVd - T0 * dT1_dVd / T1) / T1) - dAbulkCV_dVd * (0.5 * VdseffCV2 - T3) ); Cbb12 = CoxWLb2 * (T7 * (0.5 - T0 / T1) * dVdseffCV2_dVb - T7 * VdseffCV2 * ((dT0_dVb - T0 * dT1_dVb / T1) / T1) - dAbulkCV_dVb * (0.5 * VdseffCV2 - T3) ); Cbe12 = CoxWLb2 * (T7 * (0.5 - T0 / T1) * dVdseffCV2_dVe - T7 * VdseffCV2 * ((dT0_dVe - T0 * dT1_dVe / T1) / T1) - dAbulkCV_dVe * (0.5 * VdseffCV2 - T3) ); /* 10 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = 12.0 * (dVgsteff2_dT -0.5 * dTL1_dT); dTL3_dT = (dVdseffCV2_dT - T2 * dTL2_dT) / T1; dTL4_dT = T0 * dTL3_dT + dTL1_dT * T2; dqbulk_dT += CoxWLb2 * (-dAbulk_dT * (0.5 * VdseffCV2 - T3) + T7 * (0.5 * dVdseffCV2_dT - dTL4_dT)); } else dqbulk_dT += 0; } /* end v4.1 */ } /* v3.1 */ /* Total inversion charge */ T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); /* T2 = VdseffCV / T1; */ T2 = T0 / T1; T3 = T0 * T2; /* T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; */ T4 = (1.0 - 12.0 * T2 * T2);/*bug fix */ T7 = T2 * (2.0 + 6.0 * T2) - 0.5; /*bug fix */ T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; /* qinv = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); */ qgate = qinv = CoxWL * (Vgsteff - 0.5 * T0 + T3); /* enhanced line Wagner */ here->B4SOIqinv = -qinv; /* for noise v3.2 */ /* LFW_FD fix next 3 lines with next 20 lines */ /* Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); */ /* Cgd1 = CoxWL * T5 * dVdseffCV_dVd; */ /* Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb);*/ dT0_dVg = dAbulkCV_dVg * VdseffCV + AbulkCV * dVdseffCV_dVg; dT0_dVd = dAbulkCV_dVd * VdseffCV + AbulkCV * dVdseffCV_dVd; dT0_dVb = dAbulkCV_dVb * VdseffCV + AbulkCV * dVdseffCV_dVb; dT0_dVe = dAbulkCV_dVe * VdseffCV + AbulkCV * dVdseffCV_dVe; dT1_dVg = 12.0 * (dVgsteff_dVg - 0.5 * dT0_dVg); dT1_dVd = 12.0 * (dVgsteff_dVd - 0.5 * dT0_dVd); dT1_dVb = 12.0 * (dVgsteff_dVb - 0.5 * dT0_dVb); dT1_dVe = 12.0 * (dVgsteff_dVe - 0.5 * dT0_dVe); dT2_dVg = (dT0_dVg - T2 * dT1_dVg) / T1; dT2_dVd = (dT0_dVd - T2 * dT1_dVd) / T1; dT2_dVb = (dT0_dVb - T2 * dT1_dVb) / T1; dT2_dVe = (dT0_dVe - T2 * dT1_dVe) / T1; dT3_dVg = dT0_dVg * T2 + T0 * dT2_dVg; dT3_dVd = dT0_dVd * T2 + T0 * dT2_dVd; dT3_dVb = dT0_dVb * T2 + T0 * dT2_dVb; dT3_dVe = dT0_dVe * T2 + T0 * dT2_dVe; Cgg1 = CoxWL * (dVgsteff_dVg - 0.5 * dT0_dVg + dT3_dVg); Cgd1 = CoxWL * (dVgsteff_dVd - 0.5 * dT0_dVd + dT3_dVd); Cgb1 = CoxWL * (dVgsteff_dVb - 0.5 * dT0_dVb + dT3_dVb); Cge1 = CoxWL * (dVgsteff_dVe - 0.5 * dT0_dVe + dT3_dVe); /* 7 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = 12 * (dVgsteff_dT - 0.5*dTL1_dT); dTL3_dT = (2 * T0 * dTL1_dT - T3 * dTL2_dT) / T1; dqgate_dT = CoxWL * (dVgsteff_dT - 0.5* dTL1_dT + dTL3_dT); } else dqgate_dT = 0; /* v4.1 */ /* LFW_FD 2 new lines per flexilint */ T12 = T02 = Cgg12 = Cgd12 = Cgb12 = Cge12 = 0.0; Csg12 = Csd12 = Csb12 = Cse12 = 0.0; dqsrc2_dT = 0; /* new line Wagner */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T02 = AbulkCV * VdseffCV2; T12 = 12.0 * (Vgsteff2 - 0.5 * T02 + 1e-20); T2 = T02 / T12; T3 = T02 * T2; T4 = (1.0 - 12.0 * T2 * T2); T7 = T2 * (2.0 + 6.0 * T2) - 0.5; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV2; qinv += CoxWL2 * (Vgsteff2 - 0.5 * T02 + T3); qgate = qinv; /* new line Wagner */ here->B4SOIqinv = -qinv; /* LFW_FD fix next 3 lines with next 20 lines */ /* Cgg12 = CoxWL2 * (T4 + T5 * dVdseffCV2_dVg); */ /* Cgd12 = CoxWL2 * T5 * dVdseffCV2_dVd; */ /* Cgb12 = CoxWL2 * (T5 * dVdseffCV2_dVb + T6 * dAbulkCV_dVb);*/ dT02_dVg = dAbulkCV_dVg * VdseffCV2 + AbulkCV * dVdseffCV2_dVg; dT02_dVd = dAbulkCV_dVd * VdseffCV2 + AbulkCV * dVdseffCV2_dVd; dT02_dVb = dAbulkCV_dVb * VdseffCV2 + AbulkCV * dVdseffCV2_dVb; dT02_dVe = dAbulkCV_dVe * VdseffCV2 + AbulkCV * dVdseffCV2_dVe; dT12_dVg = 12.0 * (dVgsteff2_dVg - 0.5 * dT02_dVg); dT12_dVd = 12.0 * (dVgsteff2_dVd - 0.5 * dT02_dVd); dT12_dVb = 12.0 * (dVgsteff2_dVb - 0.5 * dT02_dVb); dT12_dVe = 12.0 * (dVgsteff2_dVe - 0.5 * dT02_dVe); dT2_dVg = (dT02_dVg - T2 * dT12_dVg) / T12; dT2_dVd = (dT02_dVd - T2 * dT12_dVd) / T12; dT2_dVb = (dT02_dVb - T2 * dT12_dVb) / T12; dT2_dVe = (dT02_dVe - T2 * dT12_dVe) / T12; dT3_dVg = dT02_dVg * T2 + T02 * dT2_dVg; dT3_dVd = dT02_dVd * T2 + T02 * dT2_dVd; dT3_dVb = dT02_dVb * T2 + T02 * dT2_dVb; dT3_dVe = dT02_dVe * T2 + T02 * dT2_dVe; Cgg12 = CoxWL2 * (dVgsteff2_dVg - 0.5 * dT02_dVg + dT3_dVg); Cgd12 = CoxWL2 * (dVgsteff2_dVd - 0.5 * dT02_dVd + dT3_dVd); Cgb12 = CoxWL2 * (dVgsteff2_dVb - 0.5 * dT02_dVb + dT3_dVb); Cge12 = CoxWL2 * (dVgsteff2_dVe - 0.5 * dT02_dVe + dT3_dVe); /* 8 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = 12 * (dVgsteff2_dT - 0.5*dTL1_dT); dTL3_dT = (2 * T02 * dTL1_dT - T3 * dTL2_dT) / T12; dqgate2_dT = CoxWL2 * (dVgsteff2_dT - 0.5* dTL1_dT + dTL3_dT); dqgate_dT += dqgate2_dT; } else dqgate_dT = 0; } /* end v4.1 */ /* Inversion charge partitioning into S / D */ if (model->B4SOIxpart > 0.5) { /* 0/100 Charge partition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); /* LFW_FD fix next 3 lines with next 12 lines */ /* Csg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); */ /* Csd1 = CoxWL * T5 * dVdseffCV_dVd; */ /* Csb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb);*/ dT1_dVg = 2.0 * dT1_dVg; dT1_dVd = 2.0 * dT1_dVd; dT1_dVb = 2.0 * dT1_dVb; dT1_dVe = 2.0 * dT1_dVe; Csg1 = -CoxWL * (0.5 * dVgsteff_dVg + 0.25 * dT0_dVg - 2.0 * T0 * dT0_dVg / T1 + T0 * T0 * dT1_dVg / (T1 * T1)); Csd1 = -CoxWL * (0.5 * dVgsteff_dVd + 0.25 * dT0_dVd - 2.0 * T0 * dT0_dVd / T1 + T0 * T0 * dT1_dVd / (T1 * T1)); Csb1 = -CoxWL * (0.5 * dVgsteff_dVb + 0.25 * dT0_dVb - 2.0 * T0 * dT0_dVb / T1 + T0 * T0 * dT1_dVb / (T1 * T1)); Cse1 = -CoxWL * (0.5 * dVgsteff_dVe + 0.25 * dT0_dVe - 2.0 * T0 * dT0_dVe / T1 + T0 * T0 * dT1_dVe / (T1 * T1)); /* 8 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = 24 * (dVgsteff_dT - 0.5*dTL1_dT); dqsrc_dT = -CoxWL*(0.5*dVgsteff_dT + 0.25*dTL1_dT - 2*T0*dTL1_dT/T1 + + T0*T0*dTL2_dT/(T1*T1) ); } else dqsrc_dT = 0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T12 = T12 + T12; /*fix below expression Wagner */ /*qsrc += -CoxWL2 * (0.5 * Vgsteff2 + 0.25 * T02 - T02 * T02 / T12); */ qsrc2 = -CoxWL2 * (0.5 * Vgsteff2 + 0.25 * T02 - T02 * T02 / T12); T7 = (4.0 * Vgsteff2 - T02) / (T12 * T12); T4 = -(0.5 + 24.0 * T02 * T02 / (T12 * T12)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T02 * T7); T6 = -(0.25 * VdseffCV2 - 12.0 * T02 * VdseffCV2 * T7); /* LFW_FD fix next 3 lines with next 12 lines */ /* Csg12 = CoxWL2 * (T4 + T5 * dVdseffCV2_dVg); */ /* Csd12 = CoxWL2 * T5 * dVdseffCV2_dVd; */ /* Csb12 = CoxWL2 * (T5 * dVdseffCV2_dVb + T6 * dAbulkCV_dVb);*/ dT12_dVg = 2.0 * dT12_dVg; dT12_dVd = 2.0 * dT12_dVd; dT12_dVb = 2.0 * dT12_dVb; dT12_dVe = 2.0 * dT12_dVe; Csg12 = -CoxWL2 * (0.5 * dVgsteff2_dVg + 0.25 * dT02_dVg - 2.0 * T02 * dT02_dVg / T12 + T02 * T02 * dT12_dVg / (T12 * T12)); Csd12 = -CoxWL2 * (0.5 * dVgsteff2_dVd + 0.25 * dT02_dVd - 2.0 * T02 * dT02_dVd / T12 + T02 * T02 * dT12_dVd / (T12 * T12)); Csb12 = -CoxWL2 * (0.5 * dVgsteff2_dVb + 0.25 * dT02_dVb - 2.0 * T02 * dT02_dVb / T12 + T02 * T02 * dT12_dVb / (T12 * T12)); Cse12 = -CoxWL2 * (0.5 * dVgsteff2_dVe + 0.25 * dT02_dVe - 2.0 * T02 * dT02_dVe / T12 + T02 * T02 * dT12_dVe / (T12 * T12)); /* 11 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = 24 * (dVgsteff2_dT - 0.5*dTL1_dT); dqsrc2_dT = -CoxWL2*(0.5*dVgsteff2_dT + 0.25*dTL1_dT - 2*T02*dTL1_dT/T12 + + T02*T02*dTL2_dT/(T12*T12) ); } else dqsrc2_dT = 0; qsrc += qsrc2; dqsrc_dT += dqsrc2_dT; } /* end v4.1 */ } else if (model->B4SOIxpart < 0.5) { /* 40/60 Charge partition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; /* LFW_FD add next 28 lines of code */ dT1_dVg = dVgsteff_dVg - 0.5 * dT0_dVg; dT1_dVd = dVgsteff_dVd - 0.5 * dT0_dVd; dT1_dVb = dVgsteff_dVb - 0.5 * dT0_dVb; dT1_dVe = dVgsteff_dVe - 0.5 * dT0_dVe; dT2_dVg = - 2.0 * T2 * dT1_dVg / T1; dT2_dVd = - 2.0 * T2 * dT1_dVd / T1; dT2_dVb = - 2.0 * T2 * dT1_dVb / T1; dT2_dVe = - 2.0 * T2 * dT1_dVe / T1; dT3_dVg = dVgsteff_dVg * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) + Vgsteff * (4.0 * T0 *dT0_dVg /3 + dVgsteff_dVg * (Vgsteff - 4.0 * T0 / 3.0) + Vgsteff * (dVgsteff_dVg -4.0 * dT0_dVg / 3.0)) - 2.0 * T0 * T0 * dT0_dVg / 5.0; dT3_dVd = dVgsteff_dVd * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) + Vgsteff * (4.0 * T0 *dT0_dVd /3 + dVgsteff_dVd * (Vgsteff - 4.0 * T0 / 3.0) + Vgsteff * (dVgsteff_dVd -4.0 * dT0_dVd / 3.0)) - 2.0 * T0 * T0 * dT0_dVd / 5.0; dT3_dVb = dVgsteff_dVb * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) + Vgsteff * (4.0 * T0 *dT0_dVb /3 + dVgsteff_dVb * (Vgsteff - 4.0 * T0 / 3.0) + Vgsteff * (dVgsteff_dVb -4.0 * dT0_dVb / 3.0)) - 2.0 * T0 * T0 * dT0_dVb / 5.0; dT3_dVe = dVgsteff_dVe * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) + Vgsteff * (4.0 * T0 *dT0_dVe /3 + dVgsteff_dVe * (Vgsteff - 4.0 * T0 / 3.0) + Vgsteff * (dVgsteff_dVe -4.0 * dT0_dVe / 3.0)) - 2.0 * T0 * T0 * dT0_dVe / 5.0; Csg1 = - T2 * dT3_dVg - dT2_dVg * T3; Csd1 = - T2 * dT3_dVd - dT2_dVd * T3; Csb1 = - T2 * dT3_dVb - dT2_dVb * T3; Cse1 = - T2 * dT3_dVe - dT2_dVe * T3; /* 13 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = (dVgsteff_dT - 0.5*dTL1_dT); dTL3_dT = - CoxWL * dTL2_dT / (T1 * T1 * T1); dTL4_dT = dVgsteff_dT * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0) ) + Vgsteff * (4.0 * T0 * dTL1_dT /3.0 + dVgsteff_dT * (Vgsteff - 4.0 * T0 / 3.0) + Vgsteff * (dVgsteff_dT -4.0 * dTL1_dT / 3.0) ) - 2.0 * T0 * T0 * dTL1_dT / 5.0; dqsrc_dT = -T2*dTL4_dT - dTL3_dT*T3; } else dqsrc_dT = 0; /* LFW_FD delete next 10 lines of code */ /* T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) */ /* + 0.4 * T0 * T0; */ /* T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 */ /* * Vgsteff - 8.0 * T0 / 3.0) */ /* + 2.0 * T0 * T0 / 3.0); */ /* T5 = (qsrc / T1 + T2 * T7) * AbulkCV; */ /* T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV);*/ /* Csg1 = T4 + T5 * dVdseffCV_dVg; */ /* Csd1 = T5 * dVdseffCV_dVd; */ /* Csb1 = T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb; */ /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 >0) { T12 = T12 /12.0; T2 = 0.5 * CoxWL2 / (T12 * T12); T3 = Vgsteff2 * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0)) - 2.0 * T02 * T02 * T02 / 15.0; qsrc2 = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff2 * (Vgsteff2 - T02) + 0.4 * T02 * T02; T4 = -2.0 * qsrc2 / T12 - T2 * (Vgsteff2 * (3.0 * Vgsteff2 - 8.0 * T02 / 3.0) + 2.0 * T02 * T02 / 3.0); T5 = (qsrc2 / T12 + T2 * T7) * AbulkCV; T6 = (qsrc2 / T12 * VdseffCV2 + T2 * T7 * VdseffCV2); /* LFW_FD fix next 3 lines with next 28 lines */ /* Csg12 = T4 + T5 * dVdseffCV2_dVg; */ /* Csd12 = T5 * dVdseffCV2_dVd; */ /* Csb12 = T5 * dVdseffCV2_dVb + T6 * dAbulkCV_dVb;*/ dT12_dVg = dVgsteff2_dVg - 0.5 * dT02_dVg; dT12_dVd = dVgsteff2_dVd - 0.5 * dT02_dVd; dT12_dVb = dVgsteff2_dVb - 0.5 * dT02_dVb; dT12_dVe = dVgsteff2_dVe - 0.5 * dT02_dVe; dT2_dVg = - 2.0 * T2 * dT12_dVg / T12; dT2_dVd = - 2.0 * T2 * dT12_dVd / T12; dT2_dVb = - 2.0 * T2 * dT12_dVb / T12; dT2_dVe = - 2.0 * T2 * dT12_dVe / T12; dT3_dVg = dVgsteff2_dVg * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0)) + Vgsteff2 * (4.0 * T02 *dT02_dVg /3 + dVgsteff2_dVg * (Vgsteff2 - 4.0 * T02 / 3.0) + Vgsteff2 * (dVgsteff2_dVg -4.0 * dT02_dVg / 3.0)) - 2.0 * T02 * T02 * dT02_dVg / 5.0; dT3_dVd = dVgsteff2_dVd * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0)) + Vgsteff2 * (4.0 * T02 *dT02_dVd /3 + dVgsteff2_dVd * (Vgsteff2 - 4.0 * T02 / 3.0) + Vgsteff2 * (dVgsteff2_dVd -4.0 * dT02_dVd / 3.0)) - 2.0 * T02 * T02 * dT02_dVd / 5.0; dT3_dVb = dVgsteff2_dVb * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0)) + Vgsteff2 * (4.0 * T02 *dT02_dVb /3 + dVgsteff2_dVb * (Vgsteff2 - 4.0 * T02 / 3.0) + Vgsteff2 * (dVgsteff2_dVb -4.0 * dT02_dVb / 3.0)) - 2.0 * T02 * T02 * dT02_dVb / 5.0; dT3_dVe = dVgsteff2_dVe * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0)) + Vgsteff2 * (4.0 * T02 *dT02_dVe /3 + dVgsteff2_dVe * (Vgsteff2 - 4.0 * T02 / 3.0) + Vgsteff2 * (dVgsteff2_dVe -4.0 * dT02_dVe / 3.0)) - 2.0 * T02 * T02 * dT02_dVe / 5.0; Csg12 = - T2 * dT3_dVg - dT2_dVg * T3; Csd12 = - T2 * dT3_dVd - dT2_dVd * T3; Csb12 = - T2 * dT3_dVb - dT2_dVb * T3; Cse12 = - T2 * dT3_dVe - dT2_dVe * T3; /* 13 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = (dVgsteff2_dT - 0.5*dTL1_dT); dTL3_dT = - CoxWL2 * dTL2_dT / (T12 * T12 * T12); dTL4_dT = dVgsteff2_dT * (2.0 * T02 * T02 / 3.0 + Vgsteff2 * (Vgsteff2 - 4.0 * T02 / 3.0) ) + Vgsteff2 * (4.0 * T02 * dTL1_dT /3.0 + dVgsteff2_dT * (Vgsteff2 - 4.0 * T02 / 3.0) + Vgsteff2 * (dVgsteff2_dT -4.0 * dTL1_dT / 3.0) ) - 2.0 * T02 * T02 * dTL1_dT /5.0; dqsrc2_dT = -T2*dTL4_dT - dTL3_dT*T3; } else dqsrc2_dT = 0; qsrc += qsrc2; dqsrc_dT += dqsrc2_dT; /* new line Wagner */ } /* end v4.1 */ } else { /* 50/50 Charge partition model */ qsrc = - 0.5 * (qinv + qbulk); Csg1 = - 0.5 * (Cgg1 + Cbg1); Csb1 = - 0.5 * (Cgb1 + Cbb1); Csd1 = - 0.5 * (Cgd1 + Cbd1); Cse1 = - 0.5 * (Cge1 + Cbe1); /* LFW_FD new line */ /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 >0) { Csg12 = -0.5 * (Cgg12 + Cbg12); Csb12 = -0.5 * (Cgb12 + Cbb12); Csd12 = -0.5 * (Cgd12 + Cbd12); Cse12 = -0.5 * (Cge12 + Cbe12); /* LFW_FD new line */ } dqsrc_dT = -0.5 * (dqgate_dT + dqbulk_dT); /* new line Wagner */ /* end v4.1 */ } /* Backgate charge */ /* v3.1 */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { Qe1 = dQe1_dVb = dQe1_dVe = Ce1T = dQe1_dT = 0; /* enhanced line Wagner */ } else /* soiMod = 0 or 1 */ { CboxWL = pParam->B4SOIkb1 * model->B4SOIfbody * Cbox * (pParam->B4SOIweffCV / here->B4SOInseg * here->B4SOInf /* bugfix_snps nf*/ * pParam->B4SOIleffCVbg + here->B4SOIaebcp); Qe1 = CboxWL * (Vesfb - Vbs); dQe1_dVb = -CboxWL; dQe1_dVe = CboxWL; if (selfheat) Ce1T = dQe1_dT = -CboxWL * dvfbb_dT; /* enhanced line Wagner */ else dQe1_dT = 0; } /* v3.1 */ qgate = qinv + Qac0 + Qsub0; /* LFW_FD commentary only; next 2 lines */ /* Correct definition of qgate below. Not used because it changes CMC defined model.*/ /* qgate = qinv + Qac0 + Qsub0 - qbulk;*/ qbody = (qbulk - Qac0 - Qsub0 - Qe1); qsub = Qe1; qdrn = -(qgate + qsrc + qbody + qsub); /* 4 new lines Wagner */ dqgate_dT = dqgate_dT + dQac0_dT + dQsub0_dT; dqbody_dT = (dqbulk_dT - dQac0_dT - dQsub0_dT - dQe1_dT); dqsub_dT = dQe1_dT; dqdrn_dT = -(dqgate_dT + dqsrc_dT + dqbody_dT + dqsub_dT); /* This transform all the dependency on Vgsteff, Vbseff into real ones */ Ce1b = dQe1_dVb; Ce1e = dQe1_dVe; /* LFW_FD fix/add next 4 lines */ Csg = Csg1; Csd = Csd1; Csb = Csb1; Cse = Cse1; /*fix expression below Wagner */ /*if (selfheat) CsT = Csg1 * dVgsteff_dT;*/ if (selfheat) CsT = dqsrc_dT; else CsT = 0.0; /* LFW_FD fix/add next 4 lines */ Cgg = Cgg1 + dQsub0_dVg + dQac0_dVg; Cgd = Cgd1 + dQsub0_dVd + dQac0_dVd; Cgb = Cgb1 + dQsub0_dVb + dQac0_dVb; Cge = Cge1 + dQsub0_dVe + dQac0_dVe; /* LFW_FD commentary only; next 5 lines */ /* Use these with correct definition of qgate above */ /* Cgg = Cgg1 + dQsub0_dVg + dQac0_dVg - Cbg1; */ /* Cgd = Cgd1 + dQsub0_dVd + dQac0_dVd - Cbd1; */ /* Cgb = Cgb1 + dQsub0_dVb + dQac0_dVb - Cbb1; */ /* Cge = Cge1 + dQsub0_dVe + dQac0_dVe - Cbe1; */ if (selfheat) /*fix expression below Wagner */ /*CgT = (Cgg1 + dQsub0_dVg) * dVgsteff_dT + dQac0_dT + dQsub0_dT;*/ CgT = dqgate_dT; else CgT = 0.0; /* LFW_FD fix/add next 4 lines */ Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQac0_dVd - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb - Ce1b; Cbe = Cbe1 - dQac0_dVe - dQsub0_dVe - Ce1e; if (selfheat) /*fix expression below Wagner */ /*CbT = (Cbg1 - dQsub0_dVg) * dVgsteff_dT - dQac0_dT - dQsub0_dT - dQe1_dT;*/ CbT = dqbody_dT; else CbT = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 >0) { /* LFW_FD fixed next 12 lines */ Csg += Csg12; Csd += Csd12; Csb += Csb12; Cse += Cse12; Cgg += Cgg12 + dQsub02_dVg + dQac02_dVg; Cgd += Cgd12 + dQsub02_dVd + dQac02_dVd; Cgb += Cgb12 + dQsub02_dVb + dQac02_dVb; Cge += Cge12 + dQsub02_dVe + dQac02_dVe; Cbg += Cbg12 - dQac02_dVg - dQsub02_dVg; Cbd += Cbd12 - dQac02_dVd - dQsub02_dVd; Cbb += Cbb12 - dQac02_dVb - dQsub02_dVb; Cbe += Cbe12 - dQac02_dVe - dQsub02_dVe; } /* end v4.1 */ here->B4SOIcggb = Cgg ; here->B4SOIcgsb = - (Cgg + Cgd + Cgb + Cge); /* LFW_FD fixed line */ here->B4SOIcgdb = Cgd; here->B4SOIcgeb = Cge; /* LFW_FD new line */ here->B4SOIcgT = CgT; here->B4SOIcbgb = Cbg; here->B4SOIcbsb = -(Cbg + Cbd + Cbb + Cbe); /* LFW_FD fixed line */ here->B4SOIcbdb = Cbd; here->B4SOIcbeb = Cbe; /* LFW_FD fixed line */ here->B4SOIcbT = CbT; here->B4SOIceeb = Ce1e ; here->B4SOIceT = dQe1_dT; here->B4SOIcdgb = -(Cgg + Cbg + Csg); here->B4SOIcddb = -(Cgd + Cbd + Csd); here->B4SOIcdeb = -(Cge + Cse + Cbe) - Ce1e; /* LFW_FD fixed line */ here->B4SOIcdT = -(CgT + CbT + CsT) - dQe1_dT; here->B4SOIcdsb = Cgg + Cgd + Cgb + Cge /* LFW_FD fixed expression */ + Cbg + Cbd + Cbb + Cbe + Ce1e + Csg + Csd + Csb + Cse + Ce1b; } /* End of if capMod == 2 */ else if (model->B4SOIcapMod == 3) { /* dVgsteff_dVb /= dVbseff_dVb; LFW_FD comment out line */ if(model->B4SOImtrlMod == 0) Cox = 3.453133e-11 / model->B4SOItoxp; else Cox = epsrox * EPS0 / model->B4SOItoxp; CoxWL *= toxe/ model->B4SOItoxp; CoxWLb *= model->B4SOItox/ model->B4SOItoxp; Tox=1.0e8*model->B4SOItoxp; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { /* dVgsteff2_dVb /= dVbseff_dVb; LFW_FD comment out line */ CoxWL2 *= model->B4SOItox / model->B4SOItoxp; CoxWLb2 *= model->B4SOItox/ model->B4SOItoxp; } /* end v4.1 */ /* v3.1 */ /* LFW_FD flexilint inits next 7 lines */ Vfbzb = pParam->B4SOIvfbzb + pParam->B4SOIdelvt; dVfbzb_dT = 0.0; Vfbzb2 = dVfbzb2_dT = 0.0; Tcen2 = dTcen2_dVg = dTcen2_dVd = dTcen2_dVb = dTcen2_dVe = dTcen2_dT = 0.0; Coxeff2 = dCoxeff2_dVg = dCoxeff2_dVd = dCoxeff2_dVb = dCoxeff2_dVe = dCoxeff2_dT = 0.0; CoxWLcenb2= dCoxWLcenb2_dT= 0.0; dDeltaPhi2_dT = 0.0; if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { /* LFW_FD enhance next 4 lines */ Qac0 = dQac0_dVg = dQac0_dVb = dQac0_dVd = dQac0_dVe = dQac0_dT = 0.0; dQac02_dVg = dQac02_dVb = dQac02_dVd = dQac02_dVe = dQac02_dT = 0.0; Qsub0 = dQsub0_dVg = dQsub0_dVd = dQsub0_dVb = dQsub0_dVe = dQsub0_dT = 0.0; dQsub02_dVg = dQsub02_dVd = dQsub02_dVb = dQsub02_dVe = dQsub02_dT = 0.0; Vfbzb = dVfbzb_dT = 0; /* v4.2 bug fix # 20 */ } else /* soiMod = 0 or 1 */ { if (selfheat) { Vfbzb = Vthzb - phi - pParam->B4SOIk1eff * sqrtPhi + pParam->B4SOIdelvt; /*fix expression below Wagner */ /*dVfbzb_dT = dVthzb_dT;*/ dVfbzb_dT = dVthzb_dT - dphi_dT - pParam->B4SOIk1eff*dsqrtPhi_dT; } else { Vfbzb = here->B4SOIvfbzb + pParam->B4SOIdelvt; dVfbzb_dT = 0; } V3 = Vfbzb - Vgs_eff + Vbseff - DELTA_3; if (Vfbzb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfbzb); T2 = -DELTA_3 / T0; /* dTL0_dT = (V3 * dTL3_dT - 2.0 * DELTA_3 * dVfbzb_dT) / T0; LFW_FD delete line */ } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfbzb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfbzb - 0.5 * (V3 + T0); /* LFW_FD fix/add next 4 lines */ dVfbeff_dVg = T1 * (dVgs_eff_dVg - dVbseff_dVg); dVfbeff_dVd = T1 * ( - dVbseff_dVd); dVfbeff_dVb = T1 * ( - dVbseff_dVb); dVfbeff_dVe = T1 * ( - dVbseff_dVe); /*fix expression below Wagner */ /*if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfbzb_dT; - T1*dVbseff_dT; */ if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfbzb_dT + T1*(dVgs_eff_dT - dVbseff_dT); else dVfbeff_dT = 0.0; /* v4.1 */ if (here->B4SOIagbcp2 >0) { /* Vfbzb2 = Vfbzb + 1.12; */ Vfbzb2 = Vfbzb + eggbcp2; /* bugfix v4.3.1 -Tanvir */ if (selfheat) dVfbzb2_dT = dVfbzb_dT; else dVfbzb2_dT = 0; V3 = Vfbzb2 - Vgs_eff2 + Vbseff - DELTA_3; if (Vfbzb2 <= 0.0) /* Bug fix #12 Jun 09 Vfbzb changed to Vfbzb2 */ { T0 = sqrt(V3 * V3 - 100.0 * DELTA_3 * Vfbzb2); /* Value of 100 instead of 4 is used to make transition smooth*/ T2 = -25.0 * DELTA_3 / T0; /* p+/p has same smoothness as n+/p with 100, 4 makes it too steep*/ } else { T0 = sqrt(V3 * V3 + 100.0 * DELTA_3 * Vfbzb2); T2 = 25.0 * DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff2 = Vfbzb2 - 0.5 * (V3 + T0); /* LFW_FD fix/add next 4 lines */ dVfbeff2_dVg = T1 * (dVgs_eff2_dVg - dVbseff_dVg); dVfbeff2_dVd = T1 * ( - dVbseff_dVd); dVfbeff2_dVb = T1 * ( - dVbseff_dVb); dVfbeff2_dVe = T1 * ( - dVbseff_dVe); /*fix expression below Wagner */ /*if (selfheat) dVfbeff2_dT = (1.0 - T1 - T2) * dVfbzb2_dT;*/ if (selfheat) dVfbeff2_dT = (1.0 - T1 - T2) * dVfbzb2_dT - T1*dVbseff_dT; else dVfbeff2_dT = 0.0; } /* end v4.1 */ T0 = (Vgs_eff - Vbseff - Vfbzb) / Tox; /* LFW_FD fix/add next 4 lines */ dT0_dVg = (dVgs_eff_dVg - dVbseff_dVg) /Tox; dT0_dVd = - dVbseff_dVd /Tox; dT0_dVb = - dVbseff_dVb /Tox; dT0_dVe = - dVbseff_dVe /Tox; tmp = T0 * pParam->B4SOIacde; if ((-EXPL_THRESHOLD < tmp) && (tmp < EXPL_THRESHOLD)) { Tcen = pParam->B4SOIldeb * exp(tmp); /* LFW_FD fix/add next 5 lines */ TL1 = pParam->B4SOIacde * Tcen; dTcen_dVg = TL1 * dT0_dVg; dTcen_dVd = TL1 * dT0_dVd; dTcen_dVb = TL1 * dT0_dVb; dTcen_dVe = TL1 * dT0_dVe; if (selfheat) /* fix below expression Wagner */ /*dTcen_dT = -Tcen * pParam->B4SOIacde * dVfbzb_dT / Tox; */ dTcen_dT = Tcen * pParam->B4SOIacde * (dVgs_eff_dT-dVbseff_dT-dVfbzb_dT) / Tox; else dTcen_dT = 0; } else if (tmp <= -EXPL_THRESHOLD) { Tcen = pParam->B4SOIldeb * MIN_EXPL; dTcen_dVg = dTcen_dVb = dTcen_dVd = dTcen_dVe = dTcen_dT = 0.0; /* LFW_FD enhance line */ } else { Tcen = pParam->B4SOIldeb * MAX_EXPL; dTcen_dVg = dTcen_dVb = dTcen_dVd = dTcen_dVe = dTcen_dT = 0.0; /* LFW_FD enhance line */ } /*LINK = 1.0e-3 * (toxe - model->B4SOIdtoxcv); v2.2.3 */ LINK = 1.0e-3 * model->B4SOItoxp; V3 = pParam->B4SOIldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->B4SOIldeb); Tcen = pParam->B4SOIldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); /* v4.1 small Tcen can introduce numerical issue */ if (Tcen < 1e-15) { Tcen = 1e-15; T1 = 0; } /* end */ dTcen_dVg *= T1; dTcen_dVb *= T1; dTcen_dVd *= T1; /* LFW_FD new line */ dTcen_dVe *= T1; /* LFW_FD new line */ if (selfheat) dTcen_dT *= T1; else dTcen_dT = 0; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { T0 = (Vgs_eff2 - Vbseff - Vfbzb2) / Tox; /* LFW_FD fix/add next 4 lines */ dT0_dVg = (dVgs_eff2_dVg - dVbseff_dVg) / Tox; dT0_dVd = -dVbseff_dVd / Tox; dT0_dVb = -dVbseff_dVb / Tox; dT0_dVe = -dVbseff_dVe / Tox; tmp = T0 * pParam->B4SOIacde; if ((-EXPL_THRESHOLD < tmp) && (tmp < EXPL_THRESHOLD)) { Tcen2 = pParam->B4SOIldeb * exp(tmp); /* LFW_FD fix/add next 4 lines */ dTcen2_dVg = pParam->B4SOIacde * Tcen2 * dT0_dVg; dTcen2_dVd = pParam->B4SOIacde * Tcen2 * dT0_dVd; dTcen2_dVb = pParam->B4SOIacde * Tcen2 * dT0_dVb; dTcen2_dVe = pParam->B4SOIacde * Tcen2 * dT0_dVe; if (selfheat) dTcen2_dT = -Tcen2 * pParam->B4SOIacde * dVfbzb2_dT / Tox; else dTcen2_dT = 0; } else if (tmp <= -EXPL_THRESHOLD) { Tcen2 = pParam->B4SOIldeb * MIN_EXPL; dTcen2_dVg = dTcen2_dVd = dTcen2_dVb = dTcen2_dVe = dTcen2_dT = 0.0; /* LFW_FD enhance line */ } else { Tcen2 = pParam->B4SOIldeb * MAX_EXPL; dTcen2_dVg = dTcen2_dVd = dTcen2_dVb = dTcen2_dVe = dTcen2_dT = 0.0; /* LFW_FD enhance line */ } V3 = pParam->B4SOIldeb - Tcen2 - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->B4SOIldeb); Tcen2 = pParam->B4SOIldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); if (Tcen2 < 1e-15) { Tcen2 = 1e-15; T1 = 0; } dTcen2_dVg *= T1; dTcen2_dVb *= T1; dTcen2_dVd *= T1; /* LFW_FD new line */ dTcen2_dVe *= T1; /* LFW_FD new line */ if (selfheat) dTcen2_dT *= T1; else dTcen2_dT = 0; } /* end v4.1 */ Ccen = epssub / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; /* LFW_FD fix/add next 5 lines */ TL1 = T2 * T2 * T3; dCoxeff_dVg = TL1 * dTcen_dVg; dCoxeff_dVd = TL1 * dTcen_dVd; dCoxeff_dVb = TL1 * dTcen_dVb; dCoxeff_dVe = TL1 * dTcen_dVe; if (selfheat) /*fix expression below Wagner */ /*dCoxeff_dT = T3 * dTcen_dT * (T2 - Coxeff / (Cox + Ccen));*/ dCoxeff_dT = - Coxeff * T2 * dTcen_dT / Tcen; else dCoxeff_dT = 0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { /* Ccen2 = EPSSI / Tcen2; */ /* Bug Fix # 30 Jul09 EPSSI changed to epssub */ Ccen2 = epssub / Tcen2; T2 = Cox / (Cox + Ccen2); Coxeff2 = T2 * Ccen2; T3 = -Ccen2 / Tcen2; /* LFW_FD fix/add next 5 lines */ TL1 = T2 * T2 * T3; dCoxeff2_dVg = TL1 * dTcen2_dVg; dCoxeff2_dVd = TL1 * dTcen2_dVd; dCoxeff2_dVb = TL1 * dTcen2_dVb; dCoxeff2_dVe = TL1 * dTcen2_dVe; if (selfheat) /*fix expression below Wagner */ /*dCoxeff2_dT = T3 * dTcen2_dT * (T2 - Coxeff2 / (Cox + Ccen2));*/ dCoxeff2_dT = - Coxeff2 * T2 * dTcen2_dT / Tcen2; else dCoxeff2_dT = 0; } /* end v4.1 */ CoxWLcenb = CoxWLb * Coxeff / Cox; if (selfheat) dCoxWLcenb_dT = CoxWLb * dCoxeff_dT / Cox; else dCoxWLcenb_dT = 0; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { CoxWLcenb2 = CoxWLb2 * Coxeff2 / Cox; if (selfheat) dCoxWLcenb2_dT = CoxWLb2 * dCoxeff2_dT / Cox; else dCoxWLcenb2_dT = 0; } /* end v4.1 */ Qac0 = CoxWLcenb * (Vfbeff - Vfbzb); QovCox = Qac0 / Coxeff; /* LFW_FD fix/add next 4 lines */ dQac0_dVg = CoxWLcenb * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcenb * dVfbeff_dVb + QovCox * dCoxeff_dVb; dQac0_dVd = CoxWLcenb * dVfbeff_dVd + QovCox * dCoxeff_dVd; dQac0_dVe = CoxWLcenb * dVfbeff_dVe + QovCox * dCoxeff_dVe; if (selfheat) dQac0_dT = CoxWLcenb * (dVfbeff_dT - dVfbzb_dT) + dCoxWLcenb_dT * (Vfbeff - Vfbzb); else dQac0_dT = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { Qac02 = CoxWLcenb2 * (Vfbeff2 - Vfbzb2); QovCox2 = Qac02 / Coxeff2; /* LFW_FD fix/add next 4 lines */ dQac02_dVg = CoxWLcenb2 * dVfbeff2_dVg + QovCox2 * dCoxeff2_dVg; dQac02_dVd = CoxWLcenb2 * dVfbeff2_dVd + QovCox2 * dCoxeff2_dVd; dQac02_dVb = CoxWLcenb2 * dVfbeff2_dVb + QovCox2 * dCoxeff2_dVb; dQac02_dVe = CoxWLcenb2 * dVfbeff2_dVe + QovCox2 * dCoxeff2_dVe; if (selfheat) dQac02_dT = CoxWLcenb2 * (dVfbeff2_dT - dVfbzb2_dT) + dCoxWLcenb2_dT * (Vfbeff2 - Vfbzb2); else dQac02_dT = 0.0; Qac0 += Qac02; dQac0_dT += dQac02_dT; /* new line Wagner */ } /* end v4.1 */ T0 = 0.5 * pParam->B4SOIk1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B4SOIk1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B4SOIk1ox; T2 = CoxWLcenb; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcenb * T0 / T1; } Qsub0 = CoxWLcenb * pParam->B4SOIk1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; /* LFW_FD fix/add next 4 lines */ dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVbseff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * (dVfbeff_dVd + dVbseff_dVd + dVgsteff_dVd) + QovCox * dCoxeff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseff_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; dQsub0_dVe = -T2 * (dVfbeff_dVe + dVbseff_dVe + dVgsteff_dVe) + QovCox * dCoxeff_dVe; if (selfheat) /*fix 1st line of expression below Wagner */ /*dQsub0_dT = -T2 * (dVfbeff_dT + dVgsteff_dT)*/ dQsub0_dT = T2 * (dVgs_eff_dT - dVfbeff_dT - dVbseff_dT - dVgsteff_dT) + dCoxWLcenb_dT * pParam->B4SOIk1ox * (T1 - T0); else dQsub0_dT = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T3 = Vgs_eff2 - Vfbeff2 - Vbseff - Vgsteff2; if (pParam->B4SOIk1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B4SOIk1ox; T2 = CoxWLcenb2; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcenb2 * T0 / T1; } Qsub02 = CoxWLcenb2 * pParam->B4SOIk1ox * (T1 - T0); QovCox2 = Qsub02 / Coxeff2; /* LFW_FD fix/add next 4 lines */ dQsub02_dVg = T2 * (dVgs_eff2_dVg - dVfbeff2_dVg - dVbseff_dVg - dVgsteff2_dVg) + QovCox2 * dCoxeff2_dVg; dQsub02_dVd = -T2 * (dVfbeff2_dVd + dVbseff_dVd + dVgsteff2_dVd) + QovCox2 * dCoxeff2_dVd; dQsub02_dVb = -T2 * (dVfbeff2_dVb + dVbseff_dVb + dVgsteff2_dVb) + QovCox2 * dCoxeff2_dVb; dQsub02_dVe = -T2 * (dVfbeff2_dVe + dVbseff_dVe + dVgsteff2_dVe) + QovCox2 * dCoxeff2_dVe; if (selfheat) dQsub02_dT = -T2 * (dVfbeff2_dT + dVgsteff2_dT) + dCoxWLcenb2_dT * pParam->B4SOIk1ox * (T1 - T0); else dQsub02_dT = 0.0; Qsub0 += Qsub02; dQsub0_dT += dQsub02_dT; /* new line Wagner */ } /* end v4.1 */ } /* v3.1 */ /* Gate-bias dependent delta Phis begins */ if (pParam->B4SOIk1ox <= 0.0) { Denomi = 0.25 * pParam->B4SOImoin * Vtm; T0 = 0.5 * pParam->B4SOIsqrtPhi; } else { Denomi = pParam->B4SOImoin * Vtm * pParam->B4SOIk1ox * pParam->B4SOIk1ox; T0 = pParam->B4SOIk1ox * pParam->B4SOIsqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); /* LFW_FD fix/add next 5 lines */ dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff) * dVgsteff_dVg; dDeltaPhi_dVd = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff) * dVgsteff_dVd; dDeltaPhi_dVb = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff) * dVgsteff_dVb; dDeltaPhi_dVe = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff) * dVgsteff_dVe; DeltaPhi2 = dDeltaPhi2_dVg = dDeltaPhi2_dVd = dDeltaPhi2_dVb = dDeltaPhi2_dVe = 0.0; /* flexilint */ /* 7 new lines Wagner */ if (selfheat) { TL1 = 1.0 + T1 * Vgsteff / Denomi; dTL1_dT = (2*(T0+Vgsteff)*dVgsteff_dT/Denomi) - (T1 * Vgsteff / (Denomi*Vtm))*dVtm_dT; dDeltaPhi_dT = dVtm_dT * log(TL1) + (Vtm/TL1)*dTL1_dT; } else dDeltaPhi_dT = 0.0; /* v4.1 */ if (here->B4SOIagbcp2 > 0) { T1 = 2.0 * T0 + Vgsteff2; DeltaPhi2 = Vtm * log(1.0 + T1 * Vgsteff2 / Denomi); /* LFW_FD fix/add next 4 lines */ dDeltaPhi2_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff2) * dVgsteff2_dVg; dDeltaPhi2_dVd = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff2) * dVgsteff2_dVd; dDeltaPhi2_dVb = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff2) * dVgsteff2_dVb; dDeltaPhi2_dVe = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff2) * dVgsteff2_dVe; /* 7 new lines Wagner */ if (selfheat) { TL1 = 1.0 + T1 * Vgsteff2 / Denomi; dTL1_dT = (2*(T0+Vgsteff2)*dVgsteff2_dT/Denomi) - (T1 * Vgsteff2 / (Denomi*Vtm))*dVtm_dT; dDeltaPhi2_dT = dVtm_dT * log(TL1) + (Vtm/TL1)*dTL1_dT; } else dDeltaPhi2_dT = 0.0; } /* end v4.1 */ /* End of delta Phis */ /* v3.1.1 bug fix for discontinuity */ T3 = 4.0 * (Vth - Vfbzb - phi); T2 = sqrt(T3*T3 + 0.0001); T5 = 0.5 * (1 + T3/T2); T4 = 0.5 * (T3 + T2); Tox += Tox; T0 = (Vgsteff + T4) / Tox; tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; /* LFW_FD fix/add next 5 lines */ TL1 = dTcen_dVg = -Tcen * T2 / T1; dTcen_dVg = TL1 * (T5 * 4.0 * dVth_dVg + dVgsteff_dVg); dTcen_dVd = TL1 * (T5 * 4.0 * dVth_dVd + dVgsteff_dVd); dTcen_dVb = TL1 * (T5 * 4.0 * dVth_dVb + dVgsteff_dVb); dTcen_dVe = TL1 * (T5 * 4.0 * dVth_dVe + dVgsteff_dVe); if (selfheat) /*fix below expression Wagner */ /*dTcen_dT = -Tcen * T2 / T1 * (T5 * 4.0 * (dVth_dT - dVfbzb_dT) + dVgsteff_dT);*/ dTcen_dT = -Tcen * T2 / T1 * (T5 * 4.0 * (dVth_dT - dVfbzb_dT - dphi_dT) + dVgsteff_dT); else dTcen_dT = 0; Ccen = epssub / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; /* LFW_FD fix/add next 5 lines */ TL1 = dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVg = TL1 * dTcen_dVg; dCoxeff_dVd = TL1 * dTcen_dVd; dCoxeff_dVb = TL1 * dTcen_dVb; dCoxeff_dVe = TL1 * dTcen_dVe; if (selfheat) /*dCoxeff_dT = T1 * dTcen_dT * (T0 - Coxeff / (Cox + Ccen));*/ dCoxeff_dT = TL1 * dTcen_dT; /* LFW_FD fix line */ else dCoxeff_dT = 0; CoxWLcen = CoxWL * Coxeff / Cox; CoxWLcenb = CoxWLb * Coxeff / Cox; /* 3 new lines Wagner*/ if (selfheat) dCoxWLcenb_dT = CoxWLb * dCoxeff_dT / Cox; else dCoxWLcenb_dT = 0; /* v4.1 */ CoxWLcen2 = 0.0; /* flexilint */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { /* T3 = 4.0 * (Vth + 1.12 - Vfbzb2 - phi); */ T3 = 4.0 * (Vth + eggbcp2 - Vfbzb2 - phi); /* bugfix v4.3.1 -Tanvir */ T2 = sqrt(T3*T3 + 0.0001); T5 = 0.5 * (1 + T3/T2); T4 = 0.5 * (T3 + T2); /* Tox += Tox; */ T0 = (Vgsteff2 + T4) / Tox; tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen2 = 1.9e-9 / T1; /* LFW_FD fix/add next 5 lines */ TL1 = dTcen2_dVg = -Tcen2 * T2 / T1; dTcen2_dVg = TL1 * (T5 * 4.0 * dVth_dVg + dVgsteff2_dVg); dTcen2_dVd = TL1 * (T5 * 4.0 * dVth_dVd + dVgsteff2_dVd); dTcen2_dVb = TL1 * (T5 * 4.0 * dVth_dVb + dVgsteff2_dVb); dTcen2_dVe = TL1 * (T5 * 4.0 * dVth_dVe + dVgsteff2_dVe); if (selfheat) /*fix below expression Wagner */ /*dTcen2_dT = -Tcen2 * T2 / T1 * (T5 * 4.0 * (dVth_dT - dVfbzb2_dT) + dVgsteff2_dT); */ dTcen2_dT = -Tcen2 * T2 / T1 * (T5 * 4.0 * (dVth_dT - dVfbzb2_dT - dphi_dT) + dVgsteff2_dT); else dTcen2_dT = 0; /*Ccen2 = EPSSI / Tcen2;*//*Bug Fix # 30 Jul09*/ Ccen2 = epssub/ Tcen2; T0 = Cox / (Cox + Ccen2); Coxeff2 = T0 * Ccen2; T1 = -Ccen2 / Tcen2; /* LFW_FD fix/add next 5 lines */ TL1 = dCoxeff2_dVg = T0 * T0 * T1; dCoxeff2_dVg = TL1 * dTcen2_dVg; dCoxeff2_dVd = TL1 * dTcen2_dVd; dCoxeff2_dVb = TL1 * dTcen2_dVb; dCoxeff2_dVe = TL1 * dTcen2_dVe; if (selfheat) dCoxeff2_dT = T1 * dTcen2_dT * (T0 - Coxeff2 / (Cox + Ccen2)); else dCoxeff2_dT = 0; CoxWLcen2 = CoxWL2 * Coxeff2 / Cox; CoxWLcenb2 = CoxWLb2 * Coxeff2 / Cox; /* 3 new lines Wagner */ if (selfheat) dCoxWLcenb2_dT = CoxWLb2 * dCoxeff2_dT / Cox; else dCoxWLcenb2_dT = 0; } /* end v4.1 */ AbulkCV = Abulk0 * pParam->B4SOIabulkCVfactor; /* LFW_FD fix/add next 4 lines */ dAbulkCV_dVg = pParam->B4SOIabulkCVfactor * dAbulk0_dVg; dAbulkCV_dVb = pParam->B4SOIabulkCVfactor * dAbulk0_dVb; dAbulkCV_dVd = pParam->B4SOIabulkCVfactor * dAbulk0_dVd; dAbulkCV_dVe = pParam->B4SOIabulkCVfactor * dAbulk0_dVe; /* 3 new lines Wagner */ if (selfheat) dAbulkCV_dT = dAbulk0_dT * pParam->B4SOIabulkCVfactor; else dAbulkCV_dT = 0; VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV; /* LFW_FD add next 4 lines */ dVdsatCV_dVg = (dVgsteff_dVg - dDeltaPhi_dVg - VdsatCV * dAbulkCV_dVg) / AbulkCV; dVdsatCV_dVd = (dVgsteff_dVd - dDeltaPhi_dVd - VdsatCV * dAbulkCV_dVd) / AbulkCV; dVdsatCV_dVb = (dVgsteff_dVb - dDeltaPhi_dVb - VdsatCV * dAbulkCV_dVb) / AbulkCV; dVdsatCV_dVe = (dVgsteff_dVe - dDeltaPhi_dVe - VdsatCV * dAbulkCV_dVe) / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; T4 = T3 * ( 1.0 - dDeltaPhi_dVg); /* LFW_FD fix/add next 4 lines */ dVdseffCV_dVg = (1.0 - T1 - T2) * dVdsatCV_dVg; dVdseffCV_dVd = (1.0 - T1 - T2) * dVdsatCV_dVd + T1; dVdseffCV_dVb = (1.0 - T1 - T2) * dVdsatCV_dVb; dVdseffCV_dVe = (1.0 - T1 - T2) * dVdsatCV_dVe; /* 10 new lines Wagner */ if (selfheat) { dVdsatCV_dT = (dVgsteff_dT-dDeltaPhi_dT)/AbulkCV -VdsatCV*dAbulkCV_dT/AbulkCV; dTL1_dT = (V4 + 2.0 * DELTA_4) * dVdsatCV_dT / T0; dVdseffCV_dT = 0.5*dVdsatCV_dT - 0.5*dTL1_dT; } else { dVdsatCV_dT = 0; dVdseffCV_dT = 0; } T0 = AbulkCV * VdseffCV; T1 = Vgsteff - DeltaPhi; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; /* LFW_FD add next 16 lines */ dT0_dVg = dAbulkCV_dVg * VdseffCV + AbulkCV * dVdseffCV_dVg; dT0_dVd = dAbulkCV_dVd * VdseffCV + AbulkCV * dVdseffCV_dVd; dT0_dVb = dAbulkCV_dVb * VdseffCV + AbulkCV * dVdseffCV_dVb; dT0_dVe = dAbulkCV_dVe * VdseffCV + AbulkCV * dVdseffCV_dVe; dT1_dVg = dVgsteff_dVg - dDeltaPhi_dVg; dT1_dVd = dVgsteff_dVd - dDeltaPhi_dVd; dT1_dVb = dVgsteff_dVb - dDeltaPhi_dVb; dT1_dVe = dVgsteff_dVe - dDeltaPhi_dVe; dT2_dVg = 12.0 * (dT1_dVg - 0.5 * dT0_dVg); dT2_dVd = 12.0 * (dT1_dVd - 0.5 * dT0_dVd); dT2_dVb = 12.0 * (dT1_dVb - 0.5 * dT0_dVb); dT2_dVe = 12.0 * (dT1_dVe - 0.5 * dT0_dVe); dT3_dVg = (dT0_dVg - T3 * dT2_dVg) / T2; dT3_dVd = (dT0_dVd - T3 * dT2_dVd) / T2; dT3_dVb = (dT0_dVb - T3 * dT2_dVb) / T2; dT3_dVe = (dT0_dVe - T3 * dT2_dVe) / T2; qgate1 = qinv = qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3)); /* enhanced line Wagner */ QovCox = qgate / Coxeff; /* LFW_FD fix/add next 4 lines */ Cgg1 = CoxWLcen * (dT1_dVg - dT0_dVg * (0.5 - T3) + T0 * dT3_dVg) + QovCox * dCoxeff_dVg; Cgd1 = CoxWLcen * (dT1_dVd - dT0_dVd * (0.5 - T3) + T0 * dT3_dVd) + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (dT1_dVb - dT0_dVb * (0.5 - T3) + T0 * dT3_dVb) + QovCox * dCoxeff_dVb; Cge1 = CoxWLcen * (dT1_dVe - dT0_dVe * (0.5 - T3) + T0 * dT3_dVe) + QovCox * dCoxeff_dVe; /* 10 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = 12 * (dVgsteff_dT - dDeltaPhi_dT - 0.5*dTL1_dT); dTL3_dT = dTL1_dT/T2 - (T3/T2)*dTL2_dT; dqgate_dT = (qgate * dCoxeff_dT / Coxeff) + CoxWLcen * (dVgsteff_dT - dDeltaPhi_dT - dTL1_dT*(0.5-T3) + T0*dTL3_dT); } else dqgate_dT = 0; /* LFW_FD 2 new lines per flexilint */ T02 = T12 = T22 = T52 = 0.0; /* flexilint */ Cgg12 = Cgd12 = Cgb12 = Cge12 = 0.0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { VdsatCV2 = (Vgsteff2 - DeltaPhi2) / AbulkCV; /* LFW_FD add next 4 lines */ dVdsatCV2_dVg = (dVgsteff2_dVg - dDeltaPhi2_dVg - VdsatCV2 * dAbulkCV_dVg) / AbulkCV; dVdsatCV2_dVd = (dVgsteff2_dVd - dDeltaPhi2_dVd - VdsatCV2 * dAbulkCV_dVd) / AbulkCV; dVdsatCV2_dVb = (dVgsteff2_dVb - dDeltaPhi2_dVb - VdsatCV2 * dAbulkCV_dVb) / AbulkCV; dVdsatCV2_dVe = (dVgsteff2_dVe - dDeltaPhi2_dVe - VdsatCV2 * dAbulkCV_dVe) / AbulkCV; V4 = VdsatCV2 - Vds - DELTA_4; T02 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV2); VdseffCV2 = VdsatCV2 - 0.5 * (V4 + T02); T12 = 0.5 * (1.0 + V4 / T02); T22 = DELTA_4 / T02; T3 = (1.0 - T12 - T22) / AbulkCV; T4 = T3 * ( 1.0 - dDeltaPhi2_dVg); /* LFW_FD fix/add next 4 lines */ dVdseffCV2_dVg = (1.0 - T12 - T22) * dVdsatCV2_dVg; dVdseffCV2_dVd = (1.0 - T12 - T22) * dVdsatCV2_dVd + T12; dVdseffCV2_dVb = (1.0 - T12 - T22) * dVdsatCV2_dVb; dVdseffCV2_dVe = (1.0 - T12 - T22) * dVdsatCV2_dVe; /* 10 new lines Wagner */ if (selfheat) { dVdsatCV2_dT = (dVgsteff2_dT-dDeltaPhi2_dT)/AbulkCV -VdsatCV2*dAbulkCV_dT/AbulkCV; dTL1_dT = (V4 + 2.0 * DELTA_4) * dVdsatCV2_dT / T02; dVdseffCV2_dT = 0.5*dVdsatCV2_dT - 0.5*dTL1_dT; } else { dVdsatCV2_dT = 0; dVdseffCV2_dT = 0; } T02 = AbulkCV * VdseffCV2; T12 = Vgsteff2 - DeltaPhi2; T22 = 12.0 * (T12 - 0.5 * T02 + 1.0e-20); T3 = T02 / T22; T4 = 1.0 - 12.0 * T3 * T3; T52 = AbulkCV * (6.0 * T02 * (4.0 * T12 - T02) / (T22 * T22) - 0.5); T6 = T52 * VdseffCV2 / AbulkCV; /* LFW_FD add next 16 lines */ dT02_dVg = dAbulkCV_dVg * VdseffCV2 + AbulkCV * dVdseffCV2_dVg; dT02_dVd = dAbulkCV_dVd * VdseffCV2 + AbulkCV * dVdseffCV2_dVd; dT02_dVb = dAbulkCV_dVb * VdseffCV2 + AbulkCV * dVdseffCV2_dVb; dT02_dVe = dAbulkCV_dVe * VdseffCV2 + AbulkCV * dVdseffCV2_dVe; dT12_dVg = dVgsteff2_dVg - dDeltaPhi2_dVg; dT12_dVd = dVgsteff2_dVd - dDeltaPhi2_dVd; dT12_dVb = dVgsteff2_dVb - dDeltaPhi2_dVb; dT12_dVe = dVgsteff2_dVe - dDeltaPhi2_dVe; dT22_dVg = 12.0 * (dT12_dVg - 0.5 * dT02_dVg); dT22_dVd = 12.0 * (dT12_dVd - 0.5 * dT02_dVd); dT22_dVb = 12.0 * (dT12_dVb - 0.5 * dT02_dVb); dT22_dVe = 12.0 * (dT12_dVe - 0.5 * dT02_dVe); dT3_dVg = (dT02_dVg - T3 * dT22_dVg) / T22; dT3_dVd = (dT02_dVd - T3 * dT22_dVd) / T22; dT3_dVb = (dT02_dVb - T3 * dT22_dVb) / T22; dT3_dVe = (dT02_dVe - T3 * dT22_dVe) / T22; T7 = CoxWLcen2 * (T12 - T02 * (0.5 - T3)); qinv += T7; qgate = qinoi = qinv; QovCox2 = T7 / Coxeff2; /* LFW_FD fix/add next 4 lines */ Cgg12 = CoxWLcen2 * (dT12_dVg - dT02_dVg * (0.5 - T3) + T02 * dT3_dVg) + QovCox2 * dCoxeff2_dVg; Cgd12 = CoxWLcen2 * (dT12_dVd - dT02_dVd * (0.5 - T3) + T02 * dT3_dVd) + QovCox2 * dCoxeff2_dVd; Cgb12 = CoxWLcen2 * (dT12_dVb - dT02_dVb * (0.5 - T3) + T02 * dT3_dVb) + QovCox2 * dCoxeff2_dVb; Cge12 = CoxWLcen2 * (dT12_dVe - dT02_dVe * (0.5 - T3) + T02 * dT3_dVe) + QovCox2 * dCoxeff2_dVe; /* 11 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = 12 * (dVgsteff2_dT - dDeltaPhi2_dT - 0.5*dTL1_dT); dTL3_dT = dTL1_dT/T22 - (T3/T22)*dTL2_dT; dqgate2_dT = (T7 * dCoxeff2_dT / Coxeff2) + CoxWLcen2 * (dVgsteff2_dT - dDeltaPhi2_dT - dTL1_dT*(0.5-T3) + T02*dTL3_dT); dqgate_dT += dqgate2_dT; } else dqgate_dT += 0; } /* end v4.1 */ /* v3.1 */ /* LFW_FD 2 new lines - flexilint */ Csg2 = Cbg12 = Cbd12 = Cbb12 = Cbe12 = 0; dqbulk_dT = 0; if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { qbulk = Cbg1 = Cbd1 = Cbb1 = Cbe1 = dqbulk_dT = 0; /* LFW_FD enhance line */ } else /* soiMod = 0 or 1 */ { T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * (1.0 - dDeltaPhi_dVg); T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk1 = qbulk = CoxWLcenb * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); /* enhanced line Wagner */ QovCox = qbulk / Coxeff; /* LFW_FD fix/add next 4 derivatives */ Cbg1 = CoxWLcenb * T7 * (0.5 - T0 / T2) * dVdseffCV_dVg - CoxWLcenb * T7 * VdseffCV * ((dT0_dVg -T0 * dT2_dVg / T2) /T2) - CoxWLcenb * VdseffCV * (0.5 - T0 / T2) * dAbulkCV_dVg + QovCox * dCoxeff_dVg; Cbb1 = CoxWLcenb * T7 * (0.5 - T0 / T2) * dVdseffCV_dVb - CoxWLcenb * T7 * VdseffCV * ((dT0_dVb -T0 * dT2_dVb / T2) /T2) - CoxWLcenb * VdseffCV * (0.5 - T0 / T2) * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Cbd1 = CoxWLcenb * T7 * (0.5 - T0 / T2) * dVdseffCV_dVd - CoxWLcenb * T7 * VdseffCV * ((dT0_dVd -T0 * dT2_dVd / T2) /T2) - CoxWLcenb * VdseffCV * (0.5 - T0 / T2) * dAbulkCV_dVd + QovCox * dCoxeff_dVd; Cbe1 = CoxWLcenb * T7 * (0.5 - T0 / T2) * dVdseffCV_dVe - CoxWLcenb * T7 * VdseffCV * ((dT0_dVe -T0 * dT2_dVe / T2) /T2) - CoxWLcenb * VdseffCV * (0.5 - T0 / T2) * dAbulkCV_dVe + QovCox * dCoxeff_dVe; /* 12 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL2_dT = 12 * (dVgsteff_dT - dDeltaPhi_dT - 0.5*dTL1_dT); TL3 = T0/T2; dTL3_dT = dTL1_dT/T2 - (TL3/T2)*dTL2_dT; TL4 = (0.5 * VdseffCV - T0 * VdseffCV / T2); dTL4_dT = (0.5 - T0/T2)*dVdseffCV_dT - VdseffCV*dTL3_dT; dqbulk_dT = dCoxWLcenb_dT * T7 * TL4 - CoxWLcenb * dAbulkCV_dT * TL4 + CoxWLcenb * T7 * dTL4_dT; } else dqbulk_dT = 0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T8 = T22 * T22; T9 = 12.0 * T7 * T02 * T02 / (T8 * AbulkCV); T10 = T9 * (1.0 - dDeltaPhi2_dVg); T11 = -T7 * T52 / AbulkCV; T12 = -(T9 * (Vgsteff2 - DeltaPhi2) / AbulkCV + VdseffCV2 * (0.5 - T02 / T22)); qbulk2 = CoxWLcenb2 * T7 * (0.5 * VdseffCV2 - T02 * VdseffCV2 / T22); QovCox2 = qbulk2 / Coxeff2; /* LFW_FD fix/add next 4 derivatives */ Cbg12 = CoxWLcenb2 * T7 * (0.5 - T02 / T22) * dVdseffCV2_dVg - CoxWLcenb2 * T7 * VdseffCV2 * ((dT02_dVg -T02 * dT22_dVg / T22) /T22) - CoxWLcenb2 * VdseffCV2 * (0.5 - T02 / T22) * dAbulkCV_dVg + QovCox2 * dCoxeff2_dVg; Cbb12 = CoxWLcenb2 * T7 * (0.5 - T02 / T22) * dVdseffCV2_dVb - CoxWLcenb2 * T7 * VdseffCV2 * ((dT02_dVb -T02 * dT22_dVb / T22) /T22) - CoxWLcenb2 * VdseffCV2 * (0.5 - T02 / T22) * dAbulkCV_dVb + QovCox2 * dCoxeff2_dVb; Cbd12 = CoxWLcenb2 * T7 * (0.5 - T02 / T22) * dVdseffCV2_dVd - CoxWLcenb2 * T7 * VdseffCV2 * ((dT02_dVd -T02 * dT22_dVd / T22) /T22) - CoxWLcenb2 * VdseffCV2 * (0.5 - T02 / T22) * dAbulkCV_dVd + QovCox2 * dCoxeff2_dVd; Cbe12 = CoxWLcenb2 * T7 * (0.5 - T02 / T22) * dVdseffCV2_dVe - CoxWLcenb2 * T7 * VdseffCV2 * ((dT02_dVe -T02 * dT22_dVe / T22) /T22) - CoxWLcenb2 * VdseffCV2 * (0.5 - T02 / T22) * dAbulkCV_dVe + QovCox2 * dCoxeff2_dVe; /* 12 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL2_dT = 12 * (dVgsteff2_dT - dDeltaPhi2_dT - 0.5*dTL1_dT); TL3 = T02/T22; dTL3_dT = dTL1_dT/T22 - (TL3/T22)*dTL2_dT; TL4 = (0.5 * VdseffCV2 - T02 * VdseffCV2 / T22); dTL4_dT = (0.5 - T02/T22)*dVdseffCV2_dT - VdseffCV2*dTL3_dT; dqbulk2_dT = dCoxWLcenb2_dT * T7 * TL4 - CoxWLcenb2 * dAbulkCV_dT * TL4 + CoxWLcenb2 * T7 * dTL4_dT; } else dqbulk2_dT = 0; qbulk += qbulk2; dqbulk_dT += dqbulk2_dT; /* new line Wagner */ } /* end v4.1 */ } /* v3.1 */ Csg2 = Csd2 = Csb2 = Cse2 = 0.0; /* LFW_FD enhance line */ dqsrc2_dT = 0; /* new line Wagner */ if (model->B4SOIxpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); /* 9 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL5_dT = dVgsteff_dT - dDeltaPhi_dT; dTL2_dT = 12 * (dVgsteff_dT - dDeltaPhi_dT - 0.5*dTL1_dT); dqsrc_dT = qsrc*dCoxeff_dT/Coxeff -CoxWLcen*(dTL5_dT/2.0 + dTL1_dT/4.0 - T0*dTL1_dT/T2 + 0.5*T0*T0*dTL2_dT/(T2*T2) ); } else dqsrc_dT = 0; QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * (1.0 - dDeltaPhi_dVg); T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; /* LFW_FD fix/add next 4 derivatives */ Csg = QovCox * dCoxeff_dVg - CoxWLcen * (dT1_dVg / 2.0 + dT0_dVg / 4.0 - 2.0 * T0 * dT0_dVg / T2 + 2.0 * T0 * T0 * dT2_dVg / (T2 * T2)); Csd = QovCox * dCoxeff_dVd - CoxWLcen * (dT1_dVd / 2.0 + dT0_dVd / 4.0 - 2.0 * T0 * dT0_dVd / T2 + 2.0 * T0 * T0 * dT2_dVd / (T2 * T2)); Csb = QovCox * dCoxeff_dVb - CoxWLcen * (dT1_dVb / 2.0 + dT0_dVb / 4.0 - 2.0 * T0 * dT0_dVb / T2 + 2.0 * T0 * T0 * dT2_dVb / (T2 * T2)); Cse = QovCox * dCoxeff_dVe - CoxWLcen * (dT1_dVe / 2.0 + dT0_dVe / 4.0 - 2.0 * T0 * dT0_dVe / T2 + 2.0 * T0 * T0 * dT2_dVe / (T2 * T2)); /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T12 = Vgsteff2 - DeltaPhi2; /* must restore for derivatives below*/ qsrc2 = -CoxWLcen2 * ( (Vgsteff2 - DeltaPhi2) / 2.0 + T02 / 4.0 - 0.5 * T02 * T02 / T22); /* CJB LFW */ /* 9 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL5_dT = dVgsteff2_dT - dDeltaPhi2_dT; dTL2_dT = 12 * (dVgsteff2_dT - dDeltaPhi2_dT - 0.5*dTL1_dT); dqsrc2_dT = qsrc2*dCoxeff2_dT/Coxeff2 -CoxWLcen2*(dTL5_dT/2.0 + dTL1_dT/4.0 - T02*dTL1_dT/T22 + 0.5*T02*T02*dTL2_dT/(T22*T22) ); } else dqsrc2_dT = 0; QovCox2 = qsrc2 / Coxeff2; T22 += T22; T3 = T22 * T22; T7 = -(0.25 - 12.0 * T02 * (4.0 * T12 - T02) / T3); T4 = -(0.5 + 24.0 * T02 * T02 / T3) * (1.0 - dDeltaPhi2_dVg); T5 = T7 * AbulkCV; T6 = T7 * VdseffCV2; /* LFW_FD fix/add next 4 derivatives */ Csg2 = QovCox2 * dCoxeff2_dVg - CoxWLcen2 * (dT12_dVg / 2.0 + dT02_dVg / 4.0 - 2.0 * T02 * dT02_dVg / T22 + 2.0 * T02 * T02 * dT22_dVg / (T22 * T22)); Csd2 = QovCox2 * dCoxeff2_dVd - CoxWLcen2 * (dT12_dVd / 2.0 + dT02_dVd / 4.0 - 2.0 * T02 * dT02_dVd / T22 + 2.0 * T02 * T02 * dT22_dVd / (T22 * T22)); Csb2 = QovCox2 * dCoxeff2_dVb - CoxWLcen2 * (dT12_dVb / 2.0 + dT02_dVb / 4.0 - 2.0 * T02 * dT02_dVb / T22 + 2.0 * T02 * T02 * dT22_dVb / (T22 * T22)); Cse2 = QovCox2 * dCoxeff2_dVe - CoxWLcen2 * (dT12_dVe / 2.0 + dT02_dVe / 4.0 - 2.0 * T02 * dT02_dVe / T22 + 2.0 * T02 * T02 * dT22_dVe / (T22 * T22)); qsrc += qsrc2; dqsrc_dT += dqsrc2_dT; /* new line Wagner */ } /* end v4.1 */ } else if (model->B4SOIxpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; /* LFW_FD add next 32 lines */ dT2_dVg = dT2_dVg / 12.0; dT2_dVd = dT2_dVd / 12.0; dT2_dVb = dT2_dVb / 12.0; dT2_dVe = dT2_dVe / 12.0; dT3_dVg = T3 * dCoxeff_dVg / Coxeff - 2.0 * T3 * T2 * dT2_dVg / (T2 * T2); dT3_dVd = T3 * dCoxeff_dVd / Coxeff - 2.0 * T3 * T2 * dT2_dVd / (T2 * T2); dT3_dVb = T3 * dCoxeff_dVb / Coxeff - 2.0 * T3 * T2 * dT2_dVb / (T2 * T2); dT3_dVe = T3 * dCoxeff_dVe / Coxeff - 2.0 * T3 * T2 * dT2_dVe / (T2 * T2); dT4_dVg = dT1_dVg * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) + T1 * (4.0 * T0 * dT0_dVg / 3.0 + dT1_dVg * (T1 - 4.0 * T0 / 3.0) + T1 * (dT1_dVg - 4.0 * dT0_dVg /3.0)) - 2.0 * T0 * T0 * dT0_dVg / 5.0; dT4_dVd = dT1_dVd * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) + T1 * (4.0 * T0 * dT0_dVd / 3.0 + dT1_dVd * (T1 - 4.0 * T0 / 3.0) + T1 * (dT1_dVd - 4.0 * dT0_dVd /3.0)) - 2.0 * T0 * T0 * dT0_dVd / 5.0; dT4_dVb = dT1_dVb * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) + T1 * (4.0 * T0 * dT0_dVb / 3.0 + dT1_dVb * (T1 - 4.0 * T0 / 3.0) + T1 * (dT1_dVb - 4.0 * dT0_dVb /3.0)) - 2.0 * T0 * T0 * dT0_dVb / 5.0; dT4_dVe = dT1_dVe * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) + T1 * (4.0 * T0 * dT0_dVe / 3.0 + dT1_dVe * (T1 - 4.0 * T0 / 3.0) + T1 * (dT1_dVe - 4.0 * dT0_dVe /3.0)) - 2.0 * T0 * T0 * dT0_dVe / 5.0; /* LFW_FD fix/add next 4 derivatives */ Csg = -(dT3_dVg * T4 + T3 * dT4_dVg); Csd = -(dT3_dVd * T4 + T3 * dT4_dVd); Csb = -(dT3_dVb * T4 + T3 * dT4_dVb); Cse = -(dT3_dVe * T4 + T3 * dT4_dVe); /* 13 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV_dT + dAbulkCV_dT * VdseffCV; dTL5_dT = dVgsteff_dT - dDeltaPhi_dT; dTL2_dT = (dVgsteff_dT - dDeltaPhi_dT - 0.5*dTL1_dT); dTL3_dT = - 2*T3*dTL2_dT/T2 + T3*dCoxeff_dT/Coxeff; dTL4_dT = dTL5_dT * (2.0*T0*T0/3.0 + T1*(T1-4.0*T0/3.0)) + T1 * (4.0*T0*dTL1_dT/3.0 + dTL5_dT*(T1-4.0*T0/3.0) + T1*(dTL5_dT-4.0*dTL1_dT/3.0) ) - 2.0*T0*T0*dTL1_dT/5.0; dqsrc_dT = -T3*dTL4_dT - dTL3_dT*T4; } else dqsrc_dT += 0; /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { T12 = Vgsteff2 - DeltaPhi2; /* must restore for derivatives below*/ T22 = T22 / 12.0; T3 = 0.5 * CoxWLcen2 / (T22 * T22); T4 = T12 * (2.0 * T02 * T02 / 3.0 + T12 * (T12 - 4.0 * T02 / 3.0)) - 2.0 * T02 * T02 * T02 / 15.0; qsrc2 = -T3 * T4; QovCox2 = qsrc2 / Coxeff2; T8 = 4.0 / 3.0 * T12 * (T12 - T02) + 0.4 * T02 * T02; T5 = -2.0 * qsrc2 / T22 - T3 * (T12 * (3.0 * T12 - 8.0 * T02 / 3.0) + 2.0 * T02 * T02 / 3.0); T6 = AbulkCV * (qsrc2 / T22 + T3 * T8); T7 = T6 * VdseffCV2 / AbulkCV; /* LFW_FD add next 32 lines */ dT22_dVg = dT22_dVg / 12.0; dT22_dVd = dT22_dVd / 12.0; dT22_dVb = dT22_dVb / 12.0; dT22_dVe = dT22_dVe / 12.0; dT3_dVg = T3 * dCoxeff2_dVg / Coxeff2 - 2.0 * T3 * T22 * dT22_dVg / (T22 * T22); dT3_dVd = T3 * dCoxeff2_dVd / Coxeff2 - 2.0 * T3 * T22 * dT22_dVd / (T22 * T22); dT3_dVb = T3 * dCoxeff2_dVb / Coxeff2 - 2.0 * T3 * T22 * dT22_dVb / (T22 * T22); dT3_dVe = T3 * dCoxeff2_dVe / Coxeff2 - 2.0 * T3 * T22 * dT22_dVe / (T22 * T22); dT4_dVg = dT12_dVg * (2.0 * T02 * T02 / 3.0 + T12 * (T12 - 4.0 * T02 / 3.0)) + T12 * (4.0 * T02 * dT02_dVg / 3.0 + dT12_dVg * (T12 - 4.0 * T02 / 3.0) + T12 * (dT12_dVg - 4.0 * dT02_dVg /3.0)) - 2.0 * T02 * T02 * dT02_dVg / 5.0; dT4_dVd = dT12_dVd * (2.0 * T02 * T02 / 3.0 + T12 * (T12 - 4.0 * T02 / 3.0)) + T12 * (4.0 * T02 * dT02_dVd / 3.0 + dT12_dVd * (T12 - 4.0 * T02 / 3.0) + T12 * (dT12_dVd - 4.0 * dT02_dVd /3.0)) - 2.0 * T02 * T02 * dT02_dVd / 5.0; dT4_dVb = dT12_dVb * (2.0 * T02 * T02 / 3.0 + T12 * (T12 - 4.0 * T02 / 3.0)) + T12 * (4.0 * T02 * dT02_dVb / 3.0 + dT12_dVb * (T12 - 4.0 * T02 / 3.0) + T12 * (dT12_dVb - 4.0 * dT02_dVb /3.0)) - 2.0 * T02 * T02 * dT02_dVb / 5.0; dT4_dVe = dT12_dVe * (2.0 * T02 * T02 / 3.0 + T12 * (T12 - 4.0 * T02 / 3.0)) + T12 * (4.0 * T02 * dT02_dVe / 3.0 + dT12_dVe * (T12 - 4.0 * T02 / 3.0) + T12 * (dT12_dVe - 4.0 * dT02_dVe /3.0)) - 2.0 * T02 * T02 * dT02_dVe / 5.0; /* LFW_FD fix/add next 4 derivatives */ Csg2 = -(dT3_dVg * T4 + T3 * dT4_dVg); Csd2 = -(dT3_dVd * T4 + T3 * dT4_dVd); Csb2 = -(dT3_dVb * T4 + T3 * dT4_dVb); Cse2 = -(dT3_dVe * T4 + T3 * dT4_dVe); /* 14 new lines Wagner */ if (selfheat) { dTL1_dT = AbulkCV * dVdseffCV2_dT + dAbulkCV_dT * VdseffCV2; dTL5_dT = dVgsteff2_dT - dDeltaPhi2_dT; dTL2_dT = (dVgsteff2_dT - dDeltaPhi2_dT - 0.5*dTL1_dT); dTL3_dT = - 2*T3*dTL2_dT/T22 + T3*dCoxeff2_dT/Coxeff2; dTL4_dT = dTL5_dT * (2.0*T02*T02/3.0 + T12*(T12-4.0*T02/3.0)) + T12 * (4.0*T02*dTL1_dT/3.0 + dTL5_dT*(T12-4.0*T02/3.0) + T12*(dTL5_dT-4.0*dTL1_dT/3.0) ) - 2.0*T02*T02*dTL1_dT/5.0; dqsrc2_dT = -T3*dTL4_dT - dTL3_dT*T4; } else dqsrc_dT += 0; qsrc += qsrc2; dqsrc_dT += dqsrc2_dT; /* new line Wagner */ } /* end v4.1 */ } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; Cse = -0.5 * Cge1; /* LFW_FD new line */ /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { /* LFW_FD fix/add next 4 lines */ Csg2 = -0.5 * Cgg12; Csd2 = -0.5 * Cgd12; Csb2 = -0.5 * Cgb12; Cse2 = -0.5 * Cge12; } dqsrc_dT = -0.5 * dqgate_dT; /* new line Wagner */ /* end v4.1 */ } /* Backgate charge */ /* v3.1 */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { Qe1 = Ce1b = Ce1e = Ce1T = dQe1_dT = 0; } else /* soiMod = 0 or 1 */ { CboxWL = pParam->B4SOIkb1 * model->B4SOIfbody * Cbox * (pParam->B4SOIweffCV / here->B4SOInseg * here->B4SOInf /* bugfix_snps nf*/ * pParam->B4SOIleffCVbg + here->B4SOIaebcp); Qe1 = CboxWL * (Vesfb - Vbs); Ce1b = dQe1_dVb = -CboxWL; Ce1e = dQe1_dVe = CboxWL; if (selfheat) Ce1T = dQe1_dT = -CboxWL * dvfbb_dT; else Ce1T = dQe1_dT = 0.0; } /* v3.1 */ qgate += Qac0 + Qsub0 - qbulk; qbody = qbulk - Qac0 - Qsub0 - Qe1; qsub = Qe1; qdrn = -(qgate + qbody + qsub + qsrc); /* 8 new lines Wagner */ dqgate_dT += dQac0_dT + dQsub0_dT - dqbulk_dT; dqbody_dT = dqbulk_dT - dQac0_dT - dQsub0_dT - dQe1_dT; dqsub_dT = dQe1_dT; dqdrn_dT = -(dqgate_dT + dqbody_dT + dqsub_dT + dqsrc_dT); CgT = dqgate_dT; CbT = dqbody_dT; CsT = dqsrc_dT; CdT = dqdrn_dT; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; /* LFW_FD fix/add next 3 lines */ Cbd = Cbd1 - dQac0_dVd - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb - Ce1b; Cbe = Cbe1 - dQac0_dVe - dQsub0_dVe - Ce1e; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; /* LFW_FD fix/add next 2 lines */ Cgb = Cgb1 - Cbb - Ce1b; Cge = Cge1 - Cbe - Ce1e; /* comment out next 4 lines Wagner */ /*if (selfheat) CgT = Cgg1 * dVgsteff_dT + dQac0_dT + dQsub0_dT; else CgT = 0.0;*/ /*Cgb *= dVbseff_dVb; */ /*Cbb *= dVbseff_dVb; */ /*Csb *= dVbseff_dVb; */ /* comment out next 2 lines Wagner */ /*if (selfheat) CsT = Csg * dVgsteff_dT; else CsT = 0.0;*/ /* v4.1 */ if ((here->B4SOIsoiMod != 2) && /* Bug fix #10 Jun 09 'opposite type Q/C evaluated only if bodymod=1' */ (here->B4SOIbodyMod != 0) && here->B4SOIagbcp2 > 0) { /* LFW_FD fix next 12 lines */ Cbg += Cbg12 - dQac02_dVg - dQsub02_dVg; Cbd += Cbd12 - dQac02_dVd - dQsub02_dVd; Cbb += Cbb12 - dQac02_dVb - dQsub02_dVb; Cbe += Cbe12 - dQac02_dVe - dQsub02_dVe; Cgg = Cgg1 + Cgg12 - Cbg; Cgd = Cgd1 + Cgd12 - Cbd; Cgb = Cgb1 + Cgb12 - Cbb - Ce1b; Cge = Cge1 + Cge12 - Cbe - Ce1e; Csg += Csg2; Csd += Csd2; Csb += Csb2; Cse += Cse2; } /* end v4.1 */ here->B4SOIcggb = Cgg; here->B4SOIcgsb = -(Cgg + Cgd + Cgb + Cge); /* LFW_FD fix line */ here->B4SOIcgdb = Cgd; here->B4SOIcgeb = Cge; /* LFW_FD fix line */ here->B4SOIcgT = CgT; here->B4SOIcbgb = Cbg; here->B4SOIcbsb = -(Cbg + Cbd + Cbb + Cbe); /* LFW_FD fix line */ here->B4SOIcbdb = Cbd; here->B4SOIcbeb = Cbe; /* LFW_FD fix line */ here->B4SOIcbT = CbT; here->B4SOIceT = Ce1T; here->B4SOIceeb = Ce1e ; here->B4SOIcdgb = -(Cgg + Cbg + Csg); here->B4SOIcddb = -(Cgd + Cbd + Csd); here->B4SOIcdeb = -(Cge + Cse + Cbe) - Ce1e; /* LFW_FD fix line */ here->B4SOIcdT = -(CgT+CbT+CsT) - Ce1T; here->B4SOIcdsb = Cgg + Cgd + Cgb + Cge /* LFW_FD fix expression */ + Cbg + Cbd + Cbb + Cbe + Ce1e + Csg + Csd + Csb + Cse + Ce1b; here->B4SOIqinv = -qinoi; } /* End of if capMod ==3 */ else { /* v4.0 */ Qsub0 = Qac0 = 0.0; qgate = qdrn = qsrc = qbody = qsub = 0.0; Cbg = Cbd = Cbb = 0.0; here->B4SOIcggb = here->B4SOIcgsb = here->B4SOIcgdb = 0.0; here->B4SOIcdgb = here->B4SOIcdsb = here->B4SOIcddb = 0.0; here->B4SOIcbgb = here->B4SOIcbsb = here->B4SOIcbdb = 0.0; } } here->B4SOIqgate = qgate; here->B4SOIqdrn = qdrn; here->B4SOIqbulk = qbody; here->B4SOIqsrc = qsrc; finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ /* flexilint inits */ gcjdbs = gcjdT = 0.0; gcjsbs = gcjsT = 0.0; if (ChargeComputationNeeded) { /* Intrinsic S/D junction charge */ /* v3.1 */ if (here->B4SOIsoiMod == 2) /* v3.2 */ /* ideal FD */ { qjs = qjd = 0.0; /*gcjdds = gcjdbs = gcjdT = 0.0; v4.2 */ gcjdbs = gcjdT = 0.0; gcjsbs = gcjsT = 0.0; here->B4SOIcjsb = here->B4SOIcjdb = 0.0 /*v4.0*/; } else /* soiMod = 0 or 1 */ { PhiBSWG = model->B4SOIGatesidewallJctSPotential; dPhiBSWG_dT = -model->B4SOItpbswg; PhiBSWG += dPhiBSWG_dT * (Temp - model->B4SOItnom); MJSWG = model->B4SOIbodyJctGateSideSGradingCoeff; cjsbs = model->B4SOIunitLengthGateSidewallJctCapS * pParam->B4SOIwdiosCV * model->B4SOItsi * here->B4SOInf / 1e-7; /* bugfix_snps nf*/ dcjsbs_dT = cjsbs * model->B4SOItcjswg; cjsbs += dcjsbs_dT * (Temp - model->B4SOItnom); cjdbs = model->B4SOIunitLengthGateSidewallJctCapD * pParam->B4SOIwdiodCV * model->B4SOItsi * here->B4SOInf / 1e-7; /* bugfix_snps nf*/ dcjdbs_dT = cjdbs * model->B4SOItcjswgd; cjdbs += dcjdbs_dT * (Temp - model->B4SOItnom); DioMax = 0.9 * (PhiBSWG); /* arg = 1.0 - (Vbs > DioMax ? DioMax : Vbs) / PhiBSWG; */ /* Bug fix #6 Vbs evaluated taking consideration of Rbody Mode*/ if (here->B4SOIrbodyMod) arg = 1.0 - (vsbs > DioMax ? DioMax : vsbs) / PhiBSWG; /* Bug fix #6 */ else arg = 1.0 - (vbs > DioMax ? DioMax : vbs) / PhiBSWG; /* Bug fix #6 */ if (selfheat) darg_dT = (1 - arg) / PhiBSWG * dPhiBSWG_dT; else darg_dT = 1.0; /* flexilint */ if (MJSWG == 0.5) { dT3_dVb = 1.0 / sqrt(arg); if (selfheat) ddT3_dVb_dT = -0.5 * dT3_dVb / arg * darg_dT; else ddT3_dVb_dT = 1.0; /* flexilint */ } else { dT3_dVb = exp(-MJSWG * log(arg)); if (selfheat) ddT3_dVb_dT = -MJSWG * dT3_dVb / arg * darg_dT; else ddT3_dVb_dT = 1.0; /* flexilint */ } T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (selfheat) dT3_dT = (1.0 - arg * dT3_dVb) * dPhiBSWG_dT / (1.0 - MJSWG) - (arg * ddT3_dVb_dT + darg_dT * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); else dT3_dT = 1.0; /* flexilint */ /* if (vbs > DioMax) T3 += dT3_dVb * (vbs - DioMax); */ /* Bug fix #6 Vbs evaluated taking consideration of Rbody Mode*/ if (here->B4SOIrbodyMod) { if (vsbs > DioMax) /* Bug fix #6 */ T3 += dT3_dVb * (vsbs - DioMax); } else { if (vbs > DioMax) /* Bug fix #6 */ T3 += dT3_dVb * (vbs - DioMax); } if (here->B4SOImode > 0) { qjs = cjsbs * T3 + model->B4SOItt * Ibsdif * here->B4SOInf; gcjsbs = cjsbs * dT3_dVb + model->B4SOItt * dIbsdif_dVb * here->B4SOInf; /* 3 new lines */ if (selfheat) gcjsT = model->B4SOItt * dIbsdif_dT * here->B4SOInf + dcjsbs_dT * T3 + dT3_dT * cjsbs; else gcjsT = 0.0; } else { qjs = cjsbs * T3 + model->B4SOItt * Ibddif * here->B4SOInf; gcjsbs = cjsbs * dT3_dVb + model->B4SOItt * dIbddif_dVb * here->B4SOInf; /* 3 new lines */ if (selfheat) gcjsT = model->B4SOItt * dIbddif_dT * here->B4SOInf + dcjsbs_dT * T3 + dT3_dT * cjsbs; else gcjsT = 0.0; } /* comment out next 3 lines Wagner */ /*if (selfheat) gcjsT = model->B4SOItt * dIbsdif_dT * here->B4SOInf + dcjsbs_dT * T3 + dT3_dT * cjsbs; else gcjsT = 0.0; */ PhiBSWG = model->B4SOIGatesidewallJctDPotential; dPhiBSWG_dT = -model->B4SOItpbswgd; PhiBSWG += dPhiBSWG_dT * (Temp - model->B4SOItnom); MJSWG = model->B4SOIbodyJctGateSideDGradingCoeff; DioMax = 0.9 * (PhiBSWG); /* arg = 1.0 - (vbd > DioMax ? DioMax : vbd) / PhiBSWG; */ /* Bug fix #6 Vbd evaluated taking consideration of Rbody Mode*/ if (here->B4SOIrbodyMod) arg = 1.0 - (vdbd > DioMax ? DioMax : vdbd) / PhiBSWG; /* Bug Fix #6 */ else arg = 1.0 - (vbd > DioMax ? DioMax : vbd) / PhiBSWG; /* Bug Fix #6 */ if (selfheat) darg_dT = (1 - arg) / PhiBSWG * dPhiBSWG_dT; else darg_dT = 1.0; /* flexilint */ if (MJSWG == 0.5) { dT3_dVb = 1.0 / sqrt(arg); if (selfheat) ddT3_dVb_dT = -0.5 * dT3_dVb / arg * darg_dT; else ddT3_dVb_dT = 1.0; /* flexilint */ } else { dT3_dVb = exp(-MJSWG * log(arg)); if (selfheat) ddT3_dVb_dT = -MJSWG * dT3_dVb / arg * darg_dT; else ddT3_dVb_dT = 1.0; /* flexilint */ } T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (selfheat) dT3_dT = (1.0 - arg * dT3_dVb) * dPhiBSWG_dT / (1.0 - MJSWG) - (arg * ddT3_dVb_dT + darg_dT * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); else dT3_dT = 1.0; /* flexilint */ /* if (vbd > DioMax) T3 += dT3_dVb * (vbd - DioMax); */ /* Bug fix #6 Vbd evaluated taking consideration of Rbody Mode*/ if (here->B4SOIrbodyMod) { if (vdbd > DioMax) /* Bug fix #6 */ T3 += dT3_dVb * (vdbd - DioMax); } else { if (vbd > DioMax) /* Bug fix #6 */ T3 += dT3_dVb * (vbd - DioMax); } dT3_dVd = -dT3_dVb; if (here->B4SOImode > 0) { qjd = cjdbs * T3 + model->B4SOItt * Ibddif * here->B4SOInf; gcjdbs = cjdbs * dT3_dVb + model->B4SOItt * dIbddif_dVb * here->B4SOInf; /* 3 new lines Wagner */ if (selfheat) gcjdT = model->B4SOItt * dIbddif_dT * here->B4SOInf + dcjdbs_dT * T3 + dT3_dT * cjdbs; else gcjdT = 0.0; } else { qjd = cjdbs * T3 + model->B4SOItt * Ibsdif * here->B4SOInf; gcjdbs = cjdbs * dT3_dVb + model->B4SOItt * dIbsdif_dVb * here->B4SOInf; /* 3 new lines Wagner */ if (selfheat) gcjdT = model->B4SOItt * dIbsdif_dT * here->B4SOInf + dcjdbs_dT * T3 + dT3_dT * cjdbs; else gcjdT = 0.0; } /*gcjdds = cjdbs * dT3_dVd + model->B4SOItt * dIbddif_dVd; v4.2 */ /* comment out next 3 lines Wagner */ /*if (selfheat) gcjdT = model->B4SOItt * dIbddif_dT * here->B4SOInf + dcjdbs_dT * T3 + dT3_dT * cjdbs; else gcjdT = 0.0;*/ } /* v3.1 */ /* v4.0 */ /* qdrn -= qjd; qbody += (qjs + qjd); qsrc = -(qgate + qbody + qdrn + qsub); */ /* Update the conductance */ /* v4.2 bugfix: qjs/qjd computed using unswapped voltages; however, total capacitances are swapped below note that gcjdds = -gcjdbs always, so (gcjdds + gcjdbs) == 0 here->B4SOIcddb -= gcjdds; here->B4SOIcdT -= gcjdT; here->B4SOIcdsb += gcjdds + gcjdbs; here->B4SOIcbdb += (gcjdds); here->B4SOIcbT += (gcjdT + gcjsT); here->B4SOIcbsb -= (gcjdds + gcjdbs + gcjsbs); here->B4SOIcjsb = (gcjdds + gcjdbs + gcjsbs); here->B4SOIcjdb = -gcjdds; */ here->B4SOIcbT += (gcjdT + gcjsT); if (here->B4SOImode > 0) { here->B4SOIcddb += gcjdbs; here->B4SOIcdT -= gcjdT; here->B4SOIcbdb -= (gcjdbs); here->B4SOIcbsb -= (gcjsbs); here->B4SOIcjsb = gcjsbs; here->B4SOIcjdb = gcjdbs; } else { here->B4SOIcddb += gcjsbs; here->B4SOIcdT -= gcjsT; here->B4SOIcbdb -= (gcjsbs); here->B4SOIcbsb -= (gcjdbs); here->B4SOIcjsb = gcjdbs; here->B4SOIcjdb = gcjsbs; } /* Extrinsic Bottom S/D to substrate charge */ T10 = -model->B4SOItype * ves; /* T10 is vse without type conversion */ T11 = model->B4SOItype * (vds - ves); /* T11 is vde without type conversion */ if (model->B4SOIcsdmin != 0.0) { if ( ((pParam->B4SOInsub > 0) && (model->B4SOItype > 0)) || ((pParam->B4SOInsub < 0) && (model->B4SOItype < 0)) ) { if (T10 < pParam->B4SOIvsdfb) { here->B4SOIqse = here->B4SOIcsbox * (T10 - pParam->B4SOIvsdfb); here->B4SOIgcse = here->B4SOIcsbox; } else if (T10 < pParam->B4SOIsdt1) { T0 = T10 - pParam->B4SOIvsdfb; T1 = T0 * T0; here->B4SOIqse = T0 * (here->B4SOIcsbox - pParam->B4SOIst2 / 3 * T1) ; here->B4SOIgcse = here->B4SOIcsbox - pParam->B4SOIst2 * T1; } else if (T10 < pParam->B4SOIvsdth) { T0 = T10 - pParam->B4SOIvsdth; T1 = T0 * T0; here->B4SOIqse = here->B4SOIcsmin * T10 + here->B4SOIst4 + pParam->B4SOIst3 / 3 * T0 * T1; here->B4SOIgcse = here->B4SOIcsmin + pParam->B4SOIst3 * T1; } else { here->B4SOIqse = here->B4SOIcsmin * T10 + here->B4SOIst4; here->B4SOIgcse = here->B4SOIcsmin; } } else { if (T10 < pParam->B4SOIvsdth) { here->B4SOIqse = here->B4SOIcsmin * (T10 - pParam->B4SOIvsdth); here->B4SOIgcse = here->B4SOIcsmin; } else if (T10 < pParam->B4SOIsdt1) { T0 = T10 - pParam->B4SOIvsdth; T1 = T0 * T0; here->B4SOIqse = T0 * (here->B4SOIcsmin - pParam->B4SOIst2 / 3 * T1) ; here->B4SOIgcse = here->B4SOIcsmin - pParam->B4SOIst2 * T1; } else if (T10 < pParam->B4SOIvsdfb) { T0 = T10 - pParam->B4SOIvsdfb; T1 = T0 * T0; here->B4SOIqse = here->B4SOIcsbox * T10 + here->B4SOIst4 + pParam->B4SOIst3 / 3 * T0 * T1; here->B4SOIgcse = here->B4SOIcsbox + pParam->B4SOIst3 * T1; } else { here->B4SOIqse = here->B4SOIcsbox * T10 + here->B4SOIst4; here->B4SOIgcse = here->B4SOIcsbox; } } if ( ((pParam->B4SOInsub > 0) && (model->B4SOItype > 0)) || ((pParam->B4SOInsub < 0) && (model->B4SOItype < 0)) ) { if (T11 < pParam->B4SOIvsdfb) { here->B4SOIqde = here->B4SOIcdbox * (T11 - pParam->B4SOIvsdfb); here->B4SOIgcde = here->B4SOIcdbox; } else if (T11 < pParam->B4SOIsdt1) { T0 = T11 - pParam->B4SOIvsdfb; T1 = T0 * T0; here->B4SOIqde = T0 * (here->B4SOIcdbox - pParam->B4SOIdt2 / 3 * T1) ; here->B4SOIgcde = here->B4SOIcdbox - pParam->B4SOIdt2 * T1; } else if (T11 < pParam->B4SOIvsdth) { T0 = T11 - pParam->B4SOIvsdth; T1 = T0 * T0; here->B4SOIqde = here->B4SOIcdmin * T11 + here->B4SOIdt4 + pParam->B4SOIdt3 / 3 * T0 * T1; here->B4SOIgcde = here->B4SOIcdmin + pParam->B4SOIdt3 * T1; } else { here->B4SOIqde = here->B4SOIcdmin * T11 + here->B4SOIdt4; here->B4SOIgcde = here->B4SOIcdmin; } } else { if (T11 < pParam->B4SOIvsdth) { here->B4SOIqde = here->B4SOIcdmin * (T11 - pParam->B4SOIvsdth); here->B4SOIgcde = here->B4SOIcdmin; } else if (T11 < pParam->B4SOIsdt1) { T0 = T11 - pParam->B4SOIvsdth; T1 = T0 * T0; here->B4SOIqde = T0 * (here->B4SOIcdmin - pParam->B4SOIdt2 / 3 * T1) ; here->B4SOIgcde = here->B4SOIcdmin - pParam->B4SOIdt2 * T1; } else if (T11 < pParam->B4SOIvsdfb) { T0 = T11 - pParam->B4SOIvsdfb; T1 = T0 * T0; here->B4SOIqde = here->B4SOIcdbox * T11 + here->B4SOIdt4 + pParam->B4SOIdt3 / 3 * T0 * T1; here->B4SOIgcde = here->B4SOIcdbox + pParam->B4SOIdt3 * T1; } else { here->B4SOIqde = here->B4SOIcdbox * T11 + here->B4SOIdt4; here->B4SOIgcde = here->B4SOIcdbox; } } } else { here->B4SOIqse = here->B4SOIcsbox * T10; here->B4SOIgcse = here->B4SOIcsbox; here->B4SOIqde = here->B4SOIcdbox * T11; here->B4SOIgcde = here->B4SOIcdbox; } /* Extrinsic : Sidewall fringing S/D charge */ here->B4SOIqse += here->B4SOIcsesw * T10; here->B4SOIgcse += here->B4SOIcsesw; here->B4SOIqde += here->B4SOIcdesw * T11; here->B4SOIgcde += here->B4SOIcdesw; /* All charge are multiplied with type at the end, but qse and qde have true polarity => so pre-multiplied with type */ here->B4SOIqse *= model->B4SOItype; here->B4SOIqde *= model->B4SOItype; } else { /* v4.0 */ qjs = qjd = 0.0; here->B4SOIqse = here->B4SOIqde = 0.0; here->B4SOIgcse = here->B4SOIgcde = 0.0; } here->B4SOIcbb = Cbb; here->B4SOIcbd = Cbd; here->B4SOIcbg = Cbg; here->B4SOIqbf = -Qsub0 - Qac0; here->B4SOIqjs = qjs; here->B4SOIqjd = qjd; *(ckt->CKTstate0 + here->B4SOIqbs) = qjs; /* v4.0 */ *(ckt->CKTstate0 + here->B4SOIqbd) = qjd; /* v4.0 */ /* * check convergence */ if ((here->B4SOIoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(here->B4SOIcd)) + ckt->CKTabstol; if (fabs(cdhat - here->B4SOIcd) >= tol) { ckt->CKTnoncon++; } else { tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(here->B4SOIcbs + here->B4SOIcbd)) + ckt->CKTabstol; if (fabs(cbhat - (here->B4SOIcbs + here->B4SOIcbd)) > tol) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->B4SOIvg) = vg; *(ckt->CKTstate0 + here->B4SOIvd) = vd; *(ckt->CKTstate0 + here->B4SOIvs) = vs; *(ckt->CKTstate0 + here->B4SOIvp) = vp; *(ckt->CKTstate0 + here->B4SOIve) = ve; *(ckt->CKTstate0 + here->B4SOIvbs) = vbs; *(ckt->CKTstate0 + here->B4SOIvbd) = vbd; *(ckt->CKTstate0 + here->B4SOIvgs) = vgs; *(ckt->CKTstate0 + here->B4SOIvds) = vds; *(ckt->CKTstate0 + here->B4SOIves) = ves; *(ckt->CKTstate0 + here->B4SOIvps) = vps; *(ckt->CKTstate0 + here->B4SOIdeltemp) = delTemp; /* v3.1 added for RF */ *(ckt->CKTstate0 + here->B4SOIvgge) = vgge; *(ckt->CKTstate0 + here->B4SOIvggm) = vggm; *(ckt->CKTstate0 + here->B4SOIvges) = vges; *(ckt->CKTstate0 + here->B4SOIvgms) = vgms; /* v3.1 added for RF end*/ *(ckt->CKTstate0 + here->B4SOIvdbs) = vdbs; /* v4.0 */ *(ckt->CKTstate0 + here->B4SOIvdbd) = vdbd; /* v4.0 */ *(ckt->CKTstate0 + here->B4SOIvsbs) = vsbs; /* v4.0 */ *(ckt->CKTstate0 + here->B4SOIvses) = vses; *(ckt->CKTstate0 + here->B4SOIvdes) = vdes; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; line755: ag0 = ckt->CKTag[0]; T0 = vgd + DELTA_1; if (here->B4SOIrgateMod == 3) T0 = vgmd + DELTA_1; /* v3.2 bug fix */ T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); /* v2.2.3 bug fix */ T3 = pParam->B4SOIwdiodCV * pParam->B4SOIcgdl; /* v3.1 bug fix */ T4 = sqrt(1.0 - 4.0 * T2 / pParam->B4SOIckappa); cgdo = pParam->B4SOIcgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->B4SOIcgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->B4SOIckappa * (T4 - 1.0)); if (here->B4SOIrgateMod == 3) { qgdo = (pParam->B4SOIcgdo + T3) * vgmd - T3 * (T2 + 0.5 * pParam->B4SOIckappa * (T4 - 1.0)); } /* v3.2 bug fix */ T0 = vgs + DELTA_1; if (here->B4SOIrgateMod == 3) T0 = vgms + DELTA_1; /* v3.2 bug fix */ T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); /* v2.2.3 bug fix */ T3 = pParam->B4SOIwdiosCV * pParam->B4SOIcgsl; /* v3.1 bug fix */ T4 = sqrt(1.0 - 4.0 * T2 / pParam->B4SOIckappa); cgso = pParam->B4SOIcgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->B4SOIcgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->B4SOIckappa * (T4 - 1.0)); if (here->B4SOIrgateMod == 3) { qgso = (pParam->B4SOIcgso + T3) * vgms - T3 * (T2 + 0.5 * pParam->B4SOIckappa * (T4 - 1.0)); } /* v3.2 bug fix */ if (here->B4SOInf != 1.0) { cgdo *= here->B4SOInf; cgso *= here->B4SOInf; qgdo *= here->B4SOInf; qgso *= here->B4SOInf; } /* here->B4SOIcgdo = cgdo; here->B4SOIcgso = cgso; */ if (here->B4SOIdebugMod < 0) goto line850; if (here->B4SOImode > 0) { /* v3.1 added for RF */ if (here->B4SOIrgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->B4SOIcgeo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmeb = -pParam->B4SOIcgeo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcegmb = gcgmeb; gcggb = here->B4SOIcggb * ag0; gcgdb = here->B4SOIcgdb * ag0; gcgsb = here->B4SOIcgsb * ag0; gcgeb = here->B4SOIcgeb * ag0; /* fix line */ gcgbb = -(gcggb + gcgdb + gcgsb + gcgeb); gcdgb = here->B4SOIcdgb * ag0; gcegb = gcgeb; /*v3.1 added*/ gcsgb = -(here->B4SOIcggb + here->B4SOIcbgb + here->B4SOIcdgb) * ag0 - gcegb; gcbgb = here->B4SOIcbgb * ag0; qgd = qgdo; qgs = qgso; qge = 0; /* v3.1 change */ qgme = pParam->B4SOIcgeo * vgme; qgmid = qgdo + qgso + qgme; qdrn += here->B4SOIqde - qgd; qsub -= qgme + here->B4SOIqse + here->B4SOIqde; qsrc = -(qgate + qgmid + qbody + qdrn + qsub) - qjs; qdrn -= qjd; if (!here->B4SOIrbodyMod) qbody += qjd + qjs; } else { gcggb = (here->B4SOIcggb + cgdo + cgso + pParam->B4SOIcgeo) * ag0; gcgdb = (here->B4SOIcgdb - cgdo) * ag0; gcgsb = (here->B4SOIcgsb - cgso) * ag0; gcgeb = (here->B4SOIcgeb - pParam->B4SOIcgeo) *ag0; /* LFW_FD fix line */ gcgbb = -(gcggb + gcgdb + gcgsb + gcgeb); gcegb = (- pParam->B4SOIcgeo) * ag0; gcdgb = (here->B4SOIcdgb - cgdo) * ag0; gcsgb = -(here->B4SOIcggb + here->B4SOIcbgb + here->B4SOIcdgb + cgso) * ag0; gcbgb = here->B4SOIcbgb * ag0; gcdgmb = gcsgmb = gcegmb = 0.0; gcgmdb = gcgmsb = gcgmeb = 0.0; /* Lump the overlap capacitance and S/D parasitics */ qgd = qgdo; qgs = qgso; qge = pParam->B4SOIcgeo * vge; qgate += qgd + qgs + qge; qdrn += here->B4SOIqde - qgd; qsub -= qge + here->B4SOIqse + here->B4SOIqde; qsrc = -(qgate + qbody + qdrn + qsub) - qjs; qdrn -= qjd; if (!here->B4SOIrbodyMod) qbody += qjd + qjs; } gcddb = (here->B4SOIcddb + cgdo + here->B4SOIgcde) * ag0; gcdsb = here->B4SOIcdsb * ag0; gcdeb = (here->B4SOIcdeb - here->B4SOIgcde) * ag0; /*fix below expression Wagner */ /*gcdT = model->B4SOItype * here->B4SOIcdT * ag0;*/ gcdT = here->B4SOIcdT * ag0; gcsdb = -(here->B4SOIcgdb + here->B4SOIcbdb + here->B4SOIcddb) * ag0; gcssb = (cgso + here->B4SOIgcse - (here->B4SOIcgsb + here->B4SOIcbsb + here->B4SOIcdsb)) * ag0; gcseb = -(here->B4SOIgcse + here->B4SOIcbeb + here->B4SOIcdeb + here->B4SOIcgeb + here->B4SOIceeb) * ag0; /* LFW_FD fix line */ /*fix below expression Wagner */ /*gcsT = - model->B4SOItype * (here->B4SOIcgT */ gcsT = - (here->B4SOIcgT + here->B4SOIcbT + here->B4SOIcdT + here->B4SOIceT) * ag0; /*fix below expression Wagner */ /*gcgT = model->B4SOItype * here->B4SOIcgT * ag0;*/ gcgT = here->B4SOIcgT * ag0; /* gcbdb = here->B4SOIcbdb * ag0; gcbsb = here->B4SOIcbsb * ag0; */ gcbeb = here->B4SOIcbeb * ag0; gcbT = model->B4SOItype * here->B4SOIcbT * ag0; /* v4.0 */ if (!here->B4SOIrbodyMod) { gcjdbdp = gcjsbsp = 0.0; gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb + gcdeb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb + gcseb); gcdbdb = gcsbsb = 0.0; gcbdb = here->B4SOIcbdb * ag0; gcbsb = here->B4SOIcbsb * ag0; here->B4SOIGGjdb = GGjdb = 0.0; here->B4SOIGGjsb = GGjsb = 0.0; } else { gcjdbdp = gcjdbs * ag0; gcjsbsp = gcjsbs * ag0; gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb + gcdeb) + gcjdbdp; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb + gcseb) + gcjsbsp; /* v4.2 optimization: gcjdds + gcjdbs = 0 gcdbdb = gcjdds * ag0; gcsbsb = -(gcjdds + gcjdbs + gcjsbs) * ag0; */ gcdbdb = -gcjdbs * ag0; gcsbsb = -gcjsbs * ag0; gcbdb = here->B4SOIcbdb * ag0 - gcdbdb; gcbsb = here->B4SOIcbsb * ag0 - gcsbsb; here->B4SOIGGjdb = GGjdb = Gjdb; here->B4SOIGGjsb = GGjsb = Gjsb; } /* v4.0 end */ gcedb = (- here->B4SOIgcde) * ag0; gcesb = (- here->B4SOIgcse) * ag0; gceeb = (here->B4SOIgcse + here->B4SOIgcde + here->B4SOIceeb + pParam->B4SOIcgeo) * ag0; gceT = model->B4SOItype * here->B4SOIceT * ag0; gcTt = pParam->B4SOIcth * ag0; sxpart = 0.6; dxpart = 0.4; /* v3.1 moved the following original code ahead */ /* Lump the overlap capacitance and S/D parasitics */ /* qgd = qgdo; qgs = qgso; qge = pParam->B4SOIcgeo * vge; qgate += qgd + qgs + qge; qdrn += here->B4SOIqde - qgd; qsub -= qge + here->B4SOIqse + here->B4SOIqde; qsrc = -(qgate + qbody + qdrn + qsub); */ /* v3.1 end */ } else { if (here->B4SOIrgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->B4SOIcgeo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmeb = -pParam->B4SOIcgeo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcegmb = gcgmeb; gcggb = here->B4SOIcggb * ag0; gcgsb = here->B4SOIcgdb * ag0; gcgdb = here->B4SOIcgsb * ag0; gcgeb = here->B4SOIcgeb * ag0; /* LFW_FD fix line */ gcgbb = -(gcggb + gcgdb + gcgsb + gcgeb); /* v3.1 added gcgeb */ gcsgb = here->B4SOIcdgb * ag0; gcegb = gcgeb; /* v3.1 added */ gcdgb = -(here->B4SOIcggb + here->B4SOIcbgb + here->B4SOIcdgb) * ag0 - gcegb; /*v3.1 added gcegb*/ gcbgb = here->B4SOIcbgb * ag0; qgd = qgdo; qgs = qgso; qge = 0; /* v3.1 */ qgme = pParam->B4SOIcgeo * vgme; qgmid = qgdo + qgso + qgme; qgate += qge; qbody -= 0; qsrc = qdrn - qgs + here->B4SOIqse; qsub -= qgme + here->B4SOIqse + here->B4SOIqde; qdrn = -(qgate + qgmid + qbody + qsrc + qsub) -qjd; qsrc -= qjs; if (!here->B4SOIrbodyMod) qbody += qjs + qjd; } else { gcggb = (here->B4SOIcggb + cgdo + cgso + pParam->B4SOIcgeo) * ag0; gcgdb = (here->B4SOIcgsb - cgdo) * ag0; gcgsb = (here->B4SOIcgdb - cgso) * ag0; gcgeb = (here->B4SOIcgeb - pParam->B4SOIcgeo) * ag0; /* LFW_FD fix line */ gcgbb = -(gcggb + gcgdb + gcgsb + gcgeb); /*added gcgbb*/ gcegb = (- pParam->B4SOIcgeo) * ag0; /* LFW_FD fix line */ gcsgb = (here->B4SOIcdgb - cgso) * ag0; gcdgb = -(here->B4SOIcggb + here->B4SOIcbgb + here->B4SOIcdgb + cgdo) * ag0; gcbgb = here->B4SOIcbgb * ag0; gcdgmb = gcsgmb = gcegmb = 0.0; gcgmdb = gcgmsb = gcgmeb = 0.0; /* Lump the overlap capacitance and S/D parasitics */ qgd = qgdo; qgs = qgso; qge = pParam->B4SOIcgeo * vge; qgate += qgd + qgs + qge; qsrc = qdrn - qgs + here->B4SOIqse; qsub -= qge + here->B4SOIqse + here->B4SOIqde; qdrn = -(qgate + qbody + qsrc + qsub) - qjd; qsrc -= qjs; if (!here->B4SOIrbodyMod) qbody += qjs + qjd; } gcssb = (here->B4SOIcddb + cgso + here->B4SOIgcse) * ag0; gcsdb = here->B4SOIcdsb * ag0; gcseb = (here->B4SOIcdeb - here->B4SOIgcse) * ag0; /*fix below expression Wagner */ /*gcsT = model->B4SOItype * here->B4SOIcdT * ag0;*/ gcsT = here->B4SOIcdT * ag0; gcdsb = -(here->B4SOIcgdb + here->B4SOIcbdb + here->B4SOIcddb) * ag0; gcddb = (cgdo + here->B4SOIgcde - (here->B4SOIcgsb + here->B4SOIcbsb + here->B4SOIcdsb)) * ag0; gcdeb = -(here->B4SOIgcde + here->B4SOIcbeb + here->B4SOIcdeb + here->B4SOIcgeb + here->B4SOIceeb) * ag0; /* LFW_FD fix line */ /*fix below expression Wagner */ /*gcdT = - model->B4SOItype * (here->B4SOIcgT */ gcdT = - (here->B4SOIcgT + here->B4SOIcbT + here->B4SOIcdT + here->B4SOIceT) * ag0; /*fix below expression Wagner */ /*gcgT = model->B4SOItype * here->B4SOIcgT * ag0;*/ gcgT = here->B4SOIcgT * ag0; gcbeb = here->B4SOIcbeb * ag0; gcbT = model->B4SOItype * here->B4SOIcbT * ag0; /* v4.0 gcbsb = here->B4SOIcbdb * ag0; gcbdb = here->B4SOIcbsb * ag0; */ /* v4.0 */ if (!here->B4SOIrbodyMod) { gcjdbdp = gcjsbsp = 0.0; gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb + gcdeb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb + gcseb); gcdbdb = gcsbsb = 0.0; gcbdb = here->B4SOIcbsb * ag0; gcbsb = here->B4SOIcbdb * ag0; here->B4SOIGGjdb = GGjdb = 0.0; here->B4SOIGGjsb = GGjsb = 0.0; } else { /* v4.2 bugfix; qjd/qjs are not swapped gcjdbdp = gcjsbs * ag0; gcjsbsp = gcjdbs * ag0; */ gcjdbdp = gcjdbs * ag0; gcjsbsp = gcjsbs * ag0; gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb + gcdeb) + gcjdbdp; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb + gcseb) + gcjsbsp; /* v4.2 bugfix; qjd/qjs are not swapped gcsbsb = gcjdds * ag0; gcdbdb = -(gcjdds + gcjdbs + gcjsbs) * ag0; */ gcsbsb = -gcjdbs * ag0; gcdbdb = -gcjsbs * ag0; gcbdb = here->B4SOIcbsb * ag0 - gcdbdb; gcbsb = here->B4SOIcbdb * ag0 - gcsbsb; here->B4SOIGGjdb = GGjdb = Gjsb; here->B4SOIGGjsb = GGjsb = Gjdb; } /* v4.0 end */ /* gcegb = (-pParam->B4SOIcgeo) * ag0; V3.2 bug fix */ gcesb = (- here->B4SOIgcse) * ag0; gcedb = (- here->B4SOIgcde) * ag0; gceeb = (here->B4SOIceeb + pParam->B4SOIcgeo + here->B4SOIgcse + here->B4SOIgcde) * ag0; gceT = model->B4SOItype * here->B4SOIceT * ag0; gcTt = pParam->B4SOIcth * ag0; dxpart = 0.6; sxpart = 0.4; /* v3.1 moved the following code ahead */ /* Lump the overlap capacitance */ /* qgd = qgdo; qgs = qgso; qge = pParam->B4SOIcgeo * vge; qgate += qgd + qgs + qge; qsrc = qdrn - qgs + here->B4SOIqse; qsub -= qge + here->B4SOIqse + here->B4SOIqde; qdrn = -(qgate + qbody + qsrc + qsub); */ /* v3.1 end */ } here->B4SOIcgdo = cgdo; here->B4SOIcgso = cgso; if (ByPass) goto line860; *(ckt->CKTstate0 + here->B4SOIqe) = qsub; *(ckt->CKTstate0 + here->B4SOIqg) = qgate; *(ckt->CKTstate0 + here->B4SOIqd) = qdrn; *(ckt->CKTstate0 + here->B4SOIqb) = qbody; if ((model->B4SOIshMod == 1) && (here->B4SOIrth0!=0.0)) *(ckt->CKTstate0 + here->B4SOIqth) = pParam->B4SOIcth * delTemp; if (here->B4SOIrgateMod == 3) /* 3.1 bug fix */ *(ckt->CKTstate0 + here->B4SOIqgmid) = qgmid; /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B4SOIqb) = *(ckt->CKTstate0 + here->B4SOIqb); *(ckt->CKTstate1 + here->B4SOIqg) = *(ckt->CKTstate0 + here->B4SOIqg); *(ckt->CKTstate1 + here->B4SOIqd) = *(ckt->CKTstate0 + here->B4SOIqd); *(ckt->CKTstate1 + here->B4SOIqe) = *(ckt->CKTstate0 + here->B4SOIqe); *(ckt->CKTstate1 + here->B4SOIqth) = *(ckt->CKTstate0 + here->B4SOIqth); if (here->B4SOIrgateMod == 3) *(ckt->CKTstate1 + here->B4SOIqgmid) = *(ckt->CKTstate0 + here->B4SOIqgmid); if (here->B4SOIrbodyMod) /* v4.0 */ { *(ckt->CKTstate1 + here->B4SOIqbs) = *(ckt->CKTstate0 + here->B4SOIqbs); *(ckt->CKTstate1 + here->B4SOIqbd) = *(ckt->CKTstate0 + here->B4SOIqbd); } } error = NIintegrate(ckt, &geq, &ceq,0.0,here->B4SOIqb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B4SOIqg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B4SOIqd); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B4SOIqe); if (error) return(error); if ((model->B4SOIshMod == 1) && (here->B4SOIrth0!=0.0)) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B4SOIqth); if (error) return (error); } if (here->B4SOIrgateMod == 3) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B4SOIqgmid); if (error) return(error); } /*3.1 bug fix*/ if (here->B4SOIrbodyMod) /* v4.0 */ { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B4SOIqbs); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B4SOIqbd); if (error) return(error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqe = ceqqg = ceqqb = ceqqd = ceqqth= 0.0; gcdgb = gcddb = gcdsb = gcdeb = gcdT = 0.0; gcsgb = gcsdb = gcssb = gcseb = gcsT = 0.0; gcggb = gcgdb = gcgsb = gcgeb = gcgT = 0.0; gcbgb = gcbdb = gcbsb = gcbeb = gcbT = 0.0; gcegb = gcedb = gceeb = gcesb = gceT = 0.0; gcTt = 0.0; /* v3.1 added for RF */ gcgmgmb = gcgmdb = gcgmsb = gcgmeb = 0.0; gcdgmb = gcsgmb = gcegmb = ceqqgmid = 0.0; gcgbb = gcsbb = gcdbb = 0.0; /* v3.1 added for RF end */ gcdbdb = gcsbsb = gcjdbdp = gcjsbsp = 0.0; /* v4.0 */ ceqqjd = ceqqjs = 0.0; /* v4.0 */ GGjdb = GGjsb = 0.0; /* v4.0 */ sxpart = (1.0 - (dxpart = (here->B4SOImode > 0) ? 0.4 : 0.6)); goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B4SOIcqg); cqbody = *(ckt->CKTstate0 + here->B4SOIcqb); cqdrn = *(ckt->CKTstate0 + here->B4SOIcqd); cqsub = *(ckt->CKTstate0 + here->B4SOIcqe); cqtemp = *(ckt->CKTstate0 + here->B4SOIcqth); here->B4SOIcb += cqbody; here->B4SOIcd += cqdrn; ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs - gcgeb * veb - gcgT * delTemp; ceqqb = cqbody - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs - gcbeb * veb - gcbT * delTemp; /* v3.2 bug fix */ ceqqd = cqdrn - gcdgb * vgb + (gcddb + gcdbdb) * vbd + gcdsb * vbs - gcdeb * veb - gcdT * delTemp - gcdbdb * vbd_jct - gcdgmb * vgmb;/* v4.0 */ ceqqe = cqsub - gcegb * vgb + gcedb * vbd + gcesb * vbs - gceeb * veb - gceT * delTemp - gcegmb * vgmb; /* 3.2 bug fix */ ceqqth = cqtemp - gcTt * delTemp; /* v3.1 added for RF */ if (here->B4SOIrgateMod == 3) ceqqgmid = *(ckt->CKTstate0 + here->B4SOIcqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb;/* 3.2 bug fix */ else ceqqgmid = 0.0; /* v3.1 added for RF end */ if (here->B4SOIrbodyMod) /* v4.0 */ { ceqqjs = *(ckt->CKTstate0 + here->B4SOIcqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->B4SOIcqbd) + gcdbdb * vbd_jct; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B4SOIcqe) = *(ckt->CKTstate0 + here->B4SOIcqe); *(ckt->CKTstate1 + here->B4SOIcqb) = *(ckt->CKTstate0 + here->B4SOIcqb); *(ckt->CKTstate1 + here->B4SOIcqg) = *(ckt->CKTstate0 + here->B4SOIcqg); *(ckt->CKTstate1 + here->B4SOIcqd) = *(ckt->CKTstate0 + here->B4SOIcqd); *(ckt->CKTstate1 + here->B4SOIcqth) = *(ckt->CKTstate0 + here->B4SOIcqth); if (here->B4SOIrgateMod == 3) /* v3.1 */ *(ckt->CKTstate1 + here->B4SOIcqgmid) = *(ckt->CKTstate0 + here->B4SOIcqgmid); if (here->B4SOIrbodyMod) /* v4.0 */ { *(ckt->CKTstate1 + here->B4SOIcqbs) = *(ckt->CKTstate0 + here->B4SOIcqbs); *(ckt->CKTstate1 + here->B4SOIcqbd) = *(ckt->CKTstate0 + here->B4SOIcqbd); } } /* * load current vector */ line900: if (here->B4SOImode >= 0) { Gm = here->B4SOIgm; Gmbs = here->B4SOIgmbs; /* v3.0 */ Gme = here->B4SOIgme; GmT = model->B4SOItype * here->B4SOIgmT; FwdSum = Gm + Gmbs + Gme; /* v3.0 */ RevSum = 0.0; /* v2.2.2 bug fix */ cdreq = model->B4SOItype * (here->B4SOIcdrain - here->B4SOIgds * vds - Gm * vgs - Gmbs * vbs - Gme * ves) - GmT * delTemp; /* v3.0 */ /* ceqbs now is compatible with cdreq, ie. going in is +ve */ /* Equivalent current source from the diode */ ceqbs = here->B4SOIcjs; ceqbd = here->B4SOIcjd; cdbdp = Idbdp; csbsp = Isbsp; /* Current going in is +ve */ ceqbody = -here->B4SOIcbody; ceqgate = here->B4SOIcgate; gigg = here->B4SOIgigg; gigb = here->B4SOIgigb; gige = here->B4SOIgige; /* v3.0 */ gigs = here->B4SOIgigs; gigd = here->B4SOIgigd; gigT = model->B4SOItype * here->B4SOIgigT; ceqth = here->B4SOIcth; ceqbodcon = here->B4SOIcbodcon; /* v4.1 */ gigpg = here->B4SOIgigpg; gigpp = here->B4SOIgigpp; ceqgate += (here->B4SOIigp - gigpg * vgp); if(here->B4SOIbodyMod == 1) ceqbodcon += (here->B4SOIigp - gigpg * vgp); else if(here->B4SOIbodyMod == 2) ceqbody -= (here->B4SOIigp - gigpg * vgp); gbbg = -here->B4SOIgbgs; gbbdp = -here->B4SOIgbds; gbbb = -here->B4SOIgbbs; gbbp = -here->B4SOIgbps; gbbT = -model->B4SOItype * here->B4SOIgbT; /* v3.0 */ gbbe = -here->B4SOIgbes; if (here->B4SOIrbodyMod) { /* v4.0 */ gbbdp = -Giid - Ggidld - Ggisls; gbbb = -Giib + Gbpbs; gjsdb = Gjsb + Gjdb; } gbbsp = - ( gbbg + gbbdp + gbbb + gbbp + gbbe); gddpg = -here->B4SOIgjdg; gddpdp = -here->B4SOIgjdd; if (!here->B4SOIrbodyMod) /* v4.0 */ gddpb = -here->B4SOIgjdb; else gddpb = Giib + Ggidlb + Ggislb; gddpT = -model->B4SOItype * here->B4SOIgjdT; /* v3.0 */ gddpe = -here->B4SOIgjde; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B4SOIgjsg; gsspdp = -here->B4SOIgjsd; if (!here->B4SOIrbodyMod) gsspb = -here->B4SOIgjsb; else gsspb = 0.0; gsspT = -model->B4SOItype * here->B4SOIgjsT; /* v3.0 */ gsspe = 0.0; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppb = -here->B4SOIgbpbs; gppp = -here->B4SOIgbpps; gTtg = here->B4SOIgtempg; gTtb = here->B4SOIgtempb; gTtdp = here->B4SOIgtempd; gTtt = here->B4SOIgtempT; /* v3.0 */ gTte = here->B4SOIgtempe; gTtsp = - (gTtg + gTtb + gTtdp + gTte); /* v3.0 */ if (model->B4SOIigcMod) { gIstotg = here->B4SOIgIgsg + here->B4SOIgIgcsg; gIstotd = here->B4SOIgIgcsd; gIstots = here->B4SOIgIgss + here->B4SOIgIgcss; gIstotb = here->B4SOIgIgcsb; Istoteq = model->B4SOItype * (here->B4SOIIgs + here->B4SOIIgcs - gIstotg * vgs - here->B4SOIgIgcsd * vds - here->B4SOIgIgcsb * vbs); gIdtotg = here->B4SOIgIgdg + here->B4SOIgIgcdg; gIdtotd = here->B4SOIgIgdd + here->B4SOIgIgcdd; gIdtots = here->B4SOIgIgcds; gIdtotb = here->B4SOIgIgcdb; Idtoteq = model->B4SOItype * (here->B4SOIIgd + here->B4SOIIgcd - here->B4SOIgIgdg * vgd - here->B4SOIgIgcdg * vgs - here->B4SOIgIgcdd * vds - here->B4SOIgIgcdb * vbs); gIgtotg = gIstotg + gIdtotg; gIgtotd = gIstotd + gIdtotd; gIgtots = gIstots + gIdtots; gIgtotb = gIstotb + gIdtotb; Igtoteq = Istoteq + Idtoteq; } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; } /* v3.1 added for RF */ if (here->B4SOIrgateMod == 2) T0 = vges - vgs; else if (here->B4SOIrgateMod == 3) T0 = vgms - vgs; if (here->B4SOIrgateMod > 1) { gcrgd = here->B4SOIgcrgd * T0; gcrgg = here->B4SOIgcrgg * T0; gcrgs = here->B4SOIgcrgs * T0; gcrgb = here->B4SOIgcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); gcrgg -= here->B4SOIgcrg; gcrg = here->B4SOIgcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; /* v3.1 added for RF end */ } /* end of soimode>=0 */ else { Gm = -here->B4SOIgm; Gmbs = -here->B4SOIgmbs; /* v3.0 */ Gme = -here->B4SOIgme; GmT = -model->B4SOItype * here->B4SOIgmT; FwdSum = 0.0; RevSum = -(Gm + Gmbs + Gme); /* v3.0 */ /* v3.1 bug fix */ cdreq = -model->B4SOItype * (here->B4SOIcdrain + here->B4SOIgds*vds + Gm * vgd + Gmbs * vbd + Gme * (ves - vds)) - GmT * delTemp; ceqbs = here->B4SOIcjd; ceqbd = here->B4SOIcjs; csbsp = Idbdp; cdbdp = Isbsp; /* Current going in is +ve */ ceqbody = -here->B4SOIcbody; ceqgate = here->B4SOIcgate; gigg = here->B4SOIgigg; gigb = here->B4SOIgigb; gige = here->B4SOIgige; /* v3.0 */ gigs = here->B4SOIgigd; gigd = here->B4SOIgigs; gigT = model->B4SOItype * here->B4SOIgigT; ceqth = here->B4SOIcth; ceqbodcon = here->B4SOIcbodcon; /* v4.1 */ gigpg = here->B4SOIgigpg; gigpp = here->B4SOIgigpp; ceqgate += (here->B4SOIigp - gigpg * vgp); if(here->B4SOIbodyMod == 1) ceqbodcon += (here->B4SOIigp - gigpg * vgp); else if(here->B4SOIbodyMod == 2) ceqbody -= (here->B4SOIigp - gigpg * vgp); gbbg = -here->B4SOIgbgs; gbbb = -here->B4SOIgbbs; gbbp = -here->B4SOIgbps; gbbsp = -here->B4SOIgbds; gbbT = -model->B4SOItype * here->B4SOIgbT; /* v3.0 */ gbbe = -here->B4SOIgbes; if (here->B4SOIrbodyMod) { /* v4.0 */ gbbsp = -Giid - Ggidld - Ggisls; gbbb = -Giib + Gbpbs; gjsdb = Gjsb + Gjdb; } gbbdp = - ( gbbg + gbbsp + gbbb + gbbp + gbbe); gddpg = -here->B4SOIgjsg; gddpsp = -here->B4SOIgjsd; if (!here->B4SOIrbodyMod) gddpb = -here->B4SOIgjsb; else gddpb = 0.0; gddpT = -model->B4SOItype * here->B4SOIgjsT; /* v3.0 */ gddpe = 0.0; gddpdp = - (gddpg + gddpsp + gddpb + gddpe); gsspg = -here->B4SOIgjdg; gsspsp = -here->B4SOIgjdd; if (!here->B4SOIrbodyMod) gsspb = -here->B4SOIgjdb; else gsspb = Giib + Ggidlb + Ggislb; gsspT = -model->B4SOItype * here->B4SOIgjdT; /* v3.0 */ gsspe = -here->B4SOIgjde; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe); gppb = -here->B4SOIgbpbs; gppp = -here->B4SOIgbpps; gTtg = here->B4SOIgtempg; gTtb = here->B4SOIgtempb; gTtsp = here->B4SOIgtempd; gTtt = here->B4SOIgtempT; /* v3.0 */ gTte = here->B4SOIgtempe; gTtdp = - (gTtg + gTtb + gTtsp + gTte); /* v3.0 */ if (model->B4SOIigcMod) { gIstotg = here->B4SOIgIgsg + here->B4SOIgIgcdg; gIstotd = here->B4SOIgIgcds; gIstots = here->B4SOIgIgss + here->B4SOIgIgcdd; gIstotb = here->B4SOIgIgcdb; Istoteq = model->B4SOItype * (here->B4SOIIgs + here->B4SOIIgcd - here->B4SOIgIgsg * vgs - here->B4SOIgIgcdg * vgd + here->B4SOIgIgcdd * vds - here->B4SOIgIgcdb * vbd); gIdtotg = here->B4SOIgIgdg + here->B4SOIgIgcsg; gIdtotd = here->B4SOIgIgdd + here->B4SOIgIgcss; gIdtots = here->B4SOIgIgcsd; gIdtotb = here->B4SOIgIgcsb; Idtoteq = model->B4SOItype * (here->B4SOIIgd + here->B4SOIIgcs - (here->B4SOIgIgdg + here->B4SOIgIgcsg) * vgd + here->B4SOIgIgcsd * vds - here->B4SOIgIgcsb * vbd); gIgtotg = gIstotg + gIdtotg; gIgtotd = gIstotd + gIdtotd; gIgtots = gIstots + gIdtots; gIgtotb = gIstotb + gIdtotb; Igtoteq = Istoteq + Idtoteq; } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; } /* v3.1 added for RF */ if (here->B4SOIrgateMod == 2) T0 = vges - vgs; else if (here->B4SOIrgateMod == 3) T0 = vgms - vgs; if (here->B4SOIrgateMod > 1) { gcrgd = here->B4SOIgcrgs * T0; gcrgg = here->B4SOIgcrgg * T0; gcrgs = here->B4SOIgcrgd * T0; gcrgb = here->B4SOIgcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); gcrgg -= here->B4SOIgcrg; gcrg = here->B4SOIgcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; /* v3.1 added for RF end */ } /* end of soimod<0 */ if (model->B4SOIrdsMod == 1) { ceqgstot = model->B4SOItype * (here->B4SOIgstotd * vds + here->B4SOIgstotg * vgs + here->B4SOIgstotb * vbs); /* ceqgstot flowing away from sNodePrime */ gstot = here->B4SOIgstot; gstotd = here->B4SOIgstotd; gstotg = here->B4SOIgstotg; gstots = here->B4SOIgstots - gstot; gstotb = here->B4SOIgstotb; ceqgdtot = -model->B4SOItype * (here->B4SOIgdtotd * vds + here->B4SOIgdtotg * vgs + here->B4SOIgdtotb * vbs); /* ceqgdtot defined as flowing into dNodePrime */ gdtot = here->B4SOIgdtot; gdtotd = here->B4SOIgdtotd - gdtot; gdtotg = here->B4SOIgdtotg; gdtots = here->B4SOIgdtots; gdtotb = here->B4SOIgdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } if (model->B4SOItype > 0) { ceqqg = ceqqg; ceqqb = ceqqb; ceqqe = ceqqe; ceqqd = ceqqd; } else { ceqbodcon = -ceqbodcon; ceqbody = -ceqbody; ceqgate = -ceqgate; ceqbs = -ceqbs; ceqbd = -ceqbd; ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; ceqqe = -ceqqe; cdbdp = - cdbdp; /* v4.0 */ csbsp = - csbsp; /* v4.0 */ ceqgcrg = -ceqgcrg; /* v3.1 */ if (here->B4SOIrgateMod == 3) ceqqgmid = -ceqqgmid; if (here->B4SOIrbodyMod) /* v4.0 */ { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } } m = here->B4SOIm; /* v3.1 */ #ifndef USE_OMP /* v3.1 added ceqgcrg for RF */ (*(ckt->CKTrhs + here->B4SOIgNode) -= m * ((ceqgate + ceqqg) + Igtoteq - ceqgcrg)); /* v3.1 added ceqgcrg for RF end */ (*(ckt->CKTrhs + here->B4SOIdNodePrime) += m * ((ceqbd - cdreq - ceqqd) + Idtoteq /* v4.0 */ + ceqgdtot)); if (!here->B4SOIrbodyMod) { (*(ckt->CKTrhs + here->B4SOIsNodePrime) += m * ((cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe) + Istoteq + ceqqgmid - ceqgstot)); /* v4.0 */ } else { /* v4.0 */ (*(ckt->CKTrhs + here->B4SOIsNodePrime) += m * ((cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe) + Istoteq + ceqqgmid + ceqqjd + ceqqjs - ceqgstot)); } (*(ckt->CKTrhs + here->B4SOIeNode) -= m * ceqqe); if (here->B4SOIrgateMod == 2) (*(ckt->CKTrhs + here->B4SOIgNodeExt) -= m * ceqgcrg); else if (here->B4SOIrgateMod == 3) (*(ckt->CKTrhs + here->B4SOIgNodeMid) -= m * (ceqqgmid + ceqgcrg)); if (here->B4SOIbodyMod == 1) { (*(ckt->CKTrhs + here->B4SOIpNode) += m * ceqbodcon); } if ( here->B4SOIsoiMod != 2 ) {if (!here->B4SOIrbodyMod) (*(ckt->CKTrhs + here->B4SOIbNode) -= m * (ceqbody + ceqqb)); else /* v4.0 */ { (*(ckt->CKTrhs + here->B4SOIdbNode) -= m * (cdbdp + ceqqjd)); (*(ckt->CKTrhs + here->B4SOIbNode) -= m * (ceqbody + ceqqb)); (*(ckt->CKTrhs + here->B4SOIsbNode) -= m * (csbsp + ceqqjs)); } } if (selfheat) { (*(ckt->CKTrhs + here->B4SOItempNode) -= m * (ceqth + ceqqth)); } if (model->B4SOIrdsMod) { (*(ckt->CKTrhs + here->B4SOIdNode) -= m * ceqgdtot); (*(ckt->CKTrhs + here->B4SOIsNode) += m * ceqgstot); } #else /* OpenMP parallelization: Temporary storage of right hand side values into instance storage space. Update to matrix will be done by function B4SOILoadRhsMat() only when all instances have their values stored. */ /* v3.1 added ceqgcrg for RF */ here->B4SOINode_1 = m * ((ceqgate + ceqqg) + Igtoteq - ceqgcrg); /* v3.1 added ceqgcrg for RF end */ here->B4SOINode_2 = m * ((ceqbd - cdreq - ceqqd) + Idtoteq /* v4.0 */ + ceqgdtot); if (!here->B4SOIrbodyMod) { here->B4SOINode_3 = m * ((cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe) + Istoteq + ceqqgmid - ceqgstot); /* v4.0 */ } else { /* v4.0 */ here->B4SOINode_4 = m * ((cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe) + Istoteq + ceqqgmid + ceqqjd + ceqqjs - ceqgstot); } here->B4SOINode_5 = m * ceqqe; if (here->B4SOIrgateMod == 2) here->B4SOINode_6 = m * ceqgcrg; else if (here->B4SOIrgateMod == 3) here->B4SOINode_7 = m * (ceqqgmid + ceqgcrg); if (here->B4SOIbodyMod == 1) { here->B4SOINode_8 = m * ceqbodcon; } if ( here->B4SOIsoiMod != 2 ) {if (!here->B4SOIrbodyMod) here->B4SOINode_9 = m * (ceqbody + ceqqb); else /* v4.0 */ { here->B4SOINode_10 = m * (cdbdp + ceqqjd); here->B4SOINode_11 = m * (ceqbody + ceqqb); here->B4SOINode_12 = m * (csbsp + ceqqjs); } } here->B4SOINode_sh = selfheat; if (selfheat) { here->B4SOINode_13 = m * (ceqth + ceqqth); } if (model->B4SOIrdsMod) { here->B4SOINode_14 = m * ceqgdtot; here->B4SOINode_15 = m * ceqgstot; } #endif if (here->B4SOIdebugMod != 0) { *(ckt->CKTrhs + here->B4SOIvbsNode) = here->B4SOIvbseff; *(ckt->CKTrhs + here->B4SOIidsNode) = FLOG(here->B4SOIids); *(ckt->CKTrhs + here->B4SOIicNode) = FLOG(here->B4SOIic); *(ckt->CKTrhs + here->B4SOIibsNode) = FLOG(here->B4SOIibs); *(ckt->CKTrhs + here->B4SOIibdNode) = FLOG(here->B4SOIibd); *(ckt->CKTrhs + here->B4SOIiiiNode) = FLOG(here->B4SOIiii); *(ckt->CKTrhs + here->B4SOIigNode) = here->B4SOIig; *(ckt->CKTrhs + here->B4SOIgiggNode) = here->B4SOIgigg; *(ckt->CKTrhs + here->B4SOIgigdNode) = here->B4SOIgigd; *(ckt->CKTrhs + here->B4SOIgigbNode) = here->B4SOIgigb; *(ckt->CKTrhs + here->B4SOIigidlNode) = here->B4SOIigidl; *(ckt->CKTrhs + here->B4SOIitunNode) = here->B4SOIitun; *(ckt->CKTrhs + here->B4SOIibpNode) = here->B4SOIibp; *(ckt->CKTrhs + here->B4SOIcbbNode) = here->B4SOIcbb; *(ckt->CKTrhs + here->B4SOIcbdNode) = here->B4SOIcbd; *(ckt->CKTrhs + here->B4SOIcbgNode) = here->B4SOIcbg; *(ckt->CKTrhs + here->B4SOIqbfNode) = here->B4SOIqbf; *(ckt->CKTrhs + here->B4SOIqjsNode) = here->B4SOIqjs; *(ckt->CKTrhs + here->B4SOIqjdNode) = here->B4SOIqjd; } if (!model->B4SOIrdsMod) { gdpr = here->B4SOIdrainConductance; gspr = here->B4SOIsourceConductance; } else gdpr = gspr = 0.0; /* v4.0 */ /* * load y matrix */ Gmin = ckt->CKTgmin * 1e-6; /* v3.1 added for RF */ geltd = here->B4SOIgrgeltd; #ifndef USE_OMP if (here->B4SOIrgateMod == 1) { *(here->B4SOIGEgePtr) += m * geltd; *(here->B4SOIGgePtr) -= m * geltd; *(here->B4SOIGEgPtr) -= m * geltd; } else if (here->B4SOIrgateMod == 2) { *(here->B4SOIGEgePtr) += m * gcrg; *(here->B4SOIGEgPtr) += m * gcrgg; *(here->B4SOIGEdpPtr) += m * gcrgd; *(here->B4SOIGEspPtr) += m * gcrgs; *(here->B4SOIGgePtr) -= m * gcrg; if (here->B4SOIsoiMod !=2) /* v3.2 */ *(here->B4SOIGEbPtr) += m * gcrgb; } else if (here->B4SOIrgateMod == 3) { *(here->B4SOIGEgePtr) += m * geltd; *(here->B4SOIGEgmPtr) -= m * geltd; *(here->B4SOIGMgePtr) -= m * geltd; *(here->B4SOIGMgmPtr) += m * (geltd + gcrg + gcgmgmb); *(here->B4SOIGMdpPtr) += m * (gcrgd + gcgmdb); *(here->B4SOIGMgPtr) += m * gcrgg; *(here->B4SOIGMspPtr) += m * (gcrgs + gcgmsb); *(here->B4SOIGMePtr) += m * gcgmeb; if (here->B4SOIsoiMod !=2) /* v3.2 */ *(here->B4SOIGMbPtr) += m * gcrgb; *(here->B4SOIDPgmPtr) += m * gcdgmb; *(here->B4SOIGgmPtr) -= m * gcrg; *(here->B4SOISPgmPtr) += m * gcsgmb; *(here->B4SOIEgmPtr) += m * gcegmb; } /* v3.1 added for RF end*/ /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ { (*(here->B4SOIDPePtr) += m * (Gme + gddpe)); (*(here->B4SOISPePtr) += m * (gsspe - Gme)); if (here->B4SOIsoiMod != 2) /* v3.2 */ { *(here->B4SOIGePtr) += m * gige; *(here->B4SOIBePtr) -= m * gige; } } *(here->B4SOIEdpPtr) += m * gcedb; *(here->B4SOIEspPtr) += m * gcesb; *(here->B4SOIDPePtr) += m * gcdeb; *(here->B4SOISPePtr) += m * gcseb; *(here->B4SOIEgPtr) += m * gcegb; *(here->B4SOIGePtr) += m * gcgeb; /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { (*(here->B4SOIEbPtr) -= m * (gcegb + gcedb + gcesb + gceeb + gcegmb)); /* 3.2 bug fix */ /* v3.1 changed GbPtr for RF */ if ((here->B4SOIrgateMod == 0) || (here->B4SOIrgateMod == 1)) (*(here->B4SOIGbPtr) -= m * (-gigb + gcggb + gcgdb + gcgsb + gcgeb - gIgtotb)); else /* v3.1 for rgateMod = 2 or 3 */ *(here->B4SOIGbPtr) += m * (gigb + gcgbb +gIgtotb - gcrgb); (*(here->B4SOIDPbPtr) -= m * (-gddpb - Gmbs - gcdbb + gdtotb + gIdtotb )); /* v4.0 */ /* (*(here->B4SOIDPbPtr) -= (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb) + gcdgmb + gIdtotb ); */ (*(here->B4SOISPbPtr) -= m * (-gsspb + Gmbs - gcsbb + gstotb + Gmin + gIstotb)); /* v4.0 */ /* (*(here->B4SOISPbPtr) -= (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb) + gcsgmb + Gmin + gIstotb); */ (*(here->B4SOIBePtr) += m * (gbbe + gcbeb)); /* v3.0 */ (*(here->B4SOIBgPtr) += m * (-gigg + gcbgb + gbbg)); (*(here->B4SOIBdpPtr) += m * (-gigd + gcbdb + gbbdp )); (*(here->B4SOIBspPtr) += m * (gcbsb + gbbsp - Gmin - gigs)); /* if (!here->B4SOIrbodyMod) */ (*(here->B4SOIBbPtr) += m * (-gigb + gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin)) ; /* else (*(here->B4SOIBbPtr) += -gigb - (Giib - Gbpbs) - gcbgb - gcbdb - gcbsb - gcbeb + Gmin) ; */ /* v4.0 */ if (here->B4SOIrbodyMod) { (*(here->B4SOIDPdbPtr) += m * (-gcjdbdp - GGjdb)); (*(here->B4SOISPsbPtr) += m * (-gcjsbsp - GGjsb)); (*(here->B4SOIDBdpPtr) += m * (-gcjdbdp - GGjdb)); (*(here->B4SOIDBdbPtr) += m * (gcjdbdp + GGjdb + here->B4SOIgrbdb)); (*(here->B4SOIDBbPtr) -= m * here->B4SOIgrbdb); (*(here->B4SOISBspPtr) += m * (-gcjsbsp - GGjsb)); (*(here->B4SOISBbPtr) -= m * here->B4SOIgrbsb); (*(here->B4SOISBsbPtr) += m * (gcjsbsp + GGjsb + here->B4SOIgrbsb)); (*(here->B4SOIBdbPtr) -= m * here->B4SOIgrbdb); (*(here->B4SOIBsbPtr) -= m * here->B4SOIgrbsb); (*(here->B4SOIBbPtr) += m * (here->B4SOIgrbsb + here->B4SOIgrbdb)); } if (model->B4SOIrdsMod) { (*(here->B4SOIDbPtr) += m * gdtotb); (*(here->B4SOISbPtr) += m * gstotb); } } /* v3.1 */ if (model->B4SOIrdsMod) { (*(here->B4SOIDgPtr) += m * gdtotg); (*(here->B4SOIDspPtr) += m * gdtots); (*(here->B4SOISdpPtr) += m * gstotd); (*(here->B4SOISgPtr) += m * gstotg); } (*(here->B4SOIEePtr) += m * gceeb); if (here->B4SOIrgateMod == 0) { (*(here->B4SOIGgPtr) += m * (gigg + gcggb + Gmin + gIgtotg)); (*(here->B4SOIGdpPtr) += m * (gigd + gcgdb - Gmin + gIgtotd)); (*(here->B4SOIGspPtr) += m * (gcgsb + gigs + gIgtots)); } else if (here->B4SOIrgateMod == 1) /* v3.1 for RF */ { *(here->B4SOIGgPtr) += m * (gigg + gcggb + Gmin + gIgtotg + geltd); *(here->B4SOIGdpPtr) += m * (gigd + gcgdb - Gmin + gIgtotd); *(here->B4SOIGspPtr) += m * (gcgsb + gigs + gIgtots); } else /* v3.1 for RF rgateMod == 2 or 3 */ { *(here->B4SOIGgPtr) += m * (gigg + gcggb + Gmin + gIgtotg - gcrgg); *(here->B4SOIGdpPtr) += m * (gigd + gcgdb - Gmin + gIgtotd - gcrgd); *(here->B4SOIGspPtr) += m * (gcgsb + gigs + gIgtots - gcrgs); } (*(here->B4SOIDPgPtr) += m * ((Gm + gcdgb) + gddpg - Gmin - gIdtotg - gdtotg)); /* v4.0 */ (*(here->B4SOIDPdpPtr) += m * ((gdpr + here->B4SOIgds + gddpdp + RevSum + gcddb) + Gmin - gIdtotd - gdtotd)); /* v4.0 */ (*(here->B4SOIDPspPtr) -= m * ((-gddpsp + here->B4SOIgds + FwdSum - gcdsb) + gIdtots + gdtots)); (*(here->B4SOIDPdPtr) -= m * (gdpr + gdtot)); (*(here->B4SOISPgPtr) += m * (gcsgb - Gm + gsspg - gIstotg - gstotg)); /* v4.0 */ (*(here->B4SOISPdpPtr) -= m * ((here->B4SOIgds - gsspdp + RevSum - gcsdb + gIstotd) + gstotd)); /* v4.0 */ (*(here->B4SOISPspPtr) += m * ((gspr - gstots + here->B4SOIgds + gsspsp + FwdSum + gcssb) + Gmin - gIstots)); /* v4.0 */ (*(here->B4SOISPsPtr) -= m * (gspr + gstot)); (*(here->B4SOIDdPtr) += m * (gdpr + gdtot)); (*(here->B4SOIDdpPtr) -= m * (gdpr - gdtotd)); (*(here->B4SOISsPtr) += m * (gspr + gstot)); (*(here->B4SOISspPtr) -= m * (gspr - gstots)); if (here->B4SOIbodyMod == 1) { (*(here->B4SOIBpPtr) -= m * gppp); (*(here->B4SOIPbPtr) += m * gppb); (*(here->B4SOIPpPtr) += m * gppp); } /* v4.1 Ig_agbcp2 stamping */ (*(here->B4SOIGgPtr) += m * gigpg); if (here->B4SOIbodyMod == 1) { (*(here->B4SOIPpPtr) -= m * gigpp); (*(here->B4SOIPgPtr) -= m * gigpg); (*(here->B4SOIGpPtr) += m * gigpp); } else if(here->B4SOIbodyMod == 2) { (*(here->B4SOIBbPtr) -= m * gigpp); (*(here->B4SOIBgPtr) -= m * gigpg); (*(here->B4SOIGbPtr) += m * gigpp); } if (selfheat) { (*(here->B4SOIDPtempPtr) += m * (GmT + gddpT + gcdT)); (*(here->B4SOISPtempPtr) += m * (-GmT + gsspT + gcsT)); (*(here->B4SOIBtempPtr) += m * (gbbT + gcbT - gigT)); (*(here->B4SOIEtempPtr) += m * gceT); (*(here->B4SOIGtempPtr) += m * (gcgT + gigT)); (*(here->B4SOITemptempPtr) += m * (gTtt + 1/pParam->B4SOIrth + gcTt)); (*(here->B4SOITempgPtr) += m * gTtg); (*(here->B4SOITempbPtr) += m * gTtb); (*(here->B4SOITempdpPtr) += m * gTtdp); (*(here->B4SOITempspPtr) += m * gTtsp); /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ (*(here->B4SOITempePtr) += m * gTte); } #else /* OpenMP parallelization: Temporary storage of matrix values into instance storage space. Update to matrix will be done by function B4SOILoadRhsMat() only when all instances have their values stored. */ if (here->B4SOIrgateMod == 1) { here->B4SOI_1 = m * geltd; here->B4SOI_2 = m * geltd; here->B4SOI_3 = m * geltd; } else if (here->B4SOIrgateMod == 2) { here->B4SOI_4 = m * gcrg; here->B4SOI_5 = m * gcrgg; here->B4SOI_6 = m * gcrgd; here->B4SOI_7 = m * gcrgs; here->B4SOI_8 = m * gcrg; if (here->B4SOIsoiMod !=2) /* v3.2 */ here->B4SOI_9 = m * gcrgb; } else if (here->B4SOIrgateMod == 3) { here->B4SOI_10 = m * geltd; here->B4SOI_11 = m * geltd; here->B4SOI_12 = m * geltd; here->B4SOI_13 = m * (geltd + gcrg + gcgmgmb); here->B4SOI_14 = m * (gcrgd + gcgmdb); here->B4SOI_15 = m * gcrgg; here->B4SOI_16 = m * (gcrgs + gcgmsb); here->B4SOI_17 = m * gcgmeb; if (here->B4SOIsoiMod !=2) /* v3.2 */ here->B4SOI_18 = m * gcrgb; here->B4SOI_19 = m * gcdgmb; here->B4SOI_20 = m * gcrg; here->B4SOI_21 = m * gcsgmb; here->B4SOI_22 = m * gcegmb; } /* v3.1 added for RF end*/ /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ { here->B4SOI_23 = m * (Gme + gddpe); here->B4SOI_24 = m * (gsspe - Gme); if (here->B4SOIsoiMod != 2) /* v3.2 */ { here->B4SOI_25 = m * gige; here->B4SOI_26 = m * gige; } } here->B4SOI_27 = m * gcedb; here->B4SOI_28 = m * gcesb; here->B4SOI_29 = m * gcdeb; here->B4SOI_30 = m * gcseb; here->B4SOI_31 = m * gcegb; here->B4SOI_32 = m * gcgeb; /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { here->B4SOI_33 = m * (gcegb + gcedb + gcesb + gceeb + gcegmb); /* 3.2 bug fix */ /* v3.1 changed GbPtr for RF */ if ((here->B4SOIrgateMod == 0) || (here->B4SOIrgateMod == 1)) (here->B4SOI_34 = m * (-gigb + gcggb + gcgdb + gcgsb + gcgeb - gIgtotb)); else /* v3.1 for rgateMod = 2 or 3 */ here->B4SOI_35 = m * (gigb + gcgbb +gIgtotb - gcrgb); here->B4SOI_36 = m * (-gddpb - Gmbs - gcdbb + gdtotb + gIdtotb ); /* v4.0 */ /* (*(here->B4SOIDPbPtr) -= (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb) + gcdgmb + gIdtotb ); */ (here->B4SOI_37 = m * (-gsspb + Gmbs - gcsbb + gstotb + Gmin + gIstotb)); /* v4.0 */ /* (*(here->B4SOISPbPtr) -= (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb) + gcsgmb + Gmin + gIstotb); */ (here->B4SOI_38 = m * (gbbe + gcbeb)); /* v3.0 */ (here->B4SOI_39 = m * (-gigg + gcbgb + gbbg)); (here->B4SOI_40 = m * (-gigd + gcbdb + gbbdp)); (here->B4SOI_41 = m * (gcbsb + gbbsp - Gmin - gigs)); /* if (!here->B4SOIrbodyMod) */ (here->B4SOI_42 = m * (-gigb + gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin)); /* else (*(here->B4SOIBbPtr) += -gigb - (Giib - Gbpbs) - gcbgb - gcbdb - gcbsb - gcbeb + Gmin) ; */ /* v4.0 */ if (here->B4SOIrbodyMod) { (here->B4SOI_43 = m * (-gcjdbdp - GGjdb)); (here->B4SOI_44 = m * (-gcjsbsp - GGjsb)); (here->B4SOI_45 = m * (-gcjdbdp - GGjdb)); (here->B4SOI_46 = m * (gcjdbdp + GGjdb + here->B4SOIgrbdb)); (here->B4SOI_47 = m * here->B4SOIgrbdb); (here->B4SOI_48 = m * (-gcjsbsp - GGjsb)); (here->B4SOI_49 = m * here->B4SOIgrbsb); (here->B4SOI_50 = m * (gcjsbsp + GGjsb + here->B4SOIgrbsb)); (here->B4SOI_51 = m * here->B4SOIgrbdb); (here->B4SOI_52 = m * here->B4SOIgrbsb); (here->B4SOI_53 = m * (here->B4SOIgrbsb + here->B4SOIgrbdb)); } if (model->B4SOIrdsMod) { (here->B4SOI_54 = m * gdtotb); (here->B4SOI_55 = m * gstotb); } } /* v3.1 */ if (model->B4SOIrdsMod) { (here->B4SOI_56 = m * gdtotg); (here->B4SOI_57 = m * gdtots); (here->B4SOI_58 = m * gstotd); (here->B4SOI_59 = m * gstotg); } (here->B4SOI_60 = m * gceeb); if (here->B4SOIrgateMod == 0) { (here->B4SOI_61 = m * (gigg + gcggb + Gmin + gIgtotg)); (here->B4SOI_62 =m * ( gigd + gcgdb - Gmin + gIgtotd)); (here->B4SOI_63 = m * (gcgsb + gigs + gIgtots)); } else if (here->B4SOIrgateMod == 1) /* v3.1 for RF */ { here->B4SOI_64 = m * (gigg + gcggb + Gmin + gIgtotg + geltd); here->B4SOI_65 = m * (gigd + gcgdb - Gmin + gIgtotd); here->B4SOI_66 = m * (gcgsb + gigs + gIgtots); } else /* v3.1 for RF rgateMod == 2 or 3 */ { here->B4SOI_67 = m * (gigg + gcggb + Gmin + gIgtotg - gcrgg); here->B4SOI_68 = m * (gigd + gcgdb - Gmin + gIgtotd - gcrgd); here->B4SOI_69 = m * (gcgsb + gigs + gIgtots - gcrgs); } (here->B4SOI_70 = m * ((Gm + gcdgb) + gddpg - Gmin - gIdtotg - gdtotg)); /* v4.0 */ (here->B4SOI_71 = m * ((gdpr + here->B4SOIgds + gddpdp + RevSum + gcddb) + Gmin - gIdtotd - gdtotd)); /* v4.0 */ (here->B4SOI_72 = m * ((-gddpsp + here->B4SOIgds + FwdSum - gcdsb) + gIdtots + gdtots)); (here->B4SOI_73 = m * (gdpr + gdtot)); (here->B4SOI_74 = m * (gcsgb - Gm + gsspg - gIstotg - gstotg)); /* v4.0 */ (here->B4SOI_75 = m * ((here->B4SOIgds - gsspdp + RevSum - gcsdb + gIstotd) + gstotd)); /* v4.0 */ (here->B4SOI_76 = m * ((gspr - gstots + here->B4SOIgds + gsspsp + FwdSum + gcssb) + Gmin - gIstots)); /* v4.0 */ (here->B4SOI_77 = m * (gspr + gstot)); (here->B4SOI_78 = m * (gdpr + gdtot)); (here->B4SOI_79 = m * (gdpr - gdtotd)); (here->B4SOI_80 = m * (gspr + gstot)); (here->B4SOI_81 = m * (gspr - gstots)); if (here->B4SOIbodyMod == 1) { (here->B4SOI_82 = m * gppp); (here->B4SOI_83 = m * gppb); (here->B4SOI_84 = m * gppp); } /* v4.1 Ig_agbcp2 stamping */ (here->B4SOI_85 = m * gigpg); /* FIXME m or not m ?? h_vogt */ if (here->B4SOIbodyMod == 1) { (here->B4SOI_86 = m * gigpp); (here->B4SOI_87 = m * gigpg); (here->B4SOI_88 = m * gigpp); } else if(here->B4SOIbodyMod == 2) { (here->B4SOI_89 = m * gigpp); (here->B4SOI_90 = m * gigpg); (here->B4SOI_91 = m * gigpp); } if (selfheat) { (here->B4SOI_92 = m * (GmT + gddpT + gcdT)); (here->B4SOI_93 = m * (-GmT + gsspT + gcsT)); (here->B4SOI_94 = m * (gbbT + gcbT - gigT)); (here->B4SOI_95 = m * gceT); (here->B4SOI_96 = m * (gcgT + gigT)); (here->B4SOI_97 = m * (gTtt + 1/pParam->B4SOIrth + gcTt)); (here->B4SOI_98 = m * gTtg); (here->B4SOI_99 = m * gTtb); (here->B4SOI_100 = m * gTtdp); (here->B4SOI_101 = m * gTtsp); /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ (here->B4SOI_102 = m * gTte); } #endif if (here->B4SOIdebugMod != 0) { *(here->B4SOIVbsPtr) += 1; *(here->B4SOIIdsPtr) += 1; *(here->B4SOIIcPtr) += 1; *(here->B4SOIIbsPtr) += 1; *(here->B4SOIIbdPtr) += 1; *(here->B4SOIIiiPtr) += 1; *(here->B4SOIIgPtr) += 1; *(here->B4SOIGiggPtr) += 1; *(here->B4SOIGigdPtr) += 1; *(here->B4SOIGigbPtr) += 1; *(here->B4SOIIgidlPtr) += 1; *(here->B4SOIItunPtr) += 1; *(here->B4SOIIbpPtr) += 1; *(here->B4SOICbgPtr) += 1; *(here->B4SOICbbPtr) += 1; *(here->B4SOICbdPtr) += 1; *(here->B4SOIQbfPtr) += 1; *(here->B4SOIQjsPtr) += 1; *(here->B4SOIQjdPtr) += 1; } line1000: ; #ifndef USE_OMP } /* End of Mosfet Instance */ } /* End of Model Instance */ #endif return(OK); } #ifdef USE_OMP /* OpenMP parallelization: Update of right hand side and matrix values from instance temporary storage. Update to matrix will be done only when all instances of this model have their values calculated and stored. Thus there is no further synchronisation required.*/ void B4SOILoadRhsMat(GENmodel *inModel, CKTcircuit *ckt) { unsigned int InstCount, idx; B4SOIinstance **InstArray; B4SOIinstance *here; B4SOImodel *model = (B4SOImodel*)inModel; InstArray = model->B4SOIInstanceArray; InstCount = model->B4SOIInstCount; for(idx = 0; idx < InstCount; idx++) { here = InstArray[idx]; /* Update b for Ax = b */ /* v3.1 */ /* v3.1 added ceqgcrg for RF */ (*(ckt->CKTrhs + here->B4SOIgNode) -= here->B4SOINode_1); /* v3.1 added ceqgcrg for RF end */ (*(ckt->CKTrhs + here->B4SOIdNodePrime) += here->B4SOINode_2); if (!here->B4SOIrbodyMod) { (*(ckt->CKTrhs + here->B4SOIsNodePrime) += here->B4SOINode_3); /* v4.0 */ } else { /* v4.0 */ (*(ckt->CKTrhs + here->B4SOIsNodePrime) += here->B4SOINode_4); } (*(ckt->CKTrhs + here->B4SOIeNode) -= here->B4SOINode_5); if (here->B4SOIrgateMod == 2) (*(ckt->CKTrhs + here->B4SOIgNodeExt) -= here->B4SOINode_6); else if (here->B4SOIrgateMod == 3) (*(ckt->CKTrhs + here->B4SOIgNodeMid) -= here->B4SOINode_7); if (here->B4SOIbodyMod == 1) { (*(ckt->CKTrhs + here->B4SOIpNode) += here->B4SOINode_8); } if ( here->B4SOIsoiMod != 2 ) {if (!here->B4SOIrbodyMod) (*(ckt->CKTrhs + here->B4SOIbNode) -= here->B4SOINode_9); else /* v4.0 */ { (*(ckt->CKTrhs + here->B4SOIdbNode) -= here->B4SOINode_10); (*(ckt->CKTrhs + here->B4SOIbNode) -= here->B4SOINode_11); (*(ckt->CKTrhs + here->B4SOIsbNode) -= here->B4SOINode_12); } } if (here->B4SOINode_sh) { (*(ckt->CKTrhs + here->B4SOItempNode) -= here->B4SOINode_13); } if (model->B4SOIrdsMod) { (*(ckt->CKTrhs + here->B4SOIdNode) -= here->B4SOINode_14); (*(ckt->CKTrhs + here->B4SOIsNode) += here->B4SOINode_15); } if (here->B4SOIdebugMod != 0) { *(ckt->CKTrhs + here->B4SOIvbsNode) = here->B4SOIvbseff; *(ckt->CKTrhs + here->B4SOIidsNode) = FLOG(here->B4SOIids); *(ckt->CKTrhs + here->B4SOIicNode) = FLOG(here->B4SOIic); *(ckt->CKTrhs + here->B4SOIibsNode) = FLOG(here->B4SOIibs); *(ckt->CKTrhs + here->B4SOIibdNode) = FLOG(here->B4SOIibd); *(ckt->CKTrhs + here->B4SOIiiiNode) = FLOG(here->B4SOIiii); *(ckt->CKTrhs + here->B4SOIigNode) = here->B4SOIig; *(ckt->CKTrhs + here->B4SOIgiggNode) = here->B4SOIgigg; *(ckt->CKTrhs + here->B4SOIgigdNode) = here->B4SOIgigd; *(ckt->CKTrhs + here->B4SOIgigbNode) = here->B4SOIgigb; *(ckt->CKTrhs + here->B4SOIigidlNode) = here->B4SOIigidl; *(ckt->CKTrhs + here->B4SOIitunNode) = here->B4SOIitun; *(ckt->CKTrhs + here->B4SOIibpNode) = here->B4SOIibp; *(ckt->CKTrhs + here->B4SOIcbbNode) = here->B4SOIcbb; *(ckt->CKTrhs + here->B4SOIcbdNode) = here->B4SOIcbd; *(ckt->CKTrhs + here->B4SOIcbgNode) = here->B4SOIcbg; *(ckt->CKTrhs + here->B4SOIqbfNode) = here->B4SOIqbf; *(ckt->CKTrhs + here->B4SOIqjsNode) = here->B4SOIqjs; *(ckt->CKTrhs + here->B4SOIqjdNode) = here->B4SOIqjd; } if (here->B4SOIrgateMod == 1) { *(here->B4SOIGEgePtr) += here->B4SOI_1; *(here->B4SOIGgePtr) -= here->B4SOI_2; *(here->B4SOIGEgPtr) -= here->B4SOI_3; } else if (here->B4SOIrgateMod == 2) { *(here->B4SOIGEgePtr) += here->B4SOI_4; *(here->B4SOIGEgPtr) += here->B4SOI_5; *(here->B4SOIGEdpPtr) += here->B4SOI_6; *(here->B4SOIGEspPtr) += here->B4SOI_7; *(here->B4SOIGgePtr) -= here->B4SOI_8; if (here->B4SOIsoiMod !=2) /* v3.2 */ *(here->B4SOIGEbPtr) += here->B4SOI_9; } else if (here->B4SOIrgateMod == 3) { *(here->B4SOIGEgePtr) += here->B4SOI_10; *(here->B4SOIGEgmPtr) -= here->B4SOI_11; *(here->B4SOIGMgePtr) -= here->B4SOI_12; *(here->B4SOIGMgmPtr) += here->B4SOI_13; *(here->B4SOIGMdpPtr) += here->B4SOI_14; *(here->B4SOIGMgPtr) += here->B4SOI_15; *(here->B4SOIGMspPtr) += here->B4SOI_16; *(here->B4SOIGMePtr) += here->B4SOI_17; if (here->B4SOIsoiMod !=2) /* v3.2 */ *(here->B4SOIGMbPtr) += here->B4SOI_18; *(here->B4SOIDPgmPtr) += here->B4SOI_19; *(here->B4SOIGgmPtr) -= here->B4SOI_20; *(here->B4SOISPgmPtr) += here->B4SOI_21; *(here->B4SOIEgmPtr) += here->B4SOI_22; } /* v3.1 added for RF end*/ /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ { (*(here->B4SOIDPePtr) += here->B4SOI_23); (*(here->B4SOISPePtr) += here->B4SOI_24); if (here->B4SOIsoiMod != 2) /* v3.2 */ { *(here->B4SOIGePtr) += here->B4SOI_25; *(here->B4SOIBePtr) -= here->B4SOI_26; } } *(here->B4SOIEdpPtr) += here->B4SOI_27; *(here->B4SOIEspPtr) += here->B4SOI_28; *(here->B4SOIDPePtr) += here->B4SOI_29; *(here->B4SOISPePtr) += here->B4SOI_30; *(here->B4SOIEgPtr) += here->B4SOI_31; *(here->B4SOIGePtr) += here->B4SOI_32; /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { (*(here->B4SOIEbPtr) -= here->B4SOI_33); /* 3.2 bug fix */ /* v3.1 changed GbPtr for RF */ if ((here->B4SOIrgateMod == 0) || (here->B4SOIrgateMod == 1)) (*(here->B4SOIGbPtr) -= here->B4SOI_34); else /* v3.1 for rgateMod = 2 or 3 */ *(here->B4SOIGbPtr) += here->B4SOI_35; (*(here->B4SOIDPbPtr) -= here->B4SOI_36); /* v4.0 */ /* (*(here->B4SOIDPbPtr) -= (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb) + gcdgmb + gIdtotb ); */ (*(here->B4SOISPbPtr) -= here->B4SOI_37); /* v4.0 */ /* (*(here->B4SOISPbPtr) -= (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb) + gcsgmb + Gmin + gIstotb); */ (*(here->B4SOIBePtr) += here->B4SOI_38); /* v3.0 */ (*(here->B4SOIBgPtr) += here->B4SOI_39); (*(here->B4SOIBdpPtr) += here->B4SOI_40); (*(here->B4SOIBspPtr) += here->B4SOI_41); /* if (!here->B4SOIrbodyMod) */ (*(here->B4SOIBbPtr) += here->B4SOI_42); /* else (*(here->B4SOIBbPtr) += -gigb - (Giib - Gbpbs) - gcbgb - gcbdb - gcbsb - gcbeb + Gmin) ; */ /* v4.0 */ if (here->B4SOIrbodyMod) { (*(here->B4SOIDPdbPtr) += here->B4SOI_43); (*(here->B4SOISPsbPtr) += here->B4SOI_44); (*(here->B4SOIDBdpPtr) += here->B4SOI_45); (*(here->B4SOIDBdbPtr) += here->B4SOI_46); (*(here->B4SOIDBbPtr) -= here->B4SOI_47); (*(here->B4SOISBspPtr) += here->B4SOI_48); (*(here->B4SOISBbPtr) -= here->B4SOI_49); (*(here->B4SOISBsbPtr) += here->B4SOI_50); (*(here->B4SOIBdbPtr) -= here->B4SOI_51); (*(here->B4SOIBsbPtr) -= here->B4SOI_52); (*(here->B4SOIBbPtr) += here->B4SOI_53); } if (model->B4SOIrdsMod) { (*(here->B4SOIDbPtr) += here->B4SOI_54); (*(here->B4SOISbPtr) += here->B4SOI_55); } } /* v3.1 */ if (model->B4SOIrdsMod) { (*(here->B4SOIDgPtr) += here->B4SOI_56); (*(here->B4SOIDspPtr) += here->B4SOI_57); (*(here->B4SOISdpPtr) += here->B4SOI_58); (*(here->B4SOISgPtr) += here->B4SOI_59); } (*(here->B4SOIEePtr) += here->B4SOI_60); if (here->B4SOIrgateMod == 0) { (*(here->B4SOIGgPtr) += here->B4SOI_61); (*(here->B4SOIGdpPtr) += here->B4SOI_62); (*(here->B4SOIGspPtr) += here->B4SOI_63); } else if (here->B4SOIrgateMod == 1) /* v3.1 for RF */ { *(here->B4SOIGgPtr) += here->B4SOI_64; *(here->B4SOIGdpPtr) += here->B4SOI_65; *(here->B4SOIGspPtr) += here->B4SOI_66; } else /* v3.1 for RF rgateMod == 2 or 3 */ { *(here->B4SOIGgPtr) += here->B4SOI_67; *(here->B4SOIGdpPtr) += here->B4SOI_68; *(here->B4SOIGspPtr) += here->B4SOI_69; } (*(here->B4SOIDPgPtr) += here->B4SOI_70); /* v4.0 */ (*(here->B4SOIDPdpPtr) += here->B4SOI_71); /* v4.0 */ (*(here->B4SOIDPspPtr) -= here->B4SOI_72); (*(here->B4SOIDPdPtr) -= here->B4SOI_73); (*(here->B4SOISPgPtr) += here->B4SOI_74); /* v4.0 */ (*(here->B4SOISPdpPtr) -= here->B4SOI_75); /* v4.0 */ (*(here->B4SOISPspPtr) += here->B4SOI_76); /* v4.0 */ (*(here->B4SOISPsPtr) -= here->B4SOI_77); (*(here->B4SOIDdPtr) += here->B4SOI_78); (*(here->B4SOIDdpPtr) -= here->B4SOI_79); (*(here->B4SOISsPtr) += here->B4SOI_80); (*(here->B4SOISspPtr) -= here->B4SOI_81); if (here->B4SOIbodyMod == 1) { (*(here->B4SOIBpPtr) -= here->B4SOI_82); (*(here->B4SOIPbPtr) += here->B4SOI_83); (*(here->B4SOIPpPtr) += here->B4SOI_84); } /* v4.1 Ig_agbcp2 stamping */ (*(here->B4SOIGgPtr) += here->B4SOI_85); /* FIXME m or not m ?? h_vogt */ if (here->B4SOIbodyMod == 1) { (*(here->B4SOIPpPtr) -= here->B4SOI_86); (*(here->B4SOIPgPtr) -= here->B4SOI_87); (*(here->B4SOIGpPtr) += here->B4SOI_88); } else if(here->B4SOIbodyMod == 2) { (*(here->B4SOIBbPtr) -= here->B4SOI_89); (*(here->B4SOIBgPtr) -= here->B4SOI_90); (*(here->B4SOIGbPtr) += here->B4SOI_91); } if (here->B4SOINode_sh) /* selfheat */ { (*(here->B4SOIDPtempPtr) += here->B4SOI_92); (*(here->B4SOISPtempPtr) += here->B4SOI_93); (*(here->B4SOIBtempPtr) += here->B4SOI_94); (*(here->B4SOIEtempPtr) +=here->B4SOI_95); (*(here->B4SOIGtempPtr) += here->B4SOI_96); (*(here->B4SOITemptempPtr) += here->B4SOI_97); (*(here->B4SOITempgPtr) += here->B4SOI_98); (*(here->B4SOITempbPtr) += here->B4SOI_99); (*(here->B4SOITempdpPtr) += here->B4SOI_100); (*(here->B4SOITempspPtr) += here->B4SOI_101); /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ (*(here->B4SOITempePtr) += here->B4SOI_102); } if (here->B4SOIdebugMod != 0) { *(here->B4SOIVbsPtr) += 1; *(here->B4SOIIdsPtr) += 1; *(here->B4SOIIcPtr) += 1; *(here->B4SOIIbsPtr) += 1; *(here->B4SOIIbdPtr) += 1; *(here->B4SOIIiiPtr) += 1; *(here->B4SOIIgPtr) += 1; *(here->B4SOIGiggPtr) += 1; *(here->B4SOIGigdPtr) += 1; *(here->B4SOIGigbPtr) += 1; *(here->B4SOIIgidlPtr) += 1; *(here->B4SOIItunPtr) += 1; *(here->B4SOIIbpPtr) += 1; *(here->B4SOICbgPtr) += 1; *(here->B4SOICbbPtr) += 1; *(here->B4SOICbdPtr) += 1; *(here->B4SOIQbfPtr) += 1; *(here->B4SOIQjsPtr) += 1; *(here->B4SOIQjdPtr) += 1; } } } #endif ngspice-26/src/spicelib/devices/bsimsoi/b4soiask.c0000644000265600020320000002745512264261473021601 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soiask.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soiask.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOIask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B4SOIinstance *here = (B4SOIinstance*)inst; NG_IGNORE(select); switch(which) { case B4SOI_L: value->rValue = here->B4SOIl; return(OK); case B4SOI_W: value->rValue = here->B4SOIw; return(OK); case B4SOI_M: value->rValue = here->B4SOIm; return(OK); case B4SOI_AS: value->rValue = here->B4SOIsourceArea; return(OK); case B4SOI_AD: value->rValue = here->B4SOIdrainArea; return(OK); case B4SOI_PS: value->rValue = here->B4SOIsourcePerimeter; return(OK); case B4SOI_PD: value->rValue = here->B4SOIdrainPerimeter; return(OK); case B4SOI_NRS: value->rValue = here->B4SOIsourceSquares; return(OK); case B4SOI_NRD: value->rValue = here->B4SOIdrainSquares; return(OK); case B4SOI_OFF: value->iValue = here->B4SOIoff; return(OK); case B4SOI_BJTOFF: value->iValue = here->B4SOIbjtoff; return(OK); case B4SOI_RTH0: value->rValue = here->B4SOIrth0; return(OK); case B4SOI_CTH0: value->rValue = here->B4SOIcth0; return(OK); case B4SOI_NRB: value->rValue = here->B4SOIbodySquares; return(OK); case B4SOI_FRBODY: value->rValue = here->B4SOIfrbody; return(OK); case B4SOI_QB: value->rValue = here->B4SOIqbulk; return(OK); case B4SOI_QD: value->rValue = here->B4SOIqdrn; return(OK); case B4SOI_QS: value->rValue = here->B4SOIqsrc; return(OK); case B4SOI_CGG: value->rValue = here->B4SOIcggb; return(OK); case B4SOI_CGD: value->rValue = here->B4SOIcgdb; return(OK); case B4SOI_CGS: value->rValue = here->B4SOIcgsb; return(OK); case B4SOI_CDG: value->rValue = here->B4SOIcdgb; return(OK); case B4SOI_CDD: value->rValue = here->B4SOIcddb; return(OK); case B4SOI_CDS: value->rValue = here->B4SOIcdsb; return(OK); case B4SOI_CBG: value->rValue = here->B4SOIcbgb; return(OK); case B4SOI_CBD: value->rValue = here->B4SOIcbdb; return(OK); case B4SOI_CBS: value->rValue = here->B4SOIcbsb; return(OK); case B4SOI_CAPBD: value->rValue = here->B4SOIcapbd; return(OK); case B4SOI_CAPBS: value->rValue = here->B4SOIcapbs; return(OK); /* v4.0 */ case B4SOI_RBSB: value->rValue = here->B4SOIrbsb; return(OK); case B4SOI_RBDB: value->rValue = here->B4SOIrbdb; return(OK); case B4SOI_CJSB: value->rValue = here->B4SOIcjsb; return(OK); case B4SOI_CJDB: value->rValue = here->B4SOIcjdb; return(OK); case B4SOI_SA: value->rValue = here->B4SOIsa ; return(OK); case B4SOI_SB: value->rValue = here->B4SOIsb ; return(OK); case B4SOI_SD: value->rValue = here->B4SOIsd ; return(OK); case B4SOI_RBODYMOD: value->iValue = here->B4SOIrbodyMod; return(OK); case B4SOI_NF: value->rValue = here->B4SOInf; return(OK); case B4SOI_DELVTO: value->rValue = here->B4SOIdelvto; return(OK); /* v4.0 end */ /* v3.2 */ case B4SOI_SOIMOD: value->iValue = here->B4SOIsoiMod; return(OK); /* v3.1 added rgate */ case B4SOI_RGATEMOD: value->iValue = here->B4SOIrgateMod; return(OK); /* v3.1 added rgate end */ /* v2.0 release */ case B4SOI_NBC: value->rValue = here->B4SOInbc; return(OK); case B4SOI_NSEG: value->rValue = here->B4SOInseg; return(OK); case B4SOI_PDBCP: value->rValue = here->B4SOIpdbcp; return(OK); case B4SOI_PSBCP: value->rValue = here->B4SOIpsbcp; return(OK); case B4SOI_AGBCP: value->rValue = here->B4SOIagbcp; return(OK); case B4SOI_AGBCP2: value->rValue = here->B4SOIagbcp2; return(OK); /* v4.1 for BC improvement */ case B4SOI_AGBCPD: /* v4.0 */ value->rValue = here->B4SOIagbcpd; return(OK); case B4SOI_AEBCP: value->rValue = here->B4SOIaebcp; return(OK); case B4SOI_VBSUSR: value->rValue = here->B4SOIvbsusr; return(OK); case B4SOI_TNODEOUT: value->iValue = here->B4SOItnodeout; return(OK); case B4SOI_IC_VBS: value->rValue = here->B4SOIicVBS; return(OK); case B4SOI_IC_VDS: value->rValue = here->B4SOIicVDS; return(OK); case B4SOI_IC_VGS: value->rValue = here->B4SOIicVGS; return(OK); case B4SOI_IC_VES: value->rValue = here->B4SOIicVES; return(OK); case B4SOI_IC_VPS: value->rValue = here->B4SOIicVPS; return(OK); case B4SOI_DNODE: value->iValue = here->B4SOIdNode; return(OK); case B4SOI_GNODE: value->iValue = here->B4SOIgNode; return(OK); case B4SOI_SNODE: value->iValue = here->B4SOIsNode; return(OK); case B4SOI_BNODE: value->iValue = here->B4SOIbNode; return(OK); case B4SOI_ENODE: value->iValue = here->B4SOIeNode; return(OK); case B4SOI_DNODEPRIME: value->iValue = here->B4SOIdNodePrime; return(OK); case B4SOI_SNODEPRIME: value->iValue = here->B4SOIsNodePrime; return(OK); /* v3.1 added for RF */ case B4SOI_GNODEEXT: value->iValue = here->B4SOIgNodeExt; return(OK); case B4SOI_GNODEMID: value->iValue = here->B4SOIgNodeMid; return(OK); /* added for RF end*/ case B4SOI_SOURCECONDUCT: value->rValue = here->B4SOIsourceConductance; value->rValue *= here->B4SOIm; return(OK); case B4SOI_DRAINCONDUCT: value->rValue = here->B4SOIdrainConductance; value->rValue *= here->B4SOIm; return(OK); case B4SOI_VBD: value->rValue = *(ckt->CKTstate0 + here->B4SOIvbd); return(OK); case B4SOI_VBS: value->rValue = *(ckt->CKTstate0 + here->B4SOIvbs); return(OK); case B4SOI_VGS: value->rValue = *(ckt->CKTstate0 + here->B4SOIvgs); return(OK); case B4SOI_VES: value->rValue = *(ckt->CKTstate0 + here->B4SOIves); return(OK); case B4SOI_VDS: value->rValue = *(ckt->CKTstate0 + here->B4SOIvds); return(OK); case B4SOI_CD: value->rValue = here->B4SOIcdrain; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IBS: value->rValue = here->B4SOIibs; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IBD: value->rValue = here->B4SOIibd; value->rValue *= here->B4SOIm; return(OK); case B4SOI_ISUB: value->rValue = here->B4SOIiii; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IGIDL: value->rValue = here->B4SOIigidl; return(OK); case B4SOI_IGISL: value->rValue = here->B4SOIigisl; return(OK); case B4SOI_IGS: value->rValue = here->B4SOIIgs; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IGD: value->rValue = here->B4SOIIgd; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IGB: value->rValue = here->B4SOIIgb; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IGCS: value->rValue = here->B4SOIIgcs; value->rValue *= here->B4SOIm; return(OK); case B4SOI_IGCD: value->rValue = here->B4SOIIgcd; value->rValue *= here->B4SOIm; return(OK); case B4SOI_GM: value->rValue = here->B4SOIgm; value->rValue *= here->B4SOIm; return(OK); case B4SOI_GMID: value->rValue = here->B4SOIgm/here->B4SOIcd; return(OK); case B4SOI_GDS: value->rValue = here->B4SOIgds; value->rValue *= here->B4SOIm; return(OK); case B4SOI_GMBS: value->rValue = here->B4SOIgmbs; value->rValue *= here->B4SOIm; return(OK); case B4SOI_GBD: value->rValue = here->B4SOIgjdb; value->rValue *= here->B4SOIm; return(OK); case B4SOI_GBS: value->rValue = here->B4SOIgjsb; value->rValue *= here->B4SOIm; return(OK); case B4SOI_CQB: value->rValue = *(ckt->CKTstate0 + here->B4SOIcqb); return(OK); case B4SOI_CQG: value->rValue = *(ckt->CKTstate0 + here->B4SOIcqg); return(OK); case B4SOI_CQD: value->rValue = *(ckt->CKTstate0 + here->B4SOIcqd); return(OK); case B4SOI_CBDB: value->rValue = here->B4SOIcbdb; value->rValue *= here->B4SOIm; return(OK); case B4SOI_CBSB: value->rValue = here->B4SOIcbsb; value->rValue *= here->B4SOIm; return(OK); case B4SOI_VON: value->rValue = here->B4SOIvon; value->rValue *= here->B4SOIm; return(OK); case B4SOI_VDSAT: value->rValue = here->B4SOIvdsat; value->rValue *= here->B4SOIm; return(OK); case B4SOI_QBS: value->rValue = *(ckt->CKTstate0 + here->B4SOIqbs); return(OK); case B4SOI_QBD: value->rValue = *(ckt->CKTstate0 + here->B4SOIqbd); return(OK); #ifdef B4SOI_DEBUG_OUT case B4SOI_DEBUG1: value->rValue = here->B4SOIdebug1; return(OK); case B4SOI_DEBUG2: value->rValue = here->B4SOIdebug2; return(OK); case B4SOI_DEBUG3: value->rValue = here->B4SOIdebug3; return(OK); #endif default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsimsoi/b4soiacld.c0000644000265600020320000010010612264261473021707 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soiacld.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. * File: b4soiacld.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOIacLoad( GENmodel *inModel, CKTcircuit *ckt) { register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; register int selfheat; double xcggb, xcgdb, xcgsb, xcgeb, xcgT; double xcdgb, xcddb, xcdsb, xcdeb, xcdT; double xcsgb, xcsdb, xcssb, xcseb, xcsT; double xcbgb, xcbdb, xcbsb, xcbeb, xcbT; double xcegb, xceeb, xceT; double gdpr, gspr, gds; double cggb, cgdb, cgsb, cgT; double cdgb, cddb, cdsb, cdeb, cdT; double cbgb, cbdb, cbsb, cbeb, cbT; double ceeb, ceT; double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs, GmT; double omega; double dxpart, sxpart; double gbbg, gbbdp, gbbb, gbbp, gbbsp, gbbT; double gddpg, gddpdp, gddpsp, gddpb, gddpT; double gsspg, gsspdp, gsspsp, gsspb, gsspT; double gppb, gppp; double xcTt, cTt, gTtt, gTtg, gTtb, gTtdp, gTtsp; double EDextrinsicCap, ESextrinsicCap; double xcedb, xcesb; /* v3.0 */ double Gme, gddpe, gsspe, gbbe, gTte; /* v3.1 added variables for RF */ double T0=0.0; double gcrgd, gcrgg, gcrgs, gcrgb, gcrg; double xcgmgmb, xcgmdb, xcgmsb, xcgmeb, xcdgmb, xcsgmb, xcegmb; double geltd; double gigg, gigd, gigs, gigb, gige, gigT; double gigpg, gigpp; /* v3.1.1 bug fix */ double gIstotg, gIstotd, gIstotb, gIstots; double gIdtotg, gIdtotd, gIdtotb, gIdtots; double gIgtotg, gIgtotd, gIgtotb, gIgtots; /* v4.0 */ double xcdbb, xcsbb, xcdbdb, xcsbsb, xcjdbdp, xcjsbsp; double gstot, gstotd, gstotg, gstots, gstotb; double gdtot, gdtotd, gdtotg, gdtots, gdtotb; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here!= NULL; here = here->B4SOInextInstance) { selfheat = (model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0); if (here->B4SOImode >= 0) { Gm = here->B4SOIgm; Gmbs = here->B4SOIgmbs; /* v3.0 */ Gme = here->B4SOIgme; GmT = model->B4SOItype * here->B4SOIgmT; FwdSum = Gm + Gmbs + Gme; /* v3.0 */ RevSum = 0.0; cbgb = here->B4SOIcbgb; cbsb = here->B4SOIcbsb; cbdb = here->B4SOIcbdb; cbeb = here->B4SOIcbeb; cbT = model->B4SOItype * here->B4SOIcbT; ceeb = here->B4SOIceeb; ceT = model->B4SOItype * here->B4SOIceT; cggb = here->B4SOIcggb; cgsb = here->B4SOIcgsb; cgdb = here->B4SOIcgdb; cgT = model->B4SOItype * here->B4SOIcgT; cdgb = here->B4SOIcdgb; cdsb = here->B4SOIcdsb; cddb = here->B4SOIcddb; cdeb = here->B4SOIcdeb; cdT = model->B4SOItype * here->B4SOIcdT; cTt = here->pParam->B4SOIcth; /* v3.1 bug fix */ gigg = here->B4SOIgigg; gigb = here->B4SOIgigb; gige = here->B4SOIgige; gigs = here->B4SOIgigs; gigd = here->B4SOIgigd; gigT = model->B4SOItype * here->B4SOIgigT; /* v4.1 */ gigpg = here->B4SOIgigpg; gigpp = here->B4SOIgigpp; gbbg = -here->B4SOIgbgs; gbbdp = -here->B4SOIgbds; gbbb = -here->B4SOIgbbs; gbbp = -here->B4SOIgbps; gbbT = -model->B4SOItype * here->B4SOIgbT; gbbe = -here->B4SOIgbes; if (here->B4SOIrbodyMod) { /* v4.0 */ gbbdp = -here->B4SOIgiigidld; gbbb = -here->B4SOIgbgiigbpb; } gbbsp = - ( gbbg + gbbdp + gbbb + gbbp + gbbe); gddpg = -here->B4SOIgjdg; gddpdp = -here->B4SOIgjdd; if (!here->B4SOIrbodyMod) /* v4.0 */ gddpb = -here->B4SOIgjdb; else gddpb = here->B4SOIgiigidlb; gddpT = -model->B4SOItype * here->B4SOIgjdT; /* v3.0 */ gddpe = -here->B4SOIgjde; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B4SOIgjsg; gsspdp = -here->B4SOIgjsd; if (!here->B4SOIrbodyMod) /* v4.0 */ gsspb = -here->B4SOIgjsb; else gsspb = 0.0; gsspT = -model->B4SOItype * here->B4SOIgjsT; gsspe = 0.0; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppb = -here->B4SOIgbpbs; gppp = -here->B4SOIgbpps; gTtg = here->B4SOIgtempg; gTtb = here->B4SOIgtempb; gTtdp = here->B4SOIgtempd; gTtt = here->B4SOIgtempT; /* v3.0 */ gTte = here->B4SOIgtempe; gTtsp = - (gTtg + gTtb + gTtdp + gTte); /* v3.1.1 bug fix */ if (model->B4SOIigcMod) { gIstotg = here->B4SOIgIgsg + here->B4SOIgIgcsg; gIstotd = here->B4SOIgIgcsd; gIstots = here->B4SOIgIgss + here->B4SOIgIgcss; gIstotb = here->B4SOIgIgcsb; gIdtotg = here->B4SOIgIgdg + here->B4SOIgIgcdg; gIdtotd = here->B4SOIgIgdd + here->B4SOIgIgcdd; gIdtots = here->B4SOIgIgcds; gIdtotb = here->B4SOIgIgcdb; gIgtotg = gIstotg + gIdtotg; gIgtotd = gIstotd + gIdtotd; gIgtots = gIstots + gIdtots; gIgtotb = gIstotb + gIdtotb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; } sxpart = 0.6; dxpart = 0.4; /* v3.1 for RF */ if (here->B4SOIrgateMod == 2) T0 = *(ckt->CKTstates[0] + here->B4SOIvges) - *(ckt->CKTstates[0] + here->B4SOIvgs); else if (here->B4SOIrgateMod == 3) T0 = *(ckt->CKTstates[0] + here->B4SOIvgms) - *(ckt->CKTstates[0] + here->B4SOIvgs); if (here->B4SOIrgateMod > 1) { gcrgd = here->B4SOIgcrgd * T0; gcrgg = here->B4SOIgcrgg * T0; gcrgs = here->B4SOIgcrgs * T0; gcrgb = here->B4SOIgcrgb * T0; gcrgg -= here->B4SOIgcrg; gcrg = here->B4SOIgcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; /* v3.1 for RF end*/ } else { Gm = -here->B4SOIgm; Gmbs = -here->B4SOIgmbs; /* v3.0 */ Gme = -here->B4SOIgme; GmT = -model->B4SOItype * here->B4SOIgmT; FwdSum = 0.0; RevSum = -Gm - Gmbs - Gme; /* v3.0 */ cdgb = - (here->B4SOIcdgb + here->B4SOIcggb + here->B4SOIcbgb); cdsb = - (here->B4SOIcddb + here->B4SOIcgdb + here->B4SOIcbdb); cddb = - (here->B4SOIcdsb + here->B4SOIcgsb + here->B4SOIcbsb); cdeb = - (here->B4SOIcdeb + here->B4SOIcbeb + here->B4SOIceeb); cdT = - model->B4SOItype * (here->B4SOIcgT + here->B4SOIcbT + here->B4SOIcdT + here->B4SOIceT); ceeb = here->B4SOIceeb; ceT = model->B4SOItype * here->B4SOIceT; cggb = here->B4SOIcggb; cgsb = here->B4SOIcgdb; cgdb = here->B4SOIcgsb; cgT = model->B4SOItype * here->B4SOIcgT; cbgb = here->B4SOIcbgb; cbsb = here->B4SOIcbdb; cbdb = here->B4SOIcbsb; cbeb = here->B4SOIcbeb; cbT = model->B4SOItype * here->B4SOIcbT; cTt = here->pParam->B4SOIcth; /* v3.1 bug fix */ gigg = here->B4SOIgigg; gigb = here->B4SOIgigb; gige = here->B4SOIgige; gigs = here->B4SOIgigd; /* v3.1.1 bug fix */ gigd = here->B4SOIgigs; /* v3.1.1 bug fix */ gigT = model->B4SOItype * here->B4SOIgigT; gigpg = here->B4SOIgigpg;/* bugfix_snps for setting gigpg gigpp*/ gigpp = here->B4SOIgigpp; gbbg = -here->B4SOIgbgs; gbbb = -here->B4SOIgbbs; gbbp = -here->B4SOIgbps; gbbsp = -here->B4SOIgbds; gbbT = -model->B4SOItype * here->B4SOIgbT; /* v3.0 */ gbbe = -here->B4SOIgbes; if (here->B4SOIrbodyMod) { /* v4.0 */ gbbsp = -here->B4SOIgiigidld; gbbb = -here->B4SOIgbgiigbpb; } gbbdp = - ( gbbg + gbbsp + gbbb + gbbp + gbbe); gddpg = -here->B4SOIgjsg; gddpsp = -here->B4SOIgjsd; if (!here->B4SOIrbodyMod) /* v4.0 */ gddpb = -here->B4SOIgjsb; else gddpb = 0.0; gddpT = -model->B4SOItype * here->B4SOIgjsT; /* v3.0 */ gddpe = 0.0; gddpdp = - (gddpg + gddpsp + gddpb + gddpe ); gsspg = -here->B4SOIgjdg; gsspsp = -here->B4SOIgjdd; if (!here->B4SOIrbodyMod) /* v4.0 */ gsspb = -here->B4SOIgjdb; else gsspb = here->B4SOIgiigidlb; gsspT = -model->B4SOItype * here->B4SOIgjdT; /* v3.0 */ gsspe = -here->B4SOIgjde; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe ); gppb = -here->B4SOIgbpbs; gppp = -here->B4SOIgbpps; gTtg = here->B4SOIgtempg; gTtb = here->B4SOIgtempb; gTtsp = here->B4SOIgtempd; gTtt = here->B4SOIgtempT; /* v3.0 */ gTte = here->B4SOIgtempe; gTtdp = - (gTtg + gTtb + gTtsp + gTte); /* v3.1.1 bug fix */ if (model->B4SOIigcMod) { gIstotg = here->B4SOIgIgsg + here->B4SOIgIgcdg; gIstotd = here->B4SOIgIgcds; gIstots = here->B4SOIgIgss + here->B4SOIgIgcdd; gIstotb = here->B4SOIgIgcdb; gIdtotg = here->B4SOIgIgdg + here->B4SOIgIgcsg; gIdtotd = here->B4SOIgIgdd + here->B4SOIgIgcss; gIdtots = here->B4SOIgIgcsd; gIdtotb = here->B4SOIgIgcsb; gIgtotg = gIstotg + gIdtotg; gIgtotd = gIstotd + gIdtotd; gIgtots = gIstots + gIdtots; gIgtotb = gIstotb + gIdtotb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; } sxpart = 0.4; dxpart = 0.6; /* v3.1 for RF */ if (here->B4SOIrgateMod == 2) T0 = *(ckt->CKTstates[0] + here->B4SOIvges) - *(ckt->CKTstates[0] + here->B4SOIvgs); else if (here->B4SOIrgateMod == 3) T0 = *(ckt->CKTstates[0] + here->B4SOIvgms) - *(ckt->CKTstates[0] + here->B4SOIvgs); if (here->B4SOIrgateMod > 1) { gcrgd = here->B4SOIgcrgs * T0; gcrgg = here->B4SOIgcrgg * T0; gcrgs = here->B4SOIgcrgd * T0; gcrgb = here->B4SOIgcrgb * T0; gcrgg -= here->B4SOIgcrg; gcrg = here->B4SOIgcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; /* v3.1 RF end*/ } if (!model->B4SOIrdsMod) { gdpr=here->B4SOIdrainConductance; gspr=here->B4SOIsourceConductance; } else gdpr = gspr = 0.0; gds= here->B4SOIgds; GSoverlapCap = here->B4SOIcgso; GDoverlapCap = here->B4SOIcgdo; GEoverlapCap = here->pParam->B4SOIcgeo; EDextrinsicCap = here->B4SOIgcde; ESextrinsicCap = here->B4SOIgcse; /* v3.1 added for RF */ if (here->B4SOIrgateMod == 3) { xcgmgmb = (GDoverlapCap + GSoverlapCap + GEoverlapCap ) * omega; xcgmdb = -GDoverlapCap * omega; xcgmsb = -GSoverlapCap * omega; xcgmeb = -GEoverlapCap * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcegmb = xcgmeb; xcedb = -EDextrinsicCap * omega; xcdeb = (cdeb - EDextrinsicCap) * omega; xcddb = (cddb + GDoverlapCap + EDextrinsicCap) * omega; xceeb = (ceeb + GEoverlapCap + EDextrinsicCap + ESextrinsicCap) * omega; xcesb = -ESextrinsicCap * omega; xcssb = (GSoverlapCap + ESextrinsicCap - (cgsb + cbsb + cdsb)) * omega; xcseb = -(cbeb + cdeb + ceeb + ESextrinsicCap) * omega; xcegb = 0; /* v3.1 change for RF */ xceT = ceT * omega; xcggb = here->B4SOIcggb * omega; xcgdb = cgdb * omega; xcgsb = cgsb * omega; xcgeb = 0; xcgT = cgT * omega; xcdgb = cdgb * omega; xcdsb = cdsb * omega; xcdT = cdT * omega; xcsgb = -(cggb + cbgb + cdgb) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcsT = -(cgT + cbT + cdT + ceT) * omega; xcbgb = cbgb * omega; xcbdb = cbdb * omega; xcbsb = cbsb * omega; xcbeb = cbeb * omega; xcbT = cbT * omega; xcTt = cTt * omega; } else { xcedb = -EDextrinsicCap * omega; xcdeb = (cdeb - EDextrinsicCap) * omega; xcddb = (cddb + GDoverlapCap + EDextrinsicCap) * omega; xceeb = (ceeb + GEoverlapCap + EDextrinsicCap + ESextrinsicCap) * omega; xcesb = -ESextrinsicCap * omega; xcssb = (GSoverlapCap + ESextrinsicCap - (cgsb + cbsb + cdsb)) * omega; xcseb = -(cbeb + cdeb + ceeb + ESextrinsicCap) * omega; xcegb = (- GEoverlapCap) * omega; xceT = ceT * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcgeb = (- GEoverlapCap) * omega; xcgT = cgT * omega; xcdgb = (cdgb - GDoverlapCap) * omega; xcdsb = cdsb * omega; xcdT = cdT * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcsT = -(cgT + cbT + cdT + ceT) * omega; xcbgb = cbgb * omega; xcbdb = cbdb * omega; xcbsb = cbsb * omega; xcbeb = cbeb * omega; xcbT = cbT * omega; xcTt = cTt * omega; /* v3.1 */ xcdgmb = xcsgmb = xcegmb = 0.0; xcgmgmb = xcgmdb = xcgmsb = xcgmeb =0.0; } if (here->B4SOImode >= 0) { /* v4.0 */ if (!here->B4SOIrbodyMod) { xcjdbdp = xcjsbsp = 0.0; xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb + xcdeb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb + xcseb); xcdbdb = 0.0; xcsbsb = 0.0; xcbdb = here->B4SOIcbdb * omega; xcbsb = here->B4SOIcbsb * omega; } else { xcjdbdp = here->B4SOIcjdb * omega; xcjsbsp = here->B4SOIcjsb * omega; xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb + xcdeb) + xcjdbdp; xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb + xcseb) + xcjsbsp; xcdbdb = -here->B4SOIcjdb * omega; xcsbsb = -here->B4SOIcjsb * omega; xcbdb = here->B4SOIcbdb * omega - xcdbdb; xcbsb = here->B4SOIcbsb * omega - xcsbsb; } } else { if (!here->B4SOIrbodyMod) { xcjdbdp = xcjsbsp = 0.0; xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb + xcdeb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb + xcseb); xcdbdb = 0.0; xcsbsb = 0.0; xcbdb = here->B4SOIcbsb * omega; xcbsb = here->B4SOIcbdb * omega; } else { xcjdbdp = here->B4SOIcjsb * omega; xcjsbsp = here->B4SOIcjdb * omega; xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb + xcdeb) + xcjdbdp; xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb + xcseb) + xcjsbsp; xcdbdb = -here->B4SOIcjsb * omega; xcsbsb = -here->B4SOIcjdb * omega; xcbdb = here->B4SOIcbsb * omega - xcdbdb; xcbsb = here->B4SOIcbdb * omega - xcsbsb; } } if (model->B4SOIrdsMod == 1) { gstot = here->B4SOIgstot; gstotd = here->B4SOIgstotd; gstotg = here->B4SOIgstotg; gstots = here->B4SOIgstots - gstot; gstotb = here->B4SOIgstotb; gdtot = here->B4SOIgdtot; gdtotd = here->B4SOIgdtotd - gdtot; gdtotg = here->B4SOIgdtotg; gdtots = here->B4SOIgdtots; gdtotb = here->B4SOIgdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } m = here->B4SOIm; /* v3.1 for RF */ geltd = here->B4SOIgrgeltd; if (here->B4SOIrgateMod == 1) { *(here->B4SOIGEgePtr) += m * geltd; *(here->B4SOIGgePtr) -= m * geltd; *(here->B4SOIGEgPtr) -= m * geltd; *(here->B4SOIGgPtr) += m * (geltd + gigg + gIgtotg); /* v3.1.1 bug fix */ *(here->B4SOIGdpPtr) += m * (gigd + gIgtotd); /* v3.1.1 bug fix */ *(here->B4SOIGspPtr) += m * (gigs + gIgtots); /* v3.1.1 bug fix */ if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGbPtr) -= m * (-gigb - gIgtotb); /* v3.1.1 bug fix */ } else if (here->B4SOIrgateMod == 2) { *(here->B4SOIGEgePtr) += m * gcrg; *(here->B4SOIGEgPtr) += m * gcrgg; *(here->B4SOIGEdpPtr) += m * gcrgd; *(here->B4SOIGEspPtr) += m * gcrgs; if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGEbPtr) += m * gcrgb; *(here->B4SOIGgePtr) -= m * gcrg; *(here->B4SOIGgPtr) -= m * (gcrgg - gigg - gIgtotg); /* v3.1.1 bug fix */ *(here->B4SOIGdpPtr) -= m * (gcrgd - gigd - gIgtotd); /* v3.1.1 bug fix */ *(here->B4SOIGspPtr) -= m * (gcrgs - gigs - gIgtots); /* v3.1.1 bug fix */ if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGbPtr) -= m * (gcrgb - gigb - gIgtotb); /* v3.1.1 bug fix */ } else if (here->B4SOIrgateMod == 3) { *(here->B4SOIGEgePtr) += m * geltd; *(here->B4SOIGEgmPtr) -= m * geltd; *(here->B4SOIGMgePtr) -= m * geltd; *(here->B4SOIGMgmPtr) += m * (geltd + gcrg); *(here->B4SOIGMgmPtr +1) += m * xcgmgmb; *(here->B4SOIGMdpPtr) += m * gcrgd; *(here->B4SOIGMdpPtr +1) += m * xcgmdb; *(here->B4SOIGMgPtr) += m * gcrgg; *(here->B4SOIGMspPtr) += m * gcrgs; *(here->B4SOIGMspPtr +1) += m * xcgmsb; if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGMbPtr) += m * gcrgb; *(here->B4SOIGMePtr +1) += m * xcgmeb; *(here->B4SOIDPgmPtr +1) += m * xcdgmb; *(here->B4SOIGgmPtr) -= m * gcrg; *(here->B4SOISPgmPtr +1) += m * xcsgmb; *(here->B4SOIEgmPtr +1) += m * xcegmb; *(here->B4SOIGgPtr) -= m * (gcrgg - gigg - gIgtotg); /* v3.1.1 bug fix */ *(here->B4SOIGdpPtr) -= m * (gcrgd - gigd - gIgtotd); /* v3.1.1 bug fix */ *(here->B4SOIGspPtr) -= m * (gcrgs - gigs - gIgtots); /* v3.1.1 bug fix */ if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGbPtr) -= m * (gcrgb - gigb - gIgtotb); /* v3.1.1 bug fix */ } else { *(here->B4SOIGgPtr) += m * (gigg + gIgtotg); /* v3.1.1 bug fix */ *(here->B4SOIGdpPtr) += m * (gigd + gIgtotd); /* v3.1.1 bug fix */ *(here->B4SOIGspPtr) += m * (gigs + gIgtots); /* v3.1.1 bug fix */ if (here->B4SOIsoiMod != 2) /* v3.2 */ *(here->B4SOIGbPtr) += m * (gigb + gIgtotb); /* v3.1.1 bug fix */ } /* v3.1 for RF end*/ if (model->B4SOIrdsMod) { (*(here->B4SOIDgPtr) += m * gdtotg); (*(here->B4SOIDspPtr) += m * gdtots); (*(here->B4SOISdpPtr) += m * gstotd); (*(here->B4SOISgPtr) += m * gstotg); if (here->B4SOIsoiMod != 2) { (*(here->B4SOIDbPtr) += m * gdtotb); (*(here->B4SOISbPtr) += m * gstotb); } } *(here->B4SOIEdpPtr +1) += m * xcedb; *(here->B4SOIEspPtr +1) += m * xcesb; *(here->B4SOIDPePtr +1) += m * xcdeb; *(here->B4SOISPePtr +1) += m * xcseb; *(here->B4SOIEgPtr +1) += m * xcegb; *(here->B4SOIGePtr +1) += m * xcgeb; *(here->B4SOIEePtr +1) += m * xceeb; *(here->B4SOIGgPtr +1) += m * xcggb; *(here->B4SOIGdpPtr +1) += m * xcgdb; *(here->B4SOIGspPtr +1) += m * xcgsb; *(here->B4SOIDPgPtr +1) += m * xcdgb; *(here->B4SOIDPdpPtr +1) += m * xcddb; *(here->B4SOIDPspPtr +1) += m * xcdsb; *(here->B4SOISPgPtr +1) += m * xcsgb; *(here->B4SOISPdpPtr +1) += m * xcsdb; *(here->B4SOISPspPtr +1) += m * xcssb; /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { *(here->B4SOIBePtr +1) += m * xcbeb; *(here->B4SOIBgPtr +1) += m * xcbgb; *(here->B4SOIBdpPtr +1) += m * xcbdb; *(here->B4SOIBspPtr +1) += m * xcbsb; *(here->B4SOIEbPtr +1) -= m * (xcegb + xceeb + xcedb + xcesb); *(here->B4SOIGbPtr +1) -= m * (xcggb + xcgdb + xcgsb + xcgeb); /* *(here->B4SOIDPbPtr +1) -= xcdgb + xcddb + xcdsb + xcdeb; + xcdgmb; */ *(here->B4SOIDPbPtr +1) -= m * -xcdbb; /* v4.0 */ /* *(here->B4SOISPbPtr +1) -= xcsgb + xcsdb + xcssb + xcseb + xcsgmb; */ *(here->B4SOISPbPtr +1) -= m * -xcsbb; /* v4.0 */ *(here->B4SOIBbPtr +1) -= m * (xcbgb + xcbdb + xcbsb + xcbeb); } /* v3.1 */ if (selfheat) { *(here->B4SOITemptempPtr + 1) += m * xcTt; *(here->B4SOIDPtempPtr + 1) += m * xcdT; *(here->B4SOISPtempPtr + 1) += m * xcsT; *(here->B4SOIBtempPtr + 1) += m * xcbT; *(here->B4SOIEtempPtr + 1) += m * xceT; *(here->B4SOIGtempPtr + 1) += m * xcgT; } /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ { *(here->B4SOIDPePtr) += m * (Gme + gddpe); *(here->B4SOISPePtr) += m * (gsspe - Gme); if (here->B4SOIsoiMod != 2) /* v3.2 */ { *(here->B4SOIGePtr) += m * gige; *(here->B4SOIBePtr) -= m * gige; } } *(here->B4SOIEePtr) += 0.0; *(here->B4SOIDPgPtr) += m * (Gm + gddpg - gIdtotg -gdtotg); /* v4.0 */ *(here->B4SOIDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum - gIdtotd - gdtotd); /* v4.0 */ *(here->B4SOIDPspPtr) -= m * (gds + FwdSum - gddpsp + gIdtots + gdtots); /* v4.0 */ *(here->B4SOIDPdPtr) -= m * (gdpr + gdtot); *(here->B4SOISPgPtr) -= m * (Gm - gsspg + gIstotg + gstotg); /* v4.0 */ *(here->B4SOISPdpPtr) -= m * (gds + RevSum - gsspdp + gIstotd + gstotd); /* v4.0 */ *(here->B4SOISPspPtr) += m * (gspr + gds + FwdSum + gsspsp - gIstots - gstots); /* v4.0 */ *(here->B4SOISPsPtr) -= m * (gspr + gstot); /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { *(here->B4SOIBePtr) += m * gbbe; /* v3.0 */ *(here->B4SOIBgPtr) += m * (gbbg - gigg); /* v3.1 bug fix */ *(here->B4SOIBdpPtr) += m * (gbbdp - gigd); /* v3.1 bug fix */ *(here->B4SOIBspPtr) += m * (gbbsp - gigs); /* v3.1 bug fix */ *(here->B4SOIBbPtr) += m * (gbbb - gigb); /* v3.1 bug fix */ *(here->B4SOISPbPtr) -= m * (Gmbs - gsspb + gIstotb + gstotb); /* v4.0 */ *(here->B4SOIDPbPtr) -= m * ((-gddpb - Gmbs) + gIdtotb + gdtotb); /* v4.0 */ } /* v3.1 */ if (selfheat) { *(here->B4SOIDPtempPtr) += m * (GmT + gddpT); *(here->B4SOISPtempPtr) += m * (-GmT + gsspT); *(here->B4SOIBtempPtr) += m * (gbbT - gigT); /* v3.1 bug fix */ *(here->B4SOIGtempPtr) += m * gigT; /* v3.1 bug fix */ *(here->B4SOITemptempPtr) += m * (gTtt + 1/here->pParam->B4SOIrth); *(here->B4SOITempgPtr) += m * gTtg; *(here->B4SOITempbPtr) += m * gTtb; *(here->B4SOITempdpPtr) += m * gTtdp; *(here->B4SOITempspPtr) += m * gTtsp; /* v3.0 */ if (here->B4SOIsoiMod != 0) /* v3.2 */ *(here->B4SOITempePtr) += m * gTte; } *(here->B4SOIDdPtr) += m * (gdpr + gdtot); *(here->B4SOIDdpPtr) -= m * (gdpr - gdtotd); *(here->B4SOISsPtr) += m * (gspr + gstot); *(here->B4SOISspPtr) -= m * (gspr -gstots); if (here->B4SOIbodyMod == 1) { (*(here->B4SOIBpPtr) -= m * gppp); (*(here->B4SOIPbPtr) += m * gppb); (*(here->B4SOIPpPtr) += m * gppp); } /* v4.1 Ig_agbcp2 stamping */ (*(here->B4SOIGgPtr) += gigpg); if (here->B4SOIbodyMod == 1) { (*(here->B4SOIPpPtr) -= m * gigpp); (*(here->B4SOIPgPtr) -= m * gigpg); (*(here->B4SOIGpPtr) += m * gigpp); } else if(here->B4SOIbodyMod == 2) { (*(here->B4SOIBbPtr) -= m * gigpp); (*(here->B4SOIBgPtr) -= m * gigpg); (*(here->B4SOIGbPtr) += m * gigpp); } /* v4.0 */ if (here->B4SOIrbodyMod) { (*(here->B4SOIDPdbPtr + 1) -= m * xcjdbdp); (*(here->B4SOIDPdbPtr) -= m * here->B4SOIGGjdb); (*(here->B4SOISPsbPtr + 1) -= m * xcjsbsp); (*(here->B4SOISPsbPtr) -= m * here->B4SOIGGjsb); (*(here->B4SOIDBdpPtr + 1) -= m * xcjdbdp); (*(here->B4SOIDBdpPtr) -= m * here->B4SOIGGjdb); (*(here->B4SOIDBdbPtr + 1) += m * xcjdbdp); (*(here->B4SOIDBdbPtr) += m * (here->B4SOIGGjdb + here->B4SOIgrbdb)); (*(here->B4SOIDBbPtr) -= m * here->B4SOIgrbdb); (*(here->B4SOISBbPtr) -= m * here->B4SOIgrbsb); (*(here->B4SOISBspPtr + 1) -= m * xcjsbsp); (*(here->B4SOISBspPtr) -= m * here->B4SOIGGjsb); (*(here->B4SOISBsbPtr + 1) += m * xcjsbsp); (*(here->B4SOISBsbPtr) += m * (here->B4SOIGGjsb + here->B4SOIgrbsb)); (*(here->B4SOIBdbPtr) -= m * here->B4SOIgrbdb); (*(here->B4SOIBsbPtr) -= m * here->B4SOIgrbsb); (*(here->B4SOIBbPtr) += m * (here->B4SOIgrbsb + here->B4SOIgrbdb)); } if (here->B4SOIdebugMod != 0) { *(here->B4SOIVbsPtr) += 1; *(here->B4SOIIdsPtr) += 1; *(here->B4SOIIcPtr) += 1; *(here->B4SOIIbsPtr) += 1; *(here->B4SOIIbdPtr) += 1; *(here->B4SOIIiiPtr) += 1; *(here->B4SOIIgidlPtr) += 1; *(here->B4SOIItunPtr) += 1; *(here->B4SOIIbpPtr) += 1; *(here->B4SOICbgPtr) += 1; *(here->B4SOICbbPtr) += 1; *(here->B4SOICbdPtr) += 1; *(here->B4SOIQbfPtr) += 1; *(here->B4SOIQjsPtr) += 1; *(here->B4SOIQjdPtr) += 1; } } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/BsimTerms_use0000644000265600020320000000245112264261473022407 0ustar andreasadminThe terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsimsoi/Makefile.am0000644000265600020320000000167412264261473021745 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim4soi.la libbsim4soi_la_SOURCES = \ b4soi.c \ b4soiacld.c \ b4soiask.c \ b4soicheck.c \ b4soicvtest.c \ b4soidel.c \ b4soidest.c \ b4soigetic.c \ b4soild.c \ b4soimask.c \ b4soimdel.c \ b4soimpar.c \ b4soinoi.c \ b4soipar.c \ b4soipzld.c \ b4soiset.c \ b4soisoachk.c \ b4soitemp.c \ b4soitrunc.c \ b4soidef.h \ b4soiext.h \ b4soiinit.c \ b4soiinit.h \ b4soiitf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use ngspice-26/src/spicelib/devices/bsimsoi/b4soidest.c0000644000265600020320000000244312264261473021750 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soidest.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soidest.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "b4soidef.h" #include "ngspice/suffix.h" void B4SOIdestroy( GENmodel **inModel) { B4SOImodel **model = (B4SOImodel**)inModel; B4SOIinstance *here; B4SOIinstance *prev = NULL; B4SOImodel *mod = *model; B4SOImodel *oldmod = NULL; for (; mod ; mod = mod->B4SOInextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = (B4SOIinstance *)NULL; for (here = mod->B4SOIinstances; here; here = here->B4SOInextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsimsoi/Makefile.in0000644000265600020320000004436612264261536021763 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsimsoi DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim4soi_la_LIBADD = am_libbsim4soi_la_OBJECTS = b4soi.lo b4soiacld.lo b4soiask.lo \ b4soicheck.lo b4soicvtest.lo b4soidel.lo b4soidest.lo \ b4soigetic.lo b4soild.lo b4soimask.lo b4soimdel.lo \ b4soimpar.lo b4soinoi.lo b4soipar.lo b4soipzld.lo b4soiset.lo \ b4soisoachk.lo b4soitemp.lo b4soitrunc.lo b4soiinit.lo libbsim4soi_la_OBJECTS = $(am_libbsim4soi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim4soi_la_SOURCES) DIST_SOURCES = $(libbsim4soi_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim4soi.la libbsim4soi_la_SOURCES = \ b4soi.c \ b4soiacld.c \ b4soiask.c \ b4soicheck.c \ b4soicvtest.c \ b4soidel.c \ b4soidest.c \ b4soigetic.c \ b4soild.c \ b4soimask.c \ b4soimdel.c \ b4soimpar.c \ b4soinoi.c \ b4soipar.c \ b4soipzld.c \ b4soiset.c \ b4soisoachk.c \ b4soitemp.c \ b4soitrunc.c \ b4soidef.h \ b4soiext.h \ b4soiinit.c \ b4soiinit.h \ b4soiitf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsimsoi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsimsoi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim4soi.la: $(libbsim4soi_la_OBJECTS) $(libbsim4soi_la_DEPENDENCIES) $(EXTRA_libbsim4soi_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim4soi_la_OBJECTS) $(libbsim4soi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soiacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soiask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soicheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soicvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soidel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soidest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soigetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soiinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soimask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soimdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soimpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soinoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soipar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soipzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soiset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soisoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soitemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soitrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsimsoi/b4soipar.c0000644000265600020320000001743412264261473021601 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soipar.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soipar.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int B4SOIparam( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; B4SOIinstance *here = (B4SOIinstance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case B4SOI_W: here->B4SOIw = value->rValue * scale; here->B4SOIwGiven = TRUE; break; case B4SOI_L: here->B4SOIl = value->rValue * scale; here->B4SOIlGiven = TRUE; break; case B4SOI_M: here->B4SOIm = value->rValue; here->B4SOImGiven = TRUE; break; case B4SOI_AS: here->B4SOIsourceArea = value->rValue * scale * scale; here->B4SOIsourceAreaGiven = TRUE; break; case B4SOI_AD: here->B4SOIdrainArea = value->rValue * scale * scale; here->B4SOIdrainAreaGiven = TRUE; break; case B4SOI_PS: here->B4SOIsourcePerimeter = value->rValue * scale; here->B4SOIsourcePerimeterGiven = TRUE; break; case B4SOI_PD: here->B4SOIdrainPerimeter = value->rValue * scale; here->B4SOIdrainPerimeterGiven = TRUE; break; case B4SOI_NRS: here->B4SOIsourceSquares = value->rValue; here->B4SOIsourceSquaresGiven = TRUE; break; case B4SOI_NRD: here->B4SOIdrainSquares = value->rValue; here->B4SOIdrainSquaresGiven = TRUE; break; case B4SOI_OFF: here->B4SOIoff = value->iValue; here->B4SOIoffGiven = TRUE; break; case B4SOI_IC_VBS: here->B4SOIicVBS = value->rValue; here->B4SOIicVBSGiven = TRUE; break; case B4SOI_IC_VDS: here->B4SOIicVDS = value->rValue; here->B4SOIicVDSGiven = TRUE; break; case B4SOI_IC_VGS: here->B4SOIicVGS = value->rValue; here->B4SOIicVGSGiven = TRUE; break; case B4SOI_IC_VES: here->B4SOIicVES = value->rValue; here->B4SOIicVESGiven = TRUE; break; case B4SOI_IC_VPS: here->B4SOIicVPS = value->rValue; here->B4SOIicVPSGiven = TRUE; break; case B4SOI_BJTOFF: here->B4SOIbjtoff = value->iValue; here->B4SOIbjtoffGiven= TRUE; break; case B4SOI_DEBUG: here->B4SOIdebugMod = value->iValue; here->B4SOIdebugModGiven= TRUE; break; case B4SOI_RTH0: here->B4SOIrth0= value->rValue; here->B4SOIrth0Given = TRUE; break; case B4SOI_CTH0: here->B4SOIcth0= value->rValue; here->B4SOIcth0Given = TRUE; break; case B4SOI_NRB: here->B4SOIbodySquares = value->rValue; here->B4SOIbodySquaresGiven = TRUE; break; case B4SOI_FRBODY: here->B4SOIfrbody = value->rValue; here->B4SOIfrbodyGiven = TRUE; break; /* v4.0 added */ case B4SOI_RBSB: here->B4SOIrbsb = value->rValue; here->B4SOIrbsbGiven = TRUE; break; case B4SOI_RBDB: here->B4SOIrbdb = value->rValue; here->B4SOIrbdbGiven = TRUE; break; case B4SOI_SA: here->B4SOIsa = value->rValue; here->B4SOIsaGiven = TRUE; break; case B4SOI_SB: here->B4SOIsb = value->rValue; here->B4SOIsbGiven = TRUE; break; case B4SOI_SD: here->B4SOIsd = value->rValue; here->B4SOIsdGiven = TRUE; break; case B4SOI_RBODYMOD: here->B4SOIrbodyMod = value->iValue; here->B4SOIrbodyModGiven = TRUE; break; case B4SOI_NF: here->B4SOInf = value->rValue; here->B4SOInfGiven = TRUE; break; case B4SOI_DELVTO: here->B4SOIdelvto = value->rValue; here->B4SOIdelvtoGiven = TRUE; break; /* v4.0 added end */ case B4SOI_SOIMOD: here->B4SOIsoiMod = value->iValue; here->B4SOIsoiModGiven = TRUE; break; /* v3.2 */ /* v3.1 added rgate */ case B4SOI_RGATEMOD: here->B4SOIrgateMod = value->iValue; here->B4SOIrgateModGiven = TRUE; break; /* v3.1 added rgate end */ /* v2.0 release */ case B4SOI_NBC: here->B4SOInbc = value->rValue; here->B4SOInbcGiven = TRUE; break; case B4SOI_NSEG: here->B4SOInseg = value->rValue; here->B4SOInsegGiven = TRUE; break; case B4SOI_PDBCP: here->B4SOIpdbcp = value->rValue; here->B4SOIpdbcpGiven = TRUE; break; case B4SOI_PSBCP: here->B4SOIpsbcp = value->rValue; here->B4SOIpsbcpGiven = TRUE; break; case B4SOI_AGBCP: here->B4SOIagbcp = value->rValue; here->B4SOIagbcpGiven = TRUE; break; case B4SOI_AGBCP2: here->B4SOIagbcp2 = value->rValue; here->B4SOIagbcp2Given = TRUE; break; /* v4.1 */ case B4SOI_AGBCPD: here->B4SOIagbcpd = value->rValue; here->B4SOIagbcpdGiven = TRUE; break; case B4SOI_AEBCP: here->B4SOIaebcp = value->rValue; here->B4SOIaebcpGiven = TRUE; break; case B4SOI_VBSUSR: here->B4SOIvbsusr = value->rValue; here->B4SOIvbsusrGiven = TRUE; break; case B4SOI_TNODEOUT: here->B4SOItnodeout = value->iValue; here->B4SOItnodeoutGiven = TRUE; break; case B4SOI_IC: switch(value->v.numValue){ case 5: here->B4SOIicVPS = *(value->v.vec.rVec+4); here->B4SOIicVPSGiven = TRUE; break; /* v4.2 bugfix */ case 4: here->B4SOIicVES = *(value->v.vec.rVec+3); here->B4SOIicVESGiven = TRUE; break; /* v4.2 bugfix */ case 3: here->B4SOIicVBS = *(value->v.vec.rVec+2); here->B4SOIicVBSGiven = TRUE; break; /* v4.2 bugfix */ case 2: here->B4SOIicVGS = *(value->v.vec.rVec+1); here->B4SOIicVGSGiven = TRUE; break; /* v4.2 bugfix */ case 1: here->B4SOIicVDS = *(value->v.vec.rVec); here->B4SOIicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soiset.c0000644000265600020320000032345312264261473021613 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soiset.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * Authors: 2009- Tanvir Morshed, Ali Niknejad, Chenming Hu. * File: b4soiset.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 04/27/2010 * Modified by Tanvir Morshed 12/16/2010 **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 #define EPS0 8.85418e-12 double epsrox, toxe, epssub; double NchMax; /* v4.4 */ int B4SOIsetup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { register B4SOImodel *model = (B4SOImodel*)inModel; register B4SOIinstance *here; int error; CKTnode *tmp; double Cboxt; /* v3.2 */ double Vbs0t, Qsi; #ifdef USE_OMP unsigned int idx, InstCount; B4SOIinstance **InstArray; #endif /* loop through all the B4SOI device models */ for( ; model != NULL; model = model->B4SOInextModel ) { /* Default value Processing for B4SOI MOSFET Models */ if (!model->B4SOItypeGiven) model->B4SOItype = NMOS; if (!model->B4SOImobModGiven) model->B4SOImobMod = 1; if (!model->B4SOIbinUnitGiven) model->B4SOIbinUnit = 1; if (!model->B4SOIparamChkGiven) model->B4SOIparamChk = 0; if (!model->B4SOIcapModGiven) model->B4SOIcapMod = 2; if (!model->B4SOIiiiModGiven) /* Bug fix #7 Jun 09 'iiimod' with default value added */ model->B4SOIiiiMod = 0; if (!model->B4SOImtrlModGiven) model->B4SOImtrlMod = 0; /*4.1*/ if (!model->B4SOIvgstcvModGiven) /*model->B4SOIvgstcvMod = 0; v4.2 Bugfix */ model->B4SOIvgstcvMod = 1; if (!model->B4SOIgidlModGiven) model->B4SOIgidlMod = 0; if (!model->B4SOIeotGiven) model->B4SOIeot = 100.0e-10; if (!model->B4SOIepsroxGiven) model->B4SOIepsrox = 3.9; if (!model->B4SOIepsrsubGiven) model->B4SOIepsrsub = 11.7; if (!model->B4SOIni0subGiven) model->B4SOIni0sub = 1.45e10; /* unit 1/cm3 */ if (!model->B4SOIbg0subGiven) model->B4SOIbg0sub = 1.16; /* unit eV */ if (!model->B4SOItbgasubGiven) model->B4SOItbgasub = 7.02e-4; if (!model->B4SOItbgbsubGiven) model->B4SOItbgbsub = 1108.0; if (!model->B4SOIleffeotGiven) model->B4SOIleffeot = 1.0; if (!model->B4SOIweffeotGiven) model->B4SOIweffeot = 10.0; if (!model->B4SOIvddeotGiven) model->B4SOIvddeot = (model->B4SOItype == NMOS) ? 1.5 : -1.5; if (!model->B4SOItempeotGiven) model->B4SOItempeot = 300.15; if (!model->B4SOIadosGiven) model->B4SOIados = 1.0; if (!model->B4SOIbdosGiven) model->B4SOIbdos = 1.0; if (!model->B4SOIepsrgateGiven) model->B4SOIepsrgate = 11.7; if (!model->B4SOIphigGiven) model->B4SOIphig = 4.05; if (!model->B4SOIeasubGiven) model->B4SOIeasub = 4.05; /* if (!model->B4SOInoiModGiven) model->B4SOInoiMod = 1; v3.2 */ if (!model->B4SOIshModGiven) model->B4SOIshMod = 0; if (!model->B4SOIversionGiven) model->B4SOIversion = 4.4; if (!model->B4SOItoxGiven) model->B4SOItox = 100.0e-10; /*model->B4SOIcox = 3.453133e-11 / model->B4SOItox;*/ if(model->B4SOImtrlMod) { epsrox = 3.9; toxe = model->B4SOIeot; epssub = EPS0 * model->B4SOIepsrsub; /*model->B4SOIcox = 3.453133e-11 / model->B4SOItox;*/ model->B4SOIcox = epsrox * EPS0 / toxe; } else { epsrox = model->B4SOIepsrox; toxe = model->B4SOItox; epssub = EPSSI; /*model->B4SOIcox = epsrox * EPS0 / toxe;*/ model->B4SOIcox = 3.453133e-11 / model->B4SOItox; } if (!model->B4SOItoxpGiven) model->B4SOItoxp = model->B4SOItox; if (!model->B4SOItoxmGiven) model->B4SOItoxm = model->B4SOItox; /* v3.2 */ /* v3.2 */ if (!model->B4SOIsoiModGiven) model->B4SOIsoiMod = 0; else if ((model->B4SOIsoiMod != 0) && (model->B4SOIsoiMod != 1) && (model->B4SOIsoiMod != 2) && (model->B4SOIsoiMod != 3)) { model->B4SOIsoiMod = 0; printf("Warning: soiMod has been set to its default value: 0.\n"); } /* v3.1 added for RF */ if (!model->B4SOIrgateModGiven) model->B4SOIrgateMod = 0; else if ((model->B4SOIrgateMod != 0) && (model->B4SOIrgateMod != 1) && (model->B4SOIrgateMod != 2) && (model->B4SOIrgateMod != 3)) { model->B4SOIrgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } /* v3.1 added for RF end */ /* v3.2 for noise */ if (!model->B4SOIfnoiModGiven) model->B4SOIfnoiMod = 1; else if ((model->B4SOIfnoiMod != 0) && (model->B4SOIfnoiMod != 1)) { model->B4SOIfnoiMod = 1; printf("Waring: fnoiMod has been set to default value:1.\n"); } if (!model->B4SOItnoiModGiven) model->B4SOItnoiMod = 0; else if ((model->B4SOItnoiMod != 0) && (model->B4SOItnoiMod != 1)&& (model->B4SOItnoiMod != 2)) { model->B4SOItnoiMod = 0; printf("Waring: tnoiMod has been set to default value:0.\n"); } if (!model->B4SOItnoiaGiven) model->B4SOItnoia = 1.5; if (!model->B4SOItnoibGiven) model->B4SOItnoib = 3.5; if (!model->B4SOIrnoiaGiven) model->B4SOIrnoia = 0.577; if (!model->B4SOIrnoibGiven) model->B4SOIrnoib = 0.37; if (!model->B4SOIntnoiGiven) model->B4SOIntnoi = 1.0; /* v3.2 for noise end */ /* v4.0 */ if (!model->B4SOIrdsModGiven) model->B4SOIrdsMod = 0; else if ((model->B4SOIrdsMod != 0) && (model->B4SOIrdsMod != 1)) { model->B4SOIrdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } if (!model->B4SOIrbodyModGiven) model->B4SOIrbodyMod = 0; else if ((model->B4SOIrbodyMod != 0) && (model->B4SOIrbodyMod != 1)) { model->B4SOIrbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } if (!model->B4SOIgbminGiven) model->B4SOIgbmin = 1.0e-12; /* in mho */ if (!model->B4SOIrbdbGiven) model->B4SOIrbdb = 50.0; /* in ohm */ if (!model->B4SOIrbsbGiven) model->B4SOIrbsb = 50.0; /* in ohm */ /* v4.0 end */ /* v2.2.3 */ if (!model->B4SOIdtoxcvGiven) model->B4SOIdtoxcv = 0.0; if (!model->B4SOIcdscGiven) model->B4SOIcdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->B4SOIcdscbGiven) model->B4SOIcdscb = 0.0; /* unit Q/V/m^2 */ if (!model->B4SOIcdscdGiven) model->B4SOIcdscd = 0.0; /* unit Q/V/m^2 */ if (!model->B4SOIcitGiven) model->B4SOIcit = 0.0; /* unit Q/V/m^2 */ if (!model->B4SOInfactorGiven) model->B4SOInfactor = 1; if (!model->B4SOIvsatGiven) model->B4SOIvsat = 8.0e4; /* unit m/s */ if (!model->B4SOIatGiven) model->B4SOIat = 3.3e4; /* unit m/s */ if (!model->B4SOIa0Given) model->B4SOIa0 = 1.0; if (!model->B4SOIagsGiven) model->B4SOIags = 0.0; if (!model->B4SOIa1Given) model->B4SOIa1 = 0.0; if (!model->B4SOIa2Given) model->B4SOIa2 = 1.0; if (!model->B4SOIketaGiven) model->B4SOIketa = -0.6; /* unit / V */ if (!model->B4SOInsubGiven) model->B4SOInsub = 6.0e16; /* unit 1/cm3 */ if (!model->B4SOInpeakGiven) model->B4SOInpeak = 1.7e17; /* unit 1/cm3 */ if (!model->B4SOIngateGiven) model->B4SOIngate = 0; /* unit 1/cm3 */ if (!model->B4SOInsdGiven) model->B4SOInsd = 1.0e20; if (!model->B4SOIvbmGiven) model->B4SOIvbm = -3.0; if (!model->B4SOIxtGiven) model->B4SOIxt = 1.55e-7; if (!model->B4SOIkt1Given) model->B4SOIkt1 = -0.11; /* unit V */ if (!model->B4SOIkt1lGiven) model->B4SOIkt1l = 0.0; /* unit V*m */ if (!model->B4SOIkt2Given) model->B4SOIkt2 = 0.022; /* No unit */ if (!model->B4SOIk3Given) model->B4SOIk3 = 0.0; if (!model->B4SOIk3bGiven) model->B4SOIk3b = 0.0; if (!model->B4SOIw0Given) model->B4SOIw0 = 2.5e-6; if (!model->B4SOIlpebGiven) model->B4SOIlpeb = 0.0; if (!model->B4SOIdvt0Given) model->B4SOIdvt0 = 2.2; if (!model->B4SOIdvt1Given) model->B4SOIdvt1 = 0.53; if (!model->B4SOIdvt2Given) model->B4SOIdvt2 = -0.032; /* unit 1 / V */ if (!model->B4SOIdvt0wGiven) model->B4SOIdvt0w = 0.0; if (!model->B4SOIdvt1wGiven) model->B4SOIdvt1w = 5.3e6; if (!model->B4SOIdvt2wGiven) model->B4SOIdvt2w = -0.032; if (!model->B4SOIdroutGiven) model->B4SOIdrout = 0.56; if (!model->B4SOIdsubGiven) model->B4SOIdsub = model->B4SOIdrout; if (!model->B4SOIvth0Given) model->B4SOIvth0 = (model->B4SOItype == NMOS) ? 0.7 : -0.7; if (!model->B4SOIvfbGiven) model->B4SOIvfb = -1.0; /* v4.1 */ if (!model->B4SOIuaGiven) model->B4SOIua = 2.25e-9; /* unit m/V */ if (!model->B4SOIua1Given) model->B4SOIua1 = 4.31e-9; /* unit m/V */ if (!model->B4SOIubGiven) model->B4SOIub = 5.87e-19; /* unit (m/V)**2 */ if (!model->B4SOIub1Given) model->B4SOIub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->B4SOIucGiven) model->B4SOIuc = (model->B4SOImobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->B4SOIuc1Given) model->B4SOIuc1 = (model->B4SOImobMod == 3) ? -0.056 : -0.056e-9; if (!model->B4SOIu0Given) model->B4SOIu0 = (model->B4SOItype == NMOS) ? 0.067 : 0.025; if (!model->B4SOIuteGiven) model->B4SOIute = -1.5; /*4.1 mobmod =4 */ if (!model->B4SOIudGiven) model->B4SOIud = 0.0; if (!model->B4SOIludGiven) model->B4SOIlud = 0.0; if (!model->B4SOIwudGiven) model->B4SOIwud = 0.0; if (!model->B4SOIpudGiven) /* model->B4SOIpud1 = 0.0; */ /*Bug fix # 33 Jul 09 */ model->B4SOIpud = 0.0; if (!model->B4SOIud1Given) model->B4SOIud1 = 0.0; if (!model->B4SOIlud1Given) model->B4SOIlud1 = 0.0; if (!model->B4SOIwud1Given) model->B4SOIwud1 = 0.0; if (!model->B4SOIpud1Given) model->B4SOIpud1 = 0.0; if (!model->B4SOIeuGiven) model->B4SOIeu = (model->B4SOItype == NMOS) ? 1.67 : 1.0; if (!model->B4SOIleuGiven) model->B4SOIleu = 0.0; if (!model->B4SOIweuGiven) model->B4SOIweu = 0.0; if (!model->B4SOIpeuGiven) model->B4SOIpeu = 0.0; if (!model->B4SOIucsGiven) model->B4SOIucs = (model->B4SOItype == NMOS) ? 1.67 : 1.0; if (!model->B4SOIlucsGiven) model->B4SOIlucs =0.0; if (!model->B4SOIwucsGiven) model->B4SOIwucs =0.0; if (!model->B4SOIpucsGiven) model->B4SOIpucs =0.0; if (!model->B4SOIucsteGiven) model->B4SOIucste = -4.775e-3; if (!model->B4SOIlucsteGiven) model->B4SOIlucste = 0.0; if (!model->B4SOIwucsteGiven) model->B4SOIwucste = 0.0; if (!model->B4SOIpucsteGiven) model->B4SOIpucste = 0.0; if (!model->B4SOIvoffGiven) model->B4SOIvoff = -0.08; if (!model->B4SOIdeltaGiven) model->B4SOIdelta = 0.01; if (!model->B4SOIrdswGiven) model->B4SOIrdsw = 100; if (!model->B4SOIrswGiven) /* v4.0 */ model->B4SOIrsw = 50; if (!model->B4SOIrdwGiven) /* v4.0 */ model->B4SOIrdw = 50; if (!model->B4SOIrswminGiven) /* v4.0 */ model->B4SOIrswmin = 0.0; if (!model->B4SOIrdwminGiven) /* v4.0 */ model->B4SOIrdwmin = 0.0; if (!model->B4SOIprwgGiven) model->B4SOIprwg = 0.0; /* unit 1/V */ if (!model->B4SOIprwbGiven) model->B4SOIprwb = 0.0; if (!model->B4SOIprtGiven) model->B4SOIprt = 0.0; if (!model->B4SOIeta0Given) model->B4SOIeta0 = 0.08; /* no unit */ if (!model->B4SOIetabGiven) model->B4SOIetab = -0.07; /* unit 1/V */ if (!model->B4SOIpclmGiven) model->B4SOIpclm = 1.3; /* no unit */ if (!model->B4SOIpdibl1Given) model->B4SOIpdibl1 = .39; /* no unit */ if (!model->B4SOIpdibl2Given) model->B4SOIpdibl2 = 0.0086; /* no unit */ if (!model->B4SOIpdiblbGiven) model->B4SOIpdiblb = 0.0; /* 1/V */ if (!model->B4SOIpvagGiven) model->B4SOIpvag = 0.0; if (!model->B4SOIwrGiven) model->B4SOIwr = 1.0; if (!model->B4SOIdwgGiven) model->B4SOIdwg = 0.0; if (!model->B4SOIdwbGiven) model->B4SOIdwb = 0.0; if (!model->B4SOIb0Given) model->B4SOIb0 = 0.0; if (!model->B4SOIb1Given) model->B4SOIb1 = 0.0; if (!model->B4SOIalpha0Given) model->B4SOIalpha0 = 0.0; if (!model->B4SOIcgslGiven) model->B4SOIcgsl = 0.0; if (!model->B4SOIcgdlGiven) model->B4SOIcgdl = 0.0; if (!model->B4SOIckappaGiven) model->B4SOIckappa = 0.6; if (!model->B4SOIclcGiven) model->B4SOIclc = 0.1e-7; if (!model->B4SOIcleGiven) model->B4SOIcle = 0.0; if (!model->B4SOItboxGiven) model->B4SOItbox = 3e-7; if (!model->B4SOItsiGiven) model->B4SOItsi = 1e-7; if (!model->B4SOIetsiGiven) model->B4SOIetsi = 1e-7; if (!model->B4SOIxjGiven) model->B4SOIxj = model->B4SOItsi; if (!model->B4SOIrbodyGiven) model->B4SOIrbody = 0.0; if (!model->B4SOIrbshGiven) model->B4SOIrbsh = 0.0; if (!model->B4SOIrth0Given) model->B4SOIrth0 = 0; /* v3.0 bug fix */ if (!model->B4SOIcth0Given) model->B4SOIcth0 = 1e-5; if (!model->B4SOIcfrcoeffGiven) /* v4.4 */ model->B4SOIcfrcoeff = 1.0; if (!model->B4SOIagidlGiven) model->B4SOIagidl = 0.0; if (!model->B4SOIbgidlGiven) model->B4SOIbgidl = 2.3e9; /* v4.0 */ if (!model->B4SOIcgidlGiven) /* v4.0 */ model->B4SOIcgidl = 0.5; /* v4.2 default value changed from 0 to 0.5 */ if (!model->B4SOIrgidlGiven) /* v4.1 */ model->B4SOIrgidl = 1.0; if (!model->B4SOIkgidlGiven) /* v4.1 */ model->B4SOIkgidl = 0.0; if (!model->B4SOIfgidlGiven) /* v4.1 */ model->B4SOIfgidl = 0.0; if (!model->B4SOIagislGiven) model->B4SOIagisl = model->B4SOIagidl; if (!model->B4SOIbgislGiven) model->B4SOIbgisl = model->B4SOIbgidl; /* v4.0 */ if (!model->B4SOIcgislGiven) /* v4.0 */ model->B4SOIcgisl = model->B4SOIcgidl; if (!model->B4SOIrgislGiven) /* v4.1 */ model->B4SOIrgisl = model->B4SOIrgidl; if (!model->B4SOIkgislGiven) /* v4.1 */ model->B4SOIkgisl = model->B4SOIkgidl; if (!model->B4SOIfgislGiven) /* v4.1 */ model->B4SOIfgisl = model->B4SOIfgidl; if (!model->B4SOIndiodeGiven) /* v4.0 */ model->B4SOIndiode = 1.0; if (!model->B4SOIndiodedGiven) /* v4.0 */ model->B4SOIndioded = model->B4SOIndiode; if (!model->B4SOIntunGiven) /* v4.0 */ model->B4SOIntun = 10.0; if (!model->B4SOIntundGiven) /* v4.0 */ model->B4SOIntund = model->B4SOIntun; if (!model->B4SOInrecf0Given) model->B4SOInrecf0 = 2.0; if (!model->B4SOInrecf0dGiven) model->B4SOInrecf0d = model->B4SOInrecf0; if (!model->B4SOInrecr0Given) model->B4SOInrecr0 = 10.0; if (!model->B4SOInrecr0dGiven) model->B4SOInrecr0d = model->B4SOInrecr0; if (!model->B4SOIisbjtGiven) model->B4SOIisbjt = 1e-6; if (!model->B4SOIidbjtGiven) model->B4SOIidbjt = model->B4SOIisbjt; if (!model->B4SOIisdifGiven) model->B4SOIisdif = 0.0; if (!model->B4SOIiddifGiven) model->B4SOIiddif = model->B4SOIisdif; /* v4.0 */ if (!model->B4SOIisrecGiven) model->B4SOIisrec = 1e-5; if (!model->B4SOIidrecGiven) model->B4SOIidrec = model->B4SOIisrec; if (!model->B4SOIistunGiven) model->B4SOIistun = 0.0; if (!model->B4SOIidtunGiven) model->B4SOIidtun = model->B4SOIistun; if (!model->B4SOIxbjtGiven) model->B4SOIxbjt = 1.0; if (!model->B4SOIxdifGiven) model->B4SOIxdif = model->B4SOIxbjt; if (!model->B4SOIxdifdGiven) model->B4SOIxdifd = model->B4SOIxdif; if (!model->B4SOIxrecGiven) model->B4SOIxrec = 1.0; if (!model->B4SOIxrecdGiven) model->B4SOIxrecd = model->B4SOIxrec; if (!model->B4SOIxtunGiven) model->B4SOIxtun = 0.0; if (!model->B4SOIxtundGiven) model->B4SOIxtund = model->B4SOIxtun; if (!model->B4SOIttGiven) model->B4SOItt = 1e-12; if (!model->B4SOIasdGiven) model->B4SOIasd = 0.3; /* 4.0 backward compatibility */ if (!model->B4SOIlpe0Given) { if(!model->B4SOInlxGiven) model->B4SOIlpe0 = 1.74e-7; else model->B4SOIlpe0 = model->B4SOInlx; } if(model->B4SOIlpe0Given && model->B4SOInlxGiven) printf("Warning: both lpe0 and nlx are given. Lpe0 value is taken \n"); if (!model->B4SOIllpe0Given) { if(!model->B4SOIlnlxGiven) model->B4SOIllpe0 = 0.0; else model->B4SOIllpe0 = model->B4SOIlnlx; } if(model->B4SOIllpe0Given && model->B4SOIlnlxGiven) printf("Warning: both llpe0 and lnlx are given. Llpe0 value is taken \n"); if (!model->B4SOIwlpe0Given) { if(!model->B4SOIwnlxGiven) model->B4SOIwlpe0 = 0.0; else model->B4SOIwlpe0 = model->B4SOIwnlx; } if(model->B4SOIwlpe0Given && model->B4SOIwnlxGiven) printf("Warning: both wlpe0 and wnlx are given. Wlpe0 value is taken \n"); if (!model->B4SOIplpe0Given) { if(!model->B4SOIpnlxGiven) model->B4SOIplpe0 = 0.0; else model->B4SOIplpe0 = model->B4SOIpnlx; } if(model->B4SOIplpe0Given && model->B4SOIpnlxGiven) printf("Warning: both plpe0 and pnlx are given. Plpe0 value is taken \n"); if (!model->B4SOIegidlGiven) { if(!model->B4SOIngidlGiven) model->B4SOIegidl = 1.2; else model->B4SOIegidl = model->B4SOIngidl; } if(model->B4SOIegidlGiven && model->B4SOIngidlGiven) printf("Warning: both egidl and ngidl are given. Egidl value is taken \n"); if (!model->B4SOIlegidlGiven) { if(!model->B4SOIlngidlGiven) model->B4SOIlegidl = 0.0; else model->B4SOIlegidl = model->B4SOIlngidl; } if(model->B4SOIlegidlGiven && model->B4SOIlngidlGiven) printf("Warning: both legidl and lngidl are given. Legidl value is taken \n"); if (!model->B4SOIwegidlGiven) { if(!model->B4SOIwngidlGiven) model->B4SOIwegidl = 0.0; else model->B4SOIwegidl = model->B4SOIwngidl; } if(model->B4SOIwegidlGiven && model->B4SOIwngidlGiven) printf("Warning: both wegidl and wngidl are given. Wegidl value is taken \n"); if (!model->B4SOIpegidlGiven) { if(!model->B4SOIpngidlGiven) model->B4SOIpegidl = 0.0; else model->B4SOIpegidl = model->B4SOIpngidl; } if(model->B4SOIpegidlGiven && model->B4SOIpngidlGiven) printf("Warning: both pegidl and pngidl are given. Pegidl value is taken \n"); if (!model->B4SOIegislGiven) { model->B4SOIegisl = model->B4SOIegidl; } if (!model->B4SOIlegislGiven) { model->B4SOIlegisl = model->B4SOIlegidl; } if (!model->B4SOIwegislGiven) { model->B4SOIwegisl = model->B4SOIwegidl; } if (!model->B4SOIpegislGiven) { model->B4SOIpegisl = model->B4SOIpegidl; } /* unit degree celcius */ if (!model->B4SOItnomGiven) model->B4SOItnom = ckt->CKTnomTemp; if (!model->B4SOILintGiven) model->B4SOILint = 0.0; if (!model->B4SOILlGiven) model->B4SOILl = 0.0; if (!model->B4SOILlcGiven) model->B4SOILlc = 0.0; /* v2.2.3 */ if (!model->B4SOILlnGiven) model->B4SOILln = 1.0; if (!model->B4SOILwGiven) model->B4SOILw = 0.0; if (!model->B4SOILwcGiven) model->B4SOILwc = 0.0; /* v2.2.3 */ if (!model->B4SOILwnGiven) model->B4SOILwn = 1.0; if (!model->B4SOILwlGiven) model->B4SOILwl = 0.0; if (!model->B4SOILwlcGiven) model->B4SOILwlc = 0.0; /* v2.2.3 */ if (!model->B4SOILminGiven) model->B4SOILmin = 0.0; if (!model->B4SOILmaxGiven) model->B4SOILmax = 1.0; if (!model->B4SOIWintGiven) model->B4SOIWint = 0.0; if (!model->B4SOIWlGiven) model->B4SOIWl = 0.0; if (!model->B4SOIWlcGiven) model->B4SOIWlc = 0.0; /* v2.2.3 */ if (!model->B4SOIWlnGiven) model->B4SOIWln = 1.0; if (!model->B4SOIWwGiven) model->B4SOIWw = 0.0; if (!model->B4SOIWwcGiven) model->B4SOIWwc = 0.0; /* v2.2.3 */ if (!model->B4SOIWwnGiven) model->B4SOIWwn = 1.0; if (!model->B4SOIWwlGiven) model->B4SOIWwl = 0.0; if (!model->B4SOIWwlcGiven) model->B4SOIWwlc = 0.0; /* v2.2.3 */ if (!model->B4SOIWminGiven) model->B4SOIWmin = 0.0; if (!model->B4SOIWmaxGiven) model->B4SOIWmax = 1.0; if (!model->B4SOIdwcGiven) model->B4SOIdwc = model->B4SOIWint; if (!model->B4SOIdlcGiven) model->B4SOIdlc = model->B4SOILint; if (!model->B4SOIdlcigGiven) model->B4SOIdlcig = model->B4SOILint; /* v3.0 */ /* v3.0 */ if (!model->B4SOIvbs0pdGiven) model->B4SOIvbs0pd = 0.0; /* v3.2 */ if (!model->B4SOIvbs0fdGiven) model->B4SOIvbs0fd = 0.5; /* v3.2 */ if (!model->B4SOIvbsaGiven) model->B4SOIvbsa = 0.0; if (!model->B4SOInofffdGiven) model->B4SOInofffd = 1.0; if (!model->B4SOIvofffdGiven) model->B4SOIvofffd = 0.0; if (!model->B4SOIk1bGiven) model->B4SOIk1b = 1.0; if (!model->B4SOIk2bGiven) model->B4SOIk2b = 0.0; if (!model->B4SOIdk2bGiven) model->B4SOIdk2b = 0.0; if (!model->B4SOIdvbd0Given) model->B4SOIdvbd0 = 0.0; if (!model->B4SOIdvbd1Given) model->B4SOIdvbd1 = 0.0; if (!model->B4SOImoinFDGiven) model->B4SOImoinFD = 1e3; /* v3.1 added for RF */ if (!model->B4SOIxrcrg1Given) model->B4SOIxrcrg1 =12.0; if (!model->B4SOIxrcrg2Given) model->B4SOIxrcrg2 =1.0; if (!model->B4SOIrshgGiven) model->B4SOIrshg =0.1; if (!model->B4SOIngconGiven) model->B4SOIngcon =1.0; if (!model->B4SOIxgwGiven) model->B4SOIxgw = 0.0; if (!model->B4SOIxglGiven) model->B4SOIxgl = 0.0; /* v3.1 added for RF end */ /* v2.2 release */ if (!model->B4SOIwth0Given) model->B4SOIwth0 = 0.0; if (!model->B4SOIrhaloGiven) model->B4SOIrhalo = 1e15; if (!model->B4SOIntoxGiven) model->B4SOIntox = 1; if (!model->B4SOItoxrefGiven) model->B4SOItoxref = 2.5e-9; if (!model->B4SOIebgGiven) model->B4SOIebg = 1.2; if (!model->B4SOIvevbGiven) model->B4SOIvevb = 0.075; if (!model->B4SOIalphaGB1Given) model->B4SOIalphaGB1 = 0.35; if (!model->B4SOIbetaGB1Given) model->B4SOIbetaGB1 = 0.03; if (!model->B4SOIvgb1Given) model->B4SOIvgb1 = 300; if (!model->B4SOIalphaGB2Given) model->B4SOIalphaGB2 = 0.43; if (!model->B4SOIbetaGB2Given) model->B4SOIbetaGB2 = 0.05; if (!model->B4SOIvecbGiven) model->B4SOIvecb = 0.026; if (!model->B4SOIvgb2Given) model->B4SOIvgb2 = 17; if (!model->B4SOIaigbcp2Given) model->B4SOIaigbcp2 = 0.043; if (!model->B4SOIbigbcp2Given) model->B4SOIbigbcp2 = 0.0054; if (!model->B4SOIcigbcp2Given) model->B4SOIcigbcp2 = 0.0075; if (!model->B4SOItoxqmGiven) model->B4SOItoxqm = model->B4SOItox; if (!model->B4SOIvoxhGiven) model->B4SOIvoxh = 5.0; if (!model->B4SOIdeltavoxGiven) model->B4SOIdeltavox = 0.005; /* v3.0 */ if (!model->B4SOIigbModGiven) model->B4SOIigbMod = 0; if (!model->B4SOIigcModGiven) model->B4SOIigcMod = 0; if (!model->B4SOInigcGiven) model->B4SOInigc = 1.0; if (!model->B4SOIaigcGiven) model->B4SOIaigc = (model->B4SOItype == NMOS) ? 0.43 : 0.31; if (!model->B4SOIbigcGiven) model->B4SOIbigc = (model->B4SOItype == NMOS) ? 0.054 : 0.024; if (!model->B4SOIcigcGiven) model->B4SOIcigc = (model->B4SOItype == NMOS) ? 0.075 : 0.03; if (!model->B4SOIaigsdGiven) model->B4SOIaigsd = (model->B4SOItype == NMOS) ? 0.43 : 0.31; if (!model->B4SOIbigsdGiven) model->B4SOIbigsd = (model->B4SOItype == NMOS) ? 0.054 : 0.024; if (!model->B4SOIcigsdGiven) model->B4SOIcigsd = (model->B4SOItype == NMOS) ? 0.075 : 0.03; if (!model->B4SOIpigcdGiven) model->B4SOIpigcd = 1.0; if (!model->B4SOIpoxedgeGiven) model->B4SOIpoxedge = 1.0; /* v2.0 release */ if (!model->B4SOIk1w1Given) model->B4SOIk1w1 = 0.0; if (!model->B4SOIk1w2Given) model->B4SOIk1w2 = 0.0; if (!model->B4SOIketasGiven) model->B4SOIketas = 0.0; if (!model->B4SOIdwbcGiven) model->B4SOIdwbc = 0.0; if (!model->B4SOIbeta0Given) model->B4SOIbeta0 = 0.0; if (!model->B4SOIbeta1Given) model->B4SOIbeta1 = 0.0; if (!model->B4SOIbeta2Given) model->B4SOIbeta2 = 0.1; if (!model->B4SOIvdsatii0Given) model->B4SOIvdsatii0 = 0.9; if (!model->B4SOItiiGiven) model->B4SOItii = 0.0; if (!model->B4SOIliiGiven) model->B4SOIlii = 0.0; if (!model->B4SOIsii0Given) model->B4SOIsii0 = 0.5; if (!model->B4SOIsii1Given) model->B4SOIsii1 = 0.1; if (!model->B4SOIsii2Given) model->B4SOIsii2 = 0.0; if (!model->B4SOIsiidGiven) model->B4SOIsiid = 0.0; if (!model->B4SOIfbjtiiGiven) model->B4SOIfbjtii = 0.0; /*4.1 Iii model*/ if (!model->B4SOIebjtiiGiven) model->B4SOIebjtii = 0.0; if (!model->B4SOIcbjtiiGiven) model->B4SOIcbjtii = 0.0; if (!model->B4SOIvbciGiven) model->B4SOIvbci = 0.0; if (!model->B4SOItvbciGiven) model->B4SOItvbci = 0.0; if (!model->B4SOIabjtiiGiven) model->B4SOIabjtii = 0.0; if (!model->B4SOImbjtiiGiven) model->B4SOImbjtii = 0.4; if (!model->B4SOIesatiiGiven) model->B4SOIesatii = 1e7; if (!model->B4SOIlnGiven) model->B4SOIln = 2e-6; if (!model->B4SOIvrec0Given) /* v4.0 */ model->B4SOIvrec0 = 0; if (!model->B4SOIvrec0dGiven) /* v4.0 */ model->B4SOIvrec0d = model->B4SOIvrec0; if (!model->B4SOIvtun0Given) /* v4.0 */ model->B4SOIvtun0 = 0; if (!model->B4SOIvtun0dGiven) /* v4.0 */ model->B4SOIvtun0d = model->B4SOIvtun0; if (!model->B4SOInbjtGiven) model->B4SOInbjt = 1.0; if (!model->B4SOIlbjt0Given) model->B4SOIlbjt0 = 0.20e-6; if (!model->B4SOIldif0Given) model->B4SOIldif0 = 1.0; if (!model->B4SOIvabjtGiven) model->B4SOIvabjt = 10.0; if (!model->B4SOIaelyGiven) model->B4SOIaely = 0; if (!model->B4SOIahliGiven) /* v4.0 */ model->B4SOIahli = 0; if (!model->B4SOIahlidGiven) /* v4.0 */ model->B4SOIahlid = model->B4SOIahli; if (!model->B4SOIrbodyGiven) model->B4SOIrbody = 0.0; if (!model->B4SOIrbshGiven) model->B4SOIrbsh = 0.0; if (!model->B4SOIntrecfGiven) model->B4SOIntrecf = 0.0; if (!model->B4SOIntrecrGiven) model->B4SOIntrecr = 0.0; if (!model->B4SOIndifGiven) model->B4SOIndif = -1.0; if (!model->B4SOIdlcbGiven) model->B4SOIdlcb = 0.0; if (!model->B4SOIfbodyGiven) model->B4SOIfbody = 1.0; if (!model->B4SOItcjswgGiven) model->B4SOItcjswg = 0.0; if (!model->B4SOItpbswgGiven) model->B4SOItpbswg = 0.0; if (!model->B4SOItcjswgdGiven) model->B4SOItcjswgd = model->B4SOItcjswg; if (!model->B4SOItpbswgdGiven) model->B4SOItpbswgd = model->B4SOItpbswg; if (!model->B4SOIacdeGiven) model->B4SOIacde = 1.0; if (!model->B4SOImoinGiven) model->B4SOImoin = 15.0; if (!model->B4SOInoffGiven) model->B4SOInoff = 1.0; /* v3.2 */ if (!model->B4SOIdelvtGiven) model->B4SOIdelvt = 0.0; if (!model->B4SOIkb1Given) model->B4SOIkb1 = 1.0; if (!model->B4SOIdlbgGiven) model->B4SOIdlbg = 0.0; /* Added for binning - START */ /* Length dependence */ /* v3.1 */ if (!model->B4SOIlxjGiven) model->B4SOIlxj = 0.0; if (!model->B4SOIlalphaGB1Given) model->B4SOIlalphaGB1 = 0.0; if (!model->B4SOIlalphaGB2Given) model->B4SOIlalphaGB2 = 0.0; if (!model->B4SOIlbetaGB1Given) model->B4SOIlbetaGB1 = 0.0; if (!model->B4SOIlbetaGB2Given) model->B4SOIlbetaGB2 = 0.0; if (!model->B4SOIlaigbcp2Given) model->B4SOIlaigbcp2 = 0.0; if (!model->B4SOIlbigbcp2Given) model->B4SOIlbigbcp2 = 0.0; if (!model->B4SOIlcigbcp2Given) model->B4SOIlcigbcp2 = 0.0; if (!model->B4SOIlndifGiven) model->B4SOIlndif = 0.0; if (!model->B4SOIlntrecfGiven) model->B4SOIlntrecf = 0.0; if (!model->B4SOIlntrecrGiven) model->B4SOIlntrecr = 0.0; if (!model->B4SOIlxbjtGiven) model->B4SOIlxbjt = 0.0; if (!model->B4SOIlxdifGiven) model->B4SOIlxdif = 0.0; if (!model->B4SOIlxrecGiven) model->B4SOIlxrec = 0.0; if (!model->B4SOIlxtunGiven) model->B4SOIlxtun = 0.0; if (!model->B4SOIlxdifdGiven) model->B4SOIlxdifd = model->B4SOIlxdif; if (!model->B4SOIlxrecdGiven) model->B4SOIlxrecd = model->B4SOIlxrec; if (!model->B4SOIlxtundGiven) model->B4SOIlxtund = model->B4SOIlxtun; if (!model->B4SOIlcgdlGiven) model->B4SOIlcgdl = 0.0; if (!model->B4SOIlcgslGiven) model->B4SOIlcgsl = 0.0; if (!model->B4SOIlckappaGiven) model->B4SOIlckappa = 0.0; if (!model->B4SOIluteGiven) model->B4SOIlute = 0.0; if (!model->B4SOIlkt1Given) model->B4SOIlkt1 = 0.0; if (!model->B4SOIlkt2Given) model->B4SOIlkt2 = 0.0; if (!model->B4SOIlkt1lGiven) model->B4SOIlkt1l = 0.0; if (!model->B4SOIlua1Given) model->B4SOIlua1 = 0.0; if (!model->B4SOIlub1Given) model->B4SOIlub1 = 0.0; if (!model->B4SOIluc1Given) model->B4SOIluc1 = 0.0; if (!model->B4SOIlatGiven) model->B4SOIlat = 0.0; if (!model->B4SOIlprtGiven) model->B4SOIlprt = 0.0; /* v3.0 */ if (!model->B4SOIlnigcGiven) model->B4SOIlnigc = 0.0; if (!model->B4SOIlpigcdGiven) model->B4SOIlpigcd = 0.0; if (!model->B4SOIlpoxedgeGiven) model->B4SOIlpoxedge = 0.0; if (!model->B4SOIlaigcGiven) model->B4SOIlaigc = 0.0; if (!model->B4SOIlbigcGiven) model->B4SOIlbigc = 0.0; if (!model->B4SOIlcigcGiven) model->B4SOIlcigc = 0.0; if (!model->B4SOIlaigsdGiven) model->B4SOIlaigsd = 0.0; if (!model->B4SOIlbigsdGiven) model->B4SOIlbigsd = 0.0; if (!model->B4SOIlcigsdGiven) model->B4SOIlcigsd = 0.0; if (!model->B4SOIlnpeakGiven) model->B4SOIlnpeak = 0.0; if (!model->B4SOIlnsubGiven) model->B4SOIlnsub = 0.0; if (!model->B4SOIlngateGiven) model->B4SOIlngate = 0.0; if (!model->B4SOIlnsdGiven) model->B4SOIlnsd = 0.0; if (!model->B4SOIlvth0Given) model->B4SOIlvth0 = 0.0; if (!model->B4SOIlvfbGiven) model->B4SOIlvfb = 0.0; /* v4.1 */ if (!model->B4SOIlk1Given) model->B4SOIlk1 = 0.0; if (!model->B4SOIlk1w1Given) model->B4SOIlk1w1 = 0.0; if (!model->B4SOIlk1w2Given) model->B4SOIlk1w2 = 0.0; if (!model->B4SOIlk2Given) model->B4SOIlk2 = 0.0; if (!model->B4SOIlk3Given) model->B4SOIlk3 = 0.0; if (!model->B4SOIlk3bGiven) model->B4SOIlk3b = 0.0; if (!model->B4SOIlkb1Given) model->B4SOIlkb1 = 0.0; if (!model->B4SOIlw0Given) model->B4SOIlw0 = 0.0; if (!model->B4SOIllpebGiven) model->B4SOIllpeb = 0.0; if (!model->B4SOIldvt0Given) model->B4SOIldvt0 = 0.0; if (!model->B4SOIldvt1Given) model->B4SOIldvt1 = 0.0; if (!model->B4SOIldvt2Given) model->B4SOIldvt2 = 0.0; if (!model->B4SOIldvt0wGiven) model->B4SOIldvt0w = 0.0; if (!model->B4SOIldvt1wGiven) model->B4SOIldvt1w = 0.0; if (!model->B4SOIldvt2wGiven) model->B4SOIldvt2w = 0.0; if (!model->B4SOIlu0Given) model->B4SOIlu0 = 0.0; if (!model->B4SOIluaGiven) model->B4SOIlua = 0.0; if (!model->B4SOIlubGiven) model->B4SOIlub = 0.0; if (!model->B4SOIlucGiven) model->B4SOIluc = 0.0; if (!model->B4SOIlvsatGiven) model->B4SOIlvsat = 0.0; if (!model->B4SOIla0Given) model->B4SOIla0 = 0.0; if (!model->B4SOIlagsGiven) model->B4SOIlags = 0.0; if (!model->B4SOIlb0Given) model->B4SOIlb0 = 0.0; if (!model->B4SOIlb1Given) model->B4SOIlb1 = 0.0; if (!model->B4SOIlketaGiven) model->B4SOIlketa = 0.0; if (!model->B4SOIlketasGiven) model->B4SOIlketas = 0.0; if (!model->B4SOIla1Given) model->B4SOIla1 = 0.0; if (!model->B4SOIla2Given) model->B4SOIla2 = 0.0; if (!model->B4SOIlrdswGiven) model->B4SOIlrdsw = 0.0; if (!model->B4SOIlrswGiven) /* v4.0 */ model->B4SOIlrsw = 0.0; if (!model->B4SOIlrdwGiven) /* v4.0 */ model->B4SOIlrdw = 0.0; if (!model->B4SOIlprwbGiven) model->B4SOIlprwb = 0.0; if (!model->B4SOIlprwgGiven) model->B4SOIlprwg = 0.0; if (!model->B4SOIlwrGiven) model->B4SOIlwr = 0.0; if (!model->B4SOIlnfactorGiven) model->B4SOIlnfactor = 0.0; if (!model->B4SOIldwgGiven) model->B4SOIldwg = 0.0; if (!model->B4SOIldwbGiven) model->B4SOIldwb = 0.0; if (!model->B4SOIlvoffGiven) model->B4SOIlvoff = 0.0; if (!model->B4SOIleta0Given) model->B4SOIleta0 = 0.0; if (!model->B4SOIletabGiven) model->B4SOIletab = 0.0; if (!model->B4SOIldsubGiven) model->B4SOIldsub = 0.0; if (!model->B4SOIlcitGiven) model->B4SOIlcit = 0.0; if (!model->B4SOIlcdscGiven) model->B4SOIlcdsc = 0.0; if (!model->B4SOIlcdscbGiven) model->B4SOIlcdscb = 0.0; if (!model->B4SOIlcdscdGiven) model->B4SOIlcdscd = 0.0; if (!model->B4SOIlpclmGiven) model->B4SOIlpclm = 0.0; if (!model->B4SOIlpdibl1Given) model->B4SOIlpdibl1 = 0.0; if (!model->B4SOIlpdibl2Given) model->B4SOIlpdibl2 = 0.0; if (!model->B4SOIlpdiblbGiven) model->B4SOIlpdiblb = 0.0; if (!model->B4SOIldroutGiven) model->B4SOIldrout = 0.0; if (!model->B4SOIlpvagGiven) model->B4SOIlpvag = 0.0; if (!model->B4SOIldeltaGiven) model->B4SOIldelta = 0.0; if (!model->B4SOIlalpha0Given) model->B4SOIlalpha0 = 0.0; if (!model->B4SOIlfbjtiiGiven) model->B4SOIlfbjtii = 0.0; /*4.1 Iii model*/ if (!model->B4SOIlebjtiiGiven) model->B4SOIlebjtii = 0.0; if (!model->B4SOIlcbjtiiGiven) model->B4SOIlcbjtii = 0.0; if (!model->B4SOIlvbciGiven) model->B4SOIlvbci = 0.0; if (!model->B4SOIlabjtiiGiven) model->B4SOIlabjtii = 0.0; if (!model->B4SOIlmbjtiiGiven) model->B4SOIlmbjtii = 0.0; if (!model->B4SOIlbeta0Given) model->B4SOIlbeta0 = 0.0; if (!model->B4SOIlbeta1Given) model->B4SOIlbeta1 = 0.0; if (!model->B4SOIlbeta2Given) model->B4SOIlbeta2 = 0.0; if (!model->B4SOIlvdsatii0Given) model->B4SOIlvdsatii0 = 0.0; if (!model->B4SOIlliiGiven) model->B4SOIllii = 0.0; if (!model->B4SOIlesatiiGiven) model->B4SOIlesatii = 0.0; if (!model->B4SOIlsii0Given) model->B4SOIlsii0 = 0.0; if (!model->B4SOIlsii1Given) model->B4SOIlsii1 = 0.0; if (!model->B4SOIlsii2Given) model->B4SOIlsii2 = 0.0; if (!model->B4SOIlsiidGiven) model->B4SOIlsiid = 0.0; if (!model->B4SOIlagidlGiven) model->B4SOIlagidl = 0.0; if (!model->B4SOIlbgidlGiven) model->B4SOIlbgidl = 0.0; if (!model->B4SOIlcgidlGiven) model->B4SOIlcgidl = 0.0; if (!model->B4SOIlrgidlGiven) model->B4SOIlrgidl = 0.0; if (!model->B4SOIlkgidlGiven) model->B4SOIlkgidl = 0.0; if (!model->B4SOIlfgidlGiven) model->B4SOIlfgidl = 0.0; if (!model->B4SOIlagislGiven) model->B4SOIlagisl = 0.0; if (!model->B4SOIlbgislGiven) model->B4SOIlbgisl = 0.0; if (!model->B4SOIlcgislGiven) model->B4SOIlcgisl = 0.0; if (!model->B4SOIlrgislGiven) model->B4SOIlrgisl = 0.0; if (!model->B4SOIlkgislGiven) model->B4SOIlkgisl = 0.0; if (!model->B4SOIlfgislGiven) model->B4SOIlfgisl = 0.0; if (!model->B4SOIlntunGiven) /* v4.0 */ model->B4SOIlntun = 0.0; if (!model->B4SOIlntundGiven) /* v4.0 */ model->B4SOIlntund = model->B4SOIlntun; if (!model->B4SOIlndiodeGiven) /* v4.0 */ model->B4SOIlndiode = 0.0; if (!model->B4SOIlndiodedGiven) /* v4.0 */ model->B4SOIlndioded = model->B4SOIlndiode; if (!model->B4SOIlnrecf0Given) /* v4.0 */ model->B4SOIlnrecf0 = 0.0; if (!model->B4SOIlnrecf0dGiven) /* v4.0 */ model->B4SOIlnrecf0d = model->B4SOIlnrecf0; if (!model->B4SOIlnrecr0Given) /* v4.0 */ model->B4SOIlnrecr0 = 0.0; if (!model->B4SOIlnrecr0dGiven) /* v4.0 */ model->B4SOIlnrecr0d = model->B4SOIlnrecr0; if (!model->B4SOIlisbjtGiven) model->B4SOIlisbjt = 0.0; if (!model->B4SOIlidbjtGiven) model->B4SOIlidbjt = model->B4SOIlisbjt; if (!model->B4SOIlisdifGiven) model->B4SOIlisdif = 0.0; if (!model->B4SOIliddifGiven) model->B4SOIliddif = model->B4SOIlisdif; /* v4.0 */ if (!model->B4SOIlisrecGiven) model->B4SOIlisrec = 0.0; if (!model->B4SOIlidrecGiven) model->B4SOIlidrec = model->B4SOIlisrec; if (!model->B4SOIlistunGiven) model->B4SOIlistun = 0.0; if (!model->B4SOIlidtunGiven) model->B4SOIlidtun = model->B4SOIlistun; if (!model->B4SOIlvrec0Given) /* v4.0 */ model->B4SOIlvrec0 = 0; if (!model->B4SOIlvrec0dGiven) /* v4.0 */ model->B4SOIlvrec0d = model->B4SOIlvrec0; if (!model->B4SOIlvtun0Given) /* v4.0 */ model->B4SOIlvtun0 = 0; if (!model->B4SOIlvtun0dGiven) /* v4.0 */ model->B4SOIlvtun0d = model->B4SOIlvtun0; if (!model->B4SOIlnbjtGiven) model->B4SOIlnbjt = 0.0; if (!model->B4SOIllbjt0Given) model->B4SOIllbjt0 = 0.0; if (!model->B4SOIlvabjtGiven) model->B4SOIlvabjt = 0.0; if (!model->B4SOIlaelyGiven) model->B4SOIlaely = 0.0; if (!model->B4SOIlahliGiven) /* v4.0 */ model->B4SOIlahli = 0.0; if (!model->B4SOIlahlidGiven) /* v4.0 */ model->B4SOIlahlid = model->B4SOIlahli; /* CV Model */ if (!model->B4SOIlvsdfbGiven) model->B4SOIlvsdfb = 0.0; if (!model->B4SOIlvsdthGiven) model->B4SOIlvsdth = 0.0; if (!model->B4SOIldelvtGiven) model->B4SOIldelvt = 0.0; if (!model->B4SOIlacdeGiven) model->B4SOIlacde = 0.0; if (!model->B4SOIlmoinGiven) model->B4SOIlmoin = 0.0; if (!model->B4SOIlnoffGiven) model->B4SOIlnoff = 0.0; /* v3.2 */ /* v3.1 added for RF */ if (!model->B4SOIlxrcrg1Given) model->B4SOIlxrcrg1 =0.0; if (!model->B4SOIlxrcrg2Given) model->B4SOIlxrcrg2 =0.0; /* v3.1 added for RF end */ /* Width dependence */ /* v3.1 */ if (!model->B4SOIwxjGiven) model->B4SOIwxj = 0.0; if (!model->B4SOIwalphaGB1Given) model->B4SOIwalphaGB1 = 0.0; if (!model->B4SOIwalphaGB2Given) model->B4SOIwalphaGB2 = 0.0; if (!model->B4SOIwbetaGB1Given) model->B4SOIwbetaGB1 = 0.0; if (!model->B4SOIwbetaGB2Given) model->B4SOIwbetaGB2 = 0.0; if (!model->B4SOIwaigbcp2Given) model->B4SOIwaigbcp2 = 0.0; if (!model->B4SOIwbigbcp2Given) model->B4SOIwbigbcp2 = 0.0; if (!model->B4SOIwcigbcp2Given) model->B4SOIwcigbcp2 = 0.0; if (!model->B4SOIwndifGiven) model->B4SOIwndif = 0.0; if (!model->B4SOIwntrecfGiven) model->B4SOIwntrecf = 0.0; if (!model->B4SOIwntrecrGiven) model->B4SOIwntrecr = 0.0; if (!model->B4SOIwxbjtGiven) model->B4SOIwxbjt = 0.0; if (!model->B4SOIwxdifGiven) model->B4SOIwxdif = 0.0; if (!model->B4SOIwxrecGiven) model->B4SOIwxrec = 0.0; if (!model->B4SOIwxtunGiven) model->B4SOIwxtun = 0.0; if (!model->B4SOIwxdifdGiven) model->B4SOIwxdifd = model->B4SOIwxdif; if (!model->B4SOIwxrecdGiven) model->B4SOIwxrecd = model->B4SOIwxrec; if (!model->B4SOIwxtundGiven) model->B4SOIwxtund = model->B4SOIwxtun; if (!model->B4SOIwcgdlGiven) model->B4SOIwcgdl = 0.0; if (!model->B4SOIwcgslGiven) model->B4SOIwcgsl = 0.0; if (!model->B4SOIwckappaGiven) model->B4SOIwckappa = 0.0; if (!model->B4SOIwuteGiven) model->B4SOIwute = 0.0; if (!model->B4SOIwkt1Given) model->B4SOIwkt1 = 0.0; if (!model->B4SOIwkt2Given) model->B4SOIwkt2 = 0.0; if (!model->B4SOIwkt1lGiven) model->B4SOIwkt1l = 0.0; if (!model->B4SOIwua1Given) model->B4SOIwua1 = 0.0; if (!model->B4SOIwub1Given) model->B4SOIwub1 = 0.0; if (!model->B4SOIwuc1Given) model->B4SOIwuc1 = 0.0; if (!model->B4SOIwatGiven) model->B4SOIwat = 0.0; if (!model->B4SOIwprtGiven) model->B4SOIwprt = 0.0; /* v3.0 */ if (!model->B4SOIwnigcGiven) model->B4SOIwnigc = 0.0; if (!model->B4SOIwpigcdGiven) model->B4SOIwpigcd = 0.0; if (!model->B4SOIwpoxedgeGiven) model->B4SOIwpoxedge = 0.0; if (!model->B4SOIwaigcGiven) model->B4SOIwaigc = 0.0; if (!model->B4SOIwbigcGiven) model->B4SOIwbigc = 0.0; if (!model->B4SOIwcigcGiven) model->B4SOIwcigc = 0.0; if (!model->B4SOIwaigsdGiven) model->B4SOIwaigsd = 0.0; if (!model->B4SOIwbigsdGiven) model->B4SOIwbigsd = 0.0; if (!model->B4SOIwcigsdGiven) model->B4SOIwcigsd = 0.0; if (!model->B4SOIwnpeakGiven) model->B4SOIwnpeak = 0.0; if (!model->B4SOIwnsubGiven) model->B4SOIwnsub = 0.0; if (!model->B4SOIwngateGiven) model->B4SOIwngate = 0.0; if (!model->B4SOIwnsdGiven) model->B4SOIwnsd = 0.0; if (!model->B4SOIwvth0Given) model->B4SOIwvth0 = 0.0; if (!model->B4SOIwvfbGiven) model->B4SOIwvfb = 0.0; /* v4.1 */ if (!model->B4SOIwk1Given) model->B4SOIwk1 = 0.0; if (!model->B4SOIwk1w1Given) model->B4SOIwk1w1 = 0.0; if (!model->B4SOIwk1w2Given) model->B4SOIwk1w2 = 0.0; if (!model->B4SOIwk2Given) model->B4SOIwk2 = 0.0; if (!model->B4SOIwk3Given) model->B4SOIwk3 = 0.0; if (!model->B4SOIwk3bGiven) model->B4SOIwk3b = 0.0; if (!model->B4SOIwkb1Given) model->B4SOIwkb1 = 0.0; if (!model->B4SOIww0Given) model->B4SOIww0 = 0.0; if (!model->B4SOIwlpebGiven) model->B4SOIwlpeb = 0.0; if (!model->B4SOIwdvt0Given) model->B4SOIwdvt0 = 0.0; if (!model->B4SOIwdvt1Given) model->B4SOIwdvt1 = 0.0; if (!model->B4SOIwdvt2Given) model->B4SOIwdvt2 = 0.0; if (!model->B4SOIwdvt0wGiven) model->B4SOIwdvt0w = 0.0; if (!model->B4SOIwdvt1wGiven) model->B4SOIwdvt1w = 0.0; if (!model->B4SOIwdvt2wGiven) model->B4SOIwdvt2w = 0.0; if (!model->B4SOIwu0Given) model->B4SOIwu0 = 0.0; if (!model->B4SOIwuaGiven) model->B4SOIwua = 0.0; if (!model->B4SOIwubGiven) model->B4SOIwub = 0.0; if (!model->B4SOIwucGiven) model->B4SOIwuc = 0.0; if (!model->B4SOIwvsatGiven) model->B4SOIwvsat = 0.0; if (!model->B4SOIwa0Given) model->B4SOIwa0 = 0.0; if (!model->B4SOIwagsGiven) model->B4SOIwags = 0.0; if (!model->B4SOIwb0Given) model->B4SOIwb0 = 0.0; if (!model->B4SOIwb1Given) model->B4SOIwb1 = 0.0; if (!model->B4SOIwketaGiven) model->B4SOIwketa = 0.0; if (!model->B4SOIwketasGiven) model->B4SOIwketas = 0.0; if (!model->B4SOIwa1Given) model->B4SOIwa1 = 0.0; if (!model->B4SOIwa2Given) model->B4SOIwa2 = 0.0; if (!model->B4SOIwrdswGiven) model->B4SOIwrdsw = 0.0; if (!model->B4SOIwrswGiven) /* v4.0 */ model->B4SOIwrsw = 0.0; if (!model->B4SOIwrdwGiven) /* v4.0 */ model->B4SOIwrdw = 0.0; if (!model->B4SOIwprwbGiven) model->B4SOIwprwb = 0.0; if (!model->B4SOIwprwgGiven) model->B4SOIwprwg = 0.0; if (!model->B4SOIwwrGiven) model->B4SOIwwr = 0.0; if (!model->B4SOIwnfactorGiven) model->B4SOIwnfactor = 0.0; if (!model->B4SOIwdwgGiven) model->B4SOIwdwg = 0.0; if (!model->B4SOIwdwbGiven) model->B4SOIwdwb = 0.0; if (!model->B4SOIwvoffGiven) model->B4SOIwvoff = 0.0; if (!model->B4SOIweta0Given) model->B4SOIweta0 = 0.0; if (!model->B4SOIwetabGiven) model->B4SOIwetab = 0.0; if (!model->B4SOIwdsubGiven) model->B4SOIwdsub = 0.0; if (!model->B4SOIwcitGiven) model->B4SOIwcit = 0.0; if (!model->B4SOIwcdscGiven) model->B4SOIwcdsc = 0.0; if (!model->B4SOIwcdscbGiven) model->B4SOIwcdscb = 0.0; if (!model->B4SOIwcdscdGiven) model->B4SOIwcdscd = 0.0; if (!model->B4SOIwpclmGiven) model->B4SOIwpclm = 0.0; if (!model->B4SOIwpdibl1Given) model->B4SOIwpdibl1 = 0.0; if (!model->B4SOIwpdibl2Given) model->B4SOIwpdibl2 = 0.0; if (!model->B4SOIwpdiblbGiven) model->B4SOIwpdiblb = 0.0; if (!model->B4SOIwdroutGiven) model->B4SOIwdrout = 0.0; if (!model->B4SOIwpvagGiven) model->B4SOIwpvag = 0.0; if (!model->B4SOIwdeltaGiven) model->B4SOIwdelta = 0.0; if (!model->B4SOIwalpha0Given) model->B4SOIwalpha0 = 0.0; if (!model->B4SOIwfbjtiiGiven) model->B4SOIwfbjtii = 0.0; /*4.1 Iii model*/ if (!model->B4SOIwebjtiiGiven) model->B4SOIwebjtii = 0.0; if (!model->B4SOIwcbjtiiGiven) model->B4SOIwcbjtii = 0.0; if (!model->B4SOIwvbciGiven) model->B4SOIwvbci = 0.0; if (!model->B4SOIwabjtiiGiven) model->B4SOIwabjtii = 0.0; if (!model->B4SOIwmbjtiiGiven) model->B4SOIwmbjtii = 0.0; if (!model->B4SOIwbeta0Given) model->B4SOIwbeta0 = 0.0; if (!model->B4SOIwbeta1Given) model->B4SOIwbeta1 = 0.0; if (!model->B4SOIwbeta2Given) model->B4SOIwbeta2 = 0.0; if (!model->B4SOIwvdsatii0Given) model->B4SOIwvdsatii0 = 0.0; if (!model->B4SOIwliiGiven) model->B4SOIwlii = 0.0; if (!model->B4SOIwesatiiGiven) model->B4SOIwesatii = 0.0; if (!model->B4SOIwsii0Given) model->B4SOIwsii0 = 0.0; if (!model->B4SOIwsii1Given) model->B4SOIwsii1 = 0.0; if (!model->B4SOIwsii2Given) model->B4SOIwsii2 = 0.0; if (!model->B4SOIwsiidGiven) model->B4SOIwsiid = 0.0; if (!model->B4SOIwagidlGiven) model->B4SOIwagidl = 0.0; if (!model->B4SOIwbgidlGiven) model->B4SOIwbgidl = 0.0; if (!model->B4SOIwcgidlGiven) model->B4SOIwcgidl = 0.0; if (!model->B4SOIwrgidlGiven) model->B4SOIwrgidl = 0.0; if (!model->B4SOIwkgidlGiven) model->B4SOIwkgidl = 0.0; if (!model->B4SOIwfgidlGiven) model->B4SOIwfgidl = 0.0; if (!model->B4SOIwagislGiven) model->B4SOIwagisl = 0.0; if (!model->B4SOIwbgislGiven) model->B4SOIwbgisl = 0.0; if (!model->B4SOIwcgislGiven) model->B4SOIwcgisl = 0.0; if (!model->B4SOIwrgislGiven) model->B4SOIwrgisl = 0.0; if (!model->B4SOIwkgislGiven) model->B4SOIwkgisl = 0.0; if (!model->B4SOIwfgislGiven) model->B4SOIwfgisl = 0.0; if (!model->B4SOIwntunGiven) /* v4.0 */ model->B4SOIwntun = 0.0; if (!model->B4SOIwntundGiven) /* v4.0 */ model->B4SOIwntund = model->B4SOIwntun; if (!model->B4SOIwndiodeGiven) /* v4.0 */ model->B4SOIwndiode = 0.0; if (!model->B4SOIwndiodedGiven) /* v4.0 */ model->B4SOIwndioded = model->B4SOIwndiode; if (!model->B4SOIwnrecf0Given) /* v4.0 */ model->B4SOIwnrecf0 = 0.0; if (!model->B4SOIwnrecf0dGiven) /* v4.0 */ model->B4SOIwnrecf0d = model->B4SOIwnrecf0; if (!model->B4SOIwnrecr0Given) /* v4.0 */ model->B4SOIwnrecr0 = 0.0; if (!model->B4SOIwnrecr0dGiven) /* v4.0 */ model->B4SOIwnrecr0d = model->B4SOIwnrecr0; if (!model->B4SOIwisbjtGiven) model->B4SOIwisbjt = 0.0; if (!model->B4SOIwidbjtGiven) model->B4SOIwidbjt = model->B4SOIwisbjt; if (!model->B4SOIwisdifGiven) model->B4SOIwisdif = 0.0; if (!model->B4SOIwiddifGiven) model->B4SOIwiddif = model->B4SOIwisdif; /* v4.0 */ if (!model->B4SOIwisrecGiven) model->B4SOIwisrec = 0.0; if (!model->B4SOIwidrecGiven) model->B4SOIwidrec = model->B4SOIwisrec; if (!model->B4SOIwistunGiven) model->B4SOIwistun = 0.0; if (!model->B4SOIwidtunGiven) model->B4SOIwidtun = model->B4SOIwistun; if (!model->B4SOIwvrec0Given) /* v4.0 */ model->B4SOIwvrec0 = 0; if (!model->B4SOIwvrec0dGiven) /* v4.0 */ model->B4SOIwvrec0d = model->B4SOIwvrec0; if (!model->B4SOIwvtun0Given) /* v4.0 */ model->B4SOIwvtun0 = 0; if (!model->B4SOIwvtun0dGiven) /* v4.0 */ model->B4SOIwvtun0d = model->B4SOIwvtun0; if (!model->B4SOIwnbjtGiven) model->B4SOIwnbjt = 0.0; if (!model->B4SOIwlbjt0Given) model->B4SOIwlbjt0 = 0.0; if (!model->B4SOIwvabjtGiven) model->B4SOIwvabjt = 0.0; if (!model->B4SOIwaelyGiven) model->B4SOIwaely = 0.0; if (!model->B4SOIwahliGiven) /* v4.0 */ model->B4SOIwahli = 0.0; if (!model->B4SOIwahlidGiven) /* v4.0 */ model->B4SOIwahlid = model->B4SOIwahli; /* v3.1 added for RF */ if (!model->B4SOIwxrcrg1Given) model->B4SOIwxrcrg1 =0.0; if (!model->B4SOIwxrcrg2Given) model->B4SOIwxrcrg2 =0.0; /* v3.1 added for RF end */ /* CV Model */ if (!model->B4SOIwvsdfbGiven) model->B4SOIwvsdfb = 0.0; if (!model->B4SOIwvsdthGiven) model->B4SOIwvsdth = 0.0; if (!model->B4SOIwdelvtGiven) model->B4SOIwdelvt = 0.0; if (!model->B4SOIwacdeGiven) model->B4SOIwacde = 0.0; if (!model->B4SOIwmoinGiven) model->B4SOIwmoin = 0.0; if (!model->B4SOIwnoffGiven) model->B4SOIwnoff = 0.0; /* v3.2 */ /* Cross-term dependence */ /* v3.1 */ if (!model->B4SOIpxjGiven) model->B4SOIpxj = 0.0; if (!model->B4SOIpalphaGB1Given) model->B4SOIpalphaGB1 = 0.0; if (!model->B4SOIpalphaGB2Given) model->B4SOIpalphaGB2 = 0.0; if (!model->B4SOIpbetaGB1Given) model->B4SOIpbetaGB1 = 0.0; if (!model->B4SOIpbetaGB2Given) model->B4SOIpbetaGB2 = 0.0; if (!model->B4SOIpaigbcp2Given) model->B4SOIpaigbcp2 = 0.0; if (!model->B4SOIpbigbcp2Given) model->B4SOIpbigbcp2 = 0.0; if (!model->B4SOIpcigbcp2Given) model->B4SOIpcigbcp2 = 0.0; if (!model->B4SOIpndifGiven) model->B4SOIpndif = 0.0; if (!model->B4SOIpntrecfGiven) model->B4SOIpntrecf = 0.0; if (!model->B4SOIpntrecrGiven) model->B4SOIpntrecr = 0.0; if (!model->B4SOIpxbjtGiven) model->B4SOIpxbjt = 0.0; if (!model->B4SOIpxdifGiven) model->B4SOIpxdif = 0.0; if (!model->B4SOIpxrecGiven) model->B4SOIpxrec = 0.0; if (!model->B4SOIpxtunGiven) model->B4SOIpxtun = 0.0; if (!model->B4SOIpxdifdGiven) model->B4SOIpxdifd = model->B4SOIpxdif; if (!model->B4SOIpxrecdGiven) model->B4SOIpxrecd = model->B4SOIpxrec; if (!model->B4SOIpxtundGiven) model->B4SOIpxtund = model->B4SOIpxtun; if (!model->B4SOIpcgdlGiven) model->B4SOIpcgdl = 0.0; if (!model->B4SOIpcgslGiven) model->B4SOIpcgsl = 0.0; if (!model->B4SOIpckappaGiven) model->B4SOIpckappa = 0.0; if (!model->B4SOIputeGiven) model->B4SOIpute = 0.0; if (!model->B4SOIpkt1Given) model->B4SOIpkt1 = 0.0; if (!model->B4SOIpkt2Given) model->B4SOIpkt2 = 0.0; if (!model->B4SOIpkt1lGiven) model->B4SOIpkt1l = 0.0; if (!model->B4SOIpua1Given) model->B4SOIpua1 = 0.0; if (!model->B4SOIpub1Given) model->B4SOIpub1 = 0.0; if (!model->B4SOIpuc1Given) model->B4SOIpuc1 = 0.0; if (!model->B4SOIpatGiven) model->B4SOIpat = 0.0; if (!model->B4SOIpprtGiven) model->B4SOIpprt = 0.0; /* v3.0 */ if (!model->B4SOIpnigcGiven) model->B4SOIpnigc = 0.0; if (!model->B4SOIppigcdGiven) model->B4SOIppigcd = 0.0; if (!model->B4SOIppoxedgeGiven) model->B4SOIppoxedge = 0.0; if (!model->B4SOIpaigcGiven) model->B4SOIpaigc = 0.0; if (!model->B4SOIpbigcGiven) model->B4SOIpbigc = 0.0; if (!model->B4SOIpcigcGiven) model->B4SOIpcigc = 0.0; if (!model->B4SOIpaigsdGiven) model->B4SOIpaigsd = 0.0; if (!model->B4SOIpbigsdGiven) model->B4SOIpbigsd = 0.0; if (!model->B4SOIpcigsdGiven) model->B4SOIpcigsd = 0.0; if (!model->B4SOIpnpeakGiven) model->B4SOIpnpeak = 0.0; if (!model->B4SOIpnsubGiven) model->B4SOIpnsub = 0.0; if (!model->B4SOIpngateGiven) model->B4SOIpngate = 0.0; if (!model->B4SOIpnsdGiven) model->B4SOIpnsd = 0.0; if (!model->B4SOIpvth0Given) model->B4SOIpvth0 = 0.0; if (!model->B4SOIpvfbGiven) model->B4SOIpvfb = 0.0; /* v4.1 */ if (!model->B4SOIpk1Given) model->B4SOIpk1 = 0.0; if (!model->B4SOIpk1w1Given) model->B4SOIpk1w1 = 0.0; if (!model->B4SOIpk1w2Given) model->B4SOIpk1w2 = 0.0; if (!model->B4SOIpk2Given) model->B4SOIpk2 = 0.0; if (!model->B4SOIpk3Given) model->B4SOIpk3 = 0.0; if (!model->B4SOIpk3bGiven) model->B4SOIpk3b = 0.0; if (!model->B4SOIpkb1Given) model->B4SOIpkb1 = 0.0; if (!model->B4SOIpw0Given) model->B4SOIpw0 = 0.0; if (!model->B4SOIplpebGiven) model->B4SOIplpeb = 0.0; if (!model->B4SOIpdvt0Given) model->B4SOIpdvt0 = 0.0; if (!model->B4SOIpdvt1Given) model->B4SOIpdvt1 = 0.0; if (!model->B4SOIpdvt2Given) model->B4SOIpdvt2 = 0.0; if (!model->B4SOIpdvt0wGiven) model->B4SOIpdvt0w = 0.0; if (!model->B4SOIpdvt1wGiven) model->B4SOIpdvt1w = 0.0; if (!model->B4SOIpdvt2wGiven) model->B4SOIpdvt2w = 0.0; if (!model->B4SOIpu0Given) model->B4SOIpu0 = 0.0; if (!model->B4SOIpuaGiven) model->B4SOIpua = 0.0; if (!model->B4SOIpubGiven) model->B4SOIpub = 0.0; if (!model->B4SOIpucGiven) model->B4SOIpuc = 0.0; if (!model->B4SOIpvsatGiven) model->B4SOIpvsat = 0.0; if (!model->B4SOIpa0Given) model->B4SOIpa0 = 0.0; if (!model->B4SOIpagsGiven) model->B4SOIpags = 0.0; if (!model->B4SOIpb0Given) model->B4SOIpb0 = 0.0; if (!model->B4SOIpb1Given) model->B4SOIpb1 = 0.0; if (!model->B4SOIpketaGiven) model->B4SOIpketa = 0.0; if (!model->B4SOIpketasGiven) model->B4SOIpketas = 0.0; if (!model->B4SOIpa1Given) model->B4SOIpa1 = 0.0; if (!model->B4SOIpa2Given) model->B4SOIpa2 = 0.0; if (!model->B4SOIprdswGiven) model->B4SOIprdsw = 0.0; if (!model->B4SOIprswGiven) /* v4.0 */ model->B4SOIprsw = 0.0; if (!model->B4SOIprdwGiven) /* v4.0 */ model->B4SOIprdw = 0.0; if (!model->B4SOIpprwbGiven) model->B4SOIpprwb = 0.0; if (!model->B4SOIpprwgGiven) model->B4SOIpprwg = 0.0; if (!model->B4SOIpwrGiven) model->B4SOIpwr = 0.0; if (!model->B4SOIpnfactorGiven) model->B4SOIpnfactor = 0.0; if (!model->B4SOIpdwgGiven) model->B4SOIpdwg = 0.0; if (!model->B4SOIpdwbGiven) model->B4SOIpdwb = 0.0; if (!model->B4SOIpvoffGiven) model->B4SOIpvoff = 0.0; if (!model->B4SOIpeta0Given) model->B4SOIpeta0 = 0.0; if (!model->B4SOIpetabGiven) model->B4SOIpetab = 0.0; if (!model->B4SOIpdsubGiven) model->B4SOIpdsub = 0.0; if (!model->B4SOIpcitGiven) model->B4SOIpcit = 0.0; if (!model->B4SOIpcdscGiven) model->B4SOIpcdsc = 0.0; if (!model->B4SOIpcdscbGiven) model->B4SOIpcdscb = 0.0; if (!model->B4SOIpcdscdGiven) model->B4SOIpcdscd = 0.0; if (!model->B4SOIppclmGiven) model->B4SOIppclm = 0.0; if (!model->B4SOIppdibl1Given) model->B4SOIppdibl1 = 0.0; if (!model->B4SOIppdibl2Given) model->B4SOIppdibl2 = 0.0; if (!model->B4SOIppdiblbGiven) model->B4SOIppdiblb = 0.0; if (!model->B4SOIpdroutGiven) model->B4SOIpdrout = 0.0; if (!model->B4SOIppvagGiven) model->B4SOIppvag = 0.0; if (!model->B4SOIpdeltaGiven) model->B4SOIpdelta = 0.0; if (!model->B4SOIpalpha0Given) model->B4SOIpalpha0 = 0.0; if (!model->B4SOIpfbjtiiGiven) model->B4SOIpfbjtii = 0.0; /*4.1 Iii model*/ if (!model->B4SOIpebjtiiGiven) model->B4SOIpebjtii = 0.0; if (!model->B4SOIpcbjtiiGiven) model->B4SOIpcbjtii = 0.0; if (!model->B4SOIpvbciGiven) model->B4SOIpvbci = 0.0; if (!model->B4SOIpabjtiiGiven) model->B4SOIpabjtii = 0.0; if (!model->B4SOIpmbjtiiGiven) model->B4SOIpmbjtii = 0.0; if (!model->B4SOIpbeta0Given) model->B4SOIpbeta0 = 0.0; if (!model->B4SOIpbeta1Given) model->B4SOIpbeta1 = 0.0; if (!model->B4SOIpbeta2Given) model->B4SOIpbeta2 = 0.0; if (!model->B4SOIpvdsatii0Given) model->B4SOIpvdsatii0 = 0.0; if (!model->B4SOIpliiGiven) model->B4SOIplii = 0.0; if (!model->B4SOIpesatiiGiven) model->B4SOIpesatii = 0.0; if (!model->B4SOIpsii0Given) model->B4SOIpsii0 = 0.0; if (!model->B4SOIpsii1Given) model->B4SOIpsii1 = 0.0; if (!model->B4SOIpsii2Given) model->B4SOIpsii2 = 0.0; if (!model->B4SOIpsiidGiven) model->B4SOIpsiid = 0.0; if (!model->B4SOIpagidlGiven) model->B4SOIpagidl = 0.0; if (!model->B4SOIpbgidlGiven) model->B4SOIpbgidl = 0.0; if (!model->B4SOIpcgidlGiven) model->B4SOIpcgidl = 0.0; if (!model->B4SOIprgidlGiven) model->B4SOIprgidl = 0.0; if (!model->B4SOIpkgidlGiven) model->B4SOIpkgidl = 0.0; if (!model->B4SOIpfgidlGiven) model->B4SOIpfgidl = 0.0; if (!model->B4SOIpagislGiven) model->B4SOIpagisl = 0.0; if (!model->B4SOIpbgislGiven) model->B4SOIpbgisl = 0.0; if (!model->B4SOIpcgislGiven) model->B4SOIpcgisl = 0.0; if (!model->B4SOIprgislGiven) model->B4SOIprgisl = 0.0; if (!model->B4SOIpkgislGiven) model->B4SOIpkgisl = 0.0; if (!model->B4SOIpfgislGiven) model->B4SOIpfgisl = 0.0; if (!model->B4SOIpntunGiven) /* v4.0 */ model->B4SOIpntun = 0.0; if (!model->B4SOIpntundGiven) /* v4.0 */ model->B4SOIpntund = model->B4SOIpntun; if (!model->B4SOIpndiodeGiven) /* v4.0 */ model->B4SOIpndiode = 0.0; if (!model->B4SOIpndiodedGiven) /* v4.0 */ model->B4SOIpndioded = model->B4SOIpndiode; if (!model->B4SOIpnrecf0Given) /* v4.0 */ model->B4SOIpnrecf0 = 0.0; if (!model->B4SOIpnrecf0dGiven) /* v4.0 */ model->B4SOIpnrecf0d = model->B4SOIpnrecf0; if (!model->B4SOIpnrecr0Given) /* v4.0 */ model->B4SOIpnrecr0 = 0.0; if (!model->B4SOIpnrecr0dGiven) /* v4.0 */ model->B4SOIpnrecr0d = model->B4SOIpnrecr0; if (!model->B4SOIpisbjtGiven) model->B4SOIpisbjt = 0.0; if (!model->B4SOIpidbjtGiven) model->B4SOIpidbjt = model->B4SOIpisbjt; if (!model->B4SOIpisdifGiven) model->B4SOIpisdif = 0.0; if (!model->B4SOIpiddifGiven) model->B4SOIpiddif = model->B4SOIpisdif; /* v4.0 */ if (!model->B4SOIpisrecGiven) model->B4SOIpisrec = 0.0; if (!model->B4SOIpidrecGiven) model->B4SOIpidrec = model->B4SOIpisrec; if (!model->B4SOIpistunGiven) model->B4SOIpistun = 0.0; if (!model->B4SOIpidtunGiven) model->B4SOIpidtun = model->B4SOIpistun; if (!model->B4SOIpvrec0Given) /* v4.0 */ model->B4SOIpvrec0 = 0.0; if (!model->B4SOIpvrec0dGiven) /* v4.0 */ model->B4SOIpvrec0d = model->B4SOIpvrec0; if (!model->B4SOIpvtun0Given) /* v4.0 */ model->B4SOIpvtun0 = 0.0; if (!model->B4SOIpvtun0dGiven) /* v4.0 */ model->B4SOIpvtun0d = model->B4SOIpvtun0; if (!model->B4SOIpnbjtGiven) model->B4SOIpnbjt = 0.0; if (!model->B4SOIplbjt0Given) model->B4SOIplbjt0 = 0.0; if (!model->B4SOIpvabjtGiven) model->B4SOIpvabjt = 0.0; if (!model->B4SOIpaelyGiven) model->B4SOIpaely = 0.0; if (!model->B4SOIpahliGiven) /* v4.0 */ model->B4SOIpahli = 0.0; if (!model->B4SOIpahlidGiven) /* v4.0 */ model->B4SOIpahlid = model->B4SOIpahli; /* v3.1 for RF */ if (!model->B4SOIpxrcrg1Given) model->B4SOIpxrcrg1 =0.0; if (!model->B4SOIpxrcrg2Given) model->B4SOIpxrcrg2 =0.0; /* v3.1 for RF end */ /* CV Model */ if (!model->B4SOIpvsdfbGiven) model->B4SOIpvsdfb = 0.0; if (!model->B4SOIpvsdthGiven) model->B4SOIpvsdth = 0.0; if (!model->B4SOIpdelvtGiven) model->B4SOIpdelvt = 0.0; if (!model->B4SOIpacdeGiven) model->B4SOIpacde = 0.0; if (!model->B4SOIpmoinGiven) model->B4SOIpmoin = 0.0; if (!model->B4SOIpnoffGiven) model->B4SOIpnoff = 0.0; /* v3.2 */ /* Added for binning - END */ if (!model->B4SOIcfGiven) model->B4SOIcf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->B4SOItox); if (!model->B4SOIcgdoGiven) { if (model->B4SOIdlcGiven && (model->B4SOIdlc > 0.0)) { model->B4SOIcgdo = model->B4SOIdlc * model->B4SOIcox - model->B4SOIcgdl ; } else model->B4SOIcgdo = 0.6 * model->B4SOIxj * model->B4SOIcox; } if (!model->B4SOIcgsoGiven) { if (model->B4SOIdlcGiven && (model->B4SOIdlc > 0.0)) { model->B4SOIcgso = model->B4SOIdlc * model->B4SOIcox - model->B4SOIcgsl ; } else model->B4SOIcgso = 0.6 * model->B4SOIxj * model->B4SOIcox; } if (!model->B4SOIcgeoGiven) { model->B4SOIcgeo = 0.0; } if (!model->B4SOIxpartGiven) model->B4SOIxpart = 0.0; if (!model->B4SOIsheetResistanceGiven) model->B4SOIsheetResistance = 0.0; if (!model->B4SOIcsdeswGiven) model->B4SOIcsdesw = 0.0; if (!model->B4SOIunitLengthGateSidewallJctCapSGiven) /* v4.0 */ model->B4SOIunitLengthGateSidewallJctCapS = 1e-10; if (!model->B4SOIunitLengthGateSidewallJctCapDGiven) /* v4.0 */ model->B4SOIunitLengthGateSidewallJctCapD = model->B4SOIunitLengthGateSidewallJctCapS; if (!model->B4SOIGatesidewallJctSPotentialGiven) /* v4.0 */ model->B4SOIGatesidewallJctSPotential = 0.7; if (!model->B4SOIGatesidewallJctDPotentialGiven) /* v4.0 */ model->B4SOIGatesidewallJctDPotential = model->B4SOIGatesidewallJctSPotential; if (!model->B4SOIbodyJctGateSideSGradingCoeffGiven) /* v4.0 */ model->B4SOIbodyJctGateSideSGradingCoeff = 0.5; if (!model->B4SOIbodyJctGateSideDGradingCoeffGiven) /* v4.0 */ model->B4SOIbodyJctGateSideDGradingCoeff = model->B4SOIbodyJctGateSideSGradingCoeff; if (!model->B4SOIoxideTrapDensityAGiven) { if (model->B4SOItype == NMOS) model->B4SOIoxideTrapDensityA = 6.25e41; else model->B4SOIoxideTrapDensityA=6.188e40; } if (!model->B4SOIoxideTrapDensityBGiven) { if (model->B4SOItype == NMOS) model->B4SOIoxideTrapDensityB = 3.125e26; else model->B4SOIoxideTrapDensityB = 1.5e25; } if (!model->B4SOIoxideTrapDensityCGiven) model->B4SOIoxideTrapDensityC = 8.75e9; if (!model->B4SOIemGiven) model->B4SOIem = 4.1e7; /* V/m */ if (!model->B4SOIefGiven) model->B4SOIef = 1.0; if (!model->B4SOIafGiven) model->B4SOIaf = 1.0; if (!model->B4SOIkfGiven) model->B4SOIkf = 0.0; if (!model->B4SOInoifGiven) model->B4SOInoif = 1.0; if (!model->B4SOIbfGiven) /* v4.0 */ model->B4SOIbf = 2.0; if (!model->B4SOIw0flkGiven) /* v4.0 */ model->B4SOIw0flk = 10.0e-6; if (!model->B4SOIfrbodyGiven) /* v4.0 */ model->B4SOIfrbody = 1; if (!model->B4SOIdvtp0Given) /* v4.0 for Vth */ model->B4SOIdvtp0 = 0.0; if (!model->B4SOIdvtp1Given) /* v4.0 for Vth */ model->B4SOIdvtp1 = 0.0; if (!model->B4SOIdvtp2Given) /* v4.1 for Vth */ model->B4SOIdvtp2 = 0.0; if (!model->B4SOIdvtp3Given) /* v4.1 for Vth */ model->B4SOIdvtp3 = 0.0; if (!model->B4SOIdvtp4Given) /* v4.1 for Vth */ model->B4SOIdvtp4 = 0.0; if (!model->B4SOIldvtp0Given) /* v4.0 for Vth */ model->B4SOIldvtp0 = 0.0; if (!model->B4SOIldvtp1Given) /* v4.0 for Vth */ model->B4SOIldvtp1 = 0.0; if (!model->B4SOIldvtp2Given) /* v4.1 for Vth */ model->B4SOIldvtp2 = 0.0; if (!model->B4SOIldvtp3Given) /* v4.1 for Vth */ model->B4SOIldvtp3 = 0.0; if (!model->B4SOIldvtp4Given) /* v4.1 for Vth */ model->B4SOIldvtp4 = 0.0; if (!model->B4SOIwdvtp0Given) /* v4.0 for Vth */ model->B4SOIwdvtp0 = 0.0; if (!model->B4SOIwdvtp1Given) /* v4.0 for Vth */ model->B4SOIwdvtp1 = 0.0; if (!model->B4SOIwdvtp2Given) /* v4.1 for Vth */ model->B4SOIwdvtp2 = 0.0; if (!model->B4SOIwdvtp3Given) /* v4.1 for Vth */ model->B4SOIwdvtp3 = 0.0; if (!model->B4SOIwdvtp4Given) /* v4.1 for Vth */ model->B4SOIwdvtp4 = 0.0; if (!model->B4SOIpdvtp0Given) /* v4.0 for Vth */ model->B4SOIpdvtp0 = 0.0; if (!model->B4SOIpdvtp1Given) /* v4.0 for Vth */ model->B4SOIpdvtp1 = 0.0; if (!model->B4SOIpdvtp2Given) /* v4.1 for Vth */ model->B4SOIpdvtp2 = 0.0; if (!model->B4SOIpdvtp3Given) /* v4.1 for Vth */ model->B4SOIpdvtp3 = 0.0; if (!model->B4SOIpdvtp4Given) /* v4.1 for Vth */ model->B4SOIpdvtp4 = 0.0; if (!model->B4SOIminvGiven) /* v4.0 for Vgsteff */ model->B4SOIminv = 0.0; if (!model->B4SOIlminvGiven) /* v4.0 for Vgsteff */ model->B4SOIlminv = 0.0; if (!model->B4SOIwminvGiven) /* v4.0 for Vgsteff */ model->B4SOIwminv = 0.0; if (!model->B4SOIpminvGiven) /* v4.0 for Vgsteff */ model->B4SOIpminv = 0.0; if (!model->B4SOIfproutGiven) /* v4.0 for DITS in Id */ model->B4SOIfprout = 0.0; if (!model->B4SOIpditsGiven) model->B4SOIpdits = 1e-20; if (!model->B4SOIpditsdGiven) model->B4SOIpditsd = 0.0; if (!model->B4SOIpditslGiven) model->B4SOIpditsl = 0.0; if (!model->B4SOIlfproutGiven) model->B4SOIlfprout = 0.0; if (!model->B4SOIlpditsGiven) model->B4SOIlpdits = 0.0; if (!model->B4SOIlpditsdGiven) model->B4SOIlpditsd = 0.0; if (!model->B4SOIwfproutGiven) model->B4SOIwfprout = 0.0; if (!model->B4SOIwpditsGiven) model->B4SOIwpdits = 0.0; if (!model->B4SOIwpditsdGiven) model->B4SOIwpditsd = 0.0; if (!model->B4SOIpfproutGiven) model->B4SOIpfprout = 0.0; if (!model->B4SOIppditsGiven) model->B4SOIppdits = 0.0; if (!model->B4SOIppditsdGiven) model->B4SOIppditsd = 0.0; /* v4.0 stress effect */ if (!model->B4SOIsarefGiven) model->B4SOIsaref = 1e-6; /* m */ if (!model->B4SOIsbrefGiven) model->B4SOIsbref = 1e-6; /* m */ if (!model->B4SOIwlodGiven) model->B4SOIwlod = 0; /* m */ if (!model->B4SOIku0Given) model->B4SOIku0 = 0; /* 1/m */ if (!model->B4SOIkvsatGiven) model->B4SOIkvsat = 0; if (!model->B4SOIkvth0Given) /* m */ model->B4SOIkvth0 = 0; if (!model->B4SOItku0Given) model->B4SOItku0 = 0; if (!model->B4SOIllodku0Given) model->B4SOIllodku0 = 0; if (!model->B4SOIwlodku0Given) model->B4SOIwlodku0 = 0; if (!model->B4SOIllodvthGiven) model->B4SOIllodvth = 0; if (!model->B4SOIwlodvthGiven) model->B4SOIwlodvth = 0; if (!model->B4SOIlku0Given) model->B4SOIlku0 = 0; if (!model->B4SOIwku0Given) model->B4SOIwku0 = 0; if (!model->B4SOIpku0Given) model->B4SOIpku0 = 0; if (!model->B4SOIlkvth0Given) model->B4SOIlkvth0 = 0; if (!model->B4SOIwkvth0Given) model->B4SOIwkvth0 = 0; if (!model->B4SOIpkvth0Given) model->B4SOIpkvth0 = 0; if (!model->B4SOIstk2Given) model->B4SOIstk2 = 0; if (!model->B4SOIlodk2Given) model->B4SOIlodk2 = 1.0; if (!model->B4SOIsteta0Given) model->B4SOIsteta0 = 0; if (!model->B4SOIlodeta0Given) model->B4SOIlodeta0 = 1.0; /* stress effect end */ if (!model->B4SOIvgsMaxGiven) model->B4SOIvgsMax = 1e99; if (!model->B4SOIvgdMaxGiven) model->B4SOIvgdMax = 1e99; if (!model->B4SOIvgbMaxGiven) model->B4SOIvgbMax = 1e99; if (!model->B4SOIvdsMaxGiven) model->B4SOIvdsMax = 1e99; if (!model->B4SOIvbsMaxGiven) model->B4SOIvbsMax = 1e99; if (!model->B4SOIvbdMaxGiven) model->B4SOIvbdMax = 1e99; if (!model->B4SOIfdModGiven) model->B4SOIfdMod = 0; if (!model->B4SOIvsceGiven) model->B4SOIvsce = 0.0; if (!model->B4SOIcdsbsGiven) model->B4SOIcdsbs = 0.0; if (!model->B4SOIminvcvGiven) /* v4.1 for Vgsteffcv */ model->B4SOIminvcv = 0.0; if (!model->B4SOIlminvcvGiven) /* v4.1 for Vgsteffcv */ model->B4SOIlminvcv = 0.0; if (!model->B4SOIwminvcvGiven) /* v4.1 for Vgsteffcv */ model->B4SOIwminvcv = 0.0; if (!model->B4SOIpminvcvGiven) /* v4.1 for Vgsteffcv */ model->B4SOIpminvcv = 0.0; if (!model->B4SOIvoffcvGiven) /*model->B4SOIvoffcv = -0.08; v4.2 */ model->B4SOIvoffcv = 0.0; if (!model->B4SOIlvoffcvGiven) model->B4SOIlvoffcv = 0.0; if (!model->B4SOIwvoffcvGiven) model->B4SOIwvoffcv = 0.0; if (!model->B4SOIpvoffcvGiven) model->B4SOIpvoffcv = 0.0; /* loop through all the instances of the model */ for (here = model->B4SOIinstances; here != NULL ; here=here->B4SOInextInstance) { /* allocate a chunk of the state vector */ here->B4SOIstates = *states; *states += B4SOInumStates; /* perform the parameter defaulting */ if (!here->B4SOIdrainAreaGiven) here->B4SOIdrainArea = 0.0; if (!here->B4SOIdrainPerimeterGiven) here->B4SOIdrainPerimeter = 0.0; if (!here->B4SOIdrainSquaresGiven) here->B4SOIdrainSquares = 1.0; if (!here->B4SOIicVBSGiven) here->B4SOIicVBS = 0; if (!here->B4SOIicVDSGiven) here->B4SOIicVDS = 0; if (!here->B4SOIicVGSGiven) here->B4SOIicVGS = 0; if (!here->B4SOIicVESGiven) here->B4SOIicVES = 0; if (!here->B4SOIicVPSGiven) here->B4SOIicVPS = 0; if (!here->B4SOIbjtoffGiven) here->B4SOIbjtoff = 0; if (!here->B4SOIdebugModGiven) here->B4SOIdebugMod = 0; if (!here->B4SOIrth0Given) here->B4SOIrth0 = model->B4SOIrth0; if (!here->B4SOIcth0Given) here->B4SOIcth0 = model->B4SOIcth0; if (!here->B4SOIbodySquaresGiven) here->B4SOIbodySquares = 1.0; if (!here->B4SOIfrbodyGiven) here->B4SOIfrbody = model->B4SOIfrbody; /* v4.0 */ if (!here->B4SOIlGiven) here->B4SOIl = 5e-6; if (!here->B4SOIsourceAreaGiven) here->B4SOIsourceArea = 0; if (!here->B4SOIsourcePerimeterGiven) here->B4SOIsourcePerimeter = 0; if (!here->B4SOIsourceSquaresGiven) here->B4SOIsourceSquares = 1; if (!here->B4SOIwGiven) here->B4SOIw = 5e-6; if (!here->B4SOImGiven) here->B4SOIm = 1; /* v2.0 release */ if (!here->B4SOInbcGiven) here->B4SOInbc = 0; if (!here->B4SOInsegGiven) here->B4SOInseg = 1; if (!here->B4SOIpdbcpGiven) here->B4SOIpdbcp = 0; if (!here->B4SOIpsbcpGiven) here->B4SOIpsbcp = 0; if (!here->B4SOIagbcpGiven) here->B4SOIagbcp = 0; if (!here->B4SOIagbcp2Given) here->B4SOIagbcp2 = 0; /* v4.1 */ if (!here->B4SOIagbcpdGiven) here->B4SOIagbcpd = here->B4SOIagbcp; if (!here->B4SOIaebcpGiven) here->B4SOIaebcp = 0; if (!here->B4SOIoffGiven) here->B4SOIoff = 0; /* process drain series resistance */ if ( ((model->B4SOIsheetResistance > 0.0) && (here->B4SOIdrainSquares > 0.0 ) && (here->B4SOIdNodePrime == 0)) ) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"drain"); if(error) return(error); here->B4SOIdNodePrime = tmp->number; } else { here->B4SOIdNodePrime = here->B4SOIdNode; } /* process source series resistance */ if ( ((model->B4SOIsheetResistance > 0.0) && (here->B4SOIsourceSquares > 0.0 ) && (here->B4SOIsNodePrime == 0)) ) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"source"); if(error) return(error); here->B4SOIsNodePrime = tmp->number; } else { here->B4SOIsNodePrime = here->B4SOIsNode; } /* v4.4 -- Check of TsiMax for SOIMOD = 2 */ if (model->B4SOIsoiMod == 2){ if (model->B4SOImtrlMod){ NchMax = (model->B4SOIbg0sub - 0.1) / Charge_q * 2.0e-6 * epssub / (model->B4SOIetsi * model->B4SOIetsi); if (model->B4SOInpeak > NchMax ){ printf("Warning: SOIMOD=2 can not support given Nch=%g cm^-3 and Etsi=%g m. \n ", model->B4SOInpeak, model->B4SOIetsi); printf("Exceeds maximum allowed band bending of (Eg-0.1)eV. \n"); printf("Nch is set to %g cm^-3. \n",NchMax); model->B4SOInpeak = NchMax; } } else { NchMax = (1.12 - 0.1) / Charge_q * 2.0e-6 * epssub / (model->B4SOItsi * model->B4SOItsi); if (model->B4SOInpeak > NchMax ) { printf("Warning: SOIMOD=2 can not support given Nch=%g cm^-3 and Tsi=%g m. \n", model->B4SOInpeak, model->B4SOItsi); printf("Exceeds maximum allowed band bending of (Eg-0.1)eV. \n"); printf("Nch is set to %g cm^-3. \n",NchMax); model->B4SOInpeak = NchMax; } } } /* process effective silicon film thickness */ model->B4SOIcbox = 3.453133e-11 / model->B4SOItbox; if(model->B4SOImtrlMod) { model->B4SOIcsi = 1.03594e-10 / model->B4SOIetsi; } else { model->B4SOIcsi = 1.03594e-10 / model->B4SOItsi; } Cboxt = model->B4SOIcbox * model->B4SOIcsi / (model->B4SOIcbox + model->B4SOIcsi); /* v3.2 */ if(model->B4SOImtrlMod) { Qsi = Charge_q * model->B4SOInpeak * (1.0 + model->B4SOIlpe0 / here->B4SOIl) * 1e6 * model->B4SOIetsi; } else { Qsi = Charge_q * model->B4SOInpeak * (1.0 + model->B4SOIlpe0 / here->B4SOIl) * 1e6 * model->B4SOItsi; } Vbs0t = 0.8 - 0.5 * Qsi / model->B4SOIcsi + model->B4SOIvbsa; if (!here->B4SOIsoiModGiven) here->B4SOIsoiMod = model->B4SOIsoiMod; else if ((here->B4SOIsoiMod != 0) && (here->B4SOIsoiMod != 1) && (here->B4SOIsoiMod != 2) && (here->B4SOIsoiMod != 3)) { here->B4SOIsoiMod = model->B4SOIsoiMod; printf("Warning: soiMod has been set to its global value %d.\n", model->B4SOIsoiMod); } if (here->B4SOIsoiMod == 3) { /* auto selection */ if (Vbs0t > model->B4SOIvbs0fd) here->B4SOIsoiMod = 2; /* ideal FD mode */ else { if (Vbs0t < model->B4SOIvbs0pd) here->B4SOIsoiMod = 0; /* BSIMPD */ else here->B4SOIsoiMod = 1; } } here->B4SOIfloat = 0; if (here->B4SOIsoiMod == 2) /* v3.2 */ { here->B4SOIbNode = here->B4SOIpNode = 0; here->B4SOIbodyMod = 0; } /* For ideal FD, body contact is disabled and no body node */ else { if (here->B4SOIpNode == -1) { /* floating body case -- 4-node */ error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"Body"); if (error) return(error); here->B4SOIbNode = tmp->number; here->B4SOIpNode = 0; here->B4SOIfloat = 1; here->B4SOIbodyMod = 0; } else /* the 5th Node has been assigned */ { if (!here->B4SOItnodeoutGiven) { /* if t-node not assigned */ if (here->B4SOIbNode == -1) { /* 5-node body tie, bNode has not been assigned */ if ((model->B4SOIrbody == 0.0) && (model->B4SOIrbsh == 0.0)) { /* ideal body tie, pNode is not used */ here->B4SOIbNode = here->B4SOIpNode; here->B4SOIbodyMod = 2; } else { /* nonideal body tie */ error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Body"); if (error) return(error); here->B4SOIbNode = tmp->number; here->B4SOIbodyMod = 1; } } else { /* 6-node body tie, bNode has been assigned */ if ((model->B4SOIrbody == 0.0) && (model->B4SOIrbsh == 0.0)) { printf("\n Warning: model parameter rbody=0!\n"); model->B4SOIrbody = 1e0; here->B4SOIbodyMod = 1; } else { /* nonideal body tie */ here->B4SOIbodyMod = 1; } } } else { /* t-node assigned */ if (here->B4SOIbNode == -1) { /* 4 nodes & t-node, floating body */ error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Body"); if (error) return(error); here->B4SOIbNode = tmp->number; here->B4SOItempNode = here->B4SOIpNode; here->B4SOIpNode = 0; here->B4SOIfloat = 1; here->B4SOIbodyMod = 0; } else { /* 5 or 6 nodes & t-node, body-contact device */ if (here->B4SOItempNode == -1) { /* 5 nodes & tnode */ if ((model->B4SOIrbody == 0.0) && (model->B4SOIrbsh == 0.0)) { /* ideal body tie, pNode is not used */ here->B4SOItempNode = here->B4SOIbNode; here->B4SOIbNode = here->B4SOIpNode; here->B4SOIbodyMod = 2; } else { /* nonideal body tie */ here->B4SOItempNode = here->B4SOIbNode; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Body"); if (error) return(error); here->B4SOIbNode = tmp->number; here->B4SOIbodyMod = 1; } } else { /* 6 nodes & t-node */ if ((model->B4SOIrbody == 0.0) && (model->B4SOIrbsh == 0.0)) { printf("\n Warning: model parameter rbody=0!\n"); model->B4SOIrbody = 1e0; here->B4SOIbodyMod = 1; } else { /* nonideal body tie */ here->B4SOIbodyMod = 1; } } } } } } if ((model->B4SOIshMod == 1) && (here->B4SOIrth0!=0)) { if (here->B4SOItempNode == -1) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"Temp"); if (error) return(error); here->B4SOItempNode = tmp->number; } } else { here->B4SOItempNode = 0; } /* v3.1 added for RF */ if (!here->B4SOIrgateModGiven) here->B4SOIrgateMod = model->B4SOIrgateMod; else if ((here->B4SOIrgateMod != 0) && (here->B4SOIrgateMod != 1) && (here->B4SOIrgateMod != 2) && (here->B4SOIrgateMod != 3)) { here->B4SOIrgateMod = model->B4SOIrgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->B4SOIrgateMod); } if (here->B4SOIrgateMod > 0) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"gate"); if(error) return(error); here->B4SOIgNode = tmp->number; if (here->B4SOIrgateMod == 1) { if (model->B4SOIrshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->B4SOIrgateMod == 2) { if (model->B4SOIrshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2!!!\n"); else if (model->B4SOIxrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2!!!\n"); } } else { here->B4SOIgNode = here->B4SOIgNodeExt; } if (here->B4SOIrgateMod == 3) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"midgate"); if(error) return(error); here->B4SOIgNodeMid = tmp->number; if (model->B4SOIrshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (model->B4SOIxrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3. \n"); } else here->B4SOIgNodeMid = here->B4SOIgNodeExt; /* v3.1 added for RF end */ /* v4.0 */ if (!here->B4SOIrbodyModGiven) here->B4SOIrbodyMod = model->B4SOIrbodyMod; else if ((here->B4SOIrbodyMod != 0) && (here->B4SOIrbodyMod != 1)) { here->B4SOIrbodyMod = model->B4SOIrbodyMod; printf("Warning: rbodyMod has been set to its global value %d. \n", model->B4SOIrbodyMod); } if (here->B4SOIrbodyMod ==1 && here->B4SOIsoiMod == 2) /* v4.0 */ here->B4SOIrbodyMod = 0; if (here->B4SOIrbodyMod == 1) { if (here->B4SOIdbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"dbody"); if(error) return(error); here->B4SOIdbNode = tmp->number; } if (here->B4SOIsbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->B4SOIname,"sbody"); if(error) return(error); here->B4SOIsbNode = tmp->number; } } else here->B4SOIdbNode = here->B4SOIsbNode = here->B4SOIbNode; /* v4.0 end */ /* v4.0 added */ if (!here->B4SOIsaGiven) /* stress */ here->B4SOIsa = 0.0; if (!here->B4SOIsbGiven) here->B4SOIsb = 0.0; if (!here->B4SOIsdGiven) here->B4SOIsd = 0.0; if (!here->B4SOInfGiven) here->B4SOInf = 1.0; if (!here->B4SOIrbdbGiven) here->B4SOIrbdb = model->B4SOIrbdb; /* in ohm */ if (!here->B4SOIrbsbGiven) here->B4SOIrbsb = model->B4SOIrbsb; if (!here->B4SOIdelvtoGiven) here->B4SOIdelvto = 0.0; /* v4.0 added end */ /* here for debugging purpose only */ if (here->B4SOIdebugMod != 0) { /* The real Vbs value */ error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Vbs"); if(error) return(error); here->B4SOIvbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ids"); if(error) return(error); here->B4SOIidsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ic"); if(error) return(error); here->B4SOIicNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ibs"); if(error) return(error); here->B4SOIibsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ibd"); if(error) return(error); here->B4SOIibdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Iii"); if(error) return(error); here->B4SOIiiiNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ig"); if(error) return(error); here->B4SOIigNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Gigg"); if(error) return(error); here->B4SOIgiggNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Gigd"); if(error) return(error); here->B4SOIgigdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Gigb"); if(error) return(error); here->B4SOIgigbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Igidl"); if(error) return(error); here->B4SOIigidlNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Itun"); if(error) return(error); here->B4SOIitunNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Ibp"); if(error) return(error); here->B4SOIibpNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Cbb"); if(error) return(error); here->B4SOIcbbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Cbd"); if(error) return(error); here->B4SOIcbdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Cbg"); if(error) return(error); here->B4SOIcbgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Qbf"); if(error) return(error); here->B4SOIqbfNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Qjs"); if(error) return(error); here->B4SOIqjsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B4SOIname, "Qjd"); if(error) return(error); here->B4SOIqjdNode = tmp->number; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ return(E_NOMEM);\ } } while(0) if ((model->B4SOIshMod == 1) && (here->B4SOIrth0!=0.0)) { TSTALLOC(B4SOITemptempPtr, B4SOItempNode, B4SOItempNode); TSTALLOC(B4SOITempdpPtr, B4SOItempNode, B4SOIdNodePrime); TSTALLOC(B4SOITempspPtr, B4SOItempNode, B4SOIsNodePrime); TSTALLOC(B4SOITempgPtr, B4SOItempNode, B4SOIgNode); TSTALLOC(B4SOITempbPtr, B4SOItempNode, B4SOIbNode); TSTALLOC(B4SOIGtempPtr, B4SOIgNode, B4SOItempNode); TSTALLOC(B4SOIDPtempPtr, B4SOIdNodePrime, B4SOItempNode); TSTALLOC(B4SOISPtempPtr, B4SOIsNodePrime, B4SOItempNode); TSTALLOC(B4SOIEtempPtr, B4SOIeNode, B4SOItempNode); TSTALLOC(B4SOIBtempPtr, B4SOIbNode, B4SOItempNode); if (here->B4SOIbodyMod == 1) { TSTALLOC(B4SOIPtempPtr, B4SOIpNode, B4SOItempNode); } /* v3.0 */ if (here->B4SOIsoiMod != 0) { /* v3.2 */ TSTALLOC(B4SOITempePtr, B4SOItempNode, B4SOIeNode); } } if (here->B4SOIbodyMod == 2) { /* Don't create any Jacobian entry for pNode */ } else if (here->B4SOIbodyMod == 1) { TSTALLOC(B4SOIBpPtr, B4SOIbNode, B4SOIpNode); TSTALLOC(B4SOIPbPtr, B4SOIpNode, B4SOIbNode); TSTALLOC(B4SOIPpPtr, B4SOIpNode, B4SOIpNode); /* 4.1 for Igb2_agbcp2 */ TSTALLOC(B4SOIPgPtr , B4SOIpNode, B4SOIgNode); TSTALLOC(B4SOIGpPtr , B4SOIgNode, B4SOIpNode); } /* v3.1 added for RF */ if (here->B4SOIrgateMod != 0) { TSTALLOC(B4SOIGEgePtr, B4SOIgNodeExt, B4SOIgNodeExt); TSTALLOC(B4SOIGEgPtr, B4SOIgNodeExt, B4SOIgNode); TSTALLOC(B4SOIGgePtr, B4SOIgNode, B4SOIgNodeExt); TSTALLOC(B4SOIGEdpPtr, B4SOIgNodeExt, B4SOIdNodePrime); TSTALLOC(B4SOIGEspPtr, B4SOIgNodeExt, B4SOIsNodePrime); if (here->B4SOIsoiMod !=2) /* v3.2 */ TSTALLOC(B4SOIGEbPtr, B4SOIgNodeExt, B4SOIbNode); TSTALLOC(B4SOIGMdpPtr, B4SOIgNodeMid, B4SOIdNodePrime); TSTALLOC(B4SOIGMgPtr, B4SOIgNodeMid, B4SOIgNode); TSTALLOC(B4SOIGMgmPtr, B4SOIgNodeMid, B4SOIgNodeMid); TSTALLOC(B4SOIGMgePtr, B4SOIgNodeMid, B4SOIgNodeExt); TSTALLOC(B4SOIGMspPtr, B4SOIgNodeMid, B4SOIsNodePrime); if (here->B4SOIsoiMod !=2) /* v3.2 */ TSTALLOC(B4SOIGMbPtr, B4SOIgNodeMid, B4SOIbNode); TSTALLOC(B4SOIGMePtr, B4SOIgNodeMid, B4SOIeNode); TSTALLOC(B4SOIDPgmPtr, B4SOIdNodePrime, B4SOIgNodeMid); TSTALLOC(B4SOIGgmPtr, B4SOIgNode, B4SOIgNodeMid); TSTALLOC(B4SOIGEgmPtr, B4SOIgNodeExt, B4SOIgNodeMid); TSTALLOC(B4SOISPgmPtr, B4SOIsNodePrime, B4SOIgNodeMid); TSTALLOC(B4SOIEgmPtr, B4SOIeNode, B4SOIgNodeMid); } /* v3.1 added for RF end */ /* v3.1 */ if (here->B4SOIsoiMod != 2) /* v3.2 */ { TSTALLOC(B4SOIEbPtr, B4SOIeNode, B4SOIbNode); TSTALLOC(B4SOIGbPtr, B4SOIgNode, B4SOIbNode); TSTALLOC(B4SOIDPbPtr, B4SOIdNodePrime, B4SOIbNode); TSTALLOC(B4SOISPbPtr, B4SOIsNodePrime, B4SOIbNode); TSTALLOC(B4SOIBePtr, B4SOIbNode, B4SOIeNode); TSTALLOC(B4SOIBgPtr, B4SOIbNode, B4SOIgNode); TSTALLOC(B4SOIBdpPtr, B4SOIbNode, B4SOIdNodePrime); TSTALLOC(B4SOIBspPtr, B4SOIbNode, B4SOIsNodePrime); TSTALLOC(B4SOIBbPtr, B4SOIbNode, B4SOIbNode); } /* v3.1 */ TSTALLOC(B4SOIEgPtr, B4SOIeNode, B4SOIgNode); TSTALLOC(B4SOIEdpPtr, B4SOIeNode, B4SOIdNodePrime); TSTALLOC(B4SOIEspPtr, B4SOIeNode, B4SOIsNodePrime); TSTALLOC(B4SOIGePtr, B4SOIgNode, B4SOIeNode); TSTALLOC(B4SOIDPePtr, B4SOIdNodePrime, B4SOIeNode); TSTALLOC(B4SOISPePtr, B4SOIsNodePrime, B4SOIeNode); TSTALLOC(B4SOIEbPtr, B4SOIeNode, B4SOIbNode); TSTALLOC(B4SOIEePtr, B4SOIeNode, B4SOIeNode); TSTALLOC(B4SOIGgPtr, B4SOIgNode, B4SOIgNode); TSTALLOC(B4SOIGdpPtr, B4SOIgNode, B4SOIdNodePrime); TSTALLOC(B4SOIGspPtr, B4SOIgNode, B4SOIsNodePrime); TSTALLOC(B4SOIDPgPtr, B4SOIdNodePrime, B4SOIgNode); TSTALLOC(B4SOIDPdpPtr, B4SOIdNodePrime, B4SOIdNodePrime); TSTALLOC(B4SOIDPspPtr, B4SOIdNodePrime, B4SOIsNodePrime); TSTALLOC(B4SOIDPdPtr, B4SOIdNodePrime, B4SOIdNode); TSTALLOC(B4SOISPgPtr, B4SOIsNodePrime, B4SOIgNode); TSTALLOC(B4SOISPdpPtr, B4SOIsNodePrime, B4SOIdNodePrime); TSTALLOC(B4SOISPspPtr, B4SOIsNodePrime, B4SOIsNodePrime); TSTALLOC(B4SOISPsPtr, B4SOIsNodePrime, B4SOIsNode); TSTALLOC(B4SOIDdPtr, B4SOIdNode, B4SOIdNode); TSTALLOC(B4SOIDdpPtr, B4SOIdNode, B4SOIdNodePrime); TSTALLOC(B4SOISsPtr, B4SOIsNode, B4SOIsNode); TSTALLOC(B4SOISspPtr, B4SOIsNode, B4SOIsNodePrime); /* v4.0 */ if (here->B4SOIrbodyMod == 1) { TSTALLOC(B4SOIDPdbPtr, B4SOIdNodePrime, B4SOIdbNode); TSTALLOC(B4SOISPsbPtr, B4SOIsNodePrime, B4SOIsbNode); TSTALLOC(B4SOIDBdpPtr, B4SOIdbNode, B4SOIdNodePrime); TSTALLOC(B4SOIDBdbPtr, B4SOIdbNode, B4SOIdbNode); TSTALLOC(B4SOIDBbPtr, B4SOIdbNode, B4SOIbNode); TSTALLOC(B4SOISBspPtr, B4SOIsbNode, B4SOIsNodePrime); TSTALLOC(B4SOISBsbPtr, B4SOIsbNode, B4SOIsbNode); TSTALLOC(B4SOISBbPtr, B4SOIsbNode, B4SOIbNode); TSTALLOC(B4SOIBdbPtr, B4SOIbNode, B4SOIdbNode); TSTALLOC(B4SOIBsbPtr, B4SOIbNode, B4SOIsbNode); } if (model->B4SOIrdsMod) { TSTALLOC(B4SOIDgPtr, B4SOIdNode, B4SOIgNode); TSTALLOC(B4SOIDspPtr, B4SOIdNode, B4SOIsNodePrime); TSTALLOC(B4SOISdpPtr, B4SOIsNode, B4SOIdNodePrime); TSTALLOC(B4SOISgPtr, B4SOIsNode, B4SOIgNode); if (model->B4SOIsoiMod != 2) { TSTALLOC(B4SOIDbPtr, B4SOIdNode, B4SOIbNode); TSTALLOC(B4SOISbPtr, B4SOIsNode, B4SOIbNode); } } /* v4.0 end*/ /* here for debugging purpose only */ if (here->B4SOIdebugMod != 0) { TSTALLOC(B4SOIVbsPtr, B4SOIvbsNode, B4SOIvbsNode); TSTALLOC(B4SOIIdsPtr, B4SOIidsNode, B4SOIidsNode); TSTALLOC(B4SOIIcPtr, B4SOIicNode, B4SOIicNode); TSTALLOC(B4SOIIbsPtr, B4SOIibsNode, B4SOIibsNode); TSTALLOC(B4SOIIbdPtr, B4SOIibdNode, B4SOIibdNode); TSTALLOC(B4SOIIiiPtr, B4SOIiiiNode, B4SOIiiiNode); TSTALLOC(B4SOIIgPtr, B4SOIigNode, B4SOIigNode); TSTALLOC(B4SOIGiggPtr, B4SOIgiggNode, B4SOIgiggNode); TSTALLOC(B4SOIGigdPtr, B4SOIgigdNode, B4SOIgigdNode); TSTALLOC(B4SOIGigbPtr, B4SOIgigbNode, B4SOIgigbNode); TSTALLOC(B4SOIIgidlPtr, B4SOIigidlNode, B4SOIigidlNode); TSTALLOC(B4SOIItunPtr, B4SOIitunNode, B4SOIitunNode); TSTALLOC(B4SOIIbpPtr, B4SOIibpNode, B4SOIibpNode); TSTALLOC(B4SOICbbPtr, B4SOIcbbNode, B4SOIcbbNode); TSTALLOC(B4SOICbdPtr, B4SOIcbdNode, B4SOIcbdNode); TSTALLOC(B4SOICbgPtr, B4SOIcbgNode, B4SOIcbgNode); TSTALLOC(B4SOIQbfPtr, B4SOIqbfNode, B4SOIqbfNode); TSTALLOC(B4SOIQjsPtr, B4SOIqjsNode, B4SOIqjsNode); TSTALLOC(B4SOIQjdPtr, B4SOIqjdNode, B4SOIqjdNode); } } } #ifdef USE_OMP InstCount = 0; model = (B4SOImodel*)inModel; /* loop through all the B4SOI device models to count the number of instances */ for( ; model != NULL; model = model->B4SOInextModel ) { /* loop through all the instances of the model */ for (here = model->B4SOIinstances; here != NULL ; here=here->B4SOInextInstance) { InstCount++; } } InstArray = TMALLOC(B4SOIinstance*, InstCount); model = (B4SOImodel*)inModel; idx = 0; for( ; model != NULL; model = model->B4SOInextModel ) { /* loop through all the instances of the model */ for (here = model->B4SOIinstances; here != NULL ; here=here->B4SOInextInstance) { InstArray[idx] = here; idx++; } /* set the array pointer and instance count into each model */ model->B4SOIInstCount = InstCount; model->B4SOIInstanceArray = InstArray; } #endif return(OK); } int B4SOIunsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM B4SOImodel *model; B4SOIinstance *here; for (model = (B4SOImodel *)inModel; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here != NULL; here=here->B4SOInextInstance) { if (here->B4SOIdNodePrime && here->B4SOIdNodePrime != here->B4SOIdNode) { CKTdltNNum(ckt, here->B4SOIdNodePrime); here->B4SOIdNodePrime = 0; } if (here->B4SOIsNodePrime && here->B4SOIsNodePrime != here->B4SOIsNode) { CKTdltNNum(ckt, here->B4SOIsNodePrime); here->B4SOIsNodePrime = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/bsimsoi/b4soisoachk.c0000644000265600020320000000714612264261473022266 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int B4SOIsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { B4SOImodel *model = (B4SOImodel *) inModel; B4SOIinstance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here; here = here->B4SOInextInstance) { vgs = fabs(ckt->CKTrhsOld [here->B4SOIgNode] - ckt->CKTrhsOld [here->B4SOIsNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->B4SOIgNode] - ckt->CKTrhsOld [here->B4SOIdNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->B4SOIgNode] - ckt->CKTrhsOld [here->B4SOIbNode]); vds = fabs(ckt->CKTrhsOld [here->B4SOIdNodePrime] - ckt->CKTrhsOld [here->B4SOIsNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->B4SOIbNode] - ckt->CKTrhsOld [here->B4SOIsNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->B4SOIbNode] - ckt->CKTrhsOld [here->B4SOIdNodePrime]); if (vgs > model->B4SOIvgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->B4SOIvgsMax); warns_vgs++; } if (vgd > model->B4SOIvgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->B4SOIvgdMax); warns_vgd++; } if (vgb > model->B4SOIvgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->B4SOIvgbMax); warns_vgb++; } if (vds > model->B4SOIvdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->B4SOIvdsMax); warns_vds++; } if (vbs > model->B4SOIvbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->B4SOIvbsMax); warns_vbs++; } if (vbd > model->B4SOIvbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->B4SOIvbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/bsimsoi/b4soitemp.c0000644000265600020320000025625012264261473021765 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soitemp.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soitemp.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 05/14/2010 * Modified by Tanvir Morshed 12/16/2010 **********/ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b4soidef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define EPS0 8.85418e-12 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Eg300 1.115 /* energy gap at 300K */ #define MAX_EXPL 2.688117142e+43 #define MIN_EXPL 3.720075976e-44 #define EXPL_THRESHOLD 100.0 #define DELTA 1.0E-9 #define DEXP(A,B) { \ if (A > EXPL_THRESHOLD) { \ B = MAX_EXPL*(1.0+(A)-EXPL_THRESHOLD); \ } else if (A < -EXPL_THRESHOLD) { \ B = MIN_EXPL; \ } else { \ B = exp(A); \ } \ } int B4SOItemp( GENmodel *inModel, CKTcircuit *ckt) { register B4SOImodel *model = (B4SOImodel*) inModel; register B4SOIinstance *here; struct b4soiSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, T6; double Ldrn=0.0, Wdrn; double Temp, TempRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double SDphi, SDgamma; double Inv_saref, Inv_sbref, Inv_sa, Inv_sb, rho, dvth0_lod; double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod, kvsat; int Size_Not_Found, i; double PowWeffWr, T10; /*v4.0 */ double Vtm0eot, Vtmeot,vbieot,phieot,sqrtphieot,vddeot; double Vgs_eff,Vgsteff, V0, Vth,Vgst; double lt1,ltw; double TempRatioMinus1; double n, VgstNVt, ExpArg, sqrtPhisExt,ExpVgst,Vgst2Vtm,vtfbphi2eot; double DIBL_Sft,Lpe_Vb,DITS_Sft,DeltVthtemp, DITS_Sft2; double Theta0,Delt_vth,DeltVthw; double niter,toxpf,toxpi, Tcen; double n0; double eggdep, agbc2n, agbc2p, bgbc2n, bgbc2p, sqrt2qeps; /* v4.3.1 bugfix for mtrlMod=1 -Tanvir */ /* v2.0 release */ double tmp3, T7; /*4.1*/ double epsrox, toxe, epssub; /* loop through all the B4SOI device models */ for (; model != NULL; model = model->B4SOInextModel) { Temp = ckt->CKTtemp; if (model->B4SOIGatesidewallJctSPotential < 0.1) /* v4.0 */ model->B4SOIGatesidewallJctSPotential = 0.1; if (model->B4SOIGatesidewallJctDPotential < 0.1) /* v4.0 */ model->B4SOIGatesidewallJctDPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->B4SOItnom; TempRatio = Temp / Tnom; if(model->B4SOImtrlMod) { epsrox = 3.9; toxe = model->B4SOIeot; epssub = EPS0 * model->B4SOIepsrsub; sqrt2qeps = sqrt(2.0 * 1.0e6 * Charge_q * epssub); /* bugfix 4.3.1 */ /* bugfix v4.3.1 following constants should be replaced with model params -Tanvir */ agbc2n = 3.42537e-7; agbc2p = 4.97232e-7; bgbc2n = 1.16645e12; bgbc2p = 7.45669e11; eggdep = 1.12; } else { epsrox = model->B4SOIepsrox; toxe = model->B4SOItox; epssub = EPSSI; sqrt2qeps = 5.753e-12; /* constant from v4.3.0 and earlier */ /* bugfix v4.3.1 following constants are valid for mtrlMod=0 -Tanvir */ agbc2n = 3.42537e-7; agbc2p = 4.97232e-7; bgbc2n = 1.16645e12; bgbc2p = 7.45669e11; eggdep = 1.12; } /*model->B4SOIcox = epsrox * EPS0 / toxe;*/ model->B4SOIvcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); if(model->B4SOImtrlMod == 0) model->B4SOIfactor1 = sqrt(EPSSI / EPSOX * model->B4SOItox); else model->B4SOIfactor1 = sqrt(epssub / (epsrox*EPS0) * toxe);/*4.1*/ if (model->B4SOImtrlMod==0) { Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); model->B4SOIeg0 = Eg0; model->B4SOIvtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); model->B4SOIeg = Eg; /* Bug fix #11 Jun 09 Eg is evaluated at Temp, not Tnom. To be used if no selfheat */ /* ni is in cm^-3 */ ni = 1.45e10 * (Temp / 300.15) * sqrt(Temp / 300.15) * exp(21.5565981 - Eg / (2.0 * model->B4SOIvtm)); } else { Vtm0 = KboQ * Tnom; Eg0 = model->B4SOIbg0sub - model->B4SOItbgasub * Tnom * Tnom / (Tnom + model->B4SOItbgbsub); model->B4SOIeg0 = Eg0; model->B4SOIvtm = KboQ * Temp; Eg = model->B4SOIbg0sub - model->B4SOItbgasub * Temp * Temp / (Temp + model->B4SOItbgbsub); model->B4SOIeg = Eg; /* Bug fix #11 Jun 09 Eg is evaluated at Temp, not Tnom. To be used if no selfheat */ ni = model->B4SOIni0sub * (Temp / Tnom) * sqrt(Temp / Tnom) * exp(Eg0/(2.0*Vtm0) - Eg / (2.0 * model->B4SOIvtm)); } /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->B4SOIinstances; here != NULL; here = here->B4SOInextInstance) { here->B4SOIrbodyext = here->B4SOIbodySquares * model->B4SOIrbsh; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->B4SOIl == pSizeDependParamKnot->Length) && (here->B4SOIw == pSizeDependParamKnot->Width) && (here->B4SOIrth0 == pSizeDependParamKnot->Rth0) && (here->B4SOIcth0 == pSizeDependParamKnot->Cth0) && (here->B4SOInf == pSizeDependParamKnot->NFinger)) /*4.0*/ { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /* v2.2.3 bug fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = (struct b4soiSizeDependParam *)malloc( sizeof(struct b4soiSizeDependParam)); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->B4SOIl; Wdrn = here->B4SOIw / here->B4SOInf; /* v4.0 */ pParam->Length = here->B4SOIl; pParam->Width = here->B4SOIw; pParam->NFinger = here->B4SOInf; /* v4.0 */ pParam->Rth0 = here->B4SOIrth0; pParam->Cth0 = here->B4SOIcth0; T0 = pow(Ldrn, model->B4SOILln); T1 = pow(Wdrn, model->B4SOILwn); tmp1 = model->B4SOILl / T0 + model->B4SOILw / T1 + model->B4SOILwl / (T0 * T1); pParam->B4SOIdl = model->B4SOILint + tmp1; /* v2.2.3 */ tmp1 = model->B4SOILlc / T0 + model->B4SOILwc / T1 + model->B4SOILwlc / (T0 * T1); pParam->B4SOIdlc = model->B4SOIdlc + tmp1; /* v3.0 */ pParam->B4SOIdlcig = model->B4SOIdlcig + tmp1; T2 = pow(Ldrn, model->B4SOIWln); T3 = pow(Wdrn, model->B4SOIWwn); tmp2 = model->B4SOIWl / T2 + model->B4SOIWw / T3 + model->B4SOIWwl / (T2 * T3); pParam->B4SOIdw = model->B4SOIWint + tmp2; /* v2.2.3 */ tmp2 = model->B4SOIWlc / T2 + model->B4SOIWwc / T3 + model->B4SOIWwlc / (T2 * T3); pParam->B4SOIdwc = model->B4SOIdwc + tmp2; pParam->B4SOIleff = here->B4SOIl - 2.0 * pParam->B4SOIdl; if (pParam->B4SOIleff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->B4SOIweff = here->B4SOIw / here->B4SOInf /* v4.0 */ - here->B4SOInbc * model->B4SOIdwbc - (2.0 - here->B4SOInbc) * pParam->B4SOIdw; if (pParam->B4SOIweff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->B4SOIwdiod = pParam->B4SOIweff / here->B4SOInseg + here->B4SOIpdbcp; pParam->B4SOIwdios = pParam->B4SOIweff / here->B4SOInseg + here->B4SOIpsbcp; pParam->B4SOIleffCV = here->B4SOIl - 2.0 * pParam->B4SOIdlc; if (pParam->B4SOIleffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->B4SOIweffCV = here->B4SOIw /here->B4SOInf /* v4.0 */ - here->B4SOInbc * model->B4SOIdwbc - (2.0 - here->B4SOInbc) * pParam->B4SOIdwc; if (pParam->B4SOIweffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->B4SOIwdiodCV = pParam->B4SOIweffCV / here->B4SOInseg + here->B4SOIpdbcp; pParam->B4SOIwdiosCV = pParam->B4SOIweffCV / here->B4SOInseg + here->B4SOIpsbcp; pParam->B4SOIleffCVb = here->B4SOIl - 2.0 * pParam->B4SOIdlc - model->B4SOIdlcb; if (pParam->B4SOIleffCVb <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel length for C-V (body) <= 0", namarray); return(E_BADPARM); } pParam->B4SOIleffCVbg = pParam->B4SOIleffCVb + 2 * model->B4SOIdlbg; if (pParam->B4SOIleffCVbg <= 0.0) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror))(ERR_FATAL, "B4SOI: mosfet %s, model %s: Effective channel length for C-V (backgate) <= 0", namarray); return(E_BADPARM); } /* Not binned - START */ pParam->B4SOIgamma1 = model->B4SOIgamma1; pParam->B4SOIgamma2 = model->B4SOIgamma2; pParam->B4SOIvbx = model->B4SOIvbx; pParam->B4SOIvbm = model->B4SOIvbm; pParam->B4SOIxt = model->B4SOIxt; /* Not binned - END */ /* CV model */ pParam->B4SOIcf = model->B4SOIcf; pParam->B4SOIclc = model->B4SOIclc; pParam->B4SOIcle = model->B4SOIcle; pParam->B4SOIabulkCVfactor = 1.0 + pow((pParam->B4SOIclc / pParam->B4SOIleff), pParam->B4SOIcle); /* Added for binning - START */ if (model->B4SOIbinUnit == 1) { Inv_L = 1.0e-6 / pParam->B4SOIleff; Inv_W = 1.0e-6 / pParam->B4SOIweff; Inv_LW = 1.0e-12 / (pParam->B4SOIleff * pParam->B4SOIweff); } else { Inv_L = 1.0 / pParam->B4SOIleff; Inv_W = 1.0 / pParam->B4SOIweff; Inv_LW = 1.0 / (pParam->B4SOIleff * pParam->B4SOIweff); } pParam->B4SOInpeak = model->B4SOInpeak + model->B4SOIlnpeak * Inv_L + model->B4SOIwnpeak * Inv_W + model->B4SOIpnpeak * Inv_LW; pParam->B4SOInsub = model->B4SOInsub + model->B4SOIlnsub * Inv_L + model->B4SOIwnsub * Inv_W + model->B4SOIpnsub * Inv_LW; pParam->B4SOIngate = model->B4SOIngate + model->B4SOIlngate * Inv_L + model->B4SOIwngate * Inv_W + model->B4SOIpngate * Inv_LW; /*4.1*/ pParam->B4SOInsd = model->B4SOInsd + model->B4SOIlnsd * Inv_L + model->B4SOIwnsd * Inv_W + model->B4SOIpnsd * Inv_LW; pParam->B4SOIvth0 = model->B4SOIvth0 + model->B4SOIlvth0 * Inv_L + model->B4SOIwvth0 * Inv_W + model->B4SOIpvth0 * Inv_LW; pParam->B4SOIvfb = model->B4SOIvfb + model->B4SOIlvfb * Inv_L + model->B4SOIwvfb * Inv_W + model->B4SOIpvfb * Inv_LW; /* v4.1 */ pParam->B4SOIk1 = model->B4SOIk1 + model->B4SOIlk1 * Inv_L + model->B4SOIwk1 * Inv_W + model->B4SOIpk1 * Inv_LW; pParam->B4SOIk2 = model->B4SOIk2 + model->B4SOIlk2 * Inv_L + model->B4SOIwk2 * Inv_W + model->B4SOIpk2 * Inv_LW; pParam->B4SOIk1w1 = model->B4SOIk1w1 + model->B4SOIlk1w1 * Inv_L + model->B4SOIwk1w1 * Inv_W + model->B4SOIpk1w1 * Inv_LW; pParam->B4SOIk1w2 = model->B4SOIk1w2 + model->B4SOIlk1w2 * Inv_L + model->B4SOIwk1w2 * Inv_W + model->B4SOIpk1w2 * Inv_LW; pParam->B4SOIk3 = model->B4SOIk3 + model->B4SOIlk3 * Inv_L + model->B4SOIwk3 * Inv_W + model->B4SOIpk3 * Inv_LW; pParam->B4SOIk3b = model->B4SOIk3b + model->B4SOIlk3b * Inv_L + model->B4SOIwk3b * Inv_W + model->B4SOIpk3b * Inv_LW; pParam->B4SOIkb1 = model->B4SOIkb1 + model->B4SOIlkb1 * Inv_L + model->B4SOIwkb1 * Inv_W + model->B4SOIpkb1 * Inv_LW; pParam->B4SOIw0 = model->B4SOIw0 + model->B4SOIlw0 * Inv_L + model->B4SOIww0 * Inv_W + model->B4SOIpw0 * Inv_LW; pParam->B4SOIlpe0 = model->B4SOIlpe0 + model->B4SOIllpe0 * Inv_L + model->B4SOIwlpe0 * Inv_W + model->B4SOIplpe0 * Inv_LW; pParam->B4SOIlpeb = model->B4SOIlpeb + model->B4SOIllpeb * Inv_L + model->B4SOIwlpeb * Inv_W + model->B4SOIplpeb * Inv_LW; /* v4.0 */ pParam->B4SOIdvt0 = model->B4SOIdvt0 + model->B4SOIldvt0 * Inv_L + model->B4SOIwdvt0 * Inv_W + model->B4SOIpdvt0 * Inv_LW; pParam->B4SOIdvt1 = model->B4SOIdvt1 + model->B4SOIldvt1 * Inv_L + model->B4SOIwdvt1 * Inv_W + model->B4SOIpdvt1 * Inv_LW; pParam->B4SOIdvt2 = model->B4SOIdvt2 + model->B4SOIldvt2 * Inv_L + model->B4SOIwdvt2 * Inv_W + model->B4SOIpdvt2 * Inv_LW; pParam->B4SOIdvt0w = model->B4SOIdvt0w + model->B4SOIldvt0w * Inv_L + model->B4SOIwdvt0w * Inv_W + model->B4SOIpdvt0w * Inv_LW; pParam->B4SOIdvt1w = model->B4SOIdvt1w + model->B4SOIldvt1w * Inv_L + model->B4SOIwdvt1w * Inv_W + model->B4SOIpdvt1w * Inv_LW; pParam->B4SOIdvt2w = model->B4SOIdvt2w + model->B4SOIldvt2w * Inv_L + model->B4SOIwdvt2w * Inv_W + model->B4SOIpdvt2w * Inv_LW; pParam->B4SOIu0 = model->B4SOIu0 + model->B4SOIlu0 * Inv_L + model->B4SOIwu0 * Inv_W + model->B4SOIpu0 * Inv_LW; pParam->B4SOIua = model->B4SOIua + model->B4SOIlua * Inv_L + model->B4SOIwua * Inv_W + model->B4SOIpua * Inv_LW; pParam->B4SOIub = model->B4SOIub + model->B4SOIlub * Inv_L + model->B4SOIwub * Inv_W + model->B4SOIpub * Inv_LW; pParam->B4SOIuc = model->B4SOIuc + model->B4SOIluc * Inv_L + model->B4SOIwuc * Inv_W + model->B4SOIpuc * Inv_LW; pParam->B4SOIvsat = model->B4SOIvsat + model->B4SOIlvsat * Inv_L + model->B4SOIwvsat * Inv_W + model->B4SOIpvsat * Inv_LW; pParam->B4SOIa0 = model->B4SOIa0 + model->B4SOIla0 * Inv_L + model->B4SOIwa0 * Inv_W + model->B4SOIpa0 * Inv_LW; pParam->B4SOIags = model->B4SOIags + model->B4SOIlags * Inv_L + model->B4SOIwags * Inv_W + model->B4SOIpags * Inv_LW; pParam->B4SOIb0 = model->B4SOIb0 + model->B4SOIlb0 * Inv_L + model->B4SOIwb0 * Inv_W + model->B4SOIpb0 * Inv_LW; pParam->B4SOIb1 = model->B4SOIb1 + model->B4SOIlb1 * Inv_L + model->B4SOIwb1 * Inv_W + model->B4SOIpb1 * Inv_LW; pParam->B4SOIketa = model->B4SOIketa + model->B4SOIlketa * Inv_L + model->B4SOIwketa * Inv_W + model->B4SOIpketa * Inv_LW; pParam->B4SOIketas = model->B4SOIketas + model->B4SOIlketas * Inv_L + model->B4SOIwketas * Inv_W + model->B4SOIpketas * Inv_LW; pParam->B4SOIa1 = model->B4SOIa1 + model->B4SOIla1 * Inv_L + model->B4SOIwa1 * Inv_W + model->B4SOIpa1 * Inv_LW; pParam->B4SOIa2 = model->B4SOIa2 + model->B4SOIla2 * Inv_L + model->B4SOIwa2 * Inv_W + model->B4SOIpa2 * Inv_LW; pParam->B4SOIrdsw = model->B4SOIrdsw + model->B4SOIlrdsw * Inv_L + model->B4SOIwrdsw * Inv_W + model->B4SOIprdsw * Inv_LW; pParam->B4SOIrsw = model->B4SOIrsw /* v4.0 */ + model->B4SOIlrsw * Inv_L + model->B4SOIwrsw * Inv_W + model->B4SOIprsw * Inv_LW; pParam->B4SOIrdw = model->B4SOIrdw /* v4.0 */ + model->B4SOIlrdw * Inv_L + model->B4SOIwrdw * Inv_W + model->B4SOIprdw * Inv_LW; pParam->B4SOIprwb = model->B4SOIprwb + model->B4SOIlprwb * Inv_L + model->B4SOIwprwb * Inv_W + model->B4SOIpprwb * Inv_LW; pParam->B4SOIprwg = model->B4SOIprwg + model->B4SOIlprwg * Inv_L + model->B4SOIwprwg * Inv_W + model->B4SOIpprwg * Inv_LW; pParam->B4SOIwr = model->B4SOIwr + model->B4SOIlwr * Inv_L + model->B4SOIwwr * Inv_W + model->B4SOIpwr * Inv_LW; pParam->B4SOInfactor = model->B4SOInfactor + model->B4SOIlnfactor * Inv_L + model->B4SOIwnfactor * Inv_W + model->B4SOIpnfactor * Inv_LW; pParam->B4SOIdwg = model->B4SOIdwg + model->B4SOIldwg * Inv_L + model->B4SOIwdwg * Inv_W + model->B4SOIpdwg * Inv_LW; pParam->B4SOIdwb = model->B4SOIdwb + model->B4SOIldwb * Inv_L + model->B4SOIwdwb * Inv_W + model->B4SOIpdwb * Inv_LW; pParam->B4SOIvoff = model->B4SOIvoff + model->B4SOIlvoff * Inv_L + model->B4SOIwvoff * Inv_W + model->B4SOIpvoff * Inv_LW; pParam->B4SOIeta0 = model->B4SOIeta0 + model->B4SOIleta0 * Inv_L + model->B4SOIweta0 * Inv_W + model->B4SOIpeta0 * Inv_LW; pParam->B4SOIetab = model->B4SOIetab + model->B4SOIletab * Inv_L + model->B4SOIwetab * Inv_W + model->B4SOIpetab * Inv_LW; pParam->B4SOIdsub = model->B4SOIdsub + model->B4SOIldsub * Inv_L + model->B4SOIwdsub * Inv_W + model->B4SOIpdsub * Inv_LW; pParam->B4SOIcit = model->B4SOIcit + model->B4SOIlcit * Inv_L + model->B4SOIwcit * Inv_W + model->B4SOIpcit * Inv_LW; pParam->B4SOIcdsc = model->B4SOIcdsc + model->B4SOIlcdsc * Inv_L + model->B4SOIwcdsc * Inv_W + model->B4SOIpcdsc * Inv_LW; pParam->B4SOIcdscb = model->B4SOIcdscb + model->B4SOIlcdscb * Inv_L + model->B4SOIwcdscb * Inv_W + model->B4SOIpcdscb * Inv_LW; pParam->B4SOIcdscd = model->B4SOIcdscd + model->B4SOIlcdscd * Inv_L + model->B4SOIwcdscd * Inv_W + model->B4SOIpcdscd * Inv_LW; pParam->B4SOIpclm = model->B4SOIpclm + model->B4SOIlpclm * Inv_L + model->B4SOIwpclm * Inv_W + model->B4SOIppclm * Inv_LW; pParam->B4SOIpdibl1 = model->B4SOIpdibl1 + model->B4SOIlpdibl1 * Inv_L + model->B4SOIwpdibl1 * Inv_W + model->B4SOIppdibl1 * Inv_LW; pParam->B4SOIpdibl2 = model->B4SOIpdibl2 + model->B4SOIlpdibl2 * Inv_L + model->B4SOIwpdibl2 * Inv_W + model->B4SOIppdibl2 * Inv_LW; pParam->B4SOIpdiblb = model->B4SOIpdiblb + model->B4SOIlpdiblb * Inv_L + model->B4SOIwpdiblb * Inv_W + model->B4SOIppdiblb * Inv_LW; pParam->B4SOIdrout = model->B4SOIdrout + model->B4SOIldrout * Inv_L + model->B4SOIwdrout * Inv_W + model->B4SOIpdrout * Inv_LW; pParam->B4SOIpvag = model->B4SOIpvag + model->B4SOIlpvag * Inv_L + model->B4SOIwpvag * Inv_W + model->B4SOIppvag * Inv_LW; pParam->B4SOIdelta = model->B4SOIdelta + model->B4SOIldelta * Inv_L + model->B4SOIwdelta * Inv_W + model->B4SOIpdelta * Inv_LW; pParam->B4SOIalpha0 = model->B4SOIalpha0 + model->B4SOIlalpha0 * Inv_L + model->B4SOIwalpha0 * Inv_W + model->B4SOIpalpha0 * Inv_LW; pParam->B4SOIfbjtii = model->B4SOIfbjtii + model->B4SOIlfbjtii * Inv_L + model->B4SOIwfbjtii * Inv_W + model->B4SOIpfbjtii * Inv_LW; /*4.1 Iii model*/ pParam->B4SOIebjtii = model->B4SOIebjtii + model->B4SOIlebjtii * Inv_L + model->B4SOIwebjtii * Inv_W + model->B4SOIpebjtii * Inv_LW; pParam->B4SOIcbjtii = model->B4SOIcbjtii + model->B4SOIlcbjtii * Inv_L + model->B4SOIwcbjtii * Inv_W + model->B4SOIpcbjtii * Inv_LW; pParam->B4SOIvbci = model->B4SOIvbci + model->B4SOIlvbci * Inv_L + model->B4SOIwvbci * Inv_W + model->B4SOIpvbci * Inv_LW; pParam->B4SOIabjtii = model->B4SOIabjtii + model->B4SOIlabjtii * Inv_L + model->B4SOIwabjtii * Inv_W + model->B4SOIpabjtii * Inv_LW; pParam->B4SOImbjtii = model->B4SOImbjtii + model->B4SOIlmbjtii * Inv_L + model->B4SOIwmbjtii * Inv_W + model->B4SOIpmbjtii * Inv_LW; pParam->B4SOIbeta0 = model->B4SOIbeta0 + model->B4SOIlbeta0 * Inv_L + model->B4SOIwbeta0 * Inv_W + model->B4SOIpbeta0 * Inv_LW; pParam->B4SOIbeta1 = model->B4SOIbeta1 + model->B4SOIlbeta1 * Inv_L + model->B4SOIwbeta1 * Inv_W + model->B4SOIpbeta1 * Inv_LW; pParam->B4SOIbeta2 = model->B4SOIbeta2 + model->B4SOIlbeta2 * Inv_L + model->B4SOIwbeta2 * Inv_W + model->B4SOIpbeta2 * Inv_LW; pParam->B4SOIvdsatii0 = model->B4SOIvdsatii0 + model->B4SOIlvdsatii0 * Inv_L + model->B4SOIwvdsatii0 * Inv_W + model->B4SOIpvdsatii0 * Inv_LW; pParam->B4SOIlii = model->B4SOIlii + model->B4SOIllii * Inv_L + model->B4SOIwlii * Inv_W + model->B4SOIplii * Inv_LW; pParam->B4SOIesatii = model->B4SOIesatii + model->B4SOIlesatii * Inv_L + model->B4SOIwesatii * Inv_W + model->B4SOIpesatii * Inv_LW; pParam->B4SOIsii0 = model->B4SOIsii0 + model->B4SOIlsii0 * Inv_L + model->B4SOIwsii0 * Inv_W + model->B4SOIpsii0 * Inv_LW; pParam->B4SOIsii1 = model->B4SOIsii1 + model->B4SOIlsii1 * Inv_L + model->B4SOIwsii1 * Inv_W + model->B4SOIpsii1 * Inv_LW; pParam->B4SOIsii2 = model->B4SOIsii2 + model->B4SOIlsii2 * Inv_L + model->B4SOIwsii2 * Inv_W + model->B4SOIpsii2 * Inv_LW; pParam->B4SOIsiid = model->B4SOIsiid + model->B4SOIlsiid * Inv_L + model->B4SOIwsiid * Inv_W + model->B4SOIpsiid * Inv_LW; pParam->B4SOIagidl = model->B4SOIagidl + model->B4SOIlagidl * Inv_L + model->B4SOIwagidl * Inv_W + model->B4SOIpagidl * Inv_LW; pParam->B4SOIbgidl = model->B4SOIbgidl + model->B4SOIlbgidl * Inv_L + model->B4SOIwbgidl * Inv_W + model->B4SOIpbgidl * Inv_LW; pParam->B4SOIcgidl = model->B4SOIcgidl + model->B4SOIlcgidl * Inv_L + model->B4SOIwcgidl * Inv_W + model->B4SOIpcgidl * Inv_LW; pParam->B4SOIegidl = model->B4SOIegidl + model->B4SOIlegidl * Inv_L + model->B4SOIwegidl * Inv_W + model->B4SOIpegidl * Inv_LW; pParam->B4SOIrgidl = model->B4SOIrgidl + model->B4SOIlrgidl * Inv_L + model->B4SOIwrgidl * Inv_W + model->B4SOIprgidl * Inv_LW; pParam->B4SOIkgidl = model->B4SOIkgidl + model->B4SOIlkgidl * Inv_L + model->B4SOIwkgidl * Inv_W + model->B4SOIpkgidl * Inv_LW; pParam->B4SOIfgidl = model->B4SOIfgidl + model->B4SOIlfgidl * Inv_L + model->B4SOIwfgidl * Inv_W + model->B4SOIpfgidl * Inv_LW; pParam->B4SOIagisl = model->B4SOIagisl + model->B4SOIlagisl * Inv_L + model->B4SOIwagisl * Inv_W + model->B4SOIpagisl * Inv_LW; pParam->B4SOIbgisl = model->B4SOIbgisl + model->B4SOIlbgisl * Inv_L + model->B4SOIwbgisl * Inv_W + model->B4SOIpbgisl * Inv_LW; pParam->B4SOIcgisl = model->B4SOIcgisl + model->B4SOIlcgisl * Inv_L + model->B4SOIwcgisl * Inv_W + model->B4SOIpcgisl * Inv_LW; pParam->B4SOIegisl = model->B4SOIegisl + model->B4SOIlegisl * Inv_L + model->B4SOIwegisl * Inv_W + model->B4SOIpegisl * Inv_LW; pParam->B4SOIrgisl = model->B4SOIrgisl + model->B4SOIlrgisl * Inv_L + model->B4SOIwrgisl * Inv_W + model->B4SOIprgisl * Inv_LW; pParam->B4SOIkgisl = model->B4SOIkgisl + model->B4SOIlkgisl * Inv_L + model->B4SOIwkgisl * Inv_W + model->B4SOIpkgisl * Inv_LW; pParam->B4SOIfgisl = model->B4SOIfgisl + model->B4SOIlfgisl * Inv_L + model->B4SOIwfgisl * Inv_W + model->B4SOIpfgisl * Inv_LW; pParam->B4SOIntun = model->B4SOIntun /* v4.0 */ + model->B4SOIlntun * Inv_L + model->B4SOIwntun * Inv_W + model->B4SOIpntun * Inv_LW; pParam->B4SOIntund = model->B4SOIntund /* v4.0 */ + model->B4SOIlntund * Inv_L + model->B4SOIwntund * Inv_W + model->B4SOIpntund * Inv_LW; pParam->B4SOIndiode = model->B4SOIndiode /* v4.0 */ + model->B4SOIlndiode * Inv_L + model->B4SOIwndiode * Inv_W + model->B4SOIpndiode * Inv_LW; pParam->B4SOIndioded = model->B4SOIndioded /* v4.0 */ + model->B4SOIlndioded * Inv_L + model->B4SOIwndioded * Inv_W + model->B4SOIpndioded * Inv_LW; pParam->B4SOInrecf0 = model->B4SOInrecf0 /* v4.0 */ + model->B4SOIlnrecf0 * Inv_L + model->B4SOIwnrecf0 * Inv_W + model->B4SOIpnrecf0 * Inv_LW; pParam->B4SOInrecf0d = model->B4SOInrecf0d /* v4.0 */ + model->B4SOIlnrecf0d * Inv_L + model->B4SOIwnrecf0d * Inv_W + model->B4SOIpnrecf0d * Inv_LW; pParam->B4SOInrecr0 = model->B4SOInrecr0 /* v4.0 */ + model->B4SOIlnrecr0 * Inv_L + model->B4SOIwnrecr0 * Inv_W + model->B4SOIpnrecr0 * Inv_LW; pParam->B4SOInrecr0d = model->B4SOInrecr0d /* v4.0 */ + model->B4SOIlnrecr0d * Inv_L + model->B4SOIwnrecr0d * Inv_W + model->B4SOIpnrecr0d * Inv_LW; pParam->B4SOIisbjt = model->B4SOIisbjt + model->B4SOIlisbjt * Inv_L + model->B4SOIwisbjt * Inv_W + model->B4SOIpisbjt * Inv_LW; pParam->B4SOIidbjt = model->B4SOIidbjt + model->B4SOIlidbjt * Inv_L + model->B4SOIwidbjt * Inv_W + model->B4SOIpidbjt * Inv_LW; pParam->B4SOIisdif = model->B4SOIisdif + model->B4SOIlisdif * Inv_L + model->B4SOIwisdif * Inv_W + model->B4SOIpisdif * Inv_LW; pParam->B4SOIiddif = model->B4SOIiddif + model->B4SOIliddif * Inv_L + model->B4SOIwiddif * Inv_W + model->B4SOIpiddif * Inv_LW; pParam->B4SOIisrec = model->B4SOIisrec + model->B4SOIlisrec * Inv_L + model->B4SOIwisrec * Inv_W + model->B4SOIpisrec * Inv_LW; pParam->B4SOIistun = model->B4SOIistun + model->B4SOIlistun * Inv_L + model->B4SOIwistun * Inv_W + model->B4SOIpistun * Inv_LW; pParam->B4SOIidrec = model->B4SOIidrec + model->B4SOIlidrec * Inv_L + model->B4SOIwidrec * Inv_W + model->B4SOIpidrec * Inv_LW; pParam->B4SOIidtun = model->B4SOIidtun + model->B4SOIlidtun * Inv_L + model->B4SOIwidtun * Inv_W + model->B4SOIpidtun * Inv_LW; pParam->B4SOIvrec0 = model->B4SOIvrec0 /* v4.0 */ + model->B4SOIlvrec0 * Inv_L + model->B4SOIwvrec0 * Inv_W + model->B4SOIpvrec0 * Inv_LW; pParam->B4SOIvrec0d = model->B4SOIvrec0d /* v4.0 */ + model->B4SOIlvrec0d * Inv_L + model->B4SOIwvrec0d * Inv_W + model->B4SOIpvrec0d * Inv_LW; pParam->B4SOIvtun0 = model->B4SOIvtun0 /* v4.0 */ + model->B4SOIlvtun0 * Inv_L + model->B4SOIwvtun0 * Inv_W + model->B4SOIpvtun0 * Inv_LW; pParam->B4SOIvtun0d = model->B4SOIvtun0d /* v4.0 */ + model->B4SOIlvtun0d * Inv_L + model->B4SOIwvtun0d * Inv_W + model->B4SOIpvtun0d * Inv_LW; pParam->B4SOInbjt = model->B4SOInbjt + model->B4SOIlnbjt * Inv_L + model->B4SOIwnbjt * Inv_W + model->B4SOIpnbjt * Inv_LW; pParam->B4SOIlbjt0 = model->B4SOIlbjt0 + model->B4SOIllbjt0 * Inv_L + model->B4SOIwlbjt0 * Inv_W + model->B4SOIplbjt0 * Inv_LW; pParam->B4SOIvabjt = model->B4SOIvabjt + model->B4SOIlvabjt * Inv_L + model->B4SOIwvabjt * Inv_W + model->B4SOIpvabjt * Inv_LW; pParam->B4SOIaely = model->B4SOIaely + model->B4SOIlaely * Inv_L + model->B4SOIwaely * Inv_W + model->B4SOIpaely * Inv_LW; pParam->B4SOIahli = model->B4SOIahli /* v4.0 */ + model->B4SOIlahli * Inv_L + model->B4SOIwahli * Inv_W + model->B4SOIpahli * Inv_LW; pParam->B4SOIahlid = model->B4SOIahlid /* v4.0 */ + model->B4SOIlahlid * Inv_L + model->B4SOIwahlid * Inv_W + model->B4SOIpahlid * Inv_LW; /* v3.1 */ pParam->B4SOIxj = model->B4SOIxj + model->B4SOIlxj * Inv_L + model->B4SOIwxj * Inv_W + model->B4SOIpxj * Inv_LW; pParam->B4SOIalphaGB1 = model->B4SOIalphaGB1 + model->B4SOIlalphaGB1 * Inv_L + model->B4SOIwalphaGB1 * Inv_W + model->B4SOIpalphaGB1 * Inv_LW; pParam->B4SOIalphaGB2 = model->B4SOIalphaGB2 + model->B4SOIlalphaGB2 * Inv_L + model->B4SOIwalphaGB2 * Inv_W + model->B4SOIpalphaGB2 * Inv_LW; pParam->B4SOIbetaGB1 = model->B4SOIbetaGB1 + model->B4SOIlbetaGB1* Inv_L + model->B4SOIwbetaGB1 * Inv_W + model->B4SOIpbetaGB1 * Inv_LW; pParam->B4SOIbetaGB2 = model->B4SOIbetaGB2 + model->B4SOIlbetaGB2 * Inv_L + model->B4SOIwbetaGB2 * Inv_W + model->B4SOIpbetaGB2 * Inv_LW; pParam->B4SOIndif = model->B4SOIndif + model->B4SOIlndif * Inv_L + model->B4SOIwndif * Inv_W + model->B4SOIpndif * Inv_LW; pParam->B4SOIntrecf = model->B4SOIntrecf + model->B4SOIlntrecf* Inv_L + model->B4SOIwntrecf * Inv_W + model->B4SOIpntrecf * Inv_LW; pParam->B4SOIntrecr = model->B4SOIntrecr + model->B4SOIlntrecr * Inv_L + model->B4SOIwntrecr * Inv_W + model->B4SOIpntrecr * Inv_LW; pParam->B4SOIxbjt = model->B4SOIxbjt + model->B4SOIlxbjt * Inv_L + model->B4SOIwxbjt * Inv_W + model->B4SOIpxbjt * Inv_LW; pParam->B4SOIxdif = model->B4SOIxdif + model->B4SOIlxdif* Inv_L + model->B4SOIwxdif * Inv_W + model->B4SOIpxdif * Inv_LW; pParam->B4SOIxrec = model->B4SOIxrec + model->B4SOIlxrec * Inv_L + model->B4SOIwxrec * Inv_W + model->B4SOIpxrec * Inv_LW; pParam->B4SOIxtun = model->B4SOIxtun + model->B4SOIlxtun * Inv_L + model->B4SOIwxtun * Inv_W + model->B4SOIpxtun * Inv_LW; pParam->B4SOIxdifd = model->B4SOIxdifd + model->B4SOIlxdifd* Inv_L + model->B4SOIwxdifd * Inv_W + model->B4SOIpxdifd * Inv_LW; pParam->B4SOIxrecd = model->B4SOIxrecd + model->B4SOIlxrecd * Inv_L + model->B4SOIwxrecd * Inv_W + model->B4SOIpxrecd * Inv_LW; pParam->B4SOIxtund = model->B4SOIxtund + model->B4SOIlxtund * Inv_L + model->B4SOIwxtund * Inv_W + model->B4SOIpxtund * Inv_LW; pParam->B4SOIcgdl = model->B4SOIcgdl + model->B4SOIlcgdl * Inv_L + model->B4SOIwcgdl * Inv_W + model->B4SOIpcgdl * Inv_LW; pParam->B4SOIcgsl = model->B4SOIcgsl + model->B4SOIlcgsl * Inv_L + model->B4SOIwcgsl * Inv_W + model->B4SOIpcgsl * Inv_LW; pParam->B4SOIckappa = model->B4SOIckappa + model->B4SOIlckappa * Inv_L + model->B4SOIwckappa * Inv_W + model->B4SOIpckappa * Inv_LW; pParam->B4SOIute = model->B4SOIute + model->B4SOIlute * Inv_L + model->B4SOIwute * Inv_W + model->B4SOIpute * Inv_LW; /*4.1 mobmod=4*/ pParam->B4SOIud = model->B4SOIud /* + model->B4SOIud * Inv_L*//*Bug #15 Jun 09*/ + model->B4SOIlud * Inv_L /*Fix*/ + model->B4SOIwud * Inv_W + model->B4SOIpud * Inv_LW; pParam->B4SOIud1 = model->B4SOIud1 + model->B4SOIlud1 * Inv_L + model->B4SOIwud1 * Inv_W + model->B4SOIpud1 * Inv_LW; pParam->B4SOIeu = model->B4SOIeu + model->B4SOIleu * Inv_L + model->B4SOIweu * Inv_W + model->B4SOIpeu * Inv_LW; pParam->B4SOIucs = model->B4SOIucs + model->B4SOIlucs * Inv_L + model->B4SOIwucs * Inv_W + model->B4SOIpucs * Inv_LW; pParam->B4SOIucste = model->B4SOIucste + model->B4SOIlucste * Inv_L + model->B4SOIwucste * Inv_W + model->B4SOIpucste * Inv_LW; pParam->B4SOIkt1 = model->B4SOIkt1 + model->B4SOIlkt1 * Inv_L + model->B4SOIwkt1 * Inv_W + model->B4SOIpkt1 * Inv_LW; pParam->B4SOIkt2 = model->B4SOIkt2 + model->B4SOIlkt2 * Inv_L + model->B4SOIwkt2 * Inv_W + model->B4SOIpkt2 * Inv_LW; pParam->B4SOIkt1l = model->B4SOIkt1l + model->B4SOIlkt1l * Inv_L + model->B4SOIwkt1l * Inv_W + model->B4SOIpkt1l * Inv_LW; pParam->B4SOIua1 = model->B4SOIua1 + model->B4SOIlua1 * Inv_L + model->B4SOIwua1 * Inv_W + model->B4SOIpua1 * Inv_LW; pParam->B4SOIub1 = model->B4SOIub1 + model->B4SOIlub1* Inv_L + model->B4SOIwub1 * Inv_W + model->B4SOIpub1 * Inv_LW; pParam->B4SOIuc1 = model->B4SOIuc1 + model->B4SOIluc1 * Inv_L + model->B4SOIwuc1 * Inv_W + model->B4SOIpuc1 * Inv_LW; pParam->B4SOIat = model->B4SOIat + model->B4SOIlat * Inv_L + model->B4SOIwat * Inv_W + model->B4SOIpat * Inv_LW; pParam->B4SOIprt = model->B4SOIprt + model->B4SOIlprt * Inv_L + model->B4SOIwprt * Inv_W + model->B4SOIpprt * Inv_LW; /* v3.0 */ pParam->B4SOInigc = model->B4SOInigc + model->B4SOIlnigc * Inv_L + model->B4SOIwnigc * Inv_W + model->B4SOIpnigc * Inv_LW; pParam->B4SOIaigc = model->B4SOIaigc + model->B4SOIlaigc * Inv_L + model->B4SOIwaigc * Inv_W + model->B4SOIpaigc * Inv_LW; pParam->B4SOIbigc = model->B4SOIbigc + model->B4SOIlbigc * Inv_L + model->B4SOIwbigc * Inv_W + model->B4SOIpbigc * Inv_LW; pParam->B4SOIcigc = model->B4SOIcigc + model->B4SOIlcigc * Inv_L + model->B4SOIwcigc * Inv_W + model->B4SOIpcigc * Inv_LW; pParam->B4SOIaigsd = model->B4SOIaigsd + model->B4SOIlaigsd * Inv_L + model->B4SOIwaigsd * Inv_W + model->B4SOIpaigsd * Inv_LW; pParam->B4SOIbigsd = model->B4SOIbigsd + model->B4SOIlbigsd * Inv_L + model->B4SOIwbigsd * Inv_W + model->B4SOIpbigsd * Inv_LW; pParam->B4SOIcigsd = model->B4SOIcigsd + model->B4SOIlcigsd * Inv_L + model->B4SOIwcigsd * Inv_W + model->B4SOIpcigsd * Inv_LW; pParam->B4SOIpigcd = model->B4SOIpigcd + model->B4SOIlpigcd * Inv_L + model->B4SOIwpigcd * Inv_W + model->B4SOIppigcd * Inv_LW; pParam->B4SOIpoxedge = model->B4SOIpoxedge + model->B4SOIlpoxedge * Inv_L + model->B4SOIwpoxedge * Inv_W + model->B4SOIppoxedge * Inv_LW; /* v3.0 */ /* v3.1 added for RF */ pParam->B4SOIxrcrg1 = model->B4SOIxrcrg1 + model->B4SOIlxrcrg1 * Inv_L + model->B4SOIwxrcrg1 * Inv_W + model->B4SOIpxrcrg1 * Inv_LW; pParam->B4SOIxrcrg2 = model->B4SOIxrcrg2 + model->B4SOIlxrcrg2 * Inv_L + model->B4SOIwxrcrg2 * Inv_W + model->B4SOIpxrcrg2 * Inv_LW; /* v3.1 added for RF end */ /* CV model */ pParam->B4SOIvsdfb = model->B4SOIvsdfb + model->B4SOIlvsdfb * Inv_L + model->B4SOIwvsdfb * Inv_W + model->B4SOIpvsdfb * Inv_LW; pParam->B4SOIvsdth = model->B4SOIvsdth + model->B4SOIlvsdth * Inv_L + model->B4SOIwvsdth * Inv_W + model->B4SOIpvsdth * Inv_LW; pParam->B4SOIdelvt = model->B4SOIdelvt + model->B4SOIldelvt * Inv_L + model->B4SOIwdelvt * Inv_W + model->B4SOIpdelvt * Inv_LW; pParam->B4SOIacde = model->B4SOIacde + model->B4SOIlacde * Inv_L + model->B4SOIwacde * Inv_W + model->B4SOIpacde * Inv_LW; pParam->B4SOIacde = pParam->B4SOIacde * pow((pParam->B4SOInpeak / 2.0e16), -0.25); /* v3.2 bug fix */ pParam->B4SOImoin = model->B4SOImoin + model->B4SOIlmoin * Inv_L + model->B4SOIwmoin * Inv_W + model->B4SOIpmoin * Inv_LW; pParam->B4SOInoff = model->B4SOInoff + model->B4SOIlnoff * Inv_L + model->B4SOIwnoff * Inv_W + model->B4SOIpnoff * Inv_LW; /* v3.2 */ pParam->B4SOIdvtp0 = model->B4SOIdvtp0 + model->B4SOIldvtp0 * Inv_L + model->B4SOIwdvtp0 * Inv_W + model->B4SOIpdvtp0 * Inv_LW; /* v4.0 */ pParam->B4SOIdvtp1 = model->B4SOIdvtp1 + model->B4SOIldvtp1 * Inv_L + model->B4SOIwdvtp1 * Inv_W + model->B4SOIpdvtp1 * Inv_LW; /* v4.0 */ pParam->B4SOIdvtp2 = model->B4SOIdvtp2 + model->B4SOIldvtp2 * Inv_L + model->B4SOIwdvtp2 * Inv_W + model->B4SOIpdvtp2 * Inv_LW; /* v4.1 */ pParam->B4SOIdvtp3 = model->B4SOIdvtp3 + model->B4SOIldvtp3 * Inv_L + model->B4SOIwdvtp3 * Inv_W + model->B4SOIpdvtp3 * Inv_LW; /* v4.1 */ pParam->B4SOIdvtp4 = model->B4SOIdvtp4 + model->B4SOIldvtp4 * Inv_L + model->B4SOIwdvtp4 * Inv_W + model->B4SOIpdvtp4 * Inv_LW; /* v4.1 */ pParam->B4SOIminv = model->B4SOIminv + model->B4SOIlminv * Inv_L + model->B4SOIwminv * Inv_W + model->B4SOIpminv * Inv_LW; /* v4.0 */ pParam->B4SOIminvcv = model->B4SOIminvcv + model->B4SOIlminvcv * Inv_L + model->B4SOIwminvcv * Inv_W + model->B4SOIpminvcv * Inv_LW; /* v4.1 */ pParam->B4SOIvoffcv = model->B4SOIvoffcv /*Bug fix # 16 Jun09*/ + model->B4SOIlvoffcv * Inv_L + model->B4SOIwvoffcv * Inv_W + model->B4SOIpvoffcv * Inv_LW; pParam->B4SOIfprout = model->B4SOIfprout + model->B4SOIlfprout * Inv_L + model->B4SOIwfprout * Inv_W + model->B4SOIpfprout * Inv_LW; /* v4.0 */ pParam->B4SOIpdits = model->B4SOIpdits + model->B4SOIlpdits * Inv_L + model->B4SOIwpdits * Inv_W + model->B4SOIppdits * Inv_LW; /* v4.0 */ pParam->B4SOIpditsd = model->B4SOIpditsd + model->B4SOIlpditsd * Inv_L + model->B4SOIwpditsd * Inv_W + model->B4SOIppditsd * Inv_LW; /* v4.0 */ pParam->B4SOIaigbcp2 = model->B4SOIaigbcp2 + model->B4SOIlaigbcp2 * Inv_L + model->B4SOIwaigbcp2 * Inv_W + model->B4SOIpaigbcp2 * Inv_LW; /* v4.0 */ pParam->B4SOIbigbcp2 = model->B4SOIbigbcp2 + model->B4SOIlbigbcp2 * Inv_L + model->B4SOIwbigbcp2 * Inv_W + model->B4SOIpbigbcp2 * Inv_LW; /* v4.0 */ pParam->B4SOIcigbcp2 = model->B4SOIcigbcp2 + model->B4SOIlcigbcp2 * Inv_L + model->B4SOIwcigbcp2 * Inv_W + model->B4SOIpcigbcp2 * Inv_LW; /* v4.0 */ /* Added for binning - END */ /* v4.0 add mstar for Vgsteff */ pParam->B4SOImstar = 0.5 + atan(pParam->B4SOIminv) / PI; if (model->B4SOIvgstcvMod == 0) printf("vgstcvMod = 0, users are suggested to use vgstcvMod = 1 or 2.\n"); /* v4.1 add mstarcv for Vgsteffcv */ pParam->B4SOImstarcv = 0.5 + atan(pParam->B4SOIminvcv) / PI; T0 = (TempRatio - 1.0); pParam->B4SOIuatemp = pParam->B4SOIua; /* save ua, ub, and uc for b4soild.c */ pParam->B4SOIubtemp = pParam->B4SOIub; pParam->B4SOIuctemp = pParam->B4SOIuc; pParam->B4SOIrds0denom = pow(pParam->B4SOIweff * 1E6, pParam->B4SOIwr); /* v2.2 release */ pParam->B4SOIrth = here->B4SOIrth0 / (pParam->B4SOIweff + model->B4SOIwth0) * here->B4SOInseg / here->B4SOInf; /* bugfix_snps nf*/ pParam->B4SOIcth = here->B4SOIcth0 * (pParam->B4SOIweff + model->B4SOIwth0) / here->B4SOInseg * here->B4SOInf; /* bugfix_snps nf*/ /* v2.2.2 adding layout-dependent Frbody multiplier */ /* pParam->B4SOIrbody = here->B4SOIfrbody *model->B4SOIrbody * model->B4SOIrhalo / (2 * model->B4SOIrbody + model->B4SOIrhalo * pParam->B4SOIleff) * pParam->B4SOIweff / here->B4SOInseg / here->B4SOInf */ /* v4.0 *//*;*/ if (model->B4SOIrbody == 0) /* Bug Fix # 27 added to avoid NaN (0/0) in QA*/ pParam->B4SOIrbody = 0; else pParam->B4SOIrbody = here->B4SOIfrbody *model->B4SOIrbody * model->B4SOIrhalo / (2 * model->B4SOIrbody + model->B4SOIrhalo * pParam->B4SOIleff) * pParam->B4SOIweff / here->B4SOInseg/ here->B4SOInf; /* v4.0 */ pParam->B4SOIoxideRatio = pow(model->B4SOItoxref /model->B4SOItoxqm, model->B4SOIntox) /model->B4SOItoxqm/model->B4SOItoxqm; /* v2.2 release */ pParam->B4SOIua = pParam->B4SOIua + pParam->B4SOIua1 * T0; pParam->B4SOIub = pParam->B4SOIub + pParam->B4SOIub1 * T0; pParam->B4SOIuc = pParam->B4SOIuc + pParam->B4SOIuc1 * T0; if (pParam->B4SOIu0 > 1.0) pParam->B4SOIu0 = pParam->B4SOIu0 / 1.0e4; pParam->B4SOIu0temp = pParam->B4SOIu0 * pow(TempRatio, pParam->B4SOIute); pParam->B4SOIvsattemp = pParam->B4SOIvsat - pParam->B4SOIat * T0; pParam->B4SOIrds0 = (pParam->B4SOIrdsw + pParam->B4SOIprt * T0) / pow(pParam->B4SOIweff * 1E6, pParam->B4SOIwr); if(model->B4SOIrdsMod) { /* v4.0 */ PowWeffWr = pParam->B4SOIrds0denom * here->B4SOInf; T10 = pParam->B4SOIprt * T0; /* External Rd(V) */ T1 = pParam->B4SOIrdw + T10; T2 = model->B4SOIrdwmin + T10; if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->B4SOIrd0 = T1 / PowWeffWr; pParam->B4SOIrdwmin = T2 / PowWeffWr; /* External Rs(V) */ T3 = pParam->B4SOIrsw + T10; T4 = model->B4SOIrswmin + T10; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } if (T4 < 0.0) { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->B4SOIrs0 = T3 / PowWeffWr; pParam->B4SOIrswmin = T4 / PowWeffWr; } if (B4SOIcheckModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->B4SOImodName; namarray[1] = here->B4SOIname; (*(SPfrontEnd->IFerror)) (ERR_FATAL, "Fatal error(s) detected during B4SOIV3 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->B4SOIcgdo = (model->B4SOIcgdo + pParam->B4SOIcf) * pParam->B4SOIwdiodCV; pParam->B4SOIcgso = (model->B4SOIcgso + pParam->B4SOIcf) * pParam->B4SOIwdiosCV; pParam->B4SOIcgeo = model->B4SOIcgeo * pParam->B4SOIleffCV * here->B4SOInf; /* v4.0 */ if (!model->B4SOInpeakGiven && model->B4SOIgamma1Given) { T0 = pParam->B4SOIgamma1 * model->B4SOIcox; pParam->B4SOInpeak = 3.021E22 * T0 * T0; } T4 = Eg300 / model->B4SOIvtm * (TempRatio - 1.0); /* source side */ T7 = pParam->B4SOIxbjt * T4 / pParam->B4SOIndiode; DEXP(T7, T0); T7 = pParam->B4SOIxdif * T4 / pParam->B4SOIndiode; DEXP(T7, T1); T7 = pParam->B4SOIxrec * T4 / pParam->B4SOInrecf0; DEXP(T7, T2); pParam->B4SOIahli0s = pParam->B4SOIahli * T0; pParam->B4SOIjbjts = pParam->B4SOIisbjt * T0; pParam->B4SOIjdifs = pParam->B4SOIisdif * T1; pParam->B4SOIjrecs = pParam->B4SOIisrec * T2; T7 = pParam->B4SOIxtun * (TempRatio - 1); DEXP(T7, T0); pParam->B4SOIjtuns = pParam->B4SOIistun * T0; /* drain side */ /* pParam->B4SOIjtund = pParam->B4SOIidtun * T0; */ /*v4.2 redundant */ T7 = pParam->B4SOIxbjt * T4 / pParam->B4SOIndioded; DEXP(T7, T0); T7 = pParam->B4SOIxdifd * T4 / pParam->B4SOIndioded; DEXP(T7, T1); T7 = pParam->B4SOIxrecd * T4 / pParam->B4SOInrecf0d; DEXP(T7, T2); pParam->B4SOIahli0d = pParam->B4SOIahlid * T0; pParam->B4SOIjbjtd = pParam->B4SOIidbjt * T0; pParam->B4SOIjdifd = pParam->B4SOIiddif * T1; pParam->B4SOIjrecd = pParam->B4SOIidrec * T2; T7 = pParam->B4SOIxtund * (TempRatio - 1); DEXP(T7, T0); pParam->B4SOIjtund = pParam->B4SOIidtun * T0; if (pParam->B4SOInsub > 0) pParam->B4SOIvfbb = -model->B4SOItype * model->B4SOIvtm * log(pParam->B4SOInpeak/ pParam->B4SOInsub); else pParam->B4SOIvfbb = -model->B4SOItype * model->B4SOIvtm * log(-pParam->B4SOInpeak* pParam->B4SOInsub/ni/ni); if (!model->B4SOIvsdfbGiven) { if (pParam->B4SOInsub > 0) pParam->B4SOIvsdfb = -model->B4SOItype * (model->B4SOIvtm*log(1e20 * pParam->B4SOInsub / ni /ni) - 0.3); else if (pParam->B4SOInsub < 0) pParam->B4SOIvsdfb = -model->B4SOItype * (model->B4SOIvtm*log(-1e20 / pParam->B4SOInsub) + 0.3); } /* Phi & Gamma */ SDphi = 2.0*model->B4SOIvtm*log(fabs(pParam->B4SOInsub) / ni); SDgamma = sqrt2qeps * sqrt(fabs(pParam->B4SOInsub)) / model->B4SOIcbox; /* bugfix v4.3.1*/ if (!model->B4SOIvsdthGiven) { if ( ((pParam->B4SOInsub > 0) && (model->B4SOItype > 0)) || ((pParam->B4SOInsub < 0) && (model->B4SOItype < 0)) ) pParam->B4SOIvsdth = pParam->B4SOIvsdfb + SDphi + SDgamma * sqrt(SDphi); else pParam->B4SOIvsdth = pParam->B4SOIvsdfb - SDphi - SDgamma * sqrt(SDphi); } if (!model->B4SOIcsdminGiven) { /* Cdmin */ tmp = sqrt(2.0 * epssub * SDphi / (Charge_q * fabs(pParam->B4SOInsub) * 1.0e6)); tmp1 = epssub / tmp; model->B4SOIcsdmin = tmp1 * model->B4SOIcbox / (tmp1 + model->B4SOIcbox); } pParam->B4SOIphi = 2.0 * model->B4SOIvtm * log(pParam->B4SOInpeak / ni); pParam->B4SOIsqrtPhi = sqrt(pParam->B4SOIphi); pParam->B4SOIphis3 = pParam->B4SOIsqrtPhi * pParam->B4SOIphi; pParam->B4SOIXdep0 = sqrt(2.0 * epssub / (Charge_q * pParam->B4SOInpeak * 1.0e6)) * pParam->B4SOIsqrtPhi; pParam->B4SOIsqrtXdep0 = sqrt(pParam->B4SOIXdep0); /*4.1*/ if (model->B4SOImtrlMod==0) pParam->B4SOIlitl = sqrt(3.0 *3.9/epsrox* pParam->B4SOIxj * model->B4SOItox); else /* pParam->B4SOIlitl = sqrt(epssub * pParam->B4SOIxj * model->B4SOItox/(epsrox*EPS0)); */ /* Bug fix # 13 Jun 09 'not reported by vendors'*/ pParam->B4SOIlitl = sqrt(epssub * pParam->B4SOIxj * toxe/(epsrox*EPS0)); /* fix */ pParam->B4SOIvbi = model->B4SOIvtm * log(1.0e20 * pParam->B4SOInpeak / (ni * ni)); pParam->B4SOIcdep0 = sqrt(Charge_q * epssub * pParam->B4SOInpeak * 1.0e6 / 2.0 / pParam->B4SOIphi); /* v3.0 */ /*4.1 */ if (model->B4SOImtrlMod ==0) { if (pParam->B4SOIngate > 0.0) { pParam->B4SOIvfbsd = Vtm0 * log(pParam->B4SOIngate / 1.0e20); } else pParam->B4SOIvfbsd = 0.0; } else { T0 = Vtm0 * log(pParam->B4SOInsd/ni); T1 = 0.5 * Eg0; if(T0 > T1) T0 = T1; T2 = model->B4SOIeasub + T1 - model->B4SOItype * T0; pParam->B4SOIvfbsd = model->B4SOIphig - T2; } pParam->B4SOIToxRatio = exp(model->B4SOIntox * log(model->B4SOItoxref /model->B4SOItoxqm)) /model->B4SOItoxqm /model->B4SOItoxqm; pParam->B4SOIToxRatioEdge = exp(model->B4SOIntox * log(model->B4SOItoxref / (model->B4SOItoxqm * pParam->B4SOIpoxedge))) / model->B4SOItoxqm / model->B4SOItoxqm / pParam->B4SOIpoxedge / pParam->B4SOIpoxedge; /* pParam->B4SOIAechvb = (model->B4SOItype == NMOS) ? 4.97232e-7 : 3.42537e-7; pParam->B4SOIBechvb = (model->B4SOItype == NMOS) ? 7.45669e11 : 1.16645e12; */ pParam->B4SOIAechvb = (model->B4SOItype == NMOS) ? agbc2p : agbc2n; /* bugfix 4.3.1 -Tanvir */ pParam->B4SOIBechvb = (model->B4SOItype == NMOS) ? bgbc2p : bgbc2n; /* bugfix v4.3.1 -Tanvir */ // The edge should have a contribution from psbcp & pdbcp. Need s & d terms. // There is no NF correction because psbcp & pdbcp are "per finger" in manual. pParam->B4SOIAechvbEdges = pParam->B4SOIAechvb * (pParam->B4SOIweff/here->B4SOInseg + here->B4SOIpsbcp) * pParam->B4SOIdlcig * pParam->B4SOIToxRatioEdge; /* v3.1 bug fix */ pParam->B4SOIAechvbEdged = pParam->B4SOIAechvb * (pParam->B4SOIweff/here->B4SOInseg + here->B4SOIpdbcp) * pParam->B4SOIdlcig * pParam->B4SOIToxRatioEdge; /* v3.1 bug fix */ pParam->B4SOIBechvbEdge = -pParam->B4SOIBechvb * model->B4SOItoxqm * pParam->B4SOIpoxedge; /* pParam->B4SOIAechvb *= pParam->B4SOIweff/here->B4SOInseg */ /* * pParam->B4SOIleff */ /* * pParam->B4SOIToxRatio */ /* + here->B4SOIagbcpd; v4.0 */ pParam->B4SOIAechvb *= (pParam->B4SOIweff/here->B4SOInseg * pParam->B4SOIleff + here->B4SOIagbcpd/here->B4SOInf) /* LFW */ * pParam->B4SOIToxRatio; /* From Geoffrey Coram 10/22/09 */ pParam->B4SOIBechvb *= -model->B4SOItoxqm; /* v3.0 */ if (model->B4SOIk1Given || model->B4SOIk2Given) { if (!model->B4SOIk1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->B4SOIk1 = 0.53; } if (!model->B4SOIk2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->B4SOIk2 = -0.0186; } if (model->B4SOIxtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->B4SOIvbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->B4SOIvbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->B4SOIgamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->B4SOIgamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->B4SOIvbxGiven){ if (model->B4SOImtrlMod) T0 = Charge_q / 2.0 / epssub * 1.0e6; else T0 = 7.7348e-4; pParam->B4SOIvbx = pParam->B4SOIphi - T0 * pParam->B4SOInpeak * pParam->B4SOIxt * pParam->B4SOIxt;} /* bugfix 4.3.1 */ if (pParam->B4SOIvbx > 0.0) pParam->B4SOIvbx = -pParam->B4SOIvbx; if (pParam->B4SOIvbm > 0.0) pParam->B4SOIvbm = -pParam->B4SOIvbm; if (!model->B4SOIgamma1Given) pParam->B4SOIgamma1 = sqrt2qeps * sqrt(pParam->B4SOInpeak) / model->B4SOIcox; /* bugfix 4.3.1 */ if (!model->B4SOIgamma2Given) pParam->B4SOIgamma2 = sqrt2qeps * sqrt(pParam->B4SOInsub) / model->B4SOIcox; /* bugfix 4.3.1 */ T0 = pParam->B4SOIgamma1 - pParam->B4SOIgamma2; T1 = sqrt(pParam->B4SOIphi - pParam->B4SOIvbx) - pParam->B4SOIsqrtPhi; T2 = sqrt(pParam->B4SOIphi * (pParam->B4SOIphi - pParam->B4SOIvbm)) - pParam->B4SOIphi; pParam->B4SOIk2 = T0 * T1 / (2.0 * T2 + pParam->B4SOIvbm); pParam->B4SOIk1 = pParam->B4SOIgamma2 - 2.0 * pParam->B4SOIk2 * sqrt(pParam->B4SOIphi - pParam->B4SOIvbm); } /*if (pParam->B4SOIk2 < 0.0) { T0 = 0.5 * pParam->B4SOIk1 / pParam->B4SOIk2; pParam->B4SOIvbsc = 0.9 * (pParam->B4SOIphi - T0 * T0); if (pParam->B4SOIvbsc > -3.0) pParam->B4SOIvbsc = -3.0; else if (pParam->B4SOIvbsc < -30.0) pParam->B4SOIvbsc = -30.0; } else { pParam->B4SOIvbsc = -30.0; } if (pParam->B4SOIvbsc > pParam->B4SOIvbm) pParam->B4SOIvbsc = pParam->B4SOIvbm; */ /* v4.2 never used in code */ if ((T0 = pParam->B4SOIweff + pParam->B4SOIk1w2) < 1e-8) T0 = 1e-8; pParam->B4SOIk1eff = pParam->B4SOIk1 * (1 + pParam->B4SOIk1w1/T0); /*4.0 if (model->B4SOIvth0Given) { pParam->B4SOIvfb = model->B4SOItype * pParam->B4SOIvth0 - pParam->B4SOIphi - pParam->B4SOIk1eff * pParam->B4SOIsqrtPhi; } else { pParam->B4SOIvfb = -1.0; pParam->B4SOIvth0 = model->B4SOItype * (pParam->B4SOIvfb + pParam->B4SOIphi + pParam->B4SOIk1eff * pParam->B4SOIsqrtPhi); } */ /* v4.1 */ if (!model->B4SOIvfbGiven) { if (model->B4SOIvth0Given) { pParam->B4SOIvfb = model->B4SOItype * pParam->B4SOIvth0 - pParam->B4SOIphi - pParam->B4SOIk1eff * pParam->B4SOIsqrtPhi; } else { pParam->B4SOIvfb = -1.0; } } if (!model->B4SOIvth0Given) { pParam->B4SOIvth0 = model->B4SOItype * (pParam->B4SOIvfb + pParam->B4SOIphi + pParam->B4SOIk1eff * pParam->B4SOIsqrtPhi); } /* v4.0 */ pParam->B4SOIk1ox = pParam->B4SOIk1eff * model->B4SOItox / model->B4SOItoxm; if(model->B4SOImtrlMod == 0) T1 = sqrt(EPSSI / EPSOX * model->B4SOItox * pParam->B4SOIXdep0); else T1 = sqrt(epssub / (epsrox*EPS0) * model->B4SOItox * pParam->B4SOIXdep0); T0 = exp(-0.5 * pParam->B4SOIdsub * pParam->B4SOIleff / T1); pParam->B4SOItheta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->B4SOIdrout * pParam->B4SOIleff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->B4SOIthetaRout = pParam->B4SOIpdibl1 * T2 + pParam->B4SOIpdibl2; /* New DITS term (added in 4.1) */ pParam->B4SOIdvtp2factor = pParam->B4SOIdvtp2 / exp(pParam->B4SOIdvtp3 * log(pParam->B4SOIleff)); /* stress effect */ if (model->B4SOIwlod < 0.0) { fprintf(stderr, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->B4SOIwlod); model->B4SOIwlod = 0.0; } T0 = pow(Ldrn, model->B4SOIllodku0); W_tmp = Wdrn + model->B4SOIwlod; T1 = pow(W_tmp, model->B4SOIwlodku0); tmp1 = model->B4SOIlku0 / T0 + model->B4SOIwku0 / T1 + model->B4SOIpku0 / (T0 * T1); pParam->B4SOIku0 = 1.0 + tmp1; T0 = pow(Ldrn, model->B4SOIllodvth); T1 = pow(W_tmp, model->B4SOIwlodvth); tmp1 = model->B4SOIlkvth0 / T0 + model->B4SOIwkvth0 / T1 + model->B4SOIpkvth0 / (T0 * T1); pParam->B4SOIkvth0 = 1.0 + tmp1; pParam->B4SOIkvth0 = sqrt( pParam->B4SOIkvth0 * pParam->B4SOIkvth0 + DELTA); /*T0 = (TRatio - 1.0);*/ T0 = (TempRatio - 1.0); /* bug fix v4.1 */ pParam->B4SOIku0temp = pParam->B4SOIku0 * (1.0 + model->B4SOItku0 * T0) + DELTA; Inv_saref = 1.0 / (model->B4SOIsaref + 0.5 * Ldrn); Inv_sbref = 1.0 / (model->B4SOIsbref + 0.5 * Ldrn); pParam->B4SOIinv_od_ref = Inv_saref + Inv_sbref; pParam->B4SOIrho_ref = model->B4SOIku0 / pParam->B4SOIku0temp * pParam->B4SOIinv_od_ref; /* stress effect end */ } /* v4.0 stress effect */ /* Bug Fix # 17 Jul09 Code 1484-1560 is moved up from lines 1884-1958 of old version*/ /* v4.0 stress effect */ if( (here->B4SOIsa > 0.0) && (here->B4SOIsb > 0.0) && ( (here->B4SOInf == 1.0) || ((here->B4SOInf > 1.0) && (here->B4SOIsd > 0.0)) ) ) { Inv_sa = 0; Inv_sb = 0; if (model->B4SOIkvsat < -1.0 ) { fprintf(stderr, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->B4SOIkvsat); here->B4SOIkvsat = kvsat = -1.0; } else if (model->B4SOIkvsat > 1.0) { fprintf(stderr, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->B4SOIkvsat); here->B4SOIkvsat = kvsat = 1.0; } else here->B4SOIkvsat = model->B4SOIkvsat; for(i = 0; i < here->B4SOInf; i++) { T0 = 1.0 / here->B4SOInf / (here->B4SOIsa + 0.5*Ldrn + i * (here->B4SOIsd +Ldrn)); T1 = 1.0 / here->B4SOInf / (here->B4SOIsb + 0.5*Ldrn + i * (here->B4SOIsd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; here->B4SOIInv_ODeff = Inv_ODeff; rho = model->B4SOIku0 / pParam->B4SOIku0temp * Inv_ODeff; T0 = (1.0 + rho)/(1.0 + pParam->B4SOIrho_ref); here->B4SOIu0temp = pParam->B4SOIu0temp * T0; T1 = (1.0 + here->B4SOIkvsat * rho)/(1.0 + here->B4SOIkvsat * pParam->B4SOIrho_ref);/*self-heating bug fix*/ here->B4SOIvsattemp = pParam->B4SOIvsattemp * T1; OD_offset = Inv_ODeff - pParam->B4SOIinv_od_ref; dvth0_lod = model->B4SOIkvth0 / pParam->B4SOIkvth0 * OD_offset; dk2_lod = model->B4SOIstk2 / pow(pParam->B4SOIkvth0, model->B4SOIlodk2) * OD_offset; deta0_lod = model->B4SOIsteta0 / pow(pParam->B4SOIkvth0, model->B4SOIlodeta0) * OD_offset; here->B4SOIvth0 = pParam->B4SOIvth0 + dvth0_lod; here->B4SOIk2 = pParam->B4SOIk2 + dk2_lod; here->B4SOIeta0 = pParam->B4SOIeta0 + deta0_lod; } else { here->B4SOIu0temp = pParam->B4SOIu0temp; here->B4SOIvth0 = pParam->B4SOIvth0; here->B4SOIvsattemp = pParam->B4SOIvsattemp; here->B4SOIk2 = pParam->B4SOIk2; here->B4SOIeta0 = pParam->B4SOIeta0; here->B4SOIInv_ODeff = 0; pParam->B4SOIinv_od_ref = 0; /*Stress bug fix*/ here->B4SOIkvsat = 0; /*Stress bug fix*/ } /* v4.0 stress effect end */ here->B4SOIk2ox = here->B4SOIk2 * model->B4SOItox / model->B4SOItoxm; /* v4.0 */ here->B4SOIvth0 += here->B4SOIdelvto; /* v4.0 */ here->B4SOIvfb = pParam->B4SOIvfb + model->B4SOItype * here->B4SOIdelvto; /* Bug Fix # 17 Jul09 Code 1479-1545 is moved up from lines 1884-1950 of old version, 1954-2035 in this version*/ here->B4SOIcsbox = model->B4SOIcbox*here->B4SOIsourceArea; here->B4SOIcsmin = model->B4SOIcsdmin*here->B4SOIsourceArea; here->B4SOIcdbox = model->B4SOIcbox*here->B4SOIdrainArea; here->B4SOIcdmin = model->B4SOIcsdmin*here->B4SOIdrainArea; if ( ((pParam->B4SOInsub > 0) && (model->B4SOItype > 0)) || ((pParam->B4SOInsub < 0) && (model->B4SOItype < 0)) ) { T0 = pParam->B4SOIvsdth - pParam->B4SOIvsdfb; pParam->B4SOIsdt1 = pParam->B4SOIvsdfb + model->B4SOIasd * T0; T1 = here->B4SOIcsbox - here->B4SOIcsmin; T2 = T1 / T0 / T0; pParam->B4SOIst2 = T2 / model->B4SOIasd; pParam->B4SOIst3 = T2 /( 1 - model->B4SOIasd); here->B4SOIst4 = T0 * T1 * (1 + model->B4SOIasd) / 3 - here->B4SOIcsmin * pParam->B4SOIvsdfb; T1 = here->B4SOIcdbox - here->B4SOIcdmin; T2 = T1 / T0 / T0; pParam->B4SOIdt2 = T2 / model->B4SOIasd; pParam->B4SOIdt3 = T2 /( 1 - model->B4SOIasd); here->B4SOIdt4 = T0 * T1 * (1 + model->B4SOIasd) / 3 - here->B4SOIcdmin * pParam->B4SOIvsdfb; } else { T0 = pParam->B4SOIvsdfb - pParam->B4SOIvsdth; pParam->B4SOIsdt1 = pParam->B4SOIvsdth + model->B4SOIasd * T0; T1 = here->B4SOIcsmin - here->B4SOIcsbox; T2 = T1 / T0 / T0; pParam->B4SOIst2 = T2 / model->B4SOIasd; pParam->B4SOIst3 = T2 /( 1 - model->B4SOIasd); here->B4SOIst4 = T0 * T1 * (1 + model->B4SOIasd) / 3 - here->B4SOIcsbox * pParam->B4SOIvsdth; T1 = here->B4SOIcdmin - here->B4SOIcdbox; T2 = T1 / T0 / T0; pParam->B4SOIdt2 = T2 / model->B4SOIasd; pParam->B4SOIdt3 = T2 /( 1 - model->B4SOIasd); here->B4SOIdt4 = T0 * T1 * (1 + model->B4SOIasd) / 3 - here->B4SOIcdbox * pParam->B4SOIvsdth; } /* v2.2.2 bug fix */ T0 = model->B4SOIcsdesw * log(model->B4SOIcfrcoeff * (1 + model->B4SOItsi / model->B4SOItbox)); /* v4.4 */ T1 = here->B4SOIsourcePerimeter - here->B4SOIw; if (T1 > 0.0) here->B4SOIcsesw = T0 * T1; else here->B4SOIcsesw = 0.0; T1 = here->B4SOIdrainPerimeter - here->B4SOIw; if (T1 > 0.0) here->B4SOIcdesw = T0 * T1; else here->B4SOIcdesw = 0.0; here->B4SOIphi = pParam->B4SOIphi; /* process source/drain series resistance */ here->B4SOIdrainConductance = model->B4SOIsheetResistance * here->B4SOIdrainSquares; if (here->B4SOIdrainConductance > 0.0) here->B4SOIdrainConductance = 1.0 / here->B4SOIdrainConductance; else here->B4SOIdrainConductance = 0.0; here->B4SOIsourceConductance = model->B4SOIsheetResistance * here->B4SOIsourceSquares; if (here->B4SOIsourceConductance > 0.0) here->B4SOIsourceConductance = 1.0 / here->B4SOIsourceConductance; else here->B4SOIsourceConductance = 0.0; here->B4SOIcgso = pParam->B4SOIcgso; here->B4SOIcgdo = pParam->B4SOIcgdo; /* v2.0 release */ if (model->B4SOIln < 1e-15) model->B4SOIln = 1e-15; T0 = -0.5 * pParam->B4SOIleff * pParam->B4SOIleff / model->B4SOIln / model->B4SOIln; DEXP(T0,T1); pParam->B4SOIarfabjt = T1; T0 = pParam->B4SOIlbjt0 * (1.0 / pParam->B4SOIleff + 1.0 / model->B4SOIln); pParam->B4SOIlratio = pow(T0,pParam->B4SOInbjt); pParam->B4SOIlratiodif = 1.0 + model->B4SOIldif0 * pow(T0,pParam->B4SOIndif); if ((pParam->B4SOIvearly = pParam->B4SOIvabjt + pParam->B4SOIaely * pParam->B4SOIleff) < 1) pParam->B4SOIvearly = 1; /*4.1 toxp calculation*/ if(model->B4SOImtrlMod==0) { model->B4SOItoxp = model->B4SOItox - model->B4SOIdtoxcv; } else { /* Calculate TOXP from EOT */ /* Calculate Vgs_eff @ Vgs = VDD with Poly Depletion Effect */ Vtm0eot = KboQ * model->B4SOItempeot; Vtmeot = Vtm0eot; vbieot = Vtm0eot * log(1.0e20 * pParam->B4SOInpeak / (ni * ni)); phieot = 2.0 * Vtm0eot * log(pParam->B4SOInpeak / ni); sqrtphieot = sqrt(phieot); tmp2 = here->B4SOIvfb + phieot; vddeot = model->B4SOItype * model->B4SOIvddeot; T0 = model->B4SOIepsrgate * EPS0; if ((pParam->B4SOIngate > 1.0e18) && (pParam->B4SOIngate < 1.0e25) && (vddeot > tmp2) && (T0!=0)) { T1 = 1.0e6 * Charge_q * epssub * pParam->B4SOIngate / (model->B4SOIcox * model->B4SOIcox); T4 = sqrt(1.0 + 2.0 * (vddeot - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ /* T7 = 1.12 - T3 - 0.05; */ T7 = eggdep - T3 - 0.05; /* bugfix v4.3.1 -Tanvir */ T6 = sqrt(T7 * T7 + 0.224); /* T5 = 1.12 - 0.5 * (T7 + T6); */ T5 = eggdep - 0.5 * (T7 + T6); /* bugfix v4.3.1 -Tanvir */ Vgs_eff = vddeot - T5; } else { Vgs_eff = vddeot; } /* Calculate Vth @ Vds=Vbs=0 */ V0 = vbieot - phieot; T3 = sqrt(pParam->B4SOIXdep0); lt1 = model->B4SOIfactor1 * T3; ltw= model->B4SOIfactor1 * T3 ; T0 = -0.5 * pParam->B4SOIdvt1 * model->B4SOIleffeot / lt1; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; Theta0 = T1 * (1.0 + 2.0 * T1); } /* Calculate n */ T2 = pParam->B4SOInfactor * epssub / pParam->B4SOIXdep0; T3 = pParam->B4SOIcdsc ; T4 = (T2 + T3 * Theta0 + pParam->B4SOIcit) / model->B4SOIcox; if (T4 >= -0.5) { n = 1.0 + T4; } else /* avoid discontinuity problems caused by T4 */ { T0 = 1.0 / (3.0 + 8.0 * T4); n = (1.0 + 3.0 * T4) * T0; } /* v4.0 DITS */ if (pParam->B4SOIdvtp0 > 0.0) { T2 = 1; /* Bug fix #1 Jun 09 Shorter implementation of same code */ /* T0 = 0.0; T2 = exp(T0); if (T0 < -EXPL_THRESHOLD) { T2 = MIN_EXPL; } else { T2 = exp(T0); } end */ T3 = model->B4SOIleffeot + pParam->B4SOIdvtp0 * (1.0 + T2); T4 = Vtmeot * log(model->B4SOIleffeot / T3); DITS_Sft = n * T4; } else { DITS_Sft=0.0; } here->B4SOIthetavth = pParam->B4SOIdvt0 * Theta0; Delt_vth = here->B4SOIthetavth * V0; T0 = -0.5 * pParam->B4SOIdvt1w * model->B4SOIweffeot * model->B4SOIleffeot / ltw; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->B4SOIdvt0w * T2; DeltVthw = T0 * V0; TempRatioMinus1 = model->B4SOItempeot / model->B4SOItnom - 1.0; T0 = sqrt(1.0 + pParam->B4SOIlpe0 / model->B4SOIleffeot); T1 = (pParam->B4SOIkt1 + pParam->B4SOIkt1l / model->B4SOIleffeot); DeltVthtemp = pParam->B4SOIk1ox * (T0 - 1.0) * sqrtphieot + T1 * TempRatioMinus1; /* v4.0 */ tmp2 = toxe * phieot / (model->B4SOIweffeot + pParam->B4SOIw0); DIBL_Sft = 0.0; DITS_Sft2 = 0.0; Lpe_Vb = sqrt(1.0 + pParam->B4SOIlpeb / model->B4SOIleffeot); sqrtPhisExt = sqrtphieot; Vth = model->B4SOItype * here->B4SOIvth0 + (pParam->B4SOIk1ox * sqrtPhisExt - pParam->B4SOIk1eff * sqrtphieot) * Lpe_Vb - Delt_vth - DeltVthw +pParam->B4SOIk3 * tmp2 + DeltVthtemp - DIBL_Sft -DITS_Sft - DITS_Sft2; Vgst = Vgs_eff - Vth; T10 = n * Vtmeot; /* v4.0 */ VgstNVt = pParam->B4SOImstar * Vgst / T10; /* v4.0 */ ExpArg = (pParam->B4SOIvoff - (1- pParam->B4SOImstar) * Vgst) / T10; /* v4.0 */ /* MCJ: Very small Vgst */ if (VgstNVt > EXPL_THRESHOLD) { Vgsteff = Vgst; /* T0 is dVgsteff_dVbseff */ } else if (ExpArg > EXPL_THRESHOLD) { T0 = (Vgst - pParam->B4SOIvoff) / (n * Vtmeot); ExpVgst = exp(T0); Vgsteff = Vtmeot * pParam->B4SOIcdep0 / model->B4SOIcox * ExpVgst; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); T3 = (1.0 / model->B4SOItempeot); T4 = -model->B4SOIcox / (Vtm0eot * pParam->B4SOIcdep0) * exp(ExpArg) * (1 - pParam->B4SOImstar); T2 = pParam->B4SOImstar - T10 * T4 / (1.0 - pParam->B4SOImstar); Vgsteff = T1 / T2; } Vgst2Vtm = Vgsteff + 2.0 * Vtmeot; /* calculating Toxp */ T3 = model->B4SOItype * here->B4SOIvth0 - here->B4SOIvfb - phieot; vtfbphi2eot = 4.0 * T3; if (vtfbphi2eot < 0.0) vtfbphi2eot = 0.0; niter = 0; toxpf = toxe; do { toxpi = toxpf; tmp2 = 2.0e8 * toxpf; T0 = (Vgsteff + vtfbphi2eot) / tmp2; T1 = 1.0 + exp(model->B4SOIbdos * 0.7 * log(T0)); Tcen = model->B4SOIados * 1.9e-9 / T1; toxpf = toxe - epsrox/model->B4SOIepsrsub * Tcen; niter++; } while ((niter<=4)&&(ABS(toxpf-toxpi)>1e-12)); model->B4SOItoxp = toxpf; /*model->B4SOIcoxp = epsrox * EPS0 / model->B4SOItoxp;*/ }/*End of Toxp*/ /* vfbzb calculation for capMod 3 */ tmp = sqrt(pParam->B4SOIXdep0); tmp1 = pParam->B4SOIvbi - pParam->B4SOIphi; tmp2 = model->B4SOIfactor1 * tmp; T0 = -0.5 * pParam->B4SOIdvt1w * pParam->B4SOIweff * pParam->B4SOIleff / tmp2; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->B4SOIdvt0w * T2; T2 = T0 * tmp1; T0 = -0.5 * pParam->B4SOIdvt1 * pParam->B4SOIleff / tmp2; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T3 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T3 = T1 * (1.0 + 2.0 * T1); } T3 = pParam->B4SOIdvt0 * T3 * tmp1; /* v2.2.3 */ /*4.1*/ /* T4 = (model->B4SOItox - model->B4SOIdtoxcv) * pParam->B4SOIphi / (pParam->B4SOIweff + pParam->B4SOIw0); */ T4 = model->B4SOItoxp * pParam->B4SOIphi / (pParam->B4SOIweff + pParam->B4SOIw0); T0 = sqrt(1.0 + pParam->B4SOIlpe0 / pParam->B4SOIleff); /*v4.0*/ T5 = pParam->B4SOIk1ox * (T0 - 1.0) * pParam->B4SOIsqrtPhi + (pParam->B4SOIkt1 + pParam->B4SOIkt1l / pParam->B4SOIleff) * (TempRatio - 1.0); /* v4.0 */ tmp3 = model->B4SOItype * pParam->B4SOIvth0 - T2 - T3 + pParam->B4SOIk3 * T4 + T5; pParam->B4SOIvfbzb = tmp3 - pParam->B4SOIphi - pParam->B4SOIk1 * pParam->B4SOIsqrtPhi; /* End of vfbzb */ /* v3.2 */ pParam->B4SOIqsi = Charge_q * model->B4SOInpeak * (1.0 + pParam->B4SOIlpe0 / pParam->B4SOIleff) * 1e6 * model->B4SOItsi; /* v3.1 added for RF */ here->B4SOIgrgeltd = model->B4SOIrshg * (model->B4SOIxgw + pParam->B4SOIweff / here->B4SOInseg / 3.0 / model->B4SOIngcon) / (model->B4SOIngcon * here->B4SOInf * (here->B4SOIl - model->B4SOIxgl)); if (here->B4SOIgrgeltd > 0.0) here->B4SOIgrgeltd = 1.0 / here->B4SOIgrgeltd; else { here->B4SOIgrgeltd = 1.0e3; /* mho */ if (here->B4SOIrgateMod !=0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } /* v3.1 added for RF end */ /* v4.0 rbodyMod */ if (here->B4SOIrbodyMod) { if (here->B4SOIrbdb < 1.0e-3) here->B4SOIgrbdb = 1.0e3; /* in mho */ else here->B4SOIgrbdb = model->B4SOIgbmin + 1.0 / here->B4SOIrbdb; if (here->B4SOIrbsb < 1.0e-3) here->B4SOIgrbsb = 1.0e3; else here->B4SOIgrbsb = model->B4SOIgbmin + 1.0 / here->B4SOIrbsb; } /* v4.0 rbodyMod end */ /* Bug Fix # 17 Jul09 Stress effect code (lines: 1954-2020) is moved up to lines 1479-1545*/ here->B4SOIvfbzb = pParam->B4SOIvfbzb + model->B4SOItype * here->B4SOIdelvto; pParam->B4SOIldeb = sqrt(epssub * Vtm0 / (Charge_q * pParam->B4SOInpeak * 1.0e6)) / 3.0; /*For high k mobility*/ T1 = model->B4SOItype * here->B4SOIvth0 - here->B4SOIvfb - pParam->B4SOIphi; T2 = T1 + T1; T3 = 2.5 * T1; here->B4SOIvtfbphi1 = (model->B4SOItype == NMOS) ? T2 : T3; if (here->B4SOIvtfbphi1 < 0.0) here->B4SOIvtfbphi1 = 0.0; /*Calculate VgsteffVth for mobMod=4*/ if(model->B4SOImobMod == 4) { /*Calculate n @ Vbs=Vds=0*/ /*V0 = pParam->B4SOIvbi - pParam->B4SOIphi; */ /* v4.2 never used in code */ lt1 = model->B4SOIfactor1* pParam->B4SOIsqrtXdep0; /* ltw = lt1; */ /* v4.2 never used in code */ T0 = pParam->B4SOIdvt1 * pParam->B4SOIleff / lt1; if (T0 < EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXPL; Theta0 = T1 / T4; } else Theta0 = 1.0 / (MAX_EXPL - 2.0); tmp1 = epssub / pParam->B4SOIXdep0; /*here->B4SOInstar = model->B4SOIvtm / Charge_q * (model->B4SOIcox + tmp1 + pParam->B4SOIcit); */ /* v4.2 never used in code */ tmp2 = pParam->B4SOInfactor * tmp1; tmp3 = (tmp2 + pParam->B4SOIcdsc * Theta0 + pParam->B4SOIcit) / model->B4SOIcox; if (tmp3 >= -0.5) n0 = 1.0 + tmp3; else { T0 = 1.0 / (3.0 + 8.0 * tmp3); n0 = (1.0 + 3.0 * tmp3) * T0; } T0 = n0 * Vtm0; T1 = pParam->B4SOIvoff; T2 = T1/T0; if (T2 < -EXPL_THRESHOLD) { T3 = model->B4SOIcox * MIN_EXPL / pParam->B4SOIcdep0; T4 = pParam->B4SOImstar + T3 * n0; } else if (T2 > EXPL_THRESHOLD) { T3 = model->B4SOIcox * MAX_EXPL / pParam->B4SOIcdep0; T4 = pParam->B4SOImstar + T3 * n0; } else { T3 = exp(T2)* model->B4SOIcox / pParam->B4SOIcdep0; T4 = pParam->B4SOImstar + T3 * n0; } here->B4SOIvgsteffvth = T0 * log(2.0)/T4; } } } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soinoi.c0000644000265600020320000010352012264261473021574 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soinoi.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soinoi.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 **********/ #include "ngspice/ngspice.h" #include "b4soidef.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * B4SOInoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->B4SOItnoiMod and model->B4SOIfnoiMod If model->B4SOItnoiMod = 0, Channel thermal noise = Charge based model If model->B4SOItnoiMod = 1, Channel thermal noise = Holistic noise model If model->B4SOItnoiMod = 2, Channel thermal noise = SPICE2 model If model->B4SOIfnoiMod = 0, Flicker noise = Simple model If model->B4SOIfnoiMod = 1, Flicker noise = Unified model */ static double B4SOIEval1ovFNoise( double vds, B4SOImodel *model, B4SOIinstance *here, double freq, double temp) { struct b4soiSizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->B4SOIcd); esat = 2.0 * here->B4SOIvsattemp / here->B4SOIueff; /* v2.2.3 bug fix */ if(model->B4SOIem<=0.0) DelClm = 0.0; else { T0 = ((((vds - here->B4SOIVdseff) / pParam->B4SOIlitl) + model->B4SOIem) / esat); DelClm = pParam->B4SOIlitl * log (MAX(T0, N_MINLOG)); } EffFreq = pow(freq, model->B4SOIef); T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->B4SOIueff; T2 = 1.0e10 * EffFreq * here->B4SOIAbulk * model->B4SOIcox * pParam->B4SOIleff * pParam->B4SOIleff; /* v2.2.3 bug fix */ N0 = model->B4SOIcox * here->B4SOIVgsteff / CHARGE; Nl = model->B4SOIcox * here->B4SOIVgsteff * (1.0 - here->B4SOIAbovVgst2Vtm * here->B4SOIVdseff) / CHARGE; T3 = model->B4SOIoxideTrapDensityA * log(MAX(((N0 + here->B4SOInstar) / (Nl + here->B4SOInstar)), N_MINLOG)); T4 = model->B4SOIoxideTrapDensityB * (N0 - Nl); T5 = model->B4SOIoxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; T7 = 1.0e10 * EffFreq * pParam->B4SOIleff * pParam->B4SOIleff * pParam->B4SOIweff * here->B4SOInf; T8 = model->B4SOIoxideTrapDensityA + model->B4SOIoxideTrapDensityB * Nl + model->B4SOIoxideTrapDensityC * Nl * Nl; T9 = (Nl + here->B4SOInstar) * (Nl + here->B4SOInstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int B4SOInoise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { register B4SOImodel *model = (B4SOImodel *)inModel; register B4SOIinstance *here; struct b4soiSizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B4SOINSRCS]; double lnNdens[B4SOINSRCS]; double vgs, vds; double T0, T1, T2, T5, T10, T11; double Ssi, Swi; /* v3.2 */ double npart_theta, npart_beta, igsquare, esat; /* v3.2 end */ double gspr, gdpr; double tempRatioSH, Vdseffovcd; /* v4.2 bugfix */ int i; double m; /* define the names of the noise sources */ static char *B4SOInNames[B4SOINSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in B4SOIdefs.h */ ".rg", /* noise due to rgeltd, v3.2 */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".fb_ibs", /* noise due to floating body by ibs */ ".fb_ibd", /* noise due to floating body by ibd */ ".igs", /* shot noise due to IGS, v3.2 */ ".igd", /* shot noise due to IGD, v3.2 */ ".igb", /* shot noise due to IGB, v3.2 */ ".rbsb", /* noise due to rbsb v4.0 */ ".rbdb", /* noise due to rbdb v4.0 */ ".rbody", /* noise due to body contact v4.0 */ "" /* total transistor noise */ }; for (; model != NULL; model = model->B4SOInextModel) { for (here = model->B4SOIinstances; here != NULL; here = here->B4SOInextInstance) { m = here->B4SOIm; pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < B4SOINSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->B4SOIname, B4SOInNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < B4SOINSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->B4SOIname, B4SOInNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->B4SOIname, B4SOInNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: /*v4.2 implementing SH temp */ if ((model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0)) tempRatioSH = here->B4SOITempSH / ckt->CKTtemp; else tempRatioSH = 1.0; /*v4.2 implementing limit on Vdseffovcd*/ if (here->B4SOIcd != 0) { Vdseffovcd = here->B4SOIVdseff / here->B4SOIcd; if (Vdseffovcd >= 1.0e9) Vdseffovcd = 1.0e9 ; } else Vdseffovcd = 1.0e9; /* if (model->B4SOItnoiMod == 0) *//* v4.0 */ /* v4.2 bugfix: consider tnoiMod = 2*/ if (model->B4SOItnoiMod != 1) { if (model->B4SOIrdsMod == 0) { gspr = here->B4SOIsourceConductance; gdpr = here->B4SOIdrainConductance; } else { gspr = here->B4SOIgstot; gdpr = here->B4SOIgdtot; } } else { esat = 2.0 * here->B4SOIvsattemp / here->B4SOIueff; T5 = here->B4SOIVgsteff / esat / pParam->B4SOIleff; T5 *= T5; npart_beta = model->B4SOIrnoia * (1.0 + T5 * model->B4SOItnoia * pParam->B4SOIleff); npart_theta = model->B4SOIrnoib * (1.0 + T5 * model->B4SOItnoib * pParam->B4SOIleff); /* v4.2 bugfix: implement bugfix from bsim4.6.2 */ if(npart_theta > 0.9) npart_theta = 0.9; if(npart_theta > 0.9 * npart_beta) npart_theta = 0.9 * npart_beta; if (model->B4SOIrdsMod == 0) { gspr = here->B4SOIsourceConductance; gdpr = here->B4SOIdrainConductance; } else { gspr = here->B4SOIgstot; gdpr = here->B4SOIgdtot; } if ( (*(ckt->CKTstates[0] + here->B4SOIvds)) >= 0.0 ) gspr = gspr * (1.0 + npart_theta * npart_theta * gspr / here->B4SOIidovVds); else gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr / here->B4SOIidovVds); } NevalSrc(&noizDens[B4SOIRDNOIZ], &lnNdens[B4SOIRDNOIZ], ckt, THERMNOISE, here->B4SOIdNodePrime, here->B4SOIdNode, gdpr * tempRatioSH * m); /* v4.2 self-heating temp */ NevalSrc(&noizDens[B4SOIRSNOIZ], &lnNdens[B4SOIRSNOIZ], ckt, THERMNOISE, here->B4SOIsNodePrime, here->B4SOIsNode, gspr * tempRatioSH * m); /* v4.2 self-heating temp */ /* v4.2 bugfix: implement correct thermal noise model (bsim4.6.0)*/ /* if ((here->B4SOIrgateMod == 1) || (here->B4SOIrgateMod == 2)) */ if (here->B4SOIrgateMod == 1) { NevalSrc(&noizDens[B4SOIRGNOIZ], &lnNdens[B4SOIRGNOIZ], ckt, THERMNOISE, here->B4SOIgNode, here->B4SOIgNodeExt, here->B4SOIgrgeltd * tempRatioSH * m); /* v4.2 self-heating temp */ } else if (here->B4SOIrgateMod == 2) /*v4.2*/ { T0 = 1.0 + here->B4SOIgrgeltd/here->B4SOIgcrg; T1 = T0 * T0; NevalSrc(&noizDens[B4SOIRGNOIZ], &lnNdens[B4SOIRGNOIZ], ckt, THERMNOISE, here->B4SOIgNode, here->B4SOIgNodeExt, here->B4SOIgrgeltd/T1 * tempRatioSH * m); /*v4.2*/ } else if (here->B4SOIrgateMod == 3) { NevalSrc(&noizDens[B4SOIRGNOIZ], &lnNdens[B4SOIRGNOIZ], ckt, THERMNOISE, here->B4SOIgNodeMid, here->B4SOIgNodeExt, here->B4SOIgrgeltd * tempRatioSH * m); /* v4.2 self-heating temp */ } else { noizDens[B4SOIRGNOIZ] = 0.0; lnNdens[B4SOIRGNOIZ] = log(MAX(noizDens[B4SOIRGNOIZ], N_MINLOG)); } if (here->B4SOIrbodyMod) { NevalSrc(&noizDens[B4SOIRBSBNOIZ], &lnNdens[B4SOIRBSBNOIZ], ckt, THERMNOISE, here->B4SOIbNode, here->B4SOIsbNode, here->B4SOIgrbsb * m); NevalSrc(&noizDens[B4SOIRBDBNOIZ], &lnNdens[B4SOIRBDBNOIZ], ckt, THERMNOISE, here->B4SOIbNode, here->B4SOIdbNode, here->B4SOIgrbdb * tempRatioSH * m); /* v4.2 self-heating temp */ } else { noizDens[B4SOIRBSBNOIZ] = 0.0; noizDens[B4SOIRBDBNOIZ] = 0.0; lnNdens[B4SOIRBSBNOIZ] = log(MAX(noizDens[B4SOIRBSBNOIZ], N_MINLOG)); lnNdens[B4SOIRBDBNOIZ] = log(MAX(noizDens[B4SOIRBDBNOIZ], N_MINLOG)); } if (here->B4SOIbodyMod == 1) { NevalSrc(&noizDens[B4SOIRBODYNOIZ], &lnNdens[B4SOIRBODYNOIZ], ckt, THERMNOISE, here->B4SOIbNode, here->B4SOIpNode, tempRatioSH / (here->B4SOIrbodyext + /* v4.2 self-heating temp */ pParam->B4SOIrbody) * m); } else { noizDens[B4SOIRBODYNOIZ] = 0.0; lnNdens[B4SOIRBODYNOIZ] = log(MAX(noizDens[B4SOIRBODYNOIZ], N_MINLOG)); } switch( model->B4SOItnoiMod ) { case 0: NevalSrc(&noizDens[B4SOIIDNOIZ], &lnNdens[B4SOIIDNOIZ], ckt, THERMNOISE, here->B4SOIdNodePrime, here->B4SOIsNodePrime, (here->B4SOIueff * fabs(here->B4SOIqinv / (pParam->B4SOIleff * pParam->B4SOIleff + here->B4SOIueff*fabs (here->B4SOIqinv) * here->B4SOIrds))) * tempRatioSH /* v4.2 self-heating temp */ * model->B4SOIntnoi * m ); break; /* v2.2.3 bug fix */ case 1: T0 = here->B4SOIgm + here->B4SOIgmbs + here->B4SOIgds; T0 *= T0; esat = 2.0 * here->B4SOIvsattemp / here->B4SOIueff; T5 = here->B4SOIVgsteff / esat / pParam->B4SOIleff; T5 *= T5; npart_beta = model->B4SOIrnoia * (1.0 + T5 * model->B4SOItnoia * pParam->B4SOIleff); npart_theta = model->B4SOIrnoib * (1.0 + T5 * model->B4SOItnoib * pParam->B4SOIleff); /*igsquare = npart_theta * npart_theta * T0 * here->B4SOIVdseff / here->B4SOIcd; v4.2 implementing limit on Vdseffovcd*/ igsquare = npart_theta * npart_theta * T0 * Vdseffovcd; T1 = npart_beta * (here->B4SOIgm + here->B4SOIgmbs) + here->B4SOIgds; /*T2 = T1 * T1 * here->B4SOIVdseff / here->B4SOIcd; v4.2 implementing limit on Vdseffovcd*/ T2 = T1 * T1 * Vdseffovcd; NevalSrc(&noizDens[B4SOIIDNOIZ], &lnNdens[B4SOIIDNOIZ], ckt, THERMNOISE, here->B4SOIdNodePrime, here->B4SOIsNodePrime, /* (T2 - igsquare)); */ (T2 - igsquare) * tempRatioSH * m); /* v4.2 self-heating temp */ break; case 2: NevalSrc(&noizDens[B4SOIIDNOIZ], &lnNdens[B4SOIIDNOIZ], ckt, THERMNOISE, here->B4SOIdNodePrime, here->B4SOIsNodePrime, model->B4SOIntnoi * tempRatioSH * /* v4.2 self-heating temp */ (2.0 / 3.0 * fabs(here->B4SOIgm + here->B4SOIgds + here->B4SOIgmbs)) * m); break; } NevalSrc(&noizDens[B4SOIFLNOIZ], (double*) NULL, ckt, N_GAIN, here->B4SOIdNodePrime, here->B4SOIsNodePrime, (double) 0.0); switch( model->B4SOIfnoiMod ) { case 0: if (model->B4SOIw0flk > 0) { /* v4.0 */ noizDens[B4SOIFLNOIZ] *= m * here->B4SOInf * pParam->B4SOIweff/model->B4SOIw0flk * model->B4SOIkf * exp(model->B4SOIaf * log(MAX(fabs(here->B4SOIcd / pParam->B4SOIweff / here->B4SOInf * model->B4SOIw0flk), N_MINLOG))) / (pow(data->freq, model->B4SOIef) * pow(pParam->B4SOIleff, model->B4SOIbf) * model->B4SOIcox); break; } else { noizDens[B4SOIFLNOIZ] *= m * model->B4SOIkf * exp(model->B4SOIaf * log(MAX(fabs(here->B4SOIcd), N_MINLOG))) / (pow(data->freq, model->B4SOIef) * pow(pParam->B4SOIleff, model->B4SOIbf) * model->B4SOIcox); break; } case 1: vgs = *(ckt->CKTstates[0] + here->B4SOIvgs); vds = *(ckt->CKTstates[0] + here->B4SOIvds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } /*v4.2 implementing SH temp */ if ((model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0)) Ssi = B4SOIEval1ovFNoise(vds, model, here, data->freq, here->B4SOITempSH); else Ssi = B4SOIEval1ovFNoise(vds, model, here, data->freq, ckt->CKTtemp); /*v4.2 implementing SH temp */ /*v4.2 implementing SH temp */ if ((model->B4SOIshMod == 1) && (here->B4SOIrth0 != 0.0)) T10 = model->B4SOIoxideTrapDensityA * CONSTboltz * here->B4SOITempSH; else T10 = model->B4SOIoxideTrapDensityA * CONSTboltz * ckt->CKTtemp; /*v4.2 implementing SH temp */ T11 = pParam->B4SOIweff * here->B4SOInf * pParam->B4SOIleff * pow(data->freq, model->B4SOIef) * 1.0e10 * here->B4SOInstar * here->B4SOInstar ; Swi = T10 / T11 * here->B4SOIcd * here->B4SOIcd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[B4SOIFLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[B4SOIFLNOIZ] *= 0.0; break; } lnNdens[B4SOIFLNOIZ] = log(MAX(noizDens[B4SOIFLNOIZ], N_MINLOG)); /* v3.2 for gate tunneling shot noise */ NevalSrc(&noizDens[B4SOIIGSNOIZ], &lnNdens[B4SOIIGSNOIZ], ckt, SHOTNOISE, here->B4SOIgNode, here->B4SOIsNodePrime, (here->B4SOIIgs + here->B4SOIIgcs) * m); NevalSrc(&noizDens[B4SOIIGDNOIZ], &lnNdens[B4SOIIGDNOIZ], ckt, SHOTNOISE, here->B4SOIgNode, here->B4SOIdNodePrime, (here->B4SOIIgd + here->B4SOIIgcd) * m); NevalSrc(&noizDens[B4SOIIGBNOIZ], &lnNdens[B4SOIIGBNOIZ], ckt, SHOTNOISE, here->B4SOIgNode, here->B4SOIbNode, here->B4SOIig * m); /* v3.2 for gate tunneling shot noise end */ /* Low frequency excess noise due to FBE */ /* NevalSrc(&noizDens[B4SOIFBNOIZ], &lnNdens[B4SOIFBNOIZ], ckt, SHOTNOISE, here->B4SOIsNodePrime, here->B4SOIbNode, 2.0 * model->B4SOInoif * here->B4SOIibs); */ /* v4.0 */ NevalSrc(&noizDens[B4SOIFB_IBSNOIZ], &lnNdens[B4SOIFB_IBSNOIZ], ckt, SHOTNOISE, here->B4SOIsNodePrime, here->B4SOIbNode, model->B4SOInoif * here->B4SOIibs * m); /* NevalSrc(&noizDens[B4SOIFB_IBDNOIZ], &lnNdens[B4SOIFB_IBDNOIZ], ckt, SHOTNOISE, here->B4SOIdNodePrime, here->B4SOIbNode, model->B4SOInoif * fabs(here->B4SOIibd)); */ /*v4.2*/ NevalSrc(&noizDens[B4SOIFB_IBDNOIZ], &lnNdens[B4SOIFB_IBDNOIZ], ckt, SHOTNOISE, here->B4SOIdNodePrime, here->B4SOIbNode, model->B4SOInoif * (here->B4SOIibd) * m); /*v4.2 extra fabs()removed */ noizDens[B4SOITOTNOIZ] = noizDens[B4SOIRDNOIZ] + noizDens[B4SOIRSNOIZ] + noizDens[B4SOIRGNOIZ] + noizDens[B4SOIIDNOIZ] + noizDens[B4SOIFLNOIZ] /* + noizDens[B4SOIFBNOIZ] */ + noizDens[B4SOIFB_IBSNOIZ] + noizDens[B4SOIFB_IBDNOIZ] + noizDens[B4SOIIGSNOIZ] + noizDens[B4SOIIGDNOIZ] + noizDens[B4SOIIGBNOIZ] + noizDens[B4SOIRBSBNOIZ] + noizDens[B4SOIRBDBNOIZ] + noizDens[B4SOIRBODYNOIZ]; lnNdens[B4SOITOTNOIZ] = log(MAX(noizDens[B4SOITOTNOIZ], N_MINLOG)); *OnDens += noizDens[B4SOITOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < B4SOINSRCS; i++) { here->B4SOInVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == ((NOISEAN*) ckt->CKTcurJob)->NstartFreq) { for (i = 0; i < B4SOINSRCS; i++) { here->B4SOInVar[OUTNOIZ][i] = 0.0; here->B4SOInVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < B4SOINSRCS; i++) { if (i != B4SOITOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->B4SOInVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->B4SOInVar[LNLSTDENS][i] + data->lnGainInv, data); here->B4SOInVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (((NOISEAN*) ckt->CKTcurJob)->NStpsSm != 0) { here->B4SOInVar[OUTNOIZ][i] += tempOnoise; here->B4SOInVar[OUTNOIZ][B4SOITOTNOIZ] += tempOnoise; here->B4SOInVar[INNOIZ][i] += tempInoise; here->B4SOInVar[INNOIZ][B4SOITOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < B4SOINSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) { for (i = 0; i < B4SOINSRCS; i++) { data->outpVector[data->outNumber++] = here->B4SOInVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->B4SOInVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soimpar.c0000644000265600020320000040132512264261473021752 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soimpar.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. * File: b4soimpar.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 12/16/2010 **********/ #include "ngspice/ngspice.h" #include "b4soidef.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOImParam( int param, IFvalue *value, GENmodel *inMod) { B4SOImodel *mod = (B4SOImodel*)inMod; switch(param) { case B4SOI_MOD_MOBMOD : mod->B4SOImobMod = value->iValue; mod->B4SOImobModGiven = TRUE; break; case B4SOI_MOD_BINUNIT : mod->B4SOIbinUnit = value->iValue; mod->B4SOIbinUnitGiven = TRUE; break; case B4SOI_MOD_PARAMCHK : mod->B4SOIparamChk = value->iValue; mod->B4SOIparamChkGiven = TRUE; break; case B4SOI_MOD_CAPMOD : mod->B4SOIcapMod = value->iValue; mod->B4SOIcapModGiven = TRUE; break; case B4SOI_MOD_SHMOD : mod->B4SOIshMod = value->iValue; mod->B4SOIshModGiven = TRUE; break; /* case B4SOI_MOD_NOIMOD : mod->B4SOInoiMod = value->iValue; mod->B4SOInoiModGiven = TRUE; break; v3.2 */ case B4SOI_MOD_VERSION : mod->B4SOIversion = value->rValue; mod->B4SOIversionGiven = TRUE; break; case B4SOI_MOD_MTRLMOD : mod->B4SOImtrlMod = value->iValue; mod->B4SOImtrlModGiven = TRUE; break; case B4SOI_MOD_VGSTCVMOD : mod->B4SOIvgstcvMod = value->iValue; mod->B4SOIvgstcvModGiven = TRUE; break; case B4SOI_MOD_GIDLMOD : mod->B4SOIgidlMod = value->iValue; mod->B4SOIgidlModGiven = TRUE; break; case B4SOI_MOD_IIIMOD : mod->B4SOIiiiMod = value->iValue; mod->B4SOIiiiModGiven = TRUE; break; case B4SOI_MOD_TOX : mod->B4SOItox = value->rValue; mod->B4SOItoxGiven = TRUE; break; case B4SOI_MOD_TOXP : mod->B4SOItoxp = value->rValue; mod->B4SOItoxpGiven = TRUE; break; case B4SOI_MOD_LEFFEOT : mod->B4SOIleffeot = value->rValue; mod->B4SOIleffeotGiven = TRUE; break; case B4SOI_MOD_WEFFEOT : mod->B4SOIweffeot = value->rValue; mod->B4SOIweffeotGiven = TRUE; break; case B4SOI_MOD_VDDEOT : mod->B4SOIvddeot = value->rValue; mod->B4SOIvddeotGiven = TRUE; break; case B4SOI_MOD_TEMPEOT : mod->B4SOItempeot = value->rValue; mod->B4SOItempeotGiven = TRUE; break; case B4SOI_MOD_ADOS : mod->B4SOIados = value->rValue; mod->B4SOIadosGiven = TRUE; break; case B4SOI_MOD_BDOS : mod->B4SOIbdos = value->rValue; mod->B4SOIbdosGiven = TRUE; break; case B4SOI_MOD_EPSRGATE: mod->B4SOIepsrgate = value->rValue; mod->B4SOIepsrgateGiven = TRUE; break; case B4SOI_MOD_PHIG: mod->B4SOIphig = value->rValue; mod->B4SOIphigGiven = TRUE; break; case B4SOI_MOD_EASUB: mod->B4SOIeasub = value->rValue; mod->B4SOIeasubGiven = TRUE; break; case B4SOI_MOD_TOXM : mod->B4SOItoxm = value->rValue; mod->B4SOItoxmGiven = TRUE; break; /* v3.2 */ /*4.1 */ case B4SOI_MOD_EOT : mod->B4SOIeot = value->rValue; mod->B4SOIeotGiven = TRUE; break; case B4SOI_MOD_EPSROX : mod->B4SOIepsrox = value->rValue; mod->B4SOIepsroxGiven = TRUE; break; case B4SOI_MOD_EPSRSUB: mod->B4SOIepsrsub = value->rValue; mod->B4SOIepsrsubGiven = TRUE; break; case B4SOI_MOD_NI0SUB: mod->B4SOIni0sub = value->rValue; mod->B4SOIni0subGiven = TRUE; break; case B4SOI_MOD_BG0SUB: mod->B4SOIbg0sub = value->rValue; mod->B4SOIbg0subGiven = TRUE; break; case B4SOI_MOD_TBGASUB: mod->B4SOItbgasub = value->rValue; mod->B4SOItbgasubGiven = TRUE; break; case B4SOI_MOD_TBGBSUB: mod->B4SOItbgbsub = value->rValue; mod->B4SOItbgbsubGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_DTOXCV : mod->B4SOIdtoxcv = value->rValue; mod->B4SOIdtoxcvGiven = TRUE; break; case B4SOI_MOD_CDSC : mod->B4SOIcdsc = value->rValue; mod->B4SOIcdscGiven = TRUE; break; case B4SOI_MOD_CDSCB : mod->B4SOIcdscb = value->rValue; mod->B4SOIcdscbGiven = TRUE; break; case B4SOI_MOD_CDSCD : mod->B4SOIcdscd = value->rValue; mod->B4SOIcdscdGiven = TRUE; break; case B4SOI_MOD_CIT : mod->B4SOIcit = value->rValue; mod->B4SOIcitGiven = TRUE; break; case B4SOI_MOD_NFACTOR : mod->B4SOInfactor = value->rValue; mod->B4SOInfactorGiven = TRUE; break; case B4SOI_MOD_VSAT: mod->B4SOIvsat = value->rValue; mod->B4SOIvsatGiven = TRUE; break; case B4SOI_MOD_A0: mod->B4SOIa0 = value->rValue; mod->B4SOIa0Given = TRUE; break; case B4SOI_MOD_AGS: mod->B4SOIags= value->rValue; mod->B4SOIagsGiven = TRUE; break; case B4SOI_MOD_A1: mod->B4SOIa1 = value->rValue; mod->B4SOIa1Given = TRUE; break; case B4SOI_MOD_A2: mod->B4SOIa2 = value->rValue; mod->B4SOIa2Given = TRUE; break; case B4SOI_MOD_AT: mod->B4SOIat = value->rValue; mod->B4SOIatGiven = TRUE; break; case B4SOI_MOD_KETA: mod->B4SOIketa = value->rValue; mod->B4SOIketaGiven = TRUE; break; case B4SOI_MOD_NSUB: mod->B4SOInsub = value->rValue; mod->B4SOInsubGiven = TRUE; break; case B4SOI_MOD_NPEAK: mod->B4SOInpeak = value->rValue; mod->B4SOInpeakGiven = TRUE; /* Bug # 22 Jul09 Proper limiting conditions are specified in the B4SOIcheck.c file*/ /* if (mod->B4SOInpeak > 1.0e20) mod->B4SOInpeak *= 1.0e-6; */ break; case B4SOI_MOD_NSD: mod->B4SOInsd = value->rValue; mod->B4SOInsdGiven = TRUE; /* if (mod->B4SOInsd > 1.0e23) mod->B4SOInsd *= 1.0e-6; */ /* Bug # 22 Jul09 Proper limiting conditions are specified in the B4SOIcheck.c file*/ break; case B4SOI_MOD_NGATE: mod->B4SOIngate = value->rValue; mod->B4SOIngateGiven = TRUE; /* if (mod->B4SOIngate > 1.0e23) mod->B4SOIngate *= 1.0e-6; */ /* Bug # 22 Jul09 Proper limiting conditions are specified in the B4SOIcheck.c file*/ break; case B4SOI_MOD_GAMMA1: mod->B4SOIgamma1 = value->rValue; mod->B4SOIgamma1Given = TRUE; break; case B4SOI_MOD_GAMMA2: mod->B4SOIgamma2 = value->rValue; mod->B4SOIgamma2Given = TRUE; break; case B4SOI_MOD_VBX: mod->B4SOIvbx = value->rValue; mod->B4SOIvbxGiven = TRUE; break; case B4SOI_MOD_VBM: mod->B4SOIvbm = value->rValue; mod->B4SOIvbmGiven = TRUE; break; case B4SOI_MOD_XT: mod->B4SOIxt = value->rValue; mod->B4SOIxtGiven = TRUE; break; case B4SOI_MOD_K1: mod->B4SOIk1 = value->rValue; mod->B4SOIk1Given = TRUE; break; case B4SOI_MOD_KT1: mod->B4SOIkt1 = value->rValue; mod->B4SOIkt1Given = TRUE; break; case B4SOI_MOD_KT1L: mod->B4SOIkt1l = value->rValue; mod->B4SOIkt1lGiven = TRUE; break; case B4SOI_MOD_KT2: mod->B4SOIkt2 = value->rValue; mod->B4SOIkt2Given = TRUE; break; case B4SOI_MOD_K2: mod->B4SOIk2 = value->rValue; mod->B4SOIk2Given = TRUE; break; case B4SOI_MOD_K3: mod->B4SOIk3 = value->rValue; mod->B4SOIk3Given = TRUE; break; case B4SOI_MOD_K3B: mod->B4SOIk3b = value->rValue; mod->B4SOIk3bGiven = TRUE; break; case B4SOI_MOD_LPE0: mod->B4SOIlpe0 = value->rValue; mod->B4SOIlpe0Given = TRUE; break; case B4SOI_MOD_LPEB: /* v4.0 for Vth */ mod->B4SOIlpeb = value->rValue; mod->B4SOIlpebGiven = TRUE; break; case B4SOI_MOD_W0: mod->B4SOIw0 = value->rValue; mod->B4SOIw0Given = TRUE; break; case B4SOI_MOD_DVT0: mod->B4SOIdvt0 = value->rValue; mod->B4SOIdvt0Given = TRUE; break; case B4SOI_MOD_DVT1: mod->B4SOIdvt1 = value->rValue; mod->B4SOIdvt1Given = TRUE; break; case B4SOI_MOD_DVT2: mod->B4SOIdvt2 = value->rValue; mod->B4SOIdvt2Given = TRUE; break; case B4SOI_MOD_DVT0W: mod->B4SOIdvt0w = value->rValue; mod->B4SOIdvt0wGiven = TRUE; break; case B4SOI_MOD_DVT1W: mod->B4SOIdvt1w = value->rValue; mod->B4SOIdvt1wGiven = TRUE; break; case B4SOI_MOD_DVT2W: mod->B4SOIdvt2w = value->rValue; mod->B4SOIdvt2wGiven = TRUE; break; case B4SOI_MOD_DROUT: mod->B4SOIdrout = value->rValue; mod->B4SOIdroutGiven = TRUE; break; case B4SOI_MOD_DSUB: mod->B4SOIdsub = value->rValue; mod->B4SOIdsubGiven = TRUE; break; case B4SOI_MOD_VTH0: mod->B4SOIvth0 = value->rValue; mod->B4SOIvth0Given = TRUE; break; case B4SOI_MOD_VFB: mod->B4SOIvfb = value->rValue; mod->B4SOIvfbGiven = TRUE; break; /* v4.1 */ case B4SOI_MOD_UA: mod->B4SOIua = value->rValue; mod->B4SOIuaGiven = TRUE; break; case B4SOI_MOD_UA1: mod->B4SOIua1 = value->rValue; mod->B4SOIua1Given = TRUE; break; case B4SOI_MOD_UB: mod->B4SOIub = value->rValue; mod->B4SOIubGiven = TRUE; break; case B4SOI_MOD_UB1: mod->B4SOIub1 = value->rValue; mod->B4SOIub1Given = TRUE; break; case B4SOI_MOD_UC: mod->B4SOIuc = value->rValue; mod->B4SOIucGiven = TRUE; break; case B4SOI_MOD_UC1: mod->B4SOIuc1 = value->rValue; mod->B4SOIuc1Given = TRUE; break; case B4SOI_MOD_U0 : mod->B4SOIu0 = value->rValue; mod->B4SOIu0Given = TRUE; break; case B4SOI_MOD_UTE : mod->B4SOIute = value->rValue; mod->B4SOIuteGiven = TRUE; break; /*4.1 mobmod=4*/ case B4SOI_MOD_UD: mod->B4SOIud = value->rValue; mod->B4SOIudGiven = TRUE; break; case B4SOI_MOD_LUD: mod->B4SOIlud = value->rValue; mod->B4SOIludGiven = TRUE; break; case B4SOI_MOD_WUD: mod->B4SOIwud = value->rValue; mod->B4SOIwudGiven = TRUE; break; case B4SOI_MOD_PUD: mod->B4SOIpud = value->rValue; mod->B4SOIpudGiven = TRUE; break; case B4SOI_MOD_UD1: mod->B4SOIud1 = value->rValue; mod->B4SOIud1Given = TRUE; break; case B4SOI_MOD_LUD1: mod->B4SOIlud1 = value->rValue; mod->B4SOIlud1Given = TRUE; break; case B4SOI_MOD_WUD1: mod->B4SOIwud1 = value->rValue; mod->B4SOIwud1Given = TRUE; break; case B4SOI_MOD_PUD1: mod->B4SOIpud1 = value->rValue; mod->B4SOIpud1Given = TRUE; break; case B4SOI_MOD_EU: mod->B4SOIeu = value->rValue; mod->B4SOIeuGiven = TRUE; break; case B4SOI_MOD_LEU: mod->B4SOIleu = value->rValue; mod->B4SOIleuGiven = TRUE; break; case B4SOI_MOD_WEU: mod->B4SOIweu = value->rValue; mod->B4SOIweuGiven = TRUE; break; case B4SOI_MOD_PEU: mod->B4SOIpeu = value->rValue; mod->B4SOIpeuGiven = TRUE; break; case B4SOI_MOD_UCS: mod->B4SOIucs = value->rValue; mod->B4SOIucsGiven = TRUE; break; case B4SOI_MOD_LUCS: mod->B4SOIlucs = value->rValue; mod->B4SOIlucsGiven = TRUE; break; case B4SOI_MOD_WUCS: mod->B4SOIwucs = value->rValue; mod->B4SOIwucsGiven = TRUE; break; case B4SOI_MOD_PUCS: mod->B4SOIpucs = value->rValue; mod->B4SOIpucsGiven = TRUE; break; /* Bug fix # 31 Jul09 */ case B4SOI_MOD_UCSTE: mod->B4SOIucste = value->rValue; mod->B4SOIucsteGiven = TRUE; break; case B4SOI_MOD_LUCSTE: mod->B4SOIlucste = value->rValue; mod->B4SOIlucsteGiven = TRUE; break; case B4SOI_MOD_WUCSTE: mod->B4SOIwucste = value->rValue; mod->B4SOIwucsteGiven = TRUE; break; case B4SOI_MOD_PUCSTE: mod->B4SOIpucste = value->rValue; mod->B4SOIpucsteGiven = TRUE; break; case B4SOI_MOD_VOFF: mod->B4SOIvoff = value->rValue; mod->B4SOIvoffGiven = TRUE; break; case B4SOI_MOD_DELTA : mod->B4SOIdelta = value->rValue; mod->B4SOIdeltaGiven = TRUE; break; case B4SOI_MOD_RDSW: mod->B4SOIrdsw = value->rValue; mod->B4SOIrdswGiven = TRUE; break; case B4SOI_MOD_RSW: mod->B4SOIrsw = value->rValue; mod->B4SOIrswGiven = TRUE; break; case B4SOI_MOD_RDW: mod->B4SOIrdw = value->rValue; mod->B4SOIrdwGiven = TRUE; break; case B4SOI_MOD_RSWMIN: mod->B4SOIrswmin = value->rValue; mod->B4SOIrswminGiven = TRUE; break; case B4SOI_MOD_RDWMIN: mod->B4SOIrdwmin = value->rValue; mod->B4SOIrdwminGiven = TRUE; break; case B4SOI_MOD_PRWG: mod->B4SOIprwg = value->rValue; mod->B4SOIprwgGiven = TRUE; break; case B4SOI_MOD_PRWB: mod->B4SOIprwb = value->rValue; mod->B4SOIprwbGiven = TRUE; break; case B4SOI_MOD_PRT: mod->B4SOIprt = value->rValue; mod->B4SOIprtGiven = TRUE; break; case B4SOI_MOD_ETA0: mod->B4SOIeta0 = value->rValue; mod->B4SOIeta0Given = TRUE; break; case B4SOI_MOD_ETAB: mod->B4SOIetab = value->rValue; mod->B4SOIetabGiven = TRUE; break; case B4SOI_MOD_PCLM: mod->B4SOIpclm = value->rValue; mod->B4SOIpclmGiven = TRUE; break; case B4SOI_MOD_PDIBL1: mod->B4SOIpdibl1 = value->rValue; mod->B4SOIpdibl1Given = TRUE; break; case B4SOI_MOD_PDIBL2: mod->B4SOIpdibl2 = value->rValue; mod->B4SOIpdibl2Given = TRUE; break; case B4SOI_MOD_PDIBLB: mod->B4SOIpdiblb = value->rValue; mod->B4SOIpdiblbGiven = TRUE; break; case B4SOI_MOD_PVAG: mod->B4SOIpvag = value->rValue; mod->B4SOIpvagGiven = TRUE; break; case B4SOI_MOD_WR : mod->B4SOIwr = value->rValue; mod->B4SOIwrGiven = TRUE; break; case B4SOI_MOD_DWG : mod->B4SOIdwg = value->rValue; mod->B4SOIdwgGiven = TRUE; break; case B4SOI_MOD_DWB : mod->B4SOIdwb = value->rValue; mod->B4SOIdwbGiven = TRUE; break; case B4SOI_MOD_B0 : mod->B4SOIb0 = value->rValue; mod->B4SOIb0Given = TRUE; break; case B4SOI_MOD_B1 : mod->B4SOIb1 = value->rValue; mod->B4SOIb1Given = TRUE; break; case B4SOI_MOD_ALPHA0 : mod->B4SOIalpha0 = value->rValue; mod->B4SOIalpha0Given = TRUE; break; case B4SOI_MOD_CGSL : mod->B4SOIcgsl = value->rValue; mod->B4SOIcgslGiven = TRUE; break; case B4SOI_MOD_CGDL : mod->B4SOIcgdl = value->rValue; mod->B4SOIcgdlGiven = TRUE; break; case B4SOI_MOD_CKAPPA : mod->B4SOIckappa = value->rValue; mod->B4SOIckappaGiven = TRUE; break; case B4SOI_MOD_CF : mod->B4SOIcf = value->rValue; mod->B4SOIcfGiven = TRUE; break; case B4SOI_MOD_CLC : mod->B4SOIclc = value->rValue; mod->B4SOIclcGiven = TRUE; break; case B4SOI_MOD_CLE : mod->B4SOIcle = value->rValue; mod->B4SOIcleGiven = TRUE; break; case B4SOI_MOD_DWC : mod->B4SOIdwc = value->rValue; mod->B4SOIdwcGiven = TRUE; break; case B4SOI_MOD_DLC : mod->B4SOIdlc = value->rValue; mod->B4SOIdlcGiven = TRUE; break; case B4SOI_MOD_TBOX : mod->B4SOItbox = value->rValue; mod->B4SOItboxGiven = TRUE; break; case B4SOI_MOD_TSI : mod->B4SOItsi = value->rValue; mod->B4SOItsiGiven = TRUE; break; case B4SOI_MOD_ETSI : mod->B4SOIetsi = value->rValue; mod->B4SOIetsiGiven = TRUE; break; case B4SOI_MOD_XJ : mod->B4SOIxj = value->rValue; mod->B4SOIxjGiven = TRUE; break; case B4SOI_MOD_RBODY : mod->B4SOIrbody = value->rValue; mod->B4SOIrbodyGiven = TRUE; break; case B4SOI_MOD_RBSH : mod->B4SOIrbsh = value->rValue; mod->B4SOIrbshGiven = TRUE; break; case B4SOI_MOD_RTH0 : mod->B4SOIrth0 = value->rValue; mod->B4SOIrth0Given = TRUE; break; case B4SOI_MOD_CTH0 : mod->B4SOIcth0 = value->rValue; mod->B4SOIcth0Given = TRUE; break; case B4SOI_MOD_CFRCOEFF : /* v4.4 */ mod->B4SOIcfrcoeff = value->rValue; mod->B4SOIcfrcoeffGiven = TRUE; break; case B4SOI_MOD_EGIDL : mod->B4SOIegidl = value->rValue; mod->B4SOIegidlGiven = TRUE; break; case B4SOI_MOD_AGIDL : mod->B4SOIagidl = value->rValue; mod->B4SOIagidlGiven = TRUE; break; case B4SOI_MOD_BGIDL : mod->B4SOIbgidl = value->rValue; mod->B4SOIbgidlGiven = TRUE; break; case B4SOI_MOD_CGIDL : mod->B4SOIcgidl = value->rValue; mod->B4SOIcgidlGiven = TRUE; break; case B4SOI_MOD_RGIDL : mod->B4SOIrgidl = value->rValue; mod->B4SOIrgidlGiven = TRUE; break; case B4SOI_MOD_KGIDL : mod->B4SOIkgidl = value->rValue; mod->B4SOIkgidlGiven = TRUE; break; case B4SOI_MOD_FGIDL : mod->B4SOIfgidl = value->rValue; mod->B4SOIfgidlGiven = TRUE; break; case B4SOI_MOD_EGISL : mod->B4SOIegisl = value->rValue; mod->B4SOIegislGiven = TRUE; break; case B4SOI_MOD_AGISL : mod->B4SOIagisl = value->rValue; mod->B4SOIagislGiven = TRUE; break; case B4SOI_MOD_BGISL : mod->B4SOIbgisl = value->rValue; mod->B4SOIbgislGiven = TRUE; break; case B4SOI_MOD_CGISL : mod->B4SOIcgisl = value->rValue; mod->B4SOIcgislGiven = TRUE; break; case B4SOI_MOD_RGISL : mod->B4SOIrgisl = value->rValue; mod->B4SOIrgislGiven = TRUE; break; case B4SOI_MOD_KGISL : mod->B4SOIkgisl = value->rValue; mod->B4SOIkgislGiven = TRUE; break; case B4SOI_MOD_FGISL : mod->B4SOIfgisl = value->rValue; mod->B4SOIfgislGiven = TRUE; break; case B4SOI_MOD_FDMOD : /* mod->B4SOIfdMod = value->rValue; v4.2 */ mod->B4SOIfdMod = value->iValue; mod->B4SOIfdModGiven = TRUE; break; case B4SOI_MOD_VSCE : mod->B4SOIvsce = value->rValue; mod->B4SOIvsceGiven = TRUE; break; case B4SOI_MOD_CDSBS : mod->B4SOIcdsbs = value->rValue; mod->B4SOIcdsbsGiven = TRUE; break; case B4SOI_MOD_MINVCV: mod->B4SOIminvcv = value->rValue; mod->B4SOIminvcvGiven = TRUE; break; case B4SOI_MOD_LMINVCV: mod->B4SOIlminvcv = value->rValue; mod->B4SOIlminvcvGiven = TRUE; break; case B4SOI_MOD_WMINVCV: mod->B4SOIwminvcv = value->rValue; mod->B4SOIwminvcvGiven = TRUE; break; case B4SOI_MOD_PMINVCV: mod->B4SOIpminvcv = value->rValue; mod->B4SOIpminvcvGiven = TRUE; break; case B4SOI_MOD_VOFFCV: mod->B4SOIvoffcv = value->rValue; mod->B4SOIvoffcvGiven = TRUE; break; case B4SOI_MOD_LVOFFCV: mod->B4SOIlvoffcv = value->rValue; mod->B4SOIlvoffcvGiven = TRUE; break; case B4SOI_MOD_WVOFFCV: mod->B4SOIwvoffcv = value->rValue; mod->B4SOIwvoffcvGiven = TRUE; break; case B4SOI_MOD_PVOFFCV: mod->B4SOIpvoffcv = value->rValue; mod->B4SOIpvoffcvGiven = TRUE; break; case B4SOI_MOD_NDIODES : /* v4.0 */ mod->B4SOIndiode = value->rValue; mod->B4SOIndiodeGiven = TRUE; break; case B4SOI_MOD_NDIODED : /* v4.0 */ mod->B4SOIndioded = value->rValue; mod->B4SOIndiodedGiven = TRUE; break; case B4SOI_MOD_XBJT : mod->B4SOIxbjt = value->rValue; mod->B4SOIxbjtGiven = TRUE; break; case B4SOI_MOD_XDIFS : mod->B4SOIxdif = value->rValue; mod->B4SOIxdifGiven = TRUE; break; case B4SOI_MOD_XRECS : mod->B4SOIxrec = value->rValue; mod->B4SOIxrecGiven = TRUE; break; case B4SOI_MOD_XTUNS : mod->B4SOIxtun = value->rValue; mod->B4SOIxtunGiven = TRUE; break; case B4SOI_MOD_XDIFD : mod->B4SOIxdifd = value->rValue; mod->B4SOIxdifdGiven = TRUE; break; case B4SOI_MOD_XRECD : mod->B4SOIxrecd = value->rValue; mod->B4SOIxrecdGiven = TRUE; break; case B4SOI_MOD_XTUND : mod->B4SOIxtund = value->rValue; mod->B4SOIxtundGiven = TRUE; break; case B4SOI_MOD_TT : mod->B4SOItt = value->rValue; mod->B4SOIttGiven = TRUE; break; case B4SOI_MOD_VSDTH : mod->B4SOIvsdth = value->rValue; mod->B4SOIvsdthGiven = TRUE; break; case B4SOI_MOD_VSDFB : mod->B4SOIvsdfb = value->rValue; mod->B4SOIvsdfbGiven = TRUE; break; case B4SOI_MOD_CSDMIN : mod->B4SOIcsdmin = value->rValue; mod->B4SOIcsdminGiven = TRUE; break; case B4SOI_MOD_ASD : mod->B4SOIasd = value->rValue; mod->B4SOIasdGiven = TRUE; break; case B4SOI_MOD_TNOM : mod->B4SOItnom = value->rValue + 273.15; mod->B4SOItnomGiven = TRUE; break; case B4SOI_MOD_CGSO : mod->B4SOIcgso = value->rValue; mod->B4SOIcgsoGiven = TRUE; break; case B4SOI_MOD_CGDO : mod->B4SOIcgdo = value->rValue; mod->B4SOIcgdoGiven = TRUE; break; case B4SOI_MOD_CGEO : mod->B4SOIcgeo = value->rValue; mod->B4SOIcgeoGiven = TRUE; break; case B4SOI_MOD_XPART : mod->B4SOIxpart = value->rValue; mod->B4SOIxpartGiven = TRUE; break; case B4SOI_MOD_RSH : mod->B4SOIsheetResistance = value->rValue; mod->B4SOIsheetResistanceGiven = TRUE; break; case B4SOI_MOD_PBSWGS : /* v4.0 */ mod->B4SOIGatesidewallJctSPotential = value->rValue; mod->B4SOIGatesidewallJctSPotentialGiven = TRUE; break; case B4SOI_MOD_PBSWGD : /* v4.0 */ mod->B4SOIGatesidewallJctDPotential = value->rValue; mod->B4SOIGatesidewallJctDPotentialGiven = TRUE; break; case B4SOI_MOD_MJSWGS : /* v4.0 */ mod->B4SOIbodyJctGateSideSGradingCoeff = value->rValue; mod->B4SOIbodyJctGateSideSGradingCoeffGiven = TRUE; break; case B4SOI_MOD_MJSWGD : /* v4.0 */ mod->B4SOIbodyJctGateSideDGradingCoeff = value->rValue; mod->B4SOIbodyJctGateSideDGradingCoeffGiven = TRUE; break; case B4SOI_MOD_CJSWGS : /* v4.0 */ mod->B4SOIunitLengthGateSidewallJctCapS = value->rValue; mod->B4SOIunitLengthGateSidewallJctCapSGiven = TRUE; break; case B4SOI_MOD_CJSWGD : /* v4.0 */ mod->B4SOIunitLengthGateSidewallJctCapD = value->rValue; mod->B4SOIunitLengthGateSidewallJctCapDGiven = TRUE; break; case B4SOI_MOD_CSDESW : mod->B4SOIcsdesw = value->rValue; mod->B4SOIcsdeswGiven = TRUE; break; case B4SOI_MOD_LINT : mod->B4SOILint = value->rValue; mod->B4SOILintGiven = TRUE; break; case B4SOI_MOD_LL : mod->B4SOILl = value->rValue; mod->B4SOILlGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_LLC : mod->B4SOILlc = value->rValue; mod->B4SOILlcGiven = TRUE; break; case B4SOI_MOD_LLN : mod->B4SOILln = value->rValue; mod->B4SOILlnGiven = TRUE; break; case B4SOI_MOD_LW : mod->B4SOILw = value->rValue; mod->B4SOILwGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_LWC : mod->B4SOILwc = value->rValue; mod->B4SOILwcGiven = TRUE; break; case B4SOI_MOD_LWN : mod->B4SOILwn = value->rValue; mod->B4SOILwnGiven = TRUE; break; case B4SOI_MOD_LWL : mod->B4SOILwl = value->rValue; mod->B4SOILwlGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_LWLC : mod->B4SOILwlc = value->rValue; mod->B4SOILwlcGiven = TRUE; break; case B4SOI_MOD_WINT : mod->B4SOIWint = value->rValue; mod->B4SOIWintGiven = TRUE; break; case B4SOI_MOD_WL : mod->B4SOIWl = value->rValue; mod->B4SOIWlGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_WLC : mod->B4SOIWlc = value->rValue; mod->B4SOIWlcGiven = TRUE; break; case B4SOI_MOD_WLN : mod->B4SOIWln = value->rValue; mod->B4SOIWlnGiven = TRUE; break; case B4SOI_MOD_WW : mod->B4SOIWw = value->rValue; mod->B4SOIWwGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_WWC : mod->B4SOIWwc = value->rValue; mod->B4SOIWwcGiven = TRUE; break; case B4SOI_MOD_WWN : mod->B4SOIWwn = value->rValue; mod->B4SOIWwnGiven = TRUE; break; case B4SOI_MOD_WWL : mod->B4SOIWwl = value->rValue; mod->B4SOIWwlGiven = TRUE; break; /* v2.2.3 */ case B4SOI_MOD_WWLC : mod->B4SOIWwlc = value->rValue; mod->B4SOIWwlcGiven = TRUE; break; case B4SOI_MOD_NOIA : mod->B4SOIoxideTrapDensityA = value->rValue; mod->B4SOIoxideTrapDensityAGiven = TRUE; break; case B4SOI_MOD_NOIB : mod->B4SOIoxideTrapDensityB = value->rValue; mod->B4SOIoxideTrapDensityBGiven = TRUE; break; case B4SOI_MOD_NOIC : mod->B4SOIoxideTrapDensityC = value->rValue; mod->B4SOIoxideTrapDensityCGiven = TRUE; break; case B4SOI_MOD_NOIF : mod->B4SOInoif = value->rValue; mod->B4SOInoifGiven = TRUE; break; case B4SOI_MOD_EM : mod->B4SOIem = value->rValue; mod->B4SOIemGiven = TRUE; break; case B4SOI_MOD_EF : mod->B4SOIef = value->rValue; mod->B4SOIefGiven = TRUE; break; case B4SOI_MOD_AF : mod->B4SOIaf = value->rValue; mod->B4SOIafGiven = TRUE; break; case B4SOI_MOD_KF : mod->B4SOIkf = value->rValue; mod->B4SOIkfGiven = TRUE; break; case B4SOI_MOD_BF : mod->B4SOIbf = value->rValue; mod->B4SOIbfGiven = TRUE; break; case B4SOI_MOD_W0FLK : mod->B4SOIw0flk = value->rValue; mod->B4SOIw0flkGiven = TRUE; break; /* v3.0 */ case B4SOI_MOD_SOIMOD: mod->B4SOIsoiMod = value->iValue; mod->B4SOIsoiModGiven = TRUE; break; /* v3.2 bug fix */ case B4SOI_MOD_VBS0PD: mod->B4SOIvbs0pd = value->rValue; mod->B4SOIvbs0pdGiven = TRUE; break; /* v3.2 */ case B4SOI_MOD_VBS0FD: mod->B4SOIvbs0fd = value->rValue; mod->B4SOIvbs0fdGiven = TRUE; break; /* v3.2 */ case B4SOI_MOD_VBSA: mod->B4SOIvbsa = value->rValue; mod->B4SOIvbsaGiven = TRUE; break; case B4SOI_MOD_NOFFFD : mod->B4SOInofffd = value->rValue; mod->B4SOInofffdGiven = TRUE; break; case B4SOI_MOD_VOFFFD: mod->B4SOIvofffd = value->rValue; mod->B4SOIvofffdGiven = TRUE; break; case B4SOI_MOD_K1B: mod->B4SOIk1b = value->rValue; mod->B4SOIk1bGiven = TRUE; break; case B4SOI_MOD_K2B: mod->B4SOIk2b = value->rValue; mod->B4SOIk2bGiven = TRUE; break; case B4SOI_MOD_DK2B: mod->B4SOIdk2b = value->rValue; mod->B4SOIdk2bGiven = TRUE; break; case B4SOI_MOD_DVBD0: mod->B4SOIdvbd0 = value->rValue; mod->B4SOIdvbd0Given = TRUE; break; case B4SOI_MOD_DVBD1: mod->B4SOIdvbd1 = value->rValue; mod->B4SOIdvbd1Given = TRUE; break; case B4SOI_MOD_MOINFD: mod->B4SOImoinFD = value->rValue; mod->B4SOImoinFDGiven = TRUE; break; /* v2.2 release */ case B4SOI_MOD_WTH0 : mod->B4SOIwth0 = value->rValue; mod->B4SOIwth0Given = TRUE; break; case B4SOI_MOD_RHALO : mod->B4SOIrhalo = value->rValue; mod->B4SOIrhaloGiven = TRUE; break; case B4SOI_MOD_NTOX : mod->B4SOIntox = value->rValue; mod->B4SOIntoxGiven = TRUE; break; case B4SOI_MOD_TOXREF : mod->B4SOItoxref = value->rValue; mod->B4SOItoxrefGiven = TRUE; break; case B4SOI_MOD_EBG : mod->B4SOIebg = value->rValue; mod->B4SOIebgGiven = TRUE; break; case B4SOI_MOD_VEVB : mod->B4SOIvevb = value->rValue; mod->B4SOIvevbGiven = TRUE; break; case B4SOI_MOD_ALPHAGB1 : mod->B4SOIalphaGB1 = value->rValue; mod->B4SOIalphaGB1Given = TRUE; break; case B4SOI_MOD_BETAGB1 : mod->B4SOIbetaGB1 = value->rValue; mod->B4SOIbetaGB1Given = TRUE; break; case B4SOI_MOD_VGB1 : mod->B4SOIvgb1 = value->rValue; mod->B4SOIvgb1Given = TRUE; break; case B4SOI_MOD_VECB : mod->B4SOIvecb = value->rValue; mod->B4SOIvecbGiven = TRUE; break; case B4SOI_MOD_ALPHAGB2 : mod->B4SOIalphaGB2 = value->rValue; mod->B4SOIalphaGB2Given = TRUE; break; case B4SOI_MOD_BETAGB2 : mod->B4SOIbetaGB2 = value->rValue; mod->B4SOIbetaGB2Given = TRUE; break; case B4SOI_MOD_VGB2 : mod->B4SOIvgb2 = value->rValue; mod->B4SOIvgb2Given = TRUE; break; case B4SOI_MOD_AIGBCP2 : mod->B4SOIaigbcp2 = value->rValue; mod->B4SOIaigbcp2Given = TRUE; break; case B4SOI_MOD_BIGBCP2 : mod->B4SOIbigbcp2 = value->rValue; mod->B4SOIbigbcp2Given = TRUE; break; case B4SOI_MOD_CIGBCP2 : mod->B4SOIcigbcp2 = value->rValue; mod->B4SOIcigbcp2Given = TRUE; break; case B4SOI_MOD_TOXQM : mod->B4SOItoxqm = value->rValue; mod->B4SOItoxqmGiven = TRUE; break; case B4SOI_MOD_VOXH : mod->B4SOIvoxh = value->rValue; mod->B4SOIvoxhGiven = TRUE; break; case B4SOI_MOD_DELTAVOX : mod->B4SOIdeltavox = value->rValue; mod->B4SOIdeltavoxGiven = TRUE; break; /* v3.0 */ case B4SOI_MOD_IGBMOD : mod->B4SOIigbMod = value->iValue; mod->B4SOIigbModGiven = TRUE; break; case B4SOI_MOD_IGCMOD : mod->B4SOIigcMod = value->iValue; mod->B4SOIigcModGiven = TRUE; break; case B4SOI_MOD_AIGC : mod->B4SOIaigc = value->rValue; mod->B4SOIaigcGiven = TRUE; break; case B4SOI_MOD_BIGC : mod->B4SOIbigc = value->rValue; mod->B4SOIbigcGiven = TRUE; break; case B4SOI_MOD_CIGC : mod->B4SOIcigc = value->rValue; mod->B4SOIcigcGiven = TRUE; break; case B4SOI_MOD_AIGSD : mod->B4SOIaigsd = value->rValue; mod->B4SOIaigsdGiven = TRUE; break; case B4SOI_MOD_BIGSD : mod->B4SOIbigsd = value->rValue; mod->B4SOIbigsdGiven = TRUE; break; case B4SOI_MOD_CIGSD : mod->B4SOIcigsd = value->rValue; mod->B4SOIcigsdGiven = TRUE; break; case B4SOI_MOD_NIGC : mod->B4SOInigc = value->rValue; mod->B4SOInigcGiven = TRUE; break; case B4SOI_MOD_PIGCD : mod->B4SOIpigcd = value->rValue; mod->B4SOIpigcdGiven = TRUE; break; case B4SOI_MOD_POXEDGE : mod->B4SOIpoxedge = value->rValue; mod->B4SOIpoxedgeGiven = TRUE; break; case B4SOI_MOD_DLCIG : mod->B4SOIdlcig = value->rValue; mod->B4SOIdlcigGiven = TRUE; break; /* v3.1 added for RF */ case B4SOI_MOD_RGATEMOD : mod->B4SOIrgateMod = value->iValue; mod->B4SOIrgateModGiven = TRUE; break; case B4SOI_MOD_XRCRG1 : mod->B4SOIxrcrg1 = value->rValue; mod->B4SOIxrcrg1Given = TRUE; break; case B4SOI_MOD_XRCRG2 : mod->B4SOIxrcrg2 = value->rValue; mod->B4SOIxrcrg2Given = TRUE; break; case B4SOI_MOD_RSHG : mod->B4SOIrshg = value->rValue; mod->B4SOIrshgGiven = TRUE; break; case B4SOI_MOD_NGCON : mod->B4SOIngcon = value->rValue; mod->B4SOIngconGiven = TRUE; break; case B4SOI_MOD_XGW : mod->B4SOIxgw = value->rValue; mod->B4SOIxgwGiven = TRUE; break; case B4SOI_MOD_XGL : mod->B4SOIxgl = value->rValue; mod->B4SOIxglGiven = TRUE; break; /* v3.1 added RF end */ /* v4.0 */ case B4SOI_MOD_RDSMOD : mod->B4SOIrdsMod = value->iValue; mod->B4SOIrdsModGiven = TRUE; break; case B4SOI_MOD_GBMIN : mod->B4SOIgbmin = value->rValue; mod->B4SOIgbminGiven = TRUE; break; case B4SOI_MOD_RBODYMOD : mod->B4SOIrbodyMod = value->iValue; mod->B4SOIrbodyModGiven = TRUE; break; case B4SOI_MOD_RBDB : mod->B4SOIrbdb = value->rValue; mod->B4SOIrbdbGiven = TRUE; break; /* Bug fix # 31 Jul 09 */ case B4SOI_MOD_RBSB : mod->B4SOIrbsb = value->rValue; mod->B4SOIrbsbGiven = TRUE; break; case B4SOI_MOD_FRBODY : mod->B4SOIfrbody = value->rValue; mod->B4SOIfrbodyGiven = TRUE; break; case B4SOI_MOD_DVTP0: mod->B4SOIdvtp0 = value->rValue; mod->B4SOIdvtp0Given = TRUE; break; case B4SOI_MOD_DVTP1: mod->B4SOIdvtp1 = value->rValue; mod->B4SOIdvtp1Given = TRUE; break; case B4SOI_MOD_DVTP2: mod->B4SOIdvtp2 = value->rValue; mod->B4SOIdvtp2Given = TRUE; break; case B4SOI_MOD_DVTP3: mod->B4SOIdvtp3 = value->rValue; mod->B4SOIdvtp3Given = TRUE; break; case B4SOI_MOD_DVTP4: mod->B4SOIdvtp4 = value->rValue; mod->B4SOIdvtp4Given = TRUE; break; case B4SOI_MOD_LDVTP0: mod->B4SOIldvtp0 = value->rValue; mod->B4SOIldvtp0Given = TRUE; break; case B4SOI_MOD_LDVTP1: mod->B4SOIldvtp1 = value->rValue; mod->B4SOIldvtp1Given = TRUE; break; case B4SOI_MOD_LDVTP2: mod->B4SOIldvtp2 = value->rValue; mod->B4SOIldvtp2Given = TRUE; break; case B4SOI_MOD_LDVTP3: mod->B4SOIldvtp3 = value->rValue; mod->B4SOIldvtp3Given = TRUE; break; case B4SOI_MOD_LDVTP4: mod->B4SOIldvtp4 = value->rValue; mod->B4SOIldvtp4Given = TRUE; break; case B4SOI_MOD_WDVTP0: mod->B4SOIwdvtp0 = value->rValue; mod->B4SOIwdvtp0Given = TRUE; break; case B4SOI_MOD_WDVTP1: mod->B4SOIwdvtp1 = value->rValue; mod->B4SOIwdvtp1Given = TRUE; break; case B4SOI_MOD_WDVTP2: mod->B4SOIwdvtp2 = value->rValue; mod->B4SOIwdvtp2Given = TRUE; break; case B4SOI_MOD_WDVTP3: mod->B4SOIwdvtp3 = value->rValue; mod->B4SOIwdvtp3Given = TRUE; break; case B4SOI_MOD_WDVTP4: mod->B4SOIwdvtp4 = value->rValue; mod->B4SOIwdvtp4Given = TRUE; break; case B4SOI_MOD_PDVTP0: mod->B4SOIpdvtp0 = value->rValue; mod->B4SOIpdvtp0Given = TRUE; break; case B4SOI_MOD_PDVTP1: mod->B4SOIpdvtp1 = value->rValue; mod->B4SOIpdvtp1Given = TRUE; break; case B4SOI_MOD_PDVTP2: mod->B4SOIpdvtp2 = value->rValue; mod->B4SOIpdvtp2Given = TRUE; break; case B4SOI_MOD_PDVTP3: mod->B4SOIpdvtp3 = value->rValue; mod->B4SOIpdvtp3Given = TRUE; break; case B4SOI_MOD_PDVTP4: mod->B4SOIpdvtp4 = value->rValue; mod->B4SOIpdvtp4Given = TRUE; break; case B4SOI_MOD_MINV: mod->B4SOIminv = value->rValue; mod->B4SOIminvGiven = TRUE; break; case B4SOI_MOD_LMINV: mod->B4SOIlminv = value->rValue; mod->B4SOIlminvGiven = TRUE; break; case B4SOI_MOD_WMINV: mod->B4SOIwminv = value->rValue; mod->B4SOIwminvGiven = TRUE; break; case B4SOI_MOD_PMINV: mod->B4SOIpminv = value->rValue; mod->B4SOIpminvGiven = TRUE; break; case B4SOI_MOD_FPROUT: mod->B4SOIfprout = value->rValue; mod->B4SOIfproutGiven = TRUE; break; case B4SOI_MOD_PDITS: mod->B4SOIpdits = value->rValue; mod->B4SOIpditsGiven = TRUE; break; case B4SOI_MOD_PDITSD: mod->B4SOIpditsd = value->rValue; mod->B4SOIpditsdGiven = TRUE; break; case B4SOI_MOD_PDITSL: mod->B4SOIpditsl = value->rValue; mod->B4SOIpditslGiven = TRUE; break; case B4SOI_MOD_LFPROUT: mod->B4SOIlfprout = value->rValue; mod->B4SOIlfproutGiven = TRUE; break; case B4SOI_MOD_LPDITS: mod->B4SOIlpdits = value->rValue; mod->B4SOIlpditsGiven = TRUE; break; case B4SOI_MOD_LPDITSD: mod->B4SOIlpditsd = value->rValue; mod->B4SOIlpditsdGiven = TRUE; break; case B4SOI_MOD_WFPROUT: mod->B4SOIwfprout = value->rValue; mod->B4SOIwfproutGiven = TRUE; break; case B4SOI_MOD_WPDITS: mod->B4SOIwpdits = value->rValue; mod->B4SOIwpditsGiven = TRUE; break; case B4SOI_MOD_WPDITSD: mod->B4SOIwpditsd = value->rValue; mod->B4SOIwpditsdGiven = TRUE; break; case B4SOI_MOD_PFPROUT: mod->B4SOIpfprout = value->rValue; mod->B4SOIpfproutGiven = TRUE; break; case B4SOI_MOD_PPDITS: mod->B4SOIppdits = value->rValue; mod->B4SOIppditsGiven = TRUE; break; case B4SOI_MOD_PPDITSD: mod->B4SOIppditsd = value->rValue; mod->B4SOIppditsdGiven = TRUE; break; /* v4.0 */ /* v4.0 stress effect */ case B4SOI_MOD_SAREF : mod->B4SOIsaref = value->rValue; mod->B4SOIsarefGiven = TRUE; break; case B4SOI_MOD_SBREF : mod->B4SOIsbref = value->rValue; mod->B4SOIsbrefGiven = TRUE; break; case B4SOI_MOD_WLOD : mod->B4SOIwlod = value->rValue; mod->B4SOIwlodGiven = TRUE; break; case B4SOI_MOD_KU0 : mod->B4SOIku0 = value->rValue; mod->B4SOIku0Given = TRUE; break; case B4SOI_MOD_KVSAT : mod->B4SOIkvsat = value->rValue; mod->B4SOIkvsatGiven = TRUE; break; case B4SOI_MOD_KVTH0 : mod->B4SOIkvth0 = value->rValue; mod->B4SOIkvth0Given = TRUE; break; case B4SOI_MOD_TKU0 : mod->B4SOItku0 = value->rValue; mod->B4SOItku0Given = TRUE; break; case B4SOI_MOD_LLODKU0 : mod->B4SOIllodku0 = value->rValue; mod->B4SOIllodku0Given = TRUE; break; case B4SOI_MOD_WLODKU0 : mod->B4SOIwlodku0 = value->rValue; mod->B4SOIwlodku0Given = TRUE; break; case B4SOI_MOD_LLODVTH : mod->B4SOIllodvth = value->rValue; mod->B4SOIllodvthGiven = TRUE; break; case B4SOI_MOD_WLODVTH : mod->B4SOIwlodvth = value->rValue; mod->B4SOIwlodvthGiven = TRUE; break; case B4SOI_MOD_LKU0 : mod->B4SOIlku0 = value->rValue; mod->B4SOIlku0Given = TRUE; break; case B4SOI_MOD_WKU0 : mod->B4SOIwku0 = value->rValue; mod->B4SOIwku0Given = TRUE; break; case B4SOI_MOD_PKU0 : mod->B4SOIpku0 = value->rValue; mod->B4SOIpku0Given = TRUE; break; case B4SOI_MOD_LKVTH0 : mod->B4SOIlkvth0 = value->rValue; mod->B4SOIlkvth0Given = TRUE; break; case B4SOI_MOD_WKVTH0 : mod->B4SOIwkvth0 = value->rValue; mod->B4SOIwkvth0Given = TRUE; break; case B4SOI_MOD_PKVTH0 : mod->B4SOIpkvth0 = value->rValue; mod->B4SOIpkvth0Given = TRUE; break; case B4SOI_MOD_STK2 : mod->B4SOIstk2 = value->rValue; mod->B4SOIstk2Given = TRUE; break; case B4SOI_MOD_LODK2 : mod->B4SOIlodk2 = value->rValue; mod->B4SOIlodk2Given = TRUE; break; /* Bug fix # 31 Jul 09*/ case B4SOI_MOD_STETA0 : mod->B4SOIsteta0 = value->rValue; mod->B4SOIsteta0Given = TRUE; break; case B4SOI_MOD_LODETA0 : mod->B4SOIlodeta0 = value->rValue; mod->B4SOIlodeta0Given = TRUE; break; /* v4.0 stress effect end */ /* v3.2 */ case B4SOI_MOD_FNOIMOD : mod->B4SOIfnoiMod = value->iValue; mod->B4SOIfnoiModGiven = TRUE; break; case B4SOI_MOD_TNOIMOD : mod->B4SOItnoiMod = value->iValue; mod->B4SOItnoiModGiven = TRUE; break; case B4SOI_MOD_TNOIA : mod->B4SOItnoia = value->rValue; mod->B4SOItnoiaGiven = TRUE; break; case B4SOI_MOD_TNOIB : mod->B4SOItnoib = value->rValue; mod->B4SOItnoibGiven = TRUE; break; case B4SOI_MOD_RNOIA : mod->B4SOIrnoia = value->rValue; mod->B4SOIrnoiaGiven = TRUE; break; case B4SOI_MOD_RNOIB : mod->B4SOIrnoib = value->rValue; mod->B4SOIrnoibGiven = TRUE; break; case B4SOI_MOD_NTNOI : mod->B4SOIntnoi = value->rValue; mod->B4SOIntnoiGiven = TRUE; break; /* v3.2 end */ /* v2.0 release */ case B4SOI_MOD_K1W1 : mod->B4SOIk1w1 = value->rValue; mod->B4SOIk1w1Given = TRUE; break; case B4SOI_MOD_K1W2 : mod->B4SOIk1w2 = value->rValue; mod->B4SOIk1w2Given = TRUE; break; case B4SOI_MOD_KETAS : mod->B4SOIketas = value->rValue; mod->B4SOIketasGiven = TRUE; break; case B4SOI_MOD_DWBC : mod->B4SOIdwbc = value->rValue; mod->B4SOIdwbcGiven = TRUE; break; case B4SOI_MOD_BETA0 : mod->B4SOIbeta0 = value->rValue; mod->B4SOIbeta0Given = TRUE; break; case B4SOI_MOD_BETA1 : mod->B4SOIbeta1 = value->rValue; mod->B4SOIbeta1Given = TRUE; break; case B4SOI_MOD_BETA2 : mod->B4SOIbeta2 = value->rValue; mod->B4SOIbeta2Given = TRUE; break; case B4SOI_MOD_VDSATII0 : mod->B4SOIvdsatii0 = value->rValue; mod->B4SOIvdsatii0Given = TRUE; break; case B4SOI_MOD_TII : mod->B4SOItii = value->rValue; mod->B4SOItiiGiven = TRUE; break; case B4SOI_MOD_TVBCI : mod->B4SOItvbci = value->rValue; mod->B4SOItvbciGiven = TRUE; break; case B4SOI_MOD_LII : mod->B4SOIlii = value->rValue; mod->B4SOIliiGiven = TRUE; break; case B4SOI_MOD_SII0 : mod->B4SOIsii0 = value->rValue; mod->B4SOIsii0Given = TRUE; break; case B4SOI_MOD_SII1 : mod->B4SOIsii1 = value->rValue; mod->B4SOIsii1Given = TRUE; break; case B4SOI_MOD_SII2 : mod->B4SOIsii2 = value->rValue; mod->B4SOIsii2Given = TRUE; break; case B4SOI_MOD_SIID : mod->B4SOIsiid = value->rValue; mod->B4SOIsiidGiven = TRUE; break; case B4SOI_MOD_FBJTII : mod->B4SOIfbjtii = value->rValue; mod->B4SOIfbjtiiGiven = TRUE; break; /*4.1 Iii model*/ case B4SOI_MOD_EBJTII : mod->B4SOIebjtii = value->rValue; mod->B4SOIebjtiiGiven = TRUE; break; case B4SOI_MOD_CBJTII : mod->B4SOIcbjtii = value->rValue; mod->B4SOIcbjtiiGiven = TRUE; break; case B4SOI_MOD_VBCI : mod->B4SOIvbci = value->rValue; mod->B4SOIvbciGiven = TRUE; break; case B4SOI_MOD_ABJTII : mod->B4SOIabjtii = value->rValue; mod->B4SOIabjtiiGiven = TRUE; break; case B4SOI_MOD_MBJTII : mod->B4SOImbjtii = value->rValue; mod->B4SOImbjtiiGiven = TRUE; break; case B4SOI_MOD_ESATII : mod->B4SOIesatii = value->rValue; mod->B4SOIesatiiGiven = TRUE; break; case B4SOI_MOD_NTUNS : /* v4.0 */ mod->B4SOIntun = value->rValue; mod->B4SOIntunGiven = TRUE; break; case B4SOI_MOD_NTUND : /* v4.0 */ mod->B4SOIntund = value->rValue; mod->B4SOIntundGiven = TRUE; break; case B4SOI_MOD_NRECF0S : /* v4.0 */ mod->B4SOInrecf0 = value->rValue; mod->B4SOInrecf0Given = TRUE; break; case B4SOI_MOD_NRECF0D : /* v4.0 */ mod->B4SOInrecf0d = value->rValue; mod->B4SOInrecf0dGiven = TRUE; break; case B4SOI_MOD_NRECR0S : /* v4.0 */ mod->B4SOInrecr0 = value->rValue; mod->B4SOInrecr0Given = TRUE; break; case B4SOI_MOD_NRECR0D : /* v4.0 */ mod->B4SOInrecr0d = value->rValue; mod->B4SOInrecr0dGiven = TRUE; break; case B4SOI_MOD_ISBJT : mod->B4SOIisbjt = value->rValue; mod->B4SOIisbjtGiven = TRUE; break; case B4SOI_MOD_IDBJT : /* v4.0 */ mod->B4SOIidbjt = value->rValue; mod->B4SOIidbjtGiven = TRUE; break; case B4SOI_MOD_ISDIF : mod->B4SOIisdif = value->rValue; mod->B4SOIisdifGiven = TRUE; break; case B4SOI_MOD_IDDIF : /* v4.0 */ mod->B4SOIiddif = value->rValue; mod->B4SOIiddifGiven = TRUE; break; case B4SOI_MOD_ISREC : mod->B4SOIisrec = value->rValue; mod->B4SOIisrecGiven = TRUE; break; case B4SOI_MOD_IDREC : /* v4.0 */ mod->B4SOIidrec = value->rValue; mod->B4SOIidrecGiven = TRUE; break; case B4SOI_MOD_ISTUN : mod->B4SOIistun = value->rValue; mod->B4SOIistunGiven = TRUE; break; case B4SOI_MOD_IDTUN : /* v4.0 */ mod->B4SOIidtun = value->rValue; mod->B4SOIidtunGiven = TRUE; break; case B4SOI_MOD_LN : mod->B4SOIln = value->rValue; mod->B4SOIlnGiven = TRUE; break; case B4SOI_MOD_VREC0S : /* v4.0 */ mod->B4SOIvrec0 = value->rValue; mod->B4SOIvrec0Given = TRUE; break; case B4SOI_MOD_VREC0D : /* v4.0 */ mod->B4SOIvrec0d = value->rValue; mod->B4SOIvrec0dGiven = TRUE; break; case B4SOI_MOD_VTUN0S : /* v4.0 */ mod->B4SOIvtun0 = value->rValue; mod->B4SOIvtun0Given = TRUE; break; case B4SOI_MOD_VTUN0D : /* v4.0 */ mod->B4SOIvtun0d = value->rValue; mod->B4SOIvtun0dGiven = TRUE; break; case B4SOI_MOD_NBJT : mod->B4SOInbjt = value->rValue; mod->B4SOInbjtGiven = TRUE; break; case B4SOI_MOD_LBJT0 : mod->B4SOIlbjt0 = value->rValue; mod->B4SOIlbjt0Given = TRUE; break; case B4SOI_MOD_LDIF0 : mod->B4SOIldif0 = value->rValue; mod->B4SOIldif0Given = TRUE; break; case B4SOI_MOD_VABJT : mod->B4SOIvabjt = value->rValue; mod->B4SOIvabjtGiven = TRUE; break; case B4SOI_MOD_AELY : mod->B4SOIaely = value->rValue; mod->B4SOIaelyGiven = TRUE; break; case B4SOI_MOD_AHLIS : /* v4.0 */ mod->B4SOIahli = value->rValue; mod->B4SOIahliGiven = TRUE; break; case B4SOI_MOD_AHLID : /* v4.0 */ mod->B4SOIahlid = value->rValue; mod->B4SOIahlidGiven = TRUE; break; case B4SOI_MOD_NDIF : mod->B4SOIndif = value->rValue; mod->B4SOIndifGiven = TRUE; break; case B4SOI_MOD_NTRECF : mod->B4SOIntrecf = value->rValue; mod->B4SOIntrecfGiven = TRUE; break; case B4SOI_MOD_NTRECR : mod->B4SOIntrecr = value->rValue; mod->B4SOIntrecrGiven = TRUE; break; case B4SOI_MOD_DLCB : mod->B4SOIdlcb = value->rValue; mod->B4SOIdlcbGiven = TRUE; break; case B4SOI_MOD_FBODY : mod->B4SOIfbody = value->rValue; mod->B4SOIfbodyGiven = TRUE; break; case B4SOI_MOD_TCJSWGS : mod->B4SOItcjswg = value->rValue; mod->B4SOItcjswgGiven = TRUE; break; case B4SOI_MOD_TPBSWGS : mod->B4SOItpbswg = value->rValue; mod->B4SOItpbswgGiven = TRUE; break; case B4SOI_MOD_TCJSWGD : mod->B4SOItcjswgd = value->rValue; mod->B4SOItcjswgdGiven = TRUE; break; case B4SOI_MOD_TPBSWGD : mod->B4SOItpbswgd = value->rValue; mod->B4SOItpbswgdGiven = TRUE; break; case B4SOI_MOD_ACDE : mod->B4SOIacde = value->rValue; mod->B4SOIacdeGiven = TRUE; break; case B4SOI_MOD_MOIN : mod->B4SOImoin = value->rValue; mod->B4SOImoinGiven = TRUE; break; case B4SOI_MOD_NOFF : mod->B4SOInoff = value->rValue; mod->B4SOInoffGiven = TRUE; break; /* v3.2 */ case B4SOI_MOD_DELVT : mod->B4SOIdelvt = value->rValue; mod->B4SOIdelvtGiven = TRUE; break; case B4SOI_MOD_KB1 : mod->B4SOIkb1 = value->rValue; mod->B4SOIkb1Given = TRUE; break; case B4SOI_MOD_DLBG : mod->B4SOIdlbg = value->rValue; mod->B4SOIdlbgGiven = TRUE; break; /* Added for binning - START */ /* Length Dependence */ /* v3.1 */ case B4SOI_MOD_LXJ : mod->B4SOIlxj = value->rValue; mod->B4SOIlxjGiven = TRUE; break; case B4SOI_MOD_LALPHAGB1 : mod->B4SOIlalphaGB1 = value->rValue; mod->B4SOIlalphaGB1Given = TRUE; break; case B4SOI_MOD_LALPHAGB2 : mod->B4SOIlalphaGB2 = value->rValue; mod->B4SOIlalphaGB2Given = TRUE; break; case B4SOI_MOD_LBETAGB1 : mod->B4SOIlbetaGB1 = value->rValue; mod->B4SOIlbetaGB1Given = TRUE; break; case B4SOI_MOD_LBETAGB2 : mod->B4SOIlbetaGB2 = value->rValue; mod->B4SOIlbetaGB2Given = TRUE; break; case B4SOI_MOD_LAIGBCP2 : mod->B4SOIlaigbcp2 = value->rValue; mod->B4SOIlaigbcp2Given = TRUE; break; case B4SOI_MOD_LBIGBCP2 : mod->B4SOIlbigbcp2 = value->rValue; mod->B4SOIlbigbcp2Given = TRUE; break; case B4SOI_MOD_LCIGBCP2 : mod->B4SOIlcigbcp2 = value->rValue; mod->B4SOIlcigbcp2Given = TRUE; break; case B4SOI_MOD_LNDIF : mod->B4SOIlndif = value->rValue; mod->B4SOIlndifGiven = TRUE; break; case B4SOI_MOD_LNTRECF : mod->B4SOIlntrecf = value->rValue; mod->B4SOIlntrecfGiven = TRUE; break; case B4SOI_MOD_LNTRECR : mod->B4SOIlntrecr = value->rValue; mod->B4SOIlntrecrGiven = TRUE; break; case B4SOI_MOD_LXBJT : mod->B4SOIlxbjt = value->rValue; mod->B4SOIlxbjtGiven = TRUE; break; case B4SOI_MOD_LXDIFS : mod->B4SOIlxdif = value->rValue; mod->B4SOIlxdifGiven = TRUE; break; case B4SOI_MOD_LXRECS : mod->B4SOIlxrec = value->rValue; mod->B4SOIlxrecGiven = TRUE; break; case B4SOI_MOD_LXTUNS : mod->B4SOIlxtun = value->rValue; mod->B4SOIlxtunGiven = TRUE; break; case B4SOI_MOD_LXDIFD : mod->B4SOIlxdifd = value->rValue; mod->B4SOIlxdifdGiven = TRUE; break; case B4SOI_MOD_LXRECD : mod->B4SOIlxrecd = value->rValue; mod->B4SOIlxrecdGiven = TRUE; break; case B4SOI_MOD_LXTUND : mod->B4SOIlxtund = value->rValue; mod->B4SOIlxtundGiven = TRUE; break; case B4SOI_MOD_LCGDL : mod->B4SOIlcgdl = value->rValue; mod->B4SOIlcgdlGiven = TRUE; break; case B4SOI_MOD_LCGSL : mod->B4SOIlcgsl = value->rValue; mod->B4SOIlcgslGiven = TRUE; break; case B4SOI_MOD_LCKAPPA : mod->B4SOIlckappa = value->rValue; mod->B4SOIlckappaGiven = TRUE; break; case B4SOI_MOD_LUTE : mod->B4SOIlute = value->rValue; mod->B4SOIluteGiven = TRUE; break; case B4SOI_MOD_LKT1 : mod->B4SOIlkt1 = value->rValue; mod->B4SOIlkt1Given = TRUE; break; case B4SOI_MOD_LKT2 : mod->B4SOIlkt2 = value->rValue; mod->B4SOIlkt2Given = TRUE; break; case B4SOI_MOD_LKT1L : mod->B4SOIlkt1l = value->rValue; mod->B4SOIlkt1lGiven = TRUE; break; case B4SOI_MOD_LUA1 : mod->B4SOIlua1 = value->rValue; mod->B4SOIlua1Given = TRUE; break; case B4SOI_MOD_LUB1 : mod->B4SOIlub1 = value->rValue; mod->B4SOIlub1Given = TRUE; break; case B4SOI_MOD_LUC1 : mod->B4SOIluc1 = value->rValue; mod->B4SOIluc1Given = TRUE; break; case B4SOI_MOD_LAT : mod->B4SOIlat = value->rValue; mod->B4SOIlatGiven = TRUE; break; case B4SOI_MOD_LPRT : mod->B4SOIlprt = value->rValue; mod->B4SOIlprtGiven = TRUE; break; /* v3.0 */ case B4SOI_MOD_LAIGC : mod->B4SOIlaigc = value->rValue; mod->B4SOIlaigcGiven = TRUE; break; case B4SOI_MOD_LBIGC : mod->B4SOIlbigc = value->rValue; mod->B4SOIlbigcGiven = TRUE; break; case B4SOI_MOD_LCIGC : mod->B4SOIlcigc = value->rValue; mod->B4SOIlcigcGiven = TRUE; break; case B4SOI_MOD_LAIGSD : mod->B4SOIlaigsd = value->rValue; mod->B4SOIlaigsdGiven = TRUE; break; case B4SOI_MOD_LBIGSD : mod->B4SOIlbigsd = value->rValue; mod->B4SOIlbigsdGiven = TRUE; break; case B4SOI_MOD_LCIGSD : mod->B4SOIlcigsd = value->rValue; mod->B4SOIlcigsdGiven = TRUE; break; case B4SOI_MOD_LNIGC : mod->B4SOIlnigc = value->rValue; mod->B4SOIlnigcGiven = TRUE; break; case B4SOI_MOD_LPIGCD : mod->B4SOIlpigcd = value->rValue; mod->B4SOIlpigcdGiven = TRUE; break; case B4SOI_MOD_LPOXEDGE : mod->B4SOIlpoxedge = value->rValue; mod->B4SOIlpoxedgeGiven = TRUE; break; case B4SOI_MOD_LNPEAK: mod->B4SOIlnpeak = value->rValue; mod->B4SOIlnpeakGiven = TRUE; break; case B4SOI_MOD_LNSUB: mod->B4SOIlnsub = value->rValue; mod->B4SOIlnsubGiven = TRUE; break; case B4SOI_MOD_LNGATE: mod->B4SOIlngate = value->rValue; mod->B4SOIlngateGiven = TRUE; break; case B4SOI_MOD_LNSD: mod->B4SOIlnsd = value->rValue; mod->B4SOIlnsdGiven = TRUE; break; case B4SOI_MOD_LVTH0: mod->B4SOIlvth0 = value->rValue; mod->B4SOIlvth0Given = TRUE; break; case B4SOI_MOD_LVFB: mod->B4SOIlvfb = value->rValue; mod->B4SOIlvfbGiven = TRUE; break; /* v4.1 */ case B4SOI_MOD_LK1: mod->B4SOIlk1 = value->rValue; mod->B4SOIlk1Given = TRUE; break; case B4SOI_MOD_LK1W1: mod->B4SOIlk1w1 = value->rValue; mod->B4SOIlk1w1Given = TRUE; break; case B4SOI_MOD_LK1W2: mod->B4SOIlk1w2 = value->rValue; mod->B4SOIlk1w2Given = TRUE; break; case B4SOI_MOD_LK2: mod->B4SOIlk2 = value->rValue; mod->B4SOIlk2Given = TRUE; break; case B4SOI_MOD_LK3: mod->B4SOIlk3 = value->rValue; mod->B4SOIlk3Given = TRUE; break; case B4SOI_MOD_LK3B: mod->B4SOIlk3b = value->rValue; mod->B4SOIlk3bGiven = TRUE; break; case B4SOI_MOD_LKB1 : mod->B4SOIlkb1 = value->rValue; mod->B4SOIlkb1Given = TRUE; break; case B4SOI_MOD_LW0: mod->B4SOIlw0 = value->rValue; mod->B4SOIlw0Given = TRUE; break; case B4SOI_MOD_LLPE0: mod->B4SOIllpe0 = value->rValue; mod->B4SOIllpe0Given = TRUE; break; case B4SOI_MOD_LLPEB: /* v4.0 for Vth */ mod->B4SOIllpeb = value->rValue; mod->B4SOIllpebGiven = TRUE; break; case B4SOI_MOD_LDVT0: mod->B4SOIldvt0 = value->rValue; mod->B4SOIldvt0Given = TRUE; break; case B4SOI_MOD_LDVT1: mod->B4SOIldvt1 = value->rValue; mod->B4SOIldvt1Given = TRUE; break; case B4SOI_MOD_LDVT2: mod->B4SOIldvt2 = value->rValue; mod->B4SOIldvt2Given = TRUE; break; case B4SOI_MOD_LDVT0W: mod->B4SOIldvt0w = value->rValue; mod->B4SOIldvt0wGiven = TRUE; break; case B4SOI_MOD_LDVT1W: mod->B4SOIldvt1w = value->rValue; mod->B4SOIldvt1wGiven = TRUE; break; case B4SOI_MOD_LDVT2W: mod->B4SOIldvt2w = value->rValue; mod->B4SOIldvt2wGiven = TRUE; break; case B4SOI_MOD_LU0 : mod->B4SOIlu0 = value->rValue; mod->B4SOIlu0Given = TRUE; break; case B4SOI_MOD_LUA: mod->B4SOIlua = value->rValue; mod->B4SOIluaGiven = TRUE; break; case B4SOI_MOD_LUB: mod->B4SOIlub = value->rValue; mod->B4SOIlubGiven = TRUE; break; case B4SOI_MOD_LUC: mod->B4SOIluc = value->rValue; mod->B4SOIlucGiven = TRUE; break; case B4SOI_MOD_LVSAT: mod->B4SOIlvsat = value->rValue; mod->B4SOIlvsatGiven = TRUE; break; case B4SOI_MOD_LA0: mod->B4SOIla0 = value->rValue; mod->B4SOIla0Given = TRUE; break; case B4SOI_MOD_LAGS: mod->B4SOIlags= value->rValue; mod->B4SOIlagsGiven = TRUE; break; case B4SOI_MOD_LB0 : mod->B4SOIlb0 = value->rValue; mod->B4SOIlb0Given = TRUE; break; case B4SOI_MOD_LB1 : mod->B4SOIlb1 = value->rValue; mod->B4SOIlb1Given = TRUE; break; case B4SOI_MOD_LKETA: mod->B4SOIlketa = value->rValue; mod->B4SOIlketaGiven = TRUE; break; case B4SOI_MOD_LKETAS: mod->B4SOIlketas = value->rValue; mod->B4SOIlketasGiven = TRUE; break; case B4SOI_MOD_LA1: mod->B4SOIla1 = value->rValue; mod->B4SOIla1Given = TRUE; break; case B4SOI_MOD_LA2: mod->B4SOIla2 = value->rValue; mod->B4SOIla2Given = TRUE; break; case B4SOI_MOD_LRDSW: mod->B4SOIlrdsw = value->rValue; mod->B4SOIlrdswGiven = TRUE; break; case B4SOI_MOD_LRSW: mod->B4SOIlrsw = value->rValue; mod->B4SOIlrswGiven = TRUE; break; case B4SOI_MOD_LRDW: mod->B4SOIlrdw = value->rValue; mod->B4SOIlrdwGiven = TRUE; break; case B4SOI_MOD_LPRWB: mod->B4SOIlprwb = value->rValue; mod->B4SOIlprwbGiven = TRUE; break; case B4SOI_MOD_LPRWG: mod->B4SOIlprwg = value->rValue; mod->B4SOIlprwgGiven = TRUE; break; case B4SOI_MOD_LWR : mod->B4SOIlwr = value->rValue; mod->B4SOIlwrGiven = TRUE; break; case B4SOI_MOD_LNFACTOR : mod->B4SOIlnfactor = value->rValue; mod->B4SOIlnfactorGiven = TRUE; break; case B4SOI_MOD_LDWG : mod->B4SOIldwg = value->rValue; mod->B4SOIldwgGiven = TRUE; break; case B4SOI_MOD_LDWB : mod->B4SOIldwb = value->rValue; mod->B4SOIldwbGiven = TRUE; break; case B4SOI_MOD_LVOFF: mod->B4SOIlvoff = value->rValue; mod->B4SOIlvoffGiven = TRUE; break; case B4SOI_MOD_LETA0: mod->B4SOIleta0 = value->rValue; mod->B4SOIleta0Given = TRUE; break; case B4SOI_MOD_LETAB: mod->B4SOIletab = value->rValue; mod->B4SOIletabGiven = TRUE; break; case B4SOI_MOD_LDSUB: mod->B4SOIldsub = value->rValue; mod->B4SOIldsubGiven = TRUE; break; case B4SOI_MOD_LCIT : mod->B4SOIlcit = value->rValue; mod->B4SOIlcitGiven = TRUE; break; case B4SOI_MOD_LCDSC : mod->B4SOIlcdsc = value->rValue; mod->B4SOIlcdscGiven = TRUE; break; case B4SOI_MOD_LCDSCB : mod->B4SOIlcdscb = value->rValue; mod->B4SOIlcdscbGiven = TRUE; break; case B4SOI_MOD_LCDSCD : mod->B4SOIlcdscd = value->rValue; mod->B4SOIlcdscdGiven = TRUE; break; case B4SOI_MOD_LPCLM: mod->B4SOIlpclm = value->rValue; mod->B4SOIlpclmGiven = TRUE; break; case B4SOI_MOD_LPDIBL1: mod->B4SOIlpdibl1 = value->rValue; mod->B4SOIlpdibl1Given = TRUE; break; case B4SOI_MOD_LPDIBL2: mod->B4SOIlpdibl2 = value->rValue; mod->B4SOIlpdibl2Given = TRUE; break; case B4SOI_MOD_LPDIBLB: mod->B4SOIlpdiblb = value->rValue; mod->B4SOIlpdiblbGiven = TRUE; break; case B4SOI_MOD_LDROUT: mod->B4SOIldrout = value->rValue; mod->B4SOIldroutGiven = TRUE; break; case B4SOI_MOD_LPVAG: mod->B4SOIlpvag = value->rValue; mod->B4SOIlpvagGiven = TRUE; break; case B4SOI_MOD_LDELTA : mod->B4SOIldelta = value->rValue; mod->B4SOIldeltaGiven = TRUE; break; case B4SOI_MOD_LALPHA0 : mod->B4SOIlalpha0 = value->rValue; mod->B4SOIlalpha0Given = TRUE; break; case B4SOI_MOD_LFBJTII : mod->B4SOIlfbjtii = value->rValue; mod->B4SOIlfbjtiiGiven = TRUE; break; /*4.1 Iii model*/ case B4SOI_MOD_LEBJTII : mod->B4SOIlebjtii = value->rValue; mod->B4SOIlebjtiiGiven = TRUE; break; case B4SOI_MOD_LCBJTII : mod->B4SOIlcbjtii = value->rValue; mod->B4SOIlcbjtiiGiven = TRUE; break; case B4SOI_MOD_LVBCI : mod->B4SOIlvbci = value->rValue; mod->B4SOIlvbciGiven = TRUE; break; case B4SOI_MOD_LABJTII : mod->B4SOIlabjtii = value->rValue; mod->B4SOIlabjtiiGiven = TRUE; break; case B4SOI_MOD_LMBJTII : mod->B4SOIlmbjtii = value->rValue; mod->B4SOIlmbjtiiGiven = TRUE; break; case B4SOI_MOD_LBETA0 : mod->B4SOIlbeta0 = value->rValue; mod->B4SOIlbeta0Given = TRUE; break; case B4SOI_MOD_LBETA1 : mod->B4SOIlbeta1 = value->rValue; mod->B4SOIlbeta1Given = TRUE; break; case B4SOI_MOD_LBETA2 : mod->B4SOIlbeta2 = value->rValue; mod->B4SOIlbeta2Given = TRUE; break; case B4SOI_MOD_LVDSATII0 : mod->B4SOIlvdsatii0 = value->rValue; mod->B4SOIlvdsatii0Given = TRUE; break; case B4SOI_MOD_LLII : mod->B4SOIllii = value->rValue; mod->B4SOIlliiGiven = TRUE; break; case B4SOI_MOD_LESATII : mod->B4SOIlesatii = value->rValue; mod->B4SOIlesatiiGiven = TRUE; break; case B4SOI_MOD_LSII0 : mod->B4SOIlsii0 = value->rValue; mod->B4SOIlsii0Given = TRUE; break; case B4SOI_MOD_LSII1 : mod->B4SOIlsii1 = value->rValue; mod->B4SOIlsii1Given = TRUE; break; case B4SOI_MOD_LSII2 : mod->B4SOIlsii2 = value->rValue; mod->B4SOIlsii2Given = TRUE; break; case B4SOI_MOD_LSIID : mod->B4SOIlsiid = value->rValue; mod->B4SOIlsiidGiven = TRUE; break; case B4SOI_MOD_LAGIDL : mod->B4SOIlagidl = value->rValue; mod->B4SOIlagidlGiven = TRUE; break; case B4SOI_MOD_LBGIDL : mod->B4SOIlbgidl = value->rValue; mod->B4SOIlbgidlGiven = TRUE; break; case B4SOI_MOD_LCGIDL : mod->B4SOIlcgidl = value->rValue; mod->B4SOIlcgidlGiven = TRUE; break; case B4SOI_MOD_LEGIDL : mod->B4SOIlegidl = value->rValue; mod->B4SOIlegidlGiven = TRUE; break; case B4SOI_MOD_LRGIDL : mod->B4SOIlrgidl = value->rValue; mod->B4SOIlrgidlGiven = TRUE; break; case B4SOI_MOD_LKGIDL : mod->B4SOIlkgidl = value->rValue; mod->B4SOIlkgidlGiven = TRUE; break; case B4SOI_MOD_LFGIDL : mod->B4SOIlfgidl = value->rValue; mod->B4SOIlfgidlGiven = TRUE; break; case B4SOI_MOD_LAGISL : mod->B4SOIlagisl = value->rValue; mod->B4SOIlagislGiven = TRUE; break; case B4SOI_MOD_LBGISL : mod->B4SOIlbgisl = value->rValue; mod->B4SOIlbgislGiven = TRUE; break; case B4SOI_MOD_LCGISL : mod->B4SOIlcgisl = value->rValue; mod->B4SOIlcgislGiven = TRUE; break; case B4SOI_MOD_LEGISL : mod->B4SOIlegisl = value->rValue; mod->B4SOIlegislGiven = TRUE; break; case B4SOI_MOD_LRGISL : mod->B4SOIlrgisl = value->rValue; mod->B4SOIlrgislGiven = TRUE; break; case B4SOI_MOD_LKGISL : mod->B4SOIlkgisl = value->rValue; mod->B4SOIlkgislGiven = TRUE; break; case B4SOI_MOD_LFGISL : mod->B4SOIlfgisl = value->rValue; mod->B4SOIlfgislGiven = TRUE; break; case B4SOI_MOD_LNTUNS : /* v4.0 */ mod->B4SOIlntun = value->rValue; mod->B4SOIlntunGiven = TRUE; break; case B4SOI_MOD_LNTUND : /* v4.0 */ mod->B4SOIlntund = value->rValue; mod->B4SOIlntundGiven = TRUE; break; case B4SOI_MOD_LNDIODES : /* v4.0 */ mod->B4SOIlndiode = value->rValue; mod->B4SOIlndiodeGiven = TRUE; break; case B4SOI_MOD_LNDIODED : /* v4.0 */ mod->B4SOIlndioded = value->rValue; mod->B4SOIlndiodedGiven = TRUE; break; case B4SOI_MOD_LNRECF0S : /* v4.0 */ mod->B4SOIlnrecf0 = value->rValue; mod->B4SOIlnrecf0Given = TRUE; break; case B4SOI_MOD_LNRECF0D : /* v4.0 */ mod->B4SOIlnrecf0d = value->rValue; mod->B4SOIlnrecf0dGiven = TRUE; break; case B4SOI_MOD_LNRECR0S : /* v4.0 */ mod->B4SOIlnrecr0 = value->rValue; mod->B4SOIlnrecr0Given = TRUE; break; case B4SOI_MOD_LNRECR0D : /* v4.0 */ mod->B4SOIlnrecr0d = value->rValue; mod->B4SOIlnrecr0dGiven = TRUE; break; case B4SOI_MOD_LISBJT : mod->B4SOIlisbjt = value->rValue; mod->B4SOIlisbjtGiven = TRUE; break; case B4SOI_MOD_LIDBJT : /* v4.0 */ mod->B4SOIlidbjt = value->rValue; mod->B4SOIlidbjtGiven = TRUE; break; case B4SOI_MOD_LISDIF : mod->B4SOIlisdif = value->rValue; mod->B4SOIlisdifGiven = TRUE; break; case B4SOI_MOD_LIDDIF : /* v4.0 */ mod->B4SOIliddif = value->rValue; mod->B4SOIliddifGiven = TRUE; break; case B4SOI_MOD_LISREC : mod->B4SOIlisrec = value->rValue; mod->B4SOIlisrecGiven = TRUE; break; case B4SOI_MOD_LIDREC : /* v4.0 */ mod->B4SOIlidrec = value->rValue; mod->B4SOIlidrecGiven = TRUE; break; case B4SOI_MOD_LISTUN : mod->B4SOIlistun = value->rValue; mod->B4SOIlistunGiven = TRUE; break; case B4SOI_MOD_LIDTUN : /* v4.0 */ mod->B4SOIlidtun = value->rValue; mod->B4SOIlidtunGiven = TRUE; break; case B4SOI_MOD_LVREC0S : /* v4.0 */ mod->B4SOIlvrec0 = value->rValue; mod->B4SOIlvrec0Given = TRUE; break; case B4SOI_MOD_LVREC0D : /* v4.0 */ mod->B4SOIlvrec0d = value->rValue; mod->B4SOIlvrec0dGiven = TRUE; break; case B4SOI_MOD_LVTUN0S : /* v4.0 */ mod->B4SOIlvtun0 = value->rValue; mod->B4SOIlvtun0Given = TRUE; break; case B4SOI_MOD_LVTUN0D : /* v4.0 */ mod->B4SOIlvtun0d = value->rValue; mod->B4SOIlvtun0dGiven = TRUE; break; case B4SOI_MOD_LNBJT : mod->B4SOIlnbjt = value->rValue; mod->B4SOIlnbjtGiven = TRUE; break; case B4SOI_MOD_LLBJT0 : mod->B4SOIllbjt0 = value->rValue; mod->B4SOIllbjt0Given = TRUE; break; case B4SOI_MOD_LVABJT : mod->B4SOIlvabjt = value->rValue; mod->B4SOIlvabjtGiven = TRUE; break; case B4SOI_MOD_LAELY : mod->B4SOIlaely = value->rValue; mod->B4SOIlaelyGiven = TRUE; break; case B4SOI_MOD_LAHLIS : /* v4.0 */ mod->B4SOIlahli = value->rValue; mod->B4SOIlahliGiven = TRUE; break; case B4SOI_MOD_LAHLID : /* v4.0 */ mod->B4SOIlahlid = value->rValue; mod->B4SOIlahlidGiven = TRUE; break; /* v3.1 for RF */ case B4SOI_MOD_LXRCRG1 : mod->B4SOIlxrcrg1 = value->rValue; mod->B4SOIlxrcrg1Given = TRUE; break; case B4SOI_MOD_LXRCRG2 : mod->B4SOIlxrcrg2 = value->rValue; mod->B4SOIlxrcrg2Given = TRUE; break; /* v3.1 for RF end */ /* CV Model */ case B4SOI_MOD_LVSDFB : mod->B4SOIlvsdfb = value->rValue; mod->B4SOIlvsdfbGiven = TRUE; break; case B4SOI_MOD_LVSDTH : mod->B4SOIlvsdth = value->rValue; mod->B4SOIlvsdthGiven = TRUE; break; case B4SOI_MOD_LDELVT : mod->B4SOIldelvt = value->rValue; mod->B4SOIldelvtGiven = TRUE; break; case B4SOI_MOD_LACDE : mod->B4SOIlacde = value->rValue; mod->B4SOIlacdeGiven = TRUE; break; case B4SOI_MOD_LMOIN : mod->B4SOIlmoin = value->rValue; mod->B4SOIlmoinGiven = TRUE; break; case B4SOI_MOD_LNOFF : mod->B4SOIlnoff = value->rValue; mod->B4SOIlnoffGiven = TRUE; break; /* v3.2 */ /* Width Dependence */ /* v3.1 */ case B4SOI_MOD_WXJ : mod->B4SOIwxj = value->rValue; mod->B4SOIwxjGiven = TRUE; break; case B4SOI_MOD_WALPHAGB1 : mod->B4SOIwalphaGB1 = value->rValue; mod->B4SOIwalphaGB1Given = TRUE; break; case B4SOI_MOD_WALPHAGB2 : mod->B4SOIwalphaGB2 = value->rValue; mod->B4SOIwalphaGB2Given = TRUE; break; case B4SOI_MOD_WBETAGB1 : mod->B4SOIwbetaGB1 = value->rValue; mod->B4SOIwbetaGB1Given = TRUE; break; case B4SOI_MOD_WBETAGB2 : mod->B4SOIwbetaGB2 = value->rValue; mod->B4SOIwbetaGB2Given = TRUE; break; case B4SOI_MOD_WAIGBCP2 : mod->B4SOIwaigbcp2 = value->rValue; mod->B4SOIwaigbcp2Given = TRUE; break; case B4SOI_MOD_WBIGBCP2 : mod->B4SOIwbigbcp2 = value->rValue; mod->B4SOIwbigbcp2Given = TRUE; break; case B4SOI_MOD_WCIGBCP2 : mod->B4SOIwcigbcp2 = value->rValue; mod->B4SOIwcigbcp2Given = TRUE; break; case B4SOI_MOD_WNDIF : mod->B4SOIwndif = value->rValue; mod->B4SOIwndifGiven = TRUE; break; case B4SOI_MOD_WNTRECF : mod->B4SOIwntrecf = value->rValue; mod->B4SOIwntrecfGiven = TRUE; break; case B4SOI_MOD_WNTRECR : mod->B4SOIwntrecr = value->rValue; mod->B4SOIwntrecrGiven = TRUE; break; case B4SOI_MOD_WXBJT : mod->B4SOIwxbjt = value->rValue; mod->B4SOIwxbjtGiven = TRUE; break; case B4SOI_MOD_WXDIFS : mod->B4SOIwxdif = value->rValue; mod->B4SOIwxdifGiven = TRUE; break; case B4SOI_MOD_WXRECS : mod->B4SOIwxrec = value->rValue; mod->B4SOIwxrecGiven = TRUE; break; case B4SOI_MOD_WXTUNS : mod->B4SOIwxtun = value->rValue; mod->B4SOIwxtunGiven = TRUE; break; case B4SOI_MOD_WXDIFD : mod->B4SOIwxdifd = value->rValue; mod->B4SOIwxdifdGiven = TRUE; break; case B4SOI_MOD_WXRECD : mod->B4SOIwxrecd = value->rValue; mod->B4SOIwxrecdGiven = TRUE; break; case B4SOI_MOD_WXTUND : mod->B4SOIwxtund = value->rValue; mod->B4SOIwxtundGiven = TRUE; break; case B4SOI_MOD_WCGDL : mod->B4SOIwcgdl = value->rValue; mod->B4SOIwcgdlGiven = TRUE; break; case B4SOI_MOD_WCGSL : mod->B4SOIwcgsl = value->rValue; mod->B4SOIwcgslGiven = TRUE; break; case B4SOI_MOD_WCKAPPA : mod->B4SOIwckappa = value->rValue; mod->B4SOIwckappaGiven = TRUE; break; case B4SOI_MOD_WUTE : mod->B4SOIwute = value->rValue; mod->B4SOIwuteGiven = TRUE; break; case B4SOI_MOD_WKT1 : mod->B4SOIwkt1 = value->rValue; mod->B4SOIwkt1Given = TRUE; break; case B4SOI_MOD_WKT2 : mod->B4SOIwkt2 = value->rValue; mod->B4SOIwkt2Given = TRUE; break; case B4SOI_MOD_WKT1L : mod->B4SOIwkt1l = value->rValue; mod->B4SOIwkt1lGiven = TRUE; break; case B4SOI_MOD_WUA1 : mod->B4SOIwua1 = value->rValue; mod->B4SOIwua1Given = TRUE; break; case B4SOI_MOD_WUB1 : mod->B4SOIwub1 = value->rValue; mod->B4SOIwub1Given = TRUE; break; case B4SOI_MOD_WUC1 : mod->B4SOIwuc1 = value->rValue; mod->B4SOIwuc1Given = TRUE; break; case B4SOI_MOD_WAT : mod->B4SOIwat = value->rValue; mod->B4SOIwatGiven = TRUE; break; case B4SOI_MOD_WPRT : mod->B4SOIwprt = value->rValue; mod->B4SOIwprtGiven = TRUE; break; /* v3.0 */ case B4SOI_MOD_WAIGC : mod->B4SOIwaigc = value->rValue; mod->B4SOIwaigcGiven = TRUE; break; case B4SOI_MOD_WBIGC : mod->B4SOIwbigc = value->rValue; mod->B4SOIwbigcGiven = TRUE; break; case B4SOI_MOD_WCIGC : mod->B4SOIwcigc = value->rValue; mod->B4SOIwcigcGiven = TRUE; break; case B4SOI_MOD_WAIGSD : mod->B4SOIwaigsd = value->rValue; mod->B4SOIwaigsdGiven = TRUE; break; case B4SOI_MOD_WBIGSD : mod->B4SOIwbigsd = value->rValue; mod->B4SOIwbigsdGiven = TRUE; break; case B4SOI_MOD_WCIGSD : mod->B4SOIwcigsd = value->rValue; mod->B4SOIwcigsdGiven = TRUE; break; case B4SOI_MOD_WNIGC : mod->B4SOIwnigc = value->rValue; mod->B4SOIwnigcGiven = TRUE; break; case B4SOI_MOD_WPIGCD : mod->B4SOIwpigcd = value->rValue; mod->B4SOIwpigcdGiven = TRUE; break; case B4SOI_MOD_WPOXEDGE : mod->B4SOIwpoxedge = value->rValue; mod->B4SOIwpoxedgeGiven = TRUE; break; case B4SOI_MOD_WNPEAK: mod->B4SOIwnpeak = value->rValue; mod->B4SOIwnpeakGiven = TRUE; break; case B4SOI_MOD_WNSUB: mod->B4SOIwnsub = value->rValue; mod->B4SOIwnsubGiven = TRUE; break; case B4SOI_MOD_WNGATE: mod->B4SOIwngate = value->rValue; mod->B4SOIwngateGiven = TRUE; break; case B4SOI_MOD_WNSD: mod->B4SOIwnsd = value->rValue; mod->B4SOIwnsdGiven = TRUE; break; case B4SOI_MOD_WVTH0: mod->B4SOIwvth0 = value->rValue; mod->B4SOIwvth0Given = TRUE; break; case B4SOI_MOD_WVFB: mod->B4SOIwvfb = value->rValue; mod->B4SOIwvfbGiven = TRUE; break; /* v4.1 */ case B4SOI_MOD_WK1: mod->B4SOIwk1 = value->rValue; mod->B4SOIwk1Given = TRUE; break; case B4SOI_MOD_WK1W1: mod->B4SOIwk1w1 = value->rValue; mod->B4SOIwk1w1Given = TRUE; break; case B4SOI_MOD_WK1W2: mod->B4SOIwk1w2 = value->rValue; mod->B4SOIwk1w2Given = TRUE; break; case B4SOI_MOD_WK2: mod->B4SOIwk2 = value->rValue; mod->B4SOIwk2Given = TRUE; break; case B4SOI_MOD_WK3: mod->B4SOIwk3 = value->rValue; mod->B4SOIwk3Given = TRUE; break; case B4SOI_MOD_WK3B: mod->B4SOIwk3b = value->rValue; mod->B4SOIwk3bGiven = TRUE; break; case B4SOI_MOD_WKB1 : mod->B4SOIwkb1 = value->rValue; mod->B4SOIwkb1Given = TRUE; break; case B4SOI_MOD_WW0: mod->B4SOIww0 = value->rValue; mod->B4SOIww0Given = TRUE; break; case B4SOI_MOD_WLPE0: mod->B4SOIwlpe0 = value->rValue; mod->B4SOIwlpe0Given = TRUE; break; case B4SOI_MOD_WLPEB: /* v4.0 for Vth */ mod->B4SOIwlpeb = value->rValue; mod->B4SOIwlpebGiven = TRUE; break; case B4SOI_MOD_WDVT0: mod->B4SOIwdvt0 = value->rValue; mod->B4SOIwdvt0Given = TRUE; break; case B4SOI_MOD_WDVT1: mod->B4SOIwdvt1 = value->rValue; mod->B4SOIwdvt1Given = TRUE; break; case B4SOI_MOD_WDVT2: mod->B4SOIwdvt2 = value->rValue; mod->B4SOIwdvt2Given = TRUE; break; case B4SOI_MOD_WDVT0W: mod->B4SOIwdvt0w = value->rValue; mod->B4SOIwdvt0wGiven = TRUE; break; case B4SOI_MOD_WDVT1W: mod->B4SOIwdvt1w = value->rValue; mod->B4SOIwdvt1wGiven = TRUE; break; case B4SOI_MOD_WDVT2W: mod->B4SOIwdvt2w = value->rValue; mod->B4SOIwdvt2wGiven = TRUE; break; case B4SOI_MOD_WU0 : mod->B4SOIwu0 = value->rValue; mod->B4SOIwu0Given = TRUE; break; case B4SOI_MOD_WUA: mod->B4SOIwua = value->rValue; mod->B4SOIwuaGiven = TRUE; break; case B4SOI_MOD_WUB: mod->B4SOIwub = value->rValue; mod->B4SOIwubGiven = TRUE; break; case B4SOI_MOD_WUC: mod->B4SOIwuc = value->rValue; mod->B4SOIwucGiven = TRUE; break; case B4SOI_MOD_WVSAT: mod->B4SOIwvsat = value->rValue; mod->B4SOIwvsatGiven = TRUE; break; case B4SOI_MOD_WA0: mod->B4SOIwa0 = value->rValue; mod->B4SOIwa0Given = TRUE; break; case B4SOI_MOD_WAGS: mod->B4SOIwags= value->rValue; mod->B4SOIwagsGiven = TRUE; break; case B4SOI_MOD_WB0 : mod->B4SOIwb0 = value->rValue; mod->B4SOIwb0Given = TRUE; break; case B4SOI_MOD_WB1 : mod->B4SOIwb1 = value->rValue; mod->B4SOIwb1Given = TRUE; break; case B4SOI_MOD_WKETA: mod->B4SOIwketa = value->rValue; mod->B4SOIwketaGiven = TRUE; break; case B4SOI_MOD_WKETAS: mod->B4SOIwketas = value->rValue; mod->B4SOIwketasGiven = TRUE; break; case B4SOI_MOD_WA1: mod->B4SOIwa1 = value->rValue; mod->B4SOIwa1Given = TRUE; break; case B4SOI_MOD_WA2: mod->B4SOIwa2 = value->rValue; mod->B4SOIwa2Given = TRUE; break; case B4SOI_MOD_WRDSW: mod->B4SOIwrdsw = value->rValue; mod->B4SOIwrdswGiven = TRUE; break; case B4SOI_MOD_WRSW: mod->B4SOIwrsw = value->rValue; mod->B4SOIwrswGiven = TRUE; break; case B4SOI_MOD_WRDW: mod->B4SOIwrdw = value->rValue; mod->B4SOIwrdwGiven = TRUE; break; case B4SOI_MOD_WPRWB: mod->B4SOIwprwb = value->rValue; mod->B4SOIwprwbGiven = TRUE; break; case B4SOI_MOD_WPRWG: mod->B4SOIwprwg = value->rValue; mod->B4SOIwprwgGiven = TRUE; break; case B4SOI_MOD_WWR : mod->B4SOIwwr = value->rValue; mod->B4SOIwwrGiven = TRUE; break; case B4SOI_MOD_WNFACTOR : mod->B4SOIwnfactor = value->rValue; mod->B4SOIwnfactorGiven = TRUE; break; case B4SOI_MOD_WDWG : mod->B4SOIwdwg = value->rValue; mod->B4SOIwdwgGiven = TRUE; break; case B4SOI_MOD_WDWB : mod->B4SOIwdwb = value->rValue; mod->B4SOIwdwbGiven = TRUE; break; case B4SOI_MOD_WVOFF: mod->B4SOIwvoff = value->rValue; mod->B4SOIwvoffGiven = TRUE; break; case B4SOI_MOD_WETA0: mod->B4SOIweta0 = value->rValue; mod->B4SOIweta0Given = TRUE; break; case B4SOI_MOD_WETAB: mod->B4SOIwetab = value->rValue; mod->B4SOIwetabGiven = TRUE; break; case B4SOI_MOD_WDSUB: mod->B4SOIwdsub = value->rValue; mod->B4SOIwdsubGiven = TRUE; break; case B4SOI_MOD_WCIT : mod->B4SOIwcit = value->rValue; mod->B4SOIwcitGiven = TRUE; break; case B4SOI_MOD_WCDSC : mod->B4SOIwcdsc = value->rValue; mod->B4SOIwcdscGiven = TRUE; break; case B4SOI_MOD_WCDSCB : mod->B4SOIwcdscb = value->rValue; mod->B4SOIwcdscbGiven = TRUE; break; case B4SOI_MOD_WCDSCD : mod->B4SOIwcdscd = value->rValue; mod->B4SOIwcdscdGiven = TRUE; break; case B4SOI_MOD_WPCLM: mod->B4SOIwpclm = value->rValue; mod->B4SOIwpclmGiven = TRUE; break; case B4SOI_MOD_WPDIBL1: mod->B4SOIwpdibl1 = value->rValue; mod->B4SOIwpdibl1Given = TRUE; break; case B4SOI_MOD_WPDIBL2: mod->B4SOIwpdibl2 = value->rValue; mod->B4SOIwpdibl2Given = TRUE; break; case B4SOI_MOD_WPDIBLB: mod->B4SOIwpdiblb = value->rValue; mod->B4SOIwpdiblbGiven = TRUE; break; case B4SOI_MOD_WDROUT: mod->B4SOIwdrout = value->rValue; mod->B4SOIwdroutGiven = TRUE; break; case B4SOI_MOD_WPVAG: mod->B4SOIwpvag = value->rValue; mod->B4SOIwpvagGiven = TRUE; break; case B4SOI_MOD_WDELTA : mod->B4SOIwdelta = value->rValue; mod->B4SOIwdeltaGiven = TRUE; break; case B4SOI_MOD_WALPHA0 : mod->B4SOIwalpha0 = value->rValue; mod->B4SOIwalpha0Given = TRUE; break; case B4SOI_MOD_WFBJTII : mod->B4SOIwfbjtii = value->rValue; mod->B4SOIwfbjtiiGiven = TRUE; break; /*4.1 Iii model*/ case B4SOI_MOD_WEBJTII : mod->B4SOIwebjtii = value->rValue; mod->B4SOIwebjtiiGiven = TRUE; break; case B4SOI_MOD_WCBJTII : mod->B4SOIwcbjtii = value->rValue; mod->B4SOIwcbjtiiGiven = TRUE; break; case B4SOI_MOD_WVBCI : mod->B4SOIwvbci = value->rValue; mod->B4SOIwvbciGiven = TRUE; break; case B4SOI_MOD_WABJTII : mod->B4SOIwabjtii = value->rValue; mod->B4SOIwabjtiiGiven = TRUE; break; case B4SOI_MOD_WMBJTII : mod->B4SOIwmbjtii = value->rValue; mod->B4SOIwmbjtiiGiven = TRUE; break; case B4SOI_MOD_WBETA0 : mod->B4SOIwbeta0 = value->rValue; mod->B4SOIwbeta0Given = TRUE; break; case B4SOI_MOD_WBETA1 : mod->B4SOIwbeta1 = value->rValue; mod->B4SOIwbeta1Given = TRUE; break; case B4SOI_MOD_WBETA2 : mod->B4SOIwbeta2 = value->rValue; mod->B4SOIwbeta2Given = TRUE; break; case B4SOI_MOD_WVDSATII0 : mod->B4SOIwvdsatii0 = value->rValue; mod->B4SOIwvdsatii0Given = TRUE; break; case B4SOI_MOD_WLII : mod->B4SOIwlii = value->rValue; mod->B4SOIwliiGiven = TRUE; break; case B4SOI_MOD_WESATII : mod->B4SOIwesatii = value->rValue; mod->B4SOIwesatiiGiven = TRUE; break; case B4SOI_MOD_WSII0 : mod->B4SOIwsii0 = value->rValue; mod->B4SOIwsii0Given = TRUE; break; case B4SOI_MOD_WSII1 : mod->B4SOIwsii1 = value->rValue; mod->B4SOIwsii1Given = TRUE; break; case B4SOI_MOD_WSII2 : mod->B4SOIwsii2 = value->rValue; mod->B4SOIwsii2Given = TRUE; break; case B4SOI_MOD_WSIID : mod->B4SOIwsiid = value->rValue; mod->B4SOIwsiidGiven = TRUE; break; case B4SOI_MOD_WAGIDL : mod->B4SOIwagidl = value->rValue; mod->B4SOIwagidlGiven = TRUE; break; case B4SOI_MOD_WBGIDL : mod->B4SOIwbgidl = value->rValue; mod->B4SOIwbgidlGiven = TRUE; break; case B4SOI_MOD_WCGIDL : mod->B4SOIwcgidl = value->rValue; mod->B4SOIwcgidlGiven = TRUE; break; case B4SOI_MOD_WEGIDL : mod->B4SOIwegidl = value->rValue; mod->B4SOIwegidlGiven = TRUE; break; case B4SOI_MOD_WRGIDL : mod->B4SOIwrgidl = value->rValue; mod->B4SOIwrgidlGiven = TRUE; break; case B4SOI_MOD_WKGIDL : mod->B4SOIwkgidl = value->rValue; mod->B4SOIwkgidlGiven = TRUE; break; case B4SOI_MOD_WFGIDL : mod->B4SOIwfgidl = value->rValue; mod->B4SOIwfgidlGiven = TRUE; break; case B4SOI_MOD_WAGISL : mod->B4SOIwagisl = value->rValue; mod->B4SOIwagislGiven = TRUE; break; case B4SOI_MOD_WBGISL : mod->B4SOIwbgisl = value->rValue; mod->B4SOIwbgislGiven = TRUE; break; case B4SOI_MOD_WCGISL : mod->B4SOIwcgisl = value->rValue; mod->B4SOIwcgislGiven = TRUE; break; case B4SOI_MOD_WEGISL : mod->B4SOIwegisl = value->rValue; mod->B4SOIwegislGiven = TRUE; break; case B4SOI_MOD_WRGISL : mod->B4SOIwrgisl = value->rValue; mod->B4SOIwrgislGiven = TRUE; break; case B4SOI_MOD_WKGISL : mod->B4SOIwkgisl = value->rValue; mod->B4SOIwkgislGiven = TRUE; break; case B4SOI_MOD_WFGISL : mod->B4SOIwfgisl = value->rValue; mod->B4SOIwfgislGiven = TRUE; break; case B4SOI_MOD_WNTUNS : /* v4.0 */ mod->B4SOIwntun = value->rValue; mod->B4SOIwntunGiven = TRUE; break; case B4SOI_MOD_WNTUND : /* v4.0 */ mod->B4SOIwntund = value->rValue; mod->B4SOIwntundGiven = TRUE; break; case B4SOI_MOD_WNDIODES : /* v4.0 */ mod->B4SOIwndiode = value->rValue; mod->B4SOIwndiodeGiven = TRUE; break; case B4SOI_MOD_WNDIODED : /* v4.0 */ mod->B4SOIwndioded = value->rValue; mod->B4SOIwndiodedGiven = TRUE; break; case B4SOI_MOD_WNRECF0S : /* v4.0 */ mod->B4SOIwnrecf0 = value->rValue; mod->B4SOIwnrecf0Given = TRUE; break; case B4SOI_MOD_WNRECF0D : /* v4.0 */ mod->B4SOIwnrecf0d = value->rValue; mod->B4SOIwnrecf0dGiven = TRUE; break; case B4SOI_MOD_WNRECR0S : /* v4.0 */ mod->B4SOIwnrecr0 = value->rValue; mod->B4SOIwnrecr0Given = TRUE; break; case B4SOI_MOD_WNRECR0D : /* v4.0 */ mod->B4SOIwnrecr0d = value->rValue; mod->B4SOIwnrecr0dGiven = TRUE; break; case B4SOI_MOD_WISBJT : mod->B4SOIwisbjt = value->rValue; mod->B4SOIwisbjtGiven = TRUE; break; case B4SOI_MOD_WIDBJT : /* v4.0 */ mod->B4SOIwidbjt = value->rValue; mod->B4SOIwidbjtGiven = TRUE; break; case B4SOI_MOD_WISDIF : mod->B4SOIwisdif = value->rValue; mod->B4SOIwisdifGiven = TRUE; break; case B4SOI_MOD_WIDDIF : /* v4.0 */ mod->B4SOIwiddif = value->rValue; mod->B4SOIwiddifGiven = TRUE; break; case B4SOI_MOD_WISREC : mod->B4SOIwisrec = value->rValue; mod->B4SOIwisrecGiven = TRUE; break; case B4SOI_MOD_WIDREC : /* v4.0 */ mod->B4SOIwidrec = value->rValue; mod->B4SOIwidrecGiven = TRUE; break; case B4SOI_MOD_WISTUN : mod->B4SOIwistun = value->rValue; mod->B4SOIwistunGiven = TRUE; break; case B4SOI_MOD_WIDTUN : /* v4.0 */ mod->B4SOIwidtun = value->rValue; mod->B4SOIwidtunGiven = TRUE; break; case B4SOI_MOD_WVREC0S : /* v4.0 */ mod->B4SOIwvrec0 = value->rValue; mod->B4SOIwvrec0Given = TRUE; break; case B4SOI_MOD_WVREC0D : /* v4.0 */ mod->B4SOIwvrec0d = value->rValue; mod->B4SOIwvrec0dGiven = TRUE; break; case B4SOI_MOD_WVTUN0S : /* v4.0 */ mod->B4SOIwvtun0 = value->rValue; mod->B4SOIwvtun0Given = TRUE; break; case B4SOI_MOD_WVTUN0D : /* v4.0 */ mod->B4SOIwvtun0d = value->rValue; mod->B4SOIwvtun0dGiven = TRUE; break; case B4SOI_MOD_WNBJT : mod->B4SOIwnbjt = value->rValue; mod->B4SOIwnbjtGiven = TRUE; break; case B4SOI_MOD_WLBJT0 : mod->B4SOIwlbjt0 = value->rValue; mod->B4SOIwlbjt0Given = TRUE; break; case B4SOI_MOD_WVABJT : mod->B4SOIwvabjt = value->rValue; mod->B4SOIwvabjtGiven = TRUE; break; case B4SOI_MOD_WAELY : mod->B4SOIwaely = value->rValue; mod->B4SOIwaelyGiven = TRUE; break; case B4SOI_MOD_WAHLIS : /* v4.0 */ mod->B4SOIwahli = value->rValue; mod->B4SOIwahliGiven = TRUE; break; case B4SOI_MOD_WAHLID : /* v4.0 */ mod->B4SOIwahlid = value->rValue; mod->B4SOIwahlidGiven = TRUE; break; /* v3.1 for RF */ case B4SOI_MOD_WXRCRG1 : mod->B4SOIwxrcrg1 = value->rValue; mod->B4SOIwxrcrg1Given = TRUE; break; case B4SOI_MOD_WXRCRG2 : mod->B4SOIwxrcrg2 = value->rValue; mod->B4SOIwxrcrg2Given = TRUE; break; /* v3.1 for RF end */ /* CV Model */ case B4SOI_MOD_WVSDFB : mod->B4SOIwvsdfb = value->rValue; mod->B4SOIwvsdfbGiven = TRUE; break; case B4SOI_MOD_WVSDTH : mod->B4SOIwvsdth = value->rValue; mod->B4SOIwvsdthGiven = TRUE; break; case B4SOI_MOD_WDELVT : mod->B4SOIwdelvt = value->rValue; mod->B4SOIwdelvtGiven = TRUE; break; case B4SOI_MOD_WACDE : mod->B4SOIwacde = value->rValue; mod->B4SOIwacdeGiven = TRUE; break; case B4SOI_MOD_WMOIN : mod->B4SOIwmoin = value->rValue; mod->B4SOIwmoinGiven = TRUE; break; case B4SOI_MOD_WNOFF : mod->B4SOIwnoff = value->rValue; mod->B4SOIwnoffGiven = TRUE; break; /* v3.2 */ /* Cross-term Dependence */ /* v3.1 */ case B4SOI_MOD_PXJ : mod->B4SOIpxj = value->rValue; mod->B4SOIpxjGiven = TRUE; break; case B4SOI_MOD_PALPHAGB1 : mod->B4SOIpalphaGB1 = value->rValue; mod->B4SOIpalphaGB1Given = TRUE; break; case B4SOI_MOD_PALPHAGB2 : mod->B4SOIpalphaGB2 = value->rValue; mod->B4SOIpalphaGB2Given = TRUE; break; case B4SOI_MOD_PBETAGB1 : mod->B4SOIpbetaGB1 = value->rValue; mod->B4SOIpbetaGB1Given = TRUE; break; case B4SOI_MOD_PBETAGB2 : mod->B4SOIpbetaGB2 = value->rValue; mod->B4SOIpbetaGB2Given = TRUE; break; case B4SOI_MOD_PAIGBCP2 : mod->B4SOIpaigbcp2 = value->rValue; mod->B4SOIpaigbcp2Given = TRUE; break; case B4SOI_MOD_PBIGBCP2 : mod->B4SOIpbigbcp2 = value->rValue; mod->B4SOIpbigbcp2Given = TRUE; break; case B4SOI_MOD_PCIGBCP2 : mod->B4SOIpcigbcp2 = value->rValue; mod->B4SOIpcigbcp2Given = TRUE; break; case B4SOI_MOD_PNDIF : mod->B4SOIpndif = value->rValue; mod->B4SOIpndifGiven = TRUE; break; case B4SOI_MOD_PNTRECF : mod->B4SOIpntrecf = value->rValue; mod->B4SOIpntrecfGiven = TRUE; break; case B4SOI_MOD_PNTRECR : mod->B4SOIpntrecr = value->rValue; mod->B4SOIpntrecrGiven = TRUE; break; case B4SOI_MOD_PXBJT : mod->B4SOIpxbjt = value->rValue; mod->B4SOIpxbjtGiven = TRUE; break; case B4SOI_MOD_PXDIFS : mod->B4SOIpxdif = value->rValue; mod->B4SOIpxdifGiven = TRUE; break; case B4SOI_MOD_PXRECS : mod->B4SOIpxrec = value->rValue; mod->B4SOIpxrecGiven = TRUE; break; case B4SOI_MOD_PXTUNS : mod->B4SOIpxtun = value->rValue; mod->B4SOIpxtunGiven = TRUE; break; case B4SOI_MOD_PXDIFD : mod->B4SOIpxdifd = value->rValue; mod->B4SOIpxdifdGiven = TRUE; break; case B4SOI_MOD_PXRECD : mod->B4SOIpxrecd = value->rValue; mod->B4SOIpxrecdGiven = TRUE; break; case B4SOI_MOD_PXTUND : mod->B4SOIpxtund = value->rValue; mod->B4SOIpxtundGiven = TRUE; break; case B4SOI_MOD_PCGDL : mod->B4SOIpcgdl = value->rValue; mod->B4SOIpcgdlGiven = TRUE; break; case B4SOI_MOD_PCGSL : mod->B4SOIpcgsl = value->rValue; mod->B4SOIpcgslGiven = TRUE; break; case B4SOI_MOD_PCKAPPA : mod->B4SOIpckappa = value->rValue; mod->B4SOIpckappaGiven = TRUE; break; case B4SOI_MOD_PUTE : mod->B4SOIpute = value->rValue; mod->B4SOIputeGiven = TRUE; break; case B4SOI_MOD_PKT1 : mod->B4SOIpkt1 = value->rValue; mod->B4SOIpkt1Given = TRUE; break; case B4SOI_MOD_PKT2 : mod->B4SOIpkt2 = value->rValue; mod->B4SOIpkt2Given = TRUE; break; case B4SOI_MOD_PKT1L : mod->B4SOIpkt1l = value->rValue; mod->B4SOIpkt1lGiven = TRUE; break; case B4SOI_MOD_PUA1 : mod->B4SOIpua1 = value->rValue; mod->B4SOIpua1Given = TRUE; break; case B4SOI_MOD_PUB1 : mod->B4SOIpub1 = value->rValue; mod->B4SOIpub1Given = TRUE; break; case B4SOI_MOD_PUC1 : mod->B4SOIpuc1 = value->rValue; mod->B4SOIpuc1Given = TRUE; break; case B4SOI_MOD_PAT : mod->B4SOIpat = value->rValue; mod->B4SOIpatGiven = TRUE; break; case B4SOI_MOD_PPRT : mod->B4SOIpprt = value->rValue; mod->B4SOIpprtGiven = TRUE; break; /* v3.0 */ case B4SOI_MOD_PAIGC : mod->B4SOIpaigc = value->rValue; mod->B4SOIpaigcGiven = TRUE; break; case B4SOI_MOD_PBIGC : mod->B4SOIpbigc = value->rValue; mod->B4SOIpbigcGiven = TRUE; break; case B4SOI_MOD_PCIGC : mod->B4SOIpcigc = value->rValue; mod->B4SOIpcigcGiven = TRUE; break; case B4SOI_MOD_PAIGSD : mod->B4SOIpaigsd = value->rValue; mod->B4SOIpaigsdGiven = TRUE; break; case B4SOI_MOD_PBIGSD : mod->B4SOIpbigsd = value->rValue; mod->B4SOIpbigsdGiven = TRUE; break; case B4SOI_MOD_PCIGSD : mod->B4SOIpcigsd = value->rValue; mod->B4SOIpcigsdGiven = TRUE; break; case B4SOI_MOD_PNIGC : mod->B4SOIpnigc = value->rValue; mod->B4SOIpnigcGiven = TRUE; break; case B4SOI_MOD_PPIGCD : mod->B4SOIppigcd = value->rValue; mod->B4SOIppigcdGiven = TRUE; break; case B4SOI_MOD_PPOXEDGE : mod->B4SOIppoxedge = value->rValue; mod->B4SOIppoxedgeGiven = TRUE; break; case B4SOI_MOD_PNPEAK: mod->B4SOIpnpeak = value->rValue; mod->B4SOIpnpeakGiven = TRUE; break; case B4SOI_MOD_PNSUB: mod->B4SOIpnsub = value->rValue; mod->B4SOIpnsubGiven = TRUE; break; case B4SOI_MOD_PNGATE: mod->B4SOIpngate = value->rValue; mod->B4SOIpngateGiven = TRUE; break; case B4SOI_MOD_PNSD: mod->B4SOIpnsd = value->rValue; mod->B4SOIpnsdGiven = TRUE; break; case B4SOI_MOD_PVTH0: mod->B4SOIpvth0 = value->rValue; mod->B4SOIpvth0Given = TRUE; break; case B4SOI_MOD_PVFB: mod->B4SOIpvfb = value->rValue; mod->B4SOIpvfbGiven = TRUE; break; /* v4.1 */ case B4SOI_MOD_PK1: mod->B4SOIpk1 = value->rValue; mod->B4SOIpk1Given = TRUE; break; case B4SOI_MOD_PK1W1: mod->B4SOIpk1w1 = value->rValue; mod->B4SOIpk1w1Given = TRUE; break; case B4SOI_MOD_PK1W2: mod->B4SOIpk1w2 = value->rValue; mod->B4SOIpk1w2Given = TRUE; break; case B4SOI_MOD_PK2: mod->B4SOIpk2 = value->rValue; mod->B4SOIpk2Given = TRUE; break; case B4SOI_MOD_PK3: mod->B4SOIpk3 = value->rValue; mod->B4SOIpk3Given = TRUE; break; case B4SOI_MOD_PK3B: mod->B4SOIpk3b = value->rValue; mod->B4SOIpk3bGiven = TRUE; break; case B4SOI_MOD_PKB1 : mod->B4SOIpkb1 = value->rValue; mod->B4SOIpkb1Given = TRUE; break; case B4SOI_MOD_PW0: mod->B4SOIpw0 = value->rValue; mod->B4SOIpw0Given = TRUE; break; case B4SOI_MOD_PLPE0: mod->B4SOIplpe0 = value->rValue; mod->B4SOIplpe0Given = TRUE; break; case B4SOI_MOD_PLPEB: /* v4.0 for Vth */ mod->B4SOIplpeb = value->rValue; mod->B4SOIplpebGiven = TRUE; break; case B4SOI_MOD_PDVT0: mod->B4SOIpdvt0 = value->rValue; mod->B4SOIpdvt0Given = TRUE; break; case B4SOI_MOD_PDVT1: mod->B4SOIpdvt1 = value->rValue; mod->B4SOIpdvt1Given = TRUE; break; case B4SOI_MOD_PDVT2: mod->B4SOIpdvt2 = value->rValue; mod->B4SOIpdvt2Given = TRUE; break; case B4SOI_MOD_PDVT0W: mod->B4SOIpdvt0w = value->rValue; mod->B4SOIpdvt0wGiven = TRUE; break; case B4SOI_MOD_PDVT1W: mod->B4SOIpdvt1w = value->rValue; mod->B4SOIpdvt1wGiven = TRUE; break; case B4SOI_MOD_PDVT2W: mod->B4SOIpdvt2w = value->rValue; mod->B4SOIpdvt2wGiven = TRUE; break; case B4SOI_MOD_PU0 : mod->B4SOIpu0 = value->rValue; mod->B4SOIpu0Given = TRUE; break; case B4SOI_MOD_PUA: mod->B4SOIpua = value->rValue; mod->B4SOIpuaGiven = TRUE; break; case B4SOI_MOD_PUB: mod->B4SOIpub = value->rValue; mod->B4SOIpubGiven = TRUE; break; case B4SOI_MOD_PUC: mod->B4SOIpuc = value->rValue; mod->B4SOIpucGiven = TRUE; break; case B4SOI_MOD_PVSAT: mod->B4SOIpvsat = value->rValue; mod->B4SOIpvsatGiven = TRUE; break; case B4SOI_MOD_PA0: mod->B4SOIpa0 = value->rValue; mod->B4SOIpa0Given = TRUE; break; case B4SOI_MOD_PAGS: mod->B4SOIpags= value->rValue; mod->B4SOIpagsGiven = TRUE; break; case B4SOI_MOD_PB0 : mod->B4SOIpb0 = value->rValue; mod->B4SOIpb0Given = TRUE; break; case B4SOI_MOD_PB1 : mod->B4SOIpb1 = value->rValue; mod->B4SOIpb1Given = TRUE; break; case B4SOI_MOD_PKETA: mod->B4SOIpketa = value->rValue; mod->B4SOIpketaGiven = TRUE; break; case B4SOI_MOD_PKETAS: mod->B4SOIpketas = value->rValue; mod->B4SOIpketasGiven = TRUE; break; case B4SOI_MOD_PA1: mod->B4SOIpa1 = value->rValue; mod->B4SOIpa1Given = TRUE; break; case B4SOI_MOD_PA2: mod->B4SOIpa2 = value->rValue; mod->B4SOIpa2Given = TRUE; break; case B4SOI_MOD_PRDSW: mod->B4SOIprdsw = value->rValue; mod->B4SOIprdswGiven = TRUE; break; case B4SOI_MOD_PRSW: mod->B4SOIprsw = value->rValue; mod->B4SOIprswGiven = TRUE; break; case B4SOI_MOD_PRDW: mod->B4SOIprdw = value->rValue; mod->B4SOIprdwGiven = TRUE; break; case B4SOI_MOD_PPRWB: mod->B4SOIpprwb = value->rValue; mod->B4SOIpprwbGiven = TRUE; break; case B4SOI_MOD_PPRWG: mod->B4SOIpprwg = value->rValue; mod->B4SOIpprwgGiven = TRUE; break; case B4SOI_MOD_PWR : mod->B4SOIpwr = value->rValue; mod->B4SOIpwrGiven = TRUE; break; case B4SOI_MOD_PNFACTOR : mod->B4SOIpnfactor = value->rValue; mod->B4SOIpnfactorGiven = TRUE; break; case B4SOI_MOD_PDWG : mod->B4SOIpdwg = value->rValue; mod->B4SOIpdwgGiven = TRUE; break; case B4SOI_MOD_PDWB : mod->B4SOIpdwb = value->rValue; mod->B4SOIpdwbGiven = TRUE; break; case B4SOI_MOD_PVOFF: mod->B4SOIpvoff = value->rValue; mod->B4SOIpvoffGiven = TRUE; break; case B4SOI_MOD_PETA0: mod->B4SOIpeta0 = value->rValue; mod->B4SOIpeta0Given = TRUE; break; case B4SOI_MOD_PETAB: mod->B4SOIpetab = value->rValue; mod->B4SOIpetabGiven = TRUE; break; case B4SOI_MOD_PDSUB: mod->B4SOIpdsub = value->rValue; mod->B4SOIpdsubGiven = TRUE; break; case B4SOI_MOD_PCIT : mod->B4SOIpcit = value->rValue; mod->B4SOIpcitGiven = TRUE; break; case B4SOI_MOD_PCDSC : mod->B4SOIpcdsc = value->rValue; mod->B4SOIpcdscGiven = TRUE; break; case B4SOI_MOD_PCDSCB : mod->B4SOIpcdscb = value->rValue; mod->B4SOIpcdscbGiven = TRUE; break; case B4SOI_MOD_PCDSCD : mod->B4SOIpcdscd = value->rValue; mod->B4SOIpcdscdGiven = TRUE; break; case B4SOI_MOD_PPCLM: mod->B4SOIppclm = value->rValue; mod->B4SOIppclmGiven = TRUE; break; case B4SOI_MOD_PPDIBL1: mod->B4SOIppdibl1 = value->rValue; mod->B4SOIppdibl1Given = TRUE; break; case B4SOI_MOD_PPDIBL2: mod->B4SOIppdibl2 = value->rValue; mod->B4SOIppdibl2Given = TRUE; break; case B4SOI_MOD_PPDIBLB: mod->B4SOIppdiblb = value->rValue; mod->B4SOIppdiblbGiven = TRUE; break; case B4SOI_MOD_PDROUT: mod->B4SOIpdrout = value->rValue; mod->B4SOIpdroutGiven = TRUE; break; case B4SOI_MOD_PPVAG: mod->B4SOIppvag = value->rValue; mod->B4SOIppvagGiven = TRUE; break; case B4SOI_MOD_PDELTA : mod->B4SOIpdelta = value->rValue; mod->B4SOIpdeltaGiven = TRUE; break; case B4SOI_MOD_PALPHA0 : mod->B4SOIpalpha0 = value->rValue; mod->B4SOIpalpha0Given = TRUE; break; case B4SOI_MOD_PFBJTII : mod->B4SOIpfbjtii = value->rValue; mod->B4SOIpfbjtiiGiven = TRUE; break; /*4.1 Iii model*/ case B4SOI_MOD_PEBJTII : mod->B4SOIpebjtii = value->rValue; mod->B4SOIpebjtiiGiven = TRUE; break; case B4SOI_MOD_PCBJTII : mod->B4SOIpcbjtii = value->rValue; mod->B4SOIpcbjtiiGiven = TRUE; break; case B4SOI_MOD_PVBCI : mod->B4SOIpvbci = value->rValue; mod->B4SOIpvbciGiven = TRUE; break; case B4SOI_MOD_PABJTII : mod->B4SOIpabjtii = value->rValue; mod->B4SOIpabjtiiGiven = TRUE; break; case B4SOI_MOD_PMBJTII : mod->B4SOIpmbjtii = value->rValue; mod->B4SOIpmbjtiiGiven = TRUE; break; case B4SOI_MOD_PBETA0 : mod->B4SOIpbeta0 = value->rValue; mod->B4SOIpbeta0Given = TRUE; break; case B4SOI_MOD_PBETA1 : mod->B4SOIpbeta1 = value->rValue; mod->B4SOIpbeta1Given = TRUE; break; case B4SOI_MOD_PBETA2 : mod->B4SOIpbeta2 = value->rValue; mod->B4SOIpbeta2Given = TRUE; break; case B4SOI_MOD_PVDSATII0 : mod->B4SOIpvdsatii0 = value->rValue; mod->B4SOIpvdsatii0Given = TRUE; break; case B4SOI_MOD_PLII : mod->B4SOIplii = value->rValue; mod->B4SOIpliiGiven = TRUE; break; case B4SOI_MOD_PESATII : mod->B4SOIpesatii = value->rValue; mod->B4SOIpesatiiGiven = TRUE; break; case B4SOI_MOD_PSII0 : mod->B4SOIpsii0 = value->rValue; mod->B4SOIpsii0Given = TRUE; break; case B4SOI_MOD_PSII1 : mod->B4SOIpsii1 = value->rValue; mod->B4SOIpsii1Given = TRUE; break; case B4SOI_MOD_PSII2 : mod->B4SOIpsii2 = value->rValue; mod->B4SOIpsii2Given = TRUE; break; case B4SOI_MOD_PSIID : mod->B4SOIpsiid = value->rValue; mod->B4SOIpsiidGiven = TRUE; break; case B4SOI_MOD_PAGIDL : mod->B4SOIpagidl = value->rValue; mod->B4SOIpagidlGiven = TRUE; break; case B4SOI_MOD_PBGIDL : mod->B4SOIpbgidl = value->rValue; mod->B4SOIpbgidlGiven = TRUE; break; case B4SOI_MOD_PCGIDL : mod->B4SOIpcgidl = value->rValue; mod->B4SOIpcgidlGiven = TRUE; break; case B4SOI_MOD_PEGIDL : mod->B4SOIpegidl = value->rValue; mod->B4SOIpegidlGiven = TRUE; break; case B4SOI_MOD_PRGIDL : mod->B4SOIprgidl = value->rValue; mod->B4SOIprgidlGiven = TRUE; break; case B4SOI_MOD_PKGIDL : mod->B4SOIpkgidl = value->rValue; mod->B4SOIpkgidlGiven = TRUE; break; case B4SOI_MOD_PFGIDL : mod->B4SOIpfgidl = value->rValue; mod->B4SOIpfgidlGiven = TRUE; break; case B4SOI_MOD_PAGISL : mod->B4SOIpagisl = value->rValue; mod->B4SOIpagislGiven = TRUE; break; case B4SOI_MOD_PBGISL : mod->B4SOIpbgisl = value->rValue; mod->B4SOIpbgislGiven = TRUE; break; case B4SOI_MOD_PCGISL : mod->B4SOIpcgisl = value->rValue; mod->B4SOIpcgislGiven = TRUE; break; case B4SOI_MOD_PEGISL : mod->B4SOIpegisl = value->rValue; mod->B4SOIpegislGiven = TRUE; break; case B4SOI_MOD_PRGISL : mod->B4SOIprgisl = value->rValue; mod->B4SOIprgislGiven = TRUE; break; case B4SOI_MOD_PKGISL : mod->B4SOIpkgisl = value->rValue; mod->B4SOIpkgislGiven = TRUE; break; case B4SOI_MOD_PFGISL : mod->B4SOIpfgisl = value->rValue; mod->B4SOIpfgislGiven = TRUE; break; case B4SOI_MOD_PNTUNS : /* v4.0 */ mod->B4SOIpntun = value->rValue; mod->B4SOIpntunGiven = TRUE; break; case B4SOI_MOD_PNTUND : /* v4.0 */ mod->B4SOIpntund = value->rValue; mod->B4SOIpntundGiven = TRUE; break; case B4SOI_MOD_PNDIODES : /* v4.0 */ mod->B4SOIpndiode = value->rValue; mod->B4SOIpndiodeGiven = TRUE; break; case B4SOI_MOD_PNDIODED : /* v4.0 */ mod->B4SOIpndioded = value->rValue; mod->B4SOIpndiodedGiven = TRUE; break; case B4SOI_MOD_PNRECF0S : /* v4.0 */ mod->B4SOIpnrecf0 = value->rValue; mod->B4SOIpnrecf0Given = TRUE; break; case B4SOI_MOD_PNRECF0D : /* v4.0 */ mod->B4SOIpnrecf0d = value->rValue; mod->B4SOIpnrecf0dGiven = TRUE; break; case B4SOI_MOD_PNRECR0S : /* v4.0 */ mod->B4SOIpnrecr0 = value->rValue; mod->B4SOIpnrecr0Given = TRUE; break; case B4SOI_MOD_PNRECR0D : /* v4.0 */ mod->B4SOIpnrecr0d = value->rValue; mod->B4SOIpnrecr0dGiven = TRUE; break; case B4SOI_MOD_PISBJT : mod->B4SOIpisbjt = value->rValue; mod->B4SOIpisbjtGiven = TRUE; break; case B4SOI_MOD_PIDBJT : /* v4.0 */ mod->B4SOIpidbjt = value->rValue; mod->B4SOIpidbjtGiven = TRUE; break; case B4SOI_MOD_PISDIF : mod->B4SOIpisdif = value->rValue; mod->B4SOIpisdifGiven = TRUE; break; case B4SOI_MOD_PIDDIF : /* v4.0 */ mod->B4SOIpiddif = value->rValue; mod->B4SOIpiddifGiven = TRUE; break; case B4SOI_MOD_PISREC : mod->B4SOIpisrec = value->rValue; mod->B4SOIpisrecGiven = TRUE; break; case B4SOI_MOD_PIDREC : /* v4.0 */ mod->B4SOIpidrec = value->rValue; mod->B4SOIpidrecGiven = TRUE; break; case B4SOI_MOD_PISTUN : mod->B4SOIpistun = value->rValue; mod->B4SOIpistunGiven = TRUE; break; case B4SOI_MOD_PIDTUN : /* v4.0 */ mod->B4SOIpidtun = value->rValue; mod->B4SOIpidtunGiven = TRUE; break; case B4SOI_MOD_PVREC0S : /* v4.0 */ mod->B4SOIpvrec0 = value->rValue; mod->B4SOIpvrec0Given = TRUE; break; case B4SOI_MOD_PVREC0D : /* v4.0 */ mod->B4SOIpvrec0d = value->rValue; mod->B4SOIpvrec0dGiven = TRUE; break; case B4SOI_MOD_PVTUN0S : /* v4.0 */ mod->B4SOIpvtun0 = value->rValue; mod->B4SOIpvtun0Given = TRUE; break; case B4SOI_MOD_PVTUN0D : /* v4.0 */ mod->B4SOIpvtun0d = value->rValue; mod->B4SOIpvtun0dGiven = TRUE; break; case B4SOI_MOD_PNBJT : mod->B4SOIpnbjt = value->rValue; mod->B4SOIpnbjtGiven = TRUE; break; case B4SOI_MOD_PLBJT0 : mod->B4SOIplbjt0 = value->rValue; mod->B4SOIplbjt0Given = TRUE; break; case B4SOI_MOD_PVABJT : mod->B4SOIpvabjt = value->rValue; mod->B4SOIpvabjtGiven = TRUE; break; case B4SOI_MOD_PAELY : mod->B4SOIpaely = value->rValue; mod->B4SOIpaelyGiven = TRUE; break; case B4SOI_MOD_PAHLIS : /* v4.0 */ mod->B4SOIpahli = value->rValue; mod->B4SOIpahliGiven = TRUE; break; case B4SOI_MOD_PAHLID : /* v4.0 */ mod->B4SOIpahlid = value->rValue; mod->B4SOIpahlidGiven = TRUE; break; /* v3.1 for RF */ case B4SOI_MOD_PXRCRG1 : mod->B4SOIpxrcrg1 = value->rValue; mod->B4SOIpxrcrg1Given = TRUE; break; case B4SOI_MOD_PXRCRG2 : mod->B4SOIpxrcrg2 = value->rValue; mod->B4SOIpxrcrg2Given = TRUE; break; /* v3.1 for RF end */ /* CV Model */ case B4SOI_MOD_PVSDFB : mod->B4SOIpvsdfb = value->rValue; mod->B4SOIpvsdfbGiven = TRUE; break; case B4SOI_MOD_PVSDTH : mod->B4SOIpvsdth = value->rValue; mod->B4SOIpvsdthGiven = TRUE; break; case B4SOI_MOD_PDELVT : mod->B4SOIpdelvt = value->rValue; mod->B4SOIpdelvtGiven = TRUE; break; case B4SOI_MOD_PACDE : mod->B4SOIpacde = value->rValue; mod->B4SOIpacdeGiven = TRUE; break; case B4SOI_MOD_PMOIN : mod->B4SOIpmoin = value->rValue; mod->B4SOIpmoinGiven = TRUE; break; case B4SOI_MOD_PNOFF : mod->B4SOIpnoff = value->rValue; mod->B4SOIpnoffGiven = TRUE; break; /* v3.2 */ /* Added for binning - END */ /* 4.0 backward compatibility */ case B4SOI_MOD_NLX: mod->B4SOInlx = value->rValue; mod->B4SOInlxGiven = TRUE; break; case B4SOI_MOD_LNLX: mod->B4SOIlnlx = value->rValue; mod->B4SOIlnlxGiven = TRUE; break; case B4SOI_MOD_WNLX: mod->B4SOIwnlx = value->rValue; mod->B4SOIwnlxGiven = TRUE; break; case B4SOI_MOD_PNLX: mod->B4SOIpnlx = value->rValue; mod->B4SOIpnlxGiven = TRUE; break; case B4SOI_MOD_NGIDL: mod->B4SOIngidl = value->rValue; mod->B4SOIngidlGiven = TRUE; break; case B4SOI_MOD_LNGIDL: mod->B4SOIlngidl = value->rValue; mod->B4SOIlngidlGiven = TRUE; break; case B4SOI_MOD_WNGIDL: mod->B4SOIwngidl = value->rValue; mod->B4SOIwngidlGiven = TRUE; break; case B4SOI_MOD_PNGIDL: mod->B4SOIpngidl = value->rValue; mod->B4SOIpngidlGiven = TRUE; break; case B4SOI_MOD_VGS_MAX: mod->B4SOIvgsMax = value->rValue; mod->B4SOIvgsMaxGiven = TRUE; break; case B4SOI_MOD_VGD_MAX: mod->B4SOIvgdMax = value->rValue; mod->B4SOIvgdMaxGiven = TRUE; break; case B4SOI_MOD_VGB_MAX: mod->B4SOIvgbMax = value->rValue; mod->B4SOIvgbMaxGiven = TRUE; break; case B4SOI_MOD_VDS_MAX: mod->B4SOIvdsMax = value->rValue; mod->B4SOIvdsMaxGiven = TRUE; break; case B4SOI_MOD_VBS_MAX: mod->B4SOIvbsMax = value->rValue; mod->B4SOIvbsMaxGiven = TRUE; break; case B4SOI_MOD_VBD_MAX: mod->B4SOIvbdMax = value->rValue; mod->B4SOIvbdMaxGiven = TRUE; break; case B4SOI_MOD_NMOS : if(value->iValue) { mod->B4SOItype = 1; mod->B4SOItypeGiven = TRUE; } break; case B4SOI_MOD_PMOS : if(value->iValue) { mod->B4SOItype = - 1; mod->B4SOItypeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsimsoi/b4soiinit.c0000644000265600020320000000414712264261473021757 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "b4soiitf.h" #include "b4soiinit.h" SPICEdev B4SOIinfo = { { "B4SOI", "Berkeley SOI MOSFET model version 4.4.0", &B4SOInSize, &B4SOInSize, B4SOInames, &B4SOIpTSize, B4SOIpTable, &B4SOImPTSize, B4SOImPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ B4SOIparam, /* DEVmodParam */ B4SOImParam, /* DEVload */ B4SOIload, /* DEVsetup */ B4SOIsetup, /* DEVunsetup */ B4SOIunsetup, /* DEVpzSetup */ B4SOIsetup, /* DEVtemperature*/ B4SOItemp, /* DEVtrunc */ B4SOItrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ B4SOIacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ B4SOIdestroy, /* DEVmodDelete */ B4SOImDelete, /* DEVdelete */ B4SOIdelete, /* DEVsetic */ B4SOIgetic, /* DEVask */ B4SOIask, /* DEVmodAsk */ B4SOImAsk, /* DEVpzLoad */ B4SOIpzLoad, /* DEVconvTest */ B4SOIconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ B4SOInoise, /* DEVsoaCheck */ B4SOIsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &B4SOIiSize, /* DEVmodSize */ &B4SOImSize }; SPICEdev * get_b4soi_info (void) { return &B4SOIinfo; } ngspice-26/src/spicelib/devices/bsimsoi/b4soiitf.h0000644000265600020320000000072212264261473021576 0ustar andreasadmin/********** Copyright 2010 Regents of the University of California. All rights reserved. Author: 2005 Hui Wan (based on Samuel Fung's b3soiitf.h) Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. Authors: 2009- Tanvir Morshed, Ali Niknejad, Chenming Hu. Authors: 2010- Tanvir Morshed, Ali Niknejad, Chenming Hu. File: b4soiitf.h **********/ #ifndef DEV_B4SOI #define DEV_B4SOI #include "b4soiext.h" SPICEdev *get_b4soi_info (void); #endif ngspice-26/src/spicelib/devices/bsimsoi/b4soimask.c0000644000265600020320000027266012264261473021756 0ustar andreasadmin/*** B4SOI 12/16/2010 Released by Tanvir Morshed ***/ /********** * Copyright 2010 Regents of the University of California. All rights reserved. * Authors: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang * Authors: 1999-2004 Pin Su, Hui Wan, Wei Jin, b3soimask.c * Authors: 2005- Hui Wan, Xuemei Xi, Ali Niknejad, Chenming Hu. * Authors: 2009- Wenwei Yang, Chung-Hsun Lin, Ali Niknejad, Chenming Hu. * File: b4soimask.c * Modified by Hui Wan, Xuemei Xi 11/30/2005 * Modified by Wenwei Yang, Chung-Hsun Lin, Darsen Lu 03/06/2009 * Modified by Tanvir Morshed 09/22/2009 * Modified by Tanvir Morshed 12/31/2009 * Modified by Tanvir Morshed 12/16/2010 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b4soidef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B4SOImAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B4SOImodel *model = (B4SOImodel *)inst; NG_IGNORE(ckt); switch(which) { case B4SOI_MOD_MOBMOD: value->iValue = model->B4SOImobMod; return(OK); case B4SOI_MOD_PARAMCHK: value->iValue = model->B4SOIparamChk; return(OK); case B4SOI_MOD_BINUNIT: value->iValue = model->B4SOIbinUnit; return(OK); case B4SOI_MOD_CAPMOD: value->iValue = model->B4SOIcapMod; return(OK); case B4SOI_MOD_SHMOD: value->iValue = model->B4SOIshMod; return(OK); /* case B4SOI_MOD_NOIMOD: value->iValue = model->B4SOInoiMod; return(OK); v3.2 */ case B4SOI_MOD_VERSION : value->rValue = model->B4SOIversion; return(OK); case B4SOI_MOD_TOX : value->rValue = model->B4SOItox; return(OK); case B4SOI_MOD_TOXP : value->rValue = model->B4SOItoxp; return(OK); case B4SOI_MOD_LEFFEOT : value->rValue = model->B4SOIleffeot; return(OK); case B4SOI_MOD_WEFFEOT : value->rValue = model->B4SOIweffeot; return(OK); case B4SOI_MOD_VDDEOT : value->rValue = model->B4SOIvddeot; return(OK); case B4SOI_MOD_TEMPEOT : value->rValue = model->B4SOItempeot; return(OK); case B4SOI_MOD_ADOS : value->rValue = model->B4SOIados; return(OK); case B4SOI_MOD_BDOS : value->rValue = model->B4SOIbdos; return(OK); case B4SOI_MOD_EPSRGATE: value->rValue = model->B4SOIepsrgate; return(OK); case B4SOI_MOD_PHIG: value->rValue = model->B4SOIphig; return(OK); case B4SOI_MOD_EASUB: value->rValue = model->B4SOIeasub; return(OK); case B4SOI_MOD_TOXM : value->rValue = model->B4SOItoxm; return(OK); /* v3.2 */ /*4.1*/ case B4SOI_MOD_EOT : value->rValue = model->B4SOIeot; return(OK); case B4SOI_MOD_EPSROX : value->rValue = model->B4SOIepsrox; return(OK); case B4SOI_MOD_EPSRSUB: value->rValue = model->B4SOIepsrsub; return(OK); case B4SOI_MOD_NI0SUB: value->rValue = model->B4SOIni0sub; return(OK); case B4SOI_MOD_BG0SUB: value->rValue = model->B4SOIbg0sub; return(OK); case B4SOI_MOD_TBGASUB: value->rValue = model->B4SOItbgasub; return(OK); case B4SOI_MOD_TBGBSUB: value->rValue = model->B4SOItbgbsub; return(OK); /* v2.2.3 */ case B4SOI_MOD_DTOXCV : value->rValue = model->B4SOIdtoxcv; return(OK); case B4SOI_MOD_CDSC : value->rValue = model->B4SOIcdsc; return(OK); case B4SOI_MOD_CDSCB : value->rValue = model->B4SOIcdscb; return(OK); case B4SOI_MOD_CDSCD : value->rValue = model->B4SOIcdscd; return(OK); case B4SOI_MOD_CIT : value->rValue = model->B4SOIcit; return(OK); case B4SOI_MOD_NFACTOR : value->rValue = model->B4SOInfactor; return(OK); case B4SOI_MOD_VSAT: value->rValue = model->B4SOIvsat; return(OK); case B4SOI_MOD_AT: value->rValue = model->B4SOIat; return(OK); case B4SOI_MOD_A0: value->rValue = model->B4SOIa0; return(OK); case B4SOI_MOD_AGS: value->rValue = model->B4SOIags; return(OK); case B4SOI_MOD_A1: value->rValue = model->B4SOIa1; return(OK); case B4SOI_MOD_A2: value->rValue = model->B4SOIa2; return(OK); case B4SOI_MOD_KETA: value->rValue = model->B4SOIketa; return(OK); case B4SOI_MOD_NSUB: value->rValue = model->B4SOInsub; return(OK); case B4SOI_MOD_NPEAK: value->rValue = model->B4SOInpeak; return(OK); case B4SOI_MOD_NGATE: value->rValue = model->B4SOIngate; return(OK); case B4SOI_MOD_NSD: value->rValue = model->B4SOInsd; return(OK); case B4SOI_MOD_GAMMA1: value->rValue = model->B4SOIgamma1; return(OK); case B4SOI_MOD_GAMMA2: value->rValue = model->B4SOIgamma2; return(OK); case B4SOI_MOD_VBX: value->rValue = model->B4SOIvbx; return(OK); case B4SOI_MOD_VBM: value->rValue = model->B4SOIvbm; return(OK); case B4SOI_MOD_XT: value->rValue = model->B4SOIxt; return(OK); case B4SOI_MOD_K1: value->rValue = model->B4SOIk1; return(OK); case B4SOI_MOD_KT1: value->rValue = model->B4SOIkt1; return(OK); case B4SOI_MOD_KT1L: value->rValue = model->B4SOIkt1l; return(OK); case B4SOI_MOD_KT2 : value->rValue = model->B4SOIkt2; return(OK); case B4SOI_MOD_K2 : value->rValue = model->B4SOIk2; return(OK); case B4SOI_MOD_K3: value->rValue = model->B4SOIk3; return(OK); case B4SOI_MOD_K3B: value->rValue = model->B4SOIk3b; return(OK); case B4SOI_MOD_W0: value->rValue = model->B4SOIw0; return(OK); case B4SOI_MOD_LPE0: value->rValue = model->B4SOIlpe0; return(OK); case B4SOI_MOD_LPEB: /* v4.0 for Vth */ value->rValue = model->B4SOIlpeb; return(OK); case B4SOI_MOD_DVT0 : value->rValue = model->B4SOIdvt0; return(OK); case B4SOI_MOD_DVT1 : value->rValue = model->B4SOIdvt1; return(OK); case B4SOI_MOD_DVT2 : value->rValue = model->B4SOIdvt2; return(OK); case B4SOI_MOD_DVT0W : value->rValue = model->B4SOIdvt0w; return(OK); case B4SOI_MOD_DVT1W : value->rValue = model->B4SOIdvt1w; return(OK); case B4SOI_MOD_DVT2W : value->rValue = model->B4SOIdvt2w; return(OK); case B4SOI_MOD_DROUT : value->rValue = model->B4SOIdrout; return(OK); case B4SOI_MOD_DSUB : value->rValue = model->B4SOIdsub; return(OK); case B4SOI_MOD_VTH0: value->rValue = model->B4SOIvth0; return(OK); case B4SOI_MOD_VFB: value->rValue = model->B4SOIvfb; return(OK); /* v4.1 */ case B4SOI_MOD_UA: value->rValue = model->B4SOIua; return(OK); case B4SOI_MOD_UA1: value->rValue = model->B4SOIua1; return(OK); case B4SOI_MOD_UB: value->rValue = model->B4SOIub; return(OK); case B4SOI_MOD_UB1: value->rValue = model->B4SOIub1; return(OK); case B4SOI_MOD_UC: value->rValue = model->B4SOIuc; return(OK); case B4SOI_MOD_UC1: value->rValue = model->B4SOIuc1; return(OK); case B4SOI_MOD_U0: value->rValue = model->B4SOIu0; return(OK); case B4SOI_MOD_UTE: value->rValue = model->B4SOIute; return(OK); /*4.1 mobmod=4*/ case B4SOI_MOD_UD: value->rValue = model->B4SOIud; return(OK); case B4SOI_MOD_LUD: value->rValue = model->B4SOIlud; return(OK); case B4SOI_MOD_WUD: value->rValue = model->B4SOIwud; return(OK); case B4SOI_MOD_PUD: value->rValue = model->B4SOIpud; return(OK); case B4SOI_MOD_UD1: value->rValue = model->B4SOIud1; return(OK); case B4SOI_MOD_LUD1: value->rValue = model->B4SOIlud1; return(OK); case B4SOI_MOD_WUD1: value->rValue = model->B4SOIwud1; return(OK); case B4SOI_MOD_PUD1: value->rValue = model->B4SOIpud1; return(OK); case B4SOI_MOD_EU: value->rValue = model->B4SOIeu; return(OK); case B4SOI_MOD_LEU: value->rValue = model->B4SOIleu; return(OK); case B4SOI_MOD_WEU: value->rValue = model->B4SOIweu; return(OK); case B4SOI_MOD_PEU: value->rValue = model->B4SOIpeu; return(OK); case B4SOI_MOD_UCS: value->rValue = model->B4SOIucs; return(OK); case B4SOI_MOD_LUCS: value->rValue = model->B4SOIlucs; return(OK); case B4SOI_MOD_WUCS: value->rValue = model->B4SOIwucs; return(OK); case B4SOI_MOD_PUCS: value->rValue = model->B4SOIpucs; return(OK); case B4SOI_MOD_UCSTE: value->rValue = model->B4SOIucste; return(OK); case B4SOI_MOD_LUCSTE: value->rValue = model->B4SOIlucste; return(OK); case B4SOI_MOD_WUCSTE: value->rValue = model->B4SOIwucste; return(OK); case B4SOI_MOD_PUCSTE: value->rValue = model->B4SOIpucste; return(OK); case B4SOI_MOD_VOFF: value->rValue = model->B4SOIvoff; return(OK); case B4SOI_MOD_DELTA: value->rValue = model->B4SOIdelta; return(OK); case B4SOI_MOD_RDSW: value->rValue = model->B4SOIrdsw; return(OK); case B4SOI_MOD_RDWMIN: value->rValue = model->B4SOIrdwmin; return(OK); case B4SOI_MOD_RSWMIN: value->rValue = model->B4SOIrswmin; return(OK); case B4SOI_MOD_RDW: value->rValue = model->B4SOIrdw; return(OK); case B4SOI_MOD_RSW: value->rValue = model->B4SOIrsw; return(OK); case B4SOI_MOD_PRWG: value->rValue = model->B4SOIprwg; return(OK); case B4SOI_MOD_PRWB: value->rValue = model->B4SOIprwb; return(OK); case B4SOI_MOD_PRT: value->rValue = model->B4SOIprt; return(OK); case B4SOI_MOD_ETA0: value->rValue = model->B4SOIeta0; return(OK); case B4SOI_MOD_ETAB: value->rValue = model->B4SOIetab; return(OK); case B4SOI_MOD_PCLM: value->rValue = model->B4SOIpclm; return(OK); case B4SOI_MOD_PDIBL1: value->rValue = model->B4SOIpdibl1; return(OK); case B4SOI_MOD_PDIBL2: value->rValue = model->B4SOIpdibl2; return(OK); case B4SOI_MOD_PDIBLB: value->rValue = model->B4SOIpdiblb; return(OK); case B4SOI_MOD_PVAG: value->rValue = model->B4SOIpvag; return(OK); case B4SOI_MOD_WR: value->rValue = model->B4SOIwr; return(OK); case B4SOI_MOD_DWG: value->rValue = model->B4SOIdwg; return(OK); case B4SOI_MOD_DWB: value->rValue = model->B4SOIdwb; return(OK); case B4SOI_MOD_B0: value->rValue = model->B4SOIb0; return(OK); case B4SOI_MOD_B1: value->rValue = model->B4SOIb1; return(OK); case B4SOI_MOD_ALPHA0: value->rValue = model->B4SOIalpha0; return(OK); case B4SOI_MOD_CGSL: value->rValue = model->B4SOIcgsl; return(OK); case B4SOI_MOD_CGDL: value->rValue = model->B4SOIcgdl; return(OK); case B4SOI_MOD_CKAPPA: value->rValue = model->B4SOIckappa; return(OK); case B4SOI_MOD_CF: value->rValue = model->B4SOIcf; return(OK); case B4SOI_MOD_CLC: value->rValue = model->B4SOIclc; return(OK); case B4SOI_MOD_CLE: value->rValue = model->B4SOIcle; return(OK); case B4SOI_MOD_DWC: value->rValue = model->B4SOIdwc; return(OK); case B4SOI_MOD_DLC: value->rValue = model->B4SOIdlc; return(OK); case B4SOI_MOD_TBOX: value->rValue = model->B4SOItbox; return(OK); case B4SOI_MOD_TSI: value->rValue = model->B4SOItsi; return(OK); case B4SOI_MOD_ETSI: value->rValue = model->B4SOIetsi; return(OK); case B4SOI_MOD_RTH0: value->rValue = model->B4SOIrth0; return(OK); case B4SOI_MOD_CTH0: value->rValue = model->B4SOIcth0; return(OK); case B4SOI_MOD_NDIODES: /* v4.0 */ value->rValue = model->B4SOIndiode; return(OK); case B4SOI_MOD_NDIODED: /* v4.0 */ value->rValue = model->B4SOIndioded; return(OK); case B4SOI_MOD_XBJT: value->rValue = model->B4SOIxbjt; return(OK); case B4SOI_MOD_XDIFS: value->rValue = model->B4SOIxdif; return(OK); case B4SOI_MOD_XRECS: value->rValue = model->B4SOIxrec; return(OK); case B4SOI_MOD_XTUNS: value->rValue = model->B4SOIxtun; return(OK); case B4SOI_MOD_XDIFD: value->rValue = model->B4SOIxdifd; return(OK); case B4SOI_MOD_XRECD: value->rValue = model->B4SOIxrecd; return(OK); case B4SOI_MOD_XTUND: value->rValue = model->B4SOIxtund; return(OK); case B4SOI_MOD_TT: value->rValue = model->B4SOItt; return(OK); case B4SOI_MOD_VSDTH: value->rValue = model->B4SOIvsdth; return(OK); case B4SOI_MOD_VSDFB: value->rValue = model->B4SOIvsdfb; return(OK); case B4SOI_MOD_CSDMIN: value->rValue = model->B4SOIcsdmin; return(OK); case B4SOI_MOD_ASD: value->rValue = model->B4SOIasd; return(OK); case B4SOI_MOD_TNOM : value->rValue = model->B4SOItnom; return(OK); case B4SOI_MOD_CGSO: value->rValue = model->B4SOIcgso; return(OK); case B4SOI_MOD_CGDO: value->rValue = model->B4SOIcgdo; return(OK); case B4SOI_MOD_CGEO: value->rValue = model->B4SOIcgeo; return(OK); case B4SOI_MOD_XPART: value->rValue = model->B4SOIxpart; return(OK); case B4SOI_MOD_RSH: value->rValue = model->B4SOIsheetResistance; return(OK); case B4SOI_MOD_PBSWGS: /* v4.0 */ value->rValue = model->B4SOIGatesidewallJctSPotential; return(OK); case B4SOI_MOD_PBSWGD: /* v4.0 */ value->rValue = model->B4SOIGatesidewallJctDPotential; return(OK); case B4SOI_MOD_MJSWGS: /* v4.0 */ value->rValue = model->B4SOIbodyJctGateSideSGradingCoeff; return(OK); case B4SOI_MOD_MJSWGD: /* v4.0 */ value->rValue = model->B4SOIbodyJctGateSideDGradingCoeff; return(OK); case B4SOI_MOD_CJSWGS: /* v4.0 */ value->rValue = model->B4SOIunitLengthGateSidewallJctCapS; return(OK); case B4SOI_MOD_CJSWGD: /* v4.0 */ value->rValue = model->B4SOIunitLengthGateSidewallJctCapD; return(OK); case B4SOI_MOD_CSDESW: value->rValue = model->B4SOIcsdesw; return(OK); case B4SOI_MOD_LINT: value->rValue = model->B4SOILint; return(OK); case B4SOI_MOD_LL: value->rValue = model->B4SOILl; return(OK); /* v2.2.3 */ case B4SOI_MOD_LLC: value->rValue = model->B4SOILlc; return(OK); case B4SOI_MOD_LLN: value->rValue = model->B4SOILln; return(OK); case B4SOI_MOD_LW: value->rValue = model->B4SOILw; return(OK); /* v2.2.3 */ case B4SOI_MOD_LWC: value->rValue = model->B4SOILwc; return(OK); case B4SOI_MOD_LWN: value->rValue = model->B4SOILwn; return(OK); case B4SOI_MOD_LWL: value->rValue = model->B4SOILwl; return(OK); /* v2.2.3 */ case B4SOI_MOD_LWLC: value->rValue = model->B4SOILwlc; return(OK); case B4SOI_MOD_WINT: value->rValue = model->B4SOIWint; return(OK); case B4SOI_MOD_WL: value->rValue = model->B4SOIWl; return(OK); /* v2.2.3 */ case B4SOI_MOD_WLC: value->rValue = model->B4SOIWlc; return(OK); case B4SOI_MOD_WLN: value->rValue = model->B4SOIWln; return(OK); case B4SOI_MOD_WW: value->rValue = model->B4SOIWw; return(OK); /* v2.2.3 */ case B4SOI_MOD_WWC: value->rValue = model->B4SOIWwc; return(OK); case B4SOI_MOD_WWN: value->rValue = model->B4SOIWwn; return(OK); case B4SOI_MOD_WWL: value->rValue = model->B4SOIWwl; return(OK); /* v2.2.3 */ case B4SOI_MOD_WWLC: value->rValue = model->B4SOIWwlc; return(OK); /* stress effect */ case B4SOI_MOD_SAREF: value->rValue = model->B4SOIsaref; return(OK); case B4SOI_MOD_SBREF: value->rValue = model->B4SOIsbref; return(OK); case B4SOI_MOD_WLOD: value->rValue = model->B4SOIwlod; return(OK); case B4SOI_MOD_KU0: value->rValue = model->B4SOIku0; return(OK); case B4SOI_MOD_KVSAT: value->rValue = model->B4SOIkvsat; return(OK); case B4SOI_MOD_KVTH0: value->rValue = model->B4SOIkvth0; return(OK); case B4SOI_MOD_TKU0: value->rValue = model->B4SOItku0; return(OK); case B4SOI_MOD_LLODKU0: value->rValue = model->B4SOIllodku0; return(OK); case B4SOI_MOD_WLODKU0: value->rValue = model->B4SOIwlodku0; return(OK); case B4SOI_MOD_LLODVTH: value->rValue = model->B4SOIllodvth; return(OK); case B4SOI_MOD_WLODVTH: value->rValue = model->B4SOIwlodvth; return(OK); case B4SOI_MOD_LKU0: value->rValue = model->B4SOIlku0; return(OK); case B4SOI_MOD_WKU0: value->rValue = model->B4SOIwku0; return(OK); case B4SOI_MOD_PKU0: value->rValue = model->B4SOIpku0; return(OK); case B4SOI_MOD_LKVTH0: value->rValue = model->B4SOIlkvth0; return(OK); case B4SOI_MOD_WKVTH0: value->rValue = model->B4SOIwkvth0; return(OK); case B4SOI_MOD_PKVTH0: value->rValue = model->B4SOIpkvth0; return(OK); case B4SOI_MOD_STK2: value->rValue = model->B4SOIstk2; return(OK); case B4SOI_MOD_LODK2: value->rValue = model->B4SOIlodk2; return(OK); case B4SOI_MOD_STETA0: value->rValue = model->B4SOIsteta0; return(OK); case B4SOI_MOD_LODETA0: value->rValue = model->B4SOIlodeta0; return(OK); /* added for stress end */ case B4SOI_MOD_NOIA: value->rValue = model->B4SOIoxideTrapDensityA; return(OK); case B4SOI_MOD_NOIB: value->rValue = model->B4SOIoxideTrapDensityB; return(OK); case B4SOI_MOD_NOIC: value->rValue = model->B4SOIoxideTrapDensityC; return(OK); case B4SOI_MOD_NOIF: value->rValue = model->B4SOInoif; return(OK); case B4SOI_MOD_EM: value->rValue = model->B4SOIem; return(OK); case B4SOI_MOD_EF: value->rValue = model->B4SOIef; return(OK); case B4SOI_MOD_AF: value->rValue = model->B4SOIaf; return(OK); case B4SOI_MOD_KF: value->rValue = model->B4SOIkf; return(OK); case B4SOI_MOD_BF: value->rValue = model->B4SOIbf; return(OK); case B4SOI_MOD_W0FLK: value->rValue = model->B4SOIw0flk; return(OK); /* v2.0 release */ case B4SOI_MOD_K1W1: value->rValue = model->B4SOIk1w1; return(OK); case B4SOI_MOD_K1W2: value->rValue = model->B4SOIk1w2; return(OK); case B4SOI_MOD_KETAS: value->rValue = model->B4SOIketas; return(OK); case B4SOI_MOD_DWBC: value->rValue = model->B4SOIdwbc; return(OK); case B4SOI_MOD_BETA0: value->rValue = model->B4SOIbeta0; return(OK); case B4SOI_MOD_BETA1: value->rValue = model->B4SOIbeta1; return(OK); case B4SOI_MOD_BETA2: value->rValue = model->B4SOIbeta2; return(OK); case B4SOI_MOD_VDSATII0: value->rValue = model->B4SOIvdsatii0; return(OK); case B4SOI_MOD_TII: value->rValue = model->B4SOItii; return(OK); /*4.1 Iii model*/ case B4SOI_MOD_TVBCI: value->rValue = model->B4SOItvbci; return(OK); case B4SOI_MOD_LII: value->rValue = model->B4SOIlii; return(OK); case B4SOI_MOD_SII0: value->rValue = model->B4SOIsii0; return(OK); case B4SOI_MOD_SII1: value->rValue = model->B4SOIsii1; return(OK); case B4SOI_MOD_SII2: value->rValue = model->B4SOIsii2; return(OK); case B4SOI_MOD_SIID: value->rValue = model->B4SOIsiid; return(OK); case B4SOI_MOD_FBJTII: value->rValue = model->B4SOIfbjtii; return(OK); /*4.1 Iii model*/ case B4SOI_MOD_EBJTII: value->rValue = model->B4SOIebjtii; return(OK); case B4SOI_MOD_CBJTII: value->rValue = model->B4SOIcbjtii; return(OK); case B4SOI_MOD_VBCI: value->rValue = model->B4SOIvbci; return(OK); case B4SOI_MOD_ABJTII: value->rValue = model->B4SOIabjtii; return(OK); case B4SOI_MOD_MBJTII: value->rValue = model->B4SOImbjtii; return(OK); case B4SOI_MOD_ESATII: value->rValue = model->B4SOIesatii; return(OK); case B4SOI_MOD_NTUNS: /* v4.0 */ value->rValue = model->B4SOIntun; return(OK); case B4SOI_MOD_NTUND: /* v4.0 */ value->rValue = model->B4SOIntund; return(OK); case B4SOI_MOD_NRECF0S: /* v4.0 */ value->rValue = model->B4SOInrecf0; return(OK); case B4SOI_MOD_NRECF0D: /* v4.0 */ value->rValue = model->B4SOInrecf0d; return(OK); case B4SOI_MOD_NRECR0S: /* v4.0 */ value->rValue = model->B4SOInrecr0; return(OK); case B4SOI_MOD_NRECR0D: /* v4.0 */ value->rValue = model->B4SOInrecr0d; return(OK); case B4SOI_MOD_ISBJT: value->rValue = model->B4SOIisbjt; return(OK); case B4SOI_MOD_IDBJT: /* v4.0 */ value->rValue = model->B4SOIidbjt; return(OK); case B4SOI_MOD_ISDIF: value->rValue = model->B4SOIisdif; return(OK); case B4SOI_MOD_IDDIF: /* v4.0 */ value->rValue = model->B4SOIiddif; return(OK); case B4SOI_MOD_ISREC: value->rValue = model->B4SOIisrec; return(OK); case B4SOI_MOD_IDREC: /* v4.0 */ value->rValue = model->B4SOIidrec; return(OK); case B4SOI_MOD_ISTUN: value->rValue = model->B4SOIistun; return(OK); case B4SOI_MOD_IDTUN: /* v4.0 */ value->rValue = model->B4SOIidtun; return(OK); case B4SOI_MOD_LN: value->rValue = model->B4SOIln; return(OK); case B4SOI_MOD_VREC0S: /* v4.0 */ value->rValue = model->B4SOIvrec0; return(OK); case B4SOI_MOD_VREC0D: /* v4.0 */ value->rValue = model->B4SOIvrec0d; return(OK); case B4SOI_MOD_VTUN0S: /* v4.0 */ value->rValue = model->B4SOIvtun0; return(OK); case B4SOI_MOD_VTUN0D: /* v4.0 */ value->rValue = model->B4SOIvtun0d; return(OK); case B4SOI_MOD_NBJT: value->rValue = model->B4SOInbjt; return(OK); case B4SOI_MOD_LBJT0: value->rValue = model->B4SOIlbjt0; return(OK); case B4SOI_MOD_LDIF0: value->rValue = model->B4SOIldif0; return(OK); case B4SOI_MOD_VABJT: value->rValue = model->B4SOIvabjt; return(OK); case B4SOI_MOD_AELY: value->rValue = model->B4SOIaely; return(OK); case B4SOI_MOD_AHLIS: /* v4.0 */ value->rValue = model->B4SOIahli; return(OK); case B4SOI_MOD_AHLID: /* v4.0 */ value->rValue = model->B4SOIahlid; return(OK); case B4SOI_MOD_RBODY: value->rValue = model->B4SOIrbody; return(OK); case B4SOI_MOD_RBSH: value->rValue = model->B4SOIrbsh; return(OK); case B4SOI_MOD_NTRECF: value->rValue = model->B4SOIntrecf; return(OK); case B4SOI_MOD_NTRECR: value->rValue = model->B4SOIntrecr; return(OK); case B4SOI_MOD_NDIF: value->rValue = model->B4SOIndif; return(OK); case B4SOI_MOD_DLCB: value->rValue = model->B4SOIdlcb; return(OK); case B4SOI_MOD_FBODY: value->rValue = model->B4SOIfbody; return(OK); case B4SOI_MOD_TCJSWGS: value->rValue = model->B4SOItcjswg; return(OK); case B4SOI_MOD_TPBSWGS: value->rValue = model->B4SOItpbswg; return(OK); case B4SOI_MOD_TCJSWGD: value->rValue = model->B4SOItcjswgd; return(OK); case B4SOI_MOD_TPBSWGD: value->rValue = model->B4SOItpbswgd; return(OK); case B4SOI_MOD_ACDE: value->rValue = model->B4SOIacde; return(OK); case B4SOI_MOD_MOIN: value->rValue = model->B4SOImoin; return(OK); case B4SOI_MOD_NOFF: value->rValue = model->B4SOInoff; return(OK); /* v3.2 */ case B4SOI_MOD_DELVT: value->rValue = model->B4SOIdelvt; return(OK); case B4SOI_MOD_KB1: value->rValue = model->B4SOIkb1; return(OK); case B4SOI_MOD_DLBG: value->rValue = model->B4SOIdlbg; return(OK); /* v4.4 */ case B4SOI_MOD_CFRCOEFF: value->rValue = model->B4SOIcfrcoeff; return(OK); case B4SOI_MOD_EGIDL: value->rValue = model->B4SOIegidl; return(OK); case B4SOI_MOD_AGIDL: value->rValue = model->B4SOIagidl; return(OK); case B4SOI_MOD_BGIDL: value->rValue = model->B4SOIbgidl; return(OK); case B4SOI_MOD_CGIDL: value->rValue = model->B4SOIcgidl; return(OK); case B4SOI_MOD_RGIDL: value->rValue = model->B4SOIrgidl; return(OK); case B4SOI_MOD_KGIDL: value->rValue = model->B4SOIkgidl; return(OK); case B4SOI_MOD_FGIDL: value->rValue = model->B4SOIfgidl; return(OK); case B4SOI_MOD_EGISL: value->rValue = model->B4SOIegisl; return(OK); case B4SOI_MOD_AGISL: value->rValue = model->B4SOIagisl; return(OK); case B4SOI_MOD_BGISL: value->rValue = model->B4SOIbgisl; return(OK); case B4SOI_MOD_CGISL: value->rValue = model->B4SOIcgisl; return(OK); case B4SOI_MOD_RGISL: value->rValue = model->B4SOIrgisl; return(OK); case B4SOI_MOD_KGISL: value->rValue = model->B4SOIkgisl; return(OK); case B4SOI_MOD_FGISL: value->rValue = model->B4SOIfgisl; return(OK); case B4SOI_MOD_FDMOD: value->rValue = model->B4SOIfdMod; return(OK); case B4SOI_MOD_VSCE: value->rValue = model->B4SOIvsce; return(OK); case B4SOI_MOD_CDSBS: value->rValue = model->B4SOIcdsbs; return(OK); case B4SOI_MOD_MINVCV: value->rValue = model->B4SOIminvcv; return(OK); case B4SOI_MOD_LMINVCV: value->rValue = model->B4SOIlminvcv; return(OK); case B4SOI_MOD_WMINVCV: value->rValue = model->B4SOIwminvcv; return(OK); case B4SOI_MOD_PMINVCV: value->rValue = model->B4SOIpminvcv; return(OK); case B4SOI_MOD_VOFFCV: value->rValue = model->B4SOIvoffcv; return(OK); case B4SOI_MOD_LVOFFCV: value->rValue = model->B4SOIlvoffcv; return(OK); case B4SOI_MOD_WVOFFCV: value->rValue = model->B4SOIwvoffcv; return(OK); case B4SOI_MOD_PVOFFCV: value->rValue = model->B4SOIpvoffcv; return(OK); /* v3.0 */ case B4SOI_MOD_SOIMOD: value->iValue = model->B4SOIsoiMod; return(OK); /* v3.2 bug fix */ case B4SOI_MOD_VBS0PD: value->rValue = model->B4SOIvbs0pd; return(OK); /* v3.2 */ case B4SOI_MOD_VBS0FD: value->rValue = model->B4SOIvbs0fd; return(OK); /* v3.2 */ case B4SOI_MOD_VBSA: value->rValue = model->B4SOIvbsa; return(OK); case B4SOI_MOD_NOFFFD: value->rValue = model->B4SOInofffd; return(OK); case B4SOI_MOD_VOFFFD: value->rValue = model->B4SOIvofffd; return(OK); case B4SOI_MOD_K1B: value->rValue = model->B4SOIk1b; return(OK); case B4SOI_MOD_K2B: value->rValue = model->B4SOIk2b; return(OK); case B4SOI_MOD_DK2B: value->rValue = model->B4SOIdk2b; return(OK); case B4SOI_MOD_DVBD0: value->rValue = model->B4SOIdvbd0; return(OK); case B4SOI_MOD_DVBD1: value->rValue = model->B4SOIdvbd1; return(OK); case B4SOI_MOD_MOINFD: value->rValue = model->B4SOImoinFD; return(OK); /* v2.2 release */ case B4SOI_MOD_WTH0: value->rValue = model->B4SOIwth0; return(OK); case B4SOI_MOD_RHALO: value->rValue = model->B4SOIrhalo; return(OK); case B4SOI_MOD_NTOX: value->rValue = model->B4SOIntox; return(OK); case B4SOI_MOD_TOXREF: value->rValue = model->B4SOItoxref; return(OK); case B4SOI_MOD_EBG: value->rValue = model->B4SOIebg; return(OK); case B4SOI_MOD_VEVB: value->rValue = model->B4SOIvevb; return(OK); case B4SOI_MOD_ALPHAGB1: value->rValue = model->B4SOIalphaGB1; return(OK); case B4SOI_MOD_BETAGB1: value->rValue = model->B4SOIbetaGB1; return(OK); case B4SOI_MOD_VGB1: value->rValue = model->B4SOIvgb1; return(OK); case B4SOI_MOD_VECB: value->rValue = model->B4SOIvecb; return(OK); case B4SOI_MOD_ALPHAGB2: value->rValue = model->B4SOIalphaGB2; return(OK); case B4SOI_MOD_BETAGB2: value->rValue = model->B4SOIbetaGB2; return(OK); case B4SOI_MOD_VGB2: value->rValue = model->B4SOIvgb2; return(OK); case B4SOI_MOD_AIGBCP2: value->rValue = model->B4SOIaigbcp2; return(OK); case B4SOI_MOD_BIGBCP2: value->rValue = model->B4SOIbigbcp2; return(OK); case B4SOI_MOD_CIGBCP2: value->rValue = model->B4SOIcigbcp2; return(OK); case B4SOI_MOD_TOXQM: value->rValue = model->B4SOItoxqm; return(OK); case B4SOI_MOD_VOXH: value->rValue = model->B4SOIvoxh; return(OK); case B4SOI_MOD_DELTAVOX: value->rValue = model->B4SOIdeltavox; return(OK); /* v4.0 */ case B4SOI_MOD_RDSMOD : value->iValue = model->B4SOIrdsMod; return(OK); case B4SOI_MOD_RBODYMOD : value->iValue = model->B4SOIrbodyMod; return(OK); case B4SOI_MOD_GBMIN: value->rValue = model->B4SOIgbmin; return(OK); case B4SOI_MOD_RBDB: value->rValue = model->B4SOIrbdb; return(OK); case B4SOI_MOD_RBSB: value->rValue = model->B4SOIrbsb; return(OK); case B4SOI_MOD_FRBODY: value->rValue = model->B4SOIfrbody; return(OK); case B4SOI_MOD_DVTP0: value->rValue = model->B4SOIdvtp0; return(OK); case B4SOI_MOD_DVTP1: value->rValue = model->B4SOIdvtp1; return(OK); case B4SOI_MOD_DVTP2: value->rValue = model->B4SOIdvtp2; return(OK); case B4SOI_MOD_DVTP3: value->rValue = model->B4SOIdvtp3; return(OK); case B4SOI_MOD_DVTP4: value->rValue = model->B4SOIdvtp4; return(OK); case B4SOI_MOD_LDVTP0: value->rValue = model->B4SOIldvtp0; return(OK); case B4SOI_MOD_LDVTP1: value->rValue = model->B4SOIldvtp1; return(OK); case B4SOI_MOD_LDVTP2: value->rValue = model->B4SOIldvtp2; return(OK); case B4SOI_MOD_LDVTP3: value->rValue = model->B4SOIldvtp3; return(OK); case B4SOI_MOD_LDVTP4: value->rValue = model->B4SOIldvtp4; return(OK); case B4SOI_MOD_WDVTP0: value->rValue = model->B4SOIwdvtp0; return(OK); case B4SOI_MOD_WDVTP1: value->rValue = model->B4SOIwdvtp1; return(OK); case B4SOI_MOD_WDVTP2: value->rValue = model->B4SOIwdvtp2; return(OK); case B4SOI_MOD_WDVTP3: value->rValue = model->B4SOIwdvtp3; return(OK); case B4SOI_MOD_WDVTP4: value->rValue = model->B4SOIwdvtp4; return(OK); case B4SOI_MOD_PDVTP0: value->rValue = model->B4SOIpdvtp0; return(OK); case B4SOI_MOD_PDVTP1: value->rValue = model->B4SOIpdvtp1; return(OK); case B4SOI_MOD_PDVTP2: value->rValue = model->B4SOIpdvtp2; return(OK); case B4SOI_MOD_PDVTP3: value->rValue = model->B4SOIpdvtp3; return(OK); case B4SOI_MOD_PDVTP4: value->rValue = model->B4SOIpdvtp4; return(OK); case B4SOI_MOD_MINV: value->rValue = model->B4SOIminv; return(OK); case B4SOI_MOD_LMINV: value->rValue = model->B4SOIlminv; return(OK); case B4SOI_MOD_WMINV: value->rValue = model->B4SOIwminv; return(OK); case B4SOI_MOD_PMINV: value->rValue = model->B4SOIpminv; return(OK); case B4SOI_MOD_FPROUT: value->rValue = model->B4SOIfprout; return(OK); case B4SOI_MOD_PDITS: value->rValue = model->B4SOIpdits; return(OK); case B4SOI_MOD_PDITSD: value->rValue = model->B4SOIpditsd; return(OK); case B4SOI_MOD_PDITSL: value->rValue = model->B4SOIpditsl; return(OK); case B4SOI_MOD_LFPROUT: value->rValue = model->B4SOIlfprout; return(OK); case B4SOI_MOD_LPDITS: value->rValue = model->B4SOIlpdits; return(OK); case B4SOI_MOD_LPDITSD: value->rValue = model->B4SOIlpditsd; return(OK); case B4SOI_MOD_WFPROUT: value->rValue = model->B4SOIwfprout; return(OK); case B4SOI_MOD_WPDITS: value->rValue = model->B4SOIwpdits; return(OK); case B4SOI_MOD_WPDITSD: value->rValue = model->B4SOIwpditsd; return(OK); case B4SOI_MOD_PFPROUT: value->rValue = model->B4SOIpfprout; return(OK); case B4SOI_MOD_PPDITS: value->rValue = model->B4SOIppdits; return(OK); case B4SOI_MOD_PPDITSD: value->rValue = model->B4SOIppditsd; return(OK); /* v4.0 end */ /* v3.2 */ case B4SOI_MOD_FNOIMOD : value->iValue = model->B4SOIfnoiMod; return(OK); case B4SOI_MOD_TNOIMOD : value->iValue = model->B4SOItnoiMod; case B4SOI_MOD_TNOIA: value->rValue = model->B4SOItnoia; return(OK); case B4SOI_MOD_TNOIB: value->rValue = model->B4SOItnoib; return(OK); case B4SOI_MOD_RNOIA: value->rValue = model->B4SOIrnoia; return(OK); case B4SOI_MOD_RNOIB: value->rValue = model->B4SOIrnoib; return(OK); case B4SOI_MOD_NTNOI: value->rValue = model->B4SOIntnoi; return(OK); /* v3.2 */ /* v3.1 added for RF */ case B4SOI_MOD_RGATEMOD : value->iValue = model->B4SOIrgateMod; return(OK); case B4SOI_MOD_XRCRG1: value->rValue = model->B4SOIxrcrg1; return(OK); case B4SOI_MOD_XRCRG2: value->rValue = model->B4SOIxrcrg2; return(OK); case B4SOI_MOD_RSHG: value->rValue = model->B4SOIrshg; return(OK); case B4SOI_MOD_NGCON: value->rValue = model->B4SOIngcon; return(OK); case B4SOI_MOD_XGW: value->rValue = model->B4SOIxgw; return(OK); case B4SOI_MOD_XGL: value->rValue = model->B4SOIxgl; return(OK); /* v3.1 added for RF end */ /*4.1*/ case B4SOI_MOD_MTRLMOD : value->iValue = model->B4SOImtrlMod; return(OK); case B4SOI_MOD_VGSTCVMOD: value->iValue = model->B4SOIvgstcvMod; return(OK); case B4SOI_MOD_GIDLMOD : value->iValue = model->B4SOIgidlMod; return(OK); case B4SOI_MOD_IIIMOD : value->iValue = model->B4SOIiiiMod; return(OK); /* v3.0 */ case B4SOI_MOD_IGBMOD: value->iValue = model->B4SOIigbMod; return(OK); case B4SOI_MOD_IGCMOD: value->iValue = model->B4SOIigcMod; return(OK); case B4SOI_MOD_AIGC: value->rValue = model->B4SOIaigc; return(OK); case B4SOI_MOD_BIGC: value->rValue = model->B4SOIbigc; return(OK); case B4SOI_MOD_CIGC: value->rValue = model->B4SOIcigc; return(OK); case B4SOI_MOD_AIGSD: value->rValue = model->B4SOIaigsd; return(OK); case B4SOI_MOD_BIGSD: value->rValue = model->B4SOIbigsd; return(OK); case B4SOI_MOD_CIGSD: value->rValue = model->B4SOIcigsd; return(OK); case B4SOI_MOD_NIGC: value->rValue = model->B4SOInigc; return(OK); case B4SOI_MOD_PIGCD: value->rValue = model->B4SOIpigcd; return(OK); case B4SOI_MOD_POXEDGE: value->rValue = model->B4SOIpoxedge; return(OK); case B4SOI_MOD_DLCIG: value->rValue = model->B4SOIdlcig; return(OK); /* Added for binning - START */ /* Length Dependence */ /* v3.1 */ case B4SOI_MOD_LXJ: value->rValue = model->B4SOIlxj; return(OK); case B4SOI_MOD_LALPHAGB1: value->rValue = model->B4SOIlalphaGB1; return(OK); case B4SOI_MOD_LALPHAGB2: value->rValue = model->B4SOIlalphaGB2; return(OK); case B4SOI_MOD_LBETAGB1: value->rValue = model->B4SOIlbetaGB1; return(OK); case B4SOI_MOD_LBETAGB2: value->rValue = model->B4SOIlbetaGB2; return(OK); case B4SOI_MOD_LAIGBCP2: value->rValue = model->B4SOIlaigbcp2; return(OK); case B4SOI_MOD_LBIGBCP2: value->rValue = model->B4SOIlbigbcp2; return(OK); case B4SOI_MOD_LCIGBCP2: value->rValue = model->B4SOIlcigbcp2; return(OK); case B4SOI_MOD_LNDIF: value->rValue = model->B4SOIlndif; return(OK); case B4SOI_MOD_LNTRECF: value->rValue = model->B4SOIlntrecf; return(OK); case B4SOI_MOD_LNTRECR: value->rValue = model->B4SOIlntrecr; return(OK); case B4SOI_MOD_LXBJT: value->rValue = model->B4SOIlxbjt; return(OK); case B4SOI_MOD_LXDIFS: value->rValue = model->B4SOIlxdif; return(OK); case B4SOI_MOD_LXRECS: value->rValue = model->B4SOIlxrec; return(OK); case B4SOI_MOD_LXTUNS: value->rValue = model->B4SOIlxtun; return(OK); case B4SOI_MOD_LXDIFD: value->rValue = model->B4SOIlxdifd; return(OK); case B4SOI_MOD_LXRECD: value->rValue = model->B4SOIlxrecd; return(OK); case B4SOI_MOD_LXTUND: value->rValue = model->B4SOIlxtund; return(OK); case B4SOI_MOD_LCGDL: value->rValue = model->B4SOIlcgdl; return(OK); case B4SOI_MOD_LCGSL: value->rValue = model->B4SOIlcgsl; return(OK); case B4SOI_MOD_LCKAPPA: value->rValue = model->B4SOIlckappa; return(OK); case B4SOI_MOD_LUTE: value->rValue = model->B4SOIlute; return(OK); case B4SOI_MOD_LKT1: value->rValue = model->B4SOIlkt1; return(OK); case B4SOI_MOD_LKT2: value->rValue = model->B4SOIlkt2; return(OK); case B4SOI_MOD_LKT1L: value->rValue = model->B4SOIlkt1l; return(OK); case B4SOI_MOD_LUA1: value->rValue = model->B4SOIlua1; return(OK); case B4SOI_MOD_LUB1: value->rValue = model->B4SOIlub1; return(OK); case B4SOI_MOD_LUC1: value->rValue = model->B4SOIluc1; return(OK); case B4SOI_MOD_LAT: value->rValue = model->B4SOIlat; return(OK); case B4SOI_MOD_LPRT: value->rValue = model->B4SOIlprt; return(OK); /* v3.0 */ case B4SOI_MOD_LAIGC: value->rValue = model->B4SOIlaigc; return(OK); case B4SOI_MOD_LBIGC: value->rValue = model->B4SOIlbigc; return(OK); case B4SOI_MOD_LCIGC: value->rValue = model->B4SOIlcigc; return(OK); case B4SOI_MOD_LAIGSD: value->rValue = model->B4SOIlaigsd; return(OK); case B4SOI_MOD_LBIGSD: value->rValue = model->B4SOIlbigsd; return(OK); case B4SOI_MOD_LCIGSD: value->rValue = model->B4SOIlcigsd; return(OK); case B4SOI_MOD_LNIGC: value->rValue = model->B4SOIlnigc; return(OK); case B4SOI_MOD_LPIGCD: value->rValue = model->B4SOIlpigcd; return(OK); case B4SOI_MOD_LPOXEDGE: value->rValue = model->B4SOIlpoxedge; return(OK); case B4SOI_MOD_LNPEAK: value->rValue = model->B4SOIlnpeak; return(OK); case B4SOI_MOD_LNSUB: value->rValue = model->B4SOIlnsub; return(OK); case B4SOI_MOD_LNGATE: value->rValue = model->B4SOIlngate; return(OK); case B4SOI_MOD_LNSD: value->rValue = model->B4SOIlnsd; return(OK); case B4SOI_MOD_LVTH0: value->rValue = model->B4SOIlvth0; return(OK); case B4SOI_MOD_LVFB: value->rValue = model->B4SOIlvfb; return(OK); /* v4.1 */ case B4SOI_MOD_LK1: value->rValue = model->B4SOIlk1; return(OK); case B4SOI_MOD_LK1W1: value->rValue = model->B4SOIlk1w1; return(OK); case B4SOI_MOD_LK1W2: value->rValue = model->B4SOIlk1w2; return(OK); case B4SOI_MOD_LK2: value->rValue = model->B4SOIlk2; return(OK); case B4SOI_MOD_LK3: value->rValue = model->B4SOIlk3; return(OK); case B4SOI_MOD_LK3B: value->rValue = model->B4SOIlk3b; return(OK); case B4SOI_MOD_LKB1: value->rValue = model->B4SOIlkb1; return(OK); case B4SOI_MOD_LW0: value->rValue = model->B4SOIlw0; return(OK); case B4SOI_MOD_LLPE0: value->rValue = model->B4SOIllpe0; return(OK); case B4SOI_MOD_LLPEB: /* v4.0 for Vth */ value->rValue = model->B4SOIllpeb; return(OK); case B4SOI_MOD_LDVT0 : value->rValue = model->B4SOIldvt0; return(OK); case B4SOI_MOD_LDVT1 : value->rValue = model->B4SOIldvt1; return(OK); case B4SOI_MOD_LDVT2 : value->rValue = model->B4SOIldvt2; return(OK); case B4SOI_MOD_LDVT0W : value->rValue = model->B4SOIldvt0w; return(OK); case B4SOI_MOD_LDVT1W : value->rValue = model->B4SOIldvt1w; return(OK); case B4SOI_MOD_LDVT2W : value->rValue = model->B4SOIldvt2w; return(OK); case B4SOI_MOD_LU0: value->rValue = model->B4SOIlu0; return(OK); case B4SOI_MOD_LUA: value->rValue = model->B4SOIlua; return(OK); case B4SOI_MOD_LUB: value->rValue = model->B4SOIlub; return(OK); case B4SOI_MOD_LUC: value->rValue = model->B4SOIluc; return(OK); case B4SOI_MOD_LVSAT: value->rValue = model->B4SOIlvsat; return(OK); case B4SOI_MOD_LA0: value->rValue = model->B4SOIla0; return(OK); case B4SOI_MOD_LAGS: value->rValue = model->B4SOIlags; return(OK); case B4SOI_MOD_LB0: value->rValue = model->B4SOIlb0; return(OK); case B4SOI_MOD_LB1: value->rValue = model->B4SOIlb1; return(OK); case B4SOI_MOD_LKETA: value->rValue = model->B4SOIlketa; return(OK); case B4SOI_MOD_LKETAS: value->rValue = model->B4SOIlketas; return(OK); case B4SOI_MOD_LA1: value->rValue = model->B4SOIla1; return(OK); case B4SOI_MOD_LA2: value->rValue = model->B4SOIla2; return(OK); case B4SOI_MOD_LRDSW: value->rValue = model->B4SOIlrdsw; return(OK); case B4SOI_MOD_LRDW: value->rValue = model->B4SOIlrdw; return(OK); case B4SOI_MOD_LRSW: value->rValue = model->B4SOIlrsw; return(OK); case B4SOI_MOD_LPRWB: value->rValue = model->B4SOIlprwb; return(OK); case B4SOI_MOD_LPRWG: value->rValue = model->B4SOIlprwg; return(OK); case B4SOI_MOD_LWR: value->rValue = model->B4SOIlwr; return(OK); case B4SOI_MOD_LNFACTOR : value->rValue = model->B4SOIlnfactor; return(OK); case B4SOI_MOD_LDWG: value->rValue = model->B4SOIldwg; return(OK); case B4SOI_MOD_LDWB: value->rValue = model->B4SOIldwb; return(OK); case B4SOI_MOD_LVOFF: value->rValue = model->B4SOIlvoff; return(OK); case B4SOI_MOD_LETA0: value->rValue = model->B4SOIleta0; return(OK); case B4SOI_MOD_LETAB: value->rValue = model->B4SOIletab; return(OK); case B4SOI_MOD_LDSUB : value->rValue = model->B4SOIldsub; return(OK); case B4SOI_MOD_LCIT : value->rValue = model->B4SOIlcit; return(OK); case B4SOI_MOD_LCDSC : value->rValue = model->B4SOIlcdsc; return(OK); case B4SOI_MOD_LCDSCB : value->rValue = model->B4SOIlcdscb; return(OK); case B4SOI_MOD_LCDSCD : value->rValue = model->B4SOIlcdscd; return(OK); case B4SOI_MOD_LPCLM: value->rValue = model->B4SOIlpclm; return(OK); case B4SOI_MOD_LPDIBL1: value->rValue = model->B4SOIlpdibl1; return(OK); case B4SOI_MOD_LPDIBL2: value->rValue = model->B4SOIlpdibl2; return(OK); case B4SOI_MOD_LPDIBLB: value->rValue = model->B4SOIlpdiblb; return(OK); case B4SOI_MOD_LDROUT : value->rValue = model->B4SOIldrout; return(OK); case B4SOI_MOD_LPVAG: value->rValue = model->B4SOIlpvag; return(OK); case B4SOI_MOD_LDELTA: value->rValue = model->B4SOIldelta; return(OK); case B4SOI_MOD_LALPHA0: value->rValue = model->B4SOIlalpha0; return(OK); case B4SOI_MOD_LFBJTII: value->rValue = model->B4SOIlfbjtii; return(OK); /*4.1 Iii model*/ case B4SOI_MOD_LEBJTII: value->rValue = model->B4SOIlebjtii; return(OK); case B4SOI_MOD_LCBJTII: value->rValue = model->B4SOIlcbjtii; return(OK); case B4SOI_MOD_LVBCI: value->rValue = model->B4SOIlvbci; return(OK); case B4SOI_MOD_LABJTII: value->rValue = model->B4SOIlabjtii; return(OK); case B4SOI_MOD_LMBJTII: value->rValue = model->B4SOIlmbjtii; return(OK); case B4SOI_MOD_LBETA0: value->rValue = model->B4SOIlbeta0; return(OK); case B4SOI_MOD_LBETA1: value->rValue = model->B4SOIlbeta1; return(OK); case B4SOI_MOD_LBETA2: value->rValue = model->B4SOIlbeta2; return(OK); case B4SOI_MOD_LVDSATII0: value->rValue = model->B4SOIlvdsatii0; return(OK); case B4SOI_MOD_LLII: value->rValue = model->B4SOIllii; return(OK); case B4SOI_MOD_LESATII: value->rValue = model->B4SOIlesatii; return(OK); case B4SOI_MOD_LSII0: value->rValue = model->B4SOIlsii0; return(OK); case B4SOI_MOD_LSII1: value->rValue = model->B4SOIlsii1; return(OK); case B4SOI_MOD_LSII2: value->rValue = model->B4SOIlsii2; return(OK); case B4SOI_MOD_LSIID: value->rValue = model->B4SOIlsiid; return(OK); case B4SOI_MOD_LAGIDL: value->rValue = model->B4SOIlagidl; return(OK); case B4SOI_MOD_LBGIDL: value->rValue = model->B4SOIlbgidl; return(OK); case B4SOI_MOD_LCGIDL: value->rValue = model->B4SOIlcgidl; return(OK); case B4SOI_MOD_LEGIDL: value->rValue = model->B4SOIlegidl; return(OK); case B4SOI_MOD_LRGIDL: value->rValue = model->B4SOIlrgidl; return(OK); case B4SOI_MOD_LKGIDL: value->rValue = model->B4SOIlkgidl; return(OK); case B4SOI_MOD_LFGIDL: value->rValue = model->B4SOIlfgidl; return(OK); case B4SOI_MOD_LAGISL: value->rValue = model->B4SOIlagisl; return(OK); case B4SOI_MOD_LBGISL: value->rValue = model->B4SOIlbgisl; return(OK); case B4SOI_MOD_LCGISL: value->rValue = model->B4SOIlcgisl; return(OK); case B4SOI_MOD_LEGISL: value->rValue = model->B4SOIlegisl; return(OK); case B4SOI_MOD_LRGISL: value->rValue = model->B4SOIlrgisl; return(OK); case B4SOI_MOD_LKGISL: value->rValue = model->B4SOIlkgisl; return(OK); case B4SOI_MOD_LFGISL: value->rValue = model->B4SOIlfgisl; return(OK); case B4SOI_MOD_LNTUNS: /* v4.0 */ value->rValue = model->B4SOIlntun; return(OK); case B4SOI_MOD_LNTUND: /* v4.0 */ value->rValue = model->B4SOIlntund; return(OK); case B4SOI_MOD_LNDIODES: /* v4.0 */ value->rValue = model->B4SOIlndiode; return(OK); case B4SOI_MOD_LNDIODED: /* v4.0 */ value->rValue = model->B4SOIlndioded; return(OK); case B4SOI_MOD_LNRECF0S: /* v4.0 */ value->rValue = model->B4SOIlnrecf0; return(OK); case B4SOI_MOD_LNRECF0D: /* v4.0 */ value->rValue = model->B4SOIlnrecf0d; return(OK); case B4SOI_MOD_LNRECR0S: /* v4.0 */ value->rValue = model->B4SOIlnrecr0; return(OK); case B4SOI_MOD_LNRECR0D: /* v4.0 */ value->rValue = model->B4SOIlnrecr0d; return(OK); case B4SOI_MOD_LISBJT: value->rValue = model->B4SOIlisbjt; return(OK); case B4SOI_MOD_LIDBJT: /* v4.0 */ value->rValue = model->B4SOIlidbjt; return(OK); case B4SOI_MOD_LISDIF: value->rValue = model->B4SOIlisdif; return(OK); case B4SOI_MOD_LIDDIF: /* v4.0 */ value->rValue = model->B4SOIliddif; return(OK); case B4SOI_MOD_LISREC: value->rValue = model->B4SOIlisrec; return(OK); case B4SOI_MOD_LIDREC: /* v4.0 */ value->rValue = model->B4SOIlidrec; return(OK); case B4SOI_MOD_LISTUN: value->rValue = model->B4SOIlistun; return(OK); case B4SOI_MOD_LIDTUN: /* v4.0 */ value->rValue = model->B4SOIlidtun; return(OK); case B4SOI_MOD_LVREC0S: /* v4.0 */ value->rValue = model->B4SOIlvrec0; return(OK); case B4SOI_MOD_LVREC0D: /* v4.0 */ value->rValue = model->B4SOIlvrec0d; return(OK); case B4SOI_MOD_LVTUN0S: /* v4.0 */ value->rValue = model->B4SOIlvtun0; return(OK); case B4SOI_MOD_LVTUN0D: /* v4.0 */ value->rValue = model->B4SOIlvtun0d; return(OK); case B4SOI_MOD_LNBJT: value->rValue = model->B4SOIlnbjt; return(OK); case B4SOI_MOD_LLBJT0: value->rValue = model->B4SOIllbjt0; return(OK); case B4SOI_MOD_LVABJT: value->rValue = model->B4SOIlvabjt; return(OK); case B4SOI_MOD_LAELY: value->rValue = model->B4SOIlaely; return(OK); case B4SOI_MOD_LAHLIS: /* v4.0 */ value->rValue = model->B4SOIlahli; return(OK); case B4SOI_MOD_LAHLID: /* v4.0 */ value->rValue = model->B4SOIlahlid; return(OK); /* CV Model */ case B4SOI_MOD_LVSDFB: value->rValue = model->B4SOIlvsdfb; return(OK); case B4SOI_MOD_LVSDTH: value->rValue = model->B4SOIlvsdth; return(OK); case B4SOI_MOD_LDELVT: value->rValue = model->B4SOIldelvt; return(OK); case B4SOI_MOD_LACDE: value->rValue = model->B4SOIlacde; return(OK); case B4SOI_MOD_LMOIN: value->rValue = model->B4SOIlmoin; return(OK); case B4SOI_MOD_LNOFF: value->rValue = model->B4SOIlnoff; return(OK); /* v3.2 */ /* Width Dependence */ /* v3.1 */ case B4SOI_MOD_WXJ: value->rValue = model->B4SOIwxj; return(OK); case B4SOI_MOD_WALPHAGB1: value->rValue = model->B4SOIwalphaGB1; return(OK); case B4SOI_MOD_WALPHAGB2: value->rValue = model->B4SOIwalphaGB2; return(OK); case B4SOI_MOD_WBETAGB1: value->rValue = model->B4SOIwbetaGB1; return(OK); case B4SOI_MOD_WBETAGB2: value->rValue = model->B4SOIwbetaGB2; return(OK); case B4SOI_MOD_WAIGBCP2: value->rValue = model->B4SOIwaigbcp2; return(OK); case B4SOI_MOD_WBIGBCP2: value->rValue = model->B4SOIwbigbcp2; return(OK); case B4SOI_MOD_WCIGBCP2: value->rValue = model->B4SOIwcigbcp2; return(OK); case B4SOI_MOD_WNDIF: value->rValue = model->B4SOIwndif; return(OK); case B4SOI_MOD_WNTRECF: value->rValue = model->B4SOIwntrecf; return(OK); case B4SOI_MOD_WNTRECR: value->rValue = model->B4SOIwntrecr; return(OK); case B4SOI_MOD_WXBJT: value->rValue = model->B4SOIwxbjt; return(OK); case B4SOI_MOD_WXDIFS: value->rValue = model->B4SOIwxdif; return(OK); case B4SOI_MOD_WXRECS: value->rValue = model->B4SOIwxrec; return(OK); case B4SOI_MOD_WXTUNS: value->rValue = model->B4SOIwxtun; return(OK); case B4SOI_MOD_WXDIFD: value->rValue = model->B4SOIwxdifd; return(OK); case B4SOI_MOD_WXRECD: value->rValue = model->B4SOIwxrecd; return(OK); case B4SOI_MOD_WXTUND: value->rValue = model->B4SOIwxtund; return(OK); case B4SOI_MOD_WCGDL: value->rValue = model->B4SOIwcgdl; return(OK); case B4SOI_MOD_WCGSL: value->rValue = model->B4SOIwcgsl; return(OK); case B4SOI_MOD_WCKAPPA: value->rValue = model->B4SOIwckappa; return(OK); case B4SOI_MOD_WUTE: value->rValue = model->B4SOIwute; return(OK); case B4SOI_MOD_WKT1: value->rValue = model->B4SOIwkt1; return(OK); case B4SOI_MOD_WKT2: value->rValue = model->B4SOIwkt2; return(OK); case B4SOI_MOD_WKT1L: value->rValue = model->B4SOIwkt1l; return(OK); case B4SOI_MOD_WUA1: value->rValue = model->B4SOIwua1; return(OK); case B4SOI_MOD_WUB1: value->rValue = model->B4SOIwub1; return(OK); case B4SOI_MOD_WUC1: value->rValue = model->B4SOIwuc1; return(OK); case B4SOI_MOD_WAT: value->rValue = model->B4SOIwat; return(OK); case B4SOI_MOD_WPRT: value->rValue = model->B4SOIwprt; return(OK); /* v3.0 */ case B4SOI_MOD_WAIGC: value->rValue = model->B4SOIwaigc; return(OK); case B4SOI_MOD_WBIGC: value->rValue = model->B4SOIwbigc; return(OK); case B4SOI_MOD_WCIGC: value->rValue = model->B4SOIwcigc; return(OK); case B4SOI_MOD_WAIGSD: value->rValue = model->B4SOIwaigsd; return(OK); case B4SOI_MOD_WBIGSD: value->rValue = model->B4SOIwbigsd; return(OK); case B4SOI_MOD_WCIGSD: value->rValue = model->B4SOIwcigsd; return(OK); case B4SOI_MOD_WNIGC: value->rValue = model->B4SOIwnigc; return(OK); case B4SOI_MOD_WPIGCD: value->rValue = model->B4SOIwpigcd; return(OK); case B4SOI_MOD_WPOXEDGE: value->rValue = model->B4SOIwpoxedge; return(OK); case B4SOI_MOD_WNPEAK: value->rValue = model->B4SOIwnpeak; return(OK); case B4SOI_MOD_WNSUB: value->rValue = model->B4SOIwnsub; return(OK); case B4SOI_MOD_WNGATE: value->rValue = model->B4SOIwngate; return(OK); case B4SOI_MOD_WNSD: value->rValue = model->B4SOIwnsd; return(OK); case B4SOI_MOD_WVTH0: value->rValue = model->B4SOIwvth0; return(OK); case B4SOI_MOD_WVFB: value->rValue = model->B4SOIwvfb; return(OK); /* v4.1 */ case B4SOI_MOD_WK1: value->rValue = model->B4SOIwk1; return(OK); case B4SOI_MOD_WK1W1: value->rValue = model->B4SOIwk1w1; return(OK); case B4SOI_MOD_WK1W2: value->rValue = model->B4SOIwk1w2; return(OK); case B4SOI_MOD_WK2: value->rValue = model->B4SOIwk2; return(OK); case B4SOI_MOD_WK3: value->rValue = model->B4SOIwk3; return(OK); case B4SOI_MOD_WK3B: value->rValue = model->B4SOIwk3b; return(OK); case B4SOI_MOD_WKB1: value->rValue = model->B4SOIwkb1; return(OK); case B4SOI_MOD_WW0: value->rValue = model->B4SOIww0; return(OK); case B4SOI_MOD_WLPE0: value->rValue = model->B4SOIwlpe0; return(OK); case B4SOI_MOD_WLPEB: /* v4.0 for Vth */ value->rValue = model->B4SOIwlpeb; return(OK); case B4SOI_MOD_WDVT0 : value->rValue = model->B4SOIwdvt0; return(OK); case B4SOI_MOD_WDVT1 : value->rValue = model->B4SOIwdvt1; return(OK); case B4SOI_MOD_WDVT2 : value->rValue = model->B4SOIwdvt2; return(OK); case B4SOI_MOD_WDVT0W : value->rValue = model->B4SOIwdvt0w; return(OK); case B4SOI_MOD_WDVT1W : value->rValue = model->B4SOIwdvt1w; return(OK); case B4SOI_MOD_WDVT2W : value->rValue = model->B4SOIwdvt2w; return(OK); case B4SOI_MOD_WU0: value->rValue = model->B4SOIwu0; return(OK); case B4SOI_MOD_WUA: value->rValue = model->B4SOIwua; return(OK); case B4SOI_MOD_WUB: value->rValue = model->B4SOIwub; return(OK); case B4SOI_MOD_WUC: value->rValue = model->B4SOIwuc; return(OK); case B4SOI_MOD_WVSAT: value->rValue = model->B4SOIwvsat; return(OK); case B4SOI_MOD_WA0: value->rValue = model->B4SOIwa0; return(OK); case B4SOI_MOD_WAGS: value->rValue = model->B4SOIwags; return(OK); case B4SOI_MOD_WB0: value->rValue = model->B4SOIwb0; return(OK); case B4SOI_MOD_WB1: value->rValue = model->B4SOIwb1; return(OK); case B4SOI_MOD_WKETA: value->rValue = model->B4SOIwketa; return(OK); case B4SOI_MOD_WKETAS: value->rValue = model->B4SOIwketas; return(OK); case B4SOI_MOD_WA1: value->rValue = model->B4SOIwa1; return(OK); case B4SOI_MOD_WA2: value->rValue = model->B4SOIwa2; return(OK); case B4SOI_MOD_WRDSW: value->rValue = model->B4SOIwrdsw; return(OK); case B4SOI_MOD_WRDW: value->rValue = model->B4SOIwrdw; return(OK); case B4SOI_MOD_WRSW: value->rValue = model->B4SOIwrsw; return(OK); case B4SOI_MOD_WPRWB: value->rValue = model->B4SOIwprwb; return(OK); case B4SOI_MOD_WPRWG: value->rValue = model->B4SOIwprwg; return(OK); case B4SOI_MOD_WWR: value->rValue = model->B4SOIwwr; return(OK); case B4SOI_MOD_WNFACTOR : value->rValue = model->B4SOIwnfactor; return(OK); case B4SOI_MOD_WDWG: value->rValue = model->B4SOIwdwg; return(OK); case B4SOI_MOD_WDWB: value->rValue = model->B4SOIwdwb; return(OK); case B4SOI_MOD_WVOFF: value->rValue = model->B4SOIwvoff; return(OK); case B4SOI_MOD_WETA0: value->rValue = model->B4SOIweta0; return(OK); case B4SOI_MOD_WETAB: value->rValue = model->B4SOIwetab; return(OK); case B4SOI_MOD_WDSUB : value->rValue = model->B4SOIwdsub; return(OK); case B4SOI_MOD_WCIT : value->rValue = model->B4SOIwcit; return(OK); case B4SOI_MOD_WCDSC : value->rValue = model->B4SOIwcdsc; return(OK); case B4SOI_MOD_WCDSCB : value->rValue = model->B4SOIwcdscb; return(OK); case B4SOI_MOD_WCDSCD : value->rValue = model->B4SOIwcdscd; return(OK); case B4SOI_MOD_WPCLM: value->rValue = model->B4SOIwpclm; return(OK); case B4SOI_MOD_WPDIBL1: value->rValue = model->B4SOIwpdibl1; return(OK); case B4SOI_MOD_WPDIBL2: value->rValue = model->B4SOIwpdibl2; return(OK); case B4SOI_MOD_WPDIBLB: value->rValue = model->B4SOIwpdiblb; return(OK); case B4SOI_MOD_WDROUT : value->rValue = model->B4SOIwdrout; return(OK); case B4SOI_MOD_WPVAG: value->rValue = model->B4SOIwpvag; return(OK); case B4SOI_MOD_WDELTA: value->rValue = model->B4SOIwdelta; return(OK); case B4SOI_MOD_WALPHA0: value->rValue = model->B4SOIwalpha0; return(OK); case B4SOI_MOD_WFBJTII: value->rValue = model->B4SOIwfbjtii; return(OK); /*4.1 Iii model*/ case B4SOI_MOD_WEBJTII: value->rValue = model->B4SOIwebjtii; return(OK); case B4SOI_MOD_WCBJTII: value->rValue = model->B4SOIwcbjtii; return(OK); case B4SOI_MOD_WVBCI: value->rValue = model->B4SOIwvbci; return(OK); case B4SOI_MOD_WABJTII: value->rValue = model->B4SOIwabjtii; return(OK); case B4SOI_MOD_WMBJTII: value->rValue = model->B4SOIwmbjtii; return(OK); case B4SOI_MOD_WBETA0: value->rValue = model->B4SOIwbeta0; return(OK); case B4SOI_MOD_WBETA1: value->rValue = model->B4SOIwbeta1; return(OK); case B4SOI_MOD_WBETA2: value->rValue = model->B4SOIwbeta2; return(OK); case B4SOI_MOD_WVDSATII0: value->rValue = model->B4SOIwvdsatii0; return(OK); case B4SOI_MOD_WLII: value->rValue = model->B4SOIwlii; return(OK); case B4SOI_MOD_WESATII: value->rValue = model->B4SOIwesatii; return(OK); case B4SOI_MOD_WSII0: value->rValue = model->B4SOIwsii0; return(OK); case B4SOI_MOD_WSII1: value->rValue = model->B4SOIwsii1; return(OK); case B4SOI_MOD_WSII2: value->rValue = model->B4SOIwsii2; return(OK); case B4SOI_MOD_WSIID: value->rValue = model->B4SOIwsiid; return(OK); case B4SOI_MOD_WAGIDL: value->rValue = model->B4SOIwagidl; return(OK); case B4SOI_MOD_WBGIDL: value->rValue = model->B4SOIwbgidl; return(OK); case B4SOI_MOD_WCGIDL: value->rValue = model->B4SOIwcgidl; return(OK); case B4SOI_MOD_WEGIDL: value->rValue = model->B4SOIwegidl; return(OK); case B4SOI_MOD_WRGIDL: value->rValue = model->B4SOIwrgidl; return(OK); case B4SOI_MOD_WKGIDL: value->rValue = model->B4SOIwkgidl; return(OK); case B4SOI_MOD_WFGIDL: value->rValue = model->B4SOIwfgidl; return(OK); case B4SOI_MOD_WAGISL: value->rValue = model->B4SOIwagisl; return(OK); case B4SOI_MOD_WBGISL: value->rValue = model->B4SOIwbgisl; return(OK); case B4SOI_MOD_WCGISL: value->rValue = model->B4SOIwcgisl; return(OK); case B4SOI_MOD_WEGISL: value->rValue = model->B4SOIwegisl; return(OK); case B4SOI_MOD_WRGISL: value->rValue = model->B4SOIwrgisl; return(OK); case B4SOI_MOD_WKGISL: value->rValue = model->B4SOIwkgisl; return(OK); case B4SOI_MOD_WFGISL: value->rValue = model->B4SOIwfgisl; return(OK); case B4SOI_MOD_WNTUNS: /* v4.0 */ value->rValue = model->B4SOIwntun; return(OK); case B4SOI_MOD_WNTUND: /* v4.0 */ value->rValue = model->B4SOIwntund; return(OK); case B4SOI_MOD_WNDIODES: /* v4.0 */ value->rValue = model->B4SOIwndiode; return(OK); case B4SOI_MOD_WNDIODED: /* v4.0 */ value->rValue = model->B4SOIwndioded; return(OK); case B4SOI_MOD_WNRECF0S: /* v4.0 */ value->rValue = model->B4SOIwnrecf0; return(OK); case B4SOI_MOD_WNRECF0D: /* v4.0 */ value->rValue = model->B4SOIwnrecf0d; return(OK); case B4SOI_MOD_WNRECR0S: /* v4.0 */ value->rValue = model->B4SOIwnrecr0; return(OK); case B4SOI_MOD_WNRECR0D: /* v4.0 */ value->rValue = model->B4SOIwnrecr0d; return(OK); case B4SOI_MOD_WISBJT: value->rValue = model->B4SOIwisbjt; return(OK); case B4SOI_MOD_WIDBJT: /* v4.0 */ value->rValue = model->B4SOIwidbjt; return(OK); case B4SOI_MOD_WISDIF: value->rValue = model->B4SOIwisdif; return(OK); case B4SOI_MOD_WIDDIF: /* v4.0 */ value->rValue = model->B4SOIwiddif; return(OK); case B4SOI_MOD_WISREC: value->rValue = model->B4SOIwisrec; return(OK); case B4SOI_MOD_WIDREC: /* v4.0 */ value->rValue = model->B4SOIwidrec; return(OK); case B4SOI_MOD_WISTUN: value->rValue = model->B4SOIwistun; return(OK); case B4SOI_MOD_WIDTUN: /* v4.0 */ value->rValue = model->B4SOIwidtun; return(OK); case B4SOI_MOD_WVREC0S: /* v4.0 */ value->rValue = model->B4SOIwvrec0; return(OK); case B4SOI_MOD_WVREC0D: /* v4.0 */ value->rValue = model->B4SOIwvrec0d; return(OK); case B4SOI_MOD_WVTUN0S: /* v4.0 */ value->rValue = model->B4SOIwvtun0; return(OK); case B4SOI_MOD_WVTUN0D: /* v4.0 */ value->rValue = model->B4SOIwvtun0d; return(OK); case B4SOI_MOD_WNBJT: value->rValue = model->B4SOIwnbjt; return(OK); case B4SOI_MOD_WLBJT0: value->rValue = model->B4SOIwlbjt0; return(OK); case B4SOI_MOD_WVABJT: value->rValue = model->B4SOIwvabjt; return(OK); case B4SOI_MOD_WAELY: value->rValue = model->B4SOIwaely; return(OK); case B4SOI_MOD_WAHLIS: /* v4.0 */ value->rValue = model->B4SOIwahli; return(OK); case B4SOI_MOD_WAHLID: /* v4.0 */ value->rValue = model->B4SOIwahlid; return(OK); /* CV Model */ case B4SOI_MOD_WVSDFB: value->rValue = model->B4SOIwvsdfb; return(OK); case B4SOI_MOD_WVSDTH: value->rValue = model->B4SOIwvsdth; return(OK); case B4SOI_MOD_WDELVT: value->rValue = model->B4SOIwdelvt; return(OK); case B4SOI_MOD_WACDE: value->rValue = model->B4SOIwacde; return(OK); case B4SOI_MOD_WMOIN: value->rValue = model->B4SOIwmoin; return(OK); case B4SOI_MOD_WNOFF: value->rValue = model->B4SOIwnoff; return(OK); /* v3.2 */ /* Cross-term Dependence */ /* v3.1 */ case B4SOI_MOD_PXJ: value->rValue = model->B4SOIpxj; return(OK); case B4SOI_MOD_PALPHAGB1: value->rValue = model->B4SOIpalphaGB1; return(OK); case B4SOI_MOD_PALPHAGB2: value->rValue = model->B4SOIpalphaGB2; return(OK); case B4SOI_MOD_PBETAGB1: value->rValue = model->B4SOIpbetaGB1; return(OK); case B4SOI_MOD_PBETAGB2: value->rValue = model->B4SOIpbetaGB2; return(OK); case B4SOI_MOD_PAIGBCP2: value->rValue = model->B4SOIpaigbcp2; return(OK); case B4SOI_MOD_PBIGBCP2: value->rValue = model->B4SOIpbigbcp2; return(OK); case B4SOI_MOD_PCIGBCP2: value->rValue = model->B4SOIpcigbcp2; return(OK); case B4SOI_MOD_PNDIF: value->rValue = model->B4SOIpndif; return(OK); case B4SOI_MOD_PNTRECF: value->rValue = model->B4SOIpntrecf; return(OK); case B4SOI_MOD_PNTRECR: value->rValue = model->B4SOIpntrecr; return(OK); case B4SOI_MOD_PXBJT: value->rValue = model->B4SOIpxbjt; return(OK); case B4SOI_MOD_PXDIFS: value->rValue = model->B4SOIpxdif; return(OK); case B4SOI_MOD_PXRECS: value->rValue = model->B4SOIpxrec; return(OK); case B4SOI_MOD_PXTUNS: value->rValue = model->B4SOIpxtun; return(OK); case B4SOI_MOD_PXDIFD: value->rValue = model->B4SOIpxdifd; return(OK); case B4SOI_MOD_PXRECD: value->rValue = model->B4SOIpxrecd; return(OK); case B4SOI_MOD_PXTUND: value->rValue = model->B4SOIpxtund; return(OK); case B4SOI_MOD_PCGDL: value->rValue = model->B4SOIpcgdl; return(OK); case B4SOI_MOD_PCGSL: value->rValue = model->B4SOIpcgsl; return(OK); case B4SOI_MOD_PCKAPPA: value->rValue = model->B4SOIpckappa; return(OK); case B4SOI_MOD_PUTE: value->rValue = model->B4SOIpute; return(OK); case B4SOI_MOD_PKT1: value->rValue = model->B4SOIpkt1; return(OK); case B4SOI_MOD_PKT2: value->rValue = model->B4SOIpkt2; return(OK); case B4SOI_MOD_PKT1L: value->rValue = model->B4SOIpkt1l; return(OK); case B4SOI_MOD_PUA1: value->rValue = model->B4SOIpua1; return(OK); case B4SOI_MOD_PUB1: value->rValue = model->B4SOIpub1; return(OK); case B4SOI_MOD_PUC1: value->rValue = model->B4SOIpuc1; return(OK); case B4SOI_MOD_PAT: value->rValue = model->B4SOIpat; return(OK); case B4SOI_MOD_PPRT: value->rValue = model->B4SOIpprt; return(OK); /* v3.0 */ case B4SOI_MOD_PAIGC: value->rValue = model->B4SOIpaigc; return(OK); case B4SOI_MOD_PBIGC: value->rValue = model->B4SOIpbigc; return(OK); case B4SOI_MOD_PCIGC: value->rValue = model->B4SOIpcigc; return(OK); case B4SOI_MOD_PAIGSD: value->rValue = model->B4SOIpaigsd; return(OK); case B4SOI_MOD_PBIGSD: value->rValue = model->B4SOIpbigsd; return(OK); case B4SOI_MOD_PCIGSD: value->rValue = model->B4SOIpcigsd; return(OK); case B4SOI_MOD_PNIGC: value->rValue = model->B4SOIpnigc; return(OK); case B4SOI_MOD_PPIGCD: value->rValue = model->B4SOIppigcd; return(OK); case B4SOI_MOD_PPOXEDGE: value->rValue = model->B4SOIppoxedge; return(OK); case B4SOI_MOD_PNPEAK: value->rValue = model->B4SOIpnpeak; return(OK); case B4SOI_MOD_PNSUB: value->rValue = model->B4SOIpnsub; return(OK); case B4SOI_MOD_PNGATE: value->rValue = model->B4SOIpngate; return(OK); case B4SOI_MOD_PNSD: value->rValue = model->B4SOIpnsd; return(OK); case B4SOI_MOD_PVTH0: value->rValue = model->B4SOIpvth0; return(OK); case B4SOI_MOD_PVFB: value->rValue = model->B4SOIpvfb; return(OK); /* v4.1 */ case B4SOI_MOD_PK1: value->rValue = model->B4SOIpk1; return(OK); case B4SOI_MOD_PK1W1: value->rValue = model->B4SOIpk1w1; return(OK); case B4SOI_MOD_PK1W2: value->rValue = model->B4SOIpk1w2; return(OK); case B4SOI_MOD_PK2: value->rValue = model->B4SOIpk2; return(OK); case B4SOI_MOD_PK3: value->rValue = model->B4SOIpk3; return(OK); case B4SOI_MOD_PK3B: value->rValue = model->B4SOIpk3b; return(OK); case B4SOI_MOD_PKB1: value->rValue = model->B4SOIpkb1; return(OK); case B4SOI_MOD_PW0: value->rValue = model->B4SOIpw0; return(OK); case B4SOI_MOD_PLPE0: value->rValue = model->B4SOIplpe0; return(OK); case B4SOI_MOD_PLPEB: /* v4.0 for Vth */ value->rValue = model->B4SOIplpeb; return(OK); case B4SOI_MOD_PDVT0 : value->rValue = model->B4SOIpdvt0; return(OK); case B4SOI_MOD_PDVT1 : value->rValue = model->B4SOIpdvt1; return(OK); case B4SOI_MOD_PDVT2 : value->rValue = model->B4SOIpdvt2; return(OK); case B4SOI_MOD_PDVT0W : value->rValue = model->B4SOIpdvt0w; return(OK); case B4SOI_MOD_PDVT1W : value->rValue = model->B4SOIpdvt1w; return(OK); case B4SOI_MOD_PDVT2W : value->rValue = model->B4SOIpdvt2w; return(OK); case B4SOI_MOD_PU0: value->rValue = model->B4SOIpu0; return(OK); case B4SOI_MOD_PUA: value->rValue = model->B4SOIpua; return(OK); case B4SOI_MOD_PUB: value->rValue = model->B4SOIpub; return(OK); case B4SOI_MOD_PUC: value->rValue = model->B4SOIpuc; return(OK); case B4SOI_MOD_PVSAT: value->rValue = model->B4SOIpvsat; return(OK); case B4SOI_MOD_PA0: value->rValue = model->B4SOIpa0; return(OK); case B4SOI_MOD_PAGS: value->rValue = model->B4SOIpags; return(OK); case B4SOI_MOD_PB0: value->rValue = model->B4SOIpb0; return(OK); case B4SOI_MOD_PB1: value->rValue = model->B4SOIpb1; return(OK); case B4SOI_MOD_PKETA: value->rValue = model->B4SOIpketa; return(OK); case B4SOI_MOD_PKETAS: value->rValue = model->B4SOIpketas; return(OK); case B4SOI_MOD_PA1: value->rValue = model->B4SOIpa1; return(OK); case B4SOI_MOD_PA2: value->rValue = model->B4SOIpa2; return(OK); case B4SOI_MOD_PRDSW: value->rValue = model->B4SOIprdsw; return(OK); case B4SOI_MOD_PRDW: value->rValue = model->B4SOIprdw; return(OK); case B4SOI_MOD_PRSW: value->rValue = model->B4SOIprsw; return(OK); case B4SOI_MOD_PPRWB: value->rValue = model->B4SOIpprwb; return(OK); case B4SOI_MOD_PPRWG: value->rValue = model->B4SOIpprwg; return(OK); case B4SOI_MOD_PWR: value->rValue = model->B4SOIpwr; return(OK); case B4SOI_MOD_PNFACTOR : value->rValue = model->B4SOIpnfactor; return(OK); case B4SOI_MOD_PDWG: value->rValue = model->B4SOIpdwg; return(OK); case B4SOI_MOD_PDWB: value->rValue = model->B4SOIpdwb; return(OK); case B4SOI_MOD_PVOFF: value->rValue = model->B4SOIpvoff; return(OK); case B4SOI_MOD_PETA0: value->rValue = model->B4SOIpeta0; return(OK); case B4SOI_MOD_PETAB: value->rValue = model->B4SOIpetab; return(OK); case B4SOI_MOD_PDSUB : value->rValue = model->B4SOIpdsub; return(OK); case B4SOI_MOD_PCIT : value->rValue = model->B4SOIpcit; return(OK); case B4SOI_MOD_PCDSC : value->rValue = model->B4SOIpcdsc; return(OK); case B4SOI_MOD_PCDSCB : value->rValue = model->B4SOIpcdscb; return(OK); case B4SOI_MOD_PCDSCD : value->rValue = model->B4SOIpcdscd; return(OK); case B4SOI_MOD_PPCLM: value->rValue = model->B4SOIppclm; return(OK); case B4SOI_MOD_PPDIBL1: value->rValue = model->B4SOIppdibl1; return(OK); case B4SOI_MOD_PPDIBL2: value->rValue = model->B4SOIppdibl2; return(OK); case B4SOI_MOD_PPDIBLB: value->rValue = model->B4SOIppdiblb; return(OK); case B4SOI_MOD_PDROUT : value->rValue = model->B4SOIpdrout; return(OK); case B4SOI_MOD_PPVAG: value->rValue = model->B4SOIppvag; return(OK); case B4SOI_MOD_PDELTA: value->rValue = model->B4SOIpdelta; return(OK); case B4SOI_MOD_PALPHA0: value->rValue = model->B4SOIpalpha0; return(OK); case B4SOI_MOD_PFBJTII: value->rValue = model->B4SOIpfbjtii; return(OK); /*4.1 Iii model*/ case B4SOI_MOD_PEBJTII: value->rValue = model->B4SOIpebjtii; return(OK); case B4SOI_MOD_PCBJTII: value->rValue = model->B4SOIpcbjtii; return(OK); case B4SOI_MOD_PVBCI: value->rValue = model->B4SOIpvbci; return(OK); case B4SOI_MOD_PABJTII: value->rValue = model->B4SOIpabjtii; return(OK); case B4SOI_MOD_PMBJTII: value->rValue = model->B4SOIpmbjtii; return(OK); case B4SOI_MOD_PBETA0: value->rValue = model->B4SOIpbeta0; return(OK); case B4SOI_MOD_PBETA1: value->rValue = model->B4SOIpbeta1; return(OK); case B4SOI_MOD_PBETA2: value->rValue = model->B4SOIpbeta2; return(OK); case B4SOI_MOD_PVDSATII0: value->rValue = model->B4SOIpvdsatii0; return(OK); case B4SOI_MOD_PLII: value->rValue = model->B4SOIplii; return(OK); case B4SOI_MOD_PESATII: value->rValue = model->B4SOIpesatii; return(OK); case B4SOI_MOD_PSII0: value->rValue = model->B4SOIpsii0; return(OK); case B4SOI_MOD_PSII1: value->rValue = model->B4SOIpsii1; return(OK); case B4SOI_MOD_PSII2: value->rValue = model->B4SOIpsii2; return(OK); case B4SOI_MOD_PSIID: value->rValue = model->B4SOIpsiid; return(OK); case B4SOI_MOD_PAGIDL: value->rValue = model->B4SOIpagidl; return(OK); case B4SOI_MOD_PBGIDL: value->rValue = model->B4SOIpbgidl; return(OK); case B4SOI_MOD_PCGIDL: value->rValue = model->B4SOIpcgidl; return(OK); case B4SOI_MOD_PEGIDL: value->rValue = model->B4SOIpegidl; return(OK); case B4SOI_MOD_PRGIDL: value->rValue = model->B4SOIprgidl; return(OK); case B4SOI_MOD_PKGIDL: value->rValue = model->B4SOIpkgidl; return(OK); case B4SOI_MOD_PFGIDL: value->rValue = model->B4SOIpfgidl; return(OK); case B4SOI_MOD_PAGISL: value->rValue = model->B4SOIpagisl; return(OK); case B4SOI_MOD_PBGISL: value->rValue = model->B4SOIpbgisl; return(OK); case B4SOI_MOD_PCGISL: value->rValue = model->B4SOIpcgisl; return(OK); case B4SOI_MOD_PEGISL: value->rValue = model->B4SOIpegisl; return(OK); case B4SOI_MOD_PRGISL: value->rValue = model->B4SOIprgisl; return(OK); case B4SOI_MOD_PKGISL: value->rValue = model->B4SOIpkgisl; return(OK); case B4SOI_MOD_PFGISL: value->rValue = model->B4SOIpfgisl; return(OK); case B4SOI_MOD_PNTUNS: /* v4.0 */ value->rValue = model->B4SOIpntun; return(OK); case B4SOI_MOD_PNTUND: /* v4.0 */ value->rValue = model->B4SOIpntund; return(OK); case B4SOI_MOD_PNDIODES: /* v4.0 */ value->rValue = model->B4SOIpndiode; return(OK); case B4SOI_MOD_PNDIODED: /* v4.0 */ value->rValue = model->B4SOIpndioded; return(OK); case B4SOI_MOD_PNRECF0S: /* v4.0 */ value->rValue = model->B4SOIpnrecf0; return(OK); case B4SOI_MOD_PNRECF0D: /* v4.0 */ value->rValue = model->B4SOIpnrecf0d; return(OK); case B4SOI_MOD_PNRECR0S: /* v4.0 */ value->rValue = model->B4SOIpnrecr0; return(OK); case B4SOI_MOD_PNRECR0D: /* v4.0 */ value->rValue = model->B4SOIpnrecr0d; return(OK); case B4SOI_MOD_PISBJT: value->rValue = model->B4SOIpisbjt; return(OK); case B4SOI_MOD_PIDBJT: /* v4.0 */ value->rValue = model->B4SOIpidbjt; return(OK); case B4SOI_MOD_PISDIF: value->rValue = model->B4SOIpisdif; return(OK); case B4SOI_MOD_PIDDIF: /* v4.0 */ value->rValue = model->B4SOIpiddif; return(OK); case B4SOI_MOD_PISREC: value->rValue = model->B4SOIpisrec; return(OK); case B4SOI_MOD_PIDREC: /* v4.0 */ value->rValue = model->B4SOIpidrec; return(OK); case B4SOI_MOD_PISTUN: value->rValue = model->B4SOIpistun; return(OK); case B4SOI_MOD_PIDTUN: /* v4.0 */ value->rValue = model->B4SOIpidtun; return(OK); case B4SOI_MOD_PVREC0S: /* v4.0 */ value->rValue = model->B4SOIpvrec0; return(OK); case B4SOI_MOD_PVREC0D: /* v4.0 */ value->rValue = model->B4SOIpvrec0d; return(OK); case B4SOI_MOD_PVTUN0S: /* v4.0 */ value->rValue = model->B4SOIpvtun0; return(OK); case B4SOI_MOD_PVTUN0D: /* v4.0 */ value->rValue = model->B4SOIpvtun0d; return(OK); case B4SOI_MOD_PNBJT: value->rValue = model->B4SOIpnbjt; return(OK); case B4SOI_MOD_PLBJT0: value->rValue = model->B4SOIplbjt0; return(OK); case B4SOI_MOD_PVABJT: value->rValue = model->B4SOIpvabjt; return(OK); case B4SOI_MOD_PAELY: value->rValue = model->B4SOIpaely; return(OK); case B4SOI_MOD_PAHLIS: /* v4.0 */ value->rValue = model->B4SOIpahli; return(OK); case B4SOI_MOD_PAHLID: /* v4.0 */ value->rValue = model->B4SOIpahlid; return(OK); /* CV Model */ case B4SOI_MOD_PVSDFB: value->rValue = model->B4SOIpvsdfb; return(OK); case B4SOI_MOD_PVSDTH: value->rValue = model->B4SOIpvsdth; return(OK); case B4SOI_MOD_PDELVT: value->rValue = model->B4SOIpdelvt; return(OK); case B4SOI_MOD_PACDE: value->rValue = model->B4SOIpacde; return(OK); case B4SOI_MOD_PMOIN: value->rValue = model->B4SOIpmoin; return(OK); case B4SOI_MOD_PNOFF: value->rValue = model->B4SOIpnoff; return(OK); /* v3.2 */ /* Added for binning - END */ case B4SOI_MOD_VGS_MAX: value->rValue = model->B4SOIvgsMax; return(OK); case B4SOI_MOD_VGD_MAX: value->rValue = model->B4SOIvgdMax; return(OK); case B4SOI_MOD_VGB_MAX: value->rValue = model->B4SOIvgbMax; return(OK); case B4SOI_MOD_VDS_MAX: value->rValue = model->B4SOIvdsMax; return(OK); case B4SOI_MOD_VBS_MAX: value->rValue = model->B4SOIvbsMax; return(OK); case B4SOI_MOD_VBD_MAX: value->rValue = model->B4SOIvbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/cktbindnode.c0000644000265600020320000000303712264261473020667 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTbindNode * * bind a node of the specified device of the given type to its place * in the specified circuit. */ #include "ngspice/ngspice.h" #include #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "dev.h" int CKTbindNode(CKTcircuit *ckt, GENinstance *instance, int term, CKTnode *node) { int mappednode; SPICEdev **devs; int type = instance->GENmodPtr->GENmodType; NG_IGNORE(ckt); devs = devices(); mappednode = node->number; if (*(devs[type]->DEVpublic.terms) >= term && term > 0) { switch(term) { default: return E_NOTERM; case 1: instance->GENnode1 = mappednode; break; case 2: instance->GENnode2 = mappednode; break; case 3: instance->GENnode3 = mappednode; break; case 4: instance->GENnode4 = mappednode; break; case 5: instance->GENnode5 = mappednode; break; case 6:/* added to consider the body node 01/06/99 */ instance->GENnode6 = mappednode; break; case 7:/* added to consider the temp node 02/03/99 */ instance->GENnode7 = mappednode; break; } return OK; } else { return E_NOTERM; } } ngspice-26/src/spicelib/devices/ltra/0000755000265600020320000000000012264261710017170 5ustar andreasadminngspice-26/src/spicelib/devices/ltra/ltramisc.c0000644000265600020320000014545012264261473021171 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ltradefs.h" #include "ngspice/suffix.h" /* * Miscellaneous functions to do with lossy lines */ /* * LTRAquadInterp - quadratic interpolation function t = timepoint where * value wanted t1, t2, t3 are three timepoints where the value is known c1, * c2, c3 are set to the proper coefficients by the function the interpolated * value is c1*v1 + c2*v2 + c3*v3; this should be done in the calling * program; (v1,v2,v3 are the known values at t1,t2,t3) */ int LTRAquadInterp(double t, double t1, double t2, double t3, double *c1, double *c2, double *c3) { double f1, f2, f3; if (t == t1) { *c1 = 1.0; *c2 = 0.0; *c3 = 0.0; return (0); } if (t == t2) { *c1 = 0.0; *c2 = 1.0; *c3 = 0.0; return (0); } if (t == t3) { *c1 = 0.0; *c2 = 0.0; *c3 = 1.0; return (0); } if ((t2 - t1) == 0 || (t3 - t2) == 0 || (t1 - t3) == 0) return (1); f1 = (t - t2) * (t - t3); f2 = (t - t1) * (t - t3); f3 = (t - t1) * (t - t2); if ((t2 - t1) == 0) { /* should never happen, but don't want to * divide by zero, EVER... */ f1 = 0; f2 = 0; } else { f1 /= (t1 - t2); f2 /= (t2 - t1); } if ((t3 - t2) == 0) { /* should never happen, but don't want to * divide by zero, EVER... */ f2 = 0; f3 = 0; } else { f2 /= (t2 - t3); f3 /= (t2 - t3); } if ((t3 - t1) == 0) { /* should never happen, but don't want to * divide by zero, EVER... */ f1 = 0; f2 = 0; } else { f1 /= (t1 - t3); f3 /= (t1 - t3); } *c1 = f1; *c2 = f2; *c3 = f3; return (0); } /* linear interpolation */ int LTRAlinInterp(double t, double t1, double t2, double *c1, double *c2) { double temp; if (t1 == t2) return (1); if (t == t1) { *c1 = 1.0; *c2 = 0.0; return (0); } if (t == t2) { *c1 = 0.0; *c2 = 1.0; return (0); } temp = (t - t1) / (t2 - t1); *c2 = temp; *c1 = 1 - temp; return (0); } /* * intlinfunc returns \int_lolimit^hilimit h(\tau) d \tau, where h(\tau) is * assumed to be linear, with values lovalue and hivalue \tau = t1 and t2 * respectively this is used only locally */ static double intlinfunc(double lolimit, double hilimit, double lovalue, double hivalue, double t1, double t2) { double width, m; width = t2 - t1; if (width == 0.0) return (0.0); m = (hivalue - lovalue) / width; return ((hilimit - lolimit) * lovalue + 0.5 * m * ((hilimit - t1) * (hilimit - t1) - (lolimit - t1) * (lolimit - t1))); } /* * twiceintlinfunc returns \int_lolimit^hilimit \int_otherlolimit^\tau * h(\tau') d \tau' d \tau , where h(\tau') is assumed to be linear, with * values lovalue and hivalue \tau = t1 and t2 respectively this is used only * locally */ static double twiceintlinfunc(double lolimit, double hilimit, double otherlolimit, double lovalue, double hivalue, double t1, double t2) { double width, m, dummy; double temp1, temp2, temp3; width = t2 - t1; if (width == 0.0) return (0.0); m = (hivalue - lovalue) / width; temp1 = hilimit - t1; temp2 = lolimit - t1; temp3 = otherlolimit - t1; dummy = lovalue * ((hilimit - otherlolimit) * (hilimit - otherlolimit) - (lolimit - otherlolimit) * (lolimit - otherlolimit)); dummy += m * ((temp1 * temp1 * temp1 - temp2 * temp2 * temp2) / 3.0 - temp3 * temp3 * (hilimit - lolimit)); return (dummy * 0.5); } /* * thriceintlinfunc returns \int_lolimit^hilimit \int_secondlolimit^\tau * \int_thirdlolimit^\tau' h(\tau'') d \tau'' d \tau' d \tau , where * h(\tau'') is assumed to be linear, with values lovalue and hivalue \tau = * t1 and t2 respectively this is used only locally */ static double thriceintlinfunc(double lolimit, double hilimit, double secondlolimit, double thirdlolimit, double lovalue, double hivalue, double t1, double t2) { double width, m, dummy; double temp1, temp2, temp3, temp4; double temp5, temp6, temp7, temp8, temp9, temp10; width = t2 - t1; if (width == 0.0) return (0.0); m = (hivalue - lovalue) / width; temp1 = hilimit - t1; temp2 = lolimit - t1; temp3 = secondlolimit - t1; temp4 = thirdlolimit - t1; temp5 = hilimit - thirdlolimit; temp6 = lolimit - thirdlolimit; temp7 = secondlolimit - thirdlolimit; temp8 = hilimit - lolimit; temp9 = hilimit - secondlolimit; temp10 = lolimit - secondlolimit; dummy = lovalue * ((temp5 * temp5 * temp5 - temp6 * temp6 * temp6) / 3 - temp7 * temp5 * temp8); dummy += m * (((temp1 * temp1 * temp1 * temp1 - temp2 * temp2 * temp2 * temp2) * 0.25 - temp3 * temp3 * temp3 * temp8) / 3 - temp4 * temp4 * 0.5 * (temp9 * temp9 - temp10 * temp10)); return (dummy * 0.5); } /* * These are from the book Numerical Recipes in C * */ static double bessI0(double x) { double ax, ans; double y; if ((ax = fabs(x)) < 3.75) { y = x / 3.75; y *= y; ans = 1.0 + y * (3.5156229 + y * (3.0899424 + y * (1.2067492 + y * (0.2659732 + y * (0.360768e-1 + y * 0.45813e-2))))); } else { y = 3.75 / ax; ans = (exp(ax) / sqrt(ax)) * (0.39894228 + y * (0.1328592e-1 + y * (0.225319e-2 + y * (-0.157565e-2 + y * (0.916281e-2 + y * (-0.2057706e-1 + y * (0.2635537e-1 + y * (-0.1647633e-1 + y * 0.392377e-2)))))))); } return (ans); } static double bessI1(double x) { double ax, ans; double y; if ((ax = fabs(x)) < 3.75) { y = x / 3.75; y *= y; ans = ax * (0.5 + y * (0.87890594 + y * (0.51498869 + y * (0.15084934 + y * (0.2658733e-1 + y * (0.301532e-2 + y * 0.32411e-3)))))); } else { y = 3.75 / ax; ans = 0.2282967e-1 + y * (-0.2895312e-1 + y * (0.1787654e-1 - y * 0.420059e-2)); ans = 0.39894228 + y * (-0.3988024e-1 + y * (-0.362018e-2 + y * (0.163801e-2 + y * (-0.1031555e-1 + y * ans)))); ans *= (exp(ax) / sqrt(ax)); } return (x < 0.0 ? -ans : ans); } static double bessI1xOverX(double x) { double ax, ans; double y; if ((ax = fabs(x)) < 3.75) { y = x / 3.75; y *= y; ans = 0.5 + y * (0.87890594 + y * (0.51498869 + y * (0.15084934 + y * (0.2658733e-1 + y * (0.301532e-2 + y * 0.32411e-3))))); } else { y = 3.75 / ax; ans = 0.2282967e-1 + y * (-0.2895312e-1 + y * (0.1787654e-1 - y * 0.420059e-2)); ans = 0.39894228 + y * (-0.3988024e-1 + y * (-0.362018e-2 + y * (0.163801e-2 + y * (-0.1031555e-1 + y * ans)))); ans *= (exp(ax) / (ax * sqrt(ax))); } return (ans); } /* LTRArlcH1dashFunc - the first impulse response function */ double LTRArlcH1dashFunc(double time, double T, double alpha, double beta) { double besselarg, exparg, returnval; /* T is not used in this function */ NG_IGNORE(T); /* * result = alpha * e^{- beta*time} * {I_1(alpha*time) - I_0(alpha*time)} */ if (alpha == 0.0) return (0.0); exparg = -beta * time; besselarg = alpha * time; returnval = (bessI1(besselarg) - bessI0(besselarg)) * alpha * exp(exparg); return (returnval); } double LTRArlcH2Func(double time, double T, double alpha, double beta) { double besselarg, exparg, returnval; /* * result = 0, time < T = (alpha*T*e^{-beta*time})/sqrt(t^2 - T^2) * * I_1(alpha*sqrt(t^2 - T^2)), time >= T */ if (alpha == 0.0) return (0.0); if (time < T) return (0.0); if (time != T) { besselarg = alpha * sqrt(time * time - T * T); } else { besselarg = 0.0; } exparg = -beta * time; returnval = alpha * alpha * T * exp(exparg) * bessI1xOverX(besselarg); return (returnval); } double LTRArlcH3dashFunc(double time, double T, double alpha, double beta) { double exparg, besselarg, returnval; /* * result = 0, time < T = alpha*e^{-beta*time}*(t/sqrt(t^2-T^2)* * I_1(alpha*sqrt(t^2-T^2)) - I_0(alpha*sqrt(t^2-T^2))) */ if (alpha == 0.0) return (0.0); if (time < T) return (0.0); exparg = -beta * time; if (time != T) { besselarg = alpha * sqrt(time * time - T * T); } else { besselarg = 0.0; } returnval = alpha * time * bessI1xOverX(besselarg) - bessI0(besselarg); returnval *= alpha * exp(exparg); return (returnval); } /* * LTRArlcH1dashTwiceIntFunc - twice repeated integral of h1dash for the * special case of G = 0 */ double LTRArlcH1dashTwiceIntFunc(double time, double beta) { double arg, returnval; /* * result = time * e^{- beta*time} * {I_0(beta*time) + I_1(beta*time)} - * time */ if (beta == 0.0) return (time); arg = beta * time; if (arg == 0.0) return (0.0); returnval = (bessI1(arg) + bessI0(arg)) * time * exp(-arg) - time; return (returnval); } /* * LTRArlcH3dashIntFunc - twice repeated integral of h1dash for the special * case of G = 0 */ double LTRArlcH3dashIntFunc(double time, double T, double beta) { double exparg, besselarg; double returnval; if (time <= T) return (0.0); if (beta == 0.0) return (0.0); exparg = -beta * time; besselarg = beta * sqrt(time * time - T * T); returnval = exp(exparg) * bessI0(besselarg) - exp(-beta * T); return (returnval); } double LTRArcH1dashTwiceIntFunc(double time, double cbyr) { return (sqrt(4 * cbyr * time / M_PI)); } double LTRArcH2TwiceIntFunc(double time, double rclsqr) { double temp; if (time != 0.0) { temp = rclsqr / (4 * time); return ((time + rclsqr * 0.5) * erfc(sqrt(temp)) - sqrt(time * rclsqr / M_PI) * exp(-temp)); } else { return (0.0); } } double LTRArcH3dashTwiceIntFunc(double time, double cbyr, double rclsqr) { double temp; if (time != 0.0) { temp = rclsqr / (4 * time); temp = 2 * sqrt(time / M_PI) * exp(-temp) - sqrt(rclsqr) * erfc(sqrt(temp)); return (sqrt(cbyr) * temp); } else { return (0.0); } } /* * LTRArcCoeffsSetup sets up the all coefficient lists for the special case * where L=G=0 */ void LTRArcCoeffsSetup(double *h1dashfirstcoeff, double *h2firstcoeff, double *h3dashfirstcoeff, double *h1dashcoeffs, double *h2coeffs, double *h3dashcoeffs, int listsize, double cbyr, double rclsqr, double curtime, double *timelist, int timeindex, double reltol) { double delta1, delta2; double h1dummy1, h1dummy2; double h2dummy1, h2dummy2; double h3dummy1, h3dummy2; double lolimit1, lolimit2, hilimit1, hilimit2; double h1lovalue1, h1lovalue2, h1hivalue1, h1hivalue2; double h2lovalue1, h2lovalue2, h2hivalue1, h2hivalue2; double h3lovalue1, h3lovalue2, h3hivalue1, h3hivalue2; double temp, temp2, temp3, temp4, temp5; double h1relval, h2relval, h3relval; int doh1 = 1, doh2 = 1, doh3 = 1; int i, auxindex; NG_IGNORE(listsize); /* coefflists should already have been allocated to the necessary size */ #ifdef LTRAdebug if (listsize <= timeindex) { printf("LTRAcoeffSetup: not enough space in coefflist\n"); } #endif auxindex = timeindex; /* the first coefficients */ delta1 = curtime - *(timelist + auxindex); lolimit1 = 0.0; hilimit1 = delta1; h1lovalue1 = 0.0; h1hivalue1 = /* LTRArcH1dashTwiceIntFunc(hilimit1,cbyr); */ sqrt(4 * cbyr * hilimit1 / M_PI); h1dummy1 = h1hivalue1 / delta1; *h1dashfirstcoeff = h1dummy1; h1relval = fabs(h1dummy1 * reltol); temp = rclsqr / (4 * hilimit1); temp2 = (temp >= 100.0 ? 0.0 : erfc(sqrt(temp))); temp3 = exp(-temp); temp4 = sqrt(rclsqr); temp5 = sqrt(cbyr); h2lovalue1 = 0.0; h2hivalue1 = /* LTRArcH2TwiceIntFunc(hilimit1,rclsqr); */ (hilimit1 != 0.0 ? (hilimit1 + rclsqr * 0.5) * temp2 - sqrt(hilimit1 * rclsqr / M_PI) * temp3 : 0.0); h2dummy1 = h2hivalue1 / delta1; *h2firstcoeff = h2dummy1; h2relval = fabs(h2dummy1 * reltol); h3lovalue1 = 0.0; h3hivalue1 = /* LTRArcH3dashTwiceIntFunc(hilimit1,cbyr,rcls * qr); */ (hilimit1 != 0.0 ? temp = 2 * sqrt(hilimit1 / M_PI) * temp3 - temp4 * temp2, (temp5 * temp) : 0.0); h3dummy1 = h3hivalue1 / delta1; *h3dashfirstcoeff = h3dummy1; h3relval = fabs(h3dummy1 * reltol); /* the coefficients for the rest of the timepoints */ for (i = auxindex; i > 0; i--) { delta2 = delta1; /* previous delta1 */ lolimit2 = lolimit1; /* previous lolimit1 */ hilimit2 = hilimit1; /* previous hilimit1 */ delta1 = *(timelist + i) - *(timelist + i - 1); lolimit1 = hilimit2; hilimit1 = curtime - *(timelist + i - 1); if (doh1) { h1lovalue2 = h1lovalue1; /* previous lovalue1 */ h1hivalue2 = h1hivalue1; /* previous hivalue1 */ h1dummy2 = h1dummy1; /* previous dummy1 */ h1lovalue1 = h1hivalue2; h1hivalue1 = /* LTRArcH1dashTwiceIntFunc(hilimit1,cbyr); */ sqrt(4 * cbyr * hilimit1 / M_PI); h1dummy1 = (h1hivalue1 - h1lovalue1) / delta1; *(h1dashcoeffs + i) = h1dummy1 - h1dummy2; if (fabs(*(h1dashcoeffs + i)) < h1relval) doh1 = 0; } else *(h1dashcoeffs + i) = 0.0; if (doh2 || doh3) { temp = rclsqr / (4 * hilimit1); temp2 = (temp >= 100.0 ? 0.0 : erfc(sqrt(temp))); temp3 = exp(-temp); } if (doh2) { h2lovalue2 = h2lovalue1; /* previous lovalue1 */ h2hivalue2 = h2hivalue1; /* previous hivalue1 */ h2dummy2 = h2dummy1; /* previous dummy1 */ h2lovalue1 = h2hivalue2; h2hivalue1 = /* LTRArcH2TwiceIntFunc(hilimit1,rclsqr); */ (hilimit1 != 0.0 ? (hilimit1 + rclsqr * 0.5) * temp2 - sqrt(hilimit1 * rclsqr / M_PI) * temp3 : 0.0); h2dummy1 = (h2hivalue1 - h2lovalue1) / delta1; *(h2coeffs + i) = h2dummy1 - h2dummy2; if (fabs(*(h2coeffs + i)) < h2relval) doh2 = 0; } else *(h2coeffs + i) = 0.0; if (doh3) { h3lovalue2 = h3lovalue1; /* previous lovalue1 */ h3hivalue2 = h3hivalue1; /* previous hivalue1 */ h3dummy2 = h3dummy1; /* previous dummy1 */ h3lovalue1 = h3hivalue2; h3hivalue1 = /* LTRArcH3dashTwiceIntFunc(hilimit1,cbyr,rcls * qr); */ (hilimit1 != 0.0 ? temp = 2 * sqrt(hilimit1 / M_PI) * temp3 - temp4 * temp2, (temp5 * temp) : 0.0); h3dummy1 = (h3hivalue1 - h3lovalue1) / delta1; *(h3dashcoeffs + i) = h3dummy1 - h3dummy2; if (fabs(*(h3dashcoeffs + i)) < h3relval) doh3 = 0; } else *(h3dashcoeffs + i) = 0.0; } } void LTRArlcCoeffsSetup(double *h1dashfirstcoeff, double *h2firstcoeff, double *h3dashfirstcoeff, double *h1dashcoeffs, double *h2coeffs, double *h3dashcoeffs, int listsize, double T, double alpha, double beta, double curtime, double *timelist, int timeindex, double reltol, int *auxindexptr) { unsigned exact; double lolimit1, lolimit2 = 0.0, hilimit1, hilimit2 = 0.0; double delta1, delta2; double h1dummy1, h1dummy2; double h1lovalue1, h1lovalue2, h1hivalue1, h1hivalue2; double h2dummy1 = 0.0, h2dummy2; double h2lovalue1 = 0.0, h2lovalue2, h2hivalue1 = 0.0, h2hivalue2; double h3dummy1 = 0.0, h3dummy2; double h3lovalue1 = 0.0, h3lovalue2, h3hivalue1 = 0.0, h3hivalue2; double exparg, besselarg = 0.0, expterm, bessi1overxterm, bessi0term; double expbetaTterm = 0.0, alphasqTterm = 0.0; double h1relval, h2relval = 0.0, h3relval = 0.0; int doh1 = 1, doh2 = 1, doh3 = 1; int i, auxindex; NG_IGNORE(listsize); /* coefflists should already have been allocated to the necessary size */ #ifdef LTRAdebug if (listsize <= timeindex) { printf("LTRArlcCoeffsSetup: not enough space in coefflist\n"); } #endif /* * we assume a piecewise linear function, and we calculate the coefficients * using this assumption in the integration of the function */ if (T == 0.0) { auxindex = timeindex; } else { if (curtime - T <= 0.0) { auxindex = 0; } else { exact = 0; for (i = timeindex; i >= 0; i--) { if (curtime - *(timelist + i) == T) { exact = 1; break; } if (curtime - *(timelist + i) > T) break; } #ifdef LTRADEBUG if ((i < 0) || ((i == 0) && (exact == 1))) printf("LTRAcoeffSetup: i <= 0: some mistake!\n"); #endif if (exact == 1) { auxindex = i - 1; } else { auxindex = i; } } } /* the first coefficient */ if (auxindex != 0) { lolimit1 = T; hilimit1 = curtime - *(timelist + auxindex); delta1 = hilimit1 - lolimit1; h2lovalue1 = LTRArlcH2Func(T, T, alpha, beta); besselarg = (hilimit1 > T) ? alpha * sqrt(hilimit1 * hilimit1 - T * T) : 0.0; exparg = -beta * hilimit1; expterm = exp(exparg); bessi1overxterm = bessI1xOverX(besselarg); alphasqTterm = alpha * alpha * T; h2hivalue1 = /* LTRArlcH2Func(hilimit1,T,alpha,beta); */ ((alpha == 0.0) || (hilimit1 < T)) ? 0.0 : alphasqTterm * expterm * bessi1overxterm; h2dummy1 = twiceintlinfunc(lolimit1, hilimit1, lolimit1, h2lovalue1, h2hivalue1, lolimit1, hilimit1) / delta1; *h2firstcoeff = h2dummy1; h2relval = fabs(reltol * h2dummy1); h3lovalue1 = 0.0; /* E3dash should be consistent with this */ bessi0term = bessI0(besselarg); expbetaTterm = exp(-beta * T); h3hivalue1 = /* LTRArlcH3dashIntFunc(hilimit1,T,beta); */ ((hilimit1 <= T) || (beta == 0.0)) ? 0.0 : expterm * bessi0term - expbetaTterm; h3dummy1 = intlinfunc(lolimit1, hilimit1, h3lovalue1, h3hivalue1, lolimit1, hilimit1) / delta1; *h3dashfirstcoeff = h3dummy1; h3relval = fabs(h3dummy1 * reltol); } else { *h2firstcoeff = *h3dashfirstcoeff = 0.0; } lolimit1 = 0.0; hilimit1 = curtime - *(timelist + timeindex); delta1 = hilimit1 - lolimit1; exparg = -beta * hilimit1; expterm = exp(exparg); h1lovalue1 = 0.0; h1hivalue1 = /* LTRArlcH1dashTwiceIntFunc(hilimit1,beta); */ (beta == 0.0) ? hilimit1 : ((hilimit1 == 0.0) ? 0.0 : (bessI1(-exparg) + bessI0(-exparg)) * hilimit1 * expterm - hilimit1); h1dummy1 = h1hivalue1 / delta1; *h1dashfirstcoeff = h1dummy1; h1relval = fabs(h1dummy1 * reltol); /* the coefficients for the rest of the timepoints */ for (i = timeindex; i > 0; i--) { if (doh1 || doh2 || doh3) { lolimit2 = lolimit1; /* previous lolimit1 */ hilimit2 = hilimit1; /* previous hilimit1 */ delta2 = delta1; /* previous delta1 */ lolimit1 = hilimit2; hilimit1 = curtime - *(timelist + i - 1); delta1 = *(timelist + i) - *(timelist + i - 1); exparg = -beta * hilimit1; expterm = exp(exparg); } if (doh1) { h1lovalue2 = h1lovalue1; /* previous lovalue1 */ h1hivalue2 = h1hivalue1; /* previous hivalue1 */ h1dummy2 = h1dummy1; /* previous dummy1 */ h1lovalue1 = h1hivalue2; h1hivalue1 = /* LTRArlcH1dashTwiceIntFunc(hilimit1,beta); */ (beta == 0.0) ? hilimit1 : ((hilimit1 == 0.0) ? 0.0 : (bessI1(-exparg) + bessI0(-exparg)) * hilimit1 * expterm - hilimit1); h1dummy1 = (h1hivalue1 - h1lovalue1) / delta1; *(h1dashcoeffs + i) = h1dummy1 - h1dummy2; if (fabs(*(h1dashcoeffs + i)) <= h1relval) doh1 = 0; } else *(h1dashcoeffs + i) = 0.0; if (i <= auxindex) { /* * if (i == auxindex) { lolimit2 = T; delta2 = hilimit2 - lolimit2; } */ if (doh2 || doh3) besselarg = (hilimit1 > T) ? alpha * sqrt(hilimit1 * hilimit1 - T * T) : 0.0; if (doh2) { h2lovalue2 = h2lovalue1;/* previous lovalue1 */ h2hivalue2 = h2hivalue1;/* previous hivalue1 */ h2dummy2 = h2dummy1; /* previous dummy1 */ h2lovalue1 = h2hivalue2; bessi1overxterm = bessI1xOverX(besselarg); h2hivalue1 = /* LTRArlcH2Func(hilimit1,T,alpha,beta); */ ((alpha == 0.0) || (hilimit1 < T)) ? 0.0 : alphasqTterm * expterm * bessi1overxterm; h2dummy1 = twiceintlinfunc(lolimit1, hilimit1, lolimit1, h2lovalue1, h2hivalue1, lolimit1, hilimit1) / delta1; *(h2coeffs + i) = h2dummy1 - h2dummy2 + intlinfunc(lolimit2, hilimit2, h2lovalue2, h2hivalue2, lolimit2, hilimit2); if (fabs(*(h2coeffs + i)) <= h2relval) doh2 = 0; } else *(h2coeffs + i) = 0.0; if (doh3) { h3lovalue2 = h3lovalue1;/* previous lovalue1 */ h3hivalue2 = h3hivalue1;/* previous hivalue1 */ h3dummy2 = h3dummy1; /* previous dummy1 */ h3lovalue1 = h3hivalue2; bessi0term = bessI0(besselarg); h3hivalue1 = /* LTRArlcH3dashIntFunc(hilimit1,T,beta); */ ((hilimit1 <= T) || (beta == 0.0)) ? 0.0 : expterm * bessi0term - expbetaTterm; h3dummy1 = intlinfunc(lolimit1, hilimit1, h3lovalue1, h3hivalue1, lolimit1, hilimit1) / delta1; *(h3dashcoeffs + i) = h3dummy1 - h3dummy2; if (fabs(*(h3dashcoeffs + i)) <= h3relval) doh3 = 0; } else *(h3dashcoeffs + i) = 0.0; } } *auxindexptr = auxindex; } /* * LTRAstraightLineCheck - takes the co-ordinates of three points, finds the * area of the triangle enclosed by these points and compares this area with * the area of the quadrilateral formed by the line between the first point * and the third point, the perpendiculars from the first and third points to * the x-axis, and the x-axis. If within reltol, then it returns 1, else 0. * The purpose of this function is to determine if three points lie * acceptably close to a straight line. This area criterion is used because * it is related to integrals and convolution */ int LTRAstraightLineCheck(double x1, double y1, double x2, double y2, double x3, double y3, double reltol, double abstol) { /* * double asqr, bsqr, csqr, c, c1sqr; double htsqr; */ double TRarea, QUADarea1, QUADarea2, QUADarea3, area; /* * asqr = (x2-x1)*(x2-x1) + (y2-y1)*(y2-y1); bsqr = (x3-x2)*(x3-x2) + * (y3-y2)*(y3-y2); csqr = (x3-x1)*(x3-x1) + (y3-y1)*(y3-y1); c = * sqrt(csqr); c1sqr = (asqr - bsqr + csqr)/(2*c); c1sqr *= c1sqr; htsqr = * asqr - c1sqr; TRarea = c*sqrt(htsqr)*0.5; */ /* * this should work if y1,y2,y3 all have the same sign and x1,x2,x3 are in * increasing order */ QUADarea1 = (fabs(y2) + fabs(y1)) * 0.5 * fabs(x2 - x1); QUADarea2 = (fabs(y3) + fabs(y2)) * 0.5 * fabs(x3 - x2); QUADarea3 = (fabs(y3) + fabs(y1)) * 0.5 * fabs(x3 - x1); TRarea = fabs(QUADarea3 - QUADarea1 - QUADarea2); area = QUADarea1 + QUADarea2; if (area * reltol + abstol > TRarea) return (1); else return (0); } /* * i is thestrchr of the latest value, a,b,c values correspond to values at * t_{i-2}, t{i-1} and t_i */ #define SECONDDERIV(i,a,b,c) (oof = (i==ckt->CKTtimeIndex+1?curtime:\ *(ckt->CKTtimePoints+i)),\ (( c - b )/(oof-*(ckt->CKTtimePoints+i-1)) -\ ( b - a )/(*(ckt->CKTtimePoints+i-1)-\ *(ckt->CKTtimePoints+i-2)))/(oof - \ *(ckt->CKTtimePoints+i-2))) /* * LTRAlteCalculate - returns sum of the absolute values of the total local * truncation error of the 2 equations for the LTRAline */ double LTRAlteCalculate(CKTcircuit *ckt, GENmodel *genmodel, GENinstance *geninstance, double curtime) { LTRAmodel *model = (LTRAmodel *) genmodel; LTRAinstance *instance = (LTRAinstance *) geninstance; double h1dashTfirstCoeff; double h2TfirstCoeff = 0.0; double h3dashTfirstCoeff = 0.0; double dashdash; double oof; double hilimit1, lolimit1, hivalue1, lovalue1, f1i, g1i; double eq1LTE = 0.0, eq2LTE = 0.0; int auxindex = 0, tdover, i, exact; switch (model->LTRAspecialCase) { case LTRA_MOD_LC: case LTRA_MOD_RG: return (0.0); break; case LTRA_MOD_RLC: if (curtime > model->LTRAtd) { tdover = 1; exact = 0; for (i = ckt->CKTtimeIndex; i >= 0; i--) { if (curtime - *(ckt->CKTtimePoints + i) == model->LTRAtd) { exact = 1; break; } if (curtime - *(ckt->CKTtimePoints + i) > model->LTRAtd) break; } #ifdef LTRADEBUG if ((i < 0) || ((i == 0) && (exact == 1))) printf("LTRAlteCalculate: i <= 0: some mistake!\n"); #endif if (exact == 1) { auxindex = i - 1; } else { auxindex = i; } } else { tdover = 0; } hilimit1 = curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex); lolimit1 = 0.0; hivalue1 = LTRArlcH1dashTwiceIntFunc(hilimit1, model->LTRAbeta); lovalue1 = 0.0; f1i = hivalue1; g1i = intlinfunc(lolimit1, hilimit1, lovalue1, hivalue1, lolimit1, hilimit1); h1dashTfirstCoeff = 0.5 * f1i * (curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)) - g1i; if (tdover) { hilimit1 = curtime - *(ckt->CKTtimePoints + auxindex); lolimit1 = *(ckt->CKTtimePoints + ckt->CKTtimeIndex) - *(ckt->CKTtimePoints + auxindex); lolimit1 = MAX(model->LTRAtd, lolimit1); /* * are the following really doing the operations in the write-up? */ hivalue1 = LTRArlcH2Func(hilimit1, model->LTRAtd, model->LTRAalpha, model->LTRAbeta); lovalue1 = LTRArlcH2Func(lolimit1, model->LTRAtd, model->LTRAalpha, model->LTRAbeta); f1i = twiceintlinfunc(lolimit1, hilimit1, lolimit1, lovalue1, hivalue1, lolimit1, hilimit1); g1i = thriceintlinfunc(lolimit1, hilimit1, lolimit1, lolimit1, lovalue1, hivalue1, lolimit1, hilimit1); h2TfirstCoeff = 0.5 * f1i * (curtime - model->LTRAtd - *(ckt->CKTtimePoints + auxindex)) - g1i; hivalue1 = LTRArlcH3dashIntFunc(hilimit1, model->LTRAtd, model->LTRAbeta); lovalue1 = LTRArlcH3dashIntFunc(lolimit1, model->LTRAtd, model->LTRAbeta); f1i = intlinfunc(lolimit1, hilimit1, lovalue1, hivalue1, lolimit1, hilimit1); g1i = twiceintlinfunc(lolimit1, hilimit1, lolimit1, lovalue1, hivalue1, lolimit1, hilimit1); h3dashTfirstCoeff = 0.5 * f1i * (curtime - model->LTRAtd - *(ckt->CKTtimePoints + auxindex)) - g1i; } /* LTEs for convolution with v1 */ /* get divided differences for v1 (2nd derivative estimates) */ /* * no need to subtract operating point values because taking differences * anyway */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAv1 + ckt->CKTtimeIndex - 1), *(instance->LTRAv1 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAposNode1) - *(ckt->CKTrhsOld + instance->LTRAnegNode1)); eq1LTE += model->LTRAadmit * fabs(dashdash * h1dashTfirstCoeff); /* * not bothering to interpolate since everything is approximate anyway */ if (tdover) { dashdash = SECONDDERIV(auxindex + 1, *(instance->LTRAv1 + auxindex - 1), *(instance->LTRAv1 + auxindex), *(instance->LTRAv1 + auxindex + 1)); eq2LTE += model->LTRAadmit * fabs(dashdash * h3dashTfirstCoeff); } /* end LTEs for convolution with v1 */ /* LTEs for convolution with v2 */ /* get divided differences for v2 (2nd derivative estimates) */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAv2 + ckt->CKTtimeIndex - 1), *(instance->LTRAv2 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAposNode2) - *(ckt->CKTrhsOld + instance->LTRAnegNode2)); eq2LTE += model->LTRAadmit * fabs(dashdash * h1dashTfirstCoeff); if (tdover) { dashdash = SECONDDERIV(auxindex + 1, *(instance->LTRAv2 + auxindex - 1), *(instance->LTRAv2 + auxindex), *(instance->LTRAv2 + auxindex + 1)); eq1LTE += model->LTRAadmit * fabs(dashdash * h3dashTfirstCoeff); } /* end LTEs for convolution with v2 */ /* LTE for convolution with i1 */ /* get divided differences for i1 (2nd derivative estimates) */ if (tdover) { dashdash = SECONDDERIV(auxindex + 1, *(instance->LTRAi1 + auxindex - 1), *(instance->LTRAi1 + auxindex), *(instance->LTRAi1 + auxindex + 1)); eq2LTE += fabs(dashdash * h2TfirstCoeff); } /* end LTE for convolution with i1 */ /* LTE for convolution with i2 */ /* get divided differences for i2 (2nd derivative estimates) */ if (tdover) { dashdash = SECONDDERIV(auxindex + 1, *(instance->LTRAi2 + auxindex - 1), *(instance->LTRAi2 + auxindex), *(instance->LTRAi2 + auxindex + 1)); eq1LTE += fabs(dashdash * h2TfirstCoeff); } /* end LTE for convolution with i1 */ break; case LTRA_MOD_RC: hilimit1 = curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex); lolimit1 = 0.0; hivalue1 = LTRArcH1dashTwiceIntFunc(hilimit1, model->LTRAcByR); lovalue1 = 0.0; f1i = hivalue1; g1i = intlinfunc(lolimit1, hilimit1, lovalue1, hivalue1, lolimit1, hilimit1); h1dashTfirstCoeff = 0.5 * f1i * (curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)) - g1i; hivalue1 = LTRArcH2TwiceIntFunc(hilimit1, model->LTRArclsqr); lovalue1 = 0.0; f1i = hivalue1; g1i = intlinfunc(lolimit1, hilimit1, lovalue1, hivalue1, lolimit1, hilimit1); h1dashTfirstCoeff = 0.5 * f1i * (curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)) - g1i; hivalue1 = LTRArcH2TwiceIntFunc(hilimit1, model->LTRArclsqr); lovalue1 = 0.0; f1i = hivalue1; g1i = intlinfunc(lolimit1, hilimit1, lovalue1, hivalue1, lolimit1, hilimit1); h1dashTfirstCoeff = 0.5 * f1i * (curtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)) - g1i; /* LTEs for convolution with v1 */ /* get divided differences for v1 (2nd derivative estimates) */ /* * no need to subtract operating point values because taking differences * anyway */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAv1 + ckt->CKTtimeIndex - 1), *(instance->LTRAv1 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAposNode1) - *(ckt->CKTrhsOld + instance->LTRAnegNode1)); eq1LTE += fabs(dashdash * h1dashTfirstCoeff); eq2LTE += fabs(dashdash * h3dashTfirstCoeff); /* end LTEs for convolution with v1 */ /* LTEs for convolution with v2 */ /* get divided differences for v2 (2nd derivative estimates) */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAv2 + ckt->CKTtimeIndex - 1), *(instance->LTRAv2 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAposNode2) - *(ckt->CKTrhsOld + instance->LTRAnegNode2)); eq2LTE += fabs(dashdash * h1dashTfirstCoeff); eq1LTE += fabs(dashdash * h3dashTfirstCoeff); /* end LTEs for convolution with v2 */ /* LTE for convolution with i1 */ /* get divided differences for i1 (2nd derivative estimates) */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAi1 + ckt->CKTtimeIndex - 1), *(instance->LTRAi1 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAbrEq1)); eq2LTE += fabs(dashdash * h2TfirstCoeff); /* end LTE for convolution with i1 */ /* LTE for convolution with i2 */ /* get divided differences for i2 (2nd derivative estimates) */ dashdash = SECONDDERIV(ckt->CKTtimeIndex + 1, *(instance->LTRAi2 + ckt->CKTtimeIndex - 1), *(instance->LTRAi2 + ckt->CKTtimeIndex), *(ckt->CKTrhsOld + instance->LTRAbrEq2)); eq1LTE += fabs(dashdash * h2TfirstCoeff); /* end LTE for convolution with i1 */ break; default: return (1 /* error */ ); } #ifdef LTRADEBUG fprintf(stdout, "%s: LTE/input for Eq1 at time %g is: %g\n", instance->LTRAname, curtime, eq1LTE / instance->LTRAinput1); fprintf(stdout, "%s: LTE/input for Eq2 at time %g is: %g\n", instance->LTRAname, curtime, eq2LTE / instance->LTRAinput1); fprintf(stdout, "\n"); #endif return (fabs(eq1LTE) + fabs(eq2LTE)); } /*********************************************************************/ /****************** old stuff, retained for historical interest ******/ /*********************************************************************/ /* * LTRAcoeffSetup sets up the coefficient list for the convolution, returns * the coefficient at (current_timepoint-T) */ /* * double * LTRAcoeffSetup(coefflist,listsize,T,firstvalue,valuelist,curtime,timelist,t * imeindex,auxindexptr) double *coefflist, *timelist, *valuelist; int * listsize, timeindex; double T, firstvalue, curtime; int *auxindexptr; * * { unsigned exact; double returnval, delta1, delta2; double dummy1, dummy2; * double lolimit1,lolimit2,hilimit1,hilimit2; double * lovalue1,lovalue2,hivalue1,hivalue2; int i,auxindex; */ /* coefflist should already have been allocated to the necessary size */ /* * #ifdef LTRAdebug if (listsize <= timeindex) { printf("LTRAcoeffSetup: not * enough space in coefflist\n"); } #endif * */ /* * we assume a piecewise linear function, and we calculate the coefficients * using this assumption in the integration of the function */ /* * if (T == 0.0) { auxindex = timeindex; } else { * * if (curtime - T <= 0.0) { for (i =0; i<= timeindex; i++) { (coefflist + i) = * 0.0; } auxindexptr = 0; return(0.0); } else { exact = 0; for (i = * timeindex; i>= 0; i--) { if (curtime - *(timelist + i) == T) { exact =1; * break; } if (curtime - *(timelist + i) > T) break; } * * #ifdef LTRADEBUG if ((i < 0) || ((i==0) && (exact==1))) * printf("LTRAcoeffSetup: i <= 0: some mistake!\n"); #endif * * if (exact == 1) { auxindex = i-1; } else { auxindex = i; } } } */ /* the first coefficient */ /* * delta1 = curtime -T - *(timelist + auxindex); lolimit1 = T; hilimit1 = T + * delta1; lovalue1 = firstvalue; hivalue1 = *(valuelist + auxindex); dummy1 * = twiceintlinfunc(lolimit1,hilimit1,lolimit1,lovalue1, * hivalue1,lolimit1,hilimit1)/delta1; returnval = dummy1; * */ /* the coefficients for the rest of the timepoints */ /* * for (i=auxindex; i>0; i--) { * * delta2 = delta1; *//* previous delta1 */ /* lolimit2 = lolimit1; *//* previous lolimit1 */ /* hilimit2 = hilimit1; *//* previous hilimit1 */ /* lovalue2 = lovalue1; *//* previous lovalue1 */ /* hivalue2 = hivalue1; *//* previous hivalue1 */ /* dummy2 = dummy1; *//* previous dummy1 */ /* * delta1 = *(timelist + i) - *(timelist + i - 1); lolimit1 = hilimit2; * hilimit1 = curtime - *(timelist + i - 1); lovalue1 = hivalue2; hivalue1 = * *(valuelist + i - 1); dummy1 = twiceintlinfunc(lolimit1,hilimit1,lolimit1, * lovalue1,hivalue1,lolimit1,hilimit1)/delta1; * * (coefflist + i) = dummy1 - dummy2 + intlinfunc(lolimit2,hilimit2, * lovalue2,hivalue2,lolimit2,hilimit2); } auxindexptr = auxindex; * return(returnval); } */ /* * LTRAtCoeffSetup sets up the coefficient list for the LTE calculation, * returns the coefficient at (current_timepoint-T) */ /* * double LTRAtCoeffSetup(coefflist,listsize,T,valuelist, * firstothervalue,othervaluelist,curtime,timelist,timeindex, auxindexptr, * ltecontype) double *coefflist, *timelist, *valuelist, *othervaluelist; int * listsize, timeindex; double T, firstothervalue, curtime; int *auxindexptr, * ltecontype; * * { unsigned exact; double returnval, delta; double dummy; double f1i, f2i, * g1i, g2i; double lolimit1, hilimit1; double lovalue1, hivalue1; double * lolimit2, hilimit2; double lovalue2, hivalue2; double firstint1 = 0.0, * firstint2 = 0.0; double secondint1 = 0.0, secondint2 = 0.0; int * i,auxindex; * */ /* coefflist should already have been allocated to the necessary size */ /* * #ifdef LTRAdebug if (listsize <= timeindex) { printf("LTRAtCoeffSetup: not * enough space in coefflist\n"); } #endif * */ /* * we assume a piecewise linear function, and we calculate the coefficients * using this assumption in the integration of the function */ /* * if (T == 0.0) { auxindex = timeindex; } else { * * if (curtime - T <= 0.0) { for (i =0; i<= timeindex; i++) { (coefflist + i) = * 0.0; } auxindexptr = 0; return(0.0); } else { exact = 0; for (i = * timeindex; i>= 0; i--) { if (curtime - *(timelist + i) == T) { exact =1; * break; } if (curtime - *(timelist + i) > T) break; } * * #ifdef LTRADEBUG if ((i < 0) || ((i==0) && (exact==1))) * printf("LTRAcoeffSetup: i <= 0: some mistake!\n"); #endif * * if (exact == 1) { auxindex = i-1; } else { auxindex = i; } } } */ /* the first coefficient */ /* i = n in the write-up */ /* * hilimit1 = curtime - *(timelist + auxindex); hivalue1 = *(valuelist + * auxindex); lolimit1 = *(timelist + timeindex) - *(timelist + auxindex); * lolimit1 = MAX(T,lolimit1); lovalue1 = firstothervalue; f1i = * twiceintlinfunc(lolimit1,hilimit1,lolimit1,lovalue1,hivalue1,lolimit1, * hilimit1); g1i = * thriceintlinfunc(lolimit1,hilimit1,lolimit1,lolimit1,lovalue1, * hivalue1,lolimit1,hilimit1); returnval = 0.5*f1i*(curtime-T- * *(timelist+auxindex)) - g1i; * */ /* the coefficients for the rest of the timepoints */ /* * if (ltecontype != LTRA_MOD_HALFCONTROL) { for (i=auxindex; i>0; i--) { * * lolimit2 = lolimit1; *//* previous lolimit1 */ /* hilimit2 = hilimit1; *//* previous hilimit1 */ /* lovalue2 = lovalue1; *//* previous lovalue1 */ /* hivalue2 = hivalue1; *//* previous hivalue1 */ /* f2i = f1i; *//* previous f1i */ /* g2i = g1i; *//* previous g1i */ /* firstint2 = firstint1; *//* previous firstint1 */ /* secondint2 = secondint1; *//* previous secondint1 */ /* * lolimit1 = *(timelist + timeindex) - *(timelist + i - 1); hilimit1 = * curtime - *(timelist + i - 1); lovalue1 = *(othervaluelist + i - 1); * hivalue1 = *(valuelist + i - 1); firstint1 += intlinfunc(lolimit2, * lolimit1, lovalue2, lovalue1, lolimit2, lolimit1); secondint1 += * (lolimit1-lolimit2)*firstint2 + twiceintlinfunc( * lolimit2,lolimit1,lolimit2,lovalue2,lovalue1,lolimit2,lolimit1); f1i = * twiceintlinfunc(lolimit1,hilimit1,lolimit1,lovalue1,hivalue1, * lolimit1,hilimit1) + firstint1*(hilimit1-lolimit1); g1i = * thriceintlinfunc(lolimit1,hilimit1,lolimit1,lolimit1, * lovalue1,hivalue1,lolimit1,hilimit1) + * (hilimit1-lolimit1)*(hilimit1-lolimit1)*0.5*firstint1 + * (hilimit1-lolimit1)*secondint1; * * (coefflist + i) = g2i - g1i + 0.5*(f1i + f2i)*(*(timelist+i) - * (timelist+i-1)); } } auxindexptr = auxindex; return(returnval); } */ /* * formulae taken from the Handbook of Mathematical Functions by Milton * Abramowitz and Irene A. Stegan, page 378, formulae 9.8.1 - 9.8.4 */ /* * double bessi0(x) double x; { double t, tsq, oneovert, result, dummy; int i; * static double coeffs1[7], coeffs2[9]; * * coeffs1[0] = 1.0; coeffs1[1] = 3.5156229; coeffs1[2] = 3.0899424; coeffs1[3] * = 1.2067492; coeffs1[4] = 0.2659732; coeffs1[5] = 0.0360768; coeffs1[6] = * 0.0045813; * * coeffs2[0] = 0.39894228; coeffs2[1] = 0.01328592; coeffs2[2] = 0.00225319; * coeffs2[3] = -0.00157565; coeffs2[4] = 0.00916281; coeffs2[5] = * -0.02057706; coeffs2[6] = 0.02635537; coeffs2[7] = -0.01647633; coeffs2[8] * = 0.00392377; * * t = x/3.75; dummy = 1.0; * * if (fabs(t) <= 1) { tsq = t*t; * * result = 1.0; for (i=1;i<=6;i++) { dummy *= tsq; ; result += dummy * * coeffs1[i]; } } else { oneovert = 1/fabs(t); * * result = coeffs2[0]; for (i=1;i<=8;i++) { dummy *= oneovert; result += * coeffs2[2] * dummy; } result *= exp(x) * sqrt(1/fabs(x)); } * return(result); } * * double bessi1(x) double x; { double t, tsq, oneovert, result, dummy; int i; * static double coeffs1[7], coeffs2[9]; * * coeffs1[0] = 0.5; coeffs1[1] = 0.87890594; coeffs1[2] = 0.51498869; * coeffs1[3] = 0.15084934; coeffs1[4] = 0.02658733; coeffs1[5] = 0.00301532; * coeffs1[6] = 0.00032411; * * coeffs2[0] = 0.39894228; coeffs2[1] = -0.03988024; coeffs2[2] = -0.00362018; * coeffs2[3] = 0.00163801; coeffs2[4] = -0.01031555; coeffs2[5] = * 0.02282967; coeffs2[6] = -0.02895312; coeffs2[7] = 0.01787654; coeffs2[8] * = -0.00420059; * * t = x/3.75; dummy = 1.0; * * if (fabs(t) <= 1) { tsq = t*t; * * result = 0.5; for (i=1;i<=6;i++) { dummy *= tsq; ; result += dummy * * coeffs1[i]; } result *= x; } else { oneovert = 1/fabs(t); * * result = coeffs2[0]; for (i=1;i<=8;i++) { dummy *= oneovert; result += * coeffs2[2] * dummy; } result *= exp(x) * sqrt(1/fabs(x)); if (x < 0) * result = -result; } return(result); } */ /* * LTRAdivDiffs returns divided differences after 2 iterations, an * approximation to the second derivatives. The algorithm is picked up * directly from Tom Quarles' CKTterr.c; no attempt has been made to figure * out why it does what it does. */ /* * double LTRAdivDiffs(difflist, valuelist, firstvalue, curtime, timelist, * timeindex) double *difflist, *valuelist, firstvalue, *timelist, curtime; * int timeindex; * * { double *dtime, *diffs, returnval; int i,j; * * diffs = TMALLOC(double, timeindex + 2); * dtime = TMALLOC(double, timeindex + 2); */ /* now divided differences */ /* * for(i=timeindex+1;i>=0;i--) { (diffs+i) = (i == timeindex+1 ? firstvalue : * *(valuelist + i)); } for(i=timeindex+1 ; i > 0 ; i--) { (dtime+i) = (i == * timeindex+1? curtime: *(timelist + i)) - (timelist + i - 1); } j = 2; *//* for the second derivative */ /* * while(1) { for(i=timeindex + 1;i > 0; i--) { (diffs+i) = (*(diffs+i) - * *(diffs+i-1))/ *(dtime+i); } j--; if (j <= 0) break; for(i=timeindex+1;i > * 0;i--) { (dtime+i) = *(dtime+i-1) + (i == timeindex+1? curtime: *(timelist * + i)) - *(timelist + i - 1); } } * * for (i = timeindex; i>=0 ; i--) { (difflist+i) = *(diffs+i); } * * returnval = *(diffs+timeindex+1); FREE(dtime); FREE(diffs); */ /* difflist[0] is going to be bad */ /* * return(returnval); } */ /* * LTRAlteCalculate - returns sum of the absolute values of the total local * truncation error of the 2 equations for the LTRAline */ /* * double LTRAlteCalculate(ckt,model,instance,curtime) CKTcircuit *ckt; * LTRAmodel *model; register LTRAinstance *instance; double * curtime; * * { double *h1dashTcoeffs, h1dashTfirstCoeff; double *h2Tcoeffs, h2TfirstCoeff; * double *h3dashTcoeffs, h3dashTfirstCoeff; double *SecondDerivs, * FirstSecondDeriv; double t1, t2, t3, f1, f2, f3; double eq1LTE=0.0, * eq2LTE=0.0; int isaved, tdover, i; * * if (curtime > model->LTRAtd) { tdover = 1; } else { tdover = 0; } * * h1dashTcoeffs = TMALLOC(double, model->LTRAmodelListSize); * h2Tcoeffs = TMALLOC(double, model->LTRAmodelListSize); * h3dashTcoeffs = TMALLOC(double, model->LTRAmodelListSize); * SecondDerivs = TMALLOC(double, model->LTRAmodelListSize); * */ /* * note that other OthVals have been set up in LTRAaccept, and Values in * LTRAload */ /* * h1dashTfirstCoeff = LTRAtCoeffSetup(h1dashTcoeffs, * model->LTRAmodelListSize, 0.0, model->LTRAh1dashValues, * model->LTRAh1dashFirstVal, model->LTRAh1dashOthVals, curtime, * ckt->CKTtimePoints,ckt->CKTtimeIndex, &(model->LTRAh1dashIndex), * model->LTRAlteConType); * * if (tdover) { * * h2TfirstCoeff = LTRAtCoeffSetup(h2Tcoeffs, model->LTRAmodelListSize, * model->LTRAtd, model->LTRAh2Values, model->LTRAh2FirstOthVal, * model->LTRAh2OthVals, curtime, ckt->CKTtimePoints, ckt->CKTtimeIndex, * &(model->LTRAh2Index), model->LTRAlteConType); * * h3dashTfirstCoeff = LTRAtCoeffSetup(h3dashTcoeffs, model->LTRAmodelListSize, * model->LTRAtd, model->LTRAh3dashValues, model->LTRAh3dashFirstOthVal, * model->LTRAh3dashOthVals, curtime, ckt->CKTtimePoints,ckt->CKTtimeIndex, * &(model->LTRAh3dashIndex), model->LTRAlteConType); */ /* setting up the coefficients for interpolation */ /* * for (i = ckt->CKTtimeIndex; i>= 0; i--) { if (*(ckt->CKTtimePoints + i) < * curtime - model->LTRAtd) { break; } } #ifdef LTRAdebug if (i == * ckt->CKTtimeIndex) || (i == -1) { printf("LTRAtrunc: mistake: cannot find * delayed timepoint\n"); } #endif t1 = *(ckt->CKTtimePoints + i - 1); t2 = * *(ckt->CKTtimePoints + i); t3 = *(ckt->CKTtimePoints + i + 1); * * LTRAquadInterp(curtime - model->LTRAtd, t1,t2,t3,&f1,&f2,&f3); * * isaved = i; } */ /* interpolation coefficients set-up */ /* LTEs for convolution with v1 */ /* get divided differences for v1 (2nd derivative estimates) */ /* * no need to subtract operating point values because taking differences * anyway */ /* * FirstSecondDeriv = LTRAdivDiffs(SecondDerivs,instance->LTRAv1, * (ckt->CKTrhsOld + instance->LTRAposNode1) - *(ckt->CKTrhsOld + * instance->LTRAnegNode1),curtime, ckt->CKTtimePoints,ckt->CKTtimeIndex); * * eq1LTE += model->LTRAadmit*fabs(FirstSecondDeriv * h1dashTfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh1dashIndex; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h1dashTcoeffs+i)!=0.0)) { eq1LTE += * model->LTRAadmit*fabs(*(SecondDerivs+i) * (h1dashTcoeffs+i)); } } } * */ /* interpolate */ /* * if (tdover) { * * FirstSecondDeriv = *(SecondDerivs + isaved - 1) * f1 + *(SecondDerivs + * isaved) * f2 + *(SecondDerivs + isaved + 1) * f3; * * eq2LTE += model->LTRAadmit*fabs(FirstSecondDeriv * h3dashTfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh3dashIndex; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h3dashTcoeffs+i)!=0.0)) { eq2LTE += * model->LTRAadmit*fabs(*(SecondDerivs+i) * (h3dashTcoeffs+i)); } } } } */ /* end LTEs for convolution with v1 */ /* LTEs for convolution with v2 */ /* get divided differences for v2 (2nd derivative estimates) */ /* * FirstSecondDeriv = LTRAdivDiffs(SecondDerivs,instance->LTRAv2, * (ckt->CKTrhsOld + instance->LTRAposNode2) - *(ckt->CKTrhsOld + * instance->LTRAnegNode2),curtime, ckt->CKTtimePoints,ckt->CKTtimeIndex); * * eq2LTE += model->LTRAadmit*fabs(FirstSecondDeriv * h1dashTfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh1dashIndex; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h1dashTcoeffs+i)!=0.0)) { eq2LTE += * model->LTRAadmit*fabs(*(SecondDerivs+i) * (h1dashTcoeffs+i)); } } } * * if (tdover) { */ /* interpolate */ /* * FirstSecondDeriv = *(SecondDerivs + isaved - 1) * f1 + *(SecondDerivs + * isaved) * f2 + *(SecondDerivs + isaved + 1) * f3; * * eq1LTE += model->LTRAadmit*fabs(FirstSecondDeriv * h3dashTfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh3dashIndex; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h3dashTcoeffs+i)!=0.0)) { eq1LTE += * model->LTRAadmit*fabs(*(SecondDerivs+i) * (h3dashTcoeffs+i)); } } } } * */ /* end LTEs for convolution with v2 */ /* LTE for convolution with i1 */ /* get divided differences for i1 (2nd derivative estimates) */ /* * if (tdover) { FirstSecondDeriv = * LTRAdivDiffs(SecondDerivs,instance->LTRAi1, (ckt->CKTrhsOld + * instance->LTRAbrEq1),curtime, ckt->CKTtimePoints,ckt->CKTtimeIndex); * */ /* interpolate */ /* * FirstSecondDeriv = *(SecondDerivs + isaved - 1) * f1 + *(SecondDerivs + * isaved) * f2 + *(SecondDerivs + isaved + 1) * f3; * * eq2LTE += fabs(FirstSecondDeriv * h2TfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh2Index; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h2Tcoeffs+i)!=0.0)) { eq2LTE += model->LTRAadmit*fabs(*(SecondDerivs+i) * * (h2Tcoeffs+i)); } } } * * } */ /* end LTE for convolution with i1 */ /* LTE for convolution with i2 */ /* get divided differences for i2 (2nd derivative estimates) */ /* * if (tdover) { FirstSecondDeriv = * LTRAdivDiffs(SecondDerivs,instance->LTRAi2, (ckt->CKTrhsOld + * instance->LTRAbrEq2),curtime, ckt->CKTtimePoints,ckt->CKTtimeIndex); * */ /* interpolate */ /* * FirstSecondDeriv = *(SecondDerivs + isaved - 1) * f1 + *(SecondDerivs + * isaved) * f2 + *(SecondDerivs + isaved + 1) * f3; * * eq1LTE += fabs(FirstSecondDeriv * h2TfirstCoeff); * * if (model->LTRAlteConType != LTRA_MOD_HALFCONTROL) { for (i = * model->LTRAh2Index; i > 0; i--) { if ((*(SecondDerivs+i) != 0.0) && * (*(h2Tcoeffs+i)!=0.0)) { eq1LTE += model->LTRAadmit*fabs(*(SecondDerivs+i) * * (h2Tcoeffs+i)); } } } } * */ /* end LTE for convolution with i1 */ #ifdef LTRADEBUG /* * fprintf(stdout,"%s: LTE/input for Eq1 at time %g is: %g\n", * instance->LTRAname, curtime, eq1LTE/instance->LTRAinput1); * fprintf(stdout,"%s: LTE/input for Eq2 at time %g is: %g\n", * instance->LTRAname, curtime, eq2LTE/instance->LTRAinput1); * fprintf(stdout,"\n"); */ #endif /* * FREE(SecondDerivs); FREE(h1dashTcoeffs); FREE(h2Tcoeffs); * FREE(h3dashTcoeffs); * * return(fabs(eq1LTE) + fabs(eq2LTE)); } */ /* * LTRAh3dashCoeffSetup sets up the coefficient list for h3dash for the * special case where G=0, * returns the coefficient at (current_timepoint-T) */ /* * double * LTRAh3dashCoeffSetup(coefflist,listsize,T,beta,curtime,timelist,timeindex,a * uxindexptr) double *coefflist, *timelist; int listsize, timeindex; double * T, curtime, beta; int *auxindexptr; * * { unsigned exact; double returnval, delta1, delta2; double dummy1, dummy2; * double lolimit1,lolimit2,hilimit1,hilimit2; double * lovalue1,lovalue2,hivalue1,hivalue2; int i,auxindex; * */ /* coefflist should already have been allocated to the necessary size */ /* * #ifdef LTRAdebug if (listsize <= timeindex) { printf("LTRAcoeffSetup: not * enough space in coefflist\n"); } #endif * * */ /* * we assume a piecewise linear function, and we calculate the coefficients * using this assumption in the integration of the function */ /* * if (T == 0.0) { auxindex = timeindex; } else { * * if (curtime - T <= 0.0) { for (i =0; i<= timeindex; i++) { (coefflist + i) = * 0.0; } auxindexptr = 0; return(0.0); } else { exact = 0; for (i = * timeindex; i>= 0; i--) { if (curtime - *(timelist + i) == T) { exact =1; * break; } if (curtime - *(timelist + i) > T) break; } * * #ifdef LTRADEBUG if ((i < 0) || ((i==0) && (exact==1))) * printf("LTRAcoeffSetup: i <= 0: some mistake!\n"); #endif * * if (exact == 1) { auxindex = i-1; } else { auxindex = i; } } } */ /* the first coefficient */ /* * delta1 = curtime -T - *(timelist + auxindex); lolimit1 = T; hilimit1 = T + * delta1; lovalue1 = 0.0; *//* E3dash should be consistent with this */ /* * hivalue1 = LTRArlcH3dashIntFunc(hilimit1,T,beta); dummy1 = * intlinfunc(lolimit1,hilimit1,lovalue1, hivalue1,lolimit1,hilimit1)/delta1; * returnval = dummy1; * * */ /* the coefficients for the rest of the timepoints */ /* * for (i=auxindex; i>0; i--) { * * delta2 = delta1; *//* previous delta1 */ /* lolimit2 = lolimit1; *//* previous lolimit1 */ /* hilimit2 = hilimit1; *//* previous hilimit1 */ /* lovalue2 = lovalue1; *//* previous lovalue1 */ /* hivalue2 = hivalue1; *//* previous hivalue1 */ /* dummy2 = dummy1; *//* previous dummy1 */ /* * delta1 = *(timelist + i) - *(timelist + i - 1); lolimit1 = hilimit2; * hilimit1 = curtime - *(timelist + i - 1); lovalue1 = hivalue2; hivalue1 = * LTRArlcH3dashIntFunc(hilimit1,T,beta); dummy1 = * intlinfunc(lolimit1,hilimit1,lovalue1,hivalue1,lolimit1,hilimit1)/delta1; * * (coefflist + i) = dummy1 - dummy2; } auxindexptr = auxindex; * return(returnval); } */ /* * LTRAh1dashCoeffSetup sets up the coefficient list for h1dash in the * special case where G=0 returns the coefficient at current_timepoint */ /* * double * LTRAh1dashCoeffSetup(coefflist,listsize,beta,curtime,timelist,timeindex,aux *strchrptr) double *coefflist, *timelist; int listsize, timeindex; double * beta, curtime; int *auxindexptr; * * { double returnval, delta1, delta2; double dummy1, dummy2; double * lolimit1,lolimit2,hilimit1,hilimit2; double * lovalue1,lovalue2,hivalue1,hivalue2; int i,auxindex; * */ /* coefflist should already have been allocated to the necessary size */ /* * #ifdef LTRAdebug if (listsize <= timeindex) { * printf("LTRAh1dashCoeffSetup: not enough space in coefflist\n"); } #endif * * * * auxindex = timeindex; * */ /* the first coefficient */ /* * delta1 = curtime - *(timelist + auxindex); lolimit1 = 0.0; hilimit1 = * delta1; lovalue1 = 0.0; hivalue1 = * LTRArlcH1dashTwiceIntFunc(hilimit1,beta); dummy1 = hivalue1/delta1; * returnval = dummy1; * * * */ /* the coefficients for the rest of the timepoints */ /* * for (i=auxindex; i>0; i--) { * * delta2 = delta1; *//* previous delta1 */ /* lolimit2 = lolimit1; *//* previous lolimit1 */ /* hilimit2 = hilimit1; *//* previous hilimit1 */ /* lovalue2 = lovalue1; *//* previous lovalue1 */ /* hivalue2 = hivalue1; *//* previous hivalue1 */ /* dummy2 = dummy1; *//* previous dummy1 */ /* * delta1 = *(timelist + i) - *(timelist + i - 1); lolimit1 = hilimit2; * hilimit1 = curtime - *(timelist + i - 1); lovalue1 = hivalue2; hivalue1 = * LTRArlcH1dashTwiceIntFunc(hilimit1,beta); dummy1 = (hivalue1 - * lovalue1)/delta1; * * (coefflist + i) = dummy1 - dummy2; } auxindexptr = auxindex; * return(returnval); } */ ngspice-26/src/spicelib/devices/ltra/ltratemp.c0000644000265600020320000001117412264261473021176 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int LTRAtemp(GENmodel *inModel, CKTcircuit *ckt) /* * pre-process parameters for later use */ { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; NG_IGNORE(ckt); /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { /* * if(!model->LTRAtdGiven) { model->LTRAtd = model->LTRAnl/model->LTRAf; * } */ switch (model->LTRAspecialCase) { case LTRA_MOD_LC: model->LTRAimped = sqrt(model->LTRAinduct / model->LTRAcapac); model->LTRAadmit = 1 / model->LTRAimped; model->LTRAtd = sqrt(model->LTRAinduct * model->LTRAcapac) * model->LTRAlength; model->LTRAattenuation = 1.0; break; case LTRA_MOD_RLC: model->LTRAimped = sqrt(model->LTRAinduct / model->LTRAcapac); model->LTRAadmit = 1 / model->LTRAimped; model->LTRAtd = sqrt(model->LTRAinduct * model->LTRAcapac) * model->LTRAlength; model->LTRAalpha = 0.5 * (model->LTRAresist / model->LTRAinduct /* - model->LTRAconduct/model->LTRAcapac */ ); model->LTRAbeta = model->LTRAalpha; /* * 0.5*(model->LTRAresist/model->LTRAinduct + * model->LTRAconduct/model->LTRAcapac); */ model->LTRAattenuation = exp(-model->LTRAbeta * model->LTRAtd); if (model->LTRAalpha > 0.0) { model->LTRAintH1dash = /* * sqrt(model->LTRAconduct/model->LTRAresist)/ model->LTRAadmit */ -1.0; model->LTRAintH2 = /* * exp(-model->LTRAlength*sqrt(model->LTRAconduct* * model->LTRAresist)) */ 1.0 - model->LTRAattenuation; model->LTRAintH3dash = /* (model->LTRAintH1dash+1.0)* (model->LTRAintH2+model->LTRAattenuation) */ - model->LTRAattenuation; } else if (model->LTRAalpha == 0.0) { model->LTRAintH1dash = model->LTRAintH2 = model->LTRAintH3dash = 0.0; } else { #ifdef LTRADEBUG fprintf(stdout, "LTRAtemp: error: alpha < 0.0\n"); #endif } /* * model->LTRAh1dashValues = NULL; model->LTRAh2Values = * NULL; model->LTRAh3dashValues = NULL; * * model->LTRAh1dashOthVals = NULL; model->LTRAh2OthVals = * NULL; model->LTRAh3dashOthVals = NULL; */ model->LTRAh1dashCoeffs = NULL; model->LTRAh2Coeffs = NULL; model->LTRAh3dashCoeffs = NULL; if (!model->LTRAtruncDontCut) { double xbig, xsmall, xmid, y1big, y1small, y1mid; double y2big, y2small, y2mid; int done = 0, maxiter = 50, iters = 0; xbig = model->LTRAtd + /* ckt->CKTmaxStep */ 9 * model->LTRAtd; /* hack! ckt is not yet initialised... */ xsmall = model->LTRAtd; xmid = 0.5 * (xbig + xsmall); y1small = LTRArlcH2Func(xsmall, model->LTRAtd, model->LTRAalpha, model->LTRAbeta); y2small = LTRArlcH3dashFunc(xsmall, model->LTRAtd, model->LTRAbeta, model->LTRAbeta); iters = 0; for (;;) { iters++; y1big = LTRArlcH2Func(xbig, model->LTRAtd, model->LTRAalpha, model->LTRAbeta); y1mid = LTRArlcH2Func(xmid, model->LTRAtd, model->LTRAalpha, model->LTRAbeta); y2big = LTRArlcH3dashFunc(xbig, model->LTRAtd, model->LTRAbeta, model->LTRAbeta); y2mid = LTRArlcH3dashFunc(xmid, model->LTRAtd, model->LTRAbeta, model->LTRAbeta); done = LTRAstraightLineCheck(xbig, y1big, xmid, y1mid, xsmall, y1small, model->LTRAstLineReltol, model->LTRAstLineAbstol) + LTRAstraightLineCheck(xbig, y1big, xmid, y1mid, xsmall, y1small, model->LTRAstLineReltol, model->LTRAstLineAbstol); if ((done == 2) || (iters > maxiter)) break; xbig = xmid; xmid = 0.5 * (xbig + xsmall); } model->LTRAmaxSafeStep = xbig - model->LTRAtd; } break; case LTRA_MOD_RC: model->LTRAcByR = model->LTRAcapac / model->LTRAresist; model->LTRArclsqr = model->LTRAresist * model->LTRAcapac * model->LTRAlength * model->LTRAlength; model->LTRAintH1dash = 0.0; model->LTRAintH2 = 1.0; model->LTRAintH3dash = 0.0; model->LTRAh1dashCoeffs = NULL; model->LTRAh2Coeffs = NULL; model->LTRAh3dashCoeffs = NULL; break; case LTRA_MOD_RG: break; default: return (E_BADPARM); } /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { here->LTRAv1 = NULL; here->LTRAi1 = NULL; here->LTRAv2 = NULL; here->LTRAi2 = NULL; } } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltraacld.c0000644000265600020320000001051212264261473021127 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAacLoad(GENmodel *inModel, CKTcircuit *ckt) /* * load the appropriate values for the current timepoint into the sparse * matrix and the right-hand-side vector */ { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; double y0_r, y0_i, lambda_r, lambda_i, mag, theta; double exparg_r, exparg_i, explambda_r, explambda_i; double y0exp_r, y0exp_i; long savemode; int error; /* * LTRAacLoad - loads for LTRA lines for the s.s. ac case the equations are * the following: * * Y_0(s) * V_1(s) - I_1(s) = exp(-lambda(s)*length) * (Y_0(s) * V_2(s) + * I_2(s)) Y_0(s) * V_2(s) - I_2(s) = exp(-lambda(s)*length) * (Y_0(s) * * V_1(s) + I_1(s)) * * where Y_0(s) and lambda(s) are as follows: * * Y_0(s) = sqrt( (sC+G)/(sL+R) ) lambda(s) = sqrt( (sC+G)*(sL+R) ) * * for the RC, RLC, and LC cases, G=0. The RG case is handled exactly as the * DC case, (and the above equations require reformulation because they * become identical for the DC case.) */ /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { switch (model->LTRAspecialCase) { case LTRA_MOD_LC: y0_r = model->LTRAadmit; y0_i = 0.0; /*lambda_i = model->LTRAtd*ckt->CKTomega;*/ lambda_i = sqrt(model->LTRAinduct*model->LTRAcapac) * ckt->CKTomega; /*CDHW*/ lambda_r = 0.0; break; case LTRA_MOD_RLC: theta = 0.5 * atan(model->LTRAresist / (ckt->CKTomega*model->LTRAinduct)); mag = sqrt(ckt->CKTomega * model->LTRAcapac / sqrt(model->LTRAresist * model->LTRAresist + ckt->CKTomega * ckt->CKTomega * model->LTRAinduct * model->LTRAinduct)); y0_r = mag * cos(theta); y0_i = mag * sin(theta); theta = M_PI / 2 - theta; mag *= sqrt(model->LTRAresist * model->LTRAresist + ckt->CKTomega * ckt->CKTomega * model->LTRAinduct * model->LTRAinduct); lambda_r = mag * cos(theta); lambda_i = mag * sin(theta); break; case LTRA_MOD_RC: y0_r = y0_i = sqrt(0.5 * ckt->CKTomega * model->LTRAcByR); lambda_r = lambda_i = sqrt(0.5 * ckt->CKTomega * model->LTRAresist * model->LTRAcapac); break; case LTRA_MOD_RG: savemode = ckt->CKTmode; ckt->CKTmode |= MODEDC; error = LTRAload(inModel, ckt); ckt->CKTmode = savemode; return (error); break; default: return (E_BADPARM); } exparg_r = -lambda_r * model->LTRAlength; exparg_i = -lambda_i * model->LTRAlength; explambda_r = exp(exparg_r) * cos(exparg_i); explambda_i = exp(exparg_r) * sin(exparg_i); y0exp_r = y0_r * explambda_r - y0_i * explambda_i; y0exp_i = y0_r * explambda_i + y0_i * explambda_r; /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { *(here->LTRAibr1Pos1Ptr + 0) += y0_r; *(here->LTRAibr1Pos1Ptr + 1) += y0_i; *(here->LTRAibr1Neg1Ptr + 0) -= y0_r; *(here->LTRAibr1Neg1Ptr + 1) -= y0_i; *(here->LTRAibr1Ibr1Ptr + 0) -= 1.0; *(here->LTRAibr1Pos2Ptr + 0) -= y0exp_r; *(here->LTRAibr1Pos2Ptr + 1) -= y0exp_i; *(here->LTRAibr1Neg2Ptr + 0) += y0exp_r; *(here->LTRAibr1Neg2Ptr + 1) += y0exp_i; *(here->LTRAibr1Ibr2Ptr + 0) -= explambda_r; *(here->LTRAibr1Ibr2Ptr + 1) -= explambda_i; *(here->LTRAibr2Pos2Ptr + 0) += y0_r; *(here->LTRAibr2Pos2Ptr + 1) += y0_i; *(here->LTRAibr2Neg2Ptr + 0) -= y0_r; *(here->LTRAibr2Neg2Ptr + 1) -= y0_i; *(here->LTRAibr2Ibr2Ptr + 0) -= 1.0; *(here->LTRAibr2Pos1Ptr + 0) -= y0exp_r; *(here->LTRAibr2Pos1Ptr + 1) -= y0exp_i; *(here->LTRAibr2Neg1Ptr + 0) += y0exp_r; *(here->LTRAibr2Neg1Ptr + 1) += y0exp_i; *(here->LTRAibr2Ibr1Ptr + 0) -= explambda_r; *(here->LTRAibr2Ibr1Ptr + 1) -= explambda_i; *(here->LTRApos1Ibr1Ptr + 0) += 1.0; *(here->LTRAneg1Ibr1Ptr + 0) -= 1.0; *(here->LTRApos2Ibr2Ptr + 0) += 1.0; *(here->LTRAneg2Ibr2Ptr + 0) -= 1.0; } } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltradest.c0000644000265600020320000000134512264261473021167 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ltradefs.h" #include "ngspice/suffix.h" void LTRAdestroy(GENmodel **inModel) { LTRAmodel **model = (LTRAmodel **) inModel; LTRAinstance *here; LTRAinstance *prev = NULL; LTRAmodel *mod = *model; LTRAmodel *oldmod = NULL; for (; mod; mod = mod->LTRAnextModel) { if (oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->LTRAinstances; here; here = here->LTRAnextInstance) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); } if (oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/ltra/ltraacct.c0000644000265600020320000002474412264261473021152 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAaccept(CKTcircuit *ckt, GENmodel *inModel) { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; double v1, v2, v3, v4; double v5, v6, d1, d2, d3, d4; int tmp_test; int error; int compact = 1; /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { if (ckt->CKTmode & MODEINITTRAN) { #define LTRAmemMANAGE(a,b) \ if ( a != NULL) FREE(a);\ a = TMALLOC(double, b); model->LTRAmodelListSize = 10; LTRAmemMANAGE(model->LTRAh1dashCoeffs, model->LTRAmodelListSize) LTRAmemMANAGE(model->LTRAh2Coeffs, model->LTRAmodelListSize) LTRAmemMANAGE(model->LTRAh3dashCoeffs, model->LTRAmodelListSize) } if (ckt->CKTtimeIndex >= model->LTRAmodelListSize) { /* need more space */ model->LTRAmodelListSize += ckt->CKTsizeIncr; model->LTRAh1dashCoeffs = TREALLOC(double, model->LTRAh1dashCoeffs, model->LTRAmodelListSize); model->LTRAh2Coeffs = TREALLOC(double, model->LTRAh2Coeffs, model->LTRAmodelListSize); model->LTRAh3dashCoeffs = TREALLOC(double, model->LTRAh3dashCoeffs, model->LTRAmodelListSize); } /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { if (ckt->CKTmode & MODEINITTRAN) { here->LTRAinstListSize = 10; LTRAmemMANAGE(here->LTRAv1, here->LTRAinstListSize) LTRAmemMANAGE(here->LTRAi1, here->LTRAinstListSize) LTRAmemMANAGE(here->LTRAv2, here->LTRAinstListSize) LTRAmemMANAGE(here->LTRAi2, here->LTRAinstListSize) } /* * why is this here? ask TQ * * if (ckt->CKTtimeIndex == 0? 1: (ckt->CKTtime- * (ckt->CKTtimePoints+ckt->CKTtimeIndex-1) > ckt->CKTminBreak)) { * */ if (ckt->CKTtimeIndex >= here->LTRAinstListSize) { /* need more space */ here->LTRAinstListSize += ckt->CKTsizeIncr; here->LTRAv1 = TREALLOC(double, here->LTRAv1, here->LTRAinstListSize); here->LTRAi1 = TREALLOC(double, here->LTRAi1, here->LTRAinstListSize); here->LTRAi2 = TREALLOC(double, here->LTRAi2, here->LTRAinstListSize); here->LTRAv2 = TREALLOC(double, here->LTRAv2, here->LTRAinstListSize); } *(here->LTRAv1 + ckt->CKTtimeIndex) = *(ckt->CKTrhsOld + here->LTRAposNode1) - *(ckt->CKTrhsOld + here->LTRAnegNode1); *(here->LTRAv2 + ckt->CKTtimeIndex) = *(ckt->CKTrhsOld + here->LTRAposNode2) - *(ckt->CKTrhsOld + here->LTRAnegNode2); *(here->LTRAi1 + ckt->CKTtimeIndex) = *(ckt->CKTrhsOld + here->LTRAbrEq1); *(here->LTRAi2 + ckt->CKTtimeIndex) = *(ckt->CKTrhsOld + here->LTRAbrEq2); if (ckt->CKTtryToCompact && (ckt->CKTtimeIndex >= 2)) { /* * figure out if the last 3 points lie on a st. line for all the * terminal variables */ { double t1, t2, t3; t1 = *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 2); t2 = *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1); t3 = *(ckt->CKTtimePoints + ckt->CKTtimeIndex); if (compact) { compact = LTRAstraightLineCheck(t1, *(here->LTRAv1 + ckt->CKTtimeIndex - 2), t2, *(here->LTRAv1 + ckt->CKTtimeIndex - 1), t3, *(here->LTRAv1 + ckt->CKTtimeIndex), model->LTRAstLineReltol, model->LTRAstLineAbstol); } if (compact) { compact = LTRAstraightLineCheck(t1, *(here->LTRAv2 + ckt->CKTtimeIndex - 2), t2, *(here->LTRAv2 + ckt->CKTtimeIndex - 1), t3, *(here->LTRAv2 + ckt->CKTtimeIndex), model->LTRAstLineReltol, model->LTRAstLineAbstol); } if (compact) { compact = LTRAstraightLineCheck(t1, *(here->LTRAi1 + ckt->CKTtimeIndex - 2), t2, *(here->LTRAi1 + ckt->CKTtimeIndex - 1), t3, *(here->LTRAi1 + ckt->CKTtimeIndex), model->LTRAstLineReltol, model->LTRAstLineAbstol); } if (compact) { compact = LTRAstraightLineCheck(t1, *(here->LTRAi2 + ckt->CKTtimeIndex - 2), t2, *(here->LTRAi2 + ckt->CKTtimeIndex - 1), t3, *(here->LTRAi2 + ckt->CKTtimeIndex), model->LTRAstLineReltol, model->LTRAstLineAbstol); } } } if (ckt->CKTtimeIndex > 0) { #ifdef NOTDEF v1 = (*(here->LTRAv1 + ckt->CKTtimeIndex) + *(here->LTRAi1 + ckt->CKTtimeIndex) * model->LTRAimped) * model->LTRAattenuation; v2 = (*(here->LTRAv1 + ckt->CKTtimeIndex - 1) + *(here->LTRAi1 + ckt->CKTtimeIndex - 1) * model->LTRAimped) * model->LTRAattenuation; v3 = (*(here->LTRAv2 + ckt->CKTtimeIndex) + *(here->LTRAi2 + ckt->CKTtimeIndex) * model->LTRAimped) * model->LTRAattenuation; v4 = (*(here->LTRAv2 + ckt->CKTtimeIndex - 1) + *(here->LTRAi2 + ckt->CKTtimeIndex - 1) * model->LTRAimped) * model->LTRAattenuation; if ((fabs(v1 - v2) >= 50 * ckt->CKTreltol * MAX(fabs(v1), fabs(v2)) + 50 * ckt->CKTvoltTol) || (fabs(v3 - v4) >= 50 * ckt->CKTreltol * MAX(fabs(v3), fabs(v4)) + 50 * ckt->CKTvoltTol)) { /* changing - need to schedule after delay */ /* * don't really need this error = * CKTsetBreak(ckt,ckt->CKTtime+model->LTRAtd); if(error) * return(error); */ /* the PREVIOUS point is the real breakpoint */ error = CKTsetBreak(ckt, *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) + model->LTRAtd); CKTbreakDump(ckt); if (error) return (error); } #else /* * remove the hack here - store the total inputs for the last 2 or 3 * timesteps */ v1 = (*(here->LTRAv1 + ckt->CKTtimeIndex) + *(here->LTRAi1 + ckt->CKTtimeIndex) * model->LTRAimped) * model->LTRAattenuation; v2 = (*(here->LTRAv1 + ckt->CKTtimeIndex - 1) + *(here->LTRAi1 + ckt->CKTtimeIndex - 1) * model->LTRAimped) * model->LTRAattenuation; v3 = ckt->CKTtimeIndex < 2 ? v2 : (*(here->LTRAv1 + ckt->CKTtimeIndex - 2) + *(here->LTRAi1 + ckt->CKTtimeIndex - 2) * model->LTRAimped) * model->LTRAattenuation; v4 = (*(here->LTRAv2 + ckt->CKTtimeIndex) + *(here->LTRAi2 + ckt->CKTtimeIndex) * model->LTRAimped) * model->LTRAattenuation; v5 = (*(here->LTRAv2 + ckt->CKTtimeIndex - 1) + *(here->LTRAi2 + ckt->CKTtimeIndex - 1) * model->LTRAimped) * model->LTRAattenuation; v6 = ckt->CKTtimeIndex < 2 ? v5 : (*(here->LTRAv2 + ckt->CKTtimeIndex - 2) + *(here->LTRAi2 + ckt->CKTtimeIndex - 2) * model->LTRAimped) * model->LTRAattenuation; d1 = (v1 - v2) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1)); d2 = (ckt->CKTtimeIndex < 2) ? 0 : (v2 - v3) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 2)); d3 = (v4 - v5) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1)); d4 = (ckt->CKTtimeIndex < 2) ? 0 : (v5 - v6) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 2)); /* * here we have a big problem with the scheme boxed by the *s below. * Note the following: if LTRAreltol == 1, (assuming LTRAabstol==0) * then breakpoints are set if and only if d1 and d2 have opposite * signs or one is zero. If LTRAreltol > 2, breakpoints are never * set. The problem is that when the waveform is steady at a value, * small random numerical inaccuracies may produce derivatives of * opposite sign, and breakpoints get set. This can, in practice, get * quite killing... To alleviate this, we try to determine if the * waveform is actually steady using the following tests: 1. Check if * the maximum difference between v1,v2 and v3 is less than * 50*CKTreltol*(the average of v1,v2,and v3) + 50*ckt->CKTabstol * (the 50 has been taken from the NOTDEF section above, reason * unknown - hopefully there is a good reason for it - ask TQ) * * 2. Criterion 1 may be satisfied by a legitimate breakpoint. To * further check, find one more derivative one timepoint ago and see * if that is close to d2. If not, then the likelihood of numerical * inaccuracies is greater... */ /********************************************************************* if( (fabs(d1-d2) >= model->LTRAreltol*MAX(fabs(d1),fabs(d2))+ model->LTRAabstol) || (fabs(d3-d4) >= model->LTRAreltol*MAX(fabs(d3),fabs(d4))+ model->LTRAabstol) ) { *********************************************************************/ #define CHECK(a,b,c) (MAX(MAX(a,b),c)-MIN(MIN(a,b),c) >= \ fabs(50.0*(ckt->CKTreltol/3.0*(a+b+c) +\ ckt->CKTabstol))) tmp_test = (fabs(d1 - d2) >= model->LTRAreltol * MAX(fabs(d1), fabs(d2)) + model->LTRAabstol) && CHECK(v1, v2, v3); if (tmp_test || ((fabs(d3 - d4) >= model->LTRAreltol * MAX(fabs(d3), fabs(d4)) + model->LTRAabstol) && CHECK(v4, v5, v6))) { /* criterion 2 not implemented yet... */ error = CKTsetBreak(ckt, *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) + model->LTRAtd); /* * this is not necessary - the previous timepoint was the * breakpoint error = CKTsetBreak(ckt, ckt->CKTtime + * model->LTRAtd); */ #ifdef LTRADEBUG fprintf(stdout, "\nbreakpoints set at %14.14g at %14.14g at time %14.14g\n", ckt->CKTtime + model->LTRAtd, *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) + model->LTRAtd, ckt->CKTtime); fprintf(stdout, "d1 through d4 are %14.14g %14.14g %14.14g %14.14g\n\n", d1, d2, d3, d4); #endif if (error) return (error); } /* } */ #endif /* NOTDEF */ } /* ask TQ } */ } /* instance */ } /* model */ if (ckt->CKTtryToCompact && compact && (ckt->CKTtimeIndex >= 2)) { /* * last three timepoints have variables lying on a straight line, do a * compaction */ model = (LTRAmodel *) inModel; for (; model != NULL; model = model->LTRAnextModel) { for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { *(here->LTRAv1 + ckt->CKTtimeIndex - 1) = *(here->LTRAv1 + ckt->CKTtimeIndex); *(here->LTRAv2 + ckt->CKTtimeIndex - 1) = *(here->LTRAv2 + ckt->CKTtimeIndex); *(here->LTRAi1 + ckt->CKTtimeIndex - 1) = *(here->LTRAi1 + ckt->CKTtimeIndex); *(here->LTRAi2 + ckt->CKTtimeIndex - 1) = *(here->LTRAi2 + ckt->CKTtimeIndex); } } *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1) = *(ckt->CKTtimePoints + ckt->CKTtimeIndex); ckt->CKTtimeIndex--; #ifdef LTRADEBUG fprintf(stdout, "compacted at time=%g\n", *(ckt->CKTtimePoints + ckt->CKTtimeIndex)); fflush(stdout); #endif } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltrainit.h0000644000265600020320000000037012264261473021175 0ustar andreasadmin#ifndef _LTRAINIT_H #define _LTRAINIT_H extern IFparm LTRApTable[ ]; extern IFparm LTRAmPTable[ ]; extern char *LTRAnames[ ]; extern int LTRApTSize; extern int LTRAmPTSize; extern int LTRAnSize; extern int LTRAiSize; extern int LTRAmSize; #endif ngspice-26/src/spicelib/devices/ltra/ltrapar.c0000644000265600020320000000241112264261473021005 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ltradefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int LTRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { LTRAinstance *here = (LTRAinstance *) inst; NG_IGNORE(select); switch (param) { case LTRA_V1: here->LTRAinitVolt1 = value->rValue; here->LTRAicV1Given = TRUE; break; case LTRA_I1: here->LTRAinitCur1 = value->rValue; here->LTRAicC1Given = TRUE; break; case LTRA_V2: here->LTRAinitVolt2 = value->rValue; here->LTRAicV2Given = TRUE; break; case LTRA_I2: here->LTRAinitCur2 = value->rValue; here->LTRAicC2Given = TRUE; break; case LTRA_IC: switch (value->v.numValue) { case 4: here->LTRAinitCur2 = *(value->v.vec.rVec + 3); case 3: here->LTRAinitVolt2 = *(value->v.vec.rVec + 2); case 2: here->LTRAinitCur1 = *(value->v.vec.rVec + 1); case 1: here->LTRAinitVolt1 = *(value->v.vec.rVec); break; default: return (E_BADPARM); } break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltratrun.c0000644000265600020320000001346312264261473021224 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; double i1, i2, i3, i4; double i5, i6, d1, d2, d3, d4; double tmp; double tolerance; double current_lte=0.0; int maxiter = 2, iterations = 0; double x, y, change, deriv, deriv_delta; /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { switch (model->LTRAspecialCase) { case LTRA_MOD_LC: case LTRA_MOD_RLC: if (model->LTRAstepLimit == LTRA_MOD_STEPLIMIT) { tmp = model->LTRAtd; *timeStep = MIN(*timeStep, tmp); } else { i1 = ((*(ckt->CKTrhsOld + here->LTRAposNode2) - *(ckt->CKTrhsOld + here->LTRAnegNode2)) * model->LTRAadmit + *(ckt->CKTrhsOld + here->LTRAbrEq2)) * model->LTRAattenuation; i2 = (*(here->LTRAv2 + ckt->CKTtimeIndex) * model->LTRAadmit + *(here->LTRAi2 + ckt->CKTtimeIndex)) * model->LTRAattenuation; i3 = (*(here->LTRAv2 + ckt->CKTtimeIndex - 1) * model->LTRAadmit + *(here->LTRAi2 + ckt->CKTtimeIndex - 1)) * model->LTRAattenuation; i4 = ((*(ckt->CKTrhsOld + here->LTRAposNode1) - *(ckt->CKTrhsOld + here->LTRAnegNode1)) * model->LTRAadmit + *(ckt->CKTrhsOld + here->LTRAbrEq1)) * model->LTRAattenuation; i5 = (*(here->LTRAv1 + ckt->CKTtimeIndex) * model->LTRAadmit + *(here->LTRAi1 + ckt->CKTtimeIndex)) * model->LTRAattenuation; i6 = (*(here->LTRAv1 + ckt->CKTtimeIndex - 1) * model->LTRAadmit + *(here->LTRAi1 + ckt->CKTtimeIndex - 1)) * model->LTRAattenuation; /* * d1 = (i1-i2)/ckt->CKTdeltaOld[1]; d2 = * (i2-i3)/ckt->CKTdeltaOld[2]; d3 = (i4-i5)/ckt->CKTdeltaOld[1]; * d4 = (i5-i6)/ckt->CKTdeltaOld[2]; */ d1 = (i1 - i2) / (ckt->CKTtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)); d2 = (i2 - i3) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1)); d3 = (i4 - i5) / (ckt->CKTtime - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)); d4 = (i5 - i6) / (*(ckt->CKTtimePoints + ckt->CKTtimeIndex) - *(ckt->CKTtimePoints + ckt->CKTtimeIndex - 1)); if ((fabs(d1 - d2) >= model->LTRAreltol * MAX(fabs(d1), fabs(d2)) + model->LTRAabstol) || (fabs(d3 - d4) >= model->LTRAreltol * MAX(fabs(d3), fabs(d4)) + model->LTRAabstol)) { /* derivitive changing - need to schedule after delay */ /* the PREVIOUS point was the breakpoint */ /* the previous timepoint plus the delay */ /* * tmp = *(ckt->CKTtimePoints + ckt->CKTtimeIndex) + * model->LTRAtd; the work of a confused mind minus current time * tmp -= ckt->CKTtime; */ tmp = model->LTRAtd; *timeStep = MIN(*timeStep, tmp); } } break; case LTRA_MOD_RC: case LTRA_MOD_RG: break; default: return (E_BADPARM); } /* * the above was for the parts of the equations that resemble the * lossless equations. Now we need to estimate the local truncation * error in each of the three convolution equations, and if possible * adjust the timestep so that all of them remain within some bound. * Unfortunately, the expression for the LTE in a convolution operation * is complicated and costly to evaluate; in addition, no explicit * inverse exists. * * So what we do here (for the moment) is check to see the current error * is acceptable. If so, the timestep is not changed. If not, then an * estimate is made for the new timestep using a few iterations of the * newton-raphson method. * * modification: we change the timestep to half its previous value */ if ((model->LTRAspecialCase == LTRA_MOD_RLC) && (!model->LTRAtruncDontCut)) { *timeStep = MIN(*timeStep, model->LTRAmaxSafeStep); } if (model->LTRAlteConType != LTRA_MOD_NOCONTROL) { switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: case LTRA_MOD_RC: tolerance = ckt->CKTtrtol * (ckt->CKTreltol * ( fabs(here->LTRAinput1) + fabs(here->LTRAinput2)) + ckt->CKTabstol); current_lte = LTRAlteCalculate(ckt, (GENmodel *) model, (GENinstance *) here, ckt->CKTtime); if (current_lte >= tolerance) { if (model->LTRAtruncNR) { x = ckt->CKTtime; y = current_lte; for (;;) { deriv_delta = 0.01 * (x - *(ckt->CKTtimePoints + ckt->CKTtimeIndex)); #ifdef LTRADEBUG if (deriv_delta <= 0.0) fprintf(stdout, "LTRAtrunc: error: timestep is now less than zero\n"); #endif deriv = LTRAlteCalculate(ckt, (GENmodel *) model, (GENinstance *) here, x + deriv_delta) - y; deriv /= deriv_delta; change = (tolerance - y) / deriv; x += change; if (maxiter == 0) { if (fabs(change) <= fabs(deriv_delta)) break; } else { iterations++; if (iterations >= maxiter) break; } y = LTRAlteCalculate(ckt, (GENmodel *) model, (GENinstance *) here, x); } tmp = x - *(ckt->CKTtimePoints + ckt->CKTtimeIndex); *timeStep = MIN(*timeStep, tmp); } else *timeStep *= 0.5; } break; case LTRA_MOD_RG: case LTRA_MOD_LC: break; default: return (E_BADPARM); } } } #ifdef LTRADEBUG if (*timeStep >= model->LTRAtd) { fprintf(stdout, "LTRAtrunc: Warning: Timestep bigger than delay of line %s\n", model->LTRAmodName); fflush(stdout); } #endif } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltradel.c0000644000265600020320000000143212264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { LTRAinstance **fast = (LTRAinstance **) kill; LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance **prev = NULL; LTRAinstance *here; for (; model; model = model->LTRAnextModel) { prev = &(model->LTRAinstances); for (here = *prev; here; here = *prev) { if (here->LTRAname == name || (fast && here == *fast)) { *prev = here->LTRAnextInstance; FREE(here); return (OK); } prev = &(here->LTRAnextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/ltra/ltramask.c0000644000265600020320000000507212264261473021164 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ /* * This routine sets model parameters for LTRA lines in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAmAsk(CKTcircuit *ckt, GENmodel *inModel, int param, IFvalue *value) { LTRAmodel *mods = (LTRAmodel *) inModel; NG_IGNORE(ckt); switch (param) { case LTRA_MOD_LTRA: value->iValue = 1; break; case LTRA_MOD_RELTOL: value->rValue = mods->LTRAreltol; break; case LTRA_MOD_ABSTOL: value->rValue = mods->LTRAabstol; break; case LTRA_MOD_STLINEREL: value->rValue = mods->LTRAstLineReltol; break; case LTRA_MOD_STLINEABS: value->rValue = mods->LTRAstLineAbstol; break; case LTRA_MOD_CHOPREL: value->rValue = mods->LTRAchopReltol; break; case LTRA_MOD_CHOPABS: value->rValue = mods->LTRAchopAbstol; break; case LTRA_MOD_TRUNCNR: value->iValue = mods->LTRAtruncNR; break; case LTRA_MOD_TRUNCDONTCUT: value->iValue = mods->LTRAtruncDontCut; break; case LTRA_MOD_R: value->rValue = mods->LTRAresist; break; case LTRA_MOD_L: value->rValue = mods->LTRAinduct; break; case LTRA_MOD_G: value->rValue = mods->LTRAconduct; break; case LTRA_MOD_C: value->rValue = mods->LTRAcapac; break; case LTRA_MOD_LEN: value->rValue = mods->LTRAlength; break; case LTRA_MOD_NL: value->rValue = mods->LTRAnl; break; case LTRA_MOD_FREQ: value->rValue = mods->LTRAf; break; case LTRA_MOD_FULLCONTROL: value->iValue = mods->LTRAlteConType; break; case LTRA_MOD_HALFCONTROL: value->iValue = mods->LTRAlteConType; break; case LTRA_MOD_NOCONTROL: value->iValue = mods->LTRAlteConType; break; case LTRA_MOD_PRINT: value->iValue = mods->LTRAprintFlag; break; case LTRA_MOD_NOPRINT: mods->LTRAprintFlag = FALSE; break; /* * case LTRA_MOD_RONLY: mods->LTRArOnly= TRUE; break; */ case LTRA_MOD_STEPLIMIT: value->iValue = mods->LTRAstepLimit; break; case LTRA_MOD_NOSTEPLIMIT: value->iValue = mods->LTRAstepLimit; break; case LTRA_MOD_LININTERP: value->iValue = mods->LTRAhowToInterp; break; case LTRA_MOD_QUADINTERP: value->iValue = mods->LTRAhowToInterp; break; case LTRA_MOD_MIXEDINTERP: value->iValue = mods->LTRAhowToInterp; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/ltra/Makefile.am0000644000265600020320000000076412264261473021241 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libltra.la libltra_la_SOURCES = \ ltra.c \ ltraacct.c \ ltraacld.c \ ltraask.c \ ltradefs.h \ ltradel.c \ ltradest.c \ ltraext.h \ ltrainit.c \ ltrainit.h \ ltraitf.h \ ltraload.c \ ltramask.c \ ltramdel.c \ ltramisc.c \ ltrampar.c \ ltrapar.c \ ltraset.c \ ltratemp.c \ ltratrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/ltra/ltradefs.h0000644000265600020320000002447012264261473021162 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #ifndef LTRA #define LTRA #undef LTRALTEINFO #undef LTRADEBUG #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* structures used to describe lossy transmission liness */ /* information used to describe a single instance */ typedef struct sLTRAinstance { struct sLTRAmodel *LTRAmodPtr; /* backpointer to model */ struct sLTRAinstance *LTRAnextInstance; /* pointer to next instance of * current model*/ IFuid LTRAname; /* pointer to character string naming this instance */ int LTRAstate; /* not used */ int LTRAposNode1; /* number of positive node of end 1 of t. line */ int LTRAnegNode1; /* number of negative node of end 1 of t. line */ int LTRAposNode2; /* number of positive node of end 2 of t. line */ int LTRAnegNode2; /* number of negative node of end 2 of t. line */ int LTRAbrEq1; /* number of branch equation for end 1 of t. line */ int LTRAbrEq2; /* number of branch equation for end 2 of t. line */ double LTRAinput1; /* accumulated excitation for port 1 */ double LTRAinput2; /* accumulated excitation for port 2 */ double LTRAinitVolt1; /* initial condition: voltage on port 1 */ double LTRAinitCur1; /* initial condition: current at port 1 */ double LTRAinitVolt2; /* initial condition: voltage on port 2 */ double LTRAinitCur2; /* initial condition: current at port 2 */ double *LTRAv1; /* past values of v1 */ double *LTRAi1; /* past values of i1 */ double *LTRAv2; /* past values of v2 */ double *LTRAi2; /* past values of i2 */ int LTRAinstListSize; /* size of above lists */ double *LTRAibr1Ibr1Ptr; /* pointer to sparse matrix */ double *LTRAibr1Ibr2Ptr; /* pointer to sparse matrix */ double *LTRAibr1Pos1Ptr; /* pointer to sparse matrix */ double *LTRAibr1Neg1Ptr; /* pointer to sparse matrix */ double *LTRAibr1Pos2Ptr; /* pointer to sparse matrix */ double *LTRAibr1Neg2Ptr; /* pointer to sparse matrix */ double *LTRAibr2Ibr1Ptr; /* pointer to sparse matrix */ double *LTRAibr2Ibr2Ptr; /* pointer to sparse matrix */ double *LTRAibr2Pos1Ptr; /* pointer to sparse matrix */ double *LTRAibr2Neg1Ptr; /* pointer to sparse matrix */ double *LTRAibr2Pos2Ptr; /* pointer to sparse matrix */ double *LTRAibr2Neg2Ptr; /* pointer to sparse matrix */ double *LTRAneg1Ibr1Ptr; /* pointer to sparse matrix */ double *LTRAneg2Ibr2Ptr; /* pointer to sparse matrix */ double *LTRApos1Ibr1Ptr; /* pointer to sparse matrix */ double *LTRApos2Ibr2Ptr; /* pointer to sparse matrix */ double *LTRApos1Pos1Ptr; /* pointer to sparse matrix */ double *LTRAneg1Neg1Ptr; /* pointer to sparse matrix */ double *LTRApos2Pos2Ptr; /* pointer to sparse matrix */ double *LTRAneg2Neg2Ptr; /* pointer to sparse matrix */ unsigned LTRAicV1Given : 1; /* flag to ind. init. voltage at port 1 given */ unsigned LTRAicC1Given : 1; /* flag to ind. init. current at port 1 given */ unsigned LTRAicV2Given : 1; /* flag to ind. init. voltage at port 2 given */ unsigned LTRAicC2Given : 1; /* flag to ind. init. current at port 2 given */ } LTRAinstance ; /* per model data */ typedef struct sLTRAmodel { /* model structure for a transmission lines */ int LTRAmodType; /* type index of this device type */ struct sLTRAmodel *LTRAnextModel; /* pointer to next possible model in * linked list */ LTRAinstance * LTRAinstances; /* pointer to list of instances that have this * model */ IFuid LTRAmodName; /* pointer to character string naming this model */ double LTRAh1dashFirstVal; /* first needed value of h1dasg at current timepoint */ double LTRAh2FirstVal; /* first needed value of h2 at current timepoint */ double LTRAh3dashFirstVal; /* first needed value of h3dash at current timepoint */ #if 0 double *LTRAh1dashValues; /* values of h1dash for all previous times */ double *LTRAh2Values; /* values of h2 for all previous times */ double *LTRAh3dashValues; /* values of h3dash for all previous times */ double LTRAh2FirstOthVal; /* needed for LTE calc; but their values */ double LTRAh3dashFirstOthVal; /*may depend on the current timepoint*/ double *LTRAh1dashOthVals; /* these lists of other values are */ double *LTRAh2OthVals; /* needed for truncation error */ double *LTRAh3dashOthVals; /* calculation */ #endif /* the OthVals do not depend on the current * timepoint; hence they are set up in LTRAaccept.c. * They are used in LTRAtrunc.c */ double LTRAh1dashFirstCoeff; /* first needed coeff of h1dash for the current timepoint */ double LTRAh2FirstCoeff; /* first needed coeff of h2 for the current timepoint */ double LTRAh3dashFirstCoeff; /* first needed coeff of h3dash for the current timepoint */ double *LTRAh1dashCoeffs; /* list of other coefficients for h1dash */ double *LTRAh2Coeffs; /* list of other coefficients for h2 */ double *LTRAh3dashCoeffs; /* list of other coefficients for h3dash */ int LTRAmodelListSize; /* size of above lists */ double LTRAconduct; /* conductance G - input */ double LTRAresist; /* resistance R - input */ double LTRAinduct; /* inductance L - input */ double LTRAcapac; /* capacitance C - input */ double LTRAlength; /* length l - input */ double LTRAtd; /* propagation delay T - calculated*/ double LTRAimped; /* impedance Z - calculated*/ double LTRAadmit; /* admittance Y - calculated*/ double LTRAalpha; /* alpha - calculated */ double LTRAbeta; /* beta - calculated */ double LTRAattenuation; /* e^(-beta T) - calculated */ double LTRAcByR; /* C/R - for the RC line - calculated */ double LTRArclsqr; /* RCl^2 - for the RC line - calculated */ double LTRAintH1dash;/* \int_0^\inf h'_1(\tau) d \tau - calculated*/ double LTRAintH2;/* \int_0^\inf h_2(\tau) d \tau - calculated*/ double LTRAintH3dash;/* \int_0^\inf h'_3(\tau) d \tau - calculated*/ double LTRAnl; /* normalized length - historical significance only*/ double LTRAf; /* frequency at which nl is measured - historical significance only*/ double LTRAcoshlrootGR; /* cosh(l*sqrt(G*R)), used for DC anal */ double LTRArRsLrGRorG; /* sqrt(R)*sinh(l*sqrt(G*R))/sqrt(G) */ double LTRArGsLrGRorR; /* sqrt(G)*sinh(l*sqrt(G*R))/sqrt(R) */ /*int LTRAh1dashIndex;*/ /* index for h1dash that points to the latest nonzero coefficient in the list */ /*int LTRAh2Index;*/ /* ditto for h2 */ /*int LTRAh3dashIndex;*/ /* ditto for h3dash */ int LTRAauxIndex; /* auxiliary index for h2 and h3dash */ double LTRAstLineReltol; /* separate reltol for checking st. lines */ double LTRAchopReltol; /* separate reltol for truncation of impulse responses*/ double LTRAstLineAbstol; /* separate abstol for checking st. lines */ double LTRAchopAbstol; /* separate abstol for truncation of impulse responses */ unsigned LTRAreltolGiven:1; /* flag to ind. relative deriv. tol. given */ unsigned LTRAabstolGiven:1; /* flag to ind. absolute deriv. tol. given */ unsigned LTRAtruncNR:1; /* flag to ind. use N-R iterations for calculating step in LTRAtrunc */ unsigned LTRAtruncDontCut:1; /* flag to ind. don't bother about errors in impulse response calculations due to large steps*/ double LTRAmaxSafeStep; /* maximum safe step for impulse response calculations */ unsigned LTRAresistGiven : 1; /* flag to indicate R was specified */ unsigned LTRAconductGiven : 1; /* flag to indicate G was specified */ unsigned LTRAinductGiven : 1; /* flag to indicate L was specified */ unsigned LTRAcapacGiven : 1; /* flag to indicate C was specified */ unsigned LTRAlengthGiven : 1; /* flag to indicate length was specified */ unsigned LTRAnlGiven : 1; /* flag to indicate norm length was specified */ int LTRAlteConType; /* indicates whether full control, half control or no control */ int LTRAhowToInterp; /* indicates how to interpolate for delayed timepoint */ unsigned LTRAprintFlag: 1; /* flag to indicate whether debugging output should be printed */ /*unsigned LTRArOnly: 1;*/ /* flag to indicate G=0, use known Bessel integrals for accuracy and speed */ int LTRAstepLimit; /* flag to indicate that the timestep should always be limited to 0.8*LTRAtd */ unsigned LTRAfGiven : 1; /* flag to indicate freq was specified */ double LTRAabstol; /* absolute deriv. tol. for breakpoint setting */ double LTRAreltol; /* relative deriv. tol. for breakpoint setting */ int LTRAspecialCase; /* what kind of model (RC, RLC, RL, ...) */ } LTRAmodel; /* device parameters */ #define LTRA_MOD_LTRA 0 #define LTRA_MOD_R 1 #define LTRA_MOD_L 2 #define LTRA_MOD_G 3 #define LTRA_MOD_C 4 #define LTRA_MOD_LEN 5 #define LTRA_V1 6 #define LTRA_I1 7 #define LTRA_V2 8 #define LTRA_I2 9 #define LTRA_IC 10 #define LTRA_MOD_RELTOL 11 #define LTRA_MOD_ABSTOL 12 #define LTRA_POS_NODE1 13 #define LTRA_NEG_NODE1 14 #define LTRA_POS_NODE2 15 #define LTRA_NEG_NODE2 16 #define LTRA_INPUT1 17 #define LTRA_INPUT2 18 #define LTRA_DELAY 19 #define LTRA_BR_EQ1 20 #define LTRA_BR_EQ2 21 #define LTRA_MOD_NL 22 #define LTRA_MOD_FREQ 23 #define LTRA_MOD_Z0 24 #define LTRA_MOD_TD 25 #define LTRA_MOD_FULLCONTROL 26 #define LTRA_MOD_HALFCONTROL 27 #define LTRA_MOD_NOCONTROL 28 #define LTRA_MOD_PRINT 29 #define LTRA_MOD_NOPRINT 30 /* #define LTRA_MOD_RONLY 31 */ #define LTRA_MOD_STEPLIMIT 32 #define LTRA_MOD_NOSTEPLIMIT 33 #define LTRA_MOD_LININTERP 34 #define LTRA_MOD_QUADINTERP 35 #define LTRA_MOD_MIXEDINTERP 36 #define LTRA_MOD_RLC 37 #define LTRA_MOD_RC 38 #define LTRA_MOD_RG 39 #define LTRA_MOD_LC 40 #define LTRA_MOD_RL 41 #define LTRA_MOD_STLINEREL 42 #define LTRA_MOD_STLINEABS 43 #define LTRA_MOD_CHOPREL 44 #define LTRA_MOD_CHOPABS 45 #define LTRA_MOD_TRUNCNR 46 #define LTRA_MOD_TRUNCDONTCUT 47 /* model parameters */ /* device questions */ /* model questions */ #include "ltraext.h" #endif /*LTRA*/ ngspice-26/src/spicelib/devices/ltra/Makefile.in0000644000265600020320000004256012264261537021253 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/ltra DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libltra_la_LIBADD = am_libltra_la_OBJECTS = ltra.lo ltraacct.lo ltraacld.lo ltraask.lo \ ltradel.lo ltradest.lo ltrainit.lo ltraload.lo ltramask.lo \ ltramdel.lo ltramisc.lo ltrampar.lo ltrapar.lo ltraset.lo \ ltratemp.lo ltratrun.lo libltra_la_OBJECTS = $(am_libltra_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libltra_la_SOURCES) DIST_SOURCES = $(libltra_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libltra.la libltra_la_SOURCES = \ ltra.c \ ltraacct.c \ ltraacld.c \ ltraask.c \ ltradefs.h \ ltradel.c \ ltradest.c \ ltraext.h \ ltrainit.c \ ltrainit.h \ ltraitf.h \ ltraload.c \ ltramask.c \ ltramdel.c \ ltramisc.c \ ltrampar.c \ ltrapar.c \ ltraset.c \ ltratemp.c \ ltratrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/ltra/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/ltra/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libltra.la: $(libltra_la_OBJECTS) $(libltra_la_DEPENDENCIES) $(EXTRA_libltra_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libltra_la_OBJECTS) $(libltra_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltraacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltraacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltraask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltradel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltradest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltrainit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltraload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltramask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltramdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltramisc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltrampar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltrapar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltraset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltratemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltratrun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/ltra/ltraset.c0000644000265600020320000001731512264261473021027 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* * load the transmission line structure with those pointers needed later for * fast matrix loading */ { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; int error; CKTnode *tmp; NG_IGNORE(state); /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { if (!model->LTRAnlGiven) { model->LTRAnl = .25; } if (!model->LTRAfGiven) { model->LTRAf = 1e9; } if (!model->LTRAreltolGiven) { model->LTRAreltol = 1; } if (!model->LTRAabstolGiven) { model->LTRAabstol = 1; } if (!model->LTRAresistGiven) { SPfrontEnd->IFerror (ERR_WARNING, "%s: lossy line series resistance not given, assumed zero", &(model->LTRAmodName)); model->LTRAresist = 0.0; /* return(E_BADPARM); */ } if (model->LTRAstLineReltol == 0.0) model->LTRAstLineReltol = ckt->CKTreltol; if (model->LTRAstLineAbstol == 0.0) model->LTRAstLineAbstol = ckt->CKTabstol; /* LTRAchopReltol and LTRAchopAbstol default zero */ if ((model->LTRAhowToInterp != LTRA_MOD_LININTERP) && (model->LTRAhowToInterp != LTRA_MOD_QUADINTERP) && (model->LTRAhowToInterp != LTRA_MOD_MIXEDINTERP)) { /* * SPfrontEnd->IFerror (ERR_FATAL, "%s: have to specify one of * lininterp, quadinterp or mixedinterp", &(model->LTRAmodName)); * return(E_BADPARM); */ if (ckt->CKTtryToCompact) { model->LTRAhowToInterp = LTRA_MOD_LININTERP; SPfrontEnd->IFerror (ERR_WARNING, "%s: using linear interpolation because trytocompact option specified", &(model->LTRAmodName)); } else { model->LTRAhowToInterp = LTRA_MOD_QUADINTERP; } } if ((model->LTRAstepLimit != LTRA_MOD_NOSTEPLIMIT)) model->LTRAstepLimit = LTRA_MOD_STEPLIMIT; if ((model->LTRAlteConType != LTRA_MOD_FULLCONTROL) && (model->LTRAlteConType != LTRA_MOD_HALFCONTROL)) model->LTRAlteConType = LTRA_MOD_NOCONTROL; if (!model->LTRAconductGiven) { /* * SPfrontEnd->IFerror (ERR_WARNING, "%s: lossy line parallel * conductance not given, assumed zero", &(model->LTRAmodName)); */ model->LTRAconduct = 0.0; /* return(E_BADPARM); */ } if (!model->LTRAinductGiven) { SPfrontEnd->IFerror (ERR_WARNING, "%s: lossy line series inductance not given, assumed zero", &(model->LTRAmodName)); model->LTRAinduct = 0.0; /* return(E_BADPARM); */ } if (!model->LTRAcapacGiven) { SPfrontEnd->IFerror (ERR_FATAL, "%s: lossy line parallel capacitance not given, assumed zero", &(model->LTRAmodName)); model->LTRAcapac = 0.0; /* return(E_BADPARM); */ } if (!model->LTRAlengthGiven) { SPfrontEnd->IFerror (ERR_FATAL, "%s: lossy line length must be given", &(model->LTRAmodName)); return (E_BADPARM); } if ((model->LTRAresist == 0) && (model->LTRAconduct == 0) && (model->LTRAcapac != 0) && (model->LTRAinduct != 0)) { model->LTRAspecialCase = LTRA_MOD_LC; #ifdef LTRADEBUG SPfrontEnd->IFerror (ERR_INFO, "%s: lossless line", &(model->LTRAmodName)); #endif } if ((model->LTRAresist != 0) && (model->LTRAconduct == 0) && (model->LTRAcapac != 0) && (model->LTRAinduct != 0)) { model->LTRAspecialCase = LTRA_MOD_RLC; #ifdef LTRADEBUG SPfrontEnd->IFerror (ERR_INFO, "%s: RLC line", &(model->LTRAmodName)); #endif } if ((model->LTRAresist != 0) && (model->LTRAconduct == 0) && (model->LTRAcapac != 0) && (model->LTRAinduct == 0)) { model->LTRAspecialCase = LTRA_MOD_RC; #ifdef LTRADEBUG SPfrontEnd->IFerror (ERR_INFO, "%s: RC line", &(model->LTRAmodName)); #endif } if ((model->LTRAresist != 0) && (model->LTRAconduct == 0) && (model->LTRAcapac == 0) && (model->LTRAinduct != 0)) { model->LTRAspecialCase = LTRA_MOD_RL; SPfrontEnd->IFerror (ERR_FATAL, "%s: RL line not supported yet", &(model->LTRAmodName)); return (E_BADPARM); #ifdef LTRADEBUG #endif } if ((model->LTRAresist != 0) && (model->LTRAconduct != 0) && (model->LTRAcapac == 0) && (model->LTRAinduct == 0)) { model->LTRAspecialCase = LTRA_MOD_RG; #ifdef LTRADEBUG SPfrontEnd->IFerror (ERR_INFO, "%s: RG line", &(model->LTRAmodName)); #endif } if ((model->LTRAconduct != 0) && ((model->LTRAcapac != 0) || (model->LTRAinduct != 0))) { model->LTRAspecialCase = LTRA_MOD_LTRA; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nonzero G (except RG) line not supported yet", &(model->LTRAmodName)); return (E_BADPARM); #ifdef LTRADEBUG #endif } if ((model->LTRAresist == 0.0 ? 0 : 1) + (model->LTRAconduct == 0.0 ? 0 : 1) + (model->LTRAinduct == 0.0 ? 0 : 1) + (model->LTRAcapac == 0.0 ? 0 : 1) <= 1) { SPfrontEnd->IFerror (ERR_FATAL, "%s: At least two of R,L,G,C must be specified and nonzero", &(model->LTRAmodName)); return (E_BADPARM); } /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { if (here->LTRAbrEq1 == 0) { error = CKTmkVolt(ckt, &tmp, here->LTRAname, "i1"); if (error) return (error); here->LTRAbrEq1 = tmp->number; } if (here->LTRAbrEq2 == 0) { error = CKTmkVolt(ckt, &tmp, here->LTRAname, "i2"); if (error) return (error); here->LTRAbrEq2 = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(LTRAibr1Pos1Ptr, LTRAbrEq1, LTRAposNode1); TSTALLOC(LTRAibr1Neg1Ptr, LTRAbrEq1, LTRAnegNode1); TSTALLOC(LTRAibr1Pos2Ptr, LTRAbrEq1, LTRAposNode2); TSTALLOC(LTRAibr1Neg2Ptr, LTRAbrEq1, LTRAnegNode2); TSTALLOC(LTRAibr1Ibr1Ptr, LTRAbrEq1, LTRAbrEq1); TSTALLOC(LTRAibr1Ibr2Ptr, LTRAbrEq1, LTRAbrEq2); TSTALLOC(LTRAibr2Pos1Ptr, LTRAbrEq2, LTRAposNode1); TSTALLOC(LTRAibr2Neg1Ptr, LTRAbrEq2, LTRAnegNode1); TSTALLOC(LTRAibr2Pos2Ptr, LTRAbrEq2, LTRAposNode2); TSTALLOC(LTRAibr2Neg2Ptr, LTRAbrEq2, LTRAnegNode2); TSTALLOC(LTRAibr2Ibr1Ptr, LTRAbrEq2, LTRAbrEq1); TSTALLOC(LTRAibr2Ibr2Ptr, LTRAbrEq2, LTRAbrEq2); TSTALLOC(LTRApos1Ibr1Ptr, LTRAposNode1, LTRAbrEq1); TSTALLOC(LTRAneg1Ibr1Ptr, LTRAnegNode1, LTRAbrEq1); TSTALLOC(LTRApos2Ibr2Ptr, LTRAposNode2, LTRAbrEq2); TSTALLOC(LTRAneg2Ibr2Ptr, LTRAnegNode2, LTRAbrEq2); /* * the following are done so that SMPpreOrder does not screw up on * occasion - for example, when one end of the lossy line is hanging */ TSTALLOC(LTRApos1Pos1Ptr, LTRAposNode1, LTRAposNode1); TSTALLOC(LTRAneg1Neg1Ptr, LTRAnegNode1, LTRAnegNode1); TSTALLOC(LTRApos2Pos2Ptr, LTRAposNode2, LTRAposNode2); TSTALLOC(LTRAneg2Neg2Ptr, LTRAnegNode2, LTRAnegNode2); } } return (OK); } int LTRAunsetup(GENmodel *inModel, CKTcircuit *ckt) { LTRAmodel *model; LTRAinstance *here; for (model = (LTRAmodel *) inModel; model != NULL; model = model->LTRAnextModel) { for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { if (here->LTRAbrEq1) { CKTdltNNum(ckt, here->LTRAbrEq1); here->LTRAbrEq1 = 0; } if (here->LTRAbrEq2) { CKTdltNNum(ckt, here->LTRAbrEq2); here->LTRAbrEq2 = 0; } } } return OK; } ngspice-26/src/spicelib/devices/ltra/ltrainit.c0000644000265600020320000000425712264261473021200 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ltraitf.h" #include "ltraext.h" #include "ltrainit.h" SPICEdev LTRAinfo = { { "LTRA", "Lossy transmission line", <RAnSize, <RAnSize, LTRAnames, <RApTSize, LTRApTable, <RAmPTSize, LTRAmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ LTRAparam, /* DEVmodParam */ LTRAmParam, /* DEVload */ LTRAload, /* DEVsetup */ LTRAsetup, /* DEVunsetup */ LTRAunsetup, /* DEVpzSetup */ LTRAsetup, /* DEVtemperature*/ LTRAtemp, /* DEVtrunc */ LTRAtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ LTRAacLoad /*LTRAacLoad*/, /* DEVaccept */ LTRAaccept, /* DEVdestroy */ LTRAdestroy, /* DEVmodDelete */ LTRAmDelete, /* DEVdelete */ LTRAdelete, /* DEVsetic */ NULL, /* getic */ /* DEVask */ LTRAask, /* DEVmodAsk */ LTRAmAsk, /* */ /* DEVpzLoad */ NULL, /* pzLoad */ /* DEVconvTest */ NULL, /* convTest */ /* DEVsenSetup */ NULL, /* sSetup */ /* DEVsenLoad */ NULL, /* sLoad */ /* DEVsenUpdate */ NULL, /* sUpdate */ /* DEVsenAcLoad */ NULL, /* sAcLoad */ /* DEVsenPrint */ NULL, /* sPrint */ /* DEVsenTrunc */ NULL, /* */ /* DEVdisto */ NULL, /* disto */ /* DEVnoise */ NULL, /* noise */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ <RAiSize, /* DEVmodSize */ <RAmSize }; SPICEdev * get_ltra_info(void) { return <RAinfo; } ngspice-26/src/spicelib/devices/ltra/ltramdel.c0000644000265600020320000000171112264261473021146 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { LTRAmodel **model = (LTRAmodel **) inModel; LTRAmodel *modfast = (LTRAmodel *) kill; LTRAinstance *here; LTRAinstance *prev = NULL; LTRAmodel **oldmod; oldmod = model; for (; *model; model = &((*model)->LTRAnextModel)) { if ((*model)->LTRAmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: *oldmod = (*model)->LTRAnextModel; /* cut deleted device out of list */ for (here = (*model)->LTRAinstances; here; here = here->LTRAnextInstance) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); FREE(*model); return (OK); } ngspice-26/src/spicelib/devices/ltra/ltra.c0000644000265600020320000000556512264261473020317 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ /* * This file defines the LTRA data structures that are available to the next * level(s) up the calling hierarchy */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ltradefs.h" #include "ngspice/suffix.h" IFparm LTRApTable[] = { /* parameters */ IOPAU("v1", LTRA_V1, IF_REAL, "Initial voltage at end 1"), IOPAU("v2", LTRA_V2, IF_REAL, "Initial voltage at end 2"), IOPAU("i1", LTRA_I1, IF_REAL, "Initial current at end 1"), IOPAU("i2", LTRA_I2, IF_REAL, "Initial current at end 2"), IP("ic", LTRA_IC, IF_REALVEC, "Initial condition vector:v1,i1,v2,i2"), OPU("pos_node1", LTRA_POS_NODE1, IF_INTEGER, "Positive node of end 1 of t-line"), OPU("neg_node1", LTRA_NEG_NODE1, IF_INTEGER, "Negative node of end 1 of t.line"), OPU("pos_node2", LTRA_POS_NODE2, IF_INTEGER, "Positive node of end 2 of t-line"), OPU("neg_node2", LTRA_NEG_NODE2, IF_INTEGER, "Negative node of end 2 of t-line") }; IFparm LTRAmPTable[] = { /* model parameters */ IOP("ltra", LTRA_MOD_LTRA, IF_FLAG, "LTRA model"), IOPU("r", LTRA_MOD_R, IF_REAL, "Resistance per metre"), IOPAU("l", LTRA_MOD_L, IF_REAL, "Inductance per metre"), IOPR("g", LTRA_MOD_G, IF_REAL, "Conductance per metre"), IOPAU("c", LTRA_MOD_C, IF_REAL, "Capacitance per metre"), IOPU("len", LTRA_MOD_LEN, IF_REAL, "length of line"), OP("rel", LTRA_MOD_RELTOL, IF_REAL, "Rel. rate of change of deriv. for bkpt"), OP("abs", LTRA_MOD_ABSTOL, IF_REAL, "Abs. rate of change of deriv. for bkpt"), IOPU("nocontrol", LTRA_MOD_NOCONTROL, IF_FLAG, "No timestep control"), IOPU("steplimit", LTRA_MOD_STEPLIMIT, IF_FLAG, "always limit timestep to 0.8*(delay of line)"), IOPU("nosteplimit", LTRA_MOD_NOSTEPLIMIT, IF_FLAG, "don't always limit timestep to 0.8*(delay of line)"), IOPU("lininterp", LTRA_MOD_LININTERP, IF_FLAG, "use linear interpolation"), IOPU("quadinterp", LTRA_MOD_QUADINTERP, IF_FLAG, "use quadratic interpolation"), IOPU("mixedinterp", LTRA_MOD_MIXEDINTERP, IF_FLAG, "use linear interpolation if quadratic results look unacceptable"), IOPU("truncnr", LTRA_MOD_TRUNCNR, IF_FLAG, "use N-R iterations for step calculation in LTRAtrunc"), IOPU("truncdontcut", LTRA_MOD_TRUNCDONTCUT, IF_FLAG, "don't limit timestep to keep impulse response calculation errors low"), IOPAU("compactrel", LTRA_MOD_STLINEREL, IF_REAL, "special reltol for straight line checking"), IOPAU("compactabs", LTRA_MOD_STLINEABS, IF_REAL, "special abstol for straight line checking") }; char *LTRAnames[] = { "P1+", "P1-", "P2+", "P2-" }; int LTRAnSize = NUMELEMS(LTRAnames); int LTRApTSize = NUMELEMS(LTRApTable); int LTRAmPTSize = NUMELEMS(LTRAmPTable); int LTRAiSize = sizeof(LTRAinstance); int LTRAmSize = sizeof(LTRAmodel); ngspice-26/src/spicelib/devices/ltra/ltraext.h0000644000265600020320000000446312264261473021041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury Modified: 2000 AlansFixes **********/ extern int LTRAaccept(CKTcircuit*,GENmodel*); extern int LTRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int LTRAacLoad(GENmodel*,CKTcircuit*); extern int LTRAdelete(GENmodel*,IFuid,GENinstance**); extern void LTRAdestroy(GENmodel**); extern int LTRAload(GENmodel*,CKTcircuit*); extern int LTRAmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int LTRAmDelete(GENmodel**,IFuid,GENmodel*); extern int LTRAparam(int,IFvalue*,GENinstance*,IFvalue*); extern int LTRAmParam(int,IFvalue*,GENmodel*); extern int LTRAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int LTRAunsetup(GENmodel*,CKTcircuit*); extern int LTRAtemp(GENmodel*,CKTcircuit*); extern int LTRAtrunc(GENmodel*,CKTcircuit*,double*); extern int LTRAlinInterp(double,double,double,double*,double*); extern int LTRAquadInterp(double,double,double,double,double*,double*,double*); /* extern double LTRAcoeffSetup(double*,int,double,double,double*,double,double*,int,int*); extern double LTRAtCoeffSetup(double*,int,double,double*,double,double*,double,double*,int,int*); extern double LTRAdivDiffs(double*,double*,double,double,double*,int); */ extern double LTRArlcH1dashFunc(double,double,double,double); extern double LTRArlcH2Func(double,double,double,double); extern double LTRArlcH3dashFunc(double,double,double,double); extern double LTRArlcH1dashTwiceIntFunc(double,double); extern double LTRArlcH3dashIntFunc(double,double,double); extern double LTRArcH1dashTwiceIntFunc(double,double); extern double LTRArcH2TwiceIntFunc(double,double); extern double LTRArcH3dashTwiceIntFunc(double,double,double); extern double LTRAlteCalculate(CKTcircuit*,GENmodel*,GENinstance*,double); /* extern double LTRAh1dashCoeffSetup(double*,int,double,double,double*,int,int*); extern double LTRAh3dashCoeffSetup(double*,int,double,double,double,double*,int,int*); */ extern void LTRArcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double*,int,double); extern void LTRArlcCoeffsSetup(double*,double*,double*,double*,double*,double*,int,double,double,double,double,double*,int,double,int*); extern int LTRAstraightLineCheck(double,double,double,double,double,double,double,double); ngspice-26/src/spicelib/devices/ltra/ltrampar.c0000644000265600020320000000550012264261473021164 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ /* * This routine sets model parameters for LTRA lines in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAmParam(int param, IFvalue *value, GENmodel *inModel) { LTRAmodel *mods = (LTRAmodel *) inModel; switch (param) { case LTRA_MOD_LTRA: break; case LTRA_MOD_RELTOL: mods->LTRAreltol = value->rValue; mods->LTRAreltolGiven = TRUE; break; case LTRA_MOD_ABSTOL: mods->LTRAabstol = value->rValue; mods->LTRAabstolGiven = TRUE; break; case LTRA_MOD_STLINEREL: mods->LTRAstLineReltol = value->rValue; break; case LTRA_MOD_STLINEABS: mods->LTRAstLineAbstol = value->rValue; break; case LTRA_MOD_CHOPREL: mods->LTRAchopReltol = value->rValue; break; case LTRA_MOD_CHOPABS: mods->LTRAchopAbstol = value->rValue; break; case LTRA_MOD_TRUNCNR: mods->LTRAtruncNR = TRUE; break; case LTRA_MOD_TRUNCDONTCUT: mods->LTRAtruncDontCut = TRUE; break; case LTRA_MOD_R: mods->LTRAresist = value->rValue; mods->LTRAresistGiven = TRUE; break; case LTRA_MOD_L: mods->LTRAinduct = value->rValue; mods->LTRAinductGiven = TRUE; break; case LTRA_MOD_G: mods->LTRAconduct = value->rValue; mods->LTRAconductGiven = TRUE; break; case LTRA_MOD_C: mods->LTRAcapac = value->rValue; mods->LTRAcapacGiven = TRUE; break; case LTRA_MOD_LEN: mods->LTRAlength = value->rValue; mods->LTRAlengthGiven = TRUE; break; case LTRA_MOD_NL: mods->LTRAnl = value->rValue; mods->LTRAnlGiven = TRUE; break; case LTRA_MOD_FREQ: mods->LTRAf = value->rValue; mods->LTRAfGiven = TRUE; break; case LTRA_MOD_FULLCONTROL: mods->LTRAlteConType = LTRA_MOD_FULLCONTROL; break; case LTRA_MOD_HALFCONTROL: mods->LTRAlteConType = LTRA_MOD_HALFCONTROL; break; case LTRA_MOD_NOCONTROL: mods->LTRAlteConType = LTRA_MOD_NOCONTROL; break; case LTRA_MOD_PRINT: mods->LTRAprintFlag = TRUE; break; case LTRA_MOD_NOPRINT: mods->LTRAprintFlag = FALSE; break; /* * case LTRA_MOD_RONLY: mods->LTRArOnly= TRUE; break; */ case LTRA_MOD_STEPLIMIT: mods->LTRAstepLimit = LTRA_MOD_STEPLIMIT; break; case LTRA_MOD_NOSTEPLIMIT: mods->LTRAstepLimit = LTRA_MOD_NOSTEPLIMIT; break; case LTRA_MOD_LININTERP: mods->LTRAhowToInterp = LTRA_MOD_LININTERP; break; case LTRA_MOD_QUADINTERP: mods->LTRAhowToInterp = LTRA_MOD_QUADINTERP; break; case LTRA_MOD_MIXEDINTERP: mods->LTRAhowToInterp = LTRA_MOD_MIXEDINTERP; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltraitf.h0000644000265600020320000000032512264261473021014 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #ifndef DEV_LTRA #define DEV_LTRA SPICEdev *get_ltra_info(void); #endif ngspice-26/src/spicelib/devices/ltra/ltraload.c0000644000265600020320000005410012264261473021144 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ltradefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int LTRAload(GENmodel *inModel, CKTcircuit *ckt) /* * load the appropriate values for the current timepoint into the sparse * matrix and the right-hand-side vector */ { LTRAmodel *model = (LTRAmodel *) inModel; LTRAinstance *here; double t1=0.0, t2=0.0, t3=0.0; double qf1=0.0, qf2=0.0, qf3=0.0; double lf2, lf3; double v1d = 0.0, v2d = 0.0, i1d = 0.0, i2d = 0.0; double dummy1=0.0, dummy2=0.0; int isaved = 0; unsigned tdover = 0; int i; double max = 0.0, min = 0.0; /* loop through all the transmission line models */ for (; model != NULL; model = model->LTRAnextModel) { if (ckt->CKTmode & MODEDC) { switch (model->LTRAspecialCase) { case LTRA_MOD_RG: dummy1 = model->LTRAlength * sqrt(model->LTRAresist * model->LTRAconduct); dummy2 = exp(-dummy1); dummy1 = exp(dummy1); /* LTRA warning: may overflow! */ model->LTRAcoshlrootGR = 0.5 * (dummy1 + dummy2); if (model->LTRAconduct <= 1.0e-10) { /* hack! */ model->LTRArRsLrGRorG = model->LTRAlength * model->LTRAresist; } else { model->LTRArRsLrGRorG = 0.5 * (dummy1 - dummy2) * sqrt(model->LTRAresist / model->LTRAconduct); } if (model->LTRAresist <= 1.0e-10) { /* hack! */ model->LTRArGsLrGRorR = model->LTRAlength * model->LTRAconduct; } else { model->LTRArGsLrGRorR = 0.5 * (dummy1 - dummy2) * sqrt(model->LTRAconduct / model->LTRAresist); } break; case LTRA_MOD_RC: case LTRA_MOD_LC: case LTRA_MOD_RLC: /* simple resistor-like behaviour */ /* nothing to set up */ break; default: return (E_BADPARM); } /* switch */ } else { if ((ckt->CKTmode & MODEINITTRAN) || (ckt->CKTmode & MODEINITPRED)) { switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: case LTRA_MOD_LC: if (ckt->CKTtime > model->LTRAtd) { tdover = 1; } else { tdover = 0; } default: break; } switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: /* * set up lists of values of the functions at the necessary * timepoints. */ /* * set up coefficient lists LTRAh1dashCoeffs, LTRAh2Coeffs, * LTRAh3dashCoeffs for current timepoint */ /* * NOTE: h1, h2 and h3 here actually refer to h1tilde, h2tilde, * h3tilde in the paper */ /* * Note: many function evaluations are saved by doing the following * all together in one procedure */ (void) LTRArlcCoeffsSetup(&(model->LTRAh1dashFirstCoeff), &(model->LTRAh2FirstCoeff), &(model->LTRAh3dashFirstCoeff), model->LTRAh1dashCoeffs, model->LTRAh2Coeffs, model->LTRAh3dashCoeffs, model->LTRAmodelListSize, model->LTRAtd, model->LTRAalpha, model->LTRAbeta, ckt->CKTtime, ckt->CKTtimePoints, ckt->CKTtimeIndex, model->LTRAchopReltol, &(model->LTRAauxIndex)); case LTRA_MOD_LC: /* setting up the coefficients for interpolation */ if (tdover) { /* serious hack -fix! */ for (i = ckt->CKTtimeIndex; i >= 0; i--) { if (*(ckt->CKTtimePoints + i) < ckt->CKTtime - model->LTRAtd) { break; } } #ifdef LTRADEBUG if (i == ckt->CKTtimeIndex) { fprintf(stdout, "LTRAload: Warning: timestep larger than delay of line\n"); fprintf(stdout, " Time now: %g\n\n", ckt->CKTtime); } #endif if (i == ckt->CKTtimeIndex) i--; /*#ifdef LTRADEBUG*/ if ((i == -1)) { #ifdef LTRADEBUG printf("LTRAload: mistake: cannot find delayed timepoint\n"); return E_INTERN; /*}*/ #else return E_INTERN; #endif } isaved = i; t2 = *(ckt->CKTtimePoints + i); t3 = *(ckt->CKTtimePoints + i + 1); if ((i != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP))) { /* quadratic interpolation */ t1 = *(ckt->CKTtimePoints + i - 1); LTRAquadInterp(ckt->CKTtime - model->LTRAtd, t1, t2, t3, &qf1, &qf2, &qf3); } if ((i == 0) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP) || (model->LTRAhowToInterp == LTRA_MOD_LININTERP)) { /* linear interpolation */ LTRAlinInterp(ckt->CKTtime - model->LTRAtd, t2, t3, &lf2, &lf3); } } /* interpolation coefficients set-up */ break; case LTRA_MOD_RC: /* * set up lists of values of the coefficients at the necessary * timepoints. */ /* * set up coefficient lists LTRAh1dashCoeffs, LTRAh2Coeffs, * LTRAh3dashCoeffs for current timepoint */ /* * Note: many function evaluations are saved by doing the following * all together in one procedure */ (void) LTRArcCoeffsSetup(&(model->LTRAh1dashFirstCoeff), &(model->LTRAh2FirstCoeff), &(model->LTRAh3dashFirstCoeff), model->LTRAh1dashCoeffs, model->LTRAh2Coeffs, model->LTRAh3dashCoeffs, model->LTRAmodelListSize, model->LTRAcByR, model->LTRArclsqr, ckt->CKTtime, ckt->CKTtimePoints, ckt->CKTtimeIndex, model->LTRAchopReltol); break; case LTRA_MOD_RG: break; default: return (E_BADPARM); } } } /* loop through all the instances of the model */ for (here = model->LTRAinstances; here != NULL; here = here->LTRAnextInstance) { if ((ckt->CKTmode & MODEDC) || (model->LTRAspecialCase == LTRA_MOD_RG)) { switch (model->LTRAspecialCase) { case LTRA_MOD_RG: *(here->LTRAibr1Pos1Ptr) += 1.0; *(here->LTRAibr1Neg1Ptr) -= 1.0; *(here->LTRAibr1Pos2Ptr) -= model->LTRAcoshlrootGR; *(here->LTRAibr1Neg2Ptr) += model->LTRAcoshlrootGR; *(here->LTRAibr1Ibr2Ptr) += (1 + ckt->CKTgmin) * model->LTRArRsLrGRorG; *(here->LTRAibr2Ibr2Ptr) += model->LTRAcoshlrootGR; *(here->LTRAibr2Pos2Ptr) -= (1 + ckt->CKTgmin) * model->LTRArGsLrGRorR; *(here->LTRAibr2Neg2Ptr) += (1 + ckt->CKTgmin) * model->LTRArGsLrGRorR; *(here->LTRAibr2Ibr1Ptr) += 1.0; *(here->LTRApos1Ibr1Ptr) += 1.0; *(here->LTRAneg1Ibr1Ptr) -= 1.0; *(here->LTRApos2Ibr2Ptr) += 1.0; *(here->LTRAneg2Ibr2Ptr) -= 1.0; here->LTRAinput1 = here->LTRAinput2 = 0.0; /* * Somewhere else, we have fixed the matrix with zero entries so * that SMPpreOrder doesn't have fits */ break; case LTRA_MOD_LC: case LTRA_MOD_RLC: case LTRA_MOD_RC: /* load a simple resistor */ *(here->LTRApos1Ibr1Ptr) += 1.0; *(here->LTRAneg1Ibr1Ptr) -= 1.0; *(here->LTRApos2Ibr2Ptr) += 1.0; *(here->LTRAneg2Ibr2Ptr) -= 1.0; *(here->LTRAibr1Ibr1Ptr) += 1.0; *(here->LTRAibr1Ibr2Ptr) += 1.0; *(here->LTRAibr2Pos1Ptr) += 1.0; *(here->LTRAibr2Pos2Ptr) -= 1.0; *(here->LTRAibr2Ibr1Ptr) -= model->LTRAresist * model->LTRAlength; here->LTRAinput1 = here->LTRAinput2 = 0.0; break; default: return (E_BADPARM); } } else { /* all cases other than DC or the RG case */ /* first timepoint after zero */ if (ckt->CKTmode & MODEINITTRAN) { if (!(ckt->CKTmode & MODEUIC)) { here->LTRAinitVolt1 = (*(ckt->CKTrhsOld + here->LTRAposNode1) - *(ckt->CKTrhsOld + here->LTRAnegNode1)); here->LTRAinitVolt2 = (*(ckt->CKTrhsOld + here->LTRAposNode2) - *(ckt->CKTrhsOld + here->LTRAnegNode2)); here->LTRAinitCur1 = *(ckt->CKTrhsOld + here->LTRAbrEq1); here->LTRAinitCur2 = *(ckt->CKTrhsOld + here->LTRAbrEq2); } } /* matrix loading - done every time LTRAload is called */ switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: /* loading for convolution parts' first terms */ dummy1 = model->LTRAadmit * model->LTRAh1dashFirstCoeff; *(here->LTRAibr1Pos1Ptr) += dummy1; *(here->LTRAibr1Neg1Ptr) -= dummy1; *(here->LTRAibr2Pos2Ptr) += dummy1; *(here->LTRAibr2Neg2Ptr) -= dummy1; /* end loading for convolution parts' first terms */ case LTRA_MOD_LC: /* * this section loads for the parts of the equations that resemble * the lossless equations */ *(here->LTRAibr1Pos1Ptr) += model->LTRAadmit; *(here->LTRAibr1Neg1Ptr) -= model->LTRAadmit; *(here->LTRAibr1Ibr1Ptr) -= 1.0; *(here->LTRApos1Ibr1Ptr) += 1.0; *(here->LTRAneg1Ibr1Ptr) -= 1.0; *(here->LTRAibr2Pos2Ptr) += model->LTRAadmit; *(here->LTRAibr2Neg2Ptr) -= model->LTRAadmit; *(here->LTRAibr2Ibr2Ptr) -= 1.0; *(here->LTRApos2Ibr2Ptr) += 1.0; *(here->LTRAneg2Ibr2Ptr) -= 1.0; /* loading for lossless-like parts over */ break; case LTRA_MOD_RC: /* * this section loads for the parts of the equations that have no * convolution */ *(here->LTRAibr1Ibr1Ptr) -= 1.0; *(here->LTRApos1Ibr1Ptr) += 1.0; *(here->LTRAneg1Ibr1Ptr) -= 1.0; *(here->LTRAibr2Ibr2Ptr) -= 1.0; *(here->LTRApos2Ibr2Ptr) += 1.0; *(here->LTRAneg2Ibr2Ptr) -= 1.0; /* loading for non-convolution parts over */ /* loading for convolution parts' first terms */ dummy1 = model->LTRAh1dashFirstCoeff; *(here->LTRAibr1Pos1Ptr) += dummy1; *(here->LTRAibr1Neg1Ptr) -= dummy1; *(here->LTRAibr2Pos2Ptr) += dummy1; *(here->LTRAibr2Neg2Ptr) -= dummy1; dummy1 = model->LTRAh2FirstCoeff; *(here->LTRAibr1Ibr2Ptr) -= dummy1; *(here->LTRAibr2Ibr1Ptr) -= dummy1; dummy1 = model->LTRAh3dashFirstCoeff; *(here->LTRAibr1Pos2Ptr) -= dummy1; *(here->LTRAibr1Neg2Ptr) += dummy1; *(here->LTRAibr2Pos1Ptr) -= dummy1; *(here->LTRAibr2Neg1Ptr) += dummy1; /* end loading for convolution parts' first terms */ break; default: return (E_BADPARM); } /* INITPRED - first NR iteration of each timepoint */ /* set up LTRAinputs - to go into the RHS of the circuit equations */ if (ckt->CKTmode & (MODEINITPRED | MODEINITTRAN)) { here->LTRAinput1 = here->LTRAinput2 = 0.0; switch (model->LTRAspecialCase) { case LTRA_MOD_LC: case LTRA_MOD_RLC: if (tdover) { /* have to interpolate values */ if ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP))) { v1d = *(here->LTRAv1 + isaved - 1) * qf1 + *(here->LTRAv1 + isaved) * qf2 + *(here->LTRAv1 + isaved + 1) * qf3; max = MAX(*(here->LTRAv1 + isaved - 1), *(here->LTRAv1 + isaved)); max = MAX(max, *(here->LTRAv1 + isaved + 1)); min = MIN(*(here->LTRAv1 + isaved - 1), *(here->LTRAv1 + isaved)); min = MIN(min, *(here->LTRAv1 + isaved + 1)); } if ((model->LTRAhowToInterp == LTRA_MOD_LININTERP) || (isaved == 0) || ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP)) && ((v1d > max) || (v1d < min)))) { if ((isaved != 0) && (model->LTRAhowToInterp == LTRA_MOD_QUADINTERP)) { #ifdef LTRADEBUG fprintf(stdout, "LTRAload: warning: interpolated v1 is out of range after timepoint %d\n", ckt->CKTtimeIndex); fprintf(stdout, " values: %1.8g %1.8g %1.8g; interpolated: %1.8g\n", *(here->LTRAv1 + isaved - 1), *(here->LTRAv1 + isaved), *(here->LTRAv1 + isaved + 1), v1d); fprintf(stdout, " timepoints are: %1.8g %1.8g %1.8g %1.8g\n", t1, t2, t3, ckt->CKTtime - model->LTRAtd); #endif } else { v1d = *(here->LTRAv1 + isaved) * lf2 + *(here->LTRAv1 + isaved + 1) * lf3; } } if ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP))) { i1d = *(here->LTRAi1 + isaved - 1) * qf1 + *(here->LTRAi1 + isaved) * qf2 + *(here->LTRAi1 + isaved + 1) * qf3; max = MAX(*(here->LTRAi1 + isaved - 1), *(here->LTRAi1 + isaved)); max = MAX(max, *(here->LTRAi1 + isaved + 1)); min = MIN(*(here->LTRAi1 + isaved - 1), *(here->LTRAi1 + isaved)); min = MIN(min, *(here->LTRAi1 + isaved + 1)); } if ((model->LTRAhowToInterp == LTRA_MOD_LININTERP) || (isaved == 0) || ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP)) && ((i1d > max) || (i1d < min)))) { if ((isaved != 0) && (model->LTRAhowToInterp == LTRA_MOD_QUADINTERP)) { #ifdef LTRADEBUG fprintf(stdout, "LTRAload: warning: interpolated i1 is out of range after timepoint %d\n", ckt->CKTtimeIndex); fprintf(stdout, " values: %1.8g %1.8g %1.8g; interpolated: %1.8g\n", *(here->LTRAi1 + isaved - 1), *(here->LTRAi1 + isaved), *(here->LTRAi1 + isaved + 1), i1d); fprintf(stdout, " timepoints are: %1.8g %1.8g %1.8g %1.8g\n", t1, t2, t3, ckt->CKTtime - model->LTRAtd); #endif } else { i1d = *(here->LTRAi1 + isaved) * lf2 + *(here->LTRAi1 + isaved + 1) * lf3; } } if ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP))) { v2d = *(here->LTRAv2 + isaved - 1) * qf1 + *(here->LTRAv2 + isaved) * qf2 + *(here->LTRAv2 + isaved + 1) * qf3; max = MAX(*(here->LTRAv2 + isaved - 1), *(here->LTRAv2 + isaved)); max = MAX(max, *(here->LTRAv2 + isaved + 1)); min = MIN(*(here->LTRAv2 + isaved - 1), *(here->LTRAv2 + isaved)); min = MIN(min, *(here->LTRAv2 + isaved + 1)); } if ((model->LTRAhowToInterp == LTRA_MOD_LININTERP) || (isaved == 0) || ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP)) && ((v2d > max) || (v2d < min)))) { if ((isaved != 0) && (model->LTRAhowToInterp == LTRA_MOD_QUADINTERP)) { #ifdef LTRADEBUG fprintf(stdout, "LTRAload: warning: interpolated v2 is out of range after timepoint %d\n", ckt->CKTtimeIndex); fprintf(stdout, " values: %1.8g %1.8g %1.8g; interpolated: %1.8g\n", *(here->LTRAv2 + isaved - 1), *(here->LTRAv2 + isaved), *(here->LTRAv2 + isaved + 1), v2d); fprintf(stdout, " timepoints are: %1.8g %1.8g %1.8g %1.8g\n", t1, t2, t3, ckt->CKTtime - model->LTRAtd); #endif } else { v2d = *(here->LTRAv2 + isaved) * lf2 + *(here->LTRAv2 + isaved + 1) * lf3; } } if ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP))) { i2d = *(here->LTRAi2 + isaved - 1) * qf1 + *(here->LTRAi2 + isaved) * qf2 + *(here->LTRAi2 + isaved + 1) * qf3; max = MAX(*(here->LTRAi2 + isaved - 1), *(here->LTRAi2 + isaved)); max = MAX(max, *(here->LTRAi2 + isaved + 1)); min = MIN(*(here->LTRAi2 + isaved - 1), *(here->LTRAi2 + isaved)); min = MIN(min, *(here->LTRAi2 + isaved + 1)); } if ((model->LTRAhowToInterp == LTRA_MOD_LININTERP) || (isaved == 0) || ((isaved != 0) && ((model->LTRAhowToInterp == LTRA_MOD_QUADINTERP) || (model->LTRAhowToInterp == LTRA_MOD_MIXEDINTERP)) && ((i2d > max) || (i2d < min)))) { if ((isaved != 0) && (model->LTRAhowToInterp == LTRA_MOD_QUADINTERP)) { #ifdef LTRADEBUG fprintf(stdout, "LTRAload: warning: interpolated i2 is out of range after timepoint %d\n", ckt->CKTtimeIndex); fprintf(stdout, " values: %1.8g %1.8g %1.8g; interpolated: %1.8g\n", *(here->LTRAi2 + isaved - 1), *(here->LTRAi2 + isaved), *(here->LTRAi2 + isaved + 1), i2d); fprintf(stdout, " timepoints are: %1.8g %1.8g %1.8g %1.8g\n", t1, t2, t3, ckt->CKTtime - model->LTRAtd); #endif } else { i2d = *(here->LTRAi2 + isaved) * lf2 + *(here->LTRAi2 + isaved + 1) * lf3; } } } /* interpolation done */ break; case LTRA_MOD_RC: break; default: return (E_BADPARM); } switch (model->LTRAspecialCase) { case LTRA_MOD_RLC: /* begin convolution parts */ /* convolution of h1dash with v1 and v2 */ /* the matrix has already been loaded above */ dummy1 = dummy2 = 0.0; for (i = /* model->LTRAh1dashIndex */ ckt->CKTtimeIndex; i > 0; i--) { if (*(model->LTRAh1dashCoeffs + i) != 0.0) { dummy1 += *(model->LTRAh1dashCoeffs + i) * (*(here->LTRAv1 + i) - here->LTRAinitVolt1); dummy2 += *(model->LTRAh1dashCoeffs + i) * (*(here->LTRAv2 + i) - here->LTRAinitVolt2); } } dummy1 += here->LTRAinitVolt1 * model->LTRAintH1dash; dummy2 += here->LTRAinitVolt2 * model->LTRAintH1dash; dummy1 -= here->LTRAinitVolt1 * model->LTRAh1dashFirstCoeff; dummy2 -= here->LTRAinitVolt2 * model->LTRAh1dashFirstCoeff; here->LTRAinput1 -= dummy1 * model->LTRAadmit; here->LTRAinput2 -= dummy2 * model->LTRAadmit; /* end convolution of h1dash with v1 and v2 */ /* convolution of h2 with i2 and i1 */ dummy1 = dummy2 = 0.0; if (tdover) { /* the term for ckt->CKTtime - model->LTRAtd */ dummy1 = (i2d - here->LTRAinitCur2) * model->LTRAh2FirstCoeff; dummy2 = (i1d - here->LTRAinitCur1) * model->LTRAh2FirstCoeff; /* the rest of the convolution */ for (i = /* model->LTRAh2Index */ model->LTRAauxIndex; i > 0; i--) { if (*(model->LTRAh2Coeffs + i) != 0.0) { dummy1 += *(model->LTRAh2Coeffs + i) * (*(here->LTRAi2 + i) - here->LTRAinitCur2); dummy2 += *(model->LTRAh2Coeffs + i) * (*(here->LTRAi1 + i) - here->LTRAinitCur1); } } } /* the initial-condition terms */ dummy1 += here->LTRAinitCur2 * model->LTRAintH2; dummy2 += here->LTRAinitCur1 * model->LTRAintH2; here->LTRAinput1 += dummy1; here->LTRAinput2 += dummy2; /* end convolution of h2 with i2 and i1 */ /* convolution of h3dash with v2 and v1 */ /* the term for ckt->CKTtime - model->LTRAtd */ dummy1 = dummy2 = 0.0; if (tdover) { dummy1 = (v2d - here->LTRAinitVolt2) * model->LTRAh3dashFirstCoeff; dummy2 = (v1d - here->LTRAinitVolt1) * model->LTRAh3dashFirstCoeff; /* the rest of the convolution */ for (i = /* model->LTRAh3dashIndex */ model->LTRAauxIndex; i > 0; i--) { if (*(model->LTRAh3dashCoeffs + i) != 0.0) { dummy1 += *(model->LTRAh3dashCoeffs + i) * (*(here->LTRAv2 + i) - here->LTRAinitVolt2); dummy2 += *(model->LTRAh3dashCoeffs + i) * (*(here->LTRAv1 + i) - here->LTRAinitVolt1); } } } /* the initial-condition terms */ dummy1 += here->LTRAinitVolt2 * model->LTRAintH3dash; dummy2 += here->LTRAinitVolt1 * model->LTRAintH3dash; here->LTRAinput1 += model->LTRAadmit * dummy1; here->LTRAinput2 += model->LTRAadmit * dummy2; /* end convolution of h3dash with v2 and v1 */ case LTRA_MOD_LC: /* begin lossless-like parts */ if (!tdover) { here->LTRAinput1 += model->LTRAattenuation * (here->LTRAinitVolt2 * model->LTRAadmit + here->LTRAinitCur2); here->LTRAinput2 += model->LTRAattenuation * (here->LTRAinitVolt1 * model->LTRAadmit + here->LTRAinitCur1); } else { here->LTRAinput1 += model->LTRAattenuation * (v2d * model->LTRAadmit + i2d); here->LTRAinput2 += model->LTRAattenuation * (v1d * model->LTRAadmit + i1d); } /* end lossless-like parts */ break; case LTRA_MOD_RC: /* begin convolution parts */ /* convolution of h1dash with v1 and v2 */ /* the matrix has already been loaded above */ dummy1 = 0.0; dummy2 = 0.0; for (i = ckt->CKTtimeIndex; i > 0; i--) { if (*(model->LTRAh1dashCoeffs + i) != 0.0) { dummy1 += *(model->LTRAh1dashCoeffs + i) * (*(here->LTRAv1 + i) - here->LTRAinitVolt1); dummy2 += *(model->LTRAh1dashCoeffs + i) * (*(here->LTRAv2 + i) - here->LTRAinitVolt2); } } /* the initial condition terms */ dummy1 += here->LTRAinitVolt1 * model->LTRAintH1dash; dummy2 += here->LTRAinitVolt2 * model->LTRAintH1dash; /* * the constant contributed by the init condition and the latest * timepoint */ dummy1 -= here->LTRAinitVolt1 * model->LTRAh1dashFirstCoeff; dummy2 -= here->LTRAinitVolt2 * model->LTRAh1dashFirstCoeff; here->LTRAinput1 -= dummy1; here->LTRAinput2 -= dummy2; /* end convolution of h1dash with v1 and v2 */ /* convolution of h2 with i2 and i1 */ dummy1 = dummy2 = 0.0; for (i = ckt->CKTtimeIndex; i > 0; i--) { if (*(model->LTRAh2Coeffs + i) != 0.0) { dummy1 += *(model->LTRAh2Coeffs + i) * (*(here->LTRAi2 + i) - here->LTRAinitCur2); dummy2 += *(model->LTRAh2Coeffs + i) * (*(here->LTRAi1 + i) - here->LTRAinitCur1); } } /* the initial-condition terms */ dummy1 += here->LTRAinitCur2 * model->LTRAintH2; dummy2 += here->LTRAinitCur1 * model->LTRAintH2; dummy1 -= here->LTRAinitCur2 * model->LTRAh2FirstCoeff; dummy2 -= here->LTRAinitCur1 * model->LTRAh2FirstCoeff; here->LTRAinput1 += dummy1; here->LTRAinput2 += dummy2; /* end convolution of h2 with i2 and i1 */ /* convolution of h3dash with v2 and v1 */ dummy1 = dummy2 = 0.0; for (i = ckt->CKTtimeIndex; i > 0; i--) { if (*(model->LTRAh3dashCoeffs + i) != 0.0) { dummy1 += *(model->LTRAh3dashCoeffs + i) * (*(here->LTRAv2 + i) - here->LTRAinitVolt2); dummy2 += *(model->LTRAh3dashCoeffs + i) * (*(here->LTRAv1 + i) - here->LTRAinitVolt1); } } /* the initial-condition terms */ dummy1 += here->LTRAinitVolt2 * model->LTRAintH3dash; dummy2 += here->LTRAinitVolt1 * model->LTRAintH3dash; dummy1 -= here->LTRAinitVolt2 * model->LTRAh3dashFirstCoeff; dummy2 -= here->LTRAinitVolt1 * model->LTRAh3dashFirstCoeff; here->LTRAinput1 += dummy1; here->LTRAinput2 += dummy2; /* end convolution of h3dash with v2 and v1 */ break; default: return (E_BADPARM); } } /* load the RHS - done every time this routine is called */ *(ckt->CKTrhs + here->LTRAbrEq1) += here->LTRAinput1; *(ckt->CKTrhs + here->LTRAbrEq2) += here->LTRAinput2; } } } return (OK); } ngspice-26/src/spicelib/devices/ltra/ltraask.c0000644000265600020320000000435712264261473021014 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ /* * This routine gives access to the internal device parameter of LTRA lines */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ltradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int LTRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { LTRAinstance *here = (LTRAinstance *) inst; int temp; NG_IGNORE(select); NG_IGNORE(ckt); switch (which) { case LTRA_POS_NODE1: value->iValue = here->LTRAposNode1; return (OK); case LTRA_NEG_NODE1: value->iValue = here->LTRAnegNode1; return (OK); case LTRA_POS_NODE2: value->iValue = here->LTRAposNode2; return (OK); case LTRA_NEG_NODE2: value->iValue = here->LTRAnegNode2; return (OK); case LTRA_MOD_Z0: value->rValue = here->LTRAmodPtr->LTRAimped; return (OK); case LTRA_MOD_TD: value->rValue = here->LTRAmodPtr->LTRAtd; return (OK); case LTRA_MOD_NL: value->rValue = here->LTRAmodPtr->LTRAnl; return (OK); case LTRA_MOD_FREQ: value->rValue = here->LTRAmodPtr->LTRAf; return (OK); case LTRA_V1: value->rValue = here->LTRAinitVolt1; return (OK); case LTRA_I1: value->rValue = here->LTRAinitCur1; return (OK); case LTRA_V2: value->rValue = here->LTRAinitVolt2; return (OK); case LTRA_I2: value->rValue = here->LTRAinitCur2; return (OK); case LTRA_MOD_RELTOL: value->rValue = here->LTRAmodPtr->LTRAreltol; return (OK); case LTRA_MOD_ABSTOL: value->rValue = here->LTRAmodPtr->LTRAabstol; return (OK); case LTRA_BR_EQ1: value->rValue = here->LTRAbrEq1; return (OK); case LTRA_BR_EQ2: value->rValue = here->LTRAbrEq2; return (OK); case LTRA_DELAY: /* * value->v.vec.rVec = TMALLOC(double, here->LTRAsizeDelay); * value->v.numValue = temp = here->LTRAsizeDelay; while (temp--) { * value->v.vec.rVec++ = *here->LTRAdelays++; */ value->v.vec.rVec = NULL; value->v.numValue = temp = 0; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/devsup.c0000644000265600020320000005422012264261473017711 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* support routines for device models */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/suffix.h" #include /* * Limit the per-iteration change of VDS */ double DEVlimvds(double vnew, double vold) { if(vold >= 3.5) { if(vnew > vold) { vnew = MIN(vnew,(3 * vold) +2); } else { if (vnew < 3.5) { vnew = MAX(vnew,2); } } } else { if(vnew > vold) { vnew = MIN(vnew,4); } else { vnew = MAX(vnew,-.5); } } return(vnew); } /* * Limit the per-iteration change of PN junction voltages * * This code has been fixed by Alan Gillespie adding limiting * for negative voltages. */ double DEVpnjlim(double vnew, double vold, double vt, double vcrit, int *icheck) { double arg; if((vnew > vcrit) && (fabs(vnew - vold) > (vt + vt))) { if(vold > 0) { arg = (vnew - vold) / vt; if(arg > 0) { vnew = vold + vt * (2+log(arg-2)); } else { vnew = vold - vt * (2+log(2-arg)); } } else { vnew = vt *log(vnew/vt); } *icheck = 1; } else { if (vnew < 0) { if (vold > 0) { arg = -1*vold-1; } else { arg = 2*vold-1; } if (vnew < arg) { vnew = arg; *icheck = 1; } else { *icheck = 0; } } else { *icheck = 0; } } return(vnew); } /* * Limit the per-iteration change of FET voltages * * This code has been fixed by Alan Gillespie: a new * definition for vtstlo. */ double DEVfetlim(double vnew, double vold, double vto) { double vtsthi; double vtstlo; double vtox; double delv; double vtemp; vtsthi = fabs(2*(vold-vto))+2; vtstlo = fabs(vold-vto)+1; vtox = vto + 3.5; delv = vnew-vold; if (vold >= vto) { if(vold >= vtox) { if(delv <= 0) { /* going off */ if(vnew >= vtox) { if(-delv >vtstlo) { vnew = vold - vtstlo; } } else { vnew = MAX(vnew,vto+2); } } else { /* staying on */ if(delv >= vtsthi) { vnew = vold + vtsthi; } } } else { /* middle region */ if(delv <= 0) { /* decreasing */ vnew = MAX(vnew,vto-.5); } else { /* increasing */ vnew = MIN(vnew,vto+4); } } } else { /* off */ if(delv <= 0) { if(-delv >vtsthi) { vnew = vold - vtsthi; } } else { vtemp = vto + .5; if(vnew <= vtemp) { if(delv >vtstlo) { vnew = vold + vtstlo; } } else { vnew = vtemp; } } } return(vnew); } int ACM_SourceDrainResistances( int ACM, double LD, double LDIF, double HDIF, double WMLT, double w, double XW, double RSH, int drainSquaresGiven, double RD, double RDC, double drainSquares, int sourceSquaresGiven, double RS, double RSC, double sourceSquares, double *drainConductance, double *sourceConductance ) { switch (ACM) { case 1: case 11: *drainConductance = (LD + LDIF)/(w * WMLT + XW)*RD + RSH*drainSquares + RDC; *sourceConductance = (LD + LDIF)/(w * WMLT + XW)*RS + RSH*sourceSquares + RSC; break; case 2: case 12: case 3: case 13: if (drainSquaresGiven) *drainConductance = (LD + LDIF)/(w * WMLT + XW)*RD + RSH*drainSquares + RDC; else *drainConductance = ((LD + LDIF)*RD + (HDIF * WMLT)*RSH)/(w * WMLT + XW) + RDC; if (sourceSquaresGiven) *sourceConductance = (LD + LDIF)/(w * WMLT + XW)*RS + RSH*sourceSquares + RSC; else *sourceConductance = ((LD + LDIF)*RS + (HDIF * WMLT)*RSH)/(w * WMLT + XW) + RSC; break; default: break; } return 0; } /* Area Calculation Method (ACM) for MOS models */ int ACM_saturationCurrents( int ACM, int CALCACM, int GEO, double HDIF, double WMLT, double w, double XW, double jctTempSatCurDensity, double jctSidewallTempSatCurDensity, int drainAreaGiven, double drainArea, int drainPerimeterGiven, double drainPerimeter, int sourceAreaGiven, double sourceArea, int sourcePerimeterGiven, double sourcePerimeter, double *DrainSatCurrent, double *SourceSatCurrent ) { switch (ACM) { case 1: case 11: drainArea = (w * WMLT + XW) * WMLT; drainPerimeter = (w * WMLT + XW); *DrainSatCurrent = drainArea * jctTempSatCurDensity + drainPerimeter * jctSidewallTempSatCurDensity; if (*DrainSatCurrent <= 0.0) *DrainSatCurrent = 1.0e-14; sourceArea = (w * WMLT + XW) * WMLT; sourcePerimeter = (w * WMLT + XW); *SourceSatCurrent = sourceArea * jctTempSatCurDensity + sourcePerimeter * jctSidewallTempSatCurDensity; if (*SourceSatCurrent <= 0.0) *SourceSatCurrent = 1.0e-14; break; case 2: case 12: if ((ACM == 2) || ((ACM == 12) && (CALCACM == 1))) { if (!drainAreaGiven) drainArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else drainArea = drainArea * WMLT * WMLT; if (!drainPerimeterGiven) drainPerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else drainPerimeter = drainPerimeter * WMLT; } *DrainSatCurrent = drainArea * jctTempSatCurDensity + drainPerimeter * jctSidewallTempSatCurDensity; if (*DrainSatCurrent <= 0.0) *DrainSatCurrent = 1.0e-14; if ((ACM == 2) || ((ACM == 12) && (CALCACM == 1))) { if (!sourceAreaGiven) sourceArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = sourceArea * WMLT * WMLT; if (!sourcePerimeterGiven) sourcePerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else sourcePerimeter = sourcePerimeter * WMLT; } *SourceSatCurrent = sourceArea * jctTempSatCurDensity + sourcePerimeter * jctSidewallTempSatCurDensity; if (*SourceSatCurrent <= 0.0) *SourceSatCurrent = 1.0e-14; break; case 3: case 13: if (!drainAreaGiven) if ((GEO == 0) || (GEO == 2)) drainArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else drainArea = (HDIF * WMLT) * (w * WMLT + XW); else drainArea = drainArea * WMLT * WMLT; if (!drainPerimeterGiven) if ((GEO == 0) || (GEO == 2)) drainPerimeter = 4.0 * (HDIF * WMLT) + (w * WMLT + XW); else drainPerimeter = 2.0 * (HDIF * WMLT); else drainPerimeter = drainPerimeter * WMLT; *DrainSatCurrent = drainArea * jctTempSatCurDensity + drainPerimeter * jctSidewallTempSatCurDensity; if (*DrainSatCurrent <= 0.0) *DrainSatCurrent = 1.0e-14; if (!sourceAreaGiven) if ((GEO == 0) || (GEO == 1)) sourceArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = sourceArea * WMLT * WMLT; if (!sourcePerimeterGiven) if ((GEO == 0) || (GEO == 1)) sourcePerimeter = 4.0 * (HDIF * WMLT) + (w * WMLT + XW); else sourcePerimeter = 2.0 * (HDIF * WMLT); else sourcePerimeter = sourcePerimeter * WMLT; *SourceSatCurrent = sourceArea * jctTempSatCurDensity + sourcePerimeter * jctSidewallTempSatCurDensity; if (*SourceSatCurrent <= 0.0) *SourceSatCurrent = 1.0e-14; break; default: break; } return 0; } int ACM_junctionCapacitances( int ACM, int CALCACM, int GEO, double HDIF, double WMLT, double w, double XW, int drainAreaGiven, double drainArea, int drainPerimeterGiven, double drainPerimeter, int sourceAreaGiven, double sourceArea, int sourcePerimeterGiven, double sourcePerimeter, double CJ, double CJSW, double CJGATE, double *areaDrainBulkCapacitance, double *periDrainBulkCapacitance, double *gateDrainBulkCapacitance, double *areaSourceBulkCapacitance, double *periSourceBulkCapacitance, double *gateSourceBulkCapacitance ) { switch (ACM) { case 1: drainArea = (w * WMLT + XW) * WMLT; drainPerimeter = (w * WMLT + XW); *areaDrainBulkCapacitance = drainArea * CJ; *periDrainBulkCapacitance = drainPerimeter * CJSW; *gateDrainBulkCapacitance = 0.0; sourceArea = (w * WMLT + XW) * WMLT; sourcePerimeter = (w * WMLT + XW); *areaSourceBulkCapacitance = sourceArea * CJ; *periSourceBulkCapacitance = sourcePerimeter * CJSW; *gateSourceBulkCapacitance = 0.0; break; case 2: if (!drainAreaGiven) drainArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else drainArea = drainArea * WMLT * WMLT; if (!drainPerimeterGiven) drainPerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else drainPerimeter = drainPerimeter * WMLT; *areaDrainBulkCapacitance = drainArea * CJ; if (drainPerimeter > (w * WMLT + XW)) { *periDrainBulkCapacitance = (drainPerimeter - (w * WMLT + XW)) * CJSW; *gateDrainBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periDrainBulkCapacitance = drainPerimeter * CJGATE; *gateDrainBulkCapacitance = 0.0; } if (!sourceAreaGiven) sourceArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = sourceArea * WMLT * WMLT; if (!sourcePerimeterGiven) sourcePerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else sourcePerimeter = sourcePerimeter * WMLT; *areaSourceBulkCapacitance = sourceArea * CJ; if (sourcePerimeter > (w * WMLT + XW)) { *periSourceBulkCapacitance = (sourcePerimeter - (w * WMLT + XW)) * CJSW; *gateSourceBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periSourceBulkCapacitance = sourcePerimeter * CJGATE; *gateSourceBulkCapacitance = 0.0; } break; case 3: if (!drainAreaGiven) if ((GEO == 0) || (GEO == 2)) drainArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else drainArea = (HDIF * WMLT) * (w * WMLT + XW); else drainArea = drainArea * WMLT * WMLT; if (!drainPerimeterGiven) if ((GEO == 0) || (GEO == 2)) drainPerimeter = 4.0 * (HDIF * WMLT) + (w * WMLT + XW); else drainPerimeter = 2.0 * (HDIF * WMLT); else drainPerimeter = drainPerimeter * WMLT; *areaDrainBulkCapacitance = drainArea * CJ; *periDrainBulkCapacitance = drainPerimeter * CJSW ; *gateDrainBulkCapacitance = (w * WMLT + XW) * CJGATE; if (!sourceAreaGiven) if ((GEO == 0) || (GEO == 1)) sourceArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = sourceArea * WMLT * WMLT; if (!sourcePerimeterGiven) if ((GEO == 0) || (GEO == 1)) sourcePerimeter = 4.0 * (HDIF * WMLT) + (w * WMLT + XW); else sourcePerimeter = 2.0 * (HDIF * WMLT); else sourcePerimeter = sourcePerimeter * WMLT; *areaSourceBulkCapacitance = sourceArea * CJ; *periSourceBulkCapacitance = sourcePerimeter * CJSW; *gateSourceBulkCapacitance = (w * WMLT + XW) * CJGATE; break; case 11: drainArea = (w * WMLT + XW) * WMLT; drainPerimeter = (w * WMLT + XW); *areaDrainBulkCapacitance = drainArea * CJ; *periDrainBulkCapacitance = drainPerimeter * CJSW; *gateDrainBulkCapacitance = 0.0; sourceArea = (w * WMLT + XW) * WMLT; sourcePerimeter = (w * WMLT + XW); *areaSourceBulkCapacitance = sourceArea * CJ; *periSourceBulkCapacitance = sourcePerimeter * CJSW; *gateSourceBulkCapacitance = 0.0; break; case 12: if (CALCACM == 1) { if (!drainAreaGiven) drainArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else drainArea = drainArea * WMLT * WMLT; if (!drainPerimeterGiven) drainPerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else drainPerimeter = drainPerimeter * WMLT; } *areaDrainBulkCapacitance = drainArea * CJ; if (drainPerimeter > (w * WMLT + XW)) { *periDrainBulkCapacitance = (drainPerimeter - (w * WMLT + XW)) * CJSW; *gateDrainBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periDrainBulkCapacitance = 0.0; *gateDrainBulkCapacitance = drainPerimeter * CJGATE; } if (CALCACM == 1) { if (!sourceAreaGiven) sourceArea = 2.0 * (HDIF * WMLT) * (w * WMLT + XW); else sourceArea = sourceArea * WMLT * WMLT; if (!sourcePerimeterGiven) sourcePerimeter = 4.0 * (HDIF * WMLT) + 2.0 * (w * WMLT + XW); else sourcePerimeter = sourcePerimeter * WMLT; } *areaSourceBulkCapacitance = sourceArea * CJ; if (sourcePerimeter > (w * WMLT + XW)) { *periSourceBulkCapacitance = (sourcePerimeter - (w * WMLT + XW)) * CJSW; *gateSourceBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periSourceBulkCapacitance = 0.0; *gateSourceBulkCapacitance = sourcePerimeter * CJGATE; } break; case 13: drainArea = drainArea * WMLT * WMLT; drainPerimeter = drainPerimeter * WMLT; *areaDrainBulkCapacitance = drainArea * CJ; if (drainPerimeter > (w * WMLT + XW)) { *periDrainBulkCapacitance = (drainPerimeter - (w * WMLT + XW)) * CJSW; *gateDrainBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periDrainBulkCapacitance = 0.0; *gateDrainBulkCapacitance = drainPerimeter * CJGATE; } sourceArea = sourceArea * WMLT * WMLT; sourcePerimeter = sourcePerimeter * WMLT; *areaSourceBulkCapacitance = sourceArea * CJ; if (sourcePerimeter > (w * WMLT + XW)) { *periSourceBulkCapacitance = (sourcePerimeter - (w * WMLT + XW)) * CJSW; *gateSourceBulkCapacitance = (w * WMLT + XW) * CJGATE; } else { *periSourceBulkCapacitance = 0.0; *gateSourceBulkCapacitance = sourcePerimeter * CJGATE; } break; default: break; } return 0; } /* Compute the MOS overlap capacitances as functions of the device * terminal voltages * * PN 2002: As of ngspice this code is not used by any device. */ void DEVcmeyer(double vgs0, /* initial voltage gate-source */ double vgd0, /* initial voltage gate-drain */ double vgb0, /* initial voltage gate-bulk */ double von0, double vdsat0, double vgs1, /* final voltage gate-source */ double vgd1, /* final voltage gate-drain */ double vgb1, /* final voltage gate-bulk */ double covlgs, /* overlap capacitance gate-source */ double covlgd, /* overlap capacitance gate-drain */ double covlgb, /* overlap capacitance gate-bulk */ double *cgs, double *cgd, double *cgb, double phi, double cox, double von, double vdsat) { double vdb; double vdbsat; double vddif; double vddif1; double vddif2; double vgbt; *cgs = 0; *cgd = 0; *cgb = 0; vgbt = vgs1-von; if (vgbt <= -phi) { *cgb = cox; } else if (vgbt <= -phi/2) { *cgb = -vgbt*cox/phi; } else if (vgbt <= 0) { *cgb = -vgbt*cox/phi; *cgs = cox/(7.5e-1*phi)*vgbt+cox/1.5; } else { vdbsat = vdsat-(vgs1-vgb1); vdb = vgb1-vgd1; if (vdbsat <= vdb) { *cgs = cox/1.5; } else { vddif = 2.0*vdbsat-vdb; vddif1 = vdbsat-vdb-1.0e-12; vddif2 = vddif*vddif; *cgd = cox*(1.0-vdbsat*vdbsat/vddif2)/1.5; *cgs = cox*(1.0-vddif1*vddif1/vddif2)/1.5; } } vgbt = vgs0-von0; if (vgbt <= -phi) { *cgb += cox; } else if (vgbt <= -phi/2) { *cgb += -vgbt*cox/phi; } else if (vgbt <= 0) { *cgb += -vgbt*cox/phi; *cgs += cox/(7.5e-1*phi)*vgbt+cox/1.5; } else { vdbsat = vdsat0-(vgs0-vgb0); vdb = vgb0-vgd0; if (vdbsat <= vdb) { *cgs += cox/1.5; } else { vddif = 2.0*vdbsat-vdb; vddif1 = vdbsat-vdb-1.0e-12; vddif2 = vddif*vddif; *cgd += cox*(1.0-vdbsat*vdbsat/vddif2)/1.5; *cgs += cox*(1.0-vddif1*vddif1/vddif2)/1.5; } } *cgs = *cgs *.5 + covlgs; *cgd = *cgd *.5 + covlgd; *cgb = *cgb *.5 + covlgb; } /* Compute the MOS overlap capacitances as functions of the device * terminal voltages * * PN 2002: This is the Meyer model used by MOS1 MOS2 MOS3 MOS6 and MOS9 * device models. */ void DEVqmeyer(double vgs, /* initial voltage gate-source */ double vgd, /* initial voltage gate-drain */ double vgb, /* initial voltage gate-bulk */ double von, double vdsat, double *capgs, /* non-constant portion of g-s overlap capacitance */ double *capgd, /* non-constant portion of g-d overlap capacitance */ double *capgb, /* non-constant portion of g-b overlap capacitance */ double phi, double cox) /* oxide capactiance */ { double vds; double vddif; double vddif1; double vddif2; double vgst; NG_IGNORE(vgb); #define MAGIC_VDS 0.025 vgst = vgs-von; vdsat = MAX(vdsat, MAGIC_VDS); if (vgst <= -phi) { *capgb = cox/2; *capgs = 0; *capgd = 0; } else if (vgst <= -phi/2) { *capgb = -vgst*cox/(2*phi); *capgs = 0; *capgd = 0; } else if (vgst <= 0) { *capgb = -vgst*cox/(2*phi); *capgs = vgst*cox/(1.5*phi)+cox/3; vds = vgs-vgd; if (vds>=vdsat) { *capgd = 0; } else { vddif = 2.0*vdsat-vds; vddif1 = vdsat-vds/*-1.0e-12*/; vddif2 = vddif*vddif; *capgd = *capgs*(1.0-vdsat*vdsat/vddif2); *capgs = *capgs*(1.0-vddif1*vddif1/vddif2); } } else { vds = vgs-vgd; vdsat = MAX(vdsat, MAGIC_VDS); if (vdsat <= vds) { *capgs = cox/3; *capgd = 0; *capgb = 0; } else { vddif = 2.0*vdsat-vds; vddif1 = vdsat-vds/*-1.0e-12*/; vddif2 = vddif*vddif; *capgd = cox*(1.0-vdsat*vdsat/vddif2)/3; *capgs = cox*(1.0-vddif1*vddif1/vddif2)/3; *capgb = 0; } } } #ifdef notdef /* XXX This is no longer used, apparently * PN 2002: This is industrial archaelology */ void DEVcap(CKTcircuit *ckt, double vgd, double vgs, double vgb, double covlgd, double covlgs, double covlgb, double capbd, double capbs, double cggb, double cgdb, double cgsb, double cbgb, double cbdb, double cbsb, double *gcggb, double *gcgdb, double *gcgsb, double *gcbgb, double *gcbdb, double *gcbsb, double *gcdgb, double *gcddb, double *gcdsb, double *gcsgb, double *gcsdb, double *gcssb, double qgate, double qchan, double qbulk, double *qdrn, double *qsrc, double xqc) /* * compute equivalent conductances * divide up the channel charge (1-xqc)/xqc to source and drain */ { double gcd; double gcdxd; double gcdxs; double gcg; double gcgxd; double gcgxs; double gcs; double gcsxd; double gcsxs; double qgb; double qgd; double qgs; gcg = (cggb+cbgb)*ckt->CKTag[1]; gcd = (cgdb+cbdb)*ckt->CKTag[1]; gcs = (cgsb+cbsb)*ckt->CKTag[1]; gcgxd = -xqc*gcg; gcgxs = -(1-xqc)*gcg; gcdxd = -xqc*gcd; gcdxs = -(1-xqc)*gcd; gcsxd = -xqc*gcs; gcsxs = -(1-xqc)*gcs; *gcdgb = gcgxd-covlgd*ckt->CKTag[1]; *gcddb = gcdxd+(capbd+covlgd)*ckt->CKTag[1]; *gcdsb = gcsxd; *gcsgb = gcgxs-covlgs*ckt->CKTag[1]; *gcsdb = gcdxs; *gcssb = gcsxs+(capbs+covlgs)*ckt->CKTag[1]; *gcggb = (cggb+covlgd+covlgs+covlgb)*ckt->CKTag[1]; *gcgdb = (cgdb-covlgd)*ckt->CKTag[1]; *gcgsb = (cgsb-covlgs)*ckt->CKTag[1]; *gcbgb = (cbgb-covlgb)*ckt->CKTag[1]; *gcbdb = (cbdb-capbd)*ckt->CKTag[1]; *gcbsb = (cbsb-capbs)*ckt->CKTag[1]; /* * compute total terminal charges */ qgd = covlgd*vgd; qgs = covlgs*vgs; qgb = covlgb*vgb; qgate = qgate+qgd+qgs+qgb; qbulk = qbulk-qgb; *qdrn = xqc*qchan-qgd; *qsrc = (1-xqc)*qchan-qgs; /* * finished */ } #endif /* Predict a value for the capacitor at loct by extrapolating from * previous values */ double DEVpred(CKTcircuit *ckt, int loct) { #ifndef NEWTRUNC double xfact; xfact = ckt->CKTdelta/ckt->CKTdeltaOld[1]; return( ( (1+xfact) * *(ckt->CKTstate1+loct) ) - ( xfact * *(ckt->CKTstate2+loct) ) ); #endif /* NEWTRUNC */ } /* SOA check printout used in DEVsoaCheck functions */ extern FILE *slogp; /* soa log file ('--soa-log file' command line option) */ void soa_printf(CKTcircuit *ckt, GENinstance *instance, const char *fmt, ...) { FILE *fp = slogp ? slogp : stdout; va_list ap; va_start(ap, fmt); if (ckt->CKTmode & MODETRAN) fprintf(fp, "Instance: %s Model: %s Time: %g ", instance->GENname, instance->GENmodPtr->GENmodName, ckt->CKTtime); else fprintf(fp, "Instance: %s Model: %s ", instance->GENname, instance->GENmodPtr->GENmodName); vfprintf(fp, fmt, ap); va_end(ap); } ngspice-26/src/spicelib/devices/bsim4v5/0000755000265600020320000000000012264261706017524 5ustar andreasadminngspice-26/src/spicelib/devices/bsim4v5/bsim4v5itf.h0000644000265600020320000000037712264261473021701 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Author: 2001- Xuemei Xi File: bsim4v5itf.h **********/ #ifndef DEV_BSIM4V5 #define DEV_BSIM4V5 SPICEdev *get_bsim4v5_info(void); #endif ngspice-26/src/spicelib/devices/bsim4v5/b4v5set.c0000644000265600020320000025046212264261473021176 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4set.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/jobdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 int BSIM4v5setup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; int error; CKTnode *tmp; int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */ double Rtot, DMCGeff, DMCIeff, DMDGeff; JOB *job; /* Search for a noise analysis request */ for (job = ft_curckt->ci_curTask->jobs; job; job = job->JOBnextJob) { if(strcmp(job->JOBname,"Noise Analysis")==0) { noiseAnalGiven = 1; break; } } /* loop through all the BSIM4v5 device models */ for( ; model != NULL; model = model->BSIM4v5nextModel ) { /* process defaults of model parameters */ if (!model->BSIM4v5typeGiven) model->BSIM4v5type = NMOS; if (!model->BSIM4v5mobModGiven) model->BSIM4v5mobMod = 0; else if ((model->BSIM4v5mobMod != 0) && (model->BSIM4v5mobMod != 1) && (model->BSIM4v5mobMod != 2)) { model->BSIM4v5mobMod = 0; printf("Warning: mobMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5binUnitGiven) model->BSIM4v5binUnit = 1; if (!model->BSIM4v5paramChkGiven) model->BSIM4v5paramChk = 1; if (!model->BSIM4v5dioModGiven) model->BSIM4v5dioMod = 1; else if ((model->BSIM4v5dioMod != 0) && (model->BSIM4v5dioMod != 1) && (model->BSIM4v5dioMod != 2)) { model->BSIM4v5dioMod = 1; printf("Warning: dioMod has been set to its default value: 1.\n"); } if (!model->BSIM4v5capModGiven) model->BSIM4v5capMod = 2; else if ((model->BSIM4v5capMod != 0) && (model->BSIM4v5capMod != 1) && (model->BSIM4v5capMod != 2)) { model->BSIM4v5capMod = 2; printf("Warning: capMod has been set to its default value: 2.\n"); } if (!model->BSIM4v5rdsModGiven) model->BSIM4v5rdsMod = 0; else if ((model->BSIM4v5rdsMod != 0) && (model->BSIM4v5rdsMod != 1)) { model->BSIM4v5rdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5rbodyModGiven) model->BSIM4v5rbodyMod = 0; else if ((model->BSIM4v5rbodyMod != 0) && (model->BSIM4v5rbodyMod != 1) && (model->BSIM4v5rbodyMod != 2)) { model->BSIM4v5rbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5rgateModGiven) model->BSIM4v5rgateMod = 0; else if ((model->BSIM4v5rgateMod != 0) && (model->BSIM4v5rgateMod != 1) && (model->BSIM4v5rgateMod != 2) && (model->BSIM4v5rgateMod != 3)) { model->BSIM4v5rgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5perModGiven) model->BSIM4v5perMod = 1; else if ((model->BSIM4v5perMod != 0) && (model->BSIM4v5perMod != 1)) { model->BSIM4v5perMod = 1; printf("Warning: perMod has been set to its default value: 1.\n"); } if (!model->BSIM4v5geoModGiven) model->BSIM4v5geoMod = 0; if (!model->BSIM4v5rgeoModGiven) model->BSIM4v5rgeoMod = 0; else if ((model->BSIM4v5rgeoMod != 0) && (model->BSIM4v5rgeoMod != 1)) { model->BSIM4v5rgeoMod = 1; printf("Warning: rgeoMod has been set to its default value: 1.\n"); } if (!model->BSIM4v5fnoiModGiven) model->BSIM4v5fnoiMod = 1; else if ((model->BSIM4v5fnoiMod != 0) && (model->BSIM4v5fnoiMod != 1)) { model->BSIM4v5fnoiMod = 1; printf("Warning: fnoiMod has been set to its default value: 1.\n"); } if (!model->BSIM4v5tnoiModGiven) model->BSIM4v5tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ else if ((model->BSIM4v5tnoiMod != 0) && (model->BSIM4v5tnoiMod != 1)) { model->BSIM4v5tnoiMod = 0; printf("Warning: tnoiMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5trnqsModGiven) model->BSIM4v5trnqsMod = 0; else if ((model->BSIM4v5trnqsMod != 0) && (model->BSIM4v5trnqsMod != 1)) { model->BSIM4v5trnqsMod = 0; printf("Warning: trnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5acnqsModGiven) model->BSIM4v5acnqsMod = 0; else if ((model->BSIM4v5acnqsMod != 0) && (model->BSIM4v5acnqsMod != 1)) { model->BSIM4v5acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5igcModGiven) model->BSIM4v5igcMod = 0; else if ((model->BSIM4v5igcMod != 0) && (model->BSIM4v5igcMod != 1) && (model->BSIM4v5igcMod != 2)) { model->BSIM4v5igcMod = 0; printf("Warning: igcMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5igbModGiven) model->BSIM4v5igbMod = 0; else if ((model->BSIM4v5igbMod != 0) && (model->BSIM4v5igbMod != 1)) { model->BSIM4v5igbMod = 0; printf("Warning: igbMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5tempModGiven) model->BSIM4v5tempMod = 0; else if ((model->BSIM4v5tempMod != 0) && (model->BSIM4v5tempMod != 1) && (model->BSIM4v5tempMod != 2)) { model->BSIM4v5tempMod = 0; printf("Warning: tempMod has been set to its default value: 0.\n"); } if (!model->BSIM4v5versionGiven) model->BSIM4v5version = "4.5.0"; if (!model->BSIM4v5toxrefGiven) model->BSIM4v5toxref = 30.0e-10; if (!model->BSIM4v5toxeGiven) model->BSIM4v5toxe = 30.0e-10; if (!model->BSIM4v5toxpGiven) model->BSIM4v5toxp = model->BSIM4v5toxe; if (!model->BSIM4v5toxmGiven) model->BSIM4v5toxm = model->BSIM4v5toxe; if (!model->BSIM4v5dtoxGiven) model->BSIM4v5dtox = 0.0; if (!model->BSIM4v5epsroxGiven) model->BSIM4v5epsrox = 3.9; if (!model->BSIM4v5cdscGiven) model->BSIM4v5cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM4v5cdscbGiven) model->BSIM4v5cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v5cdscdGiven) model->BSIM4v5cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v5citGiven) model->BSIM4v5cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v5nfactorGiven) model->BSIM4v5nfactor = 1.0; if (!model->BSIM4v5xjGiven) model->BSIM4v5xj = .15e-6; if (!model->BSIM4v5vsatGiven) model->BSIM4v5vsat = 8.0e4; /* unit m/s */ if (!model->BSIM4v5atGiven) model->BSIM4v5at = 3.3e4; /* unit m/s */ if (!model->BSIM4v5a0Given) model->BSIM4v5a0 = 1.0; if (!model->BSIM4v5agsGiven) model->BSIM4v5ags = 0.0; if (!model->BSIM4v5a1Given) model->BSIM4v5a1 = 0.0; if (!model->BSIM4v5a2Given) model->BSIM4v5a2 = 1.0; if (!model->BSIM4v5ketaGiven) model->BSIM4v5keta = -0.047; /* unit / V */ if (!model->BSIM4v5nsubGiven) model->BSIM4v5nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM4v5ndepGiven) model->BSIM4v5ndep = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM4v5nsdGiven) model->BSIM4v5nsd = 1.0e20; /* unit 1/cm3 */ if (!model->BSIM4v5phinGiven) model->BSIM4v5phin = 0.0; /* unit V */ if (!model->BSIM4v5ngateGiven) model->BSIM4v5ngate = 0; /* unit 1/cm3 */ if (!model->BSIM4v5vbmGiven) model->BSIM4v5vbm = -3.0; if (!model->BSIM4v5xtGiven) model->BSIM4v5xt = 1.55e-7; if (!model->BSIM4v5kt1Given) model->BSIM4v5kt1 = -0.11; /* unit V */ if (!model->BSIM4v5kt1lGiven) model->BSIM4v5kt1l = 0.0; /* unit V*m */ if (!model->BSIM4v5kt2Given) model->BSIM4v5kt2 = 0.022; /* No unit */ if (!model->BSIM4v5k3Given) model->BSIM4v5k3 = 80.0; if (!model->BSIM4v5k3bGiven) model->BSIM4v5k3b = 0.0; if (!model->BSIM4v5w0Given) model->BSIM4v5w0 = 2.5e-6; if (!model->BSIM4v5lpe0Given) model->BSIM4v5lpe0 = 1.74e-7; if (!model->BSIM4v5lpebGiven) model->BSIM4v5lpeb = 0.0; if (!model->BSIM4v5dvtp0Given) model->BSIM4v5dvtp0 = 0.0; if (!model->BSIM4v5dvtp1Given) model->BSIM4v5dvtp1 = 0.0; if (!model->BSIM4v5dvt0Given) model->BSIM4v5dvt0 = 2.2; if (!model->BSIM4v5dvt1Given) model->BSIM4v5dvt1 = 0.53; if (!model->BSIM4v5dvt2Given) model->BSIM4v5dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM4v5dvt0wGiven) model->BSIM4v5dvt0w = 0.0; if (!model->BSIM4v5dvt1wGiven) model->BSIM4v5dvt1w = 5.3e6; if (!model->BSIM4v5dvt2wGiven) model->BSIM4v5dvt2w = -0.032; if (!model->BSIM4v5droutGiven) model->BSIM4v5drout = 0.56; if (!model->BSIM4v5dsubGiven) model->BSIM4v5dsub = model->BSIM4v5drout; if (!model->BSIM4v5vth0Given) model->BSIM4v5vth0 = (model->BSIM4v5type == NMOS) ? 0.7 : -0.7; if (!model->BSIM4v5euGiven) model->BSIM4v5eu = (model->BSIM4v5type == NMOS) ? 1.67 : 1.0;; if (!model->BSIM4v5uaGiven) model->BSIM4v5ua = (model->BSIM4v5mobMod == 2) ? 1.0e-15 : 1.0e-9; /* unit m/V */ if (!model->BSIM4v5ua1Given) model->BSIM4v5ua1 = 1.0e-9; /* unit m/V */ if (!model->BSIM4v5ubGiven) model->BSIM4v5ub = 1.0e-19; /* unit (m/V)**2 */ if (!model->BSIM4v5ub1Given) model->BSIM4v5ub1 = -1.0e-18; /* unit (m/V)**2 */ if (!model->BSIM4v5ucGiven) model->BSIM4v5uc = (model->BSIM4v5mobMod == 1) ? -0.0465 : -0.0465e-9; if (!model->BSIM4v5uc1Given) model->BSIM4v5uc1 = (model->BSIM4v5mobMod == 1) ? -0.056 : -0.056e-9; if (!model->BSIM4v5udGiven) model->BSIM4v5ud = 1.0e14; /* unit m**(-2) */ if (!model->BSIM4v5ud1Given) model->BSIM4v5ud1 = 0.0; if (!model->BSIM4v5upGiven) model->BSIM4v5up = 0.0; if (!model->BSIM4v5lpGiven) model->BSIM4v5lp = 1.0e-8; if (!model->BSIM4v5u0Given) model->BSIM4v5u0 = (model->BSIM4v5type == NMOS) ? 0.067 : 0.025; if (!model->BSIM4v5uteGiven) model->BSIM4v5ute = -1.5; if (!model->BSIM4v5voffGiven) model->BSIM4v5voff = -0.08; if (!model->BSIM4v5vofflGiven) model->BSIM4v5voffl = 0.0; if (!model->BSIM4v5minvGiven) model->BSIM4v5minv = 0.0; if (!model->BSIM4v5fproutGiven) model->BSIM4v5fprout = 0.0; if (!model->BSIM4v5pditsGiven) model->BSIM4v5pdits = 0.0; if (!model->BSIM4v5pditsdGiven) model->BSIM4v5pditsd = 0.0; if (!model->BSIM4v5pditslGiven) model->BSIM4v5pditsl = 0.0; if (!model->BSIM4v5deltaGiven) model->BSIM4v5delta = 0.01; if (!model->BSIM4v5rdswminGiven) model->BSIM4v5rdswmin = 0.0; if (!model->BSIM4v5rdwminGiven) model->BSIM4v5rdwmin = 0.0; if (!model->BSIM4v5rswminGiven) model->BSIM4v5rswmin = 0.0; if (!model->BSIM4v5rdswGiven) model->BSIM4v5rdsw = 200.0; /* in ohm*um */ if (!model->BSIM4v5rdwGiven) model->BSIM4v5rdw = 100.0; if (!model->BSIM4v5rswGiven) model->BSIM4v5rsw = 100.0; if (!model->BSIM4v5prwgGiven) model->BSIM4v5prwg = 1.0; /* in 1/V */ if (!model->BSIM4v5prwbGiven) model->BSIM4v5prwb = 0.0; if (!model->BSIM4v5prtGiven) if (!model->BSIM4v5prtGiven) model->BSIM4v5prt = 0.0; if (!model->BSIM4v5eta0Given) model->BSIM4v5eta0 = 0.08; /* no unit */ if (!model->BSIM4v5etabGiven) model->BSIM4v5etab = -0.07; /* unit 1/V */ if (!model->BSIM4v5pclmGiven) model->BSIM4v5pclm = 1.3; /* no unit */ if (!model->BSIM4v5pdibl1Given) model->BSIM4v5pdibl1 = 0.39; /* no unit */ if (!model->BSIM4v5pdibl2Given) model->BSIM4v5pdibl2 = 0.0086; /* no unit */ if (!model->BSIM4v5pdiblbGiven) model->BSIM4v5pdiblb = 0.0; /* 1/V */ if (!model->BSIM4v5pscbe1Given) model->BSIM4v5pscbe1 = 4.24e8; if (!model->BSIM4v5pscbe2Given) model->BSIM4v5pscbe2 = 1.0e-5; if (!model->BSIM4v5pvagGiven) model->BSIM4v5pvag = 0.0; if (!model->BSIM4v5wrGiven) model->BSIM4v5wr = 1.0; if (!model->BSIM4v5dwgGiven) model->BSIM4v5dwg = 0.0; if (!model->BSIM4v5dwbGiven) model->BSIM4v5dwb = 0.0; if (!model->BSIM4v5b0Given) model->BSIM4v5b0 = 0.0; if (!model->BSIM4v5b1Given) model->BSIM4v5b1 = 0.0; if (!model->BSIM4v5alpha0Given) model->BSIM4v5alpha0 = 0.0; if (!model->BSIM4v5alpha1Given) model->BSIM4v5alpha1 = 0.0; if (!model->BSIM4v5beta0Given) model->BSIM4v5beta0 = 0.0; if (!model->BSIM4v5agidlGiven) model->BSIM4v5agidl = 0.0; if (!model->BSIM4v5bgidlGiven) model->BSIM4v5bgidl = 2.3e9; /* V/m */ if (!model->BSIM4v5cgidlGiven) model->BSIM4v5cgidl = 0.5; /* V^3 */ if (!model->BSIM4v5egidlGiven) model->BSIM4v5egidl = 0.8; /* V */ if (!model->BSIM4v5aigcGiven) model->BSIM4v5aigc = (model->BSIM4v5type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4v5bigcGiven) model->BSIM4v5bigc = (model->BSIM4v5type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4v5cigcGiven) model->BSIM4v5cigc = (model->BSIM4v5type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v5aigsdGiven) model->BSIM4v5aigsd = (model->BSIM4v5type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4v5bigsdGiven) model->BSIM4v5bigsd = (model->BSIM4v5type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4v5cigsdGiven) model->BSIM4v5cigsd = (model->BSIM4v5type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v5aigbaccGiven) model->BSIM4v5aigbacc = 1.36e-2; if (!model->BSIM4v5bigbaccGiven) model->BSIM4v5bigbacc = 1.71e-3; if (!model->BSIM4v5cigbaccGiven) model->BSIM4v5cigbacc = 0.075; if (!model->BSIM4v5aigbinvGiven) model->BSIM4v5aigbinv = 1.11e-2; if (!model->BSIM4v5bigbinvGiven) model->BSIM4v5bigbinv = 9.49e-4; if (!model->BSIM4v5cigbinvGiven) model->BSIM4v5cigbinv = 0.006; if (!model->BSIM4v5nigcGiven) model->BSIM4v5nigc = 1.0; if (!model->BSIM4v5nigbinvGiven) model->BSIM4v5nigbinv = 3.0; if (!model->BSIM4v5nigbaccGiven) model->BSIM4v5nigbacc = 1.0; if (!model->BSIM4v5ntoxGiven) model->BSIM4v5ntox = 1.0; if (!model->BSIM4v5eigbinvGiven) model->BSIM4v5eigbinv = 1.1; if (!model->BSIM4v5pigcdGiven) model->BSIM4v5pigcd = 1.0; if (!model->BSIM4v5poxedgeGiven) model->BSIM4v5poxedge = 1.0; if (!model->BSIM4v5xrcrg1Given) model->BSIM4v5xrcrg1 = 12.0; if (!model->BSIM4v5xrcrg2Given) model->BSIM4v5xrcrg2 = 1.0; if (!model->BSIM4v5ijthsfwdGiven) model->BSIM4v5ijthsfwd = 0.1; /* unit A */ if (!model->BSIM4v5ijthdfwdGiven) model->BSIM4v5ijthdfwd = model->BSIM4v5ijthsfwd; if (!model->BSIM4v5ijthsrevGiven) model->BSIM4v5ijthsrev = 0.1; /* unit A */ if (!model->BSIM4v5ijthdrevGiven) model->BSIM4v5ijthdrev = model->BSIM4v5ijthsrev; if (!model->BSIM4v5tnoiaGiven) model->BSIM4v5tnoia = 1.5; if (!model->BSIM4v5tnoibGiven) model->BSIM4v5tnoib = 3.5; if (!model->BSIM4v5rnoiaGiven) model->BSIM4v5rnoia = 0.577; if (!model->BSIM4v5rnoibGiven) model->BSIM4v5rnoib = 0.5164; if (!model->BSIM4v5ntnoiGiven) model->BSIM4v5ntnoi = 1.0; if (!model->BSIM4v5lambdaGiven) model->BSIM4v5lambda = 0.0; if (!model->BSIM4v5vtlGiven) model->BSIM4v5vtl = 2.0e5; /* unit m/s */ if (!model->BSIM4v5xnGiven) model->BSIM4v5xn = 3.0; if (!model->BSIM4v5lcGiven) model->BSIM4v5lc = 5.0e-9; if (!model->BSIM4v5vfbsdoffGiven) model->BSIM4v5vfbsdoff = 0.0; /* unit v */ if (!model->BSIM4v5tvfbsdoffGiven) model->BSIM4v5tvfbsdoff = 0.0; if (!model->BSIM4v5tvoffGiven) model->BSIM4v5tvoff = 0.0; if (!model->BSIM4v5lintnoiGiven) model->BSIM4v5lintnoi = 0.0; /* unit m */ if (!model->BSIM4v5xjbvsGiven) model->BSIM4v5xjbvs = 1.0; /* no unit */ if (!model->BSIM4v5xjbvdGiven) model->BSIM4v5xjbvd = model->BSIM4v5xjbvs; if (!model->BSIM4v5bvsGiven) model->BSIM4v5bvs = 10.0; /* V */ if (!model->BSIM4v5bvdGiven) model->BSIM4v5bvd = model->BSIM4v5bvs; if (!model->BSIM4v5gbminGiven) model->BSIM4v5gbmin = 1.0e-12; /* in mho */ if (!model->BSIM4v5rbdbGiven) model->BSIM4v5rbdb = 50.0; /* in ohm */ if (!model->BSIM4v5rbpbGiven) model->BSIM4v5rbpb = 50.0; if (!model->BSIM4v5rbsbGiven) model->BSIM4v5rbsb = 50.0; if (!model->BSIM4v5rbpsGiven) model->BSIM4v5rbps = 50.0; if (!model->BSIM4v5rbpdGiven) model->BSIM4v5rbpd = 50.0; if (!model->BSIM4v5rbps0Given) model->BSIM4v5rbps0 = 50.0; if (!model->BSIM4v5rbpslGiven) model->BSIM4v5rbpsl = 0.0; if (!model->BSIM4v5rbpswGiven) model->BSIM4v5rbpsw = 0.0; if (!model->BSIM4v5rbpsnfGiven) model->BSIM4v5rbpsnf = 0.0; if (!model->BSIM4v5rbpd0Given) model->BSIM4v5rbpd0 = 50.0; if (!model->BSIM4v5rbpdlGiven) model->BSIM4v5rbpdl = 0.0; if (!model->BSIM4v5rbpdwGiven) model->BSIM4v5rbpdw = 0.0; if (!model->BSIM4v5rbpdnfGiven) model->BSIM4v5rbpdnf = 0.0; if (!model->BSIM4v5rbpbx0Given) model->BSIM4v5rbpbx0 = 100.0; if (!model->BSIM4v5rbpbxlGiven) model->BSIM4v5rbpbxl = 0.0; if (!model->BSIM4v5rbpbxwGiven) model->BSIM4v5rbpbxw = 0.0; if (!model->BSIM4v5rbpbxnfGiven) model->BSIM4v5rbpbxnf = 0.0; if (!model->BSIM4v5rbpby0Given) model->BSIM4v5rbpby0 = 100.0; if (!model->BSIM4v5rbpbylGiven) model->BSIM4v5rbpbyl = 0.0; if (!model->BSIM4v5rbpbywGiven) model->BSIM4v5rbpbyw = 0.0; if (!model->BSIM4v5rbpbynfGiven) model->BSIM4v5rbpbynf = 0.0; if (!model->BSIM4v5rbsbx0Given) model->BSIM4v5rbsbx0 = 100.0; if (!model->BSIM4v5rbsby0Given) model->BSIM4v5rbsby0 = 100.0; if (!model->BSIM4v5rbdbx0Given) model->BSIM4v5rbdbx0 = 100.0; if (!model->BSIM4v5rbdby0Given) model->BSIM4v5rbdby0 = 100.0; if (!model->BSIM4v5rbsdbxlGiven) model->BSIM4v5rbsdbxl = 0.0; if (!model->BSIM4v5rbsdbxwGiven) model->BSIM4v5rbsdbxw = 0.0; if (!model->BSIM4v5rbsdbxnfGiven) model->BSIM4v5rbsdbxnf = 0.0; if (!model->BSIM4v5rbsdbylGiven) model->BSIM4v5rbsdbyl = 0.0; if (!model->BSIM4v5rbsdbywGiven) model->BSIM4v5rbsdbyw = 0.0; if (!model->BSIM4v5rbsdbynfGiven) model->BSIM4v5rbsdbynf = 0.0; if (!model->BSIM4v5cgslGiven) model->BSIM4v5cgsl = 0.0; if (!model->BSIM4v5cgdlGiven) model->BSIM4v5cgdl = 0.0; if (!model->BSIM4v5ckappasGiven) model->BSIM4v5ckappas = 0.6; if (!model->BSIM4v5ckappadGiven) model->BSIM4v5ckappad = model->BSIM4v5ckappas; if (!model->BSIM4v5clcGiven) model->BSIM4v5clc = 0.1e-6; if (!model->BSIM4v5cleGiven) model->BSIM4v5cle = 0.6; if (!model->BSIM4v5vfbcvGiven) model->BSIM4v5vfbcv = -1.0; if (!model->BSIM4v5acdeGiven) model->BSIM4v5acde = 1.0; if (!model->BSIM4v5moinGiven) model->BSIM4v5moin = 15.0; if (!model->BSIM4v5noffGiven) model->BSIM4v5noff = 1.0; if (!model->BSIM4v5voffcvGiven) model->BSIM4v5voffcv = 0.0; if (!model->BSIM4v5dmcgGiven) model->BSIM4v5dmcg = 0.0; if (!model->BSIM4v5dmciGiven) model->BSIM4v5dmci = model->BSIM4v5dmcg; if (!model->BSIM4v5dmdgGiven) model->BSIM4v5dmdg = 0.0; if (!model->BSIM4v5dmcgtGiven) model->BSIM4v5dmcgt = 0.0; if (!model->BSIM4v5xgwGiven) model->BSIM4v5xgw = 0.0; if (!model->BSIM4v5xglGiven) model->BSIM4v5xgl = 0.0; if (!model->BSIM4v5rshgGiven) model->BSIM4v5rshg = 0.1; if (!model->BSIM4v5ngconGiven) model->BSIM4v5ngcon = 1.0; if (!model->BSIM4v5tcjGiven) model->BSIM4v5tcj = 0.0; if (!model->BSIM4v5tpbGiven) model->BSIM4v5tpb = 0.0; if (!model->BSIM4v5tcjswGiven) model->BSIM4v5tcjsw = 0.0; if (!model->BSIM4v5tpbswGiven) model->BSIM4v5tpbsw = 0.0; if (!model->BSIM4v5tcjswgGiven) model->BSIM4v5tcjswg = 0.0; if (!model->BSIM4v5tpbswgGiven) model->BSIM4v5tpbswg = 0.0; /* Length dependence */ if (!model->BSIM4v5lcdscGiven) model->BSIM4v5lcdsc = 0.0; if (!model->BSIM4v5lcdscbGiven) model->BSIM4v5lcdscb = 0.0; if (!model->BSIM4v5lcdscdGiven) model->BSIM4v5lcdscd = 0.0; if (!model->BSIM4v5lcitGiven) model->BSIM4v5lcit = 0.0; if (!model->BSIM4v5lnfactorGiven) model->BSIM4v5lnfactor = 0.0; if (!model->BSIM4v5lxjGiven) model->BSIM4v5lxj = 0.0; if (!model->BSIM4v5lvsatGiven) model->BSIM4v5lvsat = 0.0; if (!model->BSIM4v5latGiven) model->BSIM4v5lat = 0.0; if (!model->BSIM4v5la0Given) model->BSIM4v5la0 = 0.0; if (!model->BSIM4v5lagsGiven) model->BSIM4v5lags = 0.0; if (!model->BSIM4v5la1Given) model->BSIM4v5la1 = 0.0; if (!model->BSIM4v5la2Given) model->BSIM4v5la2 = 0.0; if (!model->BSIM4v5lketaGiven) model->BSIM4v5lketa = 0.0; if (!model->BSIM4v5lnsubGiven) model->BSIM4v5lnsub = 0.0; if (!model->BSIM4v5lndepGiven) model->BSIM4v5lndep = 0.0; if (!model->BSIM4v5lnsdGiven) model->BSIM4v5lnsd = 0.0; if (!model->BSIM4v5lphinGiven) model->BSIM4v5lphin = 0.0; if (!model->BSIM4v5lngateGiven) model->BSIM4v5lngate = 0.0; if (!model->BSIM4v5lvbmGiven) model->BSIM4v5lvbm = 0.0; if (!model->BSIM4v5lxtGiven) model->BSIM4v5lxt = 0.0; if (!model->BSIM4v5lkt1Given) model->BSIM4v5lkt1 = 0.0; if (!model->BSIM4v5lkt1lGiven) model->BSIM4v5lkt1l = 0.0; if (!model->BSIM4v5lkt2Given) model->BSIM4v5lkt2 = 0.0; if (!model->BSIM4v5lk3Given) model->BSIM4v5lk3 = 0.0; if (!model->BSIM4v5lk3bGiven) model->BSIM4v5lk3b = 0.0; if (!model->BSIM4v5lw0Given) model->BSIM4v5lw0 = 0.0; if (!model->BSIM4v5llpe0Given) model->BSIM4v5llpe0 = 0.0; if (!model->BSIM4v5llpebGiven) model->BSIM4v5llpeb = 0.0; if (!model->BSIM4v5ldvtp0Given) model->BSIM4v5ldvtp0 = 0.0; if (!model->BSIM4v5ldvtp1Given) model->BSIM4v5ldvtp1 = 0.0; if (!model->BSIM4v5ldvt0Given) model->BSIM4v5ldvt0 = 0.0; if (!model->BSIM4v5ldvt1Given) model->BSIM4v5ldvt1 = 0.0; if (!model->BSIM4v5ldvt2Given) model->BSIM4v5ldvt2 = 0.0; if (!model->BSIM4v5ldvt0wGiven) model->BSIM4v5ldvt0w = 0.0; if (!model->BSIM4v5ldvt1wGiven) model->BSIM4v5ldvt1w = 0.0; if (!model->BSIM4v5ldvt2wGiven) model->BSIM4v5ldvt2w = 0.0; if (!model->BSIM4v5ldroutGiven) model->BSIM4v5ldrout = 0.0; if (!model->BSIM4v5ldsubGiven) model->BSIM4v5ldsub = 0.0; if (!model->BSIM4v5lvth0Given) model->BSIM4v5lvth0 = 0.0; if (!model->BSIM4v5luaGiven) model->BSIM4v5lua = 0.0; if (!model->BSIM4v5lua1Given) model->BSIM4v5lua1 = 0.0; if (!model->BSIM4v5lubGiven) model->BSIM4v5lub = 0.0; if (!model->BSIM4v5lub1Given) model->BSIM4v5lub1 = 0.0; if (!model->BSIM4v5lucGiven) model->BSIM4v5luc = 0.0; if (!model->BSIM4v5luc1Given) model->BSIM4v5luc1 = 0.0; if (!model->BSIM4v5ludGiven) model->BSIM4v5lud = 0.0; if (!model->BSIM4v5lud1Given) model->BSIM4v5lud1 = 0.0; if (!model->BSIM4v5lupGiven) model->BSIM4v5lup = 0.0; if (!model->BSIM4v5llpGiven) model->BSIM4v5llp = 0.0; if (!model->BSIM4v5lu0Given) model->BSIM4v5lu0 = 0.0; if (!model->BSIM4v5luteGiven) model->BSIM4v5lute = 0.0; if (!model->BSIM4v5lvoffGiven) model->BSIM4v5lvoff = 0.0; if (!model->BSIM4v5lminvGiven) model->BSIM4v5lminv = 0.0; if (!model->BSIM4v5lfproutGiven) model->BSIM4v5lfprout = 0.0; if (!model->BSIM4v5lpditsGiven) model->BSIM4v5lpdits = 0.0; if (!model->BSIM4v5lpditsdGiven) model->BSIM4v5lpditsd = 0.0; if (!model->BSIM4v5ldeltaGiven) model->BSIM4v5ldelta = 0.0; if (!model->BSIM4v5lrdswGiven) model->BSIM4v5lrdsw = 0.0; if (!model->BSIM4v5lrdwGiven) model->BSIM4v5lrdw = 0.0; if (!model->BSIM4v5lrswGiven) model->BSIM4v5lrsw = 0.0; if (!model->BSIM4v5lprwbGiven) model->BSIM4v5lprwb = 0.0; if (!model->BSIM4v5lprwgGiven) model->BSIM4v5lprwg = 0.0; if (!model->BSIM4v5lprtGiven) model->BSIM4v5lprt = 0.0; if (!model->BSIM4v5leta0Given) model->BSIM4v5leta0 = 0.0; if (!model->BSIM4v5letabGiven) model->BSIM4v5letab = -0.0; if (!model->BSIM4v5lpclmGiven) model->BSIM4v5lpclm = 0.0; if (!model->BSIM4v5lpdibl1Given) model->BSIM4v5lpdibl1 = 0.0; if (!model->BSIM4v5lpdibl2Given) model->BSIM4v5lpdibl2 = 0.0; if (!model->BSIM4v5lpdiblbGiven) model->BSIM4v5lpdiblb = 0.0; if (!model->BSIM4v5lpscbe1Given) model->BSIM4v5lpscbe1 = 0.0; if (!model->BSIM4v5lpscbe2Given) model->BSIM4v5lpscbe2 = 0.0; if (!model->BSIM4v5lpvagGiven) model->BSIM4v5lpvag = 0.0; if (!model->BSIM4v5lwrGiven) model->BSIM4v5lwr = 0.0; if (!model->BSIM4v5ldwgGiven) model->BSIM4v5ldwg = 0.0; if (!model->BSIM4v5ldwbGiven) model->BSIM4v5ldwb = 0.0; if (!model->BSIM4v5lb0Given) model->BSIM4v5lb0 = 0.0; if (!model->BSIM4v5lb1Given) model->BSIM4v5lb1 = 0.0; if (!model->BSIM4v5lalpha0Given) model->BSIM4v5lalpha0 = 0.0; if (!model->BSIM4v5lalpha1Given) model->BSIM4v5lalpha1 = 0.0; if (!model->BSIM4v5lbeta0Given) model->BSIM4v5lbeta0 = 0.0; if (!model->BSIM4v5lagidlGiven) model->BSIM4v5lagidl = 0.0; if (!model->BSIM4v5lbgidlGiven) model->BSIM4v5lbgidl = 0.0; if (!model->BSIM4v5lcgidlGiven) model->BSIM4v5lcgidl = 0.0; if (!model->BSIM4v5legidlGiven) model->BSIM4v5legidl = 0.0; if (!model->BSIM4v5laigcGiven) model->BSIM4v5laigc = 0.0; if (!model->BSIM4v5lbigcGiven) model->BSIM4v5lbigc = 0.0; if (!model->BSIM4v5lcigcGiven) model->BSIM4v5lcigc = 0.0; if (!model->BSIM4v5laigsdGiven) model->BSIM4v5laigsd = 0.0; if (!model->BSIM4v5lbigsdGiven) model->BSIM4v5lbigsd = 0.0; if (!model->BSIM4v5lcigsdGiven) model->BSIM4v5lcigsd = 0.0; if (!model->BSIM4v5laigbaccGiven) model->BSIM4v5laigbacc = 0.0; if (!model->BSIM4v5lbigbaccGiven) model->BSIM4v5lbigbacc = 0.0; if (!model->BSIM4v5lcigbaccGiven) model->BSIM4v5lcigbacc = 0.0; if (!model->BSIM4v5laigbinvGiven) model->BSIM4v5laigbinv = 0.0; if (!model->BSIM4v5lbigbinvGiven) model->BSIM4v5lbigbinv = 0.0; if (!model->BSIM4v5lcigbinvGiven) model->BSIM4v5lcigbinv = 0.0; if (!model->BSIM4v5lnigcGiven) model->BSIM4v5lnigc = 0.0; if (!model->BSIM4v5lnigbinvGiven) model->BSIM4v5lnigbinv = 0.0; if (!model->BSIM4v5lnigbaccGiven) model->BSIM4v5lnigbacc = 0.0; if (!model->BSIM4v5lntoxGiven) model->BSIM4v5lntox = 0.0; if (!model->BSIM4v5leigbinvGiven) model->BSIM4v5leigbinv = 0.0; if (!model->BSIM4v5lpigcdGiven) model->BSIM4v5lpigcd = 0.0; if (!model->BSIM4v5lpoxedgeGiven) model->BSIM4v5lpoxedge = 0.0; if (!model->BSIM4v5lxrcrg1Given) model->BSIM4v5lxrcrg1 = 0.0; if (!model->BSIM4v5lxrcrg2Given) model->BSIM4v5lxrcrg2 = 0.0; if (!model->BSIM4v5leuGiven) model->BSIM4v5leu = 0.0; if (!model->BSIM4v5lvfbGiven) model->BSIM4v5lvfb = 0.0; if (!model->BSIM4v5llambdaGiven) model->BSIM4v5llambda = 0.0; if (!model->BSIM4v5lvtlGiven) model->BSIM4v5lvtl = 0.0; if (!model->BSIM4v5lxnGiven) model->BSIM4v5lxn = 0.0; if (!model->BSIM4v5lvfbsdoffGiven) model->BSIM4v5lvfbsdoff = 0.0; if (!model->BSIM4v5ltvfbsdoffGiven) model->BSIM4v5ltvfbsdoff = 0.0; if (!model->BSIM4v5ltvoffGiven) model->BSIM4v5ltvoff = 0.0; if (!model->BSIM4v5lcgslGiven) model->BSIM4v5lcgsl = 0.0; if (!model->BSIM4v5lcgdlGiven) model->BSIM4v5lcgdl = 0.0; if (!model->BSIM4v5lckappasGiven) model->BSIM4v5lckappas = 0.0; if (!model->BSIM4v5lckappadGiven) model->BSIM4v5lckappad = 0.0; if (!model->BSIM4v5lclcGiven) model->BSIM4v5lclc = 0.0; if (!model->BSIM4v5lcleGiven) model->BSIM4v5lcle = 0.0; if (!model->BSIM4v5lcfGiven) model->BSIM4v5lcf = 0.0; if (!model->BSIM4v5lvfbcvGiven) model->BSIM4v5lvfbcv = 0.0; if (!model->BSIM4v5lacdeGiven) model->BSIM4v5lacde = 0.0; if (!model->BSIM4v5lmoinGiven) model->BSIM4v5lmoin = 0.0; if (!model->BSIM4v5lnoffGiven) model->BSIM4v5lnoff = 0.0; if (!model->BSIM4v5lvoffcvGiven) model->BSIM4v5lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM4v5wcdscGiven) model->BSIM4v5wcdsc = 0.0; if (!model->BSIM4v5wcdscbGiven) model->BSIM4v5wcdscb = 0.0; if (!model->BSIM4v5wcdscdGiven) model->BSIM4v5wcdscd = 0.0; if (!model->BSIM4v5wcitGiven) model->BSIM4v5wcit = 0.0; if (!model->BSIM4v5wnfactorGiven) model->BSIM4v5wnfactor = 0.0; if (!model->BSIM4v5wxjGiven) model->BSIM4v5wxj = 0.0; if (!model->BSIM4v5wvsatGiven) model->BSIM4v5wvsat = 0.0; if (!model->BSIM4v5watGiven) model->BSIM4v5wat = 0.0; if (!model->BSIM4v5wa0Given) model->BSIM4v5wa0 = 0.0; if (!model->BSIM4v5wagsGiven) model->BSIM4v5wags = 0.0; if (!model->BSIM4v5wa1Given) model->BSIM4v5wa1 = 0.0; if (!model->BSIM4v5wa2Given) model->BSIM4v5wa2 = 0.0; if (!model->BSIM4v5wketaGiven) model->BSIM4v5wketa = 0.0; if (!model->BSIM4v5wnsubGiven) model->BSIM4v5wnsub = 0.0; if (!model->BSIM4v5wndepGiven) model->BSIM4v5wndep = 0.0; if (!model->BSIM4v5wnsdGiven) model->BSIM4v5wnsd = 0.0; if (!model->BSIM4v5wphinGiven) model->BSIM4v5wphin = 0.0; if (!model->BSIM4v5wngateGiven) model->BSIM4v5wngate = 0.0; if (!model->BSIM4v5wvbmGiven) model->BSIM4v5wvbm = 0.0; if (!model->BSIM4v5wxtGiven) model->BSIM4v5wxt = 0.0; if (!model->BSIM4v5wkt1Given) model->BSIM4v5wkt1 = 0.0; if (!model->BSIM4v5wkt1lGiven) model->BSIM4v5wkt1l = 0.0; if (!model->BSIM4v5wkt2Given) model->BSIM4v5wkt2 = 0.0; if (!model->BSIM4v5wk3Given) model->BSIM4v5wk3 = 0.0; if (!model->BSIM4v5wk3bGiven) model->BSIM4v5wk3b = 0.0; if (!model->BSIM4v5ww0Given) model->BSIM4v5ww0 = 0.0; if (!model->BSIM4v5wlpe0Given) model->BSIM4v5wlpe0 = 0.0; if (!model->BSIM4v5wlpebGiven) model->BSIM4v5wlpeb = 0.0; if (!model->BSIM4v5wdvtp0Given) model->BSIM4v5wdvtp0 = 0.0; if (!model->BSIM4v5wdvtp1Given) model->BSIM4v5wdvtp1 = 0.0; if (!model->BSIM4v5wdvt0Given) model->BSIM4v5wdvt0 = 0.0; if (!model->BSIM4v5wdvt1Given) model->BSIM4v5wdvt1 = 0.0; if (!model->BSIM4v5wdvt2Given) model->BSIM4v5wdvt2 = 0.0; if (!model->BSIM4v5wdvt0wGiven) model->BSIM4v5wdvt0w = 0.0; if (!model->BSIM4v5wdvt1wGiven) model->BSIM4v5wdvt1w = 0.0; if (!model->BSIM4v5wdvt2wGiven) model->BSIM4v5wdvt2w = 0.0; if (!model->BSIM4v5wdroutGiven) model->BSIM4v5wdrout = 0.0; if (!model->BSIM4v5wdsubGiven) model->BSIM4v5wdsub = 0.0; if (!model->BSIM4v5wvth0Given) model->BSIM4v5wvth0 = 0.0; if (!model->BSIM4v5wuaGiven) model->BSIM4v5wua = 0.0; if (!model->BSIM4v5wua1Given) model->BSIM4v5wua1 = 0.0; if (!model->BSIM4v5wubGiven) model->BSIM4v5wub = 0.0; if (!model->BSIM4v5wub1Given) model->BSIM4v5wub1 = 0.0; if (!model->BSIM4v5wucGiven) model->BSIM4v5wuc = 0.0; if (!model->BSIM4v5wuc1Given) model->BSIM4v5wuc1 = 0.0; if (!model->BSIM4v5wudGiven) model->BSIM4v5wud = 0.0; if (!model->BSIM4v5wud1Given) model->BSIM4v5wud1 = 0.0; if (!model->BSIM4v5wupGiven) model->BSIM4v5wup = 0.0; if (!model->BSIM4v5wlpGiven) model->BSIM4v5wlp = 0.0; if (!model->BSIM4v5wu0Given) model->BSIM4v5wu0 = 0.0; if (!model->BSIM4v5wuteGiven) model->BSIM4v5wute = 0.0; if (!model->BSIM4v5wvoffGiven) model->BSIM4v5wvoff = 0.0; if (!model->BSIM4v5wminvGiven) model->BSIM4v5wminv = 0.0; if (!model->BSIM4v5wfproutGiven) model->BSIM4v5wfprout = 0.0; if (!model->BSIM4v5wpditsGiven) model->BSIM4v5wpdits = 0.0; if (!model->BSIM4v5wpditsdGiven) model->BSIM4v5wpditsd = 0.0; if (!model->BSIM4v5wdeltaGiven) model->BSIM4v5wdelta = 0.0; if (!model->BSIM4v5wrdswGiven) model->BSIM4v5wrdsw = 0.0; if (!model->BSIM4v5wrdwGiven) model->BSIM4v5wrdw = 0.0; if (!model->BSIM4v5wrswGiven) model->BSIM4v5wrsw = 0.0; if (!model->BSIM4v5wprwbGiven) model->BSIM4v5wprwb = 0.0; if (!model->BSIM4v5wprwgGiven) model->BSIM4v5wprwg = 0.0; if (!model->BSIM4v5wprtGiven) model->BSIM4v5wprt = 0.0; if (!model->BSIM4v5weta0Given) model->BSIM4v5weta0 = 0.0; if (!model->BSIM4v5wetabGiven) model->BSIM4v5wetab = 0.0; if (!model->BSIM4v5wpclmGiven) model->BSIM4v5wpclm = 0.0; if (!model->BSIM4v5wpdibl1Given) model->BSIM4v5wpdibl1 = 0.0; if (!model->BSIM4v5wpdibl2Given) model->BSIM4v5wpdibl2 = 0.0; if (!model->BSIM4v5wpdiblbGiven) model->BSIM4v5wpdiblb = 0.0; if (!model->BSIM4v5wpscbe1Given) model->BSIM4v5wpscbe1 = 0.0; if (!model->BSIM4v5wpscbe2Given) model->BSIM4v5wpscbe2 = 0.0; if (!model->BSIM4v5wpvagGiven) model->BSIM4v5wpvag = 0.0; if (!model->BSIM4v5wwrGiven) model->BSIM4v5wwr = 0.0; if (!model->BSIM4v5wdwgGiven) model->BSIM4v5wdwg = 0.0; if (!model->BSIM4v5wdwbGiven) model->BSIM4v5wdwb = 0.0; if (!model->BSIM4v5wb0Given) model->BSIM4v5wb0 = 0.0; if (!model->BSIM4v5wb1Given) model->BSIM4v5wb1 = 0.0; if (!model->BSIM4v5walpha0Given) model->BSIM4v5walpha0 = 0.0; if (!model->BSIM4v5walpha1Given) model->BSIM4v5walpha1 = 0.0; if (!model->BSIM4v5wbeta0Given) model->BSIM4v5wbeta0 = 0.0; if (!model->BSIM4v5wagidlGiven) model->BSIM4v5wagidl = 0.0; if (!model->BSIM4v5wbgidlGiven) model->BSIM4v5wbgidl = 0.0; if (!model->BSIM4v5wcgidlGiven) model->BSIM4v5wcgidl = 0.0; if (!model->BSIM4v5wegidlGiven) model->BSIM4v5wegidl = 0.0; if (!model->BSIM4v5waigcGiven) model->BSIM4v5waigc = 0.0; if (!model->BSIM4v5wbigcGiven) model->BSIM4v5wbigc = 0.0; if (!model->BSIM4v5wcigcGiven) model->BSIM4v5wcigc = 0.0; if (!model->BSIM4v5waigsdGiven) model->BSIM4v5waigsd = 0.0; if (!model->BSIM4v5wbigsdGiven) model->BSIM4v5wbigsd = 0.0; if (!model->BSIM4v5wcigsdGiven) model->BSIM4v5wcigsd = 0.0; if (!model->BSIM4v5waigbaccGiven) model->BSIM4v5waigbacc = 0.0; if (!model->BSIM4v5wbigbaccGiven) model->BSIM4v5wbigbacc = 0.0; if (!model->BSIM4v5wcigbaccGiven) model->BSIM4v5wcigbacc = 0.0; if (!model->BSIM4v5waigbinvGiven) model->BSIM4v5waigbinv = 0.0; if (!model->BSIM4v5wbigbinvGiven) model->BSIM4v5wbigbinv = 0.0; if (!model->BSIM4v5wcigbinvGiven) model->BSIM4v5wcigbinv = 0.0; if (!model->BSIM4v5wnigcGiven) model->BSIM4v5wnigc = 0.0; if (!model->BSIM4v5wnigbinvGiven) model->BSIM4v5wnigbinv = 0.0; if (!model->BSIM4v5wnigbaccGiven) model->BSIM4v5wnigbacc = 0.0; if (!model->BSIM4v5wntoxGiven) model->BSIM4v5wntox = 0.0; if (!model->BSIM4v5weigbinvGiven) model->BSIM4v5weigbinv = 0.0; if (!model->BSIM4v5wpigcdGiven) model->BSIM4v5wpigcd = 0.0; if (!model->BSIM4v5wpoxedgeGiven) model->BSIM4v5wpoxedge = 0.0; if (!model->BSIM4v5wxrcrg1Given) model->BSIM4v5wxrcrg1 = 0.0; if (!model->BSIM4v5wxrcrg2Given) model->BSIM4v5wxrcrg2 = 0.0; if (!model->BSIM4v5weuGiven) model->BSIM4v5weu = 0.0; if (!model->BSIM4v5wvfbGiven) model->BSIM4v5wvfb = 0.0; if (!model->BSIM4v5wlambdaGiven) model->BSIM4v5wlambda = 0.0; if (!model->BSIM4v5wvtlGiven) model->BSIM4v5wvtl = 0.0; if (!model->BSIM4v5wxnGiven) model->BSIM4v5wxn = 0.0; if (!model->BSIM4v5wvfbsdoffGiven) model->BSIM4v5wvfbsdoff = 0.0; if (!model->BSIM4v5wtvfbsdoffGiven) model->BSIM4v5wtvfbsdoff = 0.0; if (!model->BSIM4v5wtvoffGiven) model->BSIM4v5wtvoff = 0.0; if (!model->BSIM4v5wcgslGiven) model->BSIM4v5wcgsl = 0.0; if (!model->BSIM4v5wcgdlGiven) model->BSIM4v5wcgdl = 0.0; if (!model->BSIM4v5wckappasGiven) model->BSIM4v5wckappas = 0.0; if (!model->BSIM4v5wckappadGiven) model->BSIM4v5wckappad = 0.0; if (!model->BSIM4v5wcfGiven) model->BSIM4v5wcf = 0.0; if (!model->BSIM4v5wclcGiven) model->BSIM4v5wclc = 0.0; if (!model->BSIM4v5wcleGiven) model->BSIM4v5wcle = 0.0; if (!model->BSIM4v5wvfbcvGiven) model->BSIM4v5wvfbcv = 0.0; if (!model->BSIM4v5wacdeGiven) model->BSIM4v5wacde = 0.0; if (!model->BSIM4v5wmoinGiven) model->BSIM4v5wmoin = 0.0; if (!model->BSIM4v5wnoffGiven) model->BSIM4v5wnoff = 0.0; if (!model->BSIM4v5wvoffcvGiven) model->BSIM4v5wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM4v5pcdscGiven) model->BSIM4v5pcdsc = 0.0; if (!model->BSIM4v5pcdscbGiven) model->BSIM4v5pcdscb = 0.0; if (!model->BSIM4v5pcdscdGiven) model->BSIM4v5pcdscd = 0.0; if (!model->BSIM4v5pcitGiven) model->BSIM4v5pcit = 0.0; if (!model->BSIM4v5pnfactorGiven) model->BSIM4v5pnfactor = 0.0; if (!model->BSIM4v5pxjGiven) model->BSIM4v5pxj = 0.0; if (!model->BSIM4v5pvsatGiven) model->BSIM4v5pvsat = 0.0; if (!model->BSIM4v5patGiven) model->BSIM4v5pat = 0.0; if (!model->BSIM4v5pa0Given) model->BSIM4v5pa0 = 0.0; if (!model->BSIM4v5pagsGiven) model->BSIM4v5pags = 0.0; if (!model->BSIM4v5pa1Given) model->BSIM4v5pa1 = 0.0; if (!model->BSIM4v5pa2Given) model->BSIM4v5pa2 = 0.0; if (!model->BSIM4v5pketaGiven) model->BSIM4v5pketa = 0.0; if (!model->BSIM4v5pnsubGiven) model->BSIM4v5pnsub = 0.0; if (!model->BSIM4v5pndepGiven) model->BSIM4v5pndep = 0.0; if (!model->BSIM4v5pnsdGiven) model->BSIM4v5pnsd = 0.0; if (!model->BSIM4v5pphinGiven) model->BSIM4v5pphin = 0.0; if (!model->BSIM4v5pngateGiven) model->BSIM4v5pngate = 0.0; if (!model->BSIM4v5pvbmGiven) model->BSIM4v5pvbm = 0.0; if (!model->BSIM4v5pxtGiven) model->BSIM4v5pxt = 0.0; if (!model->BSIM4v5pkt1Given) model->BSIM4v5pkt1 = 0.0; if (!model->BSIM4v5pkt1lGiven) model->BSIM4v5pkt1l = 0.0; if (!model->BSIM4v5pkt2Given) model->BSIM4v5pkt2 = 0.0; if (!model->BSIM4v5pk3Given) model->BSIM4v5pk3 = 0.0; if (!model->BSIM4v5pk3bGiven) model->BSIM4v5pk3b = 0.0; if (!model->BSIM4v5pw0Given) model->BSIM4v5pw0 = 0.0; if (!model->BSIM4v5plpe0Given) model->BSIM4v5plpe0 = 0.0; if (!model->BSIM4v5plpebGiven) model->BSIM4v5plpeb = 0.0; if (!model->BSIM4v5pdvtp0Given) model->BSIM4v5pdvtp0 = 0.0; if (!model->BSIM4v5pdvtp1Given) model->BSIM4v5pdvtp1 = 0.0; if (!model->BSIM4v5pdvt0Given) model->BSIM4v5pdvt0 = 0.0; if (!model->BSIM4v5pdvt1Given) model->BSIM4v5pdvt1 = 0.0; if (!model->BSIM4v5pdvt2Given) model->BSIM4v5pdvt2 = 0.0; if (!model->BSIM4v5pdvt0wGiven) model->BSIM4v5pdvt0w = 0.0; if (!model->BSIM4v5pdvt1wGiven) model->BSIM4v5pdvt1w = 0.0; if (!model->BSIM4v5pdvt2wGiven) model->BSIM4v5pdvt2w = 0.0; if (!model->BSIM4v5pdroutGiven) model->BSIM4v5pdrout = 0.0; if (!model->BSIM4v5pdsubGiven) model->BSIM4v5pdsub = 0.0; if (!model->BSIM4v5pvth0Given) model->BSIM4v5pvth0 = 0.0; if (!model->BSIM4v5puaGiven) model->BSIM4v5pua = 0.0; if (!model->BSIM4v5pua1Given) model->BSIM4v5pua1 = 0.0; if (!model->BSIM4v5pubGiven) model->BSIM4v5pub = 0.0; if (!model->BSIM4v5pub1Given) model->BSIM4v5pub1 = 0.0; if (!model->BSIM4v5pucGiven) model->BSIM4v5puc = 0.0; if (!model->BSIM4v5puc1Given) model->BSIM4v5puc1 = 0.0; if (!model->BSIM4v5pudGiven) model->BSIM4v5pud = 0.0; if (!model->BSIM4v5pud1Given) model->BSIM4v5pud1 = 0.0; if (!model->BSIM4v5pupGiven) model->BSIM4v5pup = 0.0; if (!model->BSIM4v5plpGiven) model->BSIM4v5plp = 0.0; if (!model->BSIM4v5pu0Given) model->BSIM4v5pu0 = 0.0; if (!model->BSIM4v5puteGiven) model->BSIM4v5pute = 0.0; if (!model->BSIM4v5pvoffGiven) model->BSIM4v5pvoff = 0.0; if (!model->BSIM4v5pminvGiven) model->BSIM4v5pminv = 0.0; if (!model->BSIM4v5pfproutGiven) model->BSIM4v5pfprout = 0.0; if (!model->BSIM4v5ppditsGiven) model->BSIM4v5ppdits = 0.0; if (!model->BSIM4v5ppditsdGiven) model->BSIM4v5ppditsd = 0.0; if (!model->BSIM4v5pdeltaGiven) model->BSIM4v5pdelta = 0.0; if (!model->BSIM4v5prdswGiven) model->BSIM4v5prdsw = 0.0; if (!model->BSIM4v5prdwGiven) model->BSIM4v5prdw = 0.0; if (!model->BSIM4v5prswGiven) model->BSIM4v5prsw = 0.0; if (!model->BSIM4v5pprwbGiven) model->BSIM4v5pprwb = 0.0; if (!model->BSIM4v5pprwgGiven) model->BSIM4v5pprwg = 0.0; if (!model->BSIM4v5pprtGiven) model->BSIM4v5pprt = 0.0; if (!model->BSIM4v5peta0Given) model->BSIM4v5peta0 = 0.0; if (!model->BSIM4v5petabGiven) model->BSIM4v5petab = 0.0; if (!model->BSIM4v5ppclmGiven) model->BSIM4v5ppclm = 0.0; if (!model->BSIM4v5ppdibl1Given) model->BSIM4v5ppdibl1 = 0.0; if (!model->BSIM4v5ppdibl2Given) model->BSIM4v5ppdibl2 = 0.0; if (!model->BSIM4v5ppdiblbGiven) model->BSIM4v5ppdiblb = 0.0; if (!model->BSIM4v5ppscbe1Given) model->BSIM4v5ppscbe1 = 0.0; if (!model->BSIM4v5ppscbe2Given) model->BSIM4v5ppscbe2 = 0.0; if (!model->BSIM4v5ppvagGiven) model->BSIM4v5ppvag = 0.0; if (!model->BSIM4v5pwrGiven) model->BSIM4v5pwr = 0.0; if (!model->BSIM4v5pdwgGiven) model->BSIM4v5pdwg = 0.0; if (!model->BSIM4v5pdwbGiven) model->BSIM4v5pdwb = 0.0; if (!model->BSIM4v5pb0Given) model->BSIM4v5pb0 = 0.0; if (!model->BSIM4v5pb1Given) model->BSIM4v5pb1 = 0.0; if (!model->BSIM4v5palpha0Given) model->BSIM4v5palpha0 = 0.0; if (!model->BSIM4v5palpha1Given) model->BSIM4v5palpha1 = 0.0; if (!model->BSIM4v5pbeta0Given) model->BSIM4v5pbeta0 = 0.0; if (!model->BSIM4v5pagidlGiven) model->BSIM4v5pagidl = 0.0; if (!model->BSIM4v5pbgidlGiven) model->BSIM4v5pbgidl = 0.0; if (!model->BSIM4v5pcgidlGiven) model->BSIM4v5pcgidl = 0.0; if (!model->BSIM4v5pegidlGiven) model->BSIM4v5pegidl = 0.0; if (!model->BSIM4v5paigcGiven) model->BSIM4v5paigc = 0.0; if (!model->BSIM4v5pbigcGiven) model->BSIM4v5pbigc = 0.0; if (!model->BSIM4v5pcigcGiven) model->BSIM4v5pcigc = 0.0; if (!model->BSIM4v5paigsdGiven) model->BSIM4v5paigsd = 0.0; if (!model->BSIM4v5pbigsdGiven) model->BSIM4v5pbigsd = 0.0; if (!model->BSIM4v5pcigsdGiven) model->BSIM4v5pcigsd = 0.0; if (!model->BSIM4v5paigbaccGiven) model->BSIM4v5paigbacc = 0.0; if (!model->BSIM4v5pbigbaccGiven) model->BSIM4v5pbigbacc = 0.0; if (!model->BSIM4v5pcigbaccGiven) model->BSIM4v5pcigbacc = 0.0; if (!model->BSIM4v5paigbinvGiven) model->BSIM4v5paigbinv = 0.0; if (!model->BSIM4v5pbigbinvGiven) model->BSIM4v5pbigbinv = 0.0; if (!model->BSIM4v5pcigbinvGiven) model->BSIM4v5pcigbinv = 0.0; if (!model->BSIM4v5pnigcGiven) model->BSIM4v5pnigc = 0.0; if (!model->BSIM4v5pnigbinvGiven) model->BSIM4v5pnigbinv = 0.0; if (!model->BSIM4v5pnigbaccGiven) model->BSIM4v5pnigbacc = 0.0; if (!model->BSIM4v5pntoxGiven) model->BSIM4v5pntox = 0.0; if (!model->BSIM4v5peigbinvGiven) model->BSIM4v5peigbinv = 0.0; if (!model->BSIM4v5ppigcdGiven) model->BSIM4v5ppigcd = 0.0; if (!model->BSIM4v5ppoxedgeGiven) model->BSIM4v5ppoxedge = 0.0; if (!model->BSIM4v5pxrcrg1Given) model->BSIM4v5pxrcrg1 = 0.0; if (!model->BSIM4v5pxrcrg2Given) model->BSIM4v5pxrcrg2 = 0.0; if (!model->BSIM4v5peuGiven) model->BSIM4v5peu = 0.0; if (!model->BSIM4v5pvfbGiven) model->BSIM4v5pvfb = 0.0; if (!model->BSIM4v5plambdaGiven) model->BSIM4v5plambda = 0.0; if (!model->BSIM4v5pvtlGiven) model->BSIM4v5pvtl = 0.0; if (!model->BSIM4v5pxnGiven) model->BSIM4v5pxn = 0.0; if (!model->BSIM4v5pvfbsdoffGiven) model->BSIM4v5pvfbsdoff = 0.0; if (!model->BSIM4v5ptvfbsdoffGiven) model->BSIM4v5ptvfbsdoff = 0.0; if (!model->BSIM4v5ptvoffGiven) model->BSIM4v5ptvoff = 0.0; if (!model->BSIM4v5pcgslGiven) model->BSIM4v5pcgsl = 0.0; if (!model->BSIM4v5pcgdlGiven) model->BSIM4v5pcgdl = 0.0; if (!model->BSIM4v5pckappasGiven) model->BSIM4v5pckappas = 0.0; if (!model->BSIM4v5pckappadGiven) model->BSIM4v5pckappad = 0.0; if (!model->BSIM4v5pcfGiven) model->BSIM4v5pcf = 0.0; if (!model->BSIM4v5pclcGiven) model->BSIM4v5pclc = 0.0; if (!model->BSIM4v5pcleGiven) model->BSIM4v5pcle = 0.0; if (!model->BSIM4v5pvfbcvGiven) model->BSIM4v5pvfbcv = 0.0; if (!model->BSIM4v5pacdeGiven) model->BSIM4v5pacde = 0.0; if (!model->BSIM4v5pmoinGiven) model->BSIM4v5pmoin = 0.0; if (!model->BSIM4v5pnoffGiven) model->BSIM4v5pnoff = 0.0; if (!model->BSIM4v5pvoffcvGiven) model->BSIM4v5pvoffcv = 0.0; if (!model->BSIM4v5gamma1Given) model->BSIM4v5gamma1 = 0.0; if (!model->BSIM4v5lgamma1Given) model->BSIM4v5lgamma1 = 0.0; if (!model->BSIM4v5wgamma1Given) model->BSIM4v5wgamma1 = 0.0; if (!model->BSIM4v5pgamma1Given) model->BSIM4v5pgamma1 = 0.0; if (!model->BSIM4v5gamma2Given) model->BSIM4v5gamma2 = 0.0; if (!model->BSIM4v5lgamma2Given) model->BSIM4v5lgamma2 = 0.0; if (!model->BSIM4v5wgamma2Given) model->BSIM4v5wgamma2 = 0.0; if (!model->BSIM4v5pgamma2Given) model->BSIM4v5pgamma2 = 0.0; if (!model->BSIM4v5vbxGiven) model->BSIM4v5vbx = 0.0; if (!model->BSIM4v5lvbxGiven) model->BSIM4v5lvbx = 0.0; if (!model->BSIM4v5wvbxGiven) model->BSIM4v5wvbx = 0.0; if (!model->BSIM4v5pvbxGiven) model->BSIM4v5pvbx = 0.0; /* unit degree celcius */ if (!model->BSIM4v5tnomGiven) model->BSIM4v5tnom = ckt->CKTnomTemp; if (!model->BSIM4v5LintGiven) model->BSIM4v5Lint = 0.0; if (!model->BSIM4v5LlGiven) model->BSIM4v5Ll = 0.0; if (!model->BSIM4v5LlcGiven) model->BSIM4v5Llc = model->BSIM4v5Ll; if (!model->BSIM4v5LlnGiven) model->BSIM4v5Lln = 1.0; if (!model->BSIM4v5LwGiven) model->BSIM4v5Lw = 0.0; if (!model->BSIM4v5LwcGiven) model->BSIM4v5Lwc = model->BSIM4v5Lw; if (!model->BSIM4v5LwnGiven) model->BSIM4v5Lwn = 1.0; if (!model->BSIM4v5LwlGiven) model->BSIM4v5Lwl = 0.0; if (!model->BSIM4v5LwlcGiven) model->BSIM4v5Lwlc = model->BSIM4v5Lwl; if (!model->BSIM4v5LminGiven) model->BSIM4v5Lmin = 0.0; if (!model->BSIM4v5LmaxGiven) model->BSIM4v5Lmax = 1.0; if (!model->BSIM4v5WintGiven) model->BSIM4v5Wint = 0.0; if (!model->BSIM4v5WlGiven) model->BSIM4v5Wl = 0.0; if (!model->BSIM4v5WlcGiven) model->BSIM4v5Wlc = model->BSIM4v5Wl; if (!model->BSIM4v5WlnGiven) model->BSIM4v5Wln = 1.0; if (!model->BSIM4v5WwGiven) model->BSIM4v5Ww = 0.0; if (!model->BSIM4v5WwcGiven) model->BSIM4v5Wwc = model->BSIM4v5Ww; if (!model->BSIM4v5WwnGiven) model->BSIM4v5Wwn = 1.0; if (!model->BSIM4v5WwlGiven) model->BSIM4v5Wwl = 0.0; if (!model->BSIM4v5WwlcGiven) model->BSIM4v5Wwlc = model->BSIM4v5Wwl; if (!model->BSIM4v5WminGiven) model->BSIM4v5Wmin = 0.0; if (!model->BSIM4v5WmaxGiven) model->BSIM4v5Wmax = 1.0; if (!model->BSIM4v5dwcGiven) model->BSIM4v5dwc = model->BSIM4v5Wint; if (!model->BSIM4v5dlcGiven) model->BSIM4v5dlc = model->BSIM4v5Lint; if (!model->BSIM4v5xlGiven) model->BSIM4v5xl = 0.0; if (!model->BSIM4v5xwGiven) model->BSIM4v5xw = 0.0; if (!model->BSIM4v5dlcigGiven) model->BSIM4v5dlcig = model->BSIM4v5Lint; if (!model->BSIM4v5dwjGiven) model->BSIM4v5dwj = model->BSIM4v5dwc; if (!model->BSIM4v5cfGiven) model->BSIM4v5cf = 2.0 * model->BSIM4v5epsrox * EPS0 / PI * log(1.0 + 0.4e-6 / model->BSIM4v5toxe); if (!model->BSIM4v5xpartGiven) model->BSIM4v5xpart = 0.0; if (!model->BSIM4v5sheetResistanceGiven) model->BSIM4v5sheetResistance = 0.0; if (!model->BSIM4v5SunitAreaJctCapGiven) model->BSIM4v5SunitAreaJctCap = 5.0E-4; if (!model->BSIM4v5DunitAreaJctCapGiven) model->BSIM4v5DunitAreaJctCap = model->BSIM4v5SunitAreaJctCap; if (!model->BSIM4v5SunitLengthSidewallJctCapGiven) model->BSIM4v5SunitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM4v5DunitLengthSidewallJctCapGiven) model->BSIM4v5DunitLengthSidewallJctCap = model->BSIM4v5SunitLengthSidewallJctCap; if (!model->BSIM4v5SunitLengthGateSidewallJctCapGiven) model->BSIM4v5SunitLengthGateSidewallJctCap = model->BSIM4v5SunitLengthSidewallJctCap ; if (!model->BSIM4v5DunitLengthGateSidewallJctCapGiven) model->BSIM4v5DunitLengthGateSidewallJctCap = model->BSIM4v5SunitLengthGateSidewallJctCap; if (!model->BSIM4v5SjctSatCurDensityGiven) model->BSIM4v5SjctSatCurDensity = 1.0E-4; if (!model->BSIM4v5DjctSatCurDensityGiven) model->BSIM4v5DjctSatCurDensity = model->BSIM4v5SjctSatCurDensity; if (!model->BSIM4v5SjctSidewallSatCurDensityGiven) model->BSIM4v5SjctSidewallSatCurDensity = 0.0; if (!model->BSIM4v5DjctSidewallSatCurDensityGiven) model->BSIM4v5DjctSidewallSatCurDensity = model->BSIM4v5SjctSidewallSatCurDensity; if (!model->BSIM4v5SjctGateSidewallSatCurDensityGiven) model->BSIM4v5SjctGateSidewallSatCurDensity = 0.0; if (!model->BSIM4v5DjctGateSidewallSatCurDensityGiven) model->BSIM4v5DjctGateSidewallSatCurDensity = model->BSIM4v5SjctGateSidewallSatCurDensity; if (!model->BSIM4v5SbulkJctPotentialGiven) model->BSIM4v5SbulkJctPotential = 1.0; if (!model->BSIM4v5DbulkJctPotentialGiven) model->BSIM4v5DbulkJctPotential = model->BSIM4v5SbulkJctPotential; if (!model->BSIM4v5SsidewallJctPotentialGiven) model->BSIM4v5SsidewallJctPotential = 1.0; if (!model->BSIM4v5DsidewallJctPotentialGiven) model->BSIM4v5DsidewallJctPotential = model->BSIM4v5SsidewallJctPotential; if (!model->BSIM4v5SGatesidewallJctPotentialGiven) model->BSIM4v5SGatesidewallJctPotential = model->BSIM4v5SsidewallJctPotential; if (!model->BSIM4v5DGatesidewallJctPotentialGiven) model->BSIM4v5DGatesidewallJctPotential = model->BSIM4v5SGatesidewallJctPotential; if (!model->BSIM4v5SbulkJctBotGradingCoeffGiven) model->BSIM4v5SbulkJctBotGradingCoeff = 0.5; if (!model->BSIM4v5DbulkJctBotGradingCoeffGiven) model->BSIM4v5DbulkJctBotGradingCoeff = model->BSIM4v5SbulkJctBotGradingCoeff; if (!model->BSIM4v5SbulkJctSideGradingCoeffGiven) model->BSIM4v5SbulkJctSideGradingCoeff = 0.33; if (!model->BSIM4v5DbulkJctSideGradingCoeffGiven) model->BSIM4v5DbulkJctSideGradingCoeff = model->BSIM4v5SbulkJctSideGradingCoeff; if (!model->BSIM4v5SbulkJctGateSideGradingCoeffGiven) model->BSIM4v5SbulkJctGateSideGradingCoeff = model->BSIM4v5SbulkJctSideGradingCoeff; if (!model->BSIM4v5DbulkJctGateSideGradingCoeffGiven) model->BSIM4v5DbulkJctGateSideGradingCoeff = model->BSIM4v5SbulkJctGateSideGradingCoeff; if (!model->BSIM4v5SjctEmissionCoeffGiven) model->BSIM4v5SjctEmissionCoeff = 1.0; if (!model->BSIM4v5DjctEmissionCoeffGiven) model->BSIM4v5DjctEmissionCoeff = model->BSIM4v5SjctEmissionCoeff; if (!model->BSIM4v5SjctTempExponentGiven) model->BSIM4v5SjctTempExponent = 3.0; if (!model->BSIM4v5DjctTempExponentGiven) model->BSIM4v5DjctTempExponent = model->BSIM4v5SjctTempExponent; if (!model->BSIM4v5jtssGiven) model->BSIM4v5jtss = 0.0; if (!model->BSIM4v5jtsdGiven) model->BSIM4v5jtsd = model->BSIM4v5jtss; if (!model->BSIM4v5jtsswsGiven) model->BSIM4v5jtssws = 0.0; if (!model->BSIM4v5jtsswdGiven) model->BSIM4v5jtsswd = model->BSIM4v5jtssws; if (!model->BSIM4v5jtsswgsGiven) model->BSIM4v5jtsswgs = 0.0; if (!model->BSIM4v5jtsswgdGiven) model->BSIM4v5jtsswgd = model->BSIM4v5jtsswgs; if (!model->BSIM4v5njtsGiven) model->BSIM4v5njts = 20.0; if (!model->BSIM4v5njtsswGiven) model->BSIM4v5njtssw = 20.0; if (!model->BSIM4v5njtsswgGiven) model->BSIM4v5njtsswg = 20.0; if (!model->BSIM4v5xtssGiven) model->BSIM4v5xtss = 0.02; if (!model->BSIM4v5xtsdGiven) model->BSIM4v5xtsd = model->BSIM4v5xtss; if (!model->BSIM4v5xtsswsGiven) model->BSIM4v5xtssws = 0.02; if (!model->BSIM4v5xtsswdGiven) model->BSIM4v5xtsswd = model->BSIM4v5xtssws; if (!model->BSIM4v5xtsswgsGiven) model->BSIM4v5xtsswgs = 0.02; if (!model->BSIM4v5xtsswgdGiven) model->BSIM4v5xtsswgd = model->BSIM4v5xtsswgs; if (!model->BSIM4v5tnjtsGiven) model->BSIM4v5tnjts = 0.0; if (!model->BSIM4v5tnjtsswGiven) model->BSIM4v5tnjtssw = 0.0; if (!model->BSIM4v5tnjtsswgGiven) model->BSIM4v5tnjtsswg = 0.0; if (!model->BSIM4v5vtssGiven) model->BSIM4v5vtss = 10.0; if (!model->BSIM4v5vtsdGiven) model->BSIM4v5vtsd = model->BSIM4v5vtss; if (!model->BSIM4v5vtsswsGiven) model->BSIM4v5vtssws = 10.0; if (!model->BSIM4v5vtsswdGiven) model->BSIM4v5vtsswd = model->BSIM4v5vtssws; if (!model->BSIM4v5vtsswgsGiven) model->BSIM4v5vtsswgs = 10.0; if (!model->BSIM4v5vtsswgdGiven) model->BSIM4v5vtsswgd = model->BSIM4v5vtsswgs; if (!model->BSIM4v5oxideTrapDensityAGiven) { if (model->BSIM4v5type == NMOS) model->BSIM4v5oxideTrapDensityA = 6.25e41; else model->BSIM4v5oxideTrapDensityA= 6.188e40; } if (!model->BSIM4v5oxideTrapDensityBGiven) { if (model->BSIM4v5type == NMOS) model->BSIM4v5oxideTrapDensityB = 3.125e26; else model->BSIM4v5oxideTrapDensityB = 1.5e25; } if (!model->BSIM4v5oxideTrapDensityCGiven) model->BSIM4v5oxideTrapDensityC = 8.75e9; if (!model->BSIM4v5emGiven) model->BSIM4v5em = 4.1e7; /* V/m */ if (!model->BSIM4v5efGiven) model->BSIM4v5ef = 1.0; if (!model->BSIM4v5afGiven) model->BSIM4v5af = 1.0; if (!model->BSIM4v5kfGiven) model->BSIM4v5kf = 0.0; if (!model->BSIM4v5vgsMaxGiven) model->BSIM4v5vgsMax = 1e99; if (!model->BSIM4v5vgdMaxGiven) model->BSIM4v5vgdMax = 1e99; if (!model->BSIM4v5vgbMaxGiven) model->BSIM4v5vgbMax = 1e99; if (!model->BSIM4v5vdsMaxGiven) model->BSIM4v5vdsMax = 1e99; if (!model->BSIM4v5vbsMaxGiven) model->BSIM4v5vbsMax = 1e99; if (!model->BSIM4v5vbdMaxGiven) model->BSIM4v5vbdMax = 1e99; /* stress effect */ if (!model->BSIM4v5sarefGiven) model->BSIM4v5saref = 1e-6; /* m */ if (!model->BSIM4v5sbrefGiven) model->BSIM4v5sbref = 1e-6; /* m */ if (!model->BSIM4v5wlodGiven) model->BSIM4v5wlod = 0; /* m */ if (!model->BSIM4v5ku0Given) model->BSIM4v5ku0 = 0; /* 1/m */ if (!model->BSIM4v5kvsatGiven) model->BSIM4v5kvsat = 0; if (!model->BSIM4v5kvth0Given) /* m */ model->BSIM4v5kvth0 = 0; if (!model->BSIM4v5tku0Given) model->BSIM4v5tku0 = 0; if (!model->BSIM4v5llodku0Given) model->BSIM4v5llodku0 = 0; if (!model->BSIM4v5wlodku0Given) model->BSIM4v5wlodku0 = 0; if (!model->BSIM4v5llodvthGiven) model->BSIM4v5llodvth = 0; if (!model->BSIM4v5wlodvthGiven) model->BSIM4v5wlodvth = 0; if (!model->BSIM4v5lku0Given) model->BSIM4v5lku0 = 0; if (!model->BSIM4v5wku0Given) model->BSIM4v5wku0 = 0; if (!model->BSIM4v5pku0Given) model->BSIM4v5pku0 = 0; if (!model->BSIM4v5lkvth0Given) model->BSIM4v5lkvth0 = 0; if (!model->BSIM4v5wkvth0Given) model->BSIM4v5wkvth0 = 0; if (!model->BSIM4v5pkvth0Given) model->BSIM4v5pkvth0 = 0; if (!model->BSIM4v5stk2Given) model->BSIM4v5stk2 = 0; if (!model->BSIM4v5lodk2Given) model->BSIM4v5lodk2 = 1.0; if (!model->BSIM4v5steta0Given) model->BSIM4v5steta0 = 0; if (!model->BSIM4v5lodeta0Given) model->BSIM4v5lodeta0 = 1.0; /* Well Proximity Effect */ if (!model->BSIM4v5webGiven) model->BSIM4v5web = 0.0; if (!model->BSIM4v5wecGiven) model->BSIM4v5wec = 0.0; if (!model->BSIM4v5kvth0weGiven) model->BSIM4v5kvth0we = 0.0; if (!model->BSIM4v5k2weGiven) model->BSIM4v5k2we = 0.0; if (!model->BSIM4v5ku0weGiven) model->BSIM4v5ku0we = 0.0; if (!model->BSIM4v5screfGiven) model->BSIM4v5scref = 1.0E-6; /* m */ if (!model->BSIM4v5wpemodGiven) model->BSIM4v5wpemod = 0; else if ((model->BSIM4v5wpemod != 0) && (model->BSIM4v5wpemod != 1)) { model->BSIM4v5wpemod = 0; printf("Warning: wpemod has been set to its default value: 0.\n"); } if (!model->BSIM4v5lkvth0weGiven) model->BSIM4v5lkvth0we = 0; if (!model->BSIM4v5lk2weGiven) model->BSIM4v5lk2we = 0; if (!model->BSIM4v5lku0weGiven) model->BSIM4v5lku0we = 0; if (!model->BSIM4v5wkvth0weGiven) model->BSIM4v5wkvth0we = 0; if (!model->BSIM4v5wk2weGiven) model->BSIM4v5wk2we = 0; if (!model->BSIM4v5wku0weGiven) model->BSIM4v5wku0we = 0; if (!model->BSIM4v5pkvth0weGiven) model->BSIM4v5pkvth0we = 0; if (!model->BSIM4v5pk2weGiven) model->BSIM4v5pk2we = 0; if (!model->BSIM4v5pku0weGiven) model->BSIM4v5pku0we = 0; DMCGeff = model->BSIM4v5dmcg - model->BSIM4v5dmcgt; DMCIeff = model->BSIM4v5dmci; DMDGeff = model->BSIM4v5dmdg - model->BSIM4v5dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ for (here = model->BSIM4v5instances; here != NULL ; here=here->BSIM4v5nextInstance) { /* allocate a chunk of the state vector */ here->BSIM4v5states = *states; *states += BSIM4v5numStates; /* perform the parameter defaulting */ if (!here->BSIM4v5lGiven) here->BSIM4v5l = 5.0e-6; if (!here->BSIM4v5wGiven) here->BSIM4v5w = 5.0e-6; if (!here->BSIM4v5mGiven) here->BSIM4v5m = 1.0; if (!here->BSIM4v5nfGiven) here->BSIM4v5nf = 1.0; if (!here->BSIM4v5minGiven) here->BSIM4v5min = 0; /* integer */ if (!here->BSIM4v5icVDSGiven) here->BSIM4v5icVDS = 0.0; if (!here->BSIM4v5icVGSGiven) here->BSIM4v5icVGS = 0.0; if (!here->BSIM4v5icVBSGiven) here->BSIM4v5icVBS = 0.0; if (!here->BSIM4v5drainAreaGiven) here->BSIM4v5drainArea = 0.0; if (!here->BSIM4v5drainPerimeterGiven) here->BSIM4v5drainPerimeter = 0.0; if (!here->BSIM4v5drainSquaresGiven) here->BSIM4v5drainSquares = 1.0; if (!here->BSIM4v5sourceAreaGiven) here->BSIM4v5sourceArea = 0.0; if (!here->BSIM4v5sourcePerimeterGiven) here->BSIM4v5sourcePerimeter = 0.0; if (!here->BSIM4v5sourceSquaresGiven) here->BSIM4v5sourceSquares = 1.0; if (!here->BSIM4v5saGiven) here->BSIM4v5sa = 0.0; if (!here->BSIM4v5sbGiven) here->BSIM4v5sb = 0.0; if (!here->BSIM4v5sdGiven) here->BSIM4v5sd = 0.0; if (!here->BSIM4v5rbdbGiven) here->BSIM4v5rbdb = model->BSIM4v5rbdb; /* in ohm */ if (!here->BSIM4v5rbsbGiven) here->BSIM4v5rbsb = model->BSIM4v5rbsb; if (!here->BSIM4v5rbpbGiven) here->BSIM4v5rbpb = model->BSIM4v5rbpb; if (!here->BSIM4v5rbpsGiven) here->BSIM4v5rbps = model->BSIM4v5rbps; if (!here->BSIM4v5rbpdGiven) here->BSIM4v5rbpd = model->BSIM4v5rbpd; if (!here->BSIM4v5delvtoGiven) here->BSIM4v5delvto = 0.0; if (!here->BSIM4v5xgwGiven) here->BSIM4v5xgw = model->BSIM4v5xgw; if (!here->BSIM4v5ngconGiven) here->BSIM4v5ngcon = model->BSIM4v5ngcon; /* Process instance model selectors, some * may override their global counterparts */ if (!here->BSIM4v5rbodyModGiven) here->BSIM4v5rbodyMod = model->BSIM4v5rbodyMod; else if ((here->BSIM4v5rbodyMod != 0) && (here->BSIM4v5rbodyMod != 1) && (here->BSIM4v5rbodyMod != 2)) { here->BSIM4v5rbodyMod = model->BSIM4v5rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", model->BSIM4v5rbodyMod); } if (!here->BSIM4v5rgateModGiven) here->BSIM4v5rgateMod = model->BSIM4v5rgateMod; else if ((here->BSIM4v5rgateMod != 0) && (here->BSIM4v5rgateMod != 1) && (here->BSIM4v5rgateMod != 2) && (here->BSIM4v5rgateMod != 3)) { here->BSIM4v5rgateMod = model->BSIM4v5rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->BSIM4v5rgateMod); } if (!here->BSIM4v5geoModGiven) here->BSIM4v5geoMod = model->BSIM4v5geoMod; if (!here->BSIM4v5rgeoModGiven) here->BSIM4v5rgeoMod = model->BSIM4v5rgeoMod; else if ((here->BSIM4v5rgeoMod != 0) && (here->BSIM4v5rgeoMod != 1)) { here->BSIM4v5rgeoMod = model->BSIM4v5rgeoMod; printf("Warning: rgeoMod has been set to its global value %d.\n", model->BSIM4v5rgeoMod); } if (!here->BSIM4v5trnqsModGiven) here->BSIM4v5trnqsMod = model->BSIM4v5trnqsMod; else if ((here->BSIM4v5trnqsMod != 0) && (here->BSIM4v5trnqsMod != 1)) { here->BSIM4v5trnqsMod = model->BSIM4v5trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", model->BSIM4v5trnqsMod); } if (!here->BSIM4v5acnqsModGiven) here->BSIM4v5acnqsMod = model->BSIM4v5acnqsMod; else if ((here->BSIM4v5acnqsMod != 0) && (here->BSIM4v5acnqsMod != 1)) { here->BSIM4v5acnqsMod = model->BSIM4v5acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM4v5acnqsMod); } /* stress effect */ if (!here->BSIM4v5saGiven) here->BSIM4v5sa = 0.0; if (!here->BSIM4v5sbGiven) here->BSIM4v5sb = 0.0; if (!here->BSIM4v5sdGiven) here->BSIM4v5sd = 2 * model->BSIM4v5dmcg; /* Well Proximity Effect */ if (!here->BSIM4v5scaGiven) here->BSIM4v5sca = 0.0; if (!here->BSIM4v5scbGiven) here->BSIM4v5scb = 0.0; if (!here->BSIM4v5sccGiven) here->BSIM4v5scc = 0.0; if (!here->BSIM4v5scGiven) here->BSIM4v5sc = 0.0; /* m */ /* process drain series resistance */ createNode = 0; if ( (model->BSIM4v5rdsMod != 0) || (model->BSIM4v5tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v5sheetResistance > 0) { if (here->BSIM4v5drainSquaresGiven && here->BSIM4v5drainSquares > 0) { createNode = 1; } else if (!here->BSIM4v5drainSquaresGiven && (here->BSIM4v5rgeoMod != 0)) { BSIM4v5RdseffGeo(here->BSIM4v5nf*here->BSIM4v5m, here->BSIM4v5geoMod, here->BSIM4v5rgeoMod, here->BSIM4v5min, here->BSIM4v5w, model->BSIM4v5sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v5dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"drain"); if(error) return(error); here->BSIM4v5dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM4v5dNodePrime = here->BSIM4v5dNode; } /* process source series resistance */ createNode = 0; if ( (model->BSIM4v5rdsMod != 0) || (model->BSIM4v5tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v5sheetResistance > 0) { if (here->BSIM4v5sourceSquaresGiven && here->BSIM4v5sourceSquares > 0) { createNode = 1; } else if (!here->BSIM4v5sourceSquaresGiven && (here->BSIM4v5rgeoMod != 0)) { BSIM4v5RdseffGeo(here->BSIM4v5nf*here->BSIM4v5m, here->BSIM4v5geoMod, here->BSIM4v5rgeoMod, here->BSIM4v5min, here->BSIM4v5w, model->BSIM4v5sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v5sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"source"); if(error) return(error); here->BSIM4v5sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4v5sNodePrime = here->BSIM4v5sNode; if (here->BSIM4v5rgateMod > 0) { if (here->BSIM4v5gNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"gate"); if(error) return(error); here->BSIM4v5gNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4v5gNodePrime = here->BSIM4v5gNodeExt; if (here->BSIM4v5rgateMod == 3) { if (here->BSIM4v5gNodeMid == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"midgate"); if(error) return(error); here->BSIM4v5gNodeMid = tmp->number; } } else here->BSIM4v5gNodeMid = here->BSIM4v5gNodeExt; /* internal body nodes for body resistance model */ if ((here->BSIM4v5rbodyMod ==1) || (here->BSIM4v5rbodyMod ==2)) { if (here->BSIM4v5dbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"dbody"); if(error) return(error); here->BSIM4v5dbNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if (here->BSIM4v5bNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"body"); if(error) return(error); here->BSIM4v5bNodePrime = tmp->number; } if (here->BSIM4v5sbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"sbody"); if(error) return(error); here->BSIM4v5sbNode = tmp->number; } } else here->BSIM4v5dbNode = here->BSIM4v5bNodePrime = here->BSIM4v5sbNode = here->BSIM4v5bNode; /* NQS node */ if (here->BSIM4v5trnqsMod) { if (here->BSIM4v5qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v5name,"charge"); if(error) return(error); here->BSIM4v5qNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,5,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4v5qNode = 0; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM4v5DPbpPtr, BSIM4v5dNodePrime, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5GPbpPtr, BSIM4v5gNodePrime, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5SPbpPtr, BSIM4v5sNodePrime, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5BPdpPtr, BSIM4v5bNodePrime, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5BPgpPtr, BSIM4v5bNodePrime, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5BPspPtr, BSIM4v5bNodePrime, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5BPbpPtr, BSIM4v5bNodePrime, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5DdPtr, BSIM4v5dNode, BSIM4v5dNode); TSTALLOC(BSIM4v5GPgpPtr, BSIM4v5gNodePrime, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5SsPtr, BSIM4v5sNode, BSIM4v5sNode); TSTALLOC(BSIM4v5DPdpPtr, BSIM4v5dNodePrime, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5SPspPtr, BSIM4v5sNodePrime, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5DdpPtr, BSIM4v5dNode, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5GPdpPtr, BSIM4v5gNodePrime, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5GPspPtr, BSIM4v5gNodePrime, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5SspPtr, BSIM4v5sNode, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5DPspPtr, BSIM4v5dNodePrime, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5DPdPtr, BSIM4v5dNodePrime, BSIM4v5dNode); TSTALLOC(BSIM4v5DPgpPtr, BSIM4v5dNodePrime, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5SPgpPtr, BSIM4v5sNodePrime, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5SPsPtr, BSIM4v5sNodePrime, BSIM4v5sNode); TSTALLOC(BSIM4v5SPdpPtr, BSIM4v5sNodePrime, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5QqPtr, BSIM4v5qNode, BSIM4v5qNode); TSTALLOC(BSIM4v5QbpPtr, BSIM4v5qNode, BSIM4v5bNodePrime) ; TSTALLOC(BSIM4v5QdpPtr, BSIM4v5qNode, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5QspPtr, BSIM4v5qNode, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5QgpPtr, BSIM4v5qNode, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5DPqPtr, BSIM4v5dNodePrime, BSIM4v5qNode); TSTALLOC(BSIM4v5SPqPtr, BSIM4v5sNodePrime, BSIM4v5qNode); TSTALLOC(BSIM4v5GPqPtr, BSIM4v5gNodePrime, BSIM4v5qNode); if (here->BSIM4v5rgateMod != 0) { TSTALLOC(BSIM4v5GEgePtr, BSIM4v5gNodeExt, BSIM4v5gNodeExt); TSTALLOC(BSIM4v5GEgpPtr, BSIM4v5gNodeExt, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5GPgePtr, BSIM4v5gNodePrime, BSIM4v5gNodeExt); TSTALLOC(BSIM4v5GEdpPtr, BSIM4v5gNodeExt, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5GEspPtr, BSIM4v5gNodeExt, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5GEbpPtr, BSIM4v5gNodeExt, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5GMdpPtr, BSIM4v5gNodeMid, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5GMgpPtr, BSIM4v5gNodeMid, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5GMgmPtr, BSIM4v5gNodeMid, BSIM4v5gNodeMid); TSTALLOC(BSIM4v5GMgePtr, BSIM4v5gNodeMid, BSIM4v5gNodeExt); TSTALLOC(BSIM4v5GMspPtr, BSIM4v5gNodeMid, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5GMbpPtr, BSIM4v5gNodeMid, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5DPgmPtr, BSIM4v5dNodePrime, BSIM4v5gNodeMid); TSTALLOC(BSIM4v5GPgmPtr, BSIM4v5gNodePrime, BSIM4v5gNodeMid); TSTALLOC(BSIM4v5GEgmPtr, BSIM4v5gNodeExt, BSIM4v5gNodeMid); TSTALLOC(BSIM4v5SPgmPtr, BSIM4v5sNodePrime, BSIM4v5gNodeMid); TSTALLOC(BSIM4v5BPgmPtr, BSIM4v5bNodePrime, BSIM4v5gNodeMid); } if ((here->BSIM4v5rbodyMod ==1) || (here->BSIM4v5rbodyMod ==2)) { TSTALLOC(BSIM4v5DPdbPtr, BSIM4v5dNodePrime, BSIM4v5dbNode); TSTALLOC(BSIM4v5SPsbPtr, BSIM4v5sNodePrime, BSIM4v5sbNode); TSTALLOC(BSIM4v5DBdpPtr, BSIM4v5dbNode, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5DBdbPtr, BSIM4v5dbNode, BSIM4v5dbNode); TSTALLOC(BSIM4v5DBbpPtr, BSIM4v5dbNode, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5DBbPtr, BSIM4v5dbNode, BSIM4v5bNode); TSTALLOC(BSIM4v5BPdbPtr, BSIM4v5bNodePrime, BSIM4v5dbNode); TSTALLOC(BSIM4v5BPbPtr, BSIM4v5bNodePrime, BSIM4v5bNode); TSTALLOC(BSIM4v5BPsbPtr, BSIM4v5bNodePrime, BSIM4v5sbNode); TSTALLOC(BSIM4v5SBspPtr, BSIM4v5sbNode, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5SBbpPtr, BSIM4v5sbNode, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5SBbPtr, BSIM4v5sbNode, BSIM4v5bNode); TSTALLOC(BSIM4v5SBsbPtr, BSIM4v5sbNode, BSIM4v5sbNode); TSTALLOC(BSIM4v5BdbPtr, BSIM4v5bNode, BSIM4v5dbNode); TSTALLOC(BSIM4v5BbpPtr, BSIM4v5bNode, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5BsbPtr, BSIM4v5bNode, BSIM4v5sbNode); TSTALLOC(BSIM4v5BbPtr, BSIM4v5bNode, BSIM4v5bNode); } if (model->BSIM4v5rdsMod) { TSTALLOC(BSIM4v5DgpPtr, BSIM4v5dNode, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5DspPtr, BSIM4v5dNode, BSIM4v5sNodePrime); TSTALLOC(BSIM4v5DbpPtr, BSIM4v5dNode, BSIM4v5bNodePrime); TSTALLOC(BSIM4v5SdpPtr, BSIM4v5sNode, BSIM4v5dNodePrime); TSTALLOC(BSIM4v5SgpPtr, BSIM4v5sNode, BSIM4v5gNodePrime); TSTALLOC(BSIM4v5SbpPtr, BSIM4v5sNode, BSIM4v5bNodePrime); } } } return(OK); } int BSIM4v5unsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM BSIM4v5model *model; BSIM4v5instance *here; for (model = (BSIM4v5model *)inModel; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here != NULL; here=here->BSIM4v5nextInstance) { if (here->BSIM4v5dNodePrime && here->BSIM4v5dNodePrime != here->BSIM4v5dNode) { CKTdltNNum(ckt, here->BSIM4v5dNodePrime); here->BSIM4v5dNodePrime = 0; } if (here->BSIM4v5sNodePrime && here->BSIM4v5sNodePrime != here->BSIM4v5sNode) { CKTdltNNum(ckt, here->BSIM4v5sNodePrime); here->BSIM4v5sNodePrime = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/bsim4v5/b4v5geo.c0000644000265600020320000003055212264261473021151 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4geo.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" /* * WDLiu: * This subrutine is a special module to process the geometry dependent * parasitics for BSIM4v5, which calculates Ps, Pd, As, Ad, and Rs and Rd * for multi-fingers and varous GEO and RGEO options. */ int BSIM4v5RdsEndIso(double, double, double, double, double, double, int, int, double *); int BSIM4v5RdsEndSha(double, double, double, double, double, double, int, int, double *); static int BSIM4v5NumFingerDiff( double nf, int minSD, double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS) { int NF; NF = (int)nf; if ((NF%2) != 0) { *nuEndD = *nuEndS = 1.0; *nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); } else { if (minSD == 1) /* minimize # of source */ { *nuEndD = 2.0; *nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); *nuEndS = 0.0; *nuIntS = nf; } else { *nuEndD = 0.0; *nuIntD = nf; *nuEndS = 2.0; *nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); } } return 0; } int BSIM4v5PAeffGeo( double nf, int geo, int minSD, double Weffcj, double DMCG, double DMCI, double DMDG, double *Ps, double *Pd, double *As, double *Ad) { double T0, T1, T2; double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ BSIM4v5NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); T0 = DMCG + DMCI; T1 = DMCG + DMCG; T2 = DMDG + DMDG; PSiso = PDiso = T0 + T0 + Weffcj; PSsha = PDsha = T1; PSmer = PDmer = T2; ASiso = ADiso = T0 * Weffcj; ASsha = ADsha = DMCG * Weffcj; ASmer = ADmer = DMDG * Weffcj; switch(geo) { case 0: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 1: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 2: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 3: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 4: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 5: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 6: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 7: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 8: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 9: /* geo = 9 and 10 happen only when nf = even */ *Ps = PSiso + (nf - 1.0) * PSsha; *Pd = nf * PDsha; *As = ASiso + (nf - 1.0) * ASsha; *Ad = nf * ADsha; break; case 10: *Ps = nf * PSsha; *Pd = PDiso + (nf - 1.0) * PDsha; *As = nf * ASsha; *Ad = ADiso + (nf - 1.0) * ADsha; break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } return 0; } int BSIM4v5RdseffGeo( double nf, int geo, int rgeo, int minSD, double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, int Type, double *Rtot) { double Rint=0.0, Rend = 0.0; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ { BSIM4v5NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); /* Internal S/D resistance -- assume shared S or D and all wide contacts */ if (Type == 1) { if (nuIntS == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntS); } else { if (nuIntD == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntD); } } /* End S/D resistance -- geo dependent */ switch(geo) { case 0: if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 1: if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 2: if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 3: if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 4: if (Type == 1) BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / Weffcj; break; case 5: if (Type == 1) BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / (Weffcj * nuEndD); break; case 6: if (Type == 1) Rend = Rsh * DMDG / Weffcj; else BSIM4v5RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 7: if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); else BSIM4v5RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 8: Rend = Rsh * DMDG / Weffcj; break; case 9: /* all wide contacts assumed for geo = 9 and 10 */ if (Type == 1) { Rend = 0.5 * Rsh * DMCG / Weffcj; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } else { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } break; case 10: if (Type == 1) { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } else { Rend = 0.5 * Rsh * DMCG / Weffcj;; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } if (Rint <= 0.0) *Rtot = Rend; else if (Rend <= 0.0) *Rtot = Rint; else *Rtot = Rint * Rend / (Rint + Rend); if(*Rtot==0.0) printf("Warning: Zero resistance returned from RdseffGeo\n"); return 0; } int BSIM4v5RdsEndIso( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } int BSIM4v5RdsEndSha( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMCI); NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } ngspice-26/src/spicelib/devices/bsim4v5/b4v5mdel.c0000644000265600020320000000232012264261473021310 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4mdel.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM4v5model **model = (BSIM4v5model**)inModel; BSIM4v5model *modfast = (BSIM4v5model*)kill; BSIM4v5instance *here; BSIM4v5instance *prev = NULL; BSIM4v5model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM4v5nextModel)) { if ((*model)->BSIM4v5modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM4v5nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/bsim4v5ext.h0000644000265600020320000000277012264261473021716 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu Author: 2001- Xuemei Xi File: bsim4v5ext.h **********/ extern int BSIM4v5acLoad(GENmodel *,CKTcircuit*); extern int BSIM4v5ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM4v5convTest(GENmodel *,CKTcircuit*); extern int BSIM4v5delete(GENmodel*,IFuid,GENinstance**); extern void BSIM4v5destroy(GENmodel**); extern int BSIM4v5getic(GENmodel*,CKTcircuit*); extern int BSIM4v5load(GENmodel*,CKTcircuit*); extern int BSIM4v5mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM4v5mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM4v5mParam(int,IFvalue*,GENmodel*); extern void BSIM4v5mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM4v5param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM4v5pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM4v5setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM4v5temp(GENmodel*,CKTcircuit*); extern int BSIM4v5trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM4v5noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM4v5unsetup(GENmodel*,CKTcircuit*); extern int BSIM4v5soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsim4v5/bsim4v5init.h0000644000265600020320000000042612264261473022055 0ustar andreasadmin#ifndef _BSIM4V5INIT_H #define _BSIM4V5INIT_H extern IFparm BSIM4v5pTable[ ]; extern IFparm BSIM4v5mPTable[ ]; extern char *BSIM4v5names[ ]; extern int BSIM4v5pTSize; extern int BSIM4v5mPTSize; extern int BSIM4v5nSize; extern int BSIM4v5iSize; extern int BSIM4v5mSize; #endif ngspice-26/src/spicelib/devices/bsim4v5/b4v5mask.c0000644000265600020320000023500112264261473021326 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4mask.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM4v5model *model = (BSIM4v5model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM4v5_MOD_MOBMOD : value->iValue = model->BSIM4v5mobMod; return(OK); case BSIM4v5_MOD_PARAMCHK : value->iValue = model->BSIM4v5paramChk; return(OK); case BSIM4v5_MOD_BINUNIT : value->iValue = model->BSIM4v5binUnit; return(OK); case BSIM4v5_MOD_CAPMOD : value->iValue = model->BSIM4v5capMod; return(OK); case BSIM4v5_MOD_DIOMOD : value->iValue = model->BSIM4v5dioMod; return(OK); case BSIM4v5_MOD_TRNQSMOD : value->iValue = model->BSIM4v5trnqsMod; return(OK); case BSIM4v5_MOD_ACNQSMOD : value->iValue = model->BSIM4v5acnqsMod; return(OK); case BSIM4v5_MOD_FNOIMOD : value->iValue = model->BSIM4v5fnoiMod; return(OK); case BSIM4v5_MOD_TNOIMOD : value->iValue = model->BSIM4v5tnoiMod; return(OK); case BSIM4v5_MOD_RDSMOD : value->iValue = model->BSIM4v5rdsMod; return(OK); case BSIM4v5_MOD_RBODYMOD : value->iValue = model->BSIM4v5rbodyMod; return(OK); case BSIM4v5_MOD_RGATEMOD : value->iValue = model->BSIM4v5rgateMod; return(OK); case BSIM4v5_MOD_PERMOD : value->iValue = model->BSIM4v5perMod; return(OK); case BSIM4v5_MOD_GEOMOD : value->iValue = model->BSIM4v5geoMod; return(OK); case BSIM4v5_MOD_RGEOMOD : value->iValue = model->BSIM4v5rgeoMod; return(OK); case BSIM4v5_MOD_IGCMOD : value->iValue = model->BSIM4v5igcMod; return(OK); case BSIM4v5_MOD_IGBMOD : value->iValue = model->BSIM4v5igbMod; return(OK); case BSIM4v5_MOD_TEMPMOD : value->iValue = model->BSIM4v5tempMod; return(OK); case BSIM4v5_MOD_VERSION : value->sValue = model->BSIM4v5version; return(OK); case BSIM4v5_MOD_TOXREF : value->rValue = model->BSIM4v5toxref; return(OK); case BSIM4v5_MOD_TOXE : value->rValue = model->BSIM4v5toxe; return(OK); case BSIM4v5_MOD_TOXP : value->rValue = model->BSIM4v5toxp; return(OK); case BSIM4v5_MOD_TOXM : value->rValue = model->BSIM4v5toxm; return(OK); case BSIM4v5_MOD_DTOX : value->rValue = model->BSIM4v5dtox; return(OK); case BSIM4v5_MOD_EPSROX : value->rValue = model->BSIM4v5epsrox; return(OK); case BSIM4v5_MOD_CDSC : value->rValue = model->BSIM4v5cdsc; return(OK); case BSIM4v5_MOD_CDSCB : value->rValue = model->BSIM4v5cdscb; return(OK); case BSIM4v5_MOD_CDSCD : value->rValue = model->BSIM4v5cdscd; return(OK); case BSIM4v5_MOD_CIT : value->rValue = model->BSIM4v5cit; return(OK); case BSIM4v5_MOD_NFACTOR : value->rValue = model->BSIM4v5nfactor; return(OK); case BSIM4v5_MOD_XJ: value->rValue = model->BSIM4v5xj; return(OK); case BSIM4v5_MOD_VSAT: value->rValue = model->BSIM4v5vsat; return(OK); case BSIM4v5_MOD_VTL: value->rValue = model->BSIM4v5vtl; return(OK); case BSIM4v5_MOD_XN: value->rValue = model->BSIM4v5xn; return(OK); case BSIM4v5_MOD_LC: value->rValue = model->BSIM4v5lc; return(OK); case BSIM4v5_MOD_LAMBDA: value->rValue = model->BSIM4v5lambda; return(OK); case BSIM4v5_MOD_AT: value->rValue = model->BSIM4v5at; return(OK); case BSIM4v5_MOD_A0: value->rValue = model->BSIM4v5a0; return(OK); case BSIM4v5_MOD_AGS: value->rValue = model->BSIM4v5ags; return(OK); case BSIM4v5_MOD_A1: value->rValue = model->BSIM4v5a1; return(OK); case BSIM4v5_MOD_A2: value->rValue = model->BSIM4v5a2; return(OK); case BSIM4v5_MOD_KETA: value->rValue = model->BSIM4v5keta; return(OK); case BSIM4v5_MOD_NSUB: value->rValue = model->BSIM4v5nsub; return(OK); case BSIM4v5_MOD_NDEP: value->rValue = model->BSIM4v5ndep; return(OK); case BSIM4v5_MOD_NSD: value->rValue = model->BSIM4v5nsd; return(OK); case BSIM4v5_MOD_NGATE: value->rValue = model->BSIM4v5ngate; return(OK); case BSIM4v5_MOD_GAMMA1: value->rValue = model->BSIM4v5gamma1; return(OK); case BSIM4v5_MOD_GAMMA2: value->rValue = model->BSIM4v5gamma2; return(OK); case BSIM4v5_MOD_VBX: value->rValue = model->BSIM4v5vbx; return(OK); case BSIM4v5_MOD_VBM: value->rValue = model->BSIM4v5vbm; return(OK); case BSIM4v5_MOD_XT: value->rValue = model->BSIM4v5xt; return(OK); case BSIM4v5_MOD_K1: value->rValue = model->BSIM4v5k1; return(OK); case BSIM4v5_MOD_KT1: value->rValue = model->BSIM4v5kt1; return(OK); case BSIM4v5_MOD_KT1L: value->rValue = model->BSIM4v5kt1l; return(OK); case BSIM4v5_MOD_KT2 : value->rValue = model->BSIM4v5kt2; return(OK); case BSIM4v5_MOD_K2 : value->rValue = model->BSIM4v5k2; return(OK); case BSIM4v5_MOD_K3: value->rValue = model->BSIM4v5k3; return(OK); case BSIM4v5_MOD_K3B: value->rValue = model->BSIM4v5k3b; return(OK); case BSIM4v5_MOD_W0: value->rValue = model->BSIM4v5w0; return(OK); case BSIM4v5_MOD_LPE0: value->rValue = model->BSIM4v5lpe0; return(OK); case BSIM4v5_MOD_LPEB: value->rValue = model->BSIM4v5lpeb; return(OK); case BSIM4v5_MOD_DVTP0: value->rValue = model->BSIM4v5dvtp0; return(OK); case BSIM4v5_MOD_DVTP1: value->rValue = model->BSIM4v5dvtp1; return(OK); case BSIM4v5_MOD_DVT0 : value->rValue = model->BSIM4v5dvt0; return(OK); case BSIM4v5_MOD_DVT1 : value->rValue = model->BSIM4v5dvt1; return(OK); case BSIM4v5_MOD_DVT2 : value->rValue = model->BSIM4v5dvt2; return(OK); case BSIM4v5_MOD_DVT0W : value->rValue = model->BSIM4v5dvt0w; return(OK); case BSIM4v5_MOD_DVT1W : value->rValue = model->BSIM4v5dvt1w; return(OK); case BSIM4v5_MOD_DVT2W : value->rValue = model->BSIM4v5dvt2w; return(OK); case BSIM4v5_MOD_DROUT : value->rValue = model->BSIM4v5drout; return(OK); case BSIM4v5_MOD_DSUB : value->rValue = model->BSIM4v5dsub; return(OK); case BSIM4v5_MOD_VTH0: value->rValue = model->BSIM4v5vth0; return(OK); case BSIM4v5_MOD_EU: value->rValue = model->BSIM4v5eu; return(OK); case BSIM4v5_MOD_UA: value->rValue = model->BSIM4v5ua; return(OK); case BSIM4v5_MOD_UA1: value->rValue = model->BSIM4v5ua1; return(OK); case BSIM4v5_MOD_UB: value->rValue = model->BSIM4v5ub; return(OK); case BSIM4v5_MOD_UB1: value->rValue = model->BSIM4v5ub1; return(OK); case BSIM4v5_MOD_UC: value->rValue = model->BSIM4v5uc; return(OK); case BSIM4v5_MOD_UC1: value->rValue = model->BSIM4v5uc1; return(OK); case BSIM4v5_MOD_UD: value->rValue = model->BSIM4v5ud; return(OK); case BSIM4v5_MOD_UD1: value->rValue = model->BSIM4v5ud1; return(OK); case BSIM4v5_MOD_UP: value->rValue = model->BSIM4v5up; return(OK); case BSIM4v5_MOD_LP: value->rValue = model->BSIM4v5lp; return(OK); case BSIM4v5_MOD_U0: value->rValue = model->BSIM4v5u0; return(OK); case BSIM4v5_MOD_UTE: value->rValue = model->BSIM4v5ute; return(OK); case BSIM4v5_MOD_VOFF: value->rValue = model->BSIM4v5voff; return(OK); case BSIM4v5_MOD_TVOFF: value->rValue = model->BSIM4v5tvoff; return(OK); case BSIM4v5_MOD_VFBSDOFF: value->rValue = model->BSIM4v5vfbsdoff; return(OK); case BSIM4v5_MOD_TVFBSDOFF: value->rValue = model->BSIM4v5tvfbsdoff; return(OK); case BSIM4v5_MOD_VOFFL: value->rValue = model->BSIM4v5voffl; return(OK); case BSIM4v5_MOD_MINV: value->rValue = model->BSIM4v5minv; return(OK); case BSIM4v5_MOD_FPROUT: value->rValue = model->BSIM4v5fprout; return(OK); case BSIM4v5_MOD_PDITS: value->rValue = model->BSIM4v5pdits; return(OK); case BSIM4v5_MOD_PDITSD: value->rValue = model->BSIM4v5pditsd; return(OK); case BSIM4v5_MOD_PDITSL: value->rValue = model->BSIM4v5pditsl; return(OK); case BSIM4v5_MOD_DELTA: value->rValue = model->BSIM4v5delta; return(OK); case BSIM4v5_MOD_RDSW: value->rValue = model->BSIM4v5rdsw; return(OK); case BSIM4v5_MOD_RDSWMIN: value->rValue = model->BSIM4v5rdswmin; return(OK); case BSIM4v5_MOD_RDWMIN: value->rValue = model->BSIM4v5rdwmin; return(OK); case BSIM4v5_MOD_RSWMIN: value->rValue = model->BSIM4v5rswmin; return(OK); case BSIM4v5_MOD_RDW: value->rValue = model->BSIM4v5rdw; return(OK); case BSIM4v5_MOD_RSW: value->rValue = model->BSIM4v5rsw; return(OK); case BSIM4v5_MOD_PRWG: value->rValue = model->BSIM4v5prwg; return(OK); case BSIM4v5_MOD_PRWB: value->rValue = model->BSIM4v5prwb; return(OK); case BSIM4v5_MOD_PRT: value->rValue = model->BSIM4v5prt; return(OK); case BSIM4v5_MOD_ETA0: value->rValue = model->BSIM4v5eta0; return(OK); case BSIM4v5_MOD_ETAB: value->rValue = model->BSIM4v5etab; return(OK); case BSIM4v5_MOD_PCLM: value->rValue = model->BSIM4v5pclm; return(OK); case BSIM4v5_MOD_PDIBL1: value->rValue = model->BSIM4v5pdibl1; return(OK); case BSIM4v5_MOD_PDIBL2: value->rValue = model->BSIM4v5pdibl2; return(OK); case BSIM4v5_MOD_PDIBLB: value->rValue = model->BSIM4v5pdiblb; return(OK); case BSIM4v5_MOD_PSCBE1: value->rValue = model->BSIM4v5pscbe1; return(OK); case BSIM4v5_MOD_PSCBE2: value->rValue = model->BSIM4v5pscbe2; return(OK); case BSIM4v5_MOD_PVAG: value->rValue = model->BSIM4v5pvag; return(OK); case BSIM4v5_MOD_WR: value->rValue = model->BSIM4v5wr; return(OK); case BSIM4v5_MOD_DWG: value->rValue = model->BSIM4v5dwg; return(OK); case BSIM4v5_MOD_DWB: value->rValue = model->BSIM4v5dwb; return(OK); case BSIM4v5_MOD_B0: value->rValue = model->BSIM4v5b0; return(OK); case BSIM4v5_MOD_B1: value->rValue = model->BSIM4v5b1; return(OK); case BSIM4v5_MOD_ALPHA0: value->rValue = model->BSIM4v5alpha0; return(OK); case BSIM4v5_MOD_ALPHA1: value->rValue = model->BSIM4v5alpha1; return(OK); case BSIM4v5_MOD_BETA0: value->rValue = model->BSIM4v5beta0; return(OK); case BSIM4v5_MOD_AGIDL: value->rValue = model->BSIM4v5agidl; return(OK); case BSIM4v5_MOD_BGIDL: value->rValue = model->BSIM4v5bgidl; return(OK); case BSIM4v5_MOD_CGIDL: value->rValue = model->BSIM4v5cgidl; return(OK); case BSIM4v5_MOD_EGIDL: value->rValue = model->BSIM4v5egidl; return(OK); case BSIM4v5_MOD_AIGC: value->rValue = model->BSIM4v5aigc; return(OK); case BSIM4v5_MOD_BIGC: value->rValue = model->BSIM4v5bigc; return(OK); case BSIM4v5_MOD_CIGC: value->rValue = model->BSIM4v5cigc; return(OK); case BSIM4v5_MOD_AIGSD: value->rValue = model->BSIM4v5aigsd; return(OK); case BSIM4v5_MOD_BIGSD: value->rValue = model->BSIM4v5bigsd; return(OK); case BSIM4v5_MOD_CIGSD: value->rValue = model->BSIM4v5cigsd; return(OK); case BSIM4v5_MOD_AIGBACC: value->rValue = model->BSIM4v5aigbacc; return(OK); case BSIM4v5_MOD_BIGBACC: value->rValue = model->BSIM4v5bigbacc; return(OK); case BSIM4v5_MOD_CIGBACC: value->rValue = model->BSIM4v5cigbacc; return(OK); case BSIM4v5_MOD_AIGBINV: value->rValue = model->BSIM4v5aigbinv; return(OK); case BSIM4v5_MOD_BIGBINV: value->rValue = model->BSIM4v5bigbinv; return(OK); case BSIM4v5_MOD_CIGBINV: value->rValue = model->BSIM4v5cigbinv; return(OK); case BSIM4v5_MOD_NIGC: value->rValue = model->BSIM4v5nigc; return(OK); case BSIM4v5_MOD_NIGBACC: value->rValue = model->BSIM4v5nigbacc; return(OK); case BSIM4v5_MOD_NIGBINV: value->rValue = model->BSIM4v5nigbinv; return(OK); case BSIM4v5_MOD_NTOX: value->rValue = model->BSIM4v5ntox; return(OK); case BSIM4v5_MOD_EIGBINV: value->rValue = model->BSIM4v5eigbinv; return(OK); case BSIM4v5_MOD_PIGCD: value->rValue = model->BSIM4v5pigcd; return(OK); case BSIM4v5_MOD_POXEDGE: value->rValue = model->BSIM4v5poxedge; return(OK); case BSIM4v5_MOD_PHIN: value->rValue = model->BSIM4v5phin; return(OK); case BSIM4v5_MOD_XRCRG1: value->rValue = model->BSIM4v5xrcrg1; return(OK); case BSIM4v5_MOD_XRCRG2: value->rValue = model->BSIM4v5xrcrg2; return(OK); case BSIM4v5_MOD_TNOIA: value->rValue = model->BSIM4v5tnoia; return(OK); case BSIM4v5_MOD_TNOIB: value->rValue = model->BSIM4v5tnoib; return(OK); case BSIM4v5_MOD_RNOIA: value->rValue = model->BSIM4v5rnoia; return(OK); case BSIM4v5_MOD_RNOIB: value->rValue = model->BSIM4v5rnoib; return(OK); case BSIM4v5_MOD_NTNOI: value->rValue = model->BSIM4v5ntnoi; return(OK); case BSIM4v5_MOD_IJTHDFWD: value->rValue = model->BSIM4v5ijthdfwd; return(OK); case BSIM4v5_MOD_IJTHSFWD: value->rValue = model->BSIM4v5ijthsfwd; return(OK); case BSIM4v5_MOD_IJTHDREV: value->rValue = model->BSIM4v5ijthdrev; return(OK); case BSIM4v5_MOD_IJTHSREV: value->rValue = model->BSIM4v5ijthsrev; return(OK); case BSIM4v5_MOD_XJBVD: value->rValue = model->BSIM4v5xjbvd; return(OK); case BSIM4v5_MOD_XJBVS: value->rValue = model->BSIM4v5xjbvs; return(OK); case BSIM4v5_MOD_BVD: value->rValue = model->BSIM4v5bvd; return(OK); case BSIM4v5_MOD_BVS: value->rValue = model->BSIM4v5bvs; return(OK); case BSIM4v5_MOD_VFB: value->rValue = model->BSIM4v5vfb; return(OK); case BSIM4v5_MOD_JTSS: value->rValue = model->BSIM4v5jtss; return(OK); case BSIM4v5_MOD_JTSD: value->rValue = model->BSIM4v5jtsd; return(OK); case BSIM4v5_MOD_JTSSWS: value->rValue = model->BSIM4v5jtssws; return(OK); case BSIM4v5_MOD_JTSSWD: value->rValue = model->BSIM4v5jtsswd; return(OK); case BSIM4v5_MOD_JTSSWGS: value->rValue = model->BSIM4v5jtsswgs; return(OK); case BSIM4v5_MOD_JTSSWGD: value->rValue = model->BSIM4v5jtsswgd; return(OK); case BSIM4v5_MOD_NJTS: value->rValue = model->BSIM4v5njts; return(OK); case BSIM4v5_MOD_NJTSSW: value->rValue = model->BSIM4v5njtssw; return(OK); case BSIM4v5_MOD_NJTSSWG: value->rValue = model->BSIM4v5njtsswg; return(OK); case BSIM4v5_MOD_XTSS: value->rValue = model->BSIM4v5xtss; return(OK); case BSIM4v5_MOD_XTSD: value->rValue = model->BSIM4v5xtsd; return(OK); case BSIM4v5_MOD_XTSSWS: value->rValue = model->BSIM4v5xtssws; return(OK); case BSIM4v5_MOD_XTSSWD: value->rValue = model->BSIM4v5xtsswd; return(OK); case BSIM4v5_MOD_XTSSWGS: value->rValue = model->BSIM4v5xtsswgs; return(OK); case BSIM4v5_MOD_XTSSWGD: value->rValue = model->BSIM4v5xtsswgd; return(OK); case BSIM4v5_MOD_TNJTS: value->rValue = model->BSIM4v5tnjts; return(OK); case BSIM4v5_MOD_TNJTSSW: value->rValue = model->BSIM4v5tnjtssw; return(OK); case BSIM4v5_MOD_TNJTSSWG: value->rValue = model->BSIM4v5tnjtsswg; return(OK); case BSIM4v5_MOD_VTSS: value->rValue = model->BSIM4v5vtss; return(OK); case BSIM4v5_MOD_VTSD: value->rValue = model->BSIM4v5vtsd; return(OK); case BSIM4v5_MOD_VTSSWS: value->rValue = model->BSIM4v5vtssws; return(OK); case BSIM4v5_MOD_VTSSWD: value->rValue = model->BSIM4v5vtsswd; return(OK); case BSIM4v5_MOD_VTSSWGS: value->rValue = model->BSIM4v5vtsswgs; return(OK); case BSIM4v5_MOD_VTSSWGD: value->rValue = model->BSIM4v5vtsswgd; return(OK); case BSIM4v5_MOD_GBMIN: value->rValue = model->BSIM4v5gbmin; return(OK); case BSIM4v5_MOD_RBDB: value->rValue = model->BSIM4v5rbdb; return(OK); case BSIM4v5_MOD_RBPB: value->rValue = model->BSIM4v5rbpb; return(OK); case BSIM4v5_MOD_RBSB: value->rValue = model->BSIM4v5rbsb; return(OK); case BSIM4v5_MOD_RBPS: value->rValue = model->BSIM4v5rbps; return(OK); case BSIM4v5_MOD_RBPD: value->rValue = model->BSIM4v5rbpd; return(OK); case BSIM4v5_MOD_RBPS0: value->rValue = model->BSIM4v5rbps0; return(OK); case BSIM4v5_MOD_RBPSL: value->rValue = model->BSIM4v5rbpsl; return(OK); case BSIM4v5_MOD_RBPSW: value->rValue = model->BSIM4v5rbpsw; return(OK); case BSIM4v5_MOD_RBPSNF: value->rValue = model->BSIM4v5rbpsnf; return(OK); case BSIM4v5_MOD_RBPD0: value->rValue = model->BSIM4v5rbpd0; return(OK); case BSIM4v5_MOD_RBPDL: value->rValue = model->BSIM4v5rbpdl; return(OK); case BSIM4v5_MOD_RBPDW: value->rValue = model->BSIM4v5rbpdw; return(OK); case BSIM4v5_MOD_RBPDNF: value->rValue = model->BSIM4v5rbpdnf; return(OK); case BSIM4v5_MOD_RBPBX0: value->rValue = model->BSIM4v5rbpbx0; return(OK); case BSIM4v5_MOD_RBPBXL: value->rValue = model->BSIM4v5rbpbxl; return(OK); case BSIM4v5_MOD_RBPBXW: value->rValue = model->BSIM4v5rbpbxw; return(OK); case BSIM4v5_MOD_RBPBXNF: value->rValue = model->BSIM4v5rbpbxnf; return(OK); case BSIM4v5_MOD_RBPBY0: value->rValue = model->BSIM4v5rbpby0; return(OK); case BSIM4v5_MOD_RBPBYL: value->rValue = model->BSIM4v5rbpbyl; return(OK); case BSIM4v5_MOD_RBPBYW: value->rValue = model->BSIM4v5rbpbyw; return(OK); case BSIM4v5_MOD_RBPBYNF: value->rValue = model->BSIM4v5rbpbynf; return(OK); case BSIM4v5_MOD_RBSBX0: value->rValue = model->BSIM4v5rbsbx0; return(OK); case BSIM4v5_MOD_RBSBY0: value->rValue = model->BSIM4v5rbsby0; return(OK); case BSIM4v5_MOD_RBDBX0: value->rValue = model->BSIM4v5rbdbx0; return(OK); case BSIM4v5_MOD_RBDBY0: value->rValue = model->BSIM4v5rbdby0; return(OK); case BSIM4v5_MOD_RBSDBXL: value->rValue = model->BSIM4v5rbsdbxl; return(OK); case BSIM4v5_MOD_RBSDBXW: value->rValue = model->BSIM4v5rbsdbxw; return(OK); case BSIM4v5_MOD_RBSDBXNF: value->rValue = model->BSIM4v5rbsdbxnf; return(OK); case BSIM4v5_MOD_RBSDBYL: value->rValue = model->BSIM4v5rbsdbyl; return(OK); case BSIM4v5_MOD_RBSDBYW: value->rValue = model->BSIM4v5rbsdbyw; return(OK); case BSIM4v5_MOD_RBSDBYNF: value->rValue = model->BSIM4v5rbsdbynf; return(OK); case BSIM4v5_MOD_CGSL: value->rValue = model->BSIM4v5cgsl; return(OK); case BSIM4v5_MOD_CGDL: value->rValue = model->BSIM4v5cgdl; return(OK); case BSIM4v5_MOD_CKAPPAS: value->rValue = model->BSIM4v5ckappas; return(OK); case BSIM4v5_MOD_CKAPPAD: value->rValue = model->BSIM4v5ckappad; return(OK); case BSIM4v5_MOD_CF: value->rValue = model->BSIM4v5cf; return(OK); case BSIM4v5_MOD_CLC: value->rValue = model->BSIM4v5clc; return(OK); case BSIM4v5_MOD_CLE: value->rValue = model->BSIM4v5cle; return(OK); case BSIM4v5_MOD_DWC: value->rValue = model->BSIM4v5dwc; return(OK); case BSIM4v5_MOD_DLC: value->rValue = model->BSIM4v5dlc; return(OK); case BSIM4v5_MOD_XW: value->rValue = model->BSIM4v5xw; return(OK); case BSIM4v5_MOD_XL: value->rValue = model->BSIM4v5xl; return(OK); case BSIM4v5_MOD_DLCIG: value->rValue = model->BSIM4v5dlcig; return(OK); case BSIM4v5_MOD_DWJ: value->rValue = model->BSIM4v5dwj; return(OK); case BSIM4v5_MOD_VFBCV: value->rValue = model->BSIM4v5vfbcv; return(OK); case BSIM4v5_MOD_ACDE: value->rValue = model->BSIM4v5acde; return(OK); case BSIM4v5_MOD_MOIN: value->rValue = model->BSIM4v5moin; return(OK); case BSIM4v5_MOD_NOFF: value->rValue = model->BSIM4v5noff; return(OK); case BSIM4v5_MOD_VOFFCV: value->rValue = model->BSIM4v5voffcv; return(OK); case BSIM4v5_MOD_DMCG: value->rValue = model->BSIM4v5dmcg; return(OK); case BSIM4v5_MOD_DMCI: value->rValue = model->BSIM4v5dmci; return(OK); case BSIM4v5_MOD_DMDG: value->rValue = model->BSIM4v5dmdg; return(OK); case BSIM4v5_MOD_DMCGT: value->rValue = model->BSIM4v5dmcgt; return(OK); case BSIM4v5_MOD_XGW: value->rValue = model->BSIM4v5xgw; return(OK); case BSIM4v5_MOD_XGL: value->rValue = model->BSIM4v5xgl; return(OK); case BSIM4v5_MOD_RSHG: value->rValue = model->BSIM4v5rshg; return(OK); case BSIM4v5_MOD_NGCON: value->rValue = model->BSIM4v5ngcon; return(OK); case BSIM4v5_MOD_TCJ: value->rValue = model->BSIM4v5tcj; return(OK); case BSIM4v5_MOD_TPB: value->rValue = model->BSIM4v5tpb; return(OK); case BSIM4v5_MOD_TCJSW: value->rValue = model->BSIM4v5tcjsw; return(OK); case BSIM4v5_MOD_TPBSW: value->rValue = model->BSIM4v5tpbsw; return(OK); case BSIM4v5_MOD_TCJSWG: value->rValue = model->BSIM4v5tcjswg; return(OK); case BSIM4v5_MOD_TPBSWG: value->rValue = model->BSIM4v5tpbswg; return(OK); /* Length dependence */ case BSIM4v5_MOD_LCDSC : value->rValue = model->BSIM4v5lcdsc; return(OK); case BSIM4v5_MOD_LCDSCB : value->rValue = model->BSIM4v5lcdscb; return(OK); case BSIM4v5_MOD_LCDSCD : value->rValue = model->BSIM4v5lcdscd; return(OK); case BSIM4v5_MOD_LCIT : value->rValue = model->BSIM4v5lcit; return(OK); case BSIM4v5_MOD_LNFACTOR : value->rValue = model->BSIM4v5lnfactor; return(OK); case BSIM4v5_MOD_LXJ: value->rValue = model->BSIM4v5lxj; return(OK); case BSIM4v5_MOD_LVSAT: value->rValue = model->BSIM4v5lvsat; return(OK); case BSIM4v5_MOD_LAT: value->rValue = model->BSIM4v5lat; return(OK); case BSIM4v5_MOD_LA0: value->rValue = model->BSIM4v5la0; return(OK); case BSIM4v5_MOD_LAGS: value->rValue = model->BSIM4v5lags; return(OK); case BSIM4v5_MOD_LA1: value->rValue = model->BSIM4v5la1; return(OK); case BSIM4v5_MOD_LA2: value->rValue = model->BSIM4v5la2; return(OK); case BSIM4v5_MOD_LKETA: value->rValue = model->BSIM4v5lketa; return(OK); case BSIM4v5_MOD_LNSUB: value->rValue = model->BSIM4v5lnsub; return(OK); case BSIM4v5_MOD_LNDEP: value->rValue = model->BSIM4v5lndep; return(OK); case BSIM4v5_MOD_LNSD: value->rValue = model->BSIM4v5lnsd; return(OK); case BSIM4v5_MOD_LNGATE: value->rValue = model->BSIM4v5lngate; return(OK); case BSIM4v5_MOD_LGAMMA1: value->rValue = model->BSIM4v5lgamma1; return(OK); case BSIM4v5_MOD_LGAMMA2: value->rValue = model->BSIM4v5lgamma2; return(OK); case BSIM4v5_MOD_LVBX: value->rValue = model->BSIM4v5lvbx; return(OK); case BSIM4v5_MOD_LVBM: value->rValue = model->BSIM4v5lvbm; return(OK); case BSIM4v5_MOD_LXT: value->rValue = model->BSIM4v5lxt; return(OK); case BSIM4v5_MOD_LK1: value->rValue = model->BSIM4v5lk1; return(OK); case BSIM4v5_MOD_LKT1: value->rValue = model->BSIM4v5lkt1; return(OK); case BSIM4v5_MOD_LKT1L: value->rValue = model->BSIM4v5lkt1l; return(OK); case BSIM4v5_MOD_LKT2 : value->rValue = model->BSIM4v5lkt2; return(OK); case BSIM4v5_MOD_LK2 : value->rValue = model->BSIM4v5lk2; return(OK); case BSIM4v5_MOD_LK3: value->rValue = model->BSIM4v5lk3; return(OK); case BSIM4v5_MOD_LK3B: value->rValue = model->BSIM4v5lk3b; return(OK); case BSIM4v5_MOD_LW0: value->rValue = model->BSIM4v5lw0; return(OK); case BSIM4v5_MOD_LLPE0: value->rValue = model->BSIM4v5llpe0; return(OK); case BSIM4v5_MOD_LLPEB: value->rValue = model->BSIM4v5llpeb; return(OK); case BSIM4v5_MOD_LDVTP0: value->rValue = model->BSIM4v5ldvtp0; return(OK); case BSIM4v5_MOD_LDVTP1: value->rValue = model->BSIM4v5ldvtp1; return(OK); case BSIM4v5_MOD_LDVT0: value->rValue = model->BSIM4v5ldvt0; return(OK); case BSIM4v5_MOD_LDVT1 : value->rValue = model->BSIM4v5ldvt1; return(OK); case BSIM4v5_MOD_LDVT2 : value->rValue = model->BSIM4v5ldvt2; return(OK); case BSIM4v5_MOD_LDVT0W : value->rValue = model->BSIM4v5ldvt0w; return(OK); case BSIM4v5_MOD_LDVT1W : value->rValue = model->BSIM4v5ldvt1w; return(OK); case BSIM4v5_MOD_LDVT2W : value->rValue = model->BSIM4v5ldvt2w; return(OK); case BSIM4v5_MOD_LDROUT : value->rValue = model->BSIM4v5ldrout; return(OK); case BSIM4v5_MOD_LDSUB : value->rValue = model->BSIM4v5ldsub; return(OK); case BSIM4v5_MOD_LVTH0: value->rValue = model->BSIM4v5lvth0; return(OK); case BSIM4v5_MOD_LUA: value->rValue = model->BSIM4v5lua; return(OK); case BSIM4v5_MOD_LUA1: value->rValue = model->BSIM4v5lua1; return(OK); case BSIM4v5_MOD_LUB: value->rValue = model->BSIM4v5lub; return(OK); case BSIM4v5_MOD_LUB1: value->rValue = model->BSIM4v5lub1; return(OK); case BSIM4v5_MOD_LUC: value->rValue = model->BSIM4v5luc; return(OK); case BSIM4v5_MOD_LUC1: value->rValue = model->BSIM4v5luc1; return(OK); case BSIM4v5_MOD_LUD: value->rValue = model->BSIM4v5lud; return(OK); case BSIM4v5_MOD_LUD1: value->rValue = model->BSIM4v5lud1; return(OK); case BSIM4v5_MOD_LUP: value->rValue = model->BSIM4v5lup; return(OK); case BSIM4v5_MOD_LLP: value->rValue = model->BSIM4v5llp; return(OK); case BSIM4v5_MOD_LU0: value->rValue = model->BSIM4v5lu0; return(OK); case BSIM4v5_MOD_LUTE: value->rValue = model->BSIM4v5lute; return(OK); case BSIM4v5_MOD_LVOFF: value->rValue = model->BSIM4v5lvoff; return(OK); case BSIM4v5_MOD_LTVOFF: value->rValue = model->BSIM4v5ltvoff; return(OK); case BSIM4v5_MOD_LMINV: value->rValue = model->BSIM4v5lminv; return(OK); case BSIM4v5_MOD_LFPROUT: value->rValue = model->BSIM4v5lfprout; return(OK); case BSIM4v5_MOD_LPDITS: value->rValue = model->BSIM4v5lpdits; return(OK); case BSIM4v5_MOD_LPDITSD: value->rValue = model->BSIM4v5lpditsd; return(OK); case BSIM4v5_MOD_LDELTA: value->rValue = model->BSIM4v5ldelta; return(OK); case BSIM4v5_MOD_LRDSW: value->rValue = model->BSIM4v5lrdsw; return(OK); case BSIM4v5_MOD_LRDW: value->rValue = model->BSIM4v5lrdw; return(OK); case BSIM4v5_MOD_LRSW: value->rValue = model->BSIM4v5lrsw; return(OK); case BSIM4v5_MOD_LPRWB: value->rValue = model->BSIM4v5lprwb; return(OK); case BSIM4v5_MOD_LPRWG: value->rValue = model->BSIM4v5lprwg; return(OK); case BSIM4v5_MOD_LPRT: value->rValue = model->BSIM4v5lprt; return(OK); case BSIM4v5_MOD_LETA0: value->rValue = model->BSIM4v5leta0; return(OK); case BSIM4v5_MOD_LETAB: value->rValue = model->BSIM4v5letab; return(OK); case BSIM4v5_MOD_LPCLM: value->rValue = model->BSIM4v5lpclm; return(OK); case BSIM4v5_MOD_LPDIBL1: value->rValue = model->BSIM4v5lpdibl1; return(OK); case BSIM4v5_MOD_LPDIBL2: value->rValue = model->BSIM4v5lpdibl2; return(OK); case BSIM4v5_MOD_LPDIBLB: value->rValue = model->BSIM4v5lpdiblb; return(OK); case BSIM4v5_MOD_LPSCBE1: value->rValue = model->BSIM4v5lpscbe1; return(OK); case BSIM4v5_MOD_LPSCBE2: value->rValue = model->BSIM4v5lpscbe2; return(OK); case BSIM4v5_MOD_LPVAG: value->rValue = model->BSIM4v5lpvag; return(OK); case BSIM4v5_MOD_LWR: value->rValue = model->BSIM4v5lwr; return(OK); case BSIM4v5_MOD_LDWG: value->rValue = model->BSIM4v5ldwg; return(OK); case BSIM4v5_MOD_LDWB: value->rValue = model->BSIM4v5ldwb; return(OK); case BSIM4v5_MOD_LB0: value->rValue = model->BSIM4v5lb0; return(OK); case BSIM4v5_MOD_LB1: value->rValue = model->BSIM4v5lb1; return(OK); case BSIM4v5_MOD_LALPHA0: value->rValue = model->BSIM4v5lalpha0; return(OK); case BSIM4v5_MOD_LALPHA1: value->rValue = model->BSIM4v5lalpha1; return(OK); case BSIM4v5_MOD_LBETA0: value->rValue = model->BSIM4v5lbeta0; return(OK); case BSIM4v5_MOD_LAGIDL: value->rValue = model->BSIM4v5lagidl; return(OK); case BSIM4v5_MOD_LBGIDL: value->rValue = model->BSIM4v5lbgidl; return(OK); case BSIM4v5_MOD_LCGIDL: value->rValue = model->BSIM4v5lcgidl; return(OK); case BSIM4v5_MOD_LEGIDL: value->rValue = model->BSIM4v5legidl; return(OK); case BSIM4v5_MOD_LAIGC: value->rValue = model->BSIM4v5laigc; return(OK); case BSIM4v5_MOD_LBIGC: value->rValue = model->BSIM4v5lbigc; return(OK); case BSIM4v5_MOD_LCIGC: value->rValue = model->BSIM4v5lcigc; return(OK); case BSIM4v5_MOD_LAIGSD: value->rValue = model->BSIM4v5laigsd; return(OK); case BSIM4v5_MOD_LBIGSD: value->rValue = model->BSIM4v5lbigsd; return(OK); case BSIM4v5_MOD_LCIGSD: value->rValue = model->BSIM4v5lcigsd; return(OK); case BSIM4v5_MOD_LAIGBACC: value->rValue = model->BSIM4v5laigbacc; return(OK); case BSIM4v5_MOD_LBIGBACC: value->rValue = model->BSIM4v5lbigbacc; return(OK); case BSIM4v5_MOD_LCIGBACC: value->rValue = model->BSIM4v5lcigbacc; return(OK); case BSIM4v5_MOD_LAIGBINV: value->rValue = model->BSIM4v5laigbinv; return(OK); case BSIM4v5_MOD_LBIGBINV: value->rValue = model->BSIM4v5lbigbinv; return(OK); case BSIM4v5_MOD_LCIGBINV: value->rValue = model->BSIM4v5lcigbinv; return(OK); case BSIM4v5_MOD_LNIGC: value->rValue = model->BSIM4v5lnigc; return(OK); case BSIM4v5_MOD_LNIGBACC: value->rValue = model->BSIM4v5lnigbacc; return(OK); case BSIM4v5_MOD_LNIGBINV: value->rValue = model->BSIM4v5lnigbinv; return(OK); case BSIM4v5_MOD_LNTOX: value->rValue = model->BSIM4v5lntox; return(OK); case BSIM4v5_MOD_LEIGBINV: value->rValue = model->BSIM4v5leigbinv; return(OK); case BSIM4v5_MOD_LPIGCD: value->rValue = model->BSIM4v5lpigcd; return(OK); case BSIM4v5_MOD_LPOXEDGE: value->rValue = model->BSIM4v5lpoxedge; return(OK); case BSIM4v5_MOD_LPHIN: value->rValue = model->BSIM4v5lphin; return(OK); case BSIM4v5_MOD_LXRCRG1: value->rValue = model->BSIM4v5lxrcrg1; return(OK); case BSIM4v5_MOD_LXRCRG2: value->rValue = model->BSIM4v5lxrcrg2; return(OK); case BSIM4v5_MOD_LEU: value->rValue = model->BSIM4v5leu; return(OK); case BSIM4v5_MOD_LVFB: value->rValue = model->BSIM4v5lvfb; return(OK); case BSIM4v5_MOD_LCGSL: value->rValue = model->BSIM4v5lcgsl; return(OK); case BSIM4v5_MOD_LCGDL: value->rValue = model->BSIM4v5lcgdl; return(OK); case BSIM4v5_MOD_LCKAPPAS: value->rValue = model->BSIM4v5lckappas; return(OK); case BSIM4v5_MOD_LCKAPPAD: value->rValue = model->BSIM4v5lckappad; return(OK); case BSIM4v5_MOD_LCF: value->rValue = model->BSIM4v5lcf; return(OK); case BSIM4v5_MOD_LCLC: value->rValue = model->BSIM4v5lclc; return(OK); case BSIM4v5_MOD_LCLE: value->rValue = model->BSIM4v5lcle; return(OK); case BSIM4v5_MOD_LVFBCV: value->rValue = model->BSIM4v5lvfbcv; return(OK); case BSIM4v5_MOD_LACDE: value->rValue = model->BSIM4v5lacde; return(OK); case BSIM4v5_MOD_LMOIN: value->rValue = model->BSIM4v5lmoin; return(OK); case BSIM4v5_MOD_LNOFF: value->rValue = model->BSIM4v5lnoff; return(OK); case BSIM4v5_MOD_LVOFFCV: value->rValue = model->BSIM4v5lvoffcv; return(OK); case BSIM4v5_MOD_LVFBSDOFF: value->rValue = model->BSIM4v5lvfbsdoff; return(OK); case BSIM4v5_MOD_LTVFBSDOFF: value->rValue = model->BSIM4v5ltvfbsdoff; return(OK); /* Width dependence */ case BSIM4v5_MOD_WCDSC : value->rValue = model->BSIM4v5wcdsc; return(OK); case BSIM4v5_MOD_WCDSCB : value->rValue = model->BSIM4v5wcdscb; return(OK); case BSIM4v5_MOD_WCDSCD : value->rValue = model->BSIM4v5wcdscd; return(OK); case BSIM4v5_MOD_WCIT : value->rValue = model->BSIM4v5wcit; return(OK); case BSIM4v5_MOD_WNFACTOR : value->rValue = model->BSIM4v5wnfactor; return(OK); case BSIM4v5_MOD_WXJ: value->rValue = model->BSIM4v5wxj; return(OK); case BSIM4v5_MOD_WVSAT: value->rValue = model->BSIM4v5wvsat; return(OK); case BSIM4v5_MOD_WAT: value->rValue = model->BSIM4v5wat; return(OK); case BSIM4v5_MOD_WA0: value->rValue = model->BSIM4v5wa0; return(OK); case BSIM4v5_MOD_WAGS: value->rValue = model->BSIM4v5wags; return(OK); case BSIM4v5_MOD_WA1: value->rValue = model->BSIM4v5wa1; return(OK); case BSIM4v5_MOD_WA2: value->rValue = model->BSIM4v5wa2; return(OK); case BSIM4v5_MOD_WKETA: value->rValue = model->BSIM4v5wketa; return(OK); case BSIM4v5_MOD_WNSUB: value->rValue = model->BSIM4v5wnsub; return(OK); case BSIM4v5_MOD_WNDEP: value->rValue = model->BSIM4v5wndep; return(OK); case BSIM4v5_MOD_WNSD: value->rValue = model->BSIM4v5wnsd; return(OK); case BSIM4v5_MOD_WNGATE: value->rValue = model->BSIM4v5wngate; return(OK); case BSIM4v5_MOD_WGAMMA1: value->rValue = model->BSIM4v5wgamma1; return(OK); case BSIM4v5_MOD_WGAMMA2: value->rValue = model->BSIM4v5wgamma2; return(OK); case BSIM4v5_MOD_WVBX: value->rValue = model->BSIM4v5wvbx; return(OK); case BSIM4v5_MOD_WVBM: value->rValue = model->BSIM4v5wvbm; return(OK); case BSIM4v5_MOD_WXT: value->rValue = model->BSIM4v5wxt; return(OK); case BSIM4v5_MOD_WK1: value->rValue = model->BSIM4v5wk1; return(OK); case BSIM4v5_MOD_WKT1: value->rValue = model->BSIM4v5wkt1; return(OK); case BSIM4v5_MOD_WKT1L: value->rValue = model->BSIM4v5wkt1l; return(OK); case BSIM4v5_MOD_WKT2 : value->rValue = model->BSIM4v5wkt2; return(OK); case BSIM4v5_MOD_WK2 : value->rValue = model->BSIM4v5wk2; return(OK); case BSIM4v5_MOD_WK3: value->rValue = model->BSIM4v5wk3; return(OK); case BSIM4v5_MOD_WK3B: value->rValue = model->BSIM4v5wk3b; return(OK); case BSIM4v5_MOD_WW0: value->rValue = model->BSIM4v5ww0; return(OK); case BSIM4v5_MOD_WLPE0: value->rValue = model->BSIM4v5wlpe0; return(OK); case BSIM4v5_MOD_WDVTP0: value->rValue = model->BSIM4v5wdvtp0; return(OK); case BSIM4v5_MOD_WDVTP1: value->rValue = model->BSIM4v5wdvtp1; return(OK); case BSIM4v5_MOD_WLPEB: value->rValue = model->BSIM4v5wlpeb; return(OK); case BSIM4v5_MOD_WDVT0: value->rValue = model->BSIM4v5wdvt0; return(OK); case BSIM4v5_MOD_WDVT1 : value->rValue = model->BSIM4v5wdvt1; return(OK); case BSIM4v5_MOD_WDVT2 : value->rValue = model->BSIM4v5wdvt2; return(OK); case BSIM4v5_MOD_WDVT0W : value->rValue = model->BSIM4v5wdvt0w; return(OK); case BSIM4v5_MOD_WDVT1W : value->rValue = model->BSIM4v5wdvt1w; return(OK); case BSIM4v5_MOD_WDVT2W : value->rValue = model->BSIM4v5wdvt2w; return(OK); case BSIM4v5_MOD_WDROUT : value->rValue = model->BSIM4v5wdrout; return(OK); case BSIM4v5_MOD_WDSUB : value->rValue = model->BSIM4v5wdsub; return(OK); case BSIM4v5_MOD_WVTH0: value->rValue = model->BSIM4v5wvth0; return(OK); case BSIM4v5_MOD_WUA: value->rValue = model->BSIM4v5wua; return(OK); case BSIM4v5_MOD_WUA1: value->rValue = model->BSIM4v5wua1; return(OK); case BSIM4v5_MOD_WUB: value->rValue = model->BSIM4v5wub; return(OK); case BSIM4v5_MOD_WUB1: value->rValue = model->BSIM4v5wub1; return(OK); case BSIM4v5_MOD_WUC: value->rValue = model->BSIM4v5wuc; return(OK); case BSIM4v5_MOD_WUC1: value->rValue = model->BSIM4v5wuc1; return(OK); case BSIM4v5_MOD_WUD: value->rValue = model->BSIM4v5wud; return(OK); case BSIM4v5_MOD_WUD1: value->rValue = model->BSIM4v5wud1; return(OK); case BSIM4v5_MOD_WUP: value->rValue = model->BSIM4v5wup; return(OK); case BSIM4v5_MOD_WLP: value->rValue = model->BSIM4v5wlp; return(OK); case BSIM4v5_MOD_WU0: value->rValue = model->BSIM4v5wu0; return(OK); case BSIM4v5_MOD_WUTE: value->rValue = model->BSIM4v5wute; return(OK); case BSIM4v5_MOD_WVOFF: value->rValue = model->BSIM4v5wvoff; return(OK); case BSIM4v5_MOD_WTVOFF: value->rValue = model->BSIM4v5wtvoff; return(OK); case BSIM4v5_MOD_WMINV: value->rValue = model->BSIM4v5wminv; return(OK); case BSIM4v5_MOD_WFPROUT: value->rValue = model->BSIM4v5wfprout; return(OK); case BSIM4v5_MOD_WPDITS: value->rValue = model->BSIM4v5wpdits; return(OK); case BSIM4v5_MOD_WPDITSD: value->rValue = model->BSIM4v5wpditsd; return(OK); case BSIM4v5_MOD_WDELTA: value->rValue = model->BSIM4v5wdelta; return(OK); case BSIM4v5_MOD_WRDSW: value->rValue = model->BSIM4v5wrdsw; return(OK); case BSIM4v5_MOD_WRDW: value->rValue = model->BSIM4v5wrdw; return(OK); case BSIM4v5_MOD_WRSW: value->rValue = model->BSIM4v5wrsw; return(OK); case BSIM4v5_MOD_WPRWB: value->rValue = model->BSIM4v5wprwb; return(OK); case BSIM4v5_MOD_WPRWG: value->rValue = model->BSIM4v5wprwg; return(OK); case BSIM4v5_MOD_WPRT: value->rValue = model->BSIM4v5wprt; return(OK); case BSIM4v5_MOD_WETA0: value->rValue = model->BSIM4v5weta0; return(OK); case BSIM4v5_MOD_WETAB: value->rValue = model->BSIM4v5wetab; return(OK); case BSIM4v5_MOD_WPCLM: value->rValue = model->BSIM4v5wpclm; return(OK); case BSIM4v5_MOD_WPDIBL1: value->rValue = model->BSIM4v5wpdibl1; return(OK); case BSIM4v5_MOD_WPDIBL2: value->rValue = model->BSIM4v5wpdibl2; return(OK); case BSIM4v5_MOD_WPDIBLB: value->rValue = model->BSIM4v5wpdiblb; return(OK); case BSIM4v5_MOD_WPSCBE1: value->rValue = model->BSIM4v5wpscbe1; return(OK); case BSIM4v5_MOD_WPSCBE2: value->rValue = model->BSIM4v5wpscbe2; return(OK); case BSIM4v5_MOD_WPVAG: value->rValue = model->BSIM4v5wpvag; return(OK); case BSIM4v5_MOD_WWR: value->rValue = model->BSIM4v5wwr; return(OK); case BSIM4v5_MOD_WDWG: value->rValue = model->BSIM4v5wdwg; return(OK); case BSIM4v5_MOD_WDWB: value->rValue = model->BSIM4v5wdwb; return(OK); case BSIM4v5_MOD_WB0: value->rValue = model->BSIM4v5wb0; return(OK); case BSIM4v5_MOD_WB1: value->rValue = model->BSIM4v5wb1; return(OK); case BSIM4v5_MOD_WALPHA0: value->rValue = model->BSIM4v5walpha0; return(OK); case BSIM4v5_MOD_WALPHA1: value->rValue = model->BSIM4v5walpha1; return(OK); case BSIM4v5_MOD_WBETA0: value->rValue = model->BSIM4v5wbeta0; return(OK); case BSIM4v5_MOD_WAGIDL: value->rValue = model->BSIM4v5wagidl; return(OK); case BSIM4v5_MOD_WBGIDL: value->rValue = model->BSIM4v5wbgidl; return(OK); case BSIM4v5_MOD_WCGIDL: value->rValue = model->BSIM4v5wcgidl; return(OK); case BSIM4v5_MOD_WEGIDL: value->rValue = model->BSIM4v5wegidl; return(OK); case BSIM4v5_MOD_WAIGC: value->rValue = model->BSIM4v5waigc; return(OK); case BSIM4v5_MOD_WBIGC: value->rValue = model->BSIM4v5wbigc; return(OK); case BSIM4v5_MOD_WCIGC: value->rValue = model->BSIM4v5wcigc; return(OK); case BSIM4v5_MOD_WAIGSD: value->rValue = model->BSIM4v5waigsd; return(OK); case BSIM4v5_MOD_WBIGSD: value->rValue = model->BSIM4v5wbigsd; return(OK); case BSIM4v5_MOD_WCIGSD: value->rValue = model->BSIM4v5wcigsd; return(OK); case BSIM4v5_MOD_WAIGBACC: value->rValue = model->BSIM4v5waigbacc; return(OK); case BSIM4v5_MOD_WBIGBACC: value->rValue = model->BSIM4v5wbigbacc; return(OK); case BSIM4v5_MOD_WCIGBACC: value->rValue = model->BSIM4v5wcigbacc; return(OK); case BSIM4v5_MOD_WAIGBINV: value->rValue = model->BSIM4v5waigbinv; return(OK); case BSIM4v5_MOD_WBIGBINV: value->rValue = model->BSIM4v5wbigbinv; return(OK); case BSIM4v5_MOD_WCIGBINV: value->rValue = model->BSIM4v5wcigbinv; return(OK); case BSIM4v5_MOD_WNIGC: value->rValue = model->BSIM4v5wnigc; return(OK); case BSIM4v5_MOD_WNIGBACC: value->rValue = model->BSIM4v5wnigbacc; return(OK); case BSIM4v5_MOD_WNIGBINV: value->rValue = model->BSIM4v5wnigbinv; return(OK); case BSIM4v5_MOD_WNTOX: value->rValue = model->BSIM4v5wntox; return(OK); case BSIM4v5_MOD_WEIGBINV: value->rValue = model->BSIM4v5weigbinv; return(OK); case BSIM4v5_MOD_WPIGCD: value->rValue = model->BSIM4v5wpigcd; return(OK); case BSIM4v5_MOD_WPOXEDGE: value->rValue = model->BSIM4v5wpoxedge; return(OK); case BSIM4v5_MOD_WPHIN: value->rValue = model->BSIM4v5wphin; return(OK); case BSIM4v5_MOD_WXRCRG1: value->rValue = model->BSIM4v5wxrcrg1; return(OK); case BSIM4v5_MOD_WXRCRG2: value->rValue = model->BSIM4v5wxrcrg2; return(OK); case BSIM4v5_MOD_WEU: value->rValue = model->BSIM4v5weu; return(OK); case BSIM4v5_MOD_WVFB: value->rValue = model->BSIM4v5wvfb; return(OK); case BSIM4v5_MOD_WCGSL: value->rValue = model->BSIM4v5wcgsl; return(OK); case BSIM4v5_MOD_WCGDL: value->rValue = model->BSIM4v5wcgdl; return(OK); case BSIM4v5_MOD_WCKAPPAS: value->rValue = model->BSIM4v5wckappas; return(OK); case BSIM4v5_MOD_WCKAPPAD: value->rValue = model->BSIM4v5wckappad; return(OK); case BSIM4v5_MOD_WCF: value->rValue = model->BSIM4v5wcf; return(OK); case BSIM4v5_MOD_WCLC: value->rValue = model->BSIM4v5wclc; return(OK); case BSIM4v5_MOD_WCLE: value->rValue = model->BSIM4v5wcle; return(OK); case BSIM4v5_MOD_WVFBCV: value->rValue = model->BSIM4v5wvfbcv; return(OK); case BSIM4v5_MOD_WACDE: value->rValue = model->BSIM4v5wacde; return(OK); case BSIM4v5_MOD_WMOIN: value->rValue = model->BSIM4v5wmoin; return(OK); case BSIM4v5_MOD_WNOFF: value->rValue = model->BSIM4v5wnoff; return(OK); case BSIM4v5_MOD_WVOFFCV: value->rValue = model->BSIM4v5wvoffcv; return(OK); case BSIM4v5_MOD_WVFBSDOFF: value->rValue = model->BSIM4v5wvfbsdoff; return(OK); case BSIM4v5_MOD_WTVFBSDOFF: value->rValue = model->BSIM4v5wtvfbsdoff; return(OK); /* Cross-term dependence */ case BSIM4v5_MOD_PCDSC : value->rValue = model->BSIM4v5pcdsc; return(OK); case BSIM4v5_MOD_PCDSCB : value->rValue = model->BSIM4v5pcdscb; return(OK); case BSIM4v5_MOD_PCDSCD : value->rValue = model->BSIM4v5pcdscd; return(OK); case BSIM4v5_MOD_PCIT : value->rValue = model->BSIM4v5pcit; return(OK); case BSIM4v5_MOD_PNFACTOR : value->rValue = model->BSIM4v5pnfactor; return(OK); case BSIM4v5_MOD_PXJ: value->rValue = model->BSIM4v5pxj; return(OK); case BSIM4v5_MOD_PVSAT: value->rValue = model->BSIM4v5pvsat; return(OK); case BSIM4v5_MOD_PAT: value->rValue = model->BSIM4v5pat; return(OK); case BSIM4v5_MOD_PA0: value->rValue = model->BSIM4v5pa0; return(OK); case BSIM4v5_MOD_PAGS: value->rValue = model->BSIM4v5pags; return(OK); case BSIM4v5_MOD_PA1: value->rValue = model->BSIM4v5pa1; return(OK); case BSIM4v5_MOD_PA2: value->rValue = model->BSIM4v5pa2; return(OK); case BSIM4v5_MOD_PKETA: value->rValue = model->BSIM4v5pketa; return(OK); case BSIM4v5_MOD_PNSUB: value->rValue = model->BSIM4v5pnsub; return(OK); case BSIM4v5_MOD_PNDEP: value->rValue = model->BSIM4v5pndep; return(OK); case BSIM4v5_MOD_PNSD: value->rValue = model->BSIM4v5pnsd; return(OK); case BSIM4v5_MOD_PNGATE: value->rValue = model->BSIM4v5pngate; return(OK); case BSIM4v5_MOD_PGAMMA1: value->rValue = model->BSIM4v5pgamma1; return(OK); case BSIM4v5_MOD_PGAMMA2: value->rValue = model->BSIM4v5pgamma2; return(OK); case BSIM4v5_MOD_PVBX: value->rValue = model->BSIM4v5pvbx; return(OK); case BSIM4v5_MOD_PVBM: value->rValue = model->BSIM4v5pvbm; return(OK); case BSIM4v5_MOD_PXT: value->rValue = model->BSIM4v5pxt; return(OK); case BSIM4v5_MOD_PK1: value->rValue = model->BSIM4v5pk1; return(OK); case BSIM4v5_MOD_PKT1: value->rValue = model->BSIM4v5pkt1; return(OK); case BSIM4v5_MOD_PKT1L: value->rValue = model->BSIM4v5pkt1l; return(OK); case BSIM4v5_MOD_PKT2 : value->rValue = model->BSIM4v5pkt2; return(OK); case BSIM4v5_MOD_PK2 : value->rValue = model->BSIM4v5pk2; return(OK); case BSIM4v5_MOD_PK3: value->rValue = model->BSIM4v5pk3; return(OK); case BSIM4v5_MOD_PK3B: value->rValue = model->BSIM4v5pk3b; return(OK); case BSIM4v5_MOD_PW0: value->rValue = model->BSIM4v5pw0; return(OK); case BSIM4v5_MOD_PLPE0: value->rValue = model->BSIM4v5plpe0; return(OK); case BSIM4v5_MOD_PLPEB: value->rValue = model->BSIM4v5plpeb; return(OK); case BSIM4v5_MOD_PDVTP0: value->rValue = model->BSIM4v5pdvtp0; return(OK); case BSIM4v5_MOD_PDVTP1: value->rValue = model->BSIM4v5pdvtp1; return(OK); case BSIM4v5_MOD_PDVT0 : value->rValue = model->BSIM4v5pdvt0; return(OK); case BSIM4v5_MOD_PDVT1 : value->rValue = model->BSIM4v5pdvt1; return(OK); case BSIM4v5_MOD_PDVT2 : value->rValue = model->BSIM4v5pdvt2; return(OK); case BSIM4v5_MOD_PDVT0W : value->rValue = model->BSIM4v5pdvt0w; return(OK); case BSIM4v5_MOD_PDVT1W : value->rValue = model->BSIM4v5pdvt1w; return(OK); case BSIM4v5_MOD_PDVT2W : value->rValue = model->BSIM4v5pdvt2w; return(OK); case BSIM4v5_MOD_PDROUT : value->rValue = model->BSIM4v5pdrout; return(OK); case BSIM4v5_MOD_PDSUB : value->rValue = model->BSIM4v5pdsub; return(OK); case BSIM4v5_MOD_PVTH0: value->rValue = model->BSIM4v5pvth0; return(OK); case BSIM4v5_MOD_PUA: value->rValue = model->BSIM4v5pua; return(OK); case BSIM4v5_MOD_PUA1: value->rValue = model->BSIM4v5pua1; return(OK); case BSIM4v5_MOD_PUB: value->rValue = model->BSIM4v5pub; return(OK); case BSIM4v5_MOD_PUB1: value->rValue = model->BSIM4v5pub1; return(OK); case BSIM4v5_MOD_PUC: value->rValue = model->BSIM4v5puc; return(OK); case BSIM4v5_MOD_PUC1: value->rValue = model->BSIM4v5puc1; return(OK); case BSIM4v5_MOD_PUD: value->rValue = model->BSIM4v5pud; return(OK); case BSIM4v5_MOD_PUD1: value->rValue = model->BSIM4v5pud1; return(OK); case BSIM4v5_MOD_PUP: value->rValue = model->BSIM4v5pup; return(OK); case BSIM4v5_MOD_PLP: value->rValue = model->BSIM4v5plp; return(OK); case BSIM4v5_MOD_PU0: value->rValue = model->BSIM4v5pu0; return(OK); case BSIM4v5_MOD_PUTE: value->rValue = model->BSIM4v5pute; return(OK); case BSIM4v5_MOD_PVOFF: value->rValue = model->BSIM4v5pvoff; return(OK); case BSIM4v5_MOD_PTVOFF: value->rValue = model->BSIM4v5ptvoff; return(OK); case BSIM4v5_MOD_PMINV: value->rValue = model->BSIM4v5pminv; return(OK); case BSIM4v5_MOD_PFPROUT: value->rValue = model->BSIM4v5pfprout; return(OK); case BSIM4v5_MOD_PPDITS: value->rValue = model->BSIM4v5ppdits; return(OK); case BSIM4v5_MOD_PPDITSD: value->rValue = model->BSIM4v5ppditsd; return(OK); case BSIM4v5_MOD_PDELTA: value->rValue = model->BSIM4v5pdelta; return(OK); case BSIM4v5_MOD_PRDSW: value->rValue = model->BSIM4v5prdsw; return(OK); case BSIM4v5_MOD_PRDW: value->rValue = model->BSIM4v5prdw; return(OK); case BSIM4v5_MOD_PRSW: value->rValue = model->BSIM4v5prsw; return(OK); case BSIM4v5_MOD_PPRWB: value->rValue = model->BSIM4v5pprwb; return(OK); case BSIM4v5_MOD_PPRWG: value->rValue = model->BSIM4v5pprwg; return(OK); case BSIM4v5_MOD_PPRT: value->rValue = model->BSIM4v5pprt; return(OK); case BSIM4v5_MOD_PETA0: value->rValue = model->BSIM4v5peta0; return(OK); case BSIM4v5_MOD_PETAB: value->rValue = model->BSIM4v5petab; return(OK); case BSIM4v5_MOD_PPCLM: value->rValue = model->BSIM4v5ppclm; return(OK); case BSIM4v5_MOD_PPDIBL1: value->rValue = model->BSIM4v5ppdibl1; return(OK); case BSIM4v5_MOD_PPDIBL2: value->rValue = model->BSIM4v5ppdibl2; return(OK); case BSIM4v5_MOD_PPDIBLB: value->rValue = model->BSIM4v5ppdiblb; return(OK); case BSIM4v5_MOD_PPSCBE1: value->rValue = model->BSIM4v5ppscbe1; return(OK); case BSIM4v5_MOD_PPSCBE2: value->rValue = model->BSIM4v5ppscbe2; return(OK); case BSIM4v5_MOD_PPVAG: value->rValue = model->BSIM4v5ppvag; return(OK); case BSIM4v5_MOD_PWR: value->rValue = model->BSIM4v5pwr; return(OK); case BSIM4v5_MOD_PDWG: value->rValue = model->BSIM4v5pdwg; return(OK); case BSIM4v5_MOD_PDWB: value->rValue = model->BSIM4v5pdwb; return(OK); case BSIM4v5_MOD_PB0: value->rValue = model->BSIM4v5pb0; return(OK); case BSIM4v5_MOD_PB1: value->rValue = model->BSIM4v5pb1; return(OK); case BSIM4v5_MOD_PALPHA0: value->rValue = model->BSIM4v5palpha0; return(OK); case BSIM4v5_MOD_PALPHA1: value->rValue = model->BSIM4v5palpha1; return(OK); case BSIM4v5_MOD_PBETA0: value->rValue = model->BSIM4v5pbeta0; return(OK); case BSIM4v5_MOD_PAGIDL: value->rValue = model->BSIM4v5pagidl; return(OK); case BSIM4v5_MOD_PBGIDL: value->rValue = model->BSIM4v5pbgidl; return(OK); case BSIM4v5_MOD_PCGIDL: value->rValue = model->BSIM4v5pcgidl; return(OK); case BSIM4v5_MOD_PEGIDL: value->rValue = model->BSIM4v5pegidl; return(OK); case BSIM4v5_MOD_PAIGC: value->rValue = model->BSIM4v5paigc; return(OK); case BSIM4v5_MOD_PBIGC: value->rValue = model->BSIM4v5pbigc; return(OK); case BSIM4v5_MOD_PCIGC: value->rValue = model->BSIM4v5pcigc; return(OK); case BSIM4v5_MOD_PAIGSD: value->rValue = model->BSIM4v5paigsd; return(OK); case BSIM4v5_MOD_PBIGSD: value->rValue = model->BSIM4v5pbigsd; return(OK); case BSIM4v5_MOD_PCIGSD: value->rValue = model->BSIM4v5pcigsd; return(OK); case BSIM4v5_MOD_PAIGBACC: value->rValue = model->BSIM4v5paigbacc; return(OK); case BSIM4v5_MOD_PBIGBACC: value->rValue = model->BSIM4v5pbigbacc; return(OK); case BSIM4v5_MOD_PCIGBACC: value->rValue = model->BSIM4v5pcigbacc; return(OK); case BSIM4v5_MOD_PAIGBINV: value->rValue = model->BSIM4v5paigbinv; return(OK); case BSIM4v5_MOD_PBIGBINV: value->rValue = model->BSIM4v5pbigbinv; return(OK); case BSIM4v5_MOD_PCIGBINV: value->rValue = model->BSIM4v5pcigbinv; return(OK); case BSIM4v5_MOD_PNIGC: value->rValue = model->BSIM4v5pnigc; return(OK); case BSIM4v5_MOD_PNIGBACC: value->rValue = model->BSIM4v5pnigbacc; return(OK); case BSIM4v5_MOD_PNIGBINV: value->rValue = model->BSIM4v5pnigbinv; return(OK); case BSIM4v5_MOD_PNTOX: value->rValue = model->BSIM4v5pntox; return(OK); case BSIM4v5_MOD_PEIGBINV: value->rValue = model->BSIM4v5peigbinv; return(OK); case BSIM4v5_MOD_PPIGCD: value->rValue = model->BSIM4v5ppigcd; return(OK); case BSIM4v5_MOD_PPOXEDGE: value->rValue = model->BSIM4v5ppoxedge; return(OK); case BSIM4v5_MOD_PPHIN: value->rValue = model->BSIM4v5pphin; return(OK); case BSIM4v5_MOD_PXRCRG1: value->rValue = model->BSIM4v5pxrcrg1; return(OK); case BSIM4v5_MOD_PXRCRG2: value->rValue = model->BSIM4v5pxrcrg2; return(OK); case BSIM4v5_MOD_PEU: value->rValue = model->BSIM4v5peu; return(OK); case BSIM4v5_MOD_PVFB: value->rValue = model->BSIM4v5pvfb; return(OK); case BSIM4v5_MOD_PCGSL: value->rValue = model->BSIM4v5pcgsl; return(OK); case BSIM4v5_MOD_PCGDL: value->rValue = model->BSIM4v5pcgdl; return(OK); case BSIM4v5_MOD_PCKAPPAS: value->rValue = model->BSIM4v5pckappas; return(OK); case BSIM4v5_MOD_PCKAPPAD: value->rValue = model->BSIM4v5pckappad; return(OK); case BSIM4v5_MOD_PCF: value->rValue = model->BSIM4v5pcf; return(OK); case BSIM4v5_MOD_PCLC: value->rValue = model->BSIM4v5pclc; return(OK); case BSIM4v5_MOD_PCLE: value->rValue = model->BSIM4v5pcle; return(OK); case BSIM4v5_MOD_PVFBCV: value->rValue = model->BSIM4v5pvfbcv; return(OK); case BSIM4v5_MOD_PACDE: value->rValue = model->BSIM4v5pacde; return(OK); case BSIM4v5_MOD_PMOIN: value->rValue = model->BSIM4v5pmoin; return(OK); case BSIM4v5_MOD_PNOFF: value->rValue = model->BSIM4v5pnoff; return(OK); case BSIM4v5_MOD_PVOFFCV: value->rValue = model->BSIM4v5pvoffcv; return(OK); case BSIM4v5_MOD_PVFBSDOFF: value->rValue = model->BSIM4v5pvfbsdoff; return(OK); case BSIM4v5_MOD_PTVFBSDOFF: value->rValue = model->BSIM4v5ptvfbsdoff; return(OK); case BSIM4v5_MOD_TNOM : value->rValue = model->BSIM4v5tnom; return(OK); case BSIM4v5_MOD_CGSO: value->rValue = model->BSIM4v5cgso; return(OK); case BSIM4v5_MOD_CGDO: value->rValue = model->BSIM4v5cgdo; return(OK); case BSIM4v5_MOD_CGBO: value->rValue = model->BSIM4v5cgbo; return(OK); case BSIM4v5_MOD_XPART: value->rValue = model->BSIM4v5xpart; return(OK); case BSIM4v5_MOD_RSH: value->rValue = model->BSIM4v5sheetResistance; return(OK); case BSIM4v5_MOD_JSS: value->rValue = model->BSIM4v5SjctSatCurDensity; return(OK); case BSIM4v5_MOD_JSWS: value->rValue = model->BSIM4v5SjctSidewallSatCurDensity; return(OK); case BSIM4v5_MOD_JSWGS: value->rValue = model->BSIM4v5SjctGateSidewallSatCurDensity; return(OK); case BSIM4v5_MOD_PBS: value->rValue = model->BSIM4v5SbulkJctPotential; return(OK); case BSIM4v5_MOD_MJS: value->rValue = model->BSIM4v5SbulkJctBotGradingCoeff; return(OK); case BSIM4v5_MOD_PBSWS: value->rValue = model->BSIM4v5SsidewallJctPotential; return(OK); case BSIM4v5_MOD_MJSWS: value->rValue = model->BSIM4v5SbulkJctSideGradingCoeff; return(OK); case BSIM4v5_MOD_CJS: value->rValue = model->BSIM4v5SunitAreaJctCap; return(OK); case BSIM4v5_MOD_CJSWS: value->rValue = model->BSIM4v5SunitLengthSidewallJctCap; return(OK); case BSIM4v5_MOD_PBSWGS: value->rValue = model->BSIM4v5SGatesidewallJctPotential; return(OK); case BSIM4v5_MOD_MJSWGS: value->rValue = model->BSIM4v5SbulkJctGateSideGradingCoeff; return(OK); case BSIM4v5_MOD_CJSWGS: value->rValue = model->BSIM4v5SunitLengthGateSidewallJctCap; return(OK); case BSIM4v5_MOD_NJS: value->rValue = model->BSIM4v5SjctEmissionCoeff; return(OK); case BSIM4v5_MOD_XTIS: value->rValue = model->BSIM4v5SjctTempExponent; return(OK); case BSIM4v5_MOD_JSD: value->rValue = model->BSIM4v5DjctSatCurDensity; return(OK); case BSIM4v5_MOD_JSWD: value->rValue = model->BSIM4v5DjctSidewallSatCurDensity; return(OK); case BSIM4v5_MOD_JSWGD: value->rValue = model->BSIM4v5DjctGateSidewallSatCurDensity; return(OK); case BSIM4v5_MOD_PBD: value->rValue = model->BSIM4v5DbulkJctPotential; return(OK); case BSIM4v5_MOD_MJD: value->rValue = model->BSIM4v5DbulkJctBotGradingCoeff; return(OK); case BSIM4v5_MOD_PBSWD: value->rValue = model->BSIM4v5DsidewallJctPotential; return(OK); case BSIM4v5_MOD_MJSWD: value->rValue = model->BSIM4v5DbulkJctSideGradingCoeff; return(OK); case BSIM4v5_MOD_CJD: value->rValue = model->BSIM4v5DunitAreaJctCap; return(OK); case BSIM4v5_MOD_CJSWD: value->rValue = model->BSIM4v5DunitLengthSidewallJctCap; return(OK); case BSIM4v5_MOD_PBSWGD: value->rValue = model->BSIM4v5DGatesidewallJctPotential; return(OK); case BSIM4v5_MOD_MJSWGD: value->rValue = model->BSIM4v5DbulkJctGateSideGradingCoeff; return(OK); case BSIM4v5_MOD_CJSWGD: value->rValue = model->BSIM4v5DunitLengthGateSidewallJctCap; return(OK); case BSIM4v5_MOD_NJD: value->rValue = model->BSIM4v5DjctEmissionCoeff; return(OK); case BSIM4v5_MOD_XTID: value->rValue = model->BSIM4v5DjctTempExponent; return(OK); case BSIM4v5_MOD_LINT: value->rValue = model->BSIM4v5Lint; return(OK); case BSIM4v5_MOD_LL: value->rValue = model->BSIM4v5Ll; return(OK); case BSIM4v5_MOD_LLC: value->rValue = model->BSIM4v5Llc; return(OK); case BSIM4v5_MOD_LLN: value->rValue = model->BSIM4v5Lln; return(OK); case BSIM4v5_MOD_LW: value->rValue = model->BSIM4v5Lw; return(OK); case BSIM4v5_MOD_LWC: value->rValue = model->BSIM4v5Lwc; return(OK); case BSIM4v5_MOD_LWN: value->rValue = model->BSIM4v5Lwn; return(OK); case BSIM4v5_MOD_LWL: value->rValue = model->BSIM4v5Lwl; return(OK); case BSIM4v5_MOD_LWLC: value->rValue = model->BSIM4v5Lwlc; return(OK); case BSIM4v5_MOD_LMIN: value->rValue = model->BSIM4v5Lmin; return(OK); case BSIM4v5_MOD_LMAX: value->rValue = model->BSIM4v5Lmax; return(OK); case BSIM4v5_MOD_WINT: value->rValue = model->BSIM4v5Wint; return(OK); case BSIM4v5_MOD_WL: value->rValue = model->BSIM4v5Wl; return(OK); case BSIM4v5_MOD_WLC: value->rValue = model->BSIM4v5Wlc; return(OK); case BSIM4v5_MOD_WLN: value->rValue = model->BSIM4v5Wln; return(OK); case BSIM4v5_MOD_WW: value->rValue = model->BSIM4v5Ww; return(OK); case BSIM4v5_MOD_WWC: value->rValue = model->BSIM4v5Wwc; return(OK); case BSIM4v5_MOD_WWN: value->rValue = model->BSIM4v5Wwn; return(OK); case BSIM4v5_MOD_WWL: value->rValue = model->BSIM4v5Wwl; return(OK); case BSIM4v5_MOD_WWLC: value->rValue = model->BSIM4v5Wwlc; return(OK); case BSIM4v5_MOD_WMIN: value->rValue = model->BSIM4v5Wmin; return(OK); case BSIM4v5_MOD_WMAX: value->rValue = model->BSIM4v5Wmax; return(OK); /* stress effect */ case BSIM4v5_MOD_SAREF: value->rValue = model->BSIM4v5saref; return(OK); case BSIM4v5_MOD_SBREF: value->rValue = model->BSIM4v5sbref; return(OK); case BSIM4v5_MOD_WLOD: value->rValue = model->BSIM4v5wlod; return(OK); case BSIM4v5_MOD_KU0: value->rValue = model->BSIM4v5ku0; return(OK); case BSIM4v5_MOD_KVSAT: value->rValue = model->BSIM4v5kvsat; return(OK); case BSIM4v5_MOD_KVTH0: value->rValue = model->BSIM4v5kvth0; return(OK); case BSIM4v5_MOD_TKU0: value->rValue = model->BSIM4v5tku0; return(OK); case BSIM4v5_MOD_LLODKU0: value->rValue = model->BSIM4v5llodku0; return(OK); case BSIM4v5_MOD_WLODKU0: value->rValue = model->BSIM4v5wlodku0; return(OK); case BSIM4v5_MOD_LLODVTH: value->rValue = model->BSIM4v5llodvth; return(OK); case BSIM4v5_MOD_WLODVTH: value->rValue = model->BSIM4v5wlodvth; return(OK); case BSIM4v5_MOD_LKU0: value->rValue = model->BSIM4v5lku0; return(OK); case BSIM4v5_MOD_WKU0: value->rValue = model->BSIM4v5wku0; return(OK); case BSIM4v5_MOD_PKU0: value->rValue = model->BSIM4v5pku0; return(OK); case BSIM4v5_MOD_LKVTH0: value->rValue = model->BSIM4v5lkvth0; return(OK); case BSIM4v5_MOD_WKVTH0: value->rValue = model->BSIM4v5wkvth0; return(OK); case BSIM4v5_MOD_PKVTH0: value->rValue = model->BSIM4v5pkvth0; return(OK); case BSIM4v5_MOD_STK2: value->rValue = model->BSIM4v5stk2; return(OK); case BSIM4v5_MOD_LODK2: value->rValue = model->BSIM4v5lodk2; return(OK); case BSIM4v5_MOD_STETA0: value->rValue = model->BSIM4v5steta0; return(OK); case BSIM4v5_MOD_LODETA0: value->rValue = model->BSIM4v5lodeta0; return(OK); /* Well Proximity Effect */ case BSIM4v5_MOD_WEB: value->rValue = model->BSIM4v5web; return(OK); case BSIM4v5_MOD_WEC: value->rValue = model->BSIM4v5wec; return(OK); case BSIM4v5_MOD_KVTH0WE: value->rValue = model->BSIM4v5kvth0we; return(OK); case BSIM4v5_MOD_K2WE: value->rValue = model->BSIM4v5k2we; return(OK); case BSIM4v5_MOD_KU0WE: value->rValue = model->BSIM4v5ku0we; return(OK); case BSIM4v5_MOD_SCREF: value->rValue = model->BSIM4v5scref; return(OK); case BSIM4v5_MOD_WPEMOD: value->rValue = model->BSIM4v5wpemod; return(OK); case BSIM4v5_MOD_LKVTH0WE: value->rValue = model->BSIM4v5lkvth0we; return(OK); case BSIM4v5_MOD_LK2WE: value->rValue = model->BSIM4v5lk2we; return(OK); case BSIM4v5_MOD_LKU0WE: value->rValue = model->BSIM4v5lku0we; return(OK); case BSIM4v5_MOD_WKVTH0WE: value->rValue = model->BSIM4v5wkvth0we; return(OK); case BSIM4v5_MOD_WK2WE: value->rValue = model->BSIM4v5wk2we; return(OK); case BSIM4v5_MOD_WKU0WE: value->rValue = model->BSIM4v5wku0we; return(OK); case BSIM4v5_MOD_PKVTH0WE: value->rValue = model->BSIM4v5pkvth0we; return(OK); case BSIM4v5_MOD_PK2WE: value->rValue = model->BSIM4v5pk2we; return(OK); case BSIM4v5_MOD_PKU0WE: value->rValue = model->BSIM4v5pku0we; return(OK); case BSIM4v5_MOD_NOIA: value->rValue = model->BSIM4v5oxideTrapDensityA; return(OK); case BSIM4v5_MOD_NOIB: value->rValue = model->BSIM4v5oxideTrapDensityB; return(OK); case BSIM4v5_MOD_NOIC: value->rValue = model->BSIM4v5oxideTrapDensityC; return(OK); case BSIM4v5_MOD_EM: value->rValue = model->BSIM4v5em; return(OK); case BSIM4v5_MOD_EF: value->rValue = model->BSIM4v5ef; return(OK); case BSIM4v5_MOD_AF: value->rValue = model->BSIM4v5af; return(OK); case BSIM4v5_MOD_KF: value->rValue = model->BSIM4v5kf; return(OK); case BSIM4v5_MOD_VGS_MAX: value->rValue = model->BSIM4v5vgsMax; return(OK); case BSIM4v5_MOD_VGD_MAX: value->rValue = model->BSIM4v5vgdMax; return(OK); case BSIM4v5_MOD_VGB_MAX: value->rValue = model->BSIM4v5vgbMax; return(OK); case BSIM4v5_MOD_VDS_MAX: value->rValue = model->BSIM4v5vdsMax; return(OK); case BSIM4v5_MOD_VBS_MAX: value->rValue = model->BSIM4v5vbsMax; return(OK); case BSIM4v5_MOD_VBD_MAX: value->rValue = model->BSIM4v5vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v5/b4v5del.c0000644000265600020320000000214712264261473021142 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4del.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM4v5delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM4v5instance **fast = (BSIM4v5instance**)inInst; BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance **prev = NULL; BSIM4v5instance *here; for (; model ; model = model->BSIM4v5nextModel) { prev = &(model->BSIM4v5instances); for (here = *prev; here ; here = *prev) { if (here->BSIM4v5name == name || (fast && here==*fast)) { *prev= here->BSIM4v5nextInstance; FREE(here); return(OK); } prev = &(here->BSIM4v5nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5pzld.c0000644000265600020320000010412612264261473021347 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4pzld.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim4v5def.h" #include "ngspice/suffix.h" int BSIM4v5pzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0; double xcgmbb=0.0, xcbgmb=0.0; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; struct bsim4v5SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here!= NULL; here = here->BSIM4v5nextInstance) { pParam = here->pParam; capbd = here->BSIM4v5capbd; capbs = here->BSIM4v5capbs; cgso = here->BSIM4v5cgso; cgdo = here->BSIM4v5cgdo; cgbo = pParam->BSIM4v5cgbo; if (here->BSIM4v5mode >= 0) { Gm = here->BSIM4v5gm; Gmbs = here->BSIM4v5gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -(here->BSIM4v5gbds); gbbsp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = here->BSIM4v5gbgs; gbdpdp = here->BSIM4v5gbds; gbdpb = here->BSIM4v5gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg; gIstotd = here->BSIM4v5gIgcsd; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcss; gIstotb = here->BSIM4v5gIgcsb; gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcdg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcdd; gIdtots = here->BSIM4v5gIgcds; gIdtotb = here->BSIM4v5gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbd; gIbtots = here->BSIM4v5gIgbs; gIbtotb = here->BSIM4v5gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); else if (here->BSIM4v5rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgd * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgs * T0; gcrgb = here->BSIM4v5gcrgb * T0; gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v5acnqsMod == 0) { if (here->BSIM4v5rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v5cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v5cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v5cggb; xcgdb = here->BSIM4v5cgdb; xcgsb = here->BSIM4v5cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v5cdgb; xcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb); xcbgb = here->BSIM4v5cbgb; } else { xcggb = here->BSIM4v5cggb + cgdo + cgso + pParam->BSIM4v5cgbo; xcgdb = here->BSIM4v5cgdb - cgdo; xcgsb = here->BSIM4v5cgsb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v5cdgb - cgdo; xcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb + cgso); xcbgb = here->BSIM4v5cbgb - pParam->BSIM4v5cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v5cddb + here->BSIM4v5capbd + cgdo; xcdsb = here->BSIM4v5cdsb; xcsdb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb + here->BSIM4v5cddb); xcssb = here->BSIM4v5capbs + cgso - (here->BSIM4v5cgsb + here->BSIM4v5cbsb + here->BSIM4v5cdsb); if (!here->BSIM4v5rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v5cbdb - here->BSIM4v5capbd; xcbsb = here->BSIM4v5cbsb - here->BSIM4v5capbs; xcdbdb = 0.0; } else { xcdbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb + here->BSIM4v5cdsb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) + here->BSIM4v5capbs; xcbdb = here->BSIM4v5cbdb; xcbsb = here->BSIM4v5cbsb; xcdbdb = -here->BSIM4v5capbd; xcsbsb = -here->BSIM4v5capbs; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v5gtg; xgtd = here->BSIM4v5gtd; xgts = here->BSIM4v5gts; xgtb = here->BSIM4v5gtb; xcqgb = here->BSIM4v5cqgb; xcqdb = here->BSIM4v5cqdb; xcqsb = here->BSIM4v5cqsb; xcqbb = here->BSIM4v5cqbb; CoxWL = model->BSIM4v5coxe * here->pParam->BSIM4v5weffCV * here->BSIM4v5nf * here->pParam->BSIM4v5leffCV; qcheq = -(here->BSIM4v5qgate + here->BSIM4v5qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v5xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v5xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM4v5qdrn / qcheq; Cdd = here->BSIM4v5cddb; Csd = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + here->BSIM4v5cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v5cdgb; Csg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + here->BSIM4v5cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v5cdsb; Css = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + here->BSIM4v5cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM4v5gm; Gmbs = -here->BSIM4v5gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -(here->BSIM4v5gbds); gbbdp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v5gbgs; gbspsp = here->BSIM4v5gbds; gbspb = here->BSIM4v5gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcdg; gIstotd = here->BSIM4v5gIgcds; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcdd; gIstotb = here->BSIM4v5gIgcdb; gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcss; gIdtots = here->BSIM4v5gIgcsd; gIdtotb = here->BSIM4v5gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbs; gIbtots = here->BSIM4v5gIgbd; gIbtotb = here->BSIM4v5gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); else if (here->BSIM4v5rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgs * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgd * T0; gcrgb = here->BSIM4v5gcrgb * T0; gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v5acnqsMod == 0) { if (here->BSIM4v5rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v5cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v5cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v5cggb; xcgdb = here->BSIM4v5cgsb; xcgsb = here->BSIM4v5cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb); xcsgb = here->BSIM4v5cdgb; xcbgb = here->BSIM4v5cbgb; } else { xcggb = here->BSIM4v5cggb + cgdo + cgso + pParam->BSIM4v5cgbo; xcgdb = here->BSIM4v5cgsb - cgdo; xcgsb = here->BSIM4v5cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb + cgdo); xcsgb = here->BSIM4v5cdgb - cgso; xcbgb = here->BSIM4v5cbgb - pParam->BSIM4v5cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v5capbd + cgdo - (here->BSIM4v5cgsb + here->BSIM4v5cbsb + here->BSIM4v5cdsb); xcdsb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb + here->BSIM4v5cddb); xcsdb = here->BSIM4v5cdsb; xcssb = here->BSIM4v5cddb + here->BSIM4v5capbs + cgso; if (!here->BSIM4v5rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v5cbsb - here->BSIM4v5capbd; xcbsb = here->BSIM4v5cbdb - here->BSIM4v5capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) + here->BSIM4v5capbd; xcsbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb + here->BSIM4v5cdsb); xcbdb = here->BSIM4v5cbsb; xcbsb = here->BSIM4v5cbdb; xcdbdb = -here->BSIM4v5capbd; xcsbsb = -here->BSIM4v5capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v5gtg; xgtd = here->BSIM4v5gts; xgts = here->BSIM4v5gtd; xgtb = here->BSIM4v5gtb; xcqgb = here->BSIM4v5cqgb; xcqdb = here->BSIM4v5cqsb; xcqsb = here->BSIM4v5cqdb; xcqbb = here->BSIM4v5cqbb; CoxWL = model->BSIM4v5coxe * here->pParam->BSIM4v5weffCV * here->BSIM4v5nf * here->pParam->BSIM4v5leffCV; qcheq = -(here->BSIM4v5qgate + here->BSIM4v5qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v5xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v5xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM4v5qdrn / qcheq; Css = here->BSIM4v5cddb; Cds = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + here->BSIM4v5cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v5cdgb; Cdg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + here->BSIM4v5cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v5cdsb; Cdd = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + here->BSIM4v5cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } if (model->BSIM4v5rdsMod == 1) { gstot = here->BSIM4v5gstot; gstotd = here->BSIM4v5gstotd; gstotg = here->BSIM4v5gstotg; gstots = here->BSIM4v5gstots - gstot; gstotb = here->BSIM4v5gstotb; gdtot = here->BSIM4v5gdtot; gdtotd = here->BSIM4v5gdtotd - gdtot; gdtotg = here->BSIM4v5gdtotg; gdtots = here->BSIM4v5gdtots; gdtotb = here->BSIM4v5gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } T1 = *(ckt->CKTstate0 + here->BSIM4v5qdef) * here->BSIM4v5gtau; gds = here->BSIM4v5gds; /* * Loading PZ matrix */ m = here->BSIM4v5m; if (!model->BSIM4v5rdsMod) { gdpr = here->BSIM4v5drainConductance; gspr = here->BSIM4v5sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v5rbodyMod) { gjbd = here->BSIM4v5gbd; gjbs = here->BSIM4v5gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v5grgeltd; if (here->BSIM4v5rgateMod == 1) { *(here->BSIM4v5GEgePtr) += m * geltd; *(here->BSIM4v5GPgePtr) -= m * geltd; *(here->BSIM4v5GEgpPtr) -= m * geltd; *(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v5GPgpPtr) += m * (geltd - xgtg + gIgtotg); *(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v5GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v5GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v5GPbpPtr) -= m * (xgtb - gIgtotb); } else if (here->BSIM4v5rgateMod == 2) { *(here->BSIM4v5GEgePtr) += m * gcrg; *(here->BSIM4v5GEgpPtr) += m * gcrgg; *(here->BSIM4v5GEdpPtr) += m * gcrgd; *(here->BSIM4v5GEspPtr) += m * gcrgs; *(here->BSIM4v5GEbpPtr) += m * gcrgb; *(here->BSIM4v5GPgePtr) -= m * gcrg; *(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v5GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v5GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v5GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v5GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); } else if (here->BSIM4v5rgateMod == 3) { *(here->BSIM4v5GEgePtr) += m * geltd; *(here->BSIM4v5GEgmPtr) -= m * geltd; *(here->BSIM4v5GMgePtr) -= m * geltd; *(here->BSIM4v5GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v5GMgmPtr ) += m * xcgmgmb * s->real; *(here->BSIM4v5GMgmPtr +1) += m * xcgmgmb * s->imag; *(here->BSIM4v5GMdpPtr) += m * gcrgd; *(here->BSIM4v5GMdpPtr ) += m * xcgmdb * s->real; *(here->BSIM4v5GMdpPtr +1) += m * xcgmdb * s->imag; *(here->BSIM4v5GMgpPtr) += m * gcrgg; *(here->BSIM4v5GMspPtr) += m * gcrgs; *(here->BSIM4v5GMspPtr ) += m * xcgmsb * s->real; *(here->BSIM4v5GMspPtr +1) += m * xcgmsb * s->imag; *(here->BSIM4v5GMbpPtr) += m * gcrgb; *(here->BSIM4v5GMbpPtr ) += m * xcgmbb * s->real; *(here->BSIM4v5GMbpPtr +1) += m * xcgmbb * s->imag; *(here->BSIM4v5DPgmPtr ) += m * xcdgmb * s->real; *(here->BSIM4v5DPgmPtr +1) += m * xcdgmb * s->imag; *(here->BSIM4v5GPgmPtr) -= m * gcrg; *(here->BSIM4v5SPgmPtr ) += m * xcsgmb * s->real; *(here->BSIM4v5SPgmPtr +1) += m * xcsgmb * s->imag; *(here->BSIM4v5BPgmPtr ) += m * xcbgmb * s->real; *(here->BSIM4v5BPgmPtr +1) += m * xcbgmb * s->imag; *(here->BSIM4v5GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v5GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v5GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v5GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); *(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; } else { *(here->BSIM4v5GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v5GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v5GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v5GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v5GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v5GPgpPtr) -= m * (xgtg - gIgtotg); *(here->BSIM4v5GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v5GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v5GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v5GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v5GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v5GPbpPtr) -= m * (xgtb - gIgtotb); } if (model->BSIM4v5rdsMod) { (*(here->BSIM4v5DgpPtr) += m * gdtotg); (*(here->BSIM4v5DspPtr) += m * gdtots); (*(here->BSIM4v5DbpPtr) += m * gdtotb); (*(here->BSIM4v5SdpPtr) += m * gstotd); (*(here->BSIM4v5SgpPtr) += m * gstotg); (*(here->BSIM4v5SbpPtr) += m * gstotb); } *(here->BSIM4v5DPdpPtr ) += m * xcddb * s->real; *(here->BSIM4v5DPdpPtr +1) += m * xcddb * s->imag; *(here->BSIM4v5DPdpPtr) += m * (gdpr + gds + here->BSIM4v5gbd - gdtotd + RevSum + gbdpdp - gIdtotd + dxpart * xgtd + T1 * ddxpart_dVd); *(here->BSIM4v5DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v5DPgpPtr ) += m * xcdgb * s->real; *(here->BSIM4v5DPgpPtr +1) += m * xcdgb * s->imag; *(here->BSIM4v5DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + T1 * ddxpart_dVg + dxpart * xgtg); *(here->BSIM4v5DPspPtr ) += m * xcdsb * s->real; *(here->BSIM4v5DPspPtr +1) += m * xcdsb * s->imag; *(here->BSIM4v5DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots - T1 * ddxpart_dVs - dxpart * xgts); *(here->BSIM4v5DPbpPtr ) += m * xcdbb * s->real; *(here->BSIM4v5DPbpPtr +1) += m * xcdbb * s->imag; *(here->BSIM4v5DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * xgtb); *(here->BSIM4v5DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v5DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v5SPdpPtr ) += m * xcsdb * s->real; *(here->BSIM4v5SPdpPtr +1) += m * xcsdb * s->imag; *(here->BSIM4v5SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd - T1 * dsxpart_dVd - sxpart * xgtd); *(here->BSIM4v5SPgpPtr ) += m * xcsgb * s->real; *(here->BSIM4v5SPgpPtr +1) += m * xcsgb * s->imag; *(here->BSIM4v5SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg - T1 * dsxpart_dVg - sxpart * xgtg); *(here->BSIM4v5SPspPtr ) += m * xcssb * s->real; *(here->BSIM4v5SPspPtr +1) += m * xcssb * s->imag; *(here->BSIM4v5SPspPtr) += m * (gspr + gds + here->BSIM4v5gbs - gIstots - gstots + FwdSum + gbspsp + sxpart * xgts + T1 * dsxpart_dVs); *(here->BSIM4v5SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v5SPbpPtr ) += m * xcsbb * s->real; *(here->BSIM4v5SPbpPtr +1) += m * xcsbb * s->imag; *(here->BSIM4v5SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb - T1 * dsxpart_dVb - sxpart * xgtb); *(here->BSIM4v5SspPtr) -= m * (gspr - gstots); *(here->BSIM4v5SsPtr) += m * (gspr + gstot); *(here->BSIM4v5BPdpPtr ) += m * xcbdb * s->real; *(here->BSIM4v5BPdpPtr +1) += m * xcbdb * s->imag; *(here->BSIM4v5BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v5BPgpPtr ) += m * xcbgb * s->real; *(here->BSIM4v5BPgpPtr +1) += m * xcbgb * s->imag; *(here->BSIM4v5BPgpPtr) -= m * (here->BSIM4v5gbgs + gIbtotg); *(here->BSIM4v5BPspPtr ) += m * xcbsb * s->real; *(here->BSIM4v5BPspPtr +1) += m * xcbsb * s->imag; *(here->BSIM4v5BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v5BPbpPtr ) += m * xcbbb * s->real; *(here->BSIM4v5BPbpPtr +1) += m * xcbbb * s->imag; *(here->BSIM4v5BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v5gbbs - gIbtotb); ggidld = here->BSIM4v5ggidld; ggidlg = here->BSIM4v5ggidlg; ggidlb = here->BSIM4v5ggidlb; ggislg = here->BSIM4v5ggislg; ggisls = here->BSIM4v5ggisls; ggislb = here->BSIM4v5ggislb; /* stamp gidl */ (*(here->BSIM4v5DPdpPtr) += m * ggidld); (*(here->BSIM4v5DPgpPtr) += m * ggidlg); (*(here->BSIM4v5DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v5DPbpPtr) += m * ggidlb); (*(here->BSIM4v5BPdpPtr) -= m * ggidld); (*(here->BSIM4v5BPgpPtr) -= m * ggidlg); (*(here->BSIM4v5BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v5BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v5SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v5SPgpPtr) += m * ggislg); (*(here->BSIM4v5SPspPtr) += m * ggisls); (*(here->BSIM4v5SPbpPtr) += m * ggislb); (*(here->BSIM4v5BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v5BPgpPtr) -= m * ggislg); (*(here->BSIM4v5BPspPtr) -= m * ggisls); (*(here->BSIM4v5BPbpPtr) -= m * ggislb); if (here->BSIM4v5rbodyMod) { (*(here->BSIM4v5DPdbPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v5DPdbPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v5DPdbPtr) -= m * here->BSIM4v5gbd); (*(here->BSIM4v5SPsbPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v5SPsbPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v5SPsbPtr) -= m * here->BSIM4v5gbs); (*(here->BSIM4v5DBdpPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v5DBdpPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v5DBdpPtr) -= m * here->BSIM4v5gbd); (*(here->BSIM4v5DBdbPtr ) -= m * xcdbdb * s->real); (*(here->BSIM4v5DBdbPtr +1) -= m * xcdbdb * s->imag); (*(here->BSIM4v5DBdbPtr) += m * (here->BSIM4v5gbd + here->BSIM4v5grbpd + here->BSIM4v5grbdb)); (*(here->BSIM4v5DBbpPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5DBbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BPdbPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5BPbPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BPsbPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5BPbpPtr) += m * (here->BSIM4v5grbpd + here->BSIM4v5grbps + here->BSIM4v5grbpb)); /* WDL: (-here->BSIM4v5gbbs) already added to BPbpPtr */ (*(here->BSIM4v5SBspPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v5SBspPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v5SBspPtr) -= m * here->BSIM4v5gbs); (*(here->BSIM4v5SBbpPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5SBbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5SBsbPtr ) -= m * xcsbsb * s->real); (*(here->BSIM4v5SBsbPtr +1) -= m * xcsbsb * s->imag); (*(here->BSIM4v5SBsbPtr) += m * (here->BSIM4v5gbs + here->BSIM4v5grbps + here->BSIM4v5grbsb)); (*(here->BSIM4v5BdbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BbpPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BsbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5BbPtr) += m * (here->BSIM4v5grbsb + here->BSIM4v5grbdb + here->BSIM4v5grbpb)); } if (here->BSIM4v5acnqsMod) { *(here->BSIM4v5QqPtr ) += m * s->real * ScalingFactor; *(here->BSIM4v5QqPtr +1) += m * s->imag * ScalingFactor; *(here->BSIM4v5QgpPtr ) -= m * xcqgb * s->real; *(here->BSIM4v5QgpPtr +1) -= m * xcqgb * s->imag; *(here->BSIM4v5QdpPtr ) -= m * xcqdb * s->real; *(here->BSIM4v5QdpPtr +1) -= m * xcqdb * s->imag; *(here->BSIM4v5QbpPtr ) -= m * xcqbb * s->real; *(here->BSIM4v5QbpPtr +1) -= m * xcqbb * s->imag; *(here->BSIM4v5QspPtr ) -= m * xcqsb * s->real; *(here->BSIM4v5QspPtr +1) -= m * xcqsb * s->imag; *(here->BSIM4v5GPqPtr) -= m * here->BSIM4v5gtau; *(here->BSIM4v5DPqPtr) += m * dxpart * here->BSIM4v5gtau; *(here->BSIM4v5SPqPtr) += m * sxpart * here->BSIM4v5gtau; *(here->BSIM4v5QqPtr) += m * here->BSIM4v5gtau; *(here->BSIM4v5QgpPtr) += m * xgtg; *(here->BSIM4v5QdpPtr) += m * xgtd; *(here->BSIM4v5QbpPtr) += m * xgtb; *(here->BSIM4v5QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5trunc.c0000644000265600020320000000320012264261473021520 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4trunc.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here != NULL; here = here->BSIM4v5nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM4v5qb,ckt,timeStep); CKTterr(here->BSIM4v5qg,ckt,timeStep); CKTterr(here->BSIM4v5qd,ckt,timeStep); if (here->BSIM4v5trnqsMod) CKTterr(here->BSIM4v5qcdump,ckt,timeStep); if (here->BSIM4v5rbodyMod) { CKTterr(here->BSIM4v5qbs,ckt,timeStep); CKTterr(here->BSIM4v5qbd,ckt,timeStep); } if (here->BSIM4v5rgateMod == 3) CKTterr(here->BSIM4v5qgmid,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM4v5name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5.c0000644000265600020320000020002712264261473020452 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim4v5def.h" #include "ngspice/suffix.h" IFparm BSIM4v5pTable[] = { /* parameters */ IOP( "l", BSIM4v5_L, IF_REAL , "Length"), IOP( "w", BSIM4v5_W, IF_REAL , "Width"), IOP( "m", BSIM4v5_M, IF_REAL , "Separate Parallel multiplier"), IOP( "nf", BSIM4v5_NF, IF_REAL , "Number of fingers"), IOP( "sa", BSIM4v5_SA, IF_REAL , "distance between OD edge to poly of one side "), IOP( "sb", BSIM4v5_SB, IF_REAL , "distance between OD edge to poly of the other side"), IOP( "sd", BSIM4v5_SD, IF_REAL , "distance between neighbour fingers"), IOP( "sca", BSIM4v5_SCA, IF_REAL , "Integral of the first distribution function for scattered well dopant"), IOP( "scb", BSIM4v5_SCB, IF_REAL , "Integral of the second distribution function for scattered well dopant"), IOP( "scc", BSIM4v5_SCC, IF_REAL , "Integral of the third distribution function for scattered well dopant"), IOP( "sc", BSIM4v5_SCA, IF_REAL , "Distance to a single well edge "), IOP( "min", BSIM4v5_MIN, IF_INTEGER , "Minimize either D or S"), IOP( "ad", BSIM4v5_AD, IF_REAL , "Drain area"), IOP( "as", BSIM4v5_AS, IF_REAL , "Source area"), IOP( "pd", BSIM4v5_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM4v5_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM4v5_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM4v5_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM4v5_OFF, IF_FLAG , "Device is initially off"), IOP( "rbdb", BSIM4v5_RBDB, IF_REAL , "Body resistance"), IOP( "rbsb", BSIM4v5_RBSB, IF_REAL , "Body resistance"), IOP( "rbpb", BSIM4v5_RBPB, IF_REAL , "Body resistance"), IOP( "rbps", BSIM4v5_RBPS, IF_REAL , "Body resistance"), IOP( "rbpd", BSIM4v5_RBPD, IF_REAL , "Body resistance"), IOP( "delvto", BSIM4v5_DELVTO, IF_REAL , "Zero bias threshold voltage variation"), IOP( "xgw", BSIM4v5_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "ngcon", BSIM4v5_NGCON, IF_REAL, "Number of gate contacts"), IOP( "trnqsmod", BSIM4v5_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v5_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "rbodymod", BSIM4v5_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v5_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), IOP( "geomod", BSIM4v5_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4v5_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IP( "ic", BSIM4v5_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM4v5_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM4v5_GM, IF_REAL, "Gm"), OP( "gds", BSIM4v5_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM4v5_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM4v5_VON, IF_REAL, "Vth"), OP( "id", BSIM4v5_CD, IF_REAL, "Ids"), OP( "ibd", BSIM4v5_CBD, IF_REAL, "Ibd"), OP( "ibs", BSIM4v5_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM4v5_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM4v5_GBS, IF_REAL, "gbs"), OP( "isub", BSIM4v5_CSUB, IF_REAL, "Isub"), OP( "igidl", BSIM4v5_IGIDL, IF_REAL, "Igidl"), OP( "igisl", BSIM4v5_IGISL, IF_REAL, "Igisl"), OP( "igs", BSIM4v5_IGS, IF_REAL, "Igs"), OP( "igd", BSIM4v5_IGD, IF_REAL, "Igd"), OP( "igb", BSIM4v5_IGB, IF_REAL, "Igb"), OP( "igcs", BSIM4v5_IGCS, IF_REAL, "Igcs"), OP( "igcd", BSIM4v5_IGCD, IF_REAL, "Igcd"), OP( "vbs", BSIM4v5_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM4v5_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM4v5_VDS, IF_REAL, "Vds"), OP( "cgg", BSIM4v5_CGGB, IF_REAL, "Cggb"), OP( "cgs", BSIM4v5_CGSB, IF_REAL, "Cgsb"), OP( "cgd", BSIM4v5_CGDB, IF_REAL, "Cgdb"), OP( "cbg", BSIM4v5_CBGB, IF_REAL, "Cbgb"), OP( "cbd", BSIM4v5_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM4v5_CBSB, IF_REAL, "Cbsb"), OP( "cdg", BSIM4v5_CDGB, IF_REAL, "Cdgb"), OP( "cdd", BSIM4v5_CDDB, IF_REAL, "Cddb"), OP( "cds", BSIM4v5_CDSB, IF_REAL, "Cdsb"), OP( "csg", BSIM4v5_CSGB, IF_REAL, "Csgb"), OP( "csd", BSIM4v5_CSDB, IF_REAL, "Csdb"), OP( "css", BSIM4v5_CSSB, IF_REAL, "Cssb"), OP( "cgb", BSIM4v5_CGBB, IF_REAL, "Cgbb"), OP( "cdb", BSIM4v5_CDBB, IF_REAL, "Cdbb"), OP( "csb", BSIM4v5_CSBB, IF_REAL, "Csbb"), OP( "cbb", BSIM4v5_CBBB, IF_REAL, "Cbbb"), OP( "capbd", BSIM4v5_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM4v5_CAPBS, IF_REAL, "Capbs"), OP( "qg", BSIM4v5_QG, IF_REAL, "Qgate"), OP( "qb", BSIM4v5_QB, IF_REAL, "Qbulk"), OP( "qd", BSIM4v5_QD, IF_REAL, "Qdrain"), OP( "qs", BSIM4v5_QS, IF_REAL, "Qsource"), OP( "qinv", BSIM4v5_QINV, IF_REAL, "Qinversion"), OP( "qdef", BSIM4v5_QDEF, IF_REAL, "Qdef"), OP( "gcrg", BSIM4v5_GCRG, IF_REAL, "Gcrg"), OP( "gtau", BSIM4v5_GTAU, IF_REAL, "Gtau"), }; IFparm BSIM4v5mPTable[] = { /* model parameters */ IOP( "capmod", BSIM4v5_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "diomod", BSIM4v5_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), IOP( "rdsmod", BSIM4v5_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), IOP( "trnqsmod", BSIM4v5_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v5_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "mobmod", BSIM4v5_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "rbodymod", BSIM4v5_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v5_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), IOP( "permod", BSIM4v5_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), IOP( "geomod", BSIM4v5_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4v5_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IOP( "fnoimod", BSIM4v5_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), IOP( "tnoimod", BSIM4v5_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), IOP( "igcmod", BSIM4v5_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), IOP( "igbmod", BSIM4v5_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), IOP( "tempmod", BSIM4v5_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), IOP( "paramchk", BSIM4v5_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM4v5_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM4v5_MOD_VERSION, IF_STRING, "parameter for model version"), IOP( "toxe", BSIM4v5_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), IOP( "toxp", BSIM4v5_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), IOP( "toxm", BSIM4v5_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), IOP( "toxref", BSIM4v5_MOD_TOXREF, IF_REAL, "Target tox value"), IOP( "dtox", BSIM4v5_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), IOP( "epsrox", BSIM4v5_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), IOP( "cdsc", BSIM4v5_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM4v5_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM4v5_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM4v5_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM4v5_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM4v5_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM4v5_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM4v5_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM4v5_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM4v5_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM4v5_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM4v5_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM4v5_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM4v5_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "ndep", BSIM4v5_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), IOP( "nsd", BSIM4v5_MOD_NSD, IF_REAL, "S/D doping concentration"), IOP( "phin", BSIM4v5_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), IOP( "ngate", BSIM4v5_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM4v5_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM4v5_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM4v5_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM4v5_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM4v5_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM4v5_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM4v5_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM4v5_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM4v5_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM4v5_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM4v5_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM4v5_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM4v5_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "dvtp0", BSIM4v5_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), IOP( "dvtp1", BSIM4v5_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), IOP( "lpe0", BSIM4v5_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), IOP( "lpeb", BSIM4v5_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), IOP( "dvt0", BSIM4v5_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM4v5_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM4v5_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM4v5_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM4v5_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM4v5_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM4v5_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM4v5_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM4v5_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM4v5_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM4v5_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM4v5_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM4v5_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM4v5_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM4v5_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM4v5_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "ud", BSIM4v5_MOD_UD, IF_REAL, "Coulomb scattering factor of mobility"), IOP( "ud1", BSIM4v5_MOD_UD1, IF_REAL, "Temperature coefficient of ud"), IOP( "up", BSIM4v5_MOD_UP, IF_REAL, "Channel length linear factor of mobility"), IOP( "lp", BSIM4v5_MOD_LP, IF_REAL, "Channel length exponential factor of mobility"), IOP( "u0", BSIM4v5_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "eu", BSIM4v5_MOD_EU, IF_REAL, "Mobility exponent"), IOP( "ute", BSIM4v5_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM4v5_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "minv", BSIM4v5_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), IOP( "voffl", BSIM4v5_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), IOP( "tnom", BSIM4v5_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM4v5_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM4v5_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM4v5_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM4v5_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", BSIM4v5_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM4v5_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM4v5_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "rdswmin", BSIM4v5_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), IOP( "rsw", BSIM4v5_MOD_RSW, IF_REAL, "Source resistance per width"), IOP( "rdw", BSIM4v5_MOD_RDW, IF_REAL, "Drain resistance per width"), IOP( "rdwmin", BSIM4v5_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), IOP( "rswmin", BSIM4v5_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), IOP( "prwg", BSIM4v5_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM4v5_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM4v5_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM4v5_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM4v5_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM4v5_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM4v5_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM4v5_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM4v5_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "fprout", BSIM4v5_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), IOP( "pdits", BSIM4v5_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), IOP( "pditsl", BSIM4v5_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), IOP( "pditsd", BSIM4v5_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), IOP( "pscbe1", BSIM4v5_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM4v5_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM4v5_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "jss", BSIM4v5_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), IOP( "jsws", BSIM4v5_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), IOP( "jswgs", BSIM4v5_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), IOP( "pbs", BSIM4v5_MOD_PBS, IF_REAL, "Source junction built-in potential"), IOP( "njs", BSIM4v5_MOD_NJS, IF_REAL, "Source junction emission coefficient"), IOP( "xtis", BSIM4v5_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), IOP( "mjs", BSIM4v5_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), IOP( "pbsws", BSIM4v5_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), IOP( "mjsws", BSIM4v5_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), IOP( "pbswgs", BSIM4v5_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgs", BSIM4v5_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjs", BSIM4v5_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), IOP( "cjsws", BSIM4v5_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), IOP( "cjswgs", BSIM4v5_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), IOP( "jsd", BSIM4v5_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), IOP( "jswd", BSIM4v5_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), IOP( "jswgd", BSIM4v5_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), IOP( "pbd", BSIM4v5_MOD_PBD, IF_REAL, "Drain junction built-in potential"), IOP( "njd", BSIM4v5_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), IOP( "xtid", BSIM4v5_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), IOP( "mjd", BSIM4v5_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), IOP( "pbswd", BSIM4v5_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), IOP( "mjswd", BSIM4v5_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), IOP( "pbswgd", BSIM4v5_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgd", BSIM4v5_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjd", BSIM4v5_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), IOP( "cjswd", BSIM4v5_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), IOP( "cjswgd", BSIM4v5_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), IOP( "vfbcv", BSIM4v5_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM4v5_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "tpb", BSIM4v5_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM4v5_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM4v5_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM4v5_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM4v5_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM4v5_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM4v5_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM4v5_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM4v5_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM4v5_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "dmcg", BSIM4v5_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), IOP( "dmci", BSIM4v5_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), IOP( "dmdg", BSIM4v5_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), IOP( "dmcgt", BSIM4v5_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), IOP( "xgw", BSIM4v5_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "xgl", BSIM4v5_MOD_XGL, IF_REAL, "Variation in Ldrawn"), IOP( "rshg", BSIM4v5_MOD_RSHG, IF_REAL, "Gate sheet resistance"), IOP( "ngcon", BSIM4v5_MOD_NGCON, IF_REAL, "Number of gate contacts"), IOP( "xrcrg1", BSIM4v5_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), IOP( "xrcrg2", BSIM4v5_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), IOP( "lambda", BSIM4v5_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), IOP( "vtl", BSIM4v5_MOD_VTL, IF_REAL, " thermal velocity"), IOP( "lc", BSIM4v5_MOD_LC, IF_REAL, " back scattering parameter"), IOP( "xn", BSIM4v5_MOD_XN, IF_REAL, " back scattering parameter"), IOP( "vfbsdoff", BSIM4v5_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), IOP( "tvfbsdoff", BSIM4v5_MOD_TVFBSDOFF, IF_REAL, "Temperature parameter for vfbsdoff"), IOP( "tvoff", BSIM4v5_MOD_TVOFF, IF_REAL, "Temperature parameter for voff"), IOP( "lintnoi", BSIM4v5_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), IOP( "lint", BSIM4v5_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM4v5_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM4v5_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM4v5_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM4v5_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM4v5_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM4v5_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM4v5_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM4v5_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM4v5_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM4v5_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM4v5_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM4v5_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM4v5_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM4v5_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM4v5_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM4v5_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM4v5_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM4v5_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM4v5_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM4v5_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM4v5_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM4v5_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM4v5_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM4v5_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM4v5_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM4v5_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM4v5_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM4v5_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappas", BSIM4v5_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), IOP( "ckappad", BSIM4v5_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), IOP( "cf", BSIM4v5_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM4v5_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM4v5_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM4v5_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM4v5_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "xw", BSIM4v5_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), IOP( "xl", BSIM4v5_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), IOP( "dlcig", BSIM4v5_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), IOP( "dwj", BSIM4v5_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), IOP( "alpha0", BSIM4v5_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM4v5_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM4v5_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "agidl", BSIM4v5_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), IOP( "bgidl", BSIM4v5_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), IOP( "cgidl", BSIM4v5_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), IOP( "egidl", BSIM4v5_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "aigc", BSIM4v5_MOD_AIGC, IF_REAL, "Parameter for Igc"), IOP( "bigc", BSIM4v5_MOD_BIGC, IF_REAL, "Parameter for Igc"), IOP( "cigc", BSIM4v5_MOD_CIGC, IF_REAL, "Parameter for Igc"), IOP( "aigsd", BSIM4v5_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "bigsd", BSIM4v5_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "cigsd", BSIM4v5_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "aigbacc", BSIM4v5_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), IOP( "bigbacc", BSIM4v5_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), IOP( "cigbacc", BSIM4v5_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), IOP( "aigbinv", BSIM4v5_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), IOP( "bigbinv", BSIM4v5_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), IOP( "cigbinv", BSIM4v5_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), IOP( "nigc", BSIM4v5_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), IOP( "nigbinv", BSIM4v5_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), IOP( "nigbacc", BSIM4v5_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), IOP( "ntox", BSIM4v5_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), IOP( "eigbinv", BSIM4v5_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), IOP( "pigcd", BSIM4v5_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), IOP( "poxedge", BSIM4v5_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), IOP( "ijthdfwd", BSIM4v5_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), IOP( "ijthsfwd", BSIM4v5_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), IOP( "ijthdrev", BSIM4v5_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), IOP( "ijthsrev", BSIM4v5_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), IOP( "xjbvd", BSIM4v5_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), IOP( "xjbvs", BSIM4v5_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), IOP( "bvd", BSIM4v5_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), IOP( "bvs", BSIM4v5_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), IOP( "jtss", BSIM4v5_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), IOP( "jtsd", BSIM4v5_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), IOP( "jtssws", BSIM4v5_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), IOP( "jtsswd", BSIM4v5_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), IOP( "jtsswgs", BSIM4v5_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), IOP( "jtsswgd", BSIM4v5_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), IOP( "njts", BSIM4v5_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), IOP( "njtssw", BSIM4v5_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), IOP( "njtsswg", BSIM4v5_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), IOP( "xtss", BSIM4v5_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), IOP( "xtsd", BSIM4v5_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), IOP( "xtssws", BSIM4v5_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), IOP( "xtsswd", BSIM4v5_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), IOP( "xtsswgs", BSIM4v5_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), IOP( "xtsswgd", BSIM4v5_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), IOP( "tnjts", BSIM4v5_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), IOP( "tnjtssw", BSIM4v5_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), IOP( "tnjtsswg", BSIM4v5_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), IOP( "vtss", BSIM4v5_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), IOP( "vtsd", BSIM4v5_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), IOP( "vtssws", BSIM4v5_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswd", BSIM4v5_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgs", BSIM4v5_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgd", BSIM4v5_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "gbmin", BSIM4v5_MOD_GBMIN, IF_REAL, "Minimum body conductance"), IOP( "rbdb", BSIM4v5_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), IOP( "rbpb", BSIM4v5_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbsb", BSIM4v5_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), IOP( "rbps", BSIM4v5_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), IOP( "rbpd", BSIM4v5_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbps0", BSIM4v5_MOD_RBPS0, IF_REAL , "Body resistance RBPS scaling"), IOP( "rbpsl", BSIM4v5_MOD_RBPSL, IF_REAL , "Body resistance RBPS L scaling"), IOP( "rbpsw", BSIM4v5_MOD_RBPSW, IF_REAL , "Body resistance RBPS W scaling"), IOP( "rbpsnf", BSIM4v5_MOD_RBPSNF, IF_REAL , "Body resistance RBPS NF scaling"), IOP( "rbpd0", BSIM4v5_MOD_RBPD0, IF_REAL , "Body resistance RBPD scaling"), IOP( "rbpdl", BSIM4v5_MOD_RBPDL, IF_REAL , "Body resistance RBPD L scaling"), IOP( "rbpdw", BSIM4v5_MOD_RBPDW, IF_REAL , "Body resistance RBPD W scaling"), IOP( "rbpdnf", BSIM4v5_MOD_RBPDNF, IF_REAL , "Body resistance RBPD NF scaling"), IOP( "rbpbx0", BSIM4v5_MOD_RBPBX0, IF_REAL , "Body resistance RBPBX scaling"), IOP( "rbpbxl", BSIM4v5_MOD_RBPBXL, IF_REAL , "Body resistance RBPBX L scaling"), IOP( "rbpbxw", BSIM4v5_MOD_RBPBXW, IF_REAL , "Body resistance RBPBX W scaling"), IOP( "rbpbxnf", BSIM4v5_MOD_RBPBXNF, IF_REAL , "Body resistance RBPBX NF scaling"), IOP( "rbpby0", BSIM4v5_MOD_RBPBY0, IF_REAL , "Body resistance RBPBY scaling"), IOP( "rbpbyl", BSIM4v5_MOD_RBPBYL, IF_REAL , "Body resistance RBPBY L scaling"), IOP( "rbpbyw", BSIM4v5_MOD_RBPBYW, IF_REAL , "Body resistance RBPBY W scaling"), IOP( "rbpbynf", BSIM4v5_MOD_RBPBYNF, IF_REAL , "Body resistance RBPBY NF scaling"), IOP( "rbsbx0", BSIM4v5_MOD_RBSBX0, IF_REAL , "Body resistance RBSBX scaling"), IOP( "rbsby0", BSIM4v5_MOD_RBSBY0, IF_REAL , "Body resistance RBSBY scaling"), IOP( "rbdbx0", BSIM4v5_MOD_RBDBX0, IF_REAL , "Body resistance RBDBX scaling"), IOP( "rbdby0", BSIM4v5_MOD_RBDBY0, IF_REAL , "Body resistance RBDBY scaling"), IOP( "rbsdbxl", BSIM4v5_MOD_RBSDBXL, IF_REAL , "Body resistance RBSDBX L scaling"), IOP( "rbsdbxw", BSIM4v5_MOD_RBSDBXW, IF_REAL , "Body resistance RBSDBX W scaling"), IOP( "rbsdbxnf", BSIM4v5_MOD_RBSDBXNF, IF_REAL , "Body resistance RBSDBX NF scaling"), IOP( "rbsdbyl", BSIM4v5_MOD_RBSDBYL, IF_REAL , "Body resistance RBSDBY L scaling"), IOP( "rbsdbyw", BSIM4v5_MOD_RBSDBYW, IF_REAL , "Body resistance RBSDBY W scaling"), IOP( "rbsdbynf", BSIM4v5_MOD_RBSDBYNF, IF_REAL , "Body resistance RBSDBY NF scaling"), IOP( "lcdsc", BSIM4v5_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM4v5_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM4v5_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM4v5_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM4v5_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM4v5_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM4v5_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM4v5_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM4v5_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM4v5_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM4v5_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM4v5_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM4v5_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM4v5_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lndep", BSIM4v5_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP( "lnsd", BSIM4v5_MOD_LNSD, IF_REAL, "Length dependence of nsd"), IOP( "lphin", BSIM4v5_MOD_LPHIN, IF_REAL, "Length dependence of phin"), IOP( "lngate", BSIM4v5_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM4v5_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM4v5_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM4v5_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM4v5_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM4v5_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM4v5_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM4v5_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM4v5_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM4v5_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM4v5_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM4v5_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM4v5_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM4v5_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "ldvtp0", BSIM4v5_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), IOP( "ldvtp1", BSIM4v5_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), IOP( "llpe0", BSIM4v5_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), IOP( "llpeb", BSIM4v5_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), IOP( "ldvt0", BSIM4v5_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM4v5_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM4v5_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM4v5_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM4v5_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM4v5_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM4v5_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM4v5_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM4v5_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM4v5_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM4v5_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM4v5_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM4v5_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM4v5_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM4v5_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM4v5_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lud", BSIM4v5_MOD_LUD, IF_REAL, "Length dependence of ud"), IOP( "lud1", BSIM4v5_MOD_LUD1, IF_REAL, "Length dependence of ud1"), IOP( "lup", BSIM4v5_MOD_LUP, IF_REAL, "Length dependence of up"), IOP( "llp", BSIM4v5_MOD_LLP, IF_REAL, "Length dependence of lp"), IOP( "lu0", BSIM4v5_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM4v5_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM4v5_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lminv", BSIM4v5_MOD_LMINV, IF_REAL, "Length dependence of minv"), IOP( "ldelta", BSIM4v5_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM4v5_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lrsw", BSIM4v5_MOD_LRSW, IF_REAL, "Length dependence of rsw"), IOP( "lrdw", BSIM4v5_MOD_LRDW, IF_REAL, "Length dependence of rdw"), IOP( "lprwg", BSIM4v5_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM4v5_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM4v5_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM4v5_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM4v5_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM4v5_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM4v5_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM4v5_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM4v5_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lfprout", BSIM4v5_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpdits", BSIM4v5_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), IOP( "lpditsd", BSIM4v5_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), IOP( "lpscbe1", BSIM4v5_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM4v5_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM4v5_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM4v5_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM4v5_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM4v5_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM4v5_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM4v5_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM4v5_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM4v5_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappas", BSIM4v5_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), IOP( "lckappad", BSIM4v5_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), IOP( "lcf", BSIM4v5_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM4v5_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM4v5_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM4v5_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM4v5_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM4v5_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", BSIM4v5_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", BSIM4v5_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lcgidl", BSIM4v5_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), IOP( "legidl", BSIM4v5_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), IOP( "laigc", BSIM4v5_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), IOP( "lbigc", BSIM4v5_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), IOP( "lcigc", BSIM4v5_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), IOP( "laigsd", BSIM4v5_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), IOP( "lbigsd", BSIM4v5_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), IOP( "lcigsd", BSIM4v5_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), IOP( "laigbacc", BSIM4v5_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), IOP( "lbigbacc", BSIM4v5_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), IOP( "lcigbacc", BSIM4v5_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), IOP( "laigbinv", BSIM4v5_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), IOP( "lbigbinv", BSIM4v5_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), IOP( "lcigbinv", BSIM4v5_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), IOP( "lnigc", BSIM4v5_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), IOP( "lnigbinv", BSIM4v5_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), IOP( "lnigbacc", BSIM4v5_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), IOP( "lntox", BSIM4v5_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), IOP( "leigbinv", BSIM4v5_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), IOP( "lpigcd", BSIM4v5_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), IOP( "lpoxedge", BSIM4v5_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), IOP( "lvfbcv", BSIM4v5_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM4v5_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM4v5_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM4v5_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM4v5_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM4v5_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "lxrcrg1", BSIM4v5_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), IOP( "lxrcrg2", BSIM4v5_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), IOP( "llambda", BSIM4v5_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), IOP( "lvtl", BSIM4v5_MOD_LVTL, IF_REAL, " Length dependence of vtl"), IOP( "lxn", BSIM4v5_MOD_LXN, IF_REAL, " Length dependence of xn"), IOP( "leu", BSIM4v5_MOD_LEU, IF_REAL, " Length dependence of eu"), IOP( "lvfbsdoff", BSIM4v5_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), IOP( "ltvfbsdoff", BSIM4v5_MOD_LTVFBSDOFF, IF_REAL, "Length dependence of tvfbsdoff"), IOP( "ltvoff", BSIM4v5_MOD_LTVOFF, IF_REAL, "Length dependence of tvoff"), IOP( "wcdsc", BSIM4v5_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM4v5_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM4v5_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM4v5_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM4v5_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM4v5_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM4v5_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM4v5_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM4v5_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM4v5_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM4v5_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM4v5_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM4v5_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM4v5_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wndep", BSIM4v5_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP( "wnsd", BSIM4v5_MOD_WNSD, IF_REAL, "Width dependence of nsd"), IOP( "wphin", BSIM4v5_MOD_WPHIN, IF_REAL, "Width dependence of phin"), IOP( "wngate", BSIM4v5_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM4v5_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM4v5_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM4v5_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM4v5_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM4v5_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM4v5_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM4v5_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM4v5_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM4v5_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM4v5_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM4v5_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM4v5_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM4v5_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wdvtp0", BSIM4v5_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), IOP( "wdvtp1", BSIM4v5_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), IOP( "wlpe0", BSIM4v5_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), IOP( "wlpeb", BSIM4v5_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), IOP( "wdvt0", BSIM4v5_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM4v5_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM4v5_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM4v5_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM4v5_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM4v5_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM4v5_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM4v5_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM4v5_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM4v5_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM4v5_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM4v5_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM4v5_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM4v5_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM4v5_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM4v5_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wud", BSIM4v5_MOD_WUD, IF_REAL, "Width dependence of ud"), IOP( "wud1", BSIM4v5_MOD_WUD1, IF_REAL, "Width dependence of ud1"), IOP( "wup", BSIM4v5_MOD_WUP, IF_REAL, "Width dependence of up"), IOP( "wlp", BSIM4v5_MOD_WLP, IF_REAL, "Width dependence of lp"), IOP( "wu0", BSIM4v5_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM4v5_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM4v5_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "wminv", BSIM4v5_MOD_WMINV, IF_REAL, "Width dependence of minv"), IOP( "wdelta", BSIM4v5_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM4v5_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wrsw", BSIM4v5_MOD_WRSW, IF_REAL, "Width dependence of rsw"), IOP( "wrdw", BSIM4v5_MOD_WRDW, IF_REAL, "Width dependence of rdw"), IOP( "wprwg", BSIM4v5_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM4v5_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM4v5_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM4v5_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM4v5_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM4v5_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM4v5_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM4v5_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM4v5_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wfprout", BSIM4v5_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpdits", BSIM4v5_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), IOP( "wpditsd", BSIM4v5_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), IOP( "wpscbe1", BSIM4v5_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM4v5_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM4v5_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM4v5_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM4v5_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM4v5_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM4v5_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM4v5_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM4v5_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM4v5_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappas", BSIM4v5_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), IOP( "wckappad", BSIM4v5_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), IOP( "wcf", BSIM4v5_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM4v5_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM4v5_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM4v5_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM4v5_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM4v5_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", BSIM4v5_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", BSIM4v5_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wcgidl", BSIM4v5_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), IOP( "wegidl", BSIM4v5_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), IOP( "waigc", BSIM4v5_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), IOP( "wbigc", BSIM4v5_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), IOP( "wcigc", BSIM4v5_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), IOP( "waigsd", BSIM4v5_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), IOP( "wbigsd", BSIM4v5_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), IOP( "wcigsd", BSIM4v5_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), IOP( "waigbacc", BSIM4v5_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), IOP( "wbigbacc", BSIM4v5_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), IOP( "wcigbacc", BSIM4v5_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), IOP( "waigbinv", BSIM4v5_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), IOP( "wbigbinv", BSIM4v5_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), IOP( "wcigbinv", BSIM4v5_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), IOP( "wnigc", BSIM4v5_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), IOP( "wnigbinv", BSIM4v5_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), IOP( "wnigbacc", BSIM4v5_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), IOP( "wntox", BSIM4v5_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), IOP( "weigbinv", BSIM4v5_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), IOP( "wpigcd", BSIM4v5_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), IOP( "wpoxedge", BSIM4v5_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), IOP( "wvfbcv", BSIM4v5_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM4v5_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM4v5_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM4v5_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM4v5_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM4v5_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "wxrcrg1", BSIM4v5_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), IOP( "wxrcrg2", BSIM4v5_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), IOP( "wlambda", BSIM4v5_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), IOP( "wvtl", BSIM4v5_MOD_WVTL, IF_REAL, "Width dependence of vtl"), IOP( "wxn", BSIM4v5_MOD_WXN, IF_REAL, "Width dependence of xn"), IOP( "weu", BSIM4v5_MOD_WEU, IF_REAL, "Width dependence of eu"), IOP( "wvfbsdoff", BSIM4v5_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), IOP( "wtvfbsdoff", BSIM4v5_MOD_WTVFBSDOFF, IF_REAL, "Width dependence of tvfbsdoff"), IOP( "wtvoff", BSIM4v5_MOD_WTVOFF, IF_REAL, "Width dependence of tvoff"), IOP( "pcdsc", BSIM4v5_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM4v5_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM4v5_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM4v5_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM4v5_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM4v5_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM4v5_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM4v5_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM4v5_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM4v5_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM4v5_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM4v5_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM4v5_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM4v5_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pndep", BSIM4v5_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP( "pnsd", BSIM4v5_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), IOP( "pphin", BSIM4v5_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), IOP( "pngate", BSIM4v5_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM4v5_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM4v5_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM4v5_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM4v5_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM4v5_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM4v5_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM4v5_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM4v5_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM4v5_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM4v5_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM4v5_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM4v5_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM4v5_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pdvtp0", BSIM4v5_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), IOP( "pdvtp1", BSIM4v5_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), IOP( "plpe0", BSIM4v5_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), IOP( "plpeb", BSIM4v5_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), IOP( "pdvt0", BSIM4v5_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM4v5_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM4v5_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM4v5_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM4v5_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM4v5_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM4v5_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM4v5_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM4v5_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM4v5_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM4v5_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM4v5_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM4v5_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM4v5_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM4v5_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM4v5_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pud", BSIM4v5_MOD_PUD, IF_REAL, "Cross-term dependence of ud"), IOP( "pud1", BSIM4v5_MOD_PUD1, IF_REAL, "Cross-term dependence of ud1"), IOP( "pup", BSIM4v5_MOD_PUP, IF_REAL, "Cross-term dependence of up"), IOP( "plp", BSIM4v5_MOD_PLP, IF_REAL, "Cross-term dependence of lp"), IOP( "pu0", BSIM4v5_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM4v5_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM4v5_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pminv", BSIM4v5_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), IOP( "pdelta", BSIM4v5_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM4v5_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "prsw", BSIM4v5_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), IOP( "prdw", BSIM4v5_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), IOP( "pprwg", BSIM4v5_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM4v5_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM4v5_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM4v5_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM4v5_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM4v5_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM4v5_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM4v5_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM4v5_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pfprout", BSIM4v5_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppdits", BSIM4v5_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), IOP( "ppditsd", BSIM4v5_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), IOP( "ppscbe1", BSIM4v5_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM4v5_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM4v5_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM4v5_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM4v5_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM4v5_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM4v5_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM4v5_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM4v5_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM4v5_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappas", BSIM4v5_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), IOP( "pckappad", BSIM4v5_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), IOP( "pcf", BSIM4v5_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM4v5_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM4v5_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM4v5_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM4v5_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM4v5_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", BSIM4v5_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", BSIM4v5_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pcgidl", BSIM4v5_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), IOP( "pegidl", BSIM4v5_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), IOP( "paigc", BSIM4v5_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), IOP( "pbigc", BSIM4v5_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), IOP( "pcigc", BSIM4v5_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), IOP( "paigsd", BSIM4v5_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), IOP( "pbigsd", BSIM4v5_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), IOP( "pcigsd", BSIM4v5_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), IOP( "paigbacc", BSIM4v5_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), IOP( "pbigbacc", BSIM4v5_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), IOP( "pcigbacc", BSIM4v5_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), IOP( "paigbinv", BSIM4v5_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), IOP( "pbigbinv", BSIM4v5_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), IOP( "pcigbinv", BSIM4v5_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), IOP( "pnigc", BSIM4v5_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), IOP( "pnigbinv", BSIM4v5_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), IOP( "pnigbacc", BSIM4v5_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), IOP( "pntox", BSIM4v5_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), IOP( "peigbinv", BSIM4v5_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), IOP( "ppigcd", BSIM4v5_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), IOP( "ppoxedge", BSIM4v5_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), IOP( "pvfbcv", BSIM4v5_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM4v5_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM4v5_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM4v5_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM4v5_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM4v5_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "pxrcrg1", BSIM4v5_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), IOP( "pxrcrg2", BSIM4v5_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), IOP( "plambda", BSIM4v5_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), IOP( "pvtl", BSIM4v5_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), IOP( "pxn", BSIM4v5_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), IOP( "peu", BSIM4v5_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), IOP( "pvfbsdoff", BSIM4v5_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), IOP( "ptvfbsdoff", BSIM4v5_MOD_PTVFBSDOFF, IF_REAL, "Cross-term dependence of tvfbsdoff"), IOP( "ptvoff", BSIM4v5_MOD_PTVOFF, IF_REAL, "Cross-term dependence of tvoff"), /* stress effect*/ IOP( "saref", BSIM4v5_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), IOP( "sbref", BSIM4v5_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), IOP( "wlod", BSIM4v5_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), IOP( "ku0", BSIM4v5_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), IOP( "kvsat", BSIM4v5_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), IOP( "kvth0", BSIM4v5_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), IOP( "tku0", BSIM4v5_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), IOP( "llodku0", BSIM4v5_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), IOP( "wlodku0", BSIM4v5_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), IOP( "llodvth", BSIM4v5_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), IOP( "wlodvth", BSIM4v5_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), IOP( "lku0", BSIM4v5_MOD_LKU0, IF_REAL, "Length dependence of ku0"), IOP( "wku0", BSIM4v5_MOD_WKU0, IF_REAL, "Width dependence of ku0"), IOP( "pku0", BSIM4v5_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), IOP( "lkvth0", BSIM4v5_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), IOP( "wkvth0", BSIM4v5_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), IOP( "pkvth0", BSIM4v5_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), IOP( "stk2", BSIM4v5_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), IOP( "lodk2", BSIM4v5_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), IOP( "steta0", BSIM4v5_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), IOP( "lodeta0", BSIM4v5_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), /* Well Proximity Effect */ IOP( "web", BSIM4v5_MOD_WEB, IF_REAL, "Coefficient for SCB"), IOP( "wec", BSIM4v5_MOD_WEC, IF_REAL, "Coefficient for SCC"), IOP( "kvth0we", BSIM4v5_MOD_KVTH0WE, IF_REAL, "Threshold shift factor for well proximity effect"), IOP( "k2we", BSIM4v5_MOD_K2WE, IF_REAL, " K2 shift factor for well proximity effect "), IOP( "ku0we", BSIM4v5_MOD_KU0WE, IF_REAL, " Mobility degradation factor for well proximity effect "), IOP( "scref", BSIM4v5_MOD_SCREF, IF_REAL, " Reference distance to calculate SCA, SCB and SCC"), IOP( "wpemod", BSIM4v5_MOD_WPEMOD, IF_REAL, " Flag for WPE model (WPEMOD=1 to activate this model) "), IOP( "lkvth0we", BSIM4v5_MOD_LKVTH0WE, IF_REAL, "Length dependence of kvth0we"), IOP( "lk2we", BSIM4v5_MOD_LK2WE, IF_REAL, " Length dependence of k2we "), IOP( "lku0we", BSIM4v5_MOD_LKU0WE, IF_REAL, " Length dependence of ku0we "), IOP( "wkvth0we", BSIM4v5_MOD_WKVTH0WE, IF_REAL, "Width dependence of kvth0we"), IOP( "wk2we", BSIM4v5_MOD_WK2WE, IF_REAL, " Width dependence of k2we "), IOP( "wku0we", BSIM4v5_MOD_WKU0WE, IF_REAL, " Width dependence of ku0we "), IOP( "pkvth0we", BSIM4v5_MOD_PKVTH0WE, IF_REAL, "Cross-term dependence of kvth0we"), IOP( "pk2we", BSIM4v5_MOD_PK2WE, IF_REAL, " Cross-term dependence of k2we "), IOP( "pku0we", BSIM4v5_MOD_PKU0WE, IF_REAL, " Cross-term dependence of ku0we "), IOP( "noia", BSIM4v5_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM4v5_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM4v5_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "tnoia", BSIM4v5_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), IOP( "tnoib", BSIM4v5_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), IOP( "rnoia", BSIM4v5_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), IOP( "rnoib", BSIM4v5_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), IOP( "ntnoi", BSIM4v5_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), IOP( "em", BSIM4v5_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM4v5_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM4v5_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM4v5_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP("vgs_max", BSIM4v5_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", BSIM4v5_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", BSIM4v5_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", BSIM4v5_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", BSIM4v5_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", BSIM4v5_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", BSIM4v5_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM4v5_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM4v5names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM4v5nSize = NUMELEMS(BSIM4v5names); int BSIM4v5pTSize = NUMELEMS(BSIM4v5pTable); int BSIM4v5mPTSize = NUMELEMS(BSIM4v5mPTable); int BSIM4v5iSize = sizeof(BSIM4v5instance); int BSIM4v5mSize = sizeof(BSIM4v5model); ngspice-26/src/spicelib/devices/bsim4v5/b4v5ld.c0000644000265600020320000060236012264261473021000 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4ld.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 02/06/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" /* #define MAX_EXP 2.688117142e+43 #define MIN_EXP 3.720075976e-44 #define EXP_THRESHOLD 100.0 */ #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define MM 3 /* smooth coeff */ #define DEXP(A,B,C) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ C = MAX_EXP; \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } int BSIM4v5polyDepletion(double phi, double ngate,double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); int BSIM4v5load( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; double ceqgstot, dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb; double ceqgdtot, dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb; double gstot, gstotd, gstotg, gstots, gstotb, gspr, Rs, Rd; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double vgs_eff, vgd_eff, dvgs_eff_dvg, dvgd_eff_dvg; double dRs_dvg, dRd_dvg, dRs_dvb, dRd_dvb; double dT0_dvg, dT1_dvb, dT3_dvg, dT3_dvb; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot=0.0, cseshat=0.0, Idedtot=0.0, cdedhat=0.0; #ifndef NEWCONV double tol0, tol1, tol2, tol3, tol4, tol5, tol6; #endif double geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb, ceqgcrg; double vges, vgms, vgedo, vgmdo, vged, vgmd, delvged, delvgmd; double delvges, delvgms, vgmb; double gcgmgmb=0.0, gcgmdb=0.0, gcgmsb=0.0, gcdgmb, gcsgmb; double gcgmbb=0.0, gcbgmb, qgmb, qgmid=0.0, ceqqgmid; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vdbs, vdbd, vsbs, vsbdo, vsbd; double delvdbs, delvdbd, delvsbs; double delvbd_jct, delvbs_jct, vbs_jct, vbd_jct; double SourceSatCurrent, DrainSatCurrent; double ag0, qgb, von, cbhat=0.0, VgstNVt, ExpVgst; double ceqqb, ceqqd, ceqqg, ceqqjd=0.0, ceqqjs=0.0, ceq, geq; double cdrain, cdhat=0.0, ceqdrn, ceqbd, ceqbs, ceqjd, ceqjs, gjbd, gjbs; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; double gcgbb, gcdbb, gcsbb, gcbbb; double gcdbdb, gcsbsb; double gcsgb, gcssb, MJD, MJSWD, MJSWGD, MJS, MJSWS, MJSWGS; double qgate=0.0, qbulk=0.0, qdrn=0.0, qsrc, cqgate, cqbody, cqdrn; double Vdb, Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Igidl, Ggidld, Ggidlg, Ggidlb; double Voxacc=0.0, dVoxacc_dVg=0.0, dVoxacc_dVb=0.0; double Voxdepinv=0.0, dVoxdepinv_dVg=0.0, dVoxdepinv_dVd=0.0, dVoxdepinv_dVb=0.0; double VxNVt=0.0, ExpVxNVt, Vaux=0.0, dVaux_dVg=0.0, dVaux_dVd=0.0, dVaux_dVb=0.0; double Igc, dIgc_dVg, dIgc_dVd, dIgc_dVb; double Igcs, dIgcs_dVg, dIgcs_dVd, dIgcs_dVb; double Igcd, dIgcd_dVg, dIgcd_dVd, dIgcd_dVb; double Igs, dIgs_dVg, dIgs_dVs, Igd, dIgd_dVg, dIgd_dVd; double Igbacc, dIgbacc_dVg, dIgbacc_dVb; double Igbinv, dIgbinv_dVg, dIgbinv_dVd, dIgbinv_dVb; double Pigcd, dPigcd_dVg, dPigcd_dVd, dPigcd_dVb; double Istoteq, gIstotg, gIstotd, gIstots, gIstotb; double Idtoteq, gIdtotg, gIdtotd, gIdtots, gIdtotb; double Ibtoteq, gIbtotg, gIbtotd, gIbtots, gIbtotb; double Igtoteq, gIgtotg, gIgtotd, gIgtots, gIgtotb; double Igstot=0.0, cgshat=0.0, Igdtot=0.0, cgdhat=0.0, Igbtot=0.0, cgbhat=0.0; double Vgs_eff, Vfb=0.0, Vth_NarrowW; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtms, Nvtmd; double Vtm, Vtm0; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg, VgDP, dVgDP_dVg; double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVd, dCoxeff_dVg, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0=0.0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4, dT4_dVd, dT4_dVb; double T5, dT5_dVg, dT5_dVd, dT5_dVb; double T6, dT6_dVg, dT6_dVd, dT6_dVb; double T7, dT7_dVg, dT7_dVd, dT7_dVb; double T8, dT8_dVg, dT8_dVd, dT8_dVb; double T9, dT9_dVg, dT9_dVd, dT9_dVb; double T10, dT10_dVg, dT10_dVb, dT10_dVd; double T11, T12, T13, T14; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double Cclm, dCclm_dVg, dCclm_dVd, dCclm_dVb; double FP, dFP_dVg, PvagTerm, dPvagTerm_dVg, dPvagTerm_dVd, dPvagTerm_dVb; double VADITS, dVADITS_dVg, dVADITS_dVd; double Lpe_Vb, dDITS_Sft_dVb, dDITS_Sft_dVd; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot, Ibtot, a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb, devbs_dvb, devbd_dvb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxeffWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qcheq, qdef, gqdef=0.0, cqdef=0.0, cqcheq=0.0; double gcqdb=0.0, gcqsb=0.0, gcqgb=0.0, gcqbb=0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double qgdo, qgso, cgdo, cgso; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double Igisl, Ggislg, Ggislb, Ggisls; double Nvtmrs, Nvtmrssw, Nvtmrsswg; double vs, Fsevl, dvs_dVg, dvs_dVd, dvs_dVb, dFsevl_dVg, dFsevl_dVd, dFsevl_dVb; double vgdx, vgsx; struct bsim4v5SizeDependParam *pParam; int ByPass, ChargeComputationNeeded, error, Check, Check1, Check2; double m; ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; ChargeComputationNeeded = 1; for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here != NULL; here = here->BSIM4v5nextInstance) { Check = Check1 = Check2 = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vds = *(ckt->CKTstate0 + here->BSIM4v5vds); vgs = *(ckt->CKTstate0 + here->BSIM4v5vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v5vbs); vges = *(ckt->CKTstate0 + here->BSIM4v5vges); vgms = *(ckt->CKTstate0 + here->BSIM4v5vgms); vdbs = *(ckt->CKTstate0 + here->BSIM4v5vdbs); vsbs = *(ckt->CKTstate0 + here->BSIM4v5vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v5vses); vdes = *(ckt->CKTstate0 + here->BSIM4v5vdes); qdef = *(ckt->CKTstate0 + here->BSIM4v5qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vds = *(ckt->CKTstate1 + here->BSIM4v5vds); vgs = *(ckt->CKTstate1 + here->BSIM4v5vgs); vbs = *(ckt->CKTstate1 + here->BSIM4v5vbs); vges = *(ckt->CKTstate1 + here->BSIM4v5vges); vgms = *(ckt->CKTstate1 + here->BSIM4v5vgms); vdbs = *(ckt->CKTstate1 + here->BSIM4v5vdbs); vsbs = *(ckt->CKTstate1 + here->BSIM4v5vsbs); vses = *(ckt->CKTstate1 + here->BSIM4v5vses); vdes = *(ckt->CKTstate1 + here->BSIM4v5vdes); qdef = *(ckt->CKTstate1 + here->BSIM4v5qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4v5off) { vds = model->BSIM4v5type * here->BSIM4v5icVDS; vgs = vges = vgms = model->BSIM4v5type * here->BSIM4v5icVGS; vbs = vdbs = vsbs = model->BSIM4v5type * here->BSIM4v5icVBS; if (vds > 0.0) { vdes = vds + 0.01; vses = -0.01; } else if (vds < 0.0) { vdes = vds - 0.01; vses = 0.01; } else vdes = vses = 0.0; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vds = 0.1; vdes = 0.11; vses = -0.01; vgs = vges = vgms = model->BSIM4v5type * here->BSIM4v5vth0 + 0.1; vbs = vdbs = vsbs = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM4v5off)) { vds = vgs = vbs = vges = vgms = 0.0; vdbs = vsbs = vdes = vses = qdef = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM4v5vds) = *(ckt->CKTstate1 + here->BSIM4v5vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vds))); *(ckt->CKTstate0 + here->BSIM4v5vgs) = *(ckt->CKTstate1 + here->BSIM4v5vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vgs))); *(ckt->CKTstate0 + here->BSIM4v5vges) = *(ckt->CKTstate1 + here->BSIM4v5vges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vges)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vges))); *(ckt->CKTstate0 + here->BSIM4v5vgms) = *(ckt->CKTstate1 + here->BSIM4v5vgms); vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vgms)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vgms))); *(ckt->CKTstate0 + here->BSIM4v5vbs) = *(ckt->CKTstate1 + here->BSIM4v5vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vbs))); *(ckt->CKTstate0 + here->BSIM4v5vbd) = *(ckt->CKTstate0 + here->BSIM4v5vbs) - *(ckt->CKTstate0 + here->BSIM4v5vds); *(ckt->CKTstate0 + here->BSIM4v5vdbs) = *(ckt->CKTstate1 + here->BSIM4v5vdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vdbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vdbs))); *(ckt->CKTstate0 + here->BSIM4v5vdbd) = *(ckt->CKTstate0 + here->BSIM4v5vdbs) - *(ckt->CKTstate0 + here->BSIM4v5vds); *(ckt->CKTstate0 + here->BSIM4v5vsbs) = *(ckt->CKTstate1 + here->BSIM4v5vsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vsbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vsbs))); *(ckt->CKTstate0 + here->BSIM4v5vses) = *(ckt->CKTstate1 + here->BSIM4v5vses); vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vses)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vses))); *(ckt->CKTstate0 + here->BSIM4v5vdes) = *(ckt->CKTstate1 + here->BSIM4v5vdes); vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5vdes)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v5vdes))); *(ckt->CKTstate0 + here->BSIM4v5qdef) = *(ckt->CKTstate1 + here->BSIM4v5qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v5qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM4v5qdef))); } else { #endif /* PREDICTOR */ vds = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vgs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vges = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5gNodeExt) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vgms = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5gNodeMid) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vdbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dbNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vsbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5sbNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vses = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5sNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vdes = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); qdef = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vgdo = *(ckt->CKTstate0 + here->BSIM4v5vgs) - *(ckt->CKTstate0 + here->BSIM4v5vds); vgedo = *(ckt->CKTstate0 + here->BSIM4v5vges) - *(ckt->CKTstate0 + here->BSIM4v5vds); vgmdo = *(ckt->CKTstate0 + here->BSIM4v5vgms) - *(ckt->CKTstate0 + here->BSIM4v5vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; vged = vges - vds; vgmd = vgms - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v5vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v5vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v5vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v5vgs); delvges = vges - *(ckt->CKTstate0 + here->BSIM4v5vges); delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4v5vgms); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v5vbs); delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4v5vdbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v5vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v5vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v5vdes) - *(ckt->CKTstate0 + here->BSIM4v5vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v5vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v5rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v5rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v5mode >= 0) { Idtot = here->BSIM4v5cd + here->BSIM4v5csub - here->BSIM4v5cbd + here->BSIM4v5Igidl; cdhat = Idtot - here->BSIM4v5gbd * delvbd_jct + (here->BSIM4v5gmbs + here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * delvbs + (here->BSIM4v5gm + here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs + (here->BSIM4v5gds + here->BSIM4v5gbds + here->BSIM4v5ggidld) * delvds; Ibtot = here->BSIM4v5cbs + here->BSIM4v5cbd - here->BSIM4v5Igidl - here->BSIM4v5Igisl - here->BSIM4v5csub; cbhat = Ibtot + here->BSIM4v5gbd * delvbd_jct + here->BSIM4v5gbs * delvbs_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * delvbs - (here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs - (here->BSIM4v5gbds + here->BSIM4v5ggidld - here->BSIM4v5ggisls) * delvds - here->BSIM4v5ggislg * delvgd - here->BSIM4v5ggislb* delvbd; Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcs; cgshat = Igstot + (here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg) * delvgs + here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbs; Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcd; cgdhat = Igdtot + here->BSIM4v5gIgdg * delvgd + here->BSIM4v5gIgcdg * delvgs + here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbs; Igbtot = here->BSIM4v5Igb; cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgs + here->BSIM4v5gIgbd * delvds + here->BSIM4v5gIgbb * delvbs; } else { Idtot = here->BSIM4v5cd + here->BSIM4v5cbd - here->BSIM4v5Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v5gbd * delvbd_jct + here->BSIM4v5gmbs * delvbd + here->BSIM4v5gm * delvgd - (here->BSIM4v5gds + here->BSIM4v5ggidls) * delvds - here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; Ibtot = here->BSIM4v5cbs + here->BSIM4v5cbd - here->BSIM4v5Igidl - here->BSIM4v5Igisl - here->BSIM4v5csub; cbhat = Ibtot + here->BSIM4v5gbs * delvbs_jct + here->BSIM4v5gbd * delvbd_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggislb) * delvbd - (here->BSIM4v5gbgs + here->BSIM4v5ggislg) * delvgd + (here->BSIM4v5gbds + here->BSIM4v5ggisld - here->BSIM4v5ggidls) * delvds - here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcd; cgshat = Igstot + here->BSIM4v5gIgsg * delvgs + here->BSIM4v5gIgcdg * delvgd - here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbd; Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcs; cgdhat = Igdtot + (here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg) * delvgd - here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbd; Igbtot = here->BSIM4v5Igb; cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgd - here->BSIM4v5gIgbd * delvds + here->BSIM4v5gIgbb * delvbd; } Isestot = here->BSIM4v5gstot * (*(ckt->CKTstate0 + here->BSIM4v5vses)); cseshat = Isestot + here->BSIM4v5gstot * delvses + here->BSIM4v5gstotd * delvds + here->BSIM4v5gstotg * delvgs + here->BSIM4v5gstotb * delvbs; Idedtot = here->BSIM4v5gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v5gdtot * delvded + here->BSIM4v5gdtotd * delvds + here->BSIM4v5gdtotg * delvgs + here->BSIM4v5gdtotb * delvbs; #ifndef NOBYPASS /* Following should be one IF statement, but some C compilers * can't handle that all at once, so we split it into several * successive IF's */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0 + here->BSIM4v5vds))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->BSIM4v5vgs))) + ckt->CKTvoltTol))) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0 + here->BSIM4v5vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0 + here->BSIM4v5vbd))) + ckt->CKTvoltTol))) if ((here->BSIM4v5rgateMod == 0) || (here->BSIM4v5rgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->BSIM4v5vges))) + ckt->CKTvoltTol))) if ((here->BSIM4v5rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4v5vgms))) + ckt->CKTvoltTol))) if ((!here->BSIM4v5rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4v5vdbs))) + ckt->CKTvoltTol))) if ((!here->BSIM4v5rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4v5vdbd))) + ckt->CKTvoltTol))) if ((!here->BSIM4v5rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4v5vsbs))) + ckt->CKTvoltTol))) if ((!model->BSIM4v5rdsMod) || (fabs(delvses) < (ckt->CKTreltol * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4v5vses))) + ckt->CKTvoltTol))) if ((!model->BSIM4v5rdsMod) || (fabs(delvdes) < (ckt->CKTreltol * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4v5vdes))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol)) if ((fabs(cbhat - Ibtot) < ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol)) if ((!model->BSIM4v5igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol))) if ((!model->BSIM4v5igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol))) if ((!model->BSIM4v5igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol))) if ((!model->BSIM4v5rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) if ((!model->BSIM4v5rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) { vds = *(ckt->CKTstate0 + here->BSIM4v5vds); vgs = *(ckt->CKTstate0 + here->BSIM4v5vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v5vbs); vges = *(ckt->CKTstate0 + here->BSIM4v5vges); vgms = *(ckt->CKTstate0 + here->BSIM4v5vgms); vbd = *(ckt->CKTstate0 + here->BSIM4v5vbd); vdbs = *(ckt->CKTstate0 + here->BSIM4v5vdbs); vdbd = *(ckt->CKTstate0 + here->BSIM4v5vdbd); vsbs = *(ckt->CKTstate0 + here->BSIM4v5vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v5vses); vdes = *(ckt->CKTstate0 + here->BSIM4v5vdes); vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vbs_jct = (!here->BSIM4v5rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v5rbodyMod) ? vbd : vdbd; /*** qdef should not be kept fixed even if vgs, vds & vbs has converged **** qdef = *(ckt->CKTstate0 + here->BSIM4v5qdef); ***/ cdrain = here->BSIM4v5cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM4v5qgate; qbulk = here->BSIM4v5qbulk; qdrn = here->BSIM4v5qdrn; cgdo = here->BSIM4v5cgdo; qgdo = here->BSIM4v5qgdo; cgso = here->BSIM4v5cgso; qgso = here->BSIM4v5qgso; goto line755; } else goto line850; } #endif /*NOBYPASS*/ von = here->BSIM4v5von; if (*(ckt->CKTstate0 + here->BSIM4v5vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4v5vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4v5vds)); vgd = vgs - vds; if (here->BSIM4v5rgateMod == 3) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v5vges), von); vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4v5vgms), von); vged = vges - vds; vgmd = vgms - vds; } else if ((here->BSIM4v5rgateMod == 1) || (here->BSIM4v5rgateMod == 2)) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v5vges), von); vged = vges - vds; } if (model->BSIM4v5rdsMod) { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4v5vdes)); vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4v5vses))); } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4v5vds))); vgs = vgd + vds; if (here->BSIM4v5rgateMod == 3) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; vgmd = DEVfetlim(vgmd, vgmdo, von); vgms = vgmd + vds; } if ((here->BSIM4v5rgateMod == 1) || (here->BSIM4v5rgateMod == 2)) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } if (model->BSIM4v5rdsMod) { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4v5vdes))); vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4v5vses)); } } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4v5vbs), CONSTvt0, model->BSIM4v5vcrit, &Check); vbd = vbs - vds; if (here->BSIM4v5rbodyMod) { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4v5vdbs), CONSTvt0, model->BSIM4v5vcrit, &Check1); vdbd = vdbs - vds; vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4v5vsbs), CONSTvt0, model->BSIM4v5vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4v5vbd), CONSTvt0, model->BSIM4v5vcrit, &Check); vbs = vbd + vds; if (here->BSIM4v5rbodyMod) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4v5vdbd), CONSTvt0, model->BSIM4v5vcrit, &Check1); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->BSIM4v5vsbs) - *(ckt->CKTstate0 + here->BSIM4v5vds); vsbd = vsbs - vds; vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4v5vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } } /* Calculate DC currents and their derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vdbd = vdbs - vds; vbs_jct = (!here->BSIM4v5rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v5rbodyMod) ? vbd : vdbd; /* Source/drain junction diode DC model begins */ Nvtms = model->BSIM4v5vtm * model->BSIM4v5SjctEmissionCoeff; if ((here->BSIM4v5Aseff <= 0.0) && (here->BSIM4v5Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM4v5Aseff * model->BSIM4v5SjctTempSatCurDensity + here->BSIM4v5Pseff * model->BSIM4v5SjctSidewallTempSatCurDensity + pParam->BSIM4v5weffCJ * here->BSIM4v5nf * model->BSIM4v5SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent <= 0.0) { here->BSIM4v5gbs = ckt->CKTgmin; here->BSIM4v5cbs = here->BSIM4v5gbs * vbs_jct; } else { switch(model->BSIM4v5dioMod) { case 0: evbs = exp(vbs_jct / Nvtms); T1 = model->BSIM4v5xjbvs * exp(-(model->BSIM4v5bvs + vbs_jct) / Nvtms); /* WDLiu: Magic T1 in this form; different from BSIM4v5 beta. */ here->BSIM4v5gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; here->BSIM4v5cbs = SourceSatCurrent * (evbs + here->BSIM4v5XExpBVS - T1 - 1.0) + ckt->CKTgmin * vbs_jct; break; case 1: T2 = vbs_jct / Nvtms; if (T2 < -EXP_THRESHOLD) { here->BSIM4v5gbs = ckt->CKTgmin; here->BSIM4v5cbs = SourceSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v5vjsmFwd) { evbs = exp(T2); here->BSIM4v5gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; here->BSIM4v5cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs_jct; } else { T0 = here->BSIM4v5IVjsmFwd / Nvtms; here->BSIM4v5gbs = T0 + ckt->CKTgmin; here->BSIM4v5cbs = here->BSIM4v5IVjsmFwd - SourceSatCurrent + T0 * (vbs_jct - here->BSIM4v5vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; case 2: if (vbs_jct < here->BSIM4v5vjsmRev) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = evbs - 1.0; T2 = here->BSIM4v5IVjsmRev + here->BSIM4v5SslpRev * (vbs_jct - here->BSIM4v5vjsmRev); here->BSIM4v5gbs = devbs_dvb * T2 + T1 * here->BSIM4v5SslpRev + ckt->CKTgmin; here->BSIM4v5cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v5vjsmFwd) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = (model->BSIM4v5bvs + vbs_jct) / Nvtms; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtms; } here->BSIM4v5gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4v5xjbvs * T3) + ckt->CKTgmin; here->BSIM4v5cbs = SourceSatCurrent * (evbs + here->BSIM4v5XExpBVS - 1.0 - model->BSIM4v5xjbvs * T2) + ckt->CKTgmin * vbs_jct; } else { here->BSIM4v5gbs = here->BSIM4v5SslpFwd + ckt->CKTgmin; here->BSIM4v5cbs = here->BSIM4v5IVjsmFwd + here->BSIM4v5SslpFwd * (vbs_jct - here->BSIM4v5vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; default: break; } } Nvtmd = model->BSIM4v5vtm * model->BSIM4v5DjctEmissionCoeff; if ((here->BSIM4v5Adeff <= 0.0) && (here->BSIM4v5Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM4v5Adeff * model->BSIM4v5DjctTempSatCurDensity + here->BSIM4v5Pdeff * model->BSIM4v5DjctSidewallTempSatCurDensity + pParam->BSIM4v5weffCJ * here->BSIM4v5nf * model->BSIM4v5DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) { here->BSIM4v5gbd = ckt->CKTgmin; here->BSIM4v5cbd = here->BSIM4v5gbd * vbd_jct; } else { switch(model->BSIM4v5dioMod) { case 0: evbd = exp(vbd_jct / Nvtmd); T1 = model->BSIM4v5xjbvd * exp(-(model->BSIM4v5bvd + vbd_jct) / Nvtmd); /* WDLiu: Magic T1 in this form; different from BSIM4v5 beta. */ here->BSIM4v5gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; here->BSIM4v5cbd = DrainSatCurrent * (evbd + here->BSIM4v5XExpBVD - T1 - 1.0) + ckt->CKTgmin * vbd_jct; break; case 1: T2 = vbd_jct / Nvtmd; if (T2 < -EXP_THRESHOLD) { here->BSIM4v5gbd = ckt->CKTgmin; here->BSIM4v5cbd = DrainSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v5vjdmFwd) { evbd = exp(T2); here->BSIM4v5gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; here->BSIM4v5cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd_jct; } else { T0 = here->BSIM4v5IVjdmFwd / Nvtmd; here->BSIM4v5gbd = T0 + ckt->CKTgmin; here->BSIM4v5cbd = here->BSIM4v5IVjdmFwd - DrainSatCurrent + T0 * (vbd_jct - here->BSIM4v5vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; case 2: if (vbd_jct < here->BSIM4v5vjdmRev) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = evbd - 1.0; T2 = here->BSIM4v5IVjdmRev + here->BSIM4v5DslpRev * (vbd_jct - here->BSIM4v5vjdmRev); here->BSIM4v5gbd = devbd_dvb * T2 + T1 * here->BSIM4v5DslpRev + ckt->CKTgmin; here->BSIM4v5cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v5vjdmFwd) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = (model->BSIM4v5bvd + vbd_jct) / Nvtmd; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtmd; } here->BSIM4v5gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4v5xjbvd * T3) + ckt->CKTgmin; here->BSIM4v5cbd = DrainSatCurrent * (evbd + here->BSIM4v5XExpBVD - 1.0 - model->BSIM4v5xjbvd * T2) + ckt->CKTgmin * vbd_jct; } else { here->BSIM4v5gbd = here->BSIM4v5DslpFwd + ckt->CKTgmin; here->BSIM4v5cbd = here->BSIM4v5IVjdmFwd + here->BSIM4v5DslpFwd * (vbd_jct - here->BSIM4v5vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; default: break; } } /* trap-assisted tunneling and recombination current for reverse bias */ Nvtmrssw = model->BSIM4v5vtm0 * model->BSIM4v5njtsswtemp; Nvtmrsswg = model->BSIM4v5vtm0 * model->BSIM4v5njtsswgtemp; Nvtmrs = model->BSIM4v5vtm0 * model->BSIM4v5njtstemp; if ((model->BSIM4v5vtss - vbs_jct) < (model->BSIM4v5vtss * 1e-3)) { T9 = 1.0e3; T0 = - vbs_jct / Nvtmrs * T9; DEXP(T0, T1, T10); dT1_dVb = T10 / Nvtmrs * T9; } else { T9 = 1.0 / (model->BSIM4v5vtss - vbs_jct); T0 = -vbs_jct / Nvtmrs * model->BSIM4v5vtss * T9; dT0_dVb = model->BSIM4v5vtss / Nvtmrs * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T1, T10); dT1_dVb = T10 * dT0_dVb; } if ((model->BSIM4v5vtsd - vbd_jct) < (model->BSIM4v5vtsd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrs * T9; DEXP(T0, T2, T10); dT2_dVb = T10 / Nvtmrs * T9; } else { T9 = 1.0 / (model->BSIM4v5vtsd - vbd_jct); T0 = -vbd_jct / Nvtmrs * model->BSIM4v5vtsd * T9; dT0_dVb = model->BSIM4v5vtsd / Nvtmrs * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T2, T10); dT2_dVb = T10 * dT0_dVb; } if ((model->BSIM4v5vtssws - vbs_jct) < (model->BSIM4v5vtssws * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrssw * T9; DEXP(T0, T3, T10); dT3_dVb = T10 / Nvtmrssw * T9; } else { T9 = 1.0 / (model->BSIM4v5vtssws - vbs_jct); T0 = -vbs_jct / Nvtmrssw * model->BSIM4v5vtssws * T9; dT0_dVb = model->BSIM4v5vtssws / Nvtmrssw * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T3, T10); dT3_dVb = T10 * dT0_dVb; } if ((model->BSIM4v5vtsswd - vbd_jct) < (model->BSIM4v5vtsswd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrssw * T9; DEXP(T0, T4, T10); dT4_dVb = T10 / Nvtmrssw * T9; } else { T9 = 1.0 / (model->BSIM4v5vtsswd - vbd_jct); T0 = -vbd_jct / Nvtmrssw * model->BSIM4v5vtsswd * T9; dT0_dVb = model->BSIM4v5vtsswd / Nvtmrssw * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T4, T10); dT4_dVb = T10 * dT0_dVb; } if ((model->BSIM4v5vtsswgs - vbs_jct) < (model->BSIM4v5vtsswgs * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrsswg * T9; DEXP(T0, T5, T10); dT5_dVb = T10 / Nvtmrsswg * T9; } else { T9 = 1.0 / (model->BSIM4v5vtsswgs - vbs_jct); T0 = -vbs_jct / Nvtmrsswg * model->BSIM4v5vtsswgs * T9; dT0_dVb = model->BSIM4v5vtsswgs / Nvtmrsswg * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T5, T10); dT5_dVb = T10 * dT0_dVb; } if ((model->BSIM4v5vtsswgd - vbd_jct) < (model->BSIM4v5vtsswgd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsswg * T9; DEXP(T0, T6, T10); dT6_dVb = T10 / Nvtmrsswg * T9; } else { T9 = 1.0 / (model->BSIM4v5vtsswgd - vbd_jct); T0 = -vbd_jct / Nvtmrsswg * model->BSIM4v5vtsswgd * T9; dT0_dVb = model->BSIM4v5vtsswgd / Nvtmrsswg * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T6, T10); dT6_dVb = T10 * dT0_dVb; } here->BSIM4v5gbs += here->BSIM4v5SjctTempRevSatCur * dT1_dVb + here->BSIM4v5SswTempRevSatCur * dT3_dVb + here->BSIM4v5SswgTempRevSatCur * dT5_dVb; here->BSIM4v5cbs -= here->BSIM4v5SjctTempRevSatCur * (T1 - 1.0) + here->BSIM4v5SswTempRevSatCur * (T3 - 1.0) + here->BSIM4v5SswgTempRevSatCur * (T5 - 1.0); here->BSIM4v5gbd += here->BSIM4v5DjctTempRevSatCur * dT2_dVb + here->BSIM4v5DswTempRevSatCur * dT4_dVb + here->BSIM4v5DswgTempRevSatCur * dT6_dVb; here->BSIM4v5cbd -= here->BSIM4v5DjctTempRevSatCur * (T2 - 1.0) + here->BSIM4v5DswTempRevSatCur * (T4 - 1.0) + here->BSIM4v5DswgTempRevSatCur * (T6 - 1.0); /* End of diode DC model */ if (vds >= 0.0) { here->BSIM4v5mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vdb = vds - vbs; /* WDLiu: for GIDL */ } else { here->BSIM4v5mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vdb = -vbs; } T0 = Vbs - here->BSIM4v5vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4v5vbsc); if (T0 >= 0.0) { Vbseff = here->BSIM4v5vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); Vbseff = here->BSIM4v5vbsc * (1.0 + T2); dVbseff_dVb = T2 * here->BSIM4v5vbsc / T1; } /* JX: Correction to forward body bias */ T9 = 0.95 * pParam->BSIM4v5phi; T0 = T9 - Vbseff - 0.001; T1 = sqrt(T0 * T0 + 0.004 * T9); Vbseff = T9 - 0.5 * (T0 + T1); dVbseff_dVb *= 0.5 * (1.0 + T0 / T1); Phis = pParam->BSIM4v5phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = pParam->BSIM4v5Xdep0 * sqrtPhis / pParam->BSIM4v5sqrtPhi; dXdep_dVb = (pParam->BSIM4v5Xdep0 / pParam->BSIM4v5sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM4v5leff; Vtm = model->BSIM4v5vtm; Vtm0 = model->BSIM4v5vtm0; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM4v5vbi - pParam->BSIM4v5phi; T0 = pParam->BSIM4v5dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v5dvt2; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v5dvt2 * T4 * T4; } lt1 = model->BSIM4v5factor1 * T3 * T1; dlt1_dVb = model->BSIM4v5factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v5dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v5dvt2w; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v5dvt2w * T4 * T4; } ltw = model->BSIM4v5factor1 * T3 * T1; dltw_dVb = model->BSIM4v5factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v5dvt1 * Leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; dT1_dVb = -T0 * T1 * dlt1_dVb / lt1; dTheta0_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { Theta0 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dTheta0_dVb = 0.0; } here->BSIM4v5thetavth = pParam->BSIM4v5dvt0 * Theta0; Delt_vth = here->BSIM4v5thetavth * V0; dDelt_vth_dVb = pParam->BSIM4v5dvt0 * dTheta0_dVb * V0; T0 = pParam->BSIM4v5dvt1w * pParam->BSIM4v5weff * Leff / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; dT1_dVb = -T0 * T1 * dltw_dVb / ltw; dT5_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dT5_dVb = 0.0; } T0 = pParam->BSIM4v5dvt0w * T5; T2 = T0 * V0; dT2_dVb = pParam->BSIM4v5dvt0w * dT5_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM4v5tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4v5lpe0 / Leff); T1 = pParam->BSIM4v5k1ox * (T0 - 1.0) * pParam->BSIM4v5sqrtPhi + (pParam->BSIM4v5kt1 + pParam->BSIM4v5kt1l / Leff + pParam->BSIM4v5kt2 * Vbseff) * TempRatio; Vth_NarrowW = model->BSIM4v5toxe * pParam->BSIM4v5phi / (pParam->BSIM4v5weff + pParam->BSIM4v5w0); T3 = here->BSIM4v5eta0 + pParam->BSIM4v5etab * Vbseff; if (T3 < 1.0e-4) { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM4v5theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Lpe_Vb = sqrt(1.0 + pParam->BSIM4v5lpeb / Leff); Vth = model->BSIM4v5type * here->BSIM4v5vth0 + (pParam->BSIM4v5k1ox * sqrtPhis - pParam->BSIM4v5k1 * pParam->BSIM4v5sqrtPhi) * Lpe_Vb - here->BSIM4v5k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4v5k3 + pParam->BSIM4v5k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; dVth_dVb = Lpe_Vb * pParam->BSIM4v5k1ox * dsqrtPhis_dVb - here->BSIM4v5k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4v5k3b * Vth_NarrowW - pParam->BSIM4v5etab * Vds * pParam->BSIM4v5theta0vb0 * T4 + pParam->BSIM4v5kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp1 = EPSSI / Xdep; here->BSIM4v5nstar = model->BSIM4v5vtm / Charge_q * (model->BSIM4v5coxe + tmp1 + pParam->BSIM4v5cit); tmp2 = pParam->BSIM4v5nfactor * tmp1; tmp3 = pParam->BSIM4v5cdsc + pParam->BSIM4v5cdscb * Vbseff + pParam->BSIM4v5cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4v5cit) / model->BSIM4v5coxe; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v5cdscb * Theta0) / model->BSIM4v5coxe; dn_dVd = pParam->BSIM4v5cdscd * Theta0 / model->BSIM4v5coxe; } else { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v5cdscb * Theta0) / model->BSIM4v5coxe * T0; dn_dVd = pParam->BSIM4v5cdscd * Theta0 / model->BSIM4v5coxe * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4v5dvtp0 > 0.0) { T0 = -pParam->BSIM4v5dvtp1 * Vds; if (T0 < -EXP_THRESHOLD) { T2 = MIN_EXP; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->BSIM4v5dvtp1 * T2; } T3 = Leff + pParam->BSIM4v5dvtp0 * (1.0 + T2); dT3_dVd = pParam->BSIM4v5dvtp0 * dT2_dVd; if (model->BSIM4v5tempMod < 2) { T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; } else { T4 = model->BSIM4v5vtm0 * log(Leff / T3); dT4_dVd = -model->BSIM4v5vtm0 * dT3_dVd / T3; } dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; Vth -= n * T4; dVth_dVd -= dDITS_Sft_dVd; dVth_dVb -= dDITS_Sft_dVb; } here->BSIM4v5von = Vth; /* Poly Gate Si Depletion Effect */ T0 = here->BSIM4v5vfb + pParam->BSIM4v5phi; BSIM4v5polyDepletion(T0, pParam->BSIM4v5ngate, model->BSIM4v5coxe, vgs, &vgs_eff, &dvgs_eff_dvg); BSIM4v5polyDepletion(T0, pParam->BSIM4v5ngate, model->BSIM4v5coxe, vgd, &vgd_eff, &dvgd_eff_dvg); if(here->BSIM4v5mode>0) { Vgs_eff = vgs_eff; dVgs_eff_dVg = dvgs_eff_dvg; } else { Vgs_eff = vgd_eff; dVgs_eff_dVg = dvgd_eff_dvg; } here->BSIM4v5vgs_eff = vgs_eff; here->BSIM4v5vgd_eff = vgd_eff; here->BSIM4v5dvgs_eff_dvg = dvgs_eff_dvg; here->BSIM4v5dvgd_eff_dvg = dvgd_eff_dvg; Vgst = Vgs_eff - Vth; /* Calculate Vgsteff */ T0 = n * Vtm; T1 = pParam->BSIM4v5mstar * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4v5mstar * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4v5mstar; dT10_dVb = -dVth_dVb * pParam->BSIM4v5mstar; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4v5mstar * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4v5voffcbn - (1.0 - pParam->BSIM4v5mstar) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4v5coxe * MIN_EXP / pParam->BSIM4v5cdep0; T9 = pParam->BSIM4v5mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4v5coxe * MAX_EXP / pParam->BSIM4v5cdep0; T9 = pParam->BSIM4v5mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4v5coxe / pParam->BSIM4v5cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4v5mstar + n * T4; dT9_dVg = T3 * (pParam->BSIM4v5mstar - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } here->BSIM4v5Vgsteff = Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM4v5sqrtPhi; Weff = pParam->BSIM4v5weff - 2.0 * (pParam->BSIM4v5dwg * Vgsteff + pParam->BSIM4v5dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM4v5dwg; dWeff_dVb = -2.0 * pParam->BSIM4v5dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } if (model->BSIM4v5rdsMod == 1) Rds = dRds_dVg = dRds_dVb = 0.0; else { T0 = 1.0 + pParam->BSIM4v5prwg * Vgsteff; dT0_dVg = -pParam->BSIM4v5prwg / T0 / T0; T1 = pParam->BSIM4v5prwb * T9; dT1_dVb = pParam->BSIM4v5prwb * dsqrtPhis_dVb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); /* 0.01 = 4.0 * 0.05 * 0.05 */ dT3_dVg = 1.0 + T2 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; T4 = pParam->BSIM4v5rds0 * 0.5; Rds = pParam->BSIM4v5rdswmin + T3 * T4; dRds_dVg = T4 * dT3_dVg; dRds_dVb = T4 * dT3_dVb; if (Rds > 0.0) here->BSIM4v5grdsw = 1.0 / Rds; else here->BSIM4v5grdsw = 0.0; } /* Calculate Abulk */ T9 = 0.5 * pParam->BSIM4v5k1ox * Lpe_Vb / sqrtPhis; T1 = T9 + here->BSIM4v5k2ox - pParam->BSIM4v5k3b * Vth_NarrowW; dT1_dVb = -T9 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM4v5xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM4v5a0 * T5; tmp3 = pParam->BSIM4v5weff + pParam->BSIM4v5b1; tmp4 = pParam->BSIM4v5b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM4v5ags * pParam->BSIM4v5a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } here->BSIM4v5Abulk = Abulk; T2 = pParam->BSIM4v5keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM4v5keta * T0 * T0; } else { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM4v5keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM4v5mobMod == 0) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM4v5ua + pParam->BSIM4v5uc * Vbseff; T3 = T0 / model->BSIM4v5toxe; T6 = pParam->BSIM4v5ud / T3 / T3 * Vth * Vth; T5 = T3 * (T2 + pParam->BSIM4v5ub * T3) + T6; T7 = - 2.0 * T6 / T0; dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4v5ub * T3) / model->BSIM4v5toxe + T7; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v5uc * T3; } else if (model->BSIM4v5mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM4v5uc * Vbseff; T3 = T0 / model->BSIM4v5toxe; T4 = T3 * (pParam->BSIM4v5ua + pParam->BSIM4v5ub * T3); T6 = pParam->BSIM4v5ud / T3 / T3 * Vth * Vth; T5 = T4 * T2 + T6; T7 = - 2.0 * T6 / T0; dDenomi_dVg = (pParam->BSIM4v5ua + 2.0 * pParam->BSIM4v5ub * T3) * T2 / model->BSIM4v5toxe + T7; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v5uc * T4; } else { T0 = (Vgsteff + here->BSIM4v5vtfbphi1) / model->BSIM4v5toxe; T1 = exp(pParam->BSIM4v5eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4v5eu / T0 / model->BSIM4v5toxe; T2 = pParam->BSIM4v5ua + pParam->BSIM4v5uc * Vbseff; T3 = T0 / model->BSIM4v5toxe; T6 = pParam->BSIM4v5ud / T3 / T3 * Vth * Vth; T5 = T1 * T2 + T6; T7 = - 2.0 * T6 / T0; dDenomi_dVg = T2 * dT1_dVg + T7; dDenomi_dVd = 0.0; dDenomi_dVb = T1 * pParam->BSIM4v5uc; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM4v5ueff = ueff = here->BSIM4v5u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * here->BSIM4v5vsattemp * model->BSIM4v5coxe; WVCoxRds = WVCox * Rds; Esat = 2.0 * here->BSIM4v5vsattemp / ueff; here->BSIM4v5EsatL = EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM4v5a1; if (a1 == 0.0) { Lambda = pParam->BSIM4v5a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) { T0 = 1.0 - pParam->BSIM4v5a2; T1 = T0 - pParam->BSIM4v5a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM4v5a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v5a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM4v5a2 + pParam->BSIM4v5a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4v5a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v5a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM4v5vdsat = Vdsat; /* Calculate Vdseff */ T1 = Vdsat - Vds - pParam->BSIM4v5delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4v5delta * Vdsat); T0 = T1 / T2; T9 = 2.0 * pParam->BSIM4v5delta; T3 = T9 / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; if (T1 >= 0.0) { Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); } else { T4 = T9 / (T2 - T1); T5 = 1.0 - T4; T6 = Vdsat * T4 / (T2 - T1); Vdseff = Vdsat * T5; dVdseff_dVg = dVdsat_dVg * T5 + T6 * (dT2_dVg - dT1_dVg); dVdseff_dVd = dVdsat_dVd * T5 + T6 * (dT2_dVd - dT1_dVd); dVdseff_dVb = dVdsat_dVb * T5 + T6 * (dT2_dVb - dT1_dVb); } if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; here->BSIM4v5Vdseff = Vdseff; /* Velocity Overshoot */ if((model->BSIM4v5lambdaGiven) && (model->BSIM4v5lambda > 0.0) ) { T1 = Leff * ueff; T2 = pParam->BSIM4v5lambda / T1; T3 = -T2 / T1 * Leff; dT2_dVd = T3 * dueff_dVd; dT2_dVg = T3 * dueff_dVg; dT2_dVb = T3 * dueff_dVb; T5 = 1.0 / (Esat * pParam->BSIM4v5litl); T4 = -T5 / EsatL; dT5_dVg = dEsatL_dVg * T4; dT5_dVd = dEsatL_dVd * T4; dT5_dVb = dEsatL_dVb * T4; T6 = 1.0 + diffVds * T5; dT6_dVg = dT5_dVg * diffVds - dVdseff_dVg * T5; dT6_dVd = dT5_dVd * diffVds + (1.0 - dVdseff_dVd) * T5; dT6_dVb = dT5_dVb * diffVds - dVdseff_dVb * T5; T7 = 2.0 / (T6 * T6 + 1.0); T8 = 1.0 - T7; T9 = T6 * T7 * T7; dT8_dVg = T9 * dT6_dVg; dT8_dVd = T9 * dT6_dVd; dT8_dVb = T9 * dT6_dVb; T10 = 1.0 + T2 * T8; dT10_dVg = dT2_dVg * T8 + T2 * dT8_dVg; dT10_dVd = dT2_dVd * T8 + T2 * dT8_dVd; dT10_dVb = dT2_dVb * T8 + T2 * dT8_dVb; if(T10 == 1.0) dT10_dVg = dT10_dVd = dT10_dVb = 0.0; dEsatL_dVg *= T10; dEsatL_dVg += EsatL * dT10_dVg; dEsatL_dVd *= T10; dEsatL_dVd += EsatL * dT10_dVd; dEsatL_dVb *= T10; dEsatL_dVb += EsatL * dT10_dVb; EsatL *= T10; here->BSIM4v5EsatL = EsatL; } /* Calculate Vasat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; /* Calculate Idl first */ tmp1 = here->BSIM4v5vtfbphi2; tmp2 = 2.0e8 * model->BSIM4v5toxp; dT0_dVg = 1.0 / tmp2; T0 = (Vgsteff + tmp1) * dT0_dVg; tmp3 = exp(0.7 * log(T0)); T1 = 1.0 + tmp3; T2 = 0.7 * tmp3 / T0; Tcen = 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 * dT0_dVg / T1; Coxeff = EPSSI * model->BSIM4v5coxp / (EPSSI + model->BSIM4v5coxp * Tcen); dCoxeff_dVg = -Coxeff * Coxeff * dTcen_dVg / EPSSI; CoxeffWovL = Coxeff * Weff / Leff; beta = ueff * CoxeffWovL; T3 = ueff / Leff; dbeta_dVg = CoxeffWovL * dueff_dVg + T3 * (Weff * dCoxeff_dVg + Coxeff * dWeff_dVg); dbeta_dVd = CoxeffWovL * dueff_dVd; dbeta_dVb = CoxeffWovL * dueff_dVb + T3 * Coxeff * dWeff_dVb; here->BSIM4v5AbovVgst2Vtm = Abulk / Vgst2Vtm; T0 = 1.0 - 0.5 * Vdseff * here->BSIM4v5AbovVgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; Idl = gche / T0; T1 = (1.0 - Idl * Rds) / T0; T2 = Idl * Idl; dIdl_dVg = T1 * dgche_dVg - T2 * dRds_dVg; dIdl_dVd = T1 * dgche_dVd; dIdl_dVb = T1 * dgche_dVb - T2 * dRds_dVb; /* Calculate degradation factor due to pocket implant */ if (pParam->BSIM4v5fprout <= 0.0) { FP = 1.0; dFP_dVg = 0.0; } else { T9 = pParam->BSIM4v5fprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); dFP_dVg = FP * FP * T9 / Vgst2Vtm; } /* Calculate VACLM */ T8 = pParam->BSIM4v5pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { PvagTerm = 1.0 + T9; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dPvagTerm_dVb = -T9 * dEsatL_dVb / EsatL; dPvagTerm_dVd = -T9 * dEsatL_dVd / EsatL; } else { T4 = 1.0 / (17.0 + 20.0 * T9); PvagTerm = (0.8 + T9) * T4; T4 *= T4; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T4; T9 *= T4 / EsatL; dPvagTerm_dVb = -T9 * dEsatL_dVb; dPvagTerm_dVd = -T9 * dEsatL_dVd; } if ((pParam->BSIM4v5pclm > MIN_EXP) && (diffVds > 1.0e-10)) { T0 = 1.0 + Rds * Idl; dT0_dVg = dRds_dVg * Idl + Rds * dIdl_dVg; dT0_dVd = Rds * dIdl_dVd; dT0_dVb = dRds_dVb * Idl + Rds * dIdl_dVb; T2 = Vdsat / Esat; T1 = Leff + T2; dT1_dVg = (dVdsat_dVg - T2 * dEsatL_dVg / Leff) / Esat; dT1_dVd = (dVdsat_dVd - T2 * dEsatL_dVd / Leff) / Esat; dT1_dVb = (dVdsat_dVb - T2 * dEsatL_dVb / Leff) / Esat; Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4v5pclm * pParam->BSIM4v5litl); dCclm_dVg = Cclm * (dFP_dVg / FP + dPvagTerm_dVg / PvagTerm + dT0_dVg / T0 + dT1_dVg / T1); dCclm_dVb = Cclm * (dPvagTerm_dVb / PvagTerm + dT0_dVb / T0 + dT1_dVb / T1); dCclm_dVd = Cclm * (dPvagTerm_dVd / PvagTerm + dT0_dVd / T0 + dT1_dVd / T1); VACLM = Cclm * diffVds; dVACLM_dVg = dCclm_dVg * diffVds - dVdseff_dVg * Cclm; dVACLM_dVb = dCclm_dVb * diffVds - dVdseff_dVb * Cclm; dVACLM_dVd = dCclm_dVd * diffVds + (1.0 - dVdseff_dVd) * Cclm; } else { VACLM = Cclm = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; dCclm_dVd = dCclm_dVg = dCclm_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM4v5thetaRout > MIN_EXP) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM4v5thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM4v5pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4v5pdiblb) * T3; dVADIBL_dVd *= T3; } else { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM4v5pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } dVADIBL_dVg = dVADIBL_dVg * PvagTerm + VADIBL * dPvagTerm_dVg; dVADIBL_dVb = dVADIBL_dVb * PvagTerm + VADIBL * dPvagTerm_dVb; dVADIBL_dVd = dVADIBL_dVd * PvagTerm + VADIBL * dPvagTerm_dVd; VADIBL *= PvagTerm; } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate Va */ Va = Vasat + VACLM; dVa_dVg = dVasat_dVg + dVACLM_dVg; dVa_dVb = dVasat_dVb + dVACLM_dVb; dVa_dVd = dVasat_dVd + dVACLM_dVd; /* Calculate VADITS */ T0 = pParam->BSIM4v5pditsd * Vds; if (T0 > EXP_THRESHOLD) { T1 = MAX_EXP; dT1_dVd = 0; } else { T1 = exp(T0); dT1_dVd = T1 * pParam->BSIM4v5pditsd; } if (pParam->BSIM4v5pdits > MIN_EXP) { T2 = 1.0 + model->BSIM4v5pditsl * Leff; VADITS = (1.0 + T2 * T1) / pParam->BSIM4v5pdits; dVADITS_dVg = VADITS * dFP_dVg; dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4v5pdits; VADITS *= FP; } else { VADITS = MAX_EXP; dVADITS_dVg = dVADITS_dVd = 0; } /* Calculate VASCBE */ if (pParam->BSIM4v5pscbe2 > 0.0) { if (diffVds > pParam->BSIM4v5pscbe1 * pParam->BSIM4v5litl / EXP_THRESHOLD) { T0 = pParam->BSIM4v5pscbe1 * pParam->BSIM4v5litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM4v5pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM4v5pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Add DIBL to Ids */ T9 = diffVds / VADIBL; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVADIBL_dVg) / VADIBL; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVADIBL_dVd) / VADIBL; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVADIBL_dVb) / VADIBL; /* Add DITS to Ids */ T9 = diffVds / VADITS; T0 = 1.0 + T9; dIdsa_dVg = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVADITS_dVg) / VADITS; dIdsa_dVd = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVADITS_dVd) / VADITS; dIdsa_dVb = T0 * dIdsa_dVb - Idsa * dVdseff_dVb / VADITS; Idsa *= T0; /* Add CLM to Ids */ T0 = log(Va / Vasat); dT0_dVg = dVa_dVg / Va - dVasat_dVg / Vasat; dT0_dVb = dVa_dVb / Va - dVasat_dVb / Vasat; dT0_dVd = dVa_dVd / Va - dVasat_dVd / Vasat; T1 = T0 / Cclm; T9 = 1.0 + T1; dT9_dVg = (dT0_dVg - T1 * dCclm_dVg) / Cclm; dT9_dVb = (dT0_dVb - T1 * dCclm_dVb) / Cclm; dT9_dVd = (dT0_dVd - T1 * dCclm_dVd) / Cclm; dIdsa_dVg = dIdsa_dVg * T9 + Idsa * dT9_dVg; dIdsa_dVb = dIdsa_dVb * T9 + Idsa * dT9_dVb; dIdsa_dVd = dIdsa_dVd * T9 + Idsa * dT9_dVd; Idsa *= T9; /* Substrate current begins */ tmp = pParam->BSIM4v5alpha0 + pParam->BSIM4v5alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM4v5beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM4v5beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM4v5beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } T4 = Idsa * Vdseff; Isub = T1 * T4; Gbg = T1 * (dIdsa_dVg * Vdseff + Idsa * dVdseff_dVg) + T4 * dT1_dVg; Gbd = T1 * (dIdsa_dVd * Vdseff + Idsa * dVdseff_dVd) + T4 * dT1_dVd; Gbb = T1 * (dIdsa_dVb * Vdseff + Idsa * dVdseff_dVb) + T4 * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; } here->BSIM4v5csub = Isub; here->BSIM4v5gbbs = Gbb; here->BSIM4v5gbgs = Gbg; here->BSIM4v5gbds = Gbd; /* Add SCBE to Ids */ T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; tmp1 = Gds + Gm * dVgsteff_dVd; tmp2 = Gmb + Gm * dVgsteff_dVb; tmp3 = Gm; Gm = (Ids * dVdseff_dVg + Vdseff * tmp3) * dVgsteff_dVg; Gds = Ids * (dVdseff_dVd + dVdseff_dVg * dVgsteff_dVd) + Vdseff * tmp1; Gmb = (Ids * (dVdseff_dVb + dVdseff_dVg * dVgsteff_dVb) + Vdseff * tmp2) * dVbseff_dVb; cdrain = Ids * Vdseff; /* Source End Velocity Limit */ if((model->BSIM4v5vtlGiven) && (model->BSIM4v5vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; vs = cdrain * T11; /* vs */ dvs_dVg = Gm * T11 + cdrain * T10 * dVgsteff_dVg; dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; T1 = vs / (pParam->BSIM4v5vtl * pParam->BSIM4v5tfactor); if(T1 > 0.0) { T2 = 1.0 + exp(T0 * log(T1)); T3 = (T2 - 1.0) * T0 / vs; Fsevl = 1.0 / exp(log(T2)/ T0); dT2_dVg = T3 * dvs_dVg; dT2_dVd = T3 * dvs_dVd; dT2_dVb = T3 * dvs_dVb; T4 = -1.0 / T0 * Fsevl / T2; dFsevl_dVg = T4 * dT2_dVg; dFsevl_dVd = T4 * dT2_dVd; dFsevl_dVb = T4 * dT2_dVb; } else { Fsevl = 1.0; dFsevl_dVg = 0.0; dFsevl_dVd = 0.0; dFsevl_dVb = 0.0; } Gm *=Fsevl; Gm += cdrain * dFsevl_dVg; Gmb *=Fsevl; Gmb += cdrain * dFsevl_dVb; Gds *=Fsevl; Gds += cdrain * dFsevl_dVd; cdrain *= Fsevl; } here->BSIM4v5gds = Gds; here->BSIM4v5gm = Gm; here->BSIM4v5gmbs = Gmb; here->BSIM4v5IdovVds = Ids; if( here->BSIM4v5IdovVds <= 1.0e-9) here->BSIM4v5IdovVds = 1.0e-9; /* Calculate Rg */ if ((here->BSIM4v5rgateMod > 1) || (here->BSIM4v5trnqsMod != 0) || (here->BSIM4v5acnqsMod != 0)) { T9 = pParam->BSIM4v5xrcrg2 * model->BSIM4v5vtm; T0 = T9 * beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; here->BSIM4v5gcrg = pParam->BSIM4v5xrcrg1 * ( T0 + Ids); here->BSIM4v5gcrgd = pParam->BSIM4v5xrcrg1 * (dT0_dVd + tmp1); here->BSIM4v5gcrgb = pParam->BSIM4v5xrcrg1 * (dT0_dVb + tmp2) * dVbseff_dVb; here->BSIM4v5gcrgg = pParam->BSIM4v5xrcrg1 * (dT0_dVg + tmp3) * dVgsteff_dVg; if (here->BSIM4v5nf != 1.0) { here->BSIM4v5gcrg *= here->BSIM4v5nf; here->BSIM4v5gcrgg *= here->BSIM4v5nf; here->BSIM4v5gcrgd *= here->BSIM4v5nf; here->BSIM4v5gcrgb *= here->BSIM4v5nf; } if (here->BSIM4v5rgateMod == 2) { T10 = here->BSIM4v5grgeltd * here->BSIM4v5grgeltd; T11 = here->BSIM4v5grgeltd + here->BSIM4v5gcrg; here->BSIM4v5gcrg = here->BSIM4v5grgeltd * here->BSIM4v5gcrg / T11; T12 = T10 / T11 / T11; here->BSIM4v5gcrgg *= T12; here->BSIM4v5gcrgd *= T12; here->BSIM4v5gcrgb *= T12; } here->BSIM4v5gcrgs = -(here->BSIM4v5gcrgg + here->BSIM4v5gcrgd + here->BSIM4v5gcrgb); } /* Calculate bias-dependent external S/D resistance */ if (model->BSIM4v5rdsMod) { /* Rs(V) */ T0 = vgs - pParam->BSIM4v5vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; T0 = 1.0 + pParam->BSIM4v5prwg * vgs_eff; dT0_dvg = -pParam->BSIM4v5prwg / T0 / T0 * dvgs_eff_dvg; T1 = -pParam->BSIM4v5prwb * vbs; dT1_dvb = -pParam->BSIM4v5prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v5rs0 * 0.5; Rs = pParam->BSIM4v5rswmin + T3 * T4; dRs_dvg = T4 * dT3_dvg; dRs_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v5sourceConductance * Rs; here->BSIM4v5gstot = here->BSIM4v5sourceConductance / T0; T0 = -here->BSIM4v5gstot * here->BSIM4v5gstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dvg; dgstot_dvb = T0 * dRs_dvb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd); /* Rd(V) */ T0 = vgd - pParam->BSIM4v5vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; T0 = 1.0 + pParam->BSIM4v5prwg * vgd_eff; dT0_dvg = -pParam->BSIM4v5prwg / T0 / T0 * dvgd_eff_dvg; T1 = -pParam->BSIM4v5prwb * vbd; dT1_dvb = -pParam->BSIM4v5prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v5rd0 * 0.5; Rd = pParam->BSIM4v5rdwmin + T3 * T4; dRd_dvg = T4 * dT3_dvg; dRd_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v5drainConductance * Rd; here->BSIM4v5gdtot = here->BSIM4v5drainConductance / T0; T0 = -here->BSIM4v5gdtot * here->BSIM4v5gdtot; dgdtot_dvs = 0.0; dgdtot_dvg = T0 * dRd_dvg; dgdtot_dvb = T0 * dRd_dvb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs); here->BSIM4v5gstotd = vses * dgstot_dvd; here->BSIM4v5gstotg = vses * dgstot_dvg; here->BSIM4v5gstots = vses * dgstot_dvs; here->BSIM4v5gstotb = vses * dgstot_dvb; T2 = vdes - vds; here->BSIM4v5gdtotd = T2 * dgdtot_dvd; here->BSIM4v5gdtotg = T2 * dgdtot_dvg; here->BSIM4v5gdtots = T2 * dgdtot_dvs; here->BSIM4v5gdtotb = T2 * dgdtot_dvb; } else /* WDLiu: for bypass */ { here->BSIM4v5gstot = here->BSIM4v5gstotd = here->BSIM4v5gstotg = 0.0; here->BSIM4v5gstots = here->BSIM4v5gstotb = 0.0; here->BSIM4v5gdtot = here->BSIM4v5gdtotd = here->BSIM4v5gdtotg = 0.0; here->BSIM4v5gdtots = here->BSIM4v5gdtotb = 0.0; } /* Calculate GIDL current */ vgs_eff = here->BSIM4v5vgs_eff; dvgs_eff_dvg = here->BSIM4v5dvgs_eff_dvg; T0 = 3.0 * model->BSIM4v5toxe; T1 = (vds - vgs_eff - pParam->BSIM4v5egidl ) / T0; if ((pParam->BSIM4v5agidl <= 0.0) || (pParam->BSIM4v5bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v5cgidl <= 0.0) || (vbd > 0.0)) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgs_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v5bgidl / T1; if (T2 < 100.0) { Igidl = pParam->BSIM4v5agidl * pParam->BSIM4v5weffCJ * T1 * exp(-T2); T3 = Igidl * (1.0 + T2) / T1; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else { Igidl = pParam->BSIM4v5agidl * pParam->BSIM4v5weffCJ * 3.720075976e-44; Ggidld = Igidl * dT1_dVd; Ggidlg = Igidl * dT1_dVg; Igidl *= T1; } T4 = vbd * vbd; T5 = -vbd * T4; T6 = pParam->BSIM4v5cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v5cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; Igidl *= T7; } here->BSIM4v5Igidl = Igidl; here->BSIM4v5ggidld = Ggidld; here->BSIM4v5ggidlg = Ggidlg; here->BSIM4v5ggidlb = Ggidlb; /* Calculate GISL current */ vgd_eff = here->BSIM4v5vgd_eff; dvgd_eff_dvg = here->BSIM4v5dvgd_eff_dvg; T1 = (-vds - vgd_eff - pParam->BSIM4v5egidl ) / T0; if ((pParam->BSIM4v5agidl <= 0.0) || (pParam->BSIM4v5bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v5cgidl <= 0.0) || (vbs > 0.0)) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgd_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v5bgidl / T1; if (T2 < 100.0) { Igisl = pParam->BSIM4v5agidl * pParam->BSIM4v5weffCJ * T1 * exp(-T2); T3 = Igisl * (1.0 + T2) / T1; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else { Igisl = pParam->BSIM4v5agidl * pParam->BSIM4v5weffCJ * 3.720075976e-44; Ggisls = Igisl * dT1_dVd; Ggislg = Igisl * dT1_dVg; Igisl *= T1; } T4 = vbs * vbs; T5 = -vbs * T4; T6 = pParam->BSIM4v5cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v5cgidl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; Igisl *= T7; } here->BSIM4v5Igisl = Igisl; here->BSIM4v5ggisls = Ggisls; here->BSIM4v5ggislg = Ggislg; here->BSIM4v5ggislb = Ggislb; /* Calculate gate tunneling current */ if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { Vfb = here->BSIM4v5vfbzb; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1; /* WDLiu: -No surprise? No. -Good! */ Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) /* WDLiu: Avoiding numerical instability. */ Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; T0 = 0.5 * pParam->BSIM4v5k1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->BSIM4v5k1ox == 0.0) Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = 0.0; else if (T3 < 0.0) { Voxdepinv = -T3; dVoxdepinv_dVg = -dVgs_eff_dVg + dVfbeff_dVg + dVgsteff_dVg; dVoxdepinv_dVd = dVgsteff_dVd; dVoxdepinv_dVb = dVfbeff_dVb + 1.0 + dVgsteff_dVb; } else { T1 = sqrt(T0 * T0 + T3); T2 = T0 / T1; Voxdepinv = pParam->BSIM4v5k1ox * (T1 - T0); dVoxdepinv_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dVoxdepinv_dVd = -T2 * dVgsteff_dVd; dVoxdepinv_dVb = -T2 * (dVfbeff_dVb + 1.0 + dVgsteff_dVb); } Voxdepinv += Vgsteff; dVoxdepinv_dVg += dVgsteff_dVg; dVoxdepinv_dVd += dVgsteff_dVd; dVoxdepinv_dVb += dVgsteff_dVb; } if(model->BSIM4v5tempMod < 2) tmp = Vtm; else /* model->BSIM4v5tempMod = 2 */ tmp = Vtm0; if (model->BSIM4v5igcMod) { T0 = tmp * pParam->BSIM4v5nigc; if(model->BSIM4v5igcMod == 1) { VxNVt = (Vgs_eff - model->BSIM4v5type * here->BSIM4v5vth0) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - model->BSIM4v5type * here->BSIM4v5vth0; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; } } else if (model->BSIM4v5igcMod == 2) { VxNVt = (Vgs_eff - here->BSIM4v5von) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - here->BSIM4v5von; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = -dVth_dVd; dVaux_dVb = -dVth_dVb; } } if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else if ((VxNVt >= -EXP_THRESHOLD) && (VxNVt <= EXP_THRESHOLD)) { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); if(model->BSIM4v5igcMod == 1) { dVaux_dVd = 0.0; dVaux_dVb = 0.0; } else if (model->BSIM4v5igcMod == 2) { dVaux_dVd = -dVgs_eff_dVg * dVth_dVd; dVaux_dVb = -dVgs_eff_dVg * dVth_dVb; } dVaux_dVg *= dVgs_eff_dVg; } T2 = Vgs_eff * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + Vgs_eff * dVaux_dVg; dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; T11 = pParam->BSIM4v5Aechvb; T12 = pParam->BSIM4v5Bechvb; T3 = pParam->BSIM4v5aigc * pParam->BSIM4v5cigc - pParam->BSIM4v5bigc; T4 = pParam->BSIM4v5bigc * pParam->BSIM4v5cigc; T5 = T12 * (pParam->BSIM4v5aigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igc = T11 * T2 * T6; dIgc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); if (model->BSIM4v5pigcdGiven) { Pigcd = pParam->BSIM4v5pigcd; dPigcd_dVg = dPigcd_dVd = dPigcd_dVb = 0.0; } else { T11 = pParam->BSIM4v5Bechvb * model->BSIM4v5toxe; T12 = Vgsteff + 1.0e-20; T13 = T11 / T12 / T12; T14 = -T13 / T12; Pigcd = T13 * (1.0 - 0.5 * Vdseff / T12); dPigcd_dVg = T14 * (2.0 + 0.5 * (dVdseff_dVg - 3.0 * Vdseff / T12)); dPigcd_dVd = 0.5 * T14 * dVdseff_dVd; dPigcd_dVb = 0.5 * T14 * dVdseff_dVb; } T7 = -Pigcd * Vdseff; /* bugfix */ dT7_dVg = -Vdseff * dPigcd_dVg - Pigcd * dVdseff_dVg; dT7_dVd = -Vdseff * dPigcd_dVd - Pigcd * dVdseff_dVd + dT7_dVg * dVgsteff_dVd; dT7_dVb = -Vdseff * dPigcd_dVb - Pigcd * dVdseff_dVb + dT7_dVg * dVgsteff_dVb; dT7_dVg *= dVgsteff_dVg; dT7_dVb *= dVbseff_dVb; T8 = T7 * T7 + 2.0e-4; dT8_dVg = 2.0 * T7; dT8_dVd = dT8_dVg * dT7_dVd; dT8_dVb = dT8_dVg * dT7_dVb; dT8_dVg *= dT7_dVg; if (T7 > EXP_THRESHOLD) { T9 = MAX_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else if (T7 < -EXP_THRESHOLD) { T9 = MIN_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else { T9 = exp(T7); dT9_dVg = T9 * dT7_dVg; dT9_dVd = T9 * dT7_dVd; dT9_dVb = T9 * dT7_dVb; } T0 = T8 * T8; T1 = T9 - 1.0 + 1.0e-4; T10 = (T1 - T7) / T8; dT10_dVg = (dT9_dVg - dT7_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT9_dVd - dT7_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT9_dVb - dT7_dVb - T10 * dT8_dVb) / T8; Igcs = Igc * T10; dIgcs_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcs_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcs_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; T1 = T9 - 1.0 - 1.0e-4; T10 = (T7 * T9 - T1) / T8; dT10_dVg = (dT7_dVg * T9 + (T7 - 1.0) * dT9_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT7_dVd * T9 + (T7 - 1.0) * dT9_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT7_dVb * T9 + (T7 - 1.0) * dT9_dVb - T10 * dT8_dVb) / T8; Igcd = Igc * T10; dIgcd_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; here->BSIM4v5Igcs = Igcs; here->BSIM4v5gIgcsg = dIgcs_dVg; here->BSIM4v5gIgcsd = dIgcs_dVd; here->BSIM4v5gIgcsb = dIgcs_dVb * dVbseff_dVb; here->BSIM4v5Igcd = Igcd; here->BSIM4v5gIgcdg = dIgcd_dVg; here->BSIM4v5gIgcdd = dIgcd_dVd; here->BSIM4v5gIgcdb = dIgcd_dVb * dVbseff_dVb; T0 = vgs - (pParam->BSIM4v5vfbsd + pParam->BSIM4v5vfbsdoff); vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; T11 = pParam->BSIM4v5AechvbEdge; T12 = pParam->BSIM4v5BechvbEdge; T3 = pParam->BSIM4v5aigsd * pParam->BSIM4v5cigsd - pParam->BSIM4v5bigsd; T4 = pParam->BSIM4v5bigsd * pParam->BSIM4v5cigsd; T5 = T12 * (pParam->BSIM4v5aigsd + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgs_eff) * dvgs_eff_dvg; } Igs = T11 * T2 * T6; dIgs_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgs_dVs = -dIgs_dVg; T0 = vgd - (pParam->BSIM4v5vfbsd + pParam->BSIM4v5vfbsdoff); vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; T5 = T12 * (pParam->BSIM4v5aigsd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgd_eff) * dvgd_eff_dvg; } Igd = T11 * T2 * T6; dIgd_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; here->BSIM4v5Igs = Igs; here->BSIM4v5gIgsg = dIgs_dVg; here->BSIM4v5gIgss = dIgs_dVs; here->BSIM4v5Igd = Igd; here->BSIM4v5gIgdg = dIgd_dVg; here->BSIM4v5gIgdd = dIgd_dVd; } else { here->BSIM4v5Igcs = here->BSIM4v5gIgcsg = here->BSIM4v5gIgcsd = here->BSIM4v5gIgcsb = 0.0; here->BSIM4v5Igcd = here->BSIM4v5gIgcdg = here->BSIM4v5gIgcdd = here->BSIM4v5gIgcdb = 0.0; here->BSIM4v5Igs = here->BSIM4v5gIgsg = here->BSIM4v5gIgss = 0.0; here->BSIM4v5Igd = here->BSIM4v5gIgdg = here->BSIM4v5gIgdd = 0.0; } if (model->BSIM4v5igbMod) { T0 = tmp * pParam->BSIM4v5nigbacc; T1 = -Vgs_eff + Vbseff + Vfb; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = -dVgs_eff_dVg; dVaux_dVb = 1.0; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVb = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVg = -dVaux_dVb * dVgs_eff_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 = 4.97232e-7 * pParam->BSIM4v5weff * pParam->BSIM4v5leff * pParam->BSIM4v5ToxRatio; T12 = -7.45669e11 * model->BSIM4v5toxe; T3 = pParam->BSIM4v5aigbacc * pParam->BSIM4v5cigbacc - pParam->BSIM4v5bigbacc; T4 = pParam->BSIM4v5bigbacc * pParam->BSIM4v5cigbacc; T5 = T12 * (pParam->BSIM4v5aigbacc + T3 * Voxacc - T4 * Voxacc * Voxacc); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxacc); dT6_dVb = dT6_dVg * dVoxacc_dVb; dT6_dVg *= dVoxacc_dVg; } Igbacc = T11 * T2 * T6; dIgbacc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbacc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); T0 = tmp * pParam->BSIM4v5nigbinv; T1 = Voxdepinv - pParam->BSIM4v5eigbinv; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = dVoxdepinv_dVg; dVaux_dVd = dVoxdepinv_dVd; dVaux_dVb = dVoxdepinv_dVb; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = dVaux_dVg * dVoxdepinv_dVd; dVaux_dVb = dVaux_dVg * dVoxdepinv_dVb; dVaux_dVg *= dVoxdepinv_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVd = (Vgs_eff - Vbseff) * dVaux_dVd; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 *= 0.75610; T12 *= 1.31724; T3 = pParam->BSIM4v5aigbinv * pParam->BSIM4v5cigbinv - pParam->BSIM4v5bigbinv; T4 = pParam->BSIM4v5bigbinv * pParam->BSIM4v5cigbinv; T5 = T12 * (pParam->BSIM4v5aigbinv + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igbinv = T11 * T2 * T6; dIgbinv_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbinv_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgbinv_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); here->BSIM4v5Igb = Igbinv + Igbacc; here->BSIM4v5gIgbg = dIgbinv_dVg + dIgbacc_dVg; here->BSIM4v5gIgbd = dIgbinv_dVd; here->BSIM4v5gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; } else { here->BSIM4v5Igb = here->BSIM4v5gIgbg = here->BSIM4v5gIgbd = here->BSIM4v5gIgbs = here->BSIM4v5gIgbb = 0.0; } /* End of Gate current */ if (here->BSIM4v5nf != 1.0) { cdrain *= here->BSIM4v5nf; here->BSIM4v5gds *= here->BSIM4v5nf; here->BSIM4v5gm *= here->BSIM4v5nf; here->BSIM4v5gmbs *= here->BSIM4v5nf; here->BSIM4v5IdovVds *= here->BSIM4v5nf; here->BSIM4v5gbbs *= here->BSIM4v5nf; here->BSIM4v5gbgs *= here->BSIM4v5nf; here->BSIM4v5gbds *= here->BSIM4v5nf; here->BSIM4v5csub *= here->BSIM4v5nf; here->BSIM4v5Igidl *= here->BSIM4v5nf; here->BSIM4v5ggidld *= here->BSIM4v5nf; here->BSIM4v5ggidlg *= here->BSIM4v5nf; here->BSIM4v5ggidlb *= here->BSIM4v5nf; here->BSIM4v5Igisl *= here->BSIM4v5nf; here->BSIM4v5ggisls *= here->BSIM4v5nf; here->BSIM4v5ggislg *= here->BSIM4v5nf; here->BSIM4v5ggislb *= here->BSIM4v5nf; here->BSIM4v5Igcs *= here->BSIM4v5nf; here->BSIM4v5gIgcsg *= here->BSIM4v5nf; here->BSIM4v5gIgcsd *= here->BSIM4v5nf; here->BSIM4v5gIgcsb *= here->BSIM4v5nf; here->BSIM4v5Igcd *= here->BSIM4v5nf; here->BSIM4v5gIgcdg *= here->BSIM4v5nf; here->BSIM4v5gIgcdd *= here->BSIM4v5nf; here->BSIM4v5gIgcdb *= here->BSIM4v5nf; here->BSIM4v5Igs *= here->BSIM4v5nf; here->BSIM4v5gIgsg *= here->BSIM4v5nf; here->BSIM4v5gIgss *= here->BSIM4v5nf; here->BSIM4v5Igd *= here->BSIM4v5nf; here->BSIM4v5gIgdg *= here->BSIM4v5nf; here->BSIM4v5gIgdd *= here->BSIM4v5nf; here->BSIM4v5Igb *= here->BSIM4v5nf; here->BSIM4v5gIgbg *= here->BSIM4v5nf; here->BSIM4v5gIgbd *= here->BSIM4v5nf; here->BSIM4v5gIgbb *= here->BSIM4v5nf; } here->BSIM4v5ggidls = -(here->BSIM4v5ggidld + here->BSIM4v5ggidlg + here->BSIM4v5ggidlb); here->BSIM4v5ggisld = -(here->BSIM4v5ggisls + here->BSIM4v5ggislg + here->BSIM4v5ggislb); here->BSIM4v5gIgbs = -(here->BSIM4v5gIgbg + here->BSIM4v5gIgbd + here->BSIM4v5gIgbb); here->BSIM4v5gIgcss = -(here->BSIM4v5gIgcsg + here->BSIM4v5gIgcsd + here->BSIM4v5gIgcsb); here->BSIM4v5gIgcds = -(here->BSIM4v5gIgcdg + here->BSIM4v5gIgcdd + here->BSIM4v5gIgcdb); here->BSIM4v5cd = cdrain; if (model->BSIM4v5tnoiMod == 0) { Abulk = Abulk0 * pParam->BSIM4v5abulkCVfactor; Vdsat = Vgsteff / Abulk; T0 = Vdsat - Vds - DELTA_4; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * Vdsat); if (T0 >= 0.0) Vdseff = Vdsat - 0.5 * (T0 + T1); else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = Vdsat * T3 / (T1 - T0); Vdseff = Vdsat * T4; } if (Vds == 0.0) Vdseff = 0.0; T0 = Abulk * Vdseff; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = Vdseff / T1; T3 = T0 * T2; here->BSIM4v5qinv = Coxeff * pParam->BSIM4v5weffCV * here->BSIM4v5nf * pParam->BSIM4v5leffCV * (Vgsteff - 0.5 * T0 + Abulk * T3); } /* * BSIM4v5 C-V begins */ if ((model->BSIM4v5xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM4v5cggb = here->BSIM4v5cgsb = here->BSIM4v5cgdb = 0.0; here->BSIM4v5cdgb = here->BSIM4v5cdsb = here->BSIM4v5cddb = 0.0; here->BSIM4v5cbgb = here->BSIM4v5cbsb = here->BSIM4v5cbdb = 0.0; here->BSIM4v5csgb = here->BSIM4v5cssb = here->BSIM4v5csdb = 0.0; here->BSIM4v5cgbb = here->BSIM4v5csbb = here->BSIM4v5cdbb = here->BSIM4v5cbbb = 0.0; here->BSIM4v5cqdb = here->BSIM4v5cqsb = here->BSIM4v5cqgb = here->BSIM4v5cqbb = 0.0; here->BSIM4v5gtau = 0.0; goto finished; } else if (model->BSIM4v5capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = pParam->BSIM4v5phi - Phis; dVbseff_dVb = -dPhis_dVb; } Vfb = pParam->BSIM4v5vfbcv; Vth = Vfb + pParam->BSIM4v5phi + pParam->BSIM4v5k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM4v5k1ox * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * pParam->BSIM4v5leffCV * here->BSIM4v5nf; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM4v5cggb = CoxWL * dVgs_eff_dVg; here->BSIM4v5cgdb = 0.0; here->BSIM4v5cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM4v5cdgb = 0.0; here->BSIM4v5cddb = 0.0; here->BSIM4v5cdsb = 0.0; here->BSIM4v5cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM4v5cbdb = 0.0; here->BSIM4v5cbsb = -here->BSIM4v5cgsb; } /* Arg1 <= 0.0, end of accumulation */ else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM4v5k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM4v5k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM4v5cggb = T0 * dVgs_eff_dVg; here->BSIM4v5cgdb = 0.0; here->BSIM4v5cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM4v5cdgb = 0.0; here->BSIM4v5cddb = 0.0; here->BSIM4v5cdsb = 0.0; here->BSIM4v5cbgb = -here->BSIM4v5cggb; here->BSIM4v5cbdb = 0.0; here->BSIM4v5cbsb = -here->BSIM4v5cgsb; } /* Vgst <= 0.0, end of depletion */ else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM4v5abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v5abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; if (model->BSIM4v5xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM4v5cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v5cgsb = -(here->BSIM4v5cggb + T2); here->BSIM4v5cgdb = 0.0; here->BSIM4v5cdgb = 0.0; here->BSIM4v5cddb = 0.0; here->BSIM4v5cdsb = 0.0; here->BSIM4v5cbgb = -(here->BSIM4v5cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v5cbsb = -(here->BSIM4v5cbgb + T3); here->BSIM4v5cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM4v5cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v5cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v5cgsb = -(here->BSIM4v5cggb + T11 + here->BSIM4v5cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM4v5cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM4v5cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM4v5cdsb = -(here->BSIM4v5cdgb + T12 + here->BSIM4v5cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM4v5cbgb = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + T10); here->BSIM4v5cbdb = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + T12); here->BSIM4v5cbsb = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + T0); } } else if (model->BSIM4v5xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM4v5cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v5cgsb = -(here->BSIM4v5cggb + T2); here->BSIM4v5cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM4v5cdgb = -T3 * dVgs_eff_dVg; here->BSIM4v5cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM4v5cdsb = -(T4 + here->BSIM4v5cdgb); here->BSIM4v5cbgb = -(here->BSIM4v5cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v5cbsb = -(here->BSIM4v5cbgb + T3); here->BSIM4v5cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v5cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v5cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v5cgsb = -(here->BSIM4v5cggb + here->BSIM4v5cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM4v5cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM4v5cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM4v5cdsb = -(here->BSIM4v5cdgb + T10 + here->BSIM4v5cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - here->BSIM4v5cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM4v5cddb; tmp = -(T10 + T11 + T12); here->BSIM4v5cbgb = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + T12); here->BSIM4v5cbdb = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + T10); here->BSIM4v5cbsb = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + tmp); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM4v5cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v5cgsb = -(here->BSIM4v5cggb + T2); here->BSIM4v5cgdb = 0.0; here->BSIM4v5cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM4v5cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM4v5cdsb = -(T4 + here->BSIM4v5cdgb); here->BSIM4v5cbgb = -(here->BSIM4v5cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v5cbsb = -(here->BSIM4v5cbgb + T3); here->BSIM4v5cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v5phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v5cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v5cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v5cgsb = -(here->BSIM4v5cggb + here->BSIM4v5cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM4v5cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM4v5cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM4v5cdsb = -(here->BSIM4v5cdgb + T12 + here->BSIM4v5cddb); here->BSIM4v5cbgb = -(here->BSIM4v5cggb + 2.0 * here->BSIM4v5cdgb); here->BSIM4v5cbdb = -(here->BSIM4v5cgdb + 2.0 * here->BSIM4v5cddb); here->BSIM4v5cbsb = -(here->BSIM4v5cgsb + 2.0 * here->BSIM4v5cdsb); } /* end of linear region */ } /* end of 50/50 partition */ } /* end of inversion */ } /* end of capMod=0 */ else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4v5phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * pParam->BSIM4v5leffCV * here->BSIM4v5nf; /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM4v5noff; dnoff_dVd = pParam->BSIM4v5noff * dn_dVd; dnoff_dVb = pParam->BSIM4v5noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM4v5voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV */ if (model->BSIM4v5capMod == 1) { Vfb = here->BSIM4v5vfbzb; V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; T0 = 0.5 * pParam->BSIM4v5k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v5k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v5k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM4v5k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM4v5abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v5abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = 1.0 / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (1.0 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM4v5xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM4v5xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v5cggb = Cgg; here->BSIM4v5cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v5cgdb = Cgd; here->BSIM4v5cdgb = -(Cgg + Cbg + Csg); here->BSIM4v5cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v5cddb = -(Cgd + Cbd + Csd); here->BSIM4v5cbgb = Cbg; here->BSIM4v5cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v5cbdb = Cbd; } /* Charge-Thickness capMod (CTM) begins */ else if (model->BSIM4v5capMod == 2) { V3 = here->BSIM4v5vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM4v5vfbzb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4v5vfbzb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4v5vfbzb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM4v5vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM4v5coxp; Tox = 1.0e8 * model->BSIM4v5toxp; T0 = (Vgs_eff - VbseffCV - here->BSIM4v5vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; tmp = T0 * pParam->BSIM4v5acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM4v5ldeb * exp(tmp); dTcen_dVg = pParam->BSIM4v5acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM4v5ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM4v5ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM4v5toxp; V3 = pParam->BSIM4v5ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4v5ldeb); Tcen = pParam->BSIM4v5ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = EPSSI / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v5coxe; Qac0 = CoxWLcen * (Vfbeff - here->BSIM4v5vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM4v5k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v5k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v5k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM4v5k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM4v5k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM4v5moin * Vtm; T0 = 0.5 * pParam->BSIM4v5sqrtPhi; } else { Denomi = pParam->BSIM4v5moin * Vtm * pParam->BSIM4v5k1ox * pParam->BSIM4v5k1ox; T0 = pParam->BSIM4v5k1ox * pParam->BSIM4v5sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); /* End of delta Phis */ /* VgDP = Vgsteff - DeltaPhi */ T0 = Vgsteff - DeltaPhi - 0.001; dT0_dVg = 1.0 - dDeltaPhi_dVg; T1 = sqrt(T0 * T0 + Vgsteff * 0.004); VgDP = 0.5 * (T0 + T1); dVgDP_dVg = 0.5 * (dT0_dVg + (T0 * dT0_dVg + 0.002) / T1); Tox += Tox; /* WDLiu: Tcen reevaluated below due to different Vgsteff */ T0 = (Vgsteff + here->BSIM4v5vtfbphi2) / Tox; tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 / T1; dTcen_dVd = dTcen_dVg * dVgsteff_dVd; dTcen_dVb = dTcen_dVg * dVgsteff_dVb; dTcen_dVg *= dVgsteff_dVg; Ccen = EPSSI / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v5coxe; AbulkCV = Abulk0 * pParam->BSIM4v5abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v5abulkCVfactor * dAbulk0_dVb; VdsatCV = VgDP / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = dVgDP_dVg / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (1.0 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = VgDP; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * dVgDP_dVg + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * dVgDP_dVg; T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM4v5xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * dVgDP_dVg; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM4v5xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * dVgDP_dVg + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v5cggb = Cgg; here->BSIM4v5cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v5cgdb = Cgd; here->BSIM4v5cdgb = -(Cgg + Cbg + Csg); here->BSIM4v5cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v5cddb = -(Cgd + Cbd + Csd); here->BSIM4v5cbgb = Cbg; here->BSIM4v5cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v5cbdb = Cbd; } /* End of CTM */ } here->BSIM4v5csgb = - here->BSIM4v5cggb - here->BSIM4v5cdgb - here->BSIM4v5cbgb; here->BSIM4v5csdb = - here->BSIM4v5cgdb - here->BSIM4v5cddb - here->BSIM4v5cbdb; here->BSIM4v5cssb = - here->BSIM4v5cgsb - here->BSIM4v5cdsb - here->BSIM4v5cbsb; here->BSIM4v5cgbb = - here->BSIM4v5cgdb - here->BSIM4v5cggb - here->BSIM4v5cgsb; here->BSIM4v5cdbb = - here->BSIM4v5cddb - here->BSIM4v5cdgb - here->BSIM4v5cdsb; here->BSIM4v5cbbb = - here->BSIM4v5cbgb - here->BSIM4v5cbdb - here->BSIM4v5cbsb; here->BSIM4v5csbb = - here->BSIM4v5cgbb - here->BSIM4v5cdbb - here->BSIM4v5cbbb; here->BSIM4v5qgate = qgate; here->BSIM4v5qbulk = qbulk; here->BSIM4v5qdrn = qdrn; here->BSIM4v5qsrc = -(qgate + qbulk + qdrn); /* NQS begins */ if ((here->BSIM4v5trnqsMod) || (here->BSIM4v5acnqsMod)) { here->BSIM4v5qchqs = qcheq = -(qbulk + qgate); here->BSIM4v5cqgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb); here->BSIM4v5cqdb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb); here->BSIM4v5cqsb = -(here->BSIM4v5cgsb + here->BSIM4v5cbsb); here->BSIM4v5cqbb = -(here->BSIM4v5cqgb + here->BSIM4v5cqdb + here->BSIM4v5cqsb); CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * here->BSIM4v5nf * pParam->BSIM4v5leffCV; T1 = here->BSIM4v5gcrg / CoxWL; /* 1 / tau */ here->BSIM4v5gtau = T1 * ScalingFactor; if (here->BSIM4v5acnqsMod) here->BSIM4v5taunet = 1.0 / T1; *(ckt->CKTstate0 + here->BSIM4v5qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v5qcheq) = *(ckt->CKTstate0 + here->BSIM4v5qcheq); if (here->BSIM4v5trnqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qcheq); if (error) return(error); } } finished: /* Calculate junction C-V */ if (ChargeComputationNeeded) { czbd = model->BSIM4v5DunitAreaTempJctCap * here->BSIM4v5Adeff; /* bug fix */ czbs = model->BSIM4v5SunitAreaTempJctCap * here->BSIM4v5Aseff; czbdsw = model->BSIM4v5DunitLengthSidewallTempJctCap * here->BSIM4v5Pdeff; czbdswg = model->BSIM4v5DunitLengthGateSidewallTempJctCap * pParam->BSIM4v5weffCJ * here->BSIM4v5nf; czbssw = model->BSIM4v5SunitLengthSidewallTempJctCap * here->BSIM4v5Pseff; czbsswg = model->BSIM4v5SunitLengthGateSidewallTempJctCap * pParam->BSIM4v5weffCJ * here->BSIM4v5nf; MJS = model->BSIM4v5SbulkJctBotGradingCoeff; MJSWS = model->BSIM4v5SbulkJctSideGradingCoeff; MJSWGS = model->BSIM4v5SbulkJctGateSideGradingCoeff; MJD = model->BSIM4v5DbulkJctBotGradingCoeff; MJSWD = model->BSIM4v5DbulkJctSideGradingCoeff; MJSWGD = model->BSIM4v5DbulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v5qbs) = 0.0; here->BSIM4v5capbs = czbs + czbssw + czbsswg; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v5PhiBS; if (MJS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbs) = model->BSIM4v5PhiBS * czbs * (1.0 - arg * sarg) / (1.0 - MJS); here->BSIM4v5capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v5qbs) = 0.0; here->BSIM4v5capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v5PhiBSWS; if (MJSWS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbs) += model->BSIM4v5PhiBSWS * czbssw * (1.0 - arg * sarg) / (1.0 - MJSWS); here->BSIM4v5capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v5PhiBSWGS; if (MJSWGS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbs) += model->BSIM4v5PhiBSWGS * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWGS); here->BSIM4v5capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs_jct * (czbs * MJS / model->BSIM4v5PhiBS + czbssw * MJSWS / model->BSIM4v5PhiBSWS + czbsswg * MJSWGS / model->BSIM4v5PhiBSWGS); *(ckt->CKTstate0 + here->BSIM4v5qbs) = vbs_jct * (T0 + 0.5 * T1); here->BSIM4v5capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v5qbd) = 0.0; here->BSIM4v5capbd = czbd + czbdsw + czbdswg; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v5PhiBD; if (MJD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbd) = model->BSIM4v5PhiBD* czbd * (1.0 - arg * sarg) / (1.0 - MJD); here->BSIM4v5capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v5qbd) = 0.0; here->BSIM4v5capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v5PhiBSWD; if (MJSWD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbd) += model->BSIM4v5PhiBSWD * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSWD); here->BSIM4v5capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v5PhiBSWGD; if (MJSWGD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v5qbd) += model->BSIM4v5PhiBSWGD * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWGD); here->BSIM4v5capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd_jct * (czbd * MJD / model->BSIM4v5PhiBD + czbdsw * MJSWD / model->BSIM4v5PhiBSWD + czbdswg * MJSWGD / model->BSIM4v5PhiBSWGD); *(ckt->CKTstate0 + here->BSIM4v5qbd) = vbd_jct * (T0 + 0.5 * T1); here->BSIM4v5capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM4v5off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM4v5mode >= 0) { Idtot = here->BSIM4v5cd + here->BSIM4v5csub + here->BSIM4v5Igidl - here->BSIM4v5cbd; } else { Idtot = here->BSIM4v5cd + here->BSIM4v5cbd - here->BSIM4v5Igidl; /* bugfix */ } tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; } else if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; } else { Ibtot = here->BSIM4v5cbs + here->BSIM4v5cbd - here->BSIM4v5Igidl - here->BSIM4v5Igisl - here->BSIM4v5csub; tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM4v5vds) = vds; *(ckt->CKTstate0 + here->BSIM4v5vgs) = vgs; *(ckt->CKTstate0 + here->BSIM4v5vbs) = vbs; *(ckt->CKTstate0 + here->BSIM4v5vbd) = vbd; *(ckt->CKTstate0 + here->BSIM4v5vges) = vges; *(ckt->CKTstate0 + here->BSIM4v5vgms) = vgms; *(ckt->CKTstate0 + here->BSIM4v5vdbs) = vdbs; *(ckt->CKTstate0 + here->BSIM4v5vdbd) = vdbd; *(ckt->CKTstate0 + here->BSIM4v5vsbs) = vsbs; *(ckt->CKTstate0 + here->BSIM4v5vses) = vses; *(ckt->CKTstate0 + here->BSIM4v5vdes) = vdes; *(ckt->CKTstate0 + here->BSIM4v5qdef) = qdef; if (!ChargeComputationNeeded) goto line850; if (here->BSIM4v5rgateMod == 3) { vgdx = vgmd; vgsx = vgms; } else /* For rgateMod == 0, 1 and 2 */ { vgdx = vgd; vgsx = vgs; } if (model->BSIM4v5capMod == 0) { cgdo = pParam->BSIM4v5cgdo; qgdo = pParam->BSIM4v5cgdo * vgdx; cgso = pParam->BSIM4v5cgso; qgso = pParam->BSIM4v5cgso * vgsx; } else /* For both capMod == 1 and 2 */ { T0 = vgdx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v5weffCV * pParam->BSIM4v5cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v5ckappad); cgdo = pParam->BSIM4v5cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM4v5cgdo + T3) * vgdx - T3 * (T2 + 0.5 * pParam->BSIM4v5ckappad * (T4 - 1.0)); T0 = vgsx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v5weffCV * pParam->BSIM4v5cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v5ckappas); cgso = pParam->BSIM4v5cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM4v5cgso + T3) * vgsx - T3 * (T2 + 0.5 * pParam->BSIM4v5ckappas * (T4 - 1.0)); } if (here->BSIM4v5nf != 1.0) { cgdo *= here->BSIM4v5nf; cgso *= here->BSIM4v5nf; qgdo *= here->BSIM4v5nf; qgso *= here->BSIM4v5nf; } here->BSIM4v5cgdo = cgdo; here->BSIM4v5qgdo = qgdo; here->BSIM4v5cgso = cgso; here->BSIM4v5qgso = qgso; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (here->BSIM4v5mode > 0) { if (here->BSIM4v5trnqsMod == 0) { qdrn -= qgdo; if (here->BSIM4v5rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v5cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v5cggb * ag0; gcgdb = here->BSIM4v5cgdb * ag0; gcgsb = here->BSIM4v5cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = here->BSIM4v5cdgb * ag0; gcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb) * ag0; gcbgb = here->BSIM4v5cbgb * ag0; qgmb = pParam->BSIM4v5cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qsrc = -(qgate + qgmid + qbulk + qdrn); } else { gcggb = (here->BSIM4v5cggb + cgdo + cgso + pParam->BSIM4v5cgbo ) * ag0; gcgdb = (here->BSIM4v5cgdb - cgdo) * ag0; gcgsb = (here->BSIM4v5cgsb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = (here->BSIM4v5cdgb - cgdo) * ag0; gcsgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb + cgso) * ag0; gcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v5cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v5cddb + here->BSIM4v5capbd + cgdo) * ag0; gcdsb = here->BSIM4v5cdsb * ag0; gcsdb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb + here->BSIM4v5cddb) * ag0; gcssb = (here->BSIM4v5capbs + cgso - (here->BSIM4v5cgsb + here->BSIM4v5cbsb + here->BSIM4v5cdsb)) * ag0; if (!here->BSIM4v5rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v5cbdb - here->BSIM4v5capbd) * ag0; gcbsb = (here->BSIM4v5cbsb - here->BSIM4v5capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb + here->BSIM4v5cdsb) * ag0; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb) + here->BSIM4v5capbs * ag0; gcbdb = here->BSIM4v5cbdb * ag0; gcbsb = here->BSIM4v5cbsb * ag0; gcdbdb = -here->BSIM4v5capbd * ag0; gcsbsb = -here->BSIM4v5capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v5qchqs; CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * here->BSIM4v5nf * pParam->BSIM4v5leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v5gtg = T0 * here->BSIM4v5gcrgg; ggtd = here->BSIM4v5gtd = T0 * here->BSIM4v5gcrgd; ggts = here->BSIM4v5gts = T0 * here->BSIM4v5gcrgs; ggtb = here->BSIM4v5gtb = T0 * here->BSIM4v5gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v5cqgb * ag0; gcqdb = here->BSIM4v5cqdb * ag0; gcqsb = here->BSIM4v5cqsb * ag0; gcqbb = here->BSIM4v5cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v5xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v5xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM4v5cddb; Csd = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + here->BSIM4v5cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v5cdgb; Csg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + here->BSIM4v5cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v5cdsb; Css = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + here->BSIM4v5cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); if (here->BSIM4v5rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v5cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v5cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -(qgmid + qbulk + qdrn); } else { gcggb = (cgdo + cgso + pParam->BSIM4v5cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v5cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v5cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v5capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v5capbs + cgso) * ag0; if (!here->BSIM4v5rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v5capbd * ag0; gcbsb = -here->BSIM4v5capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v5capbd * ag0; gcsbsb = -here->BSIM4v5capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } else { if (here->BSIM4v5trnqsMod == 0) { qsrc = qdrn - qgso; if (here->BSIM4v5rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v5cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v5cggb * ag0; gcgdb = here->BSIM4v5cgsb * ag0; gcgsb = here->BSIM4v5cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb) * ag0; gcsgb = here->BSIM4v5cdgb * ag0; gcbgb = here->BSIM4v5cbgb * ag0; qgmb = pParam->BSIM4v5cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qdrn = -(qgate + qgmid + qbulk + qsrc); } else { gcggb = (here->BSIM4v5cggb + cgdo + cgso + pParam->BSIM4v5cgbo ) * ag0; gcgdb = (here->BSIM4v5cgsb - cgdo) * ag0; gcgsb = (here->BSIM4v5cgdb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v5cggb + here->BSIM4v5cbgb + here->BSIM4v5cdgb + cgdo) * ag0; gcsgb = (here->BSIM4v5cdgb - cgso) * ag0; gcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v5cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qdrn = -(qgate + qbulk + qsrc); } gcddb = (here->BSIM4v5capbd + cgdo - (here->BSIM4v5cgsb + here->BSIM4v5cbsb + here->BSIM4v5cdsb)) * ag0; gcdsb = -(here->BSIM4v5cgdb + here->BSIM4v5cbdb + here->BSIM4v5cddb) * ag0; gcsdb = here->BSIM4v5cdsb * ag0; gcssb = (here->BSIM4v5cddb + here->BSIM4v5capbs + cgso) * ag0; if (!here->BSIM4v5rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v5cbsb - here->BSIM4v5capbd) * ag0; gcbsb = (here->BSIM4v5cbdb - here->BSIM4v5capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb) + here->BSIM4v5capbd * ag0; gcsbb = -(here->BSIM4v5cddb + here->BSIM4v5cdgb + here->BSIM4v5cdsb) * ag0; gcbdb = here->BSIM4v5cbsb * ag0; gcbsb = here->BSIM4v5cbdb * ag0; gcdbdb = -here->BSIM4v5capbd * ag0; gcsbsb = -here->BSIM4v5capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v5qchqs; CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * here->BSIM4v5nf * pParam->BSIM4v5leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v5gtg = T0 * here->BSIM4v5gcrgg; ggts = here->BSIM4v5gts = T0 * here->BSIM4v5gcrgd; ggtd = here->BSIM4v5gtd = T0 * here->BSIM4v5gcrgs; ggtb = here->BSIM4v5gtb = T0 * here->BSIM4v5gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v5cqgb * ag0; gcqdb = here->BSIM4v5cqsb * ag0; gcqsb = here->BSIM4v5cqdb * ag0; gcqbb = here->BSIM4v5cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v5xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v5xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM4v5cddb; Cds = -(here->BSIM4v5cgdb + here->BSIM4v5cddb + here->BSIM4v5cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v5cdgb; Cdg = -(here->BSIM4v5cggb + here->BSIM4v5cdgb + here->BSIM4v5cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v5cdsb; Cdd = -(here->BSIM4v5cgsb + here->BSIM4v5cdsb + here->BSIM4v5cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); if (here->BSIM4v5rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v5cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v5cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -qgso; } else { gcggb = (cgdo + cgso + pParam->BSIM4v5cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v5cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v5cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -qgso; } gcddb = (here->BSIM4v5capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v5capbs + cgso) * ag0; if (!here->BSIM4v5rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v5capbd * ag0; gcbsb = -here->BSIM4v5capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v5capbd * ag0; gcsbsb = -here->BSIM4v5capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } if (here->BSIM4v5trnqsMod) { *(ckt->CKTstate0 + here->BSIM4v5qcdump) = qdef * ScalingFactor; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v5qcdump) = *(ckt->CKTstate0 + here->BSIM4v5qcdump); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qcdump); if (error) return(error); } if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM4v5qg) = qgate; *(ckt->CKTstate0 + here->BSIM4v5qd) = qdrn - *(ckt->CKTstate0 + here->BSIM4v5qbd); *(ckt->CKTstate0 + here->BSIM4v5qs) = qsrc - *(ckt->CKTstate0 + here->BSIM4v5qbs); if (here->BSIM4v5rgateMod == 3) *(ckt->CKTstate0 + here->BSIM4v5qgmid) = qgmid; if (!here->BSIM4v5rbodyMod) { *(ckt->CKTstate0 + here->BSIM4v5qb) = qbulk + *(ckt->CKTstate0 + here->BSIM4v5qbd) + *(ckt->CKTstate0 + here->BSIM4v5qbs); } else *(ckt->CKTstate0 + here->BSIM4v5qb) = qbulk; /* Store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v5qb) = *(ckt->CKTstate0 + here->BSIM4v5qb); *(ckt->CKTstate1 + here->BSIM4v5qg) = *(ckt->CKTstate0 + here->BSIM4v5qg); *(ckt->CKTstate1 + here->BSIM4v5qd) = *(ckt->CKTstate0 + here->BSIM4v5qd); if (here->BSIM4v5rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v5qgmid) = *(ckt->CKTstate0 + here->BSIM4v5qgmid); if (here->BSIM4v5rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v5qbs) = *(ckt->CKTstate0 + here->BSIM4v5qbs); *(ckt->CKTstate1 + here->BSIM4v5qbd) = *(ckt->CKTstate0 + here->BSIM4v5qbd); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qd); if (error) return(error); if (here->BSIM4v5rgateMod == 3) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qgmid); if (error) return(error); } if (here->BSIM4v5rbodyMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qbs); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v5qbd); if (error) return(error); } goto line860; line850: /* Zero gcap and ceqcap if (!ChargeComputationNeeded) */ ceqqg = ceqqb = ceqqd = 0.0; ceqqjd = ceqqjs = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = gcdbb = 0.0; gcsgb = gcsdb = gcssb = gcsbb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; gcbdb = gcbgb = gcbsb = gcbbb = 0.0; gcgmgmb = gcgmdb = gcgmsb = gcgmbb = 0.0; gcdgmb = gcsgmb = gcbgmb = ceqqgmid = 0.0; gcdbdb = gcsbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM4v5mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM4v5trnqsMod) { CoxWL = model->BSIM4v5coxe * pParam->BSIM4v5weffCV * here->BSIM4v5nf * pParam->BSIM4v5leffCV; T1 = here->BSIM4v5gcrg / CoxWL; here->BSIM4v5gtau = T1 * ScalingFactor; } else here->BSIM4v5gtau = 0.0; goto line900; line860: /* Calculate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM4v5cqg); cqbody = *(ckt->CKTstate0 + here->BSIM4v5cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM4v5cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb - gcdgmb * vgmb + (gcddb + gcdbdb) * vbd - gcdbdb * vbd_jct + gcdsb * vbs; ceqqb = cqbody - gcbgb * vgb - gcbgmb * vgmb + gcbdb * vbd + gcbsb * vbs; if (here->BSIM4v5rgateMod == 3) ceqqgmid = *(ckt->CKTstate0 + here->BSIM4v5cqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb; else ceqqgmid = 0.0; if (here->BSIM4v5rbodyMod) { ceqqjs = *(ckt->CKTstate0 + here->BSIM4v5cqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->BSIM4v5cqbd) + gcdbdb * vbd_jct; } if (here->BSIM4v5trnqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM4v5gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM4v5cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM4v5cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v5cqb) = *(ckt->CKTstate0 + here->BSIM4v5cqb); *(ckt->CKTstate1 + here->BSIM4v5cqg) = *(ckt->CKTstate0 + here->BSIM4v5cqg); *(ckt->CKTstate1 + here->BSIM4v5cqd) = *(ckt->CKTstate0 + here->BSIM4v5cqd); if (here->BSIM4v5rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v5cqgmid) = *(ckt->CKTstate0 + here->BSIM4v5cqgmid); if (here->BSIM4v5rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v5cqbs) = *(ckt->CKTstate0 + here->BSIM4v5cqbs); *(ckt->CKTstate1 + here->BSIM4v5cqbd) = *(ckt->CKTstate0 + here->BSIM4v5cqbd); } } /* * Load current vector */ line900: if (here->BSIM4v5mode >= 0) { Gm = here->BSIM4v5gm; Gmbs = here->BSIM4v5gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; ceqdrn = model->BSIM4v5type * (cdrain - here->BSIM4v5gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = model->BSIM4v5type * (here->BSIM4v5csub + here->BSIM4v5Igidl - (here->BSIM4v5gbds + here->BSIM4v5ggidld) * vds - (here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * vgs - (here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * vbs); ceqbs = model->BSIM4v5type * (here->BSIM4v5Igisl + here->BSIM4v5ggisls * vds - here->BSIM4v5ggislg * vgd - here->BSIM4v5ggislb * vbd); gbbdp = -(here->BSIM4v5gbds); gbbsp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = here->BSIM4v5gbgs; gbdpdp = here->BSIM4v5gbds; gbdpb = here->BSIM4v5gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg; gIstotd = here->BSIM4v5gIgcsd; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcss; gIstotb = here->BSIM4v5gIgcsb; Istoteq = model->BSIM4v5type * (here->BSIM4v5Igs + here->BSIM4v5Igcs - gIstotg * vgs - here->BSIM4v5gIgcsd * vds - here->BSIM4v5gIgcsb * vbs); gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcdg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcdd; gIdtots = here->BSIM4v5gIgcds; gIdtotb = here->BSIM4v5gIgcdb; Idtoteq = model->BSIM4v5type * (here->BSIM4v5Igd + here->BSIM4v5Igcd - here->BSIM4v5gIgdg * vgd - here->BSIM4v5gIgcdg * vgs - here->BSIM4v5gIgcdd * vds - here->BSIM4v5gIgcdb * vbs); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbd; gIbtots = here->BSIM4v5gIgbs; gIbtotb = here->BSIM4v5gIgbb; Ibtoteq = model->BSIM4v5type * (here->BSIM4v5Igb - here->BSIM4v5gIgbg * vgs - here->BSIM4v5gIgbd * vds - here->BSIM4v5gIgbb * vbs); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v5rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgd * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgs * T0; gcrgb = here->BSIM4v5gcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } else { Gm = -here->BSIM4v5gm; Gmbs = -here->BSIM4v5gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); ceqdrn = -model->BSIM4v5type * (cdrain + here->BSIM4v5gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = model->BSIM4v5type * (here->BSIM4v5csub + here->BSIM4v5Igisl + (here->BSIM4v5gbds + here->BSIM4v5ggisls) * vds - (here->BSIM4v5gbgs + here->BSIM4v5ggislg) * vgd - (here->BSIM4v5gbbs + here->BSIM4v5ggislb) * vbd); ceqbd = model->BSIM4v5type * (here->BSIM4v5Igidl - here->BSIM4v5ggidld * vds - here->BSIM4v5ggidlg * vgs - here->BSIM4v5ggidlb * vbs); gbbsp = -(here->BSIM4v5gbds); gbbdp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v5gbgs; gbspsp = here->BSIM4v5gbds; gbspb = here->BSIM4v5gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcdg; gIstotd = here->BSIM4v5gIgcds; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcdd; gIstotb = here->BSIM4v5gIgcdb; Istoteq = model->BSIM4v5type * (here->BSIM4v5Igs + here->BSIM4v5Igcd - here->BSIM4v5gIgsg * vgs - here->BSIM4v5gIgcdg * vgd + here->BSIM4v5gIgcdd * vds - here->BSIM4v5gIgcdb * vbd); gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcss; gIdtots = here->BSIM4v5gIgcsd; gIdtotb = here->BSIM4v5gIgcsb; Idtoteq = model->BSIM4v5type * (here->BSIM4v5Igd + here->BSIM4v5Igcs - (here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg) * vgd + here->BSIM4v5gIgcsd * vds - here->BSIM4v5gIgcsb * vbd); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbs; gIbtots = here->BSIM4v5gIgbd; gIbtotb = here->BSIM4v5gIgbb; Ibtoteq = model->BSIM4v5type * (here->BSIM4v5Igb - here->BSIM4v5gIgbg * vgd + here->BSIM4v5gIgbd * vds - here->BSIM4v5gIgbb * vbd); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v5rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgs * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgd * T0; gcrgb = here->BSIM4v5gcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } if (model->BSIM4v5rdsMod == 1) { ceqgstot = model->BSIM4v5type * (here->BSIM4v5gstotd * vds + here->BSIM4v5gstotg * vgs + here->BSIM4v5gstotb * vbs); /* WDLiu: ceqgstot flowing away from sNodePrime */ gstot = here->BSIM4v5gstot; gstotd = here->BSIM4v5gstotd; gstotg = here->BSIM4v5gstotg; gstots = here->BSIM4v5gstots - gstot; gstotb = here->BSIM4v5gstotb; ceqgdtot = -model->BSIM4v5type * (here->BSIM4v5gdtotd * vds + here->BSIM4v5gdtotg * vgs + here->BSIM4v5gdtotb * vbs); /* WDLiu: ceqgdtot defined as flowing into dNodePrime */ gdtot = here->BSIM4v5gdtot; gdtotd = here->BSIM4v5gdtotd - gdtot; gdtotg = here->BSIM4v5gdtotg; gdtots = here->BSIM4v5gdtots; gdtotb = here->BSIM4v5gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } if (model->BSIM4v5type > 0) { ceqjs = (here->BSIM4v5cbs - here->BSIM4v5gbs * vbs_jct); ceqjd = (here->BSIM4v5cbd - here->BSIM4v5gbd * vbd_jct); } else { ceqjs = -(here->BSIM4v5cbs - here->BSIM4v5gbs * vbs_jct); ceqjd = -(here->BSIM4v5cbd - here->BSIM4v5gbd * vbd_jct); ceqqg = -ceqqg; ceqqd = -ceqqd; ceqqb = -ceqqb; ceqgcrg = -ceqgcrg; if (here->BSIM4v5trnqsMod) { cqdef = -cqdef; cqcheq = -cqcheq; } if (here->BSIM4v5rbodyMod) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } if (here->BSIM4v5rgateMod == 3) ceqqgmid = -ceqqgmid; } /* * Loading RHS */ m = here->BSIM4v5m; (*(ckt->CKTrhs + here->BSIM4v5dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq)); (*(ckt->CKTrhs + here->BSIM4v5gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); if (here->BSIM4v5rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4v5gNodeExt) -= m * ceqgcrg); else if (here->BSIM4v5rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4v5gNodeMid) -= m * (ceqqgmid + ceqgcrg)); if (!here->BSIM4v5rbodyMod) { (*(ckt->CKTrhs + here->BSIM4v5bNodePrime) += m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v5sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq)); } else { (*(ckt->CKTrhs + here->BSIM4v5dbNode) -= m * (ceqjd + ceqqjd)); (*(ckt->CKTrhs + here->BSIM4v5bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v5sbNode) -= m * (ceqjs + ceqqjs)); (*(ckt->CKTrhs + here->BSIM4v5sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq)); } if (model->BSIM4v5rdsMod) { (*(ckt->CKTrhs + here->BSIM4v5dNode) -= m * ceqgdtot); (*(ckt->CKTrhs + here->BSIM4v5sNode) += m * ceqgstot); } if (here->BSIM4v5trnqsMod) *(ckt->CKTrhs + here->BSIM4v5qNode) += m * (cqcheq - cqdef); /* * Loading matrix */ if (!here->BSIM4v5rbodyMod) { gjbd = here->BSIM4v5gbd; gjbs = here->BSIM4v5gbs; } else gjbd = gjbs = 0.0; if (!model->BSIM4v5rdsMod) { gdpr = here->BSIM4v5drainConductance; gspr = here->BSIM4v5sourceConductance; } else gdpr = gspr = 0.0; geltd = here->BSIM4v5grgeltd; T1 = qdef * here->BSIM4v5gtau; if (here->BSIM4v5rgateMod == 1) { (*(here->BSIM4v5GEgePtr) += m * geltd); (*(here->BSIM4v5GPgePtr) -= m * geltd); (*(here->BSIM4v5GEgpPtr) -= m * geltd); (*(here->BSIM4v5GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); (*(here->BSIM4v5GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v5GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v5GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v5rgateMod == 2) { (*(here->BSIM4v5GEgePtr) += m * gcrg); (*(here->BSIM4v5GEgpPtr) += m * gcrgg); (*(here->BSIM4v5GEdpPtr) += m * gcrgd); (*(here->BSIM4v5GEspPtr) += m * gcrgs); (*(here->BSIM4v5GEbpPtr) += m * gcrgb); (*(here->BSIM4v5GPgePtr) -= m * gcrg); (*(here->BSIM4v5GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v5GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v5GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v5GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else if (here->BSIM4v5rgateMod == 3) { (*(here->BSIM4v5GEgePtr) += m * geltd); (*(here->BSIM4v5GEgmPtr) -= m * geltd); (*(here->BSIM4v5GMgePtr) -= m * geltd); (*(here->BSIM4v5GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); (*(here->BSIM4v5GMdpPtr) += m * (gcrgd + gcgmdb)); (*(here->BSIM4v5GMgpPtr) += m * gcrgg); (*(here->BSIM4v5GMspPtr) += m * (gcrgs + gcgmsb)); (*(here->BSIM4v5GMbpPtr) += m * (gcrgb + gcgmbb)); (*(here->BSIM4v5DPgmPtr) += m * gcdgmb); (*(here->BSIM4v5GPgmPtr) -= m * gcrg); (*(here->BSIM4v5SPgmPtr) += m * gcsgmb); (*(here->BSIM4v5BPgmPtr) += m * gcbgmb); (*(here->BSIM4v5GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v5GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v5GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v5GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else { (*(here->BSIM4v5GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); (*(here->BSIM4v5GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v5GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v5GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } if (model->BSIM4v5rdsMod) { (*(here->BSIM4v5DgpPtr) += m * gdtotg); (*(here->BSIM4v5DspPtr) += m * gdtots); (*(here->BSIM4v5DbpPtr) += m * gdtotb); (*(here->BSIM4v5SdpPtr) += m * gstotd); (*(here->BSIM4v5SgpPtr) += m * gstotg); (*(here->BSIM4v5SbpPtr) += m * gstotb); } (*(here->BSIM4v5DPdpPtr) += m * (gdpr + here->BSIM4v5gds + here->BSIM4v5gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd)); (*(here->BSIM4v5DPdPtr) -= m * (gdpr + gdtot)); (*(here->BSIM4v5DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg)); (*(here->BSIM4v5DPspPtr) -= m * (here->BSIM4v5gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp)); (*(here->BSIM4v5DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb)); (*(here->BSIM4v5DdpPtr) -= m * (gdpr - gdtotd)); (*(here->BSIM4v5DdPtr) += m * (gdpr + gdtot)); (*(here->BSIM4v5SPdpPtr) -= m * (here->BSIM4v5gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd)); (*(here->BSIM4v5SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg)); (*(here->BSIM4v5SPspPtr) += m * (gspr + here->BSIM4v5gds + here->BSIM4v5gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots)); (*(here->BSIM4v5SPsPtr) -= m * (gspr + gstot)); (*(here->BSIM4v5SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb)); (*(here->BSIM4v5SspPtr) -= m * (gspr - gstots)); (*(here->BSIM4v5SsPtr) += m * (gspr + gstot)); (*(here->BSIM4v5BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); (*(here->BSIM4v5BPgpPtr) += m * (gcbgb - here->BSIM4v5gbgs - gIbtotg)); (*(here->BSIM4v5BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); (*(here->BSIM4v5BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4v5gbbs - gIbtotb)); ggidld = here->BSIM4v5ggidld; ggidlg = here->BSIM4v5ggidlg; ggidlb = here->BSIM4v5ggidlb; ggislg = here->BSIM4v5ggislg; ggisls = here->BSIM4v5ggisls; ggislb = here->BSIM4v5ggislb; /* stamp gidl */ (*(here->BSIM4v5DPdpPtr) += m * ggidld); (*(here->BSIM4v5DPgpPtr) += m * ggidlg); (*(here->BSIM4v5DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v5DPbpPtr) += m * ggidlb); (*(here->BSIM4v5BPdpPtr) -= m * ggidld); (*(here->BSIM4v5BPgpPtr) -= m * ggidlg); (*(here->BSIM4v5BPspPtr) += m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v5BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v5SPdpPtr) -= m * (ggisls + ggislg + ggislb)); (*(here->BSIM4v5SPgpPtr) += m * ggislg); (*(here->BSIM4v5SPspPtr) += m * ggisls); (*(here->BSIM4v5SPbpPtr) += m * ggislb); (*(here->BSIM4v5BPdpPtr) += m * (ggislg + ggisls + ggislb)); (*(here->BSIM4v5BPgpPtr) -= m * ggislg); (*(here->BSIM4v5BPspPtr) -= m * ggisls); (*(here->BSIM4v5BPbpPtr) -= m * ggislb); if (here->BSIM4v5rbodyMod) { (*(here->BSIM4v5DPdbPtr) += m * (gcdbdb - here->BSIM4v5gbd)); (*(here->BSIM4v5SPsbPtr) -= m * (here->BSIM4v5gbs - gcsbsb)); (*(here->BSIM4v5DBdpPtr) += m * (gcdbdb - here->BSIM4v5gbd)); (*(here->BSIM4v5DBdbPtr) += m * (here->BSIM4v5gbd - gcdbdb + here->BSIM4v5grbpd + here->BSIM4v5grbdb)); (*(here->BSIM4v5DBbpPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5DBbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BPdbPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5BPbPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BPsbPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5BPbpPtr) += m * (here->BSIM4v5grbpd + here->BSIM4v5grbps + here->BSIM4v5grbpb)); /* WDLiu: (gcbbb - here->BSIM4v5gbbs) already added to BPbpPtr */ (*(here->BSIM4v5SBspPtr) += m * (gcsbsb - here->BSIM4v5gbs)); (*(here->BSIM4v5SBbpPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5SBbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5SBsbPtr) += m * (here->BSIM4v5gbs - gcsbsb + here->BSIM4v5grbps + here->BSIM4v5grbsb)); (*(here->BSIM4v5BdbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BbpPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BsbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5BbPtr) += m * (here->BSIM4v5grbsb + here->BSIM4v5grbdb + here->BSIM4v5grbpb)); } if (here->BSIM4v5trnqsMod) { (*(here->BSIM4v5QqPtr) += m * (gqdef + here->BSIM4v5gtau)); (*(here->BSIM4v5QgpPtr) += m * (ggtg - gcqgb)); (*(here->BSIM4v5QdpPtr) += m * (ggtd - gcqdb)); (*(here->BSIM4v5QspPtr) += m * (ggts - gcqsb)); (*(here->BSIM4v5QbpPtr) += m * (ggtb - gcqbb)); (*(here->BSIM4v5DPqPtr) += m * dxpart * here->BSIM4v5gtau); (*(here->BSIM4v5SPqPtr) += m * sxpart * here->BSIM4v5gtau); (*(here->BSIM4v5GPqPtr) -= m * here->BSIM4v5gtau); } line1000: ; } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } /* function to compute poly depletion effect */ int BSIM4v5polyDepletion( double phi, double ngate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg) { double T1, T2, T3, T4, T5, T6, T7, T8; /* Poly Gate Si Depletion Effect */ if ((ngate > 1.0e18) && (ngate < 1.0e25) && (Vgs > phi)) { T1 = 1.0e6 * CHARGE * EPSSI * ngate / (coxe * coxe); T8 = Vgs - phi; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); *Vgs_eff = Vgs - T5; *dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { *Vgs_eff = Vgs; *dVgs_eff_dVg = 1.0; } return(0); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5par.c0000644000265600020320000001475212264261473021165 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4par.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM4v5param( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM4v5instance *here = (BSIM4v5instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM4v5_W: here->BSIM4v5w = value->rValue*scale; here->BSIM4v5wGiven = TRUE; break; case BSIM4v5_L: here->BSIM4v5l = value->rValue*scale; here->BSIM4v5lGiven = TRUE; break; case BSIM4v5_M: here->BSIM4v5m = value->rValue; here->BSIM4v5mGiven = TRUE; break; case BSIM4v5_NF: here->BSIM4v5nf = value->rValue; here->BSIM4v5nfGiven = TRUE; break; case BSIM4v5_MIN: here->BSIM4v5min = value->iValue; here->BSIM4v5minGiven = TRUE; break; case BSIM4v5_AS: here->BSIM4v5sourceArea = value->rValue*scale*scale; here->BSIM4v5sourceAreaGiven = TRUE; break; case BSIM4v5_AD: here->BSIM4v5drainArea = value->rValue*scale*scale; here->BSIM4v5drainAreaGiven = TRUE; break; case BSIM4v5_PS: here->BSIM4v5sourcePerimeter = value->rValue*scale; here->BSIM4v5sourcePerimeterGiven = TRUE; break; case BSIM4v5_PD: here->BSIM4v5drainPerimeter = value->rValue*scale; here->BSIM4v5drainPerimeterGiven = TRUE; break; case BSIM4v5_NRS: here->BSIM4v5sourceSquares = value->rValue; here->BSIM4v5sourceSquaresGiven = TRUE; break; case BSIM4v5_NRD: here->BSIM4v5drainSquares = value->rValue; here->BSIM4v5drainSquaresGiven = TRUE; break; case BSIM4v5_OFF: here->BSIM4v5off = value->iValue; break; case BSIM4v5_SA: here->BSIM4v5sa = value->rValue*scale; here->BSIM4v5saGiven = TRUE; break; case BSIM4v5_SB: here->BSIM4v5sb = value->rValue*scale; here->BSIM4v5sbGiven = TRUE; break; case BSIM4v5_SD: here->BSIM4v5sd = value->rValue*scale; here->BSIM4v5sdGiven = TRUE; break; case BSIM4v5_SCA: here->BSIM4v5sca = value->rValue; here->BSIM4v5scaGiven = TRUE; break; case BSIM4v5_SCB: here->BSIM4v5scb = value->rValue; here->BSIM4v5scbGiven = TRUE; break; case BSIM4v5_SCC: here->BSIM4v5scc = value->rValue; here->BSIM4v5sccGiven = TRUE; break; case BSIM4v5_SC: here->BSIM4v5sc = value->rValue*scale; here->BSIM4v5scGiven = TRUE; break; case BSIM4v5_RBSB: here->BSIM4v5rbsb = value->rValue; here->BSIM4v5rbsbGiven = TRUE; break; case BSIM4v5_RBDB: here->BSIM4v5rbdb = value->rValue; here->BSIM4v5rbdbGiven = TRUE; break; case BSIM4v5_RBPB: here->BSIM4v5rbpb = value->rValue; here->BSIM4v5rbpbGiven = TRUE; break; case BSIM4v5_RBPS: here->BSIM4v5rbps = value->rValue; here->BSIM4v5rbpsGiven = TRUE; break; case BSIM4v5_RBPD: here->BSIM4v5rbpd = value->rValue; here->BSIM4v5rbpdGiven = TRUE; break; case BSIM4v5_DELVTO: here->BSIM4v5delvto = value->rValue; here->BSIM4v5delvtoGiven = TRUE; break; case BSIM4v5_XGW: here->BSIM4v5xgw = value->rValue; here->BSIM4v5xgwGiven = TRUE; break; case BSIM4v5_NGCON: here->BSIM4v5ngcon = value->rValue; here->BSIM4v5ngconGiven = TRUE; break; case BSIM4v5_TRNQSMOD: here->BSIM4v5trnqsMod = value->iValue; here->BSIM4v5trnqsModGiven = TRUE; break; case BSIM4v5_ACNQSMOD: here->BSIM4v5acnqsMod = value->iValue; here->BSIM4v5acnqsModGiven = TRUE; break; case BSIM4v5_RBODYMOD: here->BSIM4v5rbodyMod = value->iValue; here->BSIM4v5rbodyModGiven = TRUE; break; case BSIM4v5_RGATEMOD: here->BSIM4v5rgateMod = value->iValue; here->BSIM4v5rgateModGiven = TRUE; break; case BSIM4v5_GEOMOD: here->BSIM4v5geoMod = value->iValue; here->BSIM4v5geoModGiven = TRUE; break; case BSIM4v5_RGEOMOD: here->BSIM4v5rgeoMod = value->iValue; here->BSIM4v5rgeoModGiven = TRUE; break; case BSIM4v5_IC_VDS: here->BSIM4v5icVDS = value->rValue; here->BSIM4v5icVDSGiven = TRUE; break; case BSIM4v5_IC_VGS: here->BSIM4v5icVGS = value->rValue; here->BSIM4v5icVGSGiven = TRUE; break; case BSIM4v5_IC_VBS: here->BSIM4v5icVBS = value->rValue; here->BSIM4v5icVBSGiven = TRUE; break; case BSIM4v5_IC: switch(value->v.numValue) { case 3: here->BSIM4v5icVBS = *(value->v.vec.rVec+2); here->BSIM4v5icVBSGiven = TRUE; case 2: here->BSIM4v5icVGS = *(value->v.vec.rVec+1); here->BSIM4v5icVGSGiven = TRUE; case 1: here->BSIM4v5icVDS = *(value->v.vec.rVec); here->BSIM4v5icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5mpar.c0000644000265600020320000033125012264261473021335 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4mpar.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/const.h" int BSIM4v5mParam( int param, IFvalue *value, GENmodel *inMod) { BSIM4v5model *mod = (BSIM4v5model*)inMod; switch(param) { case BSIM4v5_MOD_MOBMOD : mod->BSIM4v5mobMod = value->iValue; mod->BSIM4v5mobModGiven = TRUE; break; case BSIM4v5_MOD_BINUNIT : mod->BSIM4v5binUnit = value->iValue; mod->BSIM4v5binUnitGiven = TRUE; break; case BSIM4v5_MOD_PARAMCHK : mod->BSIM4v5paramChk = value->iValue; mod->BSIM4v5paramChkGiven = TRUE; break; case BSIM4v5_MOD_CAPMOD : mod->BSIM4v5capMod = value->iValue; mod->BSIM4v5capModGiven = TRUE; break; case BSIM4v5_MOD_DIOMOD : mod->BSIM4v5dioMod = value->iValue; mod->BSIM4v5dioModGiven = TRUE; break; case BSIM4v5_MOD_RDSMOD : mod->BSIM4v5rdsMod = value->iValue; mod->BSIM4v5rdsModGiven = TRUE; break; case BSIM4v5_MOD_TRNQSMOD : mod->BSIM4v5trnqsMod = value->iValue; mod->BSIM4v5trnqsModGiven = TRUE; break; case BSIM4v5_MOD_ACNQSMOD : mod->BSIM4v5acnqsMod = value->iValue; mod->BSIM4v5acnqsModGiven = TRUE; break; case BSIM4v5_MOD_RBODYMOD : mod->BSIM4v5rbodyMod = value->iValue; mod->BSIM4v5rbodyModGiven = TRUE; break; case BSIM4v5_MOD_RGATEMOD : mod->BSIM4v5rgateMod = value->iValue; mod->BSIM4v5rgateModGiven = TRUE; break; case BSIM4v5_MOD_PERMOD : mod->BSIM4v5perMod = value->iValue; mod->BSIM4v5perModGiven = TRUE; break; case BSIM4v5_MOD_GEOMOD : mod->BSIM4v5geoMod = value->iValue; mod->BSIM4v5geoModGiven = TRUE; break; case BSIM4v5_MOD_RGEOMOD : mod->BSIM4v5rgeoMod = value->iValue; mod->BSIM4v5rgeoModGiven = TRUE; break; case BSIM4v5_MOD_FNOIMOD : mod->BSIM4v5fnoiMod = value->iValue; mod->BSIM4v5fnoiModGiven = TRUE; break; case BSIM4v5_MOD_TNOIMOD : mod->BSIM4v5tnoiMod = value->iValue; mod->BSIM4v5tnoiModGiven = TRUE; break; case BSIM4v5_MOD_IGCMOD : mod->BSIM4v5igcMod = value->iValue; mod->BSIM4v5igcModGiven = TRUE; break; case BSIM4v5_MOD_IGBMOD : mod->BSIM4v5igbMod = value->iValue; mod->BSIM4v5igbModGiven = TRUE; break; case BSIM4v5_MOD_TEMPMOD : mod->BSIM4v5tempMod = value->iValue; mod->BSIM4v5tempModGiven = TRUE; break; case BSIM4v5_MOD_VERSION : mod->BSIM4v5version = value->sValue; mod->BSIM4v5versionGiven = TRUE; break; case BSIM4v5_MOD_TOXREF : mod->BSIM4v5toxref = value->rValue; mod->BSIM4v5toxrefGiven = TRUE; break; case BSIM4v5_MOD_TOXE : mod->BSIM4v5toxe = value->rValue; mod->BSIM4v5toxeGiven = TRUE; break; case BSIM4v5_MOD_TOXP : mod->BSIM4v5toxp = value->rValue; mod->BSIM4v5toxpGiven = TRUE; break; case BSIM4v5_MOD_TOXM : mod->BSIM4v5toxm = value->rValue; mod->BSIM4v5toxmGiven = TRUE; break; case BSIM4v5_MOD_DTOX : mod->BSIM4v5dtox = value->rValue; mod->BSIM4v5dtoxGiven = TRUE; break; case BSIM4v5_MOD_EPSROX : mod->BSIM4v5epsrox = value->rValue; mod->BSIM4v5epsroxGiven = TRUE; break; case BSIM4v5_MOD_CDSC : mod->BSIM4v5cdsc = value->rValue; mod->BSIM4v5cdscGiven = TRUE; break; case BSIM4v5_MOD_CDSCB : mod->BSIM4v5cdscb = value->rValue; mod->BSIM4v5cdscbGiven = TRUE; break; case BSIM4v5_MOD_CDSCD : mod->BSIM4v5cdscd = value->rValue; mod->BSIM4v5cdscdGiven = TRUE; break; case BSIM4v5_MOD_CIT : mod->BSIM4v5cit = value->rValue; mod->BSIM4v5citGiven = TRUE; break; case BSIM4v5_MOD_NFACTOR : mod->BSIM4v5nfactor = value->rValue; mod->BSIM4v5nfactorGiven = TRUE; break; case BSIM4v5_MOD_XJ: mod->BSIM4v5xj = value->rValue; mod->BSIM4v5xjGiven = TRUE; break; case BSIM4v5_MOD_VSAT: mod->BSIM4v5vsat = value->rValue; mod->BSIM4v5vsatGiven = TRUE; break; case BSIM4v5_MOD_A0: mod->BSIM4v5a0 = value->rValue; mod->BSIM4v5a0Given = TRUE; break; case BSIM4v5_MOD_AGS: mod->BSIM4v5ags= value->rValue; mod->BSIM4v5agsGiven = TRUE; break; case BSIM4v5_MOD_A1: mod->BSIM4v5a1 = value->rValue; mod->BSIM4v5a1Given = TRUE; break; case BSIM4v5_MOD_A2: mod->BSIM4v5a2 = value->rValue; mod->BSIM4v5a2Given = TRUE; break; case BSIM4v5_MOD_AT: mod->BSIM4v5at = value->rValue; mod->BSIM4v5atGiven = TRUE; break; case BSIM4v5_MOD_KETA: mod->BSIM4v5keta = value->rValue; mod->BSIM4v5ketaGiven = TRUE; break; case BSIM4v5_MOD_NSUB: mod->BSIM4v5nsub = value->rValue; mod->BSIM4v5nsubGiven = TRUE; break; case BSIM4v5_MOD_NDEP: mod->BSIM4v5ndep = value->rValue; mod->BSIM4v5ndepGiven = TRUE; if (mod->BSIM4v5ndep > 1.0e20) mod->BSIM4v5ndep *= 1.0e-6; break; case BSIM4v5_MOD_NSD: mod->BSIM4v5nsd = value->rValue; mod->BSIM4v5nsdGiven = TRUE; if (mod->BSIM4v5nsd > 1.0e23) mod->BSIM4v5nsd *= 1.0e-6; break; case BSIM4v5_MOD_NGATE: mod->BSIM4v5ngate = value->rValue; mod->BSIM4v5ngateGiven = TRUE; if (mod->BSIM4v5ngate > 1.0e23) mod->BSIM4v5ngate *= 1.0e-6; break; case BSIM4v5_MOD_GAMMA1: mod->BSIM4v5gamma1 = value->rValue; mod->BSIM4v5gamma1Given = TRUE; break; case BSIM4v5_MOD_GAMMA2: mod->BSIM4v5gamma2 = value->rValue; mod->BSIM4v5gamma2Given = TRUE; break; case BSIM4v5_MOD_VBX: mod->BSIM4v5vbx = value->rValue; mod->BSIM4v5vbxGiven = TRUE; break; case BSIM4v5_MOD_VBM: mod->BSIM4v5vbm = value->rValue; mod->BSIM4v5vbmGiven = TRUE; break; case BSIM4v5_MOD_XT: mod->BSIM4v5xt = value->rValue; mod->BSIM4v5xtGiven = TRUE; break; case BSIM4v5_MOD_K1: mod->BSIM4v5k1 = value->rValue; mod->BSIM4v5k1Given = TRUE; break; case BSIM4v5_MOD_KT1: mod->BSIM4v5kt1 = value->rValue; mod->BSIM4v5kt1Given = TRUE; break; case BSIM4v5_MOD_KT1L: mod->BSIM4v5kt1l = value->rValue; mod->BSIM4v5kt1lGiven = TRUE; break; case BSIM4v5_MOD_KT2: mod->BSIM4v5kt2 = value->rValue; mod->BSIM4v5kt2Given = TRUE; break; case BSIM4v5_MOD_K2: mod->BSIM4v5k2 = value->rValue; mod->BSIM4v5k2Given = TRUE; break; case BSIM4v5_MOD_K3: mod->BSIM4v5k3 = value->rValue; mod->BSIM4v5k3Given = TRUE; break; case BSIM4v5_MOD_K3B: mod->BSIM4v5k3b = value->rValue; mod->BSIM4v5k3bGiven = TRUE; break; case BSIM4v5_MOD_LPE0: mod->BSIM4v5lpe0 = value->rValue; mod->BSIM4v5lpe0Given = TRUE; break; case BSIM4v5_MOD_LPEB: mod->BSIM4v5lpeb = value->rValue; mod->BSIM4v5lpebGiven = TRUE; break; case BSIM4v5_MOD_DVTP0: mod->BSIM4v5dvtp0 = value->rValue; mod->BSIM4v5dvtp0Given = TRUE; break; case BSIM4v5_MOD_DVTP1: mod->BSIM4v5dvtp1 = value->rValue; mod->BSIM4v5dvtp1Given = TRUE; break; case BSIM4v5_MOD_W0: mod->BSIM4v5w0 = value->rValue; mod->BSIM4v5w0Given = TRUE; break; case BSIM4v5_MOD_DVT0: mod->BSIM4v5dvt0 = value->rValue; mod->BSIM4v5dvt0Given = TRUE; break; case BSIM4v5_MOD_DVT1: mod->BSIM4v5dvt1 = value->rValue; mod->BSIM4v5dvt1Given = TRUE; break; case BSIM4v5_MOD_DVT2: mod->BSIM4v5dvt2 = value->rValue; mod->BSIM4v5dvt2Given = TRUE; break; case BSIM4v5_MOD_DVT0W: mod->BSIM4v5dvt0w = value->rValue; mod->BSIM4v5dvt0wGiven = TRUE; break; case BSIM4v5_MOD_DVT1W: mod->BSIM4v5dvt1w = value->rValue; mod->BSIM4v5dvt1wGiven = TRUE; break; case BSIM4v5_MOD_DVT2W: mod->BSIM4v5dvt2w = value->rValue; mod->BSIM4v5dvt2wGiven = TRUE; break; case BSIM4v5_MOD_DROUT: mod->BSIM4v5drout = value->rValue; mod->BSIM4v5droutGiven = TRUE; break; case BSIM4v5_MOD_DSUB: mod->BSIM4v5dsub = value->rValue; mod->BSIM4v5dsubGiven = TRUE; break; case BSIM4v5_MOD_VTH0: mod->BSIM4v5vth0 = value->rValue; mod->BSIM4v5vth0Given = TRUE; break; case BSIM4v5_MOD_EU: mod->BSIM4v5eu = value->rValue; mod->BSIM4v5euGiven = TRUE; break; case BSIM4v5_MOD_UA: mod->BSIM4v5ua = value->rValue; mod->BSIM4v5uaGiven = TRUE; break; case BSIM4v5_MOD_UA1: mod->BSIM4v5ua1 = value->rValue; mod->BSIM4v5ua1Given = TRUE; break; case BSIM4v5_MOD_UB: mod->BSIM4v5ub = value->rValue; mod->BSIM4v5ubGiven = TRUE; break; case BSIM4v5_MOD_UB1: mod->BSIM4v5ub1 = value->rValue; mod->BSIM4v5ub1Given = TRUE; break; case BSIM4v5_MOD_UC: mod->BSIM4v5uc = value->rValue; mod->BSIM4v5ucGiven = TRUE; break; case BSIM4v5_MOD_UC1: mod->BSIM4v5uc1 = value->rValue; mod->BSIM4v5uc1Given = TRUE; break; case BSIM4v5_MOD_U0 : mod->BSIM4v5u0 = value->rValue; mod->BSIM4v5u0Given = TRUE; break; case BSIM4v5_MOD_UTE : mod->BSIM4v5ute = value->rValue; mod->BSIM4v5uteGiven = TRUE; break; case BSIM4v5_MOD_UD: mod->BSIM4v5ud = value->rValue; mod->BSIM4v5udGiven = TRUE; break; case BSIM4v5_MOD_UD1: mod->BSIM4v5ud1 = value->rValue; mod->BSIM4v5ud1Given = TRUE; break; case BSIM4v5_MOD_UP: mod->BSIM4v5up = value->rValue; mod->BSIM4v5upGiven = TRUE; break; case BSIM4v5_MOD_LP: mod->BSIM4v5lp = value->rValue; mod->BSIM4v5lpGiven = TRUE; break; case BSIM4v5_MOD_LUD: mod->BSIM4v5lud = value->rValue; mod->BSIM4v5ludGiven = TRUE; break; case BSIM4v5_MOD_LUD1: mod->BSIM4v5lud1 = value->rValue; mod->BSIM4v5lud1Given = TRUE; break; case BSIM4v5_MOD_LUP: mod->BSIM4v5lup = value->rValue; mod->BSIM4v5lupGiven = TRUE; break; case BSIM4v5_MOD_LLP: mod->BSIM4v5llp = value->rValue; mod->BSIM4v5llpGiven = TRUE; break; case BSIM4v5_MOD_WUD: mod->BSIM4v5wud = value->rValue; mod->BSIM4v5wudGiven = TRUE; break; case BSIM4v5_MOD_WUD1: mod->BSIM4v5wud1 = value->rValue; mod->BSIM4v5wud1Given = TRUE; break; case BSIM4v5_MOD_WUP: mod->BSIM4v5wup = value->rValue; mod->BSIM4v5wupGiven = TRUE; break; case BSIM4v5_MOD_WLP: mod->BSIM4v5wlp = value->rValue; mod->BSIM4v5wlpGiven = TRUE; break; case BSIM4v5_MOD_PUD: mod->BSIM4v5pud = value->rValue; mod->BSIM4v5pudGiven = TRUE; break; case BSIM4v5_MOD_PUD1: mod->BSIM4v5pud1 = value->rValue; mod->BSIM4v5pud1Given = TRUE; break; case BSIM4v5_MOD_PUP: mod->BSIM4v5pup = value->rValue; mod->BSIM4v5pupGiven = TRUE; break; case BSIM4v5_MOD_PLP: mod->BSIM4v5plp = value->rValue; mod->BSIM4v5plpGiven = TRUE; break; case BSIM4v5_MOD_VOFF: mod->BSIM4v5voff = value->rValue; mod->BSIM4v5voffGiven = TRUE; break; case BSIM4v5_MOD_TVOFF: mod->BSIM4v5tvoff = value->rValue; mod->BSIM4v5tvoffGiven = TRUE; break; case BSIM4v5_MOD_VOFFL: mod->BSIM4v5voffl = value->rValue; mod->BSIM4v5vofflGiven = TRUE; break; case BSIM4v5_MOD_MINV: mod->BSIM4v5minv = value->rValue; mod->BSIM4v5minvGiven = TRUE; break; case BSIM4v5_MOD_FPROUT: mod->BSIM4v5fprout = value->rValue; mod->BSIM4v5fproutGiven = TRUE; break; case BSIM4v5_MOD_PDITS: mod->BSIM4v5pdits = value->rValue; mod->BSIM4v5pditsGiven = TRUE; break; case BSIM4v5_MOD_PDITSD: mod->BSIM4v5pditsd = value->rValue; mod->BSIM4v5pditsdGiven = TRUE; break; case BSIM4v5_MOD_PDITSL: mod->BSIM4v5pditsl = value->rValue; mod->BSIM4v5pditslGiven = TRUE; break; case BSIM4v5_MOD_DELTA : mod->BSIM4v5delta = value->rValue; mod->BSIM4v5deltaGiven = TRUE; break; case BSIM4v5_MOD_RDSW: mod->BSIM4v5rdsw = value->rValue; mod->BSIM4v5rdswGiven = TRUE; break; case BSIM4v5_MOD_RDSWMIN: mod->BSIM4v5rdswmin = value->rValue; mod->BSIM4v5rdswminGiven = TRUE; break; case BSIM4v5_MOD_RDWMIN: mod->BSIM4v5rdwmin = value->rValue; mod->BSIM4v5rdwminGiven = TRUE; break; case BSIM4v5_MOD_RSWMIN: mod->BSIM4v5rswmin = value->rValue; mod->BSIM4v5rswminGiven = TRUE; break; case BSIM4v5_MOD_RDW: mod->BSIM4v5rdw = value->rValue; mod->BSIM4v5rdwGiven = TRUE; break; case BSIM4v5_MOD_RSW: mod->BSIM4v5rsw = value->rValue; mod->BSIM4v5rswGiven = TRUE; break; case BSIM4v5_MOD_PRWG: mod->BSIM4v5prwg = value->rValue; mod->BSIM4v5prwgGiven = TRUE; break; case BSIM4v5_MOD_PRWB: mod->BSIM4v5prwb = value->rValue; mod->BSIM4v5prwbGiven = TRUE; break; case BSIM4v5_MOD_PRT: mod->BSIM4v5prt = value->rValue; mod->BSIM4v5prtGiven = TRUE; break; case BSIM4v5_MOD_ETA0: mod->BSIM4v5eta0 = value->rValue; mod->BSIM4v5eta0Given = TRUE; break; case BSIM4v5_MOD_ETAB: mod->BSIM4v5etab = value->rValue; mod->BSIM4v5etabGiven = TRUE; break; case BSIM4v5_MOD_PCLM: mod->BSIM4v5pclm = value->rValue; mod->BSIM4v5pclmGiven = TRUE; break; case BSIM4v5_MOD_PDIBL1: mod->BSIM4v5pdibl1 = value->rValue; mod->BSIM4v5pdibl1Given = TRUE; break; case BSIM4v5_MOD_PDIBL2: mod->BSIM4v5pdibl2 = value->rValue; mod->BSIM4v5pdibl2Given = TRUE; break; case BSIM4v5_MOD_PDIBLB: mod->BSIM4v5pdiblb = value->rValue; mod->BSIM4v5pdiblbGiven = TRUE; break; case BSIM4v5_MOD_PSCBE1: mod->BSIM4v5pscbe1 = value->rValue; mod->BSIM4v5pscbe1Given = TRUE; break; case BSIM4v5_MOD_PSCBE2: mod->BSIM4v5pscbe2 = value->rValue; mod->BSIM4v5pscbe2Given = TRUE; break; case BSIM4v5_MOD_PVAG: mod->BSIM4v5pvag = value->rValue; mod->BSIM4v5pvagGiven = TRUE; break; case BSIM4v5_MOD_WR : mod->BSIM4v5wr = value->rValue; mod->BSIM4v5wrGiven = TRUE; break; case BSIM4v5_MOD_DWG : mod->BSIM4v5dwg = value->rValue; mod->BSIM4v5dwgGiven = TRUE; break; case BSIM4v5_MOD_DWB : mod->BSIM4v5dwb = value->rValue; mod->BSIM4v5dwbGiven = TRUE; break; case BSIM4v5_MOD_B0 : mod->BSIM4v5b0 = value->rValue; mod->BSIM4v5b0Given = TRUE; break; case BSIM4v5_MOD_B1 : mod->BSIM4v5b1 = value->rValue; mod->BSIM4v5b1Given = TRUE; break; case BSIM4v5_MOD_ALPHA0 : mod->BSIM4v5alpha0 = value->rValue; mod->BSIM4v5alpha0Given = TRUE; break; case BSIM4v5_MOD_ALPHA1 : mod->BSIM4v5alpha1 = value->rValue; mod->BSIM4v5alpha1Given = TRUE; break; case BSIM4v5_MOD_AGIDL : mod->BSIM4v5agidl = value->rValue; mod->BSIM4v5agidlGiven = TRUE; break; case BSIM4v5_MOD_BGIDL : mod->BSIM4v5bgidl = value->rValue; mod->BSIM4v5bgidlGiven = TRUE; break; case BSIM4v5_MOD_CGIDL : mod->BSIM4v5cgidl = value->rValue; mod->BSIM4v5cgidlGiven = TRUE; break; case BSIM4v5_MOD_PHIN : mod->BSIM4v5phin = value->rValue; mod->BSIM4v5phinGiven = TRUE; break; case BSIM4v5_MOD_EGIDL : mod->BSIM4v5egidl = value->rValue; mod->BSIM4v5egidlGiven = TRUE; break; case BSIM4v5_MOD_AIGC : mod->BSIM4v5aigc = value->rValue; mod->BSIM4v5aigcGiven = TRUE; break; case BSIM4v5_MOD_BIGC : mod->BSIM4v5bigc = value->rValue; mod->BSIM4v5bigcGiven = TRUE; break; case BSIM4v5_MOD_CIGC : mod->BSIM4v5cigc = value->rValue; mod->BSIM4v5cigcGiven = TRUE; break; case BSIM4v5_MOD_AIGSD : mod->BSIM4v5aigsd = value->rValue; mod->BSIM4v5aigsdGiven = TRUE; break; case BSIM4v5_MOD_BIGSD : mod->BSIM4v5bigsd = value->rValue; mod->BSIM4v5bigsdGiven = TRUE; break; case BSIM4v5_MOD_CIGSD : mod->BSIM4v5cigsd = value->rValue; mod->BSIM4v5cigsdGiven = TRUE; break; case BSIM4v5_MOD_AIGBACC : mod->BSIM4v5aigbacc = value->rValue; mod->BSIM4v5aigbaccGiven = TRUE; break; case BSIM4v5_MOD_BIGBACC : mod->BSIM4v5bigbacc = value->rValue; mod->BSIM4v5bigbaccGiven = TRUE; break; case BSIM4v5_MOD_CIGBACC : mod->BSIM4v5cigbacc = value->rValue; mod->BSIM4v5cigbaccGiven = TRUE; break; case BSIM4v5_MOD_AIGBINV : mod->BSIM4v5aigbinv = value->rValue; mod->BSIM4v5aigbinvGiven = TRUE; break; case BSIM4v5_MOD_BIGBINV : mod->BSIM4v5bigbinv = value->rValue; mod->BSIM4v5bigbinvGiven = TRUE; break; case BSIM4v5_MOD_CIGBINV : mod->BSIM4v5cigbinv = value->rValue; mod->BSIM4v5cigbinvGiven = TRUE; break; case BSIM4v5_MOD_NIGC : mod->BSIM4v5nigc = value->rValue; mod->BSIM4v5nigcGiven = TRUE; break; case BSIM4v5_MOD_NIGBINV : mod->BSIM4v5nigbinv = value->rValue; mod->BSIM4v5nigbinvGiven = TRUE; break; case BSIM4v5_MOD_NIGBACC : mod->BSIM4v5nigbacc = value->rValue; mod->BSIM4v5nigbaccGiven = TRUE; break; case BSIM4v5_MOD_NTOX : mod->BSIM4v5ntox = value->rValue; mod->BSIM4v5ntoxGiven = TRUE; break; case BSIM4v5_MOD_EIGBINV : mod->BSIM4v5eigbinv = value->rValue; mod->BSIM4v5eigbinvGiven = TRUE; break; case BSIM4v5_MOD_PIGCD : mod->BSIM4v5pigcd = value->rValue; mod->BSIM4v5pigcdGiven = TRUE; break; case BSIM4v5_MOD_POXEDGE : mod->BSIM4v5poxedge = value->rValue; mod->BSIM4v5poxedgeGiven = TRUE; break; case BSIM4v5_MOD_XRCRG1 : mod->BSIM4v5xrcrg1 = value->rValue; mod->BSIM4v5xrcrg1Given = TRUE; break; case BSIM4v5_MOD_XRCRG2 : mod->BSIM4v5xrcrg2 = value->rValue; mod->BSIM4v5xrcrg2Given = TRUE; break; case BSIM4v5_MOD_LAMBDA : mod->BSIM4v5lambda = value->rValue; mod->BSIM4v5lambdaGiven = TRUE; break; case BSIM4v5_MOD_VTL : mod->BSIM4v5vtl = value->rValue; mod->BSIM4v5vtlGiven = TRUE; break; case BSIM4v5_MOD_XN: mod->BSIM4v5xn = value->rValue; mod->BSIM4v5xnGiven = TRUE; break; case BSIM4v5_MOD_LC: mod->BSIM4v5lc = value->rValue; mod->BSIM4v5lcGiven = TRUE; break; case BSIM4v5_MOD_TNOIA : mod->BSIM4v5tnoia = value->rValue; mod->BSIM4v5tnoiaGiven = TRUE; break; case BSIM4v5_MOD_TNOIB : mod->BSIM4v5tnoib = value->rValue; mod->BSIM4v5tnoibGiven = TRUE; break; case BSIM4v5_MOD_RNOIA : mod->BSIM4v5rnoia = value->rValue; mod->BSIM4v5rnoiaGiven = TRUE; break; case BSIM4v5_MOD_RNOIB : mod->BSIM4v5rnoib = value->rValue; mod->BSIM4v5rnoibGiven = TRUE; break; case BSIM4v5_MOD_NTNOI : mod->BSIM4v5ntnoi = value->rValue; mod->BSIM4v5ntnoiGiven = TRUE; break; case BSIM4v5_MOD_VFBSDOFF: mod->BSIM4v5vfbsdoff = value->rValue; mod->BSIM4v5vfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_TVFBSDOFF: mod->BSIM4v5tvfbsdoff = value->rValue; mod->BSIM4v5tvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_LINTNOI: mod->BSIM4v5lintnoi = value->rValue; mod->BSIM4v5lintnoiGiven = TRUE; break; /* stress effect */ case BSIM4v5_MOD_SAREF : mod->BSIM4v5saref = value->rValue; mod->BSIM4v5sarefGiven = TRUE; break; case BSIM4v5_MOD_SBREF : mod->BSIM4v5sbref = value->rValue; mod->BSIM4v5sbrefGiven = TRUE; break; case BSIM4v5_MOD_WLOD : mod->BSIM4v5wlod = value->rValue; mod->BSIM4v5wlodGiven = TRUE; break; case BSIM4v5_MOD_KU0 : mod->BSIM4v5ku0 = value->rValue; mod->BSIM4v5ku0Given = TRUE; break; case BSIM4v5_MOD_KVSAT : mod->BSIM4v5kvsat = value->rValue; mod->BSIM4v5kvsatGiven = TRUE; break; case BSIM4v5_MOD_KVTH0 : mod->BSIM4v5kvth0 = value->rValue; mod->BSIM4v5kvth0Given = TRUE; break; case BSIM4v5_MOD_TKU0 : mod->BSIM4v5tku0 = value->rValue; mod->BSIM4v5tku0Given = TRUE; break; case BSIM4v5_MOD_LLODKU0 : mod->BSIM4v5llodku0 = value->rValue; mod->BSIM4v5llodku0Given = TRUE; break; case BSIM4v5_MOD_WLODKU0 : mod->BSIM4v5wlodku0 = value->rValue; mod->BSIM4v5wlodku0Given = TRUE; break; case BSIM4v5_MOD_LLODVTH : mod->BSIM4v5llodvth = value->rValue; mod->BSIM4v5llodvthGiven = TRUE; break; case BSIM4v5_MOD_WLODVTH : mod->BSIM4v5wlodvth = value->rValue; mod->BSIM4v5wlodvthGiven = TRUE; break; case BSIM4v5_MOD_LKU0 : mod->BSIM4v5lku0 = value->rValue; mod->BSIM4v5lku0Given = TRUE; break; case BSIM4v5_MOD_WKU0 : mod->BSIM4v5wku0 = value->rValue; mod->BSIM4v5wku0Given = TRUE; break; case BSIM4v5_MOD_PKU0 : mod->BSIM4v5pku0 = value->rValue; mod->BSIM4v5pku0Given = TRUE; break; case BSIM4v5_MOD_LKVTH0 : mod->BSIM4v5lkvth0 = value->rValue; mod->BSIM4v5lkvth0Given = TRUE; break; case BSIM4v5_MOD_WKVTH0 : mod->BSIM4v5wkvth0 = value->rValue; mod->BSIM4v5wkvth0Given = TRUE; break; case BSIM4v5_MOD_PKVTH0 : mod->BSIM4v5pkvth0 = value->rValue; mod->BSIM4v5pkvth0Given = TRUE; break; case BSIM4v5_MOD_STK2 : mod->BSIM4v5stk2 = value->rValue; mod->BSIM4v5stk2Given = TRUE; break; case BSIM4v5_MOD_LODK2 : mod->BSIM4v5lodk2 = value->rValue; mod->BSIM4v5lodk2Given = TRUE; break; case BSIM4v5_MOD_STETA0 : mod->BSIM4v5steta0 = value->rValue; mod->BSIM4v5steta0Given = TRUE; break; case BSIM4v5_MOD_LODETA0 : mod->BSIM4v5lodeta0 = value->rValue; mod->BSIM4v5lodeta0Given = TRUE; break; case BSIM4v5_MOD_WEB : mod->BSIM4v5web = value->rValue; mod->BSIM4v5webGiven = TRUE; break; case BSIM4v5_MOD_WEC : mod->BSIM4v5wec = value->rValue; mod->BSIM4v5wecGiven = TRUE; break; case BSIM4v5_MOD_KVTH0WE : mod->BSIM4v5kvth0we = value->rValue; mod->BSIM4v5kvth0weGiven = TRUE; break; case BSIM4v5_MOD_K2WE : mod->BSIM4v5k2we = value->rValue; mod->BSIM4v5k2weGiven = TRUE; break; case BSIM4v5_MOD_KU0WE : mod->BSIM4v5ku0we = value->rValue; mod->BSIM4v5ku0weGiven = TRUE; break; case BSIM4v5_MOD_SCREF : mod->BSIM4v5scref = value->rValue; mod->BSIM4v5screfGiven = TRUE; break; case BSIM4v5_MOD_WPEMOD : mod->BSIM4v5wpemod = value->rValue; mod->BSIM4v5wpemodGiven = TRUE; break; case BSIM4v5_MOD_LKVTH0WE : mod->BSIM4v5lkvth0we = value->rValue; mod->BSIM4v5lkvth0weGiven = TRUE; break; case BSIM4v5_MOD_LK2WE : mod->BSIM4v5lk2we = value->rValue; mod->BSIM4v5lk2weGiven = TRUE; break; case BSIM4v5_MOD_LKU0WE : mod->BSIM4v5lku0we = value->rValue; mod->BSIM4v5lku0weGiven = TRUE; break; case BSIM4v5_MOD_WKVTH0WE : mod->BSIM4v5wkvth0we = value->rValue; mod->BSIM4v5wkvth0weGiven = TRUE; break; case BSIM4v5_MOD_WK2WE : mod->BSIM4v5wk2we = value->rValue; mod->BSIM4v5wk2weGiven = TRUE; break; case BSIM4v5_MOD_WKU0WE : mod->BSIM4v5wku0we = value->rValue; mod->BSIM4v5wku0weGiven = TRUE; break; case BSIM4v5_MOD_PKVTH0WE : mod->BSIM4v5pkvth0we = value->rValue; mod->BSIM4v5pkvth0weGiven = TRUE; break; case BSIM4v5_MOD_PK2WE : mod->BSIM4v5pk2we = value->rValue; mod->BSIM4v5pk2weGiven = TRUE; break; case BSIM4v5_MOD_PKU0WE : mod->BSIM4v5pku0we = value->rValue; mod->BSIM4v5pku0weGiven = TRUE; break; case BSIM4v5_MOD_BETA0 : mod->BSIM4v5beta0 = value->rValue; mod->BSIM4v5beta0Given = TRUE; break; case BSIM4v5_MOD_IJTHDFWD : mod->BSIM4v5ijthdfwd = value->rValue; mod->BSIM4v5ijthdfwdGiven = TRUE; break; case BSIM4v5_MOD_IJTHSFWD : mod->BSIM4v5ijthsfwd = value->rValue; mod->BSIM4v5ijthsfwdGiven = TRUE; break; case BSIM4v5_MOD_IJTHDREV : mod->BSIM4v5ijthdrev = value->rValue; mod->BSIM4v5ijthdrevGiven = TRUE; break; case BSIM4v5_MOD_IJTHSREV : mod->BSIM4v5ijthsrev = value->rValue; mod->BSIM4v5ijthsrevGiven = TRUE; break; case BSIM4v5_MOD_XJBVD : mod->BSIM4v5xjbvd = value->rValue; mod->BSIM4v5xjbvdGiven = TRUE; break; case BSIM4v5_MOD_XJBVS : mod->BSIM4v5xjbvs = value->rValue; mod->BSIM4v5xjbvsGiven = TRUE; break; case BSIM4v5_MOD_BVD : mod->BSIM4v5bvd = value->rValue; mod->BSIM4v5bvdGiven = TRUE; break; case BSIM4v5_MOD_BVS : mod->BSIM4v5bvs = value->rValue; mod->BSIM4v5bvsGiven = TRUE; break; /* reverse diode */ case BSIM4v5_MOD_JTSS : mod->BSIM4v5jtss = value->rValue; mod->BSIM4v5jtssGiven = TRUE; break; case BSIM4v5_MOD_JTSD : mod->BSIM4v5jtsd = value->rValue; mod->BSIM4v5jtsdGiven = TRUE; break; case BSIM4v5_MOD_JTSSWS : mod->BSIM4v5jtssws = value->rValue; mod->BSIM4v5jtsswsGiven = TRUE; break; case BSIM4v5_MOD_JTSSWD : mod->BSIM4v5jtsswd = value->rValue; mod->BSIM4v5jtsswdGiven = TRUE; break; case BSIM4v5_MOD_JTSSWGS : mod->BSIM4v5jtsswgs = value->rValue; mod->BSIM4v5jtsswgsGiven = TRUE; break; case BSIM4v5_MOD_JTSSWGD : mod->BSIM4v5jtsswgd = value->rValue; mod->BSIM4v5jtsswgdGiven = TRUE; break; case BSIM4v5_MOD_NJTS : mod->BSIM4v5njts = value->rValue; mod->BSIM4v5njtsGiven = TRUE; break; case BSIM4v5_MOD_NJTSSW : mod->BSIM4v5njtssw = value->rValue; mod->BSIM4v5njtsswGiven = TRUE; break; case BSIM4v5_MOD_NJTSSWG : mod->BSIM4v5njtsswg = value->rValue; mod->BSIM4v5njtsswgGiven = TRUE; break; case BSIM4v5_MOD_XTSS : mod->BSIM4v5xtss = value->rValue; mod->BSIM4v5xtssGiven = TRUE; break; case BSIM4v5_MOD_XTSD : mod->BSIM4v5xtsd = value->rValue; mod->BSIM4v5xtsdGiven = TRUE; break; case BSIM4v5_MOD_XTSSWS : mod->BSIM4v5xtssws = value->rValue; mod->BSIM4v5xtsswsGiven = TRUE; break; case BSIM4v5_MOD_XTSSWD : mod->BSIM4v5xtsswd = value->rValue; mod->BSIM4v5xtsswdGiven = TRUE; break; case BSIM4v5_MOD_XTSSWGS : mod->BSIM4v5xtsswgs = value->rValue; mod->BSIM4v5xtsswgsGiven = TRUE; break; case BSIM4v5_MOD_XTSSWGD : mod->BSIM4v5xtsswgd = value->rValue; mod->BSIM4v5xtsswgdGiven = TRUE; break; case BSIM4v5_MOD_TNJTS : mod->BSIM4v5tnjts = value->rValue; mod->BSIM4v5tnjtsGiven = TRUE; break; case BSIM4v5_MOD_TNJTSSW : mod->BSIM4v5tnjtssw = value->rValue; mod->BSIM4v5tnjtsswGiven = TRUE; break; case BSIM4v5_MOD_TNJTSSWG : mod->BSIM4v5tnjtsswg = value->rValue; mod->BSIM4v5tnjtsswgGiven = TRUE; break; case BSIM4v5_MOD_VTSS : mod->BSIM4v5vtss = value->rValue; mod->BSIM4v5vtssGiven = TRUE; break; case BSIM4v5_MOD_VTSD : mod->BSIM4v5vtsd = value->rValue; mod->BSIM4v5vtsdGiven = TRUE; break; case BSIM4v5_MOD_VTSSWS : mod->BSIM4v5vtssws = value->rValue; mod->BSIM4v5vtsswsGiven = TRUE; break; case BSIM4v5_MOD_VTSSWD : mod->BSIM4v5vtsswd = value->rValue; mod->BSIM4v5vtsswdGiven = TRUE; break; case BSIM4v5_MOD_VTSSWGS : mod->BSIM4v5vtsswgs = value->rValue; mod->BSIM4v5vtsswgsGiven = TRUE; break; case BSIM4v5_MOD_VTSSWGD : mod->BSIM4v5vtsswgd = value->rValue; mod->BSIM4v5vtsswgdGiven = TRUE; break; case BSIM4v5_MOD_VFB : mod->BSIM4v5vfb = value->rValue; mod->BSIM4v5vfbGiven = TRUE; break; case BSIM4v5_MOD_GBMIN : mod->BSIM4v5gbmin = value->rValue; mod->BSIM4v5gbminGiven = TRUE; break; case BSIM4v5_MOD_RBDB : mod->BSIM4v5rbdb = value->rValue; mod->BSIM4v5rbdbGiven = TRUE; break; case BSIM4v5_MOD_RBPB : mod->BSIM4v5rbpb = value->rValue; mod->BSIM4v5rbpbGiven = TRUE; break; case BSIM4v5_MOD_RBSB : mod->BSIM4v5rbsb = value->rValue; mod->BSIM4v5rbsbGiven = TRUE; break; case BSIM4v5_MOD_RBPS : mod->BSIM4v5rbps = value->rValue; mod->BSIM4v5rbpsGiven = TRUE; break; case BSIM4v5_MOD_RBPD : mod->BSIM4v5rbpd = value->rValue; mod->BSIM4v5rbpdGiven = TRUE; break; case BSIM4v5_MOD_RBPS0 : mod->BSIM4v5rbps0 = value->rValue; mod->BSIM4v5rbps0Given = TRUE; break; case BSIM4v5_MOD_RBPSL : mod->BSIM4v5rbpsl = value->rValue; mod->BSIM4v5rbpslGiven = TRUE; break; case BSIM4v5_MOD_RBPSW : mod->BSIM4v5rbpsw = value->rValue; mod->BSIM4v5rbpswGiven = TRUE; break; case BSIM4v5_MOD_RBPSNF : mod->BSIM4v5rbpsnf = value->rValue; mod->BSIM4v5rbpsnfGiven = TRUE; break; case BSIM4v5_MOD_RBPD0 : mod->BSIM4v5rbpd0 = value->rValue; mod->BSIM4v5rbpd0Given = TRUE; break; case BSIM4v5_MOD_RBPDL : mod->BSIM4v5rbpdl = value->rValue; mod->BSIM4v5rbpdlGiven = TRUE; break; case BSIM4v5_MOD_RBPDW : mod->BSIM4v5rbpdw = value->rValue; mod->BSIM4v5rbpdwGiven = TRUE; break; case BSIM4v5_MOD_RBPDNF : mod->BSIM4v5rbpdnf = value->rValue; mod->BSIM4v5rbpdnfGiven = TRUE; break; case BSIM4v5_MOD_RBPBX0 : mod->BSIM4v5rbpbx0 = value->rValue; mod->BSIM4v5rbpbx0Given = TRUE; break; case BSIM4v5_MOD_RBPBXL : mod->BSIM4v5rbpbxl = value->rValue; mod->BSIM4v5rbpbxlGiven = TRUE; break; case BSIM4v5_MOD_RBPBXW : mod->BSIM4v5rbpbxw = value->rValue; mod->BSIM4v5rbpbxwGiven = TRUE; break; case BSIM4v5_MOD_RBPBXNF : mod->BSIM4v5rbpbxnf = value->rValue; mod->BSIM4v5rbpbxnfGiven = TRUE; break; case BSIM4v5_MOD_RBPBY0 : mod->BSIM4v5rbpby0 = value->rValue; mod->BSIM4v5rbpby0Given = TRUE; break; case BSIM4v5_MOD_RBPBYL : mod->BSIM4v5rbpbyl = value->rValue; mod->BSIM4v5rbpbylGiven = TRUE; break; case BSIM4v5_MOD_RBPBYW : mod->BSIM4v5rbpbyw = value->rValue; mod->BSIM4v5rbpbywGiven = TRUE; break; case BSIM4v5_MOD_RBPBYNF : mod->BSIM4v5rbpbynf = value->rValue; mod->BSIM4v5rbpbynfGiven = TRUE; break; case BSIM4v5_MOD_RBSBX0 : mod->BSIM4v5rbsbx0 = value->rValue; mod->BSIM4v5rbsbx0Given = TRUE; break; case BSIM4v5_MOD_RBSBY0 : mod->BSIM4v5rbsby0 = value->rValue; mod->BSIM4v5rbsby0Given = TRUE; break; case BSIM4v5_MOD_RBDBX0 : mod->BSIM4v5rbdbx0 = value->rValue; mod->BSIM4v5rbdbx0Given = TRUE; break; case BSIM4v5_MOD_RBDBY0 : mod->BSIM4v5rbdby0 = value->rValue; mod->BSIM4v5rbdby0Given = TRUE; break; case BSIM4v5_MOD_RBSDBXL : mod->BSIM4v5rbsdbxl = value->rValue; mod->BSIM4v5rbsdbxlGiven = TRUE; break; case BSIM4v5_MOD_RBSDBXW : mod->BSIM4v5rbsdbxw = value->rValue; mod->BSIM4v5rbsdbxwGiven = TRUE; break; case BSIM4v5_MOD_RBSDBXNF : mod->BSIM4v5rbsdbxnf = value->rValue; mod->BSIM4v5rbsdbxnfGiven = TRUE; break; case BSIM4v5_MOD_RBSDBYL : mod->BSIM4v5rbsdbyl = value->rValue; mod->BSIM4v5rbsdbylGiven = TRUE; break; case BSIM4v5_MOD_RBSDBYW : mod->BSIM4v5rbsdbyw = value->rValue; mod->BSIM4v5rbsdbywGiven = TRUE; break; case BSIM4v5_MOD_RBSDBYNF : mod->BSIM4v5rbsdbynf = value->rValue; mod->BSIM4v5rbsdbynfGiven = TRUE; break; case BSIM4v5_MOD_CGSL : mod->BSIM4v5cgsl = value->rValue; mod->BSIM4v5cgslGiven = TRUE; break; case BSIM4v5_MOD_CGDL : mod->BSIM4v5cgdl = value->rValue; mod->BSIM4v5cgdlGiven = TRUE; break; case BSIM4v5_MOD_CKAPPAS : mod->BSIM4v5ckappas = value->rValue; mod->BSIM4v5ckappasGiven = TRUE; break; case BSIM4v5_MOD_CKAPPAD : mod->BSIM4v5ckappad = value->rValue; mod->BSIM4v5ckappadGiven = TRUE; break; case BSIM4v5_MOD_CF : mod->BSIM4v5cf = value->rValue; mod->BSIM4v5cfGiven = TRUE; break; case BSIM4v5_MOD_CLC : mod->BSIM4v5clc = value->rValue; mod->BSIM4v5clcGiven = TRUE; break; case BSIM4v5_MOD_CLE : mod->BSIM4v5cle = value->rValue; mod->BSIM4v5cleGiven = TRUE; break; case BSIM4v5_MOD_DWC : mod->BSIM4v5dwc = value->rValue; mod->BSIM4v5dwcGiven = TRUE; break; case BSIM4v5_MOD_DLC : mod->BSIM4v5dlc = value->rValue; mod->BSIM4v5dlcGiven = TRUE; break; case BSIM4v5_MOD_XW : mod->BSIM4v5xw = value->rValue; mod->BSIM4v5xwGiven = TRUE; break; case BSIM4v5_MOD_XL : mod->BSIM4v5xl = value->rValue; mod->BSIM4v5xlGiven = TRUE; break; case BSIM4v5_MOD_DLCIG : mod->BSIM4v5dlcig = value->rValue; mod->BSIM4v5dlcigGiven = TRUE; break; case BSIM4v5_MOD_DWJ : mod->BSIM4v5dwj = value->rValue; mod->BSIM4v5dwjGiven = TRUE; break; case BSIM4v5_MOD_VFBCV : mod->BSIM4v5vfbcv = value->rValue; mod->BSIM4v5vfbcvGiven = TRUE; break; case BSIM4v5_MOD_ACDE : mod->BSIM4v5acde = value->rValue; mod->BSIM4v5acdeGiven = TRUE; break; case BSIM4v5_MOD_MOIN : mod->BSIM4v5moin = value->rValue; mod->BSIM4v5moinGiven = TRUE; break; case BSIM4v5_MOD_NOFF : mod->BSIM4v5noff = value->rValue; mod->BSIM4v5noffGiven = TRUE; break; case BSIM4v5_MOD_VOFFCV : mod->BSIM4v5voffcv = value->rValue; mod->BSIM4v5voffcvGiven = TRUE; break; case BSIM4v5_MOD_DMCG : mod->BSIM4v5dmcg = value->rValue; mod->BSIM4v5dmcgGiven = TRUE; break; case BSIM4v5_MOD_DMCI : mod->BSIM4v5dmci = value->rValue; mod->BSIM4v5dmciGiven = TRUE; break; case BSIM4v5_MOD_DMDG : mod->BSIM4v5dmdg = value->rValue; mod->BSIM4v5dmdgGiven = TRUE; break; case BSIM4v5_MOD_DMCGT : mod->BSIM4v5dmcgt = value->rValue; mod->BSIM4v5dmcgtGiven = TRUE; break; case BSIM4v5_MOD_XGW : mod->BSIM4v5xgw = value->rValue; mod->BSIM4v5xgwGiven = TRUE; break; case BSIM4v5_MOD_XGL : mod->BSIM4v5xgl = value->rValue; mod->BSIM4v5xglGiven = TRUE; break; case BSIM4v5_MOD_RSHG : mod->BSIM4v5rshg = value->rValue; mod->BSIM4v5rshgGiven = TRUE; break; case BSIM4v5_MOD_NGCON : mod->BSIM4v5ngcon = value->rValue; mod->BSIM4v5ngconGiven = TRUE; break; case BSIM4v5_MOD_TCJ : mod->BSIM4v5tcj = value->rValue; mod->BSIM4v5tcjGiven = TRUE; break; case BSIM4v5_MOD_TPB : mod->BSIM4v5tpb = value->rValue; mod->BSIM4v5tpbGiven = TRUE; break; case BSIM4v5_MOD_TCJSW : mod->BSIM4v5tcjsw = value->rValue; mod->BSIM4v5tcjswGiven = TRUE; break; case BSIM4v5_MOD_TPBSW : mod->BSIM4v5tpbsw = value->rValue; mod->BSIM4v5tpbswGiven = TRUE; break; case BSIM4v5_MOD_TCJSWG : mod->BSIM4v5tcjswg = value->rValue; mod->BSIM4v5tcjswgGiven = TRUE; break; case BSIM4v5_MOD_TPBSWG : mod->BSIM4v5tpbswg = value->rValue; mod->BSIM4v5tpbswgGiven = TRUE; break; /* Length dependence */ case BSIM4v5_MOD_LCDSC : mod->BSIM4v5lcdsc = value->rValue; mod->BSIM4v5lcdscGiven = TRUE; break; case BSIM4v5_MOD_LCDSCB : mod->BSIM4v5lcdscb = value->rValue; mod->BSIM4v5lcdscbGiven = TRUE; break; case BSIM4v5_MOD_LCDSCD : mod->BSIM4v5lcdscd = value->rValue; mod->BSIM4v5lcdscdGiven = TRUE; break; case BSIM4v5_MOD_LCIT : mod->BSIM4v5lcit = value->rValue; mod->BSIM4v5lcitGiven = TRUE; break; case BSIM4v5_MOD_LNFACTOR : mod->BSIM4v5lnfactor = value->rValue; mod->BSIM4v5lnfactorGiven = TRUE; break; case BSIM4v5_MOD_LXJ: mod->BSIM4v5lxj = value->rValue; mod->BSIM4v5lxjGiven = TRUE; break; case BSIM4v5_MOD_LVSAT: mod->BSIM4v5lvsat = value->rValue; mod->BSIM4v5lvsatGiven = TRUE; break; case BSIM4v5_MOD_LA0: mod->BSIM4v5la0 = value->rValue; mod->BSIM4v5la0Given = TRUE; break; case BSIM4v5_MOD_LAGS: mod->BSIM4v5lags = value->rValue; mod->BSIM4v5lagsGiven = TRUE; break; case BSIM4v5_MOD_LA1: mod->BSIM4v5la1 = value->rValue; mod->BSIM4v5la1Given = TRUE; break; case BSIM4v5_MOD_LA2: mod->BSIM4v5la2 = value->rValue; mod->BSIM4v5la2Given = TRUE; break; case BSIM4v5_MOD_LAT: mod->BSIM4v5lat = value->rValue; mod->BSIM4v5latGiven = TRUE; break; case BSIM4v5_MOD_LKETA: mod->BSIM4v5lketa = value->rValue; mod->BSIM4v5lketaGiven = TRUE; break; case BSIM4v5_MOD_LNSUB: mod->BSIM4v5lnsub = value->rValue; mod->BSIM4v5lnsubGiven = TRUE; break; case BSIM4v5_MOD_LNDEP: mod->BSIM4v5lndep = value->rValue; mod->BSIM4v5lndepGiven = TRUE; if (mod->BSIM4v5lndep > 1.0e20) mod->BSIM4v5lndep *= 1.0e-6; break; case BSIM4v5_MOD_LNSD: mod->BSIM4v5lnsd = value->rValue; mod->BSIM4v5lnsdGiven = TRUE; if (mod->BSIM4v5lnsd > 1.0e23) mod->BSIM4v5lnsd *= 1.0e-6; break; case BSIM4v5_MOD_LNGATE: mod->BSIM4v5lngate = value->rValue; mod->BSIM4v5lngateGiven = TRUE; if (mod->BSIM4v5lngate > 1.0e23) mod->BSIM4v5lngate *= 1.0e-6; break; case BSIM4v5_MOD_LGAMMA1: mod->BSIM4v5lgamma1 = value->rValue; mod->BSIM4v5lgamma1Given = TRUE; break; case BSIM4v5_MOD_LGAMMA2: mod->BSIM4v5lgamma2 = value->rValue; mod->BSIM4v5lgamma2Given = TRUE; break; case BSIM4v5_MOD_LVBX: mod->BSIM4v5lvbx = value->rValue; mod->BSIM4v5lvbxGiven = TRUE; break; case BSIM4v5_MOD_LVBM: mod->BSIM4v5lvbm = value->rValue; mod->BSIM4v5lvbmGiven = TRUE; break; case BSIM4v5_MOD_LXT: mod->BSIM4v5lxt = value->rValue; mod->BSIM4v5lxtGiven = TRUE; break; case BSIM4v5_MOD_LK1: mod->BSIM4v5lk1 = value->rValue; mod->BSIM4v5lk1Given = TRUE; break; case BSIM4v5_MOD_LKT1: mod->BSIM4v5lkt1 = value->rValue; mod->BSIM4v5lkt1Given = TRUE; break; case BSIM4v5_MOD_LKT1L: mod->BSIM4v5lkt1l = value->rValue; mod->BSIM4v5lkt1lGiven = TRUE; break; case BSIM4v5_MOD_LKT2: mod->BSIM4v5lkt2 = value->rValue; mod->BSIM4v5lkt2Given = TRUE; break; case BSIM4v5_MOD_LK2: mod->BSIM4v5lk2 = value->rValue; mod->BSIM4v5lk2Given = TRUE; break; case BSIM4v5_MOD_LK3: mod->BSIM4v5lk3 = value->rValue; mod->BSIM4v5lk3Given = TRUE; break; case BSIM4v5_MOD_LK3B: mod->BSIM4v5lk3b = value->rValue; mod->BSIM4v5lk3bGiven = TRUE; break; case BSIM4v5_MOD_LLPE0: mod->BSIM4v5llpe0 = value->rValue; mod->BSIM4v5llpe0Given = TRUE; break; case BSIM4v5_MOD_LLPEB: mod->BSIM4v5llpeb = value->rValue; mod->BSIM4v5llpebGiven = TRUE; break; case BSIM4v5_MOD_LDVTP0: mod->BSIM4v5ldvtp0 = value->rValue; mod->BSIM4v5ldvtp0Given = TRUE; break; case BSIM4v5_MOD_LDVTP1: mod->BSIM4v5ldvtp1 = value->rValue; mod->BSIM4v5ldvtp1Given = TRUE; break; case BSIM4v5_MOD_LW0: mod->BSIM4v5lw0 = value->rValue; mod->BSIM4v5lw0Given = TRUE; break; case BSIM4v5_MOD_LDVT0: mod->BSIM4v5ldvt0 = value->rValue; mod->BSIM4v5ldvt0Given = TRUE; break; case BSIM4v5_MOD_LDVT1: mod->BSIM4v5ldvt1 = value->rValue; mod->BSIM4v5ldvt1Given = TRUE; break; case BSIM4v5_MOD_LDVT2: mod->BSIM4v5ldvt2 = value->rValue; mod->BSIM4v5ldvt2Given = TRUE; break; case BSIM4v5_MOD_LDVT0W: mod->BSIM4v5ldvt0w = value->rValue; mod->BSIM4v5ldvt0wGiven = TRUE; break; case BSIM4v5_MOD_LDVT1W: mod->BSIM4v5ldvt1w = value->rValue; mod->BSIM4v5ldvt1wGiven = TRUE; break; case BSIM4v5_MOD_LDVT2W: mod->BSIM4v5ldvt2w = value->rValue; mod->BSIM4v5ldvt2wGiven = TRUE; break; case BSIM4v5_MOD_LDROUT: mod->BSIM4v5ldrout = value->rValue; mod->BSIM4v5ldroutGiven = TRUE; break; case BSIM4v5_MOD_LDSUB: mod->BSIM4v5ldsub = value->rValue; mod->BSIM4v5ldsubGiven = TRUE; break; case BSIM4v5_MOD_LVTH0: mod->BSIM4v5lvth0 = value->rValue; mod->BSIM4v5lvth0Given = TRUE; break; case BSIM4v5_MOD_LUA: mod->BSIM4v5lua = value->rValue; mod->BSIM4v5luaGiven = TRUE; break; case BSIM4v5_MOD_LUA1: mod->BSIM4v5lua1 = value->rValue; mod->BSIM4v5lua1Given = TRUE; break; case BSIM4v5_MOD_LUB: mod->BSIM4v5lub = value->rValue; mod->BSIM4v5lubGiven = TRUE; break; case BSIM4v5_MOD_LUB1: mod->BSIM4v5lub1 = value->rValue; mod->BSIM4v5lub1Given = TRUE; break; case BSIM4v5_MOD_LUC: mod->BSIM4v5luc = value->rValue; mod->BSIM4v5lucGiven = TRUE; break; case BSIM4v5_MOD_LUC1: mod->BSIM4v5luc1 = value->rValue; mod->BSIM4v5luc1Given = TRUE; break; case BSIM4v5_MOD_LU0 : mod->BSIM4v5lu0 = value->rValue; mod->BSIM4v5lu0Given = TRUE; break; case BSIM4v5_MOD_LUTE : mod->BSIM4v5lute = value->rValue; mod->BSIM4v5luteGiven = TRUE; break; case BSIM4v5_MOD_LVOFF: mod->BSIM4v5lvoff = value->rValue; mod->BSIM4v5lvoffGiven = TRUE; break; case BSIM4v5_MOD_LTVOFF: mod->BSIM4v5ltvoff = value->rValue; mod->BSIM4v5ltvoffGiven = TRUE; break; case BSIM4v5_MOD_LMINV: mod->BSIM4v5lminv = value->rValue; mod->BSIM4v5lminvGiven = TRUE; break; case BSIM4v5_MOD_LFPROUT: mod->BSIM4v5lfprout = value->rValue; mod->BSIM4v5lfproutGiven = TRUE; break; case BSIM4v5_MOD_LPDITS: mod->BSIM4v5lpdits = value->rValue; mod->BSIM4v5lpditsGiven = TRUE; break; case BSIM4v5_MOD_LPDITSD: mod->BSIM4v5lpditsd = value->rValue; mod->BSIM4v5lpditsdGiven = TRUE; break; case BSIM4v5_MOD_LDELTA : mod->BSIM4v5ldelta = value->rValue; mod->BSIM4v5ldeltaGiven = TRUE; break; case BSIM4v5_MOD_LRDSW: mod->BSIM4v5lrdsw = value->rValue; mod->BSIM4v5lrdswGiven = TRUE; break; case BSIM4v5_MOD_LRDW: mod->BSIM4v5lrdw = value->rValue; mod->BSIM4v5lrdwGiven = TRUE; break; case BSIM4v5_MOD_LRSW: mod->BSIM4v5lrsw = value->rValue; mod->BSIM4v5lrswGiven = TRUE; break; case BSIM4v5_MOD_LPRWB: mod->BSIM4v5lprwb = value->rValue; mod->BSIM4v5lprwbGiven = TRUE; break; case BSIM4v5_MOD_LPRWG: mod->BSIM4v5lprwg = value->rValue; mod->BSIM4v5lprwgGiven = TRUE; break; case BSIM4v5_MOD_LPRT: mod->BSIM4v5lprt = value->rValue; mod->BSIM4v5lprtGiven = TRUE; break; case BSIM4v5_MOD_LETA0: mod->BSIM4v5leta0 = value->rValue; mod->BSIM4v5leta0Given = TRUE; break; case BSIM4v5_MOD_LETAB: mod->BSIM4v5letab = value->rValue; mod->BSIM4v5letabGiven = TRUE; break; case BSIM4v5_MOD_LPCLM: mod->BSIM4v5lpclm = value->rValue; mod->BSIM4v5lpclmGiven = TRUE; break; case BSIM4v5_MOD_LPDIBL1: mod->BSIM4v5lpdibl1 = value->rValue; mod->BSIM4v5lpdibl1Given = TRUE; break; case BSIM4v5_MOD_LPDIBL2: mod->BSIM4v5lpdibl2 = value->rValue; mod->BSIM4v5lpdibl2Given = TRUE; break; case BSIM4v5_MOD_LPDIBLB: mod->BSIM4v5lpdiblb = value->rValue; mod->BSIM4v5lpdiblbGiven = TRUE; break; case BSIM4v5_MOD_LPSCBE1: mod->BSIM4v5lpscbe1 = value->rValue; mod->BSIM4v5lpscbe1Given = TRUE; break; case BSIM4v5_MOD_LPSCBE2: mod->BSIM4v5lpscbe2 = value->rValue; mod->BSIM4v5lpscbe2Given = TRUE; break; case BSIM4v5_MOD_LPVAG: mod->BSIM4v5lpvag = value->rValue; mod->BSIM4v5lpvagGiven = TRUE; break; case BSIM4v5_MOD_LWR : mod->BSIM4v5lwr = value->rValue; mod->BSIM4v5lwrGiven = TRUE; break; case BSIM4v5_MOD_LDWG : mod->BSIM4v5ldwg = value->rValue; mod->BSIM4v5ldwgGiven = TRUE; break; case BSIM4v5_MOD_LDWB : mod->BSIM4v5ldwb = value->rValue; mod->BSIM4v5ldwbGiven = TRUE; break; case BSIM4v5_MOD_LB0 : mod->BSIM4v5lb0 = value->rValue; mod->BSIM4v5lb0Given = TRUE; break; case BSIM4v5_MOD_LB1 : mod->BSIM4v5lb1 = value->rValue; mod->BSIM4v5lb1Given = TRUE; break; case BSIM4v5_MOD_LALPHA0 : mod->BSIM4v5lalpha0 = value->rValue; mod->BSIM4v5lalpha0Given = TRUE; break; case BSIM4v5_MOD_LALPHA1 : mod->BSIM4v5lalpha1 = value->rValue; mod->BSIM4v5lalpha1Given = TRUE; break; case BSIM4v5_MOD_LBETA0 : mod->BSIM4v5lbeta0 = value->rValue; mod->BSIM4v5lbeta0Given = TRUE; break; case BSIM4v5_MOD_LAGIDL : mod->BSIM4v5lagidl = value->rValue; mod->BSIM4v5lagidlGiven = TRUE; break; case BSIM4v5_MOD_LBGIDL : mod->BSIM4v5lbgidl = value->rValue; mod->BSIM4v5lbgidlGiven = TRUE; break; case BSIM4v5_MOD_LCGIDL : mod->BSIM4v5lcgidl = value->rValue; mod->BSIM4v5lcgidlGiven = TRUE; break; case BSIM4v5_MOD_LPHIN : mod->BSIM4v5lphin = value->rValue; mod->BSIM4v5lphinGiven = TRUE; break; case BSIM4v5_MOD_LEGIDL : mod->BSIM4v5legidl = value->rValue; mod->BSIM4v5legidlGiven = TRUE; break; case BSIM4v5_MOD_LAIGC : mod->BSIM4v5laigc = value->rValue; mod->BSIM4v5laigcGiven = TRUE; break; case BSIM4v5_MOD_LBIGC : mod->BSIM4v5lbigc = value->rValue; mod->BSIM4v5lbigcGiven = TRUE; break; case BSIM4v5_MOD_LCIGC : mod->BSIM4v5lcigc = value->rValue; mod->BSIM4v5lcigcGiven = TRUE; break; case BSIM4v5_MOD_LAIGSD : mod->BSIM4v5laigsd = value->rValue; mod->BSIM4v5laigsdGiven = TRUE; break; case BSIM4v5_MOD_LBIGSD : mod->BSIM4v5lbigsd = value->rValue; mod->BSIM4v5lbigsdGiven = TRUE; break; case BSIM4v5_MOD_LCIGSD : mod->BSIM4v5lcigsd = value->rValue; mod->BSIM4v5lcigsdGiven = TRUE; break; case BSIM4v5_MOD_LAIGBACC : mod->BSIM4v5laigbacc = value->rValue; mod->BSIM4v5laigbaccGiven = TRUE; break; case BSIM4v5_MOD_LBIGBACC : mod->BSIM4v5lbigbacc = value->rValue; mod->BSIM4v5lbigbaccGiven = TRUE; break; case BSIM4v5_MOD_LCIGBACC : mod->BSIM4v5lcigbacc = value->rValue; mod->BSIM4v5lcigbaccGiven = TRUE; break; case BSIM4v5_MOD_LAIGBINV : mod->BSIM4v5laigbinv = value->rValue; mod->BSIM4v5laigbinvGiven = TRUE; break; case BSIM4v5_MOD_LBIGBINV : mod->BSIM4v5lbigbinv = value->rValue; mod->BSIM4v5lbigbinvGiven = TRUE; break; case BSIM4v5_MOD_LCIGBINV : mod->BSIM4v5lcigbinv = value->rValue; mod->BSIM4v5lcigbinvGiven = TRUE; break; case BSIM4v5_MOD_LNIGC : mod->BSIM4v5lnigc = value->rValue; mod->BSIM4v5lnigcGiven = TRUE; break; case BSIM4v5_MOD_LNIGBINV : mod->BSIM4v5lnigbinv = value->rValue; mod->BSIM4v5lnigbinvGiven = TRUE; break; case BSIM4v5_MOD_LNIGBACC : mod->BSIM4v5lnigbacc = value->rValue; mod->BSIM4v5lnigbaccGiven = TRUE; break; case BSIM4v5_MOD_LNTOX : mod->BSIM4v5lntox = value->rValue; mod->BSIM4v5lntoxGiven = TRUE; break; case BSIM4v5_MOD_LEIGBINV : mod->BSIM4v5leigbinv = value->rValue; mod->BSIM4v5leigbinvGiven = TRUE; break; case BSIM4v5_MOD_LPIGCD : mod->BSIM4v5lpigcd = value->rValue; mod->BSIM4v5lpigcdGiven = TRUE; break; case BSIM4v5_MOD_LPOXEDGE : mod->BSIM4v5lpoxedge = value->rValue; mod->BSIM4v5lpoxedgeGiven = TRUE; break; case BSIM4v5_MOD_LXRCRG1 : mod->BSIM4v5lxrcrg1 = value->rValue; mod->BSIM4v5lxrcrg1Given = TRUE; break; case BSIM4v5_MOD_LXRCRG2 : mod->BSIM4v5lxrcrg2 = value->rValue; mod->BSIM4v5lxrcrg2Given = TRUE; break; case BSIM4v5_MOD_LLAMBDA : mod->BSIM4v5llambda = value->rValue; mod->BSIM4v5llambdaGiven = TRUE; break; case BSIM4v5_MOD_LVTL : mod->BSIM4v5lvtl = value->rValue; mod->BSIM4v5lvtlGiven = TRUE; break; case BSIM4v5_MOD_LXN: mod->BSIM4v5lxn = value->rValue; mod->BSIM4v5lxnGiven = TRUE; break; case BSIM4v5_MOD_LVFBSDOFF: mod->BSIM4v5lvfbsdoff = value->rValue; mod->BSIM4v5lvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_LTVFBSDOFF: mod->BSIM4v5ltvfbsdoff = value->rValue; mod->BSIM4v5ltvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_LEU : mod->BSIM4v5leu = value->rValue; mod->BSIM4v5leuGiven = TRUE; break; case BSIM4v5_MOD_LVFB : mod->BSIM4v5lvfb = value->rValue; mod->BSIM4v5lvfbGiven = TRUE; break; case BSIM4v5_MOD_LCGSL : mod->BSIM4v5lcgsl = value->rValue; mod->BSIM4v5lcgslGiven = TRUE; break; case BSIM4v5_MOD_LCGDL : mod->BSIM4v5lcgdl = value->rValue; mod->BSIM4v5lcgdlGiven = TRUE; break; case BSIM4v5_MOD_LCKAPPAS : mod->BSIM4v5lckappas = value->rValue; mod->BSIM4v5lckappasGiven = TRUE; break; case BSIM4v5_MOD_LCKAPPAD : mod->BSIM4v5lckappad = value->rValue; mod->BSIM4v5lckappadGiven = TRUE; break; case BSIM4v5_MOD_LCF : mod->BSIM4v5lcf = value->rValue; mod->BSIM4v5lcfGiven = TRUE; break; case BSIM4v5_MOD_LCLC : mod->BSIM4v5lclc = value->rValue; mod->BSIM4v5lclcGiven = TRUE; break; case BSIM4v5_MOD_LCLE : mod->BSIM4v5lcle = value->rValue; mod->BSIM4v5lcleGiven = TRUE; break; case BSIM4v5_MOD_LVFBCV : mod->BSIM4v5lvfbcv = value->rValue; mod->BSIM4v5lvfbcvGiven = TRUE; break; case BSIM4v5_MOD_LACDE : mod->BSIM4v5lacde = value->rValue; mod->BSIM4v5lacdeGiven = TRUE; break; case BSIM4v5_MOD_LMOIN : mod->BSIM4v5lmoin = value->rValue; mod->BSIM4v5lmoinGiven = TRUE; break; case BSIM4v5_MOD_LNOFF : mod->BSIM4v5lnoff = value->rValue; mod->BSIM4v5lnoffGiven = TRUE; break; case BSIM4v5_MOD_LVOFFCV : mod->BSIM4v5lvoffcv = value->rValue; mod->BSIM4v5lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM4v5_MOD_WCDSC : mod->BSIM4v5wcdsc = value->rValue; mod->BSIM4v5wcdscGiven = TRUE; break; case BSIM4v5_MOD_WCDSCB : mod->BSIM4v5wcdscb = value->rValue; mod->BSIM4v5wcdscbGiven = TRUE; break; case BSIM4v5_MOD_WCDSCD : mod->BSIM4v5wcdscd = value->rValue; mod->BSIM4v5wcdscdGiven = TRUE; break; case BSIM4v5_MOD_WCIT : mod->BSIM4v5wcit = value->rValue; mod->BSIM4v5wcitGiven = TRUE; break; case BSIM4v5_MOD_WNFACTOR : mod->BSIM4v5wnfactor = value->rValue; mod->BSIM4v5wnfactorGiven = TRUE; break; case BSIM4v5_MOD_WXJ: mod->BSIM4v5wxj = value->rValue; mod->BSIM4v5wxjGiven = TRUE; break; case BSIM4v5_MOD_WVSAT: mod->BSIM4v5wvsat = value->rValue; mod->BSIM4v5wvsatGiven = TRUE; break; case BSIM4v5_MOD_WA0: mod->BSIM4v5wa0 = value->rValue; mod->BSIM4v5wa0Given = TRUE; break; case BSIM4v5_MOD_WAGS: mod->BSIM4v5wags = value->rValue; mod->BSIM4v5wagsGiven = TRUE; break; case BSIM4v5_MOD_WA1: mod->BSIM4v5wa1 = value->rValue; mod->BSIM4v5wa1Given = TRUE; break; case BSIM4v5_MOD_WA2: mod->BSIM4v5wa2 = value->rValue; mod->BSIM4v5wa2Given = TRUE; break; case BSIM4v5_MOD_WAT: mod->BSIM4v5wat = value->rValue; mod->BSIM4v5watGiven = TRUE; break; case BSIM4v5_MOD_WKETA: mod->BSIM4v5wketa = value->rValue; mod->BSIM4v5wketaGiven = TRUE; break; case BSIM4v5_MOD_WNSUB: mod->BSIM4v5wnsub = value->rValue; mod->BSIM4v5wnsubGiven = TRUE; break; case BSIM4v5_MOD_WNDEP: mod->BSIM4v5wndep = value->rValue; mod->BSIM4v5wndepGiven = TRUE; if (mod->BSIM4v5wndep > 1.0e20) mod->BSIM4v5wndep *= 1.0e-6; break; case BSIM4v5_MOD_WNSD: mod->BSIM4v5wnsd = value->rValue; mod->BSIM4v5wnsdGiven = TRUE; if (mod->BSIM4v5wnsd > 1.0e23) mod->BSIM4v5wnsd *= 1.0e-6; break; case BSIM4v5_MOD_WNGATE: mod->BSIM4v5wngate = value->rValue; mod->BSIM4v5wngateGiven = TRUE; if (mod->BSIM4v5wngate > 1.0e23) mod->BSIM4v5wngate *= 1.0e-6; break; case BSIM4v5_MOD_WGAMMA1: mod->BSIM4v5wgamma1 = value->rValue; mod->BSIM4v5wgamma1Given = TRUE; break; case BSIM4v5_MOD_WGAMMA2: mod->BSIM4v5wgamma2 = value->rValue; mod->BSIM4v5wgamma2Given = TRUE; break; case BSIM4v5_MOD_WVBX: mod->BSIM4v5wvbx = value->rValue; mod->BSIM4v5wvbxGiven = TRUE; break; case BSIM4v5_MOD_WVBM: mod->BSIM4v5wvbm = value->rValue; mod->BSIM4v5wvbmGiven = TRUE; break; case BSIM4v5_MOD_WXT: mod->BSIM4v5wxt = value->rValue; mod->BSIM4v5wxtGiven = TRUE; break; case BSIM4v5_MOD_WK1: mod->BSIM4v5wk1 = value->rValue; mod->BSIM4v5wk1Given = TRUE; break; case BSIM4v5_MOD_WKT1: mod->BSIM4v5wkt1 = value->rValue; mod->BSIM4v5wkt1Given = TRUE; break; case BSIM4v5_MOD_WKT1L: mod->BSIM4v5wkt1l = value->rValue; mod->BSIM4v5wkt1lGiven = TRUE; break; case BSIM4v5_MOD_WKT2: mod->BSIM4v5wkt2 = value->rValue; mod->BSIM4v5wkt2Given = TRUE; break; case BSIM4v5_MOD_WK2: mod->BSIM4v5wk2 = value->rValue; mod->BSIM4v5wk2Given = TRUE; break; case BSIM4v5_MOD_WK3: mod->BSIM4v5wk3 = value->rValue; mod->BSIM4v5wk3Given = TRUE; break; case BSIM4v5_MOD_WK3B: mod->BSIM4v5wk3b = value->rValue; mod->BSIM4v5wk3bGiven = TRUE; break; case BSIM4v5_MOD_WLPE0: mod->BSIM4v5wlpe0 = value->rValue; mod->BSIM4v5wlpe0Given = TRUE; break; case BSIM4v5_MOD_WLPEB: mod->BSIM4v5wlpeb = value->rValue; mod->BSIM4v5wlpebGiven = TRUE; break; case BSIM4v5_MOD_WDVTP0: mod->BSIM4v5wdvtp0 = value->rValue; mod->BSIM4v5wdvtp0Given = TRUE; break; case BSIM4v5_MOD_WDVTP1: mod->BSIM4v5wdvtp1 = value->rValue; mod->BSIM4v5wdvtp1Given = TRUE; break; case BSIM4v5_MOD_WW0: mod->BSIM4v5ww0 = value->rValue; mod->BSIM4v5ww0Given = TRUE; break; case BSIM4v5_MOD_WDVT0: mod->BSIM4v5wdvt0 = value->rValue; mod->BSIM4v5wdvt0Given = TRUE; break; case BSIM4v5_MOD_WDVT1: mod->BSIM4v5wdvt1 = value->rValue; mod->BSIM4v5wdvt1Given = TRUE; break; case BSIM4v5_MOD_WDVT2: mod->BSIM4v5wdvt2 = value->rValue; mod->BSIM4v5wdvt2Given = TRUE; break; case BSIM4v5_MOD_WDVT0W: mod->BSIM4v5wdvt0w = value->rValue; mod->BSIM4v5wdvt0wGiven = TRUE; break; case BSIM4v5_MOD_WDVT1W: mod->BSIM4v5wdvt1w = value->rValue; mod->BSIM4v5wdvt1wGiven = TRUE; break; case BSIM4v5_MOD_WDVT2W: mod->BSIM4v5wdvt2w = value->rValue; mod->BSIM4v5wdvt2wGiven = TRUE; break; case BSIM4v5_MOD_WDROUT: mod->BSIM4v5wdrout = value->rValue; mod->BSIM4v5wdroutGiven = TRUE; break; case BSIM4v5_MOD_WDSUB: mod->BSIM4v5wdsub = value->rValue; mod->BSIM4v5wdsubGiven = TRUE; break; case BSIM4v5_MOD_WVTH0: mod->BSIM4v5wvth0 = value->rValue; mod->BSIM4v5wvth0Given = TRUE; break; case BSIM4v5_MOD_WUA: mod->BSIM4v5wua = value->rValue; mod->BSIM4v5wuaGiven = TRUE; break; case BSIM4v5_MOD_WUA1: mod->BSIM4v5wua1 = value->rValue; mod->BSIM4v5wua1Given = TRUE; break; case BSIM4v5_MOD_WUB: mod->BSIM4v5wub = value->rValue; mod->BSIM4v5wubGiven = TRUE; break; case BSIM4v5_MOD_WUB1: mod->BSIM4v5wub1 = value->rValue; mod->BSIM4v5wub1Given = TRUE; break; case BSIM4v5_MOD_WUC: mod->BSIM4v5wuc = value->rValue; mod->BSIM4v5wucGiven = TRUE; break; case BSIM4v5_MOD_WUC1: mod->BSIM4v5wuc1 = value->rValue; mod->BSIM4v5wuc1Given = TRUE; break; case BSIM4v5_MOD_WU0 : mod->BSIM4v5wu0 = value->rValue; mod->BSIM4v5wu0Given = TRUE; break; case BSIM4v5_MOD_WUTE : mod->BSIM4v5wute = value->rValue; mod->BSIM4v5wuteGiven = TRUE; break; case BSIM4v5_MOD_WVOFF: mod->BSIM4v5wvoff = value->rValue; mod->BSIM4v5wvoffGiven = TRUE; break; case BSIM4v5_MOD_WTVOFF: mod->BSIM4v5wtvoff = value->rValue; mod->BSIM4v5wtvoffGiven = TRUE; break; case BSIM4v5_MOD_WMINV: mod->BSIM4v5wminv = value->rValue; mod->BSIM4v5wminvGiven = TRUE; break; case BSIM4v5_MOD_WFPROUT: mod->BSIM4v5wfprout = value->rValue; mod->BSIM4v5wfproutGiven = TRUE; break; case BSIM4v5_MOD_WPDITS: mod->BSIM4v5wpdits = value->rValue; mod->BSIM4v5wpditsGiven = TRUE; break; case BSIM4v5_MOD_WPDITSD: mod->BSIM4v5wpditsd = value->rValue; mod->BSIM4v5wpditsdGiven = TRUE; break; case BSIM4v5_MOD_WDELTA : mod->BSIM4v5wdelta = value->rValue; mod->BSIM4v5wdeltaGiven = TRUE; break; case BSIM4v5_MOD_WRDSW: mod->BSIM4v5wrdsw = value->rValue; mod->BSIM4v5wrdswGiven = TRUE; break; case BSIM4v5_MOD_WRDW: mod->BSIM4v5wrdw = value->rValue; mod->BSIM4v5wrdwGiven = TRUE; break; case BSIM4v5_MOD_WRSW: mod->BSIM4v5wrsw = value->rValue; mod->BSIM4v5wrswGiven = TRUE; break; case BSIM4v5_MOD_WPRWB: mod->BSIM4v5wprwb = value->rValue; mod->BSIM4v5wprwbGiven = TRUE; break; case BSIM4v5_MOD_WPRWG: mod->BSIM4v5wprwg = value->rValue; mod->BSIM4v5wprwgGiven = TRUE; break; case BSIM4v5_MOD_WPRT: mod->BSIM4v5wprt = value->rValue; mod->BSIM4v5wprtGiven = TRUE; break; case BSIM4v5_MOD_WETA0: mod->BSIM4v5weta0 = value->rValue; mod->BSIM4v5weta0Given = TRUE; break; case BSIM4v5_MOD_WETAB: mod->BSIM4v5wetab = value->rValue; mod->BSIM4v5wetabGiven = TRUE; break; case BSIM4v5_MOD_WPCLM: mod->BSIM4v5wpclm = value->rValue; mod->BSIM4v5wpclmGiven = TRUE; break; case BSIM4v5_MOD_WPDIBL1: mod->BSIM4v5wpdibl1 = value->rValue; mod->BSIM4v5wpdibl1Given = TRUE; break; case BSIM4v5_MOD_WPDIBL2: mod->BSIM4v5wpdibl2 = value->rValue; mod->BSIM4v5wpdibl2Given = TRUE; break; case BSIM4v5_MOD_WPDIBLB: mod->BSIM4v5wpdiblb = value->rValue; mod->BSIM4v5wpdiblbGiven = TRUE; break; case BSIM4v5_MOD_WPSCBE1: mod->BSIM4v5wpscbe1 = value->rValue; mod->BSIM4v5wpscbe1Given = TRUE; break; case BSIM4v5_MOD_WPSCBE2: mod->BSIM4v5wpscbe2 = value->rValue; mod->BSIM4v5wpscbe2Given = TRUE; break; case BSIM4v5_MOD_WPVAG: mod->BSIM4v5wpvag = value->rValue; mod->BSIM4v5wpvagGiven = TRUE; break; case BSIM4v5_MOD_WWR : mod->BSIM4v5wwr = value->rValue; mod->BSIM4v5wwrGiven = TRUE; break; case BSIM4v5_MOD_WDWG : mod->BSIM4v5wdwg = value->rValue; mod->BSIM4v5wdwgGiven = TRUE; break; case BSIM4v5_MOD_WDWB : mod->BSIM4v5wdwb = value->rValue; mod->BSIM4v5wdwbGiven = TRUE; break; case BSIM4v5_MOD_WB0 : mod->BSIM4v5wb0 = value->rValue; mod->BSIM4v5wb0Given = TRUE; break; case BSIM4v5_MOD_WB1 : mod->BSIM4v5wb1 = value->rValue; mod->BSIM4v5wb1Given = TRUE; break; case BSIM4v5_MOD_WALPHA0 : mod->BSIM4v5walpha0 = value->rValue; mod->BSIM4v5walpha0Given = TRUE; break; case BSIM4v5_MOD_WALPHA1 : mod->BSIM4v5walpha1 = value->rValue; mod->BSIM4v5walpha1Given = TRUE; break; case BSIM4v5_MOD_WBETA0 : mod->BSIM4v5wbeta0 = value->rValue; mod->BSIM4v5wbeta0Given = TRUE; break; case BSIM4v5_MOD_WAGIDL : mod->BSIM4v5wagidl = value->rValue; mod->BSIM4v5wagidlGiven = TRUE; break; case BSIM4v5_MOD_WBGIDL : mod->BSIM4v5wbgidl = value->rValue; mod->BSIM4v5wbgidlGiven = TRUE; break; case BSIM4v5_MOD_WCGIDL : mod->BSIM4v5wcgidl = value->rValue; mod->BSIM4v5wcgidlGiven = TRUE; break; case BSIM4v5_MOD_WPHIN : mod->BSIM4v5wphin = value->rValue; mod->BSIM4v5wphinGiven = TRUE; break; case BSIM4v5_MOD_WEGIDL : mod->BSIM4v5wegidl = value->rValue; mod->BSIM4v5wegidlGiven = TRUE; break; case BSIM4v5_MOD_WAIGC : mod->BSIM4v5waigc = value->rValue; mod->BSIM4v5waigcGiven = TRUE; break; case BSIM4v5_MOD_WBIGC : mod->BSIM4v5wbigc = value->rValue; mod->BSIM4v5wbigcGiven = TRUE; break; case BSIM4v5_MOD_WCIGC : mod->BSIM4v5wcigc = value->rValue; mod->BSIM4v5wcigcGiven = TRUE; break; case BSIM4v5_MOD_WAIGSD : mod->BSIM4v5waigsd = value->rValue; mod->BSIM4v5waigsdGiven = TRUE; break; case BSIM4v5_MOD_WBIGSD : mod->BSIM4v5wbigsd = value->rValue; mod->BSIM4v5wbigsdGiven = TRUE; break; case BSIM4v5_MOD_WCIGSD : mod->BSIM4v5wcigsd = value->rValue; mod->BSIM4v5wcigsdGiven = TRUE; break; case BSIM4v5_MOD_WAIGBACC : mod->BSIM4v5waigbacc = value->rValue; mod->BSIM4v5waigbaccGiven = TRUE; break; case BSIM4v5_MOD_WBIGBACC : mod->BSIM4v5wbigbacc = value->rValue; mod->BSIM4v5wbigbaccGiven = TRUE; break; case BSIM4v5_MOD_WCIGBACC : mod->BSIM4v5wcigbacc = value->rValue; mod->BSIM4v5wcigbaccGiven = TRUE; break; case BSIM4v5_MOD_WAIGBINV : mod->BSIM4v5waigbinv = value->rValue; mod->BSIM4v5waigbinvGiven = TRUE; break; case BSIM4v5_MOD_WBIGBINV : mod->BSIM4v5wbigbinv = value->rValue; mod->BSIM4v5wbigbinvGiven = TRUE; break; case BSIM4v5_MOD_WCIGBINV : mod->BSIM4v5wcigbinv = value->rValue; mod->BSIM4v5wcigbinvGiven = TRUE; break; case BSIM4v5_MOD_WNIGC : mod->BSIM4v5wnigc = value->rValue; mod->BSIM4v5wnigcGiven = TRUE; break; case BSIM4v5_MOD_WNIGBINV : mod->BSIM4v5wnigbinv = value->rValue; mod->BSIM4v5wnigbinvGiven = TRUE; break; case BSIM4v5_MOD_WNIGBACC : mod->BSIM4v5wnigbacc = value->rValue; mod->BSIM4v5wnigbaccGiven = TRUE; break; case BSIM4v5_MOD_WNTOX : mod->BSIM4v5wntox = value->rValue; mod->BSIM4v5wntoxGiven = TRUE; break; case BSIM4v5_MOD_WEIGBINV : mod->BSIM4v5weigbinv = value->rValue; mod->BSIM4v5weigbinvGiven = TRUE; break; case BSIM4v5_MOD_WPIGCD : mod->BSIM4v5wpigcd = value->rValue; mod->BSIM4v5wpigcdGiven = TRUE; break; case BSIM4v5_MOD_WPOXEDGE : mod->BSIM4v5wpoxedge = value->rValue; mod->BSIM4v5wpoxedgeGiven = TRUE; break; case BSIM4v5_MOD_WXRCRG1 : mod->BSIM4v5wxrcrg1 = value->rValue; mod->BSIM4v5wxrcrg1Given = TRUE; break; case BSIM4v5_MOD_WXRCRG2 : mod->BSIM4v5wxrcrg2 = value->rValue; mod->BSIM4v5wxrcrg2Given = TRUE; break; case BSIM4v5_MOD_WLAMBDA : mod->BSIM4v5wlambda = value->rValue; mod->BSIM4v5wlambdaGiven = TRUE; break; case BSIM4v5_MOD_WVTL : mod->BSIM4v5wvtl = value->rValue; mod->BSIM4v5wvtlGiven = TRUE; break; case BSIM4v5_MOD_WXN: mod->BSIM4v5wxn = value->rValue; mod->BSIM4v5wxnGiven = TRUE; break; case BSIM4v5_MOD_WVFBSDOFF: mod->BSIM4v5wvfbsdoff = value->rValue; mod->BSIM4v5wvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_WTVFBSDOFF: mod->BSIM4v5wtvfbsdoff = value->rValue; mod->BSIM4v5wtvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_WEU : mod->BSIM4v5weu = value->rValue; mod->BSIM4v5weuGiven = TRUE; break; case BSIM4v5_MOD_WVFB : mod->BSIM4v5wvfb = value->rValue; mod->BSIM4v5wvfbGiven = TRUE; break; case BSIM4v5_MOD_WCGSL : mod->BSIM4v5wcgsl = value->rValue; mod->BSIM4v5wcgslGiven = TRUE; break; case BSIM4v5_MOD_WCGDL : mod->BSIM4v5wcgdl = value->rValue; mod->BSIM4v5wcgdlGiven = TRUE; break; case BSIM4v5_MOD_WCKAPPAS : mod->BSIM4v5wckappas = value->rValue; mod->BSIM4v5wckappasGiven = TRUE; break; case BSIM4v5_MOD_WCKAPPAD : mod->BSIM4v5wckappad = value->rValue; mod->BSIM4v5wckappadGiven = TRUE; break; case BSIM4v5_MOD_WCF : mod->BSIM4v5wcf = value->rValue; mod->BSIM4v5wcfGiven = TRUE; break; case BSIM4v5_MOD_WCLC : mod->BSIM4v5wclc = value->rValue; mod->BSIM4v5wclcGiven = TRUE; break; case BSIM4v5_MOD_WCLE : mod->BSIM4v5wcle = value->rValue; mod->BSIM4v5wcleGiven = TRUE; break; case BSIM4v5_MOD_WVFBCV : mod->BSIM4v5wvfbcv = value->rValue; mod->BSIM4v5wvfbcvGiven = TRUE; break; case BSIM4v5_MOD_WACDE : mod->BSIM4v5wacde = value->rValue; mod->BSIM4v5wacdeGiven = TRUE; break; case BSIM4v5_MOD_WMOIN : mod->BSIM4v5wmoin = value->rValue; mod->BSIM4v5wmoinGiven = TRUE; break; case BSIM4v5_MOD_WNOFF : mod->BSIM4v5wnoff = value->rValue; mod->BSIM4v5wnoffGiven = TRUE; break; case BSIM4v5_MOD_WVOFFCV : mod->BSIM4v5wvoffcv = value->rValue; mod->BSIM4v5wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM4v5_MOD_PCDSC : mod->BSIM4v5pcdsc = value->rValue; mod->BSIM4v5pcdscGiven = TRUE; break; case BSIM4v5_MOD_PCDSCB : mod->BSIM4v5pcdscb = value->rValue; mod->BSIM4v5pcdscbGiven = TRUE; break; case BSIM4v5_MOD_PCDSCD : mod->BSIM4v5pcdscd = value->rValue; mod->BSIM4v5pcdscdGiven = TRUE; break; case BSIM4v5_MOD_PCIT : mod->BSIM4v5pcit = value->rValue; mod->BSIM4v5pcitGiven = TRUE; break; case BSIM4v5_MOD_PNFACTOR : mod->BSIM4v5pnfactor = value->rValue; mod->BSIM4v5pnfactorGiven = TRUE; break; case BSIM4v5_MOD_PXJ: mod->BSIM4v5pxj = value->rValue; mod->BSIM4v5pxjGiven = TRUE; break; case BSIM4v5_MOD_PVSAT: mod->BSIM4v5pvsat = value->rValue; mod->BSIM4v5pvsatGiven = TRUE; break; case BSIM4v5_MOD_PA0: mod->BSIM4v5pa0 = value->rValue; mod->BSIM4v5pa0Given = TRUE; break; case BSIM4v5_MOD_PAGS: mod->BSIM4v5pags = value->rValue; mod->BSIM4v5pagsGiven = TRUE; break; case BSIM4v5_MOD_PA1: mod->BSIM4v5pa1 = value->rValue; mod->BSIM4v5pa1Given = TRUE; break; case BSIM4v5_MOD_PA2: mod->BSIM4v5pa2 = value->rValue; mod->BSIM4v5pa2Given = TRUE; break; case BSIM4v5_MOD_PAT: mod->BSIM4v5pat = value->rValue; mod->BSIM4v5patGiven = TRUE; break; case BSIM4v5_MOD_PKETA: mod->BSIM4v5pketa = value->rValue; mod->BSIM4v5pketaGiven = TRUE; break; case BSIM4v5_MOD_PNSUB: mod->BSIM4v5pnsub = value->rValue; mod->BSIM4v5pnsubGiven = TRUE; break; case BSIM4v5_MOD_PNDEP: mod->BSIM4v5pndep = value->rValue; mod->BSIM4v5pndepGiven = TRUE; if (mod->BSIM4v5pndep > 1.0e20) mod->BSIM4v5pndep *= 1.0e-6; break; case BSIM4v5_MOD_PNSD: mod->BSIM4v5pnsd = value->rValue; mod->BSIM4v5pnsdGiven = TRUE; if (mod->BSIM4v5pnsd > 1.0e23) mod->BSIM4v5pnsd *= 1.0e-6; break; case BSIM4v5_MOD_PNGATE: mod->BSIM4v5pngate = value->rValue; mod->BSIM4v5pngateGiven = TRUE; if (mod->BSIM4v5pngate > 1.0e23) mod->BSIM4v5pngate *= 1.0e-6; break; case BSIM4v5_MOD_PGAMMA1: mod->BSIM4v5pgamma1 = value->rValue; mod->BSIM4v5pgamma1Given = TRUE; break; case BSIM4v5_MOD_PGAMMA2: mod->BSIM4v5pgamma2 = value->rValue; mod->BSIM4v5pgamma2Given = TRUE; break; case BSIM4v5_MOD_PVBX: mod->BSIM4v5pvbx = value->rValue; mod->BSIM4v5pvbxGiven = TRUE; break; case BSIM4v5_MOD_PVBM: mod->BSIM4v5pvbm = value->rValue; mod->BSIM4v5pvbmGiven = TRUE; break; case BSIM4v5_MOD_PXT: mod->BSIM4v5pxt = value->rValue; mod->BSIM4v5pxtGiven = TRUE; break; case BSIM4v5_MOD_PK1: mod->BSIM4v5pk1 = value->rValue; mod->BSIM4v5pk1Given = TRUE; break; case BSIM4v5_MOD_PKT1: mod->BSIM4v5pkt1 = value->rValue; mod->BSIM4v5pkt1Given = TRUE; break; case BSIM4v5_MOD_PKT1L: mod->BSIM4v5pkt1l = value->rValue; mod->BSIM4v5pkt1lGiven = TRUE; break; case BSIM4v5_MOD_PKT2: mod->BSIM4v5pkt2 = value->rValue; mod->BSIM4v5pkt2Given = TRUE; break; case BSIM4v5_MOD_PK2: mod->BSIM4v5pk2 = value->rValue; mod->BSIM4v5pk2Given = TRUE; break; case BSIM4v5_MOD_PK3: mod->BSIM4v5pk3 = value->rValue; mod->BSIM4v5pk3Given = TRUE; break; case BSIM4v5_MOD_PK3B: mod->BSIM4v5pk3b = value->rValue; mod->BSIM4v5pk3bGiven = TRUE; break; case BSIM4v5_MOD_PLPE0: mod->BSIM4v5plpe0 = value->rValue; mod->BSIM4v5plpe0Given = TRUE; break; case BSIM4v5_MOD_PLPEB: mod->BSIM4v5plpeb = value->rValue; mod->BSIM4v5plpebGiven = TRUE; break; case BSIM4v5_MOD_PDVTP0: mod->BSIM4v5pdvtp0 = value->rValue; mod->BSIM4v5pdvtp0Given = TRUE; break; case BSIM4v5_MOD_PDVTP1: mod->BSIM4v5pdvtp1 = value->rValue; mod->BSIM4v5pdvtp1Given = TRUE; break; case BSIM4v5_MOD_PW0: mod->BSIM4v5pw0 = value->rValue; mod->BSIM4v5pw0Given = TRUE; break; case BSIM4v5_MOD_PDVT0: mod->BSIM4v5pdvt0 = value->rValue; mod->BSIM4v5pdvt0Given = TRUE; break; case BSIM4v5_MOD_PDVT1: mod->BSIM4v5pdvt1 = value->rValue; mod->BSIM4v5pdvt1Given = TRUE; break; case BSIM4v5_MOD_PDVT2: mod->BSIM4v5pdvt2 = value->rValue; mod->BSIM4v5pdvt2Given = TRUE; break; case BSIM4v5_MOD_PDVT0W: mod->BSIM4v5pdvt0w = value->rValue; mod->BSIM4v5pdvt0wGiven = TRUE; break; case BSIM4v5_MOD_PDVT1W: mod->BSIM4v5pdvt1w = value->rValue; mod->BSIM4v5pdvt1wGiven = TRUE; break; case BSIM4v5_MOD_PDVT2W: mod->BSIM4v5pdvt2w = value->rValue; mod->BSIM4v5pdvt2wGiven = TRUE; break; case BSIM4v5_MOD_PDROUT: mod->BSIM4v5pdrout = value->rValue; mod->BSIM4v5pdroutGiven = TRUE; break; case BSIM4v5_MOD_PDSUB: mod->BSIM4v5pdsub = value->rValue; mod->BSIM4v5pdsubGiven = TRUE; break; case BSIM4v5_MOD_PVTH0: mod->BSIM4v5pvth0 = value->rValue; mod->BSIM4v5pvth0Given = TRUE; break; case BSIM4v5_MOD_PUA: mod->BSIM4v5pua = value->rValue; mod->BSIM4v5puaGiven = TRUE; break; case BSIM4v5_MOD_PUA1: mod->BSIM4v5pua1 = value->rValue; mod->BSIM4v5pua1Given = TRUE; break; case BSIM4v5_MOD_PUB: mod->BSIM4v5pub = value->rValue; mod->BSIM4v5pubGiven = TRUE; break; case BSIM4v5_MOD_PUB1: mod->BSIM4v5pub1 = value->rValue; mod->BSIM4v5pub1Given = TRUE; break; case BSIM4v5_MOD_PUC: mod->BSIM4v5puc = value->rValue; mod->BSIM4v5pucGiven = TRUE; break; case BSIM4v5_MOD_PUC1: mod->BSIM4v5puc1 = value->rValue; mod->BSIM4v5puc1Given = TRUE; break; case BSIM4v5_MOD_PU0 : mod->BSIM4v5pu0 = value->rValue; mod->BSIM4v5pu0Given = TRUE; break; case BSIM4v5_MOD_PUTE : mod->BSIM4v5pute = value->rValue; mod->BSIM4v5puteGiven = TRUE; break; case BSIM4v5_MOD_PVOFF: mod->BSIM4v5pvoff = value->rValue; mod->BSIM4v5pvoffGiven = TRUE; break; case BSIM4v5_MOD_PTVOFF: mod->BSIM4v5ptvoff = value->rValue; mod->BSIM4v5ptvoffGiven = TRUE; break; case BSIM4v5_MOD_PMINV: mod->BSIM4v5pminv = value->rValue; mod->BSIM4v5pminvGiven = TRUE; break; case BSIM4v5_MOD_PFPROUT: mod->BSIM4v5pfprout = value->rValue; mod->BSIM4v5pfproutGiven = TRUE; break; case BSIM4v5_MOD_PPDITS: mod->BSIM4v5ppdits = value->rValue; mod->BSIM4v5ppditsGiven = TRUE; break; case BSIM4v5_MOD_PPDITSD: mod->BSIM4v5ppditsd = value->rValue; mod->BSIM4v5ppditsdGiven = TRUE; break; case BSIM4v5_MOD_PDELTA : mod->BSIM4v5pdelta = value->rValue; mod->BSIM4v5pdeltaGiven = TRUE; break; case BSIM4v5_MOD_PRDSW: mod->BSIM4v5prdsw = value->rValue; mod->BSIM4v5prdswGiven = TRUE; break; case BSIM4v5_MOD_PRDW: mod->BSIM4v5prdw = value->rValue; mod->BSIM4v5prdwGiven = TRUE; break; case BSIM4v5_MOD_PRSW: mod->BSIM4v5prsw = value->rValue; mod->BSIM4v5prswGiven = TRUE; break; case BSIM4v5_MOD_PPRWB: mod->BSIM4v5pprwb = value->rValue; mod->BSIM4v5pprwbGiven = TRUE; break; case BSIM4v5_MOD_PPRWG: mod->BSIM4v5pprwg = value->rValue; mod->BSIM4v5pprwgGiven = TRUE; break; case BSIM4v5_MOD_PPRT: mod->BSIM4v5pprt = value->rValue; mod->BSIM4v5pprtGiven = TRUE; break; case BSIM4v5_MOD_PETA0: mod->BSIM4v5peta0 = value->rValue; mod->BSIM4v5peta0Given = TRUE; break; case BSIM4v5_MOD_PETAB: mod->BSIM4v5petab = value->rValue; mod->BSIM4v5petabGiven = TRUE; break; case BSIM4v5_MOD_PPCLM: mod->BSIM4v5ppclm = value->rValue; mod->BSIM4v5ppclmGiven = TRUE; break; case BSIM4v5_MOD_PPDIBL1: mod->BSIM4v5ppdibl1 = value->rValue; mod->BSIM4v5ppdibl1Given = TRUE; break; case BSIM4v5_MOD_PPDIBL2: mod->BSIM4v5ppdibl2 = value->rValue; mod->BSIM4v5ppdibl2Given = TRUE; break; case BSIM4v5_MOD_PPDIBLB: mod->BSIM4v5ppdiblb = value->rValue; mod->BSIM4v5ppdiblbGiven = TRUE; break; case BSIM4v5_MOD_PPSCBE1: mod->BSIM4v5ppscbe1 = value->rValue; mod->BSIM4v5ppscbe1Given = TRUE; break; case BSIM4v5_MOD_PPSCBE2: mod->BSIM4v5ppscbe2 = value->rValue; mod->BSIM4v5ppscbe2Given = TRUE; break; case BSIM4v5_MOD_PPVAG: mod->BSIM4v5ppvag = value->rValue; mod->BSIM4v5ppvagGiven = TRUE; break; case BSIM4v5_MOD_PWR : mod->BSIM4v5pwr = value->rValue; mod->BSIM4v5pwrGiven = TRUE; break; case BSIM4v5_MOD_PDWG : mod->BSIM4v5pdwg = value->rValue; mod->BSIM4v5pdwgGiven = TRUE; break; case BSIM4v5_MOD_PDWB : mod->BSIM4v5pdwb = value->rValue; mod->BSIM4v5pdwbGiven = TRUE; break; case BSIM4v5_MOD_PB0 : mod->BSIM4v5pb0 = value->rValue; mod->BSIM4v5pb0Given = TRUE; break; case BSIM4v5_MOD_PB1 : mod->BSIM4v5pb1 = value->rValue; mod->BSIM4v5pb1Given = TRUE; break; case BSIM4v5_MOD_PALPHA0 : mod->BSIM4v5palpha0 = value->rValue; mod->BSIM4v5palpha0Given = TRUE; break; case BSIM4v5_MOD_PALPHA1 : mod->BSIM4v5palpha1 = value->rValue; mod->BSIM4v5palpha1Given = TRUE; break; case BSIM4v5_MOD_PBETA0 : mod->BSIM4v5pbeta0 = value->rValue; mod->BSIM4v5pbeta0Given = TRUE; break; case BSIM4v5_MOD_PAGIDL : mod->BSIM4v5pagidl = value->rValue; mod->BSIM4v5pagidlGiven = TRUE; break; case BSIM4v5_MOD_PBGIDL : mod->BSIM4v5pbgidl = value->rValue; mod->BSIM4v5pbgidlGiven = TRUE; break; case BSIM4v5_MOD_PCGIDL : mod->BSIM4v5pcgidl = value->rValue; mod->BSIM4v5pcgidlGiven = TRUE; break; case BSIM4v5_MOD_PPHIN : mod->BSIM4v5pphin = value->rValue; mod->BSIM4v5pphinGiven = TRUE; break; case BSIM4v5_MOD_PEGIDL : mod->BSIM4v5pegidl = value->rValue; mod->BSIM4v5pegidlGiven = TRUE; break; case BSIM4v5_MOD_PAIGC : mod->BSIM4v5paigc = value->rValue; mod->BSIM4v5paigcGiven = TRUE; break; case BSIM4v5_MOD_PBIGC : mod->BSIM4v5pbigc = value->rValue; mod->BSIM4v5pbigcGiven = TRUE; break; case BSIM4v5_MOD_PCIGC : mod->BSIM4v5pcigc = value->rValue; mod->BSIM4v5pcigcGiven = TRUE; break; case BSIM4v5_MOD_PAIGSD : mod->BSIM4v5paigsd = value->rValue; mod->BSIM4v5paigsdGiven = TRUE; break; case BSIM4v5_MOD_PBIGSD : mod->BSIM4v5pbigsd = value->rValue; mod->BSIM4v5pbigsdGiven = TRUE; break; case BSIM4v5_MOD_PCIGSD : mod->BSIM4v5pcigsd = value->rValue; mod->BSIM4v5pcigsdGiven = TRUE; break; case BSIM4v5_MOD_PAIGBACC : mod->BSIM4v5paigbacc = value->rValue; mod->BSIM4v5paigbaccGiven = TRUE; break; case BSIM4v5_MOD_PBIGBACC : mod->BSIM4v5pbigbacc = value->rValue; mod->BSIM4v5pbigbaccGiven = TRUE; break; case BSIM4v5_MOD_PCIGBACC : mod->BSIM4v5pcigbacc = value->rValue; mod->BSIM4v5pcigbaccGiven = TRUE; break; case BSIM4v5_MOD_PAIGBINV : mod->BSIM4v5paigbinv = value->rValue; mod->BSIM4v5paigbinvGiven = TRUE; break; case BSIM4v5_MOD_PBIGBINV : mod->BSIM4v5pbigbinv = value->rValue; mod->BSIM4v5pbigbinvGiven = TRUE; break; case BSIM4v5_MOD_PCIGBINV : mod->BSIM4v5pcigbinv = value->rValue; mod->BSIM4v5pcigbinvGiven = TRUE; break; case BSIM4v5_MOD_PNIGC : mod->BSIM4v5pnigc = value->rValue; mod->BSIM4v5pnigcGiven = TRUE; break; case BSIM4v5_MOD_PNIGBINV : mod->BSIM4v5pnigbinv = value->rValue; mod->BSIM4v5pnigbinvGiven = TRUE; break; case BSIM4v5_MOD_PNIGBACC : mod->BSIM4v5pnigbacc = value->rValue; mod->BSIM4v5pnigbaccGiven = TRUE; break; case BSIM4v5_MOD_PNTOX : mod->BSIM4v5pntox = value->rValue; mod->BSIM4v5pntoxGiven = TRUE; break; case BSIM4v5_MOD_PEIGBINV : mod->BSIM4v5peigbinv = value->rValue; mod->BSIM4v5peigbinvGiven = TRUE; break; case BSIM4v5_MOD_PPIGCD : mod->BSIM4v5ppigcd = value->rValue; mod->BSIM4v5ppigcdGiven = TRUE; break; case BSIM4v5_MOD_PPOXEDGE : mod->BSIM4v5ppoxedge = value->rValue; mod->BSIM4v5ppoxedgeGiven = TRUE; break; case BSIM4v5_MOD_PXRCRG1 : mod->BSIM4v5pxrcrg1 = value->rValue; mod->BSIM4v5pxrcrg1Given = TRUE; break; case BSIM4v5_MOD_PXRCRG2 : mod->BSIM4v5pxrcrg2 = value->rValue; mod->BSIM4v5pxrcrg2Given = TRUE; break; case BSIM4v5_MOD_PLAMBDA : mod->BSIM4v5plambda = value->rValue; mod->BSIM4v5plambdaGiven = TRUE; break; case BSIM4v5_MOD_PVTL : mod->BSIM4v5pvtl = value->rValue; mod->BSIM4v5pvtlGiven = TRUE; break; case BSIM4v5_MOD_PXN: mod->BSIM4v5pxn = value->rValue; mod->BSIM4v5pxnGiven = TRUE; break; case BSIM4v5_MOD_PVFBSDOFF: mod->BSIM4v5pvfbsdoff = value->rValue; mod->BSIM4v5pvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_PTVFBSDOFF: mod->BSIM4v5ptvfbsdoff = value->rValue; mod->BSIM4v5ptvfbsdoffGiven = TRUE; break; case BSIM4v5_MOD_PEU : mod->BSIM4v5peu = value->rValue; mod->BSIM4v5peuGiven = TRUE; break; case BSIM4v5_MOD_PVFB : mod->BSIM4v5pvfb = value->rValue; mod->BSIM4v5pvfbGiven = TRUE; break; case BSIM4v5_MOD_PCGSL : mod->BSIM4v5pcgsl = value->rValue; mod->BSIM4v5pcgslGiven = TRUE; break; case BSIM4v5_MOD_PCGDL : mod->BSIM4v5pcgdl = value->rValue; mod->BSIM4v5pcgdlGiven = TRUE; break; case BSIM4v5_MOD_PCKAPPAS : mod->BSIM4v5pckappas = value->rValue; mod->BSIM4v5pckappasGiven = TRUE; break; case BSIM4v5_MOD_PCKAPPAD : mod->BSIM4v5pckappad = value->rValue; mod->BSIM4v5pckappadGiven = TRUE; break; case BSIM4v5_MOD_PCF : mod->BSIM4v5pcf = value->rValue; mod->BSIM4v5pcfGiven = TRUE; break; case BSIM4v5_MOD_PCLC : mod->BSIM4v5pclc = value->rValue; mod->BSIM4v5pclcGiven = TRUE; break; case BSIM4v5_MOD_PCLE : mod->BSIM4v5pcle = value->rValue; mod->BSIM4v5pcleGiven = TRUE; break; case BSIM4v5_MOD_PVFBCV : mod->BSIM4v5pvfbcv = value->rValue; mod->BSIM4v5pvfbcvGiven = TRUE; break; case BSIM4v5_MOD_PACDE : mod->BSIM4v5pacde = value->rValue; mod->BSIM4v5pacdeGiven = TRUE; break; case BSIM4v5_MOD_PMOIN : mod->BSIM4v5pmoin = value->rValue; mod->BSIM4v5pmoinGiven = TRUE; break; case BSIM4v5_MOD_PNOFF : mod->BSIM4v5pnoff = value->rValue; mod->BSIM4v5pnoffGiven = TRUE; break; case BSIM4v5_MOD_PVOFFCV : mod->BSIM4v5pvoffcv = value->rValue; mod->BSIM4v5pvoffcvGiven = TRUE; break; case BSIM4v5_MOD_TNOM : mod->BSIM4v5tnom = value->rValue + CONSTCtoK; mod->BSIM4v5tnomGiven = TRUE; break; case BSIM4v5_MOD_CGSO : mod->BSIM4v5cgso = value->rValue; mod->BSIM4v5cgsoGiven = TRUE; break; case BSIM4v5_MOD_CGDO : mod->BSIM4v5cgdo = value->rValue; mod->BSIM4v5cgdoGiven = TRUE; break; case BSIM4v5_MOD_CGBO : mod->BSIM4v5cgbo = value->rValue; mod->BSIM4v5cgboGiven = TRUE; break; case BSIM4v5_MOD_XPART : mod->BSIM4v5xpart = value->rValue; mod->BSIM4v5xpartGiven = TRUE; break; case BSIM4v5_MOD_RSH : mod->BSIM4v5sheetResistance = value->rValue; mod->BSIM4v5sheetResistanceGiven = TRUE; break; case BSIM4v5_MOD_JSS : mod->BSIM4v5SjctSatCurDensity = value->rValue; mod->BSIM4v5SjctSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_JSWS : mod->BSIM4v5SjctSidewallSatCurDensity = value->rValue; mod->BSIM4v5SjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_JSWGS : mod->BSIM4v5SjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v5SjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_PBS : mod->BSIM4v5SbulkJctPotential = value->rValue; mod->BSIM4v5SbulkJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJS : mod->BSIM4v5SbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v5SbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_PBSWS : mod->BSIM4v5SsidewallJctPotential = value->rValue; mod->BSIM4v5SsidewallJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJSWS : mod->BSIM4v5SbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v5SbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_CJS : mod->BSIM4v5SunitAreaJctCap = value->rValue; mod->BSIM4v5SunitAreaJctCapGiven = TRUE; break; case BSIM4v5_MOD_CJSWS : mod->BSIM4v5SunitLengthSidewallJctCap = value->rValue; mod->BSIM4v5SunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v5_MOD_NJS : mod->BSIM4v5SjctEmissionCoeff = value->rValue; mod->BSIM4v5SjctEmissionCoeffGiven = TRUE; break; case BSIM4v5_MOD_PBSWGS : mod->BSIM4v5SGatesidewallJctPotential = value->rValue; mod->BSIM4v5SGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJSWGS : mod->BSIM4v5SbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v5SbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_CJSWGS : mod->BSIM4v5SunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v5SunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v5_MOD_XTIS : mod->BSIM4v5SjctTempExponent = value->rValue; mod->BSIM4v5SjctTempExponentGiven = TRUE; break; case BSIM4v5_MOD_JSD : mod->BSIM4v5DjctSatCurDensity = value->rValue; mod->BSIM4v5DjctSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_JSWD : mod->BSIM4v5DjctSidewallSatCurDensity = value->rValue; mod->BSIM4v5DjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_JSWGD : mod->BSIM4v5DjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v5DjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v5_MOD_PBD : mod->BSIM4v5DbulkJctPotential = value->rValue; mod->BSIM4v5DbulkJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJD : mod->BSIM4v5DbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v5DbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_PBSWD : mod->BSIM4v5DsidewallJctPotential = value->rValue; mod->BSIM4v5DsidewallJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJSWD : mod->BSIM4v5DbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v5DbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_CJD : mod->BSIM4v5DunitAreaJctCap = value->rValue; mod->BSIM4v5DunitAreaJctCapGiven = TRUE; break; case BSIM4v5_MOD_CJSWD : mod->BSIM4v5DunitLengthSidewallJctCap = value->rValue; mod->BSIM4v5DunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v5_MOD_NJD : mod->BSIM4v5DjctEmissionCoeff = value->rValue; mod->BSIM4v5DjctEmissionCoeffGiven = TRUE; break; case BSIM4v5_MOD_PBSWGD : mod->BSIM4v5DGatesidewallJctPotential = value->rValue; mod->BSIM4v5DGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v5_MOD_MJSWGD : mod->BSIM4v5DbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v5DbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v5_MOD_CJSWGD : mod->BSIM4v5DunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v5DunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v5_MOD_XTID : mod->BSIM4v5DjctTempExponent = value->rValue; mod->BSIM4v5DjctTempExponentGiven = TRUE; break; case BSIM4v5_MOD_LINT : mod->BSIM4v5Lint = value->rValue; mod->BSIM4v5LintGiven = TRUE; break; case BSIM4v5_MOD_LL : mod->BSIM4v5Ll = value->rValue; mod->BSIM4v5LlGiven = TRUE; break; case BSIM4v5_MOD_LLC : mod->BSIM4v5Llc = value->rValue; mod->BSIM4v5LlcGiven = TRUE; break; case BSIM4v5_MOD_LLN : mod->BSIM4v5Lln = value->rValue; mod->BSIM4v5LlnGiven = TRUE; break; case BSIM4v5_MOD_LW : mod->BSIM4v5Lw = value->rValue; mod->BSIM4v5LwGiven = TRUE; break; case BSIM4v5_MOD_LWC : mod->BSIM4v5Lwc = value->rValue; mod->BSIM4v5LwcGiven = TRUE; break; case BSIM4v5_MOD_LWN : mod->BSIM4v5Lwn = value->rValue; mod->BSIM4v5LwnGiven = TRUE; break; case BSIM4v5_MOD_LWL : mod->BSIM4v5Lwl = value->rValue; mod->BSIM4v5LwlGiven = TRUE; break; case BSIM4v5_MOD_LWLC : mod->BSIM4v5Lwlc = value->rValue; mod->BSIM4v5LwlcGiven = TRUE; break; case BSIM4v5_MOD_LMIN : mod->BSIM4v5Lmin = value->rValue; mod->BSIM4v5LminGiven = TRUE; break; case BSIM4v5_MOD_LMAX : mod->BSIM4v5Lmax = value->rValue; mod->BSIM4v5LmaxGiven = TRUE; break; case BSIM4v5_MOD_WINT : mod->BSIM4v5Wint = value->rValue; mod->BSIM4v5WintGiven = TRUE; break; case BSIM4v5_MOD_WL : mod->BSIM4v5Wl = value->rValue; mod->BSIM4v5WlGiven = TRUE; break; case BSIM4v5_MOD_WLC : mod->BSIM4v5Wlc = value->rValue; mod->BSIM4v5WlcGiven = TRUE; break; case BSIM4v5_MOD_WLN : mod->BSIM4v5Wln = value->rValue; mod->BSIM4v5WlnGiven = TRUE; break; case BSIM4v5_MOD_WW : mod->BSIM4v5Ww = value->rValue; mod->BSIM4v5WwGiven = TRUE; break; case BSIM4v5_MOD_WWC : mod->BSIM4v5Wwc = value->rValue; mod->BSIM4v5WwcGiven = TRUE; break; case BSIM4v5_MOD_WWN : mod->BSIM4v5Wwn = value->rValue; mod->BSIM4v5WwnGiven = TRUE; break; case BSIM4v5_MOD_WWL : mod->BSIM4v5Wwl = value->rValue; mod->BSIM4v5WwlGiven = TRUE; break; case BSIM4v5_MOD_WWLC : mod->BSIM4v5Wwlc = value->rValue; mod->BSIM4v5WwlcGiven = TRUE; break; case BSIM4v5_MOD_WMIN : mod->BSIM4v5Wmin = value->rValue; mod->BSIM4v5WminGiven = TRUE; break; case BSIM4v5_MOD_WMAX : mod->BSIM4v5Wmax = value->rValue; mod->BSIM4v5WmaxGiven = TRUE; break; case BSIM4v5_MOD_NOIA : mod->BSIM4v5oxideTrapDensityA = value->rValue; mod->BSIM4v5oxideTrapDensityAGiven = TRUE; break; case BSIM4v5_MOD_NOIB : mod->BSIM4v5oxideTrapDensityB = value->rValue; mod->BSIM4v5oxideTrapDensityBGiven = TRUE; break; case BSIM4v5_MOD_NOIC : mod->BSIM4v5oxideTrapDensityC = value->rValue; mod->BSIM4v5oxideTrapDensityCGiven = TRUE; break; case BSIM4v5_MOD_EM : mod->BSIM4v5em = value->rValue; mod->BSIM4v5emGiven = TRUE; break; case BSIM4v5_MOD_EF : mod->BSIM4v5ef = value->rValue; mod->BSIM4v5efGiven = TRUE; break; case BSIM4v5_MOD_AF : mod->BSIM4v5af = value->rValue; mod->BSIM4v5afGiven = TRUE; break; case BSIM4v5_MOD_KF : mod->BSIM4v5kf = value->rValue; mod->BSIM4v5kfGiven = TRUE; break; case BSIM4v5_MOD_VGS_MAX: mod->BSIM4v5vgsMax = value->rValue; mod->BSIM4v5vgsMaxGiven = TRUE; break; case BSIM4v5_MOD_VGD_MAX: mod->BSIM4v5vgdMax = value->rValue; mod->BSIM4v5vgdMaxGiven = TRUE; break; case BSIM4v5_MOD_VGB_MAX: mod->BSIM4v5vgbMax = value->rValue; mod->BSIM4v5vgbMaxGiven = TRUE; break; case BSIM4v5_MOD_VDS_MAX: mod->BSIM4v5vdsMax = value->rValue; mod->BSIM4v5vdsMaxGiven = TRUE; break; case BSIM4v5_MOD_VBS_MAX: mod->BSIM4v5vbsMax = value->rValue; mod->BSIM4v5vbsMaxGiven = TRUE; break; case BSIM4v5_MOD_VBD_MAX: mod->BSIM4v5vbdMax = value->rValue; mod->BSIM4v5vbdMaxGiven = TRUE; break; case BSIM4v5_MOD_NMOS : if(value->iValue) { mod->BSIM4v5type = 1; mod->BSIM4v5typeGiven = TRUE; } break; case BSIM4v5_MOD_PMOS : if(value->iValue) { mod->BSIM4v5type = - 1; mod->BSIM4v5typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5noi.c0000644000265600020320000007133712264261473021172 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4noi.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* * WDL: 1/f noise model has been smoothed out and enhanced with * bulk charge effect as well as physical N* equ. and necessary * conversion into the SI unit system. */ static double BSIM4v5Eval1ovFNoise( double Vds, BSIM4v5model *model, BSIM4v5instance *here, double freq, double temp) { struct bsim4v5SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM4v5cd); Leff = pParam->BSIM4v5leff - 2.0 * model->BSIM4v5lintnoi; Leffsq = Leff * Leff; esat = 2.0 * here->BSIM4v5vsattemp / here->BSIM4v5ueff; if(model->BSIM4v5em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ else { T0 = ((((Vds - here->BSIM4v5Vdseff) / pParam->BSIM4v5litl) + model->BSIM4v5em) / esat); DelClm = pParam->BSIM4v5litl * log (MAX(T0, N_MINLOG)); if (DelClm < 0.0) DelClm = 0.0; /* bugfix */ } EffFreq = pow(freq, model->BSIM4v5ef); T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v5ueff; T2 = 1.0e10 * EffFreq * here->BSIM4v5Abulk * model->BSIM4v5coxe * Leffsq; N0 = model->BSIM4v5coxe * here->BSIM4v5Vgsteff / CHARGE; Nl = model->BSIM4v5coxe * here->BSIM4v5Vgsteff * (1.0 - here->BSIM4v5AbovVgst2Vtm * here->BSIM4v5Vdseff) / CHARGE; T3 = model->BSIM4v5oxideTrapDensityA * log(MAX(((N0 + here->BSIM4v5nstar) / (Nl + here->BSIM4v5nstar)), N_MINLOG)); T4 = model->BSIM4v5oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM4v5oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4v5weff * here->BSIM4v5nf; T8 = model->BSIM4v5oxideTrapDensityA + model->BSIM4v5oxideTrapDensityB * Nl + model->BSIM4v5oxideTrapDensityC * Nl * Nl; T9 = (Nl + here->BSIM4v5nstar) * (Nl + here->BSIM4v5nstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM4v5noise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM4v5model *model = (BSIM4v5model *)inModel; BSIM4v5instance *here; struct bsim4v5SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM4v5NSRCS]; double lnNdens[BSIM4v5NSRCS]; double T0, T1, T2, T5, T10, T11; double Vds, Ssi, Swi; double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare, bodymode; double m; int i; /* define the names of the noise sources */ static char *BSIM4v5nNames[BSIM4v5NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".rg", /* noise due to rgeltd */ ".rbps", /* noise due to rbps */ ".rbpd", /* noise due to rbpd */ ".rbpb", /* noise due to rbpb */ ".rbsb", /* noise due to rbsb */ ".rbdb", /* noise due to rbdb */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".igs", /* shot noise due to IGS */ ".igd", /* shot noise due to IGD */ ".igb", /* shot noise due to IGB */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here != NULL; here = here->BSIM4v5nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM4v5NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM4v5name, BSIM4v5nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM4v5NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM4v5name, BSIM4v5nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM4v5name, BSIM4v5nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM4v5m; switch (mode) { case N_DENS: if (model->BSIM4v5tnoiMod == 0) { if (model->BSIM4v5rdsMod == 0) { gspr = here->BSIM4v5sourceConductance; gdpr = here->BSIM4v5drainConductance; if (here->BSIM4v5grdsw > 0.0) tmp = 1.0 / here->BSIM4v5grdsw; /* tmp used below */ else tmp = 0.0; } else { gspr = here->BSIM4v5gstot; gdpr = here->BSIM4v5gdtot; tmp = 0.0; } } else { T5 = here->BSIM4v5Vgsteff / here->BSIM4v5EsatL; T5 *= T5; npart_beta = model->BSIM4v5rnoia * (1.0 + T5 * model->BSIM4v5tnoia * pParam->BSIM4v5leff); npart_theta = model->BSIM4v5rnoib * (1.0 + T5 * model->BSIM4v5tnoib * pParam->BSIM4v5leff); if (model->BSIM4v5rdsMod == 0) { gspr = here->BSIM4v5sourceConductance; gdpr = here->BSIM4v5drainConductance; } else { gspr = here->BSIM4v5gstot; gdpr = here->BSIM4v5gdtot; } if ((*(ckt->CKTstates[0] + here->BSIM4v5vds)) >= 0.0) gspr = gspr / (1.0 + npart_theta * npart_theta * gspr / here->BSIM4v5IdovVds); /* bugfix */ else gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr / here->BSIM4v5IdovVds); } NevalSrc(&noizDens[BSIM4v5RDNOIZ], &lnNdens[BSIM4v5RDNOIZ], ckt, THERMNOISE, here->BSIM4v5dNodePrime, here->BSIM4v5dNode, gdpr * m); NevalSrc(&noizDens[BSIM4v5RSNOIZ], &lnNdens[BSIM4v5RSNOIZ], ckt, THERMNOISE, here->BSIM4v5sNodePrime, here->BSIM4v5sNode, gspr * m); if ((here->BSIM4v5rgateMod == 1) || (here->BSIM4v5rgateMod == 2)) { NevalSrc(&noizDens[BSIM4v5RGNOIZ], &lnNdens[BSIM4v5RGNOIZ], ckt, THERMNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5gNodeExt, here->BSIM4v5grgeltd * m); } else if (here->BSIM4v5rgateMod == 3) { NevalSrc(&noizDens[BSIM4v5RGNOIZ], &lnNdens[BSIM4v5RGNOIZ], ckt, THERMNOISE, here->BSIM4v5gNodeMid, here->BSIM4v5gNodeExt, here->BSIM4v5grgeltd * m); } else { noizDens[BSIM4v5RGNOIZ] = 0.0; lnNdens[BSIM4v5RGNOIZ] = log(MAX(noizDens[BSIM4v5RGNOIZ], N_MINLOG)); } bodymode = 5; if (here->BSIM4v5rbodyMod == 2) { if( ( !model->BSIM4v5rbps0Given) || ( !model->BSIM4v5rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4v5rbsbx0Given && !model->BSIM4v5rbsby0Given) || (!model->BSIM4v5rbdbx0Given && !model->BSIM4v5rbdby0Given) ) bodymode = 3; } if (here->BSIM4v5rbodyMod) { if(bodymode == 5) { NevalSrc(&noizDens[BSIM4v5RBPSNOIZ], &lnNdens[BSIM4v5RBPSNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5sbNode, here->BSIM4v5grbps * m); NevalSrc(&noizDens[BSIM4v5RBPDNOIZ], &lnNdens[BSIM4v5RBPDNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5dbNode, here->BSIM4v5grbpd * m); NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], &lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5bNode, here->BSIM4v5grbpb * m); NevalSrc(&noizDens[BSIM4v5RBSBNOIZ], &lnNdens[BSIM4v5RBSBNOIZ], ckt, THERMNOISE, here->BSIM4v5bNode, here->BSIM4v5sbNode, here->BSIM4v5grbsb * m); NevalSrc(&noizDens[BSIM4v5RBDBNOIZ], &lnNdens[BSIM4v5RBDBNOIZ], ckt, THERMNOISE, here->BSIM4v5bNode, here->BSIM4v5dbNode, here->BSIM4v5grbdb * m); } if(bodymode == 3) { NevalSrc(&noizDens[BSIM4v5RBPSNOIZ], &lnNdens[BSIM4v5RBPSNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5sbNode, here->BSIM4v5grbps * m); NevalSrc(&noizDens[BSIM4v5RBPDNOIZ], &lnNdens[BSIM4v5RBPDNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5dbNode, here->BSIM4v5grbpd * m); NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], &lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5bNode, here->BSIM4v5grbpb * m); noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; lnNdens[BSIM4v5RBSBNOIZ] = log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBDBNOIZ] = log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); } if(bodymode == 1) { NevalSrc(&noizDens[BSIM4v5RBPBNOIZ], &lnNdens[BSIM4v5RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v5bNodePrime, here->BSIM4v5bNode, here->BSIM4v5grbpb * m); noizDens[BSIM4v5RBPSNOIZ] = noizDens[BSIM4v5RBPDNOIZ] = 0.0; noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; lnNdens[BSIM4v5RBPSNOIZ] = log(MAX(noizDens[BSIM4v5RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBPDNOIZ] = log(MAX(noizDens[BSIM4v5RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBSBNOIZ] = log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBDBNOIZ] = log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); } } else { noizDens[BSIM4v5RBPSNOIZ] = noizDens[BSIM4v5RBPDNOIZ] = 0.0; noizDens[BSIM4v5RBPBNOIZ] = 0.0; noizDens[BSIM4v5RBSBNOIZ] = noizDens[BSIM4v5RBDBNOIZ] = 0.0; lnNdens[BSIM4v5RBPSNOIZ] = log(MAX(noizDens[BSIM4v5RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBPDNOIZ] = log(MAX(noizDens[BSIM4v5RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBPBNOIZ] = log(MAX(noizDens[BSIM4v5RBPBNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBSBNOIZ] = log(MAX(noizDens[BSIM4v5RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v5RBDBNOIZ] = log(MAX(noizDens[BSIM4v5RBDBNOIZ], N_MINLOG)); } switch(model->BSIM4v5tnoiMod) { case 0: T0 = here->BSIM4v5ueff * fabs(here->BSIM4v5qinv); T1 = T0 * tmp + pParam->BSIM4v5leff * pParam->BSIM4v5leff; NevalSrc(&noizDens[BSIM4v5IDNOIZ], &lnNdens[BSIM4v5IDNOIZ], ckt, THERMNOISE, here->BSIM4v5dNodePrime, here->BSIM4v5sNodePrime, m * (T0 / T1) * model->BSIM4v5ntnoi); break; case 1: T0 = here->BSIM4v5gm + here->BSIM4v5gmbs + here->BSIM4v5gds; T0 *= T0; igsquare = npart_theta * npart_theta * T0 / here->BSIM4v5IdovVds; T1 = npart_beta * (here->BSIM4v5gm + here->BSIM4v5gmbs) + here->BSIM4v5gds; T2 = T1 * T1 / here->BSIM4v5IdovVds; NevalSrc(&noizDens[BSIM4v5IDNOIZ], &lnNdens[BSIM4v5IDNOIZ], ckt, THERMNOISE, here->BSIM4v5dNodePrime, here->BSIM4v5sNodePrime, m * (T2 - igsquare)); break; } NevalSrc(&noizDens[BSIM4v5FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v5dNodePrime, here->BSIM4v5sNodePrime, (double) 0.0); switch(model->BSIM4v5fnoiMod) { case 0: noizDens[BSIM4v5FLNOIZ] *= m * model->BSIM4v5kf * exp(model->BSIM4v5af * log(MAX(fabs(here->BSIM4v5cd), N_MINLOG))) / (pow(data->freq, model->BSIM4v5ef) * pParam->BSIM4v5leff * pParam->BSIM4v5leff * model->BSIM4v5coxe); break; case 1: Vds = *(ckt->CKTstates[0] + here->BSIM4v5vds); if (Vds < 0.0) Vds = -Vds; Ssi = BSIM4v5Eval1ovFNoise(Vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM4v5oxideTrapDensityA * CONSTboltz * ckt->CKTtemp; T11 = pParam->BSIM4v5weff * here->BSIM4v5nf * pParam->BSIM4v5leff * pow(data->freq, model->BSIM4v5ef) * 1.0e10 * here->BSIM4v5nstar * here->BSIM4v5nstar; Swi = T10 / T11 * here->BSIM4v5cd * here->BSIM4v5cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM4v5FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM4v5FLNOIZ] *= 0.0; break; } lnNdens[BSIM4v5FLNOIZ] = log(MAX(noizDens[BSIM4v5FLNOIZ], N_MINLOG)); if(here->BSIM4v5mode >= 0) { /* bugfix */ NevalSrc(&noizDens[BSIM4v5IGSNOIZ], &lnNdens[BSIM4v5IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5sNodePrime, m * (here->BSIM4v5Igs + here->BSIM4v5Igcs)); NevalSrc(&noizDens[BSIM4v5IGDNOIZ], &lnNdens[BSIM4v5IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5dNodePrime, m * (here->BSIM4v5Igd + here->BSIM4v5Igcd)); } else { NevalSrc(&noizDens[BSIM4v5IGSNOIZ], &lnNdens[BSIM4v5IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5sNodePrime, m * (here->BSIM4v5Igs + here->BSIM4v5Igcd)); NevalSrc(&noizDens[BSIM4v5IGDNOIZ], &lnNdens[BSIM4v5IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5dNodePrime, m * (here->BSIM4v5Igd + here->BSIM4v5Igcs)); } NevalSrc(&noizDens[BSIM4v5IGBNOIZ], &lnNdens[BSIM4v5IGBNOIZ], ckt, SHOTNOISE, here->BSIM4v5gNodePrime, here->BSIM4v5bNodePrime, m * here->BSIM4v5Igb); noizDens[BSIM4v5TOTNOIZ] = noizDens[BSIM4v5RDNOIZ] + noizDens[BSIM4v5RSNOIZ] + noizDens[BSIM4v5RGNOIZ] + noizDens[BSIM4v5RBPSNOIZ] + noizDens[BSIM4v5RBPDNOIZ] + noizDens[BSIM4v5RBPBNOIZ] + noizDens[BSIM4v5RBSBNOIZ] + noizDens[BSIM4v5RBDBNOIZ] + noizDens[BSIM4v5IDNOIZ] + noizDens[BSIM4v5FLNOIZ] + noizDens[BSIM4v5IGSNOIZ] + noizDens[BSIM4v5IGDNOIZ] + noizDens[BSIM4v5IGBNOIZ]; lnNdens[BSIM4v5TOTNOIZ] = log(MAX(noizDens[BSIM4v5TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM4v5TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM4v5NSRCS; i++) { here->BSIM4v5nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM4v5NSRCS; i++) { here->BSIM4v5nVar[OUTNOIZ][i] = 0.0; here->BSIM4v5nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM4v5NSRCS; i++) { if (i != BSIM4v5TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM4v5nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM4v5nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM4v5nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM4v5nVar[OUTNOIZ][i] += tempOnoise; here->BSIM4v5nVar[OUTNOIZ][BSIM4v5TOTNOIZ] += tempOnoise; here->BSIM4v5nVar[INNOIZ][i] += tempInoise; here->BSIM4v5nVar[INNOIZ][BSIM4v5TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM4v5NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM4v5NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM4v5nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM4v5nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5getic.c0000644000265600020320000000250412264261473021466 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4getic.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5getic( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; for (; model ; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) { if (!here->BSIM4v5icVDSGiven) { here->BSIM4v5icVDS = *(ckt->CKTrhs + here->BSIM4v5dNode) - *(ckt->CKTrhs + here->BSIM4v5sNode); } if (!here->BSIM4v5icVGSGiven) { here->BSIM4v5icVGS = *(ckt->CKTrhs + here->BSIM4v5gNodeExt) - *(ckt->CKTrhs + here->BSIM4v5sNode); } if(!here->BSIM4v5icVBSGiven) { here->BSIM4v5icVBS = *(ckt->CKTrhs + here->BSIM4v5bNode) - *(ckt->CKTrhs + here->BSIM4v5sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5soachk.c0000644000265600020320000000730412264261473021646 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BSIM4v5soaCheck(CKTcircuit *ckt, GENmodel *inModel) { BSIM4v5model *model = (BSIM4v5model *) inModel; BSIM4v5instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->BSIM4v5gNodePrime] - ckt->CKTrhsOld [here->BSIM4v5sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->BSIM4v5gNodePrime] - ckt->CKTrhsOld [here->BSIM4v5dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->BSIM4v5gNodePrime] - ckt->CKTrhsOld [here->BSIM4v5bNodePrime]); vds = fabs(ckt->CKTrhsOld [here->BSIM4v5dNodePrime] - ckt->CKTrhsOld [here->BSIM4v5sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->BSIM4v5bNodePrime] - ckt->CKTrhsOld [here->BSIM4v5sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->BSIM4v5bNodePrime] - ckt->CKTrhsOld [here->BSIM4v5dNodePrime]); if (vgs > model->BSIM4v5vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->BSIM4v5vgsMax); warns_vgs++; } if (vgd > model->BSIM4v5vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->BSIM4v5vgdMax); warns_vgd++; } if (vgb > model->BSIM4v5vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->BSIM4v5vgbMax); warns_vgb++; } if (vds > model->BSIM4v5vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->BSIM4v5vdsMax); warns_vds++; } if (vbs > model->BSIM4v5vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->BSIM4v5vbsMax); warns_vbs++; } if (vbd > model->BSIM4v5vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->BSIM4v5vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/bsim4v5/b4v5check.c0000644000265600020320000010271712264261473021457 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4check.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM4v5checkModel( BSIM4v5model *model, BSIM4v5instance *here, CKTcircuit *ckt) { struct bsim4v5SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; if ((fplog = fopen("bsim4v5.out", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM4v5: Berkeley Short Channel IGFET Model-4\n"); fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); fprintf(fplog, "\n"); fprintf(fplog, "++++++++++ BSIM4v5 PARAMETER CHECKING BELOW ++++++++++\n"); if ((strcmp(model->BSIM4v5version, "4.5.0")) && (strcmp(model->BSIM4v5version, "4.50")) && (strcmp(model->BSIM4v5version, "4.5"))) { fprintf(fplog, "Warning: This model is BSIM4.5.0; you specified a wrong version number '%s'.\n", model->BSIM4v5version); printf("Warning: This model is BSIM4.5.0; you specified a wrong version number '%s'.\n", model->BSIM4v5version); } fprintf(fplog, "Model = %s\n", model->BSIM4v5modName); if ((here->BSIM4v5rgateMod == 2) || (here->BSIM4v5rgateMod == 3)) { if ((here->BSIM4v5trnqsMod == 1) || (here->BSIM4v5acnqsMod == 1)) { fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); } } if (model->BSIM4v5toxe <= 0.0) { fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", model->BSIM4v5toxe); printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v5toxe); Fatal_Flag = 1; } if (model->BSIM4v5toxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", model->BSIM4v5toxp); printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v5toxp); Fatal_Flag = 1; } if (model->BSIM4v5toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM4v5toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v5toxm); Fatal_Flag = 1; } if (model->BSIM4v5toxref <= 0.0) { fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", model->BSIM4v5toxref); printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v5toxref); Fatal_Flag = 1; } if (pParam->BSIM4v5lpe0 < -pParam->BSIM4v5leff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v5lpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v5lpe0); Fatal_Flag = 1; } if (model->BSIM4v5lintnoi > pParam->BSIM4v5leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v5lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v5lintnoi); Fatal_Flag = 1; } if (pParam->BSIM4v5lpeb < -pParam->BSIM4v5leff) { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v5lpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v5lpeb); Fatal_Flag = 1; } if (pParam->BSIM4v5ndep <= 0.0) { fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v5ndep); printf("Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v5ndep); Fatal_Flag = 1; } if (pParam->BSIM4v5phi <= 0.0) { fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v5phi); fprintf(fplog, " Phin = %g Ndep = %g \n", pParam->BSIM4v5phin, pParam->BSIM4v5ndep); printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v5phi); printf(" Phin = %g Ndep = %g \n", pParam->BSIM4v5phin, pParam->BSIM4v5ndep); Fatal_Flag = 1; } if (pParam->BSIM4v5nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v5nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v5nsub); Fatal_Flag = 1; } if (pParam->BSIM4v5ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM4v5ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM4v5ngate); Fatal_Flag = 1; } if (pParam->BSIM4v5ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM4v5ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM4v5ngate); Fatal_Flag = 1; } if (pParam->BSIM4v5xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM4v5xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v5xj); Fatal_Flag = 1; } if (pParam->BSIM4v5dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v5dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v5dvt1); Fatal_Flag = 1; } if (pParam->BSIM4v5dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v5dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v5dvt1w); Fatal_Flag = 1; } if (pParam->BSIM4v5w0 == -pParam->BSIM4v5weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM4v5dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v5dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v5dsub); Fatal_Flag = 1; } if (pParam->BSIM4v5b1 == -pParam->BSIM4v5weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (here->BSIM4v5u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v5u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v5u0temp); Fatal_Flag = 1; } if (pParam->BSIM4v5delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v5delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v5delta); Fatal_Flag = 1; } if (here->BSIM4v5vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v5vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v5vsattemp); Fatal_Flag = 1; } if (pParam->BSIM4v5pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v5pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v5pclm); Fatal_Flag = 1; } if (pParam->BSIM4v5drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v5drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v5drout); Fatal_Flag = 1; } if (here->BSIM4v5m <= 0.0) { fprintf(fplog, "Fatal: multiplier = %g is not positive.\n", here->BSIM4v5m); printf("Fatal: multiplier = %g is not positive.\n", here->BSIM4v5m); Fatal_Flag = 1; } if (here->BSIM4v5nf < 1.0) { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v5nf); printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v5nf); Fatal_Flag = 1; } if((here->BSIM4v5sa > 0.0) && (here->BSIM4v5sb > 0.0) && ((here->BSIM4v5nf == 1.0) || ((here->BSIM4v5nf > 1.0) && (here->BSIM4v5sd > 0.0))) ) { if (model->BSIM4v5saref <= 0.0) { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v5saref); printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v5saref); Fatal_Flag = 1; } if (model->BSIM4v5sbref <= 0.0) { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v5sbref); printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v5sbref); Fatal_Flag = 1; } } if ((here->BSIM4v5l + model->BSIM4v5xl) <= model->BSIM4v5xgl) { fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); Fatal_Flag = 1; } if (here->BSIM4v5ngcon < 1.0) { fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); Fatal_Flag = 1; } if ((here->BSIM4v5ngcon != 1.0) && (here->BSIM4v5ngcon != 2.0)) { here->BSIM4v5ngcon = 1.0; fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); } if (model->BSIM4v5gbmin < 1.0e-20) { fprintf(fplog, "Warning: Gbmin = %g is too small.\n", model->BSIM4v5gbmin); printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v5gbmin); } /* Check saturation parameters */ if (pParam->BSIM4v5fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->BSIM4v5fprout); printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v5fprout); Fatal_Flag = 1; } if (pParam->BSIM4v5pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->BSIM4v5pdits); printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v5pdits); Fatal_Flag = 1; } if (model->BSIM4v5pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->BSIM4v5pditsl); printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v5pditsl); Fatal_Flag = 1; } /* Check gate current parameters */ if (model->BSIM4v5igbMod) { if (pParam->BSIM4v5nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v5nigbinv); printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v5nigbinv); Fatal_Flag = 1; } if (pParam->BSIM4v5nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v5nigbacc); printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v5nigbacc); Fatal_Flag = 1; } } if (model->BSIM4v5igcMod) { if (pParam->BSIM4v5nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v5nigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v5nigc); Fatal_Flag = 1; } if (pParam->BSIM4v5poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v5poxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v5poxedge); Fatal_Flag = 1; } if (pParam->BSIM4v5pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v5pigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v5pigcd); Fatal_Flag = 1; } } /* Check capacitance parameters */ if (pParam->BSIM4v5clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v5clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v5clc); Fatal_Flag = 1; } /* Check overlap capacitance parameters */ if (pParam->BSIM4v5ckappas < 0.02) { fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", pParam->BSIM4v5ckappas); printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v5ckappas); pParam->BSIM4v5ckappas = 0.02; } if (pParam->BSIM4v5ckappad < 0.02) { fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", pParam->BSIM4v5ckappad); printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v5ckappad); pParam->BSIM4v5ckappad = 0.02; } if (model->BSIM4v5vtss < 0.0) { fprintf(fplog, "Fatal: Vtss = %g is negative.\n", model->BSIM4v5vtss); printf("Fatal: Vtss = %g is negative.\n", model->BSIM4v5vtss); Fatal_Flag = 1; } if (model->BSIM4v5vtsd < 0.0) { fprintf(fplog, "Fatal: Vtsd = %g is negative.\n", model->BSIM4v5vtsd); printf("Fatal: Vtsd = %g is negative.\n", model->BSIM4v5vtsd); Fatal_Flag = 1; } if (model->BSIM4v5vtssws < 0.0) { fprintf(fplog, "Fatal: Vtssws = %g is negative.\n", model->BSIM4v5vtssws); printf("Fatal: Vtssws = %g is negative.\n", model->BSIM4v5vtssws); Fatal_Flag = 1; } if (model->BSIM4v5vtsswd < 0.0) { fprintf(fplog, "Fatal: Vtsswd = %g is negative.\n", model->BSIM4v5vtsswd); printf("Fatal: Vtsswd = %g is negative.\n", model->BSIM4v5vtsswd); Fatal_Flag = 1; } if (model->BSIM4v5vtsswgs < 0.0) { fprintf(fplog, "Fatal: Vtsswgs = %g is negative.\n", model->BSIM4v5vtsswgs); printf("Fatal: Vtsswgs = %g is negative.\n", model->BSIM4v5vtsswgs); Fatal_Flag = 1; } if (model->BSIM4v5vtsswgd < 0.0) { fprintf(fplog, "Fatal: Vtsswgd = %g is negative.\n", model->BSIM4v5vtsswgd); printf("Fatal: Vtsswgd = %g is negative.\n", model->BSIM4v5vtsswgd); Fatal_Flag = 1; } if (model->BSIM4v5paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM4v5leff <= 1.0e-9) { fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v5leff); printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v5leff); } if (pParam->BSIM4v5leffCV <= 1.0e-9) { fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v5leffCV); printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v5leffCV); } if (pParam->BSIM4v5weff <= 1.0e-9) { fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v5weff); printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v5weff); } if (pParam->BSIM4v5weffCV <= 1.0e-9) { fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v5weffCV); printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v5weffCV); } /* Check threshold voltage parameters */ if (model->BSIM4v5toxe < 1.0e-10) { fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v5toxe); printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v5toxe); } if (model->BSIM4v5toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v5toxp); printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v5toxp); } if (model->BSIM4v5toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v5toxm); printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v5toxm); } if (pParam->BSIM4v5ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", pParam->BSIM4v5ndep); printf("Warning: Ndep = %g may be too small.\n", pParam->BSIM4v5ndep); } else if (pParam->BSIM4v5ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", pParam->BSIM4v5ndep); printf("Warning: Ndep = %g may be too large.\n", pParam->BSIM4v5ndep); } if (pParam->BSIM4v5nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM4v5nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM4v5nsub); } else if (pParam->BSIM4v5nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM4v5nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM4v5nsub); } if ((pParam->BSIM4v5ngate > 0.0) && (pParam->BSIM4v5ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v5ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v5ngate); } if (pParam->BSIM4v5dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v5dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v5dvt0); } if (fabs(1.0e-8 / (pParam->BSIM4v5w0 + pParam->BSIM4v5weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM4v5nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM4v5nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v5nfactor); } if (pParam->BSIM4v5cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM4v5cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v5cdsc); } if (pParam->BSIM4v5cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM4v5cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v5cdscd); } /* Check DIBL parameters */ if (here->BSIM4v5eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", here->BSIM4v5eta0); printf("Warning: Eta0 = %g is negative.\n", here->BSIM4v5eta0); } /* Check Abulk parameters */ if (fabs(1.0e-8 / (pParam->BSIM4v5b1 + pParam->BSIM4v5weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM4v5a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v5a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v5a2); pParam->BSIM4v5a2 = 0.01; } else if (pParam->BSIM4v5a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v5a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v5a2); pParam->BSIM4v5a2 = 1.0; pParam->BSIM4v5a1 = 0.0; } if (pParam->BSIM4v5prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v5prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v5prwg); pParam->BSIM4v5prwg = 0.0; } if (pParam->BSIM4v5rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v5rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v5rdsw); pParam->BSIM4v5rdsw = 0.0; pParam->BSIM4v5rds0 = 0.0; } if (pParam->BSIM4v5rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v5rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v5rds0); pParam->BSIM4v5rds0 = 0.0; } if (pParam->BSIM4v5rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v5rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v5rdswmin); pParam->BSIM4v5rdswmin = 0.0; } if (pParam->BSIM4v5pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v5pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v5pscbe2); } if (pParam->BSIM4v5vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v5vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v5vsattemp); } if((model->BSIM4v5lambdaGiven) && (pParam->BSIM4v5lambda > 0.0) ) { if (pParam->BSIM4v5lambda > 1.0e-9) { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v5lambda); printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v5lambda); } } if((model->BSIM4v5vtlGiven) && (pParam->BSIM4v5vtl > 0.0) ) { if (pParam->BSIM4v5vtl < 6.0e4) { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v5vtl); printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v5vtl); } if (pParam->BSIM4v5xn < 3.0) { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v5xn); printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v5xn); pParam->BSIM4v5xn = 3.0; } if (model->BSIM4v5lc < 0.0) { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v5lc); printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v5lc); pParam->BSIM4v5lc = 0.0; } } if (pParam->BSIM4v5pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v5pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v5pdibl1); } if (pParam->BSIM4v5pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v5pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v5pdibl2); } /* Check stress effect parameters */ if((here->BSIM4v5sa > 0.0) && (here->BSIM4v5sb > 0.0) && ((here->BSIM4v5nf == 1.0) || ((here->BSIM4v5nf > 1.0) && (here->BSIM4v5sd > 0.0))) ) { if (model->BSIM4v5lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v5lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v5lodk2); } if (model->BSIM4v5lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v5lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v5lodeta0); } } /* Check gate resistance parameters */ if (here->BSIM4v5rgateMod == 1) { if (model->BSIM4v5rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->BSIM4v5rgateMod == 2) { if (model->BSIM4v5rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); else if (pParam->BSIM4v5xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } if (here->BSIM4v5rgateMod == 3) { if (model->BSIM4v5rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (pParam->BSIM4v5xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } /* Check capacitance parameters */ if (pParam->BSIM4v5noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4v5noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v5noff); } if (pParam->BSIM4v5voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4v5voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v5voffcv); } if (pParam->BSIM4v5moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4v5moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v5moin); } if (pParam->BSIM4v5moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4v5moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v5moin); } if(model->BSIM4v5capMod ==2) { if (pParam->BSIM4v5acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4v5acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v5acde); } if (pParam->BSIM4v5acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4v5acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v5acde); } } /* Check overlap capacitance parameters */ if (model->BSIM4v5cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v5cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v5cgdo); model->BSIM4v5cgdo = 0.0; } if (model->BSIM4v5cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v5cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v5cgso); model->BSIM4v5cgso = 0.0; } if (model->BSIM4v5cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v5cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4v5cgbo); model->BSIM4v5cgbo = 0.0; } if (model->BSIM4v5tnoiMod == 1) { if (model->BSIM4v5tnoia < 0.0) { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v5tnoia); printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v5tnoia); model->BSIM4v5tnoia = 0.0; } if (model->BSIM4v5tnoib < 0.0) { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v5tnoib); printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v5tnoib); model->BSIM4v5tnoib = 0.0; } if (model->BSIM4v5rnoia < 0.0) { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v5rnoia); printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v5rnoia); model->BSIM4v5rnoia = 0.0; } if (model->BSIM4v5rnoib < 0.0) { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v5rnoib); printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v5rnoib); model->BSIM4v5rnoib = 0.0; } } if (model->BSIM4v5SjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njs = %g is negative.\n", model->BSIM4v5SjctEmissionCoeff); printf("Warning: Njs = %g is negative.\n", model->BSIM4v5SjctEmissionCoeff); } if (model->BSIM4v5DjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njd = %g is negative.\n", model->BSIM4v5DjctEmissionCoeff); printf("Warning: Njd = %g is negative.\n", model->BSIM4v5DjctEmissionCoeff); } if (model->BSIM4v5njtstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v5njtstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v5njtstemp, ckt->CKTtemp); } if (model->BSIM4v5njtsswtemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v5njtsswtemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v5njtsswtemp, ckt->CKTtemp); } if (model->BSIM4v5njtsswgtemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v5njtsswgtemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v5njtsswgtemp, ckt->CKTtemp); } if (model->BSIM4v5ntnoi < 0.0) { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v5ntnoi); printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v5ntnoi); model->BSIM4v5ntnoi = 0.0; } /* diode model */ if (model->BSIM4v5SbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctBotGradingCoeff); printf("Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctBotGradingCoeff); model->BSIM4v5SbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4v5SbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctSideGradingCoeff); printf("Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctSideGradingCoeff); model->BSIM4v5SbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4v5SbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctGateSideGradingCoeff); printf("Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4v5SbulkJctGateSideGradingCoeff); model->BSIM4v5SbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4v5DbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctBotGradingCoeff); printf("Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctBotGradingCoeff); model->BSIM4v5DbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4v5DbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctSideGradingCoeff); printf("Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctSideGradingCoeff); model->BSIM4v5DbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4v5DbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctGateSideGradingCoeff); printf("Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4v5DbulkJctGateSideGradingCoeff); model->BSIM4v5DbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4v5wpemod == 1) { if (model->BSIM4v5scref <= 0.0) { fprintf(fplog, "Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v5scref); printf("Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4v5scref); model->BSIM4v5scref = 1e-6; } if (here->BSIM4v5sca < 0.0) { fprintf(fplog, "Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v5sca); printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4v5sca); here->BSIM4v5sca = 0.0; } if (here->BSIM4v5scb < 0.0) { fprintf(fplog, "Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v5scb); printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4v5scb); here->BSIM4v5scb = 0.0; } if (here->BSIM4v5scc < 0.0) { fprintf(fplog, "Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v5scc); printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4v5scc); here->BSIM4v5scc = 0.0; } if (here->BSIM4v5sc < 0.0) { fprintf(fplog, "Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v5sc); printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4v5sc); here->BSIM4v5sc = 0.0; } } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5acld.c0000644000265600020320000007060412264261473021304 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4acld.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5acLoad( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcbgb, xcbdb, xcbsb, xcbbb; double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb; double xcgmbb=0.0, xcbgmb; double capbd, capbs, omega; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double T0=0.0, T1, T2, T3; double Csg, Csd, Css; double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; double FwdSumr, RevSumr, Gmr, Gmbsr; double FwdSumi, RevSumi, Gmi, Gmbsi; struct bsim4v5SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here!= NULL; here = here->BSIM4v5nextInstance) { pParam = here->pParam; capbd = here->BSIM4v5capbd; capbs = here->BSIM4v5capbs; cgso = here->BSIM4v5cgso; cgdo = here->BSIM4v5cgdo; cgbo = pParam->BSIM4v5cgbo; Csd = -(here->BSIM4v5cddb + here->BSIM4v5cgdb + here->BSIM4v5cbdb); Csg = -(here->BSIM4v5cdgb + here->BSIM4v5cggb + here->BSIM4v5cbgb); Css = -(here->BSIM4v5cdsb + here->BSIM4v5cgsb + here->BSIM4v5cbsb); if (here->BSIM4v5acnqsMod) { T0 = omega * here->BSIM4v5taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; gmr = here->BSIM4v5gm * T2; gmbsr = here->BSIM4v5gmbs * T2; gdsr = here->BSIM4v5gds * T2; gmi = -here->BSIM4v5gm * T3; gmbsi = -here->BSIM4v5gmbs * T3; gdsi = -here->BSIM4v5gds * T3; Cddr = here->BSIM4v5cddb * T2; Cdgr = here->BSIM4v5cdgb * T2; Cdsr = here->BSIM4v5cdsb * T2; Cdbr = -(Cddr + Cdgr + Cdsr); /* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ Cddi = here->BSIM4v5cddb * T3 * omega; Cdgi = here->BSIM4v5cdgb * T3 * omega; Cdsi = here->BSIM4v5cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; Csgr = Csg * T2; Cssr = Css * T2; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csd * T3 * omega; Csgi = Csg * T3 * omega; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); Cgdr = -(Cddr + Csdr + here->BSIM4v5cbdb); Cggr = -(Cdgr + Csgr + here->BSIM4v5cbgb); Cgsr = -(Cdsr + Cssr + here->BSIM4v5cbsb); Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = -(Cddi + Csdi); Cggi = -(Cdgi + Csgi); Cgsi = -(Cdsi + Cssi); Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ { gmr = here->BSIM4v5gm; gmbsr = here->BSIM4v5gmbs; gdsr = here->BSIM4v5gds; gmi = gmbsi = gdsi = 0.0; Cddr = here->BSIM4v5cddb; Cdgr = here->BSIM4v5cdgb; Cdsr = here->BSIM4v5cdsb; Cdbr = -(Cddr + Cdgr + Cdsr); Cddi = Cdgi = Cdsi = Cdbi = 0.0; Csdr = Csd; Csgr = Csg; Cssr = Css; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csgi = Cssi = Csbi = 0.0; Cgdr = here->BSIM4v5cgdb; Cggr = here->BSIM4v5cggb; Cgsr = here->BSIM4v5cgsb; Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = Cggi = Cgsi = Cgbi = 0.0; } if (here->BSIM4v5mode >= 0) { Gmr = gmr; Gmbsr = gmbsr; FwdSumr = Gmr + Gmbsr; RevSumr = 0.0; Gmi = gmi; Gmbsi = gmbsi; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; gbbdp = -(here->BSIM4v5gbds); gbbsp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = here->BSIM4v5gbgs; gbdpdp = here->BSIM4v5gbds; gbdpb = here->BSIM4v5gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg; gIstotd = here->BSIM4v5gIgcsd; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcss; gIstotb = here->BSIM4v5gIgcsb; gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcdg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcdd; gIdtots = here->BSIM4v5gIgcds; gIdtotb = here->BSIM4v5gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbd; gIbtots = here->BSIM4v5gIgbs; gIbtotb = here->BSIM4v5gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); else if (here->BSIM4v5rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgd * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgs * T0; gcrgb = here->BSIM4v5gcrgb * T0; gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v5rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v5cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgdr * omega; xcgsbr = Cgsr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Cdgr * omega; xcsgbr = Csgr * omega; xcbgb = here->BSIM4v5cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v5cgbo ) * omega; xcgdbr = (Cgdr - cgdo) * omega; xcgsbr = (Cgsr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Cdgr - cgdo) * omega; xcsgbr = (Csgr - cgso) * omega; xcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (Cddr + here->BSIM4v5capbd + cgdo) * omega; xcdsbr = Cdsr * omega; xcsdbr = Csdr * omega; xcssbr = (here->BSIM4v5capbs + cgso + Cssr) * omega; if (!here->BSIM4v5rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v5cbdb - here->BSIM4v5capbd) * omega; xcbsb = (here->BSIM4v5cbsb - here->BSIM4v5capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = Cdbr * omega; xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) + here->BSIM4v5capbs * omega; xcbdb = here->BSIM4v5cbdb * omega; xcbsb = here->BSIM4v5cbsb * omega; xcdbdb = -here->BSIM4v5capbd * omega; xcsbsb = -here->BSIM4v5capbs * omega; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xcdgbi = Cdgi; xcsgbi = Csgi; xcddbi = Cddi; xcdsbi = Cdsi; xcsdbi = Csdi; xcssbi = Cssi; xcdbbi = Cdbi; xcsbbi = Csbi; xcggbi = Cggi; xcgdbi = Cgdi; xcgsbi = Cgsi; xcgbbi = Cgbi; } else /* Reverse mode */ { Gmr = -gmr; Gmbsr = -gmbsr; FwdSumr = 0.0; RevSumr = -(Gmr + Gmbsr); Gmi = -gmi; Gmbsi = -gmbsi; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); gbbsp = -(here->BSIM4v5gbds); gbbdp = here->BSIM4v5gbds + here->BSIM4v5gbgs + here->BSIM4v5gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v5gbgs; gbspsp = here->BSIM4v5gbds; gbspb = here->BSIM4v5gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v5igcMod) { gIstotg = here->BSIM4v5gIgsg + here->BSIM4v5gIgcdg; gIstotd = here->BSIM4v5gIgcds; gIstots = here->BSIM4v5gIgss + here->BSIM4v5gIgcdd; gIstotb = here->BSIM4v5gIgcdb; gIdtotg = here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg; gIdtotd = here->BSIM4v5gIgdd + here->BSIM4v5gIgcss; gIdtots = here->BSIM4v5gIgcsd; gIdtotb = here->BSIM4v5gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v5igbMod) { gIbtotg = here->BSIM4v5gIgbg; gIbtotd = here->BSIM4v5gIgbs; gIbtots = here->BSIM4v5gIgbd; gIbtotb = here->BSIM4v5gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v5igcMod != 0) || (model->BSIM4v5igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v5rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vges) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); else if (here->BSIM4v5rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v5vgms) - *(ckt->CKTstates[0] + here->BSIM4v5vgs); if (here->BSIM4v5rgateMod > 1) { gcrgd = here->BSIM4v5gcrgs * T0; gcrgg = here->BSIM4v5gcrgg * T0; gcrgs = here->BSIM4v5gcrgd * T0; gcrgb = here->BSIM4v5gcrgb * T0; gcrgg -= here->BSIM4v5gcrg; gcrg = here->BSIM4v5gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v5rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v5cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v5cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgsr * omega; xcgsbr = Cgdr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Csgr * omega; xcsgbr = Cdgr * omega; xcbgb = here->BSIM4v5cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v5cgbo ) * omega; xcgdbr = (Cgsr - cgdo) * omega; xcgsbr = (Cgdr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Csgr - cgdo) * omega; xcsgbr = (Cdgr - cgso) * omega; xcbgb = (here->BSIM4v5cbgb - pParam->BSIM4v5cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (here->BSIM4v5capbd + cgdo + Cssr) * omega; xcdsbr = Csdr * omega; xcsdbr = Cdsr * omega; xcssbr = (Cddr + here->BSIM4v5capbs + cgso) * omega; if (!here->BSIM4v5rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v5cbsb - here->BSIM4v5capbd) * omega; xcbsb = (here->BSIM4v5cbdb - here->BSIM4v5capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) + here->BSIM4v5capbd * omega; xcsbbr = Cdbr * omega; xcbdb = here->BSIM4v5cbsb * omega; xcbsb = here->BSIM4v5cbdb * omega; xcdbdb = -here->BSIM4v5capbd * omega; xcsbsb = -here->BSIM4v5capbs * omega; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xcdgbi = Csgi; xcsgbi = Cdgi; xcddbi = Cssi; xcdsbi = Csdi; xcsdbi = Cdsi; xcssbi = Cddi; xcdbbi = Csbi; xcsbbi = Cdbi; xcggbi = Cggi; xcgdbi = Cgsi; xcgsbi = Cgdi; xcgbbi = Cgbi; } if (model->BSIM4v5rdsMod == 1) { gstot = here->BSIM4v5gstot; gstotd = here->BSIM4v5gstotd; gstotg = here->BSIM4v5gstotg; gstots = here->BSIM4v5gstots - gstot; gstotb = here->BSIM4v5gstotb; gdtot = here->BSIM4v5gdtot; gdtotd = here->BSIM4v5gdtotd - gdtot; gdtotg = here->BSIM4v5gdtotg; gdtots = here->BSIM4v5gdtots; gdtotb = here->BSIM4v5gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } /* * Loading AC matrix */ m = here->BSIM4v5m; if (!model->BSIM4v5rdsMod) { gdpr = here->BSIM4v5drainConductance; gspr = here->BSIM4v5sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v5rbodyMod) { gjbd = here->BSIM4v5gbd; gjbs = here->BSIM4v5gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v5grgeltd; if (here->BSIM4v5rgateMod == 1) { *(here->BSIM4v5GEgePtr) += m * geltd; *(here->BSIM4v5GPgePtr) -= m * geltd; *(here->BSIM4v5GEgpPtr) -= m * geltd; *(here->BSIM4v5GPgpPtr +1) += m * xcggbr; *(here->BSIM4v5GPgpPtr) += m * (geltd + xcggbi + gIgtotg); *(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v5GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v5GPspPtr +1) += m * xcgsbr; *(here->BSIM4v5GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v5GPbpPtr) += m * (xcgbbi + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v5rgateMod == 2) { *(here->BSIM4v5GEgePtr) += m * gcrg; *(here->BSIM4v5GEgpPtr) += m * gcrgg; *(here->BSIM4v5GEdpPtr) += m * gcrgd; *(here->BSIM4v5GEspPtr) += m * gcrgs; *(here->BSIM4v5GEbpPtr) += m * gcrgb; *(here->BSIM4v5GPgePtr) -= m * gcrg; *(here->BSIM4v5GPgpPtr +1) += m * xcggbr; *(here->BSIM4v5GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v5GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v5GPspPtr +1) += m * xcgsbr; *(here->BSIM4v5GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v5GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); } else if (here->BSIM4v5rgateMod == 3) { *(here->BSIM4v5GEgePtr) += m * geltd; *(here->BSIM4v5GEgmPtr) -= m * geltd; *(here->BSIM4v5GMgePtr) -= m * geltd; *(here->BSIM4v5GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v5GMgmPtr +1) += m * xcgmgmb; *(here->BSIM4v5GMdpPtr) += m * gcrgd; *(here->BSIM4v5GMdpPtr +1) += m * xcgmdb; *(here->BSIM4v5GMgpPtr) += m * gcrgg; *(here->BSIM4v5GMspPtr) += m * gcrgs; *(here->BSIM4v5GMspPtr +1) += m * xcgmsb; *(here->BSIM4v5GMbpPtr) += m * gcrgb; *(here->BSIM4v5GMbpPtr +1) += m * xcgmbb; *(here->BSIM4v5DPgmPtr +1) += m * xcdgmb; *(here->BSIM4v5GPgmPtr) -= m * gcrg; *(here->BSIM4v5SPgmPtr +1) += m * xcsgmb; *(here->BSIM4v5BPgmPtr +1) += m * xcbgmb; *(here->BSIM4v5GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v5GPgpPtr +1) += m * xcggbr; *(here->BSIM4v5GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v5GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v5GPspPtr +1) += m * xcgsbr; *(here->BSIM4v5GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); *(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; } else { *(here->BSIM4v5GPgpPtr +1) += m * xcggbr; *(here->BSIM4v5GPgpPtr) += m * (xcggbi + gIgtotg); *(here->BSIM4v5GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v5GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v5GPspPtr +1) += m * xcgsbr; *(here->BSIM4v5GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v5GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v5GPbpPtr) += m * (xcgbbi + gIgtotb); } if (model->BSIM4v5rdsMod) { (*(here->BSIM4v5DgpPtr) += m * gdtotg); (*(here->BSIM4v5DspPtr) += m * gdtots); (*(here->BSIM4v5DbpPtr) += m * gdtotb); (*(here->BSIM4v5SdpPtr) += m * gstotd); (*(here->BSIM4v5SgpPtr) += m * gstotg); (*(here->BSIM4v5SbpPtr) += m * gstotb); } *(here->BSIM4v5DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); *(here->BSIM4v5DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v5gbd - gdtotd + RevSumr + gbdpdp - gIdtotd); *(here->BSIM4v5DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v5DPgpPtr +1) += m * (xcdgbr + Gmi); *(here->BSIM4v5DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); *(here->BSIM4v5DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); *(here->BSIM4v5DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); *(here->BSIM4v5DPbpPtr +1) += m * (xcdbbr + Gmbsi); *(here->BSIM4v5DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); *(here->BSIM4v5DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v5DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v5SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); *(here->BSIM4v5SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); *(here->BSIM4v5SPgpPtr +1) += m * (xcsgbr - Gmi); *(here->BSIM4v5SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); *(here->BSIM4v5SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); *(here->BSIM4v5SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v5gbs - gstots + FwdSumr + gbspsp - gIstots); *(here->BSIM4v5SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v5SPbpPtr +1) += m * (xcsbbr - Gmbsi); *(here->BSIM4v5SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); *(here->BSIM4v5SspPtr) -= m * (gspr - gstots); *(here->BSIM4v5SsPtr) += m * (gspr + gstot); *(here->BSIM4v5BPdpPtr +1) += m * xcbdb; *(here->BSIM4v5BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v5BPgpPtr +1) += m * xcbgb; *(here->BSIM4v5BPgpPtr) -= m * (here->BSIM4v5gbgs + gIbtotg); *(here->BSIM4v5BPspPtr +1) += m * xcbsb; *(here->BSIM4v5BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v5BPbpPtr +1) += m * xcbbb; *(here->BSIM4v5BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v5gbbs - gIbtotb); ggidld = here->BSIM4v5ggidld; ggidlg = here->BSIM4v5ggidlg; ggidlb = here->BSIM4v5ggidlb; ggislg = here->BSIM4v5ggislg; ggisls = here->BSIM4v5ggisls; ggislb = here->BSIM4v5ggislb; /* stamp gidl */ (*(here->BSIM4v5DPdpPtr) += m * ggidld); (*(here->BSIM4v5DPgpPtr) += m * ggidlg); (*(here->BSIM4v5DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v5DPbpPtr) += m * ggidlb); (*(here->BSIM4v5BPdpPtr) -= m * ggidld); (*(here->BSIM4v5BPgpPtr) -= m * ggidlg); (*(here->BSIM4v5BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v5BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v5SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v5SPgpPtr) += m * ggislg); (*(here->BSIM4v5SPspPtr) += m * ggisls); (*(here->BSIM4v5SPbpPtr) += m * ggislb); (*(here->BSIM4v5BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v5BPgpPtr) -= m * ggislg); (*(here->BSIM4v5BPspPtr) -= m * ggisls); (*(here->BSIM4v5BPbpPtr) -= m * ggislb); if (here->BSIM4v5rbodyMod) { (*(here->BSIM4v5DPdbPtr +1) += m * xcdbdb); (*(here->BSIM4v5DPdbPtr) -= m * here->BSIM4v5gbd); (*(here->BSIM4v5SPsbPtr +1) += m * xcsbsb); (*(here->BSIM4v5SPsbPtr) -= m * here->BSIM4v5gbs); (*(here->BSIM4v5DBdpPtr +1) += m * xcdbdb); (*(here->BSIM4v5DBdpPtr) -= m * here->BSIM4v5gbd); (*(here->BSIM4v5DBdbPtr +1) -= m * xcdbdb); (*(here->BSIM4v5DBdbPtr) += m * (here->BSIM4v5gbd + here->BSIM4v5grbpd + here->BSIM4v5grbdb)); (*(here->BSIM4v5DBbpPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5DBbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BPdbPtr) -= m * here->BSIM4v5grbpd); (*(here->BSIM4v5BPbPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BPsbPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5BPbpPtr) += m * (here->BSIM4v5grbpd + here->BSIM4v5grbps + here->BSIM4v5grbpb)); /* WDLiu: (-here->BSIM4v5gbbs) already added to BPbpPtr */ (*(here->BSIM4v5SBspPtr +1) += m * xcsbsb); (*(here->BSIM4v5SBspPtr) -= m * here->BSIM4v5gbs); (*(here->BSIM4v5SBbpPtr) -= m * here->BSIM4v5grbps); (*(here->BSIM4v5SBbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5SBsbPtr +1) -= m * xcsbsb); (*(here->BSIM4v5SBsbPtr) += m * (here->BSIM4v5gbs + here->BSIM4v5grbps + here->BSIM4v5grbsb)); (*(here->BSIM4v5BdbPtr) -= m * here->BSIM4v5grbdb); (*(here->BSIM4v5BbpPtr) -= m * here->BSIM4v5grbpb); (*(here->BSIM4v5BsbPtr) -= m * here->BSIM4v5grbsb); (*(here->BSIM4v5BbPtr) += m * (here->BSIM4v5grbsb + here->BSIM4v5grbdb + here->BSIM4v5grbpb)); } /* * WDLiu: The internal charge node generated for transient NQS is not needed for * AC NQS. The following is not doing a real job, but we have to keep it; * otherwise a singular AC NQS matrix may occur if the transient NQS is on. * The charge node is isolated from the instance. */ if (here->BSIM4v5trnqsMod) { (*(here->BSIM4v5QqPtr) += m * 1.0); (*(here->BSIM4v5QgpPtr) += 0.0); (*(here->BSIM4v5QdpPtr) += 0.0); (*(here->BSIM4v5QspPtr) += 0.0); (*(here->BSIM4v5QbpPtr) += 0.0); (*(here->BSIM4v5DPqPtr) += 0.0); (*(here->BSIM4v5SPqPtr) += 0.0); (*(here->BSIM4v5GPqPtr) += 0.0); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/Makefile.am0000644000265600020320000000115712264261473021565 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim4v5.la libbsim4v5_la_SOURCES = \ b4v5.c \ b4v5acld.c \ b4v5ask.c \ b4v5check.c \ b4v5cvtest.c \ b4v5del.c \ b4v5dest.c \ b4v5geo.c \ b4v5getic.c \ b4v5ld.c \ b4v5mask.c \ b4v5mdel.c \ b4v5mpar.c \ b4v5noi.c \ b4v5par.c \ b4v5pzld.c \ b4v5set.c \ b4v5soachk.c \ b4v5temp.c \ b4v5trunc.c \ bsim4v5def.h \ bsim4v5ext.h \ bsim4v5init.c \ bsim4v5init.h \ bsim4v5itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim4v5/Makefile.in0000644000265600020320000004371612264261536021605 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim4v5 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim4v5_la_LIBADD = am_libbsim4v5_la_OBJECTS = b4v5.lo b4v5acld.lo b4v5ask.lo b4v5check.lo \ b4v5cvtest.lo b4v5del.lo b4v5dest.lo b4v5geo.lo b4v5getic.lo \ b4v5ld.lo b4v5mask.lo b4v5mdel.lo b4v5mpar.lo b4v5noi.lo \ b4v5par.lo b4v5pzld.lo b4v5set.lo b4v5soachk.lo b4v5temp.lo \ b4v5trunc.lo bsim4v5init.lo libbsim4v5_la_OBJECTS = $(am_libbsim4v5_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim4v5_la_SOURCES) DIST_SOURCES = $(libbsim4v5_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim4v5.la libbsim4v5_la_SOURCES = \ b4v5.c \ b4v5acld.c \ b4v5ask.c \ b4v5check.c \ b4v5cvtest.c \ b4v5del.c \ b4v5dest.c \ b4v5geo.c \ b4v5getic.c \ b4v5ld.c \ b4v5mask.c \ b4v5mdel.c \ b4v5mpar.c \ b4v5noi.c \ b4v5par.c \ b4v5pzld.c \ b4v5set.c \ b4v5soachk.c \ b4v5temp.c \ b4v5trunc.c \ bsim4v5def.h \ bsim4v5ext.h \ bsim4v5init.c \ bsim4v5init.h \ bsim4v5itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v5/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v5/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim4v5.la: $(libbsim4v5_la_OBJECTS) $(libbsim4v5_la_DEPENDENCIES) $(EXTRA_libbsim4v5_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim4v5_la_OBJECTS) $(libbsim4v5_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5geo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v5trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim4v5init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim4v5/bsim4v5init.c0000644000265600020320000000470312264261473022052 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim4v5itf.h" #include "bsim4v5ext.h" #include "bsim4v5init.h" SPICEdev BSIM4v5info = { { "BSIM4v5", "Berkeley Short Channel IGFET Model-4", &BSIM4v5nSize, &BSIM4v5nSize, BSIM4v5names, &BSIM4v5pTSize, BSIM4v5pTable, &BSIM4v5mPTSize, BSIM4v5mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, BSIM4v5param, /* DEVparam */ BSIM4v5mParam, /* DEVmodParam */ BSIM4v5load, /* DEVload */ BSIM4v5setup, /* DEVsetup */ BSIM4v5unsetup, /* DEVunsetup */ BSIM4v5setup, /* DEVpzSetup */ BSIM4v5temp, /* DEVtemperature */ BSIM4v5trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ BSIM4v5acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ BSIM4v5destroy, /* DEVdestroy */ BSIM4v5mDelete, /* DEVmodDelete */ BSIM4v5delete, /* DEVdelete */ BSIM4v5getic, /* DEVsetic */ BSIM4v5ask, /* DEVask */ BSIM4v5mAsk, /* DEVmodAsk */ BSIM4v5pzLoad, /* DEVpzLoad */ BSIM4v5convTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ BSIM4v5noise, /* DEVnoise */ BSIM4v5soaCheck, /* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &BSIM4v5iSize, /* DEVinstSize */ &BSIM4v5mSize /* DEVmodSize */ }; SPICEdev * get_bsim4v5_info(void) { return &BSIM4v5info; } ngspice-26/src/spicelib/devices/bsim4v5/b4v5dest.c0000644000265600020320000000256712264261473021343 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4dest.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v5def.h" #include "ngspice/suffix.h" void BSIM4v5destroy( GENmodel **inModel) { BSIM4v5model **model = (BSIM4v5model**)inModel; BSIM4v5instance *here; BSIM4v5instance *prev = NULL; BSIM4v5model *mod = *model; BSIM4v5model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v5nextModel) { /** added to get rid of link list pSizeDependParamKnot **/ struct bsim4v5SizeDependParam *pParam, *pParamOld=NULL; pParam = mod->pSizeDependParamKnot; for (; pParam ; pParam = pParam->pNext) { FREE(pParamOld); pParamOld = pParam; } FREE(pParamOld); pParam = NULL; /** end of extra code **/ if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->BSIM4v5instances; here; here = here->BSIM4v5nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim4v5/b4v5cvtest.c0000644000265600020320000002177012264261473021711 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4cvtest.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5convTest( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v5model *model = (BSIM4v5model*)inModel; BSIM4v5instance *here; double delvbd, delvbs, delvds, delvgd, delvgs; double delvdbd, delvsbs; double delvbd_jct, delvbs_jct; double vds, vgs, vgd, vgdo, vbs, vbd; double vdbd, vdbs, vsbs; double cbhat, cdhat, Idtot, Ibtot; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double tol0, tol1, tol2, tol3, tol4, tol5, tol6; for (; model != NULL; model = model->BSIM4v5nextModel) { for (here = model->BSIM4v5instances; here != NULL ; here=here->BSIM4v5nextInstance) { vds = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vgs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vdbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dbNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vsbs = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5sbNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vses = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5sNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vdes = model->BSIM4v5type * (*(ckt->CKTrhsOld + here->BSIM4v5dNode) - *(ckt->CKTrhsOld + here->BSIM4v5sNodePrime)); vgdo = *(ckt->CKTstate0 + here->BSIM4v5vgs) - *(ckt->CKTstate0 + here->BSIM4v5vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v5vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v5vdbd); delvgd = vgd - vgdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v5vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v5vgs); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v5vbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v5vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v5vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v5vdes) - *(ckt->CKTstate0 + here->BSIM4v5vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v5vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v5rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v5rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v5mode >= 0) { Idtot = here->BSIM4v5cd + here->BSIM4v5csub - here->BSIM4v5cbd + here->BSIM4v5Igidl; cdhat = Idtot - here->BSIM4v5gbd * delvbd_jct + (here->BSIM4v5gmbs + here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * delvbs + (here->BSIM4v5gm + here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs + (here->BSIM4v5gds + here->BSIM4v5gbds + here->BSIM4v5ggidld) * delvds; Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcs; cgshat = Igstot + (here->BSIM4v5gIgsg + here->BSIM4v5gIgcsg) * delvgs + here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbs; Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcd; cgdhat = Igdtot + here->BSIM4v5gIgdg * delvgd + here->BSIM4v5gIgcdg * delvgs + here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbs; Igbtot = here->BSIM4v5Igb; cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgs + here->BSIM4v5gIgbd * delvds + here->BSIM4v5gIgbb * delvbs; } else { Idtot = here->BSIM4v5cd + here->BSIM4v5cbd - here->BSIM4v5Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v5gbd * delvbd_jct + here->BSIM4v5gmbs * delvbd + here->BSIM4v5gm * delvgd - (here->BSIM4v5gds + here->BSIM4v5ggidls) * delvds - here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; Igstot = here->BSIM4v5Igs + here->BSIM4v5Igcd; cgshat = Igstot + here->BSIM4v5gIgsg * delvgs + here->BSIM4v5gIgcdg * delvgd - here->BSIM4v5gIgcdd * delvds + here->BSIM4v5gIgcdb * delvbd; Igdtot = here->BSIM4v5Igd + here->BSIM4v5Igcs; cgdhat = Igdtot + (here->BSIM4v5gIgdg + here->BSIM4v5gIgcsg) * delvgd - here->BSIM4v5gIgcsd * delvds + here->BSIM4v5gIgcsb * delvbd; Igbtot = here->BSIM4v5Igb; cgbhat = here->BSIM4v5Igb + here->BSIM4v5gIgbg * delvgd - here->BSIM4v5gIgbd * delvds + here->BSIM4v5gIgbb * delvbd; } Isestot = here->BSIM4v5gstot * (*(ckt->CKTstate0 + here->BSIM4v5vses)); cseshat = Isestot + here->BSIM4v5gstot * delvses + here->BSIM4v5gstotd * delvds + here->BSIM4v5gstotg * delvgs + here->BSIM4v5gstotb * delvbs; Idedtot = here->BSIM4v5gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v5gdtot * delvded + here->BSIM4v5gdtotd * delvds + here->BSIM4v5gdtotg * delvgs + here->BSIM4v5gdtotb * delvbs; /* * Check convergence */ if ((here->BSIM4v5off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; return(OK); } if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; return(OK); } Ibtot = here->BSIM4v5cbs + here->BSIM4v5cbd - here->BSIM4v5Igidl - here->BSIM4v5Igisl - here->BSIM4v5csub; if (here->BSIM4v5mode >= 0) { cbhat = Ibtot + here->BSIM4v5gbd * delvbd_jct + here->BSIM4v5gbs * delvbs_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggidlb) * delvbs - (here->BSIM4v5gbgs + here->BSIM4v5ggidlg) * delvgs - (here->BSIM4v5gbds + here->BSIM4v5ggidld) * delvds - here->BSIM4v5ggislg * delvgd - here->BSIM4v5ggislb* delvbd + here->BSIM4v5ggisls * delvds ; } else { cbhat = Ibtot + here->BSIM4v5gbs * delvbs_jct + here->BSIM4v5gbd * delvbd_jct - (here->BSIM4v5gbbs + here->BSIM4v5ggislb) * delvbd - (here->BSIM4v5gbgs + here->BSIM4v5ggislg) * delvgd + (here->BSIM4v5gbds + here->BSIM4v5ggisld - here->BSIM4v5ggidls) * delvds - here->BSIM4v5ggidlg * delvgs - here->BSIM4v5ggidlb * delvbs; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/b4v5ask.c0000644000265600020320000003263312264261473021157 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/27/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4ask.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v5def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v5ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM4v5instance *here = (BSIM4v5instance*)inst; NG_IGNORE(select); switch(which) { case BSIM4v5_L: value->rValue = here->BSIM4v5l; return(OK); case BSIM4v5_W: value->rValue = here->BSIM4v5w; return(OK); case BSIM4v5_M: value->rValue = here->BSIM4v5m; return(OK); case BSIM4v5_NF: value->rValue = here->BSIM4v5nf; return(OK); case BSIM4v5_MIN: value->iValue = here->BSIM4v5min; return(OK); case BSIM4v5_AS: value->rValue = here->BSIM4v5sourceArea; return(OK); case BSIM4v5_AD: value->rValue = here->BSIM4v5drainArea; return(OK); case BSIM4v5_PS: value->rValue = here->BSIM4v5sourcePerimeter; return(OK); case BSIM4v5_PD: value->rValue = here->BSIM4v5drainPerimeter; return(OK); case BSIM4v5_NRS: value->rValue = here->BSIM4v5sourceSquares; return(OK); case BSIM4v5_NRD: value->rValue = here->BSIM4v5drainSquares; return(OK); case BSIM4v5_OFF: value->rValue = here->BSIM4v5off; return(OK); case BSIM4v5_SA: value->rValue = here->BSIM4v5sa ; return(OK); case BSIM4v5_SB: value->rValue = here->BSIM4v5sb ; return(OK); case BSIM4v5_SD: value->rValue = here->BSIM4v5sd ; return(OK); case BSIM4v5_SCA: value->rValue = here->BSIM4v5sca ; return(OK); case BSIM4v5_SCB: value->rValue = here->BSIM4v5scb ; return(OK); case BSIM4v5_SCC: value->rValue = here->BSIM4v5scc ; return(OK); case BSIM4v5_SC: value->rValue = here->BSIM4v5sc ; return(OK); case BSIM4v5_RBSB: value->rValue = here->BSIM4v5rbsb; return(OK); case BSIM4v5_RBDB: value->rValue = here->BSIM4v5rbdb; return(OK); case BSIM4v5_RBPB: value->rValue = here->BSIM4v5rbpb; return(OK); case BSIM4v5_RBPS: value->rValue = here->BSIM4v5rbps; return(OK); case BSIM4v5_RBPD: value->rValue = here->BSIM4v5rbpd; return(OK); case BSIM4v5_DELVTO: value->rValue = here->BSIM4v5delvto; return(OK); case BSIM4v5_XGW: value->rValue = here->BSIM4v5xgw; return(OK); case BSIM4v5_NGCON: value->rValue = here->BSIM4v5ngcon; return(OK); case BSIM4v5_TRNQSMOD: value->iValue = here->BSIM4v5trnqsMod; return(OK); case BSIM4v5_ACNQSMOD: value->iValue = here->BSIM4v5acnqsMod; return(OK); case BSIM4v5_RBODYMOD: value->iValue = here->BSIM4v5rbodyMod; return(OK); case BSIM4v5_RGATEMOD: value->iValue = here->BSIM4v5rgateMod; return(OK); case BSIM4v5_GEOMOD: value->iValue = here->BSIM4v5geoMod; return(OK); case BSIM4v5_RGEOMOD: value->iValue = here->BSIM4v5rgeoMod; return(OK); case BSIM4v5_IC_VDS: value->rValue = here->BSIM4v5icVDS; return(OK); case BSIM4v5_IC_VGS: value->rValue = here->BSIM4v5icVGS; return(OK); case BSIM4v5_IC_VBS: value->rValue = here->BSIM4v5icVBS; return(OK); case BSIM4v5_DNODE: value->iValue = here->BSIM4v5dNode; return(OK); case BSIM4v5_GNODEEXT: value->iValue = here->BSIM4v5gNodeExt; return(OK); case BSIM4v5_SNODE: value->iValue = here->BSIM4v5sNode; return(OK); case BSIM4v5_BNODE: value->iValue = here->BSIM4v5bNode; return(OK); case BSIM4v5_DNODEPRIME: value->iValue = here->BSIM4v5dNodePrime; return(OK); case BSIM4v5_GNODEPRIME: value->iValue = here->BSIM4v5gNodePrime; return(OK); case BSIM4v5_GNODEMID: value->iValue = here->BSIM4v5gNodeMid; return(OK); case BSIM4v5_SNODEPRIME: value->iValue = here->BSIM4v5sNodePrime; return(OK); case BSIM4v5_DBNODE: value->iValue = here->BSIM4v5dbNode; return(OK); case BSIM4v5_BNODEPRIME: value->iValue = here->BSIM4v5bNodePrime; return(OK); case BSIM4v5_SBNODE: value->iValue = here->BSIM4v5sbNode; return(OK); case BSIM4v5_SOURCECONDUCT: value->rValue = here->BSIM4v5sourceConductance; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_DRAINCONDUCT: value->rValue = here->BSIM4v5drainConductance; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vbd); return(OK); case BSIM4v5_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vbs); return(OK); case BSIM4v5_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vgs); return(OK); case BSIM4v5_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5vds); return(OK); case BSIM4v5_CD: value->rValue = here->BSIM4v5cd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBS: value->rValue = here->BSIM4v5cbs; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBD: value->rValue = here->BSIM4v5cbd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CSUB: value->rValue = here->BSIM4v5csub; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_QINV: value->rValue = here-> BSIM4v5qinv; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGIDL: value->rValue = here->BSIM4v5Igidl; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGISL: value->rValue = here->BSIM4v5Igisl; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGS: value->rValue = here->BSIM4v5Igs; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGD: value->rValue = here->BSIM4v5Igd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGB: value->rValue = here->BSIM4v5Igb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGCS: value->rValue = here->BSIM4v5Igcs; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_IGCD: value->rValue = here->BSIM4v5Igcd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GM: value->rValue = here->BSIM4v5gm; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GDS: value->rValue = here->BSIM4v5gds; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GMBS: value->rValue = here->BSIM4v5gmbs; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GBD: value->rValue = here->BSIM4v5gbd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GBS: value->rValue = here->BSIM4v5gbs; value->rValue *= here->BSIM4v5m; return(OK); /* case BSIM4v5_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qb); return(OK); */ case BSIM4v5_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqb); return(OK); /* case BSIM4v5_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qg); return(OK); */ case BSIM4v5_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqg); return(OK); /* case BSIM4v5_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qd); return(OK); */ case BSIM4v5_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5cqd); return(OK); /* case BSIM4v5_QS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qs); return(OK); */ case BSIM4v5_QB: value->rValue = here->BSIM4v5qbulk; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_QG: value->rValue = here->BSIM4v5qgate; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_QS: value->rValue = here->BSIM4v5qsrc; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_QD: value->rValue = here->BSIM4v5qdrn; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_QDEF: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qdef); return(OK); case BSIM4v5_GCRG: value->rValue = here->BSIM4v5gcrg; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_GTAU: value->rValue = here->BSIM4v5gtau; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CGGB: value->rValue = here->BSIM4v5cggb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CGDB: value->rValue = here->BSIM4v5cgdb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CGSB: value->rValue = here->BSIM4v5cgsb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CDGB: value->rValue = here->BSIM4v5cdgb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CDDB: value->rValue = here->BSIM4v5cddb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CDSB: value->rValue = here->BSIM4v5cdsb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBGB: value->rValue = here->BSIM4v5cbgb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBDB: value->rValue = here->BSIM4v5cbdb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBSB: value->rValue = here->BSIM4v5cbsb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CSGB: value->rValue = here->BSIM4v5csgb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CSDB: value->rValue = here->BSIM4v5csdb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CSSB: value->rValue = here->BSIM4v5cssb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CGBB: value->rValue = here->BSIM4v5cgbb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CDBB: value->rValue = here->BSIM4v5cdbb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CSBB: value->rValue = here->BSIM4v5csbb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CBBB: value->rValue = here->BSIM4v5cbbb; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CAPBD: value->rValue = here->BSIM4v5capbd; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_CAPBS: value->rValue = here->BSIM4v5capbs; value->rValue *= here->BSIM4v5m; return(OK); case BSIM4v5_VON: value->rValue = here->BSIM4v5von; return(OK); case BSIM4v5_VDSAT: value->rValue = here->BSIM4v5vdsat; return(OK); case BSIM4v5_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qbs); return(OK); case BSIM4v5_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v5qbd); return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v5/b4v5temp.c0000644000265600020320000025376712264261473021363 0ustar andreasadmin/**** BSIM4.5.0 Released by Xuemei (Jane) Xi 07/29/2005 ****/ /********** * Copyright 2005 Regents of the University of California. All rights reserved. * File: b4temp.c of BSIM4.5.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v5def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 #define DELTA 1.0E-9 #define DEXP(A,B) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ } else { \ B = exp(A); \ } \ } static int BSIM4v5DioIjthVjmEval( double Nvtm, double Ijth, double Isb, double XExpBV, double *Vjm) { double Tb, Tc, EVjmovNv; Tc = XExpBV; Tb = 1.0 + Ijth / Isb - Tc; EVjmovNv = 0.5 * (Tb + sqrt(Tb * Tb + 4.0 * Tc)); *Vjm = Nvtm * log(EVjmovNv); return 0; } int BSIM4v5temp( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v5model *model = (BSIM4v5model*) inModel; BSIM4v5instance *here; struct bsim4v5SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam = NULL; double tmp, tmp1, tmp2, Eg, Eg0, ni; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Lnew=0.0, Wnew; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double dumPs, dumPd, dumAs, dumAd, PowWeffWr; double DMCGeff, DMCIeff, DMDGeff; double Nvtms, Nvtmd, SourceSatCurrent, DrainSatCurrent; double T10; double Inv_saref, Inv_sbref, Inv_sa, Inv_sb, rho, Ldrn, dvth0_lod; double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod; double lnl, lnw, lnnf, rbpbx, rbpby, rbsbx, rbsby, rbdbx, rbdby,bodymode; double kvsat, wlod, sceff, Wdrn; int Size_Not_Found, i; /* loop through all the BSIM4v5 device models */ for (; model != NULL; model = model->BSIM4v5nextModel) { Temp = ckt->CKTtemp; if (model->BSIM4v5SbulkJctPotential < 0.1) { model->BSIM4v5SbulkJctPotential = 0.1; fprintf(stderr, "Given pbs is less than 0.1. Pbs is set to 0.1.\n"); } if (model->BSIM4v5SsidewallJctPotential < 0.1) { model->BSIM4v5SsidewallJctPotential = 0.1; fprintf(stderr, "Given pbsws is less than 0.1. Pbsws is set to 0.1.\n"); } if (model->BSIM4v5SGatesidewallJctPotential < 0.1) { model->BSIM4v5SGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgs is less than 0.1. Pbswgs is set to 0.1.\n"); } if (model->BSIM4v5DbulkJctPotential < 0.1) { model->BSIM4v5DbulkJctPotential = 0.1; fprintf(stderr, "Given pbd is less than 0.1. Pbd is set to 0.1.\n"); } if (model->BSIM4v5DsidewallJctPotential < 0.1) { model->BSIM4v5DsidewallJctPotential = 0.1; fprintf(stderr, "Given pbswd is less than 0.1. Pbswd is set to 0.1.\n"); } if (model->BSIM4v5DGatesidewallJctPotential < 0.1) { model->BSIM4v5DGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgd is less than 0.1. Pbswgd is set to 0.1.\n"); } if ((model->BSIM4v5toxeGiven) && (model->BSIM4v5toxpGiven) && (model->BSIM4v5dtoxGiven) && (model->BSIM4v5toxe != (model->BSIM4v5toxp + model->BSIM4v5dtox))) printf("Warning: toxe, toxp and dtox all given and toxe != toxp + dtox; dtox ignored.\n"); else if ((model->BSIM4v5toxeGiven) && (!model->BSIM4v5toxpGiven)) model->BSIM4v5toxp = model->BSIM4v5toxe - model->BSIM4v5dtox; else if ((!model->BSIM4v5toxeGiven) && (model->BSIM4v5toxpGiven)) model->BSIM4v5toxe = model->BSIM4v5toxp + model->BSIM4v5dtox; model->BSIM4v5coxe = model->BSIM4v5epsrox * EPS0 / model->BSIM4v5toxe; model->BSIM4v5coxp = model->BSIM4v5epsrox * EPS0 / model->BSIM4v5toxp; if (!model->BSIM4v5cgdoGiven) { if (model->BSIM4v5dlcGiven && (model->BSIM4v5dlc > 0.0)) model->BSIM4v5cgdo = model->BSIM4v5dlc * model->BSIM4v5coxe - model->BSIM4v5cgdl ; else model->BSIM4v5cgdo = 0.6 * model->BSIM4v5xj * model->BSIM4v5coxe; } if (!model->BSIM4v5cgsoGiven) { if (model->BSIM4v5dlcGiven && (model->BSIM4v5dlc > 0.0)) model->BSIM4v5cgso = model->BSIM4v5dlc * model->BSIM4v5coxe - model->BSIM4v5cgsl ; else model->BSIM4v5cgso = 0.6 * model->BSIM4v5xj * model->BSIM4v5coxe; } if (!model->BSIM4v5cgboGiven) model->BSIM4v5cgbo = 2.0 * model->BSIM4v5dwc * model->BSIM4v5coxe; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM4v5tnom; TRatio = Temp / Tnom; model->BSIM4v5vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM4v5factor1 = sqrt(EPSSI / (model->BSIM4v5epsrox * EPS0) * model->BSIM4v5toxe); Vtm0 = model->BSIM4v5vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); model->BSIM4v5vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM4v5vtm; T1 = log(Temp / Tnom); T2 = T0 + model->BSIM4v5SjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v5SjctEmissionCoeff); model->BSIM4v5SjctTempSatCurDensity = model->BSIM4v5SjctSatCurDensity * T3; model->BSIM4v5SjctSidewallTempSatCurDensity = model->BSIM4v5SjctSidewallSatCurDensity * T3; model->BSIM4v5SjctGateSidewallTempSatCurDensity = model->BSIM4v5SjctGateSidewallSatCurDensity * T3; T2 = T0 + model->BSIM4v5DjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v5DjctEmissionCoeff); model->BSIM4v5DjctTempSatCurDensity = model->BSIM4v5DjctSatCurDensity * T3; model->BSIM4v5DjctSidewallTempSatCurDensity = model->BSIM4v5DjctSidewallSatCurDensity * T3; model->BSIM4v5DjctGateSidewallTempSatCurDensity = model->BSIM4v5DjctGateSidewallSatCurDensity * T3; } else { model->BSIM4v5SjctTempSatCurDensity = model->BSIM4v5SjctSatCurDensity; model->BSIM4v5SjctSidewallTempSatCurDensity = model->BSIM4v5SjctSidewallSatCurDensity; model->BSIM4v5SjctGateSidewallTempSatCurDensity = model->BSIM4v5SjctGateSidewallSatCurDensity; model->BSIM4v5DjctTempSatCurDensity = model->BSIM4v5DjctSatCurDensity; model->BSIM4v5DjctSidewallTempSatCurDensity = model->BSIM4v5DjctSidewallSatCurDensity; model->BSIM4v5DjctGateSidewallTempSatCurDensity = model->BSIM4v5DjctGateSidewallSatCurDensity; } if (model->BSIM4v5SjctTempSatCurDensity < 0.0) model->BSIM4v5SjctTempSatCurDensity = 0.0; if (model->BSIM4v5SjctSidewallTempSatCurDensity < 0.0) model->BSIM4v5SjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v5SjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v5SjctGateSidewallTempSatCurDensity = 0.0; if (model->BSIM4v5DjctTempSatCurDensity < 0.0) model->BSIM4v5DjctTempSatCurDensity = 0.0; if (model->BSIM4v5DjctSidewallTempSatCurDensity < 0.0) model->BSIM4v5DjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v5DjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v5DjctGateSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM4v5tnom; T0 = model->BSIM4v5tcj * delTemp; if (T0 >= -1.0) { model->BSIM4v5SunitAreaTempJctCap = model->BSIM4v5SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ model->BSIM4v5DunitAreaTempJctCap = model->BSIM4v5DunitAreaJctCap *(1.0 + T0); } else { if (model->BSIM4v5SunitAreaJctCap > 0.0) { model->BSIM4v5SunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjs to be negative. Cjs is clamped to zero.\n"); } if (model->BSIM4v5DunitAreaJctCap > 0.0) { model->BSIM4v5DunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjd to be negative. Cjd is clamped to zero.\n"); } } T0 = model->BSIM4v5tcjsw * delTemp; if (T0 >= -1.0) { model->BSIM4v5SunitLengthSidewallTempJctCap = model->BSIM4v5SunitLengthSidewallJctCap *(1.0 + T0); model->BSIM4v5DunitLengthSidewallTempJctCap = model->BSIM4v5DunitLengthSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v5SunitLengthSidewallJctCap > 0.0) { model->BSIM4v5SunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsws to be negative. Cjsws is clamped to zero.\n"); } if (model->BSIM4v5DunitLengthSidewallJctCap > 0.0) { model->BSIM4v5DunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswd to be negative. Cjswd is clamped to zero.\n"); } } T0 = model->BSIM4v5tcjswg * delTemp; if (T0 >= -1.0) { model->BSIM4v5SunitLengthGateSidewallTempJctCap = model->BSIM4v5SunitLengthGateSidewallJctCap *(1.0 + T0); model->BSIM4v5DunitLengthGateSidewallTempJctCap = model->BSIM4v5DunitLengthGateSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v5SunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v5SunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgs to be negative. Cjswgs is clamped to zero.\n"); } if (model->BSIM4v5DunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v5DunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgd to be negative. Cjswgd is clamped to zero.\n"); } } model->BSIM4v5PhiBS = model->BSIM4v5SbulkJctPotential - model->BSIM4v5tpb * delTemp; if (model->BSIM4v5PhiBS < 0.01) { model->BSIM4v5PhiBS = 0.01; fprintf(stderr, "Temperature effect has caused pbs to be less than 0.01. Pbs is clamped to 0.01.\n"); } model->BSIM4v5PhiBD = model->BSIM4v5DbulkJctPotential - model->BSIM4v5tpb * delTemp; if (model->BSIM4v5PhiBD < 0.01) { model->BSIM4v5PhiBD = 0.01; fprintf(stderr, "Temperature effect has caused pbd to be less than 0.01. Pbd is clamped to 0.01.\n"); } model->BSIM4v5PhiBSWS = model->BSIM4v5SsidewallJctPotential - model->BSIM4v5tpbsw * delTemp; if (model->BSIM4v5PhiBSWS <= 0.01) { model->BSIM4v5PhiBSWS = 0.01; fprintf(stderr, "Temperature effect has caused pbsws to be less than 0.01. Pbsws is clamped to 0.01.\n"); } model->BSIM4v5PhiBSWD = model->BSIM4v5DsidewallJctPotential - model->BSIM4v5tpbsw * delTemp; if (model->BSIM4v5PhiBSWD <= 0.01) { model->BSIM4v5PhiBSWD = 0.01; fprintf(stderr, "Temperature effect has caused pbswd to be less than 0.01. Pbswd is clamped to 0.01.\n"); } model->BSIM4v5PhiBSWGS = model->BSIM4v5SGatesidewallJctPotential - model->BSIM4v5tpbswg * delTemp; if (model->BSIM4v5PhiBSWGS <= 0.01) { model->BSIM4v5PhiBSWGS = 0.01; fprintf(stderr, "Temperature effect has caused pbswgs to be less than 0.01. Pbswgs is clamped to 0.01.\n"); } model->BSIM4v5PhiBSWGD = model->BSIM4v5DGatesidewallJctPotential - model->BSIM4v5tpbswg * delTemp; if (model->BSIM4v5PhiBSWGD <= 0.01) { model->BSIM4v5PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ if (model->BSIM4v5ijthdfwd <= 0.0) { model->BSIM4v5ijthdfwd = 0.1; fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4v5ijthdfwd); } if (model->BSIM4v5ijthsfwd <= 0.0) { model->BSIM4v5ijthsfwd = 0.1; fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4v5ijthsfwd); } if (model->BSIM4v5ijthdrev <= 0.0) { model->BSIM4v5ijthdrev = 0.1; fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4v5ijthdrev); } if (model->BSIM4v5ijthsrev <= 0.0) { model->BSIM4v5ijthsrev = 0.1; fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4v5ijthsrev); } if ((model->BSIM4v5xjbvd <= 0.0) && (model->BSIM4v5dioMod == 2)) { model->BSIM4v5xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v5xjbvd); } else if ((model->BSIM4v5xjbvd < 0.0) && (model->BSIM4v5dioMod == 0)) { model->BSIM4v5xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v5xjbvd); } if (model->BSIM4v5bvd <= 0.0) { model->BSIM4v5bvd = 10.0; fprintf(stderr, "BVD reset to %g.\n", model->BSIM4v5bvd); } if ((model->BSIM4v5xjbvs <= 0.0) && (model->BSIM4v5dioMod == 2)) { model->BSIM4v5xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v5xjbvs); } else if ((model->BSIM4v5xjbvs < 0.0) && (model->BSIM4v5dioMod == 0)) { model->BSIM4v5xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v5xjbvs); } if (model->BSIM4v5bvs <= 0.0) { model->BSIM4v5bvs = 10.0; fprintf(stderr, "BVS reset to %g.\n", model->BSIM4v5bvs); } /* loop through all the instances of the model */ for (here = model->BSIM4v5instances; here != NULL; here = here->BSIM4v5nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM4v5l == pSizeDependParamKnot->Length) && (here->BSIM4v5w == pSizeDependParamKnot->Width) && (here->BSIM4v5nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } /* stress effect */ Ldrn = here->BSIM4v5l; Wdrn = here->BSIM4v5w / here->BSIM4v5nf; if (Size_Not_Found) { pParam = TMALLOC(struct bsim4v5SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; pParam->Length = here->BSIM4v5l; pParam->Width = here->BSIM4v5w; pParam->NFinger = here->BSIM4v5nf; Lnew = here->BSIM4v5l + model->BSIM4v5xl ; Wnew = here->BSIM4v5w / here->BSIM4v5nf + model->BSIM4v5xw; T0 = pow(Lnew, model->BSIM4v5Lln); T1 = pow(Wnew, model->BSIM4v5Lwn); tmp1 = model->BSIM4v5Ll / T0 + model->BSIM4v5Lw / T1 + model->BSIM4v5Lwl / (T0 * T1); pParam->BSIM4v5dl = model->BSIM4v5Lint + tmp1; tmp2 = model->BSIM4v5Llc / T0 + model->BSIM4v5Lwc / T1 + model->BSIM4v5Lwlc / (T0 * T1); pParam->BSIM4v5dlc = model->BSIM4v5dlc + tmp2; T2 = pow(Lnew, model->BSIM4v5Wln); T3 = pow(Wnew, model->BSIM4v5Wwn); tmp1 = model->BSIM4v5Wl / T2 + model->BSIM4v5Ww / T3 + model->BSIM4v5Wwl / (T2 * T3); pParam->BSIM4v5dw = model->BSIM4v5Wint + tmp1; tmp2 = model->BSIM4v5Wlc / T2 + model->BSIM4v5Wwc / T3 + model->BSIM4v5Wwlc / (T2 * T3); pParam->BSIM4v5dwc = model->BSIM4v5dwc + tmp2; pParam->BSIM4v5dwj = model->BSIM4v5dwj + tmp2; pParam->BSIM4v5leff = Lnew - 2.0 * pParam->BSIM4v5dl; if (pParam->BSIM4v5leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v5: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v5weff = Wnew - 2.0 * pParam->BSIM4v5dw; if (pParam->BSIM4v5weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v5: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v5leffCV = Lnew - 2.0 * pParam->BSIM4v5dlc; if (pParam->BSIM4v5leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v5: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v5weffCV = Wnew - 2.0 * pParam->BSIM4v5dwc; if (pParam->BSIM4v5weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v5: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v5weffCJ = Wnew - 2.0 * pParam->BSIM4v5dwj; if (pParam->BSIM4v5weffCJ <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v5: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } if (model->BSIM4v5binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM4v5leff; Inv_W = 1.0e-6 / pParam->BSIM4v5weff; Inv_LW = 1.0e-12 / (pParam->BSIM4v5leff * pParam->BSIM4v5weff); } else { Inv_L = 1.0 / pParam->BSIM4v5leff; Inv_W = 1.0 / pParam->BSIM4v5weff; Inv_LW = 1.0 / (pParam->BSIM4v5leff * pParam->BSIM4v5weff); } pParam->BSIM4v5cdsc = model->BSIM4v5cdsc + model->BSIM4v5lcdsc * Inv_L + model->BSIM4v5wcdsc * Inv_W + model->BSIM4v5pcdsc * Inv_LW; pParam->BSIM4v5cdscb = model->BSIM4v5cdscb + model->BSIM4v5lcdscb * Inv_L + model->BSIM4v5wcdscb * Inv_W + model->BSIM4v5pcdscb * Inv_LW; pParam->BSIM4v5cdscd = model->BSIM4v5cdscd + model->BSIM4v5lcdscd * Inv_L + model->BSIM4v5wcdscd * Inv_W + model->BSIM4v5pcdscd * Inv_LW; pParam->BSIM4v5cit = model->BSIM4v5cit + model->BSIM4v5lcit * Inv_L + model->BSIM4v5wcit * Inv_W + model->BSIM4v5pcit * Inv_LW; pParam->BSIM4v5nfactor = model->BSIM4v5nfactor + model->BSIM4v5lnfactor * Inv_L + model->BSIM4v5wnfactor * Inv_W + model->BSIM4v5pnfactor * Inv_LW; pParam->BSIM4v5xj = model->BSIM4v5xj + model->BSIM4v5lxj * Inv_L + model->BSIM4v5wxj * Inv_W + model->BSIM4v5pxj * Inv_LW; pParam->BSIM4v5vsat = model->BSIM4v5vsat + model->BSIM4v5lvsat * Inv_L + model->BSIM4v5wvsat * Inv_W + model->BSIM4v5pvsat * Inv_LW; pParam->BSIM4v5at = model->BSIM4v5at + model->BSIM4v5lat * Inv_L + model->BSIM4v5wat * Inv_W + model->BSIM4v5pat * Inv_LW; pParam->BSIM4v5a0 = model->BSIM4v5a0 + model->BSIM4v5la0 * Inv_L + model->BSIM4v5wa0 * Inv_W + model->BSIM4v5pa0 * Inv_LW; pParam->BSIM4v5ags = model->BSIM4v5ags + model->BSIM4v5lags * Inv_L + model->BSIM4v5wags * Inv_W + model->BSIM4v5pags * Inv_LW; pParam->BSIM4v5a1 = model->BSIM4v5a1 + model->BSIM4v5la1 * Inv_L + model->BSIM4v5wa1 * Inv_W + model->BSIM4v5pa1 * Inv_LW; pParam->BSIM4v5a2 = model->BSIM4v5a2 + model->BSIM4v5la2 * Inv_L + model->BSIM4v5wa2 * Inv_W + model->BSIM4v5pa2 * Inv_LW; pParam->BSIM4v5keta = model->BSIM4v5keta + model->BSIM4v5lketa * Inv_L + model->BSIM4v5wketa * Inv_W + model->BSIM4v5pketa * Inv_LW; pParam->BSIM4v5nsub = model->BSIM4v5nsub + model->BSIM4v5lnsub * Inv_L + model->BSIM4v5wnsub * Inv_W + model->BSIM4v5pnsub * Inv_LW; pParam->BSIM4v5ndep = model->BSIM4v5ndep + model->BSIM4v5lndep * Inv_L + model->BSIM4v5wndep * Inv_W + model->BSIM4v5pndep * Inv_LW; pParam->BSIM4v5nsd = model->BSIM4v5nsd + model->BSIM4v5lnsd * Inv_L + model->BSIM4v5wnsd * Inv_W + model->BSIM4v5pnsd * Inv_LW; pParam->BSIM4v5phin = model->BSIM4v5phin + model->BSIM4v5lphin * Inv_L + model->BSIM4v5wphin * Inv_W + model->BSIM4v5pphin * Inv_LW; pParam->BSIM4v5ngate = model->BSIM4v5ngate + model->BSIM4v5lngate * Inv_L + model->BSIM4v5wngate * Inv_W + model->BSIM4v5pngate * Inv_LW; pParam->BSIM4v5gamma1 = model->BSIM4v5gamma1 + model->BSIM4v5lgamma1 * Inv_L + model->BSIM4v5wgamma1 * Inv_W + model->BSIM4v5pgamma1 * Inv_LW; pParam->BSIM4v5gamma2 = model->BSIM4v5gamma2 + model->BSIM4v5lgamma2 * Inv_L + model->BSIM4v5wgamma2 * Inv_W + model->BSIM4v5pgamma2 * Inv_LW; pParam->BSIM4v5vbx = model->BSIM4v5vbx + model->BSIM4v5lvbx * Inv_L + model->BSIM4v5wvbx * Inv_W + model->BSIM4v5pvbx * Inv_LW; pParam->BSIM4v5vbm = model->BSIM4v5vbm + model->BSIM4v5lvbm * Inv_L + model->BSIM4v5wvbm * Inv_W + model->BSIM4v5pvbm * Inv_LW; pParam->BSIM4v5xt = model->BSIM4v5xt + model->BSIM4v5lxt * Inv_L + model->BSIM4v5wxt * Inv_W + model->BSIM4v5pxt * Inv_LW; pParam->BSIM4v5vfb = model->BSIM4v5vfb + model->BSIM4v5lvfb * Inv_L + model->BSIM4v5wvfb * Inv_W + model->BSIM4v5pvfb * Inv_LW; pParam->BSIM4v5k1 = model->BSIM4v5k1 + model->BSIM4v5lk1 * Inv_L + model->BSIM4v5wk1 * Inv_W + model->BSIM4v5pk1 * Inv_LW; pParam->BSIM4v5kt1 = model->BSIM4v5kt1 + model->BSIM4v5lkt1 * Inv_L + model->BSIM4v5wkt1 * Inv_W + model->BSIM4v5pkt1 * Inv_LW; pParam->BSIM4v5kt1l = model->BSIM4v5kt1l + model->BSIM4v5lkt1l * Inv_L + model->BSIM4v5wkt1l * Inv_W + model->BSIM4v5pkt1l * Inv_LW; pParam->BSIM4v5k2 = model->BSIM4v5k2 + model->BSIM4v5lk2 * Inv_L + model->BSIM4v5wk2 * Inv_W + model->BSIM4v5pk2 * Inv_LW; pParam->BSIM4v5kt2 = model->BSIM4v5kt2 + model->BSIM4v5lkt2 * Inv_L + model->BSIM4v5wkt2 * Inv_W + model->BSIM4v5pkt2 * Inv_LW; pParam->BSIM4v5k3 = model->BSIM4v5k3 + model->BSIM4v5lk3 * Inv_L + model->BSIM4v5wk3 * Inv_W + model->BSIM4v5pk3 * Inv_LW; pParam->BSIM4v5k3b = model->BSIM4v5k3b + model->BSIM4v5lk3b * Inv_L + model->BSIM4v5wk3b * Inv_W + model->BSIM4v5pk3b * Inv_LW; pParam->BSIM4v5w0 = model->BSIM4v5w0 + model->BSIM4v5lw0 * Inv_L + model->BSIM4v5ww0 * Inv_W + model->BSIM4v5pw0 * Inv_LW; pParam->BSIM4v5lpe0 = model->BSIM4v5lpe0 + model->BSIM4v5llpe0 * Inv_L + model->BSIM4v5wlpe0 * Inv_W + model->BSIM4v5plpe0 * Inv_LW; pParam->BSIM4v5lpeb = model->BSIM4v5lpeb + model->BSIM4v5llpeb * Inv_L + model->BSIM4v5wlpeb * Inv_W + model->BSIM4v5plpeb * Inv_LW; pParam->BSIM4v5dvtp0 = model->BSIM4v5dvtp0 + model->BSIM4v5ldvtp0 * Inv_L + model->BSIM4v5wdvtp0 * Inv_W + model->BSIM4v5pdvtp0 * Inv_LW; pParam->BSIM4v5dvtp1 = model->BSIM4v5dvtp1 + model->BSIM4v5ldvtp1 * Inv_L + model->BSIM4v5wdvtp1 * Inv_W + model->BSIM4v5pdvtp1 * Inv_LW; pParam->BSIM4v5dvt0 = model->BSIM4v5dvt0 + model->BSIM4v5ldvt0 * Inv_L + model->BSIM4v5wdvt0 * Inv_W + model->BSIM4v5pdvt0 * Inv_LW; pParam->BSIM4v5dvt1 = model->BSIM4v5dvt1 + model->BSIM4v5ldvt1 * Inv_L + model->BSIM4v5wdvt1 * Inv_W + model->BSIM4v5pdvt1 * Inv_LW; pParam->BSIM4v5dvt2 = model->BSIM4v5dvt2 + model->BSIM4v5ldvt2 * Inv_L + model->BSIM4v5wdvt2 * Inv_W + model->BSIM4v5pdvt2 * Inv_LW; pParam->BSIM4v5dvt0w = model->BSIM4v5dvt0w + model->BSIM4v5ldvt0w * Inv_L + model->BSIM4v5wdvt0w * Inv_W + model->BSIM4v5pdvt0w * Inv_LW; pParam->BSIM4v5dvt1w = model->BSIM4v5dvt1w + model->BSIM4v5ldvt1w * Inv_L + model->BSIM4v5wdvt1w * Inv_W + model->BSIM4v5pdvt1w * Inv_LW; pParam->BSIM4v5dvt2w = model->BSIM4v5dvt2w + model->BSIM4v5ldvt2w * Inv_L + model->BSIM4v5wdvt2w * Inv_W + model->BSIM4v5pdvt2w * Inv_LW; pParam->BSIM4v5drout = model->BSIM4v5drout + model->BSIM4v5ldrout * Inv_L + model->BSIM4v5wdrout * Inv_W + model->BSIM4v5pdrout * Inv_LW; pParam->BSIM4v5dsub = model->BSIM4v5dsub + model->BSIM4v5ldsub * Inv_L + model->BSIM4v5wdsub * Inv_W + model->BSIM4v5pdsub * Inv_LW; pParam->BSIM4v5vth0 = model->BSIM4v5vth0 + model->BSIM4v5lvth0 * Inv_L + model->BSIM4v5wvth0 * Inv_W + model->BSIM4v5pvth0 * Inv_LW; pParam->BSIM4v5ua = model->BSIM4v5ua + model->BSIM4v5lua * Inv_L + model->BSIM4v5wua * Inv_W + model->BSIM4v5pua * Inv_LW; pParam->BSIM4v5ua1 = model->BSIM4v5ua1 + model->BSIM4v5lua1 * Inv_L + model->BSIM4v5wua1 * Inv_W + model->BSIM4v5pua1 * Inv_LW; pParam->BSIM4v5ub = model->BSIM4v5ub + model->BSIM4v5lub * Inv_L + model->BSIM4v5wub * Inv_W + model->BSIM4v5pub * Inv_LW; pParam->BSIM4v5ub1 = model->BSIM4v5ub1 + model->BSIM4v5lub1 * Inv_L + model->BSIM4v5wub1 * Inv_W + model->BSIM4v5pub1 * Inv_LW; pParam->BSIM4v5uc = model->BSIM4v5uc + model->BSIM4v5luc * Inv_L + model->BSIM4v5wuc * Inv_W + model->BSIM4v5puc * Inv_LW; pParam->BSIM4v5uc1 = model->BSIM4v5uc1 + model->BSIM4v5luc1 * Inv_L + model->BSIM4v5wuc1 * Inv_W + model->BSIM4v5puc1 * Inv_LW; pParam->BSIM4v5ud = model->BSIM4v5ud + model->BSIM4v5lud * Inv_L + model->BSIM4v5wud * Inv_W + model->BSIM4v5pud * Inv_LW; pParam->BSIM4v5ud1 = model->BSIM4v5ud1 + model->BSIM4v5lud1 * Inv_L + model->BSIM4v5wud1 * Inv_W + model->BSIM4v5pud1 * Inv_LW; pParam->BSIM4v5up = model->BSIM4v5up + model->BSIM4v5lup * Inv_L + model->BSIM4v5wup * Inv_W + model->BSIM4v5pup * Inv_LW; pParam->BSIM4v5lp = model->BSIM4v5lp + model->BSIM4v5llp * Inv_L + model->BSIM4v5wlp * Inv_W + model->BSIM4v5plp * Inv_LW; pParam->BSIM4v5eu = model->BSIM4v5eu + model->BSIM4v5leu * Inv_L + model->BSIM4v5weu * Inv_W + model->BSIM4v5peu * Inv_LW; pParam->BSIM4v5u0 = model->BSIM4v5u0 + model->BSIM4v5lu0 * Inv_L + model->BSIM4v5wu0 * Inv_W + model->BSIM4v5pu0 * Inv_LW; pParam->BSIM4v5ute = model->BSIM4v5ute + model->BSIM4v5lute * Inv_L + model->BSIM4v5wute * Inv_W + model->BSIM4v5pute * Inv_LW; pParam->BSIM4v5voff = model->BSIM4v5voff + model->BSIM4v5lvoff * Inv_L + model->BSIM4v5wvoff * Inv_W + model->BSIM4v5pvoff * Inv_LW; pParam->BSIM4v5tvoff = model->BSIM4v5tvoff + model->BSIM4v5ltvoff * Inv_L + model->BSIM4v5wtvoff * Inv_W + model->BSIM4v5ptvoff * Inv_LW; pParam->BSIM4v5minv = model->BSIM4v5minv + model->BSIM4v5lminv * Inv_L + model->BSIM4v5wminv * Inv_W + model->BSIM4v5pminv * Inv_LW; pParam->BSIM4v5fprout = model->BSIM4v5fprout + model->BSIM4v5lfprout * Inv_L + model->BSIM4v5wfprout * Inv_W + model->BSIM4v5pfprout * Inv_LW; pParam->BSIM4v5pdits = model->BSIM4v5pdits + model->BSIM4v5lpdits * Inv_L + model->BSIM4v5wpdits * Inv_W + model->BSIM4v5ppdits * Inv_LW; pParam->BSIM4v5pditsd = model->BSIM4v5pditsd + model->BSIM4v5lpditsd * Inv_L + model->BSIM4v5wpditsd * Inv_W + model->BSIM4v5ppditsd * Inv_LW; pParam->BSIM4v5delta = model->BSIM4v5delta + model->BSIM4v5ldelta * Inv_L + model->BSIM4v5wdelta * Inv_W + model->BSIM4v5pdelta * Inv_LW; pParam->BSIM4v5rdsw = model->BSIM4v5rdsw + model->BSIM4v5lrdsw * Inv_L + model->BSIM4v5wrdsw * Inv_W + model->BSIM4v5prdsw * Inv_LW; pParam->BSIM4v5rdw = model->BSIM4v5rdw + model->BSIM4v5lrdw * Inv_L + model->BSIM4v5wrdw * Inv_W + model->BSIM4v5prdw * Inv_LW; pParam->BSIM4v5rsw = model->BSIM4v5rsw + model->BSIM4v5lrsw * Inv_L + model->BSIM4v5wrsw * Inv_W + model->BSIM4v5prsw * Inv_LW; pParam->BSIM4v5prwg = model->BSIM4v5prwg + model->BSIM4v5lprwg * Inv_L + model->BSIM4v5wprwg * Inv_W + model->BSIM4v5pprwg * Inv_LW; pParam->BSIM4v5prwb = model->BSIM4v5prwb + model->BSIM4v5lprwb * Inv_L + model->BSIM4v5wprwb * Inv_W + model->BSIM4v5pprwb * Inv_LW; pParam->BSIM4v5prt = model->BSIM4v5prt + model->BSIM4v5lprt * Inv_L + model->BSIM4v5wprt * Inv_W + model->BSIM4v5pprt * Inv_LW; pParam->BSIM4v5eta0 = model->BSIM4v5eta0 + model->BSIM4v5leta0 * Inv_L + model->BSIM4v5weta0 * Inv_W + model->BSIM4v5peta0 * Inv_LW; pParam->BSIM4v5etab = model->BSIM4v5etab + model->BSIM4v5letab * Inv_L + model->BSIM4v5wetab * Inv_W + model->BSIM4v5petab * Inv_LW; pParam->BSIM4v5pclm = model->BSIM4v5pclm + model->BSIM4v5lpclm * Inv_L + model->BSIM4v5wpclm * Inv_W + model->BSIM4v5ppclm * Inv_LW; pParam->BSIM4v5pdibl1 = model->BSIM4v5pdibl1 + model->BSIM4v5lpdibl1 * Inv_L + model->BSIM4v5wpdibl1 * Inv_W + model->BSIM4v5ppdibl1 * Inv_LW; pParam->BSIM4v5pdibl2 = model->BSIM4v5pdibl2 + model->BSIM4v5lpdibl2 * Inv_L + model->BSIM4v5wpdibl2 * Inv_W + model->BSIM4v5ppdibl2 * Inv_LW; pParam->BSIM4v5pdiblb = model->BSIM4v5pdiblb + model->BSIM4v5lpdiblb * Inv_L + model->BSIM4v5wpdiblb * Inv_W + model->BSIM4v5ppdiblb * Inv_LW; pParam->BSIM4v5pscbe1 = model->BSIM4v5pscbe1 + model->BSIM4v5lpscbe1 * Inv_L + model->BSIM4v5wpscbe1 * Inv_W + model->BSIM4v5ppscbe1 * Inv_LW; pParam->BSIM4v5pscbe2 = model->BSIM4v5pscbe2 + model->BSIM4v5lpscbe2 * Inv_L + model->BSIM4v5wpscbe2 * Inv_W + model->BSIM4v5ppscbe2 * Inv_LW; pParam->BSIM4v5pvag = model->BSIM4v5pvag + model->BSIM4v5lpvag * Inv_L + model->BSIM4v5wpvag * Inv_W + model->BSIM4v5ppvag * Inv_LW; pParam->BSIM4v5wr = model->BSIM4v5wr + model->BSIM4v5lwr * Inv_L + model->BSIM4v5wwr * Inv_W + model->BSIM4v5pwr * Inv_LW; pParam->BSIM4v5dwg = model->BSIM4v5dwg + model->BSIM4v5ldwg * Inv_L + model->BSIM4v5wdwg * Inv_W + model->BSIM4v5pdwg * Inv_LW; pParam->BSIM4v5dwb = model->BSIM4v5dwb + model->BSIM4v5ldwb * Inv_L + model->BSIM4v5wdwb * Inv_W + model->BSIM4v5pdwb * Inv_LW; pParam->BSIM4v5b0 = model->BSIM4v5b0 + model->BSIM4v5lb0 * Inv_L + model->BSIM4v5wb0 * Inv_W + model->BSIM4v5pb0 * Inv_LW; pParam->BSIM4v5b1 = model->BSIM4v5b1 + model->BSIM4v5lb1 * Inv_L + model->BSIM4v5wb1 * Inv_W + model->BSIM4v5pb1 * Inv_LW; pParam->BSIM4v5alpha0 = model->BSIM4v5alpha0 + model->BSIM4v5lalpha0 * Inv_L + model->BSIM4v5walpha0 * Inv_W + model->BSIM4v5palpha0 * Inv_LW; pParam->BSIM4v5alpha1 = model->BSIM4v5alpha1 + model->BSIM4v5lalpha1 * Inv_L + model->BSIM4v5walpha1 * Inv_W + model->BSIM4v5palpha1 * Inv_LW; pParam->BSIM4v5beta0 = model->BSIM4v5beta0 + model->BSIM4v5lbeta0 * Inv_L + model->BSIM4v5wbeta0 * Inv_W + model->BSIM4v5pbeta0 * Inv_LW; pParam->BSIM4v5agidl = model->BSIM4v5agidl + model->BSIM4v5lagidl * Inv_L + model->BSIM4v5wagidl * Inv_W + model->BSIM4v5pagidl * Inv_LW; pParam->BSIM4v5bgidl = model->BSIM4v5bgidl + model->BSIM4v5lbgidl * Inv_L + model->BSIM4v5wbgidl * Inv_W + model->BSIM4v5pbgidl * Inv_LW; pParam->BSIM4v5cgidl = model->BSIM4v5cgidl + model->BSIM4v5lcgidl * Inv_L + model->BSIM4v5wcgidl * Inv_W + model->BSIM4v5pcgidl * Inv_LW; pParam->BSIM4v5egidl = model->BSIM4v5egidl + model->BSIM4v5legidl * Inv_L + model->BSIM4v5wegidl * Inv_W + model->BSIM4v5pegidl * Inv_LW; pParam->BSIM4v5aigc = model->BSIM4v5aigc + model->BSIM4v5laigc * Inv_L + model->BSIM4v5waigc * Inv_W + model->BSIM4v5paigc * Inv_LW; pParam->BSIM4v5bigc = model->BSIM4v5bigc + model->BSIM4v5lbigc * Inv_L + model->BSIM4v5wbigc * Inv_W + model->BSIM4v5pbigc * Inv_LW; pParam->BSIM4v5cigc = model->BSIM4v5cigc + model->BSIM4v5lcigc * Inv_L + model->BSIM4v5wcigc * Inv_W + model->BSIM4v5pcigc * Inv_LW; pParam->BSIM4v5aigsd = model->BSIM4v5aigsd + model->BSIM4v5laigsd * Inv_L + model->BSIM4v5waigsd * Inv_W + model->BSIM4v5paigsd * Inv_LW; pParam->BSIM4v5bigsd = model->BSIM4v5bigsd + model->BSIM4v5lbigsd * Inv_L + model->BSIM4v5wbigsd * Inv_W + model->BSIM4v5pbigsd * Inv_LW; pParam->BSIM4v5cigsd = model->BSIM4v5cigsd + model->BSIM4v5lcigsd * Inv_L + model->BSIM4v5wcigsd * Inv_W + model->BSIM4v5pcigsd * Inv_LW; pParam->BSIM4v5aigbacc = model->BSIM4v5aigbacc + model->BSIM4v5laigbacc * Inv_L + model->BSIM4v5waigbacc * Inv_W + model->BSIM4v5paigbacc * Inv_LW; pParam->BSIM4v5bigbacc = model->BSIM4v5bigbacc + model->BSIM4v5lbigbacc * Inv_L + model->BSIM4v5wbigbacc * Inv_W + model->BSIM4v5pbigbacc * Inv_LW; pParam->BSIM4v5cigbacc = model->BSIM4v5cigbacc + model->BSIM4v5lcigbacc * Inv_L + model->BSIM4v5wcigbacc * Inv_W + model->BSIM4v5pcigbacc * Inv_LW; pParam->BSIM4v5aigbinv = model->BSIM4v5aigbinv + model->BSIM4v5laigbinv * Inv_L + model->BSIM4v5waigbinv * Inv_W + model->BSIM4v5paigbinv * Inv_LW; pParam->BSIM4v5bigbinv = model->BSIM4v5bigbinv + model->BSIM4v5lbigbinv * Inv_L + model->BSIM4v5wbigbinv * Inv_W + model->BSIM4v5pbigbinv * Inv_LW; pParam->BSIM4v5cigbinv = model->BSIM4v5cigbinv + model->BSIM4v5lcigbinv * Inv_L + model->BSIM4v5wcigbinv * Inv_W + model->BSIM4v5pcigbinv * Inv_LW; pParam->BSIM4v5nigc = model->BSIM4v5nigc + model->BSIM4v5lnigc * Inv_L + model->BSIM4v5wnigc * Inv_W + model->BSIM4v5pnigc * Inv_LW; pParam->BSIM4v5nigbacc = model->BSIM4v5nigbacc + model->BSIM4v5lnigbacc * Inv_L + model->BSIM4v5wnigbacc * Inv_W + model->BSIM4v5pnigbacc * Inv_LW; pParam->BSIM4v5nigbinv = model->BSIM4v5nigbinv + model->BSIM4v5lnigbinv * Inv_L + model->BSIM4v5wnigbinv * Inv_W + model->BSIM4v5pnigbinv * Inv_LW; pParam->BSIM4v5ntox = model->BSIM4v5ntox + model->BSIM4v5lntox * Inv_L + model->BSIM4v5wntox * Inv_W + model->BSIM4v5pntox * Inv_LW; pParam->BSIM4v5eigbinv = model->BSIM4v5eigbinv + model->BSIM4v5leigbinv * Inv_L + model->BSIM4v5weigbinv * Inv_W + model->BSIM4v5peigbinv * Inv_LW; pParam->BSIM4v5pigcd = model->BSIM4v5pigcd + model->BSIM4v5lpigcd * Inv_L + model->BSIM4v5wpigcd * Inv_W + model->BSIM4v5ppigcd * Inv_LW; pParam->BSIM4v5poxedge = model->BSIM4v5poxedge + model->BSIM4v5lpoxedge * Inv_L + model->BSIM4v5wpoxedge * Inv_W + model->BSIM4v5ppoxedge * Inv_LW; pParam->BSIM4v5xrcrg1 = model->BSIM4v5xrcrg1 + model->BSIM4v5lxrcrg1 * Inv_L + model->BSIM4v5wxrcrg1 * Inv_W + model->BSIM4v5pxrcrg1 * Inv_LW; pParam->BSIM4v5xrcrg2 = model->BSIM4v5xrcrg2 + model->BSIM4v5lxrcrg2 * Inv_L + model->BSIM4v5wxrcrg2 * Inv_W + model->BSIM4v5pxrcrg2 * Inv_LW; pParam->BSIM4v5lambda = model->BSIM4v5lambda + model->BSIM4v5llambda * Inv_L + model->BSIM4v5wlambda * Inv_W + model->BSIM4v5plambda * Inv_LW; pParam->BSIM4v5vtl = model->BSIM4v5vtl + model->BSIM4v5lvtl * Inv_L + model->BSIM4v5wvtl * Inv_W + model->BSIM4v5pvtl * Inv_LW; pParam->BSIM4v5xn = model->BSIM4v5xn + model->BSIM4v5lxn * Inv_L + model->BSIM4v5wxn * Inv_W + model->BSIM4v5pxn * Inv_LW; pParam->BSIM4v5vfbsdoff = model->BSIM4v5vfbsdoff + model->BSIM4v5lvfbsdoff * Inv_L + model->BSIM4v5wvfbsdoff * Inv_W + model->BSIM4v5pvfbsdoff * Inv_LW; pParam->BSIM4v5tvfbsdoff = model->BSIM4v5tvfbsdoff + model->BSIM4v5ltvfbsdoff * Inv_L + model->BSIM4v5wtvfbsdoff * Inv_W + model->BSIM4v5ptvfbsdoff * Inv_LW; pParam->BSIM4v5cgsl = model->BSIM4v5cgsl + model->BSIM4v5lcgsl * Inv_L + model->BSIM4v5wcgsl * Inv_W + model->BSIM4v5pcgsl * Inv_LW; pParam->BSIM4v5cgdl = model->BSIM4v5cgdl + model->BSIM4v5lcgdl * Inv_L + model->BSIM4v5wcgdl * Inv_W + model->BSIM4v5pcgdl * Inv_LW; pParam->BSIM4v5ckappas = model->BSIM4v5ckappas + model->BSIM4v5lckappas * Inv_L + model->BSIM4v5wckappas * Inv_W + model->BSIM4v5pckappas * Inv_LW; pParam->BSIM4v5ckappad = model->BSIM4v5ckappad + model->BSIM4v5lckappad * Inv_L + model->BSIM4v5wckappad * Inv_W + model->BSIM4v5pckappad * Inv_LW; pParam->BSIM4v5cf = model->BSIM4v5cf + model->BSIM4v5lcf * Inv_L + model->BSIM4v5wcf * Inv_W + model->BSIM4v5pcf * Inv_LW; pParam->BSIM4v5clc = model->BSIM4v5clc + model->BSIM4v5lclc * Inv_L + model->BSIM4v5wclc * Inv_W + model->BSIM4v5pclc * Inv_LW; pParam->BSIM4v5cle = model->BSIM4v5cle + model->BSIM4v5lcle * Inv_L + model->BSIM4v5wcle * Inv_W + model->BSIM4v5pcle * Inv_LW; pParam->BSIM4v5vfbcv = model->BSIM4v5vfbcv + model->BSIM4v5lvfbcv * Inv_L + model->BSIM4v5wvfbcv * Inv_W + model->BSIM4v5pvfbcv * Inv_LW; pParam->BSIM4v5acde = model->BSIM4v5acde + model->BSIM4v5lacde * Inv_L + model->BSIM4v5wacde * Inv_W + model->BSIM4v5pacde * Inv_LW; pParam->BSIM4v5moin = model->BSIM4v5moin + model->BSIM4v5lmoin * Inv_L + model->BSIM4v5wmoin * Inv_W + model->BSIM4v5pmoin * Inv_LW; pParam->BSIM4v5noff = model->BSIM4v5noff + model->BSIM4v5lnoff * Inv_L + model->BSIM4v5wnoff * Inv_W + model->BSIM4v5pnoff * Inv_LW; pParam->BSIM4v5voffcv = model->BSIM4v5voffcv + model->BSIM4v5lvoffcv * Inv_L + model->BSIM4v5wvoffcv * Inv_W + model->BSIM4v5pvoffcv * Inv_LW; pParam->BSIM4v5kvth0we = model->BSIM4v5kvth0we + model->BSIM4v5lkvth0we * Inv_L + model->BSIM4v5wkvth0we * Inv_W + model->BSIM4v5pkvth0we * Inv_LW; pParam->BSIM4v5k2we = model->BSIM4v5k2we + model->BSIM4v5lk2we * Inv_L + model->BSIM4v5wk2we * Inv_W + model->BSIM4v5pk2we * Inv_LW; pParam->BSIM4v5ku0we = model->BSIM4v5ku0we + model->BSIM4v5lku0we * Inv_L + model->BSIM4v5wku0we * Inv_W + model->BSIM4v5pku0we * Inv_LW; pParam->BSIM4v5abulkCVfactor = 1.0 + pow((pParam->BSIM4v5clc / pParam->BSIM4v5leffCV), pParam->BSIM4v5cle); T0 = (TRatio - 1.0); PowWeffWr = pow(pParam->BSIM4v5weffCJ * 1.0e6, pParam->BSIM4v5wr) * here->BSIM4v5nf; T1 = T2 = T3 = T4 = 0.0; if(model->BSIM4v5tempMod == 0) { pParam->BSIM4v5ua = pParam->BSIM4v5ua + pParam->BSIM4v5ua1 * T0; pParam->BSIM4v5ub = pParam->BSIM4v5ub + pParam->BSIM4v5ub1 * T0; pParam->BSIM4v5uc = pParam->BSIM4v5uc + pParam->BSIM4v5uc1 * T0; pParam->BSIM4v5ud = pParam->BSIM4v5ud + pParam->BSIM4v5ud1 * T0; pParam->BSIM4v5vsattemp = pParam->BSIM4v5vsat - pParam->BSIM4v5at * T0; T10 = pParam->BSIM4v5prt * T0; if(model->BSIM4v5rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v5rdw + T10; T2 = model->BSIM4v5rdwmin + T10; /* External Rs(V) */ T3 = pParam->BSIM4v5rsw + T10; T4 = model->BSIM4v5rswmin + T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v5rds0 = (pParam->BSIM4v5rdsw + T10) * here->BSIM4v5nf / PowWeffWr; pParam->BSIM4v5rdswmin = (model->BSIM4v5rdswmin + T10) * here->BSIM4v5nf / PowWeffWr; } else { /* tempMod = 1, 2 */ pParam->BSIM4v5ua = pParam->BSIM4v5ua * (1.0 + pParam->BSIM4v5ua1 * delTemp) ; pParam->BSIM4v5ub = pParam->BSIM4v5ub * (1.0 + pParam->BSIM4v5ub1 * delTemp); pParam->BSIM4v5uc = pParam->BSIM4v5uc * (1.0 + pParam->BSIM4v5uc1 * delTemp); pParam->BSIM4v5ud = pParam->BSIM4v5ud * (1.0 + pParam->BSIM4v5ud1 * delTemp); pParam->BSIM4v5vsattemp = pParam->BSIM4v5vsat * (1.0 - pParam->BSIM4v5at * delTemp); T10 = 1.0 + pParam->BSIM4v5prt * delTemp; if(model->BSIM4v5rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v5rdw * T10; T2 = model->BSIM4v5rdwmin * T10; /* External Rs(V) */ T3 = pParam->BSIM4v5rsw * T10; T4 = model->BSIM4v5rswmin * T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v5rds0 = pParam->BSIM4v5rdsw * T10 * here->BSIM4v5nf / PowWeffWr; pParam->BSIM4v5rdswmin = model->BSIM4v5rdswmin * T10 * here->BSIM4v5nf / PowWeffWr; } if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v5rd0 = T1 / PowWeffWr; pParam->BSIM4v5rdwmin = T2 / PowWeffWr; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } if (T4 < 0.0) { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v5rs0 = T3 / PowWeffWr; pParam->BSIM4v5rswmin = T4 / PowWeffWr; if (pParam->BSIM4v5u0 > 1.0) pParam->BSIM4v5u0 = pParam->BSIM4v5u0 / 1.0e4; /* mobility channel length dependence */ T5 = 1.0 - pParam->BSIM4v5up * exp( - pParam->BSIM4v5leff / pParam->BSIM4v5lp); pParam->BSIM4v5u0temp = pParam->BSIM4v5u0 * T5 * pow(TRatio, pParam->BSIM4v5ute); if (pParam->BSIM4v5eu < 0.0) { pParam->BSIM4v5eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } pParam->BSIM4v5vfbsdoff = pParam->BSIM4v5vfbsdoff * (1.0 + pParam->BSIM4v5tvfbsdoff * delTemp); pParam->BSIM4v5voff = pParam->BSIM4v5voff * (1.0 + pParam->BSIM4v5tvoff * delTemp); /* Source End Velocity Limit */ if((model->BSIM4v5vtlGiven) && (model->BSIM4v5vtl > 0.0) ) { if(model->BSIM4v5lc < 0.0) pParam->BSIM4v5lc = 0.0; else pParam->BSIM4v5lc = model->BSIM4v5lc ; T0 = pParam->BSIM4v5leff / (pParam->BSIM4v5xn * pParam->BSIM4v5leff + pParam->BSIM4v5lc); pParam->BSIM4v5tfactor = (1.0 - T0) / (1.0 + T0 ); } pParam->BSIM4v5cgdo = (model->BSIM4v5cgdo + pParam->BSIM4v5cf) * pParam->BSIM4v5weffCV; pParam->BSIM4v5cgso = (model->BSIM4v5cgso + pParam->BSIM4v5cf) * pParam->BSIM4v5weffCV; pParam->BSIM4v5cgbo = model->BSIM4v5cgbo * pParam->BSIM4v5leffCV * here->BSIM4v5nf; if (!model->BSIM4v5ndepGiven && model->BSIM4v5gamma1Given) { T0 = pParam->BSIM4v5gamma1 * model->BSIM4v5coxe; pParam->BSIM4v5ndep = 3.01248e22 * T0 * T0; } pParam->BSIM4v5phi = Vtm0 * log(pParam->BSIM4v5ndep / ni) + pParam->BSIM4v5phin + 0.4; pParam->BSIM4v5sqrtPhi = sqrt(pParam->BSIM4v5phi); pParam->BSIM4v5phis3 = pParam->BSIM4v5sqrtPhi * pParam->BSIM4v5phi; pParam->BSIM4v5Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM4v5ndep * 1.0e6)) * pParam->BSIM4v5sqrtPhi; pParam->BSIM4v5sqrtXdep0 = sqrt(pParam->BSIM4v5Xdep0); pParam->BSIM4v5litl = sqrt(3.0 * pParam->BSIM4v5xj * model->BSIM4v5toxe); pParam->BSIM4v5vbi = Vtm0 * log(pParam->BSIM4v5nsd * pParam->BSIM4v5ndep / (ni * ni)); if (pParam->BSIM4v5ngate > 0.0) { pParam->BSIM4v5vfbsd = Vtm0 * log(pParam->BSIM4v5ngate / pParam->BSIM4v5nsd); } else pParam->BSIM4v5vfbsd = 0.0; pParam->BSIM4v5cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM4v5ndep * 1.0e6 / 2.0 / pParam->BSIM4v5phi); pParam->BSIM4v5ToxRatio = exp(pParam->BSIM4v5ntox * log(model->BSIM4v5toxref / model->BSIM4v5toxe)) / model->BSIM4v5toxe / model->BSIM4v5toxe; pParam->BSIM4v5ToxRatioEdge = exp(pParam->BSIM4v5ntox * log(model->BSIM4v5toxref / (model->BSIM4v5toxe * pParam->BSIM4v5poxedge))) / model->BSIM4v5toxe / model->BSIM4v5toxe / pParam->BSIM4v5poxedge / pParam->BSIM4v5poxedge; pParam->BSIM4v5Aechvb = (model->BSIM4v5type == NMOS) ? 4.97232e-7 : 3.42537e-7; pParam->BSIM4v5Bechvb = (model->BSIM4v5type == NMOS) ? 7.45669e11 : 1.16645e12; pParam->BSIM4v5AechvbEdge = pParam->BSIM4v5Aechvb * pParam->BSIM4v5weff * model->BSIM4v5dlcig * pParam->BSIM4v5ToxRatioEdge; pParam->BSIM4v5BechvbEdge = -pParam->BSIM4v5Bechvb * model->BSIM4v5toxe * pParam->BSIM4v5poxedge; pParam->BSIM4v5Aechvb *= pParam->BSIM4v5weff * pParam->BSIM4v5leff * pParam->BSIM4v5ToxRatio; pParam->BSIM4v5Bechvb *= -model->BSIM4v5toxe; pParam->BSIM4v5mstar = 0.5 + atan(pParam->BSIM4v5minv) / PI; pParam->BSIM4v5voffcbn = pParam->BSIM4v5voff + model->BSIM4v5voffl / pParam->BSIM4v5leff; pParam->BSIM4v5ldeb = sqrt(EPSSI * Vtm0 / (Charge_q * pParam->BSIM4v5ndep * 1.0e6)) / 3.0; pParam->BSIM4v5acde *= pow((pParam->BSIM4v5ndep / 2.0e16), -0.25); if (model->BSIM4v5k1Given || model->BSIM4v5k2Given) { if (!model->BSIM4v5k1Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4v5k1 = 0.53; } if (!model->BSIM4v5k2Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4v5k2 = -0.0186; } if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) { /* don't print in sensitivity */ if (model->BSIM4v5nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM4v5xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM4v5vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM4v5gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM4v5gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } } else { if (!model->BSIM4v5vbxGiven) pParam->BSIM4v5vbx = pParam->BSIM4v5phi - 7.7348e-4 * pParam->BSIM4v5ndep * pParam->BSIM4v5xt * pParam->BSIM4v5xt; if (pParam->BSIM4v5vbx > 0.0) pParam->BSIM4v5vbx = -pParam->BSIM4v5vbx; if (pParam->BSIM4v5vbm > 0.0) pParam->BSIM4v5vbm = -pParam->BSIM4v5vbm; if (!model->BSIM4v5gamma1Given) pParam->BSIM4v5gamma1 = 5.753e-12 * sqrt(pParam->BSIM4v5ndep) / model->BSIM4v5coxe; if (!model->BSIM4v5gamma2Given) pParam->BSIM4v5gamma2 = 5.753e-12 * sqrt(pParam->BSIM4v5nsub) / model->BSIM4v5coxe; T0 = pParam->BSIM4v5gamma1 - pParam->BSIM4v5gamma2; T1 = sqrt(pParam->BSIM4v5phi - pParam->BSIM4v5vbx) - pParam->BSIM4v5sqrtPhi; T2 = sqrt(pParam->BSIM4v5phi * (pParam->BSIM4v5phi - pParam->BSIM4v5vbm)) - pParam->BSIM4v5phi; pParam->BSIM4v5k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4v5vbm); pParam->BSIM4v5k1 = pParam->BSIM4v5gamma2 - 2.0 * pParam->BSIM4v5k2 * sqrt(pParam->BSIM4v5phi - pParam->BSIM4v5vbm); } if (!model->BSIM4v5vfbGiven) { if (model->BSIM4v5vth0Given) { pParam->BSIM4v5vfb = model->BSIM4v5type * pParam->BSIM4v5vth0 - pParam->BSIM4v5phi - pParam->BSIM4v5k1 * pParam->BSIM4v5sqrtPhi; } else { pParam->BSIM4v5vfb = -1.0; } } if (!model->BSIM4v5vth0Given) { pParam->BSIM4v5vth0 = model->BSIM4v5type * (pParam->BSIM4v5vfb + pParam->BSIM4v5phi + pParam->BSIM4v5k1 * pParam->BSIM4v5sqrtPhi); } pParam->BSIM4v5k1ox = pParam->BSIM4v5k1 * model->BSIM4v5toxe / model->BSIM4v5toxm; tmp = sqrt(EPSSI / (model->BSIM4v5epsrox * EPS0) * model->BSIM4v5toxe * pParam->BSIM4v5Xdep0); T0 = pParam->BSIM4v5dsub * pParam->BSIM4v5leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; pParam->BSIM4v5theta0vb0 = T1 / T4; } else pParam->BSIM4v5theta0vb0 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v5drout * pParam->BSIM4v5leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ pParam->BSIM4v5thetaRout = pParam->BSIM4v5pdibl1 * T5 + pParam->BSIM4v5pdibl2; tmp = sqrt(pParam->BSIM4v5Xdep0); tmp1 = pParam->BSIM4v5vbi - pParam->BSIM4v5phi; tmp2 = model->BSIM4v5factor1 * tmp; T0 = pParam->BSIM4v5dvt1w * pParam->BSIM4v5weff * pParam->BSIM4v5leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T8 = T1 / T4; } else T8 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v5dvt0w * T8; T8 = T0 * tmp1; T0 = pParam->BSIM4v5dvt1 * pParam->BSIM4v5leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T9 = T1 / T4; } else T9 = 1.0 / (MAX_EXP - 2.0); T9 = pParam->BSIM4v5dvt0 * T9 * tmp1; T4 = model->BSIM4v5toxe * pParam->BSIM4v5phi / (pParam->BSIM4v5weff + pParam->BSIM4v5w0); T0 = sqrt(1.0 + pParam->BSIM4v5lpe0 / pParam->BSIM4v5leff); if((model->BSIM4v5tempMod == 1) || (model->BSIM4v5tempMod == 0)) T3 = (pParam->BSIM4v5kt1 + pParam->BSIM4v5kt1l / pParam->BSIM4v5leff) * (TRatio - 1.0); if(model->BSIM4v5tempMod == 2) T3 = - pParam->BSIM4v5kt1 * (TRatio - 1.0); T5 = pParam->BSIM4v5k1ox * (T0 - 1.0) * pParam->BSIM4v5sqrtPhi + T3; pParam->BSIM4v5vfbzbfactor = - T8 - T9 + pParam->BSIM4v5k3 * T4 + T5 - pParam->BSIM4v5phi - pParam->BSIM4v5k1 * pParam->BSIM4v5sqrtPhi; /* stress effect */ wlod = model->BSIM4v5wlod; if (model->BSIM4v5wlod < 0.0) { fprintf(stderr, "Warning: WLOD = %g is less than 0. 0.0 is used\n",model->BSIM4v5wlod); wlod = 0.0; } T0 = pow(Lnew, model->BSIM4v5llodku0); W_tmp = Wnew + wlod; T1 = pow(W_tmp, model->BSIM4v5wlodku0); tmp1 = model->BSIM4v5lku0 / T0 + model->BSIM4v5wku0 / T1 + model->BSIM4v5pku0 / (T0 * T1); pParam->BSIM4v5ku0 = 1.0 + tmp1; T0 = pow(Lnew, model->BSIM4v5llodvth); T1 = pow(W_tmp, model->BSIM4v5wlodvth); tmp1 = model->BSIM4v5lkvth0 / T0 + model->BSIM4v5wkvth0 / T1 + model->BSIM4v5pkvth0 / (T0 * T1); pParam->BSIM4v5kvth0 = 1.0 + tmp1; pParam->BSIM4v5kvth0 = sqrt(pParam->BSIM4v5kvth0*pParam->BSIM4v5kvth0 + DELTA); T0 = (TRatio - 1.0); pParam->BSIM4v5ku0temp = pParam->BSIM4v5ku0 * (1.0 + model->BSIM4v5tku0 *T0) + DELTA; Inv_saref = 1.0/(model->BSIM4v5saref + 0.5*Ldrn); Inv_sbref = 1.0/(model->BSIM4v5sbref + 0.5*Ldrn); pParam->BSIM4v5inv_od_ref = Inv_saref + Inv_sbref; pParam->BSIM4v5rho_ref = model->BSIM4v5ku0 / pParam->BSIM4v5ku0temp * pParam->BSIM4v5inv_od_ref; } /* End of SizeNotFound */ /* stress effect */ if( (here->BSIM4v5sa > 0.0) && (here->BSIM4v5sb > 0.0) && ((here->BSIM4v5nf == 1.0) || ((here->BSIM4v5nf > 1.0) && (here->BSIM4v5sd > 0.0))) ) { Inv_sa = 0; Inv_sb = 0; kvsat = model->BSIM4v5kvsat; if (model->BSIM4v5kvsat < -1.0 ) { fprintf(stderr, "Warning: KVSAT = %g is too small; -1.0 is used.\n",model->BSIM4v5kvsat); kvsat = -1.0; } if (model->BSIM4v5kvsat > 1.0) { fprintf(stderr, "Warning: KVSAT = %g is too big; 1.0 is used.\n",model->BSIM4v5kvsat); kvsat = 1.0; } for(i = 0; i < here->BSIM4v5nf; i++){ T0 = 1.0 / here->BSIM4v5nf / (here->BSIM4v5sa + 0.5*Ldrn + i * (here->BSIM4v5sd +Ldrn)); T1 = 1.0 / here->BSIM4v5nf / (here->BSIM4v5sb + 0.5*Ldrn + i * (here->BSIM4v5sd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; rho = model->BSIM4v5ku0 / pParam->BSIM4v5ku0temp * Inv_ODeff; T0 = (1.0 + rho)/(1.0 + pParam->BSIM4v5rho_ref); here->BSIM4v5u0temp = pParam->BSIM4v5u0temp * T0; T1 = (1.0 + kvsat * rho)/(1.0 + kvsat * pParam->BSIM4v5rho_ref); here->BSIM4v5vsattemp = pParam->BSIM4v5vsattemp * T1; OD_offset = Inv_ODeff - pParam->BSIM4v5inv_od_ref; dvth0_lod = model->BSIM4v5kvth0 / pParam->BSIM4v5kvth0 * OD_offset; dk2_lod = model->BSIM4v5stk2 / pow(pParam->BSIM4v5kvth0, model->BSIM4v5lodk2) * OD_offset; deta0_lod = model->BSIM4v5steta0 / pow(pParam->BSIM4v5kvth0, model->BSIM4v5lodeta0) * OD_offset; here->BSIM4v5vth0 = pParam->BSIM4v5vth0 + dvth0_lod; here->BSIM4v5eta0 = pParam->BSIM4v5eta0 + deta0_lod; here->BSIM4v5k2 = pParam->BSIM4v5k2 + dk2_lod; } else { here->BSIM4v5u0temp = pParam->BSIM4v5u0temp; here->BSIM4v5vth0 = pParam->BSIM4v5vth0; here->BSIM4v5vsattemp = pParam->BSIM4v5vsattemp; here->BSIM4v5eta0 = pParam->BSIM4v5eta0; here->BSIM4v5k2 = pParam->BSIM4v5k2; } /* Well Proximity Effect */ if (model->BSIM4v5wpemod) { if( (!here->BSIM4v5scaGiven) && (!here->BSIM4v5scbGiven) && (!here->BSIM4v5sccGiven) ) { if((here->BSIM4v5scGiven) && (here->BSIM4v5sc > 0.0) ) { T1 = here->BSIM4v5sc + Wdrn; T2 = 1.0 / model->BSIM4v5scref; here->BSIM4v5sca = model->BSIM4v5scref * model->BSIM4v5scref / (here->BSIM4v5sc * T1); here->BSIM4v5scb = ( (0.1 * here->BSIM4v5sc + 0.01 * model->BSIM4v5scref) * exp(-10.0 * here->BSIM4v5sc * T2) - (0.1 * T1 + 0.01 * model->BSIM4v5scref) * exp(-10.0 * T1 * T2) ) / Wdrn; here->BSIM4v5scc = ( (0.05 * here->BSIM4v5sc + 0.0025 * model->BSIM4v5scref) * exp(-20.0 * here->BSIM4v5sc * T2) - (0.05 * T1 + 0.0025 * model->BSIM4v5scref) * exp(-20.0 * T1 * T2) ) / Wdrn; } else { //fprintf(stderr, "Warning: No WPE as none of SCA, SCB, SCC, SC is given and/or SC not positive.\n"); } } sceff = here->BSIM4v5sca + model->BSIM4v5web * here->BSIM4v5scb + model->BSIM4v5wec * here->BSIM4v5scc; here->BSIM4v5vth0 += pParam->BSIM4v5kvth0we * sceff; here->BSIM4v5k2 += pParam->BSIM4v5k2we * sceff; T3 = 1.0 + pParam->BSIM4v5ku0we * sceff; if (T3 <= 0.0) { fprintf(stderr, "Warning: ku0we = %g is negatively too high. Negative mobility! \n", T3); T3 = 0.0; } here->BSIM4v5u0temp *= T3; } /* adding delvto */ here->BSIM4v5vth0 += here->BSIM4v5delvto; here->BSIM4v5vfb = pParam->BSIM4v5vfb + model->BSIM4v5type * here->BSIM4v5delvto; /* Instance variables calculation */ T3 = model->BSIM4v5type * here->BSIM4v5vth0 - here->BSIM4v5vfb - pParam->BSIM4v5phi; T4 = T3 + T3; T5 = 2.5 * T3; here->BSIM4v5vtfbphi1 = (model->BSIM4v5type == NMOS) ? T4 : T5; if (here->BSIM4v5vtfbphi1 < 0.0) here->BSIM4v5vtfbphi1 = 0.0; here->BSIM4v5vtfbphi2 = 4.0 * T3; if (here->BSIM4v5vtfbphi2 < 0.0) here->BSIM4v5vtfbphi2 = 0.0; if (here->BSIM4v5k2 < 0.0) { T0 = 0.5 * pParam->BSIM4v5k1 / here->BSIM4v5k2; here->BSIM4v5vbsc = 0.9 * (pParam->BSIM4v5phi - T0 * T0); if (here->BSIM4v5vbsc > -3.0) here->BSIM4v5vbsc = -3.0; else if (here->BSIM4v5vbsc < -30.0) here->BSIM4v5vbsc = -30.0; } else here->BSIM4v5vbsc = -30.0; if (here->BSIM4v5vbsc > pParam->BSIM4v5vbm) here->BSIM4v5vbsc = pParam->BSIM4v5vbm; here->BSIM4v5k2ox = here->BSIM4v5k2 * model->BSIM4v5toxe / model->BSIM4v5toxm; here->BSIM4v5vfbzb = pParam->BSIM4v5vfbzbfactor + model->BSIM4v5type * here->BSIM4v5vth0 ; here->BSIM4v5cgso = pParam->BSIM4v5cgso; here->BSIM4v5cgdo = pParam->BSIM4v5cgdo; lnl = log(pParam->BSIM4v5leff * 1.0e6); lnw = log(pParam->BSIM4v5weff * 1.0e6); lnnf = log(here->BSIM4v5nf); bodymode = 5; if( ( !model->BSIM4v5rbps0Given) || ( !model->BSIM4v5rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4v5rbsbx0Given && !model->BSIM4v5rbsby0Given) || (!model->BSIM4v5rbdbx0Given && !model->BSIM4v5rbdby0Given) ) bodymode = 3; if(here->BSIM4v5rbodyMod == 2) { if (bodymode == 5) { rbsbx = exp( log(model->BSIM4v5rbsbx0) + model->BSIM4v5rbsdbxl * lnl + model->BSIM4v5rbsdbxw * lnw + model->BSIM4v5rbsdbxnf * lnnf ); rbsby = exp( log(model->BSIM4v5rbsby0) + model->BSIM4v5rbsdbyl * lnl + model->BSIM4v5rbsdbyw * lnw + model->BSIM4v5rbsdbynf * lnnf ); here->BSIM4v5rbsb = rbsbx * rbsby / (rbsbx + rbsby); rbdbx = exp( log(model->BSIM4v5rbdbx0) + model->BSIM4v5rbsdbxl * lnl + model->BSIM4v5rbsdbxw * lnw + model->BSIM4v5rbsdbxnf * lnnf ); rbdby = exp( log(model->BSIM4v5rbdby0) + model->BSIM4v5rbsdbyl * lnl + model->BSIM4v5rbsdbyw * lnw + model->BSIM4v5rbsdbynf * lnnf ); here->BSIM4v5rbdb = rbdbx * rbdby / (rbdbx + rbdby); } if ((bodymode == 3)|| (bodymode == 5)) { here->BSIM4v5rbps = exp( log(model->BSIM4v5rbps0) + model->BSIM4v5rbpsl * lnl + model->BSIM4v5rbpsw * lnw + model->BSIM4v5rbpsnf * lnnf ); here->BSIM4v5rbpd = exp( log(model->BSIM4v5rbpd0) + model->BSIM4v5rbpdl * lnl + model->BSIM4v5rbpdw * lnw + model->BSIM4v5rbpdnf * lnnf ); } rbpbx = exp( log(model->BSIM4v5rbpbx0) + model->BSIM4v5rbpbxl * lnl + model->BSIM4v5rbpbxw * lnw + model->BSIM4v5rbpbxnf * lnnf ); rbpby = exp( log(model->BSIM4v5rbpby0) + model->BSIM4v5rbpbyl * lnl + model->BSIM4v5rbpbyw * lnw + model->BSIM4v5rbpbynf * lnnf ); here->BSIM4v5rbpb = rbpbx*rbpby/(rbpbx + rbpby); } if ((here->BSIM4v5rbodyMod == 1 ) || ((here->BSIM4v5rbodyMod == 2 ) && (bodymode == 5)) ) { if (here->BSIM4v5rbdb < 1.0e-3) here->BSIM4v5grbdb = 1.0e3; /* in mho */ else here->BSIM4v5grbdb = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbdb; if (here->BSIM4v5rbpb < 1.0e-3) here->BSIM4v5grbpb = 1.0e3; else here->BSIM4v5grbpb = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbpb; if (here->BSIM4v5rbps < 1.0e-3) here->BSIM4v5grbps = 1.0e3; else here->BSIM4v5grbps = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbps; if (here->BSIM4v5rbsb < 1.0e-3) here->BSIM4v5grbsb = 1.0e3; else here->BSIM4v5grbsb = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbsb; if (here->BSIM4v5rbpd < 1.0e-3) here->BSIM4v5grbpd = 1.0e3; else here->BSIM4v5grbpd = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbpd; } if((here->BSIM4v5rbodyMod == 2) && (bodymode == 3)) { here->BSIM4v5grbdb = here->BSIM4v5grbsb = model->BSIM4v5gbmin; if (here->BSIM4v5rbpb < 1.0e-3) here->BSIM4v5grbpb = 1.0e3; else here->BSIM4v5grbpb = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbpb; if (here->BSIM4v5rbps < 1.0e-3) here->BSIM4v5grbps = 1.0e3; else here->BSIM4v5grbps = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbps; if (here->BSIM4v5rbpd < 1.0e-3) here->BSIM4v5grbpd = 1.0e3; else here->BSIM4v5grbpd = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbpd; } if((here->BSIM4v5rbodyMod == 2) && (bodymode == 1)) { here->BSIM4v5grbdb = here->BSIM4v5grbsb = model->BSIM4v5gbmin; here->BSIM4v5grbps = here->BSIM4v5grbpd = 1.0e3; if (here->BSIM4v5rbpb < 1.0e-3) here->BSIM4v5grbpb = 1.0e3; else here->BSIM4v5grbpb = model->BSIM4v5gbmin + 1.0 / here->BSIM4v5rbpb; } /* * Process geomertry dependent parasitics */ here->BSIM4v5grgeltd = model->BSIM4v5rshg * (here->BSIM4v5xgw + pParam->BSIM4v5weffCJ / 3.0 / here->BSIM4v5ngcon) / (here->BSIM4v5ngcon * here->BSIM4v5nf * (Lnew - model->BSIM4v5xgl)); if (here->BSIM4v5grgeltd > 0.0) here->BSIM4v5grgeltd = 1.0 / here->BSIM4v5grgeltd; else { here->BSIM4v5grgeltd = 1.0e3; /* mho */ if (here->BSIM4v5rgateMod != 0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } DMCGeff = model->BSIM4v5dmcg - model->BSIM4v5dmcgt; DMCIeff = model->BSIM4v5dmci; DMDGeff = model->BSIM4v5dmdg - model->BSIM4v5dmcgt; if (here->BSIM4v5sourcePerimeterGiven) { if (model->BSIM4v5perMod == 0) here->BSIM4v5Pseff = here->BSIM4v5sourcePerimeter; else here->BSIM4v5Pseff = here->BSIM4v5sourcePerimeter - pParam->BSIM4v5weffCJ * here->BSIM4v5nf; } else BSIM4v5PAeffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, DMCGeff, DMCIeff, DMDGeff, &(here->BSIM4v5Pseff), &dumPd, &dumAs, &dumAd); if (here->BSIM4v5drainPerimeterGiven) { if (model->BSIM4v5perMod == 0) here->BSIM4v5Pdeff = here->BSIM4v5drainPerimeter; else here->BSIM4v5Pdeff = here->BSIM4v5drainPerimeter - pParam->BSIM4v5weffCJ * here->BSIM4v5nf; } else BSIM4v5PAeffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &(here->BSIM4v5Pdeff), &dumAs, &dumAd); if (here->BSIM4v5sourceAreaGiven) here->BSIM4v5Aseff = here->BSIM4v5sourceArea; else BSIM4v5PAeffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &(here->BSIM4v5Aseff), &dumAd); if (here->BSIM4v5drainAreaGiven) here->BSIM4v5Adeff = here->BSIM4v5drainArea; else BSIM4v5PAeffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &dumAs, &(here->BSIM4v5Adeff)); /* Processing S/D resistance and conductance below */ if(here->BSIM4v5sNodePrime != here->BSIM4v5sNode) { here->BSIM4v5sourceConductance = 0.0; if(here->BSIM4v5sourceSquaresGiven) { here->BSIM4v5sourceConductance = model->BSIM4v5sheetResistance * here->BSIM4v5sourceSquares; } else if (here->BSIM4v5rgeoMod > 0) { BSIM4v5RdseffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5rgeoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, model->BSIM4v5sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4v5sourceConductance)); } else { here->BSIM4v5sourceConductance = 0.0; } if (here->BSIM4v5sourceConductance > 0.0) here->BSIM4v5sourceConductance = 1.0 / here->BSIM4v5sourceConductance; else { here->BSIM4v5sourceConductance = 1.0e3; /* mho */ printf ("Warning: Source conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v5sourceConductance = 0.0; } if(here->BSIM4v5dNodePrime != here->BSIM4v5dNode) { here->BSIM4v5drainConductance = 0.0; if(here->BSIM4v5drainSquaresGiven) { here->BSIM4v5drainConductance = model->BSIM4v5sheetResistance * here->BSIM4v5drainSquares; } else if (here->BSIM4v5rgeoMod > 0) { BSIM4v5RdseffGeo(here->BSIM4v5nf, here->BSIM4v5geoMod, here->BSIM4v5rgeoMod, here->BSIM4v5min, pParam->BSIM4v5weffCJ, model->BSIM4v5sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4v5drainConductance)); } else { here->BSIM4v5drainConductance = 0.0; } if (here->BSIM4v5drainConductance > 0.0) here->BSIM4v5drainConductance = 1.0 / here->BSIM4v5drainConductance; else { here->BSIM4v5drainConductance = 1.0e3; /* mho */ printf ("Warning: Drain conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v5drainConductance = 0.0; } /* End of Rsd processing */ Nvtms = model->BSIM4v5vtm * model->BSIM4v5SjctEmissionCoeff; if ((here->BSIM4v5Aseff <= 0.0) && (here->BSIM4v5Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM4v5Aseff * model->BSIM4v5SjctTempSatCurDensity + here->BSIM4v5Pseff * model->BSIM4v5SjctSidewallTempSatCurDensity + pParam->BSIM4v5weffCJ * here->BSIM4v5nf * model->BSIM4v5SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent > 0.0) { switch(model->BSIM4v5dioMod) { case 0: if ((model->BSIM4v5bvs / Nvtms) > EXP_THRESHOLD) here->BSIM4v5XExpBVS = model->BSIM4v5xjbvs * MIN_EXP; else here->BSIM4v5XExpBVS = model->BSIM4v5xjbvs * exp(-model->BSIM4v5bvs / Nvtms); break; case 1: BSIM4v5DioIjthVjmEval(Nvtms, model->BSIM4v5ijthsfwd, SourceSatCurrent, 0.0, &(here->BSIM4v5vjsmFwd)); here->BSIM4v5IVjsmFwd = SourceSatCurrent * exp(here->BSIM4v5vjsmFwd / Nvtms); break; case 2: if ((model->BSIM4v5bvs / Nvtms) > EXP_THRESHOLD) { here->BSIM4v5XExpBVS = model->BSIM4v5xjbvs * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v5XExpBVS = exp(-model->BSIM4v5bvs / Nvtms); tmp = here->BSIM4v5XExpBVS; here->BSIM4v5XExpBVS *= model->BSIM4v5xjbvs; } BSIM4v5DioIjthVjmEval(Nvtms, model->BSIM4v5ijthsfwd, SourceSatCurrent, here->BSIM4v5XExpBVS, &(here->BSIM4v5vjsmFwd)); T0 = exp(here->BSIM4v5vjsmFwd / Nvtms); here->BSIM4v5IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4v5XExpBVS / T0 + here->BSIM4v5XExpBVS - 1.0); here->BSIM4v5SslpFwd = SourceSatCurrent * (T0 + here->BSIM4v5XExpBVS / T0) / Nvtms; T2 = model->BSIM4v5ijthsrev / SourceSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthsrev too small and set to 10 times IsbSat.\n"); } here->BSIM4v5vjsmRev = -model->BSIM4v5bvs - Nvtms * log((T2 - 1.0) / model->BSIM4v5xjbvs); T1 = model->BSIM4v5xjbvs * exp(-(model->BSIM4v5bvs + here->BSIM4v5vjsmRev) / Nvtms); here->BSIM4v5IVjsmRev = SourceSatCurrent * (1.0 + T1); here->BSIM4v5SslpRev = -SourceSatCurrent * T1 / Nvtms; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v5dioMod); } } Nvtmd = model->BSIM4v5vtm * model->BSIM4v5DjctEmissionCoeff; if ((here->BSIM4v5Adeff <= 0.0) && (here->BSIM4v5Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM4v5Adeff * model->BSIM4v5DjctTempSatCurDensity + here->BSIM4v5Pdeff * model->BSIM4v5DjctSidewallTempSatCurDensity + pParam->BSIM4v5weffCJ * here->BSIM4v5nf * model->BSIM4v5DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent > 0.0) { switch(model->BSIM4v5dioMod) { case 0: if ((model->BSIM4v5bvd / Nvtmd) > EXP_THRESHOLD) here->BSIM4v5XExpBVD = model->BSIM4v5xjbvd * MIN_EXP; else here->BSIM4v5XExpBVD = model->BSIM4v5xjbvd * exp(-model->BSIM4v5bvd / Nvtmd); break; case 1: BSIM4v5DioIjthVjmEval(Nvtmd, model->BSIM4v5ijthdfwd, DrainSatCurrent, 0.0, &(here->BSIM4v5vjdmFwd)); here->BSIM4v5IVjdmFwd = DrainSatCurrent * exp(here->BSIM4v5vjdmFwd / Nvtmd); break; case 2: if ((model->BSIM4v5bvd / Nvtmd) > EXP_THRESHOLD) { here->BSIM4v5XExpBVD = model->BSIM4v5xjbvd * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v5XExpBVD = exp(-model->BSIM4v5bvd / Nvtmd); tmp = here->BSIM4v5XExpBVD; here->BSIM4v5XExpBVD *= model->BSIM4v5xjbvd; } BSIM4v5DioIjthVjmEval(Nvtmd, model->BSIM4v5ijthdfwd, DrainSatCurrent, here->BSIM4v5XExpBVD, &(here->BSIM4v5vjdmFwd)); T0 = exp(here->BSIM4v5vjdmFwd / Nvtmd); here->BSIM4v5IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4v5XExpBVD / T0 + here->BSIM4v5XExpBVD - 1.0); here->BSIM4v5DslpFwd = DrainSatCurrent * (T0 + here->BSIM4v5XExpBVD / T0) / Nvtmd; T2 = model->BSIM4v5ijthdrev / DrainSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthdrev too small and set to 10 times IdbSat.\n"); } here->BSIM4v5vjdmRev = -model->BSIM4v5bvd - Nvtmd * log((T2 - 1.0) / model->BSIM4v5xjbvd); /* bugfix */ T1 = model->BSIM4v5xjbvd * exp(-(model->BSIM4v5bvd + here->BSIM4v5vjdmRev) / Nvtmd); here->BSIM4v5IVjdmRev = DrainSatCurrent * (1.0 + T1); here->BSIM4v5DslpRev = -DrainSatCurrent * T1 / Nvtmd; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v5dioMod); } } /* GEDL current reverse bias */ T0 = (TRatio - 1.0); model->BSIM4v5njtstemp = model->BSIM4v5njts * (1.0 + model->BSIM4v5tnjts * T0); model->BSIM4v5njtsswtemp = model->BSIM4v5njtssw * (1.0 + model->BSIM4v5tnjtssw * T0); model->BSIM4v5njtsswgtemp = model->BSIM4v5njtsswg * (1.0 + model->BSIM4v5tnjtsswg * T0); T7 = Eg0 / model->BSIM4v5vtm * T0; T9 = model->BSIM4v5xtss * T7; DEXP(T9, T1); T9 = model->BSIM4v5xtsd * T7; DEXP(T9, T2); T9 = model->BSIM4v5xtssws * T7; DEXP(T9, T3); T9 = model->BSIM4v5xtsswd * T7; DEXP(T9, T4); T9 = model->BSIM4v5xtsswgs * T7; DEXP(T9, T5); T9 = model->BSIM4v5xtsswgd * T7; DEXP(T9, T6); T10 = pParam->BSIM4v5weffCJ * here->BSIM4v5nf; here->BSIM4v5SjctTempRevSatCur = T1 * here->BSIM4v5Aseff * model->BSIM4v5jtss; here->BSIM4v5DjctTempRevSatCur = T2 * here->BSIM4v5Adeff * model->BSIM4v5jtsd; here->BSIM4v5SswTempRevSatCur = T3 * here->BSIM4v5Pseff * model->BSIM4v5jtssws; here->BSIM4v5DswTempRevSatCur = T4 * here->BSIM4v5Pdeff * model->BSIM4v5jtsswd; here->BSIM4v5SswgTempRevSatCur = T5 * T10 * model->BSIM4v5jtsswgs; here->BSIM4v5DswgTempRevSatCur = T6 * T10 * model->BSIM4v5jtsswgd; if (BSIM4v5checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM4v5modName; namarray[1] = here->BSIM4v5name; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM4v5.5.0 parameter checking for %s in model %s", namarray); return(E_BADPARM); } } /* End instance */ } return(OK); } ngspice-26/src/spicelib/devices/bsim4v5/B4TERMS_OF_USE0000644000265600020320000000255212264261473021634 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. Chenming Hu, and Jane Xuemei Xi April. 2003 ngspice-26/src/spicelib/devices/bsim4v5/bsim4v5def.h0000644000265600020320000031423412264261473021655 0ustar andreasadmin/********** Copyright 2005 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Modified by Xuemei Xi, 11/15/2002. Modified by Xuemei Xi, 05/09/2003. Modified by Xuemei Xi, 03/04/2004. Modified by Xuemei Xi, Mohan Dunga, 09/24/2004. Modified by Xuemei Xi, 07/29/2005. File: bsim4v5def.h **********/ #ifndef BSIM4V5 #define BSIM4V5 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM4v5instance { struct sBSIM4v5model *BSIM4v5modPtr; struct sBSIM4v5instance *BSIM4v5nextInstance; IFuid BSIM4v5name; int BSIM4v5states; /* index into state table for this device */ int BSIM4v5dNode; int BSIM4v5gNodeExt; int BSIM4v5sNode; int BSIM4v5bNode; int BSIM4v5dNodePrime; int BSIM4v5gNodePrime; int BSIM4v5gNodeMid; int BSIM4v5sNodePrime; int BSIM4v5bNodePrime; int BSIM4v5dbNode; int BSIM4v5sbNode; int BSIM4v5qNode; double BSIM4v5ueff; double BSIM4v5thetavth; double BSIM4v5von; double BSIM4v5vdsat; double BSIM4v5cgdo; double BSIM4v5qgdo; double BSIM4v5cgso; double BSIM4v5qgso; double BSIM4v5grbsb; double BSIM4v5grbdb; double BSIM4v5grbpb; double BSIM4v5grbps; double BSIM4v5grbpd; double BSIM4v5vjsmFwd; double BSIM4v5vjsmRev; double BSIM4v5vjdmFwd; double BSIM4v5vjdmRev; double BSIM4v5XExpBVS; double BSIM4v5XExpBVD; double BSIM4v5SslpFwd; double BSIM4v5SslpRev; double BSIM4v5DslpFwd; double BSIM4v5DslpRev; double BSIM4v5IVjsmFwd; double BSIM4v5IVjsmRev; double BSIM4v5IVjdmFwd; double BSIM4v5IVjdmRev; double BSIM4v5grgeltd; double BSIM4v5Pseff; double BSIM4v5Pdeff; double BSIM4v5Aseff; double BSIM4v5Adeff; double BSIM4v5l; double BSIM4v5w; double BSIM4v5drainArea; double BSIM4v5sourceArea; double BSIM4v5drainSquares; double BSIM4v5sourceSquares; double BSIM4v5drainPerimeter; double BSIM4v5sourcePerimeter; double BSIM4v5sourceConductance; double BSIM4v5drainConductance; /* stress effect instance param */ double BSIM4v5sa; double BSIM4v5sb; double BSIM4v5sd; double BSIM4v5sca; double BSIM4v5scb; double BSIM4v5scc; double BSIM4v5sc; double BSIM4v5rbdb; double BSIM4v5rbsb; double BSIM4v5rbpb; double BSIM4v5rbps; double BSIM4v5rbpd; double BSIM4v5delvto; double BSIM4v5xgw; double BSIM4v5ngcon; /* added here to account stress effect instance dependence */ double BSIM4v5u0temp; double BSIM4v5vsattemp; double BSIM4v5vth0; double BSIM4v5vfb; double BSIM4v5vfbzb; double BSIM4v5vtfbphi1; double BSIM4v5vtfbphi2; double BSIM4v5k2; double BSIM4v5vbsc; double BSIM4v5k2ox; double BSIM4v5eta0; double BSIM4v5icVDS; double BSIM4v5icVGS; double BSIM4v5icVBS; double BSIM4v5nf; double BSIM4v5m; int BSIM4v5off; int BSIM4v5mode; int BSIM4v5trnqsMod; int BSIM4v5acnqsMod; int BSIM4v5rbodyMod; int BSIM4v5rgateMod; int BSIM4v5geoMod; int BSIM4v5rgeoMod; int BSIM4v5min; /* OP point */ double BSIM4v5Vgsteff; double BSIM4v5vgs_eff; double BSIM4v5vgd_eff; double BSIM4v5dvgs_eff_dvg; double BSIM4v5dvgd_eff_dvg; double BSIM4v5Vdseff; double BSIM4v5nstar; double BSIM4v5Abulk; double BSIM4v5EsatL; double BSIM4v5AbovVgst2Vtm; double BSIM4v5qinv; double BSIM4v5cd; double BSIM4v5cbs; double BSIM4v5cbd; double BSIM4v5csub; double BSIM4v5Igidl; double BSIM4v5Igisl; double BSIM4v5gm; double BSIM4v5gds; double BSIM4v5gmbs; double BSIM4v5gbd; double BSIM4v5gbs; double BSIM4v5gbbs; double BSIM4v5gbgs; double BSIM4v5gbds; double BSIM4v5ggidld; double BSIM4v5ggidlg; double BSIM4v5ggidls; double BSIM4v5ggidlb; double BSIM4v5ggisld; double BSIM4v5ggislg; double BSIM4v5ggisls; double BSIM4v5ggislb; double BSIM4v5Igcs; double BSIM4v5gIgcsg; double BSIM4v5gIgcsd; double BSIM4v5gIgcss; double BSIM4v5gIgcsb; double BSIM4v5Igcd; double BSIM4v5gIgcdg; double BSIM4v5gIgcdd; double BSIM4v5gIgcds; double BSIM4v5gIgcdb; double BSIM4v5Igs; double BSIM4v5gIgsg; double BSIM4v5gIgss; double BSIM4v5Igd; double BSIM4v5gIgdg; double BSIM4v5gIgdd; double BSIM4v5Igb; double BSIM4v5gIgbg; double BSIM4v5gIgbd; double BSIM4v5gIgbs; double BSIM4v5gIgbb; double BSIM4v5grdsw; double BSIM4v5IdovVds; double BSIM4v5gcrg; double BSIM4v5gcrgd; double BSIM4v5gcrgg; double BSIM4v5gcrgs; double BSIM4v5gcrgb; double BSIM4v5gstot; double BSIM4v5gstotd; double BSIM4v5gstotg; double BSIM4v5gstots; double BSIM4v5gstotb; double BSIM4v5gdtot; double BSIM4v5gdtotd; double BSIM4v5gdtotg; double BSIM4v5gdtots; double BSIM4v5gdtotb; double BSIM4v5cggb; double BSIM4v5cgdb; double BSIM4v5cgsb; double BSIM4v5cbgb; double BSIM4v5cbdb; double BSIM4v5cbsb; double BSIM4v5cdgb; double BSIM4v5cddb; double BSIM4v5cdsb; double BSIM4v5csgb; double BSIM4v5csdb; double BSIM4v5cssb; double BSIM4v5cgbb; double BSIM4v5cdbb; double BSIM4v5csbb; double BSIM4v5cbbb; double BSIM4v5capbd; double BSIM4v5capbs; double BSIM4v5cqgb; double BSIM4v5cqdb; double BSIM4v5cqsb; double BSIM4v5cqbb; double BSIM4v5qgate; double BSIM4v5qbulk; double BSIM4v5qdrn; double BSIM4v5qsrc; double BSIM4v5qdef; double BSIM4v5qchqs; double BSIM4v5taunet; double BSIM4v5gtau; double BSIM4v5gtg; double BSIM4v5gtd; double BSIM4v5gts; double BSIM4v5gtb; double BSIM4v5SjctTempRevSatCur; double BSIM4v5DjctTempRevSatCur; double BSIM4v5SswTempRevSatCur; double BSIM4v5DswTempRevSatCur; double BSIM4v5SswgTempRevSatCur; double BSIM4v5DswgTempRevSatCur; struct bsim4v5SizeDependParam *pParam; unsigned BSIM4v5lGiven :1; unsigned BSIM4v5wGiven :1; unsigned BSIM4v5mGiven :1; unsigned BSIM4v5nfGiven :1; unsigned BSIM4v5minGiven :1; unsigned BSIM4v5drainAreaGiven :1; unsigned BSIM4v5sourceAreaGiven :1; unsigned BSIM4v5drainSquaresGiven :1; unsigned BSIM4v5sourceSquaresGiven :1; unsigned BSIM4v5drainPerimeterGiven :1; unsigned BSIM4v5sourcePerimeterGiven :1; unsigned BSIM4v5saGiven :1; unsigned BSIM4v5sbGiven :1; unsigned BSIM4v5sdGiven :1; unsigned BSIM4v5scaGiven :1; unsigned BSIM4v5scbGiven :1; unsigned BSIM4v5sccGiven :1; unsigned BSIM4v5scGiven :1; unsigned BSIM4v5rbdbGiven :1; unsigned BSIM4v5rbsbGiven :1; unsigned BSIM4v5rbpbGiven :1; unsigned BSIM4v5rbpdGiven :1; unsigned BSIM4v5rbpsGiven :1; unsigned BSIM4v5delvtoGiven :1; unsigned BSIM4v5xgwGiven :1; unsigned BSIM4v5ngconGiven :1; unsigned BSIM4v5icVDSGiven :1; unsigned BSIM4v5icVGSGiven :1; unsigned BSIM4v5icVBSGiven :1; unsigned BSIM4v5trnqsModGiven :1; unsigned BSIM4v5acnqsModGiven :1; unsigned BSIM4v5rbodyModGiven :1; unsigned BSIM4v5rgateModGiven :1; unsigned BSIM4v5geoModGiven :1; unsigned BSIM4v5rgeoModGiven :1; double *BSIM4v5DPdPtr; double *BSIM4v5DPdpPtr; double *BSIM4v5DPgpPtr; double *BSIM4v5DPgmPtr; double *BSIM4v5DPspPtr; double *BSIM4v5DPbpPtr; double *BSIM4v5DPdbPtr; double *BSIM4v5DdPtr; double *BSIM4v5DdpPtr; double *BSIM4v5GPdpPtr; double *BSIM4v5GPgpPtr; double *BSIM4v5GPgmPtr; double *BSIM4v5GPgePtr; double *BSIM4v5GPspPtr; double *BSIM4v5GPbpPtr; double *BSIM4v5GMdpPtr; double *BSIM4v5GMgpPtr; double *BSIM4v5GMgmPtr; double *BSIM4v5GMgePtr; double *BSIM4v5GMspPtr; double *BSIM4v5GMbpPtr; double *BSIM4v5GEdpPtr; double *BSIM4v5GEgpPtr; double *BSIM4v5GEgmPtr; double *BSIM4v5GEgePtr; double *BSIM4v5GEspPtr; double *BSIM4v5GEbpPtr; double *BSIM4v5SPdpPtr; double *BSIM4v5SPgpPtr; double *BSIM4v5SPgmPtr; double *BSIM4v5SPsPtr; double *BSIM4v5SPspPtr; double *BSIM4v5SPbpPtr; double *BSIM4v5SPsbPtr; double *BSIM4v5SspPtr; double *BSIM4v5SsPtr; double *BSIM4v5BPdpPtr; double *BSIM4v5BPgpPtr; double *BSIM4v5BPgmPtr; double *BSIM4v5BPspPtr; double *BSIM4v5BPdbPtr; double *BSIM4v5BPbPtr; double *BSIM4v5BPsbPtr; double *BSIM4v5BPbpPtr; double *BSIM4v5DBdpPtr; double *BSIM4v5DBdbPtr; double *BSIM4v5DBbpPtr; double *BSIM4v5DBbPtr; double *BSIM4v5SBspPtr; double *BSIM4v5SBbpPtr; double *BSIM4v5SBbPtr; double *BSIM4v5SBsbPtr; double *BSIM4v5BdbPtr; double *BSIM4v5BbpPtr; double *BSIM4v5BsbPtr; double *BSIM4v5BbPtr; double *BSIM4v5DgpPtr; double *BSIM4v5DspPtr; double *BSIM4v5DbpPtr; double *BSIM4v5SdpPtr; double *BSIM4v5SgpPtr; double *BSIM4v5SbpPtr; double *BSIM4v5QdpPtr; double *BSIM4v5QgpPtr; double *BSIM4v5QspPtr; double *BSIM4v5QbpPtr; double *BSIM4v5QqPtr; double *BSIM4v5DPqPtr; double *BSIM4v5GPqPtr; double *BSIM4v5SPqPtr; #define BSIM4v5vbd BSIM4v5states+ 0 #define BSIM4v5vbs BSIM4v5states+ 1 #define BSIM4v5vgs BSIM4v5states+ 2 #define BSIM4v5vds BSIM4v5states+ 3 #define BSIM4v5vdbs BSIM4v5states+ 4 #define BSIM4v5vdbd BSIM4v5states+ 5 #define BSIM4v5vsbs BSIM4v5states+ 6 #define BSIM4v5vges BSIM4v5states+ 7 #define BSIM4v5vgms BSIM4v5states+ 8 #define BSIM4v5vses BSIM4v5states+ 9 #define BSIM4v5vdes BSIM4v5states+ 10 #define BSIM4v5qb BSIM4v5states+ 11 #define BSIM4v5cqb BSIM4v5states+ 12 #define BSIM4v5qg BSIM4v5states+ 13 #define BSIM4v5cqg BSIM4v5states+ 14 #define BSIM4v5qd BSIM4v5states+ 15 #define BSIM4v5cqd BSIM4v5states+ 16 #define BSIM4v5qgmid BSIM4v5states+ 17 #define BSIM4v5cqgmid BSIM4v5states+ 18 #define BSIM4v5qbs BSIM4v5states+ 19 #define BSIM4v5cqbs BSIM4v5states+ 20 #define BSIM4v5qbd BSIM4v5states+ 21 #define BSIM4v5cqbd BSIM4v5states+ 22 #define BSIM4v5qcheq BSIM4v5states+ 23 #define BSIM4v5cqcheq BSIM4v5states+ 24 #define BSIM4v5qcdump BSIM4v5states+ 25 #define BSIM4v5cqcdump BSIM4v5states+ 26 #define BSIM4v5qdef BSIM4v5states+ 27 #define BSIM4v5qs BSIM4v5states+ 28 #define BSIM4v5numStates 29 /* indices to the array of BSIM4v5 NOISE SOURCES */ #define BSIM4v5RDNOIZ 0 #define BSIM4v5RSNOIZ 1 #define BSIM4v5RGNOIZ 2 #define BSIM4v5RBPSNOIZ 3 #define BSIM4v5RBPDNOIZ 4 #define BSIM4v5RBPBNOIZ 5 #define BSIM4v5RBSBNOIZ 6 #define BSIM4v5RBDBNOIZ 7 #define BSIM4v5IDNOIZ 8 #define BSIM4v5FLNOIZ 9 #define BSIM4v5IGSNOIZ 10 #define BSIM4v5IGDNOIZ 11 #define BSIM4v5IGBNOIZ 12 #define BSIM4v5TOTNOIZ 13 #define BSIM4v5NSRCS 14 /* Number of BSIM4v5 noise sources */ #ifndef NONOISE double BSIM4v5nVar[NSTATVARS][BSIM4v5NSRCS]; #else /* NONOISE */ double **BSIM4v5nVar; #endif /* NONOISE */ } BSIM4v5instance ; struct bsim4v5SizeDependParam { double Width; double Length; double NFinger; double BSIM4v5cdsc; double BSIM4v5cdscb; double BSIM4v5cdscd; double BSIM4v5cit; double BSIM4v5nfactor; double BSIM4v5xj; double BSIM4v5vsat; double BSIM4v5at; double BSIM4v5a0; double BSIM4v5ags; double BSIM4v5a1; double BSIM4v5a2; double BSIM4v5keta; double BSIM4v5nsub; double BSIM4v5ndep; double BSIM4v5nsd; double BSIM4v5phin; double BSIM4v5ngate; double BSIM4v5gamma1; double BSIM4v5gamma2; double BSIM4v5vbx; double BSIM4v5vbi; double BSIM4v5vbm; double BSIM4v5xt; double BSIM4v5phi; double BSIM4v5litl; double BSIM4v5k1; double BSIM4v5kt1; double BSIM4v5kt1l; double BSIM4v5kt2; double BSIM4v5k2; double BSIM4v5k3; double BSIM4v5k3b; double BSIM4v5w0; double BSIM4v5dvtp0; double BSIM4v5dvtp1; double BSIM4v5lpe0; double BSIM4v5lpeb; double BSIM4v5dvt0; double BSIM4v5dvt1; double BSIM4v5dvt2; double BSIM4v5dvt0w; double BSIM4v5dvt1w; double BSIM4v5dvt2w; double BSIM4v5drout; double BSIM4v5dsub; double BSIM4v5vth0; double BSIM4v5ua; double BSIM4v5ua1; double BSIM4v5ub; double BSIM4v5ub1; double BSIM4v5uc; double BSIM4v5uc1; double BSIM4v5ud; double BSIM4v5ud1; double BSIM4v5up; double BSIM4v5lp; double BSIM4v5u0; double BSIM4v5eu; double BSIM4v5ute; double BSIM4v5voff; double BSIM4v5tvoff; double BSIM4v5minv; double BSIM4v5vfb; double BSIM4v5delta; double BSIM4v5rdsw; double BSIM4v5rds0; double BSIM4v5rs0; double BSIM4v5rd0; double BSIM4v5rsw; double BSIM4v5rdw; double BSIM4v5prwg; double BSIM4v5prwb; double BSIM4v5prt; double BSIM4v5eta0; double BSIM4v5etab; double BSIM4v5pclm; double BSIM4v5pdibl1; double BSIM4v5pdibl2; double BSIM4v5pdiblb; double BSIM4v5fprout; double BSIM4v5pdits; double BSIM4v5pditsd; double BSIM4v5pscbe1; double BSIM4v5pscbe2; double BSIM4v5pvag; double BSIM4v5wr; double BSIM4v5dwg; double BSIM4v5dwb; double BSIM4v5b0; double BSIM4v5b1; double BSIM4v5alpha0; double BSIM4v5alpha1; double BSIM4v5beta0; double BSIM4v5agidl; double BSIM4v5bgidl; double BSIM4v5cgidl; double BSIM4v5egidl; double BSIM4v5aigc; double BSIM4v5bigc; double BSIM4v5cigc; double BSIM4v5aigsd; double BSIM4v5bigsd; double BSIM4v5cigsd; double BSIM4v5aigbacc; double BSIM4v5bigbacc; double BSIM4v5cigbacc; double BSIM4v5aigbinv; double BSIM4v5bigbinv; double BSIM4v5cigbinv; double BSIM4v5nigc; double BSIM4v5nigbacc; double BSIM4v5nigbinv; double BSIM4v5ntox; double BSIM4v5eigbinv; double BSIM4v5pigcd; double BSIM4v5poxedge; double BSIM4v5xrcrg1; double BSIM4v5xrcrg2; double BSIM4v5lambda; /* overshoot */ double BSIM4v5vtl; /* thermal velocity limit */ double BSIM4v5xn; /* back scattering parameter */ double BSIM4v5lc; /* back scattering parameter */ double BSIM4v5tfactor; /* ballistic transportation factor */ double BSIM4v5vfbsdoff; /* S/D flatband offset voltage */ double BSIM4v5tvfbsdoff; /* added for stress effect */ double BSIM4v5ku0; double BSIM4v5kvth0; double BSIM4v5ku0temp; double BSIM4v5rho_ref; double BSIM4v5inv_od_ref; /* added for well proximity effect */ double BSIM4v5kvth0we; double BSIM4v5k2we; double BSIM4v5ku0we; /* CV model */ double BSIM4v5cgsl; double BSIM4v5cgdl; double BSIM4v5ckappas; double BSIM4v5ckappad; double BSIM4v5cf; double BSIM4v5clc; double BSIM4v5cle; double BSIM4v5vfbcv; double BSIM4v5noff; double BSIM4v5voffcv; double BSIM4v5acde; double BSIM4v5moin; /* Pre-calculated constants */ double BSIM4v5dw; double BSIM4v5dl; double BSIM4v5leff; double BSIM4v5weff; double BSIM4v5dwc; double BSIM4v5dlc; double BSIM4v5dlcig; double BSIM4v5dwj; double BSIM4v5leffCV; double BSIM4v5weffCV; double BSIM4v5weffCJ; double BSIM4v5abulkCVfactor; double BSIM4v5cgso; double BSIM4v5cgdo; double BSIM4v5cgbo; double BSIM4v5u0temp; double BSIM4v5vsattemp; double BSIM4v5sqrtPhi; double BSIM4v5phis3; double BSIM4v5Xdep0; double BSIM4v5sqrtXdep0; double BSIM4v5theta0vb0; double BSIM4v5thetaRout; double BSIM4v5mstar; double BSIM4v5voffcbn; double BSIM4v5rdswmin; double BSIM4v5rdwmin; double BSIM4v5rswmin; double BSIM4v5vfbsd; double BSIM4v5cof1; double BSIM4v5cof2; double BSIM4v5cof3; double BSIM4v5cof4; double BSIM4v5cdep0; double BSIM4v5ToxRatio; double BSIM4v5Aechvb; double BSIM4v5Bechvb; double BSIM4v5ToxRatioEdge; double BSIM4v5AechvbEdge; double BSIM4v5BechvbEdge; double BSIM4v5ldeb; double BSIM4v5k1ox; double BSIM4v5k2ox; double BSIM4v5vfbzbfactor; struct bsim4v5SizeDependParam *pNext; }; typedef struct sBSIM4v5model { int BSIM4v5modType; struct sBSIM4v5model *BSIM4v5nextModel; BSIM4v5instance *BSIM4v5instances; IFuid BSIM4v5modName; int BSIM4v5type; int BSIM4v5mobMod; int BSIM4v5capMod; int BSIM4v5dioMod; int BSIM4v5trnqsMod; int BSIM4v5acnqsMod; int BSIM4v5fnoiMod; int BSIM4v5tnoiMod; int BSIM4v5rdsMod; int BSIM4v5rbodyMod; int BSIM4v5rgateMod; int BSIM4v5perMod; int BSIM4v5geoMod; int BSIM4v5rgeoMod; int BSIM4v5igcMod; int BSIM4v5igbMod; int BSIM4v5tempMod; int BSIM4v5binUnit; int BSIM4v5paramChk; char *BSIM4v5version; double BSIM4v5toxe; double BSIM4v5toxp; double BSIM4v5toxm; double BSIM4v5dtox; double BSIM4v5epsrox; double BSIM4v5cdsc; double BSIM4v5cdscb; double BSIM4v5cdscd; double BSIM4v5cit; double BSIM4v5nfactor; double BSIM4v5xj; double BSIM4v5vsat; double BSIM4v5at; double BSIM4v5a0; double BSIM4v5ags; double BSIM4v5a1; double BSIM4v5a2; double BSIM4v5keta; double BSIM4v5nsub; double BSIM4v5ndep; double BSIM4v5nsd; double BSIM4v5phin; double BSIM4v5ngate; double BSIM4v5gamma1; double BSIM4v5gamma2; double BSIM4v5vbx; double BSIM4v5vbm; double BSIM4v5xt; double BSIM4v5k1; double BSIM4v5kt1; double BSIM4v5kt1l; double BSIM4v5kt2; double BSIM4v5k2; double BSIM4v5k3; double BSIM4v5k3b; double BSIM4v5w0; double BSIM4v5dvtp0; double BSIM4v5dvtp1; double BSIM4v5lpe0; double BSIM4v5lpeb; double BSIM4v5dvt0; double BSIM4v5dvt1; double BSIM4v5dvt2; double BSIM4v5dvt0w; double BSIM4v5dvt1w; double BSIM4v5dvt2w; double BSIM4v5drout; double BSIM4v5dsub; double BSIM4v5vth0; double BSIM4v5eu; double BSIM4v5ua; double BSIM4v5ua1; double BSIM4v5ub; double BSIM4v5ub1; double BSIM4v5uc; double BSIM4v5uc1; double BSIM4v5ud; double BSIM4v5ud1; double BSIM4v5up; double BSIM4v5lp; double BSIM4v5u0; double BSIM4v5ute; double BSIM4v5voff; double BSIM4v5tvoff; double BSIM4v5minv; double BSIM4v5voffl; double BSIM4v5delta; double BSIM4v5rdsw; double BSIM4v5rdswmin; double BSIM4v5rdwmin; double BSIM4v5rswmin; double BSIM4v5rsw; double BSIM4v5rdw; double BSIM4v5prwg; double BSIM4v5prwb; double BSIM4v5prt; double BSIM4v5eta0; double BSIM4v5etab; double BSIM4v5pclm; double BSIM4v5pdibl1; double BSIM4v5pdibl2; double BSIM4v5pdiblb; double BSIM4v5fprout; double BSIM4v5pdits; double BSIM4v5pditsd; double BSIM4v5pditsl; double BSIM4v5pscbe1; double BSIM4v5pscbe2; double BSIM4v5pvag; double BSIM4v5wr; double BSIM4v5dwg; double BSIM4v5dwb; double BSIM4v5b0; double BSIM4v5b1; double BSIM4v5alpha0; double BSIM4v5alpha1; double BSIM4v5beta0; double BSIM4v5agidl; double BSIM4v5bgidl; double BSIM4v5cgidl; double BSIM4v5egidl; double BSIM4v5aigc; double BSIM4v5bigc; double BSIM4v5cigc; double BSIM4v5aigsd; double BSIM4v5bigsd; double BSIM4v5cigsd; double BSIM4v5aigbacc; double BSIM4v5bigbacc; double BSIM4v5cigbacc; double BSIM4v5aigbinv; double BSIM4v5bigbinv; double BSIM4v5cigbinv; double BSIM4v5nigc; double BSIM4v5nigbacc; double BSIM4v5nigbinv; double BSIM4v5ntox; double BSIM4v5eigbinv; double BSIM4v5pigcd; double BSIM4v5poxedge; double BSIM4v5toxref; double BSIM4v5ijthdfwd; double BSIM4v5ijthsfwd; double BSIM4v5ijthdrev; double BSIM4v5ijthsrev; double BSIM4v5xjbvd; double BSIM4v5xjbvs; double BSIM4v5bvd; double BSIM4v5bvs; double BSIM4v5jtss; double BSIM4v5jtsd; double BSIM4v5jtssws; double BSIM4v5jtsswd; double BSIM4v5jtsswgs; double BSIM4v5jtsswgd; double BSIM4v5njts; double BSIM4v5njtssw; double BSIM4v5njtsswg; double BSIM4v5xtss; double BSIM4v5xtsd; double BSIM4v5xtssws; double BSIM4v5xtsswd; double BSIM4v5xtsswgs; double BSIM4v5xtsswgd; double BSIM4v5tnjts; double BSIM4v5tnjtssw; double BSIM4v5tnjtsswg; double BSIM4v5vtss; double BSIM4v5vtsd; double BSIM4v5vtssws; double BSIM4v5vtsswd; double BSIM4v5vtsswgs; double BSIM4v5vtsswgd; double BSIM4v5xrcrg1; double BSIM4v5xrcrg2; double BSIM4v5lambda; double BSIM4v5vtl; double BSIM4v5lc; double BSIM4v5xn; double BSIM4v5vfbsdoff; /* S/D flatband offset voltage */ double BSIM4v5lintnoi; /* lint offset for noise calculation */ double BSIM4v5tvfbsdoff; double BSIM4v5vfb; double BSIM4v5gbmin; double BSIM4v5rbdb; double BSIM4v5rbsb; double BSIM4v5rbpb; double BSIM4v5rbps; double BSIM4v5rbpd; double BSIM4v5rbps0; double BSIM4v5rbpsl; double BSIM4v5rbpsw; double BSIM4v5rbpsnf; double BSIM4v5rbpd0; double BSIM4v5rbpdl; double BSIM4v5rbpdw; double BSIM4v5rbpdnf; double BSIM4v5rbpbx0; double BSIM4v5rbpbxl; double BSIM4v5rbpbxw; double BSIM4v5rbpbxnf; double BSIM4v5rbpby0; double BSIM4v5rbpbyl; double BSIM4v5rbpbyw; double BSIM4v5rbpbynf; double BSIM4v5rbsbx0; double BSIM4v5rbsby0; double BSIM4v5rbdbx0; double BSIM4v5rbdby0; double BSIM4v5rbsdbxl; double BSIM4v5rbsdbxw; double BSIM4v5rbsdbxnf; double BSIM4v5rbsdbyl; double BSIM4v5rbsdbyw; double BSIM4v5rbsdbynf; double BSIM4v5tnoia; double BSIM4v5tnoib; double BSIM4v5rnoia; double BSIM4v5rnoib; double BSIM4v5ntnoi; /* CV model and Parasitics */ double BSIM4v5cgsl; double BSIM4v5cgdl; double BSIM4v5ckappas; double BSIM4v5ckappad; double BSIM4v5cf; double BSIM4v5vfbcv; double BSIM4v5clc; double BSIM4v5cle; double BSIM4v5dwc; double BSIM4v5dlc; double BSIM4v5xw; double BSIM4v5xl; double BSIM4v5dlcig; double BSIM4v5dwj; double BSIM4v5noff; double BSIM4v5voffcv; double BSIM4v5acde; double BSIM4v5moin; double BSIM4v5tcj; double BSIM4v5tcjsw; double BSIM4v5tcjswg; double BSIM4v5tpb; double BSIM4v5tpbsw; double BSIM4v5tpbswg; double BSIM4v5dmcg; double BSIM4v5dmci; double BSIM4v5dmdg; double BSIM4v5dmcgt; double BSIM4v5xgw; double BSIM4v5xgl; double BSIM4v5rshg; double BSIM4v5ngcon; /* Length Dependence */ double BSIM4v5lcdsc; double BSIM4v5lcdscb; double BSIM4v5lcdscd; double BSIM4v5lcit; double BSIM4v5lnfactor; double BSIM4v5lxj; double BSIM4v5lvsat; double BSIM4v5lat; double BSIM4v5la0; double BSIM4v5lags; double BSIM4v5la1; double BSIM4v5la2; double BSIM4v5lketa; double BSIM4v5lnsub; double BSIM4v5lndep; double BSIM4v5lnsd; double BSIM4v5lphin; double BSIM4v5lngate; double BSIM4v5lgamma1; double BSIM4v5lgamma2; double BSIM4v5lvbx; double BSIM4v5lvbm; double BSIM4v5lxt; double BSIM4v5lk1; double BSIM4v5lkt1; double BSIM4v5lkt1l; double BSIM4v5lkt2; double BSIM4v5lk2; double BSIM4v5lk3; double BSIM4v5lk3b; double BSIM4v5lw0; double BSIM4v5ldvtp0; double BSIM4v5ldvtp1; double BSIM4v5llpe0; double BSIM4v5llpeb; double BSIM4v5ldvt0; double BSIM4v5ldvt1; double BSIM4v5ldvt2; double BSIM4v5ldvt0w; double BSIM4v5ldvt1w; double BSIM4v5ldvt2w; double BSIM4v5ldrout; double BSIM4v5ldsub; double BSIM4v5lvth0; double BSIM4v5lua; double BSIM4v5lua1; double BSIM4v5lub; double BSIM4v5lub1; double BSIM4v5luc; double BSIM4v5luc1; double BSIM4v5lud; double BSIM4v5lud1; double BSIM4v5lup; double BSIM4v5llp; double BSIM4v5lu0; double BSIM4v5leu; double BSIM4v5lute; double BSIM4v5lvoff; double BSIM4v5ltvoff; double BSIM4v5lminv; double BSIM4v5ldelta; double BSIM4v5lrdsw; double BSIM4v5lrsw; double BSIM4v5lrdw; double BSIM4v5lprwg; double BSIM4v5lprwb; double BSIM4v5lprt; double BSIM4v5leta0; double BSIM4v5letab; double BSIM4v5lpclm; double BSIM4v5lpdibl1; double BSIM4v5lpdibl2; double BSIM4v5lpdiblb; double BSIM4v5lfprout; double BSIM4v5lpdits; double BSIM4v5lpditsd; double BSIM4v5lpscbe1; double BSIM4v5lpscbe2; double BSIM4v5lpvag; double BSIM4v5lwr; double BSIM4v5ldwg; double BSIM4v5ldwb; double BSIM4v5lb0; double BSIM4v5lb1; double BSIM4v5lalpha0; double BSIM4v5lalpha1; double BSIM4v5lbeta0; double BSIM4v5lvfb; double BSIM4v5lagidl; double BSIM4v5lbgidl; double BSIM4v5lcgidl; double BSIM4v5legidl; double BSIM4v5laigc; double BSIM4v5lbigc; double BSIM4v5lcigc; double BSIM4v5laigsd; double BSIM4v5lbigsd; double BSIM4v5lcigsd; double BSIM4v5laigbacc; double BSIM4v5lbigbacc; double BSIM4v5lcigbacc; double BSIM4v5laigbinv; double BSIM4v5lbigbinv; double BSIM4v5lcigbinv; double BSIM4v5lnigc; double BSIM4v5lnigbacc; double BSIM4v5lnigbinv; double BSIM4v5lntox; double BSIM4v5leigbinv; double BSIM4v5lpigcd; double BSIM4v5lpoxedge; double BSIM4v5lxrcrg1; double BSIM4v5lxrcrg2; double BSIM4v5llambda; double BSIM4v5lvtl; double BSIM4v5lxn; double BSIM4v5lvfbsdoff; double BSIM4v5ltvfbsdoff; /* CV model */ double BSIM4v5lcgsl; double BSIM4v5lcgdl; double BSIM4v5lckappas; double BSIM4v5lckappad; double BSIM4v5lcf; double BSIM4v5lclc; double BSIM4v5lcle; double BSIM4v5lvfbcv; double BSIM4v5lnoff; double BSIM4v5lvoffcv; double BSIM4v5lacde; double BSIM4v5lmoin; /* Width Dependence */ double BSIM4v5wcdsc; double BSIM4v5wcdscb; double BSIM4v5wcdscd; double BSIM4v5wcit; double BSIM4v5wnfactor; double BSIM4v5wxj; double BSIM4v5wvsat; double BSIM4v5wat; double BSIM4v5wa0; double BSIM4v5wags; double BSIM4v5wa1; double BSIM4v5wa2; double BSIM4v5wketa; double BSIM4v5wnsub; double BSIM4v5wndep; double BSIM4v5wnsd; double BSIM4v5wphin; double BSIM4v5wngate; double BSIM4v5wgamma1; double BSIM4v5wgamma2; double BSIM4v5wvbx; double BSIM4v5wvbm; double BSIM4v5wxt; double BSIM4v5wk1; double BSIM4v5wkt1; double BSIM4v5wkt1l; double BSIM4v5wkt2; double BSIM4v5wk2; double BSIM4v5wk3; double BSIM4v5wk3b; double BSIM4v5ww0; double BSIM4v5wdvtp0; double BSIM4v5wdvtp1; double BSIM4v5wlpe0; double BSIM4v5wlpeb; double BSIM4v5wdvt0; double BSIM4v5wdvt1; double BSIM4v5wdvt2; double BSIM4v5wdvt0w; double BSIM4v5wdvt1w; double BSIM4v5wdvt2w; double BSIM4v5wdrout; double BSIM4v5wdsub; double BSIM4v5wvth0; double BSIM4v5wua; double BSIM4v5wua1; double BSIM4v5wub; double BSIM4v5wub1; double BSIM4v5wuc; double BSIM4v5wuc1; double BSIM4v5wud; double BSIM4v5wud1; double BSIM4v5wup; double BSIM4v5wlp; double BSIM4v5wu0; double BSIM4v5weu; double BSIM4v5wute; double BSIM4v5wvoff; double BSIM4v5wtvoff; double BSIM4v5wminv; double BSIM4v5wdelta; double BSIM4v5wrdsw; double BSIM4v5wrsw; double BSIM4v5wrdw; double BSIM4v5wprwg; double BSIM4v5wprwb; double BSIM4v5wprt; double BSIM4v5weta0; double BSIM4v5wetab; double BSIM4v5wpclm; double BSIM4v5wpdibl1; double BSIM4v5wpdibl2; double BSIM4v5wpdiblb; double BSIM4v5wfprout; double BSIM4v5wpdits; double BSIM4v5wpditsd; double BSIM4v5wpscbe1; double BSIM4v5wpscbe2; double BSIM4v5wpvag; double BSIM4v5wwr; double BSIM4v5wdwg; double BSIM4v5wdwb; double BSIM4v5wb0; double BSIM4v5wb1; double BSIM4v5walpha0; double BSIM4v5walpha1; double BSIM4v5wbeta0; double BSIM4v5wvfb; double BSIM4v5wagidl; double BSIM4v5wbgidl; double BSIM4v5wcgidl; double BSIM4v5wegidl; double BSIM4v5waigc; double BSIM4v5wbigc; double BSIM4v5wcigc; double BSIM4v5waigsd; double BSIM4v5wbigsd; double BSIM4v5wcigsd; double BSIM4v5waigbacc; double BSIM4v5wbigbacc; double BSIM4v5wcigbacc; double BSIM4v5waigbinv; double BSIM4v5wbigbinv; double BSIM4v5wcigbinv; double BSIM4v5wnigc; double BSIM4v5wnigbacc; double BSIM4v5wnigbinv; double BSIM4v5wntox; double BSIM4v5weigbinv; double BSIM4v5wpigcd; double BSIM4v5wpoxedge; double BSIM4v5wxrcrg1; double BSIM4v5wxrcrg2; double BSIM4v5wlambda; double BSIM4v5wvtl; double BSIM4v5wxn; double BSIM4v5wvfbsdoff; double BSIM4v5wtvfbsdoff; /* CV model */ double BSIM4v5wcgsl; double BSIM4v5wcgdl; double BSIM4v5wckappas; double BSIM4v5wckappad; double BSIM4v5wcf; double BSIM4v5wclc; double BSIM4v5wcle; double BSIM4v5wvfbcv; double BSIM4v5wnoff; double BSIM4v5wvoffcv; double BSIM4v5wacde; double BSIM4v5wmoin; /* Cross-term Dependence */ double BSIM4v5pcdsc; double BSIM4v5pcdscb; double BSIM4v5pcdscd; double BSIM4v5pcit; double BSIM4v5pnfactor; double BSIM4v5pxj; double BSIM4v5pvsat; double BSIM4v5pat; double BSIM4v5pa0; double BSIM4v5pags; double BSIM4v5pa1; double BSIM4v5pa2; double BSIM4v5pketa; double BSIM4v5pnsub; double BSIM4v5pndep; double BSIM4v5pnsd; double BSIM4v5pphin; double BSIM4v5pngate; double BSIM4v5pgamma1; double BSIM4v5pgamma2; double BSIM4v5pvbx; double BSIM4v5pvbm; double BSIM4v5pxt; double BSIM4v5pk1; double BSIM4v5pkt1; double BSIM4v5pkt1l; double BSIM4v5pkt2; double BSIM4v5pk2; double BSIM4v5pk3; double BSIM4v5pk3b; double BSIM4v5pw0; double BSIM4v5pdvtp0; double BSIM4v5pdvtp1; double BSIM4v5plpe0; double BSIM4v5plpeb; double BSIM4v5pdvt0; double BSIM4v5pdvt1; double BSIM4v5pdvt2; double BSIM4v5pdvt0w; double BSIM4v5pdvt1w; double BSIM4v5pdvt2w; double BSIM4v5pdrout; double BSIM4v5pdsub; double BSIM4v5pvth0; double BSIM4v5pua; double BSIM4v5pua1; double BSIM4v5pub; double BSIM4v5pub1; double BSIM4v5puc; double BSIM4v5puc1; double BSIM4v5pud; double BSIM4v5pud1; double BSIM4v5pup; double BSIM4v5plp; double BSIM4v5pu0; double BSIM4v5peu; double BSIM4v5pute; double BSIM4v5pvoff; double BSIM4v5ptvoff; double BSIM4v5pminv; double BSIM4v5pdelta; double BSIM4v5prdsw; double BSIM4v5prsw; double BSIM4v5prdw; double BSIM4v5pprwg; double BSIM4v5pprwb; double BSIM4v5pprt; double BSIM4v5peta0; double BSIM4v5petab; double BSIM4v5ppclm; double BSIM4v5ppdibl1; double BSIM4v5ppdibl2; double BSIM4v5ppdiblb; double BSIM4v5pfprout; double BSIM4v5ppdits; double BSIM4v5ppditsd; double BSIM4v5ppscbe1; double BSIM4v5ppscbe2; double BSIM4v5ppvag; double BSIM4v5pwr; double BSIM4v5pdwg; double BSIM4v5pdwb; double BSIM4v5pb0; double BSIM4v5pb1; double BSIM4v5palpha0; double BSIM4v5palpha1; double BSIM4v5pbeta0; double BSIM4v5pvfb; double BSIM4v5pagidl; double BSIM4v5pbgidl; double BSIM4v5pcgidl; double BSIM4v5pegidl; double BSIM4v5paigc; double BSIM4v5pbigc; double BSIM4v5pcigc; double BSIM4v5paigsd; double BSIM4v5pbigsd; double BSIM4v5pcigsd; double BSIM4v5paigbacc; double BSIM4v5pbigbacc; double BSIM4v5pcigbacc; double BSIM4v5paigbinv; double BSIM4v5pbigbinv; double BSIM4v5pcigbinv; double BSIM4v5pnigc; double BSIM4v5pnigbacc; double BSIM4v5pnigbinv; double BSIM4v5pntox; double BSIM4v5peigbinv; double BSIM4v5ppigcd; double BSIM4v5ppoxedge; double BSIM4v5pxrcrg1; double BSIM4v5pxrcrg2; double BSIM4v5plambda; double BSIM4v5pvtl; double BSIM4v5pxn; double BSIM4v5pvfbsdoff; double BSIM4v5ptvfbsdoff; /* CV model */ double BSIM4v5pcgsl; double BSIM4v5pcgdl; double BSIM4v5pckappas; double BSIM4v5pckappad; double BSIM4v5pcf; double BSIM4v5pclc; double BSIM4v5pcle; double BSIM4v5pvfbcv; double BSIM4v5pnoff; double BSIM4v5pvoffcv; double BSIM4v5pacde; double BSIM4v5pmoin; double BSIM4v5tnom; double BSIM4v5cgso; double BSIM4v5cgdo; double BSIM4v5cgbo; double BSIM4v5xpart; double BSIM4v5cFringOut; double BSIM4v5cFringMax; double BSIM4v5sheetResistance; double BSIM4v5SjctSatCurDensity; double BSIM4v5DjctSatCurDensity; double BSIM4v5SjctSidewallSatCurDensity; double BSIM4v5DjctSidewallSatCurDensity; double BSIM4v5SjctGateSidewallSatCurDensity; double BSIM4v5DjctGateSidewallSatCurDensity; double BSIM4v5SbulkJctPotential; double BSIM4v5DbulkJctPotential; double BSIM4v5SbulkJctBotGradingCoeff; double BSIM4v5DbulkJctBotGradingCoeff; double BSIM4v5SbulkJctSideGradingCoeff; double BSIM4v5DbulkJctSideGradingCoeff; double BSIM4v5SbulkJctGateSideGradingCoeff; double BSIM4v5DbulkJctGateSideGradingCoeff; double BSIM4v5SsidewallJctPotential; double BSIM4v5DsidewallJctPotential; double BSIM4v5SGatesidewallJctPotential; double BSIM4v5DGatesidewallJctPotential; double BSIM4v5SunitAreaJctCap; double BSIM4v5DunitAreaJctCap; double BSIM4v5SunitLengthSidewallJctCap; double BSIM4v5DunitLengthSidewallJctCap; double BSIM4v5SunitLengthGateSidewallJctCap; double BSIM4v5DunitLengthGateSidewallJctCap; double BSIM4v5SjctEmissionCoeff; double BSIM4v5DjctEmissionCoeff; double BSIM4v5SjctTempExponent; double BSIM4v5DjctTempExponent; double BSIM4v5njtstemp; double BSIM4v5njtsswtemp; double BSIM4v5njtsswgtemp; double BSIM4v5Lint; double BSIM4v5Ll; double BSIM4v5Llc; double BSIM4v5Lln; double BSIM4v5Lw; double BSIM4v5Lwc; double BSIM4v5Lwn; double BSIM4v5Lwl; double BSIM4v5Lwlc; double BSIM4v5Lmin; double BSIM4v5Lmax; double BSIM4v5Wint; double BSIM4v5Wl; double BSIM4v5Wlc; double BSIM4v5Wln; double BSIM4v5Ww; double BSIM4v5Wwc; double BSIM4v5Wwn; double BSIM4v5Wwl; double BSIM4v5Wwlc; double BSIM4v5Wmin; double BSIM4v5Wmax; /* added for stress effect */ double BSIM4v5saref; double BSIM4v5sbref; double BSIM4v5wlod; double BSIM4v5ku0; double BSIM4v5kvsat; double BSIM4v5kvth0; double BSIM4v5tku0; double BSIM4v5llodku0; double BSIM4v5wlodku0; double BSIM4v5llodvth; double BSIM4v5wlodvth; double BSIM4v5lku0; double BSIM4v5wku0; double BSIM4v5pku0; double BSIM4v5lkvth0; double BSIM4v5wkvth0; double BSIM4v5pkvth0; double BSIM4v5stk2; double BSIM4v5lodk2; double BSIM4v5steta0; double BSIM4v5lodeta0; double BSIM4v5web; double BSIM4v5wec; double BSIM4v5kvth0we; double BSIM4v5k2we; double BSIM4v5ku0we; double BSIM4v5scref; double BSIM4v5wpemod; double BSIM4v5lkvth0we; double BSIM4v5lk2we; double BSIM4v5lku0we; double BSIM4v5wkvth0we; double BSIM4v5wk2we; double BSIM4v5wku0we; double BSIM4v5pkvth0we; double BSIM4v5pk2we; double BSIM4v5pku0we; /* Pre-calculated constants * move to size-dependent param */ double BSIM4v5vtm; double BSIM4v5vtm0; double BSIM4v5coxe; double BSIM4v5coxp; double BSIM4v5cof1; double BSIM4v5cof2; double BSIM4v5cof3; double BSIM4v5cof4; double BSIM4v5vcrit; double BSIM4v5factor1; double BSIM4v5PhiBS; double BSIM4v5PhiBSWS; double BSIM4v5PhiBSWGS; double BSIM4v5SjctTempSatCurDensity; double BSIM4v5SjctSidewallTempSatCurDensity; double BSIM4v5SjctGateSidewallTempSatCurDensity; double BSIM4v5PhiBD; double BSIM4v5PhiBSWD; double BSIM4v5PhiBSWGD; double BSIM4v5DjctTempSatCurDensity; double BSIM4v5DjctSidewallTempSatCurDensity; double BSIM4v5DjctGateSidewallTempSatCurDensity; double BSIM4v5SunitAreaTempJctCap; double BSIM4v5DunitAreaTempJctCap; double BSIM4v5SunitLengthSidewallTempJctCap; double BSIM4v5DunitLengthSidewallTempJctCap; double BSIM4v5SunitLengthGateSidewallTempJctCap; double BSIM4v5DunitLengthGateSidewallTempJctCap; double BSIM4v5oxideTrapDensityA; double BSIM4v5oxideTrapDensityB; double BSIM4v5oxideTrapDensityC; double BSIM4v5em; double BSIM4v5ef; double BSIM4v5af; double BSIM4v5kf; double BSIM4v5vgsMax; double BSIM4v5vgdMax; double BSIM4v5vgbMax; double BSIM4v5vdsMax; double BSIM4v5vbsMax; double BSIM4v5vbdMax; struct bsim4v5SizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned BSIM4v5rgeomodGiven :1; unsigned BSIM4v5stimodGiven :1; unsigned BSIM4v5sa0Given :1; unsigned BSIM4v5sb0Given :1; unsigned BSIM4v5mobModGiven :1; unsigned BSIM4v5binUnitGiven :1; unsigned BSIM4v5capModGiven :1; unsigned BSIM4v5dioModGiven :1; unsigned BSIM4v5rdsModGiven :1; unsigned BSIM4v5rbodyModGiven :1; unsigned BSIM4v5rgateModGiven :1; unsigned BSIM4v5perModGiven :1; unsigned BSIM4v5geoModGiven :1; unsigned BSIM4v5rgeoModGiven :1; unsigned BSIM4v5paramChkGiven :1; unsigned BSIM4v5trnqsModGiven :1; unsigned BSIM4v5acnqsModGiven :1; unsigned BSIM4v5fnoiModGiven :1; unsigned BSIM4v5tnoiModGiven :1; unsigned BSIM4v5igcModGiven :1; unsigned BSIM4v5igbModGiven :1; unsigned BSIM4v5tempModGiven :1; unsigned BSIM4v5typeGiven :1; unsigned BSIM4v5toxrefGiven :1; unsigned BSIM4v5toxeGiven :1; unsigned BSIM4v5toxpGiven :1; unsigned BSIM4v5toxmGiven :1; unsigned BSIM4v5dtoxGiven :1; unsigned BSIM4v5epsroxGiven :1; unsigned BSIM4v5versionGiven :1; unsigned BSIM4v5cdscGiven :1; unsigned BSIM4v5cdscbGiven :1; unsigned BSIM4v5cdscdGiven :1; unsigned BSIM4v5citGiven :1; unsigned BSIM4v5nfactorGiven :1; unsigned BSIM4v5xjGiven :1; unsigned BSIM4v5vsatGiven :1; unsigned BSIM4v5atGiven :1; unsigned BSIM4v5a0Given :1; unsigned BSIM4v5agsGiven :1; unsigned BSIM4v5a1Given :1; unsigned BSIM4v5a2Given :1; unsigned BSIM4v5ketaGiven :1; unsigned BSIM4v5nsubGiven :1; unsigned BSIM4v5ndepGiven :1; unsigned BSIM4v5nsdGiven :1; unsigned BSIM4v5phinGiven :1; unsigned BSIM4v5ngateGiven :1; unsigned BSIM4v5gamma1Given :1; unsigned BSIM4v5gamma2Given :1; unsigned BSIM4v5vbxGiven :1; unsigned BSIM4v5vbmGiven :1; unsigned BSIM4v5xtGiven :1; unsigned BSIM4v5k1Given :1; unsigned BSIM4v5kt1Given :1; unsigned BSIM4v5kt1lGiven :1; unsigned BSIM4v5kt2Given :1; unsigned BSIM4v5k2Given :1; unsigned BSIM4v5k3Given :1; unsigned BSIM4v5k3bGiven :1; unsigned BSIM4v5w0Given :1; unsigned BSIM4v5dvtp0Given :1; unsigned BSIM4v5dvtp1Given :1; unsigned BSIM4v5lpe0Given :1; unsigned BSIM4v5lpebGiven :1; unsigned BSIM4v5dvt0Given :1; unsigned BSIM4v5dvt1Given :1; unsigned BSIM4v5dvt2Given :1; unsigned BSIM4v5dvt0wGiven :1; unsigned BSIM4v5dvt1wGiven :1; unsigned BSIM4v5dvt2wGiven :1; unsigned BSIM4v5droutGiven :1; unsigned BSIM4v5dsubGiven :1; unsigned BSIM4v5vth0Given :1; unsigned BSIM4v5euGiven :1; unsigned BSIM4v5uaGiven :1; unsigned BSIM4v5ua1Given :1; unsigned BSIM4v5ubGiven :1; unsigned BSIM4v5ub1Given :1; unsigned BSIM4v5ucGiven :1; unsigned BSIM4v5uc1Given :1; unsigned BSIM4v5udGiven :1; unsigned BSIM4v5ud1Given :1; unsigned BSIM4v5upGiven :1; unsigned BSIM4v5lpGiven :1; unsigned BSIM4v5u0Given :1; unsigned BSIM4v5uteGiven :1; unsigned BSIM4v5voffGiven :1; unsigned BSIM4v5tvoffGiven :1; unsigned BSIM4v5vofflGiven :1; unsigned BSIM4v5minvGiven :1; unsigned BSIM4v5rdswGiven :1; unsigned BSIM4v5rdswminGiven :1; unsigned BSIM4v5rdwminGiven :1; unsigned BSIM4v5rswminGiven :1; unsigned BSIM4v5rswGiven :1; unsigned BSIM4v5rdwGiven :1; unsigned BSIM4v5prwgGiven :1; unsigned BSIM4v5prwbGiven :1; unsigned BSIM4v5prtGiven :1; unsigned BSIM4v5eta0Given :1; unsigned BSIM4v5etabGiven :1; unsigned BSIM4v5pclmGiven :1; unsigned BSIM4v5pdibl1Given :1; unsigned BSIM4v5pdibl2Given :1; unsigned BSIM4v5pdiblbGiven :1; unsigned BSIM4v5fproutGiven :1; unsigned BSIM4v5pditsGiven :1; unsigned BSIM4v5pditsdGiven :1; unsigned BSIM4v5pditslGiven :1; unsigned BSIM4v5pscbe1Given :1; unsigned BSIM4v5pscbe2Given :1; unsigned BSIM4v5pvagGiven :1; unsigned BSIM4v5deltaGiven :1; unsigned BSIM4v5wrGiven :1; unsigned BSIM4v5dwgGiven :1; unsigned BSIM4v5dwbGiven :1; unsigned BSIM4v5b0Given :1; unsigned BSIM4v5b1Given :1; unsigned BSIM4v5alpha0Given :1; unsigned BSIM4v5alpha1Given :1; unsigned BSIM4v5beta0Given :1; unsigned BSIM4v5agidlGiven :1; unsigned BSIM4v5bgidlGiven :1; unsigned BSIM4v5cgidlGiven :1; unsigned BSIM4v5egidlGiven :1; unsigned BSIM4v5aigcGiven :1; unsigned BSIM4v5bigcGiven :1; unsigned BSIM4v5cigcGiven :1; unsigned BSIM4v5aigsdGiven :1; unsigned BSIM4v5bigsdGiven :1; unsigned BSIM4v5cigsdGiven :1; unsigned BSIM4v5aigbaccGiven :1; unsigned BSIM4v5bigbaccGiven :1; unsigned BSIM4v5cigbaccGiven :1; unsigned BSIM4v5aigbinvGiven :1; unsigned BSIM4v5bigbinvGiven :1; unsigned BSIM4v5cigbinvGiven :1; unsigned BSIM4v5nigcGiven :1; unsigned BSIM4v5nigbinvGiven :1; unsigned BSIM4v5nigbaccGiven :1; unsigned BSIM4v5ntoxGiven :1; unsigned BSIM4v5eigbinvGiven :1; unsigned BSIM4v5pigcdGiven :1; unsigned BSIM4v5poxedgeGiven :1; unsigned BSIM4v5ijthdfwdGiven :1; unsigned BSIM4v5ijthsfwdGiven :1; unsigned BSIM4v5ijthdrevGiven :1; unsigned BSIM4v5ijthsrevGiven :1; unsigned BSIM4v5xjbvdGiven :1; unsigned BSIM4v5xjbvsGiven :1; unsigned BSIM4v5bvdGiven :1; unsigned BSIM4v5bvsGiven :1; unsigned BSIM4v5jtssGiven :1; unsigned BSIM4v5jtsdGiven :1; unsigned BSIM4v5jtsswsGiven :1; unsigned BSIM4v5jtsswdGiven :1; unsigned BSIM4v5jtsswgsGiven :1; unsigned BSIM4v5jtsswgdGiven :1; unsigned BSIM4v5njtsGiven :1; unsigned BSIM4v5njtsswGiven :1; unsigned BSIM4v5njtsswgGiven :1; unsigned BSIM4v5xtssGiven :1; unsigned BSIM4v5xtsdGiven :1; unsigned BSIM4v5xtsswsGiven :1; unsigned BSIM4v5xtsswdGiven :1; unsigned BSIM4v5xtsswgsGiven :1; unsigned BSIM4v5xtsswgdGiven :1; unsigned BSIM4v5tnjtsGiven :1; unsigned BSIM4v5tnjtsswGiven :1; unsigned BSIM4v5tnjtsswgGiven :1; unsigned BSIM4v5vtssGiven :1; unsigned BSIM4v5vtsdGiven :1; unsigned BSIM4v5vtsswsGiven :1; unsigned BSIM4v5vtsswdGiven :1; unsigned BSIM4v5vtsswgsGiven :1; unsigned BSIM4v5vtsswgdGiven :1; unsigned BSIM4v5vfbGiven :1; unsigned BSIM4v5gbminGiven :1; unsigned BSIM4v5rbdbGiven :1; unsigned BSIM4v5rbsbGiven :1; unsigned BSIM4v5rbpsGiven :1; unsigned BSIM4v5rbpdGiven :1; unsigned BSIM4v5rbpbGiven :1; unsigned BSIM4v5rbps0Given :1; unsigned BSIM4v5rbpslGiven :1; unsigned BSIM4v5rbpswGiven :1; unsigned BSIM4v5rbpsnfGiven :1; unsigned BSIM4v5rbpd0Given :1; unsigned BSIM4v5rbpdlGiven :1; unsigned BSIM4v5rbpdwGiven :1; unsigned BSIM4v5rbpdnfGiven :1; unsigned BSIM4v5rbpbx0Given :1; unsigned BSIM4v5rbpbxlGiven :1; unsigned BSIM4v5rbpbxwGiven :1; unsigned BSIM4v5rbpbxnfGiven :1; unsigned BSIM4v5rbpby0Given :1; unsigned BSIM4v5rbpbylGiven :1; unsigned BSIM4v5rbpbywGiven :1; unsigned BSIM4v5rbpbynfGiven :1; unsigned BSIM4v5rbsbx0Given :1; unsigned BSIM4v5rbsby0Given :1; unsigned BSIM4v5rbdbx0Given :1; unsigned BSIM4v5rbdby0Given :1; unsigned BSIM4v5rbsdbxlGiven :1; unsigned BSIM4v5rbsdbxwGiven :1; unsigned BSIM4v5rbsdbxnfGiven :1; unsigned BSIM4v5rbsdbylGiven :1; unsigned BSIM4v5rbsdbywGiven :1; unsigned BSIM4v5rbsdbynfGiven :1; unsigned BSIM4v5xrcrg1Given :1; unsigned BSIM4v5xrcrg2Given :1; unsigned BSIM4v5tnoiaGiven :1; unsigned BSIM4v5tnoibGiven :1; unsigned BSIM4v5rnoiaGiven :1; unsigned BSIM4v5rnoibGiven :1; unsigned BSIM4v5ntnoiGiven :1; unsigned BSIM4v5lambdaGiven :1; unsigned BSIM4v5vtlGiven :1; unsigned BSIM4v5lcGiven :1; unsigned BSIM4v5xnGiven :1; unsigned BSIM4v5vfbsdoffGiven :1; unsigned BSIM4v5lintnoiGiven :1; unsigned BSIM4v5tvfbsdoffGiven :1; /* CV model and parasitics */ unsigned BSIM4v5cgslGiven :1; unsigned BSIM4v5cgdlGiven :1; unsigned BSIM4v5ckappasGiven :1; unsigned BSIM4v5ckappadGiven :1; unsigned BSIM4v5cfGiven :1; unsigned BSIM4v5vfbcvGiven :1; unsigned BSIM4v5clcGiven :1; unsigned BSIM4v5cleGiven :1; unsigned BSIM4v5dwcGiven :1; unsigned BSIM4v5dlcGiven :1; unsigned BSIM4v5xwGiven :1; unsigned BSIM4v5xlGiven :1; unsigned BSIM4v5dlcigGiven :1; unsigned BSIM4v5dwjGiven :1; unsigned BSIM4v5noffGiven :1; unsigned BSIM4v5voffcvGiven :1; unsigned BSIM4v5acdeGiven :1; unsigned BSIM4v5moinGiven :1; unsigned BSIM4v5tcjGiven :1; unsigned BSIM4v5tcjswGiven :1; unsigned BSIM4v5tcjswgGiven :1; unsigned BSIM4v5tpbGiven :1; unsigned BSIM4v5tpbswGiven :1; unsigned BSIM4v5tpbswgGiven :1; unsigned BSIM4v5dmcgGiven :1; unsigned BSIM4v5dmciGiven :1; unsigned BSIM4v5dmdgGiven :1; unsigned BSIM4v5dmcgtGiven :1; unsigned BSIM4v5xgwGiven :1; unsigned BSIM4v5xglGiven :1; unsigned BSIM4v5rshgGiven :1; unsigned BSIM4v5ngconGiven :1; /* Length dependence */ unsigned BSIM4v5lcdscGiven :1; unsigned BSIM4v5lcdscbGiven :1; unsigned BSIM4v5lcdscdGiven :1; unsigned BSIM4v5lcitGiven :1; unsigned BSIM4v5lnfactorGiven :1; unsigned BSIM4v5lxjGiven :1; unsigned BSIM4v5lvsatGiven :1; unsigned BSIM4v5latGiven :1; unsigned BSIM4v5la0Given :1; unsigned BSIM4v5lagsGiven :1; unsigned BSIM4v5la1Given :1; unsigned BSIM4v5la2Given :1; unsigned BSIM4v5lketaGiven :1; unsigned BSIM4v5lnsubGiven :1; unsigned BSIM4v5lndepGiven :1; unsigned BSIM4v5lnsdGiven :1; unsigned BSIM4v5lphinGiven :1; unsigned BSIM4v5lngateGiven :1; unsigned BSIM4v5lgamma1Given :1; unsigned BSIM4v5lgamma2Given :1; unsigned BSIM4v5lvbxGiven :1; unsigned BSIM4v5lvbmGiven :1; unsigned BSIM4v5lxtGiven :1; unsigned BSIM4v5lk1Given :1; unsigned BSIM4v5lkt1Given :1; unsigned BSIM4v5lkt1lGiven :1; unsigned BSIM4v5lkt2Given :1; unsigned BSIM4v5lk2Given :1; unsigned BSIM4v5lk3Given :1; unsigned BSIM4v5lk3bGiven :1; unsigned BSIM4v5lw0Given :1; unsigned BSIM4v5ldvtp0Given :1; unsigned BSIM4v5ldvtp1Given :1; unsigned BSIM4v5llpe0Given :1; unsigned BSIM4v5llpebGiven :1; unsigned BSIM4v5ldvt0Given :1; unsigned BSIM4v5ldvt1Given :1; unsigned BSIM4v5ldvt2Given :1; unsigned BSIM4v5ldvt0wGiven :1; unsigned BSIM4v5ldvt1wGiven :1; unsigned BSIM4v5ldvt2wGiven :1; unsigned BSIM4v5ldroutGiven :1; unsigned BSIM4v5ldsubGiven :1; unsigned BSIM4v5lvth0Given :1; unsigned BSIM4v5luaGiven :1; unsigned BSIM4v5lua1Given :1; unsigned BSIM4v5lubGiven :1; unsigned BSIM4v5lub1Given :1; unsigned BSIM4v5lucGiven :1; unsigned BSIM4v5luc1Given :1; unsigned BSIM4v5ludGiven :1; unsigned BSIM4v5lud1Given :1; unsigned BSIM4v5lupGiven :1; unsigned BSIM4v5llpGiven :1; unsigned BSIM4v5lu0Given :1; unsigned BSIM4v5leuGiven :1; unsigned BSIM4v5luteGiven :1; unsigned BSIM4v5lvoffGiven :1; unsigned BSIM4v5ltvoffGiven :1; unsigned BSIM4v5lminvGiven :1; unsigned BSIM4v5lrdswGiven :1; unsigned BSIM4v5lrswGiven :1; unsigned BSIM4v5lrdwGiven :1; unsigned BSIM4v5lprwgGiven :1; unsigned BSIM4v5lprwbGiven :1; unsigned BSIM4v5lprtGiven :1; unsigned BSIM4v5leta0Given :1; unsigned BSIM4v5letabGiven :1; unsigned BSIM4v5lpclmGiven :1; unsigned BSIM4v5lpdibl1Given :1; unsigned BSIM4v5lpdibl2Given :1; unsigned BSIM4v5lpdiblbGiven :1; unsigned BSIM4v5lfproutGiven :1; unsigned BSIM4v5lpditsGiven :1; unsigned BSIM4v5lpditsdGiven :1; unsigned BSIM4v5lpscbe1Given :1; unsigned BSIM4v5lpscbe2Given :1; unsigned BSIM4v5lpvagGiven :1; unsigned BSIM4v5ldeltaGiven :1; unsigned BSIM4v5lwrGiven :1; unsigned BSIM4v5ldwgGiven :1; unsigned BSIM4v5ldwbGiven :1; unsigned BSIM4v5lb0Given :1; unsigned BSIM4v5lb1Given :1; unsigned BSIM4v5lalpha0Given :1; unsigned BSIM4v5lalpha1Given :1; unsigned BSIM4v5lbeta0Given :1; unsigned BSIM4v5lvfbGiven :1; unsigned BSIM4v5lagidlGiven :1; unsigned BSIM4v5lbgidlGiven :1; unsigned BSIM4v5lcgidlGiven :1; unsigned BSIM4v5legidlGiven :1; unsigned BSIM4v5laigcGiven :1; unsigned BSIM4v5lbigcGiven :1; unsigned BSIM4v5lcigcGiven :1; unsigned BSIM4v5laigsdGiven :1; unsigned BSIM4v5lbigsdGiven :1; unsigned BSIM4v5lcigsdGiven :1; unsigned BSIM4v5laigbaccGiven :1; unsigned BSIM4v5lbigbaccGiven :1; unsigned BSIM4v5lcigbaccGiven :1; unsigned BSIM4v5laigbinvGiven :1; unsigned BSIM4v5lbigbinvGiven :1; unsigned BSIM4v5lcigbinvGiven :1; unsigned BSIM4v5lnigcGiven :1; unsigned BSIM4v5lnigbinvGiven :1; unsigned BSIM4v5lnigbaccGiven :1; unsigned BSIM4v5lntoxGiven :1; unsigned BSIM4v5leigbinvGiven :1; unsigned BSIM4v5lpigcdGiven :1; unsigned BSIM4v5lpoxedgeGiven :1; unsigned BSIM4v5lxrcrg1Given :1; unsigned BSIM4v5lxrcrg2Given :1; unsigned BSIM4v5llambdaGiven :1; unsigned BSIM4v5lvtlGiven :1; unsigned BSIM4v5lxnGiven :1; unsigned BSIM4v5lvfbsdoffGiven :1; unsigned BSIM4v5ltvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v5lcgslGiven :1; unsigned BSIM4v5lcgdlGiven :1; unsigned BSIM4v5lckappasGiven :1; unsigned BSIM4v5lckappadGiven :1; unsigned BSIM4v5lcfGiven :1; unsigned BSIM4v5lclcGiven :1; unsigned BSIM4v5lcleGiven :1; unsigned BSIM4v5lvfbcvGiven :1; unsigned BSIM4v5lnoffGiven :1; unsigned BSIM4v5lvoffcvGiven :1; unsigned BSIM4v5lacdeGiven :1; unsigned BSIM4v5lmoinGiven :1; /* Width dependence */ unsigned BSIM4v5wcdscGiven :1; unsigned BSIM4v5wcdscbGiven :1; unsigned BSIM4v5wcdscdGiven :1; unsigned BSIM4v5wcitGiven :1; unsigned BSIM4v5wnfactorGiven :1; unsigned BSIM4v5wxjGiven :1; unsigned BSIM4v5wvsatGiven :1; unsigned BSIM4v5watGiven :1; unsigned BSIM4v5wa0Given :1; unsigned BSIM4v5wagsGiven :1; unsigned BSIM4v5wa1Given :1; unsigned BSIM4v5wa2Given :1; unsigned BSIM4v5wketaGiven :1; unsigned BSIM4v5wnsubGiven :1; unsigned BSIM4v5wndepGiven :1; unsigned BSIM4v5wnsdGiven :1; unsigned BSIM4v5wphinGiven :1; unsigned BSIM4v5wngateGiven :1; unsigned BSIM4v5wgamma1Given :1; unsigned BSIM4v5wgamma2Given :1; unsigned BSIM4v5wvbxGiven :1; unsigned BSIM4v5wvbmGiven :1; unsigned BSIM4v5wxtGiven :1; unsigned BSIM4v5wk1Given :1; unsigned BSIM4v5wkt1Given :1; unsigned BSIM4v5wkt1lGiven :1; unsigned BSIM4v5wkt2Given :1; unsigned BSIM4v5wk2Given :1; unsigned BSIM4v5wk3Given :1; unsigned BSIM4v5wk3bGiven :1; unsigned BSIM4v5ww0Given :1; unsigned BSIM4v5wdvtp0Given :1; unsigned BSIM4v5wdvtp1Given :1; unsigned BSIM4v5wlpe0Given :1; unsigned BSIM4v5wlpebGiven :1; unsigned BSIM4v5wdvt0Given :1; unsigned BSIM4v5wdvt1Given :1; unsigned BSIM4v5wdvt2Given :1; unsigned BSIM4v5wdvt0wGiven :1; unsigned BSIM4v5wdvt1wGiven :1; unsigned BSIM4v5wdvt2wGiven :1; unsigned BSIM4v5wdroutGiven :1; unsigned BSIM4v5wdsubGiven :1; unsigned BSIM4v5wvth0Given :1; unsigned BSIM4v5wuaGiven :1; unsigned BSIM4v5wua1Given :1; unsigned BSIM4v5wubGiven :1; unsigned BSIM4v5wub1Given :1; unsigned BSIM4v5wucGiven :1; unsigned BSIM4v5wuc1Given :1; unsigned BSIM4v5wudGiven :1; unsigned BSIM4v5wud1Given :1; unsigned BSIM4v5wupGiven :1; unsigned BSIM4v5wlpGiven :1; unsigned BSIM4v5wu0Given :1; unsigned BSIM4v5weuGiven :1; unsigned BSIM4v5wuteGiven :1; unsigned BSIM4v5wvoffGiven :1; unsigned BSIM4v5wtvoffGiven :1; unsigned BSIM4v5wminvGiven :1; unsigned BSIM4v5wrdswGiven :1; unsigned BSIM4v5wrswGiven :1; unsigned BSIM4v5wrdwGiven :1; unsigned BSIM4v5wprwgGiven :1; unsigned BSIM4v5wprwbGiven :1; unsigned BSIM4v5wprtGiven :1; unsigned BSIM4v5weta0Given :1; unsigned BSIM4v5wetabGiven :1; unsigned BSIM4v5wpclmGiven :1; unsigned BSIM4v5wpdibl1Given :1; unsigned BSIM4v5wpdibl2Given :1; unsigned BSIM4v5wpdiblbGiven :1; unsigned BSIM4v5wfproutGiven :1; unsigned BSIM4v5wpditsGiven :1; unsigned BSIM4v5wpditsdGiven :1; unsigned BSIM4v5wpscbe1Given :1; unsigned BSIM4v5wpscbe2Given :1; unsigned BSIM4v5wpvagGiven :1; unsigned BSIM4v5wdeltaGiven :1; unsigned BSIM4v5wwrGiven :1; unsigned BSIM4v5wdwgGiven :1; unsigned BSIM4v5wdwbGiven :1; unsigned BSIM4v5wb0Given :1; unsigned BSIM4v5wb1Given :1; unsigned BSIM4v5walpha0Given :1; unsigned BSIM4v5walpha1Given :1; unsigned BSIM4v5wbeta0Given :1; unsigned BSIM4v5wvfbGiven :1; unsigned BSIM4v5wagidlGiven :1; unsigned BSIM4v5wbgidlGiven :1; unsigned BSIM4v5wcgidlGiven :1; unsigned BSIM4v5wegidlGiven :1; unsigned BSIM4v5waigcGiven :1; unsigned BSIM4v5wbigcGiven :1; unsigned BSIM4v5wcigcGiven :1; unsigned BSIM4v5waigsdGiven :1; unsigned BSIM4v5wbigsdGiven :1; unsigned BSIM4v5wcigsdGiven :1; unsigned BSIM4v5waigbaccGiven :1; unsigned BSIM4v5wbigbaccGiven :1; unsigned BSIM4v5wcigbaccGiven :1; unsigned BSIM4v5waigbinvGiven :1; unsigned BSIM4v5wbigbinvGiven :1; unsigned BSIM4v5wcigbinvGiven :1; unsigned BSIM4v5wnigcGiven :1; unsigned BSIM4v5wnigbinvGiven :1; unsigned BSIM4v5wnigbaccGiven :1; unsigned BSIM4v5wntoxGiven :1; unsigned BSIM4v5weigbinvGiven :1; unsigned BSIM4v5wpigcdGiven :1; unsigned BSIM4v5wpoxedgeGiven :1; unsigned BSIM4v5wxrcrg1Given :1; unsigned BSIM4v5wxrcrg2Given :1; unsigned BSIM4v5wlambdaGiven :1; unsigned BSIM4v5wvtlGiven :1; unsigned BSIM4v5wxnGiven :1; unsigned BSIM4v5wvfbsdoffGiven :1; unsigned BSIM4v5wtvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v5wcgslGiven :1; unsigned BSIM4v5wcgdlGiven :1; unsigned BSIM4v5wckappasGiven :1; unsigned BSIM4v5wckappadGiven :1; unsigned BSIM4v5wcfGiven :1; unsigned BSIM4v5wclcGiven :1; unsigned BSIM4v5wcleGiven :1; unsigned BSIM4v5wvfbcvGiven :1; unsigned BSIM4v5wnoffGiven :1; unsigned BSIM4v5wvoffcvGiven :1; unsigned BSIM4v5wacdeGiven :1; unsigned BSIM4v5wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM4v5pcdscGiven :1; unsigned BSIM4v5pcdscbGiven :1; unsigned BSIM4v5pcdscdGiven :1; unsigned BSIM4v5pcitGiven :1; unsigned BSIM4v5pnfactorGiven :1; unsigned BSIM4v5pxjGiven :1; unsigned BSIM4v5pvsatGiven :1; unsigned BSIM4v5patGiven :1; unsigned BSIM4v5pa0Given :1; unsigned BSIM4v5pagsGiven :1; unsigned BSIM4v5pa1Given :1; unsigned BSIM4v5pa2Given :1; unsigned BSIM4v5pketaGiven :1; unsigned BSIM4v5pnsubGiven :1; unsigned BSIM4v5pndepGiven :1; unsigned BSIM4v5pnsdGiven :1; unsigned BSIM4v5pphinGiven :1; unsigned BSIM4v5pngateGiven :1; unsigned BSIM4v5pgamma1Given :1; unsigned BSIM4v5pgamma2Given :1; unsigned BSIM4v5pvbxGiven :1; unsigned BSIM4v5pvbmGiven :1; unsigned BSIM4v5pxtGiven :1; unsigned BSIM4v5pk1Given :1; unsigned BSIM4v5pkt1Given :1; unsigned BSIM4v5pkt1lGiven :1; unsigned BSIM4v5pkt2Given :1; unsigned BSIM4v5pk2Given :1; unsigned BSIM4v5pk3Given :1; unsigned BSIM4v5pk3bGiven :1; unsigned BSIM4v5pw0Given :1; unsigned BSIM4v5pdvtp0Given :1; unsigned BSIM4v5pdvtp1Given :1; unsigned BSIM4v5plpe0Given :1; unsigned BSIM4v5plpebGiven :1; unsigned BSIM4v5pdvt0Given :1; unsigned BSIM4v5pdvt1Given :1; unsigned BSIM4v5pdvt2Given :1; unsigned BSIM4v5pdvt0wGiven :1; unsigned BSIM4v5pdvt1wGiven :1; unsigned BSIM4v5pdvt2wGiven :1; unsigned BSIM4v5pdroutGiven :1; unsigned BSIM4v5pdsubGiven :1; unsigned BSIM4v5pvth0Given :1; unsigned BSIM4v5puaGiven :1; unsigned BSIM4v5pua1Given :1; unsigned BSIM4v5pubGiven :1; unsigned BSIM4v5pub1Given :1; unsigned BSIM4v5pucGiven :1; unsigned BSIM4v5puc1Given :1; unsigned BSIM4v5pudGiven :1; unsigned BSIM4v5pud1Given :1; unsigned BSIM4v5pupGiven :1; unsigned BSIM4v5plpGiven :1; unsigned BSIM4v5pu0Given :1; unsigned BSIM4v5peuGiven :1; unsigned BSIM4v5puteGiven :1; unsigned BSIM4v5pvoffGiven :1; unsigned BSIM4v5ptvoffGiven :1; unsigned BSIM4v5pminvGiven :1; unsigned BSIM4v5prdswGiven :1; unsigned BSIM4v5prswGiven :1; unsigned BSIM4v5prdwGiven :1; unsigned BSIM4v5pprwgGiven :1; unsigned BSIM4v5pprwbGiven :1; unsigned BSIM4v5pprtGiven :1; unsigned BSIM4v5peta0Given :1; unsigned BSIM4v5petabGiven :1; unsigned BSIM4v5ppclmGiven :1; unsigned BSIM4v5ppdibl1Given :1; unsigned BSIM4v5ppdibl2Given :1; unsigned BSIM4v5ppdiblbGiven :1; unsigned BSIM4v5pfproutGiven :1; unsigned BSIM4v5ppditsGiven :1; unsigned BSIM4v5ppditsdGiven :1; unsigned BSIM4v5ppscbe1Given :1; unsigned BSIM4v5ppscbe2Given :1; unsigned BSIM4v5ppvagGiven :1; unsigned BSIM4v5pdeltaGiven :1; unsigned BSIM4v5pwrGiven :1; unsigned BSIM4v5pdwgGiven :1; unsigned BSIM4v5pdwbGiven :1; unsigned BSIM4v5pb0Given :1; unsigned BSIM4v5pb1Given :1; unsigned BSIM4v5palpha0Given :1; unsigned BSIM4v5palpha1Given :1; unsigned BSIM4v5pbeta0Given :1; unsigned BSIM4v5pvfbGiven :1; unsigned BSIM4v5pagidlGiven :1; unsigned BSIM4v5pbgidlGiven :1; unsigned BSIM4v5pcgidlGiven :1; unsigned BSIM4v5pegidlGiven :1; unsigned BSIM4v5paigcGiven :1; unsigned BSIM4v5pbigcGiven :1; unsigned BSIM4v5pcigcGiven :1; unsigned BSIM4v5paigsdGiven :1; unsigned BSIM4v5pbigsdGiven :1; unsigned BSIM4v5pcigsdGiven :1; unsigned BSIM4v5paigbaccGiven :1; unsigned BSIM4v5pbigbaccGiven :1; unsigned BSIM4v5pcigbaccGiven :1; unsigned BSIM4v5paigbinvGiven :1; unsigned BSIM4v5pbigbinvGiven :1; unsigned BSIM4v5pcigbinvGiven :1; unsigned BSIM4v5pnigcGiven :1; unsigned BSIM4v5pnigbinvGiven :1; unsigned BSIM4v5pnigbaccGiven :1; unsigned BSIM4v5pntoxGiven :1; unsigned BSIM4v5peigbinvGiven :1; unsigned BSIM4v5ppigcdGiven :1; unsigned BSIM4v5ppoxedgeGiven :1; unsigned BSIM4v5pxrcrg1Given :1; unsigned BSIM4v5pxrcrg2Given :1; unsigned BSIM4v5plambdaGiven :1; unsigned BSIM4v5pvtlGiven :1; unsigned BSIM4v5pxnGiven :1; unsigned BSIM4v5pvfbsdoffGiven :1; unsigned BSIM4v5ptvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v5pcgslGiven :1; unsigned BSIM4v5pcgdlGiven :1; unsigned BSIM4v5pckappasGiven :1; unsigned BSIM4v5pckappadGiven :1; unsigned BSIM4v5pcfGiven :1; unsigned BSIM4v5pclcGiven :1; unsigned BSIM4v5pcleGiven :1; unsigned BSIM4v5pvfbcvGiven :1; unsigned BSIM4v5pnoffGiven :1; unsigned BSIM4v5pvoffcvGiven :1; unsigned BSIM4v5pacdeGiven :1; unsigned BSIM4v5pmoinGiven :1; unsigned BSIM4v5useFringeGiven :1; unsigned BSIM4v5tnomGiven :1; unsigned BSIM4v5cgsoGiven :1; unsigned BSIM4v5cgdoGiven :1; unsigned BSIM4v5cgboGiven :1; unsigned BSIM4v5xpartGiven :1; unsigned BSIM4v5sheetResistanceGiven :1; unsigned BSIM4v5SjctSatCurDensityGiven :1; unsigned BSIM4v5SjctSidewallSatCurDensityGiven :1; unsigned BSIM4v5SjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v5SbulkJctPotentialGiven :1; unsigned BSIM4v5SbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v5SsidewallJctPotentialGiven :1; unsigned BSIM4v5SGatesidewallJctPotentialGiven :1; unsigned BSIM4v5SbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v5SunitAreaJctCapGiven :1; unsigned BSIM4v5SunitLengthSidewallJctCapGiven :1; unsigned BSIM4v5SbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v5SunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v5SjctEmissionCoeffGiven :1; unsigned BSIM4v5SjctTempExponentGiven :1; unsigned BSIM4v5DjctSatCurDensityGiven :1; unsigned BSIM4v5DjctSidewallSatCurDensityGiven :1; unsigned BSIM4v5DjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v5DbulkJctPotentialGiven :1; unsigned BSIM4v5DbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v5DsidewallJctPotentialGiven :1; unsigned BSIM4v5DGatesidewallJctPotentialGiven :1; unsigned BSIM4v5DbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v5DunitAreaJctCapGiven :1; unsigned BSIM4v5DunitLengthSidewallJctCapGiven :1; unsigned BSIM4v5DbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v5DunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v5DjctEmissionCoeffGiven :1; unsigned BSIM4v5DjctTempExponentGiven :1; unsigned BSIM4v5oxideTrapDensityAGiven :1; unsigned BSIM4v5oxideTrapDensityBGiven :1; unsigned BSIM4v5oxideTrapDensityCGiven :1; unsigned BSIM4v5emGiven :1; unsigned BSIM4v5efGiven :1; unsigned BSIM4v5afGiven :1; unsigned BSIM4v5kfGiven :1; unsigned BSIM4v5vgsMaxGiven :1; unsigned BSIM4v5vgdMaxGiven :1; unsigned BSIM4v5vgbMaxGiven :1; unsigned BSIM4v5vdsMaxGiven :1; unsigned BSIM4v5vbsMaxGiven :1; unsigned BSIM4v5vbdMaxGiven :1; unsigned BSIM4v5LintGiven :1; unsigned BSIM4v5LlGiven :1; unsigned BSIM4v5LlcGiven :1; unsigned BSIM4v5LlnGiven :1; unsigned BSIM4v5LwGiven :1; unsigned BSIM4v5LwcGiven :1; unsigned BSIM4v5LwnGiven :1; unsigned BSIM4v5LwlGiven :1; unsigned BSIM4v5LwlcGiven :1; unsigned BSIM4v5LminGiven :1; unsigned BSIM4v5LmaxGiven :1; unsigned BSIM4v5WintGiven :1; unsigned BSIM4v5WlGiven :1; unsigned BSIM4v5WlcGiven :1; unsigned BSIM4v5WlnGiven :1; unsigned BSIM4v5WwGiven :1; unsigned BSIM4v5WwcGiven :1; unsigned BSIM4v5WwnGiven :1; unsigned BSIM4v5WwlGiven :1; unsigned BSIM4v5WwlcGiven :1; unsigned BSIM4v5WminGiven :1; unsigned BSIM4v5WmaxGiven :1; /* added for stress effect */ unsigned BSIM4v5sarefGiven :1; unsigned BSIM4v5sbrefGiven :1; unsigned BSIM4v5wlodGiven :1; unsigned BSIM4v5ku0Given :1; unsigned BSIM4v5kvsatGiven :1; unsigned BSIM4v5kvth0Given :1; unsigned BSIM4v5tku0Given :1; unsigned BSIM4v5llodku0Given :1; unsigned BSIM4v5wlodku0Given :1; unsigned BSIM4v5llodvthGiven :1; unsigned BSIM4v5wlodvthGiven :1; unsigned BSIM4v5lku0Given :1; unsigned BSIM4v5wku0Given :1; unsigned BSIM4v5pku0Given :1; unsigned BSIM4v5lkvth0Given :1; unsigned BSIM4v5wkvth0Given :1; unsigned BSIM4v5pkvth0Given :1; unsigned BSIM4v5stk2Given :1; unsigned BSIM4v5lodk2Given :1; unsigned BSIM4v5steta0Given :1; unsigned BSIM4v5lodeta0Given :1; unsigned BSIM4v5webGiven :1; unsigned BSIM4v5wecGiven :1; unsigned BSIM4v5kvth0weGiven :1; unsigned BSIM4v5k2weGiven :1; unsigned BSIM4v5ku0weGiven :1; unsigned BSIM4v5screfGiven :1; unsigned BSIM4v5wpemodGiven :1; unsigned BSIM4v5lkvth0weGiven :1; unsigned BSIM4v5lk2weGiven :1; unsigned BSIM4v5lku0weGiven :1; unsigned BSIM4v5wkvth0weGiven :1; unsigned BSIM4v5wk2weGiven :1; unsigned BSIM4v5wku0weGiven :1; unsigned BSIM4v5pkvth0weGiven :1; unsigned BSIM4v5pk2weGiven :1; unsigned BSIM4v5pku0weGiven :1; } BSIM4v5model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* Instance parameters */ #define BSIM4v5_W 1 #define BSIM4v5_L 2 #define BSIM4v5_AS 3 #define BSIM4v5_AD 4 #define BSIM4v5_PS 5 #define BSIM4v5_PD 6 #define BSIM4v5_NRS 7 #define BSIM4v5_NRD 8 #define BSIM4v5_OFF 9 #define BSIM4v5_IC 10 #define BSIM4v5_IC_VDS 11 #define BSIM4v5_IC_VGS 12 #define BSIM4v5_IC_VBS 13 #define BSIM4v5_TRNQSMOD 14 #define BSIM4v5_RBODYMOD 15 #define BSIM4v5_RGATEMOD 16 #define BSIM4v5_GEOMOD 17 #define BSIM4v5_RGEOMOD 18 #define BSIM4v5_NF 19 #define BSIM4v5_MIN 20 #define BSIM4v5_ACNQSMOD 22 #define BSIM4v5_RBDB 23 #define BSIM4v5_RBSB 24 #define BSIM4v5_RBPB 25 #define BSIM4v5_RBPS 26 #define BSIM4v5_RBPD 27 #define BSIM4v5_SA 28 #define BSIM4v5_SB 29 #define BSIM4v5_SD 30 #define BSIM4v5_DELVTO 31 #define BSIM4v5_XGW 32 #define BSIM4v5_NGCON 33 #define BSIM4v5_SCA 34 #define BSIM4v5_SCB 35 #define BSIM4v5_SCC 36 #define BSIM4v5_SC 37 #define BSIM4v5_M 38 /* Global parameters */ #define BSIM4v5_MOD_TEMPMOD 89 #define BSIM4v5_MOD_IGCMOD 90 #define BSIM4v5_MOD_IGBMOD 91 #define BSIM4v5_MOD_ACNQSMOD 92 #define BSIM4v5_MOD_FNOIMOD 93 #define BSIM4v5_MOD_RDSMOD 94 #define BSIM4v5_MOD_DIOMOD 95 #define BSIM4v5_MOD_PERMOD 96 #define BSIM4v5_MOD_GEOMOD 97 #define BSIM4v5_MOD_RGEOMOD 98 #define BSIM4v5_MOD_RGATEMOD 99 #define BSIM4v5_MOD_RBODYMOD 100 #define BSIM4v5_MOD_CAPMOD 101 #define BSIM4v5_MOD_TRNQSMOD 102 #define BSIM4v5_MOD_MOBMOD 103 #define BSIM4v5_MOD_TNOIMOD 104 #define BSIM4v5_MOD_TOXE 105 #define BSIM4v5_MOD_CDSC 106 #define BSIM4v5_MOD_CDSCB 107 #define BSIM4v5_MOD_CIT 108 #define BSIM4v5_MOD_NFACTOR 109 #define BSIM4v5_MOD_XJ 110 #define BSIM4v5_MOD_VSAT 111 #define BSIM4v5_MOD_AT 112 #define BSIM4v5_MOD_A0 113 #define BSIM4v5_MOD_A1 114 #define BSIM4v5_MOD_A2 115 #define BSIM4v5_MOD_KETA 116 #define BSIM4v5_MOD_NSUB 117 #define BSIM4v5_MOD_NDEP 118 #define BSIM4v5_MOD_NGATE 120 #define BSIM4v5_MOD_GAMMA1 121 #define BSIM4v5_MOD_GAMMA2 122 #define BSIM4v5_MOD_VBX 123 #define BSIM4v5_MOD_BINUNIT 124 #define BSIM4v5_MOD_VBM 125 #define BSIM4v5_MOD_XT 126 #define BSIM4v5_MOD_K1 129 #define BSIM4v5_MOD_KT1 130 #define BSIM4v5_MOD_KT1L 131 #define BSIM4v5_MOD_K2 132 #define BSIM4v5_MOD_KT2 133 #define BSIM4v5_MOD_K3 134 #define BSIM4v5_MOD_K3B 135 #define BSIM4v5_MOD_W0 136 #define BSIM4v5_MOD_LPE0 137 #define BSIM4v5_MOD_DVT0 138 #define BSIM4v5_MOD_DVT1 139 #define BSIM4v5_MOD_DVT2 140 #define BSIM4v5_MOD_DVT0W 141 #define BSIM4v5_MOD_DVT1W 142 #define BSIM4v5_MOD_DVT2W 143 #define BSIM4v5_MOD_DROUT 144 #define BSIM4v5_MOD_DSUB 145 #define BSIM4v5_MOD_VTH0 146 #define BSIM4v5_MOD_UA 147 #define BSIM4v5_MOD_UA1 148 #define BSIM4v5_MOD_UB 149 #define BSIM4v5_MOD_UB1 150 #define BSIM4v5_MOD_UC 151 #define BSIM4v5_MOD_UC1 152 #define BSIM4v5_MOD_U0 153 #define BSIM4v5_MOD_UTE 154 #define BSIM4v5_MOD_VOFF 155 #define BSIM4v5_MOD_DELTA 156 #define BSIM4v5_MOD_RDSW 157 #define BSIM4v5_MOD_PRT 158 #define BSIM4v5_MOD_LDD 159 #define BSIM4v5_MOD_ETA 160 #define BSIM4v5_MOD_ETA0 161 #define BSIM4v5_MOD_ETAB 162 #define BSIM4v5_MOD_PCLM 163 #define BSIM4v5_MOD_PDIBL1 164 #define BSIM4v5_MOD_PDIBL2 165 #define BSIM4v5_MOD_PSCBE1 166 #define BSIM4v5_MOD_PSCBE2 167 #define BSIM4v5_MOD_PVAG 168 #define BSIM4v5_MOD_WR 169 #define BSIM4v5_MOD_DWG 170 #define BSIM4v5_MOD_DWB 171 #define BSIM4v5_MOD_B0 172 #define BSIM4v5_MOD_B1 173 #define BSIM4v5_MOD_ALPHA0 174 #define BSIM4v5_MOD_BETA0 175 #define BSIM4v5_MOD_PDIBLB 178 #define BSIM4v5_MOD_PRWG 179 #define BSIM4v5_MOD_PRWB 180 #define BSIM4v5_MOD_CDSCD 181 #define BSIM4v5_MOD_AGS 182 #define BSIM4v5_MOD_FRINGE 184 #define BSIM4v5_MOD_CGSL 186 #define BSIM4v5_MOD_CGDL 187 #define BSIM4v5_MOD_CKAPPAS 188 #define BSIM4v5_MOD_CF 189 #define BSIM4v5_MOD_CLC 190 #define BSIM4v5_MOD_CLE 191 #define BSIM4v5_MOD_PARAMCHK 192 #define BSIM4v5_MOD_VERSION 193 #define BSIM4v5_MOD_VFBCV 194 #define BSIM4v5_MOD_ACDE 195 #define BSIM4v5_MOD_MOIN 196 #define BSIM4v5_MOD_NOFF 197 #define BSIM4v5_MOD_IJTHDFWD 198 #define BSIM4v5_MOD_ALPHA1 199 #define BSIM4v5_MOD_VFB 200 #define BSIM4v5_MOD_TOXM 201 #define BSIM4v5_MOD_TCJ 202 #define BSIM4v5_MOD_TCJSW 203 #define BSIM4v5_MOD_TCJSWG 204 #define BSIM4v5_MOD_TPB 205 #define BSIM4v5_MOD_TPBSW 206 #define BSIM4v5_MOD_TPBSWG 207 #define BSIM4v5_MOD_VOFFCV 208 #define BSIM4v5_MOD_GBMIN 209 #define BSIM4v5_MOD_RBDB 210 #define BSIM4v5_MOD_RBSB 211 #define BSIM4v5_MOD_RBPB 212 #define BSIM4v5_MOD_RBPS 213 #define BSIM4v5_MOD_RBPD 214 #define BSIM4v5_MOD_DMCG 215 #define BSIM4v5_MOD_DMCI 216 #define BSIM4v5_MOD_DMDG 217 #define BSIM4v5_MOD_XGW 218 #define BSIM4v5_MOD_XGL 219 #define BSIM4v5_MOD_RSHG 220 #define BSIM4v5_MOD_NGCON 221 #define BSIM4v5_MOD_AGIDL 222 #define BSIM4v5_MOD_BGIDL 223 #define BSIM4v5_MOD_EGIDL 224 #define BSIM4v5_MOD_IJTHSFWD 225 #define BSIM4v5_MOD_XJBVD 226 #define BSIM4v5_MOD_XJBVS 227 #define BSIM4v5_MOD_BVD 228 #define BSIM4v5_MOD_BVS 229 #define BSIM4v5_MOD_TOXP 230 #define BSIM4v5_MOD_DTOX 231 #define BSIM4v5_MOD_XRCRG1 232 #define BSIM4v5_MOD_XRCRG2 233 #define BSIM4v5_MOD_EU 234 #define BSIM4v5_MOD_IJTHSREV 235 #define BSIM4v5_MOD_IJTHDREV 236 #define BSIM4v5_MOD_MINV 237 #define BSIM4v5_MOD_VOFFL 238 #define BSIM4v5_MOD_PDITS 239 #define BSIM4v5_MOD_PDITSD 240 #define BSIM4v5_MOD_PDITSL 241 #define BSIM4v5_MOD_TNOIA 242 #define BSIM4v5_MOD_TNOIB 243 #define BSIM4v5_MOD_NTNOI 244 #define BSIM4v5_MOD_FPROUT 245 #define BSIM4v5_MOD_LPEB 246 #define BSIM4v5_MOD_DVTP0 247 #define BSIM4v5_MOD_DVTP1 248 #define BSIM4v5_MOD_CGIDL 249 #define BSIM4v5_MOD_PHIN 250 #define BSIM4v5_MOD_RDSWMIN 251 #define BSIM4v5_MOD_RSW 252 #define BSIM4v5_MOD_RDW 253 #define BSIM4v5_MOD_RDWMIN 254 #define BSIM4v5_MOD_RSWMIN 255 #define BSIM4v5_MOD_NSD 256 #define BSIM4v5_MOD_CKAPPAD 257 #define BSIM4v5_MOD_DMCGT 258 #define BSIM4v5_MOD_AIGC 259 #define BSIM4v5_MOD_BIGC 260 #define BSIM4v5_MOD_CIGC 261 #define BSIM4v5_MOD_AIGBACC 262 #define BSIM4v5_MOD_BIGBACC 263 #define BSIM4v5_MOD_CIGBACC 264 #define BSIM4v5_MOD_AIGBINV 265 #define BSIM4v5_MOD_BIGBINV 266 #define BSIM4v5_MOD_CIGBINV 267 #define BSIM4v5_MOD_NIGC 268 #define BSIM4v5_MOD_NIGBACC 269 #define BSIM4v5_MOD_NIGBINV 270 #define BSIM4v5_MOD_NTOX 271 #define BSIM4v5_MOD_TOXREF 272 #define BSIM4v5_MOD_EIGBINV 273 #define BSIM4v5_MOD_PIGCD 274 #define BSIM4v5_MOD_POXEDGE 275 #define BSIM4v5_MOD_EPSROX 276 #define BSIM4v5_MOD_AIGSD 277 #define BSIM4v5_MOD_BIGSD 278 #define BSIM4v5_MOD_CIGSD 279 #define BSIM4v5_MOD_JSWGS 280 #define BSIM4v5_MOD_JSWGD 281 #define BSIM4v5_MOD_LAMBDA 282 #define BSIM4v5_MOD_VTL 283 #define BSIM4v5_MOD_LC 284 #define BSIM4v5_MOD_XN 285 #define BSIM4v5_MOD_RNOIA 286 #define BSIM4v5_MOD_RNOIB 287 #define BSIM4v5_MOD_VFBSDOFF 288 #define BSIM4v5_MOD_LINTNOI 289 #define BSIM4v5_MOD_UD 290 #define BSIM4v5_MOD_UD1 291 #define BSIM4v5_MOD_UP 292 #define BSIM4v5_MOD_LP 293 #define BSIM4v5_MOD_TVOFF 294 #define BSIM4v5_MOD_TVFBSDOFF 295 /* Length dependence */ #define BSIM4v5_MOD_LCDSC 301 #define BSIM4v5_MOD_LCDSCB 302 #define BSIM4v5_MOD_LCIT 303 #define BSIM4v5_MOD_LNFACTOR 304 #define BSIM4v5_MOD_LXJ 305 #define BSIM4v5_MOD_LVSAT 306 #define BSIM4v5_MOD_LAT 307 #define BSIM4v5_MOD_LA0 308 #define BSIM4v5_MOD_LA1 309 #define BSIM4v5_MOD_LA2 310 #define BSIM4v5_MOD_LKETA 311 #define BSIM4v5_MOD_LNSUB 312 #define BSIM4v5_MOD_LNDEP 313 #define BSIM4v5_MOD_LNGATE 315 #define BSIM4v5_MOD_LGAMMA1 316 #define BSIM4v5_MOD_LGAMMA2 317 #define BSIM4v5_MOD_LVBX 318 #define BSIM4v5_MOD_LVBM 320 #define BSIM4v5_MOD_LXT 322 #define BSIM4v5_MOD_LK1 325 #define BSIM4v5_MOD_LKT1 326 #define BSIM4v5_MOD_LKT1L 327 #define BSIM4v5_MOD_LK2 328 #define BSIM4v5_MOD_LKT2 329 #define BSIM4v5_MOD_LK3 330 #define BSIM4v5_MOD_LK3B 331 #define BSIM4v5_MOD_LW0 332 #define BSIM4v5_MOD_LLPE0 333 #define BSIM4v5_MOD_LDVT0 334 #define BSIM4v5_MOD_LDVT1 335 #define BSIM4v5_MOD_LDVT2 336 #define BSIM4v5_MOD_LDVT0W 337 #define BSIM4v5_MOD_LDVT1W 338 #define BSIM4v5_MOD_LDVT2W 339 #define BSIM4v5_MOD_LDROUT 340 #define BSIM4v5_MOD_LDSUB 341 #define BSIM4v5_MOD_LVTH0 342 #define BSIM4v5_MOD_LUA 343 #define BSIM4v5_MOD_LUA1 344 #define BSIM4v5_MOD_LUB 345 #define BSIM4v5_MOD_LUB1 346 #define BSIM4v5_MOD_LUC 347 #define BSIM4v5_MOD_LUC1 348 #define BSIM4v5_MOD_LU0 349 #define BSIM4v5_MOD_LUTE 350 #define BSIM4v5_MOD_LVOFF 351 #define BSIM4v5_MOD_LDELTA 352 #define BSIM4v5_MOD_LRDSW 353 #define BSIM4v5_MOD_LPRT 354 #define BSIM4v5_MOD_LLDD 355 #define BSIM4v5_MOD_LETA 356 #define BSIM4v5_MOD_LETA0 357 #define BSIM4v5_MOD_LETAB 358 #define BSIM4v5_MOD_LPCLM 359 #define BSIM4v5_MOD_LPDIBL1 360 #define BSIM4v5_MOD_LPDIBL2 361 #define BSIM4v5_MOD_LPSCBE1 362 #define BSIM4v5_MOD_LPSCBE2 363 #define BSIM4v5_MOD_LPVAG 364 #define BSIM4v5_MOD_LWR 365 #define BSIM4v5_MOD_LDWG 366 #define BSIM4v5_MOD_LDWB 367 #define BSIM4v5_MOD_LB0 368 #define BSIM4v5_MOD_LB1 369 #define BSIM4v5_MOD_LALPHA0 370 #define BSIM4v5_MOD_LBETA0 371 #define BSIM4v5_MOD_LPDIBLB 374 #define BSIM4v5_MOD_LPRWG 375 #define BSIM4v5_MOD_LPRWB 376 #define BSIM4v5_MOD_LCDSCD 377 #define BSIM4v5_MOD_LAGS 378 #define BSIM4v5_MOD_LFRINGE 381 #define BSIM4v5_MOD_LCGSL 383 #define BSIM4v5_MOD_LCGDL 384 #define BSIM4v5_MOD_LCKAPPAS 385 #define BSIM4v5_MOD_LCF 386 #define BSIM4v5_MOD_LCLC 387 #define BSIM4v5_MOD_LCLE 388 #define BSIM4v5_MOD_LVFBCV 389 #define BSIM4v5_MOD_LACDE 390 #define BSIM4v5_MOD_LMOIN 391 #define BSIM4v5_MOD_LNOFF 392 #define BSIM4v5_MOD_LALPHA1 394 #define BSIM4v5_MOD_LVFB 395 #define BSIM4v5_MOD_LVOFFCV 396 #define BSIM4v5_MOD_LAGIDL 397 #define BSIM4v5_MOD_LBGIDL 398 #define BSIM4v5_MOD_LEGIDL 399 #define BSIM4v5_MOD_LXRCRG1 400 #define BSIM4v5_MOD_LXRCRG2 401 #define BSIM4v5_MOD_LEU 402 #define BSIM4v5_MOD_LMINV 403 #define BSIM4v5_MOD_LPDITS 404 #define BSIM4v5_MOD_LPDITSD 405 #define BSIM4v5_MOD_LFPROUT 406 #define BSIM4v5_MOD_LLPEB 407 #define BSIM4v5_MOD_LDVTP0 408 #define BSIM4v5_MOD_LDVTP1 409 #define BSIM4v5_MOD_LCGIDL 410 #define BSIM4v5_MOD_LPHIN 411 #define BSIM4v5_MOD_LRSW 412 #define BSIM4v5_MOD_LRDW 413 #define BSIM4v5_MOD_LNSD 414 #define BSIM4v5_MOD_LCKAPPAD 415 #define BSIM4v5_MOD_LAIGC 416 #define BSIM4v5_MOD_LBIGC 417 #define BSIM4v5_MOD_LCIGC 418 #define BSIM4v5_MOD_LAIGBACC 419 #define BSIM4v5_MOD_LBIGBACC 420 #define BSIM4v5_MOD_LCIGBACC 421 #define BSIM4v5_MOD_LAIGBINV 422 #define BSIM4v5_MOD_LBIGBINV 423 #define BSIM4v5_MOD_LCIGBINV 424 #define BSIM4v5_MOD_LNIGC 425 #define BSIM4v5_MOD_LNIGBACC 426 #define BSIM4v5_MOD_LNIGBINV 427 #define BSIM4v5_MOD_LNTOX 428 #define BSIM4v5_MOD_LEIGBINV 429 #define BSIM4v5_MOD_LPIGCD 430 #define BSIM4v5_MOD_LPOXEDGE 431 #define BSIM4v5_MOD_LAIGSD 432 #define BSIM4v5_MOD_LBIGSD 433 #define BSIM4v5_MOD_LCIGSD 434 #define BSIM4v5_MOD_LLAMBDA 435 #define BSIM4v5_MOD_LVTL 436 #define BSIM4v5_MOD_LXN 437 #define BSIM4v5_MOD_LVFBSDOFF 438 #define BSIM4v5_MOD_LUD 439 #define BSIM4v5_MOD_LUD1 440 #define BSIM4v5_MOD_LUP 441 #define BSIM4v5_MOD_LLP 442 /* Width dependence */ #define BSIM4v5_MOD_WCDSC 481 #define BSIM4v5_MOD_WCDSCB 482 #define BSIM4v5_MOD_WCIT 483 #define BSIM4v5_MOD_WNFACTOR 484 #define BSIM4v5_MOD_WXJ 485 #define BSIM4v5_MOD_WVSAT 486 #define BSIM4v5_MOD_WAT 487 #define BSIM4v5_MOD_WA0 488 #define BSIM4v5_MOD_WA1 489 #define BSIM4v5_MOD_WA2 490 #define BSIM4v5_MOD_WKETA 491 #define BSIM4v5_MOD_WNSUB 492 #define BSIM4v5_MOD_WNDEP 493 #define BSIM4v5_MOD_WNGATE 495 #define BSIM4v5_MOD_WGAMMA1 496 #define BSIM4v5_MOD_WGAMMA2 497 #define BSIM4v5_MOD_WVBX 498 #define BSIM4v5_MOD_WVBM 500 #define BSIM4v5_MOD_WXT 502 #define BSIM4v5_MOD_WK1 505 #define BSIM4v5_MOD_WKT1 506 #define BSIM4v5_MOD_WKT1L 507 #define BSIM4v5_MOD_WK2 508 #define BSIM4v5_MOD_WKT2 509 #define BSIM4v5_MOD_WK3 510 #define BSIM4v5_MOD_WK3B 511 #define BSIM4v5_MOD_WW0 512 #define BSIM4v5_MOD_WLPE0 513 #define BSIM4v5_MOD_WDVT0 514 #define BSIM4v5_MOD_WDVT1 515 #define BSIM4v5_MOD_WDVT2 516 #define BSIM4v5_MOD_WDVT0W 517 #define BSIM4v5_MOD_WDVT1W 518 #define BSIM4v5_MOD_WDVT2W 519 #define BSIM4v5_MOD_WDROUT 520 #define BSIM4v5_MOD_WDSUB 521 #define BSIM4v5_MOD_WVTH0 522 #define BSIM4v5_MOD_WUA 523 #define BSIM4v5_MOD_WUA1 524 #define BSIM4v5_MOD_WUB 525 #define BSIM4v5_MOD_WUB1 526 #define BSIM4v5_MOD_WUC 527 #define BSIM4v5_MOD_WUC1 528 #define BSIM4v5_MOD_WU0 529 #define BSIM4v5_MOD_WUTE 530 #define BSIM4v5_MOD_WVOFF 531 #define BSIM4v5_MOD_WDELTA 532 #define BSIM4v5_MOD_WRDSW 533 #define BSIM4v5_MOD_WPRT 534 #define BSIM4v5_MOD_WLDD 535 #define BSIM4v5_MOD_WETA 536 #define BSIM4v5_MOD_WETA0 537 #define BSIM4v5_MOD_WETAB 538 #define BSIM4v5_MOD_WPCLM 539 #define BSIM4v5_MOD_WPDIBL1 540 #define BSIM4v5_MOD_WPDIBL2 541 #define BSIM4v5_MOD_WPSCBE1 542 #define BSIM4v5_MOD_WPSCBE2 543 #define BSIM4v5_MOD_WPVAG 544 #define BSIM4v5_MOD_WWR 545 #define BSIM4v5_MOD_WDWG 546 #define BSIM4v5_MOD_WDWB 547 #define BSIM4v5_MOD_WB0 548 #define BSIM4v5_MOD_WB1 549 #define BSIM4v5_MOD_WALPHA0 550 #define BSIM4v5_MOD_WBETA0 551 #define BSIM4v5_MOD_WPDIBLB 554 #define BSIM4v5_MOD_WPRWG 555 #define BSIM4v5_MOD_WPRWB 556 #define BSIM4v5_MOD_WCDSCD 557 #define BSIM4v5_MOD_WAGS 558 #define BSIM4v5_MOD_WFRINGE 561 #define BSIM4v5_MOD_WCGSL 563 #define BSIM4v5_MOD_WCGDL 564 #define BSIM4v5_MOD_WCKAPPAS 565 #define BSIM4v5_MOD_WCF 566 #define BSIM4v5_MOD_WCLC 567 #define BSIM4v5_MOD_WCLE 568 #define BSIM4v5_MOD_WVFBCV 569 #define BSIM4v5_MOD_WACDE 570 #define BSIM4v5_MOD_WMOIN 571 #define BSIM4v5_MOD_WNOFF 572 #define BSIM4v5_MOD_WALPHA1 574 #define BSIM4v5_MOD_WVFB 575 #define BSIM4v5_MOD_WVOFFCV 576 #define BSIM4v5_MOD_WAGIDL 577 #define BSIM4v5_MOD_WBGIDL 578 #define BSIM4v5_MOD_WEGIDL 579 #define BSIM4v5_MOD_WXRCRG1 580 #define BSIM4v5_MOD_WXRCRG2 581 #define BSIM4v5_MOD_WEU 582 #define BSIM4v5_MOD_WMINV 583 #define BSIM4v5_MOD_WPDITS 584 #define BSIM4v5_MOD_WPDITSD 585 #define BSIM4v5_MOD_WFPROUT 586 #define BSIM4v5_MOD_WLPEB 587 #define BSIM4v5_MOD_WDVTP0 588 #define BSIM4v5_MOD_WDVTP1 589 #define BSIM4v5_MOD_WCGIDL 590 #define BSIM4v5_MOD_WPHIN 591 #define BSIM4v5_MOD_WRSW 592 #define BSIM4v5_MOD_WRDW 593 #define BSIM4v5_MOD_WNSD 594 #define BSIM4v5_MOD_WCKAPPAD 595 #define BSIM4v5_MOD_WAIGC 596 #define BSIM4v5_MOD_WBIGC 597 #define BSIM4v5_MOD_WCIGC 598 #define BSIM4v5_MOD_WAIGBACC 599 #define BSIM4v5_MOD_WBIGBACC 600 #define BSIM4v5_MOD_WCIGBACC 601 #define BSIM4v5_MOD_WAIGBINV 602 #define BSIM4v5_MOD_WBIGBINV 603 #define BSIM4v5_MOD_WCIGBINV 604 #define BSIM4v5_MOD_WNIGC 605 #define BSIM4v5_MOD_WNIGBACC 606 #define BSIM4v5_MOD_WNIGBINV 607 #define BSIM4v5_MOD_WNTOX 608 #define BSIM4v5_MOD_WEIGBINV 609 #define BSIM4v5_MOD_WPIGCD 610 #define BSIM4v5_MOD_WPOXEDGE 611 #define BSIM4v5_MOD_WAIGSD 612 #define BSIM4v5_MOD_WBIGSD 613 #define BSIM4v5_MOD_WCIGSD 614 #define BSIM4v5_MOD_WLAMBDA 615 #define BSIM4v5_MOD_WVTL 616 #define BSIM4v5_MOD_WXN 617 #define BSIM4v5_MOD_WVFBSDOFF 618 #define BSIM4v5_MOD_WUD 619 #define BSIM4v5_MOD_WUD1 620 #define BSIM4v5_MOD_WUP 621 #define BSIM4v5_MOD_WLP 622 /* Cross-term dependence */ #define BSIM4v5_MOD_PCDSC 661 #define BSIM4v5_MOD_PCDSCB 662 #define BSIM4v5_MOD_PCIT 663 #define BSIM4v5_MOD_PNFACTOR 664 #define BSIM4v5_MOD_PXJ 665 #define BSIM4v5_MOD_PVSAT 666 #define BSIM4v5_MOD_PAT 667 #define BSIM4v5_MOD_PA0 668 #define BSIM4v5_MOD_PA1 669 #define BSIM4v5_MOD_PA2 670 #define BSIM4v5_MOD_PKETA 671 #define BSIM4v5_MOD_PNSUB 672 #define BSIM4v5_MOD_PNDEP 673 #define BSIM4v5_MOD_PNGATE 675 #define BSIM4v5_MOD_PGAMMA1 676 #define BSIM4v5_MOD_PGAMMA2 677 #define BSIM4v5_MOD_PVBX 678 #define BSIM4v5_MOD_PVBM 680 #define BSIM4v5_MOD_PXT 682 #define BSIM4v5_MOD_PK1 685 #define BSIM4v5_MOD_PKT1 686 #define BSIM4v5_MOD_PKT1L 687 #define BSIM4v5_MOD_PK2 688 #define BSIM4v5_MOD_PKT2 689 #define BSIM4v5_MOD_PK3 690 #define BSIM4v5_MOD_PK3B 691 #define BSIM4v5_MOD_PW0 692 #define BSIM4v5_MOD_PLPE0 693 #define BSIM4v5_MOD_PDVT0 694 #define BSIM4v5_MOD_PDVT1 695 #define BSIM4v5_MOD_PDVT2 696 #define BSIM4v5_MOD_PDVT0W 697 #define BSIM4v5_MOD_PDVT1W 698 #define BSIM4v5_MOD_PDVT2W 699 #define BSIM4v5_MOD_PDROUT 700 #define BSIM4v5_MOD_PDSUB 701 #define BSIM4v5_MOD_PVTH0 702 #define BSIM4v5_MOD_PUA 703 #define BSIM4v5_MOD_PUA1 704 #define BSIM4v5_MOD_PUB 705 #define BSIM4v5_MOD_PUB1 706 #define BSIM4v5_MOD_PUC 707 #define BSIM4v5_MOD_PUC1 708 #define BSIM4v5_MOD_PU0 709 #define BSIM4v5_MOD_PUTE 710 #define BSIM4v5_MOD_PVOFF 711 #define BSIM4v5_MOD_PDELTA 712 #define BSIM4v5_MOD_PRDSW 713 #define BSIM4v5_MOD_PPRT 714 #define BSIM4v5_MOD_PLDD 715 #define BSIM4v5_MOD_PETA 716 #define BSIM4v5_MOD_PETA0 717 #define BSIM4v5_MOD_PETAB 718 #define BSIM4v5_MOD_PPCLM 719 #define BSIM4v5_MOD_PPDIBL1 720 #define BSIM4v5_MOD_PPDIBL2 721 #define BSIM4v5_MOD_PPSCBE1 722 #define BSIM4v5_MOD_PPSCBE2 723 #define BSIM4v5_MOD_PPVAG 724 #define BSIM4v5_MOD_PWR 725 #define BSIM4v5_MOD_PDWG 726 #define BSIM4v5_MOD_PDWB 727 #define BSIM4v5_MOD_PB0 728 #define BSIM4v5_MOD_PB1 729 #define BSIM4v5_MOD_PALPHA0 730 #define BSIM4v5_MOD_PBETA0 731 #define BSIM4v5_MOD_PPDIBLB 734 #define BSIM4v5_MOD_PPRWG 735 #define BSIM4v5_MOD_PPRWB 736 #define BSIM4v5_MOD_PCDSCD 737 #define BSIM4v5_MOD_PAGS 738 #define BSIM4v5_MOD_PFRINGE 741 #define BSIM4v5_MOD_PCGSL 743 #define BSIM4v5_MOD_PCGDL 744 #define BSIM4v5_MOD_PCKAPPAS 745 #define BSIM4v5_MOD_PCF 746 #define BSIM4v5_MOD_PCLC 747 #define BSIM4v5_MOD_PCLE 748 #define BSIM4v5_MOD_PVFBCV 749 #define BSIM4v5_MOD_PACDE 750 #define BSIM4v5_MOD_PMOIN 751 #define BSIM4v5_MOD_PNOFF 752 #define BSIM4v5_MOD_PALPHA1 754 #define BSIM4v5_MOD_PVFB 755 #define BSIM4v5_MOD_PVOFFCV 756 #define BSIM4v5_MOD_PAGIDL 757 #define BSIM4v5_MOD_PBGIDL 758 #define BSIM4v5_MOD_PEGIDL 759 #define BSIM4v5_MOD_PXRCRG1 760 #define BSIM4v5_MOD_PXRCRG2 761 #define BSIM4v5_MOD_PEU 762 #define BSIM4v5_MOD_PMINV 763 #define BSIM4v5_MOD_PPDITS 764 #define BSIM4v5_MOD_PPDITSD 765 #define BSIM4v5_MOD_PFPROUT 766 #define BSIM4v5_MOD_PLPEB 767 #define BSIM4v5_MOD_PDVTP0 768 #define BSIM4v5_MOD_PDVTP1 769 #define BSIM4v5_MOD_PCGIDL 770 #define BSIM4v5_MOD_PPHIN 771 #define BSIM4v5_MOD_PRSW 772 #define BSIM4v5_MOD_PRDW 773 #define BSIM4v5_MOD_PNSD 774 #define BSIM4v5_MOD_PCKAPPAD 775 #define BSIM4v5_MOD_PAIGC 776 #define BSIM4v5_MOD_PBIGC 777 #define BSIM4v5_MOD_PCIGC 778 #define BSIM4v5_MOD_PAIGBACC 779 #define BSIM4v5_MOD_PBIGBACC 780 #define BSIM4v5_MOD_PCIGBACC 781 #define BSIM4v5_MOD_PAIGBINV 782 #define BSIM4v5_MOD_PBIGBINV 783 #define BSIM4v5_MOD_PCIGBINV 784 #define BSIM4v5_MOD_PNIGC 785 #define BSIM4v5_MOD_PNIGBACC 786 #define BSIM4v5_MOD_PNIGBINV 787 #define BSIM4v5_MOD_PNTOX 788 #define BSIM4v5_MOD_PEIGBINV 789 #define BSIM4v5_MOD_PPIGCD 790 #define BSIM4v5_MOD_PPOXEDGE 791 #define BSIM4v5_MOD_PAIGSD 792 #define BSIM4v5_MOD_PBIGSD 793 #define BSIM4v5_MOD_PCIGSD 794 #define BSIM4v5_MOD_SAREF 795 #define BSIM4v5_MOD_SBREF 796 #define BSIM4v5_MOD_KU0 797 #define BSIM4v5_MOD_KVSAT 798 #define BSIM4v5_MOD_TKU0 799 #define BSIM4v5_MOD_LLODKU0 800 #define BSIM4v5_MOD_WLODKU0 801 #define BSIM4v5_MOD_LLODVTH 802 #define BSIM4v5_MOD_WLODVTH 803 #define BSIM4v5_MOD_LKU0 804 #define BSIM4v5_MOD_WKU0 805 #define BSIM4v5_MOD_PKU0 806 #define BSIM4v5_MOD_KVTH0 807 #define BSIM4v5_MOD_LKVTH0 808 #define BSIM4v5_MOD_WKVTH0 809 #define BSIM4v5_MOD_PKVTH0 810 #define BSIM4v5_MOD_WLOD 811 #define BSIM4v5_MOD_STK2 812 #define BSIM4v5_MOD_LODK2 813 #define BSIM4v5_MOD_STETA0 814 #define BSIM4v5_MOD_LODETA0 815 #define BSIM4v5_MOD_WEB 816 #define BSIM4v5_MOD_WEC 817 #define BSIM4v5_MOD_KVTH0WE 818 #define BSIM4v5_MOD_K2WE 819 #define BSIM4v5_MOD_KU0WE 820 #define BSIM4v5_MOD_SCREF 821 #define BSIM4v5_MOD_WPEMOD 822 #define BSIM4v5_MOD_PLAMBDA 825 #define BSIM4v5_MOD_PVTL 826 #define BSIM4v5_MOD_PXN 827 #define BSIM4v5_MOD_PVFBSDOFF 828 #define BSIM4v5_MOD_TNOM 831 #define BSIM4v5_MOD_CGSO 832 #define BSIM4v5_MOD_CGDO 833 #define BSIM4v5_MOD_CGBO 834 #define BSIM4v5_MOD_XPART 835 #define BSIM4v5_MOD_RSH 836 #define BSIM4v5_MOD_JSS 837 #define BSIM4v5_MOD_PBS 838 #define BSIM4v5_MOD_MJS 839 #define BSIM4v5_MOD_PBSWS 840 #define BSIM4v5_MOD_MJSWS 841 #define BSIM4v5_MOD_CJS 842 #define BSIM4v5_MOD_CJSWS 843 #define BSIM4v5_MOD_NMOS 844 #define BSIM4v5_MOD_PMOS 845 #define BSIM4v5_MOD_NOIA 846 #define BSIM4v5_MOD_NOIB 847 #define BSIM4v5_MOD_NOIC 848 #define BSIM4v5_MOD_LINT 849 #define BSIM4v5_MOD_LL 850 #define BSIM4v5_MOD_LLN 851 #define BSIM4v5_MOD_LW 852 #define BSIM4v5_MOD_LWN 853 #define BSIM4v5_MOD_LWL 854 #define BSIM4v5_MOD_LMIN 855 #define BSIM4v5_MOD_LMAX 856 #define BSIM4v5_MOD_WINT 857 #define BSIM4v5_MOD_WL 858 #define BSIM4v5_MOD_WLN 859 #define BSIM4v5_MOD_WW 860 #define BSIM4v5_MOD_WWN 861 #define BSIM4v5_MOD_WWL 862 #define BSIM4v5_MOD_WMIN 863 #define BSIM4v5_MOD_WMAX 864 #define BSIM4v5_MOD_DWC 865 #define BSIM4v5_MOD_DLC 866 #define BSIM4v5_MOD_XL 867 #define BSIM4v5_MOD_XW 868 #define BSIM4v5_MOD_EM 869 #define BSIM4v5_MOD_EF 870 #define BSIM4v5_MOD_AF 871 #define BSIM4v5_MOD_KF 872 #define BSIM4v5_MOD_NJS 873 #define BSIM4v5_MOD_XTIS 874 #define BSIM4v5_MOD_PBSWGS 875 #define BSIM4v5_MOD_MJSWGS 876 #define BSIM4v5_MOD_CJSWGS 877 #define BSIM4v5_MOD_JSWS 878 #define BSIM4v5_MOD_LLC 879 #define BSIM4v5_MOD_LWC 880 #define BSIM4v5_MOD_LWLC 881 #define BSIM4v5_MOD_WLC 882 #define BSIM4v5_MOD_WWC 883 #define BSIM4v5_MOD_WWLC 884 #define BSIM4v5_MOD_DWJ 885 #define BSIM4v5_MOD_JSD 886 #define BSIM4v5_MOD_PBD 887 #define BSIM4v5_MOD_MJD 888 #define BSIM4v5_MOD_PBSWD 889 #define BSIM4v5_MOD_MJSWD 890 #define BSIM4v5_MOD_CJD 891 #define BSIM4v5_MOD_CJSWD 892 #define BSIM4v5_MOD_NJD 893 #define BSIM4v5_MOD_XTID 894 #define BSIM4v5_MOD_PBSWGD 895 #define BSIM4v5_MOD_MJSWGD 896 #define BSIM4v5_MOD_CJSWGD 897 #define BSIM4v5_MOD_JSWD 898 #define BSIM4v5_MOD_DLCIG 899 /* trap-assisted tunneling */ #define BSIM4v5_MOD_JTSS 900 #define BSIM4v5_MOD_JTSD 901 #define BSIM4v5_MOD_JTSSWS 902 #define BSIM4v5_MOD_JTSSWD 903 #define BSIM4v5_MOD_JTSSWGS 904 #define BSIM4v5_MOD_JTSSWGD 905 #define BSIM4v5_MOD_NJTS 906 #define BSIM4v5_MOD_NJTSSW 907 #define BSIM4v5_MOD_NJTSSWG 908 #define BSIM4v5_MOD_XTSS 909 #define BSIM4v5_MOD_XTSD 910 #define BSIM4v5_MOD_XTSSWS 911 #define BSIM4v5_MOD_XTSSWD 912 #define BSIM4v5_MOD_XTSSWGS 913 #define BSIM4v5_MOD_XTSSWGD 914 #define BSIM4v5_MOD_TNJTS 915 #define BSIM4v5_MOD_TNJTSSW 916 #define BSIM4v5_MOD_TNJTSSWG 917 #define BSIM4v5_MOD_VTSS 918 #define BSIM4v5_MOD_VTSD 919 #define BSIM4v5_MOD_VTSSWS 920 #define BSIM4v5_MOD_VTSSWD 921 #define BSIM4v5_MOD_VTSSWGS 922 #define BSIM4v5_MOD_VTSSWGD 923 #define BSIM4v5_MOD_PUD 924 #define BSIM4v5_MOD_PUD1 925 #define BSIM4v5_MOD_PUP 926 #define BSIM4v5_MOD_PLP 927 /* device questions */ #define BSIM4v5_DNODE 945 #define BSIM4v5_GNODEEXT 946 #define BSIM4v5_SNODE 947 #define BSIM4v5_BNODE 948 #define BSIM4v5_DNODEPRIME 949 #define BSIM4v5_GNODEPRIME 950 #define BSIM4v5_GNODEMIDE 951 #define BSIM4v5_GNODEMID 952 #define BSIM4v5_SNODEPRIME 953 #define BSIM4v5_BNODEPRIME 954 #define BSIM4v5_DBNODE 955 #define BSIM4v5_SBNODE 956 #define BSIM4v5_VBD 957 #define BSIM4v5_VBS 958 #define BSIM4v5_VGS 959 #define BSIM4v5_VDS 960 #define BSIM4v5_CD 961 #define BSIM4v5_CBS 962 #define BSIM4v5_CBD 963 #define BSIM4v5_GM 964 #define BSIM4v5_GDS 965 #define BSIM4v5_GMBS 966 #define BSIM4v5_GBD 967 #define BSIM4v5_GBS 968 #define BSIM4v5_QB 969 #define BSIM4v5_CQB 970 #define BSIM4v5_QG 971 #define BSIM4v5_CQG 972 #define BSIM4v5_QD 973 #define BSIM4v5_CQD 974 #define BSIM4v5_CGGB 975 #define BSIM4v5_CGDB 976 #define BSIM4v5_CGSB 977 #define BSIM4v5_CBGB 978 #define BSIM4v5_CAPBD 979 #define BSIM4v5_CQBD 980 #define BSIM4v5_CAPBS 981 #define BSIM4v5_CQBS 982 #define BSIM4v5_CDGB 983 #define BSIM4v5_CDDB 984 #define BSIM4v5_CDSB 985 #define BSIM4v5_VON 986 #define BSIM4v5_VDSAT 987 #define BSIM4v5_QBS 988 #define BSIM4v5_QBD 989 #define BSIM4v5_SOURCECONDUCT 990 #define BSIM4v5_DRAINCONDUCT 991 #define BSIM4v5_CBDB 992 #define BSIM4v5_CBSB 993 #define BSIM4v5_CSUB 994 #define BSIM4v5_QINV 995 #define BSIM4v5_IGIDL 996 #define BSIM4v5_CSGB 997 #define BSIM4v5_CSDB 998 #define BSIM4v5_CSSB 999 #define BSIM4v5_CGBB 1000 #define BSIM4v5_CDBB 1001 #define BSIM4v5_CSBB 1002 #define BSIM4v5_CBBB 1003 #define BSIM4v5_QS 1004 #define BSIM4v5_IGISL 1005 #define BSIM4v5_IGS 1006 #define BSIM4v5_IGD 1007 #define BSIM4v5_IGB 1008 #define BSIM4v5_IGCS 1009 #define BSIM4v5_IGCD 1010 #define BSIM4v5_QDEF 1011 #define BSIM4v5_DELVT0 1012 #define BSIM4v5_GCRG 1013 #define BSIM4v5_GTAU 1014 #define BSIM4v5_MOD_LTVOFF 1051 #define BSIM4v5_MOD_LTVFBSDOFF 1052 #define BSIM4v5_MOD_WTVOFF 1053 #define BSIM4v5_MOD_WTVFBSDOFF 1054 #define BSIM4v5_MOD_PTVOFF 1055 #define BSIM4v5_MOD_PTVFBSDOFF 1056 #define BSIM4v5_MOD_LKVTH0WE 1061 #define BSIM4v5_MOD_LK2WE 1062 #define BSIM4v5_MOD_LKU0WE 1063 #define BSIM4v5_MOD_WKVTH0WE 1064 #define BSIM4v5_MOD_WK2WE 1065 #define BSIM4v5_MOD_WKU0WE 1066 #define BSIM4v5_MOD_PKVTH0WE 1067 #define BSIM4v5_MOD_PK2WE 1068 #define BSIM4v5_MOD_PKU0WE 1069 #define BSIM4v5_MOD_RBPS0 1101 #define BSIM4v5_MOD_RBPSL 1102 #define BSIM4v5_MOD_RBPSW 1103 #define BSIM4v5_MOD_RBPSNF 1104 #define BSIM4v5_MOD_RBPD0 1105 #define BSIM4v5_MOD_RBPDL 1106 #define BSIM4v5_MOD_RBPDW 1107 #define BSIM4v5_MOD_RBPDNF 1108 #define BSIM4v5_MOD_RBPBX0 1109 #define BSIM4v5_MOD_RBPBXL 1110 #define BSIM4v5_MOD_RBPBXW 1111 #define BSIM4v5_MOD_RBPBXNF 1112 #define BSIM4v5_MOD_RBPBY0 1113 #define BSIM4v5_MOD_RBPBYL 1114 #define BSIM4v5_MOD_RBPBYW 1115 #define BSIM4v5_MOD_RBPBYNF 1116 #define BSIM4v5_MOD_RBSBX0 1117 #define BSIM4v5_MOD_RBSBY0 1118 #define BSIM4v5_MOD_RBDBX0 1119 #define BSIM4v5_MOD_RBDBY0 1120 #define BSIM4v5_MOD_RBSDBXL 1121 #define BSIM4v5_MOD_RBSDBXW 1122 #define BSIM4v5_MOD_RBSDBXNF 1123 #define BSIM4v5_MOD_RBSDBYL 1124 #define BSIM4v5_MOD_RBSDBYW 1125 #define BSIM4v5_MOD_RBSDBYNF 1126 #define BSIM4v5_MOD_VGS_MAX 1201 #define BSIM4v5_MOD_VGD_MAX 1202 #define BSIM4v5_MOD_VGB_MAX 1203 #define BSIM4v5_MOD_VDS_MAX 1204 #define BSIM4v5_MOD_VBS_MAX 1205 #define BSIM4v5_MOD_VBD_MAX 1206 #include "bsim4v5ext.h" extern void BSIM4v5evaluate(double,double,double,BSIM4v5instance*,BSIM4v5model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM4v5debug(BSIM4v5model*, BSIM4v5instance*, CKTcircuit*, int); extern int BSIM4v5checkModel(BSIM4v5model*, BSIM4v5instance*, CKTcircuit*); extern int BSIM4v5PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); extern int BSIM4v5RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); #endif /*BSIM4v5*/ ngspice-26/src/spicelib/devices/asrc/0000755000265600020320000000000012264261705017162 5ustar andreasadminngspice-26/src/spicelib/devices/asrc/asrcitf.h0000644000265600020320000000026712264261473020775 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_ASRC #define DEV_ASRC extern SPICEdev *get_asrc_info(void); #endif ngspice-26/src/spicelib/devices/asrc/asrcask.c0000644000265600020320000000361712264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ /* * This routine gives access to the internal device parameters * of Current Controlled Voltage Source */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int ASRCask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select) { ASRCinstance *here = (ASRCinstance*)instPtr; NG_IGNORE(select); switch(which) { case ASRC_TEMP: value->rValue = here->ASRCtemp - CONSTCtoK; return(OK); case ASRC_DTEMP: value->rValue = here->ASRCdtemp; return(OK); case ASRC_TC1: value->rValue = here->ASRCtc1; return(OK); case ASRC_TC2: value->rValue = here->ASRCtc2; return(OK); case ASRC_CURRENT: value->tValue = here->ASRCtype == ASRC_CURRENT ? here->ASRCtree : NULL; return (OK); case ASRC_VOLTAGE: value->tValue = here->ASRCtype == ASRC_VOLTAGE ? here->ASRCtree : NULL; return (OK); case ASRC_POS_NODE: value->iValue = here->ASRCposNode; return (OK); case ASRC_NEG_NODE: value->iValue = here->ASRCnegNode; return (OK); case ASRC_OUTPUTCURRENT: value->rValue = ckt->CKTrhsOld[here->ASRCbranch]; return (OK); case ASRC_OUTPUTVOLTAGE: value->rValue = ckt->CKTrhsOld[here->ASRCposNode] - ckt->CKTrhsOld[here->ASRCnegNode]; return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/asrc/asrcinit.c0000644000265600020320000000403512264261473021146 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "asrcitf.h" #include "asrcext.h" #include "asrcinit.h" SPICEdev ASRCinfo = { { "ASRC", "Arbitrary Source ", &ASRCnSize, &ASRCnSize, ASRCnames, &ASRCpTSize, ASRCpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ ASRCparam, /* DEVmodParam */ NULL, /* DEVload */ ASRCload, /* DEVsetup */ ASRCsetup, /* DEVunsetup */ ASRCunsetup, /* DEVpzSetup */ ASRCsetup, /* DEVtemperature*/ ASRCtemp, /* DEVtrunc */ NULL, /* DEVfindBranch */ ASRCfindBr, /* DEVacLoad */ ASRCacLoad, /* ac and normal load functions NOT identical */ /* DEVaccept */ NULL, /* DEVdestroy */ ASRCdestroy, /* DEVmodDelete */ ASRCmDelete, /* DEVdelete */ ASRCdelete, /* DEVsetic */ NULL, /* DEVask */ ASRCask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ ASRCpzLoad, /* DEVconvTest */ ASRCconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &ASRCiSize, /* DEVmodSize */ &ASRCmSize }; SPICEdev * get_asrc_info(void) { return &ASRCinfo; } ngspice-26/src/spicelib/devices/asrc/asrcacld.c0000644000265600020320000000464412264261473021114 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int ASRCacLoad(GENmodel *inModel, CKTcircuit *ckt) { /* * Actually load the current voltage value into the * sparse matrix previously provided. The values have * been precomputed and stored with the instance model. */ ASRCmodel *model = (ASRCmodel*) inModel; ASRCinstance *here; int i, j; double *derivs; double difference; double factor; NG_IGNORE(ckt); /* loop through all the Arbitrary source models */ for( ; model != NULL; model = model->ASRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ASRCinstances; here != NULL ; here = here->ASRCnextInstance) { difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15; factor = 1.0 + (here->ASRCtc1)*difference + (here->ASRCtc2)*difference*difference; if(here->ASRCreciproctc == 1) { factor = 1/factor; } /* * Get the function and its derivatives from the * field in the instance structure. The field is * an array of doubles holding the rhs, and the * entries of the jacobian. */ j=0; derivs = here->ASRCacValues; if( here->ASRCtype == ASRC_VOLTAGE) { *(here->ASRCposptr[j++]) += 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) += 1.0; } for(i=0; i < here->ASRCtree->numVars; i++) { switch(here->ASRCtree->varTypes[i]) { case IF_INSTANCE: if( here->ASRCtype == ASRC_VOLTAGE) { /* CCVS */ *(here->ASRCposptr[j++]) -= derivs[i] / factor; } else{ /* CCCS */ *(here->ASRCposptr[j++]) += derivs[i] / factor; *(here->ASRCposptr[j++]) -= derivs[i] / factor; } break; case IF_NODE: if(here->ASRCtype == ASRC_VOLTAGE) { /* VCVS */ *(here->ASRCposptr[j++]) -= derivs[i] / factor; } else { /* VCCS */ *(here->ASRCposptr[j++]) += derivs[i] / factor; *(here->ASRCposptr[j++]) -= derivs[i] / factor; } break; default: return(E_BADPARM); } } } } return(OK); } ngspice-26/src/spicelib/devices/asrc/asrcdel.c0000644000265600020320000000162112264261473020745 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ASRCdelete(GENmodel *model, IFuid name, GENinstance **fast) { ASRCinstance **instPtr = (ASRCinstance**)fast; ASRCmodel *modPtr = (ASRCmodel*)model; ASRCinstance **prev = NULL; ASRCinstance *here; for( ; modPtr ; modPtr = modPtr->ASRCnextModel) { prev = &(modPtr->ASRCinstances); for(here = *prev; here ; here = *prev) { if(here->ASRCname == name || (instPtr && here==*instPtr) ) { *prev= here->ASRCnextInstance; FREE(here); return(OK); } prev = &(here->ASRCnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/asrc/asrcdest.c0000644000265600020320000000154712264261473021147 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ #include "ngspice/ngspice.h" #include "asrcdefs.h" #include "ngspice/suffix.h" #include "ngspice/inpdefs.h" void ASRCdestroy(GENmodel **model) { ASRCmodel **start = (ASRCmodel**)model; /* starting model */ ASRCinstance *here; /* current instance */ ASRCinstance *next; ASRCmodel *mod = *start; /* current model */ ASRCmodel *nextmod; for( ; mod ; mod = nextmod) { for(here = mod->ASRCinstances ; here ; here = next) { next = here->ASRCnextInstance; FREE(here->ASRCacValues); INPfreeTree(here->ASRCtree); if(here->ASRCposptr) free(here->ASRCposptr); FREE(here); } nextmod = mod->ASRCnextModel; FREE(mod); } *model = NULL; } ngspice-26/src/spicelib/devices/asrc/asrcload.c0000644000265600020320000001145412264261473021125 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" double *asrc_vals, *asrc_derivs; int asrc_nvals; /*ARGSUSED*/ int ASRCload(GENmodel *inModel, CKTcircuit *ckt) { /* actually load the current voltage value into the * sparse matrix previously provided */ ASRCmodel *model = (ASRCmodel*) inModel; ASRCinstance *here; int i, j; double rhs; double difference; double factor; /* loop through all the Arbitrary source models */ for( ; model != NULL; model = model->ASRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ASRCinstances; here != NULL ; here=here->ASRCnextInstance) { difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15; factor = 1.0 + (here->ASRCtc1)*difference + (here->ASRCtc2)*difference*difference; if(here->ASRCreciproctc == 1) { factor = 1/factor; } /* * Get the function and its derivatives evaluated */ i = here->ASRCtree->numVars; if (asrc_nvals < i) { if (asrc_nvals) { FREE(asrc_vals); FREE(asrc_derivs); } asrc_nvals = i; asrc_vals = NEWN(double, i); asrc_derivs = NEWN(double, i); } j=0; /* * Fill the vector of values from the previous solution */ for( i=0; i < here->ASRCtree->numVars; i++) if( here->ASRCtree->varTypes[i] == IF_INSTANCE) { int branch = CKTfndBranch(ckt, here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld + branch); } else { int node_num = (here->ASRCtree->vars[i].nValue) -> number; asrc_vals[i] = *(ckt->CKTrhsOld + node_num); } if (here->ASRCtree->IFeval (here->ASRCtree, ckt->CKTgmin, &rhs, asrc_vals, asrc_derivs) != OK) return(E_BADPARM); /* The convergence test */ here->ASRCprev_value = rhs; /* The ac load precomputation and storage */ if (ckt->CKTmode & MODEINITSMSIG) { int size = (here->ASRCtree->numVars) + 1 ; here->ASRCacValues = NEWN(double, size); for ( i = 0; i < here->ASRCtree->numVars; i++) here->ASRCacValues[i] = asrc_derivs[i]; } if( here->ASRCtype == ASRC_VOLTAGE) { *(here->ASRCposptr[j++]) += 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) += 1.0; } for(i=0; i < here->ASRCtree->numVars; i++) { rhs -= (asrc_vals[i] * asrc_derivs[i]); switch(here->ASRCtree->varTypes[i]) { case IF_INSTANCE: if( here->ASRCtype == ASRC_VOLTAGE) { /* CCVS */ *(here->ASRCposptr[j++]) -= asrc_derivs[i] * factor; } else{ /* CCCS */ *(here->ASRCposptr[j++]) += asrc_derivs[i] * factor; *(here->ASRCposptr[j++]) -= asrc_derivs[i] * factor; } break; case IF_NODE: if(here->ASRCtype == ASRC_VOLTAGE) { /* VCVS */ *(here->ASRCposptr[j++]) -= asrc_derivs[i] * factor; } else { /* VCCS */ *(here->ASRCposptr[j++]) += asrc_derivs[i] * factor; *(here->ASRCposptr[j++]) -= asrc_derivs[i] * factor; } break; default: return(E_BADPARM); } } /* Insert the RHS */ if( here->ASRCtype == ASRC_VOLTAGE) { *(ckt->CKTrhs+(here->ASRCbranch)) += factor * rhs; } else { *(ckt->CKTrhs+(here->ASRCposNode)) -= factor * rhs; *(ckt->CKTrhs+(here->ASRCnegNode)) += factor * rhs; } /* Store the rhs for small signal analysis */ if (ckt->CKTmode & MODEINITSMSIG) { here->ASRCacValues[here->ASRCtree->numVars] = factor * rhs; } } } return(OK); } ngspice-26/src/spicelib/devices/asrc/asrcpar.c0000644000265600020320000000227312264261473020767 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int ASRCparam(int param, IFvalue *value, GENinstance *fast, IFvalue *select) { ASRCinstance *here = (ASRCinstance*)fast; NG_IGNORE(select); switch(param) { case ASRC_VOLTAGE: here->ASRCtype = ASRC_VOLTAGE; here->ASRCtree = value->tValue; break; case ASRC_CURRENT: here->ASRCtype = ASRC_CURRENT; here->ASRCtree = value->tValue; break; case ASRC_TC1: here->ASRCtc1 = value->rValue; here->ASRCtc1Given = TRUE; break; case ASRC_TC2: here->ASRCtc2 = value->rValue; here->ASRCtc2Given = TRUE; break; case ASRC_RTC: here->ASRCreciproctc = value->iValue; here->ASRCreciproctcGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/asrc/asrcfbr.c0000644000265600020320000000200512264261473020747 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ASRCfindBr(CKTcircuit *ckt, GENmodel *inputModel, IFuid name) { ASRCinstance *here; ASRCmodel *model = (ASRCmodel*)inputModel; int error; CKTnode *tmp; for( ; model != NULL; model = model->ASRCnextModel) { for (here = model->ASRCinstances; here != NULL; here = here->ASRCnextInstance) { if(here->ASRCname == name) { if(here->ASRCbranch == 0) { error = CKTmkCur(ckt,&tmp, here->ASRCname,"branch"); if(error) return(error); here->ASRCbranch = tmp->number; } return(here->ASRCbranch); } } } return(0); } ngspice-26/src/spicelib/devices/asrc/asrcpzld.c0000644000265600020320000000722612264261473021161 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/complex.h" /*ARGSUSED*/ int ASRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current voltage value into the * sparse matrix previously provided */ { ASRCmodel *model = (ASRCmodel*) inModel; ASRCinstance *here; double value; int i, j; double difference; double factor; NG_IGNORE(s); /* loop through all the Arbitrary source models */ for( ; model != NULL; model = model->ASRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ASRCinstances; here != NULL ; here=here->ASRCnextInstance) { difference = (here->ASRCtemp + here->ASRCdtemp) - 300.15; factor = 1.0 + (here->ASRCtc1)*difference + (here->ASRCtc2)*difference*difference; if(here->ASRCreciproctc == 1) { factor = 1/factor; } j = 0; /* Get the function evaluated and the derivatives too */ i = here->ASRCtree->numVars; if (asrc_nvals < i) { if (asrc_nvals) { FREE(asrc_vals); FREE(asrc_derivs); } asrc_nvals = i; asrc_vals = NEWN(double, i); asrc_derivs = NEWN(double, i); } /* Fill the vector of values from the previous solution */ for( i=0; i < here->ASRCtree->numVars; i++) { if( here->ASRCtree->varTypes[i] == IF_INSTANCE) { int branch = CKTfndBranch(ckt,here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld + branch); } else { int node_num = (here->ASRCtree->vars[i].nValue) -> number; asrc_vals[i] = *(ckt->CKTrhsOld + node_num); } } if(here->ASRCtree->IFeval (here->ASRCtree, ckt->CKTgmin, &value, asrc_vals, asrc_derivs) != OK) return(E_BADPARM); if( here->ASRCtype == ASRC_VOLTAGE) { *(here->ASRCposptr[j++]) += 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) -= 1.0; *(here->ASRCposptr[j++]) += 1.0; } for(i=0; i < here->ASRCtree->numVars; i++) { switch(here->ASRCtree->varTypes[i]) { case IF_INSTANCE: if( here->ASRCtype == ASRC_VOLTAGE) { /* CCVS */ *(here->ASRCposptr[j++]) -= asrc_derivs[i] / factor; } else { /* CCCS */ *(here->ASRCposptr[j++]) += asrc_derivs[i] / factor; *(here->ASRCposptr[j++]) -= asrc_derivs[i] / factor; } break; case IF_NODE: if(here->ASRCtype == ASRC_VOLTAGE) { /* VCVS */ *(here->ASRCposptr[j++]) -= asrc_derivs[i] / factor; } else { /* VCCS */ *(here->ASRCposptr[j++]) += asrc_derivs[i] / factor; *(here->ASRCposptr[j++]) -= asrc_derivs[i] / factor; } break; default: return(E_BADPARM); } } } } return(OK); } ngspice-26/src/spicelib/devices/asrc/asrcset.c0000644000265600020320000001334212264261473020777 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int ASRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the voltage source structure with those * pointers needed later for fast matrix loading */ { ASRCinstance *here; ASRCmodel *model = (ASRCmodel*)inModel; int error, i, j; int v_first; CKTnode *tmp; NG_IGNORE(states); /* loop through all the user models*/ for( ; model != NULL; model = model->ASRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ASRCinstances; here != NULL ; here=here->ASRCnextInstance) { if(!here->ASRCtc1Given) here->ASRCtc1 = 0.0; if(!here->ASRCtc2Given) here->ASRCtc2 = 0.0; if(!here->ASRCreciproctcGiven) here->ASRCreciproctc = 0; here->ASRCposptr = NULL; j=0; /*strchr of the array holding ptrs to SMP */ v_first = 1; if( here->ASRCtype == ASRC_VOLTAGE){ if(here->ASRCbranch==0) { error = CKTmkCur(ckt,&tmp,here->ASRCname,"branch"); if(error) return(error); here->ASRCbranch = tmp->number; } } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) #define MY_TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, (second)->number)) == NULL){\ return(E_NOMEM);\ } } while(0) /* For each controlling variable set the entries in the vector of the positions of the SMP */ if (!here->ASRCtree) return E_PARMVAL; if( here->ASRCtype == ASRC_VOLTAGE) { if(here->ASRCposNode == here->ASRCnegNode) { SPfrontEnd->IFerror (ERR_FATAL, "instance %s is a shorted ASRC", &here->ASRCname); return(E_UNSUPP); } here->ASRCposptr = TREALLOC(double *, here->ASRCposptr, j + 5); TSTALLOC(ASRCposptr[j++],ASRCposNode,ASRCbranch); TSTALLOC(ASRCposptr[j++],ASRCnegNode,ASRCbranch); TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCnegNode); TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCposNode); } for( i=0; i < here->ASRCtree->numVars; i++){ switch(here->ASRCtree->varTypes[i]){ case IF_INSTANCE: here->ASRCcont_br = CKTfndBranch(ckt, here->ASRCtree->vars[i].uValue); if(here->ASRCcont_br == 0) { IFuid namarray[2]; namarray[0] = here->ASRCname; namarray[1] = here->ASRCtree->vars[i].uValue; SPfrontEnd->IFerror (ERR_FATAL, "%s: unknown controlling source %s",namarray); return(E_BADPARM); } if( here->ASRCtype == ASRC_VOLTAGE){ /* CCVS */ if(v_first){ TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCcont_br); v_first = 0; } else{ here->ASRCposptr = TREALLOC(double *, here->ASRCposptr, j + 1); TSTALLOC(ASRCposptr[j++],ASRCbranch,ASRCcont_br); } } else if(here->ASRCtype == ASRC_CURRENT){ /* CCCS */ here->ASRCposptr = TREALLOC(double *, here->ASRCposptr, j + 2); TSTALLOC(ASRCposptr[j++],ASRCposNode,ASRCcont_br); TSTALLOC(ASRCposptr[j++],ASRCnegNode,ASRCcont_br); } else{ return (E_BADPARM); } break; case IF_NODE: if( here->ASRCtype == ASRC_VOLTAGE){ /* VCVS */ if(v_first){ MY_TSTALLOC(ASRCposptr[j++],ASRCbranch,here->ASRCtree->vars[i].nValue); v_first = 0; } else{ here->ASRCposptr = TREALLOC(double *, here->ASRCposptr, j + 1); MY_TSTALLOC(ASRCposptr[j++],ASRCbranch,here->ASRCtree->vars[i].nValue); } } else if(here->ASRCtype == ASRC_CURRENT){ /* VCCS */ here->ASRCposptr = TREALLOC(double *, here->ASRCposptr, j + 2); MY_TSTALLOC(ASRCposptr[j++],ASRCposNode,here->ASRCtree->vars[i].nValue); MY_TSTALLOC(ASRCposptr[j++],ASRCnegNode,here->ASRCtree->vars[i].nValue); } else{ return (E_BADPARM); } break; default: break; } } } } return(OK); } int ASRCunsetup( GENmodel *inModel, CKTcircuit *ckt) { ASRCmodel *model; ASRCinstance *here; for (model = (ASRCmodel *)inModel; model != NULL; model = model->ASRCnextModel) { for (here = model->ASRCinstances; here != NULL; here=here->ASRCnextInstance) { if (here->ASRCbranch) { CKTdltNNum(ckt, here->ASRCbranch); here->ASRCbranch = 0; } } } return OK; } ngspice-26/src/spicelib/devices/asrc/asrcext.h0000644000265600020320000000145212264261473021010 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int ASRCask(CKTcircuit*,GENinstance *,int,IFvalue *,IFvalue*); extern int ASRCconvTest(GENmodel *,CKTcircuit*); extern int ASRCdelete(GENmodel *,IFuid,GENinstance **); extern void ASRCdestroy(GENmodel**); extern int ASRCfindBr(CKTcircuit *,GENmodel *,IFuid); extern int ASRCload(GENmodel *,CKTcircuit*); extern int ASRCmDelete(GENmodel**,IFuid,GENmodel*); extern int ASRCparam(int,IFvalue*,GENinstance*,IFvalue*); extern int ASRCpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int ASRCacLoad(GENmodel*,CKTcircuit*); extern int ASRCsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int ASRCunsetup(GENmodel*,CKTcircuit*); extern int ASRCtemp(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/asrc/asrcdefs.h0000644000265600020320000000623212264261473021132 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ASRC #define ASRC #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/complex.h" /* * structures to describe Arbitrary sources */ /* information to describe a single instance */ typedef struct sASRCinstance { struct sASRCmodel *ARRCmodPtr; /* backpointer to model */ struct sASRCinstance *ASRCnextInstance; /* pointer to next instance of * current model */ IFuid ASRCname; /* pointer to character string naming this instance */ int ASRCstates; /* state info */ int ASRCposNode; /* number of positive node of source */ int ASRCnegNode; /* number of negative node of source */ int ASRCtype; /* Whether source is voltage or current */ int ASRCbranch; /* number of branch equation added for v source */ IFparseTree *ASRCtree; /* The parse tree */ double ASRCtemp; /* temperature at which this resistor operates */ double ASRCdtemp; /* delta-temperature of a particular instance */ double ASRCtc1; /* first temperature coefficient of resistors */ double ASRCtc2; /* second temperature coefficient of resistors */ int ASRCreciproctc; /* Flag to calculate reciprocal temperature behaviour */ double **ASRCposptr; /* pointer to pointers of the elements * in the sparce matrix */ double ASRCprev_value; /* Previous value for the convergence test */ double *ASRCacValues; /* Store rhs and derivatives for ac anal */ int ASRCcont_br; /* Temporary store for controlling current branch */ unsigned ASRCtempGiven : 1; /* indicates temperature specified */ unsigned ASRCdtempGiven : 1; /* indicates delta-temp specified */ unsigned ASRCtc1Given : 1; /* indicates tc1 parameter specified */ unsigned ASRCtc2Given : 1; /* indicates tc2 parameter specified */ unsigned ASRCreciproctcGiven : 1; /* indicates reciproctc flag parameter specified */ } ASRCinstance ; #define ASRCvOld ASRCstates #define ASRCcontVOld ASRCstates + 1 /* per model data */ typedef struct sASRCmodel { /* model structure for a source */ int ASRCmodType; /* type index of this device */ struct sASRCmodel *ASRCnextModel; /* pointer to next possible model *in linked list */ ASRCinstance * ASRCinstances; /* pointer to list of instances * that have this model */ IFuid ASRCmodName; /* pointer to character string naming this model */ } ASRCmodel; /* device parameters */ #define ASRC_VOLTAGE 1 #define ASRC_CURRENT 2 #define ASRC_POS_NODE 3 #define ASRC_NEG_NODE 4 #define ASRC_PARSE_TREE 5 #define ASRC_OUTPUTVOLTAGE 6 #define ASRC_OUTPUTCURRENT 7 #define ASRC_TEMP 8 #define ASRC_DTEMP 9 #define ASRC_TC1 10 #define ASRC_TC2 11 #define ASRC_RTC 12 /* module-wide variables */ extern double *asrc_vals, *asrc_derivs; extern int asrc_nvals; /* model parameters */ /* device questions */ /* model questions */ #include "asrcext.h" #endif /*ASRC*/ ngspice-26/src/spicelib/devices/asrc/asrc.c0000644000265600020320000000247212264261473020265 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "asrcdefs.h" #include "ngspice/suffix.h" /* Arbitrary source */ IFparm ASRCpTable[] = { /* parameters */ IP( "i", ASRC_CURRENT, IF_PARSETREE, "Current source"), IP( "v", ASRC_VOLTAGE, IF_PARSETREE, "Voltage source"), IOPZU( "temp", ASRC_TEMP, IF_REAL, "Instance operating temperature"), IOPZ( "dtemp", ASRC_DTEMP, IF_REAL, "Instance temperature difference with the rest of the circuit"), IOPU( "tc1", ASRC_TC1, IF_REAL, "First order temp. coefficient"), IOPU( "tc2", ASRC_TC2, IF_REAL, "Second order temp. coefficient"), IOPU( "reciproctc", ASRC_RTC, IF_INTEGER, "Flag to calculate reciprocal temperature behaviour"), OP( "i", ASRC_OUTPUTCURRENT, IF_REAL, "Current through source"), OP( "v", ASRC_OUTPUTVOLTAGE, IF_REAL, "Voltage across source"), OP( "pos_node", ASRC_POS_NODE, IF_INTEGER, "Positive Node"), OP( "neg_node", ASRC_NEG_NODE, IF_INTEGER, "Negative Node") }; char *ASRCnames[] = { "src+", "src-" }; int ASRCnSize = NUMELEMS(ASRCnames); int ASRCpTSize = NUMELEMS(ASRCpTable); int ASRCmPTSize = 0; int ASRCiSize = sizeof(ASRCinstance); int ASRCmSize = sizeof(ASRCmodel); ngspice-26/src/spicelib/devices/asrc/asrcmdel.c0000644000265600020320000000206212264261473021122 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Kanwar Jit Singh **********/ /* * singh@ic.Berkeley.edu */ #include "ngspice/ngspice.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ASRCmDelete(GENmodel **modList, IFuid modname, GENmodel *killModel) { ASRCmodel **model = (ASRCmodel**)modList; ASRCmodel *modfast = (ASRCmodel*)killModel; ASRCinstance *here; ASRCinstance *prev = NULL; ASRCmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->ASRCnextModel)) { if( (*model)->ASRCmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->ASRCnextModel; /* cut deleted device out of list */ for(here = (*model)->ASRCinstances ; here ; here = here->ASRCnextInstance) { FREE(here->ASRCacValues); if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/asrc/asrctemp.c0000644000265600020320000000212012264261473021141 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" int ASRCtemp(GENmodel *inModel, CKTcircuit *ckt) { ASRCmodel *model = (ASRCmodel *)inModel; ASRCinstance *here; /* loop through all the source models */ for( ; model != NULL; model = model->ASRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ASRCinstances; here != NULL ; here=here->ASRCnextInstance) { /* Default Value Processing for Source Instance */ if(!here->ASRCtempGiven) { here->ASRCtemp = ckt->CKTtemp; if(!here->ASRCdtempGiven) here->ASRCdtemp = 0.0; } else { /* ASRCtempGiven */ here->ASRCdtemp = 0.0; if (here->ASRCdtempGiven) printf("%s: Instance temperature specified, dtemp ignored\n", here->ASRCname); } } } return(OK); } ngspice-26/src/spicelib/devices/asrc/Makefile.am0000644000265600020320000000072612264261473021225 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libasrc.la libasrc_la_SOURCES = \ asrc.c \ asrcacld.c \ asrcask.c \ asrcconv.c \ asrcdefs.h \ asrcdel.c \ asrcdest.c \ asrcext.h \ asrcfbr.c \ asrcitf.h \ asrcinit.c \ asrcinit.h \ asrcload.c \ asrcmdel.c \ asrcpar.c \ asrcpzld.c \ asrcset.c \ asrctemp.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/asrc/asrcinit.h0000644000265600020320000000030212264261473021144 0ustar andreasadmin#ifndef _ASRCINIT_H #define _ASRCINIT_H extern IFparm ASRCpTable[ ]; extern char *ASRCnames[ ]; extern int ASRCpTSize; extern int ASRCnSize; extern int ASRCiSize; extern int ASRCmSize; #endif ngspice-26/src/spicelib/devices/asrc/Makefile.in0000644000265600020320000004224412264261535021236 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/asrc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libasrc_la_LIBADD = am_libasrc_la_OBJECTS = asrc.lo asrcacld.lo asrcask.lo asrcconv.lo \ asrcdel.lo asrcdest.lo asrcfbr.lo asrcinit.lo asrcload.lo \ asrcmdel.lo asrcpar.lo asrcpzld.lo asrcset.lo asrctemp.lo libasrc_la_OBJECTS = $(am_libasrc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libasrc_la_SOURCES) DIST_SOURCES = $(libasrc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libasrc.la libasrc_la_SOURCES = \ asrc.c \ asrcacld.c \ asrcask.c \ asrcconv.c \ asrcdefs.h \ asrcdel.c \ asrcdest.c \ asrcext.h \ asrcfbr.c \ asrcitf.h \ asrcinit.c \ asrcinit.h \ asrcload.c \ asrcmdel.c \ asrcpar.c \ asrcpzld.c \ asrcset.c \ asrctemp.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/asrc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/asrc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libasrc.la: $(libasrc_la_OBJECTS) $(libasrc_la_DEPENDENCIES) $(EXTRA_libasrc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libasrc_la_OBJECTS) $(libasrc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcfbr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrcset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asrctemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/asrc/asrcconv.c0000644000265600020320000000414712264261473021154 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Kanwar Jit Singh **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "asrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ASRCconvTest(GENmodel *inModel, CKTcircuit *ckt) { ASRCmodel *model = (ASRCmodel *)inModel; ASRCinstance *here; int i, node_num, branch; double diff; double prev; double tol; double rhs; for( ; model != NULL; model = model->ASRCnextModel) { for( here = model->ASRCinstances; here != NULL; here = here->ASRCnextInstance) { i = here->ASRCtree->numVars; if (asrc_nvals < i) { if (asrc_nvals) { FREE(asrc_vals); FREE(asrc_derivs); } asrc_nvals = i; asrc_vals = NEWN(double, i); asrc_derivs = NEWN(double, i); } for( i=0; i < here->ASRCtree->numVars; i++){ if( here->ASRCtree->varTypes[i] == IF_INSTANCE){ branch = CKTfndBranch(ckt,here->ASRCtree->vars[i].uValue); asrc_vals[i] = *(ckt->CKTrhsOld+branch); } else { node_num = here->ASRCtree->vars[i].nValue->number; asrc_vals[i] = *(ckt->CKTrhsOld+node_num); } } if( here->ASRCtree->IFeval (here->ASRCtree, ckt->CKTgmin, &rhs, asrc_vals,asrc_derivs) == OK){ prev = here->ASRCprev_value; diff = fabs( prev - rhs); if ( here->ASRCtype == ASRC_VOLTAGE){ tol = ckt->CKTreltol * MAX(fabs(rhs),fabs(prev)) + ckt->CKTvoltTol; } else { tol = ckt->CKTreltol * MAX(fabs(rhs),fabs(prev)) + ckt->CKTabstol; } if ( diff > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } } else { return(E_BADPARM); } } } return(OK); } ngspice-26/src/spicelib/devices/vsrc/0000755000265600020320000000000012264261711017204 5ustar andreasadminngspice-26/src/spicelib/devices/vsrc/vsrcext.h0000644000265600020320000000163012264261473021060 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int VSRCaccept(CKTcircuit*,GENmodel*); extern int VSRCacLoad(GENmodel*,CKTcircuit*); extern int VSRCask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int VSRCdelete(GENmodel*,IFuid,GENinstance**); extern void VSRCdestroy(GENmodel**); extern int VSRCfindBr(CKTcircuit*,GENmodel*,IFuid); extern int VSRCload(GENmodel*,CKTcircuit*); extern int VSRCmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int VSRCmDelete(GENmodel**,IFuid,GENmodel*); extern int VSRCparam(int,IFvalue*,GENinstance*,IFvalue*); extern int VSRCpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int VSRCsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int VSRCunsetup(GENmodel*,CKTcircuit*); extern int VSRCpzSetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int VSRCtemp(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/vsrc/vsrcpzs.c0000644000265600020320000000321012264261473021063 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* load the voltage source structure with those pointers needed later * for fast matrix loading */ int VSRCpzSetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) { VSRCmodel *model = (VSRCmodel *)inModel; VSRCinstance *here; CKTnode *tmp; int error; NG_IGNORE(state); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here = here->VSRCnextInstance) { if (here->VSRCbranch == 0) { error = CKTmkCur(ckt,&tmp,here->VSRCname,"branch"); if(error) return(error); here->VSRCbranch = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(VSRCposIbrptr, VSRCposNode, VSRCbranch); TSTALLOC(VSRCnegIbrptr, VSRCnegNode, VSRCbranch); TSTALLOC(VSRCibrNegptr, VSRCbranch, VSRCnegNode); TSTALLOC(VSRCibrPosptr, VSRCbranch, VSRCposNode); TSTALLOC(VSRCibrIbrptr, VSRCbranch, VSRCbranch); } } return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcdel.c0000644000265600020320000000156112264261473021022 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VSRCdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { VSRCmodel *model = (VSRCmodel *) inModel; VSRCinstance **fast = (VSRCinstance **) inst; VSRCinstance **prev = NULL; VSRCinstance *here; for( ; model ; model = model->VSRCnextModel) { prev = &(model->VSRCinstances); for(here = *prev; here ; here = *prev) { if(here->VSRCname == name || (fast && here==*fast) ) { *prev= here->VSRCnextInstance; FREE(here); return(OK); } prev = &(here->VSRCnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/vsrc/vsrcinit.h0000644000265600020320000000030212264261473021216 0ustar andreasadmin#ifndef _VSRCINIT_H #define _VSRCINIT_H extern IFparm VSRCpTable[ ]; extern char *VSRCnames[ ]; extern int VSRCpTSize; extern int VSRCnSize; extern int VSRCiSize; extern int VSRCmSize; #endif ngspice-26/src/spicelib/devices/vsrc/vsrcacld.c0000644000265600020320000000171212264261473021157 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VSRCacLoad(GENmodel *inModel, CKTcircuit *ckt) { VSRCmodel *model = (VSRCmodel *) inModel; VSRCinstance *here; for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { *(here->VSRCposIbrptr) += 1.0 ; *(here->VSRCnegIbrptr) -= 1.0 ; *(here->VSRCibrPosptr) += 1.0 ; *(here->VSRCibrNegptr) -= 1.0 ; *(ckt->CKTrhs + (here->VSRCbranch)) += here->VSRCacReal; *(ckt->CKTirhs + (here->VSRCbranch)) += here->VSRCacImag; } } return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcdest.c0000644000265600020320000000152112264261473021211 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vsrcdefs.h" #include "ngspice/suffix.h" void VSRCdestroy(GENmodel **inModel) { VSRCmodel **model = (VSRCmodel**)inModel; VSRCinstance *here; VSRCinstance *prev = NULL; VSRCmodel *mod = *model; VSRCmodel *oldmod = NULL; for( ; mod ; mod = mod->VSRCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->VSRCinstances ; here ; here = here->VSRCnextInstance) { if(prev) { tfree(prev->VSRCcoeffs); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/vsrc/vsrcmdel.c0000644000265600020320000000176712264261473021207 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VSRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *fast) { VSRCmodel **model = (VSRCmodel **) inModel; VSRCmodel *modfast = (VSRCmodel *) fast; VSRCinstance *here; VSRCinstance *prev = NULL; VSRCmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->VSRCnextModel)) { if( (*model)->VSRCmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->VSRCnextModel; /* cut deleted device out of list */ for(here = (*model)->VSRCinstances ; here ; here = here->VSRCnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcacct.c0000644000265600020320000003134712264261473021175 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/missing_math.h" #include "ngspice/1-f-code.h" #ifndef HAVE_LIBFFTW3 extern void fftFree(void); #endif extern bool ft_ngdebug; /* some additional debug info printed */ #define SAMETIME(a,b) (fabs((a)-(b))<= TIMETOL * PW) #define TIMETOL 1e-7 int VSRCaccept(CKTcircuit *ckt, GENmodel *inModel) /* set up the breakpoint table. */ { VSRCmodel *model = (VSRCmodel *) inModel; VSRCinstance *here; int error; /* loop through all the voltage source models */ for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { if(!(ckt->CKTmode & (MODETRAN | MODETRANOP))) { /* not transient, so shouldn't be here */ return(OK); } else { /* use the transient functions */ switch(here->VSRCfunctionType) { default: { /* no function specified:DC no breakpoints */ break; } case PULSE: { double TD, TR, TF, PW, PER; double tshift; double time = 0.; double basetime = 0; /* gtri - begin - wbk - add PHASE parameter */ #ifdef XSPICE double PHASE; double phase; double deltat; #endif TD = here->VSRCfunctionOrder > 2 ? here->VSRCcoeffs[2] : 0.0; TR = here->VSRCfunctionOrder > 3 && here->VSRCcoeffs[3] != 0.0 ? here->VSRCcoeffs[3] : ckt->CKTstep; TF = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] != 0.0 ? here->VSRCcoeffs[4] : ckt->CKTstep; PW = here->VSRCfunctionOrder > 5 && here->VSRCcoeffs[5] != 0.0 ? here->VSRCcoeffs[5] : ckt->CKTfinalTime; PER = here->VSRCfunctionOrder > 6 && here->VSRCcoeffs[6] != 0.0 ? here->VSRCcoeffs[6] : ckt->CKTfinalTime; #ifdef XSPICE PHASE = here->VSRCfunctionOrder > 7 ? here->VSRCcoeffs[7] : 0.0; #endif /* offset time by delay */ time = ckt->CKTtime - TD; tshift = TD; #ifdef XSPICE /* normalize phase to 0 - 360° */ /* normalize phase to cycles */ phase = PHASE / 360.0; phase = fmod(phase, 1.0); deltat = phase * PER; while (deltat > 0) deltat -= PER; time += deltat; tshift = TD - deltat; #endif /* gtri - end - wbk - add PHASE parameter */ if(time >= PER) { /* repeating signal - figure out where we are */ /* in period */ basetime = PER * floor(time/PER); time -= basetime; } if( time <= 0.0 || time >= TR + PW + TF) { if(ckt->CKTbreak && SAMETIME(time,0.0)) { error = CKTsetBreak(ckt,basetime + TR + tshift); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(TR+PW+TF,time) ) { error = CKTsetBreak(ckt,basetime + PER + tshift); if(error) return(error); } else if (ckt->CKTbreak && (time == -tshift) ) { error = CKTsetBreak(ckt,basetime + tshift); if(error) return(error); } else if (ckt->CKTbreak && SAMETIME(PER,time) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PER); if(error) return(error); } } else if ( time >= TR && time <= TR + PW) { if(ckt->CKTbreak && SAMETIME(time,TR) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(TR+PW,time) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW + TF); if(error) return(error); } } else if (time > 0 && time < TR) { if(ckt->CKTbreak && SAMETIME(time,0) ) { error = CKTsetBreak(ckt,basetime + tshift + TR); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(time,TR)) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW); if(error) return(error); } } else { /* time > TR + PW && < TR + PW + TF */ if(ckt->CKTbreak && SAMETIME(time,TR+PW) ) { error = CKTsetBreak(ckt,basetime + tshift+TR + PW +TF); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(time,TR+PW+TF) ) { error = CKTsetBreak(ckt,basetime + tshift + PER); if(error) return(error); } } } break; case SINE: { /* no breakpoints (yet) */ } break; case EXP: { /* no breakpoints (yet) */ } break; case SFFM:{ /* no breakpoints (yet) */ } break; case AM:{ /* no breakpoints (yet) */ } break; case PWL: { int i; if(ckt->CKTtime < *(here->VSRCcoeffs)) { if(ckt->CKTbreak) { error = CKTsetBreak(ckt,*(here->VSRCcoeffs)); break; } } for(i=0;i<(here->VSRCfunctionOrder/2)-1;i++) { if ( ckt->CKTbreak && AlmostEqualUlps(*(here->VSRCcoeffs+2*i), ckt->CKTtime, 3 ) ) { error = CKTsetBreak(ckt, *(here->VSRCcoeffs+2*i+2)); if(error) return(error); goto bkptset; } } break; } /**** tansient noise routines: VNoi2 2 0 DC 0 TRNOISE(10n 0.5n 0 0n) : generate gaussian distributed noise rms value, time step, 0 0 VNoi1 1 0 DC 0 TRNOISE(0n 0.5n 1 10n) : generate 1/f noise 0, time step, exponent < 2, rms value */ case TRNOISE: { struct trnoise_state *state = here -> VSRCtrnoise_state; double TS = state -> TS; double RTSAM = state ->RTSAM; if ((TS == 0.0) && (RTSAM == 0.0)) // no further breakpoint if value not given break; #ifndef HAVE_LIBFFTW3 /* FIXME, dont' want this here, over to aof_get or somesuch */ if (ckt->CKTtime == 0.0) { if(ft_ngdebug) printf("VSRC: free fft tables\n"); fftFree(); } #endif if(ckt->CKTbreak) { int n = (int) floor(ckt->CKTtime / TS + 0.5); volatile double nearest = n * TS; if(AlmostEqualUlps(nearest, ckt->CKTtime, 3)) { /* carefull calculate `next' * make sure it is really identical * with the next calculated `nearest' value */ volatile double next = (n+1) * TS; error = CKTsetBreak(ckt, next); if(error) return(error); } } if (RTSAM > 0) { double RTScapTime = state->RTScapTime; double RTSemTime = state->RTSemTime; double RTSCAPT = state->RTSCAPT; double RTSEMT = state->RTSEMT; if (ckt->CKTtime == 0) { /* initialzing here again needed for repeated calls to tran command */ state->RTScapTime = RTScapTime = exprand(RTSCAPT); state->RTSemTime = RTSemTime = RTScapTime + exprand(RTSEMT); if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTScapTime); if(error) return(error); } } if(AlmostEqualUlps(RTScapTime, ckt->CKTtime, 3)) { if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTSemTime); if(error) return(error); } } if(AlmostEqualUlps(RTSemTime, ckt->CKTtime, 3)) { /* new values */ RTScapTime = here -> VSRCtrnoise_state ->RTScapTime = ckt->CKTtime + exprand(RTSCAPT); here -> VSRCtrnoise_state ->RTSemTime = RTScapTime + exprand(RTSEMT); if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTScapTime); if(error) return(error); } } } } break; case TRRANDOM: { struct trrandom_state *state = here -> VSRCtrrandom_state; double TS = state -> TS; double TD = state -> TD; double time = ckt->CKTtime - TD; if (time < 0) break; if(ckt->CKTbreak) { int n = (int) floor(time / TS + 0.5); volatile double nearest = n * TS; if(AlmostEqualUlps(nearest, time, 3)) { /* carefully calculate `next' * make sure it is really identical * with the next calculated `nearest' value */ volatile double next = (n+1) * TS + TD; error = CKTsetBreak(ckt, next); if(error) return(error); state->value = trrandom_state_get(state); } } } break; #ifdef SHARED_MODULE case EXTERNAL: { /* no breakpoints (yet) */ } break; #endif } // switch } // if ... else bkptset: ; } // for } // for return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcload.c0000644000265600020320000004071112264261473021175 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/1-f-code.h" #ifdef XSPICE_EXP /* gtri - begin - wbk - modify for supply ramping option */ #include "ngspice/cmproto.h" /* gtri - end - wbk - modify for supply ramping option */ #endif #ifdef SHARED_MODULE extern double getvsrcval(double, char*); #endif int VSRCload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { VSRCmodel *model = (VSRCmodel *) inModel; VSRCinstance *here; double time; double value = 0.0; /* loop through all the source models */ for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { *(here->VSRCposIbrptr) += 1.0 ; *(here->VSRCnegIbrptr) -= 1.0 ; *(here->VSRCibrPosptr) += 1.0 ; *(here->VSRCibrNegptr) -= 1.0 ; if( (ckt->CKTmode & (MODEDCOP | MODEDCTRANCURVE)) && here->VSRCdcGiven ) { /* load using DC value */ #ifdef XSPICE_EXP /* gtri - begin - wbk - modify to process srcFact, etc. for all sources */ value = here->VSRCdcValue; #else value = here->VSRCdcValue * ckt->CKTsrcFact; #endif } else { if(ckt->CKTmode & (MODEDC)) { time = 0; } else { time = ckt->CKTtime; } /* use the transient functions */ switch(here->VSRCfunctionType) { default: value = here->VSRCdcValue; break; case PULSE: { double V1, V2, TD, TR, TF, PW, PER; double basetime = 0; #ifdef XSPICE double PHASE; double phase; double deltat; #endif V1 = here->VSRCcoeffs[0]; V2 = here->VSRCcoeffs[1]; TD = here->VSRCfunctionOrder > 2 ? here->VSRCcoeffs[2] : 0.0; TR = here->VSRCfunctionOrder > 3 && here->VSRCcoeffs[3] != 0.0 ? here->VSRCcoeffs[3] : ckt->CKTstep; TF = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] != 0.0 ? here->VSRCcoeffs[4] : ckt->CKTstep; PW = here->VSRCfunctionOrder > 5 && here->VSRCcoeffs[5] != 0.0 ? here->VSRCcoeffs[5] : ckt->CKTfinalTime; PER = here->VSRCfunctionOrder > 6 && here->VSRCcoeffs[6] != 0.0 ? here->VSRCcoeffs[6] : ckt->CKTfinalTime; /* shift time by delay time TD */ time -= TD; #ifdef XSPICE /* gtri - begin - wbk - add PHASE parameter */ PHASE = here->VSRCfunctionOrder > 7 ? here->VSRCcoeffs[7] : 0.0; /* normalize phase to cycles */ phase = PHASE / 360.0; phase = fmod(phase, 1.0); deltat = phase * PER; while (deltat > 0) deltat -= PER; /* shift time by pase (neg. for pos. phase value) */ time += deltat; /* gtri - end - wbk - add PHASE parameter */ #endif if(time > PER) { /* repeating signal - figure out where we are */ /* in period */ basetime = PER * floor(time/PER); time -= basetime; } if (time <= 0 || time >= TR + PW + TF) { value = V1; } else if (time >= TR && time <= TR + PW) { value = V2; } else if (time > 0 && time < TR) { value = V1 + (V2 - V1) * (time) / TR; } else { /* time > TR + PW && < TR + PW + TF */ value = V2 + (V1 - V2) * (time - (TR + PW)) / TF; } } break; case SINE: { double VO, VA, FREQ, TD, THETA; /* gtri - begin - wbk - add PHASE parameter */ #ifdef XSPICE double PHASE; double phase; PHASE = here->VSRCfunctionOrder > 5 ? here->VSRCcoeffs[5] : 0.0; /* compute phase in radians */ phase = PHASE * M_PI / 180.0; #endif VO = here->VSRCcoeffs[0]; VA = here->VSRCcoeffs[1]; FREQ = here->VSRCfunctionOrder > 2 && here->VSRCcoeffs[2] != 0.0 ? here->VSRCcoeffs[2] : (1/ckt->CKTfinalTime); TD = here->VSRCfunctionOrder > 3 ? here->VSRCcoeffs[3] : 0.0; THETA = here->VSRCfunctionOrder > 4 ? here->VSRCcoeffs[4] : 0.0; time -= TD; if (time <= 0) { #ifdef XSPICE value = VO + VA * sin(phase); } else { value = VO + VA * sin(FREQ*time * 2.0 * M_PI + phase) * exp(-time*THETA); #else value = VO; } else { value = VO + VA * sin(FREQ * time * 2.0 * M_PI) * exp(-time*THETA); #endif /* gtri - end - wbk - add PHASE parameter */ } } break; case EXP: { double V1, V2, TD1, TD2, TAU1, TAU2; V1 = here->VSRCcoeffs[0]; V2 = here->VSRCcoeffs[1]; TD1 = here->VSRCfunctionOrder > 2 && here->VSRCcoeffs[2] != 0.0 ? here->VSRCcoeffs[2] : ckt->CKTstep; TAU1 = here->VSRCfunctionOrder > 3 && here->VSRCcoeffs[3] != 0.0 ? here->VSRCcoeffs[3] : ckt->CKTstep; TD2 = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] != 0.0 ? here->VSRCcoeffs[4] : TD1 + ckt->CKTstep; TAU2 = here->VSRCfunctionOrder > 5 && here->VSRCcoeffs[5] ? here->VSRCcoeffs[5] : ckt->CKTstep; if(time <= TD1) { value = V1; } else if (time <= TD2) { value = V1 + (V2-V1)*(1-exp(-(time-TD1)/TAU1)); } else { value = V1 + (V2-V1)*(1-exp(-(time-TD1)/TAU1)) + (V1-V2)*(1-exp(-(time-TD2)/TAU2)) ; } } break; case SFFM: { double VO, VA, FC, MDI, FS; /* gtri - begin - wbk - add PHASE parameters */ #ifdef XSPICE double PHASEC, PHASES; double phasec; double phases; PHASEC = here->VSRCfunctionOrder > 5 ? here->VSRCcoeffs[5] : 0.0; PHASES = here->VSRCfunctionOrder > 6 ? here->VSRCcoeffs[6] : 0.0; /* compute phases in radians */ phasec = PHASEC * M_PI / 180.0; phases = PHASES * M_PI / 180.0; #endif VO = here->VSRCcoeffs[0]; VA = here->VSRCcoeffs[1]; FC = here->VSRCfunctionOrder > 2 && here->VSRCcoeffs[2] ? here->VSRCcoeffs[2] : (1/ckt->CKTfinalTime); MDI = here->VSRCfunctionOrder > 3 ? here->VSRCcoeffs[3] : 0.0; FS = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] ? here->VSRCcoeffs[4] : (1/ckt->CKTfinalTime); #ifdef XSPICE /* compute waveform value */ value = VO + VA * sin((2.0 * M_PI * FC * time + phasec) + MDI * sin(2.0 * M_PI * FS * time + phases)); #else value = VO + VA * sin((2.0 * M_PI * FC * time) + MDI * sin(2.0 * M_PI * FS * time)); #endif /* gtri - end - wbk - add PHASE parameters */ } break; case AM: { double VA, FC, MF, VO, TD; /* gtri - begin - wbk - add PHASE parameters */ #ifdef XSPICE double PHASEC, PHASES; double phasec; double phases; PHASEC = here->VSRCfunctionOrder > 5 ? here->VSRCcoeffs[5] : 0.0; PHASES = here->VSRCfunctionOrder > 6 ? here->VSRCcoeffs[6] : 0.0; /* compute phases in radians */ phasec = PHASEC * M_PI / 180.0; phases = PHASES * M_PI / 180.0; #endif VA = here->VSRCcoeffs[0]; VO = here->VSRCcoeffs[1]; MF = here->VSRCfunctionOrder > 2 && here->VSRCcoeffs[2] ? here->VSRCcoeffs[2] : (1/ckt->CKTfinalTime); FC = here->VSRCfunctionOrder > 3 ? here->VSRCcoeffs[3] : 0.0; TD = here->VSRCfunctionOrder > 4 && here->VSRCcoeffs[4] ? here->VSRCcoeffs[4] : 0.0; time -= TD; if (time <= 0) { value = 0; } else { #ifdef XSPICE /* compute waveform value */ value = VA * (VO + sin(2.0 * M_PI * MF * time + phases )) * sin(2.0 * M_PI * FC * time + phases); #else value = VA * (VO + sin(2.0 * M_PI * MF * time)) * sin(2.0 * M_PI * FC * time); #endif } /* gtri - end - wbk - add PHASE parameters */ } break; case PWL: { int i = 0, num_repeat = 0, ii = 0; double foo, repeat_time = 0, end_time, breakpt_time, itime; time -= here->VSRCrdelay; if(time < *(here->VSRCcoeffs)) { foo = *(here->VSRCcoeffs + 1) ; value = foo; goto loadDone; } do { for(i=ii ; i<(here->VSRCfunctionOrder/2)-1; i++ ) { itime = *(here->VSRCcoeffs+2*i); if ( AlmostEqualUlps(itime+repeat_time, time, 3 )) { foo = *(here->VSRCcoeffs+2*i+1); value = foo; goto loadDone; } else if ( (*(here->VSRCcoeffs+2*i)+repeat_time < time) && (*(here->VSRCcoeffs+2*(i+1))+repeat_time > time) ) { foo = *(here->VSRCcoeffs+2*i+1) + (((time-(*(here->VSRCcoeffs+2*i)+repeat_time))/ (*(here->VSRCcoeffs+2*(i+1)) - *(here->VSRCcoeffs+2*i))) * (*(here->VSRCcoeffs+2*i+3) - *(here->VSRCcoeffs+2*i+1))); value = foo; goto loadDone; } } foo = *(here->VSRCcoeffs+ here->VSRCfunctionOrder-1) ; value = foo; if ( !here->VSRCrGiven ) goto loadDone; end_time = *(here->VSRCcoeffs + here->VSRCfunctionOrder-2); breakpt_time = *(here->VSRCcoeffs + here->VSRCrBreakpt); repeat_time = end_time + (end_time - breakpt_time)*num_repeat++ - breakpt_time; ii = here->VSRCrBreakpt/2; } while ( here->VSRCrGiven ); break; } /**** tansient noise routines: VNoi2 2 0 DC 0 TRNOISE(10n 0.5n 0 0n) : generate gaussian distributed noise rms value, time step, 0 0 VNoi1 1 0 DC 0 TRNOISE(0n 0.5n 1 10n) : generate 1/f noise 0, time step, exponent < 2, rms value VNoi3 3 0 DC 0 TRNOISE(0 0 0 0 15m 22u 50u) : generate RTS noise 0 0 0 0, amplitude, capture time, emission time */ case TRNOISE: { struct trnoise_state *state = here -> VSRCtrnoise_state; double TS = state -> TS; double RTSAM = state->RTSAM; /* reset top (hack for repeated tran commands) */ if (time == 0) state->top = 0; /* no noise */ if(TS == 0.0) { value = 0.0; } else { /* 1/f and white noise */ size_t n1 = (size_t) floor(time / TS); double V1 = trnoise_state_get(state, ckt, n1); double V2 = trnoise_state_get(state, ckt, n1+1); value = V1 + (V2 - V1) * (time / TS - (double)n1); } /* RTS noise */ if (RTSAM > 0) { double RTScapTime = state->RTScapTime; if (time >= RTScapTime) value += RTSAM; } /* DC value */ if(here -> VSRCdcGiven) value += here->VSRCdcValue; } break; case TRRANDOM: { struct trrandom_state *state = here -> VSRCtrrandom_state; value = state -> value; /* DC value */ if(here -> VSRCdcGiven) value += here->VSRCdcValue; } break; #ifdef SHARED_MODULE case EXTERNAL: { value = getvsrcval(time, here->VSRCname); if(here -> VSRCdcGiven) value += here->VSRCdcValue; } break; #endif } // switch } // else (line 48) loadDone: /* gtri - begin - wbk - modify for supply ramping option */ #ifdef XSPICE_EXP value *= ckt->CKTsrcFact; value *= cm_analog_ramp_factor(); #else if (ckt->CKTmode & MODETRANOP) value *= ckt->CKTsrcFact; #endif /* gtri - end - wbk - modify to process srcFact, etc. for all sources */ /* load the new voltage value into the matrix */ *(ckt->CKTrhs + (here->VSRCbranch)) += value; } // for loop instances } // for loop models return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcpar.c0000644000265600020320000002041612264261473021040 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/1-f-code.h" static void copy_coeffs(VSRCinstance *here, IFvalue *value) { int n = value->v.numValue; if(here->VSRCcoeffs) tfree(here->VSRCcoeffs); here->VSRCcoeffs = TMALLOC(double, n); here->VSRCfunctionOrder = n; here->VSRCcoeffsGiven = TRUE; memcpy(here->VSRCcoeffs, value->v.vec.rVec, (size_t) n * sizeof(double)); } /* ARGSUSED */ int VSRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { int i; VSRCinstance *here = (VSRCinstance *) inst; NG_IGNORE(select); switch(param) { case VSRC_DC: here->VSRCdcValue = value->rValue; here->VSRCdcGiven = TRUE; break; case VSRC_AC_MAG: here->VSRCacMag = value->rValue; here->VSRCacMGiven = TRUE; here->VSRCacGiven = TRUE; break; case VSRC_AC_PHASE: here->VSRCacPhase = value->rValue; here->VSRCacPGiven = TRUE; here->VSRCacGiven = TRUE; break; case VSRC_AC: switch(value->v.numValue) { case 2: here->VSRCacPhase = *(value->v.vec.rVec+1); here->VSRCacPGiven = TRUE; case 1: here->VSRCacMag = *(value->v.vec.rVec); here->VSRCacMGiven = TRUE; case 0: here->VSRCacGiven = TRUE; break; default: return(E_BADPARM); } break; case VSRC_PULSE: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = PULSE; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case VSRC_SINE: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = SINE; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case VSRC_EXP: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = EXP; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case VSRC_PWL: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = PWL; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); for (i=0; i<(here->VSRCfunctionOrder/2)-1; i++) { if (*(here->VSRCcoeffs+2*(i+1))<=*(here->VSRCcoeffs+2*i)) { fprintf(stderr, "Warning : voltage source %s", here->VSRCname); fprintf(stderr, " has non-increasing PWL time points.\n"); } } break; case VSRC_TD: here->VSRCrdelay = value->rValue; break; case VSRC_R: { double end_time; here->VSRCr = value->rValue; here->VSRCrGiven = TRUE; for ( i = 0; i < here->VSRCfunctionOrder; i += 2 ) { here->VSRCrBreakpt = i; if ( here->VSRCr == *(here->VSRCcoeffs+i) ) break; } end_time = *(here->VSRCcoeffs + here->VSRCfunctionOrder-2); if ( here->VSRCr > end_time ) { fprintf(stderr, "ERROR: repeat start time value %g for pwl voltage source must be smaller than final time point given!\n", here->VSRCr ); return ( E_PARMVAL ); } if ( here->VSRCr != *(here->VSRCcoeffs+here->VSRCrBreakpt) ) { fprintf(stderr, "ERROR: repeat start time value %g for pwl voltage source does not match any time point given!\n", here->VSRCr ); return ( E_PARMVAL ); } break; } case VSRC_SFFM: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = SFFM; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case VSRC_AM: if(value->v.numValue < 2) return(E_BADPARM); here->VSRCfunctionType = AM; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case VSRC_D_F1: here->VSRCdF1given = TRUE; here->VSRCdGiven = TRUE; switch(value->v.numValue) { case 2: here->VSRCdF1phase = *(value->v.vec.rVec+1); here->VSRCdF1mag = *(value->v.vec.rVec); break; case 1: here->VSRCdF1mag = *(value->v.vec.rVec); here->VSRCdF1phase = 0.0; break; case 0: here->VSRCdF1mag = 1.0; here->VSRCdF1phase = 0.0; break; default: return(E_BADPARM); } break; case VSRC_D_F2: here->VSRCdF2given = TRUE; here->VSRCdGiven = TRUE; switch(value->v.numValue) { case 2: here->VSRCdF2phase = *(value->v.vec.rVec+1); here->VSRCdF2mag = *(value->v.vec.rVec); break; case 1: here->VSRCdF2mag = *(value->v.vec.rVec); here->VSRCdF2phase = 0.0; break; case 0: here->VSRCdF2mag = 1.0; here->VSRCdF2phase = 0.0; break; default: return(E_BADPARM); } break; case VSRC_TRNOISE: { double NA, TS; double NALPHA = 0.0; double NAMP = 0.0; double RTSAM = 0.0; double RTSCAPT = 0.0; double RTSEMT = 0.0; here->VSRCfunctionType = TRNOISE; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); NA = here->VSRCcoeffs[0]; // input is rms value TS = here->VSRCcoeffs[1]; // time step if (here->VSRCfunctionOrder > 2) NALPHA = here->VSRCcoeffs[2]; // 1/f exponent if (here->VSRCfunctionOrder > 3 && NALPHA != 0.0) NAMP = here->VSRCcoeffs[3]; // 1/f amplitude if (here->VSRCfunctionOrder > 4) RTSAM = here->VSRCcoeffs[4]; // RTS amplitude if (here->VSRCfunctionOrder > 5 && RTSAM != 0.0) RTSCAPT = here->VSRCcoeffs[5]; // RTS trap capture time if (here->VSRCfunctionOrder > 6 && RTSAM != 0.0) RTSEMT = here->VSRCcoeffs[6]; // RTS trap emission time here->VSRCtrnoise_state = trnoise_state_init(NA, TS, NALPHA, NAMP, RTSAM, RTSCAPT, RTSEMT); } break; case VSRC_TRRANDOM: { double TD = 0.0, TS; int rndtype = 1; double PARAM1 = 1.0; double PARAM2 = 0.0; here->VSRCfunctionType = TRRANDOM; here->VSRCfuncTGiven = TRUE; copy_coeffs(here, value); rndtype = (int)here->VSRCcoeffs[0]; // type of random function TS = here->VSRCcoeffs[1]; // time step if (here->VSRCfunctionOrder > 2) TD = here->VSRCcoeffs[2]; // delay if (here->VSRCfunctionOrder > 3) PARAM1 = here->VSRCcoeffs[3]; // first parameter if (here->VSRCfunctionOrder > 4) PARAM2 = here->VSRCcoeffs[4]; // second parameter here->VSRCtrrandom_state = trrandom_state_init(rndtype, TS, TD, PARAM1, PARAM2); } break; #ifdef SHARED_MODULE case VSRC_EXTERNAL: { here->VSRCfunctionType = EXTERNAL; here->VSRCfuncTGiven = TRUE; /* no coefficients copy_coeffs(here, value); */ } break; #endif default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcdefs.h0000644000265600020320000001136712264261473021211 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef VSRC #define VSRC #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" struct trnoise_state; /* * structures to describe independent voltage sources */ /* information needed for each instance */ typedef struct sVSRCinstance { struct sVSRCmodel *VSRCmodPtr; /* backpointer to model */ struct sVSRCinstance *VSRCnextInstance; /* pointer to next instance of *current model */ IFuid VSRCname; /* pointer to character string naming this instance */ int VSRCstate; /* not used */ int VSRCposNode; /* number of positive node of source */ int VSRCnegNode; /* number of negative node of source */ int VSRCbranch; /* equation number of branch equation added for source */ int VSRCfunctionType; /* code number of function type for source */ int VSRCfunctionOrder; /* order of the function for the source */ int VSRCrBreakpt; /* pwl repeat breakpoint index */ double *VSRCcoeffs; /* pointer to array of coefficients */ double VSRCdcValue; /* DC and TRANSIENT value of source */ double VSRCacPhase; /* AC phase angle */ double VSRCacMag; /* AC magnitude */ double VSRCacReal; /* AC real component */ double VSRCacImag; /* AC imaginary component */ double VSRCdF1mag; /* distortion f1 magnitude */ double VSRCdF2mag; /* distortion f2 magnitude */ double VSRCdF1phase; /* distortion f1 phase */ double VSRCdF2phase; /* distortion f2 phase */ struct trnoise_state *VSRCtrnoise_state; /* transient noise */ struct trrandom_state *VSRCtrrandom_state; /* transient random source */ double VSRCr; /* pwl repeat */ double VSRCrdelay; /* pwl delay period */ double *VSRCposIbrptr; /* pointer to sparse matrix element at * (positive node, branch equation) */ double *VSRCnegIbrptr; /* pointer to sparse matrix element at * (negative node, branch equation) */ double *VSRCibrPosptr; /* pointer to sparse matrix element at * (branch equation, positive node) */ double *VSRCibrNegptr; /* pointer to sparse matrix element at * (branch equation, negative node) */ double *VSRCibrIbrptr; /* pointer to sparse matrix element at * (branch equation, branch equation) */ unsigned VSRCdcGiven :1 ; /* flag to indicate dc value given */ unsigned VSRCacGiven :1 ; /* flag to indicate ac keyword given */ unsigned VSRCacMGiven :1 ; /* flag to indicate ac magnitude given */ unsigned VSRCacPGiven :1 ; /* flag to indicate ac phase given */ unsigned VSRCfuncTGiven :1 ; /* flag to indicate function type given */ unsigned VSRCcoeffsGiven :1 ; /* flag to indicate function coeffs given */ unsigned VSRCdGiven :1 ; /* flag to indicate source is a distortion input */ unsigned VSRCdF1given :1 ; /* flag to indicate source is an f1 distortion input */ unsigned VSRCdF2given :1 ; /* flag to indicate source is an f2 distortion input */ unsigned VSRCrGiven :1 ; /* flag to indicate repeating pwl */ } VSRCinstance ; /* per model data */ typedef struct sVSRCmodel { int VSRCmodType; /* type index of this device type */ struct sVSRCmodel *VSRCnextModel; /* pointer to next possible model *in linked list */ VSRCinstance * VSRCinstances; /* pointer to list of instances * that have this model */ IFuid VSRCmodName; /* pointer to character string naming this model */ } VSRCmodel; /* source function types (shared with current sources) */ #ifndef PULSE #define PULSE 1 #define SINE 2 #define EXP 3 #define SFFM 4 #define PWL 5 #define AM 6 #define TRNOISE 7 #define TRRANDOM 8 #define EXTERNAL 9 #endif /*PULSE*/ /* device parameters */ #define VSRC_DC 1 #define VSRC_AC 2 #define VSRC_AC_MAG 3 #define VSRC_AC_PHASE 4 #define VSRC_PULSE 5 #define VSRC_SINE 6 #define VSRC_EXP 7 #define VSRC_PWL 8 #define VSRC_SFFM 9 #define VSRC_BR 10 #define VSRC_FCN_TYPE 11 #define VSRC_FCN_ORDER 12 #define VSRC_FCN_COEFFS 13 #define VSRC_AC_REAL 14 #define VSRC_AC_IMAG 15 #define VSRC_POS_NODE 16 #define VSRC_NEG_NODE 17 #define VSRC_CURRENT 18 #define VSRC_POWER 19 #define VSRC_D_F1 20 #define VSRC_D_F2 21 #define VSRC_AM 22 #define VSRC_R 23 #define VSRC_TD 24 #define VSRC_TRNOISE 25 #define VSRC_TRRANDOM 26 #define VSRC_EXTERNAL 27 /* model parameters */ /* device questions */ /* model questions */ #include "vsrcext.h" #endif /*VSRC*/ ngspice-26/src/spicelib/devices/vsrc/vsrcset.c0000644000265600020320000000440212264261473021046 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VSRCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* load the voltage source structure with those pointers needed later * for fast matrix loading */ { VSRCmodel *model = (VSRCmodel *)inModel; VSRCinstance *here; CKTnode *tmp; int error; NG_IGNORE(state); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { if(here->VSRCposNode == here->VSRCnegNode) { SPfrontEnd->IFerror (ERR_FATAL, "instance %s is a shorted VSRC", &here->VSRCname); return(E_UNSUPP); } if(here->VSRCbranch == 0) { error = CKTmkCur(ckt,&tmp,here->VSRCname,"branch"); if(error) return(error); here->VSRCbranch = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(VSRCposIbrptr, VSRCposNode, VSRCbranch); TSTALLOC(VSRCnegIbrptr, VSRCnegNode, VSRCbranch); TSTALLOC(VSRCibrNegptr, VSRCbranch, VSRCnegNode); TSTALLOC(VSRCibrPosptr, VSRCbranch, VSRCposNode); } } return(OK); } int VSRCunsetup(GENmodel *inModel, CKTcircuit *ckt) { VSRCmodel *model; VSRCinstance *here; for (model = (VSRCmodel *)inModel; model != NULL; model = model->VSRCnextModel) { for (here = model->VSRCinstances; here != NULL; here=here->VSRCnextInstance) { if (here->VSRCbranch) { CKTdltNNum(ckt, here->VSRCbranch); here->VSRCbranch = 0; } } } return OK; } ngspice-26/src/spicelib/devices/vsrc/Makefile.am0000644000265600020320000000074512264261473021253 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libvsrc.la libvsrc_la_SOURCES = \ vsrc.c \ vsrcacct.c \ vsrcacld.c \ vsrcask.c \ vsrcdefs.h \ vsrcdel.c \ vsrcdest.c \ vsrcext.h \ vsrcfbr.c \ vsrcinit.c \ vsrcinit.h \ vsrcitf.h \ vsrcload.c \ vsrcmdel.c \ vsrcpar.c \ vsrcpzld.c \ vsrcpzs.c \ vsrcset.c \ vsrctemp.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/vsrc/Makefile.in0000644000265600020320000004240712264261540021260 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/vsrc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvsrc_la_LIBADD = am_libvsrc_la_OBJECTS = vsrc.lo vsrcacct.lo vsrcacld.lo vsrcask.lo \ vsrcdel.lo vsrcdest.lo vsrcfbr.lo vsrcinit.lo vsrcload.lo \ vsrcmdel.lo vsrcpar.lo vsrcpzld.lo vsrcpzs.lo vsrcset.lo \ vsrctemp.lo libvsrc_la_OBJECTS = $(am_libvsrc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libvsrc_la_SOURCES) DIST_SOURCES = $(libvsrc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libvsrc.la libvsrc_la_SOURCES = \ vsrc.c \ vsrcacct.c \ vsrcacld.c \ vsrcask.c \ vsrcdefs.h \ vsrcdel.c \ vsrcdest.c \ vsrcext.h \ vsrcfbr.c \ vsrcinit.c \ vsrcinit.h \ vsrcitf.h \ vsrcload.c \ vsrcmdel.c \ vsrcpar.c \ vsrcpzld.c \ vsrcpzs.c \ vsrcset.c \ vsrctemp.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/vsrc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/vsrc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvsrc.la: $(libvsrc_la_OBJECTS) $(libvsrc_la_DEPENDENCIES) $(EXTRA_libvsrc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libvsrc_la_OBJECTS) $(libvsrc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcfbr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcpzs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrcset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vsrctemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/vsrc/vsrc.c0000644000265600020320000000500012264261473020325 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "vsrcdefs.h" #include "ngspice/suffix.h" IFparm VSRCpTable[] = { /* parameters */ IOPP("dc", VSRC_DC, IF_REAL ,"DC value of source"), IOPPA("acmag", VSRC_AC_MAG, IF_REAL ,"AC Magnitude"), IOPAAU("acphase", VSRC_AC_PHASE, IF_REAL ,"AC Phase"), /* Modified to allow print @vin[sin] A.Roldan */ IOP ("pulse", VSRC_PULSE, IF_REALVEC,"Pulse description"), IOP ("sine", VSRC_SINE, IF_REALVEC,"Sinusoidal source description"), IOP ("sin", VSRC_SINE, IF_REALVEC,"Sinusoidal source description"), IOP ("exp", VSRC_EXP, IF_REALVEC,"Exponential source description"), IOP ("pwl", VSRC_PWL, IF_REALVEC,"Piecewise linear description"), IOP ("sffm", VSRC_SFFM, IF_REALVEC,"Single freq. FM description"), IOP ("am", VSRC_AM, IF_REALVEC,"Amplitude modulation description"), IOP ("trnoise", VSRC_TRNOISE, IF_REALVEC,"Transient noise description"), IOP ("trrandom", VSRC_TRRANDOM, IF_REALVEC,"random source description"), #ifdef SHARED_MODULE IOP ("external", VSRC_EXTERNAL, IF_REALVEC,"external source description"), #endif OPU ("pos_node",VSRC_POS_NODE, IF_INTEGER,"Positive node of source"), OPU ("neg_node",VSRC_NEG_NODE, IF_INTEGER,"Negative node of source"), OPU ("function",VSRC_FCN_TYPE, IF_INTEGER,"Function of the source"), OPU ("order", VSRC_FCN_ORDER, IF_INTEGER,"Order of the source function"), OPU ("coeffs", VSRC_FCN_COEFFS,IF_REALVEC,"Coefficients for the function"), OPU ("acreal", VSRC_AC_REAL, IF_REAL, "AC real part"), OPU ("acimag", VSRC_AC_IMAG, IF_REAL, "AC imaginary part"), IP ("ac", VSRC_AC, IF_REALVEC,"AC magnitude, phase vector"), OP ("i", VSRC_CURRENT, IF_REAL, "Voltage source current"), OP ("p", VSRC_POWER, IF_REAL, "Instantaneous power"), IP ("r", VSRC_R, IF_REAL, "pwl repeat value"), IP ("td", VSRC_TD, IF_REAL, "pwl delay value"), IP ("distof1", VSRC_D_F1, IF_REALVEC,"f1 input for distortion"), IP ("distof2", VSRC_D_F2, IF_REALVEC,"f2 input for distortion") }; char *VSRCnames[] = { "V+", "V-" }; int VSRCnSize = NUMELEMS(VSRCnames); int VSRCpTSize = NUMELEMS(VSRCpTable); int VSRCmPTSize = 0; int VSRCiSize = sizeof(VSRCinstance); int VSRCmSize = sizeof(VSRCmodel); ngspice-26/src/spicelib/devices/vsrc/vsrcinit.c0000644000265600020320000000407212264261473021221 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "vsrcitf.h" #include "vsrcext.h" #include "vsrcinit.h" SPICEdev VSRCinfo = { { "Vsource", "Independent voltage source", &VSRCnSize, &VSRCnSize, VSRCnames, &VSRCpTSize, VSRCpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ VSRCparam, /* DEVmodParam */ NULL, /* DEVload */ VSRCload, /* DEVsetup */ VSRCsetup, /* DEVunsetup */ VSRCunsetup, /* DEVpzSetup */ VSRCpzSetup, /* DEVtemperature*/ VSRCtemp, /* DEVtrunc */ NULL, /* DEVfindBranch */ VSRCfindBr, /* DEVacLoad */ VSRCacLoad, /* DEVaccept */ VSRCaccept, /* DEVdestroy */ VSRCdestroy, /* DEVmodDelete */ VSRCmDelete, /* DEVdelete */ VSRCdelete, /* DEVsetic */ NULL, /* DEVask */ VSRCask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ VSRCpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &VSRCiSize, /* DEVmodSize */ &VSRCmSize }; SPICEdev * get_vsrc_info(void) { return &VSRCinfo; } ngspice-26/src/spicelib/devices/vsrc/vsrcitf.h0000644000265600020320000000026712264261473021047 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_VSRC #define DEV_VSRC extern SPICEdev *get_vsrc_info(void); #endif ngspice-26/src/spicelib/devices/vsrc/vsrcpzld.c0000644000265600020320000000256212264261473021231 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "vsrcdefs.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VSRCpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { VSRCmodel *model = (VSRCmodel *)inModel; VSRCinstance *here; NG_IGNORE(s); NG_IGNORE(ckt); for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { if (!(here->VSRCacGiven)) { /*a dc source*/ /*the connecting nodes are shorted*/ *(here->VSRCposIbrptr) += 1.0 ; *(here->VSRCnegIbrptr) += -1.0 ; *(here->VSRCibrPosptr) += 1.0 ; *(here->VSRCibrNegptr) += -1.0 ; } else { /*an ac source*/ /*no effective contribution *diagonal element made 1 */ *(here->VSRCposIbrptr) += 1.0 ; *(here->VSRCnegIbrptr) += -1.0 ; *(here->VSRCibrIbrptr) += 1.0 ; } } } return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcask.c0000644000265600020320000000667612264261473021050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameters * of independent Voltage SouRCe */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VSRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { VSRCinstance *here = (VSRCinstance*)inst; static char *msg = "Current and power not available in ac analysis"; int temp; double *v, *w; NG_IGNORE(select); switch(which) { case VSRC_DC: value->rValue = here->VSRCdcValue; return (OK); case VSRC_AC_MAG: value->rValue = here->VSRCacMag; return (OK); case VSRC_AC_PHASE: value->rValue = here->VSRCacPhase; return (OK); case VSRC_PULSE: case VSRC_SINE: case VSRC_EXP: case VSRC_PWL: case VSRC_SFFM: case VSRC_AM: case VSRC_TRNOISE: case VSRC_TRRANDOM: case VSRC_FCN_COEFFS: temp = value->v.numValue = here->VSRCfunctionOrder; v = value->v.vec.rVec = TMALLOC(double, here->VSRCfunctionOrder); w = here->VSRCcoeffs; while (temp--) *v++ = *w++; return (OK); case VSRC_AC: value->v.numValue = 2; value->v.vec.rVec = TMALLOC(double, value->v.numValue); value->v.vec.rVec[0] = here->VSRCacMag; value->v.vec.rVec[1] = here->VSRCacPhase; return (OK); case VSRC_NEG_NODE: value->iValue = here->VSRCnegNode; return (OK); case VSRC_POS_NODE: value->iValue = here->VSRCposNode; return (OK); case VSRC_FCN_TYPE: value->iValue = here->VSRCfunctionType; return (OK); case VSRC_AC_REAL: value->rValue = here->VSRCacReal; return (OK); case VSRC_AC_IMAG: value->rValue = here->VSRCacImag; return (OK); case VSRC_R: value->rValue = here->VSRCr; return (OK); case VSRC_TD: value->rValue = here->VSRCrdelay; return (OK); case VSRC_FCN_ORDER: value->rValue = here->VSRCfunctionOrder; return (OK); case VSRC_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VSRCask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = *(ckt->CKTrhsOld+here->VSRCbranch); } return(OK); case VSRC_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VSRCask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = (*(ckt->CKTrhsOld+here->VSRCposNode) - *(ckt->CKTrhsOld + here->VSRCnegNode)) * -*(ckt->CKTrhsOld + here->VSRCbranch); } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/vsrc/vsrctemp.c0000644000265600020320000000342012264261473021217 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VSRCtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-process voltage source parameters */ { VSRCmodel *model = (VSRCmodel *) inModel; VSRCinstance *here; double radians; NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VSRCnextModel ) { /* loop through all the instances of the model */ for (here = model->VSRCinstances; here != NULL ; here=here->VSRCnextInstance) { if(here->VSRCacGiven && !here->VSRCacMGiven) { here->VSRCacMag = 1; } if(here->VSRCacGiven && !here->VSRCacPGiven) { here->VSRCacPhase = 0; } if(!here->VSRCdcGiven) { /* no DC value - either have a transient value, or none */ if(here->VSRCfuncTGiven) { SPfrontEnd->IFerror (ERR_WARNING, "%s: no DC value, transient time 0 value used", &(here->VSRCname)); } else { SPfrontEnd->IFerror (ERR_WARNING, "%s: has no value, DC 0 assumed", &(here->VSRCname)); } } radians = here->VSRCacPhase * M_PI / 180.0; here->VSRCacReal = here->VSRCacMag * cos(radians); here->VSRCacImag = here->VSRCacMag * sin(radians); } } return(OK); } ngspice-26/src/spicelib/devices/vsrc/vsrcfbr.c0000644000265600020320000000171412264261473021027 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vsrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VSRCfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name) { VSRCmodel *model = (VSRCmodel *)inModel; VSRCinstance *here; int error; CKTnode *tmp; for( ; model != NULL; model = model->VSRCnextModel) { for (here = model->VSRCinstances; here != NULL; here = here->VSRCnextInstance) { if(here->VSRCname == name) { if(here->VSRCbranch == 0) { error = CKTmkCur(ckt,&tmp,here->VSRCname,"branch"); if(error) return(error); here->VSRCbranch = tmp->number; } return(here->VSRCbranch); } } } return(0); } ngspice-26/src/spicelib/devices/hisimhv1/0000755000265600020320000000000012264261707017764 5ustar andreasadminngspice-26/src/spicelib/devices/hisimhv1/hsmhvsoachk.c0000644000265600020320000000714612264261473022456 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int HSMHVsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { HSMHVmodel *model = (HSMHVmodel *) inModel; HSMHVinstance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->HSMHVnextModel) { for (here = model->HSMHVinstances; here; here = here->HSMHVnextInstance) { vgs = fabs(ckt->CKTrhsOld [here->HSMHVgNode] - ckt->CKTrhsOld [here->HSMHVsNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->HSMHVgNode] - ckt->CKTrhsOld [here->HSMHVdNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->HSMHVgNode] - ckt->CKTrhsOld [here->HSMHVbNode]); vds = fabs(ckt->CKTrhsOld [here->HSMHVdNodePrime] - ckt->CKTrhsOld [here->HSMHVsNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->HSMHVbNode] - ckt->CKTrhsOld [here->HSMHVsNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->HSMHVbNode] - ckt->CKTrhsOld [here->HSMHVdNodePrime]); if (vgs > model->HSMHVvgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->HSMHVvgsMax); warns_vgs++; } if (vgd > model->HSMHVvgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->HSMHVvgdMax); warns_vgd++; } if (vgb > model->HSMHVvgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->HSMHVvgbMax); warns_vgb++; } if (vds > model->HSMHVvdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->HSMHVvdsMax); warns_vds++; } if (vbs > model->HSMHVvbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->HSMHVvbsMax); warns_vbs++; } if (vbd > model->HSMHVvbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->HSMHVvbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvmdel.c0000644000265600020320000000252312264261473022121 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvmdel.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVmDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { HSMHVmodel **model = (HSMHVmodel**)inModel; HSMHVmodel *modfast = (HSMHVmodel*)kill; HSMHVinstance *here; HSMHVinstance *prev = NULL; HSMHVmodel **oldmod; oldmod = model; for ( ;*model ;model = &((*model)->HSMHVnextModel) ) { if ( (*model)->HSMHVmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->HSMHVnextModel; /* cut deleted device out of list */ for ( here = (*model)->HSMHVinstances ; here ;here = here->HSMHVnextInstance ) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvnoi.c0000644000265600020320000002050212264261473021762 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvnoi.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsmhvdef.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ #include "hsmhvevalenv.h" /* #include "hsmhvmacro.h" */ /* * HSMHVnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int HSMHVnoise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, register Ndata *data, double *OnDens) { register HSMHVmodel *model = (HSMHVmodel *)inModel; register HSMHVinstance *here; char name[N_MXVLNTH]; double tempOnoise=0.0 ; double tempInoise=0.0 ; double noizDens[HSMHVNSRCS] ; double lnNdens[HSMHVNSRCS] ; register int i; double G =0.0 ; double TTEMP = 0.0 ; /* define the names of the noise sources */ static char * HSMHVnNames[HSMHVNSRCS] = { /* Note that we have to keep the order consistent with the index definitions in hsmhvdefs.h */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".id", /* noise due to id */ ".1ovf", /* flicker (1/f) noise */ ".ign", /* induced gate noise component at the drain node */ "" /* total transistor noise */ }; for ( ;model != NULL; model = model->HSMHVnextModel ) { for ( here = model->HSMHVinstances; here != NULL; here = here->HSMHVnextInstance ) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) { switch (mode) { case N_DENS: for ( i = 0; i < HSMHVNSRCS; i++ ) { (void) sprintf(name, "onoise.%s%s", here->HSMHVname, HSMHVnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); } break; case INT_NOIZ: for ( i = 0; i < HSMHVNSRCS; i++ ) { (void) sprintf(name, "onoise_total.%s%s", here->HSMHVname, HSMHVnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); (void) sprintf(name, "inoise_total.%s%s", here->HSMHVname, HSMHVnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); } break; } } break; case N_CALC: switch (mode) { case N_DENS: /* temperature */ TTEMP = ckt->CKTtemp; if ( here->HSMHV_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV_dtemp ; } TTEMP = TTEMP + *(ckt->CKTstate0 + here->HSMHVdeltemp) ; /* rs/rd thermal noise */ if ( model->HSMHV_corsrd == 1 || model->HSMHV_corsrd == 3 ) { NevalSrc(&noizDens[HSMHVRDNOIZ], (double*) NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVdNode, (double) 0.0); noizDens[HSMHVRDNOIZ] *= 4 * C_KB * TTEMP * here->HSMHVdrainConductance ; lnNdens[HSMHVRDNOIZ] = log( MAX(noizDens[HSMHVRDNOIZ],N_MINLOG) ); NevalSrc(&noizDens[HSMHVRSNOIZ], (double*) NULL, ckt, N_GAIN, here->HSMHVsNodePrime, here->HSMHVsNode, (double) 0.0); noizDens[HSMHVRSNOIZ] *= 4 * C_KB * TTEMP * here->HSMHVsourceConductance ; lnNdens[HSMHVRSNOIZ] = log( MAX(noizDens[HSMHVRSNOIZ],N_MINLOG) ); } else { noizDens[HSMHVRDNOIZ] = 0e0 ; lnNdens[HSMHVRDNOIZ] = N_MINLOG ; noizDens[HSMHVRSNOIZ] = 0e0 ; lnNdens[HSMHVRSNOIZ] = N_MINLOG ; } /* channel thermal noise */ NevalSrc(&noizDens[HSMHVIDNOIZ], (double*) NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, (double) 0.0); switch( model->HSMHV_noise ) { case 1: /* HiSIMHV model */ G = here->HSMHV_noithrml ; noizDens[HSMHVIDNOIZ] *= 4 * C_KB * TTEMP * G ; lnNdens[HSMHVIDNOIZ] = log( MAX(noizDens[HSMHVIDNOIZ],N_MINLOG) ); break; } /* flicker noise */ NevalSrc(&noizDens[HSMHVFLNOIZ], (double*) NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, (double) 0.0); switch ( model->HSMHV_noise ) { case 1: /* HiSIM model */ noizDens[HSMHVFLNOIZ] *= here->HSMHV_noiflick / pow(data->freq, model->HSMHV_falph) ; lnNdens[HSMHVFLNOIZ] = log(MAX(noizDens[HSMHVFLNOIZ], N_MINLOG)); break; } /* induced gate noise */ NevalSrc(&noizDens[HSMHVIGNOIZ], (double*) NULL, ckt, N_GAIN, here->HSMHVdNodePrime, here->HSMHVsNodePrime, (double) 0.0); switch ( model->HSMHV_noise ) { case 1: /* HiSIM model */ noizDens[HSMHVIGNOIZ] *= here->HSMHV_noiigate * here->HSMHV_noicross * here->HSMHV_noicross * data->freq * data->freq; lnNdens[HSMHVIGNOIZ] = log(MAX(noizDens[HSMHVIGNOIZ], N_MINLOG)); break; } /* total */ noizDens[HSMHVTOTNOIZ] = noizDens[HSMHVRDNOIZ] + noizDens[HSMHVRSNOIZ] + noizDens[HSMHVIDNOIZ] + noizDens[HSMHVFLNOIZ] + noizDens[HSMHVIGNOIZ]; lnNdens[HSMHVTOTNOIZ] = log(MAX(noizDens[HSMHVTOTNOIZ], N_MINLOG)); *OnDens += noizDens[HSMHVTOTNOIZ]; if ( data->delFreq == 0.0 ) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for ( i = 0; i < HSMHVNSRCS; i++ ) here->HSMHVnVar[LNLSTDENS][i] = lnNdens[i]; /* clear out our integration variables if it's the first pass */ if (data->freq == ((NOISEAN*) ckt->CKTcurJob)->NstartFreq) { for (i = 0; i < HSMHVNSRCS; i++) { here->HSMHVnVar[OUTNOIZ][i] = 0.0; here->HSMHVnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for ( i = 0; i < HSMHVNSRCS; i++ ) { if ( i != HSMHVTOTNOIZ ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->HSMHVnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->HSMHVnVar[LNLSTDENS][i] + data->lnGainInv, data); here->HSMHVnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if ( ((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0 ) { here->HSMHVnVar[OUTNOIZ][i] += tempOnoise; here->HSMHVnVar[OUTNOIZ][HSMHVTOTNOIZ] += tempOnoise; here->HSMHVnVar[INNOIZ][i] += tempInoise; here->HSMHVnVar[INNOIZ][HSMHVTOTNOIZ] += tempInoise; } } } } if ( data->prtSummary ) { for (i = 0; i < HSMHVNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if ( ((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0 ) { for ( i = 0; i < HSMHVNSRCS; i++ ) { data->outpVector[data->outNumber++] = here->HSMHVnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->HSMHVnVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvacld.c0000644000265600020320000003502712264261473022110 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvacld.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "hsmhvdef.h" int HSMHVacLoad( GENmodel *inModel, register CKTcircuit *ckt) { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; double omega=0.0 ; int flg_nqs =0 ; int flg_subNode = 0 ; #define dNode 0 #define dNodePrime 1 #define gNode 2 #define gNodePrime 3 #define sNode 4 #define sNodePrime 5 #define bNodePrime 6 #define bNode 7 #define dbNode 8 #define sbNode 9 #define subNode 10 #define tempNode 11 #define qiNode 12 #define qbNode 13 omega = ckt->CKTomega; for ( ; model != NULL; model = model->HSMHVnextModel ) { for ( here = model->HSMHVinstances; here!= NULL; here = here->HSMHVnextInstance ) { flg_nqs = model->HSMHV_conqs ; flg_subNode = here->HSMHVsubNode ; /* if flg_subNode > 0, external(/internal) substrate node exists */ /* stamp matrix */ /*drain*/ *(here->HSMHVDdPtr) += here->HSMHV_ydc_d[dNode] ; *(here->HSMHVDdPtr +1) += omega*here->HSMHV_ydyn_d[dNode] ; *(here->HSMHVDdpPtr) += here->HSMHV_ydc_d[dNodePrime] ; *(here->HSMHVDdpPtr +1) += omega*here->HSMHV_ydyn_d[dNodePrime]; *(here->HSMHVDgpPtr) += here->HSMHV_ydc_d[gNodePrime]; *(here->HSMHVDgpPtr +1) += omega*here->HSMHV_ydyn_d[gNodePrime]; *(here->HSMHVDsPtr) += here->HSMHV_ydc_d[sNode]; *(here->HSMHVDsPtr +1) += omega*here->HSMHV_ydyn_d[sNode]; *(here->HSMHVDbpPtr) += here->HSMHV_ydc_d[bNodePrime]; *(here->HSMHVDbpPtr +1) += omega*here->HSMHV_ydyn_d[bNodePrime]; *(here->HSMHVDdbPtr) += here->HSMHV_ydc_d[dbNode]; *(here->HSMHVDdbPtr +1) += omega*here->HSMHV_ydyn_d[dbNode]; if (flg_subNode > 0) { *(here->HSMHVDsubPtr) += here->HSMHV_ydc_d[subNode]; } if( here->HSMHVtempNode > 0) { *(here->HSMHVDtempPtr) += model->HSMHV_type*here->HSMHV_ydc_d[tempNode]; *(here->HSMHVDtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_d[tempNode]; } /*drain prime*/ *(here->HSMHVDPdPtr) += here->HSMHV_ydc_dP[dNode] ; *(here->HSMHVDPdPtr +1) += omega*here->HSMHV_ydyn_dP[dNode]; *(here->HSMHVDPdpPtr) += here->HSMHV_ydc_dP[dNodePrime]; *(here->HSMHVDPdpPtr +1) += omega*here->HSMHV_ydyn_dP[dNodePrime]; *(here->HSMHVDPgpPtr) += here->HSMHV_ydc_dP[gNodePrime]; *(here->HSMHVDPgpPtr +1) += omega*here->HSMHV_ydyn_dP[gNodePrime]; *(here->HSMHVDPsPtr) += here->HSMHV_ydc_dP[sNode] ; *(here->HSMHVDPsPtr +1) += omega*here->HSMHV_ydyn_dP[sNode]; *(here->HSMHVDPspPtr) += here->HSMHV_ydc_dP[sNodePrime] ; *(here->HSMHVDPspPtr +1) += omega*here->HSMHV_ydyn_dP[sNodePrime]; *(here->HSMHVDPbpPtr) += here->HSMHV_ydc_dP[bNodePrime] ; *(here->HSMHVDPbpPtr +1) += omega*here->HSMHV_ydyn_dP[bNodePrime]; if (flg_subNode > 0) { *(here->HSMHVDPsubPtr) += here->HSMHV_ydc_dP[subNode]; } if( here->HSMHVtempNode > 0) { *(here->HSMHVDPtempPtr) += model->HSMHV_type*here->HSMHV_ydc_dP[tempNode]; *(here->HSMHVDPtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_dP[tempNode]; } if (flg_nqs) { *(here->HSMHVDPqiPtr) += model->HSMHV_type*here->HSMHV_ydc_dP[qiNode]; *(here->HSMHVDPqiPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_dP[qiNode]; } /*gate*/ *(here->HSMHVGgPtr) += here->HSMHV_ydc_g[gNode] ; *(here->HSMHVGgPtr +1) += omega*here->HSMHV_ydyn_g[gNode]; *(here->HSMHVGgpPtr) += here->HSMHV_ydc_g[gNodePrime] ; *(here->HSMHVGgpPtr +1) += omega*here->HSMHV_ydyn_g[gNodePrime]; /*gate prime*/ *(here->HSMHVGPdPtr) += here->HSMHV_ydc_gP[dNode] ; *(here->HSMHVGPdPtr +1) += omega*here->HSMHV_ydyn_gP[dNode]; *(here->HSMHVGPdpPtr) += here->HSMHV_ydc_gP[dNodePrime] ; *(here->HSMHVGPdpPtr +1) += omega*here->HSMHV_ydyn_gP[dNodePrime]; *(here->HSMHVGPgPtr) += here->HSMHV_ydc_gP[gNode]; *(here->HSMHVGPgPtr +1) += omega*here->HSMHV_ydyn_gP[gNode]; *(here->HSMHVGPgpPtr) += here->HSMHV_ydc_gP[gNodePrime] ; *(here->HSMHVGPgpPtr +1) += omega*here->HSMHV_ydyn_gP[gNodePrime]; *(here->HSMHVGPsPtr) += here->HSMHV_ydc_gP[sNode]; *(here->HSMHVGPsPtr +1) += omega*here->HSMHV_ydyn_gP[sNode]; *(here->HSMHVGPspPtr) += here->HSMHV_ydc_gP[sNodePrime] ; *(here->HSMHVGPspPtr +1) += omega*here->HSMHV_ydyn_gP[sNodePrime]; *(here->HSMHVGPbpPtr) += here->HSMHV_ydc_gP[bNodePrime] ; *(here->HSMHVGPbpPtr +1) += omega*here->HSMHV_ydyn_gP[bNodePrime]; if( here->HSMHVtempNode > 0) { *(here->HSMHVGPtempPtr) += model->HSMHV_type*here->HSMHV_ydc_gP[tempNode] ; *(here->HSMHVGPtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_gP[tempNode]; } if (flg_nqs) { *(here->HSMHVGPqiPtr) += model->HSMHV_type*here->HSMHV_ydc_gP[qiNode]; *(here->HSMHVGPqiPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_gP[qiNode]; *(here->HSMHVGPqbPtr) += model->HSMHV_type*here->HSMHV_ydc_gP[qbNode]; *(here->HSMHVGPqbPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_gP[qbNode]; } /*source*/ *(here->HSMHVSdPtr) += here->HSMHV_ydc_s[dNode]; *(here->HSMHVSdPtr +1) += omega*here->HSMHV_ydyn_s[dNode]; *(here->HSMHVSgpPtr) += here->HSMHV_ydc_s[gNodePrime]; *(here->HSMHVSgpPtr +1) += omega*here->HSMHV_ydyn_s[gNodePrime]; *(here->HSMHVSsPtr) += here->HSMHV_ydc_s[sNode] ; *(here->HSMHVSsPtr +1) += omega*here->HSMHV_ydyn_s[sNode]; *(here->HSMHVSspPtr) += here->HSMHV_ydc_s[sNodePrime] ; *(here->HSMHVSspPtr +1) += omega*here->HSMHV_ydyn_s[sNodePrime]; *(here->HSMHVSbpPtr) += here->HSMHV_ydc_s[bNodePrime]; *(here->HSMHVSbpPtr +1) += omega*here->HSMHV_ydyn_s[bNodePrime]; *(here->HSMHVSsbPtr) += here->HSMHV_ydc_s[sbNode] ; *(here->HSMHVSsbPtr +1) += omega*here->HSMHV_ydyn_s[sbNode]; if (flg_subNode > 0) { *(here->HSMHVSsubPtr) += here->HSMHV_ydc_s[subNode]; } if( here->HSMHVtempNode > 0) { *(here->HSMHVStempPtr) += model->HSMHV_type*here->HSMHV_ydc_s[tempNode]; *(here->HSMHVStempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_s[tempNode]; } /*source prime*/ *(here->HSMHVSPdPtr) += here->HSMHV_ydc_sP[dNode] ; *(here->HSMHVSPdPtr +1) += omega*here->HSMHV_ydyn_sP[dNode]; *(here->HSMHVSPdpPtr) += here->HSMHV_ydc_sP[dNodePrime] ; *(here->HSMHVSPdpPtr +1) += omega*here->HSMHV_ydyn_sP[dNodePrime]; *(here->HSMHVSPgpPtr) += here->HSMHV_ydc_sP[gNodePrime] ; *(here->HSMHVSPgpPtr +1) += omega*here->HSMHV_ydyn_sP[gNodePrime]; *(here->HSMHVSPsPtr) += here->HSMHV_ydc_sP[sNode] ; *(here->HSMHVSPsPtr +1) += omega*here->HSMHV_ydyn_sP[sNode]; *(here->HSMHVSPspPtr) += here->HSMHV_ydc_sP[sNodePrime] ; *(here->HSMHVSPspPtr +1) += omega*here->HSMHV_ydyn_sP[sNodePrime]; *(here->HSMHVSPbpPtr) += here->HSMHV_ydc_sP[bNodePrime]; *(here->HSMHVSPbpPtr +1) += omega*here->HSMHV_ydyn_sP[bNodePrime]; if (flg_subNode > 0) { *(here->HSMHVSPsubPtr) += here->HSMHV_ydc_sP[subNode]; } if( here->HSMHVtempNode > 0) { *(here->HSMHVSPtempPtr) += model->HSMHV_type*here->HSMHV_ydc_sP[tempNode] ; *(here->HSMHVSPtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_sP[tempNode]; } if (flg_nqs) { *(here->HSMHVSPqiPtr) += model->HSMHV_type*here->HSMHV_ydc_sP[qiNode]; *(here->HSMHVSPqiPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_sP[qiNode]; } /*bulk prime*/ *(here->HSMHVBPdPtr) += here->HSMHV_ydc_bP[dNode]; *(here->HSMHVBPdPtr +1) += omega*here->HSMHV_ydyn_bP[dNode]; *(here->HSMHVBPsPtr) += here->HSMHV_ydc_bP[sNode]; *(here->HSMHVBPsPtr +1) += omega*here->HSMHV_ydyn_bP[sNode]; *(here->HSMHVBPdpPtr) += here->HSMHV_ydc_bP[dNodePrime]; *(here->HSMHVBPdpPtr +1) += omega*here->HSMHV_ydyn_bP[dNodePrime]; *(here->HSMHVBPgpPtr) += here->HSMHV_ydc_bP[gNodePrime] ; *(here->HSMHVBPgpPtr +1) += omega*here->HSMHV_ydyn_bP[gNodePrime]; *(here->HSMHVBPspPtr) += here->HSMHV_ydc_bP[sNodePrime]; *(here->HSMHVBPspPtr +1) += omega*here->HSMHV_ydyn_bP[sNodePrime]; *(here->HSMHVBPbpPtr) += here->HSMHV_ydc_bP[bNodePrime]; *(here->HSMHVBPbpPtr +1) += omega*here->HSMHV_ydyn_bP[bNodePrime]; *(here->HSMHVBPbPtr) += here->HSMHV_ydc_bP[bNode]; *(here->HSMHVBPbPtr +1) += omega*here->HSMHV_ydyn_bP[bNode]; *(here->HSMHVBPdbPtr) += here->HSMHV_ydc_bP[dbNode] ; *(here->HSMHVBPdbPtr +1) += omega*here->HSMHV_ydyn_bP[dbNode]; *(here->HSMHVBPsbPtr) += here->HSMHV_ydc_bP[sbNode] ; *(here->HSMHVBPsbPtr +1) += omega*here->HSMHV_ydyn_bP[sbNode]; if( here->HSMHVtempNode > 0) { *(here->HSMHVBPtempPtr) += model->HSMHV_type*here->HSMHV_ydc_bP[tempNode] ; *(here->HSMHVBPtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_bP[tempNode]; } if (flg_nqs) { *(here->HSMHVBPqbPtr) += model->HSMHV_type*here->HSMHV_ydc_bP[qbNode]; *(here->HSMHVBPqbPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_bP[qbNode]; } /*bulk*/ *(here->HSMHVBbpPtr) += here->HSMHV_ydc_b[bNodePrime] ; *(here->HSMHVBbpPtr +1) += omega*here->HSMHV_ydyn_b[bNodePrime]; *(here->HSMHVBbPtr) += here->HSMHV_ydc_b[bNode] ; *(here->HSMHVBbPtr +1) += omega*here->HSMHV_ydyn_b[bNode]; /*drain bulk*/ *(here->HSMHVDBdPtr) += here->HSMHV_ydc_db[dNode] ; *(here->HSMHVDBdPtr +1) += omega*here->HSMHV_ydyn_db[dNode]; *(here->HSMHVDBbpPtr) += here->HSMHV_ydc_db[bNodePrime] ; *(here->HSMHVDBbpPtr +1) += omega*here->HSMHV_ydyn_db[bNodePrime]; *(here->HSMHVDBdbPtr) += here->HSMHV_ydc_db[dbNode] ; *(here->HSMHVDBdbPtr +1) += omega*here->HSMHV_ydyn_db[dbNode]; if( here->HSMHVtempNode > 0) { *(here->HSMHVDBtempPtr) += model->HSMHV_type*here->HSMHV_ydc_db[tempNode] ; *(here->HSMHVDBtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_db[tempNode]; } /*source bulk*/ *(here->HSMHVSBsPtr) += here->HSMHV_ydc_sb[sNode] ; *(here->HSMHVSBsPtr +1) += omega*here->HSMHV_ydyn_sb[sNode]; *(here->HSMHVSBbpPtr) += here->HSMHV_ydc_sb[bNodePrime]; *(here->HSMHVSBbpPtr +1) += omega*here->HSMHV_ydyn_sb[bNodePrime]; *(here->HSMHVSBsbPtr) += here->HSMHV_ydc_sb[sbNode] ; *(here->HSMHVSBsbPtr +1) += omega*here->HSMHV_ydyn_sb[sbNode]; if( here->HSMHVtempNode > 0) { *(here->HSMHVSBtempPtr) += model->HSMHV_type*here->HSMHV_ydc_sb[tempNode]; *(here->HSMHVSBtempPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_sb[tempNode]; } /*temp*/ if( here->HSMHVtempNode > 0) { *(here->HSMHVTempdPtr) += model->HSMHV_type*here->HSMHV_ydc_t[dNode] ; *(here->HSMHVTempdPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[dNode]; *(here->HSMHVTempdpPtr) += model->HSMHV_type*here->HSMHV_ydc_t[dNodePrime] ; *(here->HSMHVTempdpPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[dNodePrime]; *(here->HSMHVTempgpPtr) += model->HSMHV_type*here->HSMHV_ydc_t[gNodePrime]; *(here->HSMHVTempgpPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[gNodePrime]; *(here->HSMHVTempsPtr) += model->HSMHV_type*here->HSMHV_ydc_t[sNode] ; *(here->HSMHVTempsPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[sNode]; *(here->HSMHVTempspPtr) += model->HSMHV_type*here->HSMHV_ydc_t[sNodePrime] ; *(here->HSMHVTempspPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[sNodePrime]; *(here->HSMHVTempbpPtr) += model->HSMHV_type*here->HSMHV_ydc_t[bNodePrime] ; *(here->HSMHVTempbpPtr +1) += model->HSMHV_type*omega*here->HSMHV_ydyn_t[bNodePrime]; *(here->HSMHVTemptempPtr) += here->HSMHV_ydc_t[tempNode] ; *(here->HSMHVTemptempPtr +1) += omega*here->HSMHV_ydyn_t[tempNode]; } /* additional entries for flat nqs handling */ if ( flg_nqs ) { /*qi*/ *(here->HSMHVQIdpPtr) += model->HSMHV_type*here->HSMHV_ydc_qi[dNodePrime]; *(here->HSMHVQIdpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qi[dNodePrime]; *(here->HSMHVQIgpPtr) += model->HSMHV_type*here->HSMHV_ydc_qi[gNodePrime]; *(here->HSMHVQIgpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qi[gNodePrime]; *(here->HSMHVQIspPtr) += model->HSMHV_type*here->HSMHV_ydc_qi[sNodePrime]; *(here->HSMHVQIspPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qi[sNodePrime]; *(here->HSMHVQIbpPtr) += model->HSMHV_type*here->HSMHV_ydc_qi[bNodePrime]; *(here->HSMHVQIbpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qi[bNodePrime]; *(here->HSMHVQIqiPtr) += here->HSMHV_ydc_qi[qiNode]; *(here->HSMHVQIqiPtr+1) += omega*here->HSMHV_ydyn_qi[qiNode]; if ( here->HSMHVtempNode > 0 ) { *(here->HSMHVQItempPtr) += here->HSMHV_ydc_qi[tempNode]; *(here->HSMHVQItempPtr+1) += omega*here->HSMHV_ydyn_qi[tempNode]; } /*qb*/ *(here->HSMHVQBdpPtr) += model->HSMHV_type*here->HSMHV_ydc_qb[dNodePrime]; *(here->HSMHVQBdpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qb[dNodePrime]; *(here->HSMHVQBgpPtr) += model->HSMHV_type*here->HSMHV_ydc_qb[gNodePrime]; *(here->HSMHVQBgpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qb[gNodePrime]; *(here->HSMHVQBspPtr) += model->HSMHV_type*here->HSMHV_ydc_qb[sNodePrime]; *(here->HSMHVQBspPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qb[sNodePrime]; *(here->HSMHVQBbpPtr) += model->HSMHV_type*here->HSMHV_ydc_qb[bNodePrime]; *(here->HSMHVQBbpPtr+1) += model->HSMHV_type*omega*here->HSMHV_ydyn_qb[bNodePrime]; *(here->HSMHVQBqbPtr) += here->HSMHV_ydc_qb[qbNode]; *(here->HSMHVQBqbPtr+1) += omega*here->HSMHV_ydyn_qb[qbNode]; if ( here->HSMHVtempNode > 0 ) { *(here->HSMHVQBtempPtr) += here->HSMHV_ydc_qb[tempNode]; *(here->HSMHVQBtempPtr+1) += omega*here->HSMHV_ydyn_qb[tempNode]; } } } } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvdef.h0000644000265600020320000026714412264261473021757 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvdef DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #ifndef HSMHV #define HSMHV #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for HiSIMHV MOSFETs */ /* unit-converted model parameters */ typedef struct sHSMHVmodelMKSParam { double HSMHV_npext ; double HSMHV_vmax ; double HSMHV_ll ; double HSMHV_wl ; double HSMHV_svgsl ; double HSMHV_svgsw ; double HSMHV_svbsl ; double HSMHV_slgl ; double HSMHV_sub1l ; double HSMHV_slg ; double HSMHV_sub2l ; double HSMHV_subld2 ; double HSMHV_rd22 ; double HSMHV_rd23 ; double HSMHV_rd24 ; double HSMHV_rdtemp1 ; double HSMHV_rdtemp2 ; double HSMHV_rdvd ; double HSMHV_rdvdtemp1 ; double HSMHV_rdvdtemp2 ; //double HSMHV_muecb0 ; //double HSMHV_muecb1 ; //double HSMHV_muesr1 ; //double HSMHV_mueph1 ; double HSMHV_nsubsub ; double HSMHV_nsubpsti1 ; double HSMHV_muesti1 ; double HSMHV_wfc ; double HSMHV_glksd1 ; double HSMHV_glksd2 ; double HSMHV_glksd3 ; double HSMHV_gleak2 ; double HSMHV_gleak4 ; double HSMHV_gleak5 ; double HSMHV_gleak7 ; double HSMHV_glkb2 ; double HSMHV_fn2 ; double HSMHV_gidl1 ; double HSMHV_gidl2 ; double HSMHV_nfalp ; double HSMHV_nftrp ; double HSMHV_cit ; double HSMHV_ovslp ; double HSMHV_dly3 ; double HSMHV_rth0 ; double HSMHV_cth0 ; } HSMHVmodelMKSParam ; /* binning parameters */ typedef struct sHSMHVbinningParam { double HSMHV_vmax ; double HSMHV_bgtmp1 ; double HSMHV_bgtmp2 ; double HSMHV_eg0 ; double HSMHV_vfbover ; double HSMHV_nover ; double HSMHV_novers ; double HSMHV_wl2 ; double HSMHV_vfbc ; double HSMHV_nsubc ; double HSMHV_nsubp ; double HSMHV_scp1 ; double HSMHV_scp2 ; double HSMHV_scp3 ; double HSMHV_sc1 ; double HSMHV_sc2 ; double HSMHV_sc3 ; double HSMHV_pgd1 ; double HSMHV_pgd3 ; double HSMHV_ndep ; double HSMHV_ninv ; double HSMHV_muecb0 ; double HSMHV_muecb1 ; double HSMHV_mueph1 ; double HSMHV_vtmp ; double HSMHV_wvth0 ; double HSMHV_muesr1 ; double HSMHV_muetmp ; double HSMHV_sub1 ; double HSMHV_sub2 ; double HSMHV_svds ; double HSMHV_svbs ; double HSMHV_svgs ; double HSMHV_fn1 ; double HSMHV_fn2 ; double HSMHV_fn3 ; double HSMHV_fvbs ; double HSMHV_nsti ; double HSMHV_wsti ; double HSMHV_scsti1 ; double HSMHV_scsti2 ; double HSMHV_vthsti ; double HSMHV_muesti1 ; double HSMHV_muesti2 ; double HSMHV_muesti3 ; double HSMHV_nsubpsti1 ; double HSMHV_nsubpsti2 ; double HSMHV_nsubpsti3 ; double HSMHV_cgso ; double HSMHV_cgdo ; double HSMHV_js0 ; double HSMHV_js0sw ; double HSMHV_nj ; double HSMHV_cisbk ; double HSMHV_clm1 ; double HSMHV_clm2 ; double HSMHV_clm3 ; double HSMHV_wfc ; double HSMHV_gidl1 ; double HSMHV_gidl2 ; double HSMHV_gleak1 ; double HSMHV_gleak2 ; double HSMHV_gleak3 ; double HSMHV_gleak6 ; double HSMHV_glksd1 ; double HSMHV_glksd2 ; double HSMHV_glkb1 ; double HSMHV_glkb2 ; double HSMHV_nftrp ; double HSMHV_nfalp ; double HSMHV_pthrou ; double HSMHV_vdiffj ; double HSMHV_ibpc1 ; double HSMHV_ibpc2 ; double HSMHV_cgbo ; double HSMHV_cvdsover ; double HSMHV_falph ; double HSMHV_npext ; double HSMHV_powrat ; double HSMHV_rd ; double HSMHV_rd22 ; double HSMHV_rd23 ; double HSMHV_rd24 ; double HSMHV_rdict1 ; double HSMHV_rdov13 ; double HSMHV_rdslp1 ; double HSMHV_rdvb ; double HSMHV_rdvd ; double HSMHV_rdvg11 ; double HSMHV_rs ; double HSMHV_rth0 ; double HSMHV_vover ; /*-----------SHE--------------*/ double HSMHV_rth ; double HSMHV_cth ; /*-----------------------------*/ } HSMHVbinningParam ; /* unit-converted parameters for each instance */ typedef struct sHSMHVhereMKSParam { double HSMHV_vmax ; double HSMHV_subld2 ; //double HSMHV_muecb0 ; //double HSMHV_muecb1 ; //double HSMHV_muesr1 ; //double HSMHV_mueph1 ; double HSMHV_ndep ; double HSMHV_ninv ; double HSMHV_nsubc ; double HSMHV_nsubcdfm ; double HSMHV_nsubp ; double HSMHV_nsubpsti1 ; double HSMHV_muesti1 ; double HSMHV_nsti ; double HSMHV_npext ; double HSMHV_nover ; double HSMHV_novers ; double HSMHV_wfc ; double HSMHV_glksd1 ; double HSMHV_glksd2 ; double HSMHV_gleak2 ; double HSMHV_glkb2 ; double HSMHV_fn2 ; double HSMHV_gidl1 ; double HSMHV_gidl2 ; double HSMHV_nfalp ; double HSMHV_nftrp ; } HSMHVhereMKSParam ; /* information needed for each instance */ typedef struct sHSMHVinstance { struct sHSMHVmodel *HSMHVmodPtr; /* pointer to model */ struct sHSMHVinstance *HSMHVnextInstance; /* pointer to next instance of current model*/ IFuid HSMHVname; /* pointer to character string naming this instance */ int HSMHVstates; /* index into state table for this device */ int HSMHVdNode; /* number of the drain node of the mosfet */ int HSMHVgNode; /* number of the gate node of the mosfet */ int HSMHVsNode; /* number of the source node of the mosfet */ int HSMHVbNode; /* number of the bulk node of the mosfet */ int HSMHVsubNode; /* number of the substrate node */ int HSMHVtempNode; /* number of the temp node----------SHE--------*/ int HSMHVdNodePrime; /* number od the inner drain node */ int HSMHVgNodePrime; /* number of the inner gate node */ int HSMHVsNodePrime; /* number od the inner source node */ int HSMHVbNodePrime; int HSMHVdbNode; int HSMHVsbNode; int HSMHVqiNode; /* number of the qi node in case of NQS */ int HSMHVqbNode; /* number of the qb node in case of NQS */ double HSMHV_noiflick; /* for 1/f noise calc. */ double HSMHV_noithrml; /* for thrmal noise calc. */ double HSMHV_noiigate; /* for induced gate noise */ double HSMHV_noicross; /* for induced gate noise */ /* instance */ int HSMHV_coselfheat; /* Self-heating model */ int HSMHV_cosubnode; /* switch tempNode to subNode */ double HSMHV_l; /* the length of the channel region */ double HSMHV_w; /* the width of the channel region */ double HSMHV_ad; /* the area of the drain diffusion */ double HSMHV_as; /* the area of the source diffusion */ double HSMHV_pd; /* perimeter of drain junction [m] */ double HSMHV_ps; /* perimeter of source junction [m] */ double HSMHV_nrd; /* equivalent num of squares of drain [-] (unused) */ double HSMHV_nrs; /* equivalent num of squares of source [-] (unused) */ double HSMHV_dtemp; double HSMHV_weff; /* the effective width of the channel region */ double HSMHV_weff_ld; /* the effective width of the drift region */ double HSMHV_weff_cv; /* the effective width of the drift region for capacitance */ double HSMHV_weff_nf; /* Weff * NF */ double HSMHV_weffcv_nf; /* Weffcv * NF */ double HSMHV_leff; /* the effective length of the channel region */ int HSMHV_corbnet ; double HSMHV_rbpb ; double HSMHV_rbpd ; double HSMHV_rbps ; double HSMHV_rbdb ; double HSMHV_rbsb ; int HSMHV_corg ; double HSMHV_ngcon; double HSMHV_xgw; double HSMHV_xgl; double HSMHV_nf; double HSMHV_sa; double HSMHV_sb; double HSMHV_sd; double HSMHV_nsubcdfm; double HSMHV_m; double HSMHV_subld1; double HSMHV_subld2; double HSMHV_lover; double HSMHV_lovers; double HSMHV_loverld; double HSMHV_ldrift1; double HSMHV_ldrift2; double HSMHV_ldrift1s; double HSMHV_ldrift2s; int HSMHV_called; /* flag to check the first call */ /* previous values to evaluate initial guess */ double HSMHV_mode_prv; double HSMHV_vbsc_prv; double HSMHV_vdsc_prv; double HSMHV_vgsc_prv; double HSMHV_ps0_prv; double HSMHV_ps0_dvbs_prv; double HSMHV_ps0_dvds_prv; double HSMHV_ps0_dvgs_prv; double HSMHV_ps0_dtemp_prv; double HSMHV_pds_prv; double HSMHV_pds_dvbs_prv; double HSMHV_pds_dvds_prv; double HSMHV_pds_dvgs_prv; double HSMHV_pds_dtemp_prv; /* double HSMHV_ids_prv; not used */ /* double HSMHV_ids_dvbs_prv; not used */ /* double HSMHV_ids_dvds_prv; not used */ /* double HSMHV_ids_dvgs_prv; not used */ /* double HSMHV_ids_dtemp_prv; not used */ double HSMHV_mode_prv2; double HSMHV_vbsc_prv2; double HSMHV_vdsc_prv2; double HSMHV_vgsc_prv2; double HSMHV_ps0_prv2; /* assigned but not used */ double HSMHV_ps0_dvbs_prv2; double HSMHV_ps0_dvds_prv2; double HSMHV_ps0_dvgs_prv2; double HSMHV_pds_prv2; /* assigned but not used */ double HSMHV_pds_dvbs_prv2; double HSMHV_pds_dvds_prv2; double HSMHV_pds_dvgs_prv2; double HSMHV_temp_prv; /* double HSMHV_time; /\* for debug print *\/ */ /* output */ /* int HSMHV_capop; not used */ /* double HSMHV_gd; not used */ /* double HSMHV_gs; not used */ double HSMHV_cgso; /* can be made local */ double HSMHV_cgdo; double HSMHV_cgbo; double HSMHV_cggo; double HSMHV_cdso; /* can be made local */ double HSMHV_cddo; double HSMHV_cdgo; double HSMHV_cdbo; double HSMHV_csso; /* can be made local */ double HSMHV_csdo; /* can be made local */ double HSMHV_csgo; /* can be made local */ double HSMHV_csbo; /* can be made local */ double HSMHV_cbdo; double HSMHV_cbgo; double HSMHV_cbbo; /* double HSMHV_cqyd; not used */ /* double HSMHV_cqyg; not used */ /* double HSMHV_cqyb; not used */ double HSMHV_von; /* vth */ double HSMHV_vdsat; /* double HSMHV_capgs; not used */ /* double HSMHV_capgd; not used */ /* double HSMHV_capgb; not used */ /* double HSMHV_rth0; not used */ /* double HSMHV_cth0; not used */ /* double HSMHV_cth; not used */ #define XDIM 14 double HSMHV_ydc_d[XDIM], HSMHV_ydc_dP[XDIM], HSMHV_ydc_g[XDIM], HSMHV_ydc_gP[XDIM], HSMHV_ydc_s[XDIM], HSMHV_ydc_sP[XDIM], HSMHV_ydc_bP[XDIM], HSMHV_ydc_b[XDIM], HSMHV_ydc_db[XDIM], HSMHV_ydc_sb[XDIM], HSMHV_ydc_t[XDIM], HSMHV_ydc_qi[XDIM], HSMHV_ydc_qb[XDIM]; double HSMHV_ydyn_d[XDIM], HSMHV_ydyn_dP[XDIM], HSMHV_ydyn_g[XDIM], HSMHV_ydyn_gP[XDIM], HSMHV_ydyn_s[XDIM], HSMHV_ydyn_sP[XDIM], HSMHV_ydyn_bP[XDIM], HSMHV_ydyn_b[XDIM], HSMHV_ydyn_db[XDIM], HSMHV_ydyn_sb[XDIM], HSMHV_ydyn_t[XDIM], HSMHV_ydyn_qi[XDIM], HSMHV_ydyn_qb[XDIM]; /* resistances */ double HSMHV_Rd ; /* different from HSMHV_rd */ double HSMHV_dRd_dVdse ; double HSMHV_dRd_dVgse ; double HSMHV_dRd_dVbse ; double HSMHV_dRd_dVsubs ; double HSMHV_dRd_dTi ; double HSMHV_Rs ; /* different from HSMHV_rs */ double HSMHV_dRs_dVdse ; double HSMHV_dRs_dVgse ; double HSMHV_dRs_dVbse ; double HSMHV_dRs_dVsubs ; double HSMHV_dRs_dTi ; /* drain current */ double HSMHV_ids; double HSMHV_gds; /* used for printout, but not loaded */ double HSMHV_gm; /* used for printout, but not loaded */ double HSMHV_gmbs; /* used for printout, but not loaded */ double HSMHV_dIds_dVdse ; double HSMHV_dIds_dVgse ; double HSMHV_dIds_dVbse ; double HSMHV_dIds_dVdsi ; double HSMHV_dIds_dVgsi ; double HSMHV_dIds_dVbsi ; double HSMHV_dIds_dTi ; /* substrate current */ double HSMHV_isub; /* double HSMHV_gbgs; not used */ /* double HSMHV_gbds; not used */ /* double HSMHV_gbbs; not used */ double HSMHV_dIsub_dVdsi ; double HSMHV_dIsub_dVgsi ; double HSMHV_dIsub_dVbsi ; double HSMHV_dIsub_dTi ; double HSMHV_dIsub_dVdse ; /* gidl and gisl current */ double HSMHV_igidl; /* gate induced drain leakage */ /* double HSMHV_gigidlgs; not used */ /* double HSMHV_gigidlds; not used */ /* double HSMHV_gigidlbs; not used */ double HSMHV_dIgidl_dVdsi ; double HSMHV_dIgidl_dVgsi ; double HSMHV_dIgidl_dVbsi ; double HSMHV_dIgidl_dTi ; double HSMHV_igisl; /* gate induced source leakage */ /* double HSMHV_gigislgd; not used */ /* double HSMHV_gigislsd; not used */ /* double HSMHV_gigislbd; not used */ double HSMHV_dIgisl_dVdsi ; double HSMHV_dIgisl_dVgsi ; double HSMHV_dIgisl_dVbsi ; double HSMHV_dIgisl_dTi ; /* gate leakage currents */ double HSMHV_igb; /* gate tunneling current (gate to bulk) */ /* double HSMHV_gigbg; not used */ /* double HSMHV_gigbd; not used */ /* double HSMHV_gigbb; not used */ /* double HSMHV_gigbs; not used */ double HSMHV_dIgb_dVdsi ; double HSMHV_dIgb_dVgsi ; double HSMHV_dIgb_dVbsi ; double HSMHV_dIgb_dTi ; double HSMHV_igd; /* gate tunneling current (gate to drain) */ /* double HSMHV_gigdg; not used */ /* double HSMHV_gigdd; not used */ /* double HSMHV_gigdb; not used */ /* double HSMHV_gigds; not used */ double HSMHV_dIgd_dVdsi ; double HSMHV_dIgd_dVgsi ; double HSMHV_dIgd_dVbsi ; double HSMHV_dIgd_dTi ; double HSMHV_igs; /* gate tunneling current (gate to source) */ /* double HSMHV_gigsg; not used */ /* double HSMHV_gigsd; not used */ /* double HSMHV_gigsb; not used */ /* double HSMHV_gigss; not used */ double HSMHV_dIgs_dVdsi ; double HSMHV_dIgs_dVgsi ; double HSMHV_dIgs_dVbsi ; double HSMHV_dIgs_dTi ; /* charges */ double HSMHV_qd; double HSMHV_cdgb; /* used for printout, but not loaded */ /* double HSMHV_cddb; not used */ /* double HSMHV_cdsb; not used */ /* double HSMHVcdT; not used */ double HSMHV_dQdi_dVdsi ; double HSMHV_dQdi_dVgsi ; double HSMHV_dQdi_dVbsi ; double HSMHV_dQdi_dTi ; double HSMHV_qg; double HSMHV_cggb; /* used for printout, but not loaded */ double HSMHV_cgdb; /* used for printout, but not loaded */ double HSMHV_cgsb; /* used for printout, but not loaded */ /* double HSMHVcgT; not used */ double HSMHV_dQg_dVdsi ; double HSMHV_dQg_dVgsi ; double HSMHV_dQg_dVbsi ; double HSMHV_dQg_dTi ; double HSMHV_qs; double HSMHV_dQsi_dVdsi ; double HSMHV_dQsi_dVgsi ; double HSMHV_dQsi_dVbsi ; double HSMHV_dQsi_dTi ; double HSMHV_qb; /* bulk charge qb = -(qg + qd + qs) */ double HSMHV_cbgb; /* used for printout, but not loaded */ /* double HSMHV_cbdb; not used */ /* double HSMHV_cbsb; not used */ /* double HSMHVcbT; not used */ double HSMHV_dQb_dVdsi ; /* Qb: bulk charge inclusive overlaps, Qbulk: bulk charge without overlaps (see above) */ double HSMHV_dQb_dVgsi ; double HSMHV_dQb_dVbsi ; double HSMHV_dQb_dTi ; /* outer charges (fringing etc.) */ double HSMHV_qdp ; double HSMHV_dqdp_dVdse ; double HSMHV_dqdp_dVgse ; double HSMHV_dqdp_dVbse ; double HSMHV_dqdp_dTi ; double HSMHV_qsp ; double HSMHV_dqsp_dVdse ; double HSMHV_dqsp_dVgse ; double HSMHV_dqsp_dVbse ; double HSMHV_dqsp_dTi ; double HSMHV_qgext ; double HSMHV_dQgext_dVdse ; double HSMHV_dQgext_dVgse ; double HSMHV_dQgext_dVbse ; double HSMHV_dQgext_dTi ; double HSMHV_qdext ; double HSMHV_dQdext_dVdse ; double HSMHV_dQdext_dVgse ; double HSMHV_dQdext_dVbse ; double HSMHV_dQdext_dTi ; double HSMHV_qbext ; double HSMHV_dQbext_dVdse ; double HSMHV_dQbext_dVgse ; double HSMHV_dQbext_dVbse ; double HSMHV_dQbext_dTi ; double HSMHV_qsext ; double HSMHV_dQsext_dVdse ; double HSMHV_dQsext_dVgse ; double HSMHV_dQsext_dVbse ; double HSMHV_dQsext_dTi ; /* junctions */ double HSMHV_ibd; double HSMHV_gbd; double HSMHV_gbdT; double HSMHV_ibs; double HSMHV_gbs; double HSMHV_gbsT; double HSMHV_qbd; double HSMHV_capbd; double HSMHV_gcbdT; double HSMHV_qbs; double HSMHV_capbs; double HSMHV_gcbsT; /* double HSMHV_gtempg; not used */ /* double HSMHV_gtempt; not used */ /* double HSMHV_gtempd; not used */ /* double HSMHV_gtempb; not used */ /* double HSMHV_gmt; not used */ /* double HSMHV_isubt; not used */ /* NQS */ double HSMHV_tau ; double HSMHV_tau_dVgsi ; double HSMHV_tau_dVdsi ; double HSMHV_tau_dVbsi ; double HSMHV_tau_dTi ; double HSMHV_Xd ; double HSMHV_Xd_dVgsi ; double HSMHV_Xd_dVdsi ; double HSMHV_Xd_dVbsi ; double HSMHV_Xd_dTi ; double HSMHV_Qi ; double HSMHV_Qi_dVgsi ; double HSMHV_Qi_dVdsi ; double HSMHV_Qi_dVbsi ; double HSMHV_Qi_dTi ; double HSMHV_taub ; double HSMHV_taub_dVgsi ; double HSMHV_taub_dVdsi ; double HSMHV_taub_dVbsi ; double HSMHV_taub_dTi ; double HSMHV_Qbulk ; /* Qbulk: without overlaps, Qb: inclusive overlaps (see below) */ double HSMHV_Qbulk_dVgsi ; double HSMHV_Qbulk_dVdsi ; double HSMHV_Qbulk_dVbsi ; double HSMHV_Qbulk_dTi ; /* internal variables */ double HSMHV_eg ; double HSMHV_beta ; double HSMHV_beta_inv ; double HSMHV_beta2 ; double HSMHV_betatnom ; double HSMHV_nin ; double HSMHV_egp12 ; double HSMHV_egp32 ; double HSMHV_lgate ; double HSMHV_wg ; double HSMHV_mueph ; double HSMHV_mphn0 ; double HSMHV_mphn1 ; double HSMHV_muesr ; double HSMHV_rdvd ; double HSMHV_rsvd ; /* for the reverse mode */ double HSMHV_rd23 ; double HSMHV_ninvd ; double HSMHV_ninvd0 ; double HSMHV_nsub ; double HSMHV_qnsub ; double HSMHV_qnsub_esi ; double HSMHV_2qnsub_esi ; double HSMHV_ptovr0 ; double HSMHV_ptovr ; double HSMHV_vmax0 ; double HSMHV_vmax ; double HSMHV_pb2 ; double HSMHV_pb20 ; double HSMHV_pb2c ; double HSMHV_cnst0 ; double HSMHV_cnst1 ; double HSMHV_isbd ; double HSMHV_isbd2 ; double HSMHV_isbs ; double HSMHV_isbs2 ; double HSMHV_vbdt ; double HSMHV_vbst ; double HSMHV_exptemp ; double HSMHV_wsti ; double HSMHV_cnstpgd ; /* double HSMHV_ninvp0 ; not used */ /* double HSMHV_ninv0 ; not used */ double HSMHV_grbpb ; double HSMHV_grbpd ; double HSMHV_grbps ; double HSMHV_grg ; double HSMHV_rs ; double HSMHV_rs0 ; double HSMHV_rd ; double HSMHV_rd0 ; double HSMHV_rdtemp0 ; double HSMHV_clmmod ; double HSMHV_lgatesm ; double HSMHV_dVthsm ; double HSMHV_ddlt ; double HSMHV_xsub1 ; double HSMHV_xsub2 ; double HSMHV_xgate ; double HSMHV_xvbs ; double HSMHV_vg2const ; double HSMHV_wdpl ; double HSMHV_wdplp ; double HSMHV_cfrng ; double HSMHV_jd_nvtm_inv ; double HSMHV_jd_expcd ; double HSMHV_jd_expcs ; double HSMHV_sqrt_eg ; double HSMHV_egtnom ; double HSMHV_cecox ; double HSMHV_msc ; int HSMHV_flg_pgd ; double HSMHV_ndep_o_esi ; double HSMHV_ninv_o_esi ; double HSMHV_cqyb0 ; double HSMHV_cnst0over ; double HSMHV_cnst0overs ; double HSMHV_costi00 ; double HSMHV_nsti_p2 ; double HSMHV_costi0 ; double HSMHV_costi0_p2 ; double HSMHV_costi1 ; double HSMHV_ps0ldinib ; double HSMHV_ps0ldinibs ; double HSMHV_rdvdtemp0 ; double HSMHV_rthtemp0 ; double HSMHV_powratio ; double HSMHV_mueph1 ; double HSMHV_nsubp; double HSMHV_nsubc; HSMHVhereMKSParam hereMKS ; /* unit-converted parameters */ HSMHVbinningParam pParam ; /* binning parameters */ /* no use in SPICE3f5 double HSMHVdrainSquares; the length of the drain in squares double HSMHVsourceSquares; the length of the source in squares */ double HSMHVsourceConductance; /* cond. of source (or 0): set in setup */ double HSMHVdrainConductance; /* cond. of drain (or 0): set in setup */ double HSMHV_icVBS; /* initial condition B-S voltage */ double HSMHV_icVDS; /* initial condition D-S voltage */ double HSMHV_icVGS; /* initial condition G-S voltage */ int HSMHV_off; /* non-zero to indicate device is off for dc analysis */ int HSMHV_mode; /* device mode : 1 = normal, -1 = inverse */ unsigned HSMHV_coselfheat_Given :1; unsigned HSMHV_cosubnode_Given :1; unsigned HSMHV_l_Given :1; unsigned HSMHV_w_Given :1; unsigned HSMHV_ad_Given :1; unsigned HSMHV_as_Given :1; unsigned HSMHV_pd_Given :1; unsigned HSMHV_ps_Given :1; unsigned HSMHV_nrd_Given :1; unsigned HSMHV_nrs_Given :1; unsigned HSMHV_dtemp_Given :1; unsigned HSMHV_icVBS_Given :1; unsigned HSMHV_icVDS_Given :1; unsigned HSMHV_icVGS_Given :1; unsigned HSMHV_corbnet_Given :1; unsigned HSMHV_rbpb_Given :1; unsigned HSMHV_rbpd_Given :1; unsigned HSMHV_rbps_Given :1; unsigned HSMHV_rbdb_Given :1; unsigned HSMHV_rbsb_Given :1; unsigned HSMHV_corg_Given :1; unsigned HSMHV_ngcon_Given :1; unsigned HSMHV_xgw_Given :1; unsigned HSMHV_xgl_Given :1; unsigned HSMHV_nf_Given :1; unsigned HSMHV_sa_Given :1; unsigned HSMHV_sb_Given :1; unsigned HSMHV_sd_Given :1; unsigned HSMHV_nsubcdfm_Given :1; unsigned HSMHV_m_Given :1; unsigned HSMHV_subld1_Given :1; unsigned HSMHV_subld2_Given :1; unsigned HSMHV_lover_Given :1; unsigned HSMHV_lovers_Given :1; unsigned HSMHV_loverld_Given :1; unsigned HSMHV_ldrift1_Given :1; unsigned HSMHV_ldrift2_Given :1; unsigned HSMHV_ldrift1s_Given :1; unsigned HSMHV_ldrift2s_Given :1; /* unsigned HSMHV_rth0_Given :1; not used */ /* unsigned HSMHV_cth0_Given :1; not used */ /* pointers to sparse matrix */ double *HSMHVGgPtr; /* pointer to sparse matrix element at (gate node,gate node) */ double *HSMHVGgpPtr; /* pointer to sparse matrix element at (gate node,gate prime node) */ /* double *HSMHVGdpPtr; not used */ /* double *HSMHVGspPtr; not used */ /* double *HSMHVGbpPtr; not used */ double *HSMHVGPgPtr; /* pointer to sparse matrix element at (gate prime node,gate node) */ double *HSMHVGPgpPtr; /* pointer to sparse matrix element at (gate prime node,gate prime node) */ double *HSMHVGPdpPtr; /* pointer to sparse matrix element at (gate prime node,drain prime node) */ double *HSMHVGPspPtr; /* pointer to sparse matrix element at (gate prime node,source prime node) */ double *HSMHVGPbpPtr; /* pointer to sparse matrix element at (gate prime node,bulk prime node) */ double *HSMHVDPdPtr; /* pointer to sparse matrix element at (drain prime node,drain node) */ double *HSMHVDPdpPtr; /* pointer to sparse matrix element at (drain prime node,drain prime node) */ double *HSMHVDPgpPtr; /* pointer to sparse matrix element at (drain prime node,gate prime node) */ double *HSMHVDPspPtr; /* pointer to sparse matrix element at (drain prime node,source prime node) */ double *HSMHVDPbpPtr; /* pointer to sparse matrix element at (drain prime node,bulk prime node) */ double *HSMHVDdPtr; /* pointer to sparse matrix element at (Drain node,drain node) */ double *HSMHVDdpPtr; /* pointer to sparse matrix element at (drain node,drain prime node) */ double *HSMHVDspPtr; /* pointer to sparse matrix element at (drain node,source prime node) */ double *HSMHVDdbPtr; /* pointer to sparse matrix element at (drain node,drain body node) */ double *HSMHVSPsPtr; /* pointer to sparse matrix element at (source prime node,source node) */ double *HSMHVSPspPtr; /* pointer to sparse matrix element at (source prime node,source prime node) */ double *HSMHVSPgpPtr; /* pointer to sparse matrix element at (source prime node,gate prime node) */ double *HSMHVSPdpPtr; /* pointer to sparse matrix element at (source prime node,drain prime node) */ double *HSMHVSPbpPtr; /* pointer to sparse matrix element at (source prime node,bulk prime node) */ double *HSMHVSsPtr; /* pointer to sparse matrix element at (source node,source node) */ double *HSMHVSspPtr; /* pointer to sparse matrix element at (source node,source prime node) */ double *HSMHVSdpPtr; /* pointer to sparse matrix element at (source node,drain prime node) */ double *HSMHVSsbPtr; /* pointer to sparse matrix element at (source node,source body node) */ double *HSMHVBPgpPtr; /* pointer to sparse matrix element at (bulk prime node,gate prime node) */ double *HSMHVBPbpPtr; /* pointer to sparse matrix element at (bulk prime node,bulk prime node) */ double *HSMHVBPdPtr; /* pointer to sparse matrix element at (bulk prime node,drain node) */ double *HSMHVBPdpPtr; /* pointer to sparse matrix element at (bulk prime node,drain prime node) */ double *HSMHVBPspPtr; /* pointer to sparse matrix element at (bulk prime node,source prime node) */ double *HSMHVBPsPtr; /* pointer to sparse matrix element at (bulk prime node,source node) */ double *HSMHVBPbPtr; /* pointer to sparse matrix element at (bulk prime node,bulk node) */ double *HSMHVBPdbPtr; /* pointer to sparse matrix element at (bulk prime node,source body node) */ double *HSMHVBPsbPtr; /* pointer to sparse matrix element at (bulk prime node,source body node) */ double *HSMHVDBdPtr; /* pointer to sparse matrix element at (drain body node,drain node) */ double *HSMHVDBdbPtr; /* pointer to sparse matrix element at (drain body node,drain body node) */ double *HSMHVDBbpPtr; /* pointer to sparse matrix element at (drain body node,bulk prime node) */ /* double *HSMHVDBbPtr; not used */ double *HSMHVSBsPtr; /* pointer to sparse matrix element at (source body node,source node) */ double *HSMHVSBbpPtr; /* pointer to sparse matrix element at (source body node,bulk prime node) */ /* double *HSMHVSBbPtr; not used */ double *HSMHVSBsbPtr; /* pointer to sparse matrix element at (source body node,source body node) */ /* double *HSMHVBsbPtr; not used */ double *HSMHVBbpPtr; /* pointer to sparse matrix element at (bulk node,bulk prime node) */ /* double *HSMHVBdbPtr; not used */ double *HSMHVBbPtr; /* pointer to sparse matrix element at (bulk node,bulk node) */ double *HSMHVTemptempPtr; /* pointer to sparse matrix element at (temp node, temp node) */ double *HSMHVTempdPtr; /* pointer to sparse matrix element at (temp node, drain node) */ double *HSMHVTempdpPtr; /* pointer to sparse matrix element at (temp node, drain prime node) */ double *HSMHVTempsPtr; /* pointer to sparse matrix element at (temp node, source node) */ double *HSMHVTempspPtr; /* pointer to sparse matrix element at (temp node, source prime node) */ /* double *HSMHVTempgPtr; not used */ double *HSMHVTempgpPtr; /* pointer to sparse matrix element at (temp node, gate prime node) */ /* double *HSMHVTempbPtr; not used */ double *HSMHVTempbpPtr; /* pointer to sparse matrix element at (temp node, bulk prime node) */ /* double *HSMHVGtempPtr; not used */ double *HSMHVGPtempPtr; /* pointer to sparse matrix element at (gate prime node, temp node) */ double *HSMHVDPtempPtr; /* pointer to sparse matrix element at (drain prime node, temp node) */ double *HSMHVSPtempPtr; /* pointer to sparse matrix element at (source prime node, temp node) */ /* double *HSMHVBtempPtr; not used */ double *HSMHVBPtempPtr; /* pointer to sparse matrix element at (bulk prime node, temp node) */ double *HSMHVDBtempPtr; /* pointer to sparse matrix element at (drain bulk node, temp node) */ double *HSMHVSBtempPtr; /* pointer to sparse matrix element at (source bulk node, temp node) */ double *HSMHVDgpPtr; /* pointer to sparse matrix element at (drain node, gate prime node) */ double *HSMHVDsPtr; /* pointer to sparse matrix element at (drain node, source node) */ double *HSMHVDbpPtr; /* pointer to sparse matrix element at (drain node, bulk prime node) */ double *HSMHVDtempPtr; /* pointer to sparse matrix element at (drain node, temp node) */ double *HSMHVDPsPtr; /* pointer to sparse matrix element at (drain prime node, source node) */ double *HSMHVGPdPtr; /* pointer to sparse matrix element at (gate prime node, drain node) */ double *HSMHVGPsPtr; /* pointer to sparse matrix element at (gate prime node, source node) */ double *HSMHVSdPtr; /* pointer to sparse matrix element at (source node, drain node) */ double *HSMHVSgpPtr; /* pointer to sparse matrix element at (source node, gate prime node) */ double *HSMHVSbpPtr; /* pointer to sparse matrix element at (source node, bulk prime node) */ double *HSMHVStempPtr; /* pointer to sparse matrix element at (source node, temp node) */ double *HSMHVSPdPtr; /* pointer to sparse matrix element at (source prime node, drain node) */ /* nqs related pointers */ double *HSMHVDPqiPtr; /* pointer to sparse matrix element at (drain prime node, qi_nqs node) */ double *HSMHVGPqiPtr; /* pointer to sparse matrix element at (gate prime node, qi_nqs node) */ double *HSMHVGPqbPtr; /* pointer to sparse matrix element at (gate prime node, qb_nqs node) */ double *HSMHVSPqiPtr; /* pointer to sparse matrix element at (source prime node, qi_nqs node) */ double *HSMHVBPqbPtr; /* pointer to sparse matrix element at (bulk prime node, qb_nqs node) */ double *HSMHVQIdpPtr; /* pointer to sparse matrix element at (qi_nqs node, drain prime node) */ double *HSMHVQIgpPtr; /* pointer to sparse matrix element at (qi_nqs node, gate prime node) */ double *HSMHVQIspPtr; /* pointer to sparse matrix element at (qi_nqs node, source prime node) */ double *HSMHVQIbpPtr; /* pointer to sparse matrix element at (qi_nqs node, bulk prime node) */ double *HSMHVQIqiPtr; /* pointer to sparse matrix element at (qi_nqs node, qi_nqs node) */ double *HSMHVQBdpPtr; /* pointer to sparse matrix element at (qb_nqs node, drain prime node) */ double *HSMHVQBgpPtr; /* pointer to sparse matrix element at (qb_nqs node, gate prime node) */ double *HSMHVQBspPtr; /* pointer to sparse matrix element at (qb_nqs node, source prime node) */ double *HSMHVQBbpPtr; /* pointer to sparse matrix element at (qb_nqs node, bulk prime node) */ double *HSMHVQBqbPtr; /* pointer to sparse matrix element at (qb_nqs node, qb_nqs node) */ double *HSMHVQItempPtr; /* pointer to sparse matrix element at (qi_nqs node, temp node) */ double *HSMHVQBtempPtr; /* pointer to sparse matrix element at (qb_nqs node, temp node) */ /* Substrate effect related pointers */ double *HSMHVDsubPtr; /* pointer to sparse matrix element at (drain node, substrate node) */ double *HSMHVDPsubPtr; /* pointer to sparse matrix element at (drain prime node, substrate node) */ double *HSMHVSsubPtr; /* pointer to sparse matrix element at (source node, substrate node) */ double *HSMHVSPsubPtr; /* pointer to sparse matrix element at (source prime node, substrate node) */ /* common state values in hisim module */ #define HSMHVvbd HSMHVstates+ 0 #define HSMHVvbs HSMHVstates+ 1 #define HSMHVvgs HSMHVstates+ 2 #define HSMHVvds HSMHVstates+ 3 #define HSMHVvdbs HSMHVstates+ 4 #define HSMHVvdbd HSMHVstates+ 5 #define HSMHVvsbs HSMHVstates+ 6 #define HSMHVvges HSMHVstates+ 7 #define HSMHVvsubs HSMHVstates+ 8 /* substrate bias */ #define HSMHVdeltemp HSMHVstates+ 9 #define HSMHVvdse HSMHVstates+ 10 #define HSMHVvgse HSMHVstates+ 11 #define HSMHVvbse HSMHVstates+ 12 #define HSMHVqb HSMHVstates+ 13 #define HSMHVcqb HSMHVstates+ 14 #define HSMHVqg HSMHVstates+ 15 #define HSMHVcqg HSMHVstates+ 16 #define HSMHVqd HSMHVstates+ 17 #define HSMHVcqd HSMHVstates+ 18 #define HSMHVqbs HSMHVstates+ 19 #define HSMHVcqbs HSMHVstates+ 20 #define HSMHVqbd HSMHVstates+ 21 #define HSMHVcqbd HSMHVstates+ 22 #define HSMHVqth HSMHVstates+ 23 #define HSMHVcqth HSMHVstates+ 24 /*add fringing capacitance*/ #define HSMHVqfd HSMHVstates+ 25 #define HSMHVcqfd HSMHVstates+ 26 #define HSMHVqfs HSMHVstates+ 27 #define HSMHVcqfs HSMHVstates+ 28 /*add external drain capacitance*/ #define HSMHVqdE HSMHVstates+ 29 #define HSMHVcqdE HSMHVstates+ 30 #define HSMHVnumStates 31 /* nqs charges */ #define HSMHVqi_nqs HSMHVstates+ 32 #define HSMHVdotqi_nqs HSMHVstates + 33 #define HSMHVqb_nqs HSMHVstates+ 34 #define HSMHVdotqb_nqs HSMHVstates + 35 #define HSMHVnumStatesNqs 36 /* indices to the array of HiSIMHV NOISE SOURCES */ #define HSMHVRDNOIZ 0 #define HSMHVRSNOIZ 1 #define HSMHVIDNOIZ 2 #define HSMHVFLNOIZ 3 #define HSMHVIGNOIZ 4 #define HSMHVTOTNOIZ 5 #define HSMHVNSRCS 6 /* the number of HiSIMHV MOSFET noise sources */ #ifndef NONOISE double HSMHVnVar[NSTATVARS][HSMHVNSRCS]; #else /* NONOISE */ double **HSMHVnVar; #endif /* NONOISE */ } HSMHVinstance ; /* per model data */ typedef struct sHSMHVmodel { /* model structure for a resistor */ int HSMHVmodType; /* type index of this device type */ struct sHSMHVmodel *HSMHVnextModel; /* pointer to next possible model in linked list */ HSMHVinstance * HSMHVinstances; /* pointer to list of instances that have this model */ IFuid HSMHVmodName; /* pointer to the name of this model */ int HSMHV_type; /* device type: 1 = nmos, -1 = pmos */ int HSMHV_level; /* level */ int HSMHV_info; /* information */ int HSMHV_noise; /* noise model selecter see hsmhvnoi.c */ char *HSMHV_version; /* model version */ int HSMHV_show; /* show physical value 1, 2, ... , 11 */ int HSMHV_corsrd ; int HSMHV_corg ; int HSMHV_coiprv ; int HSMHV_copprv ; int HSMHV_coadov ; int HSMHV_coisub ; int HSMHV_coiigs ; int HSMHV_cogidl ; int HSMHV_coovlp ; int HSMHV_coovlps ; int HSMHV_coflick ; int HSMHV_coisti ; int HSMHV_conqs ; int HSMHV_corbnet ; int HSMHV_cothrml; int HSMHV_coign; /* Induced gate noise */ int HSMHV_codfm; /* DFM */ int HSMHV_coqovsm ; int HSMHV_coselfheat; /* Self-heating model */ int HSMHV_cosubnode; /* switch tempNode to subNode */ int HSMHV_cosym; /* Symmetry model for HV */ int HSMHV_cotemp; int HSMHV_coldrift; double HSMHV_vmax ; double HSMHV_vmaxt1 ; double HSMHV_vmaxt2 ; double HSMHV_bgtmp1 ; double HSMHV_bgtmp2 ; double HSMHV_eg0 ; double HSMHV_tox ; double HSMHV_xld ; double HSMHV_xldld ; double HSMHV_xwdld ; double HSMHV_lover ; double HSMHV_lovers ; double HSMHV_rdov11 ; double HSMHV_rdov12 ; double HSMHV_rdov13 ; double HSMHV_rdslp1 ; double HSMHV_rdict1 ; double HSMHV_rdslp2 ; double HSMHV_rdict2 ; double HSMHV_loverld ; double HSMHV_ldrift1 ; double HSMHV_ldrift2 ; double HSMHV_ldrift1s ; double HSMHV_ldrift2s ; double HSMHV_subld1 ; double HSMHV_subld2 ; double HSMHV_ddltmax ; double HSMHV_ddltslp ; double HSMHV_ddltict ; double HSMHV_vfbover ; double HSMHV_nover ; double HSMHV_novers ; double HSMHV_xwd ; double HSMHV_xwdc ; double HSMHV_xl ; double HSMHV_xw ; double HSMHV_saref ; double HSMHV_sbref ; double HSMHV_ll ; double HSMHV_lld ; double HSMHV_lln ; double HSMHV_wl ; double HSMHV_wl1 ; double HSMHV_wl1p ; double HSMHV_wl2 ; double HSMHV_wl2p ; double HSMHV_wld ; double HSMHV_wln ; double HSMHV_xqy ; double HSMHV_xqy1 ; double HSMHV_xqy2 ; double HSMHV_rs; /* source contact resistance */ double HSMHV_rd; /* drain contact resistance */ double HSMHV_rsh; /* source/drain diffusion sheet resistance */ double HSMHV_rshg; /* double HSMHV_ngcon; */ /* double HSMHV_xgw; */ /* double HSMHV_xgl; */ /* double HSMHV_nf; */ double HSMHV_vfbc ; double HSMHV_vbi ; double HSMHV_nsubc ; double HSMHV_qdftvd ; double HSMHV_parl2 ; double HSMHV_lp ; double HSMHV_nsubp ; double HSMHV_nsubp0 ; double HSMHV_nsubwp ; double HSMHV_scp1 ; double HSMHV_scp2 ; double HSMHV_scp3 ; double HSMHV_sc1 ; double HSMHV_sc2 ; double HSMHV_sc3 ; double HSMHV_sc4 ; double HSMHV_pgd1 ; double HSMHV_pgd2 ; double HSMHV_pgd3 ; double HSMHV_pgd4 ; double HSMHV_ndep ; double HSMHV_ndepl ; double HSMHV_ndeplp ; double HSMHV_ninv ; double HSMHV_ninvd ; double HSMHV_ninvdw ; double HSMHV_ninvdwp ; double HSMHV_ninvdt1 ; double HSMHV_ninvdt2 ; double HSMHV_muecb0 ; double HSMHV_muecb1 ; double HSMHV_mueph1 ; double HSMHV_mueph0 ; double HSMHV_muephw ; double HSMHV_muepwp ; double HSMHV_muephl ; double HSMHV_mueplp ; double HSMHV_muephs ; double HSMHV_muepsp ; double HSMHV_vtmp ; double HSMHV_wvth0 ; double HSMHV_muesr1 ; double HSMHV_muesr0 ; double HSMHV_muesrw ; double HSMHV_mueswp ; double HSMHV_muesrl ; double HSMHV_mueslp ; double HSMHV_bb ; double HSMHV_sub1 ; double HSMHV_sub2 ; double HSMHV_svgs ; double HSMHV_svbs ; double HSMHV_svbsl ; double HSMHV_svds ; double HSMHV_slg ; double HSMHV_sub1l ; double HSMHV_sub2l ; double HSMHV_fn1 ; double HSMHV_fn2 ; double HSMHV_fn3 ; double HSMHV_fvbs ; double HSMHV_svgsl ; double HSMHV_svgslp ; double HSMHV_svgswp ; double HSMHV_svgsw ; double HSMHV_svbslp ; double HSMHV_slgl ; double HSMHV_slglp ; double HSMHV_sub1lp ; double HSMHV_nsti ; double HSMHV_wsti ; double HSMHV_wstil ; double HSMHV_wstilp ; double HSMHV_wstiw ; double HSMHV_wstiwp ; double HSMHV_scsti1 ; double HSMHV_scsti2 ; double HSMHV_vthsti ; double HSMHV_vdsti ; double HSMHV_muesti1 ; double HSMHV_muesti2 ; double HSMHV_muesti3 ; double HSMHV_nsubpsti1 ; double HSMHV_nsubpsti2 ; double HSMHV_nsubpsti3 ; double HSMHV_lpext ; double HSMHV_npext ; double HSMHV_scp22 ; double HSMHV_scp21 ; double HSMHV_bs1 ; double HSMHV_bs2 ; double HSMHV_cgso ; double HSMHV_cgdo ; double HSMHV_cgbo ; double HSMHV_tpoly ; double HSMHV_js0 ; double HSMHV_js0sw ; double HSMHV_nj ; double HSMHV_njsw ; double HSMHV_xti ; double HSMHV_cj ; double HSMHV_cjsw ; double HSMHV_cjswg ; double HSMHV_mj ; double HSMHV_mjsw ; double HSMHV_mjswg ; double HSMHV_xti2 ; double HSMHV_cisb ; double HSMHV_cvb ; double HSMHV_ctemp ; double HSMHV_cisbk ; double HSMHV_cvbk ; double HSMHV_divx ; double HSMHV_pb ; double HSMHV_pbsw ; double HSMHV_pbswg ; double HSMHV_clm1 ; double HSMHV_clm2 ; double HSMHV_clm3 ; double HSMHV_clm5 ; double HSMHV_clm6 ; double HSMHV_muetmp ; double HSMHV_vover ; double HSMHV_voverp ; double HSMHV_vovers ; double HSMHV_voversp ; double HSMHV_wfc ; double HSMHV_nsubcw ; double HSMHV_nsubcwp ; double HSMHV_qme1 ; double HSMHV_qme2 ; double HSMHV_qme3 ; double HSMHV_gidl1 ; double HSMHV_gidl2 ; double HSMHV_gidl3 ; double HSMHV_gidl4 ; double HSMHV_gidl5 ; double HSMHV_gleak1 ; double HSMHV_gleak2 ; double HSMHV_gleak3 ; double HSMHV_gleak4 ; double HSMHV_gleak5 ; double HSMHV_gleak6 ; double HSMHV_gleak7 ; double HSMHV_glpart1 ; double HSMHV_glksd1 ; double HSMHV_glksd2 ; double HSMHV_glksd3 ; double HSMHV_glkb1 ; double HSMHV_glkb2 ; double HSMHV_glkb3 ; double HSMHV_egig; double HSMHV_igtemp2; double HSMHV_igtemp3; double HSMHV_vzadd0 ; double HSMHV_pzadd0 ; double HSMHV_nftrp ; double HSMHV_nfalp ; double HSMHV_cit ; double HSMHV_falph ; double HSMHV_kappa ; double HSMHV_pthrou ; double HSMHV_vdiffj ; double HSMHV_dly1 ; double HSMHV_dly2 ; double HSMHV_dly3 ; double HSMHV_dlyov; double HSMHV_tnom ; double HSMHV_ovslp ; double HSMHV_ovmag ; /* substrate resistances */ double HSMHV_gbmin; double HSMHV_rbpb ; double HSMHV_rbpd ; double HSMHV_rbps ; double HSMHV_rbdb ; double HSMHV_rbsb ; /* IBPC */ double HSMHV_ibpc1 ; double HSMHV_ibpc2 ; /* DFM */ double HSMHV_mphdfm ; double HSMHV_vbsmin ; double HSMHV_rdvg11 ; double HSMHV_rdvg12 ; double HSMHV_rd20 ; double HSMHV_qovsm ; double HSMHV_ldrift ; double HSMHV_rd21 ; double HSMHV_rd22 ; double HSMHV_rd22d ; double HSMHV_rd23 ; double HSMHV_rd24 ; double HSMHV_rd25 ; double HSMHV_rd26 ; double HSMHV_rdvdl ; double HSMHV_rdvdlp ; double HSMHV_rdvds ; double HSMHV_rdvdsp ; double HSMHV_rd23l ; double HSMHV_rd23lp ; double HSMHV_rd23s ; double HSMHV_rd23sp ; double HSMHV_rds ; double HSMHV_rdsp ; double HSMHV_rdvd ; double HSMHV_rdvb ; double HSMHV_rdvsub ; /* substrate effect */ double HSMHV_rdvdsub ; /* substrate effect */ double HSMHV_ddrift ; /* substrate effect */ double HSMHV_vbisub ; /* substrate effect */ double HSMHV_nsubsub ; /* substrate effect */ double HSMHV_rth0 ; double HSMHV_cth0 ; double HSMHV_powrat ; double HSMHV_tcjbd ; double HSMHV_tcjbs ; double HSMHV_tcjbdsw ; double HSMHV_tcjbssw ; double HSMHV_tcjbdswg ; double HSMHV_tcjbsswg ; double HSMHV_rdtemp1 ; double HSMHV_rdtemp2 ; double HSMHV_rth0r ; /* heat radiation for SHE */ double HSMHV_rdvdtemp1 ; double HSMHV_rdvdtemp2 ; double HSMHV_rth0w ; double HSMHV_rth0wp ; double HSMHV_rth0nf ; double HSMHV_rthtemp1 ; double HSMHV_rthtemp2 ; double HSMHV_prattemp1 ; double HSMHV_prattemp2 ; double HSMHV_cvdsover ; double HSMHV_shemax; /* binning parameters */ double HSMHV_lmin ; double HSMHV_lmax ; double HSMHV_wmin ; double HSMHV_wmax ; double HSMHV_lbinn ; double HSMHV_wbinn ; /* Length dependence */ double HSMHV_lvmax ; double HSMHV_lbgtmp1 ; double HSMHV_lbgtmp2 ; double HSMHV_leg0 ; double HSMHV_lvfbover ; double HSMHV_lnover ; double HSMHV_lnovers ; double HSMHV_lwl2 ; double HSMHV_lvfbc ; double HSMHV_lnsubc ; double HSMHV_lnsubp ; double HSMHV_lscp1 ; double HSMHV_lscp2 ; double HSMHV_lscp3 ; double HSMHV_lsc1 ; double HSMHV_lsc2 ; double HSMHV_lsc3 ; double HSMHV_lpgd1 ; double HSMHV_lpgd3 ; double HSMHV_lndep ; double HSMHV_lninv ; double HSMHV_lmuecb0 ; double HSMHV_lmuecb1 ; double HSMHV_lmueph1 ; double HSMHV_lvtmp ; double HSMHV_lwvth0 ; double HSMHV_lmuesr1 ; double HSMHV_lmuetmp ; double HSMHV_lsub1 ; double HSMHV_lsub2 ; double HSMHV_lsvds ; double HSMHV_lsvbs ; double HSMHV_lsvgs ; double HSMHV_lfn1 ; double HSMHV_lfn2 ; double HSMHV_lfn3 ; double HSMHV_lfvbs ; double HSMHV_lnsti ; double HSMHV_lwsti ; double HSMHV_lscsti1 ; double HSMHV_lscsti2 ; double HSMHV_lvthsti ; double HSMHV_lmuesti1 ; double HSMHV_lmuesti2 ; double HSMHV_lmuesti3 ; double HSMHV_lnsubpsti1 ; double HSMHV_lnsubpsti2 ; double HSMHV_lnsubpsti3 ; double HSMHV_lcgso ; double HSMHV_lcgdo ; double HSMHV_ljs0 ; double HSMHV_ljs0sw ; double HSMHV_lnj ; double HSMHV_lcisbk ; double HSMHV_lclm1 ; double HSMHV_lclm2 ; double HSMHV_lclm3 ; double HSMHV_lwfc ; double HSMHV_lgidl1 ; double HSMHV_lgidl2 ; double HSMHV_lgleak1 ; double HSMHV_lgleak2 ; double HSMHV_lgleak3 ; double HSMHV_lgleak6 ; double HSMHV_lglksd1 ; double HSMHV_lglksd2 ; double HSMHV_lglkb1 ; double HSMHV_lglkb2 ; double HSMHV_lnftrp ; double HSMHV_lnfalp ; double HSMHV_lpthrou ; double HSMHV_lvdiffj ; double HSMHV_libpc1 ; double HSMHV_libpc2 ; double HSMHV_lcgbo ; double HSMHV_lcvdsover ; double HSMHV_lfalph ; double HSMHV_lnpext ; double HSMHV_lpowrat ; double HSMHV_lrd ; double HSMHV_lrd22 ; double HSMHV_lrd23 ; double HSMHV_lrd24 ; double HSMHV_lrdict1 ; double HSMHV_lrdov13 ; double HSMHV_lrdslp1 ; double HSMHV_lrdvb ; double HSMHV_lrdvd ; double HSMHV_lrdvg11 ; double HSMHV_lrs ; double HSMHV_lrth0 ; double HSMHV_lvover ; /* Width dependence */ double HSMHV_wvmax ; double HSMHV_wbgtmp1 ; double HSMHV_wbgtmp2 ; double HSMHV_weg0 ; double HSMHV_wvfbover ; double HSMHV_wnover ; double HSMHV_wnovers ; double HSMHV_wwl2 ; double HSMHV_wvfbc ; double HSMHV_wnsubc ; double HSMHV_wnsubp ; double HSMHV_wscp1 ; double HSMHV_wscp2 ; double HSMHV_wscp3 ; double HSMHV_wsc1 ; double HSMHV_wsc2 ; double HSMHV_wsc3 ; double HSMHV_wpgd1 ; double HSMHV_wpgd3 ; double HSMHV_wndep ; double HSMHV_wninv ; double HSMHV_wmuecb0 ; double HSMHV_wmuecb1 ; double HSMHV_wmueph1 ; double HSMHV_wvtmp ; double HSMHV_wwvth0 ; double HSMHV_wmuesr1 ; double HSMHV_wmuetmp ; double HSMHV_wsub1 ; double HSMHV_wsub2 ; double HSMHV_wsvds ; double HSMHV_wsvbs ; double HSMHV_wsvgs ; double HSMHV_wfn1 ; double HSMHV_wfn2 ; double HSMHV_wfn3 ; double HSMHV_wfvbs ; double HSMHV_wnsti ; double HSMHV_wwsti ; double HSMHV_wscsti1 ; double HSMHV_wscsti2 ; double HSMHV_wvthsti ; double HSMHV_wmuesti1 ; double HSMHV_wmuesti2 ; double HSMHV_wmuesti3 ; double HSMHV_wnsubpsti1 ; double HSMHV_wnsubpsti2 ; double HSMHV_wnsubpsti3 ; double HSMHV_wcgso ; double HSMHV_wcgdo ; double HSMHV_wjs0 ; double HSMHV_wjs0sw ; double HSMHV_wnj ; double HSMHV_wcisbk ; double HSMHV_wclm1 ; double HSMHV_wclm2 ; double HSMHV_wclm3 ; double HSMHV_wwfc ; double HSMHV_wgidl1 ; double HSMHV_wgidl2 ; double HSMHV_wgleak1 ; double HSMHV_wgleak2 ; double HSMHV_wgleak3 ; double HSMHV_wgleak6 ; double HSMHV_wglksd1 ; double HSMHV_wglksd2 ; double HSMHV_wglkb1 ; double HSMHV_wglkb2 ; double HSMHV_wnftrp ; double HSMHV_wnfalp ; double HSMHV_wpthrou ; double HSMHV_wvdiffj ; double HSMHV_wibpc1 ; double HSMHV_wibpc2 ; double HSMHV_wcgbo ; double HSMHV_wcvdsover ; double HSMHV_wfalph ; double HSMHV_wnpext ; double HSMHV_wpowrat ; double HSMHV_wrd ; double HSMHV_wrd22 ; double HSMHV_wrd23 ; double HSMHV_wrd24 ; double HSMHV_wrdict1 ; double HSMHV_wrdov13 ; double HSMHV_wrdslp1 ; double HSMHV_wrdvb ; double HSMHV_wrdvd ; double HSMHV_wrdvg11 ; double HSMHV_wrs ; double HSMHV_wrth0 ; double HSMHV_wvover ; /* Cross-term dependence */ double HSMHV_pvmax ; double HSMHV_pbgtmp1 ; double HSMHV_pbgtmp2 ; double HSMHV_peg0 ; double HSMHV_pvfbover ; double HSMHV_pnover ; double HSMHV_pnovers ; double HSMHV_pwl2 ; double HSMHV_pvfbc ; double HSMHV_pnsubc ; double HSMHV_pnsubp ; double HSMHV_pscp1 ; double HSMHV_pscp2 ; double HSMHV_pscp3 ; double HSMHV_psc1 ; double HSMHV_psc2 ; double HSMHV_psc3 ; double HSMHV_ppgd1 ; double HSMHV_ppgd3 ; double HSMHV_pndep ; double HSMHV_pninv ; double HSMHV_pmuecb0 ; double HSMHV_pmuecb1 ; double HSMHV_pmueph1 ; double HSMHV_pvtmp ; double HSMHV_pwvth0 ; double HSMHV_pmuesr1 ; double HSMHV_pmuetmp ; double HSMHV_psub1 ; double HSMHV_psub2 ; double HSMHV_psvds ; double HSMHV_psvbs ; double HSMHV_psvgs ; double HSMHV_pfn1 ; double HSMHV_pfn2 ; double HSMHV_pfn3 ; double HSMHV_pfvbs ; double HSMHV_pnsti ; double HSMHV_pwsti ; double HSMHV_pscsti1 ; double HSMHV_pscsti2 ; double HSMHV_pvthsti ; double HSMHV_pmuesti1 ; double HSMHV_pmuesti2 ; double HSMHV_pmuesti3 ; double HSMHV_pnsubpsti1 ; double HSMHV_pnsubpsti2 ; double HSMHV_pnsubpsti3 ; double HSMHV_pcgso ; double HSMHV_pcgdo ; double HSMHV_pjs0 ; double HSMHV_pjs0sw ; double HSMHV_pnj ; double HSMHV_pcisbk ; double HSMHV_pclm1 ; double HSMHV_pclm2 ; double HSMHV_pclm3 ; double HSMHV_pwfc ; double HSMHV_pgidl1 ; double HSMHV_pgidl2 ; double HSMHV_pgleak1 ; double HSMHV_pgleak2 ; double HSMHV_pgleak3 ; double HSMHV_pgleak6 ; double HSMHV_pglksd1 ; double HSMHV_pglksd2 ; double HSMHV_pglkb1 ; double HSMHV_pglkb2 ; double HSMHV_pnftrp ; double HSMHV_pnfalp ; double HSMHV_ppthrou ; double HSMHV_pvdiffj ; double HSMHV_pibpc1 ; double HSMHV_pibpc2 ; double HSMHV_pcgbo ; double HSMHV_pcvdsover ; double HSMHV_pfalph ; double HSMHV_pnpext ; double HSMHV_ppowrat ; double HSMHV_prd ; double HSMHV_prd22 ; double HSMHV_prd23 ; double HSMHV_prd24 ; double HSMHV_prdict1 ; double HSMHV_prdov13 ; double HSMHV_prdslp1 ; double HSMHV_prdvb ; double HSMHV_prdvd ; double HSMHV_prdvg11 ; double HSMHV_prs ; double HSMHV_prth0 ; double HSMHV_pvover ; /* internal variables */ double HSMHV_vcrit ; int HSMHV_flg_qme ; double HSMHV_qme12 ; double HSMHV_ktnom ; double HSMHVvgsMax; double HSMHVvgdMax; double HSMHVvgbMax; double HSMHVvdsMax; double HSMHVvbsMax; double HSMHVvbdMax; HSMHVmodelMKSParam modelMKS ; /* unit-converted parameters */ /* flag for model */ unsigned HSMHV_type_Given :1; unsigned HSMHV_level_Given :1; unsigned HSMHV_info_Given :1; unsigned HSMHV_noise_Given :1; unsigned HSMHV_version_Given :1; unsigned HSMHV_show_Given :1; unsigned HSMHV_corsrd_Given :1; unsigned HSMHV_corg_Given :1; unsigned HSMHV_coiprv_Given :1; unsigned HSMHV_copprv_Given :1; unsigned HSMHV_coadov_Given :1; unsigned HSMHV_coisub_Given :1; unsigned HSMHV_coiigs_Given :1; unsigned HSMHV_cogidl_Given :1; unsigned HSMHV_coovlp_Given :1; unsigned HSMHV_coovlps_Given :1; unsigned HSMHV_coflick_Given :1; unsigned HSMHV_coisti_Given :1; unsigned HSMHV_conqs_Given :1; unsigned HSMHV_corbnet_Given :1; unsigned HSMHV_cothrml_Given :1; unsigned HSMHV_coign_Given :1; /* Induced gate noise */ unsigned HSMHV_codfm_Given :1; /* DFM */ unsigned HSMHV_coqovsm_Given :1; unsigned HSMHV_coselfheat_Given :1; /* Self-heating model */ unsigned HSMHV_cosubnode_Given :1; /* switch tempNode to subNode */ unsigned HSMHV_cosym_Given :1; /* Symmetry model for HV */ unsigned HSMHV_cotemp_Given :1; unsigned HSMHV_coldrift_Given :1; unsigned HSMHV_kappa_Given :1; unsigned HSMHV_pthrou_Given :1; unsigned HSMHV_vdiffj_Given :1; unsigned HSMHV_vmax_Given :1; unsigned HSMHV_vmaxt1_Given :1; unsigned HSMHV_vmaxt2_Given :1; unsigned HSMHV_bgtmp1_Given :1; unsigned HSMHV_bgtmp2_Given :1; unsigned HSMHV_eg0_Given :1; unsigned HSMHV_tox_Given :1; unsigned HSMHV_xld_Given :1; unsigned HSMHV_xldld_Given :1; unsigned HSMHV_xwdld_Given :1; unsigned HSMHV_lover_Given :1; unsigned HSMHV_lovers_Given :1; unsigned HSMHV_rdov11_Given :1; unsigned HSMHV_rdov12_Given :1; unsigned HSMHV_rdov13_Given :1; unsigned HSMHV_rdslp1_Given :1; unsigned HSMHV_rdict1_Given :1; unsigned HSMHV_rdslp2_Given :1; unsigned HSMHV_rdict2_Given :1; unsigned HSMHV_loverld_Given :1; unsigned HSMHV_ldrift1_Given :1; unsigned HSMHV_ldrift2_Given :1; unsigned HSMHV_ldrift1s_Given :1; unsigned HSMHV_ldrift2s_Given :1; unsigned HSMHV_subld1_Given :1; unsigned HSMHV_subld2_Given :1; unsigned HSMHV_ddltmax_Given :1; unsigned HSMHV_ddltslp_Given :1; unsigned HSMHV_ddltict_Given :1; unsigned HSMHV_vfbover_Given :1; unsigned HSMHV_nover_Given :1; unsigned HSMHV_novers_Given :1; unsigned HSMHV_xwd_Given :1; unsigned HSMHV_xwdc_Given :1; unsigned HSMHV_xl_Given :1; unsigned HSMHV_xw_Given :1; unsigned HSMHV_saref_Given :1; unsigned HSMHV_sbref_Given :1; unsigned HSMHV_ll_Given :1; unsigned HSMHV_lld_Given :1; unsigned HSMHV_lln_Given :1; unsigned HSMHV_wl_Given :1; unsigned HSMHV_wl1_Given :1; unsigned HSMHV_wl1p_Given :1; unsigned HSMHV_wl2_Given :1; unsigned HSMHV_wl2p_Given :1; unsigned HSMHV_wld_Given :1; unsigned HSMHV_wln_Given :1; unsigned HSMHV_xqy_Given :1; unsigned HSMHV_xqy1_Given :1; unsigned HSMHV_xqy2_Given :1; unsigned HSMHV_rs_Given :1; unsigned HSMHV_rd_Given :1; unsigned HSMHV_rsh_Given :1; unsigned HSMHV_rshg_Given :1; /* unsigned HSMHV_ngcon_Given :1; */ /* unsigned HSMHV_xgw_Given :1; */ /* unsigned HSMHV_xgl_Given :1; */ /* unsigned HSMHV_nf_Given :1; */ unsigned HSMHV_vfbc_Given :1; unsigned HSMHV_vbi_Given :1; unsigned HSMHV_nsubc_Given :1; unsigned HSMHV_parl2_Given :1; unsigned HSMHV_lp_Given :1; unsigned HSMHV_nsubp_Given :1; unsigned HSMHV_nsubp0_Given :1; unsigned HSMHV_nsubwp_Given :1; unsigned HSMHV_scp1_Given :1; unsigned HSMHV_scp2_Given :1; unsigned HSMHV_scp3_Given :1; unsigned HSMHV_sc1_Given :1; unsigned HSMHV_sc2_Given :1; unsigned HSMHV_sc3_Given :1; unsigned HSMHV_sc4_Given :1; unsigned HSMHV_pgd1_Given :1; unsigned HSMHV_pgd2_Given :1; unsigned HSMHV_pgd3_Given :1; unsigned HSMHV_pgd4_Given :1; unsigned HSMHV_ndep_Given :1; unsigned HSMHV_ndepl_Given :1; unsigned HSMHV_ndeplp_Given :1; unsigned HSMHV_ninv_Given :1; unsigned HSMHV_muecb0_Given :1; unsigned HSMHV_muecb1_Given :1; unsigned HSMHV_mueph1_Given :1; unsigned HSMHV_mueph0_Given :1; unsigned HSMHV_muephw_Given :1; unsigned HSMHV_muepwp_Given :1; unsigned HSMHV_muephl_Given :1; unsigned HSMHV_mueplp_Given :1; unsigned HSMHV_muephs_Given :1; unsigned HSMHV_muepsp_Given :1; unsigned HSMHV_vtmp_Given :1; unsigned HSMHV_wvth0_Given :1; unsigned HSMHV_muesr1_Given :1; unsigned HSMHV_muesr0_Given :1; unsigned HSMHV_muesrl_Given :1; unsigned HSMHV_mueslp_Given :1; unsigned HSMHV_muesrw_Given :1; unsigned HSMHV_mueswp_Given :1; unsigned HSMHV_bb_Given :1; unsigned HSMHV_sub1_Given :1; unsigned HSMHV_sub2_Given :1; unsigned HSMHV_svgs_Given :1; unsigned HSMHV_svbs_Given :1; unsigned HSMHV_svbsl_Given :1; unsigned HSMHV_svds_Given :1; unsigned HSMHV_slg_Given :1; unsigned HSMHV_sub1l_Given :1; unsigned HSMHV_sub2l_Given :1; unsigned HSMHV_fn1_Given :1; unsigned HSMHV_fn2_Given :1; unsigned HSMHV_fn3_Given :1; unsigned HSMHV_fvbs_Given :1; unsigned HSMHV_svgsl_Given :1; unsigned HSMHV_svgslp_Given :1; unsigned HSMHV_svgswp_Given :1; unsigned HSMHV_svgsw_Given :1; unsigned HSMHV_svbslp_Given :1; unsigned HSMHV_slgl_Given :1; unsigned HSMHV_slglp_Given :1; unsigned HSMHV_sub1lp_Given :1; unsigned HSMHV_nsti_Given :1; unsigned HSMHV_wsti_Given :1; unsigned HSMHV_wstil_Given :1; unsigned HSMHV_wstilp_Given :1; unsigned HSMHV_wstiw_Given :1; unsigned HSMHV_wstiwp_Given :1; unsigned HSMHV_scsti1_Given :1; unsigned HSMHV_scsti2_Given :1; unsigned HSMHV_vthsti_Given :1; unsigned HSMHV_vdsti_Given :1; unsigned HSMHV_muesti1_Given :1; unsigned HSMHV_muesti2_Given :1; unsigned HSMHV_muesti3_Given :1; unsigned HSMHV_nsubpsti1_Given :1; unsigned HSMHV_nsubpsti2_Given :1; unsigned HSMHV_nsubpsti3_Given :1; unsigned HSMHV_lpext_Given :1; unsigned HSMHV_npext_Given :1; unsigned HSMHV_scp22_Given :1; unsigned HSMHV_scp21_Given :1; unsigned HSMHV_bs1_Given :1; unsigned HSMHV_bs2_Given :1; unsigned HSMHV_cgso_Given :1; unsigned HSMHV_cgdo_Given :1; unsigned HSMHV_cgbo_Given :1; unsigned HSMHV_tpoly_Given :1; unsigned HSMHV_js0_Given :1; unsigned HSMHV_js0sw_Given :1; unsigned HSMHV_nj_Given :1; unsigned HSMHV_njsw_Given :1; unsigned HSMHV_xti_Given :1; unsigned HSMHV_cj_Given :1; unsigned HSMHV_cjsw_Given :1; unsigned HSMHV_cjswg_Given :1; unsigned HSMHV_mj_Given :1; unsigned HSMHV_mjsw_Given :1; unsigned HSMHV_mjswg_Given :1; unsigned HSMHV_xti2_Given :1; unsigned HSMHV_cisb_Given :1; unsigned HSMHV_cvb_Given :1; unsigned HSMHV_ctemp_Given :1; unsigned HSMHV_cisbk_Given :1; unsigned HSMHV_cvbk_Given :1; unsigned HSMHV_divx_Given :1; unsigned HSMHV_pb_Given :1; unsigned HSMHV_pbsw_Given :1; unsigned HSMHV_pbswg_Given :1; unsigned HSMHV_clm1_Given :1; unsigned HSMHV_clm2_Given :1; unsigned HSMHV_clm3_Given :1; unsigned HSMHV_clm5_Given :1; unsigned HSMHV_clm6_Given :1; unsigned HSMHV_muetmp_Given :1; unsigned HSMHV_vover_Given :1; unsigned HSMHV_voverp_Given :1; unsigned HSMHV_vovers_Given :1; unsigned HSMHV_voversp_Given :1; unsigned HSMHV_wfc_Given :1; unsigned HSMHV_nsubcw_Given :1; unsigned HSMHV_nsubcwp_Given :1; unsigned HSMHV_qme1_Given :1; unsigned HSMHV_qme2_Given :1; unsigned HSMHV_qme3_Given :1; unsigned HSMHV_gidl1_Given :1; unsigned HSMHV_gidl2_Given :1; unsigned HSMHV_gidl3_Given :1; unsigned HSMHV_gidl4_Given :1; unsigned HSMHV_gidl5_Given :1; unsigned HSMHV_gleak1_Given :1; unsigned HSMHV_gleak2_Given :1; unsigned HSMHV_gleak3_Given :1; unsigned HSMHV_gleak4_Given :1; unsigned HSMHV_gleak5_Given :1; unsigned HSMHV_gleak6_Given :1; unsigned HSMHV_gleak7_Given :1; unsigned HSMHV_glpart1_Given :1; unsigned HSMHV_glksd1_Given :1; unsigned HSMHV_glksd2_Given :1; unsigned HSMHV_glksd3_Given :1; unsigned HSMHV_glkb1_Given :1; unsigned HSMHV_glkb2_Given :1; unsigned HSMHV_glkb3_Given :1; unsigned HSMHV_egig_Given :1; unsigned HSMHV_igtemp2_Given :1; unsigned HSMHV_igtemp3_Given :1; unsigned HSMHV_vzadd0_Given :1; unsigned HSMHV_pzadd0_Given :1; unsigned HSMHV_nftrp_Given :1; unsigned HSMHV_nfalp_Given :1; unsigned HSMHV_cit_Given :1; unsigned HSMHV_falph_Given :1; unsigned HSMHV_dly1_Given :1; unsigned HSMHV_dly2_Given :1; unsigned HSMHV_dly3_Given :1; unsigned HSMHV_dlyov_Given :1; unsigned HSMHV_tnom_Given :1; unsigned HSMHV_ovslp_Given :1; unsigned HSMHV_ovmag_Given :1; unsigned HSMHV_gbmin_Given :1; unsigned HSMHV_rbpb_Given :1; unsigned HSMHV_rbpd_Given :1; unsigned HSMHV_rbps_Given :1; unsigned HSMHV_rbdb_Given :1; unsigned HSMHV_rbsb_Given :1; unsigned HSMHV_ibpc1_Given :1; unsigned HSMHV_ibpc2_Given :1; unsigned HSMHV_mphdfm_Given :1; unsigned HSMHV_rdvg11_Given :1; unsigned HSMHV_rdvg12_Given :1; unsigned HSMHV_qovsm_Given :1; unsigned HSMHV_ldrift_Given :1; unsigned HSMHV_rd20_Given :1; unsigned HSMHV_rd21_Given :1; unsigned HSMHV_rd22_Given :1; unsigned HSMHV_rd22d_Given :1; unsigned HSMHV_rd23_Given :1; unsigned HSMHV_rd24_Given :1; unsigned HSMHV_rd25_Given :1; unsigned HSMHV_rd26_Given :1; unsigned HSMHV_rdvdl_Given :1; unsigned HSMHV_rdvdlp_Given :1; unsigned HSMHV_rdvds_Given :1; unsigned HSMHV_rdvdsp_Given :1; unsigned HSMHV_rd23l_Given :1; unsigned HSMHV_rd23lp_Given :1; unsigned HSMHV_rd23s_Given :1; unsigned HSMHV_rd23sp_Given :1; unsigned HSMHV_rds_Given :1; unsigned HSMHV_rdsp_Given :1; unsigned HSMHV_vbsmin_Given :1; unsigned HSMHV_ninvd_Given :1; unsigned HSMHV_ninvdw_Given :1; unsigned HSMHV_ninvdwp_Given :1; unsigned HSMHV_ninvdt1_Given :1; unsigned HSMHV_ninvdt2_Given :1; unsigned HSMHV_rdvb_Given :1; unsigned HSMHV_rth0nf_Given :1; unsigned HSMHV_rthtemp1_Given :1; unsigned HSMHV_rthtemp2_Given :1; unsigned HSMHV_prattemp1_Given :1; unsigned HSMHV_prattemp2_Given :1; unsigned HSMHV_rth0_Given :1; unsigned HSMHV_cth0_Given :1; unsigned HSMHV_powrat_Given :1; unsigned HSMHV_tcjbd_Given :1; unsigned HSMHV_tcjbs_Given :1; unsigned HSMHV_tcjbdsw_Given :1; unsigned HSMHV_tcjbssw_Given :1; unsigned HSMHV_tcjbdswg_Given :1; unsigned HSMHV_tcjbsswg_Given :1; /* unsigned HSMHV_wth0_Given :1; */ unsigned HSMHV_qdftvd_Given :1; unsigned HSMHV_rdvd_Given :1; unsigned HSMHV_rdtemp1_Given :1; unsigned HSMHV_rdtemp2_Given :1; unsigned HSMHV_rth0r_Given :1; unsigned HSMHV_rdvdtemp1_Given :1; unsigned HSMHV_rdvdtemp2_Given :1; unsigned HSMHV_rth0w_Given :1; unsigned HSMHV_rth0wp_Given :1; unsigned HSMHV_cvdsover_Given :1; /* substrate effect */ unsigned HSMHV_rdvsub_Given :1; /* substrate effect */ unsigned HSMHV_rdvdsub_Given :1; /* substrate effect */ unsigned HSMHV_ddrift_Given :1; /* substrate effect */ unsigned HSMHV_vbisub_Given :1; /* substrate effect */ unsigned HSMHV_nsubsub_Given :1; /* substrate effect */ unsigned HSMHV_shemax_Given :1; /* binning parameters */ unsigned HSMHV_lmin_Given :1; unsigned HSMHV_lmax_Given :1; unsigned HSMHV_wmin_Given :1; unsigned HSMHV_wmax_Given :1; unsigned HSMHV_lbinn_Given :1; unsigned HSMHV_wbinn_Given :1; /* Length dependence */ unsigned HSMHV_lvmax_Given :1; unsigned HSMHV_lbgtmp1_Given :1; unsigned HSMHV_lbgtmp2_Given :1; unsigned HSMHV_leg0_Given :1; unsigned HSMHV_lvfbover_Given :1; unsigned HSMHV_lnover_Given :1; unsigned HSMHV_lnovers_Given :1; unsigned HSMHV_lwl2_Given :1; unsigned HSMHV_lvfbc_Given :1; unsigned HSMHV_lnsubc_Given :1; unsigned HSMHV_lnsubp_Given :1; unsigned HSMHV_lscp1_Given :1; unsigned HSMHV_lscp2_Given :1; unsigned HSMHV_lscp3_Given :1; unsigned HSMHV_lsc1_Given :1; unsigned HSMHV_lsc2_Given :1; unsigned HSMHV_lsc3_Given :1; unsigned HSMHV_lpgd1_Given :1; unsigned HSMHV_lpgd3_Given :1; unsigned HSMHV_lndep_Given :1; unsigned HSMHV_lninv_Given :1; unsigned HSMHV_lmuecb0_Given :1; unsigned HSMHV_lmuecb1_Given :1; unsigned HSMHV_lmueph1_Given :1; unsigned HSMHV_lvtmp_Given :1; unsigned HSMHV_lwvth0_Given :1; unsigned HSMHV_lmuesr1_Given :1; unsigned HSMHV_lmuetmp_Given :1; unsigned HSMHV_lsub1_Given :1; unsigned HSMHV_lsub2_Given :1; unsigned HSMHV_lsvds_Given :1; unsigned HSMHV_lsvbs_Given :1; unsigned HSMHV_lsvgs_Given :1; unsigned HSMHV_lfn1_Given :1; unsigned HSMHV_lfn2_Given :1; unsigned HSMHV_lfn3_Given :1; unsigned HSMHV_lfvbs_Given :1; unsigned HSMHV_lnsti_Given :1; unsigned HSMHV_lwsti_Given :1; unsigned HSMHV_lscsti1_Given :1; unsigned HSMHV_lscsti2_Given :1; unsigned HSMHV_lvthsti_Given :1; unsigned HSMHV_lmuesti1_Given :1; unsigned HSMHV_lmuesti2_Given :1; unsigned HSMHV_lmuesti3_Given :1; unsigned HSMHV_lnsubpsti1_Given :1; unsigned HSMHV_lnsubpsti2_Given :1; unsigned HSMHV_lnsubpsti3_Given :1; unsigned HSMHV_lcgso_Given :1; unsigned HSMHV_lcgdo_Given :1; unsigned HSMHV_ljs0_Given :1; unsigned HSMHV_ljs0sw_Given :1; unsigned HSMHV_lnj_Given :1; unsigned HSMHV_lcisbk_Given :1; unsigned HSMHV_lclm1_Given :1; unsigned HSMHV_lclm2_Given :1; unsigned HSMHV_lclm3_Given :1; unsigned HSMHV_lwfc_Given :1; unsigned HSMHV_lgidl1_Given :1; unsigned HSMHV_lgidl2_Given :1; unsigned HSMHV_lgleak1_Given :1; unsigned HSMHV_lgleak2_Given :1; unsigned HSMHV_lgleak3_Given :1; unsigned HSMHV_lgleak6_Given :1; unsigned HSMHV_lglksd1_Given :1; unsigned HSMHV_lglksd2_Given :1; unsigned HSMHV_lglkb1_Given :1; unsigned HSMHV_lglkb2_Given :1; unsigned HSMHV_lnftrp_Given :1; unsigned HSMHV_lnfalp_Given :1; unsigned HSMHV_lpthrou_Given :1; unsigned HSMHV_lvdiffj_Given :1; unsigned HSMHV_libpc1_Given :1; unsigned HSMHV_libpc2_Given :1; unsigned HSMHV_lcgbo_Given :1; unsigned HSMHV_lcvdsover_Given :1; unsigned HSMHV_lfalph_Given :1; unsigned HSMHV_lnpext_Given :1; unsigned HSMHV_lpowrat_Given :1; unsigned HSMHV_lrd_Given :1; unsigned HSMHV_lrd22_Given :1; unsigned HSMHV_lrd23_Given :1; unsigned HSMHV_lrd24_Given :1; unsigned HSMHV_lrdict1_Given :1; unsigned HSMHV_lrdov13_Given :1; unsigned HSMHV_lrdslp1_Given :1; unsigned HSMHV_lrdvb_Given :1; unsigned HSMHV_lrdvd_Given :1; unsigned HSMHV_lrdvg11_Given :1; unsigned HSMHV_lrs_Given :1; unsigned HSMHV_lrth0_Given :1; unsigned HSMHV_lvover_Given :1; /* Width dependence */ unsigned HSMHV_wvmax_Given :1; unsigned HSMHV_wbgtmp1_Given :1; unsigned HSMHV_wbgtmp2_Given :1; unsigned HSMHV_weg0_Given :1; unsigned HSMHV_wvfbover_Given :1; unsigned HSMHV_wnover_Given :1; unsigned HSMHV_wnovers_Given :1; unsigned HSMHV_wwl2_Given :1; unsigned HSMHV_wvfbc_Given :1; unsigned HSMHV_wnsubc_Given :1; unsigned HSMHV_wnsubp_Given :1; unsigned HSMHV_wscp1_Given :1; unsigned HSMHV_wscp2_Given :1; unsigned HSMHV_wscp3_Given :1; unsigned HSMHV_wsc1_Given :1; unsigned HSMHV_wsc2_Given :1; unsigned HSMHV_wsc3_Given :1; unsigned HSMHV_wpgd1_Given :1; unsigned HSMHV_wpgd3_Given :1; unsigned HSMHV_wndep_Given :1; unsigned HSMHV_wninv_Given :1; unsigned HSMHV_wmuecb0_Given :1; unsigned HSMHV_wmuecb1_Given :1; unsigned HSMHV_wmueph1_Given :1; unsigned HSMHV_wvtmp_Given :1; unsigned HSMHV_wwvth0_Given :1; unsigned HSMHV_wmuesr1_Given :1; unsigned HSMHV_wmuetmp_Given :1; unsigned HSMHV_wsub1_Given :1; unsigned HSMHV_wsub2_Given :1; unsigned HSMHV_wsvds_Given :1; unsigned HSMHV_wsvbs_Given :1; unsigned HSMHV_wsvgs_Given :1; unsigned HSMHV_wfn1_Given :1; unsigned HSMHV_wfn2_Given :1; unsigned HSMHV_wfn3_Given :1; unsigned HSMHV_wfvbs_Given :1; unsigned HSMHV_wnsti_Given :1; unsigned HSMHV_wwsti_Given :1; unsigned HSMHV_wscsti1_Given :1; unsigned HSMHV_wscsti2_Given :1; unsigned HSMHV_wvthsti_Given :1; unsigned HSMHV_wmuesti1_Given :1; unsigned HSMHV_wmuesti2_Given :1; unsigned HSMHV_wmuesti3_Given :1; unsigned HSMHV_wnsubpsti1_Given :1; unsigned HSMHV_wnsubpsti2_Given :1; unsigned HSMHV_wnsubpsti3_Given :1; unsigned HSMHV_wcgso_Given :1; unsigned HSMHV_wcgdo_Given :1; unsigned HSMHV_wjs0_Given :1; unsigned HSMHV_wjs0sw_Given :1; unsigned HSMHV_wnj_Given :1; unsigned HSMHV_wcisbk_Given :1; unsigned HSMHV_wclm1_Given :1; unsigned HSMHV_wclm2_Given :1; unsigned HSMHV_wclm3_Given :1; unsigned HSMHV_wwfc_Given :1; unsigned HSMHV_wgidl1_Given :1; unsigned HSMHV_wgidl2_Given :1; unsigned HSMHV_wgleak1_Given :1; unsigned HSMHV_wgleak2_Given :1; unsigned HSMHV_wgleak3_Given :1; unsigned HSMHV_wgleak6_Given :1; unsigned HSMHV_wglksd1_Given :1; unsigned HSMHV_wglksd2_Given :1; unsigned HSMHV_wglkb1_Given :1; unsigned HSMHV_wglkb2_Given :1; unsigned HSMHV_wnftrp_Given :1; unsigned HSMHV_wnfalp_Given :1; unsigned HSMHV_wpthrou_Given :1; unsigned HSMHV_wvdiffj_Given :1; unsigned HSMHV_wibpc1_Given :1; unsigned HSMHV_wibpc2_Given :1; unsigned HSMHV_wcgbo_Given :1; unsigned HSMHV_wcvdsover_Given :1; unsigned HSMHV_wfalph_Given :1; unsigned HSMHV_wnpext_Given :1; unsigned HSMHV_wpowrat_Given :1; unsigned HSMHV_wrd_Given :1; unsigned HSMHV_wrd22_Given :1; unsigned HSMHV_wrd23_Given :1; unsigned HSMHV_wrd24_Given :1; unsigned HSMHV_wrdict1_Given :1; unsigned HSMHV_wrdov13_Given :1; unsigned HSMHV_wrdslp1_Given :1; unsigned HSMHV_wrdvb_Given :1; unsigned HSMHV_wrdvd_Given :1; unsigned HSMHV_wrdvg11_Given :1; unsigned HSMHV_wrs_Given :1; unsigned HSMHV_wrth0_Given :1; unsigned HSMHV_wvover_Given :1; /* Cross-term dependence */ unsigned HSMHV_pvmax_Given :1; unsigned HSMHV_pbgtmp1_Given :1; unsigned HSMHV_pbgtmp2_Given :1; unsigned HSMHV_peg0_Given :1; unsigned HSMHV_pvfbover_Given :1; unsigned HSMHV_pnover_Given :1; unsigned HSMHV_pnovers_Given :1; unsigned HSMHV_pwl2_Given :1; unsigned HSMHV_pvfbc_Given :1; unsigned HSMHV_pnsubc_Given :1; unsigned HSMHV_pnsubp_Given :1; unsigned HSMHV_pscp1_Given :1; unsigned HSMHV_pscp2_Given :1; unsigned HSMHV_pscp3_Given :1; unsigned HSMHV_psc1_Given :1; unsigned HSMHV_psc2_Given :1; unsigned HSMHV_psc3_Given :1; unsigned HSMHV_ppgd1_Given :1; unsigned HSMHV_ppgd3_Given :1; unsigned HSMHV_pndep_Given :1; unsigned HSMHV_pninv_Given :1; unsigned HSMHV_pmuecb0_Given :1; unsigned HSMHV_pmuecb1_Given :1; unsigned HSMHV_pmueph1_Given :1; unsigned HSMHV_pvtmp_Given :1; unsigned HSMHV_pwvth0_Given :1; unsigned HSMHV_pmuesr1_Given :1; unsigned HSMHV_pmuetmp_Given :1; unsigned HSMHV_psub1_Given :1; unsigned HSMHV_psub2_Given :1; unsigned HSMHV_psvds_Given :1; unsigned HSMHV_psvbs_Given :1; unsigned HSMHV_psvgs_Given :1; unsigned HSMHV_pfn1_Given :1; unsigned HSMHV_pfn2_Given :1; unsigned HSMHV_pfn3_Given :1; unsigned HSMHV_pfvbs_Given :1; unsigned HSMHV_pnsti_Given :1; unsigned HSMHV_pwsti_Given :1; unsigned HSMHV_pscsti1_Given :1; unsigned HSMHV_pscsti2_Given :1; unsigned HSMHV_pvthsti_Given :1; unsigned HSMHV_pmuesti1_Given :1; unsigned HSMHV_pmuesti2_Given :1; unsigned HSMHV_pmuesti3_Given :1; unsigned HSMHV_pnsubpsti1_Given :1; unsigned HSMHV_pnsubpsti2_Given :1; unsigned HSMHV_pnsubpsti3_Given :1; unsigned HSMHV_pcgso_Given :1; unsigned HSMHV_pcgdo_Given :1; unsigned HSMHV_pjs0_Given :1; unsigned HSMHV_pjs0sw_Given :1; unsigned HSMHV_pnj_Given :1; unsigned HSMHV_pcisbk_Given :1; unsigned HSMHV_pclm1_Given :1; unsigned HSMHV_pclm2_Given :1; unsigned HSMHV_pclm3_Given :1; unsigned HSMHV_pwfc_Given :1; unsigned HSMHV_pgidl1_Given :1; unsigned HSMHV_pgidl2_Given :1; unsigned HSMHV_pgleak1_Given :1; unsigned HSMHV_pgleak2_Given :1; unsigned HSMHV_pgleak3_Given :1; unsigned HSMHV_pgleak6_Given :1; unsigned HSMHV_pglksd1_Given :1; unsigned HSMHV_pglksd2_Given :1; unsigned HSMHV_pglkb1_Given :1; unsigned HSMHV_pglkb2_Given :1; unsigned HSMHV_pnftrp_Given :1; unsigned HSMHV_pnfalp_Given :1; unsigned HSMHV_ppthrou_Given :1; unsigned HSMHV_pvdiffj_Given :1; unsigned HSMHV_pibpc1_Given :1; unsigned HSMHV_pibpc2_Given :1; unsigned HSMHV_pcgbo_Given :1; unsigned HSMHV_pcvdsover_Given :1; unsigned HSMHV_pfalph_Given :1; unsigned HSMHV_pnpext_Given :1; unsigned HSMHV_ppowrat_Given :1; unsigned HSMHV_prd_Given :1; unsigned HSMHV_prd22_Given :1; unsigned HSMHV_prd23_Given :1; unsigned HSMHV_prd24_Given :1; unsigned HSMHV_prdict1_Given :1; unsigned HSMHV_prdov13_Given :1; unsigned HSMHV_prdslp1_Given :1; unsigned HSMHV_prdvb_Given :1; unsigned HSMHV_prdvd_Given :1; unsigned HSMHV_prdvg11_Given :1; unsigned HSMHV_prs_Given :1; unsigned HSMHV_prth0_Given :1; unsigned HSMHV_pvover_Given :1; unsigned HSMHVvgsMaxGiven :1; unsigned HSMHVvgdMaxGiven :1; unsigned HSMHVvgbMaxGiven :1; unsigned HSMHVvdsMaxGiven :1; unsigned HSMHVvbsMaxGiven :1; unsigned HSMHVvbdMaxGiven :1; } HSMHVmodel; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ #define HSMHV_BAD_PARAM -1 /* flags */ #define HSMHV_MOD_NMOS 1 #define HSMHV_MOD_PMOS 2 #define HSMHV_MOD_LEVEL 3 #define HSMHV_MOD_INFO 4 #define HSMHV_MOD_NOISE 5 #define HSMHV_MOD_VERSION 6 #define HSMHV_MOD_SHOW 7 #define HSMHV_MOD_CORSRD 11 #define HSMHV_MOD_COIPRV 12 #define HSMHV_MOD_COPPRV 13 #define HSMHV_MOD_COADOV 17 #define HSMHV_MOD_COISUB 21 #define HSMHV_MOD_COIIGS 22 #define HSMHV_MOD_COGIDL 23 #define HSMHV_MOD_COOVLP 24 #define HSMHV_MOD_COOVLPS 8 #define HSMHV_MOD_COFLICK 25 #define HSMHV_MOD_COISTI 26 #define HSMHV_MOD_CONQS 29 #define HSMHV_MOD_COTHRML 30 #define HSMHV_MOD_COIGN 31 /* Induced gate noise */ #define HSMHV_MOD_CORG 32 #define HSMHV_MOD_CORBNET 33 #define HSMHV_MOD_CODFM 36 /* DFM */ #define HSMHV_MOD_COQOVSM 34 #define HSMHV_MOD_COSELFHEAT 35 /* Self-heating model--SHE-- */ #define HSMHV_MOD_COSUBNODE 48 #define HSMHV_MOD_COSYM 37 /* Symmery model for HV */ #define HSMHV_MOD_COTEMP 38 #define HSMHV_MOD_COLDRIFT 39 /* device parameters */ #define HSMHV_COSELFHEAT 49 #define HSMHV_COSUBNODE 50 #define HSMHV_L 51 #define HSMHV_W 52 #define HSMHV_AD 53 #define HSMHV_AS 54 #define HSMHV_PD 55 #define HSMHV_PS 56 #define HSMHV_NRD 57 #define HSMHV_NRS 58 /* #define HSMHV_TEMP 59 not used */ #define HSMHV_DTEMP 60 #define HSMHV_OFF 61 #define HSMHV_IC_VBS 62 #define HSMHV_IC_VDS 63 #define HSMHV_IC_VGS 64 #define HSMHV_IC 65 #define HSMHV_CORBNET 66 #define HSMHV_RBPB 67 #define HSMHV_RBPD 68 #define HSMHV_RBPS 69 #define HSMHV_RBDB 70 #define HSMHV_RBSB 71 #define HSMHV_CORG 72 /* #define HSMHV_RSHG 73 */ #define HSMHV_NGCON 74 #define HSMHV_XGW 75 #define HSMHV_XGL 76 #define HSMHV_NF 77 #define HSMHV_SA 78 #define HSMHV_SB 79 #define HSMHV_SD 80 #define HSMHV_NSUBCDFM 82 #define HSMHV_M 83 #define HSMHV_SUBLD1 86 #define HSMHV_SUBLD2 87 #define HSMHV_LOVER 41 #define HSMHV_LOVERS 42 #define HSMHV_LOVERLD 43 #define HSMHV_LDRIFT1 88 #define HSMHV_LDRIFT2 89 #define HSMHV_LDRIFT1S 90 #define HSMHV_LDRIFT2S 91 /* #define HSMHV_RTH0 84 not used */ /* #define HSMHV_CTH0 85 not used */ /* model parameters */ #define HSMHV_MOD_VBSMIN 198 #define HSMHV_MOD_VMAX 500 #define HSMHV_MOD_VMAXT1 503 #define HSMHV_MOD_VMAXT2 504 #define HSMHV_MOD_BGTMP1 101 #define HSMHV_MOD_BGTMP2 102 #define HSMHV_MOD_EG0 103 #define HSMHV_MOD_TOX 104 #define HSMHV_MOD_XLD 105 #define HSMHV_MOD_LOVER 106 #define HSMHV_MOD_LOVERS 385 #define HSMHV_MOD_RDOV11 313 #define HSMHV_MOD_RDOV12 314 #define HSMHV_MOD_RDOV13 476 #define HSMHV_MOD_RDSLP1 315 #define HSMHV_MOD_RDICT1 316 #define HSMHV_MOD_RDSLP2 317 #define HSMHV_MOD_RDICT2 318 #define HSMHV_MOD_LOVERLD 436 #define HSMHV_MOD_LDRIFT1 319 #define HSMHV_MOD_LDRIFT2 320 #define HSMHV_MOD_LDRIFT1S 324 #define HSMHV_MOD_LDRIFT2S 325 #define HSMHV_MOD_SUBLD1 321 #define HSMHV_MOD_SUBLD2 322 #define HSMHV_MOD_DDLTMAX 421 /* Vdseff */ #define HSMHV_MOD_DDLTSLP 422 /* Vdseff */ #define HSMHV_MOD_DDLTICT 423 /* Vdseff */ #define HSMHV_MOD_VFBOVER 428 #define HSMHV_MOD_NOVER 430 #define HSMHV_MOD_NOVERS 431 #define HSMHV_MOD_XWD 107 #define HSMHV_MOD_XWDC 513 #define HSMHV_MOD_XL 112 #define HSMHV_MOD_XW 117 #define HSMHV_MOD_SAREF 433 #define HSMHV_MOD_SBREF 434 #define HSMHV_MOD_LL 108 #define HSMHV_MOD_LLD 109 #define HSMHV_MOD_LLN 110 #define HSMHV_MOD_WL 111 #define HSMHV_MOD_WL1 113 #define HSMHV_MOD_WL1P 114 #define HSMHV_MOD_WL2 407 #define HSMHV_MOD_WL2P 408 #define HSMHV_MOD_WLD 115 #define HSMHV_MOD_WLN 116 #define HSMHV_MOD_XQY 178 #define HSMHV_MOD_XQY1 118 #define HSMHV_MOD_XQY2 120 #define HSMHV_MOD_RSH 119 #define HSMHV_MOD_RSHG 384 /* #define HSMHV_MOD_NGCON 385 */ /* #define HSMHV_MOD_XGW 386 */ /* #define HSMHV_MOD_XGL 387 */ /* #define HSMHV_MOD_NF 388 */ #define HSMHV_MOD_RS 398 #define HSMHV_MOD_RD 399 #define HSMHV_MOD_VFBC 121 #define HSMHV_MOD_VBI 122 #define HSMHV_MOD_NSUBC 123 #define HSMHV_MOD_TNOM 124 #define HSMHV_MOD_PARL2 125 #define HSMHV_MOD_SC1 126 #define HSMHV_MOD_SC2 127 #define HSMHV_MOD_SC3 128 #define HSMHV_MOD_SC4 248 #define HSMHV_MOD_NDEP 129 #define HSMHV_MOD_NDEPL 419 #define HSMHV_MOD_NDEPLP 420 #define HSMHV_MOD_NINV 130 #define HSMHV_MOD_NINVD 505 #define HSMHV_MOD_NINVDW 506 #define HSMHV_MOD_NINVDWP 507 #define HSMHV_MOD_NINVDT1 508 #define HSMHV_MOD_NINVDT2 509 #define HSMHV_MOD_MUECB0 131 #define HSMHV_MOD_MUECB1 132 #define HSMHV_MOD_MUEPH1 133 #define HSMHV_MOD_MUEPH0 134 #define HSMHV_MOD_MUEPHW 135 #define HSMHV_MOD_MUEPWP 136 #define HSMHV_MOD_MUEPHL 137 #define HSMHV_MOD_MUEPLP 138 #define HSMHV_MOD_MUEPHS 139 #define HSMHV_MOD_MUEPSP 140 #define HSMHV_MOD_VTMP 141 #define HSMHV_MOD_WVTH0 142 #define HSMHV_MOD_MUESR1 143 #define HSMHV_MOD_MUESR0 144 #define HSMHV_MOD_MUESRL 145 #define HSMHV_MOD_MUESLP 146 #define HSMHV_MOD_MUESRW 147 #define HSMHV_MOD_MUESWP 148 #define HSMHV_MOD_BB 149 #define HSMHV_MOD_SUB1 151 #define HSMHV_MOD_SUB2 152 #define HSMHV_MOD_CGSO 154 #define HSMHV_MOD_CGDO 155 #define HSMHV_MOD_CGBO 156 #define HSMHV_MOD_JS0 157 #define HSMHV_MOD_JS0SW 158 #define HSMHV_MOD_NJ 159 #define HSMHV_MOD_NJSW 160 #define HSMHV_MOD_XTI 161 #define HSMHV_MOD_CJ 162 #define HSMHV_MOD_CJSW 163 #define HSMHV_MOD_CJSWG 164 #define HSMHV_MOD_MJ 165 #define HSMHV_MOD_MJSW 166 #define HSMHV_MOD_MJSWG 167 #define HSMHV_MOD_XTI2 168 #define HSMHV_MOD_CISB 169 #define HSMHV_MOD_CVB 170 #define HSMHV_MOD_CTEMP 171 #define HSMHV_MOD_CISBK 172 #define HSMHV_MOD_CVBK 173 #define HSMHV_MOD_DIVX 174 #define HSMHV_MOD_PB 175 #define HSMHV_MOD_PBSW 176 #define HSMHV_MOD_PBSWG 177 #define HSMHV_MOD_TPOLY 179 /* #define HSMHV_MOD_TPOLYLD 477 not used */ #define HSMHV_MOD_LP 180 #define HSMHV_MOD_NSUBP 181 #define HSMHV_MOD_NSUBP0 182 #define HSMHV_MOD_NSUBWP 183 #define HSMHV_MOD_SCP1 184 #define HSMHV_MOD_SCP2 185 #define HSMHV_MOD_SCP3 186 #define HSMHV_MOD_PGD1 187 #define HSMHV_MOD_PGD2 188 #define HSMHV_MOD_PGD3 189 #define HSMHV_MOD_PGD4 190 #define HSMHV_MOD_CLM1 191 #define HSMHV_MOD_CLM2 192 #define HSMHV_MOD_CLM3 193 #define HSMHV_MOD_CLM5 402 #define HSMHV_MOD_CLM6 403 #define HSMHV_MOD_MUETMP 195 #define HSMHV_MOD_VOVER 199 #define HSMHV_MOD_VOVERP 200 #define HSMHV_MOD_WFC 201 #define HSMHV_MOD_NSUBCW 249 #define HSMHV_MOD_NSUBCWP 250 #define HSMHV_MOD_QME1 202 #define HSMHV_MOD_QME2 203 #define HSMHV_MOD_QME3 204 #define HSMHV_MOD_GIDL1 205 #define HSMHV_MOD_GIDL2 206 #define HSMHV_MOD_GIDL3 207 #define HSMHV_MOD_GLEAK1 208 #define HSMHV_MOD_GLEAK2 209 #define HSMHV_MOD_GLEAK3 210 #define HSMHV_MOD_GLEAK4 211 #define HSMHV_MOD_GLEAK5 212 #define HSMHV_MOD_GLEAK6 213 #define HSMHV_MOD_GLEAK7 214 #define HSMHV_MOD_GLPART1 406 #define HSMHV_MOD_GLKSD1 215 #define HSMHV_MOD_GLKSD2 216 #define HSMHV_MOD_GLKSD3 217 #define HSMHV_MOD_GLKB1 218 #define HSMHV_MOD_GLKB2 219 #define HSMHV_MOD_GLKB3 429 #define HSMHV_MOD_EGIG 220 #define HSMHV_MOD_IGTEMP2 221 #define HSMHV_MOD_IGTEMP3 222 #define HSMHV_MOD_VZADD0 223 #define HSMHV_MOD_PZADD0 224 #define HSMHV_MOD_NSTI 225 #define HSMHV_MOD_WSTI 226 #define HSMHV_MOD_WSTIL 227 #define HSMHV_MOD_WSTILP 231 #define HSMHV_MOD_WSTIW 234 #define HSMHV_MOD_WSTIWP 228 #define HSMHV_MOD_SCSTI1 229 #define HSMHV_MOD_SCSTI2 230 #define HSMHV_MOD_VTHSTI 232 #define HSMHV_MOD_VDSTI 233 #define HSMHV_MOD_MUESTI1 235 #define HSMHV_MOD_MUESTI2 236 #define HSMHV_MOD_MUESTI3 237 #define HSMHV_MOD_NSUBPSTI1 238 #define HSMHV_MOD_NSUBPSTI2 239 #define HSMHV_MOD_NSUBPSTI3 240 #define HSMHV_MOD_LPEXT 241 #define HSMHV_MOD_NPEXT 242 #define HSMHV_MOD_SCP22 243 #define HSMHV_MOD_SCP21 244 #define HSMHV_MOD_BS1 245 #define HSMHV_MOD_BS2 246 #define HSMHV_MOD_KAPPA 251 #define HSMHV_MOD_PTHROU 253 #define HSMHV_MOD_VDIFFJ 254 #define HSMHV_MOD_DLY1 255 #define HSMHV_MOD_DLY2 256 #define HSMHV_MOD_DLY3 257 #define HSMHV_MOD_NFTRP 258 #define HSMHV_MOD_NFALP 259 #define HSMHV_MOD_CIT 260 #define HSMHV_MOD_FALPH 263 #define HSMHV_MOD_OVSLP 261 #define HSMHV_MOD_OVMAG 262 #define HSMHV_MOD_GIDL4 281 #define HSMHV_MOD_GIDL5 282 #define HSMHV_MOD_SVGS 283 #define HSMHV_MOD_SVBS 284 #define HSMHV_MOD_SVBSL 285 #define HSMHV_MOD_SVDS 286 #define HSMHV_MOD_SLG 287 #define HSMHV_MOD_SUB1L 290 #define HSMHV_MOD_SUB2L 292 #define HSMHV_MOD_FN1 294 #define HSMHV_MOD_FN2 295 #define HSMHV_MOD_FN3 296 #define HSMHV_MOD_FVBS 297 #define HSMHV_MOD_VOVERS 303 #define HSMHV_MOD_VOVERSP 304 #define HSMHV_MOD_SVGSL 305 #define HSMHV_MOD_SVGSLP 306 #define HSMHV_MOD_SVGSWP 307 #define HSMHV_MOD_SVGSW 308 #define HSMHV_MOD_SVBSLP 309 #define HSMHV_MOD_SLGL 310 #define HSMHV_MOD_SLGLP 311 #define HSMHV_MOD_SUB1LP 312 #define HSMHV_MOD_IBPC1 404 #define HSMHV_MOD_IBPC2 405 #define HSMHV_MOD_MPHDFM 409 #define HSMHV_MOD_RDVG11 424 #define HSMHV_MOD_RDVG12 425 #define HSMHV_MOD_RTH0 432 #define HSMHV_MOD_CTH0 462 #define HSMHV_MOD_POWRAT 463 /* #define HSMHV_MOD_WTH0 463 /\*---------SHE----------*\/ */ #define HSMHV_MOD_DLYOV 437 #define HSMHV_MOD_QDFTVD 438 #define HSMHV_MOD_XLDLD 439 #define HSMHV_MOD_XWDLD 494 #define HSMHV_MOD_RDVD 510 #define HSMHV_MOD_RDVB 301 #define HSMHV_MOD_RDVSUB 481 /* substrate effect */ #define HSMHV_MOD_RDVDSUB 482 /* substrate effect */ #define HSMHV_MOD_DDRIFT 483 /* substrate effect */ #define HSMHV_MOD_VBISUB 484 /* substrate effect */ #define HSMHV_MOD_NSUBSUB 485 /* substrate effect */ #define HSMHV_MOD_QOVSM 323 #define HSMHV_MOD_LDRIFT 458 #define HSMHV_MOD_RD20 447 #define HSMHV_MOD_RD21 441 #define HSMHV_MOD_RD22 442 #define HSMHV_MOD_RD22D 478 #define HSMHV_MOD_RD23 443 #define HSMHV_MOD_RD24 444 #define HSMHV_MOD_RD25 445 #define HSMHV_MOD_RD26 446 #define HSMHV_MOD_RDVDL 448 #define HSMHV_MOD_RDVDLP 449 #define HSMHV_MOD_RDVDS 450 #define HSMHV_MOD_RDVDSP 451 #define HSMHV_MOD_RD23L 452 #define HSMHV_MOD_RD23LP 453 #define HSMHV_MOD_RD23S 454 #define HSMHV_MOD_RD23SP 455 #define HSMHV_MOD_RDS 456 #define HSMHV_MOD_RDSP 457 #define HSMHV_MOD_RDTEMP1 461 #define HSMHV_MOD_RDTEMP2 464 #define HSMHV_MOD_RTH0R 470 #define HSMHV_MOD_RDVDTEMP1 471 #define HSMHV_MOD_RDVDTEMP2 472 #define HSMHV_MOD_RTH0W 473 #define HSMHV_MOD_RTH0WP 474 #define HSMHV_MOD_RTH0NF 475 #define HSMHV_MOD_RTHTEMP1 490 #define HSMHV_MOD_RTHTEMP2 491 #define HSMHV_MOD_PRATTEMP1 492 #define HSMHV_MOD_PRATTEMP2 493 #define HSMHV_MOD_CVDSOVER 480 #define HSMHV_MOD_SHEMAX 100 /* binning parameters */ #define HSMHV_MOD_LMIN 1000 #define HSMHV_MOD_LMAX 1001 #define HSMHV_MOD_WMIN 1002 #define HSMHV_MOD_WMAX 1003 #define HSMHV_MOD_LBINN 1004 #define HSMHV_MOD_WBINN 1005 /* Length dependence */ #define HSMHV_MOD_LVMAX 1100 #define HSMHV_MOD_LBGTMP1 1101 #define HSMHV_MOD_LBGTMP2 1102 #define HSMHV_MOD_LEG0 1103 #define HSMHV_MOD_LVFBOVER 1428 #define HSMHV_MOD_LNOVER 1430 #define HSMHV_MOD_LNOVERS 1431 #define HSMHV_MOD_LWL2 1407 #define HSMHV_MOD_LVFBC 1121 #define HSMHV_MOD_LNSUBC 1123 #define HSMHV_MOD_LNSUBP 1181 #define HSMHV_MOD_LSCP1 1184 #define HSMHV_MOD_LSCP2 1185 #define HSMHV_MOD_LSCP3 1186 #define HSMHV_MOD_LSC1 1126 #define HSMHV_MOD_LSC2 1127 #define HSMHV_MOD_LSC3 1128 #define HSMHV_MOD_LPGD1 1187 #define HSMHV_MOD_LPGD3 1189 #define HSMHV_MOD_LNDEP 1129 #define HSMHV_MOD_LNINV 1130 #define HSMHV_MOD_LMUECB0 1131 #define HSMHV_MOD_LMUECB1 1132 #define HSMHV_MOD_LMUEPH1 1133 #define HSMHV_MOD_LVTMP 1141 #define HSMHV_MOD_LWVTH0 1142 #define HSMHV_MOD_LMUESR1 1143 #define HSMHV_MOD_LMUETMP 1195 #define HSMHV_MOD_LSUB1 1151 #define HSMHV_MOD_LSUB2 1152 #define HSMHV_MOD_LSVDS 1286 #define HSMHV_MOD_LSVBS 1284 #define HSMHV_MOD_LSVGS 1283 #define HSMHV_MOD_LFN1 1294 #define HSMHV_MOD_LFN2 1295 #define HSMHV_MOD_LFN3 1296 #define HSMHV_MOD_LFVBS 1297 #define HSMHV_MOD_LNSTI 1225 #define HSMHV_MOD_LWSTI 1226 #define HSMHV_MOD_LSCSTI1 1229 #define HSMHV_MOD_LSCSTI2 1230 #define HSMHV_MOD_LVTHSTI 1232 #define HSMHV_MOD_LMUESTI1 1235 #define HSMHV_MOD_LMUESTI2 1236 #define HSMHV_MOD_LMUESTI3 1237 #define HSMHV_MOD_LNSUBPSTI1 1238 #define HSMHV_MOD_LNSUBPSTI2 1239 #define HSMHV_MOD_LNSUBPSTI3 1240 #define HSMHV_MOD_LCGSO 1154 #define HSMHV_MOD_LCGDO 1155 #define HSMHV_MOD_LJS0 1157 #define HSMHV_MOD_LJS0SW 1158 #define HSMHV_MOD_LNJ 1159 #define HSMHV_MOD_LCISBK 1172 #define HSMHV_MOD_LCLM1 1191 #define HSMHV_MOD_LCLM2 1192 #define HSMHV_MOD_LCLM3 1193 #define HSMHV_MOD_LWFC 1201 #define HSMHV_MOD_LGIDL1 1205 #define HSMHV_MOD_LGIDL2 1206 #define HSMHV_MOD_LGLEAK1 1208 #define HSMHV_MOD_LGLEAK2 1209 #define HSMHV_MOD_LGLEAK3 1210 #define HSMHV_MOD_LGLEAK6 1213 #define HSMHV_MOD_LGLKSD1 1215 #define HSMHV_MOD_LGLKSD2 1216 #define HSMHV_MOD_LGLKB1 1218 #define HSMHV_MOD_LGLKB2 1219 #define HSMHV_MOD_LNFTRP 1258 #define HSMHV_MOD_LNFALP 1259 #define HSMHV_MOD_LPTHROU 1253 #define HSMHV_MOD_LVDIFFJ 1254 #define HSMHV_MOD_LIBPC1 1404 #define HSMHV_MOD_LIBPC2 1405 #define HSMHV_MOD_LCGBO 1156 #define HSMHV_MOD_LCVDSOVER 1480 #define HSMHV_MOD_LFALPH 1263 #define HSMHV_MOD_LNPEXT 1242 #define HSMHV_MOD_LPOWRAT 1463 #define HSMHV_MOD_LRD 1399 #define HSMHV_MOD_LRD22 1442 #define HSMHV_MOD_LRD23 1443 #define HSMHV_MOD_LRD24 1444 #define HSMHV_MOD_LRDICT1 1316 #define HSMHV_MOD_LRDOV13 1476 #define HSMHV_MOD_LRDSLP1 1315 #define HSMHV_MOD_LRDVB 1301 #define HSMHV_MOD_LRDVD 1510 #define HSMHV_MOD_LRDVG11 1424 #define HSMHV_MOD_LRS 1398 #define HSMHV_MOD_LRTH0 1432 #define HSMHV_MOD_LVOVER 1199 /* Width dependence */ #define HSMHV_MOD_WVMAX 2100 #define HSMHV_MOD_WBGTMP1 2101 #define HSMHV_MOD_WBGTMP2 2102 #define HSMHV_MOD_WEG0 2103 #define HSMHV_MOD_WVFBOVER 2428 #define HSMHV_MOD_WNOVER 2430 #define HSMHV_MOD_WNOVERS 2431 #define HSMHV_MOD_WWL2 2407 #define HSMHV_MOD_WVFBC 2121 #define HSMHV_MOD_WNSUBC 2123 #define HSMHV_MOD_WNSUBP 2181 #define HSMHV_MOD_WSCP1 2184 #define HSMHV_MOD_WSCP2 2185 #define HSMHV_MOD_WSCP3 2186 #define HSMHV_MOD_WSC1 2126 #define HSMHV_MOD_WSC2 2127 #define HSMHV_MOD_WSC3 2128 #define HSMHV_MOD_WPGD1 2187 #define HSMHV_MOD_WPGD3 2189 #define HSMHV_MOD_WNDEP 2129 #define HSMHV_MOD_WNINV 2130 #define HSMHV_MOD_WMUECB0 2131 #define HSMHV_MOD_WMUECB1 2132 #define HSMHV_MOD_WMUEPH1 2133 #define HSMHV_MOD_WVTMP 2141 #define HSMHV_MOD_WWVTH0 2142 #define HSMHV_MOD_WMUESR1 2143 #define HSMHV_MOD_WMUETMP 2195 #define HSMHV_MOD_WSUB1 2151 #define HSMHV_MOD_WSUB2 2152 #define HSMHV_MOD_WSVDS 2286 #define HSMHV_MOD_WSVBS 2284 #define HSMHV_MOD_WSVGS 2283 #define HSMHV_MOD_WFN1 2294 #define HSMHV_MOD_WFN2 2295 #define HSMHV_MOD_WFN3 2296 #define HSMHV_MOD_WFVBS 2297 #define HSMHV_MOD_WNSTI 2225 #define HSMHV_MOD_WWSTI 2226 #define HSMHV_MOD_WSCSTI1 2229 #define HSMHV_MOD_WSCSTI2 2230 #define HSMHV_MOD_WVTHSTI 2232 #define HSMHV_MOD_WMUESTI1 2235 #define HSMHV_MOD_WMUESTI2 2236 #define HSMHV_MOD_WMUESTI3 2237 #define HSMHV_MOD_WNSUBPSTI1 2238 #define HSMHV_MOD_WNSUBPSTI2 2239 #define HSMHV_MOD_WNSUBPSTI3 2240 #define HSMHV_MOD_WCGSO 2154 #define HSMHV_MOD_WCGDO 2155 #define HSMHV_MOD_WJS0 2157 #define HSMHV_MOD_WJS0SW 2158 #define HSMHV_MOD_WNJ 2159 #define HSMHV_MOD_WCISBK 2172 #define HSMHV_MOD_WCLM1 2191 #define HSMHV_MOD_WCLM2 2192 #define HSMHV_MOD_WCLM3 2193 #define HSMHV_MOD_WWFC 2201 #define HSMHV_MOD_WGIDL1 2205 #define HSMHV_MOD_WGIDL2 2206 #define HSMHV_MOD_WGLEAK1 2208 #define HSMHV_MOD_WGLEAK2 2209 #define HSMHV_MOD_WGLEAK3 2210 #define HSMHV_MOD_WGLEAK6 2213 #define HSMHV_MOD_WGLKSD1 2215 #define HSMHV_MOD_WGLKSD2 2216 #define HSMHV_MOD_WGLKB1 2218 #define HSMHV_MOD_WGLKB2 2219 #define HSMHV_MOD_WNFTRP 2258 #define HSMHV_MOD_WNFALP 2259 #define HSMHV_MOD_WPTHROU 2253 #define HSMHV_MOD_WVDIFFJ 2254 #define HSMHV_MOD_WIBPC1 2404 #define HSMHV_MOD_WIBPC2 2405 #define HSMHV_MOD_WCGBO 2156 #define HSMHV_MOD_WCVDSOVER 2480 #define HSMHV_MOD_WFALPH 2263 #define HSMHV_MOD_WNPEXT 2242 #define HSMHV_MOD_WPOWRAT 2463 #define HSMHV_MOD_WRD 2399 #define HSMHV_MOD_WRD22 2442 #define HSMHV_MOD_WRD23 2443 #define HSMHV_MOD_WRD24 2444 #define HSMHV_MOD_WRDICT1 2316 #define HSMHV_MOD_WRDOV13 2476 #define HSMHV_MOD_WRDSLP1 2315 #define HSMHV_MOD_WRDVB 2301 #define HSMHV_MOD_WRDVD 2510 #define HSMHV_MOD_WRDVG11 2424 #define HSMHV_MOD_WRS 2398 #define HSMHV_MOD_WRTH0 2432 #define HSMHV_MOD_WVOVER 2199 /* Cross-term dependence */ #define HSMHV_MOD_PVMAX 3100 #define HSMHV_MOD_PBGTMP1 3101 #define HSMHV_MOD_PBGTMP2 3102 #define HSMHV_MOD_PEG0 3103 #define HSMHV_MOD_PVFBOVER 3428 #define HSMHV_MOD_PNOVER 3430 #define HSMHV_MOD_PNOVERS 3431 #define HSMHV_MOD_PWL2 3407 #define HSMHV_MOD_PVFBC 3121 #define HSMHV_MOD_PNSUBC 3123 #define HSMHV_MOD_PNSUBP 3181 #define HSMHV_MOD_PSCP1 3184 #define HSMHV_MOD_PSCP2 3185 #define HSMHV_MOD_PSCP3 3186 #define HSMHV_MOD_PSC1 3126 #define HSMHV_MOD_PSC2 3127 #define HSMHV_MOD_PSC3 3128 #define HSMHV_MOD_PPGD1 3187 #define HSMHV_MOD_PPGD3 3189 #define HSMHV_MOD_PNDEP 3129 #define HSMHV_MOD_PNINV 3130 #define HSMHV_MOD_PMUECB0 3131 #define HSMHV_MOD_PMUECB1 3132 #define HSMHV_MOD_PMUEPH1 3133 #define HSMHV_MOD_PVTMP 3141 #define HSMHV_MOD_PWVTH0 3142 #define HSMHV_MOD_PMUESR1 3143 #define HSMHV_MOD_PMUETMP 3195 #define HSMHV_MOD_PSUB1 3151 #define HSMHV_MOD_PSUB2 3152 #define HSMHV_MOD_PSVDS 3286 #define HSMHV_MOD_PSVBS 3284 #define HSMHV_MOD_PSVGS 3283 #define HSMHV_MOD_PFN1 3294 #define HSMHV_MOD_PFN2 3295 #define HSMHV_MOD_PFN3 3296 #define HSMHV_MOD_PFVBS 3297 #define HSMHV_MOD_PNSTI 3225 #define HSMHV_MOD_PWSTI 3226 #define HSMHV_MOD_PSCSTI1 3229 #define HSMHV_MOD_PSCSTI2 3230 #define HSMHV_MOD_PVTHSTI 3232 #define HSMHV_MOD_PMUESTI1 3235 #define HSMHV_MOD_PMUESTI2 3236 #define HSMHV_MOD_PMUESTI3 3237 #define HSMHV_MOD_PNSUBPSTI1 3238 #define HSMHV_MOD_PNSUBPSTI2 3239 #define HSMHV_MOD_PNSUBPSTI3 3240 #define HSMHV_MOD_PCGSO 3154 #define HSMHV_MOD_PCGDO 3155 #define HSMHV_MOD_PJS0 3157 #define HSMHV_MOD_PJS0SW 3158 #define HSMHV_MOD_PNJ 3159 #define HSMHV_MOD_PCISBK 3172 #define HSMHV_MOD_PCLM1 3191 #define HSMHV_MOD_PCLM2 3192 #define HSMHV_MOD_PCLM3 3193 #define HSMHV_MOD_PWFC 3201 #define HSMHV_MOD_PGIDL1 3205 #define HSMHV_MOD_PGIDL2 3206 #define HSMHV_MOD_PGLEAK1 3208 #define HSMHV_MOD_PGLEAK2 3209 #define HSMHV_MOD_PGLEAK3 3210 #define HSMHV_MOD_PGLEAK6 3213 #define HSMHV_MOD_PGLKSD1 3215 #define HSMHV_MOD_PGLKSD2 3216 #define HSMHV_MOD_PGLKB1 3218 #define HSMHV_MOD_PGLKB2 3219 #define HSMHV_MOD_PNFTRP 3258 #define HSMHV_MOD_PNFALP 3259 #define HSMHV_MOD_PPTHROU 3253 #define HSMHV_MOD_PVDIFFJ 3254 #define HSMHV_MOD_PIBPC1 3404 #define HSMHV_MOD_PIBPC2 3405 #define HSMHV_MOD_PCGBO 3156 #define HSMHV_MOD_PCVDSOVER 3480 #define HSMHV_MOD_PFALPH 3263 #define HSMHV_MOD_PNPEXT 3242 #define HSMHV_MOD_PPOWRAT 3463 #define HSMHV_MOD_PRD 3399 #define HSMHV_MOD_PRD22 3442 #define HSMHV_MOD_PRD23 3443 #define HSMHV_MOD_PRD24 3444 #define HSMHV_MOD_PRDICT1 3316 #define HSMHV_MOD_PRDOV13 3476 #define HSMHV_MOD_PRDSLP1 3315 #define HSMHV_MOD_PRDVB 3301 #define HSMHV_MOD_PRDVD 3510 #define HSMHV_MOD_PRDVG11 3424 #define HSMHV_MOD_PRS 3398 #define HSMHV_MOD_PRTH0 3432 #define HSMHV_MOD_PVOVER 3199 /* device requests */ #define HSMHV_DNODE 341 #define HSMHV_GNODE 342 #define HSMHV_SNODE 343 #define HSMHV_BNODE 344 /* #define HSMHV_TEMPNODE 345 not used */ #define HSMHV_DNODEPRIME 346 #define HSMHV_SNODEPRIME 347 /* #define HSMHV_BNODEPRIME 395 not used */ /* #define HSMHV_DBNODE 396 not used */ /* #define HSMHV_SBNODE 397 not used */ /* #define HSMHV_VBD 347 */ #define HSMHV_VBD 466 #define HSMHV_VBS 348 #define HSMHV_VGS 349 #define HSMHV_VDS 350 #define HSMHV_CD 351 #define HSMHV_CBS 352 #define HSMHV_CBD 353 #define HSMHV_GM 354 #define HSMHV_GDS 355 #define HSMHV_GMBS 356 #define HSMHV_GMT 465 /* #define HSMHV_ISUBT 466 */ #define HSMHV_GBD 357 #define HSMHV_GBS 358 #define HSMHV_QB 359 #define HSMHV_CQB 360 /* #define HSMHV_QTH 467 not used */ /* #define HSMHV_CQTH 468 not used */ /* #define HSMHV_CTH 469 not used */ #define HSMHV_QG 361 #define HSMHV_CQG 362 #define HSMHV_QD 363 #define HSMHV_CQD 364 #define HSMHV_CGG 365 #define HSMHV_CGD 366 #define HSMHV_CGS 367 #define HSMHV_CBG 368 #define HSMHV_CAPBD 369 /* #define HSMHV_CQBD 370 not used */ #define HSMHV_CAPBS 371 /* #define HSMHV_CQBS 372 not used */ #define HSMHV_CDG 373 #define HSMHV_CDD 374 #define HSMHV_CDS 375 #define HSMHV_VON 376 #define HSMHV_VDSAT 377 #define HSMHV_QBS 378 #define HSMHV_QBD 379 #define HSMHV_SOURCECONDUCT 380 #define HSMHV_DRAINCONDUCT 381 #define HSMHV_CBDB 382 #define HSMHV_CBSB 383 #define HSMHV_MOD_RBPB 389 #define HSMHV_MOD_RBPD 390 #define HSMHV_MOD_RBPS 391 #define HSMHV_MOD_RBDB 392 #define HSMHV_MOD_RBSB 393 #define HSMHV_MOD_GBMIN 394 #define HSMHV_ISUB 410 #define HSMHV_IGIDL 411 #define HSMHV_IGISL 412 #define HSMHV_IGD 413 #define HSMHV_IGS 414 #define HSMHV_IGB 415 #define HSMHV_CGSO 416 #define HSMHV_CGBO 417 #define HSMHV_CGDO 418 #define HSMHV_MOD_TCJBD 92 #define HSMHV_MOD_TCJBS 93 #define HSMHV_MOD_TCJBDSW 94 #define HSMHV_MOD_TCJBSSW 95 #define HSMHV_MOD_TCJBDSWG 96 #define HSMHV_MOD_TCJBSSWG 97 #define HSMHV_MOD_VGS_MAX 4001 #define HSMHV_MOD_VGD_MAX 4002 #define HSMHV_MOD_VGB_MAX 4003 #define HSMHV_MOD_VDS_MAX 4004 #define HSMHV_MOD_VBS_MAX 4005 #define HSMHV_MOD_VBD_MAX 4006 #include "hsmhvext.h" /* Prototype has to be adapted! #ifdef __STDC__ extern void HSMHVevaluate(double,double,double,HSMHVinstance*,HSMHVmodel*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); #else extern void HSMHVevaluate(); #endif */ #endif /*HSMHV*/ ngspice-26/src/spicelib/devices/hisimhv1/hsmhvask.c0000644000265600020320000003342312264261473021761 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvask.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { HSMHVinstance *here = (HSMHVinstance*)inst; int flg_nqs ; double cggb_nqs, cgdb_nqs, cgsb_nqs, cdgb_nqs, cddb_nqs, cdsb_nqs, cbgb_nqs, cbdb_nqs, cbsb_nqs ; double Qi_nqs, dQi_nqs_dVds, dQi_nqs_dVgs, dQi_nqs_dVbs, dQb_nqs_dVds, dQb_nqs_dVgs, dQb_nqs_dVbs ; double Qdrat, dQdrat_dVds, dQdrat_dVgs, dQdrat_dVbs, dQi_dVds, dQi_dVgs, dQi_dVbs, dQbulk_dVds, dQbulk_dVgs, dQbulk_dVbs ; double dQd_nqs_dVds, dQd_nqs_dVgs, dQd_nqs_dVbs, dQd_nqs_dQi_nqs ; double dQg_nqs_dQi_nqs, dQg_nqs_dQb_nqs ; NG_IGNORE(select); here->HSMHV_csdo = - (here->HSMHV_cddo + here->HSMHV_cgdo + here->HSMHV_cbdo) ; here->HSMHV_csgo = - (here->HSMHV_cdgo + here->HSMHV_cggo + here->HSMHV_cbgo) ; here->HSMHV_csbo = - (here->HSMHV_cdbo + here->HSMHV_cgbo + here->HSMHV_cbbo) ; here->HSMHV_cdso = - (here->HSMHV_cddo + here->HSMHV_cdgo + here->HSMHV_cdbo) ; here->HSMHV_cgso = - (here->HSMHV_cgdo + here->HSMHV_cggo + here->HSMHV_cgbo) ; here->HSMHV_csso = - (here->HSMHV_csdo + here->HSMHV_csgo + here->HSMHV_csbo) ; /* NQS? */ if (here->HSMHVQIqiPtr == (double *)NULL) { flg_nqs = 0 ; } else { flg_nqs = 1 ; } /* printf("HSMHVask: flg_nqs = %d\n", flg_nqs) ; */ if (flg_nqs) { /* collect data for NQS case (DC operating point only!) */ Qi_nqs = *(ckt->CKTstate0 + here->HSMHVqi_nqs) ; if ( here->HSMHV_mode > 0 ) { /* forward mode */ Qdrat = here->HSMHV_Xd ; dQdrat_dVds = here->HSMHV_Xd_dVdsi ; dQdrat_dVgs = here->HSMHV_Xd_dVgsi ; dQdrat_dVbs = here->HSMHV_Xd_dVbsi ; dQi_dVds = here->HSMHV_Qi_dVdsi ; dQi_dVgs = here->HSMHV_Qi_dVgsi ; dQi_dVbs = here->HSMHV_Qi_dVbsi ; dQbulk_dVds = here->HSMHV_Qbulk_dVdsi ; dQbulk_dVgs = here->HSMHV_Qbulk_dVgsi ; dQbulk_dVbs = here->HSMHV_Qbulk_dVbsi ; } else { /* reverse mode */ Qdrat = 1.0 - here->HSMHV_Xd ; dQdrat_dVds = +(here->HSMHV_Xd_dVdsi + here->HSMHV_Xd_dVgsi + here->HSMHV_Xd_dVbsi) ; dQdrat_dVgs = - here->HSMHV_Xd_dVgsi ; dQdrat_dVbs = - here->HSMHV_Xd_dVbsi ; dQi_dVds = -(here->HSMHV_Qi_dVdsi + here->HSMHV_Qi_dVgsi + here->HSMHV_Qi_dVbsi) ; dQi_dVgs = here->HSMHV_Qi_dVgsi ; dQi_dVbs = here->HSMHV_Qi_dVbsi ; dQbulk_dVds = -(here->HSMHV_Qbulk_dVdsi + here->HSMHV_Qbulk_dVgsi + here->HSMHV_Qbulk_dVbsi) ; dQbulk_dVgs = here->HSMHV_Qbulk_dVgsi ; dQbulk_dVbs = here->HSMHV_Qbulk_dVbsi ; } /* from Qg_nqs = - Qi_nqs - Qb_nqs: */ dQg_nqs_dQi_nqs = - 1.0 ; dQg_nqs_dQb_nqs = - 1.0 ; /* from Qd_nqs = Qi_nqs * Qdrat: */ dQd_nqs_dVds = Qi_nqs * dQdrat_dVds ; dQd_nqs_dVgs = Qi_nqs * dQdrat_dVgs ; dQd_nqs_dVbs = Qi_nqs * dQdrat_dVbs ; dQd_nqs_dQi_nqs = Qdrat ; /* by implicit differentiation of the NQS equations (DC operating point only!): */ dQi_nqs_dVds = dQi_dVds ; dQi_nqs_dVgs = dQi_dVgs ; dQi_nqs_dVbs = dQi_dVbs ; dQb_nqs_dVds = dQbulk_dVds ; dQb_nqs_dVgs = dQbulk_dVgs ; dQb_nqs_dVbs = dQbulk_dVbs ; cggb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVgs + dQg_nqs_dQb_nqs * dQb_nqs_dVgs ; cgdb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVds + dQg_nqs_dQb_nqs * dQb_nqs_dVds ; cgsb_nqs = - dQg_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) - dQg_nqs_dQb_nqs * (dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ; cdgb_nqs = dQd_nqs_dVgs + dQd_nqs_dQi_nqs * dQi_nqs_dVgs ; cddb_nqs = dQd_nqs_dVds + dQd_nqs_dQi_nqs * dQi_nqs_dVds ; cdsb_nqs = -(dQd_nqs_dVds + dQd_nqs_dVgs + dQd_nqs_dVbs) - dQd_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) ; cbgb_nqs = dQb_nqs_dVgs ; cbdb_nqs = dQb_nqs_dVds ; cbsb_nqs = -(dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ; } else { /* QS case */ cggb_nqs = cgdb_nqs = cgsb_nqs = cdgb_nqs = cddb_nqs = cdsb_nqs = cbgb_nqs = cbdb_nqs = cbsb_nqs = 0.0 ; } switch (which) { case HSMHV_COSELFHEAT: value->iValue = here->HSMHV_coselfheat; return(OK); case HSMHV_COSUBNODE: value->iValue = here->HSMHV_cosubnode; return(OK); case HSMHV_L: value->rValue = here->HSMHV_l; return(OK); case HSMHV_W: value->rValue = here->HSMHV_w; return(OK); case HSMHV_AS: value->rValue = here->HSMHV_as; return(OK); case HSMHV_AD: value->rValue = here->HSMHV_ad; return(OK); case HSMHV_PS: value->rValue = here->HSMHV_ps; return(OK); case HSMHV_PD: value->rValue = here->HSMHV_pd; return(OK); case HSMHV_NRS: value->rValue = here->HSMHV_nrs; return(OK); case HSMHV_NRD: value->rValue = here->HSMHV_nrd; return(OK); case HSMHV_DTEMP: value->rValue = here->HSMHV_dtemp; return(OK); case HSMHV_OFF: value->iValue = here->HSMHV_off; return(OK); case HSMHV_IC_VBS: value->rValue = here->HSMHV_icVBS; return(OK); case HSMHV_IC_VDS: value->rValue = here->HSMHV_icVDS; return(OK); case HSMHV_IC_VGS: value->rValue = here->HSMHV_icVGS; return(OK); case HSMHV_DNODE: value->iValue = here->HSMHVdNode; return(OK); case HSMHV_GNODE: value->iValue = here->HSMHVgNode; return(OK); case HSMHV_SNODE: value->iValue = here->HSMHVsNode; return(OK); case HSMHV_BNODE: value->iValue = here->HSMHVbNode; return(OK); case HSMHV_DNODEPRIME: value->iValue = here->HSMHVdNodePrime; return(OK); case HSMHV_SNODEPRIME: value->iValue = here->HSMHVsNodePrime; return(OK); case HSMHV_SOURCECONDUCT: value->rValue = here->HSMHVsourceConductance; return(OK); case HSMHV_DRAINCONDUCT: value->rValue = here->HSMHVdrainConductance; return(OK); case HSMHV_VBD: value->rValue = *(ckt->CKTstate0 + here->HSMHVvbd); return(OK); case HSMHV_VBS: value->rValue = *(ckt->CKTstate0 + here->HSMHVvbs); return(OK); case HSMHV_VGS: value->rValue = *(ckt->CKTstate0 + here->HSMHVvgs); return(OK); case HSMHV_VDS: value->rValue = *(ckt->CKTstate0 + here->HSMHVvds); return(OK); case HSMHV_CD: value->rValue = here->HSMHV_ids; return(OK); case HSMHV_ISUB: value->rValue = here->HSMHV_isub; return(OK); case HSMHV_IGIDL: value->rValue = here->HSMHV_igidl; return(OK); case HSMHV_IGISL: value->rValue = here->HSMHV_igisl; return(OK); case HSMHV_IGD: value->rValue = here->HSMHV_igd; return(OK); case HSMHV_IGS: value->rValue = here->HSMHV_igs; return(OK); case HSMHV_IGB: value->rValue = here->HSMHV_igb; return(OK); case HSMHV_CBS: value->rValue = here->HSMHV_ibs; return(OK); case HSMHV_CBD: value->rValue = here->HSMHV_ibd; return(OK); case HSMHV_GM: value->rValue = here->HSMHV_dIds_dVgsi; return(OK); case HSMHV_GMT: value->rValue = here->HSMHV_dIds_dTi; return(OK); case HSMHV_GDS: value->rValue = here->HSMHV_dIds_dVdsi; return(OK); case HSMHV_GMBS: value->rValue = here->HSMHV_dIds_dVbsi; return(OK); case HSMHV_GBD: value->rValue = here->HSMHV_gbd; return(OK); case HSMHV_GBS: value->rValue = here->HSMHV_gbs; return(OK); case HSMHV_QB: value->rValue = *(ckt->CKTstate0 + here->HSMHVqb); return(OK); case HSMHV_CQB: value->rValue = *(ckt->CKTstate0 + here->HSMHVcqb); return(OK); case HSMHV_QG: value->rValue = *(ckt->CKTstate0 + here->HSMHVqg); return(OK); case HSMHV_CQG: value->rValue = *(ckt->CKTstate0 + here->HSMHVcqg); return(OK); case HSMHV_QD: value->rValue = *(ckt->CKTstate0 + here->HSMHVqd); return(OK); case HSMHV_CQD: value->rValue = *(ckt->CKTstate0 + here->HSMHVcqd); return(OK); case HSMHV_CGG: value->rValue = here->HSMHV_dQg_dVgsi - here->HSMHV_cggo; if (flg_nqs) value->rValue += cggb_nqs; return(OK); case HSMHV_CGD: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_dQg_dVdsi - here->HSMHV_cgdo : - (here->HSMHV_dQg_dVdsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQg_dVbsi) - here->HSMHV_cgso; if (flg_nqs) value->rValue += cgdb_nqs; return(OK); case HSMHV_CGS: value->rValue = (here->HSMHV_mode > 0) ? - (here->HSMHV_dQg_dVdsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQg_dVbsi) - here->HSMHV_cgso : here->HSMHV_dQg_dVdsi - here->HSMHV_cgdo; if (flg_nqs) value->rValue += cgsb_nqs; return(OK); case HSMHV_CDG: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_dQdi_dVgsi - here->HSMHV_cdgo : here->HSMHV_dQsi_dVgsi - here->HSMHV_csgo; if (flg_nqs) value->rValue += cdgb_nqs; return(OK); case HSMHV_CDD: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_dQdi_dVdsi - here->HSMHV_cddo : - (here->HSMHV_dQsi_dVdsi + here->HSMHV_dQsi_dVgsi + here->HSMHV_dQsi_dVbsi) - here->HSMHV_csso; if (flg_nqs) value->rValue += cddb_nqs; return(OK); case HSMHV_CDS: value->rValue = (here->HSMHV_mode > 0) ? - (here->HSMHV_dQdi_dVdsi + here->HSMHV_dQdi_dVgsi + here->HSMHV_dQdi_dVbsi) - here->HSMHV_cdso : here->HSMHV_dQsi_dVdsi - here->HSMHV_csdo; if (flg_nqs) value->rValue += cdsb_nqs; return(OK); case HSMHV_CBG: value->rValue = here->HSMHV_dQb_dVgsi - here->HSMHV_cbgo; if (flg_nqs) value->rValue += cbgb_nqs; return(OK); case HSMHV_CBDB: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_dQb_dVdsi - here->HSMHV_cbdo : - (here->HSMHV_dQb_dVdsi + here->HSMHV_dQb_dVgsi + here->HSMHV_dQb_dVbsi) + (here->HSMHV_cbdo+here->HSMHV_cbgo+here->HSMHV_cbbo); if (flg_nqs) value->rValue += cbdb_nqs; return(OK); case HSMHV_CBSB: value->rValue = (here->HSMHV_mode > 0) ? - (here->HSMHV_dQb_dVdsi + here->HSMHV_dQb_dVgsi + here->HSMHV_dQb_dVbsi) + (here->HSMHV_cbdo + here->HSMHV_cbgo + here->HSMHV_cbbo) : here->HSMHV_dQb_dVdsi - here->HSMHV_cbdo; if (flg_nqs) value->rValue += cbsb_nqs; return(OK); case HSMHV_CGDO: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_cgdo : here->HSMHV_cgso; return(OK); case HSMHV_CGSO: value->rValue = (here->HSMHV_mode > 0) ? here->HSMHV_cgso : here->HSMHV_cgdo; return(OK); case HSMHV_CGBO: value->rValue = here->HSMHV_cgbo; return(OK); case HSMHV_CAPBD: value->rValue = here->HSMHV_capbd; return(OK); case HSMHV_CAPBS: value->rValue = here->HSMHV_capbs; return(OK); case HSMHV_VON: value->rValue = here->HSMHV_von; return(OK); case HSMHV_VDSAT: value->rValue = here->HSMHV_vdsat; return(OK); case HSMHV_QBS: value->rValue = *(ckt->CKTstate0 + here->HSMHVqbs); return(OK); case HSMHV_QBD: value->rValue = *(ckt->CKTstate0 + here->HSMHVqbd); return(OK); case HSMHV_CORBNET: value->iValue = here->HSMHV_corbnet; return(OK); case HSMHV_RBPB: value->rValue = here->HSMHV_rbpb; return (OK); case HSMHV_RBPD: value->rValue = here->HSMHV_rbpd; return(OK); case HSMHV_RBPS: value->rValue = here->HSMHV_rbps; return(OK); case HSMHV_RBDB: value->rValue = here->HSMHV_rbdb; return(OK); case HSMHV_RBSB: value->rValue = here->HSMHV_rbsb; return(OK); case HSMHV_CORG: value->iValue = here->HSMHV_corg; return(OK); case HSMHV_NGCON: value->rValue = here->HSMHV_ngcon; return(OK); case HSMHV_XGW: value->rValue = here->HSMHV_xgw; return(OK); case HSMHV_XGL: value->rValue = here->HSMHV_xgl; return(OK); case HSMHV_NF: value->rValue = here->HSMHV_nf; return(OK); case HSMHV_SA: value->rValue = here->HSMHV_sa; return(OK); case HSMHV_SB: value->rValue = here->HSMHV_sb; return(OK); case HSMHV_SD: value->rValue = here->HSMHV_sd; return(OK); case HSMHV_NSUBCDFM: value->rValue = here->HSMHV_nsubcdfm; return(OK); case HSMHV_M: value->rValue = here->HSMHV_m; return(OK); case HSMHV_SUBLD1: value->rValue = here->HSMHV_subld1; return(OK); case HSMHV_SUBLD2: value->rValue = here->HSMHV_subld2; return(OK); case HSMHV_LOVER: value->rValue = here->HSMHV_lover; return(OK); case HSMHV_LOVERS: value->rValue = here->HSMHV_lovers; return(OK); case HSMHV_LOVERLD: value->rValue = here->HSMHV_loverld; return(OK); case HSMHV_LDRIFT1: value->rValue = here->HSMHV_ldrift1; return(OK); case HSMHV_LDRIFT2: value->rValue = here->HSMHV_ldrift2; return(OK); case HSMHV_LDRIFT1S: value->rValue = here->HSMHV_ldrift1s; return(OK); case HSMHV_LDRIFT2S: value->rValue = here->HSMHV_ldrift2s; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvpzld.c0000644000265600020320000004275412264261473022163 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvpzld.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "hsmhvdef.h" #include "ngspice/suffix.h" int HSMHVpzLoad( GENmodel *inModel, register CKTcircuit *ckt, register SPcomplex *s) { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; int flg_nqs =0 ; NG_IGNORE(ckt); #define dNode 0 #define dNodePrime 1 #define gNode 2 #define gNodePrime 3 #define sNode 4 #define sNodePrime 5 #define bNodePrime 6 #define bNode 7 #define dbNode 8 #define sbNode 9 #define tempNode 10 #define qiNode 11 #define qbNode 12 for ( ;model != NULL ;model = model->HSMHVnextModel ) { for ( here = model->HSMHVinstances ;here!= NULL ; here = here->HSMHVnextInstance ) { flg_nqs = model->HSMHV_conqs ; /* stamp matrix */ /*drain*/ *(here->HSMHVDdPtr) += here->HSMHV_ydc_d[dNode] + here->HSMHV_ydyn_d[dNode] * s->real; *(here->HSMHVDdPtr +1) += here->HSMHV_ydyn_d[dNode] * s->imag; *(here->HSMHVDdpPtr) += here->HSMHV_ydc_d[dNodePrime] + here->HSMHV_ydyn_d[dNodePrime] * s->real; *(here->HSMHVDdpPtr +1) += here->HSMHV_ydyn_d[dNodePrime] * s->imag; *(here->HSMHVDgpPtr) += here->HSMHV_ydc_d[gNodePrime] + here->HSMHV_ydyn_d[gNodePrime] * s->real; *(here->HSMHVDgpPtr +1) += here->HSMHV_ydyn_d[gNodePrime] * s->imag; *(here->HSMHVDsPtr) += here->HSMHV_ydc_d[sNode] + here->HSMHV_ydyn_d[sNode] * s->real; *(here->HSMHVDsPtr +1) += here->HSMHV_ydyn_d[sNode] * s->imag; *(here->HSMHVDbpPtr) += here->HSMHV_ydc_d[bNodePrime] + here->HSMHV_ydyn_d[bNodePrime] * s->real; *(here->HSMHVDbpPtr +1) += here->HSMHV_ydyn_d[bNodePrime] * s->imag; *(here->HSMHVDdbPtr) += here->HSMHV_ydc_d[dbNode] + here->HSMHV_ydyn_d[dbNode] * s->real; *(here->HSMHVDdbPtr +1) += here->HSMHV_ydyn_d[dbNode] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVDtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_d[tempNode] + here->HSMHV_ydyn_d[tempNode] * s->real); *(here->HSMHVDtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_d[tempNode] * s->imag; } /*drain prime*/ *(here->HSMHVDPdPtr) += here->HSMHV_ydc_dP[dNode] + here->HSMHV_ydyn_dP[dNode] * s->real; *(here->HSMHVDPdPtr +1) += here->HSMHV_ydyn_dP[dNode] * s->imag; *(here->HSMHVDPdpPtr) += here->HSMHV_ydc_dP[dNodePrime] + here->HSMHV_ydyn_dP[dNodePrime] * s->real; *(here->HSMHVDPdpPtr +1) += here->HSMHV_ydyn_dP[dNodePrime] * s->imag; *(here->HSMHVDPgpPtr) += here->HSMHV_ydc_dP[gNodePrime] + here->HSMHV_ydyn_dP[gNodePrime] * s->real; *(here->HSMHVDPgpPtr +1) += here->HSMHV_ydyn_dP[gNodePrime] * s->imag; *(here->HSMHVDPsPtr) += here->HSMHV_ydc_dP[sNode] + here->HSMHV_ydyn_dP[sNode] * s->real; *(here->HSMHVDPsPtr +1) += here->HSMHV_ydyn_dP[sNode] * s->imag; *(here->HSMHVDPspPtr) += here->HSMHV_ydc_dP[sNodePrime] + here->HSMHV_ydyn_dP[sNodePrime] * s->real; *(here->HSMHVDPspPtr +1) += here->HSMHV_ydyn_dP[sNodePrime] * s->imag; *(here->HSMHVDPbpPtr) += here->HSMHV_ydc_dP[bNodePrime] + here->HSMHV_ydyn_dP[bNodePrime] * s->real; *(here->HSMHVDPbpPtr +1) += here->HSMHV_ydyn_dP[bNodePrime] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVDPtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_dP[tempNode] + here->HSMHV_ydyn_dP[tempNode] * s->real); *(here->HSMHVDPtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_dP[tempNode] * s->imag; } if (flg_nqs) { *(here->HSMHVDPqiPtr) += model->HSMHV_type * (here->HSMHV_ydc_dP[qiNode] + here->HSMHV_ydyn_dP[qiNode] * s->real); *(here->HSMHVDPqiPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_dP[qiNode] * s->imag; } /*gate*/ *(here->HSMHVGgPtr) += here->HSMHV_ydc_g[gNode] + here->HSMHV_ydyn_g[gNode] * s->real; *(here->HSMHVGgPtr +1) += here->HSMHV_ydyn_g[gNode] * s->imag; *(here->HSMHVGgpPtr) += here->HSMHV_ydc_g[gNodePrime] + here->HSMHV_ydyn_g[gNodePrime] * s->real; *(here->HSMHVGgpPtr +1) += here->HSMHV_ydyn_g[gNodePrime] * s->imag; /*gate prime*/ *(here->HSMHVGPdPtr) += here->HSMHV_ydc_gP[dNode] + here->HSMHV_ydyn_gP[dNode] * s->real; *(here->HSMHVGPdPtr +1) += here->HSMHV_ydyn_gP[dNode] * s->imag; *(here->HSMHVGPdpPtr) += here->HSMHV_ydc_gP[dNodePrime] + here->HSMHV_ydyn_gP[dNodePrime] * s->real; *(here->HSMHVGPdpPtr +1) += here->HSMHV_ydyn_gP[dNodePrime] * s->imag; *(here->HSMHVGPgPtr) += here->HSMHV_ydc_gP[gNode] + here->HSMHV_ydyn_gP[gNode] * s->real; *(here->HSMHVGPgPtr +1) += here->HSMHV_ydyn_gP[gNode] * s->imag; *(here->HSMHVGPgpPtr) += here->HSMHV_ydc_gP[gNodePrime] + here->HSMHV_ydyn_gP[gNodePrime] * s->real; *(here->HSMHVGPgpPtr +1) += here->HSMHV_ydyn_gP[gNodePrime] * s->imag; *(here->HSMHVGPsPtr) += here->HSMHV_ydc_gP[sNode] + here->HSMHV_ydyn_gP[sNode] * s->real; *(here->HSMHVGPsPtr +1) += here->HSMHV_ydyn_gP[sNode] * s->imag; *(here->HSMHVGPspPtr) += here->HSMHV_ydc_gP[sNodePrime] + here->HSMHV_ydyn_gP[sNodePrime] * s->real; *(here->HSMHVGPspPtr +1) += here->HSMHV_ydyn_gP[sNodePrime] * s->imag; *(here->HSMHVGPbpPtr) += here->HSMHV_ydc_gP[bNodePrime] + here->HSMHV_ydyn_gP[bNodePrime] * s->real; *(here->HSMHVGPbpPtr +1) += here->HSMHV_ydyn_gP[bNodePrime] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVGPtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_gP[tempNode] + here->HSMHV_ydyn_gP[tempNode] * s->real); *(here->HSMHVGPtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_gP[tempNode] * s->imag; } if (flg_nqs) { *(here->HSMHVGPqiPtr) += model->HSMHV_type * (here->HSMHV_ydc_gP[qiNode] + here->HSMHV_ydyn_gP[qiNode] * s->real); *(here->HSMHVGPqiPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_gP[qiNode] * s->imag; *(here->HSMHVGPqbPtr) += model->HSMHV_type * (here->HSMHV_ydc_gP[qbNode] + here->HSMHV_ydyn_gP[qbNode] * s->real); *(here->HSMHVGPqbPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_gP[qbNode] * s->imag; } /*source*/ *(here->HSMHVSdPtr) += here->HSMHV_ydc_s[dNode] + here->HSMHV_ydyn_s[dNode] * s->real; *(here->HSMHVSdPtr +1) += here->HSMHV_ydyn_s[dNode] * s->imag; *(here->HSMHVSgpPtr) += here->HSMHV_ydc_s[gNodePrime] + here->HSMHV_ydyn_s[gNodePrime] * s->real; *(here->HSMHVSgpPtr +1) += here->HSMHV_ydyn_s[gNodePrime] * s->imag; *(here->HSMHVSsPtr) += here->HSMHV_ydc_s[sNode] + here->HSMHV_ydyn_s[sNode] * s->real; *(here->HSMHVSsPtr +1) += here->HSMHV_ydyn_s[sNode] * s->imag; *(here->HSMHVSspPtr) += here->HSMHV_ydc_s[sNodePrime] + here->HSMHV_ydyn_s[sNodePrime] * s->real; *(here->HSMHVSspPtr +1) += here->HSMHV_ydyn_s[sNodePrime] * s->imag; *(here->HSMHVSbpPtr) += here->HSMHV_ydc_s[bNodePrime] + here->HSMHV_ydyn_s[bNodePrime] * s->real; *(here->HSMHVSbpPtr +1) += here->HSMHV_ydyn_s[bNodePrime] * s->imag; *(here->HSMHVSsbPtr) += here->HSMHV_ydc_s[sbNode] + here->HSMHV_ydyn_s[sbNode] * s->real; *(here->HSMHVSsbPtr +1) += here->HSMHV_ydyn_s[sbNode] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVStempPtr) += model->HSMHV_type * (here->HSMHV_ydc_s[tempNode] + here->HSMHV_ydyn_s[tempNode] * s->real); *(here->HSMHVStempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_s[tempNode] * s->imag; } /*source prime*/ *(here->HSMHVSPdPtr) += here->HSMHV_ydc_sP[dNode] + here->HSMHV_ydyn_sP[dNode] * s->real; *(here->HSMHVSPdPtr +1) += here->HSMHV_ydyn_sP[dNode] * s->imag; *(here->HSMHVSPdpPtr) += here->HSMHV_ydc_sP[dNodePrime] + here->HSMHV_ydyn_sP[dNodePrime] * s->real; *(here->HSMHVSPdpPtr +1) += here->HSMHV_ydyn_sP[dNodePrime] * s->imag; *(here->HSMHVSPgpPtr) += here->HSMHV_ydc_sP[gNodePrime] + here->HSMHV_ydyn_sP[gNodePrime] * s->real; *(here->HSMHVSPgpPtr +1) += here->HSMHV_ydyn_sP[gNodePrime] * s->imag; *(here->HSMHVSPsPtr) += here->HSMHV_ydc_sP[sNode] + here->HSMHV_ydyn_sP[sNode] * s->real; *(here->HSMHVSPsPtr +1) += here->HSMHV_ydyn_sP[sNode] * s->imag; *(here->HSMHVSPspPtr) += here->HSMHV_ydc_sP[sNodePrime] + here->HSMHV_ydyn_sP[sNodePrime] * s->real; *(here->HSMHVSPspPtr +1) += here->HSMHV_ydyn_sP[sNodePrime] * s->imag; *(here->HSMHVSPbpPtr) += here->HSMHV_ydc_sP[bNodePrime] + here->HSMHV_ydyn_sP[bNodePrime] * s->real; *(here->HSMHVSPbpPtr +1) += here->HSMHV_ydyn_sP[bNodePrime] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVSPtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_sP[tempNode] + here->HSMHV_ydyn_sP[tempNode] * s->real); *(here->HSMHVSPtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_sP[tempNode] * s->imag; } if (flg_nqs) { *(here->HSMHVSPqiPtr) += model->HSMHV_type * (here->HSMHV_ydc_sP[qiNode] + here->HSMHV_ydyn_sP[qiNode] * s->real); *(here->HSMHVSPqiPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_sP[qiNode] * s->imag; } /*bulk prime*/ *(here->HSMHVBPdpPtr) += here->HSMHV_ydc_bP[dNodePrime] + here->HSMHV_ydyn_bP[dNodePrime] * s->real; *(here->HSMHVBPdpPtr +1) += here->HSMHV_ydyn_bP[dNodePrime] * s->imag; *(here->HSMHVBPgpPtr) += here->HSMHV_ydc_bP[gNodePrime] + here->HSMHV_ydyn_bP[gNodePrime] * s->real; *(here->HSMHVBPgpPtr +1) += here->HSMHV_ydyn_bP[gNodePrime] * s->imag; *(here->HSMHVBPspPtr) += here->HSMHV_ydc_bP[sNodePrime] + here->HSMHV_ydyn_bP[sNodePrime] * s->real; *(here->HSMHVBPspPtr +1) += here->HSMHV_ydyn_bP[sNodePrime] * s->imag; *(here->HSMHVBPbpPtr) += here->HSMHV_ydc_bP[bNodePrime] + here->HSMHV_ydyn_bP[bNodePrime] * s->real; *(here->HSMHVBPbpPtr +1) += here->HSMHV_ydyn_bP[bNodePrime] * s->imag; *(here->HSMHVBPbPtr) += here->HSMHV_ydc_bP[bNode] + here->HSMHV_ydyn_bP[bNode] * s->real; *(here->HSMHVBPbPtr +1) += here->HSMHV_ydyn_bP[bNode] * s->imag; *(here->HSMHVBPdbPtr) += here->HSMHV_ydc_bP[dbNode] + here->HSMHV_ydyn_bP[dbNode] * s->real; *(here->HSMHVBPdbPtr +1) += here->HSMHV_ydyn_bP[dbNode] * s->imag; *(here->HSMHVBPsbPtr) += here->HSMHV_ydc_bP[sbNode] + here->HSMHV_ydyn_bP[sbNode] * s->real; *(here->HSMHVBPsbPtr +1) += here->HSMHV_ydyn_bP[sbNode] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVBPtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_bP[tempNode] + here->HSMHV_ydyn_bP[tempNode] * s->real); *(here->HSMHVBPtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_bP[tempNode] * s->imag; } if (flg_nqs) { *(here->HSMHVBPqbPtr) += model->HSMHV_type * (here->HSMHV_ydc_bP[qbNode] + here->HSMHV_ydyn_bP[qbNode] * s->real); *(here->HSMHVBPqbPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_bP[qbNode] * s->imag; } /*bulk*/ *(here->HSMHVBbpPtr) += here->HSMHV_ydc_b[bNodePrime] + here->HSMHV_ydyn_b[bNodePrime] * s->real; *(here->HSMHVBbpPtr +1) += here->HSMHV_ydyn_b[bNodePrime] * s->imag; *(here->HSMHVBbPtr) += here->HSMHV_ydc_b[bNode] + here->HSMHV_ydyn_b[bNode] * s->real; *(here->HSMHVBbPtr +1) += here->HSMHV_ydyn_b[bNode] * s->imag; /*drain bulk*/ *(here->HSMHVDBdPtr) += here->HSMHV_ydc_db[dNode] + here->HSMHV_ydyn_db[dNode] * s->real; *(here->HSMHVDBdPtr +1) += here->HSMHV_ydyn_db[dNode] * s->imag; *(here->HSMHVDBbpPtr) += here->HSMHV_ydc_db[bNodePrime] + here->HSMHV_ydyn_db[bNodePrime] * s->real; *(here->HSMHVDBbpPtr +1) += here->HSMHV_ydyn_db[bNodePrime] * s->imag; *(here->HSMHVDBdbPtr) += here->HSMHV_ydc_db[dbNode] + here->HSMHV_ydyn_db[dbNode] * s->real; *(here->HSMHVDBdbPtr +1) += here->HSMHV_ydyn_db[dbNode] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVDBtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_db[tempNode] + here->HSMHV_ydyn_db[tempNode] * s->real); *(here->HSMHVDBtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_db[tempNode] * s->imag; } /*source bulk*/ *(here->HSMHVSBsPtr) += here->HSMHV_ydc_sb[sNode] + here->HSMHV_ydyn_sb[sNode] * s->real; *(here->HSMHVSBsPtr +1) += here->HSMHV_ydyn_sb[sNode] * s->imag; *(here->HSMHVSBbpPtr) += here->HSMHV_ydc_sb[bNodePrime] + here->HSMHV_ydyn_sb[bNodePrime] * s->real; *(here->HSMHVSBbpPtr +1) += here->HSMHV_ydyn_sb[bNodePrime] * s->imag; *(here->HSMHVSBsbPtr) += here->HSMHV_ydc_sb[sbNode] + here->HSMHV_ydyn_sb[sbNode] * s->real; *(here->HSMHVSBsbPtr +1) += here->HSMHV_ydyn_sb[sbNode] * s->imag; if( here->HSMHVtempNode > 0) { *(here->HSMHVSBtempPtr) += model->HSMHV_type * (here->HSMHV_ydc_sb[tempNode] + here->HSMHV_ydyn_sb[tempNode] * s->real); *(here->HSMHVSBtempPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_sb[tempNode] * s->imag; } /*temp*/ if( here->HSMHVtempNode > 0) { *(here->HSMHVTempdPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[dNode] + here->HSMHV_ydyn_t[dNode] * s->real); *(here->HSMHVTempdPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[dNode] * s->imag; *(here->HSMHVTempdpPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[dNodePrime] + here->HSMHV_ydyn_t[dNodePrime] * s->real); *(here->HSMHVTempdpPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[dNodePrime] * s->imag; *(here->HSMHVTempgpPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[gNodePrime] + here->HSMHV_ydyn_t[gNodePrime] * s->real); *(here->HSMHVTempgpPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[gNodePrime] * s->imag; *(here->HSMHVTempsPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[sNode] + here->HSMHV_ydyn_t[sNode] * s->real); *(here->HSMHVTempsPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[sNode] * s->imag; *(here->HSMHVTempspPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[sNodePrime] + here->HSMHV_ydyn_t[sNodePrime] * s->real); *(here->HSMHVTempspPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[sNodePrime] * s->imag; *(here->HSMHVTempbpPtr) += model->HSMHV_type * (here->HSMHV_ydc_t[bNodePrime] + here->HSMHV_ydyn_t[bNodePrime] * s->real); *(here->HSMHVTempbpPtr +1) += model->HSMHV_type * here->HSMHV_ydyn_t[bNodePrime] * s->imag; *(here->HSMHVTemptempPtr) += here->HSMHV_ydc_t[tempNode] + here->HSMHV_ydyn_t[tempNode] * s->real; *(here->HSMHVTemptempPtr +1) += here->HSMHV_ydyn_t[tempNode] * s->imag; } /* additional entries for flat nqs handling */ if ( flg_nqs ) { /*qi*/ *(here->HSMHVQIdpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qi[dNodePrime] + here->HSMHV_ydyn_qi[dNodePrime] * s->real); *(here->HSMHVQIdpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qi[dNodePrime] * s->imag; *(here->HSMHVQIgpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qi[gNodePrime] + here->HSMHV_ydyn_qi[gNodePrime] * s->real); *(here->HSMHVQIgpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qi[gNodePrime] * s->imag; *(here->HSMHVQIspPtr) += model->HSMHV_type * (here->HSMHV_ydc_qi[sNodePrime] + here->HSMHV_ydyn_qi[sNodePrime] * s->real); *(here->HSMHVQIspPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qi[sNodePrime] * s->imag; *(here->HSMHVQIbpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qi[bNodePrime] + here->HSMHV_ydyn_qi[bNodePrime] * s->real); *(here->HSMHVQIbpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qi[bNodePrime] * s->imag; *(here->HSMHVQIqiPtr) += here->HSMHV_ydc_qi[qiNode] + here->HSMHV_ydyn_qi[qiNode] * s->real; *(here->HSMHVQIqiPtr+1) += here->HSMHV_ydyn_qi[qiNode] * s->imag; if ( here->HSMHVtempNode > 0 ) { *(here->HSMHVQItempPtr) += here->HSMHV_ydc_qi[tempNode] + here->HSMHV_ydyn_qi[tempNode] * s->real; *(here->HSMHVQItempPtr+1) += here->HSMHV_ydyn_qi[tempNode] * s->imag; } /*qb*/ *(here->HSMHVQBdpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qb[dNodePrime] + here->HSMHV_ydyn_qb[dNodePrime] * s->real); *(here->HSMHVQBdpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qb[dNodePrime] * s->imag; *(here->HSMHVQBgpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qb[gNodePrime] + here->HSMHV_ydyn_qb[gNodePrime] * s->real); *(here->HSMHVQBgpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qb[gNodePrime] * s->imag; *(here->HSMHVQBspPtr) += model->HSMHV_type * (here->HSMHV_ydc_qb[sNodePrime] + here->HSMHV_ydyn_qb[sNodePrime] * s->real); *(here->HSMHVQBspPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qb[sNodePrime] * s->imag; *(here->HSMHVQBbpPtr) += model->HSMHV_type * (here->HSMHV_ydc_qb[bNodePrime] + here->HSMHV_ydyn_qb[bNodePrime] * s->real); *(here->HSMHVQBbpPtr+1) += model->HSMHV_type * here->HSMHV_ydyn_qb[bNodePrime] * s->imag; *(here->HSMHVQBqbPtr) += here->HSMHV_ydc_qb[qbNode] + here->HSMHV_ydyn_qb[qbNode] * s->real; *(here->HSMHVQBqbPtr+1) += here->HSMHV_ydyn_qb[qbNode] * s->imag; if ( here->HSMHVtempNode > 0 ) { *(here->HSMHVQBtempPtr) += here->HSMHV_ydc_qb[tempNode] + here->HSMHV_ydyn_qb[tempNode] * s->real; *(here->HSMHVQBtempPtr+1) += here->HSMHV_ydyn_qb[tempNode] * s->imag; } } } } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhveval.c0000644000265600020320000072255012264261473022140 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhveval.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ /********************************************************************** The following source code, and all copyrights, trade secrets or other intellectual property rights in and to the source code in its entirety, is owned by the Hiroshima University and the STARC organization. All users need to follow the "HISIM_HV Distribution Statement and Copyright Notice" attached to HiSIM_HV model. -----HISIM_HV Distribution Statement and Copyright Notice-------------- Hiroshima University and/or Semiconductor Technology Academic Research Center ("STARC") grants to Licensee a worldwide, royalty-free, sub-licensable, retroactive, perpetual, irrevocable license to make, have made, offer to sell, sell, import, export, use, copy, redistribute, perform, display and incorporate HiSIM_HV intellectual property (the "License") subject to the conditions set forth below. This License includes rights to use and modify copyrighted material for any purpose if the copyright is acknowledged as well as the use of related patents which STARC owns, has applied for or will apply for in connection with HiSIM_HV intellectual property for the purpose of implementing and using he HiSIM_HV intellectual property in connection with the standard. This license applies to all past and future versions of HiSIM_HV. 1. HiSIM_HV intellectual property is offered "as is" without any warranty, explicit or implied, or service support. Hiroshima University, STARC, its University staff and employees assume no liability for the quality and performance of HiSIM_HV intellectual property. 2. As the owner of the HiSIM_HV intellectual property, and all other related rights, Hiroshima University and/or STARC grant the License as set forth above. 3. A Licensee may not charge an end user a fee for the HiSIM_HV source code, which Hiroshima University and STARC own, by itself, however, a Licensee may charge an end user a fee for alterations or additions to the HiSIM_HV source code or for maintenance service. 4. A Licensee of HiSIM_HV intellectual property agrees that Hiroshima University and STARC are the developers of HiSIM_HV in all products containing HiSIM_HV and the alteration thereof (subject to Licensee's ownership of the alterations). If future versions of HiSIM_HV incorporate elements of other CMC models the copyrights of those elements remains with the original developers. For this purpose the copyright notice as shown below shall be used. "The HiSIM_HV source code, and all copyrights, trade secrets or other intellectual property rights in and to the source code, is owned by Hiroshima University and/or STARC." 5. A Licensee of HiSIM_HV intellectual property will comply with the export obligations pertaining to the export of the HiSIM_HV intellectual property. 6. By using HiSIM_HV intellectual property owned by Hiroshima University and/or STARC, Licensee agrees not to prosecute any patents or patent held by Licensee that are required for implementation of HiSIM_HV against any party who is infringing those patents solely by implementing and/or using the HiSIM_HV standard. Toshimasa Asahara, President, Hiroshima University Mitiko Miura-Mattausch, Professor, Hiroshima University Katsuhiro Shimohigashi, President&CEO, STARC June. 2008 (revised in June 2011) *************************************************************************/ /********************************************************************* * Memorandum on programming * * (1) Bias (x: b|d|g) * . vxs : Input arguments: Outer branch voltages. * . vxsi: Input arguments: Inner branch voltages. * . deltemp: Input argument: delta temperature. * . Vxse: Internal name for outer branch voltages. * . Vxs: Internal name for inner branch voltages. * . Vbscl:Inner bulk source voltage is clamped within a specified region. * . Y_dVxs denotes the partial derivative of Y w.r.t. Vxs. * . Y_dVxse denotes the partial derivative of Y w.r.t. Vxse. * . Y_dT denotes derivatives with respect to deltemp. * * (2) Device Mode * . Normal mode (Vds>=0 for nMOS) is assumed. * . The sign of Vdse is assumed to be changed simultaneously, if the sign of Vds is changed; * hence Vdse may become negative even thogh Vds >=0. * . In case of reverse mode, parent routines have to properly * transform or interchange inputs and outputs except ones * related to junction diodes, which are regarded as being * fixed to the nodal S/D. * * (3) Modification for symmetry at Vds=0 * . Vxsz: Modified bias. (x: b|d|g) * . Ps0z: Modified Ps0. * . The following variables are calculated as a function of * modified biases or potential. * Tox, Cox, (-- with quantum effect) * Vth*, dVth*, dPpg, Igate, Igidl, Igisl. * . The following variables are calculated using a transform * function. * Lred * * (4) Zones and Cases (terminology) * * Chi:=beta*(Ps0-Vbs)= 0 3 5 * * Zone: A | D1 | D2 | D3 * | * (accumulation)|(depletion) * | * Vgs = Vgs_fb Vth * / / * Case: Nonconductive / Conductive * / * VgVt:=Qn0/Cox= VgVt_small * * . Ids is regarded as zero in zone-A. * . Procedure to calculate Psl and dependent variables is * omitted in the nonconductive case. Ids and Qi are regarded * as zero in this case. * *********************************************************************/ /*===========================================================* * Preamble. *=================*/ /*---------------------------------------------------* * Header files. *-----------------*/ #include "ngspice/ngspice.h" #ifdef __STDC__ /* #include */ #endif /*-----------------------------------* * HiSIM macros *-----------------*/ #include "hisimhv.h" #include "hsmhvevalenv.h" #define C_IDD_MIN 1.0e-15 #define C_sub_delta 0.1 /* CHECK! */ #define C_sub_delta2 1.0e-9 /* CHECK! */ #define C_gidl_delta 0.5 /* local variables used in macro functions */ static double TMF0 , TMF1 , TMF2 , TMF3 , TMF4 , TMF5 , TMF6 ; /*===========================================================* * pow *=================*/ #ifdef POW_TO_EXP_AND_LOG #define Fn_Pow( x , y ) exp( y * log( x ) ) #else #define Fn_Pow( x , y ) pow( x , y ) #endif /*===========================================================* * Exp() for PGD. * - ExpLim(-3)=0 *=================*/ #define Fn_ExpLim( y , x , dx ) { \ if ( (x) < -3.0 ) { \ dx = 0.0 ; \ y = 0.0 ; \ } else if ( (x) < 0.0 ) { \ dx = 1.0 + (x) * ( 2 * (1.0/3.0) + (x) * 3 * (1.0/27.0) ) ; \ y = 1.0 + (x) * ( 1.0 + (x) * ( (1.0/3.0) + (x) * (1.0/27.0) ) ) ; \ } else { \ dx = 1.0 + (x) * ( 2 * (1.0/3.0) + (x) * ( 3 * 0.0402052934513951 \ + (x) * 4 * 0.148148111111111 ) ) ; \ y = 1.0 + (x) * ( 1.0 + (x) * ( (1.0/3.0) + (x) * ( 0.0402052934513951 \ + (x) * 0.148148111111111 ) ) ) ; \ } \ } /*===========================================================* * Macro Functions for ceiling/flooring/symmetrization. *=================*/ /*---------------------------------------------------* * smoothUpper: ceiling. * y = xmax - 0.5 ( arg + sqrt( arg^2 + 4 xmax delta ) ) * arg = xmax - x - delta *-----------------*/ #define Fn_SU( y , x , xmax , delta , dx ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } #define Fn_SU2( y , x , xmax , delta , dy_dx , dy_dxmax ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dy_dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ dy_dxmax = 0.5 * ( 1.0 - ( TMF1 + 2.0 * delta ) / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } /*---------------------------------------------------* * smoothLower: flooring. * y = xmin + 0.5 ( arg + sqrt( arg^2 + 4 xmin delta ) ) * arg = x - xmin - delta *-----------------*/ #define Fn_SL( y , x , xmin , delta , dx ) { \ TMF1 = ( x ) - ( xmin ) - ( delta ) ; \ TMF2 = 4.0 * ( xmin ) * ( delta ) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \ } #define Fn_SL2( y , x , xmin , delta , dy_dx, dy_dxmin ) { \ TMF1 = ( x ) - ( xmin ) - ( delta ) ; \ TMF2 = 4.0 * ( xmin ) * ( delta ) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dy_dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ dy_dxmin = 0.5 * ( 1.0 - ( TMF1 - 2.0 * delta ) / TMF2 ) ; \ y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \ } /*---------------------------------------------------* * smoothZero: flooring to zero. * y = 0.5 ( x + sqrt( x^2 + 4 delta^2 ) ) *-----------------*/ #define Fn_SZ( y , x , delta , dx ) { \ TMF2 = sqrt ( ( x ) * ( x ) + 4.0 * ( delta ) * ( delta) ) ; \ dx = 0.5 * ( 1.0 + ( x ) / TMF2 ) ; \ y = 0.5 * ( ( x ) + TMF2 ) ; \ } /*---------------------------------------------------* * CeilingPow: ceiling for positive x, flooring for negative x. * y = x * xmax / ( x^{2m} + xmax^{2m} )^{1/(2m)} * note: * - xmax has to be positive. * - -xmax < y < xmax. * - dy/dx|_{x=0} = 1. *-----------------*/ #define Fn_CP( y , x , xmax , pw , dx ) { \ double x2 = (x) * (x) ; \ double xmax2 = (xmax) * (xmax) ; \ double xp = 1.0 , xmp = 1.0 ; \ int m =0, mm =0; \ double arg =0.0, dnm =0.0; \ for ( m = 0 ; m < pw ; m ++ ) { xp *= x2 ; xmp *= xmax2 ; } \ arg = xp + xmp ; \ dnm = arg ; \ if ( pw == 1 || pw == 2 || pw == 4 || pw == 8 ) { \ if ( pw == 1 ) { mm = 1 ; \ } else if ( pw == 2 ) { mm = 2 ; \ } else if ( pw == 4 ) { mm = 3 ; \ } else if ( pw == 8 ) { mm = 4 ; } \ for ( m = 0 ; m < mm ; m ++ ) { dnm = sqrt( dnm ) ; } \ } else { dnm = Fn_Pow( dnm , 1.0 / ( 2.0 * pw ) ) ; } \ dnm = 1.0 / dnm ; \ y = (x) * (xmax) * dnm ; \ dx = (xmax) * xmp * dnm / arg ; \ } /*---------------------------------------------------* * Declining function using a polynomial. *-----------------*/ #define Fn_DclPoly4( y , x , dx ) { \ TMF2 = (x) * (x) ; \ TMF3 = TMF2 * (x) ; \ TMF4 = TMF2 * TMF2 ; \ y = 1.0 / ( 1.0 + (x) + TMF2 + TMF3 + TMF4 ) ; \ dx = - ( 1.0 + 2.0 * (x) + 3.0 * TMF2 + 4.0 * TMF3 ) * y * y ; \ } #define Fn_DclPoly6( y , x , dx ) { \ TMF2 = (x) * (x) ; \ TMF3 = TMF2 * (x) ; \ TMF4 = TMF2 * TMF2 ; \ TMF5 = TMF2 * TMF3 ; \ TMF6 = TMF3 * TMF3 ; \ y = 1.0 / ( 1.0 + (x) + TMF2 + TMF3 + TMF4 + TMF5 + TMF6 ) ; \ dx = - ( 1.0 + 2.0 * (x) + 3.0 * TMF2 + 4.0 * TMF3 \ + 5.0 * TMF4 + 6.0 * TMF5 ) * y * y ; \ } /*---------------------------------------------------* * "smoothUpper" using a polynomial *-----------------*/ #define Fn_SUPoly4( y , x , xmax , dx ) { \ TMF1 = (x) / xmax ; \ Fn_DclPoly4( y , TMF1 , dx ) ; \ y = xmax * ( 1.0 - y ) ; \ dx = - dx ; \ } #define Fn_SUPoly4m( y , x , xmax , dx , dxmax ) { \ TMF1 = (x) / xmax ; \ Fn_DclPoly4( TMF0 , TMF1 , dx ) ; \ y = xmax * ( 1.0 - TMF0 ) ; \ dxmax = 1.0 - TMF0 + TMF1 * dx ; \ dx = - dx ; \ } #define Fn_SUPoly6m( y , x , xmax , dx , dxmax ) { \ TMF1 = (x) / xmax ; \ Fn_DclPoly6( TMF0 , TMF1 , dx ) ; \ y = xmax * ( 1.0 - TMF0 ) ; \ dxmax = 1.0 - TMF0 + TMF1 * dx ; \ dx = - dx ; \ } /*---------------------------------------------------* * SymAdd: evaluate additional term for symmetry. *-----------------*/ #define Fn_SymAdd( y , x , add0 , dx ) \ { \ TMF1 = 2.0 * ( x ) / ( add0 ) ; \ TMF2 = 1.0 + TMF1 * ( (1.0/2) + TMF1 * ( (1.0/6) \ + TMF1 * ( (1.0/24) + TMF1 * ( (1.0/120) \ + TMF1 * ( (1.0/720) + TMF1 * (1.0/5040) ) ) ) ) ) ; \ TMF3 = (1.0/2) + TMF1 * ( (1.0/3) \ + TMF1 * ( (1.0/8) + TMF1 * ( (1.0/30) \ + TMF1 * ( (1.0/144) + TMF1 * (1.0/840) ) ) ) ) ; \ y = add0 / TMF2 ; \ dx = - 2.0 * TMF3 / ( TMF2 * TMF2 ) ; \ } /*===========================================================* * Function hsmhvevaluate. *=================*/ int HSMHVevaluate ( double Vdse, /* external branch voltage ( Vds >= 0 are assumed -> Vdse might be negative.) */ double Vgse, /* external branch voltage */ double Vbse, /* external branch voltage */ double Vds, /* inner branch voltage */ double Vgs, /* inner branch voltage */ double Vbs, /* inner branch voltage */ double vbs_jct, double vbd_jct, double Vsubs, /* substrate-source voltage */ double deltemp, HSMHVinstance *here, HSMHVmodel *model, CKTcircuit *ckt ) { HSMHVbinningParam *pParam = &here->pParam ; HSMHVmodelMKSParam *modelMKS = &model->modelMKS ; HSMHVhereMKSParam *hereMKS = &here->hereMKS ; /*-----------------------------------* * Constants for Smoothing functions *---------------*/ const double vth_dlt = 1.0e-3 ; /* const double cclmmdf = 1.0e-2 ;*/ const double cclmmdf = 1.0e-1 ; const double C_cm2m = 1.0e-2 ; const double qme_dlt = 1.0e-9 * C_cm2m ; const double rdsl2_dlt = 10.0e-3 * C_cm2m ; const double rdsu2_dlt = 50.0e-6 * C_cm2m ; const double rdsz_dlt = 0.1e-3 * C_cm2m ; const double qme2_dlt = 5.0e-2 ; const double eef_dlt = 1.0e-2 / C_cm2m ; const double sti2_dlt = 2.0e-3 ; const double pol_dlt = 5.0e-2 ; const double psia_dlt = 1.0e-3 ; const double psia2_dlt = 5.0e-3 ; const double psisti_dlt = 5.0e-3 ; /*---------------------------------------------------* * Local variables. *-----------------*/ /* Constants ----------------------- */ const int lp_s0_max = 20 ; const int lp_sl_max = 40 ; const double dP_max = 0.1e0 ; const double ps_conv = 1.0e-12 ; /* double ps_conv = 1.0e-13 ;*/ const double gs_conv = 1.0e-8 ; /** depletion **/ const double znbd3 = 3.0e0 ; const double znbd5 = 5.0e0 ; const double cn_nc3 = C_SQRT_2 / 108e0 ; /* 5-degree, contact:Chi=5 */ const double cn_nc51 = 0.707106781186548 ; /* sqrt(2)/2 */ const double cn_nc52 = -0.117851130197758 ; /* -sqrt(2)/12 */ const double cn_nc53 = 0.0178800506338833 ; /* (187 - 112*sqrt(2))/1600 */ const double cn_nc54 = -0.00163730162779191 ; /* (-131 + 88*sqrt(2))/4000 */ const double cn_nc55 = 6.36964918866352e-5 ; /* (1509-1040*sqrt(2))/600000 */ /** inversion **/ /* 3-degree polynomial approx for ( exp[Chi]-1 )^{1/2} */ const double cn_im53 = 2.9693154855770998e-1 ; const double cn_im54 = -7.0536542840097616e-2 ; const double cn_im55 = 6.1152888951331797e-3 ; /** initial guess **/ const double c_ps0ini_2 = 8.0e-4 ; const double c_pslini_1 = 0.3e0 ; const double c_pslini_2 = 3.0e-2 ; const double VgVt_small = 1.0e-12 ; /* const double Vbs_min = model->HSMHV_vbsmin ; */ /* const double Vds_max = 10.5e0 ; */ /* const double Vgs_max = 10.5e0 ; */ const double epsm10 = 10.0e0 * C_EPS_M ; const double small = 1.0e-50 ; const double small2= 1e-12 ; /* for Ra(Vdse) dependence */ const double c_exp_2 = 7.38905609893065 ; const double large_arg = 80 ; // log(1.0e100) ; double Vbs_max = 0.8e0, Vbs_max_dT =0.0 ; double Vbs_bnd = 0.4e0, Vbs_bnd_dT =0.0 ; /* start point of positive Vbs bending */ double Gdsmin = 0.0 ; double Gjmin = ckt->CKTgmin ; /* Internal flags --------------------*/ int flg_err = 0 ; /* error level */ int flg_rsrd = 0 ; /* Flag for handling Rs and Rd */ /* int flg_iprv = 0 ; */ /* Flag for initial guess of Ids -> not necessary any more */ int flg_pprv = 0 ; /* Flag for initial guesses of Ps0 and Pds */ int flg_noqi =0; /* Flag for the cases regarding Qi=Qd=0 */ /* int flg_vbsc = 0 ; */ /* Flag for Vbs confining -> not necessary any more */ int flg_info = 0 ; int flg_conv = 0 ; /* Flag for Poisson loop convergence */ int flg_qme = 0 ; /* Flag for QME */ int flg_nqs=0 ; /* Flag for NQS calculation */ /* Important Variables in HiSIM -------*/ /* confined bias */ double Vbscl=0.0, Vbscl_dVbs=0.0, Vbscl_dT=0.0, Vbscl_dVbs_dVbs = 0.0, Vbscl_dVbs_dT = 0.0 ; double Vgp =0.0, Vgp_dVbs =0.0, Vgp_dVds =0.0, Vgp_dVgs =0.0, Vgp_dT =0.0 ; double Vgs_fb =0.0 ; /* Ps0 : surface potential at the source side */ double Ps0 =0.0, Ps0_dVbs =0.0, Ps0_dVds =0.0, Ps0_dVgs =0.0, Ps0_dT =0.0 ; double Ps0_ini =0.0 ; double Ps0_iniA =0.0, Ps0_iniA_dVxb =0.0, Ps0_iniA_dVgb =0.0, Ps0_iniA_dT =0.0 ; double Ps0_iniB =0.0, Ps0_iniB_dVxb =0.0, Ps0_iniB_dVgb =0.0, Ps0_iniB_dT =0.0 ; /* Psl : surface potential at the drain side */ double Psl =0.0, Psl_dVbs =0.0, Psl_dVds =0.0, Psl_dVgs =0.0, Psl_dT =0.0 ; double Psl_lim =0.0, dPlim =0.0 ; /* Pds := Psl - Ps0 */ double Pds = 0.0, Pds_dVbs = 0.0, Pds_dVds = 0.0, Pds_dVgs =0.0, Pds_dT =0.0 ; double Pds_ini =0.0 ; double Pds_max =0.0 ; /* iteration numbers of Ps0 and Psl equations. */ int lp_s0 = 0 , lp_sl = 0 ; /* Xi0 := beta * ( Ps0 - Vbs ) - 1. */ double Xi0 =0.0, Xi0_dVbs =0.0, Xi0_dVds =0.0, Xi0_dVgs =0.0, Xi0_dT =0.0 ; double Xi0p12 =0.0, Xi0p12_dVbs =0.0, Xi0p12_dVds =0.0, Xi0p12_dVgs =0.0, Xi0p12_dT =0.0 ; double Xi0p32 =0.0, Xi0p32_dVbs =0.0, Xi0p32_dVds =0.0, Xi0p32_dVgs =0.0, Xi0p32_dT =0.0 ; /* Xil := beta * ( Psl - Vbs ) - 1. */ double Xil =0.0, Xil_dVbs =0.0, Xil_dVds =0.0, Xil_dVgs =0.0, Xil_dT =0.0 ; double Xilp12 =0.0, Xilp12_dVbs =0.0, Xilp12_dVds =0.0, Xilp12_dVgs =0.0, Xilp12_dT =0.0 ; double Xilp32 =0.0, Xilp32_dVbs =0.0, Xilp32_dVds =0.0, Xilp32_dVgs =0.0, Xilp32_dT =0.0 ; /* modified bias and potential for sym.*/ double Vbsz =0.0, Vbsz_dVbs =0.0, Vbsz_dVds =0.0, Vbsz_dT =0.0 ; double Vdsz =0.0, Vdsz_dVbs =0.0, Vdsz_dVds =0.0, Vdsz_dT =0.0 ; double Vgsz =0.0, Vgsz_dVbs =0.0, Vgsz_dVds =0.0, Vgsz_dVgs =0.0, Vgsz_dT =0.0 ; double Vzadd =0.0, Vzadd_dVbs =0.0, Vzadd_dVds = 0.0, Vzadd_dT = 0.0 ; double Ps0z =0.0, Ps0z_dVbs =0.0, Ps0z_dVds =0.0, Ps0z_dVgs =0.0, Ps0z_dT =0.0 ; double Pzadd =0.0, Pzadd_dVbs =0.0, Pzadd_dVds =0.0, Pzadd_dVgs =0.0, Pzadd_dT =0.0 ; /* IBPC */ double dVbsIBPC =0.0, dVbsIBPC_dVbs =0.0, dVbsIBPC_dVds =0.0, dVbsIBPC_dVgs =0.0, dVbsIBPC_dT =0.0 ; double dG3 =0.0, dG3_dVbs =0.0, dG3_dVds =0.0, dG3_dVgs =0.0, dG3_dT =0.0 ; double dG4 =0.0, dG4_dVbs =0.0, dG4_dVds =0.0, dG4_dVgs =0.0, dG4_dT =0.0 ; double dIdd =0.0, dIdd_dVbs =0.0, dIdd_dVds =0.0, dIdd_dVgs =0.0, dIdd_dT =0.0 ; double betaWL =0.0, betaWL_dVbs =0.0, betaWL_dVds =0.0, betaWL_dVgs =0.0, betaWL_dT =0.0 ; /* Chi := beta * ( Ps{0/l} - Vbs ) */ double Chi =0.0, Chi_dVbs =0.0, Chi_dVds =0.0, Chi_dVgs =0.0, Chi_dT =0.0 ; /* Rho := beta * ( Psl - Vds ) */ double Rho =0.0, Rho_dT =0.0 ; /* threshold voltage */ double Vth =0.0 ; double Vth0 =0.0, Vth0_dVb =0.0, Vth0_dVd =0.0, Vth0_dVg =0.0, Vth0_dT =0.0 ; /* variation of threshold voltage */ double dVth =0.0, dVth_dVb =0.0, dVth_dVd =0.0, dVth_dVg =0.0, dVth_dT = 0.0 ; double dVth0 =0.0 ; double dVth0_dVb =0.0, dVth0_dVd =0.0, dVth0_dVg =0.0, dVth0_dT =0.0 ; double dVthSC =0.0 ; double dVthSC_dVb =0.0, dVthSC_dVd =0.0, dVthSC_dVg =0.0, dVthSC_dT =0.0 ; double delta0 = 5.0e-3 ; double Psi_a =0.0, Psi_a_dVg =0.0, Psi_a_dVb =0.0, Psi_a_dVd =0.0, Psi_a_dT =0.0 ; double Pb20a =0.0, Pb20a_dVg =0.0, Pb20a_dVb =0.0, Pb20a_dVd =0.0, Pb20a_dT =0.0 ; double Pb20b =0.0, Pb20b_dVg =0.0, Pb20b_dVb =0.0, Pb20b_dVd =0.0, Pb20b_dT =0.0 ; double dVthW =0.0, dVthW_dVb =0.0, dVthW_dVd =0.0, dVthW_dVg =0.0, dVthW_dT =0.0 ; /* Alpha and related parameters */ double Alpha =0.0, Alpha_dVbs =0.0, Alpha_dVds =0.0, Alpha_dVgs =0.0, Alpha_dT =0.0 ; double Achi =0.0, Achi_dVbs =0.0, Achi_dVds =0.0, Achi_dVgs =0.0, Achi_dT =0.0 ; double VgVt =0.0, VgVt_dVbs =0.0, VgVt_dVds =0.0, VgVt_dVgs =0.0, VgVt_dT =0.0 ; double Pslsat =0.0 ; double Vdsat =0.0 ; double VdsatS =0.0, VdsatS_dVbs =0.0, VdsatS_dVds =0.0, VdsatS_dVgs =0.0, VdsatS_dT =0.0 ; double Delta =0.0 ; /* Q_B and capacitances */ double Qb =0.0, Qb_dVbs =0.0, Qb_dVds =0.0, Qb_dVgs =0.0, Qb_dT=0.0 ; double Qbu =0.0, Qbu_dVbs =0.0, Qbu_dVds =0.0, Qbu_dVgs =0.0, Qbu_dT =0.0 ; /* Q_I and capacitances */ double Qi =0.0, Qi_dVbs =0.0, Qi_dVds =0.0, Qi_dVgs =0.0, Qi_dT=0.0 ; double Qiu =0.0, Qiu_dVbs =0.0, Qiu_dVds =0.0, Qiu_dVgs =0.0, Qiu_dT =0.0 ; /* Q_D and capacitances */ double Qd =0.0, Qd_dVbs =0.0, Qd_dVds =0.0, Qd_dVgs =0.0, Qd_dT =0.0 ; /* channel current */ double Ids =0.0, Ids_dVbs =0.0, Ids_dVds =0.0, Ids_dVgs =0.0, Ids_dT =0.0, Ids_dRa =0.0 ; double Ids0 =0.0, Ids0_dVbs =0.0, Ids0_dVds =0.0, Ids0_dVgs =0.0, Ids0_dT =0.0 ; /* STI */ double dVthSCSTI =0.0, dVthSCSTI_dVg =0.0, dVthSCSTI_dVd =0.0, dVthSCSTI_dVb =0.0, dVthSCSTI_dT =0.0 ; double Vgssti =0.0, Vgssti_dVbs =0.0, Vgssti_dVds =0.0, Vgssti_dVgs =0.0, Vgssti_dT =0.0 ; double costi0 =0.0 ; double costi1 =0.0, costi1_dT =0.0 ; double costi3 =0.0, costi3_dVb =0.0, costi3_dVd =0.0, costi3_dVg =0.0, costi3_dT =0.0 ; double costi3_dVb_c3 =0.0, costi3_dVd_c3 =0.0, costi3_dVg_c3 =0.0, costi3_dT_c3 =0.0 ; double costi4 =0.0, costi4_dT =0.0 ; double costi5 =0.0, costi5_dT =0.0 ; double costi6 =0.0, costi6_dT =0.0 ; double costi7 =0.0, costi7_dT =0.0 ; double Psasti =0.0, Psasti_dVbs =0.0, Psasti_dVds =0.0, Psasti_dVgs =0.0, Psasti_dT =0.0 ; double Psbsti =0.0, Psbsti_dVbs =0.0, Psbsti_dVds =0.0, Psbsti_dVgs =0.0, Psbsti_dT =0.0 ; double Psab =0.0, Psab_dVbs =0.0, Psab_dVds =0.0, Psab_dVgs =0.0, Psab_dT =0.0 ; double Psti =0.0, Psti_dVbs =0.0, Psti_dVds =0.0, Psti_dVgs =0.0, Psti_dT =0.0 ; double sq1sti =0.0, sq1sti_dVbs =0.0, sq1sti_dVds =0.0, sq1sti_dVgs =0.0, sq1sti_dT =0.0 ; double sq2sti =0.0, sq2sti_dVbs =0.0, sq2sti_dVds =0.0, sq2sti_dVgs =0.0, sq2sti_dT =0.0 ; double Qn0sti =0.0, Qn0sti_dVbs =0.0, Qn0sti_dVds =0.0, Qn0sti_dVgs =0.0, Qn0sti_dT =0.0 ; double Idssti =0.0, Idssti_dVbs =0.0, Idssti_dVds =0.0, Idssti_dVgs =0.0, Idssti_dT=0.0 ; /* constants */ double beta =0.0, beta_dT =0.0 ; double beta_inv =0.0, beta_inv_dT =0.0 ; double beta2 =0.0 ; double Pb2 =0.0, Pb2_dT =0.0 ; double Pb20 =0.0 ; double Pb2c =0.0 ; double Vfb =0.0 ; double c_eox =0.0 ; double Leff =0.0, Weff =0.0, WeffLD_nf =0.0, Ldrift =0.0 ; double Ldrift0 =0.0 ; double q_Nsub =0.0 ; /* PART-1 */ /* Accumulation zone */ double Psa =0.0 ; double Psa_dVbs =0.0, Psa_dVds =0.0, Psa_dVgs =0.0, Psa_dT =0.0 ; /* CLM*/ double Psdl =0.0, Psdl_dVbs =0.0, Psdl_dVds =0.0, Psdl_dVgs =0.0, Psdl_dT =0.0 ; double Lred =0.0, Lred_dVbs =0.0, Lred_dVds =0.0, Lred_dVgs =0.0, Lred_dT =0.0 ; double Lch =0.0, Lch_dVbs =0.0, Lch_dVds =0.0, Lch_dVgs =0.0, Lch_dT =0.0 ; double Wd =0.0, Wd_dVbs =0.0, Wd_dVds =0.0, Wd_dVgs =0.0, Wd_dT =0.0 ; double Aclm =0.0 ; /* Pocket Implant */ double Vthp=0.0, Vthp_dVb=0.0, Vthp_dVd=0.0, Vthp_dVg =0.0, Vthp_dT =0.0 ; double dVthLP=0.0, dVthLP_dVb=0.0, dVthLP_dVd=0.0, dVthLP_dVg =0.0, dVthLP_dT =0.0 ; double bs12=0.0, bs12_dVb=0.0, bs12_dVd =0.0, bs12_dVg =0.0, bs12_dT =0.0 ; double Qbmm=0.0, Qbmm_dVb=0.0, Qbmm_dVd =0.0, Qbmm_dVg =0.0, Qbmm_dT =0.0 ; double dqb=0.0, dqb_dVb=0.0, dqb_dVg=0.0, dqb_dVd =0.0, dqb_dT =0.0 ; double Vdx=0.0, Vdx_dVbs=0.0, Vdx_dT=0.0 ; double Vdx2=0.0, Vdx2_dVbs=0.0, Vdx2_dT=0.0 ; double Pbsum=0.0, Pbsum_dVb=0.0, Pbsum_dVd=0.0, Pbsum_dVg =0.0, Pbsum_dT =0.0 ; double sqrt_Pbsum =0.0 ; /* Poly-Depletion Effect */ const double pol_b = 1.0 ; double dPpg =0.0, dPpg_dVb =0.0, dPpg_dVd =0.0, dPpg_dVg =0.0, dPpg_dT = 0.0 ; /* Quantum Effect */ double Tox =0.0, Tox_dVb =0.0, Tox_dVd =0.0, Tox_dVg =0.0, Tox_dT =0.0 ; double dTox =0.0, dTox_dVb =0.0, dTox_dVd =0.0, dTox_dVg =0.0, dTox_dT =0.0 ; double Cox =0.0, Cox_dVb =0.0, Cox_dVd =0.0, Cox_dVg =0.0, Cox_dT =0.0 ; double Cox_inv =0.0, Cox_inv_dVb =0.0, Cox_inv_dVd =0.0, Cox_inv_dVg =0.0, Cox_inv_dT =0.0 ; double Tox0 =0.0, Cox0 =0.0, Cox0_inv =0.0 ; double Vthq=0.0, Vthq_dVb =0.0, Vthq_dVd =0.0 ; /* Igate , Igidl , Igisl */ const double igate_dlt = 1.0e-2 / C_cm2m ; const double gidlvds_dlt = 1.0e-5 ; const double gidla = 100.0 ; double Psdlz =0.0, Psdlz_dVbs =0.0, Psdlz_dVds =0.0, Psdlz_dVgs =0.0, Psdlz_dT =0.0 ; double Egp12 =0.0, Egp12_dT =0.0 ; double Egp32 =0.0, Egp32_dT =0.0 ; double E1 =0.0, E1_dVb =0.0, E1_dVd =0.0, E1_dVg =0.0, E1_dT =0.0 ; double Etun =0.0, Etun_dVbs =0.0, Etun_dVds =0.0, Etun_dVgs =0.0, Etun_dT =0.0 ; double Vdsp=0.0, Vdsp_dVd =0.0 ; double Egidl =0.0, Egidl_dVb =0.0, Egidl_dVd =0.0, Egidl_dVg =0.0, Egidl_dT =0.0 ; double Egisl =0.0, Egisl_dVb =0.0, Egisl_dVd =0.0, Egisl_dVg =0.0, Egisl_dT =0.0 ; double Igate =0.0, Igate_dVbs =0.0, Igate_dVds =0.0, Igate_dVgs =0.0, Igate_dT =0.0 ; double Igs =0.0, Igs_dVbs =0.0, Igs_dVds =0.0, Igs_dVgs =0.0, Igs_dT =0.0 ; double Igd =0.0, Igd_dVbs =0.0, Igd_dVds =0.0, Igd_dVgs =0.0, Igd_dT =0.0 ; double Igb =0.0, Igb_dVbs =0.0, Igb_dVds =0.0, Igb_dVgs =0.0, Igb_dT =0.0 ; double Igidl =0.0, Igidl_dVbs =0.0, Igidl_dVds =0.0, Igidl_dVgs =0.0, Igidl_dT =0.0 ; double Igisl =0.0, Igisl_dVbs =0.0, Igisl_dVds =0.0, Igisl_dVgs =0.0, Igisl_dT =0.0 ; double Vdb =0.0, Vsb =0.0 ; /* connecting function */ double FD2 =0.0, FD2_dVbs =0.0, FD2_dVds =0.0, FD2_dVgs =0.0, FD2_dT =0.0 ; double FMDVDS =0.0, FMDVDS_dVbs =0.0, FMDVDS_dVds =0.0, FMDVDS_dVgs =0.0, FMDVDS_dT =0.0 ; double FMDVGS =0.0, FMDVGS_dVgs =0.0 ; double FMDPG =0.0, FMDPG_dVbs =0.0, FMDPG_dVds =0.0, FMDPG_dVgs =0.0, FMDPG_dT =0.0 ; double cnst0 =0.0, cnst0_dT =0.0; double cnst1 =0.0, cnst1_dT =0.0; double cnstCoxi =0.0, cnstCoxi_dVb =0.0, cnstCoxi_dVd =0.0, cnstCoxi_dVg =0.0, cnstCoxi_dT =0.0 ; double fac1 =0.0, fac1_dVbs =0.0, fac1_dVds =0.0, fac1_dVgs =0.0, fac1_dT =0.0 ; double fac1p2 =0.0, fac1p2_dT =0.0 ; double fs01 =0.0, fs01_dVbs =0.0, fs01_dVds =0.0, fs01_dVgs =0.0, fs01_dT =0.0, fs01_dPs0 =0.0 ; double fs02 =0.0, fs02_dVbs =0.0, fs02_dVds =0.0, fs02_dVgs =0.0, fs02_dT =0.0, fs02_dPs0 =0.0 ; double fsl1 =0.0, fsl1_dVbs =0.0, fsl1_dVds =0.0, fsl1_dVgs =0.0, fsl1_dT =0.0, fsl1_dPsl =0.0 ; double fsl2 =0.0, fsl2_dVbs =0.0, fsl2_dVds =0.0, fsl2_dVgs =0.0, fsl2_dT =0.0, fsl2_dPsl =0.0 ; double cfs1 =0.0, cfs1_dT =0.0 ; double fb =0.0, fb_dChi =0.0 ; double fi =0.0, fi_dChi =0.0 ; double exp_Chi =0.0, exp_Chi_dT =0.0 ; double exp_Rho =0.0, exp_Rho_dT =0.0 ; double exp_bVbs =0.0, exp_bVbs_dT =0.0 ; double exp_bVbsVds =0.0, exp_bVbsVds_dT =0.0 ; double exp_bPs0 =0.0, exp_bPs0_dT =0.0 ; double Fs0 =0.0, Fs0_dPs0 =0.0 ; double Fsl =0.0, Fsl_dPsl =0.0 ; double dPs0 =0.0, dPsl =0.0 ; double Qn0 =0.0, Qn0_dVbs =0.0, Qn0_dVds =0.0, Qn0_dVgs =0.0, Qn0_dT =0.0 ; double Qb0 =0.0, Qb0_dVb =0.0, Qb0_dVd =0.0, Qb0_dVg =0.0, Qb0_dT =0.0 ; double Qbnm =0.0, Qbnm_dVbs =0.0, Qbnm_dVds =0.0, Qbnm_dVgs =0.0, Qbnm_dT =0.0 ; double DtPds =0.0, DtPds_dVbs =0.0, DtPds_dVds =0.0, DtPds_dVgs =0.0, DtPds_dT =0.0 ; double Qinm =0.0, Qinm_dVbs =0.0, Qinm_dVds =0.0, Qinm_dVgs =0.0, Qinm_dT =0.0 ; double Qidn =0.0, Qidn_dVbs =0.0, Qidn_dVds =0.0, Qidn_dVgs =0.0, Qidn_dT =0.0 ; double Qdnm =0.0, Qdnm_dVbs =0.0, Qdnm_dVds =0.0, Qdnm_dVgs =0.0, Qdnm_dT =0.0 ; double Qddn =0.0, Qddn_dVbs =0.0, Qddn_dVds =0.0, Qddn_dVgs =0.0, Qddn_dT =0.0 ; double Quot =0.0 ; double Qdrat =0.5, Qdrat_dVbs =0.0, Qdrat_dVds =0.0, Qdrat_dVgs =0.0, Qdrat_dT =0.0 ; double Idd =0.0, Idd_dVbs =0.0, Idd_dVds =0.0, Idd_dVgs =0.0, Idd_dT =0.0 ; double Fdd =0.0, Fdd_dVbs =0.0, Fdd_dVds =0.0, Fdd_dVgs =0.0, Fdd_dT =0.0 ; double Eeff =0.0, Eeff_dVbs =0.0, Eeff_dVds =0.0, Eeff_dVgs =0.0, Eeff_dT =0.0 ; double Rns =0.0, Rns_dT =0.0 ; double Mu = 0.0, Mu_dVbs =0.0, Mu_dVds =0.0, Mu_dVgs =0.0, Mu_dT =0.0 ; double Muun =0.0, Muun_dVbs =0.0, Muun_dVds =0.0, Muun_dVgs =0.0, Muun_dT =0.0 ; double Ey =0.0, Ey_dVbs =0.0, Ey_dVds =0.0, Ey_dVgs =0.0, Ey_dT =0.0 ; double Em =0.0, Em_dVbs =0.0, Em_dVds =0.0, Em_dVgs =0.0, Em_dT =0.0 ; double Vmax =0.0, Vmax_dT =0.0 ; double Eta =0.0, Eta_dVbs =0.0, Eta_dVds =0.0, Eta_dVgs =0.0, Eta_dT =0.0 ; double Eta1 =0.0, Eta1_dT =0.0 ; double Eta1p12 =0.0, Eta1p12_dT =0.0 ; double Eta1p32 =0.0, Eta1p32_dT =0.0 ; double Eta1p52 =0.0, Eta1p52_dT =0.0 ; double Zeta12 =0.0, Zeta12_dT =0.0 ; double Zeta32 =0.0, Zeta32_dT =0.0 ; double Zeta52 =0.0, Zeta52_dT =0.0 ; double F00 =0.0, F00_dVbs =0.0, F00_dVds =0.0, F00_dVgs =0.0, F00_dT =0.0 ; double F10 =0.0, F10_dVbs =0.0, F10_dVds =0.0, F10_dVgs =0.0, F10_dT =0.0 ; double F30 =0.0, F30_dVbs =0.0, F30_dVds =0.0, F30_dVgs =0.0, F30_dT =0.0 ; double F11 =0.0, F11_dVbs =0.0, F11_dVds =0.0, F11_dVgs =0.0, F11_dT =0.0 ; double Ps0_min =0.0, Ps0_min_dT =0.0 ; double Acn =0.0, Acn_dVbs =0.0, Acn_dVds =0.0, Acn_dVgs =0.0, Acn_dT =0.0 ; double Acd =0.0, Acd_dVbs =0.0, Acd_dVds =0.0, Acd_dVgs =0.0, Acd_dT =0.0 ; double Ac1 =0.0, Ac1_dVbs =0.0, Ac1_dVds =0.0, Ac1_dVgs =0.0, Ac1_dT =0.0 ; double Ac2 =0.0, Ac2_dVbs =0.0, Ac2_dVds =0.0, Ac2_dVgs =0.0, Ac2_dT =0.0 ; double Ac3 =0.0, Ac3_dVbs =0.0, Ac3_dVds =0.0, Ac3_dVgs =0.0, Ac3_dT =0.0 ; double Ac4 =0.0, Ac4_dVbs =0.0, Ac4_dVds =0.0, Ac4_dVgs =0.0, Ac4_dT =0.0 ; double Ac31 =0.0, Ac31_dVbs =0.0, Ac31_dVds =0.0, Ac31_dVgs =0.0, Ac31_dT =0.0 ; double Ac41 =0.0, Ac41_dT =0.0 ; double ninvd_dT =0.0 ; /* PART-2 (Isub) */ double Isub =0.0, Isub_dVbs =0.0, Isub_dVds =0.0, Isub_dVgs =0.0, Isub_dT=0.0 ; double Isub_dVdse = 0.0 ; double Psislsat =0.0, Psislsat_dVb =0.0, Psislsat_dVd =0.0, Psislsat_dVg =0.0, Psislsat_dT =0.0 ; double Psisubsat =0.0, Psisubsat_dVb =0.0, Psisubsat_dVd =0.0, Psisubsat_dVg =0.0, Psisubsat_dT =0.0 ; double Ifn =0.0, Ifn_dVb =0.0, Ifn_dVd=0.0, Ifn_dVg=0.0, Ifn_dT = 0.0 ; double Eg12=0.0, Eg32 =0.0 ; /* PART-3 (overlap) */ /* const double cov_dlt = 1.0e-1 ; */ /* const double covvgmax = 5.0 ; */ double cov_slp =0.0, cov_mag =0.0 ; double Qgos =0.0, Qgos_dVbs =0.0, Qgos_dVds =0.0, Qgos_dVgs =0.0, Qgos_dT =0.0 ; double Qgod =0.0, Qgod_dVbs =0.0, Qgod_dVds =0.0, Qgod_dVgs =0.0, Qgod_dT =0.0 ; double Qgbo =0.0, Qgbo_dVbs =0.0, Qgbo_dVds =0.0, Qgbo_dVgs =0.0, Qgbo_dT = 0.0 ; double Cgdo =0.0, Cgso =0.0, Cgbo_loc =0.0 ; double Qgso =0.0, Qgso_dVbse =0.0, Qgso_dVdse =0.0, Qgso_dVgse =0.0 ; double Qgdo =0.0, Qgdo_dVbse =0.0, Qgdo_dVdse =0.0, Qgdo_dVgse =0.0 ; /* fringe capacitance */ double Qfd =0.0, Cfd =0.0 ; double Qfs =0.0, Cfs =0.0 ; /* Cqy */ double Ec =0.0, Ec_dVbs =0.0, Ec_dVds =0.0, Ec_dVgs =0.0, Ec_dT =0.0 ; double Pslk =0.0, Pslk_dVbs =0.0, Pslk_dVds =0.0, Pslk_dVgs =0.0, Pslk_dT =0.0 ; double Qy =0.0, Qy_dVbs =0.0, Qy_dVds =0.0, Qy_dVgs =0.0, Qy_dT =0.0 ; /* PART-4 (junction diode) */ double Ibs =0.0, Gbs =0.0, Gbse =0.0, Ibs_dT =0.0 ; double Ibd =0.0, Gbd =0.0, Gbde =0.0, Ibd_dT =0.0 ; /* junction capacitance */ double Qbs =0.0, Capbs =0.0, Capbse =0.0, Qbs_dT =0.0 ; double Qbd =0.0, Capbd =0.0, Capbde =0.0, Qbd_dT =0.0 ; double czbd =0.0, czbd_dT=0.0 ; double czbdsw =0.0, czbdsw_dT=0.0 ; double czbdswg =0.0, czbdswg_dT=0.0 ; double czbs =0.0, czbs_dT=0.0 ; double czbssw =0.0, czbssw_dT=0.0 ; double czbsswg =0.0, czbsswg_dT=0.0 ; double arg =0.0, sarg =0.0 ; /* PART-5 (NQS) */ double tau =0.0, tau_dVbs=0.0, tau_dVds=0.0, tau_dVgs =0.0, tau_dT=0.0 ; double taub =0.0, taub_dVbs=0.0, taub_dVds=0.0, taub_dVgs =0.0, taub_dT =0.0 ; /* PART-6 (noise) */ /* 1/f */ double NFalp =0.0, NFtrp =0.0, Cit =0.0, Nflic =0.0 ; /* thermal */ double Eyd =0.0, Mu_Ave= 0.0, Nthrml =0.0, Mud_hoso =0.0 ; /* induced gate noise ( Part 0/3 ) */ double kusai00 =0.0, kusaidd =0.0, kusaiL =0.0, kusai00L =0.0 ; int flg_ign = 0 ; double sqrtkusaiL =0.0, kusai_ig =0.0, gds0_ign =0.0, gds0_h2 =0.0, GAMMA =0.0, crl_f =0.0 ; const double c_sqrt_15 =3.872983346207417e0 ; /* sqrt(15) */ const double Cox_small =1.0e-6 ; const double c_16o135 =1.185185185185185e-1 ; /* 16/135 */ double Nign0 =0.0, MuModA =0.0, MuModB =0.0, correct_w1 =0.0 ; /* usage of previously calculated values */ double vtol_pprv =1.01e-1 ; double Vbsc_dif =0.0, Vdsc_dif =0.0, Vgsc_dif =0.0, sum_vdif =0.0 ; double Vbsc_dif2 =0.0, Vdsc_dif2 =0.0, Vgsc_dif2 =0.0, sum_vdif2 =0.0 ; double dVbs =0.0, dVds =0.0, dVgs =0.0 ; /* temporary vars. & derivatives*/ double TX =0.0, TX_dVbs =0.0, TX_dVds =0.0, TX_dVgs =0.0, TX_dT =0.0 ; double TY =0.0, TY_dVbs =0.0, TY_dVds =0.0, TY_dVgs =0.0, TY_dT =0.0 ; double T0 =0.0, T0_dVb =0.0, T0_dVd =0.0, T0_dVg =0.0, T0_dT =0.0 ; double T1 =0.0, T1_dVb =0.0, T1_dVd =0.0, T1_dVg =0.0, T1_dT =0.0, T1_dVdse_eff =0.0 ; double T2 =0.0, T2_dVb =0.0, T2_dVd =0.0, T2_dVg =0.0, T2_dT =0.0 ; double T3 =0.0, T3_dVb =0.0, T3_dVd =0.0, T3_dVg =0.0, T3_dT =0.0 ; double T4 =0.0, T4_dVb =0.0, T4_dVd =0.0, T4_dVg =0.0, T4_dT =0.0 ; double T5 =0.0, T5_dVb =0.0, T5_dVd =0.0, T5_dVg =0.0, T5_dT =0.0 ; double T6 =0.0, T6_dVb =0.0, T6_dVd =0.0, T6_dVg =0.0, T6_dT =0.0 ; double T7 =0.0, T7_dVb =0.0, T7_dVd =0.0, T7_dVg =0.0, T7_dT =0.0 ; double T8 =0.0, T8_dVb =0.0, T8_dVd =0.0, T8_dVg =0.0, T8_dT =0.0 ; double T9 =0.0, T9_dVb =0.0, T9_dVd =0.0, T9_dVg =0.0, T9_dT =0.0, T9_dVdse_eff =0.0 ; double T10 =0.0, T10_dVb =0.0, T10_dVd =0.0, T10_dVg =0.0, T10_dT =0.0 ; double T11 =0.0, T11_dT =0.0 ; double T12 =0.0, T12_dT =0.0 ; double T15 =0.0, T16 =0.0, T17 =0.0 ; double T2_dVdse = 0.0, T5_dVdse = 0.0 ; double T4_dVb_dT, T5_dVb_dT, T6_dVb_dT, T7_dVb_dT ; int flg_zone =0 ; double Vfbsft =0.0, Vfbsft_dVbs =0.0, Vfbsft_dVds =0.0, Vfbsft_dVgs =0.0, Vfbsft_dT =0.0 ; /* Vdseff */ double Vdseff =0.0, Vdseff_dVbs =0.0, Vdseff_dVds =0.0, Vdseff_dVgs =0.0, Vdseff_dT =0.0 ; double Vdsorg =0.0 ; /* D/S Overlap Charges: Qovd/Qovs */ double CVDSOVER =0.0 ; double Qovdext =0.0, Qovdext_dVbse =0.0, Qovdext_dVdse =0.0, Qovdext_dVgse =0.0, Qovdext_dT =0.0 ; double Qovsext =0.0, Qovsext_dVbse =0.0, Qovsext_dVdse =0.0, Qovsext_dVgse =0.0, Qovsext_dT =0.0 ; double Qovd =0.0, Qovd_dVbs =0.0, Qovd_dVds =0.0, Qovd_dVgs =0.0, Qovd_dT =0.0 ; double Qovs =0.0, Qovs_dVbs =0.0, Qovs_dVds =0.0, Qovs_dVgs =0.0, Qovs_dT =0.0 ; double QbuLD =0.0, QbuLD_dVbs =0.0, QbuLD_dVds =0.0, QbuLD_dVgs =0.0, QbuLD_dT =0.0 ; double QbdLD =0.0, QbdLD_dVbs =0.0, QbdLD_dVds =0.0, QbdLD_dVgs =0.0, QbdLD_dT =0.0 ; double QbsLD =0.0, QbsLD_dVbs =0.0, QbsLD_dVds =0.0, QbsLD_dVgs =0.0, QbsLD_dT =0.0 ; double QbdLDext =0.0, QbdLDext_dVbse =0.0, QbdLDext_dVdse =0.0, QbdLDext_dVgse =0.0, QbdLDext_dT =0.0 ; double QbsLDext =0.0, QbsLDext_dVbse =0.0, QbsLDext_dVdse =0.0, QbsLDext_dVgse =0.0, QbsLDext_dT =0.0 ; /* Vgsz for SCE and PGD */ double dmpacc =0.0, dmpacc_dVbs =0.0, dmpacc_dVds =0.0, dmpacc_dVgs =0.0 ; double Vbsz2 =0.0, Vbsz2_dVbs =0.0, Vbsz2_dVds =0.0, Vbsz2_dVgs =0.0 , Vbsz2_dT =0.0; /* Multiplication factor * number of gate fingers */ double Mfactor = here->HSMHV_m ; /*-----------------------------------------------------------* * HiSIM-HV *-----------------*/ /* bias-dependent Rd, Rs */ double Rdrift =0.0, Rdrift_dVbse =0.0, Rdrift_dVdse =0.0, Rdrift_dVgse =0.0, Rdrift_dT =0.0 ; double Rsdrift =0.0, Rsdrift_dVbse =0.0, Rsdrift_dVdse =0.0, Rsdrift_dVgse =0.0, Rsdrift_dT =0.0 ; double Rd =0.0, Rd_dVbse =0.0, Rd_dVdse =0.0, Rd_dVgse =0.0, Rd_dT =0.0 ; double Rs =0.0, Rs_dVbse =0.0, Rs_dVdse =0.0, Rs_dVgse =0.0, Rs_dT =0.0 ; double Ra =0.0, Ra_dVbse =0.0, Ra_dVdse =0.0, Ra_dVgse =0.0 ; double Ra_dVbs =0.0, Ra_dVds =0.0, Ra_dVgs =0.0 ; double Ra_dVdse_eff =0.0 ; const double delta_rd = 10e-3 * C_cm2m ; const double Ra_N = 20.0; /* smoothing parameter for Ra */ const double Res_min = 1.0e-4 ; double Rd0_dT =0.0, Rs0_dT =0.0, Rdvd_dT =0.0, Rsvd_dT =0.0 ; double Vdse_eff =0.0, Vdse_eff_dVbse =0.0, Vdse_eff_dVdse =0.0, Vdse_eff_dVgse =0.0, Vdse_eff_dVbs =0.0, Vdse_eff_dVds =0.0, Vdse_eff_dVgs =0.0 ; double VdseModeNML =0.0, VdseModeRVS =0.0 ; double Vbsegmt =0.0, Vdsegmt =0.0, Vgsegmt =0.0 ; double Vbserev =0.0, Vdserev =0.0, Vgserev =0.0 ; double Ra_alpha, Ra_beta ; /* modified external biases for symmetry */ double Vzadd_ext_dVd = 0.0 ; double Vdserevz = 0.0, Vdserevz_dVd = 0.0 ; double Vgserevz = 0.0, Vgserevz_dVd = 0.0 ; double Vbserevz = 0.0, Vbserevz_dVd = 0.0 ; /* Substrate Effect */ const double RDVSUB = model->HSMHV_rdvsub ; const double RDVDSUB = model->HSMHV_rdvdsub ; const double DDRIFT = model->HSMHV_ddrift ; const double VBISUB = model->HSMHV_vbisub ; const double NSUBSUB = modelMKS->HSMHV_nsubsub ; double Vsubsrev = 0.0 ; double Wdep = 0.0, Wdep_dVdserev = 0.0, Wdep_dVsubsrev = 0.0 ; double T1_dVdserev = 0.0, T1_dVsubsrev = 0.0, T6_dVdserev = 0.0, T6_dVsubsrev = 0.0 ; double Rs_dVsubs = 0.0, Rd_dVsubs = 0.0, Rdrift_dVsubs = 0.0, Rsdrift_dVsubs = 0.0 ; /* temperature-dependent variables for SHE model */ double TTEMP =0.0, TTEMP0 =0.0 ; double Tdiff0 = 0.0, Tdiff0_2 = 0.0, Tdiff = 0.0, Tdiff_2 = 0.0 ; double Eg =0.0, Eg_dT =0.0 ; double Nin =0.0, Nin_dT =0.0 ; double js =0.0, js_dT =0.0 ; double jssw =0.0, jssw_dT =0.0 ; double js2 =0.0, js2_dT =0.0 ; double jssw2 =0.0, jssw2_dT =0.0 ; /* Qover 5/1 ckt-bias use */ double Vgbgmt =0.0, Vgbgmt_dVbs =0.0, Vgbgmt_dVds =0.0, Vgbgmt_dVgs =0.0 ; double Vxbgmt =0.0, Vxbgmt_dVbs =0.0, Vxbgmt_dVds =0.0, Vxbgmt_dVgs =0.0 ; double Vxbgmtcl =0.0, Vxbgmtcl_dVxbgmt =0.0, Vxbgmtcl_dT =0.0 ; double ModeNML =0.0, ModeRVS =0.0 ; double QsuLD =0.0, QsuLD_dVbs =0.0, QsuLD_dVds =0.0, QsuLD_dVgs =0.0, QsuLD_dT =0.0 ; double QiuLD =0.0, QiuLD_dVbs =0.0, QiuLD_dVds =0.0, QiuLD_dVgs =0.0, QiuLD_dT =0.0 ; double QidLD =0.0, QidLD_dVbs =0.0, QidLD_dVds =0.0, QidLD_dVgs =0.0, QidLD_dT =0.0 ; double QisLD =0.0, QisLD_dVbs =0.0, QisLD_dVds =0.0, QisLD_dVgs =0.0, QisLD_dT =0.0 ; double QidLDext =0.0, QidLDext_dVbse =0.0, QidLDext_dVdse =0.0, QidLDext_dVgse =0.0, QidLDext_dT =0.0 ; double QisLDext =0.0, QisLDext_dVbse =0.0, QisLDext_dVdse =0.0, QisLDext_dVgse =0.0, QisLDext_dT =0.0 ; /* Self heating */ double mphn0_dT =0.0 ; double ps0ldinib_dT =0.0, cnst0over_dT =0.0 ; double ps0ldinibs_dT =0.0, cnst0overs_dT =0.0 ; double Temp_dif =0.0 ; /* for SCE */ double ptovr_dT =0.0 ; /* IBPC */ double IdsIBPC =0.0, IdsIBPC_dVbs =0.0, IdsIBPC_dVds =0.0, IdsIBPC_dVgs =0.0, IdsIBPC_dT =0.0 ; /* Qover */ int flg_ovzone = 0 ; double VgpLD =0.0, VgpLD_dVgb =0.0 ; double Vgb_fb_LD =0.0 ; double Ac31_dVgb =0.0, Ac31_dVxb =0.0 ; double Ac1_dVgb =0.0, Ac1_dVxb =0.0 ; double Ac2_dVgb =0.0, Ac2_dVxb =0.0 ; double Ac3_dVgb =0.0, Ac3_dVxb =0.0 ; double Acn_dVgb =0.0, Acn_dVxb =0.0 ; double Acd_dVgb =0.0, Acd_dVxb =0.0 ; double Chi_dVgb =0.0, Chi_dVxb =0.0 ; double Psa_dVgb =0.0, Psa_dVxb =0.0 ; double QsuLD_dVgb =0.0, QsuLD_dVxb =0.0 ; double QbuLD_dVgb =0.0, QbuLD_dVxb =0.0 ; double fs02_dVgb =0.0, fs02_dVxb =0.0 ; double TX_dVgb =0.0, TX_dVxb =0.0 ; double TY_dVgb =0.0, TY_dVxb =0.0 ; double Ps0LD =0.0, Ps0LD_dVgb =0.0, Ps0LD_dVxb =0.0, Ps0LD_dT =0.0 ; double Ps0LD_dVbs =0.0, Ps0LD_dVds =0.0, Ps0LD_dVgs =0.0 ; double Pb2over =0.0, Pb2over_dT =0.0 ; int flg_overgiven =0 ; int Coovlps =0, Coovlpd =0 ; double Lovers =0.0, Loverd =0.0 ; double Novers =0.0, Noverd =0.0 ; double Nover_func =0.0 ; double ps0ldinib_func =0.0, ps0ldinib_func_dT =0.0 ; double cnst0over_func =0.0, cnst0over_func_dT =0.0 ; double cnst1over =0.0, cnst1over_dT =0.0; /* Qover Analytical Model */ int lp_ld; double Ta = 9.3868e-3, Tb = -0.1047839 ; double Tc, Tc_dT ; double Td, Td_dVxb, Td_dVgb, Td_dT ; double Tv, Tv_dVxb, Tv_dVgb, Tv_dT ; double Tu, Tu_dVxb, Tu_dVgb, Tu_dT ; double Tp, Tp_dT ; double Tq, Tq_dVxb, Tq_dVgb, Tq_dT ; double T1_dVxb, T1_dVgb ; double T5_dVxb, T5_dVgb ; double VgpLD_shift, VgpLD_shift_dT ; double VgpLD_shift_dVgb, VgpLD_shift_dVxb, exp_bVbs_dVxb ; double gamma, gamma_dVxb, gamma_dT ; double psi , psi_dVgb , psi_dVxb , psi_dT ; double psi_B, arg_B ; double Chi_1, Chi_1_dVgb, Chi_1_dVxb ,Chi_1_dT ; double Chi_A, Chi_A_dVgb, Chi_A_dVxb, Chi_A_dT ; double Chi_B, Chi_B_dVgb, Chi_B_dVxb, Chi_B_dT; /* X_dT for leakage currents & junction diodes */ double isbd_dT =0.0, isbs_dT =0.0 ; double isbd2_dT =0.0, isbs2_dT =0.0 ; double vbdt_dT =0.0, vbst_dT = 0.0 ; double jd_expcd_dT =0.0 , jd_expcs_dT =0.0 ; double jd_nvtm_inv_dT =0.0 ; double exptemp_dT = 0.0 ; double tcjbd =0.0, tcjbs =0.0, tcjbdsw =0.0, tcjbssw =0.0, tcjbdswg =0.0, tcjbsswg =0.0 ; /*================ Start of executable code.=================*/ if (here->HSMHV_mode == HiSIM_NORMAL_MODE) { ModeNML = 1.0 ; ModeRVS = 0.0 ; } else { ModeNML = 0.0 ; ModeRVS = 1.0 ; } T1 = Vdse + Vgse + Vbse + Vds + Vgs + Vbs + vbd_jct + vbs_jct ; if ( ! finite (T1) ) { fprintf (stderr , "*** warning(HiSIM_HV): Unacceptable Bias(es).\n" ) ; fprintf (stderr , "----- bias information (HiSIM_HV)\n" ) ; fprintf (stderr , "name: %s\n" , here->HSMHVname ) ; fprintf (stderr , "states: %d\n" , here->HSMHVstates ) ; fprintf (stderr , "Vdse= %.3e Vgse=%.3e Vbse=%.3e\n" , Vdse , Vgse , Vbse ) ; fprintf (stderr , "Vdsi= %.3e Vgsi=%.3e Vbsi=%.3e\n" , Vds , Vgs , Vbs ) ; fprintf (stderr , "vbs_jct= %12.5e vbd_jct= %12.5e\n" , vbs_jct , vbd_jct ) ; fprintf (stderr , "vd= %.3e vs= %.3e vdp= %.3e vgp= %.3e vbp= %.3e vsp= %.3e\n" , *( ckt->CKTrhsOld + here->HSMHVdNode ) , *( ckt->CKTrhsOld + here->HSMHVsNode ) , *( ckt->CKTrhsOld + here->HSMHVdNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVgNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVbNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVsNodePrime ) ) ; fprintf (stderr , "----- bias information (end)\n" ) ; return ( HiSIM_ERROR ) ; } flg_info = model->HSMHV_info ; flg_nqs = model->HSMHV_conqs ; /*-----------------------------------------------------------* * Start of the routine. (label) *-----------------*/ /*start_of_routine:*/ /*-----------------------------------------------------------* * Temperature dependent constants. *-----------------*/ if ( here->HSMHVtempNode > 0 && pParam->HSMHV_rth0 != 0.0 ) { #define HSMHVEVAL #include "hsmhvtemp_eval.h" } else { beta = here->HSMHV_beta ; TTEMP = ckt->CKTtemp ; if ( here->HSMHV_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV_dtemp ; } Eg_dT = 0.0 ; beta_dT = 0.0 ; beta_inv_dT = 0.0 ; mphn0_dT = 0.0 ; ptovr_dT = 0.0 ; Vmax_dT = 0.0 ; Pb2_dT = 0.0 ; cnst0_dT = 0.0 ; cnst1_dT = 0.0 ; } /* Inverse of the thermal voltage */ beta_inv = here->HSMHV_beta_inv ; beta2 = here->HSMHV_beta2 ; /* Bandgap */ Egp12 = here->HSMHV_egp12 ; Egp32 = here->HSMHV_egp32 ; /* Metallurgical channel geometry */ Leff = here->HSMHV_leff ; Weff = here->HSMHV_weff ; WeffLD_nf = here->HSMHV_weff_ld * here->HSMHV_nf ; Ldrift0 = here->HSMHV_ldrift1 + here->HSMHV_ldrift2 ; Ldrift = (model->HSMHV_coldrift) ? Ldrift0 : Ldrift0 + here->HSMHV_loverld ; /* Flat band voltage */ Vfb = pParam->HSMHV_vfbc ; /* Surface impurity profile */ q_Nsub = here->HSMHV_qnsub ; /* Velocity Temperature Dependence */ Vmax = here->HSMHV_vmax ; /* 2 phi_B */ Pb2 = here->HSMHV_pb2 ; Pb20 = here->HSMHV_pb20 ; Pb2c = here->HSMHV_pb2c ; /* Coefficient of the F function for bulk charge */ cnst0 = here->HSMHV_cnst0 ; /* cnst1: n_{p0} / p_{p0} */ cnst1 = here->HSMHV_cnst1 ; /* c_eox: Permitivity in ox */ c_eox = here->HSMHV_cecox ; /* Tox and Cox without QME */ Tox0 = model->HSMHV_tox ; Cox0 = c_eox / Tox0 ; Cox0_inv = 1.0 / Cox0 ; /*---------------------------------------------------* * Determine clamping limits for too large Vbs (internal). *-----------------*/ Fn_SU( T1 , Pb2 - model->HSMHV_vzadd0 , Vbs_max , 0.1 , T0 ) ; Vbs_max = T1 ; Vbs_max_dT = Pb2_dT * T0 ; if ( Pb20 - model->HSMHV_vzadd0 < Vbs_max ) { Vbs_max = Pb20 - model->HSMHV_vzadd0 ; Vbs_max_dT = 0.0 ; } if ( Pb2c - model->HSMHV_vzadd0 < Vbs_max ) { Vbs_max = Pb2c - model->HSMHV_vzadd0 ; Vbs_max_dT = 0.0 ; } if ( Vbs_bnd > Vbs_max * 0.5 ) { Vbs_bnd = 0.5 * Vbs_max ; Vbs_bnd_dT = 0.5 * Vbs_max_dT ; } if (here->HSMHV_rs > 0.0 || here->HSMHV_rd > 0.0) { if ( model->HSMHV_corsrd == 1 ) flg_rsrd = 1 ; if ( model->HSMHV_corsrd == 2 ) flg_rsrd = 2 ; if ( model->HSMHV_corsrd == 3 ) flg_rsrd = 3 ; } /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-1: Basic device characteristics. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* * Prepare for potential initial guesses using previous values *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ flg_pprv = 0 ; if ( here->HSMHV_called >= 1 ) { Vbsc_dif = Vbs - here->HSMHV_vbsc_prv ; Vdsc_dif = Vds - here->HSMHV_vdsc_prv ; Vgsc_dif = Vgs- here->HSMHV_vgsc_prv ; sum_vdif = fabs( Vbsc_dif ) + fabs( Vdsc_dif ) + fabs( Vgsc_dif ) ; if ( model->HSMHV_copprv >= 1 && sum_vdif <= vtol_pprv && here->HSMHV_mode * here->HSMHV_mode_prv > 0 ) { flg_pprv = 1 ;} if ( here->HSMHV_called >= 2 && flg_pprv == 1 ) { Vbsc_dif2 = here->HSMHV_vbsc_prv - here->HSMHV_vbsc_prv2 ; Vdsc_dif2 = here->HSMHV_vdsc_prv - here->HSMHV_vdsc_prv2 ; Vgsc_dif2 = here->HSMHV_vgsc_prv - here->HSMHV_vgsc_prv2 ; sum_vdif2 = fabs( Vbsc_dif2 ) + fabs( Vdsc_dif2 ) + fabs( Vgsc_dif2 ) ; if ( epsm10 < sum_vdif2 && sum_vdif2 <= vtol_pprv && here->HSMHV_mode_prv * here->HSMHV_mode_prv2 > 0 ) { flg_pprv = 2 ; } } Temp_dif = TTEMP - here->HSMHV_temp_prv ; } else { Vbsc_dif = 0.0 ; Vdsc_dif = 0.0 ; Vgsc_dif = 0.0 ; sum_vdif = 0.0 ; Vbsc_dif2 = 0.0 ; Vdsc_dif2 = 0.0 ; Vgsc_dif2 = 0.0 ; sum_vdif2 = 0.0 ; flg_pprv = 0 ; Temp_dif = 0.0 ; } dVbs = Vbsc_dif ; dVds = Vdsc_dif ; dVgs = Vgsc_dif ; if ( flg_pprv >= 1 ) { Ps0 = here->HSMHV_ps0_prv ; Ps0_dVbs = here->HSMHV_ps0_dvbs_prv ; Ps0_dVds = here->HSMHV_ps0_dvds_prv ; Ps0_dVgs = here->HSMHV_ps0_dvgs_prv ; Pds = here->HSMHV_pds_prv ; Pds_dVbs = here->HSMHV_pds_dvbs_prv ; Pds_dVds = here->HSMHV_pds_dvds_prv ; Pds_dVgs = here->HSMHV_pds_dvgs_prv ; } if ( flg_rsrd == 1 || flg_rsrd == 3 ) { /*----------------------------------------------------------* * Considering these special cases: * ( here->HSMHV_mode == HiSIM_NORMAL_MODE && Vdse < 0.0 ) * ( here->HSMHV_mode == HiSIM_REVERSE_MODE && Vdse < 0.0 ) *----------------------------------------------------------*/ Vdsegmt = here->HSMHV_mode * Vdse ; /* geometrical outer bias */ Vgsegmt = Vgse - ModeRVS * Vdse ; /* geometrical outer bias */ Vbsegmt = Vbse - ModeRVS * Vdse ; /* geometrical outer bias */ if ( Vdsegmt >= 0.0 ) { /* vdse normal mode */ VdseModeNML = 1 ; VdseModeRVS = 0 ; Vdserev = Vdsegmt ; Vgserev = Vgsegmt ; Vbserev = Vbsegmt ; Vsubsrev = Vsubs ; } else { /* vdse reverse mode */ VdseModeNML = 0 ; VdseModeRVS = 1 ; Vdserev = - Vdsegmt ; Vgserev = Vgsegmt - Vdsegmt ; Vbserev = Vbsegmt - Vdsegmt ; Vsubsrev = Vsubs - Vdsegmt ; } if ( here->HSMHV_rdvd > 0.0 || here->HSMHV_rsvd > 0.0 || pParam->HSMHV_rdvg11 > 0.0 || pParam->HSMHV_rdvb > 0.0 || here->HSMHVsubNode >= 0 ) { /*-----------------------------------------------------------* * Vxserevz: Modified bias introduced to realize symmetry at Vds=0. *-----------------*/ Fn_SymAdd( Vzadd , Vdserev / 2 , model->HSMHV_vzadd0 , T2 ) ; Vzadd_ext_dVd = T2 / 2 ; if ( Vzadd < ps_conv ) { Vzadd = ps_conv ; Vzadd_ext_dVd = 0.0 ; } Vdserevz = Vdserev + 2.0 * Vzadd ; Vdserevz_dVd = 1.0 + 2.0 * Vzadd_ext_dVd ; Vgserevz = Vgserev + Vzadd ; Vgserevz_dVd = Vzadd_ext_dVd ; Vbserevz = Vbserev + Vzadd ; Vbserevz_dVd = Vzadd_ext_dVd ; /* bias-dependent Rdrift for HVMOS/LDMOS */ if ( model->HSMHV_cosym == 1 || VdseModeNML == 1 ) { /* HVMOS or normal mode LDMOS: */ /* ... Vdse dependence */ T1 = VdseModeNML * here->HSMHV_rd + VdseModeRVS * here->HSMHV_rs ; T1_dT = VdseModeNML * Rd0_dT + VdseModeRVS * Rs0_dT ; T0 = VdseModeNML * here->HSMHV_rdvd + VdseModeRVS * here->HSMHV_rsvd ; T0_dT = VdseModeNML * Rdvd_dT + VdseModeRVS * Rsvd_dT ; T4 = T1 + T0 * Vdserevz ; T4_dVd = T0 * Vdserevz_dVd ; T4_dT = T1_dT + T0_dT * Vdserevz ; /* ... Vgse dependence */ T10 = model->HSMHV_rdvg12 + small ; T1 = T4 * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) ; T1_dVd = T4_dVd * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) + T4 * pParam->HSMHV_rdvg11 * ( - Vgserevz_dVd / T10 ) ; T1_dVg = T4 * pParam->HSMHV_rdvg11 * ( - 1.0 ) / T10 ; T1_dT = T4_dT * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) ; Fn_SL2( T2 , T1 , T4 , rdsl2_dlt , T0 , T5 ) ; T2_dVd = T0 * T1_dVd + T5 * T4_dVd ; T2_dVg = T0 * T1_dVg ; T2_dT = T0 * T1_dT + T5 * T4_dT ; T3 = T4 * ( 1.0 + pParam->HSMHV_rdvg11 ) ; T3_dVd = T4_dVd * ( 1.0 + pParam->HSMHV_rdvg11 ) ; T3_dT = T4_dT * ( 1.0 + pParam->HSMHV_rdvg11 ) ; Fn_SU2( Rdrift , T2 , T3 , rdsu2_dlt , T0, T5 ) ; Rdrift_dVdse = T0 * T2_dVd + T5 * T3_dVd ; Rdrift_dVgse = T0 * T2_dVg ; Rdrift_dT = T0 * T2_dT + T5 * T3_dT ; /* ... Vbse dependence */ T1 = 1.0 - pParam->HSMHV_rdvb * Vbserevz ; T1_dVb = - pParam->HSMHV_rdvb ; T1_dVd = - pParam->HSMHV_rdvb * Vbserevz_dVd ; Fn_SZ( T3 , T1 , rdsz_dlt , T4 ) ; T3_dVb = T4 * T1_dVb ; T3_dVd = T4 * T1_dVd ; T0 = Rdrift ; Rdrift = Rdrift * T3 ; Rdrift_dVdse = Rdrift_dVdse * T3 + T0 * T3_dVd ; Rdrift_dVgse = Rdrift_dVgse * T3 ; Rdrift_dVbse = + T0 * T3_dVb ; Rdrift_dT = Rdrift_dT * T3 ; } else { /* reverse mode LDMOS: */ Rdrift = here->HSMHV_rs ; Rdrift_dVdse = 0.0 ; Rdrift_dVgse = 0.0 ; Rdrift_dVbse = 0.0 ; Rdrift_dT = Rs0_dT ; } /* Rsdrift */ T4 = ( VdseModeNML * here->HSMHV_rs + VdseModeRVS * here->HSMHV_rd ) ; T4_dT = VdseModeNML * Rs0_dT + VdseModeRVS * Rd0_dT ; T4_dVd = 0.0 ; if ( model->HSMHV_cosym == 1 || VdseModeRVS == 1 ) { /* HVMOS or reverse mode LDMOS: */ /* ... Vdse dependence */ T0 = VdseModeNML * here->HSMHV_rsvd + VdseModeRVS * here->HSMHV_rdvd ; T0_dT = VdseModeNML * Rsvd_dT + VdseModeRVS * Rdvd_dT ; /* if ( model->HSMHV_cosym == 2 ) { /\* latest case with bugfix: *\/ */ /* T4 = T4 + T0 * Vdserevz ; */ /* T4_dVd = T0 * Vdserevz_dVd ; */ /* T4_dT = T4_dT + T0_dT * Vdserevz ; */ /* } else { /\* HiSIM_HV 1.1.1 compatible case *\/ */ T4 = T4 + T0 * ( 2.0 * model->HSMHV_vzadd0 ) ; /* 2.0 * Fn_SymAdd( x=0, add0=model->HSMHV_vzadd0 ) */ T4_dT = T4_dT + T0_dT * ( 2.0 * model->HSMHV_vzadd0 ) ; /* } */ /* ... Vgse dependence */ T10 = model->HSMHV_rdvg12 + small ; T1 = T4 * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) ; T1_dVd = T4_dVd * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) + T4 * pParam->HSMHV_rdvg11 * ( - Vgserevz_dVd / T10 ) ; T1_dVg = T4 * pParam->HSMHV_rdvg11 * ( - 1.0 ) / T10 ; T1_dT = T4_dT * ( 1.0 + pParam->HSMHV_rdvg11 * ( 1.0 - Vgserevz / T10 ) ) ; Fn_SL2( T2 , T1 , T4 , rdsl2_dlt , T0 , T5 ) ; T2_dVd = T0 * T1_dVd + T5 * T4_dVd ; T2_dVg = T0 * T1_dVg ; T2_dT = T0 * T1_dT + T5 * T4_dT ; T3 = T4 * ( 1.0 + pParam->HSMHV_rdvg11 ) ; T3_dVd = T4_dVd * ( 1.0 + pParam->HSMHV_rdvg11 ) ; T3_dT = T4_dT * ( 1.0 + pParam->HSMHV_rdvg11 ) ; Fn_SU2( Rsdrift , T2 , T3 , rdsu2_dlt , T0, T5 ) ; Rsdrift_dVdse = T0 * T2_dVd + T5 * T3_dVd ; Rsdrift_dVgse = T0 * T2_dVg ; Rsdrift_dT = T0 * T2_dT + T5 * T3_dT ; /* ... Vbse dependence */ T1 = 1.0 - pParam->HSMHV_rdvb * Vbserevz ; T1_dVb = - pParam->HSMHV_rdvb ; T1_dVd = - pParam->HSMHV_rdvb * Vbserevz_dVd ; Fn_SZ( T3 , T1 , rdsz_dlt , T4 ) ; T3_dVb = T4 * T1_dVb ; T3_dVd = T4 * T1_dVd ; T0 = Rsdrift ; Rsdrift = Rsdrift * T3 ; Rsdrift_dVdse = Rsdrift_dVdse * T3 + T0 * T3_dVd ; Rsdrift_dVgse = Rsdrift_dVgse * T3 ; Rsdrift_dVbse = + T0 * T3_dVb ; Rsdrift_dT = Rsdrift_dT * T3 ; } else { /* LDMOS normal mode: */ Rsdrift = here->HSMHV_rs ; Rsdrift_dVdse = 0.0 ; Rsdrift_dVgse = 0.0 ; Rsdrift_dVbse = 0.0 ; Rsdrift_dT = Rs0_dT ; } if ( here->HSMHVsubNode >= 0 && model->HSMHV_cosym == 0 && ( pParam->HSMHV_nover * ( NSUBSUB + pParam->HSMHV_nover ) ) > 0 ) { /* external substrate node exists && LDMOS case: */ /* Substrate Effect */ T0 = VBISUB - RDVDSUB * Vdserevz - RDVSUB * Vsubsrev ; Fn_SZ( T1, T0, 10.0, T2 ) ; T1_dVdserev = - RDVDSUB * Vdserevz_dVd * T2 ; T1_dVsubsrev = - RDVSUB * T2 ; T0 = NSUBSUB / ( pParam->HSMHV_nover * ( NSUBSUB + pParam->HSMHV_nover ) ) ; T4 = 2 * C_ESI / C_QE * T0 ; Wdep = sqrt ( T4 * T1 ) + small ; Wdep_dVdserev = 0.5 * T4 * T1_dVdserev / Wdep ; Wdep_dVsubsrev = 0.5 * T4 * T1_dVsubsrev / Wdep ; Fn_SU( Wdep, Wdep, DDRIFT, C_sub_delta * DDRIFT, T0 ) ; Wdep_dVdserev *= T0 ; Wdep_dVsubsrev *= T0 ; T0 = DDRIFT - Wdep ; Fn_SZ( T0, T0, C_sub_delta2, T2 ) ; T6 = Ldrift0 / T0 ; T6_dVdserev = T2 * Wdep_dVdserev * T6 / T0 ; T6_dVsubsrev = T2 * Wdep_dVsubsrev * T6 / T0 ; if ( VdseModeNML == 1 ) { /* Vdse normal mode: */ T0 = Rdrift ; Rdrift = T0 * T6 ; Rdrift_dVdse = Rdrift_dVdse * T6 + T0 * T6_dVdserev ; Rdrift_dVgse = Rdrift_dVgse * T6 ; Rdrift_dVbse = Rdrift_dVbse * T6 ; Rdrift_dVsubs= T0 * T6_dVsubsrev ; Rdrift_dT = Rdrift_dT * T6 ; } else { /* Vdse reverse mode: */ T0 = Rsdrift ; Rsdrift = T0 * T6 ; Rsdrift_dVdse = Rsdrift_dVdse * T6 + T0 * T6_dVdserev ; Rsdrift_dVgse = Rsdrift_dVgse * T6 ; Rsdrift_dVbse = Rsdrift_dVbse * T6 ; Rsdrift_dVsubs = T0 * T6_dVsubsrev ; Rsdrift_dT = Rsdrift_dT * T6 ; } } Rd = Rdrift ; Rd_dVgse = Rdrift_dVgse ; Rd_dVdse = Rdrift_dVdse ; Rd_dVbse = Rdrift_dVbse ; Rd_dVsubs = Rdrift_dVsubs ; Rd_dT = Rdrift_dT ; Rs = Rsdrift ; Rs_dVgse = Rsdrift_dVgse ; Rs_dVdse = Rsdrift_dVdse ; Rs_dVbse = Rsdrift_dVbse ; Rs_dVsubs = Rsdrift_dVsubs ; Rs_dT = Rsdrift_dT ; } else { /* bias-independent Rs/Rd */ Rd = VdseModeNML * here->HSMHV_rd + VdseModeRVS * here->HSMHV_rs ; Rd_dT = VdseModeNML * Rd0_dT + VdseModeRVS * Rs0_dT ; Rs = VdseModeNML * here->HSMHV_rs + VdseModeRVS * here->HSMHV_rd ; Rs_dT = VdseModeNML * Rs0_dT + VdseModeRVS * Rd0_dT ; } /* Weff dependence of the resistances */ Rd = Rd / WeffLD_nf ; Rd_dVgse /= WeffLD_nf ; Rd_dVdse /= WeffLD_nf ; Rd_dVbse /= WeffLD_nf ; Rd_dVsubs /= WeffLD_nf ; Rd_dT /= WeffLD_nf ; Rs = Rs / WeffLD_nf ; Rs_dVgse /= WeffLD_nf ; Rs_dVdse /= WeffLD_nf ; Rs_dVbse /= WeffLD_nf ; Rs_dVsubs /= WeffLD_nf ; Rs_dT /= WeffLD_nf ; /* Sheet resistances are added. */ Rd += VdseModeNML * here->HSMHV_rd0 + VdseModeRVS * here->HSMHV_rs0 ; Rs += VdseModeNML * here->HSMHV_rs0 + VdseModeRVS * here->HSMHV_rd0 ; /* Re-stamps for hsmhvnoi.c */ /* Please see hsmhvnoi.c */ T0 = VdseModeNML * Rd + VdseModeRVS * Rs ; /* mode-dependent --> geometrical */ if ( T0 > 0.0 && model->HSMHV_cothrml != 0 ) here->HSMHVdrainConductance = Mfactor / T0 ; else here->HSMHVdrainConductance = 0.0 ; T0 = VdseModeNML * Rs + VdseModeRVS * Rd ; /* mode-dependent --> geometrical */ if ( T0 > 0.0 && model->HSMHV_cothrml != 0 ) here->HSMHVsourceConductance = Mfactor / T0 ; else here->HSMHVsourceConductance = 0.0 ; } /* end of case flg_rsrd=1 or flg_rsrd=3 */ /* Clamping for Vbs > Vbs_bnd */ if ( Vbs > Vbs_bnd ) { T1 = Vbs - Vbs_bnd ; T2 = Vbs_max - Vbs_bnd ; T1_dT = - Vbs_bnd_dT ; T2_dT = Vbs_max_dT - Vbs_bnd_dT ; Fn_SUPoly4m( TY , T1 , T2 , Vbscl_dVbs , T0 ) ; TY_dT = T1_dT * Vbscl_dVbs + T2_dT * T0 ; Vbscl = Vbs_bnd + TY ; Vbscl_dT = Vbs_bnd_dT + TY_dT ; T3 = 1 / T2 ; /* x/xmax */ T4 = T1 * T3 ; T4_dVb = T3 ; T4_dT = T1_dT * T3 - T1*T3*T3*T2_dT; T4_dVb_dT = -T3*T3*T2_dT ; T5 = T4 * T4; T5_dVb = 2 * T4_dVb * T4 ; T5_dT = 2.0*T4*T4_dT; T5_dVb_dT = 2 * T4_dVb_dT * T4 + 2 * T4_dVb * T4_dT ; T15 = 2 * T4_dVb * T4_dVb ; /* T15 = T5_dVb_dVb */ T6 = T4 * T5 ; T6_dVb = T4_dVb * T5 + T4 * T5_dVb ; T6_dT = T4_dT * T5 + T4 * T5_dT ; T6_dVb_dT = T4_dVb_dT * T5 + T4_dVb * T5_dT + T4_dT * T5_dVb + T4*T5_dVb_dT ; T16 = T4_dVb * T5_dVb + T4_dVb * T5_dVb + T4 * T15 ; /* T16 = T6_dVb_dVb */ /* T7 = Z T7_dVb = dZ_dVb T17 = dZ_dVb_dVb */ T7 = 1 + T4 + T5 + T6 + T5 * T5 ; T7_dVb = T4_dVb + T5_dVb + T6_dVb + 2 * T5_dVb * T5 ; T7_dT = T4_dT + T5_dT + T6_dT + 2 * T5_dT * T5 ; T7_dVb_dT = T4_dVb_dT + T5_dVb_dT + T6_dVb_dT + 2 * T5_dVb_dT * T5 + 2 * T5_dVb * T5_dT ; T17 = T15 + T16 + 2 * T15 * T5 + 2 * T5_dVb * T5_dVb ; T8 = T7 * T7 ; T8_dVb = 2 * T7_dVb * T7 ; T8_dT = 2 * T7_dT * T7 ; T9 = 1 / T8 ; T9_dVb = - T8_dVb * T9 * T9 ; T9_dT = - T8_dT * T9 * T9 ; Vbscl_dVbs = T2 * T7_dVb * T9 ; Vbscl_dVbs_dT = T2_dT * T7_dVb * T9 + T2*(T7_dVb_dT * T9+ T7_dVb * T9_dT); Vbscl_dVbs_dVbs = T2 * ( T17 * T9 + T7_dVb * T9_dVb ) ; } else { Vbscl = Vbs ; Vbscl_dVbs = 1.0 ; Vbscl_dT = 0.0 ; Vbscl_dVbs_dVbs = 0.0 ; } /*-----------------------------------------------------------* * Vxsz: Modified bias introduced to realize symmetry at Vds=0. *-----------------*/ T1 = Vbscl_dVbs * Vds / 2 ; Fn_SymAdd( Vzadd , T1 , model->HSMHV_vzadd0 , T2 ) ; Vzadd_dVbs = T2 * Vbscl_dVbs_dVbs * Vds / 2 ; Vzadd_dT = T2 * Vbscl_dVbs_dT * Vds / 2 ; T2 *= Vbscl_dVbs / 2 ; Vzadd_dVds = T2 ; if ( Vzadd < ps_conv ) { Vzadd = ps_conv ; Vzadd_dVds = 0.0 ; Vzadd_dVbs = 0.0 ; Vzadd_dT = 0.0 ; } Vbsz = Vbscl + Vzadd ; Vbsz_dVbs = Vbscl_dVbs + Vzadd_dVbs ; Vbsz_dVds = Vzadd_dVds ; Vbsz_dT = Vbscl_dT + Vzadd_dT; Vdsz = Vds + 2.0 * Vzadd ; Vdsz_dVbs = 2.0 * Vzadd_dVbs ; Vdsz_dVds = 1.0 + 2.0 * Vzadd_dVds ; Vdsz_dT = 2.0 * Vzadd_dT ; Vgsz = Vgs + Vzadd ; Vgsz_dVbs = Vzadd_dVbs ; Vgsz_dVgs = 1.0 ; Vgsz_dVds = Vzadd_dVds ; Vgsz_dT = Vzadd_dT ; /*---------------------------------------------------* * Factor of modification for symmetry. *-----------------*/ T1 = here->HSMHV_qnsub_esi * Cox0_inv * Cox0_inv ; T2 = Vgs - Vfb ; T3 = 1 + 2.0 / T1 * ( T2 - 1.0 / here->HSMHV_betatnom - Vbscl ) ; Fn_SZ( T4 , T3 , 1e-3 , T5 ) ; TX = sqrt( T4 ) ; Pslsat = T2 + T1 * ( 1.0 - TX ) ; VdsatS = Pslsat - Pb2c ; Fn_SL( VdsatS , VdsatS , 0.1 , 5e-2 , T6 ) ; VdsatS_dVbs = ( TX ? (T6 * T5 / TX * Vbscl_dVbs) : 0.0 ) ; VdsatS_dVds = 0.0 ; VdsatS_dVgs = ( TX ? (T6 * ( 1.0 - T5 / TX )) : 0.0 ) ; VdsatS_dT = (TX ? (T6* T5/TX * Vbscl_dT) : 0) ; T1 = Vds / VdsatS ; Fn_SUPoly4( TX , T1 , 1.0 , T0 ) ; FMDVDS = TX * TX ; T2 = 2 * TX * T0 ; T3 = T2 / ( VdsatS * VdsatS ) ; FMDVDS_dVbs = T3 * ( - Vds * VdsatS_dVbs ) ; FMDVDS_dVds = T3 * ( 1.0 * VdsatS - Vds * VdsatS_dVds ) ; FMDVDS_dVgs = T3 * ( - Vds * VdsatS_dVgs ) ; FMDVDS_dT = T3 * ( - Vds * VdsatS_dT ) ; /*-----------------------------------------------------------* * Quantum effect *-----------------*/ if ( model->HSMHV_flg_qme == 0 ) { flg_qme = 0 ; } else { flg_qme = 1 ; } T1 = here->HSMHV_2qnsub_esi ; T2 = sqrt( T1 * Pb20 ) ; Vthq = Pb20 + Vfb + T2 * Cox0_inv ; Vthq_dVb = 0.0 ; Vthq_dVd = 0.0 ; if ( flg_qme == 0 ) { Tox = Tox0 ; Tox_dVb = 0.0 ; Tox_dVd = 0.0 ; Tox_dVg = 0.0 ; Cox = Cox0 ; Cox_dVb = 0.0 ; Cox_dVd = 0.0 ; Cox_dVg = 0.0 ; Cox_inv = Cox0_inv ; Cox_inv_dVb = 0.0 ; Cox_inv_dVd = 0.0 ; Cox_inv_dVg = 0.0 ; T0 = cnst0 * cnst0 * Cox_inv ; cnstCoxi = T0 * Cox_inv ; cnstCoxi_dVb = 0.0 ; cnstCoxi_dVd = 0.0 ; cnstCoxi_dVg = 0.0 ; cnstCoxi_dT = 2.0 * cnst0 * cnst0_dT * Cox_inv * Cox_inv ; } else { T1 = - model->HSMHV_qme2 ; T5 = Vgsz - Vthq - model->HSMHV_qme2 ; T5_dVb = Vgsz_dVbs - Vthq_dVb ; T5_dVd = Vgsz_dVds - Vthq_dVd ; T5_dVg = Vgsz_dVgs ; T5_dT = Vgsz_dT ; Fn_SZ( T2 , - T5 , qme2_dlt, T3) ; T2 = T2 + small ; T2_dVb = - T3 * T5_dVb ; T2_dVd = - T3 * T5_dVd ; T2_dVg = - T3 * T5_dVg ; T2_dT = - T3 * T5_dT ; T3 = model->HSMHV_qme12 * T1 * T1 ; T4 = model->HSMHV_qme12 * T2 * T2 + model->HSMHV_qme3 ; Fn_SU( dTox , T4 , T3 , qme_dlt , T6 ) ; T7 = 2 * model->HSMHV_qme12 * T2 * T6 ; dTox_dVb = T7 * T2_dVb ; dTox_dVd = T7 * T2_dVd ; dTox_dVg = T7 * T2_dVg ; dTox_dT = T7 * T2_dT ; if ( dTox * 1.0e12 < Tox0 ) { dTox = 0.0 ; dTox_dVb = 0.0 ; dTox_dVd = 0.0 ; dTox_dVg = 0.0 ; dTox_dT = 0.0 ; flg_qme = 0 ; } Tox = Tox0 + dTox ; Tox_dVb = dTox_dVb ; Tox_dVd = dTox_dVd ; Tox_dVg = dTox_dVg ; Tox_dT = dTox_dT ; Cox = c_eox / Tox ; T1 = - c_eox / ( Tox * Tox ) ; Cox_dVb = T1 * Tox_dVb ; Cox_dVd = T1 * Tox_dVd ; Cox_dVg = T1 * Tox_dVg ; Cox_dT = T1 * Tox_dT ; Cox_inv = Tox / c_eox ; T1 = 1.0 / c_eox ; Cox_inv_dVb = T1 * Tox_dVb ; Cox_inv_dVd = T1 * Tox_dVd ; Cox_inv_dVg = T1 * Tox_dVg ; Cox_inv_dT = T1 * Tox_dT ; T0 = cnst0 * cnst0 * Cox_inv ; cnstCoxi = T0 * Cox_inv ; T1 = 2.0 * T0 ; cnstCoxi_dVb = T1 * Cox_inv_dVb ; cnstCoxi_dVd = T1 * Cox_inv_dVd ; cnstCoxi_dVg = T1 * Cox_inv_dVg ; cnstCoxi_dT = 2.0 * cnst0 * cnst0_dT * Cox_inv * Cox_inv + T1 * Cox_inv_dT; } /*---------------------------------------------------* * Vbsz2 : Vbs for dVth *-----------------*/ Vbsz2 = Vbsz ; Vbsz2_dVbs = Vbsz_dVbs ; Vbsz2_dVds = Vbsz_dVds ; Vbsz2_dVgs = 0.0 ; Vbsz2_dT = Vbsz_dT ; /*---------------------------------------------------* * Vthp : Vth with pocket. *-----------------*/ T1 = here->HSMHV_2qnsub_esi ; Qb0 = sqrt (T1 * (Pb20 - Vbsz2)) ; T2 = 0.5 * T1 / Qb0 ; Qb0_dVb = T2 * (- Vbsz2_dVbs) ; Qb0_dVd = T2 * (- Vbsz2_dVds) ; Qb0_dVg = T2 * (- Vbsz2_dVgs) ; Qb0_dT = T2 * (- Vbsz2_dT) ; Vthp = Pb20 + Vfb + Qb0 * Cox_inv + here->HSMHV_ptovr; Vthp_dVb = Qb0_dVb * Cox_inv + Qb0 * Cox_inv_dVb ; Vthp_dVd = Qb0_dVd * Cox_inv + Qb0 * Cox_inv_dVd ; Vthp_dVg = Qb0_dVg * Cox_inv + Qb0 * Cox_inv_dVg ; Vthp_dT = Qb0_dT * Cox_inv + Qb0 * Cox_inv_dT + ptovr_dT ; if ( pParam->HSMHV_pthrou != 0.0 ) { /* Modify Pb20 to Pb20b */ T11 = beta * 0.25 ; T10 = beta_inv - cnstCoxi * T11 + small ; T10_dVg = - T11 * cnstCoxi_dVg ; T10_dVd = - T11 * cnstCoxi_dVd ; T10_dVb = - T11 * cnstCoxi_dVb ; T10_dT = beta_inv_dT - ( T11 * cnstCoxi_dT + beta_dT * 0.25 * cnstCoxi ) ; T1 = Vgsz - T10 - psia2_dlt ; T1_dVg = Vgsz_dVgs - T10_dVg ; T1_dVd = Vgsz_dVds - T10_dVd ; T1_dVb = Vgsz_dVbs - T10_dVb ; T1_dT = Vgsz_dT - T10_dT ; T0 = Fn_Sgn (T10) ; T2 = sqrt (T1 * T1 + T0 * 4.0 * T10 * psia2_dlt) ; T3 = T10 + 0.5 * (T1 + T2) - Vfb ; /* Vgpa for sqrt calc. */ T4 = T1 / T2 ; T5 = T0 * 2.0 * psia2_dlt / T2 ; T3_dVg = T10_dVg + 0.5 * (T1_dVg + (T4 * T1_dVg + T5 * T10_dVg ) ) ; T3_dVd = T10_dVd + 0.5 * (T1_dVd + (T4 * T1_dVd + T5 * T10_dVd ) ) ; T3_dVb = T10_dVb + 0.5 * (T1_dVb + (T4 * T1_dVb + T5 * T10_dVb ) ) ; T3_dT = T10_dT + 0.5 * (T1_dT + (T4 * T1_dT + T5 * T10_dT ) ) ; T4 = 4.0 / cnstCoxi * beta_inv * beta_inv ; T8 = 4.0 / cnstCoxi ; T9 = beta_inv * beta_inv ; T4_dT = - 4.0 * cnstCoxi_dT / ( cnstCoxi * cnstCoxi ) * T9 + T8 * 2.0 * beta_inv * beta_inv_dT ; T5 = beta * T3 - 1.0 ; T5_dT = beta_dT * T3 + beta * T3_dT ; T6 = T5 / cnstCoxi ; T1 = 1.0 + T5 * T4 ; T2 = beta * T4 ; T6 = T6 * T4 ; T1_dVg = (T2 * T3_dVg - T6 * cnstCoxi_dVg ) ; T1_dVd = (T2 * T3_dVd - T6 * cnstCoxi_dVd ) ; T1_dVb = (T2 * T3_dVb - T6 * cnstCoxi_dVb ) ; T1_dT = T5_dT * T4 + T5 * T4_dT ; Fn_SZ( T1 ,T1, psia_dlt, T7) ; T1 += epsm10 ; T1_dVg *= T7 ; T1_dVd *= T7 ; T1_dVb *= T7 ; T1_dT *= T7 ; T2 = sqrt (T1) ; T5 = 0.5 / T2 ; T2_dVg = T1_dVg * T5 ; T2_dVd = T1_dVd * T5 ; T2_dVb = T1_dVb * T5 ; T2_dT = T1_dT * T5 ; T4 = 0.5 * beta ; Psi_a = T3 + cnstCoxi * T4 * (1.0 - T2) ; T5 = T4 * (1.0 - T2) ; T6 = T4 * cnstCoxi ; Psi_a_dVg = T3_dVg + (cnstCoxi_dVg * T5 - T6 * T2_dVg) ; Psi_a_dVd = T3_dVd + (cnstCoxi_dVd * T5 - T6 * T2_dVd) ; Psi_a_dVb = T3_dVb + (cnstCoxi_dVb * T5 - T6 * T2_dVb) ; Psi_a_dT = T3_dT + (cnstCoxi_dT * T5 - T6 * T2_dT) + cnstCoxi * 0.5 * beta_dT * ( 1.0 - T2 ) ; Fn_SU( Pb20a , Psi_a, Pb20, delta0, T2) ; Pb20a_dVb = T2 * Psi_a_dVb ; Pb20a_dVd = T2 * Psi_a_dVd ; Pb20a_dVg = T2 * Psi_a_dVg ; Pb20a_dT = T2 * Psi_a_dT ; } T1 = pParam->HSMHV_pthrou ; Pb20b = Pb20 + T1 * (Pb20a - Pb20) ; Pb20b_dVb = T1 * Pb20a_dVb ; Pb20b_dVd = T1 * Pb20a_dVd ; Pb20b_dVg = T1 * Pb20a_dVg ; Pb20b_dT = T1 * Pb20a_dT ; T0 = 0.95 ; T1 = T0 * Pb20b - Vbsz2 - 1.0e-3 ; T1_dVb = T0 * Pb20b_dVb - Vbsz2_dVbs ; T1_dVd = T0 * Pb20b_dVd - Vbsz2_dVds ; T1_dVg = T0 * Pb20b_dVg - Vbsz2_dVgs ; T1_dT = T0 * Pb20b_dT - Vbsz2_dT ; T2 = sqrt (T1 * T1 + 4.0 * T0 * Pb20b * 1.0e-3) ; T3 = T0 * Pb20b - 0.5 * (T1 + T2) ; T4 = 2.0 * T0 * 1.0e-3 ; T5 = T1 / T2 ; T6 = T4 / T2 ; T3_dVb = T0 * Pb20b_dVb - 0.5 * (T1_dVb + (T1_dVb * T5 + T6 * Pb20b_dVb ) ) ; T3_dVd = T0 * Pb20b_dVd - 0.5 * (T1_dVd + (T1_dVd * T5 + T6 * Pb20b_dVd ) ) ; T3_dVg = T0 * Pb20b_dVg - 0.5 * (T1_dVg + (T1_dVg * T5 + T6 * Pb20b_dVg ) ) ; T3_dT = T0 * Pb20b_dT - 0.5 * (T1_dT + (T1_dT * T5 + T6 * Pb20b_dT ) ) ; Pbsum = Pb20b - T3 ; Pbsum_dVb = Pb20b_dVb - T3_dVb ; Pbsum_dVd = Pb20b_dVd - T3_dVd ; Pbsum_dVg = Pb20b_dVg - T3_dVg ; Pbsum_dT = Pb20b_dT - T3_dT ; sqrt_Pbsum = sqrt( Pbsum ) ; /*-------------------------------------------* * dVthLP : Short-channel effect induced by pocket. * - Vth0 : Vth without pocket. *-----------------*/ if ( model->HSMHV_lp != 0.0 ) { T1 = here->HSMHV_2qnsub_esi ; T2 = model->HSMHV_bs2 - Vbsz2 ; T3 = T2 + small ; T4 = sqrt (T3 * T3 + 4.0 * vth_dlt) ; T5 = 0.5 * (T3 + T4) ; T6 = 0.5 * (1.0 + T3 / T4) ; T5_dVb = - Vbsz2_dVbs * T6 ; T5_dVd = - Vbsz2_dVds * T6 ; T5_dVg = - Vbsz2_dVgs * T6 ; T5_dT = - Vbsz2_dT * T6 ; T7 = 1.0 / T5 ; bs12 = model->HSMHV_bs1 * T7 ; T8 = - bs12 * T7 ; bs12_dVb = T8 * T5_dVb ; bs12_dVd = T8 * T5_dVd ; bs12_dVg = T8 * T5_dVg ; bs12_dT = T8 * T5_dT ; Fn_SU( T10 , Vbsz2 + bs12, 0.93 * Pb20, vth_dlt, T0) ; Qbmm = sqrt (T1 * (Pb20 - T10 )) ; T9 = T0 / Qbmm ; Qbmm_dVb = 0.5 * T1 * - (Vbsz2_dVbs + bs12_dVb) * T9 ; Qbmm_dVd = 0.5 * T1 * - (Vbsz2_dVds + bs12_dVd) * T9 ; Qbmm_dVg = 0.5 * T1 * - (Vbsz2_dVgs + bs12_dVg) * T9 ; Qbmm_dT = 0.5 * T1 * - (Vbsz2_dT + bs12_dT) * T9 ; dqb = (Qb0 - Qbmm) * Cox_inv ; dqb_dVb = Vthp_dVb - Qbmm_dVb * Cox_inv - Qbmm * Cox_inv_dVb ; dqb_dVd = Vthp_dVd - Qbmm_dVd * Cox_inv - Qbmm * Cox_inv_dVd ; dqb_dVg = Vthp_dVg - Qbmm_dVg * Cox_inv - Qbmm * Cox_inv_dVg ; dqb_dT = Vthp_dT - Qbmm_dT * Cox_inv - Qbmm * Cox_inv_dT ; T1 = 2.0 * C_QE * here->HSMHV_nsubc * C_ESI ; T2 = sqrt( T1 * ( Pb2c - Vbsz2 ) ) ; Vth0 = Pb2c + Vfb + T2 * Cox_inv ; T3 = 0.5 * T1 / T2 * Cox_inv ; Vth0_dVb = T3 * ( - Vbsz2_dVbs ) + T2 * Cox_inv_dVb ; Vth0_dVd = T3 * ( - Vbsz2_dVds ) + T2 * Cox_inv_dVd ; Vth0_dVg = T3 * ( - Vbsz2_dVgs ) + T2 * Cox_inv_dVg ; Vth0_dT = T3 * ( - Vbsz2_dT ) + T2 * Cox_inv_dT ; T1 = C_ESI * Cox_inv ; T2 = here->HSMHV_wdplp ; T4 = 1.0e0 / ( model->HSMHV_lp * model->HSMHV_lp ) ; T5 = 2.0e0 * ( model->HSMHV_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = 0.5 * T5 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSMHV_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; dVth0_dT = T6 * Pbsum_dT + T7 * Cox_inv_dT + T8 * Pb20b_dT ; T1 = Vthp - Vth0 ; T1_dVb = Vthp_dVb - Vth0_dVb ; T2 = pParam->HSMHV_scp1 + pParam->HSMHV_scp3 * Pbsum / model->HSMHV_lp ; T2_dVb = pParam->HSMHV_scp3 * Pbsum_dVb / model->HSMHV_lp ; T3 = T2 + pParam->HSMHV_scp2 * Vdsz ; T3_dVb = T2_dVb + pParam->HSMHV_scp2 * Vdsz_dVbs ; Vdx = model->HSMHV_scp21 + Vdsz ; Vdx_dVbs = Vdsz_dVbs ; Vdx_dT = Vdsz_dT ; Vdx2 = Vdx * Vdx ; Vdx2_dVbs = 2 * Vdx_dVbs * Vdx ; Vdx2_dT = 2 * Vdx_dT * Vdx ; dVthLP = T1 * dVth0 * T3 + dqb - here->HSMHV_msc / Vdx2 ; dVthLP_dVb = T1_dVb * dVth0 * T3 + T1 * dVth0_dVb * T3 + T1 * dVth0 * T3_dVb + dqb_dVb + here->HSMHV_msc / Vdx2 /Vdx2 *Vdx2_dVbs; T4 = T1 * dVth0 * pParam->HSMHV_scp3 / model->HSMHV_lp ; dVthLP_dVd = (Vthp_dVd - Vth0_dVd) * dVth0 * T3 + T1 * dVth0_dVd * T3 + T4 * Pbsum_dVd + T1 * dVth0 * pParam->HSMHV_scp2 * Vdsz_dVds + dqb_dVd + 2.0e0 * here->HSMHV_msc * Vdx * Vdsz_dVds / ( Vdx2 * Vdx2 ) ; dVthLP_dVg = (Vthp_dVg - Vth0_dVg) * dVth0 * T3 + T1 * dVth0_dVg * T3 + T4 * Pbsum_dVg + dqb_dVg ; dVthLP_dT = (Vthp_dT - Vth0_dT) * dVth0 * T3 + T1 * dVth0_dT * T3 + T4 * Pbsum_dT + T1 * dVth0 * pParam->HSMHV_scp2 * Vdsz_dT + dqb_dT + 2.0e0 * here->HSMHV_msc * Vdx * Vdsz_dT / ( Vdx2 * Vdx2 ); } else { dVthLP = 0.0e0 ; dVthLP_dVb = 0.0e0 ; dVthLP_dVd = 0.0e0 ; dVthLP_dVg = 0.0e0 ; dVthLP_dT = 0.0e0 ; } /*---------------------------------------------------* * dVthSC : Short-channel effect induced by Vds. *-----------------*/ T1 = C_ESI * Cox_inv ; T2 = here->HSMHV_wdpl ; T3 = here->HSMHV_lgate - model->HSMHV_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T5 = 2.0e0 * ( model->HSMHV_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = T5 / 2.0 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSMHV_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; dVth0_dT = T6 * Pbsum_dT + T7 * Cox_inv_dT + T8 * Pb20b_dT ; T1 = pParam->HSMHV_sc3 / here->HSMHV_lgate ; T4 = pParam->HSMHV_sc1 + T1 * Pbsum ; T4_dVb = T1 * Pbsum_dVb ; T4_dVd = T1 * Pbsum_dVd ; T4_dVg = T1 * Pbsum_dVg ; T4_dT = T1 * Pbsum_dT ; T5 = T4 + pParam->HSMHV_sc2 * Vdsz * ( 1.0 + model->HSMHV_sc4 * Pbsum ); T5_dVb = T4_dVb + pParam->HSMHV_sc2 * Vdsz * model->HSMHV_sc4 * Pbsum_dVb + pParam->HSMHV_sc2 * Vdsz_dVbs * model->HSMHV_sc4 * Pbsum; T5_dVd = T4_dVd + pParam->HSMHV_sc2 * Vdsz_dVds * ( 1.0 + model->HSMHV_sc4 * Pbsum ) + pParam->HSMHV_sc2 * Vdsz * model->HSMHV_sc4 * Pbsum_dVd; T5_dVg = T4_dVg + pParam->HSMHV_sc2 * Vdsz * model->HSMHV_sc4 * Pbsum_dVg; T5_dT = T4_dT + pParam->HSMHV_sc2 * Vdsz * model->HSMHV_sc4 * Pbsum_dT + pParam->HSMHV_sc2 * Vdsz_dT * model->HSMHV_sc4 * Pbsum; dVthSC = dVth0 * T5 ; dVthSC_dVb = dVth0_dVb * T5 + dVth0 * T5_dVb ; dVthSC_dVd = dVth0_dVd * T5 + dVth0 * T5_dVd ; dVthSC_dVg = dVth0_dVg * T5 + dVth0 * T5_dVg ; dVthSC_dT = dVth0_dT * T5 + dVth0 * T5_dT ; /*---------------------------------------------------* * dVthW : narrow-channel effect. *-----------------*/ T1 = 1.0 / Cox ; T2 = T1 * T1 ; T3 = 1.0 / ( Cox + pParam->HSMHV_wfc / Weff ) ; T4 = T3 * T3 ; T5 = T1 - T3 ; T6 = Qb0 * ( T2 - T4 ) ; dVthW = Qb0 * T5 + pParam->HSMHV_wvth0 / here->HSMHV_wg ; dVthW_dVb = Qb0_dVb * T5 - Cox_dVb * T6 ; dVthW_dVd = Qb0_dVd * T5 - Cox_dVd * T6 ; dVthW_dVg = - Cox_dVg * T6 ; dVthW_dT = Qb0_dT * T5 - Cox_dT * T6 ; /*---------------------------------------------------* * dVth : Total variation. * - Positive dVth means the decrease in Vth. *-----------------*/ dVth = dVthSC + dVthLP + dVthW + here->HSMHV_dVthsm ; dVth_dVb = dVthSC_dVb + dVthLP_dVb + dVthW_dVb ; dVth_dVd = dVthSC_dVd + dVthLP_dVd + dVthW_dVd ; dVth_dVg = dVthSC_dVg + dVthLP_dVg + dVthW_dVg ; dVth_dT = dVthSC_dT + dVthLP_dT + dVthW_dT ; /*---------------------------------------------------* * Vth : Threshold voltage. *-----------------*/ Vth = Vthq - dVth ; /*-----------------------------------------------------------* * Constants in the equation of Ps0 . *-----------------*/ fac1 = cnst0 * Cox_inv ; fac1_dVbs = cnst0 * Cox_inv_dVb ; fac1_dVds = cnst0 * Cox_inv_dVd ; fac1_dVgs = cnst0 * Cox_inv_dVg ; fac1p2 = fac1 * fac1 ; fac1_dT = Cox_inv * cnst0_dT ; fac1p2_dT = 2.0 * fac1 * fac1_dT ; /*---------------------------------------------------* * Poly-Depletion Effect *-----------------*/ if ( here->HSMHV_flg_pgd == 0 ) { dPpg = 0.0 ; dPpg_dVb = 0.0 ; dPpg_dVd = 0.0 ; dPpg_dVg = 0.0 ; dPpg_dT = 0.0 ; } else { T7 = Vgs ; T7_dVd = 0.0 ; T7_dVg = 1.0 ; T8 = Vds ; T8_dVd = 1.0 ; T0 = here->HSMHV_cnstpgd ; TX = pParam->HSMHV_pgd3 ; TY = FMDVDS * TX + ( 1.0 - FMDVDS ) * 0.5 ; T1 = TX - 0.5 ; TY_dVbs = T1 * FMDVDS_dVbs ; TY_dVds = T1 * FMDVDS_dVds ; TY_dVgs = T1 * FMDVDS_dVgs ; FMDVGS = 1.0 ; FMDVGS_dVgs = 0.0 ; if ( model->HSMHV_pgd2 > Vfb ) { T1 = model->HSMHV_pgd2 - Vfb ; T2 = ( Vgs - Vfb ) / T1 ; Fn_SZ( T3 , T2 , 1e-3 , T4 ) ; Fn_SU( T5 , T3 , 1.0 , 1e-3 , T6 ) ; T5_dVg = T4 * T6 / T1 ; FMDVGS = T5 * T5 ; FMDVGS_dVgs = 2 * T5 * T5_dVg ; } FMDPG = FMDVDS * FMDVGS ; FMDPG_dVbs = FMDVDS_dVbs * FMDVGS ; FMDPG_dVds = FMDVDS_dVds * FMDVGS ; FMDPG_dVgs = FMDVDS_dVgs * FMDVGS + FMDVDS * FMDVGS_dVgs ; FMDPG_dT = FMDVDS_dT * FMDVGS ; TX = pParam->HSMHV_pgd3 ; TY = FMDPG * TX + ( 1.0 - FMDPG ) * 0.5 ; T1 = TX - 0.5 ; TY_dVbs = T1 * FMDPG_dVbs ; TY_dVds = T1 * FMDPG_dVds ; TY_dVgs = T1 * FMDPG_dVgs ; TY_dT = T1 * FMDPG_dT ; if ( TX == 0.0 ) { TY =0.0 ; TY_dVbs =0.0 ; TY_dVds =0.0 ; TY_dVgs =0.0 ; TY_dT =0.0 ; } T3 = T7 - model->HSMHV_pgd2 - TY * T8 ; T3_dVb = - TY_dVbs * T8 ; T3_dVd = T7_dVd - ( TY_dVds * T8 + TY * T8_dVd ) ; T3_dVg = T7_dVg - ( TY_dVgs * T8 ) ; T3_dT = - TY_dT * T8; Fn_ExpLim( dPpg , T3 , T6 ) ; dPpg *= T0 ; dPpg_dVb = T0 * T6 * T3_dVb ; dPpg_dVd = T0 * T6 * T3_dVd ; dPpg_dVg = T0 * T6 * T3_dVg ; dPpg_dT = T0 * T6 * T3_dT ; Fn_SU( dPpg , dPpg , pol_b , pol_dlt , T9 ) ; dPpg_dVb *= T9 ; dPpg_dVd *= T9 ; dPpg_dVg *= T9 ; dPpg_dT *= T9 ; /* damping in accumulation zone */ T0 = Vfb + Vbsz ; T0_dVb = Vbsz_dVbs ; T1 = 0.6 * ( Vthq - T0 ) ; T1_dVb = 0.6 * ( Vthq_dVb - Vbsz_dVbs ) ; T1_dVd = 0.6 * ( Vthq_dVd - Vbsz_dVds ) ; Fn_SZ( T1 , T1 , 1e-2 , T2 ) ; T1_dVb *= T2 ; T1_dVd *= T2 ; T1 += T0 ; T1_dVb += Vbsz_dVbs ; T4 = 1.0 / ( T1 - T0 ) ; T5 = T4 * T4 ; T4_dVb = - ( T1_dVb - Vbsz_dVbs ) * T5 ; T4_dVd = - ( T1_dVd ) * T5 ; T6 = Vgsz - T0 ; T6_dVb = Vgsz_dVbs - T0_dVb ; dmpacc = T6 * T4 ; dmpacc_dVbs = T6 * T4_dVb + T6_dVb * T4 ; dmpacc_dVds = T6 * T4_dVd + ( Vgsz_dVds - Vbsz_dVds ) * T4 ; dmpacc_dVgs = Vgsz_dVgs * T4 ; Fn_SZ( dmpacc , dmpacc , 0.3 , T1 ) ; dmpacc_dVbs *= T1 ; dmpacc_dVds *= T1 ; dmpacc_dVgs *= T1 ; Fn_SU( dmpacc , dmpacc ,1.0 , 0.1 , T1 ) ; dmpacc_dVbs *= T1 ; dmpacc_dVds *= T1 ; dmpacc_dVgs *= T1 ; } /*---------------------------------------------------* * Vgp : Effective gate bias with SCE & RSCE & flatband. *-----------------*/ Vgp = Vgs - Vfb + dVth - dPpg ; Vgp_dVbs = dVth_dVb - dPpg_dVb ; Vgp_dVds = dVth_dVd - dPpg_dVd ; Vgp_dVgs = 1.0e0 + dVth_dVg - dPpg_dVg ; Vgp_dT = dVth_dT - dPpg_dT ; /*---------------------------------------------------* * Vgs_fb : Actual flatband voltage taking account Vbscl. * - note: if Vgs == Vgs_fb then Vgp == Ps0 == Vbscl . *------------------*/ Vgs_fb = Vfb - dVth + dPpg + Vbscl ; /*---------------------------------------------------* * Vfbsft : Vfb shift (trial for Vbscl >> 0) *-----------------*/ Vfbsft = 0.0 ; Vfbsft_dVbs = 0.0 ; Vfbsft_dVds = 0.0 ; Vfbsft_dVgs = 0.0 ; if ( Vbscl > 0.0 ) { /* values at D2/D3 boundary + beta */ /* Ps0 */ T1 = Vbscl + ( znbd5 + 1 ) * beta_inv ; T1_dT = Vbscl_dT + ( znbd5 + 1 ) * beta_inv_dT ; /* Qb0 */ /* T2 = cnst0 * sqrt( znbd5 ) */ T2 = cnst0 * 2.23606797749979 ; T2_dT = cnst0_dT * 2.23606797749979 ; /* Vgp assuming Qn0=0 */ T3 = T2 * Cox_inv + T1 ; T3_dT = T2_dT * Cox_inv + T1_dT ; /* Vgp difference */ TX = T3 - Vgp ; TX_dVbs = T2 * Cox_inv_dVb + Vbscl_dVbs - Vgp_dVbs ; TX_dVds = T2 * Cox_inv_dVd - Vgp_dVds ; TX_dVgs = T2 * Cox_inv_dVg - Vgp_dVgs ; TX_dT = T3_dT - Vgp_dT ; /* set lower limit to 0 */ Fn_SZ( TX , TX , 0.1 , T4 ) ; TX_dVbs *= T4 ; TX_dVds *= T4 ; TX_dVgs *= T4 ; TX_dT *= T4 ; /* TY: damping factor */ T1 = 0.5 ; T5 = Vbscl / T1 ; T5_dVb = Vbscl_dVbs / T1 ; T5_dT = Vbscl_dT / T1 ; T0 = T5 * T5 ; T6 = T0 * T0 ; T6_dVb = 4 * T0 * T5 * T5_dVb ; T6_dT = 4 * T0 * T5 * T5_dT ; T7 = 1.0 / ( 1.0 + T6 ) ; T8 = T7 * T7 ; TY = 1.0 - T7 ; TY_dVbs = T8 * T6_dVb ; TY_dT = T8 * T6_dT ; TX = TY = 0.0 ; Vfbsft = TX * TY ; Vfbsft_dVbs = TX_dVbs * TY + TX * TY_dVbs ; Vfbsft_dVds = TX_dVds * TY ; Vfbsft_dVgs = TX_dVgs * TY ; Vfbsft_dT = TX_dT * TY + TX * TY_dT ; Vgs_fb -= Vfbsft ; Vgp += Vfbsft ; Vgp_dVbs += Vfbsft_dVbs ; Vgp_dVds += Vfbsft_dVds ; Vgp_dVgs += Vfbsft_dVgs ; Vgp_dT += Vfbsft_dT ; } /*-----------------------------------------------------------* * Accumulation zone. (zone-A) * - evaluate basic characteristics and exit from this part. *-----------------*/ if ( Vgs < Vgs_fb ) { flg_zone = -1 ; /*---------------------------------------------------* * Evaluation of Ps0. * - Psa : Analytical solution of * Cox( Vgp - Psa ) = cnst0 * Qacc * where Qacc is the 3-degree series of (fdep)^{1/2}. * The unkown is transformed to Chi=beta(Ps0-Vbs). * - Ps0_min : |Ps0_min| when Vbs=0. *-----------------*/ Ps0_min = here->HSMHV_eg - Pb2 ; Ps0_min_dT = Eg_dT - Pb2_dT ; TX = beta * ( Vgp - Vbscl ) ; TX_dVbs = beta * ( Vgp_dVbs - Vbscl_dVbs ) ; TX_dVds = beta * Vgp_dVds ; TX_dVgs = beta * Vgp_dVgs ; TX_dT = beta_dT * ( Vgp - Vbscl ) + beta * ( Vgp_dT - Vbscl_dT ); T1 = 1.0 / ( beta * cnst0 ) ; TY = T1 * Cox ; TY_dVbs = T1 * Cox_dVb ; TY_dVds = T1 * Cox_dVd ; TY_dVgs = T1 * Cox_dVg ; T1_dT = - T1 / ( beta * cnst0 ) * ( beta_dT * cnst0 + beta * cnst0_dT ) ; TY_dT = T1_dT * Cox ; Ac41 = 2.0 + 3.0 * C_SQRT_2 * TY ; Ac4 = 8.0 * Ac41 * Ac41 * Ac41 ; T1 = 72.0 * Ac41 * Ac41 * C_SQRT_2 ; Ac4_dVbs = T1 * TY_dVbs ; Ac4_dVds = T1 * TY_dVds ; Ac4_dVgs = T1 * TY_dVgs ; Ac4_dT = T1 * TY_dT ; T4 = ( TX - 2.0 ) ; T5 = 9.0 * TY * T4 ; T5_dVb = 9.0 * ( TY_dVbs * T4 + TY * TX_dVbs ) ; T5_dVd = 9.0 * ( TY_dVds * T4 + TY * TX_dVds ) ; T5_dVg = 9.0 * ( TY_dVgs * T4 + TY * TX_dVgs ) ; T5_dT = 9.0 * ( TY_dT * T4 + TY * TX_dT ) ; Ac31 = 7.0 * C_SQRT_2 - T5 ; Ac31_dVbs = -T5_dVb ; Ac31_dVds = -T5_dVd ; Ac31_dVgs = -T5_dVg ; Ac31_dT = -T5_dT ; Ac3 = Ac31 * Ac31 ; T1 = 2.0 * Ac31 ; Ac3_dVbs = T1 * Ac31_dVbs ; Ac3_dVds = T1 * Ac31_dVds ; Ac3_dVgs = T1 * Ac31_dVgs ; Ac3_dT = T1 * Ac31_dT ; Ac2 = sqrt( Ac4 + Ac3 ) ; T1 = 0.5 / Ac2 ; Ac2_dVbs = T1 * ( Ac4_dVbs + Ac3_dVbs ) ; Ac2_dVds = T1 * ( Ac4_dVds + Ac3_dVds ) ; Ac2_dVgs = T1 * ( Ac4_dVgs + Ac3_dVgs ) ; Ac2_dT = T1 * ( Ac4_dT + Ac3_dT ) ; Ac1 = -7.0 * C_SQRT_2 + Ac2 + T5 ; Ac1_dVbs = Ac2_dVbs + T5_dVb ; Ac1_dVds = Ac2_dVds + T5_dVd ; Ac1_dVgs = Ac2_dVgs + T5_dVg ; Ac1_dT = Ac2_dT + T5_dT ; Acd = Fn_Pow( Ac1 , C_1o3 ) ; T1 = C_1o3 / ( Acd * Acd ) ; Acd_dVbs = Ac1_dVbs * T1 ; Acd_dVds = Ac1_dVds * T1 ; Acd_dVgs = Ac1_dVgs * T1 ; Acd_dT = Ac1_dT * T1 ; Acn = -4.0 * C_SQRT_2 - 12.0 * TY + 2.0 * Acd + C_SQRT_2 * Acd * Acd ; T1 = 2.0 + 2.0 * C_SQRT_2 * Acd ; Acn_dVbs = - 12.0 * TY_dVbs + T1 * Acd_dVbs ; Acn_dVds = - 12.0 * TY_dVds + T1 * Acd_dVds ; Acn_dVgs = - 12.0 * TY_dVgs + T1 * Acd_dVgs ; Acn_dT = - 12.0 * TY_dT + T1 * Acd_dT ; T1 = 1.0 / Acd ; Chi = Acn * T1 ; Chi_dVbs = ( Acn_dVbs - Chi * Acd_dVbs ) * T1 ; Chi_dVds = ( Acn_dVds - Chi * Acd_dVds ) * T1 ; Chi_dVgs = ( Acn_dVgs - Chi * Acd_dVgs ) * T1 ; Chi_dT = ( Acn_dT - Chi * Acd_dT ) * T1 ; Psa = Chi * beta_inv + Vbscl ; Psa_dVbs = Chi_dVbs * beta_inv + Vbscl_dVbs ; Psa_dVds = Chi_dVds * beta_inv ; Psa_dVgs = Chi_dVgs * beta_inv ; Psa_dT = Chi_dT * beta_inv + Chi * beta_inv_dT + Vbscl_dT; T1 = Psa - Vbscl ; T1_dT = Psa_dT - Vbscl_dT ; T2 = T1 / Ps0_min ; T2_dT = ( T1_dT * Ps0_min - T1 * Ps0_min_dT ) / ( Ps0_min * Ps0_min ) ; T3 = sqrt( 1.0 + ( T2 * T2 ) ) ; T3_dT = 1.0 / T3 * T2 * T2_dT ; T9 = T2 / T3 / Ps0_min ; T3_dVb = T9 * ( Psa_dVbs - Vbscl_dVbs ) ; T3_dVd = T9 * ( Psa_dVds ) ; T3_dVg = T9 * ( Psa_dVgs ) ; Ps0 = T1 / T3 + Vbscl ; T9 = 1.0 / ( T3 * T3 ) ; Ps0_dVbs = T9 * ( ( Psa_dVbs - Vbscl_dVbs ) * T3 - T1 * T3_dVb ) + Vbscl_dVbs ; Ps0_dVds = T9 * ( Psa_dVds * T3 - T1 * T3_dVd ) ; Ps0_dVgs = T9 * ( Psa_dVgs * T3 - T1 * T3_dVg ) ; Ps0_dT = T9 * ( ( Psa_dT - Vbscl_dT )* T3 - T1 * T3_dT ) + Vbscl_dT; /*---------------------------------------------------* * Characteristics. *-----------------*/ Psl = Ps0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVds = Ps0_dVds ; Psl_dVgs = Ps0_dVgs ; Psl_dT = Ps0_dT ; /** (reminder) Psdl = Psl ; Psdl_dVbs = Psl_dVbs ; Psdl_dVds = Psl_dVds ; Psdl_dVgs = Psl_dVgs ; **/ T2 = ( Vgp - Ps0 ) ; T2_dT = Vgp_dT - Ps0_dT ; Qbu = Cox * T2 ; Qbu_dVbs = Cox * ( Vgp_dVbs - Ps0_dVbs ) + Cox_dVb * T2 ; Qbu_dVds = Cox * ( Vgp_dVds - Ps0_dVds ) + Cox_dVd * T2 ; Qbu_dVgs = Cox * ( Vgp_dVgs - Ps0_dVgs ) + Cox_dVg * T2 ; Qbu_dT = Cox * T2_dT ; Qiu = 0.0e0 ; Qiu_dVbs = 0.0e0 ; Qiu_dVds = 0.0e0 ; Qiu_dVgs = 0.0e0 ; Qiu_dT = 0.0e0 ; Qdrat = 0.0e0 ; Qdrat_dVbs = 0.0e0 ; Qdrat_dVds = 0.0e0 ; Qdrat_dVgs = 0.0e0 ; Qdrat_dT = 0.0 ; Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; Lred_dT = 0.0e0 ; Ids = 0.0e0 ; Ids_dVbs = 0.0e0 ; Ids_dVds = 0.0e0 ; Ids_dVgs = 0.0e0 ; Ids_dT = 0.0e0 ; VgVt = 0.0 ; flg_noqi = 1 ; goto end_of_part_1 ; } /*-----------------------------------------------------------* * Initial guess for Ps0. *-----------------*/ /*---------------------------------------------------* * Ps0_iniA: solution of subthreshold equation assuming zone-D1/D2. *-----------------*/ TX = 1.0e0 + 4.0e0 * ( beta * ( Vgp - Vbscl ) - 1.0e0 ) / ( fac1p2 * beta2 ) ; TX = Fn_Max( TX , epsm10 ) ; Ps0_iniA = Vgp + fac1p2 * beta * 0.5 * ( 1.0e0 - sqrt( TX ) ) ; /* use analytical value in subthreshold region. */ if ( Vgs < ( Vfb + Vth ) * 0.5 ) { flg_pprv = 0 ; } if ( flg_pprv >= 1 ) { /*---------------------------------------------------* * Use previous value. *-----------------*/ T1 = Ps0_dVbs * dVbs + Ps0_dVds * dVds + Ps0_dVgs * dVgs ; Ps0_ini = Ps0 + T1 ; T2 = here->HSMHV_ps0_dtemp_prv * Temp_dif ; if ( fabs( T1 + T2 ) < dP_max ) { Ps0_ini += T2 ; } if ( flg_pprv == 2 ) { /* TX_dVxs = d^2 Ps0 / d Vxs^2 here */ if ( Vbsc_dif2 > epsm10 ) { TX_dVbs = ( here->HSMHV_ps0_dvbs_prv - here->HSMHV_ps0_dvbs_prv2 ) / Vbsc_dif2 ; } else { TX_dVbs = 0.0 ; } if ( Vdsc_dif2 > epsm10 ) { TX_dVds = ( here->HSMHV_ps0_dvds_prv - here->HSMHV_ps0_dvds_prv2 ) / Vdsc_dif2 ; } else { TX_dVds = 0.0 ; } if ( Vgsc_dif2 > epsm10 ) { TX_dVgs = ( here->HSMHV_ps0_dvgs_prv - here->HSMHV_ps0_dvgs_prv2 ) / Vgsc_dif2 ; } else { TX_dVgs = 0.0 ; } T2 = ( dVbs * dVbs ) / 2 * TX_dVbs + ( dVds * dVds ) / 2 * TX_dVds + ( dVgs * dVgs ) / 2 * TX_dVgs ; if ( fabs( T2 ) < fabs( 0.5 * T1 ) ) { Ps0_ini += T2 ; } else { flg_pprv = 1 ; } } T1 = Ps0_ini - Ps0 ; if ( T1 < - dP_max || T1 > dP_max ) { flg_pprv = 0 ; /* flag changes to analytical */ } else { Ps0_iniA = Fn_Max( Ps0_ini , Ps0_iniA ) ; } } /* end of (flg_pprv >=1) if-block */ if ( flg_pprv == 0 ) { /*---------------------------------------------------* * Analytical initial guess. *-----------------*/ /*-------------------------------------------* * Common part. *-----------------*/ Chi = beta * ( Ps0_iniA - Vbscl ) ; if ( Chi < znbd3 ) { /*-----------------------------------* * zone-D1/D2 * - Ps0_ini is the analytical solution of Qs=Qb0 with * Qb0 being approximated to 3-degree polynomial. *-----------------*/ TY = beta * ( Vgp - Vbscl ) ; T1 = 1.0e0 / ( cn_nc3 * beta * fac1 ) ; T2 = 81.0 + 3.0 * T1 ; T3 = -2916.0 - 81.0 * T1 + 27.0 * T1 * TY ; T4 = 1458.0 - 81.0 * ( 54.0 + T1 ) + 27.0 * T1 * TY ; T4 = T4 * T4 ; T5 = Fn_Pow( T3 + sqrt( 4 * T2 * T2 * T2 + T4 ) , C_1o3 ) ; TX = 3.0 - ( C_2p_1o3 * T2 ) / ( 3.0 * T5 ) + 1 / ( 3.0 * C_2p_1o3 ) * T5 ; Ps0_iniA = TX * beta_inv + Vbscl ; Ps0_ini = Ps0_iniA ; } else if ( Vgs <= Vth ) { /*-----------------------------------* * Weak inversion zone. *-----------------*/ Ps0_ini = Ps0_iniA ; } else { /*-----------------------------------* * Strong inversion zone. * - Ps0_iniB : upper bound. *-----------------*/ T1 = 1.0 / cnst1 / cnstCoxi ; T2 = T1 * Vgp * Vgp ; T3 = beta + 2.0 / Vgp ; Ps0_iniB = log( T2 ) / T3 ; Fn_SU( Ps0_ini , Ps0_iniA, Ps0_iniB, c_ps0ini_2, T1) ; } } TX = Vbscl + ps_conv / 2 ; if ( Ps0_ini < TX ) Ps0_ini = TX ; /*---------------------------------------------------* * Assign initial guess. *-----------------*/ Ps0 = Ps0_ini ; Psl_lim = Ps0_iniA ; /*---------------------------------------------------* * Calculation of Ps0. (beginning of Newton loop) * - Fs0 : Fs0 = 0 is the equation to be solved. * - dPs0 : correction value. *-----------------*/ exp_bVbs = exp( beta * Vbscl ) ; cfs1 = cnst1 * exp_bVbs ; flg_conv = 0 ; for ( lp_s0 = 1 ; lp_s0 <= lp_s0_max + 1 ; lp_s0 ++ ) { Chi = beta * ( Ps0 - Vbscl ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0) * - Qb0 is approximated to 5-degree polynomial. *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; fs01 = cfs1 * fi * fi ; fs01_dPs0 = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fs02 = sqrt( fb * fb + fs01 ) ; fs02_dPs0 = ( beta * fb_dChi * 2 * fb + fs01_dPs0 ) / ( fs02 + fs02 ) ; } else { /*-------------------------------------------* * zone-D3. (Ps0) *-----------------*/ if ( Chi < large_arg ) { /* avoid exp_Chi to become extremely large */ exp_Chi = exp( Chi ) ; fs01 = cfs1 * ( exp_Chi - 1.0e0 ) ; fs01_dPs0 = cfs1 * beta * ( exp_Chi ) ; } else { exp_bPs0 = exp( beta*Ps0 ) ; fs01 = cnst1 * ( exp_bPs0 - exp_bVbs ) ; fs01_dPs0 = cnst1 * beta * exp_bPs0 ; } fs02 = sqrt( Chi - 1.0 + fs01 ) ; fs02_dPs0 = ( beta + fs01_dPs0 ) / ( fs02 + fs02 ) ; } /* end of if ( Chi ... ) else block */ Fs0 = Vgp - Ps0 - fac1 * fs02 ; Fs0_dPs0 = - 1.0e0 - fac1 * fs02_dPs0 ; if ( flg_conv == 1 ) break ; dPs0 = - Fs0 / Fs0_dPs0 ; /*-------------------------------------------* * Update Ps0 . * - clamped to Vbscl if Ps0 < Vbscl . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Ps0))) ; if ( fabs( dPs0 ) > dPlim ) dPs0 = dPlim * Fn_Sgn( dPs0 ) ; Ps0 = Ps0 + dPs0 ; TX = Vbscl + ps_conv / 2 ; if ( Ps0 < TX ) Ps0 = TX ; /*-------------------------------------------* * Check convergence. * NOTE: This condition may be too rigid. *-----------------*/ if ( fabs( dPs0 ) <= ps_conv && fabs( Fs0 ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Ps0 Newton loop */ /* Reduce loop count to exclude the sweep for derivative calculation */ lp_s0 -- ; /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM_HV): Went Over Iteration Maximum (Ps0)\n" ) ; fprintf( stderr , " Vbse = %7.3f Vdse = %7.3f Vgse = %7.3f\n" , Vbse , Vdse , Vgse ) ; if ( flg_info >= 2 ) { printf( "*** warning(HiSIM_HV): Went Over Iteration Maximum (Ps0)\n" ) ; } } /*---------------------------------------------------* * Evaluate derivatives of Ps0. * - note: Here, fs01_dVbs and fs02_dVbs are derivatives * w.r.t. explicit Vbs. So, Ps0 in the fs01 and fs02 * expressions is regarded as a constant. *-----------------*/ /* self heating */ Chi_dT = beta_dT *( Ps0 - Vbscl ) - beta * Vbscl_dT ; exp_bVbs_dT = ( beta_dT * Vbscl + beta * Vbscl_dT ) * exp_bVbs ; cfs1_dT = exp_bVbs * cnst1_dT + exp_bVbs_dT * cnst1 ; /* derivatives of fs0* w.r.t. explicit Vbs */ if ( Chi < znbd5 ) { fs01_dVbs = cfs1 * beta * fi * ( fi - 2 * fi_dChi ) * Vbscl_dVbs ; fs01_dT = cfs1 * 2 * fi * fi_dChi * Chi_dT + fi * fi * cfs1_dT ; T2 = 1.0e0 / ( fs02 + fs02 ) ; fs02_dVbs = ( - beta * Vbscl_dVbs * fb_dChi * 2 * fb + fs01_dVbs ) * T2 ; fs02_dT = ( 2 * fb * fb_dChi * Chi_dT + fs01_dT ) * T2 ; } else { if ( Chi < large_arg ) { fs01_dVbs = - cfs1 * beta * Vbscl_dVbs ; exp_Chi_dT = exp_Chi * Chi_dT ; fs01_dT = ( exp_Chi - 1.0e0 ) * cfs1_dT + cfs1 * exp_Chi_dT ; } else { fs01_dVbs = - cfs1 * beta * Vbscl_dVbs ; exp_bPs0_dT = exp_bPs0 * Ps0 * beta_dT ; fs01_dT = cnst1_dT*(exp_bPs0-exp_bVbs) + cnst1*(exp_bPs0_dT-exp_bVbs_dT) ; } T2 = 0.5e0 / fs02 ; fs02_dVbs = ( - beta * Vbscl_dVbs + fs01_dVbs ) * T2 ; fs02_dT = T2 * ( Chi_dT + fs01_dT ) ; } T1 = 1.0 / Fs0_dPs0 ; Ps0_dVbs = - ( Vgp_dVbs - ( fac1 * fs02_dVbs + fac1_dVbs * fs02 ) ) * T1 ; Ps0_dVds = - ( Vgp_dVds - fac1_dVds * fs02 ) * T1 ; Ps0_dVgs = - ( Vgp_dVgs - fac1_dVgs * fs02 ) * T1 ; Ps0_dT = - ( Vgp_dT - ( fac1 * fs02_dT + fac1_dT * fs02 ) ) * T1 ; Chi_dT = beta_dT *( Ps0 - Vbscl ) + beta * ( Ps0_dT - Vbscl_dT ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0) * Xi0 := fdep0^2 = fb * fb [D1,D2] *-----------------*/ Xi0 = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xi0_dVbs = T1 * ( Ps0_dVbs - Vbscl_dVbs ) ; Xi0_dVds = T1 * Ps0_dVds ; Xi0_dVgs = T1 * Ps0_dVgs ; Xi0_dT = 2 * fb * fb_dChi * Chi_dT ; Xi0p12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xi0p12_dVbs = T1 * ( Ps0_dVbs - Vbscl_dVbs ) ; Xi0p12_dVds = T1 * Ps0_dVds ; Xi0p12_dVgs = T1 * Ps0_dVgs ; Xi0p12_dT = fb_dChi * Chi_dT ; Xi0p32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xi0p32_dVbs = T1 * ( Ps0_dVbs - Vbscl_dVbs ) ; Xi0p32_dVds = T1 * Ps0_dVds ; Xi0p32_dVgs = T1 * Ps0_dVgs ; Xi0p32_dT = 3 * fb * fb * fb_dChi * Chi_dT ; fs01_dT = cfs1 * 2 * fi * fi_dChi * Chi_dT + fi * fi * cfs1_dT ; fs02_dT = ( 2 * fb * fb_dChi * Chi_dT + fs01_dT ) * T2 ; } else { /*-------------------------------------------* * zone-D3. (Ps0) *-----------------*/ flg_zone = 3 ; flg_noqi = 0 ; /*-----------------------------------* * Xi0 := fdep0^2 = Chi - 1 = beta * ( Ps0 - Vbscl ) - 1 [D3] *-----------------*/ Xi0 = Chi - 1.0e0 ; Xi0_dVbs = beta * ( Ps0_dVbs - Vbscl_dVbs ) ; Xi0_dVds = beta * Ps0_dVds ; Xi0_dVgs = beta * Ps0_dVgs ; Xi0_dT = Chi_dT ; Xi0p12 = sqrt( Xi0 ) ; T1 = 0.5e0 / Xi0p12 ; Xi0p12_dVbs = T1 * Xi0_dVbs ; Xi0p12_dVds = T1 * Xi0_dVds ; Xi0p12_dVgs = T1 * Xi0_dVgs ; Xi0p12_dT = T1 * Xi0_dT ; Xi0p32 = Xi0 * Xi0p12 ; T1 = 1.5e0 * Xi0p12 ; Xi0p32_dVbs = T1 * Xi0_dVbs ; Xi0p32_dVds = T1 * Xi0_dVds ; Xi0p32_dVgs = T1 * Xi0_dVgs ; Xi0p32_dT = T1 * Xi0_dT ; if ( Chi < large_arg ) { exp_Chi_dT = exp_Chi * Chi_dT ; fs01_dT = ( exp_Chi - 1.0e0 ) * cfs1_dT + cfs1 * exp_Chi_dT ; } else { exp_bPs0_dT = exp_bPs0 * (beta_dT * Ps0 + beta * Ps0_dT) ; fs01_dT = cnst1_dT*(exp_bPs0-exp_bVbs) + cnst1*(exp_bPs0_dT-exp_bVbs_dT) ; } fs02_dT = T2 * ( Chi_dT + fs01_dT ) ; } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * - Recalculate the derivatives of fs01 and fs02. * note: fs01 = cnst1 * exp( Vbs ) * ( exp( Chi ) - Chi - 1.0e0 ) ; * fs02 = sqrt( Xi0 + fs01 ) ; *-----------------*/ fs01_dVbs = Ps0_dVbs * fs01_dPs0 + fs01_dVbs ; fs01_dVds = Ps0_dVds * fs01_dPs0 ; fs01_dVgs = Ps0_dVgs * fs01_dPs0 ; fs02_dVbs = Ps0_dVbs * fs02_dPs0 + fs02_dVbs ; fs02_dVds = Ps0_dVds * fs02_dPs0 ; fs02_dVgs = Ps0_dVgs * fs02_dPs0 ; /*-----------------------------------------------------------* * Qb0 : Qb at source side. * Qn0 : Qi at source side. *-----------------*/ Qb0 = cnst0 * Xi0p12 ; Qb0_dVb = cnst0 * Xi0p12_dVbs ; Qb0_dVd = cnst0 * Xi0p12_dVds ; Qb0_dVg = cnst0 * Xi0p12_dVgs ; Qb0_dT = cnst0 * Xi0p12_dT + cnst0_dT * Xi0p12 ; T1 = 1.0 / ( fs02 + Xi0p12 ) ; Qn0 = cnst0 * fs01 * T1 ; T1_dT = - T1 * T1 * ( fs02_dT + Xi0p12_dT ) ; Qn0_dT = cnst0 * ( fs01 * T1_dT + T1 * fs01_dT ) + fs01 * T1 * cnst0_dT ; T2 = 1.0 / ( fs01 + epsm10 ) ; Qn0_dVbs = Qn0 * ( fs01_dVbs * T2 - ( fs02_dVbs + Xi0p12_dVbs ) * T1 ) ; Qn0_dVds = Qn0 * ( fs01_dVds * T2 - ( fs02_dVds + Xi0p12_dVds ) * T1 ) ; Qn0_dVgs = Qn0 * ( fs01_dVgs * T2 - ( fs02_dVgs + Xi0p12_dVgs ) * T1 ) ; /*-----------------------------------------------------------* * zone-D1 and D2 *-----------------*/ if ( Chi < znbd5 ) { if ( Chi < znbd3 ) { /*-------------------------------------------* * zone-D1. (Ps0) *-----------------*/ flg_zone = 1 ; flg_noqi = 1 ; /** !! to be revisited !! **/ Qiu = Qn0 ; Qiu_dVbs = Qn0_dVbs ; Qiu_dVds = Qn0_dVds ; Qiu_dVgs = Qn0_dVgs ; Qiu_dT = Qn0_dT; Qbu = Qb0 ; Qbu_dVbs = Qb0_dVb ; Qbu_dVds = Qb0_dVd ; Qbu_dVgs = Qb0_dVg ; Qbu_dT = Qb0_dT ; Qdrat = 0.5 ; Qdrat_dVbs = 0.0 ; Qdrat_dVds = 0.0 ; Qdrat_dVgs = 0.0 ; Qdrat_dT = 0.0; Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; Lred_dT = 0.0e0 ; /** (reminder) *Psdl = Psl ; *Psdl_dVbs = Psl_dVbs ; *Psdl_dVds = Psl_dVds ; *Psdl_dVgs = Psl_dVgs ; **/ } else { /*-------------------------------------------* * zone-D2 (Ps0) *-----------------*/ flg_zone = 2 ; flg_noqi = 0 ; /*-----------------------------------------------------------* * FD2 : connecting function for zone-D2. * - Qiu, Qbu, Qdrat and Lred should be interpolated later. *-----------------*/ T1 = 1.0 / ( znbd5 - znbd3 ) ; TX = T1 * ( Chi - znbd3 ) ; TX_dVbs = beta * T1 * ( Ps0_dVbs - Vbscl_dVbs ) ; TX_dVds = beta * T1 * Ps0_dVds ; TX_dVgs = beta * T1 * Ps0_dVgs ; TX_dT = T1 * Chi_dT ; FD2 = TX * TX * TX * ( 10.0 + TX * ( -15.0 + TX * 6.0 ) ) ; T4 = TX * TX * ( 30.0 + TX * ( -60.0 + TX * 30.0 ) ) ; FD2_dVbs = T4 * TX_dVbs ; FD2_dVds = T4 * TX_dVds ; FD2_dVgs = T4 * TX_dVgs ; FD2_dT = T4 * TX_dT ; } /* end of zone-D2 */ } /*---------------------------------------------------* * VgVt : Vgp - Vth_qi. ( Vth_qi is Vth for Qi evaluation. ) *-----------------*/ VgVt = Qn0 * Cox_inv ; VgVt_dVbs = Qn0_dVbs * Cox_inv + Qn0 * Cox_inv_dVb ; VgVt_dVds = Qn0_dVds * Cox_inv + Qn0 * Cox_inv_dVd ; VgVt_dVgs = Qn0_dVgs * Cox_inv + Qn0 * Cox_inv_dVg ; VgVt_dT = Qn0_dT * Cox_inv ; /*-----------------------------------------------------------* * make Qi=Qd=Ids=0 if VgVt <= VgVt_small *-----------------*/ if ( VgVt <= VgVt_small ) { flg_zone = 4 ; flg_noqi = 1 ; Psl = Ps0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVds = Ps0_dVds ; Psl_dVgs = Ps0_dVgs ; Psl_dT = Ps0_dT ; /** (reminder) *Psdl = Psl ; *Psdl_dVbs = Psl_dVbs ; *Psdl_dVds = Psl_dVds ; *Psdl_dVgs = Psl_dVgs ; **/ Pds = 0.0 ; Pds_dVbs = 0.0 ; Pds_dVds = 0.0 ; Pds_dVgs = 0.0 ; Pds_dT = 0.0 ; Qbu = Qb0 ; Qbu_dVbs = Qb0_dVb ; Qbu_dVds = Qb0_dVd ; Qbu_dVgs = Qb0_dVg ; Qbu_dT = Qb0_dT ; Qiu = 0.0 ; Qiu_dVbs = 0.0 ; Qiu_dVds = 0.0 ; Qiu_dVgs = 0.0 ; Qiu_dT = 0.0 ; Qdrat = 0.5 ; Qdrat_dVbs = 0.0 ; Qdrat_dVds = 0.0 ; Qdrat_dVgs = 0.0 ; Qdrat_dT = 0.0 ; Lred = 0.0 ; Lred_dVbs = 0.0 ; Lred_dVds = 0.0 ; Lred_dVgs = 0.0 ; Lred_dT = 0.0 ; Ids = 0.0e0 ; Ids_dVbs = 0.0e0 ; Ids_dVds = 0.0e0 ; Ids_dVgs = 0.0e0 ; Ids_dT = 0.0e0 ; goto end_of_part_1 ; } /*-----------------------------------------------------------* * Start point of Psl (= Ps0 + Pds) calculation. (label) *-----------------*/ /* start_of_Psl:*/ /* Vdseff (begin) */ Vdsorg = Vds ; T2 = here->HSMHV_qnsub_esi / ( Cox * Cox ) ; T4 = - 2.0e0 * T2 / Cox ; T2_dVb = T4 * Cox_dVb ; T2_dVd = T4 * Cox_dVd ; T2_dVg = T4 * Cox_dVg ; T0 = Vgp - beta_inv - Vbsz ; T0_dT = Vgp_dT - beta_inv_dT - Vbsz_dT ; Fn_SZ( T9, 1.0e0 + 2.0e0 / T2 * T0, 1e-3, TX ) ; T3 = sqrt( T9 ) ; T4 = 0.5e0 / T3 ; T5 = 1.0e0 / ( T2 * T2 ) ; T6 = T4 * 2.0e0 * T5 * TX ; T7 = T6 * T0 ; T8 = T6 * T2 ; T3_dVb = - T2_dVb * T7 + T8 * ( Vgp_dVbs - Vbsz_dVbs ) ; T3_dVd = - T2_dVd * T7 + T8 * ( Vgp_dVds - Vbsz_dVds ) ; T3_dVg = - T2_dVg * T7 + T8 * Vgp_dVgs ; T3_dT = T0_dT / ( T2 * T3 ) ; T10 = Vgp + T2 * ( 1.0e0 - T3 ) ; T10_dVb = Vgp_dVbs + T2_dVb * ( 1.0e0 - T3 ) - T2 * T3_dVb ; T10_dVd = Vgp_dVds + T2_dVd * ( 1.0e0 - T3 ) - T2 * T3_dVd ; T10_dVg = Vgp_dVgs + T2_dVg * ( 1.0e0 - T3 ) - T2 * T3_dVg ; T10_dT = Vgp_dT - T2 * T3_dT ; Fn_SZ( T10 , T10 , 0.01 , T0 ) ; T10_dVb *= T0 ; T10_dVd *= T0 ; T10_dVg *= T0 ; T10_dT *= T0 ; T1 = Vds / T10 + small ; T2 = Fn_Pow( T1 , here->HSMHV_ddlt - 1.0e0 ) ; T7 = T2 * T1 ; T0 = here->HSMHV_ddlt * T2 / ( T10 * T10 ) ; T7_dVb = T0 * ( - Vds * T10_dVb ) ; T7_dVd = T0 * ( T10 - Vds * T10_dVd ) ; T7_dVg = T0 * ( - Vds * T10_dVg ) ; T7_dT = T0 * ( - Vds * T10_dT ) ; T3 = 1.0 + T7 ; T4 = Fn_Pow( T3 , 1.0 / here->HSMHV_ddlt - 1.0 ) ; T6 = T4 * T3 ; T0 = T4 / here->HSMHV_ddlt ; T6_dVb = T0 * T7_dVb ; T6_dVd = T0 * T7_dVd ; T6_dVg = T0 * T7_dVg ; T6_dT = T0 * T7_dT ; Vdseff = Vds / T6 ; T0 = 1.0 / ( T6 * T6 ) ; Vdseff_dVbs = - Vds * T6_dVb * T0 ; Vdseff_dVds = ( T6 - Vds * T6_dVd ) * T0 ; Vdseff_dVgs = - Vds * T6_dVg * T0 ; Vdseff_dT = - Vds * T6_dT * T0 ; Vds = Vdseff ; /* Vdseff (end) */ exp_bVbsVds = exp( beta * ( Vbscl - Vds ) ) ; exp_bVbsVds_dT = ( beta_dT * ( Vbscl - Vds ) + beta * (Vbscl_dT - Vdseff_dT) ) * exp_bVbsVds ; /*---------------------------------------------------* * Skip Psl calculation when Vds is very small. *-----------------*/ if ( Vds <= 0.0 ) { Pds = 0.0 ; Psl = Ps0 ; // flg_conv = 1 ; goto start_of_loopl ; } /*-----------------------------------------------------------* * Initial guess for Pds ( = Psl - Ps0 ). *-----------------*/ if ( flg_pprv >= 1 ) { /*---------------------------------------------------* * Use previous value. *-----------------*/ T1 = Pds_dVbs * dVbs + Pds_dVds * dVds + Pds_dVgs * dVgs ; Pds_ini = Pds + T1 ; /* self heating */ T2 = here->HSMHV_pds_dtemp_prv * Temp_dif ; if ( fabs( T1 + T2 ) < dP_max ) { Pds_ini += T2 ; } if ( flg_pprv == 2 ) { /* TX_dVxs = d^2 Pds / d Vxs^2 here */ if ( Vbsc_dif2 > epsm10 ) { TX_dVbs = ( here->HSMHV_pds_dvbs_prv - here->HSMHV_pds_dvbs_prv2 ) / Vbsc_dif2 ; } else { TX_dVbs = 0.0 ; } if ( Vdsc_dif2 > epsm10 ) { TX_dVds = ( here->HSMHV_pds_dvds_prv - here->HSMHV_pds_dvds_prv2 ) / Vdsc_dif2 ; } else { TX_dVds = 0.0 ; } if ( Vgsc_dif2 > epsm10 ) { TX_dVgs = ( here->HSMHV_pds_dvgs_prv - here->HSMHV_pds_dvgs_prv2 ) / Vgsc_dif2 ; } else { TX_dVgs = 0.0 ; } T2 = ( dVbs * dVbs ) / 2 * TX_dVbs + ( dVds * dVds ) / 2 * TX_dVds + ( dVgs * dVgs ) / 2 * TX_dVgs ; if ( fabs( T2 ) < fabs( 0.5 * T1 ) ) { Pds_ini += T2 ; } else { flg_pprv = 1 ; } } T1 = Pds_ini - Pds ; if ( T1 < - dP_max || T1 > dP_max ) flg_pprv = 0 ; /* flag changes */ } /* end of (flg_pprv>=1) if-block */ if ( flg_pprv == 0 ) { /*---------------------------------------------------* * Analytical initial guess. *-----------------*/ Pds_max = Fn_Max( Psl_lim - Ps0 , 0.0e0 ) ; Fn_SU( Pds_ini , Vds, (1.0e0 + c_pslini_1) * Pds_max, c_pslini_2, T1 ) ; Pds_ini = Fn_Min( Pds_ini , Pds_max ) ; } if ( Pds_ini < 0.0 ) Pds_ini = 0.0 ; else if ( Pds_ini > Vds ) Pds_ini = Vds ; /*---------------------------------------------------* * Assign initial guess. *-----------------*/ Pds = Pds_ini ; Psl = Ps0 + Pds ; TX = Vbscl + ps_conv / 2 ; if ( Psl < TX ) Psl = TX ; /*---------------------------------------------------* * Calculation of Psl by solving Poisson eqn. * (beginning of Newton loop) * - Fsl : Fsl = 0 is the equation to be solved. * - dPsl : correction value. *-----------------*/ flg_conv = 0 ; /*---------------------------------------------------* * start of Psl calculation. (label) *-----------------*/ start_of_loopl: for ( lp_sl = 1 ; lp_sl <= lp_sl_max + 1 ; lp_sl ++ ) { Chi = beta * ( Psl - Vbscl ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D2. (Psl) * - Qb0 is approximated to 5-degree polynomial. *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; cfs1 = cnst1 * exp_bVbsVds ; fsl1 = cfs1 * fi * fi ; fsl1_dPsl = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fsl2 = sqrt( fb * fb + fsl1 ) ; fsl2_dPsl = ( beta * fb_dChi * 2 * fb + fsl1_dPsl ) / ( fsl2 + fsl2 ) ; } else { /*-------------------------------------------* * zone-D3. (Psl) *-----------------*/ Rho = beta * ( Psl - Vds ) ; exp_Rho = exp( Rho ) ; fsl1 = cnst1 * ( exp_Rho - exp_bVbsVds ) ; fsl1_dPsl = cnst1 * beta * ( exp_Rho ) ; Xil = Chi - 1.0e0 ; fsl2 = sqrt( Xil + fsl1 ) ; fsl2_dPsl = ( beta + fsl1_dPsl ) / ( fsl2 + fsl2 ) ; } Fsl = Vgp - Psl - fac1 * fsl2 ; Fsl_dPsl = - 1.0e0 - fac1 * fsl2_dPsl ; if ( flg_conv == 1 ) break ; dPsl = - Fsl / Fsl_dPsl ; /*-------------------------------------------* * Update Psl . * - clamped to Vbscl if Psl < Vbscl . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Psl))) ; if ( fabs( dPsl ) > dPlim ) dPsl = dPlim * Fn_Sgn( dPsl ) ; if (Psl + dPsl < Ps0 ) { dPsl = Ps0 - Psl; Psl = Ps0 ; } else { Psl = Psl + dPsl ; } TX = Vbscl + ps_conv / 2 ; if ( Psl < TX ) Psl = TX ; /*-------------------------------------------* * Check convergence. * NOTE: This condition may be too rigid. *-----------------*/ if ( fabs( dPsl ) <= ps_conv && fabs( Fsl ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Psl Newton loop */ /* Reduce loop count to exclude derivative calculation sweep */ lp_sl -- ; /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM_HV): Went Over Iteration Maximum (Psl)\n" ) ; fprintf( stderr , " Vbse = %7.3f Vdse = %7.3f Vgse = %7.3f\n" , Vbse , Vdse , Vgse ) ; if ( flg_info >= 2 ) { printf("*** warning(HiSIM_HV): Went Over Iteration Maximum (Psl)\n" ) ; } } /*---------------------------------------------------* * Evaluate derivatives of Psl. * - note: Here, fsl1_dVbs and fsl2_dVbs are derivatives * w.r.t. explicit Vbscl. So, Psl in the fsl1 and fsl2 * expressions is regarded as a constant. *-----------------*/ Chi_dT = ( Psl - Vbscl ) * beta_dT - Vbscl_dT * beta ; if ( Chi < znbd5 ) { T1 = cfs1 * beta * fi ; fsl1_dVbs = T1 * ( ( Vbscl_dVbs - Vdseff_dVbs ) * fi - 2.0 * fi_dChi * Vbscl_dVbs ) ; fsl1_dVds = - T1 * fi * Vdseff_dVds ; fsl1_dVgs = - T1 * fi * Vdseff_dVgs ; cfs1_dT = exp_bVbsVds * cnst1_dT + cnst1 * exp_bVbsVds_dT ; fsl1_dT = fi * fi * cfs1_dT + 2 * cfs1 * fi * fi_dChi * Chi_dT ; T2 = 0.5 / fsl2 ; fsl2_dVbs = ( - beta * fb_dChi * 2 * fb * Vbscl_dVbs + fsl1_dVbs ) * T2 ; fsl2_dVds = fsl1_dVds * T2 ; fsl2_dVgs = fsl1_dVgs * T2 ; fsl2_dT = ( 2 * fb * fb_dChi * Chi_dT + fsl1_dT ) * T2 ; } else { Rho_dT = beta_dT * ( Psl - Vds ) - beta * Vdseff_dT ; exp_Rho_dT = Rho_dT * exp_Rho ; T1 = cnst1 * beta ; fsl1_dVbs = - T1 * ( exp_Rho * Vdseff_dVbs + ( Vbscl_dVbs - Vdseff_dVbs ) * exp_bVbsVds ); fsl1_dVds = - T1 * Vdseff_dVds * ( exp_Rho - exp_bVbsVds ); fsl1_dVgs = T1 * Vdseff_dVgs * ( - exp_Rho + exp_bVbsVds ); fsl1_dT = cnst1 * ( exp_Rho_dT - exp_bVbsVds_dT ) + cnst1_dT * ( exp_Rho - exp_bVbsVds ) ; T2 = 0.5e0 / fsl2 ; fsl2_dVbs = ( - beta * Vbscl_dVbs + fsl1_dVbs ) * T2 ; fsl2_dVds = ( fsl1_dVds ) * T2 ; fsl2_dVgs = ( fsl1_dVgs ) * T2 ; fsl2_dT = ( Chi_dT + fsl1_dT ) * T2 ; } T1 = 1.0 / Fsl_dPsl ; Psl_dVbs = - ( Vgp_dVbs - ( fac1 * fsl2_dVbs + fac1_dVbs * fsl2 ) ) * T1 ; Psl_dVds = - ( Vgp_dVds - ( fac1 * fsl2_dVds + fac1_dVds * fsl2 ) ) * T1 ; Psl_dVgs = - ( Vgp_dVgs - ( fac1 * fsl2_dVgs + fac1_dVgs * fsl2 ) ) * T1 ; Psl_dT = - ( Vgp_dT - ( fac1 * fsl2_dT + fac1_dT * fsl2 ) ) * T1 ; Chi_dT = ( Psl - Vbscl ) * beta_dT + beta * ( Psl_dT - Vbscl_dT ); exp_Chi_dT = exp_Chi * Chi_dT ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Psl) *-----------------*/ Xil = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xil_dVbs = T1 * ( Psl_dVbs - Vbscl_dVbs ) ; Xil_dVds = T1 * Psl_dVds ; Xil_dVgs = T1 * Psl_dVgs ; Xil_dT = 2 * fb * fb_dChi * Chi_dT ; Xilp12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xilp12_dVbs = T1 * ( Psl_dVbs - Vbscl_dVbs ) ; Xilp12_dVds = T1 * Psl_dVds ; Xilp12_dVgs = T1 * Psl_dVgs ; Xilp12_dT = fb_dChi * Chi_dT ; Xilp32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xilp32_dVbs = T1 * ( Psl_dVbs - Vbscl_dVbs ) ; Xilp32_dVds = T1 * Psl_dVds ; Xilp32_dVgs = T1 * Psl_dVgs ; Xilp32_dT = 3 * fb * fb * fb_dChi * Chi_dT ; } else { /*-------------------------------------------* * zone-D3. (Psl) *-----------------*/ Xil = Chi - 1.0e0 ; Xil_dVbs = beta * ( Psl_dVbs - Vbscl_dVbs ) ; Xil_dVds = beta * Psl_dVds ; Xil_dVgs = beta * Psl_dVgs ; Xil_dT = Chi_dT ; Xilp12 = sqrt( Xil ) ; T1 = 0.5e0 / Xilp12 ; Xilp12_dVbs = T1 * Xil_dVbs ; Xilp12_dVds = T1 * Xil_dVds ; Xilp12_dVgs = T1 * Xil_dVgs ; Xilp12_dT = T1 * Xil_dT ; Xilp32 = Xil * Xilp12 ; T1 = 1.5e0 * Xilp12 ; Xilp32_dVbs = T1 * Xil_dVbs ; Xilp32_dVds = T1 * Xil_dVds ; Xilp32_dVgs = T1 * Xil_dVgs ; Xilp32_dT = T1 * Xil_dT ; } /*---------------------------------------------------* * Assign Pds. *-----------------*/ Pds = Psl - Ps0 ; /* if ( Pds < ps_conv ) { */ if ( Pds < 0.0 ) { /* take care of numerical noise */ Pds = 0.0 ; Psl = Ps0 ; } Pds_dVbs = Psl_dVbs - Ps0_dVbs ; Pds_dVds = Psl_dVds - Ps0_dVds ; Pds_dVgs = Psl_dVgs - Ps0_dVgs ; Pds_dT = Psl_dT - Ps0_dT ; /* if ( Pds < ps_conv ) { */ if ( Pds < 0.0 ) { Pds_dVbs = 0.0 ; Pds_dVgs = 0.0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVgs = Ps0_dVgs ; Pds_dT = 0.0 ; Psl_dT = Ps0_dT ; } /* Vdseff */ Vds = Vdsorg; /*-----------------------------------------------------------* * Evaluate Idd. * - Eta : substantial variable of QB'/Pds and Idd/Pds. * - note: Eta = 4 * GAMMA_{hisim_0} *-----------------*/ T1 = beta / Xi0 ; Eta = T1 * Pds ; T2 = Eta * beta_inv ; Eta_dVbs = T1 * ( Pds_dVbs - Xi0_dVbs * T2 ) ; Eta_dVds = T1 * ( Pds_dVds - Xi0_dVds * T2 ) ; Eta_dVgs = T1 * ( Pds_dVgs - Xi0_dVgs * T2 ) ; T1_dT = ( beta_dT * Xi0 - beta * Xi0_dT ) / Xi0 / Xi0 ; Eta_dT = T1_dT * Pds + T1 * Pds_dT ; /* ( Eta + 1 )^n */ Eta1 = Eta + 1.0e0 ; Eta1p12 = sqrt( Eta1 ) ; Eta1p32 = Eta1p12 * Eta1 ; Eta1p52 = Eta1p32 * Eta1 ; Eta1_dT = Eta_dT ; Eta1p12_dT = 0.5e0 / Eta1p12 * Eta1_dT ; Eta1p32_dT = Eta1p12_dT * Eta1 + Eta1p12 * Eta1_dT ; Eta1p52_dT = Eta1p32_dT * Eta1 + Eta1p32 * Eta1_dT ; /* 1 / ( ( Eta + 1 )^n + 1 ) */ Zeta12 = 1.0e0 / ( Eta1p12 + 1.0e0 ) ; Zeta32 = 1.0e0 / ( Eta1p32 + 1.0e0 ) ; Zeta52 = 1.0e0 / ( Eta1p52 + 1.0e0 ) ; Zeta12_dT = - 1.0e0 / ( Eta1p12 + 1.0e0 ) / ( Eta1p12 + 1.0e0 ) * Eta1p12_dT ; Zeta32_dT = - 1.0e0 / ( Eta1p32 + 1.0e0 ) / ( Eta1p32 + 1.0e0 ) * Eta1p32_dT ; Zeta52_dT = - 1.0e0 / ( Eta1p52 + 1.0e0 ) / ( Eta1p52 + 1.0e0 ) * Eta1p52_dT ; /*---------------------------------------------------* * F00 := PS00/Pds (n=1/2) *-----------------*/ F00 = Zeta12 / Xi0p12 ; T3 = - 1 / Xi0 ; T4 = - 0.5e0 / Eta1p12 * F00 ; T5 = Zeta12 * T3 ; T6 = Zeta12 * T4 ; F00_dVbs = ( Xi0p12_dVbs * T5 + Eta_dVbs * T6 ) ; F00_dVds = ( Xi0p12_dVds * T5 + Eta_dVds * T6 ) ; F00_dVgs = ( Xi0p12_dVgs * T5 + Eta_dVgs * T6 ) ; F00_dT = ( Zeta12_dT * Xi0p12 - Zeta12 * Xi0p12_dT ) / Xi0p12 / Xi0p12 ; /*---------------------------------------------------* * F10 := PS10/Pds (n=3/2) *-----------------*/ T1 = 3.0e0 + Eta * ( 3.0e0 + Eta ) ; F10 = C_2o3 * Xi0p12 * Zeta32 * T1 ; T2 = 3.0e0 + Eta * 2.0e0 ; T3 = C_2o3 * T1 ; T4 = - 1.5e0 * Eta1p12 * F10 + C_2o3 * Xi0p12 * T2 ; T5 = Zeta32 * T3 ; T6 = Zeta32 * T4 ; F10_dVbs = ( Xi0p12_dVbs * T5 + Eta_dVbs * T6 ) ; F10_dVds = ( Xi0p12_dVds * T5 + Eta_dVds * T6 ) ; F10_dVgs = ( Xi0p12_dVgs * T5 + Eta_dVgs * T6 ) ; T1_dT = Eta_dT * ( 3.0e0 + Eta ) + Eta * Eta_dT ; F10_dT = C_2o3 * Xi0p12 * Zeta32 * T1_dT + C_2o3 * T1 * ( Xi0p12 * Zeta32_dT + Zeta32 * Xi0p12_dT ) ; /*---------------------------------------------------* * F30 := PS30/Pds (n=5/2) *-----------------*/ T1 = 5e0 + Eta * ( 10e0 + Eta * ( 10e0 + Eta * ( 5e0 + Eta ) ) ) ; F30 = 4e0 / ( 15e0 * beta ) * Xi0p32 * Zeta52 * T1 ; T2 = 10e0 + Eta * ( 20e0 + Eta * ( 15e0 + Eta * 4e0 ) ) ; T3 = 4e0 / ( 15e0 * beta ) * T1 ; T4 = - ( 5e0 / 2e0 ) * Eta1p32 * F30 + 4e0 / ( 15e0 * beta ) * Xi0p32 * T2 ; T5 = Zeta52 * T3 ; T6 = Zeta52 * T4 ; F30_dVbs = ( Xi0p32_dVbs * T5 + Eta_dVbs * T6 ) ; F30_dVds = ( Xi0p32_dVds * T5 + Eta_dVds * T6 ) ; F30_dVgs = ( Xi0p32_dVgs * T5 + Eta_dVgs * T6 ) ; T1_dT = ( 10e0 + 20e0 * Eta + 15e0 * Eta * Eta + 4e0 * Eta * Eta * Eta ) * Eta_dT ; F30_dT = 4e0 / 15e0 * beta_inv_dT * ( Xi0p32 * Zeta52 * T1 ) + 4e0 / 15e0 * beta_inv * ( Xi0p32_dT * Zeta52 * T1 + Xi0p32 * Zeta52_dT * T1 + Xi0p32 * Zeta52 * T1_dT ) ; /*---------------------------------------------------* * F11 := PS11/Pds. *-----------------*/ F11 = Ps0 * F10 + C_2o3 * beta_inv * Xilp32 - F30 ; T1 = C_2o3 * beta_inv ; F11_dVbs = Ps0_dVbs * F10 + Ps0 * F10_dVbs + T1 * Xilp32_dVbs - F30_dVbs ; F11_dVds = Ps0_dVds * F10 + Ps0 * F10_dVds + T1 * Xilp32_dVds - F30_dVds ; F11_dVgs = Ps0_dVgs * F10 + Ps0 * F10_dVgs + T1 * Xilp32_dVgs - F30_dVgs ; F11_dT = Ps0_dT * F10 + Ps0 * F10_dT + C_2o3 *( beta_inv_dT * Xilp32 + beta_inv * Xilp32_dT ) - F30_dT ; /*---------------------------------------------------* * Fdd := Idd/Pds. *-----------------*/ T1 = Vgp + beta_inv - 0.5e0 * ( 2.0e0 * Ps0 + Pds ) ; T2 = - F10 + F00 ; T3 = beta * Cox ; T4 = beta * cnst0 ; Fdd = T3 * T1 + T4 * T2 ; Fdd_dVbs = T3 * ( Vgp_dVbs - Ps0_dVbs - 0.5e0 * Pds_dVbs ) + beta * Cox_dVb * T1 + T4 * ( - F10_dVbs + F00_dVbs ) ; Fdd_dVds = T3 * ( Vgp_dVds - Ps0_dVds - 0.5e0 * Pds_dVds ) + beta * Cox_dVd * T1 + T4 * ( - F10_dVds + F00_dVds ) ; Fdd_dVgs = T3 * ( Vgp_dVgs - Ps0_dVgs - 0.5e0 * Pds_dVgs ) + beta * Cox_dVg * T1 + T4 * ( - F10_dVgs + F00_dVgs ) ; T1_dT = Vgp_dT + beta_inv_dT - 0.5e0 * ( 2.0e0 * Ps0_dT + Pds_dT ) ; T2_dT = -F10_dT + F00_dT ; T3_dT = Cox * beta_dT ; T4_dT = beta * cnst0_dT + cnst0 * beta_dT ; Fdd_dT = T1 * T3_dT + T3 * T1_dT + T2 * T4_dT + T4 * T2_dT ; /*---------------------------------------------------* * Idd: *-----------------*/ Idd = Pds * Fdd ; Idd_dVbs = Pds_dVbs * Fdd + Pds * Fdd_dVbs ; Idd_dVds = Pds_dVds * Fdd + Pds * Fdd_dVds ; Idd_dVgs = Pds_dVgs * Fdd + Pds * Fdd_dVgs ; Idd_dT = Fdd * Pds_dT + Pds * Fdd_dT ; /*-----------------------------------------------------------* * Skip CLM and integrated charges if zone==D1 *-----------------*/ if( flg_zone == 1 ) { goto start_of_mobility ; } /*-----------------------------------------------------------* * Channel Length Modulation. Lred: \Delta L *-----------------*/ if( pParam->HSMHV_clm2 < epsm10 && pParam->HSMHV_clm3 < epsm10 ) { Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; Lred_dT = 0.0e0 ; Psdl = Psl ; Psdl_dVbs = Psl_dVbs ; Psdl_dVds = Psl_dVds ; Psdl_dVgs = Psl_dVgs ; Psdl_dT = Psl_dT ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; Psdl_dT = Ps0_dT ; } } else { T1 = here->HSMHV_wdpl ; T8 = sqrt (Psl - Vbscl) ; Wd = T1 * T8 ; T9 = 0.5 * T1 / T8 ; Wd_dVbs = T9 * (Psl_dVbs - Vbscl_dVbs) ; Wd_dVds = T9 * Psl_dVds ; Wd_dVgs = T9 * Psl_dVgs ; Wd_dT = T9 * (Psl_dT - Vbscl_dT) ; T0 = 1.0 / Wd ; T1 = Qn0 * T0 ; T2 = pParam->HSMHV_clm3 * T1 ; T3 = pParam->HSMHV_clm3 * T0 ; T2_dVb = T3 * (Qn0_dVbs - T1 * Wd_dVbs) ; T2_dVd = T3 * (Qn0_dVds - T1 * Wd_dVds) ; T2_dVg = T3 * (Qn0_dVgs - T1 * Wd_dVgs) ; T2_dT = T3 * (Qn0_dT - T1 * Wd_dT) ; T5 = pParam->HSMHV_clm2 * q_Nsub + T2 ; T1 = 1.0 / T5 ; T4 = C_ESI * T1 ; T4_dVb = - T4 * T2_dVb * T1 ; T4_dVd = - T4 * T2_dVd * T1 ; T4_dVg = - T4 * T2_dVg * T1 ; T4_dT = -T4 * T2_dT * T1 ; T1 = (1.0e0 - pParam->HSMHV_clm1) ; Psdl = pParam->HSMHV_clm1 * (Vds + Ps0) + T1 * Psl ; Psdl_dVbs = pParam->HSMHV_clm1 * Ps0_dVbs + T1 * Psl_dVbs ; Psdl_dVds = pParam->HSMHV_clm1 * (1.0 + Ps0_dVds) + T1 * Psl_dVds ; Psdl_dVgs = pParam->HSMHV_clm1 * Ps0_dVgs + T1 * Psl_dVgs ; Psdl_dT = pParam->HSMHV_clm1 * Ps0_dT + T1 * Psl_dT ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; Psdl_dT = Ps0_dT ; } T6 = Psdl - Psl ; T6_dVb = Psdl_dVbs - Psl_dVbs ; T6_dVd = Psdl_dVds - Psl_dVds ; T6_dVg = Psdl_dVgs - Psl_dVgs ; T6_dT = Psdl_dT - Psl_dT ; T3 = beta * Qn0 ; T1 = 1.0 / T3 ; T5 = Idd * T1 ; T3_dT = beta * Qn0_dT + beta_dT * Qn0 ; T1_dT = - T1 * T1 * T3_dT ; T5_dT = Idd_dT * T1 + Idd * T1_dT ; T2 = T5 * beta ; T5_dVb = (Idd_dVbs - T2 * Qn0_dVbs) * T1 ; T5_dVd = (Idd_dVds - T2 * Qn0_dVds) * T1 ; T5_dVg = (Idd_dVgs - T2 * Qn0_dVgs) * T1 ; T10 = q_Nsub / C_ESI ; T1 = 1.0e5 ; T2 = 1.0 / Leff ; T11 = (2.0 * T5 + 2.0 * T10 * T6 * T4 + T1 * T4) * T2 ; T3 = T2 * T4 ; T7 = T11 * T4 ; T7_dVb = (2.0 * T5_dVb + 2.0 * T10 * (T6_dVb * T4 + T6 * T4_dVb) + T1 * T4_dVb) * T3 + T11 * T4_dVb ; T7_dVd = (2.0 * T5_dVd + 2.0 * T10 * (T6_dVd * T4 + T6 * T4_dVd) + T1 * T4_dVd) * T3 + T11 * T4_dVd ; T7_dVg = (2.0 * T5_dVg + 2.0 * T10 * (T6_dVg * T4 + T6 * T4_dVg) + T1 * T4_dVg) * T3 + T11 * T4_dVg ; T7_dT = (2.0 * T5_dT + 2.0 * T10 * ( T6_dT * T4 + T6 * T4_dT ) + T1 * T4_dT ) * T3 + T11 * T4_dT ; T11 = 4.0 * (2.0 * T10 * T6 + T1) ; T1 = 8.0 * T10 * T4 * T4 ; T2 = 2.0 * T11 * T4 ; T8 = T11 * T4 * T4 ; T8_dVb = ( T1 * T6_dVb + T2 * T4_dVb) ; T8_dVd = ( T1 * T6_dVd + T2 * T4_dVd) ; T8_dVg = ( T1 * T6_dVg + T2 * T4_dVg) ; T8_dT = ( T1 * T6_dT + T2 * T4_dT) ; T9 = sqrt (T7 * T7 + T8); T1 = 1.0 / T9 ; T2 = T7 * T1 ; T3 = 0.5 * T1 ; T9_dVb = (T2 * T7_dVb + T3 * T8_dVb) ; T9_dVd = (T2 * T7_dVd + T3 * T8_dVd) ; T9_dVg = (T2 * T7_dVg + T3 * T8_dVg) ; T9_dT = (T2 * T7_dT + T3 * T8_dT) ; Lred = 0.5 * (- T7 + T9) ; Lred_dVbs = 0.5 * (- T7_dVb + T9_dVb) ; Lred_dVds = 0.5 * (- T7_dVd + T9_dVd) ; Lred_dVgs = 0.5 * (- T7_dVg + T9_dVg) ; Lred_dT = 0.5 * (- T7_dT + T9_dT ) ; /*---------------------------------------------------* * Modify Lred for symmetry. *-----------------*/ T1 = Lred ; Lred = FMDVDS * T1 ; Lred_dVbs = FMDVDS_dVbs * T1 + FMDVDS * Lred_dVbs ; Lred_dVds = FMDVDS_dVds * T1 + FMDVDS * Lred_dVds ; Lred_dVgs = FMDVDS_dVgs * T1 + FMDVDS * Lred_dVgs ; Lred_dT = FMDVDS_dT * T1 + FMDVDS * Lred_dT ; } /* CLM5 & CLM6 */ Lred *= here->HSMHV_clmmod ; Lred_dVbs *= here->HSMHV_clmmod ; Lred_dVds *= here->HSMHV_clmmod ; Lred_dVgs *= here->HSMHV_clmmod ; Lred_dT *= here->HSMHV_clmmod ; /*---------------------------------------------------* * Qbu : -Qb in unit area. *-----------------*/ T1 = Vgp + beta_inv ; T2 = T1 * F10 - F11 ; T1_dT = Vgp_dT + beta_inv_dT ; T2_dT = T1_dT * F10 + T1 * F10_dT - F11_dT ; Qbnm = cnst0 * ( cnst0 * ( 1.5e0 - ( Xi0 + 1.0e0 ) - 0.5e0 * beta * Pds ) + Cox * T2 ) ; Qbnm_dVbs = cnst0 * ( cnst0 * ( - Xi0_dVbs - 0.5e0 * beta * Pds_dVbs ) + Cox * ( Vgp_dVbs * F10 + T1 * F10_dVbs - F11_dVbs ) + Cox_dVb * T2 ) ; Qbnm_dVds = cnst0 * ( cnst0 * ( - Xi0_dVds - 0.5e0 * beta * Pds_dVds ) + Cox * ( Vgp_dVds * F10 + T1 * F10_dVds - F11_dVds ) + Cox_dVd * T2 ) ; Qbnm_dVgs = cnst0 * ( cnst0 * ( - Xi0_dVgs - 0.5e0 * beta * Pds_dVgs ) + Cox * ( Vgp_dVgs * F10 + T1 * F10_dVgs - F11_dVgs ) + Cox_dVg * T2 ) ; Qbnm_dT = cnst0_dT * ( cnst0 * ( 1.5e0 - ( Xi0 + 1.0e0 ) - 0.5e0 * beta * Pds ) + Cox * T2 ) + cnst0 * ( cnst0_dT * ( 1.5e0 - ( Xi0 + 1.0e0 ) - 0.5e0 * beta * Pds ) + cnst0 * ( - Xi0_dT - 0.5 * beta_dT * Pds - 0.5 * beta * Pds_dT ) + Cox * T2_dT ); T1 = beta ; Qbu = T1 * Qbnm / Fdd ; T2 = T1 / ( Fdd * Fdd ) ; Qbu_dVbs = T2 * ( Fdd * Qbnm_dVbs - Qbnm * Fdd_dVbs ) ; Qbu_dVds = T2 * ( Fdd * Qbnm_dVds - Qbnm * Fdd_dVds ) ; Qbu_dVgs = T2 * ( Fdd * Qbnm_dVgs - Qbnm * Fdd_dVgs ) ; T1_dT = beta_dT ; Qbu_dT = ( Fdd * ( T1_dT * Qbnm + T1 * Qbnm_dT ) - T1 * Qbnm * Fdd_dT ) / ( Fdd * Fdd ) ; /*---------------------------------------------------* * preparation for Qi and Qd. * - DtPds: Delta * Pds ; * - Achi: (1+Delta) * Pds ; *-----------------*/ T1 = 2.0e0 * fac1 ; DtPds = T1 * ( F10 - Xi0p12 ) ; T2 = 2.0 * ( F10 - Xi0p12 ) ; DtPds_dVbs = T1 * ( F10_dVbs - Xi0p12_dVbs ) + T2 * fac1_dVbs ; DtPds_dVds = T1 * ( F10_dVds - Xi0p12_dVds ) + T2 * fac1_dVds ; DtPds_dVgs = T1 * ( F10_dVgs - Xi0p12_dVgs ) + T2 * fac1_dVgs ; T1_dT = 2.0e0 * fac1_dT ; DtPds_dT = T1_dT * ( F10 - Xi0p12 ) + T1 * ( F10_dT -Xi0p12_dT ) ; Achi = Pds + DtPds ; Achi_dVbs = Pds_dVbs + DtPds_dVbs ; Achi_dVds = Pds_dVds + DtPds_dVds ; Achi_dVgs = Pds_dVgs + DtPds_dVgs ; Achi_dT = Pds_dT + DtPds_dT ; /*-----------------------------------------------------------* * Alpha : parameter to evaluate charges. * - Achi: (1+Delta) * Pds ; * - clamped to 0 if Alpha < 0. *-----------------*/ T1 = 1.0 / VgVt ; T2 = Achi * T1 ; T3 = 1.0e0 - T2 ; TX = 1.0 - T3 ; Fn_CP( TY , TX , 1.0 , 4 , T4 ) ; Alpha = 1.0 - TY ; T5 = T1 * T4 ; Alpha_dVbs = - ( Achi_dVbs - T2 * VgVt_dVbs ) * T5 ; Alpha_dVds = - ( Achi_dVds - T2 * VgVt_dVds ) * T5 ; Alpha_dVgs = - ( Achi_dVgs - T2 * VgVt_dVgs ) * T5 ; Alpha_dT = - ( Achi_dT - T2 * VgVt_dT ) * T5 ; /*-----------------------------------------------------------* * Qiu : -Qi in unit area. *-----------------*/ Qinm = 1.0e0 + Alpha * ( 1.0e0 + Alpha ) ; T1 = 1.0e0 + Alpha + Alpha ; Qinm_dVbs = Alpha_dVbs * T1 ; Qinm_dVds = Alpha_dVds * T1 ; Qinm_dVgs = Alpha_dVgs * T1 ; Qinm_dT = Alpha_dT * T1 ; Qidn = Fn_Max( 1.0e0 + Alpha , epsm10 ) ; Qidn_dVbs = Alpha_dVbs ; Qidn_dVds = Alpha_dVds ; Qidn_dVgs = Alpha_dVgs ; Qidn_dT = Alpha_dT ; T1 = C_2o3 * VgVt * Qinm / Qidn ; Qiu = T1 * Cox ; T2 = 1.0 / VgVt ; T3 = 1.0 / Qinm ; T4 = 1.0 / Qidn ; Qiu_dVbs = Qiu * ( VgVt_dVbs * T2 + Qinm_dVbs * T3 - Qidn_dVbs * T4 ) + T1 * Cox_dVb ; Qiu_dVds = Qiu * ( VgVt_dVds * T2 + Qinm_dVds * T3 - Qidn_dVds * T4) + T1 * Cox_dVd ; Qiu_dVgs = Qiu * ( VgVt_dVgs * T2 + Qinm_dVgs * T3 - Qidn_dVgs * T4) + T1 * Cox_dVg ; T1_dT = C_2o3 * ( Qidn * ( VgVt_dT * Qinm + VgVt * Qinm_dT ) - Qidn_dT * VgVt * Qinm ) / ( Qidn * Qidn ) ; Qiu_dT = Cox * T1_dT ; /*-----------------------------------------------------------* * Qdrat : Qd/Qi *-----------------*/ Qdnm = 0.5e0 + Alpha ; Qdnm_dVbs = Alpha_dVbs ; Qdnm_dVds = Alpha_dVds ; Qdnm_dVgs = Alpha_dVgs ; Qdnm_dT = Alpha_dT ; Qddn = Qidn * Qinm ; Qddn_dVbs = Qidn_dVbs * Qinm + Qidn * Qinm_dVbs ; Qddn_dVds = Qidn_dVds * Qinm + Qidn * Qinm_dVds ; Qddn_dVgs = Qidn_dVgs * Qinm + Qidn * Qinm_dVgs ; Qddn_dT = Qidn_dT * Qinm + Qidn * Qinm_dT ; Quot = 0.4e0 * Qdnm / Qddn ; Qdrat = 0.6e0 - Quot ; if ( Qdrat <= 0.5e0 ) { T1 = 1.0 / Qddn ; T2 = 1.0 / Qdnm ; Qdrat_dVbs = Quot * ( Qddn_dVbs * T1 - Qdnm_dVbs * T2 ) ; Qdrat_dVds = Quot * ( Qddn_dVds * T1 - Qdnm_dVds * T2 ) ; Qdrat_dVgs = Quot * ( Qddn_dVgs * T1 - Qdnm_dVgs * T2 ) ; Qdrat_dT = Quot * ( Qddn_dT * T1 - Qdnm_dT * T2 ) ; } else { Qdrat = 0.5e0 ; Qdrat_dVbs = 0.0e0 ; Qdrat_dVds = 0.0e0 ; Qdrat_dVgs = 0.0e0 ; Qdrat_dT = 0.0e0 ; } /*-----------------------------------------------------------* * Interpolate charges and CLM for zone-D2. *-----------------*/ if ( flg_zone == 2 ) { T1 = Qbu ; Qbu = FD2 * Qbu + ( 1.0 - FD2 ) * Qb0 ; Qbu_dVbs = FD2 * Qbu_dVbs + FD2_dVbs * T1 + ( 1.0 - FD2 ) * Qb0_dVb - FD2_dVbs * Qb0 ; Qbu_dVds = FD2 * Qbu_dVds + FD2_dVds * T1 + ( 1.0 - FD2 ) * Qb0_dVd - FD2_dVds * Qb0 ; Qbu_dVgs = FD2 * Qbu_dVgs + FD2_dVgs * T1 + ( 1.0 - FD2 ) * Qb0_dVg - FD2_dVgs * Qb0 ; Qbu_dT = FD2 * Qbu_dT + FD2_dT * T1 + ( 1.0 - FD2 ) * Qb0_dT - FD2_dT * Qb0 ; if ( Qbu < 0.0 ) { Qbu = 0.0 ; Qbu_dVbs = 0.0 ; Qbu_dVds = 0.0 ; Qbu_dVgs = 0.0 ; Qbu_dT = 0.0 ; } T1 = Qiu ; Qiu = FD2 * Qiu + ( 1.0 - FD2 ) * Qn0 ; Qiu_dVbs = FD2 * Qiu_dVbs + FD2_dVbs * T1 + ( 1.0 - FD2 ) * Qn0_dVbs - FD2_dVbs * Qn0 ; Qiu_dVds = FD2 * Qiu_dVds + FD2_dVds * T1 + ( 1.0 - FD2 ) * Qn0_dVds - FD2_dVds * Qn0 ; Qiu_dVgs = FD2 * Qiu_dVgs + FD2_dVgs * T1 + ( 1.0 - FD2 ) * Qn0_dVgs - FD2_dVgs * Qn0 ; Qiu_dT = FD2 * Qiu_dT + FD2_dT * T1 + ( 1.0 - FD2 ) * Qn0_dT - FD2_dT * Qn0 ; if ( Qiu < 0.0 ) { Qiu = 0.0 ; Qiu_dVbs = 0.0 ; Qiu_dVds = 0.0 ; Qiu_dVgs = 0.0 ; Qiu_dT = 0.0 ; } T1 = Qdrat ; Qdrat = FD2 * Qdrat + ( 1.0 - FD2 ) * 0.5e0 ; Qdrat_dVbs = FD2 * Qdrat_dVbs + FD2_dVbs * T1 - FD2_dVbs * 0.5e0 ; Qdrat_dVds = FD2 * Qdrat_dVds + FD2_dVds * T1 - FD2_dVds * 0.5e0 ; Qdrat_dVgs = FD2 * Qdrat_dVgs + FD2_dVgs * T1 - FD2_dVgs * 0.5e0 ; Qdrat_dT = FD2 * Qdrat_dT + FD2_dT * T1 - FD2_dT * 0.5e0 ; /* note: Lred=0 in zone-D1 */ T1 = Lred ; Lred = FD2 * Lred ; Lred_dVbs = FD2 * Lred_dVbs + FD2_dVbs * T1 ; Lred_dVds = FD2 * Lred_dVds + FD2_dVds * T1 ; Lred_dVgs = FD2 * Lred_dVgs + FD2_dVgs * T1 ; Lred_dT = FD2 * Lred_dT + FD2_dT * T1 ; } /* end of flg_zone==2 if-block */ start_of_mobility: Lch = Leff - Lred ; if ( Lch < 1.0e-9 ) { fprintf ( stderr , "*** warning(HiSIM_HV): actual channel length is too small. (Lch=%e[m])\n" , Lch ) ; fprintf ( stderr , " CLM5 and/or CLM6 might be too large.\n" ) ; Lch = 1.0e-9 ; Lch_dVbs = Lch_dVds = Lch_dVgs = 0.0 ; Lch_dT = 0.0 ; } else { Lch_dVbs = - Lred_dVbs ; Lch_dVds = - Lred_dVds ; Lch_dVgs = - Lred_dVgs ; Lch_dT = - Lred_dT ; } /*-----------------------------------------------------------* * Muun : universal mobility. (CGS unit) *-----------------*/ T1 = here->HSMHV_ndep_o_esi ; T2 = here->HSMHV_ninv_o_esi ; T0 = here->HSMHV_ninvd ; T4 = 1.0 + ( Psl - Ps0 ) * T0 ; T4_dVb = ( Psl_dVbs - Ps0_dVbs ) * T0 ; T4_dVd = ( Psl_dVds - Ps0_dVds ) * T0 ; T4_dVg = ( Psl_dVgs - Ps0_dVgs ) * T0 ; T4_dT = ( Psl_dT - Ps0_dT ) * T0 + ( Psl - Ps0 ) * ninvd_dT ; T5 = T1 * Qbu + T2 * Qiu ; T5_dVb = T1 * Qbu_dVbs + T2 * Qiu_dVbs ; T5_dVd = T1 * Qbu_dVds + T2 * Qiu_dVds ; T5_dVg = T1 * Qbu_dVgs + T2 * Qiu_dVgs ; T5_dT = T1 * Qbu_dT + T2 * Qiu_dT ; T3 = T5 / T4 ; T3_dVb = ( - T4_dVb * T5 + T4 * T5_dVb ) / T4 / T4 ; T3_dVd = ( - T4_dVd * T5 + T4 * T5_dVd ) / T4 / T4 ; T3_dVg = ( - T4_dVg * T5 + T4 * T5_dVg ) / T4 / T4 ; T3_dT = ( - T4_dT * T5 + T4 * T5_dT ) / T4 / T4 ; Eeff = T3 ; Eeff_dVbs = T3_dVb ; Eeff_dVds = T3_dVd ; Eeff_dVgs = T3_dVg ; Eeff_dT = T3_dT ; T5 = Fn_Pow( Eeff , model->HSMHV_mueph0 - 1.0e0 ) ; T8 = T5 * Eeff ; T7 = Fn_Pow( Eeff , here->HSMHV_muesr - 1.0e0 ) ; T6 = T7 * Eeff ; T8_dT = model->HSMHV_mueph0 * T5 * Eeff_dT ; T6_dT = here->HSMHV_muesr * T7 * Eeff_dT ; T9 = C_QE * C_m2cm_p2 ; Rns = Qiu / T9 ; Rns_dT = Qiu_dT / T9 ; T1 = 1.0e0 / ( pParam->HSMHV_muecb0 + pParam->HSMHV_muecb1 * Rns / 1.0e11 ) + here->HSMHV_mphn0 * T8 + T6 / pParam->HSMHV_muesr1 ; T1_dT = - 1.0e0 / ( pParam->HSMHV_muecb0 + pParam->HSMHV_muecb1 * Rns / 1.0e11 ) / ( pParam->HSMHV_muecb0 + pParam->HSMHV_muecb1 * Rns / 1.0e11 ) * pParam->HSMHV_muecb1 * Rns_dT / 1.0e11 + here->HSMHV_mphn0 * T8_dT + mphn0_dT * T8 + T6_dT / pParam->HSMHV_muesr1 ; Muun = 1.0e0 / T1 ; Muun_dT = - Muun / T1 * T1_dT ; T1 = 1.0e0 / ( T1 * T1 ) ; T2 = pParam->HSMHV_muecb0 + pParam->HSMHV_muecb1 * Rns / 1.0e11 ; T2 = 1.0e0 / ( T2 * T2 ) ; T3 = here->HSMHV_mphn1 * T5 ; T4 = here->HSMHV_muesr * T7 / pParam->HSMHV_muesr1 ; T5 = - 1.0e-11 * pParam->HSMHV_muecb1 / C_QE * T2 / C_m2cm_p2 ; Muun_dVbs = - ( T5 * Qiu_dVbs + Eeff_dVbs * T3 + Eeff_dVbs * T4 ) * T1 ; Muun_dVds = - ( T5 * Qiu_dVds + Eeff_dVds * T3 + Eeff_dVds * T4 ) * T1 ; Muun_dVgs = - ( T5 * Qiu_dVgs + Eeff_dVgs * T3 + Eeff_dVgs * T4 ) * T1 ; /* Change to MKS unit */ Muun /= C_m2cm_p2 ; Muun_dT /= C_m2cm_p2 ; Muun_dVbs /= C_m2cm_p2 ; Muun_dVds /= C_m2cm_p2 ; Muun_dVgs /= C_m2cm_p2 ; /*-----------------------------------------------------------* * Mu : mobility *-----------------*/ T2 = beta * (Qn0 + small) * Lch ; T1 = 1.0e0 / T2 ; T3 = T1 * T1 ; T4 = - beta * T3 ; T5 = T4 * Lch ; T6 = T4 * (Qn0 + small) ; T1_dVb = ( T5 * Qn0_dVbs + T6 * Lch_dVbs) ; T1_dVd = ( T5 * Qn0_dVds + T6 * Lch_dVds) ; T1_dVg = ( T5 * Qn0_dVgs + T6 * Lch_dVgs) ; T2_dT = beta_dT * (Qn0 + small) * Lch + beta * Qn0_dT * Lch + beta * (Qn0 + small) * Lch_dT ; T1_dT = - T1 / T2 * T2_dT ; TY = Idd * T1 ; TY_dVbs = Idd_dVbs * T1 + Idd * T1_dVb ; TY_dVds = Idd_dVds * T1 + Idd * T1_dVd ; TY_dVgs = Idd_dVgs * T1 + Idd * T1_dVg ; TY_dT = Idd_dT * T1 + Idd * T1_dT ; T2 = 0.2 * Vmax / Muun ; T3 = - T2 / Muun ; T2_dVb = T3 * Muun_dVbs ; T2_dVd = T3 * Muun_dVds ; T2_dVg = T3 * Muun_dVgs ; T2_dT = 0.2 * ( Vmax_dT * Muun - Muun_dT * Vmax )/ ( Muun * Muun ) ; Ey = sqrt( TY * TY + T2 * T2 ) ; T4 = 1.0 / Ey ; Ey_dVbs = T4 * ( TY * TY_dVbs + T2 * T2_dVb ) ; Ey_dVds = T4 * ( TY * TY_dVds + T2 * T2_dVd ) ; Ey_dVgs = T4 * ( TY * TY_dVgs + T2 * T2_dVg ) ; Ey_dT = T4 * ( TY * TY_dT + T2 * T2_dT ) ; Em = Muun * Ey ; Em_dVbs = Muun_dVbs * Ey + Muun * Ey_dVbs ; Em_dVds = Muun_dVds * Ey + Muun * Ey_dVds ; Em_dVgs = Muun_dVgs * Ey + Muun * Ey_dVgs ; Em_dT = Ey * Muun_dT + Ey_dT * Muun ; T1 = Em / Vmax ; T1_dT = ( Em_dT * Vmax - Vmax_dT * Em ) / ( Vmax * Vmax ); /* note: model->HSMHV_bb = 2 (electron) ;1 (hole) */ if ( 1.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 1.0e0 + epsm10 ) { T3 = 1.0e0 ; T3_dT = 0.0e0 ; } else if ( 2.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 2.0e0 + epsm10 ) { T3 = T1 ; T3_dT = T1_dT ; } else { T3 = Fn_Pow( T1 , model->HSMHV_bb - 1.0e0 ) ; T3_dT = ( model->HSMHV_bb - 1.0e0 )* Fn_Pow( T1 , model->HSMHV_bb - 2.0e0 ) * T1_dT ; } T2 = T1 * T3 ; T4 = 1.0e0 + T2 ; T2_dT = T1 * T3_dT + T3 * T1_dT ; T4_dT = T2_dT ; if ( 1.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 1.0e0 + epsm10 ) { T5 = 1.0 / T4 ; T6 = T5 / T4 ; T5_dT = - T5 * T5 * T4_dT ; T6_dT = T5 * T5 * ( T5_dT * T4 - T5 * T4_dT ) ; } else if ( 2.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 2.0e0 + epsm10 ) { T5 = 1.0 / sqrt( T4 ) ; T6 = T5 / T4 ; T5_dT = - 0.5e0 / ( T4 * sqrt(T4)) * T4_dT ; T6_dT = ( T5_dT * T4 - T5 * T4_dT ) / T4 / T4 ; } else { T6 = Fn_Pow( T4 , ( - 1.0e0 / model->HSMHV_bb - 1.0e0 ) ) ; T5 = T4 * T6 ; T6_dT =( - 1.0e0 / model->HSMHV_bb - 1.0e0 ) * Fn_Pow( T4 , ( - 1.0e0 / model->HSMHV_bb - 2.0e0 ) ) * T4_dT ; T5_dT = T4_dT * T6 + T4 * T6_dT ; } T7 = Muun / Vmax * T6 * T3 ; Mu = Muun * T5 ; Mu_dVbs = Muun_dVbs * T5 - T7 * Em_dVbs ; Mu_dVds = Muun_dVds * T5 - T7 * Em_dVds ; Mu_dVgs = Muun_dVgs * T5 - T7 * Em_dVgs ; Mu_dT = Muun_dT * T5 + Muun * T5_dT ; /* end_of_mobility : */ /*-----------------------------------------------------------* * Ids: channel current. *-----------------*/ betaWL = here->HSMHV_weff_nf * beta_inv / Lch ; T1 = - betaWL / Lch ; betaWL_dVbs = T1 * Lch_dVbs ; betaWL_dVds = T1 * Lch_dVds ; betaWL_dVgs = T1 * Lch_dVgs ; betaWL_dT = here->HSMHV_weff_nf * ( beta_inv_dT * Lch - beta_inv * Lch_dT ) / ( Lch * Lch ) ; Ids0 = betaWL * Idd * Mu ; T1 = betaWL * Idd ; T2 = Idd * Mu ; T3 = Mu * betaWL ; Ids0_dVbs = T3 * Idd_dVbs + T1 * Mu_dVbs + T2 * betaWL_dVbs ; Ids0_dVds = T3 * Idd_dVds + T1 * Mu_dVds + T2 * betaWL_dVds ; Ids0_dVgs = T3 * Idd_dVgs + T1 * Mu_dVgs + T2 * betaWL_dVgs ; Ids0_dT = T3 * Idd_dT + T1 * Mu_dT + T2 * betaWL_dT ; /* note: rpock procedure was removed. */ if( flg_rsrd == 2 || flg_rsrd == 3 ){ if( model->HSMHV_rd20 > 0.0 ){ T4 = here->HSMHV_rd23 ; T1 = pParam->HSMHV_rd24 * ( Vgse - model->HSMHV_rd25 ) ; T1_dVg = pParam->HSMHV_rd24 ; Fn_SL( T2 , T1 , T4 , delta_rd , T0 ) ; T2_dVg = T1_dVg * T0 ; T3 = T4 * ( model->HSMHV_rd20 + 1.0 ) ; Fn_SU( T7 , T2 , T3 , delta_rd , T0 ) ; T7_dVg = T2_dVg * T0 ; }else{ T7 = here->HSMHV_rd23; T7_dVg = 0.0e0 ; } /* after testing we can remove Vdse_eff_dVbs, Vdse_eff_dVds, Vdse_eff_dVgs and Vdse_eff_dVbse, Vdse_eff_dVgse */ if (Vdse >= 0.0) { Vdse_eff = Vdse ; /* Vdse_eff_dVbs = 0.0 ; */ /* Vdse_eff_dVds = 0.0 ; */ /* Vdse_eff_dVgs = 0.0 ; */ /* Vdse_eff_dVbse = 0.0 ; */ Vdse_eff_dVdse = 1.0 ; /* Vdse_eff_dVgse = 0.0 ; */ } else { Vdse_eff = 0.0 ; /* Vdse_eff_dVbs = 0.0 ; */ /* Vdse_eff_dVds = 0.0 ; */ /* Vdse_eff_dVgs = 0.0 ; */ /* Vdse_eff_dVbse = 0.0 ; */ Vdse_eff_dVdse = 0.0 ; /* Vdse_eff_dVgse = 0.0 ; */ } /* smoothing of Ra for Vdse_eff close to zero */ /* ... smoothing parameter is Ra_N */ if (Vdse_eff < Ra_N * small2) { Ra_alpha = pow( Ra_N+1.0 , model->HSMHV_rd21-1.0 ) * (Ra_N+1.0-0.5*model->HSMHV_rd21*Ra_N) * pow( small2,model->HSMHV_rd21 ); Ra_beta = 0.5*model->HSMHV_rd21 * pow( Ra_N+1.0 , model->HSMHV_rd21-1.0 ) / Ra_N * pow( small2, model->HSMHV_rd21-2.0 ); T1 = Ra_alpha + Ra_beta*Vdse_eff*Vdse_eff; T1_dVdse_eff = 2.0 * Ra_beta * Vdse_eff; } else { T1 = pow( Vdse_eff + small2 , model->HSMHV_rd21 ) ; T1_dVdse_eff = model->HSMHV_rd21 * pow( Vdse_eff + small2 , model->HSMHV_rd21 - 1.0 ) ; } T9 = pow( Vdse_eff + small2 , model->HSMHV_rd22d ) ; T9_dVdse_eff = model->HSMHV_rd22d * pow( Vdse_eff + small2 , model->HSMHV_rd22d - 1.0 ) ; Ra = ( T7 * T1 + Vbse * pParam->HSMHV_rd22 * T9 ) / here->HSMHV_weff_nf ; Ra_dVdse_eff = ( T7 * T1_dVdse_eff + Vbse * pParam->HSMHV_rd22 * T9_dVdse_eff ) / here->HSMHV_weff_nf ; Ra_dVbs = Ra_dVdse_eff * Vdse_eff_dVbs ; Ra_dVds = Ra_dVdse_eff * Vdse_eff_dVds ; Ra_dVgs = Ra_dVdse_eff * Vdse_eff_dVgs + T7_dVg * T1 / here->HSMHV_weff_nf ; Ra_dVbse = Ra_dVdse_eff * Vdse_eff_dVbse + pParam->HSMHV_rd22 * T9 / here->HSMHV_weff_nf ; Ra_dVdse = Ra_dVdse_eff * Vdse_eff_dVdse ; Ra_dVgse = Ra_dVdse_eff * Vdse_eff_dVgse ; T0 = Ra * Ids0 ; T0_dVb = Ra_dVbs * Ids0 + Ra * Ids0_dVbs ; T0_dVd = Ra_dVds * Ids0 + Ra * Ids0_dVds ; T0_dVg = Ra_dVgs * Ids0 + Ra * Ids0_dVgs ; T0_dT = Ra * Ids0_dT ; T1 = Vds + small ; T2 = 1.0 / T1 ; T3 = 1.0 + T0 * T2 ; T3_dVb = T0_dVb * T2 ; T3_dVd = ( T0_dVd * T1 - T0 ) * T2 * T2 ; T3_dVg = T0_dVg * T2 ; T3_dT = T0_dT * T2 ; T4 = 1.0 / T3 ; Ids = Ids0 * T4 ; T5 = T4 * T4 ; Ids_dVbs = ( Ids0_dVbs * T3 - Ids0 * T3_dVb ) * T5 ; Ids_dVds = ( Ids0_dVds * T3 - Ids0 * T3_dVd ) * T5 ; Ids_dVgs = ( Ids0_dVgs * T3 - Ids0 * T3_dVg ) * T5 ; Ids_dT = ( Ids0_dT * T3 - Ids0 * T3_dT ) * T5 ; Ids_dRa = - Ids * Ids / ( Vds + small ) ; } else { Ids = Ids0 ; Ids_dVbs = Ids0_dVbs ; Ids_dVds = Ids0_dVds ; Ids_dVgs = Ids0_dVgs ; Ids_dT = Ids0_dT ; Ra = 0.0 ; Ra_dVbs = Ra_dVds = Ra_dVgs = 0.0 ; Ra_dVbse = Ra_dVdse = Ra_dVgse = 0.0 ; Ids_dRa = 0.0 ; } /* just for testing -- can be removed */ /* if (!(ckt->CKTmode & MODEINITPRED)) printf("rrb %e %e %e %e %e %e\n",ckt->CKTtime,here->HSMHV_mode*Vdse,Ra,Ra_dVdse, Vdse_eff,Vdse_eff_dVdse) ; */ /* if ( Pds < ps_conv ) { */ if ( Pds < 0.0 ) { Ids_dVbs = 0.0 ; Ids_dVgs = 0.0 ; Ids_dT = 0.0 ; } Ids += Gdsmin * Vds ; Ids_dVds += Gdsmin ; /*-----------------------------------------------------------* * STI *-----------------*/ if ( model->HSMHV_coisti != 0 ) { /*---------------------------------------------------* * dVthSCSTI : Short-channel effect induced by Vds (STI). *-----------------*/ T1 = C_ESI * Cox_inv ; T2 = here->HSMHV_wdpl ; T3 = here->HSMHV_lgatesm - model->HSMHV_parl2 ; T4 = 1.0 / (T3 * T3) ; T5 = 2.0 * (model->HSMHV_vbi - Pb20b) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = T5 * 0.5 / sqrt_Pbsum ; T7 = 2.0 * (model->HSMHV_vbi - Pb20b) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; dVth0_dT = T6 * Pbsum_dT + T8 * Pb20b_dT ; T4 = pParam->HSMHV_scsti1 ; T6 = pParam->HSMHV_scsti2 ; T1 = T4 + T6 * Vdsz ; dVthSCSTI = dVth0 * T1 ; dVthSCSTI_dVb = dVth0_dVb * T1 + dVth0 * T6 * Vdsz_dVbs ; dVthSCSTI_dVd = dVth0_dVd * T1 + dVth0 * T6 * Vdsz_dVds ; dVthSCSTI_dVg = dVth0_dVg * T1 ; dVthSCSTI_dT = dVth0_dT * T1 ; T1 = pParam->HSMHV_vthsti - model->HSMHV_vdsti * Vds ; T1_dVd = - model->HSMHV_vdsti ; Vgssti = Vgsz - Vfb + T1 + dVthSCSTI ; Vgssti_dVbs = Vgsz_dVbs + dVthSCSTI_dVb ; Vgssti_dVds = Vgsz_dVds + T1_dVd + dVthSCSTI_dVd ; Vgssti_dVgs = Vgsz_dVgs + dVthSCSTI_dVg ; Vgssti_dT = dVthSCSTI_dT ; costi0 = here->HSMHV_costi0 ; costi1 = here->HSMHV_costi1 ; costi3 = here->HSMHV_costi0_p2 * Cox_inv * Cox_inv ; T1 = 2.0 * here->HSMHV_costi0_p2 * Cox_inv ; costi3_dVb = T1 * Cox_inv_dVb ; costi3_dVd = T1 * Cox_inv_dVd ; costi3_dVg = T1 * Cox_inv_dVg ; costi3_dT = 2 * here->HSMHV_costi0 * here->HSMHV_costi00 * 0.5 / sqrt(here->HSMHV_beta_inv) * beta_inv_dT * Cox_inv * Cox_inv ; T2 = 1.0 / costi3 ; costi3_dVb_c3 = costi3_dVb * T2 ; costi3_dVd_c3 = costi3_dVd * T2 ; costi3_dVg_c3 = costi3_dVg * T2 ; costi3_dT_c3 = costi3_dT * T2 ; costi4 = costi3 * beta * 0.5 ; costi4_dT = ( costi3_dT * beta + costi3 * beta_dT ) * 0.5 ; costi5 = costi4 * beta * 2.0 ; costi5_dT = ( costi4_dT * beta + costi4 * beta_dT ) * 2.0 ; T11 = beta * 0.25 ; T11_dT = beta_dT * 0.25 ; T10 = beta_inv - costi3 * T11 + Vfb - pParam->HSMHV_vthsti - dVthSCSTI + small ; T10_dVb = - T11 * costi3_dVb - dVthSCSTI_dVb ; T10_dVd = - T11 * costi3_dVd - dVthSCSTI_dVd ; T10_dVg = - T11 * costi3_dVg - dVthSCSTI_dVg ; T10_dT = beta_inv_dT - ( costi3_dT * T11 + costi3 * T11_dT ) - dVthSCSTI_dT ; T1 = Vgsz - T10 - psisti_dlt ; T1_dVb = Vgsz_dVbs - T10_dVb ; T1_dVd = Vgsz_dVds - T10_dVd ; T1_dVg = Vgsz_dVgs - T10_dVg ; T1_dT = - T10_dT ; T0 = Fn_Sgn(T10) ; T2 = sqrt (T1 * T1 + T0 * 4.0 * T10 * psisti_dlt) ; T3 = T10 + 0.5 * (T1 + T2) - Vfb + pParam->HSMHV_vthsti + dVthSCSTI - Vbsz ; T3_dVb = T10_dVb + 0.5 * (T1_dVb + (T1 * T1_dVb + T0 * 2.0 * T10_dVb * psisti_dlt) / T2) + dVthSCSTI_dVb - Vbsz_dVbs ; T3_dVd = T10_dVd + 0.5 * (T1_dVd + (T1 * T1_dVd + T0 * 2.0 * T10_dVd * psisti_dlt) / T2) + dVthSCSTI_dVd - Vbsz_dVds ; T3_dVg = T10_dVg + 0.5 * (T1_dVg + (T1 * T1_dVg + T0 * 2.0 * T10_dVg * psisti_dlt) / T2) + dVthSCSTI_dVg ; T3_dT = T10_dT + 0.5 * (T1_dT + (T1 * T1_dT + T0 * 2.0 * T10_dT * psisti_dlt) / T2) + dVthSCSTI_dT ; T4 = beta * T3 - 1.0 ; T4_dT = beta_dT * T3 + beta * T3_dT ; T5 = 4.0 / costi5 ; T5_dT = - 4.0 / ( costi5 * costi5 ) * costi5_dT ; T1 = 1.0 + T4 * T5 ; T6 = beta * T5 ; T7 = T4 * T5 ; T1_dVb = (T6 * T3_dVb - T7 * costi3_dVb_c3) ; T1_dVd = (T6 * T3_dVd - T7 * costi3_dVd_c3) ; T1_dVg = (T6 * T3_dVg - T7 * costi3_dVg_c3) ; T1_dT = T4_dT * T5 + T4 * T5_dT ; Fn_SZ( T1 , T1, 1.0e-2, T2) ; T1_dVb *= T2 ; T1_dVd *= T2 ; T1_dVg *= T2 ; T1_dT *= T2 ; costi6 = sqrt(T1) ; costi6_dT = 0.5 / sqrt(T1) * T1_dT ; T0 = costi4 * (1.0 - costi6) ; T0_dT = costi4_dT * (1.0 - costi6) + costi4 * ( - costi6_dT ) ; Psasti = Vgssti + T0 ; T2 = 0.5 * costi4 / costi6 ; Psasti_dVbs = Vgssti_dVbs + costi3_dVb_c3 * T0 - T2 * T1_dVb ; Psasti_dVds = Vgssti_dVds + costi3_dVd_c3 * T0 - T2 * T1_dVd ; Psasti_dVgs = Vgssti_dVgs + costi3_dVg_c3 * T0 - T2 * T1_dVg ; Psasti_dT = Vgssti_dT + T0_dT ; T0 = 1.0 / (beta + 2.0 / (Vgssti + small)) ; T0_dT = - 1.0 / ((beta + 2.0 / (Vgssti + small)) * (beta + 2.0 / (Vgssti + small))) * ( beta_dT - 2 / ((Vgssti + small) * (Vgssti + small)) * Vgssti_dT ); Psbsti = log (1.0 / costi1 / costi3 * (Vgssti * Vgssti)) * T0 ; T1 = 1 / costi1 / costi3 * (Vgssti * Vgssti) ; costi1_dT = 2 * here->HSMHV_nin * Nin_dT * here->HSMHV_nsti_p2 ; T1_dT = ( - 1 / costi1 / costi1 * costi1_dT / costi3 - 1 / costi3 / costi3 * costi3_dT / costi1 ) * Vgssti * Vgssti + 1 / costi1 / costi3 * 2 * Vgssti * Vgssti_dT ; T2 = 2.0 * T0 / (Vgssti + small) ; T3 = Psbsti / (Vgssti + small) ; Psbsti_dVbs = T2 * (Vgssti_dVbs - 0.5 * costi3_dVb_c3 * Vgssti + T3 * Vgssti_dVbs ) ; Psbsti_dVds = T2 * (Vgssti_dVds - 0.5 * costi3_dVd_c3 * Vgssti + T3 * Vgssti_dVds ) ; Psbsti_dVgs = T2 * (Vgssti_dVgs - 0.5 * costi3_dVg_c3 * Vgssti + T3 * Vgssti_dVgs ) ; Psbsti_dT = 1 / T1 * T1_dT * T0 + log( T1 ) * T0_dT ; Psab = Psbsti - Psasti - sti2_dlt ; Psab_dVbs = Psbsti_dVbs - Psasti_dVbs ; Psab_dVds = Psbsti_dVds - Psasti_dVds ; Psab_dVgs = Psbsti_dVgs - Psasti_dVgs ; Psab_dT = Psbsti_dT - Psasti_dT ; T0 = sqrt (Psab * Psab + 4.0 * sti2_dlt * Psbsti) ; Psti = Psbsti - 0.5 * (Psab + T0) ; T1 = 1.0 / T0 ; Psti_dVbs = Psbsti_dVbs - 0.5 * ( Psab_dVbs + ( Psab * Psab_dVbs + 2.0 * sti2_dlt * Psbsti_dVbs ) * T1 ) ; Psti_dVds = Psbsti_dVds - 0.5 * ( Psab_dVds + ( Psab * Psab_dVds + 2.0 * sti2_dlt * Psbsti_dVds ) * T1 ) ; Psti_dVgs = Psbsti_dVgs - 0.5 * ( Psab_dVgs + ( Psab * Psab_dVgs + 2.0 * sti2_dlt * Psbsti_dVgs ) * T1 ) ; Psti_dT = Psbsti_dT - 0.5 * ( Psab_dT + ( Psab * Psab_dT + 2.0 * sti2_dlt * Psbsti_dT ) * T1 ) ; T0 = costi1 * exp (beta * Psti) ; T0_dT = costi1_dT * exp(beta * Psti) + costi1 * exp(beta * Psti) * ( beta_dT * Psti + beta * Psti_dT ) ; T1 = beta * (Psti - Vbsz) - 1.0 + T0 ; T1_dVb = beta * ((Psti_dVbs - Vbsz_dVbs) + T0 * Psti_dVbs) ; T1_dVd = beta * ((Psti_dVds - Vbsz_dVds) + T0 * Psti_dVds) ; T1_dVg = beta * (Psti_dVgs + T0 * Psti_dVgs) ; T1_dT = beta_dT * (Psti - Vbsz) + beta * Psti_dT + T0_dT ; Fn_SZ ( T1 , T1, 1.0e-2, T0) ; T1 += epsm10 ; T1_dVb *= T0 ; T1_dVd *= T0 ; T1_dVg *= T0 ; T1_dT *= T0 ; sq1sti = sqrt (T1); T2 = 0.5 / sq1sti ; sq1sti_dVbs = T2 * T1_dVb ; sq1sti_dVds = T2 * T1_dVd ; sq1sti_dVgs = T2 * T1_dVg ; sq1sti_dT = T2 * T1_dT ; T1 = beta * (Psti - Vbsz) - 1.0; T1_dVb = beta * (Psti_dVbs - Vbsz_dVbs) ; T1_dVd = beta * (Psti_dVds - Vbsz_dVds) ; T1_dVg = beta * Psti_dVgs ; T1_dT = beta_dT * ( Psti - Vbsz ) + beta * Psti_dT ; Fn_SZ( T1 , T1, 1.0e-2, T0) ; T1 += epsm10 ; T1_dVb *= T0 ; T1_dVd *= T0 ; T1_dVg *= T0 ; T1_dT *= T0 ; sq2sti = sqrt (T1); T2 = 0.5 / sq2sti ; sq2sti_dVbs = T2 * T1_dVb ; sq2sti_dVds = T2 * T1_dVd ; sq2sti_dVgs = T2 * T1_dVg ; sq2sti_dT = T2 * T1_dT ; Qn0sti = costi0 * (sq1sti - sq2sti) ; Qn0sti_dVbs = costi0 * (sq1sti_dVbs - sq2sti_dVbs) ; Qn0sti_dVds = costi0 * (sq1sti_dVds - sq2sti_dVds) ; Qn0sti_dVgs = costi0 * (sq1sti_dVgs - sq2sti_dVgs) ; Qn0sti_dT = costi0 * (sq1sti_dT - sq2sti_dT) + here->HSMHV_costi00 * 0.5 / sqrt( here->HSMHV_beta_inv ) * beta_inv_dT * (sq1sti - sq2sti) ; /* T1: Vdsatsti */ T1 = Psasti - Psti ; T1_dVb = Psasti_dVbs - Psti_dVbs ; T1_dVd = Psasti_dVds - Psti_dVds ; T1_dVg = Psasti_dVgs - Psti_dVgs ; T1_dT = Psasti_dT - Psti_dT ; Fn_SZ( T1 , T1 , 1.0e-1 , T2 ) ; T1_dVb *= T2 ; T1_dVd *= T2 ; T1_dVg *= T2 ; T1_dT *= T2 ; TX = Vds / T1 ; T2 = 1.0 / ( T1 * T1 ) ; TX_dVbs = T2 * ( - Vds * T1_dVb ) ; TX_dVds = T2 * ( T1 - Vds * T1_dVd ) ; TX_dVgs = T2 * ( - Vds * T1_dVg ) ; TX_dT = T2 * ( - Vds * T1_dT ) ; Fn_CP( TY , TX , 1.0 , 4 , T2 ) ; TY_dVbs = T2 * TX_dVbs ; TY_dVds = T2 * TX_dVds ; TY_dVgs = T2 * TX_dVgs ; TY_dT = T2 * TX_dT ; costi7 = 2.0 * here->HSMHV_wsti * here->HSMHV_nf * beta_inv ; costi7_dT = 2.0 * here->HSMHV_wsti * here->HSMHV_nf * beta_inv_dT ; T1 = Lch ; Idssti = costi7 * Mu * Qn0sti * TY / T1 ; T3 = 1.0 / T1 ; T4 = Mu * Qn0sti * TY / T1 / T1 ; T5 = Mu * Qn0sti ; Idssti_dVbs = costi7 * (((Mu_dVbs * Qn0sti + Mu * Qn0sti_dVbs) * TY + T5 * TY_dVbs ) * T3 - Lch_dVbs * T4 ) ; Idssti_dVds = costi7 * (((Mu_dVds * Qn0sti + Mu * Qn0sti_dVds) * TY + T5 * TY_dVds ) * T3 - Lch_dVds * T4 ) ; Idssti_dVgs = costi7 * (((Mu_dVgs * Qn0sti + Mu * Qn0sti_dVgs) * TY + T5 * TY_dVgs ) * T3 - Lch_dVgs * T4 ) ; Idssti_dT = costi7 * (((Mu_dT * Qn0sti + Mu * Qn0sti_dT) * TY + T5 * TY_dT ) * T3 - Lch_dT * T4 ) + costi7_dT * Mu * Qn0sti * TY / T1 ; Ids = Ids + Idssti ; Ids_dVbs = Ids_dVbs + Idssti_dVbs ; Ids_dVds = Ids_dVds + Idssti_dVds ; Ids_dVgs = Ids_dVgs + Idssti_dVgs ; Ids_dT = Ids_dT + Idssti_dT ; } /*----------------------------------------------------------* * induced gate noise. ( Part 1/3 ) *----------------------*/ if ( model->HSMHV_coign != 0 && model->HSMHV_cothrml != 0 ) { kusai00 = VgVt * VgVt ; kusaidd = 2.0e0 * beta_inv * Cox_inv * Idd ; kusaiL = kusai00 - kusaidd ; Fn_SZ( kusai00 , kusai00 , 1.0e-3 , T0 ) ; Fn_SZ( kusaiL , kusaiL , 1.0e-3 , T0 ) ; kusai00L = kusai00 - kusaiL ; if ( Qn0 < epsm10 || kusai00L < epsm10 ) flg_ign = 0 ; else flg_ign = 1 ; } /*-----------------------------------------------------------* * End of PART-1. (label) *-----------------*/ end_of_part_1: /*----------------------------------------------------------* * Evaluate integrated charges in unit [C]. *----------------------*/ T1 = - here->HSMHV_weffcv_nf * Leff ; Qb = T1 * Qbu ; Qb_dVbs = T1 * Qbu_dVbs ; Qb_dVds = T1 * Qbu_dVds ; Qb_dVgs = T1 * Qbu_dVgs ; Qb_dT = T1 * Qbu_dT ; Qi = T1 * Qiu ; Qi_dVbs = T1 * Qiu_dVbs ; Qi_dVds = T1 * Qiu_dVds ; Qi_dVgs = T1 * Qiu_dVgs ; Qi_dT = T1 * Qiu_dT ; Qd = Qi * Qdrat ; Qd_dVbs = Qi_dVbs * Qdrat + Qi * Qdrat_dVbs ; Qd_dVds = Qi_dVds * Qdrat + Qi * Qdrat_dVds ; Qd_dVgs = Qi_dVgs * Qdrat + Qi * Qdrat_dVgs ; Qd_dT = Qi_dT * Qdrat + Qi * Qdrat_dT ; /*-----------------------------------------------------------* * Modified potential for symmetry. *-----------------*/ T1 = ( Vds - Pds ) / 2 ; Fn_SymAdd( Pzadd , T1 , model->HSMHV_pzadd0 , T2 ) ; T2 /= 2 ; Pzadd_dVbs = T2 * ( - Pds_dVbs ) ; Pzadd_dVds = T2 * ( 1.0 - Pds_dVds ) ; Pzadd_dVgs = T2 * ( - Pds_dVgs ) ; Pzadd_dT = T2 * ( -Pds_dT ); if ( Pzadd < epsm10 ) { Pzadd = epsm10 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = 0.0 ; Pzadd_dVgs = 0.0 ; Pzadd_dT = 0.0 ; } Ps0z = Ps0 + Pzadd ; Ps0z_dVbs = Ps0_dVbs + Pzadd_dVbs ; Ps0z_dVds = Ps0_dVds + Pzadd_dVds ; Ps0z_dVgs = Ps0_dVgs + Pzadd_dVgs ; Ps0z_dT = Ps0_dT + Pzadd_dT ; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-2: Substrate / gate / leak currents *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Isub : substrate current induced by impact ionization. *-----------------*/ if ( flg_noqi == 1 || model->HSMHV_coisub == 0 ) { /* Accumulation zone or nonconductive case, in which Ids==0. */ Isub = 0.0e0 ; Isub_dVbs = Isub_dVds = Isub_dVgs = 0.0e0 ; Isub_dT = 0.0; } else { /*-------------------------------------------* * Conductive case. *-----------------*/ if ( pParam->HSMHV_sub1 > 0.0e0 && pParam->HSMHV_vmax > 0.0e0 ) { T0 = here->HSMHV_vg2const ; T1 = T0 * Vgp ; T1_dVd = T0 * Vgp_dVds ; T1_dVg = T0 * Vgp_dVgs ; T1_dVb = T0 * Vgp_dVbs ; T7 = Cox0 * Cox0 ; T8 = here->HSMHV_qnsub_esi ; T3 = T8 / T7 ; T9 = 2.0 / T8 ; T4 = 1.0e0 + T9 * T7 ; T2 = here->HSMHV_xvbs ; T5 = T1 - beta_inv - T2 * Vbsz ; T5_dVd = T1_dVd - T2 * Vbsz_dVds; T5_dVg = T1_dVg ; T5_dVb = T1_dVb - T2 * Vbsz_dVbs; T5_dT = - beta_inv_dT ; T6 = T4 * T5 ; T6_dVd = T4 * T5_dVd ; T6_dVg = T4 * T5_dVg ; T6_dVb = T4 * T5_dVb ; T6_dT = T4 * T5_dT ; Fn_SZ( T6 , T6, 1.0e-3, T9) ; T6 += small ; T6_dVd *= T9 ; T6_dVg *= T9 ; T6_dVb *= T9 ; T6_dT *= T9 ; T6 = sqrt( T6 ) ; T9 = 0.5 / T6 ; T6_dVd = T9 * T6_dVd ; T6_dVg = T9 * T6_dVg ; T6_dVb = T9 * T6_dVb ; T6_dT = T9 * T6_dT ; Psislsat = T1 + T3 * ( 1.0 - T6 ) ; Psislsat_dVd = T1_dVd - T3 * T6_dVd ; Psislsat_dVg = T1_dVg - T3 * T6_dVg ; Psislsat_dVb = T1_dVb - T3 * T6_dVb ; Psislsat_dT = -T3 * T6_dT ; T2 = here->HSMHV_lgate / (here->HSMHV_xgate + here->HSMHV_lgate) ; Psisubsat = pParam->HSMHV_svds * Vdsz + Ps0z - T2 * Psislsat ; Psisubsat_dVd = pParam->HSMHV_svds * Vdsz_dVds + Ps0z_dVds - T2 * Psislsat_dVd ; Psisubsat_dVg = Ps0z_dVgs - T2 * Psislsat_dVg ; Psisubsat_dVb = pParam->HSMHV_svds * Vdsz_dVbs + Ps0z_dVbs - T2 * Psislsat_dVb ; Psisubsat_dT = Ps0z_dT - T2 * Psislsat_dT ; Fn_SZ( Psisubsat , Psisubsat, 1.0e-3, T9 ) ; Psisubsat += small ; Psisubsat_dVd *= T9 ; Psisubsat_dVg *= T9 ; Psisubsat_dVb *= T9 ; Psisubsat_dT *= T9 ; T5 = here->HSMHV_xsub1 ; T6 = here->HSMHV_xsub2 ; T2 = exp( - T6 / Psisubsat ) ; T3 = T2 * T6 / ( Psisubsat * Psisubsat ) ; T2_dVd = T3 * Psisubsat_dVd ; T2_dVg = T3 * Psisubsat_dVg ; T2_dVb = T3 * Psisubsat_dVb ; T2_dT = T3 * Psisubsat_dT ; Isub = T5 * Psisubsat * Ids * T2 ; Isub_dVds = T5 * ( Psisubsat_dVd * Ids * T2 + Psisubsat * Ids_dVds * T2 + Psisubsat * Ids * T2_dVd ) ; Isub_dVgs = T5 * ( Psisubsat_dVg * Ids * T2 + Psisubsat * Ids_dVgs * T2 + Psisubsat * Ids * T2_dVg ) ; Isub_dVbs = T5 * ( Psisubsat_dVb * Ids * T2 + Psisubsat * Ids_dVbs * T2 + Psisubsat * Ids * T2_dVb ) ; Isub_dT = T5 * ( Psisubsat_dT * Ids * T2 + Psisubsat * Ids_dT * T2 + Psisubsat * Ids * T2_dT ) ; } else { Isub = 0.0e0 ; Isub_dVbs = Isub_dVds = Isub_dVgs = 0.0e0 ; Isub_dT = 0.0e0 ; } /* end of if ( pParam->HSMHV_sub1 ... ) else block. */ /*---------------------------------------------------* * Impact-Ionization Current in the Drift Region *-----------------*/ T8 = here->HSMHV_subld1 ; if ( T8 != 0.0 ) { T0 = ( Vdse + Ps0 - Psdl ) ; T0_dVb = Ps0_dVbs - Psdl_dVbs ; T0_dVd = Ps0_dVds - Psdl_dVds ; T0_dVg = Ps0_dVgs - Psdl_dVgs ; T0_dT = Ps0_dT - Psdl_dT ; Fn_SZ( T0, T0, 1e-6, T1 ) ; T0_dVb *= T1 ; T0_dVd *= T1 ; T0_dVg *= T1 ; T0_dT *= T1 ; T1 = sqrt( VgVt + small ) ; T3 = 1.0 / ( 2.0 * T1 ) ; T1_dVb = VgVt_dVbs * T3 ; T1_dVd = VgVt_dVds * T3 ; T1_dVg = VgVt_dVgs * T3 ; T1_dT = VgVt_dT * T3 ; T4 = 1.0 / ( T0 * T1 ) ; T7 = Ldrift * hereMKS->HSMHV_subld2 ; T2= exp( - T7 * T4 ); T6 = T7 * T2 * T4 * T4 ; T2_dVb = ( T0_dVb * T1 + T0 * T1_dVb ) * T6 ; T2_dVd = ( T0_dVd * T1 + T0 * T1_dVd ) * T6 ; T2_dVg = ( T0_dVg * T1 + T0 * T1_dVg ) * T6 ; T2_dT = ( T0_dT * T1 + T0 * T1_dT ) * T6 ; T2_dVdse = T1 * T6 ; T5 = T8 * Ids * T0 * T2 ; T5_dVb = T8 * ( Ids_dVbs * T0 * T2 + Ids * T0_dVb * T2 + Ids * T0 * T2_dVb ) ; T5_dVd = T8 * ( Ids_dVds * T0 * T2 + Ids * T0_dVd * T2 + Ids * T0 * T2_dVd ) ; T5_dVg = T8 * ( Ids_dVgs * T0 * T2 + Ids * T0_dVg * T2 + Ids * T0 * T2_dVg ) ; T5_dT = T8 * ( Ids_dT * T0 * T2 + Ids * T0_dT * T2 + Ids * T0 * T2_dT ) ; T5_dVdse = T8 * ( Ids_dRa * Ra_dVdse * T0 * T2 + Ids * T2 + Ids * T0 * T2_dVdse ) ; Isub += T5 ; Isub_dVgs += T5_dVg ; Isub_dVds += T5_dVd ; Isub_dVbs += T5_dVb ; Isub_dT += T5_dT ; Isub_dVdse += T5_dVdse ; } } /*---------------------------------------------------* * Impact-Ionization Induced Bulk Potential Change (IBPC) *-----------------*/ if ( flg_noqi == 0 && Isub > 0e0 && pParam->HSMHV_ibpc1 != 0e0 ) { /* delta Vbs */ T0 = 1e0 + pParam->HSMHV_ibpc2 * dVth ; dVbsIBPC = pParam->HSMHV_ibpc1 * T0 * Isub ; dVbsIBPC_dVbs = pParam->HSMHV_ibpc1 * ( pParam->HSMHV_ibpc2 * dVth_dVb * Isub + T0 * Isub_dVbs ) ; dVbsIBPC_dVds = pParam->HSMHV_ibpc1 * ( pParam->HSMHV_ibpc2 * dVth_dVd * Isub + T0 * Isub_dVds ) ; dVbsIBPC_dVgs = pParam->HSMHV_ibpc1 * ( pParam->HSMHV_ibpc2 * dVth_dVg * Isub + T0 * Isub_dVgs ) ; dVbsIBPC_dT = pParam->HSMHV_ibpc1 * T0 * Isub_dT ; /* dG3 & dG4 */ T10 = 1e0 / Xi0 ; T10_dT = - T10 / Xi0 * Xi0_dT ; T1 = beta * dVbsIBPC * T10 ; T11 = T10 * T10; T1_dVb = beta * ( dVbsIBPC_dVbs * Xi0 - dVbsIBPC * Xi0_dVbs ) * T11 ; T1_dVd = beta * ( dVbsIBPC_dVds * Xi0 - dVbsIBPC * Xi0_dVds ) * T11 ; T1_dVg = beta * ( dVbsIBPC_dVgs * Xi0 - dVbsIBPC * Xi0_dVgs ) * T11 ; T1_dT = beta_dT * dVbsIBPC * T10 + beta * dVbsIBPC_dT * T10 + beta * dVbsIBPC * T10_dT ; T10 = 1e0 / Xil ; T10_dT = - T10 / Xil * Xil_dT ; T2 = beta * dVbsIBPC * T10 ; T11 = T10 * T10; T2_dVb = beta * ( dVbsIBPC_dVbs * Xil - dVbsIBPC * Xil_dVbs ) * T11 ; T2_dVd = beta * ( dVbsIBPC_dVds * Xil - dVbsIBPC * Xil_dVds ) * T11 ; T2_dVg = beta * ( dVbsIBPC_dVgs * Xil - dVbsIBPC * Xil_dVgs ) * T11 ; T2_dT = beta_dT * dVbsIBPC * T10 + beta * dVbsIBPC_dT * T10 + beta * dVbsIBPC * T10_dT ; dG3 = cnst0 * ( Xilp32 * T2 - Xi0p32 * T1 ) ; dG3_dVbs = cnst0 * ( Xilp32_dVbs * T2 + Xilp32 * T2_dVb - Xi0p32_dVbs * T1 - Xi0p32 * T1_dVb ) ; dG3_dVds = cnst0 * ( Xilp32_dVds * T2 + Xilp32 * T2_dVd - Xi0p32_dVds * T1 - Xi0p32 * T1_dVd ) ; dG3_dVgs = cnst0 * ( Xilp32_dVgs * T2 + Xilp32 * T2_dVg - Xi0p32_dVgs * T1 - Xi0p32 * T1_dVg ) ; dG3_dT = cnst0 * ( Xilp32_dT * T2 + Xilp32 * T2_dT - Xi0p32_dT * T1 - Xi0p32 * T1_dT ) + cnst0_dT * ( Xilp32 * T2 - Xi0p32 * T1 ) ; dG4 = cnst0 * 0.5 * ( - Xilp12 * T2 + Xi0p12 * T1 ) ; dG4_dVbs = cnst0 * 0.5 * ( - Xilp12_dVbs * T2 - Xilp12 * T2_dVb + Xi0p12_dVbs * T1 + Xi0p12 * T1_dVb ) ; dG4_dVds = cnst0 * 0.5 * ( - Xilp12_dVds * T2 - Xilp12 * T2_dVd + Xi0p12_dVds * T1 + Xi0p12 * T1_dVd ) ; dG4_dVgs = cnst0 * 0.5 * ( - Xilp12_dVgs * T2 - Xilp12 * T2_dVg + Xi0p12_dVgs * T1 + Xi0p12 * T1_dVg ) ; dG4_dT = cnst0 * 0.5 * ( - Xilp12_dT * T2 - Xilp12 * T2_dT + Xi0p12_dT * T1 + Xi0p12 * T1_dT ) + cnst0_dT *0.5 * ( - Xilp12 * T2 + Xi0p12 * T1 ) ; /* Add IBPC current into Ids */ dIdd = dG3 + dG4 ; dIdd_dVbs = dG3_dVbs + dG4_dVbs ; dIdd_dVds = dG3_dVds + dG4_dVds ; dIdd_dVgs = dG3_dVgs + dG4_dVgs ; dIdd_dT = dG3_dT + dG4_dT ; IdsIBPC = betaWL * dIdd * Mu ; IdsIBPC_dVbs = betaWL * ( Mu * dIdd_dVbs + dIdd * Mu_dVbs ) + betaWL_dVbs * Mu * dIdd ; IdsIBPC_dVds = betaWL * ( Mu * dIdd_dVds + dIdd * Mu_dVds ) + betaWL_dVds * Mu * dIdd ; IdsIBPC_dVgs = betaWL * ( Mu * dIdd_dVgs + dIdd * Mu_dVgs ) + betaWL_dVgs * Mu * dIdd ; IdsIBPC_dT = betaWL * ( Mu * dIdd_dT + dIdd * Mu_dT ) + betaWL_dT * Mu * dIdd ; } /* End if (IBPC) */ T3 = 1 / TTEMP ; T0 =- model->HSMHV_igtemp2 * T3 * T3 - 2 * model->HSMHV_igtemp3 * T3 * T3 * T3 ; Egp12_dT = 0.5 * T0 / Egp12; Egp32_dT = 1.5 * T0 * Egp12; /*-----------------------------------------------------------* * Igate : Gate current induced by tunneling. *-----------------*/ if ( model->HSMHV_coiigs != 0 ) { /* Igate */ if ( flg_noqi == 0 ) { Psdlz = Ps0z + Vdsz - epsm10 ; Psdlz_dVbs = Ps0z_dVbs + Vdsz_dVbs ; Psdlz_dVds = Ps0z_dVds + Vdsz_dVds ; Psdlz_dVgs = Ps0z_dVgs ; Psdlz_dT = Ps0z_dT ; T1 = Vgsz - Vfb + modelMKS->HSMHV_gleak4 * (dVth - dPpg) * Leff - Psdlz * pParam->HSMHV_gleak3 ; T3 = modelMKS->HSMHV_gleak4 * Leff ; T1_dVg = Vgsz_dVgs + T3 * (dVth_dVg - dPpg_dVg) - Psdlz_dVgs * pParam->HSMHV_gleak3 ; T1_dVd = Vgsz_dVds + T3 * (dVth_dVd - dPpg_dVd) - Psdlz_dVds * pParam->HSMHV_gleak3 ; T1_dVb = Vgsz_dVbs + T3 * ( dVth_dVb - dPpg_dVb ) - Psdlz_dVbs * pParam->HSMHV_gleak3 ; T1_dT = T3 * ( dVth_dT - dPpg_dT ) - Psdlz_dT * pParam->HSMHV_gleak3 ; T3 = 2.0 * T1 ; T1_dVg = T3 * T1_dVg ; T1_dVd = T3 * T1_dVd ; T1_dVb = T3 * T1_dVb ; T1_dT = T3 * T1_dT ; T1 *= T1 ; T3 = 1.0 / Tox0 ; T2 = T1 * T3 ; T2_dVg = (T1_dVg ) * T3 ; T2_dVd = (T1_dVd ) * T3 ; T2_dVb = (T1_dVb ) * T3 ; T2_dT = T1_dT * T3 ; T3 = 1.0 / modelMKS->HSMHV_gleak5 ; T7 = 1.0 + Ey * T3 ; T7_dVg = Ey_dVgs * T3 ; T7_dVd = Ey_dVds * T3 ; T7_dVb = Ey_dVbs * T3 ; T7_dT = Ey_dT * T3 ; Etun = T2 * T7 ; Etun_dVgs = T2_dVg * T7 + T7_dVg * T2 ; Etun_dVds = T2_dVd * T7 + T7_dVd * T2 ; Etun_dVbs = T2_dVb * T7 + T7_dVb * T2 ; Etun_dT = T2_dT * T7 + T7_dT * T2 ; Fn_SZ( Etun , Etun , igate_dlt , T5 ) ; Etun_dVgs *= T5 ; Etun_dVds *= T5 ; Etun_dVbs *= T5 ; Etun_dT *= T5 ; Fn_SZ( T3 , Vgsz , 1.0e-3 , T4 ) ; T3 -= model->HSMHV_vzadd0 ; T3_dVb = 0.5 * (Vgsz_dVbs + Vgsz * Vgsz_dVbs/TMF2); TX = T3 / cclmmdf ; TX_dVbs = T3_dVb / cclmmdf ; T2 = 1.0 + TX * TX ; T2_dVb = 2 * TX_dVbs * TX ; T1 = 1.0 - 1.0 / T2 ; T1_dVb = T2_dVb / T2 / T2 ; T1_dVg = 2.0 * TX * T4 / ( T2 * T2 * cclmmdf ) ; T1_dVd = T1_dVg * Vgsz_dVds ; Etun_dVgs = T1 * Etun_dVgs + Etun * T1_dVg ; Etun_dVds = T1 * Etun_dVds + Etun * T1_dVd ; Etun_dVbs = Etun_dVbs * T1 + Etun * T1_dVb ; Etun_dT *= T1 ; Etun *= T1 ; T0 = Leff * here->HSMHV_weff_nf ; T7 = modelMKS->HSMHV_gleak7 / (modelMKS->HSMHV_gleak7 + T0) ; T6 = pParam->HSMHV_gleak6 ; T9 = T6 / (T6 + Vdsz) ; T9_dVb = - T9 / (T6 + Vdsz) * Vdsz_dVbs ; T9_dVd = - T9 / (T6 + Vdsz) * Vdsz_dVds ; T4 = 1 / (Etun + small ) ; T1 = - pParam->HSMHV_gleak2 * Egp32 * T4 ; T3 = pParam->HSMHV_gleak2 * T4 * T4; T1_dT = T3 * (Egp32 * Etun_dT - Egp32_dT * (Etun + small )) ; if ( T1 < - EXP_THR ) { Igate = 0.0 ; Igate_dVbs = Igate_dVds = Igate_dVgs = Igate_dT = 0.0 ; } else { T2 = exp ( T1 ) ; T2_dT = T1_dT * T2 ; T3 = pParam->HSMHV_gleak1 / Egp12 * C_QE * T0 ; T3_dT = - Egp12_dT * pParam->HSMHV_gleak1 / Egp12 / Egp12 * C_QE * T0 ; T5 = 1 / cnst0 ; T6 = sqrt ((Qiu + Cox0 * VgVt_small )* T5 ) ; T6_dT = ( ( ( cnst0 * Qiu_dT - cnst0_dT * ( Qiu + Cox0 * VgVt_small ) ) * T5 * T5 ) ) / T6 * 0.5 ; T4 = T2 * T3 * T6 ; T4_dT = T2_dT * T3 * T6 + T2 * T3_dT * T6 + T2 * T3 * T6_dT; T5 = T4 * Etun ; T6 = 0.5 * Etun / (Qiu + Cox0 * VgVt_small ) ; T10 = T5 * Etun ; T10_dVb = T5 * (2.0 * Etun_dVbs - T1 * Etun_dVbs + T6 * Qiu_dVbs) ; T10_dVd = T5 * (2.0 * Etun_dVds - T1 * Etun_dVds + T6 * Qiu_dVds) ; T10_dVg = T5 * (2.0 * Etun_dVgs - T1 * Etun_dVgs + T6 * Qiu_dVgs) ; T10_dT = 2 * T5 * Etun_dT + T4_dT * Etun * Etun ; Igate = T7 * T9 * T10 ; Igate_dVbs = T7 * (T9 * T10_dVb + T9_dVb * T10) ; Igate_dVds = T7 * (T9_dVd * T10 + T9 * T10_dVd) ; Igate_dVgs = T7 * T9 * T10_dVg ; Igate_dT = T7 * T9 * T10_dT ; } } /* Igs */ T0 = - pParam->HSMHV_glksd2 * Vgs + modelMKS->HSMHV_glksd3 ; T2 = exp (Tox0 * T0); T2_dVg = (- Tox0 * pParam->HSMHV_glksd2) * T2; T0 = Vgs / Tox0 / Tox0 ; T3 = Vgs * T0 ; T3_dVg = 2.0 * T0 * (1.0 ) ; T4 = pParam->HSMHV_glksd1 / 1.0e6 * here->HSMHV_weff_nf ; Igs = T4 * T2 * T3 ; Igs_dVgs = T4 * (T2_dVg * T3 + T2 * T3_dVg) ; Igs_dVds = 0.0 ; Igs_dVbs = 0.0 ; Igs_dT = 0.0 ; if ( Vgs >= 0.0e0 ){ Igs *= -1.0 ; Igs_dVgs *= -1.0 ; Igs_dVds *= -1.0 ; Igs_dVbs *= -1.0 ; } /* Igd */ T1 = Vgs - Vds ; T0 = - pParam->HSMHV_glksd2 * T1 + modelMKS->HSMHV_glksd3 ; T2 = exp (Tox0 * T0); T2_dVg = (- Tox0 * pParam->HSMHV_glksd2) * T2; T2_dVd = (+ Tox0 * pParam->HSMHV_glksd2) * T2; T2_dVb = 0.0 ; T0 = T1 / Tox0 / Tox0 ; T3 = T1 * T0 ; T3_dVg = 2.0 * T0 ; T3_dVd = - 2.0 * T0 ; T3_dVb = 0.0 ; T4 = pParam->HSMHV_glksd1 / 1.0e6 * here->HSMHV_weff_nf ; Igd = T4 * T2 * T3 ; Igd_dVgs = T4 * (T2_dVg * T3 + T2 * T3_dVg) ; Igd_dVds = T4 * (T2_dVd * T3 + T2 * T3_dVd) ; Igd_dVbs = 0.0 ; Igd_dT = 0.0 ; if( T1 >= 0.0e0 ){ Igd *= -1.0 ; Igd_dVgs *= -1.0 ; Igd_dVds *= -1.0 ; Igd_dVbs *= -1.0 ; } /* Igb */ Etun = ( - ( Vgs - Vbs ) + Vfb + model->HSMHV_glkb3 ) / Tox0 ; Etun_dVgs = - 1.0 / Tox0 ; Etun_dVds = 0.0 ; Etun_dVbs = 1.0 / Tox0 ; Fn_SZ( Etun , Etun, igate_dlt, T5) ; Etun += small ; Etun_dVgs *= T5 ; Etun_dVbs *= T5 ; T1 = - pParam->HSMHV_glkb2 / Etun ; if ( T1 < - EXP_THR ) { Igb = 0.0 ; Igb_dVgs = Igb_dVds = Igb_dVbs = Igb_dT = 0.0 ; } else { T2 = exp ( T1 ); T3 = pParam->HSMHV_glkb2 / ( Etun * Etun ) * T2 ; T2_dVg = T3 * Etun_dVgs ; T2_dVb = T3 * Etun_dVbs ; T3 = pParam->HSMHV_glkb1 * here->HSMHV_weff_nf * Leff ; Igb = T3 * Etun * Etun * T2 ; Igb_dVgs = T3 * (2.0 * Etun * Etun_dVgs * T2 + Etun * Etun * T2_dVg); Igb_dVds = 0.0 ; Igb_dVbs = T3 * (2.0 * Etun * Etun_dVbs * T2 + Etun * Etun * T2_dVb); Igb_dT = 0.0; } /* Ifn: Fowler-Nordheim tunneling current */ Eg12 = here->HSMHV_sqrt_eg ; Eg32 = here->HSMHV_eg * Eg12 ; T2 = - ( pParam->HSMHV_fvbs * Vbsz - Vgsz + dVthSC + dVthLP - pParam->HSMHV_fn3 ) / Tox0 ; T2_dVd = - ( pParam->HSMHV_fvbs * Vbsz_dVds - Vgsz_dVds + dVthSC_dVd + dVthLP_dVd ) / Tox0 ; T2_dVg = - ( - Vgsz_dVgs + dVthSC_dVg + dVthLP_dVg ) / Tox0 ; T2_dVb = - ( pParam->HSMHV_fvbs * Vbsz_dVbs -Vgsz_dVbs + dVthSC_dVb + dVthLP_dVb ) / Tox0 ; T2_dT = - ( dVthSC_dT + dVthLP_dT ) / Tox0 ; T0 = T2 * T2 ; T1 = pParam->HSMHV_fn2 * Eg32 ; T1_dT = 1.5 * Eg_dT * pParam->HSMHV_fn2 * Eg12 ; T3 = - T1 / T2 ; if ( T3 < - EXP_THR ) { T5 = 0.0 ; T5_dVd = T5_dVg = T5_dVb = T5_dT = 0.0 ; } else { T5 = exp( T3 ) ; T5_dVd = T5 * T1 * T2_dVd / T0 ; T5_dVg = T5 * T1 * T2_dVg / T0 ; T5_dVb = T5 * T1 * T2_dVb / T0 ; T5_dT = T5 * T1 * T2_dT / T0 ; } T4 = C_QE * pParam->HSMHV_fn1 * here->HSMHV_weff_nf * here->HSMHV_lgate / Eg12 ; T4_dT = (- 0.5) * Eg_dT * T4 / here->HSMHV_eg ; if ( 2e0 * T2 + T1 < 0e0 ){ Ifn = 0.25e0 * T4 * T1 * T1 * c_exp_2 ; /* minimum value */ Ifn_dVd = 0e0 ; Ifn_dVg = 0e0 ; Ifn_dVb = 0e0 ; Ifn_dT = 0.25e0 * T4_dT * T1 * T1 * c_exp_2 ; } else { Ifn = T4 * T0 * T5 ; Ifn_dVd = T4 * ( 2.0 * T2 * T2_dVd * T5 + T0 * T5_dVd ) ; Ifn_dVg = T4 * ( 2.0 * T2 * T2_dVg * T5 + T0 * T5_dVg ) ; Ifn_dVb = T4 * ( 2.0 * T2 * T2_dVb * T5 + T0 * T5_dVb ) ; Ifn_dT = T4 * ( 2.0 * T2 * T2_dT * T5 + T0 * T5_dT ) +T4_dT * T0 * T5; } Igb -= Ifn ; Igb_dVbs -= Ifn_dVb ; Igb_dVds -= Ifn_dVd ; Igb_dVgs -= Ifn_dVg ; Igb_dT -= Ifn_dT ; } /* if ( model->HSMHV_coiigs == 0 ) */ /*-----------------------------------------------------------* * Vdsp : Vds modification for GIDL/GISL *-----------------*/ if ( model->HSMHV_cogidl != 0 ) { T1 = Vds * (1.0 - gidla * Vds) - gidlvds_dlt ; T2 = sqrt (T1 * T1 + 4.0 * gidlvds_dlt * Vds) ; Vdsp = Vds - 0.5 * (T1 + T2) ; T3 = 1.0 - 2.0 * gidla * Vds ; Vdsp_dVd = 1.0 - 0.5 * (T3 + (T1 * T3 + 2.0 * gidlvds_dlt) / T2) ; } /*-----------------------------------------------------------* * Igidl : GIDL *-----------------*/ if( model->HSMHV_cogidl == 0 ){ Igidl = 0.0e0 ; Igidl_dVbs = 0.0e0 ; Igidl_dVds = 0.0e0 ; Igidl_dVgs = 0.0e0 ; Igidl_dT = 0.0e0 ; } else { T1 = model->HSMHV_gidl3 * (Vdsp + model->HSMHV_gidl4) - Vgs + (dVthSC + dVthLP) * model->HSMHV_gidl5 ; T1_dT = (dVthSC_dT + dVthLP_dT) * model->HSMHV_gidl5 ; T2 = 1.0 / Tox0 ; E1 = T1 * T2 ; E1_dVb = ((model->HSMHV_gidl5 * (dVthSC_dVb + dVthLP_dVb)) ) * T2 ; E1_dVd = ((model->HSMHV_gidl3 * Vdsp_dVd) + model->HSMHV_gidl5 * (dVthSC_dVd + dVthLP_dVd)) * T2 ; E1_dVg = (-1.0 + model->HSMHV_gidl5 * (dVthSC_dVg + dVthLP_dVg) ) * T2 ; E1_dT = T1_dT * T2 ; Fn_SZ( Egidl , E1, eef_dlt, T5) ; Egidl_dVb = T5 * E1_dVb ; Egidl_dVd = T5 * E1_dVd ; Egidl_dVg = T5 * E1_dVg ; Egidl_dT = T5 * E1_dT ; T3 = 1 / (Egidl + small) ; T0 = - pParam->HSMHV_gidl2 * Egp32 * T3 ; T0_dT = - pParam->HSMHV_gidl2 * T3 *( Egp32_dT - Egidl_dT * T3 ) ; if ( T0 < - EXP_THR ) { Igidl = 0.0 ; Igidl_dVbs = Igidl_dVds = Igidl_dVgs = Igidl_dT = 0.0 ; } else { T1 = exp ( T0 ) ; T1_dT = T0_dT * T1 ; T2 = pParam->HSMHV_gidl1 / Egp12 * C_QE * here->HSMHV_weff_nf ; T2_dT = - Egp12_dT * pParam->HSMHV_gidl1 / Egp12 / Egp12 * C_QE * here->HSMHV_weff_nf ; Igidl = T2 * Egidl * Egidl * T1 ; T3 = T2 * T1 * Egidl * (2.0 + pParam->HSMHV_gidl2 * Egp32 * Egidl / (Egidl + small) / (Egidl + small)) ; Igidl_dVbs = T3 * Egidl_dVb ; Igidl_dVds = T3 * Egidl_dVd ; Igidl_dVgs = T3 * Egidl_dVg ; Igidl_dT = T3 * Egidl_dT + T2 * Egidl * Egidl * T1_dT + T2_dT * Egidl * Egidl * T1; } /* bug-fix */ Vdb = Vds - Vbs ; if ( Vdb > 0.0 ) { T2 = Vdb * Vdb ; T4 = T2 * Vdb ; T0 = T4 + C_gidl_delta ; T5 = T4 / T0 ; T7 = ( 3.0 * T2 * T0 - T4 * 3.0 * T2 ) / ( T0 * T0 ) ; /* == T5_dVdb */ Igidl_dVbs = Igidl_dVbs * T5 + Igidl * T7 * ( - 1.0 ) ; /* Vdb_dVbs = -1 */ Igidl_dVds = Igidl_dVds * T5 + Igidl * T7 * ( + 1.0 ) ; /* Vdb_dVds = +1 */ Igidl_dVgs = Igidl_dVgs * T5 ; /* Vdb_dVgs = 0 */ Igidl_dT = Igidl_dT * T5 ; /* Vdb_dT = 0 */ Igidl *= T5 ; } else { Igidl = 0.0 ; Igidl_dVbs = Igidl_dVds = Igidl_dVgs = Igidl_dT = 0.0 ; } } /*-----------------------------------------------------------* * Igisl : GISL *-----------------*/ if( model->HSMHV_cogidl == 0){ Igisl = 0.0e0 ; Igisl_dVbs = 0.0e0 ; Igisl_dVds = 0.0e0 ; Igisl_dVgs = 0.0e0 ; Igisl_dT = 0.0e0 ; } else { T1 = model->HSMHV_gidl3 * ( - Vdsp + model->HSMHV_gidl4 ) - ( Vgs - Vdsp ) + ( dVthSC + dVthLP ) * model->HSMHV_gidl5 ; T1_dT = ( dVthSC_dT + dVthLP_dT ) * model->HSMHV_gidl5 ; T2 = 1.0 / Tox0 ; E1 = T1 * T2 ; E1_dVb = ((model->HSMHV_gidl5 * (dVthSC_dVb + dVthLP_dVb)) ) * T2 ; E1_dVd = (((1.0-model->HSMHV_gidl3 ) * Vdsp_dVd) + model->HSMHV_gidl5 * (dVthSC_dVd + dVthLP_dVd)) * T2 ; E1_dVg = (-1.0 + model->HSMHV_gidl5 * (dVthSC_dVg + dVthLP_dVg) ) * T2 ; E1_dT = T1_dT * T2 ; Fn_SZ( Egisl , E1, eef_dlt, T5) ; Egisl_dVb = T5 * E1_dVb ; Egisl_dVd = T5 * E1_dVd ; Egisl_dVg = T5 * E1_dVg ; Egisl_dT = T5 * E1_dT ; T3 = 1 / (Egisl + small) ; T0 = - pParam->HSMHV_gidl2 * Egp32 * T3 ; T0_dT = - pParam->HSMHV_gidl2 * T3 * ( Egp32_dT - Egisl_dT * T3 ) ; if ( T0 < - EXP_THR ) { Igisl = 0.0 ; Igisl_dVbs = Igisl_dVds = Igisl_dVgs = Igisl_dT = 0.0 ; } else { T1 = exp ( T0 ) ; T1_dT = T0_dT * T1 ; T3 = 1 / Egp12 ; T2 = pParam->HSMHV_gidl1 * T3 * C_QE * here->HSMHV_weff_nf ; T2_dT = - pParam->HSMHV_gidl1 * Egp12_dT * T3 * T3 * C_QE * here->HSMHV_weff_nf ; Igisl = T2 * Egisl * Egisl * T1 ; T3 = T2 * T1 * Egisl * (2.0 + pParam->HSMHV_gidl2 * Egp32 * Egisl / (Egisl + small) / (Egisl + small)) ; Igisl_dVbs = T3 * Egisl_dVb ; Igisl_dVds = T3 * Egisl_dVd ; Igisl_dVgs = T3 * Egisl_dVg ; Igisl_dT = T3 * Egisl_dT + T2_dT * Egisl * Egisl * T1 + T2 * Egisl * Egisl * T1_dT ; } /* bug-fix */ Vsb = - Vbs ; if ( Vsb > 0.0 ) { T2 = Vsb * Vsb ; T4 = T2 * Vsb ; T0 = T4 + C_gidl_delta ; T5 = T4 / T0 ; T7 = ( 3.0 * T2 * T0 - T4 * 3.0 * T2 ) / ( T0 * T0 ) ; /* == T5_dVsb */ Igisl_dVbs = Igisl_dVbs * T5 + Igisl * T7 * ( - 1.0 ) ; /* Vsb_dVbs = -1 */ Igisl_dVds = Igisl_dVds * T5 ; /* Vsb_dVds = 0 */ Igisl_dVgs = Igisl_dVgs * T5 ; /* Vsb_dVgs = 0 */ Igisl_dT = Igisl_dT * T5 ; /* Vsb_dT = 0 */ Igisl *= T5 ; } else { Igisl = 0.0 ; Igisl_dVbs = Igisl_dVds = Igisl_dVgs = Igisl_dT = 0.0 ; } } /*-----------------------------------------------------------* * End of PART-2. (label) *-----------------*/ /* end_of_part_2: */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-3: Overlap charge *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ Aclm = pParam->HSMHV_clm1 ; if ( flg_noqi != 0 ) { /*-------------------------------------------* * Calculation of Psdl for cases of flg_noqi==1. *-----------------*/ Psdl = Aclm * (Vds + Ps0) + (1.0e0 - Aclm) * Psl ; Psdl_dVbs = Aclm * Ps0_dVbs + (1.0e0 - Aclm) * Psl_dVbs ; Psdl_dVds = Aclm * (1.0e0 + Ps0_dVds) + (1.0e0 - Aclm) * Psl_dVds ; Psdl_dVgs = Aclm * Ps0_dVgs + (1.0e0 - Aclm) * Psl_dVgs ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; } if (model->HSMHV_xqy !=0) { Ec = 0.0e0 ; Ec_dVbs =0.0e0 ; Ec_dVds =0.0e0 ; Ec_dVgs =0.0e0 ; Ec_dT =0.0e0 ; } } else { /* Ec is removed from Lred calc. part */ if (model->HSMHV_xqy !=0) { if ( Idd < C_IDD_MIN ) { Ec = 0.0e0 ; Ec_dVbs =0.0e0 ; Ec_dVds =0.0e0 ; Ec_dVgs =0.0e0 ; } else { T1 = beta_inv / Leff ; T1_dT = beta_inv_dT / Leff ; T2 = 1.0 / Qn0 ; T3 = T2 * T2 ; Ec = Idd * T1 * T2 ; Ec_dVbs = T1 * (Idd_dVbs * T2 - Idd * Qn0_dVbs * T3 ) ; Ec_dVds = T1 * (Idd_dVds * T2 - Idd * Qn0_dVds * T3 ) ; Ec_dVgs = T1 * (Idd_dVgs * T2 - Idd * Qn0_dVgs * T3 ) ; Ec_dT = T1 * (Idd_dT * T2 - Idd * Qn0_dT * T3 ) + T1_dT * Idd * T2 ; } } } /*-----------------------------------------------------------* * Overlap charges *-----------------*/ Coovlps = (int)ModeNML * model->HSMHV_coovlps + (int)ModeRVS * model->HSMHV_coovlp ; Coovlpd = (int)ModeRVS * model->HSMHV_coovlps + (int)ModeNML * model->HSMHV_coovlp ; Lovers = ModeNML * here->HSMHV_lovers + ModeRVS * here->HSMHV_loverld ; Loverd = ModeRVS * here->HSMHV_lovers + ModeNML * here->HSMHV_loverld ; Novers = ModeNML * pParam->HSMHV_novers + ModeRVS * pParam->HSMHV_nover ; Noverd = ModeRVS * pParam->HSMHV_novers + ModeNML * pParam->HSMHV_nover ; CVDSOVER = pParam->HSMHV_cvdsover ; /*---------------------------------------------------* * Source side (mode-dependent) *-----------------*/ /*-----------------------------------* * Constant capacitance model *-----------------*/ if ( Coovlps == 0 ) { flg_overgiven = ( (int)ModeNML * model->HSMHV_cgso_Given + (int)ModeRVS * model->HSMHV_cgdo_Given ) ; if ( flg_overgiven ) { Cgso = ModeNML * pParam->HSMHV_cgso + ModeRVS * pParam->HSMHV_cgdo ; Cgso *= - here->HSMHV_weffcv_nf ; } else { Cgso = - Cox0 * Lovers * here->HSMHV_weffcv_nf ; } Qgso = - Cgso * Vgse ; Qgso_dVbse = 0.0 ; Qgso_dVdse = 0.0 ; Qgso_dVgse = - Cgso ; /*-----------------------------------* * Simplified model *-----------------*/ } else { /* Coovlps != 0 begin */ if ( Lovers > 0.0 && Novers == 0.0 ){ cov_slp = modelMKS->HSMHV_ovslp ; cov_mag = model->HSMHV_ovmag ; T1 = Cox0 * here->HSMHV_weffcv_nf ; T4 = cov_slp * T1 * ( cov_mag + Vgs ) ; T4_dVg = cov_slp * T1 ; T4_dVd = 0.0 ; T5 = Lovers * T1 ; T9 = 1.2e0 - Ps0 ; Qgos = Vgs * T5 - T4 * T9 ; Qgos_dVbs = T4 * Ps0_dVbs ; Qgos_dVds = T4 * Ps0_dVds - T9 * T4_dVd ; Qgos_dVgs = T5 + T4 * Ps0_dVgs - T9 * T4_dVg ; Qgos_dT = T4 * Ps0_dT; /*-----------------------------------* * Surface potential model *------------------------*/ } else if ( Lovers > 0.0 && Novers >= 0.0 ) { Vgbgmt = Vgs - Vbs ; Vgbgmt_dVbs = -1.0 ; Vgbgmt_dVds = 0.0 ; Vgbgmt_dVgs = 1.0 ; Vxbgmt = - Vbs ; Vxbgmt_dVbs = -1.0 ; Vxbgmt_dVds = 0.0 ; Vxbgmt_dVgs = 0.0 ; Nover_func = Novers ; cnst0over_func = ModeNML * here->HSMHV_cnst0overs + ModeRVS * here->HSMHV_cnst0over ; cnst0over_func_dT = ModeNML * cnst0overs_dT + ModeRVS * cnst0over_dT ; ps0ldinib_func = ModeNML * here->HSMHV_ps0ldinibs + ModeRVS * here->HSMHV_ps0ldinib ; ps0ldinib_func_dT = ModeNML * ps0ldinibs_dT + ModeRVS * ps0ldinib_dT ; #include "hsmhveval_qover.h" T4 = here->HSMHV_weffcv_nf * Lovers * ( 1 - CVDSOVER ) ; Qovs = T4 * QsuLD ; Qovs_dVds = T4 * QsuLD_dVds ; Qovs_dVgs = T4 * QsuLD_dVgs ; Qovs_dVbs = T4 * QsuLD_dVbs ; Qovs_dT = T4 * QsuLD_dT ; QisLD = T4 * QiuLD ; QisLD_dVbs = T4 * QiuLD_dVbs ; QisLD_dVds = T4 * QiuLD_dVds ; QisLD_dVgs = T4 * QiuLD_dVgs ; QisLD_dT = T4 * QiuLD_dT ; QbsLD = T4 * QbuLD ; QbsLD_dVbs = T4 * QbuLD_dVbs ; QbsLD_dVds = T4 * QbuLD_dVds ; QbsLD_dVgs = T4 * QbuLD_dVgs ; QbsLD_dT = T4 * QbuLD_dT ; if ( CVDSOVER != 0.0 ) { /* Qovsext begin */ Vgbgmt = Vgse - Vbse ; Vgbgmt_dVbs = -1.0 ; Vgbgmt_dVds = 0.0 ; Vgbgmt_dVgs = 1.0 ; Vxbgmt = - Vbse ; Vxbgmt_dVbs = -1.0 ; Vxbgmt_dVds = 0.0 ; Vxbgmt_dVgs = 0.0 ; #include "hsmhveval_qover.h" T4 = here->HSMHV_weffcv_nf * Lovers * CVDSOVER ; Qovsext = T4 * QsuLD ; Qovsext_dVdse = T4 * QsuLD_dVds ; Qovsext_dVgse = T4 * QsuLD_dVgs ; Qovsext_dVbse = T4 * QsuLD_dVbs ; Qovsext_dT = T4 * QsuLD_dT ; QisLDext = T4 * QiuLD ; QisLDext_dVbse = T4 * QiuLD_dVbs ; QisLDext_dVdse = T4 * QiuLD_dVds ; QisLDext_dVgse = T4 * QiuLD_dVgs ; QisLDext_dT = T4 * QiuLD_dT ; QbsLDext = T4 * QbuLD ; QbsLDext_dVbse = T4 * QbuLD_dVbs ; QbsLDext_dVdse = T4 * QbuLD_dVds ; QbsLDext_dVgse = T4 * QbuLD_dVgs ; QbsLDext_dT = T4 * QbuLD_dT ; } /* Qovsext end */ } /*-----------------------------------* * Additional constant capacitance model *-----------------*/ flg_overgiven = ( (int)ModeNML * model->HSMHV_cgso_Given + (int)ModeRVS * model->HSMHV_cgdo_Given ) ; if ( flg_overgiven ) { Cgso = ModeNML * pParam->HSMHV_cgso + ModeRVS * pParam->HSMHV_cgdo ; Cgso *= - here->HSMHV_weffcv_nf ; } Qgso = - Cgso * Vgse ; Qgso_dVbse = 0.0 ; Qgso_dVdse = 0.0 ; Qgso_dVgse = - Cgso ; } /* Coovlps != 0 end */ /*---------------------------------------------------* * Drain side (mode-dependent) *-----------------*/ /*-----------------------------------* * Constant capacitance model *-----------------*/ if ( Coovlpd == 0 ) { flg_overgiven = ( (int)ModeRVS * model->HSMHV_cgso_Given + (int)ModeNML * model->HSMHV_cgdo_Given ) ; if ( flg_overgiven ) { Cgdo = ModeRVS * pParam->HSMHV_cgso + ModeNML * pParam->HSMHV_cgdo ; Cgdo *= - here->HSMHV_weffcv_nf ; } else { Cgdo = - Cox0 * Loverd * here->HSMHV_weffcv_nf ; } Qgdo = - Cgdo * (Vgse - Vdse) ; Qgdo_dVbse = 0.0 ; Qgdo_dVdse = Cgdo ; Qgdo_dVgse = - Cgdo ; /*-----------------------------------* * Simplified model *-----------------*/ } else { /* Coovlpd != 0 begin */ if ( Loverd > 0.0 && Noverd == 0.0 ){ cov_slp = modelMKS->HSMHV_ovslp ; cov_mag = model->HSMHV_ovmag ; T1 = Cox0 * here->HSMHV_weffcv_nf ; T4 = cov_slp * T1 * ( cov_mag + Vgs - Vds ) ; T4_dVg = cov_slp * T1 ; T4_dVd = - cov_slp * T1 ; T5 = Loverd * T1 ; T9 = 1.2e0 + Vds - Psl ; Qgod = ( Vgs - Vds ) * T5 - T4 * T9 ; Qgod_dVbs = + T4 * Psl_dVbs ; Qgod_dVds = - T5 + T4 * ( -1.0 + Psl_dVds ) - T9 * T4_dVd ; Qgod_dVgs = + T5 + T4 * Psl_dVgs - T9 * T4_dVg ; Qgod_dT = T4 * Psl_dT; /*-----------------------------------* * Surface potential model *------------------------*/ } else if ( Loverd > 0.0 && Noverd >= 0.0 ) { Vgbgmt = Vgs - Vbs ; Vgbgmt_dVbs = -1.0 ; Vgbgmt_dVds = 0.0 ; Vgbgmt_dVgs = 1.0 ; Vxbgmt = Vds - Vbs ; Vxbgmt_dVbs = -1.0 ; Vxbgmt_dVds = 1.0 ; Vxbgmt_dVgs = 0.0 ; Nover_func = Noverd ; cnst0over_func = ModeNML * here->HSMHV_cnst0over + ModeRVS * here->HSMHV_cnst0overs ; cnst0over_func_dT = ModeNML * cnst0over_dT + ModeRVS * cnst0overs_dT ; ps0ldinib_func = ModeNML * here->HSMHV_ps0ldinib + ModeRVS * here->HSMHV_ps0ldinibs ; ps0ldinib_func_dT = ModeNML * ps0ldinib_dT + ModeRVS * ps0ldinibs_dT ; #include "hsmhveval_qover.h" T4 = here->HSMHV_weffcv_nf * Loverd * ( 1 - CVDSOVER ) ; Qovd = T4 * QsuLD ; Qovd_dVds = T4 * QsuLD_dVds ; Qovd_dVgs = T4 * QsuLD_dVgs ; Qovd_dVbs = T4 * QsuLD_dVbs ; Qovd_dT = T4 * QsuLD_dT ; QidLD = T4 * QiuLD ; QidLD_dVbs = T4 * QiuLD_dVbs ; QidLD_dVds = T4 * QiuLD_dVds ; QidLD_dVgs = T4 * QiuLD_dVgs ; QidLD_dT = T4 * QiuLD_dT ; QbdLD = T4 * QbuLD ; QbdLD_dVbs = T4 * QbuLD_dVbs ; QbdLD_dVds = T4 * QbuLD_dVds ; QbdLD_dVgs = T4 * QbuLD_dVgs ; QbdLD_dT = T4 * QbuLD_dT ; if ( CVDSOVER != 0.0 ) { /* Qovdext begin */ Vgbgmt = Vgse - Vbse ; Vgbgmt_dVbs = -1.0 ; Vgbgmt_dVds = 0.0 ; Vgbgmt_dVgs = 1.0 ; Vxbgmt = Vdse - Vbse ; Vxbgmt_dVbs = -1.0 ; Vxbgmt_dVds = 1.0 ; Vxbgmt_dVgs = 0.0 ; #include "hsmhveval_qover.h" T4 = here->HSMHV_weffcv_nf * Loverd * CVDSOVER ; Qovdext = T4 * QsuLD ; Qovdext_dVdse = T4 * QsuLD_dVds ; Qovdext_dVgse = T4 * QsuLD_dVgs ; Qovdext_dVbse = T4 * QsuLD_dVbs ; Qovdext_dT = T4 * QsuLD_dT ; QidLDext = T4 * QiuLD ; QidLDext_dVbse = T4 * QiuLD_dVbs ; QidLDext_dVdse = T4 * QiuLD_dVds ; QidLDext_dVgse = T4 * QiuLD_dVgs ; QidLDext_dT = T4 * QiuLD_dT ; QbdLDext = T4 * QbuLD ; QbdLDext_dVbse = T4 * QbuLD_dVbs ; QbdLDext_dVdse= T4 * QbuLD_dVds ; QbdLDext_dVgse= T4 * QbuLD_dVgs ; QbdLDext_dT = T4 * QbuLD_dT ; } /* Qovdext end */ } /*-----------------------------------* * Additional constant capacitance model *-----------------*/ flg_overgiven = ( (int)ModeRVS * model->HSMHV_cgso_Given + (int)ModeNML * model->HSMHV_cgdo_Given ) ; if ( flg_overgiven ) { Cgdo = ModeRVS * pParam->HSMHV_cgso + ModeNML * pParam->HSMHV_cgdo ; Cgdo *= - here->HSMHV_weffcv_nf ; } Qgdo = - Cgdo * (Vgse - Vdse) ; Qgdo_dVbse = 0.0 ; Qgdo_dVdse = Cgdo ; Qgdo_dVgse = - Cgdo ; } /* Coovlpd != 0 end */ /*-------------------------------------------* * Gate/Bulk overlap charge: Qgbo *-----------------*/ Cgbo_loc = - pParam->HSMHV_cgbo * here->HSMHV_lgate ; Qgbo = - Cgbo_loc * (Vgs -Vbs) ; Qgbo_dVgs = - Cgbo_loc ; Qgbo_dVbs = Cgbo_loc ; Qgbo_dVds = 0.0 ; /*---------------------------------------------------* * Lateral-field-induced capacitance. *-----------------*/ if ( model->HSMHV_xqy == 0 ){ Qy = 0.0e0 ; Qy_dVds = 0.0e0 ; Qy_dVgs = 0.0e0 ; Qy_dVbs = 0.0e0 ; Qy_dT = 0.0e0 ; } else { Pslk = Ec * Leff + Ps0 ; Pslk_dVbs = Ec_dVbs * Leff + Ps0_dVbs; Pslk_dVds = Ec_dVds * Leff + Ps0_dVds; Pslk_dVgs = Ec_dVgs * Leff + Ps0_dVgs; Pslk_dT = Ec_dT * Leff + Ps0_dT; T1 = Aclm * ( Vds + Ps0 ) + ( 1.0e0 - Aclm ) * Pslk ; T1_dVb = Aclm * ( Ps0_dVbs ) + ( 1.0e0 - Aclm ) * Pslk_dVbs ; T1_dVd = Aclm * ( 1.0 + Ps0_dVds ) + ( 1.0e0 - Aclm ) * Pslk_dVds ; T1_dVg = Aclm * ( Ps0_dVgs ) + ( 1.0e0 - Aclm ) * Pslk_dVgs ; T1_dT = Aclm * ( Ps0_dT ) + ( 1.0e0 - Aclm ) * Pslk_dT ; T10 = here->HSMHV_wdpl ; T3 = T10 * 1.3 ; T2 = C_ESI * here->HSMHV_weffcv_nf * T3 ; Qy = - ( ( Ps0 + Vds - T1 ) / model->HSMHV_xqy ) * T2 ; Qy_dVds = - ( ( Ps0_dVds + 1.0e0 - T1_dVd ) / model->HSMHV_xqy ) * T2 ; Qy_dVgs = - ( ( Ps0_dVgs - T1_dVg ) / model->HSMHV_xqy ) * T2 ; Qy_dVbs = - ( ( Ps0_dVbs - T1_dVb ) / model->HSMHV_xqy ) * T2 ; Qy_dT = - ( ( Ps0_dT - T1_dT ) / model->HSMHV_xqy ) * T2 ; } if ( model->HSMHV_xqy1 != 0.0 ){ Qy += here->HSMHV_cqyb0 * Vbs ; Qy_dVbs += here->HSMHV_cqyb0 ; } /*---------------------------------------------------* * Fringing capacitance. *-----------------*/ Cfd = here->HSMHV_cfrng ; Cfs = here->HSMHV_cfrng ; Qfd = Cfd * ( Vgse - Vdse ) ; Qfs = Cfs * Vgse ; /*-----------------------------------------------------------* * End of PART-3. (label) *-----------------*/ /* end_of_part_3:*/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-4: Substrate-source/drain junction diode. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Cbsj, Cbdj: node-base S/D biases. *-----------------*/ T10 = model->HSMHV_cvb * here->HSMHV_jd_nvtm_inv ; T11 = model->HSMHV_cvbk * here->HSMHV_jd_nvtm_inv ; T9 = model->HSMHV_cisb * here->HSMHV_exptemp ; T0 = here->HSMHV_isbd2 * T9 ; T2 = exp (- vbd_jct * T10 ); T2_dVb = - T2 * T10 ; T3 = exp (- vbd_jct * T11 ); T3_dVb = - T3 * T11 ; /* self heating */ T10_dT = model->HSMHV_cvb * beta_dT / pParam->HSMHV_nj ; T11_dT = model->HSMHV_cvbk * beta_dT / pParam->HSMHV_nj ; T9_dT = model->HSMHV_cisb * exptemp_dT ; T0_dT = here->HSMHV_isbd2 * T9_dT + isbd2_dT * T9 ; T2_dT = -vbd_jct * T10 * T2 * beta_dT * beta_inv ; T3_dT = -vbd_jct * T11 * T3 * beta_dT * beta_inv ; /* ibd */ if ( vbd_jct < here->HSMHV_vbdt ) { TX = vbd_jct * here->HSMHV_jd_nvtm_inv ; if ( TX < - EXP_THR ) { T1 = 0.0 ; T1_dVb = 0.0 ; T1_dT = 0.0 ; } else { T1 = exp ( TX ) ; T1_dVb = T1 * here->HSMHV_jd_nvtm_inv ; T1_dT = T1 * TX * beta_dT * beta_inv ; } Ibd = here->HSMHV_isbd * (T1 - 1.0) + T0 * (T2 - 1.0) + pParam->HSMHV_cisbk * (T3 - 1.0); Gbd = here->HSMHV_isbd * T1_dVb + T0 * T2_dVb + pParam->HSMHV_cisbk * T3_dVb ; Ibd_dT = here->HSMHV_isbd * T1_dT + isbd_dT * ( T1 - 1.0 ) + T0 * T2_dT + T0_dT * ( T2 - 1.0 ) + pParam->HSMHV_cisbk * T3_dT ; } else { T1 = here->HSMHV_jd_expcd ; T4 = here->HSMHV_isbd * here->HSMHV_jd_nvtm_inv * T1 ; Ibd = here->HSMHV_isbd * (T1 - 1.0) + T4 * (vbd_jct - here->HSMHV_vbdt) + T0 * (T2 - 1.0) + pParam->HSMHV_cisbk * (T3 - 1.0) ; Gbd = T4 + T0 * T2_dVb + pParam->HSMHV_cisbk * T3_dVb ; T1_dT = jd_expcd_dT ; T4_dT = isbd_dT * here->HSMHV_jd_nvtm_inv * T1 + here->HSMHV_isbd * jd_nvtm_inv_dT * T1 + here->HSMHV_isbd * here->HSMHV_jd_nvtm_inv * T1_dT ; Ibd_dT = isbd_dT * ( T1 - 1.0 ) + here->HSMHV_isbd * T1_dT + T4_dT * ( vbd_jct - here->HSMHV_vbdt ) - T4 * vbdt_dT + T0_dT * ( T2 - 1.0 ) + T0 * T2_dT + pParam->HSMHV_cisbk * T3_dT ; } T12 = model->HSMHV_divx * here->HSMHV_isbd2 ; Ibd += T12 * vbd_jct ; Gbd += T12 ; T12_dT = model->HSMHV_divx * isbd2_dT ; Ibd_dT += T12_dT * vbd_jct ; /* ibs */ T0 = here->HSMHV_isbs2 * T9 ; T0_dT = here->HSMHV_isbs2 * T9_dT + isbs2_dT * T9 ; TX = - vbs_jct * T10 ; if ( TX < - EXP_THR ) { T2 = 0.0 ; T2_dVb = 0.0 ; T2_dT = 0.0 ; } else { T2 = exp ( TX ); T2_dVb = - T2 * T10 ; T2_dT = T2 * TX * beta_dT * beta_inv ; } TX = - vbs_jct * T11 ; if ( TX < - EXP_THR ) { T3 = 0.0 ; T3_dVb = 0.0 ; T3_dT = 0.0 ; } else { T3 = exp ( TX ); T3_dVb = - T3 * T11 ; T3_dT = T3 * TX * beta_dT * beta_inv ; } if ( vbs_jct < here->HSMHV_vbst ) { TX = vbs_jct * here->HSMHV_jd_nvtm_inv ; if ( TX < - EXP_THR ) { T1 = 0.0 ; T1_dVb = 0.0 ; T1_dT = 0.0 ; } else { T1 = exp ( TX ) ; T1_dVb = T1 * here->HSMHV_jd_nvtm_inv ; T1_dT = T1 * TX * beta_dT * beta_inv ; } Ibs = here->HSMHV_isbs * (T1 - 1.0) + T0 * (T2 - 1.0) + pParam->HSMHV_cisbk * (T3 - 1.0); Gbs = here->HSMHV_isbs * T1_dVb + T0 * T2_dVb + pParam->HSMHV_cisbk * T3_dVb ; Ibs_dT = here->HSMHV_isbs * T1_dT + isbs_dT * ( T1 - 1.0 ) + T0 * T2_dT + T0_dT * ( T2 - 1.0 ) + pParam->HSMHV_cisbk * T3_dT ; } else { T1 = here->HSMHV_jd_expcs ; T4 = here->HSMHV_isbs * here->HSMHV_jd_nvtm_inv * T1 ; Ibs = here->HSMHV_isbs * (T1 - 1.0) + T4 * (vbs_jct - here->HSMHV_vbst) + T0 * (T2 - 1.0) + pParam->HSMHV_cisbk * (T3 - 1.0) ; Gbs = T4 + T0 * T2_dVb + pParam->HSMHV_cisbk * T3_dVb ; T1_dT = jd_expcs_dT ; T4_dT = isbs_dT * here->HSMHV_jd_nvtm_inv * T1 + here->HSMHV_isbs * jd_nvtm_inv_dT * T1 + here->HSMHV_isbs * here->HSMHV_jd_nvtm_inv * T1_dT ; Ibs_dT = isbs_dT * ( T1 - 1.0 ) + here->HSMHV_isbs * T1_dT + T4_dT * ( vbs_jct - here->HSMHV_vbst) - T4 * vbst_dT + T0_dT * ( T2 - 1.0 ) + T0 * T2_dT + pParam->HSMHV_cisbk * T3_dT ; } T12 = model->HSMHV_divx * here->HSMHV_isbs2 ; Ibs += T12 * vbs_jct ; Gbs += T12 ; T12_dT = model->HSMHV_divx * isbs2_dT ; Ibs_dT += T12_dT * vbs_jct ; /*-----------------------------------------------------------* * Charges and Capacitances. *-----------------*/ /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ tcjbd = model->HSMHV_tcjbd ; tcjbs = model->HSMHV_tcjbs ; tcjbdsw = model->HSMHV_tcjbdsw ; tcjbssw = model->HSMHV_tcjbssw ; tcjbdswg = model->HSMHV_tcjbdswg ; tcjbsswg = model->HSMHV_tcjbsswg ; czbs = model->HSMHV_cj * here->HSMHV_as ; czbs = czbs * ( 1.0 + tcjbs * ( TTEMP - model->HSMHV_ktnom )) ; czbs_dT = ( model->HSMHV_cj * here->HSMHV_as ) * tcjbs ; czbd = model->HSMHV_cj * here->HSMHV_ad ; czbd = czbd * ( 1.0 + tcjbd * ( TTEMP - model->HSMHV_ktnom )) ; czbd_dT = ( model->HSMHV_cj * here->HSMHV_ad ) * tcjbd ; /* Source Bulk Junction */ if (here->HSMHV_ps > here->HSMHV_weff_nf) { czbssw = model->HSMHV_cjsw * ( here->HSMHV_ps - here->HSMHV_weff_nf ) ; czbssw = czbssw * ( 1.0 + tcjbssw * ( TTEMP - model->HSMHV_ktnom )) ; czbssw_dT = ( model->HSMHV_cjsw * ( here->HSMHV_ps - here->HSMHV_weff_nf )) * tcjbssw ; czbsswg = model->HSMHV_cjswg * here->HSMHV_weff_nf ; czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSMHV_ktnom )) ; czbsswg_dT = ( model->HSMHV_cjswg * here->HSMHV_weff_nf ) * tcjbsswg ; // if (vbs_jct == 0.0) { if (0) { Qbs = 0.0 ; Qbs_dT = 0.0 ; Capbs = czbs + czbssw + czbsswg ; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->HSMHV_pb ; if (model->HSMHV_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mj ) ; Qbs = model->HSMHV_pb * czbs * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Qbs_dT = model->HSMHV_pb * czbs_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Capbs = czbs * sarg ; } else { Qbs = 0.0 ; Qbs_dT = 0.0 ; Capbs = 0.0 ; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->HSMHV_pbsw ; if (model->HSMHV_mjsw == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjsw ) ; Qbs += model->HSMHV_pbsw * czbssw * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjsw) ; Qbs_dT += model->HSMHV_pbsw * czbssw_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjsw) ; Capbs += czbssw * sarg ; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->HSMHV_pbswg ; if (model->HSMHV_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjswg ) ; Qbs += model->HSMHV_pbswg * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Qbs_dT += model->HSMHV_pbswg * czbsswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Capbs += czbsswg * sarg ; } } else { T1 = czbs + czbssw + czbsswg ; T1_dT = czbs_dT + czbssw_dT + czbsswg_dT ; T2 = czbs * model->HSMHV_mj / model->HSMHV_pb + czbssw * model->HSMHV_mjsw / model->HSMHV_pbsw + czbsswg * model->HSMHV_mjswg / model->HSMHV_pbswg ; T2_dT = czbs_dT * model->HSMHV_mj / model->HSMHV_pb + czbssw_dT * model->HSMHV_mjsw / model->HSMHV_pbsw + czbsswg_dT * model->HSMHV_mjswg / model->HSMHV_pbswg ; Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ; Qbs_dT = vbs_jct * (T1_dT + vbs_jct * 0.5 * T2_dT) ; Capbs = T1 + vbs_jct * T2 ; } } else { czbsswg = model->HSMHV_cjswg * here->HSMHV_ps ; czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSMHV_ktnom )) ; czbsswg_dT = ( model->HSMHV_cjswg * here->HSMHV_ps ) * tcjbsswg ; // if (vbs_jct == 0.0) { if (0) { Qbs = 0.0 ; Qbs_dT = 0.0 ; Capbs = czbs + czbsswg ; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->HSMHV_pb ; if (model->HSMHV_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mj ) ; Qbs = model->HSMHV_pb * czbs * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Qbs_dT = model->HSMHV_pb * czbs_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Capbs = czbs * sarg ; } else { Qbs = 0.0 ; Qbs_dT = 0.0 ; Capbs = 0.0 ; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->HSMHV_pbswg ; if (model->HSMHV_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjswg ) ; Qbs += model->HSMHV_pbswg * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Qbs_dT += model->HSMHV_pbswg * czbsswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Capbs += czbsswg * sarg ; } } else { T1 = czbs + czbsswg ; T1_dT = czbs_dT + czbsswg_dT ; T2 = czbs * model->HSMHV_mj / model->HSMHV_pb + czbsswg * model->HSMHV_mjswg / model->HSMHV_pbswg ; T2_dT = czbs_dT * model->HSMHV_mj / model->HSMHV_pb + czbsswg_dT * model->HSMHV_mjswg / model->HSMHV_pbswg ; Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ; Qbs_dT = vbs_jct * (T1_dT + vbs_jct * 0.5 * T2_dT) ; Capbs = T1 + vbs_jct * T2 ; } } /* Drain Bulk Junction */ if (here->HSMHV_pd > here->HSMHV_weff_nf) { czbdsw = model->HSMHV_cjsw * ( here->HSMHV_pd - here->HSMHV_weff_nf ) ; czbdsw = czbdsw * ( 1.0 + tcjbdsw * ( TTEMP - model->HSMHV_ktnom )) ; czbdsw_dT = ( model->HSMHV_cjsw * ( here->HSMHV_pd - here->HSMHV_weff_nf )) * tcjbdsw ; czbdswg = model->HSMHV_cjswg * here->HSMHV_weff_nf ; czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSMHV_ktnom )) ; czbdswg_dT = ( model->HSMHV_cjswg * here->HSMHV_weff_nf ) * tcjbdswg ; // if (vbd_jct == 0.0) { if (0) { Qbd = 0.0 ; Qbd_dT = 0.0 ; Capbd = czbd + czbdsw + czbdswg ; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->HSMHV_pb ; if (model->HSMHV_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mj ) ; Qbd = model->HSMHV_pb * czbd * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Qbd_dT = model->HSMHV_pb * czbd_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Capbd = czbd * sarg ; } else { Qbd = 0.0 ; Qbd_dT = 0.0 ; Capbd = 0.0 ; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->HSMHV_pbsw ; if (model->HSMHV_mjsw == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjsw ) ; Qbd += model->HSMHV_pbsw * czbdsw * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjsw) ; Qbd_dT += model->HSMHV_pbsw * czbdsw_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjsw) ; Capbd += czbdsw * sarg ; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->HSMHV_pbswg ; if (model->HSMHV_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjswg ) ; Qbd += model->HSMHV_pbswg * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Qbd_dT += model->HSMHV_pbswg * czbdswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Capbd += czbdswg * sarg ; } } else { T1 = czbd + czbdsw + czbdswg ; T1_dT = czbd_dT + czbdsw_dT + czbdswg_dT ; T2 = czbd * model->HSMHV_mj / model->HSMHV_pb + czbdsw * model->HSMHV_mjsw / model->HSMHV_pbsw + czbdswg * model->HSMHV_mjswg / model->HSMHV_pbswg ; T2_dT = czbd_dT * model->HSMHV_mj / model->HSMHV_pb + czbdsw_dT * model->HSMHV_mjsw / model->HSMHV_pbsw + czbdswg_dT * model->HSMHV_mjswg / model->HSMHV_pbswg ; Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ; Qbd_dT = vbd_jct * (T1_dT + vbd_jct * 0.5 * T2_dT) ; Capbd = T1 + vbd_jct * T2 ; } } else { czbdswg = model->HSMHV_cjswg * here->HSMHV_pd ; czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSMHV_ktnom )) ; czbdswg_dT = ( model->HSMHV_cjswg * here->HSMHV_pd ) * tcjbdswg ; // if (vbd_jct == 0.0) { if (0) { Qbd = 0.0 ; Qbd_dT = 0.0 ; Capbd = czbd + czbdswg ; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->HSMHV_pb ; if (model->HSMHV_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mj ) ; Qbd = model->HSMHV_pb * czbd * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Qbd_dT = model->HSMHV_pb * czbd_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mj) ; Capbd = czbd * sarg ; } else { Qbd = 0.0 ; Qbd_dT = 0.0 ; Capbd = 0.0 ; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->HSMHV_pbswg ; if (model->HSMHV_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSMHV_mjswg ) ; Qbd += model->HSMHV_pbswg * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Qbd_dT += model->HSMHV_pbswg * czbdswg_dT * (1.0 - arg * sarg) / (1.0 - model->HSMHV_mjswg) ; Capbd += czbdswg * sarg ; } } else { T1 = czbd + czbdswg ; T1_dT = czbd_dT + czbdswg_dT ; T2 = czbd * model->HSMHV_mj / model->HSMHV_pb + czbdswg * model->HSMHV_mjswg / model->HSMHV_pbswg ; T2_dT = czbd_dT * model->HSMHV_mj / model->HSMHV_pb + czbdswg_dT * model->HSMHV_mjswg / model->HSMHV_pbswg ; Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ; Qbd_dT = vbd_jct * (T1_dT + vbd_jct * 0.5 * T2_dT) ; Capbd = T1 + vbd_jct * T2 ; } } /*-----------------------------------------------------------* * End of PART-4. (label) *-----------------*/ /* end_of_part_4:*/ /*-----------------------------------------------------------* * PART-5: NQS. (label) *-----------------*/ if (flg_nqs) { if(ckt->CKTmode & MODETRAN){ if( ckt->CKTmode & MODEINITTRAN ){ tau = tau_dVds = tau_dVgs = tau_dVbs = tau_dT = 0.0 ; taub = taub_dVds = taub_dVgs = taub_dVbs = taub_dT = 0.0 ; } else { /* tau for inversion charge */ if (flg_noqi == 0) { T12 = model->HSMHV_dly1; T10 = model->HSMHV_dly2; T3 = Lch ; T1 = T10 * T12 * T3 * T3 ; T2 = Mu * VgVt * T12 + T10 * T3 * T3 + small ; tau = T1 / T2 ; T1_dVg = T10 * T12 * 2.0 * T3 * Lch_dVgs ; T1_dVd = T10 * T12 * 2.0 * T3 * Lch_dVds ; T1_dVb = T10 * T12 * 2.0 * T3 * Lch_dVbs ; T1_dT = T10 * T12 * 2.0 * T3 * Lch_dT ; T2_dVg = T12 * Mu_dVgs * VgVt + T12 * Mu * VgVt_dVgs + T10 * 2.0 * T3 * Lch_dVgs ; T2_dVd = T12 * Mu_dVds * VgVt + T12 * Mu * VgVt_dVds + T10 * 2.0 * T3 * Lch_dVds ; T2_dVb = T12 * Mu_dVbs * VgVt + T12 * Mu * VgVt_dVbs + T10 * 2.0 * T3 * Lch_dVbs ; T2_dT = T12 * Mu_dT * VgVt + T12 * Mu * VgVt_dT + T10 * 2.0 * T3 * Lch_dT ; T4 = 1.0 / T2 ; tau_dVgs = ( T1_dVg - tau * T2_dVg ) * T4 ; tau_dVds = ( T1_dVd - tau * T2_dVd ) * T4 ; tau_dVbs = ( T1_dVb - tau * T2_dVb ) * T4 ; tau_dT = ( T1_dT - tau * T2_dT ) * T4 ; } else { tau = model->HSMHV_dly1 ; tau_dVgs = tau_dVds = tau_dVbs = tau_dT = 0.0 ; } T1 = ckt->CKTdelta ; /* tau for bulk charge */ T2 = modelMKS->HSMHV_dly3 ; taub = T2 * Cox ; taub_dVgs = T2 * Cox_dVg ; taub_dVds = T2 * Cox_dVd ; taub_dVbs = T2 * Cox_dVb ; taub_dT = 0.0 ; } } else { /* !(CKT_mode & MODETRAN) */ tau = tau_dVds = tau_dVgs = tau_dVbs = tau_dT = 0.0 ; taub = taub_dVds = taub_dVgs = taub_dVbs = taub_dT = 0.0 ; } } if ( flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG)) ) { /* ACNQS */ if (flg_noqi == 0) { T12 = model->HSMHV_dly1 ; T10 = model->HSMHV_dly2 ; T3 = Lch ; T1 = T12 * T10 * T3 * T3 ; T2 = Mu * VgVt * T12 + T10 * T3 * T3 + small ; tau = T1 / T2 ; T1_dVg = T10 * T12 * 2.0 * T3 * Lch_dVgs ; T1_dVd = T10 * T12 * 2.0 * T3 * Lch_dVds ; T1_dVb = T10 * T12 * 2.0 * T3 * Lch_dVbs ; T1_dT = T10 * T12 * 2.0 * T3 * Lch_dT ; T2_dVg = T12 * Mu_dVgs * VgVt + T12 * Mu * VgVt_dVgs + T10 * 2.0 * T3 * Lch_dVgs ; T2_dVd = T12 * Mu_dVds * VgVt + T12 * Mu * VgVt_dVds + T10 * 2.0 * T3 * Lch_dVds ; T2_dVb = T12 * Mu_dVbs * VgVt + T12 * Mu * VgVt_dVbs + T10 * 2.0 * T3 * Lch_dVbs ; T2_dT = T12 * Mu_dT * VgVt + T12 * Mu * VgVt_dT + T10 * 2.0 * T3 * Lch_dT ; T4 = 1.0 / T2 ; tau_dVgs = (T1_dVg - tau * T2_dVg) * T4 ; tau_dVds = (T1_dVd - tau * T2_dVd) * T4 ; tau_dVbs = (T1_dVb - tau * T2_dVb) * T4 ; tau_dT = (T1_dT - tau * T2_dT) * T4 ; } else { tau = model->HSMHV_dly1 ; tau_dVgs = tau_dVds = tau_dVbs = tau_dT = 0.0 ; } T2 = modelMKS->HSMHV_dly3 ; taub = T2 * Cox; taub_dVgs = T2 * Cox_dVg ; taub_dVds = T2 * Cox_dVd ; taub_dVbs = T2 * Cox_dVb ; taub_dT = 0.0 ; } /*-----------------------------------------------------------* * End of PART-5. (label) *-----------------*/ /* end_of_part_5:*/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-6: Noise Calculation. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * 1/f noise. *-----------------*/ if ( model->HSMHV_coflick != 0 && !flg_noqi ) { NFalp = pParam->HSMHV_nfalp ; NFtrp = pParam->HSMHV_nftrp ; Cit = modelMKS->HSMHV_cit ; T1 = Qn0 / C_QE ; T2 = ( Cox + Qn0 / ( Ps0 - Vbscl ) + Cit ) * beta_inv / C_QE ; T3 = -2.0E0 * Qi / C_QE / Lch / here->HSMHV_weff_nf - T1 ; if ( T3 != T1 ) { T4 = 1.0E0 / ( T1 + T2 ) / ( T3 + T2 ) + 2.0E0 * NFalp * Ey * Mu / ( T3 - T1 ) * log( ( T3 + T2 ) / ( T1 + T2 ) ) + NFalp * Ey * Mu * NFalp * Ey * Mu ; } else { T4 = 1.0 / ( T1 + T2 ) / ( T3 + T2 ) + 2.0 * NFalp * Ey * Mu / ( T1 + T2 ) + NFalp * Ey * Mu * NFalp * Ey * Mu; } Nflic = Ids * Ids * NFtrp / ( Lch * beta * here->HSMHV_weff_nf ) * T4 ; } else { Nflic = 0.0 ; } /*-----------------------------------------------------------* * thermal noise. *-----------------*/ if ( model->HSMHV_cothrml != 0 && !flg_noqi ) { Eyd = ( Psdl - Ps0 ) / Lch + small ; T12 = Muun * Eyd / 1.0e7 ; /* note: model->HSMHV_bb = 2 (electron) ;1 (hole) */ if ( 1.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 1.0e0 + epsm10 ) { T7 = 1.0e0 ; } else if ( 2.0e0 - epsm10 <= model->HSMHV_bb && model->HSMHV_bb <= 2.0e0 + epsm10 ) { T7 = T12 ; } else { T7 = Fn_Pow( Eyd, model->HSMHV_bb - 1.0e0 ) ; } T8 = T12 * T7 ; T9 = 1.0e0 + T8 ; T10 = Fn_Pow( T9, ( - 1.0e0 / model->HSMHV_bb - 1.0e0 ) ) ; T11 = T9 * T10 ; Mud_hoso = Muun * T11 ; Mu_Ave = ( Mu + Mud_hoso ) / 2.0 ; /* Sid_h = GAMMA * 4.0 * C_KB * model->HSMHV_temp * gds0_h2; */ T0 = Alpha * Alpha ; Nthrml = here->HSMHV_weff_nf * Cox * VgVt * Mu * ( ( 1e0 + 3e0 * Alpha + 6e0 * T0 ) * Mud_hoso * Mud_hoso + ( 3e0 + 4e0 * Alpha + 3e0 * T0 ) * Mud_hoso * Mu + ( 6e0 + 3e0 * Alpha + T0 ) * Mu * Mu ) / ( 15e0 * Lch * ( 1e0 + Alpha ) * Mu_Ave * Mu_Ave ) ; } else { Nthrml = 0e0 ; } /*----------------------------------------------------------* * induced gate noise. ( Part 2/3 ) *----------------------*/ if ( model->HSMHV_coign != 0 && model->HSMHV_cothrml != 0 && flg_ign == 1 && !flg_noqi ) { sqrtkusaiL = sqrt( kusaiL ) ; T2 = VgVt + sqrtkusaiL ; T3 = kusai00 * kusai00 ; T4 = kusaiL * kusaiL ; T5 = 42.0e0 * kusai00 * kusaiL ; T5 += 4.0e0 * ( T3 + T4 ) ; T5 += 20.0e0 * sqrtkusaiL * VgVt * ( kusai00 + kusaiL ) ; T10 = T2 * T2 ; T10 *= T10 ; kusai_ig = T5 / ( T10 * T2 ) ; /* Induced Gate Noise parameter */ gds0_ign = here->HSMHV_weff_nf / Lch * Mu * Cox ; gds0_h2 = gds0_ign * VgVt ; GAMMA = Nthrml / gds0_h2 ; T7 = kusai00 + 4.0e0 * VgVt * sqrtkusaiL + kusaiL ; /* cross-correlation coefficient (= Sigid/sqrt(Sig*Sid) ) */ crl_f = c_sqrt_15 * kusai00L * T7 / ( 6.0e0 * T2 * sqrt( GAMMA * T2 * VgVt * T5 ) ) ; } /*-----------------------------------------------------------* * End of PART-6. (label) *-----------------*/ /* end_of_part_6:*/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-7: Evaluation of outputs. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Implicit quantities related to Alpha. *-----------------*/ if ( flg_noqi == 0 && VgVt > VgVt_small ) { Delta = fac1 * beta / ( 2 * Xi0p12 ) ; Pslsat = VgVt / ( 1.0 + Delta ) + Ps0 ; } else { Pslsat = 0.0 ; } Vdsat = Pslsat - Pb2 ; if ( Vdsat < 0.0 ) { Vdsat = 0.0 ; } /*-----------------------------------------------------------* * Evaluate the derivatives w.r.t. external biases. * -> not to be done for the flat and Schur version! *-----------------*/ Ids += IdsIBPC ; Ids_dVbs += IdsIBPC_dVbs ; Ids_dVds += IdsIBPC_dVds ; Ids_dVgs += IdsIBPC_dVgs ; Ids_dT += IdsIBPC_dT ; /*---------------------------------------------------* * Derivatives of junction diode currents and charges. * - NOTE: These quantities are regarded as functions of * external biases. * - NOTE: node-base S/D *-----------------*/ Gbse = Gbs ; Gbde = Gbd ; Capbse = Capbs ; Capbde = Capbd ; /*---------------------------------------------------* * Extrapolate quantities if external biases are out of bounds. * -> not necessary here *-----------------*/ /*-----------------------------------------------------------* * Warn negative conductance. * - T1 ( = d Ids / d Vds ) is the derivative w.r.t. circuit bias. *-----------------*/ T1 = ModeNML * Ids_dVds + ModeRVS * ( Ids_dVbs + Ids_dVds + Ids_dVgs ) ; if ( flg_info >= 1 && (Ids_dVbs < 0.0 || T1 < 0.0 || Ids_dVgs < 0.0) ) { printf( "*** warning(HiSIM_HV): Negative Conductance\n" ) ; printf( " type = %d mode = %d\n" , model->HSMHV_type , here->HSMHV_mode ) ; printf( " Vbs = %12.5e Vds = %12.5e Vgse= %12.5e\n" , Vbs , Vds , Vgs ) ; printf( " Ids_dVbs = %12.5e\n" , Ids_dVbs ) ; printf( " Ids_dVds = %12.5e\n" , T1 ) ; printf( " Ids_dVgs = %12.5e\n" , Ids_dVgs ) ; } /*-----------------------------------------------------------* * Assign outputs. *-----------------*/ /*---------------------------------------------------* * Channel current and conductances. *-----------------*/ here->HSMHV_ids = Mfactor * Ids ; here->HSMHV_dIds_dVdsi = Mfactor * Ids_dVds ; here->HSMHV_dIds_dVgsi = Mfactor * Ids_dVgs ; here->HSMHV_dIds_dVbsi = Mfactor * Ids_dVbs ; here->HSMHV_dIds_dTi = Mfactor * Ids_dT ; /* -------------------------------------* * Intrinsic charges / capacitances. *-----------------*/ if (flg_nqs) { /* for flat handling of NQS: the NQS charges are added in hsmhvld */ here->HSMHV_qg = 0.0 ; here->HSMHV_qd = 0.0 ; here->HSMHV_qs = 0.0 ; here->HSMHV_qdp = 0.0 ; here->HSMHV_qsp = 0.0 ; here->HSMHV_dqdp_dVdse = 0.0 ; here->HSMHV_dqdp_dVgse = 0.0 ; here->HSMHV_dqdp_dVbse = 0.0 ; here->HSMHV_dqdp_dTi = 0.0 ; here->HSMHV_dqsp_dVdse = 0.0 ; here->HSMHV_dqsp_dVgse = 0.0 ; here->HSMHV_dqsp_dVbse = 0.0 ; here->HSMHV_dqsp_dTi = 0.0 ; here->HSMHV_dQdi_dVdsi = 0.0 ; here->HSMHV_dQdi_dVgsi = 0.0 ; here->HSMHV_dQdi_dVbsi = 0.0 ; here->HSMHV_dQdi_dTi = 0.0 ; here->HSMHV_dQg_dVdsi = 0.0 ; here->HSMHV_dQg_dVgsi = 0.0 ; here->HSMHV_dQg_dVbsi = 0.0 ; here->HSMHV_dQg_dTi = 0.0 ; here->HSMHV_dQb_dVdsi = 0.0 ; here->HSMHV_dQb_dVgsi = 0.0 ; here->HSMHV_dQb_dVbsi = 0.0 ; here->HSMHV_dQb_dTi = 0.0 ; here->HSMHV_qgext = 0.0 ; here->HSMHV_qdext = 0.0 ; here->HSMHV_qsext = 0.0 ; here->HSMHV_dQdext_dVdse = 0.0 ; here->HSMHV_dQdext_dVgse = 0.0 ; here->HSMHV_dQdext_dVbse = 0.0 ; here->HSMHV_dQdext_dTi = 0.0 ; here->HSMHV_dQgext_dVdse = 0.0 ; here->HSMHV_dQgext_dVgse = 0.0 ; here->HSMHV_dQgext_dVbse = 0.0 ; here->HSMHV_dQgext_dTi = 0.0 ; here->HSMHV_dQbext_dVdse = 0.0 ; here->HSMHV_dQbext_dVgse = 0.0 ; here->HSMHV_dQbext_dVbse = 0.0 ; here->HSMHV_dQbext_dTi = 0.0 ; here->HSMHV_tau = tau ; here->HSMHV_tau_dVgsi = tau_dVgs ; here->HSMHV_tau_dVdsi = tau_dVds ; here->HSMHV_tau_dVbsi = tau_dVbs ; here->HSMHV_tau_dTi = tau_dT ; here->HSMHV_taub = taub ; here->HSMHV_taub_dVgsi = taub_dVgs ; here->HSMHV_taub_dVdsi = taub_dVds ; here->HSMHV_taub_dVbsi = taub_dVbs ; here->HSMHV_taub_dTi = taub_dT ; here->HSMHV_Xd = Qdrat; here->HSMHV_Xd_dVgsi = Qdrat_dVgs ; here->HSMHV_Xd_dVdsi = Qdrat_dVds ; here->HSMHV_Xd_dVbsi = Qdrat_dVbs ; here->HSMHV_Xd_dTi = Qdrat_dT ; here->HSMHV_Qbulk = Mfactor * Qb ; here->HSMHV_Qbulk_dVgsi = Mfactor * Qb_dVgs ; here->HSMHV_Qbulk_dVdsi = Mfactor * Qb_dVds ; here->HSMHV_Qbulk_dVbsi = Mfactor * Qb_dVbs ; here->HSMHV_Qbulk_dTi = Mfactor * Qb_dT ; here->HSMHV_Qi = Mfactor * Qi ; here->HSMHV_Qi_dVgsi = Mfactor * Qi_dVgs ; here->HSMHV_Qi_dVdsi = Mfactor * Qi_dVds ; here->HSMHV_Qi_dVbsi = Mfactor * Qi_dVbs ; here->HSMHV_Qi_dTi = Mfactor * Qi_dT ; } else { /* QS */ here->HSMHV_qg = Mfactor * - (Qb + Qi) ; here->HSMHV_qd = Mfactor * Qd ; here->HSMHV_qs = Mfactor * ( Qi - Qd ) ; here->HSMHV_qdp = 0.0 ; here->HSMHV_qsp = 0.0 ; here->HSMHV_dqdp_dVdse = 0.0 ; here->HSMHV_dqdp_dVgse = 0.0 ; here->HSMHV_dqdp_dVbse = 0.0 ; here->HSMHV_dqdp_dTi = 0.0 ; here->HSMHV_dqsp_dVdse = 0.0 ; here->HSMHV_dqsp_dVgse = 0.0 ; here->HSMHV_dqsp_dVbse = 0.0 ; here->HSMHV_dqsp_dTi = 0.0 ; here->HSMHV_qgext = 0.0 ; here->HSMHV_qdext = 0.0 ; here->HSMHV_qsext = 0.0 ; here->HSMHV_dQdext_dVdse = 0.0 ; here->HSMHV_dQdext_dVgse = 0.0 ; here->HSMHV_dQdext_dVbse = 0.0 ; here->HSMHV_dQdext_dTi = 0.0 ; here->HSMHV_dQgext_dVdse = 0.0 ; here->HSMHV_dQgext_dVgse = 0.0 ; here->HSMHV_dQgext_dVbse = 0.0 ; here->HSMHV_dQgext_dTi = 0.0 ; here->HSMHV_dQbext_dVdse = 0.0 ; here->HSMHV_dQbext_dVgse = 0.0 ; here->HSMHV_dQbext_dVbse = 0.0 ; here->HSMHV_dQbext_dTi = 0.0 ; here->HSMHV_dQdi_dVdsi = Mfactor * Qd_dVds ; here->HSMHV_dQdi_dVgsi = Mfactor * Qd_dVgs ; here->HSMHV_dQdi_dVbsi = Mfactor * Qd_dVbs ; here->HSMHV_dQdi_dTi = Mfactor * Qd_dT ; here->HSMHV_dQg_dVdsi = Mfactor * ( - Qb_dVds - Qi_dVds ) ; here->HSMHV_dQg_dVgsi = Mfactor * ( - Qb_dVgs - Qi_dVgs ) ; here->HSMHV_dQg_dVbsi = Mfactor * ( - Qb_dVbs - Qi_dVbs ) ; here->HSMHV_dQg_dTi = Mfactor * ( - Qb_dT - Qi_dT ) ; here->HSMHV_dQb_dVdsi = Mfactor * Qb_dVds ; here->HSMHV_dQb_dVgsi = Mfactor * Qb_dVgs ; here->HSMHV_dQb_dVbsi = Mfactor * Qb_dVbs ; here->HSMHV_dQb_dTi = Mfactor * Qb_dT ; } /*---------------------------------------------------* * Add S/D overlap charges/capacitances to intrinsic ones. * - NOTE: This function depends on coadov, a control option. *-----------------*/ if ( model->HSMHV_coadov == 1 ) { here->HSMHV_qg += Mfactor * ( Qgod + Qgos + Qgbo + Qy - Qovd - Qovs ) ; here->HSMHV_qd += Mfactor * ( - Qgod - Qy + QbdLD ) ; here->HSMHV_qs += Mfactor * ( - Qgos + QbsLD ) ; here->HSMHV_qdp += Mfactor * ( - Qfd - Qgdo ) ; here->HSMHV_qsp += Mfactor * ( - Qfs - Qgso ) ; here->HSMHV_cddo = Mfactor * ( - Qgod_dVds - Qy_dVds + QbdLD_dVds ) ; here->HSMHV_dQdi_dVdsi += here->HSMHV_cddo ; here->HSMHV_cdgo = Mfactor * ( - Qgod_dVgs - Qy_dVgs + QbdLD_dVgs ) ; here->HSMHV_dQdi_dVgsi += here->HSMHV_cdgo ; here->HSMHV_cdbo = Mfactor * ( - Qgod_dVbs - Qy_dVbs + QbdLD_dVbs ) ; here->HSMHV_dQdi_dVbsi += here->HSMHV_cdbo ; here->HSMHV_dQdi_dTi += Mfactor * ( - Qgod_dT - Qy_dT + QbdLD_dT ) ; here->HSMHV_cgdo = Mfactor * ( Qgod_dVds + Qgos_dVds + Qgbo_dVds + Qy_dVds - Qovd_dVds - Qovs_dVds ) ; here->HSMHV_dQg_dVdsi += here->HSMHV_cgdo ; here->HSMHV_cggo = Mfactor * ( Qgod_dVgs + Qgos_dVgs + Qgbo_dVgs + Qy_dVgs - Qovd_dVgs - Qovs_dVgs ) ; here->HSMHV_dQg_dVgsi += here->HSMHV_cggo ; here->HSMHV_cgbo = Mfactor * ( Qgod_dVbs + Qgos_dVbs + Qgbo_dVbs + Qy_dVbs - Qovd_dVbs - Qovs_dVbs ) ; here->HSMHV_dQg_dVbsi += here->HSMHV_cgbo ; here->HSMHV_dQg_dTi += Mfactor * ( Qgod_dT + Qgos_dT + Qgbo_dT + Qy_dT - Qovd_dT - Qovs_dT ) ; here->HSMHV_cbdo = Mfactor * ( - Qgbo_dVds + QidLD_dVds + QisLD_dVds ) ; here->HSMHV_dQb_dVdsi += here->HSMHV_cbdo ; here->HSMHV_cbgo = Mfactor * ( - Qgbo_dVgs + QidLD_dVgs + QisLD_dVgs ) ; here->HSMHV_dQb_dVgsi += here->HSMHV_cbgo ; here->HSMHV_cbbo = Mfactor * ( - Qgbo_dVbs + QidLD_dVbs + QisLD_dVbs ) ; here->HSMHV_dQb_dVbsi += here->HSMHV_cbbo ; here->HSMHV_dQb_dTi += Mfactor * ( - Qgbo_dT + QidLD_dT + QisLD_dT ) ; /* for fringing capacitances */ here->HSMHV_dqdp_dVdse += Mfactor * ( Cfd - Qgdo_dVdse ) ; here->HSMHV_dqdp_dVgse += Mfactor * ( - Cfd - Qgdo_dVgse ) ; here->HSMHV_dqdp_dVbse += Mfactor * ( - Qgdo_dVbse ) ; here->HSMHV_dqdp_dTi += 0.0 ; here->HSMHV_dqsp_dVdse += Mfactor * ( - Qgso_dVdse ) ; here->HSMHV_dqsp_dVgse += Mfactor * ( - Cfs - Qgso_dVgse ) ; here->HSMHV_dqsp_dVbse += Mfactor * ( - Qgso_dVbse ) ; here->HSMHV_dqsp_dTi += 0.0 ; here->HSMHV_qgext += Mfactor * ( - Qovdext - Qovsext ) ; here->HSMHV_qdext += Mfactor * QbdLDext ; here->HSMHV_qsext += Mfactor * QbsLDext ; here->HSMHV_dQdext_dVdse += Mfactor * ( QbdLDext_dVdse ) ; here->HSMHV_dQdext_dVgse += Mfactor * ( QbdLDext_dVgse ) ; here->HSMHV_dQdext_dVbse += Mfactor * ( QbdLDext_dVbse ) ; here->HSMHV_dQdext_dTi += Mfactor * ( QbdLDext_dT ) ; here->HSMHV_dQgext_dVdse += Mfactor * ( - Qovdext_dVdse - Qovsext_dVdse ) ; here->HSMHV_dQgext_dVgse += Mfactor * ( - Qovdext_dVgse - Qovsext_dVgse ) ; here->HSMHV_dQgext_dVbse += Mfactor * ( - Qovdext_dVbse - Qovsext_dVbse ) ; here->HSMHV_dQgext_dTi += Mfactor * ( - Qovdext_dT - Qovsext_dT ) ; here->HSMHV_dQbext_dVdse += Mfactor * ( QidLDext_dVdse + QisLDext_dVdse ) ; here->HSMHV_dQbext_dVgse += Mfactor * ( QidLDext_dVgse + QisLDext_dVgse ) ; here->HSMHV_dQbext_dVbse += Mfactor * ( QidLDext_dVbse + QisLDext_dVbse ) ; here->HSMHV_dQbext_dTi += Mfactor * ( QidLDext_dT + QisLDext_dT ) ; } here->HSMHV_dQsi_dVdsi = - (here->HSMHV_dQdi_dVdsi + here->HSMHV_dQg_dVdsi + here->HSMHV_dQb_dVdsi) ; here->HSMHV_dQsi_dVgsi = - (here->HSMHV_dQdi_dVgsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQb_dVgsi) ; here->HSMHV_dQsi_dVbsi = - (here->HSMHV_dQdi_dVbsi + here->HSMHV_dQg_dVbsi + here->HSMHV_dQb_dVbsi) ; here->HSMHV_dQsi_dTi = - (here->HSMHV_dQdi_dTi + here->HSMHV_dQg_dTi + here->HSMHV_dQb_dTi ) ; here->HSMHV_dQsext_dVdse = - (here->HSMHV_dQdext_dVdse + here->HSMHV_dQgext_dVdse + here->HSMHV_dQbext_dVdse) ; here->HSMHV_dQsext_dVgse = - (here->HSMHV_dQdext_dVgse + here->HSMHV_dQgext_dVgse + here->HSMHV_dQbext_dVgse) ; here->HSMHV_dQsext_dVbse = - (here->HSMHV_dQdext_dVbse + here->HSMHV_dQgext_dVbse + here->HSMHV_dQbext_dVbse) ; here->HSMHV_dQsext_dTi = - (here->HSMHV_dQdext_dTi + here->HSMHV_dQgext_dTi + here->HSMHV_dQbext_dTi ) ; /*---------------------------------------------------* * Substrate/gate/leak currents. *-----------------*/ here->HSMHV_isub = Mfactor * Isub ; here->HSMHV_dIsub_dVdsi = Mfactor * Isub_dVds ; here->HSMHV_dIsub_dVgsi = Mfactor * Isub_dVgs ; here->HSMHV_dIsub_dVbsi = Mfactor * Isub_dVbs ; here->HSMHV_dIsub_dTi = Mfactor * Isub_dT ; here->HSMHV_dIsub_dVdse = Mfactor * Isub_dVdse ; here->HSMHV_igb = Mfactor * -Igb ; here->HSMHV_dIgb_dVdsi = - Mfactor * Igb_dVds ; here->HSMHV_dIgb_dVgsi = - Mfactor * Igb_dVgs ; here->HSMHV_dIgb_dVbsi = - Mfactor * Igb_dVbs ; here->HSMHV_dIgb_dTi = - Mfactor * Igb_dT ; if (here->HSMHV_mode == HiSIM_NORMAL_MODE) { here->HSMHV_igd = Mfactor * ( model->HSMHV_glpart1 * Igate - Igd ) ; } else { here->HSMHV_igd = Mfactor * ( (1.0e0 - model->HSMHV_glpart1 ) * Igate - Igs ) ; } if (here->HSMHV_mode == HiSIM_NORMAL_MODE) { here->HSMHV_igs = Mfactor * ( (1.0e0 - model->HSMHV_glpart1) * Igate - Igs ) ; } else { here->HSMHV_igs = Mfactor * ( model->HSMHV_glpart1 * Igate - Igd ) ; } /* note: here->HSMHV_igd and here->HSMHV_igs are already subjected to mode handling, while the following derivatives here->HSMHV_dIgd_dVdsi, ... are not! */ here->HSMHV_dIgd_dVdsi = Mfactor * ( model->HSMHV_glpart1 * Igate_dVds - Igd_dVds ) ; here->HSMHV_dIgd_dVgsi = Mfactor * ( model->HSMHV_glpart1 * Igate_dVgs - Igd_dVgs ) ; here->HSMHV_dIgd_dVbsi = Mfactor * ( model->HSMHV_glpart1 * Igate_dVbs - Igd_dVbs ) ; here->HSMHV_dIgd_dTi = Mfactor * ( model->HSMHV_glpart1 * Igate_dT - Igd_dT ) ; here->HSMHV_dIgs_dVdsi = Mfactor * ( (1.0 - model->HSMHV_glpart1) * Igate_dVds - Igs_dVds ) ; here->HSMHV_dIgs_dVgsi = Mfactor * ( (1.0 - model->HSMHV_glpart1) * Igate_dVgs - Igs_dVgs ) ; here->HSMHV_dIgs_dVbsi = Mfactor * ( (1.0 - model->HSMHV_glpart1) * Igate_dVbs - Igs_dVbs ) ; here->HSMHV_dIgs_dTi = Mfactor * ( (1.0 - model->HSMHV_glpart1) * Igate_dT - Igs_dT ) ; here->HSMHV_igidl = Mfactor * Igidl ; here->HSMHV_dIgidl_dVdsi = Mfactor * Igidl_dVds ; here->HSMHV_dIgidl_dVgsi = Mfactor * Igidl_dVgs ; here->HSMHV_dIgidl_dVbsi = Mfactor * Igidl_dVbs ; here->HSMHV_dIgidl_dTi = Mfactor * Igidl_dT ; here->HSMHV_igisl = Mfactor * Igisl ; here->HSMHV_dIgisl_dVdsi = Mfactor * Igisl_dVds ; here->HSMHV_dIgisl_dVgsi = Mfactor * Igisl_dVgs ; here->HSMHV_dIgisl_dVbsi = Mfactor * Igisl_dVbs ; here->HSMHV_dIgisl_dTi = Mfactor * Igisl_dT ; /*---------------------------------------------------* * Von, Vdsat. *-----------------*/ here->HSMHV_von = Vth ; here->HSMHV_vdsat = Vdsat ; /*---------------------------------------------------* * Junction diode. *-----------------*/ here->HSMHV_ibs = Mfactor * Ibs ; here->HSMHV_ibd = Mfactor * Ibd ; here->HSMHV_gbs = Mfactor * Gbse ; here->HSMHV_gbd = Mfactor * Gbde ; *(ckt->CKTstate0 + here->HSMHVqbs) = Mfactor * Qbs ; *(ckt->CKTstate0 + here->HSMHVqbd) = Mfactor * Qbd ; here->HSMHV_capbs = Mfactor * Capbse ; here->HSMHV_capbd = Mfactor * Capbde ; here->HSMHV_gbdT = Mfactor * Ibd_dT ; here->HSMHV_gbsT = Mfactor * Ibs_dT ; here->HSMHV_gcbdT = Mfactor * Qbd_dT ; here->HSMHV_gcbsT = Mfactor * Qbs_dT ; /*---------------------------------------------------* * Add Gjmin (gmin). *-----------------*/ here->HSMHV_ibs += Mfactor * Gjmin * vbs_jct ; here->HSMHV_ibd += Mfactor * Gjmin * vbd_jct ; here->HSMHV_gbs += Mfactor * Gjmin ; here->HSMHV_gbd += Mfactor * Gjmin ; /*-----------------------------------------------------------* * Warn floating-point exceptions. * - Function finite() in libm is called. * - Go to start with info==5. *-----------------*/ T1 = here->HSMHV_ids + here->HSMHV_dIds_dVdsi + here->HSMHV_dIds_dVgsi + here->HSMHV_dIds_dVbsi ; T1 = T1 + here->HSMHV_qd - (here->HSMHV_dQdi_dVdsi + here->HSMHV_dQdi_dVgsi + here->HSMHV_dQdi_dVbsi) ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf (stderr , "*** warning(HiSIM_HV): FP-exception (PART-1)\n" ) ; if ( flg_info >= 1 ) { printf ( "*** warning(HiSIM_HV): FP-exception\n") ; printf ( "Ids = %e\n" , here->HSMHV_ids ) ; printf ( "Gmbs = %e\n" , here->HSMHV_dIds_dVbsi ) ; printf ( "Gds = %e\n" , here->HSMHV_dIds_dVdsi ) ; printf ( "Gm = %e\n" , here->HSMHV_dIds_dVgsi ) ; printf ( "Qd = %e\n" , here->HSMHV_qd ) ; printf ( "Cds = %e\n" , -(here->HSMHV_dQdi_dVdsi + here->HSMHV_dQdi_dVgsi + here->HSMHV_dQdi_dVbsi) ) ; } } T1 = here->HSMHV_isub + here->HSMHV_dIsub_dVbsi + here->HSMHV_dIsub_dVdsi + here->HSMHV_dIsub_dVgsi ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf (stderr , "*** warning(HiSIM_HV): FP-exception (PART-2)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM_HV): FP-exception\n") ; } } T1 = here->HSMHV_dQg_dVdsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQg_dVbsi ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf(stderr , "*** warning(HiSIM_HV): FP-exception (PART-3)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM_HV): FP-exception\n") ; } } T1 = here->HSMHV_ibs + here->HSMHV_ibd + here->HSMHV_gbs + here->HSMHV_gbd ; T1 = T1 + *(ckt->CKTstate0 + here->HSMHVqbs) + *(ckt->CKTstate0 + here->HSMHVqbd) + here->HSMHV_capbs + here->HSMHV_capbd ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf(stderr , "*** warning(HiSIM_HV): FP-exception (PART-4)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM_HV): FP-exception\n") ; } } /*-----------------------------------------------------------* * Exit for error case. *-----------------*/ if ( flg_err != 0 ) { fprintf (stderr , "----- bias information (HiSIM_HV)\n" ) ; fprintf (stderr , "name: %s\n" , here->HSMHVname ) ; fprintf (stderr , "states: %d\n" , here->HSMHVstates ) ; fprintf (stderr , "Vdse= %.3e Vgse=%.3e Vbse=%.3e\n" , Vdse , Vgse , Vbse ) ; fprintf (stderr , "Vdsi= %.3e Vgsi=%.3e Vbsi=%.3e\n" , Vds , Vgs , Vbs ) ; fprintf (stderr , "vbs_jct= %12.5e vbd_jct= %12.5e\n" , vbs_jct , vbd_jct ) ; fprintf (stderr , "vd= %.3e vs= %.3e vdp= %.3e vgp= %.3e vbp= %.3e vsp= %.3e\n" , *( ckt->CKTrhsOld + here->HSMHVdNode ) , *( ckt->CKTrhsOld + here->HSMHVsNode ) , *( ckt->CKTrhsOld + here->HSMHVdNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVgNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVbNodePrime ) , *( ckt->CKTrhsOld + here->HSMHVsNodePrime ) ) ; fprintf (stderr , "----- bias information (end)\n" ) ; return ( HiSIM_ERROR ) ; } /*-----------------------------------------------------------* * Noise. *-----------------*/ here->HSMHV_noiflick = Mfactor * Nflic ; here->HSMHV_noithrml = Mfactor * Nthrml ; /*----------------------------------------------------------* * induced gate noise. ( Part 3/3 ) *----------------------*/ if ( model->HSMHV_coign != 0 && model->HSMHV_cothrml != 0 && flg_ign == 1 && !flg_noqi ) { T0 = Cox_small * Cox * here->HSMHV_weff_nf * Leff ; T1 = -( here->HSMHV_dQg_dVdsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQg_dVbsi ) / Mfactor ; /* NQS case is not supported. */ if( - T1 > T0 ){ Nign0 = c_16o135 * C_QE * beta_inv * T1 * T1 / gds0_ign ; if ( kusai00L > epsm10 && Vds > epsm10 ) { MuModA = Muun / Mu ; MuModB = ( Muun / Mud_hoso - MuModA ) / Vds ; correct_w1 = MuModA + C_2o3 * MuModB * ( kusai00 + VgVt * sqrtkusaiL + kusaiL ) / ( VgVt + sqrtkusaiL ) ; } else { correct_w1 = Muun / Mud_hoso ; } here->HSMHV_noiigate = Mfactor * Nign0 * kusai_ig * correct_w1 ; here->HSMHV_noicross = crl_f ; if ( here->HSMHV_noiigate < 0.0 ) here->HSMHV_noiigate = 0.0e0 ; }else{ here->HSMHV_noiigate = 0.0e0 ; here->HSMHV_noicross = 0.0e0 ; } }else{ here->HSMHV_noiigate = 0.0e0 ; here->HSMHV_noicross = 0.0e0 ; } /*-----------------------------------------------------------* * Store values for next calculation. *-----------------*/ /* Internal biases */ if ( here->HSMHV_called >= 1 ) { here->HSMHV_vbsc_prv2 = here->HSMHV_vbsc_prv ; here->HSMHV_vdsc_prv2 = here->HSMHV_vdsc_prv ; here->HSMHV_vgsc_prv2 = here->HSMHV_vgsc_prv ; here->HSMHV_mode_prv2 = here->HSMHV_mode_prv ; } here->HSMHV_vbsc_prv = Vbs ; here->HSMHV_vdsc_prv = Vds ; here->HSMHV_vgsc_prv = Vgs ; here->HSMHV_mode_prv = here->HSMHV_mode ; here->HSMHV_temp_prv = TTEMP ; /* Surface potentials and derivatives w.r.t. internal biases */ if ( here->HSMHV_called >= 1 ) { here->HSMHV_ps0_prv2 = here->HSMHV_ps0_prv ; here->HSMHV_ps0_dvbs_prv2 = here->HSMHV_ps0_dvbs_prv ; here->HSMHV_ps0_dvds_prv2 = here->HSMHV_ps0_dvds_prv ; here->HSMHV_ps0_dvgs_prv2 = here->HSMHV_ps0_dvgs_prv ; here->HSMHV_pds_prv2 = here->HSMHV_pds_prv ; here->HSMHV_pds_dvbs_prv2 = here->HSMHV_pds_dvbs_prv ; here->HSMHV_pds_dvds_prv2 = here->HSMHV_pds_dvds_prv ; here->HSMHV_pds_dvgs_prv2 = here->HSMHV_pds_dvgs_prv ; } here->HSMHV_ps0_prv = Ps0 ; here->HSMHV_ps0_dvbs_prv = Ps0_dVbs ; here->HSMHV_ps0_dvds_prv = Ps0_dVds ; here->HSMHV_ps0_dvgs_prv = Ps0_dVgs ; here->HSMHV_ps0_dtemp_prv = Ps0_dT ; here->HSMHV_pds_prv = Pds ; here->HSMHV_pds_dvbs_prv = Pds_dVbs ; here->HSMHV_pds_dvds_prv = Pds_dVds ; here->HSMHV_pds_dvgs_prv = Pds_dVgs ; here->HSMHV_pds_dtemp_prv = Pds_dT ; /* derivatives of channel current w.r.t. external bias (only due to Ra-dependencies!) */ here->HSMHV_dIds_dVdse = Ids_dRa * Ra_dVdse * Mfactor ; here->HSMHV_dIds_dVgse = Ids_dRa * Ra_dVgse * Mfactor ; here->HSMHV_dIds_dVbse = Ids_dRa * Ra_dVbse * Mfactor ; if ( VdseModeNML > 0.0 ) { here->HSMHV_Rd = Rd / Mfactor ; here->HSMHV_dRd_dVdse = Rd_dVdse / Mfactor ; here->HSMHV_dRd_dVgse = Rd_dVgse / Mfactor ; here->HSMHV_dRd_dVbse = Rd_dVbse / Mfactor ; here->HSMHV_dRd_dVsubs = Rd_dVsubs / Mfactor ; here->HSMHV_dRd_dTi = Rd_dT / Mfactor ; here->HSMHV_Rs = Rs / Mfactor ; here->HSMHV_dRs_dVdse = Rs_dVdse / Mfactor ; here->HSMHV_dRs_dVgse = Rs_dVgse / Mfactor ; here->HSMHV_dRs_dVbse = Rs_dVbse / Mfactor ; here->HSMHV_dRs_dVsubs = Rs_dVsubs / Mfactor ; here->HSMHV_dRs_dTi = Rs_dT / Mfactor ; } else { here->HSMHV_Rd = Rs / Mfactor ; here->HSMHV_dRd_dVdse = - ( Rs_dVdse + Rs_dVgse + Rs_dVbse + Rs_dVsubs ) / Mfactor ; here->HSMHV_dRd_dVgse = Rs_dVgse / Mfactor ; here->HSMHV_dRd_dVbse = Rs_dVbse / Mfactor ; here->HSMHV_dRd_dVsubs = Rs_dVsubs / Mfactor ; here->HSMHV_dRd_dTi = Rs_dT / Mfactor ; here->HSMHV_Rs = Rd / Mfactor ; here->HSMHV_dRs_dVdse = - ( Rd_dVdse + Rd_dVgse + Rd_dVbse + Rs_dVsubs ) / Mfactor ; here->HSMHV_dRs_dVgse = Rd_dVgse / Mfactor ; here->HSMHV_dRs_dVbse = Rd_dVbse / Mfactor ; here->HSMHV_dRs_dVsubs = Rd_dVsubs / Mfactor ; here->HSMHV_dRs_dTi = Rd_dT / Mfactor ; } /* Clamping to Res_min */ if(here->HSMHV_Rd < Res_min) { here->HSMHV_Rd = Res_min ; here->HSMHV_dRd_dVdse = 0.0 ; here->HSMHV_dRd_dVgse = 0.0 ; here->HSMHV_dRd_dVbse = 0.0 ; here->HSMHV_dRd_dVsubs = 0.0 ; here->HSMHV_dRd_dTi = 0.0 ; } if(here->HSMHV_Rs < Res_min) { here->HSMHV_Rs = Res_min ; here->HSMHV_dRs_dVdse = 0.0 ; here->HSMHV_dRs_dVgse = 0.0 ; here->HSMHV_dRs_dVbse = 0.0 ; here->HSMHV_dRs_dVsubs = 0.0 ; here->HSMHV_dRs_dTi = 0.0 ; } /*-----------------------------------------------------------* * End of PART-7. (label) *-----------------*/ /* end_of_part_7:*/ /*-----------------------------------------------------------* * Bottom of hsmhveval. *-----------------*/ return ( HiSIM_OK ) ; } /* end of hsmhveval */ ngspice-26/src/spicelib/devices/hisimhv1/hsmhv.c0000644000265600020320000014403112264261473021260 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhv.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "hsmhvdef.h" #include "ngspice/suffix.h" IFparm HSMHVpTable[] = { /* parameters */ IOP( "coselfheat", HSMHV_COSELFHEAT, IF_INTEGER, "Calculation of self heating model"), IOP( "cosubnode", HSMHV_COSUBNODE, IF_INTEGER, "Switch tempNode to subNode"), IOP( "l", HSMHV_L, IF_REAL , "Length"), IOP( "w", HSMHV_W, IF_REAL , "Width"), IOP( "ad", HSMHV_AD, IF_REAL , "Drain area"), IOP( "as", HSMHV_AS, IF_REAL , "Source area"), IOP( "pd", HSMHV_PD, IF_REAL , "Drain perimeter"), IOP( "ps", HSMHV_PS, IF_REAL , "Source perimeter"), IOP( "nrd", HSMHV_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", HSMHV_NRS, IF_REAL , "Number of squares in source"), IOP( "dtemp", HSMHV_DTEMP,IF_REAL , ""), IOP( "off", HSMHV_OFF, IF_FLAG , "Device is initially off"), IP ( "ic", HSMHV_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), IOP("corbnet", HSMHV_CORBNET, IF_INTEGER, "Activate body resistance (1) or not (0)"), IOP("rbpb", HSMHV_RBPB, IF_REAL, ""), IOP("rbpd", HSMHV_RBPD, IF_REAL, ""), IOP("rbps", HSMHV_RBPS, IF_REAL, ""), IOP("rbdb", HSMHV_RBDB, IF_REAL, ""), IOP("rbsb", HSMHV_RBSB, IF_REAL, ""), IOP("corg", HSMHV_CORG, IF_INTEGER, "Activate gate resistance (1) or not (0)"), IOP("ngcon", HSMHV_NGCON, IF_REAL, "Number of gate contacts"), IOP("xgw", HSMHV_XGW, IF_REAL, "Distance from gate contact to channel edge"), IOP("xgl", HSMHV_XGL, IF_REAL, "Offset of gate length due to variation in patterning"), IOP("nf", HSMHV_NF, IF_REAL, "Number of fingers"), IOP("sa", HSMHV_SA, IF_REAL, "Distance from STI edge to Gate edge [m]"), IOP("sb", HSMHV_SB, IF_REAL, "Distance from STI edge to Gate edge [m]"), IOP("sd", HSMHV_SD, IF_REAL, "Distance from Gate edge to Gate edge [m]"), IOP("nsubcdfm", HSMHV_NSUBCDFM, IF_REAL, "Constant part of Nsub for DFM [1/cm^3]"), IOP("m", HSMHV_M, IF_REAL, "Multiplication factor [-]"), IOP("subld1", HSMHV_SUBLD1, IF_REAL, "Parameter for impact-ionization current in the drift region [-]"), IOP("subld2", HSMHV_SUBLD2, IF_REAL, "Parameter for impact-ionization current in the drift region [m^{-1}*V^{3/2}]"), IOP("lover", HSMHV_LOVER, IF_REAL, "Overlap length on source side [m]"), IOP("lovers", HSMHV_LOVERS, IF_REAL, "Overlap length on source side [m]"), IOP("loverld", HSMHV_LOVERLD, IF_REAL, "Overlap length on drain side [m]"), IOP("ldrift1", HSMHV_LDRIFT1, IF_REAL, "Parameter for drift region length-1 [m]"), IOP("ldrift2", HSMHV_LDRIFT2, IF_REAL, "Parameter for drift region length-2 [m]"), IOP("ldrift1s", HSMHV_LDRIFT1S, IF_REAL, "Parameter for drift region length-1 on source side[m]"), IOP("ldrift2s", HSMHV_LDRIFT2S, IF_REAL, "Parameter for drift region length-2 on source side[m]"), /* Output Physical Values: */ OP ( "ids", HSMHV_CD, IF_REAL , "Ids"), /* Drain-Source current */ OP ( "isub", HSMHV_ISUB, IF_REAL , "Isub"), /* Substrate current */ OP ( "igidl", HSMHV_IGIDL, IF_REAL , "Igidl"), /* Gate-Induced Drain Leakage current */ OP ( "igisl", HSMHV_IGISL, IF_REAL , "Igisl"), /* Gate-Induced Source Leakage current */ OP ( "igd", HSMHV_IGD, IF_REAL , "Igd"), /* Gate-Drain current */ OP ( "igs", HSMHV_IGS, IF_REAL , "Igs"), /* Gate-Source current */ OP ( "igb", HSMHV_IGB, IF_REAL , "Igb"), /* Gate-Substrate current */ OP ( "gm", HSMHV_GM, IF_REAL , "Gm"), /* Transconductance */ OP ( "gds", HSMHV_GDS, IF_REAL , "Gds"), /* Channel conductance */ OP ( "gmbs", HSMHV_GMBS, IF_REAL , "Gmbs"), /* Body effect (Back gate) transconductance */ OP ( "gmt", HSMHV_GMT, IF_REAL , "GmT"), /* Temp - transconductance ----SHE----*/ OP ( "von", HSMHV_VON, IF_REAL , "Von"), /* Threshold voltage */ OP ( "vdsat", HSMHV_VDSAT, IF_REAL , "Vdsat"), /* Saturation voltage */ OP ( "qb", HSMHV_QB, IF_REAL , "Qb"), /* Bulk charge */ OP ( "qg", HSMHV_QG, IF_REAL , "Qg"), /* Gate charge */ OP ( "qd", HSMHV_QD, IF_REAL , "Qd"), /* Drain charge */ OP ( "cgg", HSMHV_CGG, IF_REAL , "Cgg"), /* MOSFET capacitance */ OP ( "cgd", HSMHV_CGD, IF_REAL , "Cgd"), /* MOSFET capacitance */ OP ( "cgs", HSMHV_CGS, IF_REAL , "Cgs"), /* MOSFET capacitance */ OP ( "cbg", HSMHV_CBG, IF_REAL , "Cbg"), /* MOSFET capacitance */ OP ( "cbs", HSMHV_CBSB, IF_REAL , "Cbs"), /* MOSFET capacitance */ OP ( "cbd", HSMHV_CBDB, IF_REAL , "Cbd"), /* MOSFET capacitance */ OP ( "cdg", HSMHV_CDG, IF_REAL , "Cdg"), /* MOSFET capacitance */ OP ( "cdd", HSMHV_CDD, IF_REAL , "Cdd"), /* MOSFET capacitance */ OP ( "cds", HSMHV_CDS, IF_REAL , "Cds"), /* MOSFET capacitance */ OP ( "cgdo", HSMHV_CGDO, IF_REAL , "Cgdo"), /* MOSFET overlap capacitance */ OP ( "cgso", HSMHV_CGSO, IF_REAL , "Cgso"), /* MOSFET overlap capacitance */ OP ( "cgbo", HSMHV_CGBO, IF_REAL , "Cgbo"), /* MOSFET overlap capacitance */ OP ( "ibd", HSMHV_CBD, IF_REAL , "Ibd"), /* Diode current */ OP ( "ibs", HSMHV_CBS, IF_REAL , "Ibs"), /* Diode current */ OP ( "gbd", HSMHV_GBD, IF_REAL , "Gbd"), /* Diode conductance */ OP ( "gbs", HSMHV_GBS, IF_REAL , "Gbs"), /* Diode conductance */ OP ( "capbd", HSMHV_CAPBD, IF_REAL , "Capbd"), /* Diode capacitance */ OP ( "capbs", HSMHV_CAPBS, IF_REAL , "Capbs") /* Diode capacitance */ }; IFparm HSMHVmPTable[] = { /* model parameters */ IP("nmos", HSMHV_MOD_NMOS, IF_FLAG, ""), IP("pmos", HSMHV_MOD_PMOS, IF_FLAG, ""), IOP("level", HSMHV_MOD_LEVEL, IF_INTEGER, ""), IOP("info", HSMHV_MOD_INFO, IF_INTEGER, "Information level (for debug, etc.)"), IOP("noise", HSMHV_MOD_NOISE, IF_INTEGER, "Noise model selector"), IOP("version", HSMHV_MOD_VERSION, IF_STRING, "Model version"), IOP("show", HSMHV_MOD_SHOW, IF_INTEGER, "Show physical value"), IOP("corsrd", HSMHV_MOD_CORSRD, IF_INTEGER, "Handling of Rs and Rd"), IOP("corg", HSMHV_MOD_CORG, IF_INTEGER, "Activate gate resistance (1) or not (0)"), IOP("coiprv", HSMHV_MOD_COIPRV, IF_INTEGER, "Use ids_prv as initial guess of Ids (internal flag)"), IOP("copprv", HSMHV_MOD_COPPRV, IF_INTEGER, "Use ps{0/l}_prv as initial guess of Ps{0/l} (internal flag)"), IOP("coadov", HSMHV_MOD_COADOV, IF_INTEGER, "Add overlap to intrisic"), IOP("coisub", HSMHV_MOD_COISUB, IF_INTEGER, "Calculate isub"), IOP("coiigs", HSMHV_MOD_COIIGS, IF_INTEGER, "Calculate igate"), IOP("cogidl", HSMHV_MOD_COGIDL, IF_INTEGER, "Calculate igidl"), IOP("coovlp", HSMHV_MOD_COOVLP, IF_INTEGER, "Calculate overlap charge on the drain side"), IOP("coovlps", HSMHV_MOD_COOVLPS, IF_INTEGER, "Calculate overlap charge on the source side"), IOP("coflick", HSMHV_MOD_COFLICK, IF_INTEGER, "Calculate 1/f noise"), IOP("coisti", HSMHV_MOD_COISTI, IF_INTEGER, "Calculate STI"), IOP("conqs", HSMHV_MOD_CONQS, IF_INTEGER, "Calculate in nqs mode or qs mode"), IOP("corbnet", HSMHV_MOD_CORBNET, IF_INTEGER, ""), IOP("cothrml", HSMHV_MOD_COTHRML, IF_INTEGER, "Calculate thermal noise"), IOP("coign", HSMHV_MOD_COIGN, IF_INTEGER, "Calculate induced gate noise"), IOP("codfm", HSMHV_MOD_CODFM, IF_INTEGER, "Calculation of model for DFM"), IOP("coqovsm", HSMHV_MOD_COQOVSM, IF_INTEGER, "select smoothing method of Qover"), IOP("coselfheat", HSMHV_MOD_COSELFHEAT, IF_INTEGER, "Calculation of self heating model"), IOP("cosubnode", HSMHV_MOD_COSUBNODE, IF_INTEGER, "Switch tempNode to subNode"), IOP("cosym", HSMHV_MOD_COSYM, IF_INTEGER, "Model selector for symmetry device"), IOP("cotemp", HSMHV_MOD_COTEMP, IF_INTEGER, "Model flag for temperature dependence"), IOP("coldrift", HSMHV_MOD_COLDRIFT, IF_INTEGER, "selector for Ldrift parameter"), IOP("vbsmin", HSMHV_MOD_VBSMIN, IF_REAL, "Minimum back bias voltage to be treated in hsmhveval [V]"), IOP("vmax", HSMHV_MOD_VMAX, IF_REAL, "Saturation velocity [cm/s]"), IOP("vmaxt1", HSMHV_MOD_VMAXT1, IF_REAL, "Saturation velocity coeff. [-]"), IOP("vmaxt2", HSMHV_MOD_VMAXT2, IF_REAL, "Saturation velocity coeff. [-]"), IOP("bgtmp1", HSMHV_MOD_BGTMP1, IF_REAL, "First order temp. coeff. for band gap [V/K]"), IOP("bgtmp2", HSMHV_MOD_BGTMP2, IF_REAL, "Second order temp. coeff. for band gap [V/K^2]"), IOP("eg0", HSMHV_MOD_EG0, IF_REAL, ""), IOP("tox", HSMHV_MOD_TOX, IF_REAL, "Oxide thickness [m]"), IOP("xld", HSMHV_MOD_XLD, IF_REAL, "Lateral diffusion of S/D under the gate [m]"), IOP("xldld", HSMHV_MOD_XLDLD, IF_REAL, "Lateral diffusion of Drain under the gate [m]"), IOP("xwdld", HSMHV_MOD_XWDLD, IF_REAL, ""), IOP("lover", HSMHV_MOD_LOVER, IF_REAL, "Overlap length on source side [m], alias for lovers"), IOP("lovers", HSMHV_MOD_LOVERS, IF_REAL, "Overlap length on source side [m]"), IOP("rdov11", HSMHV_MOD_RDOV11, IF_REAL, "Dependence coeff. for overlap length"), IOP("rdov12", HSMHV_MOD_RDOV12, IF_REAL, "Dependence coeff. for overlap length"), IOP("rdov13", HSMHV_MOD_RDOV13, IF_REAL, "Dependence coeff. for overlap length"), IOP("rdslp1", HSMHV_MOD_RDSLP1, IF_REAL, "LDRIFT1 dependence of resistance for CORSRD=1,3"), IOP("rdict1", HSMHV_MOD_RDICT1, IF_REAL, "LDRIFT1 dependence of resistance for CORSRD=1,3"), IOP("rdslp2", HSMHV_MOD_RDSLP2, IF_REAL, "LDRIFT2 dependence of resistance for CORSRD=1,3"), IOP("rdict2", HSMHV_MOD_RDICT2, IF_REAL, "LDRIFT2 dependence of resistance for CORSRD=1,3"), IOP("loverld", HSMHV_MOD_LOVERLD, IF_REAL, "Overlap length on the drain side"), IOP("ldrift1", HSMHV_MOD_LDRIFT1, IF_REAL, "Drift region length-1 on the drain side[m]"), IOP("ldrift2", HSMHV_MOD_LDRIFT2, IF_REAL, "Drift region length-2 on the drain side[m]"), IOP("ldrift1s", HSMHV_MOD_LDRIFT1S, IF_REAL, "Drift region length-1 on the source side[m]"), IOP("ldrift2s", HSMHV_MOD_LDRIFT2S, IF_REAL, "Drift region length-2 on the source side[m]"), IOP("subld1", HSMHV_MOD_SUBLD1, IF_REAL, "Impact-ionization current in the drift region [-]"), IOP("subld2", HSMHV_MOD_SUBLD2, IF_REAL, "Impact-ionization current in the drift region [m^{-1}*V^{3/2}]"), IOP("ddltmax", HSMHV_MOD_DDLTMAX, IF_REAL, ""), /* Vdseff */ IOP("ddltslp", HSMHV_MOD_DDLTSLP, IF_REAL, ""), /* Vdseff */ IOP("ddltict", HSMHV_MOD_DDLTICT, IF_REAL, ""), /* Vdseff */ IOP("vfbover", HSMHV_MOD_VFBOVER, IF_REAL, ""), IOP("nover", HSMHV_MOD_NOVER, IF_REAL, ""), IOP("novers", HSMHV_MOD_NOVERS, IF_REAL, ""), IOP("xwd", HSMHV_MOD_XWD, IF_REAL, "Lateral diffusion along the width dir. [m]"), IOP("xwdc", HSMHV_MOD_XWDC, IF_REAL, "Lateral diffusion along the width dir. for capacitance [m]"), IOP("xl", HSMHV_MOD_XL, IF_REAL, "Gate length offset due to mask/etch effect [m]"), IOP("xw", HSMHV_MOD_XW, IF_REAL, "Gate width offset due to mask/etch effect [m]"), IOP("saref", HSMHV_MOD_SAREF, IF_REAL, "Reference distance from STI edge to Gate edge [m]"), IOP("sbref", HSMHV_MOD_SBREF, IF_REAL, "Reference distance from STI edge to Gate edge [m]"), IOP("ll", HSMHV_MOD_LL, IF_REAL, "Gate length parameter"), IOP("lld", HSMHV_MOD_LLD, IF_REAL, "Gate length parameter"), IOP("lln", HSMHV_MOD_LLN, IF_REAL, "Gate length parameter"), IOP("wl", HSMHV_MOD_WL, IF_REAL, "Gate width parameter"), IOP("wl1", HSMHV_MOD_WL1, IF_REAL, "Gate width parameter"), IOP("wl1p", HSMHV_MOD_WL1P, IF_REAL, "Gate width parameter"), IOP("wl2", HSMHV_MOD_WL2, IF_REAL, "Gate width parameter"), IOP("wl2p", HSMHV_MOD_WL2P, IF_REAL, "Gate width parameter"), IOP("wld", HSMHV_MOD_WLD, IF_REAL, "Gate width parameter"), IOP("wln", HSMHV_MOD_WLN, IF_REAL, "Gate width parameter"), IOP("xqy", HSMHV_MOD_XQY, IF_REAL, "[m]"), IOP("xqy1", HSMHV_MOD_XQY1, IF_REAL, "[F m^{XQY2}]"), IOP("xqy2", HSMHV_MOD_XQY2, IF_REAL, "[-]"), IOP("rs", HSMHV_MOD_RS, IF_REAL, "Source contact resistance [ohm m]"), IOP("rd", HSMHV_MOD_RD, IF_REAL, "Drain contact resistance [ohm m]"), IOP("rsh", HSMHV_MOD_RSH, IF_REAL, "Source/drain diffusion sheet resistance [ohm]"), IOP("rshg", HSMHV_MOD_RSHG, IF_REAL, "Gate-elecrode sheet resistance"), IOP("vfbc", HSMHV_MOD_VFBC, IF_REAL, "Constant part of Vfb [V]"), IOP("vbi", HSMHV_MOD_VBI, IF_REAL, "Built-in potential [V]"), IOP("nsubc", HSMHV_MOD_NSUBC, IF_REAL, "Constant part of Nsub [1/cm^3]"), IOP("parl2", HSMHV_MOD_PARL2, IF_REAL, "Under diffusion [m]"), IOP("lp", HSMHV_MOD_LP, IF_REAL, "Length of pocket potential [m]"), IOP("nsubp", HSMHV_MOD_NSUBP, IF_REAL, "[1/cm^3]"), IOP("nsubp0", HSMHV_MOD_NSUBP0, IF_REAL, "Pocket implant parameter"), IOP("nsubwp", HSMHV_MOD_NSUBWP, IF_REAL, "Pocket implant parameter"), IOP("scp1", HSMHV_MOD_SCP1, IF_REAL, "Parameter for pocket [-]"), IOP("scp2", HSMHV_MOD_SCP2, IF_REAL, "Parameter for pocket [1/V]"), IOP("scp3", HSMHV_MOD_SCP3, IF_REAL, "Parameter for pocket [m/V]"), IOP("sc1", HSMHV_MOD_SC1, IF_REAL, "Parameter for SCE [-]"), IOP("sc2", HSMHV_MOD_SC2, IF_REAL, "Parameter for SCE [1/V]"), IOP("sc3", HSMHV_MOD_SC3, IF_REAL, "Parameter for SCE [m/V]"), IOP("sc4", HSMHV_MOD_SC4, IF_REAL, "Parameter for SCE [1/V]"), IOP("pgd1", HSMHV_MOD_PGD1, IF_REAL, "Parameter for gate-poly depletion [V]"), IOP("pgd2", HSMHV_MOD_PGD2, IF_REAL, "Parameter for gate-poly depletion [V]"), IOP("pgd3", HSMHV_MOD_PGD3, IF_REAL, "Parameter for gate-poly depletion [-]"), IOP("pgd4", HSMHV_MOD_PGD4, IF_REAL, "Parameter for gate-poly depletion [-]"), IOP("ndep", HSMHV_MOD_NDEP, IF_REAL, "Coeff. of Qbm for Eeff [-]"), IOP("ndepl", HSMHV_MOD_NDEPL, IF_REAL, "Coeff. of Qbm for Eeff [-]"), IOP("ndeplp", HSMHV_MOD_NDEPLP, IF_REAL, "Coeff. of Qbm for Eeff [-]"), IOP("ninv", HSMHV_MOD_NINV, IF_REAL, "Coeff. of Qnm for Eeff [-]"), IOP("ninvd", HSMHV_MOD_NINVD, IF_REAL, "Modification of Vdse dependence on Eeff [1/V]"), IOP("ninvdw", HSMHV_MOD_NINVDW, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"), IOP("ninvdwp", HSMHV_MOD_NINVDWP, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"), IOP("ninvdt1", HSMHV_MOD_NINVDT1, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"), IOP("ninvdt2", HSMHV_MOD_NINVDT2, IF_REAL, "Coeff of modification of Vdse dependence on Eeff [-]"), IOP("muecb0", HSMHV_MOD_MUECB0, IF_REAL, "Const. part of coulomb scattering [cm^2/Vs]"), IOP("muecb1", HSMHV_MOD_MUECB1, IF_REAL, "Coeff. for coulomb scattering [cm^2/Vs]"), IOP("mueph0", HSMHV_MOD_MUEPH0, IF_REAL, "Power of Eeff for phonon scattering [-]"), IOP("mueph1", HSMHV_MOD_MUEPH1, IF_REAL, ""), IOP("muephw", HSMHV_MOD_MUEPHW, IF_REAL, ""), IOP("muepwp", HSMHV_MOD_MUEPWP, IF_REAL, "Phonon scattering parameter"), IOP("muephl", HSMHV_MOD_MUEPHL, IF_REAL, "Phonon scattering parameter"), IOP("mueplp", HSMHV_MOD_MUEPLP, IF_REAL, "Phonon scattering parameter"), IOP("muephs", HSMHV_MOD_MUEPHS, IF_REAL, ""), IOP("muepsp", HSMHV_MOD_MUEPSP, IF_REAL, ""), IOP("vtmp", HSMHV_MOD_VTMP, IF_REAL, ""), IOP("wvth0", HSMHV_MOD_WVTH0, IF_REAL, ""), IOP("muesr0", HSMHV_MOD_MUESR0, IF_REAL, "Power of Eeff for S.R. scattering [-]"), IOP("muesr1", HSMHV_MOD_MUESR1, IF_REAL, "Coeff. for S.R. scattering [-]"), IOP("muesrl", HSMHV_MOD_MUESRL, IF_REAL, "Surface roughness parameter"), IOP("muesrw", HSMHV_MOD_MUESRW, IF_REAL, "Change of surface roughness related mobility"), IOP("mueswp", HSMHV_MOD_MUESWP, IF_REAL, "Change of surface roughness related mobility"), IOP("mueslp", HSMHV_MOD_MUESLP, IF_REAL, "Surface roughness parameter"), IOP("muetmp", HSMHV_MOD_MUETMP, IF_REAL, "Parameter for mobility [-]"), IOP("bb", HSMHV_MOD_BB, IF_REAL, "Empirical mobility model coefficient [-]"), IOP("sub1", HSMHV_MOD_SUB1, IF_REAL, "Parameter for Isub [1/V]"), IOP("sub2", HSMHV_MOD_SUB2, IF_REAL, "Parameter for Isub [V]"), IOP("svgs", HSMHV_MOD_SVGS, IF_REAL, "Coefficient for Vg of Psislsat"), IOP("svbs", HSMHV_MOD_SVBS, IF_REAL, "Coefficient for Vbs of Psislsat"), IOP("svbsl", HSMHV_MOD_SVBSL, IF_REAL, " "), IOP("svds", HSMHV_MOD_SVDS, IF_REAL, " "), IOP("slg", HSMHV_MOD_SLG, IF_REAL, " "), IOP("sub1l", HSMHV_MOD_SUB1L, IF_REAL, " "), IOP("sub2l", HSMHV_MOD_SUB2L, IF_REAL, " "), IOP("fn1", HSMHV_MOD_FN1, IF_REAL, " "), IOP("fn2", HSMHV_MOD_FN2, IF_REAL, " "), IOP("fn3", HSMHV_MOD_FN3, IF_REAL, " "), IOP("fvbs", HSMHV_MOD_FVBS, IF_REAL, " "), IOP("svgsl", HSMHV_MOD_SVGSL, IF_REAL, " "), IOP("svgslp", HSMHV_MOD_SVGSLP, IF_REAL, " "), IOP("svgswp", HSMHV_MOD_SVGSWP, IF_REAL, " "), IOP("svgsw", HSMHV_MOD_SVGSW, IF_REAL, " "), IOP("svbslp", HSMHV_MOD_SVBSLP, IF_REAL, " "), IOP("slgl", HSMHV_MOD_SLGL, IF_REAL, " "), IOP("slglp", HSMHV_MOD_SLGLP, IF_REAL, " "), IOP("sub1lp", HSMHV_MOD_SUB1LP, IF_REAL, " "), IOP("nsti", HSMHV_MOD_NSTI, IF_REAL, "Parameter for STI [1/cm^3]"), IOP("wsti", HSMHV_MOD_WSTI, IF_REAL, "Parameter for STI [m]"), IOP("wstil", HSMHV_MOD_WSTIL, IF_REAL, "Parameter for STI [?]"), IOP("wstilp", HSMHV_MOD_WSTILP, IF_REAL, "Parameter for STI [?]"), IOP("wstiw", HSMHV_MOD_WSTIW, IF_REAL, "Parameter for STI [?]"), IOP("wstiwp", HSMHV_MOD_WSTIWP, IF_REAL, "Parameter for STI [?]"), IOP("scsti1", HSMHV_MOD_SCSTI1, IF_REAL, "Parameter for STI [-]"), IOP("scsti2", HSMHV_MOD_SCSTI2, IF_REAL, "Parameter for STI [1/V]"), IOP("vthsti", HSMHV_MOD_VTHSTI, IF_REAL, "Parameter for STI"), IOP("vdsti", HSMHV_MOD_VDSTI, IF_REAL, "Parameter for STI [-]"), IOP("muesti1", HSMHV_MOD_MUESTI1, IF_REAL, "STI Stress mobility parameter"), IOP("muesti2", HSMHV_MOD_MUESTI2, IF_REAL, "STI Stress mobility parameter"), IOP("muesti3", HSMHV_MOD_MUESTI3, IF_REAL, "STI Stress mobility parameter"), IOP("nsubpsti1", HSMHV_MOD_NSUBPSTI1, IF_REAL, "STI Stress pocket implant parameter"), IOP("nsubpsti2", HSMHV_MOD_NSUBPSTI2, IF_REAL, "STI Stress pocket implant parameter"), IOP("nsubpsti3", HSMHV_MOD_NSUBPSTI3, IF_REAL, "STI Stress pocket implant parameter"), IOP("lpext", HSMHV_MOD_LPEXT, IF_REAL, "Pocket extension"), IOP("npext", HSMHV_MOD_NPEXT, IF_REAL, "Pocket extension"), IOP("scp22", HSMHV_MOD_SCP22, IF_REAL, ""), IOP("scp21", HSMHV_MOD_SCP21, IF_REAL, ""), IOP("bs1", HSMHV_MOD_BS1, IF_REAL, ""), IOP("bs2", HSMHV_MOD_BS2, IF_REAL, ""), IOP("cgso", HSMHV_MOD_CGSO, IF_REAL, "G-S overlap capacitance per unit W [F/m]"), IOP("cgdo", HSMHV_MOD_CGDO, IF_REAL, "G-D overlap capacitance per unit W [F/m]"), IOP("cgbo", HSMHV_MOD_CGBO, IF_REAL, "G-B overlap capacitance per unit L [F/m]"), IOP("tpoly", HSMHV_MOD_TPOLY, IF_REAL, "Height of poly gate on the source side[m]"), IOP("js0", HSMHV_MOD_JS0, IF_REAL, "Saturation current density [A/m^2]"), IOP("js0sw", HSMHV_MOD_JS0SW, IF_REAL, "Side wall saturation current density [A/m]"), IOP("nj", HSMHV_MOD_NJ, IF_REAL, "Emission coefficient [-]"), IOP("njsw", HSMHV_MOD_NJSW, IF_REAL, "Sidewall emission coefficient"), IOP("xti", HSMHV_MOD_XTI, IF_REAL, "Junction current temparature exponent coefficient [-]"), IOP("cj", HSMHV_MOD_CJ, IF_REAL, "Bottom junction capacitance per unit area at zero bias [F/m^2]"), IOP("cjsw", HSMHV_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient per unit length at zero bias [F/m]"), IOP("cjswg", HSMHV_MOD_CJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance per unit length at zero bias [F/m]"), IOP("mj", HSMHV_MOD_MJ, IF_REAL, "Bottom junction capacitance grading coefficient"), IOP("mjsw", HSMHV_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP("mjswg", HSMHV_MOD_MJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance grading coefficient"), IOP("pb", HSMHV_MOD_PB, IF_REAL, "Bottom junction build-in potential [V]"), IOP("pbsw", HSMHV_MOD_PBSW, IF_REAL, "Source/drain sidewall junction build-in potential [V]"), IOP("pbswg", HSMHV_MOD_PBSWG, IF_REAL, "Source/drain gate sidewall junction build-in potential [V]"), IOP("xti2", HSMHV_MOD_XTI2, IF_REAL, "Temperature coefficient [-]"), IOP("cisb", HSMHV_MOD_CISB, IF_REAL, "Reverse bias saturation current [-]"), IOP("cvb", HSMHV_MOD_CVB, IF_REAL, "Bias dependence coefficient of cisb [-]"), IOP("ctemp", HSMHV_MOD_CTEMP, IF_REAL, "Temperature coefficient [-]"), IOP("cisbk", HSMHV_MOD_CISBK, IF_REAL, "Reverse bias saturation current [A]"), IOP("cvbk", HSMHV_MOD_CVBK, IF_REAL, "Bias dependence coefficient of cisb [-]"), IOP("divx", HSMHV_MOD_DIVX, IF_REAL, " [1/V]"), IOP("clm1", HSMHV_MOD_CLM1, IF_REAL, "Parameter for CLM [-]"), IOP("clm2", HSMHV_MOD_CLM2, IF_REAL, "Parameter for CLM [1/m]"), IOP("clm3", HSMHV_MOD_CLM3, IF_REAL, "Parameter for CLM [-]"), IOP("clm5", HSMHV_MOD_CLM5, IF_REAL, "Parameter for CLM [-]"), IOP("clm6", HSMHV_MOD_CLM6, IF_REAL, "Parameter for CLM [um^{-clm5}]"), IOP("vover", HSMHV_MOD_VOVER, IF_REAL, "Parameter for overshoot [m^{voverp}]"), IOP("voverp", HSMHV_MOD_VOVERP, IF_REAL, "Parameter for overshoot [-]"), IOP("vovers", HSMHV_MOD_VOVERS, IF_REAL, "Parameter for overshoot [-]"), IOP("voversp", HSMHV_MOD_VOVERSP, IF_REAL, "Parameter for overshoot [-]"), IOP("wfc", HSMHV_MOD_WFC, IF_REAL, "Parameter for narrow channel effect [m*F/(cm^2)]"), IOP("nsubcw", HSMHV_MOD_NSUBCW, IF_REAL, "Parameter for narrow channel effect "), IOP("nsubcwp", HSMHV_MOD_NSUBCWP, IF_REAL, "Parameter for narrow channel effect "), IOP("qme1", HSMHV_MOD_QME1, IF_REAL, "Parameter for quantum effect [mV]"), IOP("qme2", HSMHV_MOD_QME2, IF_REAL, "Parameter for quantum effect [V]"), IOP("qme3", HSMHV_MOD_QME3, IF_REAL, "Parameter for quantum effect [m]"), IOP("gidl1", HSMHV_MOD_GIDL1, IF_REAL, "Parameter for GIDL [?]"), IOP("gidl2", HSMHV_MOD_GIDL2, IF_REAL, "Parameter for GIDL [?]"), IOP("gidl3", HSMHV_MOD_GIDL3, IF_REAL, "Parameter for GIDL [?]"), IOP("gidl4", HSMHV_MOD_GIDL4, IF_REAL, "Parameter for GIDL [?]"), IOP("gidl5", HSMHV_MOD_GIDL5, IF_REAL, "Parameter for GIDL [?]"), IOP("glpart1", HSMHV_MOD_GLPART1, IF_REAL, "Parameter for gate current [-]"), IOP("gleak1", HSMHV_MOD_GLEAK1, IF_REAL, "Parameter for gate current [A*V^(-3/2)/C]"), IOP("gleak2", HSMHV_MOD_GLEAK2, IF_REAL, "Parameter for gate current [V^(-1/2)/m ]"), IOP("gleak3", HSMHV_MOD_GLEAK3, IF_REAL, "Parameter for gate current [-]"), IOP("gleak4", HSMHV_MOD_GLEAK4, IF_REAL, "Parameter for gate current [1/m]"), IOP("gleak5", HSMHV_MOD_GLEAK5, IF_REAL, "Parameter for gate current [V/m]"), IOP("gleak6", HSMHV_MOD_GLEAK6, IF_REAL, "Parameter for gate current [V]"), IOP("gleak7", HSMHV_MOD_GLEAK7, IF_REAL, "Parameter for gate current [m^2]"), IOP("glksd1", HSMHV_MOD_GLKSD1, IF_REAL, "Parameter for gate current [A*m/V^2]"), IOP("glksd2", HSMHV_MOD_GLKSD2, IF_REAL, "Parameter for gate current [1/(V*m)]"), IOP("glksd3", HSMHV_MOD_GLKSD3, IF_REAL, "Parameter for gate current [1/m]"), IOP("glkb1", HSMHV_MOD_GLKB1, IF_REAL, "Parameter for gate current [A/V^2]"), IOP("glkb2", HSMHV_MOD_GLKB2, IF_REAL, "Parameter for gate current [m/V]"), IOP("glkb3", HSMHV_MOD_GLKB3, IF_REAL, "Parameter for gate current [V]"), IOP("egig", HSMHV_MOD_EGIG, IF_REAL, "Parameter for gate current [V]"), IOP("igtemp2", HSMHV_MOD_IGTEMP2, IF_REAL, "Parameter for gate current [V*k]"), IOP("igtemp3", HSMHV_MOD_IGTEMP3, IF_REAL, "Parameter for gate current [V*k^2]"), IOP("vzadd0", HSMHV_MOD_VZADD0, IF_REAL, "Vzadd at Vds=0 [V]"), IOP("pzadd0", HSMHV_MOD_PZADD0, IF_REAL, "Pzadd at Vds=0 [V]"), IOP("nftrp", HSMHV_MOD_NFTRP, IF_REAL, ""), IOP("nfalp", HSMHV_MOD_NFALP, IF_REAL, ""), IOP("cit", HSMHV_MOD_CIT, IF_REAL, ""), IOP("falph", HSMHV_MOD_FALPH, IF_REAL, "Parameter for 1/f noise"), IOP("kappa", HSMHV_MOD_KAPPA, IF_REAL, "Dielectric constant for high-k stacked gate"), IOP("pthrou", HSMHV_MOD_PTHROU, IF_REAL, "Modify subthreshold slope [-]"), IOP("vdiffj", HSMHV_MOD_VDIFFJ, IF_REAL, "Threshold voltage for S/D junction diode [V]"), IOP("dly1", HSMHV_MOD_DLY1, IF_REAL, "Parameter for transit time [-]"), IOP("dly2", HSMHV_MOD_DLY2, IF_REAL, "Parameter for transit time [-]"), IOP("dly3", HSMHV_MOD_DLY3, IF_REAL, "Parameter for transforming bulk charge [s/F]"), IOP("dlyov", HSMHV_MOD_DLYOV, IF_REAL, "Parameter for transforming overlap charge [s/F]"), /* not used */ IOP("tnom", HSMHV_MOD_TNOM, IF_REAL, "Nominal temperature [K]"), IOP("ovslp", HSMHV_MOD_OVSLP, IF_REAL, ""), IOP("ovmag", HSMHV_MOD_OVMAG, IF_REAL, ""), IOP("gbmin", HSMHV_MOD_GBMIN, IF_REAL, ""), IOP("rbpb", HSMHV_MOD_RBPB, IF_REAL, ""), IOP("rbpd", HSMHV_MOD_RBPD, IF_REAL, ""), /* not used */ IOP("rbps", HSMHV_MOD_RBPS, IF_REAL, ""), /* not used */ IOP("rbdb", HSMHV_MOD_RBDB, IF_REAL, ""), IOP("rbsb", HSMHV_MOD_RBSB, IF_REAL, ""), IOP("ibpc1", HSMHV_MOD_IBPC1, IF_REAL, "Parameter for impact-ionization induced bulk potential change"), IOP("ibpc2", HSMHV_MOD_IBPC2, IF_REAL, "Parameter for impact-ionization induced bulk potential change"), IOP("mphdfm", HSMHV_MOD_MPHDFM, IF_REAL, "NSUBCDFM dependence of phonon scattering for DFM"), IOP("rdvg11", HSMHV_MOD_RDVG11, IF_REAL, ""), IOP("rdvg12", HSMHV_MOD_RDVG12, IF_REAL, ""), IOP("rth0", HSMHV_MOD_RTH0, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/ IOP("cth0", HSMHV_MOD_CTH0, IF_REAL, "Thermal capacitance"), /* Self-heating model --SHE--- */ IOP("powrat", HSMHV_MOD_POWRAT, IF_REAL, ""), /* Self-heating model --SHE--- */ IOP("rthtemp1", HSMHV_MOD_RTHTEMP1, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/ IOP("rthtemp2", HSMHV_MOD_RTHTEMP2, IF_REAL, "Thermal resistance"), /* Self-heating model --SHE---*/ IOP("prattemp1", HSMHV_MOD_PRATTEMP1, IF_REAL, ""), /* Self-heating model --SHE--- */ IOP("prattemp2", HSMHV_MOD_PRATTEMP2, IF_REAL, ""), /* Self-heating model --SHE--- */ IOP("tcjbd", HSMHV_MOD_TCJBD, IF_REAL, "Temperature dependence of cjbd"), /* Self-heating model --SHE--- */ IOP("tcjbs", HSMHV_MOD_TCJBS, IF_REAL, "Temperature dependence of cjbs"), /* Self-heating model --SHE--- */ IOP("tcjbdsw", HSMHV_MOD_TCJBDSW, IF_REAL, "Temperature dependence of cjbdsw"), /* Self-heating model --SHE--- */ IOP("tcjbssw", HSMHV_MOD_TCJBSSW, IF_REAL, "Temperature dependence of cjbssw"), /* Self-heating model --SHE--- */ IOP("tcjbdswg", HSMHV_MOD_TCJBDSWG, IF_REAL, "Temperature dependence of cjbdswg"), /* Self-heating model --SHE--- */ IOP("tcjbsswg", HSMHV_MOD_TCJBSSWG, IF_REAL, "Temperature dependence of cjbsswg"), /* Self-heating model --SHE--- */ IOP("qdftvd", HSMHV_MOD_QDFTVD, IF_REAL, "Qdrift Vd dependence "), IOP("rdvd", HSMHV_MOD_RDVD, IF_REAL, ""), IOP("rdvb", HSMHV_MOD_RDVB, IF_REAL, ""), IOP("rd20", HSMHV_MOD_RD20, IF_REAL, ""), IOP("rd21", HSMHV_MOD_RD21, IF_REAL, ""), IOP("rd22", HSMHV_MOD_RD22, IF_REAL, ""), IOP("rd22d", HSMHV_MOD_RD22D, IF_REAL, ""), IOP("rd23", HSMHV_MOD_RD23, IF_REAL, ""), IOP("rd24", HSMHV_MOD_RD24, IF_REAL, ""), IOP("rd25", HSMHV_MOD_RD25, IF_REAL, ""), IOP("rd26", HSMHV_MOD_RD26, IF_REAL, "alias for qovsm"), IOP("rdvdl", HSMHV_MOD_RDVDL, IF_REAL, ""), IOP("rdvdlp", HSMHV_MOD_RDVDLP, IF_REAL, ""), IOP("rdvds", HSMHV_MOD_RDVDS, IF_REAL, ""), IOP("rdvdsp", HSMHV_MOD_RDVDSP, IF_REAL, ""), IOP("rd23l", HSMHV_MOD_RD23L, IF_REAL, ""), IOP("rd23lp", HSMHV_MOD_RD23LP, IF_REAL, ""), IOP("rd23s", HSMHV_MOD_RD23S, IF_REAL, ""), IOP("rd23sp", HSMHV_MOD_RD23SP, IF_REAL, ""), IOP("rds", HSMHV_MOD_RDS, IF_REAL, ""), IOP("rdsp", HSMHV_MOD_RDSP, IF_REAL, ""), IOP("qovsm", HSMHV_MOD_QOVSM, IF_REAL, "Smoothing Qover at depletion/inversion transition"), IOP("ldrift", HSMHV_MOD_LDRIFT, IF_REAL, "alias for ldrift2"), IOP("rdtemp1", HSMHV_MOD_RDTEMP1, IF_REAL, "Temperature-dependence of Rd"), IOP("rdtemp2", HSMHV_MOD_RDTEMP2, IF_REAL, "Temperature-dependence of Rd"), IOP("rth0r", HSMHV_MOD_RTH0R, IF_REAL, "Heat radiation for SHE"), /* not used */ IOP("rdvdtemp1", HSMHV_MOD_RDVDTEMP1, IF_REAL, "Temperature-dependence of RDVD"), IOP("rdvdtemp2", HSMHV_MOD_RDVDTEMP2, IF_REAL, "Temperature-dependence of RDVD"), IOP("rth0w", HSMHV_MOD_RTH0W, IF_REAL, "Width-dependence of RTH0"), IOP("rth0wp", HSMHV_MOD_RTH0WP, IF_REAL, "Width-dependence of RTH0"), IOP("rth0nf", HSMHV_MOD_RTH0NF, IF_REAL, "nf-dependence of RTH0"), IOP("cvdsover", HSMHV_MOD_CVDSOVER, IF_REAL, "vds drop along the overlap"), IOP("rdvsub", HSMHV_MOD_RDVSUB, IF_REAL, "model parameter for the substrate effect"), IOP("rdvdsub", HSMHV_MOD_RDVDSUB, IF_REAL, "model parameter for the substrate effect"), IOP("ddrift", HSMHV_MOD_DDRIFT, IF_REAL, "model parameter for the substrate effect"), IOP("vbisub", HSMHV_MOD_VBISUB, IF_REAL, "model parameter for the substrate effect"), IOP("nsubsub", HSMHV_MOD_NSUBSUB, IF_REAL, "model parameter for the substrate effect"), IOP("shemax", HSMHV_MOD_SHEMAX, IF_REAL, "Maximum rise temperatue for SHE [C]"), /* binning parameters */ IOP("lmin", HSMHV_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP("lmax", HSMHV_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP("wmin", HSMHV_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP("wmax", HSMHV_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP("lbinn", HSMHV_MOD_LBINN, IF_REAL, "L modulation coefficient for binning"), IOP("wbinn", HSMHV_MOD_WBINN, IF_REAL, "W modulation coefficient for binning"), /* Length dependence */ IOP("lvmax", HSMHV_MOD_LVMAX, IF_REAL, "Length dependence of vmax"), IOP("lbgtmp1", HSMHV_MOD_LBGTMP1, IF_REAL, "Length dependence of bgtmp1"), IOP("lbgtmp2", HSMHV_MOD_LBGTMP2, IF_REAL, "Length dependence of bgtmp2"), IOP("leg0", HSMHV_MOD_LEG0, IF_REAL, "Length dependence of eg0"), IOP("lvfbover", HSMHV_MOD_LVFBOVER, IF_REAL, "Length dependence of vfbover"), IOP("lnover", HSMHV_MOD_LNOVER, IF_REAL, "Length dependence of nover"), IOP("lnovers", HSMHV_MOD_LNOVERS, IF_REAL, "Length dependence of nover on source size"), IOP("lwl2", HSMHV_MOD_LWL2, IF_REAL, "Length dependence of wl2"), IOP("lvfbc", HSMHV_MOD_LVFBC, IF_REAL, "Length dependence of vfbc"), IOP("lnsubc", HSMHV_MOD_LNSUBC, IF_REAL, "Length dependence of nsubc"), IOP("lnsubp", HSMHV_MOD_LNSUBP, IF_REAL, "Length dependence of nsubp"), IOP("lscp1", HSMHV_MOD_LSCP1, IF_REAL, "Length dependence of scp1"), IOP("lscp2", HSMHV_MOD_LSCP2, IF_REAL, "Length dependence of scp2"), IOP("lscp3", HSMHV_MOD_LSCP3, IF_REAL, "Length dependence of scp3"), IOP("lsc1", HSMHV_MOD_LSC1, IF_REAL, "Length dependence of sc1"), IOP("lsc2", HSMHV_MOD_LSC2, IF_REAL, "Length dependence of sc2"), IOP("lsc3", HSMHV_MOD_LSC3, IF_REAL, "Length dependence of sc3"), IOP("lpgd1", HSMHV_MOD_LPGD1, IF_REAL, "Length dependence of pgd1"), IOP("lpgd3", HSMHV_MOD_LPGD3, IF_REAL, "Length dependence of pgd3"), IOP("lndep", HSMHV_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP("lninv", HSMHV_MOD_LNINV, IF_REAL, "Length dependence of ninv"), IOP("lmuecb0", HSMHV_MOD_LMUECB0, IF_REAL, "Length dependence of muecb0"), IOP("lmuecb1", HSMHV_MOD_LMUECB1, IF_REAL, "Length dependence of muecb1"), IOP("lmueph1", HSMHV_MOD_LMUEPH1, IF_REAL, "Length dependence of mueph1"), IOP("lvtmp", HSMHV_MOD_LVTMP, IF_REAL, "Length dependence of vtmp"), IOP("lwvth0", HSMHV_MOD_LWVTH0, IF_REAL, "Length dependence of wvth0"), IOP("lmuesr1", HSMHV_MOD_LMUESR1, IF_REAL, "Length dependence of muesr1"), IOP("lmuetmp", HSMHV_MOD_LMUETMP, IF_REAL, "Length dependence of muetmp"), IOP("lsub1", HSMHV_MOD_LSUB1, IF_REAL, "Length dependence of sub1"), IOP("lsub2", HSMHV_MOD_LSUB2, IF_REAL, "Length dependence of sub2"), IOP("lsvds", HSMHV_MOD_LSVDS, IF_REAL, "Length dependence of svds"), IOP("lsvbs", HSMHV_MOD_LSVBS, IF_REAL, "Length dependence of svbs"), IOP("lsvgs", HSMHV_MOD_LSVGS, IF_REAL, "Length dependence of svgs"), IOP("lfn1", HSMHV_MOD_LFN1, IF_REAL, "Length dependence of fn1"), IOP("lfn2", HSMHV_MOD_LFN2, IF_REAL, "Length dependence of fn2"), IOP("lfn3", HSMHV_MOD_LFN3, IF_REAL, "Length dependence of fn3"), IOP("lfvbs", HSMHV_MOD_LFVBS, IF_REAL, "Length dependence of fvbs"), IOP("lnsti", HSMHV_MOD_LNSTI, IF_REAL, "Length dependence of nsti"), IOP("lwsti", HSMHV_MOD_LWSTI, IF_REAL, "Length dependence of wsti"), IOP("lscsti1", HSMHV_MOD_LSCSTI1, IF_REAL, "Length dependence of scsti1"), IOP("lscsti2", HSMHV_MOD_LSCSTI2, IF_REAL, "Length dependence of scsti2"), IOP("lvthsti", HSMHV_MOD_LVTHSTI, IF_REAL, "Length dependence of vthsti"), IOP("lmuesti1", HSMHV_MOD_LMUESTI1, IF_REAL, "Length dependence of muesti1"), IOP("lmuesti2", HSMHV_MOD_LMUESTI2, IF_REAL, "Length dependence of muesti2"), IOP("lmuesti3", HSMHV_MOD_LMUESTI3, IF_REAL, "Length dependence of muesti3"), IOP("lnsubpsti1", HSMHV_MOD_LNSUBPSTI1, IF_REAL, "Length dependence of nsubpsti1"), IOP("lnsubpsti2", HSMHV_MOD_LNSUBPSTI2, IF_REAL, "Length dependence of nsubpsti2"), IOP("lnsubpsti3", HSMHV_MOD_LNSUBPSTI3, IF_REAL, "Length dependence of nsubpsti3"), IOP("lcgso", HSMHV_MOD_LCGSO, IF_REAL, "Length dependence of cgso"), IOP("lcgdo", HSMHV_MOD_LCGDO, IF_REAL, "Length dependence of cgdo"), IOP("ljs0", HSMHV_MOD_LJS0, IF_REAL, "Length dependence of js0"), IOP("ljs0sw", HSMHV_MOD_LJS0SW, IF_REAL, "Length dependence of js0sw"), IOP("lnj", HSMHV_MOD_LNJ, IF_REAL, "Length dependence of nj"), IOP("lcisbk", HSMHV_MOD_LCISBK, IF_REAL, "Length dependence of cisbk"), IOP("lclm1", HSMHV_MOD_LCLM1, IF_REAL, "Length dependence of clm1"), IOP("lclm2", HSMHV_MOD_LCLM2, IF_REAL, "Length dependence of clm2"), IOP("lclm3", HSMHV_MOD_LCLM3, IF_REAL, "Length dependence of clm3"), IOP("lwfc", HSMHV_MOD_LWFC, IF_REAL, "Length dependence of wfc"), IOP("lgidl1", HSMHV_MOD_LGIDL1, IF_REAL, "Length dependence of gidl1"), IOP("lgidl2", HSMHV_MOD_LGIDL2, IF_REAL, "Length dependence of gidl2"), IOP("lgleak1", HSMHV_MOD_LGLEAK1, IF_REAL, "Length dependence of gleak1"), IOP("lgleak2", HSMHV_MOD_LGLEAK2, IF_REAL, "Length dependence of gleak2"), IOP("lgleak3", HSMHV_MOD_LGLEAK3, IF_REAL, "Length dependence of gleak3"), IOP("lgleak6", HSMHV_MOD_LGLEAK6, IF_REAL, "Length dependence of gleak6"), IOP("lglksd1", HSMHV_MOD_LGLKSD1, IF_REAL, "Length dependence of glksd1"), IOP("lglksd2", HSMHV_MOD_LGLKSD2, IF_REAL, "Length dependence of glksd2"), IOP("lglkb1", HSMHV_MOD_LGLKB1, IF_REAL, "Length dependence of glkb1"), IOP("lglkb2", HSMHV_MOD_LGLKB2, IF_REAL, "Length dependence of glkb2"), IOP("lnftrp", HSMHV_MOD_LNFTRP, IF_REAL, "Length dependence of nftrp"), IOP("lnfalp", HSMHV_MOD_LNFALP, IF_REAL, "Length dependence of nfalp"), IOP("lpthrou", HSMHV_MOD_LPTHROU, IF_REAL, "Length dependence of pthrou"), IOP("lvdiffj", HSMHV_MOD_LVDIFFJ, IF_REAL, "Length dependence of vdiffj"), IOP("libpc1", HSMHV_MOD_LIBPC1, IF_REAL, "Length dependence of ibpc1"), IOP("libpc2", HSMHV_MOD_LIBPC2, IF_REAL, "Length dependence of ibpc2"), IOP("lcgbo", HSMHV_MOD_LCGBO, IF_REAL, "Length dependence of cgbo"), IOP("lcvdsover", HSMHV_MOD_LCVDSOVER, IF_REAL, "Length dependence of cvdsover"), IOP("lfalph", HSMHV_MOD_LFALPH, IF_REAL, "Length dependence of falph"), IOP("lnpext", HSMHV_MOD_LNPEXT, IF_REAL, "Length dependence of npext"), IOP("lpowrat", HSMHV_MOD_LPOWRAT, IF_REAL, "Length dependence of powrat"), IOP("lrd", HSMHV_MOD_LRD, IF_REAL, "Length dependence of rd"), IOP("lrd22", HSMHV_MOD_LRD22, IF_REAL, "Length dependence of rd22"), IOP("lrd23", HSMHV_MOD_LRD23, IF_REAL, "Length dependence of rd23"), IOP("lrd24", HSMHV_MOD_LRD24, IF_REAL, "Length dependence of rd24"), IOP("lrdict1", HSMHV_MOD_LRDICT1, IF_REAL, "Length dependence of rdict1"), IOP("lrdov13", HSMHV_MOD_LRDOV13, IF_REAL, "Length dependence of rdov13"), IOP("lrdslp1", HSMHV_MOD_LRDSLP1, IF_REAL, "Length dependence of rdslp1"), IOP("lrdvb", HSMHV_MOD_LRDVB, IF_REAL, "Length dependence of rdvb"), IOP("lrdvd", HSMHV_MOD_LRDVD, IF_REAL, "Length dependence of rdvd"), IOP("lrdvg11", HSMHV_MOD_LRDVG11, IF_REAL, "Length dependence of rdvg11"), IOP("lrs", HSMHV_MOD_LRS, IF_REAL, "Length dependence of rs"), IOP("lrth0", HSMHV_MOD_LRTH0, IF_REAL, "Length dependence of rth0"), IOP("lvover", HSMHV_MOD_LVOVER, IF_REAL, "Length dependence of vover"), /* Width dependence */ IOP("wvmax", HSMHV_MOD_WVMAX, IF_REAL, "Width dependence of vmax"), IOP("wbgtmp1", HSMHV_MOD_WBGTMP1, IF_REAL, "Width dependence of bgtmp1"), IOP("wbgtmp2", HSMHV_MOD_WBGTMP2, IF_REAL, "Width dependence of bgtmp2"), IOP("weg0", HSMHV_MOD_WEG0, IF_REAL, "Width dependence of eg0"), IOP("wvfbover", HSMHV_MOD_WVFBOVER, IF_REAL, "Width dependence of vfbover"), IOP("wnover", HSMHV_MOD_WNOVER, IF_REAL, "Width dependence of nover"), IOP("wnovers", HSMHV_MOD_WNOVERS, IF_REAL, "Width dependence of novers on source size"), IOP("wwl2", HSMHV_MOD_WWL2, IF_REAL, "Width dependence of wl2"), IOP("wvfbc", HSMHV_MOD_WVFBC, IF_REAL, "Width dependence of vfbc"), IOP("wnsubc", HSMHV_MOD_WNSUBC, IF_REAL, "Width dependence of nsubc"), IOP("wnsubp", HSMHV_MOD_WNSUBP, IF_REAL, "Width dependence of nsubp"), IOP("wscp1", HSMHV_MOD_WSCP1, IF_REAL, "Width dependence of scp1"), IOP("wscp2", HSMHV_MOD_WSCP2, IF_REAL, "Width dependence of scp2"), IOP("wscp3", HSMHV_MOD_WSCP3, IF_REAL, "Width dependence of scp3"), IOP("wsc1", HSMHV_MOD_WSC1, IF_REAL, "Width dependence of sc1"), IOP("wsc2", HSMHV_MOD_WSC2, IF_REAL, "Width dependence of sc2"), IOP("wsc3", HSMHV_MOD_WSC3, IF_REAL, "Width dependence of sc3"), IOP("wpgd1", HSMHV_MOD_WPGD1, IF_REAL, "Width dependence of pgd1"), IOP("wpgd3", HSMHV_MOD_WPGD3, IF_REAL, "Width dependence of pgd3"), IOP("wndep", HSMHV_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP("wninv", HSMHV_MOD_WNINV, IF_REAL, "Width dependence of ninv"), IOP("wmuecb0", HSMHV_MOD_WMUECB0, IF_REAL, "Width dependence of muecb0"), IOP("wmuecb1", HSMHV_MOD_WMUECB1, IF_REAL, "Width dependence of muecb1"), IOP("wmueph1", HSMHV_MOD_WMUEPH1, IF_REAL, "Width dependence of mueph1"), IOP("wvtmp", HSMHV_MOD_WVTMP, IF_REAL, "Width dependence of vtmp"), IOP("wwvth0", HSMHV_MOD_WWVTH0, IF_REAL, "Width dependence of wvth0"), IOP("wmuesr1", HSMHV_MOD_WMUESR1, IF_REAL, "Width dependence of muesr1"), IOP("wmuetmp", HSMHV_MOD_WMUETMP, IF_REAL, "Width dependence of muetmp"), IOP("wsub1", HSMHV_MOD_WSUB1, IF_REAL, "Width dependence of sub1"), IOP("wsub2", HSMHV_MOD_WSUB2, IF_REAL, "Width dependence of sub2"), IOP("wsvds", HSMHV_MOD_WSVDS, IF_REAL, "Width dependence of svds"), IOP("wsvbs", HSMHV_MOD_WSVBS, IF_REAL, "Width dependence of svbs"), IOP("wsvgs", HSMHV_MOD_WSVGS, IF_REAL, "Width dependence of svgs"), IOP("wfn1", HSMHV_MOD_WFN1, IF_REAL, "Width dependence of fn1"), IOP("wfn2", HSMHV_MOD_WFN2, IF_REAL, "Width dependence of fn2"), IOP("wfn3", HSMHV_MOD_WFN3, IF_REAL, "Width dependence of fn3"), IOP("wfvbs", HSMHV_MOD_WFVBS, IF_REAL, "Width dependence of fvbs"), IOP("wnsti", HSMHV_MOD_WNSTI, IF_REAL, "Width dependence of nsti"), IOP("wwsti", HSMHV_MOD_WWSTI, IF_REAL, "Width dependence of wsti"), IOP("wscsti1", HSMHV_MOD_WSCSTI1, IF_REAL, "Width dependence of scsti1"), IOP("wscsti2", HSMHV_MOD_WSCSTI2, IF_REAL, "Width dependence of scsti2"), IOP("wvthsti", HSMHV_MOD_WVTHSTI, IF_REAL, "Width dependence of vthsti"), IOP("wmuesti1", HSMHV_MOD_WMUESTI1, IF_REAL, "Width dependence of muesti1"), IOP("wmuesti2", HSMHV_MOD_WMUESTI2, IF_REAL, "Width dependence of muesti2"), IOP("wmuesti3", HSMHV_MOD_WMUESTI3, IF_REAL, "Width dependence of muesti3"), IOP("wnsubpsti1", HSMHV_MOD_WNSUBPSTI1, IF_REAL, "Width dependence of nsubpsti1"), IOP("wnsubpsti2", HSMHV_MOD_WNSUBPSTI2, IF_REAL, "Width dependence of nsubpsti2"), IOP("wnsubpsti3", HSMHV_MOD_WNSUBPSTI3, IF_REAL, "Width dependence of nsubpsti3"), IOP("wcgso", HSMHV_MOD_WCGSO, IF_REAL, "Width dependence of cgso"), IOP("wcgdo", HSMHV_MOD_WCGDO, IF_REAL, "Width dependence of cgdo"), IOP("wjs0", HSMHV_MOD_WJS0, IF_REAL, "Width dependence of js0"), IOP("wjs0sw", HSMHV_MOD_WJS0SW, IF_REAL, "Width dependence of js0sw"), IOP("wnj", HSMHV_MOD_WNJ, IF_REAL, "Width dependence of nj"), IOP("wcisbk", HSMHV_MOD_WCISBK, IF_REAL, "Width dependence of cisbk"), IOP("wclm1", HSMHV_MOD_WCLM1, IF_REAL, "Width dependence of clm1"), IOP("wclm2", HSMHV_MOD_WCLM2, IF_REAL, "Width dependence of clm2"), IOP("wclm3", HSMHV_MOD_WCLM3, IF_REAL, "Width dependence of clm3"), IOP("wwfc", HSMHV_MOD_WWFC, IF_REAL, "Width dependence of wfc"), IOP("wgidl1", HSMHV_MOD_WGIDL1, IF_REAL, "Width dependence of gidl1"), IOP("wgidl2", HSMHV_MOD_WGIDL2, IF_REAL, "Width dependence of gidl2"), IOP("wgleak1", HSMHV_MOD_WGLEAK1, IF_REAL, "Width dependence of gleak1"), IOP("wgleak2", HSMHV_MOD_WGLEAK2, IF_REAL, "Width dependence of gleak2"), IOP("wgleak3", HSMHV_MOD_WGLEAK3, IF_REAL, "Width dependence of gleak3"), IOP("wgleak6", HSMHV_MOD_WGLEAK6, IF_REAL, "Width dependence of gleak6"), IOP("wglksd1", HSMHV_MOD_WGLKSD1, IF_REAL, "Width dependence of glksd1"), IOP("wglksd2", HSMHV_MOD_WGLKSD2, IF_REAL, "Width dependence of glksd2"), IOP("wglkb1", HSMHV_MOD_WGLKB1, IF_REAL, "Width dependence of glkb1"), IOP("wglkb2", HSMHV_MOD_WGLKB2, IF_REAL, "Width dependence of glkb2"), IOP("wnftrp", HSMHV_MOD_WNFTRP, IF_REAL, "Width dependence of nftrp"), IOP("wnfalp", HSMHV_MOD_WNFALP, IF_REAL, "Width dependence of nfalp"), IOP("wpthrou", HSMHV_MOD_WPTHROU, IF_REAL, "Width dependence of pthrou"), IOP("wvdiffj", HSMHV_MOD_WVDIFFJ, IF_REAL, "Width dependence of vdiffj"), IOP("wibpc1", HSMHV_MOD_WIBPC1, IF_REAL, "Width dependence of ibpc1"), IOP("wibpc2", HSMHV_MOD_WIBPC2, IF_REAL, "Width dependence of ibpc2"), IOP("wcgbo", HSMHV_MOD_WCGBO, IF_REAL, "Width dependence of cgbo"), IOP("wcvdsover", HSMHV_MOD_WCVDSOVER, IF_REAL, "Width dependence of cvdsover"), IOP("wfalph", HSMHV_MOD_WFALPH, IF_REAL, "Width dependence of falph"), IOP("wnpext", HSMHV_MOD_WNPEXT, IF_REAL, "Width dependence of npext"), IOP("wpowrat", HSMHV_MOD_WPOWRAT, IF_REAL, "Width dependence of powrat"), IOP("wrd", HSMHV_MOD_WRD, IF_REAL, "Width dependence of rd"), IOP("wrd22", HSMHV_MOD_WRD22, IF_REAL, "Width dependence of rd22"), IOP("wrd23", HSMHV_MOD_WRD23, IF_REAL, "Width dependence of rd23"), IOP("wrd24", HSMHV_MOD_WRD24, IF_REAL, "Width dependence of rd24"), IOP("wrdict1", HSMHV_MOD_WRDICT1, IF_REAL, "Width dependence of rdict1"), IOP("wrdov13", HSMHV_MOD_WRDOV13, IF_REAL, "Width dependence of rdov13"), IOP("wrdslp1", HSMHV_MOD_WRDSLP1, IF_REAL, "Width dependence of rdslp1"), IOP("wrdvb", HSMHV_MOD_WRDVB, IF_REAL, "Width dependence of rdvb"), IOP("wrdvd", HSMHV_MOD_WRDVD, IF_REAL, "Width dependence of rdvd"), IOP("wrdvg11", HSMHV_MOD_WRDVG11, IF_REAL, "Width dependence of rdvg11"), IOP("wrs", HSMHV_MOD_WRS, IF_REAL, "Width dependence of rs"), IOP("wrth0", HSMHV_MOD_WRTH0, IF_REAL, "Width dependence of rth0"), IOP("wvover", HSMHV_MOD_WVOVER, IF_REAL, "Width dependence of vover"), /* Cross-term dependence */ IOP("pvmax", HSMHV_MOD_PVMAX, IF_REAL, "Cross-term dependence of vmax"), IOP("pbgtmp1", HSMHV_MOD_PBGTMP1, IF_REAL, "Cross-term dependence of bgtmp1"), IOP("pbgtmp2", HSMHV_MOD_PBGTMP2, IF_REAL, "Cross-term dependence of bgtmp2"), IOP("peg0", HSMHV_MOD_PEG0, IF_REAL, "Cross-term dependence of eg0"), IOP("pvfbover", HSMHV_MOD_PVFBOVER, IF_REAL, "Cross-term dependence of vfbover"), IOP("pnover", HSMHV_MOD_PNOVER, IF_REAL, "Cross-term dependence of nover"), IOP("pnovers", HSMHV_MOD_PNOVERS, IF_REAL, "Cross-term dependence of nover on source size"), IOP("pwl2", HSMHV_MOD_PWL2, IF_REAL, "Cross-term dependence of wl2"), IOP("pvfbc", HSMHV_MOD_PVFBC, IF_REAL, "Cross-term dependence of vfbc"), IOP("pnsubc", HSMHV_MOD_PNSUBC, IF_REAL, "Cross-term dependence of nsubc"), IOP("pnsubp", HSMHV_MOD_PNSUBP, IF_REAL, "Cross-term dependence of nsubp"), IOP("pscp1", HSMHV_MOD_PSCP1, IF_REAL, "Cross-term dependence of scp1"), IOP("pscp2", HSMHV_MOD_PSCP2, IF_REAL, "Cross-term dependence of scp2"), IOP("pscp3", HSMHV_MOD_PSCP3, IF_REAL, "Cross-term dependence of scp3"), IOP("psc1", HSMHV_MOD_PSC1, IF_REAL, "Cross-term dependence of sc1"), IOP("psc2", HSMHV_MOD_PSC2, IF_REAL, "Cross-term dependence of sc2"), IOP("psc3", HSMHV_MOD_PSC3, IF_REAL, "Cross-term dependence of sc3"), IOP("ppgd1", HSMHV_MOD_PPGD1, IF_REAL, "Cross-term dependence of pgd1"), IOP("ppgd3", HSMHV_MOD_PPGD3, IF_REAL, "Cross-term dependence of pgd3"), IOP("pndep", HSMHV_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP("pninv", HSMHV_MOD_PNINV, IF_REAL, "Cross-term dependence of ninv"), IOP("pmuecb0", HSMHV_MOD_PMUECB0, IF_REAL, "Cross-term dependence of muecb0"), IOP("pmuecb1", HSMHV_MOD_PMUECB1, IF_REAL, "Cross-term dependence of muecb1"), IOP("pmueph1", HSMHV_MOD_PMUEPH1, IF_REAL, "Cross-term dependence of mueph1"), IOP("pvtmp", HSMHV_MOD_PVTMP, IF_REAL, "Cross-term dependence of vtmp"), IOP("pwvth0", HSMHV_MOD_PWVTH0, IF_REAL, "Cross-term dependence of wvth0"), IOP("pmuesr1", HSMHV_MOD_PMUESR1, IF_REAL, "Cross-term dependence of muesr1"), IOP("pmuetmp", HSMHV_MOD_PMUETMP, IF_REAL, "Cross-term dependence of muetmp"), IOP("psub1", HSMHV_MOD_PSUB1, IF_REAL, "Cross-term dependence of sub1"), IOP("psub2", HSMHV_MOD_PSUB2, IF_REAL, "Cross-term dependence of sub2"), IOP("psvds", HSMHV_MOD_PSVDS, IF_REAL, "Cross-term dependence of svds"), IOP("psvbs", HSMHV_MOD_PSVBS, IF_REAL, "Cross-term dependence of svbs"), IOP("psvgs", HSMHV_MOD_PSVGS, IF_REAL, "Cross-term dependence of svgs"), IOP("pfn1", HSMHV_MOD_PFN1, IF_REAL, "Cross-term dependence of fn1"), IOP("pfn2", HSMHV_MOD_PFN2, IF_REAL, "Cross-term dependence of fn2"), IOP("pfn3", HSMHV_MOD_PFN3, IF_REAL, "Cross-term dependence of fn3"), IOP("pfvbs", HSMHV_MOD_PFVBS, IF_REAL, "Cross-term dependence of fvbs"), IOP("pnsti", HSMHV_MOD_PNSTI, IF_REAL, "Cross-term dependence of nsti"), IOP("pwsti", HSMHV_MOD_PWSTI, IF_REAL, "Cross-term dependence of wsti"), IOP("pscsti1", HSMHV_MOD_PSCSTI1, IF_REAL, "Cross-term dependence of scsti1"), IOP("pscsti2", HSMHV_MOD_PSCSTI2, IF_REAL, "Cross-term dependence of scsti2"), IOP("pvthsti", HSMHV_MOD_PVTHSTI, IF_REAL, "Cross-term dependence of vthsti"), IOP("pmuesti1", HSMHV_MOD_PMUESTI1, IF_REAL, "Cross-term dependence of muesti1"), IOP("pmuesti2", HSMHV_MOD_PMUESTI2, IF_REAL, "Cross-term dependence of muesti2"), IOP("pmuesti3", HSMHV_MOD_PMUESTI3, IF_REAL, "Cross-term dependence of muesti3"), IOP("pnsubpsti1", HSMHV_MOD_PNSUBPSTI1, IF_REAL, "Cross-term dependence of nsubpsti1"), IOP("pnsubpsti2", HSMHV_MOD_PNSUBPSTI2, IF_REAL, "Cross-term dependence of nsubpsti2"), IOP("pnsubpsti3", HSMHV_MOD_PNSUBPSTI3, IF_REAL, "Cross-term dependence of nsubpsti3"), IOP("pcgso", HSMHV_MOD_PCGSO, IF_REAL, "Cross-term dependence of cgso"), IOP("pcgdo", HSMHV_MOD_PCGDO, IF_REAL, "Cross-term dependence of cgdo"), IOP("pjs0", HSMHV_MOD_PJS0, IF_REAL, "Cross-term dependence of js0"), IOP("pjs0sw", HSMHV_MOD_PJS0SW, IF_REAL, "Cross-term dependence of js0sw"), IOP("pnj", HSMHV_MOD_PNJ, IF_REAL, "Cross-term dependence of nj"), IOP("pcisbk", HSMHV_MOD_PCISBK, IF_REAL, "Cross-term dependence of cisbk"), IOP("pclm1", HSMHV_MOD_PCLM1, IF_REAL, "Cross-term dependence of clm1"), IOP("pclm2", HSMHV_MOD_PCLM2, IF_REAL, "Cross-term dependence of clm2"), IOP("pclm3", HSMHV_MOD_PCLM3, IF_REAL, "Cross-term dependence of clm3"), IOP("pwfc", HSMHV_MOD_PWFC, IF_REAL, "Cross-term dependence of wfc"), IOP("pgidl1", HSMHV_MOD_PGIDL1, IF_REAL, "Cross-term dependence of gidl1"), IOP("pgidl2", HSMHV_MOD_PGIDL2, IF_REAL, "Cross-term dependence of gidl2"), IOP("pgleak1", HSMHV_MOD_PGLEAK1, IF_REAL, "Cross-term dependence of gleak1"), IOP("pgleak2", HSMHV_MOD_PGLEAK2, IF_REAL, "Cross-term dependence of gleak2"), IOP("pgleak3", HSMHV_MOD_PGLEAK3, IF_REAL, "Cross-term dependence of gleak3"), IOP("pgleak6", HSMHV_MOD_PGLEAK6, IF_REAL, "Cross-term dependence of gleak6"), IOP("pglksd1", HSMHV_MOD_PGLKSD1, IF_REAL, "Cross-term dependence of glksd1"), IOP("pglksd2", HSMHV_MOD_PGLKSD2, IF_REAL, "Cross-term dependence of glksd2"), IOP("pglkb1", HSMHV_MOD_PGLKB1, IF_REAL, "Cross-term dependence of glkb1"), IOP("pglkb2", HSMHV_MOD_PGLKB2, IF_REAL, "Cross-term dependence of glkb2"), IOP("pnftrp", HSMHV_MOD_PNFTRP, IF_REAL, "Cross-term dependence of nftrp"), IOP("pnfalp", HSMHV_MOD_PNFALP, IF_REAL, "Cross-term dependence of nfalp"), IOP("ppthrou", HSMHV_MOD_PPTHROU, IF_REAL, "Cross-term dependence of pthrou"), IOP("pvdiffj", HSMHV_MOD_PVDIFFJ, IF_REAL, "Cross-term dependence of vdiffj"), IOP("pibpc1", HSMHV_MOD_PIBPC1, IF_REAL, "Cross-term dependence of ibpc1"), IOP("pibpc2", HSMHV_MOD_PIBPC2, IF_REAL, "Cross-term dependence of ibpc2"), IOP("pcgbo", HSMHV_MOD_PCGBO, IF_REAL, "Cross-term dependence of cgbo"), IOP("pcvdsover", HSMHV_MOD_PCVDSOVER, IF_REAL, "Cross-term dependence of cvdsover"), IOP("pfalph", HSMHV_MOD_PFALPH, IF_REAL, "Cross-term dependence of falph"), IOP("pnpext", HSMHV_MOD_PNPEXT, IF_REAL, "Cross-term dependence of npext"), IOP("ppowrat", HSMHV_MOD_PPOWRAT, IF_REAL, "Cross-term dependence of powrat"), IOP("prd", HSMHV_MOD_PRD, IF_REAL, "Cross-term dependence of rd"), IOP("prd22", HSMHV_MOD_PRD22, IF_REAL, "Cross-term dependence of rd22"), IOP("prd23", HSMHV_MOD_PRD23, IF_REAL, "Cross-term dependence of rd23"), IOP("prd24", HSMHV_MOD_PRD24, IF_REAL, "Cross-term dependence of rd24"), IOP("prdict1", HSMHV_MOD_PRDICT1, IF_REAL, "Cross-term dependence of rdict1"), IOP("prdov13", HSMHV_MOD_PRDOV13, IF_REAL, "Cross-term dependence of rdov13"), IOP("prdslp1", HSMHV_MOD_PRDSLP1, IF_REAL, "Cross-term dependence of rdslp1"), IOP("prdvb", HSMHV_MOD_PRDVB, IF_REAL, "Cross-term dependence of rdvb"), IOP("prdvd", HSMHV_MOD_PRDVD, IF_REAL, "Cross-term dependence of rdvd"), IOP("prdvg11", HSMHV_MOD_PRDVG11, IF_REAL, "Cross-term dependence of rdvg11"), IOP("prs", HSMHV_MOD_PRS, IF_REAL, "Cross-term dependence of rs"), IOP("prth0", HSMHV_MOD_PRTH0, IF_REAL, "Cross-term dependence of rth0"), IOP("pvover", HSMHV_MOD_PVOVER, IF_REAL, "Cross-term dependence of vover"), IOP("vgs_max", HSMHV_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", HSMHV_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", HSMHV_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", HSMHV_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", HSMHV_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", HSMHV_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch") }; char *HSMHVnames[] = { "Drain", "Gate", "Source", "Bulk", "Substrate", "Temp" }; int HSMHVnSize = NUMELEMS(HSMHVnames); int HSMHVpTSize = NUMELEMS(HSMHVpTable); int HSMHVmPTSize = NUMELEMS(HSMHVmPTable); int HSMHViSize = sizeof(HSMHVinstance); int HSMHVmSize = sizeof(HSMHVmodel); ngspice-26/src/spicelib/devices/hisimhv1/hsmhvinit.h0000644000265600020320000000040212264261473022142 0ustar andreasadmin#ifndef _HISIMINIT_H #define _HISIMINIT_H extern IFparm HSMHVpTable[ ]; extern IFparm HSMHVmPTable[ ]; extern char *HSMHVnames[ ]; extern int HSMHVpTSize; extern int HSMHVmPTSize; extern int HSMHVnSize; extern int HSMHViSize; extern int HSMHVmSize; #endif ngspice-26/src/spicelib/devices/hisimhv1/hsmhvld.c0000644000265600020320000034340212264261473021603 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvld.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hisimhv.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define SHOW_EPS_QUANT 1.0e-15 static void ShowPhysVals ( HSMHVinstance *here, HSMHVmodel *model, int isFirst, double vds, double vgs, double vbs, double vgd, double vbd, double vgb ) { NG_IGNORE(vgd); NG_IGNORE(vbd); /* */ /* */ /* Note: This function is not yet adapted to the flat version */ /* */ /* */ /* regard the epsilon-quantity as 0.0 */ vds = (fabs(vds) < SHOW_EPS_QUANT) ? 0.0 : vds; vgs = (fabs(vgs) < SHOW_EPS_QUANT) ? 0.0 : vgs; vbs = (fabs(vbs) < SHOW_EPS_QUANT) ? 0.0 : vbs; vgb = (fabs(vgb) < SHOW_EPS_QUANT) ? 0.0 : vgb; switch (model->HSMHV_show) { case 1: if (isFirst) printf("Vds Ids\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_mode*here->HSMHV_ids); break; case 2: if (isFirst) printf("Vgs Ids\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_mode*here->HSMHV_ids); break; case 3: if (isFirst) printf("Vgs log10(|Ids|)\n"); printf("%e %e\n", model->HSMHV_type*vgs, log10(here->HSMHV_ids)); break; case 4: if (isFirst) printf("log10(|Ids|) gm/|Ids|\n"); if (here->HSMHV_ids == 0.0) printf("I can't show gm/Ids - log10(Ids), because Ids = 0.\n"); else printf("%e %e\n", log10(here->HSMHV_ids), here->HSMHV_gm/here->HSMHV_ids); break; case 5: if (isFirst) printf("Vds gds\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_gds); break; case 6: if (isFirst) printf("Vgs gm\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_gm); break; case 7: if (isFirst) printf("Vbs gbs\n"); printf("%e %e\n", model->HSMHV_type*vbs, here->HSMHV_gmbs); break; case 8: if (isFirst) printf("Vgs Cgg\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_cggb); break; case 9: if (isFirst) printf("Vgs Cgs\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_cgsb); break; case 10: if (isFirst) printf("Vgs Cgd\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_cgdb); break; case 11: if (isFirst) printf("Vgs Cgb\n"); printf("%e %e\n", model->HSMHV_type*vgs, -(here->HSMHV_cggb+here->HSMHV_cgsb+here->HSMHV_cgdb)); break; case 12: if (isFirst) printf("Vds Csg\n"); printf("%e %e\n", model->HSMHV_type*vds, -(here->HSMHV_cggb+here->HSMHV_cbgb+here->HSMHV_cdgb)); break; case 13: if (isFirst) printf("Vds Cdg\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_cdgb); break; case 14: if (isFirst) printf("Vds Cbg\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_cbgb); break; case 15: if (isFirst) printf("Vds Cgg\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_cggb); break; case 16: if (isFirst) printf("Vds Cgs\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_cgsb); break; case 17: if (isFirst) printf("Vds Cgd\n"); printf("%e %e\n", model->HSMHV_type*vds, here->HSMHV_cgdb); break; case 18: if (isFirst) printf("Vds Cgb\n"); printf("%e %e\n", model->HSMHV_type*vds, -(here->HSMHV_cggb+here->HSMHV_cgsb+here->HSMHV_cgdb)); break; case 19: if (isFirst) printf("Vgs Csg\n"); printf("%e %e\n", model->HSMHV_type*vgs, -(here->HSMHV_cggb+here->HSMHV_cbgb+here->HSMHV_cdgb)); break; case 20: if (isFirst) printf("Vgs Cdg\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_cdgb); break; case 21: if (isFirst) printf("Vgs Cbg\n"); printf("%e %e\n", model->HSMHV_type*vgs, here->HSMHV_cbgb); break; case 22: if (isFirst) printf("Vgb Cgb\n"); printf("%e %e\n", model->HSMHV_type*vgb, -(here->HSMHV_cggb+here->HSMHV_cgsb+here->HSMHV_cgdb)); break; case 50: if (isFirst) printf("Vgs Vds Vbs Vgb Ids log10(|Ids|) gm/|Ids| gm gds gbs Cgg Cgs Cgb Cgd Csg Cbg Cdg\n"); printf("%e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e\n", model->HSMHV_type*vgs, model->HSMHV_type*vds, model->HSMHV_type*vbs, model->HSMHV_type*vgb, here->HSMHV_mode*here->HSMHV_ids, log10(here->HSMHV_ids), here->HSMHV_gm/here->HSMHV_ids, here->HSMHV_gm, here->HSMHV_gds, here->HSMHV_gmbs, here->HSMHV_cggb, here->HSMHV_cgsb, -(here->HSMHV_cggb+here->HSMHV_cgsb+here->HSMHV_cgdb), here->HSMHV_cgdb, -(here->HSMHV_cggb+here->HSMHV_cbgb+here->HSMHV_cdgb), here->HSMHV_cbgb, here->HSMHV_cdgb); break; default: /* printf("There is no physical value corrsponding to %d\n", flag); */ break; } } int HSMHVload( GENmodel *inModel, register CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; HSMHVbinningParam *pParam; HSMHVmodelMKSParam *modelMKS ; HSMHVhereMKSParam *hereMKS ; /* node voltages */ #define XDIM 14 double x[XDIM] ; /* branch voltages */ double vbd=0.0, vbs=0.0, vds=0.0, vgb=0.0, vgd=0.0, vgdo=0.0, vgs=0.0 ; double vdbs=0.0, vsbs=0.0, vdbd=0.0 ; double vges=0.0, vged=0.0, vgedo=0.0 ; double vbs_jct=0.0, vbd_jct=0.0; double deltemp = 0.0 , deltemp_old = 0.0 ; double vggp=0, vddp=0, vssp=0, vbpb=0, vbpsb=0, vbpdb=0 ; double vdse=0.0, vgse=0.0, vbse=0.0 ; double vsubs=0.0 ; /* substrate bias */ double ivds=0.0, ivgs=0.0, ivbs=0.0 ; double ivgse=0.0, ivdse=0.0, ivbse=0.0 ; /* delta of branch voltages */ double delvbs=0.0, delvds=0.0, delvgs=0.0, delvsbs=0.0, delvdbd=0.0, deldeltemp = 0.0 ; double delvdse=0.0, delvgse=0.0, delvbse=0.0, delvddp=0.0, delvssp=0.0, delvggp=0.0, delvbpb=0.0, delvbpdb=0.0, delvbpsb =0.0 ; double delvsubs=0.0; /* substrate bias change */ /* branch currents */ double Ids=0.0, gds=0.0, gm=0.0, gmbs=0.0, gmT=0.0, gds_ext=0.0, gm_ext=0.0, gmbs_ext=0.0 ; double Igd=0.0, dIgd_dVd=0.0, dIgd_dVg=0.0, dIgd_dVb=0.0, dIgd_dVs=0.0, dIgd_dT=0.0 ; double Igs=0.0, dIgs_dVd=0.0, dIgs_dVg=0.0, dIgs_dVb=0.0, dIgs_dVs=0.0, dIgs_dT=0.0 ; double Igb=0.0, dIgb_dVd=0.0, dIgb_dVg=0.0, dIgb_dVb=0.0, dIgb_dVs=0.0, dIgb_dT=0.0 ; double Isub=0.0, dIsub_dVds=0.0, dIsub_dVgs=0.0, dIsub_dVbs=0.0, dIsub_dT=0.0 ; double Isubs=0.0, dIsubs_dVds=0.0, dIsubs_dVgs=0.0, dIsubs_dVbs=0.0, dIsubs_dT=0.0 ; double dIsub_dVdse=0.0, dIsubs_dVdse=0.0 ; double Igidl=0.0, dIgidl_dVds=0.0, dIgidl_dVgs=0.0, dIgidl_dVbs=0.0, dIgidl_dT=0.0 ; double Igisl=0.0, dIgisl_dVds=0.0, dIgisl_dVgs=0.0, dIgisl_dVbs=0.0, dIgisl_dT=0.0 ; double Ibd=0.0, Gbd=0.0, Gbdt=0.0 ; double Ibs=0.0, Gbs=0.0, Gbst=0.0 ; double Iddp=0.0, dIddp_dVddp=0.0, dIddp_dVdse=0.0, dIddp_dVgse=0.0, dIddp_dVbse=0.0, dIddp_dVsubs=0.0, dIddp_dT =0.0 ; double Issp=0.0, dIssp_dVssp=0.0, dIssp_dVdse=0.0, dIssp_dVgse=0.0, dIssp_dVbse=0.0, dIssp_dVsubs=0.0, dIssp_dT =0.0 ; double Iggp=0.0, dIggp_dVggp =0.0 ; double Ibpb=0.0, dIbpb_dVbpb =0.0 ; double Ibpdb=0.0, dIbpdb_dVbpdb =0.0 ; double Ibpsb=0.0, dIbpsb_dVbpsb =0.0 ; double Ith=0.0, dIth_dT =0.0 ; /* displacement currents */ double cq_d=0.0, cq_dP=0.0, cq_g=0.0, cq_gP=0.0, cq_s=0.0, cq_sP=0.0, cq_bP=0.0, cq_b=0.0, cq_db=0.0, cq_sb=0.0, cq_t=0.0 ; double cq_dE=0.0, cq_gE=0.0, cq_sE=0.0, cq_bE=0.0 ; /* node currents */ double cur_d=0.0, cur_dP=0.0, cur_g=0.0, cur_gP=0.0, cur_s=0.0, cur_sP=0.0, cur_bP=0.0, cur_b=0.0, cur_db=0.0, cur_sb=0.0, cur_t=0.0 ; double i_d=0.0, i_dP=0.0, i_g=0.0, i_gP=0.0, i_s=0.0, i_sP=0.0, i_bP=0.0, i_b=0.0, i_db=0.0, i_sb=0.0, i_t=0.0 ; /* resistances and conductances */ double Rd=0.0, dRd_dVdse=0.0, dRd_dVgse=0.0, dRd_dVbse=0.0, dRd_dVsubs=0.0, dRd_dT=0.0 ; double Rs=0.0, dRs_dVdse=0.0, dRs_dVgse=0.0, dRs_dVbse=0.0, dRs_dVsubs=0.0, dRs_dT=0.0 ; double GD=0.0, GD_dVds=0.0, GD_dVgs=0.0, GD_dVbs=0.0, GD_dVsubs=0.0, GD_dT=0.0 ; double GS=0.0, GS_dVds=0.0, GS_dVgs=0.0, GS_dVbs=0.0, GS_dVsubs=0.0, GS_dT=0.0 ; double Gth=0.0 ; double GG=0.0, GRBPD=0.0, GRBPS=0.0, GRBPB=0.0; /* charges */ double Qd=0.0, dQd_dVds=0.0, dQd_dVgs=0.0, dQd_dVbs=0.0, dQd_dT=0.0 ; double Qg=0.0, dQg_dVds=0.0, dQg_dVgs=0.0, dQg_dVbs=0.0, dQg_dT=0.0 ; double Qs=0.0, dQs_dVds=0.0, dQs_dVgs=0.0, dQs_dVbs=0.0, dQs_dT=0.0 ; double Qb=0.0, dQb_dVds=0.0, dQb_dVgs=0.0, dQb_dVbs=0.0, dQb_dT=0.0 ; double Qbd=0.0, Cbd=0.0, Cbdt=0.0, Qbs=0.0, Cbs=0.0, Cbst=0.0 ; double Qth=0.0, Cth =0.0 ; double Qfd=0.0, dQfd_dVdse=0.0, dQfd_dVgse=0.0, dQfd_dVbse=0.0, dQfd_dT=0.0 ; double Qfs=0.0, dQfs_dVdse=0.0, dQfs_dVgse=0.0, dQfs_dVbse=0.0, dQfs_dT=0.0 ; double Qdext=0.0, dQdext_dVdse=0.0, dQdext_dVgse=0.0, dQdext_dVbse=0.0, dQdext_dT=0.0 ; double Qgext=0.0, dQgext_dVdse=0.0, dQgext_dVgse=0.0, dQgext_dVbse=0.0, dQgext_dT=0.0 ; double Qsext=0.0, dQsext_dVdse=0.0, dQsext_dVgse=0.0, dQsext_dVbse=0.0, dQsext_dT=0.0 ; double Qbext=0.0, dQbext_dVdse=0.0, dQbext_dVgse=0.0, dQbext_dVbse=0.0, dQbext_dT=0.0 ; /* 5th substrate node */ int flg_subNode = 0 ; /* self heating */ double Veffpower=0.0, dVeffpower_dVds=0.0, dVeffpower_dVdse =0.0 ; double P=0.0, dP_dVds=0.0, dP_dVgs=0.0, dP_dVbs=0.0, dP_dT =0.0, dP_dVdse=0.0, dP_dVgse=0.0, dP_dVbse =0.0 ; int flg_tempNode = 0 ; double T0 , T1 , T2 ; #define SHE_MAX_dlt 0.1 #define C_RTH_MIN 1.0e-4 double TMF1 , TMF2 ; /*---------------------------------------------------* * smoothUpper: ceiling. * y = xmax - 0.5 ( arg + sqrt( arg^2 + 4 xmax delta ) ) * arg = xmax - x - delta *-----------------*/ #define Fn_SU( y , x , xmax , delta , dx ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : -( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } /* NQS related variables */ int flg_nqs =0 ; double Qi_nqs=0.0, Qb_nqs=0.0, delQi_nqs=0.0, delQb_nqs=0.0, i_qi=0.0, i_qb=0.0, cq_qi=0.0, cq_qb=0.0, cur_qi=0.0, cur_qb =0.0 ; double Iqi_nqs=0.0, dIqi_nqs_dVds=0.0, dIqi_nqs_dVgs=0.0, dIqi_nqs_dVbs=0.0, dIqi_nqs_dT=0.0, dIqi_nqs_dQi_nqs =0.0 ; double Iqb_nqs=0.0, dIqb_nqs_dVds=0.0, dIqb_nqs_dVgs=0.0, dIqb_nqs_dVbs=0.0, dIqb_nqs_dT=0.0, dIqb_nqs_dQb_nqs =0.0 ; double Qd_nqs=0.0, dQd_nqs_dVds=0.0, dQd_nqs_dVgs=0.0, dQd_nqs_dVbs=0.0, dQd_nqs_dT=0.0, dQd_nqs_dQi_nqs =0.0 ; double Qs_nqs=0.0, dQs_nqs_dVds=0.0, dQs_nqs_dVgs=0.0, dQs_nqs_dVbs=0.0, dQs_nqs_dT=0.0, dQs_nqs_dQi_nqs =0.0 ; double Qg_nqs=0.0, dQg_nqs_dQi_nqs=0.0, dQg_nqs_dQb_nqs =0.0 ; double tau=0.0, dtau_dVds=0.0, dtau_dVgs=0.0, dtau_dVbs=0.0, dtau_dT =0.0 ; double taub=0.0, dtaub_dVds=0.0, dtaub_dVgs=0.0, dtaub_dVbs=0.0, dtaub_dT =0.0 ; double Qdrat=0.0, dQdrat_dVds=0.0, dQdrat_dVgs=0.0, dQdrat_dVbs=0.0, dQdrat_dT =0.0 ; double Qi=0.0, dQi_dVds=0.0, dQi_dVgs=0.0, dQi_dVbs=0.0, dQi_dT =0.0 ; double Qbulk=0.0, dQbulk_dVds=0.0, dQbulk_dVgs=0.0, dQbulk_dVbs=0.0, dQbulk_dT =0.0 ; /* output related variables */ double dQi_nqs_dVds=0.0, dQi_nqs_dVgs=0.0, dQi_nqs_dVbs=0.0, dQb_nqs_dVds=0.0, dQb_nqs_dVgs=0.0, dQb_nqs_dVbs=0.0 ; double cgdb_nqs=0.0, cggb_nqs=0.0, cgsb_nqs=0.0, cbdb_nqs=0.0, cbgb_nqs=0.0, cbsb_nqs=0.0, cddb_nqs=0.0, cdgb_nqs=0.0, cdsb_nqs=0.0 ; double cgdb=0.0, cggb=0.0, cgsb=0.0, cbdb=0.0, cbgb=0.0, cbsb=0.0, cddb=0.0, cdgb=0.0, cdsb=0.0 ; /* rows of conductance and capacitance matrix stamp */ double ydc_d[XDIM], ydc_dP[XDIM], ydc_g[XDIM], ydc_gP[XDIM], ydc_s[XDIM], ydc_sP[XDIM] ; double ydc_bP[XDIM], ydc_b[XDIM], ydc_db[XDIM], ydc_sb[XDIM], ydc_t[XDIM], ydc_qi[XDIM], ydc_qb[XDIM] ; double ydyn_d[XDIM], ydyn_dP[XDIM], ydyn_g[XDIM], ydyn_gP[XDIM], ydyn_s[XDIM], ydyn_sP[XDIM] ; double ydyn_bP[XDIM], ydyn_b[XDIM], ydyn_db[XDIM], ydyn_sb[XDIM], ydyn_t[XDIM], ydyn_qi[XDIM], ydyn_qb[XDIM] ; /* limiter, bypass, and convergence */ int ByPass=0, Check=0, Check1=0, Check2=0, Check3=0 ; double von=0.0, limval =0.0 ; double i_dP_hat=0.0, i_gP_hat=0.0, i_sP_hat=0.0, i_db_hat=0.0, i_sb_hat =0.0 ; #define LIM_TOL 1.0e0 #define LIM_TOL2 1.0e0 /* predictor and numerical integration stuff */ double ag0=0.0, xfact=0.0 ; double ceq=0.0, geq=0.0 ; int ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; int showPhysVal=0 ; int isConv=0 ; double vds_pre=0.0 ; int i=0, noncon_old=0 ; #define dNode 0 #define dNodePrime 1 #define gNode 2 #define gNodePrime 3 #define sNode 4 #define sNodePrime 5 #define bNodePrime 6 #define bNode 7 #define dbNode 8 #define sbNode 9 #define subNode 10 #define tempNode 11 #define qiNode 12 #define qbNode 13 #define lastNode 13 /* must be the last node! */ #define SPICE_rhs 1 /* set to 0 if rhs to be loaded for standard Newton */ /* set to 1 if rhs_eq to be loaded, e.g. for SPICE */ if (SPICE_rhs) { for (i=0; iHSMHVnextModel ) { /* loop through all the instances of the model */ modelMKS = &model->modelMKS ; for (here = model->HSMHVinstances; here != NULL ; here = here->HSMHVnextInstance) { hereMKS = &here->hereMKS ; pParam = &here->pParam ; showPhysVal = 0; Check=1; ByPass = 0; vsubs = 0.0 ; /* substrate bias */ deltemp = 0.0 ; noncon_old = ckt->CKTnoncon; flg_nqs = model->HSMHV_conqs ; flg_subNode = here->HSMHVsubNode ; /* if flg_subNode > 0, external(/internal) substrate node exists */ flg_tempNode = here->HSMHVtempNode ; /* if flg_tempNode > 0, external/internal temperature node exists */ #ifdef DEBUG_HISIMHVLD_VX printf("mode = %x\n", ckt->CKTmode); printf("Vd Vg Vs Vb %e %e %e %e\n", *(ckt->CKTrhsOld+here->HSMHVdNodePrime), *(ckt->CKTrhsOld+here->HSMHVgNodePrime), *(ckt->CKTrhsOld+here->HSMHVsNodePrime), *(ckt->CKTrhsOld+here->HSMHVbNodePrime)); #endif if ( ckt->CKTmode & MODEINITSMSIG ) { vbs = *(ckt->CKTstate0 + here->HSMHVvbs); vgs = *(ckt->CKTstate0 + here->HSMHVvgs); vds = *(ckt->CKTstate0 + here->HSMHVvds); vges = *(ckt->CKTstate0 + here->HSMHVvges); vdbd = *(ckt->CKTstate0 + here->HSMHVvdbd); vsbs = *(ckt->CKTstate0 + here->HSMHVvsbs); if (flg_subNode > 0) vsubs = *(ckt->CKTstate0 + here->HSMHVvsubs); if( flg_tempNode > 0 ){ deltemp = *(ckt->CKTstate0 + here->HSMHVdeltemp); } vdse = *(ckt->CKTstate0 + here->HSMHVvdse) ; vgse = *(ckt->CKTstate0 + here->HSMHVvgse) ; vbse = *(ckt->CKTstate0 + here->HSMHVvbse) ; if ( flg_nqs ) { Qi_nqs = *(ckt->CKTstate0 + here->HSMHVqi_nqs) ; Qb_nqs = *(ckt->CKTstate0 + here->HSMHVqb_nqs) ; } else { Qi_nqs = 0.0 ; Qb_nqs = 0.0 ; } /* printf("HSMHV_load: (from state0) vds.. = %e %e %e %e %e %e\n", vds,vgs,vbs,vdse,vgse,vbse); */ } else if ( ckt->CKTmode & MODEINITTRAN ) { /* #include "printf_ld_converged.inc" */ vbs = *(ckt->CKTstate1 + here->HSMHVvbs); vgs = *(ckt->CKTstate1 + here->HSMHVvgs); vds = *(ckt->CKTstate1 + here->HSMHVvds); vges = *(ckt->CKTstate1 + here->HSMHVvges); vdbd = *(ckt->CKTstate1 + here->HSMHVvdbd); vsbs = *(ckt->CKTstate1 + here->HSMHVvsbs); if (flg_subNode > 0) vsubs = *(ckt->CKTstate1 + here->HSMHVvsubs); if( flg_tempNode > 0 ){ deltemp = *(ckt->CKTstate1 + here->HSMHVdeltemp); } vdse = *(ckt->CKTstate1 + here->HSMHVvdse) ; vgse = *(ckt->CKTstate1 + here->HSMHVvgse) ; vbse = *(ckt->CKTstate1 + here->HSMHVvbse) ; if ( flg_nqs ) { Qi_nqs = *(ckt->CKTstate1 + here->HSMHVqi_nqs) ; Qb_nqs = *(ckt->CKTstate1 + here->HSMHVqb_nqs) ; } else { Qi_nqs = 0.0 ; Qb_nqs = 0.0 ; } } else if ( (ckt->CKTmode & MODEINITJCT) && !here->HSMHV_off ) { vds = model->HSMHV_type * here->HSMHV_icVDS; vgs = vges = model->HSMHV_type * here->HSMHV_icVGS; vbs = vsbs = model->HSMHV_type * here->HSMHV_icVBS; vdbd = 0.0 ; if ( (vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ( (ckt->CKTmode & (MODETRAN|MODEAC|MODEDCOP|MODEDCTRANCURVE)) || !(ckt->CKTmode & MODEUIC) ) ) { /* set biases for starting analysis */ vbs = vdbd = vsbs = 0.0; vgs = vges = 0.1; vds = 0.1; } if (flg_subNode > 0) vsubs = 0.0; if( flg_tempNode > 0 ) deltemp=0.0; vdse = vds ; vgse = vgs ; Qi_nqs = Qb_nqs = 0.0 ; } else if ( ( ckt->CKTmode & (MODEINITJCT | MODEINITFIX) ) && here->HSMHV_off ) { vbs = vgs = vds = 0.0; vges = 0.0; vdbd = vsbs = 0.0; if (flg_subNode > 0) vsubs = 0.0; if( flg_tempNode > 0 ) deltemp=0.0; vdse = vds ; vgse = vgs ; Qi_nqs = Qb_nqs = 0.0 ; } else { #ifndef PREDICTOR /* BSIM3 style */ if (ckt->CKTmode & MODEINITPRED) { /* #include "printf_ld_converged.inc" */ /* if (here->HSMHV_mode > 0) { gds_ext = here->HSMHV_dIds_dVdse ; } else { gds_ext = + (here->HSMHV_dIds_dVdse + here->HSMHV_dIds_dVgse + here->HSMHV_dIds_dVbse) ; } printf("zzz %e %e\n",ckt->CKTtime,gds_ext) ; */ xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->HSMHVvbs) = *(ckt->CKTstate1 + here->HSMHVvbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvbs)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvbs))); *(ckt->CKTstate0 + here->HSMHVvgs) = *(ckt->CKTstate1 + here->HSMHVvgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvgs)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvgs))); *(ckt->CKTstate0 + here->HSMHVvds) = *(ckt->CKTstate1 + here->HSMHVvds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvds)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvds))); *(ckt->CKTstate0 + here->HSMHVvbd) = *(ckt->CKTstate0 + here->HSMHVvbs)- *(ckt->CKTstate0 + here->HSMHVvds); *(ckt->CKTstate0 + here->HSMHVvges) = *(ckt->CKTstate1 + here->HSMHVvges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvges)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvges))); *(ckt->CKTstate0 + here->HSMHVvdbd) = *(ckt->CKTstate1 + here->HSMHVvdbd); vdbd = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvdbd)) - (xfact * (*(ckt->CKTstate2 + here->HSMHVvdbd))); *(ckt->CKTstate0 + here->HSMHVvdbs) = *(ckt->CKTstate0 + here->HSMHVvdbd) + *(ckt->CKTstate0 + here->HSMHVvds); *(ckt->CKTstate0 + here->HSMHVvsbs) = *(ckt->CKTstate1 + here->HSMHVvsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvsbs)) - (xfact * (*(ckt->CKTstate2 + here->HSMHVvsbs))); if (flg_subNode > 0){ vsubs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvsubs)) - ( xfact * (*(ckt->CKTstate2 + here->HSMHVvsubs))); } if( flg_tempNode > 0 ){ deltemp = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVdeltemp)) - ( xfact * (*(ckt->CKTstate2 + here->HSMHVdeltemp))); *(ckt->CKTstate0 + here->HSMHVdeltemp) = *(ckt->CKTstate1 + here->HSMHVdeltemp); } *(ckt->CKTstate0 + here->HSMHVvdse) = *(ckt->CKTstate1 + here->HSMHVvdse); vdse = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvdse)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvdse))); *(ckt->CKTstate0 + here->HSMHVvgse) = *(ckt->CKTstate1 + here->HSMHVvgse); vgse = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvgse)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvgse))); *(ckt->CKTstate0 + here->HSMHVvbse) = *(ckt->CKTstate1 + here->HSMHVvbse); vbse = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVvbse)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVvbse))); if (flg_nqs) { *(ckt->CKTstate0 + here->HSMHVqi_nqs) = *(ckt->CKTstate1 + here->HSMHVqi_nqs); Qi_nqs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVqi_nqs)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVqi_nqs))); *(ckt->CKTstate0 + here->HSMHVqb_nqs) = *(ckt->CKTstate1 + here->HSMHVqb_nqs); Qb_nqs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSMHVqb_nqs)) -(xfact * (*(ckt->CKTstate2 + here->HSMHVqb_nqs))); } else { Qi_nqs = Qb_nqs = 0.0 ; } } else { #endif /* PREDICTOR */ /* here->HSMHV_time = ckt->CKTtime; /\* for debug print *\/ */ /* get biases from CKT */ vbs = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vgs = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vds = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vges = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNode) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vdbd = model->HSMHV_type * (*(ckt->CKTrhsOld + here->HSMHVdbNode) - *(ckt->CKTrhsOld + here->HSMHVdNode)); vsbs = model->HSMHV_type * (*(ckt->CKTrhsOld + here->HSMHVsbNode) - *(ckt->CKTrhsOld + here->HSMHVsNode)); if (flg_subNode > 0){ vsubs = model->HSMHV_type * (*(ckt->CKTrhsOld + here->HSMHVsubNode) - *(ckt->CKTrhsOld + here->HSMHVsNode)); } if( flg_tempNode > 0 ){ deltemp = *(ckt->CKTrhsOld + here->HSMHVtempNode); } vbse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNode)); vgse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNode)); vdse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNode) - *(ckt->CKTrhsOld+here->HSMHVsNode)); if ( flg_nqs ) { Qi_nqs = *(ckt->CKTrhsOld + here->HSMHVqiNode); Qb_nqs = *(ckt->CKTrhsOld + here->HSMHVqbNode); } else { Qi_nqs = Qb_nqs = 0.0 ; } #ifndef PREDICTOR } #endif /* PREDICTOR */ /* printf("HSMHV_load: (from rhs ) vds.. = %e %e %e %e %e %e\n", vds,vgs,vbs,vdse,vgse,vbse); */ vbd = vbs - vds; vgd = vgs - vds; vged = vges - vds; vdbs = vdbd + vdse; vgdo = *(ckt->CKTstate0 + here->HSMHVvgs) - *(ckt->CKTstate0 + here->HSMHVvds); vgedo = *(ckt->CKTstate0 + here->HSMHVvges) - *(ckt->CKTstate0 + here->HSMHVvds); vds_pre = vds; #ifndef NOBYPASS /* start of bypass section ... no bypass in case of selfheating */ if ( !(ckt->CKTmode & MODEINITPRED) && ckt->CKTbypass && !model->HSMHV_coselfheat) { delvds = vds - *(ckt->CKTstate0 + here->HSMHVvds) ; delvgs = vgs - *(ckt->CKTstate0 + here->HSMHVvgs) ; delvbs = vbs - *(ckt->CKTstate0 + here->HSMHVvbs) ; delvdse = vdse - *(ckt->CKTstate0 + here->HSMHVvdse) ; delvgse = vgse - *(ckt->CKTstate0 + here->HSMHVvgse) ; delvbse = vbse - *(ckt->CKTstate0 + here->HSMHVvbse) ; delvdbd = vdbd - *(ckt->CKTstate0 + here->HSMHVvdbd) ; delvsbs = vsbs - *(ckt->CKTstate0 + here->HSMHVvsbs) ; if (flg_subNode > 0) delvsubs = vsubs - *(ckt->CKTstate0 + here->HSMHVvsubs) ; /* substrate bias change */ deldeltemp = deltemp - *(ckt->CKTstate0 + here->HSMHVdeltemp) ; if (flg_nqs) { delQi_nqs = Qi_nqs - *(ckt->CKTstate0 + here->HSMHVqi_nqs) ; delQb_nqs = Qb_nqs - *(ckt->CKTstate0 + here->HSMHVqb_nqs) ; } else { delQi_nqs = delQb_nqs = 0.0 ; } /* now let's see if we can bypass */ /* ... first perform the easy cheap bypass checks ... */ /* 1 2 3 3 3 4 4 4 5 543 2 1 */ if ( ( fabs(delvds ) < ckt->CKTreltol * MAX(fabs(vds ),fabs(*(ckt->CKTstate0 + here->HSMHVvds ))) + ckt->CKTvoltTol ) && ( fabs(delvgs ) < ckt->CKTreltol * MAX(fabs(vgs ),fabs(*(ckt->CKTstate0 + here->HSMHVvgs ))) + ckt->CKTvoltTol ) && ( fabs(delvbs ) < ckt->CKTreltol * MAX(fabs(vbs ),fabs(*(ckt->CKTstate0 + here->HSMHVvbs ))) + ckt->CKTvoltTol ) && ( fabs(delvdse) < ckt->CKTreltol * MAX(fabs(vdse),fabs(*(ckt->CKTstate0 + here->HSMHVvdse))) + ckt->CKTvoltTol ) && ( fabs(delvgse) < ckt->CKTreltol * MAX(fabs(vgse),fabs(*(ckt->CKTstate0 + here->HSMHVvgse))) + ckt->CKTvoltTol ) && ( fabs(delvbse) < ckt->CKTreltol * MAX(fabs(vbse),fabs(*(ckt->CKTstate0 + here->HSMHVvbse))) + ckt->CKTvoltTol ) && ( fabs(delvdbd) < ckt->CKTreltol * MAX(fabs(vdbd),fabs(*(ckt->CKTstate0 + here->HSMHVvdbd))) + ckt->CKTvoltTol ) && ( fabs(delvsbs) < ckt->CKTreltol * MAX(fabs(vsbs),fabs(*(ckt->CKTstate0 + here->HSMHVvsbs))) + ckt->CKTvoltTol ) && ( fabs(delvsubs) < ckt->CKTreltol * MAX(fabs(vsubs),fabs(*(ckt->CKTstate0 + here->HSMHVvsubs))) + ckt->CKTvoltTol ) && ( fabs(delQi_nqs) < ckt->CKTreltol * fabs(Qi_nqs) + ckt->CKTchgtol*ckt->CKTabstol + 1.0e-20 ) && ( fabs(delQb_nqs) < ckt->CKTreltol * fabs(Qb_nqs) + ckt->CKTchgtol*ckt->CKTabstol + 1.0e-20 ) ) /* 1.0e-20: heuristic value, must be small enough */ /* to ensure that bypass does not destroy convergence */ { /* ... the first bypass checks are passed -> now do the more expensive checks ...*/ if ( here->HSMHV_mode > 0 ) { /* forward mode */ Ids = here->HSMHV_ids ; gds = here->HSMHV_dIds_dVdsi ; gm = here->HSMHV_dIds_dVgsi ; gmbs = here->HSMHV_dIds_dVbsi ; gmT = (flg_tempNode > 0) ? here->HSMHV_dIds_dTi : 0.0 ; gmbs_ext = here->HSMHV_dIds_dVbse; gds_ext = here->HSMHV_dIds_dVdse ; gm_ext = here->HSMHV_dIds_dVgse; Isub = here->HSMHV_isub ; dIsub_dVds = here->HSMHV_dIsub_dVdsi ; dIsub_dVgs = here->HSMHV_dIsub_dVgsi ; dIsub_dVbs = here->HSMHV_dIsub_dVbsi ; dIsub_dT = (flg_tempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; dIsub_dVdse = here->HSMHV_dIsub_dVdse ; Isubs = 0.0 ; dIsubs_dVds = 0.0 ; dIsubs_dVgs = 0.0 ; dIsubs_dVbs = 0.0 ; dIsubs_dT = 0.0 ; dIsubs_dVdse = 0.0 ; Igidl = here->HSMHV_igidl ; dIgidl_dVds = here->HSMHV_dIgidl_dVdsi ; dIgidl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgidl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; Igisl = here->HSMHV_igisl ; dIgisl_dVds = here->HSMHV_dIgisl_dVdsi ; dIgisl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgisl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igd = here->HSMHV_igd ; dIgd_dVd = here->HSMHV_dIgd_dVdsi ; dIgd_dVg = here->HSMHV_dIgd_dVgsi ; dIgd_dVb = here->HSMHV_dIgd_dVbsi ; dIgd_dT = (flg_tempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = here->HSMHV_dIgs_dVdsi ; dIgs_dVg = here->HSMHV_dIgs_dVgsi ; dIgs_dVb = here->HSMHV_dIgs_dVbsi ; dIgs_dT = (flg_tempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = here->HSMHV_dIgb_dVdsi ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (flg_tempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (flg_tempNode > 0) ? here->HSMHV_gbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (flg_tempNode > 0) ? here->HSMHV_gbsT : 0.0 ; } else { /* reverse mode */ Ids = - here->HSMHV_ids ; gds = + (here->HSMHV_dIds_dVdsi + here->HSMHV_dIds_dVgsi + here->HSMHV_dIds_dVbsi) ; gm = - here->HSMHV_dIds_dVgsi ; gmbs = - here->HSMHV_dIds_dVbsi ; gmT = (flg_tempNode > 0) ? - here->HSMHV_dIds_dTi : 0.0 ; gds_ext = + (here->HSMHV_dIds_dVdse + here->HSMHV_dIds_dVgse + here->HSMHV_dIds_dVbse) ; gm_ext = - here->HSMHV_dIds_dVgse; gmbs_ext = - here->HSMHV_dIds_dVbse; Isub = 0.0 ; dIsub_dVds = 0.0 ; dIsub_dVgs = 0.0 ; dIsub_dVbs = 0.0 ; dIsub_dT = 0.0 ; dIsub_dVdse = 0.0 ; Isubs = here->HSMHV_isub ; dIsubs_dVds = - (here->HSMHV_dIsub_dVdsi + here->HSMHV_dIsub_dVgsi + here->HSMHV_dIsub_dVbsi) ; dIsubs_dVgs = here->HSMHV_dIsub_dVgsi ; dIsubs_dVbs = here->HSMHV_dIsub_dVbsi ; dIsubs_dT = (flg_tempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; dIsubs_dVdse = - here->HSMHV_dIsub_dVdse ; /* = - (dIsub_dVdse + dIsub_dVbse + dIsub_dVgse) */ Igidl = here->HSMHV_igisl ; dIgidl_dVds = - (here->HSMHV_dIgisl_dVdsi + here->HSMHV_dIgisl_dVgsi + here->HSMHV_dIgisl_dVbsi) ; dIgidl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgidl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igisl = here->HSMHV_igidl ; dIgisl_dVds = - (here->HSMHV_dIgidl_dVdsi + here->HSMHV_dIgidl_dVgsi + here->HSMHV_dIgidl_dVbsi) ; dIgisl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgisl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; Igd = here->HSMHV_igd ; dIgd_dVd = - (here->HSMHV_dIgs_dVdsi + here->HSMHV_dIgs_dVgsi + here->HSMHV_dIgs_dVbsi) ; dIgd_dVg = here->HSMHV_dIgs_dVgsi ; dIgd_dVb = here->HSMHV_dIgs_dVbsi ; dIgd_dT = (flg_tempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = - (here->HSMHV_dIgd_dVdsi + here->HSMHV_dIgd_dVgsi + here->HSMHV_dIgd_dVbsi) ; dIgs_dVg = here->HSMHV_dIgd_dVgsi ; dIgs_dVb = here->HSMHV_dIgd_dVbsi ; dIgs_dT = (flg_tempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = - (here->HSMHV_dIgb_dVdsi + here->HSMHV_dIgb_dVgsi + here->HSMHV_dIgb_dVbsi) ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (flg_tempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (flg_tempNode > 0) ? here->HSMHV_gbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (flg_tempNode > 0) ? here->HSMHV_gbsT : 0.0 ; } /* end of reverse mode */ /* for bypass control, only nonlinear static currents are considered: */ i_dP = Ids + Isub + Igidl - Igd ; i_dP_hat = i_dP + gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp + dIsub_dVgs *delvgs + dIsub_dVds *delvds + dIsub_dVbs *delvbs + dIsub_dT *deldeltemp + dIsub_dVdse*delvdse + dIgidl_dVgs*delvgs + dIgidl_dVds*delvds + dIgidl_dVbs*delvbs + dIgidl_dT*deldeltemp -(dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp) + gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse ; i_gP = Igd + Igs + Igb ; i_gP_hat = i_gP + dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp + dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp + dIgb_dVg *delvgs + dIgb_dVd *delvds + dIgb_dVb *delvbs + dIgb_dT *deldeltemp ; i_sP =-Ids + Isubs + Igisl - Igs ; i_sP_hat = i_sP -(gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp) + dIsubs_dVgs*delvgs + dIsubs_dVds*delvds + dIsubs_dVbs*delvbs + dIsubs_dT*deldeltemp + dIsubs_dVdse*delvdse + dIgisl_dVgs*delvgs + dIgisl_dVds*delvds + dIgisl_dVbs*delvbs + dIgisl_dT*deldeltemp -(dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp) -(gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse) ; i_db = Ibd ; i_db_hat = i_db + Gbd*delvdbd + Gbdt*deldeltemp ; i_sb = Ibs ; i_sb_hat = i_sb + Gbs*delvsbs + Gbst*deldeltemp ; /* ... second part of bypass checks: */ /* 1 2 3 3 3 4 4 4 43 2 1 */ if ( ( fabs(i_dP_hat - i_dP) < ckt->CKTreltol * MAX(fabs(i_dP_hat),fabs(i_dP)) + ckt->CKTabstol ) && ( fabs(i_gP_hat - i_gP) < ckt->CKTreltol * MAX(fabs(i_gP_hat),fabs(i_gP)) + ckt->CKTabstol ) && ( fabs(i_sP_hat - i_sP) < ckt->CKTreltol * MAX(fabs(i_sP_hat),fabs(i_sP)) + ckt->CKTabstol ) && ( fabs(i_db_hat - i_db) < ckt->CKTreltol * MAX(fabs(i_db_hat),fabs(i_db)) + ckt->CKTabstol ) && ( fabs(i_sb_hat - i_sb) < ckt->CKTreltol * MAX(fabs(i_sb_hat),fabs(i_sb)) + ckt->CKTabstol ) ) { /* bypass code */ vds = *(ckt->CKTstate0 + here->HSMHVvds ); vgs = *(ckt->CKTstate0 + here->HSMHVvgs ); vbs = *(ckt->CKTstate0 + here->HSMHVvbs ); vdse = *(ckt->CKTstate0 + here->HSMHVvdse); vgse = *(ckt->CKTstate0 + here->HSMHVvgse); vbse = *(ckt->CKTstate0 + here->HSMHVvbse); vdbd = *(ckt->CKTstate0 + here->HSMHVvdbd); vsbs = *(ckt->CKTstate0 + here->HSMHVvsbs); vsubs = *(ckt->CKTstate0 + here->HSMHVvsubs); deltemp = *(ckt->CKTstate0 + here->HSMHVdeltemp); if ( flg_nqs ) { Qi_nqs = *(ckt->CKTstate0 + here->HSMHVqi_nqs); Qb_nqs = *(ckt->CKTstate0 + here->HSMHVqb_nqs); } vges = *(ckt->CKTstate0 + here->HSMHVvges); vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vbs_jct = vsbs; vbd_jct = vdbd; /* linear branch currents */ vddp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNode) - *(ckt->CKTrhsOld+here->HSMHVdNodePrime)); vggp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNode) - *(ckt->CKTrhsOld+here->HSMHVgNodePrime)); vssp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVsNode) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vbpb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVbNode)); vbpdb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVdbNode)); vbpsb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsbNode)); ByPass = 1; goto line755; } } } /* end of Bypass section */ #endif /*NOBYPASS*/ #ifdef DEBUG_HISIMHVLD_VX printf( "vbd_p = %12.5e\n" , vbd ); printf( "vbs_p = %12.5e\n" , vbs ); printf( "vgs_p = %12.5e\n" , vgs ); printf( "vds_p = %12.5e\n" , vds ); #endif /* start limiting of nonlinear branch voltages */ von = here->HSMHV_von; Check3 = 0 ; if(*(ckt->CKTstate0 + here->HSMHVvds) >= 0.0) { /* case vds>=0 for limiting */ limval = DEVfetlim(vgs, *(ckt->CKTstate0 + here->HSMHVvgs), von); if (vgs != limval) { vgs = limval ; Check3 = 1 ; } if (Check3) vds = vgs - vgd; limval = DEVlimvds(vds, *(ckt->CKTstate0 + here->HSMHVvds)); if (vds != limval) { vds = limval ; Check3 = 2 ; } vgd = vgs - vds; if (here->HSMHV_corg == 1) { limval = DEVfetlim(vges, *(ckt->CKTstate0 + here->HSMHVvges), von); if (vges != limval) { vges = limval ; Check3 = 3 ; } vged = vges - vds; } } else { /* case vds < 0 for limiting */ limval = DEVfetlim(vgd, vgdo, von); if (vgd != limval) { vgd = limval ; Check3 = 4 ; } if (Check3) vds = vgs - vgd; limval = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->HSMHVvds))); if (vds != limval) { vds = limval ; Check3 = 5 ; } vgs = vgd + vds; if (here->HSMHV_corg == 1) { limval = DEVfetlim(vged, vgedo, von); if (vged != limval) { vged = limval ; Check3 = 6 ; } vges = vged + vds; } } /* end of case vds< 0 for limiting */ if (vds >= 0.0) { /* case vds >=0 for limiting of junctions */ vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->HSMHVvbs), CONSTvt0, model->HSMHV_vcrit, &Check1); if (Check1) Check3 = 7 ; vbd = vbs - vds; if (here->HSMHV_corbnet) { vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->HSMHVvsbs), CONSTvt0, model->HSMHV_vcrit, &Check2); if (Check2) Check3 = 8 ; } } else { /* case vds < 0 for limiting of junctions */ vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->HSMHVvbd), CONSTvt0, model->HSMHV_vcrit, &Check1); if (Check1) Check3 = 9 ; vbs = vbd + vds; if (here->HSMHV_corbnet) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->HSMHVvdbd), CONSTvt0, model->HSMHV_vcrit, &Check2); if (Check2) { Check3 = 10 ; vdbs = vdbd + vdse; } } } if( flg_tempNode > 0 ){ /* Logarithmic damping of deltemp beyond LIM_TOL */ deltemp_old = *(ckt->CKTstate0 + here->HSMHVdeltemp); if (deltemp > deltemp_old + LIM_TOL) {deltemp = deltemp_old + LIM_TOL + log10((deltemp-deltemp_old)/LIM_TOL); Check3 = 11;} else if (deltemp < deltemp_old - LIM_TOL) {deltemp = deltemp_old - LIM_TOL - log10((deltemp_old-deltemp)/LIM_TOL); Check3 = 12;} } /* if (Check3) printf("HSMHV_load: Check3=%d\n",Check3) ; */ /* limiting completed */ if (Check3 == 0 ) Check = 0 ; } /* loading and limiting of nonlinear branch voltages is completed */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vbs_jct = vsbs; vbd_jct = vdbd; /* linear branch voltages */ vddp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNode) - *(ckt->CKTrhsOld+here->HSMHVdNodePrime)); vggp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNode) - *(ckt->CKTrhsOld+here->HSMHVgNodePrime)); vssp = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVsNode) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vbpdb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVdbNode)); vbpb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVbNode)); vbpsb = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsbNode)); #ifdef DEBUG_HISIMHVLD_VX printf( "vbd = %12.5e\n" , vbd ); printf( "vbs = %12.5e\n" , vbs ); printf( "vgs = %12.5e\n" , vgs ); printf( "vds = %12.5e\n" , vds ); #endif /* After loading (and limiting of branch voltages: Start model evaluation */ /* printf("HSMHV_load: vds=%e vgs=%e vbs=%e vsd=%e vgd=%e vbd=%e\n", vds,vgs,vbs,-vds,vgs-vds,vbs-vds); */ if (vds >= 0) { /* normal mode */ here->HSMHV_mode = 1; ivds = vds; ivgs = vgs; ivbs = vbs; ivdse = vdse; ivgse = vgse; ivbse = vbse; } else { /* reverse mode */ here->HSMHV_mode = -1; ivds = -vds; ivgs = vgd; ivbs = vbd; ivdse = -vdse; ivgse = vgse - vdse; ivbse = vbse - vdse; } if ( model->HSMHV_info >= 5 ) { /* mode, bias conditions ... */ printf( "--- variables given to HSMHVevaluate() ----\n" ); printf( "type = %s\n" , (model->HSMHV_type>0) ? "NMOS" : "PMOS" ); printf( "mode = %s\n" , (here->HSMHV_mode>0) ? "NORMAL" : "REVERSE" ); printf( "vbse vbs = %12.5e %12.5e\n" , vbse, ivbs ); printf( "vdse vds = %12.5e %12.5e\n" , vdse, ivds ); printf( "vgse vgs = %12.5e %12.5e\n" , vgse, ivgs ); } if ( model->HSMHV_info >= 6 ) { /* input flags */ printf( "corsrd = %s\n" , (model->HSMHV_corsrd) ? "true" : "false" ) ; printf( "coadov = %s\n" , (model->HSMHV_coadov) ? "true" : "false" ) ; printf( "coisub = %s\n" , (model->HSMHV_coisub) ? "true" : "false" ) ; printf( "coiigs = %s\n" , (model->HSMHV_coiigs) ? "true" : "false" ) ; printf( "cogidl = %s\n" , (model->HSMHV_cogidl) ? "true" : "false" ) ; printf( "coovlp = %s\n" , (model->HSMHV_coovlp) ? "true" : "false" ) ; printf( "coovlps = %s\n" , (model->HSMHV_coovlps) ? "true" : "false" ) ; printf( "coflick = %s\n", (model->HSMHV_coflick) ? "true" : "false" ) ; printf( "coisti = %s\n" , (model->HSMHV_coisti) ? "true" : "false" ) ; printf( "conqs = %s\n" , (model->HSMHV_conqs) ? "true" : "false" ) ; printf( "cothrml = %s\n", (model->HSMHV_cothrml) ? "true" : "false" ) ; printf( "coign = %s\n" , (model->HSMHV_coign) ? "true" : "false" ) ; printf( "cosym = %s\n" , (model->HSMHV_cosym) ? "true" : "false" ) ; printf( "coselfheat = %s\n" , (model->HSMHV_coselfheat) ? "true" : "false" ) ; } /* print inputs ------------AA */ #ifdef DEBUG_HISIMHVCGG /* Print convergence flag */ printf("isConv %d ", isConv ); printf("CKTtime %e ", ckt->CKTtime ); printf("Vb %1.3e ", (model->HSMHV_type>0) ? vbs:-vbs ); printf("Vd %1.3e ", (model->HSMHV_type>0) ? vds:-vds ); printf("Vg %1.3e ", (model->HSMHV_type>0) ? vgs:-vgs ); #endif /* call model evaluation */ if ( HSMHVevaluate(ivdse,ivgse,ivbse,ivds, ivgs, ivbs, vbs_jct, vbd_jct, vsubs, deltemp, here, model, ckt) == HiSIM_ERROR ) return (HiSIM_ERROR); #ifdef DEBUG_HISIMHVCGG printf("HSMHV_ids %e ", here->HSMHV_ids ) ; printf("HSMHV_cggb %e ", here->HSMHV_cggb ) ; printf("\n") ; #endif here->HSMHV_called += 1; line755: /* standard entry if HSMHVevaluate is bypassed */ /* (could be shifted a bit forward ...) */ if ( here->HSMHV_mode > 0 ) { /* forward mode */ Rd = here->HSMHV_Rd ; dRd_dVdse = here->HSMHV_dRd_dVdse ; dRd_dVgse = here->HSMHV_dRd_dVgse ; dRd_dVbse = here->HSMHV_dRd_dVbse ; dRd_dVsubs = (flg_subNode > 0) ? here->HSMHV_dRd_dVsubs : 0.0 ; /* derivative w.r.t. Vsubs */ dRd_dT = (flg_tempNode > 0) ? here->HSMHV_dRd_dTi : 0.0 ; Rs = here->HSMHV_Rs ; dRs_dVdse = here->HSMHV_dRs_dVdse ; dRs_dVgse = here->HSMHV_dRs_dVgse ; dRs_dVbse = here->HSMHV_dRs_dVbse ; dRs_dVsubs = (flg_subNode > 0) ? here->HSMHV_dRs_dVsubs : 0.0 ; /* derivative w.r.t. Vsubs */ dRs_dT = (flg_tempNode > 0) ? here->HSMHV_dRs_dTi : 0.0 ; Ids = here->HSMHV_ids ; gds = here->HSMHV_dIds_dVdsi ; gm = here->HSMHV_dIds_dVgsi ; gmbs = here->HSMHV_dIds_dVbsi ; gmT = (flg_tempNode > 0) ? here->HSMHV_dIds_dTi : 0.0 ; gmbs_ext = here->HSMHV_dIds_dVbse ; gds_ext = here->HSMHV_dIds_dVdse ; gm_ext = here->HSMHV_dIds_dVgse ; Qd = here->HSMHV_qd ; dQd_dVds = here->HSMHV_dQdi_dVdsi ; dQd_dVgs = here->HSMHV_dQdi_dVgsi ; dQd_dVbs = here->HSMHV_dQdi_dVbsi ; dQd_dT = (flg_tempNode > 0) ? here->HSMHV_dQdi_dTi : 0.0 ; Qg = here->HSMHV_qg ; dQg_dVds = here->HSMHV_dQg_dVdsi ; dQg_dVgs = here->HSMHV_dQg_dVgsi ; dQg_dVbs = here->HSMHV_dQg_dVbsi ; dQg_dT = (flg_tempNode > 0) ? here->HSMHV_dQg_dTi : 0.0 ; Qs = here->HSMHV_qs ; dQs_dVds = here->HSMHV_dQsi_dVdsi ; dQs_dVgs = here->HSMHV_dQsi_dVgsi ; dQs_dVbs = here->HSMHV_dQsi_dVbsi ; dQs_dT = (flg_tempNode > 0) ? here->HSMHV_dQsi_dTi : 0.0 ; Qb = - (here->HSMHV_qg + here->HSMHV_qd + here->HSMHV_qs) ; dQb_dVds = here->HSMHV_dQb_dVdsi ; dQb_dVgs = here->HSMHV_dQb_dVgsi ; dQb_dVbs = here->HSMHV_dQb_dVbsi ; dQb_dT = (flg_tempNode > 0) ? here->HSMHV_dQb_dTi : 0.0 ; Qfd = here->HSMHV_qdp ; dQfd_dVdse = here->HSMHV_dqdp_dVdse ; dQfd_dVgse = here->HSMHV_dqdp_dVgse ; dQfd_dVbse = here->HSMHV_dqdp_dVbse ; dQfd_dT = (flg_tempNode > 0) ? here->HSMHV_dqdp_dTi : 0.0 ; Qfs = here->HSMHV_qsp ; dQfs_dVdse = here->HSMHV_dqsp_dVdse ; dQfs_dVgse = here->HSMHV_dqsp_dVgse ; dQfs_dVbse = here->HSMHV_dqsp_dVbse ; dQfs_dT = (flg_tempNode > 0) ? here->HSMHV_dqsp_dTi : 0.0 ; Qdext = here->HSMHV_qdext ; dQdext_dVdse = here->HSMHV_dQdext_dVdse ; dQdext_dVgse = here->HSMHV_dQdext_dVgse ; dQdext_dVbse = here->HSMHV_dQdext_dVbse ; dQdext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQdext_dTi : 0.0 ; Qgext = here->HSMHV_qgext ; dQgext_dVdse = here->HSMHV_dQgext_dVdse ; dQgext_dVgse = here->HSMHV_dQgext_dVgse ; dQgext_dVbse = here->HSMHV_dQgext_dVbse ; dQgext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQgext_dTi : 0.0 ; Qsext = here->HSMHV_qsext ; dQsext_dVdse = here->HSMHV_dQsext_dVdse ; dQsext_dVgse = here->HSMHV_dQsext_dVgse ; dQsext_dVbse = here->HSMHV_dQsext_dVbse ; dQsext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQsext_dTi : 0.0 ; Qbext = - (here->HSMHV_qgext + here->HSMHV_qdext + here->HSMHV_qsext) ; dQbext_dVdse = here->HSMHV_dQbext_dVdse ; dQbext_dVgse = here->HSMHV_dQbext_dVgse ; dQbext_dVbse = here->HSMHV_dQbext_dVbse ; dQbext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQbext_dTi : 0.0 ; Isub = here->HSMHV_isub ; dIsub_dVds = here->HSMHV_dIsub_dVdsi ; dIsub_dVgs = here->HSMHV_dIsub_dVgsi ; dIsub_dVbs = here->HSMHV_dIsub_dVbsi ; dIsub_dT = (flg_tempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; dIsub_dVdse = here->HSMHV_dIsub_dVdse ; Isubs = 0.0 ; dIsubs_dVds = 0.0 ; dIsubs_dVgs = 0.0 ; dIsubs_dVbs = 0.0 ; dIsubs_dT = 0.0 ; dIsubs_dVdse = 0.0 ; Igidl = here->HSMHV_igidl ; dIgidl_dVds = here->HSMHV_dIgidl_dVdsi ; dIgidl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgidl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; Igisl = here->HSMHV_igisl ; dIgisl_dVds = here->HSMHV_dIgisl_dVdsi ; dIgisl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgisl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igd = here->HSMHV_igd ; dIgd_dVd = here->HSMHV_dIgd_dVdsi ; dIgd_dVg = here->HSMHV_dIgd_dVgsi ; dIgd_dVb = here->HSMHV_dIgd_dVbsi ; dIgd_dT = (flg_tempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = here->HSMHV_dIgs_dVdsi ; dIgs_dVg = here->HSMHV_dIgs_dVgsi ; dIgs_dVb = here->HSMHV_dIgs_dVbsi ; dIgs_dT = (flg_tempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = here->HSMHV_dIgb_dVdsi ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (flg_tempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; /*---------------------------------------------------* * Junction diode. *-----------------*/ Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (flg_tempNode > 0) ? here->HSMHV_gbdT : 0.0 ; /* Qbd = here->HSMHV_qbd ; */ Qbd = *(ckt->CKTstate0 + here->HSMHVqbd) ; Cbd = here->HSMHV_capbd ; Cbdt = (flg_tempNode > 0) ? here->HSMHV_gcbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (flg_tempNode > 0) ? here->HSMHV_gbsT : 0.0 ; /* Qbs = here->HSMHV_qbs ; */ Qbs = *(ckt->CKTstate0 + here->HSMHVqbs) ; Cbs = here->HSMHV_capbs ; Cbst = (flg_tempNode > 0) ? here->HSMHV_gcbsT : 0.0 ; if (flg_nqs) { tau = here->HSMHV_tau ; dtau_dVds = here->HSMHV_tau_dVdsi ; dtau_dVgs = here->HSMHV_tau_dVgsi ; dtau_dVbs = here->HSMHV_tau_dVbsi ; dtau_dT = here->HSMHV_tau_dTi ; taub = here->HSMHV_taub ; dtaub_dVds = here->HSMHV_taub_dVdsi ; dtaub_dVgs = here->HSMHV_taub_dVgsi ; dtaub_dVbs = here->HSMHV_taub_dVbsi ; dtaub_dT = here->HSMHV_taub_dTi ; Qdrat = here->HSMHV_Xd ; dQdrat_dVds = here->HSMHV_Xd_dVdsi ; dQdrat_dVgs = here->HSMHV_Xd_dVgsi ; dQdrat_dVbs = here->HSMHV_Xd_dVbsi ; dQdrat_dT = here->HSMHV_Xd_dTi ; Qi = here->HSMHV_Qi ; dQi_dVds = here->HSMHV_Qi_dVdsi ; dQi_dVgs = here->HSMHV_Qi_dVgsi ; dQi_dVbs = here->HSMHV_Qi_dVbsi ; dQi_dT = here->HSMHV_Qi_dTi ; Qbulk = here->HSMHV_Qbulk ; dQbulk_dVds = here->HSMHV_Qbulk_dVdsi ; dQbulk_dVgs = here->HSMHV_Qbulk_dVgsi ; dQbulk_dVbs = here->HSMHV_Qbulk_dVbsi ; dQbulk_dT = here->HSMHV_Qbulk_dTi ; } } else { /* reverse mode */ /* note: here->HSMHV_Rd and here->HSMHV_Rs are already subjected to mode handling, while the following derivatives here->HSMHV_Rd_dVdse, ... are not! */ Rd = here->HSMHV_Rd ; dRd_dVdse = here->HSMHV_dRd_dVdse ; dRd_dVgse = here->HSMHV_dRd_dVgse ; dRd_dVbse = here->HSMHV_dRd_dVbse ; dRd_dVsubs= (flg_subNode > 0) ? here->HSMHV_dRd_dVsubs : 0.0 ; /* derivative w.r.t. Vsubs */ dRd_dT = (flg_tempNode > 0) ? here->HSMHV_dRd_dTi : 0.0 ; Rs = here->HSMHV_Rs ; dRs_dVdse = here->HSMHV_dRs_dVdse ; dRs_dVgse = here->HSMHV_dRs_dVgse ; dRs_dVbse = here->HSMHV_dRs_dVbse ; dRs_dVsubs= (flg_subNode > 0) ? here->HSMHV_dRs_dVsubs : 0.0 ; /* derivative w.r.t. Vsubs */ dRs_dT = (flg_tempNode > 0) ? here->HSMHV_dRs_dTi : 0.0 ; Ids = - here->HSMHV_ids ; gds = + (here->HSMHV_dIds_dVdsi + here->HSMHV_dIds_dVgsi + here->HSMHV_dIds_dVbsi) ; gm = - here->HSMHV_dIds_dVgsi ; gmbs = - here->HSMHV_dIds_dVbsi ; gmT = (flg_tempNode > 0) ? - here->HSMHV_dIds_dTi : 0.0 ; gds_ext = + (here->HSMHV_dIds_dVdse + here->HSMHV_dIds_dVgse + here->HSMHV_dIds_dVbse) ; gm_ext = - here->HSMHV_dIds_dVgse; gmbs_ext = - here->HSMHV_dIds_dVbse; Qd = here->HSMHV_qs ; dQd_dVds = - (here->HSMHV_dQsi_dVdsi + here->HSMHV_dQsi_dVgsi + here->HSMHV_dQsi_dVbsi) ; dQd_dVgs = here->HSMHV_dQsi_dVgsi ; dQd_dVbs = here->HSMHV_dQsi_dVbsi ; dQd_dT = (flg_tempNode > 0) ? here->HSMHV_dQsi_dTi : 0.0 ; Qg = here->HSMHV_qg ; dQg_dVds = - (here->HSMHV_dQg_dVdsi + here->HSMHV_dQg_dVgsi + here->HSMHV_dQg_dVbsi) ; dQg_dVgs = here->HSMHV_dQg_dVgsi ; dQg_dVbs = here->HSMHV_dQg_dVbsi ; dQg_dT = (flg_tempNode > 0) ? here->HSMHV_dQg_dTi : 0.0 ; Qs = here->HSMHV_qd ; dQs_dVds = - (here->HSMHV_dQdi_dVdsi + here->HSMHV_dQdi_dVgsi + here->HSMHV_dQdi_dVbsi) ; dQs_dVgs = here->HSMHV_dQdi_dVgsi ; dQs_dVbs = here->HSMHV_dQdi_dVbsi ; dQs_dT = (flg_tempNode > 0) ? here->HSMHV_dQdi_dTi : 0.0 ; Qb = - (here->HSMHV_qg + here->HSMHV_qd + here->HSMHV_qs) ; dQb_dVds = - (here->HSMHV_dQb_dVdsi + here->HSMHV_dQb_dVgsi + here->HSMHV_dQb_dVbsi) ; dQb_dVgs = here->HSMHV_dQb_dVgsi ; dQb_dVbs = here->HSMHV_dQb_dVbsi ; dQb_dT = (flg_tempNode > 0) ? here->HSMHV_dQb_dTi : 0.0 ; Qfd = here->HSMHV_qsp ; dQfd_dVdse = - (here->HSMHV_dqsp_dVdse + here->HSMHV_dqsp_dVgse + here->HSMHV_dqsp_dVbse) ; dQfd_dVgse = here->HSMHV_dqsp_dVgse ; dQfd_dVbse = here->HSMHV_dqsp_dVbse ; dQfd_dT = (flg_tempNode > 0) ? here->HSMHV_dqsp_dTi : 0.0 ; Qfs = here->HSMHV_qdp ; dQfs_dVdse = - (here->HSMHV_dqdp_dVdse + here->HSMHV_dqdp_dVgse + here->HSMHV_dqdp_dVbse) ; dQfs_dVgse = here->HSMHV_dqdp_dVgse ; dQfs_dVbse = here->HSMHV_dqdp_dVbse ; dQfs_dT = (flg_tempNode > 0) ? here->HSMHV_dqdp_dTi : 0.0 ; Qdext = here->HSMHV_qsext ; dQdext_dVdse = - (here->HSMHV_dQsext_dVdse + here->HSMHV_dQsext_dVgse + here->HSMHV_dQsext_dVbse); dQdext_dVgse = here->HSMHV_dQsext_dVgse ; dQdext_dVbse = here->HSMHV_dQsext_dVbse ; dQdext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQsext_dTi : 0.0 ; Qgext = here->HSMHV_qgext ; dQgext_dVdse = - (here->HSMHV_dQgext_dVdse + here->HSMHV_dQgext_dVgse + here->HSMHV_dQgext_dVbse); dQgext_dVgse = here->HSMHV_dQgext_dVgse ; dQgext_dVbse = here->HSMHV_dQgext_dVbse ; dQgext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQgext_dTi : 0.0 ; Qsext = here->HSMHV_qdext ; dQsext_dVdse = - (here->HSMHV_dQdext_dVdse + here->HSMHV_dQdext_dVgse + here->HSMHV_dQdext_dVbse); dQsext_dVgse = here->HSMHV_dQdext_dVgse ; dQsext_dVbse = here->HSMHV_dQdext_dVbse ; dQsext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQdext_dTi : 0.0 ; Qbext = - (here->HSMHV_qgext + here->HSMHV_qdext + here->HSMHV_qsext) ; dQbext_dVdse = - (here->HSMHV_dQbext_dVdse + here->HSMHV_dQbext_dVgse + here->HSMHV_dQbext_dVbse); dQbext_dVgse = here->HSMHV_dQbext_dVgse ; dQbext_dVbse = here->HSMHV_dQbext_dVbse ; dQbext_dT = (here->HSMHV_coselfheat > 0) ? here->HSMHV_dQbext_dTi : 0.0 ; Isub = 0.0 ; dIsub_dVds = 0.0 ; dIsub_dVgs = 0.0 ; dIsub_dVbs = 0.0 ; dIsub_dT = 0.0 ; dIsub_dVdse = 0.0 ; Isubs = here->HSMHV_isub ; dIsubs_dVds = - (here->HSMHV_dIsub_dVdsi + here->HSMHV_dIsub_dVgsi + here->HSMHV_dIsub_dVbsi) ; dIsubs_dVgs = here->HSMHV_dIsub_dVgsi ; dIsubs_dVbs = here->HSMHV_dIsub_dVbsi ; dIsubs_dT = (flg_tempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; dIsubs_dVdse = - here->HSMHV_dIsub_dVdse ; /* = - (dIsub_dVdse + dIsub_dVbse + dIsub_dVgse) */ Igidl = here->HSMHV_igisl ; dIgidl_dVds = - (here->HSMHV_dIgisl_dVdsi + here->HSMHV_dIgisl_dVgsi + here->HSMHV_dIgisl_dVbsi) ; dIgidl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgidl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igisl = here->HSMHV_igidl ; dIgisl_dVds = - (here->HSMHV_dIgidl_dVdsi + here->HSMHV_dIgidl_dVgsi + here->HSMHV_dIgidl_dVbsi) ; dIgisl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgisl_dT = (flg_tempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; /* note: here->HSMHV_igd and here->HSMHV_igs are already subjected to mode handling, while the following derivatives here->HSMHV_dIgd_dVdsi, ... are not! */ Igd = here->HSMHV_igd ; dIgd_dVd = - (here->HSMHV_dIgs_dVdsi + here->HSMHV_dIgs_dVgsi + here->HSMHV_dIgs_dVbsi) ; dIgd_dVg = here->HSMHV_dIgs_dVgsi ; dIgd_dVb = here->HSMHV_dIgs_dVbsi ; dIgd_dT = (flg_tempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = - (here->HSMHV_dIgd_dVdsi + here->HSMHV_dIgd_dVgsi + here->HSMHV_dIgd_dVbsi) ; dIgs_dVg = here->HSMHV_dIgd_dVgsi ; dIgs_dVb = here->HSMHV_dIgd_dVbsi ; dIgs_dT = (flg_tempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = - (here->HSMHV_dIgb_dVdsi + here->HSMHV_dIgb_dVgsi + here->HSMHV_dIgb_dVbsi) ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (flg_tempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; /*---------------------------------------------------* * Junction diode. *-----------------*/ Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (flg_tempNode > 0) ? here->HSMHV_gbdT : 0.0 ; /* Qbd = here->HSMHV_qbd ; */ Qbd = *(ckt->CKTstate0 + here->HSMHVqbd) ; Cbd = here->HSMHV_capbd ; Cbdt = (flg_tempNode > 0) ? here->HSMHV_gcbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (flg_tempNode > 0) ? here->HSMHV_gbsT : 0.0 ; /* Qbs = here->HSMHV_qbs ; */ Qbs = *(ckt->CKTstate0 + here->HSMHVqbs) ; Cbs = here->HSMHV_capbs ; Cbst = (flg_tempNode > 0) ? here->HSMHV_gcbsT : 0.0 ; if (flg_nqs) { tau = here->HSMHV_tau ; dtau_dVds = -(here->HSMHV_tau_dVdsi + here->HSMHV_tau_dVgsi + here->HSMHV_tau_dVbsi) ; dtau_dVgs = here->HSMHV_tau_dVgsi ; dtau_dVbs = here->HSMHV_tau_dVbsi ; dtau_dT = here->HSMHV_tau_dTi ; taub = here->HSMHV_taub ; dtaub_dVds = -(here->HSMHV_taub_dVdsi + here->HSMHV_taub_dVgsi + here->HSMHV_taub_dVbsi); dtaub_dVgs = here->HSMHV_taub_dVgsi ; dtaub_dVbs = here->HSMHV_taub_dVbsi ; dtaub_dT = here->HSMHV_taub_dTi ; Qdrat = 1.0 - here->HSMHV_Xd ; dQdrat_dVds = +(here->HSMHV_Xd_dVdsi + here->HSMHV_Xd_dVgsi + here->HSMHV_Xd_dVbsi) ; dQdrat_dVgs = - here->HSMHV_Xd_dVgsi ; dQdrat_dVbs = - here->HSMHV_Xd_dVbsi ; dQdrat_dT = - here->HSMHV_Xd_dTi ; Qi = here->HSMHV_Qi ; dQi_dVds = -(here->HSMHV_Qi_dVdsi + here->HSMHV_Qi_dVgsi + here->HSMHV_Qi_dVbsi) ; dQi_dVgs = here->HSMHV_Qi_dVgsi ; dQi_dVbs = here->HSMHV_Qi_dVbsi ; dQi_dT = here->HSMHV_Qi_dTi ; Qbulk = here->HSMHV_Qbulk ; dQbulk_dVds = -(here->HSMHV_Qbulk_dVdsi + here->HSMHV_Qbulk_dVgsi + here->HSMHV_Qbulk_dVbsi) ; dQbulk_dVgs = here->HSMHV_Qbulk_dVgsi ; dQbulk_dVbs = here->HSMHV_Qbulk_dVbsi ; dQbulk_dT = here->HSMHV_Qbulk_dTi ; } } /* end of reverse mode */ if (flg_tempNode > 0) { if (pParam->HSMHV_rth > C_RTH_MIN) { Gth = 1.0/pParam->HSMHV_rth ; } else { Gth = 1.0/C_RTH_MIN ; } Ith = Gth * deltemp ; dIth_dT = Gth ; Cth = pParam->HSMHV_cth ; Qth = Cth * deltemp ; /* P = Ids * (Vdsi + param * ( Vdse - Vdsi)) */ /* = Ids * Veffpower */ if ( vds * (vdse - vds) >= 0.0) { if ( pParam->HSMHV_powrat == 1.0 ) { Veffpower = vdse ; dVeffpower_dVds = 0.0 ; dVeffpower_dVdse = 1.0 ; } else { Veffpower = vds + here->HSMHV_powratio * (vdse - vds) ; dVeffpower_dVds = (1.0 - here->HSMHV_powratio) ; dVeffpower_dVdse = here->HSMHV_powratio ; } } else { Veffpower = vds ; dVeffpower_dVds = 1.0 ; dVeffpower_dVdse = 0.0 ; } P = Ids * Veffpower ; dP_dVds = gds * Veffpower + Ids * dVeffpower_dVds; dP_dVgs = gm * Veffpower ; dP_dVbs = gmbs * Veffpower ; dP_dT = gmT * Veffpower ; dP_dVdse = gds_ext * Veffpower + Ids * dVeffpower_dVdse ; dP_dVgse = gm_ext * Veffpower ; dP_dVbse = gmbs_ext * Veffpower ; /* Clamping the maximum rise tempaerarure (SHEMAX) */ T1 = model->HSMHV_shemax * Gth ; Fn_SU( T2 , P , T1 , SHE_MAX_dlt * Gth , T0 ) ; P = T2 ; dP_dVds = T0 * dP_dVds ; dP_dVgs = T0 * dP_dVgs ; dP_dVbs = T0 * dP_dVbs ; dP_dT = T0 * dP_dT ; dP_dVdse = T0 * dP_dVdse ; dP_dVgse = T0 * dP_dVgse ; dP_dVbse = T0 * dP_dVbse ; } else { Gth = 0.0 ; Ith = 0.0 ; dIth_dT = 0.0 ; Cth = 0.0 ; Qth = 0.0 ; P = 0.0 ; dP_dVds = 0.0 ; dP_dVgs = 0.0 ; dP_dVbs = 0.0 ; dP_dT = 0.0 ; dP_dVdse = 0.0 ; dP_dVgse = 0.0 ; dP_dVbse = 0.0 ; } /* in case of nqs: construct static contributions to the nqs equations (Iqi_nqs, Iqb_nqs) */ /* and nqs charge contributions to inner drain, gate and source node (Qd_nqs, Qg_nqs, Qs_nqs) */ if (flg_nqs) { /* .. tau, taub must be > 0 */ if (tau < 1.0e-18) { tau = 1.e-18 ; dtau_dVds = dtau_dVgs = dtau_dVbs = dtau_dT = 0.0 ; } if (taub < 1.0e-18) { taub = 1.0e-18 ; dtaub_dVds = dtaub_dVgs = dtaub_dVbs = dtaub_dT = 0.0 ; } Iqi_nqs = (Qi_nqs - Qi) / tau ; dIqi_nqs_dVds = - (dQi_dVds + Iqi_nqs * dtau_dVds) / tau ; dIqi_nqs_dVgs = - (dQi_dVgs + Iqi_nqs * dtau_dVgs) / tau ; dIqi_nqs_dVbs = - (dQi_dVbs + Iqi_nqs * dtau_dVbs) / tau ; dIqi_nqs_dT = - (dQi_dT + Iqi_nqs * dtau_dT ) / tau ; dIqi_nqs_dQi_nqs = 1.0 / tau ; Iqb_nqs = (Qb_nqs - Qbulk) / taub ; dIqb_nqs_dVds = - (dQbulk_dVds + Iqb_nqs * dtaub_dVds) / taub ; dIqb_nqs_dVgs = - (dQbulk_dVgs + Iqb_nqs * dtaub_dVgs) / taub ; dIqb_nqs_dVbs = - (dQbulk_dVbs + Iqb_nqs * dtaub_dVbs) / taub ; dIqb_nqs_dT = - (dQbulk_dT + Iqb_nqs * dtaub_dT ) / taub ; dIqb_nqs_dQb_nqs = 1.0 / taub ; Qd_nqs = Qi_nqs * Qdrat ; dQd_nqs_dVds = Qi_nqs * dQdrat_dVds ; dQd_nqs_dVgs = Qi_nqs * dQdrat_dVgs ; dQd_nqs_dVbs = Qi_nqs * dQdrat_dVbs ; dQd_nqs_dT = Qi_nqs * dQdrat_dT ; dQd_nqs_dQi_nqs = Qdrat ; Qg_nqs = - Qi_nqs - Qb_nqs ; dQg_nqs_dQi_nqs = - 1.0 ; dQg_nqs_dQb_nqs = - 1.0 ; Qs_nqs = Qi_nqs * (1.0 - Qdrat) ; dQs_nqs_dVds = - Qi_nqs * dQdrat_dVds ; dQs_nqs_dVgs = - Qi_nqs * dQdrat_dVgs ; dQs_nqs_dVbs = - Qi_nqs * dQdrat_dVbs ; dQs_nqs_dT = - Qi_nqs * dQdrat_dT ; dQs_nqs_dQi_nqs = 1.0 - Qdrat ; } else { Iqi_nqs = Iqb_nqs = Qd_nqs = Qg_nqs = Qs_nqs = 0.0 ; } dIgd_dVs = - (dIgd_dVd + dIgd_dVg + dIgd_dVb) ; dIgs_dVs = - (dIgs_dVd + dIgs_dVg + dIgs_dVb) ; dIgb_dVs = - (dIgb_dVd + dIgb_dVg + dIgb_dVb) ; /*---------------------------------------------------* * External Resistances *-----------------*/ if(model->HSMHV_corsrd == 1 || model->HSMHV_corsrd == 3 ) { if(Rd > 0){ GD = 1.0/Rd; GD_dVgs = - dRd_dVgse /Rd/Rd; GD_dVds = - dRd_dVdse /Rd/Rd; GD_dVbs = - dRd_dVbse /Rd/Rd; GD_dVsubs = - dRd_dVsubs /Rd/Rd; GD_dT = - dRd_dT /Rd/Rd; }else{ GD=0.0; GD_dVgs=0.0; GD_dVds=0.0; GD_dVbs=0.0; GD_dVsubs=0.0; GD_dT =0.0; } if(Rs > 0){ GS = 1.0/Rs; GS_dVgs = - dRs_dVgse /Rs/Rs; GS_dVds = - dRs_dVdse /Rs/Rs; GS_dVbs = - dRs_dVbse /Rs/Rs; GS_dVsubs = - dRs_dVsubs /Rs/Rs; GS_dT = - dRs_dT /Rs/Rs; }else{ GS=0.0; GS_dVgs=0.0; GS_dVds=0.0; GS_dVbs=0.0; GS_dVsubs=0.0; GS_dT =0.0; } } Iddp = GD * vddp; dIddp_dVddp = GD; dIddp_dVdse = GD_dVds * vddp; dIddp_dVgse = GD_dVgs * vddp; dIddp_dVbse = GD_dVbs * vddp; dIddp_dVsubs= GD_dVsubs * vddp; dIddp_dT = GD_dT * vddp; Issp = GS * vssp; dIssp_dVssp = GS; dIssp_dVdse = GS_dVds * vssp ; dIssp_dVgse = GS_dVgs * vssp; dIssp_dVbse = GS_dVbs * vssp; dIssp_dVsubs= GS_dVsubs * vssp; dIssp_dT = GS_dT * vssp; if( model->HSMHV_corg > 0.0 ){ GG = here->HSMHV_grg ; }else{ GG = 0.0 ; } Iggp = GG * vggp; dIggp_dVggp = GG; if(model->HSMHV_corbnet == 1 && here->HSMHV_rbpb > 0.0 ){ GRBPB = here->HSMHV_grbpb ; }else{ GRBPB = 0.0 ; } Ibpb = GRBPB * vbpb; dIbpb_dVbpb = GRBPB; if(model->HSMHV_corbnet == 1 && here->HSMHV_rbpd > 0.0 ){ GRBPD = here->HSMHV_grbpd ; }else{ GRBPD = 0.0 ; } Ibpdb = GRBPD * vbpdb; dIbpdb_dVbpdb = GRBPD; if(model->HSMHV_corbnet == 1 && here->HSMHV_rbps > 0.0 ){ GRBPS = here->HSMHV_grbps ; }else{ GRBPS = 0.0 ; } Ibpsb = GRBPS * vbpsb; dIbpsb_dVbpsb = GRBPS; /* printf("HSMHV_load: ByPass=%d\n",ByPass) ; */ if (!ByPass) { /* no convergence check in case of Bypass */ /* * check convergence */ isConv = 1; if ( (here->HSMHV_off == 0) || !(ckt->CKTmode & MODEINITFIX) ) { if (Check == 1) { ckt->CKTnoncon++; isConv = 0; #ifndef NEWCONV } else { /* convergence check for branch currents is done in function HSMHVconvTest */ #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->HSMHVvbs) = vbs; *(ckt->CKTstate0 + here->HSMHVvbd) = vbd; *(ckt->CKTstate0 + here->HSMHVvgs) = vgs; *(ckt->CKTstate0 + here->HSMHVvds) = vds; *(ckt->CKTstate0 + here->HSMHVvsbs) = vsbs; *(ckt->CKTstate0 + here->HSMHVvdbs) = vdbs; *(ckt->CKTstate0 + here->HSMHVvdbd) = vdbd; *(ckt->CKTstate0 + here->HSMHVvges) = vges; *(ckt->CKTstate0 + here->HSMHVvsubs) = vsubs; *(ckt->CKTstate0 + here->HSMHVdeltemp) = deltemp; *(ckt->CKTstate0 + here->HSMHVvdse) = vdse; *(ckt->CKTstate0 + here->HSMHVvgse) = vgse; *(ckt->CKTstate0 + here->HSMHVvbse) = vbse; if ( flg_nqs ) { *(ckt->CKTstate0 + here->HSMHVqi_nqs) = Qi_nqs; *(ckt->CKTstate0 + here->HSMHVqb_nqs) = Qb_nqs; } /* printf("HSMHV_load: (into state0) vds.. = %e %e %e %e %e %e\n", vds,vgs,vbs,vdse,vgse,vbse); */ if ((ckt->CKTmode & MODEDC) && !(ckt->CKTmode & MODEINITFIX) && !(ckt->CKTmode & MODEINITJCT)) showPhysVal = 1; if (model->HSMHV_show_Given && showPhysVal && isConv) { static int isFirst = 1; if (vds != vds_pre) ShowPhysVals(here, model, isFirst, vds_pre, vgs, vbs, vgd, vbd, vgb); else ShowPhysVals(here, model, isFirst, vds, vgs, vbs, vgd, vbd, vgb); if (isFirst) isFirst = 0; } } #include "hsmhvld_info_eval.h" /* For standard Newton method (SPICE_rhs == 0): */ /* if currents (and charges) are limited -> extrapolate onto x-values */ /* in SPICE mode (SPICE_rhs == 1): */ /* extrapolate onto x = 0 (-> rhs_eq) */ /* */ /* note that */ /* the charge extrapolation is replaced by extrapolation of displacement */ /* currents, see below */ /* ...... just for easier handling: collect node voltages in vector x: */ if (!SPICE_rhs) { x[dNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVdNode)); x[dNodePrime] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVdNodePrime)); x[gNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVgNode)); x[gNodePrime] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVgNodePrime)); x[sNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVsNode)); x[sNodePrime] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); x[bNodePrime] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVbNodePrime)); x[bNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVbNode)); x[dbNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVdbNode)); x[sbNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVsbNode)); if (flg_subNode > 0) x[subNode] = model->HSMHV_type *( *(ckt->CKTrhsOld+here->HSMHVsubNode)); /* previous vsub */ else x[subNode] = 0.0; if (flg_tempNode > 0) x[tempNode] = *(ckt->CKTrhsOld+here->HSMHVtempNode); else x[tempNode] = 0.0; if ( flg_nqs ) { x[qiNode] = *(ckt->CKTrhsOld+here->HSMHVqiNode); x[qbNode] = *(ckt->CKTrhsOld+here->HSMHVqbNode); } else { x[qiNode] = 0.0; x[qbNode] = 0.0; } } delvgs = (x[gNodePrime] - x[sNodePrime]) - vgs; delvds = (x[dNodePrime] - x[sNodePrime]) - vds; delvbs = (x[bNodePrime] - x[sNodePrime]) - vbs; deldeltemp = x[tempNode] - deltemp; if (delvgs || delvds || delvbs ||deldeltemp) { Ids += gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp ; Isub += dIsub_dVgs *delvgs + dIsub_dVds *delvds + dIsub_dVbs *delvbs + dIsub_dT *deldeltemp ; Isubs+= dIsubs_dVgs*delvgs + dIsubs_dVds*delvds + dIsubs_dVbs*delvbs + dIsubs_dT*deldeltemp ; Igd += dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp ; Igs += dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp ; Igb += dIgb_dVg *delvgs + dIgb_dVd *delvds + dIgb_dVb *delvbs + dIgb_dT *deldeltemp ; Igidl+= dIgidl_dVgs*delvgs + dIgidl_dVds*delvds + dIgidl_dVbs*delvbs + dIgidl_dT*deldeltemp ; Igisl+= dIgisl_dVgs*delvgs + dIgisl_dVds*delvds + dIgisl_dVbs*delvbs + dIgisl_dT*deldeltemp ; P += dP_dVgs *delvgs + dP_dVds *delvds + dP_dVbs *delvbs + dP_dT *deldeltemp ; if (flg_nqs) { Iqi_nqs += dIqi_nqs_dVgs*delvgs + dIqi_nqs_dVds*delvds + dIqi_nqs_dVbs*delvbs + dIqi_nqs_dT*deldeltemp ; Iqb_nqs += dIqb_nqs_dVgs*delvgs + dIqb_nqs_dVds*delvds + dIqb_nqs_dVbs*delvbs + dIqb_nqs_dT*deldeltemp ; } } delvgse = (x[gNodePrime] - x[sNode]) - vgse; delvdse = (x[dNode] - x[sNode]) - vdse; delvbse = (x[bNodePrime] - x[sNode]) - vbse; if (flg_subNode > 0) delvsubs = (x[subNode] - x[sNode]) - vsubs; /* substrate bias change */ if (delvgse || delvdse || delvbse ) { Ids += gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse ; Isub += dIsub_dVdse*delvdse ; Isubs+= dIsubs_dVdse*delvdse ; P += dP_dVgse *delvgse + dP_dVdse *delvdse + dP_dVbse *delvbse ; Iddp += dIddp_dVgse*delvgse + dIddp_dVdse*delvdse + dIddp_dVbse*delvbse ; Issp += dIssp_dVgse*delvgse + dIssp_dVdse*delvdse + dIssp_dVbse*delvbse ; } if (delvsubs) { Iddp += dIddp_dVsubs*delvsubs ; Issp += dIssp_dVsubs*delvsubs ; } if (deldeltemp) { Iddp += dIddp_dT*deldeltemp ; Issp += dIssp_dT*deldeltemp ; Ith += dIth_dT *deldeltemp ; } delvdbd = (x[dbNode] - x[dNode]) - vbd_jct ; if (delvdbd || deldeltemp) { Ibd += Gbd*delvdbd + Gbdt*deldeltemp ; } delvsbs = (x[sbNode] - x[sNode]) - vbs_jct ; if (delvsbs || deldeltemp) { Ibs += Gbs*delvsbs + Gbst*deldeltemp ; } delvddp = (x[dNode] - x[dNodePrime]) - vddp ; if (delvddp) { Iddp += dIddp_dVddp * delvddp ; } delvssp = (x[sNode] - x[sNodePrime]) - vssp ; if (delvssp) { Issp += dIssp_dVssp * delvssp ; } delvggp = (x[gNode] - x[gNodePrime]) - vggp ; if (delvggp) { Iggp += dIggp_dVggp * delvggp ; } delvbpb = (x[bNodePrime] - x[bNode]) - vbpb ; if (delvbpb) { Ibpb += dIbpb_dVbpb * delvbpb ; } delvbpdb = (x[bNodePrime] - x[dbNode]) - vbpdb ; if (delvbpdb) { Ibpdb += dIbpdb_dVbpdb * delvbpdb ; } delvbpsb = (x[bNodePrime] - x[sbNode]) - vbpsb ; if (delvbpsb) { Ibpsb += dIbpsb_dVbpsb * delvbpsb ; } if (flg_nqs) { delQi_nqs = x[qiNode] - Qi_nqs ; if (delQi_nqs) { Iqi_nqs += dIqi_nqs_dQi_nqs * delQi_nqs ; } delQb_nqs = x[qbNode] - Qb_nqs ; if (delQb_nqs) { Iqb_nqs += dIqb_nqs_dQb_nqs * delQb_nqs ; } } /* Assemble currents into nodes */ /* ... static part */ /* drain node */ i_d = Iddp - Ibd ; /* intrinsic drain node */ i_dP = -Iddp + Ids + Isub + Igidl - Igd ; /* gate node */ i_g = Iggp ; /* intrinsic gate node */ i_gP = - Iggp + Igd + Igs + Igb ; /* source node */ i_s = Issp - Ibs ; /* intrinsic source node */ i_sP = - Issp - Ids + Isubs + Igisl - Igs ; /* intrinsic bulk node */ i_bP = - Isub - Isubs - Igidl -Igb - Igisl + Ibpdb + Ibpb + Ibpsb ; /* base node */ i_b = - Ibpb ; /* drain bulk node */ i_db = Ibd - Ibpdb ; /* source bulk node */ i_sb = Ibs - Ibpsb ; /* temp node */ if (flg_tempNode > 0){ i_t = Ith - P ; } else { i_t = 0.0; } /* nqs equations */ i_qi = Iqi_nqs ; i_qb = Iqb_nqs ; for (i = 0; i < XDIM; i++) { ydc_d[i] = ydc_dP[i] = ydc_g[i] = ydc_gP[i] = ydc_s[i] = ydc_sP[i] = ydc_bP[i] = ydc_b[i] = ydc_db[i] = ydc_sb[i] = ydc_t[i] = 0.0; } if (flg_nqs) { for (i = 0; i < XDIM; i++) { ydc_qi[i] = ydc_qb[i] = 0.0; } } /* drain node */ ydc_d[dNode] = dIddp_dVddp + dIddp_dVdse + Gbd ; ydc_d[dNodePrime] = -dIddp_dVddp ; /* ydc_d[gNode] = 0.0 ; */ ydc_d[gNodePrime] = dIddp_dVgse ; ydc_d[sNode] = - ( dIddp_dVdse + dIddp_dVgse + dIddp_dVbse ) - dIddp_dVsubs ; /* ydc_d[sNodePrime] = 0.0 ; */ ydc_d[bNodePrime] = dIddp_dVbse ; /* ydc_d[bNode] = 0.0 ; */ ydc_d[dbNode] = - Gbd ; /* ydc_d[sbNode] = 0.0 ; */ ydc_d[subNode] = dIddp_dVsubs ; ydc_d[tempNode] = dIddp_dT - Gbdt ; /* intrinsic drain node */ ydc_dP[dNode] = - (dIddp_dVddp + dIddp_dVdse) + gds_ext + dIsub_dVdse ; ydc_dP[dNodePrime] = dIddp_dVddp + gds + dIsub_dVds + dIgidl_dVds - dIgd_dVd ; /* ydc_dP[gNode] = 0.0; */ ydc_dP[gNodePrime] = -dIddp_dVgse + gm_ext + gm + dIsub_dVgs + dIgidl_dVgs - dIgd_dVg ; ydc_dP[sNode] = dIddp_dVdse + dIddp_dVgse + dIddp_dVbse + dIddp_dVsubs + (-gds_ext -gm_ext -gmbs_ext) - dIsub_dVdse; ydc_dP[sNodePrime] = -( gds + dIsub_dVds + dIgidl_dVds ) - ( gm + dIsub_dVgs + dIgidl_dVgs ) - ( gmbs + dIsub_dVbs + dIgidl_dVbs ) - dIgd_dVs ; ydc_dP[bNodePrime] = - dIddp_dVbse + gmbs_ext + gmbs + dIsub_dVbs + dIgidl_dVbs - dIgd_dVb; /* ydc_dP[bNode] = 0.0; */ /* ydc_dP[dbNode] = 0.0 ; */ /* ydc_dP[sbNode] = 0.0 ; */ ydc_dP[subNode] = - dIddp_dVsubs ; ydc_dP[tempNode] = - dIddp_dT + gmT + dIsub_dT + dIgidl_dT - dIgd_dT ; /* gate node */ /* ydc_g[dNode] = 0.0 ; */ /* ydc_g[dNodePrime] = 0.0 ; */ ydc_g[gNode] = dIggp_dVggp ; ydc_g[gNodePrime] = - dIggp_dVggp ; /* ydc_g[sNode] = 0.0 ; */ /* ydc_g[sNodePrime] = 0.0 ; */ /* ydc_g[bNodePrime] = 0.0 ; */ /* ydc_g[bNode] = 0.0 ; */ /* ydc_g[dbNode] = 0.0 ; */ /* ydc_g[sbNode] = 0.0 ; */ /* ydc_g[tempNode] = 0.0 ; */ /* intrinsic gate node */ /* ydc_gP[dNode] = 0.0 ; */ ydc_gP[dNodePrime] = dIgd_dVd + dIgs_dVd + dIgb_dVd ; ydc_gP[gNode] = - dIggp_dVggp ; ydc_gP[gNodePrime] = dIggp_dVggp + dIgd_dVg + dIgs_dVg + dIgb_dVg ; /* ydc_gP[sNode] = 0.0 ; */ ydc_gP[sNodePrime] = dIgd_dVs + dIgs_dVs + dIgb_dVs ; ydc_gP[bNodePrime] = dIgd_dVb + dIgs_dVb + dIgb_dVb ; /* ydc_gP[bNode] = 0.0 ; */ /* ydc_gP[dbNode] = 0.0 ; */ /* ydc_gP[sbNode] = 0.0 ; */ ydc_gP[tempNode] = dIgd_dT + dIgs_dT + dIgb_dT ; /* source node */ ydc_s[dNode] = dIssp_dVdse; /* ydc_s[dNodePrime] = 0.0 */ /* ydc_s[gNode] = 0.0 */ ydc_s[gNodePrime] = dIssp_dVgse; ydc_s[sNode] = dIssp_dVssp - ( dIssp_dVgse + dIssp_dVdse + dIssp_dVbse ) - dIssp_dVsubs + Gbs; ydc_s[sNodePrime] = - dIssp_dVssp; ydc_s[bNodePrime] = dIssp_dVbse ; /* ydc_s[bNode] = 0.0 */ /* ydc_s[dbNode] = 0.0 */ ydc_s[sbNode] = - Gbs ; ydc_s[subNode] = dIssp_dVsubs; ydc_s[tempNode] = dIssp_dT - Gbst; /* intrinsic source node */ ydc_sP[dNode] = - dIssp_dVdse -gds_ext + dIsubs_dVdse ; ydc_sP[dNodePrime] = - gds + dIsubs_dVds + dIgisl_dVds - dIgs_dVd ; /* ydc_sP[gNode] = 0.0 ; */ ydc_sP[gNodePrime] = -dIssp_dVgse -gm_ext - gm + dIsubs_dVgs + dIgisl_dVgs - dIgs_dVg ; ydc_sP[sNode] = - dIssp_dVssp - ( - dIssp_dVdse - dIssp_dVgse - dIssp_dVbse ) + dIssp_dVsubs +(gds_ext + gm_ext + gmbs_ext) - dIsubs_dVdse; ydc_sP[sNodePrime] = dIssp_dVssp - ( - gds + dIsubs_dVds + dIgisl_dVds ) - ( - gm + dIsubs_dVgs + dIgisl_dVgs ) - ( - gmbs + dIsubs_dVbs + dIgisl_dVbs ) - dIgs_dVs ; ydc_sP[bNodePrime] = -dIssp_dVbse -gmbs_ext - gmbs + dIsubs_dVbs + dIgisl_dVbs - dIgs_dVb ; /* ydc_sP[bNode] = 0.0 ; */ /* ydc_sP[dbNode] = 0.0 ; */ /* ydc_sP[sbNode] = 0.0 ; */ ydc_sP[subNode] = - dIssp_dVsubs; ydc_sP[tempNode] = -dIssp_dT - gmT + dIsubs_dT + dIgisl_dT - dIgs_dT; /* intrinsic bulk node */ ydc_bP[dNode] = - dIsub_dVdse - dIsubs_dVdse ; ydc_bP[dNodePrime] = - dIsub_dVds - dIsubs_dVds - dIgidl_dVds - dIgb_dVd - dIgisl_dVds ; /* ydc_bP[gNode] = 0.0 ; */ ydc_bP[gNodePrime] = - dIsub_dVgs - dIsubs_dVgs - dIgidl_dVgs - dIgb_dVg - dIgisl_dVgs ; ydc_bP[sNode] = dIsub_dVdse + dIsubs_dVdse; ydc_bP[sNodePrime] = - ( - dIsub_dVds - dIsubs_dVds - dIgidl_dVds - dIgisl_dVds ) - ( - dIsub_dVgs - dIsubs_dVgs - dIgidl_dVgs - dIgisl_dVgs ) - ( - dIsub_dVbs - dIsubs_dVbs - dIgidl_dVbs - dIgisl_dVbs ) - dIgb_dVs ; ydc_bP[bNodePrime] = - dIsub_dVbs - dIsubs_dVbs - dIgidl_dVbs - dIgb_dVb - dIgisl_dVbs + dIbpdb_dVbpdb + dIbpb_dVbpb + dIbpsb_dVbpsb ; ydc_bP[bNode] = - dIbpb_dVbpb ; ydc_bP[dbNode] = - dIbpdb_dVbpdb ; ydc_bP[sbNode] = - dIbpsb_dVbpsb ; ydc_bP[tempNode] = - dIsub_dT - dIsubs_dT - dIgidl_dT - dIgb_dT - dIgisl_dT ; /* bulk node */ /* ydc_b[dNode] = 0.0 ; */ /* ydc_b[dNodePrime] = 0.0 ; */ /* ydc_b[gNode] = 0.0 ; */ /* ydc_b[gNodePrime] = 0.0 ; */ /* ydc_b[sNode] = 0.0 ; */ /* ydc_b[sNodePrime] = 0.0 ; */ ydc_b[bNodePrime] = - dIbpb_dVbpb ; ydc_b[bNode] = dIbpb_dVbpb ; /* ydc_b[dbNode] = 0.0 ; */ /* ydc_b[sbNode] = 0.0 ; */ /* ydc_b[tempNode] = 0.0 ; */ /* drain bulk node */ ydc_db[dNode] = - Gbd ; /* ydc_db[dNodePrime] = 0.0 ; */ /* ydc_db[gNode] = 0.0 ; */ /* ydc_db[gNodePrime] = 0.0 ; */ /* ydc_db[sNode] = 0.0 ; */ /* ydc_db[sNodePrime] = 0.0 ; */ ydc_db[bNodePrime] = - dIbpdb_dVbpdb ; /* ydc_db[bNode] = 0.0 ; */ ydc_db[dbNode] = Gbd + dIbpdb_dVbpdb ; /* ydc_db[sbNode] = 0.0 ; */ ydc_db[tempNode] = Gbdt ; /* source bulk node */ /* ydc_sb[dNode] = 0.0 ; */ /* ydc_sb[dNodePrime] = 0.0 ; */ /* ydc_sb[gNode] = 0.0 ; */ /* ydc_sb[gNodePrime] = 0.0 ; */ ydc_sb[sNode] = - Gbs ; /* ydc_sb[sNodePrime] = 0.0 ; */ ydc_sb[bNodePrime] = - dIbpsb_dVbpsb ; /* ydc_sb[bNode] = 0.0 ; */ /* ydc_sb[dbNode] = 0.0 ; */ ydc_sb[sbNode] = Gbs + dIbpsb_dVbpsb ; ydc_sb[tempNode] = Gbst ; /* temp node */ ydc_t[dNode] = - dP_dVdse ; ydc_t[dNodePrime] = - dP_dVds ; /* ydc_t[gNode] = 0.0 ; */ ydc_t[gNodePrime] = - dP_dVgs - dP_dVgse ; ydc_t[sNode] = - ( - dP_dVdse - dP_dVgse - dP_dVbse ) ; ydc_t[sNodePrime] = - ( - dP_dVds - dP_dVgs - dP_dVbs ) ; ydc_t[bNodePrime] = - dP_dVbs - dP_dVbse ; /* ydc_t[bNode] = 0.0 ; */ /* ydc_t[dbNode] = 0.0 ; */ /* ydc_t[sbNode] = 0.0 ; */ ydc_t[tempNode] = dIth_dT - dP_dT ; /* additional entries for flat nqs handling */ if ( flg_nqs ) { ydc_qi[dNodePrime] = dIqi_nqs_dVds ; ydc_qi[gNodePrime] = dIqi_nqs_dVgs ; ydc_qi[sNodePrime] = -(dIqi_nqs_dVds + dIqi_nqs_dVgs + dIqi_nqs_dVbs) ; ydc_qi[bNodePrime] = dIqi_nqs_dVbs ; ydc_qi[tempNode] = dIqi_nqs_dT ; ydc_qi[qiNode] = dIqi_nqs_dQi_nqs ; /* ydc_qi[qbNode]= 0.0 ; */ ydc_qb[dNodePrime] = dIqb_nqs_dVds ; ydc_qb[gNodePrime] = dIqb_nqs_dVgs ; ydc_qb[sNodePrime] = -(dIqb_nqs_dVds + dIqb_nqs_dVgs + dIqb_nqs_dVbs) ; ydc_qb[bNodePrime] = dIqb_nqs_dVbs ; ydc_qb[tempNode] = dIqb_nqs_dT ; /* ydc_qb[qiNode]= 0.0 ; */ ydc_qb[qbNode] = dIqb_nqs_dQb_nqs ; } /* Preset vectors and matrix for dynamic part */ cq_d = cq_dP = cq_g = cq_gP = cq_s = cq_sP = cq_bP = cq_b = cq_db = cq_sb = cq_t = cq_qi = cq_qb = 0.0 ; for (i = 0; i < XDIM ; i++) { ydyn_d[i] = ydyn_dP[i] = ydyn_g[i] = ydyn_gP[i] = ydyn_s[i] = ydyn_sP[i] = ydyn_bP[i] = ydyn_b[i] = ydyn_db[i] = ydyn_sb[i] = ydyn_t[i] = 0.0; } if (flg_nqs) { for (i = 0; i < XDIM ; i++) { ydyn_qi[i] = ydyn_qb[i] = 0.0; } } ag0 = ckt->CKTag[0]; if (ChargeComputationNeeded) { /* start handling of dynamic part */ if (!ByPass) { /* loading of state vector not necessary in case of Bypass */ /* intrinsic gate node (without fringing charges) */ *(ckt->CKTstate0 + here->HSMHVqg) = Qg + Qg_nqs + Qgext; /* intrinsic drain node */ *(ckt->CKTstate0 + here->HSMHVqd) = Qd + Qd_nqs ; /* intrinsic bulk node */ *(ckt->CKTstate0 + here->HSMHVqb) = Qb + Qb_nqs + Qbext; /* drain bulk node */ *(ckt->CKTstate0 + here->HSMHVqbd) = Qbd ; /* source bulk node */ *(ckt->CKTstate0 + here->HSMHVqbs) = Qbs ; /* temp node */ *(ckt->CKTstate0 + here->HSMHVqth) = Qth ; /* fringing charges */ *(ckt->CKTstate0 + here->HSMHVqfd) = Qfd ; *(ckt->CKTstate0 + here->HSMHVqfs) = Qfs ; /* external drain node */ *(ckt->CKTstate0 + here->HSMHVqdE) = Qdext; /* nqs charges Qi_nqs, Qb_nqs: already loaded above */ /* if ( flg_nqs ) { */ /* *(ckt->CKTstate0 + here->HSMHVqi_nqs) = Qi_nqs; */ /* *(ckt->CKTstate0 + here->HSMHVqb_nqs) = Qb_nqs; */ /* } */ } /* ... assemble capacitance matrix */ /* ...... drain node */ ydyn_d[dNode] = dQfd_dVdse + Cbd + dQdext_dVdse ; /* ydyn_d[dNodePrime] = 0.0 ; */ /* ydyn_d[gNode] = 0.0 ; */ ydyn_d[gNodePrime] = dQfd_dVgse + dQdext_dVgse ; ydyn_d[sNode] = - (dQfd_dVdse + dQfd_dVgse+ dQfd_dVbse) - ( dQdext_dVdse + dQdext_dVgse + dQdext_dVbse ) ; /* ydyn_d[sNodePrime ] = 0.0 ; */ ydyn_d[bNodePrime] = dQfd_dVbse + dQdext_dVbse; /* ydyn_d[bNode ] = 0.0 ; */ ydyn_d[dbNode] = - Cbd ; /* ydyn_d[sbNode ] = 0.0 ; */ ydyn_d[tempNode] = dQfd_dT - Cbdt + dQdext_dT ; /* ...... intrinsic drain node */ /* ydyn_dP[dNode] = 0.0 ; */ ydyn_dP[dNodePrime] = dQd_dVds ; /* ydyn_dP[gNode] = 0.0 ; */ ydyn_dP[gNodePrime] = dQd_dVgs ; /* ydyn_dP[sNode] = 0.0 ; */ ydyn_dP[sNodePrime] = - ( dQd_dVds + dQd_dVgs + dQd_dVbs ) ; ydyn_dP[bNodePrime] = dQd_dVbs ; /* ydyn_dP[bNode] = 0.0 ; */ /* ydyn_dP[dbNode] = 0.0 ; */ /* ydyn_dP[sbNode] = 0.0 ; */ ydyn_dP[tempNode] = dQd_dT ; /* ...... gate node */ /* (no entry) */ /* ...... intrinsic gate node */ ydyn_gP[dNode] = -dQfd_dVdse - dQfs_dVdse + dQgext_dVdse ; ydyn_gP[dNodePrime] = dQg_dVds ; /* ydyn_gP[gNode] = 0.0 ; */ ydyn_gP[gNodePrime] = dQg_dVgs -dQfd_dVgse - dQfs_dVgse + dQgext_dVgse ; ydyn_gP[sNode] = dQfd_dVdse + dQfs_dVdse + dQfd_dVgse + dQfs_dVgse + dQfd_dVbse + dQfs_dVbse - ( dQgext_dVdse + dQgext_dVgse + dQgext_dVbse ) ; ydyn_gP[sNodePrime] = -( dQg_dVds + dQg_dVgs + dQg_dVbs ) ; ydyn_gP[bNodePrime] = dQg_dVbs -dQfd_dVbse - dQfs_dVbse + dQgext_dVbse ; /* ydyn_gP[bNode] = 0.0 ; */ /* ydyn_gP[dbNode] = 0.0 ; */ /* ydyn_gP[sbNode] = 0.0 ; */ ydyn_gP[tempNode] = dQg_dT - dQfd_dT - dQfs_dT + dQgext_dT ; /* ...... source node */ ydyn_s[dNode] = dQfs_dVdse + dQsext_dVdse ; /* ydyn_d[dNodePrime ] = 0.0 ; */ /* ydyn_d[gNode ] = 0.0 ; */ ydyn_s[gNodePrime] = dQfs_dVgse + dQsext_dVgse ; ydyn_s[sNode] = Cbs - (dQfs_dVdse + dQfs_dVgse+ dQfs_dVbse) - ( dQsext_dVdse + dQsext_dVgse + dQsext_dVbse ) ; /* ydyn_d[sNodePrime ] = 0.0 ; */ ydyn_s[bNodePrime] = dQfs_dVbse + dQsext_dVbse ; /* ydyn_d[bNode ] = 0.0 ; */ /* ydyn_d[dbNode ] = 0.0 ; */ ydyn_s[sbNode] = - Cbs ; ydyn_s[tempNode] = dQfs_dT - Cbst + dQsext_dT ; /* ...... intrinsic source node */ /* ydyn_sP[dNode] = 0.0 ; */ ydyn_sP[dNodePrime] = dQs_dVds ; /* ydyn_sP[gNode] = 0.0 ; */ ydyn_sP[gNodePrime] = dQs_dVgs ; /* ydyn_sP[sNode] = 0.0 ; */ ydyn_sP[sNodePrime] = - ( dQs_dVds + dQs_dVgs + dQs_dVbs ); ydyn_sP[bNodePrime] = dQs_dVbs ; /* ydyn_sP[bNode] = 0.0 ; */ /* ydyn_sP[dbNode] = 0.0 ; */ /* ydyn_sP[sbNode] = 0.0 ; */ ydyn_sP[tempNode] = dQs_dT ; /* ...... intrinsic bulk node */ ydyn_bP[dNode] = dQbext_dVdse ; ydyn_bP[dNodePrime] = dQb_dVds ; /* ydyn_bP[gNode] = 0.0 ; */ ydyn_bP[gNodePrime] = dQb_dVgs + dQbext_dVgse ; ydyn_bP[sNode] = - ( dQbext_dVdse + dQbext_dVgse + dQbext_dVbse ) ; ydyn_bP[sNodePrime] = - ( dQb_dVds + dQb_dVgs + dQb_dVbs ); ydyn_bP[bNodePrime] = dQb_dVbs + dQbext_dVbse ; /* ydyn_bP[bNode] = 0.0 ; */ /* ydyn_bP[dbNode] = 0.0 ; */ /* ydyn_bP[sbNode] = 0.0 ; */ ydyn_bP[tempNode] = dQb_dT + dQbext_dT ; /* ...... bulk node */ /* (no entry) */ /* ...... drain bulk node */ ydyn_db[dNode] = - Cbd ; /* ydyn_db[dNodePrime] = 0.0 ; */ /* ydyn_db[gNode] = 0.0 ; */ /* ydyn_db[gNodePrime] = 0.0 ; */ /* ydyn_db[sNode] = 0.0 ; */ /* ydyn_db[sNodePrime] = 0.0 ; */ /* ydyn_db[bNodePrime] = 0.0 ; */ /* ydyn_db[bNode] = 0.0 ; */ ydyn_db[dbNode] = Cbd ; /* ydyn_db[sbNode] = 0.0 ; */ ydyn_db[tempNode] = Cbdt ; /* ...... source bulk node */ /* ydyn_sb[dNode] = 0.0 ; */ /* ydyn_sb[dNodePrime] = 0.0 ; */ /* ydyn_sb[gNode] = 0.0 ; */ /* ydyn_sb[gNodePrime] = 0.0 ; */ ydyn_sb[sNode] = - Cbs ; /* ydyn_sb[sNodePrime] = 0.0 ; */ /* ydyn_sb[bNodePrime] = 0.0 ; */ /* ydyn_sb[bNode] = 0.0 ; */ /* ydyn_sb[dbNode] = 0.0 ; */ ydyn_sb[sbNode] = Cbs ; ydyn_sb[tempNode] = Cbst ; /* ...... temp node */ /* ydyn_t[dNode] = 0.0 ; */ /* ydyn_t[dNodePrime] = 0.0 ; */ /* ydyn_t[gNode] = 0.0 ; */ /* ydyn_t[gNodePrime] = 0.0 ; */ /* ydyn_t[sNode] = 0.0 ; */ /* ydyn_t[sNodePrime] = 0.0 ; */ /* ydyn_t[bNodePrime] = 0.0 ; */ /* ydyn_t[bNode] = 0.0 ; */ /* ydyn_t[dbNode] = 0.0 ; */ /* ydyn_t[sbNode] = 0.0 ; */ ydyn_t[tempNode] = Cth ; /* additional entries for flat nqs handling */ if (flg_nqs) { /* ...... intrinsic drain node */ /* ydyn_dP[dNode] += 0.0 ; */ ydyn_dP[dNodePrime] += dQd_nqs_dVds ; /* ydyn_dP[gNode] += 0.0 ; */ ydyn_dP[gNodePrime] += dQd_nqs_dVgs ; /* ydyn_dP[sNode] += 0.0 ; */ ydyn_dP[sNodePrime] += - ( dQd_nqs_dVds + dQd_nqs_dVgs + dQd_nqs_dVbs ) ; ydyn_dP[bNodePrime] += dQd_nqs_dVbs ; /* ydyn_dP[bNode] += 0.0 ; */ /* ydyn_dP[dbNode] += 0.0 ; */ /* ydyn_dP[sbNode] += 0.0 ; */ ydyn_dP[tempNode] += dQd_nqs_dT ; ydyn_dP[qiNode] = dQd_nqs_dQi_nqs ; /* ...... intrinsic gate node */ /* ydyn_gP[dNode] += 0.0 ; */ /* ydyn_gP[dNodePrime] += 0.0 ; */ /* ydyn_gP[gNode] += 0.0 ; */ /* ydyn_gP[gNodePrime] += 0.0 ; */ /* ydyn_gP[sNode] += 0.0 ; */ /* ydyn_gP[sNodePrime] += 0.0 ; */ /* ydyn_gP[bNodePrime] += 0.0 ; */ /* ydyn_gP[bNode] += 0.0 ; */ /* ydyn_gP[dbNode] += 0.0 ; */ /* ydyn_gP[sbNode] += 0.0 ; */ /* ydyn_gP[tempNode] += 0.0 ; */ ydyn_gP[qiNode] = dQg_nqs_dQi_nqs ; ydyn_gP[qbNode] = dQg_nqs_dQb_nqs ; /* ...... intrinsic source node */ /* ydyn_sP[dNode] += 0.0 ; */ ydyn_sP[dNodePrime] += dQs_nqs_dVds ; /* ydyn_sP[gNode] += 0.0 ; */ ydyn_sP[gNodePrime] += dQs_nqs_dVgs ; /* ydyn_sP[sNode] += 0.0 ; */ ydyn_sP[sNodePrime] += - ( dQs_nqs_dVds + dQs_nqs_dVgs + dQs_nqs_dVbs ); ydyn_sP[bNodePrime] += dQs_nqs_dVbs ; /* ydyn_sP[bNode] += 0.0 ; */ /* ydyn_sP[dbNode] += 0.0 ; */ /* ydyn_sP[sbNode] += 0.0 ; */ ydyn_sP[tempNode] += dQs_nqs_dT ; ydyn_sP[qiNode] = dQs_nqs_dQi_nqs ; /* ...... intrinsic bulk node */ /* ydyn_bP[dNode] += 0.0 ; */ /* ydyn_bP[dNodePrime] += 0.0 ; */ /* ydyn_bP[gNode] += 0.0 ; */ /* ydyn_bP[gNodePrime] += 0.0 ; */ /* ydyn_bP[sNode] += 0.0 ; */ /* ydyn_bP[sNodePrime] += 0.0 ; */ /* ydyn_bP[bNodePrime] += 0.0 ; */ /* ydyn_bP[bNode] += 0.0 ; */ /* ydyn_bP[dbNode] += 0.0 ; */ /* ydyn_bP[sbNode] += 0.0 ; */ /* ydyn_bP[tempNode] += 0.0 ; */ ydyn_bP[qbNode] = 1.0 ; /* ...... qi node */ /* ydyn_qi[dNodePrime] = 0.0 ; */ /* ydyn_qi[gNodePrime] = 0.0 ; */ /* ydyn_qi[sNodePrime] = 0.0 ; */ /* ydyn_qi[bNodePrime] = 0.0 ; */ /* ydyn_qi[tempNode] = 0.0 ; */ ydyn_qi[qiNode] = 1.0 ; /* ydyn_qi[qbNode] = 0.0 ; */ /* ...... qb node */ /* ydyn_qb[dNodePrime] = 0.0 ; */ /* ydyn_qb[gNodePrime] = 0.0 ; */ /* ydyn_qb[sNodePrime] = 0.0 ; */ /* ydyn_qb[bNodePrime] = 0.0 ; */ /* ydyn_qb[tempNode] = 0.0 ; */ /* ydyn_qb[qiNode] = 0.0 ; */ ydyn_qb[qbNode] = 1.0 ; } if (!ByPass) { /* integrate etc. only necessary if not in Bypass mode! */ /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { /* printf("HSMHV_load: (small signal) ByPass=%d\n",ByPass); */ /* printf("HSMHV_load: ydc_dP=%e %e %e %e %e %e %e %e\n", ydc_dP[0],ydc_dP[1],ydc_dP[2],ydc_dP[3],ydc_dP[4],ydc_dP[5],ydc_dP[6],ydc_dP[7]); printf("HSMHV_load: ych_dP=%e %e %e %e %e %e %e %e\n", ydyn_dP[0],ydyn_dP[1],ydyn_dP[2],ydyn_dP[3],ydyn_dP[4],ydyn_dP[5],ydyn_dP[6],ydyn_dP[7]); */ /* dc matrix into structure 0724*/ for (i = 0; i < XDIM; i++) { here->HSMHV_ydc_d[i] = ydc_d[i]; here->HSMHV_ydc_dP[i] = ydc_dP[i]; here->HSMHV_ydc_g[i] = ydc_g[i]; here->HSMHV_ydc_gP[i] = ydc_gP[i]; here->HSMHV_ydc_s[i] = ydc_s[i]; here->HSMHV_ydc_sP[i] = ydc_sP[i]; here->HSMHV_ydc_bP[i] = ydc_bP[i]; here->HSMHV_ydc_b[i] = ydc_b[i]; here->HSMHV_ydc_db[i] = ydc_db[i]; here->HSMHV_ydc_sb[i] = ydc_sb[i]; here->HSMHV_ydc_t[i] = ydc_t[i]; } /* capacitance matrix into structure 0724*/ for (i = 0; i < XDIM; i++) { here->HSMHV_ydyn_d[i] = ydyn_d[i]; here->HSMHV_ydyn_dP[i] = ydyn_dP[i]; here->HSMHV_ydyn_g[i] = ydyn_g[i]; here->HSMHV_ydyn_gP[i] = ydyn_gP[i]; here->HSMHV_ydyn_s[i] = ydyn_s[i]; here->HSMHV_ydyn_sP[i] = ydyn_sP[i]; here->HSMHV_ydyn_bP[i] = ydyn_bP[i]; here->HSMHV_ydyn_b[i] = ydyn_b[i]; here->HSMHV_ydyn_db[i] = ydyn_db[i]; here->HSMHV_ydyn_sb[i] = ydyn_sb[i]; here->HSMHV_ydyn_t[i] = ydyn_t[i]; } if (flg_nqs) { for (i = 0; i < XDIM; i++) { here->HSMHV_ydc_qi[i] = ydc_qi[i]; here->HSMHV_ydc_qb[i] = ydc_qb[i]; here->HSMHV_ydyn_qi[i] = ydyn_qi[i]; here->HSMHV_ydyn_qb[i] = ydyn_qb[i]; } } goto line1000; /* that's all for small signal analyses */ } /* Continue handling of dynamic part: */ /* ... calculate time derivatives of node charges */ if (ckt->CKTmode & MODEINITTRAN) { /* at the very first iteration of the first timepoint: copy charges into previous state -> the integrator may use them ... */ *(ckt->CKTstate1 + here->HSMHVqb) = *(ckt->CKTstate0 + here->HSMHVqb); *(ckt->CKTstate1 + here->HSMHVqg) = *(ckt->CKTstate0 + here->HSMHVqg); *(ckt->CKTstate1 + here->HSMHVqd) = *(ckt->CKTstate0 + here->HSMHVqd); *(ckt->CKTstate1 + here->HSMHVqth) = *(ckt->CKTstate0 + here->HSMHVqth); *(ckt->CKTstate1 + here->HSMHVqbs) = *(ckt->CKTstate0 + here->HSMHVqbs); *(ckt->CKTstate1 + here->HSMHVqbd) = *(ckt->CKTstate0 + here->HSMHVqbd); *(ckt->CKTstate1 + here->HSMHVqfd) = *(ckt->CKTstate0 + here->HSMHVqfd); *(ckt->CKTstate1 + here->HSMHVqfs) = *(ckt->CKTstate0 + here->HSMHVqfs); *(ckt->CKTstate1 + here->HSMHVqdE) = *(ckt->CKTstate0 + here->HSMHVqdE); if (flg_nqs) { *(ckt->CKTstate1 + here->HSMHVqi_nqs) = *(ckt->CKTstate0 + here->HSMHVqi_nqs); *(ckt->CKTstate1 + here->HSMHVqb_nqs) = *(ckt->CKTstate0 + here->HSMHVqb_nqs); } } return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqb)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqg)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqd)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqbs)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqbd)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqth)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqfd)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqfs)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqdE)); if (flg_nqs) { return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqi_nqs)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSMHVqb_nqs)); } if (ckt->CKTmode & MODEINITTRAN) { /* at the very first iteration of the first timepoint: copy currents into previous state -> the integrator may use them ... */ *(ckt->CKTstate1 + here->HSMHVcqb) = *(ckt->CKTstate0 + here->HSMHVcqb); *(ckt->CKTstate1 + here->HSMHVcqg) = *(ckt->CKTstate0 + here->HSMHVcqg); *(ckt->CKTstate1 + here->HSMHVcqd) = *(ckt->CKTstate0 + here->HSMHVcqd); *(ckt->CKTstate1 + here->HSMHVcqth) = *(ckt->CKTstate0 + here->HSMHVcqth); *(ckt->CKTstate1 + here->HSMHVcqbs) = *(ckt->CKTstate0 + here->HSMHVcqbs); *(ckt->CKTstate1 + here->HSMHVcqbd) = *(ckt->CKTstate0 + here->HSMHVcqbd); *(ckt->CKTstate1 + here->HSMHVcqfd) = *(ckt->CKTstate0 + here->HSMHVcqfd); *(ckt->CKTstate1 + here->HSMHVcqfs) = *(ckt->CKTstate0 + here->HSMHVcqfs); *(ckt->CKTstate1 + here->HSMHVcqdE) = *(ckt->CKTstate0 + here->HSMHVcqdE); if (flg_nqs) { *(ckt->CKTstate1 + here->HSMHVdotqi_nqs) = *(ckt->CKTstate0 + here->HSMHVdotqi_nqs); *(ckt->CKTstate1 + here->HSMHVdotqb_nqs) = *(ckt->CKTstate0 + here->HSMHVdotqb_nqs); } } } /* ... finally gather displacement currents from data structures */ cq_dP = *(ckt->CKTstate0 + here->HSMHVcqd); cq_gP = *(ckt->CKTstate0 + here->HSMHVcqg); cq_bP = *(ckt->CKTstate0 + here->HSMHVcqb); cq_sP = - *(ckt->CKTstate0 + here->HSMHVcqg) - *(ckt->CKTstate0 + here->HSMHVcqb) - *(ckt->CKTstate0 + here->HSMHVcqd); cq_dE = *(ckt->CKTstate0 + here->HSMHVcqdE); cq_db = *(ckt->CKTstate0 + here->HSMHVcqbd); cq_sb = *(ckt->CKTstate0 + here->HSMHVcqbs); cq_g = 0.0 ; cq_b = 0.0 ; /* displacement currents at outer drain/source node (fringing part only!) */ cq_d = *(ckt->CKTstate0 + here->HSMHVcqfd); cq_s = *(ckt->CKTstate0 + here->HSMHVcqfs); cq_t = *(ckt->CKTstate0 + here->HSMHVcqth); /* displacement currents due to nqs */ if (flg_nqs) { cq_qi = *(ckt->CKTstate0 + here->HSMHVdotqi_nqs); cq_qb = *(ckt->CKTstate0 + here->HSMHVdotqb_nqs); } else { cq_qi = cq_qb = 0.0 ; } /* ... and, if necessary: Extrapolate displacement currents onto x-values */ if (delvdbd || deldeltemp) { cq_db += ag0*(Cbd*delvdbd + Cbdt*deldeltemp) ; } if (delvsbs || deldeltemp) { cq_sb += ag0*(Cbs*delvsbs + Cbst*deldeltemp) ; } if (delvgs || delvds || delvbs || deldeltemp) { cq_gP += ag0*(dQg_dVgs*delvgs + dQg_dVds*delvds + dQg_dVbs*delvbs + dQg_dT*deldeltemp) ; cq_dP += ag0*(dQd_dVgs*delvgs + dQd_dVds*delvds + dQd_dVbs*delvbs + dQd_dT*deldeltemp) ; cq_sP += ag0*(dQs_dVgs*delvgs + dQs_dVds*delvds + dQs_dVbs*delvbs + dQs_dT*deldeltemp) ; cq_bP = - ( cq_gP + cq_dP + cq_sP ); } if (deldeltemp) { cq_t += ag0*Cth *deldeltemp ; cq_d += ag0*dQfd_dT*deldeltemp ; cq_s += ag0*dQfs_dT*deldeltemp ; cq_gE += ag0*dQgext_dT*deldeltemp ; cq_dE += ag0*dQdext_dT*deldeltemp ; cq_bE += ag0*dQbext_dT*deldeltemp ; cq_sE = - ( cq_gE + cq_dE + cq_bE ); } if (delvgse || delvdse || delvbse) { cq_d += ag0*(dQfd_dVgse*delvgse + dQfd_dVdse*delvdse + dQfd_dVbse*delvbse) ; cq_s += ag0*(dQfs_dVgse*delvgse + dQfs_dVdse*delvdse + dQfs_dVbse*delvbse) ; cq_gE += ag0*(dQgext_dVgse*delvgse + dQgext_dVdse*delvdse + dQgext_dVbse*delvbse) ; cq_dE += ag0*(dQdext_dVgse*delvgse + dQdext_dVdse*delvdse + dQdext_dVbse*delvbse) ; cq_bE += ag0*(dQbext_dVgse*delvgse + dQbext_dVdse*delvdse + dQbext_dVbse*delvbse) ; cq_sE = - ( cq_gE + cq_dE + cq_bE ); } if (flg_nqs) { if (delvgs || delvds || delvbs || deldeltemp) { cq_dP += ag0*(dQd_nqs_dVgs*delvgs + dQd_nqs_dVds*delvds + dQd_nqs_dVbs*delvbs + dQd_nqs_dT*deldeltemp) ; cq_sP += ag0*(dQs_nqs_dVgs*delvgs + dQs_nqs_dVds*delvds + dQs_nqs_dVbs*delvbs + dQs_nqs_dT*deldeltemp) ; cq_bP = - ( cq_gP + cq_dP + cq_sP ); /* should be superfluous ? */ } if (delQi_nqs) { cq_dP += ag0*dQd_nqs_dQi_nqs*delQi_nqs ; cq_gP += ag0*dQg_nqs_dQi_nqs*delQi_nqs ; cq_sP += ag0*dQs_nqs_dQi_nqs*delQi_nqs ; cq_qi += ag0* 1.0 *delQi_nqs ; } if (delQb_nqs) { cq_gP += ag0*dQg_nqs_dQb_nqs*delQb_nqs ; cq_bP += ag0* 1.0 *delQb_nqs ; cq_qb += ag0* 1.0 *delQb_nqs ; } } } /* End of handling dynamic part */ /* Assemble total node currents (type-handling shifted to stamping) */ cur_d = i_d + cq_d - cq_db + cq_dE ; cur_dP = i_dP + cq_dP ; cur_g = i_g + cq_g ; cur_gP = i_gP + cq_gP - cq_d - cq_s + cq_gE ; cur_s = i_s + cq_s - cq_sb + cq_sE ; cur_sP = i_sP + cq_sP; cur_bP = i_bP + cq_bP + cq_bE ; cur_b = i_b + cq_b; cur_db = i_db + cq_db; cur_sb = i_sb + cq_sb; cur_t = i_t + cq_t; cur_qi = i_qi + cq_qi; cur_qb = i_qb + cq_qb; /* Now we can start stamping ... */ /* ... right hand side: subtract total node currents */ *(ckt->CKTrhs + here->HSMHVdNode) -= model->HSMHV_type * cur_d; *(ckt->CKTrhs + here->HSMHVdNodePrime) -= model->HSMHV_type * cur_dP; *(ckt->CKTrhs + here->HSMHVgNode) -= model->HSMHV_type * cur_g; *(ckt->CKTrhs + here->HSMHVgNodePrime) -= model->HSMHV_type * cur_gP; *(ckt->CKTrhs + here->HSMHVsNode) -= model->HSMHV_type * cur_s; *(ckt->CKTrhs + here->HSMHVsNodePrime) -= model->HSMHV_type * cur_sP; *(ckt->CKTrhs + here->HSMHVbNodePrime) -= model->HSMHV_type * cur_bP; *(ckt->CKTrhs + here->HSMHVbNode) -= model->HSMHV_type * cur_b; *(ckt->CKTrhs + here->HSMHVdbNode) -= model->HSMHV_type * cur_db; *(ckt->CKTrhs + here->HSMHVsbNode) -= model->HSMHV_type * cur_sb; if( flg_tempNode > 0) { *(ckt->CKTrhs + here->HSMHVtempNode) -= cur_t; /* temp node independent of model type! */ } if (flg_nqs) { *(ckt->CKTrhs + here->HSMHVqiNode) -= cur_qi; *(ckt->CKTrhs + here->HSMHVqbNode) -= cur_qb; } /* ... finally stamp matrix */ /*drain*/ *(here->HSMHVDdPtr) += ydc_d[dNode] + ag0*ydyn_d[dNode]; *(here->HSMHVDdpPtr) += ydc_d[dNodePrime] + ag0*ydyn_d[dNodePrime]; *(here->HSMHVDgpPtr) += ydc_d[gNodePrime] + ag0*ydyn_d[gNodePrime]; *(here->HSMHVDsPtr) += ydc_d[sNode] + ag0*ydyn_d[sNode]; *(here->HSMHVDspPtr) += ydc_d[sNodePrime] + ag0*ydyn_d[sNodePrime]; *(here->HSMHVDbpPtr) += ydc_d[bNodePrime] + ag0*ydyn_d[bNodePrime]; *(here->HSMHVDdbPtr) += ydc_d[dbNode] + ag0*ydyn_d[dbNode]; if (flg_subNode > 0) { *(here->HSMHVDsubPtr) += ydc_d[subNode]; } if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVDtempPtr) += model->HSMHV_type * (ydc_d[tempNode] + ag0*ydyn_d[tempNode]); } /*drain prime*/ *(here->HSMHVDPdPtr) += ydc_dP[dNode] + ag0*ydyn_dP[dNode]; *(here->HSMHVDPdpPtr) += ydc_dP[dNodePrime] + ag0*ydyn_dP[dNodePrime]; *(here->HSMHVDPgpPtr) += ydc_dP[gNodePrime] + ag0*ydyn_dP[gNodePrime]; *(here->HSMHVDPsPtr) += ydc_dP[sNode] + ag0*ydyn_dP[sNode]; *(here->HSMHVDPspPtr) += ydc_dP[sNodePrime] + ag0*ydyn_dP[sNodePrime]; *(here->HSMHVDPbpPtr) += ydc_dP[bNodePrime] + ag0*ydyn_dP[bNodePrime]; if (flg_subNode > 0) { *(here->HSMHVDPsubPtr) += ydc_dP[subNode]; } if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVDPtempPtr) += model->HSMHV_type * (ydc_dP[tempNode] + ag0*ydyn_dP[tempNode]); } if (flg_nqs) { *(here->HSMHVDPqiPtr) += model->HSMHV_type * (ydc_dP[qiNode] + ag0*ydyn_dP[qiNode]); } /*gate*/ *(here->HSMHVGgPtr) += ydc_g[gNode] + ag0*ydyn_g[gNode]; *(here->HSMHVGgpPtr) += ydc_g[gNodePrime] + ag0*ydyn_g[gNodePrime]; /*gate prime*/ *(here->HSMHVGPdPtr) += ydc_gP[dNode] + ag0*ydyn_gP[dNode]; *(here->HSMHVGPdpPtr) += ydc_gP[dNodePrime] + ag0*ydyn_gP[dNodePrime]; *(here->HSMHVGPgPtr) += ydc_gP[gNode] + ag0*ydyn_gP[gNode]; *(here->HSMHVGPgpPtr) += ydc_gP[gNodePrime] + ag0*ydyn_gP[gNodePrime]; *(here->HSMHVGPsPtr) += ydc_gP[sNode] + ag0*ydyn_gP[sNode]; *(here->HSMHVGPspPtr) += ydc_gP[sNodePrime] + ag0*ydyn_gP[sNodePrime]; *(here->HSMHVGPbpPtr) += ydc_gP[bNodePrime] + ag0*ydyn_gP[bNodePrime]; if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVGPtempPtr) += model->HSMHV_type * (ydc_gP[tempNode] + ag0*ydyn_gP[tempNode]); } if (flg_nqs) { *(here->HSMHVGPqiPtr) += model->HSMHV_type * (ydc_gP[qiNode] + ag0*ydyn_gP[qiNode]); *(here->HSMHVGPqbPtr) += model->HSMHV_type * (ydc_gP[qbNode] + ag0*ydyn_gP[qbNode]); } /*source*/ *(here->HSMHVSdPtr) += ydc_s[dNode] + ag0*ydyn_s[dNode]; *(here->HSMHVSsPtr) += ydc_s[sNode] + ag0*ydyn_s[sNode]; *(here->HSMHVSdpPtr) += ydc_s[dNodePrime] + ag0*ydyn_s[dNodePrime]; *(here->HSMHVSgpPtr) += ydc_s[gNodePrime] + ag0*ydyn_s[gNodePrime]; *(here->HSMHVSspPtr) += ydc_s[sNodePrime] + ag0*ydyn_s[sNodePrime]; *(here->HSMHVSbpPtr) += ydc_s[bNodePrime] + ag0*ydyn_s[bNodePrime]; *(here->HSMHVSsbPtr) += ydc_s[sbNode] + ag0*ydyn_s[sbNode]; if (flg_subNode > 0) { *(here->HSMHVSsubPtr) += ydc_s[subNode]; } if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVStempPtr) += model->HSMHV_type * (ydc_s[tempNode]+ ag0*ydyn_s[tempNode]); } /*source prime*/ *(here->HSMHVSPdPtr) += ydc_sP[dNode] + ag0*ydyn_sP[dNode]; *(here->HSMHVSPdpPtr) += ydc_sP[dNodePrime] + ag0*ydyn_sP[dNodePrime]; *(here->HSMHVSPgpPtr) += ydc_sP[gNodePrime] + ag0*ydyn_sP[gNodePrime]; *(here->HSMHVSPsPtr) += ydc_sP[sNode] + ag0*ydyn_sP[sNode]; *(here->HSMHVSPspPtr) += ydc_sP[sNodePrime] + ag0*ydyn_sP[sNodePrime]; *(here->HSMHVSPbpPtr) += ydc_sP[bNodePrime] + ag0*ydyn_sP[bNodePrime]; if (flg_subNode > 0) { *(here->HSMHVSPsubPtr) += ydc_sP[subNode]; } if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVSPtempPtr) += model->HSMHV_type * (ydc_sP[tempNode] + ag0*ydyn_sP[tempNode]); } if (flg_nqs) { *(here->HSMHVSPqiPtr) += model->HSMHV_type * (ydc_sP[qiNode] + ag0*ydyn_sP[qiNode]); } /*bulk prime*/ *(here->HSMHVBPdPtr) += ydc_bP[dNode] + ag0*ydyn_bP[dNode]; *(here->HSMHVBPdpPtr) += ydc_bP[dNodePrime] + ag0*ydyn_bP[dNodePrime]; *(here->HSMHVBPgpPtr) += ydc_bP[gNodePrime] + ag0*ydyn_bP[gNodePrime]; *(here->HSMHVBPspPtr) += ydc_bP[sNodePrime] + ag0*ydyn_bP[sNodePrime]; *(here->HSMHVBPsPtr) += ydc_bP[sNode] + ag0*ydyn_bP[sNode]; *(here->HSMHVBPbpPtr) += ydc_bP[bNodePrime] + ag0*ydyn_bP[bNodePrime]; *(here->HSMHVBPbPtr) += ydc_bP[bNode] + ag0*ydyn_bP[bNode]; *(here->HSMHVBPdbPtr) += ydc_bP[dbNode] + ag0*ydyn_bP[dbNode]; *(here->HSMHVBPsbPtr) += ydc_bP[sbNode] + ag0*ydyn_bP[sbNode]; if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVBPtempPtr) += model->HSMHV_type * (ydc_bP[tempNode] + ag0*ydyn_bP[tempNode]); } if (flg_nqs) { *(here->HSMHVBPqbPtr) += model->HSMHV_type * (ydc_bP[qbNode] + ag0*ydyn_bP[qbNode]); } /*bulk*/ *(here->HSMHVBbpPtr) += ydc_b[bNodePrime] + ag0*ydyn_b[bNodePrime]; *(here->HSMHVBbPtr) += ydc_b[bNode] + ag0*ydyn_b[bNode]; /*drain bulk*/ *(here->HSMHVDBdPtr) += ydc_db[dNode] + ag0*ydyn_db[dNode]; *(here->HSMHVDBbpPtr) += ydc_db[bNodePrime] + ag0*ydyn_db[bNodePrime]; *(here->HSMHVDBdbPtr) += ydc_db[dbNode] + ag0*ydyn_db[dbNode]; if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVDBtempPtr) += model->HSMHV_type * (ydc_db[tempNode] + ag0*ydyn_db[tempNode]); } /*source bulk*/ *(here->HSMHVSBsPtr) += ydc_sb[sNode] + ag0*ydyn_sb[sNode]; *(here->HSMHVSBbpPtr) += ydc_sb[bNodePrime] + ag0*ydyn_sb[bNodePrime]; *(here->HSMHVSBsbPtr) += ydc_sb[sbNode] + ag0*ydyn_sb[sbNode]; if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVSBtempPtr) += model->HSMHV_type * (ydc_sb[tempNode] + ag0*ydyn_sb[tempNode]); } /*temp*/ if( flg_tempNode > 0) { /* temp entries in matrix dependent on model type */ *(here->HSMHVTempdPtr) += model->HSMHV_type * (ydc_t[dNode] + ag0*ydyn_t[dNode] ); *(here->HSMHVTempdpPtr) += model->HSMHV_type * (ydc_t[dNodePrime] + ag0*ydyn_t[dNodePrime]); *(here->HSMHVTempgpPtr) += model->HSMHV_type * (ydc_t[gNodePrime] + ag0*ydyn_t[gNodePrime]); *(here->HSMHVTempsPtr) += model->HSMHV_type * (ydc_t[sNode] + ag0*ydyn_t[sNode] ); *(here->HSMHVTempspPtr) += model->HSMHV_type * (ydc_t[sNodePrime] + ag0*ydyn_t[sNodePrime]); *(here->HSMHVTempbpPtr) += model->HSMHV_type * (ydc_t[bNodePrime] + ag0*ydyn_t[bNodePrime]); /* no type factor at main diagonal temp entry! */ *(here->HSMHVTemptempPtr) += ydc_t[tempNode] + ag0*ydyn_t[tempNode]; } /* additional entries for flat nqs handling */ if ( flg_nqs ) { /*qi*/ *(here->HSMHVQIdpPtr) += model->HSMHV_type * (ydc_qi[dNodePrime] + ag0*ydyn_qi[dNodePrime]); *(here->HSMHVQIgpPtr) += model->HSMHV_type * (ydc_qi[gNodePrime] + ag0*ydyn_qi[gNodePrime]); *(here->HSMHVQIspPtr) += model->HSMHV_type * (ydc_qi[sNodePrime] + ag0*ydyn_qi[sNodePrime]); *(here->HSMHVQIbpPtr) += model->HSMHV_type * (ydc_qi[bNodePrime] + ag0*ydyn_qi[bNodePrime]); *(here->HSMHVQIqiPtr) += (ydc_qi[qiNode] + ag0*ydyn_qi[qiNode]); if ( flg_tempNode > 0 ) { /* self heating */ *(here->HSMHVQItempPtr) += (ydc_qi[tempNode] + ag0*ydyn_qi[tempNode]); } /*qb*/ *(here->HSMHVQBdpPtr) += model->HSMHV_type * (ydc_qb[dNodePrime] + ag0*ydyn_qb[dNodePrime]); *(here->HSMHVQBgpPtr) += model->HSMHV_type * (ydc_qb[gNodePrime] + ag0*ydyn_qb[gNodePrime]); *(here->HSMHVQBspPtr) += model->HSMHV_type * (ydc_qb[sNodePrime] + ag0*ydyn_qb[sNodePrime]); *(here->HSMHVQBbpPtr) += model->HSMHV_type * (ydc_qb[bNodePrime] + ag0*ydyn_qb[bNodePrime]); *(here->HSMHVQBqbPtr) += (ydc_qb[qbNode] + ag0*ydyn_qb[qbNode]); if ( flg_tempNode > 0 ) { /* self heating */ *(here->HSMHVQBtempPtr) += (ydc_qb[tempNode] + ag0*ydyn_qb[tempNode]); } } line1000: if (ckt->CKTnoncon != noncon_old) { ckt->CKTtroubleElt = (GENinstance *) here; } } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvtrunc.c0000644000265600020320000000313512264261473022333 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvtrunc.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVtrunc( GENmodel *inModel, register CKTcircuit *ckt, double *timeStep) { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; #ifdef STEPDEBUG double debugtemp=0.0 ; #endif /* STEPDEBUG */ for ( ;model != NULL ;model = model->HSMHVnextModel ) { for ( here=model->HSMHVinstances ;here!=NULL ; here = here->HSMHVnextInstance ) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->HSMHVqb,ckt,timeStep); CKTterr(here->HSMHVqg,ckt,timeStep); CKTterr(here->HSMHVqd,ckt,timeStep); CKTterr(here->HSMHVqbs,ckt,timeStep); CKTterr(here->HSMHVqbd,ckt,timeStep); CKTterr(here->HSMHVqfd,ckt,timeStep); CKTterr(here->HSMHVqfs,ckt,timeStep); #ifdef STEPDEBUG if ( debugtemp != *timeStep ) printf("device %s reduces step from %g to %g\n", here->HSMHVname, debugtemp, *timeStep); #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhveval_qover.h0000644000265600020320000006047512264261473023362 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhveval_qover.h DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ /* Begin HSMHVevalQover */ /*---------------------------------------------------* * Clamp -Vxbgmt. *-----------------*/ T0 = - Vxbgmt; if ( T0 > Vbs_bnd ) { T1 = T0 - Vbs_bnd; T1_dT = - Vbs_bnd_dT; T2 = Vbs_max - Vbs_bnd; T2_dT = Vbs_max_dT - Vbs_bnd_dT; Fn_SUPoly4m( TY, T1, T2, T11, T0 ); TY_dT = T1_dT * T11 + T2_dT * T0; T10 = Vbs_bnd + TY ; T10_dT = Vbs_bnd_dT + TY_dT ; } else { T10 = T0 ; T11 = 1.0 ; T10_dT = 0.0; } Vxbgmtcl = - T10 - small2 ; Vxbgmtcl_dVxbgmt = T11; Vxbgmtcl_dT = - T10_dT; fac1 = cnst0over_func * Cox0_inv ; fac1_dVbs = 0.0; fac1_dVds = 0.0; fac1_dVgs = 0.0; fac1_dT = cnst0over_func_dT * Cox0_inv ; fac1p2 = fac1 * fac1 ; fac1p2_dT = 2.0 * fac1 * fac1_dT ; VgpLD = - Vgbgmt + pParam->HSMHV_vfbover; VgpLD_dVgb = - 1.0e0 ; T0 = Nover_func / here->HSMHV_nin ; Pb2over = 2.0 / beta * log( T0 ) ; T0_dT = - T0 / here->HSMHV_nin * Nin_dT ; Pb2over_dT = - Pb2over / beta * beta_dT + 2.0 / beta / T0 * T0_dT ; Vgb_fb_LD = - Vxbgmtcl ; /*-----------------------------------* * QsuLD: total charge = Accumulation | Depletion+inversion *-----------------*/ if ( VgpLD < Vgb_fb_LD ){ /*---------------------------* * Accumulation *-----------------*/ flg_ovzone = -1 ; T1 = 1.0 / ( beta * cnst0over_func ) ; T1_dT = - T1 * T1 * ( beta_dT * cnst0over_func + beta * cnst0over_func_dT ) ; TY = T1 * Cox0 ; Ac41 = 2.0 + 3.0 * C_SQRT_2 * TY ; Ac4 = 8.0 * Ac41 * Ac41 * Ac41 ; TY_dT = T1_dT * Cox0 ; Ac41_dT = 3.0 * C_SQRT_2 * TY_dT ; Ac4_dT = 8.0 * 3.0 * Ac41 * Ac41 * Ac41_dT ; Ps0_min = here->HSMHV_eg - Pb2over ; Ps0_min_dT = Eg_dT - Pb2over_dT ; TX = beta * ( VgpLD + Vxbgmtcl ) ; TX_dVxb = beta * Vxbgmtcl_dVxbgmt ; TX_dVgb = beta * VgpLD_dVgb ; TX_dT = beta_dT * ( VgpLD + Vxbgmtcl ) + beta * Vxbgmtcl_dT; Ac31 = 7.0 * C_SQRT_2 - 9.0 * TY * ( TX - 2.0 ) ; Ac31_dVxb = - 9.0 * TY * TX_dVxb ; Ac31_dVgb = - 9.0 * TY * TX_dVgb ; Ac31_dT = - 9.0 * ( TY_dT * ( TX - 2.0 ) + TY * TX_dT ); Ac3 = Ac31 * Ac31 ; T1 = 2.0 * Ac31 ; Ac3_dVxb = T1 * Ac31_dVxb ; Ac3_dVgb = T1 * Ac31_dVgb ; Ac3_dT = T1 * Ac31_dT ; Ac2 = sqrt( Ac4 + Ac3 ) ; T1 = 0.5 / Ac2 ; Ac2_dVxb = T1 * Ac3_dVxb ; Ac2_dVgb = T1 * Ac3_dVgb ; Ac2_dT = T1 * ( Ac4_dT + Ac3_dT ); Ac1 = -7.0 * C_SQRT_2 + Ac2 + 9.0 * TY * ( TX - 2.0 ) ; Ac1_dVxb = Ac2_dVxb + 9.0 * TY * TX_dVxb ; Ac1_dVgb = Ac2_dVgb + 9.0 * TY * TX_dVgb ; Ac1_dT = Ac2_dT + 9.0 * ( TY_dT * ( TX - 2.0 ) + TY * TX_dT ) ; Acd = pow( Ac1 , C_1o3 ) ; T1 = C_1o3 / ( Acd * Acd ) ; Acd_dVxb = Ac1_dVxb * T1 ; Acd_dVgb = Ac1_dVgb * T1 ; Acd_dT = Ac1_dT * T1 ; Acn = -4.0 * C_SQRT_2 - 12.0 * TY + 2.0 * Acd + C_SQRT_2 * Acd * Acd ; T1 = 2.0 + 2.0 * C_SQRT_2 * Acd ; Acn_dVxb = T1 * Acd_dVxb ; Acn_dVgb = T1 * Acd_dVgb ; Acn_dT = - 12.0 * TY_dT + T1 * Acd_dT ; Chi = Acn / Acd ; T1 = 1.0 / ( Acd * Acd ) ; Chi_dVxb = ( Acn_dVxb * Acd - Acn * Acd_dVxb ) * T1 ; Chi_dVgb = ( Acn_dVgb * Acd - Acn * Acd_dVgb ) * T1 ; Chi_dT = ( Acn_dT * Acd - Acn * Acd_dT ) * T1 ; Psa = Chi * beta_inv - Vxbgmtcl ; Psa_dVxb = Chi_dVxb * beta_inv - Vxbgmtcl_dVxbgmt ; Psa_dVgb = Chi_dVgb * beta_inv ; Psa_dT = Chi_dT * beta_inv + Chi * beta_inv_dT - Vxbgmtcl_dT ; T1 = Psa + Vxbgmtcl ; T1_dT = Psa_dT + Vxbgmtcl_dT ; T2 = T1 / Ps0_min ; T2_dT = ( T1_dT * Ps0_min - T1 * Ps0_min_dT ) / ( Ps0_min * Ps0_min ) ; T3 = sqrt( 1.0 + ( T2 * T2 ) ) ; T9 = T2 / T3 / Ps0_min ; T3_dVd = T9 * ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) ; T3_dVg = T9 * Psa_dVgb ; T3_dT = T2_dT * T2 / T3; Ps0LD = T1 / T3 - Vxbgmtcl ; T9 = 1.0 / ( T3 * T3 ) ; Ps0LD_dVxb = T9 * ( ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) * T3 - T1 * T3_dVd ) - Vxbgmtcl_dVxbgmt ; Ps0LD_dVgb = T9 * ( Psa_dVgb * T3 - T1 * T3_dVg ); Ps0LD_dT = T9 * ( T1_dT * T3 - T1 * T3_dT ) - Vxbgmtcl_dT; T2 = ( VgpLD - Ps0LD ) ; QsuLD = Cox0 * T2 ; QsuLD_dVxb = - Cox0 * Ps0LD_dVxb ; QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ; QsuLD_dT = Cox0 * ( - Ps0LD_dT ) ; QbuLD = QsuLD ; QbuLD_dVxb = QsuLD_dVxb ; QbuLD_dVgb = QsuLD_dVgb ; QbuLD_dT = QsuLD_dT ; } else { /*---------------------------* * Depletion and inversion *-----------------*/ /* initial value for a few fixpoint iterations to get Ps0_iniA from simplified Poisson equation: */ flg_ovzone = 2 ; Chi = znbd3 ; Chi_dVxb = 0.0 ; Chi_dVgb = 0.0 ; Chi_dT = 0.0 ; Ps0_iniA= Chi/beta - Vxbgmtcl ; Ps0_iniA_dVxb = Chi_dVxb/beta - Vxbgmtcl_dVxbgmt ; Ps0_iniA_dVgb = Chi_dVgb/beta ; Ps0_iniA_dT = Chi_dT/beta - Chi*beta_dT/(beta*beta) - Vxbgmtcl_dT; /* 1 .. 2 relaxation steps should be sufficient */ for ( lp_ld = 1; lp_ld <= 2; lp_ld ++ ) { TY = exp(-Chi); TY_dVxb = -Chi_dVxb * TY; TY_dVgb = -Chi_dVgb * TY; TY_dT = - Chi_dT * TY; TX = 1.0e0 + 4.0e0 * ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY ) / ( fac1p2 * beta2 ) ; TX_dVxb = 4.0e0 * ( beta * ( Vxbgmtcl_dVxbgmt ) + TY_dVxb ) / ( fac1p2 * beta2 ); TX_dVgb = 4.0e0 * ( beta * ( VgpLD_dVgb ) + TY_dVgb ) / ( fac1p2 * beta2 ); T1 = ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY ); T1_dT = beta_dT * ( VgpLD + Vxbgmtcl ) + beta * Vxbgmtcl_dT + TY_dT; T3 = fac1p2 * beta2 ; T3_dT = fac1p2_dT * beta2 + fac1p2 * ( 2 * beta * beta_dT ) ; TX_dT = 4 * ( T1_dT * T3 - T1 * T3_dT ) / ( T3 * T3 ); if ( TX < epsm10) { TX = epsm10; TX_dVxb = TX_dVgb = TX_dT = 0.0; } Ps0_iniA = VgpLD + fac1p2 * beta / 2.0e0 * ( 1.0e0 - sqrt( TX ) ) ; Ps0_iniA_dVxb = - fac1p2 * beta / 2.0e0 * TX_dVxb * 0.5 / sqrt( TX ); Ps0_iniA_dVgb = VgpLD_dVgb - fac1p2 * beta / 2.0e0 * TX_dVgb * 0.5 / sqrt( TX ); T1 = fac1p2 * beta ; T1_dT = fac1p2_dT * beta + fac1p2 * beta_dT ; T2 = 1.0 - sqrt( TX ); T2_dT = - 1.0e0 / ( 2.0e0 * sqrt( TX ) ) * TX_dT ; Ps0_iniA_dT = ( T1_dT * T2 + T1 * T2_dT ) / 2.0e0 ; Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ; Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ; Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ; Chi_dT = beta_dT * ( Ps0_iniA + Vxbgmtcl ) + beta * ( Ps0_iniA_dT + Vxbgmtcl_dT ); } /* End of iteration */ if ( Chi < znbd3 ) { flg_ovzone = 1 ; /*-----------------------------------* * zone-D1 * - Ps0_iniA is the analytical solution of QovLD=Qb0 with * Qb0 being approximated by 3-degree polynomial. * * new: Inclusion of exp(-Chi) term at right border *-----------------*/ Ta = 1.0/(9.0*sqrt(2.0)) - (5.0+7.0*exp(-3.0)) / (54.0*sqrt(2.0+exp(-3.0))); Tb = (1.0+exp(-3.0)) / (2.0*sqrt(2.0+exp(-3.0))) - sqrt(2.0) / 3.0; Tc = 1.0/sqrt(2.0) + 1.0/(beta*fac1); Tc_dT = - (beta_dT*fac1 + beta*fac1_dT)/(beta2*fac1p2); Td = - (VgpLD + Vxbgmtcl) / fac1; Td_dVxb = - Vxbgmtcl_dVxbgmt / fac1; Td_dVgb = - VgpLD_dVgb / fac1; Td_dT = - (Vxbgmtcl_dT*fac1 - (VgpLD+Vxbgmtcl)*fac1_dT)/fac1p2; Tq = Tb*Tb*Tb / (27.0*Ta*Ta*Ta) - Tb*Tc/(6.0*Ta*Ta) + Td/(2.0*Ta); Tq_dVxb = Td_dVxb/(2.0*Ta); Tq_dVgb = Td_dVgb / (2.0*Ta); Tq_dT = - Tb/(6.0*Ta*Ta)*Tc_dT + Td_dT/(2.0*Ta); Tp = (3.0*Ta*Tc-Tb*Tb)/(9.0*Ta*Ta); Tp_dT = Tc_dT/(3.0*Ta); T5 = sqrt(Tq*Tq + Tp*Tp*Tp); T5_dVxb = 2.0*Tq*Tq_dVxb / (2.0*T5); T5_dVgb = 2.0*Tq*Tq_dVgb / (2.0*T5); T5_dT = (2.0*Tq*Tq_dT + 3.0*Tp*Tp*Tp_dT) / (2.0*T5); Tu = pow(-Tq + T5,C_1o3); Tu_dVxb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVxb + T5_dVxb); Tu_dVgb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVgb + T5_dVgb); Tu_dT = Tu / (3.0 * (-Tq + T5)) * (-Tq_dT + T5_dT); Tv = -pow(Tq + T5,C_1o3); Tv_dVxb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVxb - T5_dVxb); Tv_dVgb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVgb - T5_dVgb); Tv_dT = Tv / (3.0 * (-Tq - T5)) * (-Tq_dT - T5_dT ); TX = Tu + Tv - Tb/(3.0*Ta); TX_dVxb = Tu_dVxb + Tv_dVxb; TX_dVgb = Tu_dVgb + Tv_dVgb; TX_dT = Tu_dT + Tv_dT ; Ps0_iniA = TX * beta_inv - Vxbgmtcl ; Ps0_iniA_dVxb = TX_dVxb * beta_inv - Vxbgmtcl_dVxbgmt; Ps0_iniA_dVgb = TX_dVgb * beta_inv; Ps0_iniA_dT = TX_dT * beta_inv + TX * beta_inv_dT - Vxbgmtcl_dT; Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ; Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ; Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ; Chi_dT = beta_dT * ( Ps0_iniA + Vxbgmtcl ) + beta * ( Ps0_iniA_dT + Vxbgmtcl_dT ); } if ( model->HSMHV_coqovsm > 0 ) { /*-----------------------------------* * - Ps0_iniB : upper bound. *-----------------*/ flg_ovzone += 2; VgpLD_shift = VgpLD + Vxbgmtcl + 0.1; VgpLD_shift_dVgb = VgpLD_dVgb; VgpLD_shift_dVxb = Vxbgmtcl_dVxbgmt; VgpLD_shift_dT = Vxbgmtcl_dT; exp_bVbs = exp( beta * - Vxbgmtcl ) + small ; exp_bVbs_dVxb = - exp_bVbs * beta * Vxbgmtcl_dVxbgmt; exp_bVbs_dT = - exp_bVbs * (beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT); T0 = here->HSMHV_nin / Nover_func; T0_dT = Nin_dT / Nover_func; cnst1over = T0 * T0; cnst1over_dT = 2.0 * T0 * T0_dT; gamma = cnst1over * exp_bVbs ; gamma_dVxb = cnst1over * exp_bVbs_dVxb; gamma_dT = cnst1over_dT * exp_bVbs + cnst1over * exp_bVbs_dT; T0 = beta2 * fac1p2; T0_dT = 2.0 * beta * fac1 * (beta_dT*fac1+beta*fac1_dT); psi = beta*VgpLD_shift; psi_dVgb = beta*VgpLD_shift_dVgb; psi_dVxb = beta*VgpLD_shift_dVxb; psi_dT = beta_dT*VgpLD_shift + beta*VgpLD_shift_dT; Chi_1 = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl; Chi_1_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi); Chi_1_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi) + beta*Vxbgmtcl_dVxbgmt; Chi_1_dT = (gamma_dT*T0+gamma*T0_dT+2.0*psi*psi_dT)/(gamma*T0+psi*psi) - (cnst1over_dT*T0 + cnst1over*T0_dT)/(cnst1over*T0) + beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT; Fn_SU2( Chi_1, Chi_1, psi, 1.0, T1, T2 ); Chi_1_dVgb = Chi_1_dVgb*T1 + psi_dVgb*T2; Chi_1_dVxb = Chi_1_dVxb*T1 + psi_dVxb*T2; Chi_1_dT = Chi_1_dT *T1 + psi_dT *T2; /* 1 fixpoint step for getting more accurate Chi_B */ psi -= Chi_1 ; psi_dVgb -= Chi_1_dVgb ; psi_dVxb -= Chi_1_dVxb ; psi_dT -= Chi_1_dT ; psi += beta*0.1 ; psi_dT += beta_dT*0.1 ; psi_B = psi; arg_B = psi*psi/(gamma*T0); Chi_B = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl; Chi_B_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi); Chi_B_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi) + beta*Vxbgmtcl_dVxbgmt; Chi_B_dT = (gamma_dT*T0+gamma*T0_dT+2.0*psi*psi_dT)/(gamma*T0+psi*psi) - (cnst1over_dT*T0 + cnst1over*T0_dT)/(cnst1over*T0) + beta_dT*Vxbgmtcl + beta*Vxbgmtcl_dT; Ps0_iniB = Chi_B/beta - Vxbgmtcl ; Ps0_iniB_dVgb = Chi_B_dVgb/beta; Ps0_iniB_dVxb = Chi_B_dVxb/beta- Vxbgmtcl_dVxbgmt; Ps0_iniB_dT = Chi_B_dT/beta - Chi_B/(beta*beta)*beta_dT - Vxbgmtcl_dT; /* construction of Ps0LD by taking Ps0_iniB as an upper limit of Ps0_iniA * * Limiting is done for Chi rather than for Ps0LD, to avoid shifting * for Fn_SU2 */ Chi_A = Chi; Chi_A_dVxb = Chi_dVxb; Chi_A_dVgb = Chi_dVgb; Chi_A_dT = Chi_dT; Fn_SU2( Chi, Chi_A, Chi_B, c_ps0ini_2*75.00, T1, T2 ); /* org: 50 */ Chi_dVgb = Chi_A_dVgb * T1 + Chi_B_dVgb * T2; Chi_dVxb = Chi_A_dVxb * T1 + Chi_B_dVxb * T2; Chi_dT = Chi_A_dT * T1 + Chi_B_dT * T2; } /* updating Ps0LD */ Ps0LD= Chi/beta - Vxbgmtcl ; Ps0LD_dVgb = Chi_dVgb/beta; Ps0LD_dVxb = Chi_dVxb/beta- Vxbgmtcl_dVxbgmt; Ps0LD_dT = Chi_dT/beta - Chi/(beta*beta)*beta_dT - Vxbgmtcl_dT; T1 = Chi - 1.0 + exp(-Chi); T1_dVxb = (1.0 - exp(-Chi)) * Chi_dVxb ; T1_dVgb = (1.0 - exp(-Chi)) * Chi_dVgb ; T1_dT = (1.0 - exp(-Chi)) * Chi_dT ; if (T1 < epsm10) { T1 = epsm10 ; T1_dVxb = 0.0 ; T1_dVgb = 0.0 ; T1_dT = 0.0 ; } T2 = sqrt(T1); QbuLD = cnst0over_func * T2 ; T3 = cnst0over_func * 0.5 / T2 ; QbuLD_dVxb = T3 * T1_dVxb ; QbuLD_dVgb = T3 * T1_dVgb ; QbuLD_dT = T3 * T1_dT + cnst0over_func_dT * T2 ; /*-----------------------------------------------------------* * QsuLD : Qovs or Qovd in unit area. * note: QsuLD = Qdep+Qinv. *-----------------*/ QsuLD = Cox0 * ( VgpLD - Ps0LD ) ; QsuLD_dVxb = Cox0 * ( - Ps0LD_dVxb ) ; QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ; QsuLD_dT = Cox0 * ( - Ps0LD_dT ) ; if ( model->HSMHV_coqovsm == 1 ) { /* take initial values from analytical model */ /*---------------------------------------------------* * Calculation of Ps0LD. (beginning of Newton loop) * - Fs0 : Fs0 = 0 is the equation to be solved. * - dPs0 : correction value. *-----------------*/ /* initial value too close to flat band should not be used */ // if (Ps0LD+Vxbgmtcl < 1.0e-2) Ps0LD = 1.0e-2 - Vxbgmtcl; exp_bVbs = exp( beta * - Vxbgmtcl ) ; T0 = here->HSMHV_nin / Nover_func; cnst1over = T0 * T0; cnst1over_dT = 2.0 * T0 * ( Nin_dT / Nover_func ); cfs1 = cnst1over * exp_bVbs ; flg_conv = 0 ; for ( lp_s0 = 1 ; lp_s0 <= 2*lp_s0_max + 1 ; lp_s0 ++ ) { Chi = beta * ( Ps0LD + Vxbgmtcl ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0LD) *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; fs01 = cfs1 * fi * fi ; fs01_dPs0 = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fs02 = sqrt( fb * fb + fs01 + small ) ; fs02_dPs0 = ( beta * fb_dChi * 2 * fb + fs01_dPs0 ) / ( fs02 + fs02 ) ; } else { /*-------------------------------------------* * zone-D3. (Ps0LD) *-----------------*/ if ( Chi < large_arg ) { /* avoid exp_Chi to become extremely large */ exp_Chi = exp( Chi ) ; fs01 = cfs1 * ( exp_Chi - 1.0e0 ) ; fs01_dPs0 = cfs1 * beta * ( exp_Chi ) ; } else { exp_bPs0 = exp( beta*Ps0LD ) ; fs01 = cnst1over * ( exp_bPs0 - exp_bVbs ) ; fs01_dPs0 = cnst1over * beta * exp_bPs0 ; } fs02 = sqrt( Chi - 1.0 + fs01 ) ; fs02_dPs0 = ( beta + fs01_dPs0 ) / fs02 * 0.5 ; } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * Fs0 *-----------------*/ Fs0 = VgpLD - Ps0LD - fac1 * fs02 ; Fs0_dPs0 = - 1.0e0 - fac1 * fs02_dPs0 ; if ( flg_conv == 1 ) break ; dPs0 = - Fs0 / Fs0_dPs0 ; /*-------------------------------------------* * Update Ps0LD . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Ps0LD))) ; if ( fabs( dPs0 ) > dPlim ) dPs0 = dPlim * Fn_Sgn( dPs0 ) ; Ps0LD = Ps0LD + dPs0 ; TX = -Vxbgmtcl + ps_conv / 2 ; if ( Ps0LD < TX ) Ps0LD = TX ; /*-------------------------------------------* * Check convergence. *-----------------*/ if ( fabs( dPs0 ) <= ps_conv && fabs( Fs0 ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Ps0LD Newton loop */ /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM_HV): Went Over Iteration Maximum (Ps0LD)\n" ) ; fprintf( stderr , " -Vxbgmtcl = %e Vgbgmt = %e\n" , -Vxbgmtcl , Vgbgmt ) ; } /*---------------------------------------------------* * Evaluate derivatives of Ps0LD. *-----------------*/ Chi_dT = beta_dT * ( Ps0LD + Vxbgmtcl ) + beta * Vxbgmtcl_dT; exp_bVbs_dT = - ( beta_dT * Vxbgmtcl + beta * Vxbgmtcl_dT ) * exp_bVbs; cfs1_dT = exp_bVbs * cnst1over_dT + exp_bVbs_dT * cnst1over; if ( Chi < znbd5 ) { fs01_dVbs = cfs1 * beta * fi * ( - fi + 2 * fi_dChi ) ; /* fs01_dVxbgmtcl */ fs01_dT = cfs1 * 2 * fi * fi_dChi * Chi_dT + fi * fi * cfs1_dT ; T2 = 1.0e0 / ( fs02 + fs02 ) ; fs02_dVbs = ( + beta * fb_dChi * 2 * fb + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */ fs02_dT = ( 2 * fb * fb_dChi * Chi_dT + fs01_dT ) * T2 ; } else { if ( Chi < large_arg ) { fs01_dVbs = + cfs1 * beta ; /* fs01_dVxbgmtcl */ exp_Chi_dT = exp_Chi * Chi_dT ; fs01_dT = ( exp_Chi - 1.0e0 ) * cfs1_dT + cfs1 * exp_Chi_dT ; } else { fs01_dVbs = + cfs1 * beta ; exp_bPs0_dT = exp_bPs0 * Ps0LD * beta_dT ; fs01_dT = cnst1over_dT*(exp_bPs0-exp_bVbs) + cnst1over*(exp_bPs0_dT-exp_bVbs_dT) ; } T2 = 0.5e0 / fs02 ; fs02_dVbs = ( + beta + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */ fs02_dT = T2 * ( Chi_dT + fs01_dT ) ; } T1 = 1.0 / Fs0_dPs0 ; Ps0LD_dVxb = - ( - fac1 * fs02_dVbs ) * T1 ; Ps0LD_dVds = 0.0 ; Ps0LD_dVgb = - ( VgpLD_dVgb - fac1_dVgs * fs02 ) * T1 ; Ps0LD_dT = - ( - ( fac1 * fs02_dT + fac1_dT * fs02 ) ) * T1; Chi_dT = beta_dT * ( Ps0LD + Vxbgmtcl ) + beta * ( Ps0LD_dT + Vxbgmtcl_dT ); if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0LD) *-----------------*/ if ( Chi < znbd3 ) { flg_ovzone = 1; } else { flg_ovzone = 2; } Xi0 = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xi0_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0_dVxbgmtcl */ Xi0_dVds = T1 * Ps0LD_dVds ; Xi0_dVgs = T1 * Ps0LD_dVgb ; Xi0_dT = 2 * fb * fb_dChi * Chi_dT ; Xi0p12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xi0p12_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p12_dVxbgmtcl */ Xi0p12_dVds = T1 * Ps0LD_dVds ; Xi0p12_dVgs = T1 * Ps0LD_dVgb ; Xi0p12_dT = fb_dChi * Chi_dT ; Xi0p32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xi0p32_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p32_dVxbgmtcl */ Xi0p32_dVds = T1 * Ps0LD_dVds ; Xi0p32_dVgs = T1 * Ps0LD_dVgb ; Xi0p32_dT = 3 * fb * fb * fb_dChi * Chi_dT ; } else { /*-------------------------------------------* * zone-D3. (Ps0LD) *-----------------*/ flg_ovzone = 3 ; Xi0 = Chi - 1.0e0 ; Xi0_dVbs = beta * ( Ps0LD_dVxb + 1.0e0 ) ; /* Xi0_dVxbgmtcl */ Xi0_dVds = beta * Ps0LD_dVds ; Xi0_dVgs = beta * Ps0LD_dVgb ; Xi0_dT = Chi_dT ; Xi0p12 = sqrt( Xi0 ) ; T1 = 0.5e0 / Xi0p12 ; Xi0p12_dVbs = T1 * Xi0_dVbs ; Xi0p12_dVds = T1 * Xi0_dVds ; Xi0p12_dVgs = T1 * Xi0_dVgs ; Xi0p12_dT = T1 * Xi0_dT ; Xi0p32 = Xi0 * Xi0p12 ; T1 = 1.5e0 * Xi0p12 ; Xi0p32_dVbs = T1 * Xi0_dVbs ; Xi0p32_dVds = T1 * Xi0_dVds ; Xi0p32_dVgs = T1 * Xi0_dVgs ; Xi0p32_dT = T1 * Xi0_dT ; } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * - Recalculate the derivatives of fs01 and fs02. *-----------------*/ fs01_dVbs = Ps0LD_dVxb * fs01_dPs0 + fs01_dVbs ; fs01_dVds = Ps0LD_dVds * fs01_dPs0 ; fs01_dVgs = Ps0LD_dVgb * fs01_dPs0 ; fs01_dT = Ps0LD_dT * fs01_dPs0 + fs01_dT; fs02_dVbs = Ps0LD_dVxb * fs02_dPs0 + fs02_dVbs ; fs02_dVxb = Ps0LD_dVds * fs02_dPs0 ; fs02_dVgb = Ps0LD_dVgb * fs02_dPs0 ; fs02_dT = Ps0LD_dT * fs02_dPs0 + fs02_dT; /*-----------------------------------------------------------* * QbuLD and QiuLD *-----------------*/ QbuLD = cnst0over_func * Xi0p12 ; QbuLD_dVxb = cnst0over_func * Xi0p12_dVbs ; QbuLD_dVgb = cnst0over_func * Xi0p12_dVgs ; QbuLD_dT = cnst0over_func * Xi0p12_dT + cnst0over_func_dT * Xi0p12; T1 = 1.0 / ( fs02 + Xi0p12 ) ; QiuLD = cnst0over_func * fs01 * T1 ; T2 = 1.0 / ( fs01 + epsm10 ) ; QiuLD_dVbs = QiuLD * ( fs01_dVbs * T2 - ( fs02_dVbs + Xi0p12_dVbs ) * T1 ) ; QiuLD_dVgs = QiuLD * ( fs01_dVgs * T2 - ( fs02_dVgb + Xi0p12_dVgs ) * T1 ) ; T1_dT = - T1 * T1 * ( fs02_dT + Xi0p12_dT ); QiuLD_dT = cnst0over_func * ( fs01 * T1_dT + T1 * fs01_dT ) + fs01 * T1 * cnst0over_func_dT; /*-----------------------------------------------------------* * Extrapolation: X_dVxbgmt = X_dVxbgmtcl * Vxbgmtcl_dVxbgmt *-----------------*/ QbuLD_dVxb *= Vxbgmtcl_dVxbgmt ; QiuLD_dVbs *= Vxbgmtcl_dVxbgmt ; /*-----------------------------------------------------------* * Total overlap charge *-----------------*/ QsuLD = QbuLD + QiuLD; QsuLD_dVxb = QbuLD_dVxb + QiuLD_dVbs; QsuLD_dVgb = QbuLD_dVgb + QiuLD_dVgs; QsuLD_dT = QbuLD_dT + QiuLD_dT; } /* end of COQOVSM branches */ } /* end of Vgbgmt region blocks */ /* convert to source ref. */ Ps0LD_dVbs = Ps0LD_dVxb * Vxbgmt_dVbs + Ps0LD_dVgb * Vgbgmt_dVbs ; Ps0LD_dVds = Ps0LD_dVxb * Vxbgmt_dVds + Ps0LD_dVgb * Vgbgmt_dVds ; Ps0LD_dVgs = Ps0LD_dVxb * Vxbgmt_dVgs + Ps0LD_dVgb * Vgbgmt_dVgs ; QsuLD_dVbs = QsuLD_dVxb * Vxbgmt_dVbs + QsuLD_dVgb * Vgbgmt_dVbs ; QsuLD_dVds = QsuLD_dVxb * Vxbgmt_dVds + QsuLD_dVgb * Vgbgmt_dVds ; QsuLD_dVgs = QsuLD_dVxb * Vxbgmt_dVgs + QsuLD_dVgb * Vgbgmt_dVgs ; QbuLD_dVbs = QbuLD_dVxb * Vxbgmt_dVbs + QbuLD_dVgb * Vgbgmt_dVbs ; QbuLD_dVds = QbuLD_dVxb * Vxbgmt_dVds + QbuLD_dVgb * Vgbgmt_dVds ; QbuLD_dVgs = QbuLD_dVxb * Vxbgmt_dVgs + QbuLD_dVgb * Vgbgmt_dVgs ; /* inversion charge = total - depletion */ QiuLD = QsuLD - QbuLD ; QiuLD_dVbs = QsuLD_dVbs - QbuLD_dVbs ; QiuLD_dVds = QsuLD_dVds - QbuLD_dVds ; QiuLD_dVgs = QsuLD_dVgs - QbuLD_dVgs ; QiuLD_dT = QsuLD_dT - QbuLD_dT ; /* End HSMHVevalQover */ ngspice-26/src/spicelib/devices/hisimhv1/hsmhvpar.c0000644000265600020320000001302312264261473021757 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvpar.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int HSMHVparam( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; HSMHVinstance *here = (HSMHVinstance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch (param) { case HSMHV_COSELFHEAT: here->HSMHV_coselfheat = value->iValue; here->HSMHV_coselfheat_Given = TRUE; break; case HSMHV_COSUBNODE: here->HSMHV_cosubnode = value->iValue; here->HSMHV_cosubnode_Given = TRUE; break; case HSMHV_W: here->HSMHV_w = value->rValue * scale; here->HSMHV_w_Given = TRUE; break; case HSMHV_L: here->HSMHV_l = value->rValue * scale; here->HSMHV_l_Given = TRUE; break; case HSMHV_AS: here->HSMHV_as = value->rValue * scale * scale; here->HSMHV_as_Given = TRUE; break; case HSMHV_AD: here->HSMHV_ad = value->rValue * scale * scale; here->HSMHV_ad_Given = TRUE; break; case HSMHV_PS: here->HSMHV_ps = value->rValue * scale; here->HSMHV_ps_Given = TRUE; break; case HSMHV_PD: here->HSMHV_pd = value->rValue * scale; here->HSMHV_pd_Given = TRUE; break; case HSMHV_NRS: here->HSMHV_nrs = value->rValue; here->HSMHV_nrs_Given = TRUE; break; case HSMHV_NRD: here->HSMHV_nrd = value->rValue; here->HSMHV_nrd_Given = TRUE; break; case HSMHV_DTEMP: here->HSMHV_dtemp = value->rValue; here->HSMHV_dtemp_Given = TRUE; break; case HSMHV_OFF: here->HSMHV_off = value->iValue; break; case HSMHV_IC_VBS: here->HSMHV_icVBS = value->rValue; here->HSMHV_icVBS_Given = TRUE; break; case HSMHV_IC_VDS: here->HSMHV_icVDS = value->rValue; here->HSMHV_icVDS_Given = TRUE; break; case HSMHV_IC_VGS: here->HSMHV_icVGS = value->rValue; here->HSMHV_icVGS_Given = TRUE; break; case HSMHV_IC: switch (value->v.numValue) { case 3: here->HSMHV_icVBS = *(value->v.vec.rVec + 2); here->HSMHV_icVBS_Given = TRUE; case 2: here->HSMHV_icVGS = *(value->v.vec.rVec + 1); here->HSMHV_icVGS_Given = TRUE; case 1: here->HSMHV_icVDS = *(value->v.vec.rVec); here->HSMHV_icVDS_Given = TRUE; break; default: return(E_BADPARM); } break; case HSMHV_CORBNET: here->HSMHV_corbnet = value->iValue; here->HSMHV_corbnet_Given = TRUE; break; case HSMHV_RBPB: here->HSMHV_rbpb = value->rValue; here->HSMHV_rbpb_Given = TRUE; break; case HSMHV_RBPD: here->HSMHV_rbpd = value->rValue; here->HSMHV_rbpd_Given = TRUE; break; case HSMHV_RBPS: here->HSMHV_rbps = value->rValue; here->HSMHV_rbps_Given = TRUE; break; case HSMHV_RBDB: here->HSMHV_rbdb = value->rValue; here->HSMHV_rbdb_Given = TRUE; break; case HSMHV_RBSB: here->HSMHV_rbsb = value->rValue; here->HSMHV_rbsb_Given = TRUE; break; case HSMHV_CORG: here->HSMHV_corg = value->iValue; here->HSMHV_corg_Given = TRUE; break; case HSMHV_NGCON: here->HSMHV_ngcon = value->rValue; here->HSMHV_ngcon_Given = TRUE; break; case HSMHV_XGW: here->HSMHV_xgw = value->rValue; here->HSMHV_xgw_Given = TRUE; break; case HSMHV_XGL: here->HSMHV_xgl = value->rValue; here->HSMHV_xgl_Given = TRUE; break; case HSMHV_NF: here->HSMHV_nf = value->rValue; here->HSMHV_nf_Given = TRUE; break; case HSMHV_SA: here->HSMHV_sa = value->rValue; here->HSMHV_sa_Given = TRUE; break; case HSMHV_SB: here->HSMHV_sb = value->rValue; here->HSMHV_sb_Given = TRUE; break; case HSMHV_SD: here->HSMHV_sd = value->rValue; here->HSMHV_sd_Given = TRUE; break; case HSMHV_NSUBCDFM: here->HSMHV_nsubcdfm = value->rValue; here->HSMHV_nsubcdfm_Given = TRUE; break; case HSMHV_M: here->HSMHV_m = value->rValue; here->HSMHV_m_Given = TRUE; break; case HSMHV_SUBLD1: here->HSMHV_subld1 = value->rValue; here->HSMHV_subld1_Given = TRUE; break; case HSMHV_SUBLD2: here->HSMHV_subld2 = value->rValue; here->HSMHV_subld2_Given = TRUE; break; case HSMHV_LOVER: here->HSMHV_lover = value->rValue; here->HSMHV_lover_Given = TRUE; break; case HSMHV_LOVERS: here->HSMHV_lovers = value->rValue; here->HSMHV_lovers_Given = TRUE; break; case HSMHV_LOVERLD: here->HSMHV_loverld = value->rValue; here->HSMHV_loverld_Given = TRUE; break; case HSMHV_LDRIFT1: here->HSMHV_ldrift1 = value->rValue; here->HSMHV_ldrift1_Given = TRUE; break; case HSMHV_LDRIFT2: here->HSMHV_ldrift2 = value->rValue; here->HSMHV_ldrift2_Given = TRUE; break; case HSMHV_LDRIFT1S: here->HSMHV_ldrift1s = value->rValue; here->HSMHV_ldrift1s_Given = TRUE; break; case HSMHV_LDRIFT2S: here->HSMHV_ldrift2s = value->rValue; here->HSMHV_ldrift2s_Given = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvset.c0000644000265600020320000023357312264261473022006 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvset.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "hsmhvevalenv.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define C_m2cm (1.0e2) #define C_cm2m_p3 (1.0e-6) #define C_m2cm_p1o2 (1.0e1) #define BINNING(param) pParam->HSMHV_##param = model->HSMHV_##param \ + model->HSMHV_l##param / Lbin + model->HSMHV_w##param / Wbin \ + model->HSMHV_p##param / LWbin ; #define RANGECHECK(param, min, max, pname) \ if ( (param) < (min) || (param) > (max) ) { \ printf("warning(HiSIMHV): The model/instance parameter %s (= %e) must be in the range [%e , %e].\n", \ (pname), (param), (double) (min), (double) (max) ); \ } #define MINCHECK(param, min, pname) \ if ( (param) < (min) ) { \ printf("warning(HiSIMHV): The model/instance parameter %s (= %e) must be greater than %e.\n", \ (pname), (param), (min) ); \ } int HSMHVsetup( register SMPmatrix *matrix, register GENmodel *inModel, register CKTcircuit *ckt, int *states) /* load the HSMHV device structure with those pointers needed later * for fast matrix loading */ { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; int error=0 ; CKTnode *tmp; double T2, Rd, Rs ; HSMHVbinningParam *pParam ; HSMHVmodelMKSParam *modelMKS ; HSMHVhereMKSParam *hereMKS ; double LG=0.0, WG =0.0, Lgate =0.0, Wgate =0.0 ; double Lbin=0.0, Wbin=0.0, LWbin =0.0; /* binning */ /* loop through all the HSMHV device models */ for ( ;model != NULL ;model = model->HSMHVnextModel ) { /* Default value Processing for HVMOS Models */ if ( !model->HSMHV_type_Given ) model->HSMHV_type = NMOS ; if ( !model->HSMHV_info_Given ) model->HSMHV_info = 0 ; model->HSMHV_noise = 1; if ( !model->HSMHV_version_Given) { model->HSMHV_version = "1.23" ; printf(" 1.23 is selected for VERSION. (default) \n"); } else { if (strcmp(model->HSMHV_version,"1.23") != 0 ) { model->HSMHV_version = "1.23" ; printf(" 1.23 is the only available VERSION. \n"); printf(" 1.23 is selected for VERSION. (default) \n"); } else { printf(" %s is selected for VERSION \n", model->HSMHV_version); } } if ( !model->HSMHV_corsrd_Given ) model->HSMHV_corsrd = 3 ; if ( !model->HSMHV_corg_Given ) model->HSMHV_corg = 0 ; if ( !model->HSMHV_coiprv_Given ) model->HSMHV_coiprv = 1 ; if ( !model->HSMHV_copprv_Given ) model->HSMHV_copprv = 1 ; if ( !model->HSMHV_coadov_Given ) model->HSMHV_coadov = 1 ; if ( !model->HSMHV_coisub_Given ) model->HSMHV_coisub = 0 ; if ( !model->HSMHV_coiigs_Given ) model->HSMHV_coiigs = 0 ; if ( !model->HSMHV_cogidl_Given ) model->HSMHV_cogidl = 0 ; if ( !model->HSMHV_coovlp_Given ) model->HSMHV_coovlp = 1 ; if ( !model->HSMHV_coovlps_Given ) model->HSMHV_coovlps = 0 ; if ( !model->HSMHV_coflick_Given ) model->HSMHV_coflick = 0 ; if ( !model->HSMHV_coisti_Given ) model->HSMHV_coisti = 0 ; if ( !model->HSMHV_conqs_Given ) model->HSMHV_conqs = 0 ; /* QS (default) */ if ( !model->HSMHV_cothrml_Given ) model->HSMHV_cothrml = 0 ; if ( !model->HSMHV_coign_Given ) model->HSMHV_coign = 0 ; /* induced gate noise */ if ( !model->HSMHV_codfm_Given ) model->HSMHV_codfm = 0 ; /* DFM */ if ( !model->HSMHV_coqovsm_Given ) model->HSMHV_coqovsm = 1 ; if ( !model->HSMHV_corbnet_Given ) model->HSMHV_corbnet = 0 ; else if ( model->HSMHV_corbnet != 0 && model->HSMHV_corbnet != 1 ) { model->HSMHV_corbnet = 0; printf("warning(HiSIMHV): CORBNET has been set to its default value: %d.\n", model->HSMHV_corbnet); } if ( !model->HSMHV_coselfheat_Given ) model->HSMHV_coselfheat = 0 ; /* Self-heating model */ if ( !model->HSMHV_cosubnode_Given ) model->HSMHV_cosubnode = 0 ; if ( !model->HSMHV_cosym_Given ) model->HSMHV_cosym = 0 ; /* Symmetry model for HV */ if ( !model->HSMHV_cotemp_Given ) model->HSMHV_cotemp = 0 ; if ( !model->HSMHV_coldrift_Given ) model->HSMHV_coldrift = 0 ; if ( !model->HSMHV_vmax_Given ) model->HSMHV_vmax = 1.0e7 ; if ( !model->HSMHV_vmaxt1_Given ) model->HSMHV_vmaxt1 = 0.0 ; if ( !model->HSMHV_vmaxt2_Given ) model->HSMHV_vmaxt2 = 0.0 ; if ( !model->HSMHV_bgtmp1_Given ) model->HSMHV_bgtmp1 = 90.25e-6 ; if ( !model->HSMHV_bgtmp2_Given ) model->HSMHV_bgtmp2 = 1.0e-7 ; if ( !model->HSMHV_eg0_Given ) model->HSMHV_eg0 = 1.1785e0 ; if ( !model->HSMHV_tox_Given ) model->HSMHV_tox = 30e-9 ; if ( !model->HSMHV_xld_Given ) model->HSMHV_xld = 0.0 ; if ( !model->HSMHV_lovers_Given ) model->HSMHV_lovers = 30e-9 ; if ( model->HSMHV_lover_Given ) model->HSMHV_lovers = model->HSMHV_lover ; if ( !model->HSMHV_rdov11_Given ) model->HSMHV_rdov11 = 0.0 ; if ( !model->HSMHV_rdov12_Given ) model->HSMHV_rdov12 = 1.0 ; if ( !model->HSMHV_rdov13_Given ) model->HSMHV_rdov13 = 1.0 ; if ( !model->HSMHV_rdslp1_Given ) model->HSMHV_rdslp1 = 1.0 ; if ( !model->HSMHV_rdict1_Given ) model->HSMHV_rdict1 = 1.0 ; if ( !model->HSMHV_rdslp2_Given ) model->HSMHV_rdslp2 = 1.0 ; if ( !model->HSMHV_rdict2_Given ) model->HSMHV_rdict2 = 0.0 ; if ( !model->HSMHV_loverld_Given ) model->HSMHV_loverld = 1.0e-6 ; if ( !model->HSMHV_ldrift1_Given ) model->HSMHV_ldrift1 = 1.0e-6 ; if ( !model->HSMHV_ldrift2_Given ) model->HSMHV_ldrift2 = 1.0e-6 ; if ( !model->HSMHV_ldrift1s_Given ) model->HSMHV_ldrift1s = 0.0 ; if ( !model->HSMHV_ldrift2s_Given ) model->HSMHV_ldrift2s = 1.0e-6 ; if ( !model->HSMHV_subld1_Given ) model->HSMHV_subld1 = 0.0 ; if ( !model->HSMHV_subld2_Given ) model->HSMHV_subld2 = 0.0 ; if ( !model->HSMHV_ddltmax_Given ) model->HSMHV_ddltmax = 10.0 ; /* Vdseff */ if ( !model->HSMHV_ddltslp_Given ) model->HSMHV_ddltslp = 0.0 ; /* Vdseff */ if ( !model->HSMHV_ddltict_Given ) model->HSMHV_ddltict = 10.0 ; /* Vdseff */ if ( !model->HSMHV_vfbover_Given ) model->HSMHV_vfbover = -0.5 ; if ( !model->HSMHV_nover_Given ) model->HSMHV_nover = 3.0e16 ; if ( !model->HSMHV_novers_Given ) model->HSMHV_novers = 0.0 ; if ( !model->HSMHV_xwd_Given ) model->HSMHV_xwd = 0.0 ; if ( !model->HSMHV_xwdc_Given ) model->HSMHV_xwdc = model->HSMHV_xwd ; if ( !model->HSMHV_xl_Given ) model->HSMHV_xl = 0.0 ; if ( !model->HSMHV_xw_Given ) model->HSMHV_xw = 0.0 ; if ( !model->HSMHV_saref_Given ) model->HSMHV_saref = 1e-6 ; if ( !model->HSMHV_sbref_Given ) model->HSMHV_sbref = 1e-6 ; if ( !model->HSMHV_ll_Given ) model->HSMHV_ll = 0.0 ; if ( !model->HSMHV_lld_Given ) model->HSMHV_lld = 0.0 ; if ( !model->HSMHV_lln_Given ) model->HSMHV_lln = 0.0 ; if ( !model->HSMHV_wl_Given ) model->HSMHV_wl = 0.0 ; if ( !model->HSMHV_wl1_Given ) model->HSMHV_wl1 = 0.0 ; if ( !model->HSMHV_wl1p_Given ) model->HSMHV_wl1p = 1.0 ; if ( !model->HSMHV_wl2_Given ) model->HSMHV_wl2 = 0.0 ; if ( !model->HSMHV_wl2p_Given ) model->HSMHV_wl2p = 1.0 ; if ( !model->HSMHV_wld_Given ) model->HSMHV_wld = 0.0 ; if ( !model->HSMHV_wln_Given ) model->HSMHV_wln = 0.0 ; if ( !model->HSMHV_rsh_Given ) model->HSMHV_rsh = 0.0 ; if ( !model->HSMHV_rshg_Given ) model->HSMHV_rshg = 0.0 ; if ( !model->HSMHV_xqy_Given ) model->HSMHV_xqy = 0.0 ; if ( !model->HSMHV_xqy1_Given ) model->HSMHV_xqy1 = 0.0 ; if ( !model->HSMHV_xqy2_Given ) model->HSMHV_xqy2 = 0.0 ; if ( !model->HSMHV_rs_Given ) model->HSMHV_rs = 0.0 ; if ( !model->HSMHV_rd_Given ) model->HSMHV_rd = 5.0e-3 ; if ( !model->HSMHV_vfbc_Given ) model->HSMHV_vfbc = -1.0 ; if ( !model->HSMHV_vbi_Given ) model->HSMHV_vbi = 1.1 ; if ( !model->HSMHV_nsubc_Given ) model->HSMHV_nsubc = 5.0e17 ; if ( !model->HSMHV_parl2_Given ) model->HSMHV_parl2 = 10.0e-9 ; if ( !model->HSMHV_lp_Given ) model->HSMHV_lp = 0.0 ; if ( !model->HSMHV_nsubp_Given ) model->HSMHV_nsubp = 1.0e18 ; if ( !model->HSMHV_nsubp0_Given ) model->HSMHV_nsubp0 = 0.0 ; if ( !model->HSMHV_nsubwp_Given ) model->HSMHV_nsubwp = 1.0 ; if ( !model->HSMHV_scp1_Given ) model->HSMHV_scp1 = 1.0 ; if ( !model->HSMHV_scp2_Given ) model->HSMHV_scp2 = 0.0 ; if ( !model->HSMHV_scp3_Given ) model->HSMHV_scp3 = 0.0 ; if ( !model->HSMHV_sc1_Given ) model->HSMHV_sc1 = 1.0 ; if ( !model->HSMHV_sc2_Given ) model->HSMHV_sc2 = 0.0 ; if ( !model->HSMHV_sc3_Given ) model->HSMHV_sc3 = 0.0 ; if ( !model->HSMHV_sc4_Given ) model->HSMHV_sc4 = 0.0 ; if ( !model->HSMHV_pgd1_Given ) model->HSMHV_pgd1 = 0.0 ; if ( !model->HSMHV_pgd2_Given ) model->HSMHV_pgd2 = 1.0 ; if ( !model->HSMHV_pgd3_Given ) model->HSMHV_pgd3 = 0.8 ; if ( !model->HSMHV_pgd4_Given ) model->HSMHV_pgd4 = 0.0 ; if ( !model->HSMHV_ndep_Given ) model->HSMHV_ndep = 1.0 ; if ( !model->HSMHV_ndepl_Given ) model->HSMHV_ndepl = 0.0 ; if ( !model->HSMHV_ndeplp_Given ) model->HSMHV_ndeplp = 1.0 ; if ( !model->HSMHV_ninv_Given ) model->HSMHV_ninv = 0.5 ; if ( !model->HSMHV_muecb0_Given ) model->HSMHV_muecb0 = 1.0e3 ; if ( !model->HSMHV_muecb1_Given ) model->HSMHV_muecb1 = 100.0 ; if ( !model->HSMHV_mueph0_Given ) model->HSMHV_mueph0 = 300.0e-3 ; if ( !model->HSMHV_mueph1_Given ) { if (model->HSMHV_type == NMOS) model->HSMHV_mueph1 = 25.0e3 ; else model->HSMHV_mueph1 = 9.0e3 ; } if ( !model->HSMHV_muephw_Given ) model->HSMHV_muephw = 0.0 ; if ( !model->HSMHV_muepwp_Given ) model->HSMHV_muepwp = 1.0 ; if ( !model->HSMHV_muephl_Given ) model->HSMHV_muephl = 0.0 ; if ( !model->HSMHV_mueplp_Given ) model->HSMHV_mueplp = 1.0 ; if ( !model->HSMHV_muephs_Given ) model->HSMHV_muephs = 0.0 ; if ( !model->HSMHV_muepsp_Given ) model->HSMHV_muepsp = 1.0 ; if ( !model->HSMHV_vtmp_Given ) model->HSMHV_vtmp = 0.0 ; if ( !model->HSMHV_wvth0_Given ) model->HSMHV_wvth0 = 0.0 ; if ( !model->HSMHV_muesr0_Given ) model->HSMHV_muesr0 = 2.0 ; if ( !model->HSMHV_muesr1_Given ) model->HSMHV_muesr1 = 1.0e16 ; if ( !model->HSMHV_muesrl_Given ) model->HSMHV_muesrl = 0.0 ; if ( !model->HSMHV_muesrw_Given ) model->HSMHV_muesrw = 0.0 ; if ( !model->HSMHV_mueswp_Given ) model->HSMHV_mueswp = 1.0 ; if ( !model->HSMHV_mueslp_Given ) model->HSMHV_mueslp = 1.0 ; if ( !model->HSMHV_muetmp_Given ) model->HSMHV_muetmp = 1.5 ; if ( !model->HSMHV_bb_Given ) { if (model->HSMHV_type == NMOS) model->HSMHV_bb = 2.0 ; else model->HSMHV_bb = 1.0 ; } if ( !model->HSMHV_sub1_Given ) model->HSMHV_sub1 = 10.0 ; if ( !model->HSMHV_sub2_Given ) model->HSMHV_sub2 = 25.0 ; if ( !model->HSMHV_svgs_Given ) model->HSMHV_svgs = 0.8e0 ; if ( !model->HSMHV_svbs_Given ) model->HSMHV_svbs = 0.5e0 ; if ( !model->HSMHV_svbsl_Given ) model->HSMHV_svbsl = 0e0 ; if ( !model->HSMHV_svds_Given ) model->HSMHV_svds = 0.8e0 ; if ( !model->HSMHV_slg_Given ) model->HSMHV_slg = 30e-9 ; if ( !model->HSMHV_sub1l_Given ) model->HSMHV_sub1l = 2.5e-3 ; if ( !model->HSMHV_sub2l_Given ) model->HSMHV_sub2l = 2e-6 ; if ( !model->HSMHV_fn1_Given ) model->HSMHV_fn1 = 50e0 ; if ( !model->HSMHV_fn2_Given ) model->HSMHV_fn2 = 170e-6 ; if ( !model->HSMHV_fn3_Given ) model->HSMHV_fn3 = 0e0 ; if ( !model->HSMHV_fvbs_Given ) model->HSMHV_fvbs = 12e-3 ; if ( !model->HSMHV_svgsl_Given ) model->HSMHV_svgsl = 0.0 ; if ( !model->HSMHV_svgslp_Given ) model->HSMHV_svgslp = 1.0 ; if ( !model->HSMHV_svgswp_Given ) model->HSMHV_svgswp = 1.0 ; if ( !model->HSMHV_svgsw_Given ) model->HSMHV_svgsw = 0.0 ; if ( !model->HSMHV_svbslp_Given ) model->HSMHV_svbslp = 1.0 ; if ( !model->HSMHV_slgl_Given ) model->HSMHV_slgl = 0.0 ; if ( !model->HSMHV_slglp_Given ) model->HSMHV_slglp = 1.0 ; if ( !model->HSMHV_sub1lp_Given ) model->HSMHV_sub1lp = 1.0 ; if ( !model->HSMHV_nsti_Given ) model->HSMHV_nsti = 1.0e17 ; if ( !model->HSMHV_wsti_Given ) model->HSMHV_wsti = 0.0 ; if ( !model->HSMHV_wstil_Given ) model->HSMHV_wstil = 0.0 ; if ( !model->HSMHV_wstilp_Given ) model->HSMHV_wstilp = 1.0 ; if ( !model->HSMHV_wstiw_Given ) model->HSMHV_wstiw = 0.0 ; if ( !model->HSMHV_wstiwp_Given ) model->HSMHV_wstiwp = 1.0 ; if ( !model->HSMHV_scsti1_Given ) model->HSMHV_scsti1 = 0.0 ; if ( !model->HSMHV_scsti2_Given ) model->HSMHV_scsti2 = 0.0 ; if ( !model->HSMHV_vthsti_Given ) model->HSMHV_vthsti = 0.0 ; if ( !model->HSMHV_vdsti_Given ) model->HSMHV_vdsti = 0.0 ; if ( !model->HSMHV_muesti1_Given ) model->HSMHV_muesti1 = 0.0 ; if ( !model->HSMHV_muesti2_Given ) model->HSMHV_muesti2 = 0.0 ; if ( !model->HSMHV_muesti3_Given ) model->HSMHV_muesti3 = 1.0 ; if ( !model->HSMHV_nsubpsti1_Given ) model->HSMHV_nsubpsti1 = 0.0 ; if ( !model->HSMHV_nsubpsti2_Given ) model->HSMHV_nsubpsti2 = 0.0 ; if ( !model->HSMHV_nsubpsti3_Given ) model->HSMHV_nsubpsti3 = 1.0 ; if ( !model->HSMHV_lpext_Given ) model->HSMHV_lpext = 1.0e-50 ; if ( !model->HSMHV_npext_Given ) model->HSMHV_npext = 1.0e17 ; if ( !model->HSMHV_scp21_Given ) model->HSMHV_scp21 = 0.0 ; if ( !model->HSMHV_scp22_Given ) model->HSMHV_scp22 = 0.0 ; if ( !model->HSMHV_bs1_Given ) model->HSMHV_bs1 = 0.0 ; if ( !model->HSMHV_bs2_Given ) model->HSMHV_bs2 = 0.9 ; if ( !model->HSMHV_tpoly_Given ) model->HSMHV_tpoly = 200e-9 ; if ( !model->HSMHV_cgbo_Given ) model->HSMHV_cgbo = 0.0 ; if ( !model->HSMHV_js0_Given ) model->HSMHV_js0 = 0.5e-6 ; if ( !model->HSMHV_js0sw_Given ) model->HSMHV_js0sw = 0.0 ; if ( !model->HSMHV_nj_Given ) model->HSMHV_nj = 1.0 ; if ( !model->HSMHV_njsw_Given ) model->HSMHV_njsw = 1.0 ; if ( !model->HSMHV_xti_Given ) model->HSMHV_xti = 2.0 ; if ( !model->HSMHV_cj_Given ) model->HSMHV_cj = 5.0e-04 ; if ( !model->HSMHV_cjsw_Given ) model->HSMHV_cjsw = 5.0e-10 ; if ( !model->HSMHV_cjswg_Given ) model->HSMHV_cjswg = 5.0e-10 ; if ( !model->HSMHV_mj_Given ) model->HSMHV_mj = 0.5e0 ; if ( !model->HSMHV_mjsw_Given ) model->HSMHV_mjsw = 0.33e0 ; if ( !model->HSMHV_mjswg_Given ) model->HSMHV_mjswg = 0.33e0 ; if ( !model->HSMHV_pb_Given ) model->HSMHV_pb = 1.0e0 ; if ( !model->HSMHV_pbsw_Given ) model->HSMHV_pbsw = 1.0e0 ; if ( !model->HSMHV_pbswg_Given ) model->HSMHV_pbswg = 1.0e0 ; if ( !model->HSMHV_xti2_Given ) model->HSMHV_xti2 = 0.0e0 ; if ( !model->HSMHV_cisb_Given ) model->HSMHV_cisb = 0.0e0 ; if ( !model->HSMHV_cvb_Given ) model->HSMHV_cvb = 0.0e0 ; if ( !model->HSMHV_ctemp_Given ) model->HSMHV_ctemp = 0.0e0 ; if ( !model->HSMHV_cisbk_Given ) model->HSMHV_cisbk = 0.0e0 ; if ( !model->HSMHV_cvbk_Given ) model->HSMHV_cvbk = 0.0e0 ; if ( !model->HSMHV_divx_Given ) model->HSMHV_divx = 0.0e0 ; if ( !model->HSMHV_clm1_Given ) model->HSMHV_clm1 = 0.7 ; if ( !model->HSMHV_clm2_Given ) model->HSMHV_clm2 = 2.0 ; if ( !model->HSMHV_clm3_Given ) model->HSMHV_clm3 = 1.0 ; if ( !model->HSMHV_clm5_Given ) model->HSMHV_clm5 = 1.0 ; if ( !model->HSMHV_clm6_Given ) model->HSMHV_clm6 = 0.0 ; if ( !model->HSMHV_vover_Given ) model->HSMHV_vover = 0.3 ; if ( !model->HSMHV_voverp_Given ) model->HSMHV_voverp = 0.3 ; if ( !model->HSMHV_wfc_Given ) model->HSMHV_wfc = 0.0 ; if ( !model->HSMHV_nsubcw_Given ) model->HSMHV_nsubcw = 0.0 ; if ( !model->HSMHV_nsubcwp_Given ) model->HSMHV_nsubcwp = 1.0 ; if ( !model->HSMHV_qme1_Given ) model->HSMHV_qme1 = 0.0 ; if ( !model->HSMHV_qme2_Given ) model->HSMHV_qme2 = 0.0 ; if ( !model->HSMHV_qme3_Given ) model->HSMHV_qme3 = 0.0 ; if ( !model->HSMHV_vovers_Given ) model->HSMHV_vovers = 0.0 ; if ( !model->HSMHV_voversp_Given ) model->HSMHV_voversp = 0.0 ; if ( !model->HSMHV_gidl1_Given ) model->HSMHV_gidl1 = 2e0 ; if ( !model->HSMHV_gidl2_Given ) model->HSMHV_gidl2 = 3e7 ; if ( !model->HSMHV_gidl3_Given ) model->HSMHV_gidl3 = 0.9e0 ; if ( !model->HSMHV_gidl4_Given ) model->HSMHV_gidl4 = 0.0 ; if ( !model->HSMHV_gidl5_Given ) model->HSMHV_gidl5 = 0.2e0 ; if ( !model->HSMHV_gleak1_Given ) model->HSMHV_gleak1 = 50e0 ; if ( !model->HSMHV_gleak2_Given ) model->HSMHV_gleak2 = 10e6 ; if ( !model->HSMHV_gleak3_Given ) model->HSMHV_gleak3 = 60e-3 ; if ( !model->HSMHV_gleak4_Given ) model->HSMHV_gleak4 = 4e0 ; if ( !model->HSMHV_gleak5_Given ) model->HSMHV_gleak5 = 7.5e3 ; if ( !model->HSMHV_gleak6_Given ) model->HSMHV_gleak6 = 250e-3 ; if ( !model->HSMHV_gleak7_Given ) model->HSMHV_gleak7 = 1e-6 ; if ( !model->HSMHV_glpart1_Given ) model->HSMHV_glpart1 = 0.5 ; if ( !model->HSMHV_glksd1_Given ) model->HSMHV_glksd1 = 1.0e-15 ; if ( !model->HSMHV_glksd2_Given ) model->HSMHV_glksd2 = 5e6 ; if ( !model->HSMHV_glksd3_Given ) model->HSMHV_glksd3 = -5e6 ; if ( !model->HSMHV_glkb1_Given ) model->HSMHV_glkb1 = 5e-16 ; if ( !model->HSMHV_glkb2_Given ) model->HSMHV_glkb2 = 1e0 ; if ( !model->HSMHV_glkb3_Given ) model->HSMHV_glkb3 = 0e0 ; if ( !model->HSMHV_egig_Given ) model->HSMHV_egig = 0e0 ; if ( !model->HSMHV_igtemp2_Given ) model->HSMHV_igtemp2 = 0e0 ; if ( !model->HSMHV_igtemp3_Given ) model->HSMHV_igtemp3 = 0e0 ; if ( !model->HSMHV_vzadd0_Given ) model->HSMHV_vzadd0 = 10.0e-3 ; if ( !model->HSMHV_pzadd0_Given ) model->HSMHV_pzadd0 = 5.0e-3 ; if ( !model->HSMHV_nftrp_Given ) model->HSMHV_nftrp = 10e9 ; if ( !model->HSMHV_nfalp_Given ) model->HSMHV_nfalp = 1.0e-19 ; if ( !model->HSMHV_cit_Given ) model->HSMHV_cit = 0e0 ; if ( !model->HSMHV_falph_Given ) model->HSMHV_falph = 1.0 ; if ( !model->HSMHV_kappa_Given ) model->HSMHV_kappa = 3.90e0 ; if ( !model->HSMHV_cgso_Given ) model->HSMHV_cgso = 0.0 ; if ( !model->HSMHV_cgdo_Given ) model->HSMHV_cgdo = 0.0 ; if ( !model->HSMHV_pthrou_Given ) model->HSMHV_pthrou = 0.0 ; if ( !model->HSMHV_vdiffj_Given ) model->HSMHV_vdiffj = 0.6e-3 ; if ( !model->HSMHV_dly1_Given ) model->HSMHV_dly1 = 100.0e-12 ; if ( !model->HSMHV_dly2_Given ) model->HSMHV_dly2 = 0.7e0 ; if ( !model->HSMHV_dly3_Given ) model->HSMHV_dly3 = 0.8e-6 ; if ( !model->HSMHV_tnom_Given ) model->HSMHV_tnom = 27.0 ; /* [C] */ if ( !model->HSMHV_ovslp_Given ) model->HSMHV_ovslp = 2.1e-7 ; if ( !model->HSMHV_ovmag_Given ) model->HSMHV_ovmag = 0.6 ; if ( !model->HSMHV_gbmin_Given ) model->HSMHV_gbmin = 1.0e-12; /* in mho */ if ( !model->HSMHV_rbpb_Given ) model->HSMHV_rbpb = 50.0e0 ; if ( !model->HSMHV_rbpd_Given ) model->HSMHV_rbpd = 50.0e0 ; if ( !model->HSMHV_rbps_Given ) model->HSMHV_rbps = 50.0e0 ; if ( !model->HSMHV_rbdb_Given ) model->HSMHV_rbdb = 50.0e0 ; if ( !model->HSMHV_rbsb_Given ) model->HSMHV_rbsb = 50.0e0 ; if ( !model->HSMHV_ibpc1_Given ) model->HSMHV_ibpc1 = 0.0 ; if ( !model->HSMHV_ibpc2_Given ) model->HSMHV_ibpc2 = 0.0 ; if ( !model->HSMHV_mphdfm_Given ) model->HSMHV_mphdfm = -0.3 ; if ( !model->HSMHV_rdvg11_Given ) model->HSMHV_rdvg11 = 0.0 ; if ( !model->HSMHV_rdvg12_Given ) model->HSMHV_rdvg12 = 100.0 ; if ( !model->HSMHV_rth0_Given ) model->HSMHV_rth0 = 0.1 ; /* Self-heating model */ if ( !model->HSMHV_cth0_Given ) model->HSMHV_cth0 = 1.0e-7 ; /* Self-heating model */ if ( !model->HSMHV_powrat_Given ) model->HSMHV_powrat = 1.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbd_Given ) model->HSMHV_tcjbd = 0.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbs_Given ) model->HSMHV_tcjbs = 0.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbdsw_Given ) model->HSMHV_tcjbdsw = 0.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbssw_Given ) model->HSMHV_tcjbssw = 0.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbdswg_Given ) model->HSMHV_tcjbdswg = 0.0 ; /* Self-heating model */ if ( !model->HSMHV_tcjbsswg_Given ) model->HSMHV_tcjbsswg = 0.0 ; /* Self-heating model */ /* value reset to switch off NQS for QbdLD: */ model->HSMHV_dlyov = 0.0 ; /* 1.0e3 ; */ if ( !model->HSMHV_qdftvd_Given ) model->HSMHV_qdftvd = 1.0 ; if ( !model->HSMHV_xldld_Given ) model->HSMHV_xldld = 1.0e-6 ; if ( !model->HSMHV_xwdld_Given ) model->HSMHV_xwdld = model->HSMHV_xwd ; if ( !model->HSMHV_rdvd_Given ) model->HSMHV_rdvd = 7.0e-2 ; if ( !model->HSMHV_qovsm_Given ) model->HSMHV_qovsm = 0.2 ; if ( !model->HSMHV_rd20_Given ) model->HSMHV_rd20 = 0.0 ; if ( !model->HSMHV_rd21_Given ) model->HSMHV_rd21 = 1.0 ; if ( !model->HSMHV_rd22_Given ) model->HSMHV_rd22 = 0.0 ; if ( !model->HSMHV_rd22d_Given ) model->HSMHV_rd22d = 0.0 ; if ( !model->HSMHV_rd23_Given ) model->HSMHV_rd23 = 5e-3 ; if ( !model->HSMHV_rd24_Given ) model->HSMHV_rd24 = 0.0 ; if ( !model->HSMHV_rd25_Given ) model->HSMHV_rd25 = 0.0 ; if ( !model->HSMHV_rdvdl_Given ) model->HSMHV_rdvdl = 0.0 ; if ( !model->HSMHV_rdvdlp_Given ) model->HSMHV_rdvdlp = 1.0 ; if ( !model->HSMHV_rdvds_Given ) model->HSMHV_rdvds = 0.0 ; if ( !model->HSMHV_rdvdsp_Given ) model->HSMHV_rdvdsp = 1.0 ; if ( !model->HSMHV_rd23l_Given ) model->HSMHV_rd23l = 0.0 ; if ( !model->HSMHV_rd23lp_Given ) model->HSMHV_rd23lp = 1.0 ; if ( !model->HSMHV_rd23s_Given ) model->HSMHV_rd23s = 0.0 ; if ( !model->HSMHV_rd23sp_Given ) model->HSMHV_rd23sp = 1.0 ; if ( !model->HSMHV_rds_Given ) model->HSMHV_rds = 0.0 ; if ( !model->HSMHV_rdsp_Given ) model->HSMHV_rdsp = 1.0 ; if ( !model->HSMHV_rdtemp1_Given ) model->HSMHV_rdtemp1 = 0.0 ; if ( !model->HSMHV_rdtemp2_Given ) model->HSMHV_rdtemp2 = 0.0 ; model->HSMHV_rth0r = 0.0 ; /* not used in this version */ if ( !model->HSMHV_rdvdtemp1_Given) model->HSMHV_rdvdtemp1 = 0.0 ; if ( !model->HSMHV_rdvdtemp2_Given) model->HSMHV_rdvdtemp2 = 0.0 ; if ( !model->HSMHV_rth0w_Given ) model->HSMHV_rth0w = 0.0 ; if ( !model->HSMHV_rth0wp_Given ) model->HSMHV_rth0wp = 1.0 ; if ( !model->HSMHV_cvdsover_Given ) model->HSMHV_cvdsover = 0.0 ; if ( !model->HSMHV_ninvd_Given ) model->HSMHV_ninvd = 0.0 ; if ( !model->HSMHV_ninvdw_Given ) model->HSMHV_ninvdw = 0.0 ; if ( !model->HSMHV_ninvdwp_Given ) model->HSMHV_ninvdwp = 1.0 ; if ( !model->HSMHV_ninvdt1_Given ) model->HSMHV_ninvdt1 = 0.0 ; if ( !model->HSMHV_ninvdt2_Given ) model->HSMHV_ninvdt2 = 0.0 ; if ( !model->HSMHV_vbsmin_Given ) model->HSMHV_vbsmin = -10.5 ; if ( !model->HSMHV_rdvb_Given ) model->HSMHV_rdvb = 0.0 ; if ( !model->HSMHV_rth0nf_Given ) model->HSMHV_rth0nf = 0.0 ; if ( !model->HSMHV_rthtemp1_Given ) model->HSMHV_rthtemp1 = 0.0 ; if ( !model->HSMHV_rthtemp2_Given ) model->HSMHV_rthtemp2 = 0.0 ; if ( !model->HSMHV_prattemp1_Given ) model->HSMHV_prattemp1 = 0.0 ; if ( !model->HSMHV_prattemp2_Given ) model->HSMHV_prattemp2 = 0.0 ; if ( !model->HSMHV_rdvsub_Given ) model->HSMHV_rdvsub = 1.0 ; /* [-] substrate effect */ if ( !model->HSMHV_rdvdsub_Given ) model->HSMHV_rdvdsub = 0.3 ; /* [-] substrate effect */ if ( !model->HSMHV_ddrift_Given ) model->HSMHV_ddrift = 1.0e-6 ; /* [m] substrate effect */ if ( !model->HSMHV_vbisub_Given ) model->HSMHV_vbisub = 0.7 ; /* [V] substrate effect */ if ( !model->HSMHV_nsubsub_Given ) model->HSMHV_nsubsub = 1.0e15 ; /* [cm^-3] substrate effect */ if ( !model->HSMHV_shemax_Given ) model->HSMHV_shemax = 500 ; /* binning parameters */ if ( !model->HSMHV_lmin_Given ) model->HSMHV_lmin = 0.0 ; if ( !model->HSMHV_lmax_Given ) model->HSMHV_lmax = 1.0 ; if ( !model->HSMHV_wmin_Given ) model->HSMHV_wmin = 0.0 ; if ( !model->HSMHV_wmax_Given ) model->HSMHV_wmax = 1.0 ; if ( !model->HSMHV_lbinn_Given ) model->HSMHV_lbinn = 1.0 ; if ( !model->HSMHV_wbinn_Given ) model->HSMHV_wbinn = 1.0 ; /* Length dependence */ if ( !model->HSMHV_lvmax_Given ) model->HSMHV_lvmax = 0.0 ; if ( !model->HSMHV_lbgtmp1_Given ) model->HSMHV_lbgtmp1 = 0.0 ; if ( !model->HSMHV_lbgtmp2_Given ) model->HSMHV_lbgtmp2 = 0.0 ; if ( !model->HSMHV_leg0_Given ) model->HSMHV_leg0 = 0.0 ; if ( !model->HSMHV_lvfbover_Given ) model->HSMHV_lvfbover = 0.0 ; if ( !model->HSMHV_lnover_Given ) model->HSMHV_lnover = 0.0 ; if ( !model->HSMHV_lnovers_Given ) model->HSMHV_lnovers = 0.0 ; if ( !model->HSMHV_lwl2_Given ) model->HSMHV_lwl2 = 0.0 ; if ( !model->HSMHV_lvfbc_Given ) model->HSMHV_lvfbc = 0.0 ; if ( !model->HSMHV_lnsubc_Given ) model->HSMHV_lnsubc = 0.0 ; if ( !model->HSMHV_lnsubp_Given ) model->HSMHV_lnsubp = 0.0 ; if ( !model->HSMHV_lscp1_Given ) model->HSMHV_lscp1 = 0.0 ; if ( !model->HSMHV_lscp2_Given ) model->HSMHV_lscp2 = 0.0 ; if ( !model->HSMHV_lscp3_Given ) model->HSMHV_lscp3 = 0.0 ; if ( !model->HSMHV_lsc1_Given ) model->HSMHV_lsc1 = 0.0 ; if ( !model->HSMHV_lsc2_Given ) model->HSMHV_lsc2 = 0.0 ; if ( !model->HSMHV_lsc3_Given ) model->HSMHV_lsc3 = 0.0 ; if ( !model->HSMHV_lpgd1_Given ) model->HSMHV_lpgd1 = 0.0 ; if ( !model->HSMHV_lpgd3_Given ) model->HSMHV_lpgd3 = 0.0 ; if ( !model->HSMHV_lndep_Given ) model->HSMHV_lndep = 0.0 ; if ( !model->HSMHV_lninv_Given ) model->HSMHV_lninv = 0.0 ; if ( !model->HSMHV_lmuecb0_Given ) model->HSMHV_lmuecb0 = 0.0 ; if ( !model->HSMHV_lmuecb1_Given ) model->HSMHV_lmuecb1 = 0.0 ; if ( !model->HSMHV_lmueph1_Given ) model->HSMHV_lmueph1 = 0.0 ; if ( !model->HSMHV_lvtmp_Given ) model->HSMHV_lvtmp = 0.0 ; if ( !model->HSMHV_lwvth0_Given ) model->HSMHV_lwvth0 = 0.0 ; if ( !model->HSMHV_lmuesr1_Given ) model->HSMHV_lmuesr1 = 0.0 ; if ( !model->HSMHV_lmuetmp_Given ) model->HSMHV_lmuetmp = 0.0 ; if ( !model->HSMHV_lsub1_Given ) model->HSMHV_lsub1 = 0.0 ; if ( !model->HSMHV_lsub2_Given ) model->HSMHV_lsub2 = 0.0 ; if ( !model->HSMHV_lsvds_Given ) model->HSMHV_lsvds = 0.0 ; if ( !model->HSMHV_lsvbs_Given ) model->HSMHV_lsvbs = 0.0 ; if ( !model->HSMHV_lsvgs_Given ) model->HSMHV_lsvgs = 0.0 ; if ( !model->HSMHV_lfn1_Given ) model->HSMHV_lfn1 = 0.0 ; if ( !model->HSMHV_lfn2_Given ) model->HSMHV_lfn2 = 0.0 ; if ( !model->HSMHV_lfn3_Given ) model->HSMHV_lfn3 = 0.0 ; if ( !model->HSMHV_lfvbs_Given ) model->HSMHV_lfvbs = 0.0 ; if ( !model->HSMHV_lnsti_Given ) model->HSMHV_lnsti = 0.0 ; if ( !model->HSMHV_lwsti_Given ) model->HSMHV_lwsti = 0.0 ; if ( !model->HSMHV_lscsti1_Given ) model->HSMHV_lscsti1 = 0.0 ; if ( !model->HSMHV_lscsti2_Given ) model->HSMHV_lscsti2 = 0.0 ; if ( !model->HSMHV_lvthsti_Given ) model->HSMHV_lvthsti = 0.0 ; if ( !model->HSMHV_lmuesti1_Given ) model->HSMHV_lmuesti1 = 0.0 ; if ( !model->HSMHV_lmuesti2_Given ) model->HSMHV_lmuesti2 = 0.0 ; if ( !model->HSMHV_lmuesti3_Given ) model->HSMHV_lmuesti3 = 0.0 ; if ( !model->HSMHV_lnsubpsti1_Given ) model->HSMHV_lnsubpsti1 = 0.0 ; if ( !model->HSMHV_lnsubpsti2_Given ) model->HSMHV_lnsubpsti2 = 0.0 ; if ( !model->HSMHV_lnsubpsti3_Given ) model->HSMHV_lnsubpsti3 = 0.0 ; if ( !model->HSMHV_lcgso_Given ) model->HSMHV_lcgso = 0.0 ; if ( !model->HSMHV_lcgdo_Given ) model->HSMHV_lcgdo = 0.0 ; if ( !model->HSMHV_ljs0_Given ) model->HSMHV_ljs0 = 0.0 ; if ( !model->HSMHV_ljs0sw_Given ) model->HSMHV_ljs0sw = 0.0 ; if ( !model->HSMHV_lnj_Given ) model->HSMHV_lnj = 0.0 ; if ( !model->HSMHV_lcisbk_Given ) model->HSMHV_lcisbk = 0.0 ; if ( !model->HSMHV_lclm1_Given ) model->HSMHV_lclm1 = 0.0 ; if ( !model->HSMHV_lclm2_Given ) model->HSMHV_lclm2 = 0.0 ; if ( !model->HSMHV_lclm3_Given ) model->HSMHV_lclm3 = 0.0 ; if ( !model->HSMHV_lwfc_Given ) model->HSMHV_lwfc = 0.0 ; if ( !model->HSMHV_lgidl1_Given ) model->HSMHV_lgidl1 = 0.0 ; if ( !model->HSMHV_lgidl2_Given ) model->HSMHV_lgidl2 = 0.0 ; if ( !model->HSMHV_lgleak1_Given ) model->HSMHV_lgleak1 = 0.0 ; if ( !model->HSMHV_lgleak2_Given ) model->HSMHV_lgleak2 = 0.0 ; if ( !model->HSMHV_lgleak3_Given ) model->HSMHV_lgleak3 = 0.0 ; if ( !model->HSMHV_lgleak6_Given ) model->HSMHV_lgleak6 = 0.0 ; if ( !model->HSMHV_lglksd1_Given ) model->HSMHV_lglksd1 = 0.0 ; if ( !model->HSMHV_lglksd2_Given ) model->HSMHV_lglksd2 = 0.0 ; if ( !model->HSMHV_lglkb1_Given ) model->HSMHV_lglkb1 = 0.0 ; if ( !model->HSMHV_lglkb2_Given ) model->HSMHV_lglkb2 = 0.0 ; if ( !model->HSMHV_lnftrp_Given ) model->HSMHV_lnftrp = 0.0 ; if ( !model->HSMHV_lnfalp_Given ) model->HSMHV_lnfalp = 0.0 ; if ( !model->HSMHV_lpthrou_Given ) model->HSMHV_lpthrou = 0.0 ; if ( !model->HSMHV_lvdiffj_Given ) model->HSMHV_lvdiffj = 0.0 ; if ( !model->HSMHV_libpc1_Given ) model->HSMHV_libpc1 = 0.0 ; if ( !model->HSMHV_libpc2_Given ) model->HSMHV_libpc2 = 0.0 ; if ( !model->HSMHV_lcgbo_Given ) model->HSMHV_lcgbo = 0.0 ; if ( !model->HSMHV_lcvdsover_Given ) model->HSMHV_lcvdsover = 0.0 ; if ( !model->HSMHV_lfalph_Given ) model->HSMHV_lfalph = 0.0 ; if ( !model->HSMHV_lnpext_Given ) model->HSMHV_lnpext = 0.0 ; if ( !model->HSMHV_lpowrat_Given ) model->HSMHV_lpowrat = 0.0 ; if ( !model->HSMHV_lrd_Given ) model->HSMHV_lrd = 0.0 ; if ( !model->HSMHV_lrd22_Given ) model->HSMHV_lrd22 = 0.0 ; if ( !model->HSMHV_lrd23_Given ) model->HSMHV_lrd23 = 0.0 ; if ( !model->HSMHV_lrd24_Given ) model->HSMHV_lrd24 = 0.0 ; if ( !model->HSMHV_lrdict1_Given ) model->HSMHV_lrdict1 = 0.0 ; if ( !model->HSMHV_lrdov13_Given ) model->HSMHV_lrdov13 = 0.0 ; if ( !model->HSMHV_lrdslp1_Given ) model->HSMHV_lrdslp1 = 0.0 ; if ( !model->HSMHV_lrdvb_Given ) model->HSMHV_lrdvb = 0.0 ; if ( !model->HSMHV_lrdvd_Given ) model->HSMHV_lrdvd = 0.0 ; if ( !model->HSMHV_lrdvg11_Given ) model->HSMHV_lrdvg11 = 0.0 ; if ( !model->HSMHV_lrs_Given ) model->HSMHV_lrs = 0.0 ; if ( !model->HSMHV_lrth0_Given ) model->HSMHV_lrth0 = 0.0 ; if ( !model->HSMHV_lvover_Given ) model->HSMHV_lvover = 0.0 ; /* Width dependence */ if ( !model->HSMHV_wvmax_Given ) model->HSMHV_wvmax = 0.0 ; if ( !model->HSMHV_wbgtmp1_Given ) model->HSMHV_wbgtmp1 = 0.0 ; if ( !model->HSMHV_wbgtmp2_Given ) model->HSMHV_wbgtmp2 = 0.0 ; if ( !model->HSMHV_weg0_Given ) model->HSMHV_weg0 = 0.0 ; if ( !model->HSMHV_wvfbover_Given ) model->HSMHV_wvfbover = 0.0 ; if ( !model->HSMHV_wnover_Given ) model->HSMHV_wnover = 0.0 ; if ( !model->HSMHV_wnovers_Given ) model->HSMHV_wnovers = 0.0 ; if ( !model->HSMHV_wwl2_Given ) model->HSMHV_wwl2 = 0.0 ; if ( !model->HSMHV_wvfbc_Given ) model->HSMHV_wvfbc = 0.0 ; if ( !model->HSMHV_wnsubc_Given ) model->HSMHV_wnsubc = 0.0 ; if ( !model->HSMHV_wnsubp_Given ) model->HSMHV_wnsubp = 0.0 ; if ( !model->HSMHV_wscp1_Given ) model->HSMHV_wscp1 = 0.0 ; if ( !model->HSMHV_wscp2_Given ) model->HSMHV_wscp2 = 0.0 ; if ( !model->HSMHV_wscp3_Given ) model->HSMHV_wscp3 = 0.0 ; if ( !model->HSMHV_wsc1_Given ) model->HSMHV_wsc1 = 0.0 ; if ( !model->HSMHV_wsc2_Given ) model->HSMHV_wsc2 = 0.0 ; if ( !model->HSMHV_wsc3_Given ) model->HSMHV_wsc3 = 0.0 ; if ( !model->HSMHV_wpgd1_Given ) model->HSMHV_wpgd1 = 0.0 ; if ( !model->HSMHV_wpgd3_Given ) model->HSMHV_wpgd3 = 0.0 ; if ( !model->HSMHV_wndep_Given ) model->HSMHV_wndep = 0.0 ; if ( !model->HSMHV_wninv_Given ) model->HSMHV_wninv = 0.0 ; if ( !model->HSMHV_wmuecb0_Given ) model->HSMHV_wmuecb0 = 0.0 ; if ( !model->HSMHV_wmuecb1_Given ) model->HSMHV_wmuecb1 = 0.0 ; if ( !model->HSMHV_wmueph1_Given ) model->HSMHV_wmueph1 = 0.0 ; if ( !model->HSMHV_wvtmp_Given ) model->HSMHV_wvtmp = 0.0 ; if ( !model->HSMHV_wwvth0_Given ) model->HSMHV_wwvth0 = 0.0 ; if ( !model->HSMHV_wmuesr1_Given ) model->HSMHV_wmuesr1 = 0.0 ; if ( !model->HSMHV_wmuetmp_Given ) model->HSMHV_wmuetmp = 0.0 ; if ( !model->HSMHV_wsub1_Given ) model->HSMHV_wsub1 = 0.0 ; if ( !model->HSMHV_wsub2_Given ) model->HSMHV_wsub2 = 0.0 ; if ( !model->HSMHV_wsvds_Given ) model->HSMHV_wsvds = 0.0 ; if ( !model->HSMHV_wsvbs_Given ) model->HSMHV_wsvbs = 0.0 ; if ( !model->HSMHV_wsvgs_Given ) model->HSMHV_wsvgs = 0.0 ; if ( !model->HSMHV_wfn1_Given ) model->HSMHV_wfn1 = 0.0 ; if ( !model->HSMHV_wfn2_Given ) model->HSMHV_wfn2 = 0.0 ; if ( !model->HSMHV_wfn3_Given ) model->HSMHV_wfn3 = 0.0 ; if ( !model->HSMHV_wfvbs_Given ) model->HSMHV_wfvbs = 0.0 ; if ( !model->HSMHV_wnsti_Given ) model->HSMHV_wnsti = 0.0 ; if ( !model->HSMHV_wwsti_Given ) model->HSMHV_wwsti = 0.0 ; if ( !model->HSMHV_wscsti1_Given ) model->HSMHV_wscsti1 = 0.0 ; if ( !model->HSMHV_wscsti2_Given ) model->HSMHV_wscsti2 = 0.0 ; if ( !model->HSMHV_wvthsti_Given ) model->HSMHV_wvthsti = 0.0 ; if ( !model->HSMHV_wmuesti1_Given ) model->HSMHV_wmuesti1 = 0.0 ; if ( !model->HSMHV_wmuesti2_Given ) model->HSMHV_wmuesti2 = 0.0 ; if ( !model->HSMHV_wmuesti3_Given ) model->HSMHV_wmuesti3 = 0.0 ; if ( !model->HSMHV_wnsubpsti1_Given ) model->HSMHV_wnsubpsti1 = 0.0 ; if ( !model->HSMHV_wnsubpsti2_Given ) model->HSMHV_wnsubpsti2 = 0.0 ; if ( !model->HSMHV_wnsubpsti3_Given ) model->HSMHV_wnsubpsti3 = 0.0 ; if ( !model->HSMHV_wcgso_Given ) model->HSMHV_wcgso = 0.0 ; if ( !model->HSMHV_wcgdo_Given ) model->HSMHV_wcgdo = 0.0 ; if ( !model->HSMHV_wjs0_Given ) model->HSMHV_wjs0 = 0.0 ; if ( !model->HSMHV_wjs0sw_Given ) model->HSMHV_wjs0sw = 0.0 ; if ( !model->HSMHV_wnj_Given ) model->HSMHV_wnj = 0.0 ; if ( !model->HSMHV_wcisbk_Given ) model->HSMHV_wcisbk = 0.0 ; if ( !model->HSMHV_wclm1_Given ) model->HSMHV_wclm1 = 0.0 ; if ( !model->HSMHV_wclm2_Given ) model->HSMHV_wclm2 = 0.0 ; if ( !model->HSMHV_wclm3_Given ) model->HSMHV_wclm3 = 0.0 ; if ( !model->HSMHV_wwfc_Given ) model->HSMHV_wwfc = 0.0 ; if ( !model->HSMHV_wgidl1_Given ) model->HSMHV_wgidl1 = 0.0 ; if ( !model->HSMHV_wgidl2_Given ) model->HSMHV_wgidl2 = 0.0 ; if ( !model->HSMHV_wgleak1_Given ) model->HSMHV_wgleak1 = 0.0 ; if ( !model->HSMHV_wgleak2_Given ) model->HSMHV_wgleak2 = 0.0 ; if ( !model->HSMHV_wgleak3_Given ) model->HSMHV_wgleak3 = 0.0 ; if ( !model->HSMHV_wgleak6_Given ) model->HSMHV_wgleak6 = 0.0 ; if ( !model->HSMHV_wglksd1_Given ) model->HSMHV_wglksd1 = 0.0 ; if ( !model->HSMHV_wglksd2_Given ) model->HSMHV_wglksd2 = 0.0 ; if ( !model->HSMHV_wglkb1_Given ) model->HSMHV_wglkb1 = 0.0 ; if ( !model->HSMHV_wglkb2_Given ) model->HSMHV_wglkb2 = 0.0 ; if ( !model->HSMHV_wnftrp_Given ) model->HSMHV_wnftrp = 0.0 ; if ( !model->HSMHV_wnfalp_Given ) model->HSMHV_wnfalp = 0.0 ; if ( !model->HSMHV_wpthrou_Given ) model->HSMHV_wpthrou = 0.0 ; if ( !model->HSMHV_wvdiffj_Given ) model->HSMHV_wvdiffj = 0.0 ; if ( !model->HSMHV_wibpc1_Given ) model->HSMHV_wibpc1 = 0.0 ; if ( !model->HSMHV_wibpc2_Given ) model->HSMHV_wibpc2 = 0.0 ; if ( !model->HSMHV_wcgbo_Given ) model->HSMHV_wcgbo = 0.0 ; if ( !model->HSMHV_wcvdsover_Given ) model->HSMHV_wcvdsover = 0.0 ; if ( !model->HSMHV_wfalph_Given ) model->HSMHV_wfalph = 0.0 ; if ( !model->HSMHV_wnpext_Given ) model->HSMHV_wnpext = 0.0 ; if ( !model->HSMHV_wpowrat_Given ) model->HSMHV_wpowrat = 0.0 ; if ( !model->HSMHV_wrd_Given ) model->HSMHV_wrd = 0.0 ; if ( !model->HSMHV_wrd22_Given ) model->HSMHV_wrd22 = 0.0 ; if ( !model->HSMHV_wrd23_Given ) model->HSMHV_wrd23 = 0.0 ; if ( !model->HSMHV_wrd24_Given ) model->HSMHV_wrd24 = 0.0 ; if ( !model->HSMHV_wrdict1_Given ) model->HSMHV_wrdict1 = 0.0 ; if ( !model->HSMHV_wrdov13_Given ) model->HSMHV_wrdov13 = 0.0 ; if ( !model->HSMHV_wrdslp1_Given ) model->HSMHV_wrdslp1 = 0.0 ; if ( !model->HSMHV_wrdvb_Given ) model->HSMHV_wrdvb = 0.0 ; if ( !model->HSMHV_wrdvd_Given ) model->HSMHV_wrdvd = 0.0 ; if ( !model->HSMHV_wrdvg11_Given ) model->HSMHV_wrdvg11 = 0.0 ; if ( !model->HSMHV_wrs_Given ) model->HSMHV_wrs = 0.0 ; if ( !model->HSMHV_wrth0_Given ) model->HSMHV_wrth0 = 0.0 ; if ( !model->HSMHV_wvover_Given ) model->HSMHV_wvover = 0.0 ; /* Cross-term dependence */ if ( !model->HSMHV_pvmax_Given ) model->HSMHV_pvmax = 0.0 ; if ( !model->HSMHV_pbgtmp1_Given ) model->HSMHV_pbgtmp1 = 0.0 ; if ( !model->HSMHV_pbgtmp2_Given ) model->HSMHV_pbgtmp2 = 0.0 ; if ( !model->HSMHV_peg0_Given ) model->HSMHV_peg0 = 0.0 ; if ( !model->HSMHV_pvfbover_Given ) model->HSMHV_pvfbover = 0.0 ; if ( !model->HSMHV_pnover_Given ) model->HSMHV_pnover = 0.0 ; if ( !model->HSMHV_pnovers_Given ) model->HSMHV_pnovers = 0.0 ; if ( !model->HSMHV_pwl2_Given ) model->HSMHV_pwl2 = 0.0 ; if ( !model->HSMHV_pvfbc_Given ) model->HSMHV_pvfbc = 0.0 ; if ( !model->HSMHV_pnsubc_Given ) model->HSMHV_pnsubc = 0.0 ; if ( !model->HSMHV_pnsubp_Given ) model->HSMHV_pnsubp = 0.0 ; if ( !model->HSMHV_pscp1_Given ) model->HSMHV_pscp1 = 0.0 ; if ( !model->HSMHV_pscp2_Given ) model->HSMHV_pscp2 = 0.0 ; if ( !model->HSMHV_pscp3_Given ) model->HSMHV_pscp3 = 0.0 ; if ( !model->HSMHV_psc1_Given ) model->HSMHV_psc1 = 0.0 ; if ( !model->HSMHV_psc2_Given ) model->HSMHV_psc2 = 0.0 ; if ( !model->HSMHV_psc3_Given ) model->HSMHV_psc3 = 0.0 ; if ( !model->HSMHV_ppgd1_Given ) model->HSMHV_ppgd1 = 0.0 ; if ( !model->HSMHV_ppgd3_Given ) model->HSMHV_ppgd3 = 0.0 ; if ( !model->HSMHV_pndep_Given ) model->HSMHV_pndep = 0.0 ; if ( !model->HSMHV_pninv_Given ) model->HSMHV_pninv = 0.0 ; if ( !model->HSMHV_pmuecb0_Given ) model->HSMHV_pmuecb0 = 0.0 ; if ( !model->HSMHV_pmuecb1_Given ) model->HSMHV_pmuecb1 = 0.0 ; if ( !model->HSMHV_pmueph1_Given ) model->HSMHV_pmueph1 = 0.0 ; if ( !model->HSMHV_pvtmp_Given ) model->HSMHV_pvtmp = 0.0 ; if ( !model->HSMHV_pwvth0_Given ) model->HSMHV_pwvth0 = 0.0 ; if ( !model->HSMHV_pmuesr1_Given ) model->HSMHV_pmuesr1 = 0.0 ; if ( !model->HSMHV_pmuetmp_Given ) model->HSMHV_pmuetmp = 0.0 ; if ( !model->HSMHV_psub1_Given ) model->HSMHV_psub1 = 0.0 ; if ( !model->HSMHV_psub2_Given ) model->HSMHV_psub2 = 0.0 ; if ( !model->HSMHV_psvds_Given ) model->HSMHV_psvds = 0.0 ; if ( !model->HSMHV_psvbs_Given ) model->HSMHV_psvbs = 0.0 ; if ( !model->HSMHV_psvgs_Given ) model->HSMHV_psvgs = 0.0 ; if ( !model->HSMHV_pfn1_Given ) model->HSMHV_pfn1 = 0.0 ; if ( !model->HSMHV_pfn2_Given ) model->HSMHV_pfn2 = 0.0 ; if ( !model->HSMHV_pfn3_Given ) model->HSMHV_pfn3 = 0.0 ; if ( !model->HSMHV_pfvbs_Given ) model->HSMHV_pfvbs = 0.0 ; if ( !model->HSMHV_pnsti_Given ) model->HSMHV_pnsti = 0.0 ; if ( !model->HSMHV_pwsti_Given ) model->HSMHV_pwsti = 0.0 ; if ( !model->HSMHV_pscsti1_Given ) model->HSMHV_pscsti1 = 0.0 ; if ( !model->HSMHV_pscsti2_Given ) model->HSMHV_pscsti2 = 0.0 ; if ( !model->HSMHV_pvthsti_Given ) model->HSMHV_pvthsti = 0.0 ; if ( !model->HSMHV_pmuesti1_Given ) model->HSMHV_pmuesti1 = 0.0 ; if ( !model->HSMHV_pmuesti2_Given ) model->HSMHV_pmuesti2 = 0.0 ; if ( !model->HSMHV_pmuesti3_Given ) model->HSMHV_pmuesti3 = 0.0 ; if ( !model->HSMHV_pnsubpsti1_Given ) model->HSMHV_pnsubpsti1 = 0.0 ; if ( !model->HSMHV_pnsubpsti2_Given ) model->HSMHV_pnsubpsti2 = 0.0 ; if ( !model->HSMHV_pnsubpsti3_Given ) model->HSMHV_pnsubpsti3 = 0.0 ; if ( !model->HSMHV_pcgso_Given ) model->HSMHV_pcgso = 0.0 ; if ( !model->HSMHV_pcgdo_Given ) model->HSMHV_pcgdo = 0.0 ; if ( !model->HSMHV_pjs0_Given ) model->HSMHV_pjs0 = 0.0 ; if ( !model->HSMHV_pjs0sw_Given ) model->HSMHV_pjs0sw = 0.0 ; if ( !model->HSMHV_pnj_Given ) model->HSMHV_pnj = 0.0 ; if ( !model->HSMHV_pcisbk_Given ) model->HSMHV_pcisbk = 0.0 ; if ( !model->HSMHV_pclm1_Given ) model->HSMHV_pclm1 = 0.0 ; if ( !model->HSMHV_pclm2_Given ) model->HSMHV_pclm2 = 0.0 ; if ( !model->HSMHV_pclm3_Given ) model->HSMHV_pclm3 = 0.0 ; if ( !model->HSMHV_pwfc_Given ) model->HSMHV_pwfc = 0.0 ; if ( !model->HSMHV_pgidl1_Given ) model->HSMHV_pgidl1 = 0.0 ; if ( !model->HSMHV_pgidl2_Given ) model->HSMHV_pgidl2 = 0.0 ; if ( !model->HSMHV_pgleak1_Given ) model->HSMHV_pgleak1 = 0.0 ; if ( !model->HSMHV_pgleak2_Given ) model->HSMHV_pgleak2 = 0.0 ; if ( !model->HSMHV_pgleak3_Given ) model->HSMHV_pgleak3 = 0.0 ; if ( !model->HSMHV_pgleak6_Given ) model->HSMHV_pgleak6 = 0.0 ; if ( !model->HSMHV_pglksd1_Given ) model->HSMHV_pglksd1 = 0.0 ; if ( !model->HSMHV_pglksd2_Given ) model->HSMHV_pglksd2 = 0.0 ; if ( !model->HSMHV_pglkb1_Given ) model->HSMHV_pglkb1 = 0.0 ; if ( !model->HSMHV_pglkb2_Given ) model->HSMHV_pglkb2 = 0.0 ; if ( !model->HSMHV_pnftrp_Given ) model->HSMHV_pnftrp = 0.0 ; if ( !model->HSMHV_pnfalp_Given ) model->HSMHV_pnfalp = 0.0 ; if ( !model->HSMHV_ppthrou_Given ) model->HSMHV_ppthrou = 0.0 ; if ( !model->HSMHV_pvdiffj_Given ) model->HSMHV_pvdiffj = 0.0 ; if ( !model->HSMHV_pibpc1_Given ) model->HSMHV_pibpc1 = 0.0 ; if ( !model->HSMHV_pibpc2_Given ) model->HSMHV_pibpc2 = 0.0 ; if ( !model->HSMHV_pcgbo_Given ) model->HSMHV_pcgbo = 0.0 ; if ( !model->HSMHV_pcvdsover_Given ) model->HSMHV_pcvdsover = 0.0 ; if ( !model->HSMHV_pfalph_Given ) model->HSMHV_pfalph = 0.0 ; if ( !model->HSMHV_pnpext_Given ) model->HSMHV_pnpext = 0.0 ; if ( !model->HSMHV_ppowrat_Given ) model->HSMHV_ppowrat = 0.0 ; if ( !model->HSMHV_prd_Given ) model->HSMHV_prd = 0.0 ; if ( !model->HSMHV_prd22_Given ) model->HSMHV_prd22 = 0.0 ; if ( !model->HSMHV_prd23_Given ) model->HSMHV_prd23 = 0.0 ; if ( !model->HSMHV_prd24_Given ) model->HSMHV_prd24 = 0.0 ; if ( !model->HSMHV_prdict1_Given ) model->HSMHV_prdict1 = 0.0 ; if ( !model->HSMHV_prdov13_Given ) model->HSMHV_prdov13 = 0.0 ; if ( !model->HSMHV_prdslp1_Given ) model->HSMHV_prdslp1 = 0.0 ; if ( !model->HSMHV_prdvb_Given ) model->HSMHV_prdvb = 0.0 ; if ( !model->HSMHV_prdvd_Given ) model->HSMHV_prdvd = 0.0 ; if ( !model->HSMHV_prdvg11_Given ) model->HSMHV_prdvg11 = 0.0 ; if ( !model->HSMHV_prs_Given ) model->HSMHV_prs = 0.0 ; if ( !model->HSMHV_prth0_Given ) model->HSMHV_prth0 = 0.0 ; if ( !model->HSMHV_pvover_Given ) model->HSMHV_pvover = 0.0 ; if ( model->HSMHV_rd26_Given ) model->HSMHV_qovsm = model->HSMHV_rd26 ; if ( model->HSMHV_ldrift_Given ) model->HSMHV_ldrift2 = model->HSMHV_ldrift ; if (!model->HSMHVvgsMaxGiven) model->HSMHVvgsMax = 1e99; if (!model->HSMHVvgdMaxGiven) model->HSMHVvgdMax = 1e99; if (!model->HSMHVvgbMaxGiven) model->HSMHVvgbMax = 1e99; if (!model->HSMHVvdsMaxGiven) model->HSMHVvdsMax = 1e99; if (!model->HSMHVvbsMaxGiven) model->HSMHVvbsMax = 1e99; if (!model->HSMHVvbdMaxGiven) model->HSMHVvbdMax = 1e99; /* For Symmetrical Device */ if ( model->HSMHV_cosym ) { if(!model->HSMHV_rs_Given ) { model->HSMHV_rs = model->HSMHV_rd ; } if(!model->HSMHV_coovlps_Given ) { model->HSMHV_coovlps = model->HSMHV_coovlp ; } if(!model->HSMHV_novers_Given ) { model->HSMHV_novers = model->HSMHV_nover ; } /* if(!model->HSMHV_xld_Given ) */ /* { model->HSMHV_xld = model->HSMHV_xldld ; } */ if(!model->HSMHV_lover_Given ) { model->HSMHV_lover = model->HSMHV_loverld ; } if(!model->HSMHV_lovers_Given ) { model->HSMHV_lovers = model->HSMHV_loverld ; } if(!model->HSMHV_ldrift1s_Given ) { model->HSMHV_ldrift1s = model->HSMHV_ldrift1 ; } if(!model->HSMHV_ldrift2s_Given ) { model->HSMHV_ldrift2s = model->HSMHV_ldrift2 ; } if(!model->HSMHV_cgso_Given ) { model->HSMHV_cgso = model->HSMHV_cgdo ; model->HSMHV_cgso_Given = model->HSMHV_cgdo_Given ; } } if ( model->HSMHV_xqy > 0.0 && model->HSMHV_xqy < 1.0e-9 ) { fprintf ( stderr , "*** warning(HiSIMHV): XQY (%e[m]) is too small -> reset to 1nm.\n" , model->HSMHV_xqy ) ; model->HSMHV_xqy = 1e-9 ; } modelMKS = &model->modelMKS ; /* loop through all the instances of the model */ for ( here = model->HSMHVinstances ;here != NULL ; here = here->HSMHVnextInstance ) { /* allocate a chunk of the state vector */ here->HSMHVstates = *states; if (model->HSMHV_conqs) *states += HSMHVnumStatesNqs; else *states += HSMHVnumStates; hereMKS = &here->hereMKS ; /* perform the device parameter defaulting */ if ( !here->HSMHV_coselfheat_Given ) here->HSMHV_coselfheat = model->HSMHV_coselfheat ; if ( !here->HSMHV_cosubnode_Given ) here->HSMHV_cosubnode = model->HSMHV_cosubnode ; if ( !here->HSMHV_l_Given ) here->HSMHV_l = 2.0e-6 ; if ( !here->HSMHV_w_Given ) here->HSMHV_w = 5.0e-6 ; if ( !here->HSMHV_ad_Given ) here->HSMHV_ad = 0.0 ; if ( !here->HSMHV_as_Given ) here->HSMHV_as = 0.0 ; if ( !here->HSMHV_pd_Given ) here->HSMHV_pd = 0.0 ; if ( !here->HSMHV_ps_Given ) here->HSMHV_ps = 0.0 ; if ( !here->HSMHV_nrd_Given ) here->HSMHV_nrd = 1.0 ; if ( !here->HSMHV_nrs_Given ) here->HSMHV_nrs = 1.0 ; if ( !here->HSMHV_ngcon_Given ) here->HSMHV_ngcon = 1.0 ; if ( !here->HSMHV_xgw_Given ) here->HSMHV_xgw = 0e0 ; if ( !here->HSMHV_xgl_Given ) here->HSMHV_xgl = 0e0 ; if ( !here->HSMHV_nf_Given ) here->HSMHV_nf = 1.0 ; if ( !here->HSMHV_sa_Given ) here->HSMHV_sa = 0 ; if ( !here->HSMHV_sb_Given ) here->HSMHV_sb = 0 ; if ( !here->HSMHV_sd_Given ) here->HSMHV_sd = 0 ; if ( !here->HSMHV_dtemp_Given ) here->HSMHV_dtemp = 0.0 ; if ( !here->HSMHV_icVBS_Given ) here->HSMHV_icVBS = 0.0; if ( !here->HSMHV_icVDS_Given ) here->HSMHV_icVDS = 0.0; if ( !here->HSMHV_icVGS_Given ) here->HSMHV_icVGS = 0.0; if ( !here->HSMHV_corbnet_Given ) here->HSMHV_corbnet = model->HSMHV_corbnet ; else if ( here->HSMHV_corbnet != 0 && here->HSMHV_corbnet != 1 ) { here->HSMHV_corbnet = model->HSMHV_corbnet ; printf("warning(HiSIMHV): CORBNET has been set to its default value: %d.\n", here->HSMHV_corbnet); } if ( !here->HSMHV_rbdb_Given) here->HSMHV_rbdb = model->HSMHV_rbdb; /* not used in this version */ if ( !here->HSMHV_rbsb_Given) here->HSMHV_rbsb = model->HSMHV_rbsb; /* not used in this version */ if ( !here->HSMHV_rbpb_Given) here->HSMHV_rbpb = model->HSMHV_rbpb; if ( !here->HSMHV_rbps_Given) here->HSMHV_rbps = model->HSMHV_rbps; if ( !here->HSMHV_rbpd_Given) here->HSMHV_rbpd = model->HSMHV_rbpd; if ( !here->HSMHV_corg_Given ) here->HSMHV_corg = model->HSMHV_corg ; else if ( here->HSMHV_corg != 0 && here->HSMHV_corg != 1 ) { here->HSMHV_corg = model->HSMHV_corg ; printf("warning(HiSIMHV): CORG has been set to its default value: %d.\n", here->HSMHV_corg); } if ( !here->HSMHV_m_Given ) here->HSMHV_m = 1.0 ; if ( !here->HSMHV_subld1_Given ) here->HSMHV_subld1 = model->HSMHV_subld1 ; if ( !here->HSMHV_subld2_Given ) here->HSMHV_subld2 = model->HSMHV_subld2 ; if ( !here->HSMHV_lovers_Given ) here->HSMHV_lovers = model->HSMHV_lovers ; if ( here->HSMHV_lover_Given ) here->HSMHV_lovers = here->HSMHV_lover ; if ( !here->HSMHV_loverld_Given ) here->HSMHV_loverld = model->HSMHV_loverld ; if ( !here->HSMHV_ldrift1_Given ) here->HSMHV_ldrift1 = model->HSMHV_ldrift1 ; if ( !here->HSMHV_ldrift2_Given ) here->HSMHV_ldrift2 = model->HSMHV_ldrift2 ; if ( !here->HSMHV_ldrift1s_Given ) here->HSMHV_ldrift1s = model->HSMHV_ldrift1s ; if ( !here->HSMHV_ldrift2s_Given ) here->HSMHV_ldrift2s = model->HSMHV_ldrift2s ; if ( model->HSMHV_cosym ) { if ( !here->HSMHV_lovers_Given && !model->HSMHV_lovers_Given ) here->HSMHV_lovers = here->HSMHV_loverld ; here->HSMHV_lover = here->HSMHV_lovers ; if ( !here->HSMHV_ldrift1s_Given && !model->HSMHV_ldrift1s_Given ) here->HSMHV_ldrift1s = here->HSMHV_ldrift1 ; if ( !here->HSMHV_ldrift2s_Given && !model->HSMHV_ldrift2s_Given ) here->HSMHV_ldrift2s = here->HSMHV_ldrift2 ; } /* process drain series resistance */ /* rough check if Rd != 0 * **** don't forget to change if Rd processing is changed *******/ T2 = ( here->HSMHV_ldrift1 * model->HSMHV_rdslp1 * C_m2um + model->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2 * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; Rd = model->HSMHV_rsh * here->HSMHV_nrd * here->HSMHV_nf + (model->HSMHV_rd + model->HSMHV_rdvd) * T2 ; if ( (model->HSMHV_corsrd == 1 || model->HSMHV_corsrd == 3) && Rd > 0.0 ) { if(here->HSMHVdNodePrime <= 0) { model->HSMHV_rd = ( model->HSMHV_rd == 0.0 ) ? 1e-50 : model->HSMHV_rd ; error = CKTmkVolt(ckt, &tmp, here->HSMHVname, "drain"); if (error) return(error); here->HSMHVdNodePrime = tmp->number; } } else { here->HSMHVdNodePrime = here->HSMHVdNode; } here->HSMHVdrainConductance = 0.0 ; /* initialized for hsmhvnoi.c */ /* process source series resistance */ /* rough check if Rs != 0 * ***** don't forget to change if Rs processing is changed *******/ T2 = ( here->HSMHV_ldrift1s * model->HSMHV_rdslp1 * C_m2um + model->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2s * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; Rs = model->HSMHV_rsh * here->HSMHV_nrs * here->HSMHV_nf + model->HSMHV_rs * T2 ; if ( (model->HSMHV_corsrd == 1 || model->HSMHV_corsrd == 3) && Rs > 0.0 ) { if(here->HSMHVsNodePrime == 0) { error = CKTmkVolt(ckt, &tmp, here->HSMHVname, "source"); if (error) return(error); here->HSMHVsNodePrime = tmp->number; } } else { here->HSMHVsNodePrime = here->HSMHVsNode; } here->HSMHVsourceConductance = 0.0 ; /* initialized for hsmhvnoi.c */ /* process gate resistance */ if ( (here->HSMHV_corg == 1 && model->HSMHV_rshg > 0.0) ) { if(here->HSMHVgNodePrime == 0) { error = CKTmkVolt(ckt, &tmp, here->HSMHVname, "gate"); if (error) return(error); here->HSMHVgNodePrime = tmp->number; } } else { here->HSMHVgNodePrime = here->HSMHVgNode; } /* internal body nodes for body resistance model */ if ( here->HSMHV_corbnet == 1 ) { if (here->HSMHVdbNode == 0) { error = CKTmkVolt(ckt, &tmp, here->HSMHVname, "dbody"); if (error) return(error); here->HSMHVdbNode = tmp->number; } if (here->HSMHVbNodePrime == 0) { error = CKTmkVolt(ckt, &tmp,here->HSMHVname, "body"); if (error) return(error); here->HSMHVbNodePrime = tmp->number; } if (here->HSMHVsbNode == 0) { error = CKTmkVolt(ckt, &tmp, here->HSMHVname,"sbody"); if (error) return(error); here->HSMHVsbNode = tmp->number; } } else { here->HSMHVdbNode = here->HSMHVbNodePrime = here->HSMHVsbNode = here->HSMHVbNode; } /* 5th node is switched to tempNode, if COSUBNODE=0 and 5 external nodes are assigned. */ if ( here->HSMHV_cosubnode == 0 && here->HSMHVsubNode > 0 && here->HSMHVtempNode <= 0 ) { here->HSMHVtempNode = here->HSMHVsubNode ; here->HSMHVsubNode = -1 ; } /* self heating*/ if ( here->HSMHV_coselfheat > 0 && here->HSMHVtempNode <= 0 ){ error = CKTmkVolt(ckt, &tmp, here->HSMHVname,"temp"); if(error) return(error); here->HSMHVtempNode = tmp->number; } if ( here->HSMHV_coselfheat <= 0 ) here->HSMHVtempNode = -1; /* flat handling of NQS */ if ( model->HSMHV_conqs ){ error = CKTmkVolt(ckt, &tmp, here->HSMHVname,"qi_nqs"); if(error) return(error); here->HSMHVqiNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->HSMHVname,"qb_nqs"); if(error) return(error); here->HSMHVqbNode = tmp->number; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(HSMHVDPbpPtr, HSMHVdNodePrime, HSMHVbNodePrime); TSTALLOC(HSMHVSPbpPtr, HSMHVsNodePrime, HSMHVbNodePrime); TSTALLOC(HSMHVGPbpPtr, HSMHVgNodePrime, HSMHVbNodePrime); TSTALLOC(HSMHVBPdPtr, HSMHVbNodePrime, HSMHVdNode); TSTALLOC(HSMHVBPsPtr, HSMHVbNodePrime, HSMHVsNode); TSTALLOC(HSMHVBPdpPtr, HSMHVbNodePrime, HSMHVdNodePrime); TSTALLOC(HSMHVBPspPtr, HSMHVbNodePrime, HSMHVsNodePrime); TSTALLOC(HSMHVBPgpPtr, HSMHVbNodePrime, HSMHVgNodePrime); TSTALLOC(HSMHVBPbpPtr, HSMHVbNodePrime, HSMHVbNodePrime); TSTALLOC(HSMHVDdPtr, HSMHVdNode, HSMHVdNode); TSTALLOC(HSMHVGPgpPtr, HSMHVgNodePrime, HSMHVgNodePrime); TSTALLOC(HSMHVSsPtr, HSMHVsNode, HSMHVsNode); TSTALLOC(HSMHVDPdpPtr, HSMHVdNodePrime, HSMHVdNodePrime); TSTALLOC(HSMHVSPspPtr, HSMHVsNodePrime, HSMHVsNodePrime); TSTALLOC(HSMHVDdpPtr, HSMHVdNode, HSMHVdNodePrime); TSTALLOC(HSMHVGPdpPtr, HSMHVgNodePrime, HSMHVdNodePrime); TSTALLOC(HSMHVGPspPtr, HSMHVgNodePrime, HSMHVsNodePrime); TSTALLOC(HSMHVSspPtr, HSMHVsNode, HSMHVsNodePrime); TSTALLOC(HSMHVDPspPtr, HSMHVdNodePrime, HSMHVsNodePrime); TSTALLOC(HSMHVDPdPtr, HSMHVdNodePrime, HSMHVdNode); TSTALLOC(HSMHVDPgpPtr, HSMHVdNodePrime, HSMHVgNodePrime); TSTALLOC(HSMHVSPgpPtr, HSMHVsNodePrime, HSMHVgNodePrime); TSTALLOC(HSMHVSPsPtr, HSMHVsNodePrime, HSMHVsNode); TSTALLOC(HSMHVSPdpPtr, HSMHVsNodePrime, HSMHVdNodePrime); TSTALLOC(HSMHVGgPtr, HSMHVgNode, HSMHVgNode); TSTALLOC(HSMHVGgpPtr, HSMHVgNode, HSMHVgNodePrime); TSTALLOC(HSMHVGPgPtr, HSMHVgNodePrime, HSMHVgNode); /* TSTALLOC(HSMHVGdpPtr, HSMHVgNode, HSMHVdNodePrime); not used */ /* TSTALLOC(HSMHVGspPtr, HSMHVgNode, HSMHVsNodePrime); not used */ /* TSTALLOC(HSMHVGbpPtr, HSMHVgNode, HSMHVbNodePrime); not used */ TSTALLOC(HSMHVDdbPtr, HSMHVdNode, HSMHVdbNode); TSTALLOC(HSMHVSsbPtr, HSMHVsNode, HSMHVsbNode); TSTALLOC(HSMHVDBdPtr, HSMHVdbNode, HSMHVdNode); TSTALLOC(HSMHVDBdbPtr, HSMHVdbNode, HSMHVdbNode); TSTALLOC(HSMHVDBbpPtr, HSMHVdbNode, HSMHVbNodePrime); /* TSTALLOC(HSMHVDBbPtr, HSMHVdbNode, HSMHVbNode); not used */ TSTALLOC(HSMHVBPdbPtr, HSMHVbNodePrime, HSMHVdbNode); TSTALLOC(HSMHVBPbPtr, HSMHVbNodePrime, HSMHVbNode); TSTALLOC(HSMHVBPsbPtr, HSMHVbNodePrime, HSMHVsbNode); TSTALLOC(HSMHVSBsPtr, HSMHVsbNode, HSMHVsNode); TSTALLOC(HSMHVSBbpPtr, HSMHVsbNode, HSMHVbNodePrime); /* TSTALLOC(HSMHVSBbPtr, HSMHVsbNode, HSMHVbNode); not used */ TSTALLOC(HSMHVSBsbPtr, HSMHVsbNode, HSMHVsbNode); /* TSTALLOC(HSMHVBdbPtr, HSMHVbNode, HSMHVdbNode); not used */ TSTALLOC(HSMHVBbpPtr, HSMHVbNode, HSMHVbNodePrime); /* TSTALLOC(HSMHVBsbPtr, HSMHVbNode, HSMHVsbNode); not used */ TSTALLOC(HSMHVBbPtr, HSMHVbNode, HSMHVbNode); TSTALLOC(HSMHVDgpPtr, HSMHVdNode, HSMHVgNodePrime); TSTALLOC(HSMHVDsPtr, HSMHVdNode, HSMHVsNode); TSTALLOC(HSMHVDbpPtr, HSMHVdNode, HSMHVbNodePrime); TSTALLOC(HSMHVDspPtr, HSMHVdNode, HSMHVsNodePrime); TSTALLOC(HSMHVDPsPtr, HSMHVdNodePrime, HSMHVsNode); TSTALLOC(HSMHVSgpPtr, HSMHVsNode, HSMHVgNodePrime); TSTALLOC(HSMHVSdPtr, HSMHVsNode, HSMHVdNode); TSTALLOC(HSMHVSbpPtr, HSMHVsNode, HSMHVbNodePrime); TSTALLOC(HSMHVSdpPtr, HSMHVsNode, HSMHVdNodePrime); TSTALLOC(HSMHVSPdPtr, HSMHVsNodePrime, HSMHVdNode); TSTALLOC(HSMHVGPdPtr, HSMHVgNodePrime, HSMHVdNode); TSTALLOC(HSMHVGPsPtr, HSMHVgNodePrime, HSMHVsNode); if ( here->HSMHVsubNode > 0 ) { /* 5th substrate node */ TSTALLOC(HSMHVDsubPtr, HSMHVdNode, HSMHVsubNode); TSTALLOC(HSMHVDPsubPtr, HSMHVdNodePrime, HSMHVsubNode); TSTALLOC(HSMHVSsubPtr, HSMHVsNode, HSMHVsubNode); TSTALLOC(HSMHVSPsubPtr, HSMHVsNodePrime, HSMHVsubNode); } if ( here->HSMHV_coselfheat > 0 ) { /* self heating */ TSTALLOC(HSMHVTemptempPtr, HSMHVtempNode, HSMHVtempNode); TSTALLOC(HSMHVTempdPtr, HSMHVtempNode, HSMHVdNode); TSTALLOC(HSMHVTempdpPtr, HSMHVtempNode, HSMHVdNodePrime); TSTALLOC(HSMHVTempsPtr, HSMHVtempNode, HSMHVsNode); TSTALLOC(HSMHVTempspPtr, HSMHVtempNode, HSMHVsNodePrime); TSTALLOC(HSMHVDPtempPtr, HSMHVdNodePrime, HSMHVtempNode); TSTALLOC(HSMHVSPtempPtr, HSMHVsNodePrime, HSMHVtempNode); TSTALLOC(HSMHVTempgpPtr, HSMHVtempNode, HSMHVgNodePrime); TSTALLOC(HSMHVTempbpPtr, HSMHVtempNode, HSMHVbNodePrime); TSTALLOC(HSMHVGPtempPtr, HSMHVgNodePrime, HSMHVtempNode); TSTALLOC(HSMHVBPtempPtr, HSMHVbNodePrime, HSMHVtempNode); TSTALLOC(HSMHVDBtempPtr, HSMHVdbNode, HSMHVtempNode); TSTALLOC(HSMHVSBtempPtr, HSMHVsbNode, HSMHVtempNode); TSTALLOC(HSMHVDtempPtr, HSMHVdNode, HSMHVtempNode); TSTALLOC(HSMHVStempPtr, HSMHVsNode, HSMHVtempNode); } if ( model->HSMHV_conqs ) { /* flat handling of NQS */ TSTALLOC(HSMHVDPqiPtr, HSMHVdNodePrime, HSMHVqiNode); TSTALLOC(HSMHVGPqiPtr, HSMHVgNodePrime, HSMHVqiNode); TSTALLOC(HSMHVGPqbPtr, HSMHVgNodePrime, HSMHVqbNode); TSTALLOC(HSMHVSPqiPtr, HSMHVsNodePrime, HSMHVqiNode); TSTALLOC(HSMHVBPqbPtr, HSMHVbNodePrime, HSMHVqbNode); TSTALLOC(HSMHVQIdpPtr, HSMHVqiNode, HSMHVdNodePrime); TSTALLOC(HSMHVQIgpPtr, HSMHVqiNode, HSMHVgNodePrime); TSTALLOC(HSMHVQIspPtr, HSMHVqiNode, HSMHVsNodePrime); TSTALLOC(HSMHVQIbpPtr, HSMHVqiNode, HSMHVbNodePrime); TSTALLOC(HSMHVQIqiPtr, HSMHVqiNode, HSMHVqiNode); TSTALLOC(HSMHVQBdpPtr, HSMHVqbNode, HSMHVdNodePrime); TSTALLOC(HSMHVQBgpPtr, HSMHVqbNode, HSMHVgNodePrime); TSTALLOC(HSMHVQBspPtr, HSMHVqbNode, HSMHVsNodePrime); TSTALLOC(HSMHVQBbpPtr, HSMHVqbNode, HSMHVbNodePrime); TSTALLOC(HSMHVQBqbPtr, HSMHVqbNode, HSMHVqbNode); if ( here->HSMHV_coselfheat > 0 ) { /* self heating */ TSTALLOC(HSMHVQItempPtr, HSMHVqiNode, HSMHVtempNode); TSTALLOC(HSMHVQBtempPtr, HSMHVqbNode, HSMHVtempNode); } } /*-----------------------------------------------------------* * Range check of instance parameters *-----------------*/ RANGECHECK(here->HSMHV_l, model->HSMHV_lmin, model->HSMHV_lmax, "L") ; RANGECHECK(here->HSMHV_w/here->HSMHV_nf, model->HSMHV_wmin, model->HSMHV_wmax, "W/NF") ; /* binning calculation */ pParam = &here->pParam ; Lgate = here->HSMHV_l + model->HSMHV_xl ; Wgate = here->HSMHV_w / here->HSMHV_nf + model->HSMHV_xw ; LG = Lgate * C_m2um ; WG = Wgate * C_m2um ; Lbin = pow(LG, model->HSMHV_lbinn) ; Wbin = pow(WG, model->HSMHV_wbinn) ; LWbin = Lbin * Wbin ; BINNING(vmax) BINNING(bgtmp1) BINNING(bgtmp2) BINNING(eg0) BINNING(vfbover) BINNING(nover) BINNING(novers) BINNING(wl2) BINNING(vfbc) BINNING(nsubc) BINNING(nsubp) BINNING(scp1) BINNING(scp2) BINNING(scp3) BINNING(sc1) BINNING(sc2) BINNING(sc3) BINNING(pgd1) BINNING(pgd3) BINNING(ndep) BINNING(ninv) BINNING(muecb0) BINNING(muecb1) BINNING(mueph1) BINNING(vtmp) BINNING(wvth0) BINNING(muesr1) BINNING(muetmp) BINNING(sub1) BINNING(sub2) BINNING(svds) BINNING(svbs) BINNING(svgs) BINNING(fn1) BINNING(fn2) BINNING(fn3) BINNING(fvbs) BINNING(nsti) BINNING(wsti) BINNING(scsti1) BINNING(scsti2) BINNING(vthsti) BINNING(muesti1) BINNING(muesti2) BINNING(muesti3) BINNING(nsubpsti1) BINNING(nsubpsti2) BINNING(nsubpsti3) BINNING(cgso) BINNING(cgdo) BINNING(js0) BINNING(js0sw) BINNING(nj) BINNING(cisbk) BINNING(clm1) BINNING(clm2) BINNING(clm3) BINNING(wfc) BINNING(gidl1) BINNING(gidl2) BINNING(gleak1) BINNING(gleak2) BINNING(gleak3) BINNING(gleak6) BINNING(glksd1) BINNING(glksd2) BINNING(glkb1) BINNING(glkb2) BINNING(nftrp) BINNING(nfalp) BINNING(pthrou) BINNING(vdiffj) BINNING(ibpc1) BINNING(ibpc2) BINNING(cgbo) BINNING(cvdsover) BINNING(falph) BINNING(npext) BINNING(powrat) BINNING(rd) BINNING(rd22) BINNING(rd23) BINNING(rd24) BINNING(rdict1) BINNING(rdov13) BINNING(rdslp1) BINNING(rdvb) BINNING(rdvd) BINNING(rdvg11) BINNING(rs) BINNING(rth0) BINNING(vover) /*-----------------------------------------------------------* * Range check of model parameters *-----------------*/ RANGECHECK(pParam->HSMHV_vmax, 1.0e6, 20.0e6, "VMAX") ; RANGECHECK(pParam->HSMHV_bgtmp1, 50.0e-6, 1.0e-3, "BGTMP1") ; RANGECHECK(pParam->HSMHV_bgtmp2, -1.0e-6, 1.0e-6, "BGTMP2") ; RANGECHECK(pParam->HSMHV_eg0, 1.0, 1.3, "EG0") ; RANGECHECK(pParam->HSMHV_vfbover, -1.0, 1.0, "VFBOVER") ; RANGECHECK(pParam->HSMHV_vfbc, -1.2, -0.8, "VFBC") ; RANGECHECK(pParam->HSMHV_nsubc, 1.0e16, 1.0e19, "NSUBC") ; RANGECHECK(pParam->HSMHV_nsubp, 1.0e16, 1.0e19, "NSUBP") ; RANGECHECK(pParam->HSMHV_scp1, 0.0, 20.0, "SCP1") ; RANGECHECK(pParam->HSMHV_scp2, 0.0, 2.0, "SCP2") ; RANGECHECK(pParam->HSMHV_scp3, 0.0, 200e-9, "SCP3") ; RANGECHECK(pParam->HSMHV_sc1, 0.0, 20.0, "SC1") ; RANGECHECK(pParam->HSMHV_sc2, 0.0, 2.0, "SC2") ; RANGECHECK(pParam->HSMHV_sc3, 0.0, 200e-9, "SC3") ; RANGECHECK(pParam->HSMHV_pgd1, 0.0, 50.0e-3, "PGD1") ; RANGECHECK(pParam->HSMHV_pgd3, 0.0, 1.2, "PGD3") ; RANGECHECK(pParam->HSMHV_ndep, 0.0, 1.0, "NDEP") ; RANGECHECK(pParam->HSMHV_ninv, 0.0, 1.0, "NINV") ; RANGECHECK(pParam->HSMHV_muecb0, 100.0, 100.0e3, "MUECB0") ; RANGECHECK(pParam->HSMHV_muecb1, 5.0, 10.0e3, "MUECB1") ; RANGECHECK(pParam->HSMHV_mueph1, 2.0e3, 30.0e3, "MUEPH1") ; RANGECHECK(pParam->HSMHV_vtmp, -2.0, 1.0, "VTMP") ; RANGECHECK(pParam->HSMHV_muesr1, 1.0e14, 1.0e16, "MUESR1") ; RANGECHECK(pParam->HSMHV_muetmp, 0.5, 2.0, "MUETMP") ; RANGECHECK(pParam->HSMHV_clm1, 0.01, 1.0, "CLM1") ; RANGECHECK(pParam->HSMHV_clm2, 1.0, 4.0, "CLM2") ; RANGECHECK(pParam->HSMHV_clm3, 0.5, 5.0, "CLM3") ; RANGECHECK(pParam->HSMHV_wfc, -5.0e-15, 1.0e-6, "WFC") ; RANGECHECK(pParam->HSMHV_cgso, 0.0, 100e-9 * 100*C_VAC*model->HSMHV_kappa/model->HSMHV_tox*C_m2cm, "CGSO") ; RANGECHECK(pParam->HSMHV_cgdo, 0.0, 100e-9 * 100*C_VAC*model->HSMHV_kappa/model->HSMHV_tox*C_m2cm, "CGDO") ; RANGECHECK(pParam->HSMHV_pthrou, 0.0, 50.0e-3, "PTHROU") ; RANGECHECK(pParam->HSMHV_ibpc1, 0.0, 1.0e12, "IBPC1") ; RANGECHECK(pParam->HSMHV_ibpc2, 0.0, 1.0e12, "IBPC2") ; RANGECHECK(pParam->HSMHV_cvdsover, 0.0, 1.0, "CVDSOVER") ; RANGECHECK(pParam->HSMHV_nsti, 1.0e16, 1.0e19, "NSTI") ; if ( pParam->HSMHV_cgbo < 0.0 ) { printf("warning(HiSIMHV): %s = %e\n", "CGBO", pParam->HSMHV_cgbo ); printf("warning(HiSIMHV): The model parameter %s must not be less than %s.\n", "CGBO", "0.0" ); } RANGECHECK(pParam->HSMHV_npext, 1.0e16, 1.0e18, "NPEXT") ; RANGECHECK(pParam->HSMHV_rd, 0.0, 100.0e-3, "RD") ; RANGECHECK(pParam->HSMHV_rd22, -5.0, 0.0, "RD22") ; RANGECHECK(pParam->HSMHV_rd23, 0.0, 2.0, "RD23") ; RANGECHECK(pParam->HSMHV_rd24, 0.0, 0.1, "RD24") ; RANGECHECK(pParam->HSMHV_rdict1, -10.0, 10.0, "RDICT1") ; RANGECHECK(pParam->HSMHV_rdov13, 0.0, 1.0, "RDOV13") ; RANGECHECK(pParam->HSMHV_rdslp1, -10.0, 10.0, "RDSLP1") ; RANGECHECK(pParam->HSMHV_rdvb, 0.0, 2.0, "RDVB") ; RANGECHECK(pParam->HSMHV_rdvd, 0.0, 2.0, "RDVD") ; MINCHECK( pParam->HSMHV_rdvg11, 0.0, "RDVG11") ; RANGECHECK(pParam->HSMHV_rs, 0.0, 10.0e-3, "RS") ; RANGECHECK(pParam->HSMHV_rth0, 0.0, 10.0, "RTH0") ; RANGECHECK(pParam->HSMHV_vover, 0.0, 4.0, "VOVER") ; /*-----------------------------------------------------------* * Change unit into MKS for instance parameters. *-----------------*/ hereMKS->HSMHV_nsubcdfm = here->HSMHV_nsubcdfm / C_cm2m_p3 ; hereMKS->HSMHV_subld2 = here->HSMHV_subld2 * C_m2cm ; pParam->HSMHV_nsubc = pParam->HSMHV_nsubc / C_cm2m_p3 ; pParam->HSMHV_nsubp = pParam->HSMHV_nsubp / C_cm2m_p3 ; pParam->HSMHV_nsti = pParam->HSMHV_nsti / C_cm2m_p3 ; pParam->HSMHV_nover = pParam->HSMHV_nover / C_cm2m_p3 ; pParam->HSMHV_novers = pParam->HSMHV_novers / C_cm2m_p3 ; pParam->HSMHV_nsubpsti1 = pParam->HSMHV_nsubpsti1 / C_m2cm ; pParam->HSMHV_muesti1 = pParam->HSMHV_muesti1 / C_m2cm ; pParam->HSMHV_ndep = pParam->HSMHV_ndep / C_m2cm ; pParam->HSMHV_ninv = pParam->HSMHV_ninv / C_m2cm ; pParam->HSMHV_vmax = pParam->HSMHV_vmax / C_m2cm ; pParam->HSMHV_wfc = pParam->HSMHV_wfc * C_m2cm_p2 ; pParam->HSMHV_glksd1 = pParam->HSMHV_glksd1 / C_m2cm ; pParam->HSMHV_glksd2 = pParam->HSMHV_glksd2 * C_m2cm ; pParam->HSMHV_gleak2 = pParam->HSMHV_gleak2 * C_m2cm ; pParam->HSMHV_glkb2 = pParam->HSMHV_glkb2 * C_m2cm ; pParam->HSMHV_fn2 = pParam->HSMHV_fn2 * C_m2cm ; pParam->HSMHV_gidl1 = pParam->HSMHV_gidl1 / C_m2cm_p1o2 ; pParam->HSMHV_gidl2 = pParam->HSMHV_gidl2 * C_m2cm ; pParam->HSMHV_nfalp = pParam->HSMHV_nfalp / C_m2cm ; pParam->HSMHV_nftrp = pParam->HSMHV_nftrp * C_m2cm_p2 ; pParam->HSMHV_npext = pParam->HSMHV_npext / C_cm2m_p3 ; pParam->HSMHV_rd22 = pParam->HSMHV_rd22 / C_m2cm ; pParam->HSMHV_rd23 = pParam->HSMHV_rd23 / C_m2cm ; pParam->HSMHV_rd24 = pParam->HSMHV_rd24 / C_m2cm ; pParam->HSMHV_rdvd = pParam->HSMHV_rdvd / C_m2cm ; pParam->HSMHV_rth0 = pParam->HSMHV_rth0 / C_m2cm ; // hereMKS->HSMHV_muecb0 = pParam->HSMHV_muecb0 * C_m2cm_p2 ; // hereMKS->HSMHV_muecb1 = pParam->HSMHV_muecb1 * C_m2cm_p2 ; // hereMKS->HSMHV_muesr1 = pParam->HSMHV_muesr1 * C_m2cm_p2 ; // hereMKS->HSMHV_mueph1 = pParam->HSMHV_mueph1 * C_m2cm_p2 ; pParam->HSMHV_vfbover = - pParam->HSMHV_vfbover ; /* For Backward compatibility */ } /* instance */ /*-----------------------------------------------------------* * Range check of model parameters *-----------------*/ RANGECHECK(model->HSMHV_shemax , 300, 600, "SHEMAX"); if ( model->HSMHV_tox <= 0 ) { printf("warning(HiSIMHV): TOX = %e\n ", model->HSMHV_tox); printf("warning(HiSIMHV): The model parameter TOX must be positive.\n"); } RANGECHECK(model->HSMHV_xld, 0.0, 50.0e-9, "XLD") ; RANGECHECK(model->HSMHV_xwd, -10.0e-9, 100.0e-9, "XWD") ; RANGECHECK(model->HSMHV_xwdc, -10.0e-9, 100.0e-9, "XWDC") ; RANGECHECK(model->HSMHV_rsh, 0.0, 500, "RSH") ; RANGECHECK(model->HSMHV_rshg, 0.0, 100.0, "RSHG") ; if(model->HSMHV_xqy != 0.0) { MINCHECK (model->HSMHV_xqy, 10.0e-9, "XQY") ; } MINCHECK (model->HSMHV_xqy1, 0.0, "XQY1") ; MINCHECK (model->HSMHV_xqy2, 0.0, "XQY2") ; RANGECHECK(model->HSMHV_vbi, 1.0, 1.2, "VBI") ; RANGECHECK(model->HSMHV_parl2, 0.0, 50.0e-9, "PARL2") ; RANGECHECK(model->HSMHV_lp, 0.0, 300.0e-9, "LP") ; RANGECHECK(model->HSMHV_pgd2, 0.0, 1.5, "PGD2") ; RANGECHECK(model->HSMHV_pgd4, 0.0, 3.0, "PGD4") ; RANGECHECK(model->HSMHV_mueph0, 0.25, 0.35, "MUEPH0") ; RANGECHECK(model->HSMHV_muesr0, 1.8, 2.2, "MUESR0") ; RANGECHECK(model->HSMHV_lpext, 1.0e-50, 10.0e-6, "LPEXT") ; RANGECHECK(model->HSMHV_scp21, 0.0, 5.0, "SCP21") ; RANGECHECK(model->HSMHV_scp22, 0.0, 0.0, "SCP22") ; RANGECHECK(model->HSMHV_bs1, 0.0, 50.0e-3, "BS1") ; RANGECHECK(model->HSMHV_bs2, 0.5, 1.0, "BS2") ; RANGECHECK(model->HSMHV_clm5, 0.0, 2.0, "CLM5") ; RANGECHECK(model->HSMHV_clm6, 0.0, 20.0, "CLM6") ; MINCHECK (model->HSMHV_ninvd, 0.0, "NINVD") ; MINCHECK (model->HSMHV_ninvdw, 0.0, "NINVDW") ; MINCHECK (model->HSMHV_ninvdwp, 0.0, "NINVDWP") ; MINCHECK (model->HSMHV_ninvdt1, 0.0, "NINVDT1") ; MINCHECK (model->HSMHV_ninvdt2, 0.0, "NINVDT2") ; RANGECHECK(model->HSMHV_sub2l, 0.0, 1.0, "SUB2L") ; RANGECHECK(model->HSMHV_voverp, 0.0, 2.0, "VOVERP") ; RANGECHECK(model->HSMHV_qme1, 0.0, 300.0e-9, "QME1") ; RANGECHECK(model->HSMHV_qme2, 0.0, 2.0, "QME2") ; RANGECHECK(model->HSMHV_qme3, 0.0,800.0e-12, "QME3") ; RANGECHECK(model->HSMHV_glpart1, 0.0, 1.0, "GLPART1") ; RANGECHECK(model->HSMHV_tnom, 22.0, 32.0, "TNOM") ; RANGECHECK(model->HSMHV_ddltmax, 1.0, 10.0, "DDLTMAX") ; RANGECHECK(model->HSMHV_ddltict, -3.0, 20.0, "DDLTICT") ; RANGECHECK(model->HSMHV_ddltslp, 0.0, 20.0, "DDLTSLP") ; RANGECHECK(model->HSMHV_mphdfm, -3.0, 3.0, "MPHDFM") ; RANGECHECK(model->HSMHV_cvb, -0.1, 0.2, "CVB") ; RANGECHECK(model->HSMHV_cvbk, -0.1, 0.2, "CVBK") ; RANGECHECK(model->HSMHV_rd20, 0.0, 30.0, "RD20") ; RANGECHECK(model->HSMHV_rd21, 0.0, 1.0, "RD21") ; RANGECHECK(model->HSMHV_rd22d, 0.0, 2.0, "RD22D") ; MINCHECK( model->HSMHV_rd25, 0.0, "RD25") ; RANGECHECK(model->HSMHV_rdtemp1, -1e-3, 1e-2, "RDTEMP1") ; RANGECHECK(model->HSMHV_rdtemp2, -1e-5, 1e-5, "RDTEMP2") ; RANGECHECK(model->HSMHV_rdvdtemp1,-1e-3, 1e-2, "RDVDTEMP1") ; RANGECHECK(model->HSMHV_rdvdtemp2,-1e-5, 1e-5, "RDVDTEMP2") ; MINCHECK( model->HSMHV_rdvg12, 0.0, "RDVG12") ; RANGECHECK(model->HSMHV_rthtemp1, -1.0, 1.0, "RTHTEMP1") ; RANGECHECK(model->HSMHV_rthtemp2, -1.0, 1.0, "RTHTEMP2") ; RANGECHECK(model->HSMHV_rth0w, -100, 100, "RTH0W") ; RANGECHECK(model->HSMHV_rth0wp, -10, 10, "RTH0WP") ; RANGECHECK(model->HSMHV_rth0nf, -5.0, 5.0, "RTH0NF") ; RANGECHECK(model->HSMHV_powrat, 0.0, 1.0, "POWRAT") ; RANGECHECK(model->HSMHV_prattemp1, -1.0, 1.0, "PRATTEMP1") ; RANGECHECK(model->HSMHV_prattemp2, -1.0, 1.0, "PRATTEMP2") ; MINCHECK( model->HSMHV_xldld, 0.0, "XLDLD") ; MINCHECK( model->HSMHV_loverld, 0.0, "LOVERLD") ; MINCHECK( model->HSMHV_lovers, 0.0, "LOVERS") ; MINCHECK( model->HSMHV_lover, 0.0, "LOVER") ; MINCHECK( model->HSMHV_ldrift1, 0.0, "LDRIFT1") ; MINCHECK( model->HSMHV_ldrift1s, 0.0, "LDRIFT1S") ; MINCHECK( model->HSMHV_ldrift2, 0.0, "LDRIFT2") ; MINCHECK( model->HSMHV_ldrift2s, 0.0, "LDRIFT2S") ; MINCHECK( model->HSMHV_ldrift, 0.0, "LDRIFT") ; RANGECHECK(model->HSMHV_rds, -100, 100, "RDS") ; RANGECHECK(model->HSMHV_rdsp, -10, 10, "RDSP") ; RANGECHECK(model->HSMHV_rdvdl, -100, 100, "RDVDL") ; RANGECHECK(model->HSMHV_rdvdlp, -10, 10, "RDVDLP") ; RANGECHECK(model->HSMHV_rdvds, -100, 100, "RDVDS") ; RANGECHECK(model->HSMHV_rdvdsp, -10, 10, "RDVDSP") ; RANGECHECK(model->HSMHV_rd23l, -100, 100, "RD23L") ; RANGECHECK(model->HSMHV_rd23lp, -10, 10, "RD23LP") ; RANGECHECK(model->HSMHV_rd23s, -100, 100, "RD23S") ; RANGECHECK(model->HSMHV_rd23sp, -10, 10, "RD23SP") ; RANGECHECK(model->HSMHV_rdov11, 0.0, 10, "RDOV11") ; RANGECHECK(model->HSMHV_rdov12, 0.0, 2.0, "RDOV12") ; RANGECHECK(model->HSMHV_rdslp2, -10.0, 10.0, "RDSLP2") ; RANGECHECK(model->HSMHV_rdict2, -10.0, 10.0, "RDICT2") ; /*-----------------------------------------------------------* * Change units into MKS. *-----------------*/ modelMKS->HSMHV_vmax = model->HSMHV_vmax / C_m2cm ; modelMKS->HSMHV_ll = model->HSMHV_ll / pow( C_m2cm , model->HSMHV_lln ) ; modelMKS->HSMHV_wl = model->HSMHV_wl / pow( C_m2cm , model->HSMHV_wln ) ; modelMKS->HSMHV_svgsl = model->HSMHV_svgsl / pow( C_m2cm , model->HSMHV_svgslp ) ; modelMKS->HSMHV_svgsw = model->HSMHV_svgsw / pow( C_m2cm , model->HSMHV_svgswp ) ; modelMKS->HSMHV_svbsl = model->HSMHV_svbsl / pow( C_m2cm , model->HSMHV_svbslp ) ; modelMKS->HSMHV_slgl = model->HSMHV_slgl / pow( C_m2cm , model->HSMHV_slglp ) ; modelMKS->HSMHV_sub1l = model->HSMHV_sub1l / pow( C_m2cm , model->HSMHV_sub1lp ) ; modelMKS->HSMHV_slg = model->HSMHV_slg / C_m2cm ; modelMKS->HSMHV_sub2l = model->HSMHV_sub2l / C_m2cm ; modelMKS->HSMHV_subld2 = model->HSMHV_subld2 * C_m2cm ; modelMKS->HSMHV_rdtemp1 = model->HSMHV_rdtemp1 / C_m2cm ; modelMKS->HSMHV_rdtemp2 = model->HSMHV_rdtemp2 / C_m2cm ; modelMKS->HSMHV_rdvdtemp1 = model->HSMHV_rdvdtemp1 / C_m2cm ; modelMKS->HSMHV_rdvdtemp2 = model->HSMHV_rdvdtemp2 / C_m2cm ; modelMKS->HSMHV_nsubsub = model->HSMHV_nsubsub / C_cm2m_p3 ; modelMKS->HSMHV_nsubpsti1 = model->HSMHV_nsubpsti1 / C_m2cm ; modelMKS->HSMHV_muesti1 = model->HSMHV_muesti1 / C_m2cm ; modelMKS->HSMHV_wfc = model->HSMHV_wfc * C_m2cm_p2 ; modelMKS->HSMHV_glksd1 = model->HSMHV_glksd1 / C_m2cm ; modelMKS->HSMHV_glksd2 = model->HSMHV_glksd2 * C_m2cm ; modelMKS->HSMHV_glksd3 = model->HSMHV_glksd3 * C_m2cm ; modelMKS->HSMHV_gleak2 = model->HSMHV_gleak2 * C_m2cm ; modelMKS->HSMHV_gleak4 = model->HSMHV_gleak4 * C_m2cm ; modelMKS->HSMHV_gleak5 = model->HSMHV_gleak5 * C_m2cm ; modelMKS->HSMHV_gleak7 = model->HSMHV_gleak7 / C_m2cm_p2 ; modelMKS->HSMHV_glkb2 = model->HSMHV_glkb2 * C_m2cm ; modelMKS->HSMHV_fn2 = model->HSMHV_fn2 * C_m2cm ; modelMKS->HSMHV_gidl1 = model->HSMHV_gidl1 / C_m2cm_p1o2 ; modelMKS->HSMHV_gidl2 = model->HSMHV_gidl2 * C_m2cm ; modelMKS->HSMHV_nfalp = model->HSMHV_nfalp / C_m2cm ; modelMKS->HSMHV_nftrp = model->HSMHV_nftrp * C_m2cm_p2 ; modelMKS->HSMHV_cit = model->HSMHV_cit * C_m2cm_p2 ; modelMKS->HSMHV_ovslp = model->HSMHV_ovslp / C_m2cm ; modelMKS->HSMHV_dly3 = model->HSMHV_dly3 / C_m2cm_p2 ; modelMKS->HSMHV_cth0 = model->HSMHV_cth0 * C_m2cm ; // modelMKS->HSMHV_muecb0 = model->HSMHV_muecb0 * C_cm2m_p2 ; // modelMKS->HSMHV_muecb1 = model->HSMHV_muecb1 * C_cm2m_p2 ; // modelMKS->HSMHV_muesr1 = model->HSMHV_muesr1 * C_cm2m_p2 ; // modelMKS->HSMHV_mueph1 = model->HSMHV_mueph1 * C_cm2m_p2 ; /*-----------------------------------------------------------* * Change unit into Kelvin. *-----------------*/ model->HSMHV_ktnom = model->HSMHV_tnom + 273.15 ; /* [C] -> [K] */ } /* model */ /* Reset ckt->CKTbypass to 0 */ if( ckt->CKTbypass == 1 ) { fprintf( stderr, "\nwarning(HiSIMHV): The BYPASS option is reset to 0 for reliable simulation.\n"); ckt->CKTbypass = 0 ; } /* check ckt->CKTintegrateMethod */ if( ckt->CKTintegrateMethod == TRAPEZOIDAL ) { /* TRAPEZODAL:1 GEAR:2 */ fprintf( stderr, "\nwarning(HiSIMHV): Recommend the Gear method for reliable simulation with '.options METHOD=GEAR'.\n"); } return(OK); } int HSMHVunsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM HSMHVmodel *model; HSMHVinstance *here; for (model = (HSMHVmodel *)inModel; model != NULL; model = model->HSMHVnextModel) { for (here = model->HSMHVinstances; here != NULL; here=here->HSMHVnextInstance) { if (here->HSMHVdNodePrime && here->HSMHVdNodePrime != here->HSMHVdNode) { CKTdltNNum(ckt, here->HSMHVdNodePrime); here->HSMHVdNodePrime = 0; } if (here->HSMHVsNodePrime && here->HSMHVsNodePrime != here->HSMHVsNode) { CKTdltNNum(ckt, here->HSMHVsNodePrime); here->HSMHVsNodePrime = 0; } if (here->HSMHVgNodePrime && here->HSMHVgNodePrime != here->HSMHVgNode) { CKTdltNNum(ckt, here->HSMHVgNodePrime); here->HSMHVgNodePrime = 0; } if (here->HSMHVbNodePrime && here->HSMHVbNodePrime != here->HSMHVbNode) { CKTdltNNum(ckt, here->HSMHVbNodePrime); here->HSMHVbNodePrime = 0; } if (here->HSMHVdbNode && here->HSMHVdbNode != here->HSMHVbNode) { CKTdltNNum(ckt, here->HSMHVdbNode); here->HSMHVdbNode = 0; } if (here->HSMHVsbNode && here->HSMHVsbNode != here->HSMHVbNode) { CKTdltNNum(ckt, here->HSMHVsbNode); here->HSMHVsbNode = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvtemp.c0000644000265600020320000004034012264261473022144 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvtemp.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "hsmhvevalenv.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define RANGECHECK(param, min, max, pname) \ if ( (param) < (min) || (param) > (max) ) { \ printf("warning(HiSIMHV): The model/instance parameter %s (= %e) must be in the range [%e , %e].\n", \ (pname), (param), (min), (max) ); \ } #define Fn_SU( y , x , xmax , delta , dx ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta ) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : -( TMF2) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } #define Fn_SL( y , x , xmin , delta , dx ) { \ TMF1 = ( x ) - ( xmin ) - ( delta ) ; \ TMF2 = 4.0 * ( xmin ) * ( delta ) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : -( TMF2 ); \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \ } #ifdef POW_TO_EXP_AND_LOG #define Fn_Pow( x , y ) exp( y * log( x ) ) #else #define Fn_Pow( x , y ) pow( x , y ) #endif #define C_m2cm (1.0e2) int HSMHVtemp( GENmodel *inModel, CKTcircuit *ckt) { register HSMHVmodel *model = (HSMHVmodel *)inModel ; register HSMHVinstance *here ; HSMHVbinningParam *pParam ; HSMHVmodelMKSParam *modelMKS ; HSMHVhereMKSParam *hereMKS ; double mueph =0.0 ; double Leff=0.0, dL =0.0, dLLD=0.0, LG=0.0, Weff=0.0, dW =0.0, dWLD=0.0, dWCV=0.0, WG =0.0, WL =0.0, Lgate =0.0, Wgate =0.0 ; double Nsubpp=0.0, Nsubps=0.0, Nsub=0.0, q_Nsub=0.0, Nsubb=0.0, Npext =0.0 ; double Lod_half=0.0, Lod_half_ref =0.0 ; double T0, T1, T2, T3, T4, T5, T6, T7 ; /* temperature-dependent variables */ double Eg =0.0, TTEMP0=0.0, TTEMP=0.0, beta=0.0, Nin=0.0 ; double Tdiff0 = 0.0, Tdiff0_2 = 0.0, Tdiff = 0.0, Tdiff_2 = 0.0 ; double js=0.0, jssw=0.0, js2=0.0, jssw2 =0.0 ; int i=0 ; double TMF1 , TMF2 ; const double small = 1.0e-50 ; const double dlt_rd23 = 1.0e-6 / C_m2cm ; const double large_arg = 80 ; for ( ;model ;model = model->HSMHVnextModel ) { modelMKS = &model->modelMKS ; model->HSMHV_vcrit = CONSTvt0 * log( CONSTvt0 / (CONSTroot2 * 1.0e-14) ) ; /* Quantum Mechanical Effect */ if ( ( model->HSMHV_qme1 == 0.0 && model->HSMHV_qme3 == 0.0 ) || model->HSMHV_qme2 == 0.0 ) { model->HSMHV_flg_qme = 0 ; } else { model->HSMHV_flg_qme = 1 ; model->HSMHV_qme12 = model->HSMHV_qme1 / ( model->HSMHV_qme2 * model->HSMHV_qme2 ) ; } for ( here = model->HSMHVinstances; here; here = here->HSMHVnextInstance ) { pParam = &here->pParam ; hereMKS = &here->hereMKS ; here->HSMHV_lgate = Lgate = here->HSMHV_l + model->HSMHV_xl ; Wgate = here->HSMHV_w / here->HSMHV_nf + model->HSMHV_xw ; LG = Lgate * C_m2um ; here->HSMHV_wg = WG = Wgate * C_m2um ; WL = WG * LG ; /* Band gap */ here->HSMHV_egtnom = pParam->HSMHV_eg0 - model->HSMHV_ktnom * ( 90.25e-6 + model->HSMHV_ktnom * 1.0e-7 ) ; /* C_EOX */ here->HSMHV_cecox = C_VAC * model->HSMHV_kappa ; /* Vth reduction for small Vds */ here->HSMHV_msc = model->HSMHV_scp22 ; /* Poly-Si Gate Depletion */ if ( pParam->HSMHV_pgd1 == 0.0 ) { here->HSMHV_flg_pgd = 0 ; } else { here->HSMHV_flg_pgd = 1 ; } /* CLM5 & CLM6 */ here->HSMHV_clmmod = 1e0 + pow( LG , model->HSMHV_clm5 ) * model->HSMHV_clm6 ; /* Half length of diffusion */ T1 = 1.0 / (model->HSMHV_saref + 0.5 * here->HSMHV_l) + 1.0 / (model->HSMHV_sbref + 0.5 * here->HSMHV_l); Lod_half_ref = 2.0 / T1 ; if (here->HSMHV_sa > 0.0 && here->HSMHV_sb > 0.0 && (here->HSMHV_nf == 1.0 || (here->HSMHV_nf > 1.0 && here->HSMHV_sd > 0.0))) { T1 = 0.0; for (i = 0; i < here->HSMHV_nf; i++) { T1 += 1.0 / (here->HSMHV_sa + 0.5 * here->HSMHV_l + i * (here->HSMHV_sd + here->HSMHV_l)) + 1.0 / (here->HSMHV_sb + 0.5 * here->HSMHV_l + i * (here->HSMHV_sd + here->HSMHV_l)); } Lod_half = 2.0 * here->HSMHV_nf / T1; } else { Lod_half = 0.0; } Npext = pParam->HSMHV_npext ; here->HSMHV_mueph1 = pParam->HSMHV_mueph1 ; here->HSMHV_nsubp = pParam->HSMHV_nsubp ; here->HSMHV_nsubc = pParam->HSMHV_nsubc ; /* DFM */ if ( model->HSMHV_codfm == 1 && here->HSMHV_nsubcdfm_Given ) { RANGECHECK(hereMKS->HSMHV_nsubcdfm, 1.0e16, 1.0e19, "NSUBCDFM") ; here->HSMHV_mueph1 *= model->HSMHV_mphdfm * ( log(hereMKS->HSMHV_nsubcdfm) - log(here->HSMHV_nsubc) ) + 1.0 ; here->HSMHV_nsubp += hereMKS->HSMHV_nsubcdfm - here->HSMHV_nsubc ; Npext += hereMKS->HSMHV_nsubcdfm - here->HSMHV_nsubc ; here->HSMHV_nsubc = hereMKS->HSMHV_nsubcdfm ; } /* Phonon Scattering (temperature-independent part) */ mueph = here->HSMHV_mueph1 * (1.0e0 + (model->HSMHV_muephw / pow( WG, model->HSMHV_muepwp))) * (1.0e0 + (model->HSMHV_muephl / pow( LG, model->HSMHV_mueplp))) * (1.0e0 + (model->HSMHV_muephs / pow( WL, model->HSMHV_muepsp))); if (Lod_half > 0.0) { T1 = 1.0e0 / (1.0e0 + pParam->HSMHV_muesti2) ; T2 = pow (pParam->HSMHV_muesti1 / Lod_half, pParam->HSMHV_muesti3) ; T3 = pow (pParam->HSMHV_muesti1 / Lod_half_ref, pParam->HSMHV_muesti3) ; here->HSMHV_mueph = mueph * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3); } else { here->HSMHV_mueph = mueph; } /* Surface Roughness Scattering */ here->HSMHV_muesr = model->HSMHV_muesr0 * (1.0e0 + (model->HSMHV_muesrl / pow (LG, model->HSMHV_mueslp))) * (1.0e0 + (model->HSMHV_muesrw / pow (WG, model->HSMHV_mueswp))) ; /* Coefficients of Qbm for Eeff */ T1 = pow( LG, model->HSMHV_ndeplp ) ; here->HSMHV_ndep_o_esi = ( pParam->HSMHV_ndep * T1 ) / ( T1 + model->HSMHV_ndepl ) / C_ESI ; here->HSMHV_ninv_o_esi = pParam->HSMHV_ninv / C_ESI ; here->HSMHV_ninvd0 = model->HSMHV_ninvd * ( 1.0 + (model->HSMHV_ninvdw / pow( WG, model->HSMHV_ninvdwp))); /* Metallurgical channel geometry */ dL = model->HSMHV_xld + (modelMKS->HSMHV_ll / pow (Lgate + model->HSMHV_lld, model->HSMHV_lln)) ; dLLD = model->HSMHV_xldld + (modelMKS->HSMHV_ll / pow (Lgate + model->HSMHV_lld, model->HSMHV_lln)) ; dW = model->HSMHV_xwd + (modelMKS->HSMHV_wl / pow (Wgate + model->HSMHV_wld, model->HSMHV_wln)) ; dWLD = model->HSMHV_xwdld + (modelMKS->HSMHV_wl / pow (Wgate + model->HSMHV_wld, model->HSMHV_wln)) ; dWCV = model->HSMHV_xwdc + (modelMKS->HSMHV_wl / pow (Wgate + model->HSMHV_wld, model->HSMHV_wln)) ; Leff = Lgate - ( dL + dLLD ) ; if ( Leff <= 0.0 ) { IFuid namarr[2]; namarr[0] = model->HSMHVmodName; namarr[1] = here->HSMHVname; (*(SPfrontEnd->IFerror)) ( ERR_FATAL, "HiSIM_HV: MOSFET(%s) MODEL(%s): effective channel length is negative or 0", namarr ); return (E_BADPARM); } here->HSMHV_leff = Leff ; /* Wg dependence for short channel devices */ here->HSMHV_lgatesm = Lgate + model->HSMHV_wl1 / pow( WL , model->HSMHV_wl1p ) ; here->HSMHV_dVthsm = pParam->HSMHV_wl2 / pow( WL , model->HSMHV_wl2p ) ; /* Lg dependence of wsti */ T1 = 1.0e0 + model->HSMHV_wstil / pow( here->HSMHV_lgatesm * C_m2um , model->HSMHV_wstilp ) ; T2 = 1.0e0 + model->HSMHV_wstiw / pow( WG , model->HSMHV_wstiwp ) ; here->HSMHV_wsti = pParam->HSMHV_wsti * T1 * T2 ; here->HSMHV_weff = Weff = Wgate - 2.0e0 * dW ; here->HSMHV_weff_ld = Wgate - 2.0e0 * dWLD ; here->HSMHV_weff_cv = Wgate - 2.0e0 * dWCV ; if ( Weff <= 0.0 ) { IFuid namarr[2]; namarr[0] = model->HSMHVmodName; namarr[1] = here->HSMHVname; (*(SPfrontEnd->IFerror)) ( ERR_FATAL, "HiSIM_HV: MOSFET(%s) MODEL(%s): effective channel width is negative or 0", namarr ); return (E_BADPARM); } here->HSMHV_weff_nf = Weff * here->HSMHV_nf ; here->HSMHV_weffcv_nf = here->HSMHV_weff_cv * here->HSMHV_nf ; /* Surface impurity profile */ /* Note: Sign Changed --> */ Nsubpp = here->HSMHV_nsubp * (1.0e0 + (model->HSMHV_nsubp0 / pow (WG, model->HSMHV_nsubwp))) ; /* <-- Note: Sign Changed */ if (Lod_half > 0.0) { T1 = 1.0e0 / (1.0e0 + pParam->HSMHV_nsubpsti2) ; T2 = pow (pParam->HSMHV_nsubpsti1 / Lod_half, pParam->HSMHV_nsubpsti3) ; T3 = pow (pParam->HSMHV_nsubpsti1 / Lod_half_ref, pParam->HSMHV_nsubpsti3) ; Nsubps = Nsubpp * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3) ; } else { Nsubps = Nsubpp ; } here->HSMHV_nsubc *= 1.0e0 + ( model->HSMHV_nsubcw / pow ( WG, model->HSMHV_nsubcwp )) ; if( Lgate > model->HSMHV_lp ){ Nsub = (here->HSMHV_nsubc * (Lgate - model->HSMHV_lp) + Nsubps * model->HSMHV_lp) / Lgate ; } else { Nsub = Nsubps + (Nsubps - here->HSMHV_nsubc) * (model->HSMHV_lp - Lgate) / model->HSMHV_lp ; } T3 = 0.5e0 * Lgate - model->HSMHV_lp ; T1 = 1.0e0 / ( 1.0e0 / T3 + 1.0e0 / model->HSMHV_lpext ) ; T2 = Fn_Max (0.0e0, T1) ; here->HSMHV_nsub = Nsub = Nsub + T2 * (Npext - here->HSMHV_nsubc) / Lgate ; here->HSMHV_qnsub = q_Nsub = C_QE * Nsub ; here->HSMHV_qnsub_esi = q_Nsub * C_ESI ; here->HSMHV_2qnsub_esi = 2.0 * here->HSMHV_qnsub_esi ; /* Pocket Overlap (temperature-independent part) */ if ( Lgate <= 2.0e0 * model->HSMHV_lp ) { Nsubb = 2.0e0 * Nsubps - (Nsubps - here->HSMHV_nsubc) * Lgate / model->HSMHV_lp - here->HSMHV_nsubc ; here->HSMHV_ptovr0 = log (Nsubb / here->HSMHV_nsubc) ; /* here->HSMHV_ptovr0 will be divided by beta later. */ } else { here->HSMHV_ptovr0 = 0.0e0 ; } /* costi0 and costi1 for STI transistor model (temperature-independent part) */ here->HSMHV_costi00 = sqrt (2.0 * C_QE * pParam->HSMHV_nsti * C_ESI ) ; here->HSMHV_nsti_p2 = 1.0 / ( pParam->HSMHV_nsti * pParam->HSMHV_nsti ) ; /* Velocity Temperature Dependence (Temperature-dependent part will be multiplied later.) */ here->HSMHV_vmax0 = (1.0e0 + (pParam->HSMHV_vover / pow (LG, model->HSMHV_voverp))) * (1.0e0 + (model->HSMHV_vovers / pow (WL, model->HSMHV_voversp))) ; /* 2 phi_B (temperature-independent) */ /* @300K, with pocket */ here->HSMHV_pb20 = 2.0e0 / C_b300 * log (Nsub / C_Nin0) ; /* @300K, w/o pocket */ here->HSMHV_pb2c = 2.0e0 / C_b300 * log (here->HSMHV_nsubc / C_Nin0) ; /* constant for Poly depletion */ here->HSMHV_cnstpgd = pow ( 1e0 + 1e0 / LG , model->HSMHV_pgd4 ) * pParam->HSMHV_pgd1 ; /* Gate resistance */ if ( here->HSMHV_corg == 1 ) { T1 = here->HSMHV_xgw + Weff / (3.0e0 * here->HSMHV_ngcon); T2 = Lgate - here->HSMHV_xgl; here->HSMHV_grg = model->HSMHV_rshg * T1 / (here->HSMHV_ngcon * T2 * here->HSMHV_nf); if (here->HSMHV_grg > 1.0e-3) here->HSMHV_grg = here->HSMHV_m / here->HSMHV_grg; else { here->HSMHV_grg = here->HSMHV_m * 1.0e3; printf("warning(HiSIM_HV): The gate conductance reset to 1.0e3 mho.\n"); } } /* Process source/drain series resistamce */ if ( model->HSMHV_rsh > 0.0 ) { here->HSMHV_rd0 = model->HSMHV_rsh * here->HSMHV_nrd ; } else { here->HSMHV_rd0 = 0.0 ; } if ( pParam->HSMHV_rd > 0.0 || pParam->HSMHV_rs > 0.0 ) { here->HSMHV_rdtemp0 = 1.0 + model->HSMHV_rds / pow( here->HSMHV_w * C_m2um * LG , model->HSMHV_rdsp ) ; if( pParam->HSMHV_rdvd != 0.0 ){ T7 = ( 1.0 + model->HSMHV_rdvds / pow( here->HSMHV_w * C_m2um * LG , model->HSMHV_rdvdsp ) ); T6 = ( - model->HSMHV_rdvdl * pow( LG , model->HSMHV_rdvdlp ) ) ; if(T6 > large_arg) T6 = large_arg ; T6 = exp( T6 ) ; here->HSMHV_rdvdtemp0 = T6 * T7 ; } } if( pParam->HSMHV_rd23 != 0.0 ){ T2 = ( 1.0 + model->HSMHV_rd23s / pow( here->HSMHV_w * C_m2um * LG , model->HSMHV_rd23sp ) ); T1 = ( - model->HSMHV_rd23l * pow( LG , model->HSMHV_rd23lp ) ) ; if(T1 > large_arg) T1 = large_arg ; T1 = exp( T1 ) ; T3 = pParam->HSMHV_rd23 * T2 * T1 ; here->HSMHV_rd23 = 0.5 * ( T3 + sqrt ( T3 * T3 + 4.0 * dlt_rd23 * dlt_rd23 ) ) ; } else { here->HSMHV_rd23 = 0.0 ; } if ( model->HSMHV_rsh > 0.0 ) { here->HSMHV_rs0 = model->HSMHV_rsh * here->HSMHV_nrs ; } else { here->HSMHV_rs0 = 0.0 ; } /* Body resistance */ if ( here->HSMHV_corbnet == 1 ) { if (here->HSMHV_rbpb < 1.0e-3) here->HSMHV_grbpb = here->HSMHV_m * 1.0e3 ; else here->HSMHV_grbpb = here->HSMHV_m * ( model->HSMHV_gbmin + 1.0 / here->HSMHV_rbpb ) ; if (here->HSMHV_rbps < 1.0e-3) here->HSMHV_grbps = here->HSMHV_m * 1.0e3 ; else here->HSMHV_grbps = here->HSMHV_m * ( model->HSMHV_gbmin + 1.0 / here->HSMHV_rbps ) ; if (here->HSMHV_rbpd < 1.0e-3) here->HSMHV_grbpd = here->HSMHV_m * 1.0e3 ; else here->HSMHV_grbpd = here->HSMHV_m * ( model->HSMHV_gbmin + 1.0 / here->HSMHV_rbpd ) ; } /* Vdseff */ T1 = model->HSMHV_ddltslp * LG + model->HSMHV_ddltict ; if ( T1 < 0.0 ) { T1 = 0.0 ; } here->HSMHV_ddlt = T1 * model->HSMHV_ddltmax / ( T1 + model->HSMHV_ddltmax ) + 1.0 ; /* Isub */ T2 = pow( Weff , model->HSMHV_svgswp ) ; here->HSMHV_vg2const = pParam->HSMHV_svgs * ( 1.0e0 + modelMKS->HSMHV_svgsl / pow( here->HSMHV_lgate , model->HSMHV_svgslp ) ) * ( T2 / ( T2 + modelMKS->HSMHV_svgsw ) ) ; here->HSMHV_xvbs = pParam->HSMHV_svbs * ( 1.0e0 + modelMKS->HSMHV_svbsl / pow( here->HSMHV_lgate , model->HSMHV_svbslp ) ) ; here->HSMHV_xgate = modelMKS->HSMHV_slg * ( 1.0 + modelMKS->HSMHV_slgl / pow( here->HSMHV_lgate , model->HSMHV_slglp ) ) ; here->HSMHV_xsub1 = pParam->HSMHV_sub1 * ( 1.0 + modelMKS->HSMHV_sub1l / pow( here->HSMHV_lgate , model->HSMHV_sub1lp ) ) ; here->HSMHV_xsub2 = pParam->HSMHV_sub2 * ( 1.0 + modelMKS->HSMHV_sub2l / here->HSMHV_lgate ) ; /* Fringing capacitance */ here->HSMHV_cfrng = C_EOX / ( C_Pi / 2.0e0 ) * here->HSMHV_weff_nf * log( 1.0e0 + model->HSMHV_tpoly / model->HSMHV_tox ) ; /* Additional term of lateral-field-induced capacitance */ here->HSMHV_cqyb0 = C_m2um * here->HSMHV_weff_nf * model->HSMHV_xqy1 / pow( LG , model->HSMHV_xqy2 ) ; /* Self heating */ pParam->HSMHV_rth = pParam->HSMHV_rth0 / ( here->HSMHV_m * here->HSMHV_weff_nf ) * ( 1.0 + model->HSMHV_rth0w / pow( here->HSMHV_w * C_m2um , model->HSMHV_rth0wp ) ); pParam->HSMHV_cth = modelMKS->HSMHV_cth0 * ( here->HSMHV_m * here->HSMHV_weff_nf ) ; pParam->HSMHV_rth *= ( 1.0 / pow( here->HSMHV_nf , model->HSMHV_rth0nf ) ) ; here->HSMHV_rthtemp0 = 1.0 / pow( here->HSMHV_nf , model->HSMHV_rth0nf ) / ( here->HSMHV_m * here->HSMHV_weff_nf ) * ( 1.0 + model->HSMHV_rth0w / pow( here->HSMHV_w * C_m2um , model->HSMHV_rth0wp ) ); /*-----------------------------------------------------------* * Temperature dependent constants. *-----------------*/ if ( here->HSMHVtempNode < 0 || pParam->HSMHV_rth0 == 0.0 ) { #include "hsmhvtemp_eval.h" } /* end of if ( here->HSMHVtempNode < 0 || pParam->HSMHV_rth0 == 0.0 ) */ } } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvdel.c0000644000265600020320000000231012264261473021736 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvdel.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int HSMHVdelete( GENmodel *inModel, IFuid name, GENinstance **inInst) { HSMHVinstance **fast = (HSMHVinstance**)inInst; HSMHVmodel *model = (HSMHVmodel*)inModel; HSMHVinstance **prev = NULL; HSMHVinstance *here; for( ;model ;model = model->HSMHVnextModel ) { prev = &(model->HSMHVinstances); for ( here = *prev ;here ;here = *prev ) { if ( here->HSMHVname == name || (fast && here==*fast) ) { *prev= here->HSMHVnextInstance; FREE(here); return(OK); } prev = &(here->HSMHVnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvtemp_eval.h0000644000265600020320000004227512264261473023171 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvtemp_eval.h DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #define C_rdtemp_min 5.0e-3 #define C_rdtemp_dlt 1.0e-2 TTEMP = ckt->CKTtemp; if ( here->HSMHV_dtemp_Given ) { TTEMP = TTEMP + here->HSMHV_dtemp ; } TTEMP0 = TTEMP ; #ifdef HSMHVEVAL /* Self heating */ TTEMP = TTEMP + deltemp ; #endif Tdiff0 = TTEMP0 - model->HSMHV_ktnom ; Tdiff0_2 = TTEMP0 * TTEMP0 - model->HSMHV_ktnom * model->HSMHV_ktnom ; Tdiff = TTEMP - model->HSMHV_ktnom ; Tdiff_2 = TTEMP * TTEMP - model->HSMHV_ktnom * model->HSMHV_ktnom ; /* Band gap */ T1 = TTEMP - model->HSMHV_ktnom ; T2 = TTEMP * TTEMP - model->HSMHV_ktnom * model->HSMHV_ktnom ; here->HSMHV_eg = Eg = here->HSMHV_egtnom - pParam->HSMHV_bgtmp1 * T1 - pParam->HSMHV_bgtmp2 * T2 ; here->HSMHV_sqrt_eg = sqrt( Eg ) ; #ifdef HSMHVEVAL Eg_dT = -pParam->HSMHV_bgtmp1 - 2.0e0 * TTEMP * pParam->HSMHV_bgtmp2 ; #endif T1 = 1.0 / TTEMP ; T2 = 1.0 / model->HSMHV_ktnom ; T3 = here->HSMHV_egtnom + model->HSMHV_egig + model->HSMHV_igtemp2 * ( T1 - T2 ) + model->HSMHV_igtemp3 * ( T1 * T1 - T2 * T2 ) ; here->HSMHV_egp12 = sqrt ( T3 ) ; here->HSMHV_egp32 = T3 * here->HSMHV_egp12 ; /* Inverse of the thermal voltage */ here->HSMHV_beta = beta = C_QE / (C_KB * TTEMP) ; here->HSMHV_beta_inv = 1.0 / beta ; here->HSMHV_beta2 = beta * beta ; here->HSMHV_betatnom = C_QE / (C_KB * model->HSMHV_ktnom) ; #ifdef HSMHVEVAL beta_dT=-C_QE/(C_KB*TTEMP*TTEMP); beta_inv_dT = C_KB / C_QE ; #endif /* Intrinsic carrier concentration */ here->HSMHV_nin = Nin = C_Nin0 * Fn_Pow (TTEMP / model->HSMHV_ktnom, 1.5e0) * exp (- Eg / 2.0e0 * beta + here->HSMHV_egtnom / 2.0e0 * here->HSMHV_betatnom) ; #ifdef HSMHVEVAL Nin_dT = C_Nin0 * exp (- Eg / 2.0e0 * beta + here->HSMHV_egtnom / 2.0e0 * here->HSMHV_betatnom) * 1.5e0 * Fn_Pow ( TTEMP / model->HSMHV_ktnom , 0.5e0 ) / model->HSMHV_ktnom + C_Nin0 * Fn_Pow (TTEMP / model->HSMHV_ktnom, 1.5e0) * exp (- Eg / 2.0e0 * beta + here->HSMHV_egtnom / 2.0e0 * here->HSMHV_betatnom) * ( - Eg / 2.0e0 * beta_dT - beta / 2.0e0 * Eg_dT ); #endif /* Phonon Scattering (temperature-dependent part) */ T1 = Fn_Pow (TTEMP / model->HSMHV_ktnom, pParam->HSMHV_muetmp) ; here->HSMHV_mphn0 = T1 / here->HSMHV_mueph ; here->HSMHV_mphn1 = here->HSMHV_mphn0 * model->HSMHV_mueph0 ; #ifdef HSMHVEVAL T1_dT = pParam->HSMHV_muetmp * Fn_Pow(TTEMP / model->HSMHV_ktnom, pParam->HSMHV_muetmp - 1.0 ) / model->HSMHV_ktnom ; mphn0_dT = T1_dT / here->HSMHV_mueph ; #endif /* Pocket Overlap (temperature-dependent part) */ here->HSMHV_ptovr = here->HSMHV_ptovr0 / beta ; #ifdef HSMHVEVAL ptovr_dT = here->HSMHV_ptovr0 * beta_inv_dT ; #endif /* Velocity Temperature Dependence */ T1 = TTEMP / model->HSMHV_ktnom ; T3 = TTEMP0 - model->HSMHV_ktnom ; T4 = TTEMP0 * TTEMP0 - model->HSMHV_ktnom * model->HSMHV_ktnom ; T0 = 1.8 + 0.4 * T1 + 0.1 * T1 * T1 - pParam->HSMHV_vtmp * (1.0 - T1) ; if ( model->HSMHV_cotemp != 2 ) { /* without deltemp (COTEMP=0,1,3) */ here->HSMHV_vmax = here->HSMHV_vmax0 * pParam->HSMHV_vmax / T0 * ( 1.0 + model->HSMHV_vmaxt1 * T3 + model->HSMHV_vmaxt2 * T4 ) ; #ifdef HSMHVEVAL Vmax_dT=-here->HSMHV_vmax0 * pParam->HSMHV_vmax / ( T0 * T0 ) * ( 1.0 + model->HSMHV_vmaxt1 * T3 + model->HSMHV_vmaxt2 * T4 ) * 1/model->HSMHV_ktnom * (0.4 + 0.2 * T1 + pParam->HSMHV_vtmp) ; #endif } else { /* with deltemp (COTEMP=2) */ here->HSMHV_vmax = here->HSMHV_vmax0 * pParam->HSMHV_vmax / T0 * ( 1.0 + model->HSMHV_vmaxt1 * Tdiff + model->HSMHV_vmaxt2 * Tdiff_2 ) ; #ifdef HSMHVEVAL /* under development */ Vmax_dT = here->HSMHV_vmax0 * pParam->HSMHV_vmax / ( T0 * T0 ) * ( ( model->HSMHV_vmaxt1 + 2.0 * TTEMP * model->HSMHV_vmaxt2 ) * T0 - ( 1.0 + model->HSMHV_vmaxt1 * Tdiff + model->HSMHV_vmaxt2 * Tdiff_2 ) * 1/model->HSMHV_ktnom * (0.4 + 0.2 * T1 + pParam->HSMHV_vtmp) ) ; #endif } if ( model->HSMHV_cotemp != 2 ) { /* without deltemp (COTEMP=0,1,3) */ here->HSMHV_ninvd = here->HSMHV_ninvd0 * ( 1.0 + model->HSMHV_ninvdt1 * T3 + model->HSMHV_ninvdt2 * T4 ) ; #ifdef HSMHVEVAL ninvd_dT = 0.0 ; #endif } else { /* with deltemp (COTEMP=2) */ /* under development */ here->HSMHV_ninvd = here->HSMHV_ninvd0 * ( 1.0 + model->HSMHV_ninvdt1 * Tdiff + model->HSMHV_ninvdt2 * Tdiff_2 ) ; #ifdef HSMHVEVAL ninvd_dT = here->HSMHV_ninvd0 * ( model->HSMHV_ninvdt1 + 2.0 * TTEMP * model->HSMHV_ninvdt2 ) ; #endif } /* Temperature Dependence of RTH0 */ pParam->HSMHV_rth = ( pParam->HSMHV_rth0 + model->HSMHV_rthtemp1 * T3 + model->HSMHV_rthtemp2 * T4 ) * here->HSMHV_rthtemp0 ; /* Temperature Dependence of POWRAT */ T2 = pParam->HSMHV_powrat + model->HSMHV_prattemp1 * T3 + model->HSMHV_prattemp2 * T4 ; Fn_SL( T2 , T2 , 0 , 0.05 , T0 ); Fn_SU( here->HSMHV_powratio , T2 , 1 , 0.05 , T0 ); /* 2 phi_B (temperature-dependent) */ /* @temp, with pocket */ here->HSMHV_pb2 = 2.0e0 / beta * log (here->HSMHV_nsub / Nin) ; #ifdef HSMHVEVAL Pb2_dT = - (here->HSMHV_pb2 * beta_dT + 2.0e0 / Nin * Nin_dT ) / beta ; #endif /* Depletion Width */ T1 = 2.0e0 * C_ESI / C_QE ; here->HSMHV_wdpl = sqrt ( T1 / here->HSMHV_nsub ) ; here->HSMHV_wdplp = sqrt( T1 / ( here->HSMHV_nsubp ) ) ; /* Coefficient of the F function for bulk charge */ here->HSMHV_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSMHV_nsub / beta ) ; /* cnst1: n_{p0} / p_{p0} */ T1 = Nin / here->HSMHV_nsub ; here->HSMHV_cnst1 = T1 * T1 ; #ifdef HSMHVEVAL cnst0_dT = 0.5e0 / here->HSMHV_cnst0 * 2.0 * C_ESI * C_QE * here->HSMHV_nsub * beta_inv_dT ; cnst1_dT = 2.0e0 * Nin * Nin_dT / here->HSMHV_nsub / here->HSMHV_nsub ; #endif if ( pParam->HSMHV_nover != 0.0 ) { here->HSMHV_cnst0over = here->HSMHV_cnst0 * sqrt( pParam->HSMHV_nover / here->HSMHV_nsub ) ; #ifdef HSMHVEVAL cnst0over_dT = cnst0_dT * sqrt( pParam->HSMHV_nover / here->HSMHV_nsub ) ; #endif /* ps0ldinib : Ps0_iniB for Ps0LD */ T1 = here->HSMHV_cnst0over * model->HSMHV_tox / here->HSMHV_cecox ; T2 = pParam->HSMHV_nover / Nin ; here->HSMHV_ps0ldinib = T2 * T2 / ( T1 * T1 ); #ifdef HSMHVEVAL T1_dT = cnst0over_dT * model->HSMHV_tox / here->HSMHV_cecox ; T2_dT = - Nin_dT * T2 / Nin; ps0ldinib_dT = 2.0 * here->HSMHV_ps0ldinib * ( T2_dT * T1 - T2 * T1_dT ) / ( T1 * T2 ); #endif } if ( pParam->HSMHV_novers != 0.0 ) { here->HSMHV_cnst0overs = here->HSMHV_cnst0 * sqrt( pParam->HSMHV_novers / here->HSMHV_nsub ) ; #ifdef HSMHVEVAL cnst0overs_dT = cnst0_dT * sqrt( pParam->HSMHV_novers / here->HSMHV_nsub ) ; #endif /* ps0ldinib : Ps0_iniB for Ps0LD */ T1 = here->HSMHV_cnst0overs * model->HSMHV_tox / here->HSMHV_cecox ; T2 = pParam->HSMHV_novers / Nin ; here->HSMHV_ps0ldinibs = T2 * T2 / ( T1 * T1 ); #ifdef HSMHVEVAL T1_dT = cnst0overs_dT * model->HSMHV_tox / here->HSMHV_cecox ; T2_dT = - Nin_dT * T2 / Nin; ps0ldinibs_dT = 2.0 * here->HSMHV_ps0ldinibs * ( T2_dT * T1 - T2 * T1_dT ) / ( T1 * T2 ); #endif } /* temperature-dependent resistance model */ T3 = model->HSMHV_ktnom ; T1 = TTEMP0 - T3 ; T4 = TTEMP0 * TTEMP0 - T3 * T3 ; /* drain side */ if ( pParam->HSMHV_rd > 0.0 ) { T2 = here->HSMHV_rdtemp0 * ( here->HSMHV_ldrift1 * pParam->HSMHV_rdslp1 * C_m2um + pParam->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2 * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; if ( model->HSMHV_cotemp == 1 ) { /* without deltemp (COTEMP=1) */ here->HSMHV_rd = ( pParam->HSMHV_rd + T1 * modelMKS->HSMHV_rdtemp1 + modelMKS->HSMHV_rdtemp2 * T4 ) * T2 ; Fn_SL( here->HSMHV_rd, here->HSMHV_rd, C_rdtemp_min * pParam->HSMHV_rd, C_rdtemp_dlt * pParam->HSMHV_rd, T0 ); #ifdef HSMHVEVAL Rd0_dT = 0.0 ; #endif } else { /* with deltemp (COTEMP=0,2,3) */ here->HSMHV_rd = ( pParam->HSMHV_rd + modelMKS->HSMHV_rdtemp1 * Tdiff + modelMKS->HSMHV_rdtemp2 * Tdiff_2 ) * T2 ; Fn_SL( here->HSMHV_rd, here->HSMHV_rd, C_rdtemp_min * pParam->HSMHV_rd, C_rdtemp_dlt * pParam->HSMHV_rd, T0 ); #ifdef HSMHVEVAL Rd0_dT = ( modelMKS->HSMHV_rdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV_rdtemp2 ) * T2 * T0 ; #endif } } else { here->HSMHV_rd = 0.0 ; } /* source side (asymmetric case) */ if ( pParam->HSMHV_rs > 0.0 ) { T2 = here->HSMHV_rdtemp0 * ( here->HSMHV_ldrift1s * pParam->HSMHV_rdslp1 * C_m2um + pParam->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2s * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; if ( model->HSMHV_cotemp == 1 ) { /* without deltemp (COTEMP=1) */ here->HSMHV_rs = ( pParam->HSMHV_rs + T1 * modelMKS->HSMHV_rdtemp1 + modelMKS->HSMHV_rdtemp2 * T4 ) * T2 ; Fn_SL( here->HSMHV_rs, here->HSMHV_rs, C_rdtemp_min * pParam->HSMHV_rs, C_rdtemp_dlt * pParam->HSMHV_rs, T0 ); #ifdef HSMHVEVAL Rs0_dT = 0.0 ; #endif } else { /* with deltemp (COTEMP=0,2,3) */ here->HSMHV_rs = ( pParam->HSMHV_rs + modelMKS->HSMHV_rdtemp1 * Tdiff + modelMKS->HSMHV_rdtemp2 * Tdiff_2 ) * T2 ; Fn_SL( here->HSMHV_rs, here->HSMHV_rs, C_rdtemp_min * pParam->HSMHV_rs, C_rdtemp_dlt * pParam->HSMHV_rs, T0 ); #ifdef HSMHVEVAL Rs0_dT = ( modelMKS->HSMHV_rdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV_rdtemp2 ) * T2 * T0 ; #endif } } else { here->HSMHV_rs = 0.0 ; } if ( pParam->HSMHV_rdvd > 0.0 ) { T4 = here->HSMHV_rdvdtemp0 * ( here->HSMHV_ldrift1 * pParam->HSMHV_rdslp1 * C_m2um + pParam->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2 * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; T1 = ( 1 - pParam->HSMHV_rdov13 ) * here->HSMHV_loverld * C_m2um ; T0 = - model->HSMHV_rdov11 / ( model->HSMHV_rdov12 + small ) ; T3 = ( T0 * here->HSMHV_loverld * C_m2um + 1.0 + model->HSMHV_rdov11 ) ; Fn_SL( T5 , T3 * T4 , T4 , 10.0e-3 , T6 ) ; Fn_SU( T7 , T5 , T4 * ( model->HSMHV_rdov11 + 1.0) , 50.0e-6 , T6 ) ; Fn_SL( T2 , T7 + T1 * T4 , 0, 50.0e-6 , T6 ) ; T3 = model->HSMHV_ktnom ; T1 = TTEMP0 - T3 ; if ( model->HSMHV_cotemp == 0 || model->HSMHV_cotemp == 1 ) { /* without deltemp (COTEMP=0,1) */ here->HSMHV_rdvd = ( pParam->HSMHV_rdvd + T1 * modelMKS->HSMHV_rdvdtemp1 + modelMKS->HSMHV_rdvdtemp2 * ( TTEMP0 * TTEMP0 - T3 * T3 ) ) * T2 ; Fn_SL( here->HSMHV_rdvd, here->HSMHV_rdvd, C_rdtemp_min * pParam->HSMHV_rdvd, C_rdtemp_dlt * pParam->HSMHV_rdvd, T0 ); #ifdef HSMHVEVAL Rdvd_dT = 0.0 ; #endif } else { /* with deltemp (COTEMP=2,3) */ here->HSMHV_rdvd = ( pParam->HSMHV_rdvd + modelMKS->HSMHV_rdvdtemp1 * Tdiff + modelMKS->HSMHV_rdvdtemp2 * Tdiff_2 ) * T2 ; Fn_SL( here->HSMHV_rdvd, here->HSMHV_rdvd, C_rdtemp_min * pParam->HSMHV_rdvd, C_rdtemp_dlt * pParam->HSMHV_rdvd, T0 ); #ifdef HSMHVEVAL Rdvd_dT = ( modelMKS->HSMHV_rdvdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV_rdvdtemp2 ) * T2 * T0 ; #endif } T4 = here->HSMHV_rdvdtemp0 * ( here->HSMHV_ldrift1s * pParam->HSMHV_rdslp1 * C_m2um + pParam->HSMHV_rdict1 ) * ( here->HSMHV_ldrift2s * model->HSMHV_rdslp2 * C_m2um + model->HSMHV_rdict2 ) ; T1 = ( 1 - pParam->HSMHV_rdov13 ) * here->HSMHV_lovers * C_m2um ; T0 = - model->HSMHV_rdov11 / ( model->HSMHV_rdov12 + small ) ; T3 = ( T0 * here->HSMHV_lovers * C_m2um + 1.0 + model->HSMHV_rdov11 ) ; Fn_SL( T5 , T3 * T4 , T4 , 10.0e-3 , T6 ) ; Fn_SU( T7 , T5 , T4 * ( model->HSMHV_rdov11 + 1.0) , 50.0e-6 , T6 ) ; Fn_SL( T2 , T7 + T1 * T4 , 0, 50.0e-6 , T6 ) ; T3 = model->HSMHV_ktnom ; T1 = TTEMP0 - T3 ; if ( model->HSMHV_cotemp == 0 || model->HSMHV_cotemp == 1 ) { /* without deltemp (COTEMP=0,1) */ here->HSMHV_rsvd = ( pParam->HSMHV_rdvd + T1 * modelMKS->HSMHV_rdvdtemp1 + modelMKS->HSMHV_rdvdtemp2 * ( TTEMP0 * TTEMP0 - T3 * T3 ) ) * T2 ; Fn_SL( here->HSMHV_rsvd, here->HSMHV_rsvd, C_rdtemp_min * pParam->HSMHV_rdvd, C_rdtemp_dlt * pParam->HSMHV_rdvd, T0 ); #ifdef HSMHVEVAL Rsvd_dT = 0.0 ; #endif } else { /* with deltemp (COTEMP=2,3) */ here->HSMHV_rsvd = ( pParam->HSMHV_rdvd + modelMKS->HSMHV_rdvdtemp1 * Tdiff + modelMKS->HSMHV_rdvdtemp2 * Tdiff_2 ) * T2 ; Fn_SL( here->HSMHV_rsvd, here->HSMHV_rsvd, C_rdtemp_min * pParam->HSMHV_rdvd, C_rdtemp_dlt * pParam->HSMHV_rdvd, T0 ); #ifdef HSMHVEVAL Rsvd_dT = ( modelMKS->HSMHV_rdvdtemp1 + 2.0 * TTEMP * modelMKS->HSMHV_rdvdtemp2 ) * T2 * T0 ; #endif } } else { here->HSMHV_rdvd = 0.0 ; here->HSMHV_rsvd = 0.0 ; } /* for substrate-source/drain junction diode. */ js = pParam->HSMHV_js0 * exp ((here->HSMHV_egtnom * here->HSMHV_betatnom - Eg * beta + model->HSMHV_xti * log (TTEMP / model->HSMHV_ktnom)) / pParam->HSMHV_nj) ; jssw = pParam->HSMHV_js0sw * exp ((here->HSMHV_egtnom * here->HSMHV_betatnom - Eg * beta + model->HSMHV_xti * log (TTEMP / model->HSMHV_ktnom)) / model->HSMHV_njsw) ; js2 = pParam->HSMHV_js0 * exp ((here->HSMHV_egtnom * here->HSMHV_betatnom - Eg * beta + model->HSMHV_xti2 * log (TTEMP / model->HSMHV_ktnom)) / pParam->HSMHV_nj) ; jssw2 = pParam->HSMHV_js0sw * exp ((here->HSMHV_egtnom * here->HSMHV_betatnom - Eg * beta + model->HSMHV_xti2 * log (TTEMP / model->HSMHV_ktnom)) / model->HSMHV_njsw) ; #ifdef HSMHVEVAL T0 = - Eg * beta_dT - Eg_dT * beta ; /* Self heating */ T1 = T0 + model->HSMHV_xti / TTEMP ; /* Self heating */ T2 = T0 + model->HSMHV_xti2 / TTEMP ; /* Self heating */ js_dT = js * T1 / pParam->HSMHV_nj; /* Self heating */ jssw_dT = jssw * T1/ model->HSMHV_njsw ; /* Self heating */ js2_dT = js2 * T2 / pParam->HSMHV_nj; /* Self heating */ jssw2_dT = jssw2 * T2 / model->HSMHV_njsw; /* Self heating */ #endif here->HSMHV_isbd = here->HSMHV_ad * js + here->HSMHV_pd * jssw ; here->HSMHV_isbd2 = here->HSMHV_ad * js2 + here->HSMHV_pd * jssw2 ; here->HSMHV_isbs = here->HSMHV_as * js + here->HSMHV_ps * jssw ; here->HSMHV_isbs2 = here->HSMHV_as * js2 + here->HSMHV_ps * jssw2 ; #ifdef HSMHVEVAL isbd_dT = here->HSMHV_ad * js_dT + here->HSMHV_pd * jssw_dT ; /* Self heating */ isbd2_dT = here->HSMHV_ad * js2_dT + here->HSMHV_pd * jssw2_dT ; /* Self heating */ isbs_dT = here->HSMHV_as * js_dT + here->HSMHV_ps * jssw_dT ; /* Self heating */ isbs2_dT = here->HSMHV_as * js2_dT + here->HSMHV_ps * jssw2_dT ; /* Self heating */ #endif T1 = TTEMP / model->HSMHV_ktnom ; T0 = T1 * T1 ; T2 = here->HSMHV_isbd + small ; T3 = here->HSMHV_isbs + small ; #ifdef HSMHVEVAL T1_dT = 1.0 / model->HSMHV_ktnom ; /* Self heating */ T0_dT = 2.0 * T1 * T1_dT ; /* Self heating */ T2_dT = isbd_dT ; /* Self heating */ T3_dT = isbs_dT ; /* Self heating */ #endif here->HSMHV_vbdt = pParam->HSMHV_nj / beta * log ( pParam->HSMHV_vdiffj * T0 / T2 + 1.0 ) ; here->HSMHV_vbst = pParam->HSMHV_nj / beta * log ( pParam->HSMHV_vdiffj * T0 / T3 + 1.0 ) ; here->HSMHV_exptemp = exp (( T1 - 1.0 ) * model->HSMHV_ctemp ) ; #ifdef HSMHVEVAL vbdt_dT = - beta_dT / beta * here->HSMHV_vbdt + pParam->HSMHV_nj / beta * pParam->HSMHV_vdiffj / ( pParam->HSMHV_vdiffj * T0 / T2 + 1.0 ) * ( T0_dT / T2 - T0 / T2 / T2 * T2_dT ) ; /* Self heating */ vbst_dT = - beta_dT / beta * here->HSMHV_vbst + pParam->HSMHV_nj / beta * pParam->HSMHV_vdiffj / ( pParam->HSMHV_vdiffj * T0 / T3 + 1.0 ) * ( T0_dT / T3 - T0 / T3 / T3 * T3_dT ) ; /* Self heating */ #endif here->HSMHV_jd_nvtm_inv = 1.0 / ( pParam->HSMHV_nj / beta ) ; here->HSMHV_jd_expcd = exp (here->HSMHV_vbdt * here->HSMHV_jd_nvtm_inv ) ; here->HSMHV_jd_expcs = exp (here->HSMHV_vbst * here->HSMHV_jd_nvtm_inv ) ; #ifdef HSMHVEVAL exptemp_dT = model->HSMHV_ctemp / model->HSMHV_ktnom * here->HSMHV_exptemp ; /* Self heating */ jd_nvtm_inv_dT = beta_dT / pParam->HSMHV_nj ; /* Self heating */ jd_expcd_dT = here->HSMHV_jd_expcd * ( vbdt_dT * here->HSMHV_jd_nvtm_inv + here->HSMHV_vbdt * jd_nvtm_inv_dT ) ; /* Self heating */ jd_expcs_dT = here->HSMHV_jd_expcs * ( vbst_dT * here->HSMHV_jd_nvtm_inv + here->HSMHV_vbst * jd_nvtm_inv_dT ) ; /* Self heating */ #endif /* costi0 and costi1 for STI transistor model (temperature-dependent part) */ here->HSMHV_costi0 = here->HSMHV_costi00 * sqrt(here->HSMHV_beta_inv) ; here->HSMHV_costi0_p2 = here->HSMHV_costi0 * here->HSMHV_costi0 ; here->HSMHV_costi1 = here->HSMHV_nin * here->HSMHV_nin * here->HSMHV_nsti_p2 ; /* end of HSMHVtemp_eval.h */ ngspice-26/src/spicelib/devices/hisimhv1/hsmhvgetic.c0000644000265600020320000000273312264261473022276 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvgetic.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVgetic( GENmodel *inModel, CKTcircuit *ckt) { HSMHVmodel *model = (HSMHVmodel*)inModel; HSMHVinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for ( ;model ;model = model->HSMHVnextModel ) { for ( here = model->HSMHVinstances; here ;here = here->HSMHVnextInstance ) { if (!here->HSMHV_icVBS_Given) { here->HSMHV_icVBS = *(ckt->CKTrhs + here->HSMHVbNode) - *(ckt->CKTrhs + here->HSMHVsNode); } if (!here->HSMHV_icVDS_Given) { here->HSMHV_icVDS = *(ckt->CKTrhs + here->HSMHVdNode) - *(ckt->CKTrhs + here->HSMHVsNode); } if (!here->HSMHV_icVGS_Given) { here->HSMHV_icVGS = *(ckt->CKTrhs + here->HSMHVgNode) - *(ckt->CKTrhs + here->HSMHVsNode); } } } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvld_info_eval.h0000644000265600020320000001552512264261473023634 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvld_info_eval.h DATE : 2012.4.6 recent changes: - 2009.01.09 some bugfixes released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ /* print all outputs ------------VV */ if ( model->HSMHV_info >= 4 ) { here->HSMHV_csdo = - (here->HSMHV_cddo + here->HSMHV_cgdo + here->HSMHV_cbdo) ; here->HSMHV_csgo = - (here->HSMHV_cdgo + here->HSMHV_cggo + here->HSMHV_cbgo) ; here->HSMHV_csbo = - (here->HSMHV_cdbo + here->HSMHV_cgbo + here->HSMHV_cbbo) ; here->HSMHV_cdso = - (here->HSMHV_cddo + here->HSMHV_cdgo + here->HSMHV_cdbo) ; here->HSMHV_cgso = - (here->HSMHV_cgdo + here->HSMHV_cggo + here->HSMHV_cgbo) ; here->HSMHV_csso = - (here->HSMHV_csdo + here->HSMHV_csgo + here->HSMHV_csbo) ; cgdb = dQg_dVds - ((here->HSMHV_mode > 0) ? here->HSMHV_cgdo : here->HSMHV_cgso) ; cggb = dQg_dVgs - here->HSMHV_cggo ; cgsb = - (dQg_dVds + dQg_dVgs + dQg_dVbs) - ((here->HSMHV_mode > 0) ? here->HSMHV_cgso : here->HSMHV_cgdo) ; cbdb = dQb_dVds - ((here->HSMHV_mode > 0) ? here->HSMHV_cbdo : -(here->HSMHV_cbdo+here->HSMHV_cbgo+here->HSMHV_cbbo)) ; cbgb = dQb_dVgs - here->HSMHV_cbgo ; cbsb = - (dQb_dVds + dQb_dVgs + dQb_dVbs) - ((here->HSMHV_mode > 0) ? -(here->HSMHV_cbdo+here->HSMHV_cbgo+here->HSMHV_cbbo) : here->HSMHV_cbdo) ; cddb = dQd_dVds - ((here->HSMHV_mode > 0) ? here->HSMHV_cddo : here->HSMHV_csso) ; cdgb = dQd_dVgs - ((here->HSMHV_mode > 0) ? here->HSMHV_cdgo : here->HSMHV_csgo) ; cdsb = - (dQd_dVds + dQd_dVgs + dQd_dVbs) - ((here->HSMHV_mode > 0) ? here->HSMHV_cdso : here->HSMHV_csdo) ; if (flg_nqs) { /* by implicit differentiation of the nqs equations: */ dQi_nqs_dVds = (dQi_dVds + Iqi_nqs * dtau_dVds )/(1.0 + ag0 * tau ) ; dQi_nqs_dVgs = (dQi_dVgs + Iqi_nqs * dtau_dVgs )/(1.0 + ag0 * tau ) ; dQi_nqs_dVbs = (dQi_dVbs + Iqi_nqs * dtau_dVbs )/(1.0 + ag0 * tau ) ; dQb_nqs_dVds = (dQbulk_dVds + Iqb_nqs * dtaub_dVds)/(1.0 + ag0 * taub) ; dQb_nqs_dVgs = (dQbulk_dVgs + Iqb_nqs * dtaub_dVgs)/(1.0 + ag0 * taub) ; dQb_nqs_dVbs = (dQbulk_dVbs + Iqb_nqs * dtaub_dVbs)/(1.0 + ag0 * taub) ; cgdb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVds + dQg_nqs_dQb_nqs * dQb_nqs_dVds ; cggb_nqs = dQg_nqs_dQi_nqs * dQi_nqs_dVgs + dQg_nqs_dQb_nqs * dQb_nqs_dVgs ; cgsb_nqs = - dQg_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) - dQg_nqs_dQb_nqs * (dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ; cbdb_nqs = dQb_nqs_dVds ; cbgb_nqs = dQb_nqs_dVgs ; cbsb_nqs = -(dQb_nqs_dVds + dQb_nqs_dVgs + dQb_nqs_dVbs) ; cddb_nqs = dQd_nqs_dVds + dQd_nqs_dQi_nqs * dQi_nqs_dVds ; cdgb_nqs= dQd_nqs_dVgs + dQd_nqs_dQi_nqs * dQi_nqs_dVgs ; cdsb_nqs= -(dQd_nqs_dVds + dQd_nqs_dVgs + dQd_nqs_dVbs) - dQd_nqs_dQi_nqs * (dQi_nqs_dVds + dQi_nqs_dVgs + dQi_nqs_dVbs) ; } else { cgdb_nqs = cggb_nqs = cgsb_nqs = cbdb_nqs = cbgb_nqs = cbsb_nqs = cddb_nqs = cdgb_nqs = cdsb_nqs = 0.0 ; } printf( "--- variables returned from HSMHVevaluate() ----\n" ) ; printf( "von = %12.5e\n" , here->HSMHV_von ) ; printf( "vdsat = %12.5e\n" , here->HSMHV_vdsat ) ; printf( "ids = %12.5e\n" , here->HSMHV_ids ) ; printf( "gds = %12.5e\n" , here->HSMHV_dIds_dVdsi ) ; printf( "gm = %12.5e\n" , here->HSMHV_dIds_dVgsi ) ; printf( "gmbs = %12.5e\n" , here->HSMHV_dIds_dVbsi ) ; printf( "cggo = %12.5e\n" , here->HSMHV_cggo ) ; printf( "cgdo = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_cgdo : here->HSMHV_cgso ) ; printf( "cgso = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_cgso : here->HSMHV_cgdo ) ; printf( "cdgo = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_cdgo : here->HSMHV_csgo ) ; printf( "cddo = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_cddo : here->HSMHV_csso ) ; printf( "cdso = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_cdso : here->HSMHV_csdo ) ; printf( "csgo = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_csgo : here->HSMHV_cdgo ) ; printf( "csdo = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_csdo : here->HSMHV_cdso ) ; printf( "csso = %12.5e\n" , (here->HSMHV_mode > 0) ? here->HSMHV_csso : here->HSMHV_cddo ) ; printf( "qg = %12.5e\n" , Qg + Qg_nqs) ; printf( "qd = %12.5e\n" , Qd + Qd_nqs) ; printf( "qs = %12.5e\n" , Qs + Qs_nqs) ; printf( "cggb = %12.5e\n" , cggb + cggb_nqs ) ; printf( "cgsb = %12.5e\n" , cgsb + cgsb_nqs ) ; printf( "cgdb = %12.5e\n" , cgdb + cgdb_nqs ) ; printf( "cbgb = %12.5e\n" , cbgb + cbgb_nqs ) ; printf( "cbsb = %12.5e\n" , cbsb + cbsb_nqs ) ; printf( "cbdb = %12.5e\n" , cbdb + cbdb_nqs ) ; printf( "cdgb = %12.5e\n" , cdgb + cdgb_nqs ) ; printf( "cdsb = %12.5e\n" , cdsb + cdsb_nqs ) ; printf( "cddb = %12.5e\n" , cddb + cddb_nqs ) ; printf( "ibd = %12.5e\n" , Ibd ) ; printf( "ibs = %12.5e\n" , Ibs ) ; printf( "gbd = %12.5e\n" , Gbd ) ; printf( "gbs = %12.5e\n" , Gbs ) ; printf( "capbd = %12.5e\n" , Cbd ) ; printf( "capbs = %12.5e\n" , Cbs ) ; printf( "qbd = %12.5e\n" , Qbd ) ; printf( "qbs = %12.5e\n" , Qbs ) ; printf( "isub = %12.5e\n" , here->HSMHV_isub ) ; printf( "gbgs = %12.5e\n" , dIsub_dVgs + dIsubs_dVgs ) ; printf( "gbds = %12.5e\n" , dIsub_dVds + dIsubs_dVds ) ; printf( "gbbs = %12.5e\n" , dIsub_dVbs + dIsubs_dVbs ) ; printf( "S_flicker_noise * ( freq / gain ) = %.16e\n" , here->HSMHV_noiflick ) ; printf( "S_thermal_noise / ( gain * 4kT ) = %.16e\n" , here->HSMHV_noithrml ) ; printf( "S_induced_gate_noise / ( gain * freq^2 ) = %.16e\n" , here->HSMHV_noiigate ) ; printf( "cross-correlation coefficient (= Sigid/sqrt(Sig*Sid) ) = %.16e\n" , here->HSMHV_noicross ) ; /* print Surface Potentials */ /* printf( "ivds %e ivgs %e ivbs %e Ps0 %.16e Pds %.16e\n" , */ /* ivds, ivgs, ivbs, here->HSMHV_ps0_prv, here->HSMHV_pds_prv ) ; */ } /* print all outputs ------------AA */ /* End of HSMHVld_info_eval.h */ ngspice-26/src/spicelib/devices/hisimhv1/hsmhvdest.c0000644000265600020320000000216012264261473022134 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvdest.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsmhvdef.h" #include "ngspice/suffix.h" void HSMHVdestroy( GENmodel **inModel) { HSMHVmodel **model = (HSMHVmodel**)inModel; HSMHVinstance *here; HSMHVinstance *prev = NULL; HSMHVmodel *mod = *model; HSMHVmodel *oldmod = NULL; for ( ;mod ;mod = mod->HSMHVnextModel ) { if (oldmod) FREE(oldmod); oldmod = mod; prev = (HSMHVinstance *)NULL; for ( here = mod->HSMHVinstances ;here ;here = here->HSMHVnextInstance ) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); } if (oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvinit.c0000644000265600020320000000414212264261473022142 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "hsmhvdef.h" #include "hsmhvitf.h" #include "hsmhvinit.h" SPICEdev HSMHVinfo = { { "HiSIMHV", "Hiroshima University STARC IGFET Model - HiSIM_HV", &HSMHVnSize, &HSMHVnSize, HSMHVnames, &HSMHVpTSize, HSMHVpTable, &HSMHVmPTSize, HSMHVmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ HSMHVparam, /* DEVmodParam */ HSMHVmParam, /* DEVload */ HSMHVload, /* DEVsetup */ HSMHVsetup, /* DEVunsetup */ HSMHVunsetup, /* DEVpzSetup */ HSMHVsetup, /* DEVtemperature*/ HSMHVtemp, /* DEVtrunc */ HSMHVtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ HSMHVacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ HSMHVdestroy, /* DEVmodDelete */ HSMHVmDelete, /* DEVdelete */ HSMHVdelete, /* DEVsetic */ HSMHVgetic, /* DEVask */ HSMHVask, /* DEVmodAsk */ HSMHVmAsk, /* DEVpzLoad */ HSMHVpzLoad, /* DEVconvTest */ HSMHVconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ HSMHVnoise, /* DEVsoaCheck */ HSMHVsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &HSMHViSize, /* DEVmodSize */ &HSMHVmSize }; SPICEdev * get_hsmhv_info(void) { return &HSMHVinfo; } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvext.h0000644000265600020320000000334312264261473022006 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvext.h DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ extern int HSMHVacLoad(GENmodel *,CKTcircuit*); extern int HSMHVask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int HSMHVconvTest(GENmodel *,CKTcircuit*); extern int HSMHVdelete(GENmodel*,IFuid,GENinstance**); extern void HSMHVdestroy(GENmodel**); extern int HSMHVgetic(GENmodel*,CKTcircuit*); extern int HSMHVload(GENmodel*,CKTcircuit*); extern int HSMHVmAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int HSMHVmDelete(GENmodel**,IFuid,GENmodel*); extern int HSMHVmParam(int,IFvalue*,GENmodel*); extern void HSMHVmosCap(CKTcircuit*, double, double, double, double*, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int HSMHVparam(int,IFvalue*,GENinstance*,IFvalue*); extern int HSMHVpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int HSMHVsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int HSMHVunsetup(GENmodel*,CKTcircuit*); extern int HSMHVtemp(GENmodel*,CKTcircuit*); extern int HSMHVtrunc(GENmodel*,CKTcircuit*,double*); extern int HSMHVnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int HSMHVsoaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/hisimhv1/Makefile.am0000644000265600020320000000136112264261473022021 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libhisimhv1.la libhisimhv1_la_SOURCES = hisimhv.h \ hsmhv.c \ hsmhvacld.c \ hsmhvask.c \ hsmhvcvtest.c \ hsmhvdef.h \ hsmhvdel.c \ hsmhvdest.c \ hsmhveval.c \ hsmhveval_qover.h \ hsmhvevalenv.h \ hsmhvext.h \ hsmhvgetic.c \ hsmhvinit.c \ hsmhvinit.h \ hsmhvitf.h \ hsmhvld.c \ hsmhvld_info_eval.h \ hsmhvmask.c \ hsmhvmdel.c \ hsmhvmpar.c \ hsmhvnoi.c \ hsmhvpar.c \ hsmhvpzld.c \ hsmhvset.c \ hsmhvsoachk.c \ hsmhvtemp.c \ hsmhvtemp_eval.h \ hsmhvtrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/hisimhv1/hsmhvevalenv.h0000644000265600020320000000456012264261473022650 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvevalenv.h DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #ifndef HSMHV_EVAL_ENV_H #define HSMHV_EVAL_ENV_H /* macros and constants used in hsmhveval2yz.c */ /*---------------------------------------------------* * Numerical constants. (macro) *-----------------*/ /* machine epsilon */ #if defined(_FLOAT_H) && defined(DBL_EPSILON) #define C_EPS_M (DBL_EPSILON) #else #define C_EPS_M (2.2204460492503131e-16) #endif #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THR 34.0 /* sqrt(2) */ #define C_SQRT_2 (1.414213562373095e+00) /* 1/3 */ #define C_1o3 (3.333333333333333e-01) /* 2/3 */ #define C_2o3 (6.666666666666667e-01) /* 2^(1/3) */ #define C_2p_1o3 (1.259921049894873e+00) /* Pi */ #define C_Pi (3.141592653589793) #define C_Pio2 (1.570796326794897) /* Unit change */ #define C_m2cm_p2 (1.0e4) #define C_m2um (1.0e6) /*---------------------------------------------------* * Physical constants/properties. (macro) *-----------------*/ /* Elemental charge */ #define C_QE (1.6021918e-19) /* Boltzmann constant */ #define C_KB (1.3806226e-23) /* Permitivity of Si, SiO2 and vacuum */ #define C_ESI (1.034943e-10) #define C_EOX (3.453133e-11) #define C_VAC (8.8541878e-12) /* Room temperature constants */ #define C_T300 (300e+00) #define C_b300 (3.868283e+01) /* #define C_Eg0 (1.1785e0) */ /*changed to parameter sIN.eg0*/ /* Build-in potential */ /*#define C_Vbi (1.0e0)*/ /* changed to parameter sIN.vbi */ /* Intrinsic carrier density at 300K */ #define C_Nin0 (1.04e+16) /*---------------------------------------------------* * Functions. (macro) Take care of the arguments. *-----------------*/ #define Fn_Sqr(x) ( (x)*(x) ) /* x^2 */ #define Fn_Max(x,y) ( (x) >= (y) ? (x) : (y) ) /* max[x,y] */ #define Fn_Min(x,y) ( (x) <= (y) ? (x) : (y) ) /* min[x,y] */ #define Fn_Sgn(x) ( (x) >= 0 ? (1) : (-1) ) /* sign[x] */ #endif /* HSMHV_EVAL_ENV_H */ ngspice-26/src/spicelib/devices/hisimhv1/Makefile.in0000644000265600020320000004405712264261536022043 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/hisimhv1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhisimhv1_la_LIBADD = am_libhisimhv1_la_OBJECTS = hsmhv.lo hsmhvacld.lo hsmhvask.lo \ hsmhvcvtest.lo hsmhvdel.lo hsmhvdest.lo hsmhveval.lo \ hsmhvgetic.lo hsmhvinit.lo hsmhvld.lo hsmhvmask.lo \ hsmhvmdel.lo hsmhvmpar.lo hsmhvnoi.lo hsmhvpar.lo hsmhvpzld.lo \ hsmhvset.lo hsmhvsoachk.lo hsmhvtemp.lo hsmhvtrunc.lo libhisimhv1_la_OBJECTS = $(am_libhisimhv1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libhisimhv1_la_SOURCES) DIST_SOURCES = $(libhisimhv1_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libhisimhv1.la libhisimhv1_la_SOURCES = hisimhv.h \ hsmhv.c \ hsmhvacld.c \ hsmhvask.c \ hsmhvcvtest.c \ hsmhvdef.h \ hsmhvdel.c \ hsmhvdest.c \ hsmhveval.c \ hsmhveval_qover.h \ hsmhvevalenv.h \ hsmhvext.h \ hsmhvgetic.c \ hsmhvinit.c \ hsmhvinit.h \ hsmhvitf.h \ hsmhvld.c \ hsmhvld_info_eval.h \ hsmhvmask.c \ hsmhvmdel.c \ hsmhvmpar.c \ hsmhvnoi.c \ hsmhvpar.c \ hsmhvpzld.c \ hsmhvset.c \ hsmhvsoachk.c \ hsmhvtemp.c \ hsmhvtemp_eval.h \ hsmhvtrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/hisimhv1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/hisimhv1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhisimhv1.la: $(libhisimhv1_la_OBJECTS) $(libhisimhv1_la_DEPENDENCIES) $(EXTRA_libhisimhv1_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhisimhv1_la_OBJECTS) $(libhisimhv1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvcvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhveval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvnoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvsoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsmhvtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/hisimhv1/hsmhvitf.h0000644000265600020320000000112112264261473021760 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvitf DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #ifndef DEV_HISIMHV #define DEV_HISIMHV SPICEdev *get_hsmhv_info(void); #endif ngspice-26/src/spicelib/devices/hisimhv1/hsmhvmask.c0000644000265600020320000014401212264261473022133 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvmask.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "hsmhvdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVmAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { HSMHVmodel *model = (HSMHVmodel *)inst; NG_IGNORE(ckt); switch (which) { case HSMHV_MOD_NMOS: value->iValue = model->HSMHV_type; return(OK); case HSMHV_MOD_PMOS: value->iValue = model->HSMHV_type; return(OK); case HSMHV_MOD_LEVEL: value->iValue = model->HSMHV_level; return(OK); case HSMHV_MOD_INFO: value->iValue = model->HSMHV_info; return(OK); case HSMHV_MOD_NOISE: value->iValue = model->HSMHV_noise; return(OK); case HSMHV_MOD_VERSION: value->sValue = model->HSMHV_version; return(OK); case HSMHV_MOD_SHOW: value->iValue = model->HSMHV_show; return(OK); case HSMHV_MOD_CORSRD: value->iValue = model->HSMHV_corsrd; return(OK); case HSMHV_MOD_CORG: value->iValue = model->HSMHV_corg; return(OK); case HSMHV_MOD_COIPRV: value->iValue = model->HSMHV_coiprv; return(OK); case HSMHV_MOD_COPPRV: value->iValue = model->HSMHV_copprv; return(OK); case HSMHV_MOD_COADOV: value->iValue = model->HSMHV_coadov; return(OK); case HSMHV_MOD_COISUB: value->iValue = model->HSMHV_coisub; return(OK); case HSMHV_MOD_COIIGS: value->iValue = model->HSMHV_coiigs; return(OK); case HSMHV_MOD_COGIDL: value->iValue = model->HSMHV_cogidl; return(OK); case HSMHV_MOD_COOVLP: value->iValue = model->HSMHV_coovlp; return(OK); case HSMHV_MOD_COOVLPS: value->iValue = model->HSMHV_coovlps; return(OK); case HSMHV_MOD_COFLICK: value->iValue = model->HSMHV_coflick; return(OK); case HSMHV_MOD_COISTI: value->iValue = model->HSMHV_coisti; return(OK); case HSMHV_MOD_CONQS: value->iValue = model->HSMHV_conqs; return(OK); case HSMHV_MOD_CORBNET: value->iValue = model->HSMHV_corbnet; return(OK); case HSMHV_MOD_COTHRML: value->iValue = model->HSMHV_cothrml; return(OK); case HSMHV_MOD_COIGN: value->iValue = model->HSMHV_coign; return(OK); case HSMHV_MOD_CODFM: value->iValue = model->HSMHV_codfm; return(OK); case HSMHV_MOD_COQOVSM: value->iValue = model->HSMHV_coqovsm; return(OK); case HSMHV_MOD_COSELFHEAT: /* Self-heating model */ value->iValue = model->HSMHV_coselfheat; return(OK); case HSMHV_MOD_COSUBNODE: value->iValue = model->HSMHV_cosubnode; return(OK); case HSMHV_MOD_COSYM: /* Symmetry model for HV */ value->iValue = model->HSMHV_cosym; return(OK); case HSMHV_MOD_COTEMP: value->iValue = model->HSMHV_cotemp; return(OK); case HSMHV_MOD_COLDRIFT: value->iValue = model->HSMHV_coldrift; return(OK); case HSMHV_MOD_VMAX: value->rValue = model->HSMHV_vmax; return(OK); case HSMHV_MOD_VMAXT1: value->rValue = model->HSMHV_vmaxt1; return(OK); case HSMHV_MOD_VMAXT2: value->rValue = model->HSMHV_vmaxt2; return(OK); case HSMHV_MOD_BGTMP1: value->rValue = model->HSMHV_bgtmp1; return(OK); case HSMHV_MOD_BGTMP2: value->rValue = model->HSMHV_bgtmp2; return(OK); case HSMHV_MOD_EG0: value->rValue = model->HSMHV_eg0; return(OK); case HSMHV_MOD_TOX: value->rValue = model->HSMHV_tox; return(OK); case HSMHV_MOD_XLD: value->rValue = model->HSMHV_xld; return(OK); case HSMHV_MOD_LOVER: value->rValue = model->HSMHV_lover; return(OK); case HSMHV_MOD_LOVERS: value->rValue = model->HSMHV_lovers; return(OK); case HSMHV_MOD_RDOV11: value->rValue = model->HSMHV_rdov11; return(OK); case HSMHV_MOD_RDOV12: value->rValue = model->HSMHV_rdov12; return(OK); case HSMHV_MOD_RDOV13: value->rValue = model->HSMHV_rdov13; return(OK); case HSMHV_MOD_RDSLP1: value->rValue = model->HSMHV_rdslp1; return(OK); case HSMHV_MOD_RDICT1: value->rValue = model->HSMHV_rdict1; return(OK); case HSMHV_MOD_RDSLP2: value->rValue = model->HSMHV_rdslp2; return(OK); case HSMHV_MOD_RDICT2: value->rValue = model->HSMHV_rdict2; return(OK); case HSMHV_MOD_LOVERLD: value->rValue = model->HSMHV_loverld; return(OK); case HSMHV_MOD_LDRIFT1: value->rValue = model->HSMHV_ldrift1; return(OK); case HSMHV_MOD_LDRIFT2: value->rValue = model->HSMHV_ldrift2; return(OK); case HSMHV_MOD_LDRIFT1S: value->rValue = model->HSMHV_ldrift1s; return(OK); case HSMHV_MOD_LDRIFT2S: value->rValue = model->HSMHV_ldrift2s; return(OK); case HSMHV_MOD_SUBLD1: value->rValue = model->HSMHV_subld1; return(OK); case HSMHV_MOD_SUBLD2: value->rValue = model->HSMHV_subld2; return(OK); case HSMHV_MOD_DDLTMAX: /* Vdseff */ value->rValue = model->HSMHV_ddltmax; return(OK); case HSMHV_MOD_DDLTSLP: /* Vdseff */ value->rValue = model->HSMHV_ddltslp; return(OK); case HSMHV_MOD_DDLTICT: /* Vdseff */ value->rValue = model->HSMHV_ddltict; return(OK); case HSMHV_MOD_VFBOVER: value->rValue = model->HSMHV_vfbover; return(OK); case HSMHV_MOD_NOVER: value->rValue = model->HSMHV_nover; return(OK); case HSMHV_MOD_NOVERS: value->rValue = model->HSMHV_novers; return(OK); case HSMHV_MOD_XWD: value->rValue = model->HSMHV_xwd; return(OK); case HSMHV_MOD_XWDC: value->rValue = model->HSMHV_xwdc; return(OK); case HSMHV_MOD_XL: value->rValue = model->HSMHV_xl; return(OK); case HSMHV_MOD_XW: value->rValue = model->HSMHV_xw; return(OK); case HSMHV_MOD_SAREF: value->rValue = model->HSMHV_saref; return(OK); case HSMHV_MOD_SBREF: value->rValue = model->HSMHV_sbref; return(OK); case HSMHV_MOD_LL: value->rValue = model->HSMHV_ll; return(OK); case HSMHV_MOD_LLD: value->rValue = model->HSMHV_lld; return(OK); case HSMHV_MOD_LLN: value->rValue = model->HSMHV_lln; return(OK); case HSMHV_MOD_WL: value->rValue = model->HSMHV_wl; return(OK); case HSMHV_MOD_WL1: value->rValue = model->HSMHV_wl1; return(OK); case HSMHV_MOD_WL1P: value->rValue = model->HSMHV_wl1p; return(OK); case HSMHV_MOD_WL2: value->rValue = model->HSMHV_wl2; return(OK); case HSMHV_MOD_WL2P: value->rValue = model->HSMHV_wl2p; return(OK); case HSMHV_MOD_WLD: value->rValue = model->HSMHV_wld; return(OK); case HSMHV_MOD_WLN: value->rValue = model->HSMHV_wln; return(OK); case HSMHV_MOD_XQY: value->rValue = model->HSMHV_xqy; return(OK); case HSMHV_MOD_XQY1: value->rValue = model->HSMHV_xqy1; return(OK); case HSMHV_MOD_XQY2: value->rValue = model->HSMHV_xqy2; return(OK); case HSMHV_MOD_RS: value->rValue = model->HSMHV_rs; return(OK); case HSMHV_MOD_RD: value->rValue = model->HSMHV_rd; return(OK); case HSMHV_MOD_RSH: value->rValue = model->HSMHV_rsh; return(OK); case HSMHV_MOD_RSHG: value->rValue = model->HSMHV_rshg; return(OK); case HSMHV_MOD_VFBC: value->rValue = model->HSMHV_vfbc; return(OK); case HSMHV_MOD_VBI: value->rValue = model->HSMHV_vbi; return(OK); case HSMHV_MOD_NSUBC: value->rValue = model->HSMHV_nsubc; return(OK); case HSMHV_MOD_PARL2: value->rValue = model->HSMHV_parl2; return(OK); case HSMHV_MOD_LP: value->rValue = model->HSMHV_lp; return(OK); case HSMHV_MOD_NSUBP: value->rValue = model->HSMHV_nsubp; return(OK); case HSMHV_MOD_NSUBP0: value->rValue = model->HSMHV_nsubp0; return(OK); case HSMHV_MOD_NSUBWP: value->rValue = model->HSMHV_nsubwp; return(OK); case HSMHV_MOD_SCP1: value->rValue = model->HSMHV_scp1; return(OK); case HSMHV_MOD_SCP2: value->rValue = model->HSMHV_scp2; return(OK); case HSMHV_MOD_SCP3: value->rValue = model->HSMHV_scp3; return(OK); case HSMHV_MOD_SC1: value->rValue = model->HSMHV_sc1; return(OK); case HSMHV_MOD_SC2: value->rValue = model->HSMHV_sc2; return(OK); case HSMHV_MOD_SC3: value->rValue = model->HSMHV_sc3; return(OK); case HSMHV_MOD_SC4: value->rValue = model->HSMHV_sc4; return(OK); case HSMHV_MOD_PGD1: value->rValue = model->HSMHV_pgd1; return(OK); case HSMHV_MOD_PGD2: value->rValue = model->HSMHV_pgd2; return(OK); case HSMHV_MOD_PGD3: value->rValue = model->HSMHV_pgd3; return(OK); case HSMHV_MOD_PGD4: value->rValue = model->HSMHV_pgd4; return(OK); case HSMHV_MOD_NDEP: value->rValue = model->HSMHV_ndep; return(OK); case HSMHV_MOD_NDEPL: value->rValue = model->HSMHV_ndepl; return(OK); case HSMHV_MOD_NDEPLP: value->rValue = model->HSMHV_ndeplp; return(OK); case HSMHV_MOD_NINV: value->rValue = model->HSMHV_ninv; return(OK); case HSMHV_MOD_MUECB0: value->rValue = model->HSMHV_muecb0; return(OK); case HSMHV_MOD_MUECB1: value->rValue = model->HSMHV_muecb1; return(OK); case HSMHV_MOD_MUEPH1: value->rValue = model->HSMHV_mueph1; return(OK); case HSMHV_MOD_MUEPH0: value->rValue = model->HSMHV_mueph0; return(OK); case HSMHV_MOD_MUEPHW: value->rValue = model->HSMHV_muephw; return(OK); case HSMHV_MOD_MUEPWP: value->rValue = model->HSMHV_muepwp; return(OK); case HSMHV_MOD_MUEPHL: value->rValue = model->HSMHV_muephl; return(OK); case HSMHV_MOD_MUEPLP: value->rValue = model->HSMHV_mueplp; return(OK); case HSMHV_MOD_MUEPHS: value->rValue = model->HSMHV_muephs; return(OK); case HSMHV_MOD_MUEPSP: value->rValue = model->HSMHV_muepsp; return(OK); case HSMHV_MOD_VTMP: value->rValue = model->HSMHV_vtmp; return(OK); case HSMHV_MOD_WVTH0: value->rValue = model->HSMHV_wvth0; return(OK); case HSMHV_MOD_MUESR1: value->rValue = model->HSMHV_muesr1; return(OK); case HSMHV_MOD_MUESR0: value->rValue = model->HSMHV_muesr0; return(OK); case HSMHV_MOD_MUESRL: value->rValue = model->HSMHV_muesrl; return(OK); case HSMHV_MOD_MUESLP: value->rValue = model->HSMHV_mueslp; return(OK); case HSMHV_MOD_MUESRW: value->rValue = model->HSMHV_muesrw; return(OK); case HSMHV_MOD_MUESWP: value->rValue = model->HSMHV_mueswp; return(OK); case HSMHV_MOD_BB: value->rValue = model->HSMHV_bb; return(OK); case HSMHV_MOD_SUB1: value->rValue = model->HSMHV_sub1; return(OK); case HSMHV_MOD_SUB2: value->rValue = model->HSMHV_sub2; return(OK); case HSMHV_MOD_SVGS: value->rValue = model->HSMHV_svgs; return(OK); case HSMHV_MOD_SVGSL: value->rValue = model->HSMHV_svgsl; return(OK); case HSMHV_MOD_SVGSLP: value->rValue = model->HSMHV_svgslp; return(OK); case HSMHV_MOD_SVGSW: value->rValue = model->HSMHV_svgsw; return(OK); case HSMHV_MOD_SVGSWP: value->rValue = model->HSMHV_svgswp; return(OK); case HSMHV_MOD_SVBS: value->rValue = model->HSMHV_svbs; return(OK); case HSMHV_MOD_SVBSL: value->rValue = model->HSMHV_svbsl; return(OK); case HSMHV_MOD_SVBSLP: value->rValue = model->HSMHV_svbslp; return(OK); case HSMHV_MOD_SVDS: value->rValue = model->HSMHV_svds; return(OK); case HSMHV_MOD_SLG: value->rValue = model->HSMHV_slg; return(OK); case HSMHV_MOD_SLGL: value->rValue = model->HSMHV_slgl; return(OK); case HSMHV_MOD_SLGLP: value->rValue = model->HSMHV_slglp; return(OK); case HSMHV_MOD_SUB1L: value->rValue = model->HSMHV_sub1l; return(OK); case HSMHV_MOD_SUB1LP: value->rValue = model->HSMHV_sub1lp; return(OK); case HSMHV_MOD_SUB2L: value->rValue = model->HSMHV_sub2l; return(OK); case HSMHV_MOD_FN1: value->rValue = model->HSMHV_fn1; return(OK); case HSMHV_MOD_FN2: value->rValue = model->HSMHV_fn2; return(OK); case HSMHV_MOD_FN3: value->rValue = model->HSMHV_fn3; return(OK); case HSMHV_MOD_FVBS: value->rValue = model->HSMHV_fvbs; return(OK); case HSMHV_MOD_NSTI: value->rValue = model->HSMHV_nsti; return(OK); case HSMHV_MOD_WSTI: value->rValue = model->HSMHV_wsti; return(OK); case HSMHV_MOD_WSTIL: value->rValue = model->HSMHV_wstil; return(OK); case HSMHV_MOD_WSTILP: value->rValue = model->HSMHV_wstilp; return(OK); case HSMHV_MOD_WSTIW: value->rValue = model->HSMHV_wstiw; return(OK); case HSMHV_MOD_WSTIWP: value->rValue = model->HSMHV_wstiwp; return(OK); case HSMHV_MOD_SCSTI1: value->rValue = model->HSMHV_scsti1; return(OK); case HSMHV_MOD_SCSTI2: value->rValue = model->HSMHV_scsti2; return(OK); case HSMHV_MOD_VTHSTI: value->rValue = model->HSMHV_vthsti; return(OK); case HSMHV_MOD_VDSTI: value->rValue = model->HSMHV_vdsti; return(OK); case HSMHV_MOD_MUESTI1: value->rValue = model->HSMHV_muesti1; return(OK); case HSMHV_MOD_MUESTI2: value->rValue = model->HSMHV_muesti2; return(OK); case HSMHV_MOD_MUESTI3: value->rValue = model->HSMHV_muesti3; return(OK); case HSMHV_MOD_NSUBPSTI1: value->rValue = model->HSMHV_nsubpsti1; return(OK); case HSMHV_MOD_NSUBPSTI2: value->rValue = model->HSMHV_nsubpsti2; return(OK); case HSMHV_MOD_NSUBPSTI3: value->rValue = model->HSMHV_nsubpsti3; return(OK); case HSMHV_MOD_LPEXT: value->rValue = model->HSMHV_lpext; return(OK); case HSMHV_MOD_NPEXT: value->rValue = model->HSMHV_npext; return(OK); case HSMHV_MOD_SCP22: value->rValue = model->HSMHV_scp22; return(OK); case HSMHV_MOD_SCP21: value->rValue = model->HSMHV_scp21; return(OK); case HSMHV_MOD_BS1: value->rValue = model->HSMHV_bs1; return(OK); case HSMHV_MOD_BS2: value->rValue = model->HSMHV_bs2; return(OK); case HSMHV_MOD_CGSO: value->rValue = model->HSMHV_cgso; return(OK); case HSMHV_MOD_CGDO: value->rValue = model->HSMHV_cgdo; return(OK); case HSMHV_MOD_CGBO: value->rValue = model->HSMHV_cgbo; return(OK); case HSMHV_MOD_TPOLY: value->rValue = model->HSMHV_tpoly; return(OK); case HSMHV_MOD_JS0: value->rValue = model->HSMHV_js0; return(OK); case HSMHV_MOD_JS0SW: value->rValue = model->HSMHV_js0sw; return(OK); case HSMHV_MOD_NJ: value->rValue = model->HSMHV_nj; return(OK); case HSMHV_MOD_NJSW: value->rValue = model->HSMHV_njsw; return(OK); case HSMHV_MOD_XTI: value->rValue = model->HSMHV_xti; return(OK); case HSMHV_MOD_CJ: value->rValue = model->HSMHV_cj; return(OK); case HSMHV_MOD_CJSW: value->rValue = model->HSMHV_cjsw; return(OK); case HSMHV_MOD_CJSWG: value->rValue = model->HSMHV_cjswg; return(OK); case HSMHV_MOD_MJ: value->rValue = model->HSMHV_mj; return(OK); case HSMHV_MOD_MJSW: value->rValue = model->HSMHV_mjsw; return(OK); case HSMHV_MOD_MJSWG: value->rValue = model->HSMHV_mjswg; return(OK); case HSMHV_MOD_PB: value->rValue = model->HSMHV_pb; return(OK); case HSMHV_MOD_PBSW: value->rValue = model->HSMHV_pbsw; return(OK); case HSMHV_MOD_PBSWG: value->rValue = model->HSMHV_pbswg; return(OK); case HSMHV_MOD_XTI2: value->rValue = model->HSMHV_xti2; return(OK); case HSMHV_MOD_CISB: value->rValue = model->HSMHV_cisb; return(OK); case HSMHV_MOD_CVB: value->rValue = model->HSMHV_cvb; return(OK); case HSMHV_MOD_CTEMP: value->rValue = model->HSMHV_ctemp; return(OK); case HSMHV_MOD_CISBK: value->rValue = model->HSMHV_cisbk; return(OK); case HSMHV_MOD_CVBK: value->rValue = model->HSMHV_cvbk; return(OK); case HSMHV_MOD_DIVX: value->rValue = model->HSMHV_divx; return(OK); case HSMHV_MOD_CLM1: value->rValue = model->HSMHV_clm1; return(OK); case HSMHV_MOD_CLM2: value->rValue = model->HSMHV_clm2; return(OK); case HSMHV_MOD_CLM3: value->rValue = model->HSMHV_clm3; return(OK); case HSMHV_MOD_CLM5: value->rValue = model->HSMHV_clm5; return(OK); case HSMHV_MOD_CLM6: value->rValue = model->HSMHV_clm6; return(OK); case HSMHV_MOD_MUETMP: value->rValue = model->HSMHV_muetmp; return(OK); case HSMHV_MOD_VOVER: value->rValue = model->HSMHV_vover; return(OK); case HSMHV_MOD_VOVERP: value->rValue = model->HSMHV_voverp; return(OK); case HSMHV_MOD_VOVERS: value->rValue = model->HSMHV_vovers; return(OK); case HSMHV_MOD_VOVERSP: value->rValue = model->HSMHV_voversp; return(OK); case HSMHV_MOD_WFC: value->rValue = model->HSMHV_wfc; return(OK); case HSMHV_MOD_NSUBCW: value->rValue = model->HSMHV_nsubcw; return(OK); case HSMHV_MOD_NSUBCWP: value->rValue = model->HSMHV_nsubcwp; return(OK); case HSMHV_MOD_QME1: value->rValue = model->HSMHV_qme1; return(OK); case HSMHV_MOD_QME2: value->rValue = model->HSMHV_qme2; return(OK); case HSMHV_MOD_QME3: value->rValue = model->HSMHV_qme3; return(OK); case HSMHV_MOD_GIDL1: value->rValue = model->HSMHV_gidl1; return(OK); case HSMHV_MOD_GIDL2: value->rValue = model->HSMHV_gidl2; return(OK); case HSMHV_MOD_GIDL3: value->rValue = model->HSMHV_gidl3; return(OK); case HSMHV_MOD_GIDL4: value->rValue = model->HSMHV_gidl4; return(OK); case HSMHV_MOD_GIDL5: value->rValue = model->HSMHV_gidl5; return(OK); case HSMHV_MOD_GLEAK1: value->rValue = model->HSMHV_gleak1; return(OK); case HSMHV_MOD_GLEAK2: value->rValue = model->HSMHV_gleak2; return(OK); case HSMHV_MOD_GLEAK3: value->rValue = model->HSMHV_gleak3; return(OK); case HSMHV_MOD_GLEAK4: value->rValue = model->HSMHV_gleak4; return(OK); case HSMHV_MOD_GLEAK5: value->rValue = model->HSMHV_gleak5; return(OK); case HSMHV_MOD_GLEAK6: value->rValue = model->HSMHV_gleak6; return(OK); case HSMHV_MOD_GLEAK7: value->rValue = model->HSMHV_gleak7; return(OK); case HSMHV_MOD_GLPART1: value->rValue = model->HSMHV_glpart1; return(OK); case HSMHV_MOD_GLKSD1: value->rValue = model->HSMHV_glksd1; return(OK); case HSMHV_MOD_GLKSD2: value->rValue = model->HSMHV_glksd2; return(OK); case HSMHV_MOD_GLKSD3: value->rValue = model->HSMHV_glksd3; return(OK); case HSMHV_MOD_GLKB1: value->rValue = model->HSMHV_glkb1; return(OK); case HSMHV_MOD_GLKB2: value->rValue = model->HSMHV_glkb2; return(OK); case HSMHV_MOD_GLKB3: value->rValue = model->HSMHV_glkb3; return(OK); case HSMHV_MOD_EGIG: value->rValue = model->HSMHV_egig; return(OK); case HSMHV_MOD_IGTEMP2: value->rValue = model->HSMHV_igtemp2; return(OK); case HSMHV_MOD_IGTEMP3: value->rValue = model->HSMHV_igtemp3; return(OK); case HSMHV_MOD_VZADD0: value->rValue = model->HSMHV_vzadd0; return(OK); case HSMHV_MOD_PZADD0: value->rValue = model->HSMHV_pzadd0; return(OK); case HSMHV_MOD_NFTRP: value->rValue = model->HSMHV_nftrp; return(OK); case HSMHV_MOD_NFALP: value->rValue = model->HSMHV_nfalp; return(OK); case HSMHV_MOD_CIT: value->rValue = model->HSMHV_cit; return(OK); case HSMHV_MOD_FALPH: value->rValue = model->HSMHV_falph; return(OK); case HSMHV_MOD_KAPPA: value->rValue = model->HSMHV_kappa; return(OK); case HSMHV_MOD_PTHROU: value->rValue = model->HSMHV_pthrou; return(OK); case HSMHV_MOD_VDIFFJ: value->rValue = model->HSMHV_vdiffj; return(OK); case HSMHV_MOD_DLY1: value->rValue = model->HSMHV_dly1; return(OK); case HSMHV_MOD_DLY2: value->rValue = model->HSMHV_dly2; return(OK); case HSMHV_MOD_DLY3: value->rValue = model->HSMHV_dly3; return(OK); case HSMHV_MOD_DLYOV: value->rValue = model->HSMHV_dlyov; return(OK); case HSMHV_MOD_TNOM: value->rValue = model->HSMHV_tnom; return(OK); case HSMHV_MOD_OVSLP: value->rValue = model->HSMHV_ovslp; return(OK); case HSMHV_MOD_OVMAG: value->rValue = model->HSMHV_ovmag; return(OK); case HSMHV_MOD_GBMIN: value->rValue = model->HSMHV_gbmin; return(OK); case HSMHV_MOD_RBPB: value->rValue = model->HSMHV_rbpb; return(OK); case HSMHV_MOD_RBPD: value->rValue = model->HSMHV_rbpd; return(OK); case HSMHV_MOD_RBPS: value->rValue = model->HSMHV_rbps; return(OK); case HSMHV_MOD_RBDB: value->rValue = model->HSMHV_rbdb; return(OK); case HSMHV_MOD_RBSB: value->rValue = model->HSMHV_rbsb; return(OK); case HSMHV_MOD_IBPC1: value->rValue = model->HSMHV_ibpc1; return(OK); case HSMHV_MOD_IBPC2: value->rValue = model->HSMHV_ibpc2; return(OK); case HSMHV_MOD_MPHDFM: value->rValue = model->HSMHV_mphdfm; return(OK); case HSMHV_MOD_RDVG11: value->rValue = model->HSMHV_rdvg11; return(OK); case HSMHV_MOD_RDVG12: value->rValue = model->HSMHV_rdvg12; return(OK); case HSMHV_MOD_RTH0: /* Self-heating model */ value->rValue = model->HSMHV_rth0; return(OK); case HSMHV_MOD_CTH0: /* Self-heating model */ value->rValue = model->HSMHV_cth0; return(OK); case HSMHV_MOD_POWRAT: /* Self-heating model */ value->rValue = model->HSMHV_powrat; return(OK); case HSMHV_MOD_RTHTEMP1: /* Self-heating model */ value->rValue = model->HSMHV_rthtemp1; return(OK); case HSMHV_MOD_RTHTEMP2: /* Self-heating model */ value->rValue = model->HSMHV_rthtemp2; return(OK); case HSMHV_MOD_PRATTEMP1: /* Self-heating model */ value->rValue = model->HSMHV_prattemp1; return(OK); case HSMHV_MOD_PRATTEMP2: /* Self-heating model */ value->rValue = model->HSMHV_prattemp2; return(OK); case HSMHV_MOD_TCJBD: /* Self-heating model */ value->rValue = model->HSMHV_tcjbd; return(OK); case HSMHV_MOD_TCJBS: /* Self-heating model */ value->rValue = model->HSMHV_tcjbs; return(OK); case HSMHV_MOD_TCJBDSW: /* Self-heating model */ value->rValue = model->HSMHV_tcjbdsw; return(OK); case HSMHV_MOD_TCJBSSW: /* Self-heating model */ value->rValue = model->HSMHV_tcjbssw; return(OK); case HSMHV_MOD_TCJBDSWG: /* Self-heating model */ value->rValue = model->HSMHV_tcjbdswg; return(OK); case HSMHV_MOD_TCJBSSWG: /* Self-heating model */ value->rValue = model->HSMHV_tcjbsswg; return(OK); /* case HSMHV_MOD_WTH0: */ /* value->rValue = model->HSMHV_wth0; */ /* return(OK); */ case HSMHV_MOD_QDFTVD: value->rValue = model->HSMHV_qdftvd; return(OK); case HSMHV_MOD_XLDLD: value->rValue = model->HSMHV_xldld; return(OK); case HSMHV_MOD_XWDLD: value->rValue = model->HSMHV_xwdld; return(OK); case HSMHV_MOD_RDVD: value->rValue = model->HSMHV_rdvd; return(OK); case HSMHV_MOD_RD20: value->rValue = model->HSMHV_rd20; return(OK); case HSMHV_MOD_QOVSM: value->rValue = model->HSMHV_qovsm; return(OK); case HSMHV_MOD_LDRIFT: value->rValue = model->HSMHV_ldrift; return(OK); case HSMHV_MOD_RD21: value->rValue = model->HSMHV_rd21; return(OK); case HSMHV_MOD_RD22: value->rValue = model->HSMHV_rd22; return(OK); case HSMHV_MOD_RD22D: value->rValue = model->HSMHV_rd22d; return(OK); case HSMHV_MOD_RD23: value->rValue = model->HSMHV_rd23; return(OK); case HSMHV_MOD_RD24: value->rValue = model->HSMHV_rd24; return(OK); case HSMHV_MOD_RD25: value->rValue = model->HSMHV_rd25; return(OK); case HSMHV_MOD_RD26: value->rValue = model->HSMHV_rd26; return(OK); case HSMHV_MOD_RDVDL: value->rValue = model->HSMHV_rdvdl; return(OK); case HSMHV_MOD_RDVDLP: value->rValue = model->HSMHV_rdvdlp; return(OK); case HSMHV_MOD_RDVDS: value->rValue = model->HSMHV_rdvds; return(OK); case HSMHV_MOD_RDVDSP: value->rValue = model->HSMHV_rdvdsp; return(OK); case HSMHV_MOD_RD23L: value->rValue = model->HSMHV_rd23l; return(OK); case HSMHV_MOD_RD23LP: value->rValue = model->HSMHV_rd23lp; return(OK); case HSMHV_MOD_RD23S: value->rValue = model->HSMHV_rd23s; return(OK); case HSMHV_MOD_RD23SP: value->rValue = model->HSMHV_rd23sp; return(OK); case HSMHV_MOD_RDS: value->rValue = model->HSMHV_rds; return(OK); case HSMHV_MOD_RDSP: value->rValue = model->HSMHV_rdsp; return(OK); case HSMHV_MOD_RDTEMP1: value->rValue = model->HSMHV_rdtemp1; return(OK); case HSMHV_MOD_RDTEMP2: value->rValue = model->HSMHV_rdtemp2; return(OK); case HSMHV_MOD_RTH0R: value->rValue = model->HSMHV_rth0r; return(OK); case HSMHV_MOD_RDVDTEMP1: value->rValue = model->HSMHV_rdvdtemp1; return(OK); case HSMHV_MOD_RDVDTEMP2: value->rValue = model->HSMHV_rdvdtemp2; return(OK); case HSMHV_MOD_RTH0W: value->rValue = model->HSMHV_rth0w; return(OK); case HSMHV_MOD_RTH0WP: value->rValue = model->HSMHV_rth0wp; return(OK); case HSMHV_MOD_CVDSOVER: value->rValue = model->HSMHV_cvdsover; return(OK); case HSMHV_MOD_NINVD: value->rValue = model->HSMHV_ninvd; return(OK); case HSMHV_MOD_NINVDW: value->rValue = model->HSMHV_ninvdw; return(OK); case HSMHV_MOD_NINVDWP: value->rValue = model->HSMHV_ninvdwp; return(OK); case HSMHV_MOD_NINVDT1: value->rValue = model->HSMHV_ninvdt1; return(OK); case HSMHV_MOD_NINVDT2: value->rValue = model->HSMHV_ninvdt2; return(OK); case HSMHV_MOD_VBSMIN: value->rValue = model->HSMHV_vbsmin; return(OK); case HSMHV_MOD_RDVB: value->rValue = model->HSMHV_rdvb; return(OK); case HSMHV_MOD_RTH0NF: value->rValue = model->HSMHV_rth0nf; return(OK); case HSMHV_MOD_RDVSUB: value->rValue = model->HSMHV_rdvsub; return(OK); case HSMHV_MOD_RDVDSUB: value->rValue = model->HSMHV_rdvdsub; return(OK); case HSMHV_MOD_DDRIFT: value->rValue = model->HSMHV_ddrift; return(OK); case HSMHV_MOD_VBISUB: value->rValue = model->HSMHV_vbisub; return(OK); case HSMHV_MOD_NSUBSUB: value->rValue = model->HSMHV_nsubsub; return(OK); case HSMHV_MOD_SHEMAX: value->rValue = model->HSMHV_shemax; return(OK); /* binning parameters */ case HSMHV_MOD_LMIN: value->rValue = model->HSMHV_lmin; return(OK); case HSMHV_MOD_LMAX: value->rValue = model->HSMHV_lmax; return(OK); case HSMHV_MOD_WMIN: value->rValue = model->HSMHV_wmin; return(OK); case HSMHV_MOD_WMAX: value->rValue = model->HSMHV_wmax; return(OK); case HSMHV_MOD_LBINN: value->rValue = model->HSMHV_lbinn; return(OK); case HSMHV_MOD_WBINN: value->rValue = model->HSMHV_wbinn; return(OK); /* Length dependence */ case HSMHV_MOD_LVMAX: value->rValue = model->HSMHV_lvmax; return(OK); case HSMHV_MOD_LBGTMP1: value->rValue = model->HSMHV_lbgtmp1; return(OK); case HSMHV_MOD_LBGTMP2: value->rValue = model->HSMHV_lbgtmp2; return(OK); case HSMHV_MOD_LEG0: value->rValue = model->HSMHV_leg0; return(OK); case HSMHV_MOD_LVFBOVER: value->rValue = model->HSMHV_lvfbover; return(OK); case HSMHV_MOD_LNOVER: value->rValue = model->HSMHV_lnover; return(OK); case HSMHV_MOD_LNOVERS: value->rValue = model->HSMHV_lnovers; return(OK); case HSMHV_MOD_LWL2: value->rValue = model->HSMHV_lwl2; return(OK); case HSMHV_MOD_LVFBC: value->rValue = model->HSMHV_lvfbc; return(OK); case HSMHV_MOD_LNSUBC: value->rValue = model->HSMHV_lnsubc; return(OK); case HSMHV_MOD_LNSUBP: value->rValue = model->HSMHV_lnsubp; return(OK); case HSMHV_MOD_LSCP1: value->rValue = model->HSMHV_lscp1; return(OK); case HSMHV_MOD_LSCP2: value->rValue = model->HSMHV_lscp2; return(OK); case HSMHV_MOD_LSCP3: value->rValue = model->HSMHV_lscp3; return(OK); case HSMHV_MOD_LSC1: value->rValue = model->HSMHV_lsc1; return(OK); case HSMHV_MOD_LSC2: value->rValue = model->HSMHV_lsc2; return(OK); case HSMHV_MOD_LSC3: value->rValue = model->HSMHV_lsc3; return(OK); case HSMHV_MOD_LPGD1: value->rValue = model->HSMHV_lpgd1; return(OK); case HSMHV_MOD_LPGD3: value->rValue = model->HSMHV_lpgd3; return(OK); case HSMHV_MOD_LNDEP: value->rValue = model->HSMHV_lndep; return(OK); case HSMHV_MOD_LNINV: value->rValue = model->HSMHV_lninv; return(OK); case HSMHV_MOD_LMUECB0: value->rValue = model->HSMHV_lmuecb0; return(OK); case HSMHV_MOD_LMUECB1: value->rValue = model->HSMHV_lmuecb1; return(OK); case HSMHV_MOD_LMUEPH1: value->rValue = model->HSMHV_lmueph1; return(OK); case HSMHV_MOD_LVTMP: value->rValue = model->HSMHV_lvtmp; return(OK); case HSMHV_MOD_LWVTH0: value->rValue = model->HSMHV_lwvth0; return(OK); case HSMHV_MOD_LMUESR1: value->rValue = model->HSMHV_lmuesr1; return(OK); case HSMHV_MOD_LMUETMP: value->rValue = model->HSMHV_lmuetmp; return(OK); case HSMHV_MOD_LSUB1: value->rValue = model->HSMHV_lsub1; return(OK); case HSMHV_MOD_LSUB2: value->rValue = model->HSMHV_lsub2; return(OK); case HSMHV_MOD_LSVDS: value->rValue = model->HSMHV_lsvds; return(OK); case HSMHV_MOD_LSVBS: value->rValue = model->HSMHV_lsvbs; return(OK); case HSMHV_MOD_LSVGS: value->rValue = model->HSMHV_lsvgs; return(OK); case HSMHV_MOD_LFN1: value->rValue = model->HSMHV_lfn1; return(OK); case HSMHV_MOD_LFN2: value->rValue = model->HSMHV_lfn2; return(OK); case HSMHV_MOD_LFN3: value->rValue = model->HSMHV_lfn3; return(OK); case HSMHV_MOD_LFVBS: value->rValue = model->HSMHV_lfvbs; return(OK); case HSMHV_MOD_LNSTI: value->rValue = model->HSMHV_lnsti; return(OK); case HSMHV_MOD_LWSTI: value->rValue = model->HSMHV_lwsti; return(OK); case HSMHV_MOD_LSCSTI1: value->rValue = model->HSMHV_lscsti1; return(OK); case HSMHV_MOD_LSCSTI2: value->rValue = model->HSMHV_lscsti2; return(OK); case HSMHV_MOD_LVTHSTI: value->rValue = model->HSMHV_lvthsti; return(OK); case HSMHV_MOD_LMUESTI1: value->rValue = model->HSMHV_lmuesti1; return(OK); case HSMHV_MOD_LMUESTI2: value->rValue = model->HSMHV_lmuesti2; return(OK); case HSMHV_MOD_LMUESTI3: value->rValue = model->HSMHV_lmuesti3; return(OK); case HSMHV_MOD_LNSUBPSTI1: value->rValue = model->HSMHV_lnsubpsti1; return(OK); case HSMHV_MOD_LNSUBPSTI2: value->rValue = model->HSMHV_lnsubpsti2; return(OK); case HSMHV_MOD_LNSUBPSTI3: value->rValue = model->HSMHV_lnsubpsti3; return(OK); case HSMHV_MOD_LCGSO: value->rValue = model->HSMHV_lcgso; return(OK); case HSMHV_MOD_LCGDO: value->rValue = model->HSMHV_lcgdo; return(OK); case HSMHV_MOD_LJS0: value->rValue = model->HSMHV_ljs0; return(OK); case HSMHV_MOD_LJS0SW: value->rValue = model->HSMHV_ljs0sw; return(OK); case HSMHV_MOD_LNJ: value->rValue = model->HSMHV_lnj; return(OK); case HSMHV_MOD_LCISBK: value->rValue = model->HSMHV_lcisbk; return(OK); case HSMHV_MOD_LCLM1: value->rValue = model->HSMHV_lclm1; return(OK); case HSMHV_MOD_LCLM2: value->rValue = model->HSMHV_lclm2; return(OK); case HSMHV_MOD_LCLM3: value->rValue = model->HSMHV_lclm3; return(OK); case HSMHV_MOD_LWFC: value->rValue = model->HSMHV_lwfc; return(OK); case HSMHV_MOD_LGIDL1: value->rValue = model->HSMHV_lgidl1; return(OK); case HSMHV_MOD_LGIDL2: value->rValue = model->HSMHV_lgidl2; return(OK); case HSMHV_MOD_LGLEAK1: value->rValue = model->HSMHV_lgleak1; return(OK); case HSMHV_MOD_LGLEAK2: value->rValue = model->HSMHV_lgleak2; return(OK); case HSMHV_MOD_LGLEAK3: value->rValue = model->HSMHV_lgleak3; return(OK); case HSMHV_MOD_LGLEAK6: value->rValue = model->HSMHV_lgleak6; return(OK); case HSMHV_MOD_LGLKSD1: value->rValue = model->HSMHV_lglksd1; return(OK); case HSMHV_MOD_LGLKSD2: value->rValue = model->HSMHV_lglksd2; return(OK); case HSMHV_MOD_LGLKB1: value->rValue = model->HSMHV_lglkb1; return(OK); case HSMHV_MOD_LGLKB2: value->rValue = model->HSMHV_lglkb2; return(OK); case HSMHV_MOD_LNFTRP: value->rValue = model->HSMHV_lnftrp; return(OK); case HSMHV_MOD_LNFALP: value->rValue = model->HSMHV_lnfalp; return(OK); case HSMHV_MOD_LPTHROU: value->rValue = model->HSMHV_lpthrou; return(OK); case HSMHV_MOD_LVDIFFJ: value->rValue = model->HSMHV_lvdiffj; return(OK); case HSMHV_MOD_LIBPC1: value->rValue = model->HSMHV_libpc1; return(OK); case HSMHV_MOD_LIBPC2: value->rValue = model->HSMHV_libpc2; return(OK); case HSMHV_MOD_LCGBO: value->rValue = model->HSMHV_lcgbo; return(OK); case HSMHV_MOD_LCVDSOVER: value->rValue = model->HSMHV_lcvdsover; return(OK); case HSMHV_MOD_LFALPH: value->rValue = model->HSMHV_lfalph; return(OK); case HSMHV_MOD_LNPEXT: value->rValue = model->HSMHV_lnpext; return(OK); case HSMHV_MOD_LPOWRAT: value->rValue = model->HSMHV_lpowrat; return(OK); case HSMHV_MOD_LRD: value->rValue = model->HSMHV_lrd; return(OK); case HSMHV_MOD_LRD22: value->rValue = model->HSMHV_lrd22; return(OK); case HSMHV_MOD_LRD23: value->rValue = model->HSMHV_lrd23; return(OK); case HSMHV_MOD_LRD24: value->rValue = model->HSMHV_lrd24; return(OK); case HSMHV_MOD_LRDICT1: value->rValue = model->HSMHV_lrdict1; return(OK); case HSMHV_MOD_LRDOV13: value->rValue = model->HSMHV_lrdov13; return(OK); case HSMHV_MOD_LRDSLP1: value->rValue = model->HSMHV_lrdslp1; return(OK); case HSMHV_MOD_LRDVB: value->rValue = model->HSMHV_lrdvb; return(OK); case HSMHV_MOD_LRDVD: value->rValue = model->HSMHV_lrdvd; return(OK); case HSMHV_MOD_LRDVG11: value->rValue = model->HSMHV_lrdvg11; return(OK); case HSMHV_MOD_LRS: value->rValue = model->HSMHV_lrs; return(OK); case HSMHV_MOD_LRTH0: value->rValue = model->HSMHV_lrth0; return(OK); case HSMHV_MOD_LVOVER: value->rValue = model->HSMHV_lvover; return(OK); /* Width dependence */ case HSMHV_MOD_WVMAX: value->rValue = model->HSMHV_wvmax; return(OK); case HSMHV_MOD_WBGTMP1: value->rValue = model->HSMHV_wbgtmp1; return(OK); case HSMHV_MOD_WBGTMP2: value->rValue = model->HSMHV_wbgtmp2; return(OK); case HSMHV_MOD_WEG0: value->rValue = model->HSMHV_weg0; return(OK); case HSMHV_MOD_WVFBOVER: value->rValue = model->HSMHV_wvfbover; return(OK); case HSMHV_MOD_WNOVER: value->rValue = model->HSMHV_wnover; return(OK); case HSMHV_MOD_WNOVERS: value->rValue = model->HSMHV_wnovers; return(OK); case HSMHV_MOD_WWL2: value->rValue = model->HSMHV_wwl2; return(OK); case HSMHV_MOD_WVFBC: value->rValue = model->HSMHV_wvfbc; return(OK); case HSMHV_MOD_WNSUBC: value->rValue = model->HSMHV_wnsubc; return(OK); case HSMHV_MOD_WNSUBP: value->rValue = model->HSMHV_wnsubp; return(OK); case HSMHV_MOD_WSCP1: value->rValue = model->HSMHV_wscp1; return(OK); case HSMHV_MOD_WSCP2: value->rValue = model->HSMHV_wscp2; return(OK); case HSMHV_MOD_WSCP3: value->rValue = model->HSMHV_wscp3; return(OK); case HSMHV_MOD_WSC1: value->rValue = model->HSMHV_wsc1; return(OK); case HSMHV_MOD_WSC2: value->rValue = model->HSMHV_wsc2; return(OK); case HSMHV_MOD_WSC3: value->rValue = model->HSMHV_wsc3; return(OK); case HSMHV_MOD_WPGD1: value->rValue = model->HSMHV_wpgd1; return(OK); case HSMHV_MOD_WPGD3: value->rValue = model->HSMHV_wpgd3; return(OK); case HSMHV_MOD_WNDEP: value->rValue = model->HSMHV_wndep; return(OK); case HSMHV_MOD_WNINV: value->rValue = model->HSMHV_wninv; return(OK); case HSMHV_MOD_WMUECB0: value->rValue = model->HSMHV_wmuecb0; return(OK); case HSMHV_MOD_WMUECB1: value->rValue = model->HSMHV_wmuecb1; return(OK); case HSMHV_MOD_WMUEPH1: value->rValue = model->HSMHV_wmueph1; return(OK); case HSMHV_MOD_WVTMP: value->rValue = model->HSMHV_wvtmp; return(OK); case HSMHV_MOD_WWVTH0: value->rValue = model->HSMHV_wwvth0; return(OK); case HSMHV_MOD_WMUESR1: value->rValue = model->HSMHV_wmuesr1; return(OK); case HSMHV_MOD_WMUETMP: value->rValue = model->HSMHV_wmuetmp; return(OK); case HSMHV_MOD_WSUB1: value->rValue = model->HSMHV_wsub1; return(OK); case HSMHV_MOD_WSUB2: value->rValue = model->HSMHV_wsub2; return(OK); case HSMHV_MOD_WSVDS: value->rValue = model->HSMHV_wsvds; return(OK); case HSMHV_MOD_WSVBS: value->rValue = model->HSMHV_wsvbs; return(OK); case HSMHV_MOD_WSVGS: value->rValue = model->HSMHV_wsvgs; return(OK); case HSMHV_MOD_WFN1: value->rValue = model->HSMHV_wfn1; return(OK); case HSMHV_MOD_WFN2: value->rValue = model->HSMHV_wfn2; return(OK); case HSMHV_MOD_WFN3: value->rValue = model->HSMHV_wfn3; return(OK); case HSMHV_MOD_WFVBS: value->rValue = model->HSMHV_wfvbs; return(OK); case HSMHV_MOD_WNSTI: value->rValue = model->HSMHV_wnsti; return(OK); case HSMHV_MOD_WWSTI: value->rValue = model->HSMHV_wwsti; return(OK); case HSMHV_MOD_WSCSTI1: value->rValue = model->HSMHV_wscsti1; return(OK); case HSMHV_MOD_WSCSTI2: value->rValue = model->HSMHV_wscsti2; return(OK); case HSMHV_MOD_WVTHSTI: value->rValue = model->HSMHV_wvthsti; return(OK); case HSMHV_MOD_WMUESTI1: value->rValue = model->HSMHV_wmuesti1; return(OK); case HSMHV_MOD_WMUESTI2: value->rValue = model->HSMHV_wmuesti2; return(OK); case HSMHV_MOD_WMUESTI3: value->rValue = model->HSMHV_wmuesti3; return(OK); case HSMHV_MOD_WNSUBPSTI1: value->rValue = model->HSMHV_wnsubpsti1; return(OK); case HSMHV_MOD_WNSUBPSTI2: value->rValue = model->HSMHV_wnsubpsti2; return(OK); case HSMHV_MOD_WNSUBPSTI3: value->rValue = model->HSMHV_wnsubpsti3; return(OK); case HSMHV_MOD_WCGSO: value->rValue = model->HSMHV_wcgso; return(OK); case HSMHV_MOD_WCGDO: value->rValue = model->HSMHV_wcgdo; return(OK); case HSMHV_MOD_WJS0: value->rValue = model->HSMHV_wjs0; return(OK); case HSMHV_MOD_WJS0SW: value->rValue = model->HSMHV_wjs0sw; return(OK); case HSMHV_MOD_WNJ: value->rValue = model->HSMHV_wnj; return(OK); case HSMHV_MOD_WCISBK: value->rValue = model->HSMHV_wcisbk; return(OK); case HSMHV_MOD_WCLM1: value->rValue = model->HSMHV_wclm1; return(OK); case HSMHV_MOD_WCLM2: value->rValue = model->HSMHV_wclm2; return(OK); case HSMHV_MOD_WCLM3: value->rValue = model->HSMHV_wclm3; return(OK); case HSMHV_MOD_WWFC: value->rValue = model->HSMHV_wwfc; return(OK); case HSMHV_MOD_WGIDL1: value->rValue = model->HSMHV_wgidl1; return(OK); case HSMHV_MOD_WGIDL2: value->rValue = model->HSMHV_wgidl2; return(OK); case HSMHV_MOD_WGLEAK1: value->rValue = model->HSMHV_wgleak1; return(OK); case HSMHV_MOD_WGLEAK2: value->rValue = model->HSMHV_wgleak2; return(OK); case HSMHV_MOD_WGLEAK3: value->rValue = model->HSMHV_wgleak3; return(OK); case HSMHV_MOD_WGLEAK6: value->rValue = model->HSMHV_wgleak6; return(OK); case HSMHV_MOD_WGLKSD1: value->rValue = model->HSMHV_wglksd1; return(OK); case HSMHV_MOD_WGLKSD2: value->rValue = model->HSMHV_wglksd2; return(OK); case HSMHV_MOD_WGLKB1: value->rValue = model->HSMHV_wglkb1; return(OK); case HSMHV_MOD_WGLKB2: value->rValue = model->HSMHV_wglkb2; return(OK); case HSMHV_MOD_WNFTRP: value->rValue = model->HSMHV_wnftrp; return(OK); case HSMHV_MOD_WNFALP: value->rValue = model->HSMHV_wnfalp; return(OK); case HSMHV_MOD_WPTHROU: value->rValue = model->HSMHV_wpthrou; return(OK); case HSMHV_MOD_WVDIFFJ: value->rValue = model->HSMHV_wvdiffj; return(OK); case HSMHV_MOD_WIBPC1: value->rValue = model->HSMHV_wibpc1; return(OK); case HSMHV_MOD_WIBPC2: value->rValue = model->HSMHV_wibpc2; return(OK); case HSMHV_MOD_WCGBO: value->rValue = model->HSMHV_wcgbo; return(OK); case HSMHV_MOD_WCVDSOVER: value->rValue = model->HSMHV_wcvdsover; return(OK); case HSMHV_MOD_WFALPH: value->rValue = model->HSMHV_wfalph; return(OK); case HSMHV_MOD_WNPEXT: value->rValue = model->HSMHV_wnpext; return(OK); case HSMHV_MOD_WPOWRAT: value->rValue = model->HSMHV_wpowrat; return(OK); case HSMHV_MOD_WRD: value->rValue = model->HSMHV_wrd; return(OK); case HSMHV_MOD_WRD22: value->rValue = model->HSMHV_wrd22; return(OK); case HSMHV_MOD_WRD23: value->rValue = model->HSMHV_wrd23; return(OK); case HSMHV_MOD_WRD24: value->rValue = model->HSMHV_wrd24; return(OK); case HSMHV_MOD_WRDICT1: value->rValue = model->HSMHV_wrdict1; return(OK); case HSMHV_MOD_WRDOV13: value->rValue = model->HSMHV_wrdov13; return(OK); case HSMHV_MOD_WRDSLP1: value->rValue = model->HSMHV_wrdslp1; return(OK); case HSMHV_MOD_WRDVB: value->rValue = model->HSMHV_wrdvb; return(OK); case HSMHV_MOD_WRDVD: value->rValue = model->HSMHV_wrdvd; return(OK); case HSMHV_MOD_WRDVG11: value->rValue = model->HSMHV_wrdvg11; return(OK); case HSMHV_MOD_WRS: value->rValue = model->HSMHV_wrs; return(OK); case HSMHV_MOD_WRTH0: value->rValue = model->HSMHV_wrth0; return(OK); case HSMHV_MOD_WVOVER: value->rValue = model->HSMHV_wvover; return(OK); /* Cross-term dependence */ case HSMHV_MOD_PVMAX: value->rValue = model->HSMHV_pvmax; return(OK); case HSMHV_MOD_PBGTMP1: value->rValue = model->HSMHV_pbgtmp1; return(OK); case HSMHV_MOD_PBGTMP2: value->rValue = model->HSMHV_pbgtmp2; return(OK); case HSMHV_MOD_PEG0: value->rValue = model->HSMHV_peg0; return(OK); case HSMHV_MOD_PVFBOVER: value->rValue = model->HSMHV_pvfbover; return(OK); case HSMHV_MOD_PNOVER: value->rValue = model->HSMHV_pnover; return(OK); case HSMHV_MOD_PNOVERS: value->rValue = model->HSMHV_pnovers; return(OK); case HSMHV_MOD_PWL2: value->rValue = model->HSMHV_pwl2; return(OK); case HSMHV_MOD_PVFBC: value->rValue = model->HSMHV_pvfbc; return(OK); case HSMHV_MOD_PNSUBC: value->rValue = model->HSMHV_pnsubc; return(OK); case HSMHV_MOD_PNSUBP: value->rValue = model->HSMHV_pnsubp; return(OK); case HSMHV_MOD_PSCP1: value->rValue = model->HSMHV_pscp1; return(OK); case HSMHV_MOD_PSCP2: value->rValue = model->HSMHV_pscp2; return(OK); case HSMHV_MOD_PSCP3: value->rValue = model->HSMHV_pscp3; return(OK); case HSMHV_MOD_PSC1: value->rValue = model->HSMHV_psc1; return(OK); case HSMHV_MOD_PSC2: value->rValue = model->HSMHV_psc2; return(OK); case HSMHV_MOD_PSC3: value->rValue = model->HSMHV_psc3; return(OK); case HSMHV_MOD_PPGD1: value->rValue = model->HSMHV_ppgd1; return(OK); case HSMHV_MOD_PPGD3: value->rValue = model->HSMHV_ppgd3; return(OK); case HSMHV_MOD_PNDEP: value->rValue = model->HSMHV_pndep; return(OK); case HSMHV_MOD_PNINV: value->rValue = model->HSMHV_pninv; return(OK); case HSMHV_MOD_PMUECB0: value->rValue = model->HSMHV_pmuecb0; return(OK); case HSMHV_MOD_PMUECB1: value->rValue = model->HSMHV_pmuecb1; return(OK); case HSMHV_MOD_PMUEPH1: value->rValue = model->HSMHV_pmueph1; return(OK); case HSMHV_MOD_PVTMP: value->rValue = model->HSMHV_pvtmp; return(OK); case HSMHV_MOD_PWVTH0: value->rValue = model->HSMHV_pwvth0; return(OK); case HSMHV_MOD_PMUESR1: value->rValue = model->HSMHV_pmuesr1; return(OK); case HSMHV_MOD_PMUETMP: value->rValue = model->HSMHV_pmuetmp; return(OK); case HSMHV_MOD_PSUB1: value->rValue = model->HSMHV_psub1; return(OK); case HSMHV_MOD_PSUB2: value->rValue = model->HSMHV_psub2; return(OK); case HSMHV_MOD_PSVDS: value->rValue = model->HSMHV_psvds; return(OK); case HSMHV_MOD_PSVBS: value->rValue = model->HSMHV_psvbs; return(OK); case HSMHV_MOD_PSVGS: value->rValue = model->HSMHV_psvgs; return(OK); case HSMHV_MOD_PFN1: value->rValue = model->HSMHV_pfn1; return(OK); case HSMHV_MOD_PFN2: value->rValue = model->HSMHV_pfn2; return(OK); case HSMHV_MOD_PFN3: value->rValue = model->HSMHV_pfn3; return(OK); case HSMHV_MOD_PFVBS: value->rValue = model->HSMHV_pfvbs; return(OK); case HSMHV_MOD_PNSTI: value->rValue = model->HSMHV_pnsti; return(OK); case HSMHV_MOD_PWSTI: value->rValue = model->HSMHV_pwsti; return(OK); case HSMHV_MOD_PSCSTI1: value->rValue = model->HSMHV_pscsti1; return(OK); case HSMHV_MOD_PSCSTI2: value->rValue = model->HSMHV_pscsti2; return(OK); case HSMHV_MOD_PVTHSTI: value->rValue = model->HSMHV_pvthsti; return(OK); case HSMHV_MOD_PMUESTI1: value->rValue = model->HSMHV_pmuesti1; return(OK); case HSMHV_MOD_PMUESTI2: value->rValue = model->HSMHV_pmuesti2; return(OK); case HSMHV_MOD_PMUESTI3: value->rValue = model->HSMHV_pmuesti3; return(OK); case HSMHV_MOD_PNSUBPSTI1: value->rValue = model->HSMHV_pnsubpsti1; return(OK); case HSMHV_MOD_PNSUBPSTI2: value->rValue = model->HSMHV_pnsubpsti2; return(OK); case HSMHV_MOD_PNSUBPSTI3: value->rValue = model->HSMHV_pnsubpsti3; return(OK); case HSMHV_MOD_PCGSO: value->rValue = model->HSMHV_pcgso; return(OK); case HSMHV_MOD_PCGDO: value->rValue = model->HSMHV_pcgdo; return(OK); case HSMHV_MOD_PJS0: value->rValue = model->HSMHV_pjs0; return(OK); case HSMHV_MOD_PJS0SW: value->rValue = model->HSMHV_pjs0sw; return(OK); case HSMHV_MOD_PNJ: value->rValue = model->HSMHV_pnj; return(OK); case HSMHV_MOD_PCISBK: value->rValue = model->HSMHV_pcisbk; return(OK); case HSMHV_MOD_PCLM1: value->rValue = model->HSMHV_pclm1; return(OK); case HSMHV_MOD_PCLM2: value->rValue = model->HSMHV_pclm2; return(OK); case HSMHV_MOD_PCLM3: value->rValue = model->HSMHV_pclm3; return(OK); case HSMHV_MOD_PWFC: value->rValue = model->HSMHV_pwfc; return(OK); case HSMHV_MOD_PGIDL1: value->rValue = model->HSMHV_pgidl1; return(OK); case HSMHV_MOD_PGIDL2: value->rValue = model->HSMHV_pgidl2; return(OK); case HSMHV_MOD_PGLEAK1: value->rValue = model->HSMHV_pgleak1; return(OK); case HSMHV_MOD_PGLEAK2: value->rValue = model->HSMHV_pgleak2; return(OK); case HSMHV_MOD_PGLEAK3: value->rValue = model->HSMHV_pgleak3; return(OK); case HSMHV_MOD_PGLEAK6: value->rValue = model->HSMHV_pgleak6; return(OK); case HSMHV_MOD_PGLKSD1: value->rValue = model->HSMHV_pglksd1; return(OK); case HSMHV_MOD_PGLKSD2: value->rValue = model->HSMHV_pglksd2; return(OK); case HSMHV_MOD_PGLKB1: value->rValue = model->HSMHV_pglkb1; return(OK); case HSMHV_MOD_PGLKB2: value->rValue = model->HSMHV_pglkb2; return(OK); case HSMHV_MOD_PNFTRP: value->rValue = model->HSMHV_pnftrp; return(OK); case HSMHV_MOD_PNFALP: value->rValue = model->HSMHV_pnfalp; return(OK); case HSMHV_MOD_PPTHROU: value->rValue = model->HSMHV_ppthrou; return(OK); case HSMHV_MOD_PVDIFFJ: value->rValue = model->HSMHV_pvdiffj; return(OK); case HSMHV_MOD_PIBPC1: value->rValue = model->HSMHV_pibpc1; return(OK); case HSMHV_MOD_PIBPC2: value->rValue = model->HSMHV_pibpc2; return(OK); case HSMHV_MOD_PCGBO: value->rValue = model->HSMHV_pcgbo; return(OK); case HSMHV_MOD_PCVDSOVER: value->rValue = model->HSMHV_pcvdsover; return(OK); case HSMHV_MOD_PFALPH: value->rValue = model->HSMHV_pfalph; return(OK); case HSMHV_MOD_PNPEXT: value->rValue = model->HSMHV_pnpext; return(OK); case HSMHV_MOD_PPOWRAT: value->rValue = model->HSMHV_ppowrat; return(OK); case HSMHV_MOD_PRD: value->rValue = model->HSMHV_prd; return(OK); case HSMHV_MOD_PRD22: value->rValue = model->HSMHV_prd22; return(OK); case HSMHV_MOD_PRD23: value->rValue = model->HSMHV_prd23; return(OK); case HSMHV_MOD_PRD24: value->rValue = model->HSMHV_prd24; return(OK); case HSMHV_MOD_PRDICT1: value->rValue = model->HSMHV_prdict1; return(OK); case HSMHV_MOD_PRDOV13: value->rValue = model->HSMHV_prdov13; return(OK); case HSMHV_MOD_PRDSLP1: value->rValue = model->HSMHV_prdslp1; return(OK); case HSMHV_MOD_PRDVB: value->rValue = model->HSMHV_prdvb; return(OK); case HSMHV_MOD_PRDVD: value->rValue = model->HSMHV_prdvd; return(OK); case HSMHV_MOD_PRDVG11: value->rValue = model->HSMHV_prdvg11; return(OK); case HSMHV_MOD_PRS: value->rValue = model->HSMHV_prs; return(OK); case HSMHV_MOD_PRTH0: value->rValue = model->HSMHV_prth0; return(OK); case HSMHV_MOD_PVOVER: value->rValue = model->HSMHV_pvover; return(OK); case HSMHV_MOD_VGS_MAX: value->rValue = model->HSMHVvgsMax; return(OK); case HSMHV_MOD_VGD_MAX: value->rValue = model->HSMHVvgdMax; return(OK); case HSMHV_MOD_VGB_MAX: value->rValue = model->HSMHVvgbMax; return(OK); case HSMHV_MOD_VDS_MAX: value->rValue = model->HSMHVvdsMax; return(OK); case HSMHV_MOD_VBS_MAX: value->rValue = model->HSMHVvbsMax; return(OK); case HSMHV_MOD_VBD_MAX: value->rValue = model->HSMHVvbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hisimhv1/hisimhv.h0000644000265600020320000000277712264261473021621 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hisimhv.h DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "hsmhvdef.h" #include "ngspice/cktdefs.h" #ifndef _HiSIMHV_H #define _HiSIMHV_H /* return value */ #ifndef OK #define HiSIM_OK 0 #define HiSIM_ERROR 1 #else #define HiSIM_OK OK #define HiSIM_ERROR E_PANIC #endif /* MOS type */ #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /* device working mode */ #ifndef CMI_NORMAL_MODE #define HiSIM_NORMAL_MODE 1 #define HiSIM_REVERSE_MODE -1 #else #define HiSIM_NORMAL_MODE CMI_NORMAL_MODE #define HiSIM_REVERSE_MODE CMI_REVERSE_MODE #endif /* others */ #ifndef NULL #define NULL 0 #endif #define HiSIM_FALSE 0 #define HiSIM_TRUE 1 #ifndef return_if_error #define return_if_error(s) { int error = s; if(error) return(error); } #endif extern int HSMHVevaluate ( double ivds, double ivgs, double ivbs, double ivdsi, double ivgsi, double ivbsi, double vbs_jct, double vbd_jct, double vsubs, double deltemp, HSMHVinstance *here, HSMHVmodel *model, CKTcircuit *ckt ) ; #endif /* _HiSIMHV_H */ ngspice-26/src/spicelib/devices/hisimhv1/hsmhvmpar.c0000644000265600020320000020517512264261473022147 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvmpar.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsmhvdef.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVmParam( int param, IFvalue *value, GENmodel *inMod) { HSMHVmodel *mod = (HSMHVmodel*)inMod; switch (param) { case HSMHV_MOD_NMOS : if (value->iValue) { mod->HSMHV_type = 1; mod->HSMHV_type_Given = TRUE; } break; case HSMHV_MOD_PMOS : if (value->iValue) { mod->HSMHV_type = - 1; mod->HSMHV_type_Given = TRUE; } break; case HSMHV_MOD_LEVEL: mod->HSMHV_level = value->iValue; mod->HSMHV_level_Given = TRUE; break; case HSMHV_MOD_INFO: mod->HSMHV_info = value->iValue; mod->HSMHV_info_Given = TRUE; break; case HSMHV_MOD_NOISE: mod->HSMHV_noise = value->iValue; mod->HSMHV_noise_Given = TRUE; break; case HSMHV_MOD_VERSION: mod->HSMHV_version = value->sValue; mod->HSMHV_version_Given = TRUE; break; case HSMHV_MOD_SHOW: mod->HSMHV_show = value->iValue; mod->HSMHV_show_Given = TRUE; break; case HSMHV_MOD_CORSRD: mod->HSMHV_corsrd = value->iValue; mod->HSMHV_corsrd_Given = TRUE; break; case HSMHV_MOD_CORG: mod->HSMHV_corg = value->iValue; mod->HSMHV_corg_Given = TRUE; break; case HSMHV_MOD_COIPRV: mod->HSMHV_coiprv = value->iValue; mod->HSMHV_coiprv_Given = TRUE; break; case HSMHV_MOD_COPPRV: mod->HSMHV_copprv = value->iValue; mod->HSMHV_copprv_Given = TRUE; break; case HSMHV_MOD_COADOV: mod->HSMHV_coadov = value->iValue; mod->HSMHV_coadov_Given = TRUE; break; case HSMHV_MOD_COISUB: mod->HSMHV_coisub = value->iValue; mod->HSMHV_coisub_Given = TRUE; break; case HSMHV_MOD_COIIGS: mod->HSMHV_coiigs = value->iValue; mod->HSMHV_coiigs_Given = TRUE; break; case HSMHV_MOD_COGIDL: mod->HSMHV_cogidl = value->iValue; mod->HSMHV_cogidl_Given = TRUE; break; case HSMHV_MOD_COOVLP: mod->HSMHV_coovlp = value->iValue; mod->HSMHV_coovlp_Given = TRUE; break; case HSMHV_MOD_COOVLPS: mod->HSMHV_coovlps = value->iValue; mod->HSMHV_coovlps_Given = TRUE; break; case HSMHV_MOD_COFLICK: mod->HSMHV_coflick = value->iValue; mod->HSMHV_coflick_Given = TRUE; break; case HSMHV_MOD_COISTI: mod->HSMHV_coisti = value->iValue; mod->HSMHV_coisti_Given = TRUE; break; case HSMHV_MOD_CONQS: /* HiSIMHV */ mod->HSMHV_conqs = value->iValue; mod->HSMHV_conqs_Given = TRUE; break; case HSMHV_MOD_CORBNET: mod->HSMHV_corbnet = value->iValue; mod->HSMHV_corbnet_Given = TRUE; break; case HSMHV_MOD_COTHRML: mod->HSMHV_cothrml = value->iValue; mod->HSMHV_cothrml_Given = TRUE; break; case HSMHV_MOD_COIGN: mod->HSMHV_coign = value->iValue; mod->HSMHV_coign_Given = TRUE; break; case HSMHV_MOD_CODFM: mod->HSMHV_codfm = value->iValue; mod->HSMHV_codfm_Given = TRUE; break; case HSMHV_MOD_COQOVSM: mod->HSMHV_coqovsm = value->iValue; mod->HSMHV_coqovsm_Given = TRUE; break; case HSMHV_MOD_COSELFHEAT: /* Self-heating model */ mod->HSMHV_coselfheat = value->iValue; mod->HSMHV_coselfheat_Given = TRUE; break; case HSMHV_MOD_COSUBNODE: mod->HSMHV_cosubnode = value->iValue; mod->HSMHV_cosubnode_Given = TRUE; break; case HSMHV_MOD_COSYM: /* Symmetry model for HV */ mod->HSMHV_cosym = value->iValue; mod->HSMHV_cosym_Given = TRUE; break; case HSMHV_MOD_COTEMP: mod->HSMHV_cotemp = value->iValue; mod->HSMHV_cotemp_Given = TRUE; break; case HSMHV_MOD_COLDRIFT: mod->HSMHV_coldrift = value->iValue; mod->HSMHV_coldrift_Given = TRUE; break; case HSMHV_MOD_VMAX: mod->HSMHV_vmax = value->rValue; mod->HSMHV_vmax_Given = TRUE; break; case HSMHV_MOD_VMAXT1: mod->HSMHV_vmaxt1 = value->rValue; mod->HSMHV_vmaxt1_Given = TRUE; break; case HSMHV_MOD_VMAXT2: mod->HSMHV_vmaxt2 = value->rValue; mod->HSMHV_vmaxt2_Given = TRUE; break; case HSMHV_MOD_BGTMP1: mod->HSMHV_bgtmp1 = value->rValue; mod->HSMHV_bgtmp1_Given = TRUE; break; case HSMHV_MOD_BGTMP2: mod->HSMHV_bgtmp2 = value->rValue; mod->HSMHV_bgtmp2_Given = TRUE; break; case HSMHV_MOD_EG0: mod->HSMHV_eg0 = value->rValue; mod->HSMHV_eg0_Given = TRUE; break; case HSMHV_MOD_TOX: mod->HSMHV_tox = value->rValue; mod->HSMHV_tox_Given = TRUE; break; case HSMHV_MOD_XLD: mod->HSMHV_xld = value->rValue; mod->HSMHV_xld_Given = TRUE; break; case HSMHV_MOD_LOVER: mod->HSMHV_lover = value->rValue; mod->HSMHV_lover_Given = TRUE; break; case HSMHV_MOD_LOVERS: mod->HSMHV_lovers = value->rValue; mod->HSMHV_lovers_Given = TRUE; break; case HSMHV_MOD_RDOV11: mod->HSMHV_rdov11 = value->rValue; mod->HSMHV_rdov11_Given = TRUE; break; case HSMHV_MOD_RDOV12: mod->HSMHV_rdov12 = value->rValue; mod->HSMHV_rdov12_Given = TRUE; break; case HSMHV_MOD_RDOV13: mod->HSMHV_rdov13 = value->rValue; mod->HSMHV_rdov13_Given = TRUE; break; case HSMHV_MOD_RDSLP1: mod->HSMHV_rdslp1 = value->rValue; mod->HSMHV_rdslp1_Given = TRUE; break; case HSMHV_MOD_RDICT1: mod->HSMHV_rdict1= value->rValue; mod->HSMHV_rdict1_Given = TRUE; break; case HSMHV_MOD_RDSLP2: mod->HSMHV_rdslp2 = value->rValue; mod->HSMHV_rdslp2_Given = TRUE; break; case HSMHV_MOD_RDICT2: mod->HSMHV_rdict2 = value->rValue; mod->HSMHV_rdict2_Given = TRUE; break; case HSMHV_MOD_LOVERLD: mod->HSMHV_loverld = value->rValue; mod->HSMHV_loverld_Given = TRUE; break; case HSMHV_MOD_LDRIFT1: mod->HSMHV_ldrift1 = value->rValue; mod->HSMHV_ldrift1_Given = TRUE; break; case HSMHV_MOD_LDRIFT2: mod->HSMHV_ldrift2 = value->rValue; mod->HSMHV_ldrift2_Given = TRUE; break; case HSMHV_MOD_LDRIFT1S: mod->HSMHV_ldrift1s = value->rValue; mod->HSMHV_ldrift1s_Given = TRUE; break; case HSMHV_MOD_LDRIFT2S: mod->HSMHV_ldrift2s = value->rValue; mod->HSMHV_ldrift2s_Given = TRUE; break; case HSMHV_MOD_SUBLD1: mod->HSMHV_subld1 = value->rValue; mod->HSMHV_subld1_Given = TRUE; break; case HSMHV_MOD_SUBLD2: mod->HSMHV_subld2 = value->rValue; mod->HSMHV_subld2_Given = TRUE; break; case HSMHV_MOD_DDLTMAX: /* Vdseff */ mod->HSMHV_ddltmax = value->rValue; mod->HSMHV_ddltmax_Given = TRUE; break; case HSMHV_MOD_DDLTSLP: /* Vdseff */ mod->HSMHV_ddltslp = value->rValue; mod->HSMHV_ddltslp_Given = TRUE; break; case HSMHV_MOD_DDLTICT: /* Vdseff */ mod->HSMHV_ddltict = value->rValue; mod->HSMHV_ddltict_Given = TRUE; break; case HSMHV_MOD_VFBOVER: mod->HSMHV_vfbover = value->rValue; mod->HSMHV_vfbover_Given = TRUE; break; case HSMHV_MOD_NOVER: mod->HSMHV_nover = value->rValue; mod->HSMHV_nover_Given = TRUE; break; case HSMHV_MOD_NOVERS: mod->HSMHV_novers = value->rValue; mod->HSMHV_novers_Given = TRUE; break; case HSMHV_MOD_XWD: mod->HSMHV_xwd = value->rValue; mod->HSMHV_xwd_Given = TRUE; break; case HSMHV_MOD_XWDC: mod->HSMHV_xwdc = value->rValue; mod->HSMHV_xwdc_Given = TRUE; break; case HSMHV_MOD_XL: mod->HSMHV_xl = value->rValue; mod->HSMHV_xl_Given = TRUE; break; case HSMHV_MOD_XW: mod->HSMHV_xw = value->rValue; mod->HSMHV_xw_Given = TRUE; break; case HSMHV_MOD_SAREF: mod->HSMHV_saref = value->rValue; mod->HSMHV_saref_Given = TRUE; break; case HSMHV_MOD_SBREF: mod->HSMHV_sbref = value->rValue; mod->HSMHV_sbref_Given = TRUE; break; case HSMHV_MOD_LL: mod->HSMHV_ll = value->rValue; mod->HSMHV_ll_Given = TRUE; break; case HSMHV_MOD_LLD: mod->HSMHV_lld = value->rValue; mod->HSMHV_lld_Given = TRUE; break; case HSMHV_MOD_LLN: mod->HSMHV_lln = value->rValue; mod->HSMHV_lln_Given = TRUE; break; case HSMHV_MOD_WL: mod->HSMHV_wl = value->rValue; mod->HSMHV_wl_Given = TRUE; break; case HSMHV_MOD_WL1: mod->HSMHV_wl1 = value->rValue; mod->HSMHV_wl1_Given = TRUE; break; case HSMHV_MOD_WL1P: mod->HSMHV_wl1p = value->rValue; mod->HSMHV_wl1p_Given = TRUE; break; case HSMHV_MOD_WL2: mod->HSMHV_wl2 = value->rValue; mod->HSMHV_wl2_Given = TRUE; break; case HSMHV_MOD_WL2P: mod->HSMHV_wl2p = value->rValue; mod->HSMHV_wl2p_Given = TRUE; break; case HSMHV_MOD_WLD: mod->HSMHV_wld = value->rValue; mod->HSMHV_wld_Given = TRUE; break; case HSMHV_MOD_WLN: mod->HSMHV_wln = value->rValue; mod->HSMHV_wln_Given = TRUE; break; case HSMHV_MOD_XQY: mod->HSMHV_xqy = value->rValue; mod->HSMHV_xqy_Given = TRUE; break; case HSMHV_MOD_XQY1: mod->HSMHV_xqy1 = value->rValue; mod->HSMHV_xqy1_Given = TRUE; break; case HSMHV_MOD_XQY2: mod->HSMHV_xqy2 = value->rValue; mod->HSMHV_xqy2_Given = TRUE; break; case HSMHV_MOD_RS: mod->HSMHV_rs = value->rValue; mod->HSMHV_rs_Given = TRUE; break; case HSMHV_MOD_RD: mod->HSMHV_rd = value->rValue; mod->HSMHV_rd_Given = TRUE; break; case HSMHV_MOD_RSH: mod->HSMHV_rsh = value->rValue; mod->HSMHV_rsh_Given = TRUE; break; case HSMHV_MOD_RSHG: mod->HSMHV_rshg = value->rValue; mod->HSMHV_rshg_Given = TRUE; break; case HSMHV_MOD_VFBC: mod->HSMHV_vfbc = value->rValue; mod->HSMHV_vfbc_Given = TRUE; break; case HSMHV_MOD_VBI: mod->HSMHV_vbi = value->rValue; mod->HSMHV_vbi_Given = TRUE; break; case HSMHV_MOD_NSUBC: mod->HSMHV_nsubc = value->rValue; mod->HSMHV_nsubc_Given = TRUE; break; case HSMHV_MOD_PARL2: mod->HSMHV_parl2 = value->rValue; mod->HSMHV_parl2_Given = TRUE; break; case HSMHV_MOD_LP: mod->HSMHV_lp = value->rValue; mod->HSMHV_lp_Given = TRUE; break; case HSMHV_MOD_NSUBP: mod->HSMHV_nsubp = value->rValue; mod->HSMHV_nsubp_Given = TRUE; break; case HSMHV_MOD_NSUBP0: mod->HSMHV_nsubp0 = value->rValue; mod->HSMHV_nsubp0_Given = TRUE; break; case HSMHV_MOD_NSUBWP: mod->HSMHV_nsubwp = value->rValue; mod->HSMHV_nsubwp_Given = TRUE; break; case HSMHV_MOD_SCP1: mod->HSMHV_scp1 = value->rValue; mod->HSMHV_scp1_Given = TRUE; break; case HSMHV_MOD_SCP2: mod->HSMHV_scp2 = value->rValue; mod->HSMHV_scp2_Given = TRUE; break; case HSMHV_MOD_SCP3: mod->HSMHV_scp3 = value->rValue; mod->HSMHV_scp3_Given = TRUE; break; case HSMHV_MOD_SC1: mod->HSMHV_sc1 = value->rValue; mod->HSMHV_sc1_Given = TRUE; break; case HSMHV_MOD_SC2: mod->HSMHV_sc2 = value->rValue; mod->HSMHV_sc2_Given = TRUE; break; case HSMHV_MOD_SC3: mod->HSMHV_sc3 = value->rValue; mod->HSMHV_sc3_Given = TRUE; break; case HSMHV_MOD_SC4: mod->HSMHV_sc4 = value->rValue; mod->HSMHV_sc4_Given = TRUE; break; case HSMHV_MOD_PGD1: mod->HSMHV_pgd1 = value->rValue; mod->HSMHV_pgd1_Given = TRUE; break; case HSMHV_MOD_PGD2: mod->HSMHV_pgd2 = value->rValue; mod->HSMHV_pgd2_Given = TRUE; break; case HSMHV_MOD_PGD3: mod->HSMHV_pgd3 = value->rValue; mod->HSMHV_pgd3_Given = TRUE; break; case HSMHV_MOD_PGD4: mod->HSMHV_pgd4 = value->rValue; mod->HSMHV_pgd4_Given = TRUE; break; case HSMHV_MOD_NDEP: mod->HSMHV_ndep = value->rValue; mod->HSMHV_ndep_Given = TRUE; break; case HSMHV_MOD_NDEPL: mod->HSMHV_ndepl = value->rValue; mod->HSMHV_ndepl_Given = TRUE; break; case HSMHV_MOD_NDEPLP: mod->HSMHV_ndeplp = value->rValue; mod->HSMHV_ndeplp_Given = TRUE; break; case HSMHV_MOD_NINV: mod->HSMHV_ninv = value->rValue; mod->HSMHV_ninv_Given = TRUE; break; case HSMHV_MOD_MUECB0: mod->HSMHV_muecb0 = value->rValue; mod->HSMHV_muecb0_Given = TRUE; break; case HSMHV_MOD_MUECB1: mod->HSMHV_muecb1 = value->rValue; mod->HSMHV_muecb1_Given = TRUE; break; case HSMHV_MOD_MUEPH1: mod->HSMHV_mueph1 = value->rValue; mod->HSMHV_mueph1_Given = TRUE; break; case HSMHV_MOD_MUEPH0: mod->HSMHV_mueph0 = value->rValue; mod->HSMHV_mueph0_Given = TRUE; break; case HSMHV_MOD_MUEPHW: mod->HSMHV_muephw = value->rValue; mod->HSMHV_muephw_Given = TRUE; break; case HSMHV_MOD_MUEPWP: mod->HSMHV_muepwp = value->rValue; mod->HSMHV_muepwp_Given = TRUE; break; case HSMHV_MOD_MUEPHL: mod->HSMHV_muephl = value->rValue; mod->HSMHV_muephl_Given = TRUE; break; case HSMHV_MOD_MUEPLP: mod->HSMHV_mueplp = value->rValue; mod->HSMHV_mueplp_Given = TRUE; break; case HSMHV_MOD_MUEPHS: mod->HSMHV_muephs = value->rValue; mod->HSMHV_muephs_Given = TRUE; break; case HSMHV_MOD_MUEPSP: mod->HSMHV_muepsp = value->rValue; mod->HSMHV_muepsp_Given = TRUE; break; case HSMHV_MOD_VTMP: mod->HSMHV_vtmp = value->rValue; mod->HSMHV_vtmp_Given = TRUE; break; case HSMHV_MOD_WVTH0: mod->HSMHV_wvth0 = value->rValue; mod->HSMHV_wvth0_Given = TRUE; break; case HSMHV_MOD_MUESR1: mod->HSMHV_muesr1 = value->rValue; mod->HSMHV_muesr1_Given = TRUE; break; case HSMHV_MOD_MUESR0: mod->HSMHV_muesr0 = value->rValue; mod->HSMHV_muesr0_Given = TRUE; break; case HSMHV_MOD_MUESRL: mod->HSMHV_muesrl = value->rValue; mod->HSMHV_muesrl_Given = TRUE; break; case HSMHV_MOD_MUESLP: mod->HSMHV_mueslp = value->rValue; mod->HSMHV_mueslp_Given = TRUE; break; case HSMHV_MOD_MUESRW: mod->HSMHV_muesrw = value->rValue; mod->HSMHV_muesrw_Given = TRUE; break; case HSMHV_MOD_MUESWP: mod->HSMHV_mueswp = value->rValue; mod->HSMHV_mueswp_Given = TRUE; break; case HSMHV_MOD_BB: mod->HSMHV_bb = value->rValue; mod->HSMHV_bb_Given = TRUE; break; case HSMHV_MOD_SUB1: mod->HSMHV_sub1 = value->rValue; mod->HSMHV_sub1_Given = TRUE; break; case HSMHV_MOD_SUB2: mod->HSMHV_sub2 = value->rValue; mod->HSMHV_sub2_Given = TRUE; break; case HSMHV_MOD_SVGS: mod->HSMHV_svgs = value->rValue; mod->HSMHV_svgs_Given = TRUE; break; case HSMHV_MOD_SVBS: mod->HSMHV_svbs = value->rValue; mod->HSMHV_svbs_Given = TRUE; break; case HSMHV_MOD_SVBSL: mod->HSMHV_svbsl = value->rValue; mod->HSMHV_svbsl_Given = TRUE; break; case HSMHV_MOD_SVDS: mod->HSMHV_svds = value->rValue; mod->HSMHV_svds_Given = TRUE; break; case HSMHV_MOD_SLG: mod->HSMHV_slg = value->rValue; mod->HSMHV_slg_Given = TRUE; break; case HSMHV_MOD_SUB1L: mod->HSMHV_sub1l = value->rValue; mod->HSMHV_sub1l_Given = TRUE; break; case HSMHV_MOD_SUB2L: mod->HSMHV_sub2l = value->rValue; mod->HSMHV_sub2l_Given = TRUE; break; case HSMHV_MOD_FN1: mod->HSMHV_fn1 = value->rValue; mod->HSMHV_fn1_Given = TRUE; break; case HSMHV_MOD_FN2: mod->HSMHV_fn2 = value->rValue; mod->HSMHV_fn2_Given = TRUE; break; case HSMHV_MOD_FN3: mod->HSMHV_fn3 = value->rValue; mod->HSMHV_fn3_Given = TRUE; break; case HSMHV_MOD_FVBS: mod->HSMHV_fvbs = value->rValue; mod->HSMHV_fvbs_Given = TRUE; break; case HSMHV_MOD_SVGSL: mod->HSMHV_svgsl = value->rValue; mod->HSMHV_svgsl_Given = TRUE; break; case HSMHV_MOD_SVGSLP: mod->HSMHV_svgslp = value->rValue; mod->HSMHV_svgslp_Given = TRUE; break; case HSMHV_MOD_SVGSWP: mod->HSMHV_svgswp = value->rValue; mod->HSMHV_svgswp_Given = TRUE; break; case HSMHV_MOD_SVGSW: mod->HSMHV_svgsw = value->rValue; mod->HSMHV_svgsw_Given = TRUE; break; case HSMHV_MOD_SVBSLP: mod->HSMHV_svbslp = value->rValue; mod->HSMHV_svbslp_Given = TRUE; break; case HSMHV_MOD_SLGL: mod->HSMHV_slgl = value->rValue; mod->HSMHV_slgl_Given = TRUE; break; case HSMHV_MOD_SLGLP: mod->HSMHV_slglp = value->rValue; mod->HSMHV_slglp_Given = TRUE; break; case HSMHV_MOD_SUB1LP: mod->HSMHV_sub1lp = value->rValue; mod->HSMHV_sub1lp_Given = TRUE; break; case HSMHV_MOD_NSTI: mod->HSMHV_nsti = value->rValue; mod->HSMHV_nsti_Given = TRUE; break; case HSMHV_MOD_WSTI: mod->HSMHV_wsti = value->rValue; mod->HSMHV_wsti_Given = TRUE; break; case HSMHV_MOD_WSTIL: mod->HSMHV_wstil = value->rValue; mod->HSMHV_wstil_Given = TRUE; break; case HSMHV_MOD_WSTILP: mod->HSMHV_wstilp = value->rValue; mod->HSMHV_wstilp_Given = TRUE; break; case HSMHV_MOD_WSTIW: mod->HSMHV_wstiw = value->rValue; mod->HSMHV_wstiw_Given = TRUE; break; case HSMHV_MOD_WSTIWP: mod->HSMHV_wstiwp = value->rValue; mod->HSMHV_wstiwp_Given = TRUE; break; case HSMHV_MOD_SCSTI1: mod->HSMHV_scsti1 = value->rValue; mod->HSMHV_scsti1_Given = TRUE; break; case HSMHV_MOD_SCSTI2: mod->HSMHV_scsti2 = value->rValue; mod->HSMHV_scsti2_Given = TRUE; break; case HSMHV_MOD_VTHSTI: mod->HSMHV_vthsti = value->rValue; mod->HSMHV_vthsti_Given = TRUE; break; case HSMHV_MOD_VDSTI: mod->HSMHV_vdsti = value->rValue; mod->HSMHV_vdsti_Given = TRUE; break; case HSMHV_MOD_MUESTI1: mod->HSMHV_muesti1 = value->rValue; mod->HSMHV_muesti1_Given = TRUE; break; case HSMHV_MOD_MUESTI2: mod->HSMHV_muesti2 = value->rValue; mod->HSMHV_muesti2_Given = TRUE; break; case HSMHV_MOD_MUESTI3: mod->HSMHV_muesti3 = value->rValue; mod->HSMHV_muesti3_Given = TRUE; break; case HSMHV_MOD_NSUBPSTI1: mod->HSMHV_nsubpsti1 = value->rValue; mod->HSMHV_nsubpsti1_Given = TRUE; break; case HSMHV_MOD_NSUBPSTI2: mod->HSMHV_nsubpsti2 = value->rValue; mod->HSMHV_nsubpsti2_Given = TRUE; break; case HSMHV_MOD_NSUBPSTI3: mod->HSMHV_nsubpsti3 = value->rValue; mod->HSMHV_nsubpsti3_Given = TRUE; break; case HSMHV_MOD_LPEXT: mod->HSMHV_lpext = value->rValue; mod->HSMHV_lpext_Given = TRUE; break; case HSMHV_MOD_NPEXT: mod->HSMHV_npext = value->rValue; mod->HSMHV_npext_Given = TRUE; break; case HSMHV_MOD_SCP22: mod->HSMHV_scp22 = value->rValue; mod->HSMHV_scp22_Given = TRUE; break; case HSMHV_MOD_SCP21: mod->HSMHV_scp21 = value->rValue; mod->HSMHV_scp21_Given = TRUE; break; case HSMHV_MOD_BS1: mod->HSMHV_bs1 = value->rValue; mod->HSMHV_bs1_Given = TRUE; break; case HSMHV_MOD_BS2: mod->HSMHV_bs2 = value->rValue; mod->HSMHV_bs2_Given = TRUE; break; case HSMHV_MOD_CGSO: mod->HSMHV_cgso = value->rValue; mod->HSMHV_cgso_Given = TRUE; break; case HSMHV_MOD_CGDO: mod->HSMHV_cgdo = value->rValue; mod->HSMHV_cgdo_Given = TRUE; break; case HSMHV_MOD_CGBO: mod->HSMHV_cgbo = value->rValue; mod->HSMHV_cgbo_Given = TRUE; break; case HSMHV_MOD_TPOLY: mod->HSMHV_tpoly = value->rValue; mod->HSMHV_tpoly_Given = TRUE; break; case HSMHV_MOD_JS0: mod->HSMHV_js0 = value->rValue; mod->HSMHV_js0_Given = TRUE; break; case HSMHV_MOD_JS0SW: mod->HSMHV_js0sw = value->rValue; mod->HSMHV_js0sw_Given = TRUE; break; case HSMHV_MOD_NJ: mod->HSMHV_nj = value->rValue; mod->HSMHV_nj_Given = TRUE; break; case HSMHV_MOD_NJSW: mod->HSMHV_njsw = value->rValue; mod->HSMHV_njsw_Given = TRUE; break; case HSMHV_MOD_XTI: mod->HSMHV_xti = value->rValue; mod->HSMHV_xti_Given = TRUE; break; case HSMHV_MOD_CJ: mod->HSMHV_cj = value->rValue; mod->HSMHV_cj_Given = TRUE; break; case HSMHV_MOD_CJSW: mod->HSMHV_cjsw = value->rValue; mod->HSMHV_cjsw_Given = TRUE; break; case HSMHV_MOD_CJSWG: mod->HSMHV_cjswg = value->rValue; mod->HSMHV_cjswg_Given = TRUE; break; case HSMHV_MOD_MJ: mod->HSMHV_mj = value->rValue; mod->HSMHV_mj_Given = TRUE; break; case HSMHV_MOD_MJSW: mod->HSMHV_mjsw = value->rValue; mod->HSMHV_mjsw_Given = TRUE; break; case HSMHV_MOD_MJSWG: mod->HSMHV_mjswg = value->rValue; mod->HSMHV_mjswg_Given = TRUE; break; case HSMHV_MOD_PB: mod->HSMHV_pb = value->rValue; mod->HSMHV_pb_Given = TRUE; break; case HSMHV_MOD_PBSW: mod->HSMHV_pbsw = value->rValue; mod->HSMHV_pbsw_Given = TRUE; break; case HSMHV_MOD_PBSWG: mod->HSMHV_pbswg = value->rValue; mod->HSMHV_pbswg_Given = TRUE; break; case HSMHV_MOD_XTI2: mod->HSMHV_xti2 = value->rValue; mod->HSMHV_xti2_Given = TRUE; break; case HSMHV_MOD_CISB: mod->HSMHV_cisb = value->rValue; mod->HSMHV_cisb_Given = TRUE; break; case HSMHV_MOD_CVB: mod->HSMHV_cvb = value->rValue; mod->HSMHV_cvb_Given = TRUE; break; case HSMHV_MOD_CTEMP: mod->HSMHV_ctemp = value->rValue; mod->HSMHV_ctemp_Given = TRUE; break; case HSMHV_MOD_CISBK: mod->HSMHV_cisbk = value->rValue; mod->HSMHV_cisbk_Given = TRUE; break; case HSMHV_MOD_CVBK: mod->HSMHV_cvbk = value->rValue; mod->HSMHV_cvbk_Given = TRUE; break; case HSMHV_MOD_DIVX: mod->HSMHV_divx = value->rValue; mod->HSMHV_divx_Given = TRUE; break; case HSMHV_MOD_CLM1: mod->HSMHV_clm1 = value->rValue; mod->HSMHV_clm1_Given = TRUE; break; case HSMHV_MOD_CLM2: mod->HSMHV_clm2 = value->rValue; mod->HSMHV_clm2_Given = TRUE; break; case HSMHV_MOD_CLM3: mod->HSMHV_clm3 = value->rValue; mod->HSMHV_clm3_Given = TRUE; break; case HSMHV_MOD_CLM5: mod->HSMHV_clm5 = value->rValue; mod->HSMHV_clm5_Given = TRUE; break; case HSMHV_MOD_CLM6: mod->HSMHV_clm6 = value->rValue; mod->HSMHV_clm6_Given = TRUE; break; case HSMHV_MOD_MUETMP: mod->HSMHV_muetmp = value->rValue; mod->HSMHV_muetmp_Given = TRUE; break; case HSMHV_MOD_VOVER: mod->HSMHV_vover = value->rValue; mod->HSMHV_vover_Given = TRUE; break; case HSMHV_MOD_VOVERP: mod->HSMHV_voverp = value->rValue; mod->HSMHV_voverp_Given = TRUE; break; case HSMHV_MOD_VOVERS: mod->HSMHV_vovers = value->rValue; mod->HSMHV_vovers_Given = TRUE; break; case HSMHV_MOD_VOVERSP: mod->HSMHV_voversp = value->rValue; mod->HSMHV_voversp_Given = TRUE; break; case HSMHV_MOD_WFC: mod->HSMHV_wfc = value->rValue; mod->HSMHV_wfc_Given = TRUE; break; case HSMHV_MOD_NSUBCW: mod->HSMHV_nsubcw = value->rValue; mod->HSMHV_nsubcw_Given = TRUE; break; case HSMHV_MOD_NSUBCWP: mod->HSMHV_nsubcwp = value->rValue; mod->HSMHV_nsubcwp_Given = TRUE; break; case HSMHV_MOD_QME1: mod->HSMHV_qme1 = value->rValue; mod->HSMHV_qme1_Given = TRUE; break; case HSMHV_MOD_QME2: mod->HSMHV_qme2 = value->rValue; mod->HSMHV_qme2_Given = TRUE; break; case HSMHV_MOD_QME3: mod->HSMHV_qme3 = value->rValue; mod->HSMHV_qme3_Given = TRUE; break; case HSMHV_MOD_GIDL1: mod->HSMHV_gidl1 = value->rValue; mod->HSMHV_gidl1_Given = TRUE; break; case HSMHV_MOD_GIDL2: mod->HSMHV_gidl2 = value->rValue; mod->HSMHV_gidl2_Given = TRUE; break; case HSMHV_MOD_GIDL3: mod->HSMHV_gidl3 = value->rValue; mod->HSMHV_gidl3_Given = TRUE; break; case HSMHV_MOD_GIDL4: mod->HSMHV_gidl4 = value->rValue; mod->HSMHV_gidl4_Given = TRUE; break; case HSMHV_MOD_GIDL5: mod->HSMHV_gidl5 = value->rValue; mod->HSMHV_gidl5_Given = TRUE; break; case HSMHV_MOD_GLEAK1: mod->HSMHV_gleak1 = value->rValue; mod->HSMHV_gleak1_Given = TRUE; break; case HSMHV_MOD_GLEAK2: mod->HSMHV_gleak2 = value->rValue; mod->HSMHV_gleak2_Given = TRUE; break; case HSMHV_MOD_GLEAK3: mod->HSMHV_gleak3 = value->rValue; mod->HSMHV_gleak3_Given = TRUE; break; case HSMHV_MOD_GLEAK4: mod->HSMHV_gleak4 = value->rValue; mod->HSMHV_gleak4_Given = TRUE; break; case HSMHV_MOD_GLEAK5: mod->HSMHV_gleak5 = value->rValue; mod->HSMHV_gleak5_Given = TRUE; break; case HSMHV_MOD_GLEAK6: mod->HSMHV_gleak6 = value->rValue; mod->HSMHV_gleak6_Given = TRUE; break; case HSMHV_MOD_GLEAK7: mod->HSMHV_gleak7 = value->rValue; mod->HSMHV_gleak7_Given = TRUE; break; case HSMHV_MOD_GLPART1: mod->HSMHV_glpart1 = value->rValue; mod->HSMHV_glpart1_Given = TRUE; break; case HSMHV_MOD_GLKSD1: mod->HSMHV_glksd1 = value->rValue; mod->HSMHV_glksd1_Given = TRUE; break; case HSMHV_MOD_GLKSD2: mod->HSMHV_glksd2 = value->rValue; mod->HSMHV_glksd2_Given = TRUE; break; case HSMHV_MOD_GLKSD3: mod->HSMHV_glksd3 = value->rValue; mod->HSMHV_glksd3_Given = TRUE; break; case HSMHV_MOD_GLKB1: mod->HSMHV_glkb1 = value->rValue; mod->HSMHV_glkb1_Given = TRUE; break; case HSMHV_MOD_GLKB2: mod->HSMHV_glkb2 = value->rValue; mod->HSMHV_glkb2_Given = TRUE; break; case HSMHV_MOD_GLKB3: mod->HSMHV_glkb3 = value->rValue; mod->HSMHV_glkb3_Given = TRUE; break; case HSMHV_MOD_EGIG: mod->HSMHV_egig = value->rValue; mod->HSMHV_egig_Given = TRUE; break; case HSMHV_MOD_IGTEMP2: mod->HSMHV_igtemp2 = value->rValue; mod->HSMHV_igtemp2_Given = TRUE; break; case HSMHV_MOD_IGTEMP3: mod->HSMHV_igtemp3 = value->rValue; mod->HSMHV_igtemp3_Given = TRUE; break; case HSMHV_MOD_VZADD0: mod->HSMHV_vzadd0 = value->rValue; mod->HSMHV_vzadd0_Given = TRUE; break; case HSMHV_MOD_PZADD0: mod->HSMHV_pzadd0 = value->rValue; mod->HSMHV_pzadd0_Given = TRUE; break; case HSMHV_MOD_NFTRP: mod->HSMHV_nftrp = value->rValue; mod->HSMHV_nftrp_Given = TRUE; break; case HSMHV_MOD_NFALP: mod->HSMHV_nfalp = value->rValue; mod->HSMHV_nfalp_Given = TRUE; break; case HSMHV_MOD_CIT: mod->HSMHV_cit = value->rValue; mod->HSMHV_cit_Given = TRUE; break; case HSMHV_MOD_FALPH: mod->HSMHV_falph = value->rValue; mod->HSMHV_falph_Given = TRUE; break; case HSMHV_MOD_KAPPA: mod->HSMHV_kappa = value->rValue; mod->HSMHV_kappa_Given = TRUE; break; case HSMHV_MOD_PTHROU: mod->HSMHV_pthrou = value->rValue; mod->HSMHV_pthrou_Given = TRUE; break; case HSMHV_MOD_VDIFFJ: mod->HSMHV_vdiffj = value->rValue; mod->HSMHV_vdiffj_Given = TRUE; break; case HSMHV_MOD_DLY1: mod->HSMHV_dly1 = value->rValue; mod->HSMHV_dly1_Given = TRUE; break; case HSMHV_MOD_DLY2: mod->HSMHV_dly2 = value->rValue; mod->HSMHV_dly2_Given = TRUE; break; case HSMHV_MOD_DLY3: mod->HSMHV_dly3 = value->rValue; mod->HSMHV_dly3_Given = TRUE; break; case HSMHV_MOD_TNOM: mod->HSMHV_tnom = value->rValue; mod->HSMHV_tnom_Given = TRUE; break; case HSMHV_MOD_OVSLP: mod->HSMHV_ovslp = value->rValue; mod->HSMHV_ovslp_Given = TRUE; break; case HSMHV_MOD_OVMAG: mod->HSMHV_ovmag = value->rValue; mod->HSMHV_ovmag_Given = TRUE; break; case HSMHV_MOD_GBMIN: mod->HSMHV_gbmin = value->rValue; mod->HSMHV_gbmin_Given = TRUE; break; case HSMHV_MOD_RBPB: mod->HSMHV_rbpb = value->rValue; mod->HSMHV_rbpb_Given = TRUE; break; case HSMHV_MOD_RBPD: mod->HSMHV_rbpd = value->rValue; mod->HSMHV_rbpd_Given = TRUE; break; case HSMHV_MOD_RBPS: mod->HSMHV_rbps = value->rValue; mod->HSMHV_rbps_Given = TRUE; break; case HSMHV_MOD_RBDB: mod->HSMHV_rbdb = value->rValue; mod->HSMHV_rbdb_Given = TRUE; break; case HSMHV_MOD_RBSB: mod->HSMHV_rbsb = value->rValue; mod->HSMHV_rbsb_Given = TRUE; break; case HSMHV_MOD_IBPC1: mod->HSMHV_ibpc1 = value->rValue; mod->HSMHV_ibpc1_Given = TRUE; break; case HSMHV_MOD_IBPC2: mod->HSMHV_ibpc2 = value->rValue; mod->HSMHV_ibpc2_Given = TRUE; break; case HSMHV_MOD_MPHDFM: mod->HSMHV_mphdfm = value->rValue; mod->HSMHV_mphdfm_Given = TRUE; break; case HSMHV_MOD_RDVG11: mod->HSMHV_rdvg11 = value->rValue; mod->HSMHV_rdvg11_Given = TRUE; break; case HSMHV_MOD_RDVG12: mod->HSMHV_rdvg12 = value->rValue; mod->HSMHV_rdvg12_Given = TRUE; break; case HSMHV_MOD_RD20: mod->HSMHV_rd20 = value->rValue; mod->HSMHV_rd20_Given = TRUE; break; case HSMHV_MOD_QOVSM: mod->HSMHV_qovsm = value->rValue; mod->HSMHV_qovsm_Given = TRUE; break; case HSMHV_MOD_LDRIFT: mod->HSMHV_ldrift = value->rValue; mod->HSMHV_ldrift_Given = TRUE; break; case HSMHV_MOD_RD21: mod->HSMHV_rd21 = value->rValue; mod->HSMHV_rd21_Given = TRUE; break; case HSMHV_MOD_RD22: mod->HSMHV_rd22 = value->rValue; mod->HSMHV_rd22_Given = TRUE; break; case HSMHV_MOD_RD22D: mod->HSMHV_rd22d = value->rValue; mod->HSMHV_rd22d_Given = TRUE; break; case HSMHV_MOD_RD23: mod->HSMHV_rd23 = value->rValue; mod->HSMHV_rd23_Given = TRUE; break; case HSMHV_MOD_RD24: mod->HSMHV_rd24 = value->rValue; mod->HSMHV_rd24_Given = TRUE; break; case HSMHV_MOD_RD25: mod->HSMHV_rd25 = value->rValue; mod->HSMHV_rd25_Given = TRUE; break; case HSMHV_MOD_RD26: mod->HSMHV_rd26 = value->rValue; mod->HSMHV_rd26_Given = TRUE; break; case HSMHV_MOD_RDVDL: mod->HSMHV_rdvdl = value->rValue; mod->HSMHV_rdvdl_Given = TRUE; break; case HSMHV_MOD_RDVDLP: mod->HSMHV_rdvdlp = value->rValue; mod->HSMHV_rdvdlp_Given = TRUE; break; case HSMHV_MOD_RDVDS: mod->HSMHV_rdvds = value->rValue; mod->HSMHV_rdvds_Given = TRUE; break; case HSMHV_MOD_RDVDSP: mod->HSMHV_rdvdsp = value->rValue; mod->HSMHV_rdvdsp_Given = TRUE; break; case HSMHV_MOD_RD23L: mod->HSMHV_rd23l = value->rValue; mod->HSMHV_rd23l_Given = TRUE; break; case HSMHV_MOD_RD23LP: mod->HSMHV_rd23lp = value->rValue; mod->HSMHV_rd23lp_Given = TRUE; break; case HSMHV_MOD_RD23S: mod->HSMHV_rd23s = value->rValue; mod->HSMHV_rd23s_Given = TRUE; break; case HSMHV_MOD_RD23SP: mod->HSMHV_rd23sp = value->rValue; mod->HSMHV_rd23sp_Given = TRUE; break; case HSMHV_MOD_RDS: mod->HSMHV_rds = value->rValue; mod->HSMHV_rds_Given = TRUE; break; case HSMHV_MOD_RDSP: mod->HSMHV_rdsp = value->rValue; mod->HSMHV_rdsp_Given = TRUE; break; case HSMHV_MOD_RTH0: /* Self-heating model */ mod->HSMHV_rth0 = value->rValue; mod->HSMHV_rth0_Given = TRUE; break; case HSMHV_MOD_CTH0: /* Self-heating model */ mod->HSMHV_cth0 = value->rValue; mod->HSMHV_cth0_Given = TRUE; break; case HSMHV_MOD_POWRAT: /* Self-heating model */ mod->HSMHV_powrat = value->rValue; mod->HSMHV_powrat_Given = TRUE; break; case HSMHV_MOD_TCJBD: /* Self-heating model */ mod->HSMHV_tcjbd = value->rValue; mod->HSMHV_tcjbd_Given = TRUE; break; case HSMHV_MOD_TCJBS: /* Self-heating model */ mod->HSMHV_tcjbs = value->rValue; mod->HSMHV_tcjbs_Given = TRUE; break; case HSMHV_MOD_TCJBDSW: /* Self-heating model */ mod->HSMHV_tcjbdsw = value->rValue; mod->HSMHV_tcjbdsw_Given = TRUE; break; case HSMHV_MOD_TCJBSSW: /* Self-heating model */ mod->HSMHV_tcjbssw = value->rValue; mod->HSMHV_tcjbssw_Given = TRUE; break; case HSMHV_MOD_TCJBDSWG: /* Self-heating model */ mod->HSMHV_tcjbdswg = value->rValue; mod->HSMHV_tcjbdswg_Given = TRUE; break; case HSMHV_MOD_TCJBSSWG: /* Self-heating model */ mod->HSMHV_tcjbsswg = value->rValue; mod->HSMHV_tcjbsswg_Given = TRUE; break; case HSMHV_MOD_DLYOV: mod->HSMHV_dlyov = value->rValue; mod->HSMHV_dlyov_Given = TRUE; break; case HSMHV_MOD_QDFTVD: mod->HSMHV_qdftvd = value->rValue; mod->HSMHV_qdftvd_Given = TRUE; break; case HSMHV_MOD_XLDLD: mod->HSMHV_xldld = value->rValue; mod->HSMHV_xldld_Given = TRUE; break; case HSMHV_MOD_XWDLD: mod->HSMHV_xwdld = value->rValue; mod->HSMHV_xwdld_Given = TRUE; break; case HSMHV_MOD_RDVD: mod->HSMHV_rdvd = value->rValue; mod->HSMHV_rdvd_Given = TRUE; break; case HSMHV_MOD_RDTEMP1: mod->HSMHV_rdtemp1 = value->rValue; mod->HSMHV_rdtemp1_Given = TRUE; break; case HSMHV_MOD_RDTEMP2: mod->HSMHV_rdtemp2 = value->rValue; mod->HSMHV_rdtemp2_Given = TRUE; break; case HSMHV_MOD_RTH0R: mod->HSMHV_rth0r = value->rValue; mod->HSMHV_rth0r_Given = TRUE; break; case HSMHV_MOD_RDVDTEMP1: mod->HSMHV_rdvdtemp1 = value->rValue; mod->HSMHV_rdvdtemp1_Given = TRUE; break; case HSMHV_MOD_RDVDTEMP2: mod->HSMHV_rdvdtemp2 = value->rValue; mod->HSMHV_rdvdtemp2_Given = TRUE; break; case HSMHV_MOD_RTH0W: mod->HSMHV_rth0w = value->rValue; mod->HSMHV_rth0w_Given = TRUE; break; case HSMHV_MOD_RTH0WP: mod->HSMHV_rth0wp = value->rValue; mod->HSMHV_rth0wp_Given = TRUE; break; case HSMHV_MOD_CVDSOVER: mod->HSMHV_cvdsover = value->rValue; mod->HSMHV_cvdsover_Given = TRUE; break; case HSMHV_MOD_NINVD: mod->HSMHV_ninvd = value->rValue; mod->HSMHV_ninvd_Given = TRUE; break; case HSMHV_MOD_NINVDW: mod->HSMHV_ninvdw = value->rValue; mod->HSMHV_ninvdw_Given = TRUE; break; case HSMHV_MOD_NINVDWP: mod->HSMHV_ninvdwp = value->rValue; mod->HSMHV_ninvdwp_Given = TRUE; break; case HSMHV_MOD_NINVDT1: mod->HSMHV_ninvdt1 = value->rValue; mod->HSMHV_ninvdt1_Given = TRUE; break; case HSMHV_MOD_NINVDT2: mod->HSMHV_ninvdt2 = value->rValue; mod->HSMHV_ninvdt2_Given = TRUE; break; case HSMHV_MOD_VBSMIN: mod->HSMHV_vbsmin = value->rValue; mod->HSMHV_vbsmin_Given = TRUE; break; case HSMHV_MOD_RDVB: mod->HSMHV_rdvb = value->rValue; mod->HSMHV_rdvb_Given = TRUE; break; case HSMHV_MOD_RTH0NF: mod->HSMHV_rth0nf = value->rValue; mod->HSMHV_rth0nf_Given = TRUE; break; case HSMHV_MOD_RTHTEMP1: mod->HSMHV_rthtemp1 = value->rValue; mod->HSMHV_rthtemp1_Given = TRUE; break; case HSMHV_MOD_RTHTEMP2: mod->HSMHV_rthtemp2 = value->rValue; mod->HSMHV_rthtemp2_Given = TRUE; break; case HSMHV_MOD_PRATTEMP1: mod->HSMHV_prattemp1 = value->rValue; mod->HSMHV_prattemp1_Given = TRUE; break; case HSMHV_MOD_PRATTEMP2: mod->HSMHV_prattemp2 = value->rValue; mod->HSMHV_prattemp2_Given = TRUE; break; case HSMHV_MOD_RDVSUB: /* substrate effect */ mod->HSMHV_rdvsub = value->rValue; mod->HSMHV_rdvsub_Given = TRUE; break; case HSMHV_MOD_RDVDSUB: mod->HSMHV_rdvdsub = value->rValue; mod->HSMHV_rdvdsub_Given = TRUE; break; case HSMHV_MOD_DDRIFT: mod->HSMHV_ddrift = value->rValue; mod->HSMHV_ddrift_Given = TRUE; break; case HSMHV_MOD_VBISUB: mod->HSMHV_vbisub = value->rValue; mod->HSMHV_vbisub_Given = TRUE; break; case HSMHV_MOD_NSUBSUB: mod->HSMHV_nsubsub = value->rValue; mod->HSMHV_nsubsub_Given = TRUE; break; case HSMHV_MOD_SHEMAX: mod->HSMHV_shemax = value->rValue; mod->HSMHV_shemax_Given = TRUE; break; /* binning parameters */ case HSMHV_MOD_LMIN: mod->HSMHV_lmin = value->rValue; mod->HSMHV_lmin_Given = TRUE; break; case HSMHV_MOD_LMAX: mod->HSMHV_lmax = value->rValue; mod->HSMHV_lmax_Given = TRUE; break; case HSMHV_MOD_WMIN: mod->HSMHV_wmin = value->rValue; mod->HSMHV_wmin_Given = TRUE; break; case HSMHV_MOD_WMAX: mod->HSMHV_wmax = value->rValue; mod->HSMHV_wmax_Given = TRUE; break; case HSMHV_MOD_LBINN: mod->HSMHV_lbinn = value->rValue; mod->HSMHV_lbinn_Given = TRUE; break; case HSMHV_MOD_WBINN: mod->HSMHV_wbinn = value->rValue; mod->HSMHV_wbinn_Given = TRUE; break; /* Length dependence */ case HSMHV_MOD_LVMAX: mod->HSMHV_lvmax = value->rValue; mod->HSMHV_lvmax_Given = TRUE; break; case HSMHV_MOD_LBGTMP1: mod->HSMHV_lbgtmp1 = value->rValue; mod->HSMHV_lbgtmp1_Given = TRUE; break; case HSMHV_MOD_LBGTMP2: mod->HSMHV_lbgtmp2 = value->rValue; mod->HSMHV_lbgtmp2_Given = TRUE; break; case HSMHV_MOD_LEG0: mod->HSMHV_leg0 = value->rValue; mod->HSMHV_leg0_Given = TRUE; break; case HSMHV_MOD_LVFBOVER: mod->HSMHV_lvfbover = value->rValue; mod->HSMHV_lvfbover_Given = TRUE; break; case HSMHV_MOD_LNOVER: mod->HSMHV_lnover = value->rValue; mod->HSMHV_lnover_Given = TRUE; break; case HSMHV_MOD_LNOVERS: mod->HSMHV_lnovers = value->rValue; mod->HSMHV_lnovers_Given = TRUE; break; case HSMHV_MOD_LWL2: mod->HSMHV_lwl2 = value->rValue; mod->HSMHV_lwl2_Given = TRUE; break; case HSMHV_MOD_LVFBC: mod->HSMHV_lvfbc = value->rValue; mod->HSMHV_lvfbc_Given = TRUE; break; case HSMHV_MOD_LNSUBC: mod->HSMHV_lnsubc = value->rValue; mod->HSMHV_lnsubc_Given = TRUE; break; case HSMHV_MOD_LNSUBP: mod->HSMHV_lnsubp = value->rValue; mod->HSMHV_lnsubp_Given = TRUE; break; case HSMHV_MOD_LSCP1: mod->HSMHV_lscp1 = value->rValue; mod->HSMHV_lscp1_Given = TRUE; break; case HSMHV_MOD_LSCP2: mod->HSMHV_lscp2 = value->rValue; mod->HSMHV_lscp2_Given = TRUE; break; case HSMHV_MOD_LSCP3: mod->HSMHV_lscp3 = value->rValue; mod->HSMHV_lscp3_Given = TRUE; break; case HSMHV_MOD_LSC1: mod->HSMHV_lsc1 = value->rValue; mod->HSMHV_lsc1_Given = TRUE; break; case HSMHV_MOD_LSC2: mod->HSMHV_lsc2 = value->rValue; mod->HSMHV_lsc2_Given = TRUE; break; case HSMHV_MOD_LSC3: mod->HSMHV_lsc3 = value->rValue; mod->HSMHV_lsc3_Given = TRUE; break; case HSMHV_MOD_LPGD1: mod->HSMHV_lpgd1 = value->rValue; mod->HSMHV_lpgd1_Given = TRUE; break; case HSMHV_MOD_LPGD3: mod->HSMHV_lpgd3 = value->rValue; mod->HSMHV_lpgd3_Given = TRUE; break; case HSMHV_MOD_LNDEP: mod->HSMHV_lndep = value->rValue; mod->HSMHV_lndep_Given = TRUE; break; case HSMHV_MOD_LNINV: mod->HSMHV_lninv = value->rValue; mod->HSMHV_lninv_Given = TRUE; break; case HSMHV_MOD_LMUECB0: mod->HSMHV_lmuecb0 = value->rValue; mod->HSMHV_lmuecb0_Given = TRUE; break; case HSMHV_MOD_LMUECB1: mod->HSMHV_lmuecb1 = value->rValue; mod->HSMHV_lmuecb1_Given = TRUE; break; case HSMHV_MOD_LMUEPH1: mod->HSMHV_lmueph1 = value->rValue; mod->HSMHV_lmueph1_Given = TRUE; break; case HSMHV_MOD_LVTMP: mod->HSMHV_lvtmp = value->rValue; mod->HSMHV_lvtmp_Given = TRUE; break; case HSMHV_MOD_LWVTH0: mod->HSMHV_lwvth0 = value->rValue; mod->HSMHV_lwvth0_Given = TRUE; break; case HSMHV_MOD_LMUESR1: mod->HSMHV_lmuesr1 = value->rValue; mod->HSMHV_lmuesr1_Given = TRUE; break; case HSMHV_MOD_LMUETMP: mod->HSMHV_lmuetmp = value->rValue; mod->HSMHV_lmuetmp_Given = TRUE; break; case HSMHV_MOD_LSUB1: mod->HSMHV_lsub1 = value->rValue; mod->HSMHV_lsub1_Given = TRUE; break; case HSMHV_MOD_LSUB2: mod->HSMHV_lsub2 = value->rValue; mod->HSMHV_lsub2_Given = TRUE; break; case HSMHV_MOD_LSVDS: mod->HSMHV_lsvds = value->rValue; mod->HSMHV_lsvds_Given = TRUE; break; case HSMHV_MOD_LSVBS: mod->HSMHV_lsvbs = value->rValue; mod->HSMHV_lsvbs_Given = TRUE; break; case HSMHV_MOD_LSVGS: mod->HSMHV_lsvgs = value->rValue; mod->HSMHV_lsvgs_Given = TRUE; break; case HSMHV_MOD_LFN1: mod->HSMHV_lfn1 = value->rValue; mod->HSMHV_lfn1_Given = TRUE; break; case HSMHV_MOD_LFN2: mod->HSMHV_lfn2 = value->rValue; mod->HSMHV_lfn2_Given = TRUE; break; case HSMHV_MOD_LFN3: mod->HSMHV_lfn3 = value->rValue; mod->HSMHV_lfn3_Given = TRUE; break; case HSMHV_MOD_LFVBS: mod->HSMHV_lfvbs = value->rValue; mod->HSMHV_lfvbs_Given = TRUE; break; case HSMHV_MOD_LNSTI: mod->HSMHV_lnsti = value->rValue; mod->HSMHV_lnsti_Given = TRUE; break; case HSMHV_MOD_LWSTI: mod->HSMHV_lwsti = value->rValue; mod->HSMHV_lwsti_Given = TRUE; break; case HSMHV_MOD_LSCSTI1: mod->HSMHV_lscsti1 = value->rValue; mod->HSMHV_lscsti1_Given = TRUE; break; case HSMHV_MOD_LSCSTI2: mod->HSMHV_lscsti2 = value->rValue; mod->HSMHV_lscsti2_Given = TRUE; break; case HSMHV_MOD_LVTHSTI: mod->HSMHV_lvthsti = value->rValue; mod->HSMHV_lvthsti_Given = TRUE; break; case HSMHV_MOD_LMUESTI1: mod->HSMHV_lmuesti1 = value->rValue; mod->HSMHV_lmuesti1_Given = TRUE; break; case HSMHV_MOD_LMUESTI2: mod->HSMHV_lmuesti2 = value->rValue; mod->HSMHV_lmuesti2_Given = TRUE; break; case HSMHV_MOD_LMUESTI3: mod->HSMHV_lmuesti3 = value->rValue; mod->HSMHV_lmuesti3_Given = TRUE; break; case HSMHV_MOD_LNSUBPSTI1: mod->HSMHV_lnsubpsti1 = value->rValue; mod->HSMHV_lnsubpsti1_Given = TRUE; break; case HSMHV_MOD_LNSUBPSTI2: mod->HSMHV_lnsubpsti2 = value->rValue; mod->HSMHV_lnsubpsti2_Given = TRUE; break; case HSMHV_MOD_LNSUBPSTI3: mod->HSMHV_lnsubpsti3 = value->rValue; mod->HSMHV_lnsubpsti3_Given = TRUE; break; case HSMHV_MOD_LCGSO: mod->HSMHV_lcgso = value->rValue; mod->HSMHV_lcgso_Given = TRUE; break; case HSMHV_MOD_LCGDO: mod->HSMHV_lcgdo = value->rValue; mod->HSMHV_lcgdo_Given = TRUE; break; case HSMHV_MOD_LJS0: mod->HSMHV_ljs0 = value->rValue; mod->HSMHV_ljs0_Given = TRUE; break; case HSMHV_MOD_LJS0SW: mod->HSMHV_ljs0sw = value->rValue; mod->HSMHV_ljs0sw_Given = TRUE; break; case HSMHV_MOD_LNJ: mod->HSMHV_lnj = value->rValue; mod->HSMHV_lnj_Given = TRUE; break; case HSMHV_MOD_LCISBK: mod->HSMHV_lcisbk = value->rValue; mod->HSMHV_lcisbk_Given = TRUE; break; case HSMHV_MOD_LCLM1: mod->HSMHV_lclm1 = value->rValue; mod->HSMHV_lclm1_Given = TRUE; break; case HSMHV_MOD_LCLM2: mod->HSMHV_lclm2 = value->rValue; mod->HSMHV_lclm2_Given = TRUE; break; case HSMHV_MOD_LCLM3: mod->HSMHV_lclm3 = value->rValue; mod->HSMHV_lclm3_Given = TRUE; break; case HSMHV_MOD_LWFC: mod->HSMHV_lwfc = value->rValue; mod->HSMHV_lwfc_Given = TRUE; break; case HSMHV_MOD_LGIDL1: mod->HSMHV_lgidl1 = value->rValue; mod->HSMHV_lgidl1_Given = TRUE; break; case HSMHV_MOD_LGIDL2: mod->HSMHV_lgidl2 = value->rValue; mod->HSMHV_lgidl2_Given = TRUE; break; case HSMHV_MOD_LGLEAK1: mod->HSMHV_lgleak1 = value->rValue; mod->HSMHV_lgleak1_Given = TRUE; break; case HSMHV_MOD_LGLEAK2: mod->HSMHV_lgleak2 = value->rValue; mod->HSMHV_lgleak2_Given = TRUE; break; case HSMHV_MOD_LGLEAK3: mod->HSMHV_lgleak3 = value->rValue; mod->HSMHV_lgleak3_Given = TRUE; break; case HSMHV_MOD_LGLEAK6: mod->HSMHV_lgleak6 = value->rValue; mod->HSMHV_lgleak6_Given = TRUE; break; case HSMHV_MOD_LGLKSD1: mod->HSMHV_lglksd1 = value->rValue; mod->HSMHV_lglksd1_Given = TRUE; break; case HSMHV_MOD_LGLKSD2: mod->HSMHV_lglksd2 = value->rValue; mod->HSMHV_lglksd2_Given = TRUE; break; case HSMHV_MOD_LGLKB1: mod->HSMHV_lglkb1 = value->rValue; mod->HSMHV_lglkb1_Given = TRUE; break; case HSMHV_MOD_LGLKB2: mod->HSMHV_lglkb2 = value->rValue; mod->HSMHV_lglkb2_Given = TRUE; break; case HSMHV_MOD_LNFTRP: mod->HSMHV_lnftrp = value->rValue; mod->HSMHV_lnftrp_Given = TRUE; break; case HSMHV_MOD_LNFALP: mod->HSMHV_lnfalp = value->rValue; mod->HSMHV_lnfalp_Given = TRUE; break; case HSMHV_MOD_LPTHROU: mod->HSMHV_lpthrou = value->rValue; mod->HSMHV_lpthrou_Given = TRUE; break; case HSMHV_MOD_LVDIFFJ: mod->HSMHV_lvdiffj = value->rValue; mod->HSMHV_lvdiffj_Given = TRUE; break; case HSMHV_MOD_LIBPC1: mod->HSMHV_libpc1 = value->rValue; mod->HSMHV_libpc1_Given = TRUE; break; case HSMHV_MOD_LIBPC2: mod->HSMHV_libpc2 = value->rValue; mod->HSMHV_libpc2_Given = TRUE; break; break; case HSMHV_MOD_LCGBO: mod->HSMHV_lcgbo = value->rValue; mod->HSMHV_lcgbo_Given = TRUE; break; case HSMHV_MOD_LCVDSOVER: mod->HSMHV_lcvdsover = value->rValue; mod->HSMHV_lcvdsover_Given = TRUE; break; case HSMHV_MOD_LFALPH: mod->HSMHV_lfalph = value->rValue; mod->HSMHV_lfalph_Given = TRUE; break; case HSMHV_MOD_LNPEXT: mod->HSMHV_lnpext = value->rValue; mod->HSMHV_lnpext_Given = TRUE; break; case HSMHV_MOD_LPOWRAT: mod->HSMHV_lpowrat = value->rValue; mod->HSMHV_lpowrat_Given = TRUE; break; case HSMHV_MOD_LRD: mod->HSMHV_lrd = value->rValue; mod->HSMHV_lrd_Given = TRUE; break; case HSMHV_MOD_LRD22: mod->HSMHV_lrd22 = value->rValue; mod->HSMHV_lrd22_Given = TRUE; break; case HSMHV_MOD_LRD23: mod->HSMHV_lrd23 = value->rValue; mod->HSMHV_lrd23_Given = TRUE; break; case HSMHV_MOD_LRD24: mod->HSMHV_lrd24 = value->rValue; mod->HSMHV_lrd24_Given = TRUE; break; case HSMHV_MOD_LRDICT1: mod->HSMHV_lrdict1 = value->rValue; mod->HSMHV_lrdict1_Given = TRUE; break; case HSMHV_MOD_LRDOV13: mod->HSMHV_lrdov13 = value->rValue; mod->HSMHV_lrdov13_Given = TRUE; break; case HSMHV_MOD_LRDSLP1: mod->HSMHV_lrdslp1 = value->rValue; mod->HSMHV_lrdslp1_Given = TRUE; break; case HSMHV_MOD_LRDVB: mod->HSMHV_lrdvb = value->rValue; mod->HSMHV_lrdvb_Given = TRUE; break; case HSMHV_MOD_LRDVD: mod->HSMHV_lrdvd = value->rValue; mod->HSMHV_lrdvd_Given = TRUE; break; case HSMHV_MOD_LRDVG11: mod->HSMHV_lrdvg11 = value->rValue; mod->HSMHV_lrdvg11_Given = TRUE; break; case HSMHV_MOD_LRS: mod->HSMHV_lrs = value->rValue; mod->HSMHV_lrs_Given = TRUE; break; case HSMHV_MOD_LRTH0: mod->HSMHV_lrth0 = value->rValue; mod->HSMHV_lrth0_Given = TRUE; break; case HSMHV_MOD_LVOVER: mod->HSMHV_lvover = value->rValue; mod->HSMHV_lvover_Given = TRUE; break; /* Width dependence */ case HSMHV_MOD_WVMAX: mod->HSMHV_wvmax = value->rValue; mod->HSMHV_wvmax_Given = TRUE; break; case HSMHV_MOD_WBGTMP1: mod->HSMHV_wbgtmp1 = value->rValue; mod->HSMHV_wbgtmp1_Given = TRUE; break; case HSMHV_MOD_WBGTMP2: mod->HSMHV_wbgtmp2 = value->rValue; mod->HSMHV_wbgtmp2_Given = TRUE; break; case HSMHV_MOD_WEG0: mod->HSMHV_weg0 = value->rValue; mod->HSMHV_weg0_Given = TRUE; break; case HSMHV_MOD_WVFBOVER: mod->HSMHV_wvfbover = value->rValue; mod->HSMHV_wvfbover_Given = TRUE; break; case HSMHV_MOD_WNOVER: mod->HSMHV_wnover = value->rValue; mod->HSMHV_wnover_Given = TRUE; break; case HSMHV_MOD_WNOVERS: mod->HSMHV_wnovers = value->rValue; mod->HSMHV_wnovers_Given = TRUE; break; case HSMHV_MOD_WWL2: mod->HSMHV_wwl2 = value->rValue; mod->HSMHV_wwl2_Given = TRUE; break; case HSMHV_MOD_WVFBC: mod->HSMHV_wvfbc = value->rValue; mod->HSMHV_wvfbc_Given = TRUE; break; case HSMHV_MOD_WNSUBC: mod->HSMHV_wnsubc = value->rValue; mod->HSMHV_wnsubc_Given = TRUE; break; case HSMHV_MOD_WNSUBP: mod->HSMHV_wnsubp = value->rValue; mod->HSMHV_wnsubp_Given = TRUE; break; case HSMHV_MOD_WSCP1: mod->HSMHV_wscp1 = value->rValue; mod->HSMHV_wscp1_Given = TRUE; break; case HSMHV_MOD_WSCP2: mod->HSMHV_wscp2 = value->rValue; mod->HSMHV_wscp2_Given = TRUE; break; case HSMHV_MOD_WSCP3: mod->HSMHV_wscp3 = value->rValue; mod->HSMHV_wscp3_Given = TRUE; break; case HSMHV_MOD_WSC1: mod->HSMHV_wsc1 = value->rValue; mod->HSMHV_wsc1_Given = TRUE; break; case HSMHV_MOD_WSC2: mod->HSMHV_wsc2 = value->rValue; mod->HSMHV_wsc2_Given = TRUE; break; case HSMHV_MOD_WSC3: mod->HSMHV_wsc3 = value->rValue; mod->HSMHV_wsc3_Given = TRUE; break; case HSMHV_MOD_WPGD1: mod->HSMHV_wpgd1 = value->rValue; mod->HSMHV_wpgd1_Given = TRUE; break; case HSMHV_MOD_WPGD3: mod->HSMHV_wpgd3 = value->rValue; mod->HSMHV_wpgd3_Given = TRUE; break; case HSMHV_MOD_WNDEP: mod->HSMHV_wndep = value->rValue; mod->HSMHV_wndep_Given = TRUE; break; case HSMHV_MOD_WNINV: mod->HSMHV_wninv = value->rValue; mod->HSMHV_wninv_Given = TRUE; break; case HSMHV_MOD_WMUECB0: mod->HSMHV_wmuecb0 = value->rValue; mod->HSMHV_wmuecb0_Given = TRUE; break; case HSMHV_MOD_WMUECB1: mod->HSMHV_wmuecb1 = value->rValue; mod->HSMHV_wmuecb1_Given = TRUE; break; case HSMHV_MOD_WMUEPH1: mod->HSMHV_wmueph1 = value->rValue; mod->HSMHV_wmueph1_Given = TRUE; break; case HSMHV_MOD_WVTMP: mod->HSMHV_wvtmp = value->rValue; mod->HSMHV_wvtmp_Given = TRUE; break; case HSMHV_MOD_WWVTH0: mod->HSMHV_wwvth0 = value->rValue; mod->HSMHV_wwvth0_Given = TRUE; break; case HSMHV_MOD_WMUESR1: mod->HSMHV_wmuesr1 = value->rValue; mod->HSMHV_wmuesr1_Given = TRUE; break; case HSMHV_MOD_WMUETMP: mod->HSMHV_wmuetmp = value->rValue; mod->HSMHV_wmuetmp_Given = TRUE; break; case HSMHV_MOD_WSUB1: mod->HSMHV_wsub1 = value->rValue; mod->HSMHV_wsub1_Given = TRUE; break; case HSMHV_MOD_WSUB2: mod->HSMHV_wsub2 = value->rValue; mod->HSMHV_wsub2_Given = TRUE; break; case HSMHV_MOD_WSVDS: mod->HSMHV_wsvds = value->rValue; mod->HSMHV_wsvds_Given = TRUE; break; case HSMHV_MOD_WSVBS: mod->HSMHV_wsvbs = value->rValue; mod->HSMHV_wsvbs_Given = TRUE; break; case HSMHV_MOD_WSVGS: mod->HSMHV_wsvgs = value->rValue; mod->HSMHV_wsvgs_Given = TRUE; break; case HSMHV_MOD_WFN1: mod->HSMHV_wfn1 = value->rValue; mod->HSMHV_wfn1_Given = TRUE; break; case HSMHV_MOD_WFN2: mod->HSMHV_wfn2 = value->rValue; mod->HSMHV_wfn2_Given = TRUE; break; case HSMHV_MOD_WFN3: mod->HSMHV_wfn3 = value->rValue; mod->HSMHV_wfn3_Given = TRUE; break; case HSMHV_MOD_WFVBS: mod->HSMHV_wfvbs = value->rValue; mod->HSMHV_wfvbs_Given = TRUE; break; case HSMHV_MOD_WNSTI: mod->HSMHV_wnsti = value->rValue; mod->HSMHV_wnsti_Given = TRUE; break; case HSMHV_MOD_WWSTI: mod->HSMHV_wwsti = value->rValue; mod->HSMHV_wwsti_Given = TRUE; break; case HSMHV_MOD_WSCSTI1: mod->HSMHV_wscsti1 = value->rValue; mod->HSMHV_wscsti1_Given = TRUE; break; case HSMHV_MOD_WSCSTI2: mod->HSMHV_wscsti2 = value->rValue; mod->HSMHV_wscsti2_Given = TRUE; break; case HSMHV_MOD_WVTHSTI: mod->HSMHV_wvthsti = value->rValue; mod->HSMHV_wvthsti_Given = TRUE; break; case HSMHV_MOD_WMUESTI1: mod->HSMHV_wmuesti1 = value->rValue; mod->HSMHV_wmuesti1_Given = TRUE; break; case HSMHV_MOD_WMUESTI2: mod->HSMHV_wmuesti2 = value->rValue; mod->HSMHV_wmuesti2_Given = TRUE; break; case HSMHV_MOD_WMUESTI3: mod->HSMHV_wmuesti3 = value->rValue; mod->HSMHV_wmuesti3_Given = TRUE; break; case HSMHV_MOD_WNSUBPSTI1: mod->HSMHV_wnsubpsti1 = value->rValue; mod->HSMHV_wnsubpsti1_Given = TRUE; break; case HSMHV_MOD_WNSUBPSTI2: mod->HSMHV_wnsubpsti2 = value->rValue; mod->HSMHV_wnsubpsti2_Given = TRUE; break; case HSMHV_MOD_WNSUBPSTI3: mod->HSMHV_wnsubpsti3 = value->rValue; mod->HSMHV_wnsubpsti3_Given = TRUE; break; case HSMHV_MOD_WCGSO: mod->HSMHV_wcgso = value->rValue; mod->HSMHV_wcgso_Given = TRUE; break; case HSMHV_MOD_WCGDO: mod->HSMHV_wcgdo = value->rValue; mod->HSMHV_wcgdo_Given = TRUE; break; case HSMHV_MOD_WJS0: mod->HSMHV_wjs0 = value->rValue; mod->HSMHV_wjs0_Given = TRUE; break; case HSMHV_MOD_WJS0SW: mod->HSMHV_wjs0sw = value->rValue; mod->HSMHV_wjs0sw_Given = TRUE; break; case HSMHV_MOD_WNJ: mod->HSMHV_wnj = value->rValue; mod->HSMHV_wnj_Given = TRUE; break; case HSMHV_MOD_WCISBK: mod->HSMHV_wcisbk = value->rValue; mod->HSMHV_wcisbk_Given = TRUE; break; case HSMHV_MOD_WCLM1: mod->HSMHV_wclm1 = value->rValue; mod->HSMHV_wclm1_Given = TRUE; break; case HSMHV_MOD_WCLM2: mod->HSMHV_wclm2 = value->rValue; mod->HSMHV_wclm2_Given = TRUE; break; case HSMHV_MOD_WCLM3: mod->HSMHV_wclm3 = value->rValue; mod->HSMHV_wclm3_Given = TRUE; break; case HSMHV_MOD_WWFC: mod->HSMHV_wwfc = value->rValue; mod->HSMHV_wwfc_Given = TRUE; break; case HSMHV_MOD_WGIDL1: mod->HSMHV_wgidl1 = value->rValue; mod->HSMHV_wgidl1_Given = TRUE; break; case HSMHV_MOD_WGIDL2: mod->HSMHV_wgidl2 = value->rValue; mod->HSMHV_wgidl2_Given = TRUE; break; case HSMHV_MOD_WGLEAK1: mod->HSMHV_wgleak1 = value->rValue; mod->HSMHV_wgleak1_Given = TRUE; break; case HSMHV_MOD_WGLEAK2: mod->HSMHV_wgleak2 = value->rValue; mod->HSMHV_wgleak2_Given = TRUE; break; case HSMHV_MOD_WGLEAK3: mod->HSMHV_wgleak3 = value->rValue; mod->HSMHV_wgleak3_Given = TRUE; break; case HSMHV_MOD_WGLEAK6: mod->HSMHV_wgleak6 = value->rValue; mod->HSMHV_wgleak6_Given = TRUE; break; case HSMHV_MOD_WGLKSD1: mod->HSMHV_wglksd1 = value->rValue; mod->HSMHV_wglksd1_Given = TRUE; break; case HSMHV_MOD_WGLKSD2: mod->HSMHV_wglksd2 = value->rValue; mod->HSMHV_wglksd2_Given = TRUE; break; case HSMHV_MOD_WGLKB1: mod->HSMHV_wglkb1 = value->rValue; mod->HSMHV_wglkb1_Given = TRUE; break; case HSMHV_MOD_WGLKB2: mod->HSMHV_wglkb2 = value->rValue; mod->HSMHV_wglkb2_Given = TRUE; break; case HSMHV_MOD_WNFTRP: mod->HSMHV_wnftrp = value->rValue; mod->HSMHV_wnftrp_Given = TRUE; break; case HSMHV_MOD_WNFALP: mod->HSMHV_wnfalp = value->rValue; mod->HSMHV_wnfalp_Given = TRUE; break; case HSMHV_MOD_WPTHROU: mod->HSMHV_wpthrou = value->rValue; mod->HSMHV_wpthrou_Given = TRUE; break; case HSMHV_MOD_WVDIFFJ: mod->HSMHV_wvdiffj = value->rValue; mod->HSMHV_wvdiffj_Given = TRUE; break; case HSMHV_MOD_WIBPC1: mod->HSMHV_wibpc1 = value->rValue; mod->HSMHV_wibpc1_Given = TRUE; break; case HSMHV_MOD_WIBPC2: mod->HSMHV_wibpc2 = value->rValue; mod->HSMHV_wibpc2_Given = TRUE; break; break; case HSMHV_MOD_WCGBO: mod->HSMHV_wcgbo = value->rValue; mod->HSMHV_wcgbo_Given = TRUE; break; case HSMHV_MOD_WCVDSOVER: mod->HSMHV_wcvdsover = value->rValue; mod->HSMHV_wcvdsover_Given = TRUE; break; case HSMHV_MOD_WFALPH: mod->HSMHV_wfalph = value->rValue; mod->HSMHV_wfalph_Given = TRUE; break; case HSMHV_MOD_WNPEXT: mod->HSMHV_wnpext = value->rValue; mod->HSMHV_wnpext_Given = TRUE; break; case HSMHV_MOD_WPOWRAT: mod->HSMHV_wpowrat = value->rValue; mod->HSMHV_wpowrat_Given = TRUE; break; case HSMHV_MOD_WRD: mod->HSMHV_wrd = value->rValue; mod->HSMHV_wrd_Given = TRUE; break; case HSMHV_MOD_WRD22: mod->HSMHV_wrd22 = value->rValue; mod->HSMHV_wrd22_Given = TRUE; break; case HSMHV_MOD_WRD23: mod->HSMHV_wrd23 = value->rValue; mod->HSMHV_wrd23_Given = TRUE; break; case HSMHV_MOD_WRD24: mod->HSMHV_wrd24 = value->rValue; mod->HSMHV_wrd24_Given = TRUE; break; case HSMHV_MOD_WRDICT1: mod->HSMHV_wrdict1 = value->rValue; mod->HSMHV_wrdict1_Given = TRUE; break; case HSMHV_MOD_WRDOV13: mod->HSMHV_wrdov13 = value->rValue; mod->HSMHV_wrdov13_Given = TRUE; break; case HSMHV_MOD_WRDSLP1: mod->HSMHV_wrdslp1 = value->rValue; mod->HSMHV_wrdslp1_Given = TRUE; break; case HSMHV_MOD_WRDVB: mod->HSMHV_wrdvb = value->rValue; mod->HSMHV_wrdvb_Given = TRUE; break; case HSMHV_MOD_WRDVD: mod->HSMHV_wrdvd = value->rValue; mod->HSMHV_wrdvd_Given = TRUE; break; case HSMHV_MOD_WRDVG11: mod->HSMHV_wrdvg11 = value->rValue; mod->HSMHV_wrdvg11_Given = TRUE; break; case HSMHV_MOD_WRS: mod->HSMHV_wrs = value->rValue; mod->HSMHV_wrs_Given = TRUE; break; case HSMHV_MOD_WRTH0: mod->HSMHV_wrth0 = value->rValue; mod->HSMHV_wrth0_Given = TRUE; break; case HSMHV_MOD_WVOVER: mod->HSMHV_wvover = value->rValue; mod->HSMHV_wvover_Given = TRUE; break; /* Cross-term dependence */ case HSMHV_MOD_PVMAX: mod->HSMHV_pvmax = value->rValue; mod->HSMHV_pvmax_Given = TRUE; break; case HSMHV_MOD_PBGTMP1: mod->HSMHV_pbgtmp1 = value->rValue; mod->HSMHV_pbgtmp1_Given = TRUE; break; case HSMHV_MOD_PBGTMP2: mod->HSMHV_pbgtmp2 = value->rValue; mod->HSMHV_pbgtmp2_Given = TRUE; break; case HSMHV_MOD_PEG0: mod->HSMHV_peg0 = value->rValue; mod->HSMHV_peg0_Given = TRUE; break; case HSMHV_MOD_PVFBOVER: mod->HSMHV_pvfbover = value->rValue; mod->HSMHV_pvfbover_Given = TRUE; break; case HSMHV_MOD_PNOVER: mod->HSMHV_pnover = value->rValue; mod->HSMHV_pnover_Given = TRUE; break; case HSMHV_MOD_PNOVERS: mod->HSMHV_pnovers = value->rValue; mod->HSMHV_pnovers_Given = TRUE; break; case HSMHV_MOD_PWL2: mod->HSMHV_pwl2 = value->rValue; mod->HSMHV_pwl2_Given = TRUE; break; case HSMHV_MOD_PVFBC: mod->HSMHV_pvfbc = value->rValue; mod->HSMHV_pvfbc_Given = TRUE; break; case HSMHV_MOD_PNSUBC: mod->HSMHV_pnsubc = value->rValue; mod->HSMHV_pnsubc_Given = TRUE; break; case HSMHV_MOD_PNSUBP: mod->HSMHV_pnsubp = value->rValue; mod->HSMHV_pnsubp_Given = TRUE; break; case HSMHV_MOD_PSCP1: mod->HSMHV_pscp1 = value->rValue; mod->HSMHV_pscp1_Given = TRUE; break; case HSMHV_MOD_PSCP2: mod->HSMHV_pscp2 = value->rValue; mod->HSMHV_pscp2_Given = TRUE; break; case HSMHV_MOD_PSCP3: mod->HSMHV_pscp3 = value->rValue; mod->HSMHV_pscp3_Given = TRUE; break; case HSMHV_MOD_PSC1: mod->HSMHV_psc1 = value->rValue; mod->HSMHV_psc1_Given = TRUE; break; case HSMHV_MOD_PSC2: mod->HSMHV_psc2 = value->rValue; mod->HSMHV_psc2_Given = TRUE; break; case HSMHV_MOD_PSC3: mod->HSMHV_psc3 = value->rValue; mod->HSMHV_psc3_Given = TRUE; break; case HSMHV_MOD_PPGD1: mod->HSMHV_ppgd1 = value->rValue; mod->HSMHV_ppgd1_Given = TRUE; break; case HSMHV_MOD_PPGD3: mod->HSMHV_ppgd3 = value->rValue; mod->HSMHV_ppgd3_Given = TRUE; break; case HSMHV_MOD_PNDEP: mod->HSMHV_pndep = value->rValue; mod->HSMHV_pndep_Given = TRUE; break; case HSMHV_MOD_PNINV: mod->HSMHV_pninv = value->rValue; mod->HSMHV_pninv_Given = TRUE; break; case HSMHV_MOD_PMUECB0: mod->HSMHV_pmuecb0 = value->rValue; mod->HSMHV_pmuecb0_Given = TRUE; break; case HSMHV_MOD_PMUECB1: mod->HSMHV_pmuecb1 = value->rValue; mod->HSMHV_pmuecb1_Given = TRUE; break; case HSMHV_MOD_PMUEPH1: mod->HSMHV_pmueph1 = value->rValue; mod->HSMHV_pmueph1_Given = TRUE; break; case HSMHV_MOD_PVTMP: mod->HSMHV_pvtmp = value->rValue; mod->HSMHV_pvtmp_Given = TRUE; break; case HSMHV_MOD_PWVTH0: mod->HSMHV_pwvth0 = value->rValue; mod->HSMHV_pwvth0_Given = TRUE; break; case HSMHV_MOD_PMUESR1: mod->HSMHV_pmuesr1 = value->rValue; mod->HSMHV_pmuesr1_Given = TRUE; break; case HSMHV_MOD_PMUETMP: mod->HSMHV_pmuetmp = value->rValue; mod->HSMHV_pmuetmp_Given = TRUE; break; case HSMHV_MOD_PSUB1: mod->HSMHV_psub1 = value->rValue; mod->HSMHV_psub1_Given = TRUE; break; case HSMHV_MOD_PSUB2: mod->HSMHV_psub2 = value->rValue; mod->HSMHV_psub2_Given = TRUE; break; case HSMHV_MOD_PSVDS: mod->HSMHV_psvds = value->rValue; mod->HSMHV_psvds_Given = TRUE; break; case HSMHV_MOD_PSVBS: mod->HSMHV_psvbs = value->rValue; mod->HSMHV_psvbs_Given = TRUE; break; case HSMHV_MOD_PSVGS: mod->HSMHV_psvgs = value->rValue; mod->HSMHV_psvgs_Given = TRUE; break; case HSMHV_MOD_PFN1: mod->HSMHV_pfn1 = value->rValue; mod->HSMHV_pfn1_Given = TRUE; break; case HSMHV_MOD_PFN2: mod->HSMHV_pfn2 = value->rValue; mod->HSMHV_pfn2_Given = TRUE; break; case HSMHV_MOD_PFN3: mod->HSMHV_pfn3 = value->rValue; mod->HSMHV_pfn3_Given = TRUE; break; case HSMHV_MOD_PFVBS: mod->HSMHV_pfvbs = value->rValue; mod->HSMHV_pfvbs_Given = TRUE; break; case HSMHV_MOD_PNSTI: mod->HSMHV_pnsti = value->rValue; mod->HSMHV_pnsti_Given = TRUE; break; case HSMHV_MOD_PWSTI: mod->HSMHV_pwsti = value->rValue; mod->HSMHV_pwsti_Given = TRUE; break; case HSMHV_MOD_PSCSTI1: mod->HSMHV_pscsti1 = value->rValue; mod->HSMHV_pscsti1_Given = TRUE; break; case HSMHV_MOD_PSCSTI2: mod->HSMHV_pscsti2 = value->rValue; mod->HSMHV_pscsti2_Given = TRUE; break; case HSMHV_MOD_PVTHSTI: mod->HSMHV_pvthsti = value->rValue; mod->HSMHV_pvthsti_Given = TRUE; break; case HSMHV_MOD_PMUESTI1: mod->HSMHV_pmuesti1 = value->rValue; mod->HSMHV_pmuesti1_Given = TRUE; break; case HSMHV_MOD_PMUESTI2: mod->HSMHV_pmuesti2 = value->rValue; mod->HSMHV_pmuesti2_Given = TRUE; break; case HSMHV_MOD_PMUESTI3: mod->HSMHV_pmuesti3 = value->rValue; mod->HSMHV_pmuesti3_Given = TRUE; break; case HSMHV_MOD_PNSUBPSTI1: mod->HSMHV_pnsubpsti1 = value->rValue; mod->HSMHV_pnsubpsti1_Given = TRUE; break; case HSMHV_MOD_PNSUBPSTI2: mod->HSMHV_pnsubpsti2 = value->rValue; mod->HSMHV_pnsubpsti2_Given = TRUE; break; case HSMHV_MOD_PNSUBPSTI3: mod->HSMHV_pnsubpsti3 = value->rValue; mod->HSMHV_pnsubpsti3_Given = TRUE; break; case HSMHV_MOD_PCGSO: mod->HSMHV_pcgso = value->rValue; mod->HSMHV_pcgso_Given = TRUE; break; case HSMHV_MOD_PCGDO: mod->HSMHV_pcgdo = value->rValue; mod->HSMHV_pcgdo_Given = TRUE; break; case HSMHV_MOD_PJS0: mod->HSMHV_pjs0 = value->rValue; mod->HSMHV_pjs0_Given = TRUE; break; case HSMHV_MOD_PJS0SW: mod->HSMHV_pjs0sw = value->rValue; mod->HSMHV_pjs0sw_Given = TRUE; break; case HSMHV_MOD_PNJ: mod->HSMHV_pnj = value->rValue; mod->HSMHV_pnj_Given = TRUE; break; case HSMHV_MOD_PCISBK: mod->HSMHV_pcisbk = value->rValue; mod->HSMHV_pcisbk_Given = TRUE; break; case HSMHV_MOD_PCLM1: mod->HSMHV_pclm1 = value->rValue; mod->HSMHV_pclm1_Given = TRUE; break; case HSMHV_MOD_PCLM2: mod->HSMHV_pclm2 = value->rValue; mod->HSMHV_pclm2_Given = TRUE; break; case HSMHV_MOD_PCLM3: mod->HSMHV_pclm3 = value->rValue; mod->HSMHV_pclm3_Given = TRUE; break; case HSMHV_MOD_PWFC: mod->HSMHV_pwfc = value->rValue; mod->HSMHV_pwfc_Given = TRUE; break; case HSMHV_MOD_PGIDL1: mod->HSMHV_pgidl1 = value->rValue; mod->HSMHV_pgidl1_Given = TRUE; break; case HSMHV_MOD_PGIDL2: mod->HSMHV_pgidl2 = value->rValue; mod->HSMHV_pgidl2_Given = TRUE; break; case HSMHV_MOD_PGLEAK1: mod->HSMHV_pgleak1 = value->rValue; mod->HSMHV_pgleak1_Given = TRUE; break; case HSMHV_MOD_PGLEAK2: mod->HSMHV_pgleak2 = value->rValue; mod->HSMHV_pgleak2_Given = TRUE; break; case HSMHV_MOD_PGLEAK3: mod->HSMHV_pgleak3 = value->rValue; mod->HSMHV_pgleak3_Given = TRUE; break; case HSMHV_MOD_PGLEAK6: mod->HSMHV_pgleak6 = value->rValue; mod->HSMHV_pgleak6_Given = TRUE; break; case HSMHV_MOD_PGLKSD1: mod->HSMHV_pglksd1 = value->rValue; mod->HSMHV_pglksd1_Given = TRUE; break; case HSMHV_MOD_PGLKSD2: mod->HSMHV_pglksd2 = value->rValue; mod->HSMHV_pglksd2_Given = TRUE; break; case HSMHV_MOD_PGLKB1: mod->HSMHV_pglkb1 = value->rValue; mod->HSMHV_pglkb1_Given = TRUE; break; case HSMHV_MOD_PGLKB2: mod->HSMHV_pglkb2 = value->rValue; mod->HSMHV_pglkb2_Given = TRUE; break; case HSMHV_MOD_PNFTRP: mod->HSMHV_pnftrp = value->rValue; mod->HSMHV_pnftrp_Given = TRUE; break; case HSMHV_MOD_PNFALP: mod->HSMHV_pnfalp = value->rValue; mod->HSMHV_pnfalp_Given = TRUE; break; case HSMHV_MOD_PPTHROU: mod->HSMHV_ppthrou = value->rValue; mod->HSMHV_ppthrou_Given = TRUE; break; case HSMHV_MOD_PVDIFFJ: mod->HSMHV_pvdiffj = value->rValue; mod->HSMHV_pvdiffj_Given = TRUE; break; case HSMHV_MOD_PIBPC1: mod->HSMHV_pibpc1 = value->rValue; mod->HSMHV_pibpc1_Given = TRUE; break; case HSMHV_MOD_PIBPC2: mod->HSMHV_pibpc2 = value->rValue; mod->HSMHV_pibpc2_Given = TRUE; break; break; case HSMHV_MOD_PCGBO: mod->HSMHV_pcgbo = value->rValue; mod->HSMHV_pcgbo_Given = TRUE; break; case HSMHV_MOD_PCVDSOVER: mod->HSMHV_pcvdsover = value->rValue; mod->HSMHV_pcvdsover_Given = TRUE; break; case HSMHV_MOD_PFALPH: mod->HSMHV_pfalph = value->rValue; mod->HSMHV_pfalph_Given = TRUE; break; case HSMHV_MOD_PNPEXT: mod->HSMHV_pnpext = value->rValue; mod->HSMHV_pnpext_Given = TRUE; break; case HSMHV_MOD_PPOWRAT: mod->HSMHV_ppowrat = value->rValue; mod->HSMHV_ppowrat_Given = TRUE; break; case HSMHV_MOD_PRD: mod->HSMHV_prd = value->rValue; mod->HSMHV_prd_Given = TRUE; break; case HSMHV_MOD_PRD22: mod->HSMHV_prd22 = value->rValue; mod->HSMHV_prd22_Given = TRUE; break; case HSMHV_MOD_PRD23: mod->HSMHV_prd23 = value->rValue; mod->HSMHV_prd23_Given = TRUE; break; case HSMHV_MOD_PRD24: mod->HSMHV_prd24 = value->rValue; mod->HSMHV_prd24_Given = TRUE; break; case HSMHV_MOD_PRDICT1: mod->HSMHV_prdict1 = value->rValue; mod->HSMHV_prdict1_Given = TRUE; break; case HSMHV_MOD_PRDOV13: mod->HSMHV_prdov13 = value->rValue; mod->HSMHV_prdov13_Given = TRUE; break; case HSMHV_MOD_PRDSLP1: mod->HSMHV_prdslp1 = value->rValue; mod->HSMHV_prdslp1_Given = TRUE; break; case HSMHV_MOD_PRDVB: mod->HSMHV_prdvb = value->rValue; mod->HSMHV_prdvb_Given = TRUE; break; case HSMHV_MOD_PRDVD: mod->HSMHV_prdvd = value->rValue; mod->HSMHV_prdvd_Given = TRUE; break; case HSMHV_MOD_PRDVG11: mod->HSMHV_prdvg11 = value->rValue; mod->HSMHV_prdvg11_Given = TRUE; break; case HSMHV_MOD_PRS: mod->HSMHV_prs = value->rValue; mod->HSMHV_prs_Given = TRUE; break; case HSMHV_MOD_PRTH0: mod->HSMHV_prth0 = value->rValue; mod->HSMHV_prth0_Given = TRUE; break; case HSMHV_MOD_PVOVER: mod->HSMHV_pvover = value->rValue; mod->HSMHV_pvover_Given = TRUE; break; case HSMHV_MOD_VGS_MAX: mod->HSMHVvgsMax = value->rValue; mod->HSMHVvgsMaxGiven = TRUE; break; case HSMHV_MOD_VGD_MAX: mod->HSMHVvgdMax = value->rValue; mod->HSMHVvgdMaxGiven = TRUE; break; case HSMHV_MOD_VGB_MAX: mod->HSMHVvgbMax = value->rValue; mod->HSMHVvgbMaxGiven = TRUE; break; case HSMHV_MOD_VDS_MAX: mod->HSMHVvdsMax = value->rValue; mod->HSMHVvdsMaxGiven = TRUE; break; case HSMHV_MOD_VBS_MAX: mod->HSMHVvbsMax = value->rValue; mod->HSMHVvbsMaxGiven = TRUE; break; case HSMHV_MOD_VBD_MAX: mod->HSMHVvbdMax = value->rValue; mod->HSMHVvbdMaxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hisimhv1/hsmhvcvtest.c0000644000265600020320000002742112264261473022514 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM_HV ( VERSION : 1 SUBVERSION : 2 REVISION : 3 ) Model Parameter VERSION : 1.23 FILE : hsmhvcvtest.c DATE : 2012.4.6 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsmhvdef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSMHVconvTest( GENmodel *inModel, register CKTcircuit *ckt) { register HSMHVmodel *model = (HSMHVmodel*)inModel; register HSMHVinstance *here; double vds=0.0, vgs=0.0, vbs=0.0, vdse=0.0, vgse=0.0, vbse=0.0, vdbd=0.0, vsbs=0.0, deltemp =0.0 ; double delvds=0.0, delvgs=0.0, delvbs=0.0, delvdse=0.0, delvgse=0.0, delvbse=0.0, delvdbd=0.0, delvsbs=0.0, deldeltemp =0.0 ; double Ids=0.0, gds=0.0, gm=0.0, gmbs=0.0, gmT=0.0, gmbs_ext=0.0, gds_ext=0.0, gm_ext=0.0, Isub=0.0, dIsub_dVds=0.0, dIsub_dVgs=0.0, dIsub_dVbs=0.0, dIsub_dT=0.0, Isubs=0.0, dIsubs_dVds=0.0, dIsubs_dVgs=0.0, dIsubs_dVbs=0.0, dIsubs_dT=0.0, Igidl=0.0, dIgidl_dVds=0.0, dIgidl_dVgs=0.0, dIgidl_dVbs=0.0, dIgidl_dT=0.0, Igisl=0.0, dIgisl_dVds=0.0, dIgisl_dVgs=0.0, dIgisl_dVbs=0.0, dIgisl_dT=0.0, Igd=0.0, dIgd_dVd=0.0, dIgd_dVg=0.0, dIgd_dVb=0.0, dIgd_dT=0.0, Igs=0.0, dIgs_dVd=0.0, dIgs_dVg=0.0, dIgs_dVb=0.0, dIgs_dT=0.0, Igb=0.0, dIgb_dVd=0.0, dIgb_dVg=0.0, dIgb_dVb=0.0, dIgb_dT=0.0, Ibd=0.0, Gbd=0.0, Gbdt=0.0, Ibs=0.0, Gbs=0.0, Gbst =0.0 ; double i_dP=0.0, i_gP=0.0, i_sP=0.0, i_db=0.0, i_sb=0.0, i_dP_hat=0.0, i_gP_hat=0.0, i_sP_hat=0.0, i_db_hat=0.0, i_sb_hat =0.0 ; double tol0=0.0, tol1=0.0, tol2=0.0, tol3=0.0, tol4 =0.0 ; /* loop through all the HSMHV device models */ for ( ; model != NULL; model = model->HSMHVnextModel ) { /* loop through all the instances of the model */ for ( here = model->HSMHVinstances; here != NULL ; here = here->HSMHVnextInstance ) { vds = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vgs = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vbs = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNodePrime)); vdse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVdNode) - *(ckt->CKTrhsOld+here->HSMHVsNode)); vgse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVgNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNode)); vbse = model->HSMHV_type * (*(ckt->CKTrhsOld+here->HSMHVbNodePrime) - *(ckt->CKTrhsOld+here->HSMHVsNode)); vdbd = model->HSMHV_type * (*(ckt->CKTrhsOld + here->HSMHVdbNode) - *(ckt->CKTrhsOld + here->HSMHVdNode)); vsbs = model->HSMHV_type * (*(ckt->CKTrhsOld + here->HSMHVsbNode) - *(ckt->CKTrhsOld + here->HSMHVsNode)); if( here->HSMHVtempNode > 0 ){ deltemp = *(ckt->CKTrhsOld + here->HSMHVtempNode); } else { deltemp = 0.0 ; } delvds = vds - *(ckt->CKTstate0 + here->HSMHVvds) ; delvgs = vgs - *(ckt->CKTstate0 + here->HSMHVvgs) ; delvbs = vbs - *(ckt->CKTstate0 + here->HSMHVvbs) ; delvdse = vdse - *(ckt->CKTstate0 + here->HSMHVvdse) ; delvgse = vgse - *(ckt->CKTstate0 + here->HSMHVvgse) ; delvbse = vbse - *(ckt->CKTstate0 + here->HSMHVvbse) ; delvdbd = vdbd - *(ckt->CKTstate0 + here->HSMHVvdbd) ; delvsbs = vsbs - *(ckt->CKTstate0 + here->HSMHVvsbs) ; if( here->HSMHVtempNode > 0 ){ deldeltemp = deltemp - *(ckt->CKTstate0 + here->HSMHVdeltemp) ; } else { deldeltemp = 0.0 ; } if ( here->HSMHV_mode > 0 ) { /* forward mode */ Ids = here->HSMHV_ids ; gds = here->HSMHV_dIds_dVdsi ; gm = here->HSMHV_dIds_dVgsi ; gmbs = here->HSMHV_dIds_dVbsi ; gmT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIds_dTi : 0.0 ; gmbs_ext = here->HSMHV_dIds_dVbse; gds_ext = here->HSMHV_dIds_dVdse ; gm_ext = here->HSMHV_dIds_dVgse; Isub = here->HSMHV_isub ; dIsub_dVds = here->HSMHV_dIsub_dVdsi ; dIsub_dVgs = here->HSMHV_dIsub_dVgsi ; dIsub_dVbs = here->HSMHV_dIsub_dVbsi ; dIsub_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; Isubs = 0.0 ; dIsubs_dVds = 0.0 ; dIsubs_dVgs = 0.0 ; dIsubs_dVbs = 0.0 ; dIsubs_dT = 0.0 ; Igidl = here->HSMHV_igidl ; dIgidl_dVds = here->HSMHV_dIgidl_dVdsi ; dIgidl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgidl_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; Igisl = here->HSMHV_igisl ; dIgisl_dVds = here->HSMHV_dIgisl_dVdsi ; dIgisl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgisl_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igd = here->HSMHV_igd ; dIgd_dVd = here->HSMHV_dIgd_dVdsi ; dIgd_dVg = here->HSMHV_dIgd_dVgsi ; dIgd_dVb = here->HSMHV_dIgd_dVbsi ; dIgd_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = here->HSMHV_dIgs_dVdsi ; dIgs_dVg = here->HSMHV_dIgs_dVgsi ; dIgs_dVb = here->HSMHV_dIgs_dVbsi ; dIgs_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = here->HSMHV_dIgb_dVdsi ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (here->HSMHVtempNode > 0) ? here->HSMHV_gbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (here->HSMHVtempNode > 0) ? here->HSMHV_gbsT : 0.0 ; } else { /* reverse mode */ Ids = - here->HSMHV_ids ; gds = + (here->HSMHV_dIds_dVdsi + here->HSMHV_dIds_dVgsi + here->HSMHV_dIds_dVbsi) ; gm = - here->HSMHV_dIds_dVgsi ; gmbs = - here->HSMHV_dIds_dVbsi ; gmT = (here->HSMHVtempNode > 0) ? - here->HSMHV_dIds_dTi : 0.0 ; gds_ext = + (here->HSMHV_dIds_dVdse + here->HSMHV_dIds_dVgse + here->HSMHV_dIds_dVbse) ; gm_ext = - here->HSMHV_dIds_dVgse; gmbs_ext = - here->HSMHV_dIds_dVbse; Isub = 0.0 ; dIsub_dVds = 0.0 ; dIsub_dVgs = 0.0 ; dIsub_dVbs = 0.0 ; dIsub_dT = 0.0 ; Isubs = here->HSMHV_isub ; dIsubs_dVds = - (here->HSMHV_dIsub_dVdsi + here->HSMHV_dIsub_dVgsi + here->HSMHV_dIsub_dVbsi) ; dIsubs_dVgs = here->HSMHV_dIsub_dVgsi ; dIsubs_dVbs = here->HSMHV_dIsub_dVbsi ; dIsubs_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIsub_dTi : 0.0 ; Igidl = here->HSMHV_igisl ; dIgidl_dVds = - (here->HSMHV_dIgisl_dVdsi + here->HSMHV_dIgisl_dVgsi + here->HSMHV_dIgisl_dVbsi) ; dIgidl_dVgs = here->HSMHV_dIgisl_dVgsi ; dIgidl_dVbs = here->HSMHV_dIgisl_dVbsi ; dIgidl_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgisl_dTi : 0.0 ; Igisl = here->HSMHV_igidl ; dIgisl_dVds = - (here->HSMHV_dIgidl_dVdsi + here->HSMHV_dIgidl_dVgsi + here->HSMHV_dIgidl_dVbsi) ; dIgisl_dVgs = here->HSMHV_dIgidl_dVgsi ; dIgisl_dVbs = here->HSMHV_dIgidl_dVbsi ; dIgisl_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgidl_dTi : 0.0 ; Igd = here->HSMHV_igd ; dIgd_dVd = - (here->HSMHV_dIgs_dVdsi + here->HSMHV_dIgs_dVgsi + here->HSMHV_dIgs_dVbsi) ; dIgd_dVg = here->HSMHV_dIgs_dVgsi ; dIgd_dVb = here->HSMHV_dIgs_dVbsi ; dIgd_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgs_dTi : 0.0 ; Igs = here->HSMHV_igs ; dIgs_dVd = - (here->HSMHV_dIgd_dVdsi + here->HSMHV_dIgd_dVgsi + here->HSMHV_dIgd_dVbsi) ; dIgs_dVg = here->HSMHV_dIgd_dVgsi ; dIgs_dVb = here->HSMHV_dIgd_dVbsi ; dIgs_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgd_dTi : 0.0 ; Igb = here->HSMHV_igb ; dIgb_dVd = - (here->HSMHV_dIgb_dVdsi + here->HSMHV_dIgb_dVgsi + here->HSMHV_dIgb_dVbsi) ; dIgb_dVg = here->HSMHV_dIgb_dVgsi ; dIgb_dVb = here->HSMHV_dIgb_dVbsi ; dIgb_dT = (here->HSMHVtempNode > 0) ? here->HSMHV_dIgb_dTi : 0.0 ; Ibd = here->HSMHV_ibd ; Gbd = here->HSMHV_gbd ; Gbdt = (here->HSMHVtempNode > 0) ? here->HSMHV_gbdT : 0.0 ; Ibs = here->HSMHV_ibs ; Gbs = here->HSMHV_gbs ; Gbst = (here->HSMHVtempNode > 0) ? here->HSMHV_gbsT : 0.0 ; } /* end of reverse mode */ /* for convergence control, only nonlinear static currents are considered: */ i_dP = Ids + Isub + Igidl - Igd ; i_dP_hat = i_dP + gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp + dIsub_dVgs *delvgs + dIsub_dVds *delvds + dIsub_dVbs *delvbs + dIsub_dT *deldeltemp + dIgidl_dVgs*delvgs + dIgidl_dVds*delvds + dIgidl_dVbs*delvbs + dIgidl_dT*deldeltemp -(dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp) + gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse ; i_gP = Igd + Igs + Igb ; i_gP_hat = i_gP + dIgd_dVg *delvgs + dIgd_dVd *delvds + dIgd_dVb *delvbs + dIgd_dT *deldeltemp + dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp + dIgb_dVg *delvgs + dIgb_dVd *delvds + dIgb_dVb *delvbs + dIgb_dT *deldeltemp ; i_sP =-Ids + Isubs + Igisl - Igs ; i_sP_hat = i_sP -(gm *delvgs + gds *delvds + gmbs *delvbs + gmT *deldeltemp) + dIsubs_dVgs*delvgs + dIsubs_dVds*delvds + dIsubs_dVbs*delvbs + dIsubs_dT*deldeltemp + dIgisl_dVgs*delvgs + dIgisl_dVds*delvds + dIgisl_dVbs*delvbs + dIgisl_dT*deldeltemp -(dIgs_dVg *delvgs + dIgs_dVd *delvds + dIgs_dVb *delvbs + dIgs_dT *deldeltemp) -(gm_ext *delvgse + gds_ext *delvdse + gmbs_ext *delvbse) ; i_db = Ibd ; i_db_hat = i_db + Gbd*delvdbd + Gbdt*deldeltemp ; i_sb = Ibs ; i_sb_hat = i_sb + Gbs*delvsbs + Gbst*deldeltemp ; /* to be added: power source for thermal network */ /* * check convergence */ if ( here->HSMHV_off == 0 || !(ckt->CKTmode & MODEINITFIX) ) { tol0 = ckt->CKTreltol * MAX(fabs(i_dP_hat), fabs(i_dP)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(i_gP_hat), fabs(i_gP)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(i_sP_hat), fabs(i_sP)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(i_db_hat), fabs(i_db)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(i_sb_hat), fabs(i_sb)) + ckt->CKTabstol; if ( (fabs(i_dP_hat - i_dP) >= tol0) || (fabs(i_gP_hat - i_gP) >= tol1) || (fabs(i_sP_hat - i_sP) >= tol2) || (fabs(i_db_hat - i_db) >= tol3) || (fabs(i_sb_hat - i_sb) >= tol4) ) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/0000755000265600020320000000000012264261706020446 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdcheck.c0000644000265600020320000007020012264261473023153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdcheck.c 98/5/01 Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Pin Su 00/3/1 Modified by Pin Su and Hui Wan 02/3/5 Modifies by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B3SOIPDcheckModel(B3SOIPDmodel *model, B3SOIPDinstance *here, CKTcircuit *ckt) { struct b3soipdSizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3soipdv223check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "B3SOIPDV223 Parameter Check\n"); fprintf(fplog, "Model = %s\n", model->B3SOIPDmodName); fprintf(fplog, "W = %g, L = %g, M = %g\n", here->B3SOIPDw, here->B3SOIPDl, here->B3SOIPDm); if (pParam->B3SOIPDnlx < -pParam->B3SOIPDleff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIPDnlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIPDnlx); Fatal_Flag = 1; } if (model->B3SOIPDtox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->B3SOIPDtox); printf("Fatal: Tox = %g is not positive.\n", model->B3SOIPDtox); Fatal_Flag = 1; } /* v2.2.3 */ if (model->B3SOIPDtox - model->B3SOIPDdtoxcv <= 0.0) { fprintf(fplog, "Fatal: Tox - dtoxcv = %g is not positive.\n", model->B3SOIPDtox - model->B3SOIPDdtoxcv); printf("Fatal: Tox - dtoxcv = %g is not positive.\n", model->B3SOIPDtox - model->B3SOIPDdtoxcv); Fatal_Flag = 1; } if (model->B3SOIPDtbox <= 0.0) { fprintf(fplog, "Fatal: Tbox = %g is not positive.\n", model->B3SOIPDtbox); printf("Fatal: Tbox = %g is not positive.\n", model->B3SOIPDtbox); Fatal_Flag = 1; } if (pParam->B3SOIPDnpeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->B3SOIPDnpeak); printf("Fatal: Nch = %g is not positive.\n", pParam->B3SOIPDnpeak); Fatal_Flag = 1; } if (pParam->B3SOIPDngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->B3SOIPDngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->B3SOIPDngate); Fatal_Flag = 1; } if (pParam->B3SOIPDngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->B3SOIPDngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->B3SOIPDngate); Fatal_Flag = 1; } if (pParam->B3SOIPDdvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIPDdvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIPDdvt1); Fatal_Flag = 1; } if (pParam->B3SOIPDdvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIPDdvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIPDdvt1w); Fatal_Flag = 1; } if (pParam->B3SOIPDw0 == -pParam->B3SOIPDweff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIPDdsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->B3SOIPDdsub); printf("Fatal: Dsub = %g is negative.\n", pParam->B3SOIPDdsub); Fatal_Flag = 1; } if (pParam->B3SOIPDb1 == -pParam->B3SOIPDweff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIPDu0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIPDu0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIPDu0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->B3SOIPDdelta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->B3SOIPDdelta); printf("Fatal: Delta = %g is less than zero.\n", pParam->B3SOIPDdelta); Fatal_Flag = 1; } if (pParam->B3SOIPDvsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIPDvsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIPDvsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->B3SOIPDpclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->B3SOIPDpclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->B3SOIPDpclm); Fatal_Flag = 1; } if (pParam->B3SOIPDdrout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->B3SOIPDdrout); printf("Fatal: Drout = %g is negative.\n", pParam->B3SOIPDdrout); Fatal_Flag = 1; } if ( model->B3SOIPDunitLengthGateSidewallJctCap > 0.0) { if (here->B3SOIPDdrainPerimeter < pParam->B3SOIPDweff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->B3SOIPDdrainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->B3SOIPDdrainPerimeter); here->B3SOIPDdrainPerimeter =pParam->B3SOIPDweff; } if (here->B3SOIPDsourcePerimeter < pParam->B3SOIPDweff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->B3SOIPDsourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->B3SOIPDsourcePerimeter); here->B3SOIPDsourcePerimeter =pParam->B3SOIPDweff; } } /* Check capacitance parameters */ if (pParam->B3SOIPDclc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->B3SOIPDclc); printf("Fatal: Clc = %g is negative.\n", pParam->B3SOIPDclc); Fatal_Flag = 1; } /* v2.2.3 */ if (pParam->B3SOIPDmoin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->B3SOIPDmoin); printf("Warning: Moin = %g is too small.\n", pParam->B3SOIPDmoin); } if (pParam->B3SOIPDmoin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->B3SOIPDmoin); printf("Warning: Moin = %g is too large.\n", pParam->B3SOIPDmoin); } if (model->B3SOIPDcapMod == 3) { if (pParam->B3SOIPDacde < 0.4) { fprintf (fplog, "Warning: Acde = %g is too small.\n", pParam->B3SOIPDacde); printf ("Warning: Acde = %g is too small.\n", pParam->B3SOIPDacde); } if (pParam->B3SOIPDacde > 1.6) { fprintf (fplog, "Warning: Acde = %g is too large.\n", pParam->B3SOIPDacde); printf ("Warning: Acde = %g is too large.\n", pParam->B3SOIPDacde); } } /* v2.2.3 */ if (model->B3SOIPDparamChk ==1) { /* Check L and W parameters */ if (pParam->B3SOIPDleff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->B3SOIPDleff); printf("Warning: Leff = %g may be too small.\n", pParam->B3SOIPDleff); } if (pParam->B3SOIPDleffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIPDleffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIPDleffCV); } if (pParam->B3SOIPDweff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->B3SOIPDweff); printf("Warning: Weff = %g may be too small.\n", pParam->B3SOIPDweff); } if (pParam->B3SOIPDweffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIPDweffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIPDweffCV); } /* Check threshold voltage parameters */ if (pParam->B3SOIPDnlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->B3SOIPDnlx); printf("Warning: Nlx = %g is negative.\n", pParam->B3SOIPDnlx); } if (model->B3SOIPDtox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->B3SOIPDtox); printf("Warning: Tox = %g is less than 10A.\n", model->B3SOIPDtox); } if (pParam->B3SOIPDnpeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->B3SOIPDnpeak); printf("Warning: Nch = %g may be too small.\n", pParam->B3SOIPDnpeak); } else if (pParam->B3SOIPDnpeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->B3SOIPDnpeak); printf("Warning: Nch = %g may be too large.\n", pParam->B3SOIPDnpeak); } if (fabs(pParam->B3SOIPDnsub) >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->B3SOIPDnsub); printf("Warning: Nsub = %g may be too large.\n", pParam->B3SOIPDnsub); } if ((pParam->B3SOIPDngate > 0.0) && (pParam->B3SOIPDngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIPDngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIPDngate); } if (pParam->B3SOIPDdvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->B3SOIPDdvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->B3SOIPDdvt0); } if (fabs(1.0e-6 / (pParam->B3SOIPDw0 + pParam->B3SOIPDweff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->B3SOIPDnfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->B3SOIPDnfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->B3SOIPDnfactor); } if (pParam->B3SOIPDcdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->B3SOIPDcdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->B3SOIPDcdsc); } if (pParam->B3SOIPDcdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->B3SOIPDcdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->B3SOIPDcdscd); } /* Check DIBL parameters */ if (pParam->B3SOIPDeta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->B3SOIPDeta0); printf("Warning: Eta0 = %g is negative.\n", pParam->B3SOIPDeta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->B3SOIPDb1 + pParam->B3SOIPDweff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->B3SOIPDa2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIPDa2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIPDa2); pParam->B3SOIPDa2 = 0.01; } else if (pParam->B3SOIPDa2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIPDa2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIPDa2); pParam->B3SOIPDa2 = 1.0; pParam->B3SOIPDa1 = 0.0; } if (pParam->B3SOIPDrdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIPDrdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIPDrdsw); pParam->B3SOIPDrdsw = 0.0; pParam->B3SOIPDrds0 = 0.0; } else if ((pParam->B3SOIPDrds0 > 0.0) && (pParam->B3SOIPDrds0 < 0.001)) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIPDrds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIPDrds0); pParam->B3SOIPDrds0 = 0.0; } if (pParam->B3SOIPDvsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIPDvsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIPDvsattemp); } if (pParam->B3SOIPDpdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIPDpdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIPDpdibl1); } if (pParam->B3SOIPDpdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIPDpdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIPDpdibl2); } /* Check overlap capacitance parameters */ if (model->B3SOIPDcgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIPDcgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIPDcgdo); model->B3SOIPDcgdo = 0.0; } if (model->B3SOIPDcgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIPDcgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIPDcgso); model->B3SOIPDcgso = 0.0; } if (model->B3SOIPDcgeo < 0.0) { fprintf(fplog, "Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIPDcgeo); printf("Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIPDcgeo); model->B3SOIPDcgeo = 0.0; } if (model->B3SOIPDntun < 0.0) { fprintf(fplog, "Warning: Ntun = %g is negative.\n", model->B3SOIPDntun); printf("Warning: Ntun = %g is negative.\n", model->B3SOIPDntun); } if (model->B3SOIPDndiode < 0.0) { fprintf(fplog, "Warning: Ndiode = %g is negative.\n", model->B3SOIPDndiode); printf("Warning: Ndiode = %g is negative.\n", model->B3SOIPDndiode); } if (model->B3SOIPDisbjt < 0.0) { fprintf(fplog, "Warning: Isbjt = %g is negative.\n", model->B3SOIPDisbjt); printf("Warning: Isbjt = %g is negative.\n", model->B3SOIPDisbjt); } if (model->B3SOIPDisdif < 0.0) { fprintf(fplog, "Warning: Isdif = %g is negative.\n", model->B3SOIPDisdif); printf("Warning: Isdif = %g is negative.\n", model->B3SOIPDisdif); } if (model->B3SOIPDisrec < 0.0) { fprintf(fplog, "Warning: Isrec = %g is negative.\n", model->B3SOIPDisrec); printf("Warning: Isrec = %g is negative.\n", model->B3SOIPDisrec); } if (model->B3SOIPDistun < 0.0) { fprintf(fplog, "Warning: Istun = %g is negative.\n", model->B3SOIPDistun); printf("Warning: Istun = %g is negative.\n", model->B3SOIPDistun); } if (model->B3SOIPDtt < 0.0) { fprintf(fplog, "Warning: Tt = %g is negative.\n", model->B3SOIPDtt); printf("Warning: Tt = %g is negative.\n", model->B3SOIPDtt); } if (model->B3SOIPDcsdmin < 0.0) { fprintf(fplog, "Warning: Csdmin = %g is negative.\n", model->B3SOIPDcsdmin); printf("Warning: Csdmin = %g is negative.\n", model->B3SOIPDcsdmin); } if (model->B3SOIPDcsdesw < 0.0) { fprintf(fplog, "Warning: Csdesw = %g is negative.\n", model->B3SOIPDcsdesw); printf("Warning: Csdesw = %g is negative.\n", model->B3SOIPDcsdesw); } if (model->B3SOIPDasd < 0.0) { fprintf(fplog, "Warning: Asd = %g should be within (0, 1).\n", model->B3SOIPDasd); printf("Warning: Asd = %g should be within (0, 1).\n", model->B3SOIPDasd); } if (model->B3SOIPDrth0 < 0.0) { fprintf(fplog, "Warning: Rth0 = %g is negative.\n", model->B3SOIPDrth0); printf("Warning: Rth0 = %g is negative.\n", model->B3SOIPDrth0); } if (model->B3SOIPDcth0 < 0.0) { fprintf(fplog, "Warning: Cth0 = %g is negative.\n", model->B3SOIPDcth0); printf("Warning: Cth0 = %g is negative.\n", model->B3SOIPDcth0); } if (model->B3SOIPDrbody < 0.0) { fprintf(fplog, "Warning: Rbody = %g is negative.\n", model->B3SOIPDrbody); printf("Warning: Rbody = %g is negative.\n", model->B3SOIPDrbody); } if (model->B3SOIPDrbsh < 0.0) { fprintf(fplog, "Warning: Rbsh = %g is negative.\n", model->B3SOIPDrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B3SOIPDrbsh); } /* v2.2 release */ if (model->B3SOIPDwth0 < 0.0) { fprintf(fplog, "Warning: WTH0 = %g is negative.\n", model->B3SOIPDwth0); printf("Warning: Wth0 = %g is negative.\n", model->B3SOIPDwth0); } if (model->B3SOIPDrhalo < 0.0) { fprintf(fplog, "Warning: RHALO = %g is negative.\n", model->B3SOIPDrhalo); printf("Warning: Rhalo = %g is negative.\n", model->B3SOIPDrhalo); } if (model->B3SOIPDntox < 0.0) { fprintf(fplog, "Warning: NTOX = %g is negative.\n", model->B3SOIPDntox); printf("Warning: Ntox = %g is negative.\n", model->B3SOIPDntox); } if (model->B3SOIPDtoxref < 0.0) { fprintf(fplog, "Warning: TOXREF = %g is negative.\n", model->B3SOIPDtoxref); printf("Warning: Toxref = %g is negative.\n", model->B3SOIPDtoxref); Fatal_Flag = 1; } if (model->B3SOIPDebg < 0.0) { fprintf(fplog, "Warning: EBG = %g is negative.\n", model->B3SOIPDebg); printf("Warning: Ebg = %g is negative.\n", model->B3SOIPDebg); } if (model->B3SOIPDvevb < 0.0) { fprintf(fplog, "Warning: VEVB = %g is negative.\n", model->B3SOIPDvevb); printf("Warning: Vevb = %g is negative.\n", model->B3SOIPDvevb); } if (model->B3SOIPDalphaGB1 < 0.0) { fprintf(fplog, "Warning: ALPHAGB1 = %g is negative.\n", model->B3SOIPDalphaGB1); printf("Warning: AlphaGB1 = %g is negative.\n", model->B3SOIPDalphaGB1); } if (model->B3SOIPDbetaGB1 < 0.0) { fprintf(fplog, "Warning: BETAGB1 = %g is negative.\n", model->B3SOIPDbetaGB1); printf("Warning: BetaGB1 = %g is negative.\n", model->B3SOIPDbetaGB1); } if (model->B3SOIPDvgb1 < 0.0) { fprintf(fplog, "Warning: VGB1 = %g is negative.\n", model->B3SOIPDvgb1); printf("Warning: Vgb1 = %g is negative.\n", model->B3SOIPDvgb1); } if (model->B3SOIPDvecb < 0.0) { fprintf(fplog, "Warning: VECB = %g is negative.\n", model->B3SOIPDvecb); printf("Warning: Vecb = %g is negative.\n", model->B3SOIPDvecb); } if (model->B3SOIPDalphaGB2 < 0.0) { fprintf(fplog, "Warning: ALPHAGB2 = %g is negative.\n", model->B3SOIPDalphaGB2); printf("Warning: AlphaGB2 = %g is negative.\n", model->B3SOIPDalphaGB2); } if (model->B3SOIPDbetaGB2 < 0.0) { fprintf(fplog, "Warning: BETAGB2 = %g is negative.\n", model->B3SOIPDbetaGB2); printf("Warning: BetaGB2 = %g is negative.\n", model->B3SOIPDbetaGB2); } if (model->B3SOIPDvgb2 < 0.0) { fprintf(fplog, "Warning: VGB2 = %g is negative.\n", model->B3SOIPDvgb2); printf("Warning: Vgb2 = %g is negative.\n", model->B3SOIPDvgb2); } if (model->B3SOIPDtoxqm <= 0.0) { fprintf(fplog, "Fatal: Toxqm = %g is not positive.\n", model->B3SOIPDtoxqm); printf("Fatal: Toxqm = %g is not positive.\n", model->B3SOIPDtoxqm); Fatal_Flag = 1; } if (model->B3SOIPDvoxh < 0.0) { fprintf(fplog, "Warning: Voxh = %g is negative.\n", model->B3SOIPDvoxh); printf("Warning: Voxh = %g is negative.\n", model->B3SOIPDvoxh); } if (model->B3SOIPDdeltavox <= 0.0) { fprintf(fplog, "Fatal: Deltavox = %g is not positive.\n", model->B3SOIPDdeltavox); printf("Fatal: Deltavox = %g is not positive.\n", model->B3SOIPDdeltavox); } /* v2.0 release */ if (model->B3SOIPDk1w1 < 0.0) { fprintf(fplog, "Warning: K1W1 = %g is negative.\n", model->B3SOIPDk1w1); printf("Warning: K1w1 = %g is negative.\n", model->B3SOIPDk1w1); } if (model->B3SOIPDk1w2 < 0.0) { fprintf(fplog, "Warning: K1W2 = %g is negative.\n", model->B3SOIPDk1w2); printf("Warning: K1w2 = %g is negative.\n", model->B3SOIPDk1w2); } if (model->B3SOIPDketas < 0.0) { fprintf(fplog, "Warning: KETAS = %g is negative.\n", model->B3SOIPDketas); printf("Warning: Ketas = %g is negative.\n", model->B3SOIPDketas); } if (model->B3SOIPDdwbc < 0.0) { fprintf(fplog, "Warning: DWBC = %g is negative.\n", model->B3SOIPDdwbc); printf("Warning: Dwbc = %g is negative.\n", model->B3SOIPDdwbc); } if (model->B3SOIPDbeta0 < 0.0) { fprintf(fplog, "Warning: BETA0 = %g is negative.\n", model->B3SOIPDbeta0); printf("Warning: Beta0 = %g is negative.\n", model->B3SOIPDbeta0); } if (model->B3SOIPDbeta1 < 0.0) { fprintf(fplog, "Warning: BETA1 = %g is negative.\n", model->B3SOIPDbeta1); printf("Warning: Beta1 = %g is negative.\n", model->B3SOIPDbeta1); } if (model->B3SOIPDbeta2 < 0.0) { fprintf(fplog, "Warning: BETA2 = %g is negative.\n", model->B3SOIPDbeta2); printf("Warning: Beta2 = %g is negative.\n", model->B3SOIPDbeta2); } if (model->B3SOIPDtii < 0.0) { fprintf(fplog, "Warning: TII = %g is negative.\n", model->B3SOIPDtii); printf("Warning: Tii = %g is negative.\n", model->B3SOIPDtii); } if (model->B3SOIPDlii < 0.0) { fprintf(fplog, "Warning: LII = %g is negative.\n", model->B3SOIPDlii); printf("Warning: Lii = %g is negative.\n", model->B3SOIPDlii); } if (model->B3SOIPDsii1 < 0.0) { fprintf(fplog, "Warning: SII1 = %g is negative.\n", model->B3SOIPDsii1); printf("Warning: Sii1 = %g is negative.\n", model->B3SOIPDsii1); } if (model->B3SOIPDsii2 < 0.0) { fprintf(fplog, "Warning: SII2 = %g is negative.\n", model->B3SOIPDsii2); printf("Warning: Sii2 = %g is negative.\n", model->B3SOIPDsii1); } if (model->B3SOIPDsiid < 0.0) { fprintf(fplog, "Warning: SIID = %g is negative.\n", model->B3SOIPDsiid); printf("Warning: Siid = %g is negative.\n", model->B3SOIPDsiid); } if (model->B3SOIPDfbjtii < 0.0) { fprintf(fplog, "Warning: FBJTII = %g is negative.\n", model->B3SOIPDfbjtii); printf("Warning: fbjtii = %g is negative.\n", model->B3SOIPDfbjtii); } if (model->B3SOIPDvrec0 < 0.0) { fprintf(fplog, "Warning: VREC0 = %g is negative.\n", model->B3SOIPDvrec0); printf("Warning: Vrec0 = %g is negative.\n", model->B3SOIPDvrec0); } if (model->B3SOIPDvtun0 < 0.0) { fprintf(fplog, "Warning: VTUN0 = %g is negative.\n", model->B3SOIPDvtun0); printf("Warning: Vtun0 = %g is negative.\n", model->B3SOIPDvtun0); } if (model->B3SOIPDnbjt < 0.0) { fprintf(fplog, "Warning: NBJT = %g is negative.\n", model->B3SOIPDnbjt); printf("Warning: Nbjt = %g is negative.\n", model->B3SOIPDnbjt); } if (model->B3SOIPDaely < 0.0) { fprintf(fplog, "Warning: AELY = %g is negative.\n", model->B3SOIPDaely); printf("Warning: Aely = %g is negative.\n", model->B3SOIPDaely); } if (model->B3SOIPDahli < 0.0) { fprintf(fplog, "Warning: AHLI = %g is negative.\n", model->B3SOIPDahli); printf("Warning: Ahli = %g is negative.\n", model->B3SOIPDahli); } if (model->B3SOIPDrbody < 0.0) { fprintf(fplog, "Warning: RBODY = %g is negative.\n", model->B3SOIPDrbody); printf("Warning: Rbody = %g is negative.\n", model->B3SOIPDrbody); } if (model->B3SOIPDrbsh < 0.0) { fprintf(fplog, "Warning: RBSH = %g is negative.\n", model->B3SOIPDrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B3SOIPDrbsh); } if (model->B3SOIPDntrecf < 0.0) { fprintf(fplog, "Warning: NTRECF = %g is negative.\n", model->B3SOIPDntrecf); printf("Warning: Ntrecf = %g is negative.\n", model->B3SOIPDntrecf); } if (model->B3SOIPDntrecr < 0.0) { fprintf(fplog, "Warning: NTRECR = %g is negative.\n", model->B3SOIPDntrecr); printf("Warning: Ntrecr = %g is negative.\n", model->B3SOIPDntrecr); } if (model->B3SOIPDndif < 0.0) { fprintf(fplog, "Warning: NDIF = %g is negative.\n", model->B3SOIPDndif); printf("Warning: Ndif = %g is negative.\n", model->B3SOIPDndif); } if (model->B3SOIPDtcjswg < 0.0) { fprintf(fplog, "Warning: TCJSWG = %g is negative.\n", model->B3SOIPDtcjswg); printf("Warning: Tcjswg = %g is negative.\n", model->B3SOIPDtcjswg); } if (model->B3SOIPDtpbswg < 0.0) { fprintf(fplog, "Warning: TPBSWG = %g is negative.\n", model->B3SOIPDtpbswg); printf("Warning: Tpbswg = %g is negative.\n", model->B3SOIPDtpbswg); } if ((model->B3SOIPDacde < 0.4) || (model->B3SOIPDacde > 1.6)) { fprintf(fplog, "Warning: ACDE = %g is out of range.\n", model->B3SOIPDacde); printf("Warning: Acde = %g is out of range.\n", model->B3SOIPDacde); } if ((model->B3SOIPDmoin < 5.0)||(model->B3SOIPDmoin > 25.0)) { fprintf(fplog, "Warning: MOIN = %g is out of range.\n", model->B3SOIPDmoin); printf("Warning: Moin = %g is out of range.\n", model->B3SOIPDmoin); } if (model->B3SOIPDdlbg < 0.0) { fprintf(fplog, "Warning: DLBG = %g is negative.\n", model->B3SOIPDdlbg); printf("Warning: dlbg = %g is negative.\n", model->B3SOIPDdlbg); } if (model->B3SOIPDagidl < 0.0) { fprintf(fplog, "Warning: AGIDL = %g is negative.\n", model->B3SOIPDagidl); printf("Warning: Agidl = %g is negative.\n", model->B3SOIPDagidl); } if (model->B3SOIPDbgidl < 0.0) { fprintf(fplog, "Warning: BGIDL = %g is negative.\n", model->B3SOIPDbgidl); printf("Warning: Bgidl = %g is negative.\n", model->B3SOIPDbgidl); } if (model->B3SOIPDngidl < 0.0) { fprintf(fplog, "Warning: NGIDL = %g is negative.\n", model->B3SOIPDngidl); printf("Warning: Ngidl = %g is negative.\n", model->B3SOIPDngidl); } if (model->B3SOIPDesatii < 0.0) { fprintf(fplog, "Warning: Esatii = %g should be within positive.\n", model->B3SOIPDesatii); printf("Warning: Esatii = %g should be within (0, 1).\n", model->B3SOIPDesatii); } if (model->B3SOIPDxj > model->B3SOIPDtsi) { fprintf(fplog, "Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIPDxj, model->B3SOIPDtsi); printf("Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIPDxj, model->B3SOIPDtsi); } if (model->B3SOIPDcapMod < 2) { fprintf(fplog, "Warning: capMod < 2 is not supported by BSIM3SOI.\n"); printf("Warning: Warning: capMod < 2 is not supported by BSIM3SOI.\n"); } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdmpar.c0000644000265600020320000020700712264261473023044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdmpar.c 98/5/01 Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "b3soipddef.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDmParam(int param, IFvalue *value, GENmodel *inMod) { B3SOIPDmodel *mod = (B3SOIPDmodel*)inMod; switch(param) { case B3SOIPD_MOD_MOBMOD : mod->B3SOIPDmobMod = value->iValue; mod->B3SOIPDmobModGiven = TRUE; break; case B3SOIPD_MOD_BINUNIT : mod->B3SOIPDbinUnit = value->iValue; mod->B3SOIPDbinUnitGiven = TRUE; break; case B3SOIPD_MOD_PARAMCHK : mod->B3SOIPDparamChk = value->iValue; mod->B3SOIPDparamChkGiven = TRUE; break; case B3SOIPD_MOD_CAPMOD : mod->B3SOIPDcapMod = value->iValue; mod->B3SOIPDcapModGiven = TRUE; break; case B3SOIPD_MOD_SHMOD : mod->B3SOIPDshMod = value->iValue; mod->B3SOIPDshModGiven = TRUE; break; case B3SOIPD_MOD_NOIMOD : mod->B3SOIPDnoiMod = value->iValue; mod->B3SOIPDnoiModGiven = TRUE; break; case B3SOIPD_MOD_VERSION : mod->B3SOIPDversion = value->rValue; mod->B3SOIPDversionGiven = TRUE; break; case B3SOIPD_MOD_TOX : mod->B3SOIPDtox = value->rValue; mod->B3SOIPDtoxGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_DTOXCV : mod->B3SOIPDdtoxcv = value->rValue; mod->B3SOIPDdtoxcvGiven = TRUE; break; case B3SOIPD_MOD_CDSC : mod->B3SOIPDcdsc = value->rValue; mod->B3SOIPDcdscGiven = TRUE; break; case B3SOIPD_MOD_CDSCB : mod->B3SOIPDcdscb = value->rValue; mod->B3SOIPDcdscbGiven = TRUE; break; case B3SOIPD_MOD_CDSCD : mod->B3SOIPDcdscd = value->rValue; mod->B3SOIPDcdscdGiven = TRUE; break; case B3SOIPD_MOD_CIT : mod->B3SOIPDcit = value->rValue; mod->B3SOIPDcitGiven = TRUE; break; case B3SOIPD_MOD_NFACTOR : mod->B3SOIPDnfactor = value->rValue; mod->B3SOIPDnfactorGiven = TRUE; break; case B3SOIPD_MOD_VSAT: mod->B3SOIPDvsat = value->rValue; mod->B3SOIPDvsatGiven = TRUE; break; case B3SOIPD_MOD_A0: mod->B3SOIPDa0 = value->rValue; mod->B3SOIPDa0Given = TRUE; break; case B3SOIPD_MOD_AGS: mod->B3SOIPDags= value->rValue; mod->B3SOIPDagsGiven = TRUE; break; case B3SOIPD_MOD_A1: mod->B3SOIPDa1 = value->rValue; mod->B3SOIPDa1Given = TRUE; break; case B3SOIPD_MOD_A2: mod->B3SOIPDa2 = value->rValue; mod->B3SOIPDa2Given = TRUE; break; case B3SOIPD_MOD_AT: mod->B3SOIPDat = value->rValue; mod->B3SOIPDatGiven = TRUE; break; case B3SOIPD_MOD_KETA: mod->B3SOIPDketa = value->rValue; mod->B3SOIPDketaGiven = TRUE; break; case B3SOIPD_MOD_NSUB: mod->B3SOIPDnsub = value->rValue; mod->B3SOIPDnsubGiven = TRUE; break; case B3SOIPD_MOD_NPEAK: mod->B3SOIPDnpeak = value->rValue; mod->B3SOIPDnpeakGiven = TRUE; if (mod->B3SOIPDnpeak > 1.0e20) mod->B3SOIPDnpeak *= 1.0e-6; break; case B3SOIPD_MOD_NGATE: mod->B3SOIPDngate = value->rValue; mod->B3SOIPDngateGiven = TRUE; if (mod->B3SOIPDngate > 1.0e23) mod->B3SOIPDngate *= 1.0e-6; break; case B3SOIPD_MOD_GAMMA1: mod->B3SOIPDgamma1 = value->rValue; mod->B3SOIPDgamma1Given = TRUE; break; case B3SOIPD_MOD_GAMMA2: mod->B3SOIPDgamma2 = value->rValue; mod->B3SOIPDgamma2Given = TRUE; break; case B3SOIPD_MOD_VBX: mod->B3SOIPDvbx = value->rValue; mod->B3SOIPDvbxGiven = TRUE; break; case B3SOIPD_MOD_VBM: mod->B3SOIPDvbm = value->rValue; mod->B3SOIPDvbmGiven = TRUE; break; case B3SOIPD_MOD_XT: mod->B3SOIPDxt = value->rValue; mod->B3SOIPDxtGiven = TRUE; break; case B3SOIPD_MOD_K1: mod->B3SOIPDk1 = value->rValue; mod->B3SOIPDk1Given = TRUE; break; case B3SOIPD_MOD_KT1: mod->B3SOIPDkt1 = value->rValue; mod->B3SOIPDkt1Given = TRUE; break; case B3SOIPD_MOD_KT1L: mod->B3SOIPDkt1l = value->rValue; mod->B3SOIPDkt1lGiven = TRUE; break; case B3SOIPD_MOD_KT2: mod->B3SOIPDkt2 = value->rValue; mod->B3SOIPDkt2Given = TRUE; break; case B3SOIPD_MOD_K2: mod->B3SOIPDk2 = value->rValue; mod->B3SOIPDk2Given = TRUE; break; case B3SOIPD_MOD_K3: mod->B3SOIPDk3 = value->rValue; mod->B3SOIPDk3Given = TRUE; break; case B3SOIPD_MOD_K3B: mod->B3SOIPDk3b = value->rValue; mod->B3SOIPDk3bGiven = TRUE; break; case B3SOIPD_MOD_NLX: mod->B3SOIPDnlx = value->rValue; mod->B3SOIPDnlxGiven = TRUE; break; case B3SOIPD_MOD_W0: mod->B3SOIPDw0 = value->rValue; mod->B3SOIPDw0Given = TRUE; break; case B3SOIPD_MOD_DVT0: mod->B3SOIPDdvt0 = value->rValue; mod->B3SOIPDdvt0Given = TRUE; break; case B3SOIPD_MOD_DVT1: mod->B3SOIPDdvt1 = value->rValue; mod->B3SOIPDdvt1Given = TRUE; break; case B3SOIPD_MOD_DVT2: mod->B3SOIPDdvt2 = value->rValue; mod->B3SOIPDdvt2Given = TRUE; break; case B3SOIPD_MOD_DVT0W: mod->B3SOIPDdvt0w = value->rValue; mod->B3SOIPDdvt0wGiven = TRUE; break; case B3SOIPD_MOD_DVT1W: mod->B3SOIPDdvt1w = value->rValue; mod->B3SOIPDdvt1wGiven = TRUE; break; case B3SOIPD_MOD_DVT2W: mod->B3SOIPDdvt2w = value->rValue; mod->B3SOIPDdvt2wGiven = TRUE; break; case B3SOIPD_MOD_DROUT: mod->B3SOIPDdrout = value->rValue; mod->B3SOIPDdroutGiven = TRUE; break; case B3SOIPD_MOD_DSUB: mod->B3SOIPDdsub = value->rValue; mod->B3SOIPDdsubGiven = TRUE; break; case B3SOIPD_MOD_VTH0: mod->B3SOIPDvth0 = value->rValue; mod->B3SOIPDvth0Given = TRUE; break; case B3SOIPD_MOD_UA: mod->B3SOIPDua = value->rValue; mod->B3SOIPDuaGiven = TRUE; break; case B3SOIPD_MOD_UA1: mod->B3SOIPDua1 = value->rValue; mod->B3SOIPDua1Given = TRUE; break; case B3SOIPD_MOD_UB: mod->B3SOIPDub = value->rValue; mod->B3SOIPDubGiven = TRUE; break; case B3SOIPD_MOD_UB1: mod->B3SOIPDub1 = value->rValue; mod->B3SOIPDub1Given = TRUE; break; case B3SOIPD_MOD_UC: mod->B3SOIPDuc = value->rValue; mod->B3SOIPDucGiven = TRUE; break; case B3SOIPD_MOD_UC1: mod->B3SOIPDuc1 = value->rValue; mod->B3SOIPDuc1Given = TRUE; break; case B3SOIPD_MOD_U0 : mod->B3SOIPDu0 = value->rValue; mod->B3SOIPDu0Given = TRUE; break; case B3SOIPD_MOD_UTE : mod->B3SOIPDute = value->rValue; mod->B3SOIPDuteGiven = TRUE; break; case B3SOIPD_MOD_VOFF: mod->B3SOIPDvoff = value->rValue; mod->B3SOIPDvoffGiven = TRUE; break; case B3SOIPD_MOD_DELTA : mod->B3SOIPDdelta = value->rValue; mod->B3SOIPDdeltaGiven = TRUE; break; case B3SOIPD_MOD_RDSW: mod->B3SOIPDrdsw = value->rValue; mod->B3SOIPDrdswGiven = TRUE; break; case B3SOIPD_MOD_PRWG: mod->B3SOIPDprwg = value->rValue; mod->B3SOIPDprwgGiven = TRUE; break; case B3SOIPD_MOD_PRWB: mod->B3SOIPDprwb = value->rValue; mod->B3SOIPDprwbGiven = TRUE; break; case B3SOIPD_MOD_PRT: mod->B3SOIPDprt = value->rValue; mod->B3SOIPDprtGiven = TRUE; break; case B3SOIPD_MOD_ETA0: mod->B3SOIPDeta0 = value->rValue; mod->B3SOIPDeta0Given = TRUE; break; case B3SOIPD_MOD_ETAB: mod->B3SOIPDetab = value->rValue; mod->B3SOIPDetabGiven = TRUE; break; case B3SOIPD_MOD_PCLM: mod->B3SOIPDpclm = value->rValue; mod->B3SOIPDpclmGiven = TRUE; break; case B3SOIPD_MOD_PDIBL1: mod->B3SOIPDpdibl1 = value->rValue; mod->B3SOIPDpdibl1Given = TRUE; break; case B3SOIPD_MOD_PDIBL2: mod->B3SOIPDpdibl2 = value->rValue; mod->B3SOIPDpdibl2Given = TRUE; break; case B3SOIPD_MOD_PDIBLB: mod->B3SOIPDpdiblb = value->rValue; mod->B3SOIPDpdiblbGiven = TRUE; break; case B3SOIPD_MOD_PVAG: mod->B3SOIPDpvag = value->rValue; mod->B3SOIPDpvagGiven = TRUE; break; case B3SOIPD_MOD_WR : mod->B3SOIPDwr = value->rValue; mod->B3SOIPDwrGiven = TRUE; break; case B3SOIPD_MOD_DWG : mod->B3SOIPDdwg = value->rValue; mod->B3SOIPDdwgGiven = TRUE; break; case B3SOIPD_MOD_DWB : mod->B3SOIPDdwb = value->rValue; mod->B3SOIPDdwbGiven = TRUE; break; case B3SOIPD_MOD_B0 : mod->B3SOIPDb0 = value->rValue; mod->B3SOIPDb0Given = TRUE; break; case B3SOIPD_MOD_B1 : mod->B3SOIPDb1 = value->rValue; mod->B3SOIPDb1Given = TRUE; break; case B3SOIPD_MOD_ALPHA0 : mod->B3SOIPDalpha0 = value->rValue; mod->B3SOIPDalpha0Given = TRUE; break; case B3SOIPD_MOD_CGSL : mod->B3SOIPDcgsl = value->rValue; mod->B3SOIPDcgslGiven = TRUE; break; case B3SOIPD_MOD_CGDL : mod->B3SOIPDcgdl = value->rValue; mod->B3SOIPDcgdlGiven = TRUE; break; case B3SOIPD_MOD_CKAPPA : mod->B3SOIPDckappa = value->rValue; mod->B3SOIPDckappaGiven = TRUE; break; case B3SOIPD_MOD_CF : mod->B3SOIPDcf = value->rValue; mod->B3SOIPDcfGiven = TRUE; break; case B3SOIPD_MOD_CLC : mod->B3SOIPDclc = value->rValue; mod->B3SOIPDclcGiven = TRUE; break; case B3SOIPD_MOD_CLE : mod->B3SOIPDcle = value->rValue; mod->B3SOIPDcleGiven = TRUE; break; case B3SOIPD_MOD_DWC : mod->B3SOIPDdwc = value->rValue; mod->B3SOIPDdwcGiven = TRUE; break; case B3SOIPD_MOD_DLC : mod->B3SOIPDdlc = value->rValue; mod->B3SOIPDdlcGiven = TRUE; break; case B3SOIPD_MOD_TBOX : mod->B3SOIPDtbox = value->rValue; mod->B3SOIPDtboxGiven = TRUE; break; case B3SOIPD_MOD_TSI : mod->B3SOIPDtsi = value->rValue; mod->B3SOIPDtsiGiven = TRUE; break; case B3SOIPD_MOD_XJ : mod->B3SOIPDxj = value->rValue; mod->B3SOIPDxjGiven = TRUE; break; case B3SOIPD_MOD_RBODY : mod->B3SOIPDrbody = value->rValue; mod->B3SOIPDrbodyGiven = TRUE; break; case B3SOIPD_MOD_RBSH : mod->B3SOIPDrbsh = value->rValue; mod->B3SOIPDrbshGiven = TRUE; break; case B3SOIPD_MOD_RTH0 : mod->B3SOIPDrth0 = value->rValue; mod->B3SOIPDrth0Given = TRUE; break; case B3SOIPD_MOD_CTH0 : mod->B3SOIPDcth0 = value->rValue; mod->B3SOIPDcth0Given = TRUE; break; case B3SOIPD_MOD_NGIDL : mod->B3SOIPDngidl = value->rValue; mod->B3SOIPDngidlGiven = TRUE; break; case B3SOIPD_MOD_AGIDL : mod->B3SOIPDagidl = value->rValue; mod->B3SOIPDagidlGiven = TRUE; break; case B3SOIPD_MOD_BGIDL : mod->B3SOIPDbgidl = value->rValue; mod->B3SOIPDbgidlGiven = TRUE; break; case B3SOIPD_MOD_NDIODE : mod->B3SOIPDndiode = value->rValue; mod->B3SOIPDndiodeGiven = TRUE; break; case B3SOIPD_MOD_XBJT : mod->B3SOIPDxbjt = value->rValue; mod->B3SOIPDxbjtGiven = TRUE; break; case B3SOIPD_MOD_XDIF : mod->B3SOIPDxdif = value->rValue; mod->B3SOIPDxdifGiven = TRUE; break; case B3SOIPD_MOD_XREC : mod->B3SOIPDxrec = value->rValue; mod->B3SOIPDxrecGiven = TRUE; break; case B3SOIPD_MOD_XTUN : mod->B3SOIPDxtun = value->rValue; mod->B3SOIPDxtunGiven = TRUE; break; case B3SOIPD_MOD_TT : mod->B3SOIPDtt = value->rValue; mod->B3SOIPDttGiven = TRUE; break; case B3SOIPD_MOD_VSDTH : mod->B3SOIPDvsdth = value->rValue; mod->B3SOIPDvsdthGiven = TRUE; break; case B3SOIPD_MOD_VSDFB : mod->B3SOIPDvsdfb = value->rValue; mod->B3SOIPDvsdfbGiven = TRUE; break; case B3SOIPD_MOD_CSDMIN : mod->B3SOIPDcsdmin = value->rValue; mod->B3SOIPDcsdminGiven = TRUE; break; case B3SOIPD_MOD_ASD : mod->B3SOIPDasd = value->rValue; mod->B3SOIPDasdGiven = TRUE; break; case B3SOIPD_MOD_TNOM : mod->B3SOIPDtnom = value->rValue + 273.15; mod->B3SOIPDtnomGiven = TRUE; break; case B3SOIPD_MOD_CGSO : mod->B3SOIPDcgso = value->rValue; mod->B3SOIPDcgsoGiven = TRUE; break; case B3SOIPD_MOD_CGDO : mod->B3SOIPDcgdo = value->rValue; mod->B3SOIPDcgdoGiven = TRUE; break; case B3SOIPD_MOD_CGEO : mod->B3SOIPDcgeo = value->rValue; mod->B3SOIPDcgeoGiven = TRUE; break; case B3SOIPD_MOD_XPART : mod->B3SOIPDxpart = value->rValue; mod->B3SOIPDxpartGiven = TRUE; break; case B3SOIPD_MOD_RSH : mod->B3SOIPDsheetResistance = value->rValue; mod->B3SOIPDsheetResistanceGiven = TRUE; break; case B3SOIPD_MOD_PBSWG : mod->B3SOIPDGatesidewallJctPotential = value->rValue; mod->B3SOIPDGatesidewallJctPotentialGiven = TRUE; break; case B3SOIPD_MOD_MJSWG : mod->B3SOIPDbodyJctGateSideGradingCoeff = value->rValue; mod->B3SOIPDbodyJctGateSideGradingCoeffGiven = TRUE; break; case B3SOIPD_MOD_CJSWG : mod->B3SOIPDunitLengthGateSidewallJctCap = value->rValue; mod->B3SOIPDunitLengthGateSidewallJctCapGiven = TRUE; break; case B3SOIPD_MOD_CSDESW : mod->B3SOIPDcsdesw = value->rValue; mod->B3SOIPDcsdeswGiven = TRUE; break; case B3SOIPD_MOD_LINT : mod->B3SOIPDLint = value->rValue; mod->B3SOIPDLintGiven = TRUE; break; case B3SOIPD_MOD_LL : mod->B3SOIPDLl = value->rValue; mod->B3SOIPDLlGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_LLC : mod->B3SOIPDLlc = value->rValue; mod->B3SOIPDLlcGiven = TRUE; break; case B3SOIPD_MOD_LLN : mod->B3SOIPDLln = value->rValue; mod->B3SOIPDLlnGiven = TRUE; break; case B3SOIPD_MOD_LW : mod->B3SOIPDLw = value->rValue; mod->B3SOIPDLwGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_LWC : mod->B3SOIPDLwc = value->rValue; mod->B3SOIPDLwcGiven = TRUE; break; case B3SOIPD_MOD_LWN : mod->B3SOIPDLwn = value->rValue; mod->B3SOIPDLwnGiven = TRUE; break; case B3SOIPD_MOD_LWL : mod->B3SOIPDLwl = value->rValue; mod->B3SOIPDLwlGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_LWLC : mod->B3SOIPDLwlc = value->rValue; mod->B3SOIPDLwlcGiven = TRUE; break; case B3SOIPD_MOD_WINT : mod->B3SOIPDWint = value->rValue; mod->B3SOIPDWintGiven = TRUE; break; case B3SOIPD_MOD_WL : mod->B3SOIPDWl = value->rValue; mod->B3SOIPDWlGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_WLC : mod->B3SOIPDWlc = value->rValue; mod->B3SOIPDWlcGiven = TRUE; break; case B3SOIPD_MOD_WLN : mod->B3SOIPDWln = value->rValue; mod->B3SOIPDWlnGiven = TRUE; break; case B3SOIPD_MOD_WW : mod->B3SOIPDWw = value->rValue; mod->B3SOIPDWwGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_WWC : mod->B3SOIPDWwc = value->rValue; mod->B3SOIPDWwcGiven = TRUE; break; case B3SOIPD_MOD_WWN : mod->B3SOIPDWwn = value->rValue; mod->B3SOIPDWwnGiven = TRUE; break; case B3SOIPD_MOD_WWL : mod->B3SOIPDWwl = value->rValue; mod->B3SOIPDWwlGiven = TRUE; break; /* v2.2.3 */ case B3SOIPD_MOD_WWLC : mod->B3SOIPDWwlc = value->rValue; mod->B3SOIPDWwlcGiven = TRUE; break; case B3SOIPD_MOD_NOIA : mod->B3SOIPDoxideTrapDensityA = value->rValue; mod->B3SOIPDoxideTrapDensityAGiven = TRUE; break; case B3SOIPD_MOD_NOIB : mod->B3SOIPDoxideTrapDensityB = value->rValue; mod->B3SOIPDoxideTrapDensityBGiven = TRUE; break; case B3SOIPD_MOD_NOIC : mod->B3SOIPDoxideTrapDensityC = value->rValue; mod->B3SOIPDoxideTrapDensityCGiven = TRUE; break; case B3SOIPD_MOD_NOIF : mod->B3SOIPDnoif = value->rValue; mod->B3SOIPDnoifGiven = TRUE; break; case B3SOIPD_MOD_EM : mod->B3SOIPDem = value->rValue; mod->B3SOIPDemGiven = TRUE; break; case B3SOIPD_MOD_EF : mod->B3SOIPDef = value->rValue; mod->B3SOIPDefGiven = TRUE; break; case B3SOIPD_MOD_AF : mod->B3SOIPDaf = value->rValue; mod->B3SOIPDafGiven = TRUE; break; case B3SOIPD_MOD_KF : mod->B3SOIPDkf = value->rValue; mod->B3SOIPDkfGiven = TRUE; break; /* v2.2 release */ case B3SOIPD_MOD_WTH0 : mod->B3SOIPDwth0 = value->rValue; mod->B3SOIPDwth0Given = TRUE; break; case B3SOIPD_MOD_RHALO : mod->B3SOIPDrhalo = value->rValue; mod->B3SOIPDrhaloGiven = TRUE; break; case B3SOIPD_MOD_NTOX : mod->B3SOIPDntox = value->rValue; mod->B3SOIPDntoxGiven = TRUE; break; case B3SOIPD_MOD_TOXREF : mod->B3SOIPDtoxref = value->rValue; mod->B3SOIPDtoxrefGiven = TRUE; break; case B3SOIPD_MOD_EBG : mod->B3SOIPDebg = value->rValue; mod->B3SOIPDebgGiven = TRUE; break; case B3SOIPD_MOD_VEVB : mod->B3SOIPDvevb = value->rValue; mod->B3SOIPDvevbGiven = TRUE; break; case B3SOIPD_MOD_ALPHAGB1 : mod->B3SOIPDalphaGB1 = value->rValue; mod->B3SOIPDalphaGB1Given = TRUE; break; case B3SOIPD_MOD_BETAGB1 : mod->B3SOIPDbetaGB1 = value->rValue; mod->B3SOIPDbetaGB1Given = TRUE; break; case B3SOIPD_MOD_VGB1 : mod->B3SOIPDvgb1 = value->rValue; mod->B3SOIPDvgb1Given = TRUE; break; case B3SOIPD_MOD_VECB : mod->B3SOIPDvecb = value->rValue; mod->B3SOIPDvecbGiven = TRUE; break; case B3SOIPD_MOD_ALPHAGB2 : mod->B3SOIPDalphaGB2 = value->rValue; mod->B3SOIPDalphaGB2Given = TRUE; break; case B3SOIPD_MOD_BETAGB2 : mod->B3SOIPDbetaGB2 = value->rValue; mod->B3SOIPDbetaGB2Given = TRUE; break; case B3SOIPD_MOD_VGB2 : mod->B3SOIPDvgb2 = value->rValue; mod->B3SOIPDvgb2Given = TRUE; break; case B3SOIPD_MOD_TOXQM : mod->B3SOIPDtoxqm = value->rValue; mod->B3SOIPDtoxqmGiven = TRUE; break; case B3SOIPD_MOD_VOXH : mod->B3SOIPDvoxh = value->rValue; mod->B3SOIPDvoxhGiven = TRUE; break; case B3SOIPD_MOD_DELTAVOX : mod->B3SOIPDdeltavox = value->rValue; mod->B3SOIPDdeltavoxGiven = TRUE; break; case B3SOIPD_MOD_IGMOD : mod->B3SOIPDigMod = value->iValue; mod->B3SOIPDigModGiven = TRUE; break; /* v2.0 release */ case B3SOIPD_MOD_K1W1 : mod->B3SOIPDk1w1 = value->rValue; mod->B3SOIPDk1w1Given = TRUE; break; case B3SOIPD_MOD_K1W2 : mod->B3SOIPDk1w2 = value->rValue; mod->B3SOIPDk1w2Given = TRUE; break; case B3SOIPD_MOD_KETAS : mod->B3SOIPDketas = value->rValue; mod->B3SOIPDketasGiven = TRUE; break; case B3SOIPD_MOD_DWBC : mod->B3SOIPDdwbc = value->rValue; mod->B3SOIPDdwbcGiven = TRUE; break; case B3SOIPD_MOD_BETA0 : mod->B3SOIPDbeta0 = value->rValue; mod->B3SOIPDbeta0Given = TRUE; break; case B3SOIPD_MOD_BETA1 : mod->B3SOIPDbeta1 = value->rValue; mod->B3SOIPDbeta1Given = TRUE; break; case B3SOIPD_MOD_BETA2 : mod->B3SOIPDbeta2 = value->rValue; mod->B3SOIPDbeta2Given = TRUE; break; case B3SOIPD_MOD_VDSATII0 : mod->B3SOIPDvdsatii0 = value->rValue; mod->B3SOIPDvdsatii0Given = TRUE; break; case B3SOIPD_MOD_TII : mod->B3SOIPDtii = value->rValue; mod->B3SOIPDtiiGiven = TRUE; break; case B3SOIPD_MOD_LII : mod->B3SOIPDlii = value->rValue; mod->B3SOIPDliiGiven = TRUE; break; case B3SOIPD_MOD_SII0 : mod->B3SOIPDsii0 = value->rValue; mod->B3SOIPDsii0Given = TRUE; break; case B3SOIPD_MOD_SII1 : mod->B3SOIPDsii1 = value->rValue; mod->B3SOIPDsii1Given = TRUE; break; case B3SOIPD_MOD_SII2 : mod->B3SOIPDsii2 = value->rValue; mod->B3SOIPDsii2Given = TRUE; break; case B3SOIPD_MOD_SIID : mod->B3SOIPDsiid = value->rValue; mod->B3SOIPDsiidGiven = TRUE; break; case B3SOIPD_MOD_FBJTII : mod->B3SOIPDfbjtii = value->rValue; mod->B3SOIPDfbjtiiGiven = TRUE; break; case B3SOIPD_MOD_ESATII : mod->B3SOIPDesatii = value->rValue; mod->B3SOIPDesatiiGiven = TRUE; break; case B3SOIPD_MOD_NTUN : mod->B3SOIPDntun = value->rValue; mod->B3SOIPDntunGiven = TRUE; break; case B3SOIPD_MOD_NRECF0 : mod->B3SOIPDnrecf0 = value->rValue; mod->B3SOIPDnrecf0Given = TRUE; break; case B3SOIPD_MOD_NRECR0 : mod->B3SOIPDnrecr0 = value->rValue; mod->B3SOIPDnrecr0Given = TRUE; break; case B3SOIPD_MOD_ISBJT : mod->B3SOIPDisbjt = value->rValue; mod->B3SOIPDisbjtGiven = TRUE; break; case B3SOIPD_MOD_ISDIF : mod->B3SOIPDisdif = value->rValue; mod->B3SOIPDisdifGiven = TRUE; break; case B3SOIPD_MOD_ISREC : mod->B3SOIPDisrec = value->rValue; mod->B3SOIPDisrecGiven = TRUE; break; case B3SOIPD_MOD_ISTUN : mod->B3SOIPDistun = value->rValue; mod->B3SOIPDistunGiven = TRUE; break; case B3SOIPD_MOD_LN : mod->B3SOIPDln = value->rValue; mod->B3SOIPDlnGiven = TRUE; break; case B3SOIPD_MOD_VREC0 : mod->B3SOIPDvrec0 = value->rValue; mod->B3SOIPDvrec0Given = TRUE; break; case B3SOIPD_MOD_VTUN0 : mod->B3SOIPDvtun0 = value->rValue; mod->B3SOIPDvtun0Given = TRUE; break; case B3SOIPD_MOD_NBJT : mod->B3SOIPDnbjt = value->rValue; mod->B3SOIPDnbjtGiven = TRUE; break; case B3SOIPD_MOD_LBJT0 : mod->B3SOIPDlbjt0 = value->rValue; mod->B3SOIPDlbjt0Given = TRUE; break; case B3SOIPD_MOD_LDIF0 : mod->B3SOIPDldif0 = value->rValue; mod->B3SOIPDldif0Given = TRUE; break; case B3SOIPD_MOD_VABJT : mod->B3SOIPDvabjt = value->rValue; mod->B3SOIPDvabjtGiven = TRUE; break; case B3SOIPD_MOD_AELY : mod->B3SOIPDaely = value->rValue; mod->B3SOIPDaelyGiven = TRUE; break; case B3SOIPD_MOD_AHLI : mod->B3SOIPDahli = value->rValue; mod->B3SOIPDahliGiven = TRUE; break; case B3SOIPD_MOD_NDIF : mod->B3SOIPDndif = value->rValue; mod->B3SOIPDndifGiven = TRUE; break; case B3SOIPD_MOD_NTRECF : mod->B3SOIPDntrecf = value->rValue; mod->B3SOIPDntrecfGiven = TRUE; break; case B3SOIPD_MOD_NTRECR : mod->B3SOIPDntrecr = value->rValue; mod->B3SOIPDntrecrGiven = TRUE; break; case B3SOIPD_MOD_DLCB : mod->B3SOIPDdlcb = value->rValue; mod->B3SOIPDdlcbGiven = TRUE; break; case B3SOIPD_MOD_FBODY : mod->B3SOIPDfbody = value->rValue; mod->B3SOIPDfbodyGiven = TRUE; break; case B3SOIPD_MOD_TCJSWG : mod->B3SOIPDtcjswg = value->rValue; mod->B3SOIPDtcjswgGiven = TRUE; break; case B3SOIPD_MOD_TPBSWG : mod->B3SOIPDtpbswg = value->rValue; mod->B3SOIPDtpbswgGiven = TRUE; break; case B3SOIPD_MOD_ACDE : mod->B3SOIPDacde = value->rValue; mod->B3SOIPDacdeGiven = TRUE; break; case B3SOIPD_MOD_MOIN : mod->B3SOIPDmoin = value->rValue; mod->B3SOIPDmoinGiven = TRUE; break; case B3SOIPD_MOD_DELVT : mod->B3SOIPDdelvt = value->rValue; mod->B3SOIPDdelvtGiven = TRUE; break; case B3SOIPD_MOD_KB1 : mod->B3SOIPDkb1 = value->rValue; mod->B3SOIPDkb1Given = TRUE; break; case B3SOIPD_MOD_DLBG : mod->B3SOIPDdlbg = value->rValue; mod->B3SOIPDdlbgGiven = TRUE; break; /* Added for binning - START */ /* Length Dependence */ case B3SOIPD_MOD_LNPEAK: mod->B3SOIPDlnpeak = value->rValue; mod->B3SOIPDlnpeakGiven = TRUE; break; case B3SOIPD_MOD_LNSUB: mod->B3SOIPDlnsub = value->rValue; mod->B3SOIPDlnsubGiven = TRUE; break; case B3SOIPD_MOD_LNGATE: mod->B3SOIPDlngate = value->rValue; mod->B3SOIPDlngateGiven = TRUE; break; case B3SOIPD_MOD_LVTH0: mod->B3SOIPDlvth0 = value->rValue; mod->B3SOIPDlvth0Given = TRUE; break; case B3SOIPD_MOD_LK1: mod->B3SOIPDlk1 = value->rValue; mod->B3SOIPDlk1Given = TRUE; break; case B3SOIPD_MOD_LK1W1: mod->B3SOIPDlk1w1 = value->rValue; mod->B3SOIPDlk1w1Given = TRUE; break; case B3SOIPD_MOD_LK1W2: mod->B3SOIPDlk1w2 = value->rValue; mod->B3SOIPDlk1w2Given = TRUE; break; case B3SOIPD_MOD_LK2: mod->B3SOIPDlk2 = value->rValue; mod->B3SOIPDlk2Given = TRUE; break; case B3SOIPD_MOD_LK3: mod->B3SOIPDlk3 = value->rValue; mod->B3SOIPDlk3Given = TRUE; break; case B3SOIPD_MOD_LK3B: mod->B3SOIPDlk3b = value->rValue; mod->B3SOIPDlk3bGiven = TRUE; break; case B3SOIPD_MOD_LKB1 : mod->B3SOIPDlkb1 = value->rValue; mod->B3SOIPDlkb1Given = TRUE; break; case B3SOIPD_MOD_LW0: mod->B3SOIPDlw0 = value->rValue; mod->B3SOIPDlw0Given = TRUE; break; case B3SOIPD_MOD_LNLX: mod->B3SOIPDlnlx = value->rValue; mod->B3SOIPDlnlxGiven = TRUE; break; case B3SOIPD_MOD_LDVT0: mod->B3SOIPDldvt0 = value->rValue; mod->B3SOIPDldvt0Given = TRUE; break; case B3SOIPD_MOD_LDVT1: mod->B3SOIPDldvt1 = value->rValue; mod->B3SOIPDldvt1Given = TRUE; break; case B3SOIPD_MOD_LDVT2: mod->B3SOIPDldvt2 = value->rValue; mod->B3SOIPDldvt2Given = TRUE; break; case B3SOIPD_MOD_LDVT0W: mod->B3SOIPDldvt0w = value->rValue; mod->B3SOIPDldvt0wGiven = TRUE; break; case B3SOIPD_MOD_LDVT1W: mod->B3SOIPDldvt1w = value->rValue; mod->B3SOIPDldvt1wGiven = TRUE; break; case B3SOIPD_MOD_LDVT2W: mod->B3SOIPDldvt2w = value->rValue; mod->B3SOIPDldvt2wGiven = TRUE; break; case B3SOIPD_MOD_LU0 : mod->B3SOIPDlu0 = value->rValue; mod->B3SOIPDlu0Given = TRUE; break; case B3SOIPD_MOD_LUA: mod->B3SOIPDlua = value->rValue; mod->B3SOIPDluaGiven = TRUE; break; case B3SOIPD_MOD_LUB: mod->B3SOIPDlub = value->rValue; mod->B3SOIPDlubGiven = TRUE; break; case B3SOIPD_MOD_LUC: mod->B3SOIPDluc = value->rValue; mod->B3SOIPDlucGiven = TRUE; break; case B3SOIPD_MOD_LVSAT: mod->B3SOIPDlvsat = value->rValue; mod->B3SOIPDlvsatGiven = TRUE; break; case B3SOIPD_MOD_LA0: mod->B3SOIPDla0 = value->rValue; mod->B3SOIPDla0Given = TRUE; break; case B3SOIPD_MOD_LAGS: mod->B3SOIPDlags= value->rValue; mod->B3SOIPDlagsGiven = TRUE; break; case B3SOIPD_MOD_LB0 : mod->B3SOIPDlb0 = value->rValue; mod->B3SOIPDlb0Given = TRUE; break; case B3SOIPD_MOD_LB1 : mod->B3SOIPDlb1 = value->rValue; mod->B3SOIPDlb1Given = TRUE; break; case B3SOIPD_MOD_LKETA: mod->B3SOIPDlketa = value->rValue; mod->B3SOIPDlketaGiven = TRUE; break; case B3SOIPD_MOD_LKETAS: mod->B3SOIPDlketas = value->rValue; mod->B3SOIPDlketasGiven = TRUE; break; case B3SOIPD_MOD_LA1: mod->B3SOIPDla1 = value->rValue; mod->B3SOIPDla1Given = TRUE; break; case B3SOIPD_MOD_LA2: mod->B3SOIPDla2 = value->rValue; mod->B3SOIPDla2Given = TRUE; break; case B3SOIPD_MOD_LRDSW: mod->B3SOIPDlrdsw = value->rValue; mod->B3SOIPDlrdswGiven = TRUE; break; case B3SOIPD_MOD_LPRWB: mod->B3SOIPDlprwb = value->rValue; mod->B3SOIPDlprwbGiven = TRUE; break; case B3SOIPD_MOD_LPRWG: mod->B3SOIPDlprwg = value->rValue; mod->B3SOIPDlprwgGiven = TRUE; break; case B3SOIPD_MOD_LWR : mod->B3SOIPDlwr = value->rValue; mod->B3SOIPDlwrGiven = TRUE; break; case B3SOIPD_MOD_LNFACTOR : mod->B3SOIPDlnfactor = value->rValue; mod->B3SOIPDlnfactorGiven = TRUE; break; case B3SOIPD_MOD_LDWG : mod->B3SOIPDldwg = value->rValue; mod->B3SOIPDldwgGiven = TRUE; break; case B3SOIPD_MOD_LDWB : mod->B3SOIPDldwb = value->rValue; mod->B3SOIPDldwbGiven = TRUE; break; case B3SOIPD_MOD_LVOFF: mod->B3SOIPDlvoff = value->rValue; mod->B3SOIPDlvoffGiven = TRUE; break; case B3SOIPD_MOD_LETA0: mod->B3SOIPDleta0 = value->rValue; mod->B3SOIPDleta0Given = TRUE; break; case B3SOIPD_MOD_LETAB: mod->B3SOIPDletab = value->rValue; mod->B3SOIPDletabGiven = TRUE; break; case B3SOIPD_MOD_LDSUB: mod->B3SOIPDldsub = value->rValue; mod->B3SOIPDldsubGiven = TRUE; break; case B3SOIPD_MOD_LCIT : mod->B3SOIPDlcit = value->rValue; mod->B3SOIPDlcitGiven = TRUE; break; case B3SOIPD_MOD_LCDSC : mod->B3SOIPDlcdsc = value->rValue; mod->B3SOIPDlcdscGiven = TRUE; break; case B3SOIPD_MOD_LCDSCB : mod->B3SOIPDlcdscb = value->rValue; mod->B3SOIPDlcdscbGiven = TRUE; break; case B3SOIPD_MOD_LCDSCD : mod->B3SOIPDlcdscd = value->rValue; mod->B3SOIPDlcdscdGiven = TRUE; break; case B3SOIPD_MOD_LPCLM: mod->B3SOIPDlpclm = value->rValue; mod->B3SOIPDlpclmGiven = TRUE; break; case B3SOIPD_MOD_LPDIBL1: mod->B3SOIPDlpdibl1 = value->rValue; mod->B3SOIPDlpdibl1Given = TRUE; break; case B3SOIPD_MOD_LPDIBL2: mod->B3SOIPDlpdibl2 = value->rValue; mod->B3SOIPDlpdibl2Given = TRUE; break; case B3SOIPD_MOD_LPDIBLB: mod->B3SOIPDlpdiblb = value->rValue; mod->B3SOIPDlpdiblbGiven = TRUE; break; case B3SOIPD_MOD_LDROUT: mod->B3SOIPDldrout = value->rValue; mod->B3SOIPDldroutGiven = TRUE; break; case B3SOIPD_MOD_LPVAG: mod->B3SOIPDlpvag = value->rValue; mod->B3SOIPDlpvagGiven = TRUE; break; case B3SOIPD_MOD_LDELTA : mod->B3SOIPDldelta = value->rValue; mod->B3SOIPDldeltaGiven = TRUE; break; case B3SOIPD_MOD_LALPHA0 : mod->B3SOIPDlalpha0 = value->rValue; mod->B3SOIPDlalpha0Given = TRUE; break; case B3SOIPD_MOD_LFBJTII : mod->B3SOIPDlfbjtii = value->rValue; mod->B3SOIPDlfbjtiiGiven = TRUE; break; case B3SOIPD_MOD_LBETA0 : mod->B3SOIPDlbeta0 = value->rValue; mod->B3SOIPDlbeta0Given = TRUE; break; case B3SOIPD_MOD_LBETA1 : mod->B3SOIPDlbeta1 = value->rValue; mod->B3SOIPDlbeta1Given = TRUE; break; case B3SOIPD_MOD_LBETA2 : mod->B3SOIPDlbeta2 = value->rValue; mod->B3SOIPDlbeta2Given = TRUE; break; case B3SOIPD_MOD_LVDSATII0 : mod->B3SOIPDlvdsatii0 = value->rValue; mod->B3SOIPDlvdsatii0Given = TRUE; break; case B3SOIPD_MOD_LLII : mod->B3SOIPDllii = value->rValue; mod->B3SOIPDlliiGiven = TRUE; break; case B3SOIPD_MOD_LESATII : mod->B3SOIPDlesatii = value->rValue; mod->B3SOIPDlesatiiGiven = TRUE; break; case B3SOIPD_MOD_LSII0 : mod->B3SOIPDlsii0 = value->rValue; mod->B3SOIPDlsii0Given = TRUE; break; case B3SOIPD_MOD_LSII1 : mod->B3SOIPDlsii1 = value->rValue; mod->B3SOIPDlsii1Given = TRUE; break; case B3SOIPD_MOD_LSII2 : mod->B3SOIPDlsii2 = value->rValue; mod->B3SOIPDlsii2Given = TRUE; break; case B3SOIPD_MOD_LSIID : mod->B3SOIPDlsiid = value->rValue; mod->B3SOIPDlsiidGiven = TRUE; break; case B3SOIPD_MOD_LAGIDL : mod->B3SOIPDlagidl = value->rValue; mod->B3SOIPDlagidlGiven = TRUE; break; case B3SOIPD_MOD_LBGIDL : mod->B3SOIPDlbgidl = value->rValue; mod->B3SOIPDlbgidlGiven = TRUE; break; case B3SOIPD_MOD_LNGIDL : mod->B3SOIPDlngidl = value->rValue; mod->B3SOIPDlngidlGiven = TRUE; break; case B3SOIPD_MOD_LNTUN : mod->B3SOIPDlntun = value->rValue; mod->B3SOIPDlntunGiven = TRUE; break; case B3SOIPD_MOD_LNDIODE : mod->B3SOIPDlndiode = value->rValue; mod->B3SOIPDlndiodeGiven = TRUE; break; case B3SOIPD_MOD_LNRECF0 : mod->B3SOIPDlnrecf0 = value->rValue; mod->B3SOIPDlnrecf0Given = TRUE; break; case B3SOIPD_MOD_LNRECR0 : mod->B3SOIPDlnrecr0 = value->rValue; mod->B3SOIPDlnrecr0Given = TRUE; break; case B3SOIPD_MOD_LISBJT : mod->B3SOIPDlisbjt = value->rValue; mod->B3SOIPDlisbjtGiven = TRUE; break; case B3SOIPD_MOD_LISDIF : mod->B3SOIPDlisdif = value->rValue; mod->B3SOIPDlisdifGiven = TRUE; break; case B3SOIPD_MOD_LISREC : mod->B3SOIPDlisrec = value->rValue; mod->B3SOIPDlisrecGiven = TRUE; break; case B3SOIPD_MOD_LISTUN : mod->B3SOIPDlistun = value->rValue; mod->B3SOIPDlistunGiven = TRUE; break; case B3SOIPD_MOD_LVREC0 : mod->B3SOIPDlvrec0 = value->rValue; mod->B3SOIPDlvrec0Given = TRUE; break; case B3SOIPD_MOD_LVTUN0 : mod->B3SOIPDlvtun0 = value->rValue; mod->B3SOIPDlvtun0Given = TRUE; break; case B3SOIPD_MOD_LNBJT : mod->B3SOIPDlnbjt = value->rValue; mod->B3SOIPDlnbjtGiven = TRUE; break; case B3SOIPD_MOD_LLBJT0 : mod->B3SOIPDllbjt0 = value->rValue; mod->B3SOIPDllbjt0Given = TRUE; break; case B3SOIPD_MOD_LVABJT : mod->B3SOIPDlvabjt = value->rValue; mod->B3SOIPDlvabjtGiven = TRUE; break; case B3SOIPD_MOD_LAELY : mod->B3SOIPDlaely = value->rValue; mod->B3SOIPDlaelyGiven = TRUE; break; case B3SOIPD_MOD_LAHLI : mod->B3SOIPDlahli = value->rValue; mod->B3SOIPDlahliGiven = TRUE; break; /* CV Model */ case B3SOIPD_MOD_LVSDFB : mod->B3SOIPDlvsdfb = value->rValue; mod->B3SOIPDlvsdfbGiven = TRUE; break; case B3SOIPD_MOD_LVSDTH : mod->B3SOIPDlvsdth = value->rValue; mod->B3SOIPDlvsdthGiven = TRUE; break; case B3SOIPD_MOD_LDELVT : mod->B3SOIPDldelvt = value->rValue; mod->B3SOIPDldelvtGiven = TRUE; break; case B3SOIPD_MOD_LACDE : mod->B3SOIPDlacde = value->rValue; mod->B3SOIPDlacdeGiven = TRUE; break; case B3SOIPD_MOD_LMOIN : mod->B3SOIPDlmoin = value->rValue; mod->B3SOIPDlmoinGiven = TRUE; break; /* Width Dependence */ case B3SOIPD_MOD_WNPEAK: mod->B3SOIPDwnpeak = value->rValue; mod->B3SOIPDwnpeakGiven = TRUE; break; case B3SOIPD_MOD_WNSUB: mod->B3SOIPDwnsub = value->rValue; mod->B3SOIPDwnsubGiven = TRUE; break; case B3SOIPD_MOD_WNGATE: mod->B3SOIPDwngate = value->rValue; mod->B3SOIPDwngateGiven = TRUE; break; case B3SOIPD_MOD_WVTH0: mod->B3SOIPDwvth0 = value->rValue; mod->B3SOIPDwvth0Given = TRUE; break; case B3SOIPD_MOD_WK1: mod->B3SOIPDwk1 = value->rValue; mod->B3SOIPDwk1Given = TRUE; break; case B3SOIPD_MOD_WK1W1: mod->B3SOIPDwk1w1 = value->rValue; mod->B3SOIPDwk1w1Given = TRUE; break; case B3SOIPD_MOD_WK1W2: mod->B3SOIPDwk1w2 = value->rValue; mod->B3SOIPDwk1w2Given = TRUE; break; case B3SOIPD_MOD_WK2: mod->B3SOIPDwk2 = value->rValue; mod->B3SOIPDwk2Given = TRUE; break; case B3SOIPD_MOD_WK3: mod->B3SOIPDwk3 = value->rValue; mod->B3SOIPDwk3Given = TRUE; break; case B3SOIPD_MOD_WK3B: mod->B3SOIPDwk3b = value->rValue; mod->B3SOIPDwk3bGiven = TRUE; break; case B3SOIPD_MOD_WKB1 : mod->B3SOIPDwkb1 = value->rValue; mod->B3SOIPDwkb1Given = TRUE; break; case B3SOIPD_MOD_WW0: mod->B3SOIPDww0 = value->rValue; mod->B3SOIPDww0Given = TRUE; break; case B3SOIPD_MOD_WNLX: mod->B3SOIPDwnlx = value->rValue; mod->B3SOIPDwnlxGiven = TRUE; break; case B3SOIPD_MOD_WDVT0: mod->B3SOIPDwdvt0 = value->rValue; mod->B3SOIPDwdvt0Given = TRUE; break; case B3SOIPD_MOD_WDVT1: mod->B3SOIPDwdvt1 = value->rValue; mod->B3SOIPDwdvt1Given = TRUE; break; case B3SOIPD_MOD_WDVT2: mod->B3SOIPDwdvt2 = value->rValue; mod->B3SOIPDwdvt2Given = TRUE; break; case B3SOIPD_MOD_WDVT0W: mod->B3SOIPDwdvt0w = value->rValue; mod->B3SOIPDwdvt0wGiven = TRUE; break; case B3SOIPD_MOD_WDVT1W: mod->B3SOIPDwdvt1w = value->rValue; mod->B3SOIPDwdvt1wGiven = TRUE; break; case B3SOIPD_MOD_WDVT2W: mod->B3SOIPDwdvt2w = value->rValue; mod->B3SOIPDwdvt2wGiven = TRUE; break; case B3SOIPD_MOD_WU0 : mod->B3SOIPDwu0 = value->rValue; mod->B3SOIPDwu0Given = TRUE; break; case B3SOIPD_MOD_WUA: mod->B3SOIPDwua = value->rValue; mod->B3SOIPDwuaGiven = TRUE; break; case B3SOIPD_MOD_WUB: mod->B3SOIPDwub = value->rValue; mod->B3SOIPDwubGiven = TRUE; break; case B3SOIPD_MOD_WUC: mod->B3SOIPDwuc = value->rValue; mod->B3SOIPDwucGiven = TRUE; break; case B3SOIPD_MOD_WVSAT: mod->B3SOIPDwvsat = value->rValue; mod->B3SOIPDwvsatGiven = TRUE; break; case B3SOIPD_MOD_WA0: mod->B3SOIPDwa0 = value->rValue; mod->B3SOIPDwa0Given = TRUE; break; case B3SOIPD_MOD_WAGS: mod->B3SOIPDwags= value->rValue; mod->B3SOIPDwagsGiven = TRUE; break; case B3SOIPD_MOD_WB0 : mod->B3SOIPDwb0 = value->rValue; mod->B3SOIPDwb0Given = TRUE; break; case B3SOIPD_MOD_WB1 : mod->B3SOIPDwb1 = value->rValue; mod->B3SOIPDwb1Given = TRUE; break; case B3SOIPD_MOD_WKETA: mod->B3SOIPDwketa = value->rValue; mod->B3SOIPDwketaGiven = TRUE; break; case B3SOIPD_MOD_WKETAS: mod->B3SOIPDwketas = value->rValue; mod->B3SOIPDwketasGiven = TRUE; break; case B3SOIPD_MOD_WA1: mod->B3SOIPDwa1 = value->rValue; mod->B3SOIPDwa1Given = TRUE; break; case B3SOIPD_MOD_WA2: mod->B3SOIPDwa2 = value->rValue; mod->B3SOIPDwa2Given = TRUE; break; case B3SOIPD_MOD_WRDSW: mod->B3SOIPDwrdsw = value->rValue; mod->B3SOIPDwrdswGiven = TRUE; break; case B3SOIPD_MOD_WPRWB: mod->B3SOIPDwprwb = value->rValue; mod->B3SOIPDwprwbGiven = TRUE; break; case B3SOIPD_MOD_WPRWG: mod->B3SOIPDwprwg = value->rValue; mod->B3SOIPDwprwgGiven = TRUE; break; case B3SOIPD_MOD_WWR : mod->B3SOIPDwwr = value->rValue; mod->B3SOIPDwwrGiven = TRUE; break; case B3SOIPD_MOD_WNFACTOR : mod->B3SOIPDwnfactor = value->rValue; mod->B3SOIPDwnfactorGiven = TRUE; break; case B3SOIPD_MOD_WDWG : mod->B3SOIPDwdwg = value->rValue; mod->B3SOIPDwdwgGiven = TRUE; break; case B3SOIPD_MOD_WDWB : mod->B3SOIPDwdwb = value->rValue; mod->B3SOIPDwdwbGiven = TRUE; break; case B3SOIPD_MOD_WVOFF: mod->B3SOIPDwvoff = value->rValue; mod->B3SOIPDwvoffGiven = TRUE; break; case B3SOIPD_MOD_WETA0: mod->B3SOIPDweta0 = value->rValue; mod->B3SOIPDweta0Given = TRUE; break; case B3SOIPD_MOD_WETAB: mod->B3SOIPDwetab = value->rValue; mod->B3SOIPDwetabGiven = TRUE; break; case B3SOIPD_MOD_WDSUB: mod->B3SOIPDwdsub = value->rValue; mod->B3SOIPDwdsubGiven = TRUE; break; case B3SOIPD_MOD_WCIT : mod->B3SOIPDwcit = value->rValue; mod->B3SOIPDwcitGiven = TRUE; break; case B3SOIPD_MOD_WCDSC : mod->B3SOIPDwcdsc = value->rValue; mod->B3SOIPDwcdscGiven = TRUE; break; case B3SOIPD_MOD_WCDSCB : mod->B3SOIPDwcdscb = value->rValue; mod->B3SOIPDwcdscbGiven = TRUE; break; case B3SOIPD_MOD_WCDSCD : mod->B3SOIPDwcdscd = value->rValue; mod->B3SOIPDwcdscdGiven = TRUE; break; case B3SOIPD_MOD_WPCLM: mod->B3SOIPDwpclm = value->rValue; mod->B3SOIPDwpclmGiven = TRUE; break; case B3SOIPD_MOD_WPDIBL1: mod->B3SOIPDwpdibl1 = value->rValue; mod->B3SOIPDwpdibl1Given = TRUE; break; case B3SOIPD_MOD_WPDIBL2: mod->B3SOIPDwpdibl2 = value->rValue; mod->B3SOIPDwpdibl2Given = TRUE; break; case B3SOIPD_MOD_WPDIBLB: mod->B3SOIPDwpdiblb = value->rValue; mod->B3SOIPDwpdiblbGiven = TRUE; break; case B3SOIPD_MOD_WDROUT: mod->B3SOIPDwdrout = value->rValue; mod->B3SOIPDwdroutGiven = TRUE; break; case B3SOIPD_MOD_WPVAG: mod->B3SOIPDwpvag = value->rValue; mod->B3SOIPDwpvagGiven = TRUE; break; case B3SOIPD_MOD_WDELTA : mod->B3SOIPDwdelta = value->rValue; mod->B3SOIPDwdeltaGiven = TRUE; break; case B3SOIPD_MOD_WALPHA0 : mod->B3SOIPDwalpha0 = value->rValue; mod->B3SOIPDwalpha0Given = TRUE; break; case B3SOIPD_MOD_WFBJTII : mod->B3SOIPDwfbjtii = value->rValue; mod->B3SOIPDwfbjtiiGiven = TRUE; break; case B3SOIPD_MOD_WBETA0 : mod->B3SOIPDwbeta0 = value->rValue; mod->B3SOIPDwbeta0Given = TRUE; break; case B3SOIPD_MOD_WBETA1 : mod->B3SOIPDwbeta1 = value->rValue; mod->B3SOIPDwbeta1Given = TRUE; break; case B3SOIPD_MOD_WBETA2 : mod->B3SOIPDwbeta2 = value->rValue; mod->B3SOIPDwbeta2Given = TRUE; break; case B3SOIPD_MOD_WVDSATII0 : mod->B3SOIPDwvdsatii0 = value->rValue; mod->B3SOIPDwvdsatii0Given = TRUE; break; case B3SOIPD_MOD_WLII : mod->B3SOIPDwlii = value->rValue; mod->B3SOIPDwliiGiven = TRUE; break; case B3SOIPD_MOD_WESATII : mod->B3SOIPDwesatii = value->rValue; mod->B3SOIPDwesatiiGiven = TRUE; break; case B3SOIPD_MOD_WSII0 : mod->B3SOIPDwsii0 = value->rValue; mod->B3SOIPDwsii0Given = TRUE; break; case B3SOIPD_MOD_WSII1 : mod->B3SOIPDwsii1 = value->rValue; mod->B3SOIPDwsii1Given = TRUE; break; case B3SOIPD_MOD_WSII2 : mod->B3SOIPDwsii2 = value->rValue; mod->B3SOIPDwsii2Given = TRUE; break; case B3SOIPD_MOD_WSIID : mod->B3SOIPDwsiid = value->rValue; mod->B3SOIPDwsiidGiven = TRUE; break; case B3SOIPD_MOD_WAGIDL : mod->B3SOIPDwagidl = value->rValue; mod->B3SOIPDwagidlGiven = TRUE; break; case B3SOIPD_MOD_WBGIDL : mod->B3SOIPDwbgidl = value->rValue; mod->B3SOIPDwbgidlGiven = TRUE; break; case B3SOIPD_MOD_WNGIDL : mod->B3SOIPDwngidl = value->rValue; mod->B3SOIPDwngidlGiven = TRUE; break; case B3SOIPD_MOD_WNTUN : mod->B3SOIPDwntun = value->rValue; mod->B3SOIPDwntunGiven = TRUE; break; case B3SOIPD_MOD_WNDIODE : mod->B3SOIPDwndiode = value->rValue; mod->B3SOIPDwndiodeGiven = TRUE; break; case B3SOIPD_MOD_WNRECF0 : mod->B3SOIPDwnrecf0 = value->rValue; mod->B3SOIPDwnrecf0Given = TRUE; break; case B3SOIPD_MOD_WNRECR0 : mod->B3SOIPDwnrecr0 = value->rValue; mod->B3SOIPDwnrecr0Given = TRUE; break; case B3SOIPD_MOD_WISBJT : mod->B3SOIPDwisbjt = value->rValue; mod->B3SOIPDwisbjtGiven = TRUE; break; case B3SOIPD_MOD_WISDIF : mod->B3SOIPDwisdif = value->rValue; mod->B3SOIPDwisdifGiven = TRUE; break; case B3SOIPD_MOD_WISREC : mod->B3SOIPDwisrec = value->rValue; mod->B3SOIPDwisrecGiven = TRUE; break; case B3SOIPD_MOD_WISTUN : mod->B3SOIPDwistun = value->rValue; mod->B3SOIPDwistunGiven = TRUE; break; case B3SOIPD_MOD_WVREC0 : mod->B3SOIPDwvrec0 = value->rValue; mod->B3SOIPDwvrec0Given = TRUE; break; case B3SOIPD_MOD_WVTUN0 : mod->B3SOIPDwvtun0 = value->rValue; mod->B3SOIPDwvtun0Given = TRUE; break; case B3SOIPD_MOD_WNBJT : mod->B3SOIPDwnbjt = value->rValue; mod->B3SOIPDwnbjtGiven = TRUE; break; case B3SOIPD_MOD_WLBJT0 : mod->B3SOIPDwlbjt0 = value->rValue; mod->B3SOIPDwlbjt0Given = TRUE; break; case B3SOIPD_MOD_WVABJT : mod->B3SOIPDwvabjt = value->rValue; mod->B3SOIPDwvabjtGiven = TRUE; break; case B3SOIPD_MOD_WAELY : mod->B3SOIPDwaely = value->rValue; mod->B3SOIPDwaelyGiven = TRUE; break; case B3SOIPD_MOD_WAHLI : mod->B3SOIPDwahli = value->rValue; mod->B3SOIPDwahliGiven = TRUE; break; /* CV Model */ case B3SOIPD_MOD_WVSDFB : mod->B3SOIPDwvsdfb = value->rValue; mod->B3SOIPDwvsdfbGiven = TRUE; break; case B3SOIPD_MOD_WVSDTH : mod->B3SOIPDwvsdth = value->rValue; mod->B3SOIPDwvsdthGiven = TRUE; break; case B3SOIPD_MOD_WDELVT : mod->B3SOIPDwdelvt = value->rValue; mod->B3SOIPDwdelvtGiven = TRUE; break; case B3SOIPD_MOD_WACDE : mod->B3SOIPDwacde = value->rValue; mod->B3SOIPDwacdeGiven = TRUE; break; case B3SOIPD_MOD_WMOIN : mod->B3SOIPDwmoin = value->rValue; mod->B3SOIPDwmoinGiven = TRUE; break; /* Cross-term Dependence */ case B3SOIPD_MOD_PNPEAK: mod->B3SOIPDpnpeak = value->rValue; mod->B3SOIPDpnpeakGiven = TRUE; break; case B3SOIPD_MOD_PNSUB: mod->B3SOIPDpnsub = value->rValue; mod->B3SOIPDpnsubGiven = TRUE; break; case B3SOIPD_MOD_PNGATE: mod->B3SOIPDpngate = value->rValue; mod->B3SOIPDpngateGiven = TRUE; break; case B3SOIPD_MOD_PVTH0: mod->B3SOIPDpvth0 = value->rValue; mod->B3SOIPDpvth0Given = TRUE; break; case B3SOIPD_MOD_PK1: mod->B3SOIPDpk1 = value->rValue; mod->B3SOIPDpk1Given = TRUE; break; case B3SOIPD_MOD_PK1W1: mod->B3SOIPDpk1w1 = value->rValue; mod->B3SOIPDpk1w1Given = TRUE; break; case B3SOIPD_MOD_PK1W2: mod->B3SOIPDpk1w2 = value->rValue; mod->B3SOIPDpk1w2Given = TRUE; break; case B3SOIPD_MOD_PK2: mod->B3SOIPDpk2 = value->rValue; mod->B3SOIPDpk2Given = TRUE; break; case B3SOIPD_MOD_PK3: mod->B3SOIPDpk3 = value->rValue; mod->B3SOIPDpk3Given = TRUE; break; case B3SOIPD_MOD_PK3B: mod->B3SOIPDpk3b = value->rValue; mod->B3SOIPDpk3bGiven = TRUE; break; case B3SOIPD_MOD_PKB1 : mod->B3SOIPDpkb1 = value->rValue; mod->B3SOIPDpkb1Given = TRUE; break; case B3SOIPD_MOD_PW0: mod->B3SOIPDpw0 = value->rValue; mod->B3SOIPDpw0Given = TRUE; break; case B3SOIPD_MOD_PNLX: mod->B3SOIPDpnlx = value->rValue; mod->B3SOIPDpnlxGiven = TRUE; break; case B3SOIPD_MOD_PDVT0: mod->B3SOIPDpdvt0 = value->rValue; mod->B3SOIPDpdvt0Given = TRUE; break; case B3SOIPD_MOD_PDVT1: mod->B3SOIPDpdvt1 = value->rValue; mod->B3SOIPDpdvt1Given = TRUE; break; case B3SOIPD_MOD_PDVT2: mod->B3SOIPDpdvt2 = value->rValue; mod->B3SOIPDpdvt2Given = TRUE; break; case B3SOIPD_MOD_PDVT0W: mod->B3SOIPDpdvt0w = value->rValue; mod->B3SOIPDpdvt0wGiven = TRUE; break; case B3SOIPD_MOD_PDVT1W: mod->B3SOIPDpdvt1w = value->rValue; mod->B3SOIPDpdvt1wGiven = TRUE; break; case B3SOIPD_MOD_PDVT2W: mod->B3SOIPDpdvt2w = value->rValue; mod->B3SOIPDpdvt2wGiven = TRUE; break; case B3SOIPD_MOD_PU0 : mod->B3SOIPDpu0 = value->rValue; mod->B3SOIPDpu0Given = TRUE; break; case B3SOIPD_MOD_PUA: mod->B3SOIPDpua = value->rValue; mod->B3SOIPDpuaGiven = TRUE; break; case B3SOIPD_MOD_PUB: mod->B3SOIPDpub = value->rValue; mod->B3SOIPDpubGiven = TRUE; break; case B3SOIPD_MOD_PUC: mod->B3SOIPDpuc = value->rValue; mod->B3SOIPDpucGiven = TRUE; break; case B3SOIPD_MOD_PVSAT: mod->B3SOIPDpvsat = value->rValue; mod->B3SOIPDpvsatGiven = TRUE; break; case B3SOIPD_MOD_PA0: mod->B3SOIPDpa0 = value->rValue; mod->B3SOIPDpa0Given = TRUE; break; case B3SOIPD_MOD_PAGS: mod->B3SOIPDpags= value->rValue; mod->B3SOIPDpagsGiven = TRUE; break; case B3SOIPD_MOD_PB0 : mod->B3SOIPDpb0 = value->rValue; mod->B3SOIPDpb0Given = TRUE; break; case B3SOIPD_MOD_PB1 : mod->B3SOIPDpb1 = value->rValue; mod->B3SOIPDpb1Given = TRUE; break; case B3SOIPD_MOD_PKETA: mod->B3SOIPDpketa = value->rValue; mod->B3SOIPDpketaGiven = TRUE; break; case B3SOIPD_MOD_PKETAS: mod->B3SOIPDpketas = value->rValue; mod->B3SOIPDpketasGiven = TRUE; break; case B3SOIPD_MOD_PA1: mod->B3SOIPDpa1 = value->rValue; mod->B3SOIPDpa1Given = TRUE; break; case B3SOIPD_MOD_PA2: mod->B3SOIPDpa2 = value->rValue; mod->B3SOIPDpa2Given = TRUE; break; case B3SOIPD_MOD_PRDSW: mod->B3SOIPDprdsw = value->rValue; mod->B3SOIPDprdswGiven = TRUE; break; case B3SOIPD_MOD_PPRWB: mod->B3SOIPDpprwb = value->rValue; mod->B3SOIPDpprwbGiven = TRUE; break; case B3SOIPD_MOD_PPRWG: mod->B3SOIPDpprwg = value->rValue; mod->B3SOIPDpprwgGiven = TRUE; break; case B3SOIPD_MOD_PWR : mod->B3SOIPDpwr = value->rValue; mod->B3SOIPDpwrGiven = TRUE; break; case B3SOIPD_MOD_PNFACTOR : mod->B3SOIPDpnfactor = value->rValue; mod->B3SOIPDpnfactorGiven = TRUE; break; case B3SOIPD_MOD_PDWG : mod->B3SOIPDpdwg = value->rValue; mod->B3SOIPDpdwgGiven = TRUE; break; case B3SOIPD_MOD_PDWB : mod->B3SOIPDpdwb = value->rValue; mod->B3SOIPDpdwbGiven = TRUE; break; case B3SOIPD_MOD_PVOFF: mod->B3SOIPDpvoff = value->rValue; mod->B3SOIPDpvoffGiven = TRUE; break; case B3SOIPD_MOD_PETA0: mod->B3SOIPDpeta0 = value->rValue; mod->B3SOIPDpeta0Given = TRUE; break; case B3SOIPD_MOD_PETAB: mod->B3SOIPDpetab = value->rValue; mod->B3SOIPDpetabGiven = TRUE; break; case B3SOIPD_MOD_PDSUB: mod->B3SOIPDpdsub = value->rValue; mod->B3SOIPDpdsubGiven = TRUE; break; case B3SOIPD_MOD_PCIT : mod->B3SOIPDpcit = value->rValue; mod->B3SOIPDpcitGiven = TRUE; break; case B3SOIPD_MOD_PCDSC : mod->B3SOIPDpcdsc = value->rValue; mod->B3SOIPDpcdscGiven = TRUE; break; case B3SOIPD_MOD_PCDSCB : mod->B3SOIPDpcdscb = value->rValue; mod->B3SOIPDpcdscbGiven = TRUE; break; case B3SOIPD_MOD_PCDSCD : mod->B3SOIPDpcdscd = value->rValue; mod->B3SOIPDpcdscdGiven = TRUE; break; case B3SOIPD_MOD_PPCLM: mod->B3SOIPDppclm = value->rValue; mod->B3SOIPDppclmGiven = TRUE; break; case B3SOIPD_MOD_PPDIBL1: mod->B3SOIPDppdibl1 = value->rValue; mod->B3SOIPDppdibl1Given = TRUE; break; case B3SOIPD_MOD_PPDIBL2: mod->B3SOIPDppdibl2 = value->rValue; mod->B3SOIPDppdibl2Given = TRUE; break; case B3SOIPD_MOD_PPDIBLB: mod->B3SOIPDppdiblb = value->rValue; mod->B3SOIPDppdiblbGiven = TRUE; break; case B3SOIPD_MOD_PDROUT: mod->B3SOIPDpdrout = value->rValue; mod->B3SOIPDpdroutGiven = TRUE; break; case B3SOIPD_MOD_PPVAG: mod->B3SOIPDppvag = value->rValue; mod->B3SOIPDppvagGiven = TRUE; break; case B3SOIPD_MOD_PDELTA : mod->B3SOIPDpdelta = value->rValue; mod->B3SOIPDpdeltaGiven = TRUE; break; case B3SOIPD_MOD_PALPHA0 : mod->B3SOIPDpalpha0 = value->rValue; mod->B3SOIPDpalpha0Given = TRUE; break; case B3SOIPD_MOD_PFBJTII : mod->B3SOIPDpfbjtii = value->rValue; mod->B3SOIPDpfbjtiiGiven = TRUE; break; case B3SOIPD_MOD_PBETA0 : mod->B3SOIPDpbeta0 = value->rValue; mod->B3SOIPDpbeta0Given = TRUE; break; case B3SOIPD_MOD_PBETA1 : mod->B3SOIPDpbeta1 = value->rValue; mod->B3SOIPDpbeta1Given = TRUE; break; case B3SOIPD_MOD_PBETA2 : mod->B3SOIPDpbeta2 = value->rValue; mod->B3SOIPDpbeta2Given = TRUE; break; case B3SOIPD_MOD_PVDSATII0 : mod->B3SOIPDpvdsatii0 = value->rValue; mod->B3SOIPDpvdsatii0Given = TRUE; break; case B3SOIPD_MOD_PLII : mod->B3SOIPDplii = value->rValue; mod->B3SOIPDpliiGiven = TRUE; break; case B3SOIPD_MOD_PESATII : mod->B3SOIPDpesatii = value->rValue; mod->B3SOIPDpesatiiGiven = TRUE; break; case B3SOIPD_MOD_PSII0 : mod->B3SOIPDpsii0 = value->rValue; mod->B3SOIPDpsii0Given = TRUE; break; case B3SOIPD_MOD_PSII1 : mod->B3SOIPDpsii1 = value->rValue; mod->B3SOIPDpsii1Given = TRUE; break; case B3SOIPD_MOD_PSII2 : mod->B3SOIPDpsii2 = value->rValue; mod->B3SOIPDpsii2Given = TRUE; break; case B3SOIPD_MOD_PSIID : mod->B3SOIPDpsiid = value->rValue; mod->B3SOIPDpsiidGiven = TRUE; break; case B3SOIPD_MOD_PAGIDL : mod->B3SOIPDpagidl = value->rValue; mod->B3SOIPDpagidlGiven = TRUE; break; case B3SOIPD_MOD_PBGIDL : mod->B3SOIPDpbgidl = value->rValue; mod->B3SOIPDpbgidlGiven = TRUE; break; case B3SOIPD_MOD_PNGIDL : mod->B3SOIPDpngidl = value->rValue; mod->B3SOIPDpngidlGiven = TRUE; break; case B3SOIPD_MOD_PNTUN : mod->B3SOIPDpntun = value->rValue; mod->B3SOIPDpntunGiven = TRUE; break; case B3SOIPD_MOD_PNDIODE : mod->B3SOIPDpndiode = value->rValue; mod->B3SOIPDpndiodeGiven = TRUE; break; case B3SOIPD_MOD_PNRECF0 : mod->B3SOIPDpnrecf0 = value->rValue; mod->B3SOIPDpnrecf0Given = TRUE; break; case B3SOIPD_MOD_PNRECR0 : mod->B3SOIPDpnrecr0 = value->rValue; mod->B3SOIPDpnrecr0Given = TRUE; break; case B3SOIPD_MOD_PISBJT : mod->B3SOIPDpisbjt = value->rValue; mod->B3SOIPDpisbjtGiven = TRUE; break; case B3SOIPD_MOD_PISDIF : mod->B3SOIPDpisdif = value->rValue; mod->B3SOIPDpisdifGiven = TRUE; break; case B3SOIPD_MOD_PISREC : mod->B3SOIPDpisrec = value->rValue; mod->B3SOIPDpisrecGiven = TRUE; break; case B3SOIPD_MOD_PISTUN : mod->B3SOIPDpistun = value->rValue; mod->B3SOIPDpistunGiven = TRUE; break; case B3SOIPD_MOD_PVREC0 : mod->B3SOIPDpvrec0 = value->rValue; mod->B3SOIPDpvrec0Given = TRUE; break; case B3SOIPD_MOD_PVTUN0 : mod->B3SOIPDpvtun0 = value->rValue; mod->B3SOIPDpvtun0Given = TRUE; break; case B3SOIPD_MOD_PNBJT : mod->B3SOIPDpnbjt = value->rValue; mod->B3SOIPDpnbjtGiven = TRUE; break; case B3SOIPD_MOD_PLBJT0 : mod->B3SOIPDplbjt0 = value->rValue; mod->B3SOIPDplbjt0Given = TRUE; break; case B3SOIPD_MOD_PVABJT : mod->B3SOIPDpvabjt = value->rValue; mod->B3SOIPDpvabjtGiven = TRUE; break; case B3SOIPD_MOD_PAELY : mod->B3SOIPDpaely = value->rValue; mod->B3SOIPDpaelyGiven = TRUE; break; case B3SOIPD_MOD_PAHLI : mod->B3SOIPDpahli = value->rValue; mod->B3SOIPDpahliGiven = TRUE; break; /* CV Model */ case B3SOIPD_MOD_PVSDFB : mod->B3SOIPDpvsdfb = value->rValue; mod->B3SOIPDpvsdfbGiven = TRUE; break; case B3SOIPD_MOD_PVSDTH : mod->B3SOIPDpvsdth = value->rValue; mod->B3SOIPDpvsdthGiven = TRUE; break; case B3SOIPD_MOD_PDELVT : mod->B3SOIPDpdelvt = value->rValue; mod->B3SOIPDpdelvtGiven = TRUE; break; case B3SOIPD_MOD_PACDE : mod->B3SOIPDpacde = value->rValue; mod->B3SOIPDpacdeGiven = TRUE; break; case B3SOIPD_MOD_PMOIN : mod->B3SOIPDpmoin = value->rValue; mod->B3SOIPDpmoinGiven = TRUE; break; /* Added for binning - END */ case B3SOIPD_MOD_NMOS : if(value->iValue) { mod->B3SOIPDtype = 1; mod->B3SOIPDtypeGiven = TRUE; } break; case B3SOIPD_MOD_PMOS : if(value->iValue) { mod->B3SOIPDtype = - 1; mod->B3SOIPDtypeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdext.h0000644000265600020320000000270712264261473022712 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soipdext.h Modified by Paolo Nenzi 2002 **********/ extern int B3SOIPDacLoad(GENmodel *,CKTcircuit*); extern int B3SOIPDask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B3SOIPDconvTest(GENmodel *,CKTcircuit*); extern int B3SOIPDdelete(GENmodel*,IFuid,GENinstance**); extern void B3SOIPDdestroy(GENmodel**); extern int B3SOIPDgetic(GENmodel*,CKTcircuit*); extern int B3SOIPDload(GENmodel*,CKTcircuit*); extern int B3SOIPDmAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B3SOIPDmDelete(GENmodel**,IFuid,GENmodel*); extern int B3SOIPDmParam(int,IFvalue*,GENmodel*); extern void B3SOIPDmosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B3SOIPDparam(int,IFvalue*,GENinstance*,IFvalue*); extern int B3SOIPDpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B3SOIPDsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B3SOIPDtemp(GENmodel*,CKTcircuit*); extern int B3SOIPDtrunc(GENmodel*,CKTcircuit*,double*); extern int B3SOIPDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int B3SOIPDunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdcvtest.c0000644000265600020320000000612712264261473023415 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdcvtest.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDconvTest(GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the B3SOIPD device models */ for (; model != NULL; model = model->B3SOIPDnextModel) { /* loop through all the instances of the model */ for (here = model->B3SOIPDinstances; here != NULL ; here=here->B3SOIPDnextInstance) { vbs = model->B3SOIPDtype * (*(ckt->CKTrhsOld+here->B3SOIPDbNode) - *(ckt->CKTrhsOld+here->B3SOIPDsNodePrime)); vgs = model->B3SOIPDtype * (*(ckt->CKTrhsOld+here->B3SOIPDgNode) - *(ckt->CKTrhsOld+here->B3SOIPDsNodePrime)); vds = model->B3SOIPDtype * (*(ckt->CKTrhsOld+here->B3SOIPDdNodePrime) - *(ckt->CKTrhsOld+here->B3SOIPDsNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIPDvgs) - *(ckt->CKTstate0 + here->B3SOIPDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIPDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIPDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIPDvgs); delvds = vds - *(ckt->CKTstate0 + here->B3SOIPDvds); delvgd = vgd-vgdo; cd = here->B3SOIPDcd; if (here->B3SOIPDmode >= 0) { cdhat = cd - here->B3SOIPDgjdb * delvbd + here->B3SOIPDgmbs * delvbs + here->B3SOIPDgm * delvgs + here->B3SOIPDgds * delvds; } else { cdhat = cd - (here->B3SOIPDgjdb - here->B3SOIPDgmbs) * delvbd - here->B3SOIPDgm * delvgd + here->B3SOIPDgds * delvds; } /* * check convergence */ if ((here->B3SOIPDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->B3SOIPDcjs; cbd = here->B3SOIPDcjd; cbhat = cbs + cbd + here->B3SOIPDgjdb * delvbd + here->B3SOIPDgjsb * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipddef.h0000644000265600020320000021210112264261473022637 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soipddef.h Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Pin Su and Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su and Hui Wan 02/3/5 Modified by Paolo Nenzi 2002 **********/ #ifndef B3SOIPD #define B3SOIPD #define SOICODE /* #define BULKCODE */ #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sB3SOIPDinstance { struct sB3SOIPDmodel *B3SOIPDmodPtr; struct sB3SOIPDinstance *B3SOIPDnextInstance; IFuid B3SOIPDname; int B3SOIPDstates; /* index into state table for this device */ int B3SOIPDdNode; int B3SOIPDgNode; int B3SOIPDsNode; int B3SOIPDeNode; int B3SOIPDpNode; int B3SOIPDbNode; int B3SOIPDtempNode; int B3SOIPDdNodePrime; int B3SOIPDsNodePrime; int B3SOIPDvbsNode; /* for Debug */ int B3SOIPDidsNode; int B3SOIPDicNode; int B3SOIPDibsNode; int B3SOIPDibdNode; int B3SOIPDiiiNode; int B3SOIPDigNode; int B3SOIPDgiggNode; int B3SOIPDgigdNode; int B3SOIPDgigbNode; int B3SOIPDigidlNode; int B3SOIPDitunNode; int B3SOIPDibpNode; int B3SOIPDcbbNode; int B3SOIPDcbdNode; int B3SOIPDcbgNode; int B3SOIPDqbfNode; int B3SOIPDqjsNode; int B3SOIPDqjdNode; double B3SOIPDphi; double B3SOIPDvtm; double B3SOIPDni; double B3SOIPDueff; double B3SOIPDthetavth; double B3SOIPDvon; double B3SOIPDvdsat; double B3SOIPDcgdo; double B3SOIPDcgso; double B3SOIPDcgeo; double B3SOIPDids; double B3SOIPDic; double B3SOIPDibs; double B3SOIPDibd; double B3SOIPDiii; double B3SOIPDig; double B3SOIPDgigg; double B3SOIPDgigd; double B3SOIPDgigb; double B3SOIPDigidl; double B3SOIPDitun; double B3SOIPDibp; double B3SOIPDabeff; double B3SOIPDvbseff; double B3SOIPDcbg; double B3SOIPDcbb; double B3SOIPDcbd; double B3SOIPDqb; double B3SOIPDqbf; double B3SOIPDqjs; double B3SOIPDqjd; int B3SOIPDfloat; double B3SOIPDl; double B3SOIPDw; double B3SOIPDm; double B3SOIPDdrainArea; double B3SOIPDsourceArea; double B3SOIPDdrainSquares; double B3SOIPDsourceSquares; double B3SOIPDdrainPerimeter; double B3SOIPDsourcePerimeter; double B3SOIPDsourceConductance; double B3SOIPDdrainConductance; double B3SOIPDicVBS; double B3SOIPDicVDS; double B3SOIPDicVGS; double B3SOIPDicVES; double B3SOIPDicVPS; int B3SOIPDbjtoff; int B3SOIPDbodyMod; int B3SOIPDdebugMod; double B3SOIPDrth0; double B3SOIPDcth0; double B3SOIPDbodySquares; double B3SOIPDrbodyext; double B3SOIPDfrbody; /* v2.0 release */ double B3SOIPDnbc; double B3SOIPDnseg; double B3SOIPDpdbcp; double B3SOIPDpsbcp; double B3SOIPDagbcp; double B3SOIPDaebcp; double B3SOIPDvbsusr; int B3SOIPDtnodeout; /* Deleted from pParam and moved to here */ double B3SOIPDcsesw; double B3SOIPDcdesw; double B3SOIPDcsbox; double B3SOIPDcdbox; double B3SOIPDcsmin; double B3SOIPDcdmin; double B3SOIPDst4; double B3SOIPDdt4; int B3SOIPDoff; int B3SOIPDmode; /* OP point */ double B3SOIPDqinv; double B3SOIPDcd; double B3SOIPDcjs; double B3SOIPDcjd; double B3SOIPDcbody; /* v2.2 release */ double B3SOIPDcgate; double B3SOIPDgigs; double B3SOIPDgigT; double B3SOIPDcbodcon; double B3SOIPDcth; double B3SOIPDcsubstrate; double B3SOIPDgm; double B3SOIPDcb; double B3SOIPDcdrain; double B3SOIPDgds; double B3SOIPDgmbs; double B3SOIPDgmT; double B3SOIPDgbbs; double B3SOIPDgbgs; double B3SOIPDgbds; double B3SOIPDgbps; double B3SOIPDgbT; double B3SOIPDgjsd; double B3SOIPDgjsb; double B3SOIPDgjsg; double B3SOIPDgjsT; double B3SOIPDgjdb; double B3SOIPDgjdd; double B3SOIPDgjdg; double B3SOIPDgjdT; double B3SOIPDgbpbs; double B3SOIPDgbpps; double B3SOIPDgbpT; double B3SOIPDgtempb; double B3SOIPDgtempg; double B3SOIPDgtempd; double B3SOIPDgtempT; double B3SOIPDcggb; double B3SOIPDcgdb; double B3SOIPDcgsb; double B3SOIPDcgT; double B3SOIPDcbgb; double B3SOIPDcbdb; double B3SOIPDcbsb; double B3SOIPDcbeb; double B3SOIPDcbT; double B3SOIPDcdgb; double B3SOIPDcddb; double B3SOIPDcdsb; double B3SOIPDcdeb; double B3SOIPDcdT; double B3SOIPDceeb; double B3SOIPDceT; double B3SOIPDqse; double B3SOIPDgcse; double B3SOIPDqde; double B3SOIPDgcde; double B3SOIPDrds; /* v2.2.3 */ double B3SOIPDVgsteff; /* v2.2.3 */ double B3SOIPDVdseff; /* v2.2.3 */ double B3SOIPDAbovVgst2Vtm; /* v2.2.3 */ struct b3soipdSizeDependParam *pParam; unsigned B3SOIPDlGiven :1; unsigned B3SOIPDwGiven :1; unsigned B3SOIPDmGiven :1; unsigned B3SOIPDdrainAreaGiven :1; unsigned B3SOIPDsourceAreaGiven :1; unsigned B3SOIPDdrainSquaresGiven :1; unsigned B3SOIPDsourceSquaresGiven :1; unsigned B3SOIPDdrainPerimeterGiven :1; unsigned B3SOIPDsourcePerimeterGiven :1; unsigned B3SOIPDdNodePrimeSet :1; unsigned B3SOIPDsNodePrimeSet :1; unsigned B3SOIPDicVBSGiven :1; unsigned B3SOIPDicVDSGiven :1; unsigned B3SOIPDicVGSGiven :1; unsigned B3SOIPDicVESGiven :1; unsigned B3SOIPDicVPSGiven :1; unsigned B3SOIPDbjtoffGiven :1; unsigned B3SOIPDdebugModGiven :1; unsigned B3SOIPDrth0Given :1; unsigned B3SOIPDcth0Given :1; unsigned B3SOIPDbodySquaresGiven :1; unsigned B3SOIPDfrbodyGiven: 1; /* v2.0 release */ unsigned B3SOIPDnbcGiven :1; unsigned B3SOIPDnsegGiven :1; unsigned B3SOIPDpdbcpGiven :1; unsigned B3SOIPDpsbcpGiven :1; unsigned B3SOIPDagbcpGiven :1; unsigned B3SOIPDaebcpGiven :1; unsigned B3SOIPDvbsusrGiven :1; unsigned B3SOIPDtnodeoutGiven :1; unsigned B3SOIPDoffGiven :1; double *B3SOIPDGePtr; double *B3SOIPDDPePtr; double *B3SOIPDSPePtr; double *B3SOIPDEePtr; double *B3SOIPDEbPtr; double *B3SOIPDBePtr; double *B3SOIPDEgPtr; double *B3SOIPDEdpPtr; double *B3SOIPDEspPtr; double *B3SOIPDTemptempPtr; double *B3SOIPDTempdpPtr; double *B3SOIPDTempspPtr; double *B3SOIPDTempgPtr; double *B3SOIPDTempbPtr; double *B3SOIPDGtempPtr; double *B3SOIPDDPtempPtr; double *B3SOIPDSPtempPtr; double *B3SOIPDEtempPtr; double *B3SOIPDBtempPtr; double *B3SOIPDPtempPtr; double *B3SOIPDBpPtr; double *B3SOIPDPbPtr; double *B3SOIPDPpPtr; double *B3SOIPDDdPtr; double *B3SOIPDGgPtr; double *B3SOIPDSsPtr; double *B3SOIPDBbPtr; double *B3SOIPDDPdpPtr; double *B3SOIPDSPspPtr; double *B3SOIPDDdpPtr; double *B3SOIPDGbPtr; double *B3SOIPDGdpPtr; double *B3SOIPDGspPtr; double *B3SOIPDSspPtr; double *B3SOIPDBdpPtr; double *B3SOIPDBspPtr; double *B3SOIPDDPspPtr; double *B3SOIPDDPdPtr; double *B3SOIPDBgPtr; double *B3SOIPDDPgPtr; double *B3SOIPDSPgPtr; double *B3SOIPDSPsPtr; double *B3SOIPDDPbPtr; double *B3SOIPDSPbPtr; double *B3SOIPDSPdpPtr; double *B3SOIPDVbsPtr; /* Debug */ double *B3SOIPDIdsPtr; double *B3SOIPDIcPtr; double *B3SOIPDIbsPtr; double *B3SOIPDIbdPtr; double *B3SOIPDIiiPtr; double *B3SOIPDIgPtr; double *B3SOIPDGiggPtr; double *B3SOIPDGigdPtr; double *B3SOIPDGigbPtr; double *B3SOIPDIgidlPtr; double *B3SOIPDItunPtr; double *B3SOIPDIbpPtr; double *B3SOIPDCbbPtr; double *B3SOIPDCbdPtr; double *B3SOIPDCbgPtr; double *B3SOIPDqbPtr; double *B3SOIPDQbfPtr; double *B3SOIPDQjsPtr; double *B3SOIPDQjdPtr; #define B3SOIPDvbd B3SOIPDstates+ 0 #define B3SOIPDvbs B3SOIPDstates+ 1 #define B3SOIPDvgs B3SOIPDstates+ 2 #define B3SOIPDvds B3SOIPDstates+ 3 #define B3SOIPDves B3SOIPDstates+ 4 #define B3SOIPDvps B3SOIPDstates+ 5 #define B3SOIPDvg B3SOIPDstates+ 6 #define B3SOIPDvd B3SOIPDstates+ 7 #define B3SOIPDvs B3SOIPDstates+ 8 #define B3SOIPDvp B3SOIPDstates+ 9 #define B3SOIPDve B3SOIPDstates+ 10 #define B3SOIPDdeltemp B3SOIPDstates+ 11 #define B3SOIPDqb B3SOIPDstates+ 12 #define B3SOIPDcqb B3SOIPDstates+ 13 #define B3SOIPDqg B3SOIPDstates+ 14 #define B3SOIPDcqg B3SOIPDstates+ 15 #define B3SOIPDqd B3SOIPDstates+ 16 #define B3SOIPDcqd B3SOIPDstates+ 17 #define B3SOIPDqe B3SOIPDstates+ 18 #define B3SOIPDcqe B3SOIPDstates+ 19 #define B3SOIPDqbs B3SOIPDstates+ 20 #define B3SOIPDqbd B3SOIPDstates+ 21 #define B3SOIPDqbe B3SOIPDstates+ 22 #define B3SOIPDqth B3SOIPDstates+ 23 #define B3SOIPDcqth B3SOIPDstates+ 24 #define B3SOIPDnumStates 25 /* indices to the array of B3SOIPD NOISE SOURCES */ #define B3SOIPDRDNOIZ 0 #define B3SOIPDRSNOIZ 1 #define B3SOIPDIDNOIZ 2 #define B3SOIPDFLNOIZ 3 #define B3SOIPDFBNOIZ 4 #define B3SOIPDTOTNOIZ 5 #define B3SOIPDNSRCS 6 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double B3SOIPDnVar[NSTATVARS][B3SOIPDNSRCS]; #else /* NONOISE */ double **B3SOIPDnVar; #endif /* NONOISE */ } B3SOIPDinstance ; struct b3soipdSizeDependParam { double Width; double Length; double Rth0; double Cth0; double B3SOIPDcdsc; double B3SOIPDcdscb; double B3SOIPDcdscd; double B3SOIPDcit; double B3SOIPDnfactor; double B3SOIPDvsat; double B3SOIPDat; double B3SOIPDa0; double B3SOIPDags; double B3SOIPDa1; double B3SOIPDa2; double B3SOIPDketa; double B3SOIPDnpeak; double B3SOIPDnsub; double B3SOIPDngate; double B3SOIPDgamma1; double B3SOIPDgamma2; double B3SOIPDvbx; double B3SOIPDvbi; double B3SOIPDvbm; double B3SOIPDvbsc; double B3SOIPDxt; double B3SOIPDphi; double B3SOIPDlitl; double B3SOIPDk1; double B3SOIPDkt1; double B3SOIPDkt1l; double B3SOIPDkt2; double B3SOIPDk2; double B3SOIPDk3; double B3SOIPDk3b; double B3SOIPDw0; double B3SOIPDnlx; double B3SOIPDdvt0; double B3SOIPDdvt1; double B3SOIPDdvt2; double B3SOIPDdvt0w; double B3SOIPDdvt1w; double B3SOIPDdvt2w; double B3SOIPDdrout; double B3SOIPDdsub; double B3SOIPDvth0; double B3SOIPDua; double B3SOIPDua1; double B3SOIPDub; double B3SOIPDub1; double B3SOIPDuc; double B3SOIPDuc1; double B3SOIPDu0; double B3SOIPDute; double B3SOIPDvoff; double B3SOIPDvfb; double B3SOIPDuatemp; double B3SOIPDubtemp; double B3SOIPDuctemp; double B3SOIPDrbody; double B3SOIPDrth; double B3SOIPDcth; double B3SOIPDrds0denom; double B3SOIPDvfbb; double B3SOIPDjbjt; double B3SOIPDjdif; double B3SOIPDjrec; double B3SOIPDjtun; double B3SOIPDsdt1; double B3SOIPDst2; double B3SOIPDst3; double B3SOIPDdt2; double B3SOIPDdt3; double B3SOIPDdelta; double B3SOIPDrdsw; double B3SOIPDrds0; double B3SOIPDprwg; double B3SOIPDprwb; double B3SOIPDprt; double B3SOIPDeta0; double B3SOIPDetab; double B3SOIPDpclm; double B3SOIPDpdibl1; double B3SOIPDpdibl2; double B3SOIPDpdiblb; double B3SOIPDpvag; double B3SOIPDwr; double B3SOIPDdwg; double B3SOIPDdwb; double B3SOIPDb0; double B3SOIPDb1; double B3SOIPDalpha0; double B3SOIPDbeta0; /* CV model */ double B3SOIPDcgsl; double B3SOIPDcgdl; double B3SOIPDckappa; double B3SOIPDcf; double B3SOIPDclc; double B3SOIPDcle; /* Added for binning - START0 */ double B3SOIPDkb1; double B3SOIPDk1w1; double B3SOIPDk1w2; double B3SOIPDketas; double B3SOIPDfbjtii; double B3SOIPDbeta1; double B3SOIPDbeta2; double B3SOIPDvdsatii0; double B3SOIPDlii; double B3SOIPDesatii; double B3SOIPDsii0; double B3SOIPDsii1; double B3SOIPDsii2; double B3SOIPDsiid; double B3SOIPDagidl; double B3SOIPDbgidl; double B3SOIPDngidl; double B3SOIPDntun; double B3SOIPDndiode; double B3SOIPDnrecf0; double B3SOIPDnrecr0; double B3SOIPDisbjt; double B3SOIPDisdif; double B3SOIPDisrec; double B3SOIPDistun; double B3SOIPDvrec0; double B3SOIPDvtun0; double B3SOIPDnbjt; double B3SOIPDlbjt0; double B3SOIPDvabjt; double B3SOIPDaely; double B3SOIPDvsdfb; double B3SOIPDvsdth; double B3SOIPDdelvt; /* Added by binning - END0 */ /* Pre-calculated constants */ double B3SOIPDdw; double B3SOIPDdl; double B3SOIPDleff; double B3SOIPDweff; double B3SOIPDdwc; double B3SOIPDdlc; double B3SOIPDleffCV; double B3SOIPDweffCV; double B3SOIPDabulkCVfactor; double B3SOIPDcgso; double B3SOIPDcgdo; double B3SOIPDcgeo; double B3SOIPDu0temp; double B3SOIPDvsattemp; double B3SOIPDsqrtPhi; double B3SOIPDphis3; double B3SOIPDXdep0; double B3SOIPDsqrtXdep0; double B3SOIPDtheta0vb0; double B3SOIPDthetaRout; /* v2.2 release */ double B3SOIPDoxideRatio; /* v2.0 release */ double B3SOIPDk1eff; double B3SOIPDwdios; double B3SOIPDwdiod; double B3SOIPDwdiodCV; double B3SOIPDwdiosCV; double B3SOIPDarfabjt; double B3SOIPDlratio; double B3SOIPDlratiodif; double B3SOIPDvearly; double B3SOIPDahli; double B3SOIPDahli0; double B3SOIPDvfbzb; double B3SOIPDldeb; double B3SOIPDacde; double B3SOIPDmoin; double B3SOIPDleffCVb; double B3SOIPDleffCVbg; double B3SOIPDcof1; double B3SOIPDcof2; double B3SOIPDcof3; double B3SOIPDcof4; double B3SOIPDcdep0; struct b3soipdSizeDependParam *pNext; }; typedef struct sB3SOIPDmodel { int B3SOIPDmodType; struct sB3SOIPDmodel *B3SOIPDnextModel; B3SOIPDinstance *B3SOIPDinstances; IFuid B3SOIPDmodName; int B3SOIPDtype; int B3SOIPDmobMod; int B3SOIPDcapMod; int B3SOIPDnoiMod; int B3SOIPDshMod; int B3SOIPDbinUnit; int B3SOIPDparamChk; double B3SOIPDversion; double B3SOIPDtox; double B3SOIPDdtoxcv; /* v2.2.3 */ double B3SOIPDcdsc; double B3SOIPDcdscb; double B3SOIPDcdscd; double B3SOIPDcit; double B3SOIPDnfactor; double B3SOIPDvsat; double B3SOIPDat; double B3SOIPDa0; double B3SOIPDags; double B3SOIPDa1; double B3SOIPDa2; double B3SOIPDketa; double B3SOIPDnsub; double B3SOIPDnpeak; double B3SOIPDngate; double B3SOIPDgamma1; double B3SOIPDgamma2; double B3SOIPDvbx; double B3SOIPDvbm; double B3SOIPDxt; double B3SOIPDk1; double B3SOIPDkt1; double B3SOIPDkt1l; double B3SOIPDkt2; double B3SOIPDk2; double B3SOIPDk3; double B3SOIPDk3b; double B3SOIPDw0; double B3SOIPDnlx; double B3SOIPDdvt0; double B3SOIPDdvt1; double B3SOIPDdvt2; double B3SOIPDdvt0w; double B3SOIPDdvt1w; double B3SOIPDdvt2w; double B3SOIPDdrout; double B3SOIPDdsub; double B3SOIPDvth0; double B3SOIPDua; double B3SOIPDua1; double B3SOIPDub; double B3SOIPDub1; double B3SOIPDuc; double B3SOIPDuc1; double B3SOIPDu0; double B3SOIPDute; double B3SOIPDvoff; double B3SOIPDdelta; double B3SOIPDrdsw; double B3SOIPDprwg; double B3SOIPDprwb; double B3SOIPDprt; double B3SOIPDeta0; double B3SOIPDetab; double B3SOIPDpclm; double B3SOIPDpdibl1; double B3SOIPDpdibl2; double B3SOIPDpdiblb; double B3SOIPDpvag; double B3SOIPDwr; double B3SOIPDdwg; double B3SOIPDdwb; double B3SOIPDb0; double B3SOIPDb1; double B3SOIPDalpha0; double B3SOIPDtbox; double B3SOIPDtsi; double B3SOIPDxj; double B3SOIPDkb1; double B3SOIPDrth0; double B3SOIPDcth0; double B3SOIPDngidl; double B3SOIPDagidl; double B3SOIPDbgidl; double B3SOIPDndiode; double B3SOIPDistun; double B3SOIPDxbjt; double B3SOIPDxdif; double B3SOIPDxrec; double B3SOIPDxtun; /* v2.2 release */ double B3SOIPDwth0; double B3SOIPDrhalo; double B3SOIPDntox; double B3SOIPDtoxref; double B3SOIPDebg; double B3SOIPDvevb; double B3SOIPDalphaGB1; double B3SOIPDbetaGB1; double B3SOIPDvgb1; double B3SOIPDvecb; double B3SOIPDalphaGB2; double B3SOIPDbetaGB2; double B3SOIPDvgb2; double B3SOIPDtoxqm; double B3SOIPDvoxh; double B3SOIPDdeltavox; int B3SOIPDigMod; /* v2.0 release */ double B3SOIPDk1w1; double B3SOIPDk1w2; double B3SOIPDketas; double B3SOIPDdwbc; double B3SOIPDbeta0; double B3SOIPDbeta1; double B3SOIPDbeta2; double B3SOIPDvdsatii0; double B3SOIPDtii; double B3SOIPDlii; double B3SOIPDsii0; double B3SOIPDsii1; double B3SOIPDsii2; double B3SOIPDsiid; double B3SOIPDfbjtii; double B3SOIPDesatii; double B3SOIPDntun; double B3SOIPDnrecf0; double B3SOIPDnrecr0; double B3SOIPDisbjt; double B3SOIPDisdif; double B3SOIPDisrec; double B3SOIPDln; double B3SOIPDvrec0; double B3SOIPDvtun0; double B3SOIPDnbjt; double B3SOIPDlbjt0; double B3SOIPDldif0; double B3SOIPDvabjt; double B3SOIPDaely; double B3SOIPDahli; double B3SOIPDrbody; double B3SOIPDrbsh; double B3SOIPDtt; double B3SOIPDndif; double B3SOIPDvsdfb; double B3SOIPDvsdth; double B3SOIPDcsdmin; double B3SOIPDasd; double B3SOIPDntrecf; double B3SOIPDntrecr; double B3SOIPDdlcb; double B3SOIPDfbody; double B3SOIPDtcjswg; double B3SOIPDtpbswg; double B3SOIPDacde; double B3SOIPDmoin; double B3SOIPDdelvt; double B3SOIPDdlbg; /* CV model */ double B3SOIPDcgsl; double B3SOIPDcgdl; double B3SOIPDckappa; double B3SOIPDcf; double B3SOIPDclc; double B3SOIPDcle; double B3SOIPDdwc; double B3SOIPDdlc; double B3SOIPDtnom; double B3SOIPDcgso; double B3SOIPDcgdo; double B3SOIPDcgeo; double B3SOIPDxpart; double B3SOIPDcFringOut; double B3SOIPDcFringMax; double B3SOIPDsheetResistance; double B3SOIPDbodyJctGateSideGradingCoeff; double B3SOIPDGatesidewallJctPotential; double B3SOIPDunitLengthGateSidewallJctCap; double B3SOIPDcsdesw; double B3SOIPDLint; double B3SOIPDLl; double B3SOIPDLlc; /* v2.2.3 */ double B3SOIPDLln; double B3SOIPDLw; double B3SOIPDLwc; /* v2.2.3 */ double B3SOIPDLwn; double B3SOIPDLwl; double B3SOIPDLwlc; /* v2.2.3 */ double B3SOIPDLmin; double B3SOIPDLmax; double B3SOIPDWint; double B3SOIPDWl; double B3SOIPDWlc; /* v2.2.3 */ double B3SOIPDWln; double B3SOIPDWw; double B3SOIPDWwc; /* v2.2.3 */ double B3SOIPDWwn; double B3SOIPDWwl; double B3SOIPDWwlc; /* v2.2.3 */ double B3SOIPDWmin; double B3SOIPDWmax; /* Added for binning - START1 */ /* Length Dependence */ double B3SOIPDlnpeak; double B3SOIPDlnsub; double B3SOIPDlngate; double B3SOIPDlvth0; double B3SOIPDlk1; double B3SOIPDlk1w1; double B3SOIPDlk1w2; double B3SOIPDlk2; double B3SOIPDlk3; double B3SOIPDlk3b; double B3SOIPDlkb1; double B3SOIPDlw0; double B3SOIPDlnlx; double B3SOIPDldvt0; double B3SOIPDldvt1; double B3SOIPDldvt2; double B3SOIPDldvt0w; double B3SOIPDldvt1w; double B3SOIPDldvt2w; double B3SOIPDlu0; double B3SOIPDlua; double B3SOIPDlub; double B3SOIPDluc; double B3SOIPDlvsat; double B3SOIPDla0; double B3SOIPDlags; double B3SOIPDlb0; double B3SOIPDlb1; double B3SOIPDlketa; double B3SOIPDlketas; double B3SOIPDla1; double B3SOIPDla2; double B3SOIPDlrdsw; double B3SOIPDlprwb; double B3SOIPDlprwg; double B3SOIPDlwr; double B3SOIPDlnfactor; double B3SOIPDldwg; double B3SOIPDldwb; double B3SOIPDlvoff; double B3SOIPDleta0; double B3SOIPDletab; double B3SOIPDldsub; double B3SOIPDlcit; double B3SOIPDlcdsc; double B3SOIPDlcdscb; double B3SOIPDlcdscd; double B3SOIPDlpclm; double B3SOIPDlpdibl1; double B3SOIPDlpdibl2; double B3SOIPDlpdiblb; double B3SOIPDldrout; double B3SOIPDlpvag; double B3SOIPDldelta; double B3SOIPDlalpha0; double B3SOIPDlfbjtii; double B3SOIPDlbeta0; double B3SOIPDlbeta1; double B3SOIPDlbeta2; double B3SOIPDlvdsatii0; double B3SOIPDllii; double B3SOIPDlesatii; double B3SOIPDlsii0; double B3SOIPDlsii1; double B3SOIPDlsii2; double B3SOIPDlsiid; double B3SOIPDlagidl; double B3SOIPDlbgidl; double B3SOIPDlngidl; double B3SOIPDlntun; double B3SOIPDlndiode; double B3SOIPDlnrecf0; double B3SOIPDlnrecr0; double B3SOIPDlisbjt; double B3SOIPDlisdif; double B3SOIPDlisrec; double B3SOIPDlistun; double B3SOIPDlvrec0; double B3SOIPDlvtun0; double B3SOIPDlnbjt; double B3SOIPDllbjt0; double B3SOIPDlvabjt; double B3SOIPDlaely; double B3SOIPDlahli; /* CV model */ double B3SOIPDlvsdfb; double B3SOIPDlvsdth; double B3SOIPDldelvt; double B3SOIPDlacde; double B3SOIPDlmoin; /* Width Dependence */ double B3SOIPDwnpeak; double B3SOIPDwnsub; double B3SOIPDwngate; double B3SOIPDwvth0; double B3SOIPDwk1; double B3SOIPDwk1w1; double B3SOIPDwk1w2; double B3SOIPDwk2; double B3SOIPDwk3; double B3SOIPDwk3b; double B3SOIPDwkb1; double B3SOIPDww0; double B3SOIPDwnlx; double B3SOIPDwdvt0; double B3SOIPDwdvt1; double B3SOIPDwdvt2; double B3SOIPDwdvt0w; double B3SOIPDwdvt1w; double B3SOIPDwdvt2w; double B3SOIPDwu0; double B3SOIPDwua; double B3SOIPDwub; double B3SOIPDwuc; double B3SOIPDwvsat; double B3SOIPDwa0; double B3SOIPDwags; double B3SOIPDwb0; double B3SOIPDwb1; double B3SOIPDwketa; double B3SOIPDwketas; double B3SOIPDwa1; double B3SOIPDwa2; double B3SOIPDwrdsw; double B3SOIPDwprwb; double B3SOIPDwprwg; double B3SOIPDwwr; double B3SOIPDwnfactor; double B3SOIPDwdwg; double B3SOIPDwdwb; double B3SOIPDwvoff; double B3SOIPDweta0; double B3SOIPDwetab; double B3SOIPDwdsub; double B3SOIPDwcit; double B3SOIPDwcdsc; double B3SOIPDwcdscb; double B3SOIPDwcdscd; double B3SOIPDwpclm; double B3SOIPDwpdibl1; double B3SOIPDwpdibl2; double B3SOIPDwpdiblb; double B3SOIPDwdrout; double B3SOIPDwpvag; double B3SOIPDwdelta; double B3SOIPDwalpha0; double B3SOIPDwfbjtii; double B3SOIPDwbeta0; double B3SOIPDwbeta1; double B3SOIPDwbeta2; double B3SOIPDwvdsatii0; double B3SOIPDwlii; double B3SOIPDwesatii; double B3SOIPDwsii0; double B3SOIPDwsii1; double B3SOIPDwsii2; double B3SOIPDwsiid; double B3SOIPDwagidl; double B3SOIPDwbgidl; double B3SOIPDwngidl; double B3SOIPDwntun; double B3SOIPDwndiode; double B3SOIPDwnrecf0; double B3SOIPDwnrecr0; double B3SOIPDwisbjt; double B3SOIPDwisdif; double B3SOIPDwisrec; double B3SOIPDwistun; double B3SOIPDwvrec0; double B3SOIPDwvtun0; double B3SOIPDwnbjt; double B3SOIPDwlbjt0; double B3SOIPDwvabjt; double B3SOIPDwaely; double B3SOIPDwahli; /* CV model */ double B3SOIPDwvsdfb; double B3SOIPDwvsdth; double B3SOIPDwdelvt; double B3SOIPDwacde; double B3SOIPDwmoin; /* Cross-term Dependence */ double B3SOIPDpnpeak; double B3SOIPDpnsub; double B3SOIPDpngate; double B3SOIPDpvth0; double B3SOIPDpk1; double B3SOIPDpk1w1; double B3SOIPDpk1w2; double B3SOIPDpk2; double B3SOIPDpk3; double B3SOIPDpk3b; double B3SOIPDpkb1; double B3SOIPDpw0; double B3SOIPDpnlx; double B3SOIPDpdvt0; double B3SOIPDpdvt1; double B3SOIPDpdvt2; double B3SOIPDpdvt0w; double B3SOIPDpdvt1w; double B3SOIPDpdvt2w; double B3SOIPDpu0; double B3SOIPDpua; double B3SOIPDpub; double B3SOIPDpuc; double B3SOIPDpvsat; double B3SOIPDpa0; double B3SOIPDpags; double B3SOIPDpb0; double B3SOIPDpb1; double B3SOIPDpketa; double B3SOIPDpketas; double B3SOIPDpa1; double B3SOIPDpa2; double B3SOIPDprdsw; double B3SOIPDpprwb; double B3SOIPDpprwg; double B3SOIPDpwr; double B3SOIPDpnfactor; double B3SOIPDpdwg; double B3SOIPDpdwb; double B3SOIPDpvoff; double B3SOIPDpeta0; double B3SOIPDpetab; double B3SOIPDpdsub; double B3SOIPDpcit; double B3SOIPDpcdsc; double B3SOIPDpcdscb; double B3SOIPDpcdscd; double B3SOIPDppclm; double B3SOIPDppdibl1; double B3SOIPDppdibl2; double B3SOIPDppdiblb; double B3SOIPDpdrout; double B3SOIPDppvag; double B3SOIPDpdelta; double B3SOIPDpalpha0; double B3SOIPDpfbjtii; double B3SOIPDpbeta0; double B3SOIPDpbeta1; double B3SOIPDpbeta2; double B3SOIPDpvdsatii0; double B3SOIPDplii; double B3SOIPDpesatii; double B3SOIPDpsii0; double B3SOIPDpsii1; double B3SOIPDpsii2; double B3SOIPDpsiid; double B3SOIPDpagidl; double B3SOIPDpbgidl; double B3SOIPDpngidl; double B3SOIPDpntun; double B3SOIPDpndiode; double B3SOIPDpnrecf0; double B3SOIPDpnrecr0; double B3SOIPDpisbjt; double B3SOIPDpisdif; double B3SOIPDpisrec; double B3SOIPDpistun; double B3SOIPDpvrec0; double B3SOIPDpvtun0; double B3SOIPDpnbjt; double B3SOIPDplbjt0; double B3SOIPDpvabjt; double B3SOIPDpaely; double B3SOIPDpahli; /* CV model */ double B3SOIPDpvsdfb; double B3SOIPDpvsdth; double B3SOIPDpdelvt; double B3SOIPDpacde; double B3SOIPDpmoin; /* Added for binning - END1 */ /* Pre-calculated constants */ double B3SOIPDcbox; double B3SOIPDcsi; double B3SOIPDcsieff; double B3SOIPDcoxt; double B3SOIPDnfb; double B3SOIPDadice; double B3SOIPDqsi; double B3SOIPDqsieff; double B3SOIPDeg0; /* MCJ: move to size-dependent param. */ double B3SOIPDvtm; double B3SOIPDcox; double B3SOIPDcof1; double B3SOIPDcof2; double B3SOIPDcof3; double B3SOIPDcof4; double B3SOIPDvcrit; double B3SOIPDfactor1; double B3SOIPDoxideTrapDensityA; double B3SOIPDoxideTrapDensityB; double B3SOIPDoxideTrapDensityC; double B3SOIPDem; double B3SOIPDef; double B3SOIPDaf; double B3SOIPDkf; double B3SOIPDnoif; struct b3soipdSizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned B3SOIPDtboxGiven:1; unsigned B3SOIPDtsiGiven :1; unsigned B3SOIPDxjGiven :1; unsigned B3SOIPDkb1Given :1; unsigned B3SOIPDrth0Given :1; unsigned B3SOIPDcth0Given :1; unsigned B3SOIPDngidlGiven :1; unsigned B3SOIPDagidlGiven :1; unsigned B3SOIPDbgidlGiven :1; unsigned B3SOIPDndiodeGiven :1; unsigned B3SOIPDxbjtGiven :1; unsigned B3SOIPDxdifGiven :1; unsigned B3SOIPDxrecGiven :1; unsigned B3SOIPDxtunGiven :1; unsigned B3SOIPDttGiven :1; unsigned B3SOIPDvsdfbGiven :1; unsigned B3SOIPDvsdthGiven :1; unsigned B3SOIPDasdGiven :1; unsigned B3SOIPDcsdminGiven :1; unsigned B3SOIPDmobModGiven :1; unsigned B3SOIPDbinUnitGiven :1; unsigned B3SOIPDcapModGiven :1; unsigned B3SOIPDparamChkGiven :1; unsigned B3SOIPDnoiModGiven :1; unsigned B3SOIPDshModGiven :1; unsigned B3SOIPDtypeGiven :1; unsigned B3SOIPDtoxGiven :1; unsigned B3SOIPDdtoxcvGiven :1; /* v2.2.3 */ unsigned B3SOIPDversionGiven :1; unsigned B3SOIPDcdscGiven :1; unsigned B3SOIPDcdscbGiven :1; unsigned B3SOIPDcdscdGiven :1; unsigned B3SOIPDcitGiven :1; unsigned B3SOIPDnfactorGiven :1; unsigned B3SOIPDvsatGiven :1; unsigned B3SOIPDatGiven :1; unsigned B3SOIPDa0Given :1; unsigned B3SOIPDagsGiven :1; unsigned B3SOIPDa1Given :1; unsigned B3SOIPDa2Given :1; unsigned B3SOIPDketaGiven :1; unsigned B3SOIPDnsubGiven :1; unsigned B3SOIPDnpeakGiven :1; unsigned B3SOIPDngateGiven :1; unsigned B3SOIPDgamma1Given :1; unsigned B3SOIPDgamma2Given :1; unsigned B3SOIPDvbxGiven :1; unsigned B3SOIPDvbmGiven :1; unsigned B3SOIPDxtGiven :1; unsigned B3SOIPDk1Given :1; unsigned B3SOIPDkt1Given :1; unsigned B3SOIPDkt1lGiven :1; unsigned B3SOIPDkt2Given :1; unsigned B3SOIPDk2Given :1; unsigned B3SOIPDk3Given :1; unsigned B3SOIPDk3bGiven :1; unsigned B3SOIPDw0Given :1; unsigned B3SOIPDnlxGiven :1; unsigned B3SOIPDdvt0Given :1; unsigned B3SOIPDdvt1Given :1; unsigned B3SOIPDdvt2Given :1; unsigned B3SOIPDdvt0wGiven :1; unsigned B3SOIPDdvt1wGiven :1; unsigned B3SOIPDdvt2wGiven :1; unsigned B3SOIPDdroutGiven :1; unsigned B3SOIPDdsubGiven :1; unsigned B3SOIPDvth0Given :1; unsigned B3SOIPDuaGiven :1; unsigned B3SOIPDua1Given :1; unsigned B3SOIPDubGiven :1; unsigned B3SOIPDub1Given :1; unsigned B3SOIPDucGiven :1; unsigned B3SOIPDuc1Given :1; unsigned B3SOIPDu0Given :1; unsigned B3SOIPDuteGiven :1; unsigned B3SOIPDvoffGiven :1; unsigned B3SOIPDrdswGiven :1; unsigned B3SOIPDprwgGiven :1; unsigned B3SOIPDprwbGiven :1; unsigned B3SOIPDprtGiven :1; unsigned B3SOIPDeta0Given :1; unsigned B3SOIPDetabGiven :1; unsigned B3SOIPDpclmGiven :1; unsigned B3SOIPDpdibl1Given :1; unsigned B3SOIPDpdibl2Given :1; unsigned B3SOIPDpdiblbGiven :1; unsigned B3SOIPDpvagGiven :1; unsigned B3SOIPDdeltaGiven :1; unsigned B3SOIPDwrGiven :1; unsigned B3SOIPDdwgGiven :1; unsigned B3SOIPDdwbGiven :1; unsigned B3SOIPDb0Given :1; unsigned B3SOIPDb1Given :1; unsigned B3SOIPDalpha0Given :1; /* v2.2 release */ unsigned B3SOIPDwth0Given :1; unsigned B3SOIPDrhaloGiven :1; unsigned B3SOIPDntoxGiven :1; unsigned B3SOIPDtoxrefGiven :1; unsigned B3SOIPDebgGiven :1; unsigned B3SOIPDvevbGiven :1; unsigned B3SOIPDalphaGB1Given :1; unsigned B3SOIPDbetaGB1Given :1; unsigned B3SOIPDvgb1Given :1; unsigned B3SOIPDvecbGiven :1; unsigned B3SOIPDalphaGB2Given :1; unsigned B3SOIPDbetaGB2Given :1; unsigned B3SOIPDvgb2Given :1; unsigned B3SOIPDtoxqmGiven :1; unsigned B3SOIPDigModGiven :1; unsigned B3SOIPDvoxhGiven :1; unsigned B3SOIPDdeltavoxGiven :1; /* v2.0 release */ unsigned B3SOIPDk1w1Given :1; unsigned B3SOIPDk1w2Given :1; unsigned B3SOIPDketasGiven :1; unsigned B3SOIPDdwbcGiven :1; unsigned B3SOIPDbeta0Given :1; unsigned B3SOIPDbeta1Given :1; unsigned B3SOIPDbeta2Given :1; unsigned B3SOIPDvdsatii0Given :1; unsigned B3SOIPDtiiGiven :1; unsigned B3SOIPDliiGiven :1; unsigned B3SOIPDsii0Given :1; unsigned B3SOIPDsii1Given :1; unsigned B3SOIPDsii2Given :1; unsigned B3SOIPDsiidGiven :1; unsigned B3SOIPDfbjtiiGiven :1; unsigned B3SOIPDesatiiGiven :1; unsigned B3SOIPDntunGiven :1; unsigned B3SOIPDnrecf0Given :1; unsigned B3SOIPDnrecr0Given :1; unsigned B3SOIPDisbjtGiven :1; unsigned B3SOIPDisdifGiven :1; unsigned B3SOIPDisrecGiven :1; unsigned B3SOIPDistunGiven :1; unsigned B3SOIPDlnGiven :1; unsigned B3SOIPDvrec0Given :1; unsigned B3SOIPDvtun0Given :1; unsigned B3SOIPDnbjtGiven :1; unsigned B3SOIPDlbjt0Given :1; unsigned B3SOIPDldif0Given :1; unsigned B3SOIPDvabjtGiven :1; unsigned B3SOIPDaelyGiven :1; unsigned B3SOIPDahliGiven :1; unsigned B3SOIPDrbodyGiven :1; unsigned B3SOIPDrbshGiven :1; unsigned B3SOIPDndifGiven :1; unsigned B3SOIPDntrecfGiven :1; unsigned B3SOIPDntrecrGiven :1; unsigned B3SOIPDdlcbGiven :1; unsigned B3SOIPDfbodyGiven :1; unsigned B3SOIPDtcjswgGiven :1; unsigned B3SOIPDtpbswgGiven :1; unsigned B3SOIPDacdeGiven :1; unsigned B3SOIPDmoinGiven :1; unsigned B3SOIPDdelvtGiven :1; unsigned B3SOIPDdlbgGiven :1; /* CV model */ unsigned B3SOIPDcgslGiven :1; unsigned B3SOIPDcgdlGiven :1; unsigned B3SOIPDckappaGiven :1; unsigned B3SOIPDcfGiven :1; unsigned B3SOIPDclcGiven :1; unsigned B3SOIPDcleGiven :1; unsigned B3SOIPDdwcGiven :1; unsigned B3SOIPDdlcGiven :1; /* Added for binning - START2 */ /* Length Dependence */ unsigned B3SOIPDlnpeakGiven :1; unsigned B3SOIPDlnsubGiven :1; unsigned B3SOIPDlngateGiven :1; unsigned B3SOIPDlvth0Given :1; unsigned B3SOIPDlk1Given :1; unsigned B3SOIPDlk1w1Given :1; unsigned B3SOIPDlk1w2Given :1; unsigned B3SOIPDlk2Given :1; unsigned B3SOIPDlk3Given :1; unsigned B3SOIPDlk3bGiven :1; unsigned B3SOIPDlkb1Given :1; unsigned B3SOIPDlw0Given :1; unsigned B3SOIPDlnlxGiven :1; unsigned B3SOIPDldvt0Given :1; unsigned B3SOIPDldvt1Given :1; unsigned B3SOIPDldvt2Given :1; unsigned B3SOIPDldvt0wGiven :1; unsigned B3SOIPDldvt1wGiven :1; unsigned B3SOIPDldvt2wGiven :1; unsigned B3SOIPDlu0Given :1; unsigned B3SOIPDluaGiven :1; unsigned B3SOIPDlubGiven :1; unsigned B3SOIPDlucGiven :1; unsigned B3SOIPDlvsatGiven :1; unsigned B3SOIPDla0Given :1; unsigned B3SOIPDlagsGiven :1; unsigned B3SOIPDlb0Given :1; unsigned B3SOIPDlb1Given :1; unsigned B3SOIPDlketaGiven :1; unsigned B3SOIPDlketasGiven :1; unsigned B3SOIPDla1Given :1; unsigned B3SOIPDla2Given :1; unsigned B3SOIPDlrdswGiven :1; unsigned B3SOIPDlprwbGiven :1; unsigned B3SOIPDlprwgGiven :1; unsigned B3SOIPDlwrGiven :1; unsigned B3SOIPDlnfactorGiven :1; unsigned B3SOIPDldwgGiven :1; unsigned B3SOIPDldwbGiven :1; unsigned B3SOIPDlvoffGiven :1; unsigned B3SOIPDleta0Given :1; unsigned B3SOIPDletabGiven :1; unsigned B3SOIPDldsubGiven :1; unsigned B3SOIPDlcitGiven :1; unsigned B3SOIPDlcdscGiven :1; unsigned B3SOIPDlcdscbGiven :1; unsigned B3SOIPDlcdscdGiven :1; unsigned B3SOIPDlpclmGiven :1; unsigned B3SOIPDlpdibl1Given :1; unsigned B3SOIPDlpdibl2Given :1; unsigned B3SOIPDlpdiblbGiven :1; unsigned B3SOIPDldroutGiven :1; unsigned B3SOIPDlpvagGiven :1; unsigned B3SOIPDldeltaGiven :1; unsigned B3SOIPDlalpha0Given :1; unsigned B3SOIPDlfbjtiiGiven :1; unsigned B3SOIPDlbeta0Given :1; unsigned B3SOIPDlbeta1Given :1; unsigned B3SOIPDlbeta2Given :1; unsigned B3SOIPDlvdsatii0Given :1; unsigned B3SOIPDlliiGiven :1; unsigned B3SOIPDlesatiiGiven :1; unsigned B3SOIPDlsii0Given :1; unsigned B3SOIPDlsii1Given :1; unsigned B3SOIPDlsii2Given :1; unsigned B3SOIPDlsiidGiven :1; unsigned B3SOIPDlagidlGiven :1; unsigned B3SOIPDlbgidlGiven :1; unsigned B3SOIPDlngidlGiven :1; unsigned B3SOIPDlntunGiven :1; unsigned B3SOIPDlndiodeGiven :1; unsigned B3SOIPDlnrecf0Given :1; unsigned B3SOIPDlnrecr0Given :1; unsigned B3SOIPDlisbjtGiven :1; unsigned B3SOIPDlisdifGiven :1; unsigned B3SOIPDlisrecGiven :1; unsigned B3SOIPDlistunGiven :1; unsigned B3SOIPDlvrec0Given :1; unsigned B3SOIPDlvtun0Given :1; unsigned B3SOIPDlnbjtGiven :1; unsigned B3SOIPDllbjt0Given :1; unsigned B3SOIPDlvabjtGiven :1; unsigned B3SOIPDlaelyGiven :1; unsigned B3SOIPDlahliGiven :1; /* CV model */ unsigned B3SOIPDlvsdfbGiven :1; unsigned B3SOIPDlvsdthGiven :1; unsigned B3SOIPDldelvtGiven :1; unsigned B3SOIPDlacdeGiven :1; unsigned B3SOIPDlmoinGiven :1; /* Width Dependence */ unsigned B3SOIPDwnpeakGiven :1; unsigned B3SOIPDwnsubGiven :1; unsigned B3SOIPDwngateGiven :1; unsigned B3SOIPDwvth0Given :1; unsigned B3SOIPDwk1Given :1; unsigned B3SOIPDwk1w1Given :1; unsigned B3SOIPDwk1w2Given :1; unsigned B3SOIPDwk2Given :1; unsigned B3SOIPDwk3Given :1; unsigned B3SOIPDwk3bGiven :1; unsigned B3SOIPDwkb1Given :1; unsigned B3SOIPDww0Given :1; unsigned B3SOIPDwnlxGiven :1; unsigned B3SOIPDwdvt0Given :1; unsigned B3SOIPDwdvt1Given :1; unsigned B3SOIPDwdvt2Given :1; unsigned B3SOIPDwdvt0wGiven :1; unsigned B3SOIPDwdvt1wGiven :1; unsigned B3SOIPDwdvt2wGiven :1; unsigned B3SOIPDwu0Given :1; unsigned B3SOIPDwuaGiven :1; unsigned B3SOIPDwubGiven :1; unsigned B3SOIPDwucGiven :1; unsigned B3SOIPDwvsatGiven :1; unsigned B3SOIPDwa0Given :1; unsigned B3SOIPDwagsGiven :1; unsigned B3SOIPDwb0Given :1; unsigned B3SOIPDwb1Given :1; unsigned B3SOIPDwketaGiven :1; unsigned B3SOIPDwketasGiven :1; unsigned B3SOIPDwa1Given :1; unsigned B3SOIPDwa2Given :1; unsigned B3SOIPDwrdswGiven :1; unsigned B3SOIPDwprwbGiven :1; unsigned B3SOIPDwprwgGiven :1; unsigned B3SOIPDwwrGiven :1; unsigned B3SOIPDwnfactorGiven :1; unsigned B3SOIPDwdwgGiven :1; unsigned B3SOIPDwdwbGiven :1; unsigned B3SOIPDwvoffGiven :1; unsigned B3SOIPDweta0Given :1; unsigned B3SOIPDwetabGiven :1; unsigned B3SOIPDwdsubGiven :1; unsigned B3SOIPDwcitGiven :1; unsigned B3SOIPDwcdscGiven :1; unsigned B3SOIPDwcdscbGiven :1; unsigned B3SOIPDwcdscdGiven :1; unsigned B3SOIPDwpclmGiven :1; unsigned B3SOIPDwpdibl1Given :1; unsigned B3SOIPDwpdibl2Given :1; unsigned B3SOIPDwpdiblbGiven :1; unsigned B3SOIPDwdroutGiven :1; unsigned B3SOIPDwpvagGiven :1; unsigned B3SOIPDwdeltaGiven :1; unsigned B3SOIPDwalpha0Given :1; unsigned B3SOIPDwfbjtiiGiven :1; unsigned B3SOIPDwbeta0Given :1; unsigned B3SOIPDwbeta1Given :1; unsigned B3SOIPDwbeta2Given :1; unsigned B3SOIPDwvdsatii0Given :1; unsigned B3SOIPDwliiGiven :1; unsigned B3SOIPDwesatiiGiven :1; unsigned B3SOIPDwsii0Given :1; unsigned B3SOIPDwsii1Given :1; unsigned B3SOIPDwsii2Given :1; unsigned B3SOIPDwsiidGiven :1; unsigned B3SOIPDwagidlGiven :1; unsigned B3SOIPDwbgidlGiven :1; unsigned B3SOIPDwngidlGiven :1; unsigned B3SOIPDwntunGiven :1; unsigned B3SOIPDwndiodeGiven :1; unsigned B3SOIPDwnrecf0Given :1; unsigned B3SOIPDwnrecr0Given :1; unsigned B3SOIPDwisbjtGiven :1; unsigned B3SOIPDwisdifGiven :1; unsigned B3SOIPDwisrecGiven :1; unsigned B3SOIPDwistunGiven :1; unsigned B3SOIPDwvrec0Given :1; unsigned B3SOIPDwvtun0Given :1; unsigned B3SOIPDwnbjtGiven :1; unsigned B3SOIPDwlbjt0Given :1; unsigned B3SOIPDwvabjtGiven :1; unsigned B3SOIPDwaelyGiven :1; unsigned B3SOIPDwahliGiven :1; /* CV model */ unsigned B3SOIPDwvsdfbGiven :1; unsigned B3SOIPDwvsdthGiven :1; unsigned B3SOIPDwdelvtGiven :1; unsigned B3SOIPDwacdeGiven :1; unsigned B3SOIPDwmoinGiven :1; /* Cross-term Dependence */ unsigned B3SOIPDpnpeakGiven :1; unsigned B3SOIPDpnsubGiven :1; unsigned B3SOIPDpngateGiven :1; unsigned B3SOIPDpvth0Given :1; unsigned B3SOIPDpk1Given :1; unsigned B3SOIPDpk1w1Given :1; unsigned B3SOIPDpk1w2Given :1; unsigned B3SOIPDpk2Given :1; unsigned B3SOIPDpk3Given :1; unsigned B3SOIPDpk3bGiven :1; unsigned B3SOIPDpkb1Given :1; unsigned B3SOIPDpw0Given :1; unsigned B3SOIPDpnlxGiven :1; unsigned B3SOIPDpdvt0Given :1; unsigned B3SOIPDpdvt1Given :1; unsigned B3SOIPDpdvt2Given :1; unsigned B3SOIPDpdvt0wGiven :1; unsigned B3SOIPDpdvt1wGiven :1; unsigned B3SOIPDpdvt2wGiven :1; unsigned B3SOIPDpu0Given :1; unsigned B3SOIPDpuaGiven :1; unsigned B3SOIPDpubGiven :1; unsigned B3SOIPDpucGiven :1; unsigned B3SOIPDpvsatGiven :1; unsigned B3SOIPDpa0Given :1; unsigned B3SOIPDpagsGiven :1; unsigned B3SOIPDpb0Given :1; unsigned B3SOIPDpb1Given :1; unsigned B3SOIPDpketaGiven :1; unsigned B3SOIPDpketasGiven :1; unsigned B3SOIPDpa1Given :1; unsigned B3SOIPDpa2Given :1; unsigned B3SOIPDprdswGiven :1; unsigned B3SOIPDpprwbGiven :1; unsigned B3SOIPDpprwgGiven :1; unsigned B3SOIPDpwrGiven :1; unsigned B3SOIPDpnfactorGiven :1; unsigned B3SOIPDpdwgGiven :1; unsigned B3SOIPDpdwbGiven :1; unsigned B3SOIPDpvoffGiven :1; unsigned B3SOIPDpeta0Given :1; unsigned B3SOIPDpetabGiven :1; unsigned B3SOIPDpdsubGiven :1; unsigned B3SOIPDpcitGiven :1; unsigned B3SOIPDpcdscGiven :1; unsigned B3SOIPDpcdscbGiven :1; unsigned B3SOIPDpcdscdGiven :1; unsigned B3SOIPDppclmGiven :1; unsigned B3SOIPDppdibl1Given :1; unsigned B3SOIPDppdibl2Given :1; unsigned B3SOIPDppdiblbGiven :1; unsigned B3SOIPDpdroutGiven :1; unsigned B3SOIPDppvagGiven :1; unsigned B3SOIPDpdeltaGiven :1; unsigned B3SOIPDpalpha0Given :1; unsigned B3SOIPDpfbjtiiGiven :1; unsigned B3SOIPDpbeta0Given :1; unsigned B3SOIPDpbeta1Given :1; unsigned B3SOIPDpbeta2Given :1; unsigned B3SOIPDpvdsatii0Given :1; unsigned B3SOIPDpliiGiven :1; unsigned B3SOIPDpesatiiGiven :1; unsigned B3SOIPDpsii0Given :1; unsigned B3SOIPDpsii1Given :1; unsigned B3SOIPDpsii2Given :1; unsigned B3SOIPDpsiidGiven :1; unsigned B3SOIPDpagidlGiven :1; unsigned B3SOIPDpbgidlGiven :1; unsigned B3SOIPDpngidlGiven :1; unsigned B3SOIPDpntunGiven :1; unsigned B3SOIPDpndiodeGiven :1; unsigned B3SOIPDpnrecf0Given :1; unsigned B3SOIPDpnrecr0Given :1; unsigned B3SOIPDpisbjtGiven :1; unsigned B3SOIPDpisdifGiven :1; unsigned B3SOIPDpisrecGiven :1; unsigned B3SOIPDpistunGiven :1; unsigned B3SOIPDpvrec0Given :1; unsigned B3SOIPDpvtun0Given :1; unsigned B3SOIPDpnbjtGiven :1; unsigned B3SOIPDplbjt0Given :1; unsigned B3SOIPDpvabjtGiven :1; unsigned B3SOIPDpaelyGiven :1; unsigned B3SOIPDpahliGiven :1; /* CV model */ unsigned B3SOIPDpvsdfbGiven :1; unsigned B3SOIPDpvsdthGiven :1; unsigned B3SOIPDpdelvtGiven :1; unsigned B3SOIPDpacdeGiven :1; unsigned B3SOIPDpmoinGiven :1; /* Added for binning - END2 */ unsigned B3SOIPDuseFringeGiven :1; unsigned B3SOIPDtnomGiven :1; unsigned B3SOIPDcgsoGiven :1; unsigned B3SOIPDcgdoGiven :1; unsigned B3SOIPDcgeoGiven :1; unsigned B3SOIPDxpartGiven :1; unsigned B3SOIPDsheetResistanceGiven :1; unsigned B3SOIPDGatesidewallJctPotentialGiven :1; unsigned B3SOIPDbodyJctGateSideGradingCoeffGiven :1; unsigned B3SOIPDunitLengthGateSidewallJctCapGiven :1; unsigned B3SOIPDcsdeswGiven :1; unsigned B3SOIPDoxideTrapDensityAGiven :1; unsigned B3SOIPDoxideTrapDensityBGiven :1; unsigned B3SOIPDoxideTrapDensityCGiven :1; unsigned B3SOIPDemGiven :1; unsigned B3SOIPDefGiven :1; unsigned B3SOIPDafGiven :1; unsigned B3SOIPDkfGiven :1; unsigned B3SOIPDnoifGiven :1; unsigned B3SOIPDLintGiven :1; unsigned B3SOIPDLlGiven :1; unsigned B3SOIPDLlcGiven :1; /* v2.2.3 */ unsigned B3SOIPDLlnGiven :1; unsigned B3SOIPDLwGiven :1; unsigned B3SOIPDLwcGiven :1; /* v2.2.3 */ unsigned B3SOIPDLwnGiven :1; unsigned B3SOIPDLwlGiven :1; unsigned B3SOIPDLwlcGiven :1; /* v2.2.3 */ unsigned B3SOIPDLminGiven :1; unsigned B3SOIPDLmaxGiven :1; unsigned B3SOIPDWintGiven :1; unsigned B3SOIPDWlGiven :1; unsigned B3SOIPDWlcGiven :1; /* v2.2.3 */ unsigned B3SOIPDWlnGiven :1; unsigned B3SOIPDWwGiven :1; unsigned B3SOIPDWwcGiven :1; /* v2.2.3 */ unsigned B3SOIPDWwnGiven :1; unsigned B3SOIPDWwlGiven :1; unsigned B3SOIPDWwlcGiven :1; /* v2.2.3 */ unsigned B3SOIPDWminGiven :1; unsigned B3SOIPDWmaxGiven :1; } B3SOIPDmodel; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define B3SOIPD_W 1 #define B3SOIPD_L 2 #define B3SOIPD_M 31 #define B3SOIPD_AS 3 #define B3SOIPD_AD 4 #define B3SOIPD_PS 5 #define B3SOIPD_PD 6 #define B3SOIPD_NRS 7 #define B3SOIPD_NRD 8 #define B3SOIPD_OFF 9 #define B3SOIPD_IC_VBS 10 #define B3SOIPD_IC_VDS 11 #define B3SOIPD_IC_VGS 12 #define B3SOIPD_IC_VES 13 #define B3SOIPD_IC_VPS 14 #define B3SOIPD_BJTOFF 15 #define B3SOIPD_RTH0 16 #define B3SOIPD_CTH0 17 #define B3SOIPD_NRB 18 #define B3SOIPD_IC 19 #define B3SOIPD_NQSMOD 20 #define B3SOIPD_DEBUG 21 /* v2.0 release */ #define B3SOIPD_NBC 22 #define B3SOIPD_NSEG 23 #define B3SOIPD_PDBCP 24 #define B3SOIPD_PSBCP 25 #define B3SOIPD_AGBCP 26 #define B3SOIPD_AEBCP 27 #define B3SOIPD_VBSUSR 28 #define B3SOIPD_TNODEOUT 29 /* v2.2.2 */ #define B3SOIPD_FRBODY 30 /* model parameters */ #define B3SOIPD_MOD_CAPMOD 101 #define B3SOIPD_MOD_NQSMOD 102 #define B3SOIPD_MOD_MOBMOD 103 #define B3SOIPD_MOD_NOIMOD 104 #define B3SOIPD_MOD_SHMOD 105 #define B3SOIPD_MOD_DDMOD 106 #define B3SOIPD_MOD_TOX 107 #define B3SOIPD_MOD_CDSC 108 #define B3SOIPD_MOD_CDSCB 109 #define B3SOIPD_MOD_CIT 110 #define B3SOIPD_MOD_NFACTOR 111 #define B3SOIPD_MOD_XJ 112 #define B3SOIPD_MOD_VSAT 113 #define B3SOIPD_MOD_AT 114 #define B3SOIPD_MOD_A0 115 #define B3SOIPD_MOD_A1 116 #define B3SOIPD_MOD_A2 117 #define B3SOIPD_MOD_KETA 118 #define B3SOIPD_MOD_NSUB 119 #define B3SOIPD_MOD_NPEAK 120 #define B3SOIPD_MOD_NGATE 121 #define B3SOIPD_MOD_GAMMA1 122 #define B3SOIPD_MOD_GAMMA2 123 #define B3SOIPD_MOD_VBX 124 #define B3SOIPD_MOD_BINUNIT 125 #define B3SOIPD_MOD_VBM 126 #define B3SOIPD_MOD_XT 127 #define B3SOIPD_MOD_K1 129 #define B3SOIPD_MOD_KT1 130 #define B3SOIPD_MOD_KT1L 131 #define B3SOIPD_MOD_K2 132 #define B3SOIPD_MOD_KT2 133 #define B3SOIPD_MOD_K3 134 #define B3SOIPD_MOD_K3B 135 #define B3SOIPD_MOD_W0 136 #define B3SOIPD_MOD_NLX 137 #define B3SOIPD_MOD_DVT0 138 #define B3SOIPD_MOD_DVT1 139 #define B3SOIPD_MOD_DVT2 140 #define B3SOIPD_MOD_DVT0W 141 #define B3SOIPD_MOD_DVT1W 142 #define B3SOIPD_MOD_DVT2W 143 #define B3SOIPD_MOD_DROUT 144 #define B3SOIPD_MOD_DSUB 145 #define B3SOIPD_MOD_VTH0 146 #define B3SOIPD_MOD_UA 147 #define B3SOIPD_MOD_UA1 148 #define B3SOIPD_MOD_UB 149 #define B3SOIPD_MOD_UB1 150 #define B3SOIPD_MOD_UC 151 #define B3SOIPD_MOD_UC1 152 #define B3SOIPD_MOD_U0 153 #define B3SOIPD_MOD_UTE 154 #define B3SOIPD_MOD_VOFF 155 #define B3SOIPD_MOD_DELTA 156 #define B3SOIPD_MOD_RDSW 157 #define B3SOIPD_MOD_PRT 158 #define B3SOIPD_MOD_LDD 159 #define B3SOIPD_MOD_ETA 160 #define B3SOIPD_MOD_ETA0 161 #define B3SOIPD_MOD_ETAB 162 #define B3SOIPD_MOD_PCLM 163 #define B3SOIPD_MOD_PDIBL1 164 #define B3SOIPD_MOD_PDIBL2 165 #define B3SOIPD_MOD_PSCBE1 166 #define B3SOIPD_MOD_PSCBE2 167 #define B3SOIPD_MOD_PVAG 168 #define B3SOIPD_MOD_WR 169 #define B3SOIPD_MOD_DWG 170 #define B3SOIPD_MOD_DWB 171 #define B3SOIPD_MOD_B0 172 #define B3SOIPD_MOD_B1 173 #define B3SOIPD_MOD_ALPHA0 174 #define B3SOIPD_MOD_PDIBLB 178 #define B3SOIPD_MOD_PRWG 179 #define B3SOIPD_MOD_PRWB 180 #define B3SOIPD_MOD_CDSCD 181 #define B3SOIPD_MOD_AGS 182 #define B3SOIPD_MOD_FRINGE 184 #define B3SOIPD_MOD_CGSL 186 #define B3SOIPD_MOD_CGDL 187 #define B3SOIPD_MOD_CKAPPA 188 #define B3SOIPD_MOD_CF 189 #define B3SOIPD_MOD_CLC 190 #define B3SOIPD_MOD_CLE 191 #define B3SOIPD_MOD_PARAMCHK 192 #define B3SOIPD_MOD_VERSION 193 #define B3SOIPD_MOD_TBOX 195 #define B3SOIPD_MOD_TSI 196 #define B3SOIPD_MOD_KB1 197 #define B3SOIPD_MOD_KB3 198 #define B3SOIPD_MOD_DVBD0 199 #define B3SOIPD_MOD_DVBD1 200 #define B3SOIPD_MOD_DELP 201 #define B3SOIPD_MOD_VBSA 202 #define B3SOIPD_MOD_RBODY 204 #define B3SOIPD_MOD_ADICE0 205 #define B3SOIPD_MOD_ABP 206 #define B3SOIPD_MOD_MXC 207 #define B3SOIPD_MOD_RTH0 208 #define B3SOIPD_MOD_CTH0 209 #define B3SOIPD_MOD_ALPHA1 214 #define B3SOIPD_MOD_NGIDL 215 #define B3SOIPD_MOD_AGIDL 216 #define B3SOIPD_MOD_BGIDL 217 #define B3SOIPD_MOD_NDIODE 218 #define B3SOIPD_MOD_LDIOF 219 #define B3SOIPD_MOD_LDIOR 220 #define B3SOIPD_MOD_NTUN 221 #define B3SOIPD_MOD_ISBJT 222 #define B3SOIPD_MOD_ISDIF 223 #define B3SOIPD_MOD_ISREC 224 #define B3SOIPD_MOD_ISTUN 225 #define B3SOIPD_MOD_XBJT 226 #define B3SOIPD_MOD_XDIF 227 #define B3SOIPD_MOD_XREC 228 #define B3SOIPD_MOD_XTUN 229 #define B3SOIPD_MOD_TT 232 #define B3SOIPD_MOD_VSDTH 233 #define B3SOIPD_MOD_VSDFB 234 #define B3SOIPD_MOD_ASD 235 #define B3SOIPD_MOD_CSDMIN 236 #define B3SOIPD_MOD_RBSH 237 #define B3SOIPD_MOD_ESATII 238 /* v2.0 release */ #define B3SOIPD_MOD_K1W1 239 #define B3SOIPD_MOD_K1W2 240 #define B3SOIPD_MOD_KETAS 241 #define B3SOIPD_MOD_DWBC 242 #define B3SOIPD_MOD_BETA0 243 #define B3SOIPD_MOD_BETA1 244 #define B3SOIPD_MOD_BETA2 245 #define B3SOIPD_MOD_VDSATII0 246 #define B3SOIPD_MOD_TII 247 #define B3SOIPD_MOD_LII 248 #define B3SOIPD_MOD_SII0 249 #define B3SOIPD_MOD_SII1 250 #define B3SOIPD_MOD_SII2 251 #define B3SOIPD_MOD_SIID 252 #define B3SOIPD_MOD_FBJTII 253 #define B3SOIPD_MOD_NRECF0 255 #define B3SOIPD_MOD_NRECR0 256 #define B3SOIPD_MOD_LN 257 #define B3SOIPD_MOD_VREC0 258 #define B3SOIPD_MOD_VTUN0 259 #define B3SOIPD_MOD_NBJT 260 #define B3SOIPD_MOD_LBJT0 261 #define B3SOIPD_MOD_VABJT 262 #define B3SOIPD_MOD_AELY 263 #define B3SOIPD_MOD_AHLI 264 #define B3SOIPD_MOD_NTRECF 265 #define B3SOIPD_MOD_NTRECR 266 #define B3SOIPD_MOD_DLCB 267 #define B3SOIPD_MOD_FBODY 268 #define B3SOIPD_MOD_NDIF 269 #define B3SOIPD_MOD_TCJSWG 270 #define B3SOIPD_MOD_TPBSWG 271 #define B3SOIPD_MOD_ACDE 272 #define B3SOIPD_MOD_MOIN 273 #define B3SOIPD_MOD_DELVT 274 #define B3SOIPD_MOD_DLBG 275 #define B3SOIPD_MOD_LDIF0 276 /* v2.2 release */ #define B3SOIPD_MOD_WTH0 277 #define B3SOIPD_MOD_RHALO 278 #define B3SOIPD_MOD_NTOX 279 #define B3SOIPD_MOD_TOXREF 280 #define B3SOIPD_MOD_EBG 281 #define B3SOIPD_MOD_VEVB 282 #define B3SOIPD_MOD_ALPHAGB1 283 #define B3SOIPD_MOD_BETAGB1 284 #define B3SOIPD_MOD_VGB1 285 #define B3SOIPD_MOD_VECB 286 #define B3SOIPD_MOD_ALPHAGB2 287 #define B3SOIPD_MOD_BETAGB2 288 #define B3SOIPD_MOD_VGB2 289 #define B3SOIPD_MOD_TOXQM 290 #define B3SOIPD_MOD_IGMOD 291 #define B3SOIPD_MOD_VOXH 292 #define B3SOIPD_MOD_DELTAVOX 293 /* Added for binning - START3 */ /* Length dependence */ #define B3SOIPD_MOD_LNPEAK 301 #define B3SOIPD_MOD_LNSUB 302 #define B3SOIPD_MOD_LNGATE 303 #define B3SOIPD_MOD_LVTH0 304 #define B3SOIPD_MOD_LK1 305 #define B3SOIPD_MOD_LK1W1 306 #define B3SOIPD_MOD_LK1W2 307 #define B3SOIPD_MOD_LK2 308 #define B3SOIPD_MOD_LK3 309 #define B3SOIPD_MOD_LK3B 310 #define B3SOIPD_MOD_LKB1 311 #define B3SOIPD_MOD_LW0 312 #define B3SOIPD_MOD_LNLX 313 #define B3SOIPD_MOD_LDVT0 314 #define B3SOIPD_MOD_LDVT1 315 #define B3SOIPD_MOD_LDVT2 316 #define B3SOIPD_MOD_LDVT0W 317 #define B3SOIPD_MOD_LDVT1W 318 #define B3SOIPD_MOD_LDVT2W 319 #define B3SOIPD_MOD_LU0 320 #define B3SOIPD_MOD_LUA 321 #define B3SOIPD_MOD_LUB 322 #define B3SOIPD_MOD_LUC 323 #define B3SOIPD_MOD_LVSAT 324 #define B3SOIPD_MOD_LA0 325 #define B3SOIPD_MOD_LAGS 326 #define B3SOIPD_MOD_LB0 327 #define B3SOIPD_MOD_LB1 328 #define B3SOIPD_MOD_LKETA 329 #define B3SOIPD_MOD_LKETAS 330 #define B3SOIPD_MOD_LA1 331 #define B3SOIPD_MOD_LA2 332 #define B3SOIPD_MOD_LRDSW 333 #define B3SOIPD_MOD_LPRWB 334 #define B3SOIPD_MOD_LPRWG 335 #define B3SOIPD_MOD_LWR 336 #define B3SOIPD_MOD_LNFACTOR 337 #define B3SOIPD_MOD_LDWG 338 #define B3SOIPD_MOD_LDWB 339 #define B3SOIPD_MOD_LVOFF 340 #define B3SOIPD_MOD_LETA0 341 #define B3SOIPD_MOD_LETAB 342 #define B3SOIPD_MOD_LDSUB 343 #define B3SOIPD_MOD_LCIT 344 #define B3SOIPD_MOD_LCDSC 345 #define B3SOIPD_MOD_LCDSCB 346 #define B3SOIPD_MOD_LCDSCD 347 #define B3SOIPD_MOD_LPCLM 348 #define B3SOIPD_MOD_LPDIBL1 349 #define B3SOIPD_MOD_LPDIBL2 350 #define B3SOIPD_MOD_LPDIBLB 351 #define B3SOIPD_MOD_LDROUT 352 #define B3SOIPD_MOD_LPVAG 353 #define B3SOIPD_MOD_LDELTA 354 #define B3SOIPD_MOD_LALPHA0 355 #define B3SOIPD_MOD_LFBJTII 356 #define B3SOIPD_MOD_LBETA0 357 #define B3SOIPD_MOD_LBETA1 358 #define B3SOIPD_MOD_LBETA2 359 #define B3SOIPD_MOD_LVDSATII0 360 #define B3SOIPD_MOD_LLII 361 #define B3SOIPD_MOD_LESATII 362 #define B3SOIPD_MOD_LSII0 363 #define B3SOIPD_MOD_LSII1 364 #define B3SOIPD_MOD_LSII2 365 #define B3SOIPD_MOD_LSIID 366 #define B3SOIPD_MOD_LAGIDL 367 #define B3SOIPD_MOD_LBGIDL 368 #define B3SOIPD_MOD_LNGIDL 369 #define B3SOIPD_MOD_LNTUN 370 #define B3SOIPD_MOD_LNDIODE 371 #define B3SOIPD_MOD_LNRECF0 372 #define B3SOIPD_MOD_LNRECR0 373 #define B3SOIPD_MOD_LISBJT 374 #define B3SOIPD_MOD_LISDIF 375 #define B3SOIPD_MOD_LISREC 376 #define B3SOIPD_MOD_LISTUN 377 #define B3SOIPD_MOD_LVREC0 378 #define B3SOIPD_MOD_LVTUN0 379 #define B3SOIPD_MOD_LNBJT 380 #define B3SOIPD_MOD_LLBJT0 381 #define B3SOIPD_MOD_LVABJT 382 #define B3SOIPD_MOD_LAELY 383 #define B3SOIPD_MOD_LAHLI 384 #define B3SOIPD_MOD_LVSDFB 385 #define B3SOIPD_MOD_LVSDTH 386 #define B3SOIPD_MOD_LDELVT 387 #define B3SOIPD_MOD_LACDE 388 #define B3SOIPD_MOD_LMOIN 389 /* Width dependence */ #define B3SOIPD_MOD_WNPEAK 401 #define B3SOIPD_MOD_WNSUB 402 #define B3SOIPD_MOD_WNGATE 403 #define B3SOIPD_MOD_WVTH0 404 #define B3SOIPD_MOD_WK1 405 #define B3SOIPD_MOD_WK1W1 406 #define B3SOIPD_MOD_WK1W2 407 #define B3SOIPD_MOD_WK2 408 #define B3SOIPD_MOD_WK3 409 #define B3SOIPD_MOD_WK3B 410 #define B3SOIPD_MOD_WKB1 411 #define B3SOIPD_MOD_WW0 412 #define B3SOIPD_MOD_WNLX 413 #define B3SOIPD_MOD_WDVT0 414 #define B3SOIPD_MOD_WDVT1 415 #define B3SOIPD_MOD_WDVT2 416 #define B3SOIPD_MOD_WDVT0W 417 #define B3SOIPD_MOD_WDVT1W 418 #define B3SOIPD_MOD_WDVT2W 419 #define B3SOIPD_MOD_WU0 420 #define B3SOIPD_MOD_WUA 421 #define B3SOIPD_MOD_WUB 422 #define B3SOIPD_MOD_WUC 423 #define B3SOIPD_MOD_WVSAT 424 #define B3SOIPD_MOD_WA0 425 #define B3SOIPD_MOD_WAGS 426 #define B3SOIPD_MOD_WB0 427 #define B3SOIPD_MOD_WB1 428 #define B3SOIPD_MOD_WKETA 429 #define B3SOIPD_MOD_WKETAS 430 #define B3SOIPD_MOD_WA1 431 #define B3SOIPD_MOD_WA2 432 #define B3SOIPD_MOD_WRDSW 433 #define B3SOIPD_MOD_WPRWB 434 #define B3SOIPD_MOD_WPRWG 435 #define B3SOIPD_MOD_WWR 436 #define B3SOIPD_MOD_WNFACTOR 437 #define B3SOIPD_MOD_WDWG 438 #define B3SOIPD_MOD_WDWB 439 #define B3SOIPD_MOD_WVOFF 440 #define B3SOIPD_MOD_WETA0 441 #define B3SOIPD_MOD_WETAB 442 #define B3SOIPD_MOD_WDSUB 443 #define B3SOIPD_MOD_WCIT 444 #define B3SOIPD_MOD_WCDSC 445 #define B3SOIPD_MOD_WCDSCB 446 #define B3SOIPD_MOD_WCDSCD 447 #define B3SOIPD_MOD_WPCLM 448 #define B3SOIPD_MOD_WPDIBL1 449 #define B3SOIPD_MOD_WPDIBL2 450 #define B3SOIPD_MOD_WPDIBLB 451 #define B3SOIPD_MOD_WDROUT 452 #define B3SOIPD_MOD_WPVAG 453 #define B3SOIPD_MOD_WDELTA 454 #define B3SOIPD_MOD_WALPHA0 455 #define B3SOIPD_MOD_WFBJTII 456 #define B3SOIPD_MOD_WBETA0 457 #define B3SOIPD_MOD_WBETA1 458 #define B3SOIPD_MOD_WBETA2 459 #define B3SOIPD_MOD_WVDSATII0 460 #define B3SOIPD_MOD_WLII 461 #define B3SOIPD_MOD_WESATII 462 #define B3SOIPD_MOD_WSII0 463 #define B3SOIPD_MOD_WSII1 464 #define B3SOIPD_MOD_WSII2 465 #define B3SOIPD_MOD_WSIID 466 #define B3SOIPD_MOD_WAGIDL 467 #define B3SOIPD_MOD_WBGIDL 468 #define B3SOIPD_MOD_WNGIDL 469 #define B3SOIPD_MOD_WNTUN 470 #define B3SOIPD_MOD_WNDIODE 471 #define B3SOIPD_MOD_WNRECF0 472 #define B3SOIPD_MOD_WNRECR0 473 #define B3SOIPD_MOD_WISBJT 474 #define B3SOIPD_MOD_WISDIF 475 #define B3SOIPD_MOD_WISREC 476 #define B3SOIPD_MOD_WISTUN 477 #define B3SOIPD_MOD_WVREC0 478 #define B3SOIPD_MOD_WVTUN0 479 #define B3SOIPD_MOD_WNBJT 480 #define B3SOIPD_MOD_WLBJT0 481 #define B3SOIPD_MOD_WVABJT 482 #define B3SOIPD_MOD_WAELY 483 #define B3SOIPD_MOD_WAHLI 484 #define B3SOIPD_MOD_WVSDFB 485 #define B3SOIPD_MOD_WVSDTH 486 #define B3SOIPD_MOD_WDELVT 487 #define B3SOIPD_MOD_WACDE 488 #define B3SOIPD_MOD_WMOIN 489 /* Cross-term dependence */ #define B3SOIPD_MOD_PNPEAK 501 #define B3SOIPD_MOD_PNSUB 502 #define B3SOIPD_MOD_PNGATE 503 #define B3SOIPD_MOD_PVTH0 504 #define B3SOIPD_MOD_PK1 505 #define B3SOIPD_MOD_PK1W1 506 #define B3SOIPD_MOD_PK1W2 507 #define B3SOIPD_MOD_PK2 508 #define B3SOIPD_MOD_PK3 509 #define B3SOIPD_MOD_PK3B 510 #define B3SOIPD_MOD_PKB1 511 #define B3SOIPD_MOD_PW0 512 #define B3SOIPD_MOD_PNLX 513 #define B3SOIPD_MOD_PDVT0 514 #define B3SOIPD_MOD_PDVT1 515 #define B3SOIPD_MOD_PDVT2 516 #define B3SOIPD_MOD_PDVT0W 517 #define B3SOIPD_MOD_PDVT1W 518 #define B3SOIPD_MOD_PDVT2W 519 #define B3SOIPD_MOD_PU0 520 #define B3SOIPD_MOD_PUA 521 #define B3SOIPD_MOD_PUB 522 #define B3SOIPD_MOD_PUC 523 #define B3SOIPD_MOD_PVSAT 524 #define B3SOIPD_MOD_PA0 525 #define B3SOIPD_MOD_PAGS 526 #define B3SOIPD_MOD_PB0 527 #define B3SOIPD_MOD_PB1 528 #define B3SOIPD_MOD_PKETA 529 #define B3SOIPD_MOD_PKETAS 530 #define B3SOIPD_MOD_PA1 531 #define B3SOIPD_MOD_PA2 532 #define B3SOIPD_MOD_PRDSW 533 #define B3SOIPD_MOD_PPRWB 534 #define B3SOIPD_MOD_PPRWG 535 #define B3SOIPD_MOD_PWR 536 #define B3SOIPD_MOD_PNFACTOR 537 #define B3SOIPD_MOD_PDWG 538 #define B3SOIPD_MOD_PDWB 539 #define B3SOIPD_MOD_PVOFF 540 #define B3SOIPD_MOD_PETA0 541 #define B3SOIPD_MOD_PETAB 542 #define B3SOIPD_MOD_PDSUB 543 #define B3SOIPD_MOD_PCIT 544 #define B3SOIPD_MOD_PCDSC 545 #define B3SOIPD_MOD_PCDSCB 546 #define B3SOIPD_MOD_PCDSCD 547 #define B3SOIPD_MOD_PPCLM 548 #define B3SOIPD_MOD_PPDIBL1 549 #define B3SOIPD_MOD_PPDIBL2 550 #define B3SOIPD_MOD_PPDIBLB 551 #define B3SOIPD_MOD_PDROUT 552 #define B3SOIPD_MOD_PPVAG 553 #define B3SOIPD_MOD_PDELTA 554 #define B3SOIPD_MOD_PALPHA0 555 #define B3SOIPD_MOD_PFBJTII 556 #define B3SOIPD_MOD_PBETA0 557 #define B3SOIPD_MOD_PBETA1 558 #define B3SOIPD_MOD_PBETA2 559 #define B3SOIPD_MOD_PVDSATII0 560 #define B3SOIPD_MOD_PLII 561 #define B3SOIPD_MOD_PESATII 562 #define B3SOIPD_MOD_PSII0 563 #define B3SOIPD_MOD_PSII1 564 #define B3SOIPD_MOD_PSII2 565 #define B3SOIPD_MOD_PSIID 566 #define B3SOIPD_MOD_PAGIDL 567 #define B3SOIPD_MOD_PBGIDL 568 #define B3SOIPD_MOD_PNGIDL 569 #define B3SOIPD_MOD_PNTUN 570 #define B3SOIPD_MOD_PNDIODE 571 #define B3SOIPD_MOD_PNRECF0 572 #define B3SOIPD_MOD_PNRECR0 573 #define B3SOIPD_MOD_PISBJT 574 #define B3SOIPD_MOD_PISDIF 575 #define B3SOIPD_MOD_PISREC 576 #define B3SOIPD_MOD_PISTUN 577 #define B3SOIPD_MOD_PVREC0 578 #define B3SOIPD_MOD_PVTUN0 579 #define B3SOIPD_MOD_PNBJT 580 #define B3SOIPD_MOD_PLBJT0 581 #define B3SOIPD_MOD_PVABJT 582 #define B3SOIPD_MOD_PAELY 583 #define B3SOIPD_MOD_PAHLI 584 #define B3SOIPD_MOD_PVSDFB 585 #define B3SOIPD_MOD_PVSDTH 586 #define B3SOIPD_MOD_PDELVT 587 #define B3SOIPD_MOD_PACDE 588 #define B3SOIPD_MOD_PMOIN 589 /* Added for binning - END3 */ #define B3SOIPD_MOD_TNOM 701 #define B3SOIPD_MOD_CGSO 702 #define B3SOIPD_MOD_CGDO 703 #define B3SOIPD_MOD_CGEO 704 #define B3SOIPD_MOD_XPART 705 #define B3SOIPD_MOD_RSH 706 #define B3SOIPD_MOD_NMOS 814 #define B3SOIPD_MOD_PMOS 815 #define B3SOIPD_MOD_NOIA 816 #define B3SOIPD_MOD_NOIB 817 #define B3SOIPD_MOD_NOIC 818 #define B3SOIPD_MOD_LINT 819 #define B3SOIPD_MOD_LL 820 #define B3SOIPD_MOD_LLN 821 #define B3SOIPD_MOD_LW 822 #define B3SOIPD_MOD_LWN 823 #define B3SOIPD_MOD_LWL 824 #define B3SOIPD_MOD_WINT 827 #define B3SOIPD_MOD_WL 828 #define B3SOIPD_MOD_WLN 829 #define B3SOIPD_MOD_WW 830 #define B3SOIPD_MOD_WWN 831 #define B3SOIPD_MOD_WWL 832 /* v2.2.3 */ #define B3SOIPD_MOD_LWLC 847 #define B3SOIPD_MOD_LLC 848 #define B3SOIPD_MOD_LWC 849 #define B3SOIPD_MOD_WWLC 850 #define B3SOIPD_MOD_WLC 851 #define B3SOIPD_MOD_WWC 852 #define B3SOIPD_MOD_DTOXCV 853 #define B3SOIPD_MOD_DWC 835 #define B3SOIPD_MOD_DLC 836 #define B3SOIPD_MOD_EM 837 #define B3SOIPD_MOD_EF 838 #define B3SOIPD_MOD_AF 839 #define B3SOIPD_MOD_KF 840 #define B3SOIPD_MOD_NOIF 841 #define B3SOIPD_MOD_PBSWG 843 #define B3SOIPD_MOD_MJSWG 844 #define B3SOIPD_MOD_CJSWG 845 #define B3SOIPD_MOD_CSDESW 846 /* device questions */ #define B3SOIPD_DNODE 901 #define B3SOIPD_GNODE 902 #define B3SOIPD_SNODE 903 #define B3SOIPD_BNODE 904 #define B3SOIPD_ENODE 905 #define B3SOIPD_DNODEPRIME 906 #define B3SOIPD_SNODEPRIME 907 #define B3SOIPD_VBD 908 #define B3SOIPD_VBS 909 #define B3SOIPD_VGS 910 #define B3SOIPD_VES 911 #define B3SOIPD_VDS 912 #define B3SOIPD_CD 913 #define B3SOIPD_CBS 914 #define B3SOIPD_CBD 915 #define B3SOIPD_GM 916 #define B3SOIPD_GDS 917 #define B3SOIPD_GMBS 918 #define B3SOIPD_GBD 919 #define B3SOIPD_GBS 920 #define B3SOIPD_QB 921 #define B3SOIPD_CQB 922 #define B3SOIPD_QG 923 #define B3SOIPD_CQG 924 #define B3SOIPD_QD 925 #define B3SOIPD_CQD 926 #define B3SOIPD_CGG 927 #define B3SOIPD_CGD 928 #define B3SOIPD_CGS 929 #define B3SOIPD_CBG 930 #define B3SOIPD_CAPBD 931 #define B3SOIPD_CQBD 932 #define B3SOIPD_CAPBS 933 #define B3SOIPD_CQBS 934 #define B3SOIPD_CDG 935 #define B3SOIPD_CDD 936 #define B3SOIPD_CDS 937 #define B3SOIPD_VON 938 #define B3SOIPD_VDSAT 939 #define B3SOIPD_QBS 940 #define B3SOIPD_QBD 941 #define B3SOIPD_SOURCECONDUCT 942 #define B3SOIPD_DRAINCONDUCT 943 #define B3SOIPD_CBDB 944 #define B3SOIPD_CBSB 945 #define B3SOIPD_GMID 946 #include "b3soipdext.h" extern void B3SOIPDevaluate(double,double,double,B3SOIPDinstance*,B3SOIPDmodel*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int B3SOIPDdebug(B3SOIPDmodel*, B3SOIPDinstance*, CKTcircuit*, int); extern int B3SOIPDcheckModel(B3SOIPDmodel*, B3SOIPDinstance*, CKTcircuit*); #endif /*B3SOIPD*/ ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdpzld.c0000644000265600020320000001426012264261473023053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdpzld.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "b3soipddef.h" #include "ngspice/suffix.h" int B3SOIPDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd = 0.0, capbs = 0.0; double xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap = 0.0; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here!= NULL; here = here->B3SOIPDnextInstance) { if (here->B3SOIPDmode >= 0) { Gm = here->B3SOIPDgm; Gmbs = here->B3SOIPDgmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->B3SOIPDcggb; cgsb = here->B3SOIPDcgsb; cgdb = here->B3SOIPDcgdb; cbgb = here->B3SOIPDcbgb; cbsb = here->B3SOIPDcbsb; cbdb = here->B3SOIPDcbdb; cdgb = here->B3SOIPDcdgb; cdsb = here->B3SOIPDcdsb; cddb = here->B3SOIPDcddb; } else { Gm = -here->B3SOIPDgm; Gmbs = -here->B3SOIPDgmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->B3SOIPDcggb; cgsb = here->B3SOIPDcgdb; cgdb = here->B3SOIPDcgsb; cbgb = here->B3SOIPDcbgb; cbsb = here->B3SOIPDcbdb; cbdb = here->B3SOIPDcbsb; cdgb = -(here->B3SOIPDcdgb + cggb + cbgb); cdsb = -(here->B3SOIPDcddb + cgsb + cbsb); cddb = -(here->B3SOIPDcdsb + cgdb + cbdb); } gdpr=here->B3SOIPDdrainConductance; gspr=here->B3SOIPDsourceConductance; gds= here->B3SOIPDgds; gbd= here->B3SOIPDgjdb; gbs= here->B3SOIPDgjsb; #ifdef BULKCODE capbd= here->B3SOIPDcapbd; capbs= here->B3SOIPDcapbs; #endif GSoverlapCap = here->B3SOIPDcgso; GDoverlapCap = here->B3SOIPDcgdo; #ifdef BULKCODE GBoverlapCap = here->pParam->B3SOIPDcgbo; #endif xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->B3SOIPDm; *(here->B3SOIPDGgPtr ) += m * (xcggb * s->real); *(here->B3SOIPDGgPtr +1) += m * (xcggb * s->imag); *(here->B3SOIPDBbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->B3SOIPDBbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->B3SOIPDDPdpPtr ) += m * (xcddb * s->real); *(here->B3SOIPDDPdpPtr +1) += m * (xcddb * s->imag); *(here->B3SOIPDSPspPtr ) += m * (xcssb * s->real); *(here->B3SOIPDSPspPtr +1) += m * (xcssb * s->imag); *(here->B3SOIPDGbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->B3SOIPDGbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->B3SOIPDGdpPtr ) += m * (xcgdb * s->real); *(here->B3SOIPDGdpPtr +1) += m * (xcgdb * s->imag); *(here->B3SOIPDGspPtr ) += m * (xcgsb * s->real); *(here->B3SOIPDGspPtr +1) += m * (xcgsb * s->imag); *(here->B3SOIPDBgPtr ) += m * (xcbgb * s->real); *(here->B3SOIPDBgPtr +1) += m * (xcbgb * s->imag); *(here->B3SOIPDBdpPtr ) += m * (xcbdb * s->real); *(here->B3SOIPDBdpPtr +1) += m * (xcbdb * s->imag); *(here->B3SOIPDBspPtr ) += m * (xcbsb * s->real); *(here->B3SOIPDBspPtr +1) += m * (xcbsb * s->imag); *(here->B3SOIPDDPgPtr ) += m * (xcdgb * s->real); *(here->B3SOIPDDPgPtr +1) += m * (xcdgb * s->imag); *(here->B3SOIPDDPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->B3SOIPDDPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->B3SOIPDDPspPtr ) += m * (xcdsb * s->real); *(here->B3SOIPDDPspPtr +1) += m * (xcdsb * s->imag); *(here->B3SOIPDSPgPtr ) += m * (xcsgb * s->real); *(here->B3SOIPDSPgPtr +1) += m * (xcsgb * s->imag); *(here->B3SOIPDSPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->B3SOIPDSPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->B3SOIPDSPdpPtr ) += m * (xcsdb * s->real); *(here->B3SOIPDSPdpPtr +1) += m * (xcsdb * s->imag); *(here->B3SOIPDDdPtr) += m * gdpr; *(here->B3SOIPDSsPtr) += m * gspr; *(here->B3SOIPDBbPtr) += m * (gbd + gbs); *(here->B3SOIPDDPdpPtr) += m * (gdpr + gds + gbd + RevSum); *(here->B3SOIPDSPspPtr) += m * (gspr + gds + gbs + FwdSum); *(here->B3SOIPDDdpPtr) -= m * gdpr; *(here->B3SOIPDSspPtr) -= m * gspr; *(here->B3SOIPDBdpPtr) -= m * gbd; *(here->B3SOIPDBspPtr) -= m * gbs; *(here->B3SOIPDDPdPtr) -= m * gdpr; *(here->B3SOIPDDPgPtr) += m * Gm; *(here->B3SOIPDDPbPtr) -= m * (gbd - Gmbs); *(here->B3SOIPDDPspPtr) -= m * (gds + FwdSum); *(here->B3SOIPDSPgPtr) -= m * Gm; *(here->B3SOIPDSPsPtr) -= m * gspr; *(here->B3SOIPDSPbPtr) -= m * (gbs + Gmbs); *(here->B3SOIPDSPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipd.c0000644000265600020320000011670512264261473022170 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipd.c 98/5/01 Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "b3soipddef.h" #include "ngspice/suffix.h" IFparm B3SOIPDpTable[] = { /* parameters */ IOP( "l", B3SOIPD_L, IF_REAL , "Length"), IOP( "w", B3SOIPD_W, IF_REAL , "Width"), IOP( "m", B3SOIPD_M, IF_REAL , "Parallel Multiplier"), IOP( "ad", B3SOIPD_AD, IF_REAL , "Drain area"), IOP( "as", B3SOIPD_AS, IF_REAL , "Source area"), IOP( "pd", B3SOIPD_PD, IF_REAL , "Drain perimeter"), IOP( "ps", B3SOIPD_PS, IF_REAL , "Source perimeter"), IOP( "nrd", B3SOIPD_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", B3SOIPD_NRS, IF_REAL , "Number of squares in source"), IOP( "off", B3SOIPD_OFF, IF_FLAG , "Device is initially off"), IP( "ic", B3SOIPD_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", B3SOIPD_GMBS, IF_REAL, "Gmb"), OP( "gm", B3SOIPD_GM, IF_REAL, "Gm"), OP( "gm/ids", B3SOIPD_GMID, IF_REAL, "Gm/Ids"), OP( "gds", B3SOIPD_GDS, IF_REAL, "Gds"), OP( "vdsat", B3SOIPD_VDSAT, IF_REAL, "Vdsat"), OP( "vth", B3SOIPD_VON, IF_REAL, "Vth"), OP( "ids", B3SOIPD_CD, IF_REAL, "Ids"), OP( "vbs", B3SOIPD_VBS, IF_REAL, "Vbs"), OP( "vgs", B3SOIPD_VGS, IF_REAL, "Vgs"), OP( "vds", B3SOIPD_VDS, IF_REAL, "Vds"), OP( "ves", B3SOIPD_VES, IF_REAL, "Ves"), IOP( "bjtoff", B3SOIPD_BJTOFF, IF_INTEGER, "BJT on/off flag"), IOP( "debug", B3SOIPD_DEBUG, IF_INTEGER, "BJT on/off flag"), IOP( "rth0", B3SOIPD_RTH0, IF_REAL, "Instance Thermal Resistance"), IOP( "cth0", B3SOIPD_CTH0, IF_REAL, "Instance Thermal Capacitance"), IOP( "nrb", B3SOIPD_NRB, IF_REAL, "Number of squares in body"), IOP( "frbody", B3SOIPD_FRBODY, IF_REAL, "layout dependent body-resistance coefficient"), /* v2.0 release */ IOP( "nbc", B3SOIPD_NBC, IF_REAL, "Number of body contact isolation edge"), IOP( "nseg", B3SOIPD_NSEG, IF_REAL, "Number segments for width partitioning"), IOP( "pdbcp", B3SOIPD_PDBCP, IF_REAL, "Perimeter length for bc parasitics at drain side"), IOP( "psbcp", B3SOIPD_PSBCP, IF_REAL, "Perimeter length for bc parasitics at source side"), IOP( "agbcp", B3SOIPD_AGBCP, IF_REAL, "Gate to body overlap area for bc parasitics"), IOP( "aebcp", B3SOIPD_AEBCP, IF_REAL, "Substrate to body overlap area for bc prasitics"), IOP( "vbsusr", B3SOIPD_VBSUSR, IF_REAL, "Vbs specified by user"), IOP( "tnodeout", B3SOIPD_TNODEOUT, IF_FLAG, "Flag indicating external temp node") }; IFparm B3SOIPDmPTable[] = { /* model parameters */ IOP( "capmod", B3SOIPD_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", B3SOIPD_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", B3SOIPD_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "paramchk", B3SOIPD_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", B3SOIPD_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", B3SOIPD_MOD_VERSION, IF_REAL, " parameter for model version"), IOP( "tox", B3SOIPD_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "dtoxcv", B3SOIPD_MOD_DTOXCV, IF_REAL, "Delta oxide thickness in meters in CapMod3"), /* v2.2.3 */ IOP( "cdsc", B3SOIPD_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", B3SOIPD_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", B3SOIPD_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", B3SOIPD_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", B3SOIPD_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "vsat", B3SOIPD_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", B3SOIPD_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", B3SOIPD_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", B3SOIPD_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", B3SOIPD_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", B3SOIPD_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", B3SOIPD_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", B3SOIPD_MOD_NSUB, IF_REAL, "Substrate doping concentration with polarity"), IOP( "nch", B3SOIPD_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", B3SOIPD_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", B3SOIPD_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", B3SOIPD_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", B3SOIPD_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", B3SOIPD_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", B3SOIPD_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", B3SOIPD_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", B3SOIPD_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", B3SOIPD_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", B3SOIPD_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", B3SOIPD_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", B3SOIPD_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", B3SOIPD_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", B3SOIPD_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", B3SOIPD_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", B3SOIPD_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", B3SOIPD_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", B3SOIPD_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", B3SOIPD_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", B3SOIPD_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", B3SOIPD_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", B3SOIPD_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", B3SOIPD_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", B3SOIPD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", B3SOIPD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", B3SOIPD_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", B3SOIPD_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", B3SOIPD_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", B3SOIPD_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", B3SOIPD_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", B3SOIPD_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", B3SOIPD_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", B3SOIPD_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", B3SOIPD_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", B3SOIPD_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", B3SOIPD_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", B3SOIPD_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "xpart", B3SOIPD_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", B3SOIPD_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", B3SOIPD_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", B3SOIPD_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", B3SOIPD_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", B3SOIPD_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", B3SOIPD_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", B3SOIPD_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", B3SOIPD_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", B3SOIPD_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", B3SOIPD_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", B3SOIPD_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", B3SOIPD_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pvag", B3SOIPD_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "shmod", B3SOIPD_MOD_SHMOD, IF_INTEGER, "Self heating mode selector"), IOP( "ddmod", B3SOIPD_MOD_DDMOD, IF_INTEGER, "Dynamic depletion mode selector"), IOP( "tbox", B3SOIPD_MOD_TBOX, IF_REAL, "Back gate oxide thickness in meters"), IOP( "tsi", B3SOIPD_MOD_TSI, IF_REAL, "Silicon-on-insulator thickness in meters"), IOP( "xj", B3SOIPD_MOD_XJ, IF_REAL, "Junction Depth"), IOP( "rth0", B3SOIPD_MOD_RTH0, IF_REAL, "Self-heating thermal resistance"), IOP( "cth0", B3SOIPD_MOD_CTH0, IF_REAL, "Self-heating thermal capacitance"), IOP( "ngidl", B3SOIPD_MOD_NGIDL, IF_REAL, "GIDL first parameter"), IOP( "agidl", B3SOIPD_MOD_AGIDL, IF_REAL, "GIDL second parameter"), IOP( "bgidl", B3SOIPD_MOD_BGIDL, IF_REAL, "GIDL third parameter"), IOP( "ndiode", B3SOIPD_MOD_NDIODE, IF_REAL, "Diode non-ideality factor"), IOP( "xbjt", B3SOIPD_MOD_XBJT, IF_REAL, "Temperature coefficient for Isbjt"), IOP( "xdif", B3SOIPD_MOD_XDIF, IF_REAL, "Temperature coefficient for Isdif"), IOP( "xrec", B3SOIPD_MOD_XREC, IF_REAL, "Temperature coefficient for Isrec"), IOP( "xtun", B3SOIPD_MOD_XTUN, IF_REAL, "Temperature coefficient for Istun"), IOP( "pbswg", B3SOIPD_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", B3SOIPD_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjswg", B3SOIPD_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "lint", B3SOIPD_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", B3SOIPD_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", B3SOIPD_MOD_LLC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "lln", B3SOIPD_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", B3SOIPD_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", B3SOIPD_MOD_LWC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "lwn", B3SOIPD_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", B3SOIPD_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", B3SOIPD_MOD_LWLC, IF_REAL, "Length reduction parameter"), /* v2.2.3 */ IOP( "wr", B3SOIPD_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", B3SOIPD_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", B3SOIPD_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", B3SOIPD_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", B3SOIPD_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", B3SOIPD_MOD_WLC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "wln", B3SOIPD_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", B3SOIPD_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", B3SOIPD_MOD_WWC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "wwn", B3SOIPD_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", B3SOIPD_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", B3SOIPD_MOD_WWLC, IF_REAL, "Width reduction parameter"), /* v2.2.3 */ IOP( "b0", B3SOIPD_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", B3SOIPD_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", B3SOIPD_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", B3SOIPD_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", B3SOIPD_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", B3SOIPD_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", B3SOIPD_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", B3SOIPD_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", B3SOIPD_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", B3SOIPD_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", B3SOIPD_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "noia", B3SOIPD_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", B3SOIPD_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", B3SOIPD_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", B3SOIPD_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", B3SOIPD_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", B3SOIPD_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", B3SOIPD_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP( "noif", B3SOIPD_MOD_NOIF, IF_REAL, "Floating body excess noise ideality factor"), /* v2.0 release */ IOP( "k1w1", B3SOIPD_MOD_K1W1, IF_REAL, "First Body effect width dependent parameter"), IOP( "k1w2", B3SOIPD_MOD_K1W2, IF_REAL, "Second Boby effect width dependent parameter"), IOP( "ketas", B3SOIPD_MOD_KETAS, IF_REAL, "Surface potential adjustment for bulk charge effect"), IOP( "dwbc", B3SOIPD_MOD_DWBC, IF_REAL, "Width offset for body contact isolation edge"), IOP( "beta0", B3SOIPD_MOD_BETA0, IF_REAL, "First Vds dependent parameter of impact ionizition current"), IOP( "beta1", B3SOIPD_MOD_BETA1, IF_REAL, "Second Vds dependent parameter of impact ionizition current"), IOP( "beta2", B3SOIPD_MOD_BETA2, IF_REAL, "Third Vds dependent parameter of impact ionizition current"), IOP( "vdsatii0", B3SOIPD_MOD_VDSATII0, IF_REAL, "Nominal drain saturation voltage at threshold for impact ionizition current"), IOP( "tii", B3SOIPD_MOD_TII, IF_REAL, "Temperature dependent parameter for impact ionizition"), IOP( "lii", B3SOIPD_MOD_LII, IF_REAL, "Channel length dependent parameter at threshold for impact ionizition current"), IOP( "sii0", B3SOIPD_MOD_SII0, IF_REAL, "First Vgs dependent parameter for impact ionizition current"), IOP( "sii1", B3SOIPD_MOD_SII1, IF_REAL, "Second Vgs dependent parameter for impact ionizition current"), IOP( "sii2", B3SOIPD_MOD_SII2, IF_REAL, "Third Vgs dependent parameter for impact ionizition current"), IOP( "siid", B3SOIPD_MOD_SIID, IF_REAL, "Vds dependent parameter of drain saturation voltage for impact ionizition current"), IOP( "fbjtii", B3SOIPD_MOD_FBJTII, IF_REAL, "Fraction of bipolar current affecting the impact ionization"), IOP( "esatii", B3SOIPD_MOD_ESATII, IF_REAL, "Saturation electric field for impact ionization"), IOP( "ntun", B3SOIPD_MOD_NTUN, IF_REAL, "Reverse tunneling non-ideality factor"), IOP( "nrecf0", B3SOIPD_MOD_NRECF0, IF_REAL, "Recombination non-ideality factor at forward bias"), IOP( "nrecr0", B3SOIPD_MOD_NRECR0, IF_REAL, "Recombination non-ideality factor at reversed bias"), IOP( "isbjt", B3SOIPD_MOD_ISBJT, IF_REAL, "BJT injection saturation current"), IOP( "isdif", B3SOIPD_MOD_ISDIF, IF_REAL, "Body to source/drain injection saturation current"), IOP( "isrec", B3SOIPD_MOD_ISREC, IF_REAL, "Recombination in depletion saturation current"), IOP( "istun", B3SOIPD_MOD_ISTUN, IF_REAL, "Reverse tunneling saturation current"), IOP( "ln", B3SOIPD_MOD_LN, IF_REAL, "Electron/hole diffusion length"), IOP( "vrec0", B3SOIPD_MOD_VREC0, IF_REAL, "Voltage dependent parameter for recombination current"), IOP( "vtun0", B3SOIPD_MOD_VTUN0, IF_REAL, "Voltage dependent parameter for tunneling current"), IOP( "nbjt", B3SOIPD_MOD_NBJT, IF_REAL, "Power coefficient of channel length dependency for bipolar current"), IOP( "lbjt0", B3SOIPD_MOD_LBJT0, IF_REAL, "Refferenc channel length for bipolar cuurent"), IOP( "ldif0", B3SOIPD_MOD_LDIF0, IF_REAL, "Channel-length dependency coefficient of diffusion cap"), IOP( "vabjt", B3SOIPD_MOD_VABJT, IF_REAL, "Early voltage for bipolar current"), IOP( "aely", B3SOIPD_MOD_AELY, IF_REAL, "Channel length dependency of early voltage for bipolar cuurent"), IOP( "ahli", B3SOIPD_MOD_AHLI, IF_REAL, "High level injection parameter for bipolar current"), IOP( "rbody", B3SOIPD_MOD_RBODY, IF_REAL, "Intrinsic body contact sheet resistance"), IOP( "rbsh", B3SOIPD_MOD_RBSH, IF_REAL, "Extrinsic body contact sheet resistance"), IOP( "cgeo", B3SOIPD_MOD_CGEO, IF_REAL, "Gate substrate overlap capacitance per unit channel length"), IOP( "tt", B3SOIPD_MOD_TT, IF_REAL, "Diffusion capacitance transit time coefficient"), IOP( "ndif", B3SOIPD_MOD_NDIF, IF_REAL, "Power coefficient of channel length dependency for diffusion capacitance"), IOP( "vsdfb", B3SOIPD_MOD_VSDFB, IF_REAL, "Source/drain bottom diffusion capacitance flatband voltage"), IOP( "vsdth", B3SOIPD_MOD_VSDTH, IF_REAL, "Source/drain bottom diffusion capacitance threshold voltage"), IOP( "csdmin", B3SOIPD_MOD_CSDMIN, IF_REAL, "Source/drain bottom diffusion minimum capacitance"), IOP( "asd", B3SOIPD_MOD_ASD, IF_REAL, "Source/drain bottom diffusion smoothing parameter"), IOP( "csdesw", B3SOIPD_MOD_CSDESW, IF_REAL, "Source/drain sidewall fringing capacitance per unit length"), IOP( "ntrecf", B3SOIPD_MOD_NTRECF, IF_REAL, "Temperature coefficient for Nrecf"), IOP( "ntrecr", B3SOIPD_MOD_NTRECR, IF_REAL, "Temperature coefficient for Nrecr"), IOP( "dlcb", B3SOIPD_MOD_DLCB, IF_REAL, "Length offset fitting parameter for body charge"), IOP( "fbody", B3SOIPD_MOD_FBODY, IF_REAL, "Scaling factor for body charge"), IOP( "tcjswg", B3SOIPD_MOD_TCJSWG, IF_REAL, "Temperature coefficient of Cjswg"), IOP( "tpbswg", B3SOIPD_MOD_TPBSWG, IF_REAL, "Temperature coefficient of Pbswg"), IOP( "acde", B3SOIPD_MOD_ACDE, IF_REAL, "Exponential coefficient for charge thickness in capMod=3 for accumulation and depletion regions"), IOP( "moin", B3SOIPD_MOD_MOIN, IF_REAL, "Coefficient for the gate-bias dependent surface potential"), IOP( "delvt", B3SOIPD_MOD_DELVT, IF_REAL, "Threshold voltage adjust for CV"), IOP( "kb1", B3SOIPD_MOD_KB1, IF_REAL, "Scaling factor for backgate charge"), IOP( "dlbg", B3SOIPD_MOD_DLBG, IF_REAL, "Length offset fitting parameter for backgate charge"), /* v2.2 release */ IOP( "igmod", B3SOIPD_MOD_IGMOD, IF_INTEGER, "gate current model selector"), IOP( "toxqm", B3SOIPD_MOD_TOXQM, IF_REAL, "effective oxide thickness considering quantum effect"), IOP( "wth0", B3SOIPD_MOD_WTH0, IF_REAL, "Minimum width for thermal resistance calculation"), IOP( "rhalo", B3SOIPD_MOD_RHALO, IF_REAL, "body halo sheet resistance"), IOP( "ntox", B3SOIPD_MOD_NTOX, IF_REAL, "power term of gate current"), IOP( "toxref", B3SOIPD_MOD_TOXREF, IF_REAL, "target oxide thickness"), IOP( "ebg", B3SOIPD_MOD_EBG, IF_REAL, "effective bandgap in gate current calcula."), IOP( "vevb", B3SOIPD_MOD_VEVB, IF_REAL, "Vaux parameter for valence-band electron tunneling"), IOP( "alphagb1", B3SOIPD_MOD_ALPHAGB1, IF_REAL, "First Vox dependent parameter for gate curent in inversion"), IOP( "betagb1", B3SOIPD_MOD_BETAGB1, IF_REAL, "Second Vox dependent parameter for gate currnt in inversion"), IOP( "vgb1", B3SOIPD_MOD_VGB1, IF_REAL, "Third Vox dependent parameter for gate current in inversion"), IOP( "vecb", B3SOIPD_MOD_VECB, IF_REAL, "Vaux parameter for conduction-band electron tunneling"), IOP( "alphagb2", B3SOIPD_MOD_ALPHAGB2, IF_REAL, "First Vox dependent parameter for gate current in accumulation"), IOP( "betagb2", B3SOIPD_MOD_BETAGB2, IF_REAL, "Second Vox dependent parameter for gate current in accumulation"), IOP( "vgb2", B3SOIPD_MOD_VGB2, IF_REAL, "Third Vox dependent parameter for gate current in accumulation"), IOP( "voxh", B3SOIPD_MOD_VOXH, IF_REAL, "the limit of Vox in gate current calculation"), IOP( "deltavox", B3SOIPD_MOD_DELTAVOX, IF_REAL, "the smoothing parameter in the Vox smoothing function"), /* Added for binning - START */ /* Length Dependence */ IOP( "lnch", B3SOIPD_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lnsub", B3SOIPD_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lngate", B3SOIPD_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lvth0", B3SOIPD_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lk1", B3SOIPD_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lk1w1", B3SOIPD_MOD_LK1W1, IF_REAL, "Length dependence of k1w1"), IOP( "lk1w2", B3SOIPD_MOD_LK1W2, IF_REAL, "Length dependence of k1w2"), IOP( "lk2", B3SOIPD_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", B3SOIPD_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", B3SOIPD_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lkb1", B3SOIPD_MOD_LKB1, IF_REAL, "Length dependence of kb1"), IOP( "lw0", B3SOIPD_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", B3SOIPD_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", B3SOIPD_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", B3SOIPD_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", B3SOIPD_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", B3SOIPD_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", B3SOIPD_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", B3SOIPD_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "lu0", B3SOIPD_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lua", B3SOIPD_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lub", B3SOIPD_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "luc", B3SOIPD_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "lvsat", B3SOIPD_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "la0", B3SOIPD_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", B3SOIPD_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "lb0", B3SOIPD_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", B3SOIPD_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lketa", B3SOIPD_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lketas", B3SOIPD_MOD_LKETAS, IF_REAL, "Length dependence of ketas"), IOP( "la1", B3SOIPD_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", B3SOIPD_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lrdsw", B3SOIPD_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwb", B3SOIPD_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprwg", B3SOIPD_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lwr", B3SOIPD_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "lnfactor", B3SOIPD_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "ldwg", B3SOIPD_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", B3SOIPD_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lvoff", B3SOIPD_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "leta0", B3SOIPD_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", B3SOIPD_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "ldsub", B3SOIPD_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lcit", B3SOIPD_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lcdsc", B3SOIPD_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", B3SOIPD_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", B3SOIPD_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lpclm", B3SOIPD_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", B3SOIPD_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", B3SOIPD_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", B3SOIPD_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "ldrout", B3SOIPD_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "lpvag", B3SOIPD_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "ldelta", B3SOIPD_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lalpha0", B3SOIPD_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lfbjtii", B3SOIPD_MOD_LFBJTII, IF_REAL, "Length dependence of fbjtii"), IOP( "lbeta0", B3SOIPD_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lbeta1", B3SOIPD_MOD_LBETA1, IF_REAL, "Length dependence of beta1"), IOP( "lbeta2", B3SOIPD_MOD_LBETA2, IF_REAL, "Length dependence of beta2"), IOP( "lvdsatii0", B3SOIPD_MOD_LVDSATII0, IF_REAL, "Length dependence of vdsatii0"), IOP( "llii", B3SOIPD_MOD_LLII, IF_REAL, "Length dependence of lii"), IOP( "lesatii", B3SOIPD_MOD_LESATII, IF_REAL, "Length dependence of esatii"), IOP( "lsii0", B3SOIPD_MOD_LSII0, IF_REAL, "Length dependence of sii0"), IOP( "lsii1", B3SOIPD_MOD_LSII1, IF_REAL, "Length dependence of sii1"), IOP( "lsii2", B3SOIPD_MOD_LSII2, IF_REAL, "Length dependence of sii2"), IOP( "lsiid", B3SOIPD_MOD_LSIID, IF_REAL, "Length dependence of siid"), IOP( "lagidl", B3SOIPD_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", B3SOIPD_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lngidl", B3SOIPD_MOD_LNGIDL, IF_REAL, "Length dependence of ngidl"), IOP( "lntun", B3SOIPD_MOD_LNTUN, IF_REAL, "Length dependence of ntun"), IOP( "lndiode", B3SOIPD_MOD_LNDIODE, IF_REAL, "Length dependence of ndiode"), IOP( "lnrecf0", B3SOIPD_MOD_LNRECF0, IF_REAL, "Length dependence of nrecf0"), IOP( "lnrecr0", B3SOIPD_MOD_LNRECR0, IF_REAL, "Length dependence of nrecr0"), IOP( "lisbjt", B3SOIPD_MOD_LISBJT, IF_REAL, "Length dependence of isbjt"), IOP( "lisdif", B3SOIPD_MOD_LISDIF, IF_REAL, "Length dependence of isdif"), IOP( "lisrec", B3SOIPD_MOD_LISREC, IF_REAL, "Length dependence of isrec"), IOP( "listun", B3SOIPD_MOD_LISTUN, IF_REAL, "Length dependence of istun"), IOP( "lvrec0", B3SOIPD_MOD_LVREC0, IF_REAL, "Length dependence of vrec0"), IOP( "lvtun0", B3SOIPD_MOD_LVTUN0, IF_REAL, "Length dependence of vtun0"), IOP( "lnbjt", B3SOIPD_MOD_LNBJT, IF_REAL, "Length dependence of nbjt"), IOP( "llbjt0", B3SOIPD_MOD_LLBJT0, IF_REAL, "Length dependence of lbjt0"), IOP( "lvabjt", B3SOIPD_MOD_LVABJT, IF_REAL, "Length dependence of vabjt"), IOP( "laely", B3SOIPD_MOD_LAELY, IF_REAL, "Length dependence of aely"), IOP( "lahli", B3SOIPD_MOD_LAHLI, IF_REAL, "Length dependence of ahli"), IOP( "lvsdfb", B3SOIPD_MOD_LVSDFB, IF_REAL, "Length dependence of vsdfb"), IOP( "lvsdth", B3SOIPD_MOD_LVSDTH, IF_REAL, "Length dependence of vsdth"), IOP( "ldelvt", B3SOIPD_MOD_LDELVT, IF_REAL, "Length dependence of delvt"), IOP( "lacde", B3SOIPD_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", B3SOIPD_MOD_LMOIN, IF_REAL, "Length dependence of amoin"), /* Width Dependence */ IOP( "wnch", B3SOIPD_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wnsub", B3SOIPD_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wngate", B3SOIPD_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wvth0", B3SOIPD_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wk1", B3SOIPD_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wk1w1", B3SOIPD_MOD_WK1W1, IF_REAL, "Width dependence of k1w1"), IOP( "wk1w2", B3SOIPD_MOD_WK1W2, IF_REAL, "Width dependence of k1w2"), IOP( "wk2", B3SOIPD_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", B3SOIPD_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", B3SOIPD_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "wkb1", B3SOIPD_MOD_WKB1, IF_REAL, "Width dependence of kb1"), IOP( "ww0", B3SOIPD_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", B3SOIPD_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", B3SOIPD_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", B3SOIPD_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", B3SOIPD_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", B3SOIPD_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", B3SOIPD_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", B3SOIPD_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wu0", B3SOIPD_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wua", B3SOIPD_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wub", B3SOIPD_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wuc", B3SOIPD_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wvsat", B3SOIPD_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wa0", B3SOIPD_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", B3SOIPD_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wb0", B3SOIPD_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", B3SOIPD_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wketa", B3SOIPD_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wketas", B3SOIPD_MOD_WKETAS, IF_REAL, "Width dependence of ketas"), IOP( "wa1", B3SOIPD_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", B3SOIPD_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wrdsw", B3SOIPD_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwb", B3SOIPD_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprwg", B3SOIPD_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wwr", B3SOIPD_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wnfactor", B3SOIPD_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wdwg", B3SOIPD_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", B3SOIPD_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wvoff", B3SOIPD_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "weta0", B3SOIPD_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", B3SOIPD_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wdsub", B3SOIPD_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wcit", B3SOIPD_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wcdsc", B3SOIPD_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", B3SOIPD_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", B3SOIPD_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wpclm", B3SOIPD_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", B3SOIPD_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", B3SOIPD_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", B3SOIPD_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wdrout", B3SOIPD_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wpvag", B3SOIPD_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wdelta", B3SOIPD_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "walpha0", B3SOIPD_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "wfbjtii", B3SOIPD_MOD_WFBJTII, IF_REAL, "Width dependence of fbjtii"), IOP( "wbeta0", B3SOIPD_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wbeta1", B3SOIPD_MOD_WBETA1, IF_REAL, "Width dependence of beta1"), IOP( "wbeta2", B3SOIPD_MOD_WBETA2, IF_REAL, "Width dependence of beta2"), IOP( "wvdsatii0", B3SOIPD_MOD_WVDSATII0, IF_REAL, "Width dependence of vdsatii0"), IOP( "wlii", B3SOIPD_MOD_WLII, IF_REAL, "Width dependence of lii"), IOP( "wesatii", B3SOIPD_MOD_WESATII, IF_REAL, "Width dependence of esatii"), IOP( "wsii0", B3SOIPD_MOD_WSII0, IF_REAL, "Width dependence of sii0"), IOP( "wsii1", B3SOIPD_MOD_WSII1, IF_REAL, "Width dependence of sii1"), IOP( "wsii2", B3SOIPD_MOD_WSII2, IF_REAL, "Width dependence of sii2"), IOP( "wsiid", B3SOIPD_MOD_WSIID, IF_REAL, "Width dependence of siid"), IOP( "wagidl", B3SOIPD_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", B3SOIPD_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wngidl", B3SOIPD_MOD_WNGIDL, IF_REAL, "Width dependence of ngidl"), IOP( "wntun", B3SOIPD_MOD_WNTUN, IF_REAL, "Width dependence of ntun"), IOP( "wndiode", B3SOIPD_MOD_WNDIODE, IF_REAL, "Width dependence of ndiode"), IOP( "wnrecf0", B3SOIPD_MOD_WNRECF0, IF_REAL, "Width dependence of nrecf0"), IOP( "wnrecr0", B3SOIPD_MOD_WNRECR0, IF_REAL, "Width dependence of nrecr0"), IOP( "wisbjt", B3SOIPD_MOD_WISBJT, IF_REAL, "Width dependence of isbjt"), IOP( "wisdif", B3SOIPD_MOD_WISDIF, IF_REAL, "Width dependence of isdif"), IOP( "wisrec", B3SOIPD_MOD_WISREC, IF_REAL, "Width dependence of isrec"), IOP( "wistun", B3SOIPD_MOD_WISTUN, IF_REAL, "Width dependence of istun"), IOP( "wvrec0", B3SOIPD_MOD_WVREC0, IF_REAL, "Width dependence of vrec0"), IOP( "wvtun0", B3SOIPD_MOD_WVTUN0, IF_REAL, "Width dependence of vtun0"), IOP( "wnbjt", B3SOIPD_MOD_WNBJT, IF_REAL, "Width dependence of nbjt"), IOP( "wlbjt0", B3SOIPD_MOD_WLBJT0, IF_REAL, "Width dependence of lbjt0"), IOP( "wvabjt", B3SOIPD_MOD_WVABJT, IF_REAL, "Width dependence of vabjt"), IOP( "waely", B3SOIPD_MOD_WAELY, IF_REAL, "Width dependence of aely"), IOP( "wahli", B3SOIPD_MOD_WAHLI, IF_REAL, "Width dependence of ahli"), IOP( "wvsdfb", B3SOIPD_MOD_WVSDFB, IF_REAL, "Width dependence of vsdfb"), IOP( "wvsdth", B3SOIPD_MOD_WVSDTH, IF_REAL, "Width dependence of vsdth"), IOP( "wdelvt", B3SOIPD_MOD_WDELVT, IF_REAL, "Width dependence of delvt"), IOP( "wacde", B3SOIPD_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", B3SOIPD_MOD_WMOIN, IF_REAL, "Width dependence of amoin"), /* Cross-term Dependence */ IOP( "pnch", B3SOIPD_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pnsub", B3SOIPD_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pngate", B3SOIPD_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pvth0", B3SOIPD_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pk1", B3SOIPD_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pk1w1", B3SOIPD_MOD_PK1W1, IF_REAL, "Cross-term dependence of k1w1"), IOP( "pk1w2", B3SOIPD_MOD_PK1W2, IF_REAL, "Cross-term dependence of k1w2"), IOP( "pk2", B3SOIPD_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", B3SOIPD_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", B3SOIPD_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pkb1", B3SOIPD_MOD_PKB1, IF_REAL, "Cross-term dependence of kb1"), IOP( "pw0", B3SOIPD_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", B3SOIPD_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", B3SOIPD_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", B3SOIPD_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", B3SOIPD_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", B3SOIPD_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", B3SOIPD_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", B3SOIPD_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pu0", B3SOIPD_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pua", B3SOIPD_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pub", B3SOIPD_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "puc", B3SOIPD_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "pvsat", B3SOIPD_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pa0", B3SOIPD_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", B3SOIPD_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pb0", B3SOIPD_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", B3SOIPD_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pketa", B3SOIPD_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pketas", B3SOIPD_MOD_PKETAS, IF_REAL, "Cross-term dependence of ketas"), IOP( "pa1", B3SOIPD_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", B3SOIPD_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "prdsw", B3SOIPD_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwb", B3SOIPD_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprwg", B3SOIPD_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pwr", B3SOIPD_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pnfactor", B3SOIPD_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pdwg", B3SOIPD_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", B3SOIPD_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pvoff", B3SOIPD_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "peta0", B3SOIPD_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", B3SOIPD_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "pdsub", B3SOIPD_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pcit", B3SOIPD_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pcdsc", B3SOIPD_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", B3SOIPD_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", B3SOIPD_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "ppclm", B3SOIPD_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", B3SOIPD_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", B3SOIPD_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", B3SOIPD_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pdrout", B3SOIPD_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "ppvag", B3SOIPD_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pdelta", B3SOIPD_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "palpha0", B3SOIPD_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "pfbjtii", B3SOIPD_MOD_PFBJTII, IF_REAL, "Cross-term dependence of fbjtii"), IOP( "pbeta0", B3SOIPD_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pbeta1", B3SOIPD_MOD_PBETA1, IF_REAL, "Cross-term dependence of beta1"), IOP( "pbeta2", B3SOIPD_MOD_PBETA2, IF_REAL, "Cross-term dependence of beta2"), IOP( "pvdsatii0", B3SOIPD_MOD_PVDSATII0, IF_REAL, "Cross-term dependence of vdsatii0"), IOP( "plii", B3SOIPD_MOD_PLII, IF_REAL, "Cross-term dependence of lii"), IOP( "pesatii", B3SOIPD_MOD_PESATII, IF_REAL, "Cross-term dependence of esatii"), IOP( "psii0", B3SOIPD_MOD_PSII0, IF_REAL, "Cross-term dependence of sii0"), IOP( "psii1", B3SOIPD_MOD_PSII1, IF_REAL, "Cross-term dependence of sii1"), IOP( "psii2", B3SOIPD_MOD_PSII2, IF_REAL, "Cross-term dependence of sii2"), IOP( "psiid", B3SOIPD_MOD_PSIID, IF_REAL, "Cross-term dependence of siid"), IOP( "pagidl", B3SOIPD_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", B3SOIPD_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pngidl", B3SOIPD_MOD_PNGIDL, IF_REAL, "Cross-term dependence of ngidl"), IOP( "pntun", B3SOIPD_MOD_PNTUN, IF_REAL, "Cross-term dependence of ntun"), IOP( "pndiode", B3SOIPD_MOD_PNDIODE, IF_REAL, "Cross-term dependence of ndiode"), IOP( "pnrecf0", B3SOIPD_MOD_PNRECF0, IF_REAL, "Cross-term dependence of nrecf0"), IOP( "pnrecr0", B3SOIPD_MOD_PNRECR0, IF_REAL, "Cross-term dependence of nrecr0"), IOP( "pisbjt", B3SOIPD_MOD_PISBJT, IF_REAL, "Cross-term dependence of isbjt"), IOP( "pisdif", B3SOIPD_MOD_PISDIF, IF_REAL, "Cross-term dependence of isdif"), IOP( "pisrec", B3SOIPD_MOD_PISREC, IF_REAL, "Cross-term dependence of isrec"), IOP( "pistun", B3SOIPD_MOD_PISTUN, IF_REAL, "Cross-term dependence of istun"), IOP( "pvrec0", B3SOIPD_MOD_PVREC0, IF_REAL, "Cross-term dependence of vrec0"), IOP( "pvtun0", B3SOIPD_MOD_PVTUN0, IF_REAL, "Cross-term dependence of vtun0"), IOP( "pnbjt", B3SOIPD_MOD_PNBJT, IF_REAL, "Cross-term dependence of nbjt"), IOP( "plbjt0", B3SOIPD_MOD_PLBJT0, IF_REAL, "Cross-term dependence of lbjt0"), IOP( "pvabjt", B3SOIPD_MOD_PVABJT, IF_REAL, "Cross-term dependence of vabjt"), IOP( "paely", B3SOIPD_MOD_PAELY, IF_REAL, "Cross-term dependence of aely"), IOP( "pahli", B3SOIPD_MOD_PAHLI, IF_REAL, "Cross-term dependence of ahli"), IOP( "pvsdfb", B3SOIPD_MOD_PVSDFB, IF_REAL, "Cross-term dependence of vsdfb"), IOP( "pvsdth", B3SOIPD_MOD_PVSDTH, IF_REAL, "Cross-term dependence of vsdth"), IOP( "pdelvt", B3SOIPD_MOD_PDELVT, IF_REAL, "Cross-term dependence of delvt"), IOP( "pacde", B3SOIPD_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", B3SOIPD_MOD_PMOIN, IF_REAL, "Cross-term dependence of amoin"), /* Added for binning - END */ IP( "nmos", B3SOIPD_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", B3SOIPD_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B3SOIPDnames[] = { "Drain", "Gate", "Source", "Backgate", "", "Body", "Temp", "Charge", }; int B3SOIPDnSize = NUMELEMS(B3SOIPDnames); int B3SOIPDpTSize = NUMELEMS(B3SOIPDpTable); int B3SOIPDmPTSize = NUMELEMS(B3SOIPDmPTable); int B3SOIPDiSize = sizeof(B3SOIPDinstance); int B3SOIPDmSize = sizeof(B3SOIPDmodel); ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdpar.c0000644000265600020320000001314512264261473022665 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdpar.c 98/5/01 Modified by Pin Su 99/2/15 Modified by Pin Su 01/2/15 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { B3SOIPDinstance *here = (B3SOIPDinstance*)inst; NG_IGNORE(select); switch(param) { case B3SOIPD_W: here->B3SOIPDw = value->rValue; here->B3SOIPDwGiven = TRUE; break; case B3SOIPD_L: here->B3SOIPDl = value->rValue; here->B3SOIPDlGiven = TRUE; break; case B3SOIPD_M: here->B3SOIPDm = value->rValue; here->B3SOIPDmGiven = TRUE; break; case B3SOIPD_AS: here->B3SOIPDsourceArea = value->rValue; here->B3SOIPDsourceAreaGiven = TRUE; break; case B3SOIPD_AD: here->B3SOIPDdrainArea = value->rValue; here->B3SOIPDdrainAreaGiven = TRUE; break; case B3SOIPD_PS: here->B3SOIPDsourcePerimeter = value->rValue; here->B3SOIPDsourcePerimeterGiven = TRUE; break; case B3SOIPD_PD: here->B3SOIPDdrainPerimeter = value->rValue; here->B3SOIPDdrainPerimeterGiven = TRUE; break; case B3SOIPD_NRS: here->B3SOIPDsourceSquares = value->rValue; here->B3SOIPDsourceSquaresGiven = TRUE; break; case B3SOIPD_NRD: here->B3SOIPDdrainSquares = value->rValue; here->B3SOIPDdrainSquaresGiven = TRUE; break; case B3SOIPD_OFF: here->B3SOIPDoff = value->iValue; here->B3SOIPDoffGiven = TRUE; break; case B3SOIPD_IC_VBS: here->B3SOIPDicVBS = value->rValue; here->B3SOIPDicVBSGiven = TRUE; break; case B3SOIPD_IC_VDS: here->B3SOIPDicVDS = value->rValue; here->B3SOIPDicVDSGiven = TRUE; break; case B3SOIPD_IC_VGS: here->B3SOIPDicVGS = value->rValue; here->B3SOIPDicVGSGiven = TRUE; break; case B3SOIPD_IC_VES: here->B3SOIPDicVES = value->rValue; here->B3SOIPDicVESGiven = TRUE; break; case B3SOIPD_IC_VPS: here->B3SOIPDicVPS = value->rValue; here->B3SOIPDicVPSGiven = TRUE; break; case B3SOIPD_BJTOFF: here->B3SOIPDbjtoff = value->iValue; here->B3SOIPDbjtoffGiven= TRUE; break; case B3SOIPD_DEBUG: here->B3SOIPDdebugMod = value->iValue; here->B3SOIPDdebugModGiven= TRUE; break; case B3SOIPD_RTH0: here->B3SOIPDrth0= value->rValue; here->B3SOIPDrth0Given = TRUE; break; case B3SOIPD_CTH0: here->B3SOIPDcth0= value->rValue; here->B3SOIPDcth0Given = TRUE; break; case B3SOIPD_NRB: here->B3SOIPDbodySquares = value->rValue; here->B3SOIPDbodySquaresGiven = TRUE; break; case B3SOIPD_FRBODY: here->B3SOIPDfrbody = value->rValue; here->B3SOIPDfrbodyGiven = TRUE; break; /* v2.0 release */ case B3SOIPD_NBC: here->B3SOIPDnbc = value->rValue; here->B3SOIPDnbcGiven = TRUE; break; case B3SOIPD_NSEG: here->B3SOIPDnseg = value->rValue; here->B3SOIPDnsegGiven = TRUE; break; case B3SOIPD_PDBCP: here->B3SOIPDpdbcp = value->rValue; here->B3SOIPDpdbcpGiven = TRUE; break; case B3SOIPD_PSBCP: here->B3SOIPDpsbcp = value->rValue; here->B3SOIPDpsbcpGiven = TRUE; break; case B3SOIPD_AGBCP: here->B3SOIPDagbcp = value->rValue; here->B3SOIPDagbcpGiven = TRUE; break; case B3SOIPD_AEBCP: here->B3SOIPDaebcp = value->rValue; here->B3SOIPDaebcpGiven = TRUE; break; case B3SOIPD_VBSUSR: here->B3SOIPDvbsusr = value->rValue; here->B3SOIPDvbsusrGiven = TRUE; break; case B3SOIPD_TNODEOUT: here->B3SOIPDtnodeout = value->iValue; here->B3SOIPDtnodeoutGiven = TRUE; break; case B3SOIPD_IC: switch(value->v.numValue){ case 5: here->B3SOIPDicVPS = *(value->v.vec.rVec+4); here->B3SOIPDicVPSGiven = TRUE; case 4: here->B3SOIPDicVES = *(value->v.vec.rVec+3); here->B3SOIPDicVESGiven = TRUE; case 3: here->B3SOIPDicVBS = *(value->v.vec.rVec+2); here->B3SOIPDicVBSGiven = TRUE; case 2: here->B3SOIPDicVGS = *(value->v.vec.rVec+1); here->B3SOIPDicVGSGiven = TRUE; case 1: here->B3SOIPDicVDS = *(value->v.vec.rVec); here->B3SOIPDicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdtrunc.c0000644000265600020320000000240112264261473023227 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdtrunc.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here != NULL; here = here->B3SOIPDnextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B3SOIPDqb,ckt,timeStep); CKTterr(here->B3SOIPDqg,ckt,timeStep); CKTterr(here->B3SOIPDqd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B3SOIPDname,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdacld.c0000644000265600020320000003245012264261473023006 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdacld.c 98/5/01 Modified by Pin Su 99/4/30 Modified by Pin Su 99/9/27 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDacLoad(GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; int selfheat; double xcggb, xcgdb, xcgsb, xcgeb, xcgT; double xcdgb, xcddb, xcdsb, xcdeb, xcdT; double xcsgb, xcsdb, xcssb, xcseb, xcsT; double xcbgb, xcbdb, xcbsb, xcbeb, xcbT; double xcegb, xceeb, xceT; double gdpr, gspr, gds; double cggb, cgdb, cgsb, cgT; double cdgb, cddb, cdsb, cdeb, cdT; double cbgb, cbdb, cbsb, cbeb, cbT; double ceeb, ceT; double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs, GmT; double omega; double dxpart, sxpart; double gbbg, gbbdp, gbbb, gbbp, gbbsp, gbbT; double gddpg, gddpdp, gddpsp, gddpb, gddpT; double gsspg, gsspdp, gsspsp, gsspb, gsspT; double gppdp, gppb, gppp, gppT; double xcTt, cTt, gTtt, gTtg, gTtb, gTtdp, gTtsp; double EDextrinsicCap, ESextrinsicCap; double xcedb, xcesb; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here!= NULL; here = here->B3SOIPDnextInstance) { selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0); if (here->B3SOIPDmode >= 0) { Gm = here->B3SOIPDgm; Gmbs = here->B3SOIPDgmbs; GmT = model->B3SOIPDtype * here->B3SOIPDgmT; FwdSum = Gm + Gmbs; RevSum = 0.0; cbgb = here->B3SOIPDcbgb; cbsb = here->B3SOIPDcbsb; cbdb = here->B3SOIPDcbdb; cbeb = here->B3SOIPDcbeb; cbT = model->B3SOIPDtype * here->B3SOIPDcbT; ceeb = here->B3SOIPDceeb; ceT = model->B3SOIPDtype * here->B3SOIPDceT; cggb = here->B3SOIPDcggb; cgsb = here->B3SOIPDcgsb; cgdb = here->B3SOIPDcgdb; cgT = model->B3SOIPDtype * here->B3SOIPDcgT; cdgb = here->B3SOIPDcdgb; cdsb = here->B3SOIPDcdsb; cddb = here->B3SOIPDcddb; cdeb = here->B3SOIPDcdeb; cdT = model->B3SOIPDtype * here->B3SOIPDcdT; cTt = here->pParam->B3SOIPDcth; gbbg = -here->B3SOIPDgbgs; gbbdp = -here->B3SOIPDgbds; gbbb = -here->B3SOIPDgbbs; gbbp = -here->B3SOIPDgbps; gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbp); gddpg = -here->B3SOIPDgjdg; gddpdp = -here->B3SOIPDgjdd; gddpb = -here->B3SOIPDgjdb; gddpT = -model->B3SOIPDtype * here->B3SOIPDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb ); gsspg = -here->B3SOIPDgjsg; gsspdp = -here->B3SOIPDgjsd; gsspb = -here->B3SOIPDgjsb; gsspT = -model->B3SOIPDtype * here->B3SOIPDgjsT; gsspsp = - (gsspg + gsspdp + gsspb ); gppdp = 0; gppb = -here->B3SOIPDgbpbs; gppp = -here->B3SOIPDgbpps; gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT; gTtg = here->B3SOIPDgtempg; gTtb = here->B3SOIPDgtempb; gTtdp = here->B3SOIPDgtempd; gTtt = here->B3SOIPDgtempT; gTtsp = - (gTtg + gTtb + gTtdp); sxpart = 0.6; dxpart = 0.4; } else { Gm = -here->B3SOIPDgm; Gmbs = -here->B3SOIPDgmbs; GmT = -model->B3SOIPDtype * here->B3SOIPDgmT; FwdSum = 0.0; RevSum = -Gm - Gmbs ; cdgb = - (here->B3SOIPDcdgb + here->B3SOIPDcggb + here->B3SOIPDcbgb); cdsb = - (here->B3SOIPDcddb + here->B3SOIPDcgdb + here->B3SOIPDcbdb); cddb = - (here->B3SOIPDcdsb + here->B3SOIPDcgsb + here->B3SOIPDcbsb); cdeb = - (here->B3SOIPDcdeb + here->B3SOIPDcbeb + here->B3SOIPDceeb); cdT = - model->B3SOIPDtype * (here->B3SOIPDcgT + here->B3SOIPDcbT + here->B3SOIPDcdT + here->B3SOIPDceT); ceeb = here->B3SOIPDceeb; ceT = model->B3SOIPDtype * here->B3SOIPDceT; cggb = here->B3SOIPDcggb; cgsb = here->B3SOIPDcgdb; cgdb = here->B3SOIPDcgsb; cgT = model->B3SOIPDtype * here->B3SOIPDcgT; cbgb = here->B3SOIPDcbgb; cbsb = here->B3SOIPDcbdb; cbdb = here->B3SOIPDcbsb; cbeb = here->B3SOIPDcbeb; cbT = model->B3SOIPDtype * here->B3SOIPDcbT; cTt = here->pParam->B3SOIPDcth; gbbg = -here->B3SOIPDgbgs; gbbb = -here->B3SOIPDgbbs; gbbp = -here->B3SOIPDgbps; gbbsp = -here->B3SOIPDgbds; gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbp); gddpg = -here->B3SOIPDgjsg; gddpsp = -here->B3SOIPDgjsd; gddpb = -here->B3SOIPDgjsb; gddpT = -model->B3SOIPDtype * here->B3SOIPDgjsT; gddpdp = - (gddpg + gddpsp + gddpb ); gsspg = -here->B3SOIPDgjdg; gsspsp = -here->B3SOIPDgjdd; gsspb = -here->B3SOIPDgjdb; gsspT = -model->B3SOIPDtype * here->B3SOIPDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb ); gppb = -here->B3SOIPDgbpbs; gppp = -here->B3SOIPDgbpps; gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT; gppdp = - (gppb + gppp); gTtt = here->B3SOIPDgtempT; gTtg = here->B3SOIPDgtempg; gTtb = here->B3SOIPDgtempb; gTtdp = here->B3SOIPDgtempd; gTtsp = - (gTtt + gTtg + gTtb + gTtdp); gTtg = here->B3SOIPDgtempg; gTtb = here->B3SOIPDgtempb; gTtsp = here->B3SOIPDgtempd; gTtt = here->B3SOIPDgtempT; gTtdp = - (gTtg + gTtb + gTtsp); sxpart = 0.6; sxpart = 0.4; dxpart = 0.6; } gdpr=here->B3SOIPDdrainConductance; gspr=here->B3SOIPDsourceConductance; gds= here->B3SOIPDgds; GSoverlapCap = here->B3SOIPDcgso; GDoverlapCap = here->B3SOIPDcgdo; GEoverlapCap = here->pParam->B3SOIPDcgeo; EDextrinsicCap = here->B3SOIPDgcde; ESextrinsicCap = here->B3SOIPDgcse; xcedb = -EDextrinsicCap * omega; xcdeb = (cdeb - EDextrinsicCap) * omega; xcddb = (cddb + GDoverlapCap + EDextrinsicCap) * omega; xceeb = (ceeb + GEoverlapCap + EDextrinsicCap + ESextrinsicCap) * omega; xcesb = -ESextrinsicCap * omega; xcssb = (GSoverlapCap + ESextrinsicCap - (cgsb + cbsb + cdsb)) * omega; xcseb = -(cbeb + cdeb + ceeb + ESextrinsicCap) * omega; xcegb = (- GEoverlapCap) * omega; xceT = ceT * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcgeb = (- GEoverlapCap) * omega; xcgT = cgT * omega; xcdgb = (cdgb - GDoverlapCap) * omega; xcdsb = cdsb * omega; xcdT = cdT * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcsT = -(cgT + cbT + cdT + ceT) * omega; xcbgb = cbgb * omega; xcbdb = cbdb * omega; xcbsb = cbsb * omega; xcbeb = cbeb * omega; xcbT = cbT * omega; xcTt = cTt * omega; m = here->B3SOIPDm; *(here->B3SOIPDEdpPtr +1) += m * xcedb; *(here->B3SOIPDEspPtr +1) += m * xcesb; *(here->B3SOIPDDPePtr +1) += m * xcdeb; *(here->B3SOIPDSPePtr +1) += m * xcseb; *(here->B3SOIPDEgPtr +1) += m * xcegb; *(here->B3SOIPDGePtr +1) += m * xcgeb; *(here->B3SOIPDEePtr +1) += m * xceeb; *(here->B3SOIPDGgPtr +1) += m * xcggb; *(here->B3SOIPDGdpPtr +1) += m * xcgdb; *(here->B3SOIPDGspPtr +1) += m * xcgsb; *(here->B3SOIPDDPgPtr +1) += m * xcdgb; *(here->B3SOIPDDPdpPtr +1) += m * xcddb; *(here->B3SOIPDDPspPtr +1) += m * xcdsb; *(here->B3SOIPDSPgPtr +1) += m * xcsgb; *(here->B3SOIPDSPdpPtr +1) += m * xcsdb; *(here->B3SOIPDSPspPtr +1) += m * xcssb; *(here->B3SOIPDBePtr +1) += m * xcbeb; *(here->B3SOIPDBgPtr +1) += m * xcbgb; *(here->B3SOIPDBdpPtr +1) += m * xcbdb; *(here->B3SOIPDBspPtr +1) += m * xcbsb; *(here->B3SOIPDEbPtr +1) -= m * (xcegb + xceeb + xcedb + xcesb); *(here->B3SOIPDGbPtr +1) -= m * (xcggb + xcgdb + xcgsb + xcgeb); *(here->B3SOIPDDPbPtr +1) -= m * (xcdgb + xcddb + xcdsb + xcdeb); *(here->B3SOIPDSPbPtr +1) -= m * (xcsgb + xcsdb + xcssb + xcseb); *(here->B3SOIPDBbPtr +1) -= m * (xcbgb + xcbdb + xcbsb + xcbeb); if (selfheat) { *(here->B3SOIPDTemptempPtr + 1) += m * xcTt; *(here->B3SOIPDDPtempPtr + 1) += m * xcdT; *(here->B3SOIPDSPtempPtr + 1) += m * xcsT; *(here->B3SOIPDBtempPtr + 1) += m * xcbT; *(here->B3SOIPDEtempPtr + 1) += m * xceT; *(here->B3SOIPDGtempPtr + 1) += m * xcgT; } *(here->B3SOIPDEePtr) += 0.0; *(here->B3SOIPDDPgPtr) += m * (Gm + gddpg); *(here->B3SOIPDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum); *(here->B3SOIPDDPspPtr) -= m * (gds + FwdSum - gddpsp); *(here->B3SOIPDDPdPtr) -= m * gdpr; *(here->B3SOIPDSPgPtr) -= m * (Gm - gsspg); *(here->B3SOIPDSPdpPtr) -= m * (gds + RevSum - gsspdp); *(here->B3SOIPDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp); *(here->B3SOIPDSPsPtr) -= m * gspr; *(here->B3SOIPDBePtr) += 0; *(here->B3SOIPDBgPtr) += m * gbbg; *(here->B3SOIPDBdpPtr) += m * gbbdp; *(here->B3SOIPDBspPtr) += m * gbbsp; *(here->B3SOIPDBbPtr) += m * gbbb; *(here->B3SOIPDEbPtr) += 0.0; *(here->B3SOIPDSPbPtr) -= m * Gmbs - gsspb; *(here->B3SOIPDDPbPtr) -= m * (-gddpb - Gmbs); if (selfheat) { *(here->B3SOIPDDPtempPtr) += m * (GmT + gddpT); *(here->B3SOIPDSPtempPtr) += m * (-GmT + gsspT); *(here->B3SOIPDBtempPtr) += m * gbbT; *(here->B3SOIPDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIPDrth); *(here->B3SOIPDTempgPtr) += m * gTtg; *(here->B3SOIPDTempbPtr) += m * gTtb; *(here->B3SOIPDTempdpPtr) += m * gTtdp; *(here->B3SOIPDTempspPtr) += m * gTtsp; } *(here->B3SOIPDDdPtr) += m * gdpr; *(here->B3SOIPDDdpPtr) -= m * gdpr; *(here->B3SOIPDSsPtr) += m * gspr; *(here->B3SOIPDSspPtr) -= m * gspr; if (here->B3SOIPDbodyMod == 1) { (*(here->B3SOIPDBpPtr) -= m * gppp); (*(here->B3SOIPDPbPtr) += m * gppb); (*(here->B3SOIPDPpPtr) += m * gppp); } if (here->B3SOIPDdebugMod != 0) { *(here->B3SOIPDVbsPtr) += m * 1; *(here->B3SOIPDIdsPtr) += m * 1; *(here->B3SOIPDIcPtr) += m * 1; *(here->B3SOIPDIbsPtr) += m * 1; *(here->B3SOIPDIbdPtr) += m * 1; *(here->B3SOIPDIiiPtr) += m * 1; *(here->B3SOIPDIgidlPtr) += m * 1; *(here->B3SOIPDItunPtr) += m * 1; *(here->B3SOIPDIbpPtr) += m * 1; *(here->B3SOIPDCbgPtr) += m * 1; *(here->B3SOIPDCbbPtr) += m * 1; *(here->B3SOIPDCbdPtr) += m * 1; *(here->B3SOIPDQbfPtr) += m * 1; *(here->B3SOIPDQjsPtr) += m * 1; *(here->B3SOIPDQjdPtr) += m * 1; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipddest.c0000644000265600020320000000167112264261473023043 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipddest.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "b3soipddef.h" #include "ngspice/suffix.h" void B3SOIPDdestroy(GENmodel **inModel) { B3SOIPDmodel **model = (B3SOIPDmodel**)inModel; B3SOIPDinstance *here; B3SOIPDinstance *prev = NULL; B3SOIPDmodel *mod = *model; B3SOIPDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIPDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipddel.c0000644000265600020320000000207412264261473022646 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipddel.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B3SOIPDdelete(GENmodel *inModel, IFuid name, GENinstance **inInst) { B3SOIPDinstance **fast = (B3SOIPDinstance**)inInst; B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance **prev = NULL; B3SOIPDinstance *here; for (; model ; model = model->B3SOIPDnextModel) { prev = &(model->B3SOIPDinstances); for (here = *prev; here ; here = *prev) { if (here->B3SOIPDname == name || (fast && here==*fast)) { *prev= here->B3SOIPDnextInstance; FREE(here); return(OK); } prev = &(here->B3SOIPDnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdmask.c0000644000265600020320000014215012264261473023035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdmask.c 98/5/01 Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B3SOIPDmodel *model = (B3SOIPDmodel *)inst; NG_IGNORE(ckt); switch(which) { case B3SOIPD_MOD_MOBMOD: value->iValue = model->B3SOIPDmobMod; return(OK); case B3SOIPD_MOD_PARAMCHK: value->iValue = model->B3SOIPDparamChk; return(OK); case B3SOIPD_MOD_BINUNIT: value->iValue = model->B3SOIPDbinUnit; return(OK); case B3SOIPD_MOD_CAPMOD: value->iValue = model->B3SOIPDcapMod; return(OK); case B3SOIPD_MOD_SHMOD: value->iValue = model->B3SOIPDshMod; return(OK); case B3SOIPD_MOD_NOIMOD: value->iValue = model->B3SOIPDnoiMod; return(OK); case B3SOIPD_MOD_VERSION : value->rValue = model->B3SOIPDversion; return(OK); case B3SOIPD_MOD_TOX : value->rValue = model->B3SOIPDtox; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_DTOXCV : value->rValue = model->B3SOIPDdtoxcv; return(OK); case B3SOIPD_MOD_CDSC : value->rValue = model->B3SOIPDcdsc; return(OK); case B3SOIPD_MOD_CDSCB : value->rValue = model->B3SOIPDcdscb; return(OK); case B3SOIPD_MOD_CDSCD : value->rValue = model->B3SOIPDcdscd; return(OK); case B3SOIPD_MOD_CIT : value->rValue = model->B3SOIPDcit; return(OK); case B3SOIPD_MOD_NFACTOR : value->rValue = model->B3SOIPDnfactor; return(OK); case B3SOIPD_MOD_VSAT: value->rValue = model->B3SOIPDvsat; return(OK); case B3SOIPD_MOD_AT: value->rValue = model->B3SOIPDat; return(OK); case B3SOIPD_MOD_A0: value->rValue = model->B3SOIPDa0; return(OK); case B3SOIPD_MOD_AGS: value->rValue = model->B3SOIPDags; return(OK); case B3SOIPD_MOD_A1: value->rValue = model->B3SOIPDa1; return(OK); case B3SOIPD_MOD_A2: value->rValue = model->B3SOIPDa2; return(OK); case B3SOIPD_MOD_KETA: value->rValue = model->B3SOIPDketa; return(OK); case B3SOIPD_MOD_NSUB: value->rValue = model->B3SOIPDnsub; return(OK); case B3SOIPD_MOD_NPEAK: value->rValue = model->B3SOIPDnpeak; return(OK); case B3SOIPD_MOD_NGATE: value->rValue = model->B3SOIPDngate; return(OK); case B3SOIPD_MOD_GAMMA1: value->rValue = model->B3SOIPDgamma1; return(OK); case B3SOIPD_MOD_GAMMA2: value->rValue = model->B3SOIPDgamma2; return(OK); case B3SOIPD_MOD_VBX: value->rValue = model->B3SOIPDvbx; return(OK); case B3SOIPD_MOD_VBM: value->rValue = model->B3SOIPDvbm; return(OK); case B3SOIPD_MOD_XT: value->rValue = model->B3SOIPDxt; return(OK); case B3SOIPD_MOD_K1: value->rValue = model->B3SOIPDk1; return(OK); case B3SOIPD_MOD_KT1: value->rValue = model->B3SOIPDkt1; return(OK); case B3SOIPD_MOD_KT1L: value->rValue = model->B3SOIPDkt1l; return(OK); case B3SOIPD_MOD_KT2 : value->rValue = model->B3SOIPDkt2; return(OK); case B3SOIPD_MOD_K2 : value->rValue = model->B3SOIPDk2; return(OK); case B3SOIPD_MOD_K3: value->rValue = model->B3SOIPDk3; return(OK); case B3SOIPD_MOD_K3B: value->rValue = model->B3SOIPDk3b; return(OK); case B3SOIPD_MOD_W0: value->rValue = model->B3SOIPDw0; return(OK); case B3SOIPD_MOD_NLX: value->rValue = model->B3SOIPDnlx; return(OK); case B3SOIPD_MOD_DVT0 : value->rValue = model->B3SOIPDdvt0; return(OK); case B3SOIPD_MOD_DVT1 : value->rValue = model->B3SOIPDdvt1; return(OK); case B3SOIPD_MOD_DVT2 : value->rValue = model->B3SOIPDdvt2; return(OK); case B3SOIPD_MOD_DVT0W : value->rValue = model->B3SOIPDdvt0w; return(OK); case B3SOIPD_MOD_DVT1W : value->rValue = model->B3SOIPDdvt1w; return(OK); case B3SOIPD_MOD_DVT2W : value->rValue = model->B3SOIPDdvt2w; return(OK); case B3SOIPD_MOD_DROUT : value->rValue = model->B3SOIPDdrout; return(OK); case B3SOIPD_MOD_DSUB : value->rValue = model->B3SOIPDdsub; return(OK); case B3SOIPD_MOD_VTH0: value->rValue = model->B3SOIPDvth0; return(OK); case B3SOIPD_MOD_UA: value->rValue = model->B3SOIPDua; return(OK); case B3SOIPD_MOD_UA1: value->rValue = model->B3SOIPDua1; return(OK); case B3SOIPD_MOD_UB: value->rValue = model->B3SOIPDub; return(OK); case B3SOIPD_MOD_UB1: value->rValue = model->B3SOIPDub1; return(OK); case B3SOIPD_MOD_UC: value->rValue = model->B3SOIPDuc; return(OK); case B3SOIPD_MOD_UC1: value->rValue = model->B3SOIPDuc1; return(OK); case B3SOIPD_MOD_U0: value->rValue = model->B3SOIPDu0; return(OK); case B3SOIPD_MOD_UTE: value->rValue = model->B3SOIPDute; return(OK); case B3SOIPD_MOD_VOFF: value->rValue = model->B3SOIPDvoff; return(OK); case B3SOIPD_MOD_DELTA: value->rValue = model->B3SOIPDdelta; return(OK); case B3SOIPD_MOD_RDSW: value->rValue = model->B3SOIPDrdsw; return(OK); case B3SOIPD_MOD_PRWG: value->rValue = model->B3SOIPDprwg; return(OK); case B3SOIPD_MOD_PRWB: value->rValue = model->B3SOIPDprwb; return(OK); case B3SOIPD_MOD_PRT: value->rValue = model->B3SOIPDprt; return(OK); case B3SOIPD_MOD_ETA0: value->rValue = model->B3SOIPDeta0; return(OK); case B3SOIPD_MOD_ETAB: value->rValue = model->B3SOIPDetab; return(OK); case B3SOIPD_MOD_PCLM: value->rValue = model->B3SOIPDpclm; return(OK); case B3SOIPD_MOD_PDIBL1: value->rValue = model->B3SOIPDpdibl1; return(OK); case B3SOIPD_MOD_PDIBL2: value->rValue = model->B3SOIPDpdibl2; return(OK); case B3SOIPD_MOD_PDIBLB: value->rValue = model->B3SOIPDpdiblb; return(OK); case B3SOIPD_MOD_PVAG: value->rValue = model->B3SOIPDpvag; return(OK); case B3SOIPD_MOD_WR: value->rValue = model->B3SOIPDwr; return(OK); case B3SOIPD_MOD_DWG: value->rValue = model->B3SOIPDdwg; return(OK); case B3SOIPD_MOD_DWB: value->rValue = model->B3SOIPDdwb; return(OK); case B3SOIPD_MOD_B0: value->rValue = model->B3SOIPDb0; return(OK); case B3SOIPD_MOD_B1: value->rValue = model->B3SOIPDb1; return(OK); case B3SOIPD_MOD_ALPHA0: value->rValue = model->B3SOIPDalpha0; return(OK); case B3SOIPD_MOD_CGSL: value->rValue = model->B3SOIPDcgsl; return(OK); case B3SOIPD_MOD_CGDL: value->rValue = model->B3SOIPDcgdl; return(OK); case B3SOIPD_MOD_CKAPPA: value->rValue = model->B3SOIPDckappa; return(OK); case B3SOIPD_MOD_CF: value->rValue = model->B3SOIPDcf; return(OK); case B3SOIPD_MOD_CLC: value->rValue = model->B3SOIPDclc; return(OK); case B3SOIPD_MOD_CLE: value->rValue = model->B3SOIPDcle; return(OK); case B3SOIPD_MOD_DWC: value->rValue = model->B3SOIPDdwc; return(OK); case B3SOIPD_MOD_DLC: value->rValue = model->B3SOIPDdlc; return(OK); case B3SOIPD_MOD_TBOX: value->rValue = model->B3SOIPDtbox; return(OK); case B3SOIPD_MOD_TSI: value->rValue = model->B3SOIPDtsi; return(OK); case B3SOIPD_MOD_RTH0: value->rValue = model->B3SOIPDrth0; return(OK); case B3SOIPD_MOD_CTH0: value->rValue = model->B3SOIPDcth0; return(OK); case B3SOIPD_MOD_NDIODE: value->rValue = model->B3SOIPDndiode; return(OK); case B3SOIPD_MOD_XBJT: value->rValue = model->B3SOIPDxbjt; return(OK); case B3SOIPD_MOD_XDIF: value->rValue = model->B3SOIPDxdif; return(OK); case B3SOIPD_MOD_XREC: value->rValue = model->B3SOIPDxrec; return(OK); case B3SOIPD_MOD_XTUN: value->rValue = model->B3SOIPDxtun; return(OK); case B3SOIPD_MOD_TT: value->rValue = model->B3SOIPDtt; return(OK); case B3SOIPD_MOD_VSDTH: value->rValue = model->B3SOIPDvsdth; return(OK); case B3SOIPD_MOD_VSDFB: value->rValue = model->B3SOIPDvsdfb; return(OK); case B3SOIPD_MOD_CSDMIN: value->rValue = model->B3SOIPDcsdmin; return(OK); case B3SOIPD_MOD_ASD: value->rValue = model->B3SOIPDasd; return(OK); case B3SOIPD_MOD_TNOM : value->rValue = model->B3SOIPDtnom; return(OK); case B3SOIPD_MOD_CGSO: value->rValue = model->B3SOIPDcgso; return(OK); case B3SOIPD_MOD_CGDO: value->rValue = model->B3SOIPDcgdo; return(OK); case B3SOIPD_MOD_CGEO: value->rValue = model->B3SOIPDcgeo; return(OK); case B3SOIPD_MOD_XPART: value->rValue = model->B3SOIPDxpart; return(OK); case B3SOIPD_MOD_RSH: value->rValue = model->B3SOIPDsheetResistance; return(OK); case B3SOIPD_MOD_PBSWG: value->rValue = model->B3SOIPDGatesidewallJctPotential; return(OK); case B3SOIPD_MOD_MJSWG: value->rValue = model->B3SOIPDbodyJctGateSideGradingCoeff; return(OK); case B3SOIPD_MOD_CJSWG: value->rValue = model->B3SOIPDunitLengthGateSidewallJctCap; return(OK); case B3SOIPD_MOD_CSDESW: value->rValue = model->B3SOIPDcsdesw; return(OK); case B3SOIPD_MOD_LINT: value->rValue = model->B3SOIPDLint; return(OK); case B3SOIPD_MOD_LL: value->rValue = model->B3SOIPDLl; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_LLC: value->rValue = model->B3SOIPDLlc; return(OK); case B3SOIPD_MOD_LLN: value->rValue = model->B3SOIPDLln; return(OK); case B3SOIPD_MOD_LW: value->rValue = model->B3SOIPDLw; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_LWC: value->rValue = model->B3SOIPDLwc; return(OK); case B3SOIPD_MOD_LWN: value->rValue = model->B3SOIPDLwn; return(OK); case B3SOIPD_MOD_LWL: value->rValue = model->B3SOIPDLwl; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_LWLC: value->rValue = model->B3SOIPDLwlc; return(OK); case B3SOIPD_MOD_WINT: value->rValue = model->B3SOIPDWint; return(OK); case B3SOIPD_MOD_WL: value->rValue = model->B3SOIPDWl; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_WLC: value->rValue = model->B3SOIPDWlc; return(OK); case B3SOIPD_MOD_WLN: value->rValue = model->B3SOIPDWln; return(OK); case B3SOIPD_MOD_WW: value->rValue = model->B3SOIPDWw; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_WWC: value->rValue = model->B3SOIPDWwc; return(OK); case B3SOIPD_MOD_WWN: value->rValue = model->B3SOIPDWwn; return(OK); case B3SOIPD_MOD_WWL: value->rValue = model->B3SOIPDWwl; return(OK); /* v2.2.3 */ case B3SOIPD_MOD_WWLC: value->rValue = model->B3SOIPDWwlc; return(OK); case B3SOIPD_MOD_NOIA: value->rValue = model->B3SOIPDoxideTrapDensityA; return(OK); case B3SOIPD_MOD_NOIB: value->rValue = model->B3SOIPDoxideTrapDensityB; return(OK); case B3SOIPD_MOD_NOIC: value->rValue = model->B3SOIPDoxideTrapDensityC; return(OK); case B3SOIPD_MOD_NOIF: value->rValue = model->B3SOIPDnoif; return(OK); case B3SOIPD_MOD_EM: value->rValue = model->B3SOIPDem; return(OK); case B3SOIPD_MOD_EF: value->rValue = model->B3SOIPDef; return(OK); case B3SOIPD_MOD_AF: value->rValue = model->B3SOIPDaf; return(OK); case B3SOIPD_MOD_KF: value->rValue = model->B3SOIPDkf; return(OK); /* v2.0 release */ case B3SOIPD_MOD_K1W1: value->rValue = model->B3SOIPDk1w1; return(OK); case B3SOIPD_MOD_K1W2: value->rValue = model->B3SOIPDk1w2; return(OK); case B3SOIPD_MOD_KETAS: value->rValue = model->B3SOIPDketas; return(OK); case B3SOIPD_MOD_DWBC: value->rValue = model->B3SOIPDdwbc; return(OK); case B3SOIPD_MOD_BETA0: value->rValue = model->B3SOIPDbeta0; return(OK); case B3SOIPD_MOD_BETA1: value->rValue = model->B3SOIPDbeta1; return(OK); case B3SOIPD_MOD_BETA2: value->rValue = model->B3SOIPDbeta2; return(OK); case B3SOIPD_MOD_VDSATII0: value->rValue = model->B3SOIPDvdsatii0; return(OK); case B3SOIPD_MOD_TII: value->rValue = model->B3SOIPDtii; return(OK); case B3SOIPD_MOD_LII: value->rValue = model->B3SOIPDlii; return(OK); case B3SOIPD_MOD_SII0: value->rValue = model->B3SOIPDsii0; return(OK); case B3SOIPD_MOD_SII1: value->rValue = model->B3SOIPDsii1; return(OK); case B3SOIPD_MOD_SII2: value->rValue = model->B3SOIPDsii2; return(OK); case B3SOIPD_MOD_SIID: value->rValue = model->B3SOIPDsiid; return(OK); case B3SOIPD_MOD_FBJTII: value->rValue = model->B3SOIPDfbjtii; return(OK); case B3SOIPD_MOD_ESATII: value->rValue = model->B3SOIPDesatii; return(OK); case B3SOIPD_MOD_NTUN: value->rValue = model->B3SOIPDntun; return(OK); case B3SOIPD_MOD_NRECF0: value->rValue = model->B3SOIPDnrecf0; return(OK); case B3SOIPD_MOD_NRECR0: value->rValue = model->B3SOIPDnrecr0; return(OK); case B3SOIPD_MOD_ISBJT: value->rValue = model->B3SOIPDisbjt; return(OK); case B3SOIPD_MOD_ISDIF: value->rValue = model->B3SOIPDisdif; return(OK); case B3SOIPD_MOD_ISREC: value->rValue = model->B3SOIPDisrec; return(OK); case B3SOIPD_MOD_ISTUN: value->rValue = model->B3SOIPDistun; return(OK); case B3SOIPD_MOD_LN: value->rValue = model->B3SOIPDln; return(OK); case B3SOIPD_MOD_VREC0: value->rValue = model->B3SOIPDvrec0; return(OK); case B3SOIPD_MOD_VTUN0: value->rValue = model->B3SOIPDvtun0; return(OK); case B3SOIPD_MOD_NBJT: value->rValue = model->B3SOIPDnbjt; return(OK); case B3SOIPD_MOD_LBJT0: value->rValue = model->B3SOIPDlbjt0; return(OK); case B3SOIPD_MOD_LDIF0: value->rValue = model->B3SOIPDldif0; return(OK); case B3SOIPD_MOD_VABJT: value->rValue = model->B3SOIPDvabjt; return(OK); case B3SOIPD_MOD_AELY: value->rValue = model->B3SOIPDaely; return(OK); case B3SOIPD_MOD_AHLI: value->rValue = model->B3SOIPDahli; return(OK); case B3SOIPD_MOD_RBODY: value->rValue = model->B3SOIPDrbody; return(OK); case B3SOIPD_MOD_RBSH: value->rValue = model->B3SOIPDrbsh; return(OK); case B3SOIPD_MOD_NTRECF: value->rValue = model->B3SOIPDntrecf; return(OK); case B3SOIPD_MOD_NTRECR: value->rValue = model->B3SOIPDntrecr; return(OK); case B3SOIPD_MOD_NDIF: value->rValue = model->B3SOIPDndif; return(OK); case B3SOIPD_MOD_DLCB: value->rValue = model->B3SOIPDdlcb; return(OK); case B3SOIPD_MOD_FBODY: value->rValue = model->B3SOIPDfbody; return(OK); case B3SOIPD_MOD_TCJSWG: value->rValue = model->B3SOIPDtcjswg; return(OK); case B3SOIPD_MOD_TPBSWG: value->rValue = model->B3SOIPDtpbswg; return(OK); case B3SOIPD_MOD_ACDE: value->rValue = model->B3SOIPDacde; return(OK); case B3SOIPD_MOD_MOIN: value->rValue = model->B3SOIPDmoin; return(OK); case B3SOIPD_MOD_DELVT: value->rValue = model->B3SOIPDdelvt; return(OK); case B3SOIPD_MOD_KB1: value->rValue = model->B3SOIPDkb1; return(OK); case B3SOIPD_MOD_DLBG: value->rValue = model->B3SOIPDdlbg; return(OK); case B3SOIPD_MOD_NGIDL: value->rValue = model->B3SOIPDngidl; return(OK); case B3SOIPD_MOD_AGIDL: value->rValue = model->B3SOIPDagidl; return(OK); case B3SOIPD_MOD_BGIDL: value->rValue = model->B3SOIPDbgidl; return(OK); /* v2.2 release */ case B3SOIPD_MOD_WTH0: value->rValue = model->B3SOIPDwth0; return(OK); case B3SOIPD_MOD_RHALO: value->rValue = model->B3SOIPDrhalo; return(OK); case B3SOIPD_MOD_NTOX: value->rValue = model->B3SOIPDntox; return(OK); case B3SOIPD_MOD_TOXREF: value->rValue = model->B3SOIPDtoxref; return(OK); case B3SOIPD_MOD_EBG: value->rValue = model->B3SOIPDebg; return(OK); case B3SOIPD_MOD_VEVB: value->rValue = model->B3SOIPDvevb; return(OK); case B3SOIPD_MOD_ALPHAGB1: value->rValue = model->B3SOIPDalphaGB1; return(OK); case B3SOIPD_MOD_BETAGB1: value->rValue = model->B3SOIPDbetaGB1; return(OK); case B3SOIPD_MOD_VGB1: value->rValue = model->B3SOIPDvgb1; return(OK); case B3SOIPD_MOD_VECB: value->rValue = model->B3SOIPDvecb; return(OK); case B3SOIPD_MOD_ALPHAGB2: value->rValue = model->B3SOIPDalphaGB2; return(OK); case B3SOIPD_MOD_BETAGB2: value->rValue = model->B3SOIPDbetaGB2; return(OK); case B3SOIPD_MOD_VGB2: value->rValue = model->B3SOIPDvgb2; return(OK); case B3SOIPD_MOD_TOXQM: value->rValue = model->B3SOIPDtoxqm; return(OK); case B3SOIPD_MOD_VOXH: value->rValue = model->B3SOIPDvoxh; return(OK); case B3SOIPD_MOD_DELTAVOX: value->rValue = model->B3SOIPDdeltavox; return(OK); case B3SOIPD_MOD_IGMOD: value->iValue = model->B3SOIPDigMod; return(OK); /* Added for binning - START */ /* Length Dependence */ case B3SOIPD_MOD_LNPEAK: value->rValue = model->B3SOIPDlnpeak; return(OK); case B3SOIPD_MOD_LNSUB: value->rValue = model->B3SOIPDlnsub; return(OK); case B3SOIPD_MOD_LNGATE: value->rValue = model->B3SOIPDlngate; return(OK); case B3SOIPD_MOD_LVTH0: value->rValue = model->B3SOIPDlvth0; return(OK); case B3SOIPD_MOD_LK1: value->rValue = model->B3SOIPDlk1; return(OK); case B3SOIPD_MOD_LK1W1: value->rValue = model->B3SOIPDlk1w1; return(OK); case B3SOIPD_MOD_LK1W2: value->rValue = model->B3SOIPDlk1w2; return(OK); case B3SOIPD_MOD_LK2: value->rValue = model->B3SOIPDlk2; return(OK); case B3SOIPD_MOD_LK3: value->rValue = model->B3SOIPDlk3; return(OK); case B3SOIPD_MOD_LK3B: value->rValue = model->B3SOIPDlk3b; return(OK); case B3SOIPD_MOD_LKB1: value->rValue = model->B3SOIPDlkb1; return(OK); case B3SOIPD_MOD_LW0: value->rValue = model->B3SOIPDlw0; return(OK); case B3SOIPD_MOD_LNLX: value->rValue = model->B3SOIPDlnlx; return(OK); case B3SOIPD_MOD_LDVT0 : value->rValue = model->B3SOIPDldvt0; return(OK); case B3SOIPD_MOD_LDVT1 : value->rValue = model->B3SOIPDldvt1; return(OK); case B3SOIPD_MOD_LDVT2 : value->rValue = model->B3SOIPDldvt2; return(OK); case B3SOIPD_MOD_LDVT0W : value->rValue = model->B3SOIPDldvt0w; return(OK); case B3SOIPD_MOD_LDVT1W : value->rValue = model->B3SOIPDldvt1w; return(OK); case B3SOIPD_MOD_LDVT2W : value->rValue = model->B3SOIPDldvt2w; return(OK); case B3SOIPD_MOD_LU0: value->rValue = model->B3SOIPDlu0; return(OK); case B3SOIPD_MOD_LUA: value->rValue = model->B3SOIPDlua; return(OK); case B3SOIPD_MOD_LUB: value->rValue = model->B3SOIPDlub; return(OK); case B3SOIPD_MOD_LUC: value->rValue = model->B3SOIPDluc; return(OK); case B3SOIPD_MOD_LVSAT: value->rValue = model->B3SOIPDlvsat; return(OK); case B3SOIPD_MOD_LA0: value->rValue = model->B3SOIPDla0; return(OK); case B3SOIPD_MOD_LAGS: value->rValue = model->B3SOIPDlags; return(OK); case B3SOIPD_MOD_LB0: value->rValue = model->B3SOIPDlb0; return(OK); case B3SOIPD_MOD_LB1: value->rValue = model->B3SOIPDlb1; return(OK); case B3SOIPD_MOD_LKETA: value->rValue = model->B3SOIPDlketa; return(OK); case B3SOIPD_MOD_LKETAS: value->rValue = model->B3SOIPDlketas; return(OK); case B3SOIPD_MOD_LA1: value->rValue = model->B3SOIPDla1; return(OK); case B3SOIPD_MOD_LA2: value->rValue = model->B3SOIPDla2; return(OK); case B3SOIPD_MOD_LRDSW: value->rValue = model->B3SOIPDlrdsw; return(OK); case B3SOIPD_MOD_LPRWB: value->rValue = model->B3SOIPDlprwb; return(OK); case B3SOIPD_MOD_LPRWG: value->rValue = model->B3SOIPDlprwg; return(OK); case B3SOIPD_MOD_LWR: value->rValue = model->B3SOIPDlwr; return(OK); case B3SOIPD_MOD_LNFACTOR : value->rValue = model->B3SOIPDlnfactor; return(OK); case B3SOIPD_MOD_LDWG: value->rValue = model->B3SOIPDldwg; return(OK); case B3SOIPD_MOD_LDWB: value->rValue = model->B3SOIPDldwb; return(OK); case B3SOIPD_MOD_LVOFF: value->rValue = model->B3SOIPDlvoff; return(OK); case B3SOIPD_MOD_LETA0: value->rValue = model->B3SOIPDleta0; return(OK); case B3SOIPD_MOD_LETAB: value->rValue = model->B3SOIPDletab; return(OK); case B3SOIPD_MOD_LDSUB : value->rValue = model->B3SOIPDldsub; return(OK); case B3SOIPD_MOD_LCIT : value->rValue = model->B3SOIPDlcit; return(OK); case B3SOIPD_MOD_LCDSC : value->rValue = model->B3SOIPDlcdsc; return(OK); case B3SOIPD_MOD_LCDSCB : value->rValue = model->B3SOIPDlcdscb; return(OK); case B3SOIPD_MOD_LCDSCD : value->rValue = model->B3SOIPDlcdscd; return(OK); case B3SOIPD_MOD_LPCLM: value->rValue = model->B3SOIPDlpclm; return(OK); case B3SOIPD_MOD_LPDIBL1: value->rValue = model->B3SOIPDlpdibl1; return(OK); case B3SOIPD_MOD_LPDIBL2: value->rValue = model->B3SOIPDlpdibl2; return(OK); case B3SOIPD_MOD_LPDIBLB: value->rValue = model->B3SOIPDlpdiblb; return(OK); case B3SOIPD_MOD_LDROUT : value->rValue = model->B3SOIPDldrout; return(OK); case B3SOIPD_MOD_LPVAG: value->rValue = model->B3SOIPDlpvag; return(OK); case B3SOIPD_MOD_LDELTA: value->rValue = model->B3SOIPDldelta; return(OK); case B3SOIPD_MOD_LALPHA0: value->rValue = model->B3SOIPDlalpha0; return(OK); case B3SOIPD_MOD_LFBJTII: value->rValue = model->B3SOIPDlfbjtii; return(OK); case B3SOIPD_MOD_LBETA0: value->rValue = model->B3SOIPDlbeta0; return(OK); case B3SOIPD_MOD_LBETA1: value->rValue = model->B3SOIPDlbeta1; return(OK); case B3SOIPD_MOD_LBETA2: value->rValue = model->B3SOIPDlbeta2; return(OK); case B3SOIPD_MOD_LVDSATII0: value->rValue = model->B3SOIPDlvdsatii0; return(OK); case B3SOIPD_MOD_LLII: value->rValue = model->B3SOIPDllii; return(OK); case B3SOIPD_MOD_LESATII: value->rValue = model->B3SOIPDlesatii; return(OK); case B3SOIPD_MOD_LSII0: value->rValue = model->B3SOIPDlsii0; return(OK); case B3SOIPD_MOD_LSII1: value->rValue = model->B3SOIPDlsii1; return(OK); case B3SOIPD_MOD_LSII2: value->rValue = model->B3SOIPDlsii2; return(OK); case B3SOIPD_MOD_LSIID: value->rValue = model->B3SOIPDlsiid; return(OK); case B3SOIPD_MOD_LAGIDL: value->rValue = model->B3SOIPDlagidl; return(OK); case B3SOIPD_MOD_LBGIDL: value->rValue = model->B3SOIPDlbgidl; return(OK); case B3SOIPD_MOD_LNGIDL: value->rValue = model->B3SOIPDlngidl; return(OK); case B3SOIPD_MOD_LNTUN: value->rValue = model->B3SOIPDlntun; return(OK); case B3SOIPD_MOD_LNDIODE: value->rValue = model->B3SOIPDlndiode; return(OK); case B3SOIPD_MOD_LNRECF0: value->rValue = model->B3SOIPDlnrecf0; return(OK); case B3SOIPD_MOD_LNRECR0: value->rValue = model->B3SOIPDlnrecr0; return(OK); case B3SOIPD_MOD_LISBJT: value->rValue = model->B3SOIPDlisbjt; return(OK); case B3SOIPD_MOD_LISDIF: value->rValue = model->B3SOIPDlisdif; return(OK); case B3SOIPD_MOD_LISREC: value->rValue = model->B3SOIPDlisrec; return(OK); case B3SOIPD_MOD_LISTUN: value->rValue = model->B3SOIPDlistun; return(OK); case B3SOIPD_MOD_LVREC0: value->rValue = model->B3SOIPDlvrec0; return(OK); case B3SOIPD_MOD_LVTUN0: value->rValue = model->B3SOIPDlvtun0; return(OK); case B3SOIPD_MOD_LNBJT: value->rValue = model->B3SOIPDlnbjt; return(OK); case B3SOIPD_MOD_LLBJT0: value->rValue = model->B3SOIPDllbjt0; return(OK); case B3SOIPD_MOD_LVABJT: value->rValue = model->B3SOIPDlvabjt; return(OK); case B3SOIPD_MOD_LAELY: value->rValue = model->B3SOIPDlaely; return(OK); case B3SOIPD_MOD_LAHLI: value->rValue = model->B3SOIPDlahli; return(OK); /* CV Model */ case B3SOIPD_MOD_LVSDFB: value->rValue = model->B3SOIPDlvsdfb; return(OK); case B3SOIPD_MOD_LVSDTH: value->rValue = model->B3SOIPDlvsdth; return(OK); case B3SOIPD_MOD_LDELVT: value->rValue = model->B3SOIPDldelvt; return(OK); case B3SOIPD_MOD_LACDE: value->rValue = model->B3SOIPDlacde; return(OK); case B3SOIPD_MOD_LMOIN: value->rValue = model->B3SOIPDlmoin; return(OK); /* Width Dependence */ case B3SOIPD_MOD_WNPEAK: value->rValue = model->B3SOIPDwnpeak; return(OK); case B3SOIPD_MOD_WNSUB: value->rValue = model->B3SOIPDwnsub; return(OK); case B3SOIPD_MOD_WNGATE: value->rValue = model->B3SOIPDwngate; return(OK); case B3SOIPD_MOD_WVTH0: value->rValue = model->B3SOIPDwvth0; return(OK); case B3SOIPD_MOD_WK1: value->rValue = model->B3SOIPDwk1; return(OK); case B3SOIPD_MOD_WK1W1: value->rValue = model->B3SOIPDwk1w1; return(OK); case B3SOIPD_MOD_WK1W2: value->rValue = model->B3SOIPDwk1w2; return(OK); case B3SOIPD_MOD_WK2: value->rValue = model->B3SOIPDwk2; return(OK); case B3SOIPD_MOD_WK3: value->rValue = model->B3SOIPDwk3; return(OK); case B3SOIPD_MOD_WK3B: value->rValue = model->B3SOIPDwk3b; return(OK); case B3SOIPD_MOD_WKB1: value->rValue = model->B3SOIPDwkb1; return(OK); case B3SOIPD_MOD_WW0: value->rValue = model->B3SOIPDww0; return(OK); case B3SOIPD_MOD_WNLX: value->rValue = model->B3SOIPDwnlx; return(OK); case B3SOIPD_MOD_WDVT0 : value->rValue = model->B3SOIPDwdvt0; return(OK); case B3SOIPD_MOD_WDVT1 : value->rValue = model->B3SOIPDwdvt1; return(OK); case B3SOIPD_MOD_WDVT2 : value->rValue = model->B3SOIPDwdvt2; return(OK); case B3SOIPD_MOD_WDVT0W : value->rValue = model->B3SOIPDwdvt0w; return(OK); case B3SOIPD_MOD_WDVT1W : value->rValue = model->B3SOIPDwdvt1w; return(OK); case B3SOIPD_MOD_WDVT2W : value->rValue = model->B3SOIPDwdvt2w; return(OK); case B3SOIPD_MOD_WU0: value->rValue = model->B3SOIPDwu0; return(OK); case B3SOIPD_MOD_WUA: value->rValue = model->B3SOIPDwua; return(OK); case B3SOIPD_MOD_WUB: value->rValue = model->B3SOIPDwub; return(OK); case B3SOIPD_MOD_WUC: value->rValue = model->B3SOIPDwuc; return(OK); case B3SOIPD_MOD_WVSAT: value->rValue = model->B3SOIPDwvsat; return(OK); case B3SOIPD_MOD_WA0: value->rValue = model->B3SOIPDwa0; return(OK); case B3SOIPD_MOD_WAGS: value->rValue = model->B3SOIPDwags; return(OK); case B3SOIPD_MOD_WB0: value->rValue = model->B3SOIPDwb0; return(OK); case B3SOIPD_MOD_WB1: value->rValue = model->B3SOIPDwb1; return(OK); case B3SOIPD_MOD_WKETA: value->rValue = model->B3SOIPDwketa; return(OK); case B3SOIPD_MOD_WKETAS: value->rValue = model->B3SOIPDwketas; return(OK); case B3SOIPD_MOD_WA1: value->rValue = model->B3SOIPDwa1; return(OK); case B3SOIPD_MOD_WA2: value->rValue = model->B3SOIPDwa2; return(OK); case B3SOIPD_MOD_WRDSW: value->rValue = model->B3SOIPDwrdsw; return(OK); case B3SOIPD_MOD_WPRWB: value->rValue = model->B3SOIPDwprwb; return(OK); case B3SOIPD_MOD_WPRWG: value->rValue = model->B3SOIPDwprwg; return(OK); case B3SOIPD_MOD_WWR: value->rValue = model->B3SOIPDwwr; return(OK); case B3SOIPD_MOD_WNFACTOR : value->rValue = model->B3SOIPDwnfactor; return(OK); case B3SOIPD_MOD_WDWG: value->rValue = model->B3SOIPDwdwg; return(OK); case B3SOIPD_MOD_WDWB: value->rValue = model->B3SOIPDwdwb; return(OK); case B3SOIPD_MOD_WVOFF: value->rValue = model->B3SOIPDwvoff; return(OK); case B3SOIPD_MOD_WETA0: value->rValue = model->B3SOIPDweta0; return(OK); case B3SOIPD_MOD_WETAB: value->rValue = model->B3SOIPDwetab; return(OK); case B3SOIPD_MOD_WDSUB : value->rValue = model->B3SOIPDwdsub; return(OK); case B3SOIPD_MOD_WCIT : value->rValue = model->B3SOIPDwcit; return(OK); case B3SOIPD_MOD_WCDSC : value->rValue = model->B3SOIPDwcdsc; return(OK); case B3SOIPD_MOD_WCDSCB : value->rValue = model->B3SOIPDwcdscb; return(OK); case B3SOIPD_MOD_WCDSCD : value->rValue = model->B3SOIPDwcdscd; return(OK); case B3SOIPD_MOD_WPCLM: value->rValue = model->B3SOIPDwpclm; return(OK); case B3SOIPD_MOD_WPDIBL1: value->rValue = model->B3SOIPDwpdibl1; return(OK); case B3SOIPD_MOD_WPDIBL2: value->rValue = model->B3SOIPDwpdibl2; return(OK); case B3SOIPD_MOD_WPDIBLB: value->rValue = model->B3SOIPDwpdiblb; return(OK); case B3SOIPD_MOD_WDROUT : value->rValue = model->B3SOIPDwdrout; return(OK); case B3SOIPD_MOD_WPVAG: value->rValue = model->B3SOIPDwpvag; return(OK); case B3SOIPD_MOD_WDELTA: value->rValue = model->B3SOIPDwdelta; return(OK); case B3SOIPD_MOD_WALPHA0: value->rValue = model->B3SOIPDwalpha0; return(OK); case B3SOIPD_MOD_WFBJTII: value->rValue = model->B3SOIPDwfbjtii; return(OK); case B3SOIPD_MOD_WBETA0: value->rValue = model->B3SOIPDwbeta0; return(OK); case B3SOIPD_MOD_WBETA1: value->rValue = model->B3SOIPDwbeta1; return(OK); case B3SOIPD_MOD_WBETA2: value->rValue = model->B3SOIPDwbeta2; return(OK); case B3SOIPD_MOD_WVDSATII0: value->rValue = model->B3SOIPDwvdsatii0; return(OK); case B3SOIPD_MOD_WLII: value->rValue = model->B3SOIPDwlii; return(OK); case B3SOIPD_MOD_WESATII: value->rValue = model->B3SOIPDwesatii; return(OK); case B3SOIPD_MOD_WSII0: value->rValue = model->B3SOIPDwsii0; return(OK); case B3SOIPD_MOD_WSII1: value->rValue = model->B3SOIPDwsii1; return(OK); case B3SOIPD_MOD_WSII2: value->rValue = model->B3SOIPDwsii2; return(OK); case B3SOIPD_MOD_WSIID: value->rValue = model->B3SOIPDwsiid; return(OK); case B3SOIPD_MOD_WAGIDL: value->rValue = model->B3SOIPDwagidl; return(OK); case B3SOIPD_MOD_WBGIDL: value->rValue = model->B3SOIPDwbgidl; return(OK); case B3SOIPD_MOD_WNGIDL: value->rValue = model->B3SOIPDwngidl; return(OK); case B3SOIPD_MOD_WNTUN: value->rValue = model->B3SOIPDwntun; return(OK); case B3SOIPD_MOD_WNDIODE: value->rValue = model->B3SOIPDwndiode; return(OK); case B3SOIPD_MOD_WNRECF0: value->rValue = model->B3SOIPDwnrecf0; return(OK); case B3SOIPD_MOD_WNRECR0: value->rValue = model->B3SOIPDwnrecr0; return(OK); case B3SOIPD_MOD_WISBJT: value->rValue = model->B3SOIPDwisbjt; return(OK); case B3SOIPD_MOD_WISDIF: value->rValue = model->B3SOIPDwisdif; return(OK); case B3SOIPD_MOD_WISREC: value->rValue = model->B3SOIPDwisrec; return(OK); case B3SOIPD_MOD_WISTUN: value->rValue = model->B3SOIPDwistun; return(OK); case B3SOIPD_MOD_WVREC0: value->rValue = model->B3SOIPDwvrec0; return(OK); case B3SOIPD_MOD_WVTUN0: value->rValue = model->B3SOIPDwvtun0; return(OK); case B3SOIPD_MOD_WNBJT: value->rValue = model->B3SOIPDwnbjt; return(OK); case B3SOIPD_MOD_WLBJT0: value->rValue = model->B3SOIPDwlbjt0; return(OK); case B3SOIPD_MOD_WVABJT: value->rValue = model->B3SOIPDwvabjt; return(OK); case B3SOIPD_MOD_WAELY: value->rValue = model->B3SOIPDwaely; return(OK); case B3SOIPD_MOD_WAHLI: value->rValue = model->B3SOIPDwahli; return(OK); /* CV Model */ case B3SOIPD_MOD_WVSDFB: value->rValue = model->B3SOIPDwvsdfb; return(OK); case B3SOIPD_MOD_WVSDTH: value->rValue = model->B3SOIPDwvsdth; return(OK); case B3SOIPD_MOD_WDELVT: value->rValue = model->B3SOIPDwdelvt; return(OK); case B3SOIPD_MOD_WACDE: value->rValue = model->B3SOIPDwacde; return(OK); case B3SOIPD_MOD_WMOIN: value->rValue = model->B3SOIPDwmoin; return(OK); /* Cross-term Dependence */ case B3SOIPD_MOD_PNPEAK: value->rValue = model->B3SOIPDpnpeak; return(OK); case B3SOIPD_MOD_PNSUB: value->rValue = model->B3SOIPDpnsub; return(OK); case B3SOIPD_MOD_PNGATE: value->rValue = model->B3SOIPDpngate; return(OK); case B3SOIPD_MOD_PVTH0: value->rValue = model->B3SOIPDpvth0; return(OK); case B3SOIPD_MOD_PK1: value->rValue = model->B3SOIPDpk1; return(OK); case B3SOIPD_MOD_PK1W1: value->rValue = model->B3SOIPDpk1w1; return(OK); case B3SOIPD_MOD_PK1W2: value->rValue = model->B3SOIPDpk1w2; return(OK); case B3SOIPD_MOD_PK2: value->rValue = model->B3SOIPDpk2; return(OK); case B3SOIPD_MOD_PK3: value->rValue = model->B3SOIPDpk3; return(OK); case B3SOIPD_MOD_PK3B: value->rValue = model->B3SOIPDpk3b; return(OK); case B3SOIPD_MOD_PKB1: value->rValue = model->B3SOIPDpkb1; return(OK); case B3SOIPD_MOD_PW0: value->rValue = model->B3SOIPDpw0; return(OK); case B3SOIPD_MOD_PNLX: value->rValue = model->B3SOIPDpnlx; return(OK); case B3SOIPD_MOD_PDVT0 : value->rValue = model->B3SOIPDpdvt0; return(OK); case B3SOIPD_MOD_PDVT1 : value->rValue = model->B3SOIPDpdvt1; return(OK); case B3SOIPD_MOD_PDVT2 : value->rValue = model->B3SOIPDpdvt2; return(OK); case B3SOIPD_MOD_PDVT0W : value->rValue = model->B3SOIPDpdvt0w; return(OK); case B3SOIPD_MOD_PDVT1W : value->rValue = model->B3SOIPDpdvt1w; return(OK); case B3SOIPD_MOD_PDVT2W : value->rValue = model->B3SOIPDpdvt2w; return(OK); case B3SOIPD_MOD_PU0: value->rValue = model->B3SOIPDpu0; return(OK); case B3SOIPD_MOD_PUA: value->rValue = model->B3SOIPDpua; return(OK); case B3SOIPD_MOD_PUB: value->rValue = model->B3SOIPDpub; return(OK); case B3SOIPD_MOD_PUC: value->rValue = model->B3SOIPDpuc; return(OK); case B3SOIPD_MOD_PVSAT: value->rValue = model->B3SOIPDpvsat; return(OK); case B3SOIPD_MOD_PA0: value->rValue = model->B3SOIPDpa0; return(OK); case B3SOIPD_MOD_PAGS: value->rValue = model->B3SOIPDpags; return(OK); case B3SOIPD_MOD_PB0: value->rValue = model->B3SOIPDpb0; return(OK); case B3SOIPD_MOD_PB1: value->rValue = model->B3SOIPDpb1; return(OK); case B3SOIPD_MOD_PKETA: value->rValue = model->B3SOIPDpketa; return(OK); case B3SOIPD_MOD_PKETAS: value->rValue = model->B3SOIPDpketas; return(OK); case B3SOIPD_MOD_PA1: value->rValue = model->B3SOIPDpa1; return(OK); case B3SOIPD_MOD_PA2: value->rValue = model->B3SOIPDpa2; return(OK); case B3SOIPD_MOD_PRDSW: value->rValue = model->B3SOIPDprdsw; return(OK); case B3SOIPD_MOD_PPRWB: value->rValue = model->B3SOIPDpprwb; return(OK); case B3SOIPD_MOD_PPRWG: value->rValue = model->B3SOIPDpprwg; return(OK); case B3SOIPD_MOD_PWR: value->rValue = model->B3SOIPDpwr; return(OK); case B3SOIPD_MOD_PNFACTOR : value->rValue = model->B3SOIPDpnfactor; return(OK); case B3SOIPD_MOD_PDWG: value->rValue = model->B3SOIPDpdwg; return(OK); case B3SOIPD_MOD_PDWB: value->rValue = model->B3SOIPDpdwb; return(OK); case B3SOIPD_MOD_PVOFF: value->rValue = model->B3SOIPDpvoff; return(OK); case B3SOIPD_MOD_PETA0: value->rValue = model->B3SOIPDpeta0; return(OK); case B3SOIPD_MOD_PETAB: value->rValue = model->B3SOIPDpetab; return(OK); case B3SOIPD_MOD_PDSUB : value->rValue = model->B3SOIPDpdsub; return(OK); case B3SOIPD_MOD_PCIT : value->rValue = model->B3SOIPDpcit; return(OK); case B3SOIPD_MOD_PCDSC : value->rValue = model->B3SOIPDpcdsc; return(OK); case B3SOIPD_MOD_PCDSCB : value->rValue = model->B3SOIPDpcdscb; return(OK); case B3SOIPD_MOD_PCDSCD : value->rValue = model->B3SOIPDpcdscd; return(OK); case B3SOIPD_MOD_PPCLM: value->rValue = model->B3SOIPDppclm; return(OK); case B3SOIPD_MOD_PPDIBL1: value->rValue = model->B3SOIPDppdibl1; return(OK); case B3SOIPD_MOD_PPDIBL2: value->rValue = model->B3SOIPDppdibl2; return(OK); case B3SOIPD_MOD_PPDIBLB: value->rValue = model->B3SOIPDppdiblb; return(OK); case B3SOIPD_MOD_PDROUT : value->rValue = model->B3SOIPDpdrout; return(OK); case B3SOIPD_MOD_PPVAG: value->rValue = model->B3SOIPDppvag; return(OK); case B3SOIPD_MOD_PDELTA: value->rValue = model->B3SOIPDpdelta; return(OK); case B3SOIPD_MOD_PALPHA0: value->rValue = model->B3SOIPDpalpha0; return(OK); case B3SOIPD_MOD_PFBJTII: value->rValue = model->B3SOIPDpfbjtii; return(OK); case B3SOIPD_MOD_PBETA0: value->rValue = model->B3SOIPDpbeta0; return(OK); case B3SOIPD_MOD_PBETA1: value->rValue = model->B3SOIPDpbeta1; return(OK); case B3SOIPD_MOD_PBETA2: value->rValue = model->B3SOIPDpbeta2; return(OK); case B3SOIPD_MOD_PVDSATII0: value->rValue = model->B3SOIPDpvdsatii0; return(OK); case B3SOIPD_MOD_PLII: value->rValue = model->B3SOIPDplii; return(OK); case B3SOIPD_MOD_PESATII: value->rValue = model->B3SOIPDpesatii; return(OK); case B3SOIPD_MOD_PSII0: value->rValue = model->B3SOIPDpsii0; return(OK); case B3SOIPD_MOD_PSII1: value->rValue = model->B3SOIPDpsii1; return(OK); case B3SOIPD_MOD_PSII2: value->rValue = model->B3SOIPDpsii2; return(OK); case B3SOIPD_MOD_PSIID: value->rValue = model->B3SOIPDpsiid; return(OK); case B3SOIPD_MOD_PAGIDL: value->rValue = model->B3SOIPDpagidl; return(OK); case B3SOIPD_MOD_PBGIDL: value->rValue = model->B3SOIPDpbgidl; return(OK); case B3SOIPD_MOD_PNGIDL: value->rValue = model->B3SOIPDpngidl; return(OK); case B3SOIPD_MOD_PNTUN: value->rValue = model->B3SOIPDpntun; return(OK); case B3SOIPD_MOD_PNDIODE: value->rValue = model->B3SOIPDpndiode; return(OK); case B3SOIPD_MOD_PNRECF0: value->rValue = model->B3SOIPDpnrecf0; return(OK); case B3SOIPD_MOD_PNRECR0: value->rValue = model->B3SOIPDpnrecr0; return(OK); case B3SOIPD_MOD_PISBJT: value->rValue = model->B3SOIPDpisbjt; return(OK); case B3SOIPD_MOD_PISDIF: value->rValue = model->B3SOIPDpisdif; return(OK); case B3SOIPD_MOD_PISREC: value->rValue = model->B3SOIPDpisrec; return(OK); case B3SOIPD_MOD_PISTUN: value->rValue = model->B3SOIPDpistun; return(OK); case B3SOIPD_MOD_PVREC0: value->rValue = model->B3SOIPDpvrec0; return(OK); case B3SOIPD_MOD_PVTUN0: value->rValue = model->B3SOIPDpvtun0; return(OK); case B3SOIPD_MOD_PNBJT: value->rValue = model->B3SOIPDpnbjt; return(OK); case B3SOIPD_MOD_PLBJT0: value->rValue = model->B3SOIPDplbjt0; return(OK); case B3SOIPD_MOD_PVABJT: value->rValue = model->B3SOIPDpvabjt; return(OK); case B3SOIPD_MOD_PAELY: value->rValue = model->B3SOIPDpaely; return(OK); case B3SOIPD_MOD_PAHLI: value->rValue = model->B3SOIPDpahli; return(OK); /* CV Model */ case B3SOIPD_MOD_PVSDFB: value->rValue = model->B3SOIPDpvsdfb; return(OK); case B3SOIPD_MOD_PVSDTH: value->rValue = model->B3SOIPDpvsdth; return(OK); case B3SOIPD_MOD_PDELVT: value->rValue = model->B3SOIPDpdelvt; return(OK); case B3SOIPD_MOD_PACDE: value->rValue = model->B3SOIPDpacde; return(OK); case B3SOIPD_MOD_PMOIN: value->rValue = model->B3SOIPDpmoin; return(OK); /* Added for binning - END */ default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdld.c0000644000265600020320000050704012264261473022504 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdld.c 98/5/01 Modified by Pin Su, Weidong Liu and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Pin Su, Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 00/8/15 Modified by Pin Su 01/2/15 Modified by Pin Su and Hui Wan 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define KboQ 8.617087e-5 /* Kb / q */ #define Eg300 1.115 /* energy gap at 300K */ #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 /* Original is 0.02, for matching IBM model, change to 0.08 */ #define DELTA_3_SOI 0.08 #define DELTA_4 0.02 #define DELT_Vbseff 0.005 #define DELTA_VFB 0.02 #define CONST_2OV3 0.6666666666 #define MAX_EXPL 2.688117142e+43 #define MIN_EXPL 3.720075976e-44 #define EXPL_THRESHOLD 100.0 #define DEXP(A,B,C) { \ if (A > EXPL_THRESHOLD) { \ B = MAX_EXPL*(1.0+(A)-EXPL_THRESHOLD); \ C = MAX_EXPL; \ } else if (A < -EXPL_THRESHOLD) { \ B = MIN_EXPL; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } #define FLOG(A) fabs(A) + 1e-14 /* B3SOIPDlimit(vnew,vold) * limits the per-iteration change of any absolute voltage value */ static double B3SOIPDlimit(double vnew, double vold, double limit, int *check) { double T0, T1; if (isnan (vnew) || isnan (vold)) { fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n"); fprintf(stderr, "New prediction returns to 0.0!\n"); vnew = 0.0; *check = 1; } T0 = vnew - vold; T1 = fabs(T0); if (T1 > limit) { if (T0 > 0.0) vnew = vold + limit; else vnew = vold - limit; *check = 1; } return vnew; } int B3SOIPDload(GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; int selfheat; double Gmin; double ag0, qgd, qgs, von, cbhat, VgstNVt, ExpVgst = 0.0; double cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double arg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVd, dVfbeff_dVb, V3, V4; double PhiBSWG, MJSWG; double gcgdb, gcggb, gcgsb, gcgeb, gcgT; double gcsdb, gcsgb, gcssb, gcseb, gcsT; double gcddb, gcdgb, gcdsb, gcdeb, gcdT; double gcbdb, gcbgb, gcbsb, gcbeb, gcbT; double gcedb, gcegb, gcesb, gceeb, gceT; double gcTt, gTtg, gTtb, gTtdp, gTtt, gTtsp; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vg, vd, vs, vp, ve, vb; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd, dVfb_dT; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd, dVth_dT; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg; double n, dn_dVb, Vtm; double ExpArg, V0; double ueff, dueff_dVg, dueff_dVd, dueff_dVb, dueff_dT; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb, dEsatL_dT; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, dVdsat_dT, Vasat; double dVasat_dVg, dVasat_dVb, dVasat_dVd, dVasat_dT; double Va, dVa_dVd, dVa_dVg, dVa_dVb, dVa_dT; double Vbseff, dVbseff_dVb; double CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb, dT0_dT; double T1, dT1_dVg, dT1_dVd, dT1_dVb, dT1_dT; double T2, dT2_dVg, dT2_dVd, dT2_dVb, dT2_dT; double T3, dT3_dVg, dT3_dVd, dT3_dVb, dT3_dT = 0.0; double T4, dT4_dVd, dT4_dVb, dT4_dT; double T5, dT5_dVg, dT5_dVd, dT5_dVb, dT5_dT = 0.0; double T6, dT6_dT = 0.0; double T7, Vdsatii; double T8; double T9; double T10, dT10_dVb; double T11, T12; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb, dVACLM_dT; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb, dVADIBL_dT; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb; double Delt_vth, dDelt_vth_dVb, dDelt_vth_dT; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double a1; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb, dVgsteff_dT; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb, dVdseff_dT; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds; double dAbulk_dVg, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb, dbeta_dT; double gche, dgche_dVg, dgche_dVd, dgche_dVb, dgche_dT; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb, dfgche1_dT; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb, dfgche2_dT; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb, dIdl_dT; double Ids, Gm, Gds, Gmb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, dRds_dT, WVCox, WVCoxRds; double Vgst2Vtm, dVgst2Vtm_dT, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double dxpart, sxpart; struct b3soipdSizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded = 0, error; double gbbsp, gbbdp, gbbg, gbbb, gbbp, gbbT; double gddpsp, gddpdp, gddpg, gddpb, gddpT; double gsspsp, gsspdp, gsspg, gsspb, gsspT; double Gbpbs, Gbpps; double ves, ved, veb, vge = 0.0, delves, vedo, delved; double vps, vpd, Vps, delvps; double Vbd, Ves, Vesfb, DeltVthtemp, dDeltVthtemp_dT; double Vbp, dVbp_dVb; double DeltVthw, dDeltVthw_dVb, dDeltVthw_dT; double Gm0, Gds0, Gmb0, GmT0, Gmc, GmT; double dDIBL_Sft_dVb; double Idgidl, Gdgidld, Gdgidlg, Isgidl, Gsgidlg; double Gjsd, Gjsb, GjsT, Gjdd, Gjdb, GjdT; double Ibp, Iii, Giid, Giig, Giib, GiiT, Gcd, Gcb, GcT, ceqbody, ceqbodcon; double gppb, gppp, gppT; double delTemp, deldelTemp, Temp; double ceqth, ceqqth; double K1; double qjs = 0.0, gcjsbs, gcjsT; double qjd = 0.0, gcjdbs, gcjdds, gcjdT; double qge; double ceqqe; double ni, Eg, Cbox, CboxWL; double cjsbs; double dVfbeff_dVrg; double qinv, qgate = 0.0, qbody = 0.0, qdrn = 0.0, qsrc, qsub = 0.0; double cqgate, cqbody, cqdrn, cqsub, cqtemp; double Cgg, Cgd, Cgb; double Csg, Csd, Csb, Cbg = 0.0, Cbd = 0.0, Cbb = 0.0; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Csg1, Csd1, Csb1; double Ibs1 ,dIbs1_dVb ,dIbs1_dT; double Ibs2 ,dIbs2_dVb ,dIbs2_dT; double Ibs3 ,dIbs3_dVb ,dIbs3_dVd, dIbs3_dT; double Ibs4 ,dIbs4_dVb ,dIbs4_dT; double Ibd1 ,dIbd1_dVb ,dIbd1_dVd ,dIbd1_dT; double Ibd2 ,dIbd2_dVb ,dIbd2_dVd ,dIbd2_dT; double Ibd3 ,dIbd3_dVb ,dIbd3_dVd ,dIbd3_dT; double Ibd4 ,dIbd4_dVb ,dIbd4_dVd ,dIbd4_dT; double WTsi, NVtm1, NVtm2; double Ic ,dIc_dVb ,dIc_dVd; double Ibs; double Ibd; double Denomi ,dDenomi_dVg ,dDenomi_dVd ,dDenomi_dVb ,dDenomi_dT; double Qsub0 = 0.0, dQsub0_dVg, dQsub0_dVb, dQsub0_dVd; double Qac0 = 0.0, dQac0_dVb, dQac0_dVd; double Qe1 , dQe1_dVb, dQe1_dVe, dQe1_dT; double Ce1b ,Ce1e, Ce1T; double dQac0_dVrg, dQsub0_dVrg; /* for self-heating */ double vbi, vfbb, phi, sqrtPhi, Xdep0, jbjt, jdif, jrec, jtun, u0temp, vsattemp; double rds0, ua, ub, uc; double dvbi_dT, dvfbb_dT, djbjt_dT, djdif_dT, djrec_dT, djtun_dT, du0temp_dT; double dvsattemp_dT, drds0_dT, dua_dT, dub_dT, duc_dT, dni_dT, dVtm_dT; double dVfbeff_dT, dQac0_dT, dQsub0_dT; double CbT, CsT, CgT; /* v2.0 release */ double Vbsh, dVbsh_dVb; double sqrtPhisExt, dsqrtPhisExt_dVb; double T13, T14; double dT11_dVb, dT13_dVb, dT14_dVb; double dVgst_dVd; double Vdsatii0, dVdsatii0_dT; double VgsStep, dVgsStep_dT, Ratio, dRatio_dVg, dRatio_dVb, dRatio_dVd, dRatio_dT, dTempRatio_dT; double Vdiff, dVdiff_dVg, dVdiff_dVb, dVdiff_dVd, dVdiff_dT; double dNVtm1_dT; double NVtmf, NVtmr, dNVtmf_dT, dNVtmr_dT; double TempRatioMinus1; double Ahli, dAhli_dT; double WsTsi, WdTsi; double dPhiBSWG_dT, dcjsbs_dT, darg_dT = 0.0, ddT3_dVb_dT = 0.0; double dT7_dT, dT0_dT7, dT1_dT7, dT2_dT7; double CoxWLb, CoxWLcenb; double ExpVbsNVtm, dExpVbsNVtm_dVb, dExpVbsNVtm_dT; double ExpVbdNVtm, dExpVbdNVtm_dVb, dExpVbdNVtm_dVd, dExpVbdNVtm_dT; double Ien, dIen_dT, Iendif, dIendif_dT; double Ibsdif, dIbsdif_dVb, dIbsdif_dT; double Ibddif, dIbddif_dVb, dIbddif_dVd, dIbddif_dT; double Ehlis, dEhlis_dVb, dEhlis_dT; double EhlisFactor, dEhlisFactor_dVb, dEhlisFactor_dT; double Ehlid, dEhlid_dVb, dEhlid_dVd, dEhlid_dT; double EhlidFactor, dEhlidFactor_dVb, dEhlidFactor_dVd, dEhlidFactor_dT; double E2ndFactor, dE2ndFactor_dVb, dE2ndFactor_dVd, dE2ndFactor_dT; double dT10_dT, dT11_dT, DioMax; double cjdbs, dcjdbs_dT; double wdios, wdiod, wdiosCV, wdiodCV; /* for capMod3 */ double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVb, LINK, Ccen, Coxeff, dCoxeff_dVg, dCoxeff_dVb; double CoxWLcen, QovCox, dQac0_dVg, DeltaPhi, dDeltaPhi_dVg, dDeltaPhi_dVd, dDeltaPhi_dVb; double dTcen_dVd, dTcen_dT, dCoxeff_dVd, dCoxeff_dT, dCoxWLcenb_dT, qinoi, qbulk; double T3zb, lt1zb, ltwzb, Theta0zb; double Delt_vthzb, dDelt_vthzb_dT; double DeltVthwzb, dDeltVthwzb_dT; double DeltVthtempzb, dDeltVthtempzb_dT; double Vthzb = 0.0, dVthzb_dT = 0.0, Vfbzb, dVfbzb_dT; /* v2.2 release */ double Vgb, dVgb_dVg, dVgb_dVb, Vox, dVox_dVg, dVox_dVd, dVox_dVb; double OxideRatio, Vaux, dVaux_dVg, dVaux_dVd, dVaux_dVb; double Igb, dIgb_dVg, dIgb_dVd, dIgb_dVb; double ceqgate; double dT0_dVox, Voxeff, dVoxeff_dVox; double dVox_dT = 0.0, dVaux_dT = 0.0, dIgb_dT; double Voxacc, dVoxacc_dVg, dVoxacc_dVd, dVoxacc_dVb; double Voxdepinv, dVoxdepinv_dVg, dVoxdepinv_dVb, dVoxdepinv_dVd; double dVoxdepinv_dT = 0.0; double Igb1, dIgb1_dVg, dIgb1_dVd, dIgb1_dVb, dIgb1_dT; double Igb2, dIgb2_dVg, dIgb2_dVd, dIgb2_dVb, dIgb2_dT; double gigs, gigd, gigb, gigg; double gigT; double m; for (; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here != NULL; here = here->B3SOIPDnextInstance) { Check = 0; ByPass = 0; selfheat = (model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0 != 0.0); pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vs = *(ckt->CKTrhsOld + here->B3SOIPDsNodePrime); if (!here->B3SOIPDvbsusrGiven) { vbs = *(ckt->CKTstate0 + here->B3SOIPDvbs); vb = *(ckt->CKTrhsOld + here->B3SOIPDbNode); } else { vbs = here->B3SOIPDvbsusr; vb = here->B3SOIPDvbsusr + vs; } vgs = *(ckt->CKTstate0 + here->B3SOIPDvgs); ves = *(ckt->CKTstate0 + here->B3SOIPDves); vps = *(ckt->CKTstate0 + here->B3SOIPDvps); vds = *(ckt->CKTstate0 + here->B3SOIPDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIPDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIPDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIPDdNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIPDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIPDeNode); } else if ((ckt->CKTmode & MODEINITTRAN)) { vs = *(ckt->CKTrhsOld + here->B3SOIPDsNodePrime); if (!here->B3SOIPDvbsusrGiven) { vbs = *(ckt->CKTstate1 + here->B3SOIPDvbs); vb = *(ckt->CKTrhsOld + here->B3SOIPDbNode); } else { vbs = here->B3SOIPDvbsusr; vb = here->B3SOIPDvbsusr + vs; } vgs = *(ckt->CKTstate1 + here->B3SOIPDvgs); ves = *(ckt->CKTstate1 + here->B3SOIPDves); vps = *(ckt->CKTstate1 + here->B3SOIPDvps); vds = *(ckt->CKTstate1 + here->B3SOIPDvds); delTemp = *(ckt->CKTstate1 + here->B3SOIPDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIPDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIPDdNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIPDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIPDeNode); } else if ((ckt->CKTmode & MODEINITJCT) && !here->B3SOIPDoff) { vds = model->B3SOIPDtype * here->B3SOIPDicVDS; vgs = model->B3SOIPDtype * here->B3SOIPDicVGS; ves = model->B3SOIPDtype * here->B3SOIPDicVES; vbs = model->B3SOIPDtype * here->B3SOIPDicVBS; vps = model->B3SOIPDtype * here->B3SOIPDicVPS; vg = vd = vs = vp = ve = 0.0; delTemp = 0.0; here->B3SOIPDphi = pParam->B3SOIPDphi; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = model->B3SOIPDtype*0.1 + pParam->B3SOIPDvth0; vds = 0.0; ves = 0.0; vps = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->B3SOIPDoff)) { delTemp = vps = vbs = vgs = vds = ves = 0.0; vg = vd = vs = vp = ve = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B3SOIPDvbs) = *(ckt->CKTstate1 + here->B3SOIPDvbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDvbs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDvbs))); *(ckt->CKTstate0 + here->B3SOIPDvgs) = *(ckt->CKTstate1 + here->B3SOIPDvgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDvgs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDvgs))); *(ckt->CKTstate0 + here->B3SOIPDves) = *(ckt->CKTstate1 + here->B3SOIPDves); ves = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDves)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDves))); *(ckt->CKTstate0 + here->B3SOIPDvps) = *(ckt->CKTstate1 + here->B3SOIPDvps); vps = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDvps)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDvps))); *(ckt->CKTstate0 + here->B3SOIPDvds) = *(ckt->CKTstate1 + here->B3SOIPDvds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDvds)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDvds))); *(ckt->CKTstate0 + here->B3SOIPDvbd) = *(ckt->CKTstate0 + here->B3SOIPDvbs) - *(ckt->CKTstate0 + here->B3SOIPDvds); *(ckt->CKTstate0 + here->B3SOIPDvg) = *(ckt->CKTstate1 + here->B3SOIPDvg); *(ckt->CKTstate0 + here->B3SOIPDvd) = *(ckt->CKTstate1 + here->B3SOIPDvd); *(ckt->CKTstate0 + here->B3SOIPDvs) = *(ckt->CKTstate1 + here->B3SOIPDvs); *(ckt->CKTstate0 + here->B3SOIPDvp) = *(ckt->CKTstate1 + here->B3SOIPDvp); *(ckt->CKTstate0 + here->B3SOIPDve) = *(ckt->CKTstate1 + here->B3SOIPDve); /* Only predict ve */ ve = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDve)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIPDve))); /* Then update vg, vs, vb, vd, vp base on ve */ vs = ve - model->B3SOIPDtype * ves; vg = model->B3SOIPDtype * vgs + vs; vd = model->B3SOIPDtype * vds + vs; vb = model->B3SOIPDtype * vbs + vs; vp = model->B3SOIPDtype * vps + vs; delTemp = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIPDdeltemp))-(xfact * (*(ckt->CKTstate2 + here->B3SOIPDdeltemp))); /* v2.2.3 bug fix */ *(ckt->CKTstate0 + here->B3SOIPDdeltemp) = *(ckt->CKTstate1 + here->B3SOIPDdeltemp); if (selfheat) { here->B3SOIPDphi = 2.0 * here->B3SOIPDvtm * log(pParam->B3SOIPDnpeak / here->B3SOIPDni); } } else { #endif /* PREDICTOR */ vg = B3SOIPDlimit(*(ckt->CKTrhsOld + here->B3SOIPDgNode), *(ckt->CKTstate0 + here->B3SOIPDvg), 3.0, &Check); vd = B3SOIPDlimit(*(ckt->CKTrhsOld + here->B3SOIPDdNodePrime), *(ckt->CKTstate0 + here->B3SOIPDvd), 3.0, &Check); vs = B3SOIPDlimit(*(ckt->CKTrhsOld + here->B3SOIPDsNodePrime), *(ckt->CKTstate0 + here->B3SOIPDvs), 3.0, &Check); vp = B3SOIPDlimit(*(ckt->CKTrhsOld + here->B3SOIPDpNode), *(ckt->CKTstate0 + here->B3SOIPDvp), 3.0, &Check); ve = B3SOIPDlimit(*(ckt->CKTrhsOld + here->B3SOIPDeNode), *(ckt->CKTstate0 + here->B3SOIPDve), 3.0, &Check); delTemp = *(ckt->CKTrhsOld + here->B3SOIPDtempNode); vbs = model->B3SOIPDtype * (*(ckt->CKTrhsOld+here->B3SOIPDbNode) - *(ckt->CKTrhsOld+here->B3SOIPDsNodePrime)); vps = model->B3SOIPDtype * (vp - vs); vgs = model->B3SOIPDtype * (vg - vs); ves = model->B3SOIPDtype * (ve - vs); vds = model->B3SOIPDtype * (vd - vs); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; ved = ves - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIPDvgs) - *(ckt->CKTstate0 + here->B3SOIPDvds); vedo = *(ckt->CKTstate0 + here->B3SOIPDves) - *(ckt->CKTstate0 + here->B3SOIPDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIPDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIPDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIPDvgs); delves = ves - *(ckt->CKTstate0 + here->B3SOIPDves); delvps = vps - *(ckt->CKTstate0 + here->B3SOIPDvps); deldelTemp = delTemp - *(ckt->CKTstate0 + here->B3SOIPDdeltemp); delvds = vds - *(ckt->CKTstate0 + here->B3SOIPDvds); delvgd = vgd - vgdo; delved = ved - vedo; if (here->B3SOIPDmode >= 0) { cdhat = here->B3SOIPDcd + (here->B3SOIPDgm-here->B3SOIPDgjdg) * delvgs + (here->B3SOIPDgds - here->B3SOIPDgjdd) * delvds + (here->B3SOIPDgmbs - here->B3SOIPDgjdb) * delvbs + (here->B3SOIPDgmT - here->B3SOIPDgjdT) * deldelTemp; } else { cdhat = here->B3SOIPDcd + (here->B3SOIPDgm-here->B3SOIPDgjdg) * delvgd - (here->B3SOIPDgds - here->B3SOIPDgjdd) * delvds + (here->B3SOIPDgmbs - here->B3SOIPDgjdb) * delvbd + (here->B3SOIPDgmT - here->B3SOIPDgjdT) * deldelTemp; } cbhat = here->B3SOIPDcb + here->B3SOIPDgbgs * delvgs + here->B3SOIPDgbbs * delvbs + here->B3SOIPDgbds * delvds + here->B3SOIPDgbps * delvps + here->B3SOIPDgbT * deldelTemp; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) && Check == 0) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B3SOIPDvbs))) + ckt->CKTvoltTol)) ) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B3SOIPDvbd))) + ckt->CKTvoltTol)) ) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B3SOIPDvgs))) + ckt->CKTvoltTol))) if ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B3SOIPDves))) + ckt->CKTvoltTol))) if ( (here->B3SOIPDbodyMod == 0) || (here->B3SOIPDbodyMod == 2) || (fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B3SOIPDvps))) + ckt->CKTvoltTol)) ) if ( (here->B3SOIPDtempNode == 0) || (fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B3SOIPDdeltemp))) + ckt->CKTvoltTol*1e4))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B3SOIPDvds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->B3SOIPDcd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->B3SOIPDcd)) + ckt->CKTabstol)) if ((fabs(cbhat - here->B3SOIPDcb) < ckt->CKTreltol * MAX(fabs(cbhat),fabs(here->B3SOIPDcb)) + ckt->CKTabstol) ) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B3SOIPDvbs); vbd = *(ckt->CKTstate0 + here->B3SOIPDvbd); vgs = *(ckt->CKTstate0 + here->B3SOIPDvgs); ves = *(ckt->CKTstate0 + here->B3SOIPDves); vps = *(ckt->CKTstate0 + here->B3SOIPDvps); vds = *(ckt->CKTstate0 + here->B3SOIPDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIPDdeltemp); /* calculate Vds for temperature conductance calculation in bypass (used later when filling Temp node matrix) */ Vds = here->B3SOIPDmode > 0 ? vds : -vds; vgd = vgs - vds; vgb = vgs - vbs; veb = ves - vbs; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = here->B3SOIPDvon; if (*(ckt->CKTstate0 + here->B3SOIPDvds) >= 0.0) T0 = *(ckt->CKTstate0 + here->B3SOIPDvbs); else T0 = *(ckt->CKTstate0 + here->B3SOIPDvbd); if (vds >= 0.0) { vbs = B3SOIPDlimit(vbs, T0, 0.2, &Check); vbd = vbs - vds; vb = model->B3SOIPDtype * vbs + vs; } else { vbd = B3SOIPDlimit(vbd, T0, 0.2, &Check); vbs = vbd + vds; vb = model->B3SOIPDtype * vbs + vd; } delTemp =B3SOIPDlimit(delTemp, *(ckt->CKTstate0 + here->B3SOIPDdeltemp),5.0,&Check); } /* Calculate temperature dependent values for self-heating effect */ Temp = delTemp + ckt->CKTtemp; dTempRatio_dT = 1 / model->B3SOIPDtnom; TempRatio = Temp * dTempRatio_dT; if (selfheat) { Vtm = KboQ * Temp; T0 = 1108.0 + Temp; T5 = Temp * Temp; Eg = 1.16 - 7.02e-4 * T5 / T0; T1 = ((7.02e-4 * T5) - T0 * (14.04e-4 * Temp)) / T0 / T0; /* T1 = dEg / dT */ T2 = 1.9230584e-4; /* T2 = 1 / 300.15^(3/2) */ T5 = sqrt(Temp); T3 = 1.45e10 * Temp * T5 * T2; T4 = exp(21.5565981 - Eg / (2.0 * Vtm)); ni = T3 * T4; dni_dT = 2.175e10 * T2 * T5 * T4 + T3 * T4 * (-Vtm * T1 + Eg * KboQ) / (2.0 * Vtm * Vtm); T0 = log(1.0e20 * pParam->B3SOIPDnpeak / (ni * ni)); vbi = Vtm * T0; dvbi_dT = KboQ * T0 + Vtm * (-2.0 * dni_dT / ni); if (pParam->B3SOIPDnsub > 0) { T0 = log(pParam->B3SOIPDnpeak / pParam->B3SOIPDnsub); vfbb = -model->B3SOIPDtype * Vtm * T0; dvfbb_dT = -model->B3SOIPDtype * KboQ * T0; } else { T0 = log(-pParam->B3SOIPDnpeak * pParam->B3SOIPDnsub / ni / ni); vfbb = -model->B3SOIPDtype * Vtm * T0; dvfbb_dT = -model->B3SOIPDtype * (KboQ * T0 - Vtm * 2.0 * dni_dT / ni); } /* phi = 2.0 * Vtm * log(pParam->B3SOIPDnpeak / ni); */ phi = here->B3SOIPDphi; sqrtPhi = sqrt(phi); Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIPDnpeak * 1.0e6)) * sqrtPhi; /* Save the values below for phi calculation in B3SOIPDaccept() */ here->B3SOIPDvtm = Vtm; here->B3SOIPDni = ni; T3 = TempRatio - 1.0; T8 = 1/ model->B3SOIPDtnom; T4 = Eg300 / Vtm * T3; dT4_dT = Eg300 / Vtm / Vtm * (Vtm * T8 - T3 * KboQ); T7 = model->B3SOIPDxbjt * T4 / pParam->B3SOIPDndiode; dT7_dT = model->B3SOIPDxbjt * dT4_dT / pParam->B3SOIPDndiode; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; if (model->B3SOIPDxbjt == model->B3SOIPDxdif) { T1 = T0; dT1_dT = dT0_dT; } else { T7 = model->B3SOIPDxdif * T4 / pParam->B3SOIPDndiode; dT7_dT = model->B3SOIPDxdif * dT4_dT / pParam->B3SOIPDndiode; DEXP(T7, T1, dT1_dT7); dT1_dT = dT1_dT7 * dT7_dT; } T7 = model->B3SOIPDxrec * T4 / pParam->B3SOIPDnrecf0; dT7_dT = model->B3SOIPDxrec * dT4_dT / pParam->B3SOIPDnrecf0; DEXP(T7, T2, dT2_dT7); dT2_dT = dT2_dT7 * dT7_dT; /* high level injection */ Ahli = pParam->B3SOIPDahli * T0; dAhli_dT = pParam->B3SOIPDahli * dT0_dT; jbjt = pParam->B3SOIPDisbjt * T0; jdif = pParam->B3SOIPDisdif * T1; jrec = pParam->B3SOIPDisrec * T2; djbjt_dT = pParam->B3SOIPDisbjt * dT0_dT; djdif_dT = pParam->B3SOIPDisdif * dT1_dT; djrec_dT = pParam->B3SOIPDisrec * dT2_dT; T7 = model->B3SOIPDxtun * T3; dT7_dT = model->B3SOIPDxtun * T8; DEXP(T7, T0, dT0_dT7); dT0_dT = dT0_dT7 * dT7_dT; jtun = pParam->B3SOIPDistun * T0; djtun_dT = pParam->B3SOIPDistun * dT0_dT; u0temp = pParam->B3SOIPDu0 * pow(TempRatio, pParam->B3SOIPDute); du0temp_dT = pParam->B3SOIPDu0 * pParam->B3SOIPDute * pow(TempRatio, pParam->B3SOIPDute - 1.0) * T8; vsattemp = pParam->B3SOIPDvsat - pParam->B3SOIPDat * T3; dvsattemp_dT = -pParam->B3SOIPDat * T8; rds0 = (pParam->B3SOIPDrdsw + pParam->B3SOIPDprt * T3) / pParam->B3SOIPDrds0denom; drds0_dT = pParam->B3SOIPDprt / pParam->B3SOIPDrds0denom * T8; ua = pParam->B3SOIPDuatemp + pParam->B3SOIPDua1 * T3; ub = pParam->B3SOIPDubtemp + pParam->B3SOIPDub1 * T3; uc = pParam->B3SOIPDuctemp + pParam->B3SOIPDuc1 * T3; dua_dT = pParam->B3SOIPDua1 * T8; dub_dT = pParam->B3SOIPDub1 * T8; duc_dT = pParam->B3SOIPDuc1 * T8; } else { vbi = pParam->B3SOIPDvbi; vfbb = pParam->B3SOIPDvfbb; phi = pParam->B3SOIPDphi; sqrtPhi = pParam->B3SOIPDsqrtPhi; Xdep0 = pParam->B3SOIPDXdep0; jbjt = pParam->B3SOIPDjbjt; jdif = pParam->B3SOIPDjdif; jrec = pParam->B3SOIPDjrec; jtun = pParam->B3SOIPDjtun; /* v2.2.2 bug fix */ Ahli = pParam->B3SOIPDahli0; u0temp = pParam->B3SOIPDu0temp; vsattemp = pParam->B3SOIPDvsattemp; rds0 = pParam->B3SOIPDrds0; ua = pParam->B3SOIPDua; ub = pParam->B3SOIPDub; uc = pParam->B3SOIPDuc; dni_dT = dvbi_dT = dvfbb_dT = djbjt_dT = djdif_dT = 0.0; djrec_dT = djtun_dT = du0temp_dT = dvsattemp_dT = 0.0; drds0_dT = dua_dT = dub_dT = duc_dT = 0.0; dAhli_dT = 0; } /* TempRatio used for Vth and mobility */ if (selfheat) { TempRatioMinus1 = Temp / model->B3SOIPDtnom - 1.0; } else { TempRatioMinus1 = ckt->CKTtemp / model->B3SOIPDtnom - 1.0; } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; ved = ves - vds; veb = ves - vbs; vge = vgs - ves; vpd = vps - vds; if (vds >= 0.0) { /* normal mode */ here->B3SOIPDmode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vbd = vbd; Ves = ves; Vps = vps; wdios = pParam->B3SOIPDwdios; wdiod = pParam->B3SOIPDwdiod; wdiosCV = pParam->B3SOIPDwdiosCV; wdiodCV = pParam->B3SOIPDwdiodCV; } else { /* inverse mode */ here->B3SOIPDmode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vbd = vbs; Ves = ved; Vps = vpd; wdios = pParam->B3SOIPDwdiod; wdiod = pParam->B3SOIPDwdios; wdiosCV = pParam->B3SOIPDwdiodCV; wdiodCV = pParam->B3SOIPDwdiosCV; } Vesfb = Ves - vfbb; Cbox = model->B3SOIPDcbox; K1 = pParam->B3SOIPDk1eff; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; if (here->B3SOIPDdebugMod <0) ChargeComputationNeeded = 1; /* Poly Gate Si Depletion Effect */ T0 = pParam->B3SOIPDvfb + phi; if ((pParam->B3SOIPDngate > 1.e18) && (pParam->B3SOIPDngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->B3SOIPDngate / (model->B3SOIPDcox * model->B3SOIPDcox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Leff = pParam->B3SOIPDleff; if (selfheat) { Vtm = KboQ * Temp; dVtm_dT = KboQ; } else { Vtm = model->B3SOIPDvtm; dVtm_dT = 0.0; } V0 = vbi - phi; Vbp = Vbs - Vps; dVbp_dVb = 1; /* T2 is Vbs limited above Vbsc=-5 */ T0 = Vbs + 5 - 0.001; T1 = sqrt(T0 * T0 - 0.004 * (-5)); T2 = (-5) + 0.5 * (T0 + T1); dT2_dVb = 0.5 * (1.0 + T0 / T1); /* Vbsh is T2 limited below 1.5 */ T0 = 1.5; T1 = T0 - T2 - 0.002; T3 = sqrt(T1 * T1 + 0.008 * T0); Vbsh = T0 - 0.5 * (T1 + T3); dVbsh_dVb = 0.5 * (1.0 + T1 / T3) * dT2_dVb; /* Vbseff is Vbsh limited to 0.95*phi */ T0 = 0.95 * phi; T1 = T0 - Vbsh - 0.002; T2 = sqrt(T1 * T1 + 0.008 * T0); Vbseff = T0 - 0.5 * (T1 + T2); dVbseff_dVb = 0.5 * (1.0 + T1 / T2) * dVbsh_dVb; here->B3SOIPDvbseff = Vbs; /* Below all the variables refer to Vbseff */ if (dVbseff_dVb < 1e-20) { dVbseff_dVb = 1e-20; dVbsh_dVb *= 1e20; } else dVbsh_dVb /= dVbseff_dVb; Phis = phi - Vbseff; dPhis_dVb = -1; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; /* Vth Calculation */ T3 = sqrt(Xdep); T0 = pParam->B3SOIPDdvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIPDdvt2 ; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIPDdvt2 * T4 * T4 ; } lt1 = model->B3SOIPDfactor1 * T3 * T1; dlt1_dVb =model->B3SOIPDfactor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->B3SOIPDdvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIPDdvt2w ; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIPDdvt2w * T4 * T4 ; } ltw= model->B3SOIPDfactor1 * T3 * T1; dltw_dVb=model->B3SOIPDfactor1*(0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->B3SOIPDdvt1 * Leff / lt1; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXPL; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->B3SOIPDthetavth = pParam->B3SOIPDdvt0 * Theta0; Delt_vth = here->B3SOIPDthetavth * V0; dDelt_vth_dVb = pParam->B3SOIPDdvt0 * dTheta0_dVb * V0; if (selfheat) dDelt_vth_dT = here->B3SOIPDthetavth * dvbi_dT; else dDelt_vth_dT = 0.0; T0 = -0.5 * pParam->B3SOIPDdvt1w * pParam->B3SOIPDweff * Leff / ltw; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->B3SOIPDdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B3SOIPDdvt0w * dT2_dVb * V0; if (selfheat) dDeltVthw_dT = T0 * dvbi_dT; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B3SOIPDnlx / Leff); T1 = (pParam->B3SOIPDkt1 + pParam->B3SOIPDkt1l / Leff + pParam->B3SOIPDkt2 * Vbseff); DeltVthtemp = pParam->B3SOIPDk1eff * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; if (selfheat) dDeltVthtemp_dT = T1 / model->B3SOIPDtnom; else dDeltVthtemp_dT = 0.0; tmp2 = model->B3SOIPDtox * phi / (pParam->B3SOIPDweff + pParam->B3SOIPDw0); T3 = pParam->B3SOIPDeta0 + pParam->B3SOIPDetab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B3SOIPDetab; dT3_dVb = T4 ; } else { dT3_dVb = pParam->B3SOIPDetab ; } DIBL_Sft = T3 * pParam->B3SOIPDtheta0vb0 * Vds; dDIBL_Sft_dVd = pParam->B3SOIPDtheta0vb0 * T3; dDIBL_Sft_dVb = pParam->B3SOIPDtheta0vb0 * Vds * dT3_dVb; T9 = 2.2361 / sqrtPhi; sqrtPhisExt = sqrtPhis - T9 * (Vbsh - Vbseff); dsqrtPhisExt_dVb = dsqrtPhis_dVb - T9 * (dVbsh_dVb - 1); Vth = model->B3SOIPDtype * pParam->B3SOIPDvth0 + pParam->B3SOIPDk1eff * (sqrtPhisExt - sqrtPhi) - pParam->B3SOIPDk2 * Vbseff- Delt_vth - DeltVthw +(pParam->B3SOIPDk3 + pParam->B3SOIPDk3b * Vbseff) * tmp2 + DeltVthtemp - DIBL_Sft; here->B3SOIPDvon = Vth; T6 = pParam->B3SOIPDk3b * tmp2 - pParam->B3SOIPDk2 + pParam->B3SOIPDkt2 * TempRatioMinus1; dVth_dVb = pParam->B3SOIPDk1eff * dsqrtPhisExt_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb; /* this is actually dVth_dVbseff */ dVth_dVd = -dDIBL_Sft_dVd; if (selfheat) dVth_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT; else dVth_dT = 0.0; /* dVthzb_dT calculation */ if ((model->B3SOIPDcapMod == 3) && (selfheat == 1)) { T3zb = sqrt(Xdep0); ltwzb = lt1zb = model->B3SOIPDfactor1 * T3zb; T0 = -0.5 * pParam->B3SOIPDdvt1 * Leff / lt1zb; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); Theta0zb = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; Theta0zb = T1 * (1.0 + 2.0 * T1); } Delt_vthzb = pParam->B3SOIPDdvt0 * Theta0zb * V0; dDelt_vthzb_dT = pParam->B3SOIPDdvt0 * Theta0zb * dvbi_dT; T0 = -0.5 * pParam->B3SOIPDdvt1w * pParam->B3SOIPDweff * Leff / ltwzb; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->B3SOIPDdvt0w * T2; DeltVthwzb = T0 * V0; dDeltVthwzb_dT = T0 * dvbi_dT; T0 = sqrt(1.0 + pParam->B3SOIPDnlx / Leff); T1 = (pParam->B3SOIPDkt1 + pParam->B3SOIPDkt1l / Leff); DeltVthtempzb = pParam->B3SOIPDk1eff * (T0 - 1.0) * sqrtPhi + T1 * TempRatioMinus1; dDeltVthtempzb_dT = T1 / model->B3SOIPDtnom; Vthzb = model->B3SOIPDtype * pParam->B3SOIPDvth0 - Delt_vthzb - DeltVthwzb + pParam->B3SOIPDk3 * tmp2 + DeltVthtempzb; dVthzb_dT = dDeltVthtempzb_dT - dDelt_vthzb_dT - dDeltVthwzb_dT; } /* Calculate n */ T2 = pParam->B3SOIPDnfactor * EPSSI / Xdep; dT2_dVb = - T2 / Xdep * dXdep_dVb; T3 = pParam->B3SOIPDcdsc + pParam->B3SOIPDcdscb * Vbseff + pParam->B3SOIPDcdscd * Vds; dT3_dVb = pParam->B3SOIPDcdscb; dT3_dVd = pParam->B3SOIPDcdscd; T4 = (T2 + T3 * Theta0 + pParam->B3SOIPDcit) / model->B3SOIPDcox; dT4_dVb = (dT2_dVb + Theta0 * dT3_dVb + dTheta0_dVb * T3) / model->B3SOIPDcox; dT4_dVd = Theta0 * dT3_dVd / model->B3SOIPDcox; if (T4 >= -0.5) { n = 1.0 + T4; dn_dVb = dT4_dVb; dn_dVd = dT4_dVd; } else /* avoid discontinuity problems caused by T4 */ { T0 = 1.0 / (3.0 + 8.0 * T4); n = (1.0 + 3.0 * T4) * T0; T0 *= T0; dn_dVb = T0 * dT4_dVb; dn_dVd = T0 * dT4_dVd; } /* Effective Vgst (Vgsteff) Calculation */ Vgst = Vgs_eff - Vth; dVgst_dVg = dVgs_eff_dVg; dVgst_dVd = -dVth_dVd; dVgst_dVb = -dVth_dVb; T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->B3SOIPDvoff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXPL_THRESHOLD) { Vgsteff = Vgst; /* T0 is dVgsteff_dVbseff */ T0 = -dVth_dVb; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = T0 * dVbseff_dVb; if (selfheat) dVgsteff_dT = -dVth_dT; else dVgsteff_dT = 0.0; } else if (ExpArg > EXPL_THRESHOLD) { T0 = (Vgst - pParam->B3SOIPDvoff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->B3SOIPDcdep0 / model->B3SOIPDcox * ExpVgst; T3 = Vgsteff / (n * Vtm) ; /* T1 is dVgsteff_dVbseff */ T1 = -T3 * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg = T3 * dVgs_eff_dVg; dVgsteff_dVd = -T3 * (dVth_dVd + T0 * Vtm * dn_dVd); dVgsteff_dVb = T1 * dVbseff_dVb; if (selfheat) dVgsteff_dT = -T3 * (dVth_dT + T0 * dVtm_dT * n) + Vgsteff / Temp; else dVgsteff_dT = 0.0; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; T3 = (1.0 / Temp); if (selfheat) dT1_dT = -dT1_dVg * (dVth_dT + Vgst * T3) + T1 * T3; else dT1_dT = 0.0; dT2_dVg = -model->B3SOIPDcox / (Vtm * pParam->B3SOIPDcdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; if (selfheat) dT2_dT = -dT2_dVg * (dVth_dT - ExpArg * T10 * T3); else dT2_dT = 0.0; Vgsteff = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff_dVb = T4 * dVbseff_dVb; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3; if (selfheat) dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3; else dVgsteff_dT = 0.0; } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (selfheat) dVgst2Vtm_dT = 2.0 * dVtm_dT; else dVgst2Vtm_dT = 0.0; here->B3SOIPDVgsteff = Vgsteff; /* v2.2.3 bug fix */ /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - sqrtPhi; Weff = pParam->B3SOIPDweff - (2.0 - here->B3SOIPDnbc) * (pParam->B3SOIPDdwg * Vgsteff + pParam->B3SOIPDdwb * T9); dWeff_dVg = -(2.0 - here->B3SOIPDnbc) * pParam->B3SOIPDdwg; dWeff_dVb = -(2.0 - here->B3SOIPDnbc) * pParam->B3SOIPDdwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->B3SOIPDprwg * Vgsteff + pParam->B3SOIPDprwb * T9; if (T0 >= -0.9) { Rds = rds0 * (1.0 + T0); dRds_dVg = rds0 * pParam->B3SOIPDprwg; dRds_dVb = rds0 * pParam->B3SOIPDprwb * dsqrtPhis_dVb; if (selfheat && (Rds!=0.0)) dRds_dT = (1.0 + T0) * drds0_dT; else dRds_dT = 0.0; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = rds0 * pParam->B3SOIPDprwg * T1; dRds_dVb = rds0 * pParam->B3SOIPDprwb * dsqrtPhis_dVb * T1; if (selfheat && (Rds!=0.0)) dRds_dT = (0.8 + T0) * T1 * drds0_dT; else dRds_dT = 0.0; } here->B3SOIPDrds = Rds; /* v2.2.3 bug fix */ /* Calculate Abulk */ if (pParam->B3SOIPDa0 == 0.0) { Abulk0 = Abulk = 1.0; dAbulk0_dVb = dAbulk_dVg = dAbulk_dVb = 0.0; } else { T10 = pParam->B3SOIPDketa * Vbsh; if (T10 >= -0.9) { T11 = 1.0 / (1.0 + T10); dT11_dVb = -pParam->B3SOIPDketa * T11 * T11 * dVbsh_dVb; } else { /* added to avoid the problems caused by Keta */ T12 = 1.0 / (0.8 + T10); T11 = (17.0 + 20.0 * T10) * T12; dT11_dVb = -pParam->B3SOIPDketa * T12 * T12 * dVbsh_dVb; } T10 = pParam->B3SOIPDphi + pParam->B3SOIPDketas; T13 = (Vbsh * T11) / T10; dT13_dVb = (Vbsh * dT11_dVb + T11 * dVbsh_dVb) / T10; /* limit 1/sqrt(1-T13) to 6, starting at T13=0.96 */ if (T13 < 0.96) { T14 = 1 / sqrt(1-T13); T10 = 0.5 * T14 / (1-T13); dT14_dVb = T10 * dT13_dVb; } else { T11 = 1.0 / (1.0 - 1.043406*T13); T14 = (6.00167 - 6.26044 * T13) * T11; T10 = 0.001742 * T11 * T11; dT14_dVb = T10 * dT13_dVb; } T10 = 0.5 * pParam->B3SOIPDk1eff / sqrt(pParam->B3SOIPDphi + pParam->B3SOIPDketas); T1 = T10 * T14; dT1_dVb = T10 * dT14_dVb; T9 = sqrt(model->B3SOIPDxj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->B3SOIPDa0 * T5; tmp3 = pParam->B3SOIPDweff + pParam->B3SOIPDb1; tmp4 = pParam->B3SOIPDb0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 * tmp2 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1 + T1 * T2; dAbulk0_dVb = T1 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->B3SOIPDags * pParam->B3SOIPDa0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb / tmp2); } if (Abulk0 < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk0); Abulk0 = (0.02 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk); Abulk = (0.02 - Abulk) * T9; dAbulk_dVb *= T9 * T9; } /* Mobility calculation */ if (model->B3SOIPDmobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = ua + uc * Vbseff; T3 = T0 / model->B3SOIPDtox; T5 = T3 * (T2 + ub * T3); dDenomi_dVg = (T2 + 2.0 * ub * T3) / model->B3SOIPDtox; dDenomi_dVd = dDenomi_dVg * 2 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2 * dVth_dVb + uc * T3 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2 * dVth_dT + (dua_dT + Vbseff * duc_dT + dub_dT * T3 ) * T3; else dDenomi_dT = 0.0; } else if (model->B3SOIPDmobMod == 2) { T5 = Vgsteff / model->B3SOIPDtox * (ua + uc * Vbseff + ub * Vgsteff / model->B3SOIPDtox); dDenomi_dVg = (ua + uc * Vbseff + 2.0 * ub * Vgsteff / model->B3SOIPDtox) / model->B3SOIPDtox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * uc / model->B3SOIPDtox ; if (selfheat) dDenomi_dT = Vgsteff / model->B3SOIPDtox * (dua_dT + Vbseff * duc_dT + dub_dT * Vgsteff / model->B3SOIPDtox); else dDenomi_dT = 0.0; } else /* mobMod == 3 */ { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + uc * Vbseff; T3 = T0 / model->B3SOIPDtox; T4 = T3 * (ua + ub * T3); T5 = T4 * T2; dDenomi_dVg = (ua + 2.0 * ub * T3) * T2 / model->B3SOIPDtox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + uc * T4 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2.0 * dVth_dT + (dua_dT + dub_dT * T3) * T3 * T2 + T4 * Vbseff * duc_dT; else dDenomi_dT = 0.0; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; if (selfheat) dDenomi_dT *= T9; else dDenomi_dT = 0.0; } here->B3SOIPDueff = ueff = u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; if (selfheat) dueff_dT = T9 * dDenomi_dT + du0temp_dT / Denomi; else dueff_dT = 0.0; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * vsattemp * model->B3SOIPDcox; WVCoxRds = WVCox * Rds; /* dWVCoxRds_dT = WVCox * dRds_dT + Weff * model->B3SOIPDcox * Rds * dvsattemp_dT; */ Esat = 2.0 * vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; if (selfheat) dEsatL_dT = T0 * dueff_dT + EsatL / vsattemp * dvsattemp_dT; else dEsatL_dT = 0.0; /* Sqrt() */ a1 = pParam->B3SOIPDa1; if (a1 == 0.0) { Lambda = pParam->B3SOIPDa2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->B3SOIPDa2; T1 = T0 - pParam->B3SOIPDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->B3SOIPDa2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIPDa1 * (1.0 + T1 / T2); } else { T1 = pParam->B3SOIPDa2 + pParam->B3SOIPDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->B3SOIPDa2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIPDa1 * (1.0 + T1 / T2); } here->B3SOIPDAbovVgst2Vtm = Abulk /Vgst2Vtm; /* v2.2.3 bug fix */ if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + EsatL * dAbulk_dVb) * T1; if (selfheat) dT0_dT = -(Abulk * dEsatL_dT + dVgst2Vtm_dT) * T1; else dT0_dT = 0.0; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; if (selfheat) dVdsat_dT = T3 * dT0_dT + T2 * dEsatL_dT + EsatL * T0 * dVgst2Vtm_dT; else dVdsat_dT = 0.0; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); /* dT0_dVb = 2.0 * (T8 * tmp3 this is equivalent to one below, but simpler + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); */ dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; if (selfheat) { if (Rds!=0.0) tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; else tmp4 = dvsattemp_dT / vsattemp; dT0_dT = 2.0 * T8 * tmp4; } else tmp4 = dT0_dT = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; if (selfheat) { tmp4 += dVgst2Vtm_dT / Vgst2Vtm; dT1_dT = (2.0 / Lambda - 1.0) * dVgst2Vtm_dT + Abulk * dEsatL_dT + 3.0 * T7 * tmp4; } else dT1_dT = 0.0; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; if (selfheat) dT2_dT = Vgst2Vtm * dEsatL_dT + EsatL * dVgst2Vtm_dT + 2.0 * T6 * (dVgst2Vtm_dT + Vgst2Vtm * tmp4); else dT2_dT = 0.0; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; if (selfheat) dVdsat_dT = (dT1_dT - (T1 * dT1_dT - dT0_dT * T2 - T0 * dT2_dT) / T3 - Vdsat * dT0_dT) / T0; else dVdsat_dT = 0.0; } here->B3SOIPDvdsat = Vdsat; /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->B3SOIPDdelta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; dT1_dT = dVdsat_dT; T2 = sqrt(T1 * T1 + 4.0 * pParam->B3SOIPDdelta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->B3SOIPDdelta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; if (selfheat) dT2_dT = T0 * dT1_dT + T3 * dVdsat_dT; else dT2_dT = 0.0; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); if (selfheat) dVdseff_dT = dVdsat_dT - 0.5 * (dT1_dT + dT2_dT); else dVdseff_dT = 0.0; if (Vdseff > Vds) Vdseff = Vds; /* This code is added to fixed the problem caused by computer precision when Vds is very close to Vdseff. */ diffVds = Vds - Vdseff; here->B3SOIPDVdseff = Vdseff; /* v2.2.3 bug fix */ /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; if (selfheat) { if (Rds!=0.0) tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; else tmp4 = dvsattemp_dT / vsattemp; dT0_dT = dEsatL_dT + dVdsat_dT + T7 * tmp4 * Vgsteff - T8 * (Abulk * dVdsat_dT - Abulk * Vdsat * dVgst2Vtm_dT / Vgst2Vtm); } else dT0_dT = 0.0; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; if (selfheat) dT1_dT = T9 * tmp4; else dT1_dT = 0.0; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; if (selfheat) dVasat_dT = (dT0_dT - Vasat * dT1_dT) / T1; else dVasat_dT = 0.0; /* Calculate VACLM */ if ((pParam->B3SOIPDpclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->B3SOIPDpclm * Abulk * pParam->B3SOIPDlitl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg = -T0 / Abulk * dAbulk_dVg; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbulk_dVg); dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; if (selfheat) dT1_dT = -T2 * dEsatL_dT / Esat; else dT1_dT = 0.0; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); if (selfheat) dVACLM_dT = T0 * dT1_dT * diffVds - T9 * dVdseff_dT; else dVACLM_dT = 0.0; } else { VACLM = MAX_EXPL; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = dVACLM_dT = 0.0; } /* Calculate VADIBL */ if (pParam->B3SOIPDthetaRout > 0.0) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; T1 = Vgst2Vtm + T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb; dT0_dVb = Vgst2Vtm * dT1_dVb; dT1_dVd = Abulk * dVdsat_dVd; dT0_dVd = Vgst2Vtm * dT1_dVd; if (selfheat) { dT0_dT = dVgst2Vtm_dT * T8 + Abulk * Vgst2Vtm * dVdsat_dT; dT1_dT = dVgst2Vtm_dT + Abulk * dVdsat_dT; } else dT0_dT = dT1_dT = 0.0; T9 = T1 * T1; T2 = pParam->B3SOIPDthetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; if (selfheat) dVADIBL_dT = (dVgst2Vtm_dT - dT0_dT/T1 + T0*dT1_dT/T9) / T2; else dVADIBL_dT = 0.0; T7 = pParam->B3SOIPDpdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->B3SOIPDpdiblb) * T3; dVADIBL_dVd *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->B3SOIPDpdiblb * T4 * T4; dVADIBL_dVd *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; VADIBL *= T3; } } else { VADIBL = MAX_EXPL; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = dVADIBL_dT = 0.0; } /* Calculate VA */ T8 = pParam->B3SOIPDpvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; if (selfheat) dT0_dT = -T9 * dEsatL_dT / EsatL; else dT0_dT = 0.0; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; if (selfheat) dT0_dT = -T9 * dEsatL_dT; else dT0_dT = 0.0; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; if (selfheat) dT1_dT = (tmp1 * dVADIBL_dT + tmp2 * dVACLM_dT ) / tmp3; else dT1_dT = 0.0; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; if (selfheat) dVa_dT = dVasat_dT + T1 * dT0_dT + T0 * dT1_dT; else dVa_dT = 0.0; /* Calculate Ids */ CoxWovL = model->B3SOIPDcox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff ; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff ; if (selfheat) dbeta_dT = CoxWovL * dueff_dT; else dbeta_dT = 0.0; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; if (selfheat) dT0_dT = -0.5 * (Abulk * dVdseff_dT - Abulk * Vdseff / Vgst2Vtm * dVgst2Vtm_dT) / Vgst2Vtm; else dT0_dT = 0.0; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; if (selfheat) dfgche1_dT = Vgsteff * dT0_dT; else dfgche1_dT = 0.0; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; if (selfheat) dfgche2_dT = (dVdseff_dT - T9 * dEsatL_dT) / EsatL; else dfgche2_dT = 0.0; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; if (selfheat) dgche_dT = (beta * dfgche1_dT + fgche1 * dbeta_dT - gche * dfgche2_dT) / fgche2; else dgche_dT = 0.0; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; /* Whoa, these formulas for the derivatives of Idl are convoluted, but I verified them to be correct */ dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; if (selfheat) dIdl_dT = (gche * dVdseff_dT + T9 * dgche_dT - Idl * dRds_dT * gche) / T0; else dIdl_dT = 0.0; T9 = diffVds / Va; T0 = 1.0 + T9; here->B3SOIPDids = Ids = Idl * T0 / here->B3SOIPDnseg; Gm0 = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; Gds0 = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; Gmb0 = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; Gmc = 0.0; if (selfheat) GmT0 = T0 * dIdl_dT - Idl * (dVdseff_dT + T9 * dVa_dT) / Va; else GmT0 = 0.0; /* This includes all dependencies from Vgsteff, Vbseff */ Gm = Gm0 * dVgsteff_dVg / here->B3SOIPDnseg; Gmb = (Gm0 * dVgsteff_dVb + Gmb0 * dVbseff_dVb) / here->B3SOIPDnseg; Gds = (Gm0 * dVgsteff_dVd + Gds0) / here->B3SOIPDnseg; if (selfheat) GmT = (Gm0 * dVgsteff_dT + GmT0) / here->B3SOIPDnseg; else GmT = 0.0; /* calculate GIDL current */ T0 = 3 * model->B3SOIPDtox; /* For drain side */ T1 = (Vds - Vgs_eff - pParam->B3SOIPDngidl) / T0; if ((pParam->B3SOIPDagidl <= 0.0) || (pParam->B3SOIPDbgidl <= 0.0) || (T1 <= 0.0)) { Idgidl = Gdgidld = Gdgidlg = 0.0; } else { dT1_dVd = 1 / T0; dT1_dVg = - dT1_dVd * dVgs_eff_dVg; T2 = pParam->B3SOIPDbgidl / T1; if (T2 < EXPL_THRESHOLD) { Idgidl = wdiod * pParam->B3SOIPDagidl * T1 * exp(-T2); T3 = Idgidl / T1 * (T2 + 1); Gdgidld = T3 * dT1_dVd; Gdgidlg = T3 * dT1_dVg; } else { T3 = wdiod * pParam->B3SOIPDagidl * MIN_EXPL; Idgidl = T3 * T1 ; Gdgidld = T3 * dT1_dVd; Gdgidlg = T3 * dT1_dVg; } } here->B3SOIPDigidl = Idgidl; /* For source side */ T1 = (- Vgs_eff - pParam->B3SOIPDngidl) / T0; if ((pParam->B3SOIPDagidl <= 0.0) || (pParam->B3SOIPDbgidl <= 0.0) || (T1 <= 0.0)) { Isgidl = Gsgidlg = 0; } else { dT1_dVg = - dVgs_eff_dVg / T0; T2 = pParam->B3SOIPDbgidl / T1; if (T2 < EXPL_THRESHOLD) { Isgidl = wdios * pParam->B3SOIPDagidl * T1 * exp(-T2); T3 = Isgidl / T1 * (T2 + 1); Gsgidlg = T3 * dT1_dVg; } else { T3 = wdios * pParam->B3SOIPDagidl * MIN_EXPL; Isgidl = T3 * T1 ; Gsgidlg = T3 * dT1_dVg; } } /* calculate diode and BJT current */ WsTsi = wdios * model->B3SOIPDtsi; WdTsi = wdiod * model->B3SOIPDtsi; NVtm1 = Vtm * pParam->B3SOIPDndiode; if (selfheat) dNVtm1_dT = pParam->B3SOIPDndiode * dVtm_dT; else dNVtm1_dT = 0; T0 = Vbs / NVtm1; dT0_dVb = 1.0 / NVtm1; if (selfheat) dT0_dT = -Vbs / NVtm1 / NVtm1 * dNVtm1_dT; else dT0_dT = 0; DEXP(T0, ExpVbsNVtm, T1); dExpVbsNVtm_dVb = T1 * dT0_dVb; if (selfheat) dExpVbsNVtm_dT = T1 * dT0_dT; else dExpVbsNVtm_dT = 0; T0 = Vbd / NVtm1; dT0_dVb = 1.0 / NVtm1; dT0_dVd = -dT0_dVb; if (selfheat) dT0_dT = -Vbd / NVtm1 / NVtm1 * dNVtm1_dT; else dT0_dT = 0; DEXP(T0, ExpVbdNVtm, T1); dExpVbdNVtm_dVb = T1 * dT0_dVb; dExpVbdNVtm_dVd = -dExpVbdNVtm_dVb; if (selfheat) dExpVbdNVtm_dT = T1 * dT0_dT; else dExpVbdNVtm_dT = 0; /* Ibs1 / Ibd1 : diffusion current */ if (jdif == 0) { Ibs1 = dIbs1_dVb = dIbs1_dT = Ibd1 = dIbd1_dVb = dIbd1_dVd = dIbd1_dT = 0; } else { T0 = WsTsi * jdif; if (selfheat) dT0_dT = WsTsi * djdif_dT; else dT0_dT = 0; Ibs1 = T0 * (ExpVbsNVtm - 1); dIbs1_dVb = T0 * dExpVbsNVtm_dVb; if (selfheat) dIbs1_dT = T0 * dExpVbsNVtm_dT + (ExpVbsNVtm - 1) * dT0_dT; else dIbs1_dT = 0; T0 = WdTsi * jdif; if (selfheat) dT0_dT = WdTsi * djdif_dT; else dT0_dT = 0; Ibd1 = T0 * (ExpVbdNVtm - 1); dIbd1_dVb = T0 * dExpVbdNVtm_dVb; dIbd1_dVd = -dIbd1_dVb; if (selfheat) dIbd1_dT = T0 * dExpVbdNVtm_dT + (ExpVbdNVtm -1) * dT0_dT; else dIbd1_dT = 0; } /* Ibs2:recombination/trap-assisted tunneling current */ NVtmf = 0.026 * pParam->B3SOIPDnrecf0 * (1 + model->B3SOIPDntrecf * (TempRatio - 1)); NVtmr = 0.026 * pParam->B3SOIPDnrecr0 /* v2.2.2 bug fix */ * (1 + model->B3SOIPDntrecr * (TempRatio - 1)); if (selfheat) { dNVtmf_dT = pParam->B3SOIPDnrecf0 * 0.026 * model->B3SOIPDntrecf * dTempRatio_dT; dNVtmr_dT = pParam->B3SOIPDnrecr0 * 0.026 /* v2.2.2 bug fix */ * model->B3SOIPDntrecr * dTempRatio_dT; } else dNVtmf_dT = dNVtmr_dT = 0; if (jrec == 0) { Ibs2 = dIbs2_dVb = dIbs2_dT = 0; Ibd2 = dIbd2_dVb = dIbd2_dVd = dIbd2_dT = 0; } else { /* forward bias */ T0 = Vbs / NVtmf; DEXP(T0,T10,T2); T4 = 1 / NVtmf; dT10_dVb = T4 * T2; if (selfheat) dT10_dT = - T4 * T2 * Vbs / NVtmf * dNVtmf_dT ; else dT10_dT = 0.0; /* reverse bias */ if ((pParam->B3SOIPDvrec0 - Vbs) < 1e-3) { /* v2.2.3 bug fix */ T1 = 1e3; T0 = -Vbs / NVtmr * pParam->B3SOIPDvrec0 * T1; T11 = -exp(T0); dT11_dVb = dT11_dT = 0; } else { T1 = 1 / (pParam->B3SOIPDvrec0 - Vbs); T0 = -Vbs / NVtmr * pParam->B3SOIPDvrec0 * T1; dT0_dVb = -pParam->B3SOIPDvrec0 / NVtmr * (T1 + Vbs * T1 * T1) ; if (selfheat) dT0_dT = -T0 / NVtmr * dNVtmr_dT; else dT0_dT = 0; DEXP(T0, T11, T2); T11 = -T11; dT11_dVb = -T2 * dT0_dVb; if (selfheat) dT11_dT = -T2 * dT0_dT; else dT11_dT = 0; } T3 = WsTsi * jrec; Ibs2 = T3 * (T10 + T11); dIbs2_dVb = T3 * (dT10_dVb + dT11_dVb); if (selfheat) dIbs2_dT = T3 * (dT10_dT + dT11_dT) + WsTsi * (T10 + T11) * djrec_dT; else dIbs2_dT = 0; /* Ibd2 */ T0 = Vbd / NVtmf; DEXP(T0,T10,T2); T4 = 1 / NVtmf; dT10_dVb = T4 * T2; if (selfheat) dT10_dT = - T4 * T2 * Vbd / NVtmf * dNVtmf_dT ; else dT10_dT = 0.0; if ((pParam->B3SOIPDvrec0 - Vbd) < 1e-3) { /* v2.2.3 bug fix */ T1 = 1e3; T0 = -Vbd / NVtmr * pParam->B3SOIPDvrec0 * T1; T11 = -exp(T0); dT11_dVb = dT11_dT = 0; } else { T1 = 1 / (pParam->B3SOIPDvrec0 - Vbd); T0 = -Vbd / NVtmr * pParam->B3SOIPDvrec0 * T1; dT0_dVb = -pParam->B3SOIPDvrec0 / NVtmr * (T1 + Vbd * T1 * T1) ; if (selfheat) dT0_dT = -T0 / NVtmr * dNVtmr_dT; else dT0_dT = 0; DEXP(T0, T11, T2); T11 = - T11; dT11_dVb = -T2 * dT0_dVb; if (selfheat) dT11_dT = -T2 * dT0_dT; else dT11_dT = 0; } T3 = WdTsi * jrec; Ibd2 = T3 * (T10 + T11); dIbd2_dVb = T3 * (dT10_dVb + dT11_dVb); dIbd2_dVd = -dIbd2_dVb; if (selfheat) dIbd2_dT = T3 * (dT10_dT + dT11_dT) + WdTsi * (T10 + T11) * djrec_dT; else dIbd2_dT = 0; } /* Ibs3/Ibd3: recombination current in neutral body */ WTsi = pParam->B3SOIPDweff / here->B3SOIPDnseg * model->B3SOIPDtsi; if (jbjt == 0.0) { Ibs3 = dIbs3_dVb = dIbs3_dVd = dIbs3_dT = 0.0; Ibd3 = dIbd3_dVb = dIbd3_dVd = dIbd3_dT = 0.0; Ibsdif = dIbsdif_dVb = dIbsdif_dT = 0; Ibddif = dIbddif_dVb = dIbddif_dVd = dIbddif_dT = 0; here->B3SOIPDic = Ic = Gcd = Gcb = GcT = 0.0; } else { Ien = WTsi * jbjt * pParam->B3SOIPDlratio; if (selfheat) dIen_dT = WTsi * djbjt_dT * pParam->B3SOIPDlratio; else dIen_dT = 0; /* high level injection of source side */ if ((Ehlis = Ahli * (ExpVbsNVtm - 1)) < 1e-5) { Ehlis = dEhlis_dVb = dEhlis_dT = 0; EhlisFactor = 1; dEhlisFactor_dVb = dEhlisFactor_dT = 0; } else { dEhlis_dVb = Ahli * dExpVbsNVtm_dVb; if (selfheat) dEhlis_dT = Ahli * dExpVbsNVtm_dT + (ExpVbsNVtm - 1) * dAhli_dT; else dEhlis_dT = 0; EhlisFactor = 1.0 / sqrt(1 + Ehlis); T0 = -0.5 * EhlisFactor / (1 + Ehlis); dEhlisFactor_dVb = T0 * dEhlis_dVb; if (selfheat) dEhlisFactor_dT = T0 * dEhlis_dT; else dEhlisFactor_dT = 0; } /* high level injection of drain side */ if ((Ehlid = Ahli * (ExpVbdNVtm - 1)) < 1e-5) { Ehlid = dEhlid_dVb = dEhlid_dVd = dEhlid_dT = 0; EhlidFactor = 1; dEhlidFactor_dVb = dEhlidFactor_dVd = dEhlidFactor_dT = 0; } else { dEhlid_dVb = Ahli * dExpVbdNVtm_dVb; dEhlid_dVd = -dEhlid_dVb; if (selfheat) dEhlid_dT = Ahli * dExpVbdNVtm_dT + (ExpVbdNVtm - 1) * dAhli_dT; else dEhlid_dT = 0; EhlidFactor = 1.0 / sqrt(1 + Ehlid); T0 = -0.5 * EhlidFactor / (1 + Ehlid); dEhlidFactor_dVb = T0 * dEhlid_dVb; dEhlidFactor_dVd = -dEhlidFactor_dVb; if (selfheat) dEhlidFactor_dT = T0 * dEhlid_dT; else dEhlidFactor_dT = 0; } if ((T0 = (1 - pParam->B3SOIPDarfabjt)) < 1e-2) { Ibs3 = dIbs3_dVb = dIbs3_dT = 0; dIbs3_dVd = 0; Ibd3 = dIbd3_dVb = dIbd3_dVd = dIbd3_dT = 0; } else { T1 = T0 * Ien; if (selfheat) dT1_dT = T0 * dIen_dT; else dT1_dT = 0; Ibs3 = T1 * (ExpVbsNVtm - 1) * EhlisFactor; dIbs3_dVb = T1 * (dExpVbsNVtm_dVb * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dVb); dIbs3_dVd = 0; if (selfheat) dIbs3_dT = dT1_dT * (ExpVbsNVtm - 1) * EhlisFactor + T1 * (dExpVbsNVtm_dT * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dT); else dIbs3_dT = 0.0; Ibd3 = T1 * (ExpVbdNVtm - 1) * EhlidFactor; dIbd3_dVb = T1 * (dExpVbdNVtm_dVb * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dVb); dIbd3_dVd = -dIbd3_dVb; if (selfheat) dIbd3_dT = dT1_dT * (ExpVbdNVtm - 1) * EhlidFactor + T1 * (dExpVbdNVtm_dT * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dT); else dIbd3_dT = 0.0; } /* effective diffusion current for capacitance calcu. */ Iendif = WTsi * jbjt * pParam->B3SOIPDlratiodif; if (selfheat) dIendif_dT = WTsi * djbjt_dT * pParam->B3SOIPDlratiodif; else dIendif_dT = 0; Ibsdif = Iendif * (ExpVbsNVtm - 1) * EhlisFactor; dIbsdif_dVb = Iendif * (dExpVbsNVtm_dVb * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dVb); if (selfheat) dIbsdif_dT = dIendif_dT * (ExpVbsNVtm - 1) * EhlisFactor + Iendif * (dExpVbsNVtm_dT * EhlisFactor + (ExpVbsNVtm - 1) * dEhlisFactor_dT); else dIbsdif_dT = 0; Ibddif = Iendif * (ExpVbdNVtm - 1) * EhlidFactor; dIbddif_dVb = Iendif * (dExpVbdNVtm_dVb * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dVb); dIbddif_dVd = -dIbddif_dVb; if (selfheat) dIbddif_dT = dIendif_dT * (ExpVbdNVtm - 1) * EhlidFactor + Iendif * (dExpVbdNVtm_dT * EhlidFactor + (ExpVbdNVtm - 1) * dEhlidFactor_dT); else dIbddif_dT = 0; /* Ic: Bjt collector current */ if ((here->B3SOIPDbjtoff == 1) || (Vds == 0.0)) { here->B3SOIPDic = Ic = Gcd = Gcb = GcT = 0.0; } else { /* second order effects */ T0 = 1 + (Vbs + Vbd) / pParam->B3SOIPDvearly; dT0_dVb = 2.0 / pParam->B3SOIPDvearly; dT0_dVd = -1.0 / pParam->B3SOIPDvearly; T1 = Ehlis + Ehlid; dT1_dVb = dEhlis_dVb + dEhlid_dVb; dT1_dVd = dEhlid_dVd; if (selfheat) dT1_dT = dEhlis_dT + dEhlid_dT; else dT1_dT = 0; T3 = sqrt(T0 * T0 + 4 * T1); dT3_dVb = 0.5 / T3 * (2 * T0 * dT0_dVb + 4 * dT1_dVb); dT3_dVd = 0.5 / T3 * (2 * T0 * dT0_dVd + 4 * dT1_dVd); if (selfheat) dT3_dT = 2 * dT1_dT / T3; else dT3_dT = 0; T2 = (T0 + T3) / 2.0; dT2_dVb = (dT0_dVb + dT3_dVb) / 2.0; dT2_dVd = (dT0_dVd + dT3_dVd) / 2.0; if (selfheat) dT2_dT = dT3_dT /2.0; else dT2_dT = 0; if (T2 < .1) { E2ndFactor = 10.0; dE2ndFactor_dVb = dE2ndFactor_dVd = dE2ndFactor_dT = 0; } else { E2ndFactor = 1.0 / T2; dE2ndFactor_dVb = -E2ndFactor / T2 * dT2_dVb; dE2ndFactor_dVd = -E2ndFactor / T2 * dT2_dVd; if (selfheat) dE2ndFactor_dT = -E2ndFactor / T2 * dT2_dT; else dE2ndFactor_dT = 0; } T0 = pParam->B3SOIPDarfabjt * Ien; if (selfheat) dT0_dT = pParam->B3SOIPDarfabjt * dIen_dT; else dT0_dT = 0; here->B3SOIPDic = Ic = T0 * (ExpVbsNVtm - ExpVbdNVtm) * E2ndFactor; Gcb = dIc_dVb = T0 * ((dExpVbsNVtm_dVb - dExpVbdNVtm_dVb) * E2ndFactor + (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dVb); Gcd = dIc_dVd = T0 * (-dExpVbdNVtm_dVd * E2ndFactor + (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dVd); if (selfheat) GcT = T0 * (dExpVbsNVtm_dT - dExpVbdNVtm_dT) * E2ndFactor + dT0_dT * (ExpVbsNVtm - ExpVbdNVtm) * E2ndFactor + T0 * (ExpVbsNVtm - ExpVbdNVtm) * dE2ndFactor_dT; else GcT = 0; } } /* Ibs4/Ibd4 : tunneling */ NVtm2 = 0.026 * pParam->B3SOIPDntun; if (jtun == 0) { Ibs4 = Ibd4 = dIbs4_dVb = dIbs4_dT = dIbd4_dVb = dIbd4_dVd = dIbd4_dT = 0; } else { if ((pParam->B3SOIPDvtun0 - Vbs) < 1e-3) { /* v2.2.3 bug fix */ T1=1e3; T0 = -Vbs / NVtm2 * pParam->B3SOIPDvtun0 * T1; T1 = exp(T0); T3 = WsTsi * jtun; Ibs4 = T3 * (1- T1); dIbs4_dVb = dIbs4_dT = 0; } else { T1 = 1 / (pParam->B3SOIPDvtun0 - Vbs); T0 = -Vbs / NVtm2 * pParam->B3SOIPDvtun0 * T1; dT0_dVb = -pParam->B3SOIPDvtun0 / NVtm2 * (T1 + Vbs * T1 * T1) ; DEXP(T0, T1, T2); T3 = WsTsi * jtun; Ibs4 = T3 * (1- T1); dIbs4_dVb = -T3 * T2 * dT0_dVb; if (selfheat) dIbs4_dT = (1 - T1) * WsTsi * djtun_dT; else dIbs4_dT = 0; } if ((pParam->B3SOIPDvtun0 - Vbd) < 1e-3) { /* v2.2.3 bug fix */ T1=1e3; T0 = -Vbd / NVtm2 * pParam->B3SOIPDvtun0 * T1; T1 = exp(T0); T3 = WdTsi * jtun; Ibd4 = T3 * (1- T1); dIbd4_dVb = dIbd4_dT = 0; dIbd4_dVd = 0; } else { T1 = 1 / (pParam->B3SOIPDvtun0 - Vbd); T0 = -Vbd / NVtm2 * pParam->B3SOIPDvtun0 * T1; dT0_dVb = -pParam->B3SOIPDvtun0 / NVtm2 * (T1 + Vbd * T1 * T1) ; DEXP(T0, T1, T2); T3 = WdTsi * jtun; Ibd4 = T3 * (1- T1); dIbd4_dVb = -T3 * T2 * dT0_dVb; dIbd4_dVd = -dIbd4_dVb; if (selfheat) dIbd4_dT = (1 - T1) * WdTsi * djtun_dT; else dIbd4_dT = 0; } } here->B3SOIPDitun = - Ibd3 - Ibd4; here->B3SOIPDibs = Ibs = Ibs1 + Ibs2 + Ibs3 + Ibs4; here->B3SOIPDibd = Ibd = Ibd1 + Ibd2 + Ibd3 + Ibd4; Gjsb = dIbs1_dVb + dIbs2_dVb + dIbs3_dVb + dIbs4_dVb; Gjsd = dIbs3_dVd; if (selfheat) GjsT = dIbs1_dT + dIbs2_dT + dIbs3_dT + dIbs4_dT; else GjsT = 0.0; Gjdb = dIbd1_dVb + dIbd2_dVb + dIbd3_dVb + dIbd4_dVb; Gjdd = dIbd1_dVd + dIbd2_dVd + dIbd3_dVd + dIbd4_dVd; if (selfheat) GjdT = dIbd1_dT + dIbd2_dT + dIbd3_dT + dIbd4_dT; else GjdT = 0.0; /* v2.2: calculate gate-tunneling-to-body current */ if (model->B3SOIPDigMod >= 1) { Vgb = Vgs_eff - Vbs; dVgb_dVg = dVgs_eff_dVg; dVgb_dVb = -1; /* Calculate Vox first */ Vfb = model->B3SOIPDtype * pParam->B3SOIPDvth0 - phi - pParam->B3SOIPDk1eff * sqrtPhi; T3 = Vfb - Vgs_eff + Vbs - DELTA_3; dT3_dVg = -dVgs_eff_dVg; dT3_dVd = 0; dT3_dVb = 1; if (Vfb <= 0.0) { T0 = sqrt(T3 * T3 - 4.0 * DELTA_3 * Vfb); dT0_dVg = 1.0/(2.0 * T0) * 2.0*T3 * dT3_dVg; dT0_dVb = 0.5*(1.0/T0) * 2.0*T3 * dT3_dVb; } else { T0 = sqrt(T3 * T3 + 4.0 * DELTA_3 * Vfb); dT0_dVg = 1.0/(2.0 * T0) * 2.0*T3 * dT3_dVg; dT0_dVb = 0.5*(1.0/T0) * 2.0*T3 * dT3_dVb; } Vfbeff = Vfb - 0.5 * (T3 + T0); dVfbeff_dVg = -0.5 * (dT3_dVg + dT0_dVg); dVfbeff_dVb = -0.5 * (dT3_dVb + dT0_dVb); Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; dVoxacc_dVd = 0.0; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; T0 = Vgs_eff - Vgsteff - Vfbeff - Vbseff; dT0_dVg = dVgs_eff_dVg - dVgsteff_dVg - dVfbeff_dVg; dT0_dVd = -dVgsteff_dVd; dT0_dVb = -dVgsteff_dVb - dVfbeff_dVb - dVbseff_dVb; if (selfheat) dT0_dT = -dVgsteff_dT; if (pParam->B3SOIPDk1eff == 0.0) { Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = dVoxdepinv_dT = 0.0; } else { if (T0 < 0.0) { T1 = T0/pParam->B3SOIPDk1eff; dT1_dVg = dT0_dVg/pParam->B3SOIPDk1eff; dT1_dVd = dT0_dVd/pParam->B3SOIPDk1eff; dT1_dVb = dT0_dVb/pParam->B3SOIPDk1eff; if (selfheat) dT1_dT = dT0_dT/pParam->B3SOIPDk1eff; } else { T1 = pParam->B3SOIPDk1eff/2*(-1 + sqrt(1 + 4*T0/pParam->B3SOIPDk1eff/pParam->B3SOIPDk1eff)); T2 = pParam->B3SOIPDk1eff/2 * 0.5/sqrt(1 + 4*T0/pParam->B3SOIPDk1eff/pParam->B3SOIPDk1eff) * 4/pParam->B3SOIPDk1eff/pParam->B3SOIPDk1eff; dT1_dVg = T2 * dT0_dVg; dT1_dVd = T2 * dT0_dVd; dT1_dVb = T2 * dT0_dVb; if (selfheat) dT1_dT = T2 * dT0_dT; } Voxdepinv = Vgs_eff - (T1*T1 + Vbs) - Vfb; dVoxdepinv_dVg = dVgs_eff_dVg - (2.0*T1*dT1_dVg); dVoxdepinv_dVd = -(2.0*T1*dT1_dVd); dVoxdepinv_dVb = -(2.0*T1*dT1_dVb + 1); if (selfheat) dVoxdepinv_dT = -(2.0*T1*dT1_dT); } OxideRatio = pParam->B3SOIPDoxideRatio; Vox = Voxdepinv; /* Voxeff is Vox limited below Voxh */ T0 = model->B3SOIPDvoxh; T1 = T0 - Vox - model->B3SOIPDdeltavox; T3 = sqrt(T1 * T1 + 4*model->B3SOIPDdeltavox * T0); Voxeff = T0 - 0.5 * (T1 + T3); dVoxeff_dVox = 0.5 * (1.0 + T1 / T3); Vox = Voxeff; dVox_dVg = dVoxdepinv_dVg * dVoxeff_dVox; dVox_dVd = dVoxdepinv_dVd * dVoxeff_dVox; dVox_dVb = dVoxdepinv_dVb * dVoxeff_dVox; dVox_dT = dVoxdepinv_dT * dVoxeff_dVox; T0 = (Vox - model->B3SOIPDebg)/model->B3SOIPDvevb; if (selfheat) dT0_dT = dVox_dT /model->B3SOIPDvevb; DEXP(T0, T1, T2); /* T1=exp(T0), T2=dT1_dT0 */ if (selfheat) dT1_dT = T2 * dT0_dT; Vaux = model->B3SOIPDvevb * log(1 + T1); dVaux_dVg = T2 / (1 + T1) * dVox_dVg; dVaux_dVd = T2 / (1 + T1) * dVox_dVd; dVaux_dVb = T2 / (1 + T1) * dVox_dVb; if (selfheat) dVaux_dT = T2 / (1 + T1) * dVox_dT; if (model->B3SOIPDvgb1 != 0) { T0 = 1 - Vox / model->B3SOIPDvgb1; dT0_dVox = -1.0/model->B3SOIPDvgb1; if (selfheat) dT0_dT = -dVox_dT / model->B3SOIPDvgb1; } else { T0 = 1; dT0_dVox = dT0_dT = 0.0; } if (T0 < 0.01) { T0 = 0.01; dT0_dVox = dT0_dT = 0.0; } /* v2.2.3 bug fix */ T1 = Leff * Weff * 3.7622e-7 * OxideRatio / here->B3SOIPDnseg; T2 = -3.1051e10 * model->B3SOIPDtoxqm; T3 = model->B3SOIPDalphaGB1; T4 = model->B3SOIPDbetaGB1; T6 = T2*(T3 - T4 * Vox) / T0; if (selfheat) dT6_dT = -T2 * T4 * dVox_dT / T0 - T6/T0 * dT0_dT; DEXP(T6, T5, T7); /* T5=exp(T6), T7=dT5_dT6 */ dT5_dVg = -T7 * dVox_dVg * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVd = -T7 * dVox_dVd * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVb = -T7 * dVox_dVb * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); if (selfheat) dT5_dT = T7 * dT6_dT; Igb1 = T1 * Vgb * Vaux * T5; dIgb1_dVg = T1 * (Vgb*Vaux*dT5_dVg + dVgb_dVg*Vaux*T5 + Vgb*T5*dVaux_dVg); dIgb1_dVd = T1 * (Vgb*Vaux*dT5_dVd + Vgb*T5*dVaux_dVd); dIgb1_dVb = T1 * (Vgb*Vaux*dT5_dVb + dVgb_dVb*Vaux*T5 + Vgb*T5*dVaux_dVb); if (selfheat) dIgb1_dT = T1 * Vgb * (Vaux*dT5_dT + T5*dVaux_dT); else dIgb1_dT = 0.0; Vox = Voxacc; /* Voxeff is Vox limited below Voxh */ T0 = model->B3SOIPDvoxh; T1 = T0 - Vox - model->B3SOIPDdeltavox; T3 = sqrt(T1 * T1 + 4*model->B3SOIPDdeltavox * T0); Voxeff = T0 - 0.5 * (T1 + T3); dVoxeff_dVox = 0.5 * (1.0 + T1 / T3); Vox = Voxeff; dVox_dVg = dVoxacc_dVg * dVoxeff_dVox; dVox_dVd = dVoxacc_dVd * dVoxeff_dVox; dVox_dVb = dVoxacc_dVb * dVoxeff_dVox; dVox_dT = 0; T0 = (-Vgb+(Vfb))/model->B3SOIPDvecb; if (selfheat) dT0_dT = 0; DEXP(T0, T1, T2); /* T1=exp(T0), T2=dT1_dT0 */ if (selfheat) dT1_dT = 0; Vaux = model->B3SOIPDvecb* log(1 + T1); dVaux_dVg = -T2 / (1 + T1); dVaux_dVd = 0; dVaux_dVb = -dVaux_dVg; if (selfheat) dVaux_dT = 0; if (model->B3SOIPDvgb2 != 0) { T0 = 1 - Vox / model->B3SOIPDvgb2; dT0_dVox = -1.0/model->B3SOIPDvgb2; if (selfheat) dT0_dT = -dVox_dT / model->B3SOIPDvgb2; } else { T0 = 1; dT0_dVox = dT0_dT =0.0; } if (T0 < 0.01) { T0 = 0.01; dT0_dVox = dT0_dT =0.0; } /* v2.2.3 bug fix */ T1 = Leff * Weff * 4.9758e-7 * OxideRatio / here->B3SOIPDnseg; T2 = -2.357e10 * model->B3SOIPDtoxqm; T3 = model->B3SOIPDalphaGB2; T4 = model->B3SOIPDbetaGB2; T6 = T2*(T3 - T4 * Vox) / T0; if (selfheat) dT6_dT = -T2 * T4 * dVox_dT / T0 - T6/T0 * dT0_dT; DEXP(T6, T5, T7); /* T5=exp(T6), T7=dT5_dT6 */ dT5_dVg = -T7 * dVox_dVg * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVd = -T7 * dVox_dVd * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); dT5_dVb = -T7 * dVox_dVb * T2 / T0 * (T4 + (T3 - T4 * Vox) / T0 * dT0_dVox); if (selfheat) dT5_dT = T7 * dT6_dT; Igb2 = T1 * Vgb * Vaux * T5; dIgb2_dVg = T1 * (Vgb*Vaux*dT5_dVg + dVgb_dVg*Vaux*T5 + Vgb*T5*dVaux_dVg); dIgb2_dVd = T1 * (Vgb*Vaux*dT5_dVd + Vgb*T5*dVaux_dVd); dIgb2_dVb = T1 * (Vgb*Vaux*dT5_dVb + dVgb_dVb*Vaux*T5 + Vgb*T5*dVaux_dVb); if (selfheat) dIgb2_dT = T1 * Vgb * (Vaux*dT5_dT + T5*dVaux_dT); else dIgb2_dT = 0.0; /* Igb1 dominates in inversion region, while Igb2 doninates in accumulation */ /* v2.2.3 bug fix for residue at low Vgb */ if (Vgb >= 0) { Igb = Igb1; dIgb_dVg = dIgb1_dVg; dIgb_dVd = dIgb1_dVd; dIgb_dVb = dIgb1_dVb; dIgb_dT = dIgb1_dT; } else { Igb = Igb2; dIgb_dVg = dIgb2_dVg; dIgb_dVd = dIgb2_dVd; dIgb_dVb = dIgb2_dVb; dIgb_dT = dIgb2_dT; } } else { Igb = 0.0; dIgb_dVg = 0.0; dIgb_dVd = 0.0; dIgb_dVb = 0.0; dIgb_dT = 0.0; } here->B3SOIPDig = Igb; here->B3SOIPDgigg = dIgb_dVg; here->B3SOIPDgigd = dIgb_dVd; here->B3SOIPDgigb = dIgb_dVb; here->B3SOIPDgigs = -(dIgb_dVg + dIgb_dVd + dIgb_dVb); here->B3SOIPDgigT = dIgb_dT; /* end of v2.2 gate current */ /* calculate substrate current Iii */ if (pParam->B3SOIPDalpha0 <= 0.0) { Giig = Giib = Giid = GiiT = 0.0; here->B3SOIPDiii = Iii = 0.0; } else { Vdsatii0 = pParam->B3SOIPDvdsatii0 * (1 + model->B3SOIPDtii * (TempRatio-1.0)) - pParam->B3SOIPDlii / Leff; if (selfheat) dVdsatii0_dT = pParam->B3SOIPDvdsatii0 * model->B3SOIPDtii * dTempRatio_dT; else dVdsatii0_dT = 0; /* Calculate VgsStep */ T0 = pParam->B3SOIPDesatii * Leff; T1 = pParam->B3SOIPDsii0 * T0 / (1.0 + T0); T0 = 1 / (1 + pParam->B3SOIPDsii1 * Vgsteff); if (selfheat) dT0_dT = - pParam->B3SOIPDsii1 * T0 * T0 *dVgsteff_dT; else dT0_dT = 0; T3 = T0 + pParam->B3SOIPDsii2; T4 = Vgst * pParam->B3SOIPDsii1 * T0 * T0; T2 = Vgst * T3; dT2_dVg = T3 * dVgst_dVg - T4 * dVgsteff_dVg; dT2_dVb = T3 * dVgst_dVb * dVbseff_dVb - T4 * dVgsteff_dVb; dT2_dVd = T3 * dVgst_dVd - T4 * dVgsteff_dVd; if (selfheat) dT2_dT = -dVth_dT * T3 + Vgst * dT0_dT; else dT2_dT = 0; T3 = 1 / (1 + pParam->B3SOIPDsiid * Vds); dT3_dVd = - pParam->B3SOIPDsiid * T3 * T3; VgsStep = T1 * T2 * T3; if (selfheat) dVgsStep_dT = T1 * T3 * dT2_dT; else dVgsStep_dT = 0; Vdsatii = Vdsatii0 + VgsStep; Vdiff = Vds - Vdsatii; dVdiff_dVg = - T1 * T3 * dT2_dVg; dVdiff_dVb = - T1 * T3 * dT2_dVb; dVdiff_dVd = 1.0 - T1 * (T3 * dT2_dVd + T2 * dT3_dVd); if (selfheat) dVdiff_dT = -(dVdsatii0_dT + dVgsStep_dT); else dVdiff_dT = 0; T0 = pParam->B3SOIPDbeta2 + pParam->B3SOIPDbeta1 * Vdiff + pParam->B3SOIPDbeta0 * Vdiff * Vdiff; if (T0 < 1e-5) { T0 = 1e-5; dT0_dVg = dT0_dVd = dT0_dVb = dT0_dT = 0.0; } else { T1 = pParam->B3SOIPDbeta1 + 2 * pParam->B3SOIPDbeta0 * Vdiff; dT0_dVg = T1 * dVdiff_dVg; dT0_dVb = T1 * dVdiff_dVb; dT0_dVd = T1 * dVdiff_dVd; if (selfheat) dT0_dT = T1 * dVdiff_dT; else dT0_dT = 0; } if ((T0 < Vdiff / EXPL_THRESHOLD) && (Vdiff > 0.0)) { Ratio = pParam->B3SOIPDalpha0 * MAX_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; } else if ((T0 < -Vdiff / EXPL_THRESHOLD) && (Vdiff < 0.0)) { Ratio = pParam->B3SOIPDalpha0 * MIN_EXPL; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; } else { Ratio = pParam->B3SOIPDalpha0 * exp(Vdiff / T0); T1 = Ratio / T0 / T0; dRatio_dVg = T1 * (T0 * dVdiff_dVg - Vdiff * dT0_dVg); dRatio_dVb = T1 * (T0 * dVdiff_dVb - Vdiff * dT0_dVb); dRatio_dVd = T1 * (T0 * dVdiff_dVd - Vdiff * dT0_dVd); if (selfheat) dRatio_dT = T1 * (T0 * dVdiff_dT - Vdiff * dT0_dT); else dRatio_dT = 0; } /* Avoid too high ratio */ if (Ratio > 10.0) { Ratio = 10.0; dRatio_dVg = dRatio_dVb = dRatio_dVd = dRatio_dT = 0.0; } T0 = Ids + pParam->B3SOIPDfbjtii * Ic; here->B3SOIPDiii = Iii = Ratio * T0; Giig = Ratio * Gm + T0 * dRatio_dVg; Giib = Ratio * (Gmb + pParam->B3SOIPDfbjtii * Gcb) + T0 * dRatio_dVb; Giid = Ratio * (Gds + pParam->B3SOIPDfbjtii * Gcd) + T0 * dRatio_dVd; if (selfheat) GiiT = Ratio * (GmT + pParam->B3SOIPDfbjtii * GcT) + T0 * dRatio_dT; else GiiT = 0.0; } /* Current through body resistor */ /* Current going out is +ve */ if ((here->B3SOIPDbodyMod == 0) || (here->B3SOIPDbodyMod == 2)) { Ibp = Gbpbs = Gbpps = 0.0; } else { /* here->B3SOIPDbodyMod == 1 */ if (pParam->B3SOIPDrbody < 1e-30) { if (here->B3SOIPDrbodyext <= 1e-30) T0 = 1.0 / 1e-30; else T0 = 1.0 / here->B3SOIPDrbodyext; Ibp = Vbp * T0; Gbpbs = T0 * dVbp_dVb; Gbpps = -T0 * dVbp_dVb; } else { Gbpbs = 1.0 / (pParam->B3SOIPDrbody + here->B3SOIPDrbodyext); Ibp = Vbp * Gbpbs; Gbpps = - Gbpbs; } } here->B3SOIPDibp = Ibp; here->B3SOIPDgbpbs = Gbpbs; here->B3SOIPDgbpps = Gbpps; here->B3SOIPDgbpT = 0.0; here->B3SOIPDcbodcon = Ibp - (Gbpbs * Vbs + Gbpps * Vps); /* Current going out of drainprime node into the drain of device */ /* "node" means the SPICE circuit node */ here->B3SOIPDcdrain = Ids + Ic; here->B3SOIPDcd = Ids + Ic - Ibd + Iii + Idgidl; here->B3SOIPDcb = Ibs + Ibd + Ibp - Iii - Idgidl - Isgidl - Igb; here->B3SOIPDgds = Gds + Gcd; here->B3SOIPDgm = Gm; here->B3SOIPDgmbs = Gmb + Gcb; if (selfheat) here->B3SOIPDgmT = GmT + GcT; else here->B3SOIPDgmT = 0.0; /* note that sign is switched because power flows out of device into the temperature node. Currently ommit self-heating due to bipolar current because it can cause convergence problem*/ here->B3SOIPDgtempg = -Gm * Vds; here->B3SOIPDgtempb = -Gmb * Vds; here->B3SOIPDgtempT = -GmT * Vds; here->B3SOIPDgtempd = -Gds * Vds - Ids; here->B3SOIPDcth = - Ids * Vds - model->B3SOIPDtype * (here->B3SOIPDgtempg * Vgs + here->B3SOIPDgtempb * Vbs + here->B3SOIPDgtempd * Vds) - here->B3SOIPDgtempT * delTemp; /* Body current which flows into drainprime node from the drain of device */ here->B3SOIPDgjdb = Gjdb - Giib; here->B3SOIPDgjdd = Gjdd - (Giid + Gdgidld); here->B3SOIPDgjdg = - (Giig + Gdgidlg); if (selfheat) here->B3SOIPDgjdT = GjdT - GiiT; else here->B3SOIPDgjdT = 0.0; here->B3SOIPDcjd = Ibd - Iii - Idgidl - (here->B3SOIPDgjdb * Vbs + here->B3SOIPDgjdd * Vds + here->B3SOIPDgjdg * Vgs + here->B3SOIPDgjdT * delTemp); /* Body current which flows into sourceprime node from the source of device */ here->B3SOIPDgjsb = Gjsb; here->B3SOIPDgjsd = Gjsd; here->B3SOIPDgjsg = - Gsgidlg; if (selfheat) here->B3SOIPDgjsT = GjsT; else here->B3SOIPDgjsT = 0.0; here->B3SOIPDcjs = Ibs - Isgidl - (here->B3SOIPDgjsb * Vbs + here->B3SOIPDgjsd * Vds + here->B3SOIPDgjsg * Vgs + here->B3SOIPDgjsT * delTemp); /* Current flowing into body node */ here->B3SOIPDgbbs = Giib - Gjsb - Gjdb - Gbpbs; here->B3SOIPDgbgs = Giig + Gdgidlg + Gsgidlg; here->B3SOIPDgbds = Giid + Gdgidld - Gjsd - Gjdd; here->B3SOIPDgbps = - Gbpps; if (selfheat) here->B3SOIPDgbT = GiiT - GjsT - GjdT; else here->B3SOIPDgbT = 0.0; here->B3SOIPDcbody = Iii + Idgidl + Isgidl - Ibs - Ibd - Ibp + Igb - ( (here->B3SOIPDgbbs + dIgb_dVb) * Vbs + (here->B3SOIPDgbgs + dIgb_dVg) * Vgs + (here->B3SOIPDgbds + dIgb_dVd) * Vds + here->B3SOIPDgbps * Vps + (here->B3SOIPDgbT + dIgb_dT) * delTemp); here->B3SOIPDcgate = Igb - (dIgb_dVb * Vbs + dIgb_dVg * Vgs + dIgb_dVd * Vds + dIgb_dT * delTemp); /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm); here->B3SOIPDqinv = -model->B3SOIPDcox * pParam->B3SOIPDweff * Leff * T1; /* Begin CV (charge) model */ if ((model->B3SOIPDxpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbody = qsub = 0.0; /* v2.2.3 bug fix */ here->B3SOIPDcggb = here->B3SOIPDcgsb = here->B3SOIPDcgdb = 0.0; here->B3SOIPDcdgb = here->B3SOIPDcdsb = here->B3SOIPDcddb = 0.0; here->B3SOIPDcbgb = here->B3SOIPDcbsb = here->B3SOIPDcbdb = 0.0; goto finished; } else { CoxWL = model->B3SOIPDcox * (pParam->B3SOIPDweffCV / here->B3SOIPDnseg * pParam->B3SOIPDleffCV + here->B3SOIPDagbcp); CoxWLb = model->B3SOIPDfbody * model->B3SOIPDcox * (pParam->B3SOIPDweffCV / here->B3SOIPDnseg * pParam->B3SOIPDleffCVb + here->B3SOIPDagbcp); /* By using this Vgsteff,cv, discontinuity in moderate inversion charges can be avoid. */ if ((VgstNVt > -EXPL_THRESHOLD) && (VgstNVt < EXPL_THRESHOLD)) { ExpVgst *= ExpVgst; ExpVgst *= exp( -(pParam->B3SOIPDdelvt / (n * Vtm))); Vgsteff = n * Vtm * log(1.0 + ExpVgst); T0 = ExpVgst / (1.0 + ExpVgst); T1 = -T0 * (dVth_dVb + Vgst / n * dn_dVb) + Vgsteff / n * dn_dVb; dVgsteff_dVd = -T0 * (dVth_dVd + Vgst / n * dn_dVd) + Vgsteff / n * dn_dVd; dVgsteff_dVg = T0 * dVgs_eff_dVg; dVgsteff_dVb = T1 * dVbseff_dVb; if (selfheat) dVgsteff_dT = -T0 * (dVth_dT + (Vgst - pParam->B3SOIPDdelvt) / Temp) + Vgsteff / Temp; else dVgsteff_dT = 0.0; } if (model->B3SOIPDcapMod == 2) { Vfb = Vth - phi - pParam->B3SOIPDk1eff * sqrtPhis + pParam->B3SOIPDdelvt; dVfb_dVb = dVth_dVb - pParam->B3SOIPDk1eff * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; dVfb_dT = dVth_dT; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3_SOI; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3_SOI * Vfb); T2 = -DELTA_3_SOI / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3_SOI * Vfb); T2 = DELTA_3_SOI / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1; dVfbeff_dVrg = T1 * dVgs_eff_dVg; if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfb_dT; else dVfbeff_dT = 0.0; Qac0 = CoxWLb * (Vfbeff - Vfb); dQac0_dVrg = CoxWLb * dVfbeff_dVrg; dQac0_dVd = CoxWLb * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = CoxWLb * (dVfbeff_dVb - dVfb_dVb); if (selfheat) dQac0_dT = CoxWLb * (dVfbeff_dT - dVfb_dT); else dQac0_dT = 0.0; T0 = 0.5 * K1; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B3SOIPDk1eff == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B3SOIPDk1eff; T2 = CoxWLb; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLb * T0 / T1; } Qsub0 = CoxWLb * K1 * (T1 - T0); dQsub0_dVrg = T2 * (dVgs_eff_dVg - dVfbeff_dVrg); dQsub0_dVg = -T2; dQsub0_dVd = -T2 * dVfbeff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + 1); if (selfheat) dQsub0_dT = -T2 * dVfbeff_dT; else dQsub0_dT = 0.0; AbulkCV = Abulk0 * pParam->B3SOIPDabulkCVfactor; dAbulkCV_dVb = pParam->B3SOIPDabulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff- T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; T7 = 1.0 - AbulkCV; qbulk = CoxWLb * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWLb * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWLb * T5 * dVdseffCV_dVd ; Cbb1 = CoxWLb * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); /* Total inversion charge */ T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qinv = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); /* Inversion charge partitioning into S / D */ if (model->B3SOIPDxpart > 0.5) { /* 0/100 Charge partition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd1 = CoxWL * T5 * dVdseffCV_dVd; Csb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); } else if (model->B3SOIPDxpart < 0.5) { /* 40/60 Charge partition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg1 = T4 + T5 * dVdseffCV_dVg; Csd1 = T5 * dVdseffCV_dVd; Csb1 = T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb; } else { /* 50/50 Charge partition model */ qsrc = - 0.5 * (qinv + qbulk); Csg1 = - 0.5 * (Cgg1 + Cbg1); Csb1 = - 0.5 * (Cgb1 + Cbb1); Csd1 = - 0.5 * (Cgd1 + Cbd1); } /* Backgate charge */ CboxWL = pParam->B3SOIPDkb1 * model->B3SOIPDfbody * Cbox * (pParam->B3SOIPDweffCV / here->B3SOIPDnseg * pParam->B3SOIPDleffCVbg + here->B3SOIPDaebcp); Qe1 = CboxWL * (Vesfb - Vbs); dQe1_dVb = -CboxWL; dQe1_dVe = CboxWL; if (selfheat) dQe1_dT = -CboxWL * dvfbb_dT; else dQe1_dT = 0; qgate = qinv + Qac0 + Qsub0; qbody = (qbulk - Qac0 - Qsub0 - Qe1); qsub = Qe1; qdrn = -(qgate + qsrc + qbody + qsub); /* This transform all the dependency on Vgsteff, Vbseff into real ones */ Ce1b = dQe1_dVb; Ce1e = dQe1_dVe; Csg = Csg1 * dVgsteff_dVg; Csd = Csd1 + Csg1 * dVgsteff_dVd; Csb = Csg1 * dVgsteff_dVb + Csb1 * dVbseff_dVb; if (selfheat) CsT = Csg1 * dVgsteff_dT; else CsT = 0.0; Cgg = (Cgg1 + dQsub0_dVg) * dVgsteff_dVg + dQac0_dVrg + dQsub0_dVrg; Cgd = (Cgg1 + dQsub0_dVg) * dVgsteff_dVd + Cgd1 + dQac0_dVd + dQsub0_dVd; Cgb = (Cgg1 + dQsub0_dVg) * dVgsteff_dVb + (Cgb1 + dQsub0_dVb + dQac0_dVb) * dVbseff_dVb; if (selfheat) CgT = (Cgg1 + dQsub0_dVg) * dVgsteff_dT + dQac0_dT + dQsub0_dT; else CgT = 0.0; Cbg = (Cbg1 - dQsub0_dVg) * dVgsteff_dVg - dQac0_dVrg - dQsub0_dVrg; Cbd = (Cbg1 - dQsub0_dVg) * dVgsteff_dVd + Cbd1 - dQac0_dVd - dQsub0_dVd; Cbb = (Cbg1 - dQsub0_dVg) * dVgsteff_dVb - dQe1_dVb + (Cbb1 - dQsub0_dVb - dQac0_dVb) * dVbseff_dVb; if (selfheat) CbT = (Cbg1 - dQsub0_dVg) * dVgsteff_dT - dQac0_dT - dQsub0_dT - dQe1_dT; else CbT = 0.0; here->B3SOIPDcggb = Cgg ; here->B3SOIPDcgsb = - (Cgg + Cgd + Cgb); here->B3SOIPDcgdb = Cgd; here->B3SOIPDcgT = CgT; here->B3SOIPDcbgb = Cbg; here->B3SOIPDcbsb = -(Cbg + Cbd + Cbb) + Ce1e; here->B3SOIPDcbdb = Cbd; here->B3SOIPDcbeb = - Ce1e ; here->B3SOIPDcbT = CbT; here->B3SOIPDceeb = Ce1e ; here->B3SOIPDceT = dQe1_dT; here->B3SOIPDcdgb = -(Cgg + Cbg + Csg); here->B3SOIPDcddb = -(Cgd + Cbd + Csd); here->B3SOIPDcdeb = 0; here->B3SOIPDcdT = -(CgT + CbT + CsT) - dQe1_dT; here->B3SOIPDcdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb) + Ce1b; } /* End of if capMod == 2 */ else if (model->B3SOIPDcapMod == 3) { dVgsteff_dVb /= dVbseff_dVb; if (selfheat) { Vfbzb = Vthzb - phi - pParam->B3SOIPDk1eff * sqrtPhi + pParam->B3SOIPDdelvt; dVfbzb_dT = dVthzb_dT; } else { Vfbzb = pParam->B3SOIPDvfbzb + pParam->B3SOIPDdelvt; dVfbzb_dT = 0; } V3 = Vfbzb - Vgs_eff + Vbseff - DELTA_3; if (Vfbzb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfbzb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfbzb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1; if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfbzb_dT; else dVfbeff_dT = 0.0; /* v2.2.3 */ Cox = 3.453133e-11 / (model->B3SOIPDtox - model->B3SOIPDdtoxcv); CoxWL *= model->B3SOIPDtox/ (model->B3SOIPDtox - model->B3SOIPDdtoxcv); CoxWLb *= model->B3SOIPDtox/ (model->B3SOIPDtox - model->B3SOIPDdtoxcv); Tox = 1.0e8 * (model->B3SOIPDtox - model->B3SOIPDdtoxcv); T0 = (Vgs_eff - Vbseff - Vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -1.0 / Tox; tmp = T0 * pParam->B3SOIPDacde; if ((-EXPL_THRESHOLD < tmp) && (tmp < EXPL_THRESHOLD)) { Tcen = pParam->B3SOIPDldeb * exp(tmp); dTcen_dVg = pParam->B3SOIPDacde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; if (selfheat) dTcen_dT = -Tcen * pParam->B3SOIPDacde * dVfbzb_dT / Tox; else dTcen_dT = 0; } else if (tmp <= -EXPL_THRESHOLD) { Tcen = pParam->B3SOIPDldeb * MIN_EXPL; dTcen_dVg = dTcen_dVb = dTcen_dT = 0.0; } else { Tcen = pParam->B3SOIPDldeb * MAX_EXPL; dTcen_dVg = dTcen_dVb = dTcen_dT = 0.0; } LINK = 1.0e-3 * (model->B3SOIPDtox - model->B3SOIPDdtoxcv); /* v2.2.3 */ V3 = pParam->B3SOIPDldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->B3SOIPDldeb); Tcen = pParam->B3SOIPDldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; if (selfheat) dTcen_dT *= T1; else dTcen_dT = 0; Ccen = EPSSI / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; if (selfheat) dCoxeff_dT = T3 * dTcen_dT * (T2 - Coxeff / (Cox + Ccen)); else dCoxeff_dT = 0; CoxWLcenb = CoxWLb * Coxeff / Cox; if (selfheat) dCoxWLcenb_dT = CoxWLb * dCoxeff_dT / Cox; else dCoxWLcenb_dT = 0; Qac0 = CoxWLcenb * (Vfbeff - Vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcenb * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcenb * dVfbeff_dVb + QovCox * dCoxeff_dVb; if (selfheat) dQac0_dT = CoxWLcenb * (dVfbeff_dT - dVfbzb_dT) + dCoxWLcenb_dT * (Vfbeff - Vfbzb); else dQac0_dT = 0.0; T0 = 0.5 * pParam->B3SOIPDk1eff; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B3SOIPDk1eff == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B3SOIPDk1eff; T2 = CoxWLcenb; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcenb * T0 / T1; } Qsub0 = CoxWLcenb * pParam->B3SOIPDk1eff * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + 1 + dVgsteff_dVb) + QovCox * dCoxeff_dVb; if (selfheat) dQsub0_dT = -T2 * (dVfbeff_dT + dVgsteff_dT) + dCoxWLcenb_dT * pParam->B3SOIPDk1eff * (T1 - T0); else dQsub0_dT = 0.0; /* Gate-bias dependent delta Phis begins */ if (pParam->B3SOIPDk1eff <= 0.0) { Denomi = 0.25 * pParam->B3SOIPDmoin * Vtm; T0 = 0.5 * pParam->B3SOIPDsqrtPhi; } else { Denomi = pParam->B3SOIPDmoin * Vtm * pParam->B3SOIPDk1eff * pParam->B3SOIPDk1eff; T0 = pParam->B3SOIPDk1eff * pParam->B3SOIPDsqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); dDeltaPhi_dVd = dDeltaPhi_dVg * dVgsteff_dVd; dDeltaPhi_dVb = dDeltaPhi_dVg * dVgsteff_dVb; /* End of delta Phis */ T3 = 4.0 * (Vth - Vfbzb - phi); Tox += Tox; if ((T0 = (Vgsteff + T3) / Tox) > 1e-20) { tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = -1.9e-9 * T2 / T1 /T1; dTcen_dVd = dTcen_dVg * (4.0 * dVth_dVd + dVgsteff_dVd); dTcen_dVb = dTcen_dVg * (4.0 * dVth_dVb + dVgsteff_dVb); dTcen_dVg *= dVgsteff_dVg; if (selfheat) dTcen_dT = -Tcen * T2 / T1 * (4.0 * (dVth_dT - dVfbzb_dT) + dVgsteff_dT); else dTcen_dT = 0; } else { T0 = 1e-20; tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = 0; dTcen_dVd = 0; dTcen_dVb = 0; dTcen_dT = 0; } Ccen = EPSSI / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; if (selfheat) dCoxeff_dT = T1 * dTcen_dT * (T0 - Coxeff / (Cox + Ccen)); else dCoxeff_dT = 0; CoxWLcen = CoxWL * Coxeff / Cox; CoxWLcenb = CoxWLb * Coxeff / Cox; AbulkCV = Abulk0 * pParam->B3SOIPDabulkCVfactor; dAbulkCV_dVb = pParam->B3SOIPDabulkCVfactor * dAbulk0_dVb; VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; T4 = T3 * ( 1.0 - dDeltaPhi_dVg); dVdseffCV_dVg = T4; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; T0 = AbulkCV * VdseffCV; T1 = Vgsteff - DeltaPhi; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qinv = qgate = qinoi = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * (1.0 - dDeltaPhi_dVg) + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * (1.0 - dDeltaPhi_dVg); T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcenb * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcenb * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcenb * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcenb * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->B3SOIPDxpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * (1.0 - dDeltaPhi_dVg); T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->B3SOIPDxpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * (1.0 - dDeltaPhi_dVg) + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } /* Backgate charge */ CboxWL = pParam->B3SOIPDkb1 * model->B3SOIPDfbody * Cbox * (pParam->B3SOIPDweffCV / here->B3SOIPDnseg * pParam->B3SOIPDleffCVbg + here->B3SOIPDaebcp); Qe1 = CboxWL * (Vesfb - Vbs); Ce1b = dQe1_dVb = -CboxWL; Ce1e = dQe1_dVe = CboxWL; if (selfheat) Ce1T = dQe1_dT = -CboxWL * dvfbb_dT; else Ce1T = dQe1_dT = 0.0; qgate += Qac0 + Qsub0 - qbulk; qbody = qbulk - Qac0 - Qsub0 - Qe1; qsub = Qe1; qdrn = -(qgate + qbody + qsub + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb - Ce1b / dVbseff_dVb; if (selfheat) CbT = Cbg1 * dVgsteff_dT - dQac0_dT - dQsub0_dT - dQe1_dT; else CbT = 0.0; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb - Ce1b / dVbseff_dVb; if (selfheat) CgT = Cgg1 * dVgsteff_dT + dQac0_dT + dQsub0_dT; else CgT = 0.0; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; if (selfheat) CsT = Csg * dVgsteff_dT; else CsT = 0.0; here->B3SOIPDcggb = Cgg; here->B3SOIPDcgsb = -(Cgg + Cgd + Cgb); here->B3SOIPDcgdb = Cgd; here->B3SOIPDcgT = CgT; here->B3SOIPDcbgb = Cbg; here->B3SOIPDcbsb = -(Cbg + Cbd + Cbb) + Ce1e; here->B3SOIPDcbdb = Cbd; here->B3SOIPDcbeb = -Ce1e; here->B3SOIPDcbT = CbT; here->B3SOIPDceT = Ce1T; here->B3SOIPDceeb = Ce1e ; here->B3SOIPDcdgb = -(Cgg + Cbg + Csg); here->B3SOIPDcddb = -(Cgd + Cbd + Csd); here->B3SOIPDcdeb = 0; here->B3SOIPDcdT = -(CgT+CbT+CsT) - Ce1T; here->B3SOIPDcdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb) + Ce1b; here->B3SOIPDqinv = -qinoi; } /* End of if capMod ==3 */ } finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ if (ChargeComputationNeeded) { /* Intrinsic S/D junction charge */ PhiBSWG = model->B3SOIPDGatesidewallJctPotential; dPhiBSWG_dT = -model->B3SOIPDtpbswg; PhiBSWG += dPhiBSWG_dT * (Temp - model->B3SOIPDtnom); MJSWG = model->B3SOIPDbodyJctGateSideGradingCoeff; cjsbs = model->B3SOIPDunitLengthGateSidewallJctCap * wdiosCV * model->B3SOIPDtsi / 1e-7; dcjsbs_dT = cjsbs * model->B3SOIPDtcjswg; cjsbs += dcjsbs_dT * (Temp - model->B3SOIPDtnom); cjdbs = model->B3SOIPDunitLengthGateSidewallJctCap * wdiodCV * model->B3SOIPDtsi / 1e-7; dcjdbs_dT = cjdbs * model->B3SOIPDtcjswg; cjdbs += dcjdbs_dT * (Temp - model->B3SOIPDtnom); DioMax = 0.9 * (PhiBSWG); arg = 1.0 - (Vbs > DioMax ? DioMax : Vbs) / PhiBSWG; if (selfheat) darg_dT = (1 - arg) / PhiBSWG * dPhiBSWG_dT; if (MJSWG == 0.5) { dT3_dVb = 1.0 / sqrt(arg); if (selfheat) ddT3_dVb_dT = -0.5 * dT3_dVb / arg * darg_dT; } else { dT3_dVb = exp(-MJSWG * log(arg)); if (selfheat) ddT3_dVb_dT = -MJSWG * dT3_dVb / arg * darg_dT; } T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (selfheat) dT3_dT = (1.0 - arg * dT3_dVb) * dPhiBSWG_dT / (1.0 - MJSWG) - (arg * ddT3_dVb_dT + darg_dT * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (Vbs > DioMax) T3 += dT3_dVb * (Vbs - DioMax); qjs = cjsbs * T3 + model->B3SOIPDtt * Ibsdif; gcjsbs = cjsbs * dT3_dVb + model->B3SOIPDtt * dIbsdif_dVb; if (selfheat) gcjsT = model->B3SOIPDtt * dIbsdif_dT + dcjsbs_dT * T3 + dT3_dT * cjsbs; else gcjsT = 0.0; arg = 1.0 - (Vbd > DioMax ? DioMax : Vbd) / PhiBSWG; if (selfheat) darg_dT = (1 - arg) / PhiBSWG * dPhiBSWG_dT; if (MJSWG == 0.5) { dT3_dVb = 1.0 / sqrt(arg); if (selfheat) ddT3_dVb_dT = -0.5 * dT3_dVb / arg * darg_dT; } else { dT3_dVb = exp(-MJSWG * log(arg)); if (selfheat) ddT3_dVb_dT = -MJSWG * dT3_dVb / arg * darg_dT; } T3 = (1.0 - arg * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (selfheat) dT3_dT = (1.0 - arg * dT3_dVb) * dPhiBSWG_dT / (1.0 - MJSWG) - (arg * ddT3_dVb_dT + darg_dT * dT3_dVb) * PhiBSWG / (1.0 - MJSWG); if (Vbd > DioMax) T3 += dT3_dVb * (Vbd - DioMax); dT3_dVd = -dT3_dVb; qjd = cjdbs * T3 + model->B3SOIPDtt * Ibddif; gcjdbs = cjdbs * dT3_dVb + model->B3SOIPDtt * dIbddif_dVb; gcjdds = cjdbs * dT3_dVd + model->B3SOIPDtt * dIbddif_dVd; if (selfheat) gcjdT = model->B3SOIPDtt * dIbddif_dT + dcjdbs_dT * T3 + dT3_dT * cjdbs; else gcjdT = 0.0; qdrn -= qjd; qbody += (qjs + qjd); qsrc = -(qgate + qbody + qdrn + qsub); /* Update the conductance */ here->B3SOIPDcddb -= gcjdds; here->B3SOIPDcdT -= gcjdT; here->B3SOIPDcdsb += gcjdds + gcjdbs; here->B3SOIPDcbdb += (gcjdds); here->B3SOIPDcbT += (gcjdT + gcjsT); here->B3SOIPDcbsb -= (gcjdds + gcjdbs + gcjsbs); /* Extrinsic Bottom S/D to substrate charge */ T10 = -model->B3SOIPDtype * ves; /* T10 is vse without type conversion */ T11 = model->B3SOIPDtype * (vds - ves); /* T11 is vde without type conversion */ if (model->B3SOIPDcsdmin != 0.0) { if ( ((pParam->B3SOIPDnsub > 0) && (model->B3SOIPDtype > 0)) || ((pParam->B3SOIPDnsub < 0) && (model->B3SOIPDtype < 0)) ) { if (T10 < pParam->B3SOIPDvsdfb) { here->B3SOIPDqse = here->B3SOIPDcsbox * (T10 - pParam->B3SOIPDvsdfb); here->B3SOIPDgcse = here->B3SOIPDcsbox; } else if (T10 < pParam->B3SOIPDsdt1) { T0 = T10 - pParam->B3SOIPDvsdfb; T1 = T0 * T0; here->B3SOIPDqse = T0 * (here->B3SOIPDcsbox - pParam->B3SOIPDst2 / 3 * T1) ; here->B3SOIPDgcse = here->B3SOIPDcsbox - pParam->B3SOIPDst2 * T1; } else if (T10 < pParam->B3SOIPDvsdth) { T0 = T10 - pParam->B3SOIPDvsdth; T1 = T0 * T0; here->B3SOIPDqse = here->B3SOIPDcsmin * T10 + here->B3SOIPDst4 + pParam->B3SOIPDst3 / 3 * T0 * T1; here->B3SOIPDgcse = here->B3SOIPDcsmin + pParam->B3SOIPDst3 * T1; } else { here->B3SOIPDqse = here->B3SOIPDcsmin * T10 + here->B3SOIPDst4; here->B3SOIPDgcse = here->B3SOIPDcsmin; } } else { if (T10 < pParam->B3SOIPDvsdth) { here->B3SOIPDqse = here->B3SOIPDcsmin * (T10 - pParam->B3SOIPDvsdth); here->B3SOIPDgcse = here->B3SOIPDcsmin; } else if (T10 < pParam->B3SOIPDsdt1) { T0 = T10 - pParam->B3SOIPDvsdth; T1 = T0 * T0; here->B3SOIPDqse = T0 * (here->B3SOIPDcsmin - pParam->B3SOIPDst2 / 3 * T1) ; here->B3SOIPDgcse = here->B3SOIPDcsmin - pParam->B3SOIPDst2 * T1; } else if (T10 < pParam->B3SOIPDvsdfb) { T0 = T10 - pParam->B3SOIPDvsdfb; T1 = T0 * T0; here->B3SOIPDqse = here->B3SOIPDcsbox * T10 + here->B3SOIPDst4 + pParam->B3SOIPDst3 / 3 * T0 * T1; here->B3SOIPDgcse = here->B3SOIPDcsbox + pParam->B3SOIPDst3 * T1; } else { here->B3SOIPDqse = here->B3SOIPDcsbox * T10 + here->B3SOIPDst4; here->B3SOIPDgcse = here->B3SOIPDcsbox; } } if ( ((pParam->B3SOIPDnsub > 0) && (model->B3SOIPDtype > 0)) || ((pParam->B3SOIPDnsub < 0) && (model->B3SOIPDtype < 0)) ) { if (T11 < pParam->B3SOIPDvsdfb) { here->B3SOIPDqde = here->B3SOIPDcdbox * (T11 - pParam->B3SOIPDvsdfb); here->B3SOIPDgcde = here->B3SOIPDcdbox; } else if (T11 < pParam->B3SOIPDsdt1) { T0 = T11 - pParam->B3SOIPDvsdfb; T1 = T0 * T0; here->B3SOIPDqde = T0 * (here->B3SOIPDcdbox - pParam->B3SOIPDdt2 / 3 * T1) ; here->B3SOIPDgcde = here->B3SOIPDcdbox - pParam->B3SOIPDdt2 * T1; } else if (T11 < pParam->B3SOIPDvsdth) { T0 = T11 - pParam->B3SOIPDvsdth; T1 = T0 * T0; here->B3SOIPDqde = here->B3SOIPDcdmin * T11 + here->B3SOIPDdt4 + pParam->B3SOIPDdt3 / 3 * T0 * T1; here->B3SOIPDgcde = here->B3SOIPDcdmin + pParam->B3SOIPDdt3 * T1; } else { here->B3SOIPDqde = here->B3SOIPDcdmin * T11 + here->B3SOIPDdt4; here->B3SOIPDgcde = here->B3SOIPDcdmin; } } else { if (T11 < pParam->B3SOIPDvsdth) { here->B3SOIPDqde = here->B3SOIPDcdmin * (T11 - pParam->B3SOIPDvsdth); here->B3SOIPDgcde = here->B3SOIPDcdmin; } else if (T11 < pParam->B3SOIPDsdt1) { T0 = T11 - pParam->B3SOIPDvsdth; T1 = T0 * T0; here->B3SOIPDqde = T0 * (here->B3SOIPDcdmin - pParam->B3SOIPDdt2 / 3 * T1) ; here->B3SOIPDgcde = here->B3SOIPDcdmin - pParam->B3SOIPDdt2 * T1; } else if (T11 < pParam->B3SOIPDvsdfb) { T0 = T11 - pParam->B3SOIPDvsdfb; T1 = T0 * T0; here->B3SOIPDqde = here->B3SOIPDcdbox * T11 + here->B3SOIPDdt4 + pParam->B3SOIPDdt3 / 3 * T0 * T1; here->B3SOIPDgcde = here->B3SOIPDcdbox + pParam->B3SOIPDdt3 * T1; } else { here->B3SOIPDqde = here->B3SOIPDcdbox * T11 + here->B3SOIPDdt4; here->B3SOIPDgcde = here->B3SOIPDcdbox; } } } else { here->B3SOIPDqse = here->B3SOIPDcsbox * T10; here->B3SOIPDgcse = here->B3SOIPDcsbox; here->B3SOIPDqde = here->B3SOIPDcdbox * T11; here->B3SOIPDgcde = here->B3SOIPDcdbox; } /* Extrinsic : Sidewall fringing S/D charge */ here->B3SOIPDqse += here->B3SOIPDcsesw * T10; here->B3SOIPDgcse += here->B3SOIPDcsesw; here->B3SOIPDqde += here->B3SOIPDcdesw * T11; here->B3SOIPDgcde += here->B3SOIPDcdesw; /* All charge are mutliplied with type at the end, but qse and qde have true polarity => so pre-mutliplied with type */ here->B3SOIPDqse *= model->B3SOIPDtype; here->B3SOIPDqde *= model->B3SOIPDtype; } here->B3SOIPDcbb = Cbb; here->B3SOIPDcbd = Cbd; here->B3SOIPDcbg = Cbg; here->B3SOIPDqbf = -Qsub0 - Qac0; here->B3SOIPDqjs = qjs; here->B3SOIPDqjd = qjd; /* * check convergence */ if ((here->B3SOIPDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; } } *(ckt->CKTstate0 + here->B3SOIPDvg) = vg; *(ckt->CKTstate0 + here->B3SOIPDvd) = vd; *(ckt->CKTstate0 + here->B3SOIPDvs) = vs; *(ckt->CKTstate0 + here->B3SOIPDvp) = vp; *(ckt->CKTstate0 + here->B3SOIPDve) = ve; *(ckt->CKTstate0 + here->B3SOIPDvbs) = vbs; *(ckt->CKTstate0 + here->B3SOIPDvbd) = vbd; *(ckt->CKTstate0 + here->B3SOIPDvgs) = vgs; *(ckt->CKTstate0 + here->B3SOIPDvds) = vds; *(ckt->CKTstate0 + here->B3SOIPDves) = ves; *(ckt->CKTstate0 + here->B3SOIPDvps) = vps; *(ckt->CKTstate0 + here->B3SOIPDdeltemp) = delTemp; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); /* v2.2.3 bug fix */ T3 = pParam->B3SOIPDwdiodCV * pParam->B3SOIPDcgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIPDckappa); cgdo = pParam->B3SOIPDcgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->B3SOIPDcgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->B3SOIPDckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); /* v2.2.3 bug fix */ T3 = pParam->B3SOIPDwdiosCV * pParam->B3SOIPDcgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIPDckappa); cgso = pParam->B3SOIPDcgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->B3SOIPDcgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->B3SOIPDckappa * (T4 - 1.0)); if (here->B3SOIPDdebugMod < 0) goto line850; if (here->B3SOIPDmode > 0) { gcdgb = (here->B3SOIPDcdgb - cgdo) * ag0; gcddb = (here->B3SOIPDcddb + cgdo + here->B3SOIPDgcde) * ag0; gcdsb = here->B3SOIPDcdsb * ag0; gcdeb = (here->B3SOIPDcdeb - here->B3SOIPDgcde) * ag0; gcdT = model->B3SOIPDtype * here->B3SOIPDcdT * ag0; gcsgb = -(here->B3SOIPDcggb + here->B3SOIPDcbgb + here->B3SOIPDcdgb + cgso) * ag0; gcsdb = -(here->B3SOIPDcgdb + here->B3SOIPDcbdb + here->B3SOIPDcddb) * ag0; gcssb = (cgso + here->B3SOIPDgcse - (here->B3SOIPDcgsb + here->B3SOIPDcbsb + here->B3SOIPDcdsb)) * ag0; gcseb = -(here->B3SOIPDgcse + here->B3SOIPDcbeb + here->B3SOIPDcdeb + here->B3SOIPDceeb) * ag0; gcsT = - model->B3SOIPDtype * (here->B3SOIPDcgT + here->B3SOIPDcbT + here->B3SOIPDcdT + here->B3SOIPDceT) * ag0; gcggb = (here->B3SOIPDcggb + cgdo + cgso + pParam->B3SOIPDcgeo) * ag0; gcgdb = (here->B3SOIPDcgdb - cgdo) * ag0; gcgsb = (here->B3SOIPDcgsb - cgso) * ag0; gcgeb = (- pParam->B3SOIPDcgeo) * ag0; gcgT = model->B3SOIPDtype * here->B3SOIPDcgT * ag0; gcbgb = here->B3SOIPDcbgb * ag0; gcbdb = here->B3SOIPDcbdb * ag0; gcbsb = here->B3SOIPDcbsb * ag0; gcbeb = here->B3SOIPDcbeb * ag0; gcbT = model->B3SOIPDtype * here->B3SOIPDcbT * ag0; gcegb = (- pParam->B3SOIPDcgeo) * ag0; gcedb = (- here->B3SOIPDgcde) * ag0; gcesb = (- here->B3SOIPDgcse) * ag0; gceeb = (here->B3SOIPDgcse + here->B3SOIPDgcde + here->B3SOIPDceeb + pParam->B3SOIPDcgeo) * ag0; gceT = model->B3SOIPDtype * here->B3SOIPDceT * ag0; gcTt = pParam->B3SOIPDcth * ag0; sxpart = 0.6; dxpart = 0.4; /* Lump the overlap capacitance and S/D parasitics */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIPDcgeo * vge; qgate += qgd + qgs + qge; qdrn += here->B3SOIPDqde - qgd; qsub -= qge + here->B3SOIPDqse + here->B3SOIPDqde; qsrc = -(qgate + qbody + qdrn + qsub); } else { gcsgb = (here->B3SOIPDcdgb - cgso) * ag0; gcssb = (here->B3SOIPDcddb + cgso + here->B3SOIPDgcse) * ag0; gcsdb = here->B3SOIPDcdsb * ag0; gcseb = (here->B3SOIPDcdeb - here->B3SOIPDgcse) * ag0; gcsT = model->B3SOIPDtype * here->B3SOIPDcdT * ag0; gcdgb = -(here->B3SOIPDcggb + here->B3SOIPDcbgb + here->B3SOIPDcdgb + cgdo) * ag0; gcdsb = -(here->B3SOIPDcgdb + here->B3SOIPDcbdb + here->B3SOIPDcddb) * ag0; gcddb = (cgdo + here->B3SOIPDgcde - (here->B3SOIPDcgsb + here->B3SOIPDcbsb + here->B3SOIPDcdsb)) * ag0; gcdeb = -(here->B3SOIPDgcde + here->B3SOIPDcbeb + here->B3SOIPDcdeb + here->B3SOIPDceeb) * ag0; gcdT = - model->B3SOIPDtype * (here->B3SOIPDcgT + here->B3SOIPDcbT + here->B3SOIPDcdT + here->B3SOIPDceT) * ag0; gcggb = (here->B3SOIPDcggb + cgdo + cgso + pParam->B3SOIPDcgeo) * ag0; gcgsb = (here->B3SOIPDcgdb - cgso) * ag0; gcgdb = (here->B3SOIPDcgsb - cgdo) * ag0; gcgeb = (- pParam->B3SOIPDcgeo) * ag0; gcgT = model->B3SOIPDtype * here->B3SOIPDcgT * ag0; gcbgb = here->B3SOIPDcbgb * ag0; gcbsb = here->B3SOIPDcbdb * ag0; gcbdb = here->B3SOIPDcbsb * ag0; gcbeb = here->B3SOIPDcbeb * ag0; gcbT = model->B3SOIPDtype * here->B3SOIPDcbT * ag0; gcegb = (-pParam->B3SOIPDcgeo) * ag0; gcesb = (- here->B3SOIPDgcse) * ag0; gcedb = (- here->B3SOIPDgcde) * ag0; gceeb = (here->B3SOIPDceeb + pParam->B3SOIPDcgeo + here->B3SOIPDgcse + here->B3SOIPDgcde) * ag0; gceT = model->B3SOIPDtype * here->B3SOIPDceT * ag0; gcTt = pParam->B3SOIPDcth * ag0; dxpart = 0.6; sxpart = 0.4; /* Lump the overlap capacitance */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIPDcgeo * vge; qgate += qgd + qgs + qge; qsrc = qdrn - qgs + here->B3SOIPDqse; qsub -= qge + here->B3SOIPDqse + here->B3SOIPDqde; qdrn = -(qgate + qbody + qsrc + qsub); } here->B3SOIPDcgdo = cgdo; here->B3SOIPDcgso = cgso; if (ByPass) goto line860; *(ckt->CKTstate0 + here->B3SOIPDqe) = qsub; *(ckt->CKTstate0 + here->B3SOIPDqg) = qgate; *(ckt->CKTstate0 + here->B3SOIPDqd) = qdrn; *(ckt->CKTstate0 + here->B3SOIPDqb) = qbody; if ((model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0!=0.0)) *(ckt->CKTstate0 + here->B3SOIPDqth) = pParam->B3SOIPDcth * delTemp; /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIPDqb) = *(ckt->CKTstate0 + here->B3SOIPDqb); *(ckt->CKTstate1 + here->B3SOIPDqg) = *(ckt->CKTstate0 + here->B3SOIPDqg); *(ckt->CKTstate1 + here->B3SOIPDqd) = *(ckt->CKTstate0 + here->B3SOIPDqd); *(ckt->CKTstate1 + here->B3SOIPDqe) = *(ckt->CKTstate0 + here->B3SOIPDqe); *(ckt->CKTstate1 + here->B3SOIPDqth) = *(ckt->CKTstate0 + here->B3SOIPDqth); } error = NIintegrate(ckt, &geq, &ceq,0.0,here->B3SOIPDqb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIPDqg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIPDqd); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIPDqe); if (error) return(error); if ((model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0!=0.0)) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIPDqth); if (error) return (error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqe = ceqqg = ceqqb = ceqqd = ceqqth= 0.0; gcdgb = gcddb = gcdsb = gcdeb = gcdT = 0.0; gcsgb = gcsdb = gcssb = gcseb = gcsT = 0.0; gcggb = gcgdb = gcgsb = gcgeb = gcgT = 0.0; gcbgb = gcbdb = gcbsb = gcbeb = gcbT = 0.0; gcegb = gcedb = gceeb = gcesb = gceT = 0.0; gcTt = 0.0; sxpart = (1.0 - (dxpart = (here->B3SOIPDmode > 0) ? 0.4 : 0.6)); goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B3SOIPDcqg); cqbody = *(ckt->CKTstate0 + here->B3SOIPDcqb); cqdrn = *(ckt->CKTstate0 + here->B3SOIPDcqd); cqsub = *(ckt->CKTstate0 + here->B3SOIPDcqe); cqtemp = *(ckt->CKTstate0 + here->B3SOIPDcqth); here->B3SOIPDcb += cqbody; here->B3SOIPDcd += cqdrn; ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs - gcgeb * veb - gcgT * delTemp; ceqqb = cqbody - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs - gcbeb * veb - gcbT * delTemp; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs - gcdeb * veb - gcdT * delTemp; ceqqe = cqsub - gcegb * vgb + gcedb * vbd + gcesb * vbs - gceeb * veb - gceT * delTemp;; ceqqth = cqtemp - gcTt * delTemp; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIPDcqe) = *(ckt->CKTstate0 + here->B3SOIPDcqe); *(ckt->CKTstate1 + here->B3SOIPDcqb) = *(ckt->CKTstate0 + here->B3SOIPDcqb); *(ckt->CKTstate1 + here->B3SOIPDcqg) = *(ckt->CKTstate0 + here->B3SOIPDcqg); *(ckt->CKTstate1 + here->B3SOIPDcqd) = *(ckt->CKTstate0 + here->B3SOIPDcqd); *(ckt->CKTstate1 + here->B3SOIPDcqth) = *(ckt->CKTstate0 + here->B3SOIPDcqth); } /* * load current vector */ line900: m = here->B3SOIPDm; if (here->B3SOIPDmode >= 0) { Gm = here->B3SOIPDgm; Gmbs = here->B3SOIPDgmbs; GmT = model->B3SOIPDtype * here->B3SOIPDgmT; FwdSum = Gm + Gmbs; RevSum = 0.0; /* v2.2.2 bug fix */ cdreq = model->B3SOIPDtype * (here->B3SOIPDcdrain - here->B3SOIPDgds * vds - Gm * vgs - Gmbs * vbs) - GmT * delTemp; /* ceqbs now is compatible with cdreq, ie. going in is +ve */ /* Equivalent current source from the diode */ ceqbs = here->B3SOIPDcjs; ceqbd = here->B3SOIPDcjd; /* Current going in is +ve */ ceqbody = -here->B3SOIPDcbody; ceqgate = here->B3SOIPDcgate; gigg = here->B3SOIPDgigg; gigb = here->B3SOIPDgigb; gigs = here->B3SOIPDgigs; gigd = here->B3SOIPDgigd; gigT = model->B3SOIPDtype * here->B3SOIPDgigT; ceqth = here->B3SOIPDcth; ceqbodcon = here->B3SOIPDcbodcon; gbbg = -here->B3SOIPDgbgs; gbbdp = -here->B3SOIPDgbds; gbbb = -here->B3SOIPDgbbs; gbbp = -here->B3SOIPDgbps; gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbp); gddpg = -here->B3SOIPDgjdg; gddpdp = -here->B3SOIPDgjdd; gddpb = -here->B3SOIPDgjdb; gddpT = -model->B3SOIPDtype * here->B3SOIPDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb); gsspg = -here->B3SOIPDgjsg; gsspdp = -here->B3SOIPDgjsd; gsspb = -here->B3SOIPDgjsb; gsspT = -model->B3SOIPDtype * here->B3SOIPDgjsT; gsspsp = - (gsspg + gsspdp + gsspb ); gppb = -here->B3SOIPDgbpbs; gppp = -here->B3SOIPDgbpps; gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT; gTtg = here->B3SOIPDgtempg; gTtb = here->B3SOIPDgtempb; gTtdp = here->B3SOIPDgtempd; gTtt = here->B3SOIPDgtempT; gTtsp = - (gTtg + gTtb + gTtdp); } else { Gm = -here->B3SOIPDgm; Gmbs = -here->B3SOIPDgmbs; GmT = -model->B3SOIPDtype * here->B3SOIPDgmT; FwdSum = 0.0; RevSum = -(Gm + Gmbs); /* v2.2.2 bug fix */ cdreq = -model->B3SOIPDtype * (here->B3SOIPDcdrain + here->B3SOIPDgds*vds + Gm * vgd + Gmbs * vbd) + GmT * delTemp; ceqbs = here->B3SOIPDcjd; ceqbd = here->B3SOIPDcjs; /* Current going in is +ve */ ceqbody = -here->B3SOIPDcbody; ceqgate = here->B3SOIPDcgate; gigg = here->B3SOIPDgigg; gigb = here->B3SOIPDgigb; gigs = here->B3SOIPDgigd; gigd = here->B3SOIPDgigs; gigT = model->B3SOIPDtype * here->B3SOIPDgigT; ceqth = here->B3SOIPDcth; ceqbodcon = here->B3SOIPDcbodcon; gbbg = -here->B3SOIPDgbgs; gbbb = -here->B3SOIPDgbbs; gbbp = -here->B3SOIPDgbps; gbbsp = -here->B3SOIPDgbds; gbbT = -model->B3SOIPDtype * here->B3SOIPDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbp); gddpg = -here->B3SOIPDgjsg; gddpsp = -here->B3SOIPDgjsd; gddpb = -here->B3SOIPDgjsb; gddpT = -model->B3SOIPDtype * here->B3SOIPDgjsT; gddpdp = - (gddpg + gddpsp + gddpb ); gsspg = -here->B3SOIPDgjdg; gsspsp = -here->B3SOIPDgjdd; gsspb = -here->B3SOIPDgjdb; gsspT = -model->B3SOIPDtype * here->B3SOIPDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb ); gppb = -here->B3SOIPDgbpbs; gppp = -here->B3SOIPDgbpps; gppT = -model->B3SOIPDtype * here->B3SOIPDgbpT; gTtg = here->B3SOIPDgtempg; gTtb = here->B3SOIPDgtempb; gTtsp = here->B3SOIPDgtempd; gTtt = here->B3SOIPDgtempT; gTtdp = - (gTtg + gTtb + gTtsp); } if (model->B3SOIPDtype > 0) { ceqqg = ceqqg; ceqqb = ceqqb; ceqqe = ceqqe; ceqqd = ceqqd; } else { ceqbodcon = -ceqbodcon; ceqbody = -ceqbody; ceqgate = -ceqgate; ceqbs = -ceqbs; ceqbd = -ceqbd; ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; ceqqe = -ceqqe; } (*(ckt->CKTrhs + here->B3SOIPDbNode) -= m * (ceqbody + ceqqb)); (*(ckt->CKTrhs + here->B3SOIPDgNode) -= m * (ceqgate + ceqqg)); (*(ckt->CKTrhs + here->B3SOIPDdNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->B3SOIPDsNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe)); (*(ckt->CKTrhs + here->B3SOIPDeNode) -= m * ceqqe); if (here->B3SOIPDbodyMod == 1) { (*(ckt->CKTrhs + here->B3SOIPDpNode) += m * ceqbodcon); } if (selfheat) { (*(ckt->CKTrhs + here->B3SOIPDtempNode) -= m * (ceqth + ceqqth)); } if (here->B3SOIPDdebugMod != 0) { *(ckt->CKTrhs + here->B3SOIPDvbsNode) = here->B3SOIPDvbseff; *(ckt->CKTrhs + here->B3SOIPDidsNode) = FLOG(here->B3SOIPDids); *(ckt->CKTrhs + here->B3SOIPDicNode) = FLOG(here->B3SOIPDic); *(ckt->CKTrhs + here->B3SOIPDibsNode) = FLOG(here->B3SOIPDibs); *(ckt->CKTrhs + here->B3SOIPDibdNode) = FLOG(here->B3SOIPDibd); *(ckt->CKTrhs + here->B3SOIPDiiiNode) = FLOG(here->B3SOIPDiii); *(ckt->CKTrhs + here->B3SOIPDigNode) = here->B3SOIPDig; *(ckt->CKTrhs + here->B3SOIPDgiggNode) = here->B3SOIPDgigg; *(ckt->CKTrhs + here->B3SOIPDgigdNode) = here->B3SOIPDgigd; *(ckt->CKTrhs + here->B3SOIPDgigbNode) = here->B3SOIPDgigb; *(ckt->CKTrhs + here->B3SOIPDigidlNode) = here->B3SOIPDigidl; *(ckt->CKTrhs + here->B3SOIPDitunNode) = here->B3SOIPDitun; *(ckt->CKTrhs + here->B3SOIPDibpNode) = here->B3SOIPDibp; *(ckt->CKTrhs + here->B3SOIPDcbbNode) = here->B3SOIPDcbb; *(ckt->CKTrhs + here->B3SOIPDcbdNode) = here->B3SOIPDcbd; *(ckt->CKTrhs + here->B3SOIPDcbgNode) = here->B3SOIPDcbg; *(ckt->CKTrhs + here->B3SOIPDqbfNode) = here->B3SOIPDqbf; *(ckt->CKTrhs + here->B3SOIPDqjsNode) = here->B3SOIPDqjs; *(ckt->CKTrhs + here->B3SOIPDqjdNode) = here->B3SOIPDqjd; } /* * load y matrix */ Gmin = ckt->CKTgmin * 1e-6; *(here->B3SOIPDEdpPtr) += m * gcedb; *(here->B3SOIPDEspPtr) += m * gcesb; *(here->B3SOIPDDPePtr) += m * gcdeb; *(here->B3SOIPDSPePtr) += m * gcseb; *(here->B3SOIPDEgPtr) += m * gcegb; *(here->B3SOIPDGePtr) += m * gcgeb; (*(here->B3SOIPDEbPtr) -= m * (gcegb + gcedb + gcesb + gceeb)); (*(here->B3SOIPDGbPtr) -= m * (-gigb + gcggb + gcgdb + gcgsb + gcgeb)); (*(here->B3SOIPDDPbPtr) -= m * (-gddpb - Gmbs + gcdgb + gcddb + gcdeb + gcdsb)); (*(here->B3SOIPDSPbPtr) -= m * (-gsspb + Gmbs + gcsgb + gcsdb + gcseb + gcssb + Gmin)); (*(here->B3SOIPDBePtr) += m * gcbeb); (*(here->B3SOIPDBgPtr) += m * (-gigg + gcbgb + gbbg)); (*(here->B3SOIPDBdpPtr) += (-gigd + gcbdb + gbbdp)); (*(here->B3SOIPDBspPtr) += m * (gcbsb + gbbsp - Gmin - gigs)); (*(here->B3SOIPDBbPtr) += m * (-gigb + gbbb - gcbgb - gcbdb - gcbsb - gcbeb + Gmin)); (*(here->B3SOIPDEePtr) += m * gceeb); (*(here->B3SOIPDGgPtr) += m * (gigg + gcggb + ckt->CKTgmin)); (*(here->B3SOIPDGdpPtr) += m * (gigd + gcgdb - ckt->CKTgmin)); (*(here->B3SOIPDGspPtr) += m * (gcgsb + gigs)); (*(here->B3SOIPDDPgPtr) += m * ((Gm + gcdgb) + gddpg - ckt->CKTgmin)); (*(here->B3SOIPDDPdpPtr) += m * ((here->B3SOIPDdrainConductance + here->B3SOIPDgds + gddpdp + RevSum + gcddb) + ckt->CKTgmin)); (*(here->B3SOIPDDPspPtr) -= m * (-gddpsp + here->B3SOIPDgds + FwdSum - gcdsb)); (*(here->B3SOIPDDPdPtr) -= m * here->B3SOIPDdrainConductance); (*(here->B3SOIPDSPgPtr) += m * (gcsgb - Gm + gsspg)); (*(here->B3SOIPDSPdpPtr) -= m * (here->B3SOIPDgds - gsspdp + RevSum - gcsdb)); (*(here->B3SOIPDSPspPtr) += m * (here->B3SOIPDsourceConductance + here->B3SOIPDgds + gsspsp + FwdSum + gcssb + Gmin)); (*(here->B3SOIPDSPsPtr) -= m * here->B3SOIPDsourceConductance); (*(here->B3SOIPDDdPtr) += m * here->B3SOIPDdrainConductance); (*(here->B3SOIPDDdpPtr) -= m * here->B3SOIPDdrainConductance); (*(here->B3SOIPDSsPtr) += m * here->B3SOIPDsourceConductance); (*(here->B3SOIPDSspPtr) -= m * here->B3SOIPDsourceConductance); if (here->B3SOIPDbodyMod == 1) { (*(here->B3SOIPDBpPtr) -= m * gppp); (*(here->B3SOIPDPbPtr) += m * gppb); (*(here->B3SOIPDPpPtr) += m * gppp); } if (selfheat) { (*(here->B3SOIPDDPtempPtr) += m * (GmT + gddpT + gcdT)); (*(here->B3SOIPDSPtempPtr) += m * (-GmT + gsspT + gcsT)); (*(here->B3SOIPDBtempPtr) += m * (gbbT + gcbT - gigT)); (*(here->B3SOIPDEtempPtr) += m * gceT); (*(here->B3SOIPDGtempPtr) += m * (gcgT + gigT)); (*(here->B3SOIPDTemptempPtr) += m * (gTtt + 1/pParam->B3SOIPDrth + gcTt)); (*(here->B3SOIPDTempgPtr) += m * gTtg); (*(here->B3SOIPDTempbPtr) += m * gTtb); (*(here->B3SOIPDTempdpPtr) += m * gTtdp); (*(here->B3SOIPDTempspPtr) += m * gTtsp); } if (here->B3SOIPDdebugMod != 0) { *(here->B3SOIPDVbsPtr) += m * 1; *(here->B3SOIPDIdsPtr) += m * 1; *(here->B3SOIPDIcPtr) += m * 1; *(here->B3SOIPDIbsPtr) += m * 1; *(here->B3SOIPDIbdPtr) += m * 1; *(here->B3SOIPDIiiPtr) += m * 1; *(here->B3SOIPDIgPtr) += m * 1; *(here->B3SOIPDGiggPtr) += m * 1; *(here->B3SOIPDGigdPtr) += m * 1; *(here->B3SOIPDGigbPtr) += m * 1; *(here->B3SOIPDIgidlPtr) += m * 1; *(here->B3SOIPDItunPtr) += m * 1; *(here->B3SOIPDIbpPtr) += m * 1; *(here->B3SOIPDCbgPtr) += m * 1; *(here->B3SOIPDCbbPtr) += m * 1; *(here->B3SOIPDCbdPtr) += m * 1; *(here->B3SOIPDQbfPtr) += m * 1; *(here->B3SOIPDQjsPtr) += m * 1; *(here->B3SOIPDQjdPtr) += m * 1; } line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdinit.h0000644000265600020320000000042312264261473023046 0ustar andreasadmin#ifndef _B3SOIPDINIT_H #define _B3SOIPDINIT_H extern IFparm B3SOIPDpTable[]; extern IFparm B3SOIPDmPTable[]; extern char *B3SOIPDnames[]; extern int B3SOIPDpTSize; extern int B3SOIPDmPTSize; extern int B3SOIPDnSize; extern int B3SOIPDiSize; extern int B3SOIPDmSize; #endif ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipditf.h0000644000265600020320000000037712264261473022675 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soipditf.h **********/ #ifndef DEV_B3SOIPD #define DEV_B3SOIPD #include "b3soipdext.h" SPICEdev *get_b3soipd_info (void); #endif ngspice-26/src/spicelib/devices/bsim3soi_pd/ChangeLog0000644000265600020320000000010012264261473022210 0ustar andreasadmin2000-11-14 Paolo Nenzi * Initial release ngspice-26/src/spicelib/devices/bsim3soi_pd/BsimTerms_use0000644000265600020320000000247312264261473023161 0ustar andreasadminThe terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsim3soi_pd/Makefile.am0000644000265600020320000000121412264261473022501 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3soipd.la libbsim3soipd_la_SOURCES = \ b3soipd.c \ b3soipdacld.c \ b3soipdask.c \ b3soipdcheck.c \ b3soipdcvtest.c \ b3soipddel.c \ b3soipddest.c \ b3soipdgetic.c \ b3soipdld.c \ b3soipdmask.c \ b3soipdmdel.c \ b3soipdmpar.c \ b3soipdnoi.c \ b3soipdpar.c \ b3soipdpzld.c \ b3soipdset.c \ b3soipdtemp.c \ b3soipdtrunc.c \ b3soipddef.h \ b3soipdext.h \ b3soipdinit.c \ b3soipdinit.h \ b3soipditf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use ngspice-26/src/spicelib/devices/bsim3soi_pd/Makefile.in0000644000265600020320000004374512264261535022530 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3soi_pd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3soipd_la_LIBADD = am_libbsim3soipd_la_OBJECTS = b3soipd.lo b3soipdacld.lo b3soipdask.lo \ b3soipdcheck.lo b3soipdcvtest.lo b3soipddel.lo b3soipddest.lo \ b3soipdgetic.lo b3soipdld.lo b3soipdmask.lo b3soipdmdel.lo \ b3soipdmpar.lo b3soipdnoi.lo b3soipdpar.lo b3soipdpzld.lo \ b3soipdset.lo b3soipdtemp.lo b3soipdtrunc.lo b3soipdinit.lo libbsim3soipd_la_OBJECTS = $(am_libbsim3soipd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3soipd_la_SOURCES) DIST_SOURCES = $(libbsim3soipd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3soipd.la libbsim3soipd_la_SOURCES = \ b3soipd.c \ b3soipdacld.c \ b3soipdask.c \ b3soipdcheck.c \ b3soipdcvtest.c \ b3soipddel.c \ b3soipddest.c \ b3soipdgetic.c \ b3soipdld.c \ b3soipdmask.c \ b3soipdmdel.c \ b3soipdmpar.c \ b3soipdnoi.c \ b3soipdpar.c \ b3soipdpzld.c \ b3soipdset.c \ b3soipdtemp.c \ b3soipdtrunc.c \ b3soipddef.h \ b3soipdext.h \ b3soipdinit.c \ b3soipdinit.h \ b3soipditf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_pd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_pd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3soipd.la: $(libbsim3soipd_la_OBJECTS) $(libbsim3soipd_la_DEPENDENCIES) $(EXTRA_libbsim3soipd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3soipd_la_OBJECTS) $(libbsim3soipd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdcvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipddel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipddest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdnoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soipdtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdgetic.c0000644000265600020320000000311312264261473023170 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdgetic.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDgetic(GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; for (; model ; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) { if(!here->B3SOIPDicVBSGiven) { here->B3SOIPDicVBS = *(ckt->CKTrhs + here->B3SOIPDbNode) - *(ckt->CKTrhs + here->B3SOIPDsNode); } if (!here->B3SOIPDicVDSGiven) { here->B3SOIPDicVDS = *(ckt->CKTrhs + here->B3SOIPDdNode) - *(ckt->CKTrhs + here->B3SOIPDsNode); } if (!here->B3SOIPDicVGSGiven) { here->B3SOIPDicVGS = *(ckt->CKTrhs + here->B3SOIPDgNode) - *(ckt->CKTrhs + here->B3SOIPDsNode); } if (!here->B3SOIPDicVESGiven) { here->B3SOIPDicVES = *(ckt->CKTrhs + here->B3SOIPDeNode) - *(ckt->CKTrhs + here->B3SOIPDsNode); } if (!here->B3SOIPDicVPSGiven) { here->B3SOIPDicVPS = *(ckt->CKTrhs + here->B3SOIPDpNode) - *(ckt->CKTrhs + here->B3SOIPDsNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdask.c0000644000265600020320000002174412264261473022665 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdask.c 98/5/01 Modified by Pin Su 99/4/30 Modified by Pin Su 01/2/15 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B3SOIPDinstance *here = (B3SOIPDinstance*)inst; NG_IGNORE(select); switch(which) { case B3SOIPD_L: value->rValue = here->B3SOIPDl; return(OK); case B3SOIPD_W: value->rValue = here->B3SOIPDw; return(OK); case B3SOIPD_M: value->rValue = here->B3SOIPDm; return(OK); case B3SOIPD_AS: value->rValue = here->B3SOIPDsourceArea; return(OK); case B3SOIPD_AD: value->rValue = here->B3SOIPDdrainArea; return(OK); case B3SOIPD_PS: value->rValue = here->B3SOIPDsourcePerimeter; return(OK); case B3SOIPD_PD: value->rValue = here->B3SOIPDdrainPerimeter; return(OK); case B3SOIPD_NRS: value->rValue = here->B3SOIPDsourceSquares; return(OK); case B3SOIPD_NRD: value->rValue = here->B3SOIPDdrainSquares; return(OK); case B3SOIPD_OFF: value->iValue = here->B3SOIPDoff; return(OK); case B3SOIPD_BJTOFF: value->iValue = here->B3SOIPDbjtoff; return(OK); case B3SOIPD_RTH0: value->rValue = here->B3SOIPDrth0; value->rValue /= here->B3SOIPDm; return(OK); case B3SOIPD_CTH0: value->rValue = here->B3SOIPDcth0; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_NRB: value->rValue = here->B3SOIPDbodySquares; return(OK); case B3SOIPD_FRBODY: value->rValue = here->B3SOIPDfrbody; return(OK); /* v2.0 release */ case B3SOIPD_NBC: value->rValue = here->B3SOIPDnbc; return(OK); case B3SOIPD_NSEG: value->rValue = here->B3SOIPDnseg; return(OK); case B3SOIPD_PDBCP: value->rValue = here->B3SOIPDpdbcp; return(OK); case B3SOIPD_PSBCP: value->rValue = here->B3SOIPDpsbcp; return(OK); case B3SOIPD_AGBCP: value->rValue = here->B3SOIPDagbcp; return(OK); case B3SOIPD_AEBCP: value->rValue = here->B3SOIPDaebcp; return(OK); case B3SOIPD_VBSUSR: value->rValue = here->B3SOIPDvbsusr; return(OK); case B3SOIPD_TNODEOUT: value->iValue = here->B3SOIPDtnodeout; return(OK); case B3SOIPD_IC_VBS: value->rValue = here->B3SOIPDicVBS; return(OK); case B3SOIPD_IC_VDS: value->rValue = here->B3SOIPDicVDS; return(OK); case B3SOIPD_IC_VGS: value->rValue = here->B3SOIPDicVGS; return(OK); case B3SOIPD_IC_VES: value->rValue = here->B3SOIPDicVES; return(OK); case B3SOIPD_IC_VPS: value->rValue = here->B3SOIPDicVPS; return(OK); case B3SOIPD_DNODE: value->iValue = here->B3SOIPDdNode; return(OK); case B3SOIPD_GNODE: value->iValue = here->B3SOIPDgNode; return(OK); case B3SOIPD_SNODE: value->iValue = here->B3SOIPDsNode; return(OK); case B3SOIPD_BNODE: value->iValue = here->B3SOIPDbNode; return(OK); case B3SOIPD_ENODE: value->iValue = here->B3SOIPDeNode; return(OK); case B3SOIPD_DNODEPRIME: value->iValue = here->B3SOIPDdNodePrime; return(OK); case B3SOIPD_SNODEPRIME: value->iValue = here->B3SOIPDsNodePrime; return(OK); case B3SOIPD_SOURCECONDUCT: value->rValue = here->B3SOIPDsourceConductance; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_DRAINCONDUCT: value->rValue = here->B3SOIPDdrainConductance; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_VBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbd); return(OK); case B3SOIPD_VBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvbs); return(OK); case B3SOIPD_VGS: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvgs); return(OK); case B3SOIPD_VES: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDves); return(OK); case B3SOIPD_VDS: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDvds); return(OK); case B3SOIPD_CD: value->rValue = here->B3SOIPDcd; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CBS: value->rValue = here->B3SOIPDcjs; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CBD: value->rValue = here->B3SOIPDcjd; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_GM: value->rValue = here->B3SOIPDgm; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_GMID: value->rValue = here->B3SOIPDgm/here->B3SOIPDcd; return(OK); case B3SOIPD_GDS: value->rValue = here->B3SOIPDgds; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_GMBS: value->rValue = here->B3SOIPDgmbs; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_GBD: value->rValue = here->B3SOIPDgjdb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_GBS: value->rValue = here->B3SOIPDgjsb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_QB: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqb); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CQB: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqb); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_QG: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqg); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CQG: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqg); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_QD: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqd); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CQD: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDcqd); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CGG: value->rValue = here->B3SOIPDcggb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CGD: value->rValue = here->B3SOIPDcgdb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CGS: value->rValue = here->B3SOIPDcgsb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CDG: value->rValue = here->B3SOIPDcdgb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CDD: value->rValue = here->B3SOIPDcddb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CDS: value->rValue = here->B3SOIPDcdsb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CBG: value->rValue = here->B3SOIPDcbgb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CBDB: value->rValue = here->B3SOIPDcbdb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_CBSB: value->rValue = here->B3SOIPDcbsb; value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_VON: value->rValue = here->B3SOIPDvon; return(OK); case B3SOIPD_VDSAT: value->rValue = here->B3SOIPDvdsat; return(OK); case B3SOIPD_QBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbs); value->rValue *= here->B3SOIPDm; return(OK); case B3SOIPD_QBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIPDqbd); value->rValue *= here->B3SOIPDm; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c0000644000265600020320000012455312264261473023056 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdtemp.c 98/5/01 Modified by Pin Su 99/2/15 Modified by Pin Su 99/4/30 Modified by Pin Su, Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su and Hui Wan 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Eg300 1.115 /* energy gap at 300K */ #define MAX_EXPL 2.688117142e+43 #define MIN_EXPL 3.720075976e-44 #define EXPL_THRESHOLD 100.0 #define DEXP(A,B) { \ if (A > EXPL_THRESHOLD) { \ B = MAX_EXPL*(1.0+(A)-EXPL_THRESHOLD); \ } else if (A < -EXPL_THRESHOLD) { \ B = MIN_EXPL; \ } else { \ B = exp(A); \ } \ } /* ARGSUSED */ int B3SOIPDtemp(GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model = (B3SOIPDmodel*) inModel; B3SOIPDinstance *here; struct b3soipdSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, Ldrn, Wdrn; double Temp, TempRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double SDphi, SDgamma; int Size_Not_Found; /* v2.0 release */ double tmp3, T7; /* loop through all the B3SOIPD device models */ for (; model != NULL; model = model->B3SOIPDnextModel) { Temp = ckt->CKTtemp; if (model->B3SOIPDGatesidewallJctPotential < 0.1) model->B3SOIPDGatesidewallJctPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->B3SOIPDtnom; TempRatio = Temp / Tnom; model->B3SOIPDvcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->B3SOIPDfactor1 = sqrt(EPSSI / EPSOX * model->B3SOIPDtox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); model->B3SOIPDeg0 = Eg0; model->B3SOIPDvtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); /* ni is in cm^-3 */ ni = 1.45e10 * (Temp / 300.15) * sqrt(Temp / 300.15) * exp(21.5565981 - Eg / (2.0 * model->B3SOIPDvtm)); /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->B3SOIPDinstances; here != NULL; here = here->B3SOIPDnextInstance) { here->B3SOIPDrbodyext = here->B3SOIPDbodySquares * model->B3SOIPDrbsh; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->B3SOIPDl == pSizeDependParamKnot->Length) && (here->B3SOIPDw == pSizeDependParamKnot->Width) && (here->B3SOIPDrth0 == pSizeDependParamKnot->Rth0) && (here->B3SOIPDcth0 == pSizeDependParamKnot->Cth0)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /* v2.2.3 bug fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct b3soipdSizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->B3SOIPDl; Wdrn = here->B3SOIPDw; pParam->Length = Ldrn; pParam->Width = Wdrn; pParam->Rth0 = here->B3SOIPDrth0; pParam->Cth0 = here->B3SOIPDcth0; T0 = pow(Ldrn, model->B3SOIPDLln); T1 = pow(Wdrn, model->B3SOIPDLwn); tmp1 = model->B3SOIPDLl / T0 + model->B3SOIPDLw / T1 + model->B3SOIPDLwl / (T0 * T1); pParam->B3SOIPDdl = model->B3SOIPDLint + tmp1; /* v2.2.3 */ tmp1 = model->B3SOIPDLlc / T0 + model->B3SOIPDLwc / T1 + model->B3SOIPDLwlc / (T0 * T1); pParam->B3SOIPDdlc = model->B3SOIPDdlc + tmp1; T2 = pow(Ldrn, model->B3SOIPDWln); T3 = pow(Wdrn, model->B3SOIPDWwn); tmp2 = model->B3SOIPDWl / T2 + model->B3SOIPDWw / T3 + model->B3SOIPDWwl / (T2 * T3); pParam->B3SOIPDdw = model->B3SOIPDWint + tmp2; /* v2.2.3 */ tmp2 = model->B3SOIPDWlc / T2 + model->B3SOIPDWwc / T3 + model->B3SOIPDWwlc / (T2 * T3); pParam->B3SOIPDdwc = model->B3SOIPDdwc + tmp2; pParam->B3SOIPDleff = here->B3SOIPDl - 2.0 * pParam->B3SOIPDdl; if (pParam->B3SOIPDleff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->B3SOIPDweff = here->B3SOIPDw - here->B3SOIPDnbc * model->B3SOIPDdwbc - (2.0 - here->B3SOIPDnbc) * pParam->B3SOIPDdw; if (pParam->B3SOIPDweff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->B3SOIPDwdiod = pParam->B3SOIPDweff / here->B3SOIPDnseg + here->B3SOIPDpdbcp; pParam->B3SOIPDwdios = pParam->B3SOIPDweff / here->B3SOIPDnseg + here->B3SOIPDpsbcp; pParam->B3SOIPDleffCV = here->B3SOIPDl - 2.0 * pParam->B3SOIPDdlc; if (pParam->B3SOIPDleffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->B3SOIPDweffCV = here->B3SOIPDw - here->B3SOIPDnbc * model->B3SOIPDdwbc - (2.0 - here->B3SOIPDnbc) * pParam->B3SOIPDdwc; if (pParam->B3SOIPDweffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->B3SOIPDwdiodCV = pParam->B3SOIPDweffCV / here->B3SOIPDnseg + here->B3SOIPDpdbcp; pParam->B3SOIPDwdiosCV = pParam->B3SOIPDweffCV / here->B3SOIPDnseg + here->B3SOIPDpsbcp; pParam->B3SOIPDleffCVb = here->B3SOIPDl - 2.0 * pParam->B3SOIPDdlc - model->B3SOIPDdlcb; if (pParam->B3SOIPDleffCVb <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel length for C-V (body) <= 0", namarray); return(E_BADPARM); } pParam->B3SOIPDleffCVbg = pParam->B3SOIPDleffCVb + 2 * model->B3SOIPDdlbg; if (pParam->B3SOIPDleffCVbg <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIPD: mosfet %s, model %s: Effective channel length for C-V (backgate) <= 0", namarray); return(E_BADPARM); } /* Not binned - START */ pParam->B3SOIPDat = model->B3SOIPDat; pParam->B3SOIPDgamma1 = model->B3SOIPDgamma1; pParam->B3SOIPDgamma2 = model->B3SOIPDgamma2; pParam->B3SOIPDvbx = model->B3SOIPDvbx; pParam->B3SOIPDvbm = model->B3SOIPDvbm; pParam->B3SOIPDxt = model->B3SOIPDxt; pParam->B3SOIPDkt1 = model->B3SOIPDkt1; pParam->B3SOIPDkt1l = model->B3SOIPDkt1l; pParam->B3SOIPDkt2 = model->B3SOIPDkt2; pParam->B3SOIPDua1 = model->B3SOIPDua1; pParam->B3SOIPDub1 = model->B3SOIPDub1; pParam->B3SOIPDuc1 = model->B3SOIPDuc1; pParam->B3SOIPDute = model->B3SOIPDute; pParam->B3SOIPDprt = model->B3SOIPDprt; /* Not binned - END */ /* CV model */ pParam->B3SOIPDcgsl = model->B3SOIPDcgsl; pParam->B3SOIPDcgdl = model->B3SOIPDcgdl; pParam->B3SOIPDckappa = model->B3SOIPDckappa; pParam->B3SOIPDcf = model->B3SOIPDcf; pParam->B3SOIPDclc = model->B3SOIPDclc; pParam->B3SOIPDcle = model->B3SOIPDcle; pParam->B3SOIPDabulkCVfactor = 1.0 + pow((pParam->B3SOIPDclc / pParam->B3SOIPDleff), pParam->B3SOIPDcle); /* Added for binning - START */ if (model->B3SOIPDbinUnit == 1) { Inv_L = 1.0e-6 / pParam->B3SOIPDleff; Inv_W = 1.0e-6 / pParam->B3SOIPDweff; Inv_LW = 1.0e-12 / (pParam->B3SOIPDleff * pParam->B3SOIPDweff); } else { Inv_L = 1.0 / pParam->B3SOIPDleff; Inv_W = 1.0 / pParam->B3SOIPDweff; Inv_LW = 1.0 / (pParam->B3SOIPDleff * pParam->B3SOIPDweff); } pParam->B3SOIPDnpeak = model->B3SOIPDnpeak + model->B3SOIPDlnpeak * Inv_L + model->B3SOIPDwnpeak * Inv_W + model->B3SOIPDpnpeak * Inv_LW; pParam->B3SOIPDnsub = model->B3SOIPDnsub + model->B3SOIPDlnsub * Inv_L + model->B3SOIPDwnsub * Inv_W + model->B3SOIPDpnsub * Inv_LW; pParam->B3SOIPDngate = model->B3SOIPDngate + model->B3SOIPDlngate * Inv_L + model->B3SOIPDwngate * Inv_W + model->B3SOIPDpngate * Inv_LW; pParam->B3SOIPDvth0 = model->B3SOIPDvth0 + model->B3SOIPDlvth0 * Inv_L + model->B3SOIPDwvth0 * Inv_W + model->B3SOIPDpvth0 * Inv_LW; pParam->B3SOIPDk1 = model->B3SOIPDk1 + model->B3SOIPDlk1 * Inv_L + model->B3SOIPDwk1 * Inv_W + model->B3SOIPDpk1 * Inv_LW; pParam->B3SOIPDk2 = model->B3SOIPDk2 + model->B3SOIPDlk2 * Inv_L + model->B3SOIPDwk2 * Inv_W + model->B3SOIPDpk2 * Inv_LW; pParam->B3SOIPDk1w1 = model->B3SOIPDk1w1 + model->B3SOIPDlk1w1 * Inv_L + model->B3SOIPDwk1w1 * Inv_W + model->B3SOIPDpk1w1 * Inv_LW; pParam->B3SOIPDk1w2 = model->B3SOIPDk1w2 + model->B3SOIPDlk1w2 * Inv_L + model->B3SOIPDwk1w2 * Inv_W + model->B3SOIPDpk1w2 * Inv_LW; pParam->B3SOIPDk3 = model->B3SOIPDk3 + model->B3SOIPDlk3 * Inv_L + model->B3SOIPDwk3 * Inv_W + model->B3SOIPDpk3 * Inv_LW; pParam->B3SOIPDk3b = model->B3SOIPDk3b + model->B3SOIPDlk3b * Inv_L + model->B3SOIPDwk3b * Inv_W + model->B3SOIPDpk3b * Inv_LW; pParam->B3SOIPDkb1 = model->B3SOIPDkb1 + model->B3SOIPDlkb1 * Inv_L + model->B3SOIPDwkb1 * Inv_W + model->B3SOIPDpkb1 * Inv_LW; pParam->B3SOIPDw0 = model->B3SOIPDw0 + model->B3SOIPDlw0 * Inv_L + model->B3SOIPDww0 * Inv_W + model->B3SOIPDpw0 * Inv_LW; pParam->B3SOIPDnlx = model->B3SOIPDnlx + model->B3SOIPDlnlx * Inv_L + model->B3SOIPDwnlx * Inv_W + model->B3SOIPDpnlx * Inv_LW; pParam->B3SOIPDdvt0 = model->B3SOIPDdvt0 + model->B3SOIPDldvt0 * Inv_L + model->B3SOIPDwdvt0 * Inv_W + model->B3SOIPDpdvt0 * Inv_LW; pParam->B3SOIPDdvt1 = model->B3SOIPDdvt1 + model->B3SOIPDldvt1 * Inv_L + model->B3SOIPDwdvt1 * Inv_W + model->B3SOIPDpdvt1 * Inv_LW; pParam->B3SOIPDdvt2 = model->B3SOIPDdvt2 + model->B3SOIPDldvt2 * Inv_L + model->B3SOIPDwdvt2 * Inv_W + model->B3SOIPDpdvt2 * Inv_LW; pParam->B3SOIPDdvt0w = model->B3SOIPDdvt0w + model->B3SOIPDldvt0w * Inv_L + model->B3SOIPDwdvt0w * Inv_W + model->B3SOIPDpdvt0w * Inv_LW; pParam->B3SOIPDdvt1w = model->B3SOIPDdvt1w + model->B3SOIPDldvt1w * Inv_L + model->B3SOIPDwdvt1w * Inv_W + model->B3SOIPDpdvt1w * Inv_LW; pParam->B3SOIPDdvt2w = model->B3SOIPDdvt2w + model->B3SOIPDldvt2w * Inv_L + model->B3SOIPDwdvt2w * Inv_W + model->B3SOIPDpdvt2w * Inv_LW; pParam->B3SOIPDu0 = model->B3SOIPDu0 + model->B3SOIPDlu0 * Inv_L + model->B3SOIPDwu0 * Inv_W + model->B3SOIPDpu0 * Inv_LW; pParam->B3SOIPDua = model->B3SOIPDua + model->B3SOIPDlua * Inv_L + model->B3SOIPDwua * Inv_W + model->B3SOIPDpua * Inv_LW; pParam->B3SOIPDub = model->B3SOIPDub + model->B3SOIPDlub * Inv_L + model->B3SOIPDwub * Inv_W + model->B3SOIPDpub * Inv_LW; pParam->B3SOIPDuc = model->B3SOIPDuc + model->B3SOIPDluc * Inv_L + model->B3SOIPDwuc * Inv_W + model->B3SOIPDpuc * Inv_LW; pParam->B3SOIPDvsat = model->B3SOIPDvsat + model->B3SOIPDlvsat * Inv_L + model->B3SOIPDwvsat * Inv_W + model->B3SOIPDpvsat * Inv_LW; pParam->B3SOIPDa0 = model->B3SOIPDa0 + model->B3SOIPDla0 * Inv_L + model->B3SOIPDwa0 * Inv_W + model->B3SOIPDpa0 * Inv_LW; pParam->B3SOIPDags = model->B3SOIPDags + model->B3SOIPDlags * Inv_L + model->B3SOIPDwags * Inv_W + model->B3SOIPDpags * Inv_LW; pParam->B3SOIPDb0 = model->B3SOIPDb0 + model->B3SOIPDlb0 * Inv_L + model->B3SOIPDwb0 * Inv_W + model->B3SOIPDpb0 * Inv_LW; pParam->B3SOIPDb1 = model->B3SOIPDb1 + model->B3SOIPDlb1 * Inv_L + model->B3SOIPDwb1 * Inv_W + model->B3SOIPDpb1 * Inv_LW; pParam->B3SOIPDketa = model->B3SOIPDketa + model->B3SOIPDlketa * Inv_L + model->B3SOIPDwketa * Inv_W + model->B3SOIPDpketa * Inv_LW; pParam->B3SOIPDketas = model->B3SOIPDketas + model->B3SOIPDlketas * Inv_L + model->B3SOIPDwketas * Inv_W + model->B3SOIPDpketas * Inv_LW; pParam->B3SOIPDa1 = model->B3SOIPDa1 + model->B3SOIPDla1 * Inv_L + model->B3SOIPDwa1 * Inv_W + model->B3SOIPDpa1 * Inv_LW; pParam->B3SOIPDa2 = model->B3SOIPDa2 + model->B3SOIPDla2 * Inv_L + model->B3SOIPDwa2 * Inv_W + model->B3SOIPDpa2 * Inv_LW; pParam->B3SOIPDrdsw = model->B3SOIPDrdsw + model->B3SOIPDlrdsw * Inv_L + model->B3SOIPDwrdsw * Inv_W + model->B3SOIPDprdsw * Inv_LW; pParam->B3SOIPDprwb = model->B3SOIPDprwb + model->B3SOIPDlprwb * Inv_L + model->B3SOIPDwprwb * Inv_W + model->B3SOIPDpprwb * Inv_LW; pParam->B3SOIPDprwg = model->B3SOIPDprwg + model->B3SOIPDlprwg * Inv_L + model->B3SOIPDwprwg * Inv_W + model->B3SOIPDpprwg * Inv_LW; pParam->B3SOIPDwr = model->B3SOIPDwr + model->B3SOIPDlwr * Inv_L + model->B3SOIPDwwr * Inv_W + model->B3SOIPDpwr * Inv_LW; pParam->B3SOIPDnfactor = model->B3SOIPDnfactor + model->B3SOIPDlnfactor * Inv_L + model->B3SOIPDwnfactor * Inv_W + model->B3SOIPDpnfactor * Inv_LW; pParam->B3SOIPDdwg = model->B3SOIPDdwg + model->B3SOIPDldwg * Inv_L + model->B3SOIPDwdwg * Inv_W + model->B3SOIPDpdwg * Inv_LW; pParam->B3SOIPDdwb = model->B3SOIPDdwb + model->B3SOIPDldwb * Inv_L + model->B3SOIPDwdwb * Inv_W + model->B3SOIPDpdwb * Inv_LW; pParam->B3SOIPDvoff = model->B3SOIPDvoff + model->B3SOIPDlvoff * Inv_L + model->B3SOIPDwvoff * Inv_W + model->B3SOIPDpvoff * Inv_LW; pParam->B3SOIPDeta0 = model->B3SOIPDeta0 + model->B3SOIPDleta0 * Inv_L + model->B3SOIPDweta0 * Inv_W + model->B3SOIPDpeta0 * Inv_LW; pParam->B3SOIPDetab = model->B3SOIPDetab + model->B3SOIPDletab * Inv_L + model->B3SOIPDwetab * Inv_W + model->B3SOIPDpetab * Inv_LW; pParam->B3SOIPDdsub = model->B3SOIPDdsub + model->B3SOIPDldsub * Inv_L + model->B3SOIPDwdsub * Inv_W + model->B3SOIPDpdsub * Inv_LW; pParam->B3SOIPDcit = model->B3SOIPDcit + model->B3SOIPDlcit * Inv_L + model->B3SOIPDwcit * Inv_W + model->B3SOIPDpcit * Inv_LW; pParam->B3SOIPDcdsc = model->B3SOIPDcdsc + model->B3SOIPDlcdsc * Inv_L + model->B3SOIPDwcdsc * Inv_W + model->B3SOIPDpcdsc * Inv_LW; pParam->B3SOIPDcdscb = model->B3SOIPDcdscb + model->B3SOIPDlcdscb * Inv_L + model->B3SOIPDwcdscb * Inv_W + model->B3SOIPDpcdscb * Inv_LW; pParam->B3SOIPDcdscd = model->B3SOIPDcdscd + model->B3SOIPDlcdscd * Inv_L + model->B3SOIPDwcdscd * Inv_W + model->B3SOIPDpcdscd * Inv_LW; pParam->B3SOIPDpclm = model->B3SOIPDpclm + model->B3SOIPDlpclm * Inv_L + model->B3SOIPDwpclm * Inv_W + model->B3SOIPDppclm * Inv_LW; pParam->B3SOIPDpdibl1 = model->B3SOIPDpdibl1 + model->B3SOIPDlpdibl1 * Inv_L + model->B3SOIPDwpdibl1 * Inv_W + model->B3SOIPDppdibl1 * Inv_LW; pParam->B3SOIPDpdibl2 = model->B3SOIPDpdibl2 + model->B3SOIPDlpdibl2 * Inv_L + model->B3SOIPDwpdibl2 * Inv_W + model->B3SOIPDppdibl2 * Inv_LW; pParam->B3SOIPDpdiblb = model->B3SOIPDpdiblb + model->B3SOIPDlpdiblb * Inv_L + model->B3SOIPDwpdiblb * Inv_W + model->B3SOIPDppdiblb * Inv_LW; pParam->B3SOIPDdrout = model->B3SOIPDdrout + model->B3SOIPDldrout * Inv_L + model->B3SOIPDwdrout * Inv_W + model->B3SOIPDpdrout * Inv_LW; pParam->B3SOIPDpvag = model->B3SOIPDpvag + model->B3SOIPDlpvag * Inv_L + model->B3SOIPDwpvag * Inv_W + model->B3SOIPDppvag * Inv_LW; pParam->B3SOIPDdelta = model->B3SOIPDdelta + model->B3SOIPDldelta * Inv_L + model->B3SOIPDwdelta * Inv_W + model->B3SOIPDpdelta * Inv_LW; pParam->B3SOIPDalpha0 = model->B3SOIPDalpha0 + model->B3SOIPDlalpha0 * Inv_L + model->B3SOIPDwalpha0 * Inv_W + model->B3SOIPDpalpha0 * Inv_LW; pParam->B3SOIPDfbjtii = model->B3SOIPDfbjtii + model->B3SOIPDlfbjtii * Inv_L + model->B3SOIPDwfbjtii * Inv_W + model->B3SOIPDpfbjtii * Inv_LW; pParam->B3SOIPDbeta0 = model->B3SOIPDbeta0 + model->B3SOIPDlbeta0 * Inv_L + model->B3SOIPDwbeta0 * Inv_W + model->B3SOIPDpbeta0 * Inv_LW; pParam->B3SOIPDbeta1 = model->B3SOIPDbeta1 + model->B3SOIPDlbeta1 * Inv_L + model->B3SOIPDwbeta1 * Inv_W + model->B3SOIPDpbeta1 * Inv_LW; pParam->B3SOIPDbeta2 = model->B3SOIPDbeta2 + model->B3SOIPDlbeta2 * Inv_L + model->B3SOIPDwbeta2 * Inv_W + model->B3SOIPDpbeta2 * Inv_LW; pParam->B3SOIPDvdsatii0 = model->B3SOIPDvdsatii0 + model->B3SOIPDlvdsatii0 * Inv_L + model->B3SOIPDwvdsatii0 * Inv_W + model->B3SOIPDpvdsatii0 * Inv_LW; pParam->B3SOIPDlii = model->B3SOIPDlii + model->B3SOIPDllii * Inv_L + model->B3SOIPDwlii * Inv_W + model->B3SOIPDplii * Inv_LW; pParam->B3SOIPDesatii = model->B3SOIPDesatii + model->B3SOIPDlesatii * Inv_L + model->B3SOIPDwesatii * Inv_W + model->B3SOIPDpesatii * Inv_LW; pParam->B3SOIPDsii0 = model->B3SOIPDsii0 + model->B3SOIPDlsii0 * Inv_L + model->B3SOIPDwsii0 * Inv_W + model->B3SOIPDpsii0 * Inv_LW; pParam->B3SOIPDsii1 = model->B3SOIPDsii1 + model->B3SOIPDlsii1 * Inv_L + model->B3SOIPDwsii1 * Inv_W + model->B3SOIPDpsii1 * Inv_LW; pParam->B3SOIPDsii2 = model->B3SOIPDsii2 + model->B3SOIPDlsii2 * Inv_L + model->B3SOIPDwsii2 * Inv_W + model->B3SOIPDpsii2 * Inv_LW; pParam->B3SOIPDsiid = model->B3SOIPDsiid + model->B3SOIPDlsiid * Inv_L + model->B3SOIPDwsiid * Inv_W + model->B3SOIPDpsiid * Inv_LW; pParam->B3SOIPDagidl = model->B3SOIPDagidl + model->B3SOIPDlagidl * Inv_L + model->B3SOIPDwagidl * Inv_W + model->B3SOIPDpagidl * Inv_LW; pParam->B3SOIPDbgidl = model->B3SOIPDbgidl + model->B3SOIPDlbgidl * Inv_L + model->B3SOIPDwbgidl * Inv_W + model->B3SOIPDpbgidl * Inv_LW; pParam->B3SOIPDngidl = model->B3SOIPDngidl + model->B3SOIPDlngidl * Inv_L + model->B3SOIPDwngidl * Inv_W + model->B3SOIPDpngidl * Inv_LW; pParam->B3SOIPDntun = model->B3SOIPDntun + model->B3SOIPDlntun * Inv_L + model->B3SOIPDwntun * Inv_W + model->B3SOIPDpntun * Inv_LW; pParam->B3SOIPDndiode = model->B3SOIPDndiode + model->B3SOIPDlndiode * Inv_L + model->B3SOIPDwndiode * Inv_W + model->B3SOIPDpndiode * Inv_LW; pParam->B3SOIPDnrecf0 = model->B3SOIPDnrecf0 + model->B3SOIPDlnrecf0 * Inv_L + model->B3SOIPDwnrecf0 * Inv_W + model->B3SOIPDpnrecf0 * Inv_LW; pParam->B3SOIPDnrecr0 = model->B3SOIPDnrecr0 + model->B3SOIPDlnrecr0 * Inv_L + model->B3SOIPDwnrecr0 * Inv_W + model->B3SOIPDpnrecr0 * Inv_LW; pParam->B3SOIPDisbjt = model->B3SOIPDisbjt + model->B3SOIPDlisbjt * Inv_L + model->B3SOIPDwisbjt * Inv_W + model->B3SOIPDpisbjt * Inv_LW; pParam->B3SOIPDisdif = model->B3SOIPDisdif + model->B3SOIPDlisdif * Inv_L + model->B3SOIPDwisdif * Inv_W + model->B3SOIPDpisdif * Inv_LW; pParam->B3SOIPDisrec = model->B3SOIPDisrec + model->B3SOIPDlisrec * Inv_L + model->B3SOIPDwisrec * Inv_W + model->B3SOIPDpisrec * Inv_LW; pParam->B3SOIPDistun = model->B3SOIPDistun + model->B3SOIPDlistun * Inv_L + model->B3SOIPDwistun * Inv_W + model->B3SOIPDpistun * Inv_LW; pParam->B3SOIPDvrec0 = model->B3SOIPDvrec0 + model->B3SOIPDlvrec0 * Inv_L + model->B3SOIPDwvrec0 * Inv_W + model->B3SOIPDpvrec0 * Inv_LW; pParam->B3SOIPDvtun0 = model->B3SOIPDvtun0 + model->B3SOIPDlvtun0 * Inv_L + model->B3SOIPDwvtun0 * Inv_W + model->B3SOIPDpvtun0 * Inv_LW; pParam->B3SOIPDnbjt = model->B3SOIPDnbjt + model->B3SOIPDlnbjt * Inv_L + model->B3SOIPDwnbjt * Inv_W + model->B3SOIPDpnbjt * Inv_LW; pParam->B3SOIPDlbjt0 = model->B3SOIPDlbjt0 + model->B3SOIPDllbjt0 * Inv_L + model->B3SOIPDwlbjt0 * Inv_W + model->B3SOIPDplbjt0 * Inv_LW; pParam->B3SOIPDvabjt = model->B3SOIPDvabjt + model->B3SOIPDlvabjt * Inv_L + model->B3SOIPDwvabjt * Inv_W + model->B3SOIPDpvabjt * Inv_LW; pParam->B3SOIPDaely = model->B3SOIPDaely + model->B3SOIPDlaely * Inv_L + model->B3SOIPDwaely * Inv_W + model->B3SOIPDpaely * Inv_LW; pParam->B3SOIPDahli = model->B3SOIPDahli + model->B3SOIPDlahli * Inv_L + model->B3SOIPDwahli * Inv_W + model->B3SOIPDpahli * Inv_LW; /* CV model */ pParam->B3SOIPDvsdfb = model->B3SOIPDvsdfb + model->B3SOIPDlvsdfb * Inv_L + model->B3SOIPDwvsdfb * Inv_W + model->B3SOIPDpvsdfb * Inv_LW; pParam->B3SOIPDvsdth = model->B3SOIPDvsdth + model->B3SOIPDlvsdth * Inv_L + model->B3SOIPDwvsdth * Inv_W + model->B3SOIPDpvsdth * Inv_LW; pParam->B3SOIPDdelvt = model->B3SOIPDdelvt + model->B3SOIPDldelvt * Inv_L + model->B3SOIPDwdelvt * Inv_W + model->B3SOIPDpdelvt * Inv_LW; pParam->B3SOIPDacde = model->B3SOIPDacde + model->B3SOIPDlacde * Inv_L + model->B3SOIPDwacde * Inv_W + model->B3SOIPDpacde * Inv_LW; pParam->B3SOIPDmoin = model->B3SOIPDmoin + model->B3SOIPDlmoin * Inv_L + model->B3SOIPDwmoin * Inv_W + model->B3SOIPDpmoin * Inv_LW; /* Added for binning - END */ T0 = (TempRatio - 1.0); pParam->B3SOIPDuatemp = pParam->B3SOIPDua; /* save ua, ub, and uc for b3soipdld.c */ pParam->B3SOIPDubtemp = pParam->B3SOIPDub; pParam->B3SOIPDuctemp = pParam->B3SOIPDuc; pParam->B3SOIPDrds0denom = pow(pParam->B3SOIPDweff * 1E6, pParam->B3SOIPDwr); /* v2.2 release */ pParam->B3SOIPDrth = here->B3SOIPDrth0 / (pParam->B3SOIPDweff + model->B3SOIPDwth0) * here->B3SOIPDnseg; pParam->B3SOIPDcth = here->B3SOIPDcth0 * (pParam->B3SOIPDweff + model->B3SOIPDwth0) / here->B3SOIPDnseg; /* v2.2.2 adding layout-dependent Frbody multiplier */ pParam->B3SOIPDrbody = here->B3SOIPDfrbody *model->B3SOIPDrbody * model->B3SOIPDrhalo / (2 * model->B3SOIPDrbody + model->B3SOIPDrhalo * pParam->B3SOIPDleff) * pParam->B3SOIPDweff / here->B3SOIPDnseg; pParam->B3SOIPDoxideRatio = pow(model->B3SOIPDtoxref/model->B3SOIPDtoxqm, model->B3SOIPDntox) /model->B3SOIPDtoxqm/model->B3SOIPDtoxqm; /* v2.2 release */ pParam->B3SOIPDua = pParam->B3SOIPDua + pParam->B3SOIPDua1 * T0; pParam->B3SOIPDub = pParam->B3SOIPDub + pParam->B3SOIPDub1 * T0; pParam->B3SOIPDuc = pParam->B3SOIPDuc + pParam->B3SOIPDuc1 * T0; if (pParam->B3SOIPDu0 > 1.0) pParam->B3SOIPDu0 = pParam->B3SOIPDu0 / 1.0e4; pParam->B3SOIPDu0temp = pParam->B3SOIPDu0 * pow(TempRatio, pParam->B3SOIPDute); pParam->B3SOIPDvsattemp = pParam->B3SOIPDvsat - pParam->B3SOIPDat * T0; pParam->B3SOIPDrds0 = (pParam->B3SOIPDrdsw + pParam->B3SOIPDprt * T0) / pow(pParam->B3SOIPDweff * 1E6, pParam->B3SOIPDwr); if (B3SOIPDcheckModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->B3SOIPDmodName; namarray[1] = here->B3SOIPDname; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during B3SOIPDV3 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->B3SOIPDcgdo = (model->B3SOIPDcgdo + pParam->B3SOIPDcf) * pParam->B3SOIPDwdiodCV; pParam->B3SOIPDcgso = (model->B3SOIPDcgso + pParam->B3SOIPDcf) * pParam->B3SOIPDwdiosCV; pParam->B3SOIPDcgeo = model->B3SOIPDcgeo * pParam->B3SOIPDleffCV; if (!model->B3SOIPDnpeakGiven && model->B3SOIPDgamma1Given) { T0 = pParam->B3SOIPDgamma1 * model->B3SOIPDcox; pParam->B3SOIPDnpeak = 3.021E22 * T0 * T0; } T4 = Eg300 / model->B3SOIPDvtm * (TempRatio - 1.0); T7 = model->B3SOIPDxbjt * T4 / pParam->B3SOIPDndiode; DEXP(T7, T0); T7 = model->B3SOIPDxdif * T4 / pParam->B3SOIPDndiode; DEXP(T7, T1); T7 = model->B3SOIPDxrec * T4 / pParam->B3SOIPDnrecf0; DEXP(T7, T2); /* v2.2.2 bug fix */ pParam->B3SOIPDahli0 = pParam->B3SOIPDahli * T0; pParam->B3SOIPDjbjt = pParam->B3SOIPDisbjt * T0; pParam->B3SOIPDjdif = pParam->B3SOIPDisdif * T1; pParam->B3SOIPDjrec = pParam->B3SOIPDisrec * T2; T7 = model->B3SOIPDxtun * (TempRatio - 1); DEXP(T7, T0); pParam->B3SOIPDjtun = pParam->B3SOIPDistun * T0; if (pParam->B3SOIPDnsub > 0) pParam->B3SOIPDvfbb = -model->B3SOIPDtype * model->B3SOIPDvtm * log(pParam->B3SOIPDnpeak/ pParam->B3SOIPDnsub); else pParam->B3SOIPDvfbb = -model->B3SOIPDtype * model->B3SOIPDvtm * log(-pParam->B3SOIPDnpeak* pParam->B3SOIPDnsub/ni/ni); if (!model->B3SOIPDvsdfbGiven) { if (pParam->B3SOIPDnsub > 0) pParam->B3SOIPDvsdfb = -model->B3SOIPDtype * (model->B3SOIPDvtm*log(1e20 * pParam->B3SOIPDnsub / ni /ni) - 0.3); else if (pParam->B3SOIPDnsub < 0) pParam->B3SOIPDvsdfb = -model->B3SOIPDtype * (model->B3SOIPDvtm*log(-1e20 / pParam->B3SOIPDnsub) + 0.3); } /* Phi & Gamma */ SDphi = 2.0*model->B3SOIPDvtm*log(fabs(pParam->B3SOIPDnsub) / ni); SDgamma = 5.753e-12 * sqrt(fabs(pParam->B3SOIPDnsub)) / model->B3SOIPDcbox; if (!model->B3SOIPDvsdthGiven) { if ( ((pParam->B3SOIPDnsub > 0) && (model->B3SOIPDtype > 0)) || ((pParam->B3SOIPDnsub < 0) && (model->B3SOIPDtype < 0)) ) pParam->B3SOIPDvsdth = pParam->B3SOIPDvsdfb + SDphi + SDgamma * sqrt(SDphi); else pParam->B3SOIPDvsdth = pParam->B3SOIPDvsdfb - SDphi - SDgamma * sqrt(SDphi); } if (!model->B3SOIPDcsdminGiven) { /* Cdmin */ tmp = sqrt(2.0 * EPSSI * SDphi / (Charge_q * fabs(pParam->B3SOIPDnsub) * 1.0e6)); tmp1 = EPSSI / tmp; model->B3SOIPDcsdmin = tmp1 * model->B3SOIPDcbox / (tmp1 + model->B3SOIPDcbox); } pParam->B3SOIPDphi = 2.0 * model->B3SOIPDvtm * log(pParam->B3SOIPDnpeak / ni); pParam->B3SOIPDsqrtPhi = sqrt(pParam->B3SOIPDphi); pParam->B3SOIPDphis3 = pParam->B3SOIPDsqrtPhi * pParam->B3SOIPDphi; pParam->B3SOIPDXdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIPDnpeak * 1.0e6)) * pParam->B3SOIPDsqrtPhi; pParam->B3SOIPDsqrtXdep0 = sqrt(pParam->B3SOIPDXdep0); pParam->B3SOIPDlitl = sqrt(3.0 * model->B3SOIPDxj * model->B3SOIPDtox); pParam->B3SOIPDvbi = model->B3SOIPDvtm * log(1.0e20 * pParam->B3SOIPDnpeak / (ni * ni)); pParam->B3SOIPDcdep0 = sqrt(Charge_q * EPSSI * pParam->B3SOIPDnpeak * 1.0e6 / 2.0 / pParam->B3SOIPDphi); if (model->B3SOIPDk1Given || model->B3SOIPDk2Given) { if (!model->B3SOIPDk1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->B3SOIPDk1 = 0.53; } if (!model->B3SOIPDk2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->B3SOIPDk2 = -0.0186; } if (model->B3SOIPDxtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->B3SOIPDvbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->B3SOIPDvbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->B3SOIPDgamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->B3SOIPDgamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->B3SOIPDvbxGiven) pParam->B3SOIPDvbx = pParam->B3SOIPDphi - 7.7348e-4 * pParam->B3SOIPDnpeak * pParam->B3SOIPDxt * pParam->B3SOIPDxt; if (pParam->B3SOIPDvbx > 0.0) pParam->B3SOIPDvbx = -pParam->B3SOIPDvbx; if (pParam->B3SOIPDvbm > 0.0) pParam->B3SOIPDvbm = -pParam->B3SOIPDvbm; if (!model->B3SOIPDgamma1Given) pParam->B3SOIPDgamma1 = 5.753e-12 * sqrt(pParam->B3SOIPDnpeak) / model->B3SOIPDcox; if (!model->B3SOIPDgamma2Given) pParam->B3SOIPDgamma2 = 5.753e-12 * sqrt(pParam->B3SOIPDnsub) / model->B3SOIPDcox; T0 = pParam->B3SOIPDgamma1 - pParam->B3SOIPDgamma2; T1 = sqrt(pParam->B3SOIPDphi - pParam->B3SOIPDvbx) - pParam->B3SOIPDsqrtPhi; T2 = sqrt(pParam->B3SOIPDphi * (pParam->B3SOIPDphi - pParam->B3SOIPDvbm)) - pParam->B3SOIPDphi; pParam->B3SOIPDk2 = T0 * T1 / (2.0 * T2 + pParam->B3SOIPDvbm); pParam->B3SOIPDk1 = pParam->B3SOIPDgamma2 - 2.0 * pParam->B3SOIPDk2 * sqrt(pParam->B3SOIPDphi - pParam->B3SOIPDvbm); } if (pParam->B3SOIPDk2 < 0.0) { T0 = 0.5 * pParam->B3SOIPDk1 / pParam->B3SOIPDk2; pParam->B3SOIPDvbsc = 0.9 * (pParam->B3SOIPDphi - T0 * T0); if (pParam->B3SOIPDvbsc > -3.0) pParam->B3SOIPDvbsc = -3.0; else if (pParam->B3SOIPDvbsc < -30.0) pParam->B3SOIPDvbsc = -30.0; } else { pParam->B3SOIPDvbsc = -30.0; } if (pParam->B3SOIPDvbsc > pParam->B3SOIPDvbm) pParam->B3SOIPDvbsc = pParam->B3SOIPDvbm; if ((T0 = pParam->B3SOIPDweff + pParam->B3SOIPDk1w2) < 1e-8) T0 = 1e-8; pParam->B3SOIPDk1eff = pParam->B3SOIPDk1 * (1 + pParam->B3SOIPDk1w1/T0); if (model->B3SOIPDvth0Given) { pParam->B3SOIPDvfb = model->B3SOIPDtype * pParam->B3SOIPDvth0 - pParam->B3SOIPDphi - pParam->B3SOIPDk1eff * pParam->B3SOIPDsqrtPhi; } else { pParam->B3SOIPDvfb = -1.0; pParam->B3SOIPDvth0 = model->B3SOIPDtype * (pParam->B3SOIPDvfb + pParam->B3SOIPDphi + pParam->B3SOIPDk1eff * pParam->B3SOIPDsqrtPhi); } T1 = sqrt(EPSSI / EPSOX * model->B3SOIPDtox * pParam->B3SOIPDXdep0); T0 = exp(-0.5 * pParam->B3SOIPDdsub * pParam->B3SOIPDleff / T1); pParam->B3SOIPDtheta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->B3SOIPDdrout * pParam->B3SOIPDleff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->B3SOIPDthetaRout = pParam->B3SOIPDpdibl1 * T2 + pParam->B3SOIPDpdibl2; } here->B3SOIPDcsbox = model->B3SOIPDcbox*here->B3SOIPDsourceArea; here->B3SOIPDcsmin = model->B3SOIPDcsdmin*here->B3SOIPDsourceArea; here->B3SOIPDcdbox = model->B3SOIPDcbox*here->B3SOIPDdrainArea; here->B3SOIPDcdmin = model->B3SOIPDcsdmin*here->B3SOIPDdrainArea; if ( ((pParam->B3SOIPDnsub > 0) && (model->B3SOIPDtype > 0)) || ((pParam->B3SOIPDnsub < 0) && (model->B3SOIPDtype < 0)) ) { T0 = pParam->B3SOIPDvsdth - pParam->B3SOIPDvsdfb; pParam->B3SOIPDsdt1 = pParam->B3SOIPDvsdfb + model->B3SOIPDasd * T0; T1 = here->B3SOIPDcsbox - here->B3SOIPDcsmin; T2 = T1 / T0 / T0; pParam->B3SOIPDst2 = T2 / model->B3SOIPDasd; pParam->B3SOIPDst3 = T2 /( 1 - model->B3SOIPDasd); here->B3SOIPDst4 = T0 * T1 * (1 + model->B3SOIPDasd) / 3 - here->B3SOIPDcsmin * pParam->B3SOIPDvsdfb; T1 = here->B3SOIPDcdbox - here->B3SOIPDcdmin; T2 = T1 / T0 / T0; pParam->B3SOIPDdt2 = T2 / model->B3SOIPDasd; pParam->B3SOIPDdt3 = T2 /( 1 - model->B3SOIPDasd); here->B3SOIPDdt4 = T0 * T1 * (1 + model->B3SOIPDasd) / 3 - here->B3SOIPDcdmin * pParam->B3SOIPDvsdfb; } else { T0 = pParam->B3SOIPDvsdfb - pParam->B3SOIPDvsdth; pParam->B3SOIPDsdt1 = pParam->B3SOIPDvsdth + model->B3SOIPDasd * T0; T1 = here->B3SOIPDcsmin - here->B3SOIPDcsbox; T2 = T1 / T0 / T0; pParam->B3SOIPDst2 = T2 / model->B3SOIPDasd; pParam->B3SOIPDst3 = T2 /( 1 - model->B3SOIPDasd); here->B3SOIPDst4 = T0 * T1 * (1 + model->B3SOIPDasd) / 3 - here->B3SOIPDcsbox * pParam->B3SOIPDvsdth; T1 = here->B3SOIPDcdmin - here->B3SOIPDcdbox; T2 = T1 / T0 / T0; pParam->B3SOIPDdt2 = T2 / model->B3SOIPDasd; pParam->B3SOIPDdt3 = T2 /( 1 - model->B3SOIPDasd); here->B3SOIPDdt4 = T0 * T1 * (1 + model->B3SOIPDasd) / 3 - here->B3SOIPDcdbox * pParam->B3SOIPDvsdth; } /* v2.2.2 bug fix */ T0 = model->B3SOIPDcsdesw * log(1 + model->B3SOIPDtsi / model->B3SOIPDtbox); T1 = here->B3SOIPDsourcePerimeter - here->B3SOIPDw; if (T1 > 0.0) here->B3SOIPDcsesw = T0 * T1; else here->B3SOIPDcsesw = 0.0; T1 = here->B3SOIPDdrainPerimeter - here->B3SOIPDw; if (T1 > 0.0) here->B3SOIPDcdesw = T0 * T1; else here->B3SOIPDcdesw = 0.0; here->B3SOIPDphi = pParam->B3SOIPDphi; /* process source/drain series resistance */ here->B3SOIPDdrainConductance = model->B3SOIPDsheetResistance * here->B3SOIPDdrainSquares; if (here->B3SOIPDdrainConductance > 0.0) here->B3SOIPDdrainConductance = 1.0 / here->B3SOIPDdrainConductance; else here->B3SOIPDdrainConductance = 0.0; here->B3SOIPDsourceConductance = model->B3SOIPDsheetResistance * here->B3SOIPDsourceSquares; if (here->B3SOIPDsourceConductance > 0.0) here->B3SOIPDsourceConductance = 1.0 / here->B3SOIPDsourceConductance; else here->B3SOIPDsourceConductance = 0.0; here->B3SOIPDcgso = pParam->B3SOIPDcgso; here->B3SOIPDcgdo = pParam->B3SOIPDcgdo; /* v2.0 release */ if (model->B3SOIPDln < 1e-15) model->B3SOIPDln = 1e-15; T0 = -0.5 * pParam->B3SOIPDleff * pParam->B3SOIPDleff / model->B3SOIPDln / model->B3SOIPDln; DEXP(T0,T1); pParam->B3SOIPDarfabjt = T1; T0 = pParam->B3SOIPDlbjt0 * (1.0 / pParam->B3SOIPDleff + 1.0 / model->B3SOIPDln); pParam->B3SOIPDlratio = pow(T0,pParam->B3SOIPDnbjt); pParam->B3SOIPDlratiodif = 1.0 + model->B3SOIPDldif0 * pow(T0,model->B3SOIPDndif); if ((pParam->B3SOIPDvearly = pParam->B3SOIPDvabjt + pParam->B3SOIPDaely * pParam->B3SOIPDleff) < 1) pParam->B3SOIPDvearly = 1; /* vfbzb calculation for capMod 3 */ tmp = sqrt(pParam->B3SOIPDXdep0); tmp1 = pParam->B3SOIPDvbi - pParam->B3SOIPDphi; tmp2 = model->B3SOIPDfactor1 * tmp; T0 = -0.5 * pParam->B3SOIPDdvt1w * pParam->B3SOIPDweff * pParam->B3SOIPDleff / tmp2; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T2 = T1 * (1.0 + 2.0 * T1); } T0 = pParam->B3SOIPDdvt0w * T2; T2 = T0 * tmp1; T0 = -0.5 * pParam->B3SOIPDdvt1 * pParam->B3SOIPDleff / tmp2; if (T0 > -EXPL_THRESHOLD) { T1 = exp(T0); T3 = T1 * (1.0 + 2.0 * T1); } else { T1 = MIN_EXPL; T3 = T1 * (1.0 + 2.0 * T1); } T3 = pParam->B3SOIPDdvt0 * T3 * tmp1; /* v2.2.3 */ T4 = (model->B3SOIPDtox - model->B3SOIPDdtoxcv) * pParam->B3SOIPDphi / (pParam->B3SOIPDweff + pParam->B3SOIPDw0); T0 = sqrt(1.0 + pParam->B3SOIPDnlx / pParam->B3SOIPDleff); T5 = pParam->B3SOIPDk1eff * (T0 - 1.0) * pParam->B3SOIPDsqrtPhi + (pParam->B3SOIPDkt1 + pParam->B3SOIPDkt1l / pParam->B3SOIPDleff) * (TempRatio - 1.0); tmp3 = model->B3SOIPDtype * pParam->B3SOIPDvth0 - T2 - T3 + pParam->B3SOIPDk3 * T4 + T5; pParam->B3SOIPDvfbzb = tmp3 - pParam->B3SOIPDphi - pParam->B3SOIPDk1eff * pParam->B3SOIPDsqrtPhi; /* End of vfbzb */ pParam->B3SOIPDldeb = sqrt(EPSSI * Vtm0 / (Charge_q * pParam->B3SOIPDnpeak * 1.0e6)) / 3.0; pParam->B3SOIPDacde = pParam->B3SOIPDacde * pow((pParam->B3SOIPDnpeak / 2.0e16), -0.25); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdinit.c0000644000265600020320000000414012264261473023041 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "b3soipditf.h" #include "b3soipdinit.h" SPICEdev B3SOIPDinfo = { {"B3SOIPD", "Berkeley SOI (PD) MOSFET model version 2.2.3", &B3SOIPDnSize, &B3SOIPDnSize, B3SOIPDnames, &B3SOIPDpTSize, B3SOIPDpTable, &B3SOIPDmPTSize, B3SOIPDmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam*/ B3SOIPDparam, /* DEVmodParam*/ B3SOIPDmParam, /* DEVload*/ B3SOIPDload, /* DEVsetup*/ B3SOIPDsetup, /* DEVunsetup*/ B3SOIPDunsetup, /* DEVpzSetup*/ B3SOIPDsetup, /* DEVtemperature*/ B3SOIPDtemp, /* DEVtrunc*/ B3SOIPDtrunc, /* DEVfindBranch*/ NULL, /* DEVacLoad*/ B3SOIPDacLoad, /* DEVaccept*/ NULL, /* DEVdestroy*/ B3SOIPDdestroy, /* DEVmodDelete*/ B3SOIPDmDelete, /* DEVdelete*/ B3SOIPDdelete, /* DEVsetic*/ B3SOIPDgetic, /* DEVask*/ B3SOIPDask, /* DEVmodAsk*/ B3SOIPDmAsk, /* DEVpzLoad*/ B3SOIPDpzLoad, /* DEVconvTest*/ B3SOIPDconvTest, /* DEVsenSetup*/ NULL, /* DEVsenLoad*/ NULL, /* DEVsenUpdate*/ NULL, /* DEVsenAcLoad*/ NULL, /* DEVsenPrint*/ NULL, /* DEVsenTrunc*/ NULL, /* DEVdisto*/ NULL, /* DEVnoise*/ B3SOIPDnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump*/ NULL, /* DEVacct*/ NULL, #endif /* DEVinstSize*/ &B3SOIPDiSize, /* DEVmodSize*/ &B3SOIPDmSize }; SPICEdev * get_b3soipd_info (void) { return &B3SOIPDinfo; } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdmdel.c0000644000265600020320000000224612264261473023024 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdmdel.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "b3soipddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIPDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { B3SOIPDmodel **model = (B3SOIPDmodel**)inModel; B3SOIPDmodel *modfast = (B3SOIPDmodel*)kill; B3SOIPDinstance *here; B3SOIPDinstance *prev = NULL; B3SOIPDmodel **oldmod; oldmod = model; for (; *model ; model = &((*model)->B3SOIPDnextModel)) { if ((*model)->B3SOIPDmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B3SOIPDnextModel; /* cut deleted device out of list */ for (here = (*model)->B3SOIPDinstances; here; here = here->B3SOIPDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c0000644000265600020320000003300312264261473022663 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdnoi.c 98/5/01 Modified by Hui Wan 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "b3soipddef.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * B3SOIPDnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->B3SOIPDnoiMod. If model->B3SOIPDnoiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->B3SOIPDnoiMod = 2, Channel thermal noise = B3SOIPD model Flicker noise = B3SOIPD model If model->B3SOIPDnoiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = B3SOIPD model If model->B3SOIPDnoiMod = 4, Channel thermal noise = B3SOIPD model Flicker noise = SPICE2 model */ static double B3SOIPDStrongInversionNoiseEval(double vgs, double vds, B3SOIPDmodel *model, B3SOIPDinstance *here, double freq, double temp) { struct b3soipdSizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; NG_IGNORE(vgs); pParam = here->pParam; cd = fabs(here->B3SOIPDcd) * here->B3SOIPDm; /* v2.2.3 bug fix */ if(model->B3SOIPDem<=0.0) DelClm = 0.0; else { esat = 2.0 * pParam->B3SOIPDvsattemp / here->B3SOIPDueff; T0 = ((((vds - here->B3SOIPDVdseff) / pParam->B3SOIPDlitl) + model->B3SOIPDem) / esat); DelClm = pParam->B3SOIPDlitl * log (MAX(T0, N_MINLOG)); } EffFreq = pow(freq, model->B3SOIPDef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->B3SOIPDueff; T2 = 1.0e8 * EffFreq * model->B3SOIPDcox * pParam->B3SOIPDleff * pParam->B3SOIPDleff; /* v2.2.3 bug fix */ N0 = model->B3SOIPDcox * here->B3SOIPDVgsteff / CHARGE; Nl = model->B3SOIPDcox * here->B3SOIPDVgsteff * (1.0 - here->B3SOIPDAbovVgst2Vtm * here->B3SOIPDVdseff) / CHARGE; T3 = model->B3SOIPDoxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->B3SOIPDoxideTrapDensityB * (N0 - Nl); T5 = model->B3SOIPDoxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->B3SOIPDleff * pParam->B3SOIPDleff * pParam->B3SOIPDweff * here->B3SOIPDm; T8 = model->B3SOIPDoxideTrapDensityA + model->B3SOIPDoxideTrapDensityB * Nl + model->B3SOIPDoxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int B3SOIPDnoise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; B3SOIPDmodel *model = (B3SOIPDmodel *)inModel; B3SOIPDinstance *here; struct b3soipdSizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B3SOIPDNSRCS]; double lnNdens[B3SOIPDNSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; int i; /* define the names of the noise sources */ static char *B3SOIPDnNames[B3SOIPDNSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in B3SOIPDdefs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".fb", /* noise due to floating body */ "" /* total transistor noise */ }; for (; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here != NULL; here = here->B3SOIPDnextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < B3SOIPDNSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->B3SOIPDname, B3SOIPDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < B3SOIPDNSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->B3SOIPDname, B3SOIPDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->B3SOIPDname, B3SOIPDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[B3SOIPDRDNOIZ], &lnNdens[B3SOIPDRDNOIZ], ckt, THERMNOISE, here->B3SOIPDdNodePrime, here->B3SOIPDdNode, here->B3SOIPDdrainConductance * here->B3SOIPDm); NevalSrc(&noizDens[B3SOIPDRSNOIZ], &lnNdens[B3SOIPDRSNOIZ], ckt, THERMNOISE, here->B3SOIPDsNodePrime, here->B3SOIPDsNode, here->B3SOIPDsourceConductance * here->B3SOIPDm); switch( model->B3SOIPDnoiMod ) { case 1: case 3: NevalSrc(&noizDens[B3SOIPDIDNOIZ], &lnNdens[B3SOIPDIDNOIZ], ckt, THERMNOISE, here->B3SOIPDdNodePrime, here->B3SOIPDsNodePrime, (2.0 / 3.0 * fabs(here->B3SOIPDm * (here->B3SOIPDgm + here->B3SOIPDgds + here->B3SOIPDgmbs)))); break; case 2: /* v2.2.3 bug fix */ case 4: NevalSrc(&noizDens[B3SOIPDIDNOIZ], &lnNdens[B3SOIPDIDNOIZ], ckt, THERMNOISE, here->B3SOIPDdNodePrime, here->B3SOIPDsNodePrime, (here->B3SOIPDueff * fabs((here->B3SOIPDqinv * here->B3SOIPDm) / (pParam->B3SOIPDleff * pParam->B3SOIPDleff+ here->B3SOIPDueff*fabs (here->B3SOIPDqinv * here->B3SOIPDm)* (here->B3SOIPDrds / here->B3SOIPDm))))); break; } NevalSrc(&noizDens[B3SOIPDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIPDdNodePrime, here->B3SOIPDsNodePrime, (double) 0.0); switch( model->B3SOIPDnoiMod ) { case 1: case 4: noizDens[B3SOIPDFLNOIZ] *= model->B3SOIPDkf * exp(model->B3SOIPDaf * log(MAX(fabs(here->B3SOIPDcd * here->B3SOIPDm), N_MINLOG))) / (pow(data->freq, model->B3SOIPDef) * pParam->B3SOIPDleff * pParam->B3SOIPDleff * model->B3SOIPDcox); break; case 2: case 3: vgs = *(ckt->CKTstates[0] + here->B3SOIPDvgs); vds = *(ckt->CKTstates[0] + here->B3SOIPDvds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } if (vgs >= here->B3SOIPDvon + 0.1) { Ssi = B3SOIPDStrongInversionNoiseEval(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[B3SOIPDFLNOIZ] *= Ssi; } else { pParam = here->pParam; T10 = model->B3SOIPDoxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->B3SOIPDweff * here->B3SOIPDm * pParam->B3SOIPDleff * pow(data->freq, model->B3SOIPDef) * 4.0e36; Swi = T10 / T11 * here->B3SOIPDcd * here->B3SOIPDm * here->B3SOIPDcd * here->B3SOIPDm; Slimit = B3SOIPDStrongInversionNoiseEval( here->B3SOIPDvon + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[B3SOIPDFLNOIZ] *= (Slimit * Swi) / T1; else noizDens[B3SOIPDFLNOIZ] *= 0.0; } break; } lnNdens[B3SOIPDFLNOIZ] = log(MAX(noizDens[B3SOIPDFLNOIZ], N_MINLOG)); /* Low frequency excess noise due to FBE */ NevalSrc(&noizDens[B3SOIPDFBNOIZ], &lnNdens[B3SOIPDFBNOIZ], ckt, SHOTNOISE, here->B3SOIPDsNodePrime, here->B3SOIPDbNode, 2.0 * model->B3SOIPDnoif * here->B3SOIPDibs * here->B3SOIPDm); noizDens[B3SOIPDTOTNOIZ] = noizDens[B3SOIPDRDNOIZ] + noizDens[B3SOIPDRSNOIZ] + noizDens[B3SOIPDIDNOIZ] + noizDens[B3SOIPDFLNOIZ] + noizDens[B3SOIPDFBNOIZ]; lnNdens[B3SOIPDTOTNOIZ] = log(MAX(noizDens[B3SOIPDTOTNOIZ], N_MINLOG)); *OnDens += noizDens[B3SOIPDTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < B3SOIPDNSRCS; i++) { here->B3SOIPDnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < B3SOIPDNSRCS; i++) { here->B3SOIPDnVar[OUTNOIZ][i] = 0.0; here->B3SOIPDnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < B3SOIPDNSRCS; i++) { if (i != B3SOIPDTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->B3SOIPDnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->B3SOIPDnVar[LNLSTDENS][i] + data->lnGainInv, data); here->B3SOIPDnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->B3SOIPDnVar[OUTNOIZ][i] += tempOnoise; here->B3SOIPDnVar[OUTNOIZ][B3SOIPDTOTNOIZ] += tempOnoise; here->B3SOIPDnVar[INNOIZ][i] += tempInoise; here->B3SOIPDnVar[INNOIZ][B3SOIPDTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < B3SOIPDNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < B3SOIPDNSRCS; i++) { data->outpVector[data->outNumber++] = here->B3SOIPDnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->B3SOIPDnVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_pd/b3soipdset.c0000644000265600020320000016102612264261473022700 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soipdset.c 98/5/01 Modified by Pin Su and Jan Feng 99/2/15 Modified by Pin Su 99/4/30 Modified by Pin Su, Wei Jin 99/9/27 Modified by Pin Su 00/3/1 Modified by Pin Su 01/2/15 Modified by Pin Su 02/3/5 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.2.3 02/3/5 Pin Su * BSIMPD2.2.3 release */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soipddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int B3SOIPDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { B3SOIPDmodel *model = (B3SOIPDmodel*)inModel; B3SOIPDinstance *here; int error; CKTnode *tmp; double Cboxt; CKTnode *tmpNode; IFuid tmpName; /* loop through all the B3SOIPD device models */ for( ; model != NULL; model = model->B3SOIPDnextModel ) { /* Default value Processing for B3SOIPD MOSFET Models */ if (!model->B3SOIPDtypeGiven) model->B3SOIPDtype = NMOS; if (!model->B3SOIPDmobModGiven) model->B3SOIPDmobMod = 1; if (!model->B3SOIPDbinUnitGiven) model->B3SOIPDbinUnit = 1; if (!model->B3SOIPDparamChkGiven) model->B3SOIPDparamChk = 0; if (!model->B3SOIPDcapModGiven) model->B3SOIPDcapMod = 2; if (!model->B3SOIPDnoiModGiven) model->B3SOIPDnoiMod = 1; if (!model->B3SOIPDshModGiven) model->B3SOIPDshMod = 0; if (!model->B3SOIPDversionGiven) model->B3SOIPDversion = 2.0; if (!model->B3SOIPDtoxGiven) model->B3SOIPDtox = 100.0e-10; model->B3SOIPDcox = 3.453133e-11 / model->B3SOIPDtox; /* v2.2.3 */ if (!model->B3SOIPDdtoxcvGiven) model->B3SOIPDdtoxcv = 0.0; if (!model->B3SOIPDcdscGiven) model->B3SOIPDcdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->B3SOIPDcdscbGiven) model->B3SOIPDcdscb = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIPDcdscdGiven) model->B3SOIPDcdscd = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIPDcitGiven) model->B3SOIPDcit = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIPDnfactorGiven) model->B3SOIPDnfactor = 1; if (!model->B3SOIPDvsatGiven) model->B3SOIPDvsat = 8.0e4; /* unit m/s */ if (!model->B3SOIPDatGiven) model->B3SOIPDat = 3.3e4; /* unit m/s */ if (!model->B3SOIPDa0Given) model->B3SOIPDa0 = 1.0; if (!model->B3SOIPDagsGiven) model->B3SOIPDags = 0.0; if (!model->B3SOIPDa1Given) model->B3SOIPDa1 = 0.0; if (!model->B3SOIPDa2Given) model->B3SOIPDa2 = 1.0; if (!model->B3SOIPDketaGiven) model->B3SOIPDketa = -0.6; /* unit / V */ if (!model->B3SOIPDnsubGiven) model->B3SOIPDnsub = 6.0e16; /* unit 1/cm3 */ if (!model->B3SOIPDnpeakGiven) model->B3SOIPDnpeak = 1.7e17; /* unit 1/cm3 */ if (!model->B3SOIPDngateGiven) model->B3SOIPDngate = 0; /* unit 1/cm3 */ if (!model->B3SOIPDvbmGiven) model->B3SOIPDvbm = -3.0; if (!model->B3SOIPDxtGiven) model->B3SOIPDxt = 1.55e-7; if (!model->B3SOIPDkt1Given) model->B3SOIPDkt1 = -0.11; /* unit V */ if (!model->B3SOIPDkt1lGiven) model->B3SOIPDkt1l = 0.0; /* unit V*m */ if (!model->B3SOIPDkt2Given) model->B3SOIPDkt2 = 0.022; /* No unit */ if (!model->B3SOIPDk3Given) model->B3SOIPDk3 = 0.0; if (!model->B3SOIPDk3bGiven) model->B3SOIPDk3b = 0.0; if (!model->B3SOIPDw0Given) model->B3SOIPDw0 = 2.5e-6; if (!model->B3SOIPDnlxGiven) model->B3SOIPDnlx = 1.74e-7; if (!model->B3SOIPDdvt0Given) model->B3SOIPDdvt0 = 2.2; if (!model->B3SOIPDdvt1Given) model->B3SOIPDdvt1 = 0.53; if (!model->B3SOIPDdvt2Given) model->B3SOIPDdvt2 = -0.032; /* unit 1 / V */ if (!model->B3SOIPDdvt0wGiven) model->B3SOIPDdvt0w = 0.0; if (!model->B3SOIPDdvt1wGiven) model->B3SOIPDdvt1w = 5.3e6; if (!model->B3SOIPDdvt2wGiven) model->B3SOIPDdvt2w = -0.032; if (!model->B3SOIPDdroutGiven) model->B3SOIPDdrout = 0.56; if (!model->B3SOIPDdsubGiven) model->B3SOIPDdsub = model->B3SOIPDdrout; if (!model->B3SOIPDvth0Given) model->B3SOIPDvth0 = (model->B3SOIPDtype == NMOS) ? 0.7 : -0.7; if (!model->B3SOIPDuaGiven) model->B3SOIPDua = 2.25e-9; /* unit m/V */ if (!model->B3SOIPDua1Given) model->B3SOIPDua1 = 4.31e-9; /* unit m/V */ if (!model->B3SOIPDubGiven) model->B3SOIPDub = 5.87e-19; /* unit (m/V)**2 */ if (!model->B3SOIPDub1Given) model->B3SOIPDub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->B3SOIPDucGiven) model->B3SOIPDuc = (model->B3SOIPDmobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->B3SOIPDuc1Given) model->B3SOIPDuc1 = (model->B3SOIPDmobMod == 3) ? -0.056 : -0.056e-9; if (!model->B3SOIPDu0Given) model->B3SOIPDu0 = (model->B3SOIPDtype == NMOS) ? 0.067 : 0.025; if (!model->B3SOIPDuteGiven) model->B3SOIPDute = -1.5; if (!model->B3SOIPDvoffGiven) model->B3SOIPDvoff = -0.08; if (!model->B3SOIPDdeltaGiven) model->B3SOIPDdelta = 0.01; if (!model->B3SOIPDrdswGiven) model->B3SOIPDrdsw = 100; if (!model->B3SOIPDprwgGiven) model->B3SOIPDprwg = 0.0; /* unit 1/V */ if (!model->B3SOIPDprwbGiven) model->B3SOIPDprwb = 0.0; if (!model->B3SOIPDprtGiven) if (!model->B3SOIPDprtGiven) model->B3SOIPDprt = 0.0; if (!model->B3SOIPDeta0Given) model->B3SOIPDeta0 = 0.08; /* no unit */ if (!model->B3SOIPDetabGiven) model->B3SOIPDetab = -0.07; /* unit 1/V */ if (!model->B3SOIPDpclmGiven) model->B3SOIPDpclm = 1.3; /* no unit */ if (!model->B3SOIPDpdibl1Given) model->B3SOIPDpdibl1 = .39; /* no unit */ if (!model->B3SOIPDpdibl2Given) model->B3SOIPDpdibl2 = 0.0086; /* no unit */ if (!model->B3SOIPDpdiblbGiven) model->B3SOIPDpdiblb = 0.0; /* 1/V */ if (!model->B3SOIPDpvagGiven) model->B3SOIPDpvag = 0.0; if (!model->B3SOIPDwrGiven) model->B3SOIPDwr = 1.0; if (!model->B3SOIPDdwgGiven) model->B3SOIPDdwg = 0.0; if (!model->B3SOIPDdwbGiven) model->B3SOIPDdwb = 0.0; if (!model->B3SOIPDb0Given) model->B3SOIPDb0 = 0.0; if (!model->B3SOIPDb1Given) model->B3SOIPDb1 = 0.0; if (!model->B3SOIPDalpha0Given) model->B3SOIPDalpha0 = 0.0; if (!model->B3SOIPDcgslGiven) model->B3SOIPDcgsl = 0.0; if (!model->B3SOIPDcgdlGiven) model->B3SOIPDcgdl = 0.0; if (!model->B3SOIPDckappaGiven) model->B3SOIPDckappa = 0.6; if (!model->B3SOIPDclcGiven) model->B3SOIPDclc = 0.1e-7; if (!model->B3SOIPDcleGiven) model->B3SOIPDcle = 0.0; if (!model->B3SOIPDtboxGiven) model->B3SOIPDtbox = 3e-7; if (!model->B3SOIPDtsiGiven) model->B3SOIPDtsi = 1e-7; if (!model->B3SOIPDxjGiven) model->B3SOIPDxj = model->B3SOIPDtsi; if (!model->B3SOIPDrbodyGiven) model->B3SOIPDrbody = 0.0; if (!model->B3SOIPDrbshGiven) model->B3SOIPDrbsh = 0.0; if (!model->B3SOIPDrth0Given) model->B3SOIPDrth0 = 0; if (!model->B3SOIPDcth0Given) model->B3SOIPDcth0 = 0; if (!model->B3SOIPDagidlGiven) model->B3SOIPDagidl = 0.0; if (!model->B3SOIPDbgidlGiven) model->B3SOIPDbgidl = 0.0; if (!model->B3SOIPDngidlGiven) model->B3SOIPDngidl = 1.2; if (!model->B3SOIPDndiodeGiven) model->B3SOIPDndiode = 1.0; if (!model->B3SOIPDntunGiven) model->B3SOIPDntun = 10.0; if (!model->B3SOIPDnrecf0Given) model->B3SOIPDnrecf0 = 2.0; if (!model->B3SOIPDnrecr0Given) model->B3SOIPDnrecr0 = 10.0; if (!model->B3SOIPDisbjtGiven) model->B3SOIPDisbjt = 1e-6; if (!model->B3SOIPDisdifGiven) model->B3SOIPDisdif = 0.0; if (!model->B3SOIPDisrecGiven) model->B3SOIPDisrec = 1e-5; if (!model->B3SOIPDistunGiven) model->B3SOIPDistun = 0.0; if (!model->B3SOIPDxbjtGiven) model->B3SOIPDxbjt = 1; /* if (!model->B3SOIPDxdifGiven) model->B3SOIPDxdif = 1; */ if (!model->B3SOIPDxdifGiven) model->B3SOIPDxdif = model->B3SOIPDxbjt; if (!model->B3SOIPDxrecGiven) model->B3SOIPDxrec = 1; if (!model->B3SOIPDxtunGiven) model->B3SOIPDxtun = 0; if (!model->B3SOIPDttGiven) model->B3SOIPDtt = 1e-12; if (!model->B3SOIPDasdGiven) model->B3SOIPDasd = 0.3; /* unit degree celcius */ if (!model->B3SOIPDtnomGiven) model->B3SOIPDtnom = ckt->CKTnomTemp; if (!model->B3SOIPDLintGiven) model->B3SOIPDLint = 0.0; if (!model->B3SOIPDLlGiven) model->B3SOIPDLl = 0.0; if (!model->B3SOIPDLlcGiven) model->B3SOIPDLlc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDLlnGiven) model->B3SOIPDLln = 1.0; if (!model->B3SOIPDLwGiven) model->B3SOIPDLw = 0.0; if (!model->B3SOIPDLwcGiven) model->B3SOIPDLwc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDLwnGiven) model->B3SOIPDLwn = 1.0; if (!model->B3SOIPDLwlGiven) model->B3SOIPDLwl = 0.0; if (!model->B3SOIPDLwlcGiven) model->B3SOIPDLwlc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDLminGiven) model->B3SOIPDLmin = 0.0; if (!model->B3SOIPDLmaxGiven) model->B3SOIPDLmax = 1.0; if (!model->B3SOIPDWintGiven) model->B3SOIPDWint = 0.0; if (!model->B3SOIPDWlGiven) model->B3SOIPDWl = 0.0; if (!model->B3SOIPDWlcGiven) model->B3SOIPDWlc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDWlnGiven) model->B3SOIPDWln = 1.0; if (!model->B3SOIPDWwGiven) model->B3SOIPDWw = 0.0; if (!model->B3SOIPDWwcGiven) model->B3SOIPDWwc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDWwnGiven) model->B3SOIPDWwn = 1.0; if (!model->B3SOIPDWwlGiven) model->B3SOIPDWwl = 0.0; if (!model->B3SOIPDWwlcGiven) model->B3SOIPDWwlc = 0.0; /* v2.2.3 */ if (!model->B3SOIPDWminGiven) model->B3SOIPDWmin = 0.0; if (!model->B3SOIPDWmaxGiven) model->B3SOIPDWmax = 1.0; if (!model->B3SOIPDdwcGiven) model->B3SOIPDdwc = model->B3SOIPDWint; if (!model->B3SOIPDdlcGiven) model->B3SOIPDdlc = model->B3SOIPDLint; /* v2.2 release */ if (!model->B3SOIPDwth0Given) model->B3SOIPDwth0 = 0.0; if (!model->B3SOIPDrhaloGiven) model->B3SOIPDrhalo = 1e15; if (!model->B3SOIPDntoxGiven) model->B3SOIPDntox = 1; if (!model->B3SOIPDtoxrefGiven) model->B3SOIPDtoxref = 2.5e-9; if (!model->B3SOIPDebgGiven) model->B3SOIPDebg = 1.2; if (!model->B3SOIPDvevbGiven) model->B3SOIPDvevb = 0.075; if (!model->B3SOIPDalphaGB1Given) model->B3SOIPDalphaGB1 = 0.35; if (!model->B3SOIPDbetaGB1Given) model->B3SOIPDbetaGB1 = 0.03; if (!model->B3SOIPDvgb1Given) model->B3SOIPDvgb1 = 300; if (!model->B3SOIPDalphaGB2Given) model->B3SOIPDalphaGB2 = 0.43; if (!model->B3SOIPDbetaGB2Given) model->B3SOIPDbetaGB2 = 0.05; if (!model->B3SOIPDvecbGiven) model->B3SOIPDvecb = 0.026; if (!model->B3SOIPDvgb2Given) model->B3SOIPDvgb2 = 17; if (!model->B3SOIPDtoxqmGiven) model->B3SOIPDtoxqm = model->B3SOIPDtox; if (!model->B3SOIPDvoxhGiven) model->B3SOIPDvoxh = 5.0; if (!model->B3SOIPDdeltavoxGiven) model->B3SOIPDdeltavox = 0.005; if (!model->B3SOIPDigModGiven) model->B3SOIPDigMod = 0; /* v2.0 release */ if (!model->B3SOIPDk1w1Given) model->B3SOIPDk1w1 = 0.0; if (!model->B3SOIPDk1w2Given) model->B3SOIPDk1w2 = 0.0; if (!model->B3SOIPDketasGiven) model->B3SOIPDketas = 0.0; if (!model->B3SOIPDdwbcGiven) model->B3SOIPDdwbc = 0.0; if (!model->B3SOIPDbeta0Given) model->B3SOIPDbeta0 = 0.0; if (!model->B3SOIPDbeta1Given) model->B3SOIPDbeta1 = 0.0; if (!model->B3SOIPDbeta2Given) model->B3SOIPDbeta2 = 0.1; if (!model->B3SOIPDvdsatii0Given) model->B3SOIPDvdsatii0 = 0.9; if (!model->B3SOIPDtiiGiven) model->B3SOIPDtii = 0.0; if (!model->B3SOIPDliiGiven) model->B3SOIPDlii = 0.0; if (!model->B3SOIPDsii0Given) model->B3SOIPDsii0 = 0.5; if (!model->B3SOIPDsii1Given) model->B3SOIPDsii1 = 0.1; if (!model->B3SOIPDsii2Given) model->B3SOIPDsii2 = 0.0; if (!model->B3SOIPDsiidGiven) model->B3SOIPDsiid = 0.0; if (!model->B3SOIPDfbjtiiGiven) model->B3SOIPDfbjtii = 0.0; if (!model->B3SOIPDesatiiGiven) model->B3SOIPDesatii = 1e7; if (!model->B3SOIPDlnGiven) model->B3SOIPDln = 2e-6; if (!model->B3SOIPDvrec0Given) model->B3SOIPDvrec0 = 0; if (!model->B3SOIPDvtun0Given) model->B3SOIPDvtun0 = 0; if (!model->B3SOIPDnbjtGiven) model->B3SOIPDnbjt = 1.0; if (!model->B3SOIPDlbjt0Given) model->B3SOIPDlbjt0 = 0.20e-6; if (!model->B3SOIPDldif0Given) model->B3SOIPDldif0 = 1.0; if (!model->B3SOIPDvabjtGiven) model->B3SOIPDvabjt = 10.0; if (!model->B3SOIPDaelyGiven) model->B3SOIPDaely = 0; if (!model->B3SOIPDahliGiven) model->B3SOIPDahli = 0; if (!model->B3SOIPDrbodyGiven) model->B3SOIPDrbody = 0.0; if (!model->B3SOIPDrbshGiven) model->B3SOIPDrbsh = 0.0; if (!model->B3SOIPDntrecfGiven) model->B3SOIPDntrecf = 0.0; if (!model->B3SOIPDntrecrGiven) model->B3SOIPDntrecr = 0.0; if (!model->B3SOIPDndifGiven) model->B3SOIPDndif = -1.0; if (!model->B3SOIPDdlcbGiven) model->B3SOIPDdlcb = 0.0; if (!model->B3SOIPDfbodyGiven) model->B3SOIPDfbody = 1.0; if (!model->B3SOIPDtcjswgGiven) model->B3SOIPDtcjswg = 0.0; if (!model->B3SOIPDtpbswgGiven) model->B3SOIPDtpbswg = 0.0; if (!model->B3SOIPDacdeGiven) model->B3SOIPDacde = 1.0; if (!model->B3SOIPDmoinGiven) model->B3SOIPDmoin = 15.0; if (!model->B3SOIPDdelvtGiven) model->B3SOIPDdelvt = 0.0; if (!model->B3SOIPDkb1Given) model->B3SOIPDkb1 = 1.0; if (!model->B3SOIPDdlbgGiven) model->B3SOIPDdlbg = 0.0; /* Added for binning - START */ /* Length dependence */ if (!model->B3SOIPDlnpeakGiven) model->B3SOIPDlnpeak = 0.0; if (!model->B3SOIPDlnsubGiven) model->B3SOIPDlnsub = 0.0; if (!model->B3SOIPDlngateGiven) model->B3SOIPDlngate = 0.0; if (!model->B3SOIPDlvth0Given) model->B3SOIPDlvth0 = 0.0; if (!model->B3SOIPDlk1Given) model->B3SOIPDlk1 = 0.0; if (!model->B3SOIPDlk1w1Given) model->B3SOIPDlk1w1 = 0.0; if (!model->B3SOIPDlk1w2Given) model->B3SOIPDlk1w2 = 0.0; if (!model->B3SOIPDlk2Given) model->B3SOIPDlk2 = 0.0; if (!model->B3SOIPDlk3Given) model->B3SOIPDlk3 = 0.0; if (!model->B3SOIPDlk3bGiven) model->B3SOIPDlk3b = 0.0; if (!model->B3SOIPDlkb1Given) model->B3SOIPDlkb1 = 0.0; if (!model->B3SOIPDlw0Given) model->B3SOIPDlw0 = 0.0; if (!model->B3SOIPDlnlxGiven) model->B3SOIPDlnlx = 0.0; if (!model->B3SOIPDldvt0Given) model->B3SOIPDldvt0 = 0.0; if (!model->B3SOIPDldvt1Given) model->B3SOIPDldvt1 = 0.0; if (!model->B3SOIPDldvt2Given) model->B3SOIPDldvt2 = 0.0; if (!model->B3SOIPDldvt0wGiven) model->B3SOIPDldvt0w = 0.0; if (!model->B3SOIPDldvt1wGiven) model->B3SOIPDldvt1w = 0.0; if (!model->B3SOIPDldvt2wGiven) model->B3SOIPDldvt2w = 0.0; if (!model->B3SOIPDlu0Given) model->B3SOIPDlu0 = 0.0; if (!model->B3SOIPDluaGiven) model->B3SOIPDlua = 0.0; if (!model->B3SOIPDlubGiven) model->B3SOIPDlub = 0.0; if (!model->B3SOIPDlucGiven) model->B3SOIPDluc = 0.0; if (!model->B3SOIPDlvsatGiven) model->B3SOIPDlvsat = 0.0; if (!model->B3SOIPDla0Given) model->B3SOIPDla0 = 0.0; if (!model->B3SOIPDlagsGiven) model->B3SOIPDlags = 0.0; if (!model->B3SOIPDlb0Given) model->B3SOIPDlb0 = 0.0; if (!model->B3SOIPDlb1Given) model->B3SOIPDlb1 = 0.0; if (!model->B3SOIPDlketaGiven) model->B3SOIPDlketa = 0.0; if (!model->B3SOIPDlketasGiven) model->B3SOIPDlketas = 0.0; if (!model->B3SOIPDla1Given) model->B3SOIPDla1 = 0.0; if (!model->B3SOIPDla2Given) model->B3SOIPDla2 = 0.0; if (!model->B3SOIPDlrdswGiven) model->B3SOIPDlrdsw = 0.0; if (!model->B3SOIPDlprwbGiven) model->B3SOIPDlprwb = 0.0; if (!model->B3SOIPDlprwgGiven) model->B3SOIPDlprwg = 0.0; if (!model->B3SOIPDlwrGiven) model->B3SOIPDlwr = 0.0; if (!model->B3SOIPDlnfactorGiven) model->B3SOIPDlnfactor = 0.0; if (!model->B3SOIPDldwgGiven) model->B3SOIPDldwg = 0.0; if (!model->B3SOIPDldwbGiven) model->B3SOIPDldwb = 0.0; if (!model->B3SOIPDlvoffGiven) model->B3SOIPDlvoff = 0.0; if (!model->B3SOIPDleta0Given) model->B3SOIPDleta0 = 0.0; if (!model->B3SOIPDletabGiven) model->B3SOIPDletab = 0.0; if (!model->B3SOIPDldsubGiven) model->B3SOIPDldsub = 0.0; if (!model->B3SOIPDlcitGiven) model->B3SOIPDlcit = 0.0; if (!model->B3SOIPDlcdscGiven) model->B3SOIPDlcdsc = 0.0; if (!model->B3SOIPDlcdscbGiven) model->B3SOIPDlcdscb = 0.0; if (!model->B3SOIPDlcdscdGiven) model->B3SOIPDlcdscd = 0.0; if (!model->B3SOIPDlpclmGiven) model->B3SOIPDlpclm = 0.0; if (!model->B3SOIPDlpdibl1Given) model->B3SOIPDlpdibl1 = 0.0; if (!model->B3SOIPDlpdibl2Given) model->B3SOIPDlpdibl2 = 0.0; if (!model->B3SOIPDlpdiblbGiven) model->B3SOIPDlpdiblb = 0.0; if (!model->B3SOIPDldroutGiven) model->B3SOIPDldrout = 0.0; if (!model->B3SOIPDlpvagGiven) model->B3SOIPDlpvag = 0.0; if (!model->B3SOIPDldeltaGiven) model->B3SOIPDldelta = 0.0; if (!model->B3SOIPDlalpha0Given) model->B3SOIPDlalpha0 = 0.0; if (!model->B3SOIPDlfbjtiiGiven) model->B3SOIPDlfbjtii = 0.0; if (!model->B3SOIPDlbeta0Given) model->B3SOIPDlbeta0 = 0.0; if (!model->B3SOIPDlbeta1Given) model->B3SOIPDlbeta1 = 0.0; if (!model->B3SOIPDlbeta2Given) model->B3SOIPDlbeta2 = 0.0; if (!model->B3SOIPDlvdsatii0Given) model->B3SOIPDlvdsatii0 = 0.0; if (!model->B3SOIPDlliiGiven) model->B3SOIPDllii = 0.0; if (!model->B3SOIPDlesatiiGiven) model->B3SOIPDlesatii = 0.0; if (!model->B3SOIPDlsii0Given) model->B3SOIPDlsii0 = 0.0; if (!model->B3SOIPDlsii1Given) model->B3SOIPDlsii1 = 0.0; if (!model->B3SOIPDlsii2Given) model->B3SOIPDlsii2 = 0.0; if (!model->B3SOIPDlsiidGiven) model->B3SOIPDlsiid = 0.0; if (!model->B3SOIPDlagidlGiven) model->B3SOIPDlagidl = 0.0; if (!model->B3SOIPDlbgidlGiven) model->B3SOIPDlbgidl = 0.0; if (!model->B3SOIPDlngidlGiven) model->B3SOIPDlngidl = 0.0; if (!model->B3SOIPDlntunGiven) model->B3SOIPDlntun = 0.0; if (!model->B3SOIPDlndiodeGiven) model->B3SOIPDlndiode = 0.0; if (!model->B3SOIPDlnrecf0Given) model->B3SOIPDlnrecf0 = 0.0; if (!model->B3SOIPDlnrecr0Given) model->B3SOIPDlnrecr0 = 0.0; if (!model->B3SOIPDlisbjtGiven) model->B3SOIPDlisbjt = 0.0; if (!model->B3SOIPDlisdifGiven) model->B3SOIPDlisdif = 0.0; if (!model->B3SOIPDlisrecGiven) model->B3SOIPDlisrec = 0.0; if (!model->B3SOIPDlistunGiven) model->B3SOIPDlistun = 0.0; if (!model->B3SOIPDlvrec0Given) model->B3SOIPDlvrec0 = 0.0; if (!model->B3SOIPDlvtun0Given) model->B3SOIPDlvtun0 = 0.0; if (!model->B3SOIPDlnbjtGiven) model->B3SOIPDlnbjt = 0.0; if (!model->B3SOIPDllbjt0Given) model->B3SOIPDllbjt0 = 0.0; if (!model->B3SOIPDlvabjtGiven) model->B3SOIPDlvabjt = 0.0; if (!model->B3SOIPDlaelyGiven) model->B3SOIPDlaely = 0.0; if (!model->B3SOIPDlahliGiven) model->B3SOIPDlahli = 0.0; /* CV Model */ if (!model->B3SOIPDlvsdfbGiven) model->B3SOIPDlvsdfb = 0.0; if (!model->B3SOIPDlvsdthGiven) model->B3SOIPDlvsdth = 0.0; if (!model->B3SOIPDldelvtGiven) model->B3SOIPDldelvt = 0.0; if (!model->B3SOIPDlacdeGiven) model->B3SOIPDlacde = 0.0; if (!model->B3SOIPDlmoinGiven) model->B3SOIPDlmoin = 0.0; /* Width dependence */ if (!model->B3SOIPDwnpeakGiven) model->B3SOIPDwnpeak = 0.0; if (!model->B3SOIPDwnsubGiven) model->B3SOIPDwnsub = 0.0; if (!model->B3SOIPDwngateGiven) model->B3SOIPDwngate = 0.0; if (!model->B3SOIPDwvth0Given) model->B3SOIPDwvth0 = 0.0; if (!model->B3SOIPDwk1Given) model->B3SOIPDwk1 = 0.0; if (!model->B3SOIPDwk1w1Given) model->B3SOIPDwk1w1 = 0.0; if (!model->B3SOIPDwk1w2Given) model->B3SOIPDwk1w2 = 0.0; if (!model->B3SOIPDwk2Given) model->B3SOIPDwk2 = 0.0; if (!model->B3SOIPDwk3Given) model->B3SOIPDwk3 = 0.0; if (!model->B3SOIPDwk3bGiven) model->B3SOIPDwk3b = 0.0; if (!model->B3SOIPDwkb1Given) model->B3SOIPDwkb1 = 0.0; if (!model->B3SOIPDww0Given) model->B3SOIPDww0 = 0.0; if (!model->B3SOIPDwnlxGiven) model->B3SOIPDwnlx = 0.0; if (!model->B3SOIPDwdvt0Given) model->B3SOIPDwdvt0 = 0.0; if (!model->B3SOIPDwdvt1Given) model->B3SOIPDwdvt1 = 0.0; if (!model->B3SOIPDwdvt2Given) model->B3SOIPDwdvt2 = 0.0; if (!model->B3SOIPDwdvt0wGiven) model->B3SOIPDwdvt0w = 0.0; if (!model->B3SOIPDwdvt1wGiven) model->B3SOIPDwdvt1w = 0.0; if (!model->B3SOIPDwdvt2wGiven) model->B3SOIPDwdvt2w = 0.0; if (!model->B3SOIPDwu0Given) model->B3SOIPDwu0 = 0.0; if (!model->B3SOIPDwuaGiven) model->B3SOIPDwua = 0.0; if (!model->B3SOIPDwubGiven) model->B3SOIPDwub = 0.0; if (!model->B3SOIPDwucGiven) model->B3SOIPDwuc = 0.0; if (!model->B3SOIPDwvsatGiven) model->B3SOIPDwvsat = 0.0; if (!model->B3SOIPDwa0Given) model->B3SOIPDwa0 = 0.0; if (!model->B3SOIPDwagsGiven) model->B3SOIPDwags = 0.0; if (!model->B3SOIPDwb0Given) model->B3SOIPDwb0 = 0.0; if (!model->B3SOIPDwb1Given) model->B3SOIPDwb1 = 0.0; if (!model->B3SOIPDwketaGiven) model->B3SOIPDwketa = 0.0; if (!model->B3SOIPDwketasGiven) model->B3SOIPDwketas = 0.0; if (!model->B3SOIPDwa1Given) model->B3SOIPDwa1 = 0.0; if (!model->B3SOIPDwa2Given) model->B3SOIPDwa2 = 0.0; if (!model->B3SOIPDwrdswGiven) model->B3SOIPDwrdsw = 0.0; if (!model->B3SOIPDwprwbGiven) model->B3SOIPDwprwb = 0.0; if (!model->B3SOIPDwprwgGiven) model->B3SOIPDwprwg = 0.0; if (!model->B3SOIPDwwrGiven) model->B3SOIPDwwr = 0.0; if (!model->B3SOIPDwnfactorGiven) model->B3SOIPDwnfactor = 0.0; if (!model->B3SOIPDwdwgGiven) model->B3SOIPDwdwg = 0.0; if (!model->B3SOIPDwdwbGiven) model->B3SOIPDwdwb = 0.0; if (!model->B3SOIPDwvoffGiven) model->B3SOIPDwvoff = 0.0; if (!model->B3SOIPDweta0Given) model->B3SOIPDweta0 = 0.0; if (!model->B3SOIPDwetabGiven) model->B3SOIPDwetab = 0.0; if (!model->B3SOIPDwdsubGiven) model->B3SOIPDwdsub = 0.0; if (!model->B3SOIPDwcitGiven) model->B3SOIPDwcit = 0.0; if (!model->B3SOIPDwcdscGiven) model->B3SOIPDwcdsc = 0.0; if (!model->B3SOIPDwcdscbGiven) model->B3SOIPDwcdscb = 0.0; if (!model->B3SOIPDwcdscdGiven) model->B3SOIPDwcdscd = 0.0; if (!model->B3SOIPDwpclmGiven) model->B3SOIPDwpclm = 0.0; if (!model->B3SOIPDwpdibl1Given) model->B3SOIPDwpdibl1 = 0.0; if (!model->B3SOIPDwpdibl2Given) model->B3SOIPDwpdibl2 = 0.0; if (!model->B3SOIPDwpdiblbGiven) model->B3SOIPDwpdiblb = 0.0; if (!model->B3SOIPDwdroutGiven) model->B3SOIPDwdrout = 0.0; if (!model->B3SOIPDwpvagGiven) model->B3SOIPDwpvag = 0.0; if (!model->B3SOIPDwdeltaGiven) model->B3SOIPDwdelta = 0.0; if (!model->B3SOIPDwalpha0Given) model->B3SOIPDwalpha0 = 0.0; if (!model->B3SOIPDwfbjtiiGiven) model->B3SOIPDwfbjtii = 0.0; if (!model->B3SOIPDwbeta0Given) model->B3SOIPDwbeta0 = 0.0; if (!model->B3SOIPDwbeta1Given) model->B3SOIPDwbeta1 = 0.0; if (!model->B3SOIPDwbeta2Given) model->B3SOIPDwbeta2 = 0.0; if (!model->B3SOIPDwvdsatii0Given) model->B3SOIPDwvdsatii0 = 0.0; if (!model->B3SOIPDwliiGiven) model->B3SOIPDwlii = 0.0; if (!model->B3SOIPDwesatiiGiven) model->B3SOIPDwesatii = 0.0; if (!model->B3SOIPDwsii0Given) model->B3SOIPDwsii0 = 0.0; if (!model->B3SOIPDwsii1Given) model->B3SOIPDwsii1 = 0.0; if (!model->B3SOIPDwsii2Given) model->B3SOIPDwsii2 = 0.0; if (!model->B3SOIPDwsiidGiven) model->B3SOIPDwsiid = 0.0; if (!model->B3SOIPDwagidlGiven) model->B3SOIPDwagidl = 0.0; if (!model->B3SOIPDwbgidlGiven) model->B3SOIPDwbgidl = 0.0; if (!model->B3SOIPDwngidlGiven) model->B3SOIPDwngidl = 0.0; if (!model->B3SOIPDwntunGiven) model->B3SOIPDwntun = 0.0; if (!model->B3SOIPDwndiodeGiven) model->B3SOIPDwndiode = 0.0; if (!model->B3SOIPDwnrecf0Given) model->B3SOIPDwnrecf0 = 0.0; if (!model->B3SOIPDwnrecr0Given) model->B3SOIPDwnrecr0 = 0.0; if (!model->B3SOIPDwisbjtGiven) model->B3SOIPDwisbjt = 0.0; if (!model->B3SOIPDwisdifGiven) model->B3SOIPDwisdif = 0.0; if (!model->B3SOIPDwisrecGiven) model->B3SOIPDwisrec = 0.0; if (!model->B3SOIPDwistunGiven) model->B3SOIPDwistun = 0.0; if (!model->B3SOIPDwvrec0Given) model->B3SOIPDwvrec0 = 0.0; if (!model->B3SOIPDwvtun0Given) model->B3SOIPDwvtun0 = 0.0; if (!model->B3SOIPDwnbjtGiven) model->B3SOIPDwnbjt = 0.0; if (!model->B3SOIPDwlbjt0Given) model->B3SOIPDwlbjt0 = 0.0; if (!model->B3SOIPDwvabjtGiven) model->B3SOIPDwvabjt = 0.0; if (!model->B3SOIPDwaelyGiven) model->B3SOIPDwaely = 0.0; if (!model->B3SOIPDwahliGiven) model->B3SOIPDwahli = 0.0; /* CV Model */ if (!model->B3SOIPDwvsdfbGiven) model->B3SOIPDwvsdfb = 0.0; if (!model->B3SOIPDwvsdthGiven) model->B3SOIPDwvsdth = 0.0; if (!model->B3SOIPDwdelvtGiven) model->B3SOIPDwdelvt = 0.0; if (!model->B3SOIPDwacdeGiven) model->B3SOIPDwacde = 0.0; if (!model->B3SOIPDwmoinGiven) model->B3SOIPDwmoin = 0.0; /* Cross-term dependence */ if (!model->B3SOIPDpnpeakGiven) model->B3SOIPDpnpeak = 0.0; if (!model->B3SOIPDpnsubGiven) model->B3SOIPDpnsub = 0.0; if (!model->B3SOIPDpngateGiven) model->B3SOIPDpngate = 0.0; if (!model->B3SOIPDpvth0Given) model->B3SOIPDpvth0 = 0.0; if (!model->B3SOIPDpk1Given) model->B3SOIPDpk1 = 0.0; if (!model->B3SOIPDpk1w1Given) model->B3SOIPDpk1w1 = 0.0; if (!model->B3SOIPDpk1w2Given) model->B3SOIPDpk1w2 = 0.0; if (!model->B3SOIPDpk2Given) model->B3SOIPDpk2 = 0.0; if (!model->B3SOIPDpk3Given) model->B3SOIPDpk3 = 0.0; if (!model->B3SOIPDpk3bGiven) model->B3SOIPDpk3b = 0.0; if (!model->B3SOIPDpkb1Given) model->B3SOIPDpkb1 = 0.0; if (!model->B3SOIPDpw0Given) model->B3SOIPDpw0 = 0.0; if (!model->B3SOIPDpnlxGiven) model->B3SOIPDpnlx = 0.0; if (!model->B3SOIPDpdvt0Given) model->B3SOIPDpdvt0 = 0.0; if (!model->B3SOIPDpdvt1Given) model->B3SOIPDpdvt1 = 0.0; if (!model->B3SOIPDpdvt2Given) model->B3SOIPDpdvt2 = 0.0; if (!model->B3SOIPDpdvt0wGiven) model->B3SOIPDpdvt0w = 0.0; if (!model->B3SOIPDpdvt1wGiven) model->B3SOIPDpdvt1w = 0.0; if (!model->B3SOIPDpdvt2wGiven) model->B3SOIPDpdvt2w = 0.0; if (!model->B3SOIPDpu0Given) model->B3SOIPDpu0 = 0.0; if (!model->B3SOIPDpuaGiven) model->B3SOIPDpua = 0.0; if (!model->B3SOIPDpubGiven) model->B3SOIPDpub = 0.0; if (!model->B3SOIPDpucGiven) model->B3SOIPDpuc = 0.0; if (!model->B3SOIPDpvsatGiven) model->B3SOIPDpvsat = 0.0; if (!model->B3SOIPDpa0Given) model->B3SOIPDpa0 = 0.0; if (!model->B3SOIPDpagsGiven) model->B3SOIPDpags = 0.0; if (!model->B3SOIPDpb0Given) model->B3SOIPDpb0 = 0.0; if (!model->B3SOIPDpb1Given) model->B3SOIPDpb1 = 0.0; if (!model->B3SOIPDpketaGiven) model->B3SOIPDpketa = 0.0; if (!model->B3SOIPDpketasGiven) model->B3SOIPDpketas = 0.0; if (!model->B3SOIPDpa1Given) model->B3SOIPDpa1 = 0.0; if (!model->B3SOIPDpa2Given) model->B3SOIPDpa2 = 0.0; if (!model->B3SOIPDprdswGiven) model->B3SOIPDprdsw = 0.0; if (!model->B3SOIPDpprwbGiven) model->B3SOIPDpprwb = 0.0; if (!model->B3SOIPDpprwgGiven) model->B3SOIPDpprwg = 0.0; if (!model->B3SOIPDpwrGiven) model->B3SOIPDpwr = 0.0; if (!model->B3SOIPDpnfactorGiven) model->B3SOIPDpnfactor = 0.0; if (!model->B3SOIPDpdwgGiven) model->B3SOIPDpdwg = 0.0; if (!model->B3SOIPDpdwbGiven) model->B3SOIPDpdwb = 0.0; if (!model->B3SOIPDpvoffGiven) model->B3SOIPDpvoff = 0.0; if (!model->B3SOIPDpeta0Given) model->B3SOIPDpeta0 = 0.0; if (!model->B3SOIPDpetabGiven) model->B3SOIPDpetab = 0.0; if (!model->B3SOIPDpdsubGiven) model->B3SOIPDpdsub = 0.0; if (!model->B3SOIPDpcitGiven) model->B3SOIPDpcit = 0.0; if (!model->B3SOIPDpcdscGiven) model->B3SOIPDpcdsc = 0.0; if (!model->B3SOIPDpcdscbGiven) model->B3SOIPDpcdscb = 0.0; if (!model->B3SOIPDpcdscdGiven) model->B3SOIPDpcdscd = 0.0; if (!model->B3SOIPDppclmGiven) model->B3SOIPDppclm = 0.0; if (!model->B3SOIPDppdibl1Given) model->B3SOIPDppdibl1 = 0.0; if (!model->B3SOIPDppdibl2Given) model->B3SOIPDppdibl2 = 0.0; if (!model->B3SOIPDppdiblbGiven) model->B3SOIPDppdiblb = 0.0; if (!model->B3SOIPDpdroutGiven) model->B3SOIPDpdrout = 0.0; if (!model->B3SOIPDppvagGiven) model->B3SOIPDppvag = 0.0; if (!model->B3SOIPDpdeltaGiven) model->B3SOIPDpdelta = 0.0; if (!model->B3SOIPDpalpha0Given) model->B3SOIPDpalpha0 = 0.0; if (!model->B3SOIPDpfbjtiiGiven) model->B3SOIPDpfbjtii = 0.0; if (!model->B3SOIPDpbeta0Given) model->B3SOIPDpbeta0 = 0.0; if (!model->B3SOIPDpbeta1Given) model->B3SOIPDpbeta1 = 0.0; if (!model->B3SOIPDpbeta2Given) model->B3SOIPDpbeta2 = 0.0; if (!model->B3SOIPDpvdsatii0Given) model->B3SOIPDpvdsatii0 = 0.0; if (!model->B3SOIPDpliiGiven) model->B3SOIPDplii = 0.0; if (!model->B3SOIPDpesatiiGiven) model->B3SOIPDpesatii = 0.0; if (!model->B3SOIPDpsii0Given) model->B3SOIPDpsii0 = 0.0; if (!model->B3SOIPDpsii1Given) model->B3SOIPDpsii1 = 0.0; if (!model->B3SOIPDpsii2Given) model->B3SOIPDpsii2 = 0.0; if (!model->B3SOIPDpsiidGiven) model->B3SOIPDpsiid = 0.0; if (!model->B3SOIPDpagidlGiven) model->B3SOIPDpagidl = 0.0; if (!model->B3SOIPDpbgidlGiven) model->B3SOIPDpbgidl = 0.0; if (!model->B3SOIPDpngidlGiven) model->B3SOIPDpngidl = 0.0; if (!model->B3SOIPDpntunGiven) model->B3SOIPDpntun = 0.0; if (!model->B3SOIPDpndiodeGiven) model->B3SOIPDpndiode = 0.0; if (!model->B3SOIPDpnrecf0Given) model->B3SOIPDpnrecf0 = 0.0; if (!model->B3SOIPDpnrecr0Given) model->B3SOIPDpnrecr0 = 0.0; if (!model->B3SOIPDpisbjtGiven) model->B3SOIPDpisbjt = 0.0; if (!model->B3SOIPDpisdifGiven) model->B3SOIPDpisdif = 0.0; if (!model->B3SOIPDpisrecGiven) model->B3SOIPDpisrec = 0.0; if (!model->B3SOIPDpistunGiven) model->B3SOIPDpistun = 0.0; if (!model->B3SOIPDpvrec0Given) model->B3SOIPDpvrec0 = 0.0; if (!model->B3SOIPDpvtun0Given) model->B3SOIPDpvtun0 = 0.0; if (!model->B3SOIPDpnbjtGiven) model->B3SOIPDpnbjt = 0.0; if (!model->B3SOIPDplbjt0Given) model->B3SOIPDplbjt0 = 0.0; if (!model->B3SOIPDpvabjtGiven) model->B3SOIPDpvabjt = 0.0; if (!model->B3SOIPDpaelyGiven) model->B3SOIPDpaely = 0.0; if (!model->B3SOIPDpahliGiven) model->B3SOIPDpahli = 0.0; /* CV Model */ if (!model->B3SOIPDpvsdfbGiven) model->B3SOIPDpvsdfb = 0.0; if (!model->B3SOIPDpvsdthGiven) model->B3SOIPDpvsdth = 0.0; if (!model->B3SOIPDpdelvtGiven) model->B3SOIPDpdelvt = 0.0; if (!model->B3SOIPDpacdeGiven) model->B3SOIPDpacde = 0.0; if (!model->B3SOIPDpmoinGiven) model->B3SOIPDpmoin = 0.0; /* Added for binning - END */ if (!model->B3SOIPDcfGiven) model->B3SOIPDcf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->B3SOIPDtox); if (!model->B3SOIPDcgdoGiven) { if (model->B3SOIPDdlcGiven && (model->B3SOIPDdlc > 0.0)) { model->B3SOIPDcgdo = model->B3SOIPDdlc * model->B3SOIPDcox - model->B3SOIPDcgdl ; } else model->B3SOIPDcgdo = 0.6 * model->B3SOIPDxj * model->B3SOIPDcox; } if (!model->B3SOIPDcgsoGiven) { if (model->B3SOIPDdlcGiven && (model->B3SOIPDdlc > 0.0)) { model->B3SOIPDcgso = model->B3SOIPDdlc * model->B3SOIPDcox - model->B3SOIPDcgsl ; } else model->B3SOIPDcgso = 0.6 * model->B3SOIPDxj * model->B3SOIPDcox; } if (!model->B3SOIPDcgeoGiven) { model->B3SOIPDcgeo = 0.0; } if (!model->B3SOIPDxpartGiven) model->B3SOIPDxpart = 0.0; if (!model->B3SOIPDsheetResistanceGiven) model->B3SOIPDsheetResistance = 0.0; if (!model->B3SOIPDcsdeswGiven) model->B3SOIPDcsdesw = 0.0; if (!model->B3SOIPDunitLengthGateSidewallJctCapGiven) model->B3SOIPDunitLengthGateSidewallJctCap = 1e-10; if (!model->B3SOIPDGatesidewallJctPotentialGiven) model->B3SOIPDGatesidewallJctPotential = 0.7; if (!model->B3SOIPDbodyJctGateSideGradingCoeffGiven) model->B3SOIPDbodyJctGateSideGradingCoeff = 0.5; if (!model->B3SOIPDoxideTrapDensityAGiven) { if (model->B3SOIPDtype == NMOS) model->B3SOIPDoxideTrapDensityA = 1e20; else model->B3SOIPDoxideTrapDensityA=9.9e18; } if (!model->B3SOIPDoxideTrapDensityBGiven) { if (model->B3SOIPDtype == NMOS) model->B3SOIPDoxideTrapDensityB = 5e4; else model->B3SOIPDoxideTrapDensityB = 2.4e3; } if (!model->B3SOIPDoxideTrapDensityCGiven) { if (model->B3SOIPDtype == NMOS) model->B3SOIPDoxideTrapDensityC = -1.4e-12; else model->B3SOIPDoxideTrapDensityC = 1.4e-12; } if (!model->B3SOIPDemGiven) model->B3SOIPDem = 4.1e7; /* V/m */ if (!model->B3SOIPDefGiven) model->B3SOIPDef = 1.0; if (!model->B3SOIPDafGiven) model->B3SOIPDaf = 1.0; if (!model->B3SOIPDkfGiven) model->B3SOIPDkf = 0.0; if (!model->B3SOIPDnoifGiven) model->B3SOIPDnoif = 1.0; /* loop through all the instances of the model */ for (here = model->B3SOIPDinstances; here != NULL ; here=here->B3SOIPDnextInstance) { /* allocate a chunk of the state vector */ here->B3SOIPDstates = *states; *states += B3SOIPDnumStates; /* perform the parameter defaulting */ if (!here->B3SOIPDdrainAreaGiven) here->B3SOIPDdrainArea = 0.0; if (!here->B3SOIPDdrainPerimeterGiven) here->B3SOIPDdrainPerimeter = 0.0; if (!here->B3SOIPDdrainSquaresGiven) here->B3SOIPDdrainSquares = 1.0; if (!here->B3SOIPDicVBSGiven) here->B3SOIPDicVBS = 0; if (!here->B3SOIPDicVDSGiven) here->B3SOIPDicVDS = 0; if (!here->B3SOIPDicVGSGiven) here->B3SOIPDicVGS = 0; if (!here->B3SOIPDicVESGiven) here->B3SOIPDicVES = 0; if (!here->B3SOIPDicVPSGiven) here->B3SOIPDicVPS = 0; if (!here->B3SOIPDbjtoffGiven) here->B3SOIPDbjtoff = 0; if (!here->B3SOIPDdebugModGiven) here->B3SOIPDdebugMod = 0; if (!here->B3SOIPDrth0Given) here->B3SOIPDrth0 = model->B3SOIPDrth0; if (!here->B3SOIPDcth0Given) here->B3SOIPDcth0 = model->B3SOIPDcth0; if (!here->B3SOIPDbodySquaresGiven) here->B3SOIPDbodySquares = 1.0; if (!here->B3SOIPDfrbodyGiven) here->B3SOIPDfrbody = 1.0; if (!here->B3SOIPDlGiven) here->B3SOIPDl = 5e-6; if (!here->B3SOIPDsourceAreaGiven) here->B3SOIPDsourceArea = 0; if (!here->B3SOIPDsourcePerimeterGiven) here->B3SOIPDsourcePerimeter = 0; if (!here->B3SOIPDsourceSquaresGiven) here->B3SOIPDsourceSquares = 1; if (!here->B3SOIPDwGiven) here->B3SOIPDw = 5e-6; if (!here->B3SOIPDmGiven) here->B3SOIPDm = 1; /* v2.0 release */ if (!here->B3SOIPDnbcGiven) here->B3SOIPDnbc = 0; if (!here->B3SOIPDnsegGiven) here->B3SOIPDnseg = 1; if (!here->B3SOIPDpdbcpGiven) here->B3SOIPDpdbcp = 0; if (!here->B3SOIPDpsbcpGiven) here->B3SOIPDpsbcp = 0; if (!here->B3SOIPDagbcpGiven) here->B3SOIPDagbcp = 0; if (!here->B3SOIPDaebcpGiven) here->B3SOIPDaebcp = 0; if (!here->B3SOIPDoffGiven) here->B3SOIPDoff = 0; /* process drain series resistance */ if ((model->B3SOIPDsheetResistance > 0.0) && (here->B3SOIPDdrainSquares > 0.0 ) && (here->B3SOIPDdNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIPDname,"drain"); if(error) return(error); here->B3SOIPDdNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIPDdNodePrime = here->B3SOIPDdNode; } /* process source series resistance */ if ((model->B3SOIPDsheetResistance > 0.0) && (here->B3SOIPDsourceSquares > 0.0 ) && (here->B3SOIPDsNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIPDname,"source"); if(error) return(error); here->B3SOIPDsNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIPDsNodePrime = here->B3SOIPDsNode; } /* process effective silicon film thickness */ model->B3SOIPDcbox = 3.453133e-11 / model->B3SOIPDtbox; model->B3SOIPDcsi = 1.03594e-10 / model->B3SOIPDtsi; Cboxt = model->B3SOIPDcbox * model->B3SOIPDcsi / (model->B3SOIPDcbox + model->B3SOIPDcsi); model->B3SOIPDqsi = Charge_q*model->B3SOIPDnpeak*1e6*model->B3SOIPDtsi; here->B3SOIPDfloat = 0; if (here->B3SOIPDpNode == -1) { /* floating body case -- 4-node */ error = CKTmkVolt(ckt,&tmp,here->B3SOIPDname,"Body"); if (error) return(error); here->B3SOIPDbNode = tmp->number; here->B3SOIPDpNode = 0; here->B3SOIPDfloat = 1; here->B3SOIPDbodyMod = 0; } else /* the 5th Node has been assigned */ { if (!here->B3SOIPDtnodeoutGiven) { /* if t-node not assigned */ if (here->B3SOIPDbNode == -1) { /* 5-node body tie, bNode has not been assigned */ if ((model->B3SOIPDrbody == 0.0) && (model->B3SOIPDrbsh == 0.0)) { /* ideal body tie, pNode is not used */ here->B3SOIPDbNode = here->B3SOIPDpNode; here->B3SOIPDbodyMod = 2; } else { /* nonideal body tie */ error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Body"); if (error) return(error); here->B3SOIPDbNode = tmp->number; here->B3SOIPDbodyMod = 1; } } else { /* 6-node body tie, bNode has been assigned */ if ((model->B3SOIPDrbody == 0.0) && (model->B3SOIPDrbsh == 0.0)) { printf("\n Warning: model parameter rbody=0!\n"); model->B3SOIPDrbody = 1e0; here->B3SOIPDbodyMod = 1; } else { /* nonideal body tie */ here->B3SOIPDbodyMod = 1; } } } else { /* t-node assigned */ if (here->B3SOIPDbNode == -1) { /* 4 nodes & t-node, floating body */ error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Body"); if (error) return(error); here->B3SOIPDbNode = tmp->number; here->B3SOIPDtempNode = here->B3SOIPDpNode; here->B3SOIPDpNode = 0; here->B3SOIPDfloat = 1; here->B3SOIPDbodyMod = 0; } else { /* 5 or 6 nodes & t-node, body-contact device */ if (here->B3SOIPDtempNode == -1) { /* 5 nodes & tnode */ if ((model->B3SOIPDrbody == 0.0) && (model->B3SOIPDrbsh == 0.0)) { /* ideal body tie, pNode is not used */ here->B3SOIPDtempNode = here->B3SOIPDbNode; here->B3SOIPDbNode = here->B3SOIPDpNode; here->B3SOIPDbodyMod = 2; } else { /* nonideal body tie */ here->B3SOIPDtempNode = here->B3SOIPDbNode; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Body"); if (error) return(error); here->B3SOIPDbNode = tmp->number; here->B3SOIPDbodyMod = 1; } } else { /* 6 nodes & t-node */ if ((model->B3SOIPDrbody == 0.0) && (model->B3SOIPDrbsh == 0.0)) { printf("\n Warning: model parameter rbody=0!\n"); model->B3SOIPDrbody = 1e0; here->B3SOIPDbodyMod = 1; } else { /* nonideal body tie */ here->B3SOIPDbodyMod = 1; } } } } } if ((model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0!=0)) { if (here->B3SOIPDtempNode == -1) { error = CKTmkVolt(ckt,&tmp,here->B3SOIPDname,"Temp"); if (error) return(error); here->B3SOIPDtempNode = tmp->number; } } else { here->B3SOIPDtempNode = 0; } /* here for debugging purpose only */ if (here->B3SOIPDdebugMod != 0) { /* The real Vbs value */ error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Vbs"); if(error) return(error); here->B3SOIPDvbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ids"); if(error) return(error); here->B3SOIPDidsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ic"); if(error) return(error); here->B3SOIPDicNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ibs"); if(error) return(error); here->B3SOIPDibsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ibd"); if(error) return(error); here->B3SOIPDibdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Iii"); if(error) return(error); here->B3SOIPDiiiNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ig"); if(error) return(error); here->B3SOIPDigNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Gigg"); if(error) return(error); here->B3SOIPDgiggNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Gigd"); if(error) return(error); here->B3SOIPDgigdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Gigb"); if(error) return(error); here->B3SOIPDgigbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Igidl"); if(error) return(error); here->B3SOIPDigidlNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Itun"); if(error) return(error); here->B3SOIPDitunNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Ibp"); if(error) return(error); here->B3SOIPDibpNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Cbb"); if(error) return(error); here->B3SOIPDcbbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Cbd"); if(error) return(error); here->B3SOIPDcbdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Cbg"); if(error) return(error); here->B3SOIPDcbgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Qbf"); if(error) return(error); here->B3SOIPDqbfNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Qjs"); if(error) return(error); here->B3SOIPDqjsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIPDname, "Qjd"); if(error) return(error); here->B3SOIPDqjdNode = tmp->number; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) if ((model->B3SOIPDshMod == 1) && (here->B3SOIPDrth0!=0.0)) { TSTALLOC(B3SOIPDTemptempPtr, B3SOIPDtempNode, B3SOIPDtempNode); TSTALLOC(B3SOIPDTempdpPtr, B3SOIPDtempNode, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDTempspPtr, B3SOIPDtempNode, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDTempgPtr, B3SOIPDtempNode, B3SOIPDgNode); TSTALLOC(B3SOIPDTempbPtr, B3SOIPDtempNode, B3SOIPDbNode); TSTALLOC(B3SOIPDGtempPtr, B3SOIPDgNode, B3SOIPDtempNode); TSTALLOC(B3SOIPDDPtempPtr, B3SOIPDdNodePrime, B3SOIPDtempNode); TSTALLOC(B3SOIPDSPtempPtr, B3SOIPDsNodePrime, B3SOIPDtempNode); TSTALLOC(B3SOIPDEtempPtr, B3SOIPDeNode, B3SOIPDtempNode); TSTALLOC(B3SOIPDBtempPtr, B3SOIPDbNode, B3SOIPDtempNode); if (here->B3SOIPDbodyMod == 1) { TSTALLOC(B3SOIPDPtempPtr, B3SOIPDpNode, B3SOIPDtempNode); } } if (here->B3SOIPDbodyMod == 2) { /* Don't create any Jacobian entry for pNode */ } else if (here->B3SOIPDbodyMod == 1) { TSTALLOC(B3SOIPDBpPtr, B3SOIPDbNode, B3SOIPDpNode); TSTALLOC(B3SOIPDPbPtr, B3SOIPDpNode, B3SOIPDbNode); TSTALLOC(B3SOIPDPpPtr, B3SOIPDpNode, B3SOIPDpNode); } TSTALLOC(B3SOIPDEbPtr, B3SOIPDeNode, B3SOIPDbNode); TSTALLOC(B3SOIPDGbPtr, B3SOIPDgNode, B3SOIPDbNode); TSTALLOC(B3SOIPDDPbPtr, B3SOIPDdNodePrime, B3SOIPDbNode); TSTALLOC(B3SOIPDSPbPtr, B3SOIPDsNodePrime, B3SOIPDbNode); TSTALLOC(B3SOIPDBePtr, B3SOIPDbNode, B3SOIPDeNode); TSTALLOC(B3SOIPDBgPtr, B3SOIPDbNode, B3SOIPDgNode); TSTALLOC(B3SOIPDBdpPtr, B3SOIPDbNode, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDBspPtr, B3SOIPDbNode, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDBbPtr, B3SOIPDbNode, B3SOIPDbNode); TSTALLOC(B3SOIPDEgPtr, B3SOIPDeNode, B3SOIPDgNode); TSTALLOC(B3SOIPDEdpPtr, B3SOIPDeNode, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDEspPtr, B3SOIPDeNode, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDGePtr, B3SOIPDgNode, B3SOIPDeNode); TSTALLOC(B3SOIPDDPePtr, B3SOIPDdNodePrime, B3SOIPDeNode); TSTALLOC(B3SOIPDSPePtr, B3SOIPDsNodePrime, B3SOIPDeNode); TSTALLOC(B3SOIPDEePtr, B3SOIPDeNode, B3SOIPDeNode); TSTALLOC(B3SOIPDGgPtr, B3SOIPDgNode, B3SOIPDgNode); TSTALLOC(B3SOIPDGdpPtr, B3SOIPDgNode, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDGspPtr, B3SOIPDgNode, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDDPgPtr, B3SOIPDdNodePrime, B3SOIPDgNode); TSTALLOC(B3SOIPDDPdpPtr, B3SOIPDdNodePrime, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDDPspPtr, B3SOIPDdNodePrime, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDDPdPtr, B3SOIPDdNodePrime, B3SOIPDdNode); TSTALLOC(B3SOIPDSPgPtr, B3SOIPDsNodePrime, B3SOIPDgNode); TSTALLOC(B3SOIPDSPdpPtr, B3SOIPDsNodePrime, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDSPspPtr, B3SOIPDsNodePrime, B3SOIPDsNodePrime); TSTALLOC(B3SOIPDSPsPtr, B3SOIPDsNodePrime, B3SOIPDsNode); TSTALLOC(B3SOIPDDdPtr, B3SOIPDdNode, B3SOIPDdNode); TSTALLOC(B3SOIPDDdpPtr, B3SOIPDdNode, B3SOIPDdNodePrime); TSTALLOC(B3SOIPDSsPtr, B3SOIPDsNode, B3SOIPDsNode); TSTALLOC(B3SOIPDSspPtr, B3SOIPDsNode, B3SOIPDsNodePrime); /* here for debugging purpose only */ if (here->B3SOIPDdebugMod != 0) { TSTALLOC(B3SOIPDVbsPtr, B3SOIPDvbsNode, B3SOIPDvbsNode); TSTALLOC(B3SOIPDIdsPtr, B3SOIPDidsNode, B3SOIPDidsNode); TSTALLOC(B3SOIPDIcPtr, B3SOIPDicNode, B3SOIPDicNode); TSTALLOC(B3SOIPDIbsPtr, B3SOIPDibsNode, B3SOIPDibsNode); TSTALLOC(B3SOIPDIbdPtr, B3SOIPDibdNode, B3SOIPDibdNode); TSTALLOC(B3SOIPDIiiPtr, B3SOIPDiiiNode, B3SOIPDiiiNode); TSTALLOC(B3SOIPDIgPtr, B3SOIPDigNode, B3SOIPDigNode); TSTALLOC(B3SOIPDGiggPtr, B3SOIPDgiggNode, B3SOIPDgiggNode); TSTALLOC(B3SOIPDGigdPtr, B3SOIPDgigdNode, B3SOIPDgigdNode); TSTALLOC(B3SOIPDGigbPtr, B3SOIPDgigbNode, B3SOIPDgigbNode); TSTALLOC(B3SOIPDIgidlPtr, B3SOIPDigidlNode, B3SOIPDigidlNode); TSTALLOC(B3SOIPDItunPtr, B3SOIPDitunNode, B3SOIPDitunNode); TSTALLOC(B3SOIPDIbpPtr, B3SOIPDibpNode, B3SOIPDibpNode); TSTALLOC(B3SOIPDCbbPtr, B3SOIPDcbbNode, B3SOIPDcbbNode); TSTALLOC(B3SOIPDCbdPtr, B3SOIPDcbdNode, B3SOIPDcbdNode); TSTALLOC(B3SOIPDCbgPtr, B3SOIPDcbgNode, B3SOIPDcbgNode); TSTALLOC(B3SOIPDQbfPtr, B3SOIPDqbfNode, B3SOIPDqbfNode); TSTALLOC(B3SOIPDQjsPtr, B3SOIPDqjsNode, B3SOIPDqjsNode); TSTALLOC(B3SOIPDQjdPtr, B3SOIPDqjdNode, B3SOIPDqjdNode); } } } return(OK); } int B3SOIPDunsetup( GENmodel *inModel, CKTcircuit *ckt) { B3SOIPDmodel *model; B3SOIPDinstance *here; for (model = (B3SOIPDmodel *)inModel; model != NULL; model = model->B3SOIPDnextModel) { for (here = model->B3SOIPDinstances; here != NULL; here=here->B3SOIPDnextInstance) { if (here->B3SOIPDdNodePrime && here->B3SOIPDdNodePrime != here->B3SOIPDdNode) { CKTdltNNum(ckt, here->B3SOIPDdNodePrime); here->B3SOIPDdNodePrime = 0; } if (here->B3SOIPDsNodePrime && here->B3SOIPDsNodePrime != here->B3SOIPDsNode) { CKTdltNNum(ckt, here->B3SOIPDsNodePrime); here->B3SOIPDsNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bjt/0000755000265600020320000000000012264261705017011 5ustar andreasadminngspice-26/src/spicelib/devices/bjt/bjtmpar.c0000644000265600020320000003602212264261473020621 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine sets model parameters for * BJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTmParam(int param, IFvalue *value, GENmodel *inModel) { BJTmodel *mods = (BJTmodel*)inModel; switch(param) { case BJT_MOD_NPN: if(value->iValue) { mods->BJTtype = NPN; } break; case BJT_MOD_PNP: if(value->iValue) { mods->BJTtype = PNP; } break; case BJT_MOD_SUBS: mods->BJTsubs = value->iValue; mods->BJTsubsGiven = TRUE; break; case BJT_MOD_TNOM: mods->BJTtnom = value->rValue+CONSTCtoK; mods->BJTtnomGiven = TRUE; break; case BJT_MOD_IS: mods->BJTsatCur = value->rValue; mods->BJTsatCurGiven = TRUE; break; case BJT_MOD_BF: mods->BJTbetaF = value->rValue; mods->BJTbetaFGiven = TRUE; break; case BJT_MOD_NF: mods->BJTemissionCoeffF = value->rValue; mods->BJTemissionCoeffFGiven = TRUE; break; case BJT_MOD_VAF: mods->BJTearlyVoltF = value->rValue; mods->BJTearlyVoltFGiven = TRUE; break; case BJT_MOD_IKF: mods->BJTrollOffF = value->rValue; mods->BJTrollOffFGiven = TRUE; break; case BJT_MOD_ISE: mods->BJTleakBEcurrent = value->rValue; mods->BJTleakBEcurrentGiven = TRUE; break; case BJT_MOD_C2: mods->BJTc2 = value->rValue; mods->BJTc2Given=TRUE; break; case BJT_MOD_NE: mods->BJTleakBEemissionCoeff = value->rValue; mods->BJTleakBEemissionCoeffGiven = TRUE; break; case BJT_MOD_BR: mods->BJTbetaR = value->rValue; mods->BJTbetaRGiven = TRUE; break; case BJT_MOD_NR: mods->BJTemissionCoeffR = value->rValue; mods->BJTemissionCoeffRGiven = TRUE; break; case BJT_MOD_VAR: mods->BJTearlyVoltR = value->rValue; mods->BJTearlyVoltRGiven = TRUE; break; case BJT_MOD_IKR: mods->BJTrollOffR = value->rValue; mods->BJTrollOffRGiven = TRUE; break; case BJT_MOD_ISC: mods->BJTleakBCcurrent = value->rValue; mods->BJTleakBCcurrentGiven = TRUE; break; case BJT_MOD_C4: mods->BJTc4 = value->rValue; mods->BJTc4Given=TRUE; break; case BJT_MOD_NC: mods->BJTleakBCemissionCoeff = value->rValue; mods->BJTleakBCemissionCoeffGiven = TRUE; break; case BJT_MOD_RB: mods->BJTbaseResist = value->rValue; mods->BJTbaseResistGiven = TRUE; break; case BJT_MOD_IRB: mods->BJTbaseCurrentHalfResist = value->rValue; mods->BJTbaseCurrentHalfResistGiven = TRUE; break; case BJT_MOD_RBM: mods->BJTminBaseResist = value->rValue; mods->BJTminBaseResistGiven = TRUE; break; case BJT_MOD_RE: mods->BJTemitterResist = value->rValue; mods->BJTemitterResistGiven = TRUE; break; case BJT_MOD_RC: mods->BJTcollectorResist = value->rValue; mods->BJTcollectorResistGiven = TRUE; break; case BJT_MOD_CJE: mods->BJTdepletionCapBE = value->rValue; mods->BJTdepletionCapBEGiven = TRUE; break; case BJT_MOD_VJE: mods->BJTpotentialBE = value->rValue; mods->BJTpotentialBEGiven = TRUE; break; case BJT_MOD_MJE: mods->BJTjunctionExpBE = value->rValue; mods->BJTjunctionExpBEGiven = TRUE; break; case BJT_MOD_TF: mods->BJTtransitTimeF = value->rValue; mods->BJTtransitTimeFGiven = TRUE; break; case BJT_MOD_XTF: mods->BJTtransitTimeBiasCoeffF = value->rValue; mods->BJTtransitTimeBiasCoeffFGiven = TRUE; break; case BJT_MOD_VTF: mods->BJTtransitTimeFVBC = value->rValue; mods->BJTtransitTimeFVBCGiven = TRUE; break; case BJT_MOD_ITF: mods->BJTtransitTimeHighCurrentF = value->rValue; mods->BJTtransitTimeHighCurrentFGiven = TRUE; break; case BJT_MOD_PTF: mods->BJTexcessPhase = value->rValue; mods->BJTexcessPhaseGiven = TRUE; break; case BJT_MOD_CJC: mods->BJTdepletionCapBC = value->rValue; mods->BJTdepletionCapBCGiven = TRUE; break; case BJT_MOD_VJC: mods->BJTpotentialBC = value->rValue; mods->BJTpotentialBCGiven = TRUE; break; case BJT_MOD_MJC: mods->BJTjunctionExpBC = value->rValue; mods->BJTjunctionExpBCGiven = TRUE; break; case BJT_MOD_XCJC: mods->BJTbaseFractionBCcap = value->rValue; mods->BJTbaseFractionBCcapGiven = TRUE; break; case BJT_MOD_TR: mods->BJTtransitTimeR = value->rValue; mods->BJTtransitTimeRGiven = TRUE; break; case BJT_MOD_CJS: mods->BJTcapSub = value->rValue; mods->BJTcapSubGiven = TRUE; break; case BJT_MOD_VJS: mods->BJTpotentialSubstrate = value->rValue; mods->BJTpotentialSubstrateGiven = TRUE; break; case BJT_MOD_MJS: mods->BJTexponentialSubstrate = value->rValue; mods->BJTexponentialSubstrateGiven = TRUE; break; case BJT_MOD_XTB: mods->BJTbetaExp = value->rValue; mods->BJTbetaExpGiven = TRUE; break; case BJT_MOD_EG: mods->BJTenergyGap = value->rValue; mods->BJTenergyGapGiven = TRUE; break; case BJT_MOD_XTI: mods->BJTtempExpIS = value->rValue; mods->BJTtempExpISGiven = TRUE; break; case BJT_MOD_FC: mods->BJTdepletionCapCoeff = value->rValue; mods->BJTdepletionCapCoeffGiven = TRUE; break; case BJT_MOD_KF: mods->BJTfNcoef = value->rValue; mods->BJTfNcoefGiven = TRUE; break; case BJT_MOD_AF: mods->BJTfNexp = value->rValue; mods->BJTfNexpGiven = TRUE; break; case BJT_MOD_ISS: mods->BJTsubSatCur = value->rValue; mods->BJTsubSatCurGiven = TRUE; break; case BJT_MOD_NS: mods->BJTemissionCoeffS = value->rValue; mods->BJTemissionCoeffSGiven = TRUE; break; case BJT_MOD_TLEV: mods->BJTtlev = value->iValue; mods->BJTtlevGiven = TRUE; break; case BJT_MOD_TLEVC: mods->BJTtlevc = value->iValue; mods->BJTtlevcGiven = TRUE; break; case BJT_MOD_TBF1: mods->BJTtbf1 = value->rValue; mods->BJTtbf1Given = TRUE; break; case BJT_MOD_TBF2: mods->BJTtbf2 = value->rValue; mods->BJTtbf2Given = TRUE; break; case BJT_MOD_TBR1: mods->BJTtbr1 = value->rValue; mods->BJTtbr1Given = TRUE; break; case BJT_MOD_TBR2: mods->BJTtbr2 = value->rValue; mods->BJTtbr2Given = TRUE; break; case BJT_MOD_TIKF1: mods->BJTtikf1 = value->rValue; mods->BJTtikf1Given = TRUE; break; case BJT_MOD_TIKF2: mods->BJTtikf2 = value->rValue; mods->BJTtikf2Given = TRUE; break; case BJT_MOD_TIKR1: mods->BJTtikr1 = value->rValue; mods->BJTtikr1Given = TRUE; break; case BJT_MOD_TIKR2: mods->BJTtikr2 = value->rValue; mods->BJTtikr2Given = TRUE; break; case BJT_MOD_TIRB1: mods->BJTtirb1 = value->rValue; mods->BJTtirb1Given = TRUE; break; case BJT_MOD_TIRB2: mods->BJTtirb2 = value->rValue; mods->BJTtirb2Given = TRUE; break; case BJT_MOD_TNC1: mods->BJTtnc1 = value->rValue; mods->BJTtnc1Given = TRUE; break; case BJT_MOD_TNC2: mods->BJTtnc2 = value->rValue; mods->BJTtnc2Given = TRUE; break; case BJT_MOD_TNE1: mods->BJTtne1 = value->rValue; mods->BJTtne1Given = TRUE; break; case BJT_MOD_TNE2: mods->BJTtne2 = value->rValue; mods->BJTtne2Given = TRUE; break; case BJT_MOD_TNF1: mods->BJTtnf1 = value->rValue; mods->BJTtnf1Given = TRUE; break; case BJT_MOD_TNF2: mods->BJTtnf2 = value->rValue; mods->BJTtnf2Given = TRUE; break; case BJT_MOD_TNR1: mods->BJTtnr1 = value->rValue; mods->BJTtnr1Given = TRUE; break; case BJT_MOD_TNR2: mods->BJTtnr2 = value->rValue; mods->BJTtnr2Given = TRUE; break; case BJT_MOD_TRB1: mods->BJTtrb1 = value->rValue; mods->BJTtrb1Given = TRUE; break; case BJT_MOD_TRB2: mods->BJTtrb2 = value->rValue; mods->BJTtrb2Given = TRUE; break; case BJT_MOD_TRC1: mods->BJTtrc1 = value->rValue; mods->BJTtrc1Given = TRUE; break; case BJT_MOD_TRC2: mods->BJTtrc2 = value->rValue; mods->BJTtrc2Given = TRUE; break; case BJT_MOD_TRE1: mods->BJTtre1 = value->rValue; mods->BJTtre1Given = TRUE; break; case BJT_MOD_TRE2: mods->BJTtre2 = value->rValue; mods->BJTtre2Given = TRUE; break; case BJT_MOD_TRM1: mods->BJTtrm1 = value->rValue; mods->BJTtrm1Given = TRUE; break; case BJT_MOD_TRM2: mods->BJTtrm2 = value->rValue; mods->BJTtrm2Given = TRUE; break; case BJT_MOD_TVAF1: mods->BJTtvaf1 = value->rValue; mods->BJTtvaf1Given = TRUE; break; case BJT_MOD_TVAF2: mods->BJTtvaf2 = value->rValue; mods->BJTtvaf2Given = TRUE; break; case BJT_MOD_TVAR1: mods->BJTtvar1 = value->rValue; mods->BJTtvar1Given = TRUE; break; case BJT_MOD_TVAR2: mods->BJTtvar2 = value->rValue; mods->BJTtvar2Given = TRUE; break; case BJT_MOD_CTC: mods->BJTctc = value->rValue; mods->BJTctcGiven = TRUE; break; case BJT_MOD_CTE: mods->BJTcte = value->rValue; mods->BJTcteGiven = TRUE; break; case BJT_MOD_CTS: mods->BJTcts = value->rValue; mods->BJTctsGiven = TRUE; break; case BJT_MOD_TVJE: mods->BJTtvje = value->rValue; mods->BJTtvjeGiven = TRUE; break; case BJT_MOD_TVJC: mods->BJTtvjc = value->rValue; mods->BJTtvjcGiven = TRUE; break; case BJT_MOD_TVJS: mods->BJTtvjs = value->rValue; mods->BJTtvjsGiven = TRUE; break; case BJT_MOD_TITF1: mods->BJTtitf1 = value->rValue; mods->BJTtitf1Given = TRUE; break; case BJT_MOD_TITF2: mods->BJTtitf2 = value->rValue; mods->BJTtitf2Given = TRUE; break; case BJT_MOD_TTF1: mods->BJTttf1 = value->rValue; mods->BJTttf1Given = TRUE; break; case BJT_MOD_TTF2: mods->BJTttf2 = value->rValue; mods->BJTttf2Given = TRUE; break; case BJT_MOD_TTR1: mods->BJTttr1 = value->rValue; mods->BJTttr1Given = TRUE; break; case BJT_MOD_TTR2: mods->BJTttr2 = value->rValue; mods->BJTttr2Given = TRUE; break; case BJT_MOD_TMJE1: mods->BJTtmje1 = value->rValue; mods->BJTtmje1Given = TRUE; break; case BJT_MOD_TMJE2: mods->BJTtmje2 = value->rValue; mods->BJTtmje2Given = TRUE; break; case BJT_MOD_TMJC1: mods->BJTtmjc1 = value->rValue; mods->BJTtmjc1Given = TRUE; break; case BJT_MOD_TMJC2: mods->BJTtmjc2 = value->rValue; mods->BJTtmjc2Given = TRUE; break; case BJT_MOD_TMJS1: mods->BJTtmjs1 = value->rValue; mods->BJTtmjs1Given = TRUE; break; case BJT_MOD_TMJS2: mods->BJTtmjs2 = value->rValue; mods->BJTtmjs2Given = TRUE; break; case BJT_MOD_TNS1: mods->BJTtns1 = value->rValue; mods->BJTtns1Given = TRUE; break; case BJT_MOD_TNS2: mods->BJTtns2 = value->rValue; mods->BJTtns2Given = TRUE; break; case BJT_MOD_NKF: mods->BJTnkf = value->rValue; mods->BJTnkfGiven = TRUE; break; case BJT_MOD_TIS1: mods->BJTtis1 = value->rValue; mods->BJTtis1Given = TRUE; break; case BJT_MOD_TIS2: mods->BJTtis2 = value->rValue; mods->BJTtis2Given = TRUE; break; case BJT_MOD_TISE1: mods->BJTtise1 = value->rValue; mods->BJTtise1Given = TRUE; break; case BJT_MOD_TISE2: mods->BJTtise2 = value->rValue; mods->BJTtise2Given = TRUE; break; case BJT_MOD_TISC1: mods->BJTtisc1 = value->rValue; mods->BJTtisc1Given = TRUE; break; case BJT_MOD_TISC2: mods->BJTtisc2 = value->rValue; mods->BJTtisc2Given = TRUE; break; case BJT_MOD_VBE_MAX: mods->BJTvbeMax = value->rValue; mods->BJTvbeMaxGiven = TRUE; break; case BJT_MOD_VBC_MAX: mods->BJTvbcMax = value->rValue; mods->BJTvbcMaxGiven = TRUE; break; case BJT_MOD_VCE_MAX: mods->BJTvceMax = value->rValue; mods->BJTvceMaxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtsetup.c0000644000265600020320000004147212264261473021027 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* * This routine should only be called when circuit topology * changes, since its computations do not depend on most * device or model parameters, only on topology (as * affected by emitter, collector, and base resistances) */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int BJTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the BJT structure with those pointers needed later * for fast matrix loading */ { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->BJTnextModel ) { if(model->BJTtype != NPN && model->BJTtype != PNP) { model->BJTtype = NPN; } if(!model->BJTsubsGiven || (model->BJTsubs != VERTICAL && model->BJTsubs != LATERAL)) { if (model->BJTtype == NPN) model->BJTsubs = VERTICAL; /* Vertical for NPN */ else model->BJTsubs = LATERAL; /* Lateral for PNP */ } if(!model->BJTsatCurGiven) { model->BJTsatCur = 1e-16; } if(!model->BJTbetaFGiven) { model->BJTbetaF = 100; } if(!model->BJTemissionCoeffFGiven) { model->BJTemissionCoeffF = 1; } if(!model->BJTleakBEemissionCoeffGiven) { model->BJTleakBEemissionCoeff = 1.5; } if(!model->BJTbetaRGiven) { model->BJTbetaR = 1; } if(!model->BJTemissionCoeffRGiven) { model->BJTemissionCoeffR = 1; } if(!model->BJTleakBCemissionCoeffGiven) { model->BJTleakBCemissionCoeff = 2; } if(!model->BJTbaseResistGiven) { model->BJTbaseResist = 0; } if(!model->BJTemitterResistGiven) { model->BJTemitterResist = 0; } if(!model->BJTcollectorResistGiven) { model->BJTcollectorResist = 0; } if(!model->BJTdepletionCapBEGiven) { model->BJTdepletionCapBE = 0; } if(!model->BJTpotentialBEGiven) { model->BJTpotentialBE = .75; } if(!model->BJTjunctionExpBEGiven) { model->BJTjunctionExpBE = .33; } if(!model->BJTtransitTimeFGiven) { model->BJTtransitTimeF = 0; } if(!model->BJTtransitTimeBiasCoeffFGiven) { model->BJTtransitTimeBiasCoeffF = 0; } if(!model->BJTtransitTimeHighCurrentFGiven) { model->BJTtransitTimeHighCurrentF = 0; } if(!model->BJTexcessPhaseGiven) { model->BJTexcessPhase = 0; } if(!model->BJTdepletionCapBCGiven) { model->BJTdepletionCapBC = 0; } if(!model->BJTpotentialBCGiven) { model->BJTpotentialBC = .75; } if(!model->BJTjunctionExpBCGiven) { model->BJTjunctionExpBC = .33; } if(!model->BJTbaseFractionBCcapGiven) { model->BJTbaseFractionBCcap = 1; } if(!model->BJTtransitTimeRGiven) { model->BJTtransitTimeR = 0; } if(!model->BJTcapSubGiven) { model->BJTcapSub = 0; } if(!model->BJTpotentialSubstrateGiven) { model->BJTpotentialSubstrate = .75; } if(!model->BJTexponentialSubstrateGiven) { model->BJTexponentialSubstrate = 0; } if(!model->BJTbetaExpGiven) { model->BJTbetaExp = 0; } if(!model->BJTenergyGapGiven) { model->BJTenergyGap = 1.11; } if(!model->BJTtempExpISGiven) { model->BJTtempExpIS = 3; } if(!model->BJTfNcoefGiven) { model->BJTfNcoef = 0; } if(!model->BJTfNexpGiven) { model->BJTfNexp = 1; } if(!model->BJTsubSatCurGiven) { model->BJTsubSatCur = 0.0; } if(!model->BJTemissionCoeffSGiven) { model->BJTemissionCoeffS = 1.0; } if(!model->BJTtlevGiven) { model->BJTtlev = 0; } if(!model->BJTtlevcGiven) { model->BJTtlevc = 0; } if(!model->BJTtbf1Given) { model->BJTtbf1 = 0.0; } if(!model->BJTtbf2Given) { model->BJTtbf2 = 0.0; } if(!model->BJTtbr1Given) { model->BJTtbr1 = 0.0; } if(!model->BJTtbr2Given) { model->BJTtbr2 = 0.0; } if(!model->BJTtikf1Given) { model->BJTtikf1 = 0.0; } if(!model->BJTtikf2Given) { model->BJTtikf2 = 0.0; } if(!model->BJTtikr1Given) { model->BJTtikr1 = 0.0; } if(!model->BJTtikr2Given) { model->BJTtikr2 = 0.0; } if(!model->BJTtirb1Given) { model->BJTtirb1 = 0.0; } if(!model->BJTtirb2Given) { model->BJTtirb2 = 0.0; } if(!model->BJTtnc1Given) { model->BJTtnc1 = 0.0; } if(!model->BJTtnc2Given) { model->BJTtnc2 = 0.0; } if(!model->BJTtne1Given) { model->BJTtne1 = 0.0; } if(!model->BJTtne2Given) { model->BJTtne2 = 0.0; } if(!model->BJTtnf1Given) { model->BJTtnf1 = 0.0; } if(!model->BJTtnf2Given) { model->BJTtnf2 = 0.0; } if(!model->BJTtnr1Given) { model->BJTtnr1 = 0.0; } if(!model->BJTtnr2Given) { model->BJTtnr2 = 0.0; } if(!model->BJTtrb1Given) { model->BJTtrb1 = 0.0; } if(!model->BJTtrb2Given) { model->BJTtrb2 = 0.0; } if(!model->BJTtrc1Given) { model->BJTtrc1 = 0.0; } if(!model->BJTtrc2Given) { model->BJTtrc2 = 0.0; } if(!model->BJTtre1Given) { model->BJTtre1 = 0.0; } if(!model->BJTtre2Given) { model->BJTtre2 = 0.0; } if(!model->BJTtrm1Given) { model->BJTtrm1 = 0.0; } if(!model->BJTtrm2Given) { model->BJTtrm2 = 0.0; } if(!model->BJTtvaf1Given) { model->BJTtvaf1 = 0.0; } if(!model->BJTtvaf2Given) { model->BJTtvaf2 = 0.0; } if(!model->BJTtvar1Given) { model->BJTtvar1 = 0.0; } if(!model->BJTtvar2Given) { model->BJTtvar2 = 0.0; } if(!model->BJTctcGiven) { model->BJTctc = 0.0; } if(!model->BJTcteGiven) { model->BJTcte = 0.0; } if(!model->BJTctsGiven) { model->BJTcts = 0.0; } if(!model->BJTtvjeGiven) { model->BJTtvje = 0.0; } if(!model->BJTtvjcGiven) { model->BJTtvjc = 0.0; } if(!model->BJTtvjsGiven) { model->BJTtvjs = 0.0; } if(!model->BJTtitf1Given) { model->BJTtitf1 = 0.0; } if(!model->BJTtitf2Given) { model->BJTtitf2 = 0.0; } if(!model->BJTttf1Given) { model->BJTttf1 = 0.0; } if(!model->BJTttf2Given) { model->BJTttf2 = 0.0; } if(!model->BJTttr1Given) { model->BJTttr1 = 0.0; } if(!model->BJTttr2Given) { model->BJTttr2 = 0.0; } if(!model->BJTtmje1Given) { model->BJTtmje1 = 0.0; } if(!model->BJTtmje2Given) { model->BJTtmje2 = 0.0; } if(!model->BJTtmjc1Given) { model->BJTtmjc1 = 0.0; } if(!model->BJTtmjc2Given) { model->BJTtmjc2 = 0.0; } if(!model->BJTtmjs1Given) { model->BJTtmjs1 = 0.0; } if(!model->BJTtmjs2Given) { model->BJTtmjs2 = 0.0; } if(!model->BJTtns1Given) { model->BJTtns1 = 0.0; } if(!model->BJTtns2Given) { model->BJTtns2 = 0.0; } if(!model->BJTnkfGiven) { model->BJTnkf = 0.5; } else { if (model->BJTnkf > 1.0) { printf("Warning: NKF has been set to its maximum value: 1.0\n"); model->BJTnkf = 1.0; } } if(!model->BJTtis1Given) { model->BJTtis1 = 0.0; } if(!model->BJTtis2Given) { model->BJTtis2 = 0.0; } if(!model->BJTtise1Given) { model->BJTtise1 = 0.0; } if(!model->BJTtise2Given) { model->BJTtise2 = 0.0; } if(!model->BJTtisc1Given) { model->BJTtisc1 = 0.0; } if(!model->BJTtisc2Given) { model->BJTtisc2 = 0.0; } if(!model->BJTvbeMaxGiven) { model->BJTvbeMax = 1e99; } if(!model->BJTvbcMaxGiven) { model->BJTvbcMax = 1e99; } if(!model->BJTvceMaxGiven) { model->BJTvceMax = 1e99; } /* * COMPATABILITY WARNING! * special note: for backward compatability to much older models, spice 2G * implemented a special case which checked if B-E leakage saturation * current was >1, then it was instead a the B-E leakage saturation current * divided by IS, and multiplied it by IS at this point. This was not * handled correctly in the 2G code, and there is some question on its * reasonability, since it is also undocumented, so it has been left out * here. It could easily be added with 1 line. (The same applies to the B-C * leakage saturation current). TQ 6/29/84 */ /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { CKTnode *tmpNode; IFuid tmpName; if(!here->BJTareaGiven) { here->BJTarea = 1.0; } if(!here->BJTareabGiven) { here->BJTareab = here->BJTarea; } if(!here->BJTareacGiven) { here->BJTareac = here->BJTarea; } if(!here->BJTmGiven) { here->BJTm = 1.0; } here->BJTstate = *states; *states += BJTnumStates; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 8 * (ckt->CKTsenInfo->SENparms); } if(model->BJTcollectorResist == 0) { here->BJTcolPrimeNode = here->BJTcolNode; } else if(here->BJTcolPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BJTname,"collector"); if(error) return(error); here->BJTcolPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; /* fprintf(stderr, "Nodeset copied from %s\n", tmpName); fprintf(stderr, " to %s\n", tmp->name); fprintf(stderr, " value %g\n", tmp->nodeset);*/ } } } } if(model->BJTbaseResist == 0) { here->BJTbasePrimeNode = here->BJTbaseNode; } else if(here->BJTbasePrimeNode == 0){ error = CKTmkVolt(ckt,&tmp,here->BJTname, "base"); if(error) return(error); here->BJTbasePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; /* fprintf(stderr, "Nodeset copied from %s\n", tmpName); fprintf(stderr, " to %s\n", tmp->name); fprintf(stderr, " value %g\n", tmp->nodeset);*/ } } } } if(model->BJTemitterResist == 0) { here->BJTemitPrimeNode = here->BJTemitNode; } else if(here->BJTemitPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BJTname, "emitter"); if(error) return(error); here->BJTemitPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; /* fprintf(stderr, "Nodeset copied from %s\n", tmpName); fprintf(stderr, " to %s\n", tmp->name); fprintf(stderr, " value %g\n", tmp->nodeset);*/ } } } } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BJTcolColPrimePtr,BJTcolNode,BJTcolPrimeNode); TSTALLOC(BJTbaseBasePrimePtr,BJTbaseNode,BJTbasePrimeNode); TSTALLOC(BJTemitEmitPrimePtr,BJTemitNode,BJTemitPrimeNode); TSTALLOC(BJTcolPrimeColPtr,BJTcolPrimeNode,BJTcolNode); TSTALLOC(BJTcolPrimeBasePrimePtr,BJTcolPrimeNode,BJTbasePrimeNode); TSTALLOC(BJTcolPrimeEmitPrimePtr,BJTcolPrimeNode,BJTemitPrimeNode); TSTALLOC(BJTbasePrimeBasePtr,BJTbasePrimeNode,BJTbaseNode); TSTALLOC(BJTbasePrimeColPrimePtr,BJTbasePrimeNode,BJTcolPrimeNode); TSTALLOC(BJTbasePrimeEmitPrimePtr,BJTbasePrimeNode,BJTemitPrimeNode); TSTALLOC(BJTemitPrimeEmitPtr,BJTemitPrimeNode,BJTemitNode); TSTALLOC(BJTemitPrimeColPrimePtr,BJTemitPrimeNode,BJTcolPrimeNode); TSTALLOC(BJTemitPrimeBasePrimePtr,BJTemitPrimeNode,BJTbasePrimeNode); TSTALLOC(BJTcolColPtr,BJTcolNode,BJTcolNode); TSTALLOC(BJTbaseBasePtr,BJTbaseNode,BJTbaseNode); TSTALLOC(BJTemitEmitPtr,BJTemitNode,BJTemitNode); TSTALLOC(BJTcolPrimeColPrimePtr,BJTcolPrimeNode,BJTcolPrimeNode); TSTALLOC(BJTbasePrimeBasePrimePtr,BJTbasePrimeNode,BJTbasePrimeNode); TSTALLOC(BJTemitPrimeEmitPrimePtr,BJTemitPrimeNode,BJTemitPrimeNode); TSTALLOC(BJTsubstSubstPtr,BJTsubstNode,BJTsubstNode); if (model -> BJTsubs == LATERAL) { here -> BJTsubstConNode = here -> BJTbasePrimeNode; here -> BJTsubstConSubstConPtr = here -> BJTbasePrimeBasePrimePtr; } else { here -> BJTsubstConNode = here -> BJTcolPrimeNode; here -> BJTsubstConSubstConPtr = here -> BJTcolPrimeColPrimePtr; } TSTALLOC(BJTsubstConSubstPtr,BJTsubstConNode,BJTsubstNode); TSTALLOC(BJTsubstSubstConPtr,BJTsubstNode,BJTsubstConNode); TSTALLOC(BJTbaseColPrimePtr,BJTbaseNode,BJTcolPrimeNode); TSTALLOC(BJTcolPrimeBasePtr,BJTcolPrimeNode,BJTbaseNode); } } return(OK); } int BJTunsetup( GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model; BJTinstance *here; for (model = (BJTmodel *)inModel; model != NULL; model = model->BJTnextModel) { for (here = model->BJTinstances; here != NULL; here=here->BJTnextInstance) { if (here->BJTcolPrimeNode && here->BJTcolPrimeNode != here->BJTcolNode) { CKTdltNNum(ckt, here->BJTcolPrimeNode); here->BJTcolPrimeNode = 0; } if (here->BJTbasePrimeNode && here->BJTbasePrimeNode != here->BJTbaseNode) { CKTdltNNum(ckt, here->BJTbasePrimeNode); here->BJTbasePrimeNode = 0; } if (here->BJTemitPrimeNode && here->BJTemitPrimeNode != here->BJTemitNode) { CKTdltNNum(ckt, here->BJTemitPrimeNode); here->BJTemitPrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bjt/bjttrunc.c0000644000265600020320000000146612264261473021021 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine performs truncation error calculations for * BJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; for( ; model != NULL; model = model->BJTnextModel) { for(here=model->BJTinstances;here!=NULL;here = here->BJTnextInstance){ CKTterr(here->BJTqbe,ckt,timeStep); CKTterr(here->BJTqbc,ckt,timeStep); CKTterr(here->BJTqsub,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtparam.c0000644000265600020320000000436412264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine sets instance parameters for * BJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int BJTparam(int param, IFvalue *value, GENinstance *instPtr, IFvalue *select) { BJTinstance *here = (BJTinstance*)instPtr; NG_IGNORE(select); switch(param) { case BJT_AREA: here->BJTarea = value->rValue; here->BJTareaGiven = TRUE; break; case BJT_AREAB: here->BJTareab = value->rValue; here->BJTareabGiven = TRUE; break; case BJT_AREAC: here->BJTareac = value->rValue; here->BJTareacGiven = TRUE; break; case BJT_M: here->BJTm = value->rValue; here->BJTmGiven = TRUE; break; case BJT_TEMP: here->BJTtemp = value->rValue + CONSTCtoK; here->BJTtempGiven = TRUE; break; case BJT_DTEMP: here->BJTdtemp = value->rValue; here->BJTdtempGiven = TRUE; break; case BJT_OFF: here->BJToff = (value->iValue != 0); break; case BJT_IC_VBE: here->BJTicVBE = value->rValue; here->BJTicVBEGiven = TRUE; break; case BJT_IC_VCE: here->BJTicVCE = value->rValue; here->BJTicVCEGiven = TRUE; break; case BJT_AREA_SENS: here->BJTsenParmNo = value->iValue; break; case BJT_IC : switch(value->v.numValue) { case 2: here->BJTicVCE = *(value->v.vec.rVec+1); here->BJTicVCEGiven = TRUE; case 1: here->BJTicVBE = *(value->v.vec.rVec); here->BJTicVBEGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtsload.c0000644000265600020320000002653412264261473020773 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int BJTsLoad(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; double SaveState0[27]; int i; int iparmno; int error; double A0; double DELA; double Apert; double DELAinv; double cb0; double cb; double cc0; double cc; double cx0; double ccpr0; double cepr0; double DcbDp; double DccDp; double DceDp; double DccprDp; double DceprDp; double DcxDp; double DbprmDp; double DcprmDp; double DeprmDp; double gx; double gx0; double tag0; double tag1; double qbe0; double qbe; double qbc0; double qbc; double qcs0; double qcs; double qbx0; double qbx; double DqbeDp = 0.0; double DqbcDp = 0.0; double DqcsDp = 0.0; double DqbxDp = 0.0; double Osxpbe; double Osxpbc; double Osxpcs; double Osxpbx; SENstruct *info; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } #ifdef SENSDEBUG printf("BJTsenload \n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %.5e\n",ckt->CKTorder); printf("tag0=%.7e,tag1=%.7e\n",tag0,tag1); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; /* loop through all the models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { #ifdef SENSDEBUG printf("base = %d , baseprm = %d ,col = %d, colprm = %d\n", here->BJTbaseNode ,here->BJTbasePrimeNode, here->BJTcolNode,here->BJTcolPrimeNode); printf("emit = %d , emitprm = %d ,subst = %d, senparmno = %d\n", here->BJTemitNode ,here->BJTemitPrimeNode, here->BJTsubstNode,here->BJTsenParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 20; i++){ *(SaveState0 + i) = *(ckt->CKTstate0 + here->BJTstate + i); } *(SaveState0 + 21) = *(ckt->CKTstate1 + here->BJTcexbc); *(SaveState0 + 22) = *(ckt->CKTstate2 + here->BJTcexbc); *(SaveState0 + 23) = here->BJTcapbe; *(SaveState0 + 24) = here->BJTcapbc; *(SaveState0 + 25) = here->BJTcapsub; *(SaveState0 + 26) = here->BJTcapbx; if(here->BJTsenParmNo == 0) goto next; cx0 = model->BJTtype * *(ckt->CKTstate0 + here->BJTcb); ccpr0 = model->BJTtype * *(ckt->CKTstate0 + here->BJTcc); cepr0 = -cx0 - ccpr0; here->BJTsenPertFlag = ON; error = BJTload((GENmodel*)model,ckt); if(error) return(error); cb0 = model->BJTtype * *(ckt->CKTstate0 + here->BJTcb); cc0 = model->BJTtype * *(ckt->CKTstate0 + here->BJTcc); gx0 = *(ckt->CKTstate0 + here->BJTgx); qbe0 = *(ckt->CKTstate0 + here->BJTqbe); qbc0 = *(ckt->CKTstate0 + here->BJTqbc); qcs0 = *(ckt->CKTstate0 + here->BJTqsub); qbx0 = *(ckt->CKTstate0 + here->BJTqbx); /* perturbation of area */ A0 = here->BJTarea; DELA = info->SENpertfac * A0; Apert = A0 + DELA; DELAinv = 1.0/DELA; here->BJTsenPertFlag = ON; here->BJTarea = Apert; error = BJTload((GENmodel*)model,ckt); if(error) return(error); here->BJTarea = A0; here->BJTsenPertFlag = OFF; cb = model->BJTtype * *(ckt->CKTstate0 + here->BJTcb); cc = model->BJTtype * *(ckt->CKTstate0 + here->BJTcc); gx = *(ckt->CKTstate0 + here->BJTgx); qbe = *(ckt->CKTstate0 + here->BJTqbe); qbc = *(ckt->CKTstate0 + here->BJTqbc); qcs = *(ckt->CKTstate0 + here->BJTqsub); qbx = *(ckt->CKTstate0 + here->BJTqbx); /* compute the gradients of currents */ DcbDp = (cb - cb0) * DELAinv; DccDp = (cc - cc0) * DELAinv; DceDp = DcbDp + DccDp; DccprDp = 0; DceprDp = 0; DcxDp = 0; if(here->BJTcolNode != here->BJTcolPrimeNode) DccprDp = ccpr0 * info->SENpertfac * DELAinv; if(here->BJTemitNode != here->BJTemitPrimeNode) DceprDp = cepr0 * info->SENpertfac * DELAinv; if(here->BJTbaseNode != here->BJTbasePrimeNode){ if(gx0) DcxDp = cx0 * DELAinv * (gx-gx0)/gx0; } DbprmDp = DcbDp - DcxDp; DcprmDp = DccDp - DccprDp; DeprmDp = - DceDp - DceprDp; DqbeDp = (qbe - qbe0)*DELAinv; DqbcDp = (qbc - qbc0)*DELAinv; DqcsDp = (qcs - qcs0)*DELAinv; DqbxDp = (qbx - qbx0)*DELAinv; *(here->BJTdphibedp) = DqbeDp; *(here->BJTdphibcdp) = DqbcDp; *(here->BJTdphisubdp) = DqcsDp; *(here->BJTdphibxdp) = DqbxDp; #ifdef SENSDEBUG printf("cb0 = %.7e ,cb = %.7e,\n",cb0,cb); printf("cc0 = %.7e ,cc = %.7e,\n",cc0,cc); printf("ccpr0 = %.7e \n",ccpr0); printf("cepr0 = %.7e \n",cepr0); printf("cx0 = %.7e \n",cx0); printf("qbe0 = %.7e ,qbe = %.7e,\n",qbe0,qbe); printf("qbc0 = %.7e ,qbc = %.7e,\n",qbc0,qbc); printf("qcs0 = %.7e ,qcs = %.7e,\n",qcs0,qcs); printf("qbx0 = %.7e ,qbx = %.7e,\n",qbx0,qbx); printf("\n"); #endif /* SENSDEBUG */ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; /* load the RHS matrix */ *(info->SEN_RHS[here->BJTbaseNode] + here->BJTsenParmNo) -= DcxDp; *(info->SEN_RHS[here->BJTbasePrimeNode] + here->BJTsenParmNo) -= DbprmDp; *(info->SEN_RHS[here->BJTcolNode] + here->BJTsenParmNo) -= DccprDp; *(info->SEN_RHS[here->BJTcolPrimeNode] + here->BJTsenParmNo) -= DcprmDp; *(info->SEN_RHS[here->BJTemitNode] + here->BJTsenParmNo) -= DceprDp; *(info->SEN_RHS[here->BJTemitPrimeNode] + here->BJTsenParmNo) -= DeprmDp; #ifdef SENSDEBUG printf("after loading\n"); printf("DcxDp=%.7e\n", *(info->SEN_RHS[here->BJTbaseNode] + here->BJTsenParmNo)); printf("DcbprmDp=%.7e\n", *(info->SEN_RHS[here->BJTbasePrimeNode] + here->BJTsenParmNo)); printf("DccprDp=%.7e\n", *(info->SEN_RHS[here->BJTcolNode] + here->BJTsenParmNo)); printf("DcprmDp=%.7e\n", *(info->SEN_RHS[here->BJTcolPrimeNode] + here->BJTsenParmNo)); printf("DceprDp=%.7e\n", *(info->SEN_RHS[here->BJTemitNode] + here->BJTsenParmNo)); printf("DceprmDp=%.7e\n", *(info->SEN_RHS[here->BJTemitPrimeNode] + here->BJTsenParmNo)); #endif /* SENSDEBUG */ next: if((info->SENmode == DCSEN)||(ckt->CKTmode&MODETRANOP))goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ Osxpbe = tag0 * *(ckt->CKTstate1 + here->BJTsensxpbe + 8*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->BJTsensxpbe + 8*(iparmno - 1) + 1); Osxpbc = tag0 * *(ckt->CKTstate1 + here->BJTsensxpbc + 8*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->BJTsensxpbc + 8*(iparmno - 1) + 1); Osxpcs = tag0 * *(ckt->CKTstate1 + here->BJTsensxpsub + 8*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->BJTsensxpsub + 8*(iparmno - 1) + 1); Osxpbx = tag0 * *(ckt->CKTstate1 + here->BJTsensxpbx + 8*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->BJTsensxpbx + 8*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno=%d\n",iparmno); printf("Osxpbe=%.7e,Osxpbc=%.7e\n",Osxpbe,Osxpbc); printf("Osxpcs=%.7e,Osxpbx=%.7e\n",Osxpcs,Osxpbx); printf("sxpbe=%.7e,sdbe=%.7e\n", *(ckt->CKTstate1 + here->BJTsensxpbe + 8*(iparmno - 1)) ,*(ckt->CKTstate1 + here->BJTsensxpbe + 8*(iparmno - 1) + 1)); printf("sxpbc=%.7e,sdbc=%.7e\n", *(ckt->CKTstate1 + here->BJTsensxpbc + 8*(iparmno - 1)) ,*(ckt->CKTstate1 + here->BJTsensxpbc + 8*(iparmno - 1) + 1)); printf("\n"); #endif /* SENSDEBUG */ if(iparmno == here->BJTsenParmNo){ Osxpbe = Osxpbe - tag0 * DqbeDp; Osxpbc = Osxpbc - tag0 * DqbcDp; Osxpcs = Osxpcs - tag0 * DqcsDp; Osxpbx = Osxpbx - tag0 * DqbxDp; } #ifdef SENSDEBUG printf("Osxpbe=%.7e,Osxpbc=%.7e\n",Osxpbe,Osxpbc); printf("Osxpcs=%.7e,Osxpbx=%.7e\n",Osxpcs,Osxpbx); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->BJTbaseNode] + iparmno) += model->BJTtype * Osxpbx; *(info->SEN_RHS[here->BJTbasePrimeNode] + iparmno) += model->BJTtype * (Osxpbe + Osxpbc); *(info->SEN_RHS[here->BJTcolPrimeNode] + iparmno) -= model->BJTtype * (Osxpbc + Osxpcs + Osxpbx ); *(info->SEN_RHS[here->BJTemitPrimeNode] + iparmno) -= model->BJTtype * Osxpbe; *(info->SEN_RHS[here->BJTsubstNode] + iparmno) += model->BJTtype * Osxpcs; } /* put the unperturbed values back into the state vector */ restore: for(i=0; i <= 20; i++){ *(ckt->CKTstate0 + here->BJTstate + i) = *(SaveState0 + i); } *(ckt->CKTstate1 + here->BJTcexbc) = *(SaveState0 + 21); *(ckt->CKTstate1 + here->BJTcexbc) = *(SaveState0 + 21); here->BJTcapbe = *(SaveState0 + 23) ; here->BJTcapbc = *(SaveState0 + 24) ; here->BJTcapsub = *(SaveState0 + 25) ; here->BJTcapbx = *(SaveState0 + 26) ; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("BJTsenload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtinit.h0000644000265600020320000000035612264261473020633 0ustar andreasadmin#ifndef _BJTINIT_H #define _BJTINIT_H extern IFparm BJTpTable[ ]; extern IFparm BJTmPTable[ ]; extern char *BJTnames[ ]; extern int BJTpTSize; extern int BJTmPTSize; extern int BJTnSize; extern int BJTiSize; extern int BJTmSize; #endif ngspice-26/src/spicelib/devices/bjt/bjtdset.h0000644000265600020320000000006112264261473020620 0ustar andreasadmin#ifndef __BJTDSET_H #define __BJTDSET_H #endif ngspice-26/src/spicelib/devices/bjt/bjtsprt.c0000644000265600020320000000277212264261473020657 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all * the bjts in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" void BJTsPrint(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; printf("BJTS-----------------\n"); /* loop through all the BJT models */ for( ; model != NULL; model = model->BJTnextModel ) { printf("Model name:%s\n",model->BJTmodName); /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { ckt->CKTsenInfo->SEN_parmVal[here->BJTsenParmNo] = here->BJTarea; printf(" Instance name:%s\n",here->BJTname); printf(" Collector, Base , Emitter nodes: %s, %s ,%s\n", CKTnodName(ckt,here->BJTcolNode),CKTnodName(ckt,here->BJTbaseNode), CKTnodName(ckt,here->BJTemitNode)); printf(" Area: %g ",here->BJTarea); printf(here->BJTareaGiven ? "(specified)\n" : "(default)\n"); printf(" BJTsenParmNo:%d\n",here->BJTsenParmNo); } } } ngspice-26/src/spicelib/devices/bjt/bjtdel.c0000644000265600020320000000170212264261473020423 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * This routine deletes a BJT instance from the circuit and frees * the storage it was using. */ #include "ngspice/ngspice.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance **fast = (BJTinstance**)kill; BJTinstance **prev = NULL; BJTinstance *here; for( ; model ; model = model->BJTnextModel) { prev = &(model->BJTinstances); for(here = *prev; here ; here = *prev) { if(here->BJTname == name || (fast && here==*fast) ) { *prev= here->BJTnextInstance; FREE(here); return(OK); } prev = &(here->BJTnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bjt/bjtask.c0000644000265600020320000003036112264261473020440 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Mathew Lew and Thomas L. Quarles **********/ /* * This routine gives access to the internal device * parameters for BJTs */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int BJTask(CKTcircuit *ckt, GENinstance *instPtr, int which, IFvalue *value, IFvalue *select) { BJTinstance *here = (BJTinstance*)instPtr; double tmp; int itmp; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case BJT_QUEST_FT: tmp = MAX(*(ckt->CKTstate0 + here->BJTcqbc), *(ckt->CKTstate0 + here->BJTcqbx)); value->rValue = here->BJTgm/(2 * M_PI * MAX(*(ckt->CKTstate0 + here->BJTcqbe),tmp)); return(OK); case BJT_TEMP: value->rValue = here->BJTtemp - CONSTCtoK; return(OK); case BJT_DTEMP: value->rValue = here->BJTdtemp; return(OK); case BJT_AREA: value->rValue = here->BJTarea; return(OK); case BJT_AREAB: value->rValue = here->BJTareab; return(OK); case BJT_AREAC: value->rValue = here->BJTareac; return(OK); case BJT_M: value->rValue = here->BJTm; return(OK); case BJT_OFF: value->iValue = here->BJToff; return(OK); case BJT_IC_VBE: value->rValue = here->BJTicVBE; return(OK); case BJT_IC_VCE: value->rValue = here->BJTicVCE; return(OK); case BJT_QUEST_COLNODE: value->iValue = here->BJTcolNode; return(OK); case BJT_QUEST_BASENODE: value->iValue = here->BJTbaseNode; return(OK); case BJT_QUEST_EMITNODE: value->iValue = here->BJTemitNode; return(OK); case BJT_QUEST_SUBSTNODE: value->iValue = here->BJTsubstNode; return(OK); case BJT_QUEST_COLPRIMENODE: value->iValue = here->BJTcolPrimeNode; return(OK); case BJT_QUEST_BASEPRIMENODE: value->iValue = here->BJTbasePrimeNode; return(OK); case BJT_QUEST_EMITPRIMENODE: value->iValue = here->BJTemitPrimeNode; return(OK); case BJT_QUEST_VBE: value->rValue = *(ckt->CKTstate0 + here->BJTvbe); return(OK); case BJT_QUEST_VBC: value->rValue = *(ckt->CKTstate0 + here->BJTvbc); return(OK); case BJT_QUEST_CC: value->rValue = *(ckt->CKTstate0 + here->BJTcc); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CB: value->rValue = *(ckt->CKTstate0 + here->BJTcb); if (here->BJTmodPtr->BJTsubs==LATERAL) { value->rValue -= *(ckt->CKTstate0 + here->BJTcdsub); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->BJTcqsub); } } value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GPI: value->rValue = *(ckt->CKTstate0 + here->BJTgpi); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GMU: value->rValue = *(ckt->CKTstate0 + here->BJTgmu); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GM: value->rValue = *(ckt->CKTstate0 + here->BJTgm); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GO: value->rValue = *(ckt->CKTstate0 + here->BJTgo); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_QBE: value->rValue = *(ckt->CKTstate0 + here->BJTqbe); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CQBE: value->rValue = *(ckt->CKTstate0 + here->BJTcqbe); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_QBC: value->rValue = *(ckt->CKTstate0 + here->BJTqbc); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CQBC: value->rValue = *(ckt->CKTstate0 + here->BJTcqbc); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_QSUB: value->rValue = *(ckt->CKTstate0 + here->BJTqsub); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CQSUB: value->rValue = *(ckt->CKTstate0 + here->BJTcqsub); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_QBX: value->rValue = *(ckt->CKTstate0 + here->BJTqbx); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CQBX: value->rValue = *(ckt->CKTstate0 + here->BJTcqbx); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GX: value->rValue = *(ckt->CKTstate0 + here->BJTgx); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CEXBC: value->rValue = *(ckt->CKTstate0 + here->BJTcexbc); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GEQCB: value->rValue = *(ckt->CKTstate0 + here->BJTgeqcb); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GCSUB: value->rValue = *(ckt->CKTstate0 + here->BJTgcsub); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GDSUB: value->rValue = *(ckt->CKTstate0 + here->BJTgdsub); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_GEQBX: value->rValue = *(ckt->CKTstate0 + here->BJTgeqbx); value->rValue *= here->BJTm; return(OK); case BJT_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->BJTsenParmNo); } return(OK); case BJT_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->BJTsenParmNo); } return(OK); case BJT_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->BJTsenParmNo); } return(OK); case BJT_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->BJTsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->BJTsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case BJT_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->BJTsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->BJTsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case BJT_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ itmp = select->iValue + 1; value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[itmp]+ here->BJTsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[itmp]+ here->BJTsenParmNo); } return(OK); case BJT_QUEST_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "BJTask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = -(here->BJTmodPtr->BJTsubs * (*(ckt->CKTstate0 + here->BJTcqsub) + *(ckt->CKTstate0 + here->BJTcdsub))); } value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CE : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "BJTask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->BJTcc); value->rValue -= *(ckt->CKTstate0 + here->BJTcb); if (here->BJTmodPtr->BJTsubs==VERTICAL) { value->rValue += *(ckt->CKTstate0 + here->BJTcdsub); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += *(ckt->CKTstate0 + here->BJTcqsub); } } } value->rValue *= here->BJTm; return(OK); case BJT_QUEST_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "BJTask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = fabs( *(ckt->CKTstate0 + here->BJTcc) * (*(ckt->CKTrhsOld + here->BJTcolNode)- *(ckt->CKTrhsOld + here->BJTemitNode)) ); value->rValue +=fabs( *(ckt->CKTstate0 + here->BJTcb) * (*(ckt->CKTrhsOld + here->BJTbaseNode)- *(ckt->CKTrhsOld + here->BJTemitNode)) ); value->rValue +=fabs( *(ckt->CKTstate0 + here->BJTcdsub) * (*(ckt->CKTrhsOld + here->BJTsubstConNode)- *(ckt->CKTrhsOld + here->BJTsubstNode)) ); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += *(ckt->CKTstate0 + here->BJTcqsub) * fabs(*(ckt->CKTrhsOld + here->BJTsubstConNode)- *(ckt->CKTrhsOld + here->BJTsubstNode)); } } value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CPI: value->rValue = here->BJTcapbe; value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CMU: value->rValue = here->BJTcapbc; value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CBX: value->rValue = here->BJTcapbx; value->rValue *= here->BJTm; return(OK); case BJT_QUEST_CSUB: value->rValue = here->BJTcapsub; value->rValue *= here->BJTm; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bjt/bjtmask.c0000644000265600020320000003033212264261473020613 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int BJTmAsk(CKTcircuit *ckt, GENmodel *instPtr, int which, IFvalue *value) { BJTmodel *here = (BJTmodel*)instPtr; NG_IGNORE(ckt); switch(which) { case BJT_MOD_TYPE: if (here->BJTtype == NPN) value->sValue = "npn"; else value->sValue = "pnp"; return(OK); case BJT_MOD_SUBS: if (here->BJTsubs == LATERAL) value->sValue = "Lateral"; else value->sValue = "Vertical"; return(OK); case BJT_MOD_TNOM: value->rValue = here->BJTtnom-CONSTCtoK; return(OK); case BJT_MOD_IS: value->rValue = here->BJTsatCur; return(OK); case BJT_MOD_BF: value->rValue = here->BJTbetaF; return(OK); case BJT_MOD_NF: value->rValue = here->BJTemissionCoeffF; return(OK); case BJT_MOD_VAF: value->rValue = here->BJTearlyVoltF; return(OK); case BJT_MOD_IKF: value->rValue = here->BJTrollOffF; return(OK); case BJT_MOD_ISE: value->rValue = here->BJTleakBEcurrent; return(OK); case BJT_MOD_C2: value->rValue = here->BJTc2; return(OK); case BJT_MOD_NE: value->rValue = here->BJTleakBEemissionCoeff; return(OK); case BJT_MOD_BR: value->rValue = here->BJTbetaR; return(OK); case BJT_MOD_NR: value->rValue = here->BJTemissionCoeffR; return(OK); case BJT_MOD_VAR: value->rValue = here->BJTearlyVoltR; return(OK); case BJT_MOD_IKR: value->rValue = here->BJTrollOffR; return(OK); case BJT_MOD_ISC: value->rValue = here->BJTleakBCcurrent; return(OK); case BJT_MOD_C4: value->rValue = here->BJTc4; return(OK); case BJT_MOD_NC: value->rValue = here->BJTleakBCemissionCoeff; return(OK); case BJT_MOD_RB: value->rValue = here->BJTbaseResist; return(OK); case BJT_MOD_IRB: value->rValue = here->BJTbaseCurrentHalfResist; return(OK); case BJT_MOD_RBM: value->rValue = here->BJTminBaseResist; return(OK); case BJT_MOD_RE: value->rValue = here->BJTemitterResist; return(OK); case BJT_MOD_RC: value->rValue = here->BJTcollectorResist; return(OK); case BJT_MOD_CJE: value->rValue = here->BJTdepletionCapBE; return(OK); case BJT_MOD_VJE: value->rValue = here->BJTpotentialBE; return(OK); case BJT_MOD_MJE: value->rValue = here->BJTjunctionExpBE; return(OK); case BJT_MOD_TF: value->rValue = here->BJTtransitTimeF; return(OK); case BJT_MOD_XTF: value->rValue = here->BJTtransitTimeBiasCoeffF; return(OK); case BJT_MOD_VTF: value->rValue = here->BJTtransitTimeFVBC; return(OK); case BJT_MOD_ITF: value->rValue = here->BJTtransitTimeHighCurrentF; return(OK); case BJT_MOD_PTF: value->rValue = here->BJTexcessPhase; return(OK); case BJT_MOD_CJC: value->rValue = here->BJTdepletionCapBC; return(OK); case BJT_MOD_VJC: value->rValue = here->BJTpotentialBC; return(OK); case BJT_MOD_MJC: value->rValue = here->BJTjunctionExpBC; return(OK); case BJT_MOD_XCJC: value->rValue = here->BJTbaseFractionBCcap; return(OK); case BJT_MOD_TR: value->rValue = here->BJTtransitTimeR; return(OK); case BJT_MOD_CJS: value->rValue = here->BJTcapSub; return(OK); case BJT_MOD_VJS: value->rValue = here->BJTpotentialSubstrate; return(OK); case BJT_MOD_MJS: value->rValue = here->BJTexponentialSubstrate; return(OK); case BJT_MOD_XTB: value->rValue = here->BJTbetaExp; return(OK); case BJT_MOD_EG: value->rValue = here->BJTenergyGap; return(OK); case BJT_MOD_XTI: value->rValue = here->BJTtempExpIS; return(OK); case BJT_MOD_FC: value->rValue = here->BJTdepletionCapCoeff; return(OK); case BJT_MOD_KF: if (here->BJTfNcoefGiven) value->rValue = here->BJTfNcoef; else value->rValue = 0.0; return(OK); case BJT_MOD_AF: if (here->BJTfNexpGiven) value->rValue = here->BJTfNexp; else value->rValue = 0.0; return(OK); case BJT_MOD_INVEARLYF: value->rValue = here->BJTinvEarlyVoltF; return(OK); case BJT_MOD_INVEARLYR: value->rValue = here->BJTinvEarlyVoltR; return(OK); case BJT_MOD_INVROLLOFFF: value->rValue = here->BJTinvRollOffF; return(OK); case BJT_MOD_INVROLLOFFR: value->rValue = here->BJTinvRollOffR; return(OK); case BJT_MOD_COLCONDUCT: value->rValue = here->BJTcollectorConduct; return(OK); case BJT_MOD_EMITTERCONDUCT: value->rValue = here->BJTemitterConduct; return(OK); case BJT_MOD_TRANSVBCFACT: value->rValue = here->BJTtransitTimeVBCFactor; return(OK); case BJT_MOD_EXCESSPHASEFACTOR: value->rValue = here->BJTexcessPhaseFactor; return(OK); case BJT_MOD_ISS: value->rValue = here->BJTsubSatCur; return(OK); case BJT_MOD_NS: value->rValue = here->BJTemissionCoeffS; return(OK); case BJT_MOD_TLEV: value->iValue = here->BJTtlev; return(OK); case BJT_MOD_TLEVC: value->iValue = here->BJTtlevc; return(OK); case BJT_MOD_TBF1: value->rValue = here->BJTtbf1; return(OK); case BJT_MOD_TBF2: value->rValue = here->BJTtbf2; return(OK); case BJT_MOD_TBR1: value->rValue = here->BJTtbr1; return(OK); case BJT_MOD_TBR2: value->rValue = here->BJTtbr2; return(OK); case BJT_MOD_TIKF1: value->rValue = here->BJTtikf1; return(OK); case BJT_MOD_TIKF2: value->rValue = here->BJTtikf2; return(OK); case BJT_MOD_TIKR1: value->rValue = here->BJTtikr1; return(OK); case BJT_MOD_TIKR2: value->rValue = here->BJTtikr2; return(OK); case BJT_MOD_TIRB1: value->rValue = here->BJTtirb1; return(OK); case BJT_MOD_TIRB2: value->rValue = here->BJTtirb2; return(OK); case BJT_MOD_TNC1: value->rValue = here->BJTtnc1; return(OK); case BJT_MOD_TNC2: value->rValue = here->BJTtnc2; return(OK); case BJT_MOD_TNE1: value->rValue = here->BJTtne1; return(OK); case BJT_MOD_TNE2: value->rValue = here->BJTtne2; return(OK); case BJT_MOD_TNF1: value->rValue = here->BJTtnf1; return(OK); case BJT_MOD_TNF2: value->rValue = here->BJTtnf2; return(OK); case BJT_MOD_TNR1: value->rValue = here->BJTtnr1; return(OK); case BJT_MOD_TNR2: value->rValue = here->BJTtnr2; return(OK); case BJT_MOD_TRB1: value->rValue = here->BJTtrb1; return(OK); case BJT_MOD_TRB2: value->rValue = here->BJTtrb2; return(OK); case BJT_MOD_TRC1: value->rValue = here->BJTtrc1; return(OK); case BJT_MOD_TRC2: value->rValue = here->BJTtrc2; return(OK); case BJT_MOD_TRE1: value->rValue = here->BJTtre1; return(OK); case BJT_MOD_TRE2: value->rValue = here->BJTtre2; return(OK); case BJT_MOD_TRM1: value->rValue = here->BJTtrm1; return(OK); case BJT_MOD_TRM2: value->rValue = here->BJTtrm2; return(OK); case BJT_MOD_TVAF1: value->rValue = here->BJTtvaf1; return(OK); case BJT_MOD_TVAF2: value->rValue = here->BJTtvaf2; return(OK); case BJT_MOD_TVAR1: value->rValue = here->BJTtvar1; return(OK); case BJT_MOD_TVAR2: value->rValue = here->BJTtvar2; return(OK); case BJT_MOD_CTC: value->rValue = here->BJTctc; return(OK); case BJT_MOD_CTE: value->rValue = here->BJTcte; return(OK); case BJT_MOD_CTS: value->rValue = here->BJTcts; return(OK); case BJT_MOD_TVJE: value->rValue = here->BJTtvje; return(OK); case BJT_MOD_TVJC: value->rValue = here->BJTtvjc; return(OK); case BJT_MOD_TVJS: value->rValue = here->BJTtvjs; return(OK); case BJT_MOD_TITF1: value->rValue = here->BJTtitf1; return(OK); case BJT_MOD_TITF2: value->rValue = here->BJTtitf2; return(OK); case BJT_MOD_TTF1: value->rValue = here->BJTttf1; return(OK); case BJT_MOD_TTF2: value->rValue = here->BJTttf2; return(OK); case BJT_MOD_TTR1: value->rValue = here->BJTttr1; return(OK); case BJT_MOD_TTR2: value->rValue = here->BJTttr2; return(OK); case BJT_MOD_TMJE1: value->rValue = here->BJTtmje1; return(OK); case BJT_MOD_TMJE2: value->rValue = here->BJTtmje2; return(OK); case BJT_MOD_TMJC1: value->rValue = here->BJTtmjc1; return(OK); case BJT_MOD_TMJC2: value->rValue = here->BJTtmjc2; return(OK); case BJT_MOD_TMJS1: value->rValue = here->BJTtmjs1; return(OK); case BJT_MOD_TMJS2: value->rValue = here->BJTtmjs2; return(OK); case BJT_MOD_TNS1: value->rValue = here->BJTtns1; return(OK); case BJT_MOD_TNS2: value->rValue = here->BJTtns2; return(OK); case BJT_MOD_NKF: value->rValue = here->BJTnkf; return(OK); case BJT_MOD_TIS1: value->rValue = here->BJTtis1; return(OK); case BJT_MOD_TIS2: value->rValue = here->BJTtis2; return(OK); case BJT_MOD_TISE1: value->rValue = here->BJTtise1; return(OK); case BJT_MOD_TISE2: value->rValue = here->BJTtise2; return(OK); case BJT_MOD_TISC1: value->rValue = here->BJTtisc1; return(OK); case BJT_MOD_TISC2: value->rValue = here->BJTtisc2; return(OK); case BJT_MOD_VBE_MAX: value->rValue = here->BJTvbeMax; return(OK); case BJT_MOD_VBC_MAX: value->rValue = here->BJTvbcMax; return(OK); case BJT_MOD_VCE_MAX: value->rValue = here->BJTvceMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bjt/bjt.c0000644000265600020320000003336712264261473017752 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * This file defines the BJT data structures that are * available to the next level(s) up the calling hierarchy */ /* * You may define the preprocessor symbolo * BJT_COMPAT to enable compatibility with * archaic spice2 bjt model */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bjtdefs.h" #include "ngspice/suffix.h" IFparm BJTpTable[] = { /* parameters */ IOPU("off", BJT_OFF, IF_FLAG, "Device initially off"), IOPAU("icvbe", BJT_IC_VBE, IF_REAL, "Initial B-E voltage"), IOPAU("icvce", BJT_IC_VCE, IF_REAL, "Initial C-E voltage"), IOPU("area", BJT_AREA, IF_REAL, "(Emitter) Area factor"), IOPU("areab", BJT_AREAB, IF_REAL, "Base area factor"), IOPU("areac", BJT_AREAC, IF_REAL, "Collector area factor"), IOPU("m", BJT_M, IF_REAL, "Parallel Multiplier"), IP("ic", BJT_IC, IF_REALVEC, "Initial condition vector"), IP("sens_area", BJT_AREA_SENS,IF_FLAG, "flag to request sensitivity WRT area"), OPU("colnode", BJT_QUEST_COLNODE, IF_INTEGER, "Number of collector node"), OPU("basenode", BJT_QUEST_BASENODE, IF_INTEGER, "Number of base node"), OPU("emitnode", BJT_QUEST_EMITNODE, IF_INTEGER, "Number of emitter node"), OPU("substnode",BJT_QUEST_SUBSTNODE,IF_INTEGER, "Number of substrate node"), OPU("colprimenode",BJT_QUEST_COLPRIMENODE,IF_INTEGER, "Internal collector node"), OPU("baseprimenode",BJT_QUEST_BASEPRIMENODE,IF_INTEGER,"Internal base node"), OPU("emitprimenode",BJT_QUEST_EMITPRIMENODE,IF_INTEGER, "Internal emitter node"), OP("ic", BJT_QUEST_CC, IF_REAL, "Current at collector node"), OP("ib", BJT_QUEST_CB, IF_REAL, "Current at base node"), OP("ie", BJT_QUEST_CE, IF_REAL, "Emitter current"), OPU("is", BJT_QUEST_CS, IF_REAL, "Substrate current"), OP("vbe", BJT_QUEST_VBE, IF_REAL, "B-E voltage"), OP("vbc", BJT_QUEST_VBC, IF_REAL, "B-C voltage"), OP("gm", BJT_QUEST_GM, IF_REAL, "Small signal transconductance"), OP("gpi", BJT_QUEST_GPI, IF_REAL, "Small signal input conductance - pi"), OP("gmu", BJT_QUEST_GMU, IF_REAL, "Small signal conductance - mu"), OP("gx", BJT_QUEST_GX, IF_REAL, "Conductance from base to internal base"), OP("go", BJT_QUEST_GO, IF_REAL, "Small signal output conductance"), OPU("geqcb",BJT_QUEST_GEQCB,IF_REAL, "d(Ibe)/d(Vbc)"), OPU("gcsub",BJT_QUEST_GCSUB, IF_REAL, "Internal Subs. cap. equiv. cond."), OPU("gdsub", BJT_QUEST_GDSUB, IF_REAL, "Internal Subs. Diode equiv. cond."), OPU("geqbx",BJT_QUEST_GEQBX,IF_REAL, "Internal C-B-base cap. equiv. cond."), OP("cpi",BJT_QUEST_CPI, IF_REAL, "Internal base to emitter capacitance"), OP("cmu",BJT_QUEST_CMU, IF_REAL, "Internal base to collector capacitance"), OP("cbx",BJT_QUEST_CBX, IF_REAL, "Base to collector capacitance"), OP("csub",BJT_QUEST_CSUB, IF_REAL, "Substrate capacitance"), OPU("cqbe", BJT_QUEST_CQBE, IF_REAL, "Cap. due to charge storage in B-E jct."), OPU("cqbc", BJT_QUEST_CQBC, IF_REAL, "Cap. due to charge storage in B-C jct."), OPU("cqsub", BJT_QUEST_CQSUB, IF_REAL, "Cap. due to charge storage in Subs. jct."), OPU("cqbx", BJT_QUEST_CQBX, IF_REAL, "Cap. due to charge storage in B-X jct."), OPU("cexbc",BJT_QUEST_CEXBC,IF_REAL, "Total Capacitance in B-X junction"), OPU("qbe", BJT_QUEST_QBE, IF_REAL, "Charge storage B-E junction"), OPU("qbc", BJT_QUEST_QBC, IF_REAL, "Charge storage B-C junction"), OPU("qsub", BJT_QUEST_QSUB, IF_REAL, "Charge storage Subs. junction"), OPU("qbx", BJT_QUEST_QBX, IF_REAL, "Charge storage B-X junction"), OPU("p", BJT_QUEST_POWER,IF_REAL, "Power dissipation"), OPU("sens_dc", BJT_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU("sens_real", BJT_QUEST_SENS_REAL, IF_REAL,"real part of ac sensitivity"), OPU("sens_imag", BJT_QUEST_SENS_IMAG,IF_REAL, "dc sens. & imag part of ac sens."), OPU("sens_mag", BJT_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU("sens_ph", BJT_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx", BJT_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity"), IOPU("temp", BJT_TEMP, IF_REAL, "instance temperature"), IOPU("dtemp", BJT_DTEMP, IF_REAL, "instance temperature delta from circuit") }; IFparm BJTmPTable[] = { /* model parameters */ OP("type", BJT_MOD_TYPE, IF_STRING, "NPN or PNP"), IOPU("npn", BJT_MOD_NPN, IF_FLAG, "NPN type device"), IOPU("pnp", BJT_MOD_PNP, IF_FLAG, "PNP type device"), IOPU("subs", BJT_MOD_SUBS, IF_INTEGER, "Vertical or Lateral device"), IOP("tnom", BJT_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOPR("tref", BJT_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP("is", BJT_MOD_IS, IF_REAL, "Saturation Current"), IOP("bf", BJT_MOD_BF, IF_REAL, "Ideal forward beta"), IOP("nf", BJT_MOD_NF, IF_REAL, "Forward emission coefficient"), IOP("vaf", BJT_MOD_VAF, IF_REAL, "Forward Early voltage"), IOPR("va", BJT_MOD_VAF, IF_REAL, "Forward Early voltage"), IOP("ikf", BJT_MOD_IKF, IF_REAL, "Forward beta roll-off corner current"), IOPR("ik", BJT_MOD_IKF, IF_REAL, "Forward beta roll-off corner current"), IOP("ise", BJT_MOD_ISE, IF_REAL, "B-E leakage saturation current"), #ifdef BJT_COMPAT IOP("c2", BJT_MOD_C2, IF_REAL, "Obsolete parameter name"), #endif IOP("ne", BJT_MOD_NE, IF_REAL, "B-E leakage emission coefficient"), IOP("br", BJT_MOD_BR, IF_REAL, "Ideal reverse beta"), IOP("nr", BJT_MOD_NR, IF_REAL, "Reverse emission coefficient"), IOP("var", BJT_MOD_VAR, IF_REAL, "Reverse Early voltage"), IOPR("vb", BJT_MOD_VAR, IF_REAL, "Reverse Early voltage"), IOP("ikr", BJT_MOD_IKR, IF_REAL, "reverse beta roll-off corner current"), IOP("isc", BJT_MOD_ISC, IF_REAL, "B-C leakage saturation current"), #ifdef BJT_COMPAT IOP("c4", BJT_MOD_C4, IF_REAL, "Obsolete parameter name"), #endif IOP("nc", BJT_MOD_NC, IF_REAL, "B-C leakage emission coefficient"), IOP("rb", BJT_MOD_RB, IF_REAL, "Zero bias base resistance"), IOP("irb", BJT_MOD_IRB, IF_REAL, "Current for base resistance=(rb+rbm)/2"), IOP("rbm", BJT_MOD_RBM, IF_REAL, "Minimum base resistance"), IOP("re", BJT_MOD_RE, IF_REAL, "Emitter resistance"), IOP("rc", BJT_MOD_RC, IF_REAL, "Collector resistance"), IOPA("cje", BJT_MOD_CJE, IF_REAL,"Zero bias B-E depletion capacitance"), IOPA("vje", BJT_MOD_VJE, IF_REAL, "B-E built in potential"), IOPR("pe", BJT_MOD_VJE, IF_REAL, "B-E built in potential"), IOPA("mje", BJT_MOD_MJE, IF_REAL, "B-E junction grading coefficient"), IOPR("me", BJT_MOD_MJE, IF_REAL, "B-E junction grading coefficient"), IOPA("tf", BJT_MOD_TF, IF_REAL, "Ideal forward transit time"), IOPA("xtf", BJT_MOD_XTF, IF_REAL, "Coefficient for bias dependence of TF"), IOPA("vtf", BJT_MOD_VTF, IF_REAL, "Voltage giving VBC dependence of TF"), IOPA("itf", BJT_MOD_ITF, IF_REAL, "High current dependence of TF"), IOPA("ptf", BJT_MOD_PTF, IF_REAL, "Excess phase"), IOPA("cjc", BJT_MOD_CJC, IF_REAL, "Zero bias B-C depletion capacitance"), IOPA("vjc", BJT_MOD_VJC, IF_REAL, "B-C built in potential"), IOPR("pc", BJT_MOD_VJC, IF_REAL, "B-C built in potential"), IOPA("mjc", BJT_MOD_MJC, IF_REAL, "B-C junction grading coefficient"), IOPR("mc", BJT_MOD_MJC, IF_REAL, "B-C junction grading coefficient"), IOPA("xcjc",BJT_MOD_XCJC, IF_REAL, "Fraction of B-C cap to internal base"), IOPA("tr", BJT_MOD_TR, IF_REAL, "Ideal reverse transit time"), IOPA("cjs", BJT_MOD_CJS, IF_REAL, "Zero bias Substrate capacitance"), IOPR("csub", BJT_MOD_CJS, IF_REAL, "Zero bias Substrate capacitance"), IOPR("ccs", BJT_MOD_CJS, IF_REAL, "Zero bias Substrate capacitance"), IOPA("vjs", BJT_MOD_VJS, IF_REAL, "Substrate junction built in potential"), IOPR("ps", BJT_MOD_VJS, IF_REAL, "Substrate junction built in potential"), IOPA("mjs", BJT_MOD_MJS, IF_REAL, "Substrate junction grading coefficient"), IOPR("ms", BJT_MOD_MJS, IF_REAL, "Substrate junction grading coefficient"), IOP("xtb", BJT_MOD_XTB, IF_REAL, "Forward and reverse beta temp. exp."), IOP("eg", BJT_MOD_EG, IF_REAL, "Energy gap for IS temp. dependency"), IOP("xti", BJT_MOD_XTI, IF_REAL, "Temp. exponent for IS"), IOP("fc", BJT_MOD_FC, IF_REAL, "Forward bias junction fit parameter"), IOP("kf", BJT_MOD_KF, IF_REAL, "Flicker Noise Coefficient"), IOP("af", BJT_MOD_AF, IF_REAL,"Flicker Noise Exponent"), OPU("invearlyvoltf",BJT_MOD_INVEARLYF,IF_REAL,"Inverse early voltage:forward"), OPU("invearlyvoltr",BJT_MOD_INVEARLYR,IF_REAL,"Inverse early voltage:reverse"), OPU("invrollofff", BJT_MOD_INVROLLOFFF, IF_REAL,"Inverse roll off - forward"), OPU("invrolloffr", BJT_MOD_INVROLLOFFR, IF_REAL,"Inverse roll off - reverse"), OPU("collectorconduct",BJT_MOD_COLCONDUCT,IF_REAL,"Collector conductance"), OPU("emitterconduct", BJT_MOD_EMITTERCONDUCT,IF_REAL, "Emitter conductance"), OPU("transtimevbcfact",BJT_MOD_TRANSVBCFACT,IF_REAL,"Transit time VBC factor"), OPU("excessphasefactor",BJT_MOD_EXCESSPHASEFACTOR,IF_REAL, "Excess phase fact."), IOP("iss", BJT_MOD_ISS, IF_REAL, "Substrate Jct. Saturation Current"), IOP("ns", BJT_MOD_NS, IF_REAL, "Substrate current emission coefficient"), IOP("tlev", BJT_MOD_TLEV, IF_INTEGER, "Temperature equation selector"), IOP("tlevc", BJT_MOD_TLEVC, IF_INTEGER, "Temperature equation selector"), IOP("tbf1", BJT_MOD_TBF1, IF_REAL, "BF 1. temperature coefficient"), IOP("tbf2", BJT_MOD_TBF2, IF_REAL, "BF 2. temperature coefficient"), IOP("tbr1", BJT_MOD_TBR1, IF_REAL, "BR 1. temperature coefficient"), IOP("tbr2", BJT_MOD_TBR2, IF_REAL, "BR 2. temperature coefficient"), IOP("tikf1", BJT_MOD_TIKF1, IF_REAL, "IKF 1. temperature coefficient"), IOP("tikf2", BJT_MOD_TIKF2, IF_REAL, "IKF 2. temperature coefficient"), IOP("tikr1", BJT_MOD_TIKR1, IF_REAL, "IKR 1. temperature coefficient"), IOP("tikr2", BJT_MOD_TIKR2, IF_REAL, "IKR 2. temperature coefficient"), IOP("tirb1", BJT_MOD_TIRB1, IF_REAL, "IRB 1. temperature coefficient"), IOP("tirb2", BJT_MOD_TIRB2, IF_REAL, "IRB 2. temperature coefficient"), IOP("tnc1", BJT_MOD_TNC1, IF_REAL, "NC 1. temperature coefficient"), IOP("tnc2", BJT_MOD_TNC2, IF_REAL, "NC 2. temperature coefficient"), IOP("tne1", BJT_MOD_TNE1, IF_REAL, "NE 1. temperature coefficient"), IOP("tne2", BJT_MOD_TNE2, IF_REAL, "NE 2. temperature coefficient"), IOP("tnf1", BJT_MOD_TNF1, IF_REAL, "NF 1. temperature coefficient"), IOP("tnf2", BJT_MOD_TNF2, IF_REAL, "NF 2. temperature coefficient"), IOP("tnr1", BJT_MOD_TNR1, IF_REAL, "NR 1. temperature coefficient"), IOP("tnr2", BJT_MOD_TNR2, IF_REAL, "NR 2. temperature coefficient"), IOP("trb1", BJT_MOD_TRB1, IF_REAL, "RB 1. temperature coefficient"), IOP("trb2", BJT_MOD_TRB2, IF_REAL, "RB 2. temperature coefficient"), IOP("trc1", BJT_MOD_TRC1, IF_REAL, "RC 1. temperature coefficient"), IOP("trc2", BJT_MOD_TRC2, IF_REAL, "RC 2. temperature coefficient"), IOP("tre1", BJT_MOD_TRE1, IF_REAL, "RE 1. temperature coefficient"), IOP("tre2", BJT_MOD_TRE2, IF_REAL, "RE 2. temperature coefficient"), IOP("trm1", BJT_MOD_TRM1, IF_REAL, "RBM 1. temperature coefficient"), IOP("trm2", BJT_MOD_TRM2, IF_REAL, "RBM 2. temperature coefficient"), IOP("tvaf1", BJT_MOD_TVAF1, IF_REAL, "VAF 1. temperature coefficient"), IOP("tvaf2", BJT_MOD_TVAF2, IF_REAL, "VAF 2. temperature coefficient"), IOP("tvar1", BJT_MOD_TVAR1, IF_REAL, "VAR 1. temperature coefficient"), IOP("tvar2", BJT_MOD_TVAR2, IF_REAL, "VAR 2. temperature coefficient"), IOP("ctc", BJT_MOD_CTC, IF_REAL, "CJC temperature coefficient"), IOP("cte", BJT_MOD_CTE, IF_REAL, "CJE temperature coefficient"), IOP("cts", BJT_MOD_CTS, IF_REAL, "CJS temperature coefficient"), IOP("tvjc", BJT_MOD_TVJC, IF_REAL, "VJC temperature coefficient"), IOP("tvje", BJT_MOD_TVJE, IF_REAL, "VJE temperature coefficient"), IOP("tvjs", BJT_MOD_TVJS, IF_REAL, "VJS temperature coefficient"), IOP("titf1",BJT_MOD_TITF1, IF_REAL, "ITF 1. temperature coefficient"), IOP("titf2",BJT_MOD_TITF2, IF_REAL, "ITF 2. temperature coefficient"), IOP("ttf1", BJT_MOD_TTF1, IF_REAL, "TF 1. temperature coefficient"), IOP("ttf2", BJT_MOD_TTF2, IF_REAL, "TF 2. temperature coefficient"), IOP("ttr1", BJT_MOD_TTR1, IF_REAL, "TR 1. temperature coefficient"), IOP("ttr2", BJT_MOD_TTR2, IF_REAL, "TR 2. temperature coefficient"), IOP("tmje1",BJT_MOD_TMJE1, IF_REAL, "MJE 1. temperature coefficient"), IOP("tmje2",BJT_MOD_TMJE2, IF_REAL, "MJE 2. temperature coefficient"), IOP("tmjc1",BJT_MOD_TMJC1, IF_REAL, "MJC 1. temperature coefficient"), IOP("tmjc2",BJT_MOD_TMJC2, IF_REAL, "MJC 2. temperature coefficient"), IOP("tmjs1",BJT_MOD_TMJS1, IF_REAL, "MJS 1. temperature coefficient"), IOP("tmjs2",BJT_MOD_TMJS2, IF_REAL, "MJS 2. temperature coefficient"), IOP("tns1", BJT_MOD_TNS1, IF_REAL, "NS 1. temperature coefficient"), IOP("tns2", BJT_MOD_TNS2, IF_REAL, "NS 2. temperature coefficient"), IOP("nkf", BJT_MOD_NKF, IF_REAL, "NKF High current beta rolloff exponent"), IOP("tis1", BJT_MOD_TIS1, IF_REAL, "IS 1. temperature coefficient"), IOP("tis2", BJT_MOD_TIS2, IF_REAL, "IS 2. temperature coefficient"), IOP("tise1", BJT_MOD_TISE1, IF_REAL, "ISE 1. temperature coefficient"), IOP("tise2", BJT_MOD_TISE2, IF_REAL, "ISE 2. temperature coefficient"), IOP("tisc1", BJT_MOD_TISC1, IF_REAL, "ISC 1. temperature coefficient"), IOP("tisc2", BJT_MOD_TISC2, IF_REAL, "ISC 2. temperature coefficient"), IOP("vbe_max", BJT_MOD_VBE_MAX, IF_REAL, "maximum voltage B-E junction"), IOP("vbc_max", BJT_MOD_VBC_MAX, IF_REAL, "maximum voltage B-C junction"), IOP("vce_max", BJT_MOD_VCE_MAX, IF_REAL, "maximum voltage C-E branch") }; char *BJTnames[] = { "collector", "base", "emitter", "substrate" }; int BJTnSize = NUMELEMS(BJTnames); int BJTpTSize = NUMELEMS(BJTpTable); int BJTmPTSize = NUMELEMS(BJTmPTable); int BJTiSize = sizeof(BJTinstance); int BJTmSize = sizeof(BJTmodel); ngspice-26/src/spicelib/devices/bjt/bjtdset.c0000644000265600020320000005675612264261473020641 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/distodef.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" /* * This function initialises the Taylor coeffs for the * BJT's in the circuit */ /* actually load the current resistance value into the sparse matrix * previously provided */ int BJTdSetup(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; double arg; double c2; double c4; double lcapbe1, lcapbe2, lcapbe3; double lcapbx1, lcapbx2, lcapbx3; double cb = 0.0; double cbc; double cbcn; double cbe; double cben; double cdis; double csat; double ctot; double czbc; double czbcf2; double czbe; double czbef2; double czbx; double czbxf2; double czcs; double evbc; double evbcn; double evbe; double evben; double f1; double f2; double f3; double fcpc; double fcpe; double gbb1 = 0.0; double gbc; double gbcn; double gbe; double gbe2, gbe3; double gbc2,gbc3; double gben2,gben3; double gbcn2,gbcn3; double gben; double gbb2 = 0.0, gbb3 = 0.0; double oik; double oikr; double ovtf; double pc; double pe; double ps; double q1; double q2; double qb; double rbpi; double rbpr; double sarg; double sqarg; double tf; double tr; double vbc; double vbe; double vbx; double vsc; double vt; double vtc; double vte; double vtn; double xjrb; double xjtf; double xmc; double xme; double xms; double xtf; double vbed; double vbb; double lcapbc1 = 0.0; double lcapbc2 = 0.0; double lcapbc3 = 0.0; double lcapsc1 = 0.0; double lcapsc2 = 0.0; double lcapsc3 = 0.0; double ic; double dummy; Dderivs d_p, d_q, d_r; Dderivs d_dummy, d_q1, d_qb, d_dummy2; Dderivs d_arg, d_sqarg, d_ic, d_q2; Dderivs d_z, d_tanz, d_vbb, d_ibb, d_rbb; Dderivs d_ib, d_cbe, d_tff, d_qbe; d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2q = 0.0; d_p.d3_p2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q, &d_p); d_q.d1_q = 1.0; d_q.d1_p = 0.0; EqualDeriv(&d_r, &d_p); d_r.d1_r = 1.0; d_r.d1_p = 0.0; /* loop through all the models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { vt = here->BJTtemp * CONSTKoverQ; /* * dc model paramters */ csat=here->BJTtSatCur*here->BJTarea * here->BJTm; rbpr=here->BJTtminBaseResist/(here->BJTarea * here->BJTm); rbpi=here->BJTtbaseResist/(here->BJTarea * here->BJTm)-rbpr; oik=here->BJTtinvRollOffF/(here->BJTarea * here->BJTm); c2=here->BJTtBEleakCur*here->BJTarea * here->BJTm; vte=here->BJTtleakBEemissionCoeff*vt; oikr=here->BJTtinvRollOffR/(here->BJTarea * here->BJTm); c4=here->BJTtBCleakCur * here->BJTm; if (model->BJTsubs == VERTICAL) c4 *= here->BJTareab; else c4 *= here->BJTareac; /* lateral transistor */ vtc=here->BJTtleakBCemissionCoeff*vt; xjrb=here->BJTtbaseCurrentHalfResist*here->BJTarea * here->BJTm; /* * initialization */ vbe= model->BJTtype*(*(ckt->CKTrhsOld + here->BJTbasePrimeNode) - *(ckt->CKTrhsOld + here->BJTemitPrimeNode)); vbc= model->BJTtype*(*(ckt->CKTrhsOld + here->BJTbaseNode) - *(ckt->CKTrhsOld + here->BJTcolPrimeNode)); vbx=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsc=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vbb=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode) - *(ckt->CKTrhsOld+here->BJTbasePrimeNode)); vbed = vbe; /* this is just a dummy variable * it is the delayed vbe to be * used in the delayed gm generator */ /* ic = f1(vbe,vbc,vbed) + f2(vbc) + f3(vbc) * * we shall calculate the taylor coeffs of ic wrt vbe, * vbed, and vbc and store them away. the equations f1 f2 * and f3 are given elsewhere; we shall start off with f1, * compute derivs. upto third order and then do f2 and f3 * and add their derivatives. * * Since f1 above is a function of three variables, it * will be convenient to use derivative structures to * compute the derivatives of f1. For this computation, * p=vbe, q=vbc, r=vbed. * * ib = f1(vbe) + f2(vbc) (not the same f's as above, in * case you are wondering!) the gbe's gbc's gben's and * gbcn's are convenient subsidiary variables. * * irb = f(vbe, vbc, vbb) - the vbe & vbc dependencies * arise from the qb term. * * qbe = f1(vbe,vbc) + f2(vbe) * * derivative structures will be used again in the above * two equations. p=vbe, q=vbc, r=vbb. * * qbc = f(vbc) ; qbx = f(vbx) * * qss = f(vsc) */ /* * determine dc current and derivitives */ vtn=vt*here->BJTtemissionCoeffF; if(vbe > -5*vtn){ evbe=exp(vbe/vtn); cbe=csat*(evbe-1)+ckt->CKTgmin*vbe; gbe=csat*evbe/vtn+ckt->CKTgmin; gbe2 = csat*evbe/vtn/vtn; gbe3 = gbe2/vtn; /* note - these are actually derivs, not Taylor * coeffs. - not divided by 2! and 3! */ if (c2 == 0) { cben=0; gben=gben2=gben3=0; } else { evben=exp(vbe/vte); cben=c2*(evben-1); gben=c2*evben/vte; gben2=gben/vte; gben3=gben2/vte; } } else { gbe = -csat/vbe+ckt->CKTgmin; gbe2=gbe3=gben2=gben3=0; cbe=gbe*vbe; gben = -c2/vbe; cben=gben*vbe; } vtn=vt*here->BJTtemissionCoeffR; if(vbc > -5*vtn) { evbc=exp(vbc/vtn); cbc=csat*(evbc-1)+ckt->CKTgmin*vbc; gbc=csat*evbc/vtn+ckt->CKTgmin; gbc2=csat*evbc/vtn/vtn; gbc3=gbc2/vtn; if (c4 == 0) { cbcn=0; gbcn=0; gbcn2=gbcn3=0; } else { evbcn=exp(vbc/vtc); cbcn=c4*(evbcn-1); gbcn=c4*evbcn/vtc; gbcn2=gbcn/vtc; gbcn3=gbcn2/vtc; } } else { gbc = -csat/vbc+ckt->CKTgmin; gbc2=gbc3=0; cbc = gbc*vbc; gbcn = -c4/vbc; gbcn2=gbcn3=0; cbcn=gbcn*vbc; } /* * determine base charge terms */ /* q1 is a function of 2 variables p=vbe and q=vbc. r= * anything */ q1=1/(1-here->BJTtinvEarlyVoltF*vbc-here->BJTtinvEarlyVoltR*vbe); dummy = (1-here->BJTtinvEarlyVoltF*vbc- here->BJTtinvEarlyVoltR*vbe); EqualDeriv(&d_dummy, &d_p); d_dummy.value = dummy; d_dummy.d1_p = - here->BJTtinvEarlyVoltR; d_dummy.d1_q = - here->BJTtinvEarlyVoltF; /* q1 = 1/dummy */ InvDeriv(&d_q1, &d_dummy); /* now q1 and its derivatives are set up */ if(oik == 0 && oikr == 0) { qb=q1; EqualDeriv(&d_qb, &d_q1); } else { q2=oik*cbe+oikr*cbc; EqualDeriv(&d_q2, &d_p); d_q2.value = q2; d_q2.d1_p = oik*gbe; d_q2.d1_q = oikr*gbc; d_q2.d2_p2 = oik*gbe2; d_q2.d2_q2 = oikr*gbc2; d_q2.d3_p3 = oik*gbe3; d_q2.d3_q3 = oikr*gbc3; arg=MAX(0,1+4*q2); if (arg == 0.) { EqualDeriv(&d_arg,&d_p); d_arg.d1_p = 0.0; } else { TimesDeriv(&d_arg,&d_q2,4.0); d_arg.value += 1.; } sqarg=1; EqualDeriv(&d_sqarg,&d_p); d_sqarg.value = 1.0; d_sqarg.d1_p = 0.0; if(arg != 0){ sqarg=sqrt(arg); SqrtDeriv(&d_sqarg, &d_arg); } qb=q1*(1+sqarg)/2; dummy = 1 + sqarg; EqualDeriv(&d_dummy, &d_sqarg); d_dummy.value += 1.0; MultDeriv(&d_qb, &d_q1, &d_dummy); TimesDeriv(&d_qb, &d_qb, 0.5); } ic = (cbe - cbc)/qb; /* cbe is a fn of vbed only; cbc of vbc; and qb of vbe and vbc */ /* p=vbe, q=vbc, r=vbed; now dummy = cbe - cbc */ EqualDeriv(&d_dummy, &d_p); d_dummy.d1_p = 0.0; d_dummy.value = cbe-cbc; d_dummy.d1_r = gbe; d_dummy.d2_r2 = gbe2; d_dummy.d3_r3 = gbe3; d_dummy.d1_q = -gbc; d_dummy.d2_q2 = -gbc2; d_dummy.d3_q3 = -gbc3; DivDeriv(&d_ic, &d_dummy, &d_qb); d_ic.value -= cbc/here->BJTtBetaR + cbcn; d_ic.d1_q -= gbc/here->BJTtBetaR + gbcn; d_ic.d2_q2 -= gbc2/here->BJTtBetaR + gbcn2; d_ic.d3_q3 -= gbc3/here->BJTtBetaR + gbcn3; /* check this point: where is the f2(vbe) contribution to ic ? */ /* ic derivatives all set up now */ /* base spread resistance */ if ( !((rbpr == 0.0) && (rbpi == 0.0))) { cb=cbe/here->BJTtBetaF+cben+cbc/here->BJTtBetaR+cbcn; /* we are calculating derivatives w.r.t cb itself */ /* gx=rbpr+rbpi/qb; */ if (cb != 0.0) { if((xjrb != 0.0) && (rbpi != 0.0)) { /* p = ib, q, r = anything */ dummy=MAX(cb/xjrb,1e-9); EqualDeriv(&d_dummy, &d_p); d_dummy.value = dummy; d_dummy.d1_p = 1/xjrb; SqrtDeriv(&d_dummy, &d_dummy); TimesDeriv(&d_dummy, &d_dummy, 2.4317); /* dummy2=(-1+sqrt(1+14.59025*MAX(cb/xjrb,1e-9))); */ EqualDeriv(&d_dummy2, &d_p); d_dummy2.value = 1+14.59025*MAX(cb/xjrb,1e-9); d_dummy2.d1_p = 14.59025/xjrb; SqrtDeriv(&d_dummy2, &d_dummy2); d_dummy2.value -= 1.0; DivDeriv(&d_z, &d_dummy2, &d_dummy); TanDeriv(&d_tanz, &d_z); /* now using dummy = tanz - z and dummy2 = z*tanz*tanz */ TimesDeriv(&d_dummy, &d_z, -1.0); PlusDeriv(&d_dummy, &d_dummy, &d_tanz); MultDeriv(&d_dummy2, &d_tanz, &d_tanz); MultDeriv(&d_dummy2, &d_dummy2, &d_z); DivDeriv(&d_rbb , &d_dummy, &d_dummy2); TimesDeriv(&d_rbb,&d_rbb, 3.0*rbpi); d_rbb.value += rbpr; MultDeriv(&d_vbb, &d_rbb, &d_p); /* power series inversion to get the conductance derivatives */ if (d_vbb.d1_p != 0) { gbb1 = 1/d_vbb.d1_p; gbb2 = -(d_vbb.d2_p2*0.5)*gbb1*gbb1; gbb3 = gbb1*gbb1*gbb1*gbb1*(-(d_vbb.d3_p3/6.0) + 2*(d_vbb.d2_p2*0.5)*(d_vbb.d2_p2*0.5)*gbb1); } else printf("\nd_vbb.d1_p = 0 in base spread resistance calculations\n"); /* r = vbb */ EqualDeriv(&d_ibb, &d_r); d_ibb.value = cb; d_ibb.d1_r = gbb1; d_ibb.d2_r2 = 2*gbb2; d_ibb.d3_r3 = 6.0*gbb3; } else { /* rbb = rbpr + rbpi/qb; ibb = vbb /rbb; = f(vbe, vbc, vbb) */ EqualDeriv(&d_rbb,&d_p); d_rbb.d1_p = 0.0; if (rbpi != 0.0) { InvDeriv(&d_rbb, &d_qb); TimesDeriv(&d_rbb, &d_rbb,rbpi); } d_rbb.value += rbpr; EqualDeriv(&d_ibb,&d_r); d_ibb.value = vbb; DivDeriv(&d_ibb,&d_ibb,&d_rbb); } } else { EqualDeriv(&d_ibb,&d_r); if (rbpr != 0.0) d_ibb.d1_r = 1/rbpr; } } else { EqualDeriv(&d_ibb,&d_p); d_ibb.d1_p = 0.0; } /* formulae for base spread resistance over! */ /* ib term */ EqualDeriv(&d_ib, &d_p); d_ib.d1_p = 0.0; d_ib.value = cb; d_ib.d1_p = gbe/here->BJTtBetaF + gben; d_ib.d2_p2 = gbe2/here->BJTtBetaF + gben2; d_ib.d3_p3 = gbe3/here->BJTtBetaF + gben3; d_ib.d1_q = gbc/here->BJTtBetaR + gbcn; d_ib.d2_q2 = gbc2/here->BJTtBetaR + gbcn2; d_ib.d3_q3 = gbc3/here->BJTtBetaR + gbcn3; /* ib term over */ /* * charge storage elements */ tf=here->BJTttransitTimeF; tr=here->BJTttransitTimeR; czbe=here->BJTtBEcap*here->BJTarea * here->BJTm; pe=here->BJTtBEpot; xme=here->BJTtjunctionExpBE; cdis=model->BJTbaseFractionBCcap; ctot=here->BJTtBCcap * here->BJTm; if (model->BJTsubs == VERTICAL) ctot *= here->BJTareab; else ctot *= here->BJTareac; czbc=ctot*cdis; czbx=ctot-czbc; pc=here->BJTtBCpot; xmc=here->BJTtjunctionExpBC; fcpe=here->BJTtDepCap; czcs=model->BJTcapSub * here->BJTm; if (model->BJTsubs == VERTICAL) czcs *= here->BJTareac; else czcs *= here->BJTareab; ps=model->BJTpotentialSubstrate; xms=model->BJTexponentialSubstrate; xtf=model->BJTtransitTimeBiasCoeffF; ovtf=model->BJTtransitTimeVBCFactor; xjtf=here->BJTttransitTimeHighCurrentF*here->BJTarea * here->BJTm; if(tf != 0 && vbe >0) { EqualDeriv(&d_cbe, &d_p); d_cbe.value = cbe; d_cbe.d1_p = gbe; d_cbe.d2_p2 = gbe2; d_cbe.d3_p3 = gbe3; if(xtf != 0){ if(ovtf != 0) { /* dummy = exp ( vbc*ovtf) */ EqualDeriv(&d_dummy, &d_q); d_dummy.value = vbc*ovtf; d_dummy.d1_q = ovtf; ExpDeriv(&d_dummy, &d_dummy); } else { EqualDeriv(&d_dummy,&d_p); d_dummy.value = 1.0; d_dummy.d1_p = 0.0; } if(xjtf != 0) { EqualDeriv(&d_dummy2, &d_cbe); d_dummy2.value += xjtf; DivDeriv(&d_dummy2, &d_cbe, &d_dummy2); MultDeriv (&d_dummy2, &d_dummy2, &d_dummy2); } else { EqualDeriv(&d_dummy2,&d_p); d_dummy2.value = 1.0; d_dummy2.d1_p = 0.0; } MultDeriv(&d_tff, &d_dummy, &d_dummy2); TimesDeriv(&d_tff, &d_tff, tf*xtf); d_tff.value += tf; } else { EqualDeriv(&d_tff,&d_p); d_tff.value = tf; d_tff.d1_p = 0.0; } /* qbe = tff/qb*cbe */ /* dummy = tff/qb; */ /* these are the cbe coeffs */ DivDeriv(&d_dummy, &d_tff, &d_qb); MultDeriv(&d_qbe, &d_dummy, &d_cbe); } else { EqualDeriv(&d_qbe, &d_p); d_qbe.value = 0.0; d_qbe.d1_p = 0.0; } if (vbe < fcpe) { arg=1-vbe/pe; sarg=exp(-xme*log(arg)); lcapbe1 = czbe*sarg; lcapbe2 = 0.5*czbe*xme*sarg/(arg*pe); lcapbe3 = czbe*xme*(xme+1)*sarg/(arg*arg*pe*pe*6); } else { f1=here->BJTtf1; f2=model->BJTf2; f3=model->BJTf3; czbef2=czbe/f2; lcapbe1 = czbef2*(f3+xme*vbe/pe); lcapbe2 = 0.5*xme*czbef2/pe; lcapbe3 = 0.0; } d_qbe.d1_p += lcapbe1; d_qbe.d2_p2 += lcapbe2*2.; d_qbe.d3_p3 += lcapbe3*6.; fcpc=here->BJTtf4; f1=here->BJTtf5; f2=model->BJTf6; f3=model->BJTf7; if (vbc < fcpc) { arg=1-vbc/pc; sarg=exp(-xmc*log(arg)); lcapbc1 = czbc*sarg; lcapbc2 = 0.5*czbc*xmc*sarg/(arg*pc); lcapbc3 = czbc*xmc*(xmc+1)*sarg/(arg*arg*pc*pc*6); } else { czbcf2=czbc/f2; lcapbc1 = czbcf2*(f3+xmc*vbc/pc); lcapbc2 = 0.5*xmc*czbcf2/pc; lcapbc3 = 0; } if(vbx < fcpc) { arg=1-vbx/pc; sarg=exp(-xmc*log(arg)); lcapbx1 = czbx*sarg; lcapbx2 = 0.5*czbx*xmc*sarg/(arg*pc); lcapbx3 = czbx*xmc*(xmc+1)*sarg/(arg*arg*pc*pc*6); } else { czbxf2=czbx/f2; lcapbx1 = czbxf2*(f3+xmc*vbx/pc); lcapbx2 = 0.5*xmc*czbxf2/pc; lcapbx3 = 0; } if(vsc < 0){ arg=1-vsc/ps; sarg=exp(-xms*log(arg)); lcapsc1 = czcs*sarg; lcapsc2 = 0.5*czcs*xms*sarg/(arg*ps); lcapsc3 = czcs*xms*(xms+1)*sarg/(arg*arg*ps*ps*6); } else { lcapsc1 = czcs*(1+xms*vsc/ps); lcapsc2 = czcs*0.5*xms/ps; lcapsc3 = 0; } /* * store small-signal parameters */ here->ic_x = d_ic.d1_p; here->ic_y = d_ic.d1_q; here->ic_xd = d_ic.d1_r; here->ic_x2 = 0.5*model->BJTtype*d_ic.d2_p2; here->ic_y2 = 0.5*model->BJTtype*d_ic.d2_q2; here->ic_w2 = 0.5*model->BJTtype*d_ic.d2_r2; here->ic_xy = model->BJTtype*d_ic.d2_pq; here->ic_yw = model->BJTtype*d_ic.d2_qr; here->ic_xw = model->BJTtype*d_ic.d2_pr; here->ic_x3 = d_ic.d3_p3/6.; here->ic_y3 = d_ic.d3_q3/6.; here->ic_w3 = d_ic.d3_r3/6.; here->ic_x2w = 0.5*d_ic.d3_p2r; here->ic_x2y = 0.5*d_ic.d3_p2q; here->ic_y2w = 0.5*d_ic.d3_q2r; here->ic_xy2 = 0.5*d_ic.d3_pq2; here->ic_xw2 = 0.5*d_ic.d3_pr2; here->ic_yw2 = 0.5*d_ic.d3_qr2; here->ic_xyw = d_ic.d3_pqr; here->ib_x = d_ib.d1_p; here->ib_y = d_ib.d1_q; here->ib_x2 = 0.5*model->BJTtype*d_ib.d2_p2; here->ib_y2 = 0.5*model->BJTtype*d_ib.d2_q2; here->ib_xy = model->BJTtype*d_ib.d2_pq; here->ib_x3 = d_ib.d3_p3/6.; here->ib_y3 = d_ib.d3_q3/6.; here->ib_x2y = 0.5*d_ib.d3_p2q; here->ib_xy2 = 0.5*d_ib.d3_pq2; here->ibb_x = d_ibb.d1_p; here->ibb_y = d_ibb.d1_q; here->ibb_z = d_ibb.d1_r; here->ibb_x2 = 0.5*model->BJTtype*d_ibb.d2_p2; here->ibb_y2 = 0.5*model->BJTtype*d_ibb.d2_q2; here->ibb_z2 = 0.5*model->BJTtype*d_ibb.d2_r2; here->ibb_xy = model->BJTtype*d_ibb.d2_pq; here->ibb_yz = model->BJTtype*d_ibb.d2_qr; here->ibb_xz = model->BJTtype*d_ibb.d2_pr; here->ibb_x3 = d_ibb.d3_p3/6.; here->ibb_y3 = d_ibb.d3_q3/6.; here->ibb_z3 = d_ibb.d3_r3/6.; here->ibb_x2z = 0.5*d_ibb.d3_p2r; here->ibb_x2y = 0.5*d_ibb.d3_p2q; here->ibb_y2z = 0.5*d_ibb.d3_q2r; here->ibb_xy2 = 0.5*d_ibb.d3_pq2; here->ibb_xz2 = 0.5*d_ibb.d3_pr2; here->ibb_yz2 = 0.5*d_ibb.d3_qr2; here->ibb_xyz = d_ibb.d3_pqr; here->qbe_x = d_qbe.d1_p; here->qbe_y = d_qbe.d1_q; here->qbe_x2 = 0.5*model->BJTtype*d_qbe.d2_p2; here->qbe_y2 = 0.5*model->BJTtype*d_qbe.d2_q2; here->qbe_xy = model->BJTtype*d_qbe.d2_pq; here->qbe_x3 = d_qbe.d3_p3/6.; here->qbe_y3 = d_qbe.d3_q3/6.; here->qbe_x2y = 0.5*d_qbe.d3_p2q; here->qbe_xy2 = 0.5*d_qbe.d3_pq2; here->capbc1 = lcapbc1; here->capbc2 = lcapbc2; here->capbc3 = lcapbc3; here->capbx1 = lcapbx1; here->capbx2 = lcapbx2; here->capbx3 = lcapbx3; here->capsc1 = lcapsc1; here->capsc2 = lcapsc2; here->capsc3 = lcapsc3; } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtitf.h0000644000265600020320000000026512264261473020451 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_BJT #define DEV_BJT extern SPICEdev *get_bjt_info(void); #endif ngspice-26/src/spicelib/devices/bjt/bjtconv.c0000644000265600020320000000464512264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * This routine performs the device convergence test for * BJTs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTconvTest(GENmodel *inModel, CKTcircuit *ckt) { BJTinstance *here; BJTmodel *model = (BJTmodel *) inModel; double tol; double cc; double cchat; double cb; double cbhat; double vbe; double vbc; double delvbe; double delvbc; for( ; model != NULL; model = model->BJTnextModel) { for(here=model->BJTinstances;here!=NULL;here = here->BJTnextInstance){ vbe=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbasePrimeNode)- *(ckt->CKTrhsOld+here->BJTemitPrimeNode)); vbc=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbasePrimeNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); delvbe=vbe- *(ckt->CKTstate0 + here->BJTvbe); delvbc=vbc- *(ckt->CKTstate0 + here->BJTvbc); cchat= *(ckt->CKTstate0 + here->BJTcc)+(*(ckt->CKTstate0 + here->BJTgm)+ *(ckt->CKTstate0 + here->BJTgo))*delvbe- (*(ckt->CKTstate0 + here->BJTgo)+*(ckt->CKTstate0 + here->BJTgmu))*delvbc; cbhat= *(ckt->CKTstate0 + here->BJTcb)+ *(ckt->CKTstate0 + here->BJTgpi)*delvbe+ *(ckt->CKTstate0 + here->BJTgmu)* delvbc; cc = *(ckt->CKTstate0 + here->BJTcc); cb = *(ckt->CKTstate0 + here->BJTcb); /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cchat),fabs(cc))+ckt->CKTabstol; if (fabs(cchat-cc) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } else { tol=ckt->CKTreltol*MAX(fabs(cbhat),fabs(cb))+ ckt->CKTabstol; if (fabs(cbhat-cb) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue - we've failed... */ } } } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtsupd.c0000644000265600020320000001344312264261473020637 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* update the charge sensitivities and their derivatives */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int BJTsUpdate(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; int iparmno; double sb; double sbprm; double scprm; double seprm; double ss; double sxpbe; double sxpbc; double sxpsub; double sxpbx; double dummy1; double dummy2; SENstruct *info; info = ckt->CKTsenInfo; if(ckt->CKTtime == 0) return(OK); #ifdef SENSDEBUG printf("BJTsenUpdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ /* loop through all the BJT models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { sxpbe = 0; sxpbc = 0; sxpsub = 0; sxpbx = 0; #ifdef SENSDEBUG printf("senupdate Instance name: %s\n",here->BJTname); printf("CKTag[0] = %.2e,CKTag[1] = %.2e\n", ckt->CKTag[0],ckt->CKTag[1]); printf("capbe = %.7e\n",here->BJTcapbe); printf("capbc = %.7e\n",here->BJTcapbc); printf("capsub = %.7e\n",here->BJTcapsub); printf("capbx = %.7e\n",here->BJTcapbx); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sb = *(info->SEN_Sap[here->BJTbaseNode] + iparmno); sbprm = *(info->SEN_Sap[here->BJTbasePrimeNode] + iparmno); scprm = *(info->SEN_Sap[here->BJTcolPrimeNode] + iparmno); seprm = *(info->SEN_Sap[here->BJTemitPrimeNode] + iparmno); ss = *(info->SEN_Sap[here->BJTsubstNode] + iparmno); #ifdef SENSDEBUG printf("iparmno = %d \n",iparmno); printf("sb = %.7e,sbprm = %.7e,scprm=%.7e\n",sb,sbprm,scprm); printf("seprm = %.7e,ss = %.7e\n",seprm,ss); #endif /* SENSDEBUG */ sxpbe = model ->BJTtype * (sbprm - seprm)*here->BJTcapbe; sxpbc = model ->BJTtype * (sbprm - scprm)*here->BJTcapbc ; sxpsub = model ->BJTtype * (ss - scprm)*here->BJTcapsub ; sxpbx = model ->BJTtype * (sb - scprm)*here->BJTcapbx ; if(iparmno == here->BJTsenParmNo){ sxpbe += *(here->BJTdphibedp); sxpbc += *(here->BJTdphibcdp); sxpsub += *(here->BJTdphisubdp); sxpbx += *(here->BJTdphibxdp); } *(ckt->CKTstate0 + here->BJTsensxpbe + 8 * (iparmno - 1)) = sxpbe; NIintegrate(ckt,&dummy1,&dummy2,here->BJTcapbe, here->BJTsensxpbe + 8*(iparmno -1)); *(ckt->CKTstate0 + here->BJTsensxpbc + 8 * (iparmno - 1)) = sxpbc; NIintegrate(ckt,&dummy1,&dummy2,here->BJTcapbc, here->BJTsensxpbc + 8*(iparmno -1)); *(ckt->CKTstate0 + here->BJTsensxpsub + 8 * (iparmno - 1)) = sxpsub; NIintegrate(ckt,&dummy1,&dummy2,here->BJTcapsub, here->BJTsensxpsub + 8*(iparmno -1)); *(ckt->CKTstate0 + here->BJTsensxpbx + 8 * (iparmno - 1)) = sxpbx; NIintegrate(ckt,&dummy1,&dummy2,here->BJTcapbx, here->BJTsensxpbx + 8*(iparmno -1)); #ifdef SENSDEBUG printf("after loading\n"); printf("sxpbe = %.7e,sdotxpbe = %.7e\n", sxpbe,*(ckt->CKTstate0 + here->BJTsensxpbe + 8 * (iparmno - 1) + 1)); printf("sxpbc = %.7e,sdotxpbc = %.7e\n", sxpbc,*(ckt->CKTstate0 + here->BJTsensxpbc + 8 * (iparmno - 1) + 1)); printf("sxpsub = %.7e,sdotxpsc = %.7e\n", sxpsub,*(ckt->CKTstate0 + here->BJTsensxpsub + 8 * (iparmno - 1) + 1)); printf("sxpbx = %.7e,sdotxpbx = %.7e\n", sxpbx,*(ckt->CKTstate0 + here->BJTsensxpbx + 8 * (iparmno - 1) + 1)); printf("\n"); #endif /* SENSDEBUG */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BJTsensxpbe + 8 * (iparmno - 1)) = sxpbe; *(ckt->CKTstate1 + here->BJTsensxpbc + 8 * (iparmno - 1)) = sxpbc; *(ckt->CKTstate1 + here->BJTsensxpsub + 8 * (iparmno - 1)) = sxpsub; *(ckt->CKTstate1 + here->BJTsensxpbx + 8 * (iparmno - 1)) = sxpbx; *(ckt->CKTstate1 + here->BJTsensxpbe + 8 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->BJTsensxpbc + 8 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->BJTsensxpsub + 8 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->BJTsensxpbx + 8 * (iparmno - 1) + 1) = 0; } } } } #ifdef SENSDEBUG printf("BJTsenUpdate end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtsoachk.c0000644000265600020320000000424212264261473021131 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BJTsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { BJTmodel *model = (BJTmodel *) inModel; BJTinstance *here; double vbe, vbc, vce; /* actual bjt voltages */ int maxwarns; static int warns_vbe = 0, warns_vbc = 0, warns_vce = 0; if (!ckt) { warns_vbe = 0; warns_vbc = 0; warns_vce = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BJTnextModel) { for (here = model->BJTinstances; here; here=here->BJTnextInstance) { vbe = fabs(ckt->CKTrhsOld [here->BJTbasePrimeNode] - ckt->CKTrhsOld [here->BJTemitPrimeNode]); vbc = fabs(ckt->CKTrhsOld [here->BJTbasePrimeNode] - ckt->CKTrhsOld [here->BJTcolPrimeNode]); vce = fabs(ckt->CKTrhsOld [here->BJTcolPrimeNode] - ckt->CKTrhsOld [here->BJTemitPrimeNode]); if (vbe > model->BJTvbeMax) if (warns_vbe < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbe|=%g has exceeded Vbe_max=%g\n", vbe, model->BJTvbeMax); warns_vbe++; } if (vbc > model->BJTvbcMax) if (warns_vbc < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbc|=%g has exceeded Vbc_max=%g\n", vbc, model->BJTvbcMax); warns_vbc++; } if (vce > model->BJTvceMax) if (warns_vce < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vce|=%g has exceeded Vce_max=%g\n", vce, model->BJTvceMax); warns_vce++; } } } return OK; } ngspice-26/src/spicelib/devices/bjt/bjtsacl.c0000644000265600020320000006621612264261473020614 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int BJTsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; double SaveState[25]; int error; int flag; double vbeOp; double vbcOp; double A0; double DELA = 0.0; double Apert; double DELAinv; double vte = 0.0; double gcpr; double gepr; double gpi; double gmu; double go; double xgm; double td; double arg; double gm; double gx; double xcpi; double xcmu; double xcbx; double xccs; double xcmcb; double cx,icx; double cbx,icbx; double ccs,iccs; double cbc,icbc; double cbe,icbe; double cce,icce; double cb,icb; double cbprm,icbprm; double cc,icc; double ccprm,iccprm; double ce,ice; double ceprm,iceprm; double cs,ics; double vcpr,ivcpr; double vepr,ivepr; double vx,ivx; double vbx,ivbx; double vcs,ivcs; double vbc,ivbc; double vbe,ivbe; double vce,ivce; double cb0,icb0; double cbprm0,icbprm0; double cc0,icc0; double ccprm0,iccprm0; double ce0,ice0; double ceprm0,iceprm0; double cs0,ics0; double DvDp = 0.0; int iparmno,i; SENstruct *info; #ifdef SENSDEBUG printf("BJTsenacload \n"); printf("BJTsenacload \n"); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; /* loop through all the models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 20; i++) { *(SaveState + i) = *(ckt->CKTstate0 + here->BJTstate + i); } vcpr = *(ckt->CKTrhsOld + here->BJTcolNode) - *(ckt->CKTrhsOld + here->BJTcolPrimeNode) ; ivcpr = *(ckt->CKTirhsOld + here->BJTcolNode) - *(ckt->CKTirhsOld + here->BJTcolPrimeNode) ; vepr = *(ckt->CKTrhsOld + here->BJTemitNode) - *(ckt->CKTrhsOld + here->BJTemitPrimeNode) ; ivepr = *(ckt->CKTirhsOld + here->BJTemitNode) - *(ckt->CKTirhsOld + here->BJTemitPrimeNode) ; vx = *(ckt->CKTrhsOld + here->BJTbaseNode) - *(ckt->CKTrhsOld + here->BJTbasePrimeNode) ;/* vb_bprm */ ivx = *(ckt->CKTirhsOld + here->BJTbaseNode) - *(ckt->CKTirhsOld + here->BJTbasePrimeNode) ;/* ivb_bprm */ vcs = *(ckt->CKTrhsOld + here->BJTcolPrimeNode) - *(ckt->CKTrhsOld + here->BJTsubstNode) ; ivcs = *(ckt->CKTirhsOld + here->BJTcolPrimeNode) - *(ckt->CKTirhsOld + here->BJTsubstNode) ; vbc = *(ckt->CKTrhsOld + here->BJTbasePrimeNode) - *(ckt->CKTrhsOld + here->BJTcolPrimeNode) ;/* vbprm_cprm */ ivbc = *(ckt->CKTirhsOld + here->BJTbasePrimeNode) - *(ckt->CKTirhsOld + here->BJTcolPrimeNode) ;/* ivbprm_cprm */ vbe = *(ckt->CKTrhsOld + here->BJTbasePrimeNode) - *(ckt->CKTrhsOld + here->BJTemitPrimeNode) ;/* vbprm_eprm */ ivbe = *(ckt->CKTirhsOld + here->BJTbasePrimeNode) - *(ckt->CKTirhsOld + here->BJTemitPrimeNode) ;/* ivbprm_eprm */ vce = vbe - vbc ; ivce = ivbe - ivbc ; vbx = vx + vbc ; ivbx = ivx + ivbc ; vbeOp =model->BJTtype * ( *(ckt->CKTrhsOp + here->BJTbasePrimeNode) - *(ckt->CKTrhsOp + here->BJTemitPrimeNode)); vbcOp =model->BJTtype * ( *(ckt->CKTrhsOp + here->BJTbasePrimeNode) - *(ckt->CKTrhsOp + here->BJTcolPrimeNode)); #ifdef SENSDEBUG printf("\n without perturbation\n"); #endif /* SENSDEBUG */ /* without perturbation */ A0 = here->BJTarea; here->BJTsenPertFlag = ON; *(ckt->CKTstate0 + here->BJTvbe) = vbeOp; *(ckt->CKTstate0 + here->BJTvbc) = vbcOp; /* info->SENacpertflag == 1 only for first frequency */ if(info->SENacpertflag == 1){ /* store the unperturbed values of small signal parameters */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenGpi)= *(ckt->CKTstate0 + here->BJTgpi); *(here->BJTsenGmu)= *(ckt->CKTstate0 + here->BJTgmu); *(here->BJTsenGm)= *(ckt->CKTstate0 + here->BJTgm); *(here->BJTsenGo)= *(ckt->CKTstate0 + here->BJTgo); *(here->BJTsenGx)= *(ckt->CKTstate0 + here->BJTgx); *(here->BJTsenCpi)= *(ckt->CKTstate0 + here->BJTcqbe); *(here->BJTsenCmu)= *(ckt->CKTstate0 + here->BJTcqbc); *(here->BJTsenCbx)= *(ckt->CKTstate0 + here->BJTcqbx); *(here->BJTsenCsub)= *(ckt->CKTstate0 + here->BJTcqsub); *(here->BJTsenCmcb)= *(ckt->CKTstate0 + here->BJTcexbc); } gcpr = here->BJTtcollectorConduct * A0; gepr = here->BJTtemitterConduct * A0; gpi= *(here->BJTsenGpi); gmu= *(here->BJTsenGmu); gm= *(here->BJTsenGm); go= *(here->BJTsenGo); gx= *(here->BJTsenGx); xgm=0; td=model->BJTexcessPhase; if(td != 0) { arg = td*ckt->CKTomega; gm = gm+go; xgm = -gm * sin(arg); gm = gm * cos(arg)-go; } xcpi= *(here->BJTsenCpi) * ckt->CKTomega; xcmu= *(here->BJTsenCmu) * ckt->CKTomega; xcbx= *(here->BJTsenCbx) * ckt->CKTomega; xccs= *(here->BJTsenCsub) * ckt->CKTomega; xcmcb= *(here->BJTsenCmcb) * ckt->CKTomega; cx=gx * vx ; icx=gx * ivx; cbx=( -xcbx * ivbx) ; icbx= xcbx * vbx ; ccs=( -xccs * ivcs) ; iccs= xccs * vcs ; cbc=(gmu * vbc -xcmu * ivbc) ; icbc=xcmu * vbc + gmu * ivbc ; cbe=gpi * vbe -xcpi * ivbe - xcmcb * ivbc ; icbe=xcpi * vbe + gpi * ivbe + xcmcb * vbc; cce= go * vce + gm * vbe - xgm * ivbe; icce=go * ivce + gm * ivbe + xgm * vbe ; cc0=gcpr * vcpr ; icc0=gcpr * ivcpr ; ce0=gepr * vepr; ice0=gepr * ivepr ; cb0 = cx + cbx; icb0 = icx + icbx; if(here->BJTbaseNode != here->BJTbasePrimeNode){ cbprm0 = (- cx + cbe + cbc); icbprm0 = (- icx + icbe + icbc); } else{ cbprm0 = ( cbx + cbe + cbc); icbprm0 = (icbx + icbe + icbc); } ccprm0 = (- cbx - cc0 + ccs + cce - cbc); iccprm0 = (- icbx - icc0 + iccs + icce - icbc); ceprm0 = (- cbe - cce - ce0); iceprm0 = (- icbe - icce - ice0); cs0 = (- ccs) ; ics0 = (- iccs) ; #ifdef SENSDEBUG printf("gepr0 = %.7e , gcpr0 = %.7e , gmu0 = %.7e, gpi0 = %.7e\n", gepr,gcpr,gmu,gpi); printf("gm0 = %.7e , go0 = %.7e , gx0 = %.7e, xcpi0 = %.7e\n", gm,go,gx,xcpi); printf("xcmu0 = %.7e , xcbx0 = %.7e , xccs0 = %.7e, xcmcb0 = %.7e\n" ,xcmu,xcbx,xccs,xcmcb); printf("vepr = %.7e + j%.7e , vcpr = %.7e + j%.7e\n", vepr,ivepr,vcpr,ivcpr); printf("vbx = %.7e + j%.7e , vx = %.7e + j%.7e\n", vbx,ivbx,vx,ivx); printf("vbc = %.7e + j%.7e , vbe = %.7e + j%.7e\n", vbc,ivbc,vbe,ivbe); printf("vce = %.7e + j%.7e , vcs = %.7e + j%.7e\n", vce,ivce,vcs,ivcs); printf("cce0 = %.7e + j%.7e , cbe0 = %.7e + j%.7e\n", cce,icce,cbe,icbe); printf("cbc0 = %.7e + j%.7e\n", cbc,icbc); printf("cc0 = %.7e + j%.7e , ce0 = %.7e + j%.7e\n", cc0,icc0,ce0,ice0); printf("cb0 = %.7e + j%.7e , cs0 = %.7e + j%.7e\n", cb0,icb0,cs0,ics0); printf("cbprm0 = %.7e + j%.7e , ceprm0 = %.7e + j%.7e\n", cbprm0,icbprm0,ceprm0,iceprm0); printf("ccprm0 = %.7e + j%.7e \n", ccprm0,iccprm0); printf("\nPerturbation of Area\n"); #endif /* SENSDEBUG */ /* Perturbation of Area */ if(here->BJTsenParmNo == 0){ flag = 0; goto next1; } DELA = info->SENpertfac * A0; Apert = A0 + DELA; DELAinv = 1.0/DELA; here->BJTarea = Apert; *(ckt->CKTstate0 + here->BJTvbe) = vbeOp; *(ckt->CKTstate0 + here->BJTvbc) = vbcOp; if(info->SENacpertflag == 1){ /* store the small signal parameters * corresponding to perturbed area */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenGpi + 1)= *(ckt->CKTstate0 + here->BJTgpi); *(here->BJTsenGmu + 1)= *(ckt->CKTstate0 + here->BJTgmu); *(here->BJTsenGm + 1)= *(ckt->CKTstate0 + here->BJTgm); *(here->BJTsenGo + 1)= *(ckt->CKTstate0 + here->BJTgo); *(here->BJTsenGx + 1)= *(ckt->CKTstate0 + here->BJTgx); *(here->BJTsenCpi + 1)= *(ckt->CKTstate0 + here->BJTcqbe); *(here->BJTsenCmu + 1)= *(ckt->CKTstate0 + here->BJTcqbc); *(here->BJTsenCbx + 1)= *(ckt->CKTstate0 + here->BJTcqbx); *(here->BJTsenCsub + 1)= *(ckt->CKTstate0 + here->BJTcqsub); *(here->BJTsenCmcb + 1)= *(ckt->CKTstate0 + here->BJTcexbc); } flag = 0; goto load; pertvbx: /* Perturbation of vbx */ #ifdef SENSDEBUG printf("\nPerturbation of vbx\n"); #endif /* SENSDEBUG */ here->BJTarea = A0; A0 = model->BJTtype * (*(ckt->CKTrhsOp + here->BJTbaseNode) - *(ckt->CKTrhsOp + here->BJTcolPrimeNode)); DELA = info->SENpertfac * A0 + 1e-8; Apert = A0 + DELA; DELAinv = model->BJTtype * 1.0/DELA; *(ckt->CKTrhsOp + here->BJTbaseNode) += DELA; *(ckt->CKTstate0 + here->BJTvbe) = vbeOp; *(ckt->CKTstate0 + here->BJTvbc) = vbcOp; if(info->SENacpertflag == 1){ /* store the small signal parameters * corresponding to perturbed vbx */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenGpi + 2)= *(ckt->CKTstate0 + here->BJTgpi); *(here->BJTsenGmu + 2)= *(ckt->CKTstate0 + here->BJTgmu); *(here->BJTsenGm + 2)= *(ckt->CKTstate0 + here->BJTgm); *(here->BJTsenGo + 2)= *(ckt->CKTstate0 + here->BJTgo); *(here->BJTsenGx + 2)= *(ckt->CKTstate0 + here->BJTgx); *(here->BJTsenCpi + 2)= *(ckt->CKTstate0 + here->BJTcqbe); *(here->BJTsenCmu + 2)= *(ckt->CKTstate0 + here->BJTcqbc); *(here->BJTsenCbx + 2)= *(ckt->CKTstate0 + here->BJTcqbx); *(here->BJTsenCsub + 2)= *(ckt->CKTstate0 + here->BJTcqsub); *(here->BJTsenCmcb + 2)= *(ckt->CKTstate0 + here->BJTcexbc); } flag = 1; goto load; pertvbe: /* Perturbation of vbe */ #ifdef SENSDEBUG printf("\nPerturbation of vbe\n"); #endif /* SENSDEBUG */ if (*(here->BJTsenCbx) != 0){ *(ckt->CKTrhsOp + here ->BJTbaseNode) -= DELA; } vte=model->BJTleakBEemissionCoeff*CONSTvt0; A0 = vbeOp; DELA = info->SENpertfac * vte ; Apert = A0 + DELA; DELAinv = 1.0/DELA; *(ckt->CKTstate0 + here->BJTvbe) = Apert; *(ckt->CKTstate0 + here->BJTvbc) = vbcOp; if(info->SENacpertflag == 1){ /* store the small signal parameters * corresponding to perturbed vbe */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenGpi + 3)= *(ckt->CKTstate0 + here->BJTgpi); *(here->BJTsenGmu + 3)= *(ckt->CKTstate0 + here->BJTgmu); *(here->BJTsenGm + 3)= *(ckt->CKTstate0 + here->BJTgm); *(here->BJTsenGo + 3)= *(ckt->CKTstate0 + here->BJTgo); *(here->BJTsenGx + 3)= *(ckt->CKTstate0 + here->BJTgx); *(here->BJTsenCpi + 3)= *(ckt->CKTstate0 + here->BJTcqbe); *(here->BJTsenCmu + 3)= *(ckt->CKTstate0 + here->BJTcqbc); *(here->BJTsenCbx + 3)= *(ckt->CKTstate0 + here->BJTcqbx); *(here->BJTsenCsub + 3)= *(ckt->CKTstate0 + here->BJTcqsub); *(here->BJTsenCmcb + 3)= *(ckt->CKTstate0 + here->BJTcexbc); } flag = 2; goto load; pertvbc: /* Perturbation of vbc */ #ifdef SENSDEBUG printf("\nPerturbation of vbc\n"); #endif /* SENSDEBUG */ *(ckt->CKTstate0 + here->BJTvbe) = A0; A0 = vbcOp; DELA = info->SENpertfac * vte ; Apert = A0 + DELA; DELAinv = 1.0/DELA; *(ckt->CKTstate0 + here->BJTvbc) = Apert; *(ckt->CKTstate0 + here->BJTvbe) = vbeOp; if(info->SENacpertflag == 1){ /* store the small signal parameters * corresponding to perturbed vbc */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenGpi + 4)= *(ckt->CKTstate0 + here->BJTgpi); *(here->BJTsenGmu + 4)= *(ckt->CKTstate0 + here->BJTgmu); *(here->BJTsenGm + 4)= *(ckt->CKTstate0 + here->BJTgm); *(here->BJTsenGo + 4)= *(ckt->CKTstate0 + here->BJTgo); *(here->BJTsenGx + 4)= *(ckt->CKTstate0 + here->BJTgx); *(here->BJTsenCpi + 4)= *(ckt->CKTstate0 + here->BJTcqbe); *(here->BJTsenCmu + 4)= *(ckt->CKTstate0 + here->BJTcqbc); *(here->BJTsenCbx + 4)= *(ckt->CKTstate0 + here->BJTcqbx); *(here->BJTsenCsub + 4)= *(ckt->CKTstate0 + here->BJTcqsub); *(here->BJTsenCmcb + 4)= *(ckt->CKTstate0 + here->BJTcexbc); } flag = 3; goto load; pertvcs: /* Perturbation of vcs */ #ifdef SENSDEBUG printf("\nPerturbation of vcs\n"); #endif /* SENSDEBUG */ *(ckt->CKTstate0 + here->BJTvbc) = A0; A0 = model->BJTtype * (*(ckt->CKTrhsOp + here->BJTsubstNode) - *(ckt->CKTrhsOp + here->BJTcolPrimeNode)); DELA = info->SENpertfac * A0 + 1e-8; Apert = A0 + DELA; DELAinv = model->BJTtype * 1.0/DELA; *(ckt->CKTrhsOp + here->BJTsubstNode) += DELA; *(ckt->CKTstate0 + here->BJTvbe) = vbeOp; *(ckt->CKTstate0 + here->BJTvbc) = vbcOp; if(info->SENacpertflag == 1){ /* store the small signal parameters * corresponding to perturbed vcs */ if ((error = BJTload((GENmodel*)model,ckt)) != 0) return(error); *(here->BJTsenCsub + 5)= *(ckt->CKTstate0 + here->BJTcqsub); } flag = 4; *(ckt->CKTrhsOp + here->BJTsubstNode) -= DELA; xccs= *(here->BJTsenCsub + 5) * ckt->CKTomega; ccs=( -xccs * ivcs) ; iccs= xccs * vcs ; cs = -ccs; ics = -iccs; ccprm = ccprm0 + cs0 - cs; iccprm = iccprm0 + ics0 - ics; cbprm = cbprm0; icbprm = icbprm0; ceprm = ceprm0; iceprm = iceprm0; cc = cc0; icc = icc0; ce = ce0; ice = ice0; cb = cb0; icb = icb0; goto next2; load: gcpr=here->BJTtcollectorConduct * here->BJTarea; gepr=here->BJTtemitterConduct * here->BJTarea; gpi= *(here->BJTsenGpi + flag+1); gmu= *(here->BJTsenGmu + flag+1); gm= *(here->BJTsenGm + flag+1); go= *(here->BJTsenGo + flag+1); gx= *(here->BJTsenGx + flag+1); xgm=0; td=model->BJTexcessPhase; if(td != 0) { arg = td*ckt->CKTomega; gm = gm+go; xgm = -gm * sin(arg); gm = gm * cos(arg)-go; } xcpi= *(here->BJTsenCpi + flag+1) * ckt->CKTomega; xcmu= *(here->BJTsenCmu + flag+1) * ckt->CKTomega; xcbx= *(here->BJTsenCbx + flag+1) * ckt->CKTomega; xccs= *(here->BJTsenCsub + flag+1) * ckt->CKTomega; xcmcb= *(here->BJTsenCmcb + flag+1) * ckt->CKTomega; cc=gcpr * vcpr ; icc=gcpr * ivcpr ; ce=gepr * vepr; ice=gepr * ivepr ; cx=gx * vx ; icx=gx * ivx; cbx=( -xcbx * ivbx) ; icbx= xcbx * vbx ; ccs=( -xccs * ivcs) ; iccs= xccs * vcs ; cbc=(gmu * vbc -xcmu * ivbc) ; icbc=xcmu * vbc + gmu * ivbc ; cbe=gpi * vbe -xcpi * ivbe - xcmcb * ivbc ; icbe=xcpi * vbe + gpi * ivbe + xcmcb * vbc; cce= go * vce + gm * vbe - xgm * ivbe; icce=go * ivce + gm * ivbe + xgm * vbe ; cb= cx + cbx; icb= icx + icbx; if(here->BJTbaseNode != here->BJTbasePrimeNode){ cbprm=(- cx + cbe + cbc); icbprm=(- icx + icbe + icbc); } else{ cbprm=( cbx + cbe + cbc); icbprm=(icbx + icbe + icbc); } ccprm=(- cbx - cc + ccs + cce - cbc); iccprm=(- icbx - icc + iccs + icce - icbc); ceprm=(- cbe - cce - ce); iceprm=(- icbe - icce - ice); cs= (- ccs) ; ics= (- iccs) ; #ifdef SENSDEBUG printf("A0 = %.7e , Apert = %.7e , DELA = %.7e\n" ,A0,Apert,DELA); printf("gepr = %.7e , gcpr = %.7e , gmu = %.7e, gpi = %.7e\n" ,gepr,gcpr,gmu,gpi); printf("gm = %.7e , go = %.7e , gx = %.7e, xcpi = %.7e\n" ,gm,go,gx,xcpi); printf("xcmu = %.7e , xcbx = %.7e , xccs = %.7e, xcmcb = %.7e\n" ,xcmu,xcbx,xccs,xcmcb); printf("cx = %.7e + j%.7e , cbx = %.7e + j%.7e\n" ,cx,icx,cbx,icbx); printf("ccs %.7e + j%.7e , cbc = %.7e + j%.7e" ,ccs,iccs,cbc,icbc); printf("cbe %.7e + j%.7e , cce = %.7e + j%.7e\n" ,cbe,icbe,cce,icce); printf("cc = %.7e + j%.7e , ce = %.7e + j%.7e,", cc,icc,ce,ice); printf("ccprm = %.7e + j%.7e , ceprm = %.7e + j%.7e", ccprm,iccprm,ceprm,iceprm); printf("cb = %.7e + j%.7e , cbprm = %.7e + j%.7e , ", cb,icb,cbprm,icbprm); printf("cs = %.7e + j%.7e\n", cs,ics); #endif /* SENSDEBUG */ /* load the RHS matrix */ next2: for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if( (!flag) && (iparmno != here->BJTsenParmNo) ) continue; switch(flag){ case 0: /* area : so no DC sensitivity term involved */ DvDp = 1.0; break; /* calculate the DC sensitivities of operating points */ case 1: DvDp = model->BJTtype * (info->SEN_Sap[here->BJTbaseNode][iparmno] - info->SEN_Sap[here->BJTcolPrimeNode][iparmno]); break; case 2: DvDp = model->BJTtype * (info->SEN_Sap[here->BJTbasePrimeNode][iparmno] - info->SEN_Sap[here->BJTemitPrimeNode][iparmno]); break; case 3: DvDp = model->BJTtype * (info->SEN_Sap[here->BJTbasePrimeNode][iparmno] - info->SEN_Sap[here->BJTcolPrimeNode][iparmno]); break; case 4: DvDp = model->BJTtype * (info->SEN_Sap[here->BJTsubstNode][iparmno] - info->SEN_Sap[here->BJTcolPrimeNode][iparmno]); break; } #ifdef SENSDEBUG printf("before loading\n"); printf("BJTtype = %d\n",model->BJTtype); printf("DvDp = %.7e , flag = %d , iparmno = %d,senparmno = %d\n" ,DvDp,flag,iparmno,here->BJTsenParmNo); printf("senb = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTbaseNode] + iparmno), *(info->SEN_iRHS[here->BJTbaseNode] + iparmno)); printf("senbrm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTbasePrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTbasePrimeNode] + iparmno)); printf("senc = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTcolNode] + iparmno), *(info->SEN_iRHS[here->BJTcolNode] + iparmno)); printf("sencprm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTcolPrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTcolPrimeNode] + iparmno)); printf("sene = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTemitNode] + iparmno), *(info->SEN_iRHS[here->BJTemitNode] + iparmno)); printf("seneprm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTemitPrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTemitPrimeNode] + iparmno)); printf("sens = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTsubstNode] + iparmno), *(info->SEN_iRHS[here->BJTsubstNode] + iparmno)); #endif /* SENSDEBUG */ if(here->BJTbaseNode != here->BJTbasePrimeNode){ *(info->SEN_RHS[here->BJTbaseNode] + iparmno) -= ( cb - cb0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTbaseNode] + iparmno) -= ( icb - icb0) * DELAinv * DvDp; } *(info->SEN_RHS[here->BJTbasePrimeNode] + iparmno) -= ( cbprm - cbprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTbasePrimeNode] + iparmno) -= ( icbprm - icbprm0) * DELAinv * DvDp; if(here->BJTcolNode != here->BJTcolPrimeNode){ *(info->SEN_RHS[here->BJTcolNode] + iparmno) -= ( cc - cc0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTcolNode] + iparmno) -= ( icc - icc0) * DELAinv * DvDp; } *(info->SEN_RHS[here->BJTcolPrimeNode] + iparmno) -= ( ccprm - ccprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTcolPrimeNode] + iparmno) -= ( iccprm - iccprm0) * DELAinv * DvDp; if(here->BJTemitNode != here->BJTemitPrimeNode){ *(info->SEN_RHS[here->BJTemitNode] + iparmno) -= ( ce - ce0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTemitNode] + iparmno) -= ( ice - ice0) * DELAinv * DvDp; } *(info->SEN_RHS[here->BJTemitPrimeNode] + iparmno) -= ( ceprm - ceprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTemitPrimeNode] + iparmno) -= ( iceprm - iceprm0) * DELAinv * DvDp; *(info->SEN_RHS[here->BJTsubstNode] + iparmno) -= ( cs - cs0) * DELAinv * DvDp; *(info->SEN_iRHS[here->BJTsubstNode] + iparmno) -= ( ics - ics0) * DELAinv * DvDp; #ifdef SENSDEBUG printf("after loading\n"); printf("senb = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTbaseNode] + iparmno), *(info->SEN_iRHS[here->BJTbaseNode] + iparmno)); printf("senbrm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTbasePrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTbasePrimeNode] + iparmno)); printf("senc = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTcolNode] + iparmno), *(info->SEN_iRHS[here->BJTcolNode] + iparmno)); printf("sencprm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTcolPrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTcolPrimeNode] + iparmno)); printf("sene = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTemitNode] + iparmno), *(info->SEN_iRHS[here->BJTemitNode] + iparmno)); printf("seneprm = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTemitPrimeNode] + iparmno), *(info->SEN_iRHS[here->BJTemitPrimeNode] + iparmno)); printf("sens = %.7e + j%.7e\n " ,*(info->SEN_RHS[here->BJTsubstNode] + iparmno), *(info->SEN_iRHS[here->BJTsubstNode] + iparmno)); #endif /* SENSDEBUG */ } next1: switch(flag){ case 0: if (*(here->BJTsenCbx) == 0){ here->BJTarea = A0; goto pertvbe ; } else{ goto pertvbx; } case 1: goto pertvbe ; case 2: goto pertvbc ; case 3: goto pertvcs ; case 4: break; } /* put the unperturbed values back into the state vector */ for(i=0; i <= 20; i++) { *(ckt->CKTstate0 + here->BJTstate + i) = *(SaveState + i); } here->BJTsenPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("BJTsenacload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtext.h0000644000265600020320000000266112264261473020471 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #ifndef __BJTEXT_H #define __BJTEXT_H extern int BJTacLoad(GENmodel *,CKTcircuit*); extern int BJTask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BJTconvTest(GENmodel*,CKTcircuit*); extern int BJTdelete(GENmodel*,IFuid,GENinstance**); extern void BJTdestroy(GENmodel**); extern int BJTgetic(GENmodel*,CKTcircuit*); extern int BJTload(GENmodel*,CKTcircuit*); extern int BJTmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int BJTmDelete(GENmodel**,IFuid,GENmodel*); extern int BJTmParam(int,IFvalue*,GENmodel*); extern int BJTparam(int,IFvalue*,GENinstance*,IFvalue*); extern int BJTpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BJTsAcLoad(GENmodel*,CKTcircuit*); extern int BJTsLoad(GENmodel*,CKTcircuit*); extern void BJTsPrint(GENmodel*,CKTcircuit*); extern int BJTsSetup(SENstruct*,GENmodel*); extern int BJTsUpdate(GENmodel*,CKTcircuit*); extern int BJTsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BJTunsetup(GENmodel*,CKTcircuit*); extern int BJTtemp(GENmodel*,CKTcircuit*); extern int BJTtrunc(GENmodel*,CKTcircuit*,double*); extern int BJTdisto(int,GENmodel*,CKTcircuit*); extern int BJTnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BJTdSetup(GENmodel*, register CKTcircuit*); extern int BJTsoaCheck(CKTcircuit *, GENmodel *); #endif ngspice-26/src/spicelib/devices/bjt/ChangeLog0000644000265600020320000000041712264261473020567 0ustar andreasadmin2000-09-02 Arno W. Peters * bjtdset.c: reformatted 1999-09-07 Arno W. Peters * bjtnoise.c: removed unused variable `error'. 1999-09-06 Arno W. Peters * bjtnoise.c: Reformatted comment. ngspice-26/src/spicelib/devices/bjt/bjtsset.c0000644000265600020320000000234112264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" int BJTsSetup(SENstruct *info, GENmodel *inModel) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; #ifdef STEPDEBUG printf(" BJTsensetup \n"); #endif /* STEPDEBUG */ /* loop through all the diode models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { if(here->BJTsenParmNo){ here->BJTsenParmNo = ++(info->SENparms); here->BJTsenPertFlag = OFF; } if((here->BJTsens = TMALLOC(double, 55)) == NULL) return(E_NOMEM); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtinit.c0000644000265600020320000000520312264261473020622 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bjtitf.h" #include "bjtext.h" #include "bjtinit.h" SPICEdev BJTinfo = { /* description from struct IFdevice */ { "BJT", /* char *name */ "Bipolar Junction Transistor", /* char *description */ &BJTnSize, /* int *terms */ &BJTnSize, /* int *numNames */ BJTnames, /* char **termnames */ &BJTpTSize, /* int *numInstanceparms */ BJTpTable, /* IFparm *instanceParms */ &BJTmPTSize, /* int *numModelparms */ BJTmPTable, /* IFparm *modelParms */ #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT /* int flags */ }, /* DEVparam */ BJTparam, /* DEVmodParam */ BJTmParam, /* DEVload */ BJTload, /* DEVsetup */ BJTsetup, /* DEVunsetup */ BJTunsetup, /* DEVpzSetup */ BJTsetup, /* DEVtemperature*/ BJTtemp, /* DEVtrunc */ BJTtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ BJTacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ BJTdestroy, /* DEVmodDelete */ BJTmDelete, /* DEVdelete */ BJTdelete, /* DEVsetic */ BJTgetic, /* DEVask */ BJTask, /* DEVmodAsk */ BJTmAsk, /* DEVpzLoad */ BJTpzLoad, /* DEVconvTest */ BJTconvTest, /* DEVsenSetup */ BJTsSetup, /* DEVsenLoad */ BJTsLoad, /* DEVsenUpdate */ BJTsUpdate, /* DEVsenAcLoad */ BJTsAcLoad, /* DEVsenPrint */ BJTsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ BJTdisto, /* DEVnoise */ BJTnoise, /* DEVsoaCheck */ BJTsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &BJTiSize, /* DEVmodSize */ &BJTmSize }; SPICEdev * get_bjt_info(void) { return &BJTinfo; } ngspice-26/src/spicelib/devices/bjt/bjtmdel.c0000644000265600020320000000173412264261473020605 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine deletes a BJT model from the circuit and frees * the storage it was using. * returns an error if the model has instances */ #include "ngspice/ngspice.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTmDelete(GENmodel **inModels, IFuid modname, GENmodel *kill) { BJTmodel **model = (BJTmodel**)inModels; BJTmodel *modfast = (BJTmodel*)kill; BJTmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->BJTnextModel)) { if( (*model)->BJTmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: if( (*model)->BJTinstances ) return(E_NOTEMPTY); *oldmod = (*model)->BJTnextModel; /* cut deleted device out of list */ FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtload.c0000644000265600020320000010035712264261473020604 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* * This is the function called each iteration to evaluate the * BJTs in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BJTload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; double arg1; double arg2; double arg3; double arg; double argtf; double c2; double c4; double capbc; double capbe; double capbx=0; double capsub=0; double cb; double cbc; double cbcn; double cbe; double cben; double cbhat; double cc; double cchat; double cdis; double ceq; double ceqbc; double ceqbe; double ceqbx; double geqsub; double ceqsub; double cex; double csat; double csubsat; double ctot; double czbc; double czbcf2; double czbe; double czbef2; double czbx; double czbxf2; double czsub; double delvbc; double delvbe; double denom; double dqbdvc; double dqbdve; double evbc; double evbcn; double evbe; double evben; double f1; double f2; double f3; double fcpc; double fcpe; double gbc; double gbcn; double gbe; double gben; double gcsub; double gcpr; double gepr; double geq; double geqbx; double geqcb; double gex; double gm; double gmu; double go; double gpi; double gx; double oik; double oikr; double ovtf; double pc; double pe; double ps; double q1; double q2; double qb; double rbpi; double rbpr; double sarg; double sqarg; double td; double temp; double tf; double tr; double vbc; double vbe; double vbx=0.0; double vce; double vsub=0.0; double vt; double vtc; double vte; double vtn; double vts; #ifndef PREDICTOR double xfact; #endif double xjrb; double xjtf; double xmc; double xme; double xms; double xtf; double evsub; double gdsub; double cdsub; int icheck=1; int ichk1; int error; int SenCond=0; double m; /* loop through all the models */ for( ; model != NULL; model = model->BJTnextModel ) { /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { vt = here->BJTtemp * CONSTKoverQ; m = here->BJTm; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("BJTload \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENstatus == PERTURBATION)&& (here->BJTsenPertFlag == OFF)) continue; SenCond = here->BJTsenPertFlag; } gcsub=0; ceqsub=0; geqbx=0; ceqbx=0; geqcb=0; /* * dc model paramters */ csat=here->BJTtSatCur*here->BJTarea; csubsat=here->BJTtSubSatCur*here->BJTarea; rbpr=here->BJTtminBaseResist/here->BJTarea; rbpi=here->BJTtbaseResist/here->BJTarea-rbpr; gcpr=here->BJTtcollectorConduct*here->BJTarea; gepr=here->BJTtemitterConduct*here->BJTarea; oik=here->BJTtinvRollOffF/here->BJTarea; c2=here->BJTtBEleakCur*here->BJTarea; vte=here->BJTtleakBEemissionCoeff*vt; oikr=here->BJTtinvRollOffR/here->BJTarea; if (model->BJTsubs == VERTICAL) c4=here->BJTtBCleakCur * here->BJTareab; else c4=here->BJTtBCleakCur * here->BJTareac; vtc=here->BJTtleakBCemissionCoeff*vt; td=model->BJTexcessPhaseFactor; xjrb=here->BJTtbaseCurrentHalfResist*here->BJTarea; if(SenCond){ #ifdef SENSDEBUG printf("BJTsenPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN)&& (ckt->CKTmode & MODEINITTRAN)) { vbe = *(ckt->CKTstate1 + here->BJTvbe); vbc = *(ckt->CKTstate1 + here->BJTvbc); vbx=model->BJTtype*( *(ckt->CKTrhsOp+here->BJTbaseNode)- *(ckt->CKTrhsOp+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOp+here->BJTsubstNode)- *(ckt->CKTrhsOp+here->BJTsubstConNode)); } else{ vbe = *(ckt->CKTstate0 + here->BJTvbe); vbc = *(ckt->CKTstate0 + here->BJTvbc); if((ckt->CKTsenInfo->SENmode == DCSEN)|| (ckt->CKTsenInfo->SENmode == TRANSEN)){ vbx=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTsubstConNode)); } if(ckt->CKTsenInfo->SENmode == ACSEN){ vbx=model->BJTtype*( *(ckt->CKTrhsOp+here->BJTbaseNode)- *(ckt->CKTrhsOp+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOp+here->BJTsubstNode)- *(ckt->CKTrhsOp+here->BJTsubstConNode)); } } goto next1; } /* * initialization */ icheck=1; if(ckt->CKTmode & MODEINITSMSIG) { vbe= *(ckt->CKTstate0 + here->BJTvbe); vbc= *(ckt->CKTstate0 + here->BJTvbc); vbx=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTsubstConNode)); } else if(ckt->CKTmode & MODEINITTRAN) { vbe = *(ckt->CKTstate1 + here->BJTvbe); vbc = *(ckt->CKTstate1 + here->BJTvbc); vbx=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTsubstConNode)); if( (ckt->CKTmode & MODETRAN) && (ckt->CKTmode & MODEUIC) ) { vbx=model->BJTtype*(here->BJTicVBE-here->BJTicVCE); vsub=0; } } else if((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)){ vbe=model->BJTtype*here->BJTicVBE; vce=model->BJTtype*here->BJTicVCE; vbc=vbe-vce; vbx=vbc; vsub=0; } else if((ckt->CKTmode & MODEINITJCT) && (here->BJToff==0)) { vbe=here->BJTtVcrit; vbc=0; /* ERROR: need to initialize VSUB, VBX here */ vsub=vbx=0; } else if((ckt->CKTmode & MODEINITJCT) || ( (ckt->CKTmode & MODEINITFIX) && (here->BJToff!=0))) { vbe=0; vbc=0; /* ERROR: need to initialize VSUB, VBX here */ vsub=vbx=0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BJTvbe) = *(ckt->CKTstate1 + here->BJTvbe); vbe = (1+xfact)**(ckt->CKTstate1 + here->BJTvbe)- xfact* *(ckt->CKTstate2 + here->BJTvbe); *(ckt->CKTstate0 + here->BJTvbc) = *(ckt->CKTstate1 + here->BJTvbc); vbc = (1+xfact)**(ckt->CKTstate1 + here->BJTvbc)- xfact* *(ckt->CKTstate2 + here->BJTvbc); *(ckt->CKTstate0 + here->BJTcc) = *(ckt->CKTstate1 + here->BJTcc); *(ckt->CKTstate0 + here->BJTcb) = *(ckt->CKTstate1 + here->BJTcb); *(ckt->CKTstate0 + here->BJTgpi) = *(ckt->CKTstate1 + here->BJTgpi); *(ckt->CKTstate0 + here->BJTgmu) = *(ckt->CKTstate1 + here->BJTgmu); *(ckt->CKTstate0 + here->BJTgm) = *(ckt->CKTstate1 + here->BJTgm); *(ckt->CKTstate0 + here->BJTgo) = *(ckt->CKTstate1 + here->BJTgo); *(ckt->CKTstate0 + here->BJTgx) = *(ckt->CKTstate1 + here->BJTgx); *(ckt->CKTstate0 + here->BJTvsub) = *(ckt->CKTstate1 + here->BJTvsub); vsub = (1+xfact)**(ckt->CKTstate1 + here->BJTvsub)- xfact* *(ckt->CKTstate2 + here->BJTvsub); } else { #endif /* PREDICTOR */ /* * compute new nonlinear branch voltages */ vbe=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbasePrimeNode)- *(ckt->CKTrhsOld+here->BJTemitPrimeNode)); vbc=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbasePrimeNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTsubstConNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvbe=vbe- *(ckt->CKTstate0 + here->BJTvbe); delvbc=vbc- *(ckt->CKTstate0 + here->BJTvbc); vbx=model->BJTtype*( *(ckt->CKTrhsOld+here->BJTbaseNode)- *(ckt->CKTrhsOld+here->BJTcolPrimeNode)); vsub=model->BJTtype*model->BJTsubs*( *(ckt->CKTrhsOld+here->BJTsubstNode)- *(ckt->CKTrhsOld+here->BJTsubstConNode)); cchat= *(ckt->CKTstate0 + here->BJTcc)+(*(ckt->CKTstate0 + here->BJTgm)+ *(ckt->CKTstate0 + here->BJTgo))*delvbe- (*(ckt->CKTstate0 + here->BJTgo)+*(ckt->CKTstate0 + here->BJTgmu))*delvbc; cbhat= *(ckt->CKTstate0 + here->BJTcb)+ *(ckt->CKTstate0 + here->BJTgpi)*delvbe+ *(ckt->CKTstate0 + here->BJTgmu)* delvbc; #ifndef NOBYPASS /* * bypass if solution has not changed */ /* the following collections of if's would be just one * if the average compiler could handle it, but many * find the expression too complicated, thus the split. */ if( (ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvbe) < (ckt->CKTreltol*MAX(fabs(vbe), fabs(*(ckt->CKTstate0 + here->BJTvbe)))+ ckt->CKTvoltTol)) ) if( (fabs(delvbc) < ckt->CKTreltol*MAX(fabs(vbc), fabs(*(ckt->CKTstate0 + here->BJTvbc)))+ ckt->CKTvoltTol) ) if( (fabs(cchat-*(ckt->CKTstate0 + here->BJTcc)) < ckt->CKTreltol* MAX(fabs(cchat), fabs(*(ckt->CKTstate0 + here->BJTcc)))+ ckt->CKTabstol) ) if( (fabs(cbhat-*(ckt->CKTstate0 + here->BJTcb)) < ckt->CKTreltol* MAX(fabs(cbhat), fabs(*(ckt->CKTstate0 + here->BJTcb)))+ ckt->CKTabstol) ) { /* * bypassing.... */ vbe = *(ckt->CKTstate0 + here->BJTvbe); vbc = *(ckt->CKTstate0 + here->BJTvbc); cc = *(ckt->CKTstate0 + here->BJTcc); cb = *(ckt->CKTstate0 + here->BJTcb); gpi = *(ckt->CKTstate0 + here->BJTgpi); gmu = *(ckt->CKTstate0 + here->BJTgmu); gm = *(ckt->CKTstate0 + here->BJTgm); go = *(ckt->CKTstate0 + here->BJTgo); gx = *(ckt->CKTstate0 + here->BJTgx); geqcb = *(ckt->CKTstate0 + here->BJTgeqcb); gcsub = *(ckt->CKTstate0 + here->BJTgcsub); geqbx = *(ckt->CKTstate0 + here->BJTgeqbx); vsub = *(ckt->CKTstate0 + here->BJTvsub); gdsub = *(ckt->CKTstate0 + here->BJTgdsub); cdsub = *(ckt->CKTstate0 + here->BJTcdsub); goto load; } #endif /*NOBYPASS*/ /* * limit nonlinear branch voltages */ ichk1=1; vbe = DEVpnjlim(vbe,*(ckt->CKTstate0 + here->BJTvbe),vt, here->BJTtVcrit,&icheck); vbc = DEVpnjlim(vbc,*(ckt->CKTstate0 + here->BJTvbc),vt, here->BJTtVcrit,&ichk1); if (ichk1 == 1) icheck=1; vsub = DEVpnjlim(vsub,*(ckt->CKTstate0 + here->BJTvsub),vt, here->BJTtSubVcrit,&ichk1); if (ichk1 == 1) icheck=1; } /* * determine dc current and derivitives */ next1: vtn=vt*here->BJTtemissionCoeffF; if(vbe >= -3*vtn){ evbe=exp(vbe/vtn); cbe=csat*(evbe-1); gbe=csat*evbe/vtn; } else { arg=3*vtn/(vbe*CONSTe); arg = arg * arg * arg; cbe = -csat*(1+arg); gbe = csat*3*arg/vbe; } if (c2 == 0) { cben=0; gben=0; } else { if(vbe >= -3*vte){ evben=exp(vbe/vte); cben=c2*(evben-1); gben=c2*evben/vte; } else { arg=3*vte/(vbe*CONSTe); arg = arg * arg * arg; cben = -c2*(1+arg); gben = c2*3*arg/vbe; } } gben+=ckt->CKTgmin; cben+=ckt->CKTgmin*vbe; vtn=vt*here->BJTtemissionCoeffR; if(vbc >= -3*vtn) { evbc=exp(vbc/vtn); cbc=csat*(evbc-1); gbc=csat*evbc/vtn; } else { arg=3*vtn/(vbc*CONSTe); arg = arg * arg * arg; cbc = -csat*(1+arg); gbc = csat*3*arg/vbc; } if (c4 == 0) { cbcn=0; gbcn=0; } else { if(vbc >= -3*vtc) { evbcn=exp(vbc/vtc); cbcn=c4*(evbcn-1); gbcn=c4*evbcn/vtc; } else { arg=3*vtc/(vbc*CONSTe); arg = arg * arg * arg; cbcn = -c4*(1+arg); gbcn = c4*3*arg/vbc; } } gbcn+=ckt->CKTgmin; cbcn+=ckt->CKTgmin*vbc; vts=vt*here->BJTtemissionCoeffS; if(vsub <= -3*vts) { arg=3*vts/(vsub*CONSTe); arg = arg * arg * arg; gdsub = csubsat*3*arg/vsub+ckt->CKTgmin; cdsub = -csubsat*(1+arg)+ckt->CKTgmin*vsub; } else { evsub = exp(MIN(MAX_EXP_ARG,vsub/vts)); gdsub = csubsat*evsub/vts + ckt->CKTgmin; cdsub = csubsat*(evsub-1) + ckt->CKTgmin*vsub; } /* * determine base charge terms */ q1=1/(1-here->BJTtinvEarlyVoltF*vbc-here->BJTtinvEarlyVoltR*vbe); if(oik == 0 && oikr == 0) { qb=q1; dqbdve=q1*qb*here->BJTtinvEarlyVoltR; dqbdvc=q1*qb*here->BJTtinvEarlyVoltF; } else { q2=oik*cbe+oikr*cbc; arg=MAX(0,1+4*q2); sqarg=1; if(!model->BJTnkfGiven) { if(arg != 0) sqarg=sqrt(arg); } else { if(arg != 0) sqarg=pow(arg,model->BJTnkf); } qb=q1*(1+sqarg)/2; if(!model->BJTnkfGiven) { dqbdve=q1*(qb*here->BJTtinvEarlyVoltR+oik*gbe/sqarg); dqbdvc=q1*(qb*here->BJTtinvEarlyVoltF+oikr*gbc/sqarg); } else { dqbdve=q1*(qb*here->BJTtinvEarlyVoltR+oik*gbe*2*sqarg*model->BJTnkf/arg); dqbdvc=q1*(qb*here->BJTtinvEarlyVoltF+oikr*gbc*2*sqarg*model->BJTnkf/arg); } } /* * weil's approx. for excess phase applied with backward- * euler integration */ cc=0; cex=cbe; gex=gbe; if(ckt->CKTmode & (MODETRAN | MODEAC) && td != 0) { arg1=ckt->CKTdelta/td; arg2=3*arg1; arg1=arg2*arg1; denom=1+arg1+arg2; arg3=arg1/denom; if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BJTcexbc)=cbe/qb; *(ckt->CKTstate2 + here->BJTcexbc)= *(ckt->CKTstate1 + here->BJTcexbc); } cc=(*(ckt->CKTstate1 + here->BJTcexbc)*(1+ckt->CKTdelta/ ckt->CKTdeltaOld[1]+arg2)- *(ckt->CKTstate2 + here->BJTcexbc)*ckt->CKTdelta/ ckt->CKTdeltaOld[1])/denom; cex=cbe*arg3; gex=gbe*arg3; *(ckt->CKTstate0 + here->BJTcexbc)=cc+cex/qb; } /* * determine dc incremental conductances */ cc=cc+(cex-cbc)/qb-cbc/here->BJTtBetaR-cbcn; cb=cbe/here->BJTtBetaF+cben+cbc/here->BJTtBetaR+cbcn; gx=rbpr+rbpi/qb; if(xjrb != 0) { arg1=MAX(cb/xjrb,1e-9); arg2=(-1+sqrt(1+14.59025*arg1))/2.4317/sqrt(arg1); arg1=tan(arg2); gx=rbpr+3*rbpi*(arg1-arg2)/arg2/arg1/arg1; } if(gx != 0) gx=1/gx; gpi=gbe/here->BJTtBetaF+gben; gmu=gbc/here->BJTtBetaR+gbcn; go=(gbc+(cex-cbc)*dqbdvc/qb)/qb; gm=(gex-(cex-cbc)*dqbdve/qb)/qb-go; if( (ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG)) { /* * charge storage elements */ tf=here->BJTttransitTimeF; tr=here->BJTttransitTimeR; czbe=here->BJTtBEcap*here->BJTarea; pe=here->BJTtBEpot; xme=here->BJTtjunctionExpBE; cdis=model->BJTbaseFractionBCcap; if (model->BJTsubs == VERTICAL) ctot=here->BJTtBCcap*here->BJTareab; else ctot=here->BJTtBCcap*here->BJTareac; czbc=ctot*cdis; czbx=ctot-czbc; pc=here->BJTtBCpot; xmc=here->BJTtjunctionExpBC; fcpe=here->BJTtDepCap; if (model->BJTsubs == VERTICAL) czsub=here->BJTtSubcap*here->BJTareac; else czsub=here->BJTtSubcap*here->BJTareab; ps=here->BJTtSubpot; xms=here->BJTtjunctionExpSub; xtf=model->BJTtransitTimeBiasCoeffF; ovtf=model->BJTtransitTimeVBCFactor; xjtf=here->BJTttransitTimeHighCurrentF*here->BJTarea; if(tf != 0 && vbe >0) { argtf=0; arg2=0; arg3=0; if(xtf != 0){ argtf=xtf; if(ovtf != 0) { argtf=argtf*exp(vbc*ovtf); } arg2=argtf; if(xjtf != 0) { temp=cbe/(cbe+xjtf); argtf=argtf*temp*temp; arg2=argtf*(3-temp-temp); } arg3=cbe*argtf*ovtf; } cbe=cbe*(1+argtf)/qb; gbe=(gbe*(1+arg2)-cbe*dqbdve)/qb; geqcb=tf*(arg3-cbe*dqbdvc)/qb; } if (vbe < fcpe) { arg=1-vbe/pe; sarg=exp(-xme*log(arg)); *(ckt->CKTstate0 + here->BJTqbe)=tf*cbe+pe*czbe* (1-arg*sarg)/(1-xme); capbe=tf*gbe+czbe*sarg; } else { f1=here->BJTtf1; f2=model->BJTf2; f3=model->BJTf3; czbef2=czbe/f2; *(ckt->CKTstate0 + here->BJTqbe) = tf*cbe+czbe*f1+czbef2* (f3*(vbe-fcpe) +(xme/(pe+pe))*(vbe*vbe-fcpe*fcpe)); capbe=tf*gbe+czbef2*(f3+xme*vbe/pe); } fcpc=here->BJTtf4; f1=here->BJTtf5; f2=model->BJTf6; f3=model->BJTf7; if (vbc < fcpc) { arg=1-vbc/pc; sarg=exp(-xmc*log(arg)); *(ckt->CKTstate0 + here->BJTqbc) = tr*cbc+pc*czbc*( 1-arg*sarg)/(1-xmc); capbc=tr*gbc+czbc*sarg; } else { czbcf2=czbc/f2; *(ckt->CKTstate0 + here->BJTqbc) = tr*cbc+czbc*f1+czbcf2* (f3*(vbc-fcpc) +(xmc/(pc+pc))*(vbc*vbc-fcpc*fcpc)); capbc=tr*gbc+czbcf2*(f3+xmc*vbc/pc); } if(vbx < fcpc) { arg=1-vbx/pc; sarg=exp(-xmc*log(arg)); *(ckt->CKTstate0 + here->BJTqbx)= pc*czbx* (1-arg*sarg)/(1-xmc); capbx=czbx*sarg; } else { czbxf2=czbx/f2; *(ckt->CKTstate0 + here->BJTqbx)=czbx*f1+czbxf2* (f3*(vbx-fcpc)+(xmc/(pc+pc))*(vbx*vbx-fcpc*fcpc)); capbx=czbxf2*(f3+xmc*vbx/pc); } if(vsub < 0){ arg=1-vsub/ps; sarg=exp(-xms*log(arg)); *(ckt->CKTstate0 + here->BJTqsub) = ps*czsub*(1-arg*sarg)/ (1-xms); capsub=czsub*sarg; } else { *(ckt->CKTstate0 + here->BJTqsub) = vsub*czsub*(1+xms*vsub/ (2*ps)); capsub=czsub*(1+xms*vsub/ps); } here->BJTcapbe = capbe; here->BJTcapbc = capbc; here->BJTcapsub = capsub; here->BJTcapbx = capbx; /* * store small-signal parameters */ if ( (!(ckt->CKTmode & MODETRANOP))|| (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->BJTcqbe) = capbe; *(ckt->CKTstate0 + here->BJTcqbc) = capbc; *(ckt->CKTstate0 + here->BJTcqsub) = capsub; *(ckt->CKTstate0 + here->BJTcqbx) = capbx; *(ckt->CKTstate0 + here->BJTcexbc) = geqcb; if(SenCond){ *(ckt->CKTstate0 + here->BJTcc) = cc; *(ckt->CKTstate0 + here->BJTcb) = cb; *(ckt->CKTstate0 + here->BJTgpi) = gpi; *(ckt->CKTstate0 + here->BJTgmu) = gmu; *(ckt->CKTstate0 + here->BJTgm) = gm; *(ckt->CKTstate0 + here->BJTgo) = go; *(ckt->CKTstate0 + here->BJTgx) = gx; *(ckt->CKTstate0 + here->BJTgcsub) = gcsub; *(ckt->CKTstate0 + here->BJTgeqbx) = geqbx; } #ifdef SENSDEBUG printf("storing small signal parameters for op\n"); printf("capbe = %.7e ,capbc = %.7e\n",capbe,capbc); printf("capsub = %.7e ,capbx = %.7e\n",capsub,capbx); printf("geqcb = %.7e ,gpi = %.7e\n",geqcb,gpi); printf("gmu = %.7e ,gm = %.7e\n",gmu,gm); printf("go = %.7e ,gx = %.7e\n",go,gx); printf("gcsub = %.7e ,geqbx = %.7e\n",gcsub,geqbx); printf("cc = %.7e ,cb = %.7e\n",cc,cb); #endif /* SENSDEBUG */ continue; /* go to 1000 */ } /* * transient analysis */ if(SenCond && ckt->CKTsenInfo->SENmode == TRANSEN){ *(ckt->CKTstate0 + here->BJTcc) = cc; *(ckt->CKTstate0 + here->BJTcb) = cb; *(ckt->CKTstate0 + here->BJTgx) = gx; continue; } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BJTqbe) = *(ckt->CKTstate0 + here->BJTqbe) ; *(ckt->CKTstate1 + here->BJTqbc) = *(ckt->CKTstate0 + here->BJTqbc) ; *(ckt->CKTstate1 + here->BJTqbx) = *(ckt->CKTstate0 + here->BJTqbx) ; *(ckt->CKTstate1 + here->BJTqsub) = *(ckt->CKTstate0 + here->BJTqsub) ; } error = NIintegrate(ckt,&geq,&ceq,capbe,here->BJTqbe); if(error) return(error); geqcb=geqcb*ckt->CKTag[0]; gpi=gpi+geq; cb=cb+*(ckt->CKTstate0 + here->BJTcqbe); error = NIintegrate(ckt,&geq,&ceq,capbc,here->BJTqbc); if(error) return(error); gmu=gmu+geq; cb=cb+*(ckt->CKTstate0 + here->BJTcqbc); cc=cc-*(ckt->CKTstate0 + here->BJTcqbc); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BJTcqbe) = *(ckt->CKTstate0 + here->BJTcqbe); *(ckt->CKTstate1 + here->BJTcqbc) = *(ckt->CKTstate0 + here->BJTcqbc); } } } if(SenCond) goto next2; /* * check convergence */ if ( (!(ckt->CKTmode & MODEINITFIX))||(!(here->BJToff))) { if (icheck == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* * charge storage for c-s and b-x junctions */ if(ckt->CKTmode & (MODETRAN | MODEAC)) { error = NIintegrate(ckt,&gcsub,&ceq,capsub,here->BJTqsub); if(error) return(error); error = NIintegrate(ckt,&geqbx,&ceq,capbx,here->BJTqbx); if(error) return(error); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BJTcqbx) = *(ckt->CKTstate0 + here->BJTcqbx); *(ckt->CKTstate1 + here->BJTcqsub) = *(ckt->CKTstate0 + here->BJTcqsub); } } next2: *(ckt->CKTstate0 + here->BJTvbe) = vbe; *(ckt->CKTstate0 + here->BJTvbc) = vbc; *(ckt->CKTstate0 + here->BJTcc) = cc; *(ckt->CKTstate0 + here->BJTcb) = cb; *(ckt->CKTstate0 + here->BJTgpi) = gpi; *(ckt->CKTstate0 + here->BJTgmu) = gmu; *(ckt->CKTstate0 + here->BJTgm) = gm; *(ckt->CKTstate0 + here->BJTgo) = go; *(ckt->CKTstate0 + here->BJTgx) = gx; *(ckt->CKTstate0 + here->BJTgeqcb) = geqcb; *(ckt->CKTstate0 + here->BJTgcsub) = gcsub; *(ckt->CKTstate0 + here->BJTgeqbx) = geqbx; *(ckt->CKTstate0 + here->BJTvsub) = vsub; *(ckt->CKTstate0 + here->BJTgdsub) = gdsub; *(ckt->CKTstate0 + here->BJTcdsub) = cdsub; /* Do not load the Jacobian and the rhs if perturbation is being carried out */ if(SenCond)continue; #ifndef NOBYPASS load: #endif /* * load current excitation vector */ geqsub = gcsub + gdsub; ceqsub=model->BJTtype * model->BJTsubs * (*(ckt->CKTstate0 + here->BJTcqsub) + cdsub - vsub*geqsub); ceqbx=model->BJTtype * (*(ckt->CKTstate0 + here->BJTcqbx) - vbx * geqbx); ceqbe=model->BJTtype * (cc + cb - vbe * (gm + go + gpi) + vbc * (go - geqcb)); ceqbc=model->BJTtype * (-cc + vbe * (gm + go) - vbc * (gmu + go)); *(ckt->CKTrhs + here->BJTbaseNode) += m * (-ceqbx); *(ckt->CKTrhs + here->BJTcolPrimeNode) += m * (ceqbx+ceqbc); *(ckt->CKTrhs + here->BJTsubstConNode) += m * ceqsub; *(ckt->CKTrhs + here->BJTbasePrimeNode) += m * (-ceqbe-ceqbc); *(ckt->CKTrhs + here->BJTemitPrimeNode) += m * (ceqbe); *(ckt->CKTrhs + here->BJTsubstNode) += m * (-ceqsub); /* * load y matrix */ *(here->BJTcolColPtr) += m * (gcpr); *(here->BJTbaseBasePtr) += m * (gx+geqbx); *(here->BJTemitEmitPtr) += m * (gepr); *(here->BJTcolPrimeColPrimePtr) += m * (gmu+go+gcpr+geqbx); *(here->BJTsubstConSubstConPtr) += m * (geqsub); *(here->BJTbasePrimeBasePrimePtr) += m * (gx +gpi+gmu+geqcb); *(here->BJTemitPrimeEmitPrimePtr) += m * (gpi+gepr+gm+go); *(here->BJTcolColPrimePtr) += m * (-gcpr); *(here->BJTbaseBasePrimePtr) += m * (-gx); *(here->BJTemitEmitPrimePtr) += m * (-gepr); *(here->BJTcolPrimeColPtr) += m * (-gcpr); *(here->BJTcolPrimeBasePrimePtr) += m * (-gmu+gm); *(here->BJTcolPrimeEmitPrimePtr) += m * (-gm-go); *(here->BJTbasePrimeBasePtr) += m * (-gx); *(here->BJTbasePrimeColPrimePtr) += m * (-gmu-geqcb); *(here->BJTbasePrimeEmitPrimePtr) += m * (-gpi); *(here->BJTemitPrimeEmitPtr) += m * (-gepr); *(here->BJTemitPrimeColPrimePtr) += m * (-go+geqcb); *(here->BJTemitPrimeBasePrimePtr) += m * (-gpi-gm-geqcb); *(here->BJTsubstSubstPtr) += m * (geqsub); *(here->BJTsubstConSubstPtr) += m * (-geqsub); *(here->BJTsubstSubstConPtr) += m * (-geqsub); *(here->BJTbaseColPrimePtr) += m * (-geqbx); *(here->BJTcolPrimeBasePtr) += m * (-geqbx); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtpzld.c0000644000265600020320000001132512264261473020632 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; double gcpr; double gepr; double gpi; double gmu; double go; double xgm; double gm; double gx; double xcpi; double xcmu; double xcbx; double xcsub; double xcmcb; double m; for( ; model != NULL; model = model->BJTnextModel) { for( here = model->BJTinstances; here!= NULL; here = here->BJTnextInstance) { m = here->BJTm; gcpr=here->BJTtcollectorConduct * here->BJTarea; gepr=here->BJTtemitterConduct * here->BJTarea; gpi= *(ckt->CKTstate0 + here->BJTgpi); gmu= *(ckt->CKTstate0 + here->BJTgmu); gm= *(ckt->CKTstate0 + here->BJTgm); go= *(ckt->CKTstate0 + here->BJTgo); xgm=0; gx= *(ckt->CKTstate0 + here->BJTgx); xcpi= *(ckt->CKTstate0 + here->BJTcqbe); xcmu= *(ckt->CKTstate0 + here->BJTcqbc); xcbx= *(ckt->CKTstate0 + here->BJTcqbx); xcsub= *(ckt->CKTstate0 + here->BJTcqsub); xcmcb= *(ckt->CKTstate0 + here->BJTcexbc); *(here->BJTcolColPtr) += m * (gcpr); *(here->BJTbaseBasePtr) += m * ((gx) + (xcbx) * (s->real)); *(here->BJTbaseBasePtr + 1) += m * ((xcbx) * (s->imag)); *(here->BJTemitEmitPtr) += m * (gepr); *(here->BJTcolPrimeColPrimePtr) += m * ((gmu+go+gcpr) + (xcmu+xcbx) * (s->real)); *(here->BJTcolPrimeColPrimePtr + 1) += m * ((xcmu+xcbx) * (s->imag)); *(here->BJTsubstConSubstConPtr) += m * (xcsub)* (s->real); *(here->BJTsubstConSubstConPtr + 1) += m * (xcsub)* (s->imag); *(here->BJTbasePrimeBasePrimePtr) += m * ((gx+gpi+gmu) + (xcpi+xcmu+xcmcb) * (s->real)); *(here->BJTbasePrimeBasePrimePtr + 1) += m * ((xcpi+xcmu+xcmcb) * (s->imag)); *(here->BJTemitPrimeEmitPrimePtr) += m * ((gpi+gepr+gm+go) + (xcpi+xgm) * (s->real)); *(here->BJTemitPrimeEmitPrimePtr + 1) += m * ((xcpi+xgm) * (s->imag)); *(here->BJTcolColPrimePtr) += m * (-gcpr); *(here->BJTbaseBasePrimePtr) += m * (-gx); *(here->BJTemitEmitPrimePtr) += m * (-gepr); *(here->BJTcolPrimeColPtr) += m * (-gcpr); *(here->BJTcolPrimeBasePrimePtr) += m * ((-gmu+gm) + (-xcmu+xgm) * (s->real)); *(here->BJTcolPrimeBasePrimePtr + 1) += m * ((-xcmu+xgm) * (s->imag)); *(here->BJTcolPrimeEmitPrimePtr) += m * ((-gm-go) + (-xgm) * (s->real)); *(here->BJTcolPrimeEmitPrimePtr + 1) += m * ((-xgm) * (s->imag)); *(here->BJTbasePrimeBasePtr) += m * (-gx); *(here->BJTbasePrimeColPrimePtr) += m * ((-gmu) + (-xcmu-xcmcb) * (s->real)); *(here->BJTbasePrimeColPrimePtr + 1) += m * ((-xcmu-xcmcb) * (s->imag)); *(here->BJTbasePrimeEmitPrimePtr) += m * ((-gpi) + (-xcpi) * (s->real)); *(here->BJTbasePrimeEmitPrimePtr + 1) += m * ((-xcpi) * (s->imag)); *(here->BJTemitPrimeEmitPtr) += m * (-gepr); *(here->BJTemitPrimeColPrimePtr) += m * ((-go) + (xcmcb) * (s->real)); *(here->BJTemitPrimeColPrimePtr + 1) += m * ((xcmcb) * (s->imag)); *(here->BJTemitPrimeBasePrimePtr) += m * ((-gpi-gm) + (-xcpi-xgm-xcmcb) * (s->real)); *(here->BJTemitPrimeBasePrimePtr + 1) += m * ((-xcpi-xgm-xcmcb) * (s->imag)); *(here->BJTsubstSubstPtr) += m * ((xcsub) * (s->real)); *(here->BJTsubstSubstPtr + 1) += m * ((xcsub) * (s->imag)); *(here->BJTsubstConSubstPtr) += m * ((-xcsub) * (s->real)); *(here->BJTsubstConSubstPtr + 1) += m * ((-xcsub) * (s->imag)); *(here->BJTsubstSubstConPtr) += m * ((-xcsub) * (s->real)); *(here->BJTsubstSubstConPtr + 1) += m * ((-xcsub) * (s->imag)); *(here->BJTbaseColPrimePtr) += m * ((-xcbx) * (s->real)); *(here->BJTbaseColPrimePtr + 1) += m * ((-xcbx) * (s->imag)); *(here->BJTcolPrimeBasePtr) += m * ((-xcbx) * (s->real)); *(here->BJTcolPrimeBasePtr + 1) += m * ((-xcbx) * (s->imag)); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtgetic.c0000644000265600020320000000225712264261473020760 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine gets the device initial conditions for the BJTs * from the RHS vector */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTgetic(GENmodel *inModel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel*)inModel; BJTinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->BJTnextModel) { for(here = model->BJTinstances; here ; here = here->BJTnextInstance) { if(!here->BJTicVBEGiven) { here->BJTicVBE = *(ckt->CKTrhs + here->BJTbaseNode) - *(ckt->CKTrhs + here->BJTemitNode); } if(!here->BJTicVCEGiven) { here->BJTicVCE = *(ckt->CKTrhs + here->BJTcolNode) - *(ckt->CKTrhs + here->BJTemitNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bjt/Makefile.am0000644000265600020320000000117112264261473021047 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbjt.la libbjt_la_SOURCES = \ bjt.c \ bjtacld.c \ bjtask.c \ bjtconv.c \ bjtdefs.h \ bjtdel.c \ bjtdest.c \ bjtdisto.c \ bjtdset.c \ bjtdset.h \ bjtext.h \ bjtgetic.c \ bjtinit.c \ bjtinit.h \ bjtitf.h \ bjtload.c \ bjtmask.c \ bjtmdel.c \ bjtmpar.c \ bjtnoise.c \ bjtparam.c \ bjtpzld.c \ bjtsacl.c \ bjtsetup.c \ bjtsload.c \ bjtsoachk.c \ bjtsprt.c \ bjtsset.c \ bjtsupd.c \ bjttemp.c \ bjttrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/bjt/bjtacld.c0000644000265600020320000001037212264261473020565 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * Function to load the COMPLEX circuit matrix using the * small signal parameters saved during a previous DC operating * point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BJTacLoad(GENmodel *inModel, CKTcircuit *ckt) { BJTinstance *here; BJTmodel *model = (BJTmodel*)inModel; double gcpr; double gepr; double gpi; double gmu; double go; double xgm; double td; double arg; double gm; double gx; double xcpi; double xcmu; double xcbx; double xcsub; double xcmcb; double m; for( ; model != NULL; model = model->BJTnextModel) { for( here = model->BJTinstances; here!= NULL; here = here->BJTnextInstance) { m = here->BJTm; gcpr=here->BJTtcollectorConduct * here->BJTarea; gepr=here->BJTtemitterConduct * here->BJTarea; gpi= *(ckt->CKTstate0 + here->BJTgpi); gmu= *(ckt->CKTstate0 + here->BJTgmu); gm= *(ckt->CKTstate0 + here->BJTgm); go= *(ckt->CKTstate0 + here->BJTgo); xgm=0; td=model->BJTexcessPhaseFactor; if(td != 0) { arg = td*ckt->CKTomega; gm = gm+go; xgm = -gm * sin(arg); gm = gm * cos(arg)-go; } gx= *(ckt->CKTstate0 + here->BJTgx); xcpi= *(ckt->CKTstate0 + here->BJTcqbe) * ckt->CKTomega; xcmu= *(ckt->CKTstate0 + here->BJTcqbc) * ckt->CKTomega; xcbx= *(ckt->CKTstate0 + here->BJTcqbx) * ckt->CKTomega; xcsub= *(ckt->CKTstate0 + here->BJTcqsub) * ckt->CKTomega; xcmcb= *(ckt->CKTstate0 + here->BJTcexbc) * ckt->CKTomega; *(here->BJTcolColPtr) += m * (gcpr); *(here->BJTbaseBasePtr) += m * (gx); *(here->BJTbaseBasePtr + 1) += m * (xcbx); *(here->BJTemitEmitPtr) += m * (gepr); *(here->BJTcolPrimeColPrimePtr) += m * (gmu+go+gcpr); *(here->BJTcolPrimeColPrimePtr + 1) += m * (xcmu+xcbx); *(here->BJTsubstConSubstConPtr + 1) += m * (xcsub); *(here->BJTbasePrimeBasePrimePtr) += m * (gx+gpi+gmu); *(here->BJTbasePrimeBasePrimePtr + 1) += m * (xcpi+xcmu+xcmcb); *(here->BJTemitPrimeEmitPrimePtr) += m * (gpi+gepr+gm+go); *(here->BJTemitPrimeEmitPrimePtr + 1) += m * (xcpi+xgm); *(here->BJTcolColPrimePtr) += m * (-gcpr); *(here->BJTbaseBasePrimePtr) += m * (-gx); *(here->BJTemitEmitPrimePtr) += m * (-gepr); *(here->BJTcolPrimeColPtr) += m * (-gcpr); *(here->BJTcolPrimeBasePrimePtr) += m * (-gmu+gm); *(here->BJTcolPrimeBasePrimePtr + 1) += m * (-xcmu+xgm); *(here->BJTcolPrimeEmitPrimePtr) += m * (-gm-go); *(here->BJTcolPrimeEmitPrimePtr + 1) += m * (-xgm); *(here->BJTbasePrimeBasePtr) += m * (-gx); *(here->BJTbasePrimeColPrimePtr) += m * (-gmu); *(here->BJTbasePrimeColPrimePtr + 1) += m * (-xcmu-xcmcb); *(here->BJTbasePrimeEmitPrimePtr) += m * (-gpi); *(here->BJTbasePrimeEmitPrimePtr + 1) += m * (-xcpi); *(here->BJTemitPrimeEmitPtr) += m * (-gepr); *(here->BJTemitPrimeColPrimePtr) += m * (-go); *(here->BJTemitPrimeColPrimePtr + 1) += m * (xcmcb); *(here->BJTemitPrimeBasePrimePtr) += m * (-gpi-gm); *(here->BJTemitPrimeBasePrimePtr + 1) += m * (-xcpi-xgm-xcmcb); *(here->BJTsubstSubstPtr + 1) += m * (xcsub); *(here->BJTsubstConSubstPtr + 1) += m * (-xcsub); *(here->BJTsubstSubstConPtr + 1) += m * (-xcsub); *(here->BJTbaseColPrimePtr + 1) += m * (-xcbx); *(here->BJTcolPrimeBasePtr + 1) += m * (-xcbx); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/Makefile.in0000644000265600020320000004445112264261535021067 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bjt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbjt_la_LIBADD = am_libbjt_la_OBJECTS = bjt.lo bjtacld.lo bjtask.lo bjtconv.lo \ bjtdel.lo bjtdest.lo bjtdisto.lo bjtdset.lo bjtgetic.lo \ bjtinit.lo bjtload.lo bjtmask.lo bjtmdel.lo bjtmpar.lo \ bjtnoise.lo bjtparam.lo bjtpzld.lo bjtsacl.lo bjtsetup.lo \ bjtsload.lo bjtsoachk.lo bjtsprt.lo bjtsset.lo bjtsupd.lo \ bjttemp.lo bjttrunc.lo libbjt_la_OBJECTS = $(am_libbjt_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbjt_la_SOURCES) DIST_SOURCES = $(libbjt_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbjt.la libbjt_la_SOURCES = \ bjt.c \ bjtacld.c \ bjtask.c \ bjtconv.c \ bjtdefs.h \ bjtdel.c \ bjtdest.c \ bjtdisto.c \ bjtdset.c \ bjtdset.h \ bjtext.h \ bjtgetic.c \ bjtinit.c \ bjtinit.h \ bjtitf.h \ bjtload.c \ bjtmask.c \ bjtmdel.c \ bjtmpar.c \ bjtnoise.c \ bjtparam.c \ bjtpzld.c \ bjtsacl.c \ bjtsetup.c \ bjtsload.c \ bjtsoachk.c \ bjtsprt.c \ bjtsset.c \ bjtsupd.c \ bjttemp.c \ bjttrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bjt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bjt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbjt.la: $(libbjt_la_OBJECTS) $(libbjt_la_DEPENDENCIES) $(EXTRA_libbjt_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbjt_la_OBJECTS) $(libbjt_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtdisto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjtsupd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjttemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bjttrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bjt/bjttemp.c0000644000265600020320000003014112264261473020623 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "bjtdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" /* ARGSUSED */ int BJTtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-compute many useful parameters */ { BJTmodel *model = (BJTmodel *)inModel; BJTinstance *here; double xfc; double vt; double ratlog; double ratio1; double factlog; double bfactor=1.0; double factor; double fact1,fact2; double pbo,pbfact; double gmaold,gmanew; double egfet; double arg; double dt; /* loop through all the bipolar models */ for( ; model != NULL; model = model->BJTnextModel ) { if(!model->BJTtnomGiven) model->BJTtnom = ckt->CKTnomTemp; fact1 = model->BJTtnom/REFTEMP; if(!model->BJTleakBEcurrentGiven) { if(model->BJTc2Given) { model->BJTleakBEcurrent = model->BJTc2 * model->BJTsatCur; } else { model->BJTleakBEcurrent = 0; } } if(!model->BJTleakBCcurrentGiven) { if(model->BJTc4Given) { model->BJTleakBCcurrent = model->BJTc4 * model->BJTsatCur; } else { model->BJTleakBCcurrent = 0; } } if(!model->BJTminBaseResistGiven) { model->BJTminBaseResist = model->BJTbaseResist; } /* * COMPATABILITY WARNING! * special note: for backward compatability to much older models, spice 2G * implemented a special case which checked if B-E leakage saturation * current was >1, then it was instead a the B-E leakage saturation current * divided by IS, and multiplied it by IS at this point. This was not * handled correctly in the 2G code, and there is some question on its * reasonability, since it is also undocumented, so it has been left out * here. It could easily be added with 1 line. (The same applies to the B-C * leakage saturation current). TQ 6/29/84 */ if(model->BJTtransitTimeFVBCGiven && model->BJTtransitTimeFVBC != 0) { model->BJTtransitTimeVBCFactor =1/(model->BJTtransitTimeFVBC*1.44); } else { model->BJTtransitTimeVBCFactor = 0; } model->BJTexcessPhaseFactor = (model->BJTexcessPhase/ (180.0/M_PI)) * model->BJTtransitTimeF; if(model->BJTdepletionCapCoeffGiven) { if(model->BJTdepletionCapCoeff>.9999) { model->BJTdepletionCapCoeff=.9999; SPfrontEnd->IFerror (ERR_WARNING, "BJT model %s, parameter fc limited to 0.9999", &(model->BJTmodName)); } } else { model->BJTdepletionCapCoeff=.5; } xfc = log(1-model->BJTdepletionCapCoeff); model->BJTf2 = exp((1 + model->BJTjunctionExpBE) * xfc); model->BJTf3 = 1 - model->BJTdepletionCapCoeff * (1 + model->BJTjunctionExpBE); model->BJTf6 = exp((1+model->BJTjunctionExpBC)*xfc); model->BJTf7 = 1 - model->BJTdepletionCapCoeff * (1 + model->BJTjunctionExpBC); /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { if(!here->BJTdtempGiven) here->BJTdtemp = 0.0; if(!here->BJTtempGiven) here->BJTtemp = ckt->CKTtemp + here->BJTdtemp; dt = here->BJTtemp - model->BJTtnom; if(model->BJTearlyVoltFGiven && model->BJTearlyVoltF != 0) { here->BJTtinvEarlyVoltF = 1/(model->BJTearlyVoltF * (1+model->BJTtvaf1*dt+model->BJTtvaf2*dt*dt)); } else { here->BJTtinvEarlyVoltF = 0; } if(model->BJTrollOffFGiven && model->BJTrollOffF != 0) { here->BJTtinvRollOffF = 1/(model->BJTrollOffF * (1+model->BJTtikf1*dt+model->BJTtikf2*dt*dt)); } else { here->BJTtinvRollOffF = 0; } if(model->BJTearlyVoltRGiven && model->BJTearlyVoltR != 0) { here->BJTtinvEarlyVoltR = 1/(model->BJTearlyVoltR * (1+model->BJTtvar1*dt+model->BJTtvar2*dt*dt)); } else { here->BJTtinvEarlyVoltR = 0; } if(model->BJTrollOffRGiven && model->BJTrollOffR != 0) { here->BJTtinvRollOffR = 1/(model->BJTrollOffR * (1+model->BJTtikr1*dt+model->BJTtikr2*dt*dt)); } else { here->BJTtinvRollOffR = 0; } if(model->BJTcollectorResistGiven && model->BJTcollectorResist != 0) { here->BJTtcollectorConduct = 1/(model->BJTcollectorResist * (1+model->BJTtrc1*dt+model->BJTtrc2*dt*dt)); } else { here->BJTtcollectorConduct = 0; } if(model->BJTemitterResistGiven && model->BJTemitterResist != 0) { here->BJTtemitterConduct = 1/(model->BJTemitterResist * (1+model->BJTtre1*dt+model->BJTtre2*dt*dt)); } else { here->BJTtemitterConduct = 0; } here->BJTtbaseResist = model->BJTbaseResist * (1+model->BJTtrb1*dt+model->BJTtrb2*dt*dt); here->BJTtminBaseResist = model->BJTminBaseResist*(1+model->BJTtrm1*dt+model->BJTtrm2*dt*dt); here->BJTtbaseCurrentHalfResist = model->BJTbaseCurrentHalfResist * (1+model->BJTtirb1*dt+model->BJTtirb2*dt*dt); here->BJTtemissionCoeffF = model->BJTemissionCoeffF * (1+model->BJTtnf1*dt+model->BJTtnf2*dt*dt); here->BJTtemissionCoeffR = model->BJTemissionCoeffR * (1+model->BJTtnr1*dt+model->BJTtnr2*dt*dt); here->BJTtleakBEemissionCoeff = model->BJTleakBEemissionCoeff * (1+model->BJTtne1*dt+model->BJTtne2*dt*dt); here->BJTtleakBCemissionCoeff = model->BJTleakBCemissionCoeff * (1+model->BJTtnc1*dt+model->BJTtnc2*dt*dt); here->BJTttransitTimeHighCurrentF = model->BJTtransitTimeHighCurrentF * (1+model->BJTtitf1*dt+model->BJTtitf2*dt*dt); here->BJTttransitTimeF = model->BJTtransitTimeF * (1+model->BJTttf1*dt+model->BJTttf2*dt*dt); here->BJTttransitTimeR = model->BJTtransitTimeR * (1+model->BJTttr1*dt+model->BJTttr2*dt*dt); here->BJTtjunctionExpBE = model->BJTjunctionExpBE * (1+model->BJTtmje1*dt+model->BJTtmje2*dt*dt); here->BJTtjunctionExpBC = model->BJTjunctionExpBC * (1+model->BJTtmjc1*dt+model->BJTtmjc2*dt*dt); here->BJTtjunctionExpSub = model->BJTexponentialSubstrate * (1+model->BJTtmjs1*dt+model->BJTtmjs2*dt*dt); here->BJTtemissionCoeffS = model->BJTemissionCoeffS * (1+model->BJTtns1*dt+model->BJTtns2*dt*dt); vt = here->BJTtemp * CONSTKoverQ; fact2 = here->BJTtemp/REFTEMP; egfet = 1.16-(7.02e-4*here->BJTtemp*here->BJTtemp)/ (here->BJTtemp+1108); arg = -egfet/(2*CONSTboltz*here->BJTtemp)+ 1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt*(1.5*log(fact2)+CHARGE*arg); ratlog = log(here->BJTtemp/model->BJTtnom); ratio1 = here->BJTtemp/model->BJTtnom -1; factlog = ratio1 * model->BJTenergyGap/vt + model->BJTtempExpIS*ratlog; if ((model->BJTtlev == 0) || (model->BJTtlev == 1)) { factor = exp(factlog); here->BJTtSatCur = model->BJTsatCur * factor; here->BJTtSubSatCur = model->BJTsubSatCur * factor; } else if (model->BJTtlev == 3) { here->BJTtSatCur = pow(model->BJTsatCur,(1+model->BJTtis1*dt+model->BJTtis2*dt*dt)); } if (model->BJTtlev == 0) { bfactor = exp(ratlog*model->BJTbetaExp); } else if (model->BJTtlev == 1) { bfactor = 1+model->BJTbetaExp*dt; } if ((model->BJTtbf1Given)||(model->BJTtbf2Given)) here->BJTtBetaF = model->BJTbetaF * (1+model->BJTtbf1*dt+model->BJTtbf2*dt*dt); else here->BJTtBetaF = model->BJTbetaF * bfactor; if ((model->BJTtbr1Given)||(model->BJTtbr2Given)) here->BJTtBetaR = model->BJTbetaR * (1+model->BJTtbr1*dt+model->BJTtbr2*dt*dt); else here->BJTtBetaR = model->BJTbetaR * bfactor; if ((model->BJTtlev == 0) || (model->BJTtlev == 1)) { here->BJTtBEleakCur = model->BJTleakBEcurrent * exp(factlog/model->BJTleakBEemissionCoeff)/bfactor; here->BJTtBCleakCur = model->BJTleakBCcurrent * exp(factlog/model->BJTleakBCemissionCoeff)/bfactor; } else if (model->BJTtlev == 3) { here->BJTtBEleakCur = pow(model->BJTleakBEcurrent,(1+model->BJTtise1*dt+model->BJTtise2*dt*dt)); here->BJTtBCleakCur = pow(model->BJTleakBCcurrent,(1+model->BJTtisc1*dt+model->BJTtisc2*dt*dt)); } if (model->BJTtlevc == 0) { pbo = (model->BJTpotentialBE-pbfact)/fact1; gmaold = (model->BJTpotentialBE-pbo)/pbo; here->BJTtBEcap = model->BJTdepletionCapBE/ (1+here->BJTtjunctionExpBE* (4e-4*(model->BJTtnom-REFTEMP)-gmaold)); here->BJTtBEpot = fact2 * pbo+pbfact; gmanew = (here->BJTtBEpot-pbo)/pbo; here->BJTtBEcap *= 1+here->BJTtjunctionExpBE* (4e-4*(here->BJTtemp-REFTEMP)-gmanew); } else if (model->BJTtlevc == 1) { here->BJTtBEcap = model->BJTdepletionCapBE* (1+model->BJTcte*dt); here->BJTtBEpot = model->BJTpotentialBE - model->BJTtvje*dt; } if (model->BJTtlevc == 0) { pbo = (model->BJTpotentialBC-pbfact)/fact1; gmaold = (model->BJTpotentialBC-pbo)/pbo; here->BJTtBCcap = model->BJTdepletionCapBC/ (1+here->BJTtjunctionExpBC* (4e-4*(model->BJTtnom-REFTEMP)-gmaold)); here->BJTtBCpot = fact2 * pbo+pbfact; gmanew = (here->BJTtBCpot-pbo)/pbo; here->BJTtBCcap *= 1+here->BJTtjunctionExpBC* (4e-4*(here->BJTtemp-REFTEMP)-gmanew); } else if (model->BJTtlevc == 1) { here->BJTtBCcap = model->BJTdepletionCapBC* (1+model->BJTctc*dt); here->BJTtBCpot = model->BJTpotentialBC - model->BJTtvjc*dt; } if (model->BJTtlevc == 0) { pbo = (model->BJTpotentialSubstrate-pbfact)/fact1; gmaold = (model->BJTpotentialSubstrate-pbo)/pbo; here->BJTtSubcap = model->BJTcapSub/ (1+here->BJTtjunctionExpSub* (4e-4*(model->BJTtnom-REFTEMP)-gmaold)); here->BJTtSubpot = fact2 * pbo+pbfact; gmanew = (here->BJTtSubpot-pbo)/pbo; here->BJTtSubcap *= 1+here->BJTtjunctionExpSub* (4e-4*(here->BJTtemp-REFTEMP)-gmanew); } else if (model->BJTtlevc == 1) { here->BJTtSubcap = model->BJTcapSub* (1+model->BJTcts*dt); here->BJTtSubpot = model->BJTpotentialSubstrate - model->BJTtvjs*dt; } here->BJTtDepCap = model->BJTdepletionCapCoeff * here->BJTtBEpot; here->BJTtf1 = here->BJTtBEpot * (1 - exp((1 - here->BJTtjunctionExpBE) * xfc)) / (1 - here->BJTtjunctionExpBE); here->BJTtf4 = model->BJTdepletionCapCoeff * here->BJTtBCpot; here->BJTtf5 = here->BJTtBCpot * (1 - exp((1 - here->BJTtjunctionExpBC) * xfc)) / (1 - here->BJTtjunctionExpBC); here->BJTtVcrit = vt * log(vt / (CONSTroot2*here->BJTtSatCur*here->BJTarea)); here->BJTtSubVcrit = vt * log(vt / (CONSTroot2*here->BJTtSubSatCur*here->BJTarea)); } } return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtdisto.c0000644000265600020320000012357112264261473021012 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bjtdefs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" #include "bjtdset.h" /* assuming here that ckt->CKTomega has been initialised to * the correct value */ int BJTdisto(int mode, GENmodel *genmodel, CKTcircuit *ckt) { BJTmodel *model = (BJTmodel *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; double td; DpassStr pass; double r1h1x = 0.0, i1h1x = 0.0; double r1h1y = 0.0, i1h1y = 0.0; double r1h1z = 0.0, i1h1z = 0.0; double r1h2x = 0.0, i1h2x = 0.0; double r1h2y = 0.0, i1h2y = 0.0; double r1h2z = 0.0, i1h2z = 0.0; double r1hm2x = 0.0, i1hm2x = 0.0; double r1hm2y = 0.0, i1hm2y = 0.0; double r1hm2z = 0.0, i1hm2z = 0.0; double r2h11x = 0.0, i2h11x = 0.0; double r2h11y = 0.0, i2h11y = 0.0; double r2h11z = 0.0, i2h11z = 0.0; double r2h1m2x = 0.0, i2h1m2x = 0.0; double r2h1m2y = 0.0, i2h1m2y = 0.0; double r2h1m2z = 0.0, i2h1m2z = 0.0; double temp, itemp; BJTinstance *here; #ifdef DISTODEBUG double time; #endif if (mode == D_SETUP) return(BJTdSetup((GENmodel *)model,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the BJT models */ for( ; model != NULL; model = model->BJTnextModel ) { td = model->BJTexcessPhaseFactor; /* loop through all the instances of the model */ for (here = model->BJTinstances; here != NULL ; here=here->BJTnextInstance) { /* getting Volterra kernels */ /* until further notice x = vbe, y = vbc, z= vbed */ r1h1x = *(job->r1H1ptr + (here->BJTbasePrimeNode)) - *(job->r1H1ptr + (here->BJTemitPrimeNode)); i1h1x = *(job->i1H1ptr + (here->BJTbasePrimeNode)) - *(job->i1H1ptr + (here->BJTemitPrimeNode)); r1h1y = *(job->r1H1ptr + (here->BJTbasePrimeNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1y = *(job->i1H1ptr + (here->BJTbasePrimeNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); if (td != 0) { temp = job->Domega1 * td; /* multiplying r1h1x by exp(-j omega td) */ r1h1z = r1h1x*cos(temp) + i1h1x*sin(temp); i1h1z = i1h1x*cos(temp) - r1h1x*sin(temp); } else { r1h1z = r1h1x; i1h1z = i1h1x; } if ((mode == D_F1MF2) || (mode == D_2F1MF2)) { r1hm2x = *(job->r1H2ptr + (here->BJTbasePrimeNode)) - *(job->r1H2ptr + (here->BJTemitPrimeNode)); i1hm2x = -(*(job->i1H2ptr + (here->BJTbasePrimeNode)) - *(job->i1H2ptr + (here->BJTemitPrimeNode))); r1hm2y = *(job->r1H2ptr + (here->BJTbasePrimeNode)) - *(job->r1H2ptr + (here->BJTcolPrimeNode)); i1hm2y = -(*(job->i1H2ptr + (here->BJTbasePrimeNode)) - *(job->i1H2ptr + (here->BJTcolPrimeNode))); if (td != 0) { temp = -job->Domega2 * td; r1hm2z = r1hm2x*cos(temp) + i1hm2x*sin(temp); i1hm2z = i1hm2x*cos(temp) - r1hm2x*sin(temp); } else { r1hm2z = r1hm2x; i1hm2z = i1hm2x; } } if ((mode == D_THRF1) || (mode == D_2F1MF2)){ r2h11x = *(job->r2H11ptr + (here->BJTbasePrimeNode)) - *(job->r2H11ptr + (here->BJTemitPrimeNode)); i2h11x = *(job->i2H11ptr + (here->BJTbasePrimeNode)) - *(job->i2H11ptr + (here->BJTemitPrimeNode)); r2h11y = *(job->r2H11ptr + (here->BJTbasePrimeNode)) - *(job->r2H11ptr + (here->BJTcolPrimeNode)); i2h11y = *(job->i2H11ptr + (here->BJTbasePrimeNode)) - *(job->i2H11ptr + (here->BJTcolPrimeNode)); if (td != 0) { temp = 2*job->Domega1* td ; r2h11z = r2h11x*cos(temp) + i2h11x*sin(temp); i2h11z = i2h11x*cos(temp) - r2h11x*sin(temp); } else { r2h11z = r2h11x; i2h11z = i2h11x; } } if ((mode == D_2F1MF2)){ r2h1m2x = *(job->r2H1m2ptr + (here->BJTbasePrimeNode)) - *(job->r2H1m2ptr + (here->BJTemitPrimeNode)); i2h1m2x = *(job->i2H1m2ptr + (here->BJTbasePrimeNode)) - *(job->i2H1m2ptr + (here->BJTemitPrimeNode)); r2h1m2y = *(job->r2H1m2ptr + (here->BJTbasePrimeNode)) - *(job->r2H1m2ptr + (here->BJTcolPrimeNode)); i2h1m2y = *(job->i2H1m2ptr + (here->BJTbasePrimeNode)) - *(job->i2H1m2ptr + (here->BJTcolPrimeNode)); if (td != 0) { temp = (job->Domega1 - job->Domega2) * td; r2h1m2z = r2h1m2x*cos(temp) + i2h1m2x*sin(temp); i2h1m2z = i2h1m2x*cos(temp) - r2h1m2x*sin(temp); } else { r2h1m2z = r2h1m2x; i2h1m2z = i2h1m2x; } } if ((mode == D_F1PF2)){ r1h2x = *(job->r1H2ptr + (here->BJTbasePrimeNode)) - *(job->r1H2ptr + (here->BJTemitPrimeNode)); i1h2x = *(job->i1H2ptr + (here->BJTbasePrimeNode)) - *(job->i1H2ptr + (here->BJTemitPrimeNode)); r1h2y = *(job->r1H2ptr + (here->BJTbasePrimeNode)) - *(job->r1H2ptr + (here->BJTcolPrimeNode)); i1h2y = *(job->i1H2ptr + (here->BJTbasePrimeNode)) - *(job->i1H2ptr + (here->BJTcolPrimeNode)); if (td != 0) { temp = job->Domega2 * td; r1h2z = r1h2x*cos(temp) + i1h2x*sin(temp); i1h2z = i1h2x*cos(temp) - r1h2x*sin(temp); } else { r1h2z = r1h2x; i1h2z = i1h2x; } } /* loading starts here */ switch (mode) { case D_TWOF1: /* ic term */ #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = DFn2F1( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for DFn2F1: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTcolPrimeNode) -= temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* finish ic term */ /* loading ib term */ /* x and y still the same */ temp = DFn2F1( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); itemp = DFi2F1( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* ib term over */ /* loading ibb term */ /* now x = vbe, y = vbc, z = vbb */ if ( !((model->BJTminBaseResist == 0.0) && (model->BJTbaseResist == model->BJTminBaseResist))) { r1h1z = *(job->r1H1ptr + (here->BJTbaseNode)) - *(job->r1H1ptr + (here->BJTbasePrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTbaseNode)) - *(job->i1H1ptr + (here->BJTbasePrimeNode)); temp = DFn2F1( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTbasePrimeNode) += temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) += itemp; } /* ibb term over */ /* loading qbe term */ /* x = vbe, y = vbc, z not used */ /* (have to multiply by j omega for charge storage * elements to get the current) */ temp = - ckt->CKTomega* DFi2F1( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); itemp = ckt->CKTomega* DFn2F1( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* qbe term over */ /* loading qbx term */ /* z = vbx= vb - vcPrime */ r1h1z = r1h1z + r1h1y; i1h1z = i1h1z + i1h1y; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = - ckt->CKTomega * D1i2F1(here->capbx2, r1h1z, i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capbx2, r1h1z, i1h1z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for D1n2F1: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbx term over */ /* loading qbc term */ temp = - ckt->CKTomega * D1i2F1(here->capbc2, r1h1y, i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capbc2, r1h1y, i1h1y); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbc term over */ /* loading qsc term */ /* z = vsc */ r1h1z = *(job->r1H1ptr + (here->BJTsubstNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTsubstNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); temp = - ckt->CKTomega * D1i2F1(here->capsc2, r1h1z, i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capsc2, r1h1z, i1h1z); *(ckt->CKTrhs + here->BJTsubstNode) -= temp; *(ckt->CKTirhs + here->BJTsubstNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qsc term over */ break; case D_THRF1: /* ic term */ #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = DFn3F1( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, here->ic_x3, here->ic_y3, here->ic_w3, here->ic_x2y, here->ic_x2w, here->ic_xy2, here->ic_y2w, here->ic_xw2, here->ic_yw2, here->ic_xyw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, here->ic_x3, here->ic_y3, here->ic_w3, here->ic_x2y, here->ic_x2w, here->ic_xy2, here->ic_y2w, here->ic_xw2, here->ic_yw2, here->ic_xyw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for DFn3F1: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTcolPrimeNode) -= temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* finish ic term */ /* loading ib term */ /* x and y still the same */ temp = DFn3F1( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, here->ib_x3, here->ib_y3, 0.0, here->ib_x2y, 0.0, here->ib_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); itemp = DFi3F1( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, here->ib_x3, here->ib_y3, 0.0, here->ib_x2y, 0.0, here->ib_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* ib term over */ /* loading ibb term */ if ( !((model->BJTminBaseResist == 0.0) && (model->BJTbaseResist == model->BJTminBaseResist))) { /* now x = vbe, y = vbc, z = vbb */ r1h1z = *(job->r1H1ptr + (here->BJTbaseNode)) - *(job->r1H1ptr + (here->BJTbasePrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTbaseNode)) - *(job->i1H1ptr + (here->BJTbasePrimeNode)); r2h11z = *(job->r2H11ptr + (here->BJTbaseNode)) - *(job->r2H11ptr + (here->BJTbasePrimeNode)); i2h11z = *(job->i2H11ptr + (here->BJTbaseNode)) - *(job->i2H11ptr + (here->BJTbasePrimeNode)); temp = DFn3F1( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, here->ibb_x3, here->ibb_y3, here->ibb_z3, here->ibb_x2y, here->ibb_x2z, here->ibb_xy2, here->ibb_y2z, here->ibb_xz2, here->ibb_yz2, here->ibb_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, here->ibb_x3, here->ibb_y3, here->ibb_z3, here->ibb_x2y, here->ibb_x2z, here->ibb_xy2, here->ibb_y2z, here->ibb_xz2, here->ibb_yz2, here->ibb_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTbasePrimeNode) += temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) += itemp; } /* ibb term over */ /* loading qbe term */ /* x = vbe, y = vbc, z not used */ /* (have to multiply by j omega for charge storage * elements to get the current) */ temp = - ckt->CKTomega* DFi3F1( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, here->qbe_x3, here->qbe_y3, 0.0, here->qbe_x2y, 0.0, here->qbe_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); itemp = ckt->CKTomega* DFn3F1( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, here->qbe_x3, here->qbe_y3, 0.0, here->qbe_x2y, 0.0, here->qbe_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* qbe term over */ /* loading qbx term */ /* z = vbx= vb - vcPrime */ r1h1z = r1h1z + r1h1y; i1h1z = i1h1z + i1h1y; r2h11z = r2h11z + r2h11y; i2h11z = i2h11z + i2h11y; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = - ckt->CKTomega * D1i3F1(here->capbx2, here->capbx3, r1h1z, i1h1z, r2h11z, i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capbx2, here->capbx3, r1h1z, i1h1z, r2h11z, i2h11z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for D1n3F1: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbx term over */ /* loading qbc term */ temp = - ckt->CKTomega * D1i3F1(here->capbc2, here->capbc3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capbc2, here->capbc3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbc term over */ /* loading qsc term */ /* z = vsc */ r1h1z = *(job->r1H1ptr + (here->BJTsubstNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTsubstNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); r2h11z = *(job->r2H11ptr + (here->BJTsubstNode)) - *(job->r2H11ptr + (here->BJTcolPrimeNode)); i2h11z = *(job->i2H11ptr + (here->BJTsubstNode)) - *(job->i2H11ptr + (here->BJTcolPrimeNode)); temp = - ckt->CKTomega * D1i3F1(here->capsc2, here->capsc3, r1h1z, i1h1z, r2h11z, i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capsc2, here->capsc3, r1h1z, i1h1z, r2h11z, i2h11z); *(ckt->CKTrhs + here->BJTsubstNode) -= temp; *(ckt->CKTirhs + here->BJTsubstNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qsc term over */ break; case D_F1PF2: /* ic term */ temp = DFnF12( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->BJTcolPrimeNode) -= temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* finish ic term */ /* loading ib term */ /* x and y still the same */ #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = DFnF12( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); itemp = DFiF12( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for DFnF12: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* ib term over */ /* loading ibb term */ if ( !((model->BJTminBaseResist == 0.0) && (model->BJTbaseResist == model->BJTminBaseResist))) { /* now x = vbe, y = vbc, z = vbb */ r1h1z = *(job->r1H1ptr + (here->BJTbaseNode)) - *(job->r1H1ptr + (here->BJTbasePrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTbaseNode)) - *(job->i1H1ptr + (here->BJTbasePrimeNode)); r1h2z = *(job->r1H2ptr + (here->BJTbaseNode)) - *(job->r1H2ptr + (here->BJTbasePrimeNode)); i1h2z = *(job->i1H2ptr + (here->BJTbaseNode)) - *(job->i1H2ptr + (here->BJTbasePrimeNode)); temp = DFnF12( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTbasePrimeNode) += temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) += itemp; } /* ibb term over */ /* loading qbe term */ /* x = vbe, y = vbc, z not used */ /* (have to multiply by j omega for charge storage * elements - to get the current) */ temp = - ckt->CKTomega* DFiF12( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); itemp = ckt->CKTomega* DFnF12( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* qbe term over */ /* loading qbx term */ /* z = vbx= vb - vcPrime */ r1h1z = r1h1z + r1h1y; i1h1z = i1h1z + i1h1y; r1h2z = r1h2z + r1h2y; i1h2z = i1h2z + i1h2y; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = - ckt->CKTomega * D1iF12(here->capbx2, r1h1z, i1h1z, r1h2z, i1h2z); itemp = ckt->CKTomega * D1nF12(here->capbx2, r1h1z, i1h1z, r1h2z, i1h2z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for D1nF12: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbx term over */ /* loading qbc term */ temp = - ckt->CKTomega * D1iF12(here->capbc2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = ckt->CKTomega * D1nF12(here->capbc2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbc term over */ /* loading qsc term */ /* z = vsc */ r1h1z = *(job->r1H1ptr + (here->BJTsubstNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTsubstNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); r1h2z = *(job->r1H2ptr + (here->BJTsubstNode)) - *(job->r1H2ptr + (here->BJTcolPrimeNode)); i1h2z = *(job->i1H2ptr + (here->BJTsubstNode)) - *(job->i1H2ptr + (here->BJTcolPrimeNode)); temp = - ckt->CKTomega * D1iF12(here->capsc2, r1h1z, i1h1z, r1h2z, i1h2z); itemp = ckt->CKTomega * D1nF12(here->capsc2, r1h1z, i1h1z, r1h2z, i1h2z); *(ckt->CKTrhs + here->BJTsubstNode) -= temp; *(ckt->CKTirhs + here->BJTsubstNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qsc term over */ break; case D_F1MF2: /* ic term */ temp = DFnF12( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12( here->ic_x2, here->ic_y2, here->ic_w2, here->ic_xy, here->ic_yw, here->ic_xw, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->BJTcolPrimeNode) -= temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* finish ic term */ /* loading ib term */ /* x and y still the same */ temp = DFnF12( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); itemp = DFiF12( here->ib_x2, here->ib_y2, 0.0, here->ib_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* ib term over */ /* loading ibb term */ if ( !((model->BJTminBaseResist == 0.0) && (model->BJTbaseResist == model->BJTminBaseResist))) { /* now x = vbe, y = vbc, z = vbb */ r1h1z = *(job->r1H1ptr + (here->BJTbaseNode)) - *(job->r1H1ptr + (here->BJTbasePrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTbaseNode)) - *(job->i1H1ptr + (here->BJTbasePrimeNode)); r1hm2z = *(job->r1H2ptr + (here->BJTbaseNode)) - *(job->r1H2ptr + (here->BJTbasePrimeNode)); i1hm2z = *(job->i1H2ptr + (here->BJTbaseNode)) - *(job->i1H2ptr + (here->BJTbasePrimeNode)); temp = DFnF12( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12( here->ibb_x2, here->ibb_y2, here->ibb_z2, here->ibb_xy, here->ibb_yz, here->ibb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTbasePrimeNode) += temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) += itemp; } /* ibb term over */ /* loading qbe term */ /* x = vbe, y = vbc, z not used */ /* (have to multiply by j omega for charge storage * elements - to get the current) */ temp = - ckt->CKTomega* DFiF12( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); itemp = ckt->CKTomega* DFnF12( here->qbe_x2, here->qbe_y2, 0.0, here->qbe_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* qbe term over */ /* loading qbx term */ /* z = vbx= vb - vcPrime */ r1h1z = r1h1z + r1h1y; i1h1z = i1h1z + i1h1y; r1hm2z = r1hm2z + r1hm2y; i1hm2z = i1hm2z + i1hm2y; temp = - ckt->CKTomega * D1iF12(here->capbx2, r1h1z, i1h1z, r1hm2z, i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capbx2, r1h1z, i1h1z, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbx term over */ /* loading qbc term */ temp = - ckt->CKTomega * D1iF12(here->capbc2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capbc2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbc term over */ /* loading qsc term */ /* z = vsc */ r1h1z = *(job->r1H1ptr + (here->BJTsubstNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTsubstNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); r1hm2z = *(job->r1H2ptr + (here->BJTsubstNode)) - *(job->r1H2ptr + (here->BJTcolPrimeNode)); i1hm2z = *(job->i1H2ptr + (here->BJTsubstNode)) - *(job->i1H2ptr + (here->BJTcolPrimeNode)); temp = - ckt->CKTomega * D1iF12(here->capsc2, r1h1z, i1h1z, r1hm2z, i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capsc2, r1h1z, i1h1z, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->BJTsubstNode) -= temp; *(ckt->CKTirhs + here->BJTsubstNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qsc term over */ break; case D_2F1MF2: /* ic term */ { pass.cxx = here->ic_x2; pass.cyy = here->ic_y2; pass.czz = here->ic_w2; pass.cxy = here->ic_xy; pass.cyz = here->ic_yw; pass.cxz = here->ic_xw; pass.cxxx = here->ic_x3; pass.cyyy = here->ic_y3; pass.czzz = here->ic_w3; pass.cxxy = here->ic_x2y; pass.cxxz = here->ic_x2w; pass.cxyy = here->ic_xy2; pass.cyyz = here->ic_y2w; pass.cxzz = here->ic_xw2; pass.cyzz = here->ic_yw2; pass.cxyz = here->ic_xyw; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = DFn2F12(&pass); itemp = DFi2F12(&pass); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for DFn2F12: %g seconds \n", time); #endif } *(ckt->CKTrhs + here->BJTcolPrimeNode) -= temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* finish ic term */ /* loading ib term */ /* x and y still the same */ { pass.cxx = here->ib_x2; pass.cyy = here->ib_y2; pass.czz = 0.0; pass.cxy = here->ib_xy; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->ib_x3; pass.cyyy = here->ib_y3; pass.czzz = 0.0; pass.cxxy = here->ib_x2y; pass.cxxz = 0.0; pass.cxyy = here->ib_xy2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); } *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* ib term over */ /* loading ibb term */ if ( !((model->BJTminBaseResist == 0.0) && (model->BJTbaseResist == model->BJTminBaseResist))) { /* now x = vbe, y = vbc, z = vbb */ r1h1z = *(job->r1H1ptr + (here->BJTbaseNode)) - *(job->r1H1ptr + (here->BJTbasePrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTbaseNode)) - *(job->i1H1ptr + (here->BJTbasePrimeNode)); r1hm2z = *(job->r1H2ptr + (here->BJTbaseNode)) - *(job->r1H2ptr + (here->BJTbasePrimeNode)); i1hm2z = -(*(job->i1H2ptr + (here->BJTbaseNode)) - *(job->i1H2ptr + (here->BJTbasePrimeNode))); r2h11z = *(job->r2H11ptr + (here->BJTbaseNode)) - *(job->r2H11ptr + (here->BJTbasePrimeNode)); i2h11z = *(job->i2H11ptr + (here->BJTbaseNode)) - *(job->i2H11ptr + (here->BJTbasePrimeNode)); r2h1m2z = *(job->r2H1m2ptr + (here->BJTbaseNode)) - *(job->r2H1m2ptr + (here->BJTbasePrimeNode)); i2h1m2z = *(job->i2H1m2ptr + (here->BJTbaseNode)) - *(job->i2H1m2ptr + (here->BJTbasePrimeNode)); { pass.cxx = here->ibb_x2; pass.cyy = here->ibb_y2; pass.czz = here->ibb_z2; pass.cxy = here->ibb_xy; pass.cyz = here->ibb_yz; pass.cxz = here->ibb_xz; pass.cxxx = here->ibb_x3; pass.cyyy = here->ibb_y3; pass.czzz = here->ibb_z3; pass.cxxy = here->ibb_x2y; pass.cxxz = here->ibb_x2z; pass.cxyy = here->ibb_xy2; pass.cyyz = here->ibb_y2z; pass.cxzz = here->ibb_xz2; pass.cyzz = here->ibb_yz2; pass.cxyz = here->ibb_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); } *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTbasePrimeNode) += temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) += itemp; } /* ibb term over */ /* loading qbe term */ /* x = vbe, y = vbc, z not used */ /* (have to multiply by j omega for charge storage * elements to get the current) */ { pass.cxx = here->qbe_x2; pass.cyy = here->qbe_y2; pass.czz = 0.0; pass.cxy = here->qbe_xy; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->qbe_x3; pass.cyyy = here->qbe_y3; pass.czzz = 0.0; pass.cxxy = here->qbe_x2y; pass.cxxz = 0.0; pass.cxyy = here->qbe_xy2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = - ckt->CKTomega* DFi2F12(&pass); itemp = ckt->CKTomega* DFn2F12(&pass); } *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTemitPrimeNode) += temp; *(ckt->CKTirhs + here->BJTemitPrimeNode) += itemp; /* qbe term over */ /* loading qbx term */ /* z = vbx= vb - vcPrime */ r1h1z = r1h1z + r1h1y; i1h1z = i1h1z + i1h1y; r1hm2z = r1hm2z + r1hm2y; i1hm2z = i1hm2z + i1hm2y; r2h11z = r2h11z + r2h11y; i2h11z = i2h11z + i2h11y; r2h1m2z = r2h1m2z + r2h1m2y; i2h1m2z = i2h1m2z + i2h1m2y; #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds(); #endif temp = - ckt->CKTomega * D1i2F12(here->capbx2, here->capbx3, r1h1z, i1h1z, r1hm2z, i1hm2z, r2h11z, i2h11z, r2h1m2z, i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capbx2, here->capbx3, r1h1z, i1h1z, r1hm2z, i1hm2z, r2h11z, i2h11z, r2h1m2z, i2h1m2z); #ifdef D_DBG_SMALLTIMES time = SPfrontEnd->IFseconds() - time; printf("Time for D1n2F12: %g seconds \n", time); #endif *(ckt->CKTrhs + here->BJTbaseNode) -= temp; *(ckt->CKTirhs + here->BJTbaseNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbx term over */ /* loading qbc term */ temp = - ckt->CKTomega * D1i2F12(here->capbc2, here->capbc3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capbc2, here->capbc3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + here->BJTbasePrimeNode) -= temp; *(ckt->CKTirhs + here->BJTbasePrimeNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qbc term over */ /* loading qsc term */ /* z = vsc */ r1h1z = *(job->r1H1ptr + (here->BJTsubstNode)) - *(job->r1H1ptr + (here->BJTcolPrimeNode)); i1h1z = *(job->i1H1ptr + (here->BJTsubstNode)) - *(job->i1H1ptr + (here->BJTcolPrimeNode)); r1hm2z = *(job->r1H2ptr + (here->BJTsubstNode)) - *(job->r1H2ptr + (here->BJTcolPrimeNode)); i1hm2z = -(*(job->i1H2ptr + (here->BJTsubstNode)) - *(job->i1H2ptr + (here->BJTcolPrimeNode))); r2h11z = *(job->r2H11ptr + (here->BJTsubstNode)) - *(job->r2H11ptr + (here->BJTcolPrimeNode)); i2h11z = *(job->i2H11ptr + (here->BJTsubstNode)) - *(job->i2H11ptr + (here->BJTcolPrimeNode)); r2h1m2z = *(job->r2H1m2ptr + (here->BJTsubstNode)) - *(job->r2H1m2ptr + (here->BJTcolPrimeNode)); i2h1m2z = *(job->i2H1m2ptr + (here->BJTsubstNode)) - *(job->i2H1m2ptr + (here->BJTcolPrimeNode)); temp = - ckt->CKTomega * D1i2F12(here->capsc2, here->capsc3, r1h1z, i1h1z, r1hm2z, i1hm2z, r2h11z, i2h11z, r2h1m2z, i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capsc2, here->capsc3, r1h1z, i1h1z, r1hm2z, i1hm2z, r2h11z, i2h11z, r2h1m2z, i2h1m2z); *(ckt->CKTrhs + here->BJTsubstNode) -= temp; *(ckt->CKTirhs + here->BJTsubstNode) -= itemp; *(ckt->CKTrhs + here->BJTcolPrimeNode) += temp; *(ckt->CKTirhs + here->BJTcolPrimeNode) += itemp; /* qsc term over */ break; default: ; ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/bjt/bjtnoise.c0000644000265600020320000001542412264261473021002 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "bjtdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * BJTnoise (mode, operation, firstModel, ckt, data, OnDens) * * This routine names and evaluates all of the noise sources * associated with BJT's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the BJT's is summed with the variable "OnDens". */ int BJTnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BJTmodel *firstModel = (BJTmodel *) genmodel; BJTmodel *model; BJTinstance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BJTNSRCS]; double lnNdens[BJTNSRCS]; int i; /* define the names of the noise sources */ static char *BJTnNames[BJTNSRCS] = { /* Note that we have to keep the order consistent with the strchr definitions in BJTdefs.h */ "_rc", /* noise due to rc */ "_rb", /* noise due to rb */ "_re", /* noise due to re */ "_ic", /* noise due to ic */ "_ib", /* noise due to ib */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->BJTnextModel) { for (inst=model->BJTinstances; inst != NULL; inst=inst->BJTnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < BJTNSRCS; i++) { (void)sprintf(name,"onoise_%s%s", inst->BJTname,BJTnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < BJTNSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s", inst->BJTname,BJTnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s", inst->BJTname,BJTnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[BJTRCNOIZ],&lnNdens[BJTRCNOIZ], ckt,THERMNOISE,inst->BJTcolPrimeNode,inst->BJTcolNode, inst->BJTtcollectorConduct * inst->BJTarea * inst->BJTm); NevalSrc(&noizDens[BJTRBNOIZ],&lnNdens[BJTRBNOIZ], ckt,THERMNOISE,inst->BJTbasePrimeNode,inst->BJTbaseNode, *(ckt->CKTstate0 + inst->BJTgx) * inst->BJTm); NevalSrc(&noizDens[BJT_RE_NOISE],&lnNdens[BJT_RE_NOISE], ckt,THERMNOISE,inst->BJTemitPrimeNode,inst->BJTemitNode, inst->BJTtemitterConduct * inst->BJTarea * inst-> BJTm); NevalSrc(&noizDens[BJTICNOIZ],&lnNdens[BJTICNOIZ], ckt,SHOTNOISE,inst->BJTcolPrimeNode, inst->BJTemitPrimeNode, *(ckt->CKTstate0 + inst->BJTcc) * inst->BJTm); NevalSrc(&noizDens[BJTIBNOIZ],&lnNdens[BJTIBNOIZ], ckt,SHOTNOISE,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode, *(ckt->CKTstate0 + inst->BJTcb) * inst->BJTm); NevalSrc(&noizDens[BJTFLNOIZ], NULL, ckt, N_GAIN,inst->BJTbasePrimeNode, inst->BJTemitPrimeNode, (double)0.0); noizDens[BJTFLNOIZ] *= inst->BJTm * model->BJTfNcoef * exp(model->BJTfNexp * log(MAX(fabs(*(ckt->CKTstate0 + inst->BJTcb)),N_MINLOG))) / data->freq; lnNdens[BJTFLNOIZ] = log(MAX(noizDens[BJTFLNOIZ],N_MINLOG)); noizDens[BJTTOTNOIZ] = noizDens[BJTRCNOIZ] + noizDens[BJTRBNOIZ] + noizDens[BJT_RE_NOISE] + noizDens[BJTICNOIZ] + noizDens[BJTIBNOIZ] + noizDens[BJTFLNOIZ]; lnNdens[BJTTOTNOIZ] = log(noizDens[BJTTOTNOIZ]); *OnDens += noizDens[BJTTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < BJTNSRCS; i++) { inst->BJTnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < BJTNSRCS; i++) { inst->BJTnVar[OUTNOIZ][i] = 0.0; inst->BJTnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ /* In order to get the best curve fit, we have to integrate each component separately */ for (i=0; i < BJTNSRCS; i++) { if (i != BJTTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->BJTnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->BJTnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->BJTnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->BJTnVar[OUTNOIZ][i] += tempOnoise; inst->BJTnVar[OUTNOIZ][BJTTOTNOIZ] += tempOnoise; inst->BJTnVar[INNOIZ][i] += tempInoise; inst->BJTnVar[INNOIZ][BJTTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < BJTNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < BJTNSRCS; i++) { data->outpVector[data->outNumber++] = inst->BJTnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->BJTnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bjt/bjtdest.c0000644000265600020320000000200312264261473020611 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * This routine deletes all BJTs from the circuit and frees * all storage they were using. */ #include "ngspice/ngspice.h" #include "bjtdefs.h" #include "ngspice/suffix.h" void BJTdestroy(GENmodel **inModel) { BJTmodel **model = (BJTmodel**)inModel; BJTinstance *here; BJTinstance *prev = NULL; BJTmodel *mod = *model; BJTmodel *oldmod = NULL; for( ; mod ; mod = mod->BJTnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->BJTinstances ; here ; here = here->BJTnextInstance) { if(prev){ if(prev->BJTsens) FREE(prev->BJTsens); FREE(prev); } prev = here; } if(prev){ if(prev->BJTsens) FREE(prev->BJTsens); FREE(prev); } } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/bjt/bjtdefs.h0000644000265600020320000006407212264261473020616 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef BJT #define BJT #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures to describe Bipolar Junction Transistors */ /* data needed to describe a single instance */ typedef struct sBJTinstance { struct sBJTmodel *BJTmodPtr; /* backpointer to model */ struct sBJTinstance *BJTnextInstance; /* pointer to next instance of * current model*/ IFuid BJTname; /* pointer to character string naming this instance */ int BJTstate; /* pointer to start of state vector for bjt */ int BJTcolNode; /* number of collector node of bjt */ int BJTbaseNode; /* number of base node of bjt */ int BJTemitNode; /* number of emitter node of bjt */ int BJTsubstNode; /* number of substrate node of bjt */ int BJTcolPrimeNode; /* number of internal collector node of bjt */ int BJTbasePrimeNode; /* number of internal base node of bjt */ int BJTemitPrimeNode; /* number of internal emitter node of bjt */ int BJTsubstConNode; /* number of node which substrate is connected to */ /* Substrate connection is either base prime * * or collector prime depending on whether * * the device is VERTICAL or LATERAL */ double BJTarea; /* (emitter) area factor for the bjt */ double BJTareab; /* base area factor for the bjt */ double BJTareac; /* collector area factor for the bjt */ double BJTm; /* parallel multiplier */ double BJTicVBE; /* initial condition voltage B-E*/ double BJTicVCE; /* initial condition voltage C-E*/ double BJTtemp; /* instance temperature */ double BJTdtemp; /* instance delta temperature from circuit */ double BJTtSatCur; /* temperature adjusted saturation current */ double BJTtBetaF; /* temperature adjusted forward beta */ double BJTtBetaR; /* temperature adjusted reverse beta */ double BJTtBEleakCur; /* temperature adjusted B-E leakage current */ double BJTtBCleakCur; /* temperature adjusted B-C leakage current */ double BJTtBEcap; /* temperature adjusted B-E capacitance */ double BJTtBEpot; /* temperature adjusted B-E potential */ double BJTtBCcap; /* temperature adjusted B-C capacitance */ double BJTtBCpot; /* temperature adjusted B-C potential */ double BJTtSubcap; /* temperature adjusted Substrate capacitance */ double BJTtSubpot; /* temperature adjusted Substrate potential */ double BJTtDepCap; /* temperature adjusted join point in diode curve */ double BJTtf1; /* temperature adjusted polynomial coefficient */ double BJTtf4; /* temperature adjusted polynomial coefficient */ double BJTtf5; /* temperature adjusted polynomial coefficient */ double BJTtVcrit; /* temperature adjusted critical voltage */ double BJTtSubVcrit; /* temperature adjusted substrate critical voltage */ double BJTtSubSatCur; /* temperature adjusted subst. saturation current */ double BJTtcollectorConduct; /* temperature adjusted */ double BJTtemitterConduct; /* temperature adjusted */ double BJTtbaseResist; /* temperature adjusted */ double BJTtbaseCurrentHalfResist; /* temperature adjusted */ double BJTtminBaseResist; /* temperature adjusted */ double BJTtinvEarlyVoltF; /* temperature adjusted */ double BJTtinvEarlyVoltR; /* temperature adjusted */ double BJTtinvRollOffF; /* temperature adjusted */ double BJTtinvRollOffR; /* temperature adjusted */ double BJTtemissionCoeffF; /* temperature adjusted NF */ double BJTtemissionCoeffR; /* temperature adjusted NR */ double BJTtleakBEemissionCoeff; /* temperature adjusted NE */ double BJTtleakBCemissionCoeff; /* temperature adjusted NC */ double BJTttransitTimeHighCurrentF; /* temperature adjusted */ double BJTttransitTimeF; /* temperature adjusted */ double BJTttransitTimeR; /* temperature adjusted */ double BJTtjunctionExpBE; /* temperature adjusted MJE */ double BJTtjunctionExpBC; /* temperature adjusted MJC */ double BJTtjunctionExpSub; /* temperature adjusted MJS */ double BJTtemissionCoeffS; /* temperature adjusted NS */ double *BJTcolColPrimePtr; /* pointer to sparse matrix at * (collector,collector prime) */ double *BJTbaseBasePrimePtr; /* pointer to sparse matrix at * (base,base prime) */ double *BJTemitEmitPrimePtr; /* pointer to sparse matrix at * (emitter,emitter prime) */ double *BJTcolPrimeColPtr; /* pointer to sparse matrix at * (collector prime,collector) */ double *BJTcolPrimeBasePrimePtr; /* pointer to sparse matrix at * (collector prime,base prime) */ double *BJTcolPrimeEmitPrimePtr; /* pointer to sparse matrix at * (collector prime,emitter prime) */ double *BJTbasePrimeBasePtr; /* pointer to sparse matrix at * (base prime,base ) */ double *BJTbasePrimeColPrimePtr; /* pointer to sparse matrix at * (base prime,collector prime) */ double *BJTbasePrimeEmitPrimePtr; /* pointer to sparse matrix at * (base primt,emitter prime) */ double *BJTemitPrimeEmitPtr; /* pointer to sparse matrix at * (emitter prime,emitter) */ double *BJTemitPrimeColPrimePtr; /* pointer to sparse matrix at * (emitter prime,collector prime) */ double *BJTemitPrimeBasePrimePtr; /* pointer to sparse matrix at * (emitter prime,base prime) */ double *BJTcolColPtr; /* pointer to sparse matrix at * (collector,collector) */ double *BJTbaseBasePtr; /* pointer to sparse matrix at * (base,base) */ double *BJTemitEmitPtr; /* pointer to sparse matrix at * (emitter,emitter) */ double *BJTcolPrimeColPrimePtr; /* pointer to sparse matrix at * (collector prime,collector prime) */ double *BJTbasePrimeBasePrimePtr; /* pointer to sparse matrix at * (base prime,base prime) */ double *BJTemitPrimeEmitPrimePtr; /* pointer to sparse matrix at * (emitter prime,emitter prime) */ double *BJTsubstSubstPtr; /* pointer to sparse matrix at * (substrate,substrate) */ double *BJTsubstConSubstPtr; /* pointer to sparse matrix at * (Substrate connection, substrate) */ double *BJTsubstSubstConPtr; /* pointer to sparse matrix at * (substrate, Substrate connection) */ double *BJTsubstConSubstConPtr; /* pointer to sparse matrix at * (Substrate connection, Substrate connection) */ /* Substrate connection is either base prime * * or collector prime depending on whether * * the device is VERTICAL or LATERAL */ double *BJTbaseColPrimePtr; /* pointer to sparse matrix at * (base,collector prime) */ double *BJTcolPrimeBasePtr; /* pointer to sparse matrix at * (collector prime,base) */ unsigned BJToff :1; /* 'off' flag for bjt */ unsigned BJTtempGiven :1; /* temperature given for bjt instance*/ unsigned BJTdtempGiven :1; /* delta temperature given for bjt instance*/ unsigned BJTareaGiven :1; /* flag to indicate area was specified */ unsigned BJTareabGiven :1; /* flag to indicate base area was specified */ unsigned BJTareacGiven :1; /* flag to indicate collector area was specified */ unsigned BJTmGiven :1; /* flag to indicate m parameter specified */ unsigned BJTicVBEGiven :1; /* flag to indicate VBE init. cond. given */ unsigned BJTicVCEGiven :1; /* flag to indicate VCE init. cond. given */ unsigned BJTsenPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ int BJTsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ double BJTcapbe; double BJTcapbc; double BJTcapsub; double BJTcapbx; double *BJTsens; #define BJTsenGpi BJTsens /* stores the perturbed values of gpi */ #define BJTsenGmu BJTsens+5 /* stores the perturbed values of gmu */ #define BJTsenGm BJTsens+10 /* stores the perturbed values of gm */ #define BJTsenGo BJTsens+15 /* stores the perturbed values of go */ #define BJTsenGx BJTsens+20 /* stores the perturbed values of gx */ #define BJTsenCpi BJTsens+25 /* stores the perturbed values of cpi */ #define BJTsenCmu BJTsens+30 /* stores the perturbed values of cmu */ #define BJTsenCbx BJTsens+35 /* stores the perturbed values of cbx */ #define BJTsenCmcb BJTsens+40 /* stores the perturbed values of cmcb */ #define BJTsenCsub BJTsens+45 /* stores the perturbed values of csub */ #define BJTdphibedp BJTsens+51 #define BJTdphibcdp BJTsens+52 #define BJTdphisubdp BJTsens+53 #define BJTdphibxdp BJTsens+54 /* * distortion stuff * the following naming convention is used: * x = vbe * y = vbc * z = vbb * w = vbed (vbe delayed for the linear gm delay) * therefore ic_xyz stands for the coefficient of the vbe*vbc*vbb * term in the multidimensional Taylor expansion for ic; and ibb_x2y * for the coeff. of the vbe*vbe*vbc term in the ibb expansion. */ #define BJTNDCOEFFS 65 #ifndef NODISTO double BJTdCoeffs[BJTNDCOEFFS]; #else /* NODISTO */ double *BJTdCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define ic_x BJTdCoeffs[0] #define ic_y BJTdCoeffs[1] #define ic_xd BJTdCoeffs[2] #define ic_x2 BJTdCoeffs[3] #define ic_y2 BJTdCoeffs[4] #define ic_w2 BJTdCoeffs[5] #define ic_xy BJTdCoeffs[6] #define ic_yw BJTdCoeffs[7] #define ic_xw BJTdCoeffs[8] #define ic_x3 BJTdCoeffs[9] #define ic_y3 BJTdCoeffs[10] #define ic_w3 BJTdCoeffs[11] #define ic_x2w BJTdCoeffs[12] #define ic_x2y BJTdCoeffs[13] #define ic_y2w BJTdCoeffs[14] #define ic_xy2 BJTdCoeffs[15] #define ic_xw2 BJTdCoeffs[16] #define ic_yw2 BJTdCoeffs[17] #define ic_xyw BJTdCoeffs[18] #define ib_x BJTdCoeffs[19] #define ib_y BJTdCoeffs[20] #define ib_x2 BJTdCoeffs[21] #define ib_y2 BJTdCoeffs[22] #define ib_xy BJTdCoeffs[23] #define ib_x3 BJTdCoeffs[24] #define ib_y3 BJTdCoeffs[25] #define ib_x2y BJTdCoeffs[26] #define ib_xy2 BJTdCoeffs[27] #define ibb_x BJTdCoeffs[28] #define ibb_y BJTdCoeffs[29] #define ibb_z BJTdCoeffs[30] #define ibb_x2 BJTdCoeffs[31] #define ibb_y2 BJTdCoeffs[32] #define ibb_z2 BJTdCoeffs[33] #define ibb_xy BJTdCoeffs[34] #define ibb_yz BJTdCoeffs[35] #define ibb_xz BJTdCoeffs[36] #define ibb_x3 BJTdCoeffs[37] #define ibb_y3 BJTdCoeffs[38] #define ibb_z3 BJTdCoeffs[39] #define ibb_x2z BJTdCoeffs[40] #define ibb_x2y BJTdCoeffs[41] #define ibb_y2z BJTdCoeffs[42] #define ibb_xy2 BJTdCoeffs[43] #define ibb_xz2 BJTdCoeffs[44] #define ibb_yz2 BJTdCoeffs[45] #define ibb_xyz BJTdCoeffs[46] #define qbe_x BJTdCoeffs[47] #define qbe_y BJTdCoeffs[48] #define qbe_x2 BJTdCoeffs[49] #define qbe_y2 BJTdCoeffs[50] #define qbe_xy BJTdCoeffs[51] #define qbe_x3 BJTdCoeffs[52] #define qbe_y3 BJTdCoeffs[53] #define qbe_x2y BJTdCoeffs[54] #define qbe_xy2 BJTdCoeffs[55] #define capbc1 BJTdCoeffs[56] #define capbc2 BJTdCoeffs[57] #define capbc3 BJTdCoeffs[58] #define capbx1 BJTdCoeffs[59] #define capbx2 BJTdCoeffs[60] #define capbx3 BJTdCoeffs[61] #define capsc1 BJTdCoeffs[62] #define capsc2 BJTdCoeffs[63] #define capsc3 BJTdCoeffs[64] #endif /* indices to array of BJT noise sources */ #define BJTRCNOIZ 0 #define BJTRBNOIZ 1 #define BJT_RE_NOISE 2 #define BJTICNOIZ 3 #define BJTIBNOIZ 4 #define BJTFLNOIZ 5 #define BJTTOTNOIZ 6 #define BJTNSRCS 7 /* the number of BJT noise sources */ #ifndef NONOISE double BJTnVar[NSTATVARS][BJTNSRCS]; #else /*NONOISE*/ double **BJTnVar; #endif /*NONOISE*/ /* the above to avoid allocating memory when it is not needed */ } BJTinstance ; /* entries in the state vector for bjt: */ #define BJTvbe BJTstate #define BJTvbc BJTstate+1 #define BJTcc BJTstate+2 #define BJTcb BJTstate+3 #define BJTgpi BJTstate+4 #define BJTgmu BJTstate+5 #define BJTgm BJTstate+6 #define BJTgo BJTstate+7 #define BJTqbe BJTstate+8 #define BJTcqbe BJTstate+9 #define BJTqbc BJTstate+10 #define BJTcqbc BJTstate+11 #define BJTqsub BJTstate+12 #define BJTcqsub BJTstate+13 #define BJTqbx BJTstate+14 #define BJTcqbx BJTstate+15 #define BJTgx BJTstate+16 #define BJTcexbc BJTstate+17 #define BJTgeqcb BJTstate+18 #define BJTgcsub BJTstate+19 #define BJTgeqbx BJTstate+20 #define BJTvsub BJTstate+21 #define BJTcdsub BJTstate+22 #define BJTgdsub BJTstate+23 #define BJTnumStates 24 #define BJTsensxpbe BJTstate+24 /* charge sensitivities and their derivatives. +25 for the derivatives - pointer to the beginning of the array */ #define BJTsensxpbc BJTstate+26 #define BJTsensxpsub BJTstate+28 #define BJTsensxpbx BJTstate+30 #define BJTnumSenStates 8 /* per model data */ typedef struct sBJTmodel { /* model structure for a bjt */ int BJTmodType; /* type index of this device type */ struct sBJTmodel *BJTnextModel; /* pointer to next possible model in * linked list */ BJTinstance * BJTinstances; /* pointer to list of instances * that have this model */ IFuid BJTmodName; /* pointer to character string naming this model */ int BJTtype; int BJTsubs; double BJTtnom; /* nominal temperature */ double BJTsatCur; /* input - don't use */ double BJTbetaF; /* input - don't use */ double BJTemissionCoeffF; double BJTearlyVoltF; double BJTrollOffF; double BJTleakBEcurrent; /* input - don't use */ double BJTc2; double BJTleakBEemissionCoeff; double BJTbetaR; /* input - don't use */ double BJTemissionCoeffR; double BJTearlyVoltR; double BJTrollOffR; double BJTleakBCcurrent; /* input - don't use */ double BJTc4; double BJTleakBCemissionCoeff; double BJTbaseResist; double BJTbaseCurrentHalfResist; double BJTminBaseResist; double BJTemitterResist; double BJTcollectorResist; double BJTdepletionCapBE; /* input - don't use */ double BJTpotentialBE; /* input - don't use */ double BJTjunctionExpBE; double BJTtransitTimeF; double BJTtransitTimeBiasCoeffF; double BJTtransitTimeFVBC; double BJTtransitTimeHighCurrentF; double BJTexcessPhase; double BJTdepletionCapBC; /* input - don't use */ double BJTpotentialBC; /* input - don't use */ double BJTjunctionExpBC; double BJTbaseFractionBCcap; double BJTtransitTimeR; double BJTcapSub; double BJTpotentialSubstrate; double BJTexponentialSubstrate; double BJTbetaExp; double BJTenergyGap; double BJTtempExpIS; double BJTdepletionCapCoeff; double BJTfNcoef; double BJTfNexp; double BJTsubSatCur; /* input - don't use */ double BJTemissionCoeffS; int BJTtlev; int BJTtlevc; double BJTtbf1; double BJTtbf2; double BJTtbr1; double BJTtbr2; double BJTtikf1; double BJTtikf2; double BJTtikr1; double BJTtikr2; double BJTtirb1; double BJTtirb2; double BJTtnc1; double BJTtnc2; double BJTtne1; double BJTtne2; double BJTtnf1; double BJTtnf2; double BJTtnr1; double BJTtnr2; double BJTtrb1; double BJTtrb2; double BJTtrc1; double BJTtrc2; double BJTtre1; double BJTtre2; double BJTtrm1; double BJTtrm2; double BJTtvaf1; double BJTtvaf2; double BJTtvar1; double BJTtvar2; double BJTctc; double BJTcte; double BJTcts; double BJTtvjc; double BJTtvje; double BJTtvjs; double BJTtitf1; double BJTtitf2; double BJTttf1; double BJTttf2; double BJTttr1; double BJTttr2; double BJTtmje1; double BJTtmje2; double BJTtmjc1; double BJTtmjc2; double BJTtmjs1; double BJTtmjs2; double BJTtns1; double BJTtns2; double BJTnkf; double BJTinvEarlyVoltF; /* inverse of BJTearlyVoltF */ double BJTinvEarlyVoltR; /* inverse of BJTearlyVoltR */ double BJTinvRollOffF; /* inverse of BJTrollOffF */ double BJTinvRollOffR; /* inverse of BJTrollOffR */ double BJTcollectorConduct; /* collector conductance */ double BJTemitterConduct; /* emitter conductance */ double BJTtransitTimeVBCFactor; /* */ double BJTexcessPhaseFactor; double BJTf2; double BJTf3; double BJTf6; double BJTf7; double BJTtis1; double BJTtis2; double BJTtise1; double BJTtise2; double BJTtisc1; double BJTtisc2; double BJTvbeMax; /* maximum voltage over B-E junction */ double BJTvbcMax; /* maximum voltage over B-C junction */ double BJTvceMax; /* maximum voltage over C-E branch */ unsigned BJTsubsGiven : 1; unsigned BJTtnomGiven : 1; unsigned BJTsatCurGiven : 1; unsigned BJTbetaFGiven : 1; unsigned BJTemissionCoeffFGiven : 1; unsigned BJTearlyVoltFGiven : 1; unsigned BJTrollOffFGiven : 1; unsigned BJTleakBEcurrentGiven : 1; unsigned BJTc2Given : 1; unsigned BJTleakBEemissionCoeffGiven : 1; unsigned BJTbetaRGiven : 1; unsigned BJTemissionCoeffRGiven : 1; unsigned BJTearlyVoltRGiven : 1; unsigned BJTrollOffRGiven : 1; unsigned BJTleakBCcurrentGiven : 1; unsigned BJTc4Given : 1; unsigned BJTleakBCemissionCoeffGiven : 1; unsigned BJTbaseResistGiven : 1; unsigned BJTbaseCurrentHalfResistGiven : 1; unsigned BJTminBaseResistGiven : 1; unsigned BJTemitterResistGiven : 1; unsigned BJTcollectorResistGiven : 1; unsigned BJTdepletionCapBEGiven : 1; unsigned BJTpotentialBEGiven : 1; unsigned BJTjunctionExpBEGiven : 1; unsigned BJTtransitTimeFGiven : 1; unsigned BJTtransitTimeBiasCoeffFGiven : 1; unsigned BJTtransitTimeFVBCGiven : 1; unsigned BJTtransitTimeHighCurrentFGiven : 1; unsigned BJTexcessPhaseGiven : 1; unsigned BJTdepletionCapBCGiven : 1; unsigned BJTpotentialBCGiven : 1; unsigned BJTjunctionExpBCGiven : 1; unsigned BJTbaseFractionBCcapGiven : 1; unsigned BJTtransitTimeRGiven : 1; unsigned BJTcapSubGiven : 1; unsigned BJTpotentialSubstrateGiven : 1; unsigned BJTexponentialSubstrateGiven : 1; unsigned BJTbetaExpGiven : 1; unsigned BJTenergyGapGiven : 1; unsigned BJTtempExpISGiven : 1; unsigned BJTdepletionCapCoeffGiven : 1; unsigned BJTfNcoefGiven : 1; unsigned BJTfNexpGiven :1; unsigned BJTsubSatCurGiven : 1; unsigned BJTemissionCoeffSGiven : 1; unsigned BJTtlevGiven : 1; unsigned BJTtlevcGiven : 1; unsigned BJTtbf1Given : 1; unsigned BJTtbf2Given : 1; unsigned BJTtbr1Given : 1; unsigned BJTtbr2Given : 1; unsigned BJTtikf1Given : 1; unsigned BJTtikf2Given : 1; unsigned BJTtikr1Given : 1; unsigned BJTtikr2Given : 1; unsigned BJTtirb1Given : 1; unsigned BJTtirb2Given : 1; unsigned BJTtnc1Given : 1; unsigned BJTtnc2Given : 1; unsigned BJTtne1Given : 1; unsigned BJTtne2Given : 1; unsigned BJTtnf1Given : 1; unsigned BJTtnf2Given : 1; unsigned BJTtnr1Given : 1; unsigned BJTtnr2Given : 1; unsigned BJTtrb1Given : 1; unsigned BJTtrb2Given : 1; unsigned BJTtrc1Given : 1; unsigned BJTtrc2Given : 1; unsigned BJTtre1Given : 1; unsigned BJTtre2Given : 1; unsigned BJTtrm1Given : 1; unsigned BJTtrm2Given : 1; unsigned BJTtvaf1Given : 1; unsigned BJTtvaf2Given : 1; unsigned BJTtvar1Given : 1; unsigned BJTtvar2Given : 1; unsigned BJTctcGiven : 1; unsigned BJTcteGiven : 1; unsigned BJTctsGiven : 1; unsigned BJTtvjcGiven : 1; unsigned BJTtvjeGiven : 1; unsigned BJTtvjsGiven : 1; unsigned BJTtitf1Given : 1; unsigned BJTtitf2Given : 1; unsigned BJTttf1Given : 1; unsigned BJTttf2Given : 1; unsigned BJTttr1Given : 1; unsigned BJTttr2Given : 1; unsigned BJTtmje1Given : 1; unsigned BJTtmje2Given : 1; unsigned BJTtmjc1Given : 1; unsigned BJTtmjc2Given : 1; unsigned BJTtmjs1Given : 1; unsigned BJTtmjs2Given : 1; unsigned BJTtns1Given : 1; unsigned BJTtns2Given : 1; unsigned BJTnkfGiven : 1; unsigned BJTtis1Given : 1; unsigned BJTtis2Given : 1; unsigned BJTtise1Given : 1; unsigned BJTtise2Given : 1; unsigned BJTtisc1Given : 1; unsigned BJTtisc2Given : 1; unsigned BJTvbeMaxGiven : 1; unsigned BJTvbcMaxGiven : 1; unsigned BJTvceMaxGiven : 1; } BJTmodel; #ifndef NPN #define NPN 1 #define PNP -1 #endif /*NPN*/ /* * BJT defaults to vertical for both NPN and * PNP devices. */ #ifndef VERTICAL #define VERTICAL 1 #define LATERAL -1 #endif /* VERTICAL */ /* device parameters */ #define BJT_AREA 1 #define BJT_OFF 2 #define BJT_IC_VBE 3 #define BJT_IC_VCE 4 #define BJT_IC 5 #define BJT_AREA_SENS 6 #define BJT_TEMP 7 #define BJT_DTEMP 8 #define BJT_M 9 #define BJT_AREAB 10 #define BJT_AREAC 11 /* model parameters */ #define BJT_MOD_NPN 101 #define BJT_MOD_PNP 102 #define BJT_MOD_IS 103 #define BJT_MOD_BF 104 #define BJT_MOD_NF 105 #define BJT_MOD_VAF 106 #define BJT_MOD_IKF 107 #define BJT_MOD_ISE 108 #define BJT_MOD_C2 109 #define BJT_MOD_NE 110 #define BJT_MOD_BR 111 #define BJT_MOD_NR 112 #define BJT_MOD_VAR 113 #define BJT_MOD_IKR 114 #define BJT_MOD_ISC 115 #define BJT_MOD_C4 116 #define BJT_MOD_NC 117 #define BJT_MOD_RB 118 #define BJT_MOD_IRB 119 #define BJT_MOD_RBM 120 #define BJT_MOD_RE 121 #define BJT_MOD_RC 122 #define BJT_MOD_CJE 123 #define BJT_MOD_VJE 124 #define BJT_MOD_MJE 125 #define BJT_MOD_TF 126 #define BJT_MOD_XTF 127 #define BJT_MOD_VTF 128 #define BJT_MOD_ITF 129 #define BJT_MOD_PTF 130 #define BJT_MOD_CJC 131 #define BJT_MOD_VJC 132 #define BJT_MOD_MJC 133 #define BJT_MOD_XCJC 134 #define BJT_MOD_TR 135 #define BJT_MOD_CJS 136 #define BJT_MOD_VJS 137 #define BJT_MOD_MJS 138 #define BJT_MOD_XTB 139 #define BJT_MOD_EG 140 #define BJT_MOD_XTI 141 #define BJT_MOD_FC 142 #define BJT_MOD_AF 143 #define BJT_MOD_KF 144 #define BJT_MOD_ISS 145 #define BJT_MOD_NS 146 #define BJT_MOD_TNOM 147 #define BJT_MOD_TLEV 148 #define BJT_MOD_TLEVC 149 #define BJT_MOD_TBF1 150 #define BJT_MOD_TBF2 151 #define BJT_MOD_TBR1 152 #define BJT_MOD_TBR2 153 #define BJT_MOD_TIKF1 154 #define BJT_MOD_TIKF2 155 #define BJT_MOD_TIKR1 156 #define BJT_MOD_TIKR2 157 #define BJT_MOD_TIRB1 158 #define BJT_MOD_TIRB2 159 #define BJT_MOD_TNC1 160 #define BJT_MOD_TNC2 161 #define BJT_MOD_TNE1 162 #define BJT_MOD_TNE2 163 #define BJT_MOD_TNF1 164 #define BJT_MOD_TNF2 165 #define BJT_MOD_TNR1 166 #define BJT_MOD_TNR2 167 #define BJT_MOD_TRB1 168 #define BJT_MOD_TRB2 169 #define BJT_MOD_TRC1 170 #define BJT_MOD_TRC2 171 #define BJT_MOD_TRE1 172 #define BJT_MOD_TRE2 173 #define BJT_MOD_TRM1 174 #define BJT_MOD_TRM2 175 #define BJT_MOD_TVAF1 176 #define BJT_MOD_TVAF2 177 #define BJT_MOD_TVAR1 178 #define BJT_MOD_TVAR2 179 #define BJT_MOD_CTC 180 #define BJT_MOD_CTE 181 #define BJT_MOD_CTS 182 #define BJT_MOD_TVJC 183 #define BJT_MOD_TVJE 184 #define BJT_MOD_TVJS 185 #define BJT_MOD_TITF1 186 #define BJT_MOD_TITF2 187 #define BJT_MOD_TTF1 188 #define BJT_MOD_TTF2 189 #define BJT_MOD_TTR1 190 #define BJT_MOD_TTR2 191 #define BJT_MOD_TMJE1 192 #define BJT_MOD_TMJE2 193 #define BJT_MOD_TMJC1 194 #define BJT_MOD_TMJC2 195 #define BJT_MOD_TMJS1 196 #define BJT_MOD_TMJS2 197 #define BJT_MOD_TNS1 198 #define BJT_MOD_TNS2 199 #define BJT_MOD_SUBS 200 #define BJT_MOD_NKF 201 #define BJT_MOD_TIS1 202 #define BJT_MOD_TIS2 203 #define BJT_MOD_TISE1 204 #define BJT_MOD_TISE2 205 #define BJT_MOD_TISC1 206 #define BJT_MOD_TISC2 207 #define BJT_MOD_VBE_MAX 208 #define BJT_MOD_VBC_MAX 209 #define BJT_MOD_VCE_MAX 210 /* device questions */ #define BJT_QUEST_FT 211 #define BJT_QUEST_COLNODE 212 #define BJT_QUEST_BASENODE 213 #define BJT_QUEST_EMITNODE 214 #define BJT_QUEST_SUBSTNODE 215 #define BJT_QUEST_COLPRIMENODE 216 #define BJT_QUEST_BASEPRIMENODE 217 #define BJT_QUEST_EMITPRIMENODE 218 #define BJT_QUEST_VBE 219 #define BJT_QUEST_VBC 220 #define BJT_QUEST_CC 221 #define BJT_QUEST_CB 222 #define BJT_QUEST_GPI 223 #define BJT_QUEST_GMU 224 #define BJT_QUEST_GM 225 #define BJT_QUEST_GO 226 #define BJT_QUEST_QBE 227 #define BJT_QUEST_CQBE 228 #define BJT_QUEST_QBC 229 #define BJT_QUEST_CQBC 230 #define BJT_QUEST_QSUB 231 #define BJT_QUEST_CQSUB 232 #define BJT_QUEST_QBX 233 #define BJT_QUEST_CQBX 234 #define BJT_QUEST_GX 235 #define BJT_QUEST_CEXBC 236 #define BJT_QUEST_GEQCB 237 #define BJT_QUEST_GCSUB 238 #define BJT_QUEST_GEQBX 239 #define BJT_QUEST_SENS_REAL 240 #define BJT_QUEST_SENS_IMAG 241 #define BJT_QUEST_SENS_MAG 242 #define BJT_QUEST_SENS_PH 243 #define BJT_QUEST_SENS_CPLX 244 #define BJT_QUEST_SENS_DC 245 #define BJT_QUEST_CE 246 #define BJT_QUEST_CS 247 #define BJT_QUEST_POWER 248 #define BJT_QUEST_CPI 249 #define BJT_QUEST_CMU 250 #define BJT_QUEST_CBX 251 #define BJT_QUEST_CSUB 252 #define BJT_QUEST_GDSUB 253 /* model questions */ #define BJT_MOD_INVEARLYF 301 #define BJT_MOD_INVEARLYR 302 #define BJT_MOD_INVROLLOFFF 303 #define BJT_MOD_INVROLLOFFR 304 #define BJT_MOD_COLCONDUCT 305 #define BJT_MOD_EMITTERCONDUCT 306 #define BJT_MOD_TRANSVBCFACT 307 #define BJT_MOD_EXCESSPHASEFACTOR 308 #define BJT_MOD_TYPE 309 #define BJT_MOD_QUEST_SUBS 310 #include "bjtext.h" #endif /*BJT*/ ngspice-26/src/spicelib/devices/mos1/0000755000265600020320000000000012264261710017105 5ustar andreasadminngspice-26/src/spicelib/devices/mos1/mos1pzld.c0000644000265600020320000001205412264261473021032 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MOS1model *model = (MOS1model*)inModel; MOS1instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; for( ; model != NULL; model = model->MOS1nextModel) { for(here = model->MOS1instances; here!= NULL; here = here->MOS1nextInstance) { if (here->MOS1mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveLength=here->MOS1l - 2*model->MOS1latDiff; GateSourceOverlapCap = model->MOS1gateSourceOverlapCapFactor * here->MOS1m * here->MOS1w; GateDrainOverlapCap = model->MOS1gateDrainOverlapCapFactor * here->MOS1m * here->MOS1w; GateBulkOverlapCap = model->MOS1gateBulkOverlapCapFactor * here->MOS1m * EffectiveLength; capgs = ( 2* *(ckt->CKTstate0+here->MOS1capgs)+ GateSourceOverlapCap ); capgd = ( 2* *(ckt->CKTstate0+here->MOS1capgd)+ GateDrainOverlapCap ); capgb = ( 2* *(ckt->CKTstate0+here->MOS1capgb)+ GateBulkOverlapCap ); xgs = capgs; xgd = capgd; xgb = capgb; xbd = here->MOS1capbd; xbs = here->MOS1capbs; /*printf("mos1: xgs=%g, xgd=%g, xgb=%g, xbd=%g, xbs=%g\n", xgs,xgd,xgb,xbd,xbs);*/ /* * load matrix */ *(here->MOS1GgPtr ) += (xgd+xgs+xgb)*s->real; *(here->MOS1GgPtr +1) += (xgd+xgs+xgb)*s->imag; *(here->MOS1BbPtr ) += (xgb+xbd+xbs)*s->real; *(here->MOS1BbPtr +1) += (xgb+xbd+xbs)*s->imag; *(here->MOS1DPdpPtr ) += (xgd+xbd)*s->real; *(here->MOS1DPdpPtr +1) += (xgd+xbd)*s->imag; *(here->MOS1SPspPtr ) += (xgs+xbs)*s->real; *(here->MOS1SPspPtr +1) += (xgs+xbs)*s->imag; *(here->MOS1GbPtr ) -= xgb*s->real; *(here->MOS1GbPtr +1) -= xgb*s->imag; *(here->MOS1GdpPtr ) -= xgd*s->real; *(here->MOS1GdpPtr +1) -= xgd*s->imag; *(here->MOS1GspPtr ) -= xgs*s->real; *(here->MOS1GspPtr +1) -= xgs*s->imag; *(here->MOS1BgPtr ) -= xgb*s->real; *(here->MOS1BgPtr +1) -= xgb*s->imag; *(here->MOS1BdpPtr ) -= xbd*s->real; *(here->MOS1BdpPtr +1) -= xbd*s->imag; *(here->MOS1BspPtr ) -= xbs*s->real; *(here->MOS1BspPtr +1) -= xbs*s->imag; *(here->MOS1DPgPtr ) -= xgd*s->real; *(here->MOS1DPgPtr +1) -= xgd*s->imag; *(here->MOS1DPbPtr ) -= xbd*s->real; *(here->MOS1DPbPtr +1) -= xbd*s->imag; *(here->MOS1SPgPtr ) -= xgs*s->real; *(here->MOS1SPgPtr +1) -= xgs*s->imag; *(here->MOS1SPbPtr ) -= xbs*s->real; *(here->MOS1SPbPtr +1) -= xbs*s->imag; *(here->MOS1DdPtr) += here->MOS1drainConductance; *(here->MOS1SsPtr) += here->MOS1sourceConductance; *(here->MOS1BbPtr) += here->MOS1gbd+here->MOS1gbs; *(here->MOS1DPdpPtr) += here->MOS1drainConductance+ here->MOS1gds+here->MOS1gbd+ xrev*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1SPspPtr) += here->MOS1sourceConductance+ here->MOS1gds+here->MOS1gbs+ xnrm*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1DdpPtr) -= here->MOS1drainConductance; *(here->MOS1SspPtr) -= here->MOS1sourceConductance; *(here->MOS1BdpPtr) -= here->MOS1gbd; *(here->MOS1BspPtr) -= here->MOS1gbs; *(here->MOS1DPdPtr) -= here->MOS1drainConductance; *(here->MOS1DPgPtr) += (xnrm-xrev)*here->MOS1gm; *(here->MOS1DPbPtr) += -here->MOS1gbd+(xnrm-xrev)*here->MOS1gmbs; *(here->MOS1DPspPtr) -= here->MOS1gds+ xnrm*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1SPgPtr) -= (xnrm-xrev)*here->MOS1gm; *(here->MOS1SPsPtr) -= here->MOS1sourceConductance; *(here->MOS1SPbPtr) -= here->MOS1gbs+(xnrm-xrev)*here->MOS1gmbs; *(here->MOS1SPdpPtr) -= here->MOS1gds+ xrev*(here->MOS1gm+here->MOS1gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1ic.c0000644000265600020320000000245312264261473020456 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1getic(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MOS1nextModel) { for(here = model->MOS1instances; here ; here = here->MOS1nextInstance) { if(!here->MOS1icVBSGiven) { here->MOS1icVBS = *(ckt->CKTrhs + here->MOS1bNode) - *(ckt->CKTrhs + here->MOS1sNode); } if(!here->MOS1icVDSGiven) { here->MOS1icVDS = *(ckt->CKTrhs + here->MOS1dNode) - *(ckt->CKTrhs + here->MOS1sNode); } if(!here->MOS1icVGSGiven) { here->MOS1icVGS = *(ckt->CKTrhs + here->MOS1gNode) - *(ckt->CKTrhs + here->MOS1sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1init.c0000644000265600020320000000417512264261473021031 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mos1itf.h" #include "mos1ext.h" #include "mos1init.h" SPICEdev MOS1info = { { "Mos1", "Level 1 MOSfet model with Meyer capacitance model", &MOS1nSize, &MOS1nSize, MOS1names, &MOS1pTSize, MOS1pTable, &MOS1mPTSize, MOS1mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MOS1param, /* DEVmodParam */ MOS1mParam, /* DEVload */ MOS1load, /* DEVsetup */ MOS1setup, /* DEVunsetup */ MOS1unsetup, /* DEVpzSetup */ MOS1setup, /* DEVtemperature*/ MOS1temp, /* DEVtrunc */ MOS1trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MOS1acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MOS1destroy, /* DEVmodDelete */ MOS1mDelete, /* DEVdelete */ MOS1delete, /* DEVsetic */ MOS1getic, /* DEVask */ MOS1ask, /* DEVmodAsk */ MOS1mAsk, /* DEVpzLoad */ MOS1pzLoad, /* DEVconvTest */ MOS1convTest, /* DEVsenSetup */ MOS1sSetup, /* DEVsenLoad */ MOS1sLoad, /* DEVsenUpdate */ MOS1sUpdate, /* DEVsenAcLoad */ MOS1sAcLoad, /* DEVsenPrint */ MOS1sPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ MOS1disto, /* DEVnoise */ MOS1noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MOS1iSize, /* DEVmodSize */ &MOS1mSize }; SPICEdev * get_mos1_info(void) { return &MOS1info; } ngspice-26/src/spicelib/devices/mos1/mos1mpar.c0000644000265600020320000001226112264261473021020 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1mParam(int param, IFvalue *value, GENmodel *inModel) { MOS1model *model = (MOS1model *)inModel; switch(param) { case MOS1_MOD_TNOM: model->MOS1tnom = value->rValue + CONSTCtoK; model->MOS1tnomGiven = TRUE; break; case MOS1_MOD_VTO: model->MOS1vt0 = value->rValue; model->MOS1vt0Given = TRUE; break; case MOS1_MOD_KP: model->MOS1transconductance = value->rValue; model->MOS1transconductanceGiven = TRUE; break; case MOS1_MOD_GAMMA: model->MOS1gamma = value->rValue; model->MOS1gammaGiven = TRUE; break; case MOS1_MOD_PHI: model->MOS1phi = value->rValue; model->MOS1phiGiven = TRUE; break; case MOS1_MOD_LAMBDA: model->MOS1lambda = value->rValue; model->MOS1lambdaGiven = TRUE; break; case MOS1_MOD_RD: model->MOS1drainResistance = value->rValue; model->MOS1drainResistanceGiven = TRUE; break; case MOS1_MOD_RS: model->MOS1sourceResistance = value->rValue; model->MOS1sourceResistanceGiven = TRUE; break; case MOS1_MOD_CBD: model->MOS1capBD = value->rValue; model->MOS1capBDGiven = TRUE; break; case MOS1_MOD_CBS: model->MOS1capBS = value->rValue; model->MOS1capBSGiven = TRUE; break; case MOS1_MOD_IS: model->MOS1jctSatCur = value->rValue; model->MOS1jctSatCurGiven = TRUE; break; case MOS1_MOD_PB: model->MOS1bulkJctPotential = value->rValue; model->MOS1bulkJctPotentialGiven = TRUE; break; case MOS1_MOD_CGSO: model->MOS1gateSourceOverlapCapFactor = value->rValue; model->MOS1gateSourceOverlapCapFactorGiven = TRUE; break; case MOS1_MOD_CGDO: model->MOS1gateDrainOverlapCapFactor = value->rValue; model->MOS1gateDrainOverlapCapFactorGiven = TRUE; break; case MOS1_MOD_CGBO: model->MOS1gateBulkOverlapCapFactor = value->rValue; model->MOS1gateBulkOverlapCapFactorGiven = TRUE; break; case MOS1_MOD_CJ: model->MOS1bulkCapFactor = value->rValue; model->MOS1bulkCapFactorGiven = TRUE; break; case MOS1_MOD_MJ: model->MOS1bulkJctBotGradingCoeff = value->rValue; model->MOS1bulkJctBotGradingCoeffGiven = TRUE; break; case MOS1_MOD_CJSW: model->MOS1sideWallCapFactor = value->rValue; model->MOS1sideWallCapFactorGiven = TRUE; break; case MOS1_MOD_MJSW: model->MOS1bulkJctSideGradingCoeff = value->rValue; model->MOS1bulkJctSideGradingCoeffGiven = TRUE; break; case MOS1_MOD_JS: model->MOS1jctSatCurDensity = value->rValue; model->MOS1jctSatCurDensityGiven = TRUE; break; case MOS1_MOD_TOX: model->MOS1oxideThickness = value->rValue; model->MOS1oxideThicknessGiven = TRUE; break; case MOS1_MOD_LD: model->MOS1latDiff = value->rValue; model->MOS1latDiffGiven = TRUE; break; case MOS1_MOD_RSH: model->MOS1sheetResistance = value->rValue; model->MOS1sheetResistanceGiven = TRUE; break; case MOS1_MOD_U0: model->MOS1surfaceMobility = value->rValue; model->MOS1surfaceMobilityGiven = TRUE; break; case MOS1_MOD_FC: model->MOS1fwdCapDepCoeff = value->rValue; model->MOS1fwdCapDepCoeffGiven = TRUE; break; case MOS1_MOD_NSS: model->MOS1surfaceStateDensity = value->rValue; model->MOS1surfaceStateDensityGiven = TRUE; break; case MOS1_MOD_NSUB: model->MOS1substrateDoping = value->rValue; model->MOS1substrateDopingGiven = TRUE; break; case MOS1_MOD_TPG: model->MOS1gateType = value->iValue; model->MOS1gateTypeGiven = TRUE; break; case MOS1_MOD_NMOS: if(value->iValue) { model->MOS1type = 1; model->MOS1typeGiven = TRUE; } break; case MOS1_MOD_PMOS: if(value->iValue) { model->MOS1type = -1; model->MOS1typeGiven = TRUE; } break; case MOS1_MOD_KF: model->MOS1fNcoef = value->rValue; model->MOS1fNcoefGiven = TRUE; break; case MOS1_MOD_AF: model->MOS1fNexp = value->rValue; model->MOS1fNexpGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1.c0000644000265600020320000002220112264261473020133 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mos1defs.h" #include "ngspice/suffix.h" IFparm MOS1pTable[] = { /* parameters */ IOPU("m", MOS1_M, IF_REAL , "Multiplier"), IOPU("l", MOS1_L, IF_REAL , "Length"), IOPU("w", MOS1_W, IF_REAL , "Width"), IOPU("ad", MOS1_AD, IF_REAL , "Drain area"), IOPU("as", MOS1_AS, IF_REAL , "Source area"), IOPU("pd", MOS1_PD, IF_REAL , "Drain perimeter"), IOPU("ps", MOS1_PS, IF_REAL , "Source perimeter"), IOPU("nrd", MOS1_NRD, IF_REAL , "Drain squares"), IOPU("nrs", MOS1_NRS, IF_REAL , "Source squares"), IP("off", MOS1_OFF, IF_FLAG , "Device initially off"), IOPU("icvds", MOS1_IC_VDS, IF_REAL , "Initial D-S voltage"), IOPU("icvgs", MOS1_IC_VGS, IF_REAL , "Initial G-S voltage"), IOPU("icvbs", MOS1_IC_VBS, IF_REAL , "Initial B-S voltage"), IOPU("temp", MOS1_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", MOS1_DTEMP, IF_REAL, "Instance temperature difference"), IP( "ic", MOS1_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"), IP( "sens_l", MOS1_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"), IP( "sens_w", MOS1_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"), OP( "id", MOS1_CD, IF_REAL, "Drain current"), OP( "is", MOS1_CS, IF_REAL, "Source current"), OP( "ig", MOS1_CG, IF_REAL, "Gate current "), OP( "ib", MOS1_CB, IF_REAL, "Bulk current "), OPU( "ibd", MOS1_CBD, IF_REAL, "B-D junction current"), OPU( "ibs", MOS1_CBS, IF_REAL, "B-S junction current"), OP( "vgs", MOS1_VGS, IF_REAL, "Gate-Source voltage"), OP( "vds", MOS1_VDS, IF_REAL, "Drain-Source voltage"), OP( "vbs", MOS1_VBS, IF_REAL, "Bulk-Source voltage"), OPU( "vbd", MOS1_VBD, IF_REAL, "Bulk-Drain voltage"), /* OP( "cgs", MOS1_CGS, IF_REAL , "Gate-Source capacitance"), OP( "cgd", MOS1_CGD, IF_REAL , "Gate-Drain capacitance"), */ OPU( "dnode", MOS1_DNODE, IF_INTEGER, "Number of the drain node "), OPU( "gnode", MOS1_GNODE, IF_INTEGER, "Number of the gate node "), OPU( "snode", MOS1_SNODE, IF_INTEGER, "Number of the source node "), OPU( "bnode", MOS1_BNODE, IF_INTEGER, "Number of the node "), OPU( "dnodeprime", MOS1_DNODEPRIME, IF_INTEGER, "Number of int. drain node"), OPU( "snodeprime", MOS1_SNODEPRIME, IF_INTEGER, "Number of int. source node "), OP( "von", MOS1_VON, IF_REAL, " "), OP( "vdsat", MOS1_VDSAT, IF_REAL, "Saturation drain voltage"), OPU( "sourcevcrit", MOS1_SOURCEVCRIT,IF_REAL, "Critical source voltage"), OPU( "drainvcrit", MOS1_DRAINVCRIT, IF_REAL, "Critical drain voltage"), OP( "rs", MOS1_SOURCERESIST, IF_REAL, "Source resistance"), OPU("sourceconductance", MOS1_SOURCECONDUCT, IF_REAL, "Conductance of source"), OP( "rd", MOS1_DRAINRESIST, IF_REAL, "Drain conductance"), OPU("drainconductance", MOS1_DRAINCONDUCT, IF_REAL, "Conductance of drain"), OP( "gm", MOS1_GM, IF_REAL, "Transconductance"), OP( "gds", MOS1_GDS, IF_REAL, "Drain-Source conductance"), OP( "gmb", MOS1_GMBS, IF_REAL, "Bulk-Source transconductance"), OPR( "gmbs", MOS1_GMBS, IF_REAL, ""), OPU( "gbd", MOS1_GBD, IF_REAL, "Bulk-Drain conductance"), OPU( "gbs", MOS1_GBS, IF_REAL, "Bulk-Source conductance"), OP( "cbd", MOS1_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP( "cbs", MOS1_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP( "cgs", MOS1_CAPGS, IF_REAL, "Gate-Source capacitance"), OP( "cgd", MOS1_CAPGD, IF_REAL, "Gate-Drain capacitance"), OP( "cgb", MOS1_CAPGB, IF_REAL, "Gate-Bulk capacitance"), OPU( "cqgs",MOS1_CQGS,IF_REAL,"Capacitance due to gate-source charge storage"), OPU( "cqgd",MOS1_CQGD,IF_REAL,"Capacitance due to gate-drain charge storage"), OPU( "cqgb",MOS1_CQGB,IF_REAL,"Capacitance due to gate-bulk charge storage"), OPU( "cqbd",MOS1_CQBD,IF_REAL,"Capacitance due to bulk-drain charge storage"), OPU( "cqbs",MOS1_CQBS,IF_REAL,"Capacitance due to bulk-source charge storage"), OP( "cbd0", MOS1_CAPZEROBIASBD, IF_REAL, "Zero-Bias B-D junction capacitance"), OP( "cbdsw0", MOS1_CAPZEROBIASBDSW, IF_REAL, " "), OP( "cbs0", MOS1_CAPZEROBIASBS, IF_REAL, "Zero-Bias B-S junction capacitance"), OP( "cbssw0", MOS1_CAPZEROBIASBSSW, IF_REAL, " "), OPU( "qgs", MOS1_QGS, IF_REAL, "Gate-Source charge storage"), OPU( "qgd", MOS1_QGD, IF_REAL, "Gate-Drain charge storage"), OPU( "qgb", MOS1_QGB, IF_REAL, "Gate-Bulk charge storage"), OPU( "qbd", MOS1_QBD, IF_REAL, "Bulk-Drain charge storage"), OPU( "qbs", MOS1_QBS, IF_REAL, "Bulk-Source charge storage"), OPU( "p", MOS1_POWER, IF_REAL, "Instaneous power"), OPU( "sens_l_dc", MOS1_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OPU( "sens_l_real", MOS1_L_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt length"), OPU( "sens_l_imag", MOS1_L_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt length"), OPU( "sens_l_mag", MOS1_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OPU( "sens_l_ph", MOS1_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OPU( "sens_l_cplx", MOS1_L_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt length"), OPU( "sens_w_dc", MOS1_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OPU( "sens_w_real", MOS1_W_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt width"), OPU( "sens_w_imag", MOS1_W_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt width"), OPU( "sens_w_mag", MOS1_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OPU( "sens_w_ph", MOS1_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OPU( "sens_w_cplx", MOS1_W_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt width") }; IFparm MOS1mPTable[] = { /* model parameters */ OP("type", MOS1_MOD_TYPE, IF_STRING, "N-channel or P-channel MOS"), IOP("vto", MOS1_MOD_VTO, IF_REAL ,"Threshold voltage"), IOPR("vt0", MOS1_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("kp", MOS1_MOD_KP, IF_REAL ,"Transconductance parameter"), IOP("gamma", MOS1_MOD_GAMMA, IF_REAL ,"Bulk threshold parameter"), IOP("phi", MOS1_MOD_PHI, IF_REAL ,"Surface potential"), IOP("lambda",MOS1_MOD_LAMBDA,IF_REAL ,"Channel length modulation"), IOP("rd", MOS1_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", MOS1_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOPA("cbd", MOS1_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOPA("cbs", MOS1_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", MOS1_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("pb", MOS1_MOD_PB, IF_REAL ,"Bulk junction potential"), IOPA("cgso", MOS1_MOD_CGSO, IF_REAL ,"Gate-source overlap cap."), IOPA("cgdo", MOS1_MOD_CGDO, IF_REAL ,"Gate-drain overlap cap."), IOPA("cgbo", MOS1_MOD_CGBO, IF_REAL ,"Gate-bulk overlap cap."), IOP("rsh", MOS1_MOD_RSH, IF_REAL ,"Sheet resistance"), IOPA("cj", MOS1_MOD_CJ, IF_REAL ,"Bottom junction cap per area"), IOP("mj", MOS1_MOD_MJ, IF_REAL ,"Bottom grading coefficient"), IOPA("cjsw", MOS1_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mjsw", MOS1_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOP("js", MOS1_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("tox", MOS1_MOD_TOX, IF_REAL ,"Oxide thickness"), IOP("ld", MOS1_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("u0", MOS1_MOD_U0, IF_REAL ,"Surface mobility"), IOPR("uo", MOS1_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", MOS1_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IP("nmos", MOS1_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS1_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), IOP("nsub", MOS1_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("tpg", MOS1_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nss", MOS1_MOD_NSS, IF_REAL ,"Surface state density"), IOP("tnom", MOS1_MOD_TNOM, IF_REAL ,"Parameter measurement temperature"), IOP("kf", MOS1_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", MOS1_MOD_AF, IF_REAL ,"Flicker noise exponent") }; char *MOS1names[] = { "Drain", "Gate", "Source", "Bulk" }; int MOS1nSize = NUMELEMS(MOS1names); int MOS1pTSize = NUMELEMS(MOS1pTable); int MOS1mPTSize = NUMELEMS(MOS1mPTable); int MOS1iSize = sizeof(MOS1instance); int MOS1mSize = sizeof(MOS1model); ngspice-26/src/spicelib/devices/mos1/mos1supd.c0000644000265600020320000001562512264261473021043 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* update the charge sensitivities and their derivatives */ int MOS1sUpdate(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; int iparmno; double sb; double sg; double sdprm; double ssprm; double sxpgs; double sxpgd; double sxpbs; double sxpbd; double sxpgb; double dummy1; double dummy2; SENstruct *info; if(ckt->CKTtime == 0) return(OK); info = ckt->CKTsenInfo; #ifdef SENSDEBUG printf("MOS1senupdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ sxpgs = 0; sxpgd = 0; sxpbs = 0; sxpbd = 0; sxpgb = 0; dummy1 = 0; dummy2 = 0; /* loop through all the MOS1 models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { #ifdef SENSDEBUG printf("senupdate instance name %s\n",here->MOS1name); printf("before loading\n"); printf("CKTag[0] = %.2e,CKTag[1] = %.2e\n", ckt->CKTag[0],ckt->CKTag[1]); printf("capgs = %.7e\n",here->MOS1cgs); printf("capgd = %.7e\n",here->MOS1cgd); printf("capgb = %.7e\n",here->MOS1cgb); printf("capbs = %.7e\n",here->MOS1capbs); printf("capbd = %.7e\n",here->MOS1capbd); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sb = *(info->SEN_Sap[here->MOS1bNode] + iparmno); sg = *(info->SEN_Sap[here->MOS1gNode] + iparmno); ssprm = *(info->SEN_Sap[here->MOS1sNodePrime] + iparmno); sdprm = *(info->SEN_Sap[here->MOS1dNodePrime] + iparmno); #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sb = %.7e,sg = %.7e\n",sb,sg); printf("ssprm = %.7e,sdprm = %.7e\n",ssprm,sdprm); #endif /* SENSDEBUG */ sxpgs = (sg - ssprm) * here->MOS1cgs ; sxpgd = (sg - sdprm) * here->MOS1cgd ; sxpgb = (sg - sb) * here->MOS1cgb ; sxpbs = (sb - ssprm) * here->MOS1capbs ; sxpbd = (sb - sdprm) * here->MOS1capbd ; if(here->MOS1sens_l && (iparmno == here->MOS1senParmNo)){ sxpgs += *(here->MOS1dphigs_dl); sxpgd += *(here->MOS1dphigd_dl); sxpbs += *(here->MOS1dphibs_dl); sxpbd += *(here->MOS1dphibd_dl); sxpgb += *(here->MOS1dphigb_dl); } if(here->MOS1sens_w && (iparmno == (here->MOS1senParmNo+here->MOS1sens_l))){ sxpgs += *(here->MOS1dphigs_dw); sxpgd += *(here->MOS1dphigd_dw); sxpbs += *(here->MOS1dphibs_dw); sxpbd += *(here->MOS1dphibd_dw); sxpgb += *(here->MOS1dphigb_dw); } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MOS1sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate1 + here->MOS1sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate1 + here->MOS1sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate1 + here->MOS1sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate1 + here->MOS1sensxpgb + 10 * (iparmno - 1)) = sxpgb; *(ckt->CKTstate1 + here->MOS1sensxpgs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS1sensxpgd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS1sensxpbs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS1sensxpbd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS1sensxpgb + 10 * (iparmno - 1) + 1) = 0; goto next; } *(ckt->CKTstate0 + here->MOS1sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate0 + here->MOS1sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate0 + here->MOS1sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate0 + here->MOS1sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate0 + here->MOS1sensxpgb + 10 * (iparmno - 1)) = sxpgb; NIintegrate(ckt,&dummy1,&dummy2,here->MOS1cgs, here->MOS1sensxpgs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS1cgd, here->MOS1sensxpgd + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS1cgb, here->MOS1sensxpgb + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS1capbs, here->MOS1sensxpbs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS1capbd, here->MOS1sensxpbd + 10*(iparmno -1)); next: ; #ifdef SENSDEBUG printf("after loading\n"); printf("sxpgs = %.7e,sdotxpgs = %.7e\n", sxpgs,*(ckt->CKTstate0 + here->MOS1sensxpgs + 10 * (iparmno - 1) + 1)); printf("sxpgd = %.7e,sdotxpgd = %.7e\n", sxpgd,*(ckt->CKTstate0 + here->MOS1sensxpgd + 10 * (iparmno - 1) + 1)); printf("sxpgb = %.7e,sdotxpgb = %.7e\n", sxpgb,*(ckt->CKTstate0 + here->MOS1sensxpgb + 10 * (iparmno - 1) + 1)); printf("sxpbs = %.7e,sdotxpbs = %.7e\n", sxpbs,*(ckt->CKTstate0 + here->MOS1sensxpbs + 10 * (iparmno - 1) + 1)); printf("sxpbd = %.7e,sdotxpbd = %.7e\n", sxpbd,*(ckt->CKTstate0 + here->MOS1sensxpbd + 10 * (iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } #ifdef SENSDEBUG printf("MOS1senupdate end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1ext.h0000644000265600020320000000253712264261473020673 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int MOS1acLoad(GENmodel *,CKTcircuit*); extern int MOS1ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MOS1delete(GENmodel*,IFuid,GENinstance**); extern void MOS1destroy(GENmodel**); extern int MOS1getic(GENmodel*,CKTcircuit*); extern int MOS1load(GENmodel*,CKTcircuit*); extern int MOS1mAsk(CKTcircuit *,GENmodel *,int,IFvalue*); extern int MOS1mDelete(GENmodel**,IFuid,GENmodel*); extern int MOS1mParam(int,IFvalue*,GENmodel*); extern int MOS1param(int,IFvalue*,GENinstance*,IFvalue*); extern int MOS1pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MOS1sAcLoad(GENmodel*,CKTcircuit*); extern int MOS1sLoad(GENmodel*,CKTcircuit*); extern void MOS1sPrint(GENmodel*,CKTcircuit*); extern int MOS1sSetup(SENstruct*,GENmodel*); extern int MOS1sUpdate(GENmodel*,CKTcircuit*); extern int MOS1setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MOS1unsetup(GENmodel*,CKTcircuit*); extern int MOS1temp(GENmodel*,CKTcircuit*); extern int MOS1trunc(GENmodel*,CKTcircuit*,double*); extern int MOS1convTest(GENmodel*,CKTcircuit*); extern int MOS1disto(int,GENmodel*,CKTcircuit*); extern int MOS1noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int MOS1dSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mos1/mos1mdel.c0000644000265600020320000000176612264261473021012 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MOS1model **model = (MOS1model **)inModel; MOS1model *modfast = (MOS1model *)kill; MOS1instance *here; MOS1instance *prev = NULL; MOS1model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MOS1nextModel)) { if( (*model)->MOS1modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MOS1nextModel; /* cut deleted device out of list */ for(here = (*model)->MOS1instances ; here ; here = here->MOS1nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1sld.c0000644000265600020320000006434112264261473020651 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1sLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; double SaveState[44]; int save_mode; int i; int iparmno; int error; int flag; double A0; double DELA; double Apert; double DELAinv; double gspr0; double gspr; double gdpr0; double gdpr; double cdpr0; double cspr0; double cd0; double cbd0; double cbs0; double cd; double cbd; double cbs; double DcdprDp; double DcsprDp; double DcbDp; double DcdDp; double DcbsDp; double DcbdDp; double DcdprmDp; double DcsprmDp; double qgs0; double qgd0; double qgb0; double qbd0; double qbd; double qbs0; double qbs; double DqgsDp; double DqgdDp; double DqgbDp; double DqbdDp; double DqbsDp; double Osxpgs; double Osxpgd; double Osxpgb; double Osxpbd; double Osxpbs; double tag0; double tag1; double arg; double sarg; double sargsw; int offset; double EffectiveLength; SENstruct *info; #ifdef SENSDEBUG printf("MOS1senload \n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %d\n",ckt->CKTorder); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } /* loop through all the models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { #ifdef SENSDEBUG printf("senload instance name %s\n",here->MOS1name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS1gNode,here->MOS1dNode,here->MOS1dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS1sNode ,here->MOS1sNodePrime, here->MOS1bNode,here->MOS1senParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++){ *(SaveState + i) = *(ckt->CKTstate0 + here->MOS1states + i); } *(SaveState + 17) = here->MOS1sourceConductance; *(SaveState + 18) = here->MOS1drainConductance; *(SaveState + 19) = here->MOS1cd; *(SaveState + 20) = here->MOS1cbs; *(SaveState + 21) = here->MOS1cbd; *(SaveState + 22) = here->MOS1gmbs; *(SaveState + 23) = here->MOS1gm; *(SaveState + 24) = here->MOS1gds; *(SaveState + 25) = here->MOS1gbd; *(SaveState + 26) = here->MOS1gbs; *(SaveState + 27) = here->MOS1capbd; *(SaveState + 28) = here->MOS1capbs; *(SaveState + 29) = here->MOS1Cbd; *(SaveState + 30) = here->MOS1Cbdsw; *(SaveState + 31) = here->MOS1Cbs; *(SaveState + 32) = here->MOS1Cbssw; *(SaveState + 33) = here->MOS1f2d; *(SaveState + 34) = here->MOS1f3d; *(SaveState + 35) = here->MOS1f4d; *(SaveState + 36) = here->MOS1f2s; *(SaveState + 37) = here->MOS1f3s; *(SaveState + 38) = here->MOS1f4s; *(SaveState + 39) = here->MOS1cgs; *(SaveState + 40) = here->MOS1cgd; *(SaveState + 41) = here->MOS1cgb; *(SaveState + 42) = here->MOS1vdsat; *(SaveState + 43) = here->MOS1von; save_mode = here->MOS1mode; if(here->MOS1senParmNo == 0) goto next1; #ifdef SENSDEBUG printf("without perturbation \n"); printf("gbd =%.5e\n",here->MOS1gbd); printf("satCur =%.5e\n",here->MOS1tSatCur); printf("satCurDens =%.5e\n",here->MOS1tSatCurDens); printf("vbd =%.5e\n",*(ckt->CKTstate0 + here->MOS1vbd)); #endif /* SENSDEBUG */ cdpr0= here->MOS1cd; cspr0= -(here->MOS1cd + here->MOS1cbd + here->MOS1cbs); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ qgs0 = *(ckt->CKTstate1 + here->MOS1qgs); qgd0 = *(ckt->CKTstate1 + here->MOS1qgd); qgb0 = *(ckt->CKTstate1 + here->MOS1qgb); } else{ qgs0 = *(ckt->CKTstate0 + here->MOS1qgs); qgd0 = *(ckt->CKTstate0 + here->MOS1qgd); qgb0 = *(ckt->CKTstate0 + here->MOS1qgb); } here->MOS1senPertFlag = ON; error = MOS1load((GENmodel*)model,ckt); if(error) return(error); cd0 = here->MOS1cd ; cbd0 = here->MOS1cbd ; cbs0 = here->MOS1cbs ; gspr0= here->MOS1sourceConductance ; gdpr0= here->MOS1drainConductance ; qbs0 = *(ckt->CKTstate0 + here->MOS1qbs); qbd0 = *(ckt->CKTstate0 + here->MOS1qbd); for( flag = 0 ; flag <= 1 ; flag++){ if(here->MOS1sens_l == 0) if(flag == 0) goto next2; if(here->MOS1sens_w == 0) if(flag == 1) goto next2; if(flag == 0){ A0 = here->MOS1l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS1l = Apert; } else{ A0 = here->MOS1w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS1w = Apert; here->MOS1drainArea *= (1 + info->SENpertfac); here->MOS1sourceArea *= (1 + info->SENpertfac); here->MOS1Cbd *= (1 + info->SENpertfac); here->MOS1Cbs *= (1 + info->SENpertfac); if(here->MOS1drainPerimiter){ here->MOS1Cbdsw += here->MOS1Cbdsw * DELA/here->MOS1drainPerimiter; } if(here->MOS1sourcePerimiter){ here->MOS1Cbssw += here->MOS1Cbssw * DELA/here->MOS1sourcePerimiter; } if(*(ckt->CKTstate0 + here->MOS1vbd) >= here->MOS1tDepCap){ arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1f2d = here->MOS1Cbd* (1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + here->MOS1Cbdsw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3d = here->MOS1Cbd * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + here->MOS1Cbdsw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg/ here->MOS1tBulkPot; here->MOS1f4d = here->MOS1Cbd* here->MOS1tBulkPot*(1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + here->MOS1Cbdsw*here->MOS1tBulkPot* (1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3d/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2d; } if(*(ckt->CKTstate0 + here->MOS1vbs) >= here->MOS1tDepCap){ arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1f2s = here->MOS1Cbs* (1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + here->MOS1Cbssw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3s = here->MOS1Cbs * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + here->MOS1Cbssw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg/ here->MOS1tBulkPot; here->MOS1f4s = here->MOS1Cbs* here->MOS1tBulkPot*(1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + here->MOS1Cbssw*here->MOS1tBulkPot* (1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3s/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2s; } here->MOS1drainConductance *= Apert/A0; here->MOS1sourceConductance *= Apert/A0; } #ifdef SENSDEBUG if(flag == 0) printf("perturbation of l\n"); if(flag == 1) printf("perturbation of w\n"); #endif /* SENSDEBUG */ error = MOS1load((GENmodel*)model,ckt); if(error) return(error); if(flag == 0){ here->MOS1l = A0; } else{ here->MOS1w = A0; here->MOS1drainArea /= (1 + info->SENpertfac); here->MOS1sourceArea /= (1 + info->SENpertfac); here->MOS1drainConductance *= A0/Apert; here->MOS1sourceConductance *= A0/Apert; } cd = here->MOS1cd ; cbd = here->MOS1cbd ; cbs = here->MOS1cbs ; gspr= here->MOS1sourceConductance ; gdpr= here->MOS1drainConductance ; DcdDp = (cd - cd0) * DELAinv; DcbsDp = (cbs - cbs0) * DELAinv; DcbdDp = (cbd - cbd0) * DELAinv; DcbDp = ( DcbsDp + DcbdDp ); DcdprDp = 0; DcsprDp = 0; if(here->MOS1dNode != here->MOS1dNodePrime) if(gdpr0) DcdprDp = cdpr0 * (gdpr - gdpr0)/gdpr0 * DELAinv; if(here->MOS1sNode != here->MOS1sNodePrime) if(gspr0) DcsprDp = cspr0 * (gspr - gspr0)/gspr0 * DELAinv; DcdprmDp = ( - DcdprDp + DcdDp); DcsprmDp = ( - DcbsDp - DcdDp - DcbdDp - DcsprDp); if(flag == 0){ EffectiveLength = here->MOS1l - 2*model->MOS1latDiff; if(EffectiveLength == 0){ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; } else{ DqgsDp = model->MOS1type * qgs0 / EffectiveLength; DqgdDp = model->MOS1type * qgd0 / EffectiveLength; DqgbDp = model->MOS1type * qgb0 / EffectiveLength; } } else{ DqgsDp = model->MOS1type * qgs0 / here->MOS1w; DqgdDp = model->MOS1type * qgd0 / here->MOS1w; DqgbDp = model->MOS1type * qgb0 / here->MOS1w; } qbd = *(ckt->CKTstate0 + here->MOS1qbd); qbs = *(ckt->CKTstate0 + here->MOS1qbs); DqbsDp = model->MOS1type * (qbs - qbs0)*DELAinv; DqbdDp = model->MOS1type * (qbd - qbd0)*DELAinv; if(flag == 0){ *(here->MOS1dphigs_dl) = DqgsDp; *(here->MOS1dphigd_dl) = DqgdDp; *(here->MOS1dphibs_dl) = DqbsDp; *(here->MOS1dphibd_dl) = DqbdDp; *(here->MOS1dphigb_dl) = DqgbDp; } else{ *(here->MOS1dphigs_dw) = DqgsDp; *(here->MOS1dphigd_dw) = DqgdDp; *(here->MOS1dphibs_dw) = DqbsDp; *(here->MOS1dphibd_dw) = DqbdDp; *(here->MOS1dphigb_dw) = DqgbDp; } #ifdef SENSDEBUG printf("CKTag[0]=%.7e,CKTag[1]=%.7e,flag= %d\n", ckt->CKTag[0],ckt->CKTag[1],flag); printf("cd0 = %.7e ,cd = %.7e,\n",cd0,cd); printf("cbs0 = %.7e ,cbs = %.7e,\n",cbs0,cbs); printf("cbd0 = %.7e ,cbd = %.7e,\n",cbd0,cbd); printf("DcdprmDp = %.7e,\n",DcdprmDp); printf("DcsprmDp = %.7e,\n",DcsprmDp); printf("DcdprDp = %.7e,\n",DcdprDp); printf("DcsprDp = %.7e,\n",DcsprDp); printf("qgs0 = %.7e \n",qgs0); printf("qgd0 = %.7e \n",qgd0); printf("qgb0 = %.7e \n",qgb0); printf("qbs0 = %.7e ,qbs = %.7e,\n",qbs0,qbs); printf("qbd0 = %.7e ,qbd = %.7e,\n",qbd0,qbd); printf("DqgsDp = %.7e \n",DqgsDp); printf("DqgdDp = %.7e \n",DqgdDp); printf("DqgbDp = %.7e \n",DqgbDp); printf("DqbsDp = %.7e \n",DqbsDp); printf("DqbdDp = %.7e \n",DqbdDp); printf("EffectiveLength = %.7e \n",EffectiveLength); printf("tdepCap = %.7e \n",here->MOS1tDepCap); printf("\n"); #endif /* SENSDEBUG*/ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto next2; /* * load RHS matrix */ if(flag == 0){ *(info->SEN_RHS[here->MOS1bNode] + here->MOS1senParmNo) -= model->MOS1type * DcbDp; *(info->SEN_RHS[here->MOS1dNode] + here->MOS1senParmNo) -= model->MOS1type * DcdprDp; *(info->SEN_RHS[here->MOS1dNodePrime] + here->MOS1senParmNo) -= model->MOS1type * DcdprmDp; *(info->SEN_RHS[here->MOS1sNode] + here->MOS1senParmNo) -= model->MOS1type * DcsprDp; *(info->SEN_RHS[here->MOS1sNodePrime] + here->MOS1senParmNo) -= model->MOS1type * DcsprmDp; } else{ offset = here->MOS1sens_l; *(info->SEN_RHS[here->MOS1bNode] + here->MOS1senParmNo + offset) -= model->MOS1type * DcbDp; *(info->SEN_RHS[here->MOS1dNode] + here->MOS1senParmNo + offset) -= model->MOS1type * DcdprDp; *(info->SEN_RHS[here->MOS1dNodePrime] + here->MOS1senParmNo + offset) -= model->MOS1type * DcdprmDp; *(info->SEN_RHS[here->MOS1sNode] + here->MOS1senParmNo + offset) -= model->MOS1type * DcsprDp; *(info->SEN_RHS[here->MOS1sNodePrime] + here->MOS1senParmNo + offset) -= model->MOS1type * DcsprmDp; } #ifdef SENSDEBUG printf("after loading\n"); if(flag == 0){ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS1bNode] + here->MOS1senParmNo)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNode] + here->MOS1senParmNo)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNode] + here->MOS1senParmNo)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNodePrime] + here->MOS1senParmNo)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNodePrime] + here->MOS1senParmNo)); printf("\n"); } else{ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS1bNode] + here->MOS1senParmNo + here->MOS1sens_l)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNode] + here->MOS1senParmNo + here->MOS1sens_l)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNode] + here->MOS1senParmNo + here->MOS1sens_l)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNodePrime] + here->MOS1senParmNo + here->MOS1sens_l)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNodePrime] + here->MOS1senParmNo + here->MOS1sens_l)); } #endif /* SENSDEBUG*/ next2: ; } next1: if((info->SENmode == DCSEN) || (ckt->CKTmode&MODETRANOP) ) goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ #ifdef SENSDEBUG printf("after conductive currents\n"); printf("iparmno = %d\n",iparmno); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS1bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNodePrime] + iparmno)); printf("\n"); #endif /* SENSDEBUG */ Osxpgs = tag0 * *(ckt->CKTstate1 + here->MOS1sensxpgs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS1sensxpgs + 10*(iparmno - 1) + 1); Osxpgd = tag0 * *(ckt->CKTstate1 + here->MOS1sensxpgd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS1sensxpgd + 10*(iparmno - 1) + 1); Osxpbs = tag0 * *(ckt->CKTstate1 + here->MOS1sensxpbs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS1sensxpbs + 10*(iparmno - 1) + 1); Osxpbd =tag0 * *(ckt->CKTstate1 + here->MOS1sensxpbd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS1sensxpbd + 10*(iparmno - 1) + 1); Osxpgb = tag0 * *(ckt->CKTstate1 + here->MOS1sensxpgb + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS1sensxpgb + 10*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno=%d\n",iparmno); printf("sxpgs=%.7e,sdgs=%.7e\n", *(ckt->CKTstate1 + here->MOS1sensxpgs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS1sensxpgs + 10*(iparmno - 1) + 1)); printf("sxpgd=%.7e,sdgd=%.7e\n", *(ckt->CKTstate1 + here->MOS1sensxpgd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS1sensxpgd + 10*(iparmno - 1) + 1)); printf("sxpbs=%.7e,sdbs=%.7e\n", *(ckt->CKTstate1 + here->MOS1sensxpbs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS1sensxpbs + 10*(iparmno - 1) + 1)); printf("sxpbd=%.7e,sdbd=%.7e\n", *(ckt->CKTstate1 + here->MOS1sensxpbd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS1sensxpbd + 10*(iparmno - 1) + 1)); printf("sxpgb=%.7e,sdgb=%.7e\n", *(ckt->CKTstate1 + here->MOS1sensxpgb + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS1sensxpgb + 10*(iparmno - 1) + 1)); printf("before loading DqDp\n"); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); printf("\n"); #endif /* SENSDEBUG */ if(here->MOS1sens_l && (iparmno == here->MOS1senParmNo)){ Osxpgs -= tag0 * *(here->MOS1dphigs_dl); Osxpgd -= tag0 * *(here->MOS1dphigd_dl); Osxpbs -= tag0 * *(here->MOS1dphibs_dl); Osxpbd -= tag0 * *(here->MOS1dphibd_dl); Osxpgb -= tag0 * *(here->MOS1dphigb_dl); } if(here->MOS1sens_w && (iparmno == (here->MOS1senParmNo + here->MOS1sens_l))){ Osxpgs -= tag0 * *(here->MOS1dphigs_dw); Osxpgd -= tag0 * *(here->MOS1dphigd_dw); Osxpbs -= tag0 * *(here->MOS1dphibs_dw); Osxpbd -= tag0 * *(here->MOS1dphibd_dw); Osxpgb -= tag0 * *(here->MOS1dphigb_dw); } #ifdef SENSDEBUG printf("after loading DqDp\n"); printf("DqgsDp=%.7e",DqgsDp); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->MOS1bNode] + iparmno) += Osxpbs + Osxpbd -Osxpgb; *(info->SEN_RHS[here->MOS1gNode] + iparmno) += Osxpgs + Osxpgd + Osxpgb; *(info->SEN_RHS[here->MOS1dNodePrime] + iparmno) -= Osxpgd + Osxpbd ; *(info->SEN_RHS[here->MOS1sNodePrime] + iparmno) -= Osxpgs + Osxpbs; #ifdef SENSDEBUG printf("after capacitive currents\n"); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS1bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS1sNodePrime] + iparmno)); #endif /* SENSDEBUG */ } restore: /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS1states + i) = *(SaveState + i); here->MOS1sourceConductance = *(SaveState + 17) ; here->MOS1drainConductance = *(SaveState + 18) ; here->MOS1cd = *(SaveState + 19) ; here->MOS1cbs = *(SaveState + 20) ; here->MOS1cbd = *(SaveState + 21) ; here->MOS1gmbs = *(SaveState + 22) ; here->MOS1gm = *(SaveState + 23) ; here->MOS1gds = *(SaveState + 24) ; here->MOS1gbd = *(SaveState + 25) ; here->MOS1gbs = *(SaveState + 26) ; here->MOS1capbd = *(SaveState + 27) ; here->MOS1capbs = *(SaveState + 28) ; here->MOS1Cbd = *(SaveState + 29) ; here->MOS1Cbdsw = *(SaveState + 30) ; here->MOS1Cbs = *(SaveState + 31) ; here->MOS1Cbssw = *(SaveState + 32) ; here->MOS1f2d = *(SaveState + 33) ; here->MOS1f3d = *(SaveState + 34) ; here->MOS1f4d = *(SaveState + 35) ; here->MOS1f2s = *(SaveState + 36) ; here->MOS1f3s = *(SaveState + 37) ; here->MOS1f4s = *(SaveState + 38) ; here->MOS1cgs = *(SaveState + 39) ; here->MOS1cgd = *(SaveState + 40) ; here->MOS1cgb = *(SaveState + 41) ; here->MOS1vdsat = *(SaveState + 42) ; here->MOS1von = *(SaveState + 43) ; here->MOS1mode = save_mode ; here->MOS1senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS1senload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1defs.h0000644000265600020320000004617612264261473021023 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #ifndef MOS1 #define MOS1 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for level 1 MOSFETs */ /* information needed for each instance */ typedef struct sMOS1instance { struct sMOS1model *sMOS1modPtr; /* backpointer to model */ struct sMOS1instance *MOS1nextInstance; /* pointer to next instance of *current model*/ IFuid MOS1name; /* pointer to character string naming this instance */ int MOS1states; /* index into state table for this device */ int MOS1dNode; /* number of the gate node of the mosfet */ int MOS1gNode; /* number of the gate node of the mosfet */ int MOS1sNode; /* number of the source node of the mosfet */ int MOS1bNode; /* number of the bulk node of the mosfet */ int MOS1dNodePrime; /* number of the internal drain node of the mosfet */ int MOS1sNodePrime; /* number of the internal source node of the mosfet */ double MOS1m; /* parallel device multiplier */ double MOS1l; /* the length of the channel region */ double MOS1w; /* the width of the channel region */ double MOS1drainArea; /* the area of the drain diffusion */ double MOS1sourceArea; /* the area of the source diffusion */ double MOS1drainSquares; /* the length of the drain in squares */ double MOS1sourceSquares; /* the length of the source in squares */ double MOS1drainPerimiter; double MOS1sourcePerimiter; double MOS1sourceConductance; /*conductance of source(or 0):set in setup*/ double MOS1drainConductance; /*conductance of drain(or 0):set in setup*/ double MOS1temp; /* operating temperature of this instance */ double MOS1dtemp; /* operating temperature of the instance relative to circuit temperature*/ double MOS1tTransconductance; /* temperature corrected transconductance*/ double MOS1tSurfMob; /* temperature corrected surface mobility */ double MOS1tPhi; /* temperature corrected Phi */ double MOS1tVto; /* temperature corrected Vto */ double MOS1tSatCur; /* temperature corrected saturation Cur. */ double MOS1tSatCurDens; /* temperature corrected saturation Cur. density*/ double MOS1tCbd; /* temperature corrected B-D Capacitance */ double MOS1tCbs; /* temperature corrected B-S Capacitance */ double MOS1tCj; /* temperature corrected Bulk bottom Capacitance */ double MOS1tCjsw; /* temperature corrected Bulk side Capacitance */ double MOS1tBulkPot; /* temperature corrected Bulk potential */ double MOS1tDepCap; /* temperature adjusted transition point in */ /* the cureve matching Fc * Vj */ double MOS1tVbi; /* temperature adjusted Vbi */ double MOS1icVBS; /* initial condition B-S voltage */ double MOS1icVDS; /* initial condition D-S voltage */ double MOS1icVGS; /* initial condition G-S voltage */ double MOS1von; double MOS1vdsat; double MOS1sourceVcrit; /* Vcrit for pos. vds */ double MOS1drainVcrit; /* Vcrit for pos. vds */ double MOS1cd; double MOS1cbs; double MOS1cbd; double MOS1gmbs; double MOS1gm; double MOS1gds; double MOS1gbd; double MOS1gbs; double MOS1capbd; double MOS1capbs; double MOS1Cbd; double MOS1Cbdsw; double MOS1Cbs; double MOS1Cbssw; double MOS1f2d; double MOS1f3d; double MOS1f4d; double MOS1f2s; double MOS1f3s; double MOS1f4s; /* * naming convention: * x = vgs * y = vbs * z = vds * cdr = cdrain */ #define MOS1NDCOEFFS 30 #ifndef NODISTO double MOS1dCoeffs[MOS1NDCOEFFS]; #else /* NODISTO */ double *MOS1dCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define capbs2 MOS1dCoeffs[0] #define capbs3 MOS1dCoeffs[1] #define capbd2 MOS1dCoeffs[2] #define capbd3 MOS1dCoeffs[3] #define gbs2 MOS1dCoeffs[4] #define gbs3 MOS1dCoeffs[5] #define gbd2 MOS1dCoeffs[6] #define gbd3 MOS1dCoeffs[7] #define capgb2 MOS1dCoeffs[8] #define capgb3 MOS1dCoeffs[9] #define cdr_x2 MOS1dCoeffs[10] #define cdr_y2 MOS1dCoeffs[11] #define cdr_z2 MOS1dCoeffs[12] #define cdr_xy MOS1dCoeffs[13] #define cdr_yz MOS1dCoeffs[14] #define cdr_xz MOS1dCoeffs[15] #define cdr_x3 MOS1dCoeffs[16] #define cdr_y3 MOS1dCoeffs[17] #define cdr_z3 MOS1dCoeffs[18] #define cdr_x2z MOS1dCoeffs[19] #define cdr_x2y MOS1dCoeffs[20] #define cdr_y2z MOS1dCoeffs[21] #define cdr_xy2 MOS1dCoeffs[22] #define cdr_xz2 MOS1dCoeffs[23] #define cdr_yz2 MOS1dCoeffs[24] #define cdr_xyz MOS1dCoeffs[25] #define capgs2 MOS1dCoeffs[26] #define capgs3 MOS1dCoeffs[27] #define capgd2 MOS1dCoeffs[28] #define capgd3 MOS1dCoeffs[29] #endif #define MOS1RDNOIZ 0 #define MOS1RSNOIZ 1 #define MOS1IDNOIZ 2 #define MOS1FLNOIZ 3 #define MOS1TOTNOIZ 4 #define MOS1NSRCS 5 /* the number of MOS1FET noise sources*/ #ifndef NONOISE double MOS1nVar[NSTATVARS][MOS1NSRCS]; #else /* NONOISE */ double **MOS1nVar; #endif /* NONOISE */ int MOS1mode; /* device mode : 1 = normal, -1 = inverse */ unsigned MOS1off:1; /* non-zero to indicate device is off for dc analysis*/ unsigned MOS1tempGiven :1; /* instance temperature specified */ unsigned MOS1dtempGiven :1; /* instance delta temperature specified */ unsigned MOS1mGiven :1; unsigned MOS1lGiven :1; unsigned MOS1wGiven :1; unsigned MOS1drainAreaGiven :1; unsigned MOS1sourceAreaGiven :1; unsigned MOS1drainSquaresGiven :1; unsigned MOS1sourceSquaresGiven :1; unsigned MOS1drainPerimiterGiven :1; unsigned MOS1sourcePerimiterGiven :1; unsigned MOS1dNodePrimeSet :1; unsigned MOS1sNodePrimeSet :1; unsigned MOS1icVBSGiven :1; unsigned MOS1icVDSGiven :1; unsigned MOS1icVGSGiven :1; unsigned MOS1vonGiven :1; unsigned MOS1vdsatGiven :1; unsigned MOS1modeGiven :1; double *MOS1DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *MOS1GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *MOS1SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *MOS1BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *MOS1DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *MOS1SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *MOS1DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *MOS1GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *MOS1GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *MOS1GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *MOS1SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *MOS1BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *MOS1BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *MOS1DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *MOS1DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *MOS1BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *MOS1DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *MOS1SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *MOS1SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *MOS1DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *MOS1SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *MOS1SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ int MOS1senParmNo; /* parameter # for sensitivity use; set equal to 0 if neither length nor width of the mosfet is a design parameter */ unsigned MOS1sens_l :1; /* field which indicates whether length of the mosfet is a design parameter or not */ unsigned MOS1sens_w :1; /* field which indicates whether width of the mosfet is a design parameter or not */ unsigned MOS1senPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ double MOS1cgs; double MOS1cgd; double MOS1cgb; double *MOS1sens; #define MOS1senCgs MOS1sens /* contains pertured values of cgs */ #define MOS1senCgd MOS1sens + 6 /* contains perturbed values of cgd*/ #define MOS1senCgb MOS1sens + 12 /* contains perturbed values of cgb*/ #define MOS1senCbd MOS1sens + 18 /* contains perturbed values of cbd*/ #define MOS1senCbs MOS1sens + 24 /* contains perturbed values of cbs*/ #define MOS1senGds MOS1sens + 30 /* contains perturbed values of gds*/ #define MOS1senGbs MOS1sens + 36 /* contains perturbed values of gbs*/ #define MOS1senGbd MOS1sens + 42 /* contains perturbed values of gbd*/ #define MOS1senGm MOS1sens + 48 /* contains perturbed values of gm*/ #define MOS1senGmbs MOS1sens + 54 /* contains perturbed values of gmbs*/ #define MOS1dphigs_dl MOS1sens + 60 #define MOS1dphigd_dl MOS1sens + 61 #define MOS1dphigb_dl MOS1sens + 62 #define MOS1dphibs_dl MOS1sens + 63 #define MOS1dphibd_dl MOS1sens + 64 #define MOS1dphigs_dw MOS1sens + 65 #define MOS1dphigd_dw MOS1sens + 66 #define MOS1dphigb_dw MOS1sens + 67 #define MOS1dphibs_dw MOS1sens + 68 #define MOS1dphibd_dw MOS1sens + 69 } MOS1instance ; #define MOS1vbd MOS1states+ 0 /* bulk-drain voltage */ #define MOS1vbs MOS1states+ 1 /* bulk-source voltage */ #define MOS1vgs MOS1states+ 2 /* gate-source voltage */ #define MOS1vds MOS1states+ 3 /* drain-source voltage */ #define MOS1capgs MOS1states+4 /* gate-source capacitor value */ #define MOS1qgs MOS1states+ 5 /* gate-source capacitor charge */ #define MOS1cqgs MOS1states+ 6 /* gate-source capacitor current */ #define MOS1capgd MOS1states+ 7 /* gate-drain capacitor value */ #define MOS1qgd MOS1states+ 8 /* gate-drain capacitor charge */ #define MOS1cqgd MOS1states+ 9 /* gate-drain capacitor current */ #define MOS1capgb MOS1states+10 /* gate-bulk capacitor value */ #define MOS1qgb MOS1states+ 11 /* gate-bulk capacitor charge */ #define MOS1cqgb MOS1states+ 12 /* gate-bulk capacitor current */ #define MOS1qbd MOS1states+ 13 /* bulk-drain capacitor charge */ #define MOS1cqbd MOS1states+ 14 /* bulk-drain capacitor current */ #define MOS1qbs MOS1states+ 15 /* bulk-source capacitor charge */ #define MOS1cqbs MOS1states+ 16 /* bulk-source capacitor current */ #define MOS1numStates 17 #define MOS1sensxpgs MOS1states+17 /* charge sensitivities and their derivatives. +18 for the derivatives: pointer to the beginning of the array */ #define MOS1sensxpgd MOS1states+19 #define MOS1sensxpgb MOS1states+21 #define MOS1sensxpbs MOS1states+23 #define MOS1sensxpbd MOS1states+25 #define MOS1numSenStates 10 /* per model data */ /* NOTE: parameters marked 'input - use xxxx' are paramters for * which a temperature correction is applied in MOS1temp, thus * the MOS1xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sMOS1model { /* model structure for a resistor */ int MOS1modType; /* type index to this device type */ struct sMOS1model *MOS1nextModel; /* pointer to next possible model *in linked list */ MOS1instance * MOS1instances; /* pointer to list of instances * that have this model */ IFuid MOS1modName; /* pointer to character string naming this model */ int MOS1type; /* device type : 1 = nmos, -1 = pmos */ double MOS1tnom; /* temperature at which parameters measured */ double MOS1latDiff; double MOS1jctSatCurDensity; /* input - use tSatCurDens */ double MOS1jctSatCur; /* input - use tSatCur */ double MOS1drainResistance; double MOS1sourceResistance; double MOS1sheetResistance; double MOS1transconductance; /* input - use tTransconductance */ double MOS1gateSourceOverlapCapFactor; double MOS1gateDrainOverlapCapFactor; double MOS1gateBulkOverlapCapFactor; double MOS1oxideCapFactor; double MOS1vt0; /* input - use tVto */ double MOS1capBD; /* input - use tCbd */ double MOS1capBS; /* input - use tCbs */ double MOS1bulkCapFactor; /* input - use tCj */ double MOS1sideWallCapFactor; /* input - use tCjsw */ double MOS1bulkJctPotential; /* input - use tBulkPot */ double MOS1bulkJctBotGradingCoeff; double MOS1bulkJctSideGradingCoeff; double MOS1fwdCapDepCoeff; double MOS1phi; /* input - use tPhi */ double MOS1gamma; double MOS1lambda; double MOS1substrateDoping; int MOS1gateType; double MOS1surfaceStateDensity; double MOS1oxideThickness; double MOS1surfaceMobility; /* input - use tSurfMob */ double MOS1fNcoef; double MOS1fNexp; unsigned MOS1typeGiven :1; unsigned MOS1latDiffGiven :1; unsigned MOS1jctSatCurDensityGiven :1; unsigned MOS1jctSatCurGiven :1; unsigned MOS1drainResistanceGiven :1; unsigned MOS1sourceResistanceGiven :1; unsigned MOS1sheetResistanceGiven :1; unsigned MOS1transconductanceGiven :1; unsigned MOS1gateSourceOverlapCapFactorGiven :1; unsigned MOS1gateDrainOverlapCapFactorGiven :1; unsigned MOS1gateBulkOverlapCapFactorGiven :1; unsigned MOS1vt0Given :1; unsigned MOS1capBDGiven :1; unsigned MOS1capBSGiven :1; unsigned MOS1bulkCapFactorGiven :1; unsigned MOS1sideWallCapFactorGiven :1; unsigned MOS1bulkJctPotentialGiven :1; unsigned MOS1bulkJctBotGradingCoeffGiven :1; unsigned MOS1bulkJctSideGradingCoeffGiven :1; unsigned MOS1fwdCapDepCoeffGiven :1; unsigned MOS1phiGiven :1; unsigned MOS1gammaGiven :1; unsigned MOS1lambdaGiven :1; unsigned MOS1substrateDopingGiven :1; unsigned MOS1gateTypeGiven :1; unsigned MOS1surfaceStateDensityGiven :1; unsigned MOS1oxideThicknessGiven :1; unsigned MOS1surfaceMobilityGiven :1; unsigned MOS1tnomGiven :1; unsigned MOS1fNcoefGiven :1; unsigned MOS1fNexpGiven :1; } MOS1model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define MOS1_W 1 #define MOS1_L 2 #define MOS1_AS 3 #define MOS1_AD 4 #define MOS1_PS 5 #define MOS1_PD 6 #define MOS1_NRS 7 #define MOS1_NRD 8 #define MOS1_OFF 9 #define MOS1_IC 10 #define MOS1_IC_VBS 11 #define MOS1_IC_VDS 12 #define MOS1_IC_VGS 13 #define MOS1_W_SENS 14 #define MOS1_L_SENS 15 #define MOS1_CB 16 #define MOS1_CG 17 #define MOS1_CS 18 #define MOS1_POWER 19 #define MOS1_TEMP 20 #define MOS1_M 21 #define MOS1_DTEMP 22 /* model paramerers */ #define MOS1_MOD_VTO 101 #define MOS1_MOD_KP 102 #define MOS1_MOD_GAMMA 103 #define MOS1_MOD_PHI 104 #define MOS1_MOD_LAMBDA 105 #define MOS1_MOD_RD 106 #define MOS1_MOD_RS 107 #define MOS1_MOD_CBD 108 #define MOS1_MOD_CBS 109 #define MOS1_MOD_IS 110 #define MOS1_MOD_PB 111 #define MOS1_MOD_CGSO 112 #define MOS1_MOD_CGDO 113 #define MOS1_MOD_CGBO 114 #define MOS1_MOD_CJ 115 #define MOS1_MOD_MJ 116 #define MOS1_MOD_CJSW 117 #define MOS1_MOD_MJSW 118 #define MOS1_MOD_JS 119 #define MOS1_MOD_TOX 120 #define MOS1_MOD_LD 121 #define MOS1_MOD_RSH 122 #define MOS1_MOD_U0 123 #define MOS1_MOD_FC 124 #define MOS1_MOD_NSUB 125 #define MOS1_MOD_TPG 126 #define MOS1_MOD_NSS 127 #define MOS1_MOD_NMOS 128 #define MOS1_MOD_PMOS 129 #define MOS1_MOD_TNOM 130 #define MOS1_MOD_KF 131 #define MOS1_MOD_AF 132 #define MOS1_MOD_TYPE 133 /* device questions */ #define MOS1_CGS 201 #define MOS1_CGD 202 #define MOS1_DNODE 203 #define MOS1_GNODE 204 #define MOS1_SNODE 205 #define MOS1_BNODE 206 #define MOS1_DNODEPRIME 207 #define MOS1_SNODEPRIME 208 #define MOS1_SOURCECONDUCT 209 #define MOS1_DRAINCONDUCT 210 #define MOS1_VON 211 #define MOS1_VDSAT 212 #define MOS1_SOURCEVCRIT 213 #define MOS1_DRAINVCRIT 214 #define MOS1_CD 215 #define MOS1_CBS 216 #define MOS1_CBD 217 #define MOS1_GMBS 218 #define MOS1_GM 219 #define MOS1_GDS 220 #define MOS1_GBD 221 #define MOS1_GBS 222 #define MOS1_CAPBD 223 #define MOS1_CAPBS 224 #define MOS1_CAPZEROBIASBD 225 #define MOS1_CAPZEROBIASBDSW 226 #define MOS1_CAPZEROBIASBS 227 #define MOS1_CAPZEROBIASBSSW 228 #define MOS1_VBD 229 #define MOS1_VBS 230 #define MOS1_VGS 231 #define MOS1_VDS 232 #define MOS1_CAPGS 233 #define MOS1_QGS 234 #define MOS1_CQGS 235 #define MOS1_CAPGD 236 #define MOS1_QGD 237 #define MOS1_CQGD 238 #define MOS1_CAPGB 239 #define MOS1_QGB 240 #define MOS1_CQGB 241 #define MOS1_QBD 242 #define MOS1_CQBD 243 #define MOS1_QBS 244 #define MOS1_CQBS 245 #define MOS1_L_SENS_REAL 246 #define MOS1_L_SENS_IMAG 247 #define MOS1_L_SENS_MAG 248 #define MOS1_L_SENS_PH 249 #define MOS1_L_SENS_CPLX 250 #define MOS1_W_SENS_REAL 251 #define MOS1_W_SENS_IMAG 252 #define MOS1_W_SENS_MAG 253 #define MOS1_W_SENS_PH 254 #define MOS1_W_SENS_CPLX 255 #define MOS1_L_SENS_DC 256 #define MOS1_W_SENS_DC 257 #define MOS1_SOURCERESIST 258 #define MOS1_DRAINRESIST 259 /* model questions */ #include "mos1ext.h" #endif /*MOS1*/ ngspice-26/src/spicelib/devices/mos1/mos1trun.c0000644000265600020320000000135512264261473021053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; for( ; model != NULL; model = model->MOS1nextModel) { for(here=model->MOS1instances;here!=NULL;here = here->MOS1nextInstance){ CKTterr(here->MOS1qgs,ckt,timeStep); CKTterr(here->MOS1qgd,ckt,timeStep); CKTterr(here->MOS1qgb,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1dest.c0000644000265600020320000000154112264261473021017 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos1defs.h" #include "ngspice/suffix.h" void MOS1destroy(GENmodel **inModel) { MOS1model **model = (MOS1model**)inModel; MOS1instance *here; MOS1instance *prev = NULL; MOS1model *mod = *model; MOS1model *oldmod = NULL; for( ; mod ; mod = mod->MOS1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MOS1instances ; here ; here = here->MOS1nextInstance) { if(prev){ if(prev->MOS1sens) FREE(prev->MOS1sens); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos1/mos1par.c0000644000265600020320000000710212264261473020641 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* ARGSUSED */ int MOS1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; MOS1instance *here = (MOS1instance *)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case MOS1_TEMP: here->MOS1temp = value->rValue+CONSTCtoK; here->MOS1tempGiven = TRUE; break; case MOS1_DTEMP: here->MOS1dtemp = value->rValue; here->MOS1dtempGiven = TRUE; break; case MOS1_M: here->MOS1m = value->rValue; here->MOS1mGiven = TRUE; break; case MOS1_W: here->MOS1w = value->rValue * scale; here->MOS1wGiven = TRUE; break; case MOS1_L: here->MOS1l = value->rValue * scale; here->MOS1lGiven = TRUE; break; case MOS1_AS: here->MOS1sourceArea = value->rValue * scale * scale; here->MOS1sourceAreaGiven = TRUE; break; case MOS1_AD: here->MOS1drainArea = value->rValue * scale * scale; here->MOS1drainAreaGiven = TRUE; break; case MOS1_PS: here->MOS1sourcePerimiter = value->rValue * scale; here->MOS1sourcePerimiterGiven = TRUE; break; case MOS1_PD: here->MOS1drainPerimiter = value->rValue * scale; here->MOS1drainPerimiterGiven = TRUE; break; case MOS1_NRS: here->MOS1sourceSquares = value->rValue; here->MOS1sourceSquaresGiven = TRUE; break; case MOS1_NRD: here->MOS1drainSquares = value->rValue; here->MOS1drainSquaresGiven = TRUE; break; case MOS1_OFF: here->MOS1off = (value->iValue != 0); break; case MOS1_IC_VBS: here->MOS1icVBS = value->rValue; here->MOS1icVBSGiven = TRUE; break; case MOS1_IC_VDS: here->MOS1icVDS = value->rValue; here->MOS1icVDSGiven = TRUE; break; case MOS1_IC_VGS: here->MOS1icVGS = value->rValue; here->MOS1icVGSGiven = TRUE; break; case MOS1_IC: switch(value->v.numValue){ case 3: here->MOS1icVBS = *(value->v.vec.rVec+2); here->MOS1icVBSGiven = TRUE; case 2: here->MOS1icVGS = *(value->v.vec.rVec+1); here->MOS1icVGSGiven = TRUE; case 1: here->MOS1icVDS = *(value->v.vec.rVec); here->MOS1icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MOS1_L_SENS: if(value->iValue) { here->MOS1senParmNo = 1; here->MOS1sens_l = 1; } break; case MOS1_W_SENS: if(value->iValue) { here->MOS1senParmNo = 1; here->MOS1sens_w = 1; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1del.c0000644000265600020320000000155712264261473020633 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1delete(GENmodel *inModel, IFuid name, GENinstance **inst) { MOS1model *model = (MOS1model *)inModel; MOS1instance **fast = (MOS1instance **)inst; MOS1instance **prev = NULL; MOS1instance *here; for( ; model ; model = model->MOS1nextModel) { prev = &(model->MOS1instances); for(here = *prev; here ; here = *prev) { if(here->MOS1name == name || (fast && here==*fast) ) { *prev= here->MOS1nextInstance; FREE(here); return(OK); } prev = &(here->MOS1nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mos1/mos1dset.c0000644000265600020320000004560412264261473021027 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos1defs.h" #include "ngspice/distodef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1dSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS1model *model = (MOS1model *) inModel; MOS1instance *here; double Beta; double DrainSatCur; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double gm; double gds; double gb; double ebd; double vgst; double evbs; double sargsw; double vbd; double vbs; double vds; double arg; double sarg; double vdsat; double vgd; double vgs; double von; double vt; double lgbs; double lgbs2; double lgbs3; double lgbd; double lgbd2; double lgbd3; double gm2; double gds2; double gb2; double gmds; double gmb; double gbds; double gm3; double gds3; double gb3; double gm2ds; double gmds2; double gm2b; double gmb2; double gb2ds; double gbds2; double lcapgb2; double lcapgb3; double lcapgs2; double lcapgs3; double lcapgd2; double lcapgd3; double lcapbs2; double lcapbs3; double lcapbd2; double lcapbd3; double gmbds = 0.0; /* loop through all the MOS1 device models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { vt = CONSTKoverQ * here->MOS1temp; EffectiveLength=here->MOS1l - 2*model->MOS1latDiff; if( (here->MOS1tSatCurDens == 0) || (here->MOS1drainArea == 0) || (here->MOS1sourceArea == 0)) { DrainSatCur = here->MOS1m * here->MOS1tSatCur; SourceSatCur = here->MOS1m * here->MOS1tSatCur; } else { DrainSatCur = here->MOS1tSatCurDens * here->MOS1m * here->MOS1drainArea; SourceSatCur = here->MOS1tSatCurDens * here->MOS1m * here->MOS1sourceArea; } GateSourceOverlapCap = model->MOS1gateSourceOverlapCapFactor * here->MOS1m * here->MOS1w; GateDrainOverlapCap = model->MOS1gateDrainOverlapCapFactor * here->MOS1m * here->MOS1w; GateBulkOverlapCap = model->MOS1gateBulkOverlapCapFactor * here->MOS1m * EffectiveLength; Beta = here->MOS1tTransconductance * here->MOS1m * here->MOS1w/EffectiveLength; OxideCap = model->MOS1oxideCapFactor * EffectiveLength * here->MOS1m * here->MOS1w; vbs = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1bNode) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); vgs = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1gNode) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); vds = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1dNodePrime) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ if(vbs <= 0) { lgbs = SourceSatCur/vt; lgbs += ckt->CKTgmin; lgbs2 = lgbs3 = 0; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); lgbs = SourceSatCur*evbs/vt + ckt->CKTgmin; lgbs2 = model->MOS1type *0.5 * (lgbs - ckt->CKTgmin)/vt; lgbs3 = model->MOS1type *lgbs2/(vt*3); } if(vbd <= 0) { lgbd = DrainSatCur/vt; lgbd += ckt->CKTgmin; lgbd2 = lgbd3 = 0; } else { ebd = exp(MIN(MAX_EXP_ARG,vbd/vt)); lgbd = DrainSatCur*ebd/vt +ckt->CKTgmin; lgbd2 = model->MOS1type *0.5 * (lgbd - ckt->CKTgmin)/vt; lgbd3 = model->MOS1type *lgbd2/(vt*3); } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS1mode = 1; } else { /* inverse mode */ here->MOS1mode = -1; } /* * this block of code evaluates the drain current and its * derivatives using the shichman-hodges model and the * charges associated with the gate, channel and bulk for * mosfets * */ /* the following variables are local to this code block until * it is obvious that they can be made global */ { double betap; double dvondvbs; double d2vondvbs2; double d3vondvbs3; if ((here->MOS1mode==1?vbs:vbd) <= 0 ) { sarg=sqrt(here->MOS1tPhi-(here->MOS1mode==1?vbs:vbd)); if (-model->MOS1gamma != 0.0) { dvondvbs = -model->MOS1gamma*0.5/sarg; d2vondvbs2 = - dvondvbs*0.5/(sarg*sarg); d3vondvbs3 = 1.5*d2vondvbs2/(sarg*sarg); } else { dvondvbs = d2vondvbs2 = d3vondvbs3 = 0.0; } } else { sarg=sqrt(here->MOS1tPhi); if (model->MOS1gamma != 0.0) { dvondvbs = -model->MOS1gamma/(sarg+sarg); } else { dvondvbs = 0.0; } d2vondvbs2 = d3vondvbs3 = 0; sarg=sarg-(here->MOS1mode==1?vbs:vbd)/(sarg+sarg); sarg=MAX(0,sarg); dvondvbs = (sarg<=0?0:dvondvbs); } von=(here->MOS1tVbi*model->MOS1type)+model->MOS1gamma*sarg; vgst=(here->MOS1mode==1?vgs:vgd)-von; vdsat=MAX(vgst,0); /* if (sarg <= 0) { arg=0; } else { arg=model->MOS1gamma/(sarg+sarg); } */ if (vgst <= 0) { /* * cutoff region */ /* cdrain = 0 */ gm=0; gds=0; gb=0; gm2=gb2=gds2=0; gmds=gbds=gmb=0; gm3=gb3=gds3=0; gm2ds=gmds2=gm2b=gmb2=gb2ds=gbds2=0; } else{ /* * saturation region */ betap=Beta*(1+model->MOS1lambda*(vds*here->MOS1mode)); /* cdrain = betap * vgst * vgst * 0.5; */ if (vgst <= (vds*here->MOS1mode)){ gm=betap*vgst; gds=model->MOS1lambda*Beta*vgst*vgst*.5; /* gb=here->MOS1gm*arg; */ gb= -gm*dvondvbs; gm2 = betap; gds2 = 0; gb2 = -(gm*d2vondvbs2 - betap*dvondvbs*dvondvbs); gmds = vgst*model->MOS1lambda*Beta; gbds = - gmds*dvondvbs; gmb = -betap*dvondvbs; gm3 = 0; gb3 = -(gmb*d2vondvbs2 + gm*d3vondvbs3 - betap*2*dvondvbs*d2vondvbs2); gds3 = 0; gm2ds = Beta * model->MOS1lambda; gm2b = 0; gmb2 = -betap*d2vondvbs2; gb2ds = -(gmds*d2vondvbs2 - dvondvbs*dvondvbs* Beta * model->MOS1lambda); gmds2 = 0; gbds2 = 0; gmbds = -Beta * model->MOS1lambda*dvondvbs; } else { /* * linear region */ /* cdrain = betap * vds * (vgst - vds/2); */ gm=betap*(vds*here->MOS1mode); gds= Beta * model->MOS1lambda*(vgst* vds*here->MOS1mode - vds*vds*0.5) + betap*(vgst - vds*here->MOS1mode); /* gb=gm*arg; */ gb = - gm*dvondvbs; gm2 = 0; gb2 = -(gm*d2vondvbs2); gds2 = 2*Beta * model->MOS1lambda*(vgst - vds*here->MOS1mode) - betap; gmds = Beta * model->MOS1lambda* vds * here->MOS1mode + betap; gbds = - gmds*dvondvbs; gmb=0; gm3=0; gb3 = -gm*d3vondvbs3; gds3 = -Beta*model->MOS1lambda*3.; gm2ds=gm2b=gmb2=0; gmds2 = 2*model->MOS1lambda*Beta; gb2ds = -(gmds*d2vondvbs2); gbds2 = -gmds2*dvondvbs; gmbds = 0; } } /* * finished */ } /* code block */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ if (vbs < here->MOS1tDepCap){ arg=1-vbs/here->MOS1tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS1bulkJctBotGradingCoeff == model->MOS1bulkJctSideGradingCoeff) { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); } if(model->MOS1bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS1bulkJctSideGradingCoeff* log(arg)); } } /* lcapbs=here->MOS1Cbs*sarg+ here->MOS1Cbssw*sargsw; */ lcapbs2 = model->MOS1type*0.5/here->MOS1tBulkPot*( here->MOS1Cbs*model->MOS1bulkJctBotGradingCoeff* sarg/arg + here->MOS1Cbssw* model->MOS1bulkJctSideGradingCoeff*sargsw/arg); lcapbs3 = here->MOS1Cbs*sarg* model->MOS1bulkJctBotGradingCoeff* (model->MOS1bulkJctBotGradingCoeff+1); lcapbs3 += here->MOS1Cbssw*sargsw* model->MOS1bulkJctSideGradingCoeff* (model->MOS1bulkJctSideGradingCoeff+1); lcapbs3 = lcapbs3/(6*here->MOS1tBulkPot* here->MOS1tBulkPot*arg*arg); } else { /* *(ckt->CKTstate0 + here->MOS1qbs)= here->MOS1f4s + vbs*(here->MOS1f2s+vbs*(here->MOS1f3s/2));*/ /* lcapbs=here->MOS1f2s+here->MOS1f3s*vbs; */ lcapbs2 = 0.5*here->MOS1f3s; lcapbs3 = 0; } if (vbd < here->MOS1tDepCap) { arg=1-vbd/here->MOS1tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ #ifndef NOSQRT if(model->MOS1bulkJctBotGradingCoeff == .5 && model->MOS1bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { #endif /*NOSQRT*/ sarg = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); #ifndef NOSQRT } if(model->MOS1bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { #endif /*NOSQRT*/ sargsw =exp(-model->MOS1bulkJctSideGradingCoeff* log(arg)); #ifndef NOSQRT } } #endif /*NOSQRT*/ /* lcapbd=here->MOS1Cbd*sarg+ here->MOS1Cbdsw*sargsw; */ lcapbd2 = model->MOS1type*0.5/here->MOS1tBulkPot*( here->MOS1Cbd*model->MOS1bulkJctBotGradingCoeff* sarg/arg + here->MOS1Cbdsw* model->MOS1bulkJctSideGradingCoeff*sargsw/arg); lcapbd3 = here->MOS1Cbd*sarg* model->MOS1bulkJctBotGradingCoeff* (model->MOS1bulkJctBotGradingCoeff+1); lcapbd3 += here->MOS1Cbdsw*sargsw* model->MOS1bulkJctSideGradingCoeff* (model->MOS1bulkJctSideGradingCoeff+1); lcapbd3 = lcapbd3/(6*here->MOS1tBulkPot* here->MOS1tBulkPot*arg*arg); } else { /* lcapbd=here->MOS1f2d + vbd * here->MOS1f3d; */ lcapbd2=0.5*here->MOS1f3d; lcapbd3=0; } /* * meyer's capacitor model */ /* * the meyer capacitance equations are in DEVqmeyer * these expressions are derived from those equations. * these expressions are incorrect; they assume just one * controlling variable for each charge storage element * while actually there are several; the MOS1 small * signal ac linear model is also wrong because it * ignores controlled capacitive elements. these can be * corrected (as can the linear ss ac model) if the * expressions for the charge are available */ { double phi; double cox; double vddif; double vddif1; double vddif2; /* von, vgst and vdsat have already been adjusted for possible source-drain interchange */ phi = here->MOS1tPhi; cox = OxideCap; if (vgst <= -phi) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= -phi/2) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= 0) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs3=lcapgd2=lcapgd3=0; lcapgs2 = cox/(3*phi); } else { /* the MOS1modes are around because vds has not been adjusted */ if (vdsat <= here->MOS1mode*vds) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else { vddif = 2.0*vdsat-here->MOS1mode*vds; vddif1 = vdsat-here->MOS1mode*vds/*-1.0e-12*/; vddif2 = vddif*vddif; lcapgd2 = -vdsat*here->MOS1mode*vds*cox/(3*vddif*vddif2); lcapgd3 = - here->MOS1mode*vds*cox*(vddif - 6*vdsat)/(9*vddif2*vddif2); lcapgs2 = -vddif1*here->MOS1mode*vds*cox/(3*vddif*vddif2); lcapgs3 = - here->MOS1mode*vds*cox*(vddif - 6*vddif1)/(9*vddif2*vddif2); lcapgb2=lcapgb3=0; } } } /* the b-s and b-d diodes need no processing ... */ here->capbs2 = lcapbs2; here->capbs3 = lcapbs3; here->capbd2 = lcapbd2; here->capbd3 = lcapbd3; here->gbs2 = lgbs2; here->gbs3 = lgbs3; here->gbd2 = lgbd2; here->gbd3 = lgbd3; here->capgb2 = model->MOS1type*lcapgb2; here->capgb3 = lcapgb3; /* * process to get Taylor coefficients, taking into * account type and mode. */ if (here->MOS1mode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x2 = gm2; here->cdr_y2 = gb2;; here->cdr_z2 = gds2;; here->cdr_xy = gmb; here->cdr_yz = gbds; here->cdr_xz = gmds; here->cdr_x3 = gm3; here->cdr_y3 = gb3; here->cdr_z3 = gds3; here->cdr_x2z = gm2ds; here->cdr_x2y = gm2b; here->cdr_y2z = gb2ds; here->cdr_xy2 = gmb2; here->cdr_xz2 = gmds2; here->cdr_yz2 = gbds2; here->cdr_xyz = gmbds; /* the gate caps have been divided and made into Taylor coeffs., but not adjusted for type */ here->capgs2 = model->MOS1type*lcapgs2; here->capgs3 = lcapgs3; here->capgd2 = model->MOS1type*lcapgd2; here->capgd3 = lcapgd3; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x2 = -gm2; here->cdr_y2 = -gb2; here->cdr_z2 = -(gm2 + gb2 + gds2 + 2*(gmb + gmds + gbds)); here->cdr_xy = -gmb; here->cdr_yz = gmb + gb2 + gbds; here->cdr_xz = gm2 + gmb + gmds; here->cdr_x3 = -gm3; here->cdr_y3 = -gb3; here->cdr_z3 = gm3 + gb3 + gds3 + 3*(gm2b + gm2ds + gmb2 + gb2ds + gmds2 + gbds2) + 6*gmbds ; here->cdr_x2z = gm3 + gm2b + gm2ds; here->cdr_x2y = -gm2b; here->cdr_y2z = gmb2 + gb3 + gb2ds; here->cdr_xy2 = -gmb2; here->cdr_xz2 = -(gm3 + 2*(gm2b + gm2ds + gmbds) + gmb2 + gmds2); here->cdr_yz2 = -(gb3 + 2*(gmb2 + gb2ds + gmbds) + gm2b + gbds2); here->cdr_xyz = gm2b + gmb2 + gmbds; here->capgs2 = model->MOS1type*lcapgd2; here->capgs3 = lcapgd3; here->capgd2 = model->MOS1type*lcapgs2; here->capgd3 = lcapgs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->MOS1type*here->cdr_x2; here->cdr_y2 = 0.5*model->MOS1type*here->cdr_y2; here->cdr_z2 = 0.5*model->MOS1type*here->cdr_z2; here->cdr_xy = model->MOS1type*here->cdr_xy; here->cdr_yz = model->MOS1type*here->cdr_yz; here->cdr_xz = model->MOS1type*here->cdr_xz; here->cdr_x3 = here->cdr_x3/6.; here->cdr_y3 = here->cdr_y3/6.; here->cdr_z3 = here->cdr_z3/6.; here->cdr_x2z = 0.5*here->cdr_x2z; here->cdr_x2y = 0.5*here->cdr_x2y; here->cdr_y2z = 0.5*here->cdr_y2z; here->cdr_xy2 = 0.5*here->cdr_xy2; here->cdr_xz2 = 0.5*here->cdr_xz2; here->cdr_yz2 = 0.5*here->cdr_yz2; } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1mask.c0000644000265600020320000000720012264261473021011 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS1mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { MOS1model *model = (MOS1model *)inst; NG_IGNORE(ckt); switch(which) { case MOS1_MOD_TNOM: value->rValue = model->MOS1tnom-CONSTCtoK; return(OK); case MOS1_MOD_VTO: value->rValue = model->MOS1vt0; return(OK); case MOS1_MOD_KP: value->rValue = model->MOS1transconductance; return(OK); case MOS1_MOD_GAMMA: value->rValue = model->MOS1gamma; return(OK); case MOS1_MOD_PHI: value->rValue = model->MOS1phi; return(OK); case MOS1_MOD_LAMBDA: value->rValue = model->MOS1lambda; return(OK); case MOS1_MOD_RD: value->rValue = model->MOS1drainResistance; return(OK); case MOS1_MOD_RS: value->rValue = model->MOS1sourceResistance; return(OK); case MOS1_MOD_CBD: value->rValue = model->MOS1capBD; return(OK); case MOS1_MOD_CBS: value->rValue = model->MOS1capBS; return(OK); case MOS1_MOD_IS: value->rValue = model->MOS1jctSatCur; return(OK); case MOS1_MOD_PB: value->rValue = model->MOS1bulkJctPotential; return(OK); case MOS1_MOD_CGSO: value->rValue = model->MOS1gateSourceOverlapCapFactor; return(OK); case MOS1_MOD_CGDO: value->rValue = model->MOS1gateDrainOverlapCapFactor; return(OK); case MOS1_MOD_CGBO: value->rValue = model->MOS1gateBulkOverlapCapFactor; return(OK); case MOS1_MOD_CJ: value->rValue = model->MOS1bulkCapFactor; return(OK); case MOS1_MOD_MJ: value->rValue = model->MOS1bulkJctBotGradingCoeff; return(OK); case MOS1_MOD_CJSW: value->rValue = model->MOS1sideWallCapFactor; return(OK); case MOS1_MOD_MJSW: value->rValue = model->MOS1bulkJctSideGradingCoeff; return(OK); case MOS1_MOD_JS: value->rValue = model->MOS1jctSatCurDensity; return(OK); case MOS1_MOD_TOX: value->rValue = model->MOS1oxideThickness; return(OK); case MOS1_MOD_LD: value->rValue = model->MOS1latDiff; return(OK); case MOS1_MOD_RSH: value->rValue = model->MOS1sheetResistance; return(OK); case MOS1_MOD_U0: value->rValue = model->MOS1surfaceMobility; return(OK); case MOS1_MOD_FC: value->rValue = model->MOS1fwdCapDepCoeff; return(OK); case MOS1_MOD_NSUB: value->rValue = model->MOS1substrateDoping; return(OK); case MOS1_MOD_TPG: value->iValue = model->MOS1gateType; return(OK); case MOS1_MOD_NSS: value->rValue = model->MOS1surfaceStateDensity; return(OK); case MOS1_MOD_TYPE: if (model->MOS1type > 0) value->sValue = "nmos"; else value->sValue = "pmos"; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos1/mos1sset.c0000644000265600020320000000261112264261473021035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1sSetup(SENstruct *info, GENmodel *inModel) /* loop through all the devices and * allocate parameter #s to design parameters */ { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; /* loop through all the models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { if(here->MOS1senParmNo){ if((here->MOS1sens_l)&&(here->MOS1sens_w)){ here->MOS1senParmNo = ++(info->SENparms); ++(info->SENparms);/* MOS has two design parameters */ } else{ here->MOS1senParmNo = ++(info->SENparms); } } if((here->MOS1sens = TMALLOC(double, 70)) == NULL) { return(E_NOMEM); } here->MOS1senPertFlag = OFF; } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1noi.c0000644000265600020320000001521312264261473020646 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "mos1defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * MOS1noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int MOS1noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; MOS1model *firstModel = (MOS1model *) genmodel; MOS1model *model; MOS1instance *inst; char name[N_MXVLNTH]; double coxSquared; double tempOnoise; double tempInoise; double noizDens[MOS1NSRCS]; double lnNdens[MOS1NSRCS]; int i; /* define the names of the noise sources */ static char *MOS1nNames[MOS1NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in MOS1defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->MOS1nextModel) { /* Oxide capacitance can be zero in MOS level 1. Since this will give us problems in our 1/f */ /* noise model, we ASSUME an actual "tox" of 1e-7 */ if (model->MOS1oxideCapFactor == 0.0) { coxSquared = 3.9 * 8.854214871e-12 / 1e-7; } else { coxSquared = model->MOS1oxideCapFactor; } coxSquared *= coxSquared; for (inst=model->MOS1instances; inst != NULL; inst=inst->MOS1nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < MOS1NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->MOS1name,MOS1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < MOS1NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->MOS1name,MOS1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->MOS1name,MOS1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[MOS1RDNOIZ],&lnNdens[MOS1RDNOIZ], ckt,THERMNOISE,inst->MOS1dNodePrime,inst->MOS1dNode, inst->MOS1drainConductance); NevalSrc(&noizDens[MOS1RSNOIZ],&lnNdens[MOS1RSNOIZ], ckt,THERMNOISE,inst->MOS1sNodePrime,inst->MOS1sNode, inst->MOS1sourceConductance); NevalSrc(&noizDens[MOS1IDNOIZ],&lnNdens[MOS1IDNOIZ], ckt,THERMNOISE,inst->MOS1dNodePrime,inst->MOS1sNodePrime, (2.0/3.0 * fabs(inst->MOS1gm))); NevalSrc(&noizDens[MOS1FLNOIZ], NULL, ckt, N_GAIN,inst->MOS1dNodePrime, inst->MOS1sNodePrime, (double)0.0); noizDens[MOS1FLNOIZ] *= model->MOS1fNcoef * exp(model->MOS1fNexp * log(MAX(fabs(inst->MOS1cd),N_MINLOG))) / (data->freq * inst->MOS1w * inst->MOS1m * (inst->MOS1l - 2*model->MOS1latDiff) * coxSquared); lnNdens[MOS1FLNOIZ] = log(MAX(noizDens[MOS1FLNOIZ],N_MINLOG)); noizDens[MOS1TOTNOIZ] = noizDens[MOS1RDNOIZ] + noizDens[MOS1RSNOIZ] + noizDens[MOS1IDNOIZ] + noizDens[MOS1FLNOIZ]; lnNdens[MOS1TOTNOIZ] = log(MAX(noizDens[MOS1TOTNOIZ], N_MINLOG)); *OnDens += noizDens[MOS1TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < MOS1NSRCS; i++) { inst->MOS1nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < MOS1NSRCS; i++) { inst->MOS1nVar[OUTNOIZ][i] = 0.0; inst->MOS1nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < MOS1NSRCS; i++) { if (i != MOS1TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->MOS1nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->MOS1nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->MOS1nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->MOS1nVar[OUTNOIZ][i] += tempOnoise; inst->MOS1nVar[OUTNOIZ][MOS1TOTNOIZ] += tempOnoise; inst->MOS1nVar[INNOIZ][i] += tempInoise; inst->MOS1nVar[INNOIZ][MOS1TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < MOS1NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < MOS1NSRCS; i++) { data->outpVector[data->outNumber++] = inst->MOS1nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->MOS1nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1init.h0000644000265600020320000000037012264261473021027 0ustar andreasadmin#ifndef _MOS1INIT_H #define _MOS1INIT_H extern IFparm MOS1pTable[ ]; extern IFparm MOS1mPTable[ ]; extern char *MOS1names[ ]; extern int MOS1pTSize; extern int MOS1mPTSize; extern int MOS1nSize; extern int MOS1iSize; extern int MOS1mSize; #endif ngspice-26/src/spicelib/devices/mos1/mos1sacl.c0000644000265600020320000007417712264261473021021 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* actually load the current ac sensitivity * information into the array previously provided */ int MOS1sAcLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model*)inModel; MOS1instance *here; int xnrm; int xrev; double A0; double Apert = 0.0; double DELA; double DELAinv; double gdpr0; double gspr0; double gds0; double gbs0; double gbd0; double gm0; double gmbs0; double gdpr; double gspr; double gds; double gbs; double gbd; double gm; double gmbs; double xcgs0; double xcgd0; double xcgb0; double xbd0; double xbs0; double xcgs; double xcgd; double xcgb; double xbd; double xbs; double vbsOp; double vbdOp; double vspr; double vdpr; double vgs; double vgd; double vgb; double vbs; double vbd; double vds; double ivspr; double ivdpr; double ivgs; double ivgd; double ivgb; double ivbs; double ivbd; double ivds; double cspr; double cdpr; double cgs; double cgd; double cgb; double cbs; double cbd; double cds; double cs0; double csprm0; double cd0; double cdprm0; double cg0; double cb0; double cs; double csprm; double cd; double cdprm; double cg; double cb; double icspr; double icdpr; double icgs; double icgd; double icgb; double icbs; double icbd; double icds; double ics0; double icsprm0; double icd0; double icdprm0; double icg0; double icb0; double ics; double icsprm; double icd; double icdprm; double icg; double icb; double DvDp = 0.0; int i; int flag; int error; int iparmno; double arg; double sarg; double sargsw; double SaveState[44]; int save_mode; SENstruct *info; #ifdef SENSDEBUG printf("MOS1senacload\n"); printf("CKTomega = %.5e\n",ckt->CKTomega); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; for( ; model != NULL; model = model->MOS1nextModel) { for(here = model->MOS1instances; here!= NULL; here = here->MOS1nextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++) *(SaveState + i) = *(ckt->CKTstate0 + here->MOS1states + i); *(SaveState + 17) = here->MOS1sourceConductance; *(SaveState + 18) = here->MOS1drainConductance; *(SaveState + 19) = here->MOS1cd; *(SaveState + 20) = here->MOS1cbs; *(SaveState + 21) = here->MOS1cbd; *(SaveState + 22) = here->MOS1gmbs; *(SaveState + 23) = here->MOS1gm; *(SaveState + 24) = here->MOS1gds; *(SaveState + 25) = here->MOS1gbd; *(SaveState + 26) = here->MOS1gbs; *(SaveState + 27) = here->MOS1capbd; *(SaveState + 28) = here->MOS1capbs; *(SaveState + 29) = here->MOS1Cbd; *(SaveState + 30) = here->MOS1Cbdsw; *(SaveState + 31) = here->MOS1Cbs; *(SaveState + 32) = here->MOS1Cbssw; *(SaveState + 33) = here->MOS1f2d; *(SaveState + 34) = here->MOS1f3d; *(SaveState + 35) = here->MOS1f4d; *(SaveState + 36) = here->MOS1f2s; *(SaveState + 37) = here->MOS1f3s; *(SaveState + 38) = here->MOS1f4s; *(SaveState + 39) = here->MOS1cgs; *(SaveState + 40) = here->MOS1cgd; *(SaveState + 41) = here->MOS1cgb; *(SaveState + 42) = here->MOS1vdsat; *(SaveState + 43) = here->MOS1von; save_mode = here->MOS1mode; xnrm=1; xrev=0; if (here->MOS1mode < 0) { xnrm=0; xrev=1; } vbsOp = model->MOS1type * ( *(ckt->CKTrhsOp+here->MOS1bNode) - *(ckt->CKTrhsOp+here->MOS1sNodePrime)); vbdOp = model->MOS1type * ( *(ckt->CKTrhsOp+here->MOS1bNode) - *(ckt->CKTrhsOp+here->MOS1dNodePrime)); vspr = *(ckt->CKTrhsOld + here->MOS1sNode) - *(ckt->CKTrhsOld + here->MOS1sNodePrime) ; ivspr = *(ckt->CKTirhsOld + here->MOS1sNode) - *(ckt->CKTirhsOld + here->MOS1sNodePrime) ; vdpr = *(ckt->CKTrhsOld + here->MOS1dNode) - *(ckt->CKTrhsOld + here->MOS1dNodePrime) ; ivdpr = *(ckt->CKTirhsOld + here->MOS1dNode) - *(ckt->CKTirhsOld + here->MOS1dNodePrime) ; vgb = *(ckt->CKTrhsOld + here->MOS1gNode) - *(ckt->CKTrhsOld + here->MOS1bNode) ; ivgb = *(ckt->CKTirhsOld + here->MOS1gNode) - *(ckt->CKTirhsOld + here->MOS1bNode) ; vbs = *(ckt->CKTrhsOld + here->MOS1bNode) - *(ckt->CKTrhsOld + here->MOS1sNodePrime) ; ivbs = *(ckt->CKTirhsOld + here->MOS1bNode) - *(ckt->CKTirhsOld + here->MOS1sNodePrime) ; vbd = *(ckt->CKTrhsOld + here->MOS1bNode) - *(ckt->CKTrhsOld + here->MOS1dNodePrime) ; ivbd = *(ckt->CKTirhsOld + here->MOS1bNode) - *(ckt->CKTirhsOld + here->MOS1dNodePrime) ; vds = vbs - vbd ; ivds = ivbs - ivbd ; vgs = vgb + vbs ; ivgs = ivgb + ivbs ; vgd = vgb + vbd ; ivgd = ivgb + ivbd ; #ifdef SENSDEBUG printf("senacload instance name %s\n",here->MOS1name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS1gNode,here->MOS1dNode,here->MOS1dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS1sNode ,here->MOS1sNodePrime,here->MOS1bNode, here->MOS1senParmNo); printf("\n without perturbation \n"); #endif /* SENSDEBUG */ /* without perturbation */ *(ckt->CKTstate0 + here->MOS1vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS1vbd) = vbdOp; here->MOS1senPertFlag = ON ; if(info->SENacpertflag == 1){ /* store the unperturbed values of small signal parameters */ if((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs) = here->MOS1cgs; *(here->MOS1senCgd) = here->MOS1cgd; *(here->MOS1senCgb) = here->MOS1cgb; *(here->MOS1senCbd) = here->MOS1capbd; *(here->MOS1senCbs) = here->MOS1capbs; *(here->MOS1senGds) = here->MOS1gds; *(here->MOS1senGbs) = here->MOS1gbs; *(here->MOS1senGbd) = here->MOS1gbd; *(here->MOS1senGm) = here->MOS1gm; *(here->MOS1senGmbs) = here->MOS1gmbs; } xcgs0= *(here->MOS1senCgs) * ckt->CKTomega; xcgd0= *(here->MOS1senCgd) * ckt->CKTomega; xcgb0= *(here->MOS1senCgb) * ckt->CKTomega; xbd0= *(here->MOS1senCbd) * ckt->CKTomega; xbs0= *(here->MOS1senCbs) * ckt->CKTomega; gds0= *(here->MOS1senGds); gbs0= *(here->MOS1senGbs); gbd0= *(here->MOS1senGbd); gm0= *(here->MOS1senGm); gmbs0= *(here->MOS1senGmbs); gdpr0 = here->MOS1drainConductance; gspr0 = here->MOS1sourceConductance; cspr = gspr0 * vspr ; icspr = gspr0 * ivspr ; cdpr = gdpr0 * vdpr ; icdpr = gdpr0 * ivdpr ; cgs = ( - xcgs0 * ivgs ); icgs = xcgs0 * vgs ; cgd = ( - xcgd0 * ivgd ); icgd = xcgd0 * vgd ; cgb = ( - xcgb0 * ivgb ); icgb = xcgb0 * vgb ; cbs = ( gbs0 * vbs - xbs0 * ivbs ); icbs = ( xbs0 * vbs + gbs0 * ivbs ); cbd = ( gbd0 * vbd - xbd0 * ivbd ); icbd = ( xbd0 * vbd + gbd0 * ivbd ); cds = ( gds0 * vds + xnrm * (gm0 * vgs + gmbs0 * vbs) - xrev * (gm0 * vgd + gmbs0 * vbd) ); icds = ( gds0 * ivds + xnrm * (gm0 * ivgs + gmbs0 * ivbs) - xrev * (gm0 * ivgd + gmbs0 * ivbd) ); cs0 = cspr; ics0 = icspr; csprm0 = ( -cspr - cgs - cbs - cds ) ; icsprm0 = ( -icspr - icgs - icbs - icds ) ; cd0 = cdpr; icd0 = icdpr; cdprm0 = ( -cdpr - cgd - cbd + cds ) ; icdprm0 = ( -icdpr - icgd - icbd + icds ) ; cg0 = cgs + cgd + cgb ; icg0 = icgs + icgd + icgb ; cb0 = cbs + cbd - cgb ; icb0 = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("gspr0 = %.7e , gdpr0 = %.7e , gds0 = %.7e, gbs0 = %.7e\n", gspr0,gdpr0,gds0,gbs0); printf("gbd0 = %.7e , gm0 = %.7e , gmbs0 = %.7e\n",gbd0,gm0,gmbs0); printf("xcgs0 = %.7e , xcgd0 = %.7e , xcgb0 = %.7e,", xcgs0,xcgd0,xcgb0); printf("xbd0 = %.7e,xbs0 = %.7e\n",xbd0,xbs0); printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs0 = %.7e , cbd0 = %.7e , cgb0 = %.7e\n",cbs,cbd,cgb); printf("cb0 = %.7e , cg0 = %.7e , cs0 = %.7e\n",cb0,cg0,cs0); printf("csprm0 = %.7e, cd0 = %.7e, cdprm0 = %.7e\n", csprm0,cd0,cdprm0); printf("icb0 = %.7e , icg0 = %.7e , ics0 = %.7e\n",icb0,icg0,ics0); printf("icsprm0 = %.7e, icd0 = %.7e, icdprm0 = %.7e\n", icsprm0,icd0,icdprm0); printf("\nPerturbation of vbs\n"); #endif /* SENSDEBUG */ /* Perturbation of vbs */ flag = 1; A0 = vbsOp; DELA = info->SENpertfac * here->MOS1tVto ; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbs */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS1vbs) = Apert; *(ckt->CKTstate0 + here->MOS1vbd) = vbdOp; if((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs + 1) = here->MOS1cgs; *(here->MOS1senCgd + 1) = here->MOS1cgd; *(here->MOS1senCgb + 1) = here->MOS1cgb; *(here->MOS1senCbd + 1) = here->MOS1capbd; *(here->MOS1senCbs + 1) = here->MOS1capbs; *(here->MOS1senGds + 1) = here->MOS1gds; *(here->MOS1senGbs + 1) = here->MOS1gbs; *(here->MOS1senGbd + 1) = here->MOS1gbd; *(here->MOS1senGm + 1) = here->MOS1gm; *(here->MOS1senGmbs + 1) = here->MOS1gmbs; *(ckt->CKTstate0 + here->MOS1vbs) = A0; } goto load; pertvbd: /* Perturbation of vbd */ #ifdef SENSDEBUG printf("\nPerturbation of vbd\n"); #endif /* SENSDEBUG */ flag = 2; A0 = vbdOp; DELA = info->SENpertfac * here->MOS1tVto + 1e-8; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbd */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS1vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS1vbd) = Apert; if((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs + 2) = here->MOS1cgs; *(here->MOS1senCgd + 2) = here->MOS1cgd; *(here->MOS1senCgb + 2) = here->MOS1cgb; *(here->MOS1senCbd + 2) = here->MOS1capbd; *(here->MOS1senCbs + 2) = here->MOS1capbs; *(here->MOS1senGds + 2) = here->MOS1gds; *(here->MOS1senGbs + 2) = here->MOS1gbs; *(here->MOS1senGbd + 2) = here->MOS1gbd; *(here->MOS1senGm + 2) = here->MOS1gm; *(here->MOS1senGmbs + 2) = here->MOS1gmbs; *(ckt->CKTstate0 + here->MOS1vbd) = A0; } goto load; pertvgb: /* Perturbation of vgb */ #ifdef SENSDEBUG printf("\nPerturbation of vgb\n"); #endif /* SENSDEBUG */ flag = 3; A0 = model->MOS1type * (*(ckt->CKTrhsOp + here->MOS1gNode) - *(ckt->CKTrhsOp + here->MOS1bNode)); DELA = info->SENpertfac * A0 + 1e-8; DELAinv = model->MOS1type * 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vgb */ *(ckt->CKTstate0 + here->MOS1vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS1vbd) = vbdOp; *(ckt->CKTrhsOp + here->MOS1bNode) -= DELA; if((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs + 3) = here->MOS1cgs; *(here->MOS1senCgd + 3) = here->MOS1cgd; *(here->MOS1senCgb + 3) = here->MOS1cgb; *(here->MOS1senCbd + 3) = here->MOS1capbd; *(here->MOS1senCbs + 3) = here->MOS1capbs; *(here->MOS1senGds + 3) = here->MOS1gds; *(here->MOS1senGbs + 3) = here->MOS1gbs; *(here->MOS1senGbd + 3) = here->MOS1gbd; *(here->MOS1senGm + 3) = here->MOS1gm; *(here->MOS1senGmbs + 3) = here->MOS1gmbs; *(ckt->CKTrhsOp + here->MOS1bNode) += DELA; } goto load; pertl: /* Perturbation of length */ if(here->MOS1sens_l == 0){ goto pertw; } #ifdef SENSDEBUG printf("\nPerturbation of length\n"); #endif /* SENSDEBUG */ flag = 4; A0 = here->MOS1l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed length */ Apert = A0 + DELA; here->MOS1l = Apert; *(ckt->CKTstate0 + here->MOS1vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS1vbd) = vbdOp; if ((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs + 4) = here->MOS1cgs; *(here->MOS1senCgd + 4) = here->MOS1cgd; *(here->MOS1senCgb + 4) = here->MOS1cgb; *(here->MOS1senCbd + 4) = here->MOS1capbd; *(here->MOS1senCbs + 4) = here->MOS1capbs; *(here->MOS1senGds + 4) = here->MOS1gds; *(here->MOS1senGbs + 4) = here->MOS1gbs; *(here->MOS1senGbd + 4) = here->MOS1gbd; *(here->MOS1senGm + 4) = here->MOS1gm; *(here->MOS1senGmbs + 4) = here->MOS1gmbs; here->MOS1l = A0; } goto load; pertw: /* Perturbation of width */ if(here->MOS1sens_w == 0) goto next; #ifdef SENSDEBUG printf("\nPerturbation of width\n"); #endif /* SENSDEBUG */ flag = 5; A0 = here->MOS1w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed width */ here->MOS1w = Apert; here->MOS1drainArea *= (1 + info->SENpertfac); here->MOS1sourceArea *= (1 + info->SENpertfac); here->MOS1Cbd *= (1 + info->SENpertfac); here->MOS1Cbs *= (1 + info->SENpertfac); if(here->MOS1drainPerimiter){ here->MOS1Cbdsw += here->MOS1Cbdsw * DELA/here->MOS1drainPerimiter; } if(here->MOS1sourcePerimiter){ here->MOS1Cbssw += here->MOS1Cbssw * DELA/here->MOS1sourcePerimiter; } if(vbdOp >= here->MOS1tDepCap){ arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1f2d = here->MOS1Cbd*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + here->MOS1Cbdsw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3d = here->MOS1Cbd * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + here->MOS1Cbdsw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg / here->MOS1tBulkPot; here->MOS1f4d = here->MOS1Cbd*here->MOS1tBulkPot* (1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + here->MOS1Cbdsw*here->MOS1tBulkPot*(1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3d/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2d; } if(vbsOp >= here->MOS1tDepCap){ arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1f2s = here->MOS1Cbs*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + here->MOS1Cbssw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3s = here->MOS1Cbs * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + here->MOS1Cbssw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg / here->MOS1tBulkPot; here->MOS1f4s = here->MOS1Cbs* here->MOS1tBulkPot*(1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + here->MOS1Cbssw*here->MOS1tBulkPot*(1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3s/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2s; } *(ckt->CKTstate0 + here->MOS1vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS1vbd) = vbdOp; if ((error = MOS1load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS1senCgs + 5) = here->MOS1cgs; *(here->MOS1senCgd + 5) = here->MOS1cgd; *(here->MOS1senCgb + 5) = here->MOS1cgb; *(here->MOS1senCbd + 5) = here->MOS1capbd; *(here->MOS1senCbs + 5) = here->MOS1capbs; *(here->MOS1senGds + 5) = here->MOS1gds; *(here->MOS1senGbs + 5) = here->MOS1gbs; *(here->MOS1senGbd + 5) = here->MOS1gbd; *(here->MOS1senGm + 5) = here->MOS1gm; *(here->MOS1senGmbs + 5) = here->MOS1gmbs; here->MOS1w = A0; here->MOS1drainArea /= (1 + info->SENpertfac); here->MOS1sourceArea /= (1 + info->SENpertfac); } load: gds= *(here->MOS1senGds + flag); gbs= *(here->MOS1senGbs + flag); gbd= *(here->MOS1senGbd + flag); gm= *(here->MOS1senGm + flag); gmbs= *(here->MOS1senGmbs + flag); if(flag == 5){ gdpr = here->MOS1drainConductance * Apert/A0; gspr = here->MOS1sourceConductance * Apert/A0; } else{ gdpr = here->MOS1drainConductance; gspr = here->MOS1sourceConductance; } xcgs= *(here->MOS1senCgs + flag) * ckt->CKTomega; xcgd= *(here->MOS1senCgd + flag) * ckt->CKTomega; xcgb= *(here->MOS1senCgb + flag) * ckt->CKTomega; xbd= *(here->MOS1senCbd + flag) * ckt->CKTomega; xbs= *(here->MOS1senCbs + flag) * ckt->CKTomega; #ifdef SENSDEBUG printf("flag = %d \n",flag); printf("gspr = %.7e , gdpr = %.7e , gds = %.7e, gbs = %.7e\n", gspr,gdpr,gds,gbs); printf("gbd = %.7e , gm = %.7e , gmbs = %.7e\n",gbd,gm,gmbs); printf("xcgs = %.7e , xcgd = %.7e , xcgb = %.7e,", xcgs,xcgd,xcgb); printf("xbd = %.7e,xbs = %.7e\n",xbd,xbs); #endif /* SENSDEBUG */ cspr = gspr * vspr ; icspr = gspr * ivspr ; cdpr = gdpr * vdpr ; icdpr = gdpr * ivdpr ; cgs = ( - xcgs * ivgs ); icgs = xcgs * vgs ; cgd = ( - xcgd * ivgd ); icgd = xcgd * vgd ; cgb = ( - xcgb * ivgb ); icgb = xcgb * vgb ; cbs = ( gbs * vbs - xbs * ivbs ); icbs = ( xbs * vbs + gbs * ivbs ); cbd = ( gbd * vbd - xbd * ivbd ); icbd = ( xbd * vbd + gbd * ivbd ); cds = ( gds * vds + xnrm * (gm * vgs + gmbs * vbs) - xrev * (gm * vgd + gmbs * vbd) ); icds = ( gds * ivds + xnrm * (gm * ivgs + gmbs * ivbs) - xrev * (gm * ivgd + gmbs * ivbd) ); cs = cspr; ics = icspr; csprm = ( -cspr - cgs - cbs - cds ) ; icsprm = ( -icspr - icgs - icbs - icds ) ; cd = cdpr; icd = icdpr; cdprm = ( -cdpr - cgd - cbd + cds ) ; icdprm = ( -icdpr - icgd - icbd + icds ) ; cg = cgs + cgd + cgb ; icg = icgs + icgd + icgb ; cb = cbs + cbd - cgb ; icb = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs = %.7e , cbd = %.7e , cgb = %.7e\n",cbs,cbd,cgb); printf("cb = %.7e , cg = %.7e , cs = %.7e\n",cb,cg,cs); printf("csprm = %.7e, cd = %.7e, cdprm = %.7e\n",csprm,cd,cdprm); printf("icb = %.7e , icg = %.7e , ics = %.7e\n",icb,icg,ics); printf("icsprm = %.7e, icd = %.7e, icdprm = %.7e\n", icsprm,icd,icdprm); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if((flag == 4) && (iparmno != here->MOS1senParmNo)) continue; if( (flag == 5) && (iparmno != (here->MOS1senParmNo + here->MOS1sens_l))) continue; switch(flag){ case 1: DvDp = model->MOS1type * (info->SEN_Sap[here->MOS1bNode][iparmno] - info->SEN_Sap[here->MOS1sNodePrime][iparmno]); break; case 2: DvDp = model->MOS1type * ( info->SEN_Sap[here->MOS1bNode][iparmno] - info->SEN_Sap[here->MOS1dNodePrime][iparmno]); break; case 3: DvDp = model->MOS1type * ( info->SEN_Sap[here->MOS1gNode][iparmno] - info->SEN_Sap[here->MOS1bNode][iparmno]); break; case 4: DvDp = 1; break; case 5: DvDp = 1; break; } *(info->SEN_RHS[here->MOS1bNode] + iparmno) -= ( cb - cb0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1bNode] + iparmno) -= ( icb - icb0) * DELAinv * DvDp; *(info->SEN_RHS[here->MOS1gNode] + iparmno) -= ( cg - cg0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1gNode] + iparmno) -= ( icg - icg0) * DELAinv * DvDp; if(here->MOS1sNode != here->MOS1sNodePrime){ *(info->SEN_RHS[here->MOS1sNode] + iparmno) -= ( cs - cs0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1sNode] + iparmno) -= ( ics - ics0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS1sNodePrime] + iparmno) -= ( csprm - csprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1sNodePrime] + iparmno) -= ( icsprm - icsprm0) * DELAinv * DvDp; if(here->MOS1dNode != here->MOS1dNodePrime){ *(info->SEN_RHS[here->MOS1dNode] + iparmno) -= ( cd - cd0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1dNode] + iparmno) -= ( icd - icd0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS1dNodePrime] + iparmno) -= ( cdprm - cdprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS1dNodePrime] + iparmno) -= ( icdprm - icdprm0) * DELAinv * DvDp; #ifdef SENSDEBUG printf("after loading\n"); printf("DvDp = %.5e , DELAinv = %.5e ,flag = %d ,", DvDp,DELAinv,flag); printf("iparmno = %d,senparmno = %d\n", iparmno,here->MOS1senParmNo); printf("A0 = %.5e , Apert = %.5e ,CONSTvt = %.5e \n", A0,Apert,here->MOS1tVto); printf("senb = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1bNode] + iparmno), *(info->SEN_iRHS[here->MOS1bNode] + iparmno)); printf("seng = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1gNode] + iparmno), *(info->SEN_iRHS[here->MOS1gNode] + iparmno)); printf("sens = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1sNode] + iparmno), *(info->SEN_iRHS[here->MOS1sNode] + iparmno)); printf("sensprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1sNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS1sNodePrime] + iparmno)); printf("send = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1dNode] + iparmno), *(info->SEN_iRHS[here->MOS1dNode] + iparmno)); printf("sendprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS1dNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS1dNodePrime] + iparmno)); #endif /* SENSDEBUG */ } switch(flag){ case 1: goto pertvbd ; case 2: goto pertvgb ; case 3: goto pertl ; case 4: goto pertw ; case 5: break; } next: ; /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS1states + i) = *(SaveState + i); here->MOS1sourceConductance = *(SaveState + 17) ; here->MOS1drainConductance = *(SaveState + 18) ; here->MOS1cd = *(SaveState + 19) ; here->MOS1cbs = *(SaveState + 20) ; here->MOS1cbd = *(SaveState + 21) ; here->MOS1gmbs = *(SaveState + 22) ; here->MOS1gm = *(SaveState + 23) ; here->MOS1gds = *(SaveState + 24) ; here->MOS1gbd = *(SaveState + 25) ; here->MOS1gbs = *(SaveState + 26) ; here->MOS1capbd = *(SaveState + 27) ; here->MOS1capbs = *(SaveState + 28) ; here->MOS1Cbd = *(SaveState + 29) ; here->MOS1Cbdsw = *(SaveState + 30) ; here->MOS1Cbs = *(SaveState + 31) ; here->MOS1Cbssw = *(SaveState + 32) ; here->MOS1f2d = *(SaveState + 33) ; here->MOS1f3d = *(SaveState + 34) ; here->MOS1f4d = *(SaveState + 35) ; here->MOS1f2s = *(SaveState + 36) ; here->MOS1f3s = *(SaveState + 37) ; here->MOS1f4s = *(SaveState + 38) ; here->MOS1cgs = *(SaveState + 39) ; here->MOS1cgd = *(SaveState + 40) ; here->MOS1cgb = *(SaveState + 41) ; here->MOS1vdsat = *(SaveState + 42) ; here->MOS1von = *(SaveState + 43) ; here->MOS1mode = save_mode ; here->MOS1senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS1senacload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1set.c0000644000265600020320000001733312264261473020661 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* load the MOS1 device structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; int error; CKTnode *tmp; /* loop through all the MOS1 device models */ for( ; model != NULL; model = model->MOS1nextModel ) { if(!model->MOS1typeGiven) { model->MOS1type = NMOS; } if(!model->MOS1latDiffGiven) { model->MOS1latDiff = 0; } if(!model->MOS1jctSatCurDensityGiven) { model->MOS1jctSatCurDensity = 0; } if(!model->MOS1jctSatCurGiven) { model->MOS1jctSatCur = 1e-14; } if(!model->MOS1transconductanceGiven) { model->MOS1transconductance = 2e-5; } if(!model->MOS1gateSourceOverlapCapFactorGiven) { model->MOS1gateSourceOverlapCapFactor = 0; } if(!model->MOS1gateDrainOverlapCapFactorGiven) { model->MOS1gateDrainOverlapCapFactor = 0; } if(!model->MOS1gateBulkOverlapCapFactorGiven) { model->MOS1gateBulkOverlapCapFactor = 0; } if(!model->MOS1vt0Given) { model->MOS1vt0 = 0; } if(!model->MOS1bulkCapFactorGiven) { model->MOS1bulkCapFactor = 0; } if(!model->MOS1sideWallCapFactorGiven) { model->MOS1sideWallCapFactor = 0; } if(!model->MOS1bulkJctPotentialGiven) { model->MOS1bulkJctPotential = .8; } if(!model->MOS1bulkJctBotGradingCoeffGiven) { model->MOS1bulkJctBotGradingCoeff = .5; } if(!model->MOS1bulkJctSideGradingCoeffGiven) { model->MOS1bulkJctSideGradingCoeff = .5; } if(!model->MOS1fwdCapDepCoeffGiven) { model->MOS1fwdCapDepCoeff = .5; } if(!model->MOS1phiGiven) { model->MOS1phi = .6; } if(!model->MOS1lambdaGiven) { model->MOS1lambda = 0; } if(!model->MOS1gammaGiven) { model->MOS1gamma = 0; } if(!model->MOS1fNcoefGiven) { model->MOS1fNcoef = 0; } if(!model->MOS1fNexpGiven) { model->MOS1fNexp = 1; } /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { /* allocate a chunk of the state vector */ here->MOS1states = *states; *states += MOS1numStates; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 10 * (ckt->CKTsenInfo->SENparms); } if(!here->MOS1drainPerimiterGiven) { here->MOS1drainPerimiter = 0; } if(!here->MOS1icVBSGiven) { here->MOS1icVBS = 0; } if(!here->MOS1icVDSGiven) { here->MOS1icVDS = 0; } if(!here->MOS1icVGSGiven) { here->MOS1icVGS = 0; } if(!here->MOS1sourcePerimiterGiven) { here->MOS1sourcePerimiter = 0; } if(!here->MOS1vdsatGiven) { here->MOS1vdsat = 0; } if(!here->MOS1vonGiven) { here->MOS1von = 0; } if(!here->MOS1drainSquaresGiven) { here->MOS1drainSquares=1; } if(!here->MOS1sourceSquaresGiven) { here->MOS1sourceSquares=1; } if ((model->MOS1drainResistance != 0 || (model->MOS1sheetResistance != 0 && here->MOS1drainSquares != 0) )) { if (here->MOS1dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS1name,"drain"); if(error) return(error); here->MOS1dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS1dNodePrime = here->MOS1dNode; } if((model->MOS1sourceResistance != 0 || (model->MOS1sheetResistance != 0 && here->MOS1sourceSquares != 0) )) { if (here->MOS1sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS1name,"source"); if(error) return(error); here->MOS1sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS1sNodePrime = here->MOS1sNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MOS1DdPtr,MOS1dNode,MOS1dNode); TSTALLOC(MOS1GgPtr,MOS1gNode,MOS1gNode); TSTALLOC(MOS1SsPtr,MOS1sNode,MOS1sNode); TSTALLOC(MOS1BbPtr,MOS1bNode,MOS1bNode); TSTALLOC(MOS1DPdpPtr,MOS1dNodePrime,MOS1dNodePrime); TSTALLOC(MOS1SPspPtr,MOS1sNodePrime,MOS1sNodePrime); TSTALLOC(MOS1DdpPtr,MOS1dNode,MOS1dNodePrime); TSTALLOC(MOS1GbPtr,MOS1gNode,MOS1bNode); TSTALLOC(MOS1GdpPtr,MOS1gNode,MOS1dNodePrime); TSTALLOC(MOS1GspPtr,MOS1gNode,MOS1sNodePrime); TSTALLOC(MOS1SspPtr,MOS1sNode,MOS1sNodePrime); TSTALLOC(MOS1BdpPtr,MOS1bNode,MOS1dNodePrime); TSTALLOC(MOS1BspPtr,MOS1bNode,MOS1sNodePrime); TSTALLOC(MOS1DPspPtr,MOS1dNodePrime,MOS1sNodePrime); TSTALLOC(MOS1DPdPtr,MOS1dNodePrime,MOS1dNode); TSTALLOC(MOS1BgPtr,MOS1bNode,MOS1gNode); TSTALLOC(MOS1DPgPtr,MOS1dNodePrime,MOS1gNode); TSTALLOC(MOS1SPgPtr,MOS1sNodePrime,MOS1gNode); TSTALLOC(MOS1SPsPtr,MOS1sNodePrime,MOS1sNode); TSTALLOC(MOS1DPbPtr,MOS1dNodePrime,MOS1bNode); TSTALLOC(MOS1SPbPtr,MOS1sNodePrime,MOS1bNode); TSTALLOC(MOS1SPdpPtr,MOS1sNodePrime,MOS1dNodePrime); } } return(OK); } int MOS1unsetup(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model; MOS1instance *here; for (model = (MOS1model *)inModel; model != NULL; model = model->MOS1nextModel) { for (here = model->MOS1instances; here != NULL; here=here->MOS1nextInstance) { if (here->MOS1dNodePrime && here->MOS1dNodePrime != here->MOS1dNode) { CKTdltNNum(ckt, here->MOS1dNodePrime); here->MOS1dNodePrime= 0; } if (here->MOS1sNodePrime && here->MOS1sNodePrime != here->MOS1sNode) { CKTdltNNum(ckt, here->MOS1sNodePrime); here->MOS1sNodePrime= 0; } } } return OK; } ngspice-26/src/spicelib/devices/mos1/mos1ask.c0000644000265600020320000004071412264261473020643 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS1ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MOS1instance *here = (MOS1instance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case MOS1_TEMP: value->rValue = here->MOS1temp - CONSTCtoK; return(OK); case MOS1_DTEMP: value->rValue = here->MOS1dtemp; return(OK); case MOS1_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgs); return(OK); case MOS1_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgd); return(OK); case MOS1_M: value->rValue = here->MOS1m; return(OK); case MOS1_L: value->rValue = here->MOS1l; return(OK); case MOS1_W: value->rValue = here->MOS1w; return(OK); case MOS1_AS: value->rValue = here->MOS1sourceArea; return(OK); case MOS1_AD: value->rValue = here->MOS1drainArea; return(OK); case MOS1_PS: value->rValue = here->MOS1sourcePerimiter; return(OK); case MOS1_PD: value->rValue = here->MOS1drainPerimiter; return(OK); case MOS1_NRS: value->rValue = here->MOS1sourceSquares; return(OK); case MOS1_NRD: value->rValue = here->MOS1drainSquares; return(OK); case MOS1_OFF: value->rValue = here->MOS1off; return(OK); case MOS1_IC_VBS: value->rValue = here->MOS1icVBS; return(OK); case MOS1_IC_VDS: value->rValue = here->MOS1icVDS; return(OK); case MOS1_IC_VGS: value->rValue = here->MOS1icVGS; return(OK); case MOS1_DNODE: value->iValue = here->MOS1dNode; return(OK); case MOS1_GNODE: value->iValue = here->MOS1gNode; return(OK); case MOS1_SNODE: value->iValue = here->MOS1sNode; return(OK); case MOS1_BNODE: value->iValue = here->MOS1bNode; return(OK); case MOS1_DNODEPRIME: value->iValue = here->MOS1dNodePrime; return(OK); case MOS1_SNODEPRIME: value->iValue = here->MOS1sNodePrime; return(OK); case MOS1_SOURCECONDUCT: value->rValue = here->MOS1sourceConductance; return(OK); case MOS1_SOURCERESIST: if (here->MOS1sNodePrime != here->MOS1sNode) value->rValue = 1.0 / here->MOS1sourceConductance; else value->rValue = 0.0; return(OK); case MOS1_DRAINCONDUCT: value->rValue = here->MOS1drainConductance; return(OK); case MOS1_DRAINRESIST: if (here->MOS1dNodePrime != here->MOS1dNode) value->rValue = 1.0 / here->MOS1drainConductance; else value->rValue = 0.0; return(OK); case MOS1_VON: value->rValue = here->MOS1von; return(OK); case MOS1_VDSAT: value->rValue = here->MOS1vdsat; return(OK); case MOS1_SOURCEVCRIT: value->rValue = here->MOS1sourceVcrit; return(OK); case MOS1_DRAINVCRIT: value->rValue = here->MOS1drainVcrit; return(OK); case MOS1_CD: value->rValue = here->MOS1cd; return(OK); case MOS1_CBS: value->rValue = here->MOS1cbs; return(OK); case MOS1_CBD: value->rValue = here->MOS1cbd; return(OK); case MOS1_GMBS: value->rValue = here->MOS1gmbs; return(OK); case MOS1_GM: value->rValue = here->MOS1gm; return(OK); case MOS1_GDS: value->rValue = here->MOS1gds; return(OK); case MOS1_GBD: value->rValue = here->MOS1gbd; return(OK); case MOS1_GBS: value->rValue = here->MOS1gbs; return(OK); case MOS1_CAPBD: value->rValue = here->MOS1capbd; return(OK); case MOS1_CAPBS: value->rValue = here->MOS1capbs; return(OK); case MOS1_CAPZEROBIASBD: value->rValue = here->MOS1Cbd; return(OK); case MOS1_CAPZEROBIASBDSW: value->rValue = here->MOS1Cbdsw; return(OK); case MOS1_CAPZEROBIASBS: value->rValue = here->MOS1Cbs; return(OK); case MOS1_CAPZEROBIASBSSW: value->rValue = here->MOS1Cbssw; return(OK); case MOS1_VBD: value->rValue = *(ckt->CKTstate0 + here->MOS1vbd); return(OK); case MOS1_VBS: value->rValue = *(ckt->CKTstate0 + here->MOS1vbs); return(OK); case MOS1_VGS: value->rValue = *(ckt->CKTstate0 + here->MOS1vgs); return(OK); case MOS1_VDS: value->rValue = *(ckt->CKTstate0 + here->MOS1vds); return(OK); case MOS1_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgs); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateSourceOverlapCapFactor) * here->MOS1m * (here->MOS1w); return(OK); case MOS1_QGS: value->rValue = *(ckt->CKTstate0 + here->MOS1qgs); return(OK); case MOS1_CQGS: value->rValue = *(ckt->CKTstate0 + here->MOS1cqgs); return(OK); case MOS1_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgd); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateDrainOverlapCapFactor) * here->MOS1m * (here->MOS1w); return(OK); case MOS1_QGD: value->rValue = *(ckt->CKTstate0 + here->MOS1qgd); return(OK); case MOS1_CQGD: value->rValue = *(ckt->CKTstate0 + here->MOS1cqgd); return(OK); case MOS1_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgb); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateBulkOverlapCapFactor) * here->MOS1m * (here->MOS1l -2*(here->sMOS1modPtr->MOS1latDiff)); return(OK); case MOS1_QGB: value->rValue = *(ckt->CKTstate0 + here->MOS1qgb); return(OK); case MOS1_CQGB: value->rValue = *(ckt->CKTstate0 + here->MOS1cqgb); return(OK); case MOS1_QBD: value->rValue = *(ckt->CKTstate0 + here->MOS1qbd); return(OK); case MOS1_CQBD: value->rValue = *(ckt->CKTstate0 + here->MOS1cqbd); return(OK); case MOS1_QBS: value->rValue = *(ckt->CKTstate0 + here->MOS1qbs); return(OK); case MOS1_CQBS: value->rValue = *(ckt->CKTstate0 + here->MOS1cqbs); return(OK); case MOS1_L_SENS_DC: if(ckt->CKTsenInfo && here->MOS1sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS1senParmNo); } return(OK); case MOS1_L_SENS_REAL: if(ckt->CKTsenInfo && here->MOS1sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo); } return(OK); case MOS1_L_SENS_IMAG: if(ckt->CKTsenInfo && here->MOS1sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo); } return(OK); case MOS1_L_SENS_MAG: if(ckt->CKTsenInfo && here->MOS1sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS1_L_SENS_PH: if(ckt->CKTsenInfo && here->MOS1sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS1_L_SENS_CPLX: if(ckt->CKTsenInfo && here->MOS1sens_l){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo); } return(OK); case MOS1_W_SENS_DC: if(ckt->CKTsenInfo && here->MOS1sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); } return(OK); case MOS1_W_SENS_REAL: if(ckt->CKTsenInfo && here->MOS1sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); } return(OK); case MOS1_W_SENS_IMAG: if(ckt->CKTsenInfo && here->MOS1sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); } return(OK); case MOS1_W_SENS_MAG: if(ckt->CKTsenInfo && here->MOS1sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS1_W_SENS_PH: if(ckt->CKTsenInfo && here->MOS1sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS1_W_SENS_CPLX: if(ckt->CKTsenInfo && here->MOS1sens_w){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS1senParmNo + here->MOS1sens_l); } return(OK); case MOS1_CB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS1ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->MOS1cbd + here->MOS1cbs - *(ckt->CKTstate0 + here->MOS1cqgb); } return(OK); case MOS1_CG : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS1ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->MOS1cqgb) + *(ckt->CKTstate0 + here->MOS1cqgd) + *(ckt->CKTstate0 + here->MOS1cqgs); } return(OK); case MOS1_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS1ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->MOS1cd; value->rValue -= here->MOS1cbd + here->MOS1cbs - *(ckt->CKTstate0 + here->MOS1cqgb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->MOS1cqgb) + *(ckt->CKTstate0 + here->MOS1cqgd) + *(ckt->CKTstate0 + here->MOS1cqgs); } } return(OK); case MOS1_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS1ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->MOS1cd * *(ckt->CKTrhsOld + here->MOS1dNode); value->rValue += (here->MOS1cbd + here->MOS1cbs - *(ckt->CKTstate0 + here->MOS1cqgb)) * *(ckt->CKTrhsOld + here->MOS1bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->MOS1cqgb) + *(ckt->CKTstate0 + here->MOS1cqgd) + *(ckt->CKTstate0 + here->MOS1cqgs)) * *(ckt->CKTrhsOld + here->MOS1gNode); } temp = -here->MOS1cd; temp -= here->MOS1cbd + here->MOS1cbs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->MOS1cqgb) + *(ckt->CKTstate0 + here->MOS1cqgd) + *(ckt->CKTstate0 + here->MOS1cqgs); } value->rValue += temp * *(ckt->CKTrhsOld + here->MOS1sNode); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos1/mos1conv.c0000644000265600020320000000634712264261473021036 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1convTest(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model*)inModel; MOS1instance *here; double delvbs; double delvbd; double delvgs; double delvds; double delvgd; double cbhat; double cdhat; double vbs; double vbd; double vgs; double vds; double vgd; double vgdo; double tol; for( ; model != NULL; model = model->MOS1nextModel) { for(here = model->MOS1instances; here!= NULL; here = here->MOS1nextInstance) { vbs = model->MOS1type * ( *(ckt->CKTrhs+here->MOS1bNode) - *(ckt->CKTrhs+here->MOS1sNodePrime)); vgs = model->MOS1type * ( *(ckt->CKTrhs+here->MOS1gNode) - *(ckt->CKTrhs+here->MOS1sNodePrime)); vds = model->MOS1type * ( *(ckt->CKTrhs+here->MOS1dNodePrime) - *(ckt->CKTrhs+here->MOS1sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS1vgs) - *(ckt->CKTstate0 + here->MOS1vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS1vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS1vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS1mode >= 0) { cdhat= here->MOS1cd- here->MOS1gbd * delvbd + here->MOS1gmbs * delvbs + here->MOS1gm * delvgs + here->MOS1gds * delvds ; } else { cdhat= here->MOS1cd - ( here->MOS1gbd - here->MOS1gmbs) * delvbd - here->MOS1gm * delvgd + here->MOS1gds * delvds ; } cbhat= here->MOS1cbs + here->MOS1cbd + here->MOS1gbd * delvbd + here->MOS1gbs * delvbs ; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(here->MOS1cd))+ ckt->CKTabstol; if (fabs(cdhat-here->MOS1cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(cbhat),fabs(here->MOS1cbs+here->MOS1cbd))+ ckt->CKTabstol; if (fabs(cbhat-(here->MOS1cbs+here->MOS1cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged*/ } } } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1load.c0000644000265600020320000010217212264261473021001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos1defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS1model *model = (MOS1model *) inModel; MOS1instance *here; double Beta; double DrainSatCur; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cbhat; double cdhat; double cdrain; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqgb; double ceqgd; double ceqgs; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gcgb; double gcgd; double gcgs; double geq; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb1; double vgb; double vgd1; double vgd; double vgdo; double vgs1; double vgs; double von; double vt; #ifndef PREDICTOR double xfact = 0.0; #endif int xnrm; int xrev; double capgs = 0.0; /* total gate-source capacitance */ double capgd = 0.0; /* total gate-drain capacitance */ double capgb = 0.0; /* total gate-bulk capacitance */ int Check; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; #ifdef CAPBYPASS int senflag; #endif /*CAPBYPASS*/ int SenCond; #ifdef CAPBYPASS senflag = 0; if(ckt->CKTsenInfo && ckt->CKTsenInfo->SENstatus == PERTURBATION && (ckt->CKTsenInfo->SENmode & (ACSEN | TRANSEN))) { senflag = 1; } #endif /* CAPBYPASS */ /* loop through all the MOS1 device models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { vt = CONSTKoverQ * here->MOS1temp; Check=1; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("MOS1load \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENstatus == PERTURBATION)&& (here->MOS1senPertFlag == OFF))continue; } SenCond = ckt->CKTsenInfo && here->MOS1senPertFlag; /* */ /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveLength=here->MOS1l - 2*model->MOS1latDiff; if( (here->MOS1tSatCurDens == 0) || (here->MOS1drainArea == 0) || (here->MOS1sourceArea == 0)) { DrainSatCur = here->MOS1m * here->MOS1tSatCur; SourceSatCur = here->MOS1m * here->MOS1tSatCur; } else { DrainSatCur = here->MOS1tSatCurDens * here->MOS1m * here->MOS1drainArea; SourceSatCur = here->MOS1tSatCurDens * here->MOS1m * here->MOS1sourceArea; } GateSourceOverlapCap = model->MOS1gateSourceOverlapCapFactor * here->MOS1m * here->MOS1w; GateDrainOverlapCap = model->MOS1gateDrainOverlapCapFactor * here->MOS1m * here->MOS1w; GateBulkOverlapCap = model->MOS1gateBulkOverlapCapFactor * here->MOS1m * EffectiveLength; Beta = here->MOS1tTransconductance * here->MOS1m * here->MOS1w/EffectiveLength; OxideCap = model->MOS1oxideCapFactor * EffectiveLength * here->MOS1m * here->MOS1w; /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ if(SenCond){ #ifdef SENSDEBUG printf("MOS1senPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { vgs = *(ckt->CKTstate1 + here->MOS1vgs); vds = *(ckt->CKTstate1 + here->MOS1vds); vbs = *(ckt->CKTstate1 + here->MOS1vbs); vbd = *(ckt->CKTstate1 + here->MOS1vbd); vgb = vgs - vbs; vgd = vgs - vds; } else if (ckt->CKTsenInfo->SENmode == ACSEN){ vgb = model->MOS1type * ( *(ckt->CKTrhsOp+here->MOS1gNode) - *(ckt->CKTrhsOp+here->MOS1bNode)); vbs = *(ckt->CKTstate0 + here->MOS1vbs); vbd = *(ckt->CKTstate0 + here->MOS1vbd); vgd = vgb + vbd ; vgs = vgb + vbs ; vds = vbs - vbd ; } else{ vgs = *(ckt->CKTstate0 + here->MOS1vgs); vds = *(ckt->CKTstate0 + here->MOS1vds); vbs = *(ckt->CKTstate0 + here->MOS1vbs); vbd = *(ckt->CKTstate0 + here->MOS1vbd); vgb = vgs - vbs; vgd = vgs - vds; } #ifdef SENSDEBUG printf(" vbs = %.7e ,vbd = %.7e,vgb = %.7e\n",vbs,vbd,vgb); printf(" vgs = %.7e ,vds = %.7e,vgd = %.7e\n",vgs,vds,vgd); #endif /* SENSDEBUG */ goto next1; } if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED | MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->MOS1off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MOS1vbs) = *(ckt->CKTstate1 + here->MOS1vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS1vbs)) -(xfact * (*(ckt->CKTstate2 + here->MOS1vbs))); *(ckt->CKTstate0 + here->MOS1vgs) = *(ckt->CKTstate1 + here->MOS1vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS1vgs)) -(xfact * (*(ckt->CKTstate2 + here->MOS1vgs))); *(ckt->CKTstate0 + here->MOS1vds) = *(ckt->CKTstate1 + here->MOS1vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->MOS1vds)) -(xfact * (*(ckt->CKTstate2 + here->MOS1vds))); *(ckt->CKTstate0 + here->MOS1vbd) = *(ckt->CKTstate0 + here->MOS1vbs)- *(ckt->CKTstate0 + here->MOS1vds); } else { #endif /* PREDICTOR */ /* general iteration */ vbs = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1bNode) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); vgs = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1gNode) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); vds = model->MOS1type * ( *(ckt->CKTrhsOld+here->MOS1dNodePrime) - *(ckt->CKTrhsOld+here->MOS1sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS1vgs) - *(ckt->CKTstate0 + here->MOS1vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS1vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS1vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS1mode >= 0) { cdhat= here->MOS1cd- here->MOS1gbd * delvbd + here->MOS1gmbs * delvbs + here->MOS1gm * delvgs + here->MOS1gds * delvds ; } else { cdhat= here->MOS1cd - ( here->MOS1gbd - here->MOS1gmbs) * delvbd - here->MOS1gm * delvgd + here->MOS1gds * delvds ; } cbhat= here->MOS1cbs + here->MOS1cbd + here->MOS1gbd * delvbd + here->MOS1gbs * delvbs ; /* */ #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ tempv = (MAX(fabs(cbhat), fabs(here->MOS1cbs + here->MOS1cbd)) + ckt->CKTabstol); if ((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG))) && (ckt->CKTbypass) && (fabs(cbhat-(here->MOS1cbs + here->MOS1cbd)) < ckt->CKTreltol * tempv) && (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs( *(ckt->CKTstate0 + here->MOS1vbs))) + ckt->CKTvoltTol)) && (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0 + here->MOS1vbd))) + ckt->CKTvoltTol)) && (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->MOS1vgs)))+ ckt->CKTvoltTol)) && (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0 + here->MOS1vds))) + ckt->CKTvoltTol)) && (fabs(cdhat- here->MOS1cd) < (ckt->CKTreltol * MAX(fabs(cdhat), fabs(here->MOS1cd)) + ckt->CKTabstol))) { /* bypass code */ /* nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration out * and keep going */ vbs = *(ckt->CKTstate0 + here->MOS1vbs); vbd = *(ckt->CKTstate0 + here->MOS1vbd); vgs = *(ckt->CKTstate0 + here->MOS1vgs); vds = *(ckt->CKTstate0 + here->MOS1vds); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->MOS1mode * (here->MOS1cd + here->MOS1cbd); if(ckt->CKTmode & (MODETRAN | MODETRANOP)) { capgs = ( *(ckt->CKTstate0+here->MOS1capgs)+ *(ckt->CKTstate1+here->MOS1capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS1capgd)+ *(ckt->CKTstate1+here->MOS1capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS1capgb)+ *(ckt->CKTstate1+here->MOS1capgb) + GateBulkOverlapCap ); if(ckt->CKTsenInfo){ here->MOS1cgs = capgs; here->MOS1cgd = capgd; here->MOS1cgb = capgb; } } goto bypass; } #endif /*NOBYPASS*/ /* */ /* ok - bypass is out, do it the hard way */ von = model->MOS1type * here->MOS1von; #ifndef NODELIMITING /* * limiting * we want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->MOS1vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MOS1vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->MOS1vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->MOS1vds))); } vgs = vgd + vds; } if(vds >= 0) { vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->MOS1vbs), vt,here->MOS1sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->MOS1vbd), vt,here->MOS1drainVcrit,&Check); vbs = vbd + vds; } #endif /*NODELIMITING*/ /* */ } else { /* ok - not one of the simple cases, so we have to * look at all of the possibilities for why we were * called. We still just initialize the three voltages */ if((ckt->CKTmode & MODEINITJCT) && !here->MOS1off) { vds= model->MOS1type * here->MOS1icVDS; vgs= model->MOS1type * here->MOS1icVGS; vbs= model->MOS1type * here->MOS1icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = model->MOS1type * here->MOS1tVto; vds = 0; } } else { vbs=vgs=vds=0; } } /* */ /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) { here->MOS1gbs = ckt->CKTgmin; here->MOS1cbs = here->MOS1gbs*vbs-SourceSatCur; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS1gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS1cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; } if(vbd <= -3*vt) { here->MOS1gbd = ckt->CKTgmin; here->MOS1cbd = here->MOS1gbd*vbd-DrainSatCur; } else { evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS1gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS1cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS1mode = 1; } else { /* inverse mode */ here->MOS1mode = -1; } /* */ { /* * this block of code evaluates the drain current and its * derivatives using the shichman-hodges model and the * charges associated with the gate, channel and bulk for * mosfets * */ /* the following 4 variables are local to this code block until * it is obvious that they can be made global */ double arg; double betap; double sarg; double vgst; if ((here->MOS1mode==1?vbs:vbd) <= 0 ) { sarg=sqrt(here->MOS1tPhi-(here->MOS1mode==1?vbs:vbd)); } else { sarg=sqrt(here->MOS1tPhi); sarg=sarg-(here->MOS1mode==1?vbs:vbd)/(sarg+sarg); sarg=MAX(0,sarg); } von=(here->MOS1tVbi*model->MOS1type)+model->MOS1gamma*sarg; vgst=(here->MOS1mode==1?vgs:vgd)-von; vdsat=MAX(vgst,0); if (sarg <= 0) { arg=0; } else { arg=model->MOS1gamma/(sarg+sarg); } if (vgst <= 0) { /* * cutoff region */ cdrain=0; here->MOS1gm=0; here->MOS1gds=0; here->MOS1gmbs=0; } else{ /* * saturation region */ betap=Beta*(1+model->MOS1lambda*(vds*here->MOS1mode)); if (vgst <= (vds*here->MOS1mode)){ cdrain=betap*vgst*vgst*.5; here->MOS1gm=betap*vgst; here->MOS1gds=model->MOS1lambda*Beta*vgst*vgst*.5; here->MOS1gmbs=here->MOS1gm*arg; } else { /* * linear region */ cdrain=betap*(vds*here->MOS1mode)* (vgst-.5*(vds*here->MOS1mode)); here->MOS1gm=betap*(vds*here->MOS1mode); here->MOS1gds=betap*(vgst-(vds*here->MOS1mode))+ model->MOS1lambda*Beta* (vds*here->MOS1mode)* (vgst-.5*(vds*here->MOS1mode)); here->MOS1gmbs=here->MOS1gm*arg; } } /* * finished */ } /* */ /* now deal with n vs p polarity */ here->MOS1von = model->MOS1type * von; here->MOS1vdsat = model->MOS1type * vdsat; /* line 490 */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->MOS1cd=here->MOS1mode * cdrain - here->MOS1cbd; if (ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG)) { /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS1vbs)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ { /* can't bypass the diode capacitance calculations */ if(here->MOS1Cbs != 0 || here->MOS1Cbssw != 0 ) { if (vbs < here->MOS1tDepCap){ arg=1-vbs/here->MOS1tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS1bulkJctBotGradingCoeff == model->MOS1bulkJctSideGradingCoeff) { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); } if(model->MOS1bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS1bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS1qbs) = here->MOS1tBulkPot*(here->MOS1Cbs* (1-arg*sarg)/(1-model->MOS1bulkJctBotGradingCoeff) +here->MOS1Cbssw* (1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff)); here->MOS1capbs=here->MOS1Cbs*sarg+ here->MOS1Cbssw*sargsw; } else { *(ckt->CKTstate0 + here->MOS1qbs) = here->MOS1f4s + vbs*(here->MOS1f2s+vbs*(here->MOS1f3s/2)); here->MOS1capbs=here->MOS1f2s+here->MOS1f3s*vbs; } } else { *(ckt->CKTstate0 + here->MOS1qbs) = 0; here->MOS1capbs=0; } } #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS1vbd)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ /* can't bypass the diode capacitance calculations */ { if(here->MOS1Cbd != 0 || here->MOS1Cbdsw != 0 ) { if (vbd < here->MOS1tDepCap) { arg=1-vbd/here->MOS1tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS1bulkJctBotGradingCoeff == .5 && model->MOS1bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS1bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS1bulkJctBotGradingCoeff* log(arg)); } if(model->MOS1bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS1bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS1qbd) = here->MOS1tBulkPot*(here->MOS1Cbd* (1-arg*sarg) /(1-model->MOS1bulkJctBotGradingCoeff) +here->MOS1Cbdsw* (1-arg*sargsw) /(1-model->MOS1bulkJctSideGradingCoeff)); here->MOS1capbd=here->MOS1Cbd*sarg+ here->MOS1Cbdsw*sargsw; } else { *(ckt->CKTstate0 + here->MOS1qbd) = here->MOS1f4d + vbd * (here->MOS1f2d + vbd * here->MOS1f3d/2); here->MOS1capbd=here->MOS1f2d + vbd * here->MOS1f3d; } } else { *(ckt->CKTstate0 + here->MOS1qbd) = 0; here->MOS1capbd = 0; } } /* */ if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2; if ( (ckt->CKTmode & MODETRAN) || ( (ckt->CKTmode&MODEINITTRAN) && !(ckt->CKTmode&MODEUIC)) ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ceq,here->MOS1capbd, here->MOS1qbd); if(error) return(error); here->MOS1gbd += geq; here->MOS1cbd += *(ckt->CKTstate0 + here->MOS1cqbd); here->MOS1cd -= *(ckt->CKTstate0 + here->MOS1cqbd); error = NIintegrate(ckt,&geq,&ceq,here->MOS1capbs, here->MOS1qbs); if(error) return(error); here->MOS1gbs += geq; here->MOS1cbs += *(ckt->CKTstate0 + here->MOS1cqbs); } } /* */ if(SenCond) goto next2; /* * check convergence */ if ( (here->MOS1off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* */ /* save things away for next time */ next2: *(ckt->CKTstate0 + here->MOS1vbs) = vbs; *(ckt->CKTstate0 + here->MOS1vbd) = vbd; *(ckt->CKTstate0 + here->MOS1vgs) = vgs; *(ckt->CKTstate0 + here->MOS1vds) = vds; /* */ /* * meyer's capacitor model */ if ( ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG) ) { /* * calculate meyer's capacitors */ /* * new cmeyer - this just evaluates at the current time, * expects you to remember values from previous time * returns 1/2 of non-constant portion of capacitance * you must add in the other half from previous time * and the constant part */ if (here->MOS1mode > 0){ DEVqmeyer (vgs,vgd,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS1capgs), (ckt->CKTstate0 + here->MOS1capgd), (ckt->CKTstate0 + here->MOS1capgb), here->MOS1tPhi,OxideCap); } else { DEVqmeyer (vgd,vgs,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS1capgd), (ckt->CKTstate0 + here->MOS1capgs), (ckt->CKTstate0 + here->MOS1capgb), here->MOS1tPhi,OxideCap); } vgs1 = *(ckt->CKTstate1 + here->MOS1vgs); vgd1 = vgs1 - *(ckt->CKTstate1 + here->MOS1vds); vgb1 = vgs1 - *(ckt->CKTstate1 + here->MOS1vbs); if(ckt->CKTmode & (MODETRANOP|MODEINITSMSIG)) { capgs = 2 * *(ckt->CKTstate0+here->MOS1capgs)+ GateSourceOverlapCap ; capgd = 2 * *(ckt->CKTstate0+here->MOS1capgd)+ GateDrainOverlapCap ; capgb = 2 * *(ckt->CKTstate0+here->MOS1capgb)+ GateBulkOverlapCap ; } else { capgs = ( *(ckt->CKTstate0+here->MOS1capgs)+ *(ckt->CKTstate1+here->MOS1capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS1capgd)+ *(ckt->CKTstate1+here->MOS1capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS1capgb)+ *(ckt->CKTstate1+here->MOS1capgb) + GateBulkOverlapCap ); } if(ckt->CKTsenInfo){ here->MOS1cgs = capgs; here->MOS1cgd = capgd; here->MOS1cgb = capgb; } /* */ /* * store small-signal parameters (for meyer's model) * all parameters already stored, so done... */ if(SenCond){ if((ckt->CKTsenInfo->SENmode == DCSEN)|| (ckt->CKTsenInfo->SENmode == ACSEN)){ continue; } } #ifndef PREDICTOR if (ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { *(ckt->CKTstate0 + here->MOS1qgs) = (1+xfact) * *(ckt->CKTstate1 + here->MOS1qgs) - xfact * *(ckt->CKTstate2 + here->MOS1qgs); *(ckt->CKTstate0 + here->MOS1qgd) = (1+xfact) * *(ckt->CKTstate1 + here->MOS1qgd) - xfact * *(ckt->CKTstate2 + here->MOS1qgd); *(ckt->CKTstate0 + here->MOS1qgb) = (1+xfact) * *(ckt->CKTstate1 + here->MOS1qgb) - xfact * *(ckt->CKTstate2 + here->MOS1qgb); } else { #endif /*PREDICTOR*/ if(ckt->CKTmode & MODETRAN) { *(ckt->CKTstate0 + here->MOS1qgs) = (vgs-vgs1)*capgs + *(ckt->CKTstate1 + here->MOS1qgs) ; *(ckt->CKTstate0 + here->MOS1qgd) = (vgd-vgd1)*capgd + *(ckt->CKTstate1 + here->MOS1qgd) ; *(ckt->CKTstate0 + here->MOS1qgb) = (vgb-vgb1)*capgb + *(ckt->CKTstate1 + here->MOS1qgb) ; } else { /* TRANOP only */ *(ckt->CKTstate0 + here->MOS1qgs) = vgs*capgs; *(ckt->CKTstate0 + here->MOS1qgd) = vgd*capgd; *(ckt->CKTstate0 + here->MOS1qgb) = vgb*capgb; } #ifndef PREDICTOR } #endif /*PREDICTOR*/ } #ifndef NOBYPASS bypass: #endif if(SenCond) continue; if ( (ckt->CKTmode & (MODEINITTRAN)) || (! (ckt->CKTmode & (MODETRAN)) ) ) { /* * initialize to zero charge conductances * and current */ gcgs=0; ceqgs=0; gcgd=0; ceqgd=0; gcgb=0; ceqgb=0; } else { if(capgs == 0) *(ckt->CKTstate0 + here->MOS1cqgs) =0; if(capgd == 0) *(ckt->CKTstate0 + here->MOS1cqgd) =0; if(capgb == 0) *(ckt->CKTstate0 + here->MOS1cqgb) =0; /* * calculate equivalent conductances and currents for * meyer"s capacitors */ error = NIintegrate(ckt,&gcgs,&ceqgs,capgs,here->MOS1qgs); if(error) return(error); error = NIintegrate(ckt,&gcgd,&ceqgd,capgd,here->MOS1qgd); if(error) return(error); error = NIintegrate(ckt,&gcgb,&ceqgb,capgb,here->MOS1qgb); if(error) return(error); ceqgs=ceqgs-gcgs*vgs+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS1qgs); ceqgd=ceqgd-gcgd*vgd+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS1qgd); ceqgb=ceqgb-gcgb*vgb+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS1qgb); } /* * store charge storage info for meyer's cap in lx table */ /* * load current vector */ ceqbs = model->MOS1type * (here->MOS1cbs-(here->MOS1gbs)*vbs); ceqbd = model->MOS1type * (here->MOS1cbd-(here->MOS1gbd)*vbd); if (here->MOS1mode >= 0) { xnrm=1; xrev=0; cdreq=model->MOS1type*(cdrain-here->MOS1gds*vds- here->MOS1gm*vgs-here->MOS1gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->MOS1type)*(cdrain-here->MOS1gds*(-vds)- here->MOS1gm*vgd-here->MOS1gmbs*vbd); } *(ckt->CKTrhs + here->MOS1gNode) -= (model->MOS1type * (ceqgs + ceqgb + ceqgd)); *(ckt->CKTrhs + here->MOS1bNode) -= (ceqbs + ceqbd - model->MOS1type * ceqgb); *(ckt->CKTrhs + here->MOS1dNodePrime) += (ceqbd - cdreq + model->MOS1type * ceqgd); *(ckt->CKTrhs + here->MOS1sNodePrime) += cdreq + ceqbs + model->MOS1type * ceqgs; /* * load y matrix */ *(here->MOS1DdPtr) += (here->MOS1drainConductance); *(here->MOS1GgPtr) += ((gcgd+gcgs+gcgb)); *(here->MOS1SsPtr) += (here->MOS1sourceConductance); *(here->MOS1BbPtr) += (here->MOS1gbd+here->MOS1gbs+gcgb); *(here->MOS1DPdpPtr) += (here->MOS1drainConductance+here->MOS1gds+ here->MOS1gbd+xrev*(here->MOS1gm+here->MOS1gmbs)+gcgd); *(here->MOS1SPspPtr) += (here->MOS1sourceConductance+here->MOS1gds+ here->MOS1gbs+xnrm*(here->MOS1gm+here->MOS1gmbs)+gcgs); *(here->MOS1DdpPtr) += (-here->MOS1drainConductance); *(here->MOS1GbPtr) -= gcgb; *(here->MOS1GdpPtr) -= gcgd; *(here->MOS1GspPtr) -= gcgs; *(here->MOS1SspPtr) += (-here->MOS1sourceConductance); *(here->MOS1BgPtr) -= gcgb; *(here->MOS1BdpPtr) -= here->MOS1gbd; *(here->MOS1BspPtr) -= here->MOS1gbs; *(here->MOS1DPdPtr) += (-here->MOS1drainConductance); *(here->MOS1DPgPtr) += ((xnrm-xrev)*here->MOS1gm-gcgd); *(here->MOS1DPbPtr) += (-here->MOS1gbd+(xnrm-xrev)*here->MOS1gmbs); *(here->MOS1DPspPtr) += (-here->MOS1gds-xnrm* (here->MOS1gm+here->MOS1gmbs)); *(here->MOS1SPgPtr) += (-(xnrm-xrev)*here->MOS1gm-gcgs); *(here->MOS1SPsPtr) += (-here->MOS1sourceConductance); *(here->MOS1SPbPtr) += (-here->MOS1gbs-(xnrm-xrev)*here->MOS1gmbs); *(here->MOS1SPdpPtr) += (-here->MOS1gds-xrev* (here->MOS1gm+here->MOS1gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/mos1/Makefile.am0000644000265600020320000000115612264261473021152 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmos1.la libmos1_la_SOURCES = \ mos1.c \ mos1acld.c \ mos1ask.c \ mos1conv.c \ mos1defs.h \ mos1del.c \ mos1dest.c \ mos1dist.c \ mos1dset.c \ mos1ext.h \ mos1ic.c \ mos1init.c \ mos1init.h \ mos1itf.h \ mos1load.c \ mos1mask.c \ mos1mdel.c \ mos1mpar.c \ mos1noi.c \ mos1par.c \ mos1pzld.c \ mos1sacl.c \ mos1set.c \ mos1sld.c \ mos1sprt.c \ mos1sset.c \ mos1supd.c \ mos1temp.c \ mos1trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mos1/mos1temp.c0000644000265600020320000003425512264261473021035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1temp(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; double egfet,egfet1; double fact1,fact2; double kt,kt1; double arg1; double ratio,ratio4; double phio; double pbo; double gmanew,gmaold; double capfact; double pbfact1,pbfact; double vt,vtnom; double wkfngs; double wkfng; double fermig; double fermis; double vfb; /* loop through all the resistor models */ for( ; model != NULL; model = model->MOS1nextModel) { /* perform model defaulting */ if(!model->MOS1tnomGiven) { model->MOS1tnom = ckt->CKTnomTemp; } fact1 = model->MOS1tnom/REFTEMP; vtnom = model->MOS1tnom*CONSTKoverQ; kt1 = CONSTboltz * model->MOS1tnom; egfet1 = 1.16-(7.02e-4*model->MOS1tnom*model->MOS1tnom)/ (model->MOS1tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); /* now model parameter preprocessing */ if (model->MOS1phi <= 0.0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: Phi is not positive.", &model->MOS1modName); return(E_BADPARM); } if(!model->MOS1oxideThicknessGiven || model->MOS1oxideThickness == 0) { model->MOS1oxideCapFactor = 0; } else { model->MOS1oxideCapFactor = 3.9 * 8.854214871e-12/ model->MOS1oxideThickness; if(!model->MOS1transconductanceGiven) { if(!model->MOS1surfaceMobilityGiven) { model->MOS1surfaceMobility=600; } model->MOS1transconductance = model->MOS1surfaceMobility * model->MOS1oxideCapFactor * 1e-4 /*(m**2/cm**2)*/; } if(model->MOS1substrateDopingGiven) { if(model->MOS1substrateDoping*1e6 /*(cm**3/m**3)*/ >1.45e16) { if(!model->MOS1phiGiven) { model->MOS1phi = 2*vtnom* log(model->MOS1substrateDoping* 1e6/*(cm**3/m**3)*//1.45e16); model->MOS1phi = MAX(.1,model->MOS1phi); } fermis = model->MOS1type * .5 * model->MOS1phi; wkfng = 3.2; if(!model->MOS1gateTypeGiven) model->MOS1gateType=1; if(model->MOS1gateType != 0) { fermig = model->MOS1type *model->MOS1gateType*.5*egfet1; wkfng = 3.25 + .5 * egfet1 - fermig; } wkfngs = wkfng - (3.25 + .5 * egfet1 +fermis); if(!model->MOS1gammaGiven) { model->MOS1gamma = sqrt(2 * 11.70 * 8.854214871e-12 * CHARGE * model->MOS1substrateDoping* 1e6/*(cm**3/m**3)*/)/ model->MOS1oxideCapFactor; } if(!model->MOS1vt0Given) { if(!model->MOS1surfaceStateDensityGiven) model->MOS1surfaceStateDensity=0; vfb = wkfngs - model->MOS1surfaceStateDensity * 1e4 /*(cm**2/m**2)*/ * CHARGE/model->MOS1oxideCapFactor; model->MOS1vt0 = vfb + model->MOS1type * (model->MOS1gamma * sqrt(model->MOS1phi)+ model->MOS1phi); } } else { model->MOS1substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni",&model->MOS1modName); return(E_BADPARM); } } } /* loop through all instances of the model */ for(here = model->MOS1instances; here!= NULL; here = here->MOS1nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbdsw; /* zero voltage bulk-drain sidewall capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double czbssw; /* zero voltage bulk-source sidewall capacitance */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ double sargsw; /* (1-fc) ^^ (-mjsw) */ /* perform the parameter defaulting */ if(!here->MOS1dtempGiven) { here->MOS1dtemp = 0.0; } if(!here->MOS1tempGiven) { here->MOS1temp = ckt->CKTtemp + here->MOS1dtemp; } vt = here->MOS1temp * CONSTKoverQ; ratio = here->MOS1temp/model->MOS1tnom; fact2 = here->MOS1temp/REFTEMP; kt = here->MOS1temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->MOS1temp*here->MOS1temp)/ (here->MOS1temp+1108); arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->MOS1drainAreaGiven) { here->MOS1drainArea = ckt->CKTdefaultMosAD; } if(!here->MOS1mGiven) { here->MOS1m = ckt->CKTdefaultMosM; } if(!here->MOS1lGiven) { here->MOS1l = ckt->CKTdefaultMosL; } if(!here->MOS1sourceAreaGiven) { here->MOS1sourceArea = ckt->CKTdefaultMosAS; } if(!here->MOS1wGiven) { here->MOS1w = ckt->CKTdefaultMosW; } if(here->MOS1l - 2 * model->MOS1latDiff <=0) { SPfrontEnd->IFerror (ERR_WARNING, "%s: effective channel length less than zero", &(model->MOS1modName)); } ratio4 = ratio * sqrt(ratio); here->MOS1tTransconductance = model->MOS1transconductance / ratio4; here->MOS1tSurfMob = model->MOS1surfaceMobility/ratio4; phio= (model->MOS1phi-pbfact1)/fact1; here->MOS1tPhi = fact2 * phio + pbfact; here->MOS1tVbi = model->MOS1vt0 - model->MOS1type * (model->MOS1gamma* sqrt(model->MOS1phi)) +.5*(egfet1-egfet) + model->MOS1type*.5* (here->MOS1tPhi-model->MOS1phi); here->MOS1tVto = here->MOS1tVbi + model->MOS1type * model->MOS1gamma * sqrt(here->MOS1tPhi); here->MOS1tSatCur = model->MOS1jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->MOS1tSatCurDens = model->MOS1jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); pbo = (model->MOS1bulkJctPotential - pbfact1)/fact1; gmaold = (model->MOS1bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->MOS1bulkJctBotGradingCoeff* (4e-4*(model->MOS1tnom-REFTEMP)-gmaold)); here->MOS1tCbd = model->MOS1capBD * capfact; here->MOS1tCbs = model->MOS1capBS * capfact; here->MOS1tCj = model->MOS1bulkCapFactor * capfact; capfact = 1/(1+model->MOS1bulkJctSideGradingCoeff* (4e-4*(model->MOS1tnom-REFTEMP)-gmaold)); here->MOS1tCjsw = model->MOS1sideWallCapFactor * capfact; here->MOS1tBulkPot = fact2 * pbo+pbfact; gmanew = (here->MOS1tBulkPot-pbo)/pbo; capfact = (1+model->MOS1bulkJctBotGradingCoeff* (4e-4*(here->MOS1temp-REFTEMP)-gmanew)); here->MOS1tCbd *= capfact; here->MOS1tCbs *= capfact; here->MOS1tCj *= capfact; capfact = (1+model->MOS1bulkJctSideGradingCoeff* (4e-4*(here->MOS1temp-REFTEMP)-gmanew)); here->MOS1tCjsw *= capfact; here->MOS1tDepCap = model->MOS1fwdCapDepCoeff * here->MOS1tBulkPot; if( (here->MOS1tSatCurDens == 0) || (here->MOS1drainArea == 0) || (here->MOS1sourceArea == 0) ) { here->MOS1sourceVcrit = here->MOS1drainVcrit = vt*log(vt/(CONSTroot2*here->MOS1m*here->MOS1tSatCur)); } else { here->MOS1drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS1m * here->MOS1tSatCurDens * here->MOS1drainArea)); here->MOS1sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS1m * here->MOS1tSatCurDens * here->MOS1sourceArea)); } if(model->MOS1capBDGiven) { czbd = here->MOS1tCbd * here->MOS1m; } else { if(model->MOS1bulkCapFactorGiven) { czbd=here->MOS1tCj*here->MOS1m*here->MOS1drainArea; } else { czbd=0; } } if(model->MOS1sideWallCapFactorGiven) { czbdsw= here->MOS1tCjsw * here->MOS1drainPerimiter * here->MOS1m; } else { czbdsw=0; } arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1Cbd = czbd; here->MOS1Cbdsw = czbdsw; here->MOS1f2d = czbd*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + czbdsw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3d = czbd * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + czbdsw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg / here->MOS1tBulkPot; here->MOS1f4d = czbd*here->MOS1tBulkPot*(1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + czbdsw*here->MOS1tBulkPot*(1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3d/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2d; if(model->MOS1capBSGiven) { czbs=here->MOS1tCbs * here->MOS1m; } else { if(model->MOS1bulkCapFactorGiven) { czbs=here->MOS1tCj*here->MOS1sourceArea * here->MOS1m; } else { czbs=0; } } if(model->MOS1sideWallCapFactorGiven) { czbssw = here->MOS1tCjsw * here->MOS1sourcePerimiter * here->MOS1m; } else { czbssw=0; } arg = 1-model->MOS1fwdCapDepCoeff; sarg = exp( (-model->MOS1bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS1bulkJctSideGradingCoeff) * log(arg) ); here->MOS1Cbs = czbs; here->MOS1Cbssw = czbssw; here->MOS1f2s = czbs*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctBotGradingCoeff))* sarg/arg + czbssw*(1-model->MOS1fwdCapDepCoeff* (1+model->MOS1bulkJctSideGradingCoeff))* sargsw/arg; here->MOS1f3s = czbs * model->MOS1bulkJctBotGradingCoeff * sarg/arg/ here->MOS1tBulkPot + czbssw * model->MOS1bulkJctSideGradingCoeff * sargsw/arg / here->MOS1tBulkPot; here->MOS1f4s = czbs*here->MOS1tBulkPot*(1-arg*sarg)/ (1-model->MOS1bulkJctBotGradingCoeff) + czbssw*here->MOS1tBulkPot*(1-arg*sargsw)/ (1-model->MOS1bulkJctSideGradingCoeff) -here->MOS1f3s/2* (here->MOS1tDepCap*here->MOS1tDepCap) -here->MOS1tDepCap * here->MOS1f2s; if(model->MOS1drainResistanceGiven) { if(model->MOS1drainResistance != 0) { here->MOS1drainConductance = here->MOS1m / model->MOS1drainResistance; } else { here->MOS1drainConductance = 0; } } else if (model->MOS1sheetResistanceGiven) { if(model->MOS1sheetResistance != 0) { here->MOS1drainConductance = here->MOS1m / (model->MOS1sheetResistance*here->MOS1drainSquares); } else { here->MOS1drainConductance = 0; } } else { here->MOS1drainConductance = 0; } if(model->MOS1sourceResistanceGiven) { if(model->MOS1sourceResistance != 0) { here->MOS1sourceConductance = here->MOS1m / model->MOS1sourceResistance; } else { here->MOS1sourceConductance = 0; } } else if (model->MOS1sheetResistanceGiven) { if ((model->MOS1sheetResistance != 0) && (here->MOS1sourceSquares != 0)) { here->MOS1sourceConductance = here->MOS1m / (model->MOS1sheetResistance*here->MOS1sourceSquares); } else { here->MOS1sourceConductance = 0; } } else { here->MOS1sourceConductance = 0; } } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1dist.c0000644000265600020320000007716712264261473021044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int MOS1disto(int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { MOS1model *model = (MOS1model *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h1z, i1h1z; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1h2z, i1h2z; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r1hm2z, i1hm2z; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h11z, i2h11z; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double r2h1m2z, i2h1m2z; double temp, itemp; MOS1instance *here; if (mode == D_SETUP) return(MOS1dSetup(genmodel,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the MOS1 models */ for( ; model != NULL; model = model->MOS1nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + (here->MOS1dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F1(here->gbs2, r1h1y, i1h1y); itemp = D1i2F1(here->gbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = D1i2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F1(here->capgs2, r1h1x, i1h1x); itemp = ckt->CKTomega * D1n2F1(here->capgs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1bNode)) += temp; *(ckt->CKTirhs + (here->MOS1bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F1(here->capbs2, r1h1y, i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r2h11x = *(job->r2H11ptr + (here->MOS1gNode)) - *(job->r2H11ptr + (here->MOS1sNodePrime)); i2h11x = *(job->i2H11ptr + (here->MOS1gNode)) - *(job->i2H11ptr + (here->MOS1sNodePrime)); r2h11y = *(job->r2H11ptr + (here->MOS1bNode)) - *(job->r2H11ptr + (here->MOS1sNodePrime)); i2h11y = *(job->i2H11ptr + (here->MOS1bNode)) - *(job->i2H11ptr + (here->MOS1sNodePrime)); r2h11z = *(job->r2H11ptr + (here->MOS1dNodePrime)) - *(job->r2H11ptr + (here->MOS1sNodePrime)); i2h11z = *(job->i2H11ptr + (here->MOS1dNodePrime)) - *(job->i2H11ptr + (here->MOS1sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + (here->MOS1dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = D1i3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = D1i3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = ckt->CKTomega * D1n3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1bNode)) += temp; *(ckt->CKTirhs + (here->MOS1bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h2x = *(job->r1H2ptr + (here->MOS1gNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1h2x = *(job->i1H2ptr + (here->MOS1gNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime)); r1h2y = *(job->r1H2ptr + (here->MOS1bNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1h2y = *(job->i1H2ptr + (here->MOS1bNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime)); r1h2z = *(job->r1H2ptr + (here->MOS1dNodePrime)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1h2z = *(job->i1H2ptr + (here->MOS1dNodePrime)) - *(job->i1H2ptr + (here->MOS1sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + (here->MOS1dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1bNode)) += temp; *(ckt->CKTirhs + (here->MOS1bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS1gNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS1gNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS1bNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS1bNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS1dNodePrime)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS1dNodePrime)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + (here->MOS1dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1bNode)) += temp; *(ckt->CKTirhs + (here->MOS1bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS1gNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS1gNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS1bNode)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS1bNode)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS1dNodePrime)) - *(job->r1H2ptr + (here->MOS1sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS1dNodePrime)) - *(job->i1H2ptr + (here->MOS1sNodePrime))); r2h11x = *(job->r1H1ptr + (here->MOS1gNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i2h11x = *(job->i1H1ptr + (here->MOS1gNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r2h11y = *(job->r1H1ptr + (here->MOS1bNode)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i2h11y = *(job->i1H1ptr + (here->MOS1bNode)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r2h11z = *(job->r1H1ptr + (here->MOS1dNodePrime)) - *(job->r1H1ptr + (here->MOS1sNodePrime)); i2h11z = *(job->i1H1ptr + (here->MOS1dNodePrime)) - *(job->i1H1ptr + (here->MOS1sNodePrime)); r2h1m2x = *(job->r2H1m2ptr + (here->MOS1gNode)) - *(job->r2H1m2ptr + (here->MOS1sNodePrime)); i2h1m2x = *(job->i2H1m2ptr + (here->MOS1gNode)) - *(job->i2H1m2ptr + (here->MOS1sNodePrime)); r2h1m2y = *(job->r2H1m2ptr + (here->MOS1bNode)) - *(job->r2H1m2ptr + (here->MOS1sNodePrime)); i2h1m2y = *(job->i2H1m2ptr + (here->MOS1bNode)) - *(job->i2H1m2ptr + (here->MOS1sNodePrime)); r2h1m2z = *(job->r2H1m2ptr + (here->MOS1dNodePrime)) - *(job->r2H1m2ptr + (here->MOS1sNodePrime)); i2h1m2z = *(job->i2H1m2ptr + (here->MOS1dNodePrime)) - *(job->i2H1m2ptr + (here->MOS1sNodePrime)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_y2; pass.czz = here->cdr_z2; pass.cxy = here->cdr_xy; pass.cyz = here->cdr_yz; pass.cxz = here->cdr_xz; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_y3; pass.czzz = here->cdr_z3; pass.cxxy = here->cdr_x2y; pass.cxxz = here->cdr_x2z; pass.cxyy = here->cdr_xy2; pass.cyyz = here->cdr_y2z; pass.cxzz = here->cdr_xz2; pass.cyzz = here->cdr_yz2; pass.cxyz = here->cdr_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->MOS1dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = D1i2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = D1i2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = ckt->CKTomega * D1n2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->MOS1gNode)) -= temp; *(ckt->CKTirhs + (here->MOS1gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1bNode)) += temp; *(ckt->CKTirhs + (here->MOS1bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS1bNode)) -= temp; *(ckt->CKTirhs + (here->MOS1bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS1dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS1dNodePrime)) += itemp; /* capbd over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/mos1/Makefile.in0000644000265600020320000004434512264261537021173 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mos1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmos1_la_LIBADD = am_libmos1_la_OBJECTS = mos1.lo mos1acld.lo mos1ask.lo mos1conv.lo \ mos1del.lo mos1dest.lo mos1dist.lo mos1dset.lo mos1ic.lo \ mos1init.lo mos1load.lo mos1mask.lo mos1mdel.lo mos1mpar.lo \ mos1noi.lo mos1par.lo mos1pzld.lo mos1sacl.lo mos1set.lo \ mos1sld.lo mos1sprt.lo mos1sset.lo mos1supd.lo mos1temp.lo \ mos1trun.lo libmos1_la_OBJECTS = $(am_libmos1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmos1_la_SOURCES) DIST_SOURCES = $(libmos1_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmos1.la libmos1_la_SOURCES = \ mos1.c \ mos1acld.c \ mos1ask.c \ mos1conv.c \ mos1defs.h \ mos1del.c \ mos1dest.c \ mos1dist.c \ mos1dset.c \ mos1ext.h \ mos1ic.c \ mos1init.c \ mos1init.h \ mos1itf.h \ mos1load.c \ mos1mask.c \ mos1mdel.c \ mos1mpar.c \ mos1noi.c \ mos1par.c \ mos1pzld.c \ mos1sacl.c \ mos1set.c \ mos1sld.c \ mos1sprt.c \ mos1sset.c \ mos1supd.c \ mos1temp.c \ mos1trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mos1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mos1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmos1.la: $(libmos1_la_OBJECTS) $(libmos1_la_DEPENDENCIES) $(EXTRA_libmos1_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmos1_la_OBJECTS) $(libmos1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1dset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1sacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1sld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1sprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1sset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1supd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos1trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mos1/mos1acld.c0000644000265600020320000001045412264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS1acLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS1model *model = (MOS1model*)inModel; MOS1instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; for( ; model != NULL; model = model->MOS1nextModel) { for(here = model->MOS1instances; here!= NULL; here = here->MOS1nextInstance) { if (here->MOS1mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveLength=here->MOS1l - 2*model->MOS1latDiff; GateSourceOverlapCap = model->MOS1gateSourceOverlapCapFactor * here->MOS1m * here->MOS1w; GateDrainOverlapCap = model->MOS1gateDrainOverlapCapFactor * here->MOS1m * here->MOS1w; GateBulkOverlapCap = model->MOS1gateBulkOverlapCapFactor * here->MOS1m * EffectiveLength; capgs = ( *(ckt->CKTstate0+here->MOS1capgs)+ *(ckt->CKTstate0+here->MOS1capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS1capgd)+ *(ckt->CKTstate0+here->MOS1capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS1capgb)+ *(ckt->CKTstate0+here->MOS1capgb) + GateBulkOverlapCap ); xgs = capgs * ckt->CKTomega; xgd = capgd * ckt->CKTomega; xgb = capgb * ckt->CKTomega; xbd = here->MOS1capbd * ckt->CKTomega; xbs = here->MOS1capbs * ckt->CKTomega; /* * load matrix */ *(here->MOS1GgPtr +1) += xgd+xgs+xgb; *(here->MOS1BbPtr +1) += xgb+xbd+xbs; *(here->MOS1DPdpPtr +1) += xgd+xbd; *(here->MOS1SPspPtr +1) += xgs+xbs; *(here->MOS1GbPtr +1) -= xgb; *(here->MOS1GdpPtr +1) -= xgd; *(here->MOS1GspPtr +1) -= xgs; *(here->MOS1BgPtr +1) -= xgb; *(here->MOS1BdpPtr +1) -= xbd; *(here->MOS1BspPtr +1) -= xbs; *(here->MOS1DPgPtr +1) -= xgd; *(here->MOS1DPbPtr +1) -= xbd; *(here->MOS1SPgPtr +1) -= xgs; *(here->MOS1SPbPtr +1) -= xbs; *(here->MOS1DdPtr) += here->MOS1drainConductance; *(here->MOS1SsPtr) += here->MOS1sourceConductance; *(here->MOS1BbPtr) += here->MOS1gbd+here->MOS1gbs; *(here->MOS1DPdpPtr) += here->MOS1drainConductance+ here->MOS1gds+here->MOS1gbd+ xrev*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1SPspPtr) += here->MOS1sourceConductance+ here->MOS1gds+here->MOS1gbs+ xnrm*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1DdpPtr) -= here->MOS1drainConductance; *(here->MOS1SspPtr) -= here->MOS1sourceConductance; *(here->MOS1BdpPtr) -= here->MOS1gbd; *(here->MOS1BspPtr) -= here->MOS1gbs; *(here->MOS1DPdPtr) -= here->MOS1drainConductance; *(here->MOS1DPgPtr) += (xnrm-xrev)*here->MOS1gm; *(here->MOS1DPbPtr) += -here->MOS1gbd+(xnrm-xrev)*here->MOS1gmbs; *(here->MOS1DPspPtr) -= here->MOS1gds+ xnrm*(here->MOS1gm+here->MOS1gmbs); *(here->MOS1SPgPtr) -= (xnrm-xrev)*here->MOS1gm; *(here->MOS1SPsPtr) -= here->MOS1sourceConductance; *(here->MOS1SPbPtr) -= here->MOS1gbs+(xnrm-xrev)*here->MOS1gmbs; *(here->MOS1SPdpPtr) -= here->MOS1gds+ xrev*(here->MOS1gm+here->MOS1gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos1/mos1sprt.c0000644000265600020320000000417512264261473021056 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all * the MOS1 devices in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos1defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void MOS1sPrint(GENmodel *inModel, CKTcircuit *ckt) /* Pretty print the sensitivity info for all the MOS1 * devices in the circuit. */ { MOS1model *model = (MOS1model *)inModel; MOS1instance *here; printf("LEVEL 1 MOSFETS-----------------\n"); /* loop through all the MOS1 models */ for( ; model != NULL; model = model->MOS1nextModel ) { printf("Model name:%s\n",model->MOS1modName); /* loop through all the instances of the model */ for (here = model->MOS1instances; here != NULL ; here=here->MOS1nextInstance) { printf(" Instance name:%s\n",here->MOS1name); printf(" Drain, Gate , Source nodes: %s, %s ,%s\n", CKTnodName(ckt,here->MOS1dNode),CKTnodName(ckt,here->MOS1gNode), CKTnodName(ckt,here->MOS1sNode)); printf(" Multiplier: %g ",here->MOS1m); printf(here->MOS1mGiven ? "(specified)\n" : "(default)\n"); printf(" Length: %g ",here->MOS1l); printf(here->MOS1lGiven ? "(specified)\n" : "(default)\n"); printf(" Width: %g ",here->MOS1w); printf(here->MOS1wGiven ? "(specified)\n" : "(default)\n"); if(here->MOS1sens_l == 1){ printf(" MOS1senParmNo:l = %d ",here->MOS1senParmNo); } else{ printf(" MOS1senParmNo:l = 0 "); } if(here->MOS1sens_w == 1){ printf(" w = %d \n",here->MOS1senParmNo + here->MOS1sens_l); } else{ printf(" w = 0 \n"); } } } } ngspice-26/src/spicelib/devices/mos1/mos1itf.h0000644000265600020320000000026712264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MOS1 #define DEV_MOS1 extern SPICEdev *get_mos1_info(void); #endif ngspice-26/src/spicelib/devices/mos6/0000755000265600020320000000000012264261710017112 5ustar andreasadminngspice-26/src/spicelib/devices/mos6/mos6trun.c0000644000265600020320000000135412264261473021064 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MOS6model *model = (MOS6model *)inModel; MOS6instance *here; for( ; model != NULL; model = model->MOS6nextModel) { for(here=model->MOS6instances;here!=NULL;here = here->MOS6nextInstance){ CKTterr(here->MOS6qgs,ckt,timeStep); CKTterr(here->MOS6qgd,ckt,timeStep); CKTterr(here->MOS6qgb,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mos6/mos6mask.c0000644000265600020320000001032212264261473021022 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6mAsk(CKTcircuit *ckt, GENmodel *inModel, int param, IFvalue *value) { MOS6model *model = (MOS6model *)inModel; NG_IGNORE(ckt); switch(param) { case MOS6_MOD_TNOM: value->rValue = model->MOS6tnom; break; case MOS6_MOD_VTO: value->rValue = model->MOS6vt0; break; case MOS6_MOD_KV: value->rValue = model->MOS6kv; break; case MOS6_MOD_NV: value->rValue = model->MOS6nv; break; case MOS6_MOD_KC: value->rValue = model->MOS6kc; break; case MOS6_MOD_NC: value->rValue = model->MOS6nc; break; case MOS6_MOD_NVTH: value->rValue = model->MOS6nvth; break; case MOS6_MOD_PS: value->rValue = model->MOS6ps; break; case MOS6_MOD_GAMMA: value->rValue = model->MOS6gamma; break; case MOS6_MOD_GAMMA1: value->rValue = model->MOS6gamma1; break; case MOS6_MOD_SIGMA: value->rValue = model->MOS6sigma; break; case MOS6_MOD_PHI: value->rValue = model->MOS6phi; break; case MOS6_MOD_LAMBDA: value->rValue = model->MOS6lambda; break; case MOS6_MOD_LAMDA0: value->rValue = model->MOS6lamda0; break; case MOS6_MOD_LAMDA1: value->rValue = model->MOS6lamda1; break; case MOS6_MOD_RD: value->rValue = model->MOS6drainResistance; break; case MOS6_MOD_RS: value->rValue = model->MOS6sourceResistance; break; case MOS6_MOD_CBD: value->rValue = model->MOS6capBD; break; case MOS6_MOD_CBS: value->rValue = model->MOS6capBS; break; case MOS6_MOD_IS: value->rValue = model->MOS6jctSatCur; break; case MOS6_MOD_PB: value->rValue = model->MOS6bulkJctPotential; break; case MOS6_MOD_CGSO: value->rValue = model->MOS6gateSourceOverlapCapFactor; break; case MOS6_MOD_CGDO: value->rValue = model->MOS6gateDrainOverlapCapFactor; break; case MOS6_MOD_CGBO: value->rValue = model->MOS6gateBulkOverlapCapFactor; break; case MOS6_MOD_CJ: value->rValue = model->MOS6bulkCapFactor; break; case MOS6_MOD_MJ: value->rValue = model->MOS6bulkJctBotGradingCoeff; break; case MOS6_MOD_CJSW: value->rValue = model->MOS6sideWallCapFactor; break; case MOS6_MOD_MJSW: value->rValue = model->MOS6bulkJctSideGradingCoeff; break; case MOS6_MOD_JS: value->rValue = model->MOS6jctSatCurDensity; break; case MOS6_MOD_TOX: value->rValue = model->MOS6oxideThickness; break; case MOS6_MOD_LD: value->rValue = model->MOS6latDiff; break; case MOS6_MOD_RSH: value->rValue = model->MOS6sheetResistance; break; case MOS6_MOD_U0: value->rValue = model->MOS6surfaceMobility; break; case MOS6_MOD_FC: value->rValue = model->MOS6fwdCapDepCoeff; break; case MOS6_MOD_NSS: value->rValue = model->MOS6surfaceStateDensity; break; case MOS6_MOD_NSUB: value->rValue = model->MOS6substrateDoping; break; case MOS6_MOD_TPG: value->iValue = model->MOS6gateType; break; case MOS6_MOD_TYPE: if (model->MOS6type > 0) value->sValue = "nmos"; else value->sValue = "pmos"; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos6/mos6init.h0000644000265600020320000000037012264261473021041 0ustar andreasadmin#ifndef _MOS6INIT_H #define _MOS6INIT_H extern IFparm MOS6pTable[ ]; extern IFparm MOS6mPTable[ ]; extern char *MOS6names[ ]; extern int MOS6nSize; extern int MOS6pTSize; extern int MOS6mPTSize; extern int MOS6iSize; extern int MOS6mSize; #endif ngspice-26/src/spicelib/devices/mos6/mos6itf.h0000644000265600020320000000034312264261473020660 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 T. Sakurai Modified: 1999 Paolo Nenzi **********/ #ifndef DEV_MOS6 #define DEV_MOS6 SPICEdev *get_mos6_info(void); #endif ngspice-26/src/spicelib/devices/mos6/mos6defs.h0000644000265600020320000004442612264261473021031 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef MOS6 #define MOS6 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* declarations for level 5 MOSFETs */ /* information needed for each instance */ typedef struct sMOS6instance { struct sMOS6model *sMOS6modPtr; /* backpointer to model */ struct sMOS6instance *MOS6nextInstance; /* pointer to next instance of *current model*/ IFuid MOS6name; /* pointer to character string naming this instance */ int MOS6states; /* index into state table for this device */ int MOS6dNode; /* number of the gate node of the mosfet */ int MOS6gNode; /* number of the gate node of the mosfet */ int MOS6sNode; /* number of the source node of the mosfet */ int MOS6bNode; /* number of the bulk node of the mosfet */ int MOS6dNodePrime; /* number of the internal drain node of the mosfet */ int MOS6sNodePrime; /* number of the internal source node of the mosfet */ double MOS6l; /* the length of the channel region */ double MOS6w; /* the width of the channel region */ double MOS6m; /* the parallel multiplier */ double MOS6drainArea; /* the area of the drain diffusion */ double MOS6sourceArea; /* the area of the source diffusion */ double MOS6drainSquares; /* the length of the drain in squares */ double MOS6sourceSquares; /* the length of the source in squares */ double MOS6drainPerimiter; double MOS6sourcePerimiter; double MOS6sourceConductance; /*conductance of source(or 0):set in setup*/ double MOS6drainConductance; /*conductance of drain(or 0):set in setup*/ double MOS6temp; /* operating temperature of this instance */ double MOS6dtemp; /* instance temperature difference from circuit */ double MOS6tKv; /* temperature corrected drain linear cond. factor*/ double MOS6tKc; /* temperature corrected saturation cur. factor*/ double MOS6tSurfMob; /* temperature corrected surface mobility */ double MOS6tPhi; /* temperature corrected Phi */ double MOS6tVto; /* temperature corrected Vto */ double MOS6tSatCur; /* temperature corrected saturation Cur. */ double MOS6tSatCurDens; /* temperature corrected saturation Cur. density*/ double MOS6tCbd; /* temperature corrected B-D Capacitance */ double MOS6tCbs; /* temperature corrected B-S Capacitance */ double MOS6tCj; /* temperature corrected Bulk bottom Capacitance */ double MOS6tCjsw; /* temperature corrected Bulk side Capacitance */ double MOS6tBulkPot; /* temperature corrected Bulk potential */ double MOS6tDepCap; /* temperature adjusted transition point in */ /* the cureve matching Fc * Vj */ double MOS6tVbi; /* temperature adjusted Vbi */ double MOS6icVBS; /* initial condition B-S voltage */ double MOS6icVDS; /* initial condition D-S voltage */ double MOS6icVGS; /* initial condition G-S voltage */ double MOS6von; double MOS6vdsat; double MOS6sourceVcrit; /* Vcrit for pos. vds */ double MOS6drainVcrit; /* Vcrit for pos. vds */ double MOS6cd; double MOS6cbs; double MOS6cbd; double MOS6gmbs; double MOS6gm; double MOS6gds; double MOS6gbd; double MOS6gbs; double MOS6capbd; double MOS6capbs; double MOS6Cbd; double MOS6Cbdsw; double MOS6Cbs; double MOS6Cbssw; double MOS6f2d; double MOS6f3d; double MOS6f4d; double MOS6f2s; double MOS6f3s; double MOS6f4s; int MOS6mode; /* device mode : 1 = normal, -1 = inverse */ unsigned MOS6off:1; /* non-zero to indicate device is off for dc analysis*/ unsigned MOS6tempGiven :1; /* instance temperature specified */ unsigned MOS6dtempGiven :1; unsigned MOS6lGiven :1; unsigned MOS6wGiven :1; unsigned MOS6mGiven :1; unsigned MOS6drainAreaGiven :1; unsigned MOS6sourceAreaGiven :1; unsigned MOS6drainSquaresGiven :1; unsigned MOS6sourceSquaresGiven :1; unsigned MOS6drainPerimiterGiven :1; unsigned MOS6sourcePerimiterGiven :1; unsigned MOS6dNodePrimeSet :1; unsigned MOS6sNodePrimeSet :1; unsigned MOS6icVBSGiven :1; unsigned MOS6icVDSGiven :1; unsigned MOS6icVGSGiven :1; unsigned MOS6vonGiven :1; unsigned MOS6vdsatGiven :1; unsigned MOS6modeGiven :1; double *MOS6DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *MOS6GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *MOS6SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *MOS6BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *MOS6DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *MOS6SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *MOS6DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *MOS6GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *MOS6GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *MOS6GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *MOS6SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *MOS6BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *MOS6BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *MOS6DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *MOS6DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *MOS6BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *MOS6DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *MOS6SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *MOS6SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *MOS6DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *MOS6SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *MOS6SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ int MOS6senParmNo; /* parameter # for sensitivity use; set equal to 0 if neither length nor width of the mosfet is a design parameter */ unsigned MOS6sens_l :1; /* field which indicates whether length of the mosfet is a design parameter or not */ unsigned MOS6sens_w :1; /* field which indicates whether width of the mosfet is a design parameter or not */ unsigned MOS6senPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ double MOS6cgs; double MOS6cgd; double MOS6cgb; double *MOS6sens; #define MOS6senCgs MOS6sens /* contains pertured values of cgs */ #define MOS6senCgd MOS6sens + 6 /* contains perturbed values of cgd*/ #define MOS6senCgb MOS6sens + 12 /* contains perturbed values of cgb*/ #define MOS6senCbd MOS6sens + 18 /* contains perturbed values of cbd*/ #define MOS6senCbs MOS6sens + 24 /* contains perturbed values of cbs*/ #define MOS6senGds MOS6sens + 30 /* contains perturbed values of gds*/ #define MOS6senGbs MOS6sens + 36 /* contains perturbed values of gbs*/ #define MOS6senGbd MOS6sens + 42 /* contains perturbed values of gbd*/ #define MOS6senGm MOS6sens + 48 /* contains perturbed values of gm*/ #define MOS6senGmbs MOS6sens + 54 /* contains perturbed values of gmbs*/ #define MOS6dphigs_dl MOS6sens + 60 #define MOS6dphigd_dl MOS6sens + 61 #define MOS6dphigb_dl MOS6sens + 62 #define MOS6dphibs_dl MOS6sens + 63 #define MOS6dphibd_dl MOS6sens + 64 #define MOS6dphigs_dw MOS6sens + 65 #define MOS6dphigd_dw MOS6sens + 66 #define MOS6dphigb_dw MOS6sens + 67 #define MOS6dphibs_dw MOS6sens + 68 #define MOS6dphibd_dw MOS6sens + 69 } MOS6instance ; #define MOS6vbd MOS6states+ 0 /* bulk-drain voltage */ #define MOS6vbs MOS6states+ 1 /* bulk-source voltage */ #define MOS6vgs MOS6states+ 2 /* gate-source voltage */ #define MOS6vds MOS6states+ 3 /* drain-source voltage */ #define MOS6capgs MOS6states+4 /* gate-source capacitor value */ #define MOS6qgs MOS6states+ 5 /* gate-source capacitor charge */ #define MOS6cqgs MOS6states+ 6 /* gate-source capacitor current */ #define MOS6capgd MOS6states+ 7 /* gate-drain capacitor value */ #define MOS6qgd MOS6states+ 8 /* gate-drain capacitor charge */ #define MOS6cqgd MOS6states+ 9 /* gate-drain capacitor current */ #define MOS6capgb MOS6states+10 /* gate-bulk capacitor value */ #define MOS6qgb MOS6states+ 11 /* gate-bulk capacitor charge */ #define MOS6cqgb MOS6states+ 12 /* gate-bulk capacitor current */ #define MOS6qbd MOS6states+ 13 /* bulk-drain capacitor charge */ #define MOS6cqbd MOS6states+ 14 /* bulk-drain capacitor current */ #define MOS6qbs MOS6states+ 15 /* bulk-source capacitor charge */ #define MOS6cqbs MOS6states+ 16 /* bulk-source capacitor current */ #define MOS6numStates 17 #define MOS6sensxpgs MOS6states+17 /* charge sensitivities and their derivatives. +18 for the derivatives: pointer to the beginning of the array */ #define MOS6sensxpgd MOS6states+19 #define MOS6sensxpgb MOS6states+21 #define MOS6sensxpbs MOS6states+23 #define MOS6sensxpbd MOS6states+25 #define MOS6numSenStates 10 /* per model data */ /* NOTE: parameters marked 'input - use xxxx' are paramters for * which a temperature correction is applied in MOS6temp, thus * the MOS6xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sMOS6model { /* model structure for a resistor */ int MOS6modType; /* type index to this device type */ struct sMOS6model *MOS6nextModel; /* pointer to next possible model *in linked list */ MOS6instance * MOS6instances; /* pointer to list of instances * that have this model */ IFuid MOS6modName; /* pointer to character string naming this model */ int MOS6type; /* device type : 1 = nmos, -1 = pmos */ double MOS6tnom; /* temperature at which parameters measured */ double MOS6latDiff; double MOS6jctSatCurDensity; /* input - use tSatCurDens */ double MOS6jctSatCur; /* input - use tSatCur */ double MOS6drainResistance; double MOS6sourceResistance; double MOS6sheetResistance; double MOS6kv; /* input - use tKv */ double MOS6nv; /* drain linear conductance factor*/ double MOS6kc; /* input - use tKc */ double MOS6nc; /* saturation current coeff.*/ double MOS6nvth; /* threshold voltage coeff.*/ double MOS6ps; /* saturation current modification parameter*/ double MOS6gateSourceOverlapCapFactor; double MOS6gateDrainOverlapCapFactor; double MOS6gateBulkOverlapCapFactor; double MOS6oxideCapFactor; double MOS6vt0; /* input - use tVto */ double MOS6capBD; /* input - use tCbd */ double MOS6capBS; /* input - use tCbs */ double MOS6bulkCapFactor; /* input - use tCj */ double MOS6sideWallCapFactor; /* input - use tCjsw */ double MOS6bulkJctPotential; /* input - use tBulkPot */ double MOS6bulkJctBotGradingCoeff; double MOS6bulkJctSideGradingCoeff; double MOS6fwdCapDepCoeff; double MOS6phi; /* input - use tPhi */ double MOS6gamma; double MOS6gamma1; /* secondary back-gate effect parametr */ double MOS6sigma; double MOS6lambda; double MOS6lamda0; double MOS6lamda1; double MOS6substrateDoping; int MOS6gateType; double MOS6surfaceStateDensity; double MOS6oxideThickness; double MOS6surfaceMobility; /* input - use tSurfMob */ unsigned MOS6typeGiven :1; unsigned MOS6latDiffGiven :1; unsigned MOS6jctSatCurDensityGiven :1; unsigned MOS6jctSatCurGiven :1; unsigned MOS6drainResistanceGiven :1; unsigned MOS6sourceResistanceGiven :1; unsigned MOS6sheetResistanceGiven :1; unsigned MOS6kvGiven :1; unsigned MOS6nvGiven :1; unsigned MOS6kcGiven :1; unsigned MOS6ncGiven :1; unsigned MOS6nvthGiven :1; unsigned MOS6psGiven :1; unsigned MOS6gateSourceOverlapCapFactorGiven :1; unsigned MOS6gateDrainOverlapCapFactorGiven :1; unsigned MOS6gateBulkOverlapCapFactorGiven :1; unsigned MOS6vt0Given :1; unsigned MOS6capBDGiven :1; unsigned MOS6capBSGiven :1; unsigned MOS6bulkCapFactorGiven :1; unsigned MOS6sideWallCapFactorGiven :1; unsigned MOS6bulkJctPotentialGiven :1; unsigned MOS6bulkJctBotGradingCoeffGiven :1; unsigned MOS6bulkJctSideGradingCoeffGiven :1; unsigned MOS6fwdCapDepCoeffGiven :1; unsigned MOS6phiGiven :1; unsigned MOS6gammaGiven :1; unsigned MOS6gamma1Given :1; unsigned MOS6sigmaGiven :1; unsigned MOS6lambdaGiven :1; unsigned MOS6lamda0Given :1; unsigned MOS6lamda1Given :1; unsigned MOS6substrateDopingGiven :1; unsigned MOS6gateTypeGiven :1; unsigned MOS6surfaceStateDensityGiven :1; unsigned MOS6oxideThicknessGiven :1; unsigned MOS6surfaceMobilityGiven :1; unsigned MOS6tnomGiven :1; } MOS6model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define MOS6_W 1 #define MOS6_L 2 #define MOS6_AS 3 #define MOS6_AD 4 #define MOS6_PS 5 #define MOS6_PD 6 #define MOS6_NRS 7 #define MOS6_NRD 8 #define MOS6_OFF 9 #define MOS6_IC 10 #define MOS6_IC_VBS 11 #define MOS6_IC_VDS 12 #define MOS6_IC_VGS 13 #define MOS6_W_SENS 14 #define MOS6_L_SENS 15 #define MOS6_CB 16 #define MOS6_CG 17 #define MOS6_CS 18 #define MOS6_POWER 19 #define MOS6_TEMP 20 #define MOS6_DTEMP 21 #define MOS6_M 22 /* model paramerers */ #define MOS6_MOD_VTO 101 #define MOS6_MOD_KV 102 #define MOS6_MOD_NV 103 #define MOS6_MOD_KC 104 #define MOS6_MOD_NC 105 #define MOS6_MOD_NVTH 106 #define MOS6_MOD_PS 107 #define MOS6_MOD_GAMMA 108 #define MOS6_MOD_GAMMA1 109 #define MOS6_MOD_SIGMA 110 #define MOS6_MOD_PHI 111 #define MOS6_MOD_LAMBDA 112 #define MOS6_MOD_LAMDA0 113 #define MOS6_MOD_LAMDA1 114 #define MOS6_MOD_RD 115 #define MOS6_MOD_RS 116 #define MOS6_MOD_CBD 117 #define MOS6_MOD_CBS 118 #define MOS6_MOD_IS 119 #define MOS6_MOD_PB 120 #define MOS6_MOD_CGSO 121 #define MOS6_MOD_CGDO 122 #define MOS6_MOD_CGBO 123 #define MOS6_MOD_CJ 124 #define MOS6_MOD_MJ 125 #define MOS6_MOD_CJSW 126 #define MOS6_MOD_MJSW 127 #define MOS6_MOD_JS 128 #define MOS6_MOD_TOX 129 #define MOS6_MOD_LD 130 #define MOS6_MOD_RSH 131 #define MOS6_MOD_U0 132 #define MOS6_MOD_FC 133 #define MOS6_MOD_NSUB 134 #define MOS6_MOD_TPG 135 #define MOS6_MOD_NSS 136 #define MOS6_MOD_NMOS 137 #define MOS6_MOD_PMOS 138 #define MOS6_MOD_TNOM 139 #define MOS6_MOD_TYPE 140 /* device questions */ #define MOS6_CGS 201 #define MOS6_CGD 202 #define MOS6_DNODE 203 #define MOS6_GNODE 204 #define MOS6_SNODE 205 #define MOS6_BNODE 206 #define MOS6_DNODEPRIME 207 #define MOS6_SNODEPRIME 208 #define MOS6_SOURCECONDUCT 209 #define MOS6_DRAINCONDUCT 210 #define MOS6_VON 211 #define MOS6_VDSAT 212 #define MOS6_SOURCEVCRIT 213 #define MOS6_DRAINVCRIT 214 #define MOS6_CD 215 #define MOS6_CBS 216 #define MOS6_CBD 217 #define MOS6_GMBS 218 #define MOS6_GM 219 #define MOS6_GDS 220 #define MOS6_GBD 221 #define MOS6_GBS 222 #define MOS6_CAPBD 223 #define MOS6_CAPBS 224 #define MOS6_CAPZEROBIASBD 225 #define MOS6_CAPZEROBIASBDSW 226 #define MOS6_CAPZEROBIASBS 227 #define MOS6_CAPZEROBIASBSSW 228 #define MOS6_VBD 229 #define MOS6_VBS 230 #define MOS6_VGS 231 #define MOS6_VDS 232 #define MOS6_CAPGS 233 #define MOS6_QGS 234 #define MOS6_CQGS 235 #define MOS6_CAPGD 236 #define MOS6_QGD 237 #define MOS6_CQGD 238 #define MOS6_CAPGB 239 #define MOS6_QGB 240 #define MOS6_CQGB 241 #define MOS6_QBD 242 #define MOS6_CQBD 243 #define MOS6_QBS 244 #define MOS6_CQBS 245 #define MOS6_L_SENS_REAL 246 #define MOS6_L_SENS_IMAG 247 #define MOS6_L_SENS_MAG 248 #define MOS6_L_SENS_PH 249 #define MOS6_L_SENS_CPLX 250 #define MOS6_W_SENS_REAL 251 #define MOS6_W_SENS_IMAG 252 #define MOS6_W_SENS_MAG 253 #define MOS6_W_SENS_PH 254 #define MOS6_W_SENS_CPLX 255 #define MOS6_L_SENS_DC 256 #define MOS6_W_SENS_DC 257 #define MOS6_SOURCERESIST 258 #define MOS6_DRAINRESIST 259 /* model questions */ #include "mos6ext.h" #endif /*MOS6*/ ngspice-26/src/spicelib/devices/mos6/mos6load.c0000644000265600020320000011263712264261473021022 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos6defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS6model *model = (MOS6model *) inModel; MOS6instance *here; double betac; double DrainSatCur; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cbhat; double cdhat; double cdrain; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqgb; double ceqgd; double ceqgs; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gcgb; double gcgd; double gcgs; double geq; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb1; double vgb; double vgd1; double vgd; double vgdo; double vgs1; double vgs; double von; double vt; #ifndef PREDICTOR double xfact = 0.0; #endif int xnrm; int xrev; double capgs = 0.0; /* total gate-source capacitance */ double capgd = 0.0; /* total gate-drain capacitance */ double capgb = 0.0; /* total gate-bulk capacitance */ int Check; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; #ifdef CAPBYPASS int senflag; #endif /* CAPBYPASS */ int SenCond; double m; #ifdef CAPBYPASS senflag = 0; if(ckt->CKTsenInfo && ckt->CKTsenInfo->SENstatus == PERTURBATION && (ckt->CKTsenInfo->SENmode & (ACSEN | TRANSEN))) { senflag = 1; } #endif /* CAPBYPASS */ /* loop through all the MOS6 device models */ for( ; model != NULL; model = model->MOS6nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS6instances; here != NULL ; here=here->MOS6nextInstance) { vt = CONSTKoverQ * here->MOS6temp; Check=1; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("MOS6load \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENstatus == PERTURBATION)&& (here->MOS6senPertFlag == OFF))continue; } SenCond = ckt->CKTsenInfo && here->MOS6senPertFlag; /* */ /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveLength=here->MOS6l - 2*model->MOS6latDiff; if( (here->MOS6tSatCurDens == 0) || (here->MOS6drainArea == 0) || (here->MOS6sourceArea == 0)) { DrainSatCur = here->MOS6tSatCur; SourceSatCur = here->MOS6tSatCur; } else { DrainSatCur = here->MOS6tSatCurDens * here->MOS6drainArea; SourceSatCur = here->MOS6tSatCurDens * here->MOS6sourceArea; } GateSourceOverlapCap = model->MOS6gateSourceOverlapCapFactor * here->MOS6w; GateDrainOverlapCap = model->MOS6gateDrainOverlapCapFactor * here->MOS6w; GateBulkOverlapCap = model->MOS6gateBulkOverlapCapFactor * EffectiveLength; betac = here->MOS6tKc * here->MOS6w/EffectiveLength; OxideCap = model->MOS6oxideCapFactor * EffectiveLength * here->MOS6w; /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ if(SenCond){ #ifdef SENSDEBUG printf("MOS6senPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { vgs = *(ckt->CKTstate1 + here->MOS6vgs); vds = *(ckt->CKTstate1 + here->MOS6vds); vbs = *(ckt->CKTstate1 + here->MOS6vbs); vbd = *(ckt->CKTstate1 + here->MOS6vbd); vgb = vgs - vbs; vgd = vgs - vds; } else if (ckt->CKTsenInfo->SENmode == ACSEN){ vgb = model->MOS6type * ( *(ckt->CKTrhsOp+here->MOS6gNode) - *(ckt->CKTrhsOp+here->MOS6bNode)); vbs = *(ckt->CKTstate0 + here->MOS6vbs); vbd = *(ckt->CKTstate0 + here->MOS6vbd); vgd = vgb + vbd ; vgs = vgb + vbs ; vds = vbs - vbd ; } else{ vgs = *(ckt->CKTstate0 + here->MOS6vgs); vds = *(ckt->CKTstate0 + here->MOS6vds); vbs = *(ckt->CKTstate0 + here->MOS6vbs); vbd = *(ckt->CKTstate0 + here->MOS6vbd); vgb = vgs - vbs; vgd = vgs - vds; } #ifdef SENSDEBUG printf(" vbs = %.7e ,vbd = %.7e,vgb = %.7e\n",vbs,vbd,vgb); printf(" vgs = %.7e ,vds = %.7e,vgd = %.7e\n",vgs,vds,vgd); #endif /* SENSDEBUG */ goto next1; } if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED | MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->MOS6off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MOS6vbs) = *(ckt->CKTstate1 + here->MOS6vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS6vbs)) -(xfact * (*(ckt->CKTstate2 + here->MOS6vbs))); *(ckt->CKTstate0 + here->MOS6vgs) = *(ckt->CKTstate1 + here->MOS6vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS6vgs)) -(xfact * (*(ckt->CKTstate2 + here->MOS6vgs))); *(ckt->CKTstate0 + here->MOS6vds) = *(ckt->CKTstate1 + here->MOS6vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->MOS6vds)) -(xfact * (*(ckt->CKTstate2 + here->MOS6vds))); *(ckt->CKTstate0 + here->MOS6vbd) = *(ckt->CKTstate0 + here->MOS6vbs)- *(ckt->CKTstate0 + here->MOS6vds); } else { #endif /* PREDICTOR */ /* general iteration */ vbs = model->MOS6type * ( *(ckt->CKTrhsOld+here->MOS6bNode) - *(ckt->CKTrhsOld+here->MOS6sNodePrime)); vgs = model->MOS6type * ( *(ckt->CKTrhsOld+here->MOS6gNode) - *(ckt->CKTrhsOld+here->MOS6sNodePrime)); vds = model->MOS6type * ( *(ckt->CKTrhsOld+here->MOS6dNodePrime) - *(ckt->CKTrhsOld+here->MOS6sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS6vgs) - *(ckt->CKTstate0 + here->MOS6vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS6vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS6vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS6vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS6vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS6mode >= 0) { cdhat= here->MOS6cd- here->MOS6gbd * delvbd + here->MOS6gmbs * delvbs + here->MOS6gm * delvgs + here->MOS6gds * delvds ; } else { cdhat= here->MOS6cd - ( here->MOS6gbd - here->MOS6gmbs) * delvbd - here->MOS6gm * delvgd + here->MOS6gds * delvds ; } cbhat= here->MOS6cbs + here->MOS6cbd + here->MOS6gbd * delvbd + here->MOS6gbs * delvbs ; /* */ #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* the following mess should be one if statement, but * many compilers can't handle it all at once, so it * is split into several successive if statements */ tempv = MAX(fabs(cbhat),fabs(here->MOS6cbs + here->MOS6cbd))+ckt->CKTabstol; if((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG) )) && (ckt->CKTbypass) ) if ( (fabs(cbhat-(here->MOS6cbs + here->MOS6cbd)) < ckt->CKTreltol * tempv)) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS6vbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS6vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->MOS6vgs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->MOS6vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- here->MOS6cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs( here->MOS6cd)) + ckt->CKTabstol) ) { /* bypass code * * nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration out * and keep going */ vbs = *(ckt->CKTstate0 + here->MOS6vbs); vbd = *(ckt->CKTstate0 + here->MOS6vbd); vgs = *(ckt->CKTstate0 + here->MOS6vgs); vds = *(ckt->CKTstate0 + here->MOS6vds); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->MOS6mode * (here->MOS6cd + here->MOS6cbd); if(ckt->CKTmode & (MODETRAN | MODETRANOP)) { capgs = ( *(ckt->CKTstate0+here->MOS6capgs)+ *(ckt->CKTstate1+here->MOS6capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS6capgd)+ *(ckt->CKTstate1+here->MOS6capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS6capgb)+ *(ckt->CKTstate1+here->MOS6capgb) + GateBulkOverlapCap ); if(ckt->CKTsenInfo){ here->MOS6cgs = capgs; here->MOS6cgd = capgd; here->MOS6cgb = capgb; } } goto bypass; } #endif /*NOBYPASS*/ /* */ /* ok - bypass is out, do it the hard way */ von = model->MOS6type * here->MOS6von; #ifndef NODELIMITING /* * limiting * we want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->MOS6vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MOS6vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->MOS6vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->MOS6vds))); } vgs = vgd + vds; } if(vds >= 0) { vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->MOS6vbs), vt,here->MOS6sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->MOS6vbd), vt,here->MOS6drainVcrit,&Check); vbs = vbd + vds; } #endif /*NODELIMITING*/ /* */ } else { /* ok - not one of the simple cases, so we have to * look at all of the possibilities for why we were * called. We still just initialize the three voltages */ if((ckt->CKTmode & MODEINITJCT) && !here->MOS6off) { vds= model->MOS6type * here->MOS6icVDS; vgs= model->MOS6type * here->MOS6icVGS; vbs= model->MOS6type * here->MOS6icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = model->MOS6type * here->MOS6tVto; vds = 0; } } else { vbs=vgs=vds=0; } } /* */ /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) { here->MOS6gbs = ckt->CKTgmin; here->MOS6cbs = here->MOS6gbs*vbs-SourceSatCur; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS6gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS6cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; } if(vbd <= -3*vt) { here->MOS6gbd = ckt->CKTgmin; here->MOS6cbd = here->MOS6gbd*vbd-DrainSatCur; } else { evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS6gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS6cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS6mode = 1; } else { /* inverse mode */ here->MOS6mode = -1; } /* */ { /* * this block of code evaluates the drain current and its * derivatives using the n-th power MOS model and the * charges associated with the gate, channel and bulk for * mosfets * */ /* the following 14 variables are local to this code block until * it is obvious that they can be made global */ double arg; double sarg; double vgon; double vdshere, vbsvbd; double idsat, lambda, vonbm = 0.0; double vdst, vdst2, ivdst1, vdstg; vbsvbd = (here->MOS6mode==1?vbs:vbd); if (vbsvbd <= 0 ) { sarg = sqrt(here->MOS6tPhi - vbsvbd); } else { sarg = sqrt(here->MOS6tPhi); sarg = sarg - vbsvbd / (sarg+sarg); sarg = MAX(0,sarg); } vdshere = vds * here->MOS6mode; von=(here->MOS6tVbi*model->MOS6type)+model->MOS6gamma*sarg - model->MOS6gamma1 * vbsvbd - model->MOS6sigma * vdshere; vgon = (here->MOS6mode==1?vgs:vgd) - von; if (vgon <= 0) { /* * cutoff region */ vdsat = 0; cdrain=0; here->MOS6gm=0; here->MOS6gds=0; here->MOS6gmbs=0; } else { if (sarg <= 0) { arg=0; } else { if ((here->MOS6mode==1?vbs:vbd) <= 0 ) { vonbm = model->MOS6gamma1 + model->MOS6gamma / (sarg + sarg); } else { vonbm = model->MOS6gamma1 + model->MOS6gamma / 2 / sqrt(here->MOS6tPhi); } } sarg = log(vgon); vdsat = model->MOS6kv * exp(sarg * model->MOS6nv); idsat = betac * exp(sarg * model->MOS6nc); lambda = model->MOS6lamda0 - model->MOS6lamda1 * vbsvbd; /* * saturation region */ cdrain = idsat * (1 + lambda * vdshere); here->MOS6gm = cdrain * model->MOS6nc / vgon; here->MOS6gds = here->MOS6gm * model->MOS6sigma + idsat * lambda; here->MOS6gmbs = here->MOS6gm * vonbm - idsat * model->MOS6lamda1 * vdshere; if (vdsat > vdshere){ /* * linear region */ vdst = vdshere / vdsat; vdst2 = (2 - vdst) * vdst; vdstg = - vdst * model->MOS6nv / vgon; ivdst1 = cdrain * (2 - vdst - vdst); cdrain = cdrain * vdst2; here->MOS6gm = here->MOS6gm * vdst2 + ivdst1 * vdstg; here->MOS6gds = here->MOS6gds * vdst2 + ivdst1 * (1 / vdsat + vdstg * model->MOS6sigma); here->MOS6gmbs = here->MOS6gmbs * vdst2 + ivdst1 * vdstg * vonbm; } } /* * finished */ } /* */ /* now deal with n vs p polarity */ here->MOS6von = model->MOS6type * von; here->MOS6vdsat = model->MOS6type * vdsat; /* line 490 */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->MOS6cd=here->MOS6mode * cdrain - here->MOS6cbd; if (ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG)) { /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS6vbs)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ { /* can't bypass the diode capacitance calculations */ if(here->MOS6Cbs != 0 || here->MOS6Cbssw != 0 ) { if (vbs < here->MOS6tDepCap){ arg=1-vbs/here->MOS6tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS6bulkJctBotGradingCoeff == model->MOS6bulkJctSideGradingCoeff) { if(model->MOS6bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS6bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS6bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS6bulkJctBotGradingCoeff* log(arg)); } if(model->MOS6bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS6bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS6qbs) = here->MOS6tBulkPot*(here->MOS6Cbs* (1-arg*sarg)/(1-model->MOS6bulkJctBotGradingCoeff) +here->MOS6Cbssw* (1-arg*sargsw)/ (1-model->MOS6bulkJctSideGradingCoeff)); here->MOS6capbs=here->MOS6Cbs*sarg+ here->MOS6Cbssw*sargsw; } else { *(ckt->CKTstate0 + here->MOS6qbs) = here->MOS6f4s + vbs*(here->MOS6f2s+vbs*(here->MOS6f3s/2)); here->MOS6capbs=here->MOS6f2s+here->MOS6f3s*vbs; } } else { *(ckt->CKTstate0 + here->MOS6qbs) = 0; here->MOS6capbs=0; } } #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS6vbd)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ /* can't bypass the diode capacitance calculations */ { if(here->MOS6Cbd != 0 || here->MOS6Cbdsw != 0 ) { if (vbd < here->MOS6tDepCap) { arg=1-vbd/here->MOS6tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS6bulkJctBotGradingCoeff == .5 && model->MOS6bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS6bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS6bulkJctBotGradingCoeff* log(arg)); } if(model->MOS6bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS6bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS6qbd) = here->MOS6tBulkPot*(here->MOS6Cbd* (1-arg*sarg) /(1-model->MOS6bulkJctBotGradingCoeff) +here->MOS6Cbdsw* (1-arg*sargsw) /(1-model->MOS6bulkJctSideGradingCoeff)); here->MOS6capbd=here->MOS6Cbd*sarg+ here->MOS6Cbdsw*sargsw; } else { *(ckt->CKTstate0 + here->MOS6qbd) = here->MOS6f4d + vbd * (here->MOS6f2d + vbd * here->MOS6f3d/2); here->MOS6capbd=here->MOS6f2d + vbd * here->MOS6f3d; } } else { *(ckt->CKTstate0 + here->MOS6qbd) = 0; here->MOS6capbd = 0; } } /* */ if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2; if ( ckt->CKTmode & MODETRAN ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ceq,here->MOS6capbd, here->MOS6qbd); if(error) return(error); here->MOS6gbd += geq; here->MOS6cbd += *(ckt->CKTstate0 + here->MOS6cqbd); here->MOS6cd -= *(ckt->CKTstate0 + here->MOS6cqbd); error = NIintegrate(ckt,&geq,&ceq,here->MOS6capbs, here->MOS6qbs); if(error) return(error); here->MOS6gbs += geq; here->MOS6cbs += *(ckt->CKTstate0 + here->MOS6cqbs); } } /* */ if(SenCond) goto next2; /* * check convergence */ if ( (here->MOS6off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* */ /* save things away for next time */ next2: *(ckt->CKTstate0 + here->MOS6vbs) = vbs; *(ckt->CKTstate0 + here->MOS6vbd) = vbd; *(ckt->CKTstate0 + here->MOS6vgs) = vgs; *(ckt->CKTstate0 + here->MOS6vds) = vds; /* */ /* * meyer's capacitor model */ if ( ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG) ) { /* * calculate meyer's capacitors */ /* * new cmeyer - this just evaluates at the current time, * expects you to remember values from previous time * returns 1/2 of non-constant portion of capacitance * you must add in the other half from previous time * and the constant part */ if (here->MOS6mode > 0){ DEVqmeyer (vgs,vgd,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS6capgs), (ckt->CKTstate0 + here->MOS6capgd), (ckt->CKTstate0 + here->MOS6capgb), here->MOS6tPhi,OxideCap); } else { DEVqmeyer (vgd,vgs,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS6capgd), (ckt->CKTstate0 + here->MOS6capgs), (ckt->CKTstate0 + here->MOS6capgb), here->MOS6tPhi,OxideCap); } vgs1 = *(ckt->CKTstate1 + here->MOS6vgs); vgd1 = vgs1 - *(ckt->CKTstate1 + here->MOS6vds); vgb1 = vgs1 - *(ckt->CKTstate1 + here->MOS6vbs); if(ckt->CKTmode & (MODETRANOP|MODEINITSMSIG)) { capgs = 2 * *(ckt->CKTstate0+here->MOS6capgs)+ GateSourceOverlapCap ; capgd = 2 * *(ckt->CKTstate0+here->MOS6capgd)+ GateDrainOverlapCap ; capgb = 2 * *(ckt->CKTstate0+here->MOS6capgb)+ GateBulkOverlapCap ; } else { capgs = ( *(ckt->CKTstate0+here->MOS6capgs)+ *(ckt->CKTstate1+here->MOS6capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS6capgd)+ *(ckt->CKTstate1+here->MOS6capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS6capgb)+ *(ckt->CKTstate1+here->MOS6capgb) + GateBulkOverlapCap ); } if(ckt->CKTsenInfo){ here->MOS6cgs = capgs; here->MOS6cgd = capgd; here->MOS6cgb = capgb; } /* */ /* * store small-signal parameters (for meyer's model) * all parameters already stored, so done... */ if(SenCond){ if((ckt->CKTsenInfo->SENmode == DCSEN)|| (ckt->CKTsenInfo->SENmode == ACSEN)){ continue; } } #ifndef PREDICTOR if (ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { *(ckt->CKTstate0 + here->MOS6qgs) = (1+xfact) * *(ckt->CKTstate1 + here->MOS6qgs) - xfact * *(ckt->CKTstate2 + here->MOS6qgs); *(ckt->CKTstate0 + here->MOS6qgd) = (1+xfact) * *(ckt->CKTstate1 + here->MOS6qgd) - xfact * *(ckt->CKTstate2 + here->MOS6qgd); *(ckt->CKTstate0 + here->MOS6qgb) = (1+xfact) * *(ckt->CKTstate1 + here->MOS6qgb) - xfact * *(ckt->CKTstate2 + here->MOS6qgb); } else { #endif /*PREDICTOR*/ if(ckt->CKTmode & MODETRAN) { *(ckt->CKTstate0 + here->MOS6qgs) = (vgs-vgs1)*capgs + *(ckt->CKTstate1 + here->MOS6qgs) ; *(ckt->CKTstate0 + here->MOS6qgd) = (vgd-vgd1)*capgd + *(ckt->CKTstate1 + here->MOS6qgd) ; *(ckt->CKTstate0 + here->MOS6qgb) = (vgb-vgb1)*capgb + *(ckt->CKTstate1 + here->MOS6qgb) ; } else { /* TRANOP only */ *(ckt->CKTstate0 + here->MOS6qgs) = vgs*capgs; *(ckt->CKTstate0 + here->MOS6qgd) = vgd*capgd; *(ckt->CKTstate0 + here->MOS6qgb) = vgb*capgb; } #ifndef PREDICTOR } #endif /*PREDICTOR*/ } #ifndef NOBYPASS bypass: #endif if(SenCond) continue; if ( (ckt->CKTmode & (MODEINITTRAN)) || (! (ckt->CKTmode & (MODETRAN)) ) ) { /* * initialize to zero charge conductances * and current */ gcgs=0; ceqgs=0; gcgd=0; ceqgd=0; gcgb=0; ceqgb=0; } else { if(capgs == 0) *(ckt->CKTstate0 + here->MOS6cqgs) =0; if(capgd == 0) *(ckt->CKTstate0 + here->MOS6cqgd) =0; if(capgb == 0) *(ckt->CKTstate0 + here->MOS6cqgb) =0; /* * calculate equivalent conductances and currents for * meyer"s capacitors */ error = NIintegrate(ckt,&gcgs,&ceqgs,capgs,here->MOS6qgs); if(error) return(error); error = NIintegrate(ckt,&gcgd,&ceqgd,capgd,here->MOS6qgd); if(error) return(error); error = NIintegrate(ckt,&gcgb,&ceqgb,capgb,here->MOS6qgb); if(error) return(error); ceqgs=ceqgs-gcgs*vgs+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS6qgs); ceqgd=ceqgd-gcgd*vgd+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS6qgd); ceqgb=ceqgb-gcgb*vgb+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS6qgb); } /* * store charge storage info for meyer's cap in lx table */ /* * load current vector */ m = here->MOS6m; ceqbs = model->MOS6type * (here->MOS6cbs-(here->MOS6gbs)*vbs); ceqbd = model->MOS6type * (here->MOS6cbd-(here->MOS6gbd)*vbd); if (here->MOS6mode >= 0) { xnrm=1; xrev=0; cdreq=model->MOS6type*(cdrain-here->MOS6gds*vds- here->MOS6gm*vgs-here->MOS6gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->MOS6type)*(cdrain-here->MOS6gds*(-vds)- here->MOS6gm*vgd-here->MOS6gmbs*vbd); } *(ckt->CKTrhs + here->MOS6gNode) -= m * (model->MOS6type * (ceqgs + ceqgb + ceqgd)); *(ckt->CKTrhs + here->MOS6bNode) -= m * (ceqbs + ceqbd - model->MOS6type * ceqgb); *(ckt->CKTrhs + here->MOS6dNodePrime) += m * (ceqbd - cdreq + model->MOS6type * ceqgd); *(ckt->CKTrhs + here->MOS6sNodePrime) += m * (cdreq + ceqbs + model->MOS6type * ceqgs); /* * load y matrix */ *(here->MOS6DdPtr) += m * (here->MOS6drainConductance); *(here->MOS6GgPtr) += m * ((gcgd+gcgs+gcgb)); *(here->MOS6SsPtr) += m * (here->MOS6sourceConductance); *(here->MOS6BbPtr) += m * (here->MOS6gbd+here->MOS6gbs+gcgb); *(here->MOS6DPdpPtr) += m * (here->MOS6drainConductance+here->MOS6gds+ here->MOS6gbd+xrev*(here->MOS6gm+here->MOS6gmbs)+gcgd); *(here->MOS6SPspPtr) += m * (here->MOS6sourceConductance+here->MOS6gds+ here->MOS6gbs+xnrm*(here->MOS6gm+here->MOS6gmbs)+gcgs); *(here->MOS6DdpPtr) += m * (-here->MOS6drainConductance); *(here->MOS6GbPtr) -= m * gcgb; *(here->MOS6GdpPtr) -= m * gcgd; *(here->MOS6GspPtr) -= m * gcgs; *(here->MOS6SspPtr) += m * (-here->MOS6sourceConductance); *(here->MOS6BgPtr) -= m * gcgb; *(here->MOS6BdpPtr) -= m * (here->MOS6gbd); *(here->MOS6BspPtr) -= m * (here->MOS6gbs); *(here->MOS6DPdPtr) += m * (-here->MOS6drainConductance); *(here->MOS6DPgPtr) += m * ((xnrm-xrev)*here->MOS6gm-gcgd); *(here->MOS6DPbPtr) += m * (-here->MOS6gbd+(xnrm-xrev)*here->MOS6gmbs); *(here->MOS6DPspPtr) += m * (-here->MOS6gds-xnrm* (here->MOS6gm+here->MOS6gmbs)); *(here->MOS6SPgPtr) += m * (-(xnrm-xrev)*here->MOS6gm-gcgs); *(here->MOS6SPsPtr) += m * (-here->MOS6sourceConductance); *(here->MOS6SPbPtr) += m * (-here->MOS6gbs-(xnrm-xrev)*here->MOS6gmbs); *(here->MOS6SPdpPtr) += m * (-here->MOS6gds-xrev* (here->MOS6gm+here->MOS6gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/mos6/mos6init.c0000644000265600020320000000437312264261473021043 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mos6itf.h" #include "mos6ext.h" #include "mos6init.h" SPICEdev MOS6info = { { "Mos6", "Level 6 MOSfet model with Meyer capacitance model", &MOS6nSize, &MOS6nSize, MOS6names, &MOS6pTSize, MOS6pTable, &MOS6mPTSize, MOS6mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MOS6param, /* DEVmodParam */ MOS6mParam, /* DEVload */ MOS6load, /* DEVsetup */ MOS6setup, /* DEVunsetup */ MOS6unsetup, /* DEVpzSetup */ NULL, /* PZsetup routine */ /* DEVtemperature*/ MOS6temp, /* DEVtrunc */ MOS6trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NULL, /* MOS6acLoad, XXX */ /* DEVaccept */ NULL, /* DEVdestroy */ MOS6destroy, /* DEVmodDelete */ NULL, /* DEVdelete */ NULL, /* DEVsetic */ MOS6getic, /* DEVask */ MOS6ask, /* DEVmodAsk */ MOS6mAsk, /* DEVpzLoad */ NULL, /*MOS6pzLoad, XXX */ /* DEVconvTest */ MOS6convTest, /* DEVsenSetup */ NULL /* MOS6sSetup */, /* DEVsenLoad */ NULL /* MOS6sLoad */, /* DEVsenUpdate */ NULL /* MOS6sUpdate */, /* DEVsenAcLoad */ NULL /* MOS6sAcLoad */, /* DEVsenPrint */ NULL /* MOS6sPrint */, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* Distortion routine */ /* DEVnoise */ NULL, /* Noise routine */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MOS6iSize, /* DEVmodSize */ &MOS6mSize }; SPICEdev * get_mos6_info(void) { return &MOS6info; } ngspice-26/src/spicelib/devices/mos6/mos6ask.c0000644000265600020320000004403312264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS6ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MOS6instance *here = (MOS6instance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case MOS6_TEMP: value->rValue = here->MOS6temp - CONSTCtoK; return(OK); case MOS6_DTEMP: value->rValue = here->MOS6dtemp; return(OK); case MOS6_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS6capgs); value->rValue *= here->MOS6m; return(OK); case MOS6_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS6capgd); value->rValue *= here->MOS6m; return(OK); case MOS6_L: value->rValue = here->MOS6l; return(OK); case MOS6_W: value->rValue = here->MOS6w; value->rValue *= here->MOS6m; return(OK); case MOS6_M: value->rValue = here->MOS6m; return(OK); case MOS6_AS: value->rValue = here->MOS6sourceArea; value->rValue *= here->MOS6m; return(OK); case MOS6_AD: value->rValue = here->MOS6drainArea; value->rValue *= here->MOS6m; return(OK); case MOS6_PS: value->rValue = here->MOS6sourcePerimiter; value->rValue *= here->MOS6m; return(OK); case MOS6_PD: value->rValue = here->MOS6drainPerimiter; value->rValue *= here->MOS6m; return(OK); case MOS6_NRS: value->rValue = here->MOS6sourceSquares; value->rValue *= here->MOS6m; return(OK); case MOS6_NRD: value->rValue = here->MOS6drainSquares; value->rValue *= here->MOS6m; return(OK); case MOS6_OFF: value->rValue = here->MOS6off; return(OK); case MOS6_IC_VBS: value->rValue = here->MOS6icVBS; return(OK); case MOS6_IC_VDS: value->rValue = here->MOS6icVDS; return(OK); case MOS6_IC_VGS: value->rValue = here->MOS6icVGS; return(OK); case MOS6_DNODE: value->iValue = here->MOS6dNode; return(OK); case MOS6_GNODE: value->iValue = here->MOS6gNode; return(OK); case MOS6_SNODE: value->iValue = here->MOS6sNode; return(OK); case MOS6_BNODE: value->iValue = here->MOS6bNode; return(OK); case MOS6_DNODEPRIME: value->iValue = here->MOS6dNodePrime; return(OK); case MOS6_SNODEPRIME: value->iValue = here->MOS6sNodePrime; return(OK); case MOS6_SOURCECONDUCT: value->rValue = here->MOS6sourceConductance; value->rValue *= here->MOS6m; return(OK); case MOS6_DRAINCONDUCT: value->rValue = here->MOS6drainConductance; value->rValue *= here->MOS6m; return(OK); case MOS6_SOURCERESIST: if (here->MOS6sNodePrime != here->MOS6sNode) value->rValue = 1.0 / here->MOS6sourceConductance; else value->rValue = 0.0; value->rValue /= here->MOS6m; return(OK); case MOS6_DRAINRESIST: if (here->MOS6dNodePrime != here->MOS6dNode) value->rValue = 1.0 / here->MOS6drainConductance; else value->rValue = 0.0; value->rValue /= here->MOS6m; return(OK); case MOS6_VON: value->rValue = here->MOS6von; return(OK); case MOS6_VDSAT: value->rValue = here->MOS6vdsat; return(OK); case MOS6_SOURCEVCRIT: value->rValue = here->MOS6sourceVcrit; return(OK); case MOS6_DRAINVCRIT: value->rValue = here->MOS6drainVcrit; return(OK); case MOS6_CD: value->rValue = here->MOS6cd; value->rValue *= here->MOS6m; return(OK); case MOS6_CBS: value->rValue = here->MOS6cbs; value->rValue *= here->MOS6m; return(OK); case MOS6_CBD: value->rValue = here->MOS6cbd; value->rValue *= here->MOS6m; return(OK); case MOS6_GMBS: value->rValue = here->MOS6gmbs; value->rValue *= here->MOS6m; return(OK); case MOS6_GM: value->rValue = here->MOS6gm; value->rValue *= here->MOS6m; return(OK); case MOS6_GDS: value->rValue = here->MOS6gds; value->rValue *= here->MOS6m; return(OK); case MOS6_GBD: value->rValue = here->MOS6gbd; value->rValue *= here->MOS6m; return(OK); case MOS6_GBS: value->rValue = here->MOS6gbs; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPBD: value->rValue = here->MOS6capbd; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPBS: value->rValue = here->MOS6capbs; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPZEROBIASBD: value->rValue = here->MOS6Cbd; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPZEROBIASBDSW: value->rValue = here->MOS6Cbdsw; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPZEROBIASBS: value->rValue = here->MOS6Cbs; value->rValue *= here->MOS6m; return(OK); case MOS6_CAPZEROBIASBSSW: value->rValue = here->MOS6Cbssw; value->rValue *= here->MOS6m; return(OK); case MOS6_VBD: value->rValue = *(ckt->CKTstate0 + here->MOS6vbd); return(OK); case MOS6_VBS: value->rValue = *(ckt->CKTstate0 + here->MOS6vbs); return(OK); case MOS6_VGS: value->rValue = *(ckt->CKTstate0 + here->MOS6vgs); return(OK); case MOS6_VDS: value->rValue = *(ckt->CKTstate0 + here->MOS6vds); return(OK); case MOS6_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS6capgs); /* add overlap capacitance */ value->rValue += (here->sMOS6modPtr->MOS6gateSourceOverlapCapFactor) * (here->MOS6w); value->rValue *= here->MOS6m; return(OK); case MOS6_QGS: value->rValue = *(ckt->CKTstate0 + here->MOS6qgs); value->rValue *= here->MOS6m; return(OK); case MOS6_CQGS: value->rValue = *(ckt->CKTstate0 + here->MOS6cqgs); value->rValue *= here->MOS6m; return(OK); case MOS6_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS6capgd); /* add overlap capacitance */ value->rValue += (here->sMOS6modPtr->MOS6gateSourceOverlapCapFactor) * (here->MOS6w); value->rValue *= here->MOS6m; return(OK); case MOS6_QGD: value->rValue = *(ckt->CKTstate0 + here->MOS6qgd); value->rValue *= here->MOS6m; return(OK); case MOS6_CQGD: value->rValue = *(ckt->CKTstate0 + here->MOS6cqgd); value->rValue *= here->MOS6m; return(OK); case MOS6_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS6capgb); /* add overlap capacitance */ value->rValue += (here->sMOS6modPtr->MOS6gateBulkOverlapCapFactor) * (here->MOS6l -2*(here->sMOS6modPtr->MOS6latDiff)); value->rValue *= here->MOS6m; return(OK); case MOS6_QGB: value->rValue = *(ckt->CKTstate0 + here->MOS6qgb); value->rValue *= here->MOS6m; return(OK); case MOS6_CQGB: value->rValue = *(ckt->CKTstate0 + here->MOS6cqgb); value->rValue *= here->MOS6m; return(OK); case MOS6_QBD: value->rValue = *(ckt->CKTstate0 + here->MOS6qbd); value->rValue *= here->MOS6m; return(OK); case MOS6_CQBD: value->rValue = *(ckt->CKTstate0 + here->MOS6cqbd); value->rValue *= here->MOS6m; return(OK); case MOS6_QBS: value->rValue = *(ckt->CKTstate0 + here->MOS6qbs); value->rValue *= here->MOS6m; return(OK); case MOS6_CQBS: value->rValue = *(ckt->CKTstate0 + here->MOS6cqbs); value->rValue *= here->MOS6m; return(OK); case MOS6_L_SENS_DC: if(ckt->CKTsenInfo && here->MOS6sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS6senParmNo); } return(OK); case MOS6_L_SENS_REAL: if(ckt->CKTsenInfo && here->MOS6sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo); } return(OK); case MOS6_L_SENS_IMAG: if(ckt->CKTsenInfo && here->MOS6sens_l){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo); } return(OK); case MOS6_L_SENS_MAG: if(ckt->CKTsenInfo && here->MOS6sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS6_L_SENS_PH: if(ckt->CKTsenInfo && here->MOS6sens_l){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS6_L_SENS_CPLX: if(ckt->CKTsenInfo && here->MOS6sens_l){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo); } return(OK); case MOS6_W_SENS_DC: if(ckt->CKTsenInfo && here->MOS6sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); } return(OK); case MOS6_W_SENS_REAL: if(ckt->CKTsenInfo && here->MOS6sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); } return(OK); case MOS6_W_SENS_IMAG: if(ckt->CKTsenInfo && here->MOS6sens_w){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); } return(OK); case MOS6_W_SENS_MAG: if(ckt->CKTsenInfo && here->MOS6sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS6_W_SENS_PH: if(ckt->CKTsenInfo && here->MOS6sens_w){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS6_W_SENS_CPLX: if(ckt->CKTsenInfo && here->MOS6sens_w){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS6senParmNo + here->MOS6sens_l); } return(OK); case MOS6_CB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS6ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->MOS6cbd + here->MOS6cbs - *(ckt->CKTstate0 + here->MOS6cqgb); } value->rValue *= here->MOS6m; return(OK); case MOS6_CG : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS6ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->MOS6cqgb) + *(ckt->CKTstate0 + here->MOS6cqgd) + *(ckt->CKTstate0 + here->MOS6cqgs); } value->rValue *= here->MOS6m; return(OK); case MOS6_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS6ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->MOS6cd; value->rValue -= here->MOS6cbd + here->MOS6cbs - *(ckt->CKTstate0 + here->MOS6cqgb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->MOS6cqgb) + *(ckt->CKTstate0 + here->MOS6cqgd) + *(ckt->CKTstate0 + here->MOS6cqgs); } } value->rValue *= here->MOS6m; return(OK); case MOS6_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS6ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->MOS6cd * *(ckt->CKTrhsOld + here->MOS6dNode); value->rValue += (here->MOS6cbd + here->MOS6cbs - *(ckt->CKTstate0 + here->MOS6cqgb)) * *(ckt->CKTrhsOld + here->MOS6bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->MOS6cqgb) + *(ckt->CKTstate0 + here->MOS6cqgd) + *(ckt->CKTstate0 + here->MOS6cqgs)) * *(ckt->CKTrhsOld + here->MOS6gNode); } temp = -here->MOS6cd; temp -= here->MOS6cbd + here->MOS6cbs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->MOS6cqgb) + *(ckt->CKTstate0 + here->MOS6cqgd) + *(ckt->CKTstate0 + here->MOS6cqgs); } value->rValue += temp * *(ckt->CKTrhsOld + here->MOS6sNode); } value->rValue *= here->MOS6m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos6/mos6ext.h0000644000265600020320000000167312264261473020705 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int MOS6acLoad(GENmodel *,CKTcircuit*); extern int MOS6ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MOS6delete(GENmodel*,IFuid,GENinstance**); extern void MOS6destroy(GENmodel**); extern int MOS6getic(GENmodel*,CKTcircuit*); extern int MOS6load(GENmodel*,CKTcircuit*); extern int MOS6mAsk(CKTcircuit *,GENmodel *,int,IFvalue*); extern int MOS6mDelete(GENmodel**,IFuid,GENmodel*); extern int MOS6mParam(int,IFvalue*,GENmodel*); extern int MOS6param(int,IFvalue*,GENinstance*,IFvalue*); extern int MOS6pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MOS6setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MOS6unsetup(GENmodel*,CKTcircuit*); extern int MOS6temp(GENmodel*,CKTcircuit*); extern int MOS6trunc(GENmodel*,CKTcircuit*,double*); extern int MOS6convTest(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mos6/mos6ic.c0000644000265600020320000000245212264261473020467 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6getic(GENmodel *inModel, CKTcircuit *ckt) { MOS6model *model = (MOS6model *)inModel; MOS6instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MOS6nextModel) { for(here = model->MOS6instances; here ; here = here->MOS6nextInstance) { if(!here->MOS6icVBSGiven) { here->MOS6icVBS = *(ckt->CKTrhs + here->MOS6bNode) - *(ckt->CKTrhs + here->MOS6sNode); } if(!here->MOS6icVDSGiven) { here->MOS6icVDS = *(ckt->CKTrhs + here->MOS6dNode) - *(ckt->CKTrhs + here->MOS6sNode); } if(!here->MOS6icVGSGiven) { here->MOS6icVGS = *(ckt->CKTrhs + here->MOS6gNode) - *(ckt->CKTrhs + here->MOS6sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mos6/mos6par.c0000644000265600020320000000656612264261473020670 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MOS6param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { MOS6instance *here = (MOS6instance *)inst; NG_IGNORE(select); switch(param) { case MOS6_TEMP: here->MOS6temp = value->rValue+CONSTCtoK; here->MOS6tempGiven = TRUE; break; case MOS6_DTEMP: here->MOS6dtemp = value->rValue; here->MOS6dtempGiven = TRUE; break; case MOS6_W: here->MOS6w = value->rValue; here->MOS6wGiven = TRUE; break; case MOS6_L: here->MOS6l = value->rValue; here->MOS6lGiven = TRUE; break; case MOS6_M: here->MOS6m = value->rValue; here->MOS6mGiven = TRUE; break; case MOS6_AS: here->MOS6sourceArea = value->rValue; here->MOS6sourceAreaGiven = TRUE; break; case MOS6_AD: here->MOS6drainArea = value->rValue; here->MOS6drainAreaGiven = TRUE; break; case MOS6_PS: here->MOS6sourcePerimiter = value->rValue; here->MOS6sourcePerimiterGiven = TRUE; break; case MOS6_PD: here->MOS6drainPerimiter = value->rValue; here->MOS6drainPerimiterGiven = TRUE; break; case MOS6_NRS: here->MOS6sourceSquares = value->rValue; here->MOS6sourceSquaresGiven = TRUE; break; case MOS6_NRD: here->MOS6drainSquares = value->rValue; here->MOS6drainSquaresGiven = TRUE; break; case MOS6_OFF: here->MOS6off = (value->iValue != 0); break; case MOS6_IC_VBS: here->MOS6icVBS = value->rValue; here->MOS6icVBSGiven = TRUE; break; case MOS6_IC_VDS: here->MOS6icVDS = value->rValue; here->MOS6icVDSGiven = TRUE; break; case MOS6_IC_VGS: here->MOS6icVGS = value->rValue; here->MOS6icVGSGiven = TRUE; break; case MOS6_IC: switch(value->v.numValue){ case 3: here->MOS6icVBS = *(value->v.vec.rVec+2); here->MOS6icVBSGiven = TRUE; case 2: here->MOS6icVGS = *(value->v.vec.rVec+1); here->MOS6icVGSGiven = TRUE; case 1: here->MOS6icVDS = *(value->v.vec.rVec); here->MOS6icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MOS6_L_SENS: if(value->iValue) { here->MOS6senParmNo = 1; here->MOS6sens_l = 1; } break; case MOS6_W_SENS: if(value->iValue) { here->MOS6senParmNo = 1; here->MOS6sens_w = 1; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos6/ChangeLog0000644000265600020320000000026712264261473020677 0ustar andreasadmin1999-08-20 Paolo Nenzi * mos6itf.h: added patch to the interface code. The patch was downloaded from ftp://ftp.mpce.mq.edu.au/pub/elec/spice/patches ngspice-26/src/spicelib/devices/mos6/mos6set.c0000644000265600020320000002020312264261473020661 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai Modified: 2000 AlansFixes **********/ /* load the MOS6 device structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { MOS6model *model = (MOS6model *)inModel; MOS6instance *here; int error; CKTnode *tmp; /* loop through all the MOS6 device models */ for( ; model != NULL; model = model->MOS6nextModel ) { if(!model->MOS6typeGiven) { model->MOS6type = NMOS; } if(!model->MOS6latDiffGiven) { model->MOS6latDiff = 0; } if(!model->MOS6jctSatCurDensityGiven) { model->MOS6jctSatCurDensity = 0; } if(!model->MOS6jctSatCurGiven) { model->MOS6jctSatCur = 1e-14; } if(!model->MOS6kvGiven) { model->MOS6kv = 2; } if(!model->MOS6nvGiven) { model->MOS6nv = 0.5; } if(!model->MOS6kcGiven) { model->MOS6kc = 5e-5; } if(!model->MOS6ncGiven) { model->MOS6nc = 1; } if(!model->MOS6nvthGiven) { model->MOS6nvth = 0.5; } if(!model->MOS6psGiven) { model->MOS6ps = 0; } if(!model->MOS6gateSourceOverlapCapFactorGiven) { model->MOS6gateSourceOverlapCapFactor = 0; } if(!model->MOS6gateDrainOverlapCapFactorGiven) { model->MOS6gateDrainOverlapCapFactor = 0; } if(!model->MOS6gateBulkOverlapCapFactorGiven) { model->MOS6gateBulkOverlapCapFactor = 0; } if(!model->MOS6vt0Given) { model->MOS6vt0 = 0; } if(!model->MOS6bulkCapFactorGiven) { model->MOS6bulkCapFactor = 0; } if(!model->MOS6sideWallCapFactorGiven) { model->MOS6sideWallCapFactor = 0; } if(!model->MOS6bulkJctPotentialGiven) { model->MOS6bulkJctPotential = .8; } if(!model->MOS6bulkJctBotGradingCoeffGiven) { model->MOS6bulkJctBotGradingCoeff = .5; } if(!model->MOS6bulkJctSideGradingCoeffGiven) { model->MOS6bulkJctSideGradingCoeff = .5; } if(!model->MOS6fwdCapDepCoeffGiven) { model->MOS6fwdCapDepCoeff = .5; } if(!model->MOS6phiGiven) { model->MOS6phi = .6; } if(!model->MOS6lamda0Given) { model->MOS6lamda0 = 0; if(model->MOS6lambdaGiven) { model->MOS6lamda0 = model->MOS6lambda; } } if(!model->MOS6lamda1Given) { model->MOS6lamda1 = 0; } if(!model->MOS6sigmaGiven) { model->MOS6sigma = 0; } if(!model->MOS6gammaGiven) { model->MOS6gamma = 0; } if(!model->MOS6gamma1Given) { model->MOS6gamma1 = 0; } /* loop through all the instances of the model */ for (here = model->MOS6instances; here != NULL ; here=here->MOS6nextInstance) { CKTnode *tmpNode; IFuid tmpName; if(!here->MOS6drainPerimiterGiven) { here->MOS6drainPerimiter = 0; } if(!here->MOS6icVBSGiven) { here->MOS6icVBS = 0; } if(!here->MOS6icVDSGiven) { here->MOS6icVDS = 0; } if(!here->MOS6icVGSGiven) { here->MOS6icVGS = 0; } if(!here->MOS6sourcePerimiterGiven) { here->MOS6sourcePerimiter = 0; } if(!here->MOS6vdsatGiven) { here->MOS6vdsat = 0; } if(!here->MOS6vonGiven) { here->MOS6von = 0; } if(!here->MOS6mGiven) { here->MOS6m = 1; } /* allocate a chunk of the state vector */ here->MOS6states = *states; *states += MOS6numStates; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 10 * (ckt->CKTsenInfo->SENparms); } if((model->MOS6drainResistance != 0 || (model->MOS6sheetResistance != 0 && here->MOS6drainSquares != 0) )) { if (here->MOS6dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS6name,"drain"); if(error) return(error); here->MOS6dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS6dNodePrime = here->MOS6dNode; } if((model->MOS6sourceResistance != 0 || (model->MOS6sheetResistance != 0 && here->MOS6sourceSquares != 0) )) { if (here->MOS6sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS6name,"source"); if(error) return(error); here->MOS6sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS6sNodePrime = here->MOS6sNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MOS6DdPtr,MOS6dNode,MOS6dNode); TSTALLOC(MOS6GgPtr,MOS6gNode,MOS6gNode); TSTALLOC(MOS6SsPtr,MOS6sNode,MOS6sNode); TSTALLOC(MOS6BbPtr,MOS6bNode,MOS6bNode); TSTALLOC(MOS6DPdpPtr,MOS6dNodePrime,MOS6dNodePrime); TSTALLOC(MOS6SPspPtr,MOS6sNodePrime,MOS6sNodePrime); TSTALLOC(MOS6DdpPtr,MOS6dNode,MOS6dNodePrime); TSTALLOC(MOS6GbPtr,MOS6gNode,MOS6bNode); TSTALLOC(MOS6GdpPtr,MOS6gNode,MOS6dNodePrime); TSTALLOC(MOS6GspPtr,MOS6gNode,MOS6sNodePrime); TSTALLOC(MOS6SspPtr,MOS6sNode,MOS6sNodePrime); TSTALLOC(MOS6BdpPtr,MOS6bNode,MOS6dNodePrime); TSTALLOC(MOS6BspPtr,MOS6bNode,MOS6sNodePrime); TSTALLOC(MOS6DPspPtr,MOS6dNodePrime,MOS6sNodePrime); TSTALLOC(MOS6DPdPtr,MOS6dNodePrime,MOS6dNode); TSTALLOC(MOS6BgPtr,MOS6bNode,MOS6gNode); TSTALLOC(MOS6DPgPtr,MOS6dNodePrime,MOS6gNode); TSTALLOC(MOS6SPgPtr,MOS6sNodePrime,MOS6gNode); TSTALLOC(MOS6SPsPtr,MOS6sNodePrime,MOS6sNode); TSTALLOC(MOS6DPbPtr,MOS6dNodePrime,MOS6bNode); TSTALLOC(MOS6SPbPtr,MOS6sNodePrime,MOS6bNode); TSTALLOC(MOS6SPdpPtr,MOS6sNodePrime,MOS6dNodePrime); } } return(OK); } int MOS6unsetup(GENmodel *inModel, CKTcircuit *ckt) { MOS6model *model; MOS6instance *here; for (model = (MOS6model *)inModel; model != NULL; model = model->MOS6nextModel) { for (here = model->MOS6instances; here != NULL; here=here->MOS6nextInstance) { if (here->MOS6dNodePrime && here->MOS6dNodePrime != here->MOS6dNode) { CKTdltNNum(ckt, here->MOS6dNodePrime); here->MOS6dNodePrime= 0; } if (here->MOS6sNodePrime && here->MOS6sNodePrime != here->MOS6sNode) { CKTdltNNum(ckt, here->MOS6sNodePrime); here->MOS6sNodePrime= 0; } } } return OK; } ngspice-26/src/spicelib/devices/mos6/mos6mpar.c0000644000265600020320000001416012264261473021032 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6mParam(int param, IFvalue *value, GENmodel *inModel) { MOS6model *model = (MOS6model *)inModel; switch(param) { case MOS6_MOD_TNOM: model->MOS6tnom = value->rValue+CONSTCtoK; model->MOS6tnomGiven = TRUE; break; case MOS6_MOD_VTO: model->MOS6vt0 = value->rValue; model->MOS6vt0Given = TRUE; break; case MOS6_MOD_KV: model->MOS6kv = value->rValue; model->MOS6kvGiven = TRUE; break; case MOS6_MOD_NV: model->MOS6nv = value->rValue; model->MOS6nvGiven = TRUE; break; case MOS6_MOD_KC: model->MOS6kc = value->rValue; model->MOS6kcGiven = TRUE; break; case MOS6_MOD_NC: model->MOS6nc = value->rValue; model->MOS6ncGiven = TRUE; break; case MOS6_MOD_NVTH: model->MOS6nvth = value->rValue; model->MOS6nvthGiven = TRUE; break; case MOS6_MOD_PS: model->MOS6ps = value->rValue; model->MOS6psGiven = TRUE; break; case MOS6_MOD_GAMMA: model->MOS6gamma = value->rValue; model->MOS6gammaGiven = TRUE; break; case MOS6_MOD_GAMMA1: model->MOS6gamma1 = value->rValue; model->MOS6gamma1Given = TRUE; break; case MOS6_MOD_SIGMA: model->MOS6sigma = value->rValue; model->MOS6sigmaGiven = TRUE; break; case MOS6_MOD_PHI: model->MOS6phi = value->rValue; model->MOS6phiGiven = TRUE; break; case MOS6_MOD_LAMBDA: model->MOS6lambda = value->rValue; model->MOS6lambdaGiven = TRUE; break; case MOS6_MOD_LAMDA0: model->MOS6lamda0 = value->rValue; model->MOS6lamda0Given = TRUE; break; case MOS6_MOD_LAMDA1: model->MOS6lamda1 = value->rValue; model->MOS6lamda1Given = TRUE; break; case MOS6_MOD_RD: model->MOS6drainResistance = value->rValue; model->MOS6drainResistanceGiven = TRUE; break; case MOS6_MOD_RS: model->MOS6sourceResistance = value->rValue; model->MOS6sourceResistanceGiven = TRUE; break; case MOS6_MOD_CBD: model->MOS6capBD = value->rValue; model->MOS6capBDGiven = TRUE; break; case MOS6_MOD_CBS: model->MOS6capBS = value->rValue; model->MOS6capBSGiven = TRUE; break; case MOS6_MOD_IS: model->MOS6jctSatCur = value->rValue; model->MOS6jctSatCurGiven = TRUE; break; case MOS6_MOD_PB: model->MOS6bulkJctPotential = value->rValue; model->MOS6bulkJctPotentialGiven = TRUE; break; case MOS6_MOD_CGSO: model->MOS6gateSourceOverlapCapFactor = value->rValue; model->MOS6gateSourceOverlapCapFactorGiven = TRUE; break; case MOS6_MOD_CGDO: model->MOS6gateDrainOverlapCapFactor = value->rValue; model->MOS6gateDrainOverlapCapFactorGiven = TRUE; break; case MOS6_MOD_CGBO: model->MOS6gateBulkOverlapCapFactor = value->rValue; model->MOS6gateBulkOverlapCapFactorGiven = TRUE; break; case MOS6_MOD_CJ: model->MOS6bulkCapFactor = value->rValue; model->MOS6bulkCapFactorGiven = TRUE; break; case MOS6_MOD_MJ: model->MOS6bulkJctBotGradingCoeff = value->rValue; model->MOS6bulkJctBotGradingCoeffGiven = TRUE; break; case MOS6_MOD_CJSW: model->MOS6sideWallCapFactor = value->rValue; model->MOS6sideWallCapFactorGiven = TRUE; break; case MOS6_MOD_MJSW: model->MOS6bulkJctSideGradingCoeff = value->rValue; model->MOS6bulkJctSideGradingCoeffGiven = TRUE; break; case MOS6_MOD_JS: model->MOS6jctSatCurDensity = value->rValue; model->MOS6jctSatCurDensityGiven = TRUE; break; case MOS6_MOD_TOX: model->MOS6oxideThickness = value->rValue; model->MOS6oxideThicknessGiven = TRUE; break; case MOS6_MOD_LD: model->MOS6latDiff = value->rValue; model->MOS6latDiffGiven = TRUE; break; case MOS6_MOD_RSH: model->MOS6sheetResistance = value->rValue; model->MOS6sheetResistanceGiven = TRUE; break; case MOS6_MOD_U0: model->MOS6surfaceMobility = value->rValue; model->MOS6surfaceMobilityGiven = TRUE; break; case MOS6_MOD_FC: model->MOS6fwdCapDepCoeff = value->rValue; model->MOS6fwdCapDepCoeffGiven = TRUE; break; case MOS6_MOD_NSS: model->MOS6surfaceStateDensity = value->rValue; model->MOS6surfaceStateDensityGiven = TRUE; break; case MOS6_MOD_NSUB: model->MOS6substrateDoping = value->rValue; model->MOS6substrateDopingGiven = TRUE; break; case MOS6_MOD_TPG: model->MOS6gateType = value->iValue; model->MOS6gateTypeGiven = TRUE; break; case MOS6_MOD_NMOS: if(value->iValue) { model->MOS6type = 1; model->MOS6typeGiven = TRUE; } break; case MOS6_MOD_PMOS: if(value->iValue) { model->MOS6type = -1; model->MOS6typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos6/Makefile.am0000644000265600020320000000071112264261473021153 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmos6.la libmos6_la_SOURCES = \ mos6.c \ mos6ask.c \ mos6conv.c \ mos6defs.h \ mos6dest.c \ mos6ext.h \ mos6ic.c \ mos6init.c \ mos6init.h \ mos6itf.h \ mos6load.c \ mos6mask.c \ mos6mpar.c \ mos6par.c \ mos6set.c \ mos6temp.c \ mos6trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mos6/mos6.c0000644000265600020320000002326312264261473020156 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mos6defs.h" #include "ngspice/suffix.h" IFparm MOS6pTable[] = { /* parameters */ IOPU("l", MOS6_L, IF_REAL , "Length"), IOPU("w", MOS6_W, IF_REAL , "Width"), IOPU("m", MOS6_M, IF_REAL , "Parallel Multiplier"), IOPU("ad", MOS6_AD, IF_REAL , "Drain area"), IOPU("as", MOS6_AS, IF_REAL , "Source area"), IOPU("pd", MOS6_PD, IF_REAL , "Drain perimeter"), IOPU("ps", MOS6_PS, IF_REAL , "Source perimeter"), OP( "id", MOS6_CD, IF_REAL, "Drain current"), OPR( "cd", MOS6_CD, IF_REAL, "Drain current"), OP( "is", MOS6_CS, IF_REAL, "Source current"), OP( "ig", MOS6_CG, IF_REAL, "Gate current "), OP( "ib", MOS6_CB, IF_REAL, "Bulk current "), OP( "ibs", MOS6_CBS, IF_REAL, "B-S junction capacitance"), OP( "ibd", MOS6_CBD, IF_REAL, "B-D junction capacitance"), OP( "vgs", MOS6_VGS, IF_REAL, "Gate-Source voltage"), OP( "vds", MOS6_VDS, IF_REAL, "Drain-Source voltage"), OP( "vbs", MOS6_VBS, IF_REAL, "Bulk-Source voltage"), OPU( "vbd", MOS6_VBD, IF_REAL, "Bulk-Drain voltage"), IOPU("nrd", MOS6_NRD, IF_REAL , "Drain squares"), IOPU("nrs", MOS6_NRS, IF_REAL , "Source squares"), IP("off", MOS6_OFF, IF_FLAG , "Device initially off"), IOPAU("icvds", MOS6_IC_VDS, IF_REAL , "Initial D-S voltage"), IOPAU("icvgs", MOS6_IC_VGS, IF_REAL , "Initial G-S voltage"), IOPAU("icvbs", MOS6_IC_VBS, IF_REAL , "Initial B-S voltage"), IOPU("temp", MOS6_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", MOS6_DTEMP, IF_REAL, "Instance temperature difference"), IP( "ic", MOS6_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"), IP( "sens_l", MOS6_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"), IP( "sens_w", MOS6_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"), /* OP( "cgs", MOS6_CGS, IF_REAL , "Gate-Source capacitance"), OP( "cgd", MOS6_CGD, IF_REAL , "Gate-Drain capacitance"), */ OPU( "dnode", MOS6_DNODE, IF_INTEGER, "Number of the drain node "), OPU( "gnode", MOS6_GNODE, IF_INTEGER, "Number of the gate node "), OPU( "snode", MOS6_SNODE, IF_INTEGER, "Number of the source node "), OPU( "bnode", MOS6_BNODE, IF_INTEGER, "Number of the node "), OPU( "dnodeprime", MOS6_DNODEPRIME, IF_INTEGER, "Number of int. drain node"), OPU( "snodeprime", MOS6_SNODEPRIME, IF_INTEGER, "Number of int. source node "), OP( "rs", MOS6_SOURCERESIST, IF_REAL, "Source resistance"), OPU("sourceconductance", MOS6_SOURCECONDUCT, IF_REAL, "Source conductance"), OP( "rd", MOS6_DRAINRESIST, IF_REAL, "Drain resistance"), OPU( "drainconductance", MOS6_DRAINCONDUCT, IF_REAL, "Drain conductance"), OP( "von", MOS6_VON, IF_REAL, "Turn-on voltage"), OP( "vdsat", MOS6_VDSAT, IF_REAL, "Saturation drain voltage"), OPU( "sourcevcrit", MOS6_SOURCEVCRIT,IF_REAL, "Critical source voltage"), OPU( "drainvcrit", MOS6_DRAINVCRIT, IF_REAL, "Critical drain voltage"), OP( "gmbs", MOS6_GMBS, IF_REAL, "Bulk-Source transconductance"), OP( "gm", MOS6_GM, IF_REAL, "Transconductance"), OP( "gds", MOS6_GDS, IF_REAL, "Drain-Source conductance"), OP( "gbd", MOS6_GBD, IF_REAL, "Bulk-Drain conductance"), OP( "gbs", MOS6_GBS, IF_REAL, "Bulk-Source conductance"), OP( "cgs", MOS6_CAPGS, IF_REAL, "Gate-Source capacitance"), OP( "cgd", MOS6_CAPGD, IF_REAL, "Gate-Drain capacitance"), OP( "cgb", MOS6_CAPGB, IF_REAL, "Gate-Bulk capacitance"), OP( "cbd", MOS6_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP( "cbs", MOS6_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP( "cbd0", MOS6_CAPZEROBIASBD, IF_REAL, "Zero-Bias B-D junction capacitance"), OP( "cbdsw0", MOS6_CAPZEROBIASBDSW, IF_REAL, " "), OP( "cbs0", MOS6_CAPZEROBIASBS, IF_REAL, "Zero-Bias B-S junction capacitance"), OP( "cbssw0", MOS6_CAPZEROBIASBSSW, IF_REAL, " "), OPU( "cqgs",MOS6_CQGS,IF_REAL,"Capacitance due to gate-source charge storage"), OPU( "cqgd",MOS6_CQGD,IF_REAL,"Capacitance due to gate-drain charge storage"), OPU( "cqgb",MOS6_CQGB,IF_REAL,"Capacitance due to gate-bulk charge storage"), OPU( "cqbd",MOS6_CQBD,IF_REAL,"Capacitance due to bulk-drain charge storage"), OPU( "cqbs",MOS6_CQBS,IF_REAL,"Capacitance due to bulk-source charge storage"), OPU( "qgs", MOS6_QGS, IF_REAL, "Gate-Source charge storage"), OPU( "qgd", MOS6_QGD, IF_REAL, "Gate-Drain charge storage"), OPU( "qgb", MOS6_QGB, IF_REAL, "Gate-Bulk charge storage"), OPU( "qbd", MOS6_QBD, IF_REAL, "Bulk-Drain charge storage"), OPU( "qbs", MOS6_QBS, IF_REAL, "Bulk-Source charge storage"), OPU( "p", MOS6_POWER, IF_REAL, "Instaneous power"), OPU( "sens_l_dc", MOS6_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OPU( "sens_l_real", MOS6_L_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt length"), OPU( "sens_l_imag", MOS6_L_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt length"), OPU( "sens_l_mag", MOS6_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OPU( "sens_l_ph", MOS6_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OPU( "sens_l_cplx", MOS6_L_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt length"), OPU( "sens_w_dc", MOS6_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OPU( "sens_w_real", MOS6_W_SENS_REAL,IF_REAL, "real part of ac sensitivity wrt width"), OPU( "sens_w_imag", MOS6_W_SENS_IMAG,IF_REAL, "imag part of ac sensitivity wrt width"), OPU( "sens_w_mag", MOS6_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OPU( "sens_w_ph", MOS6_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OPU( "sens_w_cplx", MOS6_W_SENS_CPLX,IF_COMPLEX, "ac sensitivity wrt width") }; IFparm MOS6mPTable[] = { /* model parameters */ OP("type", MOS6_MOD_TYPE, IF_STRING ,"N-channel or P-channel MOS"), IOP("vto", MOS6_MOD_VTO, IF_REAL ,"Threshold voltage"), IOPR("vt0", MOS6_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("kv", MOS6_MOD_KV, IF_REAL ,"Saturation voltage factor"), IOP("nv", MOS6_MOD_NV, IF_REAL ,"Saturation voltage coeff."), IOP("kc", MOS6_MOD_KC, IF_REAL ,"Saturation current factor"), IOP("nc", MOS6_MOD_NC, IF_REAL ,"Saturation current coeff."), IOP("nvth", MOS6_MOD_NVTH, IF_REAL ,"Threshold voltage coeff."), IOP("ps", MOS6_MOD_PS, IF_REAL ,"Sat. current modification par."), IOP("gamma", MOS6_MOD_GAMMA, IF_REAL ,"Bulk threshold parameter"), IOP("gamma1",MOS6_MOD_GAMMA1,IF_REAL ,"Bulk threshold parameter 1"), IOP("sigma", MOS6_MOD_SIGMA, IF_REAL ,"Static feedback effect par."), IOP("phi", MOS6_MOD_PHI, IF_REAL ,"Surface potential"), IOP("lambda",MOS6_MOD_LAMBDA,IF_REAL ,"Channel length modulation param."), IOP("lambda0",MOS6_MOD_LAMDA0,IF_REAL ,"Channel length modulation param. 0"), IOP("lambda1",MOS6_MOD_LAMDA1,IF_REAL ,"Channel length modulation param. 1"), IOP("rd", MOS6_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", MOS6_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOPA("cbd", MOS6_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOPA("cbs", MOS6_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", MOS6_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("pb", MOS6_MOD_PB, IF_REAL ,"Bulk junction potential"), IOPA("cgso", MOS6_MOD_CGSO, IF_REAL ,"Gate-source overlap cap."), IOPA("cgdo", MOS6_MOD_CGDO, IF_REAL ,"Gate-drain overlap cap."), IOPA("cgbo", MOS6_MOD_CGBO, IF_REAL ,"Gate-bulk overlap cap."), IOP("rsh", MOS6_MOD_RSH, IF_REAL ,"Sheet resistance"), IOPA("cj", MOS6_MOD_CJ, IF_REAL ,"Bottom junction cap per area"), IOP("mj", MOS6_MOD_MJ, IF_REAL ,"Bottom grading coefficient"), IOPA("cjsw", MOS6_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mjsw", MOS6_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOP("js", MOS6_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("ld", MOS6_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("tox", MOS6_MOD_TOX, IF_REAL ,"Oxide thickness"), IOP("u0", MOS6_MOD_U0, IF_REAL ,"Surface mobility"), IOPR("uo", MOS6_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", MOS6_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IP("nmos", MOS6_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS6_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), IOP("tpg", MOS6_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nsub", MOS6_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("nss", MOS6_MOD_NSS, IF_REAL ,"Surface state density"), IOP("tnom", MOS6_MOD_TNOM, IF_REAL ,"Parameter measurement temperature") }; char *MOS6names[] = { "Drain", "Gate", "Source", "Bulk" }; int MOS6nSize = NUMELEMS(MOS6names); int MOS6pTSize = NUMELEMS(MOS6pTable); int MOS6mPTSize = NUMELEMS(MOS6mPTable); int MOS6iSize = sizeof(MOS6instance); int MOS6mSize = sizeof(MOS6model); ngspice-26/src/spicelib/devices/mos6/Makefile.in0000644000265600020320000004211312264261537021167 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mos6 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmos6_la_LIBADD = am_libmos6_la_OBJECTS = mos6.lo mos6ask.lo mos6conv.lo mos6dest.lo \ mos6ic.lo mos6init.lo mos6load.lo mos6mask.lo mos6mpar.lo \ mos6par.lo mos6set.lo mos6temp.lo mos6trun.lo libmos6_la_OBJECTS = $(am_libmos6_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmos6_la_SOURCES) DIST_SOURCES = $(libmos6_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmos6.la libmos6_la_SOURCES = \ mos6.c \ mos6ask.c \ mos6conv.c \ mos6defs.h \ mos6dest.c \ mos6ext.h \ mos6ic.c \ mos6init.c \ mos6init.h \ mos6itf.h \ mos6load.c \ mos6mask.c \ mos6mpar.c \ mos6par.c \ mos6set.c \ mos6temp.c \ mos6trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mos6/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mos6/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmos6.la: $(libmos6_la_OBJECTS) $(libmos6_la_DEPENDENCIES) $(EXTRA_libmos6_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmos6_la_OBJECTS) $(libmos6_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos6trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mos6/mos6dest.c0000644000265600020320000000154012264261473021030 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ /* */ #include "ngspice/ngspice.h" #include "mos6defs.h" #include "ngspice/suffix.h" void MOS6destroy(GENmodel **inModel) { MOS6model **model = (MOS6model**)inModel; MOS6instance *here; MOS6instance *prev = NULL; MOS6model *mod = *model; MOS6model *oldmod = NULL; for( ; mod ; mod = mod->MOS6nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MOS6instances ; here ; here = here->MOS6nextInstance) { if(prev){ if(prev->MOS6sens) FREE(prev->MOS6sens); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos6/mos6temp.c0000644000265600020320000003404412264261473021043 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos6defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6temp(GENmodel *inModel, CKTcircuit *ckt) { MOS6model *model = (MOS6model *)inModel; MOS6instance *here; double egfet,egfet1; double fact1,fact2; double kt,kt1; double arg1; double ratio,ratio4; double phio; double pbo; double gmanew,gmaold; double capfact; double pbfact1,pbfact; double vt,vtnom; double wkfngs; double wkfng; double fermig; double fermis; double vfb; /* loop through all the resistor models */ for( ; model != NULL; model = model->MOS6nextModel) { /* perform model defaulting */ if(!model->MOS6tnomGiven) { model->MOS6tnom = ckt->CKTnomTemp; } fact1 = model->MOS6tnom/REFTEMP; vtnom = model->MOS6tnom*CONSTKoverQ; kt1 = CONSTboltz * model->MOS6tnom; egfet1 = 1.16-(7.02e-4*model->MOS6tnom*model->MOS6tnom)/ (model->MOS6tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); /* now model parameter preprocessing */ if (model->MOS6phi <= 0.0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: Phi is not positive.", &model->MOS6modName); return(E_BADPARM); } if(!model->MOS6oxideThicknessGiven || model->MOS6oxideThickness == 0) { model->MOS6oxideCapFactor = 0; } else { model->MOS6oxideCapFactor = 3.9 * 8.854214871e-12/ model->MOS6oxideThickness; if(!model->MOS6kcGiven) { if(!model->MOS6surfaceMobilityGiven) { model->MOS6surfaceMobility=600; } model->MOS6kc = 0.5 * model->MOS6surfaceMobility * model->MOS6oxideCapFactor * 1e-4 /*(m**2/cm**2)*/; } if(model->MOS6substrateDopingGiven) { if(model->MOS6substrateDoping*1e6 /*(cm**3/m**3)*/ >1.45e16) { if(!model->MOS6phiGiven) { model->MOS6phi = 2*vtnom* log(model->MOS6substrateDoping* 1e6/*(cm**3/m**3)*//1.45e16); model->MOS6phi = MAX(.1,model->MOS6phi); } fermis = model->MOS6type * .5 * model->MOS6phi; wkfng = 3.2; if(!model->MOS6gateTypeGiven) model->MOS6gateType=1; if(model->MOS6gateType != 0) { fermig = model->MOS6type *model->MOS6gateType*.5*egfet1; wkfng = 3.25 + .5 * egfet1 - fermig; } wkfngs = wkfng - (3.25 + .5 * egfet1 +fermis); if(!model->MOS6gammaGiven) { model->MOS6gamma = sqrt(2 * 11.70 * 8.854214871e-12 * CHARGE * model->MOS6substrateDoping* 1e6/*(cm**3/m**3)*/)/ model->MOS6oxideCapFactor; } if(!model->MOS6gamma1Given) { model->MOS6gamma1 = 0.0; } if(!model->MOS6vt0Given) { if(!model->MOS6surfaceStateDensityGiven) model->MOS6surfaceStateDensity=0; vfb = wkfngs - model->MOS6surfaceStateDensity * 1e4 /*(cm**2/m**2)*/ * CHARGE/model->MOS6oxideCapFactor; model->MOS6vt0 = vfb + model->MOS6type * (model->MOS6gamma * sqrt(model->MOS6phi)+ model->MOS6phi); } } else { model->MOS6substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni",&model->MOS6modName); return(E_BADPARM); } } } /* loop through all instances of the model */ for(here = model->MOS6instances; here!= NULL; here = here->MOS6nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbdsw; /* zero voltage bulk-drain sidewall capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double czbssw; /* zero voltage bulk-source sidewall capacitance */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ double sargsw; /* (1-fc) ^^ (-mjsw) */ /* perform the parameter defaulting */ if(!here->MOS6dtempGiven) { here->MOS6dtemp = 0.0; } if(!here->MOS6tempGiven) { here->MOS6temp = ckt->CKTtemp + here->MOS6dtemp; } vt = here->MOS6temp * CONSTKoverQ; ratio = here->MOS6temp/model->MOS6tnom; fact2 = here->MOS6temp/REFTEMP; kt = here->MOS6temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->MOS6temp*here->MOS6temp)/ (here->MOS6temp+1108); arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->MOS6drainAreaGiven) { here->MOS6drainArea = ckt->CKTdefaultMosAD; } if(!here->MOS6lGiven) { here->MOS6l = ckt->CKTdefaultMosL; } if(!here->MOS6sourceAreaGiven) { here->MOS6sourceArea = ckt->CKTdefaultMosAS; } if(!here->MOS6wGiven) { here->MOS6w = ckt->CKTdefaultMosW; } if(here->MOS6l - 2 * model->MOS6latDiff <=0) { SPfrontEnd->IFerror (ERR_WARNING, "%s: effective channel length less than zero", &(model->MOS6modName)); } ratio4 = ratio * sqrt(ratio); here->MOS6tKv = model->MOS6kv; here->MOS6tKc = model->MOS6kc / ratio4; here->MOS6tSurfMob = model->MOS6surfaceMobility/ratio4; phio= (model->MOS6phi-pbfact1)/fact1; here->MOS6tPhi = fact2 * phio + pbfact; here->MOS6tVbi = model->MOS6vt0 - model->MOS6type * (model->MOS6gamma* sqrt(model->MOS6phi)) +.5*(egfet1-egfet) + model->MOS6type*.5* (here->MOS6tPhi-model->MOS6phi); here->MOS6tVto = here->MOS6tVbi + model->MOS6type * model->MOS6gamma * sqrt(here->MOS6tPhi); here->MOS6tSatCur = model->MOS6jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->MOS6tSatCurDens = model->MOS6jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); pbo = (model->MOS6bulkJctPotential - pbfact1)/fact1; gmaold = (model->MOS6bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->MOS6bulkJctBotGradingCoeff* (4e-4*(model->MOS6tnom-REFTEMP)-gmaold)); here->MOS6tCbd = model->MOS6capBD * capfact; here->MOS6tCbs = model->MOS6capBS * capfact; here->MOS6tCj = model->MOS6bulkCapFactor * capfact; capfact = 1/(1+model->MOS6bulkJctSideGradingCoeff* (4e-4*(model->MOS6tnom-REFTEMP)-gmaold)); here->MOS6tCjsw = model->MOS6sideWallCapFactor * capfact; here->MOS6tBulkPot = fact2 * pbo+pbfact; gmanew = (here->MOS6tBulkPot-pbo)/pbo; capfact = (1+model->MOS6bulkJctBotGradingCoeff* (4e-4*(here->MOS6temp-REFTEMP)-gmanew)); here->MOS6tCbd *= capfact; here->MOS6tCbs *= capfact; here->MOS6tCj *= capfact; capfact = (1+model->MOS6bulkJctSideGradingCoeff* (4e-4*(here->MOS6temp-REFTEMP)-gmanew)); here->MOS6tCjsw *= capfact; here->MOS6tDepCap = model->MOS6fwdCapDepCoeff * here->MOS6tBulkPot; if( (here->MOS6tSatCurDens == 0) || (here->MOS6drainArea == 0) || (here->MOS6sourceArea == 0) ) { here->MOS6sourceVcrit = here->MOS6drainVcrit = vt*log(vt/(CONSTroot2*here->MOS6tSatCur)); } else { here->MOS6drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS6tSatCurDens * here->MOS6drainArea)); here->MOS6sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS6tSatCurDens * here->MOS6sourceArea)); } if(model->MOS6capBDGiven) { czbd = here->MOS6tCbd; } else { if(model->MOS6bulkCapFactorGiven) { czbd=here->MOS6tCj*here->MOS6drainArea; } else { czbd=0; } } if(model->MOS6sideWallCapFactorGiven) { czbdsw= here->MOS6tCjsw * here->MOS6drainPerimiter; } else { czbdsw=0; } arg = 1-model->MOS6fwdCapDepCoeff; sarg = exp( (-model->MOS6bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS6bulkJctSideGradingCoeff) * log(arg) ); here->MOS6Cbd = czbd; here->MOS6Cbdsw = czbdsw; here->MOS6f2d = czbd*(1-model->MOS6fwdCapDepCoeff* (1+model->MOS6bulkJctBotGradingCoeff))* sarg/arg + czbdsw*(1-model->MOS6fwdCapDepCoeff* (1+model->MOS6bulkJctSideGradingCoeff))* sargsw/arg; here->MOS6f3d = czbd * model->MOS6bulkJctBotGradingCoeff * sarg/arg/ here->MOS6tBulkPot + czbdsw * model->MOS6bulkJctSideGradingCoeff * sargsw/arg / here->MOS6tBulkPot; here->MOS6f4d = czbd*here->MOS6tBulkPot*(1-arg*sarg)/ (1-model->MOS6bulkJctBotGradingCoeff) + czbdsw*here->MOS6tBulkPot*(1-arg*sargsw)/ (1-model->MOS6bulkJctSideGradingCoeff) -here->MOS6f3d/2* (here->MOS6tDepCap*here->MOS6tDepCap) -here->MOS6tDepCap * here->MOS6f2d; if(model->MOS6capBSGiven) { czbs=here->MOS6tCbs; } else { if(model->MOS6bulkCapFactorGiven) { czbs=here->MOS6tCj*here->MOS6sourceArea; } else { czbs=0; } } if(model->MOS6sideWallCapFactorGiven) { czbssw = here->MOS6tCjsw * here->MOS6sourcePerimiter; } else { czbssw=0; } arg = 1-model->MOS6fwdCapDepCoeff; sarg = exp( (-model->MOS6bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS6bulkJctSideGradingCoeff) * log(arg) ); here->MOS6Cbs = czbs; here->MOS6Cbssw = czbssw; here->MOS6f2s = czbs*(1-model->MOS6fwdCapDepCoeff* (1+model->MOS6bulkJctBotGradingCoeff))* sarg/arg + czbssw*(1-model->MOS6fwdCapDepCoeff* (1+model->MOS6bulkJctSideGradingCoeff))* sargsw/arg; here->MOS6f3s = czbs * model->MOS6bulkJctBotGradingCoeff * sarg/arg/ here->MOS6tBulkPot + czbssw * model->MOS6bulkJctSideGradingCoeff * sargsw/arg / here->MOS6tBulkPot; here->MOS6f4s = czbs*here->MOS6tBulkPot*(1-arg*sarg)/ (1-model->MOS6bulkJctBotGradingCoeff) + czbssw*here->MOS6tBulkPot*(1-arg*sargsw)/ (1-model->MOS6bulkJctSideGradingCoeff) -here->MOS6f3s/2* (here->MOS6tDepCap*here->MOS6tDepCap) -here->MOS6tDepCap * here->MOS6f2s; if(model->MOS6drainResistanceGiven) { if(model->MOS6drainResistance != 0) { here->MOS6drainConductance = 1/model->MOS6drainResistance; } else { here->MOS6drainConductance = 0; } } else if (model->MOS6sheetResistanceGiven) { if( (!here->MOS6drainSquaresGiven) || ( here->MOS6drainSquares==0) ){ here->MOS6drainSquares=1; } if(model->MOS6sheetResistance != 0) { here->MOS6drainConductance = 1/(model->MOS6sheetResistance*here->MOS6drainSquares); } else { here->MOS6drainConductance = 0; } } else { here->MOS6drainConductance = 0; } if(model->MOS6sourceResistanceGiven) { if(model->MOS6sourceResistance != 0) { here->MOS6sourceConductance = 1/model->MOS6sourceResistance; } else { here->MOS6sourceConductance = 0; } } else if (model->MOS6sheetResistanceGiven) { if( (!here->MOS6sourceSquaresGiven) || ( here->MOS6sourceSquares==0) ) { here->MOS6sourceSquares=1; } if(model->MOS6sheetResistance != 0) { here->MOS6sourceConductance = 1/(model->MOS6sheetResistance*here->MOS6sourceSquares); } else { here->MOS6sourceConductance = 0; } } else { here->MOS6sourceConductance = 0; } } } return(OK); } ngspice-26/src/spicelib/devices/mos6/mos6conv.c0000644000265600020320000000634612264261473021047 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Takayasu Sakurai **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos6defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS6convTest(GENmodel *inModel, CKTcircuit *ckt) { MOS6model *model = (MOS6model*)inModel; MOS6instance *here; double delvbs; double delvbd; double delvgs; double delvds; double delvgd; double cbhat; double cdhat; double vbs; double vbd; double vgs; double vds; double vgd; double vgdo; double tol; for( ; model != NULL; model = model->MOS6nextModel) { for(here = model->MOS6instances; here!= NULL; here = here->MOS6nextInstance) { vbs = model->MOS6type * ( *(ckt->CKTrhs+here->MOS6bNode) - *(ckt->CKTrhs+here->MOS6sNodePrime)); vgs = model->MOS6type * ( *(ckt->CKTrhs+here->MOS6gNode) - *(ckt->CKTrhs+here->MOS6sNodePrime)); vds = model->MOS6type * ( *(ckt->CKTrhs+here->MOS6dNodePrime) - *(ckt->CKTrhs+here->MOS6sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS6vgs) - *(ckt->CKTstate0 + here->MOS6vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS6vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS6vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS6vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS6vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS6mode >= 0) { cdhat= here->MOS6cd- here->MOS6gbd * delvbd + here->MOS6gmbs * delvbs + here->MOS6gm * delvgs + here->MOS6gds * delvds ; } else { cdhat= here->MOS6cd - ( here->MOS6gbd - here->MOS6gmbs) * delvbd - here->MOS6gm * delvgd + here->MOS6gds * delvds ; } cbhat= here->MOS6cbs + here->MOS6cbd + here->MOS6gbd * delvbd + here->MOS6gbs * delvbs ; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(here->MOS6cd))+ ckt->CKTabstol; if (fabs(cdhat-here->MOS6cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(cbhat),fabs(here->MOS6cbs+here->MOS6cbd))+ ckt->CKTabstol; if (fabs(cbhat-(here->MOS6cbs+here->MOS6cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged*/ } } } } return(OK); } ngspice-26/src/spicelib/devices/tra/0000755000265600020320000000000012264261711017015 5ustar andreasadminngspice-26/src/spicelib/devices/tra/tramdel.c0000644000265600020320000000175012264261473020621 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TRAmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { TRAmodel **model = (TRAmodel **)inModel; TRAmodel *modfast = (TRAmodel *)kill; TRAinstance *here; TRAinstance *prev = NULL; TRAmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->TRAnextModel)) { if( (*model)->TRAmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->TRAnextModel; /* cut deleted device out of list */ for(here = (*model)->TRAinstances ; here ; here = here->TRAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/tra/traload.c0000644000265600020320000001533612264261473020624 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int TRAload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; double t1,t2,t3; double f1,f2,f3; int i; /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { *(here->TRApos1Pos1Ptr) += here->TRAconduct; *(here->TRApos1Int1Ptr) -= here->TRAconduct; *(here->TRAneg1Ibr1Ptr) -= 1; *(here->TRApos2Pos2Ptr) += here->TRAconduct; *(here->TRAneg2Ibr2Ptr) -= 1; *(here->TRAint1Pos1Ptr) -= here->TRAconduct; *(here->TRAint1Int1Ptr) += here->TRAconduct; *(here->TRAint1Ibr1Ptr) += 1; *(here->TRAint2Int2Ptr) += here->TRAconduct; *(here->TRAint2Ibr2Ptr) += 1; *(here->TRAibr1Neg1Ptr) -= 1; *(here->TRAibr1Int1Ptr) += 1; *(here->TRAibr2Neg2Ptr) -= 1; *(here->TRAibr2Int2Ptr) += 1; *(here->TRApos2Int2Ptr) -= here->TRAconduct; *(here->TRAint2Pos2Ptr) -= here->TRAconduct; if(ckt->CKTmode & MODEDC) { *(here->TRAibr1Pos2Ptr) -= 1; *(here->TRAibr1Neg2Ptr) += 1; *(here->TRAibr1Ibr2Ptr) -= (1-ckt->CKTgmin)*here->TRAimped; *(here->TRAibr2Pos1Ptr) -= 1; *(here->TRAibr2Neg1Ptr) += 1; *(here->TRAibr2Ibr1Ptr) -= (1-ckt->CKTgmin)*here->TRAimped; } else { if (ckt->CKTmode & MODEINITTRAN) { if(ckt->CKTmode & MODEUIC) { here->TRAinput1 = here->TRAinitVolt2 + here->TRAinitCur2 * here->TRAimped; here->TRAinput2 = here->TRAinitVolt1 + here->TRAinitCur1 * here->TRAimped; } else { here->TRAinput1 = ( *(ckt->CKTrhsOld+here->TRAposNode2) - *(ckt->CKTrhsOld+here->TRAnegNode2) ) + ( *(ckt->CKTrhsOld+here->TRAbrEq2) *here->TRAimped); here->TRAinput2 = ( *(ckt->CKTrhsOld+here->TRAposNode1) - *(ckt->CKTrhsOld+here->TRAnegNode1) ) + ( *(ckt->CKTrhsOld+here->TRAbrEq1) *here->TRAimped); } *(here->TRAdelays ) = -2*here->TRAtd; *(here->TRAdelays+3) = -here->TRAtd; *(here->TRAdelays+6) = 0; *(here->TRAdelays+1) = *(here->TRAdelays +4) = *(here->TRAdelays+7) = here->TRAinput1; *(here->TRAdelays+2) = *(here->TRAdelays +5) = *(here->TRAdelays+8) = here->TRAinput2; here->TRAsizeDelay = 2; } else { if(ckt->CKTmode & MODEINITPRED) { for(i=2;(iTRAsizeDelay) && (*(here->TRAdelays +3*i) <= (ckt->CKTtime-here->TRAtd));i++) {;/*loop does it*/} t1 = *(here->TRAdelays + (3*(i-2))); t2 = *(here->TRAdelays + (3*(i-1))); t3 = *(here->TRAdelays + (3*(i ))); if( (t2-t1)==0 || (t3-t2) == 0) continue; f1 = (ckt->CKTtime - here->TRAtd - t2) * (ckt->CKTtime - here->TRAtd - t3) ; f2 = (ckt->CKTtime - here->TRAtd - t1) * (ckt->CKTtime - here->TRAtd - t3) ; f3 = (ckt->CKTtime - here->TRAtd - t1) * (ckt->CKTtime - here->TRAtd - t2) ; if((t2-t1)==0) { /* should never happen, but don't want * to divide by zero, EVER... */ f1=0; f2=0; } else { f1 /= (t1-t2); f2 /= (t2-t1); } if((t3-t2)==0) { /* should never happen, but don't want * to divide by zero, EVER... */ f2=0; f3=0; } else { f2 /= (t2-t3); f3 /= (t2-t3); } if((t3-t1)==0) { /* should never happen, but don't want * to divide by zero, EVER... */ f1=0; f2=0; } else { f1 /= (t1-t3); f3 /= (t1-t3); } /*printf("at time %g, using %g, %g, %g\n",ckt->CKTtime, t1,t2,t3); printf("values %g, %g, %g \n", *(here->TRAdelays + (3*(i-2))+1), *(here->TRAdelays + (3*(i-1))+1), *(here->TRAdelays + (3*(i ))+1) ); printf("and %g, %g, %g \n", *(here->TRAdelays + (3*(i-2))+2), *(here->TRAdelays + (3*(i-1))+2), *(here->TRAdelays + (3*(i ))+2) );*/ here->TRAinput1 = f1 * *(here->TRAdelays + (3*(i-2))+1) + f2 * *(here->TRAdelays + (3*(i-1))+1) + f3 * *(here->TRAdelays + (3*(i ))+1); here->TRAinput2 = f1 * *(here->TRAdelays + (3*(i-2))+2) + f2 * *(here->TRAdelays + (3*(i-1))+2) + f3 * *(here->TRAdelays + (3*(i ))+2); } } *(ckt->CKTrhs + here->TRAbrEq1) += here->TRAinput1; *(ckt->CKTrhs + here->TRAbrEq2) += here->TRAinput2; } } } return(OK); } ngspice-26/src/spicelib/devices/tra/tratemp.c0000644000265600020320000000176012264261473020646 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int TRAtemp(GENmodel *inModel, CKTcircuit *ckt) /* * pre-process parameters for later use */ { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; NG_IGNORE(ckt); /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { if(!here->TRAtdGiven) { here->TRAtd = here->TRAnl/here->TRAf; } here->TRAconduct = 1/here->TRAimped; } } return(OK); } ngspice-26/src/spicelib/devices/tra/tratrunc.c0000644000265600020320000000570612264261473021040 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TRAtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; double v1,v2,v3,v4; double v5,v6,d1,d2,d3,d4; double tmp; /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { v1 = ( *(ckt->CKTrhsOld + here->TRAposNode2) - *(ckt->CKTrhsOld + here->TRAnegNode2)) + *(ckt->CKTrhsOld + here->TRAbrEq2) * here->TRAimped; v2 = *(here->TRAdelays+1+3*(here->TRAsizeDelay)); v3 = *(here->TRAdelays+1+3*(here->TRAsizeDelay-1)); v4 = ( *(ckt->CKTrhsOld + here->TRAposNode1) - *(ckt->CKTrhsOld + here->TRAnegNode1)) + *(ckt->CKTrhsOld + here->TRAbrEq1) * here->TRAimped; v5 = *(here->TRAdelays+2+3*(here->TRAsizeDelay)); v6 = *(here->TRAdelays+2+3*(here->TRAsizeDelay-1)); d1 = (v1-v2)/ckt->CKTdeltaOld[1]; d2 = (v2-v3)/ckt->CKTdeltaOld[2]; d3 = (v4-v5)/ckt->CKTdeltaOld[1]; d4 = (v5-v6)/ckt->CKTdeltaOld[2]; /*printf("%s: at %g derivs are %g, %g and %g, %g\n", here->TRAname,ckt->CKTtime,d1,d2,d3,d4);*/ if( (fabs(d1-d2) >= here->TRAreltol*MAX(fabs(d1),fabs(d2))+ here->TRAabstol) || (fabs(d3-d4) >= here->TRAreltol*MAX(fabs(d3),fabs(d4))+ here->TRAabstol) ) { /* derivitive changing - need to schedule after delay */ /*printf("%s: at %g set for %g\n",here->TRAname, ckt->CKTtime, *(here->TRAdelays+3*here->TRAsizeDelay-3)+here->TRAtd );*/ /*printf("%g, %g, %g -> %g, %g \n",v1,v2,v3,d1,d2);*/ /*printf("%g, %g, %g -> %g, %g \n",v4,v5,v6,d3,d4);*/ /* also set for break after PREVIOUS point */ /*printf("setting break\n");*/ /* will need to set a breakpoint at *(here->TRAdelays+3*(here->TRAsizeDelay)) + here->TRAtd so we need to make sure we don't step past it */ /* the previous timepoint plus the delay */ tmp = *(here->TRAdelays+3*here->TRAsizeDelay) + here->TRAtd; /* minus current time */ tmp -= ckt->CKTtime; *timeStep = MIN(*timeStep,tmp); } } } return(OK); } ngspice-26/src/spicelib/devices/tra/traparam.c0000644000265600020320000000440712264261473021002 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "tradefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int TRAparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { TRAinstance *here = (TRAinstance *)inst; NG_IGNORE(select); switch(param) { case TRA_RELTOL: here->TRAreltol = value->rValue; here->TRAreltolGiven = TRUE; break; case TRA_ABSTOL: here->TRAabstol = value->rValue; here->TRAabstolGiven = TRUE; break; case TRA_Z0: here->TRAimped = value->rValue; here->TRAimpedGiven = TRUE; break; case TRA_TD: here->TRAtd = value->rValue; here->TRAtdGiven = TRUE; break; case TRA_NL: here->TRAnl= value->rValue; here->TRAnlGiven = TRUE; break; case TRA_FREQ: here->TRAf= value->rValue; here->TRAfGiven = TRUE; break; case TRA_V1: here->TRAinitVolt1 = value->rValue; here->TRAicV1Given = TRUE; break; case TRA_I1: here->TRAinitCur1 = value->rValue; here->TRAicC1Given = TRUE; break; case TRA_V2: here->TRAinitVolt2 = value->rValue; here->TRAicV2Given = TRUE; break; case TRA_I2: here->TRAinitCur2 = value->rValue; here->TRAicC2Given = TRUE; break; case TRA_IC: switch(value->v.numValue){ case 4: here->TRAinitCur2 = *(value->v.vec.rVec+3); case 3: here->TRAinitVolt2 = *(value->v.vec.rVec+2); case 2: here->TRAinitCur1 = *(value->v.vec.rVec+1); case 1: here->TRAinitVolt1 = *(value->v.vec.rVec); break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/tra/traitf.h0000644000265600020320000000025512264261473020466 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_TRA #define DEV_TRA SPICEdev *get_tra_info(void); #endif ngspice-26/src/spicelib/devices/tra/trasetup.c0000644000265600020320000001131012264261473021031 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int TRAsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* load the transmission line structure with those pointers needed later * for fast matrix loading */ { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; int error; CKTnode *tmp; NG_IGNORE(state); /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { if(here->TRAbrEq1==0) { error = CKTmkVolt(ckt,&tmp,here->TRAname,"i1"); if(error) return(error); here->TRAbrEq1 = tmp->number; } if(here->TRAbrEq2==0) { error = CKTmkVolt(ckt,&tmp,here->TRAname,"i2"); if(error) return(error); here->TRAbrEq2 = tmp->number; } if(here->TRAintNode1==0) { error = CKTmkVolt(ckt,&tmp,here->TRAname,"int1"); if(error) return(error); here->TRAintNode1 = tmp->number; } if(here->TRAintNode2==0) { error = CKTmkVolt(ckt,&tmp,here->TRAname,"int2"); if(error) return(error); here->TRAintNode2 = tmp->number; } /* allocate the delay table */ here->TRAdelays = TMALLOC(double, 15); here->TRAallocDelay = 4; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(TRAibr1Ibr2Ptr, TRAbrEq1, TRAbrEq2); TSTALLOC(TRAibr1Int1Ptr, TRAbrEq1, TRAintNode1); TSTALLOC(TRAibr1Neg1Ptr, TRAbrEq1, TRAnegNode1); TSTALLOC(TRAibr1Neg2Ptr, TRAbrEq1, TRAnegNode2); TSTALLOC(TRAibr1Pos2Ptr, TRAbrEq1, TRAposNode2); TSTALLOC(TRAibr2Ibr1Ptr, TRAbrEq2, TRAbrEq1); TSTALLOC(TRAibr2Int2Ptr, TRAbrEq2, TRAintNode2); TSTALLOC(TRAibr2Neg1Ptr, TRAbrEq2, TRAnegNode1); TSTALLOC(TRAibr2Neg2Ptr, TRAbrEq2, TRAnegNode2); TSTALLOC(TRAibr2Pos1Ptr, TRAbrEq2, TRAposNode1); TSTALLOC(TRAint1Ibr1Ptr, TRAintNode1, TRAbrEq1); TSTALLOC(TRAint1Int1Ptr, TRAintNode1, TRAintNode1); TSTALLOC(TRAint1Pos1Ptr, TRAintNode1, TRAposNode1); TSTALLOC(TRAint2Ibr2Ptr, TRAintNode2, TRAbrEq2); TSTALLOC(TRAint2Int2Ptr, TRAintNode2, TRAintNode2); TSTALLOC(TRAint2Pos2Ptr, TRAintNode2, TRAposNode2); TSTALLOC(TRAneg1Ibr1Ptr, TRAnegNode1, TRAbrEq1); TSTALLOC(TRAneg2Ibr2Ptr, TRAnegNode2, TRAbrEq2); TSTALLOC(TRApos1Int1Ptr, TRAposNode1, TRAintNode1); TSTALLOC(TRApos1Pos1Ptr, TRAposNode1, TRAposNode1); TSTALLOC(TRApos2Int2Ptr, TRAposNode2, TRAintNode2); TSTALLOC(TRApos2Pos2Ptr, TRAposNode2, TRAposNode2); if(!here->TRAnlGiven) { here->TRAnl = .25; } if(!here->TRAfGiven) { here->TRAf = 1e9; } if(!here->TRAreltolGiven) { here->TRAreltol = 1; } if(!here->TRAabstolGiven) { here->TRAabstol = 1; } if(!here->TRAimpedGiven) { SPfrontEnd->IFerror (ERR_FATAL, "%s: transmission line z0 must be given", &(here->TRAname)); return(E_BADPARM); } } } return(OK); } int TRAunsetup(GENmodel *inModel, CKTcircuit *ckt) { TRAmodel *model; TRAinstance *here; for (model = (TRAmodel *)inModel; model != NULL; model = model->TRAnextModel) { for (here = model->TRAinstances; here != NULL; here=here->TRAnextInstance) { if (here->TRAbrEq1) { CKTdltNNum(ckt, here->TRAbrEq1); here->TRAbrEq1= 0; } if (here->TRAbrEq2) { CKTdltNNum(ckt, here->TRAbrEq2); here->TRAbrEq2= 0; } if (here->TRAintNode1) { CKTdltNNum(ckt, here->TRAintNode1); here->TRAintNode1= 0; } if (here->TRAintNode2) { CKTdltNNum(ckt, here->TRAintNode2); here->TRAintNode2= 0; } } } return OK; } ngspice-26/src/spicelib/devices/tra/traacct.c0000644000265600020320000001310412264261473020606 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TRAaccept(CKTcircuit *ckt, GENmodel *inModel) { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; int i=0,j; double v1,v2,v3,v4; double v5,v6,d1,d2,d3,d4; double *from,*to; int error; /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { if( (ckt->CKTtime - here->TRAtd) > *(here->TRAdelays+6)) { /* shift! */ for(i=2;iTRAsizeDelay && (ckt->CKTtime - here->TRAtd > *(here->TRAdelays+3*i));i++) { /* loop does it all */ ; } i -= 2; for(j=i;j<=here->TRAsizeDelay;j++) { from = here->TRAdelays + 3*j; to = here->TRAdelays + 3*(j-i); *(to) = *(from); *(to+1) = *(from+1); *(to+2) = *(from+2); } here->TRAsizeDelay -= i; } if(ckt->CKTtime - *(here->TRAdelays+3*here->TRAsizeDelay) > ckt->CKTminBreak) { if(here->TRAallocDelay <= here->TRAsizeDelay) { /* need to grab some more space */ here->TRAallocDelay += 5; here->TRAdelays = TREALLOC(double, here->TRAdelays, (here->TRAallocDelay + 1) * 3); } here->TRAsizeDelay ++; to = (here->TRAdelays +3*here->TRAsizeDelay); *to = ckt->CKTtime; to = (here->TRAdelays+1+3*here->TRAsizeDelay); *to = ( *(ckt->CKTrhsOld + here->TRAposNode2) -*(ckt->CKTrhsOld + here->TRAnegNode2)) + *(ckt->CKTrhsOld + here->TRAbrEq2)* here->TRAimped; *(here->TRAdelays+2+3*here->TRAsizeDelay) = ( *(ckt->CKTrhsOld + here->TRAposNode1) -*(ckt->CKTrhsOld + here->TRAnegNode1)) + *(ckt->CKTrhsOld + here->TRAbrEq1)* here->TRAimped; #ifdef NOTDEF v1 = *(here->TRAdelays+1+3*here->TRAsizeDelay); v2 = *(here->TRAdelays+1+3*(here->TRAsizeDelay-1)); v3 = *(here->TRAdelays+2+3*here->TRAsizeDelay); v4 = *(here->TRAdelays+2+3*(here->TRAsizeDelay-1)); if( (fabs(v1-v2) >= 50*ckt->CKTreltol* MAX(fabs(v1),fabs(v2))+50*ckt->CKTvoltTol) || (fabs(v3-v4) >= 50*ckt->CKTreltol* MAX(fabs(v3),fabs(v4))+50*ckt->CKTvoltTol) ) { /* changing - need to schedule after delay */ /*printf("%s: at %g set for %g and %g\n",here->TRAname, ckt->CKTtime, ckt->CKTtime+here->TRAtd, *(here->TRAdelays+3*here->TRAsizeDelay-3)+ here->TRAtd);*/ error = CKTsetBreak(ckt,ckt->CKTtime+here->TRAtd); if(error) return(error); /* also set for break after PREVIOUS point */ error = CKTsetBreak(ckt, *(here->TRAdelays+3*here->TRAsizeDelay -3) + here->TRAtd); CKTbreakDump(ckt); if(error) return(error); } #else v1 = *(here->TRAdelays+1+3*here->TRAsizeDelay); v2 = *(here->TRAdelays+1+3*(here->TRAsizeDelay-1)); v3 = *(here->TRAdelays+1+3*(here->TRAsizeDelay-2)); v4 = *(here->TRAdelays+2+3*here->TRAsizeDelay); v5 = *(here->TRAdelays+2+3*(here->TRAsizeDelay-1)); v6 = *(here->TRAdelays+2+3*(here->TRAsizeDelay-2)); d1 = (v1-v2)/ckt->CKTdeltaOld[0]; d2 = (v2-v3)/ckt->CKTdeltaOld[1]; d3 = (v4-v5)/ckt->CKTdeltaOld[0]; d4 = (v5-v6)/ckt->CKTdeltaOld[1]; /*printf("%s: at %g derivs are %g, %g and %g, %g\n", here->TRAname,ckt->CKTtime,d1,d2,d3,d4);*/ if( (fabs(d1-d2) >= here->TRAreltol*MAX(fabs(d1),fabs(d2))+ here->TRAabstol) || (fabs(d3-d4) >= here->TRAreltol*MAX(fabs(d3),fabs(d4))+ here->TRAabstol) ) { /* derivitive changing - need to schedule after delay */ /*printf("%s: at %g set for %g\n",here->TRAname, ckt->CKTtime, *(here->TRAdelays+3*here->TRAsizeDelay-3)+here->TRAtd );*/ /*printf("%g, %g, %g -> %g, %g \n",v1,v2,v3,d1,d2);*/ /*printf("%g, %g, %g -> %g, %g \n",v4,v5,v6,d3,d4);*/ /* also set for break after PREVIOUS point */ /*printf("setting break\n");*/ error = CKTsetBreak(ckt, *(here->TRAdelays+3*here->TRAsizeDelay -3) + here->TRAtd); if(error) return(error); } #endif /*NOTDEF*/ } } } return(OK); } ngspice-26/src/spicelib/devices/tra/tradest.c0000644000265600020320000000137612264261473020643 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "tradefs.h" #include "ngspice/suffix.h" void TRAdestroy(GENmodel **inModel) { TRAmodel **model = (TRAmodel **)inModel; TRAinstance *here; TRAinstance *prev = NULL; TRAmodel *mod = *model; TRAmodel *oldmod = NULL; for( ; mod ; mod = mod->TRAnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->TRAinstances ; here ; here = here->TRAnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/tra/tradel.c0000644000265600020320000000154212264261473020443 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TRAdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { TRAinstance **fast = (TRAinstance **)kill; TRAmodel *model = (TRAmodel *)inModel; TRAinstance **prev = NULL; TRAinstance *here; for( ; model ; model = model->TRAnextModel) { prev = &(model->TRAinstances); for(here = *prev; here ; here = *prev) { if(here->TRAname == name || (fast && here==*fast) ) { *prev= here->TRAnextInstance; FREE(here); return(OK); } prev = &(here->TRAnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/tra/traask.c0000644000265600020320000000527612264261473020465 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameter * of TRAnsmission lines */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int TRAask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { TRAinstance *here = (TRAinstance *)inst; int temp; double *v, *w; NG_IGNORE(select); NG_IGNORE(ckt); switch(which) { case TRA_POS_NODE1: value->iValue = here->TRAposNode1; return (OK); case TRA_NEG_NODE1: value->iValue = here->TRAnegNode1; return (OK); case TRA_POS_NODE2: value->iValue = here->TRAposNode2; return (OK); case TRA_NEG_NODE2: value->iValue = here->TRAnegNode2; return (OK); case TRA_INT_NODE1: value->iValue = here->TRAintNode1; return (OK); case TRA_INT_NODE2: value->iValue = here->TRAintNode2; return (OK); case TRA_Z0: value->rValue = here->TRAimped; return (OK); case TRA_TD: value->rValue = here->TRAtd; return (OK); case TRA_NL: value->rValue = here->TRAnl; return (OK); case TRA_FREQ: value->rValue = here->TRAf; return (OK); case TRA_V1: value->rValue = here->TRAinitVolt1; return (OK); case TRA_I1: value->rValue = here->TRAinitCur1; return (OK); case TRA_V2: value->rValue = here->TRAinitVolt2; return (OK); case TRA_I2: value->rValue = here->TRAinitCur2; return (OK); case TRA_RELTOL: value->rValue = here->TRAreltol; return (OK); case TRA_ABSTOL: value->rValue = here->TRAabstol; return (OK); case TRA_BR_EQ1: value->rValue = here->TRAbrEq1; return (OK); case TRA_BR_EQ2: value->rValue = here->TRAbrEq2; return (OK); case TRA_DELAY: value->v.vec.rVec = TMALLOC(double, here->TRAsizeDelay); value->v.numValue = temp = here->TRAsizeDelay; v = value->v.vec.rVec; w = here->TRAdelays; while (temp--) *v++ = *w++; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/tra/traext.h0000644000265600020320000000142412264261473020503 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int TRAacLoad(GENmodel*,CKTcircuit*); extern int TRAaccept(CKTcircuit*,GENmodel*); extern int TRAask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int TRAdelete(GENmodel*,IFuid,GENinstance**); extern void TRAdestroy(GENmodel**); extern int TRAload(GENmodel*,CKTcircuit*); extern int TRAmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int TRAmDelete(GENmodel**,IFuid,GENmodel*); extern int TRAparam(int,IFvalue*,GENinstance*,IFvalue*); extern int TRAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int TRAunsetup(GENmodel*,CKTcircuit*); extern int TRAtemp(GENmodel*,CKTcircuit*); extern int TRAtrunc(GENmodel*,CKTcircuit*,double*); ngspice-26/src/spicelib/devices/tra/tradefs.h0000644000265600020320000001302412264261473020623 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef TRA #define TRA #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* definitions used to describe transmission liness */ /* information used to describe a single instance */ typedef struct sTRAinstance { struct sTRAmodel *TRAmodPtr; /* backpointer to model */ struct sTRAinstance *TRAnextInstance; /* pointer to next instance of * current model*/ IFuid TRAname; /* pointer to character string naming this instance */ int TRAstate; /* not used */ int TRAposNode1; /* number of positive node of end 1 of t. line */ int TRAnegNode1; /* number of negative node of end 1 of t. line */ int TRAposNode2; /* number of positive node of end 2 of t. line */ int TRAnegNode2; /* number of negative node of end 2 of t. line */ int TRAintNode1; /* number of internal node of end 1 of t. line */ int TRAintNode2; /* number of internal node of end 2 of t. line */ double TRAimped; /* impedance - input */ double TRAconduct; /* conductance - calculated */ double TRAtd; /* propagation delay */ double TRAnl; /* normalized length */ double TRAf; /* frequency at which nl is measured */ double TRAinput1; /* accumulated excitation for port 1 */ double TRAinput2; /* accumulated excitation for port 2 */ double TRAinitVolt1; /* initial condition: voltage on port 1 */ double TRAinitCur1; /* initial condition: current at port 1 */ double TRAinitVolt2; /* initial condition: voltage on port 2 */ double TRAinitCur2; /* initial condition: current at port 2 */ double TRAreltol; /* relative deriv. tol. for breakpoint setting */ double TRAabstol; /* absolute deriv. tol. for breakpoint setting */ double *TRAdelays; /* delayed values of excitation */ int TRAsizeDelay; /* size of active delayed table */ int TRAallocDelay; /* allocated size of delayed table */ int TRAbrEq1; /* number of branch equation for end 1 of t. line */ int TRAbrEq2; /* number of branch equation for end 2 of t. line */ double *TRAibr1Ibr2Ptr; /* pointer to sparse matrix */ double *TRAibr1Int1Ptr; /* pointer to sparse matrix */ double *TRAibr1Neg1Ptr; /* pointer to sparse matrix */ double *TRAibr1Neg2Ptr; /* pointer to sparse matrix */ double *TRAibr1Pos2Ptr; /* pointer to sparse matrix */ double *TRAibr2Ibr1Ptr; /* pointer to sparse matrix */ double *TRAibr2Int2Ptr; /* pointer to sparse matrix */ double *TRAibr2Neg1Ptr; /* pointer to sparse matrix */ double *TRAibr2Neg2Ptr; /* pointer to sparse matrix */ double *TRAibr2Pos1Ptr; /* pointer to sparse matrix */ double *TRAint1Ibr1Ptr; /* pointer to sparse matrix */ double *TRAint1Int1Ptr; /* pointer to sparse matrix */ double *TRAint1Pos1Ptr; /* pointer to sparse matrix */ double *TRAint2Ibr2Ptr; /* pointer to sparse matrix */ double *TRAint2Int2Ptr; /* pointer to sparse matrix */ double *TRAint2Pos2Ptr; /* pointer to sparse matrix */ double *TRAneg1Ibr1Ptr; /* pointer to sparse matrix */ double *TRAneg2Ibr2Ptr; /* pointer to sparse matrix */ double *TRApos1Int1Ptr; /* pointer to sparse matrix */ double *TRApos1Pos1Ptr; /* pointer to sparse matrix */ double *TRApos2Int2Ptr; /* pointer to sparse matrix */ double *TRApos2Pos2Ptr; /* pointer to sparse matrix */ unsigned TRAimpedGiven : 1; /* flag to indicate impedence was specified */ unsigned TRAtdGiven : 1; /* flag to indicate delay was specified */ unsigned TRAnlGiven : 1; /* flag to indicate norm length was specified */ unsigned TRAfGiven : 1; /* flag to indicate freq was specified */ unsigned TRAicV1Given : 1; /* flag to ind. init. voltage at port 1 given */ unsigned TRAicC1Given : 1; /* flag to ind. init. current at port 1 given */ unsigned TRAicV2Given : 1; /* flag to ind. init. voltage at port 2 given */ unsigned TRAicC2Given : 1; /* flag to ind. init. current at port 2 given */ unsigned TRAreltolGiven:1; /* flag to ind. relative deriv. tol. given */ unsigned TRAabstolGiven:1; /* flag to ind. absolute deriv. tol. given */ } TRAinstance ; /* per model data */ typedef struct sTRAmodel { /* model structure for a transmission lines */ int TRAmodType; /* type index of this device type */ struct sTRAmodel *TRAnextModel; /* pointer to next possible model in * linked list */ TRAinstance * TRAinstances; /* pointer to list of instances that have this * model */ IFuid TRAmodName; /* pointer to character string naming this model */ } TRAmodel; /* device parameters */ #define TRA_Z0 1 #define TRA_TD 2 #define TRA_NL 3 #define TRA_FREQ 4 #define TRA_V1 5 #define TRA_I1 6 #define TRA_V2 7 #define TRA_I2 8 #define TRA_IC 9 #define TRA_RELTOL 10 #define TRA_ABSTOL 11 #define TRA_POS_NODE1 12 #define TRA_NEG_NODE1 13 #define TRA_POS_NODE2 14 #define TRA_NEG_NODE2 15 #define TRA_INPUT1 16 #define TRA_INPUT2 17 #define TRA_DELAY 18 #define TRA_BR_EQ1 19 #define TRA_BR_EQ2 20 #define TRA_INT_NODE1 21 #define TRA_INT_NODE2 22 /* model parameters */ /* device questions */ /* model questions */ #include "traext.h" #endif /*TRA*/ ngspice-26/src/spicelib/devices/tra/trainit.h0000644000265600020320000000027212264261473020646 0ustar andreasadmin#ifndef _TRAINIT_H #define _TRAINIT_H extern IFparm TRApTable[ ]; extern char *TRAnames[ ]; extern int TRApTSize; extern int TRAnSize; extern int TRAiSize; extern int TRAmSize; #endif ngspice-26/src/spicelib/devices/tra/Makefile.am0000644000265600020320000000067312264261473021064 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libtra.la libtra_la_SOURCES = \ tra.c \ traacct.c \ traacld.c \ traask.c \ tradefs.h \ tradel.c \ tradest.c \ traext.h \ trainit.c \ trainit.h \ traitf.h \ traload.c \ tramdel.c \ traparam.c \ trasetup.c \ tratemp.c \ tratrunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/tra/Makefile.in0000644000265600020320000004202712264261540021067 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/tra DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtra_la_LIBADD = am_libtra_la_OBJECTS = tra.lo traacct.lo traacld.lo traask.lo \ tradel.lo tradest.lo trainit.lo traload.lo tramdel.lo \ traparam.lo trasetup.lo tratemp.lo tratrunc.lo libtra_la_OBJECTS = $(am_libtra_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libtra_la_SOURCES) DIST_SOURCES = $(libtra_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libtra.la libtra_la_SOURCES = \ tra.c \ traacct.c \ traacld.c \ traask.c \ tradefs.h \ tradel.c \ tradest.c \ traext.h \ trainit.c \ trainit.h \ traitf.h \ traload.c \ tramdel.c \ traparam.c \ trasetup.c \ tratemp.c \ tratrunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/tra/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/tra/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libtra.la: $(libtra_la_OBJECTS) $(libtra_la_DEPENDENCIES) $(EXTRA_libtra_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtra_la_OBJECTS) $(libtra_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tradel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tradest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trainit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tramdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/traparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trasetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tratemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tratrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/tra/tra.c0000644000265600020320000000331312264261473017754 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "tradefs.h" #include "ngspice/suffix.h" IFparm TRApTable[] = { /* parameters */ IOPU( "z0", TRA_Z0, IF_REAL , "Characteristic impedance"), IOPR( "zo", TRA_Z0, IF_REAL , "Characteristic impedance"), IOPAU( "f", TRA_FREQ, IF_REAL , "Frequency"), IOPAU( "td", TRA_TD, IF_REAL , "Transmission delay"), IOPAU( "nl", TRA_NL, IF_REAL , "Normalized length at frequency given"), IOPAU( "v1", TRA_V1, IF_REAL , "Initial voltage at end 1"), IOPAU( "v2", TRA_V2, IF_REAL , "Initial voltage at end 2"), IOPAU( "i1", TRA_I1, IF_REAL , "Initial current at end 1"), IOPAU( "i2", TRA_I2, IF_REAL , "Initial current at end 2"), IP("ic", TRA_IC, IF_REALVEC,"Initial condition vector:v1,i1,v2,i2"), OP("rel", TRA_RELTOL, IF_REAL , "Rel. rate of change of deriv. for bkpt"), OP("abs", TRA_ABSTOL, IF_REAL , "Abs. rate of change of deriv. for bkpt"), OPU( "pos_node1",TRA_POS_NODE1,IF_INTEGER,"Positive node of end 1 of t. line"), OPU( "neg_node1",TRA_NEG_NODE1,IF_INTEGER,"Negative node of end 1 of t. line"), OPU( "pos_node2",TRA_POS_NODE2,IF_INTEGER,"Positive node of end 2 of t. line"), OPU( "neg_node2",TRA_NEG_NODE2,IF_INTEGER,"Negative node of end 2 of t. line"), OPU( "delays",TRA_DELAY, IF_REALVEC, "Delayed values of excitation") }; char *TRAnames[] = { "P1+", "P1-", "P2+", "P2-" }; int TRAnSize = NUMELEMS(TRAnames); int TRApTSize = NUMELEMS(TRApTable); int TRAmPTSize = 0; int TRAiSize = sizeof(TRAinstance); int TRAmSize = sizeof(TRAmodel); ngspice-26/src/spicelib/devices/tra/trainit.c0000644000265600020320000000401612264261473020641 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "traitf.h" #include "traext.h" #include "trainit.h" SPICEdev TRAinfo = { { "Tranline", "Lossless transmission line", &TRAnSize, &TRAnSize, TRAnames, &TRApTSize, TRApTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ TRAparam, /* DEVmodParam */ NULL, /* DEVload */ TRAload, /* DEVsetup */ TRAsetup, /* DEVunsetup */ TRAunsetup, /* DEVpzSetup */ TRAsetup, /* DEVtemperature*/ TRAtemp, /* DEVtrunc */ TRAtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ TRAacLoad, /* DEVaccept */ TRAaccept, /* DEVdestroy */ TRAdestroy, /* DEVmodDelete */ TRAmDelete, /* DEVdelete */ TRAdelete, /* DEVsetic */ NULL, /* DEVask */ TRAask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &TRAiSize, /* DEVmodSize */ &TRAmSize }; SPICEdev * get_tra_info(void) { return &TRAinfo; } ngspice-26/src/spicelib/devices/tra/traacld.c0000644000265600020320000000452512264261473020606 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "tradefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TRAacLoad(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current values into the * sparse matrix previously provided */ { TRAmodel *model = (TRAmodel *)inModel; TRAinstance *here; double real; double imag; /* loop through all the transmission line models */ for( ; model != NULL; model = model->TRAnextModel ) { /* loop through all the instances of the model */ for (here = model->TRAinstances; here != NULL ; here=here->TRAnextInstance) { real = cos(-ckt->CKTomega*here->TRAtd); imag = sin(-ckt->CKTomega*here->TRAtd); *(here->TRApos1Pos1Ptr) += here->TRAconduct; *(here->TRApos1Int1Ptr) -= here->TRAconduct; *(here->TRAneg1Ibr1Ptr) -= 1; *(here->TRApos2Pos2Ptr) += here->TRAconduct; *(here->TRAneg2Ibr2Ptr) -= 1; *(here->TRAint1Pos1Ptr) -= here->TRAconduct; *(here->TRAint1Int1Ptr) += here->TRAconduct; *(here->TRAint1Ibr1Ptr) += 1; *(here->TRAint2Int2Ptr) += here->TRAconduct; *(here->TRAint2Ibr2Ptr) += 1; *(here->TRAibr1Neg1Ptr) -= 1; *(here->TRAibr1Pos2Ptr+0) -= real; *(here->TRAibr1Pos2Ptr+1) -= imag; *(here->TRAibr1Neg2Ptr+0) += real; *(here->TRAibr1Neg2Ptr+1) += imag; *(here->TRAibr1Int1Ptr) += 1; *(here->TRAibr1Ibr2Ptr+0) -= real * here->TRAimped; *(here->TRAibr1Ibr2Ptr+1) -= imag * here->TRAimped; *(here->TRAibr2Pos1Ptr+0) -= real; *(here->TRAibr2Pos1Ptr+1) -= imag; *(here->TRAibr2Neg1Ptr+0) += real; *(here->TRAibr2Neg1Ptr+1) += imag; *(here->TRAibr2Neg2Ptr) -= 1; *(here->TRAibr2Int2Ptr) += 1; *(here->TRAibr2Ibr1Ptr+0) -= real * here->TRAimped; *(here->TRAibr2Ibr1Ptr+1) -= imag * here->TRAimped; *(here->TRApos2Int2Ptr) -= here->TRAconduct; *(here->TRAint2Pos2Ptr) -= here->TRAconduct; } } return(OK); } ngspice-26/src/spicelib/devices/mos2/0000755000265600020320000000000012264261710017106 5ustar andreasadminngspice-26/src/spicelib/devices/mos2/mos2dist.c0000644000265600020320000007716512264261473021044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int MOS2disto(int mode,GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { MOS2model *model = (MOS2model *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h1z, i1h1z; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1h2z, i1h2z; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r1hm2z, i1hm2z; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h11z, i2h11z; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double r2h1m2z, i2h1m2z; double temp, itemp; MOS2instance *here; if (mode == D_SETUP) return(MOS2dSetup(genmodel,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the MOS2 models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + (here->MOS2dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F1(here->gbs2, r1h1y, i1h1y); itemp = D1i2F1(here->gbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = D1i2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F1(here->capgs2, r1h1x, i1h1x); itemp = ckt->CKTomega * D1n2F1(here->capgs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2bNode)) += temp; *(ckt->CKTirhs + (here->MOS2bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F1(here->capbs2, r1h1y, i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r2h11x = *(job->r2H11ptr + (here->MOS2gNode)) - *(job->r2H11ptr + (here->MOS2sNodePrime)); i2h11x = *(job->i2H11ptr + (here->MOS2gNode)) - *(job->i2H11ptr + (here->MOS2sNodePrime)); r2h11y = *(job->r2H11ptr + (here->MOS2bNode)) - *(job->r2H11ptr + (here->MOS2sNodePrime)); i2h11y = *(job->i2H11ptr + (here->MOS2bNode)) - *(job->i2H11ptr + (here->MOS2sNodePrime)); r2h11z = *(job->r2H11ptr + (here->MOS2dNodePrime)) - *(job->r2H11ptr + (here->MOS2sNodePrime)); i2h11z = *(job->i2H11ptr + (here->MOS2dNodePrime)) - *(job->i2H11ptr + (here->MOS2sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + (here->MOS2dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = D1i3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = D1i3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = ckt->CKTomega * D1n3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2bNode)) += temp; *(ckt->CKTirhs + (here->MOS2bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h2x = *(job->r1H2ptr + (here->MOS2gNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1h2x = *(job->i1H2ptr + (here->MOS2gNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime)); r1h2y = *(job->r1H2ptr + (here->MOS2bNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1h2y = *(job->i1H2ptr + (here->MOS2bNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime)); r1h2z = *(job->r1H2ptr + (here->MOS2dNodePrime)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1h2z = *(job->i1H2ptr + (here->MOS2dNodePrime)) - *(job->i1H2ptr + (here->MOS2sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + (here->MOS2dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2bNode)) += temp; *(ckt->CKTirhs + (here->MOS2bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS2gNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS2gNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS2bNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS2bNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS2dNodePrime)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS2dNodePrime)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + (here->MOS2dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2bNode)) += temp; *(ckt->CKTirhs + (here->MOS2bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS2gNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS2gNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS2bNode)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS2bNode)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS2dNodePrime)) - *(job->r1H2ptr + (here->MOS2sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS2dNodePrime)) - *(job->i1H2ptr + (here->MOS2sNodePrime))); r2h11x = *(job->r1H1ptr + (here->MOS2gNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i2h11x = *(job->i1H1ptr + (here->MOS2gNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r2h11y = *(job->r1H1ptr + (here->MOS2bNode)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i2h11y = *(job->i1H1ptr + (here->MOS2bNode)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r2h11z = *(job->r1H1ptr + (here->MOS2dNodePrime)) - *(job->r1H1ptr + (here->MOS2sNodePrime)); i2h11z = *(job->i1H1ptr + (here->MOS2dNodePrime)) - *(job->i1H1ptr + (here->MOS2sNodePrime)); r2h1m2x = *(job->r2H1m2ptr + (here->MOS2gNode)) - *(job->r2H1m2ptr + (here->MOS2sNodePrime)); i2h1m2x = *(job->i2H1m2ptr + (here->MOS2gNode)) - *(job->i2H1m2ptr + (here->MOS2sNodePrime)); r2h1m2y = *(job->r2H1m2ptr + (here->MOS2bNode)) - *(job->r2H1m2ptr + (here->MOS2sNodePrime)); i2h1m2y = *(job->i2H1m2ptr + (here->MOS2bNode)) - *(job->i2H1m2ptr + (here->MOS2sNodePrime)); r2h1m2z = *(job->r2H1m2ptr + (here->MOS2dNodePrime)) - *(job->r2H1m2ptr + (here->MOS2sNodePrime)); i2h1m2z = *(job->i2H1m2ptr + (here->MOS2dNodePrime)) - *(job->i2H1m2ptr + (here->MOS2sNodePrime)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_y2; pass.czz = here->cdr_z2; pass.cxy = here->cdr_xy; pass.cyz = here->cdr_yz; pass.cxz = here->cdr_xz; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_y3; pass.czzz = here->cdr_z3; pass.cxxy = here->cdr_x2y; pass.cxxz = here->cdr_x2z; pass.cxyy = here->cdr_xy2; pass.cyyz = here->cdr_y2z; pass.cxzz = here->cdr_xz2; pass.cyzz = here->cdr_yz2; pass.cxyz = here->cdr_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->MOS2dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = D1i2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = D1i2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = ckt->CKTomega * D1n2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->MOS2gNode)) -= temp; *(ckt->CKTirhs + (here->MOS2gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2bNode)) += temp; *(ckt->CKTirhs + (here->MOS2bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS2bNode)) -= temp; *(ckt->CKTirhs + (here->MOS2bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS2dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS2dNodePrime)) += itemp; /* capbd over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/mos2/mos2conv.c0000644000265600020320000000634112264261473021032 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2convTest(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; double delvbs; double delvbd; double delvgs; double delvds; double delvgd; double cbhat; double cdhat; double vbs; double vbd; double vgs; double vds; double vgd; double vgdo; double tol; for( ; model != NULL; model = model->MOS2nextModel) { for(here = model->MOS2instances; here!= NULL; here = here->MOS2nextInstance) { vbs = model->MOS2type * ( *(ckt->CKTrhs+here->MOS2bNode) - *(ckt->CKTrhs+here->MOS2sNodePrime)); vgs = model->MOS2type * ( *(ckt->CKTrhs+here->MOS2gNode) - *(ckt->CKTrhs+here->MOS2sNodePrime)); vds = model->MOS2type * ( *(ckt->CKTrhs+here->MOS2dNodePrime) - *(ckt->CKTrhs+here->MOS2sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS2vgs) - *(ckt->CKTstate0 + here->MOS2vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS2vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS2vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS2mode >= 0) { cdhat= here->MOS2cd- here->MOS2gbd * delvbd + here->MOS2gmbs * delvbs + here->MOS2gm * delvgs + here->MOS2gds * delvds ; } else { cdhat= here->MOS2cd - ( here->MOS2gbd - here->MOS2gmbs) * delvbd - here->MOS2gm * delvgd + here->MOS2gds * delvds ; } cbhat= here->MOS2cbs + here->MOS2cbd + here->MOS2gbd * delvbd + here->MOS2gbs * delvbs ; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(here->MOS2cd))+ ckt->CKTabstol; if (fabs(cdhat-here->MOS2cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(cbhat),fabs(here->MOS2cbs+here->MOS2cbd))+ ckt->CKTabstol; if (fabs(cbhat-(here->MOS2cbs+here->MOS2cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged*/ } } } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2.c0000644000265600020320000002267412264261473020153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFIxes **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mos2defs.h" #include "ngspice/suffix.h" IFparm MOS2pTable[] = { /* parameters */ IOPU("m", MOS2_M, IF_REAL , "Multiplier"), IOPU("l", MOS2_L, IF_REAL , "Length"), IOPU("w", MOS2_W, IF_REAL , "Width"), IOPU("ad", MOS2_AD, IF_REAL , "Drain area"), IOPU("as", MOS2_AS, IF_REAL , "Source area"), IOPU("pd", MOS2_PD, IF_REAL , "Drain perimeter"), IOPU("ps", MOS2_PS, IF_REAL , "Source perimeter"), OP( "id", MOS2_CD, IF_REAL,"Drain current"), OPR( "cd", MOS2_CD, IF_REAL,""), OP( "ibd", MOS2_CBD, IF_REAL, "B-D junction current"), OP( "ibs", MOS2_CBS, IF_REAL, "B-S junction current"), OP( "is", MOS2_CS, IF_REAL, "Source current "), OP( "ig", MOS2_CG, IF_REAL, "Gate current "), OP( "ib", MOS2_CB, IF_REAL, "Bulk current "), OP( "vgs", MOS2_VGS, IF_REAL, "Gate-Source voltage"), OP( "vds", MOS2_VDS, IF_REAL, "Drain-Source voltage"), OP( "vbs", MOS2_VBS, IF_REAL, "Bulk-Source voltage"), OPU( "vbd", MOS2_VBD, IF_REAL, "Bulk-Drain voltage"), IOPU("nrd", MOS2_NRD, IF_REAL , "Drain squares"), IOPU("nrs", MOS2_NRS, IF_REAL , "Source squares"), IP("off", MOS2_OFF, IF_FLAG , "Device initially off"), IOPAU("icvds", MOS2_IC_VDS,IF_REAL , "Initial D-S voltage"), IOPAU("icvgs", MOS2_IC_VGS,IF_REAL , "Initial G-S voltage"), IOPAU("icvbs", MOS2_IC_VBS,IF_REAL , "Initial B-S voltage"), IOPU("temp", MOS2_TEMP, IF_REAL ,"Instance operating temperature"), IOPU("dtemp", MOS2_DTEMP, IF_REAL , "Instance temperature difference"), IP( "ic", MOS2_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"), IP( "sens_l", MOS2_L_SENS,IF_FLAG, "flag to request sensitivity WRT length"), IP( "sens_w", MOS2_W_SENS,IF_FLAG, "flag to request sensitivity WRT width"), /* OP( "cgs", MOS2_CGS, IF_REAL , "Gate-Source capacitance"), OP( "cgd", MOS2_CGD, IF_REAL , "Gate-Drain capacitance"), */ OPU( "dnode", MOS2_DNODE, IF_INTEGER, "Number of drain node"), OPU( "gnode", MOS2_GNODE, IF_INTEGER, "Number of gate node"), OPU( "snode", MOS2_SNODE, IF_INTEGER, "Number of source node"), OPU( "bnode", MOS2_BNODE, IF_INTEGER, "Number of bulk node"), OPU( "dnodeprime", MOS2_DNODEPRIME, IF_INTEGER, "Number of internal drain node"), OPU( "snodeprime", MOS2_SNODEPRIME, IF_INTEGER, "Number of internal source node"), OP( "von", MOS2_VON, IF_REAL, " "), OP( "vdsat", MOS2_VDSAT, IF_REAL,"Saturation drain voltage"), OPU( "sourcevcrit", MOS2_SOURCEVCRIT, IF_REAL,"Critical source voltage"), OPU( "drainvcrit", MOS2_DRAINVCRIT, IF_REAL,"Critical drain voltage"), OP( "rs", MOS2_SOURCERESIST, IF_REAL, "Source resistance"), OPU( "sourceconductance", MOS2_SOURCECONDUCT, IF_REAL, "Source conductance"), OP( "rd", MOS2_DRAINRESIST, IF_REAL, "Drain resistance"), OPU( "drainconductance", MOS2_DRAINCONDUCT, IF_REAL, "Drain conductance"), OP( "gm", MOS2_GM, IF_REAL, "Transconductance"), OP( "gds", MOS2_GDS, IF_REAL, "Drain-Source conductance"), OP( "gmb", MOS2_GMBS, IF_REAL, "Bulk-Source transconductance"), OPR( "gmbs", MOS2_GMBS, IF_REAL, ""), OPU( "gbd", MOS2_GBD, IF_REAL, "Bulk-Drain conductance"), OPU( "gbs", MOS2_GBS, IF_REAL, "Bulk-Source conductance"), OP( "cbd", MOS2_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP( "cbs", MOS2_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP( "cgs", MOS2_CAPGS, IF_REAL, "Gate-Source capacitance"), OP( "cgd", MOS2_CAPGD, IF_REAL, "Gate-Drain capacitance"), OP( "cgb", MOS2_CAPGB, IF_REAL, "Gate-Bulk capacitance"), OPU( "cbd0", MOS2_CAPZEROBIASBD, IF_REAL,"Zero-Bias B-D junction capacitance"), OPU( "cbdsw0",MOS2_CAPZEROBIASBDSW,IF_REAL, " "), OPU( "cbs0", MOS2_CAPZEROBIASBS, IF_REAL,"Zero-Bias B-S junction capacitance"), OPU( "cbssw0", MOS2_CAPZEROBIASBSSW,IF_REAL," "), OPU("cqgs",MOS2_CQGS,IF_REAL,"Capacitance due to gate-source charge storage"), OPU("cqgd",MOS2_CQGD,IF_REAL,"Capacitance due to gate-drain charge storage"), OPU("cqgb",MOS2_CQGB,IF_REAL,"Capacitance due to gate-bulk charge storage"), OPU("cqbd",MOS2_CQBD,IF_REAL,"Capacitance due to bulk-drain charge storage"), OPU("cqbs",MOS2_CQBS,IF_REAL,"Capacitance due to bulk-source charge storage"), OPU( "qgs", MOS2_QGS, IF_REAL, "Gate-Source charge storage"), OPU( "qgd", MOS2_QGD, IF_REAL, "Gate-Drain charge storage"), OPU( "qgb", MOS2_QGB, IF_REAL, "Gate-Bulk charge storage"), OPU( "qbd", MOS2_QBD, IF_REAL, "Bulk-Drain charge storage"), OPU( "qbs", MOS2_QBS, IF_REAL, "Bulk-Source charge storage"), OPU( "p", MOS2_POWER, IF_REAL, "Instantaneous power "), OPU( "sens_l_dc", MOS2_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OPU( "sens_l_real", MOS2_L_SENS_REAL, IF_REAL, "real part of ac sensitivity wrt length"), OPU( "sens_l_imag", MOS2_L_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt length"), OPU( "sens_l_cplx", MOS2_L_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt length"), OPU( "sens_l_mag", MOS2_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OPU( "sens_l_ph", MOS2_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OPU( "sens_w_dc", MOS2_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OPU( "sens_w_real", MOS2_W_SENS_REAL, IF_REAL, "dc sensitivity and real part of ac sensitivity wrt width"), OPU( "sens_w_imag", MOS2_W_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt width"), OPU( "sens_w_mag", MOS2_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OPU( "sens_w_ph", MOS2_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OPU( "sens_w_cplx", MOS2_W_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt width") }; IFparm MOS2mPTable[] = { /* model parameters */ OP("type", MOS2_MOD_TYPE, IF_STRING ,"N-channel or P-channel MOS"), IOP("vto", MOS2_MOD_VTO, IF_REAL ,"Threshold voltage"), IOPR("vt0", MOS2_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("kp", MOS2_MOD_KP, IF_REAL ,"Transconductance parameter"), IOP("gamma", MOS2_MOD_GAMMA, IF_REAL ,"Bulk threshold parameter"), IOP("phi", MOS2_MOD_PHI, IF_REAL ,"Surface potential"), IOP("lambda",MOS2_MOD_LAMBDA,IF_REAL ,"Channel length modulation"), IOP("rd", MOS2_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", MOS2_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOP("cbd", MOS2_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOP("cbs", MOS2_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", MOS2_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("pb", MOS2_MOD_PB, IF_REAL ,"Bulk junction potential"), IOPA("cgso", MOS2_MOD_CGSO, IF_REAL ,"Gate-source overlap cap."), IOPA("cgdo", MOS2_MOD_CGDO, IF_REAL ,"Gate-drain overlap cap."), IOPA("cgbo", MOS2_MOD_CGBO, IF_REAL ,"Gate-bulk overlap cap."), IOP("rsh", MOS2_MOD_RSH, IF_REAL ,"Sheet resistance"), IOPA("cj", MOS2_MOD_CJ, IF_REAL ,"Bottom junction cap per area"), IOP("mj", MOS2_MOD_MJ, IF_REAL ,"Bottom grading coefficient"), IOPA("cjsw", MOS2_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mjsw", MOS2_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOP("js", MOS2_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("tox", MOS2_MOD_TOX, IF_REAL ,"Oxide thickness"), IOP("ld", MOS2_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("u0", MOS2_MOD_U0, IF_REAL ,"Surface mobility"), IOPR("uo", MOS2_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", MOS2_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IP("nmos", MOS2_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS2_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), IOP("nsub", MOS2_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("tpg", MOS2_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nss", MOS2_MOD_NSS, IF_REAL ,"Surface state density"), IOP("delta", MOS2_MOD_DELTA, IF_REAL ,"Width effect on threshold"), IOP("uexp", MOS2_MOD_UEXP, IF_REAL ,"Crit. field exp for mob. deg."), IOP("ucrit", MOS2_MOD_UCRIT, IF_REAL ,"Crit. field for mob. degradation"), IOP("vmax", MOS2_MOD_VMAX, IF_REAL ,"Maximum carrier drift velocity"), IOP("xj", MOS2_MOD_XJ, IF_REAL ,"Junction depth"), IOP("neff", MOS2_MOD_NEFF, IF_REAL ,"Total channel charge coeff."), IOP("nfs", MOS2_MOD_NFS, IF_REAL ,"Fast surface state density"), IOPU("tnom", MOS2_MOD_TNOM, IF_REAL ,"Parameter measurement temperature"), IOP("kf", MOS2_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", MOS2_MOD_AF, IF_REAL ,"Flicker noise exponent") }; char *MOS2names[] = { "Drain", "Gate", "Source", "Bulk" }; int MOS2nSize = NUMELEMS(MOS2names); int MOS2pTSize = NUMELEMS(MOS2pTable); int MOS2mPTSize = NUMELEMS(MOS2mPTable); int MOS2iSize = sizeof(MOS2instance); int MOS2mSize = sizeof(MOS2model); ngspice-26/src/spicelib/devices/mos2/mos2mask.c0000644000265600020320000001040412264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2mAsk(CKTcircuit *ckt, GENmodel *inModel, int param, IFvalue *value) { MOS2model *model = (MOS2model *)inModel; NG_IGNORE(ckt); switch(param) { case MOS2_MOD_TNOM: value->rValue = model->MOS2tnom - CONSTCtoK; break; case MOS2_MOD_VTO: value->rValue = model->MOS2vt0; break; case MOS2_MOD_KP: value->rValue = model->MOS2transconductance; break; case MOS2_MOD_GAMMA: value->rValue = model->MOS2gamma; break; case MOS2_MOD_PHI: value->rValue = model->MOS2phi; break; case MOS2_MOD_LAMBDA: value->rValue = model->MOS2lambda; break; case MOS2_MOD_RD: value->rValue = model->MOS2drainResistance; break; case MOS2_MOD_RS: value->rValue = model->MOS2sourceResistance; break; case MOS2_MOD_CBD: value->rValue = model->MOS2capBD; break; case MOS2_MOD_CBS: value->rValue = model->MOS2capBS; break; case MOS2_MOD_IS: value->rValue = model->MOS2jctSatCur; break; case MOS2_MOD_PB: value->rValue = model->MOS2bulkJctPotential; break; case MOS2_MOD_CGSO: value->rValue = model->MOS2gateSourceOverlapCapFactor; break; case MOS2_MOD_CGDO: value->rValue = model->MOS2gateDrainOverlapCapFactor; break; case MOS2_MOD_CGBO: value->rValue = model->MOS2gateBulkOverlapCapFactor; break; case MOS2_MOD_CJ: value->rValue = model->MOS2bulkCapFactor; break; case MOS2_MOD_MJ: value->rValue = model->MOS2bulkJctBotGradingCoeff; break; case MOS2_MOD_CJSW: value->rValue = model->MOS2sideWallCapFactor; break; case MOS2_MOD_MJSW: value->rValue = model->MOS2bulkJctSideGradingCoeff; break; case MOS2_MOD_JS: value->rValue = model->MOS2jctSatCurDensity; break; case MOS2_MOD_TOX: value->rValue = model->MOS2oxideThickness; break; case MOS2_MOD_LD: value->rValue = model->MOS2latDiff; break; case MOS2_MOD_RSH: value->rValue = model->MOS2sheetResistance; break; case MOS2_MOD_U0: value->rValue = model->MOS2surfaceMobility; break; case MOS2_MOD_FC: value->rValue = model->MOS2fwdCapDepCoeff; break; case MOS2_MOD_NSUB: value->rValue = model->MOS2substrateDoping; break; case MOS2_MOD_TPG: value->rValue = model->MOS2gateType; break; case MOS2_MOD_NSS: value->rValue = model->MOS2surfaceStateDensity; break; case MOS2_MOD_NFS: value->rValue = model->MOS2fastSurfaceStateDensity; break; case MOS2_MOD_DELTA: value->rValue = model->MOS2narrowFactor; break; case MOS2_MOD_UEXP: value->rValue = model->MOS2critFieldExp; break; case MOS2_MOD_VMAX: value->rValue = model->MOS2maxDriftVel; break; case MOS2_MOD_XJ: value->rValue = model->MOS2junctionDepth; break; case MOS2_MOD_NEFF: value->rValue = model->MOS2channelCharge; break; case MOS2_MOD_UCRIT: value->rValue = model->MOS2critField; break; case MOS2_MOD_KF: value->rValue = model->MOS2fNcoef; break; case MOS2_MOD_AF: value->rValue = model->MOS2fNexp; break; case MOS2_MOD_TYPE: if (model->MOS2type > 0) value->sValue = "nmos"; else value->sValue = "pmos"; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2mdel.c0000644000265600020320000000176612264261473021014 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MOS2model **model = (MOS2model **)inModel; MOS2model *modfast = (MOS2model *)kill; MOS2instance *here; MOS2instance *prev = NULL; MOS2model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MOS2nextModel)) { if( (*model)->MOS2modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MOS2nextModel; /* cut deleted device out of list */ for(here = (*model)->MOS2instances ; here ; here = here->MOS2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2init.h0000644000265600020320000000037012264261473021031 0ustar andreasadmin#ifndef _MOS2INIT_H #define _MOS2INIT_H extern IFparm MOS2pTable[ ]; extern IFparm MOS2mPTable[ ]; extern char *MOS2names[ ]; extern int MOS2pTSize; extern int MOS2mPTSize; extern int MOS2nSize; extern int MOS2iSize; extern int MOS2mSize; #endif ngspice-26/src/spicelib/devices/mos2/mos2dset.c0000644000265600020320000013453312264261473021031 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) static double sig1[4] = {1.0, -1.0, 1.0, -1.0}; static double sig2[4] = {1.0, 1.0,-1.0, -1.0}; int MOS2dSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; double Beta; double DrainSatCur; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cdrain; double ebd; double evbs; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb; double vgd; double vgs; double von; double vt; /* K * T / Q */ double lcapgs2; double lcapgd2; double lcapgb2; double lcapgs3; double lcapgd3; double lcapgb3; double lgbs, lgbs2, lgbs3; double lgbd, lgbd2, lgbd3; double vgst; double lcapbs, lcapbs2, lcapbs3; double lcapbd, lcapbd2, lcapbd3; double gm2, gb2, gds2; double gmb, gmds, gbds; double gm3, gb3, gds3; double gm2b, gm2ds, gmb2, gmds2, gbds2, gb2ds; double gmbds; Dderivs d_cdrain; /* loop through all the MOS2 device models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { vt = CONSTKoverQ * here->MOS2temp; EffectiveLength=here->MOS2l - 2*model->MOS2latDiff; if( (here->MOS2tSatCurDens == 0) || (here->MOS2drainArea == 0) || (here->MOS2sourceArea == 0)) { DrainSatCur = here->MOS2m * here->MOS2tSatCur; SourceSatCur = here->MOS2m * here->MOS2tSatCur; } else { DrainSatCur = here->MOS2tSatCurDens * here->MOS2m * here->MOS2drainArea; SourceSatCur = here->MOS2tSatCurDens * here->MOS2m * here->MOS2sourceArea; } GateSourceOverlapCap = model->MOS2gateSourceOverlapCapFactor * here->MOS2m * here->MOS2w; GateDrainOverlapCap = model->MOS2gateDrainOverlapCapFactor * here->MOS2m * here->MOS2w; GateBulkOverlapCap = model->MOS2gateBulkOverlapCapFactor * here->MOS2m * EffectiveLength; Beta = here->MOS2tTransconductance * here->MOS2m * here->MOS2w/EffectiveLength; OxideCap = model->MOS2oxideCapFactor * EffectiveLength * here->MOS2m * here->MOS2w; /* general iteration */ vbs = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2bNode) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); vgs = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2gNode) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); vds = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2dNodePrime) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; /* now all the preliminaries are over - we can start doing the * real work */ vgb = vgs - vbs; /* bulk-source and bulk-drain doides here we just evaluate * the ideal diode current and the correspoinding * derivative (conductance). */ if(vbs <= 0) { lgbs = SourceSatCur/vt; lgbs += ckt->CKTgmin; lgbs2 = lgbs3 = 0; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); lgbs = SourceSatCur*evbs/vt + ckt->CKTgmin; lgbs2 = model->MOS2type *0.5 * (lgbs - ckt->CKTgmin)/vt; lgbs3 = model->MOS2type *lgbs2/(vt*3); } if(vbd <= 0) { lgbd = DrainSatCur/vt; lgbd += ckt->CKTgmin; lgbd2 = lgbd3 = 0; } else { ebd = exp(MIN(MAX_EXP_ARG,vbd/vt)); lgbd = DrainSatCur*ebd/vt +ckt->CKTgmin; lgbd2 = model->MOS2type *0.5 * (lgbd - ckt->CKTgmin)/vt; lgbd3 = model->MOS2type *lgbd2/(vt*3); } if(vds >= 0) { /* normal mode */ here->MOS2mode = 1; } else { /* inverse mode */ here->MOS2mode = -1; } { /* moseq2(vds,vbs,vgs,gm,gds,gmbs,qg,qc,qb, * cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* note: cgdb, cgsb, cbdb, cbsb never used */ /* * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets * */ double arg; double sarg; double a4[4],b4[4],x4[8],poly4[8]; double beta1; double sphi = 0.0; /* square root of phi */ double sphi3 = 0.0; /* square root of phi cubed */ double barg; double factor; double eta; double vbin; double argd = 0.0; double args = 0.0; double argss; double argsd; double argxs; double argxd; double gamasd; double xwd; double xws; double gammad; double cfs; double cdonco; double xn; double argg = 0.0; double sarg3; double sbiarg; double body; double udenom; double gammd2; double argv; double vgsx; double ufact; double ueff; double a1; double a3; double a; double b1; double b3; double b; double c1; double c; double d1; double fi; double p0; double p2; double p3; double p4; double p; double r3; double r; double ro; double s2; double s; double v1; double v2; double xv; double y3; double delta4; double xvalid = 0.0; double bsarg; double bodys; double sargv; double xlfact; double xdv; double xlv; double xls; double clfact; double xleff; double deltal; double xwb; double vdson; double cdson; double expg; double xld; double xlamda = model->MOS2lambda; Dderivs d_xleff, d_delta1; Dderivs d_xlfact; Dderivs d_xlv, d_xls; Dderivs d_bsarg, d_bodys, d_vdsat, d_sargv; Dderivs d_delta4, d_a4[3], d_b4[3], d_x4[3], d_poly4[3]; Dderivs d_xvalid; Dderivs d_ro, d_fi, d_y3, d_p3, d_p4, d_a3, d_b3; Dderivs d_r3, d_s2, d_pee, d_p0, d_p2; Dderivs d_b1, d_c1, d_d1, d_a, d_b, d_c, d_arr, d_s; Dderivs d_xv, d_a1; Dderivs d_v1, d_v2; Dderivs d_argv,d_gammd2; Dderivs d_ufact; Dderivs d_udenom; Dderivs d_sarg3, d_body; Dderivs d_vgst; Dderivs d_argg; Dderivs d_cdonco,d_tmp,d_xn; Dderivs d_dbargs,d_dbargd,d_dgddvb; Dderivs d_dbxwd,d_dbxws; Dderivs d_dsrgdb, d_dbrgdb; Dderivs d_gamasd, d_gammad, d_args, d_argd; Dderivs d_argxs, d_argxd; Dderivs d_argss, d_argsd; Dderivs d_xwd, d_xws; Dderivs d_zero; Dderivs d_vbin; Dderivs d_barg; Dderivs d_sarg; Dderivs d_phiMinVbs; Dderivs d_p, d_q, d_r; Dderivs d_von, d_dummy, d_vgsx, d_arg, d_dumarg; Dderivs d_ueff, d_beta1, d_clfact, d_xlamda,d_mos2gds; Dderivs d_vdson, d_cdson, d_expg; double dsrgdb, dbrgdb, dbxwd, dbxws, dbargs = 0.0, dbargd = 0.0; double dgddvb; /* from now on, p=vgs, q=vbs, r=vds */ /* * 'local' variables - these switch d & s around appropriately * so that we don't have to worry about vds < 0 */ double lvbs = here->MOS2mode==1?vbs:vbd; double lvds = here->MOS2mode*vds; double lvgs = here->MOS2mode==1?vgs:vgd; double phiMinVbs = here->MOS2tPhi - lvbs; double tmp; /* a temporary variable, not used for more than */ /* about 10 lines at a time */ int iknt; int jknt; int i; int j; /* * compute some useful quantities */ d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2r = 0.0; d_p.d3_p2q = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q,&d_p); EqualDeriv(&d_r,&d_p); EqualDeriv(&d_zero,&d_p); d_q.d1_p = d_r.d1_p = d_zero.d1_p = 0.0; d_q.d1_q = d_r.d1_r = 1.0; EqualDeriv(&d_phiMinVbs,&d_q); d_phiMinVbs.value = phiMinVbs; d_phiMinVbs.d1_q = - d_phiMinVbs.d1_q; if (lvbs <= 0.0) { sarg = sqrt(phiMinVbs); SqrtDeriv(&d_sarg, &d_phiMinVbs); dsrgdb = -0.5/sarg; InvDeriv(&d_dsrgdb,&d_sarg); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5); } else { sphi = sqrt(here->MOS2tPhi); /*const*/ sphi3 = here->MOS2tPhi*sphi; /*const*/ sarg = sphi/(1.0+0.5*lvbs/here->MOS2tPhi); EqualDeriv(&d_sarg,&d_q); d_sarg.value = lvbs; TimesDeriv(&d_sarg,&d_sarg,0.5/here->MOS2tPhi); d_sarg.value += 1.0; InvDeriv(&d_sarg,&d_sarg); TimesDeriv(&d_sarg,&d_sarg,sphi); dsrgdb = -0.5*sarg*sarg/sphi3; MultDeriv(&d_dsrgdb,&d_sarg,&d_sarg); TimesDeriv(&d_dsrgdb,&d_dsrgdb,-0.5/sphi3); /* tmp = sarg/sphi3; */ } if ((lvds-lvbs) >= 0) { barg = sqrt(phiMinVbs+lvds); EqualDeriv(&d_barg,&d_phiMinVbs); d_barg.value += lvds; d_barg.d1_r += 1.0; SqrtDeriv(&d_barg,&d_barg); dbrgdb = -0.5/barg; InvDeriv(&d_dbrgdb,&d_barg); TimesDeriv(&d_dbrgdb,&d_dbrgdb,-0.5); } else { sphi = sqrt(here->MOS2tPhi); /* added by HT 050523 */ sphi3 = here->MOS2tPhi*sphi; /* added by HT 050523 */ barg = sphi/(1.0+0.5*(lvbs-lvds)/here->MOS2tPhi); EqualDeriv(&d_barg,&d_q); d_barg.value = lvbs - lvds; d_barg.d1_r -= 1.0; TimesDeriv(&d_barg,&d_barg,0.5/here->MOS2tPhi); d_barg.value += 1.0; InvDeriv(&d_barg,&d_barg); TimesDeriv(&d_barg,&d_barg,sphi); dbrgdb = -0.5*barg*barg/sphi3; MultDeriv(&d_dbrgdb,&d_barg,&d_barg); TimesDeriv(&d_dbrgdb,&d_dbrgdb,-0.5/sphi3); /* tmp = barg/sphi3; */ } /* * calculate threshold voltage (von) * narrow-channel effect */ /*XXX constant per device */ factor = 0.125*model->MOS2narrowFactor*2.0*M_PI*EPSSIL/ OxideCap*EffectiveLength; /*XXX constant per device */ eta = 1.0+factor; vbin = here->MOS2tVbi*model->MOS2type+factor*phiMinVbs; /* mistake! fixed Dec 7 '89 TimesDeriv(&d_vbin,&d_phiMinVbs,here->MOS2tVbi* model->MOS2type+factor); */ TimesDeriv(&d_vbin,&d_phiMinVbs,factor); d_vbin.value += here->MOS2tVbi*model->MOS2type; if ((model->MOS2gamma > 0.0) || (model->MOS2substrateDoping > 0.0)) { xwd = model->MOS2xd*barg; xws = model->MOS2xd*sarg; TimesDeriv(&d_xwd,&d_barg,model->MOS2xd); TimesDeriv(&d_xws,&d_sarg,model->MOS2xd); /* * short-channel effect with vds .ne. 0.0 */ argss = 0.0; argsd = 0.0; EqualDeriv(&d_argss,&d_zero); EqualDeriv(&d_argsd,&d_zero); if (model->MOS2junctionDepth > 0) { tmp = 2.0/model->MOS2junctionDepth; /*const*/ argxs = 1.0+xws*tmp; TimesDeriv(&d_argxs,&d_xws,tmp); d_argxs.value += 1.0; argxd = 1.0+xwd*tmp; TimesDeriv(&d_argxd,&d_xwd,tmp); d_argxd.value += 1.0; args = sqrt(argxs); SqrtDeriv(&d_args,&d_argxs); argd = sqrt(argxd); SqrtDeriv(&d_argd,&d_argxd); tmp = .5*model->MOS2junctionDepth/EffectiveLength; argss = tmp * (args-1.0); TimesDeriv(&d_argss,&d_args,tmp); d_argss.value -= tmp; argsd = tmp * (argd-1.0); TimesDeriv(&d_argsd,&d_argd,tmp); d_argsd.value -= tmp; } gamasd = model->MOS2gamma*(1.0-argss-argsd); PlusDeriv(&d_gamasd,&d_argss,&d_argsd); d_gamasd.value -= 1.0; TimesDeriv(&d_gamasd,&d_gamasd,-model->MOS2gamma); dbxwd = model->MOS2xd*dbrgdb; dbxws = model->MOS2xd*dsrgdb; TimesDeriv(&d_dbxwd,&d_dbrgdb,model->MOS2xd); TimesDeriv(&d_dbxws,&d_dsrgdb,model->MOS2xd); if (model->MOS2junctionDepth > 0) { tmp = 0.5/EffectiveLength; dbargs = tmp*dbxws/args; dbargd = tmp*dbxwd/argd; DivDeriv(&d_dbargs,&d_dbxws,&d_args); DivDeriv(&d_dbargd,&d_dbxwd,&d_argd); TimesDeriv(&d_dbargs,&d_dbargs,tmp); TimesDeriv(&d_dbargd,&d_dbargd,tmp); } dgddvb = -model->MOS2gamma*(dbargs+dbargd); PlusDeriv(&d_dgddvb,&d_dbargs,&d_dbargd); TimesDeriv(&d_dgddvb,&d_dgddvb,-model->MOS2gamma); if (model->MOS2junctionDepth > 0) { } } else { gamasd = model->MOS2gamma; gammad = model->MOS2gamma; EqualDeriv(&d_gamasd,&d_zero); EqualDeriv(&d_gammad,&d_zero); d_gamasd.value = d_gammad.value = model->MOS2gamma; dgddvb = 0.0; EqualDeriv(&d_dgddvb,&d_zero); } von = vbin+gamasd*sarg; MultDeriv(&d_von,&d_gamasd,&d_sarg); PlusDeriv(&d_von,&d_von,&d_vbin); /* vth = von; EqualDeriv(&d_vth,&d_von); */ vdsat = 0.0; EqualDeriv(&d_vdsat,&d_zero); if (model->MOS2fastSurfaceStateDensity != 0.0 && OxideCap != 0.0) { /* XXX constant per model */ cfs = CHARGE*model->MOS2fastSurfaceStateDensity* 1e4 /*(cm**2/m**2)*/; cdonco = -(gamasd*dsrgdb + dgddvb*sarg) + factor; MultDeriv(&d_dummy,&d_dgddvb,&d_sarg); MultDeriv(&d_cdonco,&d_gamasd,&d_dsrgdb); PlusDeriv(&d_cdonco,&d_cdonco,&d_dummy); TimesDeriv(&d_cdonco,&d_cdonco,-1.0); d_cdonco.value += factor; xn = 1.0+cfs/OxideCap*here->MOS2m*here->MOS2w*EffectiveLength+cdonco; EqualDeriv(&d_xn,&d_cdonco); d_xn.value = xn; tmp = vt*xn; TimesDeriv(&d_tmp,&d_xn,vt); von = von+tmp; PlusDeriv(&d_von,&d_von,&d_tmp); argg = 1.0/tmp; InvDeriv(&d_argg,&d_tmp); vgst = lvgs-von; TimesDeriv(&d_vgst,&d_von,-1.0); PlusDeriv(&d_vgst,&d_vgst,&d_p); d_vgst.value += lvgs; } else { vgst = lvgs-von; TimesDeriv(&d_vgst,&d_von,-1.0); PlusDeriv(&d_vgst,&d_vgst,&d_p); d_vgst.value += lvgs; if (lvgs <= von) { /* * cutoff region */ here->MOS2gds = 0.0; /* look at this later */ goto line1050; } } /* * compute some more useful quantities */ sarg3 = sarg*sarg*sarg; CubeDeriv(&d_sarg3,&d_sarg); /* XXX constant per model */ sbiarg = sqrt(here->MOS2tBulkPot); /*const*/ gammad = gamasd; EqualDeriv(&d_gammad,&d_gamasd); body = barg*barg*barg-sarg3; TimesDeriv(&d_body,&d_sarg3,-1.0); CubeDeriv(&d_dummy,&d_barg); PlusDeriv(&d_body,&d_body,&d_dummy); if (model->MOS2fastSurfaceStateDensity == 0.0) goto line400; if (OxideCap == 0.0) goto line410; /* * evaluate effective mobility and its derivatives */ line400: if (OxideCap <= 0.0) goto line410; udenom = vgst; EqualDeriv(&d_udenom,&d_vgst); tmp = model->MOS2critField * 100 /* cm/m */ * EPSSIL/ model->MOS2oxideCapFactor; if (udenom <= tmp) goto line410; ufact = exp(model->MOS2critFieldExp*log(tmp/udenom)); /* dummy = tmp/udenom */ InvDeriv(&d_dummy,&d_udenom); TimesDeriv(&d_dummy,&d_dummy,tmp); PowDeriv(&d_ufact,&d_dummy,model->MOS2critFieldExp); ueff = model->MOS2surfaceMobility * 1e-4 /*(m**2/cm**2) */ *ufact; TimesDeriv(&d_ueff,&d_ufact,model->MOS2surfaceMobility * 1e-4); goto line500; line410: ufact = 0.0; EqualDeriv(&d_ufact,&d_zero); ueff = model->MOS2surfaceMobility * 1e-4 /*(m**2/cm**2) */ ; EqualDeriv(&d_ueff,&d_zero); d_ueff.value = ueff; /* * evaluate saturation voltage and its derivatives according to * grove-frohman equation */ line500: vgsx = lvgs; EqualDeriv(&d_vgsx,&d_p); d_vgsx.value = lvgs; gammad = gamasd/eta; /* eta is a constant */ TimesDeriv(&d_gammad,&d_gamasd,1/eta); if (model->MOS2fastSurfaceStateDensity != 0 && OxideCap != 0) { vgsx = MAX(lvgs,von); /* mistake! fixed Dec 8 '89 if (vgsx < von) { } */ if (lvgs > von) { EqualDeriv(&d_vgsx,&d_p);d_vgsx.value = lvgs; } else { EqualDeriv(&d_vgsx,&d_von); } } if (gammad > 0) { gammd2 = gammad*gammad; MultDeriv(&d_gammd2,&d_gammad,&d_gammad); argv = (vgsx-vbin)/eta+phiMinVbs; TimesDeriv(&d_argv,&d_vbin,-1.0); PlusDeriv(&d_argv,&d_vgsx,&d_vgsx); TimesDeriv(&d_argv,&d_argv,1/eta); PlusDeriv(&d_argv,&d_argv,&d_phiMinVbs); if (argv <= 0.0) { vdsat = 0.0; EqualDeriv(&d_vdsat,&d_zero); } else { arg = sqrt(1.0+4.0*argv/gammd2); DivDeriv(&d_arg,&d_argv,&d_gammd2); TimesDeriv(&d_arg,&d_arg,4.0);d_arg.value += 1.0; SqrtDeriv(&d_arg,&d_arg); #if 0 dumarg= sqrt(gammd2*gammd2 +4*argv*gammd2); TimesDeriv(&d_dumarg,&d_argv,4.0); PlusDeriv(&d_dumarg,&d_dumarg,&d_gammd2); MultDeriv(&d_dumarg,&d_dumarg,&d_gammd2); SqrtDeriv(&d_dumarg,&d_dumarg); vdsat = (vgsx-vbin)/eta+gammd2*(1.0-arg)/2.0; /* distortion vdsat=(vgsx-vbin)/eta + (gammd2 - dumarg)/2.0 = argv - phiMinVbs + (gammd2 - dumarg)/2 */ #endif TimesDeriv(&d_dummy,&d_dumarg,-1.0); PlusDeriv(&d_dummy,&d_dummy,&d_gammd2); TimesDeriv(&d_dummy,&d_dummy,0.5); TimesDeriv(&d_vdsat,&d_phiMinVbs,-1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_argv); PlusDeriv(&d_vdsat,&d_dummy,&d_vdsat); vdsat = MAX(vdsat,0.0); if (vdsat < 0.0) { EqualDeriv(&d_vdsat,&d_zero); } } } else { vdsat = (vgsx-vbin)/eta; TimesDeriv(&d_vdsat,&d_vbin,-1.0); PlusDeriv(&d_vdsat,&d_vgsx,&d_vdsat); TimesDeriv(&d_vdsat,&d_vdsat,1/eta); vdsat = MAX(vdsat,0.0); if (vdsat < 0.0) { EqualDeriv(&d_vdsat,&d_zero); } } if (model->MOS2maxDriftVel > 0) { /* * evaluate saturation voltage and its derivatives * according to baum's theory of scattering velocity * saturation */ gammd2 = gammad*gammad; MultDeriv(&d_gammd2,&d_gammad,&d_gammad); v1 = (vgsx-vbin)/eta+phiMinVbs; TimesDeriv(&d_v1,&d_vbin,-1.0); #if 0 /* mistake ! (fixed Dec 7 '89) thanks to Jean Hsu */ PlusDeriv(&d_v1,&d_vgsx,&d_vgsx); #endif PlusDeriv(&d_v1,&d_v1,&d_vgsx); TimesDeriv(&d_v1,&d_v1,1/eta); PlusDeriv(&d_v1,&d_v1,&d_phiMinVbs); v2 = phiMinVbs; EqualDeriv(&d_v2,&d_phiMinVbs); xv = model->MOS2maxDriftVel*EffectiveLength/ueff; InvDeriv(&d_xv,&d_ueff); TimesDeriv(&d_xv,&d_xv,model->MOS2maxDriftVel*EffectiveLength); a1 = gammad/0.75; TimesDeriv(&d_a1,&d_gammad,4.0/3.0); /* dummy1 = a1 */ b1 = -2.0*(v1+xv); PlusDeriv(&d_b1,&d_v1,&d_xv); TimesDeriv(&d_b1,&d_b1,-2.0); /* dummy2 = b1 */ c1 = -2.0*gammad*xv; MultDeriv(&d_c1,&d_gammad,&d_xv); TimesDeriv(&d_c1,&d_c1,-2.0); /* dummy3 = c1 */ d1 = 2.0*v1*(v2+xv)-v2*v2-4.0/3.0*gammad*sarg3; MultDeriv(&d_d1,&d_gammad,&d_sarg3); TimesDeriv(&d_d1,&d_d1,4.0/3.0); MultDeriv(&d_dummy,&d_v2,&d_v2); PlusDeriv(&d_d1,&d_d1,&d_dummy); TimesDeriv(&d_d1,&d_d1,-1.0); PlusDeriv(&d_dummy,&d_v2,&d_xv); MultDeriv(&d_dummy,&d_dummy,&d_v1); TimesDeriv(&d_dummy,&d_dummy,2.0); PlusDeriv(&d_d1,&d_d1,&d_dummy); a = -b1; TimesDeriv(&d_a,&d_b1,-1.0); b = a1*c1-4.0*d1; TimesDeriv(&d_b,&d_d1,-4.0); MultDeriv(&d_dummy,&d_a1,&d_c1); /* mistake! - fixed Dec 8 '89 PlusDeriv(&d_d1,&d_d1,&d_dummy); */ PlusDeriv(&d_b,&d_b,&d_dummy); c = -d1*(a1*a1-4.0*b1)-c1*c1; TimesDeriv(&d_dummy,&d_b1,-4.0); MultDeriv(&d_c,&d_a1,&d_a1); PlusDeriv(&d_dummy,&d_dummy,&d_c); MultDeriv(&d_c,&d_dummy,&d_d1); MultDeriv(&d_dummy,&d_c1,&d_c1); PlusDeriv(&d_c,&d_c,&d_dummy); TimesDeriv(&d_c,&d_c,-1.0); r = -a*a/3.0+b; MultDeriv(&d_arr,&d_a,&d_a); TimesDeriv(&d_arr,&d_arr,-1.0/3.0); PlusDeriv(&d_arr,&d_arr,&d_b); s = 2.0*a*a*a/27.0-a*b/3.0+c; CubeDeriv(&d_s,&d_a); TimesDeriv(&d_s,&d_s,2.0/27.0); PlusDeriv(&d_s,&d_s,&d_c); MultDeriv(&d_dummy,&d_a,&d_b); TimesDeriv(&d_dummy,&d_dummy,-1.0/3.0); PlusDeriv(&d_s,&d_s,&d_dummy); r3 = r*r*r; CubeDeriv(&d_r3,&d_arr); s2 = s*s; MultDeriv(&d_s2,&d_s,&d_s); p = s2/4.0+r3/27.0; TimesDeriv(&d_dummy,&d_r3,1.0/27.0); TimesDeriv(&d_pee,&d_s2,0.25); PlusDeriv(&d_pee,&d_pee,&d_dummy); p0 = fabs(p); if (p < 0.0) /* mistake! fixed Dec 8 '89 TimesDeriv(&d_pee,&d_pee, -1.0); */ TimesDeriv(&d_p0,&d_pee, -1.0); p2 = sqrt(p0); SqrtDeriv(&d_p2,&d_p0); if (p < 0) { ro = sqrt(s2/4.0+p0); ro = log(ro)/3.0; ro = exp(ro); /* the above is eqvt. to ro = (s2/4.0 + p0)^1/6; */ TimesDeriv(&d_ro,&d_s2,0.25); PlusDeriv(&d_ro,&d_ro,&d_p0); PowDeriv(&d_ro,&d_ro,1.0/6.0); fi = atan(-2.0*p2/s); DivDeriv(&d_fi,&d_p2,&d_s); TimesDeriv(&d_fi,&d_fi,-2.0); AtanDeriv(&d_fi,&d_fi); y3 = 2.0*ro*cos(fi/3.0)-a/3.0; TimesDeriv(&d_dummy,&d_fi,1.0/3.0); CosDeriv(&d_dummy,&d_dummy); MultDeriv(&d_y3,&d_ro,&d_dummy); TimesDeriv(&d_y3,&d_y3,2.0); /* mistake! fixed Dec 8 '89 TimesDeriv(&d_dummy,&d_a,-3.0); */ TimesDeriv(&d_dummy,&d_a,-1/3.0); PlusDeriv(&d_y3,&d_y3,&d_dummy); } else { p3 = (-s/2.0+p2); TimesDeriv(&d_p3,&d_s,-0.5); PlusDeriv(&d_p3,&d_p3,&d_p2); p3 = exp(log(fabs(p3))/3.0); /* eqvt. to (fabs(p3)) ^ 1/3 */ if (p3 < 0.0) TimesDeriv(&d_p3,&d_p3,-1.0); PowDeriv(&d_p3,&d_p3,1.0/3.0); p4 = (-s/2.0-p2); TimesDeriv(&d_p4,&d_s,0.5); PlusDeriv(&d_p4,&d_p4,&d_p2); if (p4 < 0.0) TimesDeriv(&d_p4,&d_p4,-1.0); /* this is fabs(p4) */ p4 = exp(log(fabs(p4))/3.0); PowDeriv(&d_p4,&d_p4,1.0/3.0); y3 = p3+p4-a/3.0; TimesDeriv(&d_y3,&d_a,-1.0/3.0); PlusDeriv(&d_y3,&d_y3,&d_p4); PlusDeriv(&d_y3,&d_y3,&d_p3); } iknt = 0; a3 = sqrt(a1*a1/4.0-b1+y3); MultDeriv(&d_a3,&d_a1,&d_a1); TimesDeriv(&d_a3,&d_a3,0.25); PlusDeriv(&d_a3,&d_a3,&d_y3); TimesDeriv(&d_dummy,&d_b1,-1.0); PlusDeriv(&d_a3,&d_a3,&d_dummy); SqrtDeriv(&d_a3,&d_a3); b3 = sqrt(y3*y3/4.0-d1); MultDeriv(&d_b3,&d_y3,&d_y3); TimesDeriv(&d_b3,&d_b3,0.25); TimesDeriv(&d_dummy,&d_d1,-1.0); PlusDeriv(&d_b3,&d_b3,&d_dummy); SqrtDeriv(&d_b3,&d_b3); for(i = 1;i<=4;i++) { a4[i-1] = a1/2.0+sig1[i-1]*a3; TimesDeriv(&d_a4[i-1],&d_a1,0.5); TimesDeriv(&d_dummy,&d_a3,sig1[i-1]); PlusDeriv(&d_a4[i-1],&d_a4[i-1],&d_dummy); b4[i-1] = y3/2.0+sig2[i-1]*b3; TimesDeriv(&d_b4[i-1],&d_y3,0.5); TimesDeriv(&d_dummy,&d_b3,sig2[i-1]); PlusDeriv(&d_b4[i-1],&d_b4[i-1],&d_dummy); delta4 = a4[i-1]*a4[i-1]/4.0-b4[i-1]; MultDeriv(&d_delta4,&d_a4[i-1],&d_a4[i-1]); TimesDeriv(&d_delta4,&d_delta4,0.25); TimesDeriv(&d_dummy,&d_b4[i-1],-1.0); PlusDeriv(&d_delta4,&d_delta4,&d_dummy); if (delta4 < 0) continue; iknt = iknt+1; tmp = sqrt(delta4); SqrtDeriv(&d_tmp,&d_delta4); x4[iknt-1] = -a4[i-1]/2.0+tmp; TimesDeriv(&d_x4[iknt-1],&d_a4[i-1],-0.5); PlusDeriv(&d_x4[iknt-1],&d_x4[iknt-1],&d_tmp); iknt = iknt+1; x4[iknt-1] = -a4[i-1]/2.0-tmp; TimesDeriv(&d_x4[iknt-1],&d_a4[i-1],-0.5); PlusDeriv(&d_x4[iknt-1],&d_x4[iknt-1],&d_tmp); } jknt = 0; for(j = 1;j<=iknt;j++) { if (x4[j-1] <= 0) continue; /* XXX implement this sanely */ poly4[j-1] = x4[j-1]*x4[j-1]*x4[j-1]*x4[j-1]+a1*x4[j-1]* x4[j-1]*x4[j-1]; CubeDeriv(&d_dummy,&d_x4[j-1]); PlusDeriv(&d_poly4[j-1],&d_x4[j-1],&d_a1); MultDeriv(&d_poly4[j-1],&d_poly4[j-1],&d_dummy); poly4[j-1] = poly4[j-1]+b1*x4[j-1]*x4[j-1]+c1*x4[j-1]+d1; PlusDeriv(&d_poly4[j-1],&d_poly4[j-1],&d_d1); MultDeriv(&d_dummy,&d_b1,&d_x4[j-1]); PlusDeriv(&d_dummy,&d_dummy,&d_c1); MultDeriv(&d_dummy,&d_dummy,&d_x4[j-1]); PlusDeriv(&d_poly4[j-1],&d_poly4[j-1],&d_dummy); if (fabs(poly4[j-1]) > 1.0e-6) continue; jknt = jknt+1; if (jknt <= 1) { xvalid = x4[j-1]; EqualDeriv(&d_xvalid,&d_x4[j-1]); } if (x4[j-1] > xvalid) continue; xvalid = x4[j-1]; EqualDeriv(&d_xvalid,&d_x4[j-1]); } if (jknt > 0) { vdsat = xvalid*xvalid-phiMinVbs; MultDeriv(&d_vdsat,&d_xvalid,&d_xvalid); TimesDeriv(&d_dummy,&d_phiMinVbs,-1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_dummy); } } /* * evaluate effective channel length and its derivatives */ if (lvds != 0.0) { gammad = gamasd; EqualDeriv(&d_gammad,&d_gamasd); if ((lvbs-vdsat) <= 0) { bsarg = sqrt(vdsat+phiMinVbs); PlusDeriv(&d_bsarg,&d_vdsat,&d_phiMinVbs); SqrtDeriv(&d_bsarg,&d_bsarg); } else { bsarg = sphi/(1.0+0.5*(lvbs-vdsat)/here->MOS2tPhi); TimesDeriv(&d_bsarg,&d_vdsat,-1.0); d_bsarg.value += lvbs; d_bsarg.d1_r += 1.0; TimesDeriv(&d_bsarg,&d_bsarg,0.5/here->MOS2tPhi); d_bsarg.value += 1.0; InvDeriv(&d_bsarg,&d_bsarg); TimesDeriv(&d_bsarg,&d_bsarg,sphi); } bodys = bsarg*bsarg*bsarg-sarg3; CubeDeriv(&d_bodys,&d_bsarg); TimesDeriv(&d_dummy,&d_sarg3,-1.0); PlusDeriv(&d_bodys,&d_bodys,&d_dummy); if (model->MOS2maxDriftVel <= 0) { if (model->MOS2substrateDoping == 0.0) goto line610; if (xlamda > 0.0) goto line610; argv = (lvds-vdsat)/4.0; TimesDeriv(&d_argv,&d_vdsat,-1.0); d_argv.value += lvds; d_argv.d1_r += 1.0; TimesDeriv(&d_argv,&d_argv,0.25); sargv = sqrt(1.0+argv*argv); MultDeriv(&d_sargv,&d_argv,&d_argv); d_sargv.value += 1.0; SqrtDeriv(&d_sargv,&d_sargv); arg = sqrt(argv+sargv); PlusDeriv(&d_arg,&d_sargv,&d_argv); SqrtDeriv(&d_arg,&d_arg); xlfact = model->MOS2xd/(EffectiveLength*lvds); EqualDeriv(&d_xlfact,&d_r); d_xlfact.value = lvds; InvDeriv(&d_xlfact,&d_xlfact); TimesDeriv(&d_xlfact,&d_xlfact,model->MOS2xd/EffectiveLength); xlamda = xlfact*arg; MultDeriv(&d_xlamda,&d_xlfact,&d_arg); } else { argv = (vgsx-vbin)/eta-vdsat; TimesDeriv(&d_argv,&d_vbin,-1.0); PlusDeriv(&d_argv,&d_argv,&d_vgsx); TimesDeriv(&d_argv,&d_argv,1/eta); TimesDeriv(&d_dummy,&d_vdsat,-1.0); PlusDeriv(&d_argv,&d_argv,&d_dummy); xdv = model->MOS2xd/sqrt(model->MOS2channelCharge); /*const*/ xlv = model->MOS2maxDriftVel*xdv/(2.0*ueff); InvDeriv(&d_xlv,&d_ueff); TimesDeriv(&d_xlv,&d_xlv,model->MOS2maxDriftVel*xdv*0.5); /* retained for historical interest vqchan = argv-gammad*bsarg; MultDeriv(&d_vqchan,&d_gammad,&d_bsarg); TimesDeriv(&d_vqchan,&d_vqchan,-1); PlusDeriv(&d_vqchan,&d_vqchan,&d_argv); */ /* gammad = gamasd vl = model->MOS2maxDriftVel*EffectiveLength;const*/ if (model->MOS2substrateDoping == 0.0) goto line610; if (xlamda > 0.0) goto line610; argv = lvds-vdsat; TimesDeriv(&d_argv,&d_vdsat,-1.0); d_argv.value += lvds; d_argv.d1_r += 1.0; if (argv < 0.0) EqualDeriv(&d_argv,&d_zero); argv = MAX(argv,0.0); xls = sqrt(xlv*xlv+argv); MultDeriv(&d_xls,&d_xlv,&d_xlv); PlusDeriv(&d_xls,&d_xls,&d_argv); SqrtDeriv(&d_xls,&d_xls); /* dummy9 = xlv*xlv + argv */ xlfact = xdv/(EffectiveLength*lvds); EqualDeriv(&d_xlfact,&d_r); d_xlfact.value += lvds; InvDeriv(&d_xlfact,&d_xlfact); TimesDeriv(&d_xlfact,&d_xlfact,xdv/EffectiveLength); xlamda = xlfact*(xls-xlv); TimesDeriv(&d_xlamda,&d_xlv,-1.0); PlusDeriv(&d_xlamda,&d_xlamda,&d_xls); MultDeriv(&d_xlamda,&d_xlamda,&d_xlfact); } } line610: /* * limit channel shortening at punch-through */ xwb = model->MOS2xd*sbiarg; /*const*/ xld = EffectiveLength-xwb; /*const*/ clfact = 1.0-xlamda*lvds; EqualDeriv(&d_clfact,&d_r); d_clfact.value = lvds; d_clfact.d1_r = -1; MultDeriv(&d_clfact,&d_clfact,&d_xlamda); d_clfact.value += 1.0; xleff = EffectiveLength*clfact; TimesDeriv(&d_xleff,&d_clfact,EffectiveLength); deltal = xlamda*lvds*EffectiveLength; EqualDeriv(&d_delta1,&d_r); d_delta1.value = EffectiveLength*lvds; d_delta1.d1_r = EffectiveLength; MultDeriv(&d_delta1,&d_delta1,&d_xlamda); if (model->MOS2substrateDoping == 0.0) xwb = 0.25e-6; if (xleff < xwb) { xleff = xwb/(1.0+(deltal-xld)/xwb); EqualDeriv(&d_xleff,&d_delta1);d_xleff.value -= xld; TimesDeriv(&d_xleff,&d_xleff,1/xwb);d_xleff.value += 1.0; InvDeriv(&d_xleff,&d_xleff); TimesDeriv(&d_xleff,&d_xleff,xwb); clfact = xleff/EffectiveLength; TimesDeriv(&d_clfact,&d_xleff,1/EffectiveLength); /* dfact = xleff*xleff/(xwb*xwb); */ } /* * evaluate effective beta (effective kp) */ beta1 = Beta*ufact/clfact; DivDeriv(&d_beta1,&d_ufact,&d_clfact); TimesDeriv(&d_beta1,&d_beta1,Beta); /* * test for mode of operation and branch appropriately */ gammad = gamasd; EqualDeriv(&d_gammad,&d_gamasd); if (lvds <= 1.0e-10) { if (lvgs <= von) { if ((model->MOS2fastSurfaceStateDensity == 0.0) || (OxideCap == 0.0)) { here->MOS2gds = 0.0; d_cdrain.d1_q = 0.0; d_cdrain.d2_q2 = 0.0; d_cdrain.d3_q3 = 0.0; goto line1050; } here->MOS2gds = beta1*(von-vbin-gammad*sarg)*exp(argg* (lvgs-von)); MultDeriv(&d_dummy,&d_gammad,&d_sarg); PlusDeriv(&d_dummy,&d_dummy,&d_vbin); TimesDeriv(&d_dummy,&d_dummy,-1.0); PlusDeriv(&d_dummy,&d_dummy,&d_von); MultDeriv(&d_mos2gds,&d_beta1,&d_dummy); TimesDeriv(&d_dummy,&d_von,-1.0); PlusDeriv(&d_dummy,&d_dummy,&d_p); d_dummy.value += lvgs; MultDeriv(&d_dummy,&d_dummy,&d_argg); ExpDeriv(&d_dummy,&d_dummy); MultDeriv(&d_mos2gds,&d_mos2gds,&d_dummy); d_cdrain.d1_r = d_mos2gds.value; d_cdrain.d2_r2 = d_mos2gds.d1_r; d_cdrain.d3_r3 = d_mos2gds.d2_r2; /* dummy1 = von - vbin - gamasd*sarg */ goto line1050; } here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg); MultDeriv(&d_mos2gds,&d_gammad,&d_sarg); PlusDeriv(&d_mos2gds,&d_mos2gds,&d_vbin); TimesDeriv(&d_mos2gds,&d_mos2gds,-1.0); MultDeriv(&d_mos2gds,&d_mos2gds,&d_beta1); d_cdrain.d1_r = d_mos2gds.value; d_cdrain.d2_r2 = d_mos2gds.d1_r; d_cdrain.d3_r3 = d_mos2gds.d2_r2; goto line1050; } if (lvgs > von) goto line900; /* * subthreshold region */ if (vdsat <= 0) { here->MOS2gds = 0.0; d_cdrain.d1_r = 0.0; d_cdrain.d2_r2 = 0.0; d_cdrain.d3_r3 = 0.0; /* if (lvgs > vth) goto doneval; */ goto line1050; } vdson = MIN(vdsat,lvds); if (vdsat <= lvds) { EqualDeriv(&d_vdson,&d_vdsat); } else { EqualDeriv(&d_vdson,&d_r); d_vdson.value = lvds; } if (lvds > vdsat) { barg = bsarg; EqualDeriv(&d_barg,&d_bsarg); body = bodys; EqualDeriv(&d_body,&d_bodys); } cdson = beta1*((von-vbin-eta*vdson*0.5)*vdson-gammad*body/1.5); MultDeriv(&d_dummy,&d_gammad,&d_body); TimesDeriv(&d_cdson,&d_dummy,-1/1.5); TimesDeriv(&d_dummy,&d_vdson,0.5*eta); PlusDeriv(&d_dummy,&d_dummy,&d_vbin); TimesDeriv(&d_dummy,&d_dummy,-1.0); PlusDeriv(&d_dummy,&d_dummy,&d_von); MultDeriv(&d_dummy,&d_dummy,&d_vdson); PlusDeriv(&d_dummy,&d_dummy,&d_cdson); MultDeriv(&d_cdson,&d_dummy,&d_beta1); expg = exp(argg*(lvgs-von)); TimesDeriv(&d_expg,&d_von,-1.0); d_expg.value += lvgs; d_expg.d1_p += 1.0; MultDeriv(&d_expg,&d_expg,&d_argg); ExpDeriv(&d_expg,&d_expg); cdrain = cdson*expg; MultDeriv(&d_cdrain,&d_cdson,&d_expg); /* gmw = cdrain*argg; here->MOS2gm = gmw; tmp = gmw*(lvgs-von)/xn; */ goto doneval; line900: if (lvds <= vdsat) { /* * linear region */ cdrain = beta1*((lvgs-vbin-eta*lvds/2.0)*lvds-gammad*body/1.5); MultDeriv(&d_dummy,&d_gammad,&d_body); TimesDeriv(&d_dummy,&d_dummy,-1/1.5); EqualDeriv(&d_cdrain,&d_r); d_cdrain.value = eta*lvds*0.5; d_cdrain.d1_r = 0.5*eta; PlusDeriv(&d_cdrain,&d_cdrain,&d_vbin); TimesDeriv(&d_cdrain,&d_cdrain,-1.0); d_cdrain.value += lvgs; d_cdrain.d1_p += 1.0; EqualDeriv(&d_dummy,&d_r); d_dummy.value = lvds; MultDeriv(&d_cdrain,&d_cdrain,&d_dummy); MultDeriv(&d_dummy,&d_gammad,&d_body); TimesDeriv(&d_dummy,&d_dummy,-1/1.5); PlusDeriv(&d_cdrain,&d_cdrain,&d_dummy); MultDeriv(&d_cdrain,&d_cdrain,&d_beta1); } else { /* * saturation region */ cdrain = beta1*((lvgs-vbin-eta* vdsat/2.0)*vdsat-gammad*bodys/1.5); TimesDeriv(&d_cdrain,&d_vdsat,0.5*eta); PlusDeriv(&d_cdrain,&d_cdrain,&d_vbin); TimesDeriv(&d_cdrain,&d_cdrain,-1.0); d_cdrain.value += lvgs; d_cdrain.d1_p += 1.0; MultDeriv(&d_cdrain,&d_cdrain,&d_vdsat); MultDeriv(&d_dummy,&d_gammad,&d_bodys); TimesDeriv(&d_dummy,&d_dummy,-1/1.5); PlusDeriv(&d_cdrain,&d_cdrain,&d_dummy); MultDeriv(&d_cdrain,&d_cdrain,&d_beta1); } /* * compute charges for "on" region */ goto doneval; /* * finish special cases */ line1050: cdrain = 0.0; here->MOS2gm = 0.0; here->MOS2gmbs = 0.0; d_cdrain.value = 0.0; d_cdrain.d1_p = 0.0; d_cdrain.d1_q = 0.0; d_cdrain.d2_p2 = 0.0; d_cdrain.d2_q2 = 0.0; d_cdrain.d2_pq = 0.0; d_cdrain.d2_qr = 0.0; d_cdrain.d2_pr = 0.0; d_cdrain.d3_p3 = 0.0; d_cdrain.d3_q3 = 0.0; d_cdrain.d3_p2r = 0.0; d_cdrain.d3_p2q = 0.0; d_cdrain.d3_q2r = 0.0; d_cdrain.d3_pq2 = 0.0; d_cdrain.d3_pr2 = 0.0; d_cdrain.d3_qr2 = 0.0; d_cdrain.d3_pqr = 0.0; } /* * finished */ /*================HERE=================*/ doneval: /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ if (vbs < here->MOS2tDepCap){ arg=1-vbs/here->MOS2tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS2bulkJctBotGradingCoeff == model->MOS2bulkJctSideGradingCoeff) { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } if(model->MOS2bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS2bulkJctSideGradingCoeff* log(arg)); } } lcapbs=here->MOS2Cbs*sarg+ here->MOS2Cbssw*sargsw; lcapbs2 = model->MOS2type*0.5/here->MOS2tBulkPot*( here->MOS2Cbs*model->MOS2bulkJctBotGradingCoeff* sarg/arg + here->MOS2Cbssw* model->MOS2bulkJctSideGradingCoeff*sargsw/arg); lcapbs3 = here->MOS2Cbs*sarg* model->MOS2bulkJctBotGradingCoeff* (model->MOS2bulkJctBotGradingCoeff+1); lcapbs3 += here->MOS2Cbssw*sargsw* model->MOS2bulkJctSideGradingCoeff* (model->MOS2bulkJctSideGradingCoeff+1); lcapbs3 = lcapbs3/(6*here->MOS2tBulkPot* here->MOS2tBulkPot*arg*arg); } else { /* *(ckt->CKTstate0 + here->MOS2qbs)= here->MOS2f4s + vbs*(here->MOS2f2s+vbs*(here->MOS2f3s/2));*/ lcapbs=here->MOS2f2s+here->MOS2f3s*vbs; lcapbs2 = 0.5*here->MOS2f3s; lcapbs3 = 0; } if (vbd < here->MOS2tDepCap) { arg=1-vbd/here->MOS2tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS2bulkJctBotGradingCoeff == .5 && model->MOS2bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } if(model->MOS2bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS2bulkJctSideGradingCoeff* log(arg)); } } lcapbd=here->MOS2Cbd*sarg+ here->MOS2Cbdsw*sargsw; lcapbd2 = model->MOS2type*0.5/here->MOS2tBulkPot*( here->MOS2Cbd*model->MOS2bulkJctBotGradingCoeff* sarg/arg + here->MOS2Cbdsw* model->MOS2bulkJctSideGradingCoeff*sargsw/arg); lcapbd3 = here->MOS2Cbd*sarg* model->MOS2bulkJctBotGradingCoeff* (model->MOS2bulkJctBotGradingCoeff+1); lcapbd3 += here->MOS2Cbdsw*sargsw* model->MOS2bulkJctSideGradingCoeff* (model->MOS2bulkJctSideGradingCoeff+1); lcapbd3 = lcapbd3/(6*here->MOS2tBulkPot* here->MOS2tBulkPot*arg*arg); } else { lcapbd=here->MOS2f2d + vbd * here->MOS2f3d; lcapbd2=0.5*here->MOS2f3d; lcapbd3=0; } /* * meyer's capacitor model */ /* * the meyer capacitance equations are in DEVqmeyer * these expressions are derived from those equations. * these expressions are incorrect; they assume just one * controlling variable for each charge storage element * while actually there are several; the MOS2 small * signal ac linear model is also wrong because it * ignores controlled capacitive elements. these can be * corrected (as can the linear ss ac model) if the * expressions for the charge are available */ { double phi; double cox; double vddif; double vddif1; double vddif2; /* von, vgst and vdsat have already been adjusted for possible source-drain interchange */ phi = here->MOS2tPhi; cox = OxideCap; if (vgst <= -phi) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= -phi/2) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= 0) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs3=lcapgd2=lcapgd3=0; lcapgs2 = cox/(3*phi); } else { /* the MOS2modes are around because vds has not been adjusted */ if (vdsat <= here->MOS2mode*vds) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else { vddif = 2.0*vdsat-here->MOS2mode*vds; vddif1 = vdsat-here->MOS2mode*vds/*-1.0e-12*/; vddif2 = vddif*vddif; lcapgd2 = -vdsat*here->MOS2mode*vds*cox/(3*vddif*vddif2); lcapgd3 = - here->MOS2mode*vds*cox*(vddif - 6*vdsat)/(9*vddif2*vddif2); lcapgs2 = -vddif1*here->MOS2mode*vds*cox/(3*vddif*vddif2); lcapgs3 = - here->MOS2mode*vds*cox*(vddif - 6*vddif1)/(9*vddif2*vddif2); lcapgb2=lcapgb3=0; } } } /* the b-s and b-d diodes need no processing ... */ here->capbs2 = lcapbs2; here->capbs3 = lcapbs3; here->capbd2 = lcapbd2; here->capbd3 = lcapbd3; here->gbs2 = lgbs2; here->gbs3 = lgbs3; here->gbd2 = lgbd2; here->gbd3 = lgbd3; here->capgb2 = model->MOS2type*lcapgb2; here->capgb3 = lcapgb3; /* * process to get Taylor coefficients, taking into * account type and mode. */ gm2 = d_cdrain.d2_p2; gb2 = d_cdrain.d2_q2; gds2 = d_cdrain.d2_r2; gmb = d_cdrain.d2_pq; gbds = d_cdrain.d2_qr; gmds = d_cdrain.d2_pr; gm3 = d_cdrain.d3_p3; gb3 = d_cdrain.d3_q3; gds3 = d_cdrain.d3_r3; gm2ds = d_cdrain.d3_p2r; gm2b = d_cdrain.d3_p2q; gb2ds = d_cdrain.d3_q2r; gmb2 = d_cdrain.d3_pq2; gmds2 = d_cdrain.d3_pr2; gbds2 = d_cdrain.d3_qr2; gmbds = d_cdrain.d3_pqr; if (here->MOS2mode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x2 = gm2; here->cdr_y2 = gb2; here->cdr_z2 = gds2; here->cdr_xy = gmb; here->cdr_yz = gbds; here->cdr_xz = gmds; here->cdr_x3 = gm3; here->cdr_y3 = gb3; here->cdr_z3 = gds3; here->cdr_x2z = gm2ds; here->cdr_x2y = gm2b; here->cdr_y2z = gb2ds; here->cdr_xy2 = gmb2; here->cdr_xz2 = gmds2; here->cdr_yz2 = gbds2; here->cdr_xyz = gmbds; /* the gate caps have been divided and made into Taylor coeffs., but not adjusted for type */ here->capgs2 = model->MOS2type*lcapgs2; here->capgs3 = lcapgs3; here->capgd2 = model->MOS2type*lcapgd2; here->capgd3 = lcapgd3; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x2 = -gm2; here->cdr_y2 = -gb2; here->cdr_z2 = -(gm2 + gb2 + gds2 + 2*(gmb + gmds + gbds)); here->cdr_xy = -gmb; here->cdr_yz = gmb + gb2 + gbds; here->cdr_xz = gm2 + gmb + gmds; here->cdr_x3 = -gm3; here->cdr_y3 = -gb3; here->cdr_z3 = gm3 + gb3 + gds3 + 3*(gm2b + gm2ds + gmb2 + gb2ds + gmds2 + gbds2) + 6*gmbds ; here->cdr_x2z = gm3 + gm2b + gm2ds; here->cdr_x2y = -gm2b; here->cdr_y2z = gmb2 + gb3 + gb2ds; here->cdr_xy2 = -gmb2; here->cdr_xz2 = -(gm3 + 2*(gm2b + gm2ds + gmbds) + gmb2 + gmds2); here->cdr_yz2 = -(gb3 + 2*(gmb2 + gb2ds + gmbds) + gm2b + gbds2); here->cdr_xyz = gm2b + gmb2 + gmbds; here->capgs2 = model->MOS2type*lcapgd2; here->capgs3 = lcapgd3; here->capgd2 = model->MOS2type*lcapgs2; here->capgd3 = lcapgs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->MOS2type*here->cdr_x2; here->cdr_y2 = 0.5*model->MOS2type*here->cdr_y2; here->cdr_z2 = 0.5*model->MOS2type*here->cdr_z2; here->cdr_xy = model->MOS2type*here->cdr_xy; here->cdr_yz = model->MOS2type*here->cdr_yz; here->cdr_xz = model->MOS2type*here->cdr_xz; here->cdr_x3 = here->cdr_x3/6.; here->cdr_y3 = here->cdr_y3/6.; here->cdr_z3 = here->cdr_z3/6.; here->cdr_x2z = 0.5*here->cdr_x2z; here->cdr_x2y = 0.5*here->cdr_x2y; here->cdr_y2z = 0.5*here->cdr_y2z; here->cdr_xy2 = 0.5*here->cdr_xy2; here->cdr_xz2 = 0.5*here->cdr_xz2; here->cdr_yz2 = 0.5*here->cdr_yz2; } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2init.c0000644000265600020320000000415212264261473021026 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mos2itf.h" #include "mos2ext.h" #include "mos2init.h" SPICEdev MOS2info = { { "Mos2", "Level 2 MOSfet model with Meyer capacitance model", &MOS2nSize, &MOS2nSize, MOS2names, &MOS2pTSize, MOS2pTable, &MOS2mPTSize, MOS2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MOS2param, /* DEVmodParam */ MOS2mParam, /* DEVload */ MOS2load, /* DEVsetup */ MOS2setup, /* DEVunsetup */ MOS2unsetup, /* DEVpzSetup */ MOS2setup, /* DEVtemperature*/ MOS2temp, /* DEVtrunc */ MOS2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MOS2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MOS2destroy, /* DEVmodDelete */ MOS2mDelete, /* DEVdelete */ MOS2delete, /* DEVsetic */ MOS2getic, /* DEVask */ MOS2ask, /* DEVmodAsk */ MOS2mAsk, /* DEVpzLoad */ MOS2pzLoad, /* DEVconvTest */ MOS2convTest, /* DEVsenSetup */ MOS2sSetup, /* DEVsenLoad */ MOS2sLoad, /* DEVsenUpdate */ MOS2sUpdate, /* DEVsenAcLoad */ MOS2sAcLoad, /* DEVsenPrint */ MOS2sPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ MOS2disto, /* DEVnoise */ MOS2noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MOS2iSize, /* DEVmodSize */ &MOS2mSize }; SPICEdev * get_mos2_info(void) { return &MOS2info; } ngspice-26/src/spicelib/devices/mos2/mos2par.c0000644000265600020320000000711712264261473020651 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* ARGSUSED */ int MOS2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; MOS2instance *here = (MOS2instance *)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case MOS2_TEMP: here->MOS2temp = value->rValue+CONSTCtoK; here->MOS2tempGiven = TRUE; break; case MOS2_DTEMP: here->MOS2dtemp = value->rValue; here->MOS2dtempGiven = TRUE; break; case MOS2_M: here->MOS2m = value->rValue; here->MOS2mGiven = TRUE; break; case MOS2_W: here->MOS2w = value->rValue * scale; here->MOS2wGiven = TRUE; break; case MOS2_L: here->MOS2l = value->rValue * scale; here->MOS2lGiven = TRUE; break; case MOS2_AS: here->MOS2sourceArea = value->rValue * scale * scale; here->MOS2sourceAreaGiven = TRUE; break; case MOS2_AD: here->MOS2drainArea = value->rValue * scale * scale; here->MOS2drainAreaGiven = TRUE; break; case MOS2_PS: here->MOS2sourcePerimiter = value->rValue * scale; here->MOS2sourcePerimiterGiven = TRUE; break; case MOS2_PD: here->MOS2drainPerimiter = value->rValue * scale; here->MOS2drainPerimiterGiven = TRUE; break; case MOS2_NRS: here->MOS2sourceSquares = value->rValue; here->MOS2sourceSquaresGiven = TRUE; break; case MOS2_NRD: here->MOS2drainSquares = value->rValue; here->MOS2drainSquaresGiven = TRUE; break; case MOS2_OFF: here->MOS2off = (value->iValue != 0); break; case MOS2_IC_VBS: here->MOS2icVBS = value->rValue; here->MOS2icVBSGiven = TRUE; break; case MOS2_IC_VDS: here->MOS2icVDS = value->rValue; here->MOS2icVDSGiven = TRUE; break; case MOS2_IC_VGS: here->MOS2icVGS = value->rValue; here->MOS2icVGSGiven = TRUE; break; case MOS2_IC: switch(value->v.numValue){ case 3: here->MOS2icVBS = *(value->v.vec.rVec+2); here->MOS2icVBSGiven = TRUE; case 2: here->MOS2icVGS = *(value->v.vec.rVec+1); here->MOS2icVGSGiven = TRUE; case 1: here->MOS2icVDS = *(value->v.vec.rVec); here->MOS2icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MOS2_L_SENS: if(value->iValue) { here->MOS2senParmNo = 1; here->MOS2sens_l = 1; } break; case MOS2_W_SENS: if(value->iValue) { here->MOS2senParmNo = 1; here->MOS2sens_w = 1; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2dest.c0000644000265600020320000000152112264261473021017 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos2defs.h" #include "ngspice/suffix.h" void MOS2destroy(GENmodel **inModel) { MOS2model **model = (MOS2model **)inModel; MOS2instance *here; MOS2instance *prev = NULL; MOS2model *mod = *model; MOS2model *oldmod = NULL; for( ; mod ; mod = mod->MOS2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MOS2instances ; here ; here = here->MOS2nextInstance) { if(prev){ if(prev->MOS2sens) FREE(prev->MOS2sens); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos2/mos2set.c0000644000265600020320000002121512264261473020655 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the MOS2 device structure with those pointers needed later * for fast matrix loading */ { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int error; CKTnode *tmp; /* loop through all the MOS2 device models */ for( ; model != NULL; model = model->MOS2nextModel ) { if(!model->MOS2typeGiven) { model->MOS2type = NMOS; } if(!model->MOS2latDiffGiven) { model->MOS2latDiff = 0; } if(!model->MOS2jctSatCurDensityGiven) { model->MOS2jctSatCurDensity = 0; } if(!model->MOS2jctSatCurGiven) { model->MOS2jctSatCur = 1e-14; } if(!model->MOS2drainResistanceGiven) { model->MOS2drainResistance = 0; } if(!model->MOS2sourceResistanceGiven) { model->MOS2sourceResistance = 0; } if(!model->MOS2sheetResistanceGiven) { model->MOS2sheetResistance = 0; } if(!model->MOS2gateSourceOverlapCapFactorGiven) { model->MOS2gateSourceOverlapCapFactor = 0; } if(!model->MOS2gateDrainOverlapCapFactorGiven) { model->MOS2gateDrainOverlapCapFactor = 0; } if(!model->MOS2gateBulkOverlapCapFactorGiven) { model->MOS2gateBulkOverlapCapFactor = 0; } if(!model->MOS2vt0Given) { model->MOS2vt0 = 0; } if(!model->MOS2bulkJctPotentialGiven) { model->MOS2bulkJctPotential = .8; } if(!model->MOS2capBDGiven) { model->MOS2capBD = 0; } if(!model->MOS2capBSGiven) { model->MOS2capBS = 0; } if(!model->MOS2sideWallCapFactorGiven) { model->MOS2sideWallCapFactor = 0; } if(!model->MOS2bulkJctBotGradingCoeffGiven) { model->MOS2bulkJctBotGradingCoeff = .5; } if(!model->MOS2bulkJctSideGradingCoeffGiven) { model->MOS2bulkJctSideGradingCoeff = .33; } if(!model->MOS2fwdCapDepCoeffGiven) { model->MOS2fwdCapDepCoeff = .5; } if(!model->MOS2phiGiven) { model->MOS2phi = .6; } if(!model->MOS2lambdaGiven) { model->MOS2lambda = 0; } if(!model->MOS2gammaGiven) { model->MOS2gamma = 0; } if(!model->MOS2narrowFactorGiven) { model->MOS2narrowFactor = 0; } if(!model->MOS2critFieldExpGiven) { model->MOS2critFieldExp = 0; } if(!model->MOS2critFieldGiven) { model->MOS2critField = 1e4; } if(!model->MOS2maxDriftVelGiven) { model->MOS2maxDriftVel = 0; } if(!model->MOS2junctionDepthGiven) { model->MOS2junctionDepth = 0; } if(!model->MOS2channelChargeGiven) { model->MOS2channelCharge = 1; } if(!model->MOS2fastSurfaceStateDensityGiven) { model->MOS2fastSurfaceStateDensity = 0; } if(!model->MOS2fNcoefGiven) { model->MOS2fNcoef = 0; } if(!model->MOS2fNexpGiven) { model->MOS2fNexp = 1; } /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { CKTnode *tmpNode; IFuid tmpName; /* allocate a chunk of the state vector */ here->MOS2states = *states; *states += MOS2numStates; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 10 * (ckt->CKTsenInfo->SENparms); } if(!here->MOS2drainPerimiterGiven) { here->MOS2drainPerimiter = 0; } if(!here->MOS2icVBSGiven) { here->MOS2icVBS = 0; } if(!here->MOS2icVDSGiven) { here->MOS2icVDS = 0; } if(!here->MOS2icVGSGiven) { here->MOS2icVGS = 0; } if(!here->MOS2sourcePerimiterGiven) { here->MOS2sourcePerimiter = 0; } if(!here->MOS2vdsatGiven) { here->MOS2vdsat = 0; } if (!here->MOS2drainSquaresGiven) { here->MOS2drainSquares=1; } if (!here->MOS2sourceSquaresGiven) { here->MOS2sourceSquares=1; } if ((model->MOS2drainResistance != 0 || (here->MOS2drainSquares != 0 && model->MOS2sheetResistance != 0))) { if (here->MOS2dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS2name,"internal#drain"); if(error) return(error); here->MOS2dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS2dNodePrime = here->MOS2dNode; } if( ( (model->MOS2sourceResistance != 0) || ((here->MOS2sourceSquares != 0) && (model->MOS2sheetResistance != 0)) )) { if (here->MOS2sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS2name,"internal#source"); if(error) return(error); here->MOS2sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS2sNodePrime = here->MOS2sNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MOS2DdPtr, MOS2dNode, MOS2dNode); TSTALLOC(MOS2GgPtr, MOS2gNode, MOS2gNode); TSTALLOC(MOS2SsPtr, MOS2sNode, MOS2sNode); TSTALLOC(MOS2BbPtr, MOS2bNode, MOS2bNode); TSTALLOC(MOS2DPdpPtr, MOS2dNodePrime, MOS2dNodePrime); TSTALLOC(MOS2SPspPtr, MOS2sNodePrime, MOS2sNodePrime); TSTALLOC(MOS2DdpPtr, MOS2dNode, MOS2dNodePrime); TSTALLOC(MOS2GbPtr, MOS2gNode, MOS2bNode); TSTALLOC(MOS2GdpPtr, MOS2gNode, MOS2dNodePrime); TSTALLOC(MOS2GspPtr, MOS2gNode, MOS2sNodePrime); TSTALLOC(MOS2SspPtr, MOS2sNode, MOS2sNodePrime); TSTALLOC(MOS2BdpPtr, MOS2bNode, MOS2dNodePrime); TSTALLOC(MOS2BspPtr, MOS2bNode, MOS2sNodePrime); TSTALLOC(MOS2DPspPtr, MOS2dNodePrime, MOS2sNodePrime); TSTALLOC(MOS2DPdPtr, MOS2dNodePrime, MOS2dNode); TSTALLOC(MOS2BgPtr, MOS2bNode, MOS2gNode); TSTALLOC(MOS2DPgPtr, MOS2dNodePrime, MOS2gNode); TSTALLOC(MOS2SPgPtr, MOS2sNodePrime, MOS2gNode); TSTALLOC(MOS2SPsPtr, MOS2sNodePrime, MOS2sNode); TSTALLOC(MOS2DPbPtr, MOS2dNodePrime, MOS2bNode); TSTALLOC(MOS2SPbPtr, MOS2sNodePrime, MOS2bNode); TSTALLOC(MOS2SPdpPtr, MOS2sNodePrime, MOS2dNodePrime); } } return(OK); } int MOS2unsetup(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model; MOS2instance *here; for (model = (MOS2model *)inModel; model != NULL; model = model->MOS2nextModel) { for (here = model->MOS2instances; here != NULL; here=here->MOS2nextInstance) { if (here->MOS2sNodePrime && here->MOS2sNodePrime != here->MOS2sNode) { CKTdltNNum(ckt, here->MOS2sNodePrime); here->MOS2sNodePrime = 0; } if (here->MOS2dNodePrime && here->MOS2dNodePrime != here->MOS2dNode) { CKTdltNNum(ckt, here->MOS2dNodePrime); here->MOS2dNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/mos2/mos2itf.h0000644000265600020320000000026012264261473020646 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MOS2 #define DEV_MOS2 SPICEdev *get_mos2_info(void); #endif ngspice-26/src/spicelib/devices/mos2/mos2sset.c0000644000265600020320000000261112264261473021037 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2sSetup(SENstruct *info, GENmodel *inModel) /* loop through all the devices and * allocate parameter #s to design parameters */ { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; /* loop through all the models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { if(here->MOS2senParmNo){ if((here->MOS2sens_l)&&(here->MOS2sens_w)){ here->MOS2senParmNo = ++(info->SENparms); ++(info->SENparms);/* MOS has two design parameters */ } else{ here->MOS2senParmNo = ++(info->SENparms); } } here->MOS2senPertFlag = OFF; if((here->MOS2sens = TMALLOC(double, 70)) == NULL) { return(E_NOMEM); } } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2sld.c0000644000265600020320000006420112264261473020646 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2sLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; double SaveState[44]; int save_mode; int i; int iparmno; int error; int flag; double A0; double DELA; double Apert; double DELAinv; double gspr0; double gspr; double gdpr0; double gdpr; double cdpr0; double cspr0; double cd0; double cbd0; double cbs0; double cd; double cbd; double cbs; double DcdprDp; double DcsprDp; double DcbDp; double DcdDp; double DcbsDp; double DcbdDp; double DcdprmDp; double DcsprmDp; double qgs0; double qgd0; double qgb0; double qbd0; double qbd; double qbs0; double qbs; double DqgsDp; double DqgdDp; double DqgbDp; double DqbdDp; double DqbsDp; double Osxpgs; double Osxpgd; double Osxpgb; double Osxpbd; double Osxpbs; double tag0; double tag1; double arg; double sarg; double sargsw; int offset; double EffectiveLength; SENstruct *info; #ifdef SENSDEBUG printf("MOS2senload \n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %d\n",ckt->CKTorder); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } /* loop through all the models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { #ifdef SENSDEBUG printf("senload instance name %s\n",here->MOS2name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS2gNode,here->MOS2dNode,here->MOS2dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS2sNode ,here->MOS2sNodePrime, here->MOS2bNode,here->MOS2senParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++){ *(SaveState + i) = *(ckt->CKTstate0 + here->MOS2states + i); } *(SaveState + 17) = here->MOS2sourceConductance; *(SaveState + 18) = here->MOS2drainConductance; *(SaveState + 19) = here->MOS2cd; *(SaveState + 20) = here->MOS2cbs; *(SaveState + 21) = here->MOS2cbd; *(SaveState + 22) = here->MOS2gmbs; *(SaveState + 23) = here->MOS2gm; *(SaveState + 24) = here->MOS2gds; *(SaveState + 25) = here->MOS2gbd; *(SaveState + 26) = here->MOS2gbs; *(SaveState + 27) = here->MOS2capbd; *(SaveState + 28) = here->MOS2capbs; *(SaveState + 29) = here->MOS2Cbd; *(SaveState + 30) = here->MOS2Cbdsw; *(SaveState + 31) = here->MOS2Cbs; *(SaveState + 32) = here->MOS2Cbssw; *(SaveState + 33) = here->MOS2f2d; *(SaveState + 34) = here->MOS2f3d; *(SaveState + 35) = here->MOS2f4d; *(SaveState + 36) = here->MOS2f2s; *(SaveState + 37) = here->MOS2f3s; *(SaveState + 38) = here->MOS2f4s; *(SaveState + 39) = here->MOS2cgs; *(SaveState + 40) = here->MOS2cgd; *(SaveState + 41) = here->MOS2cgb; *(SaveState + 42) = here->MOS2vdsat; *(SaveState + 43) = here->MOS2von; save_mode = here->MOS2mode; if(here->MOS2senParmNo == 0) goto next1; #ifdef SENSDEBUG printf("without perturbation \n"); printf("gbd =%.5e\n",here->MOS2gbd); printf("satCur =%.5e\n",here->MOS2tSatCur); printf("satCurDens =%.5e\n",here->MOS2tSatCurDens); printf("vbd =%.5e\n",*(ckt->CKTstate0 + here->MOS2vbd)); #endif /* SENSDEBUG */ cdpr0= here->MOS2cd; cspr0= -(here->MOS2cd + here->MOS2cbd + here->MOS2cbs); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ qgs0 = *(ckt->CKTstate1 + here->MOS2qgs); qgd0 = *(ckt->CKTstate1 + here->MOS2qgd); qgb0 = *(ckt->CKTstate1 + here->MOS2qgb); } else{ qgs0 = *(ckt->CKTstate0 + here->MOS2qgs); qgd0 = *(ckt->CKTstate0 + here->MOS2qgd); qgb0 = *(ckt->CKTstate0 + here->MOS2qgb); } here->MOS2senPertFlag = ON; error = MOS2load((GENmodel*)model,ckt); if(error) return(error); cd0 = here->MOS2cd ; cbd0 = here->MOS2cbd ; cbs0 = here->MOS2cbs ; gspr0= here->MOS2sourceConductance ; gdpr0= here->MOS2drainConductance ; qbs0 = *(ckt->CKTstate0 + here->MOS2qbs); qbd0 = *(ckt->CKTstate0 + here->MOS2qbd); for( flag = 0 ; flag <= 1 ; flag++){ if(here->MOS2sens_l == 0) if(flag == 0) goto next2; if(here->MOS2sens_w == 0) if(flag == 1) goto next2; if(flag == 0){ A0 = here->MOS2l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS2l = Apert; } else{ A0 = here->MOS2w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS2w = Apert; here->MOS2drainArea *= (1 + info->SENpertfac); here->MOS2sourceArea *= (1 + info->SENpertfac); here->MOS2Cbd *= (1 + info->SENpertfac); here->MOS2Cbs *= (1 + info->SENpertfac); if(here->MOS2drainPerimiter){ here->MOS2Cbdsw += here->MOS2Cbdsw * DELA/here->MOS2drainPerimiter; } if(here->MOS2sourcePerimiter){ here->MOS2Cbssw += here->MOS2Cbssw * DELA/here->MOS2sourcePerimiter; } if(*(ckt->CKTstate0 + here->MOS2vbd) >= here->MOS2tDepCap){ arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2f2d = here->MOS2Cbd* (1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + here->MOS2Cbdsw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3d = here->MOS2Cbd * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + here->MOS2Cbdsw * model->MOS2bulkJctSideGradingCoeff * sargsw/arg / here->MOS2tBulkPot; here->MOS2f4d = here->MOS2Cbd* here->MOS2tBulkPot*(1-arg*sarg)/ (1-model->MOS2bulkJctBotGradingCoeff) + here->MOS2Cbdsw*here->MOS2tBulkPot* (1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3d/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2d; } if(*(ckt->CKTstate0 + here->MOS2vbs) >= here->MOS2tDepCap){ arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2f2s = here->MOS2Cbs* (1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + here->MOS2Cbssw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3s = here->MOS2Cbs * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + here->MOS2Cbssw * model->MOS2bulkJctSideGradingCoeff *sargsw/arg / here->MOS2tBulkPot; here->MOS2f4s = here->MOS2Cbs*here->MOS2tBulkPot* (1-arg*sarg)/ (1-model->MOS2bulkJctBotGradingCoeff) + here->MOS2Cbssw*here->MOS2tBulkPot* (1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3s/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2s; } here->MOS2drainConductance *= Apert/A0; here->MOS2sourceConductance *= Apert/A0; } #ifdef SENSDEBUG if(flag == 0) printf("perturbation of l\n"); if(flag == 1) printf("perturbation of w\n"); #endif /* SENSDEBUG */ error = MOS2load((GENmodel*)model,ckt); if(error) return(error); if(flag == 0){ here->MOS2l = A0; } else{ here->MOS2w = A0; here->MOS2drainArea /= (1 + info->SENpertfac); here->MOS2sourceArea /= (1 + info->SENpertfac); here->MOS2drainConductance *= A0/Apert; here->MOS2sourceConductance *= A0/Apert; } cd = here->MOS2cd ; cbd = here->MOS2cbd ; cbs = here->MOS2cbs ; gspr= here->MOS2sourceConductance ; gdpr= here->MOS2drainConductance ; DcdDp = (cd - cd0) * DELAinv; DcbsDp = (cbs - cbs0) * DELAinv; DcbdDp = (cbd - cbd0) * DELAinv; DcbDp = ( DcbsDp + DcbdDp ); DcdprDp = 0; DcsprDp = 0; if(here->MOS2dNode != here->MOS2dNodePrime) if(gdpr0) DcdprDp = cdpr0 * (gdpr - gdpr0)/gdpr0 * DELAinv; if(here->MOS2sNode != here->MOS2sNodePrime) if(gspr0) DcsprDp = cspr0 * (gspr - gspr0)/gspr0 * DELAinv; DcdprmDp = ( - DcdprDp + DcdDp); DcsprmDp = ( - DcbsDp - DcdDp - DcbdDp - DcsprDp); if(flag == 0){ EffectiveLength = here->MOS2l - 2*model->MOS2latDiff; if(EffectiveLength == 0){ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; } else{ DqgsDp = model->MOS2type * qgs0 / EffectiveLength; DqgdDp = model->MOS2type * qgd0 / EffectiveLength; DqgbDp = model->MOS2type * qgb0 / EffectiveLength; } } else{ DqgsDp = model->MOS2type * qgs0 / here->MOS2w; DqgdDp = model->MOS2type * qgd0 / here->MOS2w; DqgbDp = model->MOS2type * qgb0 / here->MOS2w; } qbd = *(ckt->CKTstate0 + here->MOS2qbd); qbs = *(ckt->CKTstate0 + here->MOS2qbs); DqbsDp = model->MOS2type * (qbs - qbs0)*DELAinv; DqbdDp = model->MOS2type * (qbd - qbd0)*DELAinv; if(flag == 0){ *(here->MOS2dphigs_dl) = DqgsDp; *(here->MOS2dphigd_dl) = DqgdDp; *(here->MOS2dphibs_dl) = DqbsDp; *(here->MOS2dphibd_dl) = DqbdDp; *(here->MOS2dphigb_dl) = DqgbDp; } else{ *(here->MOS2dphigs_dw) = DqgsDp; *(here->MOS2dphigd_dw) = DqgdDp; *(here->MOS2dphibs_dw) = DqbsDp; *(here->MOS2dphibd_dw) = DqbdDp; *(here->MOS2dphigb_dw) = DqgbDp; } #ifdef SENSDEBUG printf("CKTag[0]=%.7e,CKTag[1]=%.7e,flag= %d\n", ckt->CKTag[0],ckt->CKTag[1],flag); printf("cd0 = %.7e ,cd = %.7e,\n",cd0,cd); printf("cbs0 = %.7e ,cbs = %.7e,\n",cbs0,cbs); printf("cbd0 = %.7e ,cbd = %.7e,\n",cbd0,cbd); printf("DcdprmDp = %.7e,\n",DcdprmDp); printf("DcsprmDp = %.7e,\n",DcsprmDp); printf("DcdprDp = %.7e,\n",DcdprDp); printf("DcsprDp = %.7e,\n",DcsprDp); printf("qgs0 = %.7e \n",qgs0); printf("qgd0 = %.7e \n",qgd0); printf("qgb0 = %.7e \n",qgb0); printf("qbs0 = %.7e ,qbs = %.7e,\n",qbs0,qbs); printf("qbd0 = %.7e ,qbd = %.7e,\n",qbd0,qbd); printf("DqgsDp = %.7e \n",DqgsDp); printf("DqgdDp = %.7e \n",DqgdDp); printf("DqgbDp = %.7e \n",DqgbDp); printf("DqbsDp = %.7e \n",DqbsDp); printf("DqbdDp = %.7e \n",DqbdDp); printf("EffectiveLength = %.7e \n",EffectiveLength); printf("tdepCap = %.7e \n",here->MOS2tDepCap); printf("\n"); #endif /* SENSDEBUG*/ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto next2; /* * load RHS matrix */ if(flag == 0){ *(info->SEN_RHS[here->MOS2bNode] + here->MOS2senParmNo) -= model->MOS2type * DcbDp; *(info->SEN_RHS[here->MOS2dNode] + here->MOS2senParmNo) -= model->MOS2type * DcdprDp; *(info->SEN_RHS[here->MOS2dNodePrime] + here->MOS2senParmNo) -= model->MOS2type * DcdprmDp; *(info->SEN_RHS[here->MOS2sNode] + here->MOS2senParmNo) -= model->MOS2type * DcsprDp; *(info->SEN_RHS[here->MOS2sNodePrime] + here->MOS2senParmNo) -= model->MOS2type * DcsprmDp; } else{ offset = here->MOS2sens_l; *(info->SEN_RHS[here->MOS2bNode] + here->MOS2senParmNo + offset) -= model->MOS2type * DcbDp; *(info->SEN_RHS[here->MOS2dNode] + here->MOS2senParmNo + offset) -= model->MOS2type * DcdprDp; *(info->SEN_RHS[here->MOS2dNodePrime] + here->MOS2senParmNo + offset) -= model->MOS2type * DcdprmDp; *(info->SEN_RHS[here->MOS2sNode] + here->MOS2senParmNo + offset) -= model->MOS2type * DcsprDp; *(info->SEN_RHS[here->MOS2sNodePrime] + here->MOS2senParmNo + offset) -= model->MOS2type * DcsprmDp; } #ifdef SENSDEBUG printf("after loading\n"); if(flag == 0){ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS2bNode] + here->MOS2senParmNo)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNode] + here->MOS2senParmNo)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNode] + here->MOS2senParmNo)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNodePrime] + here->MOS2senParmNo)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNodePrime] + here->MOS2senParmNo)); printf("\n"); } else{ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS2bNode] + here->MOS2senParmNo + here->MOS2sens_l)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNode] + here->MOS2senParmNo + here->MOS2sens_l)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNode] + here->MOS2senParmNo + here->MOS2sens_l)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNodePrime] + here->MOS2senParmNo + here->MOS2sens_l)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNodePrime] + here->MOS2senParmNo + here->MOS2sens_l)); } #endif /* SENSDEBUG*/ next2: ; } next1: if((info->SENmode == DCSEN) || (ckt->CKTmode&MODETRANOP) ) goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ #ifdef SENSDEBUG printf("after conductive currents\n"); printf("iparmno = %d\n",iparmno); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS2bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNodePrime] + iparmno)); printf("\n"); #endif /* SENSDEBUG */ Osxpgs = tag0 * *(ckt->CKTstate1 + here->MOS2sensxpgs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS2sensxpgs + 10*(iparmno - 1) + 1); Osxpgd = tag0 * *(ckt->CKTstate1 + here->MOS2sensxpgd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS2sensxpgd + 10*(iparmno - 1) + 1); Osxpbs = tag0 * *(ckt->CKTstate1 + here->MOS2sensxpbs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS2sensxpbs + 10*(iparmno - 1) + 1); Osxpbd =tag0 * *(ckt->CKTstate1 + here->MOS2sensxpbd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS2sensxpbd + 10*(iparmno - 1) + 1); Osxpgb = tag0 * *(ckt->CKTstate1 + here->MOS2sensxpgb + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS2sensxpgb + 10*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno=%d\n",iparmno); printf("sxpgs=%.7e,sdgs=%.7e\n", *(ckt->CKTstate1 + here->MOS2sensxpgs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS2sensxpgs + 10*(iparmno - 1) + 1)); printf("sxpgd=%.7e,sdgd=%.7e\n", *(ckt->CKTstate1 + here->MOS2sensxpgd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS2sensxpgd + 10*(iparmno - 1) + 1)); printf("sxpbs=%.7e,sdbs=%.7e\n", *(ckt->CKTstate1 + here->MOS2sensxpbs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS2sensxpbs + 10*(iparmno - 1) + 1)); printf("sxpbd=%.7e,sdbd=%.7e\n", *(ckt->CKTstate1 + here->MOS2sensxpbd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS2sensxpbd + 10*(iparmno - 1) + 1)); printf("sxpgb=%.7e,sdgb=%.7e\n", *(ckt->CKTstate1 + here->MOS2sensxpgb + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS2sensxpgb + 10*(iparmno - 1) + 1)); printf("before loading DqDp\n"); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); printf("\n"); #endif /* SENSDEBUG */ if(here->MOS2sens_l && (iparmno == here->MOS2senParmNo)){ Osxpgs -= tag0 * *(here->MOS2dphigs_dl); Osxpgd -= tag0 * *(here->MOS2dphigd_dl); Osxpbs -= tag0 * *(here->MOS2dphibs_dl); Osxpbd -= tag0 * *(here->MOS2dphibd_dl); Osxpgb -= tag0 * *(here->MOS2dphigb_dl); } if(here->MOS2sens_w && (iparmno == (here->MOS2senParmNo + here->MOS2sens_l))){ Osxpgs -= tag0 * *(here->MOS2dphigs_dw); Osxpgd -= tag0 * *(here->MOS2dphigd_dw); Osxpbs -= tag0 * *(here->MOS2dphibs_dw); Osxpbd -= tag0 * *(here->MOS2dphibd_dw); Osxpgb -= tag0 * *(here->MOS2dphigb_dw); } #ifdef SENSDEBUG printf("after loading DqDp\n"); printf("DqgsDp=%.7e",DqgsDp); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->MOS2bNode] + iparmno) += Osxpbs + Osxpbd -Osxpgb; *(info->SEN_RHS[here->MOS2gNode] + iparmno) += Osxpgs + Osxpgd + Osxpgb; *(info->SEN_RHS[here->MOS2dNodePrime] + iparmno) -= Osxpgd + Osxpbd ; *(info->SEN_RHS[here->MOS2sNodePrime] + iparmno) -= Osxpgs + Osxpbs; #ifdef SENSDEBUG printf("after capacitive currents\n"); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS2bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS2sNodePrime] + iparmno)); #endif /* SENSDEBUG */ } restore: /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS2states + i) = *(SaveState + i); here->MOS2sourceConductance = *(SaveState + 17) ; here->MOS2drainConductance = *(SaveState + 18) ; here->MOS2cd = *(SaveState + 19) ; here->MOS2cbs = *(SaveState + 20) ; here->MOS2cbd = *(SaveState + 21) ; here->MOS2gmbs = *(SaveState + 22) ; here->MOS2gm = *(SaveState + 23) ; here->MOS2gds = *(SaveState + 24) ; here->MOS2gbd = *(SaveState + 25) ; here->MOS2gbs = *(SaveState + 26) ; here->MOS2capbd = *(SaveState + 27) ; here->MOS2capbs = *(SaveState + 28) ; here->MOS2Cbd = *(SaveState + 29) ; here->MOS2Cbdsw = *(SaveState + 30) ; here->MOS2Cbs = *(SaveState + 31) ; here->MOS2Cbssw = *(SaveState + 32) ; here->MOS2f2d = *(SaveState + 33) ; here->MOS2f3d = *(SaveState + 34) ; here->MOS2f4d = *(SaveState + 35) ; here->MOS2f2s = *(SaveState + 36) ; here->MOS2f3s = *(SaveState + 37) ; here->MOS2f4s = *(SaveState + 38) ; here->MOS2cgs = *(SaveState + 39) ; here->MOS2cgd = *(SaveState + 40) ; here->MOS2cgb = *(SaveState + 41) ; here->MOS2vdsat = *(SaveState + 42) ; here->MOS2von = *(SaveState + 43) ; here->MOS2mode = save_mode ; here->MOS2senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS2senload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2sprt.c0000644000265600020320000000402612264261473021053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void MOS2sPrint(GENmodel *inModel, CKTcircuit *ckt) /* Pretty print the sensitivity info for all the MOS2 * devices in the circuit. */ { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; printf("LEVEL 2 MOSFETS-----------------\n"); /* loop through all the MOS2 models */ for( ; model != NULL; model = model->MOS2nextModel ) { printf("Model name:%s\n",model->MOS2modName); /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { printf(" Instance name:%s\n",here->MOS2name); printf(" Drain, Gate , Source nodes: %s, %s ,%s\n", CKTnodName(ckt,here->MOS2dNode),CKTnodName(ckt,here->MOS2gNode), CKTnodName(ckt,here->MOS2sNode)); printf(" Multiplier: %g ",here->MOS2m); printf(here->MOS2mGiven ? "(specified)\n" : "(default)\n"); printf(" Length: %g ",here->MOS2l); printf(here->MOS2lGiven ? "(specified)\n" : "(default)\n"); printf(" Width: %g ",here->MOS2w); printf(here->MOS2wGiven ? "(specified)\n" : "(default)\n"); if(here->MOS2sens_l == 1){ printf(" MOS2senParmNo:l = %d ",here->MOS2senParmNo); } else{ printf(" MOS2senParmNo:l = 0 "); } if(here->MOS2sens_w == 1){ printf(" w = %d \n",here->MOS2senParmNo + here->MOS2sens_l); } else{ printf(" w = 0 \n"); } } } } ngspice-26/src/spicelib/devices/mos2/mos2trun.c0000644000265600020320000000134512264261473021054 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; for( ; model != NULL; model = model->MOS2nextModel) { for(here=model->MOS2instances;here!=NULL;here = here->MOS2nextInstance){ CKTterr(here->MOS2qgs,ckt,timeStep); CKTterr(here->MOS2qgd,ckt,timeStep); CKTterr(here->MOS2qgb,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2supd.c0000644000265600020320000001562112264261473021041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* update the charge sensitivities and their derivatives */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2sUpdate(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int iparmno; double sb; double sg; double sdprm; double ssprm; double sxpgs; double sxpgd; double sxpbs; double sxpbd; double sxpgb; double dummy1; double dummy2; SENstruct *info; if(ckt->CKTtime == 0) return(OK); info = ckt->CKTsenInfo; #ifdef SENSDEBUG printf("MOS2senupdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ sxpgs = 0; sxpgd = 0; sxpbs = 0; sxpbd = 0; sxpgb = 0; dummy1 = 0; dummy2 = 0; /* loop through all the MOS2 models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { #ifdef SENSDEBUG printf("senupdate instance name %s\n",here->MOS2name); printf("before loading\n"); printf("CKTag[0] = %.2e,CKTag[1] = %.2e\n", ckt->CKTag[0],ckt->CKTag[1]); printf("capgs = %.7e\n",here->MOS2cgs); printf("capgd = %.7e\n",here->MOS2cgd); printf("capgb = %.7e\n",here->MOS2cgb); printf("capbs = %.7e\n",here->MOS2capbs); printf("capbd = %.7e\n",here->MOS2capbd); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sb = *(info->SEN_Sap[here->MOS2bNode] + iparmno); sg = *(info->SEN_Sap[here->MOS2gNode] + iparmno); ssprm = *(info->SEN_Sap[here->MOS2sNodePrime] + iparmno); sdprm = *(info->SEN_Sap[here->MOS2dNodePrime] + iparmno); #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sb = %.7e,sg = %.7e\n",sb,sg); printf("ssprm = %.7e,sdprm = %.7e\n",ssprm,sdprm); #endif /* SENSDEBUG */ sxpgs = (sg - ssprm) * here->MOS2cgs ; sxpgd = (sg - sdprm) * here->MOS2cgd ; sxpgb = (sg - sb) * here->MOS2cgb ; sxpbs = (sb - ssprm) * here->MOS2capbs ; sxpbd = (sb - sdprm) * here->MOS2capbd ; if(here->MOS2sens_l && (iparmno == here->MOS2senParmNo)){ sxpgs += *(here->MOS2dphigs_dl); sxpgd += *(here->MOS2dphigd_dl); sxpbs += *(here->MOS2dphibs_dl); sxpbd += *(here->MOS2dphibd_dl); sxpgb += *(here->MOS2dphigb_dl); } if(here->MOS2sens_w && (iparmno == (here->MOS2senParmNo+here->MOS2sens_l))){ sxpgs += *(here->MOS2dphigs_dw); sxpgd += *(here->MOS2dphigd_dw); sxpbs += *(here->MOS2dphibs_dw); sxpbd += *(here->MOS2dphibd_dw); sxpgb += *(here->MOS2dphigb_dw); } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MOS2sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate1 + here->MOS2sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate1 + here->MOS2sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate1 + here->MOS2sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate1 + here->MOS2sensxpgb + 10 * (iparmno - 1)) = sxpgb; *(ckt->CKTstate1 + here->MOS2sensxpgs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS2sensxpgd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS2sensxpbs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS2sensxpbd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS2sensxpgb + 10 * (iparmno - 1) + 1) = 0; goto next; } *(ckt->CKTstate0 + here->MOS2sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate0 + here->MOS2sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate0 + here->MOS2sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate0 + here->MOS2sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate0 + here->MOS2sensxpgb + 10 * (iparmno - 1)) = sxpgb; NIintegrate(ckt,&dummy1,&dummy2,here->MOS2cgs, here->MOS2sensxpgs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS2cgd, here->MOS2sensxpgd + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS2cgb, here->MOS2sensxpgb + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS2capbs, here->MOS2sensxpbs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS2capbd, here->MOS2sensxpbd + 10*(iparmno -1)); next: ; #ifdef SENSDEBUG printf("after loading\n"); printf("sxpgs = %.7e,sdotxpgs = %.7e\n", sxpgs,*(ckt->CKTstate0 + here->MOS2sensxpgs + 10 * (iparmno - 1) + 1)); printf("sxpgd = %.7e,sdotxpgd = %.7e\n", sxpgd,*(ckt->CKTstate0 + here->MOS2sensxpgd + 10 * (iparmno - 1) + 1)); printf("sxpgb = %.7e,sdotxpgb = %.7e\n", sxpgb,*(ckt->CKTstate0 + here->MOS2sensxpgb + 10 * (iparmno - 1) + 1)); printf("sxpbs = %.7e,sdotxpbs = %.7e\n", sxpbs,*(ckt->CKTstate0 + here->MOS2sensxpbs + 10 * (iparmno - 1) + 1)); printf("sxpbd = %.7e,sdotxpbd = %.7e\n", sxpbd,*(ckt->CKTstate0 + here->MOS2sensxpbd + 10 * (iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } #ifdef SENSDEBUG printf("MOS2senupdate end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2ext.h0000644000265600020320000000253512264261473020673 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int MOS2acLoad(GENmodel*,CKTcircuit*); extern int MOS2ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MOS2mAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int MOS2convTest(GENmodel*,CKTcircuit*); extern int MOS2delete(GENmodel*,IFuid,GENinstance**); extern void MOS2destroy(GENmodel**); extern int MOS2getic(GENmodel*,CKTcircuit*); extern int MOS2load(GENmodel*,CKTcircuit*); extern int MOS2mDelete(GENmodel**,IFuid,GENmodel*); extern int MOS2mParam(int,IFvalue*,GENmodel*); extern int MOS2param(int,IFvalue*,GENinstance*,IFvalue*); extern int MOS2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MOS2sAcLoad(GENmodel*,CKTcircuit*); extern int MOS2sLoad(GENmodel*,CKTcircuit*); extern void MOS2sPrint(GENmodel*,CKTcircuit*); extern int MOS2sSetup(SENstruct*,GENmodel*); extern int MOS2sUpdate(GENmodel*,CKTcircuit*); extern int MOS2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MOS2unsetup(GENmodel*,CKTcircuit*); extern int MOS2temp(GENmodel*,CKTcircuit*); extern int MOS2trunc(GENmodel*,CKTcircuit*,double*); extern int MOS2disto(int,GENmodel*,CKTcircuit*); extern int MOS2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int MOS2dSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mos2/mos2noi.c0000644000265600020320000001451012264261473020647 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "mos2defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * MOS2noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int MOS2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; MOS2model *firstModel = (MOS2model *) genmodel; MOS2model *model; MOS2instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[MOS2NSRCS]; double lnNdens[MOS2NSRCS]; int i; /* define the names of the noise sources */ static char *MOS2nNames[MOS2NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in MOS2defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->MOS2nextModel) { for (inst=model->MOS2instances; inst != NULL; inst=inst->MOS2nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < MOS2NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->MOS2name,MOS2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < MOS2NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->MOS2name,MOS2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->MOS2name,MOS2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[MOS2RDNOIZ],&lnNdens[MOS2RDNOIZ], ckt,THERMNOISE,inst->MOS2dNodePrime,inst->MOS2dNode, inst->MOS2drainConductance); NevalSrc(&noizDens[MOS2RSNOIZ],&lnNdens[MOS2RSNOIZ], ckt,THERMNOISE,inst->MOS2sNodePrime,inst->MOS2sNode, inst->MOS2sourceConductance); NevalSrc(&noizDens[MOS2IDNOIZ],&lnNdens[MOS2IDNOIZ], ckt,THERMNOISE,inst->MOS2dNodePrime,inst->MOS2sNodePrime, (2.0/3.0 * fabs(inst->MOS2gm))); NevalSrc(&noizDens[MOS2FLNOIZ], NULL, ckt, N_GAIN,inst->MOS2dNodePrime, inst->MOS2sNodePrime, (double)0.0); noizDens[MOS2FLNOIZ] *= model->MOS2fNcoef * exp(model->MOS2fNexp * log(MAX(fabs(inst->MOS2cd),N_MINLOG))) / (data->freq * inst->MOS2w * inst->MOS2m * (inst->MOS2l - 2*model->MOS2latDiff) * model->MOS2oxideCapFactor * model->MOS2oxideCapFactor); lnNdens[MOS2FLNOIZ] = log(MAX(noizDens[MOS2FLNOIZ],N_MINLOG)); noizDens[MOS2TOTNOIZ] = noizDens[MOS2RDNOIZ] + noizDens[MOS2RSNOIZ] + noizDens[MOS2IDNOIZ] + noizDens[MOS2FLNOIZ]; lnNdens[MOS2TOTNOIZ] = log(MAX(noizDens[MOS2TOTNOIZ], N_MINLOG)); *OnDens += noizDens[MOS2TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < MOS2NSRCS; i++) { inst->MOS2nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < MOS2NSRCS; i++) { inst->MOS2nVar[OUTNOIZ][i] = 0.0; inst->MOS2nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < MOS2NSRCS; i++) { if (i != MOS2TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->MOS2nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->MOS2nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->MOS2nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->MOS2nVar[OUTNOIZ][i] += tempOnoise; inst->MOS2nVar[OUTNOIZ][MOS2TOTNOIZ] += tempOnoise; inst->MOS2nVar[INNOIZ][i] += tempInoise; inst->MOS2nVar[INNOIZ][MOS2TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < MOS2NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < MOS2NSRCS; i++) { data->outpVector[data->outNumber++] = inst->MOS2nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->MOS2nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2del.c0000644000265600020320000000155712264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2delete(GENmodel *inModel, IFuid name, GENinstance **inst) { MOS2model *model = (MOS2model *)inModel; MOS2instance **fast = (MOS2instance **)inst; MOS2instance **prev = NULL; MOS2instance *here; for( ; model ; model = model->MOS2nextModel) { prev = &(model->MOS2instances); for(here = *prev; here ; here = *prev) { if(here->MOS2name == name || (fast && here==*fast) ) { *prev= here->MOS2nextInstance; FREE(here); return(OK); } prev = &(here->MOS2nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mos2/mos2temp.c0000644000265600020320000003507112264261473021034 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) int MOS2temp(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; double egfet; double wkfngs; double wkfng; double fermig; double fermis; double vfb; double fact1,fact2; double vt,vtnom; double kt,kt1; double egfet1; double arg1; double pbfact,pbfact1; double ratio,ratio4; double phio; double pbo; double gmaold,gmanew; double capfact; /* loop through all the resistor models */ for( ; model != NULL; model = model->MOS2nextModel) { /* perform model defaulting */ /* now model parameter preprocessing */ if(!model->MOS2tnomGiven) { model->MOS2tnom = ckt->CKTnomTemp; } fact1 = model->MOS2tnom/REFTEMP; vtnom = model->MOS2tnom*CONSTKoverQ; kt1 = CONSTboltz * model->MOS2tnom; egfet1 = 1.16-(7.02e-4*model->MOS2tnom*model->MOS2tnom)/ (model->MOS2tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); if (model->MOS2phi <= 0.0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: Phi is not positive.", &model->MOS2modName); return(E_BADPARM); } if(!model->MOS2oxideThicknessGiven) { model->MOS2oxideThickness = 1e-7; } model->MOS2oxideCapFactor = 3.9 * 8.854214871e-12/ model->MOS2oxideThickness; if(!model->MOS2surfaceMobilityGiven) model->MOS2surfaceMobility=600; if(!model->MOS2transconductanceGiven) { model->MOS2transconductance = model->MOS2surfaceMobility * 1e-4 /*(m**2/cm**2) */ * model->MOS2oxideCapFactor; } if(model->MOS2substrateDopingGiven) { if(model->MOS2substrateDoping *1e6 /*(cm**3/m**3)*/ >1.45e16) { if(!model->MOS2phiGiven) { model->MOS2phi = 2*vtnom* log(model->MOS2substrateDoping* 1e6 /*(cm**3/m**3)*//1.45e16); model->MOS2phi = MAX(.1,model->MOS2phi); } fermis = model->MOS2type * .5 * model->MOS2phi; wkfng = 3.2; if(!model->MOS2gateTypeGiven) model->MOS2gateType=1; if(model->MOS2gateType != 0) { fermig = model->MOS2type * model->MOS2gateType*.5*egfet1; wkfng = 3.25 + .5 * egfet1 - fermig; } wkfngs = wkfng - (3.25 + .5 * egfet1 +fermis); if(!model->MOS2gammaGiven) { model->MOS2gamma = sqrt(2 * 11.70 * 8.854214871e-12 * CHARGE * model->MOS2substrateDoping * 1e6 /*(cm**3/m**3)*/)/model->MOS2oxideCapFactor; } if(!model->MOS2vt0Given) { if(!model->MOS2surfaceStateDensityGiven) model->MOS2surfaceStateDensity=0; vfb = wkfngs - model->MOS2surfaceStateDensity * 1e4 /*(cm**2/m**2)*/ * CHARGE/model->MOS2oxideCapFactor; model->MOS2vt0 = vfb + model->MOS2type * (model->MOS2gamma * sqrt(model->MOS2phi)+ model->MOS2phi); } else { vfb = model->MOS2vt0 - model->MOS2type * (model->MOS2gamma* sqrt(model->MOS2phi)+model->MOS2phi); } model->MOS2xd = sqrt((EPSSIL+EPSSIL)/ (CHARGE*model->MOS2substrateDoping *1e6 /*(cm**3/m**3)*/)); } else { model->MOS2substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni", &(model->MOS2modName)); return(E_BADPARM); } } if(!model->MOS2bulkCapFactorGiven) { model->MOS2bulkCapFactor = sqrt(EPSSIL*CHARGE* model->MOS2substrateDoping* 1e6 /*cm**3/m**3*/ /(2*model->MOS2bulkJctPotential)); } /* loop through all instances of the model */ for(here = model->MOS2instances; here!= NULL; here = here->MOS2nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbdsw; /* zero voltage bulk-drain sidewall capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double czbssw; /* zero voltage bulk-source sidewall capacitance */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ double sargsw; /* (1-fc) ^^ (-mjsw) */ /* perform the parameter defaulting */ if(!here->MOS2dtempGiven) { here->MOS2dtemp = 0.0; } if(!here->MOS2tempGiven) { here->MOS2temp = ckt->CKTtemp + here->MOS2dtemp; } here->MOS2mode = 1; here->MOS2von = 0; vt = here->MOS2temp * CONSTKoverQ; ratio = here->MOS2temp/model->MOS2tnom; fact2 = here->MOS2temp/REFTEMP; kt = here->MOS2temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->MOS2temp*here->MOS2temp)/ (here->MOS2temp+1108); arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->MOS2drainAreaGiven) { here->MOS2drainArea = ckt->CKTdefaultMosAD; } if(!here->MOS2mGiven) { here->MOS2m = ckt->CKTdefaultMosM; } if(!here->MOS2lGiven) { here->MOS2l = ckt->CKTdefaultMosL; } if(!here->MOS2sourceAreaGiven) { here->MOS2sourceArea = ckt->CKTdefaultMosAS; } if(!here->MOS2wGiven) { here->MOS2w = ckt->CKTdefaultMosW; } if(model->MOS2drainResistanceGiven) { if(model->MOS2drainResistance != 0) { here->MOS2drainConductance = here->MOS2m / model->MOS2drainResistance; } else { here->MOS2drainConductance = 0; } } else if (model->MOS2sheetResistanceGiven) { if((model->MOS2sheetResistance != 0) && (here->MOS2drainSquares != 0)) { here->MOS2drainConductance = here->MOS2m / (model->MOS2sheetResistance*here->MOS2drainSquares); } else { here->MOS2drainConductance = 0; } } else { here->MOS2drainConductance = 0; } if(model->MOS2sourceResistanceGiven) { if(model->MOS2sourceResistance != 0) { here->MOS2sourceConductance = here->MOS2m / model->MOS2sourceResistance; } else { here->MOS2sourceConductance = 0; } } else if (model->MOS2sheetResistanceGiven) { if ((model->MOS2sheetResistance != 0) && (here->MOS2sourceSquares != 0)) { here->MOS2sourceConductance = here->MOS2m / (model->MOS2sheetResistance*here->MOS2sourceSquares); } else { here->MOS2sourceConductance = 0; } } else { here->MOS2sourceConductance = 0; } if(here->MOS2l - 2 * model->MOS2latDiff <=0) { SPfrontEnd->IFerror (ERR_WARNING, "%s: effective channel length less than zero", &(here->MOS2name)); } ratio4 = ratio * sqrt(ratio); here->MOS2tTransconductance = model->MOS2transconductance / ratio4; here->MOS2tSurfMob = model->MOS2surfaceMobility/ratio4; phio= (model->MOS2phi-pbfact1)/fact1; here->MOS2tPhi = fact2 * phio + pbfact; here->MOS2tVbi = model->MOS2vt0 - model->MOS2type * (model->MOS2gamma* sqrt(model->MOS2phi)) +.5*(egfet1-egfet) + model->MOS2type*.5* (here->MOS2tPhi-model->MOS2phi); here->MOS2tVto = here->MOS2tVbi + model->MOS2type * model->MOS2gamma * sqrt(here->MOS2tPhi); here->MOS2tSatCur = model->MOS2jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->MOS2tSatCurDens = model->MOS2jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); pbo = (model->MOS2bulkJctPotential - pbfact1)/fact1; gmaold = (model->MOS2bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->MOS2bulkJctBotGradingCoeff* (4e-4*(model->MOS2tnom-REFTEMP)-gmaold)); here->MOS2tCbd = model->MOS2capBD * capfact; here->MOS2tCbs = model->MOS2capBS * capfact; here->MOS2tCj = model->MOS2bulkCapFactor * capfact; capfact = 1/(1+model->MOS2bulkJctSideGradingCoeff* (4e-4*(model->MOS2tnom-REFTEMP)-gmaold)); here->MOS2tCjsw = model->MOS2sideWallCapFactor * capfact; here->MOS2tBulkPot = fact2 * pbo+pbfact; gmanew = (here->MOS2tBulkPot-pbo)/pbo; capfact = (1+model->MOS2bulkJctBotGradingCoeff* (4e-4*(here->MOS2temp-REFTEMP)-gmanew)); here->MOS2tCbd *= capfact; here->MOS2tCbs *= capfact; here->MOS2tCj *= capfact; capfact = (1+model->MOS2bulkJctSideGradingCoeff* (4e-4*(here->MOS2temp-REFTEMP)-gmanew)); here->MOS2tCjsw *= capfact; here->MOS2tDepCap = model->MOS2fwdCapDepCoeff * here->MOS2tBulkPot; if( (here->MOS2tSatCurDens == 0) || (here->MOS2drainArea == 0) || (here->MOS2sourceArea == 0) ) { here->MOS2sourceVcrit = here->MOS2drainVcrit = vt*log(vt/(CONSTroot2*here->MOS2m*here->MOS2tSatCur)); } else { here->MOS2drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS2m * here->MOS2tSatCurDens * here->MOS2drainArea)); here->MOS2sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS2m * here->MOS2tSatCurDens * here->MOS2sourceArea)); } if(model->MOS2capBDGiven) { czbd = here->MOS2tCbd * here->MOS2m; } else { if(model->MOS2bulkCapFactorGiven) { czbd=here->MOS2tCj*here->MOS2drainArea * here->MOS2m; } else { czbd=0; } } if(model->MOS2sideWallCapFactorGiven) { czbdsw= here->MOS2tCjsw * here->MOS2drainPerimiter * here->MOS2m;; } else { czbdsw=0; } arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2Cbd = czbd; here->MOS2Cbdsw = czbdsw; here->MOS2f2d = czbd*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + czbdsw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3d = czbd * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + czbdsw * model->MOS2bulkJctSideGradingCoeff * sargsw/arg / here->MOS2tBulkPot; here->MOS2f4d = czbd*here->MOS2tBulkPot*(1-arg*sarg)/ (1-model->MOS2bulkJctBotGradingCoeff) + czbdsw*here->MOS2tBulkPot*(1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3d/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2d; if(model->MOS2capBSGiven) { czbs=here->MOS2tCbs * here->MOS2m; } else { if(model->MOS2bulkCapFactorGiven) { czbs=here->MOS2tCj*here->MOS2sourceArea * here->MOS2m; } else { czbs=0; } } if(model->MOS2sideWallCapFactorGiven) { czbssw = here->MOS2tCjsw * here->MOS2sourcePerimiter * here->MOS2m; } else { czbssw=0; } arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2Cbs = czbs; here->MOS2Cbssw = czbssw; here->MOS2f2s = czbs*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + czbssw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3s = czbs * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + czbssw * model->MOS2bulkJctSideGradingCoeff * sargsw/arg / here->MOS2tBulkPot; here->MOS2f4s = czbs*here->MOS2tBulkPot*(1-arg*sarg)/ (1-model->MOS2bulkJctBotGradingCoeff) + czbssw*here->MOS2tBulkPot*(1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3s/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2s; } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2pzld.c0000644000265600020320000001204612264261473021035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; for( ; model != NULL; model = model->MOS2nextModel) { for(here = model->MOS2instances; here!= NULL; here = here->MOS2nextInstance) { if (here->MOS2mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveLength=here->MOS2l - 2*model->MOS2latDiff; GateSourceOverlapCap = model->MOS2gateSourceOverlapCapFactor * here->MOS2m * here->MOS2w; GateDrainOverlapCap = model->MOS2gateDrainOverlapCapFactor * here->MOS2m * here->MOS2w; GateBulkOverlapCap = model->MOS2gateBulkOverlapCapFactor * here->MOS2m * EffectiveLength; capgs = ( 2* *(ckt->CKTstate0+here->MOS2capgs)+ GateSourceOverlapCap ); capgd = ( 2* *(ckt->CKTstate0+here->MOS2capgd)+ GateDrainOverlapCap ); capgb = ( 2* *(ckt->CKTstate0+here->MOS2capgb)+ GateBulkOverlapCap ); xgs = capgs; xgd = capgd; xgb = capgb; xbd = here->MOS2capbd; xbs = here->MOS2capbs; /*printf("mos2: xgs=%g, xgd=%g, xgb=%g, xbd=%g, xbs=%g\n", xgs,xgd,xgb,xbd,xbs);*/ /* * load matrix */ *(here->MOS2GgPtr ) += (xgd+xgs+xgb)*s->real; *(here->MOS2GgPtr +1) += (xgd+xgs+xgb)*s->imag; *(here->MOS2BbPtr ) += (xgb+xbd+xbs)*s->real; *(here->MOS2BbPtr +1) += (xgb+xbd+xbs)*s->imag; *(here->MOS2DPdpPtr ) += (xgd+xbd)*s->real; *(here->MOS2DPdpPtr +1) += (xgd+xbd)*s->imag; *(here->MOS2SPspPtr ) += (xgs+xbs)*s->real; *(here->MOS2SPspPtr +1) += (xgs+xbs)*s->imag; *(here->MOS2GbPtr ) -= xgb*s->real; *(here->MOS2GbPtr +1) -= xgb*s->imag; *(here->MOS2GdpPtr ) -= xgd*s->real; *(here->MOS2GdpPtr +1) -= xgd*s->imag; *(here->MOS2GspPtr ) -= xgs*s->real; *(here->MOS2GspPtr +1) -= xgs*s->imag; *(here->MOS2BgPtr ) -= xgb*s->real; *(here->MOS2BgPtr +1) -= xgb*s->imag; *(here->MOS2BdpPtr ) -= xbd*s->real; *(here->MOS2BdpPtr +1) -= xbd*s->imag; *(here->MOS2BspPtr ) -= xbs*s->real; *(here->MOS2BspPtr +1) -= xbs*s->imag; *(here->MOS2DPgPtr ) -= xgd*s->real; *(here->MOS2DPgPtr +1) -= xgd*s->imag; *(here->MOS2DPbPtr ) -= xbd*s->real; *(here->MOS2DPbPtr +1) -= xbd*s->imag; *(here->MOS2SPgPtr ) -= xgs*s->real; *(here->MOS2SPgPtr +1) -= xgs*s->imag; *(here->MOS2SPbPtr ) -= xbs*s->real; *(here->MOS2SPbPtr +1) -= xbs*s->imag; *(here->MOS2DdPtr) += here->MOS2drainConductance; *(here->MOS2SsPtr) += here->MOS2sourceConductance; *(here->MOS2BbPtr) += here->MOS2gbd+here->MOS2gbs; *(here->MOS2DPdpPtr) += here->MOS2drainConductance+ here->MOS2gds+here->MOS2gbd+ xrev*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2SPspPtr) += here->MOS2sourceConductance+ here->MOS2gds+here->MOS2gbs+ xnrm*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2DdpPtr) -= here->MOS2drainConductance; *(here->MOS2SspPtr) -= here->MOS2sourceConductance; *(here->MOS2BdpPtr) -= here->MOS2gbd; *(here->MOS2BspPtr) -= here->MOS2gbs; *(here->MOS2DPdPtr) -= here->MOS2drainConductance; *(here->MOS2DPgPtr) += (xnrm-xrev)*here->MOS2gm; *(here->MOS2DPbPtr) += -here->MOS2gbd+(xnrm-xrev)*here->MOS2gmbs; *(here->MOS2DPspPtr) -= here->MOS2gds+ xnrm*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2SPgPtr) -= (xnrm-xrev)*here->MOS2gm; *(here->MOS2SPsPtr) -= here->MOS2sourceConductance; *(here->MOS2SPbPtr) -= here->MOS2gbs+(xnrm-xrev)*here->MOS2gmbs; *(here->MOS2SPdpPtr) -= here->MOS2gds+ xrev*(here->MOS2gm+here->MOS2gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos2/Makefile.am0000644000265600020320000000115512264261473021152 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmos2.la libmos2_la_SOURCES = \ mos2.c \ mos2acld.c \ mos2ask.c \ mos2conv.c \ mos2defs.h \ mos2del.c \ mos2dest.c \ mos2dist.c \ mos2dset.c \ mos2ext.h \ mos2ic.c \ mos2init.c \ mos2init.h \ mos2itf.h \ mos2load.c \ mos2mask.c \ mos2mdel.c \ mos2mpar.c \ mos2noi.c \ mos2par.c \ mos2pzld.c \ mos2sacl.c \ mos2set.c \ mos2sld.c \ mos2sprt.c \ mos2sset.c \ mos2supd.c \ mos2temp.c \ mos2trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mos2/mos2load.c0000644000265600020320000015521712264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 alansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) static double sig1[4] = {1.0, -1.0, 1.0, -1.0}; static double sig2[4] = {1.0, 1.0,-1.0, -1.0}; int MOS2load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int error; double Beta; double DrainSatCur; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cbhat; double cdhat; double cdrain = 0.0; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqgb; double ceqgd; double ceqgs; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gcgb; double gcgd; double gcgs; double geq; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb1; double vgb; double vgd1; double vgd; double vgdo; double vgs1; double vgs; double von; double vt; /* K * T / Q */ #ifndef PREDICTOR double xfact = 0.0; #endif double capgs = 0.0; /* total gate-source capacitance */ double capgd = 0.0; /* total gate-drain capacitance */ double capgb = 0.0; /* total gate-bulk capacitance */ int xnrm; int xrev; int Check; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ #ifdef CAPBYPASS int senflag; #endif /* CAPBYPASS */ int SenCond=0; #ifdef CAPBYPASS senflag = 0; if(ckt->CKTsenInfo){ if(ckt->CKTsenInfo->SENstatus == PERTURBATION){ if((ckt->CKTsenInfo->SENmode == ACSEN)|| (ckt->CKTsenInfo->SENmode == TRANSEN)){ senflag = 1; } } } #endif /* CAPBYPASS */ /* loop through all the MOS2 device models */ for( ; model != NULL; model = model->MOS2nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS2instances; here != NULL ; here=here->MOS2nextInstance) { vt = CONSTKoverQ * here->MOS2temp; Check=1; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("MOS2load %s\n",here->MOS2name); #endif /* SENSDEBUG */ if(ckt->CKTsenInfo->SENstatus == PERTURBATION) { if(here->MOS2senPertFlag == OFF)continue; } SenCond = here->MOS2senPertFlag; } EffectiveLength=here->MOS2l - 2*model->MOS2latDiff; if( (here->MOS2tSatCurDens == 0) || (here->MOS2drainArea == 0) || (here->MOS2sourceArea == 0)) { DrainSatCur = here->MOS2m * here->MOS2tSatCur; SourceSatCur = here->MOS2m * here->MOS2tSatCur; } else { DrainSatCur = here->MOS2m * here->MOS2tSatCurDens * here->MOS2drainArea; SourceSatCur = here->MOS2m * here->MOS2tSatCurDens * here->MOS2sourceArea; } GateSourceOverlapCap = model->MOS2gateSourceOverlapCapFactor * here->MOS2m * here->MOS2w; GateDrainOverlapCap = model->MOS2gateDrainOverlapCapFactor * here->MOS2m * here->MOS2w; GateBulkOverlapCap = model->MOS2gateBulkOverlapCapFactor * here->MOS2m * EffectiveLength; Beta = here->MOS2tTransconductance * here->MOS2w * here->MOS2m/EffectiveLength; OxideCap = model->MOS2oxideCapFactor * EffectiveLength * here->MOS2m * here->MOS2w; if(SenCond){ #ifdef SENSDEBUG printf("MOS2senPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { vgs = *(ckt->CKTstate1 + here->MOS2vgs); vds = *(ckt->CKTstate1 + here->MOS2vds); vbs = *(ckt->CKTstate1 + here->MOS2vbs); vbd = *(ckt->CKTstate1 + here->MOS2vbd); vgb = vgs - vbs; vgd = vgs - vds; } else if (ckt->CKTsenInfo->SENmode == ACSEN){ vgb = model->MOS2type * ( *(ckt->CKTrhsOp+here->MOS2gNode) - *(ckt->CKTrhsOp+here->MOS2bNode)); vbs = *(ckt->CKTstate0 + here->MOS2vbs); vbd = *(ckt->CKTstate0 + here->MOS2vbd); vgd = vgb + vbd ; vgs = vgb + vbs ; vds = vbs - vbd ; } else{ vgs = *(ckt->CKTstate0 + here->MOS2vgs); vds = *(ckt->CKTstate0 + here->MOS2vds); vbs = *(ckt->CKTstate0 + here->MOS2vbs); vbd = *(ckt->CKTstate0 + here->MOS2vbd); vgb = vgs - vbs; vgd = vgs - vds; } #ifdef SENSDEBUG printf(" vbs = %.7e ,vbd = %.7e,vgb = %.7e\n",vbs,vbd,vgb); printf(" vgs = %.7e ,vds = %.7e,vgd = %.7e\n",vgs,vds,vgd); #endif /* SENSDEBUG */ goto next1; } if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED |MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->MOS2off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MOS2vbs) = *(ckt->CKTstate1 + here->MOS2vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS2vbs)) -(xfact * (*(ckt->CKTstate2 + here->MOS2vbs))); *(ckt->CKTstate0 + here->MOS2vgs) = *(ckt->CKTstate1 + here->MOS2vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS2vgs)) -(xfact * (*(ckt->CKTstate2 + here->MOS2vgs))); *(ckt->CKTstate0 + here->MOS2vds) = *(ckt->CKTstate1 + here->MOS2vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->MOS2vds)) -(xfact * (*(ckt->CKTstate2 + here->MOS2vds))); *(ckt->CKTstate0 + here->MOS2vbd) = *(ckt->CKTstate0 + here->MOS2vbs)- *(ckt->CKTstate0 + here->MOS2vds); } else { #endif /* PREDICTOR */ /* general iteration */ vbs = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2bNode) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); vgs = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2gNode) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); vds = model->MOS2type * ( *(ckt->CKTrhsOld+here->MOS2dNodePrime) - *(ckt->CKTrhsOld+here->MOS2sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS2vgs) - *(ckt->CKTstate0 + here->MOS2vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS2vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS2vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS2mode >= 0) { cdhat= here->MOS2cd - here->MOS2gbd * delvbd + here->MOS2gmbs * delvbs + here->MOS2gm * delvgs + here->MOS2gds * delvds ; } else { cdhat= here->MOS2cd + ( here->MOS2gmbs - here->MOS2gbd) * delvbd - here->MOS2gm * delvgd + here->MOS2gds * delvds ; } cbhat= here->MOS2cbs + here->MOS2cbd + here->MOS2gbd * delvbd + here->MOS2gbs * delvbs ; /* now lets see if we can bypass (ugh) */ /* the following massive if should all be one * single compound if statement, but most compilers * can't handle it in one piece, so it is broken up * into several stages here */ #ifndef NOBYPASS tempv = MAX(fabs(cbhat),fabs(here->MOS2cbs+here->MOS2cbd))+ ckt->CKTabstol; if((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG) )) && (ckt->CKTbypass) ) if ( (fabs(cbhat-(here->MOS2cbs + here->MOS2cbd)) < ckt->CKTreltol * tempv)) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS2vbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS2vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->MOS2vgs)))+ ckt->CKTvoltTol)) ) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->MOS2vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- here->MOS2cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs( here->MOS2cd)) + ckt->CKTabstol) ) { /* bypass code */ /* nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration * out and keep going */ vbs = *(ckt->CKTstate0 + here->MOS2vbs); vbd = *(ckt->CKTstate0 + here->MOS2vbd); vgs = *(ckt->CKTstate0 + here->MOS2vgs); vds = *(ckt->CKTstate0 + here->MOS2vds); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->MOS2mode * (here->MOS2cd + here->MOS2cbd); if(ckt->CKTmode & (MODETRAN | MODETRANOP)) { capgs = ( *(ckt->CKTstate0 + here->MOS2capgs)+ *(ckt->CKTstate1 + here->MOS2capgs)+ GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0 + here->MOS2capgd)+ *(ckt->CKTstate1 + here->MOS2capgd)+ GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0 + here->MOS2capgb)+ *(ckt->CKTstate1 + here->MOS2capgb)+ GateBulkOverlapCap ); if(ckt->CKTsenInfo){ here->MOS2cgs = capgs; here->MOS2cgd = capgd; here->MOS2cgb = capgb; } } goto bypass; } #endif /*NOBYPASS*/ /* ok - bypass is out, do it the hard way */ von = model->MOS2type * here->MOS2von; /* * limiting * We want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->MOS2vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MOS2vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->MOS2vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->MOS2vds))); } vgs = vgd + vds; } if(vds >= 0) { vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->MOS2vbs), vt,here->MOS2sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->MOS2vbd), vt,here->MOS2drainVcrit,&Check); vbs = vbd + vds; } } else { /* ok - not one of the simple cases, so we have to * look at other possibilities */ if((ckt->CKTmode & MODEINITJCT) && !here->MOS2off) { vds= model->MOS2type * here->MOS2icVDS; vgs= model->MOS2type * here->MOS2icVGS; vbs= model->MOS2type * here->MOS2icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = model->MOS2type * here->MOS2tVto; vds = 0; } } else { vbs=vgs=vds=0; } } /* now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* bulk-source and bulk-drain doides * here we just evaluate the ideal diode current and the * correspoinding derivative (conductance). */ next1: if(vbs <= -3*vt) { here->MOS2gbs = ckt->CKTgmin; here->MOS2cbs = here->MOS2gbs*vbs-SourceSatCur; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS2gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS2cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; } if(vbd <= -3*vt) { here->MOS2gbd = ckt->CKTgmin; here->MOS2cbd = here->MOS2gbd*vbd-DrainSatCur; } else { evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS2gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS2cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; } if(vds >= 0) { /* normal mode */ here->MOS2mode = 1; } else { /* inverse mode */ here->MOS2mode = -1; } { /* moseq2(vds,vbs,vgs,gm,gds,gmbs,qg,qc,qb, * cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* note: cgdb, cgsb, cbdb, cbsb never used */ /* * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets * */ double arg; double sarg; double a4[4],b4[4],x4[8],poly4[8]; double beta1; double dsrgdb; double d2sdb2; double sphi = 0.0; /* square root of phi */ double sphi3 = 0.0; /* square root of phi cubed */ double barg; double d2bdb2; double factor; double dbrgdb; double eta; double vbin; double argd = 0.0; double args = 0.0; double argss; double argsd; double argxs = 0.0; double argxd = 0.0; double daddb2; double dasdb2; double dbargd; double dbargs; double dbxwd; double dbxws; double dgddb2; double dgddvb; double dgdvds; double gamasd; double xwd; double xws; double ddxwd; double gammad; double vth; double cfs; double cdonco; double xn = 0.0; double argg = 0.0; double vgst; double sarg3; double sbiarg; double dgdvbs; double body; double gdbdv; double dodvbs; double dodvds = 0.0; double dxndvd = 0.0; double dxndvb = 0.0; double udenom; double dudvgs; double dudvds; double dudvbs; double gammd2; double argv; double vgsx; double ufact; double ueff; double dsdvgs; double dsdvbs; double a1; double a3; double a; double b1; double b3; double b; double c1; double c; double d1; double fi; double p0; double p2; double p3; double p4; double p; double r3; double r; double ro; double s2; double s; double v1; double v2; double xv; double y3; double delta4; double xvalid = 0.0; double bsarg = 0.0; double dbsrdb; double bodys = 0.0; double gdbdvs = 0.0; double sargv; double xlfact; double dldsat; double xdv; double xlv; double vqchan; double dqdsat; double vl; double dfundg; double dfunds; double dfundb; double xls; double dldvgs; double dldvds; double dldvbs; double dfact; double clfact; double xleff; double deltal; double xwb; double vdson; double cdson; double didvds; double gdson; double gmw; double gbson; double expg; double xld; double xlamda = model->MOS2lambda; /* 'local' variables - these switch d & s around appropriately * so that we don't have to worry about vds < 0 */ double lvbs = here->MOS2mode==1?vbs:vbd; double lvds = here->MOS2mode*vds; double lvgs = here->MOS2mode==1?vgs:vgd; double phiMinVbs = here->MOS2tPhi - lvbs; double tmp; /* a temporary variable, not used for more than */ /* about 10 lines at a time */ int iknt; int jknt; int i; int j; /* * compute some useful quantities */ if (lvbs <= 0.0) { sarg = sqrt(phiMinVbs); dsrgdb = -0.5/sarg; d2sdb2 = 0.5*dsrgdb/phiMinVbs; } else { sphi = sqrt(here->MOS2tPhi); sphi3 = here->MOS2tPhi*sphi; sarg = sphi/(1.0+0.5*lvbs/here->MOS2tPhi); tmp = sarg/sphi3; dsrgdb = -0.5*sarg*tmp; d2sdb2 = -dsrgdb*tmp; } if ((lvbs-lvds) <= 0) { barg = sqrt(phiMinVbs+lvds); dbrgdb = -0.5/barg; d2bdb2 = 0.5*dbrgdb/(phiMinVbs+lvds); } else { sphi = sqrt(here->MOS2tPhi);/* added by HT 050523 */ sphi3 = here->MOS2tPhi*sphi;/* added by HT 050523 */ barg = sphi/(1.0+0.5*(lvbs-lvds)/here->MOS2tPhi); tmp = barg/sphi3; dbrgdb = -0.5*barg*tmp; d2bdb2 = -dbrgdb*tmp; } /* * calculate threshold voltage (von) * narrow-channel effect */ /*XXX constant per device */ factor = 0.125*model->MOS2narrowFactor*2.0*M_PI*EPSSIL/ OxideCap*EffectiveLength; /*XXX constant per device */ eta = 1.0+factor; vbin = here->MOS2tVbi*model->MOS2type+factor*phiMinVbs; if ((model->MOS2gamma > 0.0) || (model->MOS2substrateDoping > 0.0)) { xwd = model->MOS2xd*barg; xws = model->MOS2xd*sarg; /* * short-channel effect with vds .ne. 0.0 */ argss = 0.0; argsd = 0.0; dbargs = 0.0; dbargd = 0.0; dgdvds = 0.0; dgddb2 = 0.0; if (model->MOS2junctionDepth > 0) { tmp = 2.0/model->MOS2junctionDepth; argxs = 1.0+xws*tmp; argxd = 1.0+xwd*tmp; args = sqrt(argxs); argd = sqrt(argxd); tmp = .5*model->MOS2junctionDepth/EffectiveLength; argss = tmp * (args-1.0); argsd = tmp * (argd-1.0); } gamasd = model->MOS2gamma*(1.0-argss-argsd); dbxwd = model->MOS2xd*dbrgdb; dbxws = model->MOS2xd*dsrgdb; if (model->MOS2junctionDepth > 0) { tmp = 0.5/EffectiveLength; dbargs = tmp*dbxws/args; dbargd = tmp*dbxwd/argd; dasdb2 = -model->MOS2xd*( d2sdb2+dsrgdb*dsrgdb* model->MOS2xd/(model->MOS2junctionDepth*argxs))/ (EffectiveLength*args); daddb2 = -model->MOS2xd*( d2bdb2+dbrgdb*dbrgdb* model->MOS2xd/(model->MOS2junctionDepth*argxd))/ (EffectiveLength*argd); dgddb2 = -0.5*model->MOS2gamma*(dasdb2+daddb2); } dgddvb = -model->MOS2gamma*(dbargs+dbargd); if (model->MOS2junctionDepth > 0) { ddxwd = -dbxwd; dgdvds = -model->MOS2gamma*0.5*ddxwd/(EffectiveLength*argd); } } else { gamasd = model->MOS2gamma; gammad = model->MOS2gamma; dgddvb = 0.0; dgdvds = 0.0; dgddb2 = 0.0; } von = vbin+gamasd*sarg; vth = von; vdsat = 0.0; if (model->MOS2fastSurfaceStateDensity != 0.0 && OxideCap != 0.0) { /* XXX constant per model */ cfs = CHARGE*model->MOS2fastSurfaceStateDensity* 1e4 /*(cm**2/m**2)*/; cdonco = -(gamasd*dsrgdb+dgddvb*sarg)+factor; xn = 1.0+cfs/OxideCap*here->MOS2m* here->MOS2w*EffectiveLength+cdonco; tmp = vt*xn; von = von+tmp; argg = 1.0/tmp; vgst = lvgs-von; } else { vgst = lvgs-von; if (lvgs <= vbin) { /* * cutoff region */ here->MOS2gds = 0.0; goto line1050; } } /* * compute some more useful quantities */ sarg3 = sarg*sarg*sarg; /* XXX constant per model */ sbiarg = sqrt(here->MOS2tBulkPot); gammad = gamasd; dgdvbs = dgddvb; body = barg*barg*barg-sarg3; gdbdv = 2.0*gammad*(barg*barg*dbrgdb-sarg*sarg*dsrgdb); dodvbs = -factor+dgdvbs*sarg+gammad*dsrgdb; if (model->MOS2fastSurfaceStateDensity == 0.0) goto line400; if (OxideCap == 0.0) goto line410; dxndvb = 2.0*dgdvbs*dsrgdb+gammad*d2sdb2+dgddb2*sarg; dodvbs = dodvbs+vt*dxndvb; dxndvd = dgdvds*dsrgdb; dodvds = dgdvds*sarg+vt*dxndvd; /* * evaluate effective mobility and its derivatives */ line400: if (OxideCap <= 0.0) goto line410; udenom = vgst; tmp = model->MOS2critField * 100 /* cm/m */ * EPSSIL/ model->MOS2oxideCapFactor; if (udenom <= tmp) goto line410; ufact = exp(model->MOS2critFieldExp*log(tmp/udenom)); ueff = model->MOS2surfaceMobility * 1e-4 /*(m**2/cm**2) */ *ufact; dudvgs = -ufact*model->MOS2critFieldExp/udenom; dudvds = 0.0; dudvbs = model->MOS2critFieldExp*ufact*dodvbs/vgst; goto line500; line410: ufact = 1.0; ueff = model->MOS2surfaceMobility * 1e-4 /*(m**2/cm**2) */ ; dudvgs = 0.0; dudvds = 0.0; dudvbs = 0.0; /* * evaluate saturation voltage and its derivatives according to * grove-frohman equation */ line500: vgsx = lvgs; gammad = gamasd/eta; dgdvbs = dgddvb; if (model->MOS2fastSurfaceStateDensity != 0 && OxideCap != 0) { vgsx = MAX(lvgs,von); } if (gammad > 0) { gammd2 = gammad*gammad; argv = (vgsx-vbin)/eta+phiMinVbs; if (argv <= 0.0) { vdsat = 0.0; dsdvgs = 0.0; dsdvbs = 0.0; } else { arg = sqrt(1.0+4.0*argv/gammd2); vdsat = (vgsx-vbin)/eta+gammd2*(1.0-arg)/2.0; vdsat = MAX(vdsat,0.0); dsdvgs = (1.0-1.0/arg)/eta; dsdvbs = (gammad*(1.0-arg)+2.0*argv/(gammad*arg))/ eta*dgdvbs+1.0/arg+factor*dsdvgs; } } else { vdsat = (vgsx-vbin)/eta; vdsat = MAX(vdsat,0.0); dsdvgs = 1.0; dsdvbs = 0.0; } if (model->MOS2maxDriftVel > 0) { /* * evaluate saturation voltage and its derivatives * according to baum's theory of scattering velocity * saturation */ gammd2 = gammad*gammad; v1 = (vgsx-vbin)/eta+phiMinVbs; v2 = phiMinVbs; xv = model->MOS2maxDriftVel*EffectiveLength/ueff; a1 = gammad/0.75; b1 = -2.0*(v1+xv); c1 = -2.0*gammad*xv; d1 = 2.0*v1*(v2+xv)-v2*v2-4.0/3.0*gammad*sarg3; a = -b1; b = a1*c1-4.0*d1; c = -d1*(a1*a1-4.0*b1)-c1*c1; r = -a*a/3.0+b; s = 2.0*a*a*a/27.0-a*b/3.0+c; r3 = r*r*r; s2 = s*s; p = s2/4.0+r3/27.0; p0 = fabs(p); p2 = sqrt(p0); if (p < 0) { ro = sqrt(s2/4.0+p0); ro = log(ro)/3.0; ro = exp(ro); fi = atan(-2.0*p2/s); y3 = 2.0*ro*cos(fi/3.0)-a/3.0; } else { p3 = (-s/2.0+p2); p3 = exp(log(fabs(p3))/3.0); p4 = (-s/2.0-p2); p4 = exp(log(fabs(p4))/3.0); y3 = p3+p4-a/3.0; } iknt = 0; a3 = sqrt(a1*a1/4.0-b1+y3); b3 = sqrt(y3*y3/4.0-d1); for(i = 1;i<=4;i++) { a4[i-1] = a1/2.0+sig1[i-1]*a3; b4[i-1] = y3/2.0+sig2[i-1]*b3; delta4 = a4[i-1]*a4[i-1]/4.0-b4[i-1]; if (delta4 < 0) continue; iknt = iknt+1; tmp = sqrt(delta4); x4[iknt-1] = -a4[i-1]/2.0+tmp; iknt = iknt+1; x4[iknt-1] = -a4[i-1]/2.0-tmp; } jknt = 0; for(j = 1;j<=iknt;j++) { if (x4[j-1] <= 0) continue; /* XXX implement this sanely */ poly4[j-1] = x4[j-1]*x4[j-1]*x4[j-1]*x4[j-1]+a1*x4[j-1]* x4[j-1]*x4[j-1]; poly4[j-1] = poly4[j-1]+b1*x4[j-1]*x4[j-1]+c1*x4[j-1]+d1; if (fabs(poly4[j-1]) > 1.0e-6) continue; jknt = jknt+1; if (jknt <= 1) { xvalid = x4[j-1]; } if (x4[j-1] > xvalid) continue; xvalid = x4[j-1]; } if (jknt > 0) { vdsat = xvalid*xvalid-phiMinVbs; } } /* * evaluate effective channel length and its derivatives */ if (lvds != 0.0) { gammad = gamasd; if ((lvbs-vdsat) <= 0) { bsarg = sqrt(vdsat+phiMinVbs); dbsrdb = -0.5/bsarg; } else { sphi = sqrt(here->MOS2tPhi);/* added by HT 050523 */ sphi3 = here->MOS2tPhi*sphi;/* added by HT 050523 */ bsarg = sphi/(1.0+0.5*(lvbs-vdsat)/here->MOS2tPhi); dbsrdb = -0.5*bsarg*bsarg/sphi3; } bodys = bsarg*bsarg*bsarg-sarg3; gdbdvs = 2.0*gammad*(bsarg*bsarg*dbsrdb-sarg*sarg*dsrgdb); if (model->MOS2maxDriftVel <= 0) { if (model->MOS2substrateDoping == 0.0) goto line610; if (xlamda > 0.0) goto line610; argv = (lvds-vdsat)/4.0; sargv = sqrt(1.0+argv*argv); arg = sqrt(argv+sargv); xlfact = model->MOS2xd/(EffectiveLength*lvds); xlamda = xlfact*arg; dldsat = lvds*xlamda/(8.0*sargv); } else { argv = (vgsx-vbin)/eta-vdsat; xdv = model->MOS2xd/sqrt(model->MOS2channelCharge); xlv = model->MOS2maxDriftVel*xdv/(2.0*ueff); vqchan = argv-gammad*bsarg; dqdsat = -1.0+gammad*dbsrdb; vl = model->MOS2maxDriftVel*EffectiveLength; dfunds = vl*dqdsat-ueff*vqchan; dfundg = (vl-ueff*vdsat)/eta; dfundb = -vl*(1.0+dqdsat-factor/eta)+ueff* (gdbdvs-dgdvbs*bodys/1.5)/eta; dsdvgs = -dfundg/dfunds; dsdvbs = -dfundb/dfunds; if (model->MOS2substrateDoping == 0.0) goto line610; if (xlamda > 0.0) goto line610; argv = lvds-vdsat; argv = MAX(argv,0.0); xls = sqrt(xlv*xlv+argv); dldsat = xdv/(2.0*xls); xlfact = xdv/(EffectiveLength*lvds); xlamda = xlfact*(xls-xlv); dldsat = dldsat/EffectiveLength; } dldvgs = dldsat*dsdvgs; dldvds = -xlamda+dldsat; dldvbs = dldsat*dsdvbs; } else { line610: dldvgs = 0.0; dldvds = 0.0; dldvbs = 0.0; } /* * limit channel shortening at punch-through */ xwb = model->MOS2xd*sbiarg; xld = EffectiveLength-xwb; clfact = 1.0-xlamda*lvds; dldvds = -xlamda-dldvds; xleff = EffectiveLength*clfact; deltal = xlamda*lvds*EffectiveLength; if (model->MOS2substrateDoping == 0.0) xwb = 0.25e-6; if (xleff < xwb) { xleff = xwb/(1.0+(deltal-xld)/xwb); clfact = xleff/EffectiveLength; dfact = xleff*xleff/(xwb*xwb); dldvgs = dfact*dldvgs; dldvds = dfact*dldvds; dldvbs = dfact*dldvbs; } /* * evaluate effective beta (effective kp) */ beta1 = Beta*ufact/clfact; /* * test for mode of operation and branch appropriately */ gammad = gamasd; dgdvbs = dgddvb; if (lvds <= 1.0e-10) { if (lvgs <= von) { if ((model->MOS2fastSurfaceStateDensity == 0.0) || (OxideCap == 0.0)) { here->MOS2gds = 0.0; goto line1050; } here->MOS2gds = beta1*(von-vbin-gammad*sarg)*exp(argg* (lvgs-von)); goto line1050; } here->MOS2gds = beta1*(lvgs-vbin-gammad*sarg); goto line1050; } if (model->MOS2fastSurfaceStateDensity != 0 && OxideCap != 0) { if (lvgs > von) goto line900; } else { if (lvgs > vbin) goto line900; goto doneval; } if (lvgs > von) goto line900; /* * subthreshold region */ if (vdsat <= 0) { here->MOS2gds = 0.0; if (lvgs > vth) goto doneval; goto line1050; } vdson = MIN(vdsat,lvds); if (lvds > vdsat) { barg = bsarg; dbrgdb = dbsrdb; body = bodys; gdbdv = gdbdvs; } cdson = beta1*((von-vbin-eta*vdson*0.5)*vdson-gammad*body/1.5); didvds = beta1*(von-vbin-eta*vdson-gammad*barg); gdson = -cdson*dldvds/clfact-beta1*dgdvds*body/1.5; if (lvds < vdsat) gdson = gdson+didvds; gbson = -cdson*dldvbs/clfact+beta1* (dodvbs*vdson+factor*vdson-dgdvbs*body/1.5-gdbdv); if (lvds > vdsat) gbson = gbson+didvds*dsdvbs; expg = exp(argg*(lvgs-von)); cdrain = cdson*expg; gmw = cdrain*argg; here->MOS2gm = gmw; if (lvds > vdsat) here->MOS2gm = gmw+didvds*dsdvgs*expg; tmp = gmw*(lvgs-von)/xn; here->MOS2gds = gdson*expg-here->MOS2gm*dodvds-tmp*dxndvd; here->MOS2gmbs = gbson*expg-here->MOS2gm*dodvbs-tmp*dxndvb; goto doneval; line900: if (lvds <= vdsat) { /* * linear region */ cdrain = beta1*((lvgs-vbin-eta*lvds/2.0)*lvds-gammad*body/1.5); arg = cdrain*(dudvgs/ufact-dldvgs/clfact); here->MOS2gm = arg+beta1*lvds; arg = cdrain*(dudvds/ufact-dldvds/clfact); here->MOS2gds = arg+beta1*(lvgs-vbin-eta* lvds-gammad*barg-dgdvds*body/1.5); arg = cdrain*(dudvbs/ufact-dldvbs/clfact); here->MOS2gmbs = arg-beta1*(gdbdv+dgdvbs*body/1.5-factor*lvds); } else { /* * saturation region */ cdrain = beta1*((lvgs-vbin-eta* vdsat/2.0)*vdsat-gammad*bodys/1.5); arg = cdrain*(dudvgs/ufact-dldvgs/clfact); here->MOS2gm = arg+beta1*vdsat+beta1*(lvgs- vbin-eta*vdsat-gammad*bsarg)*dsdvgs; here->MOS2gds = -cdrain*dldvds/clfact-beta1*dgdvds*bodys/1.5; arg = cdrain*(dudvbs/ufact-dldvbs/clfact); here->MOS2gmbs = arg-beta1*(gdbdvs+dgdvbs*bodys/1.5-factor* vdsat)+beta1* (lvgs-vbin-eta*vdsat-gammad*bsarg)*dsdvbs; } /* * compute charges for "on" region */ goto doneval; /* * finish special cases */ line1050: cdrain = 0.0; here->MOS2gm = 0.0; here->MOS2gmbs = 0.0; /* * finished */ } doneval: here->MOS2von = model->MOS2type * von; here->MOS2vdsat = model->MOS2type * vdsat; /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->MOS2cd=here->MOS2mode * cdrain - here->MOS2cbd; if (ckt->CKTmode & (MODETRAN | MODETRANOP|MODEINITSMSIG)) { /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS2vbs)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ { /* can't bypass the diode capacitance calculations */ if(here->MOS2Cbs != 0 || here->MOS2Cbssw != 0) { if (vbs < here->MOS2tDepCap){ arg=1-vbs/here->MOS2tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS2bulkJctBotGradingCoeff == model->MOS2bulkJctSideGradingCoeff) { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } if(model->MOS2bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS2bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS2qbs) = here->MOS2tBulkPot*(here->MOS2Cbs* (1-arg*sarg)/(1-model->MOS2bulkJctBotGradingCoeff) +here->MOS2Cbssw* (1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff)); here->MOS2capbs=here->MOS2Cbs*sarg+ here->MOS2Cbssw*sargsw; } else { *(ckt->CKTstate0 + here->MOS2qbs) = here->MOS2f4s + vbs*(here->MOS2f2s+vbs*(here->MOS2f3s/2)); here->MOS2capbs=here->MOS2f2s+here->MOS2f3s*vbs; } } else { *(ckt->CKTstate0 + here->MOS2qbs) = 0; here->MOS2capbs=0; } } #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS2vbd)))+ ckt->CKTvoltTol)|| senflag) #endif /*CAPBYPASS*/ /* can't bypass the diode capacitance calculations */ { if(here->MOS2Cbd != 0 || here->MOS2Cbdsw != 0 ) { if (vbd < here->MOS2tDepCap) { arg=1-vbd/here->MOS2tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS2bulkJctBotGradingCoeff == .5 && model->MOS2bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS2bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS2bulkJctBotGradingCoeff* log(arg)); } if(model->MOS2bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS2bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS2qbd) = here->MOS2tBulkPot*(here->MOS2Cbd* (1-arg*sarg) /(1-model->MOS2bulkJctBotGradingCoeff) +here->MOS2Cbdsw* (1-arg*sargsw) /(1-model->MOS2bulkJctSideGradingCoeff)); here->MOS2capbd=here->MOS2Cbd*sarg+ here->MOS2Cbdsw*sargsw; } else { *(ckt->CKTstate0 + here->MOS2qbd) = here->MOS2f4d + vbd * (here->MOS2f2d + vbd * here->MOS2f3d/2); here->MOS2capbd=here->MOS2f2d + vbd * here->MOS2f3d; } } else { *(ckt->CKTstate0 + here->MOS2qbd) = 0; here->MOS2capbd = 0; } } if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2; if ( ckt->CKTmode & MODETRAN ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ceq,here->MOS2capbd, here->MOS2qbd); if(error) return(error); here->MOS2gbd += geq; here->MOS2cbd += *(ckt->CKTstate0 + here->MOS2cqbd); here->MOS2cd -= *(ckt->CKTstate0 + here->MOS2cqbd); error = NIintegrate(ckt,&geq,&ceq,here->MOS2capbs, here->MOS2qbs); if(error) return(error); here->MOS2gbs += geq; here->MOS2cbs += *(ckt->CKTstate0 + here->MOS2cqbs); } } if(SenCond) goto next2; /* * check convergence */ if ( (here->MOS2off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } next2: *(ckt->CKTstate0 + here->MOS2vbs) = vbs; *(ckt->CKTstate0 + here->MOS2vbd) = vbd; *(ckt->CKTstate0 + here->MOS2vgs) = vgs; *(ckt->CKTstate0 + here->MOS2vds) = vds; /* * meyer's capacitor model */ if ( ckt->CKTmode & (MODETRAN|MODETRANOP|MODEINITSMSIG)) { /* * calculate meyer's capacitors */ if (here->MOS2mode > 0){ DEVqmeyer (vgs,vgd,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS2capgs), (ckt->CKTstate0 + here->MOS2capgd), (ckt->CKTstate0 + here->MOS2capgb), here->MOS2tPhi,OxideCap); } else { DEVqmeyer (vgd,vgs,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS2capgd), (ckt->CKTstate0 + here->MOS2capgs), (ckt->CKTstate0 + here->MOS2capgb), here->MOS2tPhi,OxideCap); } vgs1 = *(ckt->CKTstate1 + here->MOS2vgs); vgd1 = vgs1 - *(ckt->CKTstate1 + here->MOS2vds); vgb1 = vgs1 - *(ckt->CKTstate1 + here->MOS2vbs); if(ckt->CKTmode & MODETRANOP) { capgs = 2 * *(ckt->CKTstate0 + here->MOS2capgs)+ GateSourceOverlapCap; capgd = 2 * *(ckt->CKTstate0 + here->MOS2capgd)+ GateDrainOverlapCap; capgb = 2 * *(ckt->CKTstate0 + here->MOS2capgb)+ GateBulkOverlapCap; } else { capgs = *(ckt->CKTstate0 + here->MOS2capgs)+ *(ckt->CKTstate1 + here->MOS2capgs)+ GateSourceOverlapCap; capgd = *(ckt->CKTstate0 + here->MOS2capgd)+ *(ckt->CKTstate1 + here->MOS2capgd)+ GateDrainOverlapCap; capgb = *(ckt->CKTstate0 + here->MOS2capgb)+ *(ckt->CKTstate1 + here->MOS2capgb)+ GateBulkOverlapCap; } if(ckt->CKTsenInfo){ here->MOS2cgs = capgs; here->MOS2cgd = capgd; here->MOS2cgb = capgb; } /* * store small-signal parameters (for meyer's model) * all parameters already stored, so done... */ if(SenCond){ if(ckt->CKTsenInfo->SENmode & (DCSEN|ACSEN)){ continue; } } #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { *(ckt->CKTstate0 + here->MOS2qgs) = (1+xfact) * *(ckt->CKTstate1 + here->MOS2qgs) -xfact * *(ckt->CKTstate2 + here->MOS2qgs); *(ckt->CKTstate0 + here->MOS2qgd) = (1+xfact) * *(ckt->CKTstate1 + here->MOS2qgd) -xfact * *(ckt->CKTstate2 + here->MOS2qgd); *(ckt->CKTstate0 + here->MOS2qgb) = (1+xfact) * *(ckt->CKTstate1 + here->MOS2qgb) -xfact * *(ckt->CKTstate2 + here->MOS2qgb); } else { #endif /* PREDICTOR */ if(ckt->CKTmode & MODETRAN) { *(ckt->CKTstate0 + here->MOS2qgs) = (vgs-vgs1)*capgs + *(ckt->CKTstate1 + here->MOS2qgs) ; *(ckt->CKTstate0 + here->MOS2qgd) = (vgd-vgd1)*capgd + *(ckt->CKTstate1 + here->MOS2qgd) ; *(ckt->CKTstate0 + here->MOS2qgb) = (vgb-vgb1)*capgb + *(ckt->CKTstate1 + here->MOS2qgb) ; } else { /* TRANOP */ *(ckt->CKTstate0 + here->MOS2qgs) = capgs*vgs; *(ckt->CKTstate0 + here->MOS2qgd) = capgd*vgd; *(ckt->CKTstate0 + here->MOS2qgb) = capgb*vgb; } #ifndef PREDICTOR } #endif /* PREDICTOR */ } #ifndef NOBYPASS bypass: #endif /* NOBYPASS */ if(SenCond) continue; if((ckt->CKTmode & MODEINITTRAN) || (!(ckt->CKTmode & MODETRAN)) ) { /* initialize to zero charge conductances and current */ gcgs=0; ceqgs=0; gcgd=0; ceqgd=0; gcgb=0; ceqgb=0; } else { if(capgs == 0) *(ckt->CKTstate0 + here->MOS2cqgs) =0; if(capgd == 0) *(ckt->CKTstate0 + here->MOS2cqgd) =0; if(capgb == 0) *(ckt->CKTstate0 + here->MOS2cqgb) =0; /* * calculate equivalent conductances and currents for * meyer"s capacitors */ error = NIintegrate(ckt,&gcgs,&ceqgs,capgs,here->MOS2qgs); if(error) return(error); error = NIintegrate(ckt,&gcgd,&ceqgd,capgd,here->MOS2qgd); if(error) return(error); error = NIintegrate(ckt,&gcgb,&ceqgb,capgb,here->MOS2qgb); if(error) return(error); ceqgs=ceqgs-gcgs*vgs+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS2qgs); ceqgd=ceqgd-gcgd*vgd+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS2qgd); ceqgb=ceqgb-gcgb*vgb+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS2qgb); } /* * store charge storage info for meyer's cap in lx table */ /* * load current vector */ ceqbs = model->MOS2type * (here->MOS2cbs-(here->MOS2gbs)*vbs); ceqbd = model->MOS2type * (here->MOS2cbd-(here->MOS2gbd)*vbd); if (here->MOS2mode >= 0) { xnrm=1; xrev=0; cdreq=model->MOS2type*(cdrain-here->MOS2gds*vds- here->MOS2gm*vgs-here->MOS2gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->MOS2type)*(cdrain-here->MOS2gds*(-vds)- here->MOS2gm*vgd-here->MOS2gmbs*vbd); } *(ckt->CKTrhs + here->MOS2gNode) -= model->MOS2type * (ceqgs + ceqgb + ceqgd); *(ckt->CKTrhs + here->MOS2bNode) -= (ceqbs+ceqbd-model->MOS2type * ceqgb); *(ckt->CKTrhs + here->MOS2dNodePrime) += ceqbd - cdreq + model->MOS2type * ceqgd; *(ckt->CKTrhs + here->MOS2sNodePrime) += cdreq + ceqbs + model->MOS2type * ceqgs; #if 0 printf(" loading %s at time %g\n", here->MOS2name, ckt->CKTtime); printf("%g %g %g %g %g\n", here->MOS2drainConductance, gcgd+gcgs+gcgb, here->MOS2sourceConductance, here->MOS2gbd, here->MOS2gbs); printf("%g %g %g %g %g\n", -gcgb, 0.0, 0.0, here->MOS2gds, here->MOS2gm); printf("%g %g %g %g %g\n", here->MOS2gds, here->MOS2gmbs, gcgd, -gcgs, -gcgd); printf("%g %g %g %g %g\n", -gcgs, -gcgd, 0.0, -gcgs, 0.0); #endif /* * load y matrix */ *(here->MOS2DdPtr) += (here->MOS2drainConductance); *(here->MOS2GgPtr) += gcgd+gcgs+gcgb; *(here->MOS2SsPtr) += (here->MOS2sourceConductance); *(here->MOS2BbPtr) += (here->MOS2gbd+here->MOS2gbs+gcgb); *(here->MOS2DPdpPtr) += here->MOS2drainConductance+here->MOS2gds+ here->MOS2gbd+xrev*(here->MOS2gm+here->MOS2gmbs)+gcgd; *(here->MOS2SPspPtr) += here->MOS2sourceConductance+here->MOS2gds+ here->MOS2gbs+xnrm*(here->MOS2gm+here->MOS2gmbs)+gcgs; *(here->MOS2DdpPtr) -= here->MOS2drainConductance; *(here->MOS2GbPtr) -= gcgb; *(here->MOS2GdpPtr) -= gcgd; *(here->MOS2GspPtr) -= gcgs; *(here->MOS2SspPtr) -= here->MOS2sourceConductance; *(here->MOS2BgPtr) -= gcgb; *(here->MOS2BdpPtr) -= here->MOS2gbd; *(here->MOS2BspPtr) -= here->MOS2gbs; *(here->MOS2DPdPtr) -= here->MOS2drainConductance; *(here->MOS2DPgPtr) += ((xnrm-xrev)*here->MOS2gm-gcgd); *(here->MOS2DPbPtr) += (-here->MOS2gbd+(xnrm-xrev)*here->MOS2gmbs); *(here->MOS2DPspPtr) -= here->MOS2gds+xnrm*(here->MOS2gm+ here->MOS2gmbs); *(here->MOS2SPgPtr) -= (xnrm-xrev)*here->MOS2gm+gcgs; *(here->MOS2SPsPtr) -= here->MOS2sourceConductance; *(here->MOS2SPbPtr) -= here->MOS2gbs+(xnrm-xrev)*here->MOS2gmbs; *(here->MOS2SPdpPtr) -= here->MOS2gds+xrev*(here->MOS2gm+ here->MOS2gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos2/Makefile.in0000644000265600020320000004434512264261537021174 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mos2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmos2_la_LIBADD = am_libmos2_la_OBJECTS = mos2.lo mos2acld.lo mos2ask.lo mos2conv.lo \ mos2del.lo mos2dest.lo mos2dist.lo mos2dset.lo mos2ic.lo \ mos2init.lo mos2load.lo mos2mask.lo mos2mdel.lo mos2mpar.lo \ mos2noi.lo mos2par.lo mos2pzld.lo mos2sacl.lo mos2set.lo \ mos2sld.lo mos2sprt.lo mos2sset.lo mos2supd.lo mos2temp.lo \ mos2trun.lo libmos2_la_OBJECTS = $(am_libmos2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmos2_la_SOURCES) DIST_SOURCES = $(libmos2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmos2.la libmos2_la_SOURCES = \ mos2.c \ mos2acld.c \ mos2ask.c \ mos2conv.c \ mos2defs.h \ mos2del.c \ mos2dest.c \ mos2dist.c \ mos2dset.c \ mos2ext.h \ mos2ic.c \ mos2init.c \ mos2init.h \ mos2itf.h \ mos2load.c \ mos2mask.c \ mos2mdel.c \ mos2mpar.c \ mos2noi.c \ mos2par.c \ mos2pzld.c \ mos2sacl.c \ mos2set.c \ mos2sld.c \ mos2sprt.c \ mos2sset.c \ mos2supd.c \ mos2temp.c \ mos2trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mos2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mos2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmos2.la: $(libmos2_la_OBJECTS) $(libmos2_la_DEPENDENCIES) $(EXTRA_libmos2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmos2_la_OBJECTS) $(libmos2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2dset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2sacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2sld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2sprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2sset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2supd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos2trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mos2/mos2ask.c0000644000265600020320000004023212264261473020640 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS2ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MOS2instance *here = (MOS2instance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case MOS2_TEMP: value->rValue = here->MOS2temp-CONSTCtoK; return(OK); case MOS2_DTEMP: value->rValue = here->MOS2dtemp; return(OK); case MOS2_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgs); return(OK); case MOS2_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgd); return(OK); case MOS2_M: value->rValue = here->MOS2m; return(OK); case MOS2_L: value->rValue = here->MOS2l; return(OK); case MOS2_W: value->rValue = here->MOS2w; return(OK); case MOS2_AS: value->rValue = here->MOS2sourceArea; return(OK); case MOS2_AD: value->rValue = here->MOS2drainArea; return(OK); case MOS2_PS: value->rValue = here->MOS2sourcePerimiter; return(OK); case MOS2_PD: value->rValue = here->MOS2drainPerimiter; return(OK); case MOS2_NRS: value->rValue = here->MOS2sourceSquares; return(OK); case MOS2_NRD: value->rValue = here->MOS2drainSquares; return(OK); case MOS2_OFF: value->rValue = here->MOS2off; return(OK); case MOS2_IC_VBS: value->rValue = here->MOS2icVBS; return(OK); case MOS2_IC_VDS: value->rValue = here->MOS2icVDS; return(OK); case MOS2_IC_VGS: value->rValue = here->MOS2icVGS; return(OK); case MOS2_DNODE: value->iValue = here->MOS2dNode; return(OK); case MOS2_GNODE: value->iValue = here->MOS2gNode; return(OK); case MOS2_SNODE: value->iValue = here->MOS2sNode; return(OK); case MOS2_BNODE: value->iValue = here->MOS2bNode; return(OK); case MOS2_DNODEPRIME: value->iValue = here->MOS2dNodePrime; return(OK); case MOS2_SNODEPRIME: value->iValue = here->MOS2sNodePrime; return(OK); case MOS2_SOURCECONDUCT: value->rValue = here->MOS2sourceConductance; return(OK); case MOS2_DRAINCONDUCT: value->rValue = here->MOS2drainConductance; return(OK); case MOS2_SOURCERESIST: if (here->MOS2sNodePrime != here->MOS2sNode) value->rValue = 1.0 / here->MOS2sourceConductance; else value->rValue = 0.0; return(OK); case MOS2_DRAINRESIST: if (here->MOS2dNodePrime != here->MOS2dNode) value->rValue = 1.0 / here->MOS2drainConductance; else value->rValue = 0.0; return(OK); case MOS2_VON: value->rValue = here->MOS2von; return(OK); case MOS2_VDSAT: value->rValue = here->MOS2vdsat; return(OK); case MOS2_SOURCEVCRIT: value->rValue = here->MOS2sourceVcrit; return(OK); case MOS2_DRAINVCRIT: value->rValue = here->MOS2drainVcrit; return(OK); case MOS2_CD: value->rValue = here->MOS2cd; return(OK); case MOS2_CBS: value->rValue = here->MOS2cbs; return(OK); case MOS2_CBD: value->rValue = here->MOS2cbd; return(OK); case MOS2_GMBS: value->rValue = here->MOS2gmbs; return(OK); case MOS2_GM: value->rValue = here->MOS2gm; return(OK); case MOS2_GDS: value->rValue = here->MOS2gds; return(OK); case MOS2_GBD: value->rValue = here->MOS2gbd; return(OK); case MOS2_GBS: value->rValue = here->MOS2gbs; return(OK); case MOS2_CAPBD: value->rValue = here->MOS2capbd; return(OK); case MOS2_CAPBS: value->rValue = here->MOS2capbs; return(OK); case MOS2_CAPZEROBIASBD: value->rValue = here->MOS2Cbd; return(OK); case MOS2_CAPZEROBIASBDSW: value->rValue = here->MOS2Cbdsw; return(OK); case MOS2_CAPZEROBIASBS: value->rValue = here->MOS2Cbs; return(OK); case MOS2_CAPZEROBIASBSSW: value->rValue = here->MOS2Cbssw; return(OK); case MOS2_VBD: value->rValue = *(ckt->CKTstate0 + here->MOS2vbd); return(OK); case MOS2_VBS: value->rValue = *(ckt->CKTstate0 + here->MOS2vbs); return(OK); case MOS2_VGS: value->rValue = *(ckt->CKTstate0 + here->MOS2vgs); return(OK); case MOS2_VDS: value->rValue = *(ckt->CKTstate0 + here->MOS2vds); return(OK); case MOS2_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgs); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateSourceOverlapCapFactor) * here->MOS2m * (here->MOS2w); return(OK); case MOS2_QGS: value->rValue = *(ckt->CKTstate0 + here->MOS2qgs); return(OK); case MOS2_CQGS: value->rValue = *(ckt->CKTstate0 + here->MOS2cqgs); return(OK); case MOS2_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgd); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateDrainOverlapCapFactor) * here->MOS2m * (here->MOS2w); return(OK); case MOS2_QGD: value->rValue = *(ckt->CKTstate0 + here->MOS2qgd); return(OK); case MOS2_CQGD: value->rValue = *(ckt->CKTstate0 + here->MOS2cqgd); return(OK); case MOS2_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgb); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateBulkOverlapCapFactor) * here->MOS2m * (here->MOS2l -2*(here->MOS2modPtr->MOS2latDiff)); return(OK); case MOS2_QGB: value->rValue = *(ckt->CKTstate0 + here->MOS2qgb); return(OK); case MOS2_CQGB: value->rValue = *(ckt->CKTstate0 + here->MOS2cqgb); return(OK); case MOS2_QBD: value->rValue = *(ckt->CKTstate0 + here->MOS2qbd); return(OK); case MOS2_CQBD: value->rValue = *(ckt->CKTstate0 + here->MOS2cqbd); return(OK); case MOS2_QBS: value->rValue = *(ckt->CKTstate0 + here->MOS2qbs); return(OK); case MOS2_CQBS: value->rValue = *(ckt->CKTstate0 + here->MOS2cqbs); return(OK); case MOS2_L_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS2senParmNo); } return(OK); case MOS2_L_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo); } return(OK); case MOS2_L_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo); } return(OK); case MOS2_L_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS2_L_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS2_L_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo); } return(OK); case MOS2_W_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); } return(OK); case MOS2_W_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); } return(OK); case MOS2_W_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); } return(OK); case MOS2_W_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS2_W_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS2_W_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS2senParmNo + here->MOS2sens_l); } return(OK); case MOS2_CB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS2ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->MOS2cbd + here->MOS2cbs - *(ckt->CKTstate0 + here->MOS2cqgb); } return(OK); case MOS2_CG : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS2ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->MOS2cqgb) + *(ckt->CKTstate0 + here->MOS2cqgd) + *(ckt->CKTstate0 + here->MOS2cqgs); } return(OK); case MOS2_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS2ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->MOS2cd; value->rValue -= here->MOS2cbd + here->MOS2cbs - *(ckt->CKTstate0 + here->MOS2cqgb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->MOS2cqgb) + *(ckt->CKTstate0 + here->MOS2cqgd) + *(ckt->CKTstate0 + here->MOS2cqgs); } } return(OK); case MOS2_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS2ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->MOS2cd * *(ckt->CKTrhsOld + here->MOS2dNode); value->rValue += (here->MOS2cbd + here->MOS2cbs - *(ckt->CKTstate0 + here->MOS2cqgb)) * *(ckt->CKTrhsOld + here->MOS2bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->MOS2cqgb) + *(ckt->CKTstate0 + here->MOS2cqgd) + *(ckt->CKTstate0 + here->MOS2cqgs)) * *(ckt->CKTrhsOld + here->MOS2gNode); } temp = -here->MOS2cd; temp -= here->MOS2cbd + here->MOS2cbs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->MOS2cqgb) + *(ckt->CKTstate0 + here->MOS2cqgd) + *(ckt->CKTstate0 + here->MOS2cqgs); } value->rValue += temp * *(ckt->CKTrhsOld + here->MOS2sNode); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos2/mos2defs.h0000644000265600020320000005017512264261473021017 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFIxes **********/ #ifndef MOS2 #define MOS2 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for level 2 MOSFETs */ /* information needed for each instance */ typedef struct sMOS2instance { struct sMOS2model *MOS2modPtr; /* backpointer to model */ struct sMOS2instance *MOS2nextInstance; /* pointer to next instance of *current model*/ IFuid MOS2name; /* pointer to character string naming this instance */ int MOS2states; /* index into state table for this device */ int MOS2dNode; /* number of the gate node of the mosfet */ int MOS2gNode; /* number of the gate node of the mosfet */ int MOS2sNode; /* number of the source node of the mosfet */ int MOS2bNode; /* number of the bulk node of the mosfet */ int MOS2dNodePrime; /* number of the internal drain node of the mosfet */ int MOS2sNodePrime; /* number of the internal source node of the mosfet */ int MOS2mode; /* device mode : 1 = normal, -1 = inverse */ unsigned MOS2mGiven :1; unsigned MOS2off :1;/* non-zero to indicate device is off for dc analysis*/ unsigned MOS2lGiven :1; unsigned MOS2wGiven :1; unsigned MOS2drainAreaGiven :1; unsigned MOS2sourceAreaGiven :1; unsigned MOS2drainSquaresGiven :1; unsigned MOS2sourceSquaresGiven :1; unsigned MOS2drainPerimiterGiven :1; unsigned MOS2sourcePerimiterGiven :1; unsigned MOS2dNodePrimeSet :1; unsigned MOS2sNodePrimeSet :1; unsigned MOS2icVBSGiven :1; unsigned MOS2icVDSGiven :1; unsigned MOS2icVGSGiven :1; unsigned MOS2vonGiven :1; unsigned MOS2vdsatGiven :1; unsigned MOS2tempGiven :1; /* per-instance temperature specified? */ unsigned MOS2dtempGiven :1; /* per-instance temperature difference specified? */ unsigned MOS2sens_l :1; /* field which indicates whether length of the mosfet is a design parameter or not */ unsigned MOS2sens_w :1; /* field which indicates whether width of the mosfet is a design parameter or not */ unsigned MOS2senPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ double *MOS2DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *MOS2GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *MOS2SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *MOS2BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *MOS2DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *MOS2SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *MOS2DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *MOS2GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *MOS2GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *MOS2GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *MOS2SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *MOS2BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *MOS2BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *MOS2DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *MOS2DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *MOS2BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *MOS2DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *MOS2SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *MOS2SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *MOS2DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *MOS2SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *MOS2SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ int MOS2senParmNo; /* parameter # for sensitivity use; set equal to 0 if neither length nor width of the mosfet is a design parameter */ double MOS2cgs; double MOS2cgd; double MOS2cgb; double *MOS2sens; #define MOS2senCgs MOS2sens /* contains pertured values of cgs */ #define MOS2senCgd MOS2sens + 6 /* contains perturbed values of cgd*/ #define MOS2senCgb MOS2sens + 12 /* contains perturbed values of cgb*/ #define MOS2senCbd MOS2sens + 18 /* contains perturbed values of cbd*/ #define MOS2senCbs MOS2sens + 24 /* contains perturbed values of cbs*/ #define MOS2senGds MOS2sens + 30 /* contains perturbed values of gds*/ #define MOS2senGbs MOS2sens + 36 /* contains perturbed values of gbs*/ #define MOS2senGbd MOS2sens + 42 /* contains perturbed values of gbd*/ #define MOS2senGm MOS2sens + 48 /* contains perturbed values of gm*/ #define MOS2senGmbs MOS2sens + 54 /* contains perturbed values of gmbs*/ #define MOS2dphigs_dl MOS2sens + 60 #define MOS2dphigd_dl MOS2sens + 61 #define MOS2dphigb_dl MOS2sens + 62 #define MOS2dphibs_dl MOS2sens + 63 #define MOS2dphibd_dl MOS2sens + 64 #define MOS2dphigs_dw MOS2sens + 65 #define MOS2dphigd_dw MOS2sens + 66 #define MOS2dphigb_dw MOS2sens + 67 #define MOS2dphibs_dw MOS2sens + 68 #define MOS2dphibd_dw MOS2sens + 69 double MOS2temp; /* temperature at which this instance operates */ double MOS2dtemp; /* difference of instance temperature from circuit temperature */ double MOS2tTransconductance; /* temperature corrected transconductance*/ double MOS2tSurfMob; /* temperature corrected surface mobility */ double MOS2tPhi; /* temperature corrected Phi */ double MOS2tVto; /* temperature corrected Vto */ double MOS2tSatCur; /* temperature corrected saturation Cur. */ double MOS2tSatCurDens; /* temperature corrected saturation Cur. density*/ double MOS2tCbd; /* temperature corrected B-D Capacitance */ double MOS2tCbs; /* temperature corrected B-S Capacitance */ double MOS2tCj; /* temperature corrected Bulk bottom Capacitance */ double MOS2tCjsw; /* temperature corrected Bulk side Capacitance */ double MOS2tBulkPot; /* temperature corrected Bulk potential */ double MOS2tDepCap; /* temperature adjusted transition point in */ /* the cureve matching Fc * Vj */ double MOS2tVbi; /* temperature adjusted Vbi */ double MOS2m; /* parallel device multiplier */ double MOS2l; /* the length of the channel region */ double MOS2w; /* the width of the channel region */ double MOS2drainArea; /* the area of the drain diffusion */ double MOS2sourceArea; /* the area of the source diffusion */ double MOS2drainSquares; /* the length of the drain in squares */ double MOS2sourceSquares; /* the length of the source in squares */ double MOS2drainPerimiter; double MOS2sourcePerimiter; double MOS2sourceConductance; /*conductance of source(or 0):set in setup*/ double MOS2drainConductance; /*conductance of drain(or 0):set in setup*/ double MOS2icVBS; /* initial condition B-S voltage */ double MOS2icVDS; /* initial condition D-S voltage */ double MOS2icVGS; /* initial condition G-S voltage */ double MOS2von; double MOS2vdsat; double MOS2sourceVcrit; /* Vcrit for pos. vds */ double MOS2drainVcrit; /* Vcrit for pos. vds */ double MOS2cd; double MOS2cbs; double MOS2cbd; double MOS2gmbs; double MOS2gm; double MOS2gds; double MOS2gbd; double MOS2gbs; double MOS2capbd; double MOS2capbs; double MOS2Cbd; double MOS2Cbdsw; double MOS2Cbs; double MOS2Cbssw; double MOS2f2d; double MOS2f3d; double MOS2f4d; double MOS2f2s; double MOS2f3s; double MOS2f4s; /* distortion stuff */ /* * naming convention: * x = vgs * y = vbs * z = vds * cdr = cdrain */ #define MOS2NDCOEFFS 30 #ifndef NODISTO double MOS2dCoeffs[MOS2NDCOEFFS]; #else /* NODISTO */ double *MOS2dCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define capbs2 MOS2dCoeffs[0] #define capbs3 MOS2dCoeffs[1] #define capbd2 MOS2dCoeffs[2] #define capbd3 MOS2dCoeffs[3] #define gbs2 MOS2dCoeffs[4] #define gbs3 MOS2dCoeffs[5] #define gbd2 MOS2dCoeffs[6] #define gbd3 MOS2dCoeffs[7] #define capgb2 MOS2dCoeffs[8] #define capgb3 MOS2dCoeffs[9] #define cdr_x2 MOS2dCoeffs[10] #define cdr_y2 MOS2dCoeffs[11] #define cdr_z2 MOS2dCoeffs[12] #define cdr_xy MOS2dCoeffs[13] #define cdr_yz MOS2dCoeffs[14] #define cdr_xz MOS2dCoeffs[15] #define cdr_x3 MOS2dCoeffs[16] #define cdr_y3 MOS2dCoeffs[17] #define cdr_z3 MOS2dCoeffs[18] #define cdr_x2z MOS2dCoeffs[19] #define cdr_x2y MOS2dCoeffs[20] #define cdr_y2z MOS2dCoeffs[21] #define cdr_xy2 MOS2dCoeffs[22] #define cdr_xz2 MOS2dCoeffs[23] #define cdr_yz2 MOS2dCoeffs[24] #define cdr_xyz MOS2dCoeffs[25] #define capgs2 MOS2dCoeffs[26] #define capgs3 MOS2dCoeffs[27] #define capgd2 MOS2dCoeffs[28] #define capgd3 MOS2dCoeffs[29] /* end distortion coeffs. */ #endif /* indices to the array of MOSFET(2) noise sources */ #define MOS2RDNOIZ 0 #define MOS2RSNOIZ 1 #define MOS2IDNOIZ 2 #define MOS2FLNOIZ 3 #define MOS2TOTNOIZ 4 #define MOS2NSRCS 5 /* the number of MOS2FET noise sources */ #ifndef NONOISE double MOS2nVar[NSTATVARS][MOS2NSRCS]; #else /* NONOISE */ double **MOS2nVar; #endif /* NONOISE */ } MOS2instance ; #define MOS2vbd MOS2states+ 0 /* bulk-drain voltage */ #define MOS2vbs MOS2states+ 1 /* bulk-source voltage */ #define MOS2vgs MOS2states+ 2 /* gate-source voltage */ #define MOS2vds MOS2states+ 3 /* drain-source voltage */ #define MOS2capgs MOS2states+4 /* gate-source capacitor value */ #define MOS2qgs MOS2states+ 5 /* gate-source capacitor charge */ #define MOS2cqgs MOS2states+ 6 /* gate-source capacitor current */ #define MOS2capgd MOS2states+ 7 /* gate-drain capacitor value */ #define MOS2qgd MOS2states+ 8 /* gate-drain capacitor charge */ #define MOS2cqgd MOS2states+ 9 /* gate-drain capacitor current */ #define MOS2capgb MOS2states+10 /* gate-bulk capacitor value */ #define MOS2qgb MOS2states+ 11 /* gate-bulk capacitor charge */ #define MOS2cqgb MOS2states+ 12 /* gate-bulk capacitor current */ #define MOS2qbd MOS2states+ 13 /* bulk-drain capacitor charge */ #define MOS2cqbd MOS2states+ 14 /* bulk-drain capacitor current */ #define MOS2qbs MOS2states+ 15 /* bulk-source capacitor charge */ #define MOS2cqbs MOS2states+ 16 /* bulk-source capacitor current */ #define MOS2numStates 17 #define MOS2sensxpgs MOS2states+17 /* charge sensitivities and their derivatives +18 for the derivatives - pointer to the beginning of the array */ #define MOS2sensxpgd MOS2states+19 #define MOS2sensxpgb MOS2states+21 #define MOS2sensxpbs MOS2states+23 #define MOS2sensxpbd MOS2states+25 #define MOS2numSenStates 10 /* per model data */ /* NOTE: parameters makred 'input - use xxxx' are parameters for * which a temperature correction is applied in MOS2temp, thus * the MOS3xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sMOS2model { /* model structure for a resistor */ int MOS2modType; /* type index of this device type */ struct sMOS2model *MOS2nextModel; /* pointer to next possible model *in linked list */ MOS2instance * MOS2instances; /* pointer to list of instances * that have this model */ IFuid MOS2modName; /* pointer to character string naming this model */ int MOS2type; /* device type : 1 = nmos, -1 = pmos */ int MOS2gateType; double MOS2tnom; /* temperature at which parms were measured */ double MOS2latDiff; double MOS2jctSatCurDensity; /* input - use tSatCurDens */ double MOS2jctSatCur; /* input - use tSatCur */ double MOS2drainResistance; double MOS2sourceResistance; double MOS2sheetResistance; double MOS2transconductance; /* input - use tTransconductance */ double MOS2gateSourceOverlapCapFactor; double MOS2gateDrainOverlapCapFactor; double MOS2gateBulkOverlapCapFactor; double MOS2oxideCapFactor; double MOS2vt0; /* input - use tVto */ double MOS2capBD; /* input - use tCbd */ double MOS2capBS; /* input - use tCbs */ double MOS2bulkCapFactor; /* input - use tCj */ double MOS2sideWallCapFactor; /* input - use tCjsw */ double MOS2bulkJctPotential; /* input - use tBulkPot */ double MOS2bulkJctBotGradingCoeff; double MOS2bulkJctSideGradingCoeff; double MOS2fwdCapDepCoeff; double MOS2phi; /* input - use tPhi */ double MOS2gamma; double MOS2lambda; double MOS2substrateDoping; double MOS2surfaceStateDensity; double MOS2fastSurfaceStateDensity; /* nfs */ double MOS2oxideThickness; double MOS2surfaceMobility; double MOS2fNcoef; double MOS2fNexp; double MOS2narrowFactor; /* delta */ double MOS2critFieldExp; /* uexp */ double MOS2critField; /* ucrit */ double MOS2maxDriftVel; /* vmax */ double MOS2xd; double MOS2junctionDepth; /* xj */ double MOS2channelCharge; /* neff */ unsigned MOS2tnomGiven :1; /* user specified parm. meas. temp */ unsigned MOS2typeGiven :1; unsigned MOS2latDiffGiven :1; unsigned MOS2jctSatCurDensityGiven :1; unsigned MOS2jctSatCurGiven :1; unsigned MOS2drainResistanceGiven :1; unsigned MOS2sourceResistanceGiven :1; unsigned MOS2sheetResistanceGiven :1; unsigned MOS2transconductanceGiven :1; unsigned MOS2gateSourceOverlapCapFactorGiven :1; unsigned MOS2gateDrainOverlapCapFactorGiven :1; unsigned MOS2gateBulkOverlapCapFactorGiven :1; unsigned MOS2vt0Given :1; unsigned MOS2capBDGiven :1; unsigned MOS2capBSGiven :1; unsigned MOS2bulkCapFactorGiven :1; unsigned MOS2sideWallCapFactorGiven :1; unsigned MOS2bulkJctPotentialGiven :1; unsigned MOS2bulkJctBotGradingCoeffGiven :1; unsigned MOS2bulkJctSideGradingCoeffGiven :1; unsigned MOS2fwdCapDepCoeffGiven :1; unsigned MOS2phiGiven :1; unsigned MOS2gammaGiven :1; unsigned MOS2lambdaGiven :1; unsigned MOS2substrateDopingGiven :1; unsigned MOS2gateTypeGiven :1; unsigned MOS2surfaceStateDensityGiven :1; unsigned MOS2fastSurfaceStateDensityGiven :1; /* nfs */ unsigned MOS2oxideThicknessGiven :1; unsigned MOS2surfaceMobilityGiven :1; unsigned MOS2narrowFactorGiven :1; /* delta */ unsigned MOS2critFieldExpGiven :1; /* uexp */ unsigned MOS2critFieldGiven :1; /* ucrit */ unsigned MOS2maxDriftVelGiven :1; /* vmax */ unsigned MOS2junctionDepthGiven :1; /* xj */ unsigned MOS2channelChargeGiven :1; /* neff */ unsigned MOS2fNcoefGiven :1; unsigned MOS2fNexpGiven :1; } MOS2model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define MOS2_W 1 #define MOS2_L 2 #define MOS2_AS 3 #define MOS2_AD 4 #define MOS2_PS 5 #define MOS2_PD 6 #define MOS2_NRS 7 #define MOS2_NRD 8 #define MOS2_OFF 9 #define MOS2_IC 10 #define MOS2_IC_VBS 11 #define MOS2_IC_VDS 12 #define MOS2_IC_VGS 13 #define MOS2_W_SENS 14 #define MOS2_L_SENS 15 #define MOS2_CB 16 #define MOS2_CG 17 #define MOS2_CS 18 #define MOS2_POWER 19 #define MOS2_CGS 20 #define MOS2_CGD 21 #define MOS2_DNODE 22 #define MOS2_GNODE 23 #define MOS2_SNODE 24 #define MOS2_BNODE 25 #define MOS2_DNODEPRIME 26 #define MOS2_SNODEPRIME 27 #define MOS2_SOURCECONDUCT 28 #define MOS2_DRAINCONDUCT 29 #define MOS2_VON 30 #define MOS2_VDSAT 31 #define MOS2_SOURCEVCRIT 32 #define MOS2_DRAINVCRIT 33 #define MOS2_CD 34 #define MOS2_CBS 35 #define MOS2_CBD 36 #define MOS2_GMBS 37 #define MOS2_GM 38 #define MOS2_GDS 39 #define MOS2_GBD 40 #define MOS2_GBS 41 #define MOS2_CAPBD 42 #define MOS2_CAPBS 43 #define MOS2_CAPZEROBIASBD 44 #define MOS2_CAPZEROBIASBDSW 45 #define MOS2_CAPZEROBIASBS 46 #define MOS2_CAPZEROBIASBSSW 47 #define MOS2_VBD 48 #define MOS2_VBS 49 #define MOS2_VGS 50 #define MOS2_VDS 51 #define MOS2_CAPGS 52 #define MOS2_QGS 53 #define MOS2_CQGS 54 #define MOS2_CAPGD 55 #define MOS2_QGD 56 #define MOS2_CQGD 57 #define MOS2_CAPGB 58 #define MOS2_QGB 59 #define MOS2_CQGB 60 #define MOS2_QBD 61 #define MOS2_CQBD 62 #define MOS2_QBS 63 #define MOS2_CQBS 64 #define MOS2_W_SENS_REAL 65 #define MOS2_W_SENS_IMAG 66 #define MOS2_W_SENS_MAG 67 #define MOS2_W_SENS_PH 68 #define MOS2_W_SENS_CPLX 69 #define MOS2_L_SENS_REAL 70 #define MOS2_L_SENS_IMAG 71 #define MOS2_L_SENS_MAG 72 #define MOS2_L_SENS_PH 73 #define MOS2_L_SENS_CPLX 74 #define MOS2_L_SENS_DC 75 #define MOS2_W_SENS_DC 76 #define MOS2_TEMP 77 #define MOS2_SOURCERESIST 78 #define MOS2_DRAINRESIST 79 #define MOS2_M 80 #define MOS2_DTEMP 81 /* model paramerers */ #define MOS2_MOD_VTO 101 #define MOS2_MOD_KP 102 #define MOS2_MOD_GAMMA 103 #define MOS2_MOD_PHI 104 #define MOS2_MOD_LAMBDA 105 #define MOS2_MOD_RD 106 #define MOS2_MOD_RS 107 #define MOS2_MOD_CBD 108 #define MOS2_MOD_CBS 109 #define MOS2_MOD_IS 110 #define MOS2_MOD_PB 111 #define MOS2_MOD_CGSO 112 #define MOS2_MOD_CGDO 113 #define MOS2_MOD_CGBO 114 #define MOS2_MOD_CJ 115 #define MOS2_MOD_MJ 116 #define MOS2_MOD_CJSW 117 #define MOS2_MOD_MJSW 118 #define MOS2_MOD_JS 119 #define MOS2_MOD_TOX 120 #define MOS2_MOD_LD 121 #define MOS2_MOD_RSH 122 #define MOS2_MOD_U0 123 #define MOS2_MOD_FC 124 #define MOS2_MOD_NSUB 125 #define MOS2_MOD_TPG 126 #define MOS2_MOD_NSS 127 #define MOS2_MOD_NFS 128 #define MOS2_MOD_DELTA 129 #define MOS2_MOD_UEXP 130 #define MOS2_MOD_VMAX 131 #define MOS2_MOD_XJ 132 #define MOS2_MOD_NEFF 133 #define MOS2_MOD_UCRIT 134 #define MOS2_MOD_NMOS 135 #define MOS2_MOD_PMOS 136 #define MOS2_MOD_TNOM 137 #define MOS2_MOD_KF 139 #define MOS2_MOD_AF 140 #define MOS2_MOD_TYPE 141 /* model questions */ #include "mos2ext.h" #endif /*MOS2*/ ngspice-26/src/spicelib/devices/mos2/mos2ic.c0000644000265600020320000000244312264261473020457 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2getic(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MOS2nextModel) { for(here = model->MOS2instances; here ; here = here->MOS2nextInstance) { if(!here->MOS2icVBSGiven) { here->MOS2icVBS = *(ckt->CKTrhs + here->MOS2bNode) - *(ckt->CKTrhs + here->MOS2sNode); } if(!here->MOS2icVDSGiven) { here->MOS2icVDS = *(ckt->CKTrhs + here->MOS2dNode) - *(ckt->CKTrhs + here->MOS2sNode); } if(!here->MOS2icVGSGiven) { here->MOS2icVGS = *(ckt->CKTrhs + here->MOS2gNode) - *(ckt->CKTrhs + here->MOS2sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2acld.c0000644000265600020320000001040312264261473020762 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2acLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; for( ; model != NULL; model = model->MOS2nextModel) { for(here = model->MOS2instances; here!= NULL; here = here->MOS2nextInstance) { if (here->MOS2mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveLength=here->MOS2l - 2*model->MOS2latDiff; GateSourceOverlapCap = model->MOS2gateSourceOverlapCapFactor * here->MOS2m * here->MOS2w; GateDrainOverlapCap = model->MOS2gateDrainOverlapCapFactor * here->MOS2m * here->MOS2w; GateBulkOverlapCap = model->MOS2gateBulkOverlapCapFactor * here->MOS2m * EffectiveLength; capgs = ( *(ckt->CKTstate0+here->MOS2capgs)+ *(ckt->CKTstate0+here->MOS2capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS2capgd)+ *(ckt->CKTstate0+here->MOS2capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS2capgb)+ *(ckt->CKTstate0+here->MOS2capgb) + GateBulkOverlapCap ); xgs = capgs * ckt->CKTomega; xgd = capgd * ckt->CKTomega; xgb = capgb * ckt->CKTomega; xbd = here->MOS2capbd * ckt->CKTomega; xbs = here->MOS2capbs * ckt->CKTomega; /* * load matrix */ *(here->MOS2GgPtr +1) += xgd+xgs+xgb; *(here->MOS2BbPtr +1) += xgb+xbd+xbs; *(here->MOS2DPdpPtr +1) += xgd+xbd; *(here->MOS2SPspPtr +1) += xgs+xbs; *(here->MOS2GbPtr +1) -= xgb; *(here->MOS2GdpPtr +1) -= xgd; *(here->MOS2GspPtr +1) -= xgs; *(here->MOS2BgPtr +1) -= xgb; *(here->MOS2BdpPtr +1) -= xbd; *(here->MOS2BspPtr +1) -= xbs; *(here->MOS2DPgPtr +1) -= xgd; *(here->MOS2DPbPtr +1) -= xbd; *(here->MOS2SPgPtr +1) -= xgs; *(here->MOS2SPbPtr +1) -= xbs; *(here->MOS2DdPtr) += here->MOS2drainConductance; *(here->MOS2SsPtr) += here->MOS2sourceConductance; *(here->MOS2BbPtr) += here->MOS2gbd+here->MOS2gbs; *(here->MOS2DPdpPtr) += here->MOS2drainConductance+ here->MOS2gds+here->MOS2gbd+ xrev*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2SPspPtr) += here->MOS2sourceConductance+ here->MOS2gds+here->MOS2gbs+ xnrm*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2DdpPtr) -= here->MOS2drainConductance; *(here->MOS2SspPtr) -= here->MOS2sourceConductance; *(here->MOS2BdpPtr) -= here->MOS2gbd; *(here->MOS2BspPtr) -= here->MOS2gbs; *(here->MOS2DPdPtr) -= here->MOS2drainConductance; *(here->MOS2DPgPtr) += (xnrm-xrev)*here->MOS2gm; *(here->MOS2DPbPtr) += -here->MOS2gbd+(xnrm-xrev)*here->MOS2gmbs; *(here->MOS2DPspPtr) -= here->MOS2gds+ xnrm*(here->MOS2gm+here->MOS2gmbs); *(here->MOS2SPgPtr) -= (xnrm-xrev)*here->MOS2gm; *(here->MOS2SPsPtr) -= here->MOS2sourceConductance; *(here->MOS2SPbPtr) -= here->MOS2gbs+(xnrm-xrev)*here->MOS2gmbs; *(here->MOS2SPdpPtr) -= here->MOS2gds+ xrev*(here->MOS2gm+here->MOS2gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2mpar.c0000644000265600020320000001433312264261473021024 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2mParam(int param, IFvalue *value, GENmodel *inModel) { MOS2model *model = (MOS2model *)inModel; switch(param) { case MOS2_MOD_TNOM: model->MOS2tnom = value->rValue+CONSTCtoK; model->MOS2tnomGiven = TRUE; break; case MOS2_MOD_VTO: model->MOS2vt0 = value->rValue; model->MOS2vt0Given = TRUE; break; case MOS2_MOD_KP: model->MOS2transconductance = value->rValue; model->MOS2transconductanceGiven = TRUE; break; case MOS2_MOD_GAMMA: model->MOS2gamma = value->rValue; model->MOS2gammaGiven = TRUE; break; case MOS2_MOD_PHI: model->MOS2phi = value->rValue; model->MOS2phiGiven = TRUE; break; case MOS2_MOD_LAMBDA: model->MOS2lambda = value->rValue; model->MOS2lambdaGiven = TRUE; break; case MOS2_MOD_RD: model->MOS2drainResistance = value->rValue; model->MOS2drainResistanceGiven = TRUE; break; case MOS2_MOD_RS: model->MOS2sourceResistance = value->rValue; model->MOS2sourceResistanceGiven = TRUE; break; case MOS2_MOD_CBD: model->MOS2capBD = value->rValue; model->MOS2capBDGiven = TRUE; break; case MOS2_MOD_CBS: model->MOS2capBS = value->rValue; model->MOS2capBSGiven = TRUE; break; case MOS2_MOD_IS: model->MOS2jctSatCur = value->rValue; model->MOS2jctSatCurGiven = TRUE; break; case MOS2_MOD_PB: model->MOS2bulkJctPotential = value->rValue; model->MOS2bulkJctPotentialGiven = TRUE; break; case MOS2_MOD_CGSO: model->MOS2gateSourceOverlapCapFactor = value->rValue; model->MOS2gateSourceOverlapCapFactorGiven = TRUE; break; case MOS2_MOD_CGDO: model->MOS2gateDrainOverlapCapFactor = value->rValue; model->MOS2gateDrainOverlapCapFactorGiven = TRUE; break; case MOS2_MOD_CGBO: model->MOS2gateBulkOverlapCapFactor = value->rValue; model->MOS2gateBulkOverlapCapFactorGiven = TRUE; break; case MOS2_MOD_CJ: model->MOS2bulkCapFactor = value->rValue; model->MOS2bulkCapFactorGiven = TRUE; break; case MOS2_MOD_MJ: model->MOS2bulkJctBotGradingCoeff = value->rValue; model->MOS2bulkJctBotGradingCoeffGiven = TRUE; break; case MOS2_MOD_CJSW: model->MOS2sideWallCapFactor = value->rValue; model->MOS2sideWallCapFactorGiven = TRUE; break; case MOS2_MOD_MJSW: model->MOS2bulkJctSideGradingCoeff = value->rValue; model->MOS2bulkJctSideGradingCoeffGiven = TRUE; break; case MOS2_MOD_JS: model->MOS2jctSatCurDensity = value->rValue; model->MOS2jctSatCurDensityGiven = TRUE; break; case MOS2_MOD_TOX: model->MOS2oxideThickness = value->rValue; model->MOS2oxideThicknessGiven = TRUE; break; case MOS2_MOD_LD: model->MOS2latDiff = value->rValue; model->MOS2latDiffGiven = TRUE; break; case MOS2_MOD_RSH: model->MOS2sheetResistance = value->rValue; model->MOS2sheetResistanceGiven = TRUE; break; case MOS2_MOD_U0: model->MOS2surfaceMobility = value->rValue; model->MOS2surfaceMobilityGiven = TRUE; break; case MOS2_MOD_FC: model->MOS2fwdCapDepCoeff = value->rValue; model->MOS2fwdCapDepCoeffGiven = TRUE; break; case MOS2_MOD_NSUB: model->MOS2substrateDoping = value->rValue; model->MOS2substrateDopingGiven = TRUE; break; case MOS2_MOD_TPG: model->MOS2gateType = value->iValue; model->MOS2gateTypeGiven = TRUE; break; case MOS2_MOD_NSS: model->MOS2surfaceStateDensity = value->rValue; model->MOS2surfaceStateDensityGiven = TRUE; break; case MOS2_MOD_NFS: model->MOS2fastSurfaceStateDensity = value->rValue; model->MOS2fastSurfaceStateDensityGiven = TRUE; break; case MOS2_MOD_DELTA: model->MOS2narrowFactor = value->rValue; model->MOS2narrowFactorGiven = TRUE; break; case MOS2_MOD_UEXP: model->MOS2critFieldExp = value->rValue; model->MOS2critFieldExpGiven = TRUE; break; case MOS2_MOD_VMAX: model->MOS2maxDriftVel = value->rValue; model->MOS2maxDriftVelGiven = TRUE; break; case MOS2_MOD_XJ: model->MOS2junctionDepth = value->rValue; model->MOS2junctionDepthGiven = TRUE; break; case MOS2_MOD_NEFF: model->MOS2channelCharge = value->rValue; model->MOS2channelChargeGiven = TRUE; break; case MOS2_MOD_UCRIT: model->MOS2critField = value->rValue; model->MOS2critFieldGiven = TRUE; break; case MOS2_MOD_NMOS: if(value->iValue) { model->MOS2type = 1; model->MOS2typeGiven = TRUE; } break; case MOS2_MOD_PMOS: if(value->iValue) { model->MOS2type = -1; model->MOS2typeGiven = TRUE; } break; case MOS2_MOD_KF: model->MOS2fNcoef = value->rValue; model->MOS2fNcoefGiven = TRUE; break; case MOS2_MOD_AF: model->MOS2fNexp = value->rValue; model->MOS2fNexpGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos2/mos2sacl.c0000644000265600020320000007410212264261473021007 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "mos2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS2sAcLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS2model *model = (MOS2model *)inModel; MOS2instance *here; int xnrm; int xrev; double A0; double Apert = 0.0; double DELA; double DELAinv; double gdpr0; double gspr0; double gds0; double gbs0; double gbd0; double gm0; double gmbs0; double gdpr; double gspr; double gds; double gbs; double gbd; double gm; double gmbs; double xcgs0; double xcgd0; double xcgb0; double xbd0; double xbs0; double xcgs; double xcgd; double xcgb; double xbd; double xbs; double vbsOp; double vbdOp; double vspr; double vdpr; double vgs; double vgd; double vgb; double vbs; double vbd; double vds; double ivspr; double ivdpr; double ivgs; double ivgd; double ivgb; double ivbs; double ivbd; double ivds; double cspr; double cdpr; double cgs; double cgd; double cgb; double cbs; double cbd; double cds; double cs0; double csprm0; double cd0; double cdprm0; double cg0; double cb0; double cs; double csprm; double cd; double cdprm; double cg; double cb; double icspr; double icdpr; double icgs; double icgd; double icgb; double icbs; double icbd; double icds; double ics0; double icsprm0; double icd0; double icdprm0; double icg0; double icb0; double ics; double icsprm; double icd; double icdprm; double icg; double icb; double DvDp = 0.0; int i; int flag; int error; int iparmno; double arg; double sarg; double sargsw; double SaveState[44]; int save_mode; SENstruct *info; #ifdef SENSDEBUG printf("MOS2senacload\n"); printf("CKTomega = %.5e\n",ckt->CKTomega); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; for( ; model != NULL; model = model->MOS2nextModel) { for(here = model->MOS2instances; here!= NULL; here = here->MOS2nextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++) *(SaveState + i) = *(ckt->CKTstate0 + here->MOS2states + i); *(SaveState + 17) = here->MOS2sourceConductance; *(SaveState + 18) = here->MOS2drainConductance; *(SaveState + 19) = here->MOS2cd; *(SaveState + 20) = here->MOS2cbs; *(SaveState + 21) = here->MOS2cbd; *(SaveState + 22) = here->MOS2gmbs; *(SaveState + 23) = here->MOS2gm; *(SaveState + 24) = here->MOS2gds; *(SaveState + 25) = here->MOS2gbd; *(SaveState + 26) = here->MOS2gbs; *(SaveState + 27) = here->MOS2capbd; *(SaveState + 28) = here->MOS2capbs; *(SaveState + 29) = here->MOS2Cbd; *(SaveState + 30) = here->MOS2Cbdsw; *(SaveState + 31) = here->MOS2Cbs; *(SaveState + 32) = here->MOS2Cbssw; *(SaveState + 33) = here->MOS2f2d; *(SaveState + 34) = here->MOS2f3d; *(SaveState + 35) = here->MOS2f4d; *(SaveState + 36) = here->MOS2f2s; *(SaveState + 37) = here->MOS2f3s; *(SaveState + 38) = here->MOS2f4s; *(SaveState + 39) = here->MOS2cgs; *(SaveState + 40) = here->MOS2cgd; *(SaveState + 41) = here->MOS2cgb; *(SaveState + 42) = here->MOS2vdsat; *(SaveState + 43) = here->MOS2von; save_mode = here->MOS2mode; xnrm=1; xrev=0; if (here->MOS2mode < 0) { xnrm=0; xrev=1; } vbsOp = model->MOS2type * ( *(ckt->CKTrhsOp+here->MOS2bNode) - *(ckt->CKTrhsOp+here->MOS2sNodePrime)); vbdOp = model->MOS2type * ( *(ckt->CKTrhsOp+here->MOS2bNode) - *(ckt->CKTrhsOp+here->MOS2dNodePrime)); vspr = *(ckt->CKTrhsOld + here->MOS2sNode) - *(ckt->CKTrhsOld + here->MOS2sNodePrime) ; ivspr = *(ckt->CKTirhsOld + here->MOS2sNode) - *(ckt->CKTirhsOld + here->MOS2sNodePrime) ; vdpr = *(ckt->CKTrhsOld + here->MOS2dNode) - *(ckt->CKTrhsOld + here->MOS2dNodePrime) ; ivdpr = *(ckt->CKTirhsOld + here->MOS2dNode) - *(ckt->CKTirhsOld + here->MOS2dNodePrime) ; vgb = *(ckt->CKTrhsOld + here->MOS2gNode) - *(ckt->CKTrhsOld + here->MOS2bNode) ; ivgb = *(ckt->CKTirhsOld + here->MOS2gNode) - *(ckt->CKTirhsOld + here->MOS2bNode) ; vbs = *(ckt->CKTrhsOld + here->MOS2bNode) - *(ckt->CKTrhsOld + here->MOS2sNodePrime) ; ivbs = *(ckt->CKTirhsOld + here->MOS2bNode) - *(ckt->CKTirhsOld + here->MOS2sNodePrime) ; vbd = *(ckt->CKTrhsOld + here->MOS2bNode) - *(ckt->CKTrhsOld + here->MOS2dNodePrime) ; ivbd = *(ckt->CKTirhsOld + here->MOS2bNode) - *(ckt->CKTirhsOld + here->MOS2dNodePrime) ; vds = vbs - vbd ; ivds = ivbs - ivbd ; vgs = vgb + vbs ; ivgs = ivgb + ivbs ; vgd = vgb + vbd ; ivgd = ivgb + ivbd ; #ifdef SENSDEBUG printf("senacload instance name %s\n",here->MOS2name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS2gNode,here->MOS2dNode,here->MOS2dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS2sNode ,here->MOS2sNodePrime, here->MOS2bNode,here->MOS2senParmNo); printf("\n without perturbation \n"); #endif /* SENSDEBUG */ /* without perturbation */ *(ckt->CKTstate0 + here->MOS2vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS2vbd) = vbdOp; here->MOS2senPertFlag = ON ; if(info->SENacpertflag == 1){ /* store the unperturbed values of small signal parameters */ if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs) = here->MOS2cgs; *(here->MOS2senCgd) = here->MOS2cgd; *(here->MOS2senCgb) = here->MOS2cgb; *(here->MOS2senCbd) = here->MOS2capbd; *(here->MOS2senCbs) = here->MOS2capbs; *(here->MOS2senGds) = here->MOS2gds; *(here->MOS2senGbs) = here->MOS2gbs; *(here->MOS2senGbd) = here->MOS2gbd; *(here->MOS2senGm) = here->MOS2gm; *(here->MOS2senGmbs) = here->MOS2gmbs; } xcgs0= *(here->MOS2senCgs) * ckt->CKTomega; xcgd0= *(here->MOS2senCgd) * ckt->CKTomega; xcgb0= *(here->MOS2senCgb) * ckt->CKTomega; xbd0= *(here->MOS2senCbd) * ckt->CKTomega; xbs0= *(here->MOS2senCbs) * ckt->CKTomega; gds0= *(here->MOS2senGds); gbs0= *(here->MOS2senGbs); gbd0= *(here->MOS2senGbd); gm0= *(here->MOS2senGm); gmbs0= *(here->MOS2senGmbs); gdpr0 = here->MOS2drainConductance; gspr0 = here->MOS2sourceConductance; cspr = gspr0 * vspr ; icspr = gspr0 * ivspr ; cdpr = gdpr0 * vdpr ; icdpr = gdpr0 * ivdpr ; cgs = ( - xcgs0 * ivgs ); icgs = xcgs0 * vgs ; cgd = ( - xcgd0 * ivgd ); icgd = xcgd0 * vgd ; cgb = ( - xcgb0 * ivgb ); icgb = xcgb0 * vgb ; cbs = ( gbs0 * vbs - xbs0 * ivbs ); icbs = ( xbs0 * vbs + gbs0 * ivbs ); cbd = ( gbd0 * vbd - xbd0 * ivbd ); icbd = ( xbd0 * vbd + gbd0 * ivbd ); cds = ( gds0 * vds + xnrm * (gm0 * vgs + gmbs0 * vbs) - xrev * (gm0 * vgd + gmbs0 * vbd) ); icds = ( gds0 * ivds + xnrm * (gm0 * ivgs + gmbs0 * ivbs) - xrev * (gm0 * ivgd + gmbs0 * ivbd) ); cs0 = cspr; ics0 = icspr; csprm0 = ( -cspr - cgs - cbs - cds ) ; icsprm0 = ( -icspr - icgs - icbs - icds ) ; cd0 = cdpr; icd0 = icdpr; cdprm0 = ( -cdpr - cgd - cbd + cds ) ; icdprm0 = ( -icdpr - icgd - icbd + icds ) ; cg0 = cgs + cgd + cgb ; icg0 = icgs + icgd + icgb ; cb0 = cbs + cbd - cgb ; icb0 = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("gspr0 = %.7e , gdpr0 = %.7e , gds0 = %.7e, gbs0 = %.7e\n", gspr0,gdpr0,gds0,gbs0); printf("gbd0 = %.7e , gm0 = %.7e , gmbs0 = %.7e\n",gbd0,gm0,gmbs0); printf("xcgs0 = %.7e , xcgd0 = %.7e , xcgb0 = %.7e,", xcgs0,xcgd0,xcgb0); printf("xbd0 = %.7e,xbs0 = %.7e\n", xbd0,xbs0); printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs0 = %.7e , cbd0 = %.7e , cgb0 = %.7e\n",cbs,cbd,cgb); printf("cb0 = %.7e , cg0 = %.7e , cs0 = %.7e\n",cb0,cg0,cs0); printf("csprm0 = %.7e, cd0 = %.7e, cdprm0 = %.7e\n", csprm0,cd0,cdprm0); printf("icb0 = %.7e , icg0 = %.7e , ics0 = %.7e\n",icb0,icg0,ics0); printf("icsprm0 = %.7e, icd0 = %.7e, icdprm0 = %.7e\n", icsprm0,icd0,icdprm0); printf("\nPerturbation of vbs\n"); #endif /* SENSDEBUG */ /* Perturbation of vbs */ flag = 1; A0 = vbsOp; DELA = info->SENpertfac * CONSTvt0 ; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbs */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS2vbs) = Apert; *(ckt->CKTstate0 + here->MOS2vbd) = vbdOp; if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs + 1) = here->MOS2cgs; *(here->MOS2senCgd + 1) = here->MOS2cgd; *(here->MOS2senCgb + 1) = here->MOS2cgb; *(here->MOS2senCbd + 1) = here->MOS2capbd; *(here->MOS2senCbs + 1) = here->MOS2capbs; *(here->MOS2senGds + 1) = here->MOS2gds; *(here->MOS2senGbs + 1) = here->MOS2gbs; *(here->MOS2senGbd + 1) = here->MOS2gbd; *(here->MOS2senGm + 1) = here->MOS2gm; *(here->MOS2senGmbs + 1) = here->MOS2gmbs; *(ckt->CKTstate0 + here->MOS2vbs) = A0; } goto load; pertvbd: /* Perturbation of vbd */ #ifdef SENSDEBUG printf("\nPerturbation of vbd\n"); #endif /* SENSDEBUG */ flag = 2; A0 = vbdOp; DELA = info->SENpertfac * CONSTvt0 + 1e-8; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbd */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS2vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS2vbd) = Apert; if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs + 2) = here->MOS2cgs; *(here->MOS2senCgd + 2) = here->MOS2cgd; *(here->MOS2senCgb + 2) = here->MOS2cgb; *(here->MOS2senCbd + 2) = here->MOS2capbd; *(here->MOS2senCbs + 2) = here->MOS2capbs; *(here->MOS2senGds + 2) = here->MOS2gds; *(here->MOS2senGbs + 2) = here->MOS2gbs; *(here->MOS2senGbd + 2) = here->MOS2gbd; *(here->MOS2senGm + 2) = here->MOS2gm; *(here->MOS2senGmbs + 2) = here->MOS2gmbs; *(ckt->CKTstate0 + here->MOS2vbd) = A0; } goto load; pertvgb: /* Perturbation of vgb */ #ifdef SENSDEBUG printf("\nPerturbation of vgb\n"); #endif /* SENSDEBUG */ flag = 3; A0 = model->MOS2type * (*(ckt->CKTrhsOp + here->MOS2gNode) - *(ckt->CKTrhsOp + here->MOS2bNode)); DELA = info->SENpertfac * A0 + 1e-8; DELAinv = model->MOS2type * 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vgb */ *(ckt->CKTstate0 + here->MOS2vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS2vbd) = vbdOp; *(ckt->CKTrhsOp + here->MOS2bNode) -= DELA; if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs + 3) = here->MOS2cgs; *(here->MOS2senCgd + 3) = here->MOS2cgd; *(here->MOS2senCgb + 3) = here->MOS2cgb; *(here->MOS2senCbd + 3) = here->MOS2capbd; *(here->MOS2senCbs + 3) = here->MOS2capbs; *(here->MOS2senGds + 3) = here->MOS2gds; *(here->MOS2senGbs + 3) = here->MOS2gbs; *(here->MOS2senGbd + 3) = here->MOS2gbd; *(here->MOS2senGm + 3) = here->MOS2gm; *(here->MOS2senGmbs + 3) = here->MOS2gmbs; *(ckt->CKTrhsOp + here->MOS2bNode) += DELA; } goto load; pertl: /* Perturbation of length */ if(here->MOS2sens_l == 0){ goto pertw; } #ifdef SENSDEBUG printf("\nPerturbation of length\n"); #endif /* SENSDEBUG */ flag = 4; A0 = here->MOS2l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed length */ Apert = A0 + DELA; here->MOS2l = Apert; *(ckt->CKTstate0 + here->MOS2vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS2vbd) = vbdOp; if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs + 4) = here->MOS2cgs; *(here->MOS2senCgd + 4) = here->MOS2cgd; *(here->MOS2senCgb + 4) = here->MOS2cgb; *(here->MOS2senCbd + 4) = here->MOS2capbd; *(here->MOS2senCbs + 4) = here->MOS2capbs; *(here->MOS2senGds + 4) = here->MOS2gds; *(here->MOS2senGbs + 4) = here->MOS2gbs; *(here->MOS2senGbd + 4) = here->MOS2gbd; *(here->MOS2senGm + 4) = here->MOS2gm; *(here->MOS2senGmbs + 4) = here->MOS2gmbs; here->MOS2l = A0; } goto load; pertw: /* Perturbation of width */ if(here->MOS2sens_w == 0) goto next; #ifdef SENSDEBUG printf("\nPerturbation of width\n"); #endif /* SENSDEBUG */ flag = 5; A0 = here->MOS2w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed width */ here->MOS2w = Apert; here->MOS2drainArea *= (1 + info->SENpertfac); here->MOS2sourceArea *= (1 + info->SENpertfac); here->MOS2Cbd *= (1 + info->SENpertfac); here->MOS2Cbs *= (1 + info->SENpertfac); if(here->MOS2drainPerimiter){ here->MOS2Cbdsw += here->MOS2Cbdsw * DELA/here->MOS2drainPerimiter; } if(here->MOS2sourcePerimiter){ here->MOS2Cbssw += here->MOS2Cbssw * DELA/here->MOS2sourcePerimiter; } if(vbdOp >= here->MOS2tDepCap){ arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2f2d = here->MOS2Cbd*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + here->MOS2Cbdsw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3d = here->MOS2Cbd * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + here->MOS2Cbdsw * model->MOS2bulkJctSideGradingCoeff * sargsw/arg / here->MOS2tBulkPot; here->MOS2f4d = here->MOS2Cbd*here->MOS2tBulkPot* (1-arg*sarg)/(1-model->MOS2bulkJctBotGradingCoeff) + here->MOS2Cbdsw*here->MOS2tBulkPot*(1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3d/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2d; } if(vbsOp >= here->MOS2tDepCap){ arg = 1-model->MOS2fwdCapDepCoeff; sarg = exp( (-model->MOS2bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS2bulkJctSideGradingCoeff) * log(arg) ); here->MOS2f2s = here->MOS2Cbs*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctBotGradingCoeff))* sarg/arg + here->MOS2Cbssw*(1-model->MOS2fwdCapDepCoeff* (1+model->MOS2bulkJctSideGradingCoeff))* sargsw/arg; here->MOS2f3s = here->MOS2Cbs * model->MOS2bulkJctBotGradingCoeff * sarg/arg/ here->MOS2tBulkPot + here->MOS2Cbssw * model->MOS2bulkJctSideGradingCoeff * sargsw/arg / here->MOS2tBulkPot; here->MOS2f4s = here->MOS2Cbs*here->MOS2tBulkPot* (1-arg*sarg)/(1-model->MOS2bulkJctBotGradingCoeff) + here->MOS2Cbssw*here->MOS2tBulkPot*(1-arg*sargsw)/ (1-model->MOS2bulkJctSideGradingCoeff) -here->MOS2f3s/2* (here->MOS2tDepCap*here->MOS2tDepCap) -here->MOS2tDepCap * here->MOS2f2s; } *(ckt->CKTstate0 + here->MOS2vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS2vbd) = vbdOp; if((error = MOS2load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS2senCgs + 5) = here->MOS2cgs; *(here->MOS2senCgd + 5) = here->MOS2cgd; *(here->MOS2senCgb + 5) = here->MOS2cgb; *(here->MOS2senCbd + 5) = here->MOS2capbd; *(here->MOS2senCbs + 5) = here->MOS2capbs; *(here->MOS2senGds + 5) = here->MOS2gds; *(here->MOS2senGbs + 5) = here->MOS2gbs; *(here->MOS2senGbd + 5) = here->MOS2gbd; *(here->MOS2senGm + 5) = here->MOS2gm; *(here->MOS2senGmbs + 5) = here->MOS2gmbs; here->MOS2w = A0; here->MOS2drainArea /= (1 + info->SENpertfac); here->MOS2sourceArea /= (1 + info->SENpertfac); } load: gds= *(here->MOS2senGds + flag); gbs= *(here->MOS2senGbs + flag); gbd= *(here->MOS2senGbd + flag); gm= *(here->MOS2senGm + flag); gmbs= *(here->MOS2senGmbs + flag); if(flag == 5){ gdpr = here->MOS2drainConductance * Apert/A0; gspr = here->MOS2sourceConductance * Apert/A0; } else{ gdpr = here->MOS2drainConductance; gspr = here->MOS2sourceConductance; } xcgs= *(here->MOS2senCgs + flag) * ckt->CKTomega; xcgd= *(here->MOS2senCgd + flag) * ckt->CKTomega; xcgb= *(here->MOS2senCgb + flag) * ckt->CKTomega; xbd= *(here->MOS2senCbd + flag) * ckt->CKTomega; xbs= *(here->MOS2senCbs + flag) * ckt->CKTomega; #ifdef SENSDEBUG printf("flag = %d \n",flag); printf("gspr = %.7e , gdpr = %.7e , gds = %.7e, gbs = %.7e\n", gspr,gdpr,gds,gbs); printf("gbd = %.7e , gm = %.7e , gmbs = %.7e\n",gbd,gm,gmbs); printf("xcgs = %.7e , xcgd = %.7e , xcgb = %.7e,", xcgs,xcgd,xcgb); printf("xbd = %.7e,xbs = %.7e\n", xbd,xbs); #endif /* SENSDEBUG */ cspr = gspr * vspr ; icspr = gspr * ivspr ; cdpr = gdpr * vdpr ; icdpr = gdpr * ivdpr ; cgs = ( - xcgs * ivgs ); icgs = xcgs * vgs ; cgd = ( - xcgd * ivgd ); icgd = xcgd * vgd ; cgb = ( - xcgb * ivgb ); icgb = xcgb * vgb ; cbs = ( gbs * vbs - xbs * ivbs ); icbs = ( xbs * vbs + gbs * ivbs ); cbd = ( gbd * vbd - xbd * ivbd ); icbd = ( xbd * vbd + gbd * ivbd ); cds = ( gds * vds + xnrm * (gm * vgs + gmbs * vbs) - xrev * (gm * vgd + gmbs * vbd) ); icds = ( gds * ivds + xnrm * (gm * ivgs + gmbs * ivbs) - xrev * (gm * ivgd + gmbs * ivbd) ); cs = cspr; ics = icspr; csprm = ( -cspr - cgs - cbs - cds ) ; icsprm = ( -icspr - icgs - icbs - icds ) ; cd = cdpr; icd = icdpr; cdprm = ( -cdpr - cgd - cbd + cds ) ; icdprm = ( -icdpr - icgd - icbd + icds ) ; cg = cgs + cgd + cgb ; icg = icgs + icgd + icgb ; cb = cbs + cbd - cgb ; icb = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs = %.7e , cbd = %.7e , cgb = %.7e\n",cbs,cbd,cgb); printf("cb = %.7e , cg = %.7e , cs = %.7e\n",cb,cg,cs); printf("csprm = %.7e, cd = %.7e, cdprm = %.7e\n",csprm,cd,cdprm); printf("icb = %.7e , icg = %.7e , ics = %.7e\n",icb,icg,ics); printf("icsprm = %.7e, icd = %.7e, icdprm = %.7e\n", icsprm,icd,icdprm); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if ((flag == 4) || (iparmno != here->MOS2senParmNo) ) continue; if ((flag == 5) || (iparmno != (here->MOS2senParmNo + here->MOS2sens_l)) ) continue; switch(flag){ case 1: DvDp = model->MOS2type * (info->SEN_Sap[here->MOS2bNode][iparmno] - info->SEN_Sap[here->MOS2sNodePrime][iparmno]); break; case 2: DvDp = model->MOS2type * ( info->SEN_Sap[here->MOS2bNode][iparmno] - info->SEN_Sap[here->MOS2dNodePrime][iparmno]); break; case 3: DvDp = model->MOS2type * ( info->SEN_Sap[here->MOS2gNode][iparmno] - info->SEN_Sap[here->MOS2bNode][iparmno]); break; case 4: DvDp = 1; break; case 5: DvDp = 1; break; } *(info->SEN_RHS[here->MOS2bNode] + iparmno) -= ( cb - cb0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2bNode] + iparmno) -= ( icb - icb0) * DELAinv * DvDp; *(info->SEN_RHS[here->MOS2gNode] + iparmno) -= ( cg - cg0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2gNode] + iparmno) -= ( icg - icg0) * DELAinv * DvDp; if(here->MOS2sNode != here->MOS2sNodePrime){ *(info->SEN_RHS[here->MOS2sNode] + iparmno) -= ( cs - cs0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2sNode] + iparmno) -= ( ics - ics0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS2sNodePrime] + iparmno) -= ( csprm - csprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2sNodePrime] + iparmno) -= ( icsprm - icsprm0) * DELAinv * DvDp; if(here->MOS2dNode != here->MOS2dNodePrime){ *(info->SEN_RHS[here->MOS2dNode] + iparmno) -= ( cd - cd0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2dNode] + iparmno) -= ( icd - icd0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS2dNodePrime] + iparmno) -= ( cdprm - cdprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS2dNodePrime] + iparmno) -= ( icdprm - icdprm0) * DELAinv * DvDp; #ifdef SENSDEBUG printf("after loading\n"); printf("DvDp = %.5e , DELAinv = %.5e ,flag = %d ,", DvDp,DELAinv,flag); printf("iparmno = %d,senparmno = %d\n" ,iparmno,here->MOS2senParmNo); printf("A0 = %.5e , Apert = %.5e ,CONSTvt0 = %.5e \n", A0,Apert,CONSTvt0); printf("senb = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2bNode] + iparmno), *(info->SEN_iRHS[here->MOS2bNode] + iparmno)); printf("seng = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2gNode] + iparmno), *(info->SEN_iRHS[here->MOS2gNode] + iparmno)); printf("sens = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2sNode] + iparmno), *(info->SEN_iRHS[here->MOS2sNode] + iparmno)); printf("sensprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2sNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS2sNodePrime] + iparmno)); printf("send = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2dNode] + iparmno), *(info->SEN_iRHS[here->MOS2dNode] + iparmno)); printf("sendprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS2dNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS2dNodePrime] + iparmno)); #endif /* SENSDEBUG */ } switch(flag){ case 1: goto pertvbd ; case 2: goto pertvgb ; case 3: goto pertl ; case 4: goto pertw ; case 5: break; } next: ; /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS2states + i) = *(SaveState + i); here->MOS2sourceConductance = *(SaveState + 17) ; here->MOS2drainConductance = *(SaveState + 18) ; here->MOS2cd = *(SaveState + 19) ; here->MOS2cbs = *(SaveState + 20) ; here->MOS2cbd = *(SaveState + 21) ; here->MOS2gmbs = *(SaveState + 22) ; here->MOS2gm = *(SaveState + 23) ; here->MOS2gds = *(SaveState + 24) ; here->MOS2gbd = *(SaveState + 25) ; here->MOS2gbs = *(SaveState + 26) ; here->MOS2capbd = *(SaveState + 27) ; here->MOS2capbs = *(SaveState + 28) ; here->MOS2Cbd = *(SaveState + 29) ; here->MOS2Cbdsw = *(SaveState + 30) ; here->MOS2Cbs = *(SaveState + 31) ; here->MOS2Cbssw = *(SaveState + 32) ; here->MOS2f2d = *(SaveState + 33) ; here->MOS2f3d = *(SaveState + 34) ; here->MOS2f4d = *(SaveState + 35) ; here->MOS2f2s = *(SaveState + 36) ; here->MOS2f3s = *(SaveState + 37) ; here->MOS2f4s = *(SaveState + 38) ; here->MOS2cgs = *(SaveState + 39) ; here->MOS2cgd = *(SaveState + 40) ; here->MOS2cgb = *(SaveState + 41) ; here->MOS2vdsat = *(SaveState + 42) ; here->MOS2von = *(SaveState + 43) ; here->MOS2mode = save_mode ; here->MOS2senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS2senacload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/cccs/0000755000265600020320000000000012264261707017147 5ustar andreasadminngspice-26/src/spicelib/devices/cccs/cccspzld.c0000644000265600020320000000202612264261473021120 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "cccsdefs.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCCSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current voltage value into the * sparse matrix previously provided */ { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; NG_IGNORE(ckt); NG_IGNORE(s); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { *(here->CCCSposContBrptr) += here->CCCScoeff ; *(here->CCCSnegContBrptr) -= here->CCCScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccsinit.h0000644000265600020320000000030212264261473021112 0ustar andreasadmin#ifndef _CCCSINIT_H #define _CCCSINIT_H extern IFparm CCCSpTable[ ]; extern char *CCCSnames[ ]; extern int CCCSpTSize; extern int CCCSnSize; extern int CCCSiSize; extern int CCCSmSize; #endif ngspice-26/src/spicelib/devices/cccs/cccspar.c0000644000265600020320000000205112264261473020727 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CCCSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { CCCSinstance *here = (CCCSinstance*)inst; NG_IGNORE(select); switch(param) { case CCCS_GAIN: here->CCCScoeff = value->rValue; if (here->CCCSmGiven) here->CCCScoeff *= here->CCCSmValue; here->CCCScoeffGiven = TRUE; break; case CCCS_CONTROL: here->CCCScontName = value->uValue; break; case CCCS_M: here->CCCSmValue = value->rValue; here->CCCSmGiven = TRUE; break; case CCCS_GAIN_SENS: here->CCCSsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccssset.c0000644000265600020320000000164312264261473021131 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCCSsSetup(SENstruct *info, GENmodel *inModel) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; /* loop through all the CCCS models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { if(here->CCCSsenParmNo){ here->CCCSsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccsmdel.c0000644000265600020320000000176512264261473021101 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCCSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { CCCSmodel **model = (CCCSmodel**)inModel; CCCSmodel *modfast = (CCCSmodel*)kill; CCCSinstance *here; CCCSinstance *prev = NULL; CCCSmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->CCCSnextModel)) { if( (*model)->CCCSmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->CCCSnextModel; /* cut deleted device out of list */ for(here = (*model)->CCCSinstances ; here ; here = here->CCCSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/cccs/cccsload.c0000644000265600020320000000172712264261473021075 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCCSload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current voltage value into the * sparse matrix previously provided */ { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { *(here->CCCSposContBrptr) += here->CCCScoeff ; *(here->CCCSnegContBrptr) -= here->CCCScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccsdefs.h0000644000265600020320000000535212264261473021102 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef CCCS #define CCCS #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/cktdefs.h" /* structures used to describe Current Controlled Current Sources */ /* information needed for each instance */ typedef struct sCCCSinstance { struct sCCCSmodel *CCCSmodPtr; /* backpointer to model */ struct sCCCSinstance *CCCSnextInstance; /* pointer to next instance of *current model*/ IFuid CCCSname; /* pointer to character string naming this instance */ int CCCSstate; /* not used */ int CCCSposNode; /* number of positive node of source */ int CCCSnegNode; /* number of negative node of source */ int CCCScontBranch; /* number of branch eq of controlling source */ char *CCCScontName; /* pointer to name of controlling instance */ double CCCScoeff; /* coefficient */ double CCCSmValue; /* Parallel multiplier */ double *CCCSposContBrptr; /* pointer to sparse matrix element at *(positive node, control branch eq)*/ double *CCCSnegContBrptr; /* pointer to sparse matrix element at *(negative node, control branch eq)*/ unsigned CCCScoeffGiven :1 ; /* flag to indicate coeff given */ unsigned CCCSmGiven :1 ; /* flag to indicate multiplier given */ int CCCSsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } CCCSinstance ; /* per model data */ typedef struct sCCCSmodel { /* model structure for a source */ int CCCSmodType; /* type index of this device type */ struct sCCCSmodel *CCCSnextModel; /* pointer to next possible model *in linked list */ CCCSinstance * CCCSinstances; /* pointer to list of instances that have this model */ IFuid CCCSmodName; /* pointer to character string naming this model */ } CCCSmodel; /* device parameters */ #define CCCS_GAIN 1 #define CCCS_CONTROL 2 #define CCCS_POS_NODE 3 #define CCCS_NEG_NODE 4 #define CCCS_CONT_BR 5 #define CCCS_GAIN_SENS 6 #define CCCS_CURRENT 7 #define CCCS_POWER 8 #define CCCS_VOLTS 9 #define CCCS_M 10 /* model parameters */ /* device questions */ #define CCCS_QUEST_SENS_REAL 201 #define CCCS_QUEST_SENS_IMAG 202 #define CCCS_QUEST_SENS_MAG 203 #define CCCS_QUEST_SENS_PH 204 #define CCCS_QUEST_SENS_CPLX 205 #define CCCS_QUEST_SENS_DC 206 /* model questions */ #include "cccsext.h" #endif /*CCCS*/ ngspice-26/src/spicelib/devices/cccs/cccs.c0000644000265600020320000000321412264261473020226 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "cccsdefs.h" #include "ngspice/suffix.h" IFparm CCCSpTable[] = { /* parameters */ IOPU("gain", CCCS_GAIN, IF_REAL ,"Gain of source"), IOPU("control", CCCS_CONTROL, IF_INSTANCE,"Name of controlling source"), IOP ( "m", CCCS_M, IF_REAL , "Parallel multiplier"), IP("sens_gain",CCCS_GAIN_SENS,IF_FLAG, "flag to request sensitivity WRT gain"), OPU("neg_node", CCCS_NEG_NODE,IF_INTEGER, "Negative node of source"), OPU("pos_node", CCCS_POS_NODE,IF_INTEGER, "Positive node of source"), OP("i", CCCS_CURRENT, IF_REAL, "CCCS output current"), OP("v", CCCS_VOLTS, IF_REAL, "CCCS voltage at output"), OP("p", CCCS_POWER, IF_REAL, "CCCS power"), OPU("sens_dc", CCCS_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU("sens_real",CCCS_QUEST_SENS_REAL,IF_REAL, "real part of ac sensitivity"), OPU("sens_imag",CCCS_QUEST_SENS_IMAG,IF_REAL, "imag part of ac sensitivity"), OPU("sens_mag", CCCS_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU("sens_ph", CCCS_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx",CCCS_QUEST_SENS_CPLX,IF_COMPLEX, "ac sensitivity") }; #if 0 static IFparm CCCSmPTable[] = { /* model parameters */ }; #endif char *CCCSnames[] = { "F+", "F-" }; int CCCSnSize = NUMELEMS(CCCSnames); int CCCSpTSize = NUMELEMS(CCCSpTable); int CCCSmPTSize = 0; int CCCSiSize = sizeof(CCCSinstance); int CCCSmSize = sizeof(CCCSmodel); ngspice-26/src/spicelib/devices/cccs/cccsinit.c0000644000265600020320000000404112264261473021111 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "cccsitf.h" #include "cccsext.h" #include "cccsinit.h" SPICEdev CCCSinfo = { { "CCCS", "Current controlled current source", &CCCSnSize, &CCCSnSize, CCCSnames, &CCCSpTSize, CCCSpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ CCCSparam, /* DEVmodParam */ NULL, /* DEVload */ CCCSload, /* DEVsetup */ CCCSsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ CCCSsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ CCCSload, /* DEVaccept */ NULL, /* DEVdestroy */ CCCSdestroy, /* DEVmodDelete */ CCCSmDelete, /* DEVdelete */ CCCSdelete, /* DEVsetic */ NULL, /* DEVask */ CCCSask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ CCCSpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ CCCSsSetup, /* DEVsenLoad */ CCCSsLoad, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ CCCSsAcLoad, /* DEVsenPrint */ CCCSsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &CCCSiSize, /* DEVmodSize */ &CCCSmSize }; SPICEdev * get_cccs_info(void) { return &CCCSinfo; } ngspice-26/src/spicelib/devices/cccs/cccssacl.c0000644000265600020320000000276012264261473021076 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current ac sensitivity information * into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCCSsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; double ic; double i_ic; /* loop through all the CCCS models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { if(here->CCCSsenParmNo){ ic = *(ckt->CKTrhsOld + here->CCCScontBranch); i_ic = *(ckt->CKTirhsOld + here->CCCScontBranch); *(ckt->CKTsenInfo->SEN_RHS[here->CCCSposNode] + here->CCCSsenParmNo) -= ic; *(ckt->CKTsenInfo->SEN_iRHS[here->CCCSposNode] + here->CCCSsenParmNo) -= i_ic; *(ckt->CKTsenInfo->SEN_RHS[here->CCCSnegNode] + here->CCCSsenParmNo) += ic; *(ckt->CKTsenInfo->SEN_iRHS[here->CCCSnegNode] + here->CCCSsenParmNo) += i_ic; } } } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccssprt.c0000644000265600020320000000276312264261473021147 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* Pretty print the sensitivity info for all * the CCCS in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void CCCSsPrint(GENmodel *inModel, CKTcircuit *ckt) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; printf("CURRENT CONTROLLED CURRENT SOURCES-----------------\n"); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCCSnextModel ) { printf("Model name:%s\n",model->CCCSmodName); /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { printf(" Instance name:%s\n",here->CCCSname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->CCCSposNode), CKTnodName(ckt,here->CCCSnegNode)); printf(" Controlling source name: %s\n", here->CCCScontName); printf(" Controlling Branch equation number: %s\n", CKTnodName(ckt,here->CCCScontBranch)); printf(" Coefficient: %f\n",here->CCCScoeff); printf(" CCCSsenParmNo:%d\n",here->CCCSsenParmNo); } } } ngspice-26/src/spicelib/devices/cccs/cccsitf.h0000644000265600020320000000026012264261473020734 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_CCCS #define DEV_CCCS SPICEdev *get_cccs_info(void); #endif ngspice-26/src/spicelib/devices/cccs/Makefile.am0000644000265600020320000000072712264261473021211 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcccs.la libcccs_la_SOURCES = \ cccs.c \ cccsask.c \ cccsdefs.h \ cccsdel.c \ cccsdest.c \ cccsext.h \ cccsinit.c \ cccsinit.h \ cccsitf.h \ cccsload.c \ cccsmdel.c \ cccspar.c \ cccspzld.c \ cccssacl.c \ cccsset.c \ cccssld.c \ cccssprt.c \ cccssset.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/cccs/cccsset.c0000644000265600020320000000325312264261473020745 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* load the voltage source structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CCCSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; NG_IGNORE(states); /* loop through all the voltage source models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { here->CCCScontBranch = CKTfndBranch(ckt,here->CCCScontName); if(here->CCCScontBranch == 0) { IFuid namarray[2]; namarray[0] = here->CCCSname; namarray[1] = here->CCCScontName; SPfrontEnd->IFerror (ERR_FATAL, "%s: unknown controlling source %s",namarray); return(E_BADPARM); } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(CCCSposContBrptr,CCCSposNode,CCCScontBranch); TSTALLOC(CCCSnegContBrptr,CCCSnegNode,CCCScontBranch); } } return(OK); } ngspice-26/src/spicelib/devices/cccs/Makefile.in0000644000265600020320000004224412264261536021222 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/cccs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcccs_la_LIBADD = am_libcccs_la_OBJECTS = cccs.lo cccsask.lo cccsdel.lo cccsdest.lo \ cccsinit.lo cccsload.lo cccsmdel.lo cccspar.lo cccspzld.lo \ cccssacl.lo cccsset.lo cccssld.lo cccssprt.lo cccssset.lo libcccs_la_OBJECTS = $(am_libcccs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcccs_la_SOURCES) DIST_SOURCES = $(libcccs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcccs.la libcccs_la_SOURCES = \ cccs.c \ cccsask.c \ cccsdefs.h \ cccsdel.c \ cccsdest.c \ cccsext.h \ cccsinit.c \ cccsinit.h \ cccsitf.h \ cccsload.c \ cccsmdel.c \ cccspar.c \ cccspzld.c \ cccssacl.c \ cccsset.c \ cccssld.c \ cccssprt.c \ cccssset.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/cccs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/cccs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcccs.la: $(libcccs_la_OBJECTS) $(libcccs_la_DEPENDENCIES) $(EXTRA_libcccs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcccs_la_OBJECTS) $(libcccs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccspar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccspzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccssacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccssld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccssprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cccssset.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/cccs/cccssld.c0000644000265600020320000000225212264261473020732 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current sensitivity information * into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCCSsLoad(GENmodel *inModel, CKTcircuit *ckt) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance *here; double ic ; /* loop through all the CCCS models */ for( ; model != NULL; model = model->CCCSnextModel ) { /* loop through all the instances of the model */ for (here = model->CCCSinstances; here != NULL ; here=here->CCCSnextInstance) { if(here->CCCSsenParmNo){ ic = *(ckt->CKTrhsOld + here->CCCScontBranch); *(ckt->CKTsenInfo->SEN_RHS[here->CCCSposNode] + here->CCCSsenParmNo) -= ic; *(ckt->CKTsenInfo->SEN_RHS[here->CCCSnegNode] + here->CCCSsenParmNo) += ic; } } } return(OK); } ngspice-26/src/spicelib/devices/cccs/cccsask.c0000644000265600020320000001156112264261473020731 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 **********/ /* * This routine gives access to the internal device parameters * of Current Controlled Current Source */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CCCSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { CCCSinstance *here = (CCCSinstance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case CCCS_GAIN: value->rValue = here->CCCScoeff; return (OK); case CCCS_CONTROL: value->uValue = here->CCCScontName; return (OK); case CCCS_M: value->rValue = here->CCCSmValue; case CCCS_POS_NODE: value->iValue = here->CCCSposNode; return (OK); case CCCS_NEG_NODE: value->iValue = here->CCCSnegNode; return (OK); case CCCS_CONT_BR: value->iValue = here->CCCScontBranch; return (OK); case CCCS_CURRENT : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CCCSask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = *(ckt->CKTrhsOld + here->CCCScontBranch) * here->CCCScoeff; } return(OK); case CCCS_VOLTS : value->rValue = (*(ckt->CKTrhsOld + here->CCCSposNode) - *(ckt->CKTrhsOld + here->CCCSnegNode)); return(OK); case CCCS_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "CCCSask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTrhsOld + here->CCCScontBranch) * here->CCCScoeff * (*(ckt->CKTrhsOld + here->CCCSposNode) - *(ckt->CKTrhsOld + here->CCCSnegNode)); } return(OK); case CCCS_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->CCCSsenParmNo); } return(OK); case CCCS_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCCSsenParmNo); } return(OK); case CCCS_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCCSsenParmNo); } return(OK); case CCCS_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCCSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCCSsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case CCCS_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCCSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCCSsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case CCCS_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->CCCSsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->CCCSsenParmNo); } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/cccs/cccsdest.c0000644000265600020320000000141112264261473021103 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "cccsdefs.h" #include "ngspice/suffix.h" void CCCSdestroy(GENmodel **inModel) { CCCSmodel **model = (CCCSmodel**)inModel; CCCSinstance *here; CCCSinstance *prev = NULL; CCCSmodel *mod = *model; CCCSmodel *oldmod = NULL; for( ; mod ; mod = mod->CCCSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->CCCSinstances ; here ; here = here->CCCSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/cccs/cccsext.h0000644000265600020320000000135712264261473020762 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int CCCSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int CCCSdelete(GENmodel*,IFuid,GENinstance**); extern void CCCSdestroy(GENmodel**); extern int CCCSload(GENmodel*,CKTcircuit*); extern int CCCSmDelete(GENmodel**,IFuid,GENmodel*); extern int CCCSparam(int,IFvalue*,GENinstance*,IFvalue*); extern int CCCSpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int CCCSsAcLoad(GENmodel*,CKTcircuit*); extern int CCCSsLoad(GENmodel*,CKTcircuit*); extern void CCCSsPrint(GENmodel*,CKTcircuit*); extern int CCCSsSetup(SENstruct*,GENmodel*); extern int CCCSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); ngspice-26/src/spicelib/devices/cccs/cccsdel.c0000644000265600020320000000155612264261473020722 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "cccsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CCCSdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { CCCSmodel *model = (CCCSmodel*)inModel; CCCSinstance **fast = (CCCSinstance**)inst; CCCSinstance **prev = NULL; CCCSinstance *here; for( ; model ; model = model->CCCSnextModel) { prev = &(model->CCCSinstances); for(here = *prev; here ; here = *prev) { if(here->CCCSname == name || (fast && here==*fast) ) { *prev= here->CCCSnextInstance; FREE(here); return(OK); } prev = &(here->CCCSnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/limit.c0000644000265600020320000001321312264261473017516 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/devdefs.h" /* limiting routines for junction voltages */ double DvRevMax = 0.5, DvFwdMax = 50.0e-3; double limitResistorVoltage( double vnew, double vold, int *icheck ) { double vlim, vinc; if( vnew > vold ) { vinc = 0.5; vlim = vold + vinc; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else if ( vnew < vold ) { vinc = 0.5; vlim = vold - vinc; if( vnew > vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { /* vnew == vold */ *icheck = 0; return( vnew ); } /* NOTREACHED */ } double limitJunctionVoltage( double vnew, double vold, int *icheck ) { double vlim, vinc; if( vold >= 0.0 ) { if( vnew > vold ) { if( vold > 0.65 ) vinc = DvFwdMax; else vinc = 2.0 * DvFwdMax; vlim = vold + vinc; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else if ( vnew == vold ) { *icheck = 0; return ( vnew ); } else { /* vnew is less than vold */ /* case 1: vnew is positive */ /* case 2: vnew is negative, ensure it goes thru zero */ if( vnew < 0.0 && vold <= 0.05 && vold > 0.0) { /* limit to zero when vnew < 0.0 and vold |= 0.0 */ *icheck = 1; return( 0.0 ); } vinc = 2.0 * DvFwdMax; vlim = vold - vinc; if( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } } else { if( vnew < vold ) { vlim = vold - DvRevMax; if ( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } else { /* vnew > vold. check if vnew less than 0.0 */ if( vnew < 0.0 ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold + 2.0 * DvRevMax; *icheck = 1; if( vlim > 0.0 ) return( 0.0 ); else return( vlim ); } } } } double limitVbe( double vnew, double vold, int *icheck ) { double vlim, vinc; if( vold >= 0.0 ) { if( vnew > vold ) { if( vold > 0.9 ) /* deep high-level injection conditions */ vinc = 0.01; else if( vold > 0.85 ) vinc = 0.025; else if( vold > 0.65 ) vinc = 0.05; else vinc = 0.10; vlim = vold + vinc; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else if ( vnew == vold ) { *icheck = 0; return ( vnew ); } else { /* vnew is less than vold */ /* case 1: vnew is positive */ /* case 2: vnew is negative, ensure it goes thru zero */ if( vnew < 0.0 && vold <= 0.05 && vold > 0.0) { /* limit to zero when vnew < 0.0 and vold |= 0.0 */ *icheck = 1; return( 0.0 ); } vinc = 0.1; vlim = vold - vinc; if( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } } else { if( vnew < vold ) { vlim = vold - 0.1; /* XXX Originally 0.1 */ if ( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } else { /* vnew > vold. check if vnew less than 0.0 */ if( vnew < 0.0 ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold + 1.0; *icheck = 1; if( vlim > 0.0 ) return( 0.0 ); else return( vlim ); } } } } double limitVce( double vnew, double vold, int *icheck ) { double vlim; if( vold >= 0.0 ) { if( vnew > vold ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold - 0.5; /* XXX Originally 0.2 */ if( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } } else { if( vnew < vold ) { vlim = vold - 1.0; if ( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } else { /* vnew > vold. check if vnew less than 0.0 */ if( vnew < 0.0 ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold + 1.0; *icheck = 1; if( vlim > 0.0 ) return( 0.0 ); else return( vlim ); } } } } double limitVgb( double vnew, double vold, int *icheck ) { double vlim; if( vold >= 0.0 ) { if( vnew > vold ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold - 0.2; if( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } } else { if( vnew < vold ) { vlim = vold - 1.0; if ( vlim > vnew ) { *icheck = 1; return( vlim ); } else { *icheck = 0; return( vnew ); } } else { /* vnew > vold. check if vnew less than 0.0 */ if( vnew < 0.0 ) { vlim = vold + 1.0; if( vnew < vlim ) { *icheck = 0; return( vnew ); } else { *icheck = 1; return( vlim ); } } else { vlim = vold + 1.0; *icheck = 1; if( vlim > 0.0 ) return( 0.0 ); else return( vlim ); } } } } ngspice-26/src/spicelib/devices/ndev/0000755000265600020320000000000012264261710017162 5ustar andreasadminngspice-26/src/spicelib/devices/ndev/ndevacld.c0000644000265600020320000000111112264261473021106 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "ngspice/suffix.h" int NDEVacLoad(GENmodel *inModel, CKTcircuit *ckt) { NG_IGNORE(inModel); NG_IGNORE(ckt); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevinit.c0000644000265600020320000000443712264261473021164 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ndevitf.h" #include "ndevext.h" #include "ndevinit.h" SPICEdev NDEVinfo = { { "NDEV", "Numerical Device", &NDEVnSize, /* number of terminals */ &NDEVnSize, NDEVnames, /* the name of terminals*/ &NDEVpTSize, /*number of instance parameters */ NDEVpTable, /*the array of instance parameters */ &NDEVmPTSize, /* number of model parameter, NDEV does not have this parameter */ NDEVmPTable, /*the array of model parameters */ #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NDEVparam, /* DEVmodParam */ NDEVmParam, /* DEVload */ NDEVload, /* DEVsetup */ NDEVsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NDEVsetup, /* DEVtemperature*/ NDEVtemp, /* DEVtrunc */ NDEVtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NDEVacLoad, /* DEVaccept */ NDEVaccept, /* DEVdestroy */ NDEVdestroy, /* DEVmodDelete */ NDEVmDelete, /* DEVdelete */ NDEVdelete, /* DEVsetic */ NDEVgetic, /* DEVask */ NDEVask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NDEVpzLoad, /* DEVconvTest */ NDEVconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &NDEViSize, /* DEVmodSize */ &NDEVmSize }; SPICEdev * get_ndev_info(void) { return &NDEVinfo; } ngspice-26/src/spicelib/devices/ndev/ndevdest.c0000644000265600020320000000156412264261473021156 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #include "ndevdefs.h" #include "ngspice/suffix.h" void NDEVdestroy(GENmodel **inModel) { NDEVmodel **model = (NDEVmodel **)inModel; NDEVinstance *here; NDEVinstance *prev = NULL; NDEVmodel *mod = *model; NDEVmodel *oldmod = NULL; for( ; mod ; mod = mod->NDEVnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->NDEVinstances ; here ; here = here->NDEVnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); close(mod->sock); fprintf(stdout,"Disconnect to remote NDEV server %s:%d\n",mod->host,mod->port); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/ndev/ndevinit.h0000644000265600020320000000037012264261473021161 0ustar andreasadmin#ifndef _NDEVINIT_H #define _NDEVINIT_H extern IFparm NDEVpTable[ ]; extern IFparm NDEVmPTable[ ]; extern char *NDEVnames[ ]; extern int NDEVpTSize; extern int NDEVmPTSize; extern int NDEVnSize; extern int NDEViSize; extern int NDEVmSize; #endif ngspice-26/src/spicelib/devices/ndev/ndevtemp.c0000644000265600020320000000111712264261473021156 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ndevdefs.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVtemp( GENmodel *inModel, register CKTcircuit *ckt ) /* * perform the temperature update to the diode */ { NG_IGNORE(inModel); NG_IGNORE(ckt); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevmdel.c0000644000265600020320000000065412264261473021137 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVmDelete( GENmodel **inModel, IFuid modname, GENmodel *kill ) { NG_IGNORE(inModel); NG_IGNORE(modname); NG_IGNORE(kill); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevdump.c0000644000265600020320000000146612264261473021165 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ndevdefs.h" #include "ngspice/suffix.h" /* State Counter * static int state_numOP = 0; * static int state_numDC = 0; * static int state_numTR = 0; */ void NDEV_dump( GENmodel *inModel, CKTcircuit *ckt ) { NG_IGNORE(inModel); NG_IGNORE(ckt); } void NDEV_acct( GENmodel *inModel, CKTcircuit *ckt, FILE *file ) { NG_IGNORE(inModel); NG_IGNORE(ckt); NG_IGNORE(file); } ngspice-26/src/spicelib/devices/ndev/ndevtrun.c0000644000265600020320000000072512264261473021205 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVtrunc( GENmodel *inModel, register CKTcircuit *ckt, double *timeStep ) { NG_IGNORE(inModel); NG_IGNORE(ckt); NG_IGNORE(timeStep); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevload.c0000644000265600020320000000557712264261473021146 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "ndevdefs.h" #include "ngspice/numenum.h" #include "ngspice/trandefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVload(GENmodel * inModel, CKTcircuit * ckt) { NDEVmodel *model = (NDEVmodel *)inModel; NDEVinstance *here; int i,j; /* loop through all the ndev models */ for( ; model != NULL; model = model->NDEVnextModel ) { /* loop through all the instances of the model */ for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance) { /* sent ckt information to device simulator */ here->CKTInfo.DEV_CALL = NDEV_LOAD; here->CKTInfo.CKTmode = ckt->CKTmode; here->CKTInfo.time = ckt->CKTtime; here->CKTInfo.dt = ckt->CKTdelta; here->CKTInfo.dt_old = ckt->CKTdeltaOld[0]; here->CKTInfo.accept_flag = 0; send(model->sock,&here->CKTInfo,sizeof(sCKTinfo),0); /* send terminal voltage to device simulator */ for(i=0;iterm;i++) { here->PINinfos[i].V_old = here->PINinfos[i].V; here->PINinfos[i].V = *(ckt->CKTrhsOld+here->pin[i]); send(model->sock,&here->PINinfos[i],sizeof(here->PINinfos[i]),0); } } } /* loop through all the ndev models */ for(model = (NDEVmodel *)inModel; model != NULL; model = model->NDEVnextModel ) { /* loop through all the instances of the model */ for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance) { /* reveive terminal current and conductional matrix from device simulator */ for(i=0;iterm;i++) { recv(model->sock,&here->PINinfos[i],sizeof(here->PINinfos[i]),MSG_WAITALL); *(ckt->CKTrhs+here->pin[i]) += here->PINinfos[i].I; for(j=0;jterm;j++) *(here->mat_pointer[i*here->term+j]) += here->PINinfos[i].dI_dV[j]; } } } return(OK); } int NDEVgetic(GENmodel *inModel, CKTcircuit *ckt) { NDEVmodel *model = (NDEVmodel*)inModel; NDEVinstance *here; NG_IGNORE(ckt); /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ printf("set ic\n"); for( ; model ; model = model->NDEVnextModel) { for(here = model->NDEVinstances; here ; here = here->NDEVnextInstance) { /* if(!here->DIOinitCondGiven) { here->DIOinitCond = *(ckt->CKTrhs + here->DIOposNode) - *(ckt->CKTrhs + here->DIOnegNode); } */ } } return(OK); } ngspice-26/src/spicelib/devices/ndev/ndevdel.c0000644000265600020320000000161712264261473020762 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVdelete( GENmodel *inModel, IFuid name, GENinstance **kill ) { NDEVmodel *model = (NDEVmodel *)inModel; NDEVinstance **fast = (NDEVinstance **)kill; NDEVinstance **prev = NULL; NDEVinstance *here; for( ; model ; model = model->NDEVnextModel) { prev = &(model->NDEVinstances); for(here = *prev; here ; here = *prev) { if(here->NDEVname == name || (fast && here==*fast) ) { *prev= here->NDEVnextInstance; FREE(here); return(OK); } prev = &(here->NDEVnextInstance); } } return(E_NODEV); return (E_NODEV); } ngspice-26/src/spicelib/devices/ndev/ndevask.c0000644000265600020320000000120512264261473020765 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ndevdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int NDEVask( CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select ) { NG_IGNORE(ckt); NG_IGNORE(inInst); NG_IGNORE(which); NG_IGNORE(value); NG_IGNORE(select); return (OK); /* NOTREACHED */ } ngspice-26/src/spicelib/devices/ndev/ndevdefs.h0000644000265600020320000000434312264261473021143 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #ifndef NDEV_H #define NDEV_H /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/inpmacs.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ndevexch.h" /* network function */ #include #include /* IPv4 socket address structres. */ #include /* Access to DNS lookups. */ #include /* inet_ntop function. */ #include /* Socket functions. */ /* information needed per instance */ typedef struct sNDEVinstance { struct sNDEVmodel *NDEVmodPtr;/* back pointer to model */ struct sNDEVinstance *NDEVnextInstance; /* pointer to next instance * of current model */ IFuid NDEVname; /* pointer to character string naming this * instance */ int NDEVstate; /* pointer to start of state vector for diode */ int pin[7]; /* max 7 terminals are allowed */ int term; /* the real number of terminals */ CKTnode *node[7]; /* the array of CKT node's node pointer */ char *bname[7]; /* the electrode boundary label for numerical solver */ sCKTinfo CKTInfo; sDeviceinfo Ndevinfo; sPINinfo PINinfos[7]; double * mat_pointer[49]; /* the pointer array to matrix */ } NDEVinstance; /* per model data */ typedef struct sNDEVmodel { /* model structure for a diode */ /* the following 4 entries should always exist */ int NDEVmodType; /* type index of this device type */ struct sNDEVmodel *NDEVnextModel; /* pointer to next possible model in linked list */ NDEVinstance *NDEVinstances; /* pointer to list of instances that have this model */ IFuid NDEVmodName; /* pointer to character string naming this model */ /* here can be freely defined as your wish*/ char * NDEVmodelfile; char * host; int port; /* Port number. */ int sock; /* Our connection socket. */ } NDEVmodel; /* device parameters */ #define NDEV_MODEL_FILE 1 /* model parameters */ #define NDEV_MOD_NDEV 101 #define NDEV_REMOTE 102 #define NDEV_PORT 103 #include "ndevext.h" #endif /* NDEV_H */ ngspice-26/src/spicelib/devices/ndev/ndevparm.c0000644000265600020320000000123512264261473021151 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/const.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVparam( int param, IFvalue *value, GENinstance *inInst, IFvalue *select ) { NG_IGNORE(value); NG_IGNORE(inInst); NG_IGNORE(select); switch (param) { case NDEV_MOD_NDEV: /* no action , but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevaccept.c0000644000265600020320000000372112264261473021453 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ndevdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVaccept(CKTcircuit *ckt, GENmodel *inModel) { NDEVmodel *model = (NDEVmodel *)inModel; NDEVinstance *here; /* loop through all the ndev models */ for( ; model != NULL; model = model->NDEVnextModel ) { /* loop through all the instances of the model */ for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance) { /* set ckt accept_flag */ here->CKTInfo.DEV_CALL = NDEV_ACCEPT; here->CKTInfo.CKTmode = ckt->CKTmode; here->CKTInfo.time = ckt->CKTtime; here->CKTInfo.dt = ckt->CKTdelta; here->CKTInfo.dt_old = ckt->CKTdeltaOld[0]; here->CKTInfo.accept_flag = 1; send(model->sock,&here->CKTInfo,sizeof(sCKTinfo),0); } } return (OK); /* NOTREACHED */ } int NDEVconvTest(GENmodel *inModel, CKTcircuit *ckt) { NDEVmodel *model = (NDEVmodel *)inModel; NDEVinstance *here; for( ; model != NULL; model = model->NDEVnextModel) { for(here=model->NDEVinstances;here!=NULL;here = here->NDEVnextInstance){ /* * get convergence information from ndev */ here->CKTInfo.DEV_CALL = NDEV_CONVERGINCE_TEST; send(model->sock,&here->CKTInfo,sizeof(sCKTinfo),0); recv(model->sock,&here->CKTInfo,sizeof(sCKTinfo),MSG_WAITALL); if (here->CKTInfo.convergence_flag<0) { /* no reason to continue - we've failed... */ ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } } } return(OK); } ngspice-26/src/spicelib/devices/ndev/ndevmpar.c0000644000265600020320000000150612264261473021152 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NDEVs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ndevdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NDEVmParam(int param, IFvalue * value, GENmodel * inModel) { NDEVmodel *model = (NDEVmodel *) inModel; switch (param) { case NDEV_REMOTE: model->host = value->sValue; break; case NDEV_PORT: model->port = value->iValue; break; case NDEV_MOD_NDEV: /* no action , but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/ndev/Makefile.am0000644000265600020320000000100512264261473021220 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libndev.la libndev_la_SOURCES = \ ndev.c \ ndevacld.c \ ndevaccept.c \ ndevask.c \ ndevdefs.h \ ndevdel.c \ ndevdest.c \ ndevdump.c \ ndevext.h \ ndevexch.h \ ndevinit.c \ ndevinit.h \ ndevitf.h \ ndevload.c \ ndevmdel.c \ ndevmpar.c \ ndevparm.c \ ndevpzld.c \ ndevset.c \ ndevtemp.c \ ndevtrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/ndev/ndevitf.h0000644000265600020320000000027012264261473020777 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NDEV #define DEV_NDEV extern SPICEdev *get_ndev_info(void); #endif ngspice-26/src/spicelib/devices/ndev/Makefile.in0000644000265600020320000004260712264261537021247 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/ndev DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libndev_la_LIBADD = am_libndev_la_OBJECTS = ndev.lo ndevacld.lo ndevaccept.lo ndevask.lo \ ndevdel.lo ndevdest.lo ndevdump.lo ndevinit.lo ndevload.lo \ ndevmdel.lo ndevmpar.lo ndevparm.lo ndevpzld.lo ndevset.lo \ ndevtemp.lo ndevtrun.lo libndev_la_OBJECTS = $(am_libndev_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libndev_la_SOURCES) DIST_SOURCES = $(libndev_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libndev.la libndev_la_SOURCES = \ ndev.c \ ndevacld.c \ ndevaccept.c \ ndevask.c \ ndevdefs.h \ ndevdel.c \ ndevdest.c \ ndevdump.c \ ndevext.h \ ndevexch.h \ ndevinit.c \ ndevinit.h \ ndevitf.h \ ndevload.c \ ndevmdel.c \ ndevmpar.c \ ndevparm.c \ ndevpzld.c \ ndevset.c \ ndevtemp.c \ ndevtrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/ndev/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/ndev/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libndev.la: $(libndev_la_OBJECTS) $(libndev_la_DEPENDENCIES) $(EXTRA_libndev_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libndev_la_OBJECTS) $(libndev_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevaccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ndevtrun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/ndev/ndevset.c0000644000265600020320000001151112264261473021003 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ndevdefs.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define TSCALLOC(var, size, type)\ if (size && (var =(type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NDEVmodelConnect(NDEVmodel *inModel); int NDEVsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the structure with those pointers needed later for fast matrix * loading */ { NDEVmodel *model = (NDEVmodel *)inModel; NDEVinstance *here; int i,j; CKTnode *node; NG_IGNORE(ckt); NG_IGNORE(states); /* loop through all the ndev models */ for( ; model != NULL; model = model->NDEVnextModel ) { /* connect to remote device simulator */ if(NDEVmodelConnect(model)) return E_PRIVATE; /* loop through all the instances of the model */ for (here = model->NDEVinstances; here != NULL ; here=here->NDEVnextInstance) { here->Ndevinfo.term = here->term; strncpy(here->Ndevinfo.NDEVname,here->NDEVname,32); send(model->sock,&(here->Ndevinfo),sizeof(here->Ndevinfo),0); /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) for(i=0;iterm;i++) for(j=0;jterm;j++) { TSTALLOC(mat_pointer[i*here->term+j], pin[i], pin[j]); } for(i=0;iterm;i++) { node = here->node[i]; here->PINinfos[i].pin=node->number; strncpy(here->PINinfos[i].name,here->bname[i],32); here->PINinfos[i].V = 0.0; send(model->sock,&here->PINinfos[i],sizeof(here->PINinfos[i]),0); } } } return(OK); } int NDEVmodelConnect(NDEVmodel *inModel) { NDEVmodel *model = inModel; struct hostent *hostlist; /* List of hosts returned by gethostbyname. */ char dotted_ip[15]; /* Buffer for converting the resolved address to a readable format. */ struct sockaddr_in sa; /* Connection address. */ char *buf = TMALLOC(char, 128); /* Look up the hostname with DNS. gethostbyname (at least most UNIX versions of it) properly handles dotted IP addresses as well as hostnames. */ hostlist = gethostbyname(model->host); if (hostlist == NULL) { fprintf(stderr,"NDEV: Unable to resolve host %s.\n", model->host); return E_PRIVATE; } /* Good, we have an address. However, some sites are moving over to IPv6 (the newer version of IP), and we're not ready for it (since it uses a new address format). It's a good idea to check for this. */ if (hostlist->h_addrtype != AF_INET) { fprintf(stderr,"NDEV: Host %s doesn't seem to be an IPv4 address.\n",model->host); return E_PRIVATE; } /* inet_ntop converts a 32-bit IP address to the dotted string notation (suitable for printing). hostlist->h_addr_list is an array of possible addresses (in case a name resolves to more than on IP). In most cases we just want the first. */ inet_ntop(AF_INET, hostlist->h_addr_list[0], dotted_ip, 15); /* Create a socket for the connection. */ model->sock = socket(PF_INET, SOCK_STREAM, IPPROTO_IP); if (model->sock < 0) { fprintf(stderr, "NDEV: Unable to create a socket %s.\n", strerror(errno)); return E_PRIVATE; } /* Fill in the sockaddr_in structure. The address is already in network byte order (from the gethostbyname call). We need to convert the port number with the htons macro. Before we do anything else, we'll zero out the entire structure. */ memset(&sa, 0, sizeof(struct sockaddr_in)); sa.sin_port = htons(model->port); /* The IP address was returned as a char * for various reasons. Just memcpy it into the sockaddr_in structure. */ memcpy(&sa.sin_addr, hostlist->h_addr_list[0], (size_t) hostlist->h_length); /* This is an Internet socket. */ sa.sin_family = AF_INET; /* Connect! */ if (connect(model->sock, (struct sockaddr *)&sa, sizeof(sa)) < 0) { fprintf(stderr, "NDEV: Unable to connect %s\n",strerror(errno)); return E_PRIVATE; } sprintf(buf, NG_QUERY); send(model->sock, buf, 128, 0); if(recv(model->sock, buf, 128, MSG_WAITALL) < 128) { fprintf(stderr, "NDEV: Remote answer error. %s\n",strerror(errno)); return E_PRIVATE; } if(strncmp(buf, NDEV_REPLY, sizeof(NDEV_REPLY))) { fprintf(stderr, "NDEV: Remote answer error. %s\n", buf); return E_PRIVATE; } free(buf); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevexch.h0000644000265600020320000000254012264261473021146 0ustar andreasadmin#ifndef _netexchange_h_ #define _netexchange_h_ #define NG_QUERY "This is ngspice. Are you ready?" #define NDEV_REPLY "Waiting orders!" #define NG_STOP "Ngspice finished, goodbye." #define NDEV_LOAD 0x0001 #define NDEV_ACCEPT 0x0002 #define NDEV_CONVERGINCE_TEST 0x0004 #define NDEV_TRUNCATION_ERROR 0x0008 #define NDEV_TEMPERATURE 0x1000 #define NDEV_AC_LOAD 0x0010 #define NDEV_PZ_LOAD 0x0020 #ifndef ngspice_CKTDEFS_H /* defines for CKTmode */ /* this should be the same as cktdefs.h */ /* old 'mode' parameters */ #define MODE 0x3 #define MODETRAN 0x1 #define MODEAC 0x2 /* old 'modedc' parameters */ #define MODEDC 0x70 #define MODEDCOP 0x10 #define MODETRANOP 0x20 #define MODEDCTRANCURVE 0x40 /* old 'initf' parameters */ #define INITF 0x3f00 #define MODEINITFLOAT 0x100 #define MODEINITJCT 0x200 #define MODEINITFIX 0x400 #define MODEINITSMSIG 0x800 #define MODEINITTRAN 0x1000 #define MODEINITPRED 0x2000 /* old 'nosolv' paramater */ #define MODEUIC 0x10000l #endif typedef struct { char NDEVname[32]; int term; }sDeviceinfo; typedef struct { int pin; char name[32]; double V,I; double V_old; double dI_dV[7]; } sPINinfo; typedef struct { long DEV_CALL; long CKTmode; double time; double dt; double dt_old; double omega; int accept_flag; int convergence_flag; }sCKTinfo; #endif ngspice-26/src/spicelib/devices/ndev/ndev.c0000644000265600020320000000201412264261473020265 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ndevdefs.h" #include "ngspice/suffix.h" IFparm NDEVpTable[] = { /* parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("ndev", NDEV_MOD_NDEV, IF_FLAG, "Numerical Device"), }; IFparm NDEVmPTable[] = { /* model parameters */ IP("ndev", NDEV_MOD_NDEV, IF_FLAG, "Numerical Device"), IP("remote", NDEV_REMOTE, IF_STRING, "Remote computer run device simulation"), IP("port", NDEV_PORT, IF_INTEGER, "Remote port") }; char *NDEVnames[] = { "pin1", "pin2", "pin3", "pin4", "pin5", "pin6", "pin7" }; int NDEVnSize = NUMELEMS(NDEVnames); int NDEVpTSize = NUMELEMS(NDEVpTable); int NDEVmPTSize = NUMELEMS(NDEVmPTable); int NDEViSize = sizeof(NDEVinstance); int NDEVmSize = sizeof(NDEVmodel); ngspice-26/src/spicelib/devices/ndev/ndevpzld.c0000644000265600020320000000074712264261473021172 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "ndevdefs.h" #include "ngspice/suffix.h" int NDEVpzLoad( GENmodel *inModel, register CKTcircuit *ckt, SPcomplex *s ) { NG_IGNORE(inModel); NG_IGNORE(ckt); NG_IGNORE(s); return (OK); } ngspice-26/src/spicelib/devices/ndev/ndevext.h0000644000265600020320000000214412264261473021017 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef NDEVEXT_H #define NDEVEXT_H extern int NDEVacLoad(GENmodel *, CKTcircuit *); extern int NDEVask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NDEVdelete(GENmodel *, IFuid, GENinstance **); extern void NDEVdestroy(GENmodel **); extern int NDEVgetic(GENmodel *, CKTcircuit *); extern int NDEVload(GENmodel *, CKTcircuit *); extern int NDEVaccept(CKTcircuit *, GENmodel *); extern int NDEVconvTest(GENmodel *, CKTcircuit *); extern int NDEVmDelete(GENmodel **, IFuid, GENmodel *); extern int NDEVmParam(int, IFvalue *, GENmodel *); extern int NDEVparam(int, IFvalue *, GENinstance *, IFvalue *); extern int NDEVpzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NDEVsetup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NDEVtemp(GENmodel *, CKTcircuit *); extern int NDEVtrunc(GENmodel *, CKTcircuit *, double *); extern void NDEV_dump(GENmodel *, CKTcircuit *); extern void NDEV_acct(GENmodel *, CKTcircuit *, FILE *); #endif /* NDEVEXT_H */ ngspice-26/src/spicelib/devices/bsim3v0/0000755000265600020320000000000012264261706017516 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3v0/b3v0mask.c0000644000265600020320000011247112264261473021317 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0mask.c **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM3v0model *model = (BSIM3v0model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM3v0_MOD_MOBMOD: value->iValue = model->BSIM3v0mobMod; return(OK); case BSIM3v0_MOD_BINUNIT: value->iValue = model->BSIM3v0binUnit; return(OK); case BSIM3v0_MOD_CAPMOD: value->iValue = model->BSIM3v0capMod; return(OK); case BSIM3v0_MOD_NQSMOD: value->iValue = model->BSIM3v0nqsMod; return(OK); case BSIM3v0_MOD_NOIMOD: value->iValue = model->BSIM3v0noiMod; return(OK); case BSIM3v0_MOD_TOX : value->rValue = model->BSIM3v0tox; return(OK); case BSIM3v0_MOD_CDSC : value->rValue = model->BSIM3v0cdsc; return(OK); case BSIM3v0_MOD_CDSCB : value->rValue = model->BSIM3v0cdscb; return(OK); case BSIM3v0_MOD_CDSCD : value->rValue = model->BSIM3v0cdscd; return(OK); case BSIM3v0_MOD_CIT : value->rValue = model->BSIM3v0cit; return(OK); case BSIM3v0_MOD_NFACTOR : value->rValue = model->BSIM3v0nfactor; return(OK); case BSIM3v0_MOD_XJ: value->rValue = model->BSIM3v0xj; return(OK); case BSIM3v0_MOD_VSAT: value->rValue = model->BSIM3v0vsat; return(OK); case BSIM3v0_MOD_AT: value->rValue = model->BSIM3v0at; return(OK); case BSIM3v0_MOD_A0: value->rValue = model->BSIM3v0a0; return(OK); case BSIM3v0_MOD_AGS: value->rValue = model->BSIM3v0ags; return(OK); case BSIM3v0_MOD_A1: value->rValue = model->BSIM3v0a1; return(OK); case BSIM3v0_MOD_A2: value->rValue = model->BSIM3v0a2; return(OK); case BSIM3v0_MOD_KETA: value->rValue = model->BSIM3v0keta; return(OK); case BSIM3v0_MOD_NSUB: value->rValue = model->BSIM3v0nsub; return(OK); case BSIM3v0_MOD_NPEAK: value->rValue = model->BSIM3v0npeak; return(OK); case BSIM3v0_MOD_NGATE: value->rValue = model->BSIM3v0ngate; return(OK); case BSIM3v0_MOD_GAMMA1: value->rValue = model->BSIM3v0gamma1; return(OK); case BSIM3v0_MOD_GAMMA2: value->rValue = model->BSIM3v0gamma2; return(OK); case BSIM3v0_MOD_VBX: value->rValue = model->BSIM3v0vbx; return(OK); case BSIM3v0_MOD_VBM: value->rValue = model->BSIM3v0vbm; return(OK); case BSIM3v0_MOD_XT: value->rValue = model->BSIM3v0xt; return(OK); case BSIM3v0_MOD_K1: value->rValue = model->BSIM3v0k1; return(OK); case BSIM3v0_MOD_KT1: value->rValue = model->BSIM3v0kt1; return(OK); case BSIM3v0_MOD_KT1L: value->rValue = model->BSIM3v0kt1l; return(OK); case BSIM3v0_MOD_KT2 : value->rValue = model->BSIM3v0kt2; return(OK); case BSIM3v0_MOD_K2 : value->rValue = model->BSIM3v0k2; return(OK); case BSIM3v0_MOD_K3: value->rValue = model->BSIM3v0k3; return(OK); case BSIM3v0_MOD_K3B: value->rValue = model->BSIM3v0k3b; return(OK); case BSIM3v0_MOD_W0: value->rValue = model->BSIM3v0w0; return(OK); case BSIM3v0_MOD_NLX: value->rValue = model->BSIM3v0nlx; return(OK); case BSIM3v0_MOD_DVT0 : value->rValue = model->BSIM3v0dvt0; return(OK); case BSIM3v0_MOD_DVT1 : value->rValue = model->BSIM3v0dvt1; return(OK); case BSIM3v0_MOD_DVT2 : value->rValue = model->BSIM3v0dvt2; return(OK); case BSIM3v0_MOD_DVT0W : value->rValue = model->BSIM3v0dvt0w; return(OK); case BSIM3v0_MOD_DVT1W : value->rValue = model->BSIM3v0dvt1w; return(OK); case BSIM3v0_MOD_DVT2W : value->rValue = model->BSIM3v0dvt2w; return(OK); case BSIM3v0_MOD_DROUT : value->rValue = model->BSIM3v0drout; return(OK); case BSIM3v0_MOD_DSUB : value->rValue = model->BSIM3v0dsub; return(OK); case BSIM3v0_MOD_VTH0: value->rValue = model->BSIM3v0vth0; return(OK); case BSIM3v0_MOD_UA: value->rValue = model->BSIM3v0ua; return(OK); case BSIM3v0_MOD_UA1: value->rValue = model->BSIM3v0ua1; return(OK); case BSIM3v0_MOD_UB: value->rValue = model->BSIM3v0ub; return(OK); case BSIM3v0_MOD_UB1: value->rValue = model->BSIM3v0ub1; return(OK); case BSIM3v0_MOD_UC: value->rValue = model->BSIM3v0uc; return(OK); case BSIM3v0_MOD_UC1: value->rValue = model->BSIM3v0uc1; return(OK); case BSIM3v0_MOD_U0: value->rValue = model->BSIM3v0u0; return(OK); case BSIM3v0_MOD_UTE: value->rValue = model->BSIM3v0ute; return(OK); case BSIM3v0_MOD_VOFF: value->rValue = model->BSIM3v0voff; return(OK); case BSIM3v0_MOD_DELTA: value->rValue = model->BSIM3v0delta; return(OK); case BSIM3v0_MOD_RDSW: value->rValue = model->BSIM3v0rdsw; return(OK); case BSIM3v0_MOD_PRWG: value->rValue = model->BSIM3v0prwg; return(OK); case BSIM3v0_MOD_PRWB: value->rValue = model->BSIM3v0prwb; return(OK); case BSIM3v0_MOD_PRT: value->rValue = model->BSIM3v0prt; return(OK); case BSIM3v0_MOD_ETA0: value->rValue = model->BSIM3v0eta0; return(OK); case BSIM3v0_MOD_ETAB: value->rValue = model->BSIM3v0etab; return(OK); case BSIM3v0_MOD_PCLM: value->rValue = model->BSIM3v0pclm; return(OK); case BSIM3v0_MOD_PDIBL1: value->rValue = model->BSIM3v0pdibl1; return(OK); case BSIM3v0_MOD_PDIBL2: value->rValue = model->BSIM3v0pdibl2; return(OK); case BSIM3v0_MOD_PDIBLB: value->rValue = model->BSIM3v0pdiblb; return(OK); case BSIM3v0_MOD_PSCBE1: value->rValue = model->BSIM3v0pscbe1; return(OK); case BSIM3v0_MOD_PSCBE2: value->rValue = model->BSIM3v0pscbe2; return(OK); case BSIM3v0_MOD_PVAG: value->rValue = model->BSIM3v0pvag; return(OK); case BSIM3v0_MOD_WR: value->rValue = model->BSIM3v0wr; return(OK); case BSIM3v0_MOD_DWG: value->rValue = model->BSIM3v0dwg; return(OK); case BSIM3v0_MOD_DWB: value->rValue = model->BSIM3v0dwb; return(OK); case BSIM3v0_MOD_B0: value->rValue = model->BSIM3v0b0; return(OK); case BSIM3v0_MOD_B1: value->rValue = model->BSIM3v0b1; return(OK); case BSIM3v0_MOD_ALPHA0: value->rValue = model->BSIM3v0alpha0; return(OK); case BSIM3v0_MOD_BETA0: value->rValue = model->BSIM3v0beta0; return(OK); case BSIM3v0_MOD_ELM: value->rValue = model->BSIM3v0elm; return(OK); case BSIM3v0_MOD_CGSL: value->rValue = model->BSIM3v0cgsl; return(OK); case BSIM3v0_MOD_CGDL: value->rValue = model->BSIM3v0cgdl; return(OK); case BSIM3v0_MOD_CKAPPA: value->rValue = model->BSIM3v0ckappa; return(OK); case BSIM3v0_MOD_CF: value->rValue = model->BSIM3v0cf; return(OK); case BSIM3v0_MOD_CLC: value->rValue = model->BSIM3v0clc; return(OK); case BSIM3v0_MOD_CLE: value->rValue = model->BSIM3v0cle; return(OK); case BSIM3v0_MOD_DWC: value->rValue = model->BSIM3v0dwc; return(OK); case BSIM3v0_MOD_DLC: value->rValue = model->BSIM3v0dlc; return(OK); /* Length dependence */ case BSIM3v0_MOD_LCDSC : value->rValue = model->BSIM3v0lcdsc; return(OK); case BSIM3v0_MOD_LCDSCB : value->rValue = model->BSIM3v0lcdscb; return(OK); case BSIM3v0_MOD_LCDSCD : value->rValue = model->BSIM3v0lcdscd; return(OK); case BSIM3v0_MOD_LCIT : value->rValue = model->BSIM3v0lcit; return(OK); case BSIM3v0_MOD_LNFACTOR : value->rValue = model->BSIM3v0lnfactor; return(OK); case BSIM3v0_MOD_LXJ: value->rValue = model->BSIM3v0lxj; return(OK); case BSIM3v0_MOD_LVSAT: value->rValue = model->BSIM3v0lvsat; return(OK); case BSIM3v0_MOD_LAT: value->rValue = model->BSIM3v0lat; return(OK); case BSIM3v0_MOD_LA0: value->rValue = model->BSIM3v0la0; return(OK); case BSIM3v0_MOD_LAGS: value->rValue = model->BSIM3v0lags; return(OK); case BSIM3v0_MOD_LA1: value->rValue = model->BSIM3v0la1; return(OK); case BSIM3v0_MOD_LA2: value->rValue = model->BSIM3v0la2; return(OK); case BSIM3v0_MOD_LKETA: value->rValue = model->BSIM3v0lketa; return(OK); case BSIM3v0_MOD_LNSUB: value->rValue = model->BSIM3v0lnsub; return(OK); case BSIM3v0_MOD_LNPEAK: value->rValue = model->BSIM3v0lnpeak; return(OK); case BSIM3v0_MOD_LNGATE: value->rValue = model->BSIM3v0lngate; return(OK); case BSIM3v0_MOD_LGAMMA1: value->rValue = model->BSIM3v0lgamma1; return(OK); case BSIM3v0_MOD_LGAMMA2: value->rValue = model->BSIM3v0lgamma2; return(OK); case BSIM3v0_MOD_LVBX: value->rValue = model->BSIM3v0lvbx; return(OK); case BSIM3v0_MOD_LVBM: value->rValue = model->BSIM3v0lvbm; return(OK); case BSIM3v0_MOD_LXT: value->rValue = model->BSIM3v0lxt; return(OK); case BSIM3v0_MOD_LK1: value->rValue = model->BSIM3v0lk1; return(OK); case BSIM3v0_MOD_LKT1: value->rValue = model->BSIM3v0lkt1; return(OK); case BSIM3v0_MOD_LKT1L: value->rValue = model->BSIM3v0lkt1l; return(OK); case BSIM3v0_MOD_LKT2 : value->rValue = model->BSIM3v0lkt2; return(OK); case BSIM3v0_MOD_LK2 : value->rValue = model->BSIM3v0lk2; return(OK); case BSIM3v0_MOD_LK3: value->rValue = model->BSIM3v0lk3; return(OK); case BSIM3v0_MOD_LK3B: value->rValue = model->BSIM3v0lk3b; return(OK); case BSIM3v0_MOD_LW0: value->rValue = model->BSIM3v0lw0; return(OK); case BSIM3v0_MOD_LNLX: value->rValue = model->BSIM3v0lnlx; return(OK); case BSIM3v0_MOD_LDVT0: value->rValue = model->BSIM3v0ldvt0; return(OK); case BSIM3v0_MOD_LDVT1 : value->rValue = model->BSIM3v0ldvt1; return(OK); case BSIM3v0_MOD_LDVT2 : value->rValue = model->BSIM3v0ldvt2; return(OK); case BSIM3v0_MOD_LDVT0W : value->rValue = model->BSIM3v0ldvt0w; return(OK); case BSIM3v0_MOD_LDVT1W : value->rValue = model->BSIM3v0ldvt1w; return(OK); case BSIM3v0_MOD_LDVT2W : value->rValue = model->BSIM3v0ldvt2w; return(OK); case BSIM3v0_MOD_LDROUT : value->rValue = model->BSIM3v0ldrout; return(OK); case BSIM3v0_MOD_LDSUB : value->rValue = model->BSIM3v0ldsub; return(OK); case BSIM3v0_MOD_LVTH0: value->rValue = model->BSIM3v0lvth0; return(OK); case BSIM3v0_MOD_LUA: value->rValue = model->BSIM3v0lua; return(OK); case BSIM3v0_MOD_LUA1: value->rValue = model->BSIM3v0lua1; return(OK); case BSIM3v0_MOD_LUB: value->rValue = model->BSIM3v0lub; return(OK); case BSIM3v0_MOD_LUB1: value->rValue = model->BSIM3v0lub1; return(OK); case BSIM3v0_MOD_LUC: value->rValue = model->BSIM3v0luc; return(OK); case BSIM3v0_MOD_LUC1: value->rValue = model->BSIM3v0luc1; return(OK); case BSIM3v0_MOD_LU0: value->rValue = model->BSIM3v0lu0; return(OK); case BSIM3v0_MOD_LUTE: value->rValue = model->BSIM3v0lute; return(OK); case BSIM3v0_MOD_LVOFF: value->rValue = model->BSIM3v0lvoff; return(OK); case BSIM3v0_MOD_LDELTA: value->rValue = model->BSIM3v0ldelta; return(OK); case BSIM3v0_MOD_LRDSW: value->rValue = model->BSIM3v0lrdsw; return(OK); case BSIM3v0_MOD_LPRWB: value->rValue = model->BSIM3v0lprwb; return(OK); case BSIM3v0_MOD_LPRWG: value->rValue = model->BSIM3v0lprwg; return(OK); case BSIM3v0_MOD_LPRT: value->rValue = model->BSIM3v0lprt; return(OK); case BSIM3v0_MOD_LETA0: value->rValue = model->BSIM3v0leta0; return(OK); case BSIM3v0_MOD_LETAB: value->rValue = model->BSIM3v0letab; return(OK); case BSIM3v0_MOD_LPCLM: value->rValue = model->BSIM3v0lpclm; return(OK); case BSIM3v0_MOD_LPDIBL1: value->rValue = model->BSIM3v0lpdibl1; return(OK); case BSIM3v0_MOD_LPDIBL2: value->rValue = model->BSIM3v0lpdibl2; return(OK); case BSIM3v0_MOD_LPDIBLB: value->rValue = model->BSIM3v0lpdiblb; return(OK); case BSIM3v0_MOD_LPSCBE1: value->rValue = model->BSIM3v0lpscbe1; return(OK); case BSIM3v0_MOD_LPSCBE2: value->rValue = model->BSIM3v0lpscbe2; return(OK); case BSIM3v0_MOD_LPVAG: value->rValue = model->BSIM3v0lpvag; return(OK); case BSIM3v0_MOD_LWR: value->rValue = model->BSIM3v0lwr; return(OK); case BSIM3v0_MOD_LDWG: value->rValue = model->BSIM3v0ldwg; return(OK); case BSIM3v0_MOD_LDWB: value->rValue = model->BSIM3v0ldwb; return(OK); case BSIM3v0_MOD_LB0: value->rValue = model->BSIM3v0lb0; return(OK); case BSIM3v0_MOD_LB1: value->rValue = model->BSIM3v0lb1; return(OK); case BSIM3v0_MOD_LALPHA0: value->rValue = model->BSIM3v0lalpha0; return(OK); case BSIM3v0_MOD_LBETA0: value->rValue = model->BSIM3v0lbeta0; return(OK); case BSIM3v0_MOD_LELM: value->rValue = model->BSIM3v0lelm; return(OK); case BSIM3v0_MOD_LCGSL: value->rValue = model->BSIM3v0lcgsl; return(OK); case BSIM3v0_MOD_LCGDL: value->rValue = model->BSIM3v0lcgdl; return(OK); case BSIM3v0_MOD_LCKAPPA: value->rValue = model->BSIM3v0lckappa; return(OK); case BSIM3v0_MOD_LCF: value->rValue = model->BSIM3v0lcf; return(OK); case BSIM3v0_MOD_LCLC: value->rValue = model->BSIM3v0lclc; return(OK); case BSIM3v0_MOD_LCLE: value->rValue = model->BSIM3v0lcle; return(OK); /* Width dependence */ case BSIM3v0_MOD_WCDSC : value->rValue = model->BSIM3v0wcdsc; return(OK); case BSIM3v0_MOD_WCDSCB : value->rValue = model->BSIM3v0wcdscb; return(OK); case BSIM3v0_MOD_WCDSCD : value->rValue = model->BSIM3v0wcdscd; return(OK); case BSIM3v0_MOD_WCIT : value->rValue = model->BSIM3v0wcit; return(OK); case BSIM3v0_MOD_WNFACTOR : value->rValue = model->BSIM3v0wnfactor; return(OK); case BSIM3v0_MOD_WXJ: value->rValue = model->BSIM3v0wxj; return(OK); case BSIM3v0_MOD_WVSAT: value->rValue = model->BSIM3v0wvsat; return(OK); case BSIM3v0_MOD_WAT: value->rValue = model->BSIM3v0wat; return(OK); case BSIM3v0_MOD_WA0: value->rValue = model->BSIM3v0wa0; return(OK); case BSIM3v0_MOD_WAGS: value->rValue = model->BSIM3v0wags; return(OK); case BSIM3v0_MOD_WA1: value->rValue = model->BSIM3v0wa1; return(OK); case BSIM3v0_MOD_WA2: value->rValue = model->BSIM3v0wa2; return(OK); case BSIM3v0_MOD_WKETA: value->rValue = model->BSIM3v0wketa; return(OK); case BSIM3v0_MOD_WNSUB: value->rValue = model->BSIM3v0wnsub; return(OK); case BSIM3v0_MOD_WNPEAK: value->rValue = model->BSIM3v0wnpeak; return(OK); case BSIM3v0_MOD_WNGATE: value->rValue = model->BSIM3v0wngate; return(OK); case BSIM3v0_MOD_WGAMMA1: value->rValue = model->BSIM3v0wgamma1; return(OK); case BSIM3v0_MOD_WGAMMA2: value->rValue = model->BSIM3v0wgamma2; return(OK); case BSIM3v0_MOD_WVBX: value->rValue = model->BSIM3v0wvbx; return(OK); case BSIM3v0_MOD_WVBM: value->rValue = model->BSIM3v0wvbm; return(OK); case BSIM3v0_MOD_WXT: value->rValue = model->BSIM3v0wxt; return(OK); case BSIM3v0_MOD_WK1: value->rValue = model->BSIM3v0wk1; return(OK); case BSIM3v0_MOD_WKT1: value->rValue = model->BSIM3v0wkt1; return(OK); case BSIM3v0_MOD_WKT1L: value->rValue = model->BSIM3v0wkt1l; return(OK); case BSIM3v0_MOD_WKT2 : value->rValue = model->BSIM3v0wkt2; return(OK); case BSIM3v0_MOD_WK2 : value->rValue = model->BSIM3v0wk2; return(OK); case BSIM3v0_MOD_WK3: value->rValue = model->BSIM3v0wk3; return(OK); case BSIM3v0_MOD_WK3B: value->rValue = model->BSIM3v0wk3b; return(OK); case BSIM3v0_MOD_WW0: value->rValue = model->BSIM3v0ww0; return(OK); case BSIM3v0_MOD_WNLX: value->rValue = model->BSIM3v0wnlx; return(OK); case BSIM3v0_MOD_WDVT0: value->rValue = model->BSIM3v0wdvt0; return(OK); case BSIM3v0_MOD_WDVT1 : value->rValue = model->BSIM3v0wdvt1; return(OK); case BSIM3v0_MOD_WDVT2 : value->rValue = model->BSIM3v0wdvt2; return(OK); case BSIM3v0_MOD_WDVT0W : value->rValue = model->BSIM3v0wdvt0w; return(OK); case BSIM3v0_MOD_WDVT1W : value->rValue = model->BSIM3v0wdvt1w; return(OK); case BSIM3v0_MOD_WDVT2W : value->rValue = model->BSIM3v0wdvt2w; return(OK); case BSIM3v0_MOD_WDROUT : value->rValue = model->BSIM3v0wdrout; return(OK); case BSIM3v0_MOD_WDSUB : value->rValue = model->BSIM3v0wdsub; return(OK); case BSIM3v0_MOD_WVTH0: value->rValue = model->BSIM3v0wvth0; return(OK); case BSIM3v0_MOD_WUA: value->rValue = model->BSIM3v0wua; return(OK); case BSIM3v0_MOD_WUA1: value->rValue = model->BSIM3v0wua1; return(OK); case BSIM3v0_MOD_WUB: value->rValue = model->BSIM3v0wub; return(OK); case BSIM3v0_MOD_WUB1: value->rValue = model->BSIM3v0wub1; return(OK); case BSIM3v0_MOD_WUC: value->rValue = model->BSIM3v0wuc; return(OK); case BSIM3v0_MOD_WUC1: value->rValue = model->BSIM3v0wuc1; return(OK); case BSIM3v0_MOD_WU0: value->rValue = model->BSIM3v0wu0; return(OK); case BSIM3v0_MOD_WUTE: value->rValue = model->BSIM3v0wute; return(OK); case BSIM3v0_MOD_WVOFF: value->rValue = model->BSIM3v0wvoff; return(OK); case BSIM3v0_MOD_WDELTA: value->rValue = model->BSIM3v0wdelta; return(OK); case BSIM3v0_MOD_WRDSW: value->rValue = model->BSIM3v0wrdsw; return(OK); case BSIM3v0_MOD_WPRWB: value->rValue = model->BSIM3v0wprwb; return(OK); case BSIM3v0_MOD_WPRWG: value->rValue = model->BSIM3v0wprwg; return(OK); case BSIM3v0_MOD_WPRT: value->rValue = model->BSIM3v0wprt; return(OK); case BSIM3v0_MOD_WETA0: value->rValue = model->BSIM3v0weta0; return(OK); case BSIM3v0_MOD_WETAB: value->rValue = model->BSIM3v0wetab; return(OK); case BSIM3v0_MOD_WPCLM: value->rValue = model->BSIM3v0wpclm; return(OK); case BSIM3v0_MOD_WPDIBL1: value->rValue = model->BSIM3v0wpdibl1; return(OK); case BSIM3v0_MOD_WPDIBL2: value->rValue = model->BSIM3v0wpdibl2; return(OK); case BSIM3v0_MOD_WPDIBLB: value->rValue = model->BSIM3v0wpdiblb; return(OK); case BSIM3v0_MOD_WPSCBE1: value->rValue = model->BSIM3v0wpscbe1; return(OK); case BSIM3v0_MOD_WPSCBE2: value->rValue = model->BSIM3v0wpscbe2; return(OK); case BSIM3v0_MOD_WPVAG: value->rValue = model->BSIM3v0wpvag; return(OK); case BSIM3v0_MOD_WWR: value->rValue = model->BSIM3v0wwr; return(OK); case BSIM3v0_MOD_WDWG: value->rValue = model->BSIM3v0wdwg; return(OK); case BSIM3v0_MOD_WDWB: value->rValue = model->BSIM3v0wdwb; return(OK); case BSIM3v0_MOD_WB0: value->rValue = model->BSIM3v0wb0; return(OK); case BSIM3v0_MOD_WB1: value->rValue = model->BSIM3v0wb1; return(OK); case BSIM3v0_MOD_WALPHA0: value->rValue = model->BSIM3v0walpha0; return(OK); case BSIM3v0_MOD_WBETA0: value->rValue = model->BSIM3v0wbeta0; return(OK); case BSIM3v0_MOD_WELM: value->rValue = model->BSIM3v0welm; return(OK); case BSIM3v0_MOD_WCGSL: value->rValue = model->BSIM3v0wcgsl; return(OK); case BSIM3v0_MOD_WCGDL: value->rValue = model->BSIM3v0wcgdl; return(OK); case BSIM3v0_MOD_WCKAPPA: value->rValue = model->BSIM3v0wckappa; return(OK); case BSIM3v0_MOD_WCF: value->rValue = model->BSIM3v0wcf; return(OK); case BSIM3v0_MOD_WCLC: value->rValue = model->BSIM3v0wclc; return(OK); case BSIM3v0_MOD_WCLE: value->rValue = model->BSIM3v0wcle; return(OK); /* Cross-term dependence */ case BSIM3v0_MOD_PCDSC : value->rValue = model->BSIM3v0pcdsc; return(OK); case BSIM3v0_MOD_PCDSCB : value->rValue = model->BSIM3v0pcdscb; return(OK); case BSIM3v0_MOD_PCDSCD : value->rValue = model->BSIM3v0pcdscd; return(OK); case BSIM3v0_MOD_PCIT : value->rValue = model->BSIM3v0pcit; return(OK); case BSIM3v0_MOD_PNFACTOR : value->rValue = model->BSIM3v0pnfactor; return(OK); case BSIM3v0_MOD_PXJ: value->rValue = model->BSIM3v0pxj; return(OK); case BSIM3v0_MOD_PVSAT: value->rValue = model->BSIM3v0pvsat; return(OK); case BSIM3v0_MOD_PAT: value->rValue = model->BSIM3v0pat; return(OK); case BSIM3v0_MOD_PA0: value->rValue = model->BSIM3v0pa0; return(OK); case BSIM3v0_MOD_PAGS: value->rValue = model->BSIM3v0pags; return(OK); case BSIM3v0_MOD_PA1: value->rValue = model->BSIM3v0pa1; return(OK); case BSIM3v0_MOD_PA2: value->rValue = model->BSIM3v0pa2; return(OK); case BSIM3v0_MOD_PKETA: value->rValue = model->BSIM3v0pketa; return(OK); case BSIM3v0_MOD_PNSUB: value->rValue = model->BSIM3v0pnsub; return(OK); case BSIM3v0_MOD_PNPEAK: value->rValue = model->BSIM3v0pnpeak; return(OK); case BSIM3v0_MOD_PNGATE: value->rValue = model->BSIM3v0pngate; return(OK); case BSIM3v0_MOD_PGAMMA1: value->rValue = model->BSIM3v0pgamma1; return(OK); case BSIM3v0_MOD_PGAMMA2: value->rValue = model->BSIM3v0pgamma2; return(OK); case BSIM3v0_MOD_PVBX: value->rValue = model->BSIM3v0pvbx; return(OK); case BSIM3v0_MOD_PVBM: value->rValue = model->BSIM3v0pvbm; return(OK); case BSIM3v0_MOD_PXT: value->rValue = model->BSIM3v0pxt; return(OK); case BSIM3v0_MOD_PK1: value->rValue = model->BSIM3v0pk1; return(OK); case BSIM3v0_MOD_PKT1: value->rValue = model->BSIM3v0pkt1; return(OK); case BSIM3v0_MOD_PKT1L: value->rValue = model->BSIM3v0pkt1l; return(OK); case BSIM3v0_MOD_PKT2 : value->rValue = model->BSIM3v0pkt2; return(OK); case BSIM3v0_MOD_PK2 : value->rValue = model->BSIM3v0pk2; return(OK); case BSIM3v0_MOD_PK3: value->rValue = model->BSIM3v0pk3; return(OK); case BSIM3v0_MOD_PK3B: value->rValue = model->BSIM3v0pk3b; return(OK); case BSIM3v0_MOD_PW0: value->rValue = model->BSIM3v0pw0; return(OK); case BSIM3v0_MOD_PNLX: value->rValue = model->BSIM3v0pnlx; return(OK); case BSIM3v0_MOD_PDVT0 : value->rValue = model->BSIM3v0pdvt0; return(OK); case BSIM3v0_MOD_PDVT1 : value->rValue = model->BSIM3v0pdvt1; return(OK); case BSIM3v0_MOD_PDVT2 : value->rValue = model->BSIM3v0pdvt2; return(OK); case BSIM3v0_MOD_PDVT0W : value->rValue = model->BSIM3v0pdvt0w; return(OK); case BSIM3v0_MOD_PDVT1W : value->rValue = model->BSIM3v0pdvt1w; return(OK); case BSIM3v0_MOD_PDVT2W : value->rValue = model->BSIM3v0pdvt2w; return(OK); case BSIM3v0_MOD_PDROUT : value->rValue = model->BSIM3v0pdrout; return(OK); case BSIM3v0_MOD_PDSUB : value->rValue = model->BSIM3v0pdsub; return(OK); case BSIM3v0_MOD_PVTH0: value->rValue = model->BSIM3v0pvth0; return(OK); case BSIM3v0_MOD_PUA: value->rValue = model->BSIM3v0pua; return(OK); case BSIM3v0_MOD_PUA1: value->rValue = model->BSIM3v0pua1; return(OK); case BSIM3v0_MOD_PUB: value->rValue = model->BSIM3v0pub; return(OK); case BSIM3v0_MOD_PUB1: value->rValue = model->BSIM3v0pub1; return(OK); case BSIM3v0_MOD_PUC: value->rValue = model->BSIM3v0puc; return(OK); case BSIM3v0_MOD_PUC1: value->rValue = model->BSIM3v0puc1; return(OK); case BSIM3v0_MOD_PU0: value->rValue = model->BSIM3v0pu0; return(OK); case BSIM3v0_MOD_PUTE: value->rValue = model->BSIM3v0pute; return(OK); case BSIM3v0_MOD_PVOFF: value->rValue = model->BSIM3v0pvoff; return(OK); case BSIM3v0_MOD_PDELTA: value->rValue = model->BSIM3v0pdelta; return(OK); case BSIM3v0_MOD_PRDSW: value->rValue = model->BSIM3v0prdsw; return(OK); case BSIM3v0_MOD_PPRWB: value->rValue = model->BSIM3v0pprwb; return(OK); case BSIM3v0_MOD_PPRWG: value->rValue = model->BSIM3v0pprwg; return(OK); case BSIM3v0_MOD_PPRT: value->rValue = model->BSIM3v0pprt; return(OK); case BSIM3v0_MOD_PETA0: value->rValue = model->BSIM3v0peta0; return(OK); case BSIM3v0_MOD_PETAB: value->rValue = model->BSIM3v0petab; return(OK); case BSIM3v0_MOD_PPCLM: value->rValue = model->BSIM3v0ppclm; return(OK); case BSIM3v0_MOD_PPDIBL1: value->rValue = model->BSIM3v0ppdibl1; return(OK); case BSIM3v0_MOD_PPDIBL2: value->rValue = model->BSIM3v0ppdibl2; return(OK); case BSIM3v0_MOD_PPDIBLB: value->rValue = model->BSIM3v0ppdiblb; return(OK); case BSIM3v0_MOD_PPSCBE1: value->rValue = model->BSIM3v0ppscbe1; return(OK); case BSIM3v0_MOD_PPSCBE2: value->rValue = model->BSIM3v0ppscbe2; return(OK); case BSIM3v0_MOD_PPVAG: value->rValue = model->BSIM3v0ppvag; return(OK); case BSIM3v0_MOD_PWR: value->rValue = model->BSIM3v0pwr; return(OK); case BSIM3v0_MOD_PDWG: value->rValue = model->BSIM3v0pdwg; return(OK); case BSIM3v0_MOD_PDWB: value->rValue = model->BSIM3v0pdwb; return(OK); case BSIM3v0_MOD_PB0: value->rValue = model->BSIM3v0pb0; return(OK); case BSIM3v0_MOD_PB1: value->rValue = model->BSIM3v0pb1; return(OK); case BSIM3v0_MOD_PALPHA0: value->rValue = model->BSIM3v0palpha0; return(OK); case BSIM3v0_MOD_PBETA0: value->rValue = model->BSIM3v0pbeta0; return(OK); case BSIM3v0_MOD_PELM: value->rValue = model->BSIM3v0pelm; return(OK); case BSIM3v0_MOD_PCGSL: value->rValue = model->BSIM3v0pcgsl; return(OK); case BSIM3v0_MOD_PCGDL: value->rValue = model->BSIM3v0pcgdl; return(OK); case BSIM3v0_MOD_PCKAPPA: value->rValue = model->BSIM3v0pckappa; return(OK); case BSIM3v0_MOD_PCF: value->rValue = model->BSIM3v0pcf; return(OK); case BSIM3v0_MOD_PCLC: value->rValue = model->BSIM3v0pclc; return(OK); case BSIM3v0_MOD_PCLE: value->rValue = model->BSIM3v0pcle; return(OK); case BSIM3v0_MOD_TNOM : value->rValue = model->BSIM3v0tnom; return(OK); case BSIM3v0_MOD_CGSO: value->rValue = model->BSIM3v0cgso; return(OK); case BSIM3v0_MOD_CGDO: value->rValue = model->BSIM3v0cgdo; return(OK); case BSIM3v0_MOD_CGBO: value->rValue = model->BSIM3v0cgbo; return(OK); case BSIM3v0_MOD_XPART: value->rValue = model->BSIM3v0xpart; return(OK); case BSIM3v0_MOD_RSH: value->rValue = model->BSIM3v0sheetResistance; return(OK); case BSIM3v0_MOD_JS: value->rValue = model->BSIM3v0jctSatCurDensity; return(OK); case BSIM3v0_MOD_PB: value->rValue = model->BSIM3v0bulkJctPotential; return(OK); case BSIM3v0_MOD_MJ: value->rValue = model->BSIM3v0bulkJctBotGradingCoeff; return(OK); case BSIM3v0_MOD_PBSW: value->rValue = model->BSIM3v0sidewallJctPotential; return(OK); case BSIM3v0_MOD_MJSW: value->rValue = model->BSIM3v0bulkJctSideGradingCoeff; return(OK); case BSIM3v0_MOD_CJ: value->rValue = model->BSIM3v0unitAreaJctCap; return(OK); case BSIM3v0_MOD_CJSW: value->rValue = model->BSIM3v0unitLengthSidewallJctCap; return(OK); case BSIM3v0_MOD_LINT: value->rValue = model->BSIM3v0Lint; return(OK); case BSIM3v0_MOD_LL: value->rValue = model->BSIM3v0Ll; return(OK); case BSIM3v0_MOD_LLN: value->rValue = model->BSIM3v0Lln; return(OK); case BSIM3v0_MOD_LW: value->rValue = model->BSIM3v0Lw; return(OK); case BSIM3v0_MOD_LWN: value->rValue = model->BSIM3v0Lwn; return(OK); case BSIM3v0_MOD_LWL: value->rValue = model->BSIM3v0Lwl; return(OK); case BSIM3v0_MOD_LMIN: value->rValue = model->BSIM3v0Lmin; return(OK); case BSIM3v0_MOD_LMAX: value->rValue = model->BSIM3v0Lmax; return(OK); case BSIM3v0_MOD_WINT: value->rValue = model->BSIM3v0Wint; return(OK); case BSIM3v0_MOD_WL: value->rValue = model->BSIM3v0Wl; return(OK); case BSIM3v0_MOD_WLN: value->rValue = model->BSIM3v0Wln; return(OK); case BSIM3v0_MOD_WW: value->rValue = model->BSIM3v0Ww; return(OK); case BSIM3v0_MOD_WWN: value->rValue = model->BSIM3v0Wwn; return(OK); case BSIM3v0_MOD_WWL: value->rValue = model->BSIM3v0Wwl; return(OK); case BSIM3v0_MOD_WMIN: value->rValue = model->BSIM3v0Wmin; return(OK); case BSIM3v0_MOD_WMAX: value->rValue = model->BSIM3v0Wmax; return(OK); case BSIM3v0_MOD_NOIA: value->rValue = model->BSIM3v0oxideTrapDensityA; return(OK); case BSIM3v0_MOD_NOIB: value->rValue = model->BSIM3v0oxideTrapDensityB; return(OK); case BSIM3v0_MOD_NOIC: value->rValue = model->BSIM3v0oxideTrapDensityC; return(OK); case BSIM3v0_MOD_EM: value->rValue = model->BSIM3v0em; return(OK); case BSIM3v0_MOD_EF: value->rValue = model->BSIM3v0ef; return(OK); case BSIM3v0_MOD_AF: value->rValue = model->BSIM3v0af; return(OK); case BSIM3v0_MOD_KF: value->rValue = model->BSIM3v0kf; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v0/b3v0trunc.c0000644000265600020320000000220012264261473021503 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0trunc.c **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here != NULL; here = here->BSIM3v0nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM3v0qb,ckt,timeStep); CKTterr(here->BSIM3v0qg,ckt,timeStep); CKTterr(here->BSIM3v0qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM3v0name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0mdel.c0000644000265600020320000000204412264261473021277 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0mdel.c **********/ #include "ngspice/ngspice.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM3v0model **model = (BSIM3v0model**)inModel; BSIM3v0model *modfast = (BSIM3v0model*)kill; BSIM3v0instance *here; BSIM3v0instance *prev = NULL; BSIM3v0model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM3v0nextModel)) { if ((*model)->BSIM3v0modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM3v0nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0set.c0000644000265600020320000010571412264261473021161 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0set.c **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int BSIM3v0setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; int error; CKTnode *tmp; CKTnode *tmpNode; IFuid tmpName; /* loop through all the BSIM3v0 device models */ for( ; model != NULL; model = model->BSIM3v0nextModel ) { /* Default value Processing for BSIM3v0 MOSFET Models */ if (!model->BSIM3v0typeGiven) model->BSIM3v0type = NMOS; if (!model->BSIM3v0mobModGiven) model->BSIM3v0mobMod = 1; if (!model->BSIM3v0binUnitGiven) model->BSIM3v0binUnit = 1; if (!model->BSIM3v0capModGiven) model->BSIM3v0capMod = 1; if (!model->BSIM3v0nqsModGiven) model->BSIM3v0nqsMod = 0; if (!model->BSIM3v0noiModGiven) model->BSIM3v0noiMod = 1; if (!model->BSIM3v0toxGiven) model->BSIM3v0tox = 150.0e-10; model->BSIM3v0cox = 3.453133e-11 / model->BSIM3v0tox; if (!model->BSIM3v0cdscGiven) model->BSIM3v0cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM3v0cdscbGiven) model->BSIM3v0cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v0cdscdGiven) model->BSIM3v0cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v0citGiven) model->BSIM3v0cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM3v0nfactorGiven) model->BSIM3v0nfactor = 1; if (!model->BSIM3v0xjGiven) model->BSIM3v0xj = .15e-6; if (!model->BSIM3v0vsatGiven) model->BSIM3v0vsat = 8.0e4; /* unit m/s */ if (!model->BSIM3v0atGiven) model->BSIM3v0at = 3.3e4; /* unit m/s */ if (!model->BSIM3v0a0Given) model->BSIM3v0a0 = 1.0; if (!model->BSIM3v0agsGiven) model->BSIM3v0ags = 0.0; if (!model->BSIM3v0a1Given) model->BSIM3v0a1 = 0.0; if (!model->BSIM3v0a2Given) model->BSIM3v0a2 = 1.0; if (!model->BSIM3v0ketaGiven) model->BSIM3v0keta = -0.047; /* unit / V */ if (!model->BSIM3v0nsubGiven) model->BSIM3v0nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM3v0npeakGiven) model->BSIM3v0npeak = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM3v0vbmGiven) model->BSIM3v0vbm = -5.0; if (!model->BSIM3v0xtGiven) model->BSIM3v0xt = 1.55e-7; if (!model->BSIM3v0kt1Given) model->BSIM3v0kt1 = -0.11; /* unit V */ if (!model->BSIM3v0kt1lGiven) model->BSIM3v0kt1l = 0.0; /* unit V*m */ if (!model->BSIM3v0kt2Given) model->BSIM3v0kt2 = 0.022; /* No unit */ if (!model->BSIM3v0k3Given) model->BSIM3v0k3 = 80.0; if (!model->BSIM3v0k3bGiven) model->BSIM3v0k3b = 0.0; if (!model->BSIM3v0w0Given) model->BSIM3v0w0 = 2.5e-6; if (!model->BSIM3v0nlxGiven) model->BSIM3v0nlx = 1.74e-7; if (!model->BSIM3v0dvt0Given) model->BSIM3v0dvt0 = 2.2; if (!model->BSIM3v0dvt1Given) model->BSIM3v0dvt1 = 0.53; if (!model->BSIM3v0dvt2Given) model->BSIM3v0dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM3v0dvt0wGiven) model->BSIM3v0dvt0w = 0.0; if (!model->BSIM3v0dvt1wGiven) model->BSIM3v0dvt1w = 5.3e6; if (!model->BSIM3v0dvt2wGiven) model->BSIM3v0dvt2w = -0.032; if (!model->BSIM3v0droutGiven) model->BSIM3v0drout = 0.56; if (!model->BSIM3v0dsubGiven) model->BSIM3v0dsub = model->BSIM3v0drout; if (!model->BSIM3v0vth0Given) model->BSIM3v0vth0 = (model->BSIM3v0type == NMOS) ? 0.7 : -0.7; if (!model->BSIM3v0uaGiven) model->BSIM3v0ua = 2.25e-9; /* unit m/V */ if (!model->BSIM3v0ua1Given) model->BSIM3v0ua1 = 4.31e-9; /* unit m/V */ if (!model->BSIM3v0ubGiven) model->BSIM3v0ub = 5.87e-19; /* unit (m/V)**2 */ if (!model->BSIM3v0ub1Given) model->BSIM3v0ub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->BSIM3v0ucGiven) model->BSIM3v0uc = (model->BSIM3v0mobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->BSIM3v0uc1Given) model->BSIM3v0uc1 = (model->BSIM3v0mobMod == 3) ? -0.056 : -0.056e-9; if (!model->BSIM3v0u0Given) model->BSIM3v0u0 = (model->BSIM3v0type == NMOS) ? 0.067 : 0.025; else if (model->BSIM3v0u0 > 1.0) model->BSIM3v0u0 = model->BSIM3v0u0 / 1.0e4; /* if u0 > 1.0, cm.g.sec unit system is used. If should be converted into SI unit system. */ if (!model->BSIM3v0uteGiven) model->BSIM3v0ute = -1.5; if (!model->BSIM3v0voffGiven) model->BSIM3v0voff = -0.08; if (!model->BSIM3v0deltaGiven) model->BSIM3v0delta = 0.01; if (!model->BSIM3v0rdswGiven) model->BSIM3v0rdsw = 0; if (!model->BSIM3v0prwgGiven) model->BSIM3v0prwg = 0.0; /* unit 1/V */ if (!model->BSIM3v0prwbGiven) model->BSIM3v0prwb = 0.0; if (!model->BSIM3v0prtGiven) if (!model->BSIM3v0prtGiven) model->BSIM3v0prt = 0.0; if (!model->BSIM3v0eta0Given) model->BSIM3v0eta0 = 0.08; /* no unit */ if (!model->BSIM3v0etabGiven) model->BSIM3v0etab = -0.07; /* unit 1/V */ if (!model->BSIM3v0pclmGiven) model->BSIM3v0pclm = 1.3; /* no unit */ if (!model->BSIM3v0pdibl1Given) model->BSIM3v0pdibl1 = .39; /* no unit */ if (!model->BSIM3v0pdibl2Given) model->BSIM3v0pdibl2 = 0.0086; /* no unit */ if (!model->BSIM3v0pdiblbGiven) model->BSIM3v0pdiblb = 0.0; /* 1/V */ if (!model->BSIM3v0pscbe1Given) model->BSIM3v0pscbe1 = 4.24e8; if (!model->BSIM3v0pscbe2Given) model->BSIM3v0pscbe2 = 1.0e-5; if (!model->BSIM3v0pvagGiven) model->BSIM3v0pvag = 0.0; if (!model->BSIM3v0wrGiven) model->BSIM3v0wr = 1.0; if (!model->BSIM3v0dwgGiven) model->BSIM3v0dwg = 0.0; if (!model->BSIM3v0dwbGiven) model->BSIM3v0dwb = 0.0; if (!model->BSIM3v0b0Given) model->BSIM3v0b0 = 0.0; if (!model->BSIM3v0b1Given) model->BSIM3v0b1 = 0.0; if (!model->BSIM3v0alpha0Given) model->BSIM3v0alpha0 = 0.0; if (!model->BSIM3v0beta0Given) model->BSIM3v0beta0 = 30.0; if (!model->BSIM3v0elmGiven) model->BSIM3v0elm = 5.0; if (!model->BSIM3v0cgslGiven) model->BSIM3v0cgsl = 0.0; if (!model->BSIM3v0cgdlGiven) model->BSIM3v0cgdl = 0.0; if (!model->BSIM3v0ckappaGiven) model->BSIM3v0ckappa = 0.6; if (!model->BSIM3v0clcGiven) model->BSIM3v0clc = 0.1e-6; if (!model->BSIM3v0cleGiven) model->BSIM3v0cle = 0.6; /* Length dependence */ if (!model->BSIM3v0lcdscGiven) model->BSIM3v0lcdsc = 0.0; if (!model->BSIM3v0lcdscbGiven) model->BSIM3v0lcdscb = 0.0; if (!model->BSIM3v0lcdscdGiven) model->BSIM3v0lcdscd = 0.0; if (!model->BSIM3v0lcitGiven) model->BSIM3v0lcit = 0.0; if (!model->BSIM3v0lnfactorGiven) model->BSIM3v0lnfactor = 0.0; if (!model->BSIM3v0lxjGiven) model->BSIM3v0lxj = 0.0; if (!model->BSIM3v0lvsatGiven) model->BSIM3v0lvsat = 0.0; if (!model->BSIM3v0latGiven) model->BSIM3v0lat = 0.0; if (!model->BSIM3v0la0Given) model->BSIM3v0la0 = 0.0; if (!model->BSIM3v0lagsGiven) model->BSIM3v0lags = 0.0; if (!model->BSIM3v0la1Given) model->BSIM3v0la1 = 0.0; if (!model->BSIM3v0la2Given) model->BSIM3v0la2 = 0.0; if (!model->BSIM3v0lketaGiven) model->BSIM3v0lketa = 0.0; if (!model->BSIM3v0lnsubGiven) model->BSIM3v0lnsub = 0.0; if (!model->BSIM3v0lnpeakGiven) model->BSIM3v0lnpeak = 0.0; if (!model->BSIM3v0lvbmGiven) model->BSIM3v0lvbm = 0.0; if (!model->BSIM3v0lxtGiven) model->BSIM3v0lxt = 0.0; if (!model->BSIM3v0lkt1Given) model->BSIM3v0lkt1 = 0.0; if (!model->BSIM3v0lkt1lGiven) model->BSIM3v0lkt1l = 0.0; if (!model->BSIM3v0lkt2Given) model->BSIM3v0lkt2 = 0.0; if (!model->BSIM3v0lk3Given) model->BSIM3v0lk3 = 0.0; if (!model->BSIM3v0lk3bGiven) model->BSIM3v0lk3b = 0.0; if (!model->BSIM3v0lw0Given) model->BSIM3v0lw0 = 0.0; if (!model->BSIM3v0lnlxGiven) model->BSIM3v0lnlx = 0.0; if (!model->BSIM3v0ldvt0Given) model->BSIM3v0ldvt0 = 0.0; if (!model->BSIM3v0ldvt1Given) model->BSIM3v0ldvt1 = 0.0; if (!model->BSIM3v0ldvt2Given) model->BSIM3v0ldvt2 = 0.0; if (!model->BSIM3v0ldvt0wGiven) model->BSIM3v0ldvt0w = 0.0; if (!model->BSIM3v0ldvt1wGiven) model->BSIM3v0ldvt1w = 0.0; if (!model->BSIM3v0ldvt2wGiven) model->BSIM3v0ldvt2w = 0.0; if (!model->BSIM3v0ldroutGiven) model->BSIM3v0ldrout = 0.0; if (!model->BSIM3v0ldsubGiven) model->BSIM3v0ldsub = 0.0; if (!model->BSIM3v0lvth0Given) model->BSIM3v0lvth0 = 0.0; if (!model->BSIM3v0luaGiven) model->BSIM3v0lua = 0.0; if (!model->BSIM3v0lua1Given) model->BSIM3v0lua1 = 0.0; if (!model->BSIM3v0lubGiven) model->BSIM3v0lub = 0.0; if (!model->BSIM3v0lub1Given) model->BSIM3v0lub1 = 0.0; if (!model->BSIM3v0lucGiven) model->BSIM3v0luc = 0.0; if (!model->BSIM3v0luc1Given) model->BSIM3v0luc1 = 0.0; if (!model->BSIM3v0lu0Given) model->BSIM3v0lu0 = 0.0; else if (model->BSIM3v0u0 > 1.0) model->BSIM3v0lu0 = model->BSIM3v0lu0 / 1.0e4; if (!model->BSIM3v0luteGiven) model->BSIM3v0lute = 0.0; if (!model->BSIM3v0lvoffGiven) model->BSIM3v0lvoff = 0.0; if (!model->BSIM3v0ldeltaGiven) model->BSIM3v0ldelta = 0.0; if (!model->BSIM3v0lrdswGiven) model->BSIM3v0lrdsw = 0.0; if (!model->BSIM3v0lprwbGiven) model->BSIM3v0lprwb = 0.0; if (!model->BSIM3v0lprwgGiven) model->BSIM3v0lprwg = 0.0; if (!model->BSIM3v0lprtGiven) if (!model->BSIM3v0lprtGiven) model->BSIM3v0lprt = 0.0; if (!model->BSIM3v0leta0Given) model->BSIM3v0leta0 = 0.0; if (!model->BSIM3v0letabGiven) model->BSIM3v0letab = -0.0; if (!model->BSIM3v0lpclmGiven) model->BSIM3v0lpclm = 0.0; if (!model->BSIM3v0lpdibl1Given) model->BSIM3v0lpdibl1 = 0.0; if (!model->BSIM3v0lpdibl2Given) model->BSIM3v0lpdibl2 = 0.0; if (!model->BSIM3v0lpdiblbGiven) model->BSIM3v0lpdiblb = 0.0; if (!model->BSIM3v0lpscbe1Given) model->BSIM3v0lpscbe1 = 0.0; if (!model->BSIM3v0lpscbe2Given) model->BSIM3v0lpscbe2 = 0.0; if (!model->BSIM3v0lpvagGiven) model->BSIM3v0lpvag = 0.0; if (!model->BSIM3v0lwrGiven) model->BSIM3v0lwr = 0.0; if (!model->BSIM3v0ldwgGiven) model->BSIM3v0ldwg = 0.0; if (!model->BSIM3v0ldwbGiven) model->BSIM3v0ldwb = 0.0; if (!model->BSIM3v0lb0Given) model->BSIM3v0lb0 = 0.0; if (!model->BSIM3v0lb1Given) model->BSIM3v0lb1 = 0.0; if (!model->BSIM3v0lalpha0Given) model->BSIM3v0lalpha0 = 0.0; if (!model->BSIM3v0lbeta0Given) model->BSIM3v0lbeta0 = 0.0; if (!model->BSIM3v0lelmGiven) model->BSIM3v0lelm = 0.0; if (!model->BSIM3v0lcgslGiven) model->BSIM3v0lcgsl = 0.0; if (!model->BSIM3v0lcgdlGiven) model->BSIM3v0lcgdl = 0.0; if (!model->BSIM3v0lckappaGiven) model->BSIM3v0lckappa = 0.0; if (!model->BSIM3v0lcfGiven) model->BSIM3v0lcf = 0.0; if (!model->BSIM3v0lclcGiven) model->BSIM3v0lclc = 0.0; if (!model->BSIM3v0lcleGiven) model->BSIM3v0lcle = 0.0; /* Width dependence */ if (!model->BSIM3v0wcdscGiven) model->BSIM3v0wcdsc = 0.0; if (!model->BSIM3v0wcdscbGiven) model->BSIM3v0wcdscb = 0.0; if (!model->BSIM3v0wcdscdGiven) model->BSIM3v0wcdscd = 0.0; if (!model->BSIM3v0wcitGiven) model->BSIM3v0wcit = 0.0; if (!model->BSIM3v0wnfactorGiven) model->BSIM3v0wnfactor = 0.0; if (!model->BSIM3v0wxjGiven) model->BSIM3v0wxj = 0.0; if (!model->BSIM3v0wvsatGiven) model->BSIM3v0wvsat = 0.0; if (!model->BSIM3v0watGiven) model->BSIM3v0wat = 0.0; if (!model->BSIM3v0wa0Given) model->BSIM3v0wa0 = 0.0; if (!model->BSIM3v0wagsGiven) model->BSIM3v0wags = 0.0; if (!model->BSIM3v0wa1Given) model->BSIM3v0wa1 = 0.0; if (!model->BSIM3v0wa2Given) model->BSIM3v0wa2 = 0.0; if (!model->BSIM3v0wketaGiven) model->BSIM3v0wketa = 0.0; if (!model->BSIM3v0wnsubGiven) model->BSIM3v0wnsub = 0.0; if (!model->BSIM3v0wnpeakGiven) model->BSIM3v0wnpeak = 0.0; if (!model->BSIM3v0wvbmGiven) model->BSIM3v0wvbm = 0.0; if (!model->BSIM3v0wxtGiven) model->BSIM3v0wxt = 0.0; if (!model->BSIM3v0wkt1Given) model->BSIM3v0wkt1 = 0.0; if (!model->BSIM3v0wkt1lGiven) model->BSIM3v0wkt1l = 0.0; if (!model->BSIM3v0wkt2Given) model->BSIM3v0wkt2 = 0.0; if (!model->BSIM3v0wk3Given) model->BSIM3v0wk3 = 0.0; if (!model->BSIM3v0wk3bGiven) model->BSIM3v0wk3b = 0.0; if (!model->BSIM3v0ww0Given) model->BSIM3v0ww0 = 0.0; if (!model->BSIM3v0wnlxGiven) model->BSIM3v0wnlx = 0.0; if (!model->BSIM3v0wdvt0Given) model->BSIM3v0wdvt0 = 0.0; if (!model->BSIM3v0wdvt1Given) model->BSIM3v0wdvt1 = 0.0; if (!model->BSIM3v0wdvt2Given) model->BSIM3v0wdvt2 = 0.0; if (!model->BSIM3v0wdvt0wGiven) model->BSIM3v0wdvt0w = 0.0; if (!model->BSIM3v0wdvt1wGiven) model->BSIM3v0wdvt1w = 0.0; if (!model->BSIM3v0wdvt2wGiven) model->BSIM3v0wdvt2w = 0.0; if (!model->BSIM3v0wdroutGiven) model->BSIM3v0wdrout = 0.0; if (!model->BSIM3v0wdsubGiven) model->BSIM3v0wdsub = 0.0; if (!model->BSIM3v0wvth0Given) model->BSIM3v0wvth0 = 0.0; if (!model->BSIM3v0wuaGiven) model->BSIM3v0wua = 0.0; if (!model->BSIM3v0wua1Given) model->BSIM3v0wua1 = 0.0; if (!model->BSIM3v0wubGiven) model->BSIM3v0wub = 0.0; if (!model->BSIM3v0wub1Given) model->BSIM3v0wub1 = 0.0; if (!model->BSIM3v0wucGiven) model->BSIM3v0wuc = 0.0; if (!model->BSIM3v0wuc1Given) model->BSIM3v0wuc1 = 0.0; if (!model->BSIM3v0wu0Given) model->BSIM3v0wu0 = 0.0; else if (model->BSIM3v0u0 > 1.0) model->BSIM3v0wu0 = model->BSIM3v0wu0 / 1.0e4; if (!model->BSIM3v0wuteGiven) model->BSIM3v0wute = 0.0; if (!model->BSIM3v0wvoffGiven) model->BSIM3v0wvoff = 0.0; if (!model->BSIM3v0wdeltaGiven) model->BSIM3v0wdelta = 0.0; if (!model->BSIM3v0wrdswGiven) model->BSIM3v0wrdsw = 0.0; if (!model->BSIM3v0wprwbGiven) model->BSIM3v0wprwb = 0.0; if (!model->BSIM3v0wprwgGiven) model->BSIM3v0wprwg = 0.0; if (!model->BSIM3v0wprtGiven) model->BSIM3v0wprt = 0.0; if (!model->BSIM3v0weta0Given) model->BSIM3v0weta0 = 0.0; if (!model->BSIM3v0wetabGiven) model->BSIM3v0wetab = 0.0; if (!model->BSIM3v0wpclmGiven) model->BSIM3v0wpclm = 0.0; if (!model->BSIM3v0wpdibl1Given) model->BSIM3v0wpdibl1 = 0.0; if (!model->BSIM3v0wpdibl2Given) model->BSIM3v0wpdibl2 = 0.0; if (!model->BSIM3v0wpdiblbGiven) model->BSIM3v0wpdiblb = 0.0; if (!model->BSIM3v0wpscbe1Given) model->BSIM3v0wpscbe1 = 0.0; if (!model->BSIM3v0wpscbe2Given) model->BSIM3v0wpscbe2 = 0.0; if (!model->BSIM3v0wpvagGiven) model->BSIM3v0wpvag = 0.0; if (!model->BSIM3v0wwrGiven) model->BSIM3v0wwr = 0.0; if (!model->BSIM3v0wdwgGiven) model->BSIM3v0wdwg = 0.0; if (!model->BSIM3v0wdwbGiven) model->BSIM3v0wdwb = 0.0; if (!model->BSIM3v0wb0Given) model->BSIM3v0wb0 = 0.0; if (!model->BSIM3v0wb1Given) model->BSIM3v0wb1 = 0.0; if (!model->BSIM3v0walpha0Given) model->BSIM3v0walpha0 = 0.0; if (!model->BSIM3v0wbeta0Given) model->BSIM3v0wbeta0 = 0.0; if (!model->BSIM3v0welmGiven) model->BSIM3v0welm = 0.0; if (!model->BSIM3v0wcgslGiven) model->BSIM3v0wcgsl = 0.0; if (!model->BSIM3v0wcgdlGiven) model->BSIM3v0wcgdl = 0.0; if (!model->BSIM3v0wckappaGiven) model->BSIM3v0wckappa = 0.0; if (!model->BSIM3v0wcfGiven) model->BSIM3v0wcf = 0.0; if (!model->BSIM3v0wclcGiven) model->BSIM3v0wclc = 0.0; if (!model->BSIM3v0wcleGiven) model->BSIM3v0wcle = 0.0; /* Cross-term dependence */ if (!model->BSIM3v0pcdscGiven) model->BSIM3v0pcdsc = 0.0; if (!model->BSIM3v0pcdscbGiven) model->BSIM3v0pcdscb = 0.0; if (!model->BSIM3v0pcdscdGiven) model->BSIM3v0pcdscd = 0.0; if (!model->BSIM3v0pcitGiven) model->BSIM3v0pcit = 0.0; if (!model->BSIM3v0pnfactorGiven) model->BSIM3v0pnfactor = 0.0; if (!model->BSIM3v0pxjGiven) model->BSIM3v0pxj = 0.0; if (!model->BSIM3v0pvsatGiven) model->BSIM3v0pvsat = 0.0; if (!model->BSIM3v0patGiven) model->BSIM3v0pat = 0.0; if (!model->BSIM3v0pa0Given) model->BSIM3v0pa0 = 0.0; if (!model->BSIM3v0pagsGiven) model->BSIM3v0pags = 0.0; if (!model->BSIM3v0pa1Given) model->BSIM3v0pa1 = 0.0; if (!model->BSIM3v0pa2Given) model->BSIM3v0pa2 = 0.0; if (!model->BSIM3v0pketaGiven) model->BSIM3v0pketa = 0.0; if (!model->BSIM3v0pnsubGiven) model->BSIM3v0pnsub = 0.0; if (!model->BSIM3v0pnpeakGiven) model->BSIM3v0pnpeak = 0.0; if (!model->BSIM3v0pvbmGiven) model->BSIM3v0pvbm = 0.0; if (!model->BSIM3v0pxtGiven) model->BSIM3v0pxt = 0.0; if (!model->BSIM3v0pkt1Given) model->BSIM3v0pkt1 = 0.0; if (!model->BSIM3v0pkt1lGiven) model->BSIM3v0pkt1l = 0.0; if (!model->BSIM3v0pkt2Given) model->BSIM3v0pkt2 = 0.0; if (!model->BSIM3v0pk3Given) model->BSIM3v0pk3 = 0.0; if (!model->BSIM3v0pk3bGiven) model->BSIM3v0pk3b = 0.0; if (!model->BSIM3v0pw0Given) model->BSIM3v0pw0 = 0.0; if (!model->BSIM3v0pnlxGiven) model->BSIM3v0pnlx = 0.0; if (!model->BSIM3v0pdvt0Given) model->BSIM3v0pdvt0 = 0.0; if (!model->BSIM3v0pdvt1Given) model->BSIM3v0pdvt1 = 0.0; if (!model->BSIM3v0pdvt2Given) model->BSIM3v0pdvt2 = 0.0; if (!model->BSIM3v0pdvt0wGiven) model->BSIM3v0pdvt0w = 0.0; if (!model->BSIM3v0pdvt1wGiven) model->BSIM3v0pdvt1w = 0.0; if (!model->BSIM3v0pdvt2wGiven) model->BSIM3v0pdvt2w = 0.0; if (!model->BSIM3v0pdroutGiven) model->BSIM3v0pdrout = 0.0; if (!model->BSIM3v0pdsubGiven) model->BSIM3v0pdsub = 0.0; if (!model->BSIM3v0pvth0Given) model->BSIM3v0pvth0 = 0.0; if (!model->BSIM3v0puaGiven) model->BSIM3v0pua = 0.0; if (!model->BSIM3v0pua1Given) model->BSIM3v0pua1 = 0.0; if (!model->BSIM3v0pubGiven) model->BSIM3v0pub = 0.0; if (!model->BSIM3v0pub1Given) model->BSIM3v0pub1 = 0.0; if (!model->BSIM3v0pucGiven) model->BSIM3v0puc = 0.0; if (!model->BSIM3v0puc1Given) model->BSIM3v0puc1 = 0.0; if (!model->BSIM3v0pu0Given) model->BSIM3v0pu0 = 0.0; else if (model->BSIM3v0u0 > 1.0) model->BSIM3v0pu0 = model->BSIM3v0pu0 / 1.0e4; if (!model->BSIM3v0puteGiven) model->BSIM3v0pute = 0.0; if (!model->BSIM3v0pvoffGiven) model->BSIM3v0pvoff = 0.0; if (!model->BSIM3v0pdeltaGiven) model->BSIM3v0pdelta = 0.0; if (!model->BSIM3v0prdswGiven) model->BSIM3v0prdsw = 0.0; if (!model->BSIM3v0pprwbGiven) model->BSIM3v0pprwb = 0.0; if (!model->BSIM3v0pprwgGiven) model->BSIM3v0pprwg = 0.0; if (!model->BSIM3v0pprtGiven) model->BSIM3v0pprt = 0.0; if (!model->BSIM3v0peta0Given) model->BSIM3v0peta0 = 0.0; if (!model->BSIM3v0petabGiven) model->BSIM3v0petab = 0.0; if (!model->BSIM3v0ppclmGiven) model->BSIM3v0ppclm = 0.0; if (!model->BSIM3v0ppdibl1Given) model->BSIM3v0ppdibl1 = 0.0; if (!model->BSIM3v0ppdibl2Given) model->BSIM3v0ppdibl2 = 0.0; if (!model->BSIM3v0ppdiblbGiven) model->BSIM3v0ppdiblb = 0.0; if (!model->BSIM3v0ppscbe1Given) model->BSIM3v0ppscbe1 = 0.0; if (!model->BSIM3v0ppscbe2Given) model->BSIM3v0ppscbe2 = 0.0; if (!model->BSIM3v0ppvagGiven) model->BSIM3v0ppvag = 0.0; if (!model->BSIM3v0pwrGiven) model->BSIM3v0pwr = 0.0; if (!model->BSIM3v0pdwgGiven) model->BSIM3v0pdwg = 0.0; if (!model->BSIM3v0pdwbGiven) model->BSIM3v0pdwb = 0.0; if (!model->BSIM3v0pb0Given) model->BSIM3v0pb0 = 0.0; if (!model->BSIM3v0pb1Given) model->BSIM3v0pb1 = 0.0; if (!model->BSIM3v0palpha0Given) model->BSIM3v0palpha0 = 0.0; if (!model->BSIM3v0pbeta0Given) model->BSIM3v0pbeta0 = 0.0; if (!model->BSIM3v0pelmGiven) model->BSIM3v0pelm = 0.0; if (!model->BSIM3v0pcgslGiven) model->BSIM3v0pcgsl = 0.0; if (!model->BSIM3v0pcgdlGiven) model->BSIM3v0pcgdl = 0.0; if (!model->BSIM3v0pckappaGiven) model->BSIM3v0pckappa = 0.0; if (!model->BSIM3v0pcfGiven) model->BSIM3v0pcf = 0.0; if (!model->BSIM3v0pclcGiven) model->BSIM3v0pclc = 0.0; if (!model->BSIM3v0pcleGiven) model->BSIM3v0pcle = 0.0; /* unit degree celcius */ if (!model->BSIM3v0tnomGiven) model->BSIM3v0tnom = ckt->CKTnomTemp; if (!model->BSIM3v0LintGiven) model->BSIM3v0Lint = 0.0; if (!model->BSIM3v0LlGiven) model->BSIM3v0Ll = 0.0; if (!model->BSIM3v0LlnGiven) model->BSIM3v0Lln = 1.0; if (!model->BSIM3v0LwGiven) model->BSIM3v0Lw = 0.0; if (!model->BSIM3v0LwnGiven) model->BSIM3v0Lwn = 1.0; if (!model->BSIM3v0LwlGiven) model->BSIM3v0Lwl = 0.0; if (!model->BSIM3v0LminGiven) model->BSIM3v0Lmin = 0.0; if (!model->BSIM3v0LmaxGiven) model->BSIM3v0Lmax = 1.0; if (!model->BSIM3v0WintGiven) model->BSIM3v0Wint = 0.0; if (!model->BSIM3v0WlGiven) model->BSIM3v0Wl = 0.0; if (!model->BSIM3v0WlnGiven) model->BSIM3v0Wln = 1.0; if (!model->BSIM3v0WwGiven) model->BSIM3v0Ww = 0.0; if (!model->BSIM3v0WwnGiven) model->BSIM3v0Wwn = 1.0; if (!model->BSIM3v0WwlGiven) model->BSIM3v0Wwl = 0.0; if (!model->BSIM3v0WminGiven) model->BSIM3v0Wmin = 0.0; if (!model->BSIM3v0WmaxGiven) model->BSIM3v0Wmax = 1.0; if (!model->BSIM3v0dwcGiven) model->BSIM3v0dwc = model->BSIM3v0Wint; if (!model->BSIM3v0dlcGiven) model->BSIM3v0dlc = model->BSIM3v0Lint; if (!model->BSIM3v0cfGiven) model->BSIM3v0cf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->BSIM3v0tox); if (!model->BSIM3v0cgdoGiven) { if (model->BSIM3v0dlcGiven && (model->BSIM3v0dlc > 0.0)) { model->BSIM3v0cgdo = model->BSIM3v0dlc * model->BSIM3v0cox - model->BSIM3v0cgdl ; if (model->BSIM3v0cgdo < 0.0) model->BSIM3v0cgdo = 0.0; } else model->BSIM3v0cgdo = 0.6 * model->BSIM3v0xj * model->BSIM3v0cox; } if (!model->BSIM3v0cgsoGiven) { if (model->BSIM3v0dlcGiven && (model->BSIM3v0dlc > 0.0)) { model->BSIM3v0cgso = model->BSIM3v0dlc * model->BSIM3v0cox - model->BSIM3v0cgsl ; if (model->BSIM3v0cgso < 0.0) model->BSIM3v0cgso = 0.0; } else model->BSIM3v0cgso = 0.6 * model->BSIM3v0xj * model->BSIM3v0cox; } if (!model->BSIM3v0cgboGiven) model->BSIM3v0cgbo = 0.0; if (!model->BSIM3v0xpartGiven) model->BSIM3v0xpart = 0.0; if (!model->BSIM3v0sheetResistanceGiven) model->BSIM3v0sheetResistance = 0.0; if (!model->BSIM3v0unitAreaJctCapGiven) model->BSIM3v0unitAreaJctCap = 5.0E-4; if (!model->BSIM3v0unitLengthSidewallJctCapGiven) model->BSIM3v0unitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM3v0jctSatCurDensityGiven) model->BSIM3v0jctSatCurDensity = 1.0E-4; if (!model->BSIM3v0bulkJctPotentialGiven) model->BSIM3v0bulkJctPotential = 1.0; if (!model->BSIM3v0sidewallJctPotentialGiven) model->BSIM3v0sidewallJctPotential = 1.0; if (!model->BSIM3v0bulkJctBotGradingCoeffGiven) model->BSIM3v0bulkJctBotGradingCoeff = 0.5; if (!model->BSIM3v0bulkJctSideGradingCoeffGiven) model->BSIM3v0bulkJctSideGradingCoeff = 0.33; if (!model->BSIM3v0oxideTrapDensityAGiven) { if (model->BSIM3v0type == NMOS) model->BSIM3v0oxideTrapDensityA = 1e20; else model->BSIM3v0oxideTrapDensityA=9.9e18; } if (!model->BSIM3v0oxideTrapDensityBGiven) { if (model->BSIM3v0type == NMOS) model->BSIM3v0oxideTrapDensityB = 5e4; else model->BSIM3v0oxideTrapDensityB = 2.4e3; } if (!model->BSIM3v0oxideTrapDensityCGiven) { if (model->BSIM3v0type == NMOS) model->BSIM3v0oxideTrapDensityC = -1.4e-12; else model->BSIM3v0oxideTrapDensityC = 1.4e-12; } if (!model->BSIM3v0emGiven) model->BSIM3v0em = 4.1e7; /* V/m */ if (!model->BSIM3v0efGiven) model->BSIM3v0ef = 1.0; if (!model->BSIM3v0afGiven) model->BSIM3v0af = 1.0; if (!model->BSIM3v0kfGiven) model->BSIM3v0kf = 0.0; /* loop through all the instances of the model */ for (here = model->BSIM3v0instances; here != NULL ; here=here->BSIM3v0nextInstance) { /* allocate a chunk of the state vector */ here->BSIM3v0states = *states; *states += BSIM3v0numStates; /* perform the parameter defaulting */ if (!here->BSIM3v0drainAreaGiven) here->BSIM3v0drainArea = 0.0; if (!here->BSIM3v0drainPerimeterGiven) here->BSIM3v0drainPerimeter = 0.0; if (!here->BSIM3v0drainSquaresGiven) here->BSIM3v0drainSquares = 1.0; if (!here->BSIM3v0icVBSGiven) here->BSIM3v0icVBS = 0; if (!here->BSIM3v0icVDSGiven) here->BSIM3v0icVDS = 0; if (!here->BSIM3v0icVGSGiven) here->BSIM3v0icVGS = 0; if (!here->BSIM3v0lGiven) here->BSIM3v0l = 5e-6; if (!here->BSIM3v0sourceAreaGiven) here->BSIM3v0sourceArea = 0; if (!here->BSIM3v0sourcePerimeterGiven) here->BSIM3v0sourcePerimeter = 0; if (!here->BSIM3v0sourceSquaresGiven) here->BSIM3v0sourceSquares = 1; if (!here->BSIM3v0wGiven) here->BSIM3v0w = 5e-6; if (!here->BSIM3v0mGiven) here->BSIM3v0m = 1; if (!here->BSIM3v0nqsModGiven) here->BSIM3v0nqsMod = model->BSIM3v0nqsMod; /* process drain series resistance */ if ((model->BSIM3v0sheetResistance > 0.0) && (here->BSIM3v0drainSquares > 0.0 )) { if(here->BSIM3v0dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v0name,"drain"); if(error) return(error); here->BSIM3v0dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v0dNodePrime = here->BSIM3v0dNode; } /* process source series resistance */ if ((model->BSIM3v0sheetResistance > 0.0) && (here->BSIM3v0sourceSquares > 0.0 )) { if(here->BSIM3v0sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v0name,"source"); if(error) return(error); here->BSIM3v0sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM3v0sNodePrime = here->BSIM3v0sNode; } /* internal charge node */ if ((here->BSIM3v0nqsMod)) { if(here->BSIM3v0qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM3v0name,"charge"); if(error) return(error); here->BSIM3v0qNode = tmp->number; } } else { here->BSIM3v0qNode = 0; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM3v0DdPtr, BSIM3v0dNode, BSIM3v0dNode); TSTALLOC(BSIM3v0GgPtr, BSIM3v0gNode, BSIM3v0gNode); TSTALLOC(BSIM3v0SsPtr, BSIM3v0sNode, BSIM3v0sNode); TSTALLOC(BSIM3v0BbPtr, BSIM3v0bNode, BSIM3v0bNode); TSTALLOC(BSIM3v0DPdpPtr, BSIM3v0dNodePrime, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0SPspPtr, BSIM3v0sNodePrime, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0DdpPtr, BSIM3v0dNode, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0GbPtr, BSIM3v0gNode, BSIM3v0bNode); TSTALLOC(BSIM3v0GdpPtr, BSIM3v0gNode, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0GspPtr, BSIM3v0gNode, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0SspPtr, BSIM3v0sNode, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0BdpPtr, BSIM3v0bNode, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0BspPtr, BSIM3v0bNode, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0DPspPtr, BSIM3v0dNodePrime, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0DPdPtr, BSIM3v0dNodePrime, BSIM3v0dNode); TSTALLOC(BSIM3v0BgPtr, BSIM3v0bNode, BSIM3v0gNode); TSTALLOC(BSIM3v0DPgPtr, BSIM3v0dNodePrime, BSIM3v0gNode); TSTALLOC(BSIM3v0SPgPtr, BSIM3v0sNodePrime, BSIM3v0gNode); TSTALLOC(BSIM3v0SPsPtr, BSIM3v0sNodePrime, BSIM3v0sNode); TSTALLOC(BSIM3v0DPbPtr, BSIM3v0dNodePrime, BSIM3v0bNode); TSTALLOC(BSIM3v0SPbPtr, BSIM3v0sNodePrime, BSIM3v0bNode); TSTALLOC(BSIM3v0SPdpPtr, BSIM3v0sNodePrime, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0QqPtr, BSIM3v0qNode, BSIM3v0qNode); TSTALLOC(BSIM3v0QdpPtr, BSIM3v0qNode, BSIM3v0dNodePrime); TSTALLOC(BSIM3v0QspPtr, BSIM3v0qNode, BSIM3v0sNodePrime); TSTALLOC(BSIM3v0QgPtr, BSIM3v0qNode, BSIM3v0gNode); TSTALLOC(BSIM3v0QbPtr, BSIM3v0qNode, BSIM3v0bNode); TSTALLOC(BSIM3v0DPqPtr, BSIM3v0dNodePrime, BSIM3v0qNode); TSTALLOC(BSIM3v0SPqPtr, BSIM3v0sNodePrime, BSIM3v0qNode); TSTALLOC(BSIM3v0GqPtr, BSIM3v0gNode, BSIM3v0qNode); TSTALLOC(BSIM3v0BqPtr, BSIM3v0bNode, BSIM3v0qNode); } } return(OK); } int BSIM3v0unsetup(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model; BSIM3v0instance *here; for (model = (BSIM3v0model *)inModel; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here != NULL; here=here->BSIM3v0nextInstance) { if (here->BSIM3v0dNodePrime && here->BSIM3v0dNodePrime != here->BSIM3v0dNode) { CKTdltNNum(ckt, here->BSIM3v0dNodePrime); here->BSIM3v0dNodePrime = 0; } if (here->BSIM3v0sNodePrime && here->BSIM3v0sNodePrime != here->BSIM3v0sNode) { CKTdltNNum(ckt, here->BSIM3v0sNodePrime); here->BSIM3v0sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3v0/bsim3v0ext.h0000644000265600020320000000270412264261473021677 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. File: bsim3v0ext.h **********/ extern int BSIM3v0acLoad(GENmodel *,CKTcircuit*); extern int BSIM3v0ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM3v0convTest(GENmodel *,CKTcircuit*); extern int BSIM3v0delete(GENmodel*,IFuid,GENinstance**); extern void BSIM3v0destroy(GENmodel**); extern int BSIM3v0getic(GENmodel*,CKTcircuit*); extern int BSIM3v0load(GENmodel*,CKTcircuit*); extern int BSIM3v0mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM3v0mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM3v0mParam(int,IFvalue*,GENmodel*); extern void BSIM3v0mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM3v0param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM3v0pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM3v0setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM3v0temp(GENmodel*,CKTcircuit*); extern int BSIM3v0trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM3v0noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM3v0unsetup(GENmodel *, CKTcircuit *); ngspice-26/src/spicelib/devices/bsim3v0/b3v0acld.c0000644000265600020320000001570112264261473021265 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0acld.c **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0acLoad(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb, omega; double GSoverlapCap, GDoverlapCap, GBoverlapCap, FwdSum, RevSum, Gm, Gmbs; double dxpart, sxpart, cqgb, cqdb, cqsb, cqbb, xcqgb, xcqdb, xcqsb, xcqbb; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here!= NULL; here = here->BSIM3v0nextInstance) { if (here->BSIM3v0mode >= 0) { Gm = here->BSIM3v0gm; Gmbs = here->BSIM3v0gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->BSIM3v0cggb; cgsb = here->BSIM3v0cgsb; cgdb = here->BSIM3v0cgdb; cbgb = here->BSIM3v0cbgb; cbsb = here->BSIM3v0cbsb; cbdb = here->BSIM3v0cbdb; cdgb = here->BSIM3v0cdgb; cdsb = here->BSIM3v0cdsb; cddb = here->BSIM3v0cddb; cqgb = here->BSIM3v0cqgb; cqdb = here->BSIM3v0cqdb; cqsb = here->BSIM3v0cqsb; cqbb = here->BSIM3v0cqbb; sxpart = 0.6; dxpart = 0.4; } else { Gm = -here->BSIM3v0gm; Gmbs = -here->BSIM3v0gmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->BSIM3v0cggb; cgsb = here->BSIM3v0cgdb; cgdb = here->BSIM3v0cgsb; cbgb = here->BSIM3v0cbgb; cbsb = here->BSIM3v0cbdb; cbdb = here->BSIM3v0cbsb; cdgb = -(here->BSIM3v0cdgb + cggb + cbgb); cdsb = -(here->BSIM3v0cddb + cgsb + cbsb); cddb = -(here->BSIM3v0cdsb + cgdb + cbdb); cqgb = here->BSIM3v0cqgb; cqdb = here->BSIM3v0cqsb; cqsb = here->BSIM3v0cqdb; cqbb = here->BSIM3v0cqbb; sxpart = 0.4; dxpart = 0.6; } gdpr=here->BSIM3v0drainConductance; gspr=here->BSIM3v0sourceConductance; gds= here->BSIM3v0gds; gbd= here->BSIM3v0gbd; gbs= here->BSIM3v0gbs; capbd= here->BSIM3v0capbd; capbs= here->BSIM3v0capbs; GSoverlapCap = here->BSIM3v0cgso; GDoverlapCap = here->BSIM3v0cgdo; GBoverlapCap = here->pParam->BSIM3v0cgbo; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + capbd + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + GSoverlapCap - (cgsb + cbsb + cdsb)) * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcbgb = (cbgb - GBoverlapCap) * omega; xcbdb = (cbdb - capbd ) * omega; xcbsb = (cbsb - capbs ) * omega; xcqgb = cqgb * omega; xcqdb = cqdb * omega; xcqsb = cqsb * omega; xcqbb = cqbb * omega; m = here->BSIM3v0m; *(here->BSIM3v0GgPtr +1) += m * xcggb; *(here->BSIM3v0BbPtr +1) -= m * (xcbgb + xcbdb + xcbsb); *(here->BSIM3v0DPdpPtr +1) += m * xcddb; *(here->BSIM3v0SPspPtr +1) += m * xcssb; *(here->BSIM3v0GbPtr +1) -= m * (xcggb + xcgdb + xcgsb); *(here->BSIM3v0GdpPtr +1) += m * xcgdb; *(here->BSIM3v0GspPtr +1) += m * xcgsb; *(here->BSIM3v0BgPtr +1) += m * xcbgb; *(here->BSIM3v0BdpPtr +1) += m * xcbdb; *(here->BSIM3v0BspPtr +1) += m * xcbsb; *(here->BSIM3v0DPgPtr +1) += m * xcdgb; *(here->BSIM3v0DPbPtr +1) -= m * (xcdgb + xcddb + xcdsb); *(here->BSIM3v0DPspPtr +1) += m * xcdsb; *(here->BSIM3v0SPgPtr +1) += m * xcsgb; *(here->BSIM3v0SPbPtr +1) -= m * (xcsgb + xcsdb + xcssb); *(here->BSIM3v0SPdpPtr +1) += m * xcsdb; *(here->BSIM3v0QqPtr +1) += m * omega; *(here->BSIM3v0QgPtr +1) -= m * xcqgb; *(here->BSIM3v0QdpPtr +1) -= m * xcqdb; *(here->BSIM3v0QspPtr +1) -= m * xcqsb; *(here->BSIM3v0QbPtr +1) -= m * xcqbb; *(here->BSIM3v0DdPtr) += m * gdpr; *(here->BSIM3v0SsPtr) += m * gspr; *(here->BSIM3v0BbPtr) += m * (gbd + gbs); *(here->BSIM3v0DPdpPtr) += m * (gdpr + gds + gbd + RevSum + dxpart*here->BSIM3v0gtd); *(here->BSIM3v0SPspPtr) += m * (gspr + gds + gbs + FwdSum + sxpart*here->BSIM3v0gts); *(here->BSIM3v0DdpPtr) -= m * gdpr; *(here->BSIM3v0SspPtr) -= m * gspr; *(here->BSIM3v0BdpPtr) -= m * gbd; *(here->BSIM3v0BspPtr) -= m * gbs; *(here->BSIM3v0DPdPtr) -= m * gdpr; *(here->BSIM3v0DPgPtr) += m * (Gm + dxpart * here->BSIM3v0gtg); *(here->BSIM3v0DPbPtr) -= m * (gbd - Gmbs - dxpart * here->BSIM3v0gtb); *(here->BSIM3v0DPspPtr) -= m * (gds + FwdSum - dxpart * here->BSIM3v0gts); *(here->BSIM3v0SPgPtr) -= m * (Gm - sxpart * here->BSIM3v0gtg); *(here->BSIM3v0SPsPtr) -= m * gspr; *(here->BSIM3v0SPbPtr) -= m * (gbs + Gmbs - sxpart * here->BSIM3v0gtg); *(here->BSIM3v0SPdpPtr) -= m * (gds + RevSum - sxpart * here->BSIM3v0gtd); *(here->BSIM3v0GgPtr) -= m * here->BSIM3v0gtg; *(here->BSIM3v0GbPtr) -= m * here->BSIM3v0gtb; *(here->BSIM3v0GdpPtr) -= m * here->BSIM3v0gtd; *(here->BSIM3v0GspPtr) -= m * here->BSIM3v0gts; *(here->BSIM3v0QqPtr) += m * here->BSIM3v0gtau; *(here->BSIM3v0DPqPtr) += m * (dxpart * here->BSIM3v0gtau); *(here->BSIM3v0SPqPtr) += m * (sxpart * here->BSIM3v0gtau); *(here->BSIM3v0GqPtr) -= m * here->BSIM3v0gtau; *(here->BSIM3v0QgPtr) += m * here->BSIM3v0gtg; *(here->BSIM3v0QdpPtr) += m * here->BSIM3v0gtd; *(here->BSIM3v0QspPtr) += m * here->BSIM3v0gts; *(here->BSIM3v0QbPtr) += m * here->BSIM3v0gtb; } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0mpar.c0000644000265600020320000014603612264261473021327 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0mpar.c **********/ #include "ngspice/ngspice.h" #include "bsim3v0def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0mParam(int param, IFvalue *value, GENmodel *inMod) { BSIM3v0model *mod = (BSIM3v0model*)inMod; switch(param) { case BSIM3v0_MOD_MOBMOD : mod->BSIM3v0mobMod = value->iValue; mod->BSIM3v0mobModGiven = TRUE; break; case BSIM3v0_MOD_BINUNIT : mod->BSIM3v0binUnit = value->iValue; mod->BSIM3v0binUnitGiven = TRUE; break; case BSIM3v0_MOD_CAPMOD : mod->BSIM3v0capMod = value->iValue; mod->BSIM3v0capModGiven = TRUE; break; case BSIM3v0_MOD_NQSMOD : mod->BSIM3v0nqsMod = value->iValue; mod->BSIM3v0nqsModGiven = TRUE; break; case BSIM3v0_MOD_NOIMOD : mod->BSIM3v0noiMod = value->iValue; mod->BSIM3v0noiModGiven = TRUE; break; case BSIM3v0_MOD_TOX : mod->BSIM3v0tox = value->rValue; mod->BSIM3v0toxGiven = TRUE; break; case BSIM3v0_MOD_CDSC : mod->BSIM3v0cdsc = value->rValue; mod->BSIM3v0cdscGiven = TRUE; break; case BSIM3v0_MOD_CDSCB : mod->BSIM3v0cdscb = value->rValue; mod->BSIM3v0cdscbGiven = TRUE; break; case BSIM3v0_MOD_CDSCD : mod->BSIM3v0cdscd = value->rValue; mod->BSIM3v0cdscdGiven = TRUE; break; case BSIM3v0_MOD_CIT : mod->BSIM3v0cit = value->rValue; mod->BSIM3v0citGiven = TRUE; break; case BSIM3v0_MOD_NFACTOR : mod->BSIM3v0nfactor = value->rValue; mod->BSIM3v0nfactorGiven = TRUE; break; case BSIM3v0_MOD_XJ: mod->BSIM3v0xj = value->rValue; mod->BSIM3v0xjGiven = TRUE; break; case BSIM3v0_MOD_VSAT: mod->BSIM3v0vsat = value->rValue; mod->BSIM3v0vsatGiven = TRUE; break; case BSIM3v0_MOD_A0: mod->BSIM3v0a0 = value->rValue; mod->BSIM3v0a0Given = TRUE; break; case BSIM3v0_MOD_AGS: mod->BSIM3v0ags= value->rValue; mod->BSIM3v0agsGiven = TRUE; break; case BSIM3v0_MOD_A1: mod->BSIM3v0a1 = value->rValue; mod->BSIM3v0a1Given = TRUE; break; case BSIM3v0_MOD_A2: mod->BSIM3v0a2 = value->rValue; mod->BSIM3v0a2Given = TRUE; break; case BSIM3v0_MOD_AT: mod->BSIM3v0at = value->rValue; mod->BSIM3v0atGiven = TRUE; break; case BSIM3v0_MOD_KETA: mod->BSIM3v0keta = value->rValue; mod->BSIM3v0ketaGiven = TRUE; break; case BSIM3v0_MOD_NSUB: mod->BSIM3v0nsub = value->rValue; mod->BSIM3v0nsubGiven = TRUE; break; case BSIM3v0_MOD_NPEAK: mod->BSIM3v0npeak = value->rValue; mod->BSIM3v0npeakGiven = TRUE; if (mod->BSIM3v0npeak > 1.0e20) mod->BSIM3v0npeak *= 1.0e-6; break; case BSIM3v0_MOD_NGATE: mod->BSIM3v0ngate = value->rValue; mod->BSIM3v0ngateGiven = TRUE; if (mod->BSIM3v0ngate > 1.0e23) mod->BSIM3v0ngate *= 1.0e-6; break; case BSIM3v0_MOD_GAMMA1: mod->BSIM3v0gamma1 = value->rValue; mod->BSIM3v0gamma1Given = TRUE; break; case BSIM3v0_MOD_GAMMA2: mod->BSIM3v0gamma2 = value->rValue; mod->BSIM3v0gamma2Given = TRUE; break; case BSIM3v0_MOD_VBX: mod->BSIM3v0vbx = value->rValue; mod->BSIM3v0vbxGiven = TRUE; break; case BSIM3v0_MOD_VBM: mod->BSIM3v0vbm = value->rValue; mod->BSIM3v0vbmGiven = TRUE; break; case BSIM3v0_MOD_XT: mod->BSIM3v0xt = value->rValue; mod->BSIM3v0xtGiven = TRUE; break; case BSIM3v0_MOD_K1: mod->BSIM3v0k1 = value->rValue; mod->BSIM3v0k1Given = TRUE; break; case BSIM3v0_MOD_KT1: mod->BSIM3v0kt1 = value->rValue; mod->BSIM3v0kt1Given = TRUE; break; case BSIM3v0_MOD_KT1L: mod->BSIM3v0kt1l = value->rValue; mod->BSIM3v0kt1lGiven = TRUE; break; case BSIM3v0_MOD_KT2: mod->BSIM3v0kt2 = value->rValue; mod->BSIM3v0kt2Given = TRUE; break; case BSIM3v0_MOD_K2: mod->BSIM3v0k2 = value->rValue; mod->BSIM3v0k2Given = TRUE; break; case BSIM3v0_MOD_K3: mod->BSIM3v0k3 = value->rValue; mod->BSIM3v0k3Given = TRUE; break; case BSIM3v0_MOD_K3B: mod->BSIM3v0k3b = value->rValue; mod->BSIM3v0k3bGiven = TRUE; break; case BSIM3v0_MOD_NLX: mod->BSIM3v0nlx = value->rValue; mod->BSIM3v0nlxGiven = TRUE; break; case BSIM3v0_MOD_W0: mod->BSIM3v0w0 = value->rValue; mod->BSIM3v0w0Given = TRUE; break; case BSIM3v0_MOD_DVT0: mod->BSIM3v0dvt0 = value->rValue; mod->BSIM3v0dvt0Given = TRUE; break; case BSIM3v0_MOD_DVT1: mod->BSIM3v0dvt1 = value->rValue; mod->BSIM3v0dvt1Given = TRUE; break; case BSIM3v0_MOD_DVT2: mod->BSIM3v0dvt2 = value->rValue; mod->BSIM3v0dvt2Given = TRUE; break; case BSIM3v0_MOD_DVT0W: mod->BSIM3v0dvt0w = value->rValue; mod->BSIM3v0dvt0wGiven = TRUE; break; case BSIM3v0_MOD_DVT1W: mod->BSIM3v0dvt1w = value->rValue; mod->BSIM3v0dvt1wGiven = TRUE; break; case BSIM3v0_MOD_DVT2W: mod->BSIM3v0dvt2w = value->rValue; mod->BSIM3v0dvt2wGiven = TRUE; break; case BSIM3v0_MOD_DROUT: mod->BSIM3v0drout = value->rValue; mod->BSIM3v0droutGiven = TRUE; break; case BSIM3v0_MOD_DSUB: mod->BSIM3v0dsub = value->rValue; mod->BSIM3v0dsubGiven = TRUE; break; case BSIM3v0_MOD_VTH0: mod->BSIM3v0vth0 = value->rValue; mod->BSIM3v0vth0Given = TRUE; break; case BSIM3v0_MOD_UA: mod->BSIM3v0ua = value->rValue; mod->BSIM3v0uaGiven = TRUE; break; case BSIM3v0_MOD_UA1: mod->BSIM3v0ua1 = value->rValue; mod->BSIM3v0ua1Given = TRUE; break; case BSIM3v0_MOD_UB: mod->BSIM3v0ub = value->rValue; mod->BSIM3v0ubGiven = TRUE; break; case BSIM3v0_MOD_UB1: mod->BSIM3v0ub1 = value->rValue; mod->BSIM3v0ub1Given = TRUE; break; case BSIM3v0_MOD_UC: mod->BSIM3v0uc = value->rValue; mod->BSIM3v0ucGiven = TRUE; break; case BSIM3v0_MOD_UC1: mod->BSIM3v0uc1 = value->rValue; mod->BSIM3v0uc1Given = TRUE; break; case BSIM3v0_MOD_U0 : mod->BSIM3v0u0 = value->rValue; mod->BSIM3v0u0Given = TRUE; if (mod->BSIM3v0u0 > 1.0) mod->BSIM3v0u0 *= 1.0e-4; break; case BSIM3v0_MOD_UTE : mod->BSIM3v0ute = value->rValue; mod->BSIM3v0uteGiven = TRUE; break; case BSIM3v0_MOD_VOFF: mod->BSIM3v0voff = value->rValue; mod->BSIM3v0voffGiven = TRUE; break; case BSIM3v0_MOD_DELTA : mod->BSIM3v0delta = value->rValue; mod->BSIM3v0deltaGiven = TRUE; break; case BSIM3v0_MOD_RDSW: mod->BSIM3v0rdsw = value->rValue; mod->BSIM3v0rdswGiven = TRUE; break; case BSIM3v0_MOD_PRWG: mod->BSIM3v0prwg = value->rValue; mod->BSIM3v0prwgGiven = TRUE; break; case BSIM3v0_MOD_PRWB: mod->BSIM3v0prwb = value->rValue; mod->BSIM3v0prwbGiven = TRUE; break; case BSIM3v0_MOD_PRT: mod->BSIM3v0prt = value->rValue; mod->BSIM3v0prtGiven = TRUE; break; case BSIM3v0_MOD_ETA0: mod->BSIM3v0eta0 = value->rValue; mod->BSIM3v0eta0Given = TRUE; break; case BSIM3v0_MOD_ETAB: mod->BSIM3v0etab = value->rValue; mod->BSIM3v0etabGiven = TRUE; break; case BSIM3v0_MOD_PCLM: mod->BSIM3v0pclm = value->rValue; mod->BSIM3v0pclmGiven = TRUE; break; case BSIM3v0_MOD_PDIBL1: mod->BSIM3v0pdibl1 = value->rValue; mod->BSIM3v0pdibl1Given = TRUE; break; case BSIM3v0_MOD_PDIBL2: mod->BSIM3v0pdibl2 = value->rValue; mod->BSIM3v0pdibl2Given = TRUE; break; case BSIM3v0_MOD_PDIBLB: mod->BSIM3v0pdiblb = value->rValue; mod->BSIM3v0pdiblbGiven = TRUE; break; case BSIM3v0_MOD_PSCBE1: mod->BSIM3v0pscbe1 = value->rValue; mod->BSIM3v0pscbe1Given = TRUE; break; case BSIM3v0_MOD_PSCBE2: mod->BSIM3v0pscbe2 = value->rValue; mod->BSIM3v0pscbe2Given = TRUE; break; case BSIM3v0_MOD_PVAG: mod->BSIM3v0pvag = value->rValue; mod->BSIM3v0pvagGiven = TRUE; break; case BSIM3v0_MOD_WR : mod->BSIM3v0wr = value->rValue; mod->BSIM3v0wrGiven = TRUE; break; case BSIM3v0_MOD_DWG : mod->BSIM3v0dwg = value->rValue; mod->BSIM3v0dwgGiven = TRUE; break; case BSIM3v0_MOD_DWB : mod->BSIM3v0dwb = value->rValue; mod->BSIM3v0dwbGiven = TRUE; break; case BSIM3v0_MOD_B0 : mod->BSIM3v0b0 = value->rValue; mod->BSIM3v0b0Given = TRUE; break; case BSIM3v0_MOD_B1 : mod->BSIM3v0b1 = value->rValue; mod->BSIM3v0b1Given = TRUE; break; case BSIM3v0_MOD_ALPHA0 : mod->BSIM3v0alpha0 = value->rValue; mod->BSIM3v0alpha0Given = TRUE; break; case BSIM3v0_MOD_BETA0 : mod->BSIM3v0beta0 = value->rValue; mod->BSIM3v0beta0Given = TRUE; break; case BSIM3v0_MOD_ELM : mod->BSIM3v0elm = value->rValue; mod->BSIM3v0elmGiven = TRUE; break; case BSIM3v0_MOD_CGSL : mod->BSIM3v0cgsl = value->rValue; mod->BSIM3v0cgslGiven = TRUE; break; case BSIM3v0_MOD_CGDL : mod->BSIM3v0cgdl = value->rValue; mod->BSIM3v0cgdlGiven = TRUE; break; case BSIM3v0_MOD_CKAPPA : mod->BSIM3v0ckappa = value->rValue; mod->BSIM3v0ckappaGiven = TRUE; break; case BSIM3v0_MOD_CF : mod->BSIM3v0cf = value->rValue; mod->BSIM3v0cfGiven = TRUE; break; case BSIM3v0_MOD_CLC : mod->BSIM3v0clc = value->rValue; mod->BSIM3v0clcGiven = TRUE; break; case BSIM3v0_MOD_CLE : mod->BSIM3v0cle = value->rValue; mod->BSIM3v0cleGiven = TRUE; break; case BSIM3v0_MOD_DWC : mod->BSIM3v0dwc = value->rValue; mod->BSIM3v0dwcGiven = TRUE; break; case BSIM3v0_MOD_DLC : mod->BSIM3v0dlc = value->rValue; mod->BSIM3v0dlcGiven = TRUE; break; /* Length dependence */ case BSIM3v0_MOD_LCDSC : mod->BSIM3v0lcdsc = value->rValue; mod->BSIM3v0lcdscGiven = TRUE; break; case BSIM3v0_MOD_LCDSCB : mod->BSIM3v0lcdscb = value->rValue; mod->BSIM3v0lcdscbGiven = TRUE; break; case BSIM3v0_MOD_LCDSCD : mod->BSIM3v0lcdscd = value->rValue; mod->BSIM3v0lcdscdGiven = TRUE; break; case BSIM3v0_MOD_LCIT : mod->BSIM3v0lcit = value->rValue; mod->BSIM3v0lcitGiven = TRUE; break; case BSIM3v0_MOD_LNFACTOR : mod->BSIM3v0lnfactor = value->rValue; mod->BSIM3v0lnfactorGiven = TRUE; break; case BSIM3v0_MOD_LXJ: mod->BSIM3v0lxj = value->rValue; mod->BSIM3v0lxjGiven = TRUE; break; case BSIM3v0_MOD_LVSAT: mod->BSIM3v0lvsat = value->rValue; mod->BSIM3v0lvsatGiven = TRUE; break; case BSIM3v0_MOD_LA0: mod->BSIM3v0la0 = value->rValue; mod->BSIM3v0la0Given = TRUE; break; case BSIM3v0_MOD_LAGS: mod->BSIM3v0lags = value->rValue; mod->BSIM3v0lagsGiven = TRUE; break; case BSIM3v0_MOD_LA1: mod->BSIM3v0la1 = value->rValue; mod->BSIM3v0la1Given = TRUE; break; case BSIM3v0_MOD_LA2: mod->BSIM3v0la2 = value->rValue; mod->BSIM3v0la2Given = TRUE; break; case BSIM3v0_MOD_LAT: mod->BSIM3v0lat = value->rValue; mod->BSIM3v0latGiven = TRUE; break; case BSIM3v0_MOD_LKETA: mod->BSIM3v0lketa = value->rValue; mod->BSIM3v0lketaGiven = TRUE; break; case BSIM3v0_MOD_LNSUB: mod->BSIM3v0lnsub = value->rValue; mod->BSIM3v0lnsubGiven = TRUE; break; case BSIM3v0_MOD_LNPEAK: mod->BSIM3v0lnpeak = value->rValue; mod->BSIM3v0lnpeakGiven = TRUE; if (mod->BSIM3v0lnpeak > 1.0e20) mod->BSIM3v0lnpeak *= 1.0e-6; break; case BSIM3v0_MOD_LNGATE: mod->BSIM3v0lngate = value->rValue; mod->BSIM3v0lngateGiven = TRUE; if (mod->BSIM3v0lngate > 1.0e23) mod->BSIM3v0lngate *= 1.0e-6; break; case BSIM3v0_MOD_LGAMMA1: mod->BSIM3v0lgamma1 = value->rValue; mod->BSIM3v0lgamma1Given = TRUE; break; case BSIM3v0_MOD_LGAMMA2: mod->BSIM3v0lgamma2 = value->rValue; mod->BSIM3v0lgamma2Given = TRUE; break; case BSIM3v0_MOD_LVBX: mod->BSIM3v0lvbx = value->rValue; mod->BSIM3v0lvbxGiven = TRUE; break; case BSIM3v0_MOD_LVBM: mod->BSIM3v0lvbm = value->rValue; mod->BSIM3v0lvbmGiven = TRUE; break; case BSIM3v0_MOD_LXT: mod->BSIM3v0lxt = value->rValue; mod->BSIM3v0lxtGiven = TRUE; break; case BSIM3v0_MOD_LK1: mod->BSIM3v0lk1 = value->rValue; mod->BSIM3v0lk1Given = TRUE; break; case BSIM3v0_MOD_LKT1: mod->BSIM3v0lkt1 = value->rValue; mod->BSIM3v0lkt1Given = TRUE; break; case BSIM3v0_MOD_LKT1L: mod->BSIM3v0lkt1l = value->rValue; mod->BSIM3v0lkt1lGiven = TRUE; break; case BSIM3v0_MOD_LKT2: mod->BSIM3v0lkt2 = value->rValue; mod->BSIM3v0lkt2Given = TRUE; break; case BSIM3v0_MOD_LK2: mod->BSIM3v0lk2 = value->rValue; mod->BSIM3v0lk2Given = TRUE; break; case BSIM3v0_MOD_LK3: mod->BSIM3v0lk3 = value->rValue; mod->BSIM3v0lk3Given = TRUE; break; case BSIM3v0_MOD_LK3B: mod->BSIM3v0lk3b = value->rValue; mod->BSIM3v0lk3bGiven = TRUE; break; case BSIM3v0_MOD_LNLX: mod->BSIM3v0lnlx = value->rValue; mod->BSIM3v0lnlxGiven = TRUE; break; case BSIM3v0_MOD_LW0: mod->BSIM3v0lw0 = value->rValue; mod->BSIM3v0lw0Given = TRUE; break; case BSIM3v0_MOD_LDVT0: mod->BSIM3v0ldvt0 = value->rValue; mod->BSIM3v0ldvt0Given = TRUE; break; case BSIM3v0_MOD_LDVT1: mod->BSIM3v0ldvt1 = value->rValue; mod->BSIM3v0ldvt1Given = TRUE; break; case BSIM3v0_MOD_LDVT2: mod->BSIM3v0ldvt2 = value->rValue; mod->BSIM3v0ldvt2Given = TRUE; break; case BSIM3v0_MOD_LDVT0W: mod->BSIM3v0ldvt0w = value->rValue; mod->BSIM3v0ldvt0Given = TRUE; break; case BSIM3v0_MOD_LDVT1W: mod->BSIM3v0ldvt1 = value->rValue; mod->BSIM3v0ldvt1wGiven = TRUE; break; case BSIM3v0_MOD_LDVT2W: mod->BSIM3v0ldvt2 = value->rValue; mod->BSIM3v0ldvt2wGiven = TRUE; break; case BSIM3v0_MOD_LDROUT: mod->BSIM3v0ldrout = value->rValue; mod->BSIM3v0ldroutGiven = TRUE; break; case BSIM3v0_MOD_LDSUB: mod->BSIM3v0ldsub = value->rValue; mod->BSIM3v0ldsubGiven = TRUE; break; case BSIM3v0_MOD_LVTH0: mod->BSIM3v0lvth0 = value->rValue; mod->BSIM3v0lvth0Given = TRUE; break; case BSIM3v0_MOD_LUA: mod->BSIM3v0lua = value->rValue; mod->BSIM3v0luaGiven = TRUE; break; case BSIM3v0_MOD_LUA1: mod->BSIM3v0lua1 = value->rValue; mod->BSIM3v0lua1Given = TRUE; break; case BSIM3v0_MOD_LUB: mod->BSIM3v0lub = value->rValue; mod->BSIM3v0lubGiven = TRUE; break; case BSIM3v0_MOD_LUB1: mod->BSIM3v0lub1 = value->rValue; mod->BSIM3v0lub1Given = TRUE; break; case BSIM3v0_MOD_LUC: mod->BSIM3v0luc = value->rValue; mod->BSIM3v0lucGiven = TRUE; break; case BSIM3v0_MOD_LUC1: mod->BSIM3v0luc1 = value->rValue; mod->BSIM3v0luc1Given = TRUE; break; case BSIM3v0_MOD_LU0 : mod->BSIM3v0lu0 = value->rValue; mod->BSIM3v0lu0Given = TRUE; if (mod->BSIM3v0lu0 > 1.0) mod->BSIM3v0lu0 *= 1.0e-4; break; case BSIM3v0_MOD_LUTE : mod->BSIM3v0lute = value->rValue; mod->BSIM3v0luteGiven = TRUE; break; case BSIM3v0_MOD_LVOFF: mod->BSIM3v0lvoff = value->rValue; mod->BSIM3v0lvoffGiven = TRUE; break; case BSIM3v0_MOD_LDELTA : mod->BSIM3v0ldelta = value->rValue; mod->BSIM3v0ldeltaGiven = TRUE; break; case BSIM3v0_MOD_LRDSW: mod->BSIM3v0lrdsw = value->rValue; mod->BSIM3v0lrdswGiven = TRUE; break; case BSIM3v0_MOD_LPRWB: mod->BSIM3v0lprwb = value->rValue; mod->BSIM3v0lprwbGiven = TRUE; break; case BSIM3v0_MOD_LPRWG: mod->BSIM3v0lprwg = value->rValue; mod->BSIM3v0lprwgGiven = TRUE; break; case BSIM3v0_MOD_LPRT: mod->BSIM3v0lprt = value->rValue; mod->BSIM3v0lprtGiven = TRUE; break; case BSIM3v0_MOD_LETA0: mod->BSIM3v0leta0 = value->rValue; mod->BSIM3v0leta0Given = TRUE; break; case BSIM3v0_MOD_LETAB: mod->BSIM3v0letab = value->rValue; mod->BSIM3v0letabGiven = TRUE; break; case BSIM3v0_MOD_LPCLM: mod->BSIM3v0lpclm = value->rValue; mod->BSIM3v0lpclmGiven = TRUE; break; case BSIM3v0_MOD_LPDIBL1: mod->BSIM3v0lpdibl1 = value->rValue; mod->BSIM3v0lpdibl1Given = TRUE; break; case BSIM3v0_MOD_LPDIBL2: mod->BSIM3v0lpdibl2 = value->rValue; mod->BSIM3v0lpdibl2Given = TRUE; break; case BSIM3v0_MOD_LPDIBLB: mod->BSIM3v0lpdiblb = value->rValue; mod->BSIM3v0lpdiblbGiven = TRUE; break; case BSIM3v0_MOD_LPSCBE1: mod->BSIM3v0lpscbe1 = value->rValue; mod->BSIM3v0lpscbe1Given = TRUE; break; case BSIM3v0_MOD_LPSCBE2: mod->BSIM3v0lpscbe2 = value->rValue; mod->BSIM3v0lpscbe2Given = TRUE; break; case BSIM3v0_MOD_LPVAG: mod->BSIM3v0lpvag = value->rValue; mod->BSIM3v0lpvagGiven = TRUE; break; case BSIM3v0_MOD_LWR : mod->BSIM3v0lwr = value->rValue; mod->BSIM3v0lwrGiven = TRUE; break; case BSIM3v0_MOD_LDWG : mod->BSIM3v0ldwg = value->rValue; mod->BSIM3v0ldwgGiven = TRUE; break; case BSIM3v0_MOD_LDWB : mod->BSIM3v0ldwb = value->rValue; mod->BSIM3v0ldwbGiven = TRUE; break; case BSIM3v0_MOD_LB0 : mod->BSIM3v0lb0 = value->rValue; mod->BSIM3v0lb0Given = TRUE; break; case BSIM3v0_MOD_LB1 : mod->BSIM3v0lb1 = value->rValue; mod->BSIM3v0lb1Given = TRUE; break; case BSIM3v0_MOD_LALPHA0 : mod->BSIM3v0lalpha0 = value->rValue; mod->BSIM3v0lalpha0Given = TRUE; break; case BSIM3v0_MOD_LBETA0 : mod->BSIM3v0lbeta0 = value->rValue; mod->BSIM3v0lbeta0Given = TRUE; break; case BSIM3v0_MOD_LELM : mod->BSIM3v0lelm = value->rValue; mod->BSIM3v0lelmGiven = TRUE; break; case BSIM3v0_MOD_LCGSL : mod->BSIM3v0lcgsl = value->rValue; mod->BSIM3v0lcgslGiven = TRUE; break; case BSIM3v0_MOD_LCGDL : mod->BSIM3v0lcgdl = value->rValue; mod->BSIM3v0lcgdlGiven = TRUE; break; case BSIM3v0_MOD_LCKAPPA : mod->BSIM3v0lckappa = value->rValue; mod->BSIM3v0lckappaGiven = TRUE; break; case BSIM3v0_MOD_LCF : mod->BSIM3v0lcf = value->rValue; mod->BSIM3v0lcfGiven = TRUE; break; case BSIM3v0_MOD_LCLC : mod->BSIM3v0lclc = value->rValue; mod->BSIM3v0lclcGiven = TRUE; break; case BSIM3v0_MOD_LCLE : mod->BSIM3v0lcle = value->rValue; mod->BSIM3v0lcleGiven = TRUE; break; /* Width dependence */ case BSIM3v0_MOD_WCDSC : mod->BSIM3v0wcdsc = value->rValue; mod->BSIM3v0wcdscGiven = TRUE; break; case BSIM3v0_MOD_WCDSCB : mod->BSIM3v0wcdscb = value->rValue; mod->BSIM3v0wcdscbGiven = TRUE; break; case BSIM3v0_MOD_WCDSCD : mod->BSIM3v0wcdscd = value->rValue; mod->BSIM3v0wcdscdGiven = TRUE; break; case BSIM3v0_MOD_WCIT : mod->BSIM3v0wcit = value->rValue; mod->BSIM3v0wcitGiven = TRUE; break; case BSIM3v0_MOD_WNFACTOR : mod->BSIM3v0wnfactor = value->rValue; mod->BSIM3v0wnfactorGiven = TRUE; break; case BSIM3v0_MOD_WXJ: mod->BSIM3v0wxj = value->rValue; mod->BSIM3v0wxjGiven = TRUE; break; case BSIM3v0_MOD_WVSAT: mod->BSIM3v0wvsat = value->rValue; mod->BSIM3v0wvsatGiven = TRUE; break; case BSIM3v0_MOD_WA0: mod->BSIM3v0wa0 = value->rValue; mod->BSIM3v0wa0Given = TRUE; break; case BSIM3v0_MOD_WAGS: mod->BSIM3v0wags = value->rValue; mod->BSIM3v0wagsGiven = TRUE; break; case BSIM3v0_MOD_WA1: mod->BSIM3v0wa1 = value->rValue; mod->BSIM3v0wa1Given = TRUE; break; case BSIM3v0_MOD_WA2: mod->BSIM3v0wa2 = value->rValue; mod->BSIM3v0wa2Given = TRUE; break; case BSIM3v0_MOD_WAT: mod->BSIM3v0wat = value->rValue; mod->BSIM3v0watGiven = TRUE; break; case BSIM3v0_MOD_WKETA: mod->BSIM3v0wketa = value->rValue; mod->BSIM3v0wketaGiven = TRUE; break; case BSIM3v0_MOD_WNSUB: mod->BSIM3v0wnsub = value->rValue; mod->BSIM3v0wnsubGiven = TRUE; break; case BSIM3v0_MOD_WNPEAK: mod->BSIM3v0wnpeak = value->rValue; mod->BSIM3v0wnpeakGiven = TRUE; if (mod->BSIM3v0wnpeak > 1.0e20) mod->BSIM3v0wnpeak *= 1.0e-6; break; case BSIM3v0_MOD_WNGATE: mod->BSIM3v0wngate = value->rValue; mod->BSIM3v0wngateGiven = TRUE; if (mod->BSIM3v0wngate > 1.0e23) mod->BSIM3v0wngate *= 1.0e-6; break; case BSIM3v0_MOD_WGAMMA1: mod->BSIM3v0wgamma1 = value->rValue; mod->BSIM3v0wgamma1Given = TRUE; break; case BSIM3v0_MOD_WGAMMA2: mod->BSIM3v0wgamma2 = value->rValue; mod->BSIM3v0wgamma2Given = TRUE; break; case BSIM3v0_MOD_WVBX: mod->BSIM3v0wvbx = value->rValue; mod->BSIM3v0wvbxGiven = TRUE; break; case BSIM3v0_MOD_WVBM: mod->BSIM3v0wvbm = value->rValue; mod->BSIM3v0wvbmGiven = TRUE; break; case BSIM3v0_MOD_WXT: mod->BSIM3v0wxt = value->rValue; mod->BSIM3v0wxtGiven = TRUE; break; case BSIM3v0_MOD_WK1: mod->BSIM3v0wk1 = value->rValue; mod->BSIM3v0wk1Given = TRUE; break; case BSIM3v0_MOD_WKT1: mod->BSIM3v0wkt1 = value->rValue; mod->BSIM3v0wkt1Given = TRUE; break; case BSIM3v0_MOD_WKT1L: mod->BSIM3v0wkt1l = value->rValue; mod->BSIM3v0wkt1lGiven = TRUE; break; case BSIM3v0_MOD_WKT2: mod->BSIM3v0wkt2 = value->rValue; mod->BSIM3v0wkt2Given = TRUE; break; case BSIM3v0_MOD_WK2: mod->BSIM3v0wk2 = value->rValue; mod->BSIM3v0wk2Given = TRUE; break; case BSIM3v0_MOD_WK3: mod->BSIM3v0wk3 = value->rValue; mod->BSIM3v0wk3Given = TRUE; break; case BSIM3v0_MOD_WK3B: mod->BSIM3v0wk3b = value->rValue; mod->BSIM3v0wk3bGiven = TRUE; break; case BSIM3v0_MOD_WNLX: mod->BSIM3v0wnlx = value->rValue; mod->BSIM3v0wnlxGiven = TRUE; break; case BSIM3v0_MOD_WW0: mod->BSIM3v0ww0 = value->rValue; mod->BSIM3v0ww0Given = TRUE; break; case BSIM3v0_MOD_WDVT0: mod->BSIM3v0wdvt0 = value->rValue; mod->BSIM3v0wdvt0Given = TRUE; break; case BSIM3v0_MOD_WDVT1: mod->BSIM3v0wdvt1 = value->rValue; mod->BSIM3v0wdvt1Given = TRUE; break; case BSIM3v0_MOD_WDVT2: mod->BSIM3v0wdvt2 = value->rValue; mod->BSIM3v0wdvt2Given = TRUE; break; case BSIM3v0_MOD_WDVT0W: mod->BSIM3v0wdvt0w = value->rValue; mod->BSIM3v0wdvt0wGiven = TRUE; break; case BSIM3v0_MOD_WDVT1W: mod->BSIM3v0wdvt1w = value->rValue; mod->BSIM3v0wdvt1wGiven = TRUE; break; case BSIM3v0_MOD_WDVT2W: mod->BSIM3v0wdvt2w = value->rValue; mod->BSIM3v0wdvt2wGiven = TRUE; break; case BSIM3v0_MOD_WDROUT: mod->BSIM3v0wdrout = value->rValue; mod->BSIM3v0wdroutGiven = TRUE; break; case BSIM3v0_MOD_WDSUB: mod->BSIM3v0wdsub = value->rValue; mod->BSIM3v0wdsubGiven = TRUE; break; case BSIM3v0_MOD_WVTH0: mod->BSIM3v0wvth0 = value->rValue; mod->BSIM3v0wvth0Given = TRUE; break; case BSIM3v0_MOD_WUA: mod->BSIM3v0wua = value->rValue; mod->BSIM3v0wuaGiven = TRUE; break; case BSIM3v0_MOD_WUA1: mod->BSIM3v0wua1 = value->rValue; mod->BSIM3v0wua1Given = TRUE; break; case BSIM3v0_MOD_WUB: mod->BSIM3v0wub = value->rValue; mod->BSIM3v0wubGiven = TRUE; break; case BSIM3v0_MOD_WUB1: mod->BSIM3v0wub1 = value->rValue; mod->BSIM3v0wub1Given = TRUE; break; case BSIM3v0_MOD_WUC: mod->BSIM3v0wuc = value->rValue; mod->BSIM3v0wucGiven = TRUE; break; case BSIM3v0_MOD_WUC1: mod->BSIM3v0wuc1 = value->rValue; mod->BSIM3v0wuc1Given = TRUE; break; case BSIM3v0_MOD_WU0 : mod->BSIM3v0wu0 = value->rValue; mod->BSIM3v0wu0Given = TRUE; if (mod->BSIM3v0wu0 > 1.0) mod->BSIM3v0wu0 *= 1.0e-4; break; case BSIM3v0_MOD_WUTE : mod->BSIM3v0wute = value->rValue; mod->BSIM3v0wuteGiven = TRUE; break; case BSIM3v0_MOD_WVOFF: mod->BSIM3v0wvoff = value->rValue; mod->BSIM3v0wvoffGiven = TRUE; break; case BSIM3v0_MOD_WDELTA : mod->BSIM3v0wdelta = value->rValue; mod->BSIM3v0wdeltaGiven = TRUE; break; case BSIM3v0_MOD_WRDSW: mod->BSIM3v0wrdsw = value->rValue; mod->BSIM3v0wrdswGiven = TRUE; break; case BSIM3v0_MOD_WPRWB: mod->BSIM3v0wprwb = value->rValue; mod->BSIM3v0wprwbGiven = TRUE; break; case BSIM3v0_MOD_WPRWG: mod->BSIM3v0wprwg = value->rValue; mod->BSIM3v0wprwgGiven = TRUE; break; case BSIM3v0_MOD_WPRT: mod->BSIM3v0wprt = value->rValue; mod->BSIM3v0wprtGiven = TRUE; break; case BSIM3v0_MOD_WETA0: mod->BSIM3v0weta0 = value->rValue; mod->BSIM3v0weta0Given = TRUE; break; case BSIM3v0_MOD_WETAB: mod->BSIM3v0wetab = value->rValue; mod->BSIM3v0wetabGiven = TRUE; break; case BSIM3v0_MOD_WPCLM: mod->BSIM3v0wpclm = value->rValue; mod->BSIM3v0wpclmGiven = TRUE; break; case BSIM3v0_MOD_WPDIBL1: mod->BSIM3v0wpdibl1 = value->rValue; mod->BSIM3v0wpdibl1Given = TRUE; break; case BSIM3v0_MOD_WPDIBL2: mod->BSIM3v0wpdibl2 = value->rValue; mod->BSIM3v0wpdibl2Given = TRUE; break; case BSIM3v0_MOD_WPDIBLB: mod->BSIM3v0wpdiblb = value->rValue; mod->BSIM3v0wpdiblbGiven = TRUE; break; case BSIM3v0_MOD_WPSCBE1: mod->BSIM3v0wpscbe1 = value->rValue; mod->BSIM3v0wpscbe1Given = TRUE; break; case BSIM3v0_MOD_WPSCBE2: mod->BSIM3v0wpscbe2 = value->rValue; mod->BSIM3v0wpscbe2Given = TRUE; break; case BSIM3v0_MOD_WPVAG: mod->BSIM3v0wpvag = value->rValue; mod->BSIM3v0wpvagGiven = TRUE; break; case BSIM3v0_MOD_WWR : mod->BSIM3v0wwr = value->rValue; mod->BSIM3v0wwrGiven = TRUE; break; case BSIM3v0_MOD_WDWG : mod->BSIM3v0wdwg = value->rValue; mod->BSIM3v0wdwgGiven = TRUE; break; case BSIM3v0_MOD_WDWB : mod->BSIM3v0wdwb = value->rValue; mod->BSIM3v0wdwbGiven = TRUE; break; case BSIM3v0_MOD_WB0 : mod->BSIM3v0wb0 = value->rValue; mod->BSIM3v0wb0Given = TRUE; break; case BSIM3v0_MOD_WB1 : mod->BSIM3v0wb1 = value->rValue; mod->BSIM3v0wb1Given = TRUE; break; case BSIM3v0_MOD_WALPHA0 : mod->BSIM3v0walpha0 = value->rValue; mod->BSIM3v0walpha0Given = TRUE; break; case BSIM3v0_MOD_WBETA0 : mod->BSIM3v0wbeta0 = value->rValue; mod->BSIM3v0wbeta0Given = TRUE; break; case BSIM3v0_MOD_WELM : mod->BSIM3v0welm = value->rValue; mod->BSIM3v0welmGiven = TRUE; break; case BSIM3v0_MOD_WCGSL : mod->BSIM3v0wcgsl = value->rValue; mod->BSIM3v0wcgslGiven = TRUE; break; case BSIM3v0_MOD_WCGDL : mod->BSIM3v0wcgdl = value->rValue; mod->BSIM3v0wcgdlGiven = TRUE; break; case BSIM3v0_MOD_WCKAPPA : mod->BSIM3v0wckappa = value->rValue; mod->BSIM3v0wckappaGiven = TRUE; break; case BSIM3v0_MOD_WCF : mod->BSIM3v0wcf = value->rValue; mod->BSIM3v0wcfGiven = TRUE; break; case BSIM3v0_MOD_WCLC : mod->BSIM3v0wclc = value->rValue; mod->BSIM3v0wclcGiven = TRUE; break; case BSIM3v0_MOD_WCLE : mod->BSIM3v0wcle = value->rValue; mod->BSIM3v0wcleGiven = TRUE; break; /* Cross-term dependence */ case BSIM3v0_MOD_PCDSC : mod->BSIM3v0pcdsc = value->rValue; mod->BSIM3v0pcdscGiven = TRUE; break; case BSIM3v0_MOD_PCDSCB : mod->BSIM3v0pcdscb = value->rValue; mod->BSIM3v0pcdscbGiven = TRUE; break; case BSIM3v0_MOD_PCDSCD : mod->BSIM3v0pcdscd = value->rValue; mod->BSIM3v0pcdscdGiven = TRUE; break; case BSIM3v0_MOD_PCIT : mod->BSIM3v0pcit = value->rValue; mod->BSIM3v0pcitGiven = TRUE; break; case BSIM3v0_MOD_PNFACTOR : mod->BSIM3v0pnfactor = value->rValue; mod->BSIM3v0pnfactorGiven = TRUE; break; case BSIM3v0_MOD_PXJ: mod->BSIM3v0pxj = value->rValue; mod->BSIM3v0pxjGiven = TRUE; break; case BSIM3v0_MOD_PVSAT: mod->BSIM3v0pvsat = value->rValue; mod->BSIM3v0pvsatGiven = TRUE; break; case BSIM3v0_MOD_PA0: mod->BSIM3v0pa0 = value->rValue; mod->BSIM3v0pa0Given = TRUE; break; case BSIM3v0_MOD_PAGS: mod->BSIM3v0pags = value->rValue; mod->BSIM3v0pagsGiven = TRUE; break; case BSIM3v0_MOD_PA1: mod->BSIM3v0pa1 = value->rValue; mod->BSIM3v0pa1Given = TRUE; break; case BSIM3v0_MOD_PA2: mod->BSIM3v0pa2 = value->rValue; mod->BSIM3v0pa2Given = TRUE; break; case BSIM3v0_MOD_PAT: mod->BSIM3v0pat = value->rValue; mod->BSIM3v0patGiven = TRUE; break; case BSIM3v0_MOD_PKETA: mod->BSIM3v0pketa = value->rValue; mod->BSIM3v0pketaGiven = TRUE; break; case BSIM3v0_MOD_PNSUB: mod->BSIM3v0pnsub = value->rValue; mod->BSIM3v0pnsubGiven = TRUE; break; case BSIM3v0_MOD_PNPEAK: mod->BSIM3v0pnpeak = value->rValue; mod->BSIM3v0pnpeakGiven = TRUE; if (mod->BSIM3v0pnpeak > 1.0e20) mod->BSIM3v0pnpeak *= 1.0e-6; break; case BSIM3v0_MOD_PNGATE: mod->BSIM3v0pngate = value->rValue; mod->BSIM3v0pngateGiven = TRUE; if (mod->BSIM3v0pngate > 1.0e23) mod->BSIM3v0pngate *= 1.0e-6; break; case BSIM3v0_MOD_PGAMMA1: mod->BSIM3v0pgamma1 = value->rValue; mod->BSIM3v0pgamma1Given = TRUE; break; case BSIM3v0_MOD_PGAMMA2: mod->BSIM3v0pgamma2 = value->rValue; mod->BSIM3v0pgamma2Given = TRUE; break; case BSIM3v0_MOD_PVBX: mod->BSIM3v0pvbx = value->rValue; mod->BSIM3v0pvbxGiven = TRUE; break; case BSIM3v0_MOD_PVBM: mod->BSIM3v0pvbm = value->rValue; mod->BSIM3v0pvbmGiven = TRUE; break; case BSIM3v0_MOD_PXT: mod->BSIM3v0pxt = value->rValue; mod->BSIM3v0pxtGiven = TRUE; break; case BSIM3v0_MOD_PK1: mod->BSIM3v0pk1 = value->rValue; mod->BSIM3v0pk1Given = TRUE; break; case BSIM3v0_MOD_PKT1: mod->BSIM3v0pkt1 = value->rValue; mod->BSIM3v0pkt1Given = TRUE; break; case BSIM3v0_MOD_PKT1L: mod->BSIM3v0pkt1l = value->rValue; mod->BSIM3v0pkt1lGiven = TRUE; break; case BSIM3v0_MOD_PKT2: mod->BSIM3v0pkt2 = value->rValue; mod->BSIM3v0pkt2Given = TRUE; break; case BSIM3v0_MOD_PK2: mod->BSIM3v0pk2 = value->rValue; mod->BSIM3v0pk2Given = TRUE; break; case BSIM3v0_MOD_PK3: mod->BSIM3v0pk3 = value->rValue; mod->BSIM3v0pk3Given = TRUE; break; case BSIM3v0_MOD_PK3B: mod->BSIM3v0pk3b = value->rValue; mod->BSIM3v0pk3bGiven = TRUE; break; case BSIM3v0_MOD_PNLX: mod->BSIM3v0pnlx = value->rValue; mod->BSIM3v0pnlxGiven = TRUE; break; case BSIM3v0_MOD_PW0: mod->BSIM3v0pw0 = value->rValue; mod->BSIM3v0pw0Given = TRUE; break; case BSIM3v0_MOD_PDVT0: mod->BSIM3v0pdvt0 = value->rValue; mod->BSIM3v0pdvt0Given = TRUE; break; case BSIM3v0_MOD_PDVT1: mod->BSIM3v0pdvt1 = value->rValue; mod->BSIM3v0pdvt1Given = TRUE; break; case BSIM3v0_MOD_PDVT2: mod->BSIM3v0pdvt2 = value->rValue; mod->BSIM3v0pdvt2Given = TRUE; break; case BSIM3v0_MOD_PDVT0W: mod->BSIM3v0pdvt0w = value->rValue; mod->BSIM3v0pdvt0wGiven = TRUE; break; case BSIM3v0_MOD_PDVT1W: mod->BSIM3v0pdvt1w = value->rValue; mod->BSIM3v0pdvt1wGiven = TRUE; break; case BSIM3v0_MOD_PDVT2W: mod->BSIM3v0pdvt2w = value->rValue; mod->BSIM3v0pdvt2wGiven = TRUE; break; case BSIM3v0_MOD_PDROUT: mod->BSIM3v0pdrout = value->rValue; mod->BSIM3v0pdroutGiven = TRUE; break; case BSIM3v0_MOD_PDSUB: mod->BSIM3v0pdsub = value->rValue; mod->BSIM3v0pdsubGiven = TRUE; break; case BSIM3v0_MOD_PVTH0: mod->BSIM3v0pvth0 = value->rValue; mod->BSIM3v0pvth0Given = TRUE; break; case BSIM3v0_MOD_PUA: mod->BSIM3v0pua = value->rValue; mod->BSIM3v0puaGiven = TRUE; break; case BSIM3v0_MOD_PUA1: mod->BSIM3v0pua1 = value->rValue; mod->BSIM3v0pua1Given = TRUE; break; case BSIM3v0_MOD_PUB: mod->BSIM3v0pub = value->rValue; mod->BSIM3v0pubGiven = TRUE; break; case BSIM3v0_MOD_PUB1: mod->BSIM3v0pub1 = value->rValue; mod->BSIM3v0pub1Given = TRUE; break; case BSIM3v0_MOD_PUC: mod->BSIM3v0puc = value->rValue; mod->BSIM3v0pucGiven = TRUE; break; case BSIM3v0_MOD_PUC1: mod->BSIM3v0puc1 = value->rValue; mod->BSIM3v0puc1Given = TRUE; break; case BSIM3v0_MOD_PU0 : mod->BSIM3v0pu0 = value->rValue; mod->BSIM3v0pu0Given = TRUE; if (mod->BSIM3v0pu0 > 1.0) mod->BSIM3v0pu0 *= 1.0e-4; break; case BSIM3v0_MOD_PUTE : mod->BSIM3v0pute = value->rValue; mod->BSIM3v0puteGiven = TRUE; break; case BSIM3v0_MOD_PVOFF: mod->BSIM3v0pvoff = value->rValue; mod->BSIM3v0pvoffGiven = TRUE; break; case BSIM3v0_MOD_PDELTA : mod->BSIM3v0pdelta = value->rValue; mod->BSIM3v0pdeltaGiven = TRUE; break; case BSIM3v0_MOD_PRDSW: mod->BSIM3v0prdsw = value->rValue; mod->BSIM3v0prdswGiven = TRUE; break; case BSIM3v0_MOD_PPRWB: mod->BSIM3v0pprwb = value->rValue; mod->BSIM3v0pprwbGiven = TRUE; break; case BSIM3v0_MOD_PPRWG: mod->BSIM3v0pprwg = value->rValue; mod->BSIM3v0pprwgGiven = TRUE; break; case BSIM3v0_MOD_PPRT: mod->BSIM3v0pprt = value->rValue; mod->BSIM3v0pprtGiven = TRUE; break; case BSIM3v0_MOD_PETA0: mod->BSIM3v0peta0 = value->rValue; mod->BSIM3v0peta0Given = TRUE; break; case BSIM3v0_MOD_PETAB: mod->BSIM3v0petab = value->rValue; mod->BSIM3v0petabGiven = TRUE; break; case BSIM3v0_MOD_PPCLM: mod->BSIM3v0ppclm = value->rValue; mod->BSIM3v0ppclmGiven = TRUE; break; case BSIM3v0_MOD_PPDIBL1: mod->BSIM3v0ppdibl1 = value->rValue; mod->BSIM3v0ppdibl1Given = TRUE; break; case BSIM3v0_MOD_PPDIBL2: mod->BSIM3v0ppdibl2 = value->rValue; mod->BSIM3v0ppdibl2Given = TRUE; break; case BSIM3v0_MOD_PPDIBLB: mod->BSIM3v0ppdiblb = value->rValue; mod->BSIM3v0ppdiblbGiven = TRUE; break; case BSIM3v0_MOD_PPSCBE1: mod->BSIM3v0ppscbe1 = value->rValue; mod->BSIM3v0ppscbe1Given = TRUE; break; case BSIM3v0_MOD_PPSCBE2: mod->BSIM3v0ppscbe2 = value->rValue; mod->BSIM3v0ppscbe2Given = TRUE; break; case BSIM3v0_MOD_PPVAG: mod->BSIM3v0ppvag = value->rValue; mod->BSIM3v0ppvagGiven = TRUE; break; case BSIM3v0_MOD_PWR : mod->BSIM3v0pwr = value->rValue; mod->BSIM3v0pwrGiven = TRUE; break; case BSIM3v0_MOD_PDWG : mod->BSIM3v0pdwg = value->rValue; mod->BSIM3v0pdwgGiven = TRUE; break; case BSIM3v0_MOD_PDWB : mod->BSIM3v0pdwb = value->rValue; mod->BSIM3v0pdwbGiven = TRUE; break; case BSIM3v0_MOD_PB0 : mod->BSIM3v0pb0 = value->rValue; mod->BSIM3v0pb0Given = TRUE; break; case BSIM3v0_MOD_PB1 : mod->BSIM3v0pb1 = value->rValue; mod->BSIM3v0pb1Given = TRUE; break; case BSIM3v0_MOD_PALPHA0 : mod->BSIM3v0palpha0 = value->rValue; mod->BSIM3v0palpha0Given = TRUE; break; case BSIM3v0_MOD_PBETA0 : mod->BSIM3v0pbeta0 = value->rValue; mod->BSIM3v0pbeta0Given = TRUE; break; case BSIM3v0_MOD_PELM : mod->BSIM3v0pelm = value->rValue; mod->BSIM3v0pelmGiven = TRUE; break; case BSIM3v0_MOD_PCGSL : mod->BSIM3v0pcgsl = value->rValue; mod->BSIM3v0pcgslGiven = TRUE; break; case BSIM3v0_MOD_PCGDL : mod->BSIM3v0pcgdl = value->rValue; mod->BSIM3v0pcgdlGiven = TRUE; break; case BSIM3v0_MOD_PCKAPPA : mod->BSIM3v0pckappa = value->rValue; mod->BSIM3v0pckappaGiven = TRUE; break; case BSIM3v0_MOD_PCF : mod->BSIM3v0pcf = value->rValue; mod->BSIM3v0pcfGiven = TRUE; break; case BSIM3v0_MOD_PCLC : mod->BSIM3v0pclc = value->rValue; mod->BSIM3v0pclcGiven = TRUE; break; case BSIM3v0_MOD_PCLE : mod->BSIM3v0pcle = value->rValue; mod->BSIM3v0pcleGiven = TRUE; break; case BSIM3v0_MOD_TNOM : mod->BSIM3v0tnom = value->rValue + 273.15; mod->BSIM3v0tnomGiven = TRUE; break; case BSIM3v0_MOD_CGSO : mod->BSIM3v0cgso = value->rValue; mod->BSIM3v0cgsoGiven = TRUE; break; case BSIM3v0_MOD_CGDO : mod->BSIM3v0cgdo = value->rValue; mod->BSIM3v0cgdoGiven = TRUE; break; case BSIM3v0_MOD_CGBO : mod->BSIM3v0cgbo = value->rValue; mod->BSIM3v0cgboGiven = TRUE; break; case BSIM3v0_MOD_XPART : mod->BSIM3v0xpart = value->rValue; mod->BSIM3v0xpartGiven = TRUE; break; case BSIM3v0_MOD_RSH : mod->BSIM3v0sheetResistance = value->rValue; mod->BSIM3v0sheetResistanceGiven = TRUE; break; case BSIM3v0_MOD_JS : mod->BSIM3v0jctSatCurDensity = value->rValue; mod->BSIM3v0jctSatCurDensityGiven = TRUE; break; case BSIM3v0_MOD_PB : mod->BSIM3v0bulkJctPotential = value->rValue; mod->BSIM3v0bulkJctPotentialGiven = TRUE; break; case BSIM3v0_MOD_MJ : mod->BSIM3v0bulkJctBotGradingCoeff = value->rValue; mod->BSIM3v0bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM3v0_MOD_PBSW : mod->BSIM3v0sidewallJctPotential = value->rValue; mod->BSIM3v0sidewallJctPotentialGiven = TRUE; break; case BSIM3v0_MOD_MJSW : mod->BSIM3v0bulkJctSideGradingCoeff = value->rValue; mod->BSIM3v0bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM3v0_MOD_CJ : mod->BSIM3v0unitAreaJctCap = value->rValue; mod->BSIM3v0unitAreaJctCapGiven = TRUE; break; case BSIM3v0_MOD_CJSW : mod->BSIM3v0unitLengthSidewallJctCap = value->rValue; mod->BSIM3v0unitLengthSidewallJctCapGiven = TRUE; break; case BSIM3v0_MOD_LINT : mod->BSIM3v0Lint = value->rValue; mod->BSIM3v0LintGiven = TRUE; break; case BSIM3v0_MOD_LL : mod->BSIM3v0Ll = value->rValue; mod->BSIM3v0LlGiven = TRUE; break; case BSIM3v0_MOD_LLN : mod->BSIM3v0Lln = value->rValue; mod->BSIM3v0LlnGiven = TRUE; break; case BSIM3v0_MOD_LW : mod->BSIM3v0Lw = value->rValue; mod->BSIM3v0LwGiven = TRUE; break; case BSIM3v0_MOD_LWN : mod->BSIM3v0Lwn = value->rValue; mod->BSIM3v0LwnGiven = TRUE; break; case BSIM3v0_MOD_LWL : mod->BSIM3v0Lwl = value->rValue; mod->BSIM3v0LwlGiven = TRUE; break; case BSIM3v0_MOD_LMIN : mod->BSIM3v0Lmin = value->rValue; mod->BSIM3v0LminGiven = TRUE; break; case BSIM3v0_MOD_LMAX : mod->BSIM3v0Lmax = value->rValue; mod->BSIM3v0LmaxGiven = TRUE; break; case BSIM3v0_MOD_WINT : mod->BSIM3v0Wint = value->rValue; mod->BSIM3v0WintGiven = TRUE; break; case BSIM3v0_MOD_WL : mod->BSIM3v0Wl = value->rValue; mod->BSIM3v0WlGiven = TRUE; break; case BSIM3v0_MOD_WLN : mod->BSIM3v0Wln = value->rValue; mod->BSIM3v0WlnGiven = TRUE; break; case BSIM3v0_MOD_WW : mod->BSIM3v0Ww = value->rValue; mod->BSIM3v0WwGiven = TRUE; break; case BSIM3v0_MOD_WWN : mod->BSIM3v0Wwn = value->rValue; mod->BSIM3v0WwnGiven = TRUE; break; case BSIM3v0_MOD_WWL : mod->BSIM3v0Wwl = value->rValue; mod->BSIM3v0WwlGiven = TRUE; break; case BSIM3v0_MOD_WMIN : mod->BSIM3v0Wmin = value->rValue; mod->BSIM3v0WminGiven = TRUE; break; case BSIM3v0_MOD_WMAX : mod->BSIM3v0Wmax = value->rValue; mod->BSIM3v0WmaxGiven = TRUE; break; case BSIM3v0_MOD_NOIA : mod->BSIM3v0oxideTrapDensityA = value->rValue; mod->BSIM3v0oxideTrapDensityAGiven = TRUE; break; case BSIM3v0_MOD_NOIB : mod->BSIM3v0oxideTrapDensityB = value->rValue; mod->BSIM3v0oxideTrapDensityBGiven = TRUE; break; case BSIM3v0_MOD_NOIC : mod->BSIM3v0oxideTrapDensityC = value->rValue; mod->BSIM3v0oxideTrapDensityCGiven = TRUE; break; case BSIM3v0_MOD_EM : mod->BSIM3v0em = value->rValue; mod->BSIM3v0emGiven = TRUE; break; case BSIM3v0_MOD_EF : mod->BSIM3v0ef = value->rValue; mod->BSIM3v0efGiven = TRUE; break; case BSIM3v0_MOD_AF : mod->BSIM3v0af = value->rValue; mod->BSIM3v0afGiven = TRUE; break; case BSIM3v0_MOD_KF : mod->BSIM3v0kf = value->rValue; mod->BSIM3v0kfGiven = TRUE; break; case BSIM3v0_MOD_NMOS : if(value->iValue) { mod->BSIM3v0type = 1; mod->BSIM3v0typeGiven = TRUE; } break; case BSIM3v0_MOD_PMOS : if(value->iValue) { mod->BSIM3v0type = - 1; mod->BSIM3v0typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/bsim3v0init.c0000644000265600020320000000432212264261473022033 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim3v0itf.h" #include "bsim3v0ext.h" #include "bsim3v0init.h" SPICEdev B3v0info = { { "BSIM3v0", "Berkeley Short Channel IGFET Model Version-3 (3.0)", &BSIM3v0nSize, &BSIM3v0nSize, BSIM3v0names, &BSIM3v0pTSize, BSIM3v0pTable, &BSIM3v0mPTSize, BSIM3v0mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ BSIM3v0param, /* DEVmodParam */ BSIM3v0mParam, /* DEVload */ BSIM3v0load, /* DEVsetup */ BSIM3v0setup, /* DEVunsetup */ BSIM3v0unsetup, /* DEVpzSetup */ BSIM3v0setup, /* DEVtemperature*/ BSIM3v0temp, /* DEVtrunc */ BSIM3v0trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ BSIM3v0acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ BSIM3v0destroy, /* DEVmodDelete */ BSIM3v0mDelete, /* DEVdelete */ BSIM3v0delete, /* DEVsetic */ BSIM3v0getic, /* DEVask */ BSIM3v0ask, /* DEVmodAsk */ BSIM3v0mAsk, /* DEVpzLoad */ BSIM3v0pzLoad, /* DEVconvTest */ BSIM3v0convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ BSIM3v0noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &BSIM3v0iSize, /* DEVmodSize */ &BSIM3v0mSize }; SPICEdev * get_bsim3v0_info(void) { return &B3v0info; } ngspice-26/src/spicelib/devices/bsim3v0/b3v0ask.c0000644000265600020320000001642312264261473021142 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0ask.c **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM3v0instance *here = (BSIM3v0instance*)inst; NG_IGNORE(select); switch(which) { case BSIM3v0_L: value->rValue = here->BSIM3v0l; return(OK); case BSIM3v0_W: value->rValue = here->BSIM3v0w; return(OK); case BSIM3v0_M: value->rValue = here->BSIM3v0m; return(OK); case BSIM3v0_AS: value->rValue = here->BSIM3v0sourceArea; return(OK); case BSIM3v0_AD: value->rValue = here->BSIM3v0drainArea; return(OK); case BSIM3v0_PS: value->rValue = here->BSIM3v0sourcePerimeter; return(OK); case BSIM3v0_PD: value->rValue = here->BSIM3v0drainPerimeter; return(OK); case BSIM3v0_NRS: value->rValue = here->BSIM3v0sourceSquares; return(OK); case BSIM3v0_NRD: value->rValue = here->BSIM3v0drainSquares; return(OK); case BSIM3v0_OFF: value->rValue = here->BSIM3v0off; return(OK); case BSIM3v0_NQSMOD: value->iValue = here->BSIM3v0nqsMod; return(OK); case BSIM3v0_IC_VBS: value->rValue = here->BSIM3v0icVBS; return(OK); case BSIM3v0_IC_VDS: value->rValue = here->BSIM3v0icVDS; return(OK); case BSIM3v0_IC_VGS: value->rValue = here->BSIM3v0icVGS; return(OK); case BSIM3v0_DNODE: value->iValue = here->BSIM3v0dNode; return(OK); case BSIM3v0_GNODE: value->iValue = here->BSIM3v0gNode; return(OK); case BSIM3v0_SNODE: value->iValue = here->BSIM3v0sNode; return(OK); case BSIM3v0_BNODE: value->iValue = here->BSIM3v0bNode; return(OK); case BSIM3v0_DNODEPRIME: value->iValue = here->BSIM3v0dNodePrime; return(OK); case BSIM3v0_SNODEPRIME: value->iValue = here->BSIM3v0sNodePrime; return(OK); case BSIM3v0_SOURCECONDUCT: value->rValue = here->BSIM3v0sourceConductance; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_DRAINCONDUCT: value->rValue = here->BSIM3v0drainConductance; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0vbd); return(OK); case BSIM3v0_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0vbs); return(OK); case BSIM3v0_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0vgs); return(OK); case BSIM3v0_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0vds); return(OK); case BSIM3v0_CD: value->rValue = here->BSIM3v0cd; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CBS: value->rValue = here->BSIM3v0cbs; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CBD: value->rValue = here->BSIM3v0cbd; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_GM: value->rValue = here->BSIM3v0gm; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_GDS: value->rValue = here->BSIM3v0gds; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_GMBS: value->rValue = here->BSIM3v0gmbs; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_GBD: value->rValue = here->BSIM3v0gbd; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_GBS: value->rValue = here->BSIM3v0gbs; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0qb); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0cqb); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0qg); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0cqg); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0qd); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0cqd); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CGG: value->rValue = here->BSIM3v0cggb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CGD: value->rValue = here->BSIM3v0cgdb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CGS: value->rValue = here->BSIM3v0cgsb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CDG: value->rValue = here->BSIM3v0cdgb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CDD: value->rValue = here->BSIM3v0cddb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CDS: value->rValue = here->BSIM3v0cdsb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CBG: value->rValue = here->BSIM3v0cbgb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CBDB: value->rValue = here->BSIM3v0cbdb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CBSB: value->rValue = here->BSIM3v0cbsb; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CAPBD: value->rValue = here->BSIM3v0capbd; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_CAPBS: value->rValue = here->BSIM3v0capbs; value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_VON: value->rValue = here->BSIM3v0von; return(OK); case BSIM3v0_VDSAT: value->rValue = here->BSIM3v0vdsat; return(OK); case BSIM3v0_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0qbs); value->rValue *= here->BSIM3v0m; return(OK); case BSIM3v0_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM3v0qbd); value->rValue *= here->BSIM3v0m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3v0/b3v0noi.c0000644000265600020320000002761212264261473021153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Gary W. Ng and Min-Chie Jeng. File: b3v0noi.c **********/ #include "ngspice/ngspice.h" #include "bsim3v0def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * BSIM3v0noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ static double StrongInversionNoiseEval3v0(double vgs, double vds, BSIM3v0model *model, BSIM3v0instance *here, double freq, double temp) { struct bsim3v0SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Vgst; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM3v0cd) * here->BSIM3v0m; if (vds > here->BSIM3v0vdsat) { esat = 2.0 * pParam->BSIM3v0vsattemp / here->BSIM3v0ueff; T0 = ((((vds - here->BSIM3v0vdsat) / pParam->BSIM3v0litl) + model->BSIM3v0em) / esat); DelClm = pParam->BSIM3v0litl * log (MAX(T0, N_MINLOG)); } else DelClm = 0.0; EffFreq = pow(freq, model->BSIM3v0ef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * (temp + CONSTCtoK) * here->BSIM3v0ueff; T2 = 1.0e8 * EffFreq * model->BSIM3v0cox * pParam->BSIM3v0leff * pParam->BSIM3v0leff; Vgst = vgs - here->BSIM3v0von; N0 = model->BSIM3v0cox * Vgst / CHARGE; if (N0 < 0.0) N0 = 0.0; Nl = model->BSIM3v0cox * (Vgst - MIN(vds, here->BSIM3v0vdsat)) / CHARGE; if (Nl < 0.0) Nl = 0.0; T3 = model->BSIM3v0oxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->BSIM3v0oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM3v0oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * (temp + CONSTCtoK) * cd * cd; T7 = 1.0e8 * EffFreq * pParam->BSIM3v0leff * pParam->BSIM3v0leff * pParam->BSIM3v0weff * here->BSIM3v0m; T8 = model->BSIM3v0oxideTrapDensityA + model->BSIM3v0oxideTrapDensityB * Nl + model->BSIM3v0oxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM3v0noise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM3v0model *model = (BSIM3v0model *)inModel; BSIM3v0instance *here; struct bsim3v0SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM3v0NSRCS]; double lnNdens[BSIM3v0NSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; int i; /* define the names of the noise sources */ static char *BSIM3v0nNames[BSIM3v0NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in BSIM3v0defs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here != NULL; here = here->BSIM3v0nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM3v0NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM3v0name, BSIM3v0nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM3v0NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM3v0name, BSIM3v0nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM3v0name, BSIM3v0nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[BSIM3v0RDNOIZ], &lnNdens[BSIM3v0RDNOIZ], ckt, THERMNOISE, here->BSIM3v0dNodePrime, here->BSIM3v0dNode, here->BSIM3v0drainConductance * here->BSIM3v0m); NevalSrc(&noizDens[BSIM3v0RSNOIZ], &lnNdens[BSIM3v0RSNOIZ], ckt, THERMNOISE, here->BSIM3v0sNodePrime, here->BSIM3v0sNode, here->BSIM3v0sourceConductance * here->BSIM3v0m); if (model->BSIM3v0noiMod == 2) { NevalSrc(&noizDens[BSIM3v0IDNOIZ], &lnNdens[BSIM3v0IDNOIZ], ckt, THERMNOISE, here->BSIM3v0dNodePrime, here->BSIM3v0sNodePrime, (here->BSIM3v0ueff * fabs((here->BSIM3v0qinv * here->BSIM3v0m) / (pParam->BSIM3v0leff * pParam->BSIM3v0leff)))); } else { NevalSrc(&noizDens[BSIM3v0IDNOIZ], &lnNdens[BSIM3v0IDNOIZ], ckt, THERMNOISE, here->BSIM3v0dNodePrime, here->BSIM3v0sNodePrime, (2.0 / 3.0 * fabs(here->BSIM3v0gm + here->BSIM3v0gds) * here->BSIM3v0m)); } NevalSrc(&noizDens[BSIM3v0FLNOIZ], NULL, ckt, N_GAIN, here->BSIM3v0dNodePrime, here->BSIM3v0sNodePrime, (double) 0.0); if (model->BSIM3v0noiMod == 2) { vgs = *(ckt->CKTstates[0] + here->BSIM3v0vgs); vds = *(ckt->CKTstates[0] + here->BSIM3v0vds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } if (vgs >= here->BSIM3v0von + 0.1) { Ssi = StrongInversionNoiseEval3v0(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[BSIM3v0FLNOIZ] *= Ssi; } else { pParam = here->pParam; T10 = model->BSIM3v0oxideTrapDensityA * 8.62e-5 * (ckt->CKTtemp + CONSTCtoK); T11 = pParam->BSIM3v0weff * here->BSIM3v0m * pParam->BSIM3v0leff * pow(data->freq, model->BSIM3v0ef) * 4.0e36; Swi = T10 / T11 * here->BSIM3v0cd * here->BSIM3v0m * here->BSIM3v0cd * here->BSIM3v0m; Slimit = StrongInversionNoiseEval3v0( here->BSIM3v0von + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[BSIM3v0FLNOIZ] *= (Slimit * Swi) / T1; else noizDens[BSIM3v0FLNOIZ] *= 0.0; } } else { noizDens[BSIM3v0FLNOIZ] *= model->BSIM3v0kf * exp(model->BSIM3v0af * log(MAX(fabs(here->BSIM3v0cd * here->BSIM3v0m), N_MINLOG))) / (pow(data->freq, model->BSIM3v0ef) * pParam->BSIM3v0leff * pParam->BSIM3v0leff * model->BSIM3v0cox); } lnNdens[BSIM3v0FLNOIZ] = log(MAX(noizDens[BSIM3v0FLNOIZ], N_MINLOG)); noizDens[BSIM3v0TOTNOIZ] = noizDens[BSIM3v0RDNOIZ] + noizDens[BSIM3v0RSNOIZ] + noizDens[BSIM3v0IDNOIZ] + noizDens[BSIM3v0FLNOIZ]; lnNdens[BSIM3v0TOTNOIZ] = log(MAX(noizDens[BSIM3v0TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM3v0TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM3v0NSRCS; i++) { here->BSIM3v0nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM3v0NSRCS; i++) { here->BSIM3v0nVar[OUTNOIZ][i] = 0.0; here->BSIM3v0nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM3v0NSRCS; i++) { if (i != BSIM3v0TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM3v0nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM3v0nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM3v0nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM3v0nVar[OUTNOIZ][i] += tempOnoise; here->BSIM3v0nVar[OUTNOIZ][BSIM3v0TOTNOIZ] += tempOnoise; here->BSIM3v0nVar[INNOIZ][i] += tempInoise; here->BSIM3v0nVar[INNOIZ][BSIM3v0TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM3v0NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM3v0NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM3v0nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM3v0nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0dest.c0000644000265600020320000000146712264261473021325 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0dest.c **********/ #include "ngspice/ngspice.h" #include "bsim3v0def.h" #include "ngspice/suffix.h" void BSIM3v0destroy(GENmodel **inModel) { BSIM3v0model **model = (BSIM3v0model**)inModel; BSIM3v0instance *here; BSIM3v0instance *prev = NULL; BSIM3v0model *mod = *model; BSIM3v0model *oldmod = NULL; for (; mod ; mod = mod->BSIM3v0nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3v0/b3v0ld.c0000644000265600020320000022552612264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. File: b3ld.c 1/3/92 Modified by Mansun Chan (1995) **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 int BSIM3v0load(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; double SourceSatCurrent, DrainSatCurrent; double ag0, qgd, qgs, qgb, von, cbhat = 0.0, VgstNVt, ExpVgst = 0.0; double cdrain, cdhat = 0.0, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double czbd, czbdsw, czbs, czbssw, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVd, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; #ifndef NEWCONV double tol; #endif double gcsgb, gcssb, PhiB, PhiBSW, MJ, MJSW; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double qgate = 0.0, qbulk = 0.0, qdrn = 0.0, qsrc, cqgate, cqbulk, cqdrn; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgs_eff_dVg; double n, dn_dVb, Vtm; double ExpArg; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4, dT4_dVg, dT4_dVd, dT4_dVb; double T5; double T6; double T7; double T8; double T10; double Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Pmos_factor; #ifndef NOBYPASS double tempv; #endif double a1; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds; double dAbulk_dVg, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff = 0.0, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double qcheq, qdef, gqdef, cqdef, cqcheq, gtau_diff, gtau_drift; double gcqdb,gcqsb,gcqgb,gcqbb; double dxpart, sxpart; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double Cgg, Cgd, Cgb; double Csg, Csd, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVd, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; struct bsim3v0SizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded = 0, error; double m = 1.0; for (; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here != NULL; here = here->BSIM3v0nextInstance) { Check = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->BSIM3v0vbs); vgs = *(ckt->CKTstate0 + here->BSIM3v0vgs); vds = *(ckt->CKTstate0 + here->BSIM3v0vds); qdef = *(ckt->CKTstate0 + here->BSIM3v0qcdump); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->BSIM3v0vbs); vgs = *(ckt->CKTstate1 + here->BSIM3v0vgs); vds = *(ckt->CKTstate1 + here->BSIM3v0vds); qdef = *(ckt->CKTstate1 + here->BSIM3v0qcdump); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM3v0off) { vds = model->BSIM3v0type * here->BSIM3v0icVDS; vgs = model->BSIM3v0type * here->BSIM3v0icVGS; vbs = model->BSIM3v0type * here->BSIM3v0icVBS; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = pParam->BSIM3v0vth0 + 0.1; vds = 0.1; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM3v0off)) { qdef = vbs = vgs = vds = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM3v0vbs) = *(ckt->CKTstate1 + here->BSIM3v0vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v0vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v0vbs))); *(ckt->CKTstate0 + here->BSIM3v0vgs) = *(ckt->CKTstate1 + here->BSIM3v0vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v0vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v0vgs))); *(ckt->CKTstate0 + here->BSIM3v0vds) = *(ckt->CKTstate1 + here->BSIM3v0vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v0vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM3v0vds))); *(ckt->CKTstate0 + here->BSIM3v0vbd) = *(ckt->CKTstate0 + here->BSIM3v0vbs) - *(ckt->CKTstate0 + here->BSIM3v0vds); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM3v0qcdump)) -(xfact * (*(ckt->CKTstate2 + here->BSIM3v0qcdump))); } else { #endif /* PREDICTOR */ vbs = model->BSIM3v0type * (*(ckt->CKTrhsOld + here->BSIM3v0bNode) - *(ckt->CKTrhsOld + here->BSIM3v0sNodePrime)); vgs = model->BSIM3v0type * (*(ckt->CKTrhsOld + here->BSIM3v0gNode) - *(ckt->CKTrhsOld + here->BSIM3v0sNodePrime)); vds = model->BSIM3v0type * (*(ckt->CKTrhsOld + here->BSIM3v0dNodePrime) - *(ckt->CKTrhsOld + here->BSIM3v0sNodePrime)); qdef = *(ckt->CKTrhsOld + here->BSIM3v0qNode); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v0vgs) - *(ckt->CKTstate0 + here->BSIM3v0vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v0vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v0vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v0vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v0vds); delvgd = vgd - vgdo; if (here->BSIM3v0mode >= 0) { cdhat = here->BSIM3v0cd - here->BSIM3v0gbd * delvbd + here->BSIM3v0gmbs * delvbs + here->BSIM3v0gm * delvgs + here->BSIM3v0gds * delvds; } else { cdhat = here->BSIM3v0cd - (here->BSIM3v0gbd - here->BSIM3v0gmbs) * delvbd - here->BSIM3v0gm * delvgd + here->BSIM3v0gds * delvds; } cbhat = here->BSIM3v0cbs + here->BSIM3v0cbd + here->BSIM3v0gbd * delvbd + here->BSIM3v0gbs * delvbs; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->BSIM3v0vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->BSIM3v0vbd))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->BSIM3v0vgs))) + ckt->CKTvoltTol))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->BSIM3v0vds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->BSIM3v0cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->BSIM3v0cd)) + ckt->CKTabstol)) { tempv = MAX(fabs(cbhat),fabs(here->BSIM3v0cbs + here->BSIM3v0cbd)) + ckt->CKTabstol; if ((fabs(cbhat - (here->BSIM3v0cbs + here->BSIM3v0cbd)) < ckt->CKTreltol * tempv)) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->BSIM3v0vbs); vbd = *(ckt->CKTstate0 + here->BSIM3v0vbd); vgs = *(ckt->CKTstate0 + here->BSIM3v0vgs); vds = *(ckt->CKTstate0 + here->BSIM3v0vds); qcheq = *(ckt->CKTstate0 + here->BSIM3v0qcheq); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->BSIM3v0mode * (here->BSIM3v0cd + here->BSIM3v0cbd); if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } } #endif /*NOBYPASS*/ von = here->BSIM3v0von; if (*(ckt->CKTstate0 + here->BSIM3v0vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0+here->BSIM3v0vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM3v0vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0+here->BSIM3v0vds))); vgs = vgd + vds; } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM3v0vbs), CONSTvt0, model->BSIM3v0vcrit, &Check); vbd = vbs - vds; } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM3v0vbd), CONSTvt0, model->BSIM3v0vcrit, &Check); vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; m = here->BSIM3v0m; SourceSatCurrent = here->BSIM3v0sourceArea*model->BSIM3v0jctSatCurDensity; if (here->BSIM3v0sourceArea <= 0.0) SourceSatCurrent = 1.0e-14; if (SourceSatCurrent <= 0.0) { here->BSIM3v0gbs = ckt->CKTgmin; here->BSIM3v0cbs = here->BSIM3v0gbs * vbs; } else if (vbs <= -0.5) { here->BSIM3v0gbs = ckt->CKTgmin; here->BSIM3v0cbs = -SourceSatCurrent + here->BSIM3v0gbs * vbs; } else if (vbs < 0.5) { evbs = exp(vbs / CONSTvt0); here->BSIM3v0gbs = SourceSatCurrent * evbs / CONSTvt0 + ckt->CKTgmin; here->BSIM3v0cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs; } else { evbs = exp(0.5 / CONSTvt0); here->BSIM3v0gbs = SourceSatCurrent * evbs / CONSTvt0 + ckt->CKTgmin; here->BSIM3v0cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * 0.5; } DrainSatCurrent = here->BSIM3v0drainArea * model->BSIM3v0jctSatCurDensity; if (here->BSIM3v0drainArea <= 0.0) DrainSatCurrent = 1.0e-14; if (DrainSatCurrent <= 0.0) { here->BSIM3v0gbd = ckt->CKTgmin; here->BSIM3v0cbd = here->BSIM3v0gbd * vbd; } else if (vbd <= -0.5) { here->BSIM3v0gbd = ckt->CKTgmin; here->BSIM3v0cbd = -DrainSatCurrent + here->BSIM3v0gbd * vbd; } else if (vbd < 0.5) { evbd = exp(vbd/CONSTvt0); here->BSIM3v0gbd = DrainSatCurrent * evbd / CONSTvt0 + ckt->CKTgmin; here->BSIM3v0cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd; } else { evbd = exp(0.5/CONSTvt0); here->BSIM3v0gbd = DrainSatCurrent * evbd / CONSTvt0 + ckt->CKTgmin; here->BSIM3v0cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * 0.5; } if (vds >= 0.0) { /* normal mode */ here->BSIM3v0mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; } else { /* inverse mode */ here->BSIM3v0mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; } ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; T0 = Vbs - pParam->BSIM3v0vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * pParam->BSIM3v0vbsc); Vbseff = pParam->BSIM3v0vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); if (Vbseff > 0.0) { T0 = pParam->BSIM3v0phi / (pParam->BSIM3v0phi + Vbseff); Phis = pParam->BSIM3v0phi * T0; dPhis_dVb = -T0 * T0; sqrtPhis = pParam->BSIM3v0phis3 / (pParam->BSIM3v0phi + 0.5 * Vbseff); dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis / pParam->BSIM3v0phis3; } else { Phis = pParam->BSIM3v0phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; } Xdep = pParam->BSIM3v0Xdep0 * sqrtPhis / pParam->BSIM3v0sqrtPhi; dXdep_dVb = (pParam->BSIM3v0Xdep0 / pParam->BSIM3v0sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM3v0leff; /* Vth Calculation */ if ((T1 = 1.0 + pParam->BSIM3v0dvt2 * Vbseff) < 1.0e-10) T1 = 1.0E-10; if ((T2 = 1.0 + pParam->BSIM3v0dvt2w * Vbseff) < 1.0E-10) T2 = 1.0E-10; T3 = sqrt(Xdep); lt1 = model->BSIM3v0factor1 * T3 * T1; dlt1_dVb = model->BSIM3v0factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * pParam->BSIM3v0dvt2); ltw = model->BSIM3v0factor1 * T3 * T2; dltw_dVb = model->BSIM3v0factor1 * (0.5 / T3 * T2 * dXdep_dVb + T3 * pParam->BSIM3v0dvt2w); T0 = -0.5 * pParam->BSIM3v0dvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; } else { T1 = MIN_EXP; dT1_dVb = 0.0; } Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; here->BSIM3v0thetavth = pParam->BSIM3v0dvt0 * Theta0; T0 = pParam->BSIM3v0vbi - pParam->BSIM3v0phi; Delt_vth = here->BSIM3v0thetavth * T0; dDelt_vth_dVb = pParam->BSIM3v0dvt0 * dTheta0_dVb * T0; T0 = -0.5 * pParam->BSIM3v0dvt1w * pParam->BSIM3v0weff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; } else { T1 = MIN_EXP; dT1_dVb = 0.0; } T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; T0 = pParam->BSIM3v0dvt0w * T2; T1 = pParam->BSIM3v0vbi - pParam->BSIM3v0phi; T2 = T0 * T1; dT2_dVb = pParam->BSIM3v0dvt0w * dT2_dVb * T1; TempRatio = ckt->CKTtemp / model->BSIM3v0tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM3v0nlx / Leff); T1 = pParam->BSIM3v0k1 * (T0 - 1.0) * pParam->BSIM3v0sqrtPhi + (pParam->BSIM3v0kt1 + pParam->BSIM3v0kt1l / Leff + pParam->BSIM3v0kt2 * Vbseff) * TempRatio; tmp2 = model->BSIM3v0tox / (pParam->BSIM3v0weff + pParam->BSIM3v0w0) * pParam->BSIM3v0phi; dDIBL_Sft_dVd = (pParam->BSIM3v0eta0 + pParam->BSIM3v0etab * Vbseff) * pParam->BSIM3v0theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Vth = model->BSIM3v0type * pParam->BSIM3v0vth0 + pParam->BSIM3v0k1 * (sqrtPhis - pParam->BSIM3v0sqrtPhi) - pParam->BSIM3v0k2 * Vbseff - Delt_vth - T2 + (pParam->BSIM3v0k3 + pParam->BSIM3v0k3b * Vbseff) * tmp2 + T1 - DIBL_Sft; here->BSIM3v0von = Vth; dVth_dVb = pParam->BSIM3v0k1 * dsqrtPhis_dVb - pParam->BSIM3v0k2 - dDelt_vth_dVb - dT2_dVb + pParam->BSIM3v0k3b * tmp2 - pParam->BSIM3v0etab * Vds * pParam->BSIM3v0theta0vb0 + pParam->BSIM3v0kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp2 = pParam->BSIM3v0nfactor * EPSSI / Xdep; tmp3 = pParam->BSIM3v0cdsc + pParam->BSIM3v0cdscb * Vbseff + pParam->BSIM3v0cdscd * Vds; n = 1.0 + (tmp2 + tmp3 * Theta0 + pParam->BSIM3v0cit) / model->BSIM3v0cox; if (n > 1.0) { dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM3v0cdscb * Theta0) / model->BSIM3v0cox; dn_dVd = pParam->BSIM3v0cdscd * Theta0 / model->BSIM3v0cox; } else { n = 1.0; dn_dVb = dn_dVd = 0.0; } /* Poly Gate Si Depletion Effect */ T0 = pParam->BSIM3v0vfb + pParam->BSIM3v0phi; if (model->BSIM3v0ngateGiven && (Vgs > T0)) { T1 = 1.0e6 * Charge_q * EPSSI * pParam->BSIM3v0ngate / (model->BSIM3v0cox * model->BSIM3v0cox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; if (T3 < 1.12) { Vgs_eff = T0 + T2; dVgs_eff_dVg = 1.0 / T4; } else { Vgs_eff = Vgs - 1.12; dVgs_eff_dVg = 1.0; } } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Vgst = Vgs_eff - Vth; /* Effective Vgst (Vgsteff) Calculation */ Vtm = model->BSIM3v0vtm; T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; if (VgstNVt < -EXP_THRESHOLD) { T1 = T10 * MIN_EXP; dT1_dVg = dT1_dVd = dT1_dVb = 0.0; } else if (VgstNVt > EXP_THRESHOLD) { T1 = Vgst; dT1_dVg = dVgs_eff_dVg; dT1_dVd = -dVth_dVd; dT1_dVb = -dVth_dVb; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; dT1_dVg *= dVgs_eff_dVg; } T2 = model->BSIM3v0tox / (pParam->BSIM3v0weff + pParam->BSIM3v0w0); ExpArg = (2.0 * pParam->BSIM3v0voff - Vgst) / T10; if (ExpArg < -EXP_THRESHOLD) { T2 = 1.0; dT2_dVg = dT2_dVd = dT2_dVb = 0.0; } else if (ExpArg > EXP_THRESHOLD) { T2 = 1.0 + 2.0 * n * model->BSIM3v0cox / pParam->BSIM3v0cdep0 * MAX_EXP; dT2_dVg = dT2_dVd = dT2_dVb = 0.0; } else { dT2_dVg = -model->BSIM3v0cox / Vtm / pParam->BSIM3v0cdep0 * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; dT2_dVg *= dVgs_eff_dVg; } Vgsteff = T1 / T2; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / (T2 * T2); dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / (T2 * T2); dVgsteff_dVb = (T2 * dT1_dVb - T1 * dT2_dVb) / (T2 * T2); /* Calculate Effective Channel Geometry */ Weff = pParam->BSIM3v0weff - 2.0 * (pParam->BSIM3v0dwg * Vgsteff + pParam->BSIM3v0dwb * (sqrtPhis - pParam->BSIM3v0sqrtPhi)); dWeff_dVg = -2.0 * pParam->BSIM3v0dwg; dWeff_dVb = -2.0 * pParam->BSIM3v0dwb * dsqrtPhis_dVb; if (Weff < 1.0e-8) { Weff = 1.0e-8; dWeff_dVg = dWeff_dVb = 0; } Rds = pParam->BSIM3v0rds0 * (1.0 + pParam->BSIM3v0prwg * Vgsteff + pParam->BSIM3v0prwb * (sqrtPhis - pParam->BSIM3v0sqrtPhi)); if (Rds > 0.0) { dRds_dVg = pParam->BSIM3v0rds0 * pParam->BSIM3v0prwg; dRds_dVb = pParam->BSIM3v0rds0 * pParam->BSIM3v0prwb * dsqrtPhis_dVb; } else { Rds = dRds_dVg = dRds_dVb = 0.0; } WVCox = Weff * pParam->BSIM3v0vsattemp * model->BSIM3v0cox; WVCoxRds = WVCox * Rds; /* Calculate Abulk */ T0 = 1.0 / (1.0 + pParam->BSIM3v0keta * Vbseff); dT0_dVb = -pParam->BSIM3v0keta * T0 * T0; T1 = 0.5 * pParam->BSIM3v0k1 / sqrtPhis; dT1_dVb = -T1 / sqrtPhis * dsqrtPhis_dVb; tmp1 = Leff + 2.0 * sqrt(pParam->BSIM3v0xj * Xdep); T5 = Leff / tmp1; tmp2 = pParam->BSIM3v0a0 *T5; tmp3 = pParam->BSIM3v0weff + pParam->BSIM3v0b1; tmp4 = pParam->BSIM3v0b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -tmp2 / tmp1 * sqrt(pParam->BSIM3v0xj / Xdep) * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = T0 * (1.0 + T1 * T2); if (Abulk0 < 0.01) Abulk0= 0.01; T8 = pParam->BSIM3v0ags * pParam->BSIM3v0a0 * T7; dAbulk_dVg = -T1 * T0 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; if (Abulk < 0.01) Abulk= 0.01; dAbulk0_dVb = T0 * T1 * dT2_dVb + T0 * T2 * dT1_dVb + (1.0 + T1 * T2) * dT0_dVb; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (T1 * (3.0 * T0 * dT2_dVb / tmp2 + dT0_dVb) + T0 * dT1_dVb); /* Mobility calculation */ if (model->BSIM3v0mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM3v0ua + pParam->BSIM3v0uc * Vbseff; T3 = T0 / model->BSIM3v0tox; Denomi = 1.0 + T3 * (T2 + pParam->BSIM3v0ub * T3); T1 = T2 / model->BSIM3v0tox + 2.0 * pParam->BSIM3v0ub * T3 / model->BSIM3v0tox; dDenomi_dVg = T1; dDenomi_dVd = T1 * 2.0 * dVth_dVd; dDenomi_dVb = T1 * 2.0 * dVth_dVb + pParam->BSIM3v0uc * T3; } else if (model->BSIM3v0mobMod == 2) { Denomi = 1.0 + Vgsteff / model->BSIM3v0tox * (pParam->BSIM3v0ua + pParam->BSIM3v0uc * Vbseff + pParam->BSIM3v0ub * Vgsteff / model->BSIM3v0tox); T1 = (pParam->BSIM3v0ua + pParam->BSIM3v0uc * Vbseff) / model->BSIM3v0tox + 2.0 * pParam->BSIM3v0ub / (model->BSIM3v0tox * model->BSIM3v0tox) * Vgsteff; dDenomi_dVg = T1; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * pParam->BSIM3v0uc / model->BSIM3v0tox; } else { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM3v0uc * Vbseff; T3 = T0 / model->BSIM3v0tox; T4 = T3 * (pParam->BSIM3v0ua + pParam->BSIM3v0ub * T3); Denomi = 1.0 + T4 * T2; T1 = (pParam->BSIM3v0ua / model->BSIM3v0tox + 2.0 * pParam->BSIM3v0ub * T3 / model->BSIM3v0tox) * T2; dDenomi_dVg = T1; dDenomi_dVd = T1 * 2.0 * dVth_dVd; dDenomi_dVb = T1 * 2.0 * dVth_dVb + pParam->BSIM3v0uc * T4; } here->BSIM3v0ueff = ueff = pParam->BSIM3v0u0temp / Denomi; dueff_dVg = -ueff / Denomi * dDenomi_dVg; dueff_dVd = -ueff / Denomi * dDenomi_dVd; dueff_dVb = -ueff / Denomi * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ Esat = 2.0 * pParam->BSIM3v0vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; a1 = pParam->BSIM3v0a1; if ((Pmos_factor = a1 * Vgsteff + pParam->BSIM3v0a2) > 1.0) { Pmos_factor = 1.0; a1 = 0.0; } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if ((Rds == 0.0) && (Pmos_factor == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); here->BSIM3v0vdsat = Vdsat = EsatL * Vgst2Vtm * T0; dT0_dVg = -(Abulk * dEsatL_dVg +EsatL*dAbulk_dVg+ 1.0) * T0 * T0; dT0_dVd = -(Abulk * dEsatL_dVd) * T0 * T0; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T0 * T0; dVdsat_dVg = EsatL * Vgst2Vtm * dT0_dVg + EsatL * T0 + Vgst2Vtm * T0 * dEsatL_dVg; dVdsat_dVd = EsatL * Vgst2Vtm * dT0_dVd + Vgst2Vtm * T0 * dEsatL_dVd; dVdsat_dVb = EsatL * Vgst2Vtm * dT0_dVb + Vgst2Vtm * T0 * dEsatL_dVb; } else { tmp1 = a1 / (Pmos_factor * Pmos_factor); if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } T0 = 2.0 * Abulk * (Abulk * WVCoxRds - 1.0 + 1.0 / Pmos_factor); dT0_dVg = 2.0 * (Abulk * Abulk * WVCoxRds * tmp2 - Abulk * tmp1 + (2.0 * WVCoxRds * Abulk + 1.0 / Pmos_factor - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (Abulk * Abulk * WVCoxRds * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Pmos_factor - 1.0) * dAbulk_dVb); dT0_dVd= 0.0; T1 = Vgst2Vtm * (2.0 / Pmos_factor - 1.0) + Abulk * EsatL + 3.0 * Abulk * Vgst2Vtm * WVCoxRds; dT1_dVg = (2.0 / Pmos_factor - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (Abulk * WVCoxRds + Abulk * Vgst2Vtm * WVCoxRds * tmp2 + Vgst2Vtm * WVCoxRds * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (Vgst2Vtm * WVCoxRds * dAbulk_dVb + Abulk * Vgst2Vtm * WVCoxRds * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * Vgst2Vtm * WVCoxRds); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + Vgst2Vtm * WVCoxRds * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * dEsatL_dVb + 2.0 * Vgst2Vtm * WVCoxRds * Vgst2Vtm * tmp3; dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); here->BSIM3v0vdsat = Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; T4 = T1 - T3; dT4_dVg = - dT1_dVg - dT3_dVg; dT4_dVd = - dT1_dVd - dT3_dVd; dT4_dVb = - dT1_dVb - dT3_dVb; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->BSIM3v0delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM3v0delta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->BSIM3v0delta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); /* Calculate VAsat */ tmp1 = a1 / (Pmos_factor * Pmos_factor); if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * WVCoxRds * Vgsteff * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + 2.0 * WVCoxRds * tmp4 * (1.0 + tmp2 * Vgsteff) - WVCoxRds * Vgsteff / Vgst2Vtm * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + 2.0 * WVCoxRds * tmp4 * tmp3 * Vgsteff - WVCoxRds * Vgsteff / Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - WVCoxRds * Vgsteff / Vgst2Vtm * Abulk * dVdsat_dVd; T1 = 2.0 / Pmos_factor - 1.0 + WVCoxRds * Abulk; dT1_dVg = -2.0 * tmp1 + WVCoxRds *(Abulk * tmp2+ dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + Abulk * WVCoxRds * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - T0 / T1 * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - T0 / T1 * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; diffVds = Vds - Vdseff; /* Calculate VACLM */ if (pParam->BSIM3v0pclm > 0.0) { T0 = 1.0 / (pParam->BSIM3v0pclm * Abulk * pParam->BSIM3v0litl); dT0_dVb = -T0 / Abulk * dAbulk_dVb; dT0_dVg= - T0/Abulk*dAbulk_dVg; T2 = Vgsteff / EsatL; T1 = Leff * (Abulk + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL+dAbulk_dVg); dT1_dVb = Leff * (dAbulk_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; VACLM = T0 * T1 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T0 * T1 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T0 * T1 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T0 * T1 * (1.0 - dVdseff_dVd); } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM3v0thetaRout > 0.0) { T0 = Vgst2Vtm * Abulk * Vdsat; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + Abulk * Vdsat + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + Abulk * Vdsat; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T2 = pParam->BSIM3v0thetaRout * (1.0 + pParam->BSIM3v0pdiblb * Vbseff); VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / (T1 * T1)) / T2; dVADIBL_dVb = ((-dT0_dVb / T1 + T0 * dT1_dVb / (T1 * T1)) - VADIBL * pParam->BSIM3v0thetaRout * pParam->BSIM3v0pdiblb) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / (T1 * T1)) / T2; } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate VA */ T0 = 1.0 + pParam->BSIM3v0pvag * Vgsteff / EsatL; dT0_dVg = pParam->BSIM3v0pvag * (1.0 - Vgsteff * dEsatL_dVg / EsatL) / EsatL; dT0_dVb = -pParam->BSIM3v0pvag * Vgsteff * dEsatL_dVb / EsatL / EsatL; dT0_dVd = -pParam->BSIM3v0pvag * Vgsteff * dEsatL_dVd / EsatL / EsatL; tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; /* Calculate VASCBE */ if ((diffVds) && ((T0 = pParam->BSIM3v0pscbe1 * pParam->BSIM3v0litl / diffVds) > 0.0) && (T0 < EXP_THRESHOLD)) { VASCBE = Leff * exp(T0) / pParam->BSIM3v0pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP*Leff/pParam->BSIM3v0pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Calculate Ids */ CoxWovL = model->BSIM3v0cox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; T0 = 1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm+Vdseff*dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; fgche2 = 1.0 + Vdseff / EsatL; dfgche2_dVg = (dVdseff_dVg - Vdseff / EsatL * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - Vdseff / EsatL * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - Vdseff / EsatL * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; Idl = gche * Vdseff / T0; dIdl_dVg = (gche * dVdseff_dVg + Vdseff * dgche_dVg / T0) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + Vdseff * dgche_dVd / T0) / T0; dIdl_dVb = (gche * dVdseff_dVb + Vdseff * dgche_dVb / T0 - Idl * dRds_dVb * gche) / T0; T0 = 1.0 + diffVds / Va; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + diffVds / Va * dVa_dVg) / Va; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - diffVds / Va * dVa_dVd) / Va; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + diffVds / Va * dVa_dVb) / Va; T0 = 1.0 + diffVds / VASCBE; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + diffVds / VASCBE * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - diffVds / VASCBE * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + diffVds / VASCBE * dVASCBE_dVb) / VASCBE; Gds += Gm * dVgsteff_dVd; Gmb += Gm * dVgsteff_dVb; Gm *= dVgsteff_dVg; Gmb *= dVbseff_dVb; /* calculate substrate current Isub */ if ((pParam->BSIM3v0alpha0 <= 0.0) || (pParam->BSIM3v0beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = pParam->BSIM3v0alpha0 / Leff; if (diffVds<0.0) { diffVds=0.0; Vdseff=Vds; } /* added to avoid the hardwrae problem when Vds=0 */ if ((diffVds != 0.0) && ((T0 = -pParam->BSIM3v0beta0 / diffVds) > -EXP_THRESHOLD)) { T1 = T2 * diffVds * exp(T0); dT1_dVg = T1 / diffVds * (T0 - 1.0) * dVdseff_dVg; dT1_dVd = T1 / diffVds * (1.0 - T0) * (1.0 - dVdseff_dVd); dT1_dVb = T1 / diffVds * (T0 - 1.0) * dVdseff_dVb; } else { T1 = T2 * diffVds * MIN_EXP; dT1_dVg = -T2 * MIN_EXP * dVdseff_dVg; dT1_dVd = T2 * MIN_EXP * (1.0 - dVdseff_dVd); dT1_dVb = -T2 * MIN_EXP * dVdseff_dVb; } Isub = T1 * Idsa; Gbg = T1 * dIdsa_dVg + Idsa * dT1_dVg; Gbd = T1 * dIdsa_dVd + Idsa * dT1_dVd; Gbb = T1 * dIdsa_dVb + Idsa * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbg *= dVbseff_dVb; } cdrain = Ids; here->BSIM3v0gds = Gds; here->BSIM3v0gm = Gm; here->BSIM3v0gmbs = Gmb; here->BSIM3v0gbbs = Gbb; here->BSIM3v0gbgs = Gbg; here->BSIM3v0gbds = Gbd; here->BSIM3v0csub = Isub - (Gbb * Vbseff + Gbd * Vds + Gbg * Vgs); /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abulk * Vdseff / Vgst2Vtm); here->BSIM3v0qinv = -model->BSIM3v0cox * Weff * Leff * T1; if ((model->BSIM3v0xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM3v0cggb = here->BSIM3v0cgsb = here->BSIM3v0cgdb = 0.0; here->BSIM3v0cdgb = here->BSIM3v0cdsb = here->BSIM3v0cddb = 0.0; here->BSIM3v0cbgb = here->BSIM3v0cbsb = here->BSIM3v0cbdb = 0.0; here->BSIM3v0cqdb = here->BSIM3v0cqsb = here->BSIM3v0cqgb = here->BSIM3v0cqbb = 0.0; here->BSIM3v0gtau = 0.0; goto finished; } else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM3v0phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM3v0cox * pParam->BSIM3v0weffCV * pParam->BSIM3v0leffCV; Vfb = Vth - pParam->BSIM3v0phi - pParam->BSIM3v0k1 * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->BSIM3v0k1 * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; if ((VgstNVt > -EXP_THRESHOLD) && (VgstNVt < EXP_THRESHOLD)) { ExpVgst *= ExpVgst; Vgsteff = n * Vtm * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgs_eff - Vth) / n * dn_dVd) + Vgsteff / n * dn_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgs_eff - Vth) / n * dn_dVb) + Vgsteff / n * dn_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } if (model->BSIM3v0capMod == 1) { Arg1 = Vgs_eff - VbseffCV - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * (Arg1 - Vgsteff); Cgg = CoxWL * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -CoxWL * (dVfb_dVd + dVgsteff_dVd); Cgb = -CoxWL * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } else { T0 = 0.5 * pParam->BSIM3v0k1; T1 = sqrt(T0 * T0 + Arg1 - Vgsteff); qgate = CoxWL * pParam->BSIM3v0k1 * (T1 - T0); T2 = CoxWL * T0 / T1; Cgg = T2 * (dVgs_eff_dVg - dVgsteff_dVg); Cgd = -T2 * (dVfb_dVd + dVgsteff_dVd); Cgb = -T2 * (dVfb_dVb + dVbseffCV_dVb + dVgsteff_dVb); } qbulk = -qgate; Cbg = -Cgg; Cbd = -Cgd; Cbb = -Cgb; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v0abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v0abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; if (VdsatCV <= Vds) { dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T0 = Vgsteff - VdsatCV / 3.0; dT0_dVg = 1.0 - dVdsatCV_dVg / 3.0; dT0_dVb = -dVdsatCV_dVb / 3.0; qgate += CoxWL * T0; Cgg1 = CoxWL * dT0_dVg; Cgb1 = CoxWL * dT0_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; T0 = VdsatCV - Vgsteff; dT0_dVg = dVdsatCV_dVg - 1.0; dT0_dVb = dVdsatCV_dVb; qbulk += One_Third_CoxWL * T0; Cbg1 = One_Third_CoxWL * dT0_dVg; Cbb1 = One_Third_CoxWL * dT0_dVb + Cbg1 * dVgsteff_dVb; Cbd1 = Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v0xpart > 0.5) T0 = -Two_Third_CoxWL; else if (model->BSIM3v0xpart < 0.5) T0 = -0.4 * CoxWL; else T0 = -One_Third_CoxWL; qsrc = T0 * Vgsteff; Csg = T0 * dVgsteff_dVg; Csb = T0 * dVgsteff_dVb; Csd = T0 * dVgsteff_dVd; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } else { T0 = AbulkCV * Vds; T1 = 12.0 * (Vgsteff - 0.5 * T0); T2 = Vds / T1; T3 = T0 * T2; dT3_dVg = -12.0 * T2 * T2 * AbulkCV; dT3_dVd = 6.0 * T0 * (4.0 * Vgsteff - T0) / T1 / T1 - 0.5; dT3_dVb = 12.0 * T2 * T2 * dAbulkCV_dVb * Vgsteff; qgate += CoxWL * (Vgsteff - 0.5 * Vds + T3); Cgg1 = CoxWL * (1.0 + dT3_dVg); Cgb1 = CoxWL * dT3_dVb + Cgg1 * dVgsteff_dVb; Cgd1 = CoxWL * dT3_dVd + Cgg1 * dVgsteff_dVd; Cgg1 *= dVgsteff_dVg; Cgg += Cgg1; Cgb += Cgb1; Cgd += Cgd1; qbulk += CoxWL * (1.0 - AbulkCV) * (0.5 * Vds - T3); Cbg1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVg); Cbb1 = -CoxWL * ((1.0 - AbulkCV) * dT3_dVb + (0.5 * Vds - T3) * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbd1 = -CoxWL * (1.0 - AbulkCV) * dT3_dVd + Cbg1 * dVgsteff_dVd; Cbg1 *= dVgsteff_dVg; Cbg += Cbg1; Cbb += Cbb1; Cbd += Cbd1; if (model->BSIM3v0xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); Csg = -CoxWL * (0.5 + 24.0 * T0 * Vds / T1 / T1 * AbulkCV); Csb = -CoxWL * (0.25 * Vds * dAbulkCV_dVb - 12.0 * T0 * Vds / T1 / T1 * (4.0 * Vgsteff - T0) * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csd = -CoxWL * (0.25 * AbulkCV - 12.0 * AbulkCV * T0 / T1 / T1 * (4.0 * Vgsteff - T0)) + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else if (model->BSIM3v0xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T4 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; Csg = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); Csb = (qsrc / T1 * Vds + T2 * T4 * Vds) * dAbulkCV_dVb + Csg * dVgsteff_dVb; Csd = (qsrc / T1 + T2 * T4) * AbulkCV + Csg * dVgsteff_dVd; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; } qdrn = -(qgate + qbulk + qsrc); here->BSIM3v0cggb = Cgg; here->BSIM3v0cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v0cgdb = Cgd; here->BSIM3v0cdgb = -(Cgg + Cbg + Csg); here->BSIM3v0cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v0cddb = -(Cgd + Cbd + Csd); here->BSIM3v0cbgb = Cbg; here->BSIM3v0cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v0cbdb = Cbd; } else { V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVd = CoxWL * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = CoxWL * (dVfbeff_dVb - dVfb_dVb); T0 = 0.5 * pParam->BSIM3v0k1; T1 = sqrt(T0 * T0 + Vgs_eff - Vfbeff - VbseffCV - Vgsteff); Qsub0 = CoxWL * pParam->BSIM3v0k1 * (T1 - T0); T2 = CoxWL * T0 / T1; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * (dVfbeff_dVd + dVgsteff_dVd); dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM3v0abulkCVfactor; dAbulkCV_dVb = pParam->BSIM3v0abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM3v0xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM3v0xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQac0_dVd + dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQac0_dVd - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM3v0cggb = Cgg; here->BSIM3v0cgsb = -(Cgg + Cgd + Cgb); here->BSIM3v0cgdb = Cgd; here->BSIM3v0cdgb = -(Cgg + Cbg + Csg); here->BSIM3v0cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM3v0cddb = -(Cgd + Cbd + Csd); here->BSIM3v0cbgb = Cbg; here->BSIM3v0cbsb = -(Cbg + Cbd + Cbb); here->BSIM3v0cbdb = Cbd; } /* Non-quasi-static Model */ if (here->BSIM3v0nqsMod) { qcheq = -qbulk - qgate; qbulk = qgate = qdrn = qsrc = 0.0; here->BSIM3v0cqgb = -(here->BSIM3v0cggb + here->BSIM3v0cbgb); here->BSIM3v0cqdb = -(here->BSIM3v0cgdb + here->BSIM3v0cbdb); here->BSIM3v0cqsb = -(here->BSIM3v0cgsb + here->BSIM3v0cbsb); here->BSIM3v0cqbb = here->BSIM3v0cggb + here->BSIM3v0cgdb + here->BSIM3v0cgsb + here->BSIM3v0cbgb + here->BSIM3v0cbdb + here->BSIM3v0cbsb; here->BSIM3v0cggb = here->BSIM3v0cgsb = here->BSIM3v0cgdb = 0.0; here->BSIM3v0cdgb = here->BSIM3v0cdsb = here->BSIM3v0cddb = 0.0; here->BSIM3v0cbgb = here->BSIM3v0cbsb = here->BSIM3v0cbdb = 0.0; T0 = pParam->BSIM3v0leffCV * pParam->BSIM3v0leffCV; here->BSIM3v0tconst = pParam->BSIM3v0u0temp * pParam->BSIM3v0elm / CoxWL / T0; if (qcheq == 0.0) here->BSIM3v0tconst = 0.0; else if (qcheq < 0.0) here->BSIM3v0tconst = -here->BSIM3v0tconst; gtau_drift = fabs(here->BSIM3v0tconst * qcheq); gtau_diff = 16.0 * pParam->BSIM3v0u0temp * model->BSIM3v0vtm / T0; here->BSIM3v0gtau = gtau_drift + gtau_diff; *(ckt->CKTstate0 + here->BSIM3v0qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM3v0qcheq) = *(ckt->CKTstate0 + here->BSIM3v0qcheq); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v0qcheq); if (error) return (error); } else { here->BSIM3v0cqgb = here->BSIM3v0cqdb = here->BSIM3v0cqsb = here->BSIM3v0cqbb = 0.0; here->BSIM3v0gtau = 0.0; } } finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->BSIM3v0cd = here->BSIM3v0mode * cdrain - here->BSIM3v0cbd; if (ChargeComputationNeeded) { /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ czbd = model->BSIM3v0unitAreaJctCap * here->BSIM3v0drainArea; czbs = model->BSIM3v0unitAreaJctCap * here->BSIM3v0sourceArea; czbdsw = model->BSIM3v0unitLengthSidewallJctCap * here->BSIM3v0drainPerimeter; czbssw = model->BSIM3v0unitLengthSidewallJctCap * here->BSIM3v0sourcePerimeter; PhiB = model->BSIM3v0bulkJctPotential; PhiBSW = model->BSIM3v0sidewallJctPotential; MJ = model->BSIM3v0bulkJctBotGradingCoeff; MJSW = model->BSIM3v0bulkJctSideGradingCoeff; /* Source Bulk Junction */ if (vbs == 0.0) { *(ckt->CKTstate0 + here->BSIM3v0qbs) = 0.0; here->BSIM3v0capbs = czbs + czbssw; } else if (vbs < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs / PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v0qbs) = PhiB * czbs * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v0capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v0qbs) = 0.0; here->BSIM3v0capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs / PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v0qbs) += PhiBSW * czbssw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v0capbs += czbssw * sarg; } } else { *(ckt->CKTstate0+here->BSIM3v0qbs) = vbs * (czbs + czbssw) + vbs * vbs * (czbs * MJ * 0.5 / PhiB + czbssw * MJSW * 0.5 / PhiBSW); here->BSIM3v0capbs = czbs + czbssw + vbs * (czbs * MJ /PhiB + czbssw * MJSW / PhiBSW ); } /* Drain Bulk Junction */ if (vbd == 0.0) { *(ckt->CKTstate0 + here->BSIM3v0qbd) = 0.0; here->BSIM3v0capbd = czbd + czbdsw; } else if (vbd < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd / PhiB; if (MJ == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJ * log(arg)); *(ckt->CKTstate0 + here->BSIM3v0qbd) = PhiB * czbd * (1.0 - arg * sarg) / (1.0 - MJ); here->BSIM3v0capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM3v0qbd) = 0.0; here->BSIM3v0capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd / PhiBSW; if (MJSW == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSW * log(arg)); *(ckt->CKTstate0 + here->BSIM3v0qbd) += PhiBSW * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSW); here->BSIM3v0capbd += czbdsw * sarg; } } else { *(ckt->CKTstate0+here->BSIM3v0qbd) = vbd * (czbd + czbdsw) + vbd * vbd * (czbd * MJ * 0.5 / PhiB + czbdsw * MJSW * 0.5 / PhiBSW); here->BSIM3v0capbd = czbd + czbdsw + vbd * (czbd * MJ / PhiB + czbdsw * MJSW / PhiBSW ); } } /* * check convergence */ if ((here->BSIM3v0off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(here->BSIM3v0cd)) + ckt->CKTabstol; if (fabs(cdhat - here->BSIM3v0cd) >= tol) { ckt->CKTnoncon++; } else { tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(here->BSIM3v0cbs + here->BSIM3v0cbd)) + ckt->CKTabstol; if (fabs(cbhat - (here->BSIM3v0cbs + here->BSIM3v0cbd)) > tol) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM3v0vbs) = vbs; *(ckt->CKTstate0 + here->BSIM3v0vbd) = vbd; *(ckt->CKTstate0 + here->BSIM3v0vgs) = vgs; *(ckt->CKTstate0 + here->BSIM3v0vds) = vds; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (model->BSIM3v0capMod == 1) { if (vgd < 0.0) { T1 = sqrt(1.0 - 4.0 * vgd / pParam->BSIM3v0ckappa); cgdo = pParam->BSIM3v0cgdo + pParam->BSIM3v0weffCV * pParam->BSIM3v0cgdl / T1; qgdo = pParam->BSIM3v0cgdo * vgd - pParam->BSIM3v0weffCV * 0.5 * pParam->BSIM3v0cgdl * pParam->BSIM3v0ckappa * (T1 - 1.0); } else { cgdo = pParam->BSIM3v0cgdo + pParam->BSIM3v0weffCV * pParam->BSIM3v0cgdl; qgdo = (pParam->BSIM3v0weffCV * pParam->BSIM3v0cgdl + pParam->BSIM3v0cgdo) * vgd; } if (vgs < 0.0) { T1 = sqrt(1.0 - 4.0 * vgs / pParam->BSIM3v0ckappa); cgso = pParam->BSIM3v0cgso + pParam->BSIM3v0weffCV * pParam->BSIM3v0cgsl / T1; qgso = pParam->BSIM3v0cgso * vgs - pParam->BSIM3v0weffCV * 0.5 * pParam->BSIM3v0cgsl * pParam->BSIM3v0ckappa * (T1 - 1.0); } else { cgso = pParam->BSIM3v0cgso + pParam->BSIM3v0weffCV * pParam->BSIM3v0cgsl; qgso = (pParam->BSIM3v0weffCV * pParam->BSIM3v0cgsl + pParam->BSIM3v0cgso) * vgs; } } else { T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v0weffCV * pParam->BSIM3v0cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v0ckappa); cgdo = pParam->BSIM3v0cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM3v0cgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->BSIM3v0ckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM3v0weffCV * pParam->BSIM3v0cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM3v0ckappa); cgso = pParam->BSIM3v0cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM3v0cgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->BSIM3v0ckappa * (T4 - 1.0)); } if (here->BSIM3v0mode > 0) { gcdgb = (here->BSIM3v0cdgb - cgdo) * ag0; gcddb = (here->BSIM3v0cddb + here->BSIM3v0capbd + cgdo) * ag0; gcdsb = here->BSIM3v0cdsb * ag0; gcsgb = -(here->BSIM3v0cggb + here->BSIM3v0cbgb + here->BSIM3v0cdgb + cgso) * ag0; gcsdb = -(here->BSIM3v0cgdb + here->BSIM3v0cbdb + here->BSIM3v0cddb) * ag0; gcssb = (here->BSIM3v0capbs + cgso - (here->BSIM3v0cgsb + here->BSIM3v0cbsb + here->BSIM3v0cdsb)) * ag0; gcggb = (here->BSIM3v0cggb + cgdo + cgso + pParam->BSIM3v0cgbo ) * ag0; gcgdb = (here->BSIM3v0cgdb - cgdo) * ag0; gcgsb = (here->BSIM3v0cgsb - cgso) * ag0; gcbgb = (here->BSIM3v0cbgb - pParam->BSIM3v0cgbo) * ag0; gcbdb = (here->BSIM3v0cbdb - here->BSIM3v0capbd) * ag0; gcbsb = (here->BSIM3v0cbsb - here->BSIM3v0capbs) * ag0; gcqgb = here->BSIM3v0cqgb * ag0; gcqdb = here->BSIM3v0cqdb * ag0; gcqsb = here->BSIM3v0cqsb * ag0; gcqbb = here->BSIM3v0cqbb * ag0; T0 = here->BSIM3v0tconst * qdef; here->BSIM3v0gtg = T0 * here->BSIM3v0cqgb; here->BSIM3v0gtb = T0 * here->BSIM3v0cqbb; here->BSIM3v0gtd = T0 * here->BSIM3v0cqdb; here->BSIM3v0gts = T0 * here->BSIM3v0cqsb; sxpart = 0.6; dxpart = 0.4; /* compute total terminal charge */ qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v0cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qdrn -= qgd; qsrc = -(qgate + qbulk + qdrn); } else { gcsgb = (here->BSIM3v0cdgb - cgso) * ag0; gcsdb = here->BSIM3v0cdsb * ag0; gcssb = (here->BSIM3v0cddb + here->BSIM3v0capbs + cgso) * ag0; gcdgb = -(here->BSIM3v0cggb + here->BSIM3v0cbgb + here->BSIM3v0cdgb + cgdo) * ag0; gcdsb = -(here->BSIM3v0cgdb + here->BSIM3v0cbdb + here->BSIM3v0cddb) * ag0; gcddb = (here->BSIM3v0capbd + cgdo - (here->BSIM3v0cgsb + here->BSIM3v0cbsb + here->BSIM3v0cdsb)) * ag0; gcggb = (here->BSIM3v0cggb + cgdo + cgso + pParam->BSIM3v0cgbo ) * ag0; gcgdb = (here->BSIM3v0cgsb - cgdo) * ag0; gcgsb = (here->BSIM3v0cgdb - cgso) * ag0; gcbgb = (here->BSIM3v0cbgb - pParam->BSIM3v0cgbo) * ag0; gcbdb = (here->BSIM3v0cbsb - here->BSIM3v0capbd) * ag0; gcbsb = (here->BSIM3v0cbdb - here->BSIM3v0capbs) * ag0; gcqgb = here->BSIM3v0cqgb * ag0; gcqdb = here->BSIM3v0cqsb * ag0; gcqsb = here->BSIM3v0cqdb * ag0; gcqbb = here->BSIM3v0cqbb * ag0; T0 = here->BSIM3v0tconst * qdef; here->BSIM3v0gtg = T0 * here->BSIM3v0cqgb; here->BSIM3v0gtb = T0 * here->BSIM3v0cqbb; here->BSIM3v0gtd = T0 * here->BSIM3v0cqdb; here->BSIM3v0gts = T0 * here->BSIM3v0cqsb; dxpart = 0.6; sxpart = 0.4; /* compute total terminal charge */ qgd = qgdo; qgs = qgso; qgb = pParam->BSIM3v0cgbo * vgb; qgate += qgd + qgs + qgb; qbulk -= qgb; qsrc = qdrn - qgs; qdrn = -(qgate + qbulk + qsrc); } here->BSIM3v0cgdo = cgdo; here->BSIM3v0cgso = cgso; /* added by Mansun 11/1/93 */ if (here->BSIM3v0nqsMod) { *(ckt->CKTstate0 + here->BSIM3v0qcdump) = qdef; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM3v0qcdump) = *(ckt->CKTstate0 + here->BSIM3v0qcdump); error = NIintegrate(ckt, &gqdef, &cqdef, 1.0, here->BSIM3v0qcdump); if (error) return (error); } else { gqdef = cqdef = 0.0; } if (ByPass) goto line860; /* End added by Mansun 11/1/93 */ *(ckt->CKTstate0 + here->BSIM3v0qg) = qgate; *(ckt->CKTstate0 + here->BSIM3v0qd) = qdrn - *(ckt->CKTstate0 + here->BSIM3v0qbd); *(ckt->CKTstate0 + here->BSIM3v0qb) = qbulk + *(ckt->CKTstate0 + here->BSIM3v0qbd) + *(ckt->CKTstate0 + here->BSIM3v0qbs); /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v0qb) = *(ckt->CKTstate0 + here->BSIM3v0qb); *(ckt->CKTstate1 + here->BSIM3v0qg) = *(ckt->CKTstate0 + here->BSIM3v0qg); *(ckt->CKTstate1 + here->BSIM3v0qd) = *(ckt->CKTstate0 + here->BSIM3v0qd); } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v0qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM3v0qg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->BSIM3v0qd); if (error) return(error); goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; gcqgb = gcqdb = gcqsb = gcqbb = 0.0; here->BSIM3v0gtg = here->BSIM3v0gtd = here->BSIM3v0gts = here->BSIM3v0gtb = 0.0; gqdef = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM3v0mode > 0) ? 0.4 : 0.6)); if (here->BSIM3v0nqsMod) here->BSIM3v0gtau = 16.0 * pParam->BSIM3v0u0temp * model->BSIM3v0vtm / Leff / Leff; else here->BSIM3v0gtau = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM3v0cqg); cqbulk = *(ckt->CKTstate0 + here->BSIM3v0cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM3v0cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs + (here->BSIM3v0gtg * vgb - here->BSIM3v0gtd * vbd - here->BSIM3v0gts * vbs); ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs - dxpart * (here->BSIM3v0gtg * vgb - here->BSIM3v0gtd * vbd - here->BSIM3v0gts * vbs); cqcheq = *(ckt->CKTstate0 + here->BSIM3v0cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + (here->BSIM3v0gtg * vgb - here->BSIM3v0gtd * vbd - here->BSIM3v0gts * vbs); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM3v0cqb) = *(ckt->CKTstate0 + here->BSIM3v0cqb); *(ckt->CKTstate1 + here->BSIM3v0cqg) = *(ckt->CKTstate0 + here->BSIM3v0cqg); *(ckt->CKTstate1 + here->BSIM3v0cqd) = *(ckt->CKTstate0 + here->BSIM3v0cqd); *(ckt->CKTstate1 + here->BSIM3v0cqcheq) = *(ckt->CKTstate0 + here->BSIM3v0cqcheq); *(ckt->CKTstate1 + here->BSIM3v0cqcdump) = *(ckt->CKTstate0 + here->BSIM3v0cqcdump); } /* * load current vector */ line900: if (here->BSIM3v0mode >= 0) { Gm = here->BSIM3v0gm; Gmbs = here->BSIM3v0gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cdreq = model->BSIM3v0type * (cdrain - here->BSIM3v0gds * vds - Gm * vgs - Gmbs * vbs); ceqbs = -here->BSIM3v0csub; ceqbd = 0.0; gbspsp = -here->BSIM3v0gbds - here->BSIM3v0gbgs - here->BSIM3v0gbbs; gbbdp = -here->BSIM3v0gbds; gbbsp = here->BSIM3v0gbds + here->BSIM3v0gbgs + here->BSIM3v0gbbs; gbspg = here->BSIM3v0gbgs; gbspb = here->BSIM3v0gbbs; gbspdp = here->BSIM3v0gbds; gbdpdp = 0.0; gbdpg = 0.0; gbdpb = 0.0; gbdpsp = 0.0; } else { Gm = -here->BSIM3v0gm; Gmbs = -here->BSIM3v0gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); cdreq = -model->BSIM3v0type * (cdrain + here->BSIM3v0gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = 0.0; ceqbd = -here->BSIM3v0csub; gbspsp = 0.0; gbbdp = here->BSIM3v0gbds + here->BSIM3v0gbgs + here->BSIM3v0gbbs; gbbsp = -here->BSIM3v0gbds; gbspg = 0.0; gbspb = 0.0; gbspdp = 0.0; gbdpdp = -here->BSIM3v0gbds - here->BSIM3v0gbgs - here->BSIM3v0gbbs; gbdpg = here->BSIM3v0gbgs; gbdpb = here->BSIM3v0gbbs; gbdpsp = here->BSIM3v0gbds; } if (model->BSIM3v0type > 0) { ceqbs += (here->BSIM3v0cbs - (here->BSIM3v0gbs - ckt->CKTgmin) * vbs); ceqbd += (here->BSIM3v0cbd - (here->BSIM3v0gbd - ckt->CKTgmin) * vbd); ceqqg = ceqqg; ceqqb = ceqqb; ceqqd = ceqqd; cqcheq = cqcheq; } else { ceqbs = -ceqbs - (here->BSIM3v0cbs - (here->BSIM3v0gbs - ckt->CKTgmin) * vbs); ceqbd = -ceqbd - (here->BSIM3v0cbd - (here->BSIM3v0gbd - ckt->CKTgmin) * vbd); ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; cqcheq = -cqcheq; } (*(ckt->CKTrhs + here->BSIM3v0gNode) -= m * ceqqg); (*(ckt->CKTrhs + here->BSIM3v0bNode) -= m * (ceqbs + ceqbd + ceqqb)); (*(ckt->CKTrhs + here->BSIM3v0dNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->BSIM3v0sNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd)); *(ckt->CKTrhs + here->BSIM3v0qNode) += m * (cqcheq - cqdef); /* * load y matrix */ (*(here->BSIM3v0DdPtr) += m * here->BSIM3v0drainConductance); (*(here->BSIM3v0GgPtr) += m * (gcggb - here->BSIM3v0gtg)); (*(here->BSIM3v0SsPtr) += m * here->BSIM3v0sourceConductance); (*(here->BSIM3v0BbPtr) += m * ((here->BSIM3v0gbd + here->BSIM3v0gbs - gcbgb - gcbdb - gcbsb) - here->BSIM3v0gbbs)); (*(here->BSIM3v0DPdpPtr) += m * ((here->BSIM3v0drainConductance + here->BSIM3v0gds + here->BSIM3v0gbd + RevSum + gcddb) + dxpart * here->BSIM3v0gtd + gbdpdp)); (*(here->BSIM3v0SPspPtr) += m * ((here->BSIM3v0sourceConductance + here->BSIM3v0gds + here->BSIM3v0gbs + FwdSum + gcssb) + sxpart * here->BSIM3v0gts + gbspsp)); (*(here->BSIM3v0DdpPtr) -= m * here->BSIM3v0drainConductance); (*(here->BSIM3v0GbPtr) -= m * (gcggb + gcgdb + gcgsb + here->BSIM3v0gtb)); (*(here->BSIM3v0GdpPtr) += m * (gcgdb - here->BSIM3v0gtd)); (*(here->BSIM3v0GspPtr) += m * (gcgsb - here->BSIM3v0gts)); (*(here->BSIM3v0SspPtr) -= m * here->BSIM3v0sourceConductance); (*(here->BSIM3v0BgPtr) += m * (gcbgb - here->BSIM3v0gbgs)); (*(here->BSIM3v0BdpPtr) += m * (gcbdb - here->BSIM3v0gbd + gbbdp)); (*(here->BSIM3v0BspPtr) += m * (gcbsb - here->BSIM3v0gbs + gbbsp)); (*(here->BSIM3v0DPdPtr) -= m * here->BSIM3v0drainConductance); (*(here->BSIM3v0DPgPtr) += m * ((Gm + gcdgb) + dxpart * here->BSIM3v0gtg + gbdpg)); (*(here->BSIM3v0DPbPtr) -= m * ((here->BSIM3v0gbd - Gmbs + gcdgb + gcddb + gcdsb - dxpart * here->BSIM3v0gtb) - gbdpb)); (*(here->BSIM3v0DPspPtr) -= m * ((here->BSIM3v0gds + FwdSum - gcdsb - 0.5 * here->BSIM3v0gts) - gbdpsp)); (*(here->BSIM3v0SPgPtr) += m * (gcsgb - Gm + sxpart * here->BSIM3v0gtg + gbspg)); (*(here->BSIM3v0SPsPtr) -= m * here->BSIM3v0sourceConductance); (*(here->BSIM3v0SPbPtr) -= m * ((here->BSIM3v0gbs + Gmbs + gcsgb + gcsdb + gcssb - sxpart * here->BSIM3v0gtg) - gbspb)); (*(here->BSIM3v0SPdpPtr) -= m * ((here->BSIM3v0gds + RevSum - gcsdb - sxpart * here->BSIM3v0gtd - here->BSIM3v0gbd) - gbspdp)); *(here->BSIM3v0QqPtr) += m * (gqdef + here->BSIM3v0gtau); *(here->BSIM3v0DPqPtr) += m * (dxpart * here->BSIM3v0gtau); *(here->BSIM3v0SPqPtr) += m * (sxpart * here->BSIM3v0gtau); *(here->BSIM3v0GqPtr) -= m * here->BSIM3v0gtau; *(here->BSIM3v0QgPtr) += m * (-gcqgb + here->BSIM3v0gtg); *(here->BSIM3v0QdpPtr) += m * (-gcqdb + here->BSIM3v0gtd); *(here->BSIM3v0QspPtr) += m * (-gcqsb + here->BSIM3v0gts); *(here->BSIM3v0QbPtr) += m * (-gcqbb + here->BSIM3v0gtb); line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0getic.c0000644000265600020320000000215112264261473021450 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0getic.c **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0getic(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; for (; model ; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here; here = here->BSIM3v0nextInstance) { if(!here->BSIM3v0icVBSGiven) { here->BSIM3v0icVBS = *(ckt->CKTrhs + here->BSIM3v0bNode) - *(ckt->CKTrhs + here->BSIM3v0sNode); } if (!here->BSIM3v0icVDSGiven) { here->BSIM3v0icVDS = *(ckt->CKTrhs + here->BSIM3v0dNode) - *(ckt->CKTrhs + here->BSIM3v0sNode); } if (!here->BSIM3v0icVGSGiven) { here->BSIM3v0icVGS = *(ckt->CKTrhs + here->BSIM3v0gNode) - *(ckt->CKTrhs + here->BSIM3v0sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/b3v0temp.c0000644000265600020320000006223512264261473021333 0ustar andreasadmin/*********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3temp.c **********/ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int BSIM3v0temp(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model = (BSIM3v0model*) inModel; BSIM3v0instance *here; struct bsim3v0SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam = NULL; double tmp1, tmp2, Eg, ni, T0, T1, T2, T3, Ldrn, Wdrn; double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; int Size_Not_Found; /* loop through all the BSIM3v0 device models */ for (; model != NULL; model = model->BSIM3v0nextModel) { Temp = ckt->CKTtemp; if (model->BSIM3v0bulkJctPotential < 0.1) model->BSIM3v0bulkJctPotential = 0.1; if (model->BSIM3v0sidewallJctPotential < 0.1) model->BSIM3v0sidewallJctPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM3v0tnom; TRatio = Temp / Tnom; /* loop through all the instances of the model */ for (here = model->BSIM3v0instances; here != NULL; here=here->BSIM3v0nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM3v0l == pSizeDependParamKnot->Length) && (here->BSIM3v0w == pSizeDependParamKnot->Width)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct bsim3v0SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->BSIM3v0l; Wdrn = here->BSIM3v0w; T0 = pow(Ldrn, model->BSIM3v0Lln); T1 = pow(Wdrn, model->BSIM3v0Lwn); tmp1 = model->BSIM3v0Ll / T0 + model->BSIM3v0Lw / T1 + model->BSIM3v0Lwl / (T0 * T1); pParam->BSIM3v0dl = model->BSIM3v0Lint + tmp1; pParam->BSIM3v0dlc = model->BSIM3v0dlc + tmp1; T2 = pow(Ldrn, model->BSIM3v0Wln); T3 = pow(Wdrn, model->BSIM3v0Wwn); tmp2 = model->BSIM3v0Wl / T2 + model->BSIM3v0Ww / T3 + model->BSIM3v0Wwl / (T2 * T3); pParam->BSIM3v0dw = model->BSIM3v0Wint + tmp2; pParam->BSIM3v0dwc = model->BSIM3v0dwc + tmp2; pParam->BSIM3v0leff = here->BSIM3v0l - 2.0 * pParam->BSIM3v0dl; if (pParam->BSIM3v0leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v0modName; namarray[1] = here->BSIM3v0name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v0: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v0weff = here->BSIM3v0w - 2.0 * pParam->BSIM3v0dw; if (pParam->BSIM3v0weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v0modName; namarray[1] = here->BSIM3v0name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v0: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v0leffCV = here->BSIM3v0l - 2.0 * pParam->BSIM3v0dlc; if (pParam->BSIM3v0leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v0modName; namarray[1] = here->BSIM3v0name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v0: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM3v0weffCV = here->BSIM3v0w - 2.0 * pParam->BSIM3v0dwc; if (pParam->BSIM3v0weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM3v0modName; namarray[1] = here->BSIM3v0name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM3v0: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } model->BSIM3v0vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM3v0factor1 = sqrt(EPSSI / EPSOX * model->BSIM3v0tox); if (model->BSIM3v0binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM3v0leff; Inv_W = 1.0e-6 / pParam->BSIM3v0weff; Inv_LW = 1.0e-12 / (pParam->BSIM3v0leff * pParam->BSIM3v0weff); } else { Inv_L = 1.0 / pParam->BSIM3v0leff; Inv_W = 1.0 / pParam->BSIM3v0weff; Inv_LW = 1.0 / (pParam->BSIM3v0leff * pParam->BSIM3v0weff); } pParam->BSIM3v0cdsc = model->BSIM3v0cdsc + model->BSIM3v0lcdsc * Inv_L + model->BSIM3v0wcdsc * Inv_W + model->BSIM3v0pcdsc * Inv_LW; pParam->BSIM3v0cdscb = model->BSIM3v0cdscb + model->BSIM3v0lcdscb * Inv_L + model->BSIM3v0wcdscb * Inv_W + model->BSIM3v0pcdscb * Inv_LW; pParam->BSIM3v0cdscd = model->BSIM3v0cdscd + model->BSIM3v0lcdscd * Inv_L + model->BSIM3v0wcdscd * Inv_W + model->BSIM3v0pcdscd * Inv_LW; pParam->BSIM3v0cit = model->BSIM3v0cit + model->BSIM3v0lcit * Inv_L + model->BSIM3v0wcit * Inv_W + model->BSIM3v0pcit * Inv_LW; pParam->BSIM3v0nfactor = model->BSIM3v0nfactor + model->BSIM3v0lnfactor * Inv_L + model->BSIM3v0wnfactor * Inv_W + model->BSIM3v0pnfactor * Inv_LW; pParam->BSIM3v0xj = model->BSIM3v0xj + model->BSIM3v0lxj * Inv_L + model->BSIM3v0wxj * Inv_W + model->BSIM3v0pxj * Inv_LW; pParam->BSIM3v0vsat = model->BSIM3v0vsat + model->BSIM3v0lvsat * Inv_L + model->BSIM3v0wvsat * Inv_W + model->BSIM3v0pvsat * Inv_LW; pParam->BSIM3v0at = model->BSIM3v0at + model->BSIM3v0lat * Inv_L + model->BSIM3v0wat * Inv_W + model->BSIM3v0pat * Inv_LW; pParam->BSIM3v0a0 = model->BSIM3v0a0 + model->BSIM3v0la0 * Inv_L + model->BSIM3v0wa0 * Inv_W + model->BSIM3v0pa0 * Inv_LW; pParam->BSIM3v0ags = model->BSIM3v0ags + model->BSIM3v0lags * Inv_L + model->BSIM3v0wags * Inv_W + model->BSIM3v0pags * Inv_LW; pParam->BSIM3v0a1 = model->BSIM3v0a1 + model->BSIM3v0la1 * Inv_L + model->BSIM3v0wa1 * Inv_W + model->BSIM3v0pa1 * Inv_LW; pParam->BSIM3v0a2 = model->BSIM3v0a2 + model->BSIM3v0la2 * Inv_L + model->BSIM3v0wa2 * Inv_W + model->BSIM3v0pa2 * Inv_LW; pParam->BSIM3v0keta = model->BSIM3v0keta + model->BSIM3v0lketa * Inv_L + model->BSIM3v0wketa * Inv_W + model->BSIM3v0pketa * Inv_LW; pParam->BSIM3v0nsub = model->BSIM3v0nsub + model->BSIM3v0lnsub * Inv_L + model->BSIM3v0wnsub * Inv_W + model->BSIM3v0pnsub * Inv_LW; pParam->BSIM3v0npeak = model->BSIM3v0npeak + model->BSIM3v0lnpeak * Inv_L + model->BSIM3v0wnpeak * Inv_W + model->BSIM3v0pnpeak * Inv_LW; pParam->BSIM3v0ngate = model->BSIM3v0ngate + model->BSIM3v0lngate * Inv_L + model->BSIM3v0wngate * Inv_W + model->BSIM3v0pngate * Inv_LW; pParam->BSIM3v0gamma1 = model->BSIM3v0gamma1 + model->BSIM3v0lgamma1 * Inv_L + model->BSIM3v0wgamma1 * Inv_W + model->BSIM3v0pgamma1 * Inv_LW; pParam->BSIM3v0gamma2 = model->BSIM3v0gamma2 + model->BSIM3v0lgamma2 * Inv_L + model->BSIM3v0wgamma2 * Inv_W + model->BSIM3v0pgamma2 * Inv_LW; pParam->BSIM3v0vbx = model->BSIM3v0vbx + model->BSIM3v0lvbx * Inv_L + model->BSIM3v0wvbx * Inv_W + model->BSIM3v0pvbx * Inv_LW; pParam->BSIM3v0vbm = model->BSIM3v0vbm + model->BSIM3v0lvbm * Inv_L + model->BSIM3v0wvbm * Inv_W + model->BSIM3v0pvbm * Inv_LW; pParam->BSIM3v0xt = model->BSIM3v0xt + model->BSIM3v0lxt * Inv_L + model->BSIM3v0wxt * Inv_W + model->BSIM3v0pxt * Inv_LW; pParam->BSIM3v0k1 = model->BSIM3v0k1 + model->BSIM3v0lk1 * Inv_L + model->BSIM3v0wk1 * Inv_W + model->BSIM3v0pk1 * Inv_LW; pParam->BSIM3v0kt1 = model->BSIM3v0kt1 + model->BSIM3v0lkt1 * Inv_L + model->BSIM3v0wkt1 * Inv_W + model->BSIM3v0pkt1 * Inv_LW; pParam->BSIM3v0kt1l = model->BSIM3v0kt1l + model->BSIM3v0lkt1l * Inv_L + model->BSIM3v0wkt1l * Inv_W + model->BSIM3v0pkt1l * Inv_LW; pParam->BSIM3v0k2 = model->BSIM3v0k2 + model->BSIM3v0lk2 * Inv_L + model->BSIM3v0wk2 * Inv_W + model->BSIM3v0pk2 * Inv_LW; pParam->BSIM3v0kt2 = model->BSIM3v0kt2 + model->BSIM3v0lkt2 * Inv_L + model->BSIM3v0wkt2 * Inv_W + model->BSIM3v0pkt2 * Inv_LW; pParam->BSIM3v0k3 = model->BSIM3v0k3 + model->BSIM3v0lk3 * Inv_L + model->BSIM3v0wk3 * Inv_W + model->BSIM3v0pk3 * Inv_LW; pParam->BSIM3v0k3b = model->BSIM3v0k3b + model->BSIM3v0lk3b * Inv_L + model->BSIM3v0wk3b * Inv_W + model->BSIM3v0pk3b * Inv_LW; pParam->BSIM3v0w0 = model->BSIM3v0w0 + model->BSIM3v0lw0 * Inv_L + model->BSIM3v0ww0 * Inv_W + model->BSIM3v0pw0 * Inv_LW; pParam->BSIM3v0nlx = model->BSIM3v0nlx + model->BSIM3v0lnlx * Inv_L + model->BSIM3v0wnlx * Inv_W + model->BSIM3v0pnlx * Inv_LW; pParam->BSIM3v0dvt0 = model->BSIM3v0dvt0 + model->BSIM3v0ldvt0 * Inv_L + model->BSIM3v0wdvt0 * Inv_W + model->BSIM3v0pdvt0 * Inv_LW; pParam->BSIM3v0dvt1 = model->BSIM3v0dvt1 + model->BSIM3v0ldvt1 * Inv_L + model->BSIM3v0wdvt1 * Inv_W + model->BSIM3v0pdvt1 * Inv_LW; pParam->BSIM3v0dvt2 = model->BSIM3v0dvt2 + model->BSIM3v0ldvt2 * Inv_L + model->BSIM3v0wdvt2 * Inv_W + model->BSIM3v0pdvt2 * Inv_LW; pParam->BSIM3v0dvt0w = model->BSIM3v0dvt0w + model->BSIM3v0ldvt0w * Inv_L + model->BSIM3v0wdvt0w * Inv_W + model->BSIM3v0pdvt0w * Inv_LW; pParam->BSIM3v0dvt1w = model->BSIM3v0dvt1w + model->BSIM3v0ldvt1w * Inv_L + model->BSIM3v0wdvt1w * Inv_W + model->BSIM3v0pdvt1w * Inv_LW; pParam->BSIM3v0dvt2w = model->BSIM3v0dvt2w + model->BSIM3v0ldvt2w * Inv_L + model->BSIM3v0wdvt2w * Inv_W + model->BSIM3v0pdvt2w * Inv_LW; pParam->BSIM3v0drout = model->BSIM3v0drout + model->BSIM3v0ldrout * Inv_L + model->BSIM3v0wdrout * Inv_W + model->BSIM3v0pdrout * Inv_LW; pParam->BSIM3v0dsub = model->BSIM3v0dsub + model->BSIM3v0ldsub * Inv_L + model->BSIM3v0wdsub * Inv_W + model->BSIM3v0pdsub * Inv_LW; pParam->BSIM3v0vth0 = model->BSIM3v0vth0 + model->BSIM3v0lvth0 * Inv_L + model->BSIM3v0wvth0 * Inv_W + model->BSIM3v0pvth0 * Inv_LW; pParam->BSIM3v0ua = model->BSIM3v0ua + model->BSIM3v0lua * Inv_L + model->BSIM3v0wua * Inv_W + model->BSIM3v0pua * Inv_LW; pParam->BSIM3v0ua1 = model->BSIM3v0ua1 + model->BSIM3v0lua1 * Inv_L + model->BSIM3v0wua1 * Inv_W + model->BSIM3v0pua1 * Inv_LW; pParam->BSIM3v0ub = model->BSIM3v0ub + model->BSIM3v0lub * Inv_L + model->BSIM3v0wub * Inv_W + model->BSIM3v0pub * Inv_LW; pParam->BSIM3v0ub1 = model->BSIM3v0ub1 + model->BSIM3v0lub1 * Inv_L + model->BSIM3v0wub1 * Inv_W + model->BSIM3v0pub1 * Inv_LW; pParam->BSIM3v0uc = model->BSIM3v0uc + model->BSIM3v0luc * Inv_L + model->BSIM3v0wuc * Inv_W + model->BSIM3v0puc * Inv_LW; pParam->BSIM3v0uc1 = model->BSIM3v0uc1 + model->BSIM3v0luc1 * Inv_L + model->BSIM3v0wuc1 * Inv_W + model->BSIM3v0puc1 * Inv_LW; pParam->BSIM3v0u0 = model->BSIM3v0u0 + model->BSIM3v0lu0 * Inv_L + model->BSIM3v0wu0 * Inv_W + model->BSIM3v0pu0 * Inv_LW; pParam->BSIM3v0ute = model->BSIM3v0ute + model->BSIM3v0lute * Inv_L + model->BSIM3v0wute * Inv_W + model->BSIM3v0pute * Inv_LW; pParam->BSIM3v0voff = model->BSIM3v0voff + model->BSIM3v0lvoff * Inv_L + model->BSIM3v0wvoff * Inv_W + model->BSIM3v0pvoff * Inv_LW; pParam->BSIM3v0delta = model->BSIM3v0delta + model->BSIM3v0ldelta * Inv_L + model->BSIM3v0wdelta * Inv_W + model->BSIM3v0pdelta * Inv_LW; pParam->BSIM3v0rdsw = model->BSIM3v0rdsw + model->BSIM3v0lrdsw * Inv_L + model->BSIM3v0wrdsw * Inv_W + model->BSIM3v0prdsw * Inv_LW; pParam->BSIM3v0prwg = model->BSIM3v0prwg + model->BSIM3v0lprwg * Inv_L + model->BSIM3v0wprwg * Inv_W + model->BSIM3v0pprwg * Inv_LW; pParam->BSIM3v0prwb = model->BSIM3v0prwb + model->BSIM3v0lprwb * Inv_L + model->BSIM3v0wprwb * Inv_W + model->BSIM3v0pprwb * Inv_LW; pParam->BSIM3v0prt = model->BSIM3v0prt + model->BSIM3v0lprt * Inv_L + model->BSIM3v0wprt * Inv_W + model->BSIM3v0pprt * Inv_LW; pParam->BSIM3v0eta0 = model->BSIM3v0eta0 + model->BSIM3v0leta0 * Inv_L + model->BSIM3v0weta0 * Inv_W + model->BSIM3v0peta0 * Inv_LW; pParam->BSIM3v0etab = model->BSIM3v0etab + model->BSIM3v0letab * Inv_L + model->BSIM3v0wetab * Inv_W + model->BSIM3v0petab * Inv_LW; pParam->BSIM3v0pclm = model->BSIM3v0pclm + model->BSIM3v0lpclm * Inv_L + model->BSIM3v0wpclm * Inv_W + model->BSIM3v0ppclm * Inv_LW; pParam->BSIM3v0pdibl1 = model->BSIM3v0pdibl1 + model->BSIM3v0lpdibl1 * Inv_L + model->BSIM3v0wpdibl1 * Inv_W + model->BSIM3v0ppdibl1 * Inv_LW; pParam->BSIM3v0pdibl2 = model->BSIM3v0pdibl2 + model->BSIM3v0lpdibl2 * Inv_L + model->BSIM3v0wpdibl2 * Inv_W + model->BSIM3v0ppdibl2 * Inv_LW; pParam->BSIM3v0pdiblb = model->BSIM3v0pdiblb + model->BSIM3v0lpdiblb * Inv_L + model->BSIM3v0wpdiblb * Inv_W + model->BSIM3v0ppdiblb * Inv_LW; pParam->BSIM3v0pscbe1 = model->BSIM3v0pscbe1 + model->BSIM3v0lpscbe1 * Inv_L + model->BSIM3v0wpscbe1 * Inv_W + model->BSIM3v0ppscbe1 * Inv_LW; pParam->BSIM3v0pscbe2 = model->BSIM3v0pscbe2 + model->BSIM3v0lpscbe2 * Inv_L + model->BSIM3v0wpscbe2 * Inv_W + model->BSIM3v0ppscbe2 * Inv_LW; pParam->BSIM3v0pvag = model->BSIM3v0pvag + model->BSIM3v0lpvag * Inv_L + model->BSIM3v0wpvag * Inv_W + model->BSIM3v0ppvag * Inv_LW; pParam->BSIM3v0wr = model->BSIM3v0wr + model->BSIM3v0lwr * Inv_L + model->BSIM3v0wwr * Inv_W + model->BSIM3v0pwr * Inv_LW; pParam->BSIM3v0dwg = model->BSIM3v0dwg + model->BSIM3v0ldwg * Inv_L + model->BSIM3v0wdwg * Inv_W + model->BSIM3v0pdwg * Inv_LW; pParam->BSIM3v0dwb = model->BSIM3v0dwb + model->BSIM3v0ldwb * Inv_L + model->BSIM3v0wdwb * Inv_W + model->BSIM3v0pdwb * Inv_LW; pParam->BSIM3v0b0 = model->BSIM3v0b0 + model->BSIM3v0lb0 * Inv_L + model->BSIM3v0wb0 * Inv_W + model->BSIM3v0pb0 * Inv_LW; pParam->BSIM3v0b1 = model->BSIM3v0b1 + model->BSIM3v0lb1 * Inv_L + model->BSIM3v0wb1 * Inv_W + model->BSIM3v0pb1 * Inv_LW; pParam->BSIM3v0alpha0 = model->BSIM3v0alpha0 + model->BSIM3v0lalpha0 * Inv_L + model->BSIM3v0walpha0 * Inv_W + model->BSIM3v0palpha0 * Inv_LW; pParam->BSIM3v0beta0 = model->BSIM3v0beta0 + model->BSIM3v0lbeta0 * Inv_L + model->BSIM3v0wbeta0 * Inv_W + model->BSIM3v0pbeta0 * Inv_LW; /* CV model */ pParam->BSIM3v0elm = model->BSIM3v0elm + model->BSIM3v0lelm * Inv_L + model->BSIM3v0welm * Inv_W + model->BSIM3v0pelm * Inv_LW; pParam->BSIM3v0cgsl = model->BSIM3v0cgsl + model->BSIM3v0lcgsl * Inv_L + model->BSIM3v0wcgsl * Inv_W + model->BSIM3v0pcgsl * Inv_LW; pParam->BSIM3v0cgdl = model->BSIM3v0cgdl + model->BSIM3v0lcgdl * Inv_L + model->BSIM3v0wcgdl * Inv_W + model->BSIM3v0pcgdl * Inv_LW; pParam->BSIM3v0ckappa = model->BSIM3v0ckappa + model->BSIM3v0lckappa * Inv_L + model->BSIM3v0wckappa * Inv_W + model->BSIM3v0pckappa * Inv_LW; pParam->BSIM3v0cf = model->BSIM3v0cf + model->BSIM3v0lcf * Inv_L + model->BSIM3v0wcf * Inv_W + model->BSIM3v0pcf * Inv_LW; pParam->BSIM3v0clc = model->BSIM3v0clc + model->BSIM3v0lclc * Inv_L + model->BSIM3v0wclc * Inv_W + model->BSIM3v0pclc * Inv_LW; pParam->BSIM3v0cle = model->BSIM3v0cle + model->BSIM3v0lcle * Inv_L + model->BSIM3v0wcle * Inv_W + model->BSIM3v0pcle * Inv_LW; pParam->BSIM3v0abulkCVfactor = 1.0 + pow((pParam->BSIM3v0clc / pParam->BSIM3v0leff), pParam->BSIM3v0cle); pParam->BSIM3v0cgdo = (model->BSIM3v0cgdo + pParam->BSIM3v0cf) * pParam->BSIM3v0weffCV; pParam->BSIM3v0cgso = (model->BSIM3v0cgso + pParam->BSIM3v0cf) * pParam->BSIM3v0weffCV; pParam->BSIM3v0cgbo = model->BSIM3v0cgbo * pParam->BSIM3v0leffCV; T0 = (TRatio - 1.0); pParam->BSIM3v0ua = pParam->BSIM3v0ua + pParam->BSIM3v0ua1 * T0; pParam->BSIM3v0ub = pParam->BSIM3v0ub + pParam->BSIM3v0ub1 * T0; pParam->BSIM3v0uc = pParam->BSIM3v0uc + pParam->BSIM3v0uc1 * T0; pParam->BSIM3v0u0temp = pParam->BSIM3v0u0 * pow(TRatio, pParam->BSIM3v0ute); pParam->BSIM3v0vsattemp = pParam->BSIM3v0vsat - pParam->BSIM3v0at * T0; pParam->BSIM3v0rds0 = (pParam->BSIM3v0rdsw + pParam->BSIM3v0prt * T0) / pow(pParam->BSIM3v0weff * 1E6, pParam->BSIM3v0wr); if (!model->BSIM3v0npeakGiven && model->BSIM3v0gamma1Given) { T0 = pParam->BSIM3v0gamma1 * model->BSIM3v0cox; pParam->BSIM3v0npeak = 3.021E22 * T0 * T0; } Vtm0 = KboQ * Tnom; Eg = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg / (2.0 * Vtm0)); pParam->BSIM3v0phi = 2.0 * Vtm0 * log(pParam->BSIM3v0npeak / ni); pParam->BSIM3v0sqrtPhi = sqrt(pParam->BSIM3v0phi); pParam->BSIM3v0phis3 = pParam->BSIM3v0sqrtPhi * pParam->BSIM3v0phi; pParam->BSIM3v0Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM3v0npeak * 1.0e6)) * pParam->BSIM3v0sqrtPhi; pParam->BSIM3v0sqrtXdep0 = sqrt(pParam->BSIM3v0Xdep0); pParam->BSIM3v0litl = sqrt(3.0 * pParam->BSIM3v0xj * model->BSIM3v0tox); pParam->BSIM3v0vbi = Vtm0 * log(1.0e20 * pParam->BSIM3v0npeak / (ni * ni)); pParam->BSIM3v0cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM3v0npeak * 1.0e6 / 2.0 / pParam->BSIM3v0phi); if (model->BSIM3v0k1Given || model->BSIM3v0k2Given) { if (!model->BSIM3v0k1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM3v0k1 = 0.53; } if (!model->BSIM3v0k2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM3v0k2 = -0.0186; } if (model->BSIM3v0nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM3v0xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM3v0vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM3v0vbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->BSIM3v0gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM3v0gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->BSIM3v0vbxGiven) pParam->BSIM3v0vbx = pParam->BSIM3v0phi - 7.7348e-4 * pParam->BSIM3v0npeak * pParam->BSIM3v0xt * pParam->BSIM3v0xt; if (pParam->BSIM3v0vbx > 0.0) pParam->BSIM3v0vbx = -pParam->BSIM3v0vbx; if (pParam->BSIM3v0vbm > 0.0) pParam->BSIM3v0vbm = -pParam->BSIM3v0vbm; if (!model->BSIM3v0gamma1Given) pParam->BSIM3v0gamma1 = 5.753e-12 * sqrt(pParam->BSIM3v0npeak) / model->BSIM3v0cox; if (!model->BSIM3v0gamma2Given) pParam->BSIM3v0gamma2 = 5.753e-12 * sqrt(pParam->BSIM3v0nsub) / model->BSIM3v0cox; T0 = pParam->BSIM3v0gamma1 - pParam->BSIM3v0gamma2; T1 = sqrt(pParam->BSIM3v0phi - pParam->BSIM3v0vbx) - pParam->BSIM3v0sqrtPhi; T2 = sqrt(pParam->BSIM3v0phi * (pParam->BSIM3v0phi - pParam->BSIM3v0vbm)) - pParam->BSIM3v0phi; pParam->BSIM3v0k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM3v0vbm); pParam->BSIM3v0k1 = pParam->BSIM3v0gamma2 - 2.0 * pParam->BSIM3v0k2 * sqrt(pParam->BSIM3v0phi - pParam->BSIM3v0vbm); } if (pParam->BSIM3v0k2 > 0.0) { T0 = 0.5 * pParam->BSIM3v0k1 / pParam->BSIM3v0k2; pParam->BSIM3v0vbsc = 0.9 * (pParam->BSIM3v0phi - T0 * T0); if (pParam->BSIM3v0vbsc > -3.0) pParam->BSIM3v0vbsc = -3.0; else if (pParam->BSIM3v0vbsc < -30.0) pParam->BSIM3v0vbsc = -30.0; } else { pParam->BSIM3v0vbsc = -10.0; } model->BSIM3v0vtm = KboQ * Temp; if (model->BSIM3v0vth0Given) pParam->BSIM3v0vfb = model->BSIM3v0type * pParam->BSIM3v0vth0 - pParam->BSIM3v0phi - pParam->BSIM3v0k1 * pParam->BSIM3v0sqrtPhi; else pParam->BSIM3v0vth0 = model->BSIM3v0type * (-1.0 + pParam->BSIM3v0phi + pParam->BSIM3v0k1 * pParam->BSIM3v0sqrtPhi); T1 = sqrt(EPSSI / EPSOX * model->BSIM3v0tox * pParam->BSIM3v0Xdep0); T0 = exp(-0.5 * pParam->BSIM3v0dsub * pParam->BSIM3v0leff / T1); pParam->BSIM3v0theta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->BSIM3v0drout * pParam->BSIM3v0leff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->BSIM3v0thetaRout = pParam->BSIM3v0pdibl1 * T2 + pParam->BSIM3v0pdibl2; /* process source/drain series resistance */ here->BSIM3v0drainConductance = model->BSIM3v0sheetResistance * here->BSIM3v0drainSquares; if (here->BSIM3v0drainConductance > 0.0) here->BSIM3v0drainConductance = 1.0 / here->BSIM3v0drainConductance; else here->BSIM3v0drainConductance = 0.0; here->BSIM3v0sourceConductance = model->BSIM3v0sheetResistance * here->BSIM3v0sourceSquares; if (here->BSIM3v0sourceConductance > 0.0) here->BSIM3v0sourceConductance = 1.0 / here->BSIM3v0sourceConductance; else here->BSIM3v0sourceConductance = 0.0; } here->BSIM3v0cgso = pParam->BSIM3v0cgso; here->BSIM3v0cgdo = pParam->BSIM3v0cgdo; } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/bsim3v0itf.h0000644000265600020320000000037412264261473021662 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1991 JianHui Huang and Min-Chie Jeng. File: bsim3v0itf.h **********/ #ifndef DEV_bsim3v0 #define DEV_bsim3v0 SPICEdev *get_bsim3v0_info(void); #endif ngspice-26/src/spicelib/devices/bsim3v0/Makefile.am0000644000265600020320000000104612264261473021554 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3v0.la libbsim3v0_la_SOURCES = \ b3v0.c \ b3v0acld.c \ b3v0ask.c \ b3v0cvtest.c \ b3v0del.c \ b3v0dest.c \ b3v0getic.c \ b3v0ld.c \ b3v0mask.c \ b3v0mdel.c \ b3v0mpar.c \ b3v0noi.c \ b3v0par.c \ b3v0pzld.c \ b3v0set.c \ b3v0temp.c \ b3v0trunc.c \ bsim3v0def.h \ bsim3v0ext.h \ bsim3v0init.c \ bsim3v0init.h \ bsim3v0itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/bsim3v0/b3v0pzld.c0000644000265600020320000001374112264261473021335 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3pzld.c **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim3v0def.h" #include "ngspice/suffix.h" int BSIM3v0pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->BSIM3v0nextModel) { for (here = model->BSIM3v0instances; here!= NULL; here = here->BSIM3v0nextInstance) { if (here->BSIM3v0mode >= 0) { Gm = here->BSIM3v0gm; Gmbs = here->BSIM3v0gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->BSIM3v0cggb; cgsb = here->BSIM3v0cgsb; cgdb = here->BSIM3v0cgdb; cbgb = here->BSIM3v0cbgb; cbsb = here->BSIM3v0cbsb; cbdb = here->BSIM3v0cbdb; cdgb = here->BSIM3v0cdgb; cdsb = here->BSIM3v0cdsb; cddb = here->BSIM3v0cddb; } else { Gm = -here->BSIM3v0gm; Gmbs = -here->BSIM3v0gmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->BSIM3v0cggb; cgsb = here->BSIM3v0cgdb; cgdb = here->BSIM3v0cgsb; cbgb = here->BSIM3v0cbgb; cbsb = here->BSIM3v0cbdb; cbdb = here->BSIM3v0cbsb; cdgb = -(here->BSIM3v0cdgb + cggb + cbgb); cdsb = -(here->BSIM3v0cddb + cgsb + cbsb); cddb = -(here->BSIM3v0cdsb + cgdb + cbdb); } gdpr=here->BSIM3v0drainConductance; gspr=here->BSIM3v0sourceConductance; gds= here->BSIM3v0gds; gbd= here->BSIM3v0gbd; gbs= here->BSIM3v0gbs; capbd= here->BSIM3v0capbd; capbs= here->BSIM3v0capbs; GSoverlapCap = here->BSIM3v0cgso; GDoverlapCap = here->BSIM3v0cgdo; GBoverlapCap = here->pParam->BSIM3v0cgbo; xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->BSIM3v0m; *(here->BSIM3v0GgPtr ) += m * (xcggb * s->real); *(here->BSIM3v0GgPtr +1) += m * (xcggb * s->imag); *(here->BSIM3v0BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->BSIM3v0BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->BSIM3v0DPdpPtr ) += m * (xcddb * s->real); *(here->BSIM3v0DPdpPtr +1) += m * (xcddb * s->imag); *(here->BSIM3v0SPspPtr ) += m * (xcssb * s->real); *(here->BSIM3v0SPspPtr +1) += m * (xcssb * s->imag); *(here->BSIM3v0GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->BSIM3v0GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->BSIM3v0GdpPtr ) += m * (xcgdb * s->real); *(here->BSIM3v0GdpPtr +1) += m * (xcgdb * s->imag); *(here->BSIM3v0GspPtr ) += m * (xcgsb * s->real); *(here->BSIM3v0GspPtr +1) += m * (xcgsb * s->imag); *(here->BSIM3v0BgPtr ) += m * (xcbgb * s->real); *(here->BSIM3v0BgPtr +1) += m * (xcbgb * s->imag); *(here->BSIM3v0BdpPtr ) += m * (xcbdb * s->real); *(here->BSIM3v0BdpPtr +1) += m * (xcbdb * s->imag); *(here->BSIM3v0BspPtr ) += m * (xcbsb * s->real); *(here->BSIM3v0BspPtr +1) += m * (xcbsb * s->imag); *(here->BSIM3v0DPgPtr ) += m * (xcdgb * s->real); *(here->BSIM3v0DPgPtr +1) += m * (xcdgb * s->imag); *(here->BSIM3v0DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->BSIM3v0DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->BSIM3v0DPspPtr ) += m * (xcdsb * s->real); *(here->BSIM3v0DPspPtr +1) += m * (xcdsb * s->imag); *(here->BSIM3v0SPgPtr ) += m * (xcsgb * s->real); *(here->BSIM3v0SPgPtr +1) += m * (xcsgb * s->imag); *(here->BSIM3v0SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->BSIM3v0SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->BSIM3v0SPdpPtr ) += m * (xcsdb * s->real); *(here->BSIM3v0SPdpPtr +1) += m * (xcsdb * s->imag); *(here->BSIM3v0DdPtr) += m * gdpr; *(here->BSIM3v0SsPtr) += m * gspr; *(here->BSIM3v0BbPtr) += m * (gbd + gbs); *(here->BSIM3v0DPdpPtr) += m * (gdpr + gds + gbd + RevSum); *(here->BSIM3v0SPspPtr) += m * (gspr + gds + gbs + FwdSum); *(here->BSIM3v0DdpPtr) -= m * gdpr; *(here->BSIM3v0SspPtr) -= m * gspr; *(here->BSIM3v0BdpPtr) -= m * gbd; *(here->BSIM3v0BspPtr) -= m * gbs; *(here->BSIM3v0DPdPtr) -= m * gdpr; *(here->BSIM3v0DPgPtr) += m * Gm; *(here->BSIM3v0DPbPtr) -= m * (gbd - Gmbs); *(here->BSIM3v0DPspPtr) -= m * (gds + FwdSum); *(here->BSIM3v0SPgPtr) -= m * Gm; *(here->BSIM3v0SPsPtr) -= m * gspr; *(here->BSIM3v0SPbPtr) -= m * (gbs + Gmbs); *(here->BSIM3v0SPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/Makefile.in0000644000265600020320000004320012264261536021563 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3v0 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3v0_la_LIBADD = am_libbsim3v0_la_OBJECTS = b3v0.lo b3v0acld.lo b3v0ask.lo \ b3v0cvtest.lo b3v0del.lo b3v0dest.lo b3v0getic.lo b3v0ld.lo \ b3v0mask.lo b3v0mdel.lo b3v0mpar.lo b3v0noi.lo b3v0par.lo \ b3v0pzld.lo b3v0set.lo b3v0temp.lo b3v0trunc.lo bsim3v0init.lo libbsim3v0_la_OBJECTS = $(am_libbsim3v0_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3v0_la_SOURCES) DIST_SOURCES = $(libbsim3v0_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3v0.la libbsim3v0_la_SOURCES = \ b3v0.c \ b3v0acld.c \ b3v0ask.c \ b3v0cvtest.c \ b3v0del.c \ b3v0dest.c \ b3v0getic.c \ b3v0ld.c \ b3v0mask.c \ b3v0mdel.c \ b3v0mpar.c \ b3v0noi.c \ b3v0par.c \ b3v0pzld.c \ b3v0set.c \ b3v0temp.c \ b3v0trunc.c \ bsim3v0def.h \ bsim3v0ext.h \ bsim3v0init.c \ bsim3v0init.h \ bsim3v0itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v0/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3v0/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3v0.la: $(libbsim3v0_la_OBJECTS) $(libbsim3v0_la_DEPENDENCIES) $(EXTRA_libbsim3v0_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3v0_la_OBJECTS) $(libbsim3v0_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3v0trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim3v0init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3v0/b3v0del.c0000644000265600020320000000170112264261473021121 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0del.c **********/ /* */ #include "ngspice/ngspice.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM3v0delete(GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM3v0instance **fast = (BSIM3v0instance**)inInst; BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance **prev = NULL; BSIM3v0instance *here; for (; model ; model = model->BSIM3v0nextModel) { prev = &(model->BSIM3v0instances); for (here = *prev; here ; here = *prev) { if (here->BSIM3v0name == name || (fast && here==*fast)) { *prev= here->BSIM3v0nextInstance; FREE(here); return(OK); } prev = &(here->BSIM3v0nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3v0/bsim3v0init.h0000644000265600020320000000042612264261473022041 0ustar andreasadmin#ifndef _BSIM3v0INIT_H #define _BSIM3v0INIT_H extern IFparm BSIM3v0pTable[ ]; extern IFparm BSIM3v0mPTable[ ]; extern char *BSIM3v0names[ ]; extern int BSIM3v0pTSize; extern int BSIM3v0mPTSize; extern int BSIM3v0nSize; extern int BSIM3v0iSize; extern int BSIM3v0mSize; #endif ngspice-26/src/spicelib/devices/bsim3v0/b3v0cvtest.c0000644000265600020320000000572112264261473021673 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0cvtest.c **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim3v0def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM3v0convTest(GENmodel *inModel, CKTcircuit *ckt) { BSIM3v0model *model = (BSIM3v0model*)inModel; BSIM3v0instance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the BSIM3v0 device models */ for (; model != NULL; model = model->BSIM3v0nextModel) { /* loop through all the instances of the model */ for (here = model->BSIM3v0instances; here != NULL ; here=here->BSIM3v0nextInstance) { vbs = model->BSIM3v0type * (*(ckt->CKTrhsOld+here->BSIM3v0bNode) - *(ckt->CKTrhsOld+here->BSIM3v0sNodePrime)); vgs = model->BSIM3v0type * (*(ckt->CKTrhsOld+here->BSIM3v0gNode) - *(ckt->CKTrhsOld+here->BSIM3v0sNodePrime)); vds = model->BSIM3v0type * (*(ckt->CKTrhsOld+here->BSIM3v0dNodePrime) - *(ckt->CKTrhsOld+here->BSIM3v0sNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->BSIM3v0vgs) - *(ckt->CKTstate0 + here->BSIM3v0vds); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM3v0vbs); delvbd = vbd - *(ckt->CKTstate0 + here->BSIM3v0vbd); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM3v0vgs); delvds = vds - *(ckt->CKTstate0 + here->BSIM3v0vds); delvgd = vgd-vgdo; cd = here->BSIM3v0cd; if (here->BSIM3v0mode >= 0) { cdhat = cd - here->BSIM3v0gbd * delvbd + here->BSIM3v0gmbs * delvbs + here->BSIM3v0gm * delvgs + here->BSIM3v0gds * delvds; } else { cdhat = cd - (here->BSIM3v0gbd - here->BSIM3v0gmbs) * delvbd - here->BSIM3v0gm * delvgd + here->BSIM3v0gds * delvds; } /* * check convergence */ if ((here->BSIM3v0off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->BSIM3v0cbs; cbd = here->BSIM3v0cbd; cbhat = cbs + cbd + here->BSIM3v0gbd * delvbd + here->BSIM3v0gbs * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3v0/bsim3v0def.h0000644000265600020320000014106212264261473021636 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan File: bsim3v0def.h **********/ #ifndef BSIM3v0 #define BSIM3v0 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM3v0instance { struct sBSIM3v0model *BSIM3v0modPtr; struct sBSIM3v0instance *BSIM3v0nextInstance; IFuid BSIM3v0name; int BSIM3v0states; /* index into state table for this device */ int BSIM3v0dNode; int BSIM3v0gNode; int BSIM3v0sNode; int BSIM3v0bNode; int BSIM3v0dNodePrime; int BSIM3v0sNodePrime; int BSIM3v0qNode; /* MCJ */ /* MCJ */ double BSIM3v0ueff; double BSIM3v0thetavth; double BSIM3v0von; double BSIM3v0vdsat; double BSIM3v0cgdo; double BSIM3v0cgso; double BSIM3v0l; double BSIM3v0w; double BSIM3v0m; double BSIM3v0drainArea; double BSIM3v0sourceArea; double BSIM3v0drainSquares; double BSIM3v0sourceSquares; double BSIM3v0drainPerimeter; double BSIM3v0sourcePerimeter; double BSIM3v0sourceConductance; double BSIM3v0drainConductance; double BSIM3v0icVBS; double BSIM3v0icVDS; double BSIM3v0icVGS; int BSIM3v0off; int BSIM3v0mode; int BSIM3v0nqsMod; /* OP point */ double BSIM3v0qinv; double BSIM3v0cd; double BSIM3v0cbs; double BSIM3v0cbd; double BSIM3v0csub; double BSIM3v0gm; double BSIM3v0gds; double BSIM3v0gmbs; double BSIM3v0gbd; double BSIM3v0gbs; double BSIM3v0gbbs; double BSIM3v0gbgs; double BSIM3v0gbds; double BSIM3v0cggb; double BSIM3v0cgdb; double BSIM3v0cgsb; double BSIM3v0cbgb; double BSIM3v0cbdb; double BSIM3v0cbsb; double BSIM3v0cdgb; double BSIM3v0cddb; double BSIM3v0cdsb; double BSIM3v0capbd; double BSIM3v0capbs; double BSIM3v0cqgb; double BSIM3v0cqdb; double BSIM3v0cqsb; double BSIM3v0cqbb; double BSIM3v0gtau; double BSIM3v0gtg; double BSIM3v0gtd; double BSIM3v0gts; double BSIM3v0gtb; double BSIM3v0tconst; struct bsim3v0SizeDependParam *pParam; unsigned BSIM3v0lGiven :1; unsigned BSIM3v0wGiven :1; unsigned BSIM3v0mGiven :1; unsigned BSIM3v0drainAreaGiven :1; unsigned BSIM3v0sourceAreaGiven :1; unsigned BSIM3v0drainSquaresGiven :1; unsigned BSIM3v0sourceSquaresGiven :1; unsigned BSIM3v0drainPerimeterGiven :1; unsigned BSIM3v0sourcePerimeterGiven :1; unsigned BSIM3v0dNodePrimeSet :1; unsigned BSIM3v0sNodePrimeSet :1; unsigned BSIM3v0icVBSGiven :1; unsigned BSIM3v0icVDSGiven :1; unsigned BSIM3v0icVGSGiven :1; unsigned BSIM3v0nqsModGiven :1; double *BSIM3v0DdPtr; double *BSIM3v0GgPtr; double *BSIM3v0SsPtr; double *BSIM3v0BbPtr; double *BSIM3v0DPdpPtr; double *BSIM3v0SPspPtr; double *BSIM3v0DdpPtr; double *BSIM3v0GbPtr; double *BSIM3v0GdpPtr; double *BSIM3v0GspPtr; double *BSIM3v0SspPtr; double *BSIM3v0BdpPtr; double *BSIM3v0BspPtr; double *BSIM3v0DPspPtr; double *BSIM3v0DPdPtr; double *BSIM3v0BgPtr; double *BSIM3v0DPgPtr; double *BSIM3v0SPgPtr; double *BSIM3v0SPsPtr; double *BSIM3v0DPbPtr; double *BSIM3v0SPbPtr; double *BSIM3v0SPdpPtr; double *BSIM3v0QqPtr; double *BSIM3v0QdpPtr; double *BSIM3v0QgPtr; double *BSIM3v0QspPtr; double *BSIM3v0QbPtr; double *BSIM3v0DPqPtr; double *BSIM3v0GqPtr; double *BSIM3v0SPqPtr; double *BSIM3v0BqPtr; #define BSIM3v0vbd BSIM3v0states+ 0 #define BSIM3v0vbs BSIM3v0states+ 1 #define BSIM3v0vgs BSIM3v0states+ 2 #define BSIM3v0vds BSIM3v0states+ 3 #define BSIM3v0qb BSIM3v0states+ 4 #define BSIM3v0cqb BSIM3v0states+ 5 #define BSIM3v0qg BSIM3v0states+ 6 #define BSIM3v0cqg BSIM3v0states+ 7 #define BSIM3v0qd BSIM3v0states+ 8 #define BSIM3v0cqd BSIM3v0states+ 9 #define BSIM3v0qbs BSIM3v0states+ 10 #define BSIM3v0qbd BSIM3v0states+ 11 #define BSIM3v0qcheq BSIM3v0states+ 12 #define BSIM3v0cqcheq BSIM3v0states+ 13 #define BSIM3v0qcdump BSIM3v0states+ 14 #define BSIM3v0cqcdump BSIM3v0states+ 15 #define BSIM3v0tau BSIM3v0states+ 16 #define BSIM3v0qdef BSIM3v0states+ 17 #define BSIM3v0numStates 18 /* indices to the array of BSIM3v0 NOISE SOURCES */ #define BSIM3v0RDNOIZ 0 #define BSIM3v0RSNOIZ 1 #define BSIM3v0IDNOIZ 2 #define BSIM3v0FLNOIZ 3 #define BSIM3v0TOTNOIZ 4 #define BSIM3v0NSRCS 5 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double BSIM3v0nVar[NSTATVARS][BSIM3v0NSRCS]; #else /* NONOISE */ double **BSIM3v0nVar; #endif /* NONOISE */ } BSIM3v0instance ; struct bsim3v0SizeDependParam { double Width; double Length; double BSIM3v0cdsc; double BSIM3v0cdscb; double BSIM3v0cdscd; double BSIM3v0cit; double BSIM3v0nfactor; double BSIM3v0xj; double BSIM3v0vsat; double BSIM3v0at; double BSIM3v0a0; double BSIM3v0ags; double BSIM3v0a1; double BSIM3v0a2; double BSIM3v0keta; double BSIM3v0nsub; double BSIM3v0npeak; double BSIM3v0ngate; double BSIM3v0gamma1; double BSIM3v0gamma2; double BSIM3v0vbx; double BSIM3v0vbi; double BSIM3v0vbm; double BSIM3v0vbsc; double BSIM3v0xt; double BSIM3v0phi; double BSIM3v0litl; double BSIM3v0k1; double BSIM3v0kt1; double BSIM3v0kt1l; double BSIM3v0kt2; double BSIM3v0k2; double BSIM3v0k3; double BSIM3v0k3b; double BSIM3v0w0; double BSIM3v0nlx; double BSIM3v0dvt0; double BSIM3v0dvt1; double BSIM3v0dvt2; double BSIM3v0dvt0w; double BSIM3v0dvt1w; double BSIM3v0dvt2w; double BSIM3v0drout; double BSIM3v0dsub; double BSIM3v0vth0; double BSIM3v0ua; double BSIM3v0ua1; double BSIM3v0ub; double BSIM3v0ub1; double BSIM3v0uc; double BSIM3v0uc1; double BSIM3v0u0; double BSIM3v0ute; double BSIM3v0voff; double BSIM3v0vfb; double BSIM3v0delta; double BSIM3v0rdsw; double BSIM3v0rds0; double BSIM3v0prwg; double BSIM3v0prwb; double BSIM3v0prt; double BSIM3v0eta0; double BSIM3v0etab; double BSIM3v0pclm; double BSIM3v0pdibl1; double BSIM3v0pdibl2; double BSIM3v0pdiblb; double BSIM3v0pscbe1; double BSIM3v0pscbe2; double BSIM3v0pvag; double BSIM3v0wr; double BSIM3v0dwg; double BSIM3v0dwb; double BSIM3v0b0; double BSIM3v0b1; double BSIM3v0alpha0; double BSIM3v0beta0; /* CV model */ double BSIM3v0elm; double BSIM3v0cgsl; double BSIM3v0cgdl; double BSIM3v0ckappa; double BSIM3v0cf; double BSIM3v0clc; double BSIM3v0cle; /* Pre-calculated constants */ double BSIM3v0dw; double BSIM3v0dl; double BSIM3v0leff; double BSIM3v0weff; double BSIM3v0dwc; double BSIM3v0dlc; double BSIM3v0leffCV; double BSIM3v0weffCV; double BSIM3v0abulkCVfactor; double BSIM3v0cgso; double BSIM3v0cgdo; double BSIM3v0cgbo; double BSIM3v0u0temp; double BSIM3v0vsattemp; double BSIM3v0sqrtPhi; double BSIM3v0phis3; double BSIM3v0Xdep0; double BSIM3v0sqrtXdep0; double BSIM3v0theta0vb0; double BSIM3v0thetaRout; double BSIM3v0cof1; double BSIM3v0cof2; double BSIM3v0cof3; double BSIM3v0cof4; double BSIM3v0cdep0; struct bsim3v0SizeDependParam *pNext; }; typedef struct sBSIM3v0model { int BSIM3v0modType; struct sBSIM3v0model *BSIM3v0nextModel; BSIM3v0instance *BSIM3v0instances; IFuid BSIM3v0modName; int BSIM3v0type; int BSIM3v0mobMod; int BSIM3v0capMod; int BSIM3v0nqsMod; int BSIM3v0noiMod; int BSIM3v0binUnit; double BSIM3v0tox; double BSIM3v0cdsc; double BSIM3v0cdscb; double BSIM3v0cdscd; double BSIM3v0cit; double BSIM3v0nfactor; double BSIM3v0xj; double BSIM3v0vsat; double BSIM3v0at; double BSIM3v0a0; double BSIM3v0ags; double BSIM3v0a1; double BSIM3v0a2; double BSIM3v0keta; double BSIM3v0nsub; double BSIM3v0npeak; double BSIM3v0ngate; double BSIM3v0gamma1; double BSIM3v0gamma2; double BSIM3v0vbx; double BSIM3v0vbm; double BSIM3v0xt; double BSIM3v0k1; double BSIM3v0kt1; double BSIM3v0kt1l; double BSIM3v0kt2; double BSIM3v0k2; double BSIM3v0k3; double BSIM3v0k3b; double BSIM3v0w0; double BSIM3v0nlx; double BSIM3v0dvt0; double BSIM3v0dvt1; double BSIM3v0dvt2; double BSIM3v0dvt0w; double BSIM3v0dvt1w; double BSIM3v0dvt2w; double BSIM3v0drout; double BSIM3v0dsub; double BSIM3v0vth0; double BSIM3v0ua; double BSIM3v0ua1; double BSIM3v0ub; double BSIM3v0ub1; double BSIM3v0uc; double BSIM3v0uc1; double BSIM3v0u0; double BSIM3v0ute; double BSIM3v0voff; double BSIM3v0delta; double BSIM3v0rdsw; double BSIM3v0prwg; double BSIM3v0prwb; double BSIM3v0prt; double BSIM3v0eta0; double BSIM3v0etab; double BSIM3v0pclm; double BSIM3v0pdibl1; double BSIM3v0pdibl2; double BSIM3v0pdiblb; double BSIM3v0pscbe1; double BSIM3v0pscbe2; double BSIM3v0pvag; double BSIM3v0wr; double BSIM3v0dwg; double BSIM3v0dwb; double BSIM3v0b0; double BSIM3v0b1; double BSIM3v0alpha0; double BSIM3v0beta0; /* CV model */ double BSIM3v0elm; double BSIM3v0cgsl; double BSIM3v0cgdl; double BSIM3v0ckappa; double BSIM3v0cf; double BSIM3v0clc; double BSIM3v0cle; double BSIM3v0dwc; double BSIM3v0dlc; /* Length Dependence */ double BSIM3v0lcdsc; double BSIM3v0lcdscb; double BSIM3v0lcdscd; double BSIM3v0lcit; double BSIM3v0lnfactor; double BSIM3v0lxj; double BSIM3v0lvsat; double BSIM3v0lat; double BSIM3v0la0; double BSIM3v0lags; double BSIM3v0la1; double BSIM3v0la2; double BSIM3v0lketa; double BSIM3v0lnsub; double BSIM3v0lnpeak; double BSIM3v0lngate; double BSIM3v0lgamma1; double BSIM3v0lgamma2; double BSIM3v0lvbx; double BSIM3v0lvbm; double BSIM3v0lxt; double BSIM3v0lk1; double BSIM3v0lkt1; double BSIM3v0lkt1l; double BSIM3v0lkt2; double BSIM3v0lk2; double BSIM3v0lk3; double BSIM3v0lk3b; double BSIM3v0lw0; double BSIM3v0lnlx; double BSIM3v0ldvt0; double BSIM3v0ldvt1; double BSIM3v0ldvt2; double BSIM3v0ldvt0w; double BSIM3v0ldvt1w; double BSIM3v0ldvt2w; double BSIM3v0ldrout; double BSIM3v0ldsub; double BSIM3v0lvth0; double BSIM3v0lua; double BSIM3v0lua1; double BSIM3v0lub; double BSIM3v0lub1; double BSIM3v0luc; double BSIM3v0luc1; double BSIM3v0lu0; double BSIM3v0lute; double BSIM3v0lvoff; double BSIM3v0ldelta; double BSIM3v0lrdsw; double BSIM3v0lprwg; double BSIM3v0lprwb; double BSIM3v0lprt; double BSIM3v0leta0; double BSIM3v0letab; double BSIM3v0lpclm; double BSIM3v0lpdibl1; double BSIM3v0lpdibl2; double BSIM3v0lpdiblb; double BSIM3v0lpscbe1; double BSIM3v0lpscbe2; double BSIM3v0lpvag; double BSIM3v0lwr; double BSIM3v0ldwg; double BSIM3v0ldwb; double BSIM3v0lb0; double BSIM3v0lb1; double BSIM3v0lalpha0; double BSIM3v0lbeta0; /* CV model */ double BSIM3v0lelm; double BSIM3v0lcgsl; double BSIM3v0lcgdl; double BSIM3v0lckappa; double BSIM3v0lcf; double BSIM3v0lclc; double BSIM3v0lcle; /* Width Dependence */ double BSIM3v0wcdsc; double BSIM3v0wcdscb; double BSIM3v0wcdscd; double BSIM3v0wcit; double BSIM3v0wnfactor; double BSIM3v0wxj; double BSIM3v0wvsat; double BSIM3v0wat; double BSIM3v0wa0; double BSIM3v0wags; double BSIM3v0wa1; double BSIM3v0wa2; double BSIM3v0wketa; double BSIM3v0wnsub; double BSIM3v0wnpeak; double BSIM3v0wngate; double BSIM3v0wgamma1; double BSIM3v0wgamma2; double BSIM3v0wvbx; double BSIM3v0wvbm; double BSIM3v0wxt; double BSIM3v0wk1; double BSIM3v0wkt1; double BSIM3v0wkt1l; double BSIM3v0wkt2; double BSIM3v0wk2; double BSIM3v0wk3; double BSIM3v0wk3b; double BSIM3v0ww0; double BSIM3v0wnlx; double BSIM3v0wdvt0; double BSIM3v0wdvt1; double BSIM3v0wdvt2; double BSIM3v0wdvt0w; double BSIM3v0wdvt1w; double BSIM3v0wdvt2w; double BSIM3v0wdrout; double BSIM3v0wdsub; double BSIM3v0wvth0; double BSIM3v0wua; double BSIM3v0wua1; double BSIM3v0wub; double BSIM3v0wub1; double BSIM3v0wuc; double BSIM3v0wuc1; double BSIM3v0wu0; double BSIM3v0wute; double BSIM3v0wvoff; double BSIM3v0wdelta; double BSIM3v0wrdsw; double BSIM3v0wprwg; double BSIM3v0wprwb; double BSIM3v0wprt; double BSIM3v0weta0; double BSIM3v0wetab; double BSIM3v0wpclm; double BSIM3v0wpdibl1; double BSIM3v0wpdibl2; double BSIM3v0wpdiblb; double BSIM3v0wpscbe1; double BSIM3v0wpscbe2; double BSIM3v0wpvag; double BSIM3v0wwr; double BSIM3v0wdwg; double BSIM3v0wdwb; double BSIM3v0wb0; double BSIM3v0wb1; double BSIM3v0walpha0; double BSIM3v0wbeta0; /* CV model */ double BSIM3v0welm; double BSIM3v0wcgsl; double BSIM3v0wcgdl; double BSIM3v0wckappa; double BSIM3v0wcf; double BSIM3v0wclc; double BSIM3v0wcle; /* Cross-term Dependence */ double BSIM3v0pcdsc; double BSIM3v0pcdscb; double BSIM3v0pcdscd; double BSIM3v0pcit; double BSIM3v0pnfactor; double BSIM3v0pxj; double BSIM3v0pvsat; double BSIM3v0pat; double BSIM3v0pa0; double BSIM3v0pags; double BSIM3v0pa1; double BSIM3v0pa2; double BSIM3v0pketa; double BSIM3v0pnsub; double BSIM3v0pnpeak; double BSIM3v0pngate; double BSIM3v0pgamma1; double BSIM3v0pgamma2; double BSIM3v0pvbx; double BSIM3v0pvbm; double BSIM3v0pxt; double BSIM3v0pk1; double BSIM3v0pkt1; double BSIM3v0pkt1l; double BSIM3v0pkt2; double BSIM3v0pk2; double BSIM3v0pk3; double BSIM3v0pk3b; double BSIM3v0pw0; double BSIM3v0pnlx; double BSIM3v0pdvt0; double BSIM3v0pdvt1; double BSIM3v0pdvt2; double BSIM3v0pdvt0w; double BSIM3v0pdvt1w; double BSIM3v0pdvt2w; double BSIM3v0pdrout; double BSIM3v0pdsub; double BSIM3v0pvth0; double BSIM3v0pua; double BSIM3v0pua1; double BSIM3v0pub; double BSIM3v0pub1; double BSIM3v0puc; double BSIM3v0puc1; double BSIM3v0pu0; double BSIM3v0pute; double BSIM3v0pvoff; double BSIM3v0pdelta; double BSIM3v0prdsw; double BSIM3v0pprwg; double BSIM3v0pprwb; double BSIM3v0pprt; double BSIM3v0peta0; double BSIM3v0petab; double BSIM3v0ppclm; double BSIM3v0ppdibl1; double BSIM3v0ppdibl2; double BSIM3v0ppdiblb; double BSIM3v0ppscbe1; double BSIM3v0ppscbe2; double BSIM3v0ppvag; double BSIM3v0pwr; double BSIM3v0pdwg; double BSIM3v0pdwb; double BSIM3v0pb0; double BSIM3v0pb1; double BSIM3v0palpha0; double BSIM3v0pbeta0; /* CV model */ double BSIM3v0pelm; double BSIM3v0pcgsl; double BSIM3v0pcgdl; double BSIM3v0pckappa; double BSIM3v0pcf; double BSIM3v0pclc; double BSIM3v0pcle; double BSIM3v0tnom; double BSIM3v0cgso; double BSIM3v0cgdo; double BSIM3v0cgbo; double BSIM3v0xpart; double BSIM3v0cFringOut; double BSIM3v0cFringMax; double BSIM3v0sheetResistance; double BSIM3v0jctSatCurDensity; double BSIM3v0bulkJctPotential; double BSIM3v0bulkJctBotGradingCoeff; double BSIM3v0bulkJctSideGradingCoeff; double BSIM3v0sidewallJctPotential; double BSIM3v0unitAreaJctCap; double BSIM3v0unitLengthSidewallJctCap; double BSIM3v0Lint; double BSIM3v0Ll; double BSIM3v0Lln; double BSIM3v0Lw; double BSIM3v0Lwn; double BSIM3v0Lwl; double BSIM3v0Lmin; double BSIM3v0Lmax; double BSIM3v0Wint; double BSIM3v0Wl; double BSIM3v0Wln; double BSIM3v0Ww; double BSIM3v0Wwn; double BSIM3v0Wwl; double BSIM3v0Wmin; double BSIM3v0Wmax; /* Pre-calculated constants */ /* MCJ: move to size-dependent param. */ double BSIM3v0vtm; double BSIM3v0cox; double BSIM3v0cof1; double BSIM3v0cof2; double BSIM3v0cof3; double BSIM3v0cof4; double BSIM3v0vcrit; double BSIM3v0factor1; double BSIM3v0oxideTrapDensityA; double BSIM3v0oxideTrapDensityB; double BSIM3v0oxideTrapDensityC; double BSIM3v0em; double BSIM3v0ef; double BSIM3v0af; double BSIM3v0kf; struct bsim3v0SizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned BSIM3v0mobModGiven :1; unsigned BSIM3v0binUnitGiven :1; unsigned BSIM3v0capModGiven :1; unsigned BSIM3v0nqsModGiven :1; unsigned BSIM3v0noiModGiven :1; unsigned BSIM3v0typeGiven :1; unsigned BSIM3v0toxGiven :1; unsigned BSIM3v0cdscGiven :1; unsigned BSIM3v0cdscbGiven :1; unsigned BSIM3v0cdscdGiven :1; unsigned BSIM3v0citGiven :1; unsigned BSIM3v0nfactorGiven :1; unsigned BSIM3v0xjGiven :1; unsigned BSIM3v0vsatGiven :1; unsigned BSIM3v0atGiven :1; unsigned BSIM3v0a0Given :1; unsigned BSIM3v0agsGiven :1; unsigned BSIM3v0a1Given :1; unsigned BSIM3v0a2Given :1; unsigned BSIM3v0ketaGiven :1; unsigned BSIM3v0nsubGiven :1; unsigned BSIM3v0npeakGiven :1; unsigned BSIM3v0ngateGiven :1; unsigned BSIM3v0gamma1Given :1; unsigned BSIM3v0gamma2Given :1; unsigned BSIM3v0vbxGiven :1; unsigned BSIM3v0vbmGiven :1; unsigned BSIM3v0xtGiven :1; unsigned BSIM3v0k1Given :1; unsigned BSIM3v0kt1Given :1; unsigned BSIM3v0kt1lGiven :1; unsigned BSIM3v0kt2Given :1; unsigned BSIM3v0k2Given :1; unsigned BSIM3v0k3Given :1; unsigned BSIM3v0k3bGiven :1; unsigned BSIM3v0w0Given :1; unsigned BSIM3v0nlxGiven :1; unsigned BSIM3v0dvt0Given :1; unsigned BSIM3v0dvt1Given :1; unsigned BSIM3v0dvt2Given :1; unsigned BSIM3v0dvt0wGiven :1; unsigned BSIM3v0dvt1wGiven :1; unsigned BSIM3v0dvt2wGiven :1; unsigned BSIM3v0droutGiven :1; unsigned BSIM3v0dsubGiven :1; unsigned BSIM3v0vth0Given :1; unsigned BSIM3v0uaGiven :1; unsigned BSIM3v0ua1Given :1; unsigned BSIM3v0ubGiven :1; unsigned BSIM3v0ub1Given :1; unsigned BSIM3v0ucGiven :1; unsigned BSIM3v0uc1Given :1; unsigned BSIM3v0u0Given :1; unsigned BSIM3v0uteGiven :1; unsigned BSIM3v0voffGiven :1; unsigned BSIM3v0rdswGiven :1; unsigned BSIM3v0prwgGiven :1; unsigned BSIM3v0prwbGiven :1; unsigned BSIM3v0prtGiven :1; unsigned BSIM3v0eta0Given :1; unsigned BSIM3v0etabGiven :1; unsigned BSIM3v0pclmGiven :1; unsigned BSIM3v0pdibl1Given :1; unsigned BSIM3v0pdibl2Given :1; unsigned BSIM3v0pdiblbGiven :1; unsigned BSIM3v0pscbe1Given :1; unsigned BSIM3v0pscbe2Given :1; unsigned BSIM3v0pvagGiven :1; unsigned BSIM3v0deltaGiven :1; unsigned BSIM3v0wrGiven :1; unsigned BSIM3v0dwgGiven :1; unsigned BSIM3v0dwbGiven :1; unsigned BSIM3v0b0Given :1; unsigned BSIM3v0b1Given :1; unsigned BSIM3v0alpha0Given :1; unsigned BSIM3v0beta0Given :1; /* CV model */ unsigned BSIM3v0elmGiven :1; unsigned BSIM3v0cgslGiven :1; unsigned BSIM3v0cgdlGiven :1; unsigned BSIM3v0ckappaGiven :1; unsigned BSIM3v0cfGiven :1; unsigned BSIM3v0clcGiven :1; unsigned BSIM3v0cleGiven :1; unsigned BSIM3v0dwcGiven :1; unsigned BSIM3v0dlcGiven :1; /* Length dependence */ unsigned BSIM3v0lcdscGiven :1; unsigned BSIM3v0lcdscbGiven :1; unsigned BSIM3v0lcdscdGiven :1; unsigned BSIM3v0lcitGiven :1; unsigned BSIM3v0lnfactorGiven :1; unsigned BSIM3v0lxjGiven :1; unsigned BSIM3v0lvsatGiven :1; unsigned BSIM3v0latGiven :1; unsigned BSIM3v0la0Given :1; unsigned BSIM3v0lagsGiven :1; unsigned BSIM3v0la1Given :1; unsigned BSIM3v0la2Given :1; unsigned BSIM3v0lketaGiven :1; unsigned BSIM3v0lnsubGiven :1; unsigned BSIM3v0lnpeakGiven :1; unsigned BSIM3v0lngateGiven :1; unsigned BSIM3v0lgamma1Given :1; unsigned BSIM3v0lgamma2Given :1; unsigned BSIM3v0lvbxGiven :1; unsigned BSIM3v0lvbmGiven :1; unsigned BSIM3v0lxtGiven :1; unsigned BSIM3v0lk1Given :1; unsigned BSIM3v0lkt1Given :1; unsigned BSIM3v0lkt1lGiven :1; unsigned BSIM3v0lkt2Given :1; unsigned BSIM3v0lk2Given :1; unsigned BSIM3v0lk3Given :1; unsigned BSIM3v0lk3bGiven :1; unsigned BSIM3v0lw0Given :1; unsigned BSIM3v0lnlxGiven :1; unsigned BSIM3v0ldvt0Given :1; unsigned BSIM3v0ldvt1Given :1; unsigned BSIM3v0ldvt2Given :1; unsigned BSIM3v0ldvt0wGiven :1; unsigned BSIM3v0ldvt1wGiven :1; unsigned BSIM3v0ldvt2wGiven :1; unsigned BSIM3v0ldroutGiven :1; unsigned BSIM3v0ldsubGiven :1; unsigned BSIM3v0lvth0Given :1; unsigned BSIM3v0luaGiven :1; unsigned BSIM3v0lua1Given :1; unsigned BSIM3v0lubGiven :1; unsigned BSIM3v0lub1Given :1; unsigned BSIM3v0lucGiven :1; unsigned BSIM3v0luc1Given :1; unsigned BSIM3v0lu0Given :1; unsigned BSIM3v0luteGiven :1; unsigned BSIM3v0lvoffGiven :1; unsigned BSIM3v0lrdswGiven :1; unsigned BSIM3v0lprwgGiven :1; unsigned BSIM3v0lprwbGiven :1; unsigned BSIM3v0lprtGiven :1; unsigned BSIM3v0leta0Given :1; unsigned BSIM3v0letabGiven :1; unsigned BSIM3v0lpclmGiven :1; unsigned BSIM3v0lpdibl1Given :1; unsigned BSIM3v0lpdibl2Given :1; unsigned BSIM3v0lpdiblbGiven :1; unsigned BSIM3v0lpscbe1Given :1; unsigned BSIM3v0lpscbe2Given :1; unsigned BSIM3v0lpvagGiven :1; unsigned BSIM3v0ldeltaGiven :1; unsigned BSIM3v0lwrGiven :1; unsigned BSIM3v0ldwgGiven :1; unsigned BSIM3v0ldwbGiven :1; unsigned BSIM3v0lb0Given :1; unsigned BSIM3v0lb1Given :1; unsigned BSIM3v0lalpha0Given :1; unsigned BSIM3v0lbeta0Given :1; /* CV model */ unsigned BSIM3v0lelmGiven :1; unsigned BSIM3v0lcgslGiven :1; unsigned BSIM3v0lcgdlGiven :1; unsigned BSIM3v0lckappaGiven :1; unsigned BSIM3v0lcfGiven :1; unsigned BSIM3v0lclcGiven :1; unsigned BSIM3v0lcleGiven :1; /* Width dependence */ unsigned BSIM3v0wcdscGiven :1; unsigned BSIM3v0wcdscbGiven :1; unsigned BSIM3v0wcdscdGiven :1; unsigned BSIM3v0wcitGiven :1; unsigned BSIM3v0wnfactorGiven :1; unsigned BSIM3v0wxjGiven :1; unsigned BSIM3v0wvsatGiven :1; unsigned BSIM3v0watGiven :1; unsigned BSIM3v0wa0Given :1; unsigned BSIM3v0wagsGiven :1; unsigned BSIM3v0wa1Given :1; unsigned BSIM3v0wa2Given :1; unsigned BSIM3v0wketaGiven :1; unsigned BSIM3v0wnsubGiven :1; unsigned BSIM3v0wnpeakGiven :1; unsigned BSIM3v0wngateGiven :1; unsigned BSIM3v0wgamma1Given :1; unsigned BSIM3v0wgamma2Given :1; unsigned BSIM3v0wvbxGiven :1; unsigned BSIM3v0wvbmGiven :1; unsigned BSIM3v0wxtGiven :1; unsigned BSIM3v0wk1Given :1; unsigned BSIM3v0wkt1Given :1; unsigned BSIM3v0wkt1lGiven :1; unsigned BSIM3v0wkt2Given :1; unsigned BSIM3v0wk2Given :1; unsigned BSIM3v0wk3Given :1; unsigned BSIM3v0wk3bGiven :1; unsigned BSIM3v0ww0Given :1; unsigned BSIM3v0wnlxGiven :1; unsigned BSIM3v0wdvt0Given :1; unsigned BSIM3v0wdvt1Given :1; unsigned BSIM3v0wdvt2Given :1; unsigned BSIM3v0wdvt0wGiven :1; unsigned BSIM3v0wdvt1wGiven :1; unsigned BSIM3v0wdvt2wGiven :1; unsigned BSIM3v0wdroutGiven :1; unsigned BSIM3v0wdsubGiven :1; unsigned BSIM3v0wvth0Given :1; unsigned BSIM3v0wuaGiven :1; unsigned BSIM3v0wua1Given :1; unsigned BSIM3v0wubGiven :1; unsigned BSIM3v0wub1Given :1; unsigned BSIM3v0wucGiven :1; unsigned BSIM3v0wuc1Given :1; unsigned BSIM3v0wu0Given :1; unsigned BSIM3v0wuteGiven :1; unsigned BSIM3v0wvoffGiven :1; unsigned BSIM3v0wrdswGiven :1; unsigned BSIM3v0wprwgGiven :1; unsigned BSIM3v0wprwbGiven :1; unsigned BSIM3v0wprtGiven :1; unsigned BSIM3v0weta0Given :1; unsigned BSIM3v0wetabGiven :1; unsigned BSIM3v0wpclmGiven :1; unsigned BSIM3v0wpdibl1Given :1; unsigned BSIM3v0wpdibl2Given :1; unsigned BSIM3v0wpdiblbGiven :1; unsigned BSIM3v0wpscbe1Given :1; unsigned BSIM3v0wpscbe2Given :1; unsigned BSIM3v0wpvagGiven :1; unsigned BSIM3v0wdeltaGiven :1; unsigned BSIM3v0wwrGiven :1; unsigned BSIM3v0wdwgGiven :1; unsigned BSIM3v0wdwbGiven :1; unsigned BSIM3v0wb0Given :1; unsigned BSIM3v0wb1Given :1; unsigned BSIM3v0walpha0Given :1; unsigned BSIM3v0wbeta0Given :1; /* CV model */ unsigned BSIM3v0welmGiven :1; unsigned BSIM3v0wcgslGiven :1; unsigned BSIM3v0wcgdlGiven :1; unsigned BSIM3v0wckappaGiven :1; unsigned BSIM3v0wcfGiven :1; unsigned BSIM3v0wclcGiven :1; unsigned BSIM3v0wcleGiven :1; /* Cross-term dependence */ unsigned BSIM3v0pcdscGiven :1; unsigned BSIM3v0pcdscbGiven :1; unsigned BSIM3v0pcdscdGiven :1; unsigned BSIM3v0pcitGiven :1; unsigned BSIM3v0pnfactorGiven :1; unsigned BSIM3v0pxjGiven :1; unsigned BSIM3v0pvsatGiven :1; unsigned BSIM3v0patGiven :1; unsigned BSIM3v0pa0Given :1; unsigned BSIM3v0pagsGiven :1; unsigned BSIM3v0pa1Given :1; unsigned BSIM3v0pa2Given :1; unsigned BSIM3v0pketaGiven :1; unsigned BSIM3v0pnsubGiven :1; unsigned BSIM3v0pnpeakGiven :1; unsigned BSIM3v0pngateGiven :1; unsigned BSIM3v0pgamma1Given :1; unsigned BSIM3v0pgamma2Given :1; unsigned BSIM3v0pvbxGiven :1; unsigned BSIM3v0pvbmGiven :1; unsigned BSIM3v0pxtGiven :1; unsigned BSIM3v0pk1Given :1; unsigned BSIM3v0pkt1Given :1; unsigned BSIM3v0pkt1lGiven :1; unsigned BSIM3v0pkt2Given :1; unsigned BSIM3v0pk2Given :1; unsigned BSIM3v0pk3Given :1; unsigned BSIM3v0pk3bGiven :1; unsigned BSIM3v0pw0Given :1; unsigned BSIM3v0pnlxGiven :1; unsigned BSIM3v0pdvt0Given :1; unsigned BSIM3v0pdvt1Given :1; unsigned BSIM3v0pdvt2Given :1; unsigned BSIM3v0pdvt0wGiven :1; unsigned BSIM3v0pdvt1wGiven :1; unsigned BSIM3v0pdvt2wGiven :1; unsigned BSIM3v0pdroutGiven :1; unsigned BSIM3v0pdsubGiven :1; unsigned BSIM3v0pvth0Given :1; unsigned BSIM3v0puaGiven :1; unsigned BSIM3v0pua1Given :1; unsigned BSIM3v0pubGiven :1; unsigned BSIM3v0pub1Given :1; unsigned BSIM3v0pucGiven :1; unsigned BSIM3v0puc1Given :1; unsigned BSIM3v0pu0Given :1; unsigned BSIM3v0puteGiven :1; unsigned BSIM3v0pvoffGiven :1; unsigned BSIM3v0prdswGiven :1; unsigned BSIM3v0pprwgGiven :1; unsigned BSIM3v0pprwbGiven :1; unsigned BSIM3v0pprtGiven :1; unsigned BSIM3v0peta0Given :1; unsigned BSIM3v0petabGiven :1; unsigned BSIM3v0ppclmGiven :1; unsigned BSIM3v0ppdibl1Given :1; unsigned BSIM3v0ppdibl2Given :1; unsigned BSIM3v0ppdiblbGiven :1; unsigned BSIM3v0ppscbe1Given :1; unsigned BSIM3v0ppscbe2Given :1; unsigned BSIM3v0ppvagGiven :1; unsigned BSIM3v0pdeltaGiven :1; unsigned BSIM3v0pwrGiven :1; unsigned BSIM3v0pdwgGiven :1; unsigned BSIM3v0pdwbGiven :1; unsigned BSIM3v0pb0Given :1; unsigned BSIM3v0pb1Given :1; unsigned BSIM3v0palpha0Given :1; unsigned BSIM3v0pbeta0Given :1; /* CV model */ unsigned BSIM3v0pelmGiven :1; unsigned BSIM3v0pcgslGiven :1; unsigned BSIM3v0pcgdlGiven :1; unsigned BSIM3v0pckappaGiven :1; unsigned BSIM3v0pcfGiven :1; unsigned BSIM3v0pclcGiven :1; unsigned BSIM3v0pcleGiven :1; unsigned BSIM3v0useFringeGiven :1; unsigned BSIM3v0tnomGiven :1; unsigned BSIM3v0cgsoGiven :1; unsigned BSIM3v0cgdoGiven :1; unsigned BSIM3v0cgboGiven :1; unsigned BSIM3v0xpartGiven :1; unsigned BSIM3v0sheetResistanceGiven :1; unsigned BSIM3v0jctSatCurDensityGiven :1; unsigned BSIM3v0bulkJctPotentialGiven :1; unsigned BSIM3v0bulkJctBotGradingCoeffGiven :1; unsigned BSIM3v0sidewallJctPotentialGiven :1; unsigned BSIM3v0bulkJctSideGradingCoeffGiven :1; unsigned BSIM3v0unitAreaJctCapGiven :1; unsigned BSIM3v0unitLengthSidewallJctCapGiven :1; unsigned BSIM3v0oxideTrapDensityAGiven :1; unsigned BSIM3v0oxideTrapDensityBGiven :1; unsigned BSIM3v0oxideTrapDensityCGiven :1; unsigned BSIM3v0emGiven :1; unsigned BSIM3v0efGiven :1; unsigned BSIM3v0afGiven :1; unsigned BSIM3v0kfGiven :1; unsigned BSIM3v0LintGiven :1; unsigned BSIM3v0LlGiven :1; unsigned BSIM3v0LlnGiven :1; unsigned BSIM3v0LwGiven :1; unsigned BSIM3v0LwnGiven :1; unsigned BSIM3v0LwlGiven :1; unsigned BSIM3v0LminGiven :1; unsigned BSIM3v0LmaxGiven :1; unsigned BSIM3v0WintGiven :1; unsigned BSIM3v0WlGiven :1; unsigned BSIM3v0WlnGiven :1; unsigned BSIM3v0WwGiven :1; unsigned BSIM3v0WwnGiven :1; unsigned BSIM3v0WwlGiven :1; unsigned BSIM3v0WminGiven :1; unsigned BSIM3v0WmaxGiven :1; } BSIM3v0model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM3v0_W 1 #define BSIM3v0_L 2 #define BSIM3v0_M 15 #define BSIM3v0_AS 3 #define BSIM3v0_AD 4 #define BSIM3v0_PS 5 #define BSIM3v0_PD 6 #define BSIM3v0_NRS 7 #define BSIM3v0_NRD 8 #define BSIM3v0_OFF 9 #define BSIM3v0_IC_VBS 10 #define BSIM3v0_IC_VDS 11 #define BSIM3v0_IC_VGS 12 #define BSIM3v0_IC 13 #define BSIM3v0_NQSMOD 14 /* model parameters */ #define BSIM3v0_MOD_CAPMOD 101 #define BSIM3v0_MOD_NQSMOD 102 #define BSIM3v0_MOD_MOBMOD 103 #define BSIM3v0_MOD_NOIMOD 104 #define BSIM3v0_MOD_TOX 105 #define BSIM3v0_MOD_CDSC 106 #define BSIM3v0_MOD_CDSCB 107 #define BSIM3v0_MOD_CIT 108 #define BSIM3v0_MOD_NFACTOR 109 #define BSIM3v0_MOD_XJ 110 #define BSIM3v0_MOD_VSAT 111 #define BSIM3v0_MOD_AT 112 #define BSIM3v0_MOD_A0 113 #define BSIM3v0_MOD_A1 114 #define BSIM3v0_MOD_A2 115 #define BSIM3v0_MOD_KETA 116 #define BSIM3v0_MOD_NSUB 117 #define BSIM3v0_MOD_NPEAK 118 #define BSIM3v0_MOD_NGATE 120 #define BSIM3v0_MOD_GAMMA1 121 #define BSIM3v0_MOD_GAMMA2 122 #define BSIM3v0_MOD_VBX 123 #define BSIM3v0_MOD_BINUNIT 124 #define BSIM3v0_MOD_VBM 125 #define BSIM3v0_MOD_XT 126 #define BSIM3v0_MOD_K1 129 #define BSIM3v0_MOD_KT1 130 #define BSIM3v0_MOD_KT1L 131 #define BSIM3v0_MOD_K2 132 #define BSIM3v0_MOD_KT2 133 #define BSIM3v0_MOD_K3 134 #define BSIM3v0_MOD_K3B 135 #define BSIM3v0_MOD_W0 136 #define BSIM3v0_MOD_NLX 137 #define BSIM3v0_MOD_DVT0 138 #define BSIM3v0_MOD_DVT1 139 #define BSIM3v0_MOD_DVT2 140 #define BSIM3v0_MOD_DVT0W 141 #define BSIM3v0_MOD_DVT1W 142 #define BSIM3v0_MOD_DVT2W 143 #define BSIM3v0_MOD_DROUT 144 #define BSIM3v0_MOD_DSUB 145 #define BSIM3v0_MOD_VTH0 146 #define BSIM3v0_MOD_UA 147 #define BSIM3v0_MOD_UA1 148 #define BSIM3v0_MOD_UB 149 #define BSIM3v0_MOD_UB1 150 #define BSIM3v0_MOD_UC 151 #define BSIM3v0_MOD_UC1 152 #define BSIM3v0_MOD_U0 153 #define BSIM3v0_MOD_UTE 154 #define BSIM3v0_MOD_VOFF 155 #define BSIM3v0_MOD_DELTA 156 #define BSIM3v0_MOD_RDSW 157 #define BSIM3v0_MOD_PRT 158 #define BSIM3v0_MOD_LDD 159 #define BSIM3v0_MOD_ETA 160 #define BSIM3v0_MOD_ETA0 161 #define BSIM3v0_MOD_ETAB 162 #define BSIM3v0_MOD_PCLM 163 #define BSIM3v0_MOD_PDIBL1 164 #define BSIM3v0_MOD_PDIBL2 165 #define BSIM3v0_MOD_PSCBE1 166 #define BSIM3v0_MOD_PSCBE2 167 #define BSIM3v0_MOD_PVAG 168 #define BSIM3v0_MOD_WR 169 #define BSIM3v0_MOD_DWG 170 #define BSIM3v0_MOD_DWB 171 #define BSIM3v0_MOD_B0 172 #define BSIM3v0_MOD_B1 173 #define BSIM3v0_MOD_ALPHA0 174 #define BSIM3v0_MOD_BETA0 175 #define BSIM3v0_MOD_PDIBLB 178 #define BSIM3v0_MOD_PRWG 179 #define BSIM3v0_MOD_PRWB 180 #define BSIM3v0_MOD_CDSCD 181 #define BSIM3v0_MOD_AGS 182 #define BSIM3v0_MOD_FRINGE 184 #define BSIM3v0_MOD_ELM 185 #define BSIM3v0_MOD_CGSL 186 #define BSIM3v0_MOD_CGDL 187 #define BSIM3v0_MOD_CKAPPA 188 #define BSIM3v0_MOD_CF 189 #define BSIM3v0_MOD_CLC 190 #define BSIM3v0_MOD_CLE 191 /* Length dependence */ #define BSIM3v0_MOD_LCDSC 201 #define BSIM3v0_MOD_LCDSCB 202 #define BSIM3v0_MOD_LCIT 203 #define BSIM3v0_MOD_LNFACTOR 204 #define BSIM3v0_MOD_LXJ 205 #define BSIM3v0_MOD_LVSAT 206 #define BSIM3v0_MOD_LAT 207 #define BSIM3v0_MOD_LA0 208 #define BSIM3v0_MOD_LA1 209 #define BSIM3v0_MOD_LA2 210 #define BSIM3v0_MOD_LKETA 211 #define BSIM3v0_MOD_LNSUB 212 #define BSIM3v0_MOD_LNPEAK 213 #define BSIM3v0_MOD_LNGATE 215 #define BSIM3v0_MOD_LGAMMA1 216 #define BSIM3v0_MOD_LGAMMA2 217 #define BSIM3v0_MOD_LVBX 218 #define BSIM3v0_MOD_LVBM 220 #define BSIM3v0_MOD_LXT 222 #define BSIM3v0_MOD_LK1 225 #define BSIM3v0_MOD_LKT1 226 #define BSIM3v0_MOD_LKT1L 227 #define BSIM3v0_MOD_LK2 228 #define BSIM3v0_MOD_LKT2 229 #define BSIM3v0_MOD_LK3 230 #define BSIM3v0_MOD_LK3B 231 #define BSIM3v0_MOD_LW0 232 #define BSIM3v0_MOD_LNLX 233 #define BSIM3v0_MOD_LDVT0 234 #define BSIM3v0_MOD_LDVT1 235 #define BSIM3v0_MOD_LDVT2 236 #define BSIM3v0_MOD_LDVT0W 237 #define BSIM3v0_MOD_LDVT1W 238 #define BSIM3v0_MOD_LDVT2W 239 #define BSIM3v0_MOD_LDROUT 240 #define BSIM3v0_MOD_LDSUB 241 #define BSIM3v0_MOD_LVTH0 242 #define BSIM3v0_MOD_LUA 243 #define BSIM3v0_MOD_LUA1 244 #define BSIM3v0_MOD_LUB 245 #define BSIM3v0_MOD_LUB1 246 #define BSIM3v0_MOD_LUC 247 #define BSIM3v0_MOD_LUC1 248 #define BSIM3v0_MOD_LU0 249 #define BSIM3v0_MOD_LUTE 250 #define BSIM3v0_MOD_LVOFF 251 #define BSIM3v0_MOD_LDELTA 252 #define BSIM3v0_MOD_LRDSW 253 #define BSIM3v0_MOD_LPRT 254 #define BSIM3v0_MOD_LLDD 255 #define BSIM3v0_MOD_LETA 256 #define BSIM3v0_MOD_LETA0 257 #define BSIM3v0_MOD_LETAB 258 #define BSIM3v0_MOD_LPCLM 259 #define BSIM3v0_MOD_LPDIBL1 260 #define BSIM3v0_MOD_LPDIBL2 261 #define BSIM3v0_MOD_LPSCBE1 262 #define BSIM3v0_MOD_LPSCBE2 263 #define BSIM3v0_MOD_LPVAG 264 #define BSIM3v0_MOD_LWR 265 #define BSIM3v0_MOD_LDWG 266 #define BSIM3v0_MOD_LDWB 267 #define BSIM3v0_MOD_LB0 268 #define BSIM3v0_MOD_LB1 269 #define BSIM3v0_MOD_LALPHA0 270 #define BSIM3v0_MOD_LBETA0 271 #define BSIM3v0_MOD_LPDIBLB 274 #define BSIM3v0_MOD_LPRWG 275 #define BSIM3v0_MOD_LPRWB 276 #define BSIM3v0_MOD_LCDSCD 277 #define BSIM3v0_MOD_LAGS 278 #define BSIM3v0_MOD_LFRINGE 281 #define BSIM3v0_MOD_LELM 282 #define BSIM3v0_MOD_LCGSL 283 #define BSIM3v0_MOD_LCGDL 284 #define BSIM3v0_MOD_LCKAPPA 285 #define BSIM3v0_MOD_LCF 286 #define BSIM3v0_MOD_LCLC 287 #define BSIM3v0_MOD_LCLE 288 /* Width dependence */ #define BSIM3v0_MOD_WCDSC 301 #define BSIM3v0_MOD_WCDSCB 302 #define BSIM3v0_MOD_WCIT 303 #define BSIM3v0_MOD_WNFACTOR 304 #define BSIM3v0_MOD_WXJ 305 #define BSIM3v0_MOD_WVSAT 306 #define BSIM3v0_MOD_WAT 307 #define BSIM3v0_MOD_WA0 308 #define BSIM3v0_MOD_WA1 309 #define BSIM3v0_MOD_WA2 310 #define BSIM3v0_MOD_WKETA 311 #define BSIM3v0_MOD_WNSUB 312 #define BSIM3v0_MOD_WNPEAK 313 #define BSIM3v0_MOD_WNGATE 315 #define BSIM3v0_MOD_WGAMMA1 316 #define BSIM3v0_MOD_WGAMMA2 317 #define BSIM3v0_MOD_WVBX 318 #define BSIM3v0_MOD_WVBM 320 #define BSIM3v0_MOD_WXT 322 #define BSIM3v0_MOD_WK1 325 #define BSIM3v0_MOD_WKT1 326 #define BSIM3v0_MOD_WKT1L 327 #define BSIM3v0_MOD_WK2 328 #define BSIM3v0_MOD_WKT2 329 #define BSIM3v0_MOD_WK3 330 #define BSIM3v0_MOD_WK3B 331 #define BSIM3v0_MOD_WW0 332 #define BSIM3v0_MOD_WNLX 333 #define BSIM3v0_MOD_WDVT0 334 #define BSIM3v0_MOD_WDVT1 335 #define BSIM3v0_MOD_WDVT2 336 #define BSIM3v0_MOD_WDVT0W 337 #define BSIM3v0_MOD_WDVT1W 338 #define BSIM3v0_MOD_WDVT2W 339 #define BSIM3v0_MOD_WDROUT 340 #define BSIM3v0_MOD_WDSUB 341 #define BSIM3v0_MOD_WVTH0 342 #define BSIM3v0_MOD_WUA 343 #define BSIM3v0_MOD_WUA1 344 #define BSIM3v0_MOD_WUB 345 #define BSIM3v0_MOD_WUB1 346 #define BSIM3v0_MOD_WUC 347 #define BSIM3v0_MOD_WUC1 348 #define BSIM3v0_MOD_WU0 349 #define BSIM3v0_MOD_WUTE 350 #define BSIM3v0_MOD_WVOFF 351 #define BSIM3v0_MOD_WDELTA 352 #define BSIM3v0_MOD_WRDSW 353 #define BSIM3v0_MOD_WPRT 354 #define BSIM3v0_MOD_WLDD 355 #define BSIM3v0_MOD_WETA 356 #define BSIM3v0_MOD_WETA0 357 #define BSIM3v0_MOD_WETAB 358 #define BSIM3v0_MOD_WPCLM 359 #define BSIM3v0_MOD_WPDIBL1 360 #define BSIM3v0_MOD_WPDIBL2 361 #define BSIM3v0_MOD_WPSCBE1 362 #define BSIM3v0_MOD_WPSCBE2 363 #define BSIM3v0_MOD_WPVAG 364 #define BSIM3v0_MOD_WWR 365 #define BSIM3v0_MOD_WDWG 366 #define BSIM3v0_MOD_WDWB 367 #define BSIM3v0_MOD_WB0 368 #define BSIM3v0_MOD_WB1 369 #define BSIM3v0_MOD_WALPHA0 370 #define BSIM3v0_MOD_WBETA0 371 #define BSIM3v0_MOD_WPDIBLB 374 #define BSIM3v0_MOD_WPRWG 375 #define BSIM3v0_MOD_WPRWB 376 #define BSIM3v0_MOD_WCDSCD 377 #define BSIM3v0_MOD_WAGS 378 #define BSIM3v0_MOD_WFRINGE 381 #define BSIM3v0_MOD_WELM 382 #define BSIM3v0_MOD_WCGSL 383 #define BSIM3v0_MOD_WCGDL 384 #define BSIM3v0_MOD_WCKAPPA 385 #define BSIM3v0_MOD_WCF 386 #define BSIM3v0_MOD_WCLC 387 #define BSIM3v0_MOD_WCLE 388 /* Cross-term dependence */ #define BSIM3v0_MOD_PCDSC 401 #define BSIM3v0_MOD_PCDSCB 402 #define BSIM3v0_MOD_PCIT 403 #define BSIM3v0_MOD_PNFACTOR 404 #define BSIM3v0_MOD_PXJ 405 #define BSIM3v0_MOD_PVSAT 406 #define BSIM3v0_MOD_PAT 407 #define BSIM3v0_MOD_PA0 408 #define BSIM3v0_MOD_PA1 409 #define BSIM3v0_MOD_PA2 410 #define BSIM3v0_MOD_PKETA 411 #define BSIM3v0_MOD_PNSUB 412 #define BSIM3v0_MOD_PNPEAK 413 #define BSIM3v0_MOD_PNGATE 415 #define BSIM3v0_MOD_PGAMMA1 416 #define BSIM3v0_MOD_PGAMMA2 417 #define BSIM3v0_MOD_PVBX 418 #define BSIM3v0_MOD_PVBM 420 #define BSIM3v0_MOD_PXT 422 #define BSIM3v0_MOD_PK1 425 #define BSIM3v0_MOD_PKT1 426 #define BSIM3v0_MOD_PKT1L 427 #define BSIM3v0_MOD_PK2 428 #define BSIM3v0_MOD_PKT2 429 #define BSIM3v0_MOD_PK3 430 #define BSIM3v0_MOD_PK3B 431 #define BSIM3v0_MOD_PW0 432 #define BSIM3v0_MOD_PNLX 433 #define BSIM3v0_MOD_PDVT0 434 #define BSIM3v0_MOD_PDVT1 435 #define BSIM3v0_MOD_PDVT2 436 #define BSIM3v0_MOD_PDVT0W 437 #define BSIM3v0_MOD_PDVT1W 438 #define BSIM3v0_MOD_PDVT2W 439 #define BSIM3v0_MOD_PDROUT 440 #define BSIM3v0_MOD_PDSUB 441 #define BSIM3v0_MOD_PVTH0 442 #define BSIM3v0_MOD_PUA 443 #define BSIM3v0_MOD_PUA1 444 #define BSIM3v0_MOD_PUB 445 #define BSIM3v0_MOD_PUB1 446 #define BSIM3v0_MOD_PUC 447 #define BSIM3v0_MOD_PUC1 448 #define BSIM3v0_MOD_PU0 449 #define BSIM3v0_MOD_PUTE 450 #define BSIM3v0_MOD_PVOFF 451 #define BSIM3v0_MOD_PDELTA 452 #define BSIM3v0_MOD_PRDSW 453 #define BSIM3v0_MOD_PPRT 454 #define BSIM3v0_MOD_PLDD 455 #define BSIM3v0_MOD_PETA 456 #define BSIM3v0_MOD_PETA0 457 #define BSIM3v0_MOD_PETAB 458 #define BSIM3v0_MOD_PPCLM 459 #define BSIM3v0_MOD_PPDIBL1 460 #define BSIM3v0_MOD_PPDIBL2 461 #define BSIM3v0_MOD_PPSCBE1 462 #define BSIM3v0_MOD_PPSCBE2 463 #define BSIM3v0_MOD_PPVAG 464 #define BSIM3v0_MOD_PWR 465 #define BSIM3v0_MOD_PDWG 466 #define BSIM3v0_MOD_PDWB 467 #define BSIM3v0_MOD_PB0 468 #define BSIM3v0_MOD_PB1 469 #define BSIM3v0_MOD_PALPHA0 470 #define BSIM3v0_MOD_PBETA0 471 #define BSIM3v0_MOD_PPDIBLB 474 #define BSIM3v0_MOD_PPRWG 475 #define BSIM3v0_MOD_PPRWB 476 #define BSIM3v0_MOD_PCDSCD 477 #define BSIM3v0_MOD_PAGS 478 #define BSIM3v0_MOD_PFRINGE 481 #define BSIM3v0_MOD_PELM 482 #define BSIM3v0_MOD_PCGSL 483 #define BSIM3v0_MOD_PCGDL 484 #define BSIM3v0_MOD_PCKAPPA 485 #define BSIM3v0_MOD_PCF 486 #define BSIM3v0_MOD_PCLC 487 #define BSIM3v0_MOD_PCLE 488 #define BSIM3v0_MOD_TNOM 501 #define BSIM3v0_MOD_CGSO 502 #define BSIM3v0_MOD_CGDO 503 #define BSIM3v0_MOD_CGBO 504 #define BSIM3v0_MOD_XPART 505 #define BSIM3v0_MOD_RSH 506 #define BSIM3v0_MOD_JS 507 #define BSIM3v0_MOD_PB 508 #define BSIM3v0_MOD_MJ 509 #define BSIM3v0_MOD_PBSW 510 #define BSIM3v0_MOD_MJSW 511 #define BSIM3v0_MOD_CJ 512 #define BSIM3v0_MOD_CJSW 513 #define BSIM3v0_MOD_NMOS 514 #define BSIM3v0_MOD_PMOS 515 #define BSIM3v0_MOD_NOIA 516 #define BSIM3v0_MOD_NOIB 517 #define BSIM3v0_MOD_NOIC 518 #define BSIM3v0_MOD_LINT 519 #define BSIM3v0_MOD_LL 520 #define BSIM3v0_MOD_LLN 521 #define BSIM3v0_MOD_LW 522 #define BSIM3v0_MOD_LWN 523 #define BSIM3v0_MOD_LWL 524 #define BSIM3v0_MOD_LMIN 525 #define BSIM3v0_MOD_LMAX 526 #define BSIM3v0_MOD_WINT 527 #define BSIM3v0_MOD_WL 528 #define BSIM3v0_MOD_WLN 529 #define BSIM3v0_MOD_WW 530 #define BSIM3v0_MOD_WWN 531 #define BSIM3v0_MOD_WWL 532 #define BSIM3v0_MOD_WMIN 533 #define BSIM3v0_MOD_WMAX 534 #define BSIM3v0_MOD_DWC 535 #define BSIM3v0_MOD_DLC 536 #define BSIM3v0_MOD_EM 537 #define BSIM3v0_MOD_EF 538 #define BSIM3v0_MOD_AF 539 #define BSIM3v0_MOD_KF 540 /* device questions */ #define BSIM3v0_DNODE 601 #define BSIM3v0_GNODE 602 #define BSIM3v0_SNODE 603 #define BSIM3v0_BNODE 604 #define BSIM3v0_DNODEPRIME 605 #define BSIM3v0_SNODEPRIME 606 #define BSIM3v0_VBD 607 #define BSIM3v0_VBS 608 #define BSIM3v0_VGS 609 #define BSIM3v0_VDS 610 #define BSIM3v0_CD 611 #define BSIM3v0_CBS 612 #define BSIM3v0_CBD 613 #define BSIM3v0_GM 614 #define BSIM3v0_GDS 615 #define BSIM3v0_GMBS 616 #define BSIM3v0_GBD 617 #define BSIM3v0_GBS 618 #define BSIM3v0_QB 619 #define BSIM3v0_CQB 620 #define BSIM3v0_QG 621 #define BSIM3v0_CQG 622 #define BSIM3v0_QD 623 #define BSIM3v0_CQD 624 #define BSIM3v0_CGG 625 #define BSIM3v0_CGD 626 #define BSIM3v0_CGS 627 #define BSIM3v0_CBG 628 #define BSIM3v0_CAPBD 629 #define BSIM3v0_CQBD 630 #define BSIM3v0_CAPBS 631 #define BSIM3v0_CQBS 632 #define BSIM3v0_CDG 633 #define BSIM3v0_CDD 634 #define BSIM3v0_CDS 635 #define BSIM3v0_VON 636 #define BSIM3v0_VDSAT 637 #define BSIM3v0_QBS 638 #define BSIM3v0_QBD 639 #define BSIM3v0_SOURCECONDUCT 640 #define BSIM3v0_DRAINCONDUCT 641 #define BSIM3v0_CBDB 642 #define BSIM3v0_CBSB 643 #include "bsim3v0ext.h" extern void BSIM3v0evaluate(double,double,double,BSIM3v0instance*,BSIM3v0model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); #endif /*BSIM3v0*/ ngspice-26/src/spicelib/devices/bsim3v0/b3v0.c0000644000265600020320000006743612264261473020455 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3.c **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim3v0def.h" #include "ngspice/suffix.h" IFparm BSIM3v0pTable[] = { /* parameters */ IOP( "l", BSIM3v0_L, IF_REAL , "Length"), IOP( "w", BSIM3v0_W, IF_REAL , "Width"), IOP( "m", BSIM3v0_M, IF_REAL , "Parallel multiplier"), IOP( "ad", BSIM3v0_AD, IF_REAL , "Drain area"), IOP( "as", BSIM3v0_AS, IF_REAL , "Source area"), IOP( "pd", BSIM3v0_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM3v0_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM3v0_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM3v0_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM3v0_OFF, IF_FLAG , "Device is initially off"), IOP( "nqsmod", BSIM3v0_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IP( "ic", BSIM3v0_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM3v0_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM3v0_GM, IF_REAL, "Gm"), OP( "gds", BSIM3v0_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM3v0_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM3v0_VON, IF_REAL, "Vth"), OP( "id", BSIM3v0_CD, IF_REAL, "Ids"), OP( "vbs", BSIM3v0_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM3v0_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM3v0_VDS, IF_REAL, "Vds"), OP( "gbd", BSIM3v0_GBD, IF_REAL, "Gbd"), OP( "gbs", BSIM3v0_GBS, IF_REAL, "Gbs"), OP( "ibd", BSIM3v0_CBD, IF_REAL, "Ibd"), OP( "ibs", BSIM3v0_CBS, IF_REAL, "Ibs"), }; IFparm BSIM3v0mPTable[] = { /* model parameters */ IOP( "capmod", BSIM3v0_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "nqsmod", BSIM3v0_MOD_NQSMOD, IF_INTEGER, "Non-quasi-static model selector"), IOP( "mobmod", BSIM3v0_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", BSIM3v0_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "binunit", BSIM3v0_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "tox", BSIM3v0_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "cdsc", BSIM3v0_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM3v0_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM3v0_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM3v0_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM3v0_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM3v0_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM3v0_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM3v0_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM3v0_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM3v0_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM3v0_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM3v0_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM3v0_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM3v0_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "nch", BSIM3v0_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", BSIM3v0_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM3v0_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM3v0_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM3v0_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM3v0_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM3v0_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM3v0_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM3v0_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM3v0_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM3v0_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM3v0_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM3v0_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM3v0_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM3v0_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", BSIM3v0_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", BSIM3v0_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM3v0_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM3v0_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM3v0_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM3v0_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM3v0_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM3v0_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM3v0_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM3v0_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM3v0_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM3v0_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM3v0_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM3v0_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM3v0_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM3v0_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM3v0_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", BSIM3v0_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", BSIM3v0_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM3v0_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", BSIM3v0_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM3v0_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM3v0_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM3v0_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM3v0_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "elm", BSIM3v0_MOD_ELM, IF_REAL, "Non-quasi-static Elmore Constant Parameter"), IOP( "delta", BSIM3v0_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM3v0_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM3v0_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", BSIM3v0_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM3v0_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM3v0_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM3v0_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM3v0_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM3v0_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM3v0_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM3v0_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM3v0_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pscbe1", BSIM3v0_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM3v0_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM3v0_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "js", BSIM3v0_MOD_JS, IF_REAL, "Source/drain junction reverse saturation current density"), IOP( "pb", BSIM3v0_MOD_PB, IF_REAL, "Source/drain junction built-in potential"), IOP( "mj", BSIM3v0_MOD_MJ, IF_REAL, "Source/drain bottom junction capacitance grading coefficient"), IOP( "pbsw", BSIM3v0_MOD_PBSW, IF_REAL, "Source/drain sidewall junction capacitance built in potential"), IOP( "mjsw", BSIM3v0_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP( "cj", BSIM3v0_MOD_CJ, IF_REAL, "Source/drain bottom junction capacitance per unit area"), IOP( "cjsw", BSIM3v0_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance per unit area"), IOP( "lint", BSIM3v0_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM3v0_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "lln", BSIM3v0_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM3v0_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwn", BSIM3v0_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM3v0_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lmin", BSIM3v0_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM3v0_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM3v0_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM3v0_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM3v0_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM3v0_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM3v0_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wln", BSIM3v0_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM3v0_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwn", BSIM3v0_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM3v0_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wmin", BSIM3v0_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM3v0_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM3v0_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM3v0_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM3v0_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM3v0_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", BSIM3v0_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", BSIM3v0_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM3v0_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM3v0_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM3v0_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM3v0_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", BSIM3v0_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM3v0_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "lcdsc", BSIM3v0_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM3v0_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM3v0_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM3v0_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM3v0_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM3v0_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM3v0_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM3v0_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM3v0_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM3v0_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM3v0_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM3v0_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM3v0_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM3v0_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lnch", BSIM3v0_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lngate", BSIM3v0_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM3v0_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM3v0_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM3v0_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM3v0_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM3v0_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM3v0_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM3v0_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM3v0_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM3v0_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM3v0_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM3v0_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM3v0_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM3v0_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", BSIM3v0_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", BSIM3v0_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM3v0_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM3v0_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM3v0_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM3v0_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM3v0_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM3v0_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM3v0_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM3v0_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM3v0_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM3v0_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM3v0_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM3v0_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM3v0_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM3v0_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM3v0_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lu0", BSIM3v0_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM3v0_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM3v0_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lelm", BSIM3v0_MOD_LELM, IF_REAL, "Length dependence of elm"), IOP( "ldelta", BSIM3v0_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM3v0_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwg", BSIM3v0_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM3v0_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM3v0_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM3v0_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM3v0_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM3v0_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM3v0_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM3v0_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM3v0_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpscbe1", BSIM3v0_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM3v0_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM3v0_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM3v0_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM3v0_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM3v0_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM3v0_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM3v0_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM3v0_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM3v0_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappa", BSIM3v0_MOD_LCKAPPA, IF_REAL, "Length dependence of ckappa"), IOP( "lcf", BSIM3v0_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM3v0_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM3v0_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM3v0_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lbeta0", BSIM3v0_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "wcdsc", BSIM3v0_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM3v0_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM3v0_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM3v0_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM3v0_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM3v0_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM3v0_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM3v0_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM3v0_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM3v0_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM3v0_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM3v0_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM3v0_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM3v0_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wnch", BSIM3v0_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wngate", BSIM3v0_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM3v0_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM3v0_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM3v0_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM3v0_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM3v0_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM3v0_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM3v0_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM3v0_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM3v0_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM3v0_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM3v0_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM3v0_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM3v0_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", BSIM3v0_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", BSIM3v0_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM3v0_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM3v0_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM3v0_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM3v0_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM3v0_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM3v0_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM3v0_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM3v0_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM3v0_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM3v0_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM3v0_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM3v0_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM3v0_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM3v0_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM3v0_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wu0", BSIM3v0_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM3v0_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM3v0_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "welm", BSIM3v0_MOD_WELM, IF_REAL, "Width dependence of elm"), IOP( "wdelta", BSIM3v0_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM3v0_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwg", BSIM3v0_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM3v0_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM3v0_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM3v0_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM3v0_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM3v0_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM3v0_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM3v0_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM3v0_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpscbe1", BSIM3v0_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM3v0_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM3v0_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM3v0_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM3v0_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM3v0_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM3v0_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM3v0_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM3v0_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM3v0_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappa", BSIM3v0_MOD_WCKAPPA, IF_REAL, "Width dependence of ckappa"), IOP( "wcf", BSIM3v0_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM3v0_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM3v0_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM3v0_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "wbeta0", BSIM3v0_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "pcdsc", BSIM3v0_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM3v0_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM3v0_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM3v0_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM3v0_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM3v0_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM3v0_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM3v0_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM3v0_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM3v0_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM3v0_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM3v0_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM3v0_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM3v0_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pnch", BSIM3v0_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pngate", BSIM3v0_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM3v0_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM3v0_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM3v0_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM3v0_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM3v0_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM3v0_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM3v0_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM3v0_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM3v0_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM3v0_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM3v0_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM3v0_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM3v0_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", BSIM3v0_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", BSIM3v0_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM3v0_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM3v0_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM3v0_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM3v0_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM3v0_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM3v0_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM3v0_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM3v0_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM3v0_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM3v0_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM3v0_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM3v0_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM3v0_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM3v0_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM3v0_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pu0", BSIM3v0_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM3v0_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM3v0_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pelm", BSIM3v0_MOD_PELM, IF_REAL, "Cross-term dependence of elm"), IOP( "pdelta", BSIM3v0_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM3v0_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwg", BSIM3v0_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM3v0_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM3v0_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM3v0_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM3v0_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM3v0_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM3v0_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM3v0_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM3v0_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppscbe1", BSIM3v0_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM3v0_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM3v0_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM3v0_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM3v0_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM3v0_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM3v0_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM3v0_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM3v0_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM3v0_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappa", BSIM3v0_MOD_PCKAPPA, IF_REAL, "Cross-term dependence of ckappa"), IOP( "pcf", BSIM3v0_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM3v0_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM3v0_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM3v0_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "pbeta0", BSIM3v0_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "noia", BSIM3v0_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM3v0_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM3v0_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", BSIM3v0_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM3v0_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM3v0_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM3v0_MOD_KF, IF_REAL, "Flicker noise coefficient"), IP( "nmos", BSIM3v0_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM3v0_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM3v0names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM3v0nSize = NUMELEMS(BSIM3v0names); int BSIM3v0pTSize = NUMELEMS(BSIM3v0pTable); int BSIM3v0mPTSize = NUMELEMS(BSIM3v0mPTable); int BSIM3v0iSize = sizeof(BSIM3v0instance); int BSIM3v0mSize = sizeof(BSIM3v0model); ngspice-26/src/spicelib/devices/bsim3v0/b3v0par.c0000644000265600020320000000626712264261473021153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1995 Min-Chie Jeng and Mansun Chan. File: b3v0par.c **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim3v0def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM3v0param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM3v0instance *here = (BSIM3v0instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM3v0_W: here->BSIM3v0w = value->rValue*scale; here->BSIM3v0wGiven = TRUE; break; case BSIM3v0_L: here->BSIM3v0l = value->rValue*scale; here->BSIM3v0lGiven = TRUE; break; case BSIM3v0_M: here->BSIM3v0m = value->rValue; here->BSIM3v0mGiven = TRUE; break; case BSIM3v0_AS: here->BSIM3v0sourceArea = value->rValue*scale*scale; here->BSIM3v0sourceAreaGiven = TRUE; break; case BSIM3v0_AD: here->BSIM3v0drainArea = value->rValue*scale*scale; here->BSIM3v0drainAreaGiven = TRUE; break; case BSIM3v0_PS: here->BSIM3v0sourcePerimeter = value->rValue*scale; here->BSIM3v0sourcePerimeterGiven = TRUE; break; case BSIM3v0_PD: here->BSIM3v0drainPerimeter = value->rValue*scale; here->BSIM3v0drainPerimeterGiven = TRUE; break; case BSIM3v0_NRS: here->BSIM3v0sourceSquares = value->rValue; here->BSIM3v0sourceSquaresGiven = TRUE; break; case BSIM3v0_NRD: here->BSIM3v0drainSquares = value->rValue; here->BSIM3v0drainSquaresGiven = TRUE; break; case BSIM3v0_OFF: here->BSIM3v0off = value->iValue; break; case BSIM3v0_IC_VBS: here->BSIM3v0icVBS = value->rValue; here->BSIM3v0icVBSGiven = TRUE; break; case BSIM3v0_IC_VDS: here->BSIM3v0icVDS = value->rValue; here->BSIM3v0icVDSGiven = TRUE; break; case BSIM3v0_IC_VGS: here->BSIM3v0icVGS = value->rValue; here->BSIM3v0icVGSGiven = TRUE; break; case BSIM3v0_NQSMOD: here->BSIM3v0nqsMod = value->iValue; here->BSIM3v0nqsModGiven = TRUE; break; case BSIM3v0_IC: switch(value->v.numValue){ case 3: here->BSIM3v0icVBS = *(value->v.vec.rVec+2); here->BSIM3v0icVBSGiven = TRUE; case 2: here->BSIM3v0icVGS = *(value->v.vec.rVec+1); here->BSIM3v0icVGSGiven = TRUE; case 1: here->BSIM3v0icVDS = *(value->v.vec.rVec); here->BSIM3v0icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cktaccept.h0000644000265600020320000000006312264261473020345 0ustar andreasadmin#ifndef _CKTACCEPT_H #define _CKTACCEPT_H #endif ngspice-26/src/spicelib/devices/txl/0000755000265600020320000000000012264261711017036 5ustar andreasadminngspice-26/src/spicelib/devices/txl/txlext.h0000644000265600020320000000116112264261473020543 0ustar andreasadmin extern int TXLaccept(CKTcircuit*,GENmodel*); extern int TXLask(CKTcircuit*, GENinstance*, int, IFvalue*, IFvalue*); extern int TXLdelete(GENmodel*,IFuid,GENinstance**); extern void TXLdestroy(GENmodel**); extern int TXLfindBr(CKTcircuit*, GENmodel*, IFuid); extern int TXLload(GENmodel*,CKTcircuit*); extern int TXLmodAsk(CKTcircuit*, GENmodel*, int, IFvalue*); extern int TXLmDelete(GENmodel**,IFuid,GENmodel*); extern int TXLmParam(int,IFvalue*,GENmodel*); extern int TXLparam(int,IFvalue*,GENinstance*,IFvalue*); extern int TXLsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int TXLunsetup(GENmodel*, CKTcircuit*); ngspice-26/src/spicelib/devices/txl/txl.c0000644000265600020320000000222612264261473020020 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "txldefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" IFparm TXLpTable[] = { IP("pos_node", TXL_IN_NODE, IF_INTEGER,"Positive node of txl"), IP("neg_node", TXL_OUT_NODE, IF_INTEGER,"Negative node of txl"), IOP("length", TXL_LENGTH, IF_REAL,"length of line"), }; IFparm TXLmPTable[] = { /* model parameters */ IOP( "r", TXL_R, IF_REAL,"resistance per length"), IOP( "l", TXL_L, IF_REAL,"inductance per length"), IOP( "c", TXL_C, IF_REAL,"capacitance per length"), IOP( "g", TXL_G, IF_REAL,"conductance per length"), IOP( "length", TXL_length, IF_REAL,"length"), IP( "txl", TXL_MOD_R, IF_FLAG,"Device is a txl model"), }; char *TXLnames[] = { "Y+", "Y-" }; int TXLnSize = NUMELEMS(TXLnames); int TXLiSize = sizeof(TXLinstance); int TXLmSize = sizeof(TXLmodel); int TXLmPTSize = NUMELEMS(TXLmPTable); int TXLpTSize = NUMELEMS(TXLpTable); ngspice-26/src/spicelib/devices/txl/txldefs.h0000644000265600020320000000511312264261473020665 0ustar andreasadmin#ifndef TXL #define TXL #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" #include "ngspice/swec.h" /* information used to describe a single instance */ typedef struct sTXLinstance { struct sTXLmodel *TXLmodPtr; /* backpointer to model */ struct sTXLinstance *TXLnextInstance; /* pointer to next instance of * current model*/ IFuid TXLname; /* pointer to character string naming this instance */ int dimensions; /* may we not need this but ... */ int TXLposNode; int TXLnegNode; double TXLlength; int TXLibr1; int TXLibr2; TXLine *txline; /* pointer to SWEC txline type */ TXLine *txline2; /* pointer to SWEC txline type. temporary storage */ char *in_node_name; char *out_node_name; int TXLbranch; /* unused */ double *TXLposPosptr; double *TXLposNegptr; double *TXLnegPosptr; double *TXLnegNegptr; double *TXLibr1Posptr; double *TXLibr2Negptr; double *TXLposIbr1ptr; double *TXLnegIbr2ptr; double *TXLibr1Negptr; double *TXLibr2Posptr; double *TXLibr1Ibr1ptr; double *TXLibr2Ibr2ptr; double *TXLibr1Ibr2ptr; double *TXLibr2Ibr1ptr; unsigned TXLibr1Given : 1; unsigned TXLibr2Given : 1; unsigned TXLdcGiven : 1; unsigned TXLlengthgiven : 1; /* flag to indicate that instance parameter len is specified */ } TXLinstance ; /* per model data */ typedef struct sTXLmodel { /* model structure for a txl */ int TXLmodType; /* type index of this device type */ struct sTXLmodel *TXLnextModel; /* pointer to next possible model in * linked list */ TXLinstance * TXLinstances; /* pointer to list of instances that have this * model */ IFuid TXLmodName; /* pointer to character string naming this model */ double R; double L; double G; double C; double length; unsigned Rgiven : 1; /* flag to indicate R was specified */ unsigned Lgiven : 1; /* flag to indicate L was specified */ unsigned Ggiven : 1; /* flag to indicate G was specified */ unsigned Cgiven : 1; /* flag to indicate C was specified */ unsigned lengthgiven : 1; /* flag to indicate length was specified */ } TXLmodel; /* instance parameters */ #define TXL_IN_NODE 1 #define TXL_OUT_NODE 2 #define TXL_LENGTH 3 /* model parameters */ #define TXL_R 101 #define TXL_C 102 #define TXL_G 103 #define TXL_L 104 #define TXL_length 105 #define TXL_MOD_R 106 #include "txlext.h" extern VI_list_txl *pool_vi_txl; #endif /*TXL*/ ngspice-26/src/spicelib/devices/txl/txlitf.h0000644000265600020320000000031112264261473020521 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #ifndef DEV_TXL #define DEV_TXL SPICEdev *get_txl_info(void); #endif ngspice-26/src/spicelib/devices/txl/txlask.c0000644000265600020320000000160712264261473020521 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "txldefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int TXLask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { TXLinstance *fast = (TXLinstance *)inst; NG_IGNORE(select); NG_IGNORE(ckt); switch(which) { case TXL_OUT_NODE: value->iValue = fast->TXLnegNode; return(OK); case TXL_IN_NODE: value->iValue = fast->TXLposNode; return(OK); case TXL_LENGTH: value->rValue = fast->TXLlength; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/txl/txlload.c0000644000265600020320000004057012264261473020664 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* controlled_exit() */ static double ratio[MAX_CP_TX_LINES]; static int update_cnv_txl(TXLine*, double); static VI_list_txl *new_vi_txl(void); static void free_vi_txl(VI_list_txl*); static int add_new_vi_txl(TXLinstance*, CKTcircuit*, int); static int get_pvs_vi_txl(int, int, TXLine*, double*, double*, double*, double*, double*, double*, double*, double*); static int right_consts_txl(TXLine*, int, int, double, double, int, int, CKTcircuit*); static int update_delayed_cnv_txl(TXLine*, double); static int multC(double, double, double, double, double*, double*); static int expC(double, double, double, double*, double*); static void copy_tx(TXLine *, TXLine *); /*ARGSUSED*/ int TXLload(GENmodel *inModel, CKTcircuit *ckt) { TXLmodel *model = (TXLmodel *)inModel; TXLinstance *here; TXLine *tx, *tx2; int k, l; int time, time2; double h, h1, f; int hint; double hf; NODE *nd; double v, v1, g; int cond1; CKTnode *node; VI_list_txl *vi, *vi_before; int i, before, delta; double gmin; /* dc solution */ /* debug printf("before txlload\n"); SMPprint(ckt->CKTmatrix, NULL); */ h = ckt->CKTdelta; h1 = 0.5 * h; time2 = (int) (ckt->CKTtime * 1e12); hint = (int)(h * 1e12); hf = h * 1e12; time = (int) ((ckt->CKTtime - ckt->CKTdelta) * 1e12); cond1= ckt->CKTmode & MODEDC; gmin = 0.1 * ckt->CKTgmin; /* dc solution */ for( ; model != NULL; model = model->TXLnextModel ) { for (here = model->TXLinstances; here != NULL ; here=here->TXLnextInstance) { tx = here->txline; *here->TXLposPosptr += gmin; /* dc solution */ *here->TXLnegNegptr += gmin; *here->TXLnegPosptr += gmin; *here->TXLposNegptr += gmin; if (cond1 || tx->vi_head == NULL) continue; if (time < tx->vi_tail->time) { time = tx->vi_tail->time; hint = time2 - time; } vi_before = tx->vi_tail; before = tx->vi_tail->time; if (time > tx->vi_tail->time) { copy_tx(tx, here->txline2); add_new_vi_txl(here, ckt, time); delta = time - before; nd = tx->in_node; v = vi_before->v_i; nd->V = tx->vi_tail->v_i; v1 = nd->V; nd->dv = (v1 - v) / delta; nd = tx->out_node; v = vi_before->v_o; v1 = nd->V = tx->vi_tail->v_o; nd->dv = (v1 - v) / delta; if (tx->lsl) continue; update_cnv_txl(tx, delta); if (tx->ext) update_delayed_cnv_txl(tx, delta); } } } model = (TXLmodel *)inModel; for( ; model != NULL; model = model->TXLnextModel ) { for (here = model->TXLinstances; here != NULL ; here=here->TXLnextInstance) { tx = here->txline; tx2 = here->txline2; if (!tx->lsl && hf > tx->taul) { fprintf(stderr, "your time step is too large for TXL tau.\n"); /* fprintf(stderr, "please decrease max time step in .tran card.\n"); fprintf(stderr, ".tran tstep tstop tstart tmax.\n"); fprintf(stderr, "make tmax smaller than %e and try again.\n", tx->taul * 1e-12); return (1111); */ fprintf(stderr, "tmax is now set to %e.\n", 0.9 * tx->taul * 1e-12); ckt->CKTmaxStep = 0.9 * tx->taul * 1e-12; } if (cond1) { if (here->TXLlengthgiven) g = model->R * here->TXLlength; else g = model->R * here->TXLmodPtr->length; *(here->TXLposIbr1ptr) += 1.0; *(here->TXLnegIbr2ptr) += 1.0; *(here->TXLibr1Ibr1ptr) += 1.0; *(here->TXLibr1Ibr2ptr) += 1.0; *(here->TXLibr2Posptr) += 1.0; *(here->TXLibr2Negptr) -= 1.0; *(here->TXLibr2Ibr1ptr) -= g; continue; } /* dc setup */ if (here->TXLdcGiven == 0 && !cond1) { nd = tx->in_node; for (node = ckt->CKTnodes;node; node = node->next) { if (strcmp(nd->name->id, node->name) == 0) { tx->dc1 = tx2->dc1 = ckt->CKTrhsOld[node->number]; nd->V = tx->dc1; break; } } nd = tx->out_node; for (node = ckt->CKTnodes;node; node = node->next) { if (strcmp(nd->name->id, node->name) == 0) { tx->dc2 = tx2->dc2 = ckt->CKTrhsOld[node->number]; nd->V = tx->dc2; break; } } here->TXLdcGiven = 1; vi = new_vi_txl(); vi->time = 0; vi->i_i = *(ckt->CKTrhsOld + here->TXLibr1); vi->i_o = *(ckt->CKTrhsOld + here->TXLibr2); vi->v_i = tx->dc1; vi->v_o = tx->dc2; for (i = 0; i < 3; i++) { tx->h1_term[i].cnv_i = - tx->dc1 * tx->h1_term[i].c / tx->h1_term[i].x; tx->h1_term[i].cnv_o = - tx->dc2 * tx->h1_term[i].c / tx->h1_term[i].x; } for (i = 0; i < 3; i++) { tx->h2_term[i].cnv_i = 0.0; tx->h2_term[i].cnv_o = 0.0; } for (i = 0; i < 6; i++) { tx->h3_term[i].cnv_i = - tx->dc1 * tx->h3_term[i].c / tx->h3_term[i].x; tx->h3_term[i].cnv_o = - tx->dc2 * tx->h3_term[i].c / tx->h3_term[i].x; } vi->next = NULL; tx->vi_tail = vi; tx->vi_head = vi; here->txline2->vi_tail = vi; here->txline2->vi_head = vi; } /* change 6,6 1/18/93 *(here->TXLibr1Ibr1ptr) -= 1.0; *(here->TXLibr2Ibr2ptr) -= 1.0; *(here->TXLposIbr1ptr) += 1.0; *(here->TXLnegIbr2ptr) += 1.0; *(here->TXLibr1Posptr) += tx->sqtCdL + h1 * tx->h1C; *(here->TXLibr2Negptr) += tx->sqtCdL + h1 * tx->h1C; */ *(here->TXLibr1Ibr1ptr) = -1.0; *(here->TXLibr2Ibr2ptr) = -1.0; *(here->TXLposIbr1ptr) = 1.0; *(here->TXLnegIbr2ptr) = 1.0; *(here->TXLibr1Posptr) = tx->sqtCdL + h1 * tx->h1C; *(here->TXLibr2Negptr) = tx->sqtCdL + h1 * tx->h1C; k = here->TXLibr1; l = here->TXLibr2; copy_tx(tx2, tx); if (right_consts_txl(tx2, time, time2, h, h1, k, l, ckt)) { if (tx->lsl) { f = ratio[0] * tx->h3_aten; *(here->TXLibr1Negptr) = -f; *(here->TXLibr2Posptr) = -f; f = ratio[0] * tx->h2_aten; *(here->TXLibr1Ibr2ptr) = -f; *(here->TXLibr2Ibr1ptr) = -f; } else { tx->ext = 1; tx->ratio = ratio[0]; if (ratio[0] > 0.0) { f = ratio[0] * (h1 * (tx->h3_term[0].c + tx->h3_term[1].c + tx->h3_term[2].c + tx->h3_term[3].c + tx->h3_term[4].c + tx->h3_term[5].c ) + tx->h3_aten); *(here->TXLibr1Negptr) = -f; *(here->TXLibr2Posptr) = -f; f = ratio[0] * (h1 * ( tx->h2_term[0].c + tx->h2_term[1].c + tx->h2_term[2].c ) + tx->h2_aten); *(here->TXLibr1Ibr2ptr) = -f; *(here->TXLibr2Ibr1ptr) = -f; } } } else tx->ext = 0; } } if (cond1) return (OK); /* debug printf("after txlload\n"); SMPprint(ckt->CKTmatrix, NULL); */ return(OK); } static void copy_tx(TXLine *new, TXLine *old) { int i; VI_list_txl *temp; new->lsl = old->lsl; new->ext = old->ext; new->ratio = old->ratio; new->taul = old->taul; new->sqtCdL = old->sqtCdL; new->h2_aten = old->h2_aten; new->h3_aten = old->h3_aten; new->h1C = old->h1C; for (i= 0; i < 3; i++) { new->h1e[i] = old->h1e[i]; new->h1_term[i].c = old->h1_term[i].c; new->h1_term[i].x = old->h1_term[i].x; new->h1_term[i].cnv_i = old->h1_term[i].cnv_i; new->h1_term[i].cnv_o = old->h1_term[i].cnv_o; new->h2_term[i].c = old->h2_term[i].c; new->h2_term[i].x = old->h2_term[i].x; new->h2_term[i].cnv_i = old->h2_term[i].cnv_i; new->h2_term[i].cnv_o = old->h2_term[i].cnv_o; } for (i= 0; i < 6; i++) { new->h3_term[i].c = old->h3_term[i].c; new->h3_term[i].x = old->h3_term[i].x; new->h3_term[i].cnv_i = old->h3_term[i].cnv_i; new->h3_term[i].cnv_o = old->h3_term[i].cnv_o; } new->ifImg = old->ifImg; if (new->vi_tail != old->vi_tail) { /* someting wrong */ controlled_exit(0); } while (new->vi_head->time < old->vi_head->time) { temp = new->vi_head; new->vi_head = new->vi_head->next; free_vi_txl(temp); } } static int update_cnv_txl(TXLine *tx, double h) { int i; double ai, bi, ao, bo; double e, t; ai = tx->in_node->V; ao = tx->out_node->V; bi = tx->in_node->dv; bo = tx->out_node->dv; for (i = 0; i < 3; i++) { TERM *tm; tm = &(tx->h1_term[i]); e = tx->h1e[i]; t = tm->c / tm->x; bi *= t; bo *= t; tm->cnv_i = (tm->cnv_i - bi*h) * e + (e - 1.0)*(ai*t + 1.0e+12*bi/tm->x); tm->cnv_o = (tm->cnv_o - bo*h) * e + (e - 1.0)*(ao*t + 1.0e+12*bo/tm->x); } return (1); } static VI_list_txl *new_vi_txl(void) { VI_list_txl *q; if (pool_vi_txl) { q = pool_vi_txl; pool_vi_txl = pool_vi_txl->pool; return(q); } else return(TMALLOC(VI_list_txl, 1)); } static void free_vi_txl(VI_list_txl *q) { q->pool = pool_vi_txl; pool_vi_txl = q; } static int add_new_vi_txl(TXLinstance *here, CKTcircuit *ckt, int time) { VI_list_txl *vi; TXLine *tx, *tx2; tx = here->txline; tx2 = here->txline2; vi = new_vi_txl(); vi->time = time; tx->vi_tail->next = vi; tx2->vi_tail->next = vi; vi->next = NULL; tx->vi_tail = vi; tx2->vi_tail = vi; vi->v_i = *(ckt->CKTrhsOld + here->TXLposNode); vi->v_o = *(ckt->CKTrhsOld + here->TXLnegNode); vi->i_i = *(ckt->CKTrhsOld + here->TXLibr1); vi->i_o = *(ckt->CKTrhsOld + here->TXLibr2); return(1); } static int get_pvs_vi_txl(int t1, int t2, TXLine *tx, double *v1_i, double *v2_i, double *i1_i, double *i2_i, double *v1_o, double *v2_o, double *i1_o, double *i2_o) { double ta, tb; VI_list_txl *vi, *vi1; double f; int ext = 0; ta = t1 - tx->taul; tb = t2 - tx->taul; if (tb <= 0) { *v1_i = *v2_i = tx->dc1; *v2_o = *v1_o = tx->dc2; *i1_i = *i2_i = *i1_o = *i2_o = 0; return(ext); } if (ta <= 0) { *i1_i = *i1_o = 0.0; *v1_i = tx->dc1; *v1_o = tx->dc2; vi1 = tx->vi_head; vi = vi1->next; } else { vi1 = tx->vi_head; for (vi = vi1->next; vi->time < ta; vi = vi->next) { /* free_vi_txl(vi1); */ vi1 = vi; } f = (ta - vi1->time) / (vi->time - vi1->time); *v1_i = vi1->v_i + f * (vi->v_i - vi1->v_i); *v1_o = vi1->v_o + f * (vi->v_o - vi1->v_o); *i1_i = vi1->i_i + f * (vi->i_i - vi1->i_i); *i1_o = vi1->i_o + f * (vi->i_o - vi1->i_o); tx->vi_head = vi1; } if (tb > t1) { /* fprintf(stderr, "pvs: time = %d\n", t2); */ ext = 1; /* f = tb - t1; *v2_i = tx->in_node->V + tx->in_node->dv * f; *v2_o = tx->out_node->V + tx->out_node->dv * f; if (vi) { for (; vi->time != t1; vi = vi->next) vi1 = vi; f /= (double) (t1 - vi1->time); *i2_i = vi->i_i + f * (vi->i_i - vi1->i_i); *i2_o = vi->i_o + f * (vi->i_o - vi1->i_o); } else { *i2_i = vi1->i_i; *i2_o = vi1->i_o; } */ ratio[0] = f = (tb - t1) / (t2 - t1); if (vi) for (; vi->time != t1; vi = vi->next) ; else vi = vi1; f = 1 - f; *v2_i = vi->v_i * f; *v2_o = vi->v_o * f; *i2_i = vi->i_i * f; *i2_o = vi->i_o * f; } else { for (; vi->time < tb; vi = vi->next) vi1 = vi; f = (tb - vi1->time) / (vi->time - vi1->time); *v2_i = vi1->v_i + f * (vi->v_i - vi1->v_i); *v2_o = vi1->v_o + f * (vi->v_o - vi1->v_o); *i2_i = vi1->i_i + f * (vi->i_i - vi1->i_i); *i2_o = vi1->i_o + f * (vi->i_o - vi1->i_o); } return(ext); } static int right_consts_txl(TXLine *tx, int t, int time, double h, double h1, int l1, int l2, CKTcircuit *ckt) /*** h1 = 0.5 * h ***/ { int i; double ff=0.0, gg=0.0, e; double v1_i, v2_i, i1_i, i2_i; double v1_o, v2_o, i1_o, i2_o; int ext; if (! tx->lsl) { double ff1=0.0; for (i = 0; i < 3; i++) { tx->h1e[i] = e = exp(tx->h1_term[i].x * h); ff1 -= tx->h1_term[i].c * e; ff -= tx->h1_term[i].cnv_i * e; gg -= tx->h1_term[i].cnv_o * e; } ff += ff1 * h1 * tx->in_node->V; gg += ff1 * h1 * tx->out_node->V; } ext = get_pvs_vi_txl(t, time, tx, &v1_i, &v2_i, &i1_i, &i2_i, &v1_o, &v2_o, &i1_o, &i2_o); if (tx->lsl) { ff = tx->h3_aten * v2_o + tx->h2_aten * i2_o; gg = tx->h3_aten * v2_i + tx->h2_aten * i2_i; } else { if (tx->ifImg) { double a, b, er, ei, a1, b1, a2, b2; for (i = 0; i < 4; i++) { TERM *tm; tm = &(tx->h3_term[i]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (v1_i * e + v2_i); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (v1_o * e + v2_o); } expC(tx->h3_term[4].x, tx->h3_term[5].x, h, &er, &ei); a2 = h1 * tx->h3_term[4].c; b2 = h1 * tx->h3_term[5].c; a = tx->h3_term[4].cnv_i; b = tx->h3_term[5].cnv_i; multC(a, b, er, ei, &a, &b); multC(a2, b2, v1_i * er + v2_i, v1_i * ei, &a1, &b1); tx->h3_term[4].cnv_i = a + a1; tx->h3_term[5].cnv_i = b + b1; a = tx->h3_term[4].cnv_o; b = tx->h3_term[5].cnv_o; multC(a, b, er, ei, &a, &b); multC(a2, b2, v1_o * er + v2_o, v1_o * ei, &a1, &b1); tx->h3_term[4].cnv_o = a + a1; tx->h3_term[5].cnv_o = b + b1; ff += tx->h3_aten * v2_o; gg += tx->h3_aten * v2_i; for (i = 0; i < 5; i++) { ff += tx->h3_term[i].cnv_o; gg += tx->h3_term[i].cnv_i; } ff += tx->h3_term[4].cnv_o; gg += tx->h3_term[4].cnv_i; { TERM *tm; tm = &(tx->h2_term[0]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (i1_i * e + i2_i); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (i1_o * e + i2_o); } expC(tx->h2_term[1].x, tx->h2_term[2].x, h, &er, &ei); a2 = h1 * tx->h2_term[1].c; b2 = h1 * tx->h2_term[2].c; a = tx->h2_term[1].cnv_i; b = tx->h2_term[2].cnv_i; multC(a, b, er, ei, &a, &b); multC(a2, b2, i1_i * er + i2_i, i1_i * ei, &a1, &b1); tx->h2_term[1].cnv_i = a + a1; tx->h2_term[2].cnv_i = b + b1; a = tx->h2_term[1].cnv_o; b = tx->h2_term[2].cnv_o; multC(a, b, er, ei, &a, &b); multC(a2, b2, i1_o * er + i2_o, i1_o * ei, &a1, &b1); tx->h2_term[1].cnv_o = a + a1; tx->h2_term[2].cnv_o = b + b1; ff += tx->h2_aten * i2_o + tx->h2_term[0].cnv_o + 2.0 * tx->h2_term[1].cnv_o; gg += tx->h2_aten * i2_i + tx->h2_term[0].cnv_i + 2.0 * tx->h2_term[1].cnv_i; } else { for (i = 0; i < 6; i++) { TERM *tm; tm = &(tx->h3_term[i]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (v1_i * e + v2_i); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (v1_o * e + v2_o); } ff += tx->h3_aten * v2_o; gg += tx->h3_aten * v2_i; for (i = 0; i < 6; i++) { ff += tx->h3_term[i].cnv_o; gg += tx->h3_term[i].cnv_i; } for (i = 0; i < 3; i++) { TERM *tm; tm = &(tx->h2_term[i]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (i1_i * e + i2_i); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (i1_o * e + i2_o); } ff += tx->h2_aten * i2_o; gg += tx->h2_aten * i2_i; for (i = 0; i < 3; i++) { ff += tx->h2_term[i].cnv_o; gg += tx->h2_term[i].cnv_i; } } } *(ckt->CKTrhs + l1) = ff; *(ckt->CKTrhs + l2) = gg; return(ext); } static int update_delayed_cnv_txl(TXLine *tx, double h) { double ratio; double f; VI_list_txl *vi; TERM *tms; h *= 0.5e-12; ratio = tx->ratio; vi = tx->vi_tail; if (ratio > 0.0) { tms = tx->h3_term; f = h * ratio * vi->v_i; tms[0].cnv_i += f * tms[0].c; tms[1].cnv_i += f * tms[1].c; tms[2].cnv_i += f * tms[2].c; tms[3].cnv_i += f * tms[3].c; tms[4].cnv_i += f * tms[4].c; tms[5].cnv_i += f * tms[5].c; f = h * ratio * vi->v_o; tms[0].cnv_o += f * tms[0].c; tms[1].cnv_o += f * tms[1].c; tms[2].cnv_o += f * tms[2].c; tms[3].cnv_o += f * tms[3].c; tms[4].cnv_o += f * tms[4].c; tms[5].cnv_o += f * tms[5].c; tms = tx->h2_term; f = h * ratio * vi->i_i; tms[0].cnv_i += f * tms[0].c; tms[1].cnv_i += f * tms[1].c; tms[2].cnv_i += f * tms[2].c; f = h * ratio * vi->i_o; tms[0].cnv_o += f * tms[0].c; tms[1].cnv_o += f * tms[1].c; tms[2].cnv_o += f * tms[2].c; } return(1); } static int expC(double ar, double ai, double h, double *cr, double *ci) { double e, cs, si; e = exp(ar * h); cs = cos(ai * h); si = sin(ai * h); *cr = e * cs; *ci = e * si; return(1); } static int multC(double ar, double ai, double br, double bi, double *cr, double *ci) { register double tp; tp = ar*br - ai*bi; *ci = ar*bi + ai*br; *cr = tp; return (1); } ngspice-26/src/spicelib/devices/txl/txlmdel.c0000644000265600020320000000173712264261473020670 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TXLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { TXLmodel **model = (TXLmodel **)inModel; TXLmodel *modfast = (TXLmodel *)kill; TXLinstance *here; TXLinstance *prev = NULL; TXLmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->TXLnextModel)) { if( (*model)->TXLmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->TXLnextModel; /* cut deleted device out of list */ for(here = (*model)->TXLinstances ; here ; here = here->TXLnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/txl/txlmpar.c0000644000265600020320000000211212264261473020672 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TXLmParam(int param, IFvalue *value, GENmodel *inModel) { register TXLmodel *model = (TXLmodel *)inModel; switch(param) { case TXL_R: model->R = value->rValue; model->Rgiven = TRUE; break; case TXL_L: model->L = value->rValue; model->Lgiven = TRUE; break; case TXL_G: model->G = value->rValue; model->Ggiven = TRUE; break; case TXL_C: model->C = value->rValue; model->Cgiven = TRUE; break; case TXL_length: model->length = value->rValue; model->lengthgiven = TRUE; break; case TXL_MOD_R: break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/txl/txldest.c0000644000265600020320000000136412264261473020702 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "txldefs.h" #include "ngspice/suffix.h" void TXLdestroy(GENmodel **inModel) { TXLmodel **model = (TXLmodel **)inModel; TXLinstance *here; TXLinstance *prev = NULL; TXLmodel *mod = *model; TXLmodel *oldmod = NULL; for( ; mod ; mod = mod->TXLnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->TXLinstances ; here ; here = here->TXLnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/txl/txlmask.c0000644000265600020320000000201312264261473020666 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #include "ngspice/swec.h" /* ARGSUSED */ int TXLmodAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { TXLmodel *model = (TXLmodel *)inModel; NG_IGNORE(ckt); switch(which) { case TXL_R: value->rValue = model->R; return(OK); case TXL_C: value->rValue = model->C; return(OK); case TXL_G: value->rValue = model->G; return(OK); case TXL_L: value->rValue = model->L; return(OK); case TXL_length: value->rValue = model->length; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/txl/txlsetup.c0000644000265600020320000006505612264261473021113 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/fteext.h" #include "ngspice/smpdefs.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* controlled_exit() */ static int ReadTxL(TXLinstance*, CKTcircuit*); /*static int multC();*/ static int main_pade(double, double, double, double, double, TXLine*); static int mac(double, double, double*, double*, double*, double*, double*); /*static int divC();*/ static int div_C(double, double, double, double, double*, double*); static int div3(double, double, double, double, double*, double*); /*static double approx1();*/ /*static double approx2();*/ static int find_roots(double, double, double, double*, double*, double*); /*static double f3();*/ /*static double f2();*/ /*static int expC();*/ /*static double exp_approx1();*/ /*static double exp_approx2();*/ static int exp_pade(double, double, double, double, double, TXLine*); /*static int exp_div3();*/ static int exp_find_roots(double, double, double, double*, double*, double* ); static double eval2(double, double, double, double); static int get_c(double, double, double, double, double, double, double, double*, double*); static int get_h3(TXLine*); static int Gaussian_Elimination2(int); static int Gaussian_Elimination1(int); static int pade(double); static int update_h1C_c(TXLine *); static void y_pade(double, double, double, double, TXLine*); static double root3(double, double, double, double); static NDnamePt insert_ND(char*, NDnamePt*); static NODE *insert_node(char*); static NODE *NEW_node(void); /*static VI_list_txl *new_vi_txl();*/ NODE *node_tab = NULL; NDnamePt ndn = NULL; VI_list_txl *pool_vi_txl = NULL; /* pade.c */ /** static double xx1, xx2, xx3, xx4, xx5, xx6; static double cc1, cc2, cc3, cc4, cc5, cc6; **/ /* y.c */ static double sqtCdL; static double b1, b2, b3, b4, b5; static double p1, p2, p3, q1, q2, q3; static double c1, c2, c3, x1, x2, x3; static double A[3][4]; /* exp.c */ static double RdL, GdC, RG, tau, RC, GL; static double a0, a1, a2, a3, a4, a5; static double ep1, ep2, ep3, eq1, eq2, eq3; static double ec1, ec2, ec3, ex1, ex2, ex3; static int ifImg; static double AA[3][4]; #define epsi 1.0e-16 #define epsi2 1.0e-28 /* ARGSUSED */ int TXLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state) { TXLmodel *model = (TXLmodel *)inModel; TXLinstance *here; CKTnode *tmp; int error; NG_IGNORE(state); /* loop through all the models */ for( ; model != NULL; model = model->TXLnextModel ) { if (!model->Rgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line series resistance not given", &(model->TXLmodName)); return(E_BADPARM); } if (!model->Ggiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line parallel conductance not given", &(model->TXLmodName)); return(E_BADPARM); } if (!model->Lgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line series inductance not given", &(model->TXLmodName)); return (E_BADPARM); } if (!model->Cgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line parallel capacitance not given", &(model->TXLmodName)); return (E_BADPARM); } if (!model->lengthgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line length must be given", &(model->TXLmodName)); return (E_BADPARM); } /* loop through all the instances of the model */ for (here = model->TXLinstances; here != NULL ; here=here->TXLnextInstance) { /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) if (! here->TXLibr1Given) { error = CKTmkCur(ckt, &tmp, here->TXLname, "branch1"); if (error) return (error); here->TXLibr1 = tmp->number; } if (! here->TXLibr2Given) { error = CKTmkCur(ckt, &tmp, here->TXLname, "branch2"); if (error) return (error); here->TXLibr2 = tmp->number; } TSTALLOC(TXLposPosptr, TXLposNode, TXLposNode); TSTALLOC(TXLposNegptr, TXLposNode, TXLnegNode); TSTALLOC(TXLnegPosptr, TXLnegNode, TXLposNode); TSTALLOC(TXLnegNegptr, TXLnegNode, TXLnegNode); TSTALLOC(TXLibr1Posptr, TXLibr1, TXLposNode); TSTALLOC(TXLibr2Negptr, TXLibr2, TXLnegNode); TSTALLOC(TXLnegIbr2ptr, TXLnegNode, TXLibr2); TSTALLOC(TXLposIbr1ptr, TXLposNode, TXLibr1); TSTALLOC(TXLibr1Ibr1ptr, TXLibr1, TXLibr1); TSTALLOC(TXLibr2Ibr2ptr, TXLibr2, TXLibr2); TSTALLOC(TXLibr1Negptr, TXLibr1, TXLnegNode); TSTALLOC(TXLibr2Posptr, TXLibr2, TXLposNode); TSTALLOC(TXLibr1Ibr2ptr, TXLibr1, TXLibr2); TSTALLOC(TXLibr2Ibr1ptr, TXLibr2, TXLibr1); here->in_node_name = CKTnodName(ckt,here->TXLposNode); here->out_node_name = CKTnodName(ckt,here->TXLnegNode); ReadTxL(here, ckt); } } return(OK); } int TXLunsetup(GENmodel *inModel, CKTcircuit *ckt) { TXLmodel *model; TXLinstance *here; for (model = (TXLmodel *) inModel; model != NULL; model = model->TXLnextModel) { for (here = model->TXLinstances; here != NULL; here = here->TXLnextInstance) { if (here->TXLibr1) { CKTdltNNum(ckt, here->TXLibr1); here->TXLibr1 = 0; } if (here->TXLibr2) { CKTdltNNum(ckt, here->TXLibr2); here->TXLibr2 = 0; } here->TXLdcGiven=0; } } return OK; } /*** static VI_list_txl *new_vi_txl(void) { VI_list_txl *q; if (pool_vi_txl) { q = pool_vi_txl; pool_vi_txl = pool_vi_txl->pool; return(q); } else return(TMALLOC(VI_list_txl, 1)); } ***/ static int ReadTxL(TXLinstance *tx, CKTcircuit *ckt) { double R, L, G, C, l; char *p, *n; NODE *nd; ETXLine *et; TXLine *t, *t2; RLINE *line; ERLINE *er; double LL = 1e-12; NG_IGNORE(ckt); p = tx->in_node_name; n = tx->out_node_name; line = TMALLOC(RLINE, 1); er = TMALLOC(ERLINE, 1); et = TMALLOC(ETXLine, 1); t = TMALLOC(TXLine, 1); t2 = TMALLOC(TXLine, 1); tx->txline = t; tx->txline2 = t2; t->newtp = 0; t2->newtp = 0; t->vi_head = t->vi_tail = NULL; nd = insert_node(p); et->link = nd->tptr; nd->tptr = et; et->line = t; t->in_node = nd; t2->in_node = nd; er->link = nd->rlptr; nd->rlptr = er; er->rl = line; line->in_node = nd; et = TMALLOC(ETXLine, 1); nd = insert_node(n); et->link = nd->tptr; nd->tptr = et; et->line = t; t->out_node = nd; t2->out_node = nd; er = TMALLOC(ERLINE, 1); er->link = nd->rlptr; nd->rlptr = er; er->rl = line; line->out_node = nd; t->dc1 = t->dc2 = 0.0; t2->dc1 = t2->dc2 = 0.0; t->lsl = 0; t2->lsl = 0; l = 0.0; R = tx->TXLmodPtr->R; L = tx->TXLmodPtr->L; L = MAX(L, LL); C = tx->TXLmodPtr->C; G = tx->TXLmodPtr->G; if (tx->TXLlengthgiven == TRUE) l = tx->TXLlength; else l = tx->TXLmodPtr->length; if (l == 0.0) { fprintf(stderr, "(Error) transmission line of zero length\n"); controlled_exit(EXIT_FAILURE); } else { if (R / L < 5.0e+5) { line->g = 1.0e+2; if (G < 1.0e-2) { t->lsl = 1; /* lossless line */ t->taul = sqrt(C * L) * l * 1.0e12; t->h3_aten = t->sqtCdL = sqrt(C / L); t->h2_aten = 1.0; t->h1C = 0.0; } } else line->g = 1.0 / (R * l); } if (! t->lsl) main_pade(R, L, G, C, l, t); return(1); } /**************************************************************** pade.c : Calculate the Pade Approxximation of Y(s) ****************************************************************/ static int main_pade(double R, double L, double G, double C, double l, TXLine *h) { y_pade(R, L, G, C, h); h->ifImg = exp_pade(R, L, G, C, l, h); get_h3(h); h->taul *= 1.0e12; update_h1C_c(h); return(1); } static int div_C(double ar, double ai, double br, double bi, double *cr, double *ci) { *cr = ar * br + ai * bi; *ci = - ar * bi + ai * br; *cr = *cr / (br * br + bi * bi); *ci = *ci / (br * br + bi * bi); return (1); } /*** static int expC(ar, ai, h, cr, ci) double ar, ai, *cr, *ci; float h; { double e, cs, si; e = exp((double) ar * h); cs = cos((double) ai * h); si = sin((double) ai * h); *cr = e * cs; *ci = e * si; return(1); } ***/ /*** static int multC(ar, ai, br, bi, cr, ci) double ar, ai, br, bi; double *cr, *ci; { *cr = ar*br - ai*bi; *ci = ar*bi + ai*br; return(1); } ***/ /*** static int divC(ar, ai, br, bi, cr, ci) double ar, ai, br, bi; double *cr, *ci; { double t; t = br*br + bi*bi; *cr = (ar*br + ai*bi) / t; *ci = (ai*br - ar*bi) / t; return(1); } ***/ static int get_h3(TXLine *h) { double cc1, cc2, cc3, cc4, cc5, cc6; double xx1, xx2, xx3, xx4, xx5, xx6; h->h3_aten = h->h2_aten * h->sqtCdL; h->h3_term[0].x = xx1 = h->h1_term[0].x; h->h3_term[1].x = xx2 = h->h1_term[1].x; h->h3_term[2].x = xx3 = h->h1_term[2].x; h->h3_term[3].x = xx4 = h->h2_term[0].x; h->h3_term[4].x = xx5 = h->h2_term[1].x; h->h3_term[5].x = xx6 = h->h2_term[2].x; cc1 = h->h1_term[0].c; cc2 = h->h1_term[1].c; cc3 = h->h1_term[2].c; cc4 = h->h2_term[0].c; cc5 = h->h2_term[1].c; cc6 = h->h2_term[2].c; if (h->ifImg) { double r, i; h->h3_term[0].c = cc1 + cc1 * (cc4/(xx1-xx4) + 2.0*(cc5*xx1-xx6*cc6-xx5*cc5)/(xx1*xx1-2.0*xx5*xx1+xx5*xx5+xx6*xx6)); h->h3_term[1].c = cc2 + cc2 * (cc4/(xx2-xx4) + 2.0*(cc5*xx2-xx6*cc6-xx5*cc5)/(xx2*xx2-2.0*xx5*xx2+xx5*xx5+xx6*xx6)); h->h3_term[2].c = cc3 + cc3 * (cc4/(xx3-xx4) + 2.0*(cc5*xx3-xx6*cc6-xx5*cc5)/(xx3*xx3-2.0*xx5*xx3+xx5*xx5+xx6*xx6)); h->h3_term[3].c = cc4 + cc4 * (cc1/(xx4-xx1) + cc2/(xx4-xx2) + cc3/(xx4-xx3)); h->h3_term[4].c = cc5; h->h3_term[5].c = cc6; div_C(cc5, cc6, xx5-xx1, xx6, &r, &i); h->h3_term[4].c += r * cc1; h->h3_term[5].c += i * cc1; div_C(cc5, cc6, xx5-xx2, xx6, &r, &i); h->h3_term[4].c += r * cc2; h->h3_term[5].c += i * cc2; div_C(cc5, cc6, xx5-xx3, xx6, &r, &i); h->h3_term[4].c += r * cc3; h->h3_term[5].c += i * cc3; } else { h->h3_term[0].c = cc1 + cc1 * (cc4/(xx1-xx4) + cc5/(xx1-xx5) + cc6/(xx1-xx6)); h->h3_term[1].c = cc2 + cc2 * (cc4/(xx2-xx4) + cc5/(xx2-xx5) + cc6/(xx2-xx6)); h->h3_term[2].c = cc3 + cc3 * (cc4/(xx3-xx4) + cc5/(xx3-xx5) + cc6/(xx3-xx6)); h->h3_term[3].c = cc4 + cc4 * (cc1/(xx4-xx1) + cc2/(xx4-xx2) + cc3/(xx4-xx3)); h->h3_term[4].c = cc5 + cc5 * (cc1/(xx5-xx1) + cc2/(xx5-xx2) + cc3/(xx5-xx3)); h->h3_term[5].c = cc6 + cc6 * (cc1/(xx6-xx1) + cc2/(xx6-xx2) + cc3/(xx6-xx3)); } return(1); } static int update_h1C_c(TXLine *h) { int i; double d = 0; for (i = 0; i < 3; i++) { h->h1_term[i].c *= h->sqtCdL; d += h->h1_term[i].c; } h->h1C = d; for (i = 0; i < 3; i++) h->h2_term[i].c *= h->h2_aten; for (i = 0; i < 6; i++) h->h3_term[i].c *= h->h3_aten; return(1); } /**************************************************************** y.c : Calculate the Pade Approximation of Y(s) ****************************************************************/ static double eval2(double a, double b, double c, double x) { return(a*x*x + b*x + c); } /*** static double approx1(st) double st; { double s3, s2, s1; s1 = st; s2 = s1 * s1; s3 = s2 * s1; return((s3 + q1*s2 + q2*s1 + q3) / (s3 + p1*s2 + p2*s1 + p3)); } ***/ /*** static double approx2(st) double st; { return(1.0 + c1/(st - x1) + c2/(st - x2) + c3/(st - x3)); } ***/ static void y_pade(double R, double L, double G, double C, TXLine *h) { /* float RdL, GdC; */ double RdL, GdC; sqtCdL = sqrt(C / L); RdL = R / L; GdC = G / C; mac(GdC, RdL, &b1, &b2, &b3, &b4, &b5); A[0][0] = 1.0 - sqrt(GdC / RdL); A[0][1] = b1; A[0][2] = b2; A[0][3] = -b3; A[1][0] = b1; A[1][1] = b2; A[1][2] = b3; A[1][3] = -b4; A[2][0] = b2; A[2][1] = b3; A[2][2] = b4; A[2][3] = -b5; Gaussian_Elimination1(3); p3 = A[0][3]; p2 = A[1][3]; p1 = A[2][3]; q1 = p1 + b1; q2 = b1 * p1 + p2 + b2; q3 = p3 * sqrt(GdC / RdL); find_roots(p1, p2, p3, &x1, &x2, &x3); c1 = eval2(q1 - p1, q2 - p2, q3 - p3, x1) / eval2(3.0, 2.0 * p1, p2, x1); c2 = eval2(q1 - p1, q2 - p2, q3 - p3, x2) / eval2(3.0, 2.0 * p1, p2, x2); c3 = eval2(q1 - p1, q2 - p2, q3 - p3, x3) / eval2(3.0, 2.0 * p1, p2, x3); h->sqtCdL = sqtCdL; h->h1_term[0].c = c1; h->h1_term[1].c = c2; h->h1_term[2].c = c3; h->h1_term[0].x = x1; h->h1_term[1].x = x2; h->h1_term[2].x = x3; } static int Gaussian_Elimination1(int dims) { int i, j, k, dim; double f; int imax; double max; dim = dims; for (i = 0; i < dim; i++) { imax = i; max = ABS(A[i][i]); for (j = i+1; j < dim; j++) if (ABS(A[j][i]) > max) { imax = j; max = ABS(A[j][i]); } if (max < epsi) { fprintf(stderr, " can not choose a pivot \n"); controlled_exit(EXIT_FAILURE); } if (imax != i) for (k = i; k <= dim; k++) { f = A[i][k]; A[i][k] = A[imax][k]; A[imax][k] = f; } f = 1.0 / A[i][i]; A[i][i] = 1.0; for (j = i+1; j <= dim; j++) A[i][j] *= f; for (j = 0; j < dim ; j++) { if (i == j) continue; f = A[j][i]; A[j][i] = 0.0; for (k = i+1; k <= dim; k++) A[j][k] -= f * A[i][k]; } } return(1); } static double root3(double a1, double a2, double a3, double x) { double t1, t2; t1 = x*x*x + a1*x*x + a2*x + a3; t2 = 3.0*x*x + 2.0*a1*x + a2; return(x - t1 / t2); } static int div3(double a1, double a2, double a3, double x, double *p1, double *p2) { NG_IGNORE(a2); *p1 = a1 + x; *p2 = - a3 / x; return(1); } /**************************************************************** Calculate the Maclaurin series of F(z) F(z) = sqrt((1+az) / (1+bz)) = 1 + b1 z + b2 z^2 + b3 z^3 + b4 z^4 + b5 z^5 ****************************************************************/ /*** static double f3(double a, double b, double z) { double t4, t3, t2, t1; double t14, t13, t12, t11; double sqt11; t1 = 1 / (1.0 + b * z); t2 = t1 * t1; t3 = t2 * t1; t4 = t3 * t1; t11 = (1.0 + a * z) * t1; t12 = (1.0 + a * z) * t2; t13 = (1.0 + a * z) * t3; t14 = (1.0 + a * z) * t4; sqt11 = sqrt(t11); return( -0.5 * (-2.0*a*b*t2 + 2.0*b*b*t13) * (a*t1 - b*t12) / (t11*sqt11) +3.0/8.0 * (a*t1-b*t12)*(a*t1-b*t12)*(a*t1-b*t12) / (t11*t11*sqt11) +0.5 * (4.0*a*b*b*t3 + 2.0*a*b*b*t3 - 6.0*b*b*b*t14) / sqt11 -0.25 * (-2.0*a*b*t2 + 2.0*b*b*t13) * (a*t1-b*(1.0+a*z)) / (t11*sqt11) ); } ***/ /*** static double f2(a, b, z) double a, b, z; { double t3, t2, t1; double t13, t12, t11; double sqt11; t1 = 1 / (1.0 + b * z); t2 = t1 * t1; t3 = t2 * t1; t11 = (1.0 + a * z) * t1; t12 = (1.0 + a * z) * t2; t13 = (1.0 + a * z) * t3; sqt11 = sqrt(t11); return( -0.25 * (a*t1-b*t12) * (a*t1-b*t12) / (t11*sqt11) +0.5 * (-2.0*a*b*t2 + 2.0*b*b*t13) / sqt11 ); } ***/ static int mac(double at, double bt, double *b1, double *b2, double *b3, double *b4, double *b5) /* float at, bt; */ { double a, b; double y1, y2, y3, y4, y5; a = at; b = bt; y1 = *b1 = 0.5 * (a - b); y2 = 0.5 * (3.0 * b * b - 2.0 * a * b - a * a) * y1 / (a - b); y3 = ((3.0 * b * b + a * a) * y1 * y1 + 0.5 * (3.0 * b * b - 2.0 * a * b - a * a) * y2) / (a - b); y4 = ((3.0 * b * b - 3.0 * a * a) * y1 * y1 * y1 + (9.0 * b * b + 3.0 * a * a) * y1 * y2 + 0.5 * (3.0 * b * b - 2.0 * a * b - a * a) * y3) / (a - b); y5 = (12.0 * a * a * y1 * y1 * y1 * y1 + y1 * y1 * y2 * ( 18.0 * b * b - 18.0 * a * a) + (9.0 * b * b + 3.0 * a * a) * (y2 * y2 + y1 * y3) + (3.0 * b * b + a * a) * y1 * y3 + 0.5 * (3.0 * b * b - 2.0 * a * b - a * a) * y4) / (a - b); *b2 = y2 / 2.0; *b3 = y3 / 6.0; *b4 = y4 / 24.0; *b5 = y5 / 120.0; return(1); } /**************************************************** exp.c ****************************************************/ /*** static double exp_approx1(double st) { double s3, s2, s1; s1 = st; s2 = s1 * s1; s3 = s2 * s1; return(exp((double) - st * tau - a0) * (s3 + eq1*s2 + eq2*s1 + eq3) / (s3 + ep1*s2 + ep2*s1 + ep3)); } ***/ static int get_c(double eq1, double eq2, double eq3, double ep1, double ep2, double a, double b, double *cr, double *ci) { double d, n; d = (3.0*(a*a-b*b)+2.0*ep1*a+ep2)*(3.0*(a*a-b*b)+2.0*ep1*a+ep2); d += (6.0*a*b+2.0*ep1*b)*(6.0*a*b+2.0*ep1*b); n = -(eq1*(a*a-b*b)+eq2*a+eq3)*(6.0*a*b+2.0*ep1*b); n += (2.0*eq1*a*b+eq2*b)*(3.0*(a*a-b*b)+2.0*ep1*a+ep2); *ci = n/d; n = (3.0*(a*a-b*b)+2.0*ep1*a+ep2)*(eq1*(a*a-b*b)+eq2*a+eq3); n += (6.0*a*b+2.0*ep1*b)*(2.0*eq1*a*b+eq2*b); *cr = n/d; return(1); } /*** static double exp_approx2(double st) { if (ifImg) return(1.0 + ec1/(st - ex1) + 2.0*(ec2*(st-ex2)-ec3*ex3) / ((st-ex2)*(st-ex2) + ex3*ex3)); else return(1.0 + ec1/(st - ex1) + ec2/(st - ex2) + ec3/(st - ex3)); } ***/ static int exp_pade(double R, double L, double G, double C, double l, TXLine *h) { tau = sqrt(L*C); RdL = R / L; GdC = G / C; RG = R * G; RC = R * C; GL = G * L; { double a, b, t; double y1, y2, y3, y4, y5, y6; a = RdL; b = GdC; t = tau; /* y1 = 0.5 * (a + b); y2 = a * b - y1 * y1; y3 = - a * b * y1 - 2.0 * y1 * y2 + y1 * y1 * y1; y4 = 2.0 * a * b * y1 * y1 - a * b * y2 - 2.0 * y2 * y2 - 2.0 * y1 * y3 + 5.0 * y1 * y1 * y2 - 2.0 * y1 * y1 * y1 * y1; y5 = 6.0 * a * b * (y1 * y2 - y1 * y1 * y1) - a * b * y3 - 2.0 * y1 * y4 - 6.0 * y2 * y3 + 12.0 * y2 * y2 * y1 + 7.0 * y1 * y1 * y3 -10.0 * y1 * y1 * y1 * y2 - 8.0 * y1 * y1 * y1 * y2 + 6.0 * y1 * y1 * y1 * y1 * y1; y6 = 24.0 * a * b * y1 * y1 * y1 * y1 - 36.0 * a * b * y1 * y1 * y2 + 6.0 * a * b * y2 * y2 + 8.0 * a * b * y1 * y3 - 2.0 * y2 * y4 - 2.0 * y1 * y5 + 2.0 * y1 * y1 * y4 - a * b * y4 -6.0 * y3 * y3 + 44.0 * y1 * y2 * y3 + 60.0 * y1 * y1 * y1 * y1 * y2 -24.0 * y1 * y1 * y1 * y1 * y1 * y1 + 12.0 * y2 * y2 * y2 -54.0 * y1 * y1 * y2 * y2 + 7.0 * y1 * y1 * y4 -24.0 * y1 * y1 * y1 * y3 - 24.0 * y1 * y1 * y2 * y2 -8.0 * y1 * y1 * y1 * y3 + 24.0 * y1 * y1 * y1 * y1 * y2 - 6.0 * y2 * y4; */ y1 = 0.5 * (a + b); y2 = a * b - y1 * y1; y3 = -3.0 * y1 * y2; y4 = -3.0 * y2 * y2 - 4.0 * y1 * y3; y5 = - 5.0 * y1 * y4 -10.0 * y2 * y3; y6 = -10.0 * y3 * y3 - 15.0 * y2 * y4 - 6.0 * y1 * y5; a0 = y1 * t; a1 = y2 * t * t / 2.0; a2 = y3 * t * t * t / 6.0; a3 = y4 * t * t * t * t / 24.0; a4 = y5 * t * t * t * t * t / 120.0; a5 = y6 * t * t * t * t * t * t / 720.0; } a0 *= l; a1 *= l; a2 *= l; a3 *= l; a4 *= l; a5 *= l; pade(l); h->taul = tau * l; h->h2_aten = exp(- a0); h->h2_term[0].c = ec1; h->h2_term[1].c = ec2; h->h2_term[2].c = ec3; h->h2_term[0].x = ex1; h->h2_term[1].x = ex2; h->h2_term[2].x = ex3; return(ifImg); } static int pade(double l) { int i, j; double a[6]; double b[6]; a[1] = -a1; a[2] = -a2; a[3] = -a3; a[4] = -a4; a[5] = -a5; b[0] = 1.0; b[1] = a[1]; for (i = 2; i <= 5; i++) { b[i] = 0.0; for (j = 1; j <= i; j++) b[i] += j * a[j] * b[i-j]; b[i] = b[i] / (double) i; } AA[0][0] = 1.0 - exp(a0 - l * sqrt(RG)); AA[0][1] = b[1]; AA[0][2] = b[2]; AA[0][3] = -b[3]; AA[1][0] = b[1]; AA[1][1] = b[2]; AA[1][2] = b[3]; AA[1][3] = -b[4]; AA[2][0] = b[2]; AA[2][1] = b[3]; AA[2][2] = b[4]; AA[2][3] = -b[5]; Gaussian_Elimination2(3); ep3 = AA[0][3]; ep2 = AA[1][3]; ep1 = AA[2][3]; eq1 = ep1 + b[1]; eq2 = b[1] * ep1 + ep2 + b[2]; eq3 = ep3 * exp(a0 - l * sqrt(RG)); ep3 = ep3 / (tau*tau*tau); ep2 = ep2 / (tau*tau); ep1 = ep1 / tau; eq3 = eq3 / (tau*tau*tau); eq2 = eq2 / (tau*tau); eq1 = eq1 / tau; /* printf("factor = %e\n", exp(-a0)); printf("ep1 = %e ep2 = %e ep3 = %e\n", ep1, ep2, ep3); */ exp_find_roots(ep1, ep2, ep3, &ex1, &ex2, &ex3); /* printf("roots are %e %e %e \n", ex1, ex2, ex3); */ ec1 = eval2(eq1 - ep1, eq2 - ep2, eq3 - ep3, ex1) / eval2(3.0, 2.0 * ep1, ep2, ex1); if (ifImg) get_c(eq1 - ep1, eq2 - ep2, eq3 - ep3, ep1, ep2, ex2, ex3, &ec2, &ec3); else { ec2 = eval2(eq1 - ep1, eq2 - ep2, eq3 - ep3, ex2) / eval2(3.0, 2.0 * ep1, ep2, ex2); ec3 = eval2(eq1 - ep1, eq2 - ep2, eq3 - ep3, ex3) / eval2(3.0, 2.0 * ep1, ep2, ex3); } return (1); } static int Gaussian_Elimination2(int dims) { int i, j, k, dim; double f; double max; int imax; dim = dims; for (i = 0; i < dim; i++) { imax = i; max = ABS(AA[i][i]); for (j = i+1; j < dim; j++) if (ABS(AA[j][i]) > max) { imax = j; max = ABS(AA[j][i]); } if (max < epsi2) { fprintf(stderr, " can not choose a pivot \n"); controlled_exit(EXIT_FAILURE); } if (imax != i) for (k = i; k <= dim; k++) { f = AA[i][k]; AA[i][k] = AA[imax][k]; AA[imax][k] = f; } f = 1.0 / AA[i][i]; AA[i][i] = 1.0; for (j = i+1; j <= dim; j++) AA[i][j] *= f; for (j = 0; j < dim ; j++) { if (i == j) continue; f = AA[j][i]; AA[j][i] = 0.0; for (k = i+1; k <= dim; k++) AA[j][k] -= f * AA[i][k]; } } return(1); } /*** static int exp_div3(double a1, double a2, double a3, double x, double *p1, double *p2) { *p1 = a1 + x; *p2 = - a3 / x; return(1); } ***/ /*** ***/ static int exp_find_roots(double a1, double a2, double a3, double *ex1, double *ex2, double *ex3) { double x, t; double p, q; q = (a1*a1-3.0*a2) / 9.0; p = (2.0*a1*a1*a1-9.0*a1*a2+27.0*a3) / 54.0; t = q*q*q - p*p; if (t >= 0.0) { t = acos(p /(q * sqrt(q))); x = -2.0*sqrt(q)*cos(t / 3.0) - a1/3.0; } else { if (p > 0.0) { t = pow(sqrt(-t)+p, 1.0 / 3.0); x = -(t + q / t) - a1/3.0; } else if (p == 0.0) { x = -a1/3.0; } else { t = pow(sqrt(-t)-p, 1.0 / 3.0); x = (t + q / t) - a1/3.0; } } { double ex1; int i = 0; ex1 = x; for (t = root3(a1, a2, a3, x); ABS(t-x) > 5.0e-4; t = root3(a1, a2, a3, x)) if (++i == 32) { x = ex1; break; } else x = t; } /*** x = a1; for (t = root3(a1, a2, a3, x); ABS(t-x) > epsi2; t = root3(a1, a2, a3, x)) { x = t; i++; if (i > 1000) { x = 0.5 * (x + root3(a1, a2, a3, x)); j++; if (j == 3) break; i = 0; } } ***/ *ex1 = x; div3(a1, a2, a3, x, &a1, &a2); t = a1 * a1 - 4.0 * a2; if (t < 0) { ifImg = 1; printf("***** Two Imaginary Roots.\n"); *ex3 = 0.5 * sqrt(-t); *ex2 = -0.5 * a1; } else { ifImg = 0; t *= 1.0e-16; t = sqrt(t)*1.0e8; if (a1 >= 0.0) *ex2 = t = -0.5 * (a1 + t); else *ex2 = t = -0.5 * (a1 - t); *ex3 = a2 / t; /* *ex2 = 0.5 * (-a1 + t); *ex3 = 0.5 * (-a1 - t); */ } return(1); } static NDnamePt insert_ND(char *name, NDnamePt *ndn) { int cmp; NDnamePt p; if (*ndn == NULL) { p = *ndn = TMALLOC(NDname, 1); p->nd = NULL; p->right = p->left = NULL; strcpy(p->id, name); return(p); } cmp = strcmp((*ndn)->id, name); if (cmp == 0) return(*ndn); else { if (cmp < 0) return(insert_ND(name, &((*ndn)->left))); else return(insert_ND(name, &((*ndn)->right))); } } static NODE *insert_node(char *name) { NDnamePt n; NODE *p; n = insert_ND(name, &ndn); if (n->nd == NULL) { p = NEW_node(); p->name = n; n->nd = p; p->next = node_tab; node_tab = p; return(p); } else return(n->nd); } static NODE *NEW_node(void) { NODE *n; n = TMALLOC(NODE, 1); n->mptr = NULL; n->gptr = NULL; n->cptr = NULL; n->rptr = NULL; n->tptr = NULL; n->cplptr = NULL; n->rlptr = NULL; n->ddptr = NULL; n->cvccsptr = NULL; n->vccsptr = NULL; n->CL = 0.0; n->V = n->dv = 0.0; n->gsum = n->cgsum = 0; n->is = 0; n->tag = 0; n->flag = 0; n->region = NULL; n->ofile = NULL; n->dvtag = 0; return(n); } static int find_roots(double a1, double a2, double a3, double *x1, double *x2, double *x3) { double x, t; double p, q; q = (a1*a1-3.0*a2) / 9.0; p = (2.0*a1*a1*a1-9.0*a1*a2+27.0*a3) / 54.0; t = q*q*q - p*p; if (t >= 0.0) { t = acos(p /(q * sqrt(q))); x = -2.0*sqrt(q)*cos(t / 3.0) - a1/3.0; } else { if (p > 0.0) { t = pow(sqrt(-t)+p, 1.0 / 3.0); x = -(t + q / t) - a1/3.0; } else if (p == 0.0) { x = -a1/3.0; } else { t = pow(sqrt(-t)-p, 1.0 / 3.0); x = (t + q / t) - a1/3.0; } } { double x1; int i = 0; x1 = x; for (t = root3(a1, a2, a3, x); ABS(t-x) > 5.0e-4; t = root3(a1, a2, a3, x)) if (++i == 32) { x = x1; break; } else x = t; } /* x = a1; i = 0; j = 0; for (t = root3(a1, a2, a3, x); ABS(t-x) > epsi; t = root3(a1, a2, a3, x)) { x = t; i++; if (i > 1000) { x = 0.5 * (x + root3(a1, a2, a3, x)); j++; if (j == 3) break; i = 0; } } */ *x1 = x; div3(a1, a2, a3, x, &a1, &a2); t = a1 * a1 - 4.0 * a2; if (t < 0) { printf("***** Two Imaginary Roots in Characteristic Admittance.\n"); controlled_exit(EXIT_FAILURE); } t *= 1.0e-18; t = sqrt(t) * 1.0e9; if (a1 >= 0.0) *x2 = t = -0.5 * (a1 + t); else *x2 = t = -0.5 * (a1 - t); *x3 = a2 / t; /* *x2 = 0.5 * (-a1 + t); *x3 = 0.5 * (-a1 - t); */ return(1); } ngspice-26/src/spicelib/devices/txl/Makefile.am0000644000265600020320000000071712264261473021104 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libtxl.la libtxl_la_SOURCES = \ txl.c \ txlacct.c \ txlask.c \ txldefs.h \ txldest.c \ txlext.h \ txlfbr.c \ txlinit.h \ txlitf.h \ txlload.c \ txlmdel.c \ txlparam.c \ txldel.c \ txlmask.c \ txlmpar.c \ txlsetup.c \ txlinit.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/txl/txlparam.c0000644000265600020320000000147412264261473021045 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int TXLparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { TXLinstance *here = (TXLinstance *)inst; NG_IGNORE(select); switch(param) { case TXL_IN_NODE: here->TXLposNode = value->iValue; break; case TXL_OUT_NODE: here->TXLnegNode = value->iValue; break; case TXL_LENGTH: here->TXLlength = value->rValue; here->TXLlengthgiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/txl/Makefile.in0000644000265600020320000004204712264261540021112 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/txl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtxl_la_LIBADD = am_libtxl_la_OBJECTS = txl.lo txlacct.lo txlask.lo txldest.lo \ txlfbr.lo txlload.lo txlmdel.lo txlparam.lo txldel.lo \ txlmask.lo txlmpar.lo txlsetup.lo txlinit.lo libtxl_la_OBJECTS = $(am_libtxl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libtxl_la_SOURCES) DIST_SOURCES = $(libtxl_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libtxl.la libtxl_la_SOURCES = \ txl.c \ txlacct.c \ txlask.c \ txldefs.h \ txldest.c \ txlext.h \ txlfbr.c \ txlinit.h \ txlitf.h \ txlload.c \ txlmdel.c \ txlparam.c \ txldel.c \ txlmask.c \ txlmpar.c \ txlsetup.c \ txlinit.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/txl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/txl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libtxl.la: $(libtxl_la_OBJECTS) $(libtxl_la_DEPENDENCIES) $(EXTRA_libtxl_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libtxl_la_OBJECTS) $(libtxl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txldel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txldest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlfbr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/txlsetup.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/txl/txldel.c0000644000265600020320000000153012264261473020502 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TXLdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { TXLmodel *model = (TXLmodel *)inModel; TXLinstance **fast = (TXLinstance **)inst; TXLinstance **prev = NULL; TXLinstance *here; for( ; model ; model = model->TXLnextModel) { prev = &(model->TXLinstances); for(here = *prev; here ; here = *prev) { if(here->TXLname == name || (fast && here==*fast) ) { *prev= here->TXLnextInstance; FREE(here); return(OK); } prev = &(here->TXLnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/txl/txlinit.c0000644000265600020320000000417012264261473020704 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "txlitf.h" #include "txlext.h" #include "txlinit.h" SPICEdev TXLinfo = { { "TransLine", "Simple Lossy Transmission Line", &TXLnSize, &TXLnSize, TXLnames, &TXLpTSize, TXLpTable, &TXLmPTSize, TXLmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ TXLparam, /* DEVmodParam */ TXLmParam, /* DEVload */ TXLload, /* DEVsetup */ TXLsetup, /* DEVunsetup */ TXLunsetup, /* DEVpzSetup */ NULL, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* TXLfindBranch default disabled */ /* DEVacLoad */ TXLload, /* ac load */ /* DEVaccept */ NULL, /* TXLaccept default disabled */ /* DEVdestroy */ TXLdestroy, /* DEVmodDelete */ TXLmDelete, /* DEVdelete */ TXLdelete, /* DEVsetic */ NULL, /* DEVask */ TXLask, /* DEVmodAsk */ TXLmodAsk, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif &TXLiSize, &TXLmSize }; SPICEdev * get_txl_info(void) { return &TXLinfo; } ngspice-26/src/spicelib/devices/txl/txlacct.c0000644000265600020320000000316712264261473020660 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/fteext.h" #include "ngspice/cktdefs.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TXLaccept(CKTcircuit *ckt, GENmodel *inModel) /* set up the breakpoint table. */ { TXLmodel *model = (TXLmodel *)inModel; TXLinstance *here; int hint; double h, v, v1; NODE *nd; TXLine *tx; /* loop through all the voltage source models */ for( ; model != NULL; model = model->TXLnextModel ) { /* loop through all the instances of the model */ for (here = model->TXLinstances; here != NULL ; here=here->TXLnextInstance) { h = ckt->CKTdelta; hint = (int) (h * 1e12); if (hint != 0) { tx = here->txline; nd = tx->in_node; if (nd->dvtag == 0) { v = nd->V; v1 = nd->V = *(ckt->CKTrhs + here->TXLposNode); nd->dv = (v1 - v) / hint; nd->dvtag = 1; } nd = tx->out_node; if (nd->dvtag == 0) { v = nd->V; v1 = nd->V = *(ckt->CKTrhs + here->TXLnegNode); nd->dv = (v1 - v) / hint; nd->dvtag = 1; } } else { /* can't happen. */ printf("zero h detected\n"); controlled_exit(1); } } } model = (TXLmodel *)inModel; for( ; model != NULL; model = model->TXLnextModel ) { for (here = model->TXLinstances; here != NULL ; here=here->TXLnextInstance) { nd = here->txline->in_node; nd->dvtag = 0; nd = here->txline->out_node; nd->dvtag = 0; } } return(OK); } ngspice-26/src/spicelib/devices/txl/txlfbr.c0000644000265600020320000000166512264261473020520 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "txldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int TXLfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name) { TXLmodel *model = (TXLmodel *)inModel; TXLinstance *here; int error; CKTnode *tmp; for( ; model != NULL; model = model->TXLnextModel) { for (here = model->TXLinstances; here != NULL; here = here->TXLnextInstance) { if(here->TXLname == name) { if(here->TXLbranch == 0) { error = CKTmkCur(ckt,&tmp,here->TXLname,"branch"); if(error) return(error); here->TXLbranch = tmp->number; } return(here->TXLbranch); } } } return(0); } ngspice-26/src/spicelib/devices/txl/txlinit.h0000644000265600020320000000055712264261473020716 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #ifndef _TXLINIT_H #define _TXLINIT_H extern IFparm TXLpTable[ ]; extern IFparm TXLmPTable[ ]; extern int TXLmPTSize; extern int TXLpTSize; extern char *TXLnames[ ]; extern int TXLiSize; extern int TXLmSize; extern int TXLnSize; #endif ngspice-26/src/spicelib/devices/ChangeLog0000644000265600020320000000743512264261473020017 0ustar andreasadmin5.2.2003 -- Stuart Brorson * bsim3v1/b3v1noi.c, bsim3v2/b3v2noi.c: Both models had a function called StrongInversionNoiseEval(). They were renamed BSIM3V1StrongInversionNoiseEval() and BSIM3V2StrongInversionNoiseEval(). (Holger Vogt) * dev.c: support for ieee754 floating point. (Holger Vogt patch) 2000-08-28 Arno W. Peters * asrc/asrcset.c, bjt/bjtsetup.c, bsim1/b1set.c, bsim2/b2set.c, bsim3/b3set.c, bsim3v2/b3v2set.c, bsim4/b4set.c, ccvs/ccvsset.c, dio/diosetup.c, ind/indsetup.c, jfet/jfetset.c, jfet2/jfet2set.c, ltra/ltraset.c, mes/messetup.c, mos1/mos1set.c, mos2/mos2set.c, mos3/mos3set.c, mos6/mos6set.c, tra/trasetup.c, urc/urcsetup.c, vcvs/vcvsset.c, vsrc/vsrcset.c: Removed HAS_BATCHSIM preprocessor checks. 2000-07-21 Arno W. Peters * README: Updated. 2000-07-10 Arno W. Peters * asrc/asrcinit.c, asrc/asrcitf.h, bjt/bjtinit.c, bjt/bjtitf.h, bsim1/b1init.c, bsim1/b1itf.h, bsim2/b2init.c, bsim2/b2itf.h, bsim3/b3init.c, bsim3/b3itf.h, bsim3v1/b3v1init.c, bsim3v1/b3v1itf.h, bsim3v2/b3v2init.c, bsim3v2/b3v2itf.h, bsim4/b4init.c, bsim4/b4itf.h, cap/capinit.c, cap/capitf.h, cccs/cccsinit.c, cccs/cccsitf.h, ccvs/ccvsinit.c, ccvs/ccvsitf.h, csw/cswinit.c, csw/cswitf.h, dio/dioinit.c, dio/dioitf.h, ind/indinit.c, ind/inditf.h, isrc/isrcinit.c, isrc/isrcitf.h, jfet/jfetinit.c, jfet/jfetitf.h, jfet2/jfet2init.c, jfet2/jfet2itf.h, ltra/ltrainit.c, ltra/ltraitf.h, mes/mesinit.c, mes/mesitf.h, mos1/mos1init.c, mos1/mos1itf.h, mos2/mos2init.c, mos2/mos2itf.h, mos3/mos3init.c, mos3/mos3itf.h, mos6/mos6init.c, mos6/mos6itf.h, res/resinit.c, res/resitf.h, sw/swinit.c, sw/switf.h, tra/trainit.c, tra/traitf.h, urc/urcinit.c, urc/urcitf.h, vccs/vccsinit.c, vccs/vccsitf.h, vcvs/vcvsinit.c, vcvs/vcvsitf.h, vsrc/vsrcinit.c, vsrc/vsrcitf.h: Moved the device info structure from every devices' *itf.h file into a new *init.c file. Moved external declaration of addresses into *init.h file. Removed conditional compilation based on the AN_* defines as they were by default defined. The calling code will only get a pointer to a SPICEdev structure. This takes us another step closer to loadable devices. 2000-07-09 Arno W. Peters * devlist.c, devlist.h, test_devlist.c: Removed. This idea is not yet ready to be implemented. The dependency of the analysis code on CKThead for storing the device parameters at the same index as the device model in the DEVices variable caused trouble. 2000-07-08 Arno W. Peters * devlist.c, test_devlist.c: Additional checks revealed a bug, first_device() and next_device() should now do what they are supposed to do. 2000-07-07 Arno W. Peters * devlist.c, devlist.h: Another step towards dynamically loadable devices. The first_device() and next_device() functions abstract away the actual implementation of the devices list. Currently it is a fixed length array, when we start supporting dynamically loaded devices, this is no longer true. * test_devlist.c: Checks the implementation of first_device() and next_device(). 2000-04-04 Paolo Nenzi * Makefile.am: Added support for BSIM4 2000-01-16 Emmanuel Rouat * *.c : replaced all FABS macros by the 'fabs' function 2000-01-14 Paolo Nenzi * Added bsim3v1 and bsim3v2 directories. They containthe old bsim3 models V3.2 and V3.1. This models are still used in commercial simulators and some components libraries relies upon them. ngspice-26/src/spicelib/devices/cktask.c0000644000265600020320000000161212264261473017660 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTask * * Ask questions about a specified device. */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "dev.h" #include "ngspice/fteext.h" /* controlled_exit() */ int CKTask(CKTcircuit *ckt, GENinstance *instance, int which, IFvalue *value, IFvalue *selector) { int type = instance->GENmodPtr->GENmodType; int error; SPICEdev **DEVices; DEVices = devices(); if(DEVices[type]->DEVask) { error = DEVices[type]->DEVask(ckt, instance, which, value, selector); } else { error = E_BADPARM; } if (error && ft_stricterror) { fprintf(stderr, "\nError: %s\n", errMsg); controlled_exit(EXIT_BAD); } return(error); } ngspice-26/src/spicelib/devices/hfet2/0000755000265600020320000000000012264261707017244 5ustar andreasadminngspice-26/src/spicelib/devices/hfet2/hfet2ask.c0000644000265600020320000001214412264261473021121 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* Imported into HFET2 source: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFET2ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { HFET2instance *here = (HFET2instance*)inst; static char *msg = "Current and power not available in ac analysis"; NG_IGNORE(select); switch(which) { case HFET2_LENGTH: value->rValue = here->HFET2length; return (OK); case HFET2_WIDTH: value->rValue = here->HFET2width; value->rValue *= here->HFET2m; case HFET2_IC_VDS: value->rValue = here->HFET2icVDS; return (OK); case HFET2_IC_VGS: value->rValue = here->HFET2icVGS; return (OK); case HFET2_OFF: value->iValue = here->HFET2off; return (OK); case HFET2_DRAINNODE: value->iValue = here->HFET2drainNode; return (OK); case HFET2_GATENODE: value->iValue = here->HFET2gateNode; return (OK); case HFET2_SOURCENODE: value->iValue = here->HFET2sourceNode; return (OK); case HFET2_DRAINPRIMENODE: value->iValue = here->HFET2drainPrimeNode; return (OK); case HFET2_SOURCEPRIMENODE: value->iValue = here->HFET2sourcePrimeNode; return (OK); case HFET2_TEMP: value->rValue = here->HFET2temp - CONSTCtoK; case HFET2_DTEMP: value->rValue = here->HFET2dtemp; case HFET2_VGS: value->rValue = *(ckt->CKTstate0 + here->HFET2vgs); return (OK); case HFET2_VGD: value->rValue = *(ckt->CKTstate0 + here->HFET2vgd); return (OK); case HFET2_CG: value->rValue = *(ckt->CKTstate0 + here->HFET2cg); value->rValue *= here->HFET2m; return (OK); case HFET2_CD: value->rValue = *(ckt->CKTstate0 + here->HFET2cd); value->rValue *= here->HFET2m; return (OK); case HFET2_CGD: value->rValue = *(ckt->CKTstate0 + here->HFET2cgd); value->rValue *= here->HFET2m; return (OK); case HFET2_GM: value->rValue = *(ckt->CKTstate0 + here->HFET2gm); value->rValue *= here->HFET2m; return (OK); case HFET2_GDS: value->rValue = *(ckt->CKTstate0 + here->HFET2gds); value->rValue *= here->HFET2m; return (OK); case HFET2_GGS: value->rValue = *(ckt->CKTstate0 + here->HFET2ggs); value->rValue *= here->HFET2m; return (OK); case HFET2_GGD: value->rValue = *(ckt->CKTstate0 + here->HFET2ggd); value->rValue *= here->HFET2m; return (OK); case HFET2_QGS: value->rValue = *(ckt->CKTstate0 + here->HFET2qgs); value->rValue *= here->HFET2m; return (OK); case HFET2_CQGS: value->rValue = *(ckt->CKTstate0 + here->HFET2cqgs); value->rValue *= here->HFET2m; return (OK); case HFET2_QGD: value->rValue = *(ckt->CKTstate0 + here->HFET2qgd); value->rValue *= here->HFET2m; return (OK); case HFET2_CQGD: value->rValue = *(ckt->CKTstate0 + here->HFET2cqgd); value->rValue *= here->HFET2m; return (OK); case HFET2_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "HFET2ask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->HFET2cd); value->rValue -= *(ckt->CKTstate0 + here->HFET2cg); value->rValue *= here->HFET2m; } return(OK); case HFET2_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "HFET2ask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->HFET2cd) * *(ckt->CKTrhsOld + here->HFET2drainNode); value->rValue += *(ckt->CKTstate0 + here->HFET2cg) * *(ckt->CKTrhsOld + here->HFET2gateNode); value->rValue -= (*(ckt->CKTstate0+here->HFET2cd) + *(ckt->CKTstate0 + here->HFET2cg)) * *(ckt->CKTrhsOld + here->HFET2sourceNode); value->rValue *= here->HFET2m; } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hfet2/hfet2setup.c0000644000265600020320000001513312264261473021504 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; int error; CKTnode *tmp; for( ; model != NULL; model = model->HFET2nextModel ) { if((TYPE != NHFET) && (TYPE != PHFET) ) TYPE = NHFET; if(!model->HFET2cfGiven) CF = 0; if(!model->HFET2d1Given) D1 = 0.03e-6; if(!model->HFET2d2Given) D2 = 0.2e-6; if(!model->HFET2delGiven) DEL = 0.04; if(!model->HFET2deltaGiven) DELTA = 3.0; if(!model->HFET2deltadGiven) DELTAD = 4.5e-9; if(!model->HFET2diGiven) DI = 0.04e-6; if(!model->HFET2epsiGiven) EPSI = 12.244*8.85418e-12; if(!model->HFET2etaGiven) { if(TYPE == NHFET) ETA = 1.28; else ETA = 1.4; } if(!model->HFET2eta1Given) ETA1 = 2; if(!model->HFET2eta2Given) ETA2 = 2; if(!model->HFET2gammaGiven) GAMMA = 3.0; if(!model->HFET2ggrGiven) GGR = 0; if(!model->HFET2jsGiven) JS = 0; if(!model->HFET2klambdaGiven) KLAMBDA = 0; if(!model->HFET2kmuGiven) KMU = 0; if(!model->HFET2knmaxGiven) KNMAX = 0; if(!model->HFET2kvtoGiven) KVTO = 0; if(!model->HFET2lambdaGiven) LAMBDA = 0.15; if(!model->HFET2mGiven) M = 3.0; if(!model->HFET2mcGiven) MC = 3.0; if(!model->HFET2muGiven) { if(TYPE == NHFET) MU = 0.4; else MU = 0.03; } if(!model->HFET2nGiven) N = 5.0; if(!model->HFET2nmaxGiven) NMAX = 2e16; if(!model->HFET2pGiven) PP = 1; if(!model->HFET2rdGiven) RD = 0; if(!model->HFET2rdiGiven) RDI = 0; if(!model->HFET2rsGiven) RS = 0; if(!model->HFET2rsiGiven) RSI = 0; if(!model->HFET2sigma0Given) SIGMA0 = 0.057; if(!model->HFET2vsGiven) { if(TYPE == NHFET) VS = 1.5e5; else VS = 0.8e5; } if(!model->HFET2vsigmaGiven) VSIGMA = 0.1; if(!model->HFET2vsigmatGiven) VSIGMAT = 0.3; if(!model->HFET2vt1Given) /* initialized in HFET2temp */ HFET2_VT1 = 0; if(!model->HFET2vt2Given) /* initialized in HFET2temp */ VT2 = 0; if(!model->HFET2vtoGiven) { if(model->HFET2type == NHFET) VTO = 0.15; else VTO = -0.15; } /* loop through all the instances of the model */ for (here = model->HFET2instances; here != NULL; here=here->HFET2nextInstance) { CKTnode *tmpNode; IFuid tmpName; here->HFET2state = *states; *states += 13; if(!here->HFET2lengthGiven) L = 1e-6; if(!here->HFET2widthGiven) W = 20e-6; if(!here->HFET2mGiven) here->HFET2m = 1.0; if(model->HFET2rs != 0) { if(here->HFET2sourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFET2name,"source"); if(error) return(error); here->HFET2sourcePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFET2sourcePrimeNode = here->HFET2sourceNode; } if(model->HFET2rd != 0) { if(here->HFET2drainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->HFET2name,"drain"); if(error) return(error); here->HFET2drainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->HFET2drainPrimeNode = here->HFET2drainNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(HFET2drainDrainPrimePtr,HFET2drainNode,HFET2drainPrimeNode); TSTALLOC(HFET2gateDrainPrimePtr,HFET2gateNode,HFET2drainPrimeNode); TSTALLOC(HFET2gateSourcePrimePtr,HFET2gateNode,HFET2sourcePrimeNode); TSTALLOC(HFET2sourceSourcePrimePtr,HFET2sourceNode,HFET2sourcePrimeNode); TSTALLOC(HFET2drainPrimeDrainPtr,HFET2drainPrimeNode,HFET2drainNode); TSTALLOC(HFET2drainPrimeGatePtr,HFET2drainPrimeNode,HFET2gateNode); TSTALLOC(HFET2drainPriHFET2ourcePrimePtr,HFET2drainPrimeNode,HFET2sourcePrimeNode); TSTALLOC(HFET2sourcePrimeGatePtr,HFET2sourcePrimeNode,HFET2gateNode); TSTALLOC(HFET2sourcePriHFET2ourcePtr,HFET2sourcePrimeNode,HFET2sourceNode); TSTALLOC(HFET2sourcePrimeDrainPrimePtr,HFET2sourcePrimeNode,HFET2drainPrimeNode); TSTALLOC(HFET2drainDrainPtr,HFET2drainNode,HFET2drainNode); TSTALLOC(HFET2gateGatePtr,HFET2gateNode,HFET2gateNode); TSTALLOC(HFET2sourceSourcePtr,HFET2sourceNode,HFET2sourceNode); TSTALLOC(HFET2drainPrimeDrainPrimePtr,HFET2drainPrimeNode,HFET2drainPrimeNode); TSTALLOC(HFET2sourcePriHFET2ourcePrimePtr,HFET2sourcePrimeNode,HFET2sourcePrimeNode); } } return(OK); } int HFET2unsetup(GENmodel *inModel, CKTcircuit *ckt) { HFET2model *model; HFET2instance *here; for (model = (HFET2model *)inModel; model != NULL; model = model->HFET2nextModel) { for (here = model->HFET2instances; here != NULL; here=here->HFET2nextInstance) { if (here->HFET2drainPrimeNode && here->HFET2drainPrimeNode != here->HFET2drainNode) { CKTdltNNum(ckt, here->HFET2drainPrimeNode); here->HFET2drainPrimeNode = 0; } if (here->HFET2sourcePrimeNode && here->HFET2sourcePrimeNode != here->HFET2sourceNode) { CKTdltNNum(ckt, here->HFET2sourcePrimeNode); here->HFET2sourcePrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/hfet2/hfet2getic.c0000644000265600020320000000154112264261473021435 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2getic(GENmodel *inModel, CKTcircuit *ckt) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; for( ; model ; model = model->HFET2nextModel) { for(here = model->HFET2instances; here ; here = here->HFET2nextInstance) { if(!here->HFET2icVDSGiven) { here->HFET2icVDS = *(ckt->CKTrhs + here->HFET2drainNode) - *(ckt->CKTrhs + here->HFET2sourceNode); } if(!here->HFET2icVGSGiven) { here->HFET2icVGS = *(ckt->CKTrhs + here->HFET2gateNode) - *(ckt->CKTrhs + here->HFET2sourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2pzl.c0000644000265600020320000000606612264261473021156 0ustar andreasadmin/********** Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->HFET2nextModel ) { for( here = model->HFET2instances; here != NULL; here = here->HFET2nextInstance) { m = here->HFET2m; gdpr=model->HFET2drainConduct; gspr=model->HFET2sourceConduct; gm= *(ckt->CKTstate0 + here->HFET2gm) ; gds= *(ckt->CKTstate0 + here->HFET2gds) ; ggs= *(ckt->CKTstate0 + here->HFET2ggs) ; xgs= *(ckt->CKTstate0 + here->HFET2qgs) ; ggd= *(ckt->CKTstate0 + here->HFET2ggd) ; xgd= *(ckt->CKTstate0 + here->HFET2qgd) ; *(here->HFET2drainDrainPtr ) += m * (gdpr); *(here->HFET2gateGatePtr ) += m * (ggd+ggs); *(here->HFET2gateGatePtr) += m * ((xgd+xgs) * s->real); *(here->HFET2gateGatePtr +1) += m * ((xgd+xgs) * s->imag); *(here->HFET2sourceSourcePtr ) += m * (gspr); *(here->HFET2drainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->HFET2drainPrimeDrainPrimePtr) += m * (xgd * s->real); *(here->HFET2drainPrimeDrainPrimePtr +1) += m * (xgd * s->imag); *(here->HFET2sourcePriHFET2ourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->HFET2sourcePriHFET2ourcePrimePtr) += m * (xgs * s->real); *(here->HFET2sourcePriHFET2ourcePrimePtr +1) += m * (xgs * s->imag); *(here->HFET2drainDrainPrimePtr ) -= m * (gdpr); *(here->HFET2gateDrainPrimePtr ) -= m * (ggd); *(here->HFET2gateDrainPrimePtr) -= m * (xgd * s->real); *(here->HFET2gateDrainPrimePtr +1) -= m * (xgd * s->imag); *(here->HFET2gateSourcePrimePtr ) -= m * (ggs); *(here->HFET2gateSourcePrimePtr) -= m * (xgs * s->real); *(here->HFET2gateSourcePrimePtr +1) -= m * (xgs * s->imag); *(here->HFET2sourceSourcePrimePtr ) -= m * (gspr); *(here->HFET2drainPrimeDrainPtr ) -= m * (gdpr); *(here->HFET2drainPrimeGatePtr ) += m * (-ggd+gm); *(here->HFET2drainPrimeGatePtr) -= m * (xgd * s->real); *(here->HFET2drainPrimeGatePtr +1) -= m * (xgd * s->imag); *(here->HFET2drainPriHFET2ourcePrimePtr ) += m * (-gds-gm); *(here->HFET2sourcePrimeGatePtr ) += m * (-ggs-gm); *(here->HFET2sourcePrimeGatePtr) -= m * (xgs * s->real); *(here->HFET2sourcePrimeGatePtr +1) -= m * (xgs * s->imag); *(here->HFET2sourcePriHFET2ourcePtr ) -= m * (gspr); *(here->HFET2sourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2mdel.c0000644000265600020320000000204512264261473021263 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into hfet2 model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { HFET2model **model = (HFET2model**)inModel; HFET2model *modfast = (HFET2model*)kill; HFET2instance *here; HFET2instance *prev = NULL; HFET2model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->HFET2nextModel)) { if( (*model)->HFET2modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->HFET2nextModel; /* cut deleted device out of list */ for(here = (*model)->HFET2instances ; here ; here = here->HFET2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2itf.h0000644000265600020320000000011612264261473021126 0ustar andreasadmin#ifndef DEV_HFET2 #define DEV_HFET2 SPICEdev *get_hfet2_info(void); #endif ngspice-26/src/spicelib/devices/hfet2/hfet2.c0000644000265600020320000001201212264261473020414 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "hfet2defs.h" #include "ngspice/suffix.h" IFparm HFET2pTable[] = { /* parameters */ OP("off", HFET2_OFF, IF_FLAG ,"Device initialli OFF"), IOP("l", HFET2_LENGTH, IF_REAL ,"Length of device"), IOP("w", HFET2_WIDTH, IF_REAL ,"Width of device"), IOP("m", HFET2_M, IF_REAL ,"Parallel Multiplier"), IOP("icvds", HFET2_IC_VDS, IF_REAL ,"Initial D-S voltage"), IOP("icvgs", HFET2_IC_VGS, IF_REAL ,"Initial G-S voltage"), IOP("temp", HFET2_TEMP, IF_REAL ,"Instance temperature"), IOP("dtemp", HFET2_DTEMP, IF_REAL ,"Instance temperature difference"), OP("dnode", HFET2_DRAINNODE, IF_INTEGER ,"Number of drain node"), OP("gnode", HFET2_GATENODE, IF_INTEGER ,"Number of gate node"), OP("snode", HFET2_SOURCENODE, IF_INTEGER ,"Number of source node"), OP("dprimenode",HFET2_DRAINPRIMENODE, IF_INTEGER ,"Number of internal drain node"), OP("sprimenode",HFET2_SOURCEPRIMENODE,IF_INTEGER ,"Number of internal source node"), OP("vgs", HFET2_VGS, IF_REAL ,"Gate-Source voltage"), OP("vgd", HFET2_VGD, IF_REAL ,"Gate-Drain voltage"), OP("cg", HFET2_CG, IF_REAL ,"Gate capacitance"), OP("cd", HFET2_CD, IF_REAL ,"Drain capacitance"), OP("cgd", HFET2_CGD, IF_REAL ,"Gate_Drain capacitance"), OP("gm", HFET2_GM, IF_REAL ,"Transconductance"), OP("gds", HFET2_GDS, IF_REAL ,"Drain-Source conductance"), OP("ggs", HFET2_GGS, IF_REAL ,"Gate-Source conductance"), OP("ggd", HFET2_GGD, IF_REAL ,"Gate-Drain conductance"), OP("qgs", HFET2_QGS, IF_REAL ,"Gate-Source charge storage"), OP("cqgs", HFET2_CQGS, IF_REAL ,"Capacitance due to gate-source charge storage"), OP("qgd", HFET2_QGD, IF_REAL ,"Gate-Drain charge storage"), OP("cqgd", HFET2_CQGD, IF_REAL ,"Capacitance due to gate-drain charge storage"), OP("cs", HFET2_CS, IF_REAL ,"Source current"), OP("p", HFET2_POWER, IF_REAL ,"Power dissipated by the mesfet") }; IFparm HFET2mPTable[] = { /* model parameters */ OP( "type", HFET2_MOD_TYPE, IF_STRING,"NHFET or PHFET"), IOP( "nhfet", HFET2_MOD_NHFET, IF_FLAG,"N type HFET model"), IOP( "phfet", HFET2_MOD_PHFET, IF_FLAG,"P type HFET model"), IOP( "cf", HFET2_MOD_CF, IF_REAL,""), IOP( "d1", HFET2_MOD_D1, IF_REAL,""), IOP( "d2", HFET2_MOD_D2, IF_REAL,""), IOP( "del", HFET2_MOD_DEL, IF_REAL,""), IOP( "delta", HFET2_MOD_DELTA, IF_REAL,""), IOP( "deltad", HFET2_MOD_DELTAD, IF_REAL,"Thickness correction"), IOP( "di", HFET2_MOD_DI, IF_REAL,"Depth of device"), IOP( "epsi", HFET2_MOD_EPSI, IF_REAL,""), IOP( "eta", HFET2_MOD_ETA, IF_REAL,"Subthreshold ideality factor"), IOP( "eta1", HFET2_MOD_ETA1, IF_REAL,""), IOP( "eta2", HFET2_MOD_ETA2, IF_REAL,""), IOP( "gamma", HFET2_MOD_GAMMA, IF_REAL,"Knee shape parameter"), IOP( "ggr", HFET2_MOD_GGR, IF_REAL,""), IOP( "js", HFET2_MOD_JS, IF_REAL,""), IOP( "klambda", HFET2_MOD_KLAMBDA, IF_REAL,""), IOP( "kmu", HFET2_MOD_KMU, IF_REAL,""), IOP( "knmax", HFET2_MOD_KNMAX, IF_REAL,""), IOP( "kvto", HFET2_MOD_KVTO, IF_REAL,""), IOP( "lambda", HFET2_MOD_LAMBDA, IF_REAL,"Output conductance parameter"), IOP( "m", HFET2_MOD_M, IF_REAL,"Knee shape parameter"), IOP( "mc", HFET2_MOD_MC, IF_REAL,"Knee shape parameter"), IOP( "mu", HFET2_MOD_MU, IF_REAL,"Moblity"), IOP( "n", HFET2_MOD_N, IF_REAL,""), IOP( "nmax", HFET2_MOD_NMAX, IF_REAL,""), IOP( "p", HFET2_MOD_P, IF_REAL,""), IOP( "rd", HFET2_MOD_RD, IF_REAL,"Drain ohmic resistance"), IOP( "rdi", HFET2_MOD_RDI, IF_REAL,"Drain ohmic resistance"), IOP( "rs", HFET2_MOD_RS, IF_REAL,"Source ohmic resistance"), IOP( "rsi", HFET2_MOD_RSI, IF_REAL,"Source ohmic resistance"), IOP( "sigma0", HFET2_MOD_SIGMA0, IF_REAL,"DIBL parameter"), IOP( "vs", HFET2_MOD_VS, IF_REAL,"Saturation velocity"), IOP( "vsigma", HFET2_MOD_VSIGMA, IF_REAL,""), IOP( "vsigmat", HFET2_MOD_VSIGMAT, IF_REAL,""), IOP( "vt0", HFET2_MOD_VTO, IF_REAL,"Pinch-off voltage"), IOP( "vt1", HFET2_MOD_VT1, IF_REAL,""), IOP( "vt2", HFET2_MOD_VT2, IF_REAL,""), IOP( "vto", HFET2_MOD_VTO, IF_REAL,"Pinch-off voltage") }; char *HFET2names[] = { "Drain", "Gate", "Source" }; int HFET2nSize = NUMELEMS(HFET2names); int HFET2pTSize = NUMELEMS(HFET2pTable); int HFET2mPTSize = NUMELEMS(HFET2mPTable); int HFET2iSize = sizeof(HFET2instance); int HFET2mSize = sizeof(HFET2model); ngspice-26/src/spicelib/devices/hfet2/hfet2mask.c0000644000265600020320000001132512264261473021276 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* Imported into HFET2 model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int HFET2mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { HFET2model *here = (HFET2model*)inst; NG_IGNORE(ckt); switch(which) { case HFET2_MOD_VTO: value->rValue = here->HFET2vto; return (OK); case HFET2_MOD_LAMBDA: value->rValue = here->HFET2lambda; return (OK); case HFET2_MOD_RD: value->rValue = here->HFET2rd; return (OK); case HFET2_MOD_RS: value->rValue = here->HFET2rs; return (OK); case HFET2_MOD_RDI: value->rValue = here->HFET2rdi; return (OK); case HFET2_MOD_RSI: value->rValue = here->HFET2rsi; return (OK); case HFET2_MOD_ETA: value->rValue = here->HFET2eta; return (OK); case HFET2_MOD_M: value->rValue = here->HFET2m; return (OK); case HFET2_MOD_MC: value->rValue = here->HFET2mc; return (OK); case HFET2_MOD_GAMMA: value->rValue = here->HFET2gamma; return (OK); case HFET2_MOD_SIGMA0: value->rValue = here->HFET2sigma0; return (OK); case HFET2_MOD_VSIGMAT: value->rValue = here->HFET2vsigmat; return (OK); case HFET2_MOD_VSIGMA: value->rValue = here->HFET2vsigma; return (OK); case HFET2_MOD_MU: value->rValue = here->HFET2mu; return (OK); case HFET2_MOD_DI: value->rValue = here->HFET2di; return (OK); case HFET2_MOD_DELTA: value->rValue = here->HFET2delta; return (OK); case HFET2_MOD_VS: value->rValue = here->HFET2vs; return (OK); case HFET2_MOD_NMAX: value->rValue = here->HFET2nmax; return (OK); case HFET2_MOD_DELTAD: value->rValue = here->HFET2deltad; return (OK); case HFET2_MOD_P: value->rValue = here->HFET2p; return (OK); case HFET2_MOD_JS: value->rValue = here->HFET2js; return (OK); case HFET2_MOD_ETA1: value->rValue = here->HFET2eta1; return (OK); case HFET2_MOD_D1: value->rValue = here->HFET2d1; return (OK); case HFET2_MOD_VT1: value->rValue = here->HFET2vt1; return (OK); case HFET2_MOD_ETA2: value->rValue = here->HFET2eta2; return (OK); case HFET2_MOD_D2: value->rValue = here->HFET2d2; return (OK); case HFET2_MOD_VT2: value->rValue = here->HFET2vt2; return (OK); case HFET2_MOD_GGR: value->rValue = here->HFET2ggr; return (OK); case HFET2_MOD_DEL: value->rValue = here->HFET2del; return (OK); case HFET2_MOD_KLAMBDA: value->rValue = here->HFET2klambda; return (OK); case HFET2_MOD_KMU: value->rValue = here->HFET2kmu; return (OK); case HFET2_MOD_KVTO: value->rValue = here->HFET2kvto; return (OK); case HFET2_MOD_EPSI: value->rValue = here->HFET2epsi; return (OK); case HFET2_MOD_KNMAX: value->rValue = here->HFET2knmax; return (OK); case HFET2_MOD_N: value->rValue = here->HFET2n; return (OK); case HFET2_MOD_CF: value->rValue = here->HFET2cf; return (OK); case HFET2_MOD_DRAINCONDUCT: value->rValue = here->HFET2drainConduct; return (OK); case HFET2_MOD_SOURCECONDUCT: value->rValue = here->HFET2sourceConduct; return (OK); /* case HFET2_MOD_DEPLETIONCAP: value->rValue = here->HFET2???; return(OK); */ /* case HFET2_MOD_VCRIT: value->rValue = here->HFET2vcrit; return (OK); */ case HFET2_MOD_TYPE: if (here->HFET2type == NHFET) value->sValue = "nhfet"; else value->sValue = "phfet"; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hfet2/hfet2init.c0000644000265600020320000000406412264261473021310 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "hfet2itf.h" #include "hfet2ext.h" #include "hfet2init.h" SPICEdev HFET2info = { { "HFET2", "HFET2 Model", &HFET2nSize, &HFET2nSize, HFET2names, &HFET2pTSize, HFET2pTable, &HFET2mPTSize, HFET2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ HFET2param, /* DEVmodParam */ HFET2mParam, /* DEVload */ HFET2load, /* DEVsetup */ HFET2setup, /* DEVunsetup */ HFET2unsetup, /* DEVpzSetup */ HFET2setup, /* DEVtemperature*/ HFET2temp, /* DEVtrunc */ HFET2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ HFET2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ HFET2destroy, /* DEVmodDelete */ HFET2mDelete, /* DEVdelete */ HFET2delete, /* DEVsetic */ HFET2getic, /* DEVask */ HFET2ask, /* DEVmodAsk */ HFET2mAsk, /* DEVpzLoad */ HFET2pzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &HFET2iSize, /* DEVmodSize */ &HFET2mSize }; SPICEdev * get_hfet2_info(void) { return &HFET2info; } ngspice-26/src/spicelib/devices/hfet2/hfet2load.c0000644000265600020320000003607212264261473021270 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void Pause(void); static void hfeta2(HFET2model *model, HFET2instance *here, CKTcircuit *ckt, double vgs, double vds, double *cdrain, double *gm, double *gds, double *capgs, double *capgd); int HFET2load(GENmodel *inModel, CKTcircuit *ckt) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; double capgd; double capgs; double cd; double cdhat = 0.0; double cdrain; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd; double cghat = 0.0; double delvds; double delvgd; double delvgs; double gdpr; double gds; double geq; double ggd; double ggs; double gm; double gspr; double vcrit; double vds; double vgd; double vgd1; double vgs; double vgs1; double vt; double vto; #ifndef PREDICTOR double xfact; #endif int icheck; int ichk1; int error; int inverse; double m; for( ; model != NULL; model = model->HFET2nextModel ) { for(here = model->HFET2instances; here != NULL; here=here->HFET2nextInstance) { gdpr = model->HFET2drainConduct; gspr = model->HFET2sourceConduct; vcrit = VCRIT; vto = TVTO; vt = CONSTKoverQ*TEMP; icheck = 1; if( ckt->CKTmode & MODEINITSMSIG) { vgs = *(ckt->CKTstate0 + here->HFET2vgs); vgd = *(ckt->CKTstate0 + here->HFET2vgd); } else if(ckt->CKTmode & MODEINITTRAN) { vgs = *(ckt->CKTstate1 + here->HFET2vgs); vgd = *(ckt->CKTstate1 + here->HFET2vgd); } else if((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds = model->HFET2type*here->HFET2icVDS; vgs = model->HFET2type*here->HFET2icVGS; vgd = vgs-vds; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->HFET2off == 0) ) { vgs = -1; vgd = -1; } else if((ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->HFET2off))) { vgs = 0; vgd = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta/ckt->CKTdeltaOld[2]; *(ckt->CKTstate0 + here->HFET2vgs) = *(ckt->CKTstate1 + here->HFET2vgs); vgs = (1+xfact) * *(ckt->CKTstate1 + here->HFET2vgs) - xfact * *(ckt->CKTstate2 + here->HFET2vgs); *(ckt->CKTstate0 + here->HFET2vgd) = *(ckt->CKTstate1 + here->HFET2vgd); vgd = (1+xfact)* *(ckt->CKTstate1 + here->HFET2vgd) - xfact * *(ckt->CKTstate2 + here->HFET2vgd); *(ckt->CKTstate0 + here->HFET2cg) = *(ckt->CKTstate1 + here->HFET2cg); *(ckt->CKTstate0 + here->HFET2cd) = *(ckt->CKTstate1 + here->HFET2cd); *(ckt->CKTstate0 + here->HFET2cgd) = *(ckt->CKTstate1 + here->HFET2cgd); *(ckt->CKTstate0 + here->HFET2gm) = *(ckt->CKTstate1 + here->HFET2gm); *(ckt->CKTstate0 + here->HFET2gds) = *(ckt->CKTstate1 + here->HFET2gds); *(ckt->CKTstate0 + here->HFET2ggs) = *(ckt->CKTstate1 + here->HFET2ggs); *(ckt->CKTstate0 + here->HFET2ggd) = *(ckt->CKTstate1 + here->HFET2ggd); } else { #endif /* PREDICTOR */ vgs = model->HFET2type* (*(ckt->CKTrhsOld+ here->HFET2gateNode)- *(ckt->CKTrhsOld+ here->HFET2sourcePrimeNode)); vgd = model->HFET2type* (*(ckt->CKTrhsOld+here->HFET2gateNode)- *(ckt->CKTrhsOld+ here->HFET2drainPrimeNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ delvgs=vgs - *(ckt->CKTstate0 + here->HFET2vgs); delvgd=vgd - *(ckt->CKTstate0 + here->HFET2vgd); delvds=delvgs - delvgd; cghat= *(ckt->CKTstate0 + here->HFET2cg) + *(ckt->CKTstate0 + here->HFET2ggd)*delvgd + *(ckt->CKTstate0 + here->HFET2ggs)*delvgs; cdhat= *(ckt->CKTstate0 + here->HFET2cd) + *(ckt->CKTstate0 + here->HFET2gm)*delvgs + *(ckt->CKTstate0 + here->HFET2gds)*delvds - *(ckt->CKTstate0 + here->HFET2ggd)*delvgd; /* bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->HFET2vgs)))+ ckt->CKTvoltTol) ) if ( (fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->HFET2vgd)))+ ckt->CKTvoltTol)) if ( (fabs(cghat-*(ckt->CKTstate0 + here->HFET2cg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->HFET2cg)))+ ckt->CKTabstol) ) if ( /* hack - expression too big */ (fabs(cdhat-*(ckt->CKTstate0 + here->HFET2cd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->HFET2cd)))+ ckt->CKTabstol) ) { /* we can do a bypass */ vgs= *(ckt->CKTstate0 + here->HFET2vgs); vgd= *(ckt->CKTstate0 + here->HFET2vgd); vds= vgs-vgd; cg= *(ckt->CKTstate0 + here->HFET2cg); cd= *(ckt->CKTstate0 + here->HFET2cd); cgd= *(ckt->CKTstate0 + here->HFET2cgd); gm= *(ckt->CKTstate0 + here->HFET2gm); gds= *(ckt->CKTstate0 + here->HFET2gds); ggs= *(ckt->CKTstate0 + here->HFET2ggs); ggd= *(ckt->CKTstate0 + here->HFET2ggd); goto load; } /* limit nonlinear branch voltages */ ichk1=1; vgs = DEVpnjlim(vgs,*(ckt->CKTstate0 + here->HFET2vgs),CONSTvt0,vcrit, &icheck); vgd = DEVpnjlim(vgd,*(ckt->CKTstate0 + here->HFET2vgd),CONSTvt0,vcrit,&ichk1); if(ichk1 == 1) { icheck=1; } vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->HFET2vgs),TVTO); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->HFET2vgd),TVTO); } cg = 0; cgd = 0; ggd = 0; ggs = 0; vds = vgs-vgd; { double arg = -vgs*DEL/vt; double earg = exp(arg); double vtn = N*vt; double expe = exp(vgs/vtn); ggs = JSLW*expe/vtn+GGRLW*earg*(1-arg); cg = JSLW*(expe-1)+GGRLW*vgs*earg; arg = -vgd*DEL/vt; earg = exp(arg); expe = exp(vgd/vtn); ggd = JSLW*expe/vtn+GGRLW*earg*(1-arg); cgd = JSLW*(expe-1)+GGRLW*vgd*earg; cg += cgd; } if(vds < 0) { vds = -vds; inverse = 1; } else inverse = 0; hfeta2(model,here,ckt,vds>0?vgs:vgd,vds,&cdrain,&gm,&gds,&capgs,&capgd); if(inverse) { double temp; cdrain = -cdrain; vds = -vds; temp = capgs; capgs = capgd; capgd = temp; } cd = cdrain - cgd; if((ckt->CKTmode & (MODETRAN|MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* charge storage elements */ vgs1 = *(ckt->CKTstate1 + here->HFET2vgs); vgd1 = *(ckt->CKTstate1 + here->HFET2vgd); if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFET2qgs) = capgs*vgs; *(ckt->CKTstate1 + here->HFET2qgd) = capgd*vgd; } *(ckt->CKTstate0+here->HFET2qgs) = *(ckt->CKTstate1+here->HFET2qgs) + capgs*(vgs-vgs1); *(ckt->CKTstate0+here->HFET2qgd) = *(ckt->CKTstate1+here->HFET2qgd) + capgd*(vgd-vgd1); /* store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->HFET2qgs) = capgs; *(ckt->CKTstate0 + here->HFET2qgd) = capgd; continue; /*go to 1000*/ } /* transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFET2qgs) = *(ckt->CKTstate0 + here->HFET2qgs); *(ckt->CKTstate1 + here->HFET2qgd) = *(ckt->CKTstate0 + here->HFET2qgd); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->HFET2qgs); if(error) return(error); ggs = ggs + geq; cg = cg + *(ckt->CKTstate0 + here->HFET2cqgs); error = NIintegrate(ckt,&geq,&ceq,capgd,here->HFET2qgd); if(error) return(error); ggd = ggd + geq; cg = cg + *(ckt->CKTstate0 + here->HFET2cqgd); cd = cd - *(ckt->CKTstate0 + here->HFET2cqgd); cgd = cgd + *(ckt->CKTstate0 + here->HFET2cqgd); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HFET2cqgs) = *(ckt->CKTstate0 + here->HFET2cqgs); *(ckt->CKTstate1 + here->HFET2cqgd) = *(ckt->CKTstate0 + here->HFET2cqgd); } } } /* check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if((icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol* MAX(fabs(cghat),fabs(cg))+ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol) ) { ckt->CKTnoncon++; } } *(ckt->CKTstate0 + here->HFET2vgs) = vgs; *(ckt->CKTstate0 + here->HFET2vgd) = vgd; *(ckt->CKTstate0 + here->HFET2cg) = cg; *(ckt->CKTstate0 + here->HFET2cd) = cd; *(ckt->CKTstate0 + here->HFET2cgd) = cgd; *(ckt->CKTstate0 + here->HFET2gm) = gm; *(ckt->CKTstate0 + here->HFET2gds) = gds; *(ckt->CKTstate0 + here->HFET2ggs) = ggs; *(ckt->CKTstate0 + here->HFET2ggd) = ggd; /* load current vector */ load: m = here->HFET2m; ceqgd=model->HFET2type*(cgd-ggd*vgd); ceqgs=model->HFET2type*((cg-cgd)-ggs*vgs); cdreq=model->HFET2type*((cd+cgd)-gds*vds-gm*vgs); *(ckt->CKTrhs + here->HFET2gateNode) += m * (-ceqgs-ceqgd); *(ckt->CKTrhs + here->HFET2drainPrimeNode) += m * (-cdreq+ceqgd); *(ckt->CKTrhs + here->HFET2sourcePrimeNode) += m * (cdreq+ceqgs); /* load y matrix */ *(here->HFET2drainDrainPrimePtr) += m * (-gdpr); *(here->HFET2gateDrainPrimePtr) += m * (-ggd); *(here->HFET2gateSourcePrimePtr) += m * (-ggs); *(here->HFET2sourceSourcePrimePtr) += m * (-gspr); *(here->HFET2drainPrimeDrainPtr) += m * (-gdpr); *(here->HFET2drainPrimeGatePtr) += m * (gm-ggd); *(here->HFET2drainPriHFET2ourcePrimePtr) += m * (-gds-gm); *(here->HFET2sourcePrimeGatePtr) += m * (-ggs-gm); *(here->HFET2sourcePriHFET2ourcePtr) += m * (-gspr); *(here->HFET2sourcePrimeDrainPrimePtr) += m * (-gds); *(here->HFET2drainDrainPtr) += m * (gdpr); *(here->HFET2gateGatePtr) += m * (ggd+ggs); *(here->HFET2sourceSourcePtr) += m * (gspr); *(here->HFET2drainPrimeDrainPrimePtr) += m * (gdpr+gds+ggd); *(here->HFET2sourcePriHFET2ourcePrimePtr) += m * (gspr+gds+gm+ggs); } } return(OK); } static void hfeta2(HFET2model *model, HFET2instance *here, CKTcircuit *ckt, double vgs, double vds, double *cdrain, double *gm, double *gds, double *capgs, double *capgd) { double vt; double vgt; double vgt0; double sigma; double vgte; double isat; double isatm; double ns; double nsm; double a; double b; double c; double d; double e; double g; double h; double p; double q; double s; double t; double u; double nsc = 0.0; double nsn = 0.0; double temp; double etavth; double gch; double gchi; double gchim; double vsate; double vdse; double cg1; double cgc; double rt; double vl; double delidgch; double delgchgchi; double delgchins; double delnsnsm; double delnsmvgt; double delvgtevgt; double delidvsate; double delvsateisat; double delisatisatm; double delisatmvgte; double delisatmgchim; double delvsategch; double delidvds; double delvgtvgs; double delvsatevgt; NG_IGNORE(ckt); vt = CONSTKoverQ*TEMP; etavth = ETA*vt; vl = VS/TMU*L; rt = RSI+RDI; vgt0 = vgs - TVTO; s = exp((vgt0-VSIGMAT)/VSIGMA); sigma = SIGMA0/(1+s); vgt = vgt0+sigma*vds; u = 0.5*vgt/vt-1; t = sqrt(DELTA2+u*u); vgte = vt*(2+u+t); b = exp(vgt/etavth); if(model->HFET2eta2Given && model->HFET2d2Given) { nsc = N02*exp((vgt+TVTO-VT2)/(ETA2*vt)); nsn = 2*N0*log(1+0.5*b); nsm = nsn*nsc/(nsn+nsc); } else { nsm = 2*N0*log(1+0.5*b); } if(nsm < 1.0e-38) { *cdrain = 0; *gm = 0.0; *gds = 0.0; *capgs = CF; *capgd = CF; return; } c = pow(nsm/TNMAX,GAMMA); q = pow(1+c,1.0/GAMMA); ns = nsm/q; gchi = GCHI0*ns; gch = gchi/(1+gchi*rt); gchim = GCHI0*nsm; h = sqrt(1+2*gchim*RSI + vgte*vgte/(vl*vl)); p = 1+gchim*RSI+h; isatm = gchim*vgte/p; g = pow(isatm/IMAX,GAMMA); isat = isatm/pow(1+g,1/GAMMA); vsate = isat/gch; d = pow(vds/vsate,M); e = pow(1+d,1.0/M); delidgch = vds*(1+TLAMBDA*vds)/e; *cdrain = gch*delidgch; delidvsate = (*cdrain)*d/vsate/(1+d); delidvds = gch*(1+2*TLAMBDA*vds)/e-(*cdrain)* pow(vds/vsate,M-1)/(vsate*(1+d)); a = 1+gchi*rt; delgchgchi = 1.0/(a*a); delgchins = GCHI0; delnsnsm = ns/nsm*(1-c/(1+c)); delvgtevgt = 0.5*(1+u/t); delnsmvgt = N0/etavth/(1.0/b + 0.5); if(model->HFET2eta2Given && model->HFET2d2Given) delnsmvgt = nsc*(nsc*delnsmvgt+nsn*nsn/(ETA2*vt))/((nsc+nsn)*(nsc+nsn)); delvsateisat = 1.0/gch; delisatisatm = isat/isatm*(1-g/(1+g)); delisatmvgte = gchim*(p - vgte*vgte/(vl*vl*h))/(p*p); delvsategch = -vsate/gch; delisatmgchim = vgte*(p - gchim*RSI*(1+1.0/h))/(p*p); delvgtvgs = 1-vds*SIGMA0/VSIGMA*s/((1+s)*(1+s)); p = delgchgchi*delgchins*delnsnsm*delnsmvgt; delvsatevgt = (delvsateisat*delisatisatm*(delisatmvgte*delvgtevgt + delisatmgchim*GCHI0*delnsmvgt)+delvsategch*p); g = delidgch*p + delidvsate*delvsatevgt; *gm = g*delvgtvgs; *gds = delidvds + g*sigma; /* Capacitance calculations */ temp = ETA1*vt; cg1 = 1/(D1/EPSI+temp*exp(-(vgs-HFET2_VT1)/temp)); cgc = W*L*(CHARGE*delnsnsm*delnsmvgt*delvgtvgs+cg1); vdse = vds*pow(1+pow(vds/vsate,MC),-1.0/MC); a = (vsate-vdse)/(2*vsate-vdse); a = a*a; temp = 2.0/3.0; p = PP + (1-PP)*exp(-vds/vsate); *capgs = CF+2*temp*cgc*(1-a)/(1+p); a = vsate/(2*vsate-vdse); a = a*a; *capgd = CF+2*p*temp*cgc*(1-a)/(1+p); } ngspice-26/src/spicelib/devices/hfet2/hfet2dest.c0000644000265600020320000000126712264261473021306 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "hfet2defs.h" #include "ngspice/suffix.h" void HFET2destroy(GENmodel **inModel) { HFET2model **model = (HFET2model**)inModel; HFET2instance *here; HFET2instance *prev = NULL; HFET2model *mod = *model; HFET2model *oldmod = NULL; for( ; mod ; mod = mod->HFET2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->HFET2instances ; here ; here = here->HFET2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/hfet2/hfet2init.h0000644000265600020320000000040212264261473021305 0ustar andreasadmin#ifndef _HFET2INIT_H #define _HFET2INIT_H extern IFparm HFET2pTable[ ]; extern IFparm HFET2mPTable[ ]; extern char *HFET2names[ ]; extern int HFET2pTSize; extern int HFET2mPTSize; extern int HFET2nSize; extern int HFET2iSize; extern int HFET2mSize; #endif ngspice-26/src/spicelib/devices/hfet2/Makefile.am0000644000265600020320000000101612264261473021276 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libhfet2.la libhfet2_la_SOURCES = \ hfet2.c \ hfet2acl.c \ hfet2ask.c \ hfet2defs.h \ hfet2del.c \ hfet2dest.c \ hfet2ext.h \ hfet2getic.c \ hfet2init.c \ hfet2init.h \ hfet2itf.h \ hfet2load.c \ hfet2mask.c \ hfet2mdel.c \ hfet2mpar.c \ hfet2param.c \ hfet2pzl.c \ hfet2setup.c \ hfet2temp.c \ hfet2trunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/hfet2/hfet2trunc.c0000644000265600020320000000107112264261473021473 0ustar andreasadmin#include "ngspice/ngspice.h" #include #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2trunc( GENmodel *inModel, CKTcircuit *ckt, double *tiHFET2tep) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; for( ; model != NULL; model = model->HFET2nextModel) { for(here=model->HFET2instances;here!=NULL; here = here->HFET2nextInstance){ CKTterr(here->HFET2qgs,ckt,tiHFET2tep); CKTterr(here->HFET2qgd,ckt,tiHFET2tep); } } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2defs.h0000644000265600020320000002077012264261473021275 0ustar andreasadmin#ifndef HFET2 #define HFET2 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sHFET2instance { struct sHFET2model *HFET2modPtr; struct sHFET2instance *HFET2nextInstance; IFuid HFET2name; int HFET2state; /* index into state table for this device */ int HFET2drainNode; int HFET2gateNode; int HFET2sourceNode; int HFET2drainPrimeNode; int HFET2sourcePrimeNode; double HFET2length; double HFET2width; double HFET2m; double HFET2temp; double HFET2dtemp; double HFET2tLambda; double HFET2tMu; double HFET2tNmax; double HFET2tVto; double HFET2icVDS; double HFET2icVGS; double *HFET2drainDrainPrimePtr; double *HFET2gateDrainPrimePtr; double *HFET2gateSourcePrimePtr; double *HFET2sourceSourcePrimePtr; double *HFET2drainPrimeDrainPtr; double *HFET2drainPrimeGatePtr; double *HFET2drainPriHFET2ourcePrimePtr; double *HFET2sourcePrimeGatePtr; double *HFET2sourcePriHFET2ourcePtr; double *HFET2sourcePrimeDrainPrimePtr; double *HFET2drainDrainPtr; double *HFET2gateGatePtr; double *HFET2sourceSourcePtr; double *HFET2drainPrimeDrainPrimePtr; double *HFET2sourcePriHFET2ourcePrimePtr; #define HFET2vgs HFET2state #define HFET2vgd HFET2state+1 #define HFET2cg HFET2state+2 #define HFET2cd HFET2state+3 #define HFET2cgd HFET2state+4 #define HFET2gm HFET2state+5 #define HFET2gds HFET2state+6 #define HFET2ggs HFET2state+7 #define HFET2ggd HFET2state+8 #define HFET2qgs HFET2state+9 #define HFET2cqgs HFET2state+10 #define HFET2qgd HFET2state+11 #define HFET2cqgd HFET2state+12 int HFET2mode; int HFET2off; unsigned HFET2icVDSGiven : 1; unsigned HFET2icVGSGiven : 1; unsigned HFET2lengthGiven : 1; unsigned HFET2widthGiven : 1; unsigned HFET2mGiven : 1; unsigned HFET2tempGiven : 1; unsigned HFET2dtempGiven : 1; double HFET2n0; double HFET2n01; double HFET2n02; double HFET2gchi0; double HFET2imax; double HFET2vcrit; double HFET2ggrlw; double HFET2jslw; } HFET2instance ; typedef struct sHFET2model { int HFET2modType; struct sHFET2model *HFET2nextModel; HFET2instance * HFET2instances; IFuid HFET2modName; int HFET2type; double HFET2cf; double HFET2d1; double HFET2d2; double HFET2del; double HFET2delta; double HFET2deltad; double HFET2di; double HFET2epsi; double HFET2eta; double HFET2eta1; double HFET2eta2; double HFET2gamma; double HFET2ggr; double HFET2js; double HFET2klambda; double HFET2kmu; double HFET2knmax; double HFET2kvto; double HFET2lambda; double HFET2m; double HFET2mc; double HFET2mu; double HFET2n; double HFET2nmax; double HFET2p; double HFET2rd; double HFET2rdi; double HFET2rs; double HFET2rsi; double HFET2sigma0; double HFET2vs; double HFET2vsigma; double HFET2vsigmat; double HFET2vt1; double HFET2vt2; double HFET2vto; double HFET2drainConduct; double HFET2sourceConduct; double HFET2deltaSqr; unsigned HFET2cfGiven : 1; unsigned HFET2d1Given : 1; unsigned HFET2d2Given : 1; unsigned HFET2delGiven : 1; unsigned HFET2deltaGiven : 1; unsigned HFET2deltadGiven : 1; unsigned HFET2diGiven : 1; unsigned HFET2epsiGiven : 1; unsigned HFET2etaGiven : 1; unsigned HFET2eta1Given : 1; unsigned HFET2eta2Given : 1; unsigned HFET2gammaGiven : 1; unsigned HFET2ggrGiven : 1; unsigned HFET2jsGiven : 1; unsigned HFET2klambdaGiven : 1; unsigned HFET2kmuGiven : 1; unsigned HFET2knmaxGiven : 1; unsigned HFET2kvtoGiven : 1; unsigned HFET2lambdaGiven : 1; unsigned HFET2mGiven : 1; unsigned HFET2mcGiven : 1; unsigned HFET2muGiven : 1; unsigned HFET2nGiven : 1; unsigned HFET2nmaxGiven : 1; unsigned HFET2pGiven : 1; unsigned HFET2rdGiven : 1; unsigned HFET2rdiGiven : 1; unsigned HFET2rsGiven : 1; unsigned HFET2rsiGiven : 1; unsigned HFET2sigma0Given : 1; unsigned HFET2vsGiven : 1; unsigned HFET2vsigmaGiven : 1; unsigned HFET2vsigmatGiven : 1; unsigned HFET2vt1Given : 1; unsigned HFET2vt2Given : 1; unsigned HFET2vtoGiven : 1; } HFET2model; #ifndef NHFET #define NHFET 1 #define PHFET -1 #endif /*NMF*/ /* device parameters */ #define HFET2_LENGTH 1 #define HFET2_WIDTH 2 #define HFET2_IC_VDS 3 #define HFET2_IC_VGS 4 #define HFET2_IC 5 #define HFET2_OFF 6 #define HFET2_CS 7 #define HFET2_POWER 8 #define HFET2_TEMP 9 #define HFET2_DTEMP 10 #define HFET2_M 11 /* model parameters */ #define HFET2_MOD_NHFET 101 #define HFET2_MOD_PHFET 102 #define HFET2_MOD_CF 103 #define HFET2_MOD_D1 104 #define HFET2_MOD_D2 105 #define HFET2_MOD_DEL 106 #define HFET2_MOD_DELTA 107 #define HFET2_MOD_DELTAD 108 #define HFET2_MOD_DI 109 #define HFET2_MOD_EPSI 110 #define HFET2_MOD_ETA 111 #define HFET2_MOD_ETA1 112 #define HFET2_MOD_ETA2 113 #define HFET2_MOD_GAMMA 114 #define HFET2_MOD_GGR 115 #define HFET2_MOD_JS 116 #define HFET2_MOD_KLAMBDA 117 #define HFET2_MOD_KMU 118 #define HFET2_MOD_KNMAX 119 #define HFET2_MOD_KVTO 120 #define HFET2_MOD_LAMBDA 121 #define HFET2_MOD_M 122 #define HFET2_MOD_MC 123 #define HFET2_MOD_MU 124 #define HFET2_MOD_N 125 #define HFET2_MOD_NMAX 126 #define HFET2_MOD_P 127 #define HFET2_MOD_RD 128 #define HFET2_MOD_RDI 129 #define HFET2_MOD_RS 130 #define HFET2_MOD_RSI 131 #define HFET2_MOD_SIGMA0 132 #define HFET2_MOD_VS 133 #define HFET2_MOD_VSIGMA 134 #define HFET2_MOD_VSIGMAT 135 #define HFET2_MOD_VT1 136 #define HFET2_MOD_VT2 137 #define HFET2_MOD_VTO 138 #define HFET2_MOD_TYPE 139 /* device questions */ #define HFET2_DRAINNODE 201 #define HFET2_GATENODE 202 #define HFET2_SOURCENODE 203 #define HFET2_DRAINPRIMENODE 204 #define HFET2_SOURCEPRIMENODE 205 #define HFET2_VGS 206 #define HFET2_VGD 207 #define HFET2_CG 208 #define HFET2_CD 209 #define HFET2_CGD 210 #define HFET2_GM 211 #define HFET2_GDS 212 #define HFET2_GGS 213 #define HFET2_GGD 214 #define HFET2_QGS 215 #define HFET2_CQGS 216 #define HFET2_QGD 217 #define HFET2_CQGD 218 /* model questions */ #define HFET2_MOD_DRAINCONDUCT 301 #define HFET2_MOD_SOURCECONDUCT 302 #define HFET2_MOD_DEPLETIONCAP 303 #define HFET2_MOD_VCRIT 304 #define CF (model->HFET2cf) #define D1 (model->HFET2d1) #define D2 (model->HFET2d2) #define DEL (model->HFET2del) #define DELTA (model->HFET2delta) #define DELTAD (model->HFET2deltad) #define DI (model->HFET2di) #define EPSI (model->HFET2epsi) #define ETA (model->HFET2eta) #define ETA1 (model->HFET2eta1) #define ETA2 (model->HFET2eta2) #define GAMMA (model->HFET2gamma) #define GGR (model->HFET2ggr) #define JS (model->HFET2js) #define KLAMBDA (model->HFET2klambda) #define KMU (model->HFET2kmu) #define KNMAX (model->HFET2knmax) #define KVTO (model->HFET2kvto) #define LAMBDA (model->HFET2lambda) #define M (model->HFET2m) #define MC (model->HFET2mc) #define MU (model->HFET2mu) #define N (model->HFET2n) #define NMAX (model->HFET2nmax) #define PP (model->HFET2p) #define RD (model->HFET2rd) #define RDI (model->HFET2rdi) #define RS (model->HFET2rs) #define RSI (model->HFET2rsi) #define SIGMA0 (model->HFET2sigma0) #define TYPE (model->HFET2type) #define VS (model->HFET2vs) #define VSIGMA (model->HFET2vsigma) #define VSIGMAT (model->HFET2vsigmat) #define HFET2_VT1 (model->HFET2vt1) /* Fix a redefinition in include files */ #define VT2 (model->HFET2vt2) #define VTO (model->HFET2vto) #define DELTA2 (model->HFET2deltaSqr) #define GCHI0 (here->HFET2gchi0) #define GGRLW (here->HFET2ggrlw) #define JSLW (here->HFET2jslw) #define IMAX (here->HFET2imax) #define L (here->HFET2length) #define N0 (here->HFET2n0) #define N01 (here->HFET2n01) #define N02 (here->HFET2n02) #define TEMP (here->HFET2temp) #define TLAMBDA (here->HFET2tLambda) #define TMU (here->HFET2tMu) #define TNMAX (here->HFET2tNmax) #define TVTO (here->HFET2tVto) #define VCRIT (here->HFET2vcrit) #define W (here->HFET2width) #include "hfet2ext.h" #endif /*HFET2*/ ngspice-26/src/spicelib/devices/hfet2/Makefile.in0000644000265600020320000004270112264261536021315 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/hfet2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhfet2_la_LIBADD = am_libhfet2_la_OBJECTS = hfet2.lo hfet2acl.lo hfet2ask.lo hfet2del.lo \ hfet2dest.lo hfet2getic.lo hfet2init.lo hfet2load.lo \ hfet2mask.lo hfet2mdel.lo hfet2mpar.lo hfet2param.lo \ hfet2pzl.lo hfet2setup.lo hfet2temp.lo hfet2trunc.lo libhfet2_la_OBJECTS = $(am_libhfet2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libhfet2_la_SOURCES) DIST_SOURCES = $(libhfet2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libhfet2.la libhfet2_la_SOURCES = \ hfet2.c \ hfet2acl.c \ hfet2ask.c \ hfet2defs.h \ hfet2del.c \ hfet2dest.c \ hfet2ext.h \ hfet2getic.c \ hfet2init.c \ hfet2init.h \ hfet2itf.h \ hfet2load.c \ hfet2mask.c \ hfet2mdel.c \ hfet2mpar.c \ hfet2param.c \ hfet2pzl.c \ hfet2setup.c \ hfet2temp.c \ hfet2trunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/hfet2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/hfet2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhfet2.la: $(libhfet2_la_OBJECTS) $(libhfet2_la_DEPENDENCIES) $(EXTRA_libhfet2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhfet2_la_OBJECTS) $(libhfet2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2acl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2param.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2pzl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2setup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hfet2trunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/hfet2/hfet2temp.c0000644000265600020320000000330412264261473021306 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2temp( GENmodel *inModel, CKTcircuit *ckt) { HFET2instance *here; HFET2model *model = (HFET2model*)inModel; double vt; double tdiff; for( ; model != NULL; model = model->HFET2nextModel ) { if(model->HFET2rd != 0) model->HFET2drainConduct = 1/model->HFET2rd; else model->HFET2drainConduct = 0; if(model->HFET2rs != 0) model->HFET2sourceConduct = 1/model->HFET2rs; else model->HFET2sourceConduct = 0; if(!model->HFET2vt1Given) HFET2_VT1 = VTO+CHARGE*NMAX*DI/EPSI; if(!model->HFET2vt2Given) VT2 = VTO; DELTA2 = DELTA*DELTA; for (here = model->HFET2instances; here != NULL; here=here->HFET2nextInstance) { if(!here->HFET2dtempGiven) here->HFET2dtemp = 0.0; if(!here->HFET2tempGiven) TEMP = ckt->CKTtemp + here->HFET2dtemp; vt = CONSTKoverQ*TEMP; tdiff = TEMP - ckt->CKTnomTemp; TLAMBDA = LAMBDA + KLAMBDA*tdiff; TMU = MU - KMU*tdiff; TNMAX = NMAX - KNMAX*tdiff; TVTO = TYPE*VTO - KVTO*tdiff; JSLW = JS*L*W/2; GGRLW = GGR*L*W/2; N0 = EPSI*ETA*vt/2/CHARGE/(DI+DELTAD); N01 = EPSI*ETA1*vt/2/CHARGE/D1; if(model->HFET2eta2Given) N02 = EPSI*ETA2*vt/2/CHARGE/D2; else N02 = 0.0; GCHI0 = CHARGE*W*TMU/L; IMAX = CHARGE*TNMAX*VS*W; VCRIT = vt*log(vt/(CONSTroot2 * 1e-11)); } } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2param.c0000644000265600020320000000312512264261473021442 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { HFET2instance *here = (HFET2instance*)inst; NG_IGNORE(select); switch(param) { case HFET2_LENGTH: L = value->rValue; here->HFET2lengthGiven = TRUE; break; case HFET2_IC_VDS: here->HFET2icVDS = value->rValue; here->HFET2icVDSGiven = TRUE; break; case HFET2_IC_VGS: here->HFET2icVGS = value->rValue; here->HFET2icVGSGiven = TRUE; break; case HFET2_OFF: here->HFET2off = value->iValue; break; case HFET2_IC: switch(value->v.numValue) { case 2: here->HFET2icVGS = *(value->v.vec.rVec+1); here->HFET2icVGSGiven = TRUE; case 1: here->HFET2icVDS = *(value->v.vec.rVec); here->HFET2icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case HFET2_TEMP: TEMP = value->rValue + CONSTCtoK; here->HFET2tempGiven = TRUE; break; case HFET2_DTEMP: here->HFET2dtemp = value->rValue; here->HFET2dtempGiven = TRUE; break; case HFET2_WIDTH: W = value->rValue; here->HFET2widthGiven = TRUE; break; case HFET2_M: here->HFET2m = value->rValue; here->HFET2mGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2acl.c0000644000265600020320000000500412264261473021077 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2acLoad(GENmodel *inModel, CKTcircuit *ckt) { HFET2model *model = (HFET2model*)inModel; HFET2instance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->HFET2nextModel ) { for( here = model->HFET2instances; here != NULL; here = here->HFET2nextInstance) { m = here->HFET2m; gdpr=model->HFET2drainConduct; gspr=model->HFET2sourceConduct; gm= *(ckt->CKTstate0 + here->HFET2gm) ; gds= *(ckt->CKTstate0 + here->HFET2gds) ; ggs= *(ckt->CKTstate0 + here->HFET2ggs) ; xgs= *(ckt->CKTstate0 + here->HFET2qgs) * ckt->CKTomega ; ggd= *(ckt->CKTstate0 + here->HFET2ggd) ; xgd= *(ckt->CKTstate0 + here->HFET2qgd) * ckt->CKTomega ; *(here->HFET2drainDrainPtr ) += m * (gdpr); *(here->HFET2gateGatePtr ) += m * (ggd+ggs); *(here->HFET2gateGatePtr +1) += m * (xgd+xgs); *(here->HFET2sourceSourcePtr ) += m * (gspr); *(here->HFET2drainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->HFET2drainPrimeDrainPrimePtr +1) += m * (xgd); *(here->HFET2sourcePriHFET2ourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->HFET2sourcePriHFET2ourcePrimePtr +1) += m * (xgs); *(here->HFET2drainDrainPrimePtr ) -= m * (gdpr); *(here->HFET2gateDrainPrimePtr ) -= m * (ggd); *(here->HFET2gateDrainPrimePtr +1) -= m * (xgd); *(here->HFET2gateSourcePrimePtr ) -= m * (ggs); *(here->HFET2gateSourcePrimePtr +1) -= m * (xgs); *(here->HFET2sourceSourcePrimePtr ) -= m * (gspr); *(here->HFET2drainPrimeDrainPtr ) -= m * (gdpr); *(here->HFET2drainPrimeGatePtr ) += m * (-ggd+gm); *(here->HFET2drainPrimeGatePtr +1) -= m * (xgd); *(here->HFET2drainPriHFET2ourcePrimePtr ) += m * (-gds-gm); *(here->HFET2sourcePrimeGatePtr ) += m * (-ggs-gm); *(here->HFET2sourcePrimeGatePtr +1) -= m * (xgs); *(here->HFET2sourcePriHFET2ourcePtr ) -= m * (gspr); *(here->HFET2sourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2del.c0000644000265600020320000000163612264261473021113 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 S. Hwang **********/ /* Imported into hfet2 model: Paolo Nenzi 2001 */ #include "ngspice/ngspice.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2delete(GENmodel *inModel, IFuid name, GENinstance **inst) { HFET2model *model = (HFET2model*)inModel; HFET2instance **fast = (HFET2instance**)inst; HFET2instance **prev = NULL; HFET2instance *here; for( ; model ; model = model->HFET2nextModel) { prev = &(model->HFET2instances); for(here = *prev; here ; here = *prev) { if(here->HFET2name == name || (fast && here==*fast) ) { *prev= here->HFET2nextInstance; FREE(here); return(OK); } prev = &(here->HFET2nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/hfet2/hfet2mpar.c0000644000265600020320000001022712264261473021302 0ustar andreasadmin/********** Imported from MacSpice3f4 - Antony Wilson Modified: Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "hfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HFET2mParam(int param, IFvalue *value, GENmodel *inModel) { HFET2model *model = (HFET2model*)inModel; switch(param) { case HFET2_MOD_CF: model->HFET2cfGiven = TRUE; CF = value->rValue; break; case HFET2_MOD_D1: model->HFET2d1Given = TRUE; D1 = value->rValue; break; case HFET2_MOD_D2: model->HFET2d2Given = TRUE; D2 = value->rValue; break; case HFET2_MOD_DEL: model->HFET2delGiven = TRUE; DEL = value->rValue; break; case HFET2_MOD_DELTA: model->HFET2deltaGiven = TRUE; DELTA = value->rValue; break; case HFET2_MOD_DELTAD: model->HFET2deltadGiven = TRUE; DELTAD = value->rValue; break; case HFET2_MOD_DI: model->HFET2diGiven = TRUE; DI = value->rValue; break; case HFET2_MOD_EPSI: model->HFET2epsiGiven = TRUE; EPSI = value->rValue; break; case HFET2_MOD_ETA: model->HFET2etaGiven = TRUE; ETA = value->rValue; break; case HFET2_MOD_ETA1: model->HFET2eta1Given = TRUE; ETA1 = value->rValue; break; case HFET2_MOD_ETA2: model->HFET2eta2Given = TRUE; ETA2 = value->rValue; break; case HFET2_MOD_GAMMA: model->HFET2gammaGiven = TRUE; GAMMA = value->rValue; break; case HFET2_MOD_GGR: model->HFET2ggrGiven = TRUE; GGR = value->rValue; break; case HFET2_MOD_JS: model->HFET2jsGiven = TRUE; JS = value->rValue; break; case HFET2_MOD_KLAMBDA: model->HFET2klambdaGiven = TRUE; KLAMBDA = value->rValue; break; case HFET2_MOD_KMU: model->HFET2kmuGiven = TRUE; KMU = value->rValue; break; case HFET2_MOD_KNMAX: model->HFET2knmaxGiven = TRUE; KNMAX = value->rValue; break; case HFET2_MOD_KVTO: model->HFET2kvtoGiven = TRUE; KVTO = value->rValue; break; case HFET2_MOD_LAMBDA: model->HFET2lambdaGiven = TRUE; LAMBDA = value->rValue; break; case HFET2_MOD_M: model->HFET2mGiven = TRUE; M = value->rValue; break; case HFET2_MOD_MC: model->HFET2mcGiven = TRUE; MC = value->rValue; break; case HFET2_MOD_MU: model->HFET2muGiven = TRUE; MU = value->rValue; break; case HFET2_MOD_N: model->HFET2nGiven = TRUE; N = value->rValue; break; case HFET2_MOD_NMAX: model->HFET2nmaxGiven = TRUE; NMAX = value->rValue; break; case HFET2_MOD_P: model->HFET2pGiven = TRUE; PP = value->rValue; break; case HFET2_MOD_RD: model->HFET2rdGiven = TRUE; RD = value->rValue; break; case HFET2_MOD_RDI: model->HFET2rdiGiven = TRUE; RDI = value->rValue; break; case HFET2_MOD_RS: model->HFET2rsGiven = TRUE; RS = value->rValue; break; case HFET2_MOD_RSI: model->HFET2rsiGiven = TRUE; RSI = value->rValue; break; case HFET2_MOD_SIGMA0: model->HFET2sigma0Given = TRUE; SIGMA0 = value->rValue; break; case HFET2_MOD_VS: model->HFET2vsGiven = TRUE; VS = value->rValue; break; case HFET2_MOD_VSIGMA: model->HFET2vsigmaGiven = TRUE; VSIGMA = value->rValue; break; case HFET2_MOD_VSIGMAT: model->HFET2vsigmatGiven = TRUE; VSIGMAT = value->rValue; break; case HFET2_MOD_VT1: model->HFET2vt1Given = TRUE; HFET2_VT1 = value->rValue; break; case HFET2_MOD_VT2: model->HFET2vt2Given = TRUE; VT2 = value->rValue; break; case HFET2_MOD_VTO: model->HFET2vtoGiven = TRUE; VTO = value->rValue; break; case HFET2_MOD_NHFET: if(value->iValue) { TYPE = NHFET; } break; case HFET2_MOD_PHFET: if(value->iValue) { TYPE = PHFET; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hfet2/hfet2ext.h0000644000265600020320000000164712264261473021156 0ustar andreasadmin/********** Copyright 1993: T. Ytterdal, K. Lee, M. Shur and T. A. Fjeldly. All rights reserved. Author: Trond Ytterdal **********/ extern int HFET2acLoad(GENmodel*,CKTcircuit*); extern int HFET2ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int HFET2delete(GENmodel*,IFuid,GENinstance**); extern void HFET2destroy(GENmodel**); extern int HFET2getic(GENmodel*,CKTcircuit*); extern int HFET2load(GENmodel*,CKTcircuit*); extern int HFET2mAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int HFET2mDelete(GENmodel**,IFuid,GENmodel*); extern int HFET2mParam(int,IFvalue*,GENmodel*); extern int HFET2param(int,IFvalue*,GENinstance*,IFvalue*); extern int HFET2pzLoad(GENmodel*, CKTcircuit*, SPcomplex*); extern int HFET2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int HFET2temp(GENmodel*,CKTcircuit*); extern int HFET2trunc(GENmodel*,CKTcircuit*,double*); extern int HFET2unsetup( GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/numd2/0000755000265600020320000000000012264261711017254 5ustar andreasadminngspice-26/src/spicelib/devices/numd2/nud2dest.c0000644000265600020320000000167412264261473021165 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes all NUMD2s from the circuit and frees all storage * they were using. The current implementation has memory leaks. */ #include "ngspice/ngspice.h" #include "numd2def.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" void NUMD2destroy(GENmodel **inModel) { NUMD2model **model = (NUMD2model **) inModel; NUMD2model *mod, *nextMod; NUMD2instance *inst, *nextInst; for (mod = *model; mod;) { for (inst = mod->NUMD2instances; inst;) { TWOdestroy(inst->NUMD2pDevice); nextInst = inst->NUMD2nextInstance; FREE(inst); inst = nextInst; } nextMod = mod->NUMD2nextModel; FREE(mod); mod = nextMod; } *model = NULL; } ngspice-26/src/spicelib/devices/numd2/numd2itf.h0000644000265600020320000000027312264261473021164 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NUMD2 #define DEV_NUMD2 extern SPICEdev *get_numd2_info(void); #endif ngspice-26/src/spicelib/devices/numd2/numd2ext.h0000644000265600020320000000202112264261473021173 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef NUMD2EXT_H #define NUMD2EXT_H extern int NUMD2acLoad(GENmodel *, CKTcircuit *); extern int NUMD2ask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NUMD2delete(GENmodel *, IFuid, GENinstance **); extern void NUMD2destroy(GENmodel **); extern int NUMD2getic(GENmodel *, CKTcircuit *); extern int NUMD2load(GENmodel *, CKTcircuit *); extern int NUMD2mDelete(GENmodel **, IFuid, GENmodel *); extern int NUMD2mParam(int, IFvalue *, GENmodel *); extern int NUMD2param(int, IFvalue *, GENinstance *, IFvalue *); extern int NUMD2pzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NUMD2setup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NUMD2temp(GENmodel *, CKTcircuit *); extern int NUMD2trunc(GENmodel *, CKTcircuit *, double *); extern void NUMD2dump(GENmodel *, CKTcircuit *); extern void NUMD2acct(GENmodel *, CKTcircuit *, FILE *); #endif /* NUMD2EXT_H */ ngspice-26/src/spicelib/devices/numd2/nud2set.c0000644000265600020320000002106212264261473021012 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "numd2def.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/meshext.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/ciderinp.h" #include "ngspice/suffix.h" #define TSCALLOC(var, size, type)\ if (size && (var =(type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NUMD2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the structure with those pointers needed later for fast matrix * loading */ { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; char *icFileName = NULL; size_t nameLen; int error, xIndex; int xMeshSize, yMeshSize; TWOdevice *pDevice; TWOcoord *xCoordList = NULL; TWOcoord *yCoordList = NULL; TWOdomain *domainList = NULL; TWOelectrode *electrodeList = NULL; TWOmaterial *pM, *pMaterial = NULL, *materialList = NULL; DOPprofile *profileList = NULL; DOPtable *dopTableList = NULL; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NUMD2nextModel) { if (!model->NUMD2pInfo) { TSCALLOC(model->NUMD2pInfo, 1, TWOtranInfo); } methods = model->NUMD2methods; if (!methods) { TSCALLOC(methods, 1, METHcard); model->NUMD2methods = methods; } models = model->NUMD2models; if (!models) { TSCALLOC(models, 1, MODLcard); model->NUMD2models = models; } options = model->NUMD2options; if (!options) { TSCALLOC(options, 1, OPTNcard); model->NUMD2options = options; } outputs = model->NUMD2outputs; if (!outputs) { TSCALLOC(outputs, 1, OUTPcard); model->NUMD2outputs = outputs; } if (!methods->METHvoltPredGiven) { methods->METHvoltPred = FALSE; } if (!methods->METHmobDerivGiven) { methods->METHmobDeriv = TRUE; } if (!methods->METHoneCarrierGiven) { methods->METHoneCarrier = FALSE; } if (!methods->METHacAnalysisMethodGiven) { methods->METHacAnalysisMethod = SOR; } if (!methods->METHdabstolGiven) { methods->METHdabstol = DABSTOL2D; } if (!methods->METHdreltolGiven) { methods->METHdreltol = ckt->CKTreltol; } if (!methods->METHitLimGiven) { methods->METHitLim = 50; } if (!methods->METHomegaGiven || methods->METHomega <= 0.0) { methods->METHomega = 2.0 * M_PI /* radians/sec */ ; } if (!options->OPTNdefaGiven || options->OPTNdefa <= 0.0) { options->OPTNdefa = 1.0e4 /* cm^2 */ ; } if (!options->OPTNdeflGiven || options->OPTNdefl <= 0.0) { options->OPTNdefl = 1.0e2 /* cm */ ; } if (!options->OPTNdefwGiven && options->OPTNdefaGiven) { options->OPTNdefw = options->OPTNdefa / options->OPTNdefl; } else if (!options->OPTNdefwGiven || options->OPTNdefw <= 0.0) { options->OPTNdefw = 1.0e2 /* cm */ ; } if (!options->OPTNdeviceTypeGiven) { options->OPTNdeviceType = OPTN_DIODE; } if (!options->OPTNicFileGiven) { options->OPTNicFile = NULL; options->OPTNunique = FALSE; /* Can't form a unique name. */ } if (!options->OPTNuniqueGiven) { options->OPTNunique = FALSE; } OneCarrier = methods->METHoneCarrier; /* Set up the rest of the card lists */ if ((error = MODLsetup(model->NUMD2models)) != 0) return (error); BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; if ((error = OUTPsetup(model->NUMD2outputs)) != 0) return (error); if ((error = MATLsetup(model->NUMD2materials, &materialList)) != 0) return (error); if ((error = MOBsetup(model->NUMD2mobility, materialList)) != 0) return (error); if ((error = MESHsetup('x', model->NUMD2xMeshes, &xCoordList, &xMeshSize)) != 0) return (error); if ((error = MESHsetup('y', model->NUMD2yMeshes, &yCoordList, &yMeshSize)) != 0) return (error); if ((error = DOMNsetup(model->NUMD2domains, &domainList, xCoordList, yCoordList, materialList)) != 0) return (error); if ((error = BDRYsetup(model->NUMD2boundaries, xCoordList, yCoordList, domainList)) != 0) return (error); if ((error = ELCTsetup(model->NUMD2electrodes, &electrodeList, xCoordList, yCoordList)) != 0) return (error); /* Make sure electrodes are OK. */ checkElectrodes(electrodeList, 2); /* NUMD2 has 4 electrodes */ if ((error = CONTsetup(model->NUMD2contacts, electrodeList)) != 0) return (error); if ((error = DOPsetup(model->NUMD2dopings, &profileList, &dopTableList, xCoordList, yCoordList)) != 0) return (error); model->NUMD2matlInfo = materialList; model->NUMD2profiles = profileList; model->NUMD2dopTables = dopTableList; /* loop through all the instances of the model */ for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NUMD2printGiven) { inst->NUMD2print = 0; } else if (inst->NUMD2print <= 0) { inst->NUMD2print = 1; } if (!inst->NUMD2icFileGiven) { if (options->OPTNunique) { nameLen = strlen(options->OPTNicFile) + strlen(inst->NUMD2name) + 1; TSCALLOC(icFileName, nameLen+1, char); sprintf(icFileName, "%s.%s", options->OPTNicFile, inst->NUMD2name); icFileName[nameLen] = '\0'; inst->NUMD2icFile = icFileName; } else if (options->OPTNicFile != NULL) { nameLen = strlen(options->OPTNicFile); TSCALLOC(icFileName, nameLen+1, char); icFileName = strcpy(icFileName, options->OPTNicFile); inst->NUMD2icFile = icFileName; } else { inst->NUMD2icFile = NULL; } } inst->NUMD2state = *states; *states += NUMD2numStates; if (!inst->NUMD2pDevice) { /* Assign the mesh and profile info to each instance. */ TSCALLOC(pDevice, 1, TWOdevice); TSCALLOC(pDevice->pStats, 1, TWOstats); pDevice->name = inst->NUMD2name; pDevice->solverType = SLV_NONE; pDevice->numXNodes = xMeshSize; pDevice->numYNodes = yMeshSize; pDevice->xScale = MESHmkArray(xCoordList, xMeshSize); pDevice->yScale = MESHmkArray(yCoordList, yMeshSize); pDevice->abstol = methods->METHdabstol; pDevice->reltol = methods->METHdreltol; TSCALLOC(pDevice->elemArray, pDevice->numXNodes, TWOelem **); for (xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) { TSCALLOC(pDevice->elemArray[xIndex], pDevice->numYNodes, TWOelem *); } /* Create a copy of material data that can change with temperature. */ pDevice->pMaterials = NULL; for (pM = materialList; pM != NULL; pM = pM->next) { if (pDevice->pMaterials == NULL) { TSCALLOC(pMaterial, 1, TWOmaterial); pDevice->pMaterials = pMaterial; } else { TSCALLOC(pMaterial->next, 1, TWOmaterial); pMaterial = pMaterial->next; } /* Copy everything, then fix the incorrect pointer. */ bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = NULL; } /* Generate the mesh structure for the device. */ TWObuildMesh(pDevice, domainList, electrodeList, pDevice->pMaterials); /* Store the device info in the instance. */ inst->NUMD2pDevice = pDevice; } /* Now update the state pointers. */ TWOgetStatePointers(inst->NUMD2pDevice, states); /* Wipe out statistics from previous runs (if any). */ bzero(inst->NUMD2pDevice->pStats, sizeof(TWOstats)); inst->NUMD2pDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(NUMD2posPosPtr, NUMD2posNode, NUMD2posNode); TSTALLOC(NUMD2negNegPtr, NUMD2negNode, NUMD2negNode); TSTALLOC(NUMD2negPosPtr, NUMD2negNode, NUMD2posNode); TSTALLOC(NUMD2posNegPtr, NUMD2posNode, NUMD2negNode); } /* Clean up lists */ killCoordInfo(xCoordList); killCoordInfo(yCoordList); killDomainInfo(domainList); killElectrodeInfo(electrodeList); } return (OK); } ngspice-26/src/spicelib/devices/numd2/numd2init.c0000644000265600020320000000411512264261473021337 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "numd2itf.h" #include "numd2ext.h" #include "numd2init.h" SPICEdev NUMD2info = { { "NUMD2", "2D Numerical Junction Diode model", &NUMD2nSize, &NUMD2nSize, NUMD2names, &NUMD2pTSize, NUMD2pTable, &NUMD2mPTSize, NUMD2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NUMD2param, /* DEVmodParam */ NUMD2mParam, /* DEVload */ NUMD2load, /* DEVsetup */ NUMD2setup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NUMD2setup, /* DEVtemperature*/ NUMD2temp, /* DEVtrunc */ NUMD2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NUMD2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ NUMD2destroy, /* DEVmodDelete */ NUMD2mDelete, /* DEVdelete */ NUMD2delete, /* DEVsetic */ NULL, /* DEVask */ NUMD2ask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NUMD2pzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NUMD2dump, /* DEVacct */ NUMD2acct, #endif /* DEVinstSize */ &NUMD2iSize, /* DEVmodSize */ &NUMD2mSize }; SPICEdev * get_numd2_info(void) { return &NUMD2info; } ngspice-26/src/spicelib/devices/numd2/nud2del.c0000644000265600020320000000147212264261473020766 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMD2delete(GENmodel *inModel, IFuid name, GENinstance **kill) { NUMD2model *model = (NUMD2model *) inModel; NUMD2instance **fast = (NUMD2instance **) kill; NUMD2instance **prev = NULL; NUMD2instance *inst; for (; model; model = model->NUMD2nextModel) { prev = &(model->NUMD2instances); for (inst = *prev; inst; inst = *prev) { if (inst->NUMD2name == name || (fast && inst == *fast)) { *prev = inst->NUMD2nextInstance; FREE(inst); return (OK); } prev = &(inst->NUMD2nextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/numd2/nud2.c0000644000265600020320000000425612264261473020304 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "numd2def.h" #include "ngspice/suffix.h" /* * This file defines the 2d Numerical Diode data structures that are * available to the next level(s) up the calling hierarchy */ IFparm NUMD2pTable[] = { /* parameters */ IP("off", NUMD2_OFF, IF_FLAG, "Initially off"), IP("ic.file", NUMD2_IC_FILE, IF_STRING, "Initial condition file"), IOP("w", NUMD2_WIDTH, IF_REAL, "Width factor"), IOP("area", NUMD2_AREA, IF_REAL, "Area factor"), IP("save", NUMD2_PRINT, IF_INTEGER, "Save solutions"), IP("print", NUMD2_PRINT, IF_INTEGER, "Print solutions"), OP("vd", NUMD2_VD, IF_REAL, "Voltage"), OP("id", NUMD2_ID, IF_REAL, "Current"), OP("g11", NUMD2_G11, IF_REAL, "Conductance"), OP("c11", NUMD2_C11, IF_REAL, "Capacitance"), OP("y11", NUMD2_Y11, IF_COMPLEX, "Admittance"), OPU("g12", NUMD2_G12, IF_REAL, "Conductance"), OPU("c12", NUMD2_C12, IF_REAL, "Capacitance"), OPU("y12", NUMD2_Y12, IF_COMPLEX, "Admittance"), OPU("g21", NUMD2_G21, IF_REAL, "Conductance"), OPU("c21", NUMD2_C21, IF_REAL, "Capacitance"), OPU("y21", NUMD2_Y21, IF_COMPLEX, "Admittance"), OPU("g22", NUMD2_G22, IF_REAL, "Conductance"), OPU("c22", NUMD2_C22, IF_REAL, "Capacitance"), OPU("y22", NUMD2_Y22, IF_COMPLEX, "Admittance"), OPR("voltage", NUMD2_VD, IF_REAL, "Voltage"), OPR("current", NUMD2_ID, IF_REAL, "Current"), OPR("conductance", NUMD2_G11, IF_REAL, "Conductance"), OPR("capacitance", NUMD2_C11, IF_REAL, "Capacitance"), IOP("temp", NUMD2_TEMP, IF_REAL, "Instance Temperature") }; IFparm NUMD2mPTable[] = { /* model parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("numd", NUMD2_MOD_NUMD, IF_FLAG, "Numerical 2d-Diode Model") }; char *NUMD2names[] = { "Anode", "Cathode" }; int NUMD2nSize = NUMELEMS(NUMD2names); int NUMD2pTSize = NUMELEMS(NUMD2pTable); int NUMD2mPTSize = NUMELEMS(NUMD2mPTable); int NUMD2iSize = sizeof(NUMD2instance); int NUMD2mSize = sizeof(NUMD2model); ngspice-26/src/spicelib/devices/numd2/nud2dump.c0000644000265600020320000001031612264261473021164 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numd2def.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ static void NUMD2putHeader(FILE *, CKTcircuit *, NUMD2instance *); /* State Counter */ static int state_numOP = 0; static int state_numDC = 0; static int state_numTR = 0; void NUMD2dump(GENmodel *inModel, CKTcircuit *ckt) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; OUTPcard *output; FILE *fpState; char fileName[BSIZE_SP]; char description[BSIZE_SP]; char *prefix; int *state_num; int anyOutput = 0; if (ckt->CKTmode & MODEDCOP) { prefix = "OP"; state_num = &state_numOP; sprintf(description, "..."); } else if (ckt->CKTmode & MODEDCTRANCURVE) { prefix = "DC"; state_num = &state_numDC; sprintf(description, "sweep = % e", ckt->CKTtime); } else if (ckt->CKTmode & MODETRAN) { prefix = "TR"; state_num = &state_numTR; sprintf(description, "time = % e", ckt->CKTtime); } else { /* Not a recognized CKT mode. */ return; } for (; model != NULL; model = model->NUMD2nextModel) { output = model->NUMD2outputs; for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { if (inst->NUMD2printGiven) { if ((ckt->CKTmode & MODETRAN) && ((ckt->CKTstat->STATaccepted - 1) % inst->NUMD2print != 0)) { continue; } anyOutput = 1; sprintf(fileName, "%s%s.%d.%s", output->OUTProotFile, prefix, *state_num, inst->NUMD2name); if ((fpState = fopen(fileName, "wb")) == NULL) { perror(fileName); } else { NUMD2putHeader(fpState, ckt, inst); TWOprnSolution(fpState, inst->NUMD2pDevice, model->NUMD2outputs); fclose(fpState); LOGmakeEntry(fileName, description); } } } } if (anyOutput) { (*state_num)++; } } #define NUMD2numOutputs 4 static void NUMD2putHeader(FILE *file, CKTcircuit *ckt, NUMD2instance *inst) { char *reference; double refVal = 0.0; int numVars = NUMD2numOutputs; if (ckt->CKTmode & MODEDCOP) { reference = NULL; } else if (ckt->CKTmode & MODEDCTRANCURVE) { reference = "sweep"; refVal = ckt->CKTtime; numVars++; } else if (ckt->CKTmode & MODETRAN) { reference = "time"; refVal = ckt->CKTtime; numVars++; } else { reference = NULL; } fprintf(file, "Title: Device %s external state\n", inst->NUMD2name); fprintf(file, "Plotname: Device Operating Point\n"); fprintf(file, "Command: deftype v conductance S\n"); fprintf(file, "Flags: real\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: 1\n"); numVars = 0; fprintf(file, "Variables:\n"); if (reference) { fprintf(file, "\t%d %s unknown\n", numVars++, reference); } fprintf(file, "\t%d v12 voltage\n", numVars++); fprintf(file, "\t%d i1 current\n", numVars++); fprintf(file, "\t%d i2 current\n", numVars++); fprintf(file, "\t%d g11 conductance\n", numVars++); fprintf(file, "Values:\n0"); if (reference) { fprintf(file, "\t% e\n", refVal); } fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMD2voltage)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMD2id)); fprintf(file, "\t% e\n", - *(ckt->CKTstate0 + inst->NUMD2id)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMD2conduct)); } void NUMD2acct(GENmodel *inModel, CKTcircuit *ckt, FILE *file) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; OUTPcard *output; NG_IGNORE(ckt); for (; model != NULL; model = model->NUMD2nextModel) { output = model->NUMD2outputs; for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { if (output->OUTPstats) { TWOmemStats(file, inst->NUMD2pDevice); TWOcpuStats(file, inst->NUMD2pDevice); } } } } ngspice-26/src/spicelib/devices/numd2/numd2def.h0000644000265600020320000001130512264261473021136 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef NUMD2_H #define NUMD2_H /* data structures used to describe 2D numerical diodes */ /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* device level includes */ #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/profile.h" #include "ngspice/numglobs.h" #include "ngspice/carddefs.h" /* information needed per instance */ typedef struct sNUMD2instance { struct sNUMD2model *NUMD2modPtr; /* back pointer to model */ struct sNUMD2instance *NUMD2nextInstance; /* pointer to next instance * of current model */ IFuid NUMD2name; /* pointer to character string naming this * instance */ int NUMD2state; /* pointer to start of state vector for diode */ #define NUMD2voltage NUMD2state #define NUMD2id NUMD2state+1 #define NUMD2conduct NUMD2state+2 #define NUMD2numStates 3 int NUMD2posNode; /* number of positive node of diode */ int NUMD2negNode; /* number of negative node of diode */ TWOdevice *NUMD2pDevice; GLOBvalues NUMD2globals; /* Temp.-Dep. Global Parameters */ int NUMD2type; /* device type pn or np */ double NUMD2width; /* width factor for the diode */ double NUMD2area; /* area factor for the diode */ double NUMD2temp; /* instance temperature */ double NUMD2c11; /* small-signal capacitance */ double NUMD2y11r; /* small-signal admittance, real part */ double NUMD2y11i; /* small-signal admittance, imag part */ int NUMD2print; /* number of timesteps after which print * internal */ char *NUMD2icFile; /* Name of initial condition file */ double *NUMD2negPosPtr; /* pointer to sparse matrix at * (negative,positive) */ double *NUMD2posNegPtr; /* pointer to sparse matrix at * (positive,negative) */ double *NUMD2posPosPtr; /* pointer to sparse matrix at * (positive,positive) */ double *NUMD2negNegPtr; /* pointer to sparse matrix at * (negative,negative) */ int NUMD2off; /* 'off' flag for diode */ unsigned NUMD2smSigAvail:1; /* flag to indicate small-signal done */ unsigned NUMD2widthGiven:1; /* flag to indicate width was specified */ unsigned NUMD2areaGiven:1; /* flag to indicate area was specified */ unsigned NUMD2icFileGiven:1; /* flag to indicate init. cond. file given */ unsigned NUMD2tempGiven:1; /* flag to indicate temp was specified */ unsigned NUMD2printGiven:1; /* flag to indicate if print was specified */ } NUMD2instance; /* per model data */ typedef struct sNUMD2model { /* model structure for a diode */ int NUMD2modType; /* type index of this device type */ struct sNUMD2model *NUMD2nextModel; /* pointer to next possible model in * linked list */ NUMD2instance *NUMD2instances;/* pointer to list of instances that have * this model */ IFuid NUMD2modName; /* pointer to character string naming this * model */ /* Everything below here is numerical-device-specific */ MESHcard *NUMD2xMeshes; /* list of xmesh cards */ MESHcard *NUMD2yMeshes; /* list of ymesh cards */ DOMNcard *NUMD2domains; /* list of domain cards */ BDRYcard *NUMD2boundaries; /* list of boundary cards */ DOPcard *NUMD2dopings; /* list of doping cards */ ELCTcard *NUMD2electrodes; /* list of electrode cards */ CONTcard *NUMD2contacts; /* list of contact cards */ MODLcard *NUMD2models; /* list of model cards */ MATLcard *NUMD2materials; /* list of material cards */ MOBcard *NUMD2mobility; /* list of mobility cards */ METHcard *NUMD2methods; /* list of method cards */ OPTNcard *NUMD2options; /* list of option cards */ OUTPcard *NUMD2outputs; /* list of output cards */ TWOtranInfo *NUMD2pInfo; /* transient analysis information */ DOPprofile *NUMD2profiles; /* expanded list of doping profiles */ DOPtable *NUMD2dopTables; /* list of tables used by profiles */ TWOmaterial *NUMD2matlInfo; /* list of material info structures */ } NUMD2model; /* type of 2D diode */ #define PN 1 #define NP -1 /* device parameters */ #define NUMD2_WIDTH 1 #define NUMD2_AREA 2 #define NUMD2_IC_FILE 3 #define NUMD2_OFF 4 #define NUMD2_PRINT 5 #define NUMD2_TEMP 6 #define NUMD2_VD 7 #define NUMD2_ID 8 #define NUMD2_G11 9 #define NUMD2_C11 10 #define NUMD2_Y11 11 #define NUMD2_G12 12 #define NUMD2_C12 13 #define NUMD2_Y12 14 #define NUMD2_G21 15 #define NUMD2_C21 16 #define NUMD2_Y21 17 #define NUMD2_G22 18 #define NUMD2_C22 19 #define NUMD2_Y22 20 /* model parameters */ /* NOTE: all true model parameters have been moved to IFcardInfo structures */ #define NUMD2_MOD_NUMD 101 /* device questions */ /* model questions */ #include "numd2ext.h" #endif /* NUMD2_H */ ngspice-26/src/spicelib/devices/numd2/numd2init.h0000644000265600020320000000040212264261473021337 0ustar andreasadmin#ifndef _NUMD2INIT_H #define _NUMD2INIT_H extern IFparm NUMD2pTable[ ]; extern IFparm NUMD2mPTable[ ]; extern char *NUMD2names[ ]; extern int NUMD2pTSize; extern int NUMD2mPTSize; extern int NUMD2nSize; extern int NUMD2iSize; extern int NUMD2mSize; #endif ngspice-26/src/spicelib/devices/numd2/nud2mdel.c0000644000265600020320000000175212264261473021144 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMD2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { NUMD2model **model = (NUMD2model **) inModel; NUMD2model *modfast = (NUMD2model *) kill; NUMD2instance *inst; NUMD2instance *prev = NULL; NUMD2model **oldmod; oldmod = model; for (; *model; model = &((*model)->NUMD2nextModel)) { if ((*model)->NUMD2modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: *oldmod = (*model)->NUMD2nextModel; /* cut deleted device out of list */ for (inst = (*model)->NUMD2instances; inst; inst = inst->NUMD2nextInstance) { if (prev) FREE(prev); prev = inst; } if (prev) FREE(prev); FREE(*model); return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2parm.c0000644000265600020320000000215612264261473021161 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMD2param(int param, IFvalue *value, GENinstance *inInst, IFvalue *select) { NUMD2instance *inst = (NUMD2instance *) inInst; NG_IGNORE(select); switch (param) { case NUMD2_WIDTH: inst->NUMD2width = value->rValue; inst->NUMD2widthGiven = TRUE; break; case NUMD2_AREA: inst->NUMD2area = value->rValue; inst->NUMD2areaGiven = TRUE; break; case NUMD2_OFF: inst->NUMD2off = TRUE; break; case NUMD2_IC_FILE: inst->NUMD2icFile = value->sValue; inst->NUMD2icFileGiven = TRUE; break; case NUMD2_PRINT: inst->NUMD2print = value->iValue; inst->NUMD2printGiven = TRUE; break; case NUMD2_TEMP: inst->NUMD2temp = value->rValue + CONSTCtoK; inst->NUMD2tempGiven = TRUE; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2acld.c0000644000265600020320000000471512264261473021130 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/numglobs.h" #include "ngspice/suffix.h" int NUMD2acLoad(GENmodel *inModel, CKTcircuit *ckt) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; SPcomplex y; double startTime; /* loop through all the diode models */ for (; model != NULL; model = model->NUMD2nextModel) { FieldDepMobility = model->NUMD2models->MODLfieldDepMobility; TransDepMobility = model->NUMD2models->MODLtransDepMobility; SurfaceMobility = model->NUMD2models->MODLsurfaceMobility; Srh = model->NUMD2models->MODLsrh; Auger = model->NUMD2models->MODLauger; AvalancheGen = model->NUMD2models->MODLavalancheGen; OneCarrier = model->NUMD2methods->METHoneCarrier; AcAnalysisMethod = model->NUMD2methods->METHacAnalysisMethod; MobDeriv = model->NUMD2methods->METHmobDeriv; TWOacDebug = model->NUMD2outputs->OUTPacDebug; for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMD2globals)); model->NUMD2methods->METHacAnalysisMethod = NUMD2admittance(inst->NUMD2pDevice, ckt->CKTomega, &y); *(inst->NUMD2posPosPtr) += y.real; *(inst->NUMD2posPosPtr + 1) += y.imag; *(inst->NUMD2negNegPtr) += y.real; *(inst->NUMD2negNegPtr + 1) += y.imag; *(inst->NUMD2negPosPtr) -= y.real; *(inst->NUMD2negPosPtr + 1) -= y.imag; *(inst->NUMD2posNegPtr) -= y.real; *(inst->NUMD2posNegPtr + 1) -= y.imag; if (ckt->CKTomega != 0.0) { inst->NUMD2c11 = y.imag / ckt->CKTomega; } else { inst->NUMD2c11 = 0.0; /* XXX What else can be done?! */ } inst->NUMD2y11r = y.real; inst->NUMD2y11i = y.imag; inst->NUMD2smSigAvail = TRUE; inst->NUMD2pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2pzld.c0000644000265600020320000000377512264261473021203 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "numd2def.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMD2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; SPcomplex y; double startTime; NG_IGNORE(ckt); /* loop through all the diode models */ for (; model != NULL; model = model->NUMD2nextModel) { FieldDepMobility = model->NUMD2models->MODLfieldDepMobility; TransDepMobility = model->NUMD2models->MODLtransDepMobility; SurfaceMobility = model->NUMD2models->MODLsurfaceMobility; Srh = model->NUMD2models->MODLsrh; Auger = model->NUMD2models->MODLauger; AvalancheGen = model->NUMD2models->MODLavalancheGen; OneCarrier = model->NUMD2methods->METHoneCarrier; AcAnalysisMethod = model->NUMD2methods->METHacAnalysisMethod; MobDeriv = model->NUMD2methods->METHmobDeriv; TWOacDebug = model->NUMD2outputs->OUTPacDebug; for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMD2globals)); NUMD2ys(inst->NUMD2pDevice, s, &y); *(inst->NUMD2posPosPtr) += y.real; *(inst->NUMD2posPosPtr + 1) += y.imag; *(inst->NUMD2negNegPtr) += y.real; *(inst->NUMD2negNegPtr + 1) += y.imag; *(inst->NUMD2negPosPtr) -= y.real; *(inst->NUMD2negPosPtr + 1) -= y.imag; *(inst->NUMD2posNegPtr) -= y.real; *(inst->NUMD2posNegPtr + 1) -= y.imag; inst->NUMD2pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2trun.c0000644000265600020320000000256712264261473021220 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/suffix.h" #include "ngspice/cidersupt.h" int NUMD2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; double deltaNew; double deltaNorm[7]; double startTime; int i; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } for (; model != NULL; model = model->NUMD2nextModel) { OneCarrier = model->NUMD2methods->METHoneCarrier; model->NUMD2pInfo->order = ckt->CKTorder; model->NUMD2pInfo->delta = deltaNorm; model->NUMD2pInfo->lteCoeff = computeLTECoeff(model->NUMD2pInfo); for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { startTime = SPfrontEnd->IFseconds(); deltaNew = TWOtrunc(inst->NUMD2pDevice, model->NUMD2pInfo, ckt->CKTdelta); *timeStep = MIN(*timeStep, deltaNew); inst->NUMD2pDevice->pStats->totalTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2load.c0000644000265600020320000003027312264261473021142 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This is the function called each iteration to evaluate the 2d numerical * Diodes in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "numd2def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward declarations */ int NUMD2initSmSig(NUMD2instance *); int NUMD2load(GENmodel *inModel, CKTcircuit *ckt) { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; register TWOdevice *pDevice; double startTime, startTime2, totalTime, totalTime2; double id; double idhat = 0.0; double ideq; double gd; double xfact; double tol; /* temporary for tolerance calculations */ double vd; /* current diode voltage */ double delVd; int Check; double deltaNorm[7]; int devConverged = FALSE; int i; int numDevNonCon; int deviceType; int doInitSolve; int doVoltPred; char *initStateName; /* loop through all the diode models */ for (; model != NULL; model = model->NUMD2nextModel) { FieldDepMobility = model->NUMD2models->MODLfieldDepMobility; TransDepMobility = model->NUMD2models->MODLtransDepMobility; SurfaceMobility = model->NUMD2models->MODLsurfaceMobility; Srh = model->NUMD2models->MODLsrh; Auger = model->NUMD2models->MODLauger; AvalancheGen = model->NUMD2models->MODLavalancheGen; OneCarrier = model->NUMD2methods->METHoneCarrier; MobDeriv = model->NUMD2methods->METHmobDeriv; MaxIterations = model->NUMD2methods->METHitLim; TWOdcDebug = model->NUMD2outputs->OUTPdcDebug; TWOtranDebug = model->NUMD2outputs->OUTPtranDebug; TWOacDebug = model->NUMD2outputs->OUTPacDebug; deviceType = model->NUMD2options->OPTNdeviceType; doVoltPred = model->NUMD2methods->METHvoltPred; if (ckt->CKTmode & MODEINITPRED) { /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { model->NUMD2pInfo->order = ckt->CKTorder; model->NUMD2pInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMD2pInfo->intCoeff, deltaNorm); computePredCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMD2pInfo->predCoeff, deltaNorm); } } else if (ckt->CKTmode & MODEINITTRAN) { model->NUMD2pInfo->order = ckt->CKTorder; model->NUMD2pInfo->method = GEAR; model->NUMD2pInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMD2pInfo->intCoeff, deltaNorm); } /* loop through all the instances of the model */ for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { pDevice = inst->NUMD2pDevice; totalTime = 0.0; startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMD2globals)); pDevice->devStates = ckt->CKTstates; /* * initialization */ Check = 1; doInitSolve = FALSE; initStateName = NULL; if (ckt->CKTmode & MODEINITSMSIG) { vd = *(ckt->CKTstate0 + inst->NUMD2voltage); delVd = 0.0; NUMD2setBCs(pDevice, vd); } else if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + inst->NUMD2voltage) = *(ckt->CKTstate1 + inst->NUMD2voltage); vd = *(ckt->CKTstate1 + inst->NUMD2voltage); TWOsaveState(pDevice); delVd = 0.0; } else if ((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { doInitSolve = TRUE; initStateName = inst->NUMD2icFile; vd = 0.0; delVd = vd; } else if ((ckt->CKTmode & MODEINITJCT) && inst->NUMD2off) { doInitSolve = TRUE; vd = 0.0; delVd = vd; } else if (ckt->CKTmode & MODEINITJCT) { doInitSolve = TRUE; initStateName = inst->NUMD2icFile; if (deviceType == OPTN_DIODE) { vd = inst->NUMD2type * 0.6; } else if (deviceType == OPTN_MOSCAP) { vd = inst->NUMD2type * 0.8; } else { vd = 0.0; } delVd = vd; } else if (ckt->CKTmode & MODEINITFIX && inst->NUMD2off) { vd = 0.0; delVd = vd; } else { if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + inst->NUMD2voltage) = *(ckt->CKTstate1 + inst->NUMD2voltage); *(ckt->CKTstate0 + inst->NUMD2id) = *(ckt->CKTstate1 + inst->NUMD2id); *(ckt->CKTstate0 + inst->NUMD2conduct) = *(ckt->CKTstate1 + inst->NUMD2conduct); if (!(ckt->CKTmode & MODEDCTRANCURVE)) { /* no linear prediction on device voltages */ vd = *(ckt->CKTstate1 + inst->NUMD2voltage); TWOpredict(pDevice, model->NUMD2pInfo); } else { if (doVoltPred) { /* linear prediction */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; vd = (1+xfact) * (*(ckt->CKTstate1 + inst->NUMD2voltage)) - (xfact) * (*(ckt->CKTstate2 + inst->NUMD2voltage)); } else { vd = *(ckt->CKTstate1 + inst->NUMD2voltage); } } } else { vd = *(ckt->CKTrhsOld + inst->NUMD2posNode) - *(ckt->CKTrhsOld + inst->NUMD2negNode); } delVd = vd - *(ckt->CKTstate0 + inst->NUMD2voltage); idhat = *(ckt->CKTstate0 + inst->NUMD2id) + *(ckt->CKTstate0 + inst->NUMD2conduct) * delVd; /* * bypass if solution has not changed */ if ((ckt->CKTbypass) && pDevice->converged && !(ckt->CKTmode & MODEINITPRED)) { tol = ckt->CKTvoltTol + ckt->CKTreltol * MAX(fabs(vd), fabs(*(ckt->CKTstate0 + inst->NUMD2voltage))); if (fabs(delVd) < tol) { tol = ckt->CKTreltol * MAX(fabs(idhat), fabs(*(ckt->CKTstate0 + inst->NUMD2id))) + ckt->CKTabstol; if (fabs(idhat - *(ckt->CKTstate0 + inst->NUMD2id)) < tol) { vd = *(ckt->CKTstate0 + inst->NUMD2voltage); id = *(ckt->CKTstate0 + inst->NUMD2id); gd = *(ckt->CKTstate0 + inst->NUMD2conduct); goto load; } } } /* * limit new junction voltage */ if (deviceType == OPTN_DIODE) { vd = inst->NUMD2type * limitJunctionVoltage( inst->NUMD2type * vd, inst->NUMD2type * *(ckt->CKTstate0 + inst->NUMD2voltage), &Check); } else if (deviceType == OPTN_MOSCAP) { vd = inst->NUMD2type * limitVgb( inst->NUMD2type * vd, inst->NUMD2type * *(ckt->CKTstate0 + inst->NUMD2voltage), &Check); } else { vd = inst->NUMD2type * limitResistorVoltage( inst->NUMD2type * vd, inst->NUMD2type * *(ckt->CKTstate0 + inst->NUMD2voltage), &Check); } delVd = vd - *(ckt->CKTstate0 + inst->NUMD2voltage); NUMD2setBCs(pDevice, vd - delVd); } if (doInitSolve) { if (TWOdcDebug) { printVoltages(stdout, model->NUMD2modName, inst->NUMD2name, deviceType, 1, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } startTime2 = SPfrontEnd->IFseconds(); TWOequilSolve(pDevice); totalTime2 = SPfrontEnd->IFseconds() - startTime2; pDevice->pStats->totalTime[STAT_SETUP] += totalTime2; pDevice->pStats->totalTime[STAT_DC] -= totalTime2; TWObiasSolve(pDevice, MaxIterations, FALSE, NULL); *(ckt->CKTstate0 + inst->NUMD2voltage) = 0.0; if (initStateName != NULL) { if (TWOreadState(pDevice, initStateName, 1, &vd, NULL, NULL ) < 0) { fprintf(stderr, "NUMD2load: trouble reading state-file %s\n", initStateName); } else { *(ckt->CKTstate0 + inst->NUMD2voltage) = vd; NUMD2setBCs(pDevice, vd); delVd = 0.0; } } } /* * compute dc current and derivitives */ /* use the routines for numerical simulation */ if (ckt->CKTmode & (MODEDCOP | MODETRANOP | MODEDCTRANCURVE | MODEINITSMSIG)) { numDevNonCon = 0; inst->NUMD2c11 = inst->NUMD2y11r = inst->NUMD2y11i = 0.0; inst->NUMD2smSigAvail = FALSE; devNonCon: NUMD2project(pDevice, delVd); if (TWOdcDebug) { printVoltages(stdout, model->NUMD2modName, inst->NUMD2name, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); } TWObiasSolve(pDevice, MaxIterations, FALSE, model->NUMD2pInfo); devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* extract the current and conductance information */ NUMD2current(pDevice, FALSE, NULL, &id); NUMD2conductance(pDevice, FALSE, NULL, &gd); } else { /* do voltage step backtracking */ /* restore the boundary nodes to the previous value */ NUMD2setBCs(pDevice, vd - delVd); TWOstoreInitialGuess(pDevice); TWOresetJacobian(pDevice); delVd *= 0.5; vd = delVd + *(ckt->CKTstate0 + inst->NUMD2voltage); numDevNonCon++; Check = 1; if (numDevNonCon > 10) { printVoltages(stderr, model->NUMD2modName, inst->NUMD2name, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); fprintf(stderr, "*** Non-convergence during load ***\n"); totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } else { goto devNonCon; } } } if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { /* * store small-signal parameters */ if ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) { if (ckt->CKTmode & MODEINITSMSIG) { totalTime = SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; startTime2 = SPfrontEnd->IFseconds(); NUMD2initSmSig(inst); pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime2; continue; } else { inst->NUMD2smSigAvail = FALSE; } /* * transient analysis */ if (ckt->CKTmode & MODEINITPRED) { NUMD2setBCs(pDevice, vd); TWOstoreInitialGuess(pDevice); } else { NUMD2update(pDevice, delVd, TRUE); } if (TWOtranDebug) { printVoltages(stdout, model->NUMD2modName, inst->NUMD2name, deviceType, 1, vd, delVd, 0.0, 0.0, 0.0, 0.0); } TWObiasSolve(pDevice, 0, TRUE, model->NUMD2pInfo); if (!finite(pDevice->rhsNorm)) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_TRAN] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } devConverged = TWOdeviceConverged(pDevice); pDevice->converged = devConverged; /* extract the current and conductance information */ NUMD2current(pDevice, TRUE, model->NUMD2pInfo->intCoeff, &id); NUMD2conductance(pDevice, TRUE, model->NUMD2pInfo->intCoeff, &gd); } } /* * check convergence */ if ((!(ckt->CKTmode & MODEINITFIX)) || (!(inst->NUMD2off))) { if (Check == 1 || !devConverged) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(idhat), fabs(id)) + ckt->CKTabstol; if (fabs(idhat - id) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } } } *(ckt->CKTstate0 + inst->NUMD2voltage) = vd; *(ckt->CKTstate0 + inst->NUMD2id) = id; *(ckt->CKTstate0 + inst->NUMD2conduct) = gd; load: /* * load current vector */ ideq = id - gd * vd; *(ckt->CKTrhs + inst->NUMD2negNode) += ideq; *(ckt->CKTrhs + inst->NUMD2posNode) -= ideq; /* * load matrix */ *(inst->NUMD2posPosPtr) += gd; *(inst->NUMD2negNegPtr) += gd; *(inst->NUMD2negPosPtr) -= gd; *(inst->NUMD2posNegPtr) -= gd; totalTime += SPfrontEnd->IFseconds() - startTime; if (ckt->CKTmode & MODETRAN) { pDevice->pStats->totalTime[STAT_TRAN] += totalTime; } else { pDevice->pStats->totalTime[STAT_DC] += totalTime; } } } return (OK); } int NUMD2initSmSig(NUMD2instance *inst) { SPcomplex yd; double omega = inst->NUMD2modPtr->NUMD2methods->METHomega; AcAnalysisMethod = SOR_ONLY; (void) NUMD2admittance(inst->NUMD2pDevice, omega, &yd); inst->NUMD2c11 = yd.imag / omega; inst->NUMD2y11r = yd.real; inst->NUMD2y11i = yd.imag; inst->NUMD2smSigAvail = TRUE; return (OK); } ngspice-26/src/spicelib/devices/numd2/Makefile.am0000644000265600020320000000075612264261473021325 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libnumd2.la libnumd2_la_SOURCES = \ nud2.c \ nud2acld.c \ nud2ask.c \ numd2def.h \ nud2del.c \ nud2dest.c \ nud2dump.c \ numd2ext.h \ numd2init.c \ numd2init.h \ numd2itf.h \ nud2load.c \ nud2mdel.c \ nud2mpar.c \ nud2parm.c \ nud2pzld.c \ nud2set.c \ nud2temp.c \ nud2trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/numd2/Makefile.in0000644000265600020320000004244712264261540021334 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/numd2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnumd2_la_LIBADD = am_libnumd2_la_OBJECTS = nud2.lo nud2acld.lo nud2ask.lo nud2del.lo \ nud2dest.lo nud2dump.lo numd2init.lo nud2load.lo nud2mdel.lo \ nud2mpar.lo nud2parm.lo nud2pzld.lo nud2set.lo nud2temp.lo \ nud2trun.lo libnumd2_la_OBJECTS = $(am_libnumd2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnumd2_la_SOURCES) DIST_SOURCES = $(libnumd2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnumd2.la libnumd2_la_SOURCES = \ nud2.c \ nud2acld.c \ nud2ask.c \ numd2def.h \ nud2del.c \ nud2dest.c \ nud2dump.c \ numd2ext.h \ numd2init.c \ numd2init.h \ numd2itf.h \ nud2load.c \ nud2mdel.c \ nud2mpar.c \ nud2parm.c \ nud2pzld.c \ nud2set.c \ nud2temp.c \ nud2trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/numd2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/numd2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnumd2.la: $(libnumd2_la_OBJECTS) $(libnumd2_la_DEPENDENCIES) $(EXTRA_libnumd2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnumd2_la_OBJECTS) $(libnumd2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2dump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2parm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nud2trun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numd2init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/numd2/nud2temp.c0000644000265600020320000000705012264261473021165 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numd2def.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMD2temp(GENmodel *inModel, CKTcircuit *ckt) /* * perform the temperature update */ { register NUMD2model *model = (NUMD2model *) inModel; register NUMD2instance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; TWOmaterial *pM, *pMaterial, *pNextMaterial; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NUMD2nextModel) { methods = model->NUMD2methods; models = model->NUMD2models; options = model->NUMD2options; outputs = model->NUMD2outputs; if (!options->OPTNtnomGiven) { options->OPTNtnom = ckt->CKTnomTemp; } for (pM = model->NUMD2matlInfo; pM != NULL; pM = pM->next) { pM->tnom = options->OPTNtnom; } BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; MatchingMobility = models->MODLmatchingMobility; OneCarrier = methods->METHoneCarrier; for (inst = model->NUMD2instances; inst != NULL; inst = inst->NUMD2nextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NUMD2tempGiven) { inst->NUMD2temp = ckt->CKTtemp; } if (!inst->NUMD2areaGiven || inst->NUMD2area <= 0.0) { inst->NUMD2area = 1.0; } if (!inst->NUMD2widthGiven || inst->NUMD2width <= 0.0) { inst->NUMD2width = 1.0; } inst->NUMD2pDevice->width = inst->NUMD2area * inst->NUMD2width * options->OPTNdefw; /* Compute and save globals for this instance. */ GLOBcomputeGlobals(&(inst->NUMD2globals), inst->NUMD2temp); /* Calculate new sets of material parameters. */ pM = model->NUMD2matlInfo; pMaterial = inst->NUMD2pDevice->pMaterials; for (; pM != NULL; pM = pM->next, pMaterial = pMaterial->next) { /* Copy everything, then fix the incorrect pointer. */ pNextMaterial = pMaterial->next; bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = pNextMaterial; /* Now do the temperature dependence. */ MATLtempDep(pMaterial, pMaterial->tnom); if (outputs->OUTPmaterial) { printMaterialInfo(pMaterial); } } /* Assign doping to the mesh. */ TWOsetDoping(inst->NUMD2pDevice, model->NUMD2profiles, model->NUMD2dopTables); /* Assign physical parameters to the mesh. */ TWOsetup(inst->NUMD2pDevice); /* Assign boundary condition parameters. */ TWOsetBCparams(inst->NUMD2pDevice, model->NUMD2boundaries); /* Normalize everything. */ TWOnormalize(inst->NUMD2pDevice); /* Find the device's type. */ if (inst->NUMD2pDevice->pFirstContact->pNodes[0]->netConc < 0.0) { inst->NUMD2type = PN; if (OneCarrier) { methods->METHoneCarrier = P_TYPE; } } else { inst->NUMD2type = NP; if (OneCarrier) { methods->METHoneCarrier = N_TYPE; } } inst->NUMD2pDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numd2/nud2ask.c0000644000265600020320000000611612264261473021000 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Check out this one */ extern int NUMD2initSmSig(NUMD2instance *); /* ARGSUSED */ int NUMD2ask(CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select) { NUMD2instance *inst = (NUMD2instance *) inInst; NG_IGNORE(select); switch (which) { case NUMD2_WIDTH: value->rValue = inst->NUMD2width; return (OK); case NUMD2_AREA: value->rValue = inst->NUMD2area; break; case NUMD2_TEMP: value->rValue = inst->NUMD2temp - CONSTCtoK; return (OK); case NUMD2_VD: value->rValue = *(ckt->CKTstate0 + inst->NUMD2voltage); return (OK); case NUMD2_ID: value->rValue = *(ckt->CKTstate0 + inst->NUMD2id); return (OK); case NUMD2_G11: value->rValue = *(ckt->CKTstate0 + inst->NUMD2conduct); return (OK); case NUMD2_G12: value->rValue = -*(ckt->CKTstate0 + inst->NUMD2conduct); return (OK); case NUMD2_G21: value->rValue = -*(ckt->CKTstate0 + inst->NUMD2conduct); return (OK); case NUMD2_G22: value->rValue = *(ckt->CKTstate0 + inst->NUMD2conduct); return (OK); case NUMD2_C11: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->rValue = inst->NUMD2c11; return (OK); case NUMD2_C12: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->rValue = -inst->NUMD2c11; return (OK); case NUMD2_C21: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->rValue = -inst->NUMD2c11; return (OK); case NUMD2_C22: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->rValue = inst->NUMD2c11; return (OK); case NUMD2_Y11: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->cValue.real = inst->NUMD2y11r; value->cValue.imag = inst->NUMD2y11i; return (OK); case NUMD2_Y12: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->cValue.real = -inst->NUMD2y11r; value->cValue.imag = -inst->NUMD2y11i; return (OK); case NUMD2_Y21: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->cValue.real = -inst->NUMD2y11r; value->cValue.imag = -inst->NUMD2y11i; return (OK); case NUMD2_Y22: if (!inst->NUMD2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMD2initSmSig(inst); } value->cValue.real = inst->NUMD2y11r; value->cValue.imag = inst->NUMD2y11i; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ return (E_BADPARM); } ngspice-26/src/spicelib/devices/numd2/nud2mpar.c0000644000265600020320000000134112264261473021154 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NUMD2s in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "numd2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMD2mParam(int param, IFvalue *value, GENmodel *inModel) { NG_IGNORE(value); NG_IGNORE(inModel); switch (param) { case NUMD2_MOD_NUMD: /* no action - already know it is a 2d-numerical diode, but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numos/0000755000265600020320000000000012264261712017371 5ustar andreasadminngspice-26/src/spicelib/devices/numos/numm.c0000644000265600020320000000736112264261473020524 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "numosdef.h" #include "ngspice/suffix.h" /* * This file defines the 2d Numerical MOSFET data structures that are * available to the next level(s) up the calling hierarchy */ IFparm NUMOSpTable[] = { /* parameters */ IP("off", NUMOS_OFF, IF_FLAG, "Device initially off"), IP("ic.file", NUMOS_IC_FILE, IF_STRING, "Initial condition file"), IOP("area", NUMOS_AREA, IF_REAL, "Area factor"), IOP("w", NUMOS_WIDTH, IF_REAL, "Width factor"), IOP("l", NUMOS_LENGTH, IF_REAL, "Length factor"), IP("save", NUMOS_PRINT, IF_INTEGER, "Save solutions"), IP("print", NUMOS_PRINT, IF_INTEGER, "Print solutions"), OP("g11", NUMOS_G11, IF_REAL, "Conductance"), OP("c11", NUMOS_C11, IF_REAL, "Capacitance"), OP("y11", NUMOS_Y11, IF_COMPLEX, "Admittance"), OP("g12", NUMOS_G12, IF_REAL, "Conductance"), OP("c12", NUMOS_C12, IF_REAL, "Capacitance"), OP("y12", NUMOS_Y12, IF_COMPLEX, "Admittance"), OP("g13", NUMOS_G13, IF_REAL, "Conductance"), OP("c13", NUMOS_C13, IF_REAL, "Capacitance"), OP("y13", NUMOS_Y13, IF_COMPLEX, "Admittance"), OPU("g14", NUMOS_G14, IF_REAL, "Conductance"), OPU("c14", NUMOS_C14, IF_REAL, "Capacitance"), OPU("y14", NUMOS_Y14, IF_COMPLEX, "Admittance"), OP("g21", NUMOS_G21, IF_REAL, "Conductance"), OP("c21", NUMOS_C21, IF_REAL, "Capacitance"), OP("y21", NUMOS_Y21, IF_COMPLEX, "Admittance"), OP("g22", NUMOS_G22, IF_REAL, "Conductance"), OP("c22", NUMOS_C22, IF_REAL, "Capacitance"), OP("y22", NUMOS_Y22, IF_COMPLEX, "Admittance"), OP("g23", NUMOS_G23, IF_REAL, "Conductance"), OP("c23", NUMOS_C23, IF_REAL, "Capacitance"), OP("y23", NUMOS_Y23, IF_COMPLEX, "Admittance"), OPU("g24", NUMOS_G24, IF_REAL, "Conductance"), OPU("c24", NUMOS_C24, IF_REAL, "Capacitance"), OPU("y24", NUMOS_Y24, IF_COMPLEX, "Admittance"), OP("g31", NUMOS_G31, IF_REAL, "Conductance"), OP("c31", NUMOS_C31, IF_REAL, "Capacitance"), OP("y31", NUMOS_Y31, IF_COMPLEX, "Admittance"), OP("g32", NUMOS_G32, IF_REAL, "Conductance"), OP("c32", NUMOS_C32, IF_REAL, "Capacitance"), OP("y32", NUMOS_Y32, IF_COMPLEX, "Admittance"), OP("g33", NUMOS_G33, IF_REAL, "Conductance"), OP("c33", NUMOS_C33, IF_REAL, "Capacitance"), OP("y33", NUMOS_Y33, IF_COMPLEX, "Admittance"), OPU("g34", NUMOS_G34, IF_REAL, "Conductance"), OPU("c34", NUMOS_C34, IF_REAL, "Capacitance"), OPU("y34", NUMOS_Y34, IF_COMPLEX, "Admittance"), OPU("g41", NUMOS_G41, IF_REAL, "Conductance"), OPU("c41", NUMOS_C41, IF_REAL, "Capacitance"), OPU("y41", NUMOS_Y41, IF_COMPLEX, "Admittance"), OPU("g42", NUMOS_G42, IF_REAL, "Conductance"), OPU("c42", NUMOS_C42, IF_REAL, "Capacitance"), OPU("y42", NUMOS_Y42, IF_COMPLEX, "Admittance"), OPU("g43", NUMOS_G43, IF_REAL, "Conductance"), OPU("c43", NUMOS_C43, IF_REAL, "Capacitance"), OPU("y43", NUMOS_Y43, IF_COMPLEX, "Admittance"), OPU("g44", NUMOS_G44, IF_REAL, "Conductance"), OPU("c44", NUMOS_C44, IF_REAL, "Capacitance"), OPU("y44", NUMOS_Y44, IF_COMPLEX, "Admittance"), IOP("temp", NUMOS_TEMP, IF_REAL, "Instance temperature") }; IFparm NUMOSmPTable[] = { /* model parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("numos", NUMOS_MOD_NUMOS, IF_FLAG, "Numerical MOSFET"), }; char *NUMOSnames[] = { "Drain", "Gate", "Source", "Substrate" }; int NUMOSnSize = NUMELEMS(NUMOSnames); int NUMOSpTSize = NUMELEMS(NUMOSpTable); int NUMOSmPTSize = NUMELEMS(NUMOSmPTable); int NUMOSiSize = sizeof(NUMOSinstance); int NUMOSmSize = sizeof(NUMOSmodel); ngspice-26/src/spicelib/devices/numos/nummask.c0000644000265600020320000002540512264261473021222 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Externals Declarations */ extern int NUMOSinitSmSig(NUMOSinstance *); /* ARGSUSED */ int NUMOSask(CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select) { NUMOSinstance *inst = (NUMOSinstance *) inInst; NG_IGNORE(select); switch (which) { case NUMOS_AREA: value->rValue = inst->NUMOSarea; return (OK); case NUMOS_WIDTH: value->rValue = inst->NUMOSwidth; return (OK); case NUMOS_LENGTH: value->rValue = inst->NUMOSlength; return (OK); case NUMOS_TEMP: value->rValue = inst->NUMOStemp - CONSTCtoK; return (OK); case NUMOS_G11: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIdDVdb); return (OK); case NUMOS_G12: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIdDVgb); return (OK); case NUMOS_G13: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIdDVsb); return (OK); case NUMOS_G14: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIdDVdb) - *(ckt->CKTstate0 + inst->NUMOSdIdDVgb) - *(ckt->CKTstate0 + inst->NUMOSdIdDVsb); return (OK); case NUMOS_G21: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIgDVdb); return (OK); case NUMOS_G22: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIgDVgb); return (OK); case NUMOS_G23: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIgDVsb); return (OK); case NUMOS_G24: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIgDVdb) - *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) - *(ckt->CKTstate0 + inst->NUMOSdIgDVsb); return (OK); case NUMOS_G31: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIsDVdb); return (OK); case NUMOS_G32: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIsDVgb); return (OK); case NUMOS_G33: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIsDVsb); return (OK); case NUMOS_G34: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIsDVdb) - *(ckt->CKTstate0 + inst->NUMOSdIsDVgb) - *(ckt->CKTstate0 + inst->NUMOSdIsDVsb); return (OK); case NUMOS_G41: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIdDVdb) - *(ckt->CKTstate0 + inst->NUMOSdIgDVdb) - *(ckt->CKTstate0 + inst->NUMOSdIsDVdb); return (OK); case NUMOS_G42: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIdDVgb) - *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) - *(ckt->CKTstate0 + inst->NUMOSdIsDVgb); return (OK); case NUMOS_G43: value->rValue = -*(ckt->CKTstate0 + inst->NUMOSdIdDVsb) - *(ckt->CKTstate0 + inst->NUMOSdIgDVsb) - *(ckt->CKTstate0 + inst->NUMOSdIsDVsb); return (OK); case NUMOS_G44: value->rValue = *(ckt->CKTstate0 + inst->NUMOSdIdDVdb) + *(ckt->CKTstate0 + inst->NUMOSdIgDVdb) + *(ckt->CKTstate0 + inst->NUMOSdIsDVdb) + *(ckt->CKTstate0 + inst->NUMOSdIdDVgb) + *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) + *(ckt->CKTstate0 + inst->NUMOSdIsDVgb) + *(ckt->CKTstate0 + inst->NUMOSdIdDVsb) + *(ckt->CKTstate0 + inst->NUMOSdIgDVsb) + *(ckt->CKTstate0 + inst->NUMOSdIsDVsb); return (OK); case NUMOS_C11: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc11; return (OK); case NUMOS_C12: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc12; return (OK); case NUMOS_C13: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc13; return (OK); case NUMOS_C14: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc11 - inst->NUMOSc12 - inst->NUMOSc13; return (OK); case NUMOS_C21: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc21; return (OK); case NUMOS_C22: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc22; return (OK); case NUMOS_C23: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc23; return (OK); case NUMOS_C24: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc21 - inst->NUMOSc22 - inst->NUMOSc23; return (OK); case NUMOS_C31: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc31; return (OK); case NUMOS_C32: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc32; return (OK); case NUMOS_C33: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc33; return (OK); case NUMOS_C34: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc31 - inst->NUMOSc32 - inst->NUMOSc33; return (OK); case NUMOS_C41: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc11 - inst->NUMOSc21 - inst->NUMOSc31; return (OK); case NUMOS_C42: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc12 - inst->NUMOSc22 - inst->NUMOSc32; return (OK); case NUMOS_C43: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = -inst->NUMOSc13 - inst->NUMOSc23 - inst->NUMOSc33; return (OK); case NUMOS_C44: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->rValue = inst->NUMOSc11 + inst->NUMOSc12 + inst->NUMOSc13 + inst->NUMOSc21 + inst->NUMOSc22 + inst->NUMOSc23 + inst->NUMOSc31 + inst->NUMOSc32 + inst->NUMOSc33; return (OK); case NUMOS_Y11: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy11r; value->cValue.imag = inst->NUMOSy11i; return (OK); case NUMOS_Y12: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy12r; value->cValue.imag = inst->NUMOSy12i; return (OK); case NUMOS_Y13: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy13r; value->cValue.imag = inst->NUMOSy13i; return (OK); case NUMOS_Y14: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy11r - inst->NUMOSy11r - inst->NUMOSy11r; value->cValue.imag = -inst->NUMOSy11i - inst->NUMOSy11i - inst->NUMOSy11i; return (OK); case NUMOS_Y21: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy21r; value->cValue.imag = inst->NUMOSy21i; return (OK); case NUMOS_Y22: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy22r; value->cValue.imag = inst->NUMOSy22i; return (OK); case NUMOS_Y23: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy23r; value->cValue.imag = inst->NUMOSy23i; return (OK); case NUMOS_Y24: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy21r - inst->NUMOSy22r - inst->NUMOSy23r; value->cValue.imag = -inst->NUMOSy21i - inst->NUMOSy22i - inst->NUMOSy23i; return (OK); case NUMOS_Y31: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy31r; value->cValue.imag = inst->NUMOSy31i; return (OK); case NUMOS_Y32: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy32r; value->cValue.imag = inst->NUMOSy32i; return (OK); case NUMOS_Y33: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy33r; value->cValue.imag = inst->NUMOSy33i; return (OK); case NUMOS_Y34: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy31r - inst->NUMOSy32r - inst->NUMOSy33r; value->cValue.imag = -inst->NUMOSy31i - inst->NUMOSy32i - inst->NUMOSy33i; return (OK); case NUMOS_Y41: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy11r - inst->NUMOSy21r - inst->NUMOSy31r; value->cValue.imag = -inst->NUMOSy11i - inst->NUMOSy21i - inst->NUMOSy31i; return (OK); case NUMOS_Y42: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy12r - inst->NUMOSy22r - inst->NUMOSy32r; value->cValue.imag = -inst->NUMOSy12i - inst->NUMOSy22i - inst->NUMOSy32i; return (OK); case NUMOS_Y43: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = -inst->NUMOSy13r - inst->NUMOSy23r - inst->NUMOSy33r; value->cValue.imag = -inst->NUMOSy13i - inst->NUMOSy23i - inst->NUMOSy33i; return (OK); case NUMOS_Y44: if (!inst->NUMOSsmSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NUMOSinitSmSig(inst); } value->cValue.real = inst->NUMOSy11r + inst->NUMOSy21r + inst->NUMOSy31r + inst->NUMOSy12r + inst->NUMOSy22r + inst->NUMOSy32r + inst->NUMOSy13r + inst->NUMOSy23r + inst->NUMOSy33r; value->cValue.imag = inst->NUMOSy11i + inst->NUMOSy21i + inst->NUMOSy31i + inst->NUMOSy12i + inst->NUMOSy22i + inst->NUMOSy32i + inst->NUMOSy13i + inst->NUMOSy23i + inst->NUMOSy33i; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/numos/nummdump.c0000644000265600020320000001172112264261473021405 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numosdef.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ static void NUMOSputHeader(FILE *, CKTcircuit *, NUMOSinstance *); /* State Counter */ static int state_numOP = 0; static int state_numDC = 0; static int state_numTR = 0; void NUMOSdump(GENmodel *inModel, CKTcircuit *ckt) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; OUTPcard *output; FILE *fpState; char fileName[BSIZE_SP]; char description[BSIZE_SP]; char *prefix; int *state_num; int anyOutput = 0; if (ckt->CKTmode & MODEDCOP) { prefix = "OP"; state_num = &state_numOP; sprintf(description, "..."); } else if (ckt->CKTmode & MODEDCTRANCURVE) { prefix = "DC"; state_num = &state_numDC; sprintf(description, "sweep = % e", ckt->CKTtime); } else if (ckt->CKTmode & MODETRAN) { prefix = "TR"; state_num = &state_numTR; sprintf(description, "time = % e", ckt->CKTtime); } else { /* Not a recognized CKT mode. */ return; } for (; model != NULL; model = model->NUMOSnextModel) { output = model->NUMOSoutputs; for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { if (inst->NUMOSprintGiven) { if ((ckt->CKTmode & MODETRAN) && ((ckt->CKTstat->STATaccepted - 1) % inst->NUMOSprint != 0)) { continue; } anyOutput = 1; sprintf(fileName, "%s%s.%d.%s", output->OUTProotFile, prefix, *state_num, inst->NUMOSname); if ((fpState = fopen(fileName, "wb")) == NULL) { perror(fileName); } else { NUMOSputHeader(fpState, ckt, inst); TWOprnSolution(fpState, inst->NUMOSpDevice, model->NUMOSoutputs); fclose(fpState); LOGmakeEntry(fileName, description); } } } } if (anyOutput) { (*state_num)++; } } #define NUMOSnumOutputs 10 static void NUMOSputHeader(FILE *file, CKTcircuit *ckt, NUMOSinstance *inst) { char *reference; double refVal = 0.0; int numVars = NUMOSnumOutputs; if (ckt->CKTmode & MODEDCOP) { reference = NULL; } else if (ckt->CKTmode & MODEDCTRANCURVE) { reference = "sweep"; refVal = ckt->CKTtime; numVars++; } else if (ckt->CKTmode & MODETRAN) { reference = "time"; refVal = ckt->CKTtime; numVars++; } else { reference = NULL; } fprintf(file, "Title: Device %s external state\n", inst->NUMOSname); fprintf(file, "Plotname: Device Operating Point\n"); fprintf(file, "Command: deftype v conductance S\n"); fprintf(file, "Flags: real\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: 1\n"); numVars = 0; fprintf(file, "Variables:\n"); if (reference) { fprintf(file, "\t%d %s unknown\n", numVars++, reference); } fprintf(file, "\t%d v14 voltage\n", numVars++); fprintf(file, "\t%d v24 voltage\n", numVars++); fprintf(file, "\t%d v34 voltage\n", numVars++); fprintf(file, "\t%d i1 current\n", numVars++); fprintf(file, "\t%d i2 current\n", numVars++); fprintf(file, "\t%d i3 current\n", numVars++); fprintf(file, "\t%d i4 current\n", numVars++); fprintf(file, "\t%d g11 conductance\n", numVars++); fprintf(file, "\t%d g12 conductance\n", numVars++); fprintf(file, "\t%d g13 conductance\n", numVars++); fprintf(file, "Values:\n0"); if (reference) { fprintf(file, "\t% e\n", refVal); } fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSvdb)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSvgb)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSvsb)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSid)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSig)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSis)); fprintf(file, "\t% e\n", -*(ckt->CKTstate0 + inst->NUMOSid) - *(ckt->CKTstate0 + inst->NUMOSig) - *(ckt->CKTstate0 + inst->NUMOSis)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSdIdDVdb)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSdIdDVgb)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NUMOSdIdDVsb)); } void NUMOSacct(GENmodel *inModel, CKTcircuit *ckt, FILE *file) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; OUTPcard *output; NG_IGNORE(ckt); for (; model != NULL; model = model->NUMOSnextModel) { output = model->NUMOSoutputs; for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { if (output->OUTPstats) { TWOmemStats(file, inst->NUMOSpDevice); TWOcpuStats(file, inst->NUMOSpDevice); } } } } ngspice-26/src/spicelib/devices/numos/nummdel.c0000644000265600020320000000164412264261473021207 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NUMOS instance from the circuit and frees the * storage it was using. */ #include "ngspice/ngspice.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMOSdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { NUMOSmodel *model = (NUMOSmodel *) inModel; NUMOSinstance **fast = (NUMOSinstance **) kill; NUMOSinstance **prev = NULL; NUMOSinstance *inst; for (; model; model = model->NUMOSnextModel) { prev = &(model->NUMOSinstances); for (inst = *prev; inst; inst = *prev) { if (inst->NUMOSname == name || (fast && inst == *fast)) { *prev = inst->NUMOSnextInstance; FREE(inst); return (OK); } prev = &(inst->NUMOSnextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/numos/nummtrun.c0000644000265600020320000000272512264261473021434 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine performs truncation error calculations for NUMOSs in the * circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMOStrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; double deltaNew; double deltaNorm[7]; double startTime; int i; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } for (; model != NULL; model = model->NUMOSnextModel) { OneCarrier = model->NUMOSmethods->METHoneCarrier; model->NUMOSpInfo->order = ckt->CKTorder; model->NUMOSpInfo->delta = deltaNorm; model->NUMOSpInfo->lteCoeff = computeLTECoeff(model->NUMOSpInfo); for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { startTime = SPfrontEnd->IFseconds(); deltaNew = TWOtrunc(inst->NUMOSpDevice, model->NUMOSpInfo, ckt->CKTdelta); *timeStep = MIN(*timeStep, deltaNew); inst->NUMOSpDevice->pStats->totalTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numos/nummacld.c0000644000265600020320000001411212264261473021340 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/complex.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" int NUMOSacLoad(GENmodel *inModel, CKTcircuit *ckt) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; struct mosAdmittances yAc; double startTime; for (; model != NULL; model = model->NUMOSnextModel) { FieldDepMobility = model->NUMOSmodels->MODLfieldDepMobility; TransDepMobility = model->NUMOSmodels->MODLtransDepMobility; SurfaceMobility = model->NUMOSmodels->MODLsurfaceMobility; Srh = model->NUMOSmodels->MODLsrh; Auger = model->NUMOSmodels->MODLauger; AvalancheGen = model->NUMOSmodels->MODLavalancheGen; OneCarrier = model->NUMOSmethods->METHoneCarrier; AcAnalysisMethod = model->NUMOSmethods->METHacAnalysisMethod; MobDeriv = model->NUMOSmethods->METHmobDeriv; TWOacDebug = model->NUMOSoutputs->OUTPacDebug; for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMOSglobals)); model->NUMOSmethods->METHacAnalysisMethod = NUMOSadmittance(inst->NUMOSpDevice, ckt->CKTomega, &yAc); *(inst->NUMOSdrainDrainPtr) += yAc.yIdVdb.real; *(inst->NUMOSdrainDrainPtr + 1) += yAc.yIdVdb.imag; *(inst->NUMOSdrainSourcePtr) += yAc.yIdVsb.real; *(inst->NUMOSdrainSourcePtr + 1) += yAc.yIdVsb.imag; *(inst->NUMOSdrainGatePtr) += yAc.yIdVgb.real; *(inst->NUMOSdrainGatePtr + 1) += yAc.yIdVgb.imag; *(inst->NUMOSdrainBulkPtr) -= yAc.yIdVdb.real + yAc.yIdVsb.real + yAc.yIdVgb.real; *(inst->NUMOSdrainBulkPtr + 1) -= yAc.yIdVdb.imag + yAc.yIdVsb.imag + yAc.yIdVgb.imag; *(inst->NUMOSsourceDrainPtr) += yAc.yIsVdb.real; *(inst->NUMOSsourceDrainPtr + 1) += yAc.yIsVdb.imag; *(inst->NUMOSsourceSourcePtr) += yAc.yIsVsb.real; *(inst->NUMOSsourceSourcePtr + 1) += yAc.yIsVsb.imag; *(inst->NUMOSsourceGatePtr) += yAc.yIsVgb.real; *(inst->NUMOSsourceGatePtr + 1) += yAc.yIsVgb.imag; *(inst->NUMOSsourceBulkPtr) -= yAc.yIsVdb.real + yAc.yIsVsb.real + yAc.yIsVgb.real; *(inst->NUMOSsourceBulkPtr + 1) -= yAc.yIsVdb.imag + yAc.yIsVsb.imag + yAc.yIsVgb.imag; *(inst->NUMOSgateDrainPtr) += yAc.yIgVdb.real; *(inst->NUMOSgateDrainPtr + 1) += yAc.yIgVdb.imag; *(inst->NUMOSgateSourcePtr) += yAc.yIgVsb.real; *(inst->NUMOSgateSourcePtr + 1) += yAc.yIgVsb.imag; *(inst->NUMOSgateGatePtr) += yAc.yIgVgb.real; *(inst->NUMOSgateGatePtr + 1) += yAc.yIgVgb.imag; *(inst->NUMOSgateBulkPtr) -= yAc.yIgVdb.real + yAc.yIgVsb.real + yAc.yIgVgb.real; *(inst->NUMOSgateBulkPtr + 1) -= yAc.yIgVdb.imag + yAc.yIgVsb.imag + yAc.yIgVgb.imag; *(inst->NUMOSbulkDrainPtr) -= yAc.yIdVdb.real + yAc.yIsVdb.real + yAc.yIgVdb.real; *(inst->NUMOSbulkDrainPtr + 1) -= yAc.yIdVdb.imag + yAc.yIsVdb.imag + yAc.yIgVdb.imag; *(inst->NUMOSbulkSourcePtr) -= yAc.yIdVsb.real + yAc.yIsVsb.real + yAc.yIgVsb.real; *(inst->NUMOSbulkSourcePtr + 1) -= yAc.yIdVsb.imag + yAc.yIsVsb.imag + yAc.yIgVsb.imag; *(inst->NUMOSbulkGatePtr) -= yAc.yIdVgb.real + yAc.yIsVgb.real + yAc.yIgVgb.real; *(inst->NUMOSbulkGatePtr + 1) -= yAc.yIdVgb.imag + yAc.yIsVgb.imag + yAc.yIgVgb.imag; *(inst->NUMOSbulkBulkPtr) += yAc.yIdVdb.real + yAc.yIdVsb.real + yAc.yIdVgb.real + yAc.yIsVdb.real + yAc.yIsVsb.real + yAc.yIsVgb.real + yAc.yIgVdb.real + yAc.yIgVsb.real + yAc.yIgVgb.real; *(inst->NUMOSbulkBulkPtr + 1) -= yAc.yIdVdb.imag + yAc.yIdVsb.imag + yAc.yIdVgb.imag + yAc.yIsVdb.imag + yAc.yIsVsb.imag + yAc.yIsVgb.imag + yAc.yIgVdb.imag + yAc.yIgVsb.imag + yAc.yIgVgb.imag; if (ckt->CKTomega != 0.0) { inst->NUMOSc11 = yAc.yIdVdb.imag / ckt->CKTomega; inst->NUMOSc12 = yAc.yIdVgb.imag / ckt->CKTomega; inst->NUMOSc13 = yAc.yIdVsb.imag / ckt->CKTomega; inst->NUMOSc21 = yAc.yIgVdb.imag / ckt->CKTomega; inst->NUMOSc22 = yAc.yIgVgb.imag / ckt->CKTomega; inst->NUMOSc23 = yAc.yIgVsb.imag / ckt->CKTomega; inst->NUMOSc31 = yAc.yIsVdb.imag / ckt->CKTomega; inst->NUMOSc32 = yAc.yIsVgb.imag / ckt->CKTomega; inst->NUMOSc33 = yAc.yIsVsb.imag / ckt->CKTomega; } else { inst->NUMOSc11 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc12 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc13 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc21 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc22 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc23 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc31 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc32 = 0.0; /* XXX What else can be done?! */ inst->NUMOSc33 = 0.0; /* XXX What else can be done?! */ } inst->NUMOSy11r = yAc.yIdVdb.real; inst->NUMOSy11i = yAc.yIdVdb.imag; inst->NUMOSy12r = yAc.yIdVgb.real; inst->NUMOSy12i = yAc.yIdVgb.imag; inst->NUMOSy13r = yAc.yIdVsb.real; inst->NUMOSy13i = yAc.yIdVsb.imag; inst->NUMOSy21r = yAc.yIgVdb.real; inst->NUMOSy21i = yAc.yIgVdb.imag; inst->NUMOSy22r = yAc.yIgVgb.real; inst->NUMOSy22i = yAc.yIgVgb.imag; inst->NUMOSy23r = yAc.yIgVsb.real; inst->NUMOSy23i = yAc.yIgVsb.imag; inst->NUMOSy31r = yAc.yIsVdb.real; inst->NUMOSy31i = yAc.yIsVdb.imag; inst->NUMOSy32r = yAc.yIsVgb.real; inst->NUMOSy32i = yAc.yIsVgb.imag; inst->NUMOSy33r = yAc.yIsVsb.real; inst->NUMOSy33i = yAc.yIsVsb.imag; inst->NUMOSsmSigAvail = TRUE; inst->NUMOSpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numos/numosdef.h0000644000265600020320000002033412264261473021370 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef NUMOS_H #define NUMOS_H /* data structures used to describe 2D Numerical MOSFETs */ /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* device level includes */ #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/profile.h" #include "ngspice/numglobs.h" #include "ngspice/carddefs.h" /* information needed per instance */ typedef struct sNUMOSinstance { struct sNUMOSmodel *NUMOSmodPtr; /* back pointer to model */ struct sNUMOSinstance *NUMOSnextInstance; /* pointer to next instance * of current model */ IFuid NUMOSname; /* pointer to character string naming this * instance */ int NUMOSstate; /* pointer to start of state vector for * mosfet */ /* entries in the state vector for mosfet: */ #define NUMOSvdb NUMOSstate #define NUMOSvsb NUMOSstate+1 #define NUMOSvgb NUMOSstate+2 #define NUMOSid NUMOSstate+3 #define NUMOSis NUMOSstate+4 #define NUMOSig NUMOSstate+5 #define NUMOSdIdDVdb NUMOSstate+6 #define NUMOSdIdDVsb NUMOSstate+7 #define NUMOSdIdDVgb NUMOSstate+8 #define NUMOSdIsDVdb NUMOSstate+9 #define NUMOSdIsDVsb NUMOSstate+10 #define NUMOSdIsDVgb NUMOSstate+11 #define NUMOSdIgDVdb NUMOSstate+12 #define NUMOSdIgDVsb NUMOSstate+13 #define NUMOSdIgDVgb NUMOSstate+14 #define NUMOSnumStates 15 int NUMOSdrainNode; /* number of drain node of MOSFET */ int NUMOSgateNode; /* number of gate node of MOSFET */ int NUMOSsourceNode; /* number of source node of MOSFET */ int NUMOSbulkNode; /* number of bulk node of MOSFET */ double NUMOSarea; /* area factor for the mosfet */ double NUMOSwidth; /* width factor for the mosfet */ double NUMOSlength; /* length factor for the mosfet */ TWOdevice *NUMOSpDevice; int NUMOStype; double NUMOStemp; /* Instance Temperature */ double NUMOSc11; /* small-signal capacitance */ double NUMOSy11r; /* small-signal admittance, real part */ double NUMOSy11i; /* small-signal admittance, imag part */ double NUMOSc12; /* small-signal capacitance */ double NUMOSy12r; /* small-signal admittance, real part */ double NUMOSy12i; /* small-signal admittance, imag part */ double NUMOSc13; /* small-signal capacitance */ double NUMOSy13r; /* small-signal admittance, real part */ double NUMOSy13i; /* small-signal admittance, imag part */ double NUMOSc21; /* small-signal capacitance */ double NUMOSy21r; /* small-signal admittance, real part */ double NUMOSy21i; /* small-signal admittance, imag part */ double NUMOSc22; /* small-signal capacitance */ double NUMOSy22r; /* small-signal admittance, real part */ double NUMOSy22i; /* small-signal admittance, imag part */ double NUMOSc23; /* small-signal capacitance */ double NUMOSy23r; /* small-signal admittance, real part */ double NUMOSy23i; /* small-signal admittance, imag part */ double NUMOSc31; /* small-signal capacitance */ double NUMOSy31r; /* small-signal admittance, real part */ double NUMOSy31i; /* small-signal admittance, imag part */ double NUMOSc32; /* small-signal capacitance */ double NUMOSy32r; /* small-signal admittance, real part */ double NUMOSy32i; /* small-signal admittance, imag part */ double NUMOSc33; /* small-signal capacitance */ double NUMOSy33r; /* small-signal admittance, real part */ double NUMOSy33i; /* small-signal admittance, imag part */ GLOBvalues NUMOSglobals; /* Temp.-Dep. Global Parameters */ int NUMOSprint; /* print timepoints */ char *NUMOSicFile; /* Name of initial condition file */ double *NUMOSdrainDrainPtr; /* pointer to sparse matrix at (drain,drain) */ double *NUMOSdrainSourcePtr; /* pointer to sparse matrix at (drain,source) */ double *NUMOSdrainGatePtr; /* pointer to sparse matrix at (drain,gate) */ double *NUMOSdrainBulkPtr; /* pointer to sparse matrix at (drain,bulk) */ double *NUMOSsourceDrainPtr; /* pointer to sparse matrix at (source,drain) */ double *NUMOSsourceSourcePtr; /* pointer to sparse matrix at * (source,source) */ double *NUMOSsourceGatePtr; /* pointer to sparse matrix at (source,gate) */ double *NUMOSsourceBulkPtr; /* pointer to sparse matrix at (source,bulk) */ double *NUMOSgateDrainPtr; /* pointer to sparse matrix at (gate,drain) */ double *NUMOSgateSourcePtr; /* pointer to sparse matrix at (gate,source) */ double *NUMOSgateGatePtr; /* pointer to sparse matrix at (gate,gate) */ double *NUMOSgateBulkPtr; /* pointer to sparse matrix at (gate,bulk) */ double *NUMOSbulkDrainPtr; /* pointer to sparse matrix at (bulk,drain) */ double *NUMOSbulkSourcePtr; /* pointer to sparse matrix at (bulk,source) */ double *NUMOSbulkGatePtr; /* pointer to sparse matrix at (bulk,gate) */ double *NUMOSbulkBulkPtr; /* pointer to sparse matrix at (bulk,bulk) */ int NUMOSoff; /* 'off' flag for mosfet */ unsigned NUMOSsmSigAvail:1; /* flag to indicate small-signal done */ unsigned NUMOSareaGiven:1; /* flag to indicate area was specified */ unsigned NUMOSwidthGiven:1; /* flag to indicate width was specified */ unsigned NUMOSlengthGiven:1; /* flag to indicate length was specified */ unsigned NUMOSicFileGiven:1; /* flag to indicate init. cond. file given */ unsigned NUMOSprintGiven:1; /* flag to indicate print was given */ unsigned NUMOStempGiven:1; /* flag to indicate temp was given */ } NUMOSinstance; /* per model data */ typedef struct sNUMOSmodel { /* model structure for a numerical device */ int NUMOSmodType; /* type index of this device type */ struct sNUMOSmodel *NUMOSnextModel; /* pointer to next model in list */ NUMOSinstance *NUMOSinstances;/* pointer to list of instances */ IFuid NUMOSmodName; /* pointer to string naming this model */ /* Everything below here is numerical-device-specific */ MESHcard *NUMOSxMeshes; /* list of xmesh cards */ MESHcard *NUMOSyMeshes; /* list of ymesh cards */ DOMNcard *NUMOSdomains; /* list of domain cards */ BDRYcard *NUMOSboundaries; /* list of boundary cards */ DOPcard *NUMOSdopings; /* list of doping cards */ ELCTcard *NUMOSelectrodes; /* list of electrode cards */ CONTcard *NUMOScontacts; /* list of contact cards */ MODLcard *NUMOSmodels; /* list of model cards */ MATLcard *NUMOSmaterials; /* list of material cards */ MOBcard *NUMOSmobility; /* list of mobility cards */ METHcard *NUMOSmethods; /* list of method cards */ OPTNcard *NUMOSoptions; /* list of option cards */ OUTPcard *NUMOSoutputs; /* list of output cards */ TWOtranInfo *NUMOSpInfo; /* transient analysis information */ DOPprofile *NUMOSprofiles; /* expanded list of doping profiles */ DOPtable *NUMOSdopTables; /* list of tables used by profiles */ TWOmaterial *NUMOSmatlInfo; /* list of material info structures */ } NUMOSmodel; /* type of 2D MOSFET */ #define N_CH 1 #define P_CH -1 /* device parameters */ #define NUMOS_AREA 1 #define NUMOS_WIDTH 2 #define NUMOS_LENGTH 3 #define NUMOS_OFF 4 #define NUMOS_IC_FILE 5 #define NUMOS_PRINT 9 #define NUMOS_TEMP 10 #define NUMOS_G11 11 #define NUMOS_C11 12 #define NUMOS_Y11 13 #define NUMOS_G12 14 #define NUMOS_C12 15 #define NUMOS_Y12 16 #define NUMOS_G13 17 #define NUMOS_C13 18 #define NUMOS_Y13 19 #define NUMOS_G14 20 #define NUMOS_C14 21 #define NUMOS_Y14 22 #define NUMOS_G21 23 #define NUMOS_C21 24 #define NUMOS_Y21 25 #define NUMOS_G22 26 #define NUMOS_C22 27 #define NUMOS_Y22 28 #define NUMOS_G23 29 #define NUMOS_C23 30 #define NUMOS_Y23 31 #define NUMOS_G24 32 #define NUMOS_C24 33 #define NUMOS_Y24 34 #define NUMOS_G31 35 #define NUMOS_C31 36 #define NUMOS_Y31 37 #define NUMOS_G32 38 #define NUMOS_C32 39 #define NUMOS_Y32 40 #define NUMOS_G33 41 #define NUMOS_C33 42 #define NUMOS_Y33 43 #define NUMOS_G34 44 #define NUMOS_C34 45 #define NUMOS_Y34 46 #define NUMOS_G41 47 #define NUMOS_C41 48 #define NUMOS_Y41 49 #define NUMOS_G42 50 #define NUMOS_C42 51 #define NUMOS_Y42 52 #define NUMOS_G43 53 #define NUMOS_C43 54 #define NUMOS_Y43 55 #define NUMOS_G44 56 #define NUMOS_C44 57 #define NUMOS_Y44 58 /* model parameters */ /* NOTE: all true model parameters have been moved to IFcardInfo structures */ #define NUMOS_MOD_NUMOS 1 /* device questions */ /* model questions */ #include "numosext.h" #endif /* NUMOS_H */ ngspice-26/src/spicelib/devices/numos/nummmpar.c0000644000265600020320000000134012264261473021373 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NUMOSs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMOSmParam(int param, IFvalue *value, GENmodel *inModel) { NG_IGNORE(value); NG_IGNORE(inModel); switch (param) { case NUMOS_MOD_NUMOS: /* no action - already know it is a 2d-numerical MOS, but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numos/nummpzld.c0000644000265600020320000001020412264261473021404 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMOSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; struct mosAdmittances yAc; double startTime; NG_IGNORE(ckt); for (; model != NULL; model = model->NUMOSnextModel) { FieldDepMobility = model->NUMOSmodels->MODLfieldDepMobility; TransDepMobility = model->NUMOSmodels->MODLtransDepMobility; SurfaceMobility = model->NUMOSmodels->MODLsurfaceMobility; Srh = model->NUMOSmodels->MODLsrh; Auger = model->NUMOSmodels->MODLauger; AvalancheGen = model->NUMOSmodels->MODLavalancheGen; OneCarrier = model->NUMOSmethods->METHoneCarrier; AcAnalysisMethod = model->NUMOSmethods->METHacAnalysisMethod; MobDeriv = model->NUMOSmethods->METHmobDeriv; TWOacDebug = model->NUMOSoutputs->OUTPacDebug; for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMOSglobals)); NUMOSys(inst->NUMOSpDevice, s, &yAc); *(inst->NUMOSdrainDrainPtr) += yAc.yIdVdb.real; *(inst->NUMOSdrainDrainPtr + 1) += yAc.yIdVdb.imag; *(inst->NUMOSdrainSourcePtr) += yAc.yIdVsb.real; *(inst->NUMOSdrainSourcePtr + 1) += yAc.yIdVsb.imag; *(inst->NUMOSdrainGatePtr) += yAc.yIdVgb.real; *(inst->NUMOSdrainGatePtr + 1) += yAc.yIdVgb.imag; *(inst->NUMOSdrainBulkPtr) -= yAc.yIdVdb.real + yAc.yIdVsb.real + yAc.yIdVgb.real; *(inst->NUMOSdrainBulkPtr + 1) -= yAc.yIdVdb.imag + yAc.yIdVsb.imag + yAc.yIdVgb.imag; *(inst->NUMOSsourceDrainPtr) += yAc.yIsVdb.real; *(inst->NUMOSsourceDrainPtr + 1) += yAc.yIsVdb.imag; *(inst->NUMOSsourceSourcePtr) += yAc.yIsVsb.real; *(inst->NUMOSsourceSourcePtr + 1) += yAc.yIsVsb.imag; *(inst->NUMOSsourceGatePtr) += yAc.yIsVgb.real; *(inst->NUMOSsourceGatePtr + 1) += yAc.yIsVgb.imag; *(inst->NUMOSsourceBulkPtr) -= yAc.yIsVdb.real + yAc.yIsVsb.real + yAc.yIsVgb.real; *(inst->NUMOSsourceBulkPtr + 1) -= yAc.yIsVdb.imag + yAc.yIsVsb.imag + yAc.yIsVgb.imag; *(inst->NUMOSgateDrainPtr) += yAc.yIgVdb.real; *(inst->NUMOSgateDrainPtr + 1) += yAc.yIgVdb.imag; *(inst->NUMOSgateSourcePtr) += yAc.yIgVsb.real; *(inst->NUMOSgateSourcePtr + 1) += yAc.yIgVsb.imag; *(inst->NUMOSgateGatePtr) += yAc.yIgVgb.real; *(inst->NUMOSgateGatePtr + 1) += yAc.yIgVgb.imag; *(inst->NUMOSgateBulkPtr) -= yAc.yIgVdb.real + yAc.yIgVsb.real + yAc.yIgVgb.real; *(inst->NUMOSgateBulkPtr + 1) -= yAc.yIgVdb.imag + yAc.yIgVsb.imag + yAc.yIgVgb.imag; *(inst->NUMOSbulkDrainPtr) -= yAc.yIdVdb.real + yAc.yIsVdb.real + yAc.yIgVdb.real; *(inst->NUMOSbulkDrainPtr + 1) -= yAc.yIdVdb.imag + yAc.yIsVdb.imag + yAc.yIgVdb.imag; *(inst->NUMOSbulkSourcePtr) -= yAc.yIdVsb.real + yAc.yIsVsb.real + yAc.yIgVsb.real; *(inst->NUMOSbulkSourcePtr + 1) -= yAc.yIdVsb.imag + yAc.yIsVsb.imag + yAc.yIgVsb.imag; *(inst->NUMOSbulkGatePtr) -= yAc.yIdVgb.real + yAc.yIsVgb.real + yAc.yIgVgb.real; *(inst->NUMOSbulkGatePtr + 1) -= yAc.yIdVgb.imag + yAc.yIsVgb.imag + yAc.yIgVgb.imag; *(inst->NUMOSbulkBulkPtr) += yAc.yIdVdb.real + yAc.yIdVsb.real + yAc.yIdVgb.real + yAc.yIsVdb.real + yAc.yIsVsb.real + yAc.yIsVgb.real + yAc.yIgVdb.real + yAc.yIgVsb.real + yAc.yIgVgb.real; *(inst->NUMOSbulkBulkPtr + 1) -= yAc.yIdVdb.imag + yAc.yIdVsb.imag + yAc.yIdVgb.imag + yAc.yIsVdb.imag + yAc.yIsVsb.imag + yAc.yIsVgb.imag + yAc.yIgVdb.imag + yAc.yIgVsb.imag + yAc.yIgVgb.imag; inst->NUMOSpDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numos/nummtemp.c0000644000265600020320000000705512264261473021412 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "numosdef.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NUMOStemp(GENmodel *inModel, CKTcircuit *ckt) /* * perform the temperature update */ { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; TWOmaterial *pM, *pMaterial, *pNextMaterial; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NUMOSnextModel) { methods = model->NUMOSmethods; models = model->NUMOSmodels; options = model->NUMOSoptions; outputs = model->NUMOSoutputs; if (!options->OPTNtnomGiven) { options->OPTNtnom = ckt->CKTnomTemp; } for (pM = model->NUMOSmatlInfo; pM != NULL; pM = pM->next) { pM->tnom = options->OPTNtnom; } BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; MatchingMobility = models->MODLmatchingMobility; OneCarrier = methods->METHoneCarrier; for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NUMOStempGiven) { inst->NUMOStemp = ckt->CKTtemp; } if (!inst->NUMOSareaGiven || inst->NUMOSarea <= 0.0) { inst->NUMOSarea = 1.0; } if (!inst->NUMOSwidthGiven || inst->NUMOSwidth <= 0.0) { inst->NUMOSwidth = 1.0; } inst->NUMOSpDevice->width = inst->NUMOSarea * inst->NUMOSwidth * options->OPTNdefw; /* Compute and save globals for this instance. */ GLOBcomputeGlobals(&(inst->NUMOSglobals), inst->NUMOStemp); /* Calculate new sets of material parameters. */ pM = model->NUMOSmatlInfo; pMaterial = inst->NUMOSpDevice->pMaterials; for (; pM != NULL; pM = pM->next, pMaterial = pMaterial->next) { /* Copy everything, then fix the incorrect pointer. */ pNextMaterial = pMaterial->next; bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = pNextMaterial; /* Now do the temperature dependence. */ MATLtempDep(pMaterial, pMaterial->tnom); if (outputs->OUTPmaterial) { printMaterialInfo(pMaterial); } } /* Assign doping to the mesh. */ TWOsetDoping(inst->NUMOSpDevice, model->NUMOSprofiles, model->NUMOSdopTables); /* Assign physical parameters to the mesh. */ TWOsetup(inst->NUMOSpDevice); /* Assign boundary condition parameters. */ TWOsetBCparams(inst->NUMOSpDevice, model->NUMOSboundaries); /* Normalize everything. */ TWOnormalize(inst->NUMOSpDevice); /* Find the device's type. */ if (inst->NUMOSpDevice->pFirstContact->pNodes[0]->netConc < 0.0) { inst->NUMOStype = P_CH; if (OneCarrier) { methods->METHoneCarrier = P_TYPE; } } else { inst->NUMOStype = N_CH; if (OneCarrier) { methods->METHoneCarrier = N_TYPE; } } inst->NUMOSpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/numos/Makefile.am0000644000265600020320000000075612264261473021441 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libnumos.la libnumos_la_SOURCES = \ numm.c \ nummacld.c \ nummask.c \ numosdef.h \ nummdel.c \ nummdest.c \ nummdump.c \ numosext.h \ numosinit.c \ numosinit.h \ numositf.h \ nummload.c \ nummmdel.c \ nummmpar.c \ nummparm.c \ nummpzld.c \ nummset.c \ nummtemp.c \ nummtrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/numos/numosinit.c0000644000265600020320000000413212264261473021566 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "numositf.h" #include "numosext.h" #include "numosinit.h" SPICEdev NUMOSinfo = { { "NUMOS", "2D Numerical MOS Field Effect Transistor model", &NUMOSnSize, &NUMOSnSize, NUMOSnames, &NUMOSpTSize, NUMOSpTable, &NUMOSmPTSize, NUMOSmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NUMOSparam, /* DEVmodParam */ NUMOSmParam, /* DEVload */ NUMOSload, /* DEVsetup */ NUMOSsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NUMOSsetup, /* DEVtemperature*/ NUMOStemp, /* DEVtrunc */ NUMOStrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NUMOSacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ NUMOSdestroy, /* DEVmodDelete */ NUMOSmDelete, /* DEVdelete */ NUMOSdelete, /* DEVsetic */ NULL, /* DEVask */ NUMOSask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NUMOSpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NUMOSdump, /* DEVacct */ NUMOSacct, #endif /* DEVinstSize */ &NUMOSiSize, /* DEVmodSize */ &NUMOSmSize }; SPICEdev * get_numos_info(void) { return &NUMOSinfo; } ngspice-26/src/spicelib/devices/numos/nummload.c0000644000265600020320000005340012264261473021357 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This is the function called each iteration to evaluate the 2d numerical * MOSFETs in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "numosdef.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ int NUMOSinitSmSig(NUMOSinstance *inst); int NUMOSload(GENmodel *inModel, CKTcircuit *ckt) { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; register TWOdevice *pDevice; double startTime, startTime2, totalTime, totalTime2; double tol; double xfact; double id, is, ig; double ideq, iseq, igeq; double idhat = 0.0, ishat = 0.0, ighat = 0.0; double delVdb, delVsb, delVgb; double vdb, vsb, vgb; struct mosConductances g; int icheck; int icheck1; int i; double deltaNorm[7]; int devConverged = 0; int numDevNonCon; int deviceType; int doInitSolve; int doVoltPred; char *initStateName; /* loop through all the models */ for (; model != NULL; model = model->NUMOSnextModel) { FieldDepMobility = model->NUMOSmodels->MODLfieldDepMobility; TransDepMobility = model->NUMOSmodels->MODLtransDepMobility; SurfaceMobility = model->NUMOSmodels->MODLsurfaceMobility; Srh = model->NUMOSmodels->MODLsrh; Auger = model->NUMOSmodels->MODLauger; AvalancheGen = model->NUMOSmodels->MODLavalancheGen; OneCarrier = model->NUMOSmethods->METHoneCarrier; MobDeriv = model->NUMOSmethods->METHmobDeriv; MaxIterations = model->NUMOSmethods->METHitLim; TWOdcDebug = model->NUMOSoutputs->OUTPdcDebug; TWOtranDebug = model->NUMOSoutputs->OUTPtranDebug; TWOacDebug = model->NUMOSoutputs->OUTPacDebug; deviceType = model->NUMOSoptions->OPTNdeviceType; doVoltPred = model->NUMOSmethods->METHvoltPred; if (ckt->CKTmode & MODEINITPRED) { /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { model->NUMOSpInfo->order = ckt->CKTorder; model->NUMOSpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMOSpInfo->intCoeff, deltaNorm); computePredCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMOSpInfo->predCoeff, deltaNorm); } } else if (ckt->CKTmode & MODEINITTRAN) { model->NUMOSpInfo->order = ckt->CKTorder; model->NUMOSpInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NUMOSpInfo->intCoeff, deltaNorm); } /* loop through all the instances of the model */ for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { pDevice = inst->NUMOSpDevice; totalTime = 0.0; startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NUMOSglobals)); /* * initialization */ pDevice->devStates = ckt->CKTstates; icheck = 1; doInitSolve = FALSE; initStateName = NULL; if (ckt->CKTmode & MODEINITSMSIG) { vdb = *(ckt->CKTstate0 + inst->NUMOSvdb); vsb = *(ckt->CKTstate0 + inst->NUMOSvsb); vgb = *(ckt->CKTstate0 + inst->NUMOSvgb); delVdb = 0.0; delVsb = 0.0; delVgb = 0.0; NUMOSsetBCs(pDevice, vdb, vsb, vgb); } else if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + inst->NUMOSvdb) = *(ckt->CKTstate1 + inst->NUMOSvdb); *(ckt->CKTstate0 + inst->NUMOSvsb) = *(ckt->CKTstate1 + inst->NUMOSvsb); *(ckt->CKTstate0 + inst->NUMOSvgb) = *(ckt->CKTstate1 + inst->NUMOSvgb); vdb = *(ckt->CKTstate1 + inst->NUMOSvdb); vsb = *(ckt->CKTstate1 + inst->NUMOSvsb); vgb = *(ckt->CKTstate1 + inst->NUMOSvgb); TWOsaveState(pDevice); delVdb = 0.0; delVsb = 0.0; delVgb = 0.0; } else if ((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { doInitSolve = TRUE; initStateName = inst->NUMOSicFile; vdb = 0.0; vsb = 0.0; vgb = 0.0; delVdb = vdb; delVsb = vsb; delVgb = vgb; } else if ((ckt->CKTmode & MODEINITJCT) && (inst->NUMOSoff == 0)) { doInitSolve = TRUE; initStateName = inst->NUMOSicFile; if (deviceType == OPTN_BIPOLAR) { /* d,g,s,b => c,b,e,s */ vdb = 0.0; vsb = -inst->NUMOStype * 1.0; vgb = -inst->NUMOStype * (1.0 - 0.6); } else if (deviceType == OPTN_JFET) { vdb = inst->NUMOStype * 0.5; vsb = 0.0; vgb = 0.0; } else { vdb = inst->NUMOStype * 0.5; vsb = 0.0; vgb = inst->NUMOStype * 1.0; } delVdb = vdb; delVsb = vsb; delVgb = vgb; } else if (ckt->CKTmode & MODEINITJCT) { doInitSolve = TRUE; vdb = 0.0; vsb = 0.0; vgb = 0.0; delVdb = vdb; delVsb = vsb; delVgb = vgb; } else if ((ckt->CKTmode & MODEINITFIX) && inst->NUMOSoff) { vdb = 0.0; vsb = 0.0; vgb = 0.0; delVdb = vdb; delVsb = vsb; delVgb = vgb; } else { if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + inst->NUMOSvdb) = *(ckt->CKTstate1 + inst->NUMOSvdb); *(ckt->CKTstate0 + inst->NUMOSvsb) = *(ckt->CKTstate1 + inst->NUMOSvsb); *(ckt->CKTstate0 + inst->NUMOSvgb) = *(ckt->CKTstate1 + inst->NUMOSvgb); *(ckt->CKTstate0 + inst->NUMOSid) = *(ckt->CKTstate1 + inst->NUMOSid); *(ckt->CKTstate0 + inst->NUMOSis) = *(ckt->CKTstate1 + inst->NUMOSis); *(ckt->CKTstate0 + inst->NUMOSig) = *(ckt->CKTstate1 + inst->NUMOSig); *(ckt->CKTstate0 + inst->NUMOSdIdDVdb) = *(ckt->CKTstate1 + inst->NUMOSdIdDVdb); *(ckt->CKTstate0 + inst->NUMOSdIdDVsb) = *(ckt->CKTstate1 + inst->NUMOSdIdDVsb); *(ckt->CKTstate0 + inst->NUMOSdIdDVgb) = *(ckt->CKTstate1 + inst->NUMOSdIdDVgb); *(ckt->CKTstate0 + inst->NUMOSdIsDVdb) = *(ckt->CKTstate1 + inst->NUMOSdIsDVdb); *(ckt->CKTstate0 + inst->NUMOSdIsDVsb) = *(ckt->CKTstate1 + inst->NUMOSdIsDVsb); *(ckt->CKTstate0 + inst->NUMOSdIsDVgb) = *(ckt->CKTstate1 + inst->NUMOSdIsDVgb); *(ckt->CKTstate0 + inst->NUMOSdIgDVdb) = *(ckt->CKTstate1 + inst->NUMOSdIgDVdb); *(ckt->CKTstate0 + inst->NUMOSdIgDVsb) = *(ckt->CKTstate1 + inst->NUMOSdIgDVsb); *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) = *(ckt->CKTstate1 + inst->NUMOSdIgDVgb); if (!(ckt->CKTmode & MODEDCTRANCURVE)) { /* no linear prediction on device voltages */ vdb = *(ckt->CKTstate1 + inst->NUMOSvdb); vsb = *(ckt->CKTstate1 + inst->NUMOSvsb); vgb = *(ckt->CKTstate1 + inst->NUMOSvgb); TWOpredict(pDevice, model->NUMOSpInfo); } else { if (doVoltPred) { /* linear prediction */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; vdb = (1+xfact) * (*(ckt->CKTstate1 + inst->NUMOSvdb)) - (xfact) * (*(ckt->CKTstate2 + inst->NUMOSvdb)); vsb = (1+xfact) * (*(ckt->CKTstate1 + inst->NUMOSvsb)) - (xfact) * (*(ckt->CKTstate2 + inst->NUMOSvsb)); vgb = (1+xfact) * (*(ckt->CKTstate1 + inst->NUMOSvgb)) - (xfact) * (*(ckt->CKTstate2 + inst->NUMOSvgb)); } else { vdb = *(ckt->CKTstate1 + inst->NUMOSvdb); vsb = *(ckt->CKTstate1 + inst->NUMOSvsb); vgb = *(ckt->CKTstate1 + inst->NUMOSvgb); } } } else { /* * compute new nonlinear branch voltages */ vdb = *(ckt->CKTrhsOld + inst->NUMOSdrainNode) - *(ckt->CKTrhsOld + inst->NUMOSbulkNode); vsb = *(ckt->CKTrhsOld + inst->NUMOSsourceNode) - *(ckt->CKTrhsOld + inst->NUMOSbulkNode); vgb = *(ckt->CKTrhsOld + inst->NUMOSgateNode) - *(ckt->CKTrhsOld + inst->NUMOSbulkNode); } delVdb = vdb - *(ckt->CKTstate0 + inst->NUMOSvdb); delVsb = vsb - *(ckt->CKTstate0 + inst->NUMOSvsb); delVgb = vgb - *(ckt->CKTstate0 + inst->NUMOSvgb); idhat = *(ckt->CKTstate0 + inst->NUMOSid) + *(ckt->CKTstate0 + inst->NUMOSdIdDVdb) * delVdb + *(ckt->CKTstate0 + inst->NUMOSdIdDVsb) * delVsb + *(ckt->CKTstate0 + inst->NUMOSdIdDVgb) * delVgb; ishat = *(ckt->CKTstate0 + inst->NUMOSis) + *(ckt->CKTstate0 + inst->NUMOSdIsDVdb) * delVdb + *(ckt->CKTstate0 + inst->NUMOSdIsDVsb) * delVsb + *(ckt->CKTstate0 + inst->NUMOSdIsDVgb) * delVgb; ighat = *(ckt->CKTstate0 + inst->NUMOSig) + *(ckt->CKTstate0 + inst->NUMOSdIgDVdb) * delVdb + *(ckt->CKTstate0 + inst->NUMOSdIgDVsb) * delVsb + *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) * delVgb; #ifndef NOBYPASS /* * bypass if solution has not changed */ /* * the following collections of if's would be just one if the average * compiler could handle it, but many find the expression too * complicated, thus the split. */ if ((ckt->CKTbypass) && pDevice->converged && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delVdb) < (ckt->CKTreltol * MAX(fabs(vdb), fabs(*(ckt->CKTstate0 + inst->NUMOSvdb))) + ckt->CKTvoltTol))) if ((fabs(delVsb) < ckt->CKTreltol * MAX(fabs(vsb), fabs(*(ckt->CKTstate0 + inst->NUMOSvsb))) + ckt->CKTvoltTol)) if ((fabs(delVgb) < ckt->CKTreltol * MAX(fabs(vgb), fabs(*(ckt->CKTstate0 + inst->NUMOSvgb))) + ckt->CKTvoltTol)) if ((fabs(idhat - *(ckt->CKTstate0 + inst->NUMOSid)) < ckt->CKTreltol * MAX(fabs(idhat), fabs(*(ckt->CKTstate0 + inst->NUMOSid))) + ckt->CKTabstol)) if ((fabs(ishat - *(ckt->CKTstate0 + inst->NUMOSis)) < ckt->CKTreltol * MAX(fabs(ishat), fabs(*(ckt->CKTstate0 + inst->NUMOSis))) + ckt->CKTabstol)) if ((fabs(ighat - *(ckt->CKTstate0 + inst->NUMOSig)) < ckt->CKTreltol * MAX(fabs(ighat), fabs(*(ckt->CKTstate0 + inst->NUMOSig))) + ckt->CKTabstol)) { /* * bypassing.... */ vdb = *(ckt->CKTstate0 + inst->NUMOSvdb); vsb = *(ckt->CKTstate0 + inst->NUMOSvsb); vgb = *(ckt->CKTstate0 + inst->NUMOSvgb); id = *(ckt->CKTstate0 + inst->NUMOSid); is = *(ckt->CKTstate0 + inst->NUMOSis); ig = *(ckt->CKTstate0 + inst->NUMOSig); g.dIdDVdb = *(ckt->CKTstate0 + inst->NUMOSdIdDVdb); g.dIdDVsb = *(ckt->CKTstate0 + inst->NUMOSdIdDVsb); g.dIdDVgb = *(ckt->CKTstate0 + inst->NUMOSdIdDVgb); g.dIsDVdb = *(ckt->CKTstate0 + inst->NUMOSdIsDVdb); g.dIsDVsb = *(ckt->CKTstate0 + inst->NUMOSdIsDVsb); g.dIsDVgb = *(ckt->CKTstate0 + inst->NUMOSdIsDVgb); g.dIgDVdb = *(ckt->CKTstate0 + inst->NUMOSdIgDVdb); g.dIgDVsb = *(ckt->CKTstate0 + inst->NUMOSdIgDVsb); g.dIgDVgb = *(ckt->CKTstate0 + inst->NUMOSdIgDVgb); goto load; } #endif /* NOBYPASS */ /* * limit nonlinear branch voltages */ icheck1 = 1; if (deviceType == OPTN_BIPOLAR) { double vbe, vbe0; double vce, vce0; vdb = -inst->NUMOStype * limitJunctionVoltage(-inst->NUMOStype * vdb, -inst->NUMOStype * *(ckt->CKTstate0 + inst->NUMOSvdb), &icheck); vce = vdb - vsb; vce0 = *(ckt->CKTstate0 + inst->NUMOSvdb) - *(ckt->CKTstate0 + inst->NUMOSvsb); vce = inst->NUMOStype * limitVce(inst->NUMOStype * vce, inst->NUMOStype * vce0, &icheck1); if (icheck1 == 1) icheck = 1; vsb = vdb - vce; vbe = vgb - vsb; vbe0 = *(ckt->CKTstate0 + inst->NUMOSvgb) - *(ckt->CKTstate0 + inst->NUMOSvsb); vbe = inst->NUMOStype * limitVbe(inst->NUMOStype * vbe, inst->NUMOStype * vbe0, &icheck1); if (icheck1 == 1) icheck = 1; vgb = vbe + vsb; } else { vdb = -inst->NUMOStype * limitJunctionVoltage(-inst->NUMOStype * vdb, -inst->NUMOStype * *(ckt->CKTstate0 + inst->NUMOSvdb), &icheck); vsb = -inst->NUMOStype * limitJunctionVoltage(-inst->NUMOStype * vsb, -inst->NUMOStype * *(ckt->CKTstate0 + inst->NUMOSvsb), &icheck1); if (icheck1 == 1) icheck = 1; vgb = inst->NUMOStype * limitVgb(inst->NUMOStype * vgb, inst->NUMOStype * *(ckt->CKTstate0 + inst->NUMOSvgb), &icheck1); if (icheck1 == 1) icheck = 1; } delVdb = vdb - *(ckt->CKTstate0 + inst->NUMOSvdb); delVsb = vsb - *(ckt->CKTstate0 + inst->NUMOSvsb); delVgb = vgb - *(ckt->CKTstate0 + inst->NUMOSvgb); NUMOSsetBCs(pDevice, vdb - delVdb, vsb - delVsb, vgb - delVgb); } if (doInitSolve) { if (TWOdcDebug) { printVoltages(stdout, model->NUMOSmodName, inst->NUMOSname, deviceType, 3, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } startTime2 = SPfrontEnd->IFseconds(); TWOequilSolve(pDevice); totalTime2 = SPfrontEnd->IFseconds() - startTime2; pDevice->pStats->totalTime[STAT_SETUP] += totalTime2; pDevice->pStats->totalTime[STAT_DC] -= totalTime2; TWObiasSolve(pDevice, MaxIterations, FALSE, NULL); *(ckt->CKTstate0 + inst->NUMOSvdb) = 0.0; *(ckt->CKTstate0 + inst->NUMOSvsb) = 0.0; *(ckt->CKTstate0 + inst->NUMOSvgb) = 0.0; if (initStateName != NULL) { if (TWOreadState(pDevice, initStateName, 3, &vdb, &vgb, &vsb ) < 0) { fprintf(stderr, "NUMOSload: trouble reading state-file %s\n", initStateName); } else { NUMOSsetBCs(pDevice, vdb, vsb, vgb); delVdb = delVsb = delVgb = 0.0; } } } /* * determine dc current and derivatives using the numerical routines */ if (ckt->CKTmode & (MODEDCOP | MODETRANOP | MODEDCTRANCURVE | MODEINITSMSIG)) { numDevNonCon = 0; inst->NUMOSc11 = inst->NUMOSy11r = inst->NUMOSy11i = 0.0; inst->NUMOSc12 = inst->NUMOSy12r = inst->NUMOSy12i = 0.0; inst->NUMOSc13 = inst->NUMOSy13r = inst->NUMOSy13i = 0.0; inst->NUMOSc21 = inst->NUMOSy21r = inst->NUMOSy21i = 0.0; inst->NUMOSc22 = inst->NUMOSy22r = inst->NUMOSy22i = 0.0; inst->NUMOSc23 = inst->NUMOSy23r = inst->NUMOSy23i = 0.0; inst->NUMOSc31 = inst->NUMOSy31r = inst->NUMOSy31i = 0.0; inst->NUMOSc32 = inst->NUMOSy32r = inst->NUMOSy32i = 0.0; inst->NUMOSc33 = inst->NUMOSy33r = inst->NUMOSy33i = 0.0; inst->NUMOSsmSigAvail = FALSE; devNonCon: NUMOSproject(pDevice, delVdb, delVsb, delVgb); if (TWOdcDebug) { printVoltages(stdout, model->NUMOSmodName, inst->NUMOSname, deviceType, 3, vdb, delVdb, vgb, delVgb, vsb, delVsb); } TWObiasSolve(pDevice, MaxIterations, FALSE, model->NUMOSpInfo); devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ NUMOScurrent(pDevice, FALSE, NULL, &id, &is, &ig); NUMOSconductance(pDevice, FALSE, NULL, &g); /* * Add gmin to the gate conductance terms since they will be zero. * XXX This messes up the gXY output values, but we choose not to * correct this error, because it shouldn't cause practical problems. */ g.dIgDVdb += ckt->CKTgmin; g.dIgDVsb += ckt->CKTgmin; g.dIgDVgb += ckt->CKTgmin; } else { /* reduce the voltage step until converged */ /* restore boundary nodes to previous potential */ NUMOSsetBCs(pDevice, vdb - delVdb, vsb - delVsb, vgb - delVgb); TWOstoreInitialGuess(pDevice); TWOresetJacobian(pDevice); delVdb *= 0.5; delVsb *= 0.5; delVgb *= 0.5; vdb = delVdb + *(ckt->CKTstate0 + inst->NUMOSvdb); vsb = delVsb + *(ckt->CKTstate0 + inst->NUMOSvsb); vgb = delVgb + *(ckt->CKTstate0 + inst->NUMOSvgb); numDevNonCon++; icheck = 1; if (numDevNonCon > 10) { printVoltages(stderr, model->NUMOSmodName, inst->NUMOSname, deviceType, 3, vdb, delVdb, vgb, delVgb, vsb, delVsb); fprintf(stderr, "*** Non-convergence during load ***\n"); totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } else { goto devNonCon; } } } if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG)) { /* * store small-signal parameters */ if ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) { if (ckt->CKTmode & MODEINITSMSIG) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; startTime2 = SPfrontEnd->IFseconds(); NUMOSinitSmSig(inst); pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime2; continue; } else { inst->NUMOSsmSigAvail = FALSE; } /* * transient analysis */ if (ckt->CKTmode & MODEINITPRED) { NUMOSsetBCs(pDevice, vdb, vsb, vgb); TWOstoreInitialGuess(pDevice); } else { NUMOSupdate(pDevice, delVdb, delVsb, delVgb, TRUE); } if (TWOtranDebug) { printVoltages(stdout, model->NUMOSmodName, inst->NUMOSname, deviceType, 3, vdb, delVdb, vgb, delVgb, vsb, delVsb); } TWObiasSolve(pDevice, 0, TRUE, model->NUMOSpInfo); if (!finite(pDevice->rhsNorm)) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_TRAN] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } devConverged = TWOdeviceConverged(pDevice); pDevice->converged = devConverged; /* compute the currents and conductances */ NUMOScurrent(pDevice, TRUE, model->NUMOSpInfo->intCoeff, &id, &is, &ig); NUMOSconductance(pDevice, TRUE, model->NUMOSpInfo->intCoeff, &g); } } /* * check convergence */ if ((!(ckt->CKTmode & MODEINITFIX)) || (!(inst->NUMOSoff))) { if (icheck == 1 || !devConverged) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(idhat), fabs(id)) + ckt->CKTabstol; if (fabs(idhat - id) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(ishat), fabs(is)) + ckt->CKTabstol; if (fabs(ishat - is) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(ighat), fabs(ig)) + ckt->CKTabstol; if (fabs(ighat - ig) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } } } } } *(ckt->CKTstate0 + inst->NUMOSvdb) = vdb; *(ckt->CKTstate0 + inst->NUMOSvsb) = vsb; *(ckt->CKTstate0 + inst->NUMOSvgb) = vgb; *(ckt->CKTstate0 + inst->NUMOSid) = id; *(ckt->CKTstate0 + inst->NUMOSis) = is; *(ckt->CKTstate0 + inst->NUMOSig) = ig; *(ckt->CKTstate0 + inst->NUMOSdIdDVdb) = g.dIdDVdb; *(ckt->CKTstate0 + inst->NUMOSdIdDVsb) = g.dIdDVsb; *(ckt->CKTstate0 + inst->NUMOSdIdDVgb) = g.dIdDVgb; *(ckt->CKTstate0 + inst->NUMOSdIsDVdb) = g.dIsDVdb; *(ckt->CKTstate0 + inst->NUMOSdIsDVsb) = g.dIsDVsb; *(ckt->CKTstate0 + inst->NUMOSdIsDVgb) = g.dIsDVgb; *(ckt->CKTstate0 + inst->NUMOSdIgDVdb) = g.dIgDVdb; *(ckt->CKTstate0 + inst->NUMOSdIgDVsb) = g.dIgDVsb; *(ckt->CKTstate0 + inst->NUMOSdIgDVgb) = g.dIgDVgb; load: /* * load current excitation vector */ ideq = id - g.dIdDVdb * vdb - g.dIdDVsb * vsb - g.dIdDVgb * vgb; iseq = is - g.dIsDVdb * vdb - g.dIsDVsb * vsb - g.dIsDVgb * vgb; igeq = ig - g.dIgDVdb * vdb - g.dIgDVsb * vsb - g.dIgDVgb * vgb; *(ckt->CKTrhs + inst->NUMOSdrainNode) -= ideq; *(ckt->CKTrhs + inst->NUMOSsourceNode) -= iseq; *(ckt->CKTrhs + inst->NUMOSgateNode) -= igeq; *(ckt->CKTrhs + inst->NUMOSbulkNode) += ideq + iseq + igeq; /* * load y matrix */ *(inst->NUMOSdrainDrainPtr) += g.dIdDVdb; *(inst->NUMOSdrainSourcePtr) += g.dIdDVsb; *(inst->NUMOSdrainGatePtr) += g.dIdDVgb; *(inst->NUMOSdrainBulkPtr) -= g.dIdDVdb + g.dIdDVsb + g.dIdDVgb; *(inst->NUMOSsourceDrainPtr) += g.dIsDVdb; *(inst->NUMOSsourceSourcePtr) += g.dIsDVsb; *(inst->NUMOSsourceGatePtr) += g.dIsDVgb; *(inst->NUMOSsourceBulkPtr) -= g.dIsDVdb + g.dIsDVsb + g.dIsDVgb; *(inst->NUMOSgateDrainPtr) += g.dIgDVdb; *(inst->NUMOSgateSourcePtr) += g.dIgDVsb; *(inst->NUMOSgateGatePtr) += g.dIgDVgb; *(inst->NUMOSgateBulkPtr) -= g.dIgDVdb + g.dIgDVsb + g.dIgDVgb; *(inst->NUMOSbulkDrainPtr) -= g.dIdDVdb + g.dIsDVdb + g.dIgDVdb; *(inst->NUMOSbulkSourcePtr) -= g.dIdDVsb + g.dIsDVsb + g.dIgDVsb; *(inst->NUMOSbulkGatePtr) -= g.dIdDVgb + g.dIsDVgb + g.dIgDVgb; *(inst->NUMOSbulkBulkPtr) += g.dIdDVdb + g.dIdDVsb + g.dIdDVgb + g.dIsDVdb + g.dIsDVsb + g.dIsDVgb + g.dIgDVdb + g.dIgDVsb + g.dIgDVgb; totalTime += SPfrontEnd->IFseconds() - startTime; if (ckt->CKTmode & MODETRAN) { pDevice->pStats->totalTime[STAT_TRAN] += totalTime; } else { pDevice->pStats->totalTime[STAT_DC] += totalTime; } } } return (OK); } int NUMOSinitSmSig(NUMOSinstance *inst) { struct mosAdmittances yAc; double omega = inst->NUMOSmodPtr->NUMOSmethods->METHomega; AcAnalysisMethod = SOR_ONLY; (void) NUMOSadmittance(inst->NUMOSpDevice, omega, &yAc); inst->NUMOSc11 = yAc.yIdVdb.imag / omega; inst->NUMOSc12 = yAc.yIdVgb.imag / omega; inst->NUMOSc13 = yAc.yIdVsb.imag / omega; inst->NUMOSc21 = yAc.yIgVdb.imag / omega; inst->NUMOSc22 = yAc.yIgVgb.imag / omega; inst->NUMOSc23 = yAc.yIgVsb.imag / omega; inst->NUMOSc31 = yAc.yIsVdb.imag / omega; inst->NUMOSc32 = yAc.yIsVgb.imag / omega; inst->NUMOSc33 = yAc.yIsVsb.imag / omega; inst->NUMOSy11r = yAc.yIdVdb.real; inst->NUMOSy11i = yAc.yIdVdb.imag; inst->NUMOSy12r = yAc.yIdVgb.real; inst->NUMOSy12i = yAc.yIdVgb.imag; inst->NUMOSy13r = yAc.yIdVsb.real; inst->NUMOSy13i = yAc.yIdVsb.imag; inst->NUMOSy21r = yAc.yIgVdb.real; inst->NUMOSy21i = yAc.yIgVdb.imag; inst->NUMOSy22r = yAc.yIgVgb.real; inst->NUMOSy22i = yAc.yIgVgb.imag; inst->NUMOSy23r = yAc.yIgVsb.real; inst->NUMOSy23i = yAc.yIgVsb.imag; inst->NUMOSy31r = yAc.yIsVdb.real; inst->NUMOSy31i = yAc.yIsVdb.imag; inst->NUMOSy32r = yAc.yIsVgb.real; inst->NUMOSy32i = yAc.yIsVgb.imag; inst->NUMOSy33r = yAc.yIsVsb.real; inst->NUMOSy33i = yAc.yIsVsb.imag; inst->NUMOSsmSigAvail = TRUE; return (OK); } ngspice-26/src/spicelib/devices/numos/Makefile.in0000644000265600020320000004244712264261540021450 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/numos DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnumos_la_LIBADD = am_libnumos_la_OBJECTS = numm.lo nummacld.lo nummask.lo nummdel.lo \ nummdest.lo nummdump.lo numosinit.lo nummload.lo nummmdel.lo \ nummmpar.lo nummparm.lo nummpzld.lo nummset.lo nummtemp.lo \ nummtrun.lo libnumos_la_OBJECTS = $(am_libnumos_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnumos_la_SOURCES) DIST_SOURCES = $(libnumos_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnumos.la libnumos_la_SOURCES = \ numm.c \ nummacld.c \ nummask.c \ numosdef.h \ nummdel.c \ nummdest.c \ nummdump.c \ numosext.h \ numosinit.c \ numosinit.h \ numositf.h \ nummload.c \ nummmdel.c \ nummmpar.c \ nummparm.c \ nummpzld.c \ nummset.c \ nummtemp.c \ nummtrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/numos/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/numos/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnumos.la: $(libnumos_la_OBJECTS) $(libnumos_la_DEPENDENCIES) $(EXTRA_libnumos_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnumos_la_OBJECTS) $(libnumos_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummparm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nummtrun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/numosinit.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/numos/numosext.h0000644000265600020320000000202012264261473021422 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef NUMOSEXT_H #define NUMOSEXT_H extern int NUMOSacLoad(GENmodel *, CKTcircuit *); extern int NUMOSask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NUMOSdelete(GENmodel *, IFuid, GENinstance **); extern void NUMOSdestroy(GENmodel **); extern int NUMOSgetic(GENmodel *, CKTcircuit *); extern int NUMOSload(GENmodel *, CKTcircuit *); extern int NUMOSmDelete(GENmodel **, IFuid, GENmodel *); extern int NUMOSmParam(int, IFvalue *, GENmodel *); extern int NUMOSparam(int, IFvalue *, GENinstance *, IFvalue *); extern int NUMOSpzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NUMOSsetup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NUMOStemp(GENmodel *, CKTcircuit *); extern int NUMOStrunc(GENmodel *, CKTcircuit *, double *); extern void NUMOSdump(GENmodel *, CKTcircuit *); extern void NUMOSacct(GENmodel *, CKTcircuit *, FILE *); #endif /* NUMOSEXT_H */ ngspice-26/src/spicelib/devices/numos/nummparm.c0000644000265600020320000000245512264261473021403 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets instance parameters for NUMOSs in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMOSparam(int param, IFvalue *value, GENinstance *inInst, IFvalue *select) { register NUMOSinstance *inst = (NUMOSinstance *) inInst; NG_IGNORE(select); switch (param) { case NUMOS_AREA: inst->NUMOSarea = value->rValue; inst->NUMOSareaGiven = TRUE; break; case NUMOS_WIDTH: inst->NUMOSwidth = value->rValue; inst->NUMOSwidthGiven = TRUE; break; case NUMOS_LENGTH: inst->NUMOSlength = value->rValue; inst->NUMOSlengthGiven = TRUE; break; case NUMOS_OFF: inst->NUMOSoff = TRUE; break; case NUMOS_IC_FILE: inst->NUMOSicFile = value->sValue; inst->NUMOSicFileGiven = TRUE; break; case NUMOS_PRINT: inst->NUMOSprint = value->iValue; inst->NUMOSprintGiven = TRUE; break; case NUMOS_TEMP: inst->NUMOStemp = value->rValue + CONSTCtoK; inst->NUMOStempGiven = TRUE; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/numos/nummmdel.c0000644000265600020320000000174012264261473021361 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NUMOS model from the circuit and frees the storage * it was using. returns an error if the model has instances */ #include "ngspice/ngspice.h" #include "numosdef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NUMOSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { NUMOSmodel **model = (NUMOSmodel **) inModel; NUMOSmodel *modfast = (NUMOSmodel *) kill; NUMOSmodel **oldmod; oldmod = model; for (; *model; model = &((*model)->NUMOSnextModel)) { if ((*model)->NUMOSmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: if ((*model)->NUMOSinstances) return (E_NOTEMPTY); *oldmod = (*model)->NUMOSnextModel; /* cut deleted device out of list */ FREE(*model); return (OK); } ngspice-26/src/spicelib/devices/numos/numosinit.h0000644000265600020320000000040212264261473021567 0ustar andreasadmin#ifndef _NUMOSINIT_H #define _NUMOSINIT_H extern IFparm NUMOSpTable[ ]; extern IFparm NUMOSmPTable[ ]; extern char *NUMOSnames[ ]; extern int NUMOSpTSize; extern int NUMOSmPTSize; extern int NUMOSnSize; extern int NUMOSiSize; extern int NUMOSmSize; #endif ngspice-26/src/spicelib/devices/numos/nummset.c0000644000265600020320000002254712264261473021243 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "numosdef.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/meshext.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/ciderinp.h" #include "ngspice/suffix.h" #define TSCALLOC(var, size, type)\ if (size && (var = (type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NUMOSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the structure with those pointers needed later for fast matrix * loading */ { register NUMOSmodel *model = (NUMOSmodel *) inModel; register NUMOSinstance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; char *icFileName = NULL; size_t nameLen; int error, xIndex; int xMeshSize, yMeshSize; TWOdevice *pDevice; TWOcoord *xCoordList = NULL; TWOcoord *yCoordList = NULL; TWOdomain *domainList = NULL; TWOelectrode *electrodeList = NULL; TWOmaterial *pM, *pMaterial = NULL, *materialList = NULL; DOPprofile *profileList = NULL; DOPtable *dopTableList = NULL; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NUMOSnextModel) { if (!model->NUMOSpInfo) { TSCALLOC(model->NUMOSpInfo, 1, TWOtranInfo); } methods = model->NUMOSmethods; if (!methods) { TSCALLOC(methods, 1, METHcard); model->NUMOSmethods = methods; } models = model->NUMOSmodels; if (!models) { TSCALLOC(models, 1, MODLcard); model->NUMOSmodels = models; } options = model->NUMOSoptions; if (!options) { TSCALLOC(options, 1, OPTNcard); model->NUMOSoptions = options; } outputs = model->NUMOSoutputs; if (!outputs) { TSCALLOC(outputs, 1, OUTPcard); model->NUMOSoutputs = outputs; } if (!methods->METHvoltPredGiven) { methods->METHvoltPred = FALSE; } if (!methods->METHmobDerivGiven) { methods->METHmobDeriv = TRUE; } if (!methods->METHoneCarrierGiven) { methods->METHoneCarrier = FALSE; } if (!methods->METHacAnalysisMethodGiven) { methods->METHacAnalysisMethod = SOR; } if (!methods->METHdabstolGiven) { methods->METHdabstol = DABSTOL2D; } if (!methods->METHdreltolGiven) { methods->METHdreltol = ckt->CKTreltol; } if (!methods->METHitLimGiven) { methods->METHitLim = 50; } if (!methods->METHomegaGiven || methods->METHomega <= 0.0) { methods->METHomega = 2.0 * M_PI /* radians/sec */ ; } if (!options->OPTNdefaGiven || options->OPTNdefa <= 0.0) { options->OPTNdefa = 1.0e4 /* cm^2 */ ; } if (!options->OPTNdeflGiven || options->OPTNdefl <= 0.0) { options->OPTNdefl = 1.0e2 /* cm */ ; } if (!options->OPTNdefwGiven && options->OPTNdefaGiven) { options->OPTNdefw = options->OPTNdefa / options->OPTNdefl; } else if (!options->OPTNdefwGiven || options->OPTNdefw <= 0.0) { options->OPTNdefw = 1.0e2 /* cm */ ; } if (!options->OPTNdeviceTypeGiven) { options->OPTNdeviceType = OPTN_MOSFET; } if (!options->OPTNicFileGiven) { options->OPTNicFile = NULL; options->OPTNunique = FALSE; /* Can't form a unique name. */ } if (!options->OPTNuniqueGiven) { options->OPTNunique = FALSE; } OneCarrier = methods->METHoneCarrier; /* Set up the rest of the card lists */ if ((error = MODLsetup(model->NUMOSmodels)) != 0) return (error); BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; if ((error = OUTPsetup(model->NUMOSoutputs)) != 0) return (error); if ((error = MATLsetup(model->NUMOSmaterials, &materialList)) != 0) return (error); if ((error = MOBsetup(model->NUMOSmobility, materialList)) != 0) return (error); if ((error = MESHsetup('x', model->NUMOSxMeshes, &xCoordList, &xMeshSize)) != 0) return (error); if ((error = MESHsetup('y', model->NUMOSyMeshes, &yCoordList, &yMeshSize)) != 0) return (error); if ((error = DOMNsetup(model->NUMOSdomains, &domainList, xCoordList, yCoordList, materialList)) != 0) return (error); if ((error = BDRYsetup(model->NUMOSboundaries, xCoordList, yCoordList, domainList)) != 0) return (error); if ((error = ELCTsetup(model->NUMOSelectrodes, &electrodeList, xCoordList, yCoordList)) != 0) return (error); /* Make sure electrodes are OK. */ checkElectrodes(electrodeList, 4); /* NUMOS has 4 electrodes */ if ((error = CONTsetup(model->NUMOScontacts, electrodeList)) != 0) return (error); if ((error = DOPsetup(model->NUMOSdopings, &profileList, &dopTableList, xCoordList, yCoordList)) != 0) return (error); model->NUMOSmatlInfo = materialList; model->NUMOSprofiles = profileList; model->NUMOSdopTables = dopTableList; /* loop through all the instances of the model */ for (inst = model->NUMOSinstances; inst != NULL; inst = inst->NUMOSnextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NUMOSprintGiven) { inst->NUMOSprint = 0; } else if (inst->NUMOSprint <= 0) { inst->NUMOSprint = 1; } if (!inst->NUMOSicFileGiven) { if (options->OPTNunique) { nameLen = strlen(options->OPTNicFile) + strlen(inst->NUMOSname) + 1; TSCALLOC(icFileName, nameLen+1, char); sprintf(icFileName, "%s.%s", options->OPTNicFile, inst->NUMOSname); icFileName[nameLen] = '\0'; inst->NUMOSicFile = icFileName; } else if (options->OPTNicFile != NULL) { nameLen = strlen(options->OPTNicFile); TSCALLOC(icFileName, nameLen+1, char); icFileName = strcpy(icFileName, options->OPTNicFile); inst->NUMOSicFile = icFileName; } else { inst->NUMOSicFile = NULL; } } inst->NUMOSstate = *states; *states += NUMOSnumStates; if (!inst->NUMOSpDevice) { /* Assign the mesh info to each instance. */ TSCALLOC(pDevice, 1, TWOdevice); TSCALLOC(pDevice->pStats, 1, TWOstats); pDevice->name = inst->NUMOSname; pDevice->solverType = SLV_NONE; pDevice->numXNodes = xMeshSize; pDevice->numYNodes = yMeshSize; pDevice->xScale = MESHmkArray(xCoordList, xMeshSize); pDevice->yScale = MESHmkArray(yCoordList, yMeshSize); pDevice->abstol = methods->METHdabstol; pDevice->reltol = methods->METHdreltol; TSCALLOC(pDevice->elemArray, pDevice->numXNodes, TWOelem **); for (xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) { TSCALLOC(pDevice->elemArray[xIndex], pDevice->numYNodes, TWOelem *); } /* Create a copy of material data that can change with temperature. */ pDevice->pMaterials = NULL; for (pM = materialList; pM != NULL; pM = pM->next) { if (pDevice->pMaterials == NULL) { TSCALLOC(pMaterial, 1, TWOmaterial); pDevice->pMaterials = pMaterial; } else { TSCALLOC(pMaterial->next, 1, TWOmaterial); pMaterial = pMaterial->next; } /* Copy everything, then fix the incorrect pointer. */ bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = NULL; } /* Generate the mesh structure for the device. */ TWObuildMesh(pDevice, domainList, electrodeList, pDevice->pMaterials); /* Store the device info in the instance. */ inst->NUMOSpDevice = pDevice; } /* Now update the state pointers. */ TWOgetStatePointers(inst->NUMOSpDevice, states); /* Wipe out statistics from previous runs (if any). */ bzero(inst->NUMOSpDevice->pStats, sizeof(TWOstats)); inst->NUMOSpDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(NUMOSdrainDrainPtr, NUMOSdrainNode, NUMOSdrainNode); TSTALLOC(NUMOSdrainSourcePtr, NUMOSdrainNode, NUMOSsourceNode); TSTALLOC(NUMOSdrainGatePtr, NUMOSdrainNode, NUMOSgateNode); TSTALLOC(NUMOSdrainBulkPtr, NUMOSdrainNode, NUMOSbulkNode); TSTALLOC(NUMOSsourceDrainPtr, NUMOSsourceNode, NUMOSdrainNode); TSTALLOC(NUMOSsourceSourcePtr, NUMOSsourceNode, NUMOSsourceNode); TSTALLOC(NUMOSsourceGatePtr, NUMOSsourceNode, NUMOSgateNode); TSTALLOC(NUMOSsourceBulkPtr, NUMOSsourceNode, NUMOSbulkNode); TSTALLOC(NUMOSgateDrainPtr, NUMOSgateNode, NUMOSdrainNode); TSTALLOC(NUMOSgateSourcePtr, NUMOSgateNode, NUMOSsourceNode); TSTALLOC(NUMOSgateGatePtr, NUMOSgateNode, NUMOSgateNode); TSTALLOC(NUMOSgateBulkPtr, NUMOSgateNode, NUMOSbulkNode); TSTALLOC(NUMOSbulkDrainPtr, NUMOSbulkNode, NUMOSdrainNode); TSTALLOC(NUMOSbulkSourcePtr, NUMOSbulkNode, NUMOSsourceNode); TSTALLOC(NUMOSbulkGatePtr, NUMOSbulkNode, NUMOSgateNode); TSTALLOC(NUMOSbulkBulkPtr, NUMOSbulkNode, NUMOSbulkNode); } /* Clean up lists */ killCoordInfo(xCoordList); killCoordInfo(yCoordList); killDomainInfo(domainList); killElectrodeInfo(electrodeList); } return (OK); } ngspice-26/src/spicelib/devices/numos/nummdest.c0000644000265600020320000000163412264261473021401 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes all NUMOSs from the circuit and frees all storage * they were using. The current implementation has memory leaks. */ #include "ngspice/ngspice.h" #include "numosdef.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/suffix.h" void NUMOSdestroy(GENmodel **inModel) { NUMOSmodel **model = (NUMOSmodel **) inModel; NUMOSmodel *mod, *nextMod; NUMOSinstance *inst, *nextInst; for (mod = *model; mod;) { for (inst = mod->NUMOSinstances; inst;) { TWOdestroy(inst->NUMOSpDevice); nextInst = inst->NUMOSnextInstance; FREE(inst); inst = nextInst; } nextMod = mod->NUMOSnextModel; FREE(mod); mod = nextMod; } *model = NULL; } ngspice-26/src/spicelib/devices/numos/numositf.h0000644000265600020320000000027312264261473021414 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NUMOS #define DEV_NUMOS extern SPICEdev *get_numos_info(void); #endif ngspice-26/src/spicelib/devices/bsim4/0000755000265600020320000000000012264261706017251 5ustar andreasadminngspice-26/src/spicelib/devices/bsim4/bsim4itf.h0000644000265600020320000000036712264261473021152 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Author: 2001- Xuemei Xi File: bsim4itf.h **********/ #ifndef DEV_BSIM4 #define DEV_BSIM4 SPICEdev *get_bsim4_info(void); #endif ngspice-26/src/spicelib/devices/bsim4/b4dest.c0000644000265600020320000000340612264261473020606 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4dest.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" #include "ngspice/suffix.h" void BSIM4destroy( GENmodel **inModel) { BSIM4model **model = (BSIM4model**)inModel; BSIM4instance *here; BSIM4instance *prev = NULL; BSIM4model *mod = *model; BSIM4model *oldmod = NULL; for (; mod ; mod = mod->BSIM4nextModel) { /** added to get rid of link list pSizeDependParamKnot **/ struct bsim4SizeDependParam *pParam, *pParamOld=NULL; pParam = mod->pSizeDependParamKnot; for (; pParam ; pParam = pParam->pNext) { FREE(pParamOld); pParamOld = pParam; } FREE(pParamOld); pParam = NULL; /** end of extra code **/ if(oldmod) { FREE(oldmod->BSIM4version); FREE(oldmod); } oldmod = mod; prev = (BSIM4instance *)NULL; for (here = mod->BSIM4instances; here; here = here->BSIM4nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) { #ifdef USE_OMP /* free just once for all models */ FREE(oldmod->BSIM4InstanceArray); #endif /* oldmod->BSIM4modName to be freed in INPtabEnd() */ FREE(oldmod->BSIM4version); FREE(oldmod); } *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim4/b4par.c0000644000265600020320000001455612264261473020441 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4par.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM4param( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM4instance *here = (BSIM4instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM4_W: here->BSIM4w = value->rValue * scale; here->BSIM4wGiven = TRUE; break; case BSIM4_L: here->BSIM4l = value->rValue * scale; here->BSIM4lGiven = TRUE; break; case BSIM4_M: here->BSIM4m = value->rValue; here->BSIM4mGiven = TRUE; break; case BSIM4_NF: here->BSIM4nf = value->rValue; here->BSIM4nfGiven = TRUE; break; case BSIM4_MIN: here->BSIM4min = value->iValue; here->BSIM4minGiven = TRUE; break; case BSIM4_AS: here->BSIM4sourceArea = value->rValue * scale * scale; here->BSIM4sourceAreaGiven = TRUE; break; case BSIM4_AD: here->BSIM4drainArea = value->rValue * scale * scale; here->BSIM4drainAreaGiven = TRUE; break; case BSIM4_PS: here->BSIM4sourcePerimeter = value->rValue * scale; here->BSIM4sourcePerimeterGiven = TRUE; break; case BSIM4_PD: here->BSIM4drainPerimeter = value->rValue * scale; here->BSIM4drainPerimeterGiven = TRUE; break; case BSIM4_NRS: here->BSIM4sourceSquares = value->rValue; here->BSIM4sourceSquaresGiven = TRUE; break; case BSIM4_NRD: here->BSIM4drainSquares = value->rValue; here->BSIM4drainSquaresGiven = TRUE; break; case BSIM4_OFF: here->BSIM4off = value->iValue; break; case BSIM4_SA: here->BSIM4sa = value->rValue; here->BSIM4saGiven = TRUE; break; case BSIM4_SB: here->BSIM4sb = value->rValue; here->BSIM4sbGiven = TRUE; break; case BSIM4_SD: here->BSIM4sd = value->rValue; here->BSIM4sdGiven = TRUE; break; case BSIM4_SCA: here->BSIM4sca = value->rValue; here->BSIM4scaGiven = TRUE; break; case BSIM4_SCB: here->BSIM4scb = value->rValue; here->BSIM4scbGiven = TRUE; break; case BSIM4_SCC: here->BSIM4scc = value->rValue; here->BSIM4sccGiven = TRUE; break; case BSIM4_SC: here->BSIM4sc = value->rValue; here->BSIM4scGiven = TRUE; break; case BSIM4_RBSB: here->BSIM4rbsb = value->rValue; here->BSIM4rbsbGiven = TRUE; break; case BSIM4_RBDB: here->BSIM4rbdb = value->rValue; here->BSIM4rbdbGiven = TRUE; break; case BSIM4_RBPB: here->BSIM4rbpb = value->rValue; here->BSIM4rbpbGiven = TRUE; break; case BSIM4_RBPS: here->BSIM4rbps = value->rValue; here->BSIM4rbpsGiven = TRUE; break; case BSIM4_RBPD: here->BSIM4rbpd = value->rValue; here->BSIM4rbpdGiven = TRUE; break; case BSIM4_DELVTO: here->BSIM4delvto = value->rValue; here->BSIM4delvtoGiven = TRUE; break; case BSIM4_XGW: here->BSIM4xgw = value->rValue; here->BSIM4xgwGiven = TRUE; break; case BSIM4_NGCON: here->BSIM4ngcon = value->rValue; here->BSIM4ngconGiven = TRUE; break; case BSIM4_TRNQSMOD: here->BSIM4trnqsMod = value->iValue; here->BSIM4trnqsModGiven = TRUE; break; case BSIM4_ACNQSMOD: here->BSIM4acnqsMod = value->iValue; here->BSIM4acnqsModGiven = TRUE; break; case BSIM4_RBODYMOD: here->BSIM4rbodyMod = value->iValue; here->BSIM4rbodyModGiven = TRUE; break; case BSIM4_RGATEMOD: here->BSIM4rgateMod = value->iValue; here->BSIM4rgateModGiven = TRUE; break; case BSIM4_GEOMOD: here->BSIM4geoMod = value->iValue; here->BSIM4geoModGiven = TRUE; break; case BSIM4_RGEOMOD: here->BSIM4rgeoMod = value->iValue; here->BSIM4rgeoModGiven = TRUE; break; case BSIM4_IC_VDS: here->BSIM4icVDS = value->rValue; here->BSIM4icVDSGiven = TRUE; break; case BSIM4_IC_VGS: here->BSIM4icVGS = value->rValue; here->BSIM4icVGSGiven = TRUE; break; case BSIM4_IC_VBS: here->BSIM4icVBS = value->rValue; here->BSIM4icVBSGiven = TRUE; break; case BSIM4_IC: switch(value->v.numValue) { case 3: here->BSIM4icVBS = *(value->v.vec.rVec+2); here->BSIM4icVBSGiven = TRUE; case 2: here->BSIM4icVGS = *(value->v.vec.rVec+1); here->BSIM4icVGSGiven = TRUE; case 1: here->BSIM4icVDS = *(value->v.vec.rVec); here->BSIM4icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4del.c0000644000265600020320000000230512264261473020410 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4del.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM4delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM4instance **fast = (BSIM4instance**)inInst; BSIM4model *model = (BSIM4model*)inModel; BSIM4instance **prev = NULL; BSIM4instance *here; for (; model ; model = model->BSIM4nextModel) { prev = &(model->BSIM4instances); for (here = *prev; here ; here = *prev) { if (here->BSIM4name == name || (fast && here==*fast)) { *prev= here->BSIM4nextInstance; FREE(here); return(OK); } prev = &(here->BSIM4nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim4/bsim4def.h0000644000265600020320000035117012264261473021127 0ustar andreasadmin/**** BSIM4.6.2 Released by Wenwei Yang 07/31/2008 ****/ /********** Copyright 2006 Regents of the University of California. All rights reserved. File: bsim4def.h Author: 2000 Weidong Liu. Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu Modified by Xuemei Xi, 11/15/2002. Modified by Xuemei Xi, 05/09/2003. Modified by Xuemei Xi, 03/04/2004. Modified by Xuemei Xi, Mohan Dunga, 09/24/2004. Modified by Xuemei Xi, 07/29/2005. Modified by Mohan Dunga, 12/13/2006 Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #ifndef BSIM4 #define BSIM4 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM4instance { struct sBSIM4model *BSIM4modPtr; struct sBSIM4instance *BSIM4nextInstance; IFuid BSIM4name; int BSIM4states; /* index into state table for this device */ int BSIM4dNode; int BSIM4gNodeExt; int BSIM4sNode; int BSIM4bNode; int BSIM4dNodePrime; int BSIM4gNodePrime; int BSIM4gNodeMid; int BSIM4sNodePrime; int BSIM4bNodePrime; int BSIM4dbNode; int BSIM4sbNode; int BSIM4qNode; double BSIM4ueff; double BSIM4thetavth; double BSIM4von; double BSIM4vdsat; double BSIM4cgdo; double BSIM4qgdo; double BSIM4cgso; double BSIM4qgso; double BSIM4grbsb; double BSIM4grbdb; double BSIM4grbpb; double BSIM4grbps; double BSIM4grbpd; double BSIM4vjsmFwd; double BSIM4vjsmRev; double BSIM4vjdmFwd; double BSIM4vjdmRev; double BSIM4XExpBVS; double BSIM4XExpBVD; double BSIM4SslpFwd; double BSIM4SslpRev; double BSIM4DslpFwd; double BSIM4DslpRev; double BSIM4IVjsmFwd; double BSIM4IVjsmRev; double BSIM4IVjdmFwd; double BSIM4IVjdmRev; double BSIM4grgeltd; double BSIM4Pseff; double BSIM4Pdeff; double BSIM4Aseff; double BSIM4Adeff; double BSIM4l; double BSIM4w; double BSIM4drainArea; double BSIM4sourceArea; double BSIM4drainSquares; double BSIM4sourceSquares; double BSIM4drainPerimeter; double BSIM4sourcePerimeter; double BSIM4sourceConductance; double BSIM4drainConductance; /* stress effect instance param */ double BSIM4sa; double BSIM4sb; double BSIM4sd; double BSIM4sca; double BSIM4scb; double BSIM4scc; double BSIM4sc; double BSIM4rbdb; double BSIM4rbsb; double BSIM4rbpb; double BSIM4rbps; double BSIM4rbpd; double BSIM4delvto; double BSIM4xgw; double BSIM4ngcon; /* added here to account stress effect instance dependence */ double BSIM4u0temp; double BSIM4vsattemp; double BSIM4vth0; double BSIM4vfb; double BSIM4vfbzb; double BSIM4vtfbphi1; double BSIM4vtfbphi2; double BSIM4k2; double BSIM4vbsc; double BSIM4k2ox; double BSIM4eta0; double BSIM4icVDS; double BSIM4icVGS; double BSIM4icVBS; double BSIM4m; double BSIM4nf; int BSIM4off; int BSIM4mode; int BSIM4trnqsMod; int BSIM4acnqsMod; int BSIM4rbodyMod; int BSIM4rgateMod; int BSIM4geoMod; int BSIM4rgeoMod; int BSIM4min; /* OP point */ double BSIM4Vgsteff; double BSIM4vgs_eff; double BSIM4vgd_eff; double BSIM4dvgs_eff_dvg; double BSIM4dvgd_eff_dvg; double BSIM4Vdseff; double BSIM4nstar; double BSIM4Abulk; double BSIM4EsatL; double BSIM4AbovVgst2Vtm; double BSIM4qinv; double BSIM4cd; double BSIM4cbs; double BSIM4cbd; double BSIM4csub; double BSIM4Igidl; double BSIM4Igisl; double BSIM4gm; double BSIM4gds; double BSIM4gmbs; double BSIM4gbd; double BSIM4gbs; double BSIM4noiGd0; /* tnoiMod=2 (v4.7) */ double BSIM4Coxeff; double BSIM4gbbs; double BSIM4gbgs; double BSIM4gbds; double BSIM4ggidld; double BSIM4ggidlg; double BSIM4ggidls; double BSIM4ggidlb; double BSIM4ggisld; double BSIM4ggislg; double BSIM4ggisls; double BSIM4ggislb; double BSIM4Igcs; double BSIM4gIgcsg; double BSIM4gIgcsd; double BSIM4gIgcss; double BSIM4gIgcsb; double BSIM4Igcd; double BSIM4gIgcdg; double BSIM4gIgcdd; double BSIM4gIgcds; double BSIM4gIgcdb; double BSIM4Igs; double BSIM4gIgsg; double BSIM4gIgss; double BSIM4Igd; double BSIM4gIgdg; double BSIM4gIgdd; double BSIM4Igb; double BSIM4gIgbg; double BSIM4gIgbd; double BSIM4gIgbs; double BSIM4gIgbb; double BSIM4grdsw; double BSIM4IdovVds; double BSIM4gcrg; double BSIM4gcrgd; double BSIM4gcrgg; double BSIM4gcrgs; double BSIM4gcrgb; double BSIM4gstot; double BSIM4gstotd; double BSIM4gstotg; double BSIM4gstots; double BSIM4gstotb; double BSIM4gdtot; double BSIM4gdtotd; double BSIM4gdtotg; double BSIM4gdtots; double BSIM4gdtotb; double BSIM4cggb; double BSIM4cgdb; double BSIM4cgsb; double BSIM4cbgb; double BSIM4cbdb; double BSIM4cbsb; double BSIM4cdgb; double BSIM4cddb; double BSIM4cdsb; double BSIM4csgb; double BSIM4csdb; double BSIM4cssb; double BSIM4cgbb; double BSIM4cdbb; double BSIM4csbb; double BSIM4cbbb; double BSIM4capbd; double BSIM4capbs; double BSIM4cqgb; double BSIM4cqdb; double BSIM4cqsb; double BSIM4cqbb; double BSIM4qgate; double BSIM4qbulk; double BSIM4qdrn; double BSIM4qsrc; double BSIM4qdef; double BSIM4qchqs; double BSIM4taunet; double BSIM4gtau; double BSIM4gtg; double BSIM4gtd; double BSIM4gts; double BSIM4gtb; double BSIM4SjctTempRevSatCur; double BSIM4DjctTempRevSatCur; double BSIM4SswTempRevSatCur; double BSIM4DswTempRevSatCur; double BSIM4SswgTempRevSatCur; double BSIM4DswgTempRevSatCur; struct bsim4SizeDependParam *pParam; unsigned BSIM4lGiven :1; unsigned BSIM4wGiven :1; unsigned BSIM4mGiven :1; unsigned BSIM4nfGiven :1; unsigned BSIM4minGiven :1; unsigned BSIM4drainAreaGiven :1; unsigned BSIM4sourceAreaGiven :1; unsigned BSIM4drainSquaresGiven :1; unsigned BSIM4sourceSquaresGiven :1; unsigned BSIM4drainPerimeterGiven :1; unsigned BSIM4sourcePerimeterGiven :1; unsigned BSIM4saGiven :1; unsigned BSIM4sbGiven :1; unsigned BSIM4sdGiven :1; unsigned BSIM4scaGiven :1; unsigned BSIM4scbGiven :1; unsigned BSIM4sccGiven :1; unsigned BSIM4scGiven :1; unsigned BSIM4rbdbGiven :1; unsigned BSIM4rbsbGiven :1; unsigned BSIM4rbpbGiven :1; unsigned BSIM4rbpdGiven :1; unsigned BSIM4rbpsGiven :1; unsigned BSIM4delvtoGiven :1; unsigned BSIM4xgwGiven :1; unsigned BSIM4ngconGiven :1; unsigned BSIM4icVDSGiven :1; unsigned BSIM4icVGSGiven :1; unsigned BSIM4icVBSGiven :1; unsigned BSIM4trnqsModGiven :1; unsigned BSIM4acnqsModGiven :1; unsigned BSIM4rbodyModGiven :1; unsigned BSIM4rgateModGiven :1; unsigned BSIM4geoModGiven :1; unsigned BSIM4rgeoModGiven :1; double *BSIM4DPdPtr; double *BSIM4DPdpPtr; double *BSIM4DPgpPtr; double *BSIM4DPgmPtr; double *BSIM4DPspPtr; double *BSIM4DPbpPtr; double *BSIM4DPdbPtr; double *BSIM4DdPtr; double *BSIM4DdpPtr; double *BSIM4GPdpPtr; double *BSIM4GPgpPtr; double *BSIM4GPgmPtr; double *BSIM4GPgePtr; double *BSIM4GPspPtr; double *BSIM4GPbpPtr; double *BSIM4GMdpPtr; double *BSIM4GMgpPtr; double *BSIM4GMgmPtr; double *BSIM4GMgePtr; double *BSIM4GMspPtr; double *BSIM4GMbpPtr; double *BSIM4GEdpPtr; double *BSIM4GEgpPtr; double *BSIM4GEgmPtr; double *BSIM4GEgePtr; double *BSIM4GEspPtr; double *BSIM4GEbpPtr; double *BSIM4SPdpPtr; double *BSIM4SPgpPtr; double *BSIM4SPgmPtr; double *BSIM4SPsPtr; double *BSIM4SPspPtr; double *BSIM4SPbpPtr; double *BSIM4SPsbPtr; double *BSIM4SspPtr; double *BSIM4SsPtr; double *BSIM4BPdpPtr; double *BSIM4BPgpPtr; double *BSIM4BPgmPtr; double *BSIM4BPspPtr; double *BSIM4BPdbPtr; double *BSIM4BPbPtr; double *BSIM4BPsbPtr; double *BSIM4BPbpPtr; double *BSIM4DBdpPtr; double *BSIM4DBdbPtr; double *BSIM4DBbpPtr; double *BSIM4DBbPtr; double *BSIM4SBspPtr; double *BSIM4SBbpPtr; double *BSIM4SBbPtr; double *BSIM4SBsbPtr; double *BSIM4BdbPtr; double *BSIM4BbpPtr; double *BSIM4BsbPtr; double *BSIM4BbPtr; double *BSIM4DgpPtr; double *BSIM4DspPtr; double *BSIM4DbpPtr; double *BSIM4SdpPtr; double *BSIM4SgpPtr; double *BSIM4SbpPtr; double *BSIM4QdpPtr; double *BSIM4QgpPtr; double *BSIM4QspPtr; double *BSIM4QbpPtr; double *BSIM4QqPtr; double *BSIM4DPqPtr; double *BSIM4GPqPtr; double *BSIM4SPqPtr; #ifdef USE_OMP /* per instance storage of results, to update matrix at a later stge */ double BSIM4rhsdPrime; double BSIM4rhsgPrime; double BSIM4rhsgExt; double BSIM4grhsMid; double BSIM4rhsbPrime; double BSIM4rhssPrime; double BSIM4rhsdb; double BSIM4rhssb; double BSIM4rhsd; double BSIM4rhss; double BSIM4rhsq; double BSIM4_1; double BSIM4_2; double BSIM4_3; double BSIM4_4; double BSIM4_5; double BSIM4_6; double BSIM4_7; double BSIM4_8; double BSIM4_9; double BSIM4_10; double BSIM4_11; double BSIM4_12; double BSIM4_13; double BSIM4_14; double BSIM4_15; double BSIM4_16; double BSIM4_17; double BSIM4_18; double BSIM4_19; double BSIM4_20; double BSIM4_21; double BSIM4_22; double BSIM4_23; double BSIM4_24; double BSIM4_25; double BSIM4_26; double BSIM4_27; double BSIM4_28; double BSIM4_29; double BSIM4_30; double BSIM4_31; double BSIM4_32; double BSIM4_33; double BSIM4_34; double BSIM4_35; double BSIM4_36; double BSIM4_37; double BSIM4_38; double BSIM4_39; double BSIM4_40; double BSIM4_41; double BSIM4_42; double BSIM4_43; double BSIM4_44; double BSIM4_45; double BSIM4_46; double BSIM4_47; double BSIM4_48; double BSIM4_49; double BSIM4_50; double BSIM4_51; double BSIM4_52; double BSIM4_53; double BSIM4_54; double BSIM4_55; double BSIM4_56; double BSIM4_57; double BSIM4_58; double BSIM4_59; double BSIM4_60; double BSIM4_61; double BSIM4_62; double BSIM4_63; double BSIM4_64; double BSIM4_65; double BSIM4_66; double BSIM4_67; double BSIM4_68; double BSIM4_69; double BSIM4_70; double BSIM4_71; double BSIM4_72; double BSIM4_73; double BSIM4_74; double BSIM4_75; double BSIM4_76; double BSIM4_77; double BSIM4_78; double BSIM4_79; double BSIM4_80; double BSIM4_81; double BSIM4_82; double BSIM4_83; double BSIM4_84; double BSIM4_85; double BSIM4_86; double BSIM4_87; double BSIM4_88; double BSIM4_89; double BSIM4_90; double BSIM4_91; double BSIM4_92; double BSIM4_93; double BSIM4_94; double BSIM4_95; double BSIM4_96; double BSIM4_97; double BSIM4_98; double BSIM4_99; double BSIM4_100; double BSIM4_101; double BSIM4_102; double BSIM4_103; #endif #define BSIM4vbd BSIM4states+ 0 #define BSIM4vbs BSIM4states+ 1 #define BSIM4vgs BSIM4states+ 2 #define BSIM4vds BSIM4states+ 3 #define BSIM4vdbs BSIM4states+ 4 #define BSIM4vdbd BSIM4states+ 5 #define BSIM4vsbs BSIM4states+ 6 #define BSIM4vges BSIM4states+ 7 #define BSIM4vgms BSIM4states+ 8 #define BSIM4vses BSIM4states+ 9 #define BSIM4vdes BSIM4states+ 10 #define BSIM4qb BSIM4states+ 11 #define BSIM4cqb BSIM4states+ 12 #define BSIM4qg BSIM4states+ 13 #define BSIM4cqg BSIM4states+ 14 #define BSIM4qd BSIM4states+ 15 #define BSIM4cqd BSIM4states+ 16 #define BSIM4qgmid BSIM4states+ 17 #define BSIM4cqgmid BSIM4states+ 18 #define BSIM4qbs BSIM4states+ 19 #define BSIM4cqbs BSIM4states+ 20 #define BSIM4qbd BSIM4states+ 21 #define BSIM4cqbd BSIM4states+ 22 #define BSIM4qcheq BSIM4states+ 23 #define BSIM4cqcheq BSIM4states+ 24 #define BSIM4qcdump BSIM4states+ 25 #define BSIM4cqcdump BSIM4states+ 26 #define BSIM4qdef BSIM4states+ 27 #define BSIM4qs BSIM4states+ 28 #define BSIM4numStates 29 /* indices to the array of BSIM4 NOISE SOURCES */ #define BSIM4RDNOIZ 0 #define BSIM4RSNOIZ 1 #define BSIM4RGNOIZ 2 #define BSIM4RBPSNOIZ 3 #define BSIM4RBPDNOIZ 4 #define BSIM4RBPBNOIZ 5 #define BSIM4RBSBNOIZ 6 #define BSIM4RBDBNOIZ 7 #define BSIM4IDNOIZ 8 #define BSIM4FLNOIZ 9 #define BSIM4IGSNOIZ 10 #define BSIM4IGDNOIZ 11 #define BSIM4IGBNOIZ 12 #define BSIM4CORLNOIZ 13 #define BSIM4TOTNOIZ 14 #define BSIM4NSRCS 15 /* Number of BSIM4 noise sources */ #ifndef NONOISE double BSIM4nVar[NSTATVARS][BSIM4NSRCS]; #else /* NONOISE */ double **BSIM4nVar; #endif /* NONOISE */ } BSIM4instance ; struct bsim4SizeDependParam { double Width; double Length; double NFinger; double BSIM4cdsc; double BSIM4cdscb; double BSIM4cdscd; double BSIM4cit; double BSIM4nfactor; double BSIM4xj; double BSIM4vsat; double BSIM4at; double BSIM4a0; double BSIM4ags; double BSIM4a1; double BSIM4a2; double BSIM4keta; double BSIM4nsub; double BSIM4ndep; double BSIM4nsd; double BSIM4phin; double BSIM4ngate; double BSIM4gamma1; double BSIM4gamma2; double BSIM4vbx; double BSIM4vbi; double BSIM4vbm; double BSIM4xt; double BSIM4phi; double BSIM4litl; double BSIM4k1; double BSIM4kt1; double BSIM4kt1l; double BSIM4kt2; double BSIM4k2; double BSIM4k3; double BSIM4k3b; double BSIM4w0; double BSIM4dvtp0; double BSIM4dvtp1; double BSIM4dvtp2; /* New DIBL/Rout */ double BSIM4dvtp3; double BSIM4dvtp4; double BSIM4dvtp5; double BSIM4lpe0; double BSIM4lpeb; double BSIM4dvt0; double BSIM4dvt1; double BSIM4dvt2; double BSIM4dvt0w; double BSIM4dvt1w; double BSIM4dvt2w; double BSIM4drout; double BSIM4dsub; double BSIM4vth0; double BSIM4ua; double BSIM4ua1; double BSIM4ub; double BSIM4ub1; double BSIM4uc; double BSIM4uc1; double BSIM4ud; double BSIM4ud1; double BSIM4up; double BSIM4lp; double BSIM4u0; double BSIM4eu; double BSIM4ucs; double BSIM4ute; double BSIM4ucste; double BSIM4voff; double BSIM4tvoff; double BSIM4tnfactor; /* v4.7 Temp dep of leakage current */ double BSIM4teta0; /* v4.7 temp dep of leakage current */ double BSIM4tvoffcv; /* v4.7 temp dep of leakage current */ double BSIM4minv; double BSIM4minvcv; double BSIM4vfb; double BSIM4delta; double BSIM4rdsw; double BSIM4rds0; double BSIM4rs0; double BSIM4rd0; double BSIM4rsw; double BSIM4rdw; double BSIM4prwg; double BSIM4prwb; double BSIM4prt; double BSIM4eta0; double BSIM4etab; double BSIM4pclm; double BSIM4pdibl1; double BSIM4pdibl2; double BSIM4pdiblb; double BSIM4fprout; double BSIM4pdits; double BSIM4pditsd; double BSIM4pscbe1; double BSIM4pscbe2; double BSIM4pvag; double BSIM4wr; double BSIM4dwg; double BSIM4dwb; double BSIM4b0; double BSIM4b1; double BSIM4alpha0; double BSIM4alpha1; double BSIM4beta0; double BSIM4agidl; double BSIM4bgidl; double BSIM4cgidl; double BSIM4egidl; double BSIM4fgidl; /* v4.7 New GIDL/GISL */ double BSIM4kgidl; /* v4.7 New GIDL/GISL */ double BSIM4rgidl; /* v4.7 New GIDL/GISL */ double BSIM4agisl; double BSIM4bgisl; double BSIM4cgisl; double BSIM4egisl; double BSIM4fgisl; /* v4.7 New GIDL/GISL */ double BSIM4kgisl; /* v4.7 New GIDL/GISL */ double BSIM4rgisl; /* v4.7 New GIDL/GISL */ double BSIM4aigc; double BSIM4bigc; double BSIM4cigc; double BSIM4aigs; double BSIM4bigs; double BSIM4cigs; double BSIM4aigd; double BSIM4bigd; double BSIM4cigd; double BSIM4aigbacc; double BSIM4bigbacc; double BSIM4cigbacc; double BSIM4aigbinv; double BSIM4bigbinv; double BSIM4cigbinv; double BSIM4nigc; double BSIM4nigbacc; double BSIM4nigbinv; double BSIM4ntox; double BSIM4eigbinv; double BSIM4pigcd; double BSIM4poxedge; double BSIM4xrcrg1; double BSIM4xrcrg2; double BSIM4lambda; /* overshoot */ double BSIM4vtl; /* thermal velocity limit */ double BSIM4xn; /* back scattering parameter */ double BSIM4lc; /* back scattering parameter */ double BSIM4tfactor; /* ballistic transportation factor */ double BSIM4vfbsdoff; /* S/D flatband offset voltage */ double BSIM4tvfbsdoff; /* added for stress effect */ double BSIM4ku0; double BSIM4kvth0; double BSIM4ku0temp; double BSIM4rho_ref; double BSIM4inv_od_ref; /* added for well proximity effect */ double BSIM4kvth0we; double BSIM4k2we; double BSIM4ku0we; /* CV model */ double BSIM4cgsl; double BSIM4cgdl; double BSIM4ckappas; double BSIM4ckappad; double BSIM4cf; double BSIM4clc; double BSIM4cle; double BSIM4vfbcv; double BSIM4noff; double BSIM4voffcv; double BSIM4acde; double BSIM4moin; /* Pre-calculated constants */ double BSIM4dw; double BSIM4dl; double BSIM4leff; double BSIM4weff; double BSIM4dwc; double BSIM4dlc; double BSIM4dwj; double BSIM4leffCV; double BSIM4weffCV; double BSIM4weffCJ; double BSIM4abulkCVfactor; double BSIM4cgso; double BSIM4cgdo; double BSIM4cgbo; double BSIM4u0temp; double BSIM4vsattemp; double BSIM4sqrtPhi; double BSIM4phis3; double BSIM4Xdep0; double BSIM4sqrtXdep0; double BSIM4theta0vb0; double BSIM4thetaRout; double BSIM4mstar; double BSIM4VgsteffVth; double BSIM4mstarcv; double BSIM4voffcbn; double BSIM4voffcbncv; double BSIM4rdswmin; double BSIM4rdwmin; double BSIM4rswmin; double BSIM4vfbsd; double BSIM4cof1; double BSIM4cof2; double BSIM4cof3; double BSIM4cof4; double BSIM4cdep0; double BSIM4ToxRatio; double BSIM4Aechvb; double BSIM4Bechvb; double BSIM4ToxRatioEdge; double BSIM4AechvbEdgeS; double BSIM4AechvbEdgeD; double BSIM4BechvbEdge; double BSIM4ldeb; double BSIM4k1ox; double BSIM4k2ox; double BSIM4vfbzbfactor; double BSIM4dvtp2factor; /* v4.7 */ struct bsim4SizeDependParam *pNext; }; typedef struct sBSIM4model { int BSIM4modType; struct sBSIM4model *BSIM4nextModel; BSIM4instance *BSIM4instances; IFuid BSIM4modName; int BSIM4type; int BSIM4mobMod; int BSIM4cvchargeMod; int BSIM4capMod; int BSIM4dioMod; int BSIM4trnqsMod; int BSIM4acnqsMod; int BSIM4fnoiMod; int BSIM4tnoiMod; int BSIM4rdsMod; int BSIM4rbodyMod; int BSIM4rgateMod; int BSIM4perMod; int BSIM4geoMod; int BSIM4rgeoMod; int BSIM4mtrlMod; int BSIM4mtrlCompatMod; /* v4.7 */ int BSIM4gidlMod; /* v4.7 New GIDL/GISL */ int BSIM4igcMod; int BSIM4igbMod; int BSIM4tempMod; int BSIM4binUnit; int BSIM4paramChk; char *BSIM4version; double BSIM4eot; double BSIM4vddeot; double BSIM4tempeot; double BSIM4leffeot; double BSIM4weffeot; double BSIM4ados; double BSIM4bdos; double BSIM4toxe; double BSIM4toxp; double BSIM4toxm; double BSIM4dtox; double BSIM4epsrox; double BSIM4cdsc; double BSIM4cdscb; double BSIM4cdscd; double BSIM4cit; double BSIM4nfactor; double BSIM4xj; double BSIM4vsat; double BSIM4at; double BSIM4a0; double BSIM4ags; double BSIM4a1; double BSIM4a2; double BSIM4keta; double BSIM4nsub; double BSIM4phig; double BSIM4epsrgate; double BSIM4easub; double BSIM4epsrsub; double BSIM4ni0sub; double BSIM4bg0sub; double BSIM4tbgasub; double BSIM4tbgbsub; double BSIM4ndep; double BSIM4nsd; double BSIM4phin; double BSIM4ngate; double BSIM4gamma1; double BSIM4gamma2; double BSIM4vbx; double BSIM4vbm; double BSIM4xt; double BSIM4k1; double BSIM4kt1; double BSIM4kt1l; double BSIM4kt2; double BSIM4k2; double BSIM4k3; double BSIM4k3b; double BSIM4w0; double BSIM4dvtp0; double BSIM4dvtp1; double BSIM4dvtp2; /* New DIBL/Rout */ double BSIM4dvtp3; double BSIM4dvtp4; double BSIM4dvtp5; double BSIM4lpe0; double BSIM4lpeb; double BSIM4dvt0; double BSIM4dvt1; double BSIM4dvt2; double BSIM4dvt0w; double BSIM4dvt1w; double BSIM4dvt2w; double BSIM4drout; double BSIM4dsub; double BSIM4vth0; double BSIM4eu; double BSIM4ucs; double BSIM4ua; double BSIM4ua1; double BSIM4ub; double BSIM4ub1; double BSIM4uc; double BSIM4uc1; double BSIM4ud; double BSIM4ud1; double BSIM4up; double BSIM4lp; double BSIM4u0; double BSIM4ute; double BSIM4ucste; double BSIM4voff; double BSIM4tvoff; double BSIM4tnfactor; /* v4.7 Temp dep of leakage current */ double BSIM4teta0; /* v4.7 temp dep of leakage current */ double BSIM4tvoffcv; /* v4.7 temp dep of leakage current */ double BSIM4minv; double BSIM4minvcv; double BSIM4voffl; double BSIM4voffcvl; double BSIM4delta; double BSIM4rdsw; double BSIM4rdswmin; double BSIM4rdwmin; double BSIM4rswmin; double BSIM4rsw; double BSIM4rdw; double BSIM4prwg; double BSIM4prwb; double BSIM4prt; double BSIM4eta0; double BSIM4etab; double BSIM4pclm; double BSIM4pdibl1; double BSIM4pdibl2; double BSIM4pdiblb; double BSIM4fprout; double BSIM4pdits; double BSIM4pditsd; double BSIM4pditsl; double BSIM4pscbe1; double BSIM4pscbe2; double BSIM4pvag; double BSIM4wr; double BSIM4dwg; double BSIM4dwb; double BSIM4b0; double BSIM4b1; double BSIM4alpha0; double BSIM4alpha1; double BSIM4beta0; double BSIM4agidl; double BSIM4bgidl; double BSIM4cgidl; double BSIM4egidl; double BSIM4fgidl; /* v4.7 New GIDL/GISL */ double BSIM4kgidl; /* v4.7 New GIDL/GISL */ double BSIM4rgidl; /* v4.7 New GIDL/GISL */ double BSIM4agisl; double BSIM4bgisl; double BSIM4cgisl; double BSIM4egisl; double BSIM4fgisl; /* v4.7 New GIDL/GISL */ double BSIM4kgisl; /* v4.7 New GIDL/GISL */ double BSIM4rgisl; /* v4.7 New GIDL/GISL */ double BSIM4aigc; double BSIM4bigc; double BSIM4cigc; double BSIM4aigsd; double BSIM4bigsd; double BSIM4cigsd; double BSIM4aigs; double BSIM4bigs; double BSIM4cigs; double BSIM4aigd; double BSIM4bigd; double BSIM4cigd; double BSIM4aigbacc; double BSIM4bigbacc; double BSIM4cigbacc; double BSIM4aigbinv; double BSIM4bigbinv; double BSIM4cigbinv; double BSIM4nigc; double BSIM4nigbacc; double BSIM4nigbinv; double BSIM4ntox; double BSIM4eigbinv; double BSIM4pigcd; double BSIM4poxedge; double BSIM4toxref; double BSIM4ijthdfwd; double BSIM4ijthsfwd; double BSIM4ijthdrev; double BSIM4ijthsrev; double BSIM4xjbvd; double BSIM4xjbvs; double BSIM4bvd; double BSIM4bvs; double BSIM4jtss; double BSIM4jtsd; double BSIM4jtssws; double BSIM4jtsswd; double BSIM4jtsswgs; double BSIM4jtsswgd; double BSIM4jtweff; double BSIM4njts; double BSIM4njtssw; double BSIM4njtsswg; double BSIM4njtsd; double BSIM4njtsswd; double BSIM4njtsswgd; double BSIM4xtss; double BSIM4xtsd; double BSIM4xtssws; double BSIM4xtsswd; double BSIM4xtsswgs; double BSIM4xtsswgd; double BSIM4tnjts; double BSIM4tnjtssw; double BSIM4tnjtsswg; double BSIM4tnjtsd; double BSIM4tnjtsswd; double BSIM4tnjtsswgd; double BSIM4vtss; double BSIM4vtsd; double BSIM4vtssws; double BSIM4vtsswd; double BSIM4vtsswgs; double BSIM4vtsswgd; double BSIM4xrcrg1; double BSIM4xrcrg2; double BSIM4lambda; double BSIM4vtl; double BSIM4lc; double BSIM4xn; double BSIM4vfbsdoff; /* S/D flatband offset voltage */ double BSIM4lintnoi; /* lint offset for noise calculation */ double BSIM4tvfbsdoff; double BSIM4vfb; double BSIM4gbmin; double BSIM4rbdb; double BSIM4rbsb; double BSIM4rbpb; double BSIM4rbps; double BSIM4rbpd; double BSIM4rbps0; double BSIM4rbpsl; double BSIM4rbpsw; double BSIM4rbpsnf; double BSIM4rbpd0; double BSIM4rbpdl; double BSIM4rbpdw; double BSIM4rbpdnf; double BSIM4rbpbx0; double BSIM4rbpbxl; double BSIM4rbpbxw; double BSIM4rbpbxnf; double BSIM4rbpby0; double BSIM4rbpbyl; double BSIM4rbpbyw; double BSIM4rbpbynf; double BSIM4rbsbx0; double BSIM4rbsby0; double BSIM4rbdbx0; double BSIM4rbdby0; double BSIM4rbsdbxl; double BSIM4rbsdbxw; double BSIM4rbsdbxnf; double BSIM4rbsdbyl; double BSIM4rbsdbyw; double BSIM4rbsdbynf; double BSIM4tnoia; double BSIM4tnoib; double BSIM4tnoic; double BSIM4rnoia; double BSIM4rnoib; double BSIM4rnoic; double BSIM4ntnoi; /* CV model and Parasitics */ double BSIM4cgsl; double BSIM4cgdl; double BSIM4ckappas; double BSIM4ckappad; double BSIM4cf; double BSIM4vfbcv; double BSIM4clc; double BSIM4cle; double BSIM4dwc; double BSIM4dlc; double BSIM4xw; double BSIM4xl; double BSIM4dlcig; double BSIM4dlcigd; double BSIM4dwj; double BSIM4noff; double BSIM4voffcv; double BSIM4acde; double BSIM4moin; double BSIM4tcj; double BSIM4tcjsw; double BSIM4tcjswg; double BSIM4tpb; double BSIM4tpbsw; double BSIM4tpbswg; double BSIM4dmcg; double BSIM4dmci; double BSIM4dmdg; double BSIM4dmcgt; double BSIM4xgw; double BSIM4xgl; double BSIM4rshg; double BSIM4ngcon; /* Length Dependence */ double BSIM4lcdsc; double BSIM4lcdscb; double BSIM4lcdscd; double BSIM4lcit; double BSIM4lnfactor; double BSIM4lxj; double BSIM4lvsat; double BSIM4lat; double BSIM4la0; double BSIM4lags; double BSIM4la1; double BSIM4la2; double BSIM4lketa; double BSIM4lnsub; double BSIM4lndep; double BSIM4lnsd; double BSIM4lphin; double BSIM4lngate; double BSIM4lgamma1; double BSIM4lgamma2; double BSIM4lvbx; double BSIM4lvbm; double BSIM4lxt; double BSIM4lk1; double BSIM4lkt1; double BSIM4lkt1l; double BSIM4lkt2; double BSIM4lk2; double BSIM4lk3; double BSIM4lk3b; double BSIM4lw0; double BSIM4ldvtp0; double BSIM4ldvtp1; double BSIM4ldvtp2; /* New DIBL/Rout */ double BSIM4ldvtp3; double BSIM4ldvtp4; double BSIM4ldvtp5; double BSIM4llpe0; double BSIM4llpeb; double BSIM4ldvt0; double BSIM4ldvt1; double BSIM4ldvt2; double BSIM4ldvt0w; double BSIM4ldvt1w; double BSIM4ldvt2w; double BSIM4ldrout; double BSIM4ldsub; double BSIM4lvth0; double BSIM4lua; double BSIM4lua1; double BSIM4lub; double BSIM4lub1; double BSIM4luc; double BSIM4luc1; double BSIM4lud; double BSIM4lud1; double BSIM4lup; double BSIM4llp; double BSIM4lu0; double BSIM4leu; double BSIM4lucs; double BSIM4lute; double BSIM4lucste; double BSIM4lvoff; double BSIM4ltvoff; double BSIM4ltnfactor; /* v4.7 Temp dep of leakage current */ double BSIM4lteta0; /* v4.7 temp dep of leakage current */ double BSIM4ltvoffcv; /* v4.7 temp dep of leakage current */ double BSIM4lminv; double BSIM4lminvcv; double BSIM4ldelta; double BSIM4lrdsw; double BSIM4lrsw; double BSIM4lrdw; double BSIM4lprwg; double BSIM4lprwb; double BSIM4lprt; double BSIM4leta0; double BSIM4letab; double BSIM4lpclm; double BSIM4lpdibl1; double BSIM4lpdibl2; double BSIM4lpdiblb; double BSIM4lfprout; double BSIM4lpdits; double BSIM4lpditsd; double BSIM4lpscbe1; double BSIM4lpscbe2; double BSIM4lpvag; double BSIM4lwr; double BSIM4ldwg; double BSIM4ldwb; double BSIM4lb0; double BSIM4lb1; double BSIM4lalpha0; double BSIM4lalpha1; double BSIM4lbeta0; double BSIM4lvfb; double BSIM4lagidl; double BSIM4lbgidl; double BSIM4lcgidl; double BSIM4legidl; double BSIM4lfgidl; /* v4.7 New GIDL/GISL */ double BSIM4lkgidl; /* v4.7 New GIDL/GISL */ double BSIM4lrgidl; /* v4.7 New GIDL/GISL */ double BSIM4lagisl; double BSIM4lbgisl; double BSIM4lcgisl; double BSIM4legisl; double BSIM4lfgisl; /* v4.7 New GIDL/GISL */ double BSIM4lkgisl; /* v4.7 New GIDL/GISL */ double BSIM4lrgisl; /* v4.7 New GIDL/GISL */ double BSIM4laigc; double BSIM4lbigc; double BSIM4lcigc; double BSIM4laigsd; double BSIM4lbigsd; double BSIM4lcigsd; double BSIM4laigs; double BSIM4lbigs; double BSIM4lcigs; double BSIM4laigd; double BSIM4lbigd; double BSIM4lcigd; double BSIM4laigbacc; double BSIM4lbigbacc; double BSIM4lcigbacc; double BSIM4laigbinv; double BSIM4lbigbinv; double BSIM4lcigbinv; double BSIM4lnigc; double BSIM4lnigbacc; double BSIM4lnigbinv; double BSIM4lntox; double BSIM4leigbinv; double BSIM4lpigcd; double BSIM4lpoxedge; double BSIM4lxrcrg1; double BSIM4lxrcrg2; double BSIM4llambda; double BSIM4lvtl; double BSIM4lxn; double BSIM4lvfbsdoff; double BSIM4ltvfbsdoff; /* CV model */ double BSIM4lcgsl; double BSIM4lcgdl; double BSIM4lckappas; double BSIM4lckappad; double BSIM4lcf; double BSIM4lclc; double BSIM4lcle; double BSIM4lvfbcv; double BSIM4lnoff; double BSIM4lvoffcv; double BSIM4lacde; double BSIM4lmoin; /* Width Dependence */ double BSIM4wcdsc; double BSIM4wcdscb; double BSIM4wcdscd; double BSIM4wcit; double BSIM4wnfactor; double BSIM4wxj; double BSIM4wvsat; double BSIM4wat; double BSIM4wa0; double BSIM4wags; double BSIM4wa1; double BSIM4wa2; double BSIM4wketa; double BSIM4wnsub; double BSIM4wndep; double BSIM4wnsd; double BSIM4wphin; double BSIM4wngate; double BSIM4wgamma1; double BSIM4wgamma2; double BSIM4wvbx; double BSIM4wvbm; double BSIM4wxt; double BSIM4wk1; double BSIM4wkt1; double BSIM4wkt1l; double BSIM4wkt2; double BSIM4wk2; double BSIM4wk3; double BSIM4wk3b; double BSIM4ww0; double BSIM4wdvtp0; double BSIM4wdvtp1; double BSIM4wdvtp2; /* New DIBL/Rout */ double BSIM4wdvtp3; double BSIM4wdvtp4; double BSIM4wdvtp5; double BSIM4wlpe0; double BSIM4wlpeb; double BSIM4wdvt0; double BSIM4wdvt1; double BSIM4wdvt2; double BSIM4wdvt0w; double BSIM4wdvt1w; double BSIM4wdvt2w; double BSIM4wdrout; double BSIM4wdsub; double BSIM4wvth0; double BSIM4wua; double BSIM4wua1; double BSIM4wub; double BSIM4wub1; double BSIM4wuc; double BSIM4wuc1; double BSIM4wud; double BSIM4wud1; double BSIM4wup; double BSIM4wlp; double BSIM4wu0; double BSIM4weu; double BSIM4wucs; double BSIM4wute; double BSIM4wucste; double BSIM4wvoff; double BSIM4wtvoff; double BSIM4wtnfactor; /* v4.7 Temp dep of leakage current */ double BSIM4wteta0; /* v4.7 temp dep of leakage current */ double BSIM4wtvoffcv; /* v4.7 temp dep of leakage current */ double BSIM4wminv; double BSIM4wminvcv; double BSIM4wdelta; double BSIM4wrdsw; double BSIM4wrsw; double BSIM4wrdw; double BSIM4wprwg; double BSIM4wprwb; double BSIM4wprt; double BSIM4weta0; double BSIM4wetab; double BSIM4wpclm; double BSIM4wpdibl1; double BSIM4wpdibl2; double BSIM4wpdiblb; double BSIM4wfprout; double BSIM4wpdits; double BSIM4wpditsd; double BSIM4wpscbe1; double BSIM4wpscbe2; double BSIM4wpvag; double BSIM4wwr; double BSIM4wdwg; double BSIM4wdwb; double BSIM4wb0; double BSIM4wb1; double BSIM4walpha0; double BSIM4walpha1; double BSIM4wbeta0; double BSIM4wvfb; double BSIM4wagidl; double BSIM4wbgidl; double BSIM4wcgidl; double BSIM4wegidl; double BSIM4wfgidl; /* v4.7 New GIDL/GISL */ double BSIM4wkgidl; /* v4.7 New GIDL/GISL */ double BSIM4wrgidl; /* v4.7 New GIDL/GISL */ double BSIM4wagisl; double BSIM4wbgisl; double BSIM4wcgisl; double BSIM4wegisl; double BSIM4wfgisl; /* v4.7 New GIDL/GISL */ double BSIM4wkgisl; /* v4.7 New GIDL/GISL */ double BSIM4wrgisl; /* v4.7 New GIDL/GISL */ double BSIM4waigc; double BSIM4wbigc; double BSIM4wcigc; double BSIM4waigsd; double BSIM4wbigsd; double BSIM4wcigsd; double BSIM4waigs; double BSIM4wbigs; double BSIM4wcigs; double BSIM4waigd; double BSIM4wbigd; double BSIM4wcigd; double BSIM4waigbacc; double BSIM4wbigbacc; double BSIM4wcigbacc; double BSIM4waigbinv; double BSIM4wbigbinv; double BSIM4wcigbinv; double BSIM4wnigc; double BSIM4wnigbacc; double BSIM4wnigbinv; double BSIM4wntox; double BSIM4weigbinv; double BSIM4wpigcd; double BSIM4wpoxedge; double BSIM4wxrcrg1; double BSIM4wxrcrg2; double BSIM4wlambda; double BSIM4wvtl; double BSIM4wxn; double BSIM4wvfbsdoff; double BSIM4wtvfbsdoff; /* CV model */ double BSIM4wcgsl; double BSIM4wcgdl; double BSIM4wckappas; double BSIM4wckappad; double BSIM4wcf; double BSIM4wclc; double BSIM4wcle; double BSIM4wvfbcv; double BSIM4wnoff; double BSIM4wvoffcv; double BSIM4wacde; double BSIM4wmoin; /* Cross-term Dependence */ double BSIM4pcdsc; double BSIM4pcdscb; double BSIM4pcdscd; double BSIM4pcit; double BSIM4pnfactor; double BSIM4pxj; double BSIM4pvsat; double BSIM4pat; double BSIM4pa0; double BSIM4pags; double BSIM4pa1; double BSIM4pa2; double BSIM4pketa; double BSIM4pnsub; double BSIM4pndep; double BSIM4pnsd; double BSIM4pphin; double BSIM4pngate; double BSIM4pgamma1; double BSIM4pgamma2; double BSIM4pvbx; double BSIM4pvbm; double BSIM4pxt; double BSIM4pk1; double BSIM4pkt1; double BSIM4pkt1l; double BSIM4pkt2; double BSIM4pk2; double BSIM4pk3; double BSIM4pk3b; double BSIM4pw0; double BSIM4pdvtp0; double BSIM4pdvtp1; double BSIM4pdvtp2; /* New DIBL/Rout */ double BSIM4pdvtp3; double BSIM4pdvtp4; double BSIM4pdvtp5; double BSIM4plpe0; double BSIM4plpeb; double BSIM4pdvt0; double BSIM4pdvt1; double BSIM4pdvt2; double BSIM4pdvt0w; double BSIM4pdvt1w; double BSIM4pdvt2w; double BSIM4pdrout; double BSIM4pdsub; double BSIM4pvth0; double BSIM4pua; double BSIM4pua1; double BSIM4pub; double BSIM4pub1; double BSIM4puc; double BSIM4puc1; double BSIM4pud; double BSIM4pud1; double BSIM4pup; double BSIM4plp; double BSIM4pu0; double BSIM4peu; double BSIM4pucs; double BSIM4pute; double BSIM4pucste; double BSIM4pvoff; double BSIM4ptvoff; double BSIM4ptnfactor; /* v4.7 Temp dep of leakage current */ double BSIM4pteta0; /* v4.7 temp dep of leakage current */ double BSIM4ptvoffcv; /* v4.7 temp dep of leakage current */ double BSIM4pminv; double BSIM4pminvcv; double BSIM4pdelta; double BSIM4prdsw; double BSIM4prsw; double BSIM4prdw; double BSIM4pprwg; double BSIM4pprwb; double BSIM4pprt; double BSIM4peta0; double BSIM4petab; double BSIM4ppclm; double BSIM4ppdibl1; double BSIM4ppdibl2; double BSIM4ppdiblb; double BSIM4pfprout; double BSIM4ppdits; double BSIM4ppditsd; double BSIM4ppscbe1; double BSIM4ppscbe2; double BSIM4ppvag; double BSIM4pwr; double BSIM4pdwg; double BSIM4pdwb; double BSIM4pb0; double BSIM4pb1; double BSIM4palpha0; double BSIM4palpha1; double BSIM4pbeta0; double BSIM4pvfb; double BSIM4pagidl; double BSIM4pbgidl; double BSIM4pcgidl; double BSIM4pegidl; double BSIM4pfgidl; /* v4.7 New GIDL/GISL */ double BSIM4pkgidl; /* v4.7 New GIDL/GISL */ double BSIM4prgidl; /* v4.7 New GIDL/GISL */ double BSIM4pagisl; double BSIM4pbgisl; double BSIM4pcgisl; double BSIM4pegisl; double BSIM4pfgisl; /* v4.7 New GIDL/GISL */ double BSIM4pkgisl; /* v4.7 New GIDL/GISL */ double BSIM4prgisl; /* v4.7 New GIDL/GISL */ double BSIM4paigc; double BSIM4pbigc; double BSIM4pcigc; double BSIM4paigsd; double BSIM4pbigsd; double BSIM4pcigsd; double BSIM4paigs; double BSIM4pbigs; double BSIM4pcigs; double BSIM4paigd; double BSIM4pbigd; double BSIM4pcigd; double BSIM4paigbacc; double BSIM4pbigbacc; double BSIM4pcigbacc; double BSIM4paigbinv; double BSIM4pbigbinv; double BSIM4pcigbinv; double BSIM4pnigc; double BSIM4pnigbacc; double BSIM4pnigbinv; double BSIM4pntox; double BSIM4peigbinv; double BSIM4ppigcd; double BSIM4ppoxedge; double BSIM4pxrcrg1; double BSIM4pxrcrg2; double BSIM4plambda; double BSIM4pvtl; double BSIM4pxn; double BSIM4pvfbsdoff; double BSIM4ptvfbsdoff; /* CV model */ double BSIM4pcgsl; double BSIM4pcgdl; double BSIM4pckappas; double BSIM4pckappad; double BSIM4pcf; double BSIM4pclc; double BSIM4pcle; double BSIM4pvfbcv; double BSIM4pnoff; double BSIM4pvoffcv; double BSIM4pacde; double BSIM4pmoin; double BSIM4tnom; double BSIM4cgso; double BSIM4cgdo; double BSIM4cgbo; double BSIM4xpart; double BSIM4cFringOut; double BSIM4cFringMax; double BSIM4sheetResistance; double BSIM4SjctSatCurDensity; double BSIM4DjctSatCurDensity; double BSIM4SjctSidewallSatCurDensity; double BSIM4DjctSidewallSatCurDensity; double BSIM4SjctGateSidewallSatCurDensity; double BSIM4DjctGateSidewallSatCurDensity; double BSIM4SbulkJctPotential; double BSIM4DbulkJctPotential; double BSIM4SbulkJctBotGradingCoeff; double BSIM4DbulkJctBotGradingCoeff; double BSIM4SbulkJctSideGradingCoeff; double BSIM4DbulkJctSideGradingCoeff; double BSIM4SbulkJctGateSideGradingCoeff; double BSIM4DbulkJctGateSideGradingCoeff; double BSIM4SsidewallJctPotential; double BSIM4DsidewallJctPotential; double BSIM4SGatesidewallJctPotential; double BSIM4DGatesidewallJctPotential; double BSIM4SunitAreaJctCap; double BSIM4DunitAreaJctCap; double BSIM4SunitLengthSidewallJctCap; double BSIM4DunitLengthSidewallJctCap; double BSIM4SunitLengthGateSidewallJctCap; double BSIM4DunitLengthGateSidewallJctCap; double BSIM4SjctEmissionCoeff; double BSIM4DjctEmissionCoeff; double BSIM4SjctTempExponent; double BSIM4DjctTempExponent; double BSIM4njtsstemp; double BSIM4njtsswstemp; double BSIM4njtsswgstemp; double BSIM4njtsdtemp; double BSIM4njtsswdtemp; double BSIM4njtsswgdtemp; double BSIM4Lint; double BSIM4Ll; double BSIM4Llc; double BSIM4Lln; double BSIM4Lw; double BSIM4Lwc; double BSIM4Lwn; double BSIM4Lwl; double BSIM4Lwlc; double BSIM4Lmin; double BSIM4Lmax; double BSIM4Wint; double BSIM4Wl; double BSIM4Wlc; double BSIM4Wln; double BSIM4Ww; double BSIM4Wwc; double BSIM4Wwn; double BSIM4Wwl; double BSIM4Wwlc; double BSIM4Wmin; double BSIM4Wmax; /* added for stress effect */ double BSIM4saref; double BSIM4sbref; double BSIM4wlod; double BSIM4ku0; double BSIM4kvsat; double BSIM4kvth0; double BSIM4tku0; double BSIM4llodku0; double BSIM4wlodku0; double BSIM4llodvth; double BSIM4wlodvth; double BSIM4lku0; double BSIM4wku0; double BSIM4pku0; double BSIM4lkvth0; double BSIM4wkvth0; double BSIM4pkvth0; double BSIM4stk2; double BSIM4lodk2; double BSIM4steta0; double BSIM4lodeta0; double BSIM4web; double BSIM4wec; double BSIM4kvth0we; double BSIM4k2we; double BSIM4ku0we; double BSIM4scref; double BSIM4wpemod; double BSIM4lkvth0we; double BSIM4lk2we; double BSIM4lku0we; double BSIM4wkvth0we; double BSIM4wk2we; double BSIM4wku0we; double BSIM4pkvth0we; double BSIM4pk2we; double BSIM4pku0we; /* Pre-calculated constants * move to size-dependent param */ double BSIM4Eg0; double BSIM4vtm; double BSIM4vtm0; double BSIM4coxe; double BSIM4coxp; double BSIM4cof1; double BSIM4cof2; double BSIM4cof3; double BSIM4cof4; double BSIM4vcrit; double BSIM4factor1; double BSIM4PhiBS; double BSIM4PhiBSWS; double BSIM4PhiBSWGS; double BSIM4SjctTempSatCurDensity; double BSIM4SjctSidewallTempSatCurDensity; double BSIM4SjctGateSidewallTempSatCurDensity; double BSIM4PhiBD; double BSIM4PhiBSWD; double BSIM4PhiBSWGD; double BSIM4DjctTempSatCurDensity; double BSIM4DjctSidewallTempSatCurDensity; double BSIM4DjctGateSidewallTempSatCurDensity; double BSIM4SunitAreaTempJctCap; double BSIM4DunitAreaTempJctCap; double BSIM4SunitLengthSidewallTempJctCap; double BSIM4DunitLengthSidewallTempJctCap; double BSIM4SunitLengthGateSidewallTempJctCap; double BSIM4DunitLengthGateSidewallTempJctCap; double BSIM4oxideTrapDensityA; double BSIM4oxideTrapDensityB; double BSIM4oxideTrapDensityC; double BSIM4em; double BSIM4ef; double BSIM4af; double BSIM4kf; double BSIM4vgsMax; double BSIM4vgdMax; double BSIM4vgbMax; double BSIM4vdsMax; double BSIM4vbsMax; double BSIM4vbdMax; struct bsim4SizeDependParam *pSizeDependParamKnot; #ifdef USE_OMP int BSIM4InstCount; struct sBSIM4instance **BSIM4InstanceArray; #endif /* Flags */ unsigned BSIM4mobModGiven :1; unsigned BSIM4binUnitGiven :1; unsigned BSIM4cvchargeModGiven :1; unsigned BSIM4capModGiven :1; unsigned BSIM4dioModGiven :1; unsigned BSIM4rdsModGiven :1; unsigned BSIM4rbodyModGiven :1; unsigned BSIM4rgateModGiven :1; unsigned BSIM4perModGiven :1; unsigned BSIM4geoModGiven :1; unsigned BSIM4rgeoModGiven :1; unsigned BSIM4paramChkGiven :1; unsigned BSIM4trnqsModGiven :1; unsigned BSIM4acnqsModGiven :1; unsigned BSIM4fnoiModGiven :1; unsigned BSIM4tnoiModGiven :1; unsigned BSIM4mtrlModGiven :1; unsigned BSIM4mtrlCompatModGiven :1; unsigned BSIM4gidlModGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4igcModGiven :1; unsigned BSIM4igbModGiven :1; unsigned BSIM4tempModGiven :1; unsigned BSIM4typeGiven :1; unsigned BSIM4toxrefGiven :1; unsigned BSIM4eotGiven :1; unsigned BSIM4vddeotGiven :1; unsigned BSIM4tempeotGiven :1; unsigned BSIM4leffeotGiven :1; unsigned BSIM4weffeotGiven :1; unsigned BSIM4adosGiven :1; unsigned BSIM4bdosGiven :1; unsigned BSIM4toxeGiven :1; unsigned BSIM4toxpGiven :1; unsigned BSIM4toxmGiven :1; unsigned BSIM4dtoxGiven :1; unsigned BSIM4epsroxGiven :1; unsigned BSIM4versionGiven :1; unsigned BSIM4cdscGiven :1; unsigned BSIM4cdscbGiven :1; unsigned BSIM4cdscdGiven :1; unsigned BSIM4citGiven :1; unsigned BSIM4nfactorGiven :1; unsigned BSIM4xjGiven :1; unsigned BSIM4vsatGiven :1; unsigned BSIM4atGiven :1; unsigned BSIM4a0Given :1; unsigned BSIM4agsGiven :1; unsigned BSIM4a1Given :1; unsigned BSIM4a2Given :1; unsigned BSIM4ketaGiven :1; unsigned BSIM4nsubGiven :1; unsigned BSIM4phigGiven :1; unsigned BSIM4epsrgateGiven :1; unsigned BSIM4easubGiven :1; unsigned BSIM4epsrsubGiven :1; unsigned BSIM4ni0subGiven :1; unsigned BSIM4bg0subGiven :1; unsigned BSIM4tbgasubGiven :1; unsigned BSIM4tbgbsubGiven :1; unsigned BSIM4ndepGiven :1; unsigned BSIM4nsdGiven :1; unsigned BSIM4phinGiven :1; unsigned BSIM4ngateGiven :1; unsigned BSIM4gamma1Given :1; unsigned BSIM4gamma2Given :1; unsigned BSIM4vbxGiven :1; unsigned BSIM4vbmGiven :1; unsigned BSIM4xtGiven :1; unsigned BSIM4k1Given :1; unsigned BSIM4kt1Given :1; unsigned BSIM4kt1lGiven :1; unsigned BSIM4kt2Given :1; unsigned BSIM4k2Given :1; unsigned BSIM4k3Given :1; unsigned BSIM4k3bGiven :1; unsigned BSIM4w0Given :1; unsigned BSIM4dvtp0Given :1; unsigned BSIM4dvtp1Given :1; unsigned BSIM4dvtp2Given :1; /* New DIBL/Rout */ unsigned BSIM4dvtp3Given :1; unsigned BSIM4dvtp4Given :1; unsigned BSIM4dvtp5Given :1; unsigned BSIM4lpe0Given :1; unsigned BSIM4lpebGiven :1; unsigned BSIM4dvt0Given :1; unsigned BSIM4dvt1Given :1; unsigned BSIM4dvt2Given :1; unsigned BSIM4dvt0wGiven :1; unsigned BSIM4dvt1wGiven :1; unsigned BSIM4dvt2wGiven :1; unsigned BSIM4droutGiven :1; unsigned BSIM4dsubGiven :1; unsigned BSIM4vth0Given :1; unsigned BSIM4euGiven :1; unsigned BSIM4ucsGiven :1; unsigned BSIM4uaGiven :1; unsigned BSIM4ua1Given :1; unsigned BSIM4ubGiven :1; unsigned BSIM4ub1Given :1; unsigned BSIM4ucGiven :1; unsigned BSIM4uc1Given :1; unsigned BSIM4udGiven :1; unsigned BSIM4ud1Given :1; unsigned BSIM4upGiven :1; unsigned BSIM4lpGiven :1; unsigned BSIM4u0Given :1; unsigned BSIM4uteGiven :1; unsigned BSIM4ucsteGiven :1; unsigned BSIM4voffGiven :1; unsigned BSIM4tvoffGiven :1; unsigned BSIM4tnfactorGiven :1; /* v4.7 Temp dep of leakage current */ unsigned BSIM4teta0Given :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4tvoffcvGiven :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4vofflGiven :1; unsigned BSIM4voffcvlGiven :1; unsigned BSIM4minvGiven :1; unsigned BSIM4minvcvGiven :1; unsigned BSIM4rdswGiven :1; unsigned BSIM4rdswminGiven :1; unsigned BSIM4rdwminGiven :1; unsigned BSIM4rswminGiven :1; unsigned BSIM4rswGiven :1; unsigned BSIM4rdwGiven :1; unsigned BSIM4prwgGiven :1; unsigned BSIM4prwbGiven :1; unsigned BSIM4prtGiven :1; unsigned BSIM4eta0Given :1; unsigned BSIM4etabGiven :1; unsigned BSIM4pclmGiven :1; unsigned BSIM4pdibl1Given :1; unsigned BSIM4pdibl2Given :1; unsigned BSIM4pdiblbGiven :1; unsigned BSIM4fproutGiven :1; unsigned BSIM4pditsGiven :1; unsigned BSIM4pditsdGiven :1; unsigned BSIM4pditslGiven :1; unsigned BSIM4pscbe1Given :1; unsigned BSIM4pscbe2Given :1; unsigned BSIM4pvagGiven :1; unsigned BSIM4deltaGiven :1; unsigned BSIM4wrGiven :1; unsigned BSIM4dwgGiven :1; unsigned BSIM4dwbGiven :1; unsigned BSIM4b0Given :1; unsigned BSIM4b1Given :1; unsigned BSIM4alpha0Given :1; unsigned BSIM4alpha1Given :1; unsigned BSIM4beta0Given :1; unsigned BSIM4agidlGiven :1; unsigned BSIM4bgidlGiven :1; unsigned BSIM4cgidlGiven :1; unsigned BSIM4egidlGiven :1; unsigned BSIM4fgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4kgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4rgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4agislGiven :1; unsigned BSIM4bgislGiven :1; unsigned BSIM4cgislGiven :1; unsigned BSIM4egislGiven :1; unsigned BSIM4fgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4kgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4rgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4aigcGiven :1; unsigned BSIM4bigcGiven :1; unsigned BSIM4cigcGiven :1; unsigned BSIM4aigsdGiven :1; unsigned BSIM4bigsdGiven :1; unsigned BSIM4cigsdGiven :1; unsigned BSIM4aigsGiven :1; unsigned BSIM4bigsGiven :1; unsigned BSIM4cigsGiven :1; unsigned BSIM4aigdGiven :1; unsigned BSIM4bigdGiven :1; unsigned BSIM4cigdGiven :1; unsigned BSIM4aigbaccGiven :1; unsigned BSIM4bigbaccGiven :1; unsigned BSIM4cigbaccGiven :1; unsigned BSIM4aigbinvGiven :1; unsigned BSIM4bigbinvGiven :1; unsigned BSIM4cigbinvGiven :1; unsigned BSIM4nigcGiven :1; unsigned BSIM4nigbinvGiven :1; unsigned BSIM4nigbaccGiven :1; unsigned BSIM4ntoxGiven :1; unsigned BSIM4eigbinvGiven :1; unsigned BSIM4pigcdGiven :1; unsigned BSIM4poxedgeGiven :1; unsigned BSIM4ijthdfwdGiven :1; unsigned BSIM4ijthsfwdGiven :1; unsigned BSIM4ijthdrevGiven :1; unsigned BSIM4ijthsrevGiven :1; unsigned BSIM4xjbvdGiven :1; unsigned BSIM4xjbvsGiven :1; unsigned BSIM4bvdGiven :1; unsigned BSIM4bvsGiven :1; unsigned BSIM4jtssGiven :1; unsigned BSIM4jtsdGiven :1; unsigned BSIM4jtsswsGiven :1; unsigned BSIM4jtsswdGiven :1; unsigned BSIM4jtsswgsGiven :1; unsigned BSIM4jtsswgdGiven :1; unsigned BSIM4jtweffGiven :1; unsigned BSIM4njtsGiven :1; unsigned BSIM4njtsswGiven :1; unsigned BSIM4njtsswgGiven :1; unsigned BSIM4njtsdGiven :1; unsigned BSIM4njtsswdGiven :1; unsigned BSIM4njtsswgdGiven :1; unsigned BSIM4xtssGiven :1; unsigned BSIM4xtsdGiven :1; unsigned BSIM4xtsswsGiven :1; unsigned BSIM4xtsswdGiven :1; unsigned BSIM4xtsswgsGiven :1; unsigned BSIM4xtsswgdGiven :1; unsigned BSIM4tnjtsGiven :1; unsigned BSIM4tnjtsswGiven :1; unsigned BSIM4tnjtsswgGiven :1; unsigned BSIM4tnjtsdGiven :1; unsigned BSIM4tnjtsswdGiven :1; unsigned BSIM4tnjtsswgdGiven :1; unsigned BSIM4vtssGiven :1; unsigned BSIM4vtsdGiven :1; unsigned BSIM4vtsswsGiven :1; unsigned BSIM4vtsswdGiven :1; unsigned BSIM4vtsswgsGiven :1; unsigned BSIM4vtsswgdGiven :1; unsigned BSIM4vfbGiven :1; unsigned BSIM4gbminGiven :1; unsigned BSIM4rbdbGiven :1; unsigned BSIM4rbsbGiven :1; unsigned BSIM4rbpsGiven :1; unsigned BSIM4rbpdGiven :1; unsigned BSIM4rbpbGiven :1; unsigned BSIM4rbps0Given :1; unsigned BSIM4rbpslGiven :1; unsigned BSIM4rbpswGiven :1; unsigned BSIM4rbpsnfGiven :1; unsigned BSIM4rbpd0Given :1; unsigned BSIM4rbpdlGiven :1; unsigned BSIM4rbpdwGiven :1; unsigned BSIM4rbpdnfGiven :1; unsigned BSIM4rbpbx0Given :1; unsigned BSIM4rbpbxlGiven :1; unsigned BSIM4rbpbxwGiven :1; unsigned BSIM4rbpbxnfGiven :1; unsigned BSIM4rbpby0Given :1; unsigned BSIM4rbpbylGiven :1; unsigned BSIM4rbpbywGiven :1; unsigned BSIM4rbpbynfGiven :1; unsigned BSIM4rbsbx0Given :1; unsigned BSIM4rbsby0Given :1; unsigned BSIM4rbdbx0Given :1; unsigned BSIM4rbdby0Given :1; unsigned BSIM4rbsdbxlGiven :1; unsigned BSIM4rbsdbxwGiven :1; unsigned BSIM4rbsdbxnfGiven :1; unsigned BSIM4rbsdbylGiven :1; unsigned BSIM4rbsdbywGiven :1; unsigned BSIM4rbsdbynfGiven :1; unsigned BSIM4xrcrg1Given :1; unsigned BSIM4xrcrg2Given :1; unsigned BSIM4tnoiaGiven :1; unsigned BSIM4tnoibGiven :1; unsigned BSIM4tnoicGiven :1; unsigned BSIM4rnoiaGiven :1; unsigned BSIM4rnoibGiven :1; unsigned BSIM4rnoicGiven :1; unsigned BSIM4ntnoiGiven :1; unsigned BSIM4lambdaGiven :1; unsigned BSIM4vtlGiven :1; unsigned BSIM4lcGiven :1; unsigned BSIM4xnGiven :1; unsigned BSIM4vfbsdoffGiven :1; unsigned BSIM4lintnoiGiven :1; unsigned BSIM4tvfbsdoffGiven :1; /* CV model and parasitics */ unsigned BSIM4cgslGiven :1; unsigned BSIM4cgdlGiven :1; unsigned BSIM4ckappasGiven :1; unsigned BSIM4ckappadGiven :1; unsigned BSIM4cfGiven :1; unsigned BSIM4vfbcvGiven :1; unsigned BSIM4clcGiven :1; unsigned BSIM4cleGiven :1; unsigned BSIM4dwcGiven :1; unsigned BSIM4dlcGiven :1; unsigned BSIM4xwGiven :1; unsigned BSIM4xlGiven :1; unsigned BSIM4dlcigGiven :1; unsigned BSIM4dlcigdGiven :1; unsigned BSIM4dwjGiven :1; unsigned BSIM4noffGiven :1; unsigned BSIM4voffcvGiven :1; unsigned BSIM4acdeGiven :1; unsigned BSIM4moinGiven :1; unsigned BSIM4tcjGiven :1; unsigned BSIM4tcjswGiven :1; unsigned BSIM4tcjswgGiven :1; unsigned BSIM4tpbGiven :1; unsigned BSIM4tpbswGiven :1; unsigned BSIM4tpbswgGiven :1; unsigned BSIM4dmcgGiven :1; unsigned BSIM4dmciGiven :1; unsigned BSIM4dmdgGiven :1; unsigned BSIM4dmcgtGiven :1; unsigned BSIM4xgwGiven :1; unsigned BSIM4xglGiven :1; unsigned BSIM4rshgGiven :1; unsigned BSIM4ngconGiven :1; /* Length dependence */ unsigned BSIM4lcdscGiven :1; unsigned BSIM4lcdscbGiven :1; unsigned BSIM4lcdscdGiven :1; unsigned BSIM4lcitGiven :1; unsigned BSIM4lnfactorGiven :1; unsigned BSIM4lxjGiven :1; unsigned BSIM4lvsatGiven :1; unsigned BSIM4latGiven :1; unsigned BSIM4la0Given :1; unsigned BSIM4lagsGiven :1; unsigned BSIM4la1Given :1; unsigned BSIM4la2Given :1; unsigned BSIM4lketaGiven :1; unsigned BSIM4lnsubGiven :1; unsigned BSIM4lndepGiven :1; unsigned BSIM4lnsdGiven :1; unsigned BSIM4lphinGiven :1; unsigned BSIM4lngateGiven :1; unsigned BSIM4lgamma1Given :1; unsigned BSIM4lgamma2Given :1; unsigned BSIM4lvbxGiven :1; unsigned BSIM4lvbmGiven :1; unsigned BSIM4lxtGiven :1; unsigned BSIM4lk1Given :1; unsigned BSIM4lkt1Given :1; unsigned BSIM4lkt1lGiven :1; unsigned BSIM4lkt2Given :1; unsigned BSIM4lk2Given :1; unsigned BSIM4lk3Given :1; unsigned BSIM4lk3bGiven :1; unsigned BSIM4lw0Given :1; unsigned BSIM4ldvtp0Given :1; unsigned BSIM4ldvtp1Given :1; unsigned BSIM4ldvtp2Given :1; /* New DIBL/Rout */ unsigned BSIM4ldvtp3Given :1; unsigned BSIM4ldvtp4Given :1; unsigned BSIM4ldvtp5Given :1; unsigned BSIM4llpe0Given :1; unsigned BSIM4llpebGiven :1; unsigned BSIM4ldvt0Given :1; unsigned BSIM4ldvt1Given :1; unsigned BSIM4ldvt2Given :1; unsigned BSIM4ldvt0wGiven :1; unsigned BSIM4ldvt1wGiven :1; unsigned BSIM4ldvt2wGiven :1; unsigned BSIM4ldroutGiven :1; unsigned BSIM4ldsubGiven :1; unsigned BSIM4lvth0Given :1; unsigned BSIM4luaGiven :1; unsigned BSIM4lua1Given :1; unsigned BSIM4lubGiven :1; unsigned BSIM4lub1Given :1; unsigned BSIM4lucGiven :1; unsigned BSIM4luc1Given :1; unsigned BSIM4ludGiven :1; unsigned BSIM4lud1Given :1; unsigned BSIM4lupGiven :1; unsigned BSIM4llpGiven :1; unsigned BSIM4lu0Given :1; unsigned BSIM4leuGiven :1; unsigned BSIM4lucsGiven :1; unsigned BSIM4luteGiven :1; unsigned BSIM4lucsteGiven :1; unsigned BSIM4lvoffGiven :1; unsigned BSIM4ltvoffGiven :1; unsigned BSIM4ltnfactorGiven :1; /* v4.7 Temp dep of leakage current */ unsigned BSIM4lteta0Given :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4ltvoffcvGiven :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4lminvGiven :1; unsigned BSIM4lminvcvGiven :1; unsigned BSIM4lrdswGiven :1; unsigned BSIM4lrswGiven :1; unsigned BSIM4lrdwGiven :1; unsigned BSIM4lprwgGiven :1; unsigned BSIM4lprwbGiven :1; unsigned BSIM4lprtGiven :1; unsigned BSIM4leta0Given :1; unsigned BSIM4letabGiven :1; unsigned BSIM4lpclmGiven :1; unsigned BSIM4lpdibl1Given :1; unsigned BSIM4lpdibl2Given :1; unsigned BSIM4lpdiblbGiven :1; unsigned BSIM4lfproutGiven :1; unsigned BSIM4lpditsGiven :1; unsigned BSIM4lpditsdGiven :1; unsigned BSIM4lpscbe1Given :1; unsigned BSIM4lpscbe2Given :1; unsigned BSIM4lpvagGiven :1; unsigned BSIM4ldeltaGiven :1; unsigned BSIM4lwrGiven :1; unsigned BSIM4ldwgGiven :1; unsigned BSIM4ldwbGiven :1; unsigned BSIM4lb0Given :1; unsigned BSIM4lb1Given :1; unsigned BSIM4lalpha0Given :1; unsigned BSIM4lalpha1Given :1; unsigned BSIM4lbeta0Given :1; unsigned BSIM4lvfbGiven :1; unsigned BSIM4lagidlGiven :1; unsigned BSIM4lbgidlGiven :1; unsigned BSIM4lcgidlGiven :1; unsigned BSIM4legidlGiven :1; unsigned BSIM4lfgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4lkgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4lrgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4lagislGiven :1; unsigned BSIM4lbgislGiven :1; unsigned BSIM4lcgislGiven :1; unsigned BSIM4legislGiven :1; unsigned BSIM4lfgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4lkgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4lrgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4laigcGiven :1; unsigned BSIM4lbigcGiven :1; unsigned BSIM4lcigcGiven :1; unsigned BSIM4laigsdGiven :1; unsigned BSIM4lbigsdGiven :1; unsigned BSIM4lcigsdGiven :1; unsigned BSIM4laigsGiven :1; unsigned BSIM4lbigsGiven :1; unsigned BSIM4lcigsGiven :1; unsigned BSIM4laigdGiven :1; unsigned BSIM4lbigdGiven :1; unsigned BSIM4lcigdGiven :1; unsigned BSIM4laigbaccGiven :1; unsigned BSIM4lbigbaccGiven :1; unsigned BSIM4lcigbaccGiven :1; unsigned BSIM4laigbinvGiven :1; unsigned BSIM4lbigbinvGiven :1; unsigned BSIM4lcigbinvGiven :1; unsigned BSIM4lnigcGiven :1; unsigned BSIM4lnigbinvGiven :1; unsigned BSIM4lnigbaccGiven :1; unsigned BSIM4lntoxGiven :1; unsigned BSIM4leigbinvGiven :1; unsigned BSIM4lpigcdGiven :1; unsigned BSIM4lpoxedgeGiven :1; unsigned BSIM4lxrcrg1Given :1; unsigned BSIM4lxrcrg2Given :1; unsigned BSIM4llambdaGiven :1; unsigned BSIM4lvtlGiven :1; unsigned BSIM4lxnGiven :1; unsigned BSIM4lvfbsdoffGiven :1; unsigned BSIM4ltvfbsdoffGiven :1; /* CV model */ unsigned BSIM4lcgslGiven :1; unsigned BSIM4lcgdlGiven :1; unsigned BSIM4lckappasGiven :1; unsigned BSIM4lckappadGiven :1; unsigned BSIM4lcfGiven :1; unsigned BSIM4lclcGiven :1; unsigned BSIM4lcleGiven :1; unsigned BSIM4lvfbcvGiven :1; unsigned BSIM4lnoffGiven :1; unsigned BSIM4lvoffcvGiven :1; unsigned BSIM4lacdeGiven :1; unsigned BSIM4lmoinGiven :1; /* Width dependence */ unsigned BSIM4wcdscGiven :1; unsigned BSIM4wcdscbGiven :1; unsigned BSIM4wcdscdGiven :1; unsigned BSIM4wcitGiven :1; unsigned BSIM4wnfactorGiven :1; unsigned BSIM4wxjGiven :1; unsigned BSIM4wvsatGiven :1; unsigned BSIM4watGiven :1; unsigned BSIM4wa0Given :1; unsigned BSIM4wagsGiven :1; unsigned BSIM4wa1Given :1; unsigned BSIM4wa2Given :1; unsigned BSIM4wketaGiven :1; unsigned BSIM4wnsubGiven :1; unsigned BSIM4wndepGiven :1; unsigned BSIM4wnsdGiven :1; unsigned BSIM4wphinGiven :1; unsigned BSIM4wngateGiven :1; unsigned BSIM4wgamma1Given :1; unsigned BSIM4wgamma2Given :1; unsigned BSIM4wvbxGiven :1; unsigned BSIM4wvbmGiven :1; unsigned BSIM4wxtGiven :1; unsigned BSIM4wk1Given :1; unsigned BSIM4wkt1Given :1; unsigned BSIM4wkt1lGiven :1; unsigned BSIM4wkt2Given :1; unsigned BSIM4wk2Given :1; unsigned BSIM4wk3Given :1; unsigned BSIM4wk3bGiven :1; unsigned BSIM4ww0Given :1; unsigned BSIM4wdvtp0Given :1; unsigned BSIM4wdvtp1Given :1; unsigned BSIM4wdvtp2Given :1; /* New DIBL/Rout */ unsigned BSIM4wdvtp3Given :1; unsigned BSIM4wdvtp4Given :1; unsigned BSIM4wdvtp5Given :1; unsigned BSIM4wlpe0Given :1; unsigned BSIM4wlpebGiven :1; unsigned BSIM4wdvt0Given :1; unsigned BSIM4wdvt1Given :1; unsigned BSIM4wdvt2Given :1; unsigned BSIM4wdvt0wGiven :1; unsigned BSIM4wdvt1wGiven :1; unsigned BSIM4wdvt2wGiven :1; unsigned BSIM4wdroutGiven :1; unsigned BSIM4wdsubGiven :1; unsigned BSIM4wvth0Given :1; unsigned BSIM4wuaGiven :1; unsigned BSIM4wua1Given :1; unsigned BSIM4wubGiven :1; unsigned BSIM4wub1Given :1; unsigned BSIM4wucGiven :1; unsigned BSIM4wuc1Given :1; unsigned BSIM4wudGiven :1; unsigned BSIM4wud1Given :1; unsigned BSIM4wupGiven :1; unsigned BSIM4wlpGiven :1; unsigned BSIM4wu0Given :1; unsigned BSIM4weuGiven :1; unsigned BSIM4wucsGiven :1; unsigned BSIM4wuteGiven :1; unsigned BSIM4wucsteGiven :1; unsigned BSIM4wvoffGiven :1; unsigned BSIM4wtvoffGiven :1; unsigned BSIM4wtnfactorGiven :1; /* v4.7 Temp dep of leakage current */ unsigned BSIM4wteta0Given :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4wtvoffcvGiven :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4wminvGiven :1; unsigned BSIM4wminvcvGiven :1; unsigned BSIM4wrdswGiven :1; unsigned BSIM4wrswGiven :1; unsigned BSIM4wrdwGiven :1; unsigned BSIM4wprwgGiven :1; unsigned BSIM4wprwbGiven :1; unsigned BSIM4wprtGiven :1; unsigned BSIM4weta0Given :1; unsigned BSIM4wetabGiven :1; unsigned BSIM4wpclmGiven :1; unsigned BSIM4wpdibl1Given :1; unsigned BSIM4wpdibl2Given :1; unsigned BSIM4wpdiblbGiven :1; unsigned BSIM4wfproutGiven :1; unsigned BSIM4wpditsGiven :1; unsigned BSIM4wpditsdGiven :1; unsigned BSIM4wpscbe1Given :1; unsigned BSIM4wpscbe2Given :1; unsigned BSIM4wpvagGiven :1; unsigned BSIM4wdeltaGiven :1; unsigned BSIM4wwrGiven :1; unsigned BSIM4wdwgGiven :1; unsigned BSIM4wdwbGiven :1; unsigned BSIM4wb0Given :1; unsigned BSIM4wb1Given :1; unsigned BSIM4walpha0Given :1; unsigned BSIM4walpha1Given :1; unsigned BSIM4wbeta0Given :1; unsigned BSIM4wvfbGiven :1; unsigned BSIM4wagidlGiven :1; unsigned BSIM4wbgidlGiven :1; unsigned BSIM4wcgidlGiven :1; unsigned BSIM4wegidlGiven :1; unsigned BSIM4wfgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4wkgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4wrgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4wagislGiven :1; unsigned BSIM4wbgislGiven :1; unsigned BSIM4wcgislGiven :1; unsigned BSIM4wegislGiven :1; unsigned BSIM4wfgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4wkgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4wrgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4waigcGiven :1; unsigned BSIM4wbigcGiven :1; unsigned BSIM4wcigcGiven :1; unsigned BSIM4waigsdGiven :1; unsigned BSIM4wbigsdGiven :1; unsigned BSIM4wcigsdGiven :1; unsigned BSIM4waigsGiven :1; unsigned BSIM4wbigsGiven :1; unsigned BSIM4wcigsGiven :1; unsigned BSIM4waigdGiven :1; unsigned BSIM4wbigdGiven :1; unsigned BSIM4wcigdGiven :1; unsigned BSIM4waigbaccGiven :1; unsigned BSIM4wbigbaccGiven :1; unsigned BSIM4wcigbaccGiven :1; unsigned BSIM4waigbinvGiven :1; unsigned BSIM4wbigbinvGiven :1; unsigned BSIM4wcigbinvGiven :1; unsigned BSIM4wnigcGiven :1; unsigned BSIM4wnigbinvGiven :1; unsigned BSIM4wnigbaccGiven :1; unsigned BSIM4wntoxGiven :1; unsigned BSIM4weigbinvGiven :1; unsigned BSIM4wpigcdGiven :1; unsigned BSIM4wpoxedgeGiven :1; unsigned BSIM4wxrcrg1Given :1; unsigned BSIM4wxrcrg2Given :1; unsigned BSIM4wlambdaGiven :1; unsigned BSIM4wvtlGiven :1; unsigned BSIM4wxnGiven :1; unsigned BSIM4wvfbsdoffGiven :1; unsigned BSIM4wtvfbsdoffGiven :1; /* CV model */ unsigned BSIM4wcgslGiven :1; unsigned BSIM4wcgdlGiven :1; unsigned BSIM4wckappasGiven :1; unsigned BSIM4wckappadGiven :1; unsigned BSIM4wcfGiven :1; unsigned BSIM4wclcGiven :1; unsigned BSIM4wcleGiven :1; unsigned BSIM4wvfbcvGiven :1; unsigned BSIM4wnoffGiven :1; unsigned BSIM4wvoffcvGiven :1; unsigned BSIM4wacdeGiven :1; unsigned BSIM4wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM4pcdscGiven :1; unsigned BSIM4pcdscbGiven :1; unsigned BSIM4pcdscdGiven :1; unsigned BSIM4pcitGiven :1; unsigned BSIM4pnfactorGiven :1; unsigned BSIM4pxjGiven :1; unsigned BSIM4pvsatGiven :1; unsigned BSIM4patGiven :1; unsigned BSIM4pa0Given :1; unsigned BSIM4pagsGiven :1; unsigned BSIM4pa1Given :1; unsigned BSIM4pa2Given :1; unsigned BSIM4pketaGiven :1; unsigned BSIM4pnsubGiven :1; unsigned BSIM4pndepGiven :1; unsigned BSIM4pnsdGiven :1; unsigned BSIM4pphinGiven :1; unsigned BSIM4pngateGiven :1; unsigned BSIM4pgamma1Given :1; unsigned BSIM4pgamma2Given :1; unsigned BSIM4pvbxGiven :1; unsigned BSIM4pvbmGiven :1; unsigned BSIM4pxtGiven :1; unsigned BSIM4pk1Given :1; unsigned BSIM4pkt1Given :1; unsigned BSIM4pkt1lGiven :1; unsigned BSIM4pkt2Given :1; unsigned BSIM4pk2Given :1; unsigned BSIM4pk3Given :1; unsigned BSIM4pk3bGiven :1; unsigned BSIM4pw0Given :1; unsigned BSIM4pdvtp0Given :1; unsigned BSIM4pdvtp1Given :1; unsigned BSIM4pdvtp2Given :1; /* New DIBL/Rout */ unsigned BSIM4pdvtp3Given :1; unsigned BSIM4pdvtp4Given :1; unsigned BSIM4pdvtp5Given :1; unsigned BSIM4plpe0Given :1; unsigned BSIM4plpebGiven :1; unsigned BSIM4pdvt0Given :1; unsigned BSIM4pdvt1Given :1; unsigned BSIM4pdvt2Given :1; unsigned BSIM4pdvt0wGiven :1; unsigned BSIM4pdvt1wGiven :1; unsigned BSIM4pdvt2wGiven :1; unsigned BSIM4pdroutGiven :1; unsigned BSIM4pdsubGiven :1; unsigned BSIM4pvth0Given :1; unsigned BSIM4puaGiven :1; unsigned BSIM4pua1Given :1; unsigned BSIM4pubGiven :1; unsigned BSIM4pub1Given :1; unsigned BSIM4pucGiven :1; unsigned BSIM4puc1Given :1; unsigned BSIM4pudGiven :1; unsigned BSIM4pud1Given :1; unsigned BSIM4pupGiven :1; unsigned BSIM4plpGiven :1; unsigned BSIM4pu0Given :1; unsigned BSIM4peuGiven :1; unsigned BSIM4pucsGiven :1; unsigned BSIM4puteGiven :1; unsigned BSIM4pucsteGiven :1; unsigned BSIM4pvoffGiven :1; unsigned BSIM4ptvoffGiven :1; unsigned BSIM4ptnfactorGiven :1; /* v4.7 Temp dep of leakage current */ unsigned BSIM4pteta0Given :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4ptvoffcvGiven :1; /* v4.7 temp dep of leakage current */ unsigned BSIM4pminvGiven :1; unsigned BSIM4pminvcvGiven :1; unsigned BSIM4prdswGiven :1; unsigned BSIM4prswGiven :1; unsigned BSIM4prdwGiven :1; unsigned BSIM4pprwgGiven :1; unsigned BSIM4pprwbGiven :1; unsigned BSIM4pprtGiven :1; unsigned BSIM4peta0Given :1; unsigned BSIM4petabGiven :1; unsigned BSIM4ppclmGiven :1; unsigned BSIM4ppdibl1Given :1; unsigned BSIM4ppdibl2Given :1; unsigned BSIM4ppdiblbGiven :1; unsigned BSIM4pfproutGiven :1; unsigned BSIM4ppditsGiven :1; unsigned BSIM4ppditsdGiven :1; unsigned BSIM4ppscbe1Given :1; unsigned BSIM4ppscbe2Given :1; unsigned BSIM4ppvagGiven :1; unsigned BSIM4pdeltaGiven :1; unsigned BSIM4pwrGiven :1; unsigned BSIM4pdwgGiven :1; unsigned BSIM4pdwbGiven :1; unsigned BSIM4pb0Given :1; unsigned BSIM4pb1Given :1; unsigned BSIM4palpha0Given :1; unsigned BSIM4palpha1Given :1; unsigned BSIM4pbeta0Given :1; unsigned BSIM4pvfbGiven :1; unsigned BSIM4pagidlGiven :1; unsigned BSIM4pbgidlGiven :1; unsigned BSIM4pcgidlGiven :1; unsigned BSIM4pegidlGiven :1; unsigned BSIM4pfgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4pkgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4prgidlGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4pagislGiven :1; unsigned BSIM4pbgislGiven :1; unsigned BSIM4pcgislGiven :1; unsigned BSIM4pegislGiven :1; unsigned BSIM4pfgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4pkgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4prgislGiven :1; /* v4.7 New GIDL/GISL */ unsigned BSIM4paigcGiven :1; unsigned BSIM4pbigcGiven :1; unsigned BSIM4pcigcGiven :1; unsigned BSIM4paigsdGiven :1; unsigned BSIM4pbigsdGiven :1; unsigned BSIM4pcigsdGiven :1; unsigned BSIM4paigsGiven :1; unsigned BSIM4pbigsGiven :1; unsigned BSIM4pcigsGiven :1; unsigned BSIM4paigdGiven :1; unsigned BSIM4pbigdGiven :1; unsigned BSIM4pcigdGiven :1; unsigned BSIM4paigbaccGiven :1; unsigned BSIM4pbigbaccGiven :1; unsigned BSIM4pcigbaccGiven :1; unsigned BSIM4paigbinvGiven :1; unsigned BSIM4pbigbinvGiven :1; unsigned BSIM4pcigbinvGiven :1; unsigned BSIM4pnigcGiven :1; unsigned BSIM4pnigbinvGiven :1; unsigned BSIM4pnigbaccGiven :1; unsigned BSIM4pntoxGiven :1; unsigned BSIM4peigbinvGiven :1; unsigned BSIM4ppigcdGiven :1; unsigned BSIM4ppoxedgeGiven :1; unsigned BSIM4pxrcrg1Given :1; unsigned BSIM4pxrcrg2Given :1; unsigned BSIM4plambdaGiven :1; unsigned BSIM4pvtlGiven :1; unsigned BSIM4pxnGiven :1; unsigned BSIM4pvfbsdoffGiven :1; unsigned BSIM4ptvfbsdoffGiven :1; /* CV model */ unsigned BSIM4pcgslGiven :1; unsigned BSIM4pcgdlGiven :1; unsigned BSIM4pckappasGiven :1; unsigned BSIM4pckappadGiven :1; unsigned BSIM4pcfGiven :1; unsigned BSIM4pclcGiven :1; unsigned BSIM4pcleGiven :1; unsigned BSIM4pvfbcvGiven :1; unsigned BSIM4pnoffGiven :1; unsigned BSIM4pvoffcvGiven :1; unsigned BSIM4pacdeGiven :1; unsigned BSIM4pmoinGiven :1; unsigned BSIM4useFringeGiven :1; unsigned BSIM4tnomGiven :1; unsigned BSIM4cgsoGiven :1; unsigned BSIM4cgdoGiven :1; unsigned BSIM4cgboGiven :1; unsigned BSIM4xpartGiven :1; unsigned BSIM4sheetResistanceGiven :1; unsigned BSIM4SjctSatCurDensityGiven :1; unsigned BSIM4SjctSidewallSatCurDensityGiven :1; unsigned BSIM4SjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4SbulkJctPotentialGiven :1; unsigned BSIM4SbulkJctBotGradingCoeffGiven :1; unsigned BSIM4SsidewallJctPotentialGiven :1; unsigned BSIM4SGatesidewallJctPotentialGiven :1; unsigned BSIM4SbulkJctSideGradingCoeffGiven :1; unsigned BSIM4SunitAreaJctCapGiven :1; unsigned BSIM4SunitLengthSidewallJctCapGiven :1; unsigned BSIM4SbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4SunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4SjctEmissionCoeffGiven :1; unsigned BSIM4SjctTempExponentGiven :1; unsigned BSIM4DjctSatCurDensityGiven :1; unsigned BSIM4DjctSidewallSatCurDensityGiven :1; unsigned BSIM4DjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4DbulkJctPotentialGiven :1; unsigned BSIM4DbulkJctBotGradingCoeffGiven :1; unsigned BSIM4DsidewallJctPotentialGiven :1; unsigned BSIM4DGatesidewallJctPotentialGiven :1; unsigned BSIM4DbulkJctSideGradingCoeffGiven :1; unsigned BSIM4DunitAreaJctCapGiven :1; unsigned BSIM4DunitLengthSidewallJctCapGiven :1; unsigned BSIM4DbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4DunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4DjctEmissionCoeffGiven :1; unsigned BSIM4DjctTempExponentGiven :1; unsigned BSIM4oxideTrapDensityAGiven :1; unsigned BSIM4oxideTrapDensityBGiven :1; unsigned BSIM4oxideTrapDensityCGiven :1; unsigned BSIM4emGiven :1; unsigned BSIM4efGiven :1; unsigned BSIM4afGiven :1; unsigned BSIM4kfGiven :1; unsigned BSIM4vgsMaxGiven :1; unsigned BSIM4vgdMaxGiven :1; unsigned BSIM4vgbMaxGiven :1; unsigned BSIM4vdsMaxGiven :1; unsigned BSIM4vbsMaxGiven :1; unsigned BSIM4vbdMaxGiven :1; unsigned BSIM4LintGiven :1; unsigned BSIM4LlGiven :1; unsigned BSIM4LlcGiven :1; unsigned BSIM4LlnGiven :1; unsigned BSIM4LwGiven :1; unsigned BSIM4LwcGiven :1; unsigned BSIM4LwnGiven :1; unsigned BSIM4LwlGiven :1; unsigned BSIM4LwlcGiven :1; unsigned BSIM4LminGiven :1; unsigned BSIM4LmaxGiven :1; unsigned BSIM4WintGiven :1; unsigned BSIM4WlGiven :1; unsigned BSIM4WlcGiven :1; unsigned BSIM4WlnGiven :1; unsigned BSIM4WwGiven :1; unsigned BSIM4WwcGiven :1; unsigned BSIM4WwnGiven :1; unsigned BSIM4WwlGiven :1; unsigned BSIM4WwlcGiven :1; unsigned BSIM4WminGiven :1; unsigned BSIM4WmaxGiven :1; /* added for stress effect */ unsigned BSIM4sarefGiven :1; unsigned BSIM4sbrefGiven :1; unsigned BSIM4wlodGiven :1; unsigned BSIM4ku0Given :1; unsigned BSIM4kvsatGiven :1; unsigned BSIM4kvth0Given :1; unsigned BSIM4tku0Given :1; unsigned BSIM4llodku0Given :1; unsigned BSIM4wlodku0Given :1; unsigned BSIM4llodvthGiven :1; unsigned BSIM4wlodvthGiven :1; unsigned BSIM4lku0Given :1; unsigned BSIM4wku0Given :1; unsigned BSIM4pku0Given :1; unsigned BSIM4lkvth0Given :1; unsigned BSIM4wkvth0Given :1; unsigned BSIM4pkvth0Given :1; unsigned BSIM4stk2Given :1; unsigned BSIM4lodk2Given :1; unsigned BSIM4steta0Given :1; unsigned BSIM4lodeta0Given :1; unsigned BSIM4webGiven :1; unsigned BSIM4wecGiven :1; unsigned BSIM4kvth0weGiven :1; unsigned BSIM4k2weGiven :1; unsigned BSIM4ku0weGiven :1; unsigned BSIM4screfGiven :1; unsigned BSIM4wpemodGiven :1; unsigned BSIM4lkvth0weGiven :1; unsigned BSIM4lk2weGiven :1; unsigned BSIM4lku0weGiven :1; unsigned BSIM4wkvth0weGiven :1; unsigned BSIM4wk2weGiven :1; unsigned BSIM4wku0weGiven :1; unsigned BSIM4pkvth0weGiven :1; unsigned BSIM4pk2weGiven :1; unsigned BSIM4pku0weGiven :1; } BSIM4model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* Instance parameters */ #define BSIM4_W 1 #define BSIM4_L 2 #define BSIM4_AS 3 #define BSIM4_AD 4 #define BSIM4_PS 5 #define BSIM4_PD 6 #define BSIM4_NRS 7 #define BSIM4_NRD 8 #define BSIM4_OFF 9 #define BSIM4_IC 10 #define BSIM4_IC_VDS 11 #define BSIM4_IC_VGS 12 #define BSIM4_IC_VBS 13 #define BSIM4_TRNQSMOD 14 #define BSIM4_RBODYMOD 15 #define BSIM4_RGATEMOD 16 #define BSIM4_GEOMOD 17 #define BSIM4_RGEOMOD 18 #define BSIM4_NF 19 #define BSIM4_MIN 20 #define BSIM4_ACNQSMOD 22 #define BSIM4_RBDB 23 #define BSIM4_RBSB 24 #define BSIM4_RBPB 25 #define BSIM4_RBPS 26 #define BSIM4_RBPD 27 #define BSIM4_SA 28 #define BSIM4_SB 29 #define BSIM4_SD 30 #define BSIM4_DELVTO 31 #define BSIM4_XGW 32 #define BSIM4_NGCON 33 #define BSIM4_SCA 34 #define BSIM4_SCB 35 #define BSIM4_SCC 36 #define BSIM4_SC 37 #define BSIM4_M 38 /* Global parameters */ #define BSIM4_MOD_TEMPEOT 65 #define BSIM4_MOD_LEFFEOT 66 #define BSIM4_MOD_WEFFEOT 67 #define BSIM4_MOD_UCSTE 68 #define BSIM4_MOD_LUCSTE 69 #define BSIM4_MOD_WUCSTE 70 #define BSIM4_MOD_PUCSTE 71 #define BSIM4_MOD_UCS 72 #define BSIM4_MOD_LUCS 73 #define BSIM4_MOD_WUCS 74 #define BSIM4_MOD_PUCS 75 #define BSIM4_MOD_CVCHARGEMOD 76 #define BSIM4_MOD_ADOS 77 #define BSIM4_MOD_BDOS 78 #define BSIM4_MOD_TEMPMOD 79 #define BSIM4_MOD_MTRLMOD 80 #define BSIM4_MOD_IGCMOD 81 #define BSIM4_MOD_IGBMOD 82 #define BSIM4_MOD_ACNQSMOD 83 #define BSIM4_MOD_FNOIMOD 84 #define BSIM4_MOD_RDSMOD 85 #define BSIM4_MOD_DIOMOD 86 #define BSIM4_MOD_PERMOD 87 #define BSIM4_MOD_GEOMOD 88 #define BSIM4_MOD_RGEOMOD 89 #define BSIM4_MOD_RGATEMOD 90 #define BSIM4_MOD_RBODYMOD 91 #define BSIM4_MOD_CAPMOD 92 #define BSIM4_MOD_TRNQSMOD 93 #define BSIM4_MOD_MOBMOD 94 #define BSIM4_MOD_TNOIMOD 95 #define BSIM4_MOD_EOT 96 #define BSIM4_MOD_VDDEOT 97 #define BSIM4_MOD_TOXE 98 #define BSIM4_MOD_CDSC 99 #define BSIM4_MOD_CDSCB 100 #define BSIM4_MOD_CIT 101 #define BSIM4_MOD_NFACTOR 102 #define BSIM4_MOD_XJ 103 #define BSIM4_MOD_VSAT 104 #define BSIM4_MOD_AT 105 #define BSIM4_MOD_A0 106 #define BSIM4_MOD_A1 107 #define BSIM4_MOD_A2 108 #define BSIM4_MOD_KETA 109 #define BSIM4_MOD_NSUB 110 #define BSIM4_MOD_PHIG 111 #define BSIM4_MOD_EPSRGATE 112 #define BSIM4_MOD_EASUB 113 #define BSIM4_MOD_EPSRSUB 114 #define BSIM4_MOD_NI0SUB 115 #define BSIM4_MOD_BG0SUB 116 #define BSIM4_MOD_TBGASUB 117 #define BSIM4_MOD_TBGBSUB 118 #define BSIM4_MOD_NDEP 119 #define BSIM4_MOD_NGATE 120 #define BSIM4_MOD_GAMMA1 121 #define BSIM4_MOD_GAMMA2 122 #define BSIM4_MOD_VBX 123 #define BSIM4_MOD_BINUNIT 124 #define BSIM4_MOD_VBM 125 #define BSIM4_MOD_XT 126 #define BSIM4_MOD_K1 129 #define BSIM4_MOD_KT1 130 #define BSIM4_MOD_KT1L 131 #define BSIM4_MOD_K2 132 #define BSIM4_MOD_KT2 133 #define BSIM4_MOD_K3 134 #define BSIM4_MOD_K3B 135 #define BSIM4_MOD_W0 136 #define BSIM4_MOD_LPE0 137 #define BSIM4_MOD_DVT0 138 #define BSIM4_MOD_DVT1 139 #define BSIM4_MOD_DVT2 140 #define BSIM4_MOD_DVT0W 141 #define BSIM4_MOD_DVT1W 142 #define BSIM4_MOD_DVT2W 143 #define BSIM4_MOD_DROUT 144 #define BSIM4_MOD_DSUB 145 #define BSIM4_MOD_VTH0 146 #define BSIM4_MOD_UA 147 #define BSIM4_MOD_UA1 148 #define BSIM4_MOD_UB 149 #define BSIM4_MOD_UB1 150 #define BSIM4_MOD_UC 151 #define BSIM4_MOD_UC1 152 #define BSIM4_MOD_U0 153 #define BSIM4_MOD_UTE 154 #define BSIM4_MOD_VOFF 155 #define BSIM4_MOD_DELTA 156 #define BSIM4_MOD_RDSW 157 #define BSIM4_MOD_PRT 158 #define BSIM4_MOD_LDD 159 #define BSIM4_MOD_ETA 160 #define BSIM4_MOD_ETA0 161 #define BSIM4_MOD_ETAB 162 #define BSIM4_MOD_PCLM 163 #define BSIM4_MOD_PDIBL1 164 #define BSIM4_MOD_PDIBL2 165 #define BSIM4_MOD_PSCBE1 166 #define BSIM4_MOD_PSCBE2 167 #define BSIM4_MOD_PVAG 168 #define BSIM4_MOD_WR 169 #define BSIM4_MOD_DWG 170 #define BSIM4_MOD_DWB 171 #define BSIM4_MOD_B0 172 #define BSIM4_MOD_B1 173 #define BSIM4_MOD_ALPHA0 174 #define BSIM4_MOD_BETA0 175 #define BSIM4_MOD_PDIBLB 178 #define BSIM4_MOD_PRWG 179 #define BSIM4_MOD_PRWB 180 #define BSIM4_MOD_CDSCD 181 #define BSIM4_MOD_AGS 182 #define BSIM4_MOD_FRINGE 184 #define BSIM4_MOD_CGSL 186 #define BSIM4_MOD_CGDL 187 #define BSIM4_MOD_CKAPPAS 188 #define BSIM4_MOD_CF 189 #define BSIM4_MOD_CLC 190 #define BSIM4_MOD_CLE 191 #define BSIM4_MOD_PARAMCHK 192 #define BSIM4_MOD_VERSION 193 #define BSIM4_MOD_VFBCV 194 #define BSIM4_MOD_ACDE 195 #define BSIM4_MOD_MOIN 196 #define BSIM4_MOD_NOFF 197 #define BSIM4_MOD_IJTHDFWD 198 #define BSIM4_MOD_ALPHA1 199 #define BSIM4_MOD_VFB 200 #define BSIM4_MOD_TOXM 201 #define BSIM4_MOD_TCJ 202 #define BSIM4_MOD_TCJSW 203 #define BSIM4_MOD_TCJSWG 204 #define BSIM4_MOD_TPB 205 #define BSIM4_MOD_TPBSW 206 #define BSIM4_MOD_TPBSWG 207 #define BSIM4_MOD_VOFFCV 208 #define BSIM4_MOD_GBMIN 209 #define BSIM4_MOD_RBDB 210 #define BSIM4_MOD_RBSB 211 #define BSIM4_MOD_RBPB 212 #define BSIM4_MOD_RBPS 213 #define BSIM4_MOD_RBPD 214 #define BSIM4_MOD_DMCG 215 #define BSIM4_MOD_DMCI 216 #define BSIM4_MOD_DMDG 217 #define BSIM4_MOD_XGW 218 #define BSIM4_MOD_XGL 219 #define BSIM4_MOD_RSHG 220 #define BSIM4_MOD_NGCON 221 #define BSIM4_MOD_AGIDL 222 #define BSIM4_MOD_BGIDL 223 #define BSIM4_MOD_EGIDL 224 #define BSIM4_MOD_IJTHSFWD 225 #define BSIM4_MOD_XJBVD 226 #define BSIM4_MOD_XJBVS 227 #define BSIM4_MOD_BVD 228 #define BSIM4_MOD_BVS 229 #define BSIM4_MOD_TOXP 230 #define BSIM4_MOD_DTOX 231 #define BSIM4_MOD_XRCRG1 232 #define BSIM4_MOD_XRCRG2 233 #define BSIM4_MOD_EU 234 #define BSIM4_MOD_IJTHSREV 235 #define BSIM4_MOD_IJTHDREV 236 #define BSIM4_MOD_MINV 237 #define BSIM4_MOD_VOFFL 238 #define BSIM4_MOD_PDITS 239 #define BSIM4_MOD_PDITSD 240 #define BSIM4_MOD_PDITSL 241 #define BSIM4_MOD_TNOIA 242 #define BSIM4_MOD_TNOIB 243 #define BSIM4_MOD_NTNOI 244 #define BSIM4_MOD_FPROUT 245 #define BSIM4_MOD_LPEB 246 #define BSIM4_MOD_DVTP0 247 #define BSIM4_MOD_DVTP1 248 #define BSIM4_MOD_CGIDL 249 #define BSIM4_MOD_PHIN 250 #define BSIM4_MOD_RDSWMIN 251 #define BSIM4_MOD_RSW 252 #define BSIM4_MOD_RDW 253 #define BSIM4_MOD_RDWMIN 254 #define BSIM4_MOD_RSWMIN 255 #define BSIM4_MOD_NSD 256 #define BSIM4_MOD_CKAPPAD 257 #define BSIM4_MOD_DMCGT 258 #define BSIM4_MOD_AIGC 259 #define BSIM4_MOD_BIGC 260 #define BSIM4_MOD_CIGC 261 #define BSIM4_MOD_AIGBACC 262 #define BSIM4_MOD_BIGBACC 263 #define BSIM4_MOD_CIGBACC 264 #define BSIM4_MOD_AIGBINV 265 #define BSIM4_MOD_BIGBINV 266 #define BSIM4_MOD_CIGBINV 267 #define BSIM4_MOD_NIGC 268 #define BSIM4_MOD_NIGBACC 269 #define BSIM4_MOD_NIGBINV 270 #define BSIM4_MOD_NTOX 271 #define BSIM4_MOD_TOXREF 272 #define BSIM4_MOD_EIGBINV 273 #define BSIM4_MOD_PIGCD 274 #define BSIM4_MOD_POXEDGE 275 #define BSIM4_MOD_EPSROX 276 #define BSIM4_MOD_AIGSD 277 #define BSIM4_MOD_BIGSD 278 #define BSIM4_MOD_CIGSD 279 #define BSIM4_MOD_JSWGS 280 #define BSIM4_MOD_JSWGD 281 #define BSIM4_MOD_LAMBDA 282 #define BSIM4_MOD_VTL 283 #define BSIM4_MOD_LC 284 #define BSIM4_MOD_XN 285 #define BSIM4_MOD_RNOIA 286 #define BSIM4_MOD_RNOIB 287 #define BSIM4_MOD_VFBSDOFF 288 #define BSIM4_MOD_LINTNOI 289 #define BSIM4_MOD_UD 290 #define BSIM4_MOD_UD1 291 #define BSIM4_MOD_UP 292 #define BSIM4_MOD_LP 293 #define BSIM4_MOD_TVOFF 294 #define BSIM4_MOD_TVFBSDOFF 295 #define BSIM4_MOD_MINVCV 296 #define BSIM4_MOD_VOFFCVL 297 #define BSIM4_MOD_MTRLCOMPATMOD 380 /* Length dependence */ #define BSIM4_MOD_LCDSC 301 #define BSIM4_MOD_LCDSCB 302 #define BSIM4_MOD_LCIT 303 #define BSIM4_MOD_LNFACTOR 304 #define BSIM4_MOD_LXJ 305 #define BSIM4_MOD_LVSAT 306 #define BSIM4_MOD_LAT 307 #define BSIM4_MOD_LA0 308 #define BSIM4_MOD_LA1 309 #define BSIM4_MOD_LA2 310 #define BSIM4_MOD_LKETA 311 #define BSIM4_MOD_LNSUB 312 #define BSIM4_MOD_LNDEP 313 #define BSIM4_MOD_LNGATE 315 #define BSIM4_MOD_LGAMMA1 316 #define BSIM4_MOD_LGAMMA2 317 #define BSIM4_MOD_LVBX 318 #define BSIM4_MOD_LVBM 320 #define BSIM4_MOD_LXT 322 #define BSIM4_MOD_LK1 325 #define BSIM4_MOD_LKT1 326 #define BSIM4_MOD_LKT1L 327 #define BSIM4_MOD_LK2 328 #define BSIM4_MOD_LKT2 329 #define BSIM4_MOD_LK3 330 #define BSIM4_MOD_LK3B 331 #define BSIM4_MOD_LW0 332 #define BSIM4_MOD_LLPE0 333 #define BSIM4_MOD_LDVT0 334 #define BSIM4_MOD_LDVT1 335 #define BSIM4_MOD_LDVT2 336 #define BSIM4_MOD_LDVT0W 337 #define BSIM4_MOD_LDVT1W 338 #define BSIM4_MOD_LDVT2W 339 #define BSIM4_MOD_LDROUT 340 #define BSIM4_MOD_LDSUB 341 #define BSIM4_MOD_LVTH0 342 #define BSIM4_MOD_LUA 343 #define BSIM4_MOD_LUA1 344 #define BSIM4_MOD_LUB 345 #define BSIM4_MOD_LUB1 346 #define BSIM4_MOD_LUC 347 #define BSIM4_MOD_LUC1 348 #define BSIM4_MOD_LU0 349 #define BSIM4_MOD_LUTE 350 #define BSIM4_MOD_LVOFF 351 #define BSIM4_MOD_LDELTA 352 #define BSIM4_MOD_LRDSW 353 #define BSIM4_MOD_LPRT 354 #define BSIM4_MOD_LLDD 355 #define BSIM4_MOD_LETA 356 #define BSIM4_MOD_LETA0 357 #define BSIM4_MOD_LETAB 358 #define BSIM4_MOD_LPCLM 359 #define BSIM4_MOD_LPDIBL1 360 #define BSIM4_MOD_LPDIBL2 361 #define BSIM4_MOD_LPSCBE1 362 #define BSIM4_MOD_LPSCBE2 363 #define BSIM4_MOD_LPVAG 364 #define BSIM4_MOD_LWR 365 #define BSIM4_MOD_LDWG 366 #define BSIM4_MOD_LDWB 367 #define BSIM4_MOD_LB0 368 #define BSIM4_MOD_LB1 369 #define BSIM4_MOD_LALPHA0 370 #define BSIM4_MOD_LBETA0 371 #define BSIM4_MOD_LPDIBLB 374 #define BSIM4_MOD_LPRWG 375 #define BSIM4_MOD_LPRWB 376 #define BSIM4_MOD_LCDSCD 377 #define BSIM4_MOD_LAGS 378 #define BSIM4_MOD_LFRINGE 381 #define BSIM4_MOD_LCGSL 383 #define BSIM4_MOD_LCGDL 384 #define BSIM4_MOD_LCKAPPAS 385 #define BSIM4_MOD_LCF 386 #define BSIM4_MOD_LCLC 387 #define BSIM4_MOD_LCLE 388 #define BSIM4_MOD_LVFBCV 389 #define BSIM4_MOD_LACDE 390 #define BSIM4_MOD_LMOIN 391 #define BSIM4_MOD_LNOFF 392 #define BSIM4_MOD_LALPHA1 394 #define BSIM4_MOD_LVFB 395 #define BSIM4_MOD_LVOFFCV 396 #define BSIM4_MOD_LAGIDL 397 #define BSIM4_MOD_LBGIDL 398 #define BSIM4_MOD_LEGIDL 399 #define BSIM4_MOD_LXRCRG1 400 #define BSIM4_MOD_LXRCRG2 401 #define BSIM4_MOD_LEU 402 #define BSIM4_MOD_LMINV 403 #define BSIM4_MOD_LPDITS 404 #define BSIM4_MOD_LPDITSD 405 #define BSIM4_MOD_LFPROUT 406 #define BSIM4_MOD_LLPEB 407 #define BSIM4_MOD_LDVTP0 408 #define BSIM4_MOD_LDVTP1 409 #define BSIM4_MOD_LCGIDL 410 #define BSIM4_MOD_LPHIN 411 #define BSIM4_MOD_LRSW 412 #define BSIM4_MOD_LRDW 413 #define BSIM4_MOD_LNSD 414 #define BSIM4_MOD_LCKAPPAD 415 #define BSIM4_MOD_LAIGC 416 #define BSIM4_MOD_LBIGC 417 #define BSIM4_MOD_LCIGC 418 #define BSIM4_MOD_LAIGBACC 419 #define BSIM4_MOD_LBIGBACC 420 #define BSIM4_MOD_LCIGBACC 421 #define BSIM4_MOD_LAIGBINV 422 #define BSIM4_MOD_LBIGBINV 423 #define BSIM4_MOD_LCIGBINV 424 #define BSIM4_MOD_LNIGC 425 #define BSIM4_MOD_LNIGBACC 426 #define BSIM4_MOD_LNIGBINV 427 #define BSIM4_MOD_LNTOX 428 #define BSIM4_MOD_LEIGBINV 429 #define BSIM4_MOD_LPIGCD 430 #define BSIM4_MOD_LPOXEDGE 431 #define BSIM4_MOD_LAIGSD 432 #define BSIM4_MOD_LBIGSD 433 #define BSIM4_MOD_LCIGSD 434 #define BSIM4_MOD_LLAMBDA 435 #define BSIM4_MOD_LVTL 436 #define BSIM4_MOD_LXN 437 #define BSIM4_MOD_LVFBSDOFF 438 #define BSIM4_MOD_LUD 439 #define BSIM4_MOD_LUD1 440 #define BSIM4_MOD_LUP 441 #define BSIM4_MOD_LLP 442 #define BSIM4_MOD_LMINVCV 443 #define BSIM4_MOD_FGIDL 444 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_KGIDL 445 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_RGIDL 446 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_FGISL 447 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_KGISL 448 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_RGISL 449 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LFGIDL 450 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LKGIDL 451 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LRGIDL 452 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LFGISL 453 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LKGISL 454 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_LRGISL 455 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WFGIDL 456 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WKGIDL 457 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WRGIDL 458 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WFGISL 459 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WKGISL 460 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_WRGISL 461 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PFGIDL 462 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PKGIDL 463 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PRGIDL 464 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PFGISL 465 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PKGISL 466 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_PRGISL 467 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_GIDLMOD 379 /* v4.7 New GIDL/GISL*/ #define BSIM4_MOD_DVTP2 468 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_DVTP3 469 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_DVTP4 470 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_DVTP5 471 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_LDVTP2 472 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_LDVTP3 473 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_LDVTP4 474 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_LDVTP5 475 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_WDVTP2 476 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_WDVTP3 477 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_WDVTP4 478 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_WDVTP5 479 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_PDVTP2 480 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_PDVTP3 298 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_PDVTP4 299 /* v4.7 NEW DIBL/Rout*/ #define BSIM4_MOD_PDVTP5 300 /* v4.7 NEW DIBL/Rout*/ /* Width dependence */ #define BSIM4_MOD_WCDSC 481 #define BSIM4_MOD_WCDSCB 482 #define BSIM4_MOD_WCIT 483 #define BSIM4_MOD_WNFACTOR 484 #define BSIM4_MOD_WXJ 485 #define BSIM4_MOD_WVSAT 486 #define BSIM4_MOD_WAT 487 #define BSIM4_MOD_WA0 488 #define BSIM4_MOD_WA1 489 #define BSIM4_MOD_WA2 490 #define BSIM4_MOD_WKETA 491 #define BSIM4_MOD_WNSUB 492 #define BSIM4_MOD_WNDEP 493 #define BSIM4_MOD_WNGATE 495 #define BSIM4_MOD_WGAMMA1 496 #define BSIM4_MOD_WGAMMA2 497 #define BSIM4_MOD_WVBX 498 #define BSIM4_MOD_WVBM 500 #define BSIM4_MOD_WXT 502 #define BSIM4_MOD_WK1 505 #define BSIM4_MOD_WKT1 506 #define BSIM4_MOD_WKT1L 507 #define BSIM4_MOD_WK2 508 #define BSIM4_MOD_WKT2 509 #define BSIM4_MOD_WK3 510 #define BSIM4_MOD_WK3B 511 #define BSIM4_MOD_WW0 512 #define BSIM4_MOD_WLPE0 513 #define BSIM4_MOD_WDVT0 514 #define BSIM4_MOD_WDVT1 515 #define BSIM4_MOD_WDVT2 516 #define BSIM4_MOD_WDVT0W 517 #define BSIM4_MOD_WDVT1W 518 #define BSIM4_MOD_WDVT2W 519 #define BSIM4_MOD_WDROUT 520 #define BSIM4_MOD_WDSUB 521 #define BSIM4_MOD_WVTH0 522 #define BSIM4_MOD_WUA 523 #define BSIM4_MOD_WUA1 524 #define BSIM4_MOD_WUB 525 #define BSIM4_MOD_WUB1 526 #define BSIM4_MOD_WUC 527 #define BSIM4_MOD_WUC1 528 #define BSIM4_MOD_WU0 529 #define BSIM4_MOD_WUTE 530 #define BSIM4_MOD_WVOFF 531 #define BSIM4_MOD_WDELTA 532 #define BSIM4_MOD_WRDSW 533 #define BSIM4_MOD_WPRT 534 #define BSIM4_MOD_WLDD 535 #define BSIM4_MOD_WETA 536 #define BSIM4_MOD_WETA0 537 #define BSIM4_MOD_WETAB 538 #define BSIM4_MOD_WPCLM 539 #define BSIM4_MOD_WPDIBL1 540 #define BSIM4_MOD_WPDIBL2 541 #define BSIM4_MOD_WPSCBE1 542 #define BSIM4_MOD_WPSCBE2 543 #define BSIM4_MOD_WPVAG 544 #define BSIM4_MOD_WWR 545 #define BSIM4_MOD_WDWG 546 #define BSIM4_MOD_WDWB 547 #define BSIM4_MOD_WB0 548 #define BSIM4_MOD_WB1 549 #define BSIM4_MOD_WALPHA0 550 #define BSIM4_MOD_WBETA0 551 #define BSIM4_MOD_WPDIBLB 554 #define BSIM4_MOD_WPRWG 555 #define BSIM4_MOD_WPRWB 556 #define BSIM4_MOD_WCDSCD 557 #define BSIM4_MOD_WAGS 558 #define BSIM4_MOD_WFRINGE 561 #define BSIM4_MOD_WCGSL 563 #define BSIM4_MOD_WCGDL 564 #define BSIM4_MOD_WCKAPPAS 565 #define BSIM4_MOD_WCF 566 #define BSIM4_MOD_WCLC 567 #define BSIM4_MOD_WCLE 568 #define BSIM4_MOD_WVFBCV 569 #define BSIM4_MOD_WACDE 570 #define BSIM4_MOD_WMOIN 571 #define BSIM4_MOD_WNOFF 572 #define BSIM4_MOD_WALPHA1 574 #define BSIM4_MOD_WVFB 575 #define BSIM4_MOD_WVOFFCV 576 #define BSIM4_MOD_WAGIDL 577 #define BSIM4_MOD_WBGIDL 578 #define BSIM4_MOD_WEGIDL 579 #define BSIM4_MOD_WXRCRG1 580 #define BSIM4_MOD_WXRCRG2 581 #define BSIM4_MOD_WEU 582 #define BSIM4_MOD_WMINV 583 #define BSIM4_MOD_WPDITS 584 #define BSIM4_MOD_WPDITSD 585 #define BSIM4_MOD_WFPROUT 586 #define BSIM4_MOD_WLPEB 587 #define BSIM4_MOD_WDVTP0 588 #define BSIM4_MOD_WDVTP1 589 #define BSIM4_MOD_WCGIDL 590 #define BSIM4_MOD_WPHIN 591 #define BSIM4_MOD_WRSW 592 #define BSIM4_MOD_WRDW 593 #define BSIM4_MOD_WNSD 594 #define BSIM4_MOD_WCKAPPAD 595 #define BSIM4_MOD_WAIGC 596 #define BSIM4_MOD_WBIGC 597 #define BSIM4_MOD_WCIGC 598 #define BSIM4_MOD_WAIGBACC 599 #define BSIM4_MOD_WBIGBACC 600 #define BSIM4_MOD_WCIGBACC 601 #define BSIM4_MOD_WAIGBINV 602 #define BSIM4_MOD_WBIGBINV 603 #define BSIM4_MOD_WCIGBINV 604 #define BSIM4_MOD_WNIGC 605 #define BSIM4_MOD_WNIGBACC 606 #define BSIM4_MOD_WNIGBINV 607 #define BSIM4_MOD_WNTOX 608 #define BSIM4_MOD_WEIGBINV 609 #define BSIM4_MOD_WPIGCD 610 #define BSIM4_MOD_WPOXEDGE 611 #define BSIM4_MOD_WAIGSD 612 #define BSIM4_MOD_WBIGSD 613 #define BSIM4_MOD_WCIGSD 614 #define BSIM4_MOD_WLAMBDA 615 #define BSIM4_MOD_WVTL 616 #define BSIM4_MOD_WXN 617 #define BSIM4_MOD_WVFBSDOFF 618 #define BSIM4_MOD_WUD 619 #define BSIM4_MOD_WUD1 620 #define BSIM4_MOD_WUP 621 #define BSIM4_MOD_WLP 622 #define BSIM4_MOD_WMINVCV 623 /* Cross-term dependence */ #define BSIM4_MOD_PCDSC 661 #define BSIM4_MOD_PCDSCB 662 #define BSIM4_MOD_PCIT 663 #define BSIM4_MOD_PNFACTOR 664 #define BSIM4_MOD_PXJ 665 #define BSIM4_MOD_PVSAT 666 #define BSIM4_MOD_PAT 667 #define BSIM4_MOD_PA0 668 #define BSIM4_MOD_PA1 669 #define BSIM4_MOD_PA2 670 #define BSIM4_MOD_PKETA 671 #define BSIM4_MOD_PNSUB 672 #define BSIM4_MOD_PNDEP 673 #define BSIM4_MOD_PNGATE 675 #define BSIM4_MOD_PGAMMA1 676 #define BSIM4_MOD_PGAMMA2 677 #define BSIM4_MOD_PVBX 678 #define BSIM4_MOD_PVBM 680 #define BSIM4_MOD_PXT 682 #define BSIM4_MOD_PK1 685 #define BSIM4_MOD_PKT1 686 #define BSIM4_MOD_PKT1L 687 #define BSIM4_MOD_PK2 688 #define BSIM4_MOD_PKT2 689 #define BSIM4_MOD_PK3 690 #define BSIM4_MOD_PK3B 691 #define BSIM4_MOD_PW0 692 #define BSIM4_MOD_PLPE0 693 #define BSIM4_MOD_PDVT0 694 #define BSIM4_MOD_PDVT1 695 #define BSIM4_MOD_PDVT2 696 #define BSIM4_MOD_PDVT0W 697 #define BSIM4_MOD_PDVT1W 698 #define BSIM4_MOD_PDVT2W 699 #define BSIM4_MOD_PDROUT 700 #define BSIM4_MOD_PDSUB 701 #define BSIM4_MOD_PVTH0 702 #define BSIM4_MOD_PUA 703 #define BSIM4_MOD_PUA1 704 #define BSIM4_MOD_PUB 705 #define BSIM4_MOD_PUB1 706 #define BSIM4_MOD_PUC 707 #define BSIM4_MOD_PUC1 708 #define BSIM4_MOD_PU0 709 #define BSIM4_MOD_PUTE 710 #define BSIM4_MOD_PVOFF 711 #define BSIM4_MOD_PDELTA 712 #define BSIM4_MOD_PRDSW 713 #define BSIM4_MOD_PPRT 714 #define BSIM4_MOD_PLDD 715 #define BSIM4_MOD_PETA 716 #define BSIM4_MOD_PETA0 717 #define BSIM4_MOD_PETAB 718 #define BSIM4_MOD_PPCLM 719 #define BSIM4_MOD_PPDIBL1 720 #define BSIM4_MOD_PPDIBL2 721 #define BSIM4_MOD_PPSCBE1 722 #define BSIM4_MOD_PPSCBE2 723 #define BSIM4_MOD_PPVAG 724 #define BSIM4_MOD_PWR 725 #define BSIM4_MOD_PDWG 726 #define BSIM4_MOD_PDWB 727 #define BSIM4_MOD_PB0 728 #define BSIM4_MOD_PB1 729 #define BSIM4_MOD_PALPHA0 730 #define BSIM4_MOD_PBETA0 731 #define BSIM4_MOD_PPDIBLB 734 #define BSIM4_MOD_PPRWG 735 #define BSIM4_MOD_PPRWB 736 #define BSIM4_MOD_PCDSCD 737 #define BSIM4_MOD_PAGS 738 #define BSIM4_MOD_PFRINGE 741 #define BSIM4_MOD_PCGSL 743 #define BSIM4_MOD_PCGDL 744 #define BSIM4_MOD_PCKAPPAS 745 #define BSIM4_MOD_PCF 746 #define BSIM4_MOD_PCLC 747 #define BSIM4_MOD_PCLE 748 #define BSIM4_MOD_PVFBCV 749 #define BSIM4_MOD_PACDE 750 #define BSIM4_MOD_PMOIN 751 #define BSIM4_MOD_PNOFF 752 #define BSIM4_MOD_PALPHA1 754 #define BSIM4_MOD_PVFB 755 #define BSIM4_MOD_PVOFFCV 756 #define BSIM4_MOD_PAGIDL 757 #define BSIM4_MOD_PBGIDL 758 #define BSIM4_MOD_PEGIDL 759 #define BSIM4_MOD_PXRCRG1 760 #define BSIM4_MOD_PXRCRG2 761 #define BSIM4_MOD_PEU 762 #define BSIM4_MOD_PMINV 763 #define BSIM4_MOD_PPDITS 764 #define BSIM4_MOD_PPDITSD 765 #define BSIM4_MOD_PFPROUT 766 #define BSIM4_MOD_PLPEB 767 #define BSIM4_MOD_PDVTP0 768 #define BSIM4_MOD_PDVTP1 769 #define BSIM4_MOD_PCGIDL 770 #define BSIM4_MOD_PPHIN 771 #define BSIM4_MOD_PRSW 772 #define BSIM4_MOD_PRDW 773 #define BSIM4_MOD_PNSD 774 #define BSIM4_MOD_PCKAPPAD 775 #define BSIM4_MOD_PAIGC 776 #define BSIM4_MOD_PBIGC 777 #define BSIM4_MOD_PCIGC 778 #define BSIM4_MOD_PAIGBACC 779 #define BSIM4_MOD_PBIGBACC 780 #define BSIM4_MOD_PCIGBACC 781 #define BSIM4_MOD_PAIGBINV 782 #define BSIM4_MOD_PBIGBINV 783 #define BSIM4_MOD_PCIGBINV 784 #define BSIM4_MOD_PNIGC 785 #define BSIM4_MOD_PNIGBACC 786 #define BSIM4_MOD_PNIGBINV 787 #define BSIM4_MOD_PNTOX 788 #define BSIM4_MOD_PEIGBINV 789 #define BSIM4_MOD_PPIGCD 790 #define BSIM4_MOD_PPOXEDGE 791 #define BSIM4_MOD_PAIGSD 792 #define BSIM4_MOD_PBIGSD 793 #define BSIM4_MOD_PCIGSD 794 #define BSIM4_MOD_SAREF 795 #define BSIM4_MOD_SBREF 796 #define BSIM4_MOD_KU0 797 #define BSIM4_MOD_KVSAT 798 #define BSIM4_MOD_TKU0 799 #define BSIM4_MOD_LLODKU0 800 #define BSIM4_MOD_WLODKU0 801 #define BSIM4_MOD_LLODVTH 802 #define BSIM4_MOD_WLODVTH 803 #define BSIM4_MOD_LKU0 804 #define BSIM4_MOD_WKU0 805 #define BSIM4_MOD_PKU0 806 #define BSIM4_MOD_KVTH0 807 #define BSIM4_MOD_LKVTH0 808 #define BSIM4_MOD_WKVTH0 809 #define BSIM4_MOD_PKVTH0 810 #define BSIM4_MOD_WLOD 811 #define BSIM4_MOD_STK2 812 #define BSIM4_MOD_LODK2 813 #define BSIM4_MOD_STETA0 814 #define BSIM4_MOD_LODETA0 815 #define BSIM4_MOD_WEB 816 #define BSIM4_MOD_WEC 817 #define BSIM4_MOD_KVTH0WE 818 #define BSIM4_MOD_K2WE 819 #define BSIM4_MOD_KU0WE 820 #define BSIM4_MOD_SCREF 821 #define BSIM4_MOD_WPEMOD 822 #define BSIM4_MOD_PMINVCV 823 #define BSIM4_MOD_PLAMBDA 825 #define BSIM4_MOD_PVTL 826 #define BSIM4_MOD_PXN 827 #define BSIM4_MOD_PVFBSDOFF 828 #define BSIM4_MOD_TNOM 831 #define BSIM4_MOD_CGSO 832 #define BSIM4_MOD_CGDO 833 #define BSIM4_MOD_CGBO 834 #define BSIM4_MOD_XPART 835 #define BSIM4_MOD_RSH 836 #define BSIM4_MOD_JSS 837 #define BSIM4_MOD_PBS 838 #define BSIM4_MOD_MJS 839 #define BSIM4_MOD_PBSWS 840 #define BSIM4_MOD_MJSWS 841 #define BSIM4_MOD_CJS 842 #define BSIM4_MOD_CJSWS 843 #define BSIM4_MOD_NMOS 844 #define BSIM4_MOD_PMOS 845 #define BSIM4_MOD_NOIA 846 #define BSIM4_MOD_NOIB 847 #define BSIM4_MOD_NOIC 848 #define BSIM4_MOD_LINT 849 #define BSIM4_MOD_LL 850 #define BSIM4_MOD_LLN 851 #define BSIM4_MOD_LW 852 #define BSIM4_MOD_LWN 853 #define BSIM4_MOD_LWL 854 #define BSIM4_MOD_LMIN 855 #define BSIM4_MOD_LMAX 856 #define BSIM4_MOD_WINT 857 #define BSIM4_MOD_WL 858 #define BSIM4_MOD_WLN 859 #define BSIM4_MOD_WW 860 #define BSIM4_MOD_WWN 861 #define BSIM4_MOD_WWL 862 #define BSIM4_MOD_WMIN 863 #define BSIM4_MOD_WMAX 864 #define BSIM4_MOD_DWC 865 #define BSIM4_MOD_DLC 866 #define BSIM4_MOD_XL 867 #define BSIM4_MOD_XW 868 #define BSIM4_MOD_EM 869 #define BSIM4_MOD_EF 870 #define BSIM4_MOD_AF 871 #define BSIM4_MOD_KF 872 #define BSIM4_MOD_NJS 873 #define BSIM4_MOD_XTIS 874 #define BSIM4_MOD_PBSWGS 875 #define BSIM4_MOD_MJSWGS 876 #define BSIM4_MOD_CJSWGS 877 #define BSIM4_MOD_JSWS 878 #define BSIM4_MOD_LLC 879 #define BSIM4_MOD_LWC 880 #define BSIM4_MOD_LWLC 881 #define BSIM4_MOD_WLC 882 #define BSIM4_MOD_WWC 883 #define BSIM4_MOD_WWLC 884 #define BSIM4_MOD_DWJ 885 #define BSIM4_MOD_JSD 886 #define BSIM4_MOD_PBD 887 #define BSIM4_MOD_MJD 888 #define BSIM4_MOD_PBSWD 889 #define BSIM4_MOD_MJSWD 890 #define BSIM4_MOD_CJD 891 #define BSIM4_MOD_CJSWD 892 #define BSIM4_MOD_NJD 893 #define BSIM4_MOD_XTID 894 #define BSIM4_MOD_PBSWGD 895 #define BSIM4_MOD_MJSWGD 896 #define BSIM4_MOD_CJSWGD 897 #define BSIM4_MOD_JSWD 898 #define BSIM4_MOD_DLCIG 899 /* trap-assisted tunneling */ #define BSIM4_MOD_JTSS 900 #define BSIM4_MOD_JTSD 901 #define BSIM4_MOD_JTSSWS 902 #define BSIM4_MOD_JTSSWD 903 #define BSIM4_MOD_JTSSWGS 904 #define BSIM4_MOD_JTSSWGD 905 #define BSIM4_MOD_NJTS 906 #define BSIM4_MOD_NJTSSW 907 #define BSIM4_MOD_NJTSSWG 908 #define BSIM4_MOD_XTSS 909 #define BSIM4_MOD_XTSD 910 #define BSIM4_MOD_XTSSWS 911 #define BSIM4_MOD_XTSSWD 912 #define BSIM4_MOD_XTSSWGS 913 #define BSIM4_MOD_XTSSWGD 914 #define BSIM4_MOD_TNJTS 915 #define BSIM4_MOD_TNJTSSW 916 #define BSIM4_MOD_TNJTSSWG 917 #define BSIM4_MOD_VTSS 918 #define BSIM4_MOD_VTSD 919 #define BSIM4_MOD_VTSSWS 920 #define BSIM4_MOD_VTSSWD 921 #define BSIM4_MOD_VTSSWGS 922 #define BSIM4_MOD_VTSSWGD 923 #define BSIM4_MOD_PUD 924 #define BSIM4_MOD_PUD1 925 #define BSIM4_MOD_PUP 926 #define BSIM4_MOD_PLP 927 #define BSIM4_MOD_JTWEFF 928 /* device questions */ #define BSIM4_DNODE 945 #define BSIM4_GNODEEXT 946 #define BSIM4_SNODE 947 #define BSIM4_BNODE 948 #define BSIM4_DNODEPRIME 949 #define BSIM4_GNODEPRIME 950 #define BSIM4_GNODEMIDE 951 #define BSIM4_GNODEMID 952 #define BSIM4_SNODEPRIME 953 #define BSIM4_BNODEPRIME 954 #define BSIM4_DBNODE 955 #define BSIM4_SBNODE 956 #define BSIM4_VBD 957 #define BSIM4_VBS 958 #define BSIM4_VGS 959 #define BSIM4_VDS 960 #define BSIM4_CD 961 #define BSIM4_CBS 962 #define BSIM4_CBD 963 #define BSIM4_GM 964 #define BSIM4_GDS 965 #define BSIM4_GMBS 966 #define BSIM4_GBD 967 #define BSIM4_GBS 968 #define BSIM4_QB 969 #define BSIM4_CQB 970 #define BSIM4_QG 971 #define BSIM4_CQG 972 #define BSIM4_QD 973 #define BSIM4_CQD 974 #define BSIM4_CGGB 975 #define BSIM4_CGDB 976 #define BSIM4_CGSB 977 #define BSIM4_CBGB 978 #define BSIM4_CAPBD 979 #define BSIM4_CQBD 980 #define BSIM4_CAPBS 981 #define BSIM4_CQBS 982 #define BSIM4_CDGB 983 #define BSIM4_CDDB 984 #define BSIM4_CDSB 985 #define BSIM4_VON 986 #define BSIM4_VDSAT 987 #define BSIM4_QBS 988 #define BSIM4_QBD 989 #define BSIM4_SOURCECONDUCT 990 #define BSIM4_DRAINCONDUCT 991 #define BSIM4_CBDB 992 #define BSIM4_CBSB 993 #define BSIM4_CSUB 994 #define BSIM4_QINV 995 #define BSIM4_IGIDL 996 #define BSIM4_CSGB 997 #define BSIM4_CSDB 998 #define BSIM4_CSSB 999 #define BSIM4_CGBB 1000 #define BSIM4_CDBB 1001 #define BSIM4_CSBB 1002 #define BSIM4_CBBB 1003 #define BSIM4_QS 1004 #define BSIM4_IGISL 1005 #define BSIM4_IGS 1006 #define BSIM4_IGD 1007 #define BSIM4_IGB 1008 #define BSIM4_IGCS 1009 #define BSIM4_IGCD 1010 #define BSIM4_QDEF 1011 #define BSIM4_DELVT0 1012 #define BSIM4_GCRG 1013 #define BSIM4_GTAU 1014 #define BSIM4_MOD_LTVOFF 1051 #define BSIM4_MOD_LTVFBSDOFF 1052 #define BSIM4_MOD_WTVOFF 1053 #define BSIM4_MOD_WTVFBSDOFF 1054 #define BSIM4_MOD_PTVOFF 1055 #define BSIM4_MOD_PTVFBSDOFF 1056 #define BSIM4_MOD_LKVTH0WE 1061 #define BSIM4_MOD_LK2WE 1062 #define BSIM4_MOD_LKU0WE 1063 #define BSIM4_MOD_WKVTH0WE 1064 #define BSIM4_MOD_WK2WE 1065 #define BSIM4_MOD_WKU0WE 1066 #define BSIM4_MOD_PKVTH0WE 1067 #define BSIM4_MOD_PK2WE 1068 #define BSIM4_MOD_PKU0WE 1069 #define BSIM4_MOD_RBPS0 1101 #define BSIM4_MOD_RBPSL 1102 #define BSIM4_MOD_RBPSW 1103 #define BSIM4_MOD_RBPSNF 1104 #define BSIM4_MOD_RBPD0 1105 #define BSIM4_MOD_RBPDL 1106 #define BSIM4_MOD_RBPDW 1107 #define BSIM4_MOD_RBPDNF 1108 #define BSIM4_MOD_RBPBX0 1109 #define BSIM4_MOD_RBPBXL 1110 #define BSIM4_MOD_RBPBXW 1111 #define BSIM4_MOD_RBPBXNF 1112 #define BSIM4_MOD_RBPBY0 1113 #define BSIM4_MOD_RBPBYL 1114 #define BSIM4_MOD_RBPBYW 1115 #define BSIM4_MOD_RBPBYNF 1116 #define BSIM4_MOD_RBSBX0 1117 #define BSIM4_MOD_RBSBY0 1118 #define BSIM4_MOD_RBDBX0 1119 #define BSIM4_MOD_RBDBY0 1120 #define BSIM4_MOD_RBSDBXL 1121 #define BSIM4_MOD_RBSDBXW 1122 #define BSIM4_MOD_RBSDBXNF 1123 #define BSIM4_MOD_RBSDBYL 1124 #define BSIM4_MOD_RBSDBYW 1125 #define BSIM4_MOD_RBSDBYNF 1126 #define BSIM4_MOD_AGISL 1200 #define BSIM4_MOD_BGISL 1201 #define BSIM4_MOD_EGISL 1202 #define BSIM4_MOD_CGISL 1203 #define BSIM4_MOD_LAGISL 1204 #define BSIM4_MOD_LBGISL 1205 #define BSIM4_MOD_LEGISL 1206 #define BSIM4_MOD_LCGISL 1207 #define BSIM4_MOD_WAGISL 1208 #define BSIM4_MOD_WBGISL 1209 #define BSIM4_MOD_WEGISL 1210 #define BSIM4_MOD_WCGISL 1211 #define BSIM4_MOD_PAGISL 1212 #define BSIM4_MOD_PBGISL 1213 #define BSIM4_MOD_PEGISL 1214 #define BSIM4_MOD_PCGISL 1215 #define BSIM4_MOD_AIGS 1220 #define BSIM4_MOD_BIGS 1221 #define BSIM4_MOD_CIGS 1222 #define BSIM4_MOD_LAIGS 1223 #define BSIM4_MOD_LBIGS 1224 #define BSIM4_MOD_LCIGS 1225 #define BSIM4_MOD_WAIGS 1226 #define BSIM4_MOD_WBIGS 1227 #define BSIM4_MOD_WCIGS 1228 #define BSIM4_MOD_PAIGS 1229 #define BSIM4_MOD_PBIGS 1230 #define BSIM4_MOD_PCIGS 1231 #define BSIM4_MOD_AIGD 1232 #define BSIM4_MOD_BIGD 1233 #define BSIM4_MOD_CIGD 1234 #define BSIM4_MOD_LAIGD 1235 #define BSIM4_MOD_LBIGD 1236 #define BSIM4_MOD_LCIGD 1237 #define BSIM4_MOD_WAIGD 1238 #define BSIM4_MOD_WBIGD 1239 #define BSIM4_MOD_WCIGD 1240 #define BSIM4_MOD_PAIGD 1241 #define BSIM4_MOD_PBIGD 1242 #define BSIM4_MOD_PCIGD 1243 #define BSIM4_MOD_DLCIGD 1244 #define BSIM4_MOD_NJTSD 1250 #define BSIM4_MOD_NJTSSWD 1251 #define BSIM4_MOD_NJTSSWGD 1252 #define BSIM4_MOD_TNJTSD 1253 #define BSIM4_MOD_TNJTSSWD 1254 #define BSIM4_MOD_TNJTSSWGD 1255 /* v4.7 temp dep of leakage current */ #define BSIM4_MOD_TNFACTOR 1256 #define BSIM4_MOD_TETA0 1257 #define BSIM4_MOD_TVOFFCV 1258 #define BSIM4_MOD_LTNFACTOR 1260 #define BSIM4_MOD_LTETA0 1261 #define BSIM4_MOD_LTVOFFCV 1262 #define BSIM4_MOD_WTNFACTOR 1264 #define BSIM4_MOD_WTETA0 1265 #define BSIM4_MOD_WTVOFFCV 1266 #define BSIM4_MOD_PTNFACTOR 1268 #define BSIM4_MOD_PTETA0 1269 #define BSIM4_MOD_PTVOFFCV 1270 /* tnoiMod=2 (v4.7) */ #define BSIM4_MOD_TNOIC 1272 #define BSIM4_MOD_RNOIC 1273 #define BSIM4_MOD_VGS_MAX 1301 #define BSIM4_MOD_VGD_MAX 1302 #define BSIM4_MOD_VGB_MAX 1303 #define BSIM4_MOD_VDS_MAX 1304 #define BSIM4_MOD_VBS_MAX 1305 #define BSIM4_MOD_VBD_MAX 1306 #include "bsim4ext.h" extern void BSIM4evaluate(double,double,double,BSIM4instance*,BSIM4model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM4debug(BSIM4model*, BSIM4instance*, CKTcircuit*, int); extern int BSIM4checkModel(BSIM4model*, BSIM4instance*, CKTcircuit*); extern int BSIM4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); extern int BSIM4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); extern int BSIM4RdsEndIso(double, double, double, double, double, double, int, int, double *); extern int BSIM4RdsEndSha(double, double, double, double, double, double, int, int, double *); #endif /*BSIM4*/ ngspice-26/src/spicelib/devices/bsim4/b4set.c0000644000265600020320000031201212264261473020436 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4set.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/jobdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef USE_OMP #include "ngspice/cpextern.h" #endif #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 int BSIM4setup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; int error; CKTnode *tmp; int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */ double Rtot, DMCGeff, DMCIeff, DMDGeff; JOB *job; #ifdef USE_OMP unsigned int idx, InstCount; BSIM4instance **InstArray; #endif /* Search for a noise analysis request */ for (job = ((TSKtask *)ft_curckt->ci_curTask)->jobs;job;job = job->JOBnextJob) { if(strcmp(job->JOBname,"Noise Analysis")==0) { noiseAnalGiven = 1; break; } } /* loop through all the BSIM4 device models */ for( ; model != NULL; model = model->BSIM4nextModel ) { /* process defaults of model parameters */ if (!model->BSIM4typeGiven) model->BSIM4type = NMOS; if (!model->BSIM4mobModGiven) model->BSIM4mobMod = 0; else if ((model->BSIM4mobMod != 0) && (model->BSIM4mobMod != 1) && (model->BSIM4mobMod != 2)&& (model->BSIM4mobMod != 3)) { model->BSIM4mobMod = 0; printf("Warning: mobMod has been set to its default value: 0.\n"); } if (!model->BSIM4binUnitGiven) model->BSIM4binUnit = 1; if (!model->BSIM4paramChkGiven) model->BSIM4paramChk = 1; if (!model->BSIM4dioModGiven) model->BSIM4dioMod = 1; else if ((model->BSIM4dioMod != 0) && (model->BSIM4dioMod != 1) && (model->BSIM4dioMod != 2)) { model->BSIM4dioMod = 1; printf("Warning: dioMod has been set to its default value: 1.\n"); } if (!model->BSIM4cvchargeModGiven) model->BSIM4cvchargeMod = 0; if (!model->BSIM4capModGiven) model->BSIM4capMod = 2; else if ((model->BSIM4capMod != 0) && (model->BSIM4capMod != 1) && (model->BSIM4capMod != 2)) { model->BSIM4capMod = 2; printf("Warning: capMod has been set to its default value: 2.\n"); } if (!model->BSIM4rdsModGiven) model->BSIM4rdsMod = 0; else if ((model->BSIM4rdsMod != 0) && (model->BSIM4rdsMod != 1)) { model->BSIM4rdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } if (!model->BSIM4rbodyModGiven) model->BSIM4rbodyMod = 0; else if ((model->BSIM4rbodyMod != 0) && (model->BSIM4rbodyMod != 1) && (model->BSIM4rbodyMod != 2)) { model->BSIM4rbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } if (!model->BSIM4rgateModGiven) model->BSIM4rgateMod = 0; else if ((model->BSIM4rgateMod != 0) && (model->BSIM4rgateMod != 1) && (model->BSIM4rgateMod != 2) && (model->BSIM4rgateMod != 3)) { model->BSIM4rgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } if (!model->BSIM4perModGiven) model->BSIM4perMod = 1; else if ((model->BSIM4perMod != 0) && (model->BSIM4perMod != 1)) { model->BSIM4perMod = 1; printf("Warning: perMod has been set to its default value: 1.\n"); } if (!model->BSIM4geoModGiven) model->BSIM4geoMod = 0; if (!model->BSIM4rgeoModGiven) model->BSIM4rgeoMod = 0; else if ((model->BSIM4rgeoMod != 0) && (model->BSIM4rgeoMod != 1)) { model->BSIM4rgeoMod = 1; printf("Warning: rgeoMod has been set to its default value: 1.\n"); } if (!model->BSIM4fnoiModGiven) model->BSIM4fnoiMod = 1; else if ((model->BSIM4fnoiMod != 0) && (model->BSIM4fnoiMod != 1)) { model->BSIM4fnoiMod = 1; printf("Warning: fnoiMod has been set to its default value: 1.\n"); } if (!model->BSIM4tnoiModGiven) model->BSIM4tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ else if ((model->BSIM4tnoiMod != 0) && (model->BSIM4tnoiMod != 1) && (model->BSIM4tnoiMod != 2)) /* v4.7 */ { model->BSIM4tnoiMod = 0; printf("Warning: tnoiMod has been set to its default value: 0.\n"); } if (!model->BSIM4trnqsModGiven) model->BSIM4trnqsMod = 0; else if ((model->BSIM4trnqsMod != 0) && (model->BSIM4trnqsMod != 1)) { model->BSIM4trnqsMod = 0; printf("Warning: trnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4acnqsModGiven) model->BSIM4acnqsMod = 0; else if ((model->BSIM4acnqsMod != 0) && (model->BSIM4acnqsMod != 1)) { model->BSIM4acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4mtrlModGiven) model->BSIM4mtrlMod = 0; else if((model->BSIM4mtrlMod != 0) && (model->BSIM4mtrlMod != 1)) { model->BSIM4mtrlMod = 0; printf("Warning: mtrlMod has been set to its default value: 0.\n"); } if (!model->BSIM4mtrlCompatModGiven) model->BSIM4mtrlCompatMod = 0; else if((model->BSIM4mtrlCompatMod != 0) && (model->BSIM4mtrlCompatMod != 1)) { model->BSIM4mtrlCompatMod = 0; printf("Warning: mtrlCompatMod has been set to its default value: 0.\n"); } if (!model->BSIM4igcModGiven) model->BSIM4igcMod = 0; else if ((model->BSIM4igcMod != 0) && (model->BSIM4igcMod != 1) && (model->BSIM4igcMod != 2)) { model->BSIM4igcMod = 0; printf("Warning: igcMod has been set to its default value: 0.\n"); } if (!model->BSIM4igbModGiven) model->BSIM4igbMod = 0; else if ((model->BSIM4igbMod != 0) && (model->BSIM4igbMod != 1)) { model->BSIM4igbMod = 0; printf("Warning: igbMod has been set to its default value: 0.\n"); } if (!model->BSIM4tempModGiven) model->BSIM4tempMod = 0; else if ((model->BSIM4tempMod != 0) && (model->BSIM4tempMod != 1) && (model->BSIM4tempMod != 2) && (model->BSIM4tempMod != 3)) { model->BSIM4tempMod = 0; printf("Warning: tempMod has been set to its default value: 0.\n"); } if (!model->BSIM4versionGiven) model->BSIM4version = copy("4.7.0"); if (!model->BSIM4toxrefGiven) model->BSIM4toxref = 30.0e-10; if (!model->BSIM4eotGiven) model->BSIM4eot = 15.0e-10; if (!model->BSIM4vddeotGiven) model->BSIM4vddeot = (model->BSIM4type == NMOS) ? 1.5 : -1.5; if (!model->BSIM4tempeotGiven) model->BSIM4tempeot = 300.15; if (!model->BSIM4leffeotGiven) model->BSIM4leffeot = 1; if (!model->BSIM4weffeotGiven) model->BSIM4weffeot = 10; if (!model->BSIM4adosGiven) model->BSIM4ados = 1.0; if (!model->BSIM4bdosGiven) model->BSIM4bdos = 1.0; if (!model->BSIM4toxeGiven) model->BSIM4toxe = 30.0e-10; if (!model->BSIM4toxpGiven) model->BSIM4toxp = model->BSIM4toxe; if (!model->BSIM4toxmGiven) model->BSIM4toxm = model->BSIM4toxe; if (!model->BSIM4dtoxGiven) model->BSIM4dtox = 0.0; if (!model->BSIM4epsroxGiven) model->BSIM4epsrox = 3.9; if (!model->BSIM4cdscGiven) model->BSIM4cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM4cdscbGiven) model->BSIM4cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4cdscdGiven) model->BSIM4cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4citGiven) model->BSIM4cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4nfactorGiven) model->BSIM4nfactor = 1.0; if (!model->BSIM4xjGiven) model->BSIM4xj = .15e-6; if (!model->BSIM4vsatGiven) model->BSIM4vsat = 8.0e4; /* unit m/s */ if (!model->BSIM4atGiven) model->BSIM4at = 3.3e4; /* unit m/s */ if (!model->BSIM4a0Given) model->BSIM4a0 = 1.0; if (!model->BSIM4agsGiven) model->BSIM4ags = 0.0; if (!model->BSIM4a1Given) model->BSIM4a1 = 0.0; if (!model->BSIM4a2Given) model->BSIM4a2 = 1.0; if (!model->BSIM4ketaGiven) model->BSIM4keta = -0.047; /* unit / V */ if (!model->BSIM4nsubGiven) model->BSIM4nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM4phigGiven) model->BSIM4phig = 4.05; if (!model->BSIM4epsrgateGiven) model->BSIM4epsrgate = 11.7; if (!model->BSIM4easubGiven) model->BSIM4easub = 4.05; if (!model->BSIM4epsrsubGiven) model->BSIM4epsrsub = 11.7; if (!model->BSIM4ni0subGiven) model->BSIM4ni0sub = 1.45e10; /* unit 1/cm3 */ if (!model->BSIM4bg0subGiven) model->BSIM4bg0sub = 1.16; /* unit eV */ if (!model->BSIM4tbgasubGiven) model->BSIM4tbgasub = 7.02e-4; if (!model->BSIM4tbgbsubGiven) model->BSIM4tbgbsub = 1108.0; if (!model->BSIM4ndepGiven) model->BSIM4ndep = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM4nsdGiven) model->BSIM4nsd = 1.0e20; /* unit 1/cm3 */ if (!model->BSIM4phinGiven) model->BSIM4phin = 0.0; /* unit V */ if (!model->BSIM4ngateGiven) model->BSIM4ngate = 0; /* unit 1/cm3 */ if (!model->BSIM4vbmGiven) model->BSIM4vbm = -3.0; if (!model->BSIM4xtGiven) model->BSIM4xt = 1.55e-7; if (!model->BSIM4kt1Given) model->BSIM4kt1 = -0.11; /* unit V */ if (!model->BSIM4kt1lGiven) model->BSIM4kt1l = 0.0; /* unit V*m */ if (!model->BSIM4kt2Given) model->BSIM4kt2 = 0.022; /* No unit */ if (!model->BSIM4k3Given) model->BSIM4k3 = 80.0; if (!model->BSIM4k3bGiven) model->BSIM4k3b = 0.0; if (!model->BSIM4w0Given) model->BSIM4w0 = 2.5e-6; if (!model->BSIM4lpe0Given) model->BSIM4lpe0 = 1.74e-7; if (!model->BSIM4lpebGiven) model->BSIM4lpeb = 0.0; if (!model->BSIM4dvtp0Given) model->BSIM4dvtp0 = 0.0; if (!model->BSIM4dvtp1Given) model->BSIM4dvtp1 = 0.0; if (!model->BSIM4dvtp2Given) /* New DIBL/Rout */ model->BSIM4dvtp2 = 0.0; if (!model->BSIM4dvtp3Given) model->BSIM4dvtp3 = 0.0; if (!model->BSIM4dvtp4Given) model->BSIM4dvtp4 = 0.0; if (!model->BSIM4dvtp5Given) model->BSIM4dvtp5 = 0.0; if (!model->BSIM4dvt0Given) model->BSIM4dvt0 = 2.2; if (!model->BSIM4dvt1Given) model->BSIM4dvt1 = 0.53; if (!model->BSIM4dvt2Given) model->BSIM4dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM4dvt0wGiven) model->BSIM4dvt0w = 0.0; if (!model->BSIM4dvt1wGiven) model->BSIM4dvt1w = 5.3e6; if (!model->BSIM4dvt2wGiven) model->BSIM4dvt2w = -0.032; if (!model->BSIM4droutGiven) model->BSIM4drout = 0.56; if (!model->BSIM4dsubGiven) model->BSIM4dsub = model->BSIM4drout; if (!model->BSIM4vth0Given) model->BSIM4vth0 = (model->BSIM4type == NMOS) ? 0.7 : -0.7; if (!model->BSIM4vfbGiven) model->BSIM4vfb = -1.0; if (!model->BSIM4euGiven) model->BSIM4eu = (model->BSIM4type == NMOS) ? 1.67 : 1.0; if (!model->BSIM4ucsGiven) model->BSIM4ucs = (model->BSIM4type == NMOS) ? 1.67 : 1.0; if (!model->BSIM4uaGiven) model->BSIM4ua = ((model->BSIM4mobMod == 2)) ? 1.0e-15 : 1.0e-9; /* unit m/V */ if (!model->BSIM4ua1Given) model->BSIM4ua1 = 1.0e-9; /* unit m/V */ if (!model->BSIM4ubGiven) model->BSIM4ub = 1.0e-19; /* unit (m/V)**2 */ if (!model->BSIM4ub1Given) model->BSIM4ub1 = -1.0e-18; /* unit (m/V)**2 */ if (!model->BSIM4ucGiven) model->BSIM4uc = (model->BSIM4mobMod == 1) ? -0.0465 : -0.0465e-9; if (!model->BSIM4uc1Given) model->BSIM4uc1 = (model->BSIM4mobMod == 1) ? -0.056 : -0.056e-9; if (!model->BSIM4udGiven) model->BSIM4ud = 0.0; /* unit m**(-2) */ if (!model->BSIM4ud1Given) model->BSIM4ud1 = 0.0; if (!model->BSIM4upGiven) model->BSIM4up = 0.0; if (!model->BSIM4lpGiven) model->BSIM4lp = 1.0e-8; if (!model->BSIM4u0Given) model->BSIM4u0 = (model->BSIM4type == NMOS) ? 0.067 : 0.025; if (!model->BSIM4uteGiven) model->BSIM4ute = -1.5; if (!model->BSIM4ucsteGiven) model->BSIM4ucste = -4.775e-3; if (!model->BSIM4voffGiven) model->BSIM4voff = -0.08; if (!model->BSIM4vofflGiven) model->BSIM4voffl = 0.0; if (!model->BSIM4voffcvlGiven) model->BSIM4voffcvl = 0.0; if (!model->BSIM4minvGiven) model->BSIM4minv = 0.0; if (!model->BSIM4minvcvGiven) model->BSIM4minvcv = 0.0; if (!model->BSIM4fproutGiven) model->BSIM4fprout = 0.0; if (!model->BSIM4pditsGiven) model->BSIM4pdits = 0.0; if (!model->BSIM4pditsdGiven) model->BSIM4pditsd = 0.0; if (!model->BSIM4pditslGiven) model->BSIM4pditsl = 0.0; if (!model->BSIM4deltaGiven) model->BSIM4delta = 0.01; if (!model->BSIM4rdswminGiven) model->BSIM4rdswmin = 0.0; if (!model->BSIM4rdwminGiven) model->BSIM4rdwmin = 0.0; if (!model->BSIM4rswminGiven) model->BSIM4rswmin = 0.0; if (!model->BSIM4rdswGiven) model->BSIM4rdsw = 200.0; /* in ohm*um */ if (!model->BSIM4rdwGiven) model->BSIM4rdw = 100.0; if (!model->BSIM4rswGiven) model->BSIM4rsw = 100.0; if (!model->BSIM4prwgGiven) model->BSIM4prwg = 1.0; /* in 1/V */ if (!model->BSIM4prwbGiven) model->BSIM4prwb = 0.0; if (!model->BSIM4prtGiven) if (!model->BSIM4prtGiven) model->BSIM4prt = 0.0; if (!model->BSIM4eta0Given) model->BSIM4eta0 = 0.08; /* no unit */ if (!model->BSIM4etabGiven) model->BSIM4etab = -0.07; /* unit 1/V */ if (!model->BSIM4pclmGiven) model->BSIM4pclm = 1.3; /* no unit */ if (!model->BSIM4pdibl1Given) model->BSIM4pdibl1 = 0.39; /* no unit */ if (!model->BSIM4pdibl2Given) model->BSIM4pdibl2 = 0.0086; /* no unit */ if (!model->BSIM4pdiblbGiven) model->BSIM4pdiblb = 0.0; /* 1/V */ if (!model->BSIM4pscbe1Given) model->BSIM4pscbe1 = 4.24e8; if (!model->BSIM4pscbe2Given) model->BSIM4pscbe2 = 1.0e-5; if (!model->BSIM4pvagGiven) model->BSIM4pvag = 0.0; if (!model->BSIM4wrGiven) model->BSIM4wr = 1.0; if (!model->BSIM4dwgGiven) model->BSIM4dwg = 0.0; if (!model->BSIM4dwbGiven) model->BSIM4dwb = 0.0; if (!model->BSIM4b0Given) model->BSIM4b0 = 0.0; if (!model->BSIM4b1Given) model->BSIM4b1 = 0.0; if (!model->BSIM4alpha0Given) model->BSIM4alpha0 = 0.0; if (!model->BSIM4alpha1Given) model->BSIM4alpha1 = 0.0; if (!model->BSIM4beta0Given) model->BSIM4beta0 = 0.0; if (!model->BSIM4gidlModGiven) model->BSIM4gidlMod = 0; /* v4.7 New GIDL/GISL */ if (!model->BSIM4agidlGiven) model->BSIM4agidl = 0.0; if (!model->BSIM4bgidlGiven) model->BSIM4bgidl = 2.3e9; /* V/m */ if (!model->BSIM4cgidlGiven) model->BSIM4cgidl = 0.5; /* V^3 */ if (!model->BSIM4egidlGiven) model->BSIM4egidl = 0.8; /* V */ if (!model->BSIM4rgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4rgidl = 1.0; if (!model->BSIM4kgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4kgidl = 0.0; if (!model->BSIM4fgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4fgidl = 0.0; if (!model->BSIM4agislGiven) { if (model->BSIM4agidlGiven) model->BSIM4agisl = model->BSIM4agidl; else model->BSIM4agisl = 0.0; } if (!model->BSIM4bgislGiven) { if (model->BSIM4bgidlGiven) model->BSIM4bgisl = model->BSIM4bgidl; else model->BSIM4bgisl = 2.3e9; /* V/m */ } if (!model->BSIM4cgislGiven) { if (model->BSIM4cgidlGiven) model->BSIM4cgisl = model->BSIM4cgidl; else model->BSIM4cgisl = 0.5; /* V^3 */ } if (!model->BSIM4egislGiven) { if (model->BSIM4egidlGiven) model->BSIM4egisl = model->BSIM4egidl; else model->BSIM4egisl = 0.8; /* V */ } if (!model->BSIM4rgislGiven) /* v4.7 New GIDL/GISL */ model->BSIM4rgisl = model->BSIM4rgidl; if (!model->BSIM4kgislGiven) /* v4.7 New GIDL/GISL */ model->BSIM4kgisl = model->BSIM4kgidl; if (!model->BSIM4fgislGiven) /* v4.7 New GIDL/GISL */ model->BSIM4fgisl = model->BSIM4fgidl; if (!model->BSIM4aigcGiven) model->BSIM4aigc = (model->BSIM4type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4bigcGiven) model->BSIM4bigc = (model->BSIM4type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4cigcGiven) model->BSIM4cigc = (model->BSIM4type == NMOS) ? 0.075 : 0.03; if (model->BSIM4aigsdGiven) { model->BSIM4aigs = model->BSIM4aigd = model->BSIM4aigsd; } else { model->BSIM4aigsd = (model->BSIM4type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4aigsGiven) model->BSIM4aigs = (model->BSIM4type == NMOS) ? 1.36e-2 : 9.80e-3; if (!model->BSIM4aigdGiven) model->BSIM4aigd = (model->BSIM4type == NMOS) ? 1.36e-2 : 9.80e-3; } if (model->BSIM4bigsdGiven) { model->BSIM4bigs = model->BSIM4bigd = model->BSIM4bigsd; } else { model->BSIM4bigsd = (model->BSIM4type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4bigsGiven) model->BSIM4bigs = (model->BSIM4type == NMOS) ? 1.71e-3 : 7.59e-4; if (!model->BSIM4bigdGiven) model->BSIM4bigd = (model->BSIM4type == NMOS) ? 1.71e-3 : 7.59e-4; } if (model->BSIM4cigsdGiven) { model->BSIM4cigs = model->BSIM4cigd = model->BSIM4cigsd; } else { model->BSIM4cigsd = (model->BSIM4type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4cigsGiven) model->BSIM4cigs = (model->BSIM4type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4cigdGiven) model->BSIM4cigd = (model->BSIM4type == NMOS) ? 0.075 : 0.03; } if (!model->BSIM4aigbaccGiven) model->BSIM4aigbacc = 1.36e-2; if (!model->BSIM4bigbaccGiven) model->BSIM4bigbacc = 1.71e-3; if (!model->BSIM4cigbaccGiven) model->BSIM4cigbacc = 0.075; if (!model->BSIM4aigbinvGiven) model->BSIM4aigbinv = 1.11e-2; if (!model->BSIM4bigbinvGiven) model->BSIM4bigbinv = 9.49e-4; if (!model->BSIM4cigbinvGiven) model->BSIM4cigbinv = 0.006; if (!model->BSIM4nigcGiven) model->BSIM4nigc = 1.0; if (!model->BSIM4nigbinvGiven) model->BSIM4nigbinv = 3.0; if (!model->BSIM4nigbaccGiven) model->BSIM4nigbacc = 1.0; if (!model->BSIM4ntoxGiven) model->BSIM4ntox = 1.0; if (!model->BSIM4eigbinvGiven) model->BSIM4eigbinv = 1.1; if (!model->BSIM4pigcdGiven) model->BSIM4pigcd = 1.0; if (!model->BSIM4poxedgeGiven) model->BSIM4poxedge = 1.0; if (!model->BSIM4xrcrg1Given) model->BSIM4xrcrg1 = 12.0; if (!model->BSIM4xrcrg2Given) model->BSIM4xrcrg2 = 1.0; if (!model->BSIM4ijthsfwdGiven) model->BSIM4ijthsfwd = 0.1; /* unit A */ if (!model->BSIM4ijthdfwdGiven) model->BSIM4ijthdfwd = model->BSIM4ijthsfwd; if (!model->BSIM4ijthsrevGiven) model->BSIM4ijthsrev = 0.1; /* unit A */ if (!model->BSIM4ijthdrevGiven) model->BSIM4ijthdrev = model->BSIM4ijthsrev; if (!model->BSIM4tnoiaGiven) model->BSIM4tnoia = 1.5; if (!model->BSIM4tnoibGiven) model->BSIM4tnoib = 3.5; if (!model->BSIM4tnoicGiven) model->BSIM4tnoic = 0.0; if (!model->BSIM4rnoiaGiven) model->BSIM4rnoia = 0.577; if (!model->BSIM4rnoibGiven) model->BSIM4rnoib = 0.5164; if (!model->BSIM4rnoicGiven) model->BSIM4rnoic = 0.395; if (!model->BSIM4ntnoiGiven) model->BSIM4ntnoi = 1.0; if (!model->BSIM4lambdaGiven) model->BSIM4lambda = 0.0; if (!model->BSIM4vtlGiven) model->BSIM4vtl = 2.0e5; /* unit m/s */ if (!model->BSIM4xnGiven) model->BSIM4xn = 3.0; if (!model->BSIM4lcGiven) model->BSIM4lc = 5.0e-9; if (!model->BSIM4vfbsdoffGiven) model->BSIM4vfbsdoff = 0.0; /* unit v */ if (!model->BSIM4tvfbsdoffGiven) model->BSIM4tvfbsdoff = 0.0; if (!model->BSIM4tvoffGiven) model->BSIM4tvoff = 0.0; if (!model->BSIM4tnfactorGiven) /* v4.7 temp dep of leakage current */ model->BSIM4tnfactor = 0.0; if (!model->BSIM4teta0Given) /* v4.7 temp dep of leakage current */ model->BSIM4teta0 = 0.0; if (!model->BSIM4tvoffcvGiven) /* v4.7 temp dep of leakage current */ model->BSIM4tvoffcv = 0.0; if (!model->BSIM4lintnoiGiven) model->BSIM4lintnoi = 0.0; /* unit m */ if (!model->BSIM4xjbvsGiven) model->BSIM4xjbvs = 1.0; /* no unit */ if (!model->BSIM4xjbvdGiven) model->BSIM4xjbvd = model->BSIM4xjbvs; if (!model->BSIM4bvsGiven) model->BSIM4bvs = 10.0; /* V */ if (!model->BSIM4bvdGiven) model->BSIM4bvd = model->BSIM4bvs; if (!model->BSIM4gbminGiven) model->BSIM4gbmin = 1.0e-12; /* in mho */ if (!model->BSIM4rbdbGiven) model->BSIM4rbdb = 50.0; /* in ohm */ if (!model->BSIM4rbpbGiven) model->BSIM4rbpb = 50.0; if (!model->BSIM4rbsbGiven) model->BSIM4rbsb = 50.0; if (!model->BSIM4rbpsGiven) model->BSIM4rbps = 50.0; if (!model->BSIM4rbpdGiven) model->BSIM4rbpd = 50.0; if (!model->BSIM4rbps0Given) model->BSIM4rbps0 = 50.0; if (!model->BSIM4rbpslGiven) model->BSIM4rbpsl = 0.0; if (!model->BSIM4rbpswGiven) model->BSIM4rbpsw = 0.0; if (!model->BSIM4rbpsnfGiven) model->BSIM4rbpsnf = 0.0; if (!model->BSIM4rbpd0Given) model->BSIM4rbpd0 = 50.0; if (!model->BSIM4rbpdlGiven) model->BSIM4rbpdl = 0.0; if (!model->BSIM4rbpdwGiven) model->BSIM4rbpdw = 0.0; if (!model->BSIM4rbpdnfGiven) model->BSIM4rbpdnf = 0.0; if (!model->BSIM4rbpbx0Given) model->BSIM4rbpbx0 = 100.0; if (!model->BSIM4rbpbxlGiven) model->BSIM4rbpbxl = 0.0; if (!model->BSIM4rbpbxwGiven) model->BSIM4rbpbxw = 0.0; if (!model->BSIM4rbpbxnfGiven) model->BSIM4rbpbxnf = 0.0; if (!model->BSIM4rbpby0Given) model->BSIM4rbpby0 = 100.0; if (!model->BSIM4rbpbylGiven) model->BSIM4rbpbyl = 0.0; if (!model->BSIM4rbpbywGiven) model->BSIM4rbpbyw = 0.0; if (!model->BSIM4rbpbynfGiven) model->BSIM4rbpbynf = 0.0; if (!model->BSIM4rbsbx0Given) model->BSIM4rbsbx0 = 100.0; if (!model->BSIM4rbsby0Given) model->BSIM4rbsby0 = 100.0; if (!model->BSIM4rbdbx0Given) model->BSIM4rbdbx0 = 100.0; if (!model->BSIM4rbdby0Given) model->BSIM4rbdby0 = 100.0; if (!model->BSIM4rbsdbxlGiven) model->BSIM4rbsdbxl = 0.0; if (!model->BSIM4rbsdbxwGiven) model->BSIM4rbsdbxw = 0.0; if (!model->BSIM4rbsdbxnfGiven) model->BSIM4rbsdbxnf = 0.0; if (!model->BSIM4rbsdbylGiven) model->BSIM4rbsdbyl = 0.0; if (!model->BSIM4rbsdbywGiven) model->BSIM4rbsdbyw = 0.0; if (!model->BSIM4rbsdbynfGiven) model->BSIM4rbsdbynf = 0.0; if (!model->BSIM4cgslGiven) model->BSIM4cgsl = 0.0; if (!model->BSIM4cgdlGiven) model->BSIM4cgdl = 0.0; if (!model->BSIM4ckappasGiven) model->BSIM4ckappas = 0.6; if (!model->BSIM4ckappadGiven) model->BSIM4ckappad = model->BSIM4ckappas; if (!model->BSIM4clcGiven) model->BSIM4clc = 0.1e-6; if (!model->BSIM4cleGiven) model->BSIM4cle = 0.6; if (!model->BSIM4vfbcvGiven) model->BSIM4vfbcv = -1.0; if (!model->BSIM4acdeGiven) model->BSIM4acde = 1.0; if (!model->BSIM4moinGiven) model->BSIM4moin = 15.0; if (!model->BSIM4noffGiven) model->BSIM4noff = 1.0; if (!model->BSIM4voffcvGiven) model->BSIM4voffcv = 0.0; if (!model->BSIM4dmcgGiven) model->BSIM4dmcg = 0.0; if (!model->BSIM4dmciGiven) model->BSIM4dmci = model->BSIM4dmcg; if (!model->BSIM4dmdgGiven) model->BSIM4dmdg = 0.0; if (!model->BSIM4dmcgtGiven) model->BSIM4dmcgt = 0.0; if (!model->BSIM4xgwGiven) model->BSIM4xgw = 0.0; if (!model->BSIM4xglGiven) model->BSIM4xgl = 0.0; if (!model->BSIM4rshgGiven) model->BSIM4rshg = 0.1; if (!model->BSIM4ngconGiven) model->BSIM4ngcon = 1.0; if (!model->BSIM4tcjGiven) model->BSIM4tcj = 0.0; if (!model->BSIM4tpbGiven) model->BSIM4tpb = 0.0; if (!model->BSIM4tcjswGiven) model->BSIM4tcjsw = 0.0; if (!model->BSIM4tpbswGiven) model->BSIM4tpbsw = 0.0; if (!model->BSIM4tcjswgGiven) model->BSIM4tcjswg = 0.0; if (!model->BSIM4tpbswgGiven) model->BSIM4tpbswg = 0.0; /* Length dependence */ if (!model->BSIM4lcdscGiven) model->BSIM4lcdsc = 0.0; if (!model->BSIM4lcdscbGiven) model->BSIM4lcdscb = 0.0; if (!model->BSIM4lcdscdGiven) model->BSIM4lcdscd = 0.0; if (!model->BSIM4lcitGiven) model->BSIM4lcit = 0.0; if (!model->BSIM4lnfactorGiven) model->BSIM4lnfactor = 0.0; if (!model->BSIM4lxjGiven) model->BSIM4lxj = 0.0; if (!model->BSIM4lvsatGiven) model->BSIM4lvsat = 0.0; if (!model->BSIM4latGiven) model->BSIM4lat = 0.0; if (!model->BSIM4la0Given) model->BSIM4la0 = 0.0; if (!model->BSIM4lagsGiven) model->BSIM4lags = 0.0; if (!model->BSIM4la1Given) model->BSIM4la1 = 0.0; if (!model->BSIM4la2Given) model->BSIM4la2 = 0.0; if (!model->BSIM4lketaGiven) model->BSIM4lketa = 0.0; if (!model->BSIM4lnsubGiven) model->BSIM4lnsub = 0.0; if (!model->BSIM4lndepGiven) model->BSIM4lndep = 0.0; if (!model->BSIM4lnsdGiven) model->BSIM4lnsd = 0.0; if (!model->BSIM4lphinGiven) model->BSIM4lphin = 0.0; if (!model->BSIM4lngateGiven) model->BSIM4lngate = 0.0; if (!model->BSIM4lvbmGiven) model->BSIM4lvbm = 0.0; if (!model->BSIM4lxtGiven) model->BSIM4lxt = 0.0; if (!model->BSIM4lkt1Given) model->BSIM4lkt1 = 0.0; if (!model->BSIM4lkt1lGiven) model->BSIM4lkt1l = 0.0; if (!model->BSIM4lkt2Given) model->BSIM4lkt2 = 0.0; if (!model->BSIM4lk3Given) model->BSIM4lk3 = 0.0; if (!model->BSIM4lk3bGiven) model->BSIM4lk3b = 0.0; if (!model->BSIM4lw0Given) model->BSIM4lw0 = 0.0; if (!model->BSIM4llpe0Given) model->BSIM4llpe0 = 0.0; if (!model->BSIM4llpebGiven) model->BSIM4llpeb = 0.0; if (!model->BSIM4ldvtp0Given) model->BSIM4ldvtp0 = 0.0; if (!model->BSIM4ldvtp1Given) model->BSIM4ldvtp1 = 0.0; if (!model->BSIM4ldvtp2Given) /* New DIBL/Rout */ model->BSIM4ldvtp2 = 0.0; if (!model->BSIM4ldvtp3Given) model->BSIM4ldvtp3 = 0.0; if (!model->BSIM4ldvtp4Given) model->BSIM4ldvtp4 = 0.0; if (!model->BSIM4ldvtp5Given) model->BSIM4ldvtp5 = 0.0; if (!model->BSIM4ldvt0Given) model->BSIM4ldvt0 = 0.0; if (!model->BSIM4ldvt1Given) model->BSIM4ldvt1 = 0.0; if (!model->BSIM4ldvt2Given) model->BSIM4ldvt2 = 0.0; if (!model->BSIM4ldvt0wGiven) model->BSIM4ldvt0w = 0.0; if (!model->BSIM4ldvt1wGiven) model->BSIM4ldvt1w = 0.0; if (!model->BSIM4ldvt2wGiven) model->BSIM4ldvt2w = 0.0; if (!model->BSIM4ldroutGiven) model->BSIM4ldrout = 0.0; if (!model->BSIM4ldsubGiven) model->BSIM4ldsub = 0.0; if (!model->BSIM4lvth0Given) model->BSIM4lvth0 = 0.0; if (!model->BSIM4luaGiven) model->BSIM4lua = 0.0; if (!model->BSIM4lua1Given) model->BSIM4lua1 = 0.0; if (!model->BSIM4lubGiven) model->BSIM4lub = 0.0; if (!model->BSIM4lub1Given) model->BSIM4lub1 = 0.0; if (!model->BSIM4lucGiven) model->BSIM4luc = 0.0; if (!model->BSIM4luc1Given) model->BSIM4luc1 = 0.0; if (!model->BSIM4ludGiven) model->BSIM4lud = 0.0; if (!model->BSIM4lud1Given) model->BSIM4lud1 = 0.0; if (!model->BSIM4lupGiven) model->BSIM4lup = 0.0; if (!model->BSIM4llpGiven) model->BSIM4llp = 0.0; if (!model->BSIM4lu0Given) model->BSIM4lu0 = 0.0; if (!model->BSIM4luteGiven) model->BSIM4lute = 0.0; if (!model->BSIM4lucsteGiven) model->BSIM4lucste = 0.0; if (!model->BSIM4lvoffGiven) model->BSIM4lvoff = 0.0; if (!model->BSIM4lminvGiven) model->BSIM4lminv = 0.0; if (!model->BSIM4lminvcvGiven) model->BSIM4lminvcv = 0.0; if (!model->BSIM4lfproutGiven) model->BSIM4lfprout = 0.0; if (!model->BSIM4lpditsGiven) model->BSIM4lpdits = 0.0; if (!model->BSIM4lpditsdGiven) model->BSIM4lpditsd = 0.0; if (!model->BSIM4ldeltaGiven) model->BSIM4ldelta = 0.0; if (!model->BSIM4lrdswGiven) model->BSIM4lrdsw = 0.0; if (!model->BSIM4lrdwGiven) model->BSIM4lrdw = 0.0; if (!model->BSIM4lrswGiven) model->BSIM4lrsw = 0.0; if (!model->BSIM4lprwbGiven) model->BSIM4lprwb = 0.0; if (!model->BSIM4lprwgGiven) model->BSIM4lprwg = 0.0; if (!model->BSIM4lprtGiven) model->BSIM4lprt = 0.0; if (!model->BSIM4leta0Given) model->BSIM4leta0 = 0.0; if (!model->BSIM4letabGiven) model->BSIM4letab = -0.0; if (!model->BSIM4lpclmGiven) model->BSIM4lpclm = 0.0; if (!model->BSIM4lpdibl1Given) model->BSIM4lpdibl1 = 0.0; if (!model->BSIM4lpdibl2Given) model->BSIM4lpdibl2 = 0.0; if (!model->BSIM4lpdiblbGiven) model->BSIM4lpdiblb = 0.0; if (!model->BSIM4lpscbe1Given) model->BSIM4lpscbe1 = 0.0; if (!model->BSIM4lpscbe2Given) model->BSIM4lpscbe2 = 0.0; if (!model->BSIM4lpvagGiven) model->BSIM4lpvag = 0.0; if (!model->BSIM4lwrGiven) model->BSIM4lwr = 0.0; if (!model->BSIM4ldwgGiven) model->BSIM4ldwg = 0.0; if (!model->BSIM4ldwbGiven) model->BSIM4ldwb = 0.0; if (!model->BSIM4lb0Given) model->BSIM4lb0 = 0.0; if (!model->BSIM4lb1Given) model->BSIM4lb1 = 0.0; if (!model->BSIM4lalpha0Given) model->BSIM4lalpha0 = 0.0; if (!model->BSIM4lalpha1Given) model->BSIM4lalpha1 = 0.0; if (!model->BSIM4lbeta0Given) model->BSIM4lbeta0 = 0.0; if (!model->BSIM4lagidlGiven) model->BSIM4lagidl = 0.0; if (!model->BSIM4lbgidlGiven) model->BSIM4lbgidl = 0.0; if (!model->BSIM4lcgidlGiven) model->BSIM4lcgidl = 0.0; if (!model->BSIM4legidlGiven) model->BSIM4legidl = 0.0; if (!model->BSIM4lrgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4lrgidl = 0.0; if (!model->BSIM4lkgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4lkgidl = 0.0; if (!model->BSIM4lfgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4lfgidl = 0.0; if (!model->BSIM4lagislGiven) { if (model->BSIM4lagidlGiven) model->BSIM4lagisl = model->BSIM4lagidl; else model->BSIM4lagisl = 0.0; } if (!model->BSIM4lbgislGiven) { if (model->BSIM4lbgidlGiven) model->BSIM4lbgisl = model->BSIM4lbgidl; else model->BSIM4lbgisl = 0.0; } if (!model->BSIM4lcgislGiven) { if (model->BSIM4lcgidlGiven) model->BSIM4lcgisl = model->BSIM4lcgidl; else model->BSIM4lcgisl = 0.0; } if (!model->BSIM4legislGiven) { if (model->BSIM4legidlGiven) model->BSIM4legisl = model->BSIM4legidl; else model->BSIM4legisl = 0.0; } if (!model->BSIM4lrgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4lrgidlGiven) model->BSIM4lrgisl = model->BSIM4lrgidl; } if (!model->BSIM4lkgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4lkgidlGiven) model->BSIM4lkgisl = model->BSIM4lkgidl; } if (!model->BSIM4lfgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4lfgidlGiven) model->BSIM4lfgisl = model->BSIM4lfgidl; } if (!model->BSIM4laigcGiven) model->BSIM4laigc = 0.0; if (!model->BSIM4lbigcGiven) model->BSIM4lbigc = 0.0; if (!model->BSIM4lcigcGiven) model->BSIM4lcigc = 0.0; if (!model->BSIM4aigsdGiven && (model->BSIM4aigsGiven || model->BSIM4aigdGiven)) { if (!model->BSIM4laigsGiven) model->BSIM4laigs = 0.0; if (!model->BSIM4laigdGiven) model->BSIM4laigd = 0.0; } else { if (!model->BSIM4laigsdGiven) model->BSIM4laigsd = 0.0; model->BSIM4laigs = model->BSIM4laigd = model->BSIM4laigsd; } if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) { if (!model->BSIM4lbigsGiven) model->BSIM4lbigs = 0.0; if (!model->BSIM4lbigdGiven) model->BSIM4lbigd = 0.0; } else { if (!model->BSIM4lbigsdGiven) model->BSIM4lbigsd = 0.0; model->BSIM4lbigs = model->BSIM4lbigd = model->BSIM4lbigsd; } if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) { if (!model->BSIM4lcigsGiven) model->BSIM4lcigs = 0.0; if (!model->BSIM4lcigdGiven) model->BSIM4lcigd = 0.0; } else { if (!model->BSIM4lcigsdGiven) model->BSIM4lcigsd = 0.0; model->BSIM4lcigs = model->BSIM4lcigd = model->BSIM4lcigsd; } if (!model->BSIM4laigbaccGiven) model->BSIM4laigbacc = 0.0; if (!model->BSIM4lbigbaccGiven) model->BSIM4lbigbacc = 0.0; if (!model->BSIM4lcigbaccGiven) model->BSIM4lcigbacc = 0.0; if (!model->BSIM4laigbinvGiven) model->BSIM4laigbinv = 0.0; if (!model->BSIM4lbigbinvGiven) model->BSIM4lbigbinv = 0.0; if (!model->BSIM4lcigbinvGiven) model->BSIM4lcigbinv = 0.0; if (!model->BSIM4lnigcGiven) model->BSIM4lnigc = 0.0; if (!model->BSIM4lnigbinvGiven) model->BSIM4lnigbinv = 0.0; if (!model->BSIM4lnigbaccGiven) model->BSIM4lnigbacc = 0.0; if (!model->BSIM4lntoxGiven) model->BSIM4lntox = 0.0; if (!model->BSIM4leigbinvGiven) model->BSIM4leigbinv = 0.0; if (!model->BSIM4lpigcdGiven) model->BSIM4lpigcd = 0.0; if (!model->BSIM4lpoxedgeGiven) model->BSIM4lpoxedge = 0.0; if (!model->BSIM4lxrcrg1Given) model->BSIM4lxrcrg1 = 0.0; if (!model->BSIM4lxrcrg2Given) model->BSIM4lxrcrg2 = 0.0; if (!model->BSIM4leuGiven) model->BSIM4leu = 0.0; if (!model->BSIM4lucsGiven) model->BSIM4lucs = 0.0; if (!model->BSIM4lvfbGiven) model->BSIM4lvfb = 0.0; if (!model->BSIM4llambdaGiven) model->BSIM4llambda = 0.0; if (!model->BSIM4lvtlGiven) model->BSIM4lvtl = 0.0; if (!model->BSIM4lxnGiven) model->BSIM4lxn = 0.0; if (!model->BSIM4lvfbsdoffGiven) model->BSIM4lvfbsdoff = 0.0; if (!model->BSIM4ltvfbsdoffGiven) model->BSIM4ltvfbsdoff = 0.0; if (!model->BSIM4ltvoffGiven) model->BSIM4ltvoff = 0.0; if (!model->BSIM4ltnfactorGiven) /* v4.7 temp dep of leakage current */ model->BSIM4ltnfactor = 0.0; if (!model->BSIM4lteta0Given) /* v4.7 temp dep of leakage current */ model->BSIM4lteta0 = 0.0; if (!model->BSIM4ltvoffcvGiven) /* v4.7 temp dep of leakage current */ model->BSIM4ltvoffcv = 0.0; if (!model->BSIM4lcgslGiven) model->BSIM4lcgsl = 0.0; if (!model->BSIM4lcgdlGiven) model->BSIM4lcgdl = 0.0; if (!model->BSIM4lckappasGiven) model->BSIM4lckappas = 0.0; if (!model->BSIM4lckappadGiven) model->BSIM4lckappad = 0.0; if (!model->BSIM4lclcGiven) model->BSIM4lclc = 0.0; if (!model->BSIM4lcleGiven) model->BSIM4lcle = 0.0; if (!model->BSIM4lcfGiven) model->BSIM4lcf = 0.0; if (!model->BSIM4lvfbcvGiven) model->BSIM4lvfbcv = 0.0; if (!model->BSIM4lacdeGiven) model->BSIM4lacde = 0.0; if (!model->BSIM4lmoinGiven) model->BSIM4lmoin = 0.0; if (!model->BSIM4lnoffGiven) model->BSIM4lnoff = 0.0; if (!model->BSIM4lvoffcvGiven) model->BSIM4lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM4wcdscGiven) model->BSIM4wcdsc = 0.0; if (!model->BSIM4wcdscbGiven) model->BSIM4wcdscb = 0.0; if (!model->BSIM4wcdscdGiven) model->BSIM4wcdscd = 0.0; if (!model->BSIM4wcitGiven) model->BSIM4wcit = 0.0; if (!model->BSIM4wnfactorGiven) model->BSIM4wnfactor = 0.0; if (!model->BSIM4wxjGiven) model->BSIM4wxj = 0.0; if (!model->BSIM4wvsatGiven) model->BSIM4wvsat = 0.0; if (!model->BSIM4watGiven) model->BSIM4wat = 0.0; if (!model->BSIM4wa0Given) model->BSIM4wa0 = 0.0; if (!model->BSIM4wagsGiven) model->BSIM4wags = 0.0; if (!model->BSIM4wa1Given) model->BSIM4wa1 = 0.0; if (!model->BSIM4wa2Given) model->BSIM4wa2 = 0.0; if (!model->BSIM4wketaGiven) model->BSIM4wketa = 0.0; if (!model->BSIM4wnsubGiven) model->BSIM4wnsub = 0.0; if (!model->BSIM4wndepGiven) model->BSIM4wndep = 0.0; if (!model->BSIM4wnsdGiven) model->BSIM4wnsd = 0.0; if (!model->BSIM4wphinGiven) model->BSIM4wphin = 0.0; if (!model->BSIM4wngateGiven) model->BSIM4wngate = 0.0; if (!model->BSIM4wvbmGiven) model->BSIM4wvbm = 0.0; if (!model->BSIM4wxtGiven) model->BSIM4wxt = 0.0; if (!model->BSIM4wkt1Given) model->BSIM4wkt1 = 0.0; if (!model->BSIM4wkt1lGiven) model->BSIM4wkt1l = 0.0; if (!model->BSIM4wkt2Given) model->BSIM4wkt2 = 0.0; if (!model->BSIM4wk3Given) model->BSIM4wk3 = 0.0; if (!model->BSIM4wk3bGiven) model->BSIM4wk3b = 0.0; if (!model->BSIM4ww0Given) model->BSIM4ww0 = 0.0; if (!model->BSIM4wlpe0Given) model->BSIM4wlpe0 = 0.0; if (!model->BSIM4wlpebGiven) model->BSIM4wlpeb = 0.0; if (!model->BSIM4wdvtp0Given) model->BSIM4wdvtp0 = 0.0; if (!model->BSIM4wdvtp1Given) model->BSIM4wdvtp1 = 0.0; if (!model->BSIM4wdvtp2Given) /* New DIBL/Rout */ model->BSIM4wdvtp2 = 0.0; if (!model->BSIM4wdvtp3Given) model->BSIM4wdvtp3 = 0.0; if (!model->BSIM4wdvtp4Given) model->BSIM4wdvtp4 = 0.0; if (!model->BSIM4wdvtp5Given) model->BSIM4wdvtp5 = 0.0; if (!model->BSIM4wdvt0Given) model->BSIM4wdvt0 = 0.0; if (!model->BSIM4wdvt1Given) model->BSIM4wdvt1 = 0.0; if (!model->BSIM4wdvt2Given) model->BSIM4wdvt2 = 0.0; if (!model->BSIM4wdvt0wGiven) model->BSIM4wdvt0w = 0.0; if (!model->BSIM4wdvt1wGiven) model->BSIM4wdvt1w = 0.0; if (!model->BSIM4wdvt2wGiven) model->BSIM4wdvt2w = 0.0; if (!model->BSIM4wdroutGiven) model->BSIM4wdrout = 0.0; if (!model->BSIM4wdsubGiven) model->BSIM4wdsub = 0.0; if (!model->BSIM4wvth0Given) model->BSIM4wvth0 = 0.0; if (!model->BSIM4wuaGiven) model->BSIM4wua = 0.0; if (!model->BSIM4wua1Given) model->BSIM4wua1 = 0.0; if (!model->BSIM4wubGiven) model->BSIM4wub = 0.0; if (!model->BSIM4wub1Given) model->BSIM4wub1 = 0.0; if (!model->BSIM4wucGiven) model->BSIM4wuc = 0.0; if (!model->BSIM4wuc1Given) model->BSIM4wuc1 = 0.0; if (!model->BSIM4wudGiven) model->BSIM4wud = 0.0; if (!model->BSIM4wud1Given) model->BSIM4wud1 = 0.0; if (!model->BSIM4wupGiven) model->BSIM4wup = 0.0; if (!model->BSIM4wlpGiven) model->BSIM4wlp = 0.0; if (!model->BSIM4wu0Given) model->BSIM4wu0 = 0.0; if (!model->BSIM4wuteGiven) model->BSIM4wute = 0.0; if (!model->BSIM4wucsteGiven) model->BSIM4wucste = 0.0; if (!model->BSIM4wvoffGiven) model->BSIM4wvoff = 0.0; if (!model->BSIM4wminvGiven) model->BSIM4wminv = 0.0; if (!model->BSIM4wminvcvGiven) model->BSIM4wminvcv = 0.0; if (!model->BSIM4wfproutGiven) model->BSIM4wfprout = 0.0; if (!model->BSIM4wpditsGiven) model->BSIM4wpdits = 0.0; if (!model->BSIM4wpditsdGiven) model->BSIM4wpditsd = 0.0; if (!model->BSIM4wdeltaGiven) model->BSIM4wdelta = 0.0; if (!model->BSIM4wrdswGiven) model->BSIM4wrdsw = 0.0; if (!model->BSIM4wrdwGiven) model->BSIM4wrdw = 0.0; if (!model->BSIM4wrswGiven) model->BSIM4wrsw = 0.0; if (!model->BSIM4wprwbGiven) model->BSIM4wprwb = 0.0; if (!model->BSIM4wprwgGiven) model->BSIM4wprwg = 0.0; if (!model->BSIM4wprtGiven) model->BSIM4wprt = 0.0; if (!model->BSIM4weta0Given) model->BSIM4weta0 = 0.0; if (!model->BSIM4wetabGiven) model->BSIM4wetab = 0.0; if (!model->BSIM4wpclmGiven) model->BSIM4wpclm = 0.0; if (!model->BSIM4wpdibl1Given) model->BSIM4wpdibl1 = 0.0; if (!model->BSIM4wpdibl2Given) model->BSIM4wpdibl2 = 0.0; if (!model->BSIM4wpdiblbGiven) model->BSIM4wpdiblb = 0.0; if (!model->BSIM4wpscbe1Given) model->BSIM4wpscbe1 = 0.0; if (!model->BSIM4wpscbe2Given) model->BSIM4wpscbe2 = 0.0; if (!model->BSIM4wpvagGiven) model->BSIM4wpvag = 0.0; if (!model->BSIM4wwrGiven) model->BSIM4wwr = 0.0; if (!model->BSIM4wdwgGiven) model->BSIM4wdwg = 0.0; if (!model->BSIM4wdwbGiven) model->BSIM4wdwb = 0.0; if (!model->BSIM4wb0Given) model->BSIM4wb0 = 0.0; if (!model->BSIM4wb1Given) model->BSIM4wb1 = 0.0; if (!model->BSIM4walpha0Given) model->BSIM4walpha0 = 0.0; if (!model->BSIM4walpha1Given) model->BSIM4walpha1 = 0.0; if (!model->BSIM4wbeta0Given) model->BSIM4wbeta0 = 0.0; if (!model->BSIM4wagidlGiven) model->BSIM4wagidl = 0.0; if (!model->BSIM4wbgidlGiven) model->BSIM4wbgidl = 0.0; if (!model->BSIM4wcgidlGiven) model->BSIM4wcgidl = 0.0; if (!model->BSIM4wegidlGiven) model->BSIM4wegidl = 0.0; if (!model->BSIM4wrgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4wrgidl = 0.0; if (!model->BSIM4wkgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4wkgidl = 0.0; if (!model->BSIM4wfgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4wfgidl = 0.0; if (!model->BSIM4wagislGiven) { if (model->BSIM4wagidlGiven) model->BSIM4wagisl = model->BSIM4wagidl; else model->BSIM4wagisl = 0.0; } if (!model->BSIM4wbgislGiven) { if (model->BSIM4wbgidlGiven) model->BSIM4wbgisl = model->BSIM4wbgidl; else model->BSIM4wbgisl = 0.0; } if (!model->BSIM4wcgislGiven) { if (model->BSIM4wcgidlGiven) model->BSIM4wcgisl = model->BSIM4wcgidl; else model->BSIM4wcgisl = 0.0; } if (!model->BSIM4wegislGiven) { if (model->BSIM4wegidlGiven) model->BSIM4wegisl = model->BSIM4wegidl; else model->BSIM4wegisl = 0.0; } if (!model->BSIM4wrgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4wrgidlGiven) model->BSIM4wrgisl = model->BSIM4wrgidl; } if (!model->BSIM4wkgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4wkgidlGiven) model->BSIM4wkgisl = model->BSIM4wkgidl; } if (!model->BSIM4wfgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4wfgidlGiven) model->BSIM4wfgisl = model->BSIM4wfgidl; } if (!model->BSIM4waigcGiven) model->BSIM4waigc = 0.0; if (!model->BSIM4wbigcGiven) model->BSIM4wbigc = 0.0; if (!model->BSIM4wcigcGiven) model->BSIM4wcigc = 0.0; if (!model->BSIM4aigsdGiven && (model->BSIM4aigsGiven || model->BSIM4aigdGiven)) { if (!model->BSIM4waigsGiven) model->BSIM4waigs = 0.0; if (!model->BSIM4waigdGiven) model->BSIM4waigd = 0.0; } else { if (!model->BSIM4waigsdGiven) model->BSIM4waigsd = 0.0; model->BSIM4waigs = model->BSIM4waigd = model->BSIM4waigsd; } if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) { if (!model->BSIM4wbigsGiven) model->BSIM4wbigs = 0.0; if (!model->BSIM4wbigdGiven) model->BSIM4wbigd = 0.0; } else { if (!model->BSIM4wbigsdGiven) model->BSIM4wbigsd = 0.0; model->BSIM4wbigs = model->BSIM4wbigd = model->BSIM4wbigsd; } if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) { if (!model->BSIM4wcigsGiven) model->BSIM4wcigs = 0.0; if (!model->BSIM4wcigdGiven) model->BSIM4wcigd = 0.0; } else { if (!model->BSIM4wcigsdGiven) model->BSIM4wcigsd = 0.0; model->BSIM4wcigs = model->BSIM4wcigd = model->BSIM4wcigsd; } if (!model->BSIM4waigbaccGiven) model->BSIM4waigbacc = 0.0; if (!model->BSIM4wbigbaccGiven) model->BSIM4wbigbacc = 0.0; if (!model->BSIM4wcigbaccGiven) model->BSIM4wcigbacc = 0.0; if (!model->BSIM4waigbinvGiven) model->BSIM4waigbinv = 0.0; if (!model->BSIM4wbigbinvGiven) model->BSIM4wbigbinv = 0.0; if (!model->BSIM4wcigbinvGiven) model->BSIM4wcigbinv = 0.0; if (!model->BSIM4wnigcGiven) model->BSIM4wnigc = 0.0; if (!model->BSIM4wnigbinvGiven) model->BSIM4wnigbinv = 0.0; if (!model->BSIM4wnigbaccGiven) model->BSIM4wnigbacc = 0.0; if (!model->BSIM4wntoxGiven) model->BSIM4wntox = 0.0; if (!model->BSIM4weigbinvGiven) model->BSIM4weigbinv = 0.0; if (!model->BSIM4wpigcdGiven) model->BSIM4wpigcd = 0.0; if (!model->BSIM4wpoxedgeGiven) model->BSIM4wpoxedge = 0.0; if (!model->BSIM4wxrcrg1Given) model->BSIM4wxrcrg1 = 0.0; if (!model->BSIM4wxrcrg2Given) model->BSIM4wxrcrg2 = 0.0; if (!model->BSIM4weuGiven) model->BSIM4weu = 0.0; if (!model->BSIM4wucsGiven) model->BSIM4wucs = 0.0; if (!model->BSIM4wvfbGiven) model->BSIM4wvfb = 0.0; if (!model->BSIM4wlambdaGiven) model->BSIM4wlambda = 0.0; if (!model->BSIM4wvtlGiven) model->BSIM4wvtl = 0.0; if (!model->BSIM4wxnGiven) model->BSIM4wxn = 0.0; if (!model->BSIM4wvfbsdoffGiven) model->BSIM4wvfbsdoff = 0.0; if (!model->BSIM4wtvfbsdoffGiven) model->BSIM4wtvfbsdoff = 0.0; if (!model->BSIM4wtvoffGiven) model->BSIM4wtvoff = 0.0; if (!model->BSIM4wtnfactorGiven) /* v4.7 temp dep of leakage current */ model->BSIM4wtnfactor = 0.0; if (!model->BSIM4wteta0Given) /* v4.7 temp dep of leakage current */ model->BSIM4wteta0 = 0.0; if (!model->BSIM4wtvoffcvGiven) /* v4.7 temp dep of leakage current */ model->BSIM4wtvoffcv = 0.0; if (!model->BSIM4wcgslGiven) model->BSIM4wcgsl = 0.0; if (!model->BSIM4wcgdlGiven) model->BSIM4wcgdl = 0.0; if (!model->BSIM4wckappasGiven) model->BSIM4wckappas = 0.0; if (!model->BSIM4wckappadGiven) model->BSIM4wckappad = 0.0; if (!model->BSIM4wcfGiven) model->BSIM4wcf = 0.0; if (!model->BSIM4wclcGiven) model->BSIM4wclc = 0.0; if (!model->BSIM4wcleGiven) model->BSIM4wcle = 0.0; if (!model->BSIM4wvfbcvGiven) model->BSIM4wvfbcv = 0.0; if (!model->BSIM4wacdeGiven) model->BSIM4wacde = 0.0; if (!model->BSIM4wmoinGiven) model->BSIM4wmoin = 0.0; if (!model->BSIM4wnoffGiven) model->BSIM4wnoff = 0.0; if (!model->BSIM4wvoffcvGiven) model->BSIM4wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM4pcdscGiven) model->BSIM4pcdsc = 0.0; if (!model->BSIM4pcdscbGiven) model->BSIM4pcdscb = 0.0; if (!model->BSIM4pcdscdGiven) model->BSIM4pcdscd = 0.0; if (!model->BSIM4pcitGiven) model->BSIM4pcit = 0.0; if (!model->BSIM4pnfactorGiven) model->BSIM4pnfactor = 0.0; if (!model->BSIM4pxjGiven) model->BSIM4pxj = 0.0; if (!model->BSIM4pvsatGiven) model->BSIM4pvsat = 0.0; if (!model->BSIM4patGiven) model->BSIM4pat = 0.0; if (!model->BSIM4pa0Given) model->BSIM4pa0 = 0.0; if (!model->BSIM4pagsGiven) model->BSIM4pags = 0.0; if (!model->BSIM4pa1Given) model->BSIM4pa1 = 0.0; if (!model->BSIM4pa2Given) model->BSIM4pa2 = 0.0; if (!model->BSIM4pketaGiven) model->BSIM4pketa = 0.0; if (!model->BSIM4pnsubGiven) model->BSIM4pnsub = 0.0; if (!model->BSIM4pndepGiven) model->BSIM4pndep = 0.0; if (!model->BSIM4pnsdGiven) model->BSIM4pnsd = 0.0; if (!model->BSIM4pphinGiven) model->BSIM4pphin = 0.0; if (!model->BSIM4pngateGiven) model->BSIM4pngate = 0.0; if (!model->BSIM4pvbmGiven) model->BSIM4pvbm = 0.0; if (!model->BSIM4pxtGiven) model->BSIM4pxt = 0.0; if (!model->BSIM4pkt1Given) model->BSIM4pkt1 = 0.0; if (!model->BSIM4pkt1lGiven) model->BSIM4pkt1l = 0.0; if (!model->BSIM4pkt2Given) model->BSIM4pkt2 = 0.0; if (!model->BSIM4pk3Given) model->BSIM4pk3 = 0.0; if (!model->BSIM4pk3bGiven) model->BSIM4pk3b = 0.0; if (!model->BSIM4pw0Given) model->BSIM4pw0 = 0.0; if (!model->BSIM4plpe0Given) model->BSIM4plpe0 = 0.0; if (!model->BSIM4plpebGiven) model->BSIM4plpeb = 0.0; if (!model->BSIM4pdvtp0Given) model->BSIM4pdvtp0 = 0.0; if (!model->BSIM4pdvtp1Given) model->BSIM4pdvtp1 = 0.0; if (!model->BSIM4pdvtp2Given) /* New DIBL/Rout */ model->BSIM4pdvtp2 = 0.0; if (!model->BSIM4pdvtp3Given) model->BSIM4pdvtp3 = 0.0; if (!model->BSIM4pdvtp4Given) model->BSIM4pdvtp4 = 0.0; if (!model->BSIM4pdvtp5Given) model->BSIM4pdvtp5 = 0.0; if (!model->BSIM4pdvt0Given) model->BSIM4pdvt0 = 0.0; if (!model->BSIM4pdvt1Given) model->BSIM4pdvt1 = 0.0; if (!model->BSIM4pdvt2Given) model->BSIM4pdvt2 = 0.0; if (!model->BSIM4pdvt0wGiven) model->BSIM4pdvt0w = 0.0; if (!model->BSIM4pdvt1wGiven) model->BSIM4pdvt1w = 0.0; if (!model->BSIM4pdvt2wGiven) model->BSIM4pdvt2w = 0.0; if (!model->BSIM4pdroutGiven) model->BSIM4pdrout = 0.0; if (!model->BSIM4pdsubGiven) model->BSIM4pdsub = 0.0; if (!model->BSIM4pvth0Given) model->BSIM4pvth0 = 0.0; if (!model->BSIM4puaGiven) model->BSIM4pua = 0.0; if (!model->BSIM4pua1Given) model->BSIM4pua1 = 0.0; if (!model->BSIM4pubGiven) model->BSIM4pub = 0.0; if (!model->BSIM4pub1Given) model->BSIM4pub1 = 0.0; if (!model->BSIM4pucGiven) model->BSIM4puc = 0.0; if (!model->BSIM4puc1Given) model->BSIM4puc1 = 0.0; if (!model->BSIM4pudGiven) model->BSIM4pud = 0.0; if (!model->BSIM4pud1Given) model->BSIM4pud1 = 0.0; if (!model->BSIM4pupGiven) model->BSIM4pup = 0.0; if (!model->BSIM4plpGiven) model->BSIM4plp = 0.0; if (!model->BSIM4pu0Given) model->BSIM4pu0 = 0.0; if (!model->BSIM4puteGiven) model->BSIM4pute = 0.0; if (!model->BSIM4pucsteGiven) model->BSIM4pucste = 0.0; if (!model->BSIM4pvoffGiven) model->BSIM4pvoff = 0.0; if (!model->BSIM4pminvGiven) model->BSIM4pminv = 0.0; if (!model->BSIM4pminvcvGiven) model->BSIM4pminvcv = 0.0; if (!model->BSIM4pfproutGiven) model->BSIM4pfprout = 0.0; if (!model->BSIM4ppditsGiven) model->BSIM4ppdits = 0.0; if (!model->BSIM4ppditsdGiven) model->BSIM4ppditsd = 0.0; if (!model->BSIM4pdeltaGiven) model->BSIM4pdelta = 0.0; if (!model->BSIM4prdswGiven) model->BSIM4prdsw = 0.0; if (!model->BSIM4prdwGiven) model->BSIM4prdw = 0.0; if (!model->BSIM4prswGiven) model->BSIM4prsw = 0.0; if (!model->BSIM4pprwbGiven) model->BSIM4pprwb = 0.0; if (!model->BSIM4pprwgGiven) model->BSIM4pprwg = 0.0; if (!model->BSIM4pprtGiven) model->BSIM4pprt = 0.0; if (!model->BSIM4peta0Given) model->BSIM4peta0 = 0.0; if (!model->BSIM4petabGiven) model->BSIM4petab = 0.0; if (!model->BSIM4ppclmGiven) model->BSIM4ppclm = 0.0; if (!model->BSIM4ppdibl1Given) model->BSIM4ppdibl1 = 0.0; if (!model->BSIM4ppdibl2Given) model->BSIM4ppdibl2 = 0.0; if (!model->BSIM4ppdiblbGiven) model->BSIM4ppdiblb = 0.0; if (!model->BSIM4ppscbe1Given) model->BSIM4ppscbe1 = 0.0; if (!model->BSIM4ppscbe2Given) model->BSIM4ppscbe2 = 0.0; if (!model->BSIM4ppvagGiven) model->BSIM4ppvag = 0.0; if (!model->BSIM4pwrGiven) model->BSIM4pwr = 0.0; if (!model->BSIM4pdwgGiven) model->BSIM4pdwg = 0.0; if (!model->BSIM4pdwbGiven) model->BSIM4pdwb = 0.0; if (!model->BSIM4pb0Given) model->BSIM4pb0 = 0.0; if (!model->BSIM4pb1Given) model->BSIM4pb1 = 0.0; if (!model->BSIM4palpha0Given) model->BSIM4palpha0 = 0.0; if (!model->BSIM4palpha1Given) model->BSIM4palpha1 = 0.0; if (!model->BSIM4pbeta0Given) model->BSIM4pbeta0 = 0.0; if (!model->BSIM4pagidlGiven) model->BSIM4pagidl = 0.0; if (!model->BSIM4pbgidlGiven) model->BSIM4pbgidl = 0.0; if (!model->BSIM4pcgidlGiven) model->BSIM4pcgidl = 0.0; if (!model->BSIM4pegidlGiven) model->BSIM4pegidl = 0.0; if (!model->BSIM4prgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4prgidl = 0.0; if (!model->BSIM4pkgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4pkgidl = 0.0; if (!model->BSIM4pfgidlGiven) /* v4.7 New GIDL/GISL */ model->BSIM4pfgidl = 0.0; if (!model->BSIM4pagislGiven) { if (model->BSIM4pagidlGiven) model->BSIM4pagisl = model->BSIM4pagidl; else model->BSIM4pagisl = 0.0; } if (!model->BSIM4pbgislGiven) { if (model->BSIM4pbgidlGiven) model->BSIM4pbgisl = model->BSIM4pbgidl; else model->BSIM4pbgisl = 0.0; } if (!model->BSIM4pcgislGiven) { if (model->BSIM4pcgidlGiven) model->BSIM4pcgisl = model->BSIM4pcgidl; else model->BSIM4pcgisl = 0.0; } if (!model->BSIM4pegislGiven) { if (model->BSIM4pegidlGiven) model->BSIM4pegisl = model->BSIM4pegidl; else model->BSIM4pegisl = 0.0; } if (!model->BSIM4prgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4prgidlGiven) model->BSIM4prgisl = model->BSIM4prgidl; } if (!model->BSIM4pkgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4pkgidlGiven) model->BSIM4pkgisl = model->BSIM4pkgidl; } if (!model->BSIM4pfgislGiven) /* v4.7 New GIDL/GISL */ { if (model->BSIM4pfgidlGiven) model->BSIM4pfgisl = model->BSIM4pfgidl; } if (!model->BSIM4paigcGiven) model->BSIM4paigc = 0.0; if (!model->BSIM4pbigcGiven) model->BSIM4pbigc = 0.0; if (!model->BSIM4pcigcGiven) model->BSIM4pcigc = 0.0; if (!model->BSIM4aigsdGiven && (model->BSIM4aigsGiven || model->BSIM4aigdGiven)) { if (!model->BSIM4paigsGiven) model->BSIM4paigs = 0.0; if (!model->BSIM4paigdGiven) model->BSIM4paigd = 0.0; } else { if (!model->BSIM4paigsdGiven) model->BSIM4paigsd = 0.0; model->BSIM4paigs = model->BSIM4paigd = model->BSIM4paigsd; } if (!model->BSIM4bigsdGiven && (model->BSIM4bigsGiven || model->BSIM4bigdGiven)) { if (!model->BSIM4pbigsGiven) model->BSIM4pbigs = 0.0; if (!model->BSIM4pbigdGiven) model->BSIM4pbigd = 0.0; } else { if (!model->BSIM4pbigsdGiven) model->BSIM4pbigsd = 0.0; model->BSIM4pbigs = model->BSIM4pbigd = model->BSIM4pbigsd; } if (!model->BSIM4cigsdGiven && (model->BSIM4cigsGiven || model->BSIM4cigdGiven)) { if (!model->BSIM4pcigsGiven) model->BSIM4pcigs = 0.0; if (!model->BSIM4pcigdGiven) model->BSIM4pcigd = 0.0; } else { if (!model->BSIM4pcigsdGiven) model->BSIM4pcigsd = 0.0; model->BSIM4pcigs = model->BSIM4pcigd = model->BSIM4pcigsd; } if (!model->BSIM4paigbaccGiven) model->BSIM4paigbacc = 0.0; if (!model->BSIM4pbigbaccGiven) model->BSIM4pbigbacc = 0.0; if (!model->BSIM4pcigbaccGiven) model->BSIM4pcigbacc = 0.0; if (!model->BSIM4paigbinvGiven) model->BSIM4paigbinv = 0.0; if (!model->BSIM4pbigbinvGiven) model->BSIM4pbigbinv = 0.0; if (!model->BSIM4pcigbinvGiven) model->BSIM4pcigbinv = 0.0; if (!model->BSIM4pnigcGiven) model->BSIM4pnigc = 0.0; if (!model->BSIM4pnigbinvGiven) model->BSIM4pnigbinv = 0.0; if (!model->BSIM4pnigbaccGiven) model->BSIM4pnigbacc = 0.0; if (!model->BSIM4pntoxGiven) model->BSIM4pntox = 0.0; if (!model->BSIM4peigbinvGiven) model->BSIM4peigbinv = 0.0; if (!model->BSIM4ppigcdGiven) model->BSIM4ppigcd = 0.0; if (!model->BSIM4ppoxedgeGiven) model->BSIM4ppoxedge = 0.0; if (!model->BSIM4pxrcrg1Given) model->BSIM4pxrcrg1 = 0.0; if (!model->BSIM4pxrcrg2Given) model->BSIM4pxrcrg2 = 0.0; if (!model->BSIM4peuGiven) model->BSIM4peu = 0.0; if (!model->BSIM4pucsGiven) model->BSIM4pucs = 0.0; if (!model->BSIM4pvfbGiven) model->BSIM4pvfb = 0.0; if (!model->BSIM4plambdaGiven) model->BSIM4plambda = 0.0; if (!model->BSIM4pvtlGiven) model->BSIM4pvtl = 0.0; if (!model->BSIM4pxnGiven) model->BSIM4pxn = 0.0; if (!model->BSIM4pvfbsdoffGiven) model->BSIM4pvfbsdoff = 0.0; if (!model->BSIM4ptvfbsdoffGiven) model->BSIM4ptvfbsdoff = 0.0; if (!model->BSIM4ptvoffGiven) model->BSIM4ptvoff = 0.0; if (!model->BSIM4ptnfactorGiven) /* v4.7 temp dep of leakage current */ model->BSIM4ptnfactor = 0.0; if (!model->BSIM4pteta0Given) /* v4.7 temp dep of leakage current */ model->BSIM4pteta0 = 0.0; if (!model->BSIM4ptvoffcvGiven) /* v4.7 temp dep of leakage current */ model->BSIM4ptvoffcv = 0.0; if (!model->BSIM4pcgslGiven) model->BSIM4pcgsl = 0.0; if (!model->BSIM4pcgdlGiven) model->BSIM4pcgdl = 0.0; if (!model->BSIM4pckappasGiven) model->BSIM4pckappas = 0.0; if (!model->BSIM4pckappadGiven) model->BSIM4pckappad = 0.0; if (!model->BSIM4pcfGiven) model->BSIM4pcf = 0.0; if (!model->BSIM4pclcGiven) model->BSIM4pclc = 0.0; if (!model->BSIM4pcleGiven) model->BSIM4pcle = 0.0; if (!model->BSIM4pvfbcvGiven) model->BSIM4pvfbcv = 0.0; if (!model->BSIM4pacdeGiven) model->BSIM4pacde = 0.0; if (!model->BSIM4pmoinGiven) model->BSIM4pmoin = 0.0; if (!model->BSIM4pnoffGiven) model->BSIM4pnoff = 0.0; if (!model->BSIM4pvoffcvGiven) model->BSIM4pvoffcv = 0.0; if (!model->BSIM4gamma1Given) model->BSIM4gamma1 = 0.0; if (!model->BSIM4lgamma1Given) model->BSIM4lgamma1 = 0.0; if (!model->BSIM4wgamma1Given) model->BSIM4wgamma1 = 0.0; if (!model->BSIM4pgamma1Given) model->BSIM4pgamma1 = 0.0; if (!model->BSIM4gamma2Given) model->BSIM4gamma2 = 0.0; if (!model->BSIM4lgamma2Given) model->BSIM4lgamma2 = 0.0; if (!model->BSIM4wgamma2Given) model->BSIM4wgamma2 = 0.0; if (!model->BSIM4pgamma2Given) model->BSIM4pgamma2 = 0.0; if (!model->BSIM4vbxGiven) model->BSIM4vbx = 0.0; if (!model->BSIM4lvbxGiven) model->BSIM4lvbx = 0.0; if (!model->BSIM4wvbxGiven) model->BSIM4wvbx = 0.0; if (!model->BSIM4pvbxGiven) model->BSIM4pvbx = 0.0; /* unit degree celcius */ if (!model->BSIM4tnomGiven) model->BSIM4tnom = ckt->CKTnomTemp; if (!model->BSIM4LintGiven) model->BSIM4Lint = 0.0; if (!model->BSIM4LlGiven) model->BSIM4Ll = 0.0; if (!model->BSIM4LlcGiven) model->BSIM4Llc = model->BSIM4Ll; if (!model->BSIM4LlnGiven) model->BSIM4Lln = 1.0; if (!model->BSIM4LwGiven) model->BSIM4Lw = 0.0; if (!model->BSIM4LwcGiven) model->BSIM4Lwc = model->BSIM4Lw; if (!model->BSIM4LwnGiven) model->BSIM4Lwn = 1.0; if (!model->BSIM4LwlGiven) model->BSIM4Lwl = 0.0; if (!model->BSIM4LwlcGiven) model->BSIM4Lwlc = model->BSIM4Lwl; if (!model->BSIM4LminGiven) model->BSIM4Lmin = 0.0; if (!model->BSIM4LmaxGiven) model->BSIM4Lmax = 1.0; if (!model->BSIM4WintGiven) model->BSIM4Wint = 0.0; if (!model->BSIM4WlGiven) model->BSIM4Wl = 0.0; if (!model->BSIM4WlcGiven) model->BSIM4Wlc = model->BSIM4Wl; if (!model->BSIM4WlnGiven) model->BSIM4Wln = 1.0; if (!model->BSIM4WwGiven) model->BSIM4Ww = 0.0; if (!model->BSIM4WwcGiven) model->BSIM4Wwc = model->BSIM4Ww; if (!model->BSIM4WwnGiven) model->BSIM4Wwn = 1.0; if (!model->BSIM4WwlGiven) model->BSIM4Wwl = 0.0; if (!model->BSIM4WwlcGiven) model->BSIM4Wwlc = model->BSIM4Wwl; if (!model->BSIM4WminGiven) model->BSIM4Wmin = 0.0; if (!model->BSIM4WmaxGiven) model->BSIM4Wmax = 1.0; if (!model->BSIM4dwcGiven) model->BSIM4dwc = model->BSIM4Wint; if (!model->BSIM4dlcGiven) model->BSIM4dlc = model->BSIM4Lint; if (!model->BSIM4xlGiven) model->BSIM4xl = 0.0; if (!model->BSIM4xwGiven) model->BSIM4xw = 0.0; if (!model->BSIM4dlcigGiven) model->BSIM4dlcig = model->BSIM4Lint; if (!model->BSIM4dlcigdGiven) { if (model->BSIM4dlcigGiven) model->BSIM4dlcigd = model->BSIM4dlcig; else model->BSIM4dlcigd = model->BSIM4Lint; } if (!model->BSIM4dwjGiven) model->BSIM4dwj = model->BSIM4dwc; if (!model->BSIM4cfGiven) model->BSIM4cf = 2.0 * model->BSIM4epsrox * EPS0 / PI * log(1.0 + 0.4e-6 / model->BSIM4toxe); if (!model->BSIM4xpartGiven) model->BSIM4xpart = 0.0; if (!model->BSIM4sheetResistanceGiven) model->BSIM4sheetResistance = 0.0; if (!model->BSIM4SunitAreaJctCapGiven) model->BSIM4SunitAreaJctCap = 5.0E-4; if (!model->BSIM4DunitAreaJctCapGiven) model->BSIM4DunitAreaJctCap = model->BSIM4SunitAreaJctCap; if (!model->BSIM4SunitLengthSidewallJctCapGiven) model->BSIM4SunitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM4DunitLengthSidewallJctCapGiven) model->BSIM4DunitLengthSidewallJctCap = model->BSIM4SunitLengthSidewallJctCap; if (!model->BSIM4SunitLengthGateSidewallJctCapGiven) model->BSIM4SunitLengthGateSidewallJctCap = model->BSIM4SunitLengthSidewallJctCap ; if (!model->BSIM4DunitLengthGateSidewallJctCapGiven) model->BSIM4DunitLengthGateSidewallJctCap = model->BSIM4SunitLengthGateSidewallJctCap; if (!model->BSIM4SjctSatCurDensityGiven) model->BSIM4SjctSatCurDensity = 1.0E-4; if (!model->BSIM4DjctSatCurDensityGiven) model->BSIM4DjctSatCurDensity = model->BSIM4SjctSatCurDensity; if (!model->BSIM4SjctSidewallSatCurDensityGiven) model->BSIM4SjctSidewallSatCurDensity = 0.0; if (!model->BSIM4DjctSidewallSatCurDensityGiven) model->BSIM4DjctSidewallSatCurDensity = model->BSIM4SjctSidewallSatCurDensity; if (!model->BSIM4SjctGateSidewallSatCurDensityGiven) model->BSIM4SjctGateSidewallSatCurDensity = 0.0; if (!model->BSIM4DjctGateSidewallSatCurDensityGiven) model->BSIM4DjctGateSidewallSatCurDensity = model->BSIM4SjctGateSidewallSatCurDensity; if (!model->BSIM4SbulkJctPotentialGiven) model->BSIM4SbulkJctPotential = 1.0; if (!model->BSIM4DbulkJctPotentialGiven) model->BSIM4DbulkJctPotential = model->BSIM4SbulkJctPotential; if (!model->BSIM4SsidewallJctPotentialGiven) model->BSIM4SsidewallJctPotential = 1.0; if (!model->BSIM4DsidewallJctPotentialGiven) model->BSIM4DsidewallJctPotential = model->BSIM4SsidewallJctPotential; if (!model->BSIM4SGatesidewallJctPotentialGiven) model->BSIM4SGatesidewallJctPotential = model->BSIM4SsidewallJctPotential; if (!model->BSIM4DGatesidewallJctPotentialGiven) model->BSIM4DGatesidewallJctPotential = model->BSIM4SGatesidewallJctPotential; if (!model->BSIM4SbulkJctBotGradingCoeffGiven) model->BSIM4SbulkJctBotGradingCoeff = 0.5; if (!model->BSIM4DbulkJctBotGradingCoeffGiven) model->BSIM4DbulkJctBotGradingCoeff = model->BSIM4SbulkJctBotGradingCoeff; if (!model->BSIM4SbulkJctSideGradingCoeffGiven) model->BSIM4SbulkJctSideGradingCoeff = 0.33; if (!model->BSIM4DbulkJctSideGradingCoeffGiven) model->BSIM4DbulkJctSideGradingCoeff = model->BSIM4SbulkJctSideGradingCoeff; if (!model->BSIM4SbulkJctGateSideGradingCoeffGiven) model->BSIM4SbulkJctGateSideGradingCoeff = model->BSIM4SbulkJctSideGradingCoeff; if (!model->BSIM4DbulkJctGateSideGradingCoeffGiven) model->BSIM4DbulkJctGateSideGradingCoeff = model->BSIM4SbulkJctGateSideGradingCoeff; if (!model->BSIM4SjctEmissionCoeffGiven) model->BSIM4SjctEmissionCoeff = 1.0; if (!model->BSIM4DjctEmissionCoeffGiven) model->BSIM4DjctEmissionCoeff = model->BSIM4SjctEmissionCoeff; if (!model->BSIM4SjctTempExponentGiven) model->BSIM4SjctTempExponent = 3.0; if (!model->BSIM4DjctTempExponentGiven) model->BSIM4DjctTempExponent = model->BSIM4SjctTempExponent; if (!model->BSIM4jtssGiven) model->BSIM4jtss = 0.0; if (!model->BSIM4jtsdGiven) model->BSIM4jtsd = model->BSIM4jtss; if (!model->BSIM4jtsswsGiven) model->BSIM4jtssws = 0.0; if (!model->BSIM4jtsswdGiven) model->BSIM4jtsswd = model->BSIM4jtssws; if (!model->BSIM4jtsswgsGiven) model->BSIM4jtsswgs = 0.0; if (!model->BSIM4jtsswgdGiven) model->BSIM4jtsswgd = model->BSIM4jtsswgs; if (!model->BSIM4jtweffGiven) model->BSIM4jtweff = 0.0; if (!model->BSIM4njtsGiven) model->BSIM4njts = 20.0; if (!model->BSIM4njtsswGiven) model->BSIM4njtssw = 20.0; if (!model->BSIM4njtsswgGiven) model->BSIM4njtsswg = 20.0; if (!model->BSIM4njtsdGiven) { if (model->BSIM4njtsGiven) model->BSIM4njtsd = model->BSIM4njts; else model->BSIM4njtsd = 20.0; } if (!model->BSIM4njtsswdGiven) { if (model->BSIM4njtsswGiven) model->BSIM4njtsswd = model->BSIM4njtssw; else model->BSIM4njtsswd = 20.0; } if (!model->BSIM4njtsswgdGiven) { if (model->BSIM4njtsswgGiven) model->BSIM4njtsswgd = model->BSIM4njtsswg; else model->BSIM4njtsswgd = 20.0; } if (!model->BSIM4xtssGiven) model->BSIM4xtss = 0.02; if (!model->BSIM4xtsdGiven) model->BSIM4xtsd = model->BSIM4xtss; if (!model->BSIM4xtsswsGiven) model->BSIM4xtssws = 0.02; if (!model->BSIM4xtsswdGiven) model->BSIM4xtsswd = model->BSIM4xtssws; if (!model->BSIM4xtsswgsGiven) model->BSIM4xtsswgs = 0.02; if (!model->BSIM4xtsswgdGiven) model->BSIM4xtsswgd = model->BSIM4xtsswgs; if (!model->BSIM4tnjtsGiven) model->BSIM4tnjts = 0.0; if (!model->BSIM4tnjtsswGiven) model->BSIM4tnjtssw = 0.0; if (!model->BSIM4tnjtsswgGiven) model->BSIM4tnjtsswg = 0.0; if (!model->BSIM4tnjtsdGiven) { if (model->BSIM4tnjtsGiven) model->BSIM4tnjtsd = model->BSIM4tnjts; else model->BSIM4tnjtsd = 0.0; } if (!model->BSIM4tnjtsswdGiven) { if (model->BSIM4tnjtsswGiven) model->BSIM4tnjtsswd = model->BSIM4tnjtssw; else model->BSIM4tnjtsswd = 0.0; } if (!model->BSIM4tnjtsswgdGiven) { if (model->BSIM4tnjtsswgGiven) model->BSIM4tnjtsswgd = model->BSIM4tnjtsswg; else model->BSIM4tnjtsswgd = 0.0; } if (!model->BSIM4vtssGiven) model->BSIM4vtss = 10.0; if (!model->BSIM4vtsdGiven) model->BSIM4vtsd = model->BSIM4vtss; if (!model->BSIM4vtsswsGiven) model->BSIM4vtssws = 10.0; if (!model->BSIM4vtsswdGiven) model->BSIM4vtsswd = model->BSIM4vtssws; if (!model->BSIM4vtsswgsGiven) model->BSIM4vtsswgs = 10.0; if (!model->BSIM4vtsswgdGiven) model->BSIM4vtsswgd = model->BSIM4vtsswgs; if (!model->BSIM4oxideTrapDensityAGiven) { if (model->BSIM4type == NMOS) model->BSIM4oxideTrapDensityA = 6.25e41; else model->BSIM4oxideTrapDensityA= 6.188e40; } if (!model->BSIM4oxideTrapDensityBGiven) { if (model->BSIM4type == NMOS) model->BSIM4oxideTrapDensityB = 3.125e26; else model->BSIM4oxideTrapDensityB = 1.5e25; } if (!model->BSIM4oxideTrapDensityCGiven) model->BSIM4oxideTrapDensityC = 8.75e9; if (!model->BSIM4emGiven) model->BSIM4em = 4.1e7; /* V/m */ if (!model->BSIM4efGiven) model->BSIM4ef = 1.0; if (!model->BSIM4afGiven) model->BSIM4af = 1.0; if (!model->BSIM4kfGiven) model->BSIM4kf = 0.0; if (!model->BSIM4vgsMaxGiven) model->BSIM4vgsMax = 1e99; if (!model->BSIM4vgdMaxGiven) model->BSIM4vgdMax = 1e99; if (!model->BSIM4vgbMaxGiven) model->BSIM4vgbMax = 1e99; if (!model->BSIM4vdsMaxGiven) model->BSIM4vdsMax = 1e99; if (!model->BSIM4vbsMaxGiven) model->BSIM4vbsMax = 1e99; if (!model->BSIM4vbdMaxGiven) model->BSIM4vbdMax = 1e99; /* stress effect */ if (!model->BSIM4sarefGiven) model->BSIM4saref = 1e-6; /* m */ if (!model->BSIM4sbrefGiven) model->BSIM4sbref = 1e-6; /* m */ if (!model->BSIM4wlodGiven) model->BSIM4wlod = 0; /* m */ if (!model->BSIM4ku0Given) model->BSIM4ku0 = 0; /* 1/m */ if (!model->BSIM4kvsatGiven) model->BSIM4kvsat = 0; if (!model->BSIM4kvth0Given) /* m */ model->BSIM4kvth0 = 0; if (!model->BSIM4tku0Given) model->BSIM4tku0 = 0; if (!model->BSIM4llodku0Given) model->BSIM4llodku0 = 0; if (!model->BSIM4wlodku0Given) model->BSIM4wlodku0 = 0; if (!model->BSIM4llodvthGiven) model->BSIM4llodvth = 0; if (!model->BSIM4wlodvthGiven) model->BSIM4wlodvth = 0; if (!model->BSIM4lku0Given) model->BSIM4lku0 = 0; if (!model->BSIM4wku0Given) model->BSIM4wku0 = 0; if (!model->BSIM4pku0Given) model->BSIM4pku0 = 0; if (!model->BSIM4lkvth0Given) model->BSIM4lkvth0 = 0; if (!model->BSIM4wkvth0Given) model->BSIM4wkvth0 = 0; if (!model->BSIM4pkvth0Given) model->BSIM4pkvth0 = 0; if (!model->BSIM4stk2Given) model->BSIM4stk2 = 0; if (!model->BSIM4lodk2Given) model->BSIM4lodk2 = 1.0; if (!model->BSIM4steta0Given) model->BSIM4steta0 = 0; if (!model->BSIM4lodeta0Given) model->BSIM4lodeta0 = 1.0; /* Well Proximity Effect */ if (!model->BSIM4webGiven) model->BSIM4web = 0.0; if (!model->BSIM4wecGiven) model->BSIM4wec = 0.0; if (!model->BSIM4kvth0weGiven) model->BSIM4kvth0we = 0.0; if (!model->BSIM4k2weGiven) model->BSIM4k2we = 0.0; if (!model->BSIM4ku0weGiven) model->BSIM4ku0we = 0.0; if (!model->BSIM4screfGiven) model->BSIM4scref = 1.0E-6; /* m */ if (!model->BSIM4wpemodGiven) model->BSIM4wpemod = 0; else if ((model->BSIM4wpemod != 0) && (model->BSIM4wpemod != 1)) { model->BSIM4wpemod = 0; printf("Warning: wpemod has been set to its default value: 0.\n"); } if (!model->BSIM4lkvth0weGiven) model->BSIM4lkvth0we = 0; if (!model->BSIM4lk2weGiven) model->BSIM4lk2we = 0; if (!model->BSIM4lku0weGiven) model->BSIM4lku0we = 0; if (!model->BSIM4wkvth0weGiven) model->BSIM4wkvth0we = 0; if (!model->BSIM4wk2weGiven) model->BSIM4wk2we = 0; if (!model->BSIM4wku0weGiven) model->BSIM4wku0we = 0; if (!model->BSIM4pkvth0weGiven) model->BSIM4pkvth0we = 0; if (!model->BSIM4pk2weGiven) model->BSIM4pk2we = 0; if (!model->BSIM4pku0weGiven) model->BSIM4pku0we = 0; DMCGeff = model->BSIM4dmcg - model->BSIM4dmcgt; DMCIeff = model->BSIM4dmci; DMDGeff = model->BSIM4dmdg - model->BSIM4dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ for (here = model->BSIM4instances; here != NULL ; here=here->BSIM4nextInstance) { /* allocate a chunk of the state vector */ here->BSIM4states = *states; *states += BSIM4numStates; /* perform the parameter defaulting */ if (!here->BSIM4lGiven) here->BSIM4l = 5.0e-6; if (!here->BSIM4wGiven) here->BSIM4w = 5.0e-6; if (!here->BSIM4mGiven) here->BSIM4m = 1.0; if (!here->BSIM4nfGiven) here->BSIM4nf = 1.0; if (!here->BSIM4minGiven) here->BSIM4min = 0; /* integer */ if (!here->BSIM4icVDSGiven) here->BSIM4icVDS = 0.0; if (!here->BSIM4icVGSGiven) here->BSIM4icVGS = 0.0; if (!here->BSIM4icVBSGiven) here->BSIM4icVBS = 0.0; if (!here->BSIM4drainAreaGiven) here->BSIM4drainArea = 0.0; if (!here->BSIM4drainPerimeterGiven) here->BSIM4drainPerimeter = 0.0; if (!here->BSIM4drainSquaresGiven) here->BSIM4drainSquares = 1.0; if (!here->BSIM4sourceAreaGiven) here->BSIM4sourceArea = 0.0; if (!here->BSIM4sourcePerimeterGiven) here->BSIM4sourcePerimeter = 0.0; if (!here->BSIM4sourceSquaresGiven) here->BSIM4sourceSquares = 1.0; if (!here->BSIM4rbdbGiven) here->BSIM4rbdb = model->BSIM4rbdb; /* in ohm */ if (!here->BSIM4rbsbGiven) here->BSIM4rbsb = model->BSIM4rbsb; if (!here->BSIM4rbpbGiven) here->BSIM4rbpb = model->BSIM4rbpb; if (!here->BSIM4rbpsGiven) here->BSIM4rbps = model->BSIM4rbps; if (!here->BSIM4rbpdGiven) here->BSIM4rbpd = model->BSIM4rbpd; if (!here->BSIM4delvtoGiven) here->BSIM4delvto = 0.0; if (!here->BSIM4xgwGiven) here->BSIM4xgw = model->BSIM4xgw; if (!here->BSIM4ngconGiven) here->BSIM4ngcon = model->BSIM4ngcon; /* Process instance model selectors, some * may override their global counterparts */ if (!here->BSIM4rbodyModGiven) here->BSIM4rbodyMod = model->BSIM4rbodyMod; else if ((here->BSIM4rbodyMod != 0) && (here->BSIM4rbodyMod != 1) && (here->BSIM4rbodyMod != 2)) { here->BSIM4rbodyMod = model->BSIM4rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", model->BSIM4rbodyMod); } if (!here->BSIM4rgateModGiven) here->BSIM4rgateMod = model->BSIM4rgateMod; else if ((here->BSIM4rgateMod != 0) && (here->BSIM4rgateMod != 1) && (here->BSIM4rgateMod != 2) && (here->BSIM4rgateMod != 3)) { here->BSIM4rgateMod = model->BSIM4rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->BSIM4rgateMod); } if (!here->BSIM4geoModGiven) here->BSIM4geoMod = model->BSIM4geoMod; if (!here->BSIM4rgeoModGiven) here->BSIM4rgeoMod = model->BSIM4rgeoMod; else if ((here->BSIM4rgeoMod != 0) && (here->BSIM4rgeoMod != 1)) { here->BSIM4rgeoMod = model->BSIM4rgeoMod; printf("Warning: rgeoMod has been set to its global value %d.\n", model->BSIM4rgeoMod); } if (!here->BSIM4trnqsModGiven) here->BSIM4trnqsMod = model->BSIM4trnqsMod; else if ((here->BSIM4trnqsMod != 0) && (here->BSIM4trnqsMod != 1)) { here->BSIM4trnqsMod = model->BSIM4trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", model->BSIM4trnqsMod); } if (!here->BSIM4acnqsModGiven) here->BSIM4acnqsMod = model->BSIM4acnqsMod; else if ((here->BSIM4acnqsMod != 0) && (here->BSIM4acnqsMod != 1)) { here->BSIM4acnqsMod = model->BSIM4acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM4acnqsMod); } /* stress effect */ if (!here->BSIM4saGiven) here->BSIM4sa = 0.0; if (!here->BSIM4sbGiven) here->BSIM4sb = 0.0; if (!here->BSIM4sdGiven) here->BSIM4sd = 2 * model->BSIM4dmcg; /* Well Proximity Effect */ if (!here->BSIM4scaGiven) here->BSIM4sca = 0.0; if (!here->BSIM4scbGiven) here->BSIM4scb = 0.0; if (!here->BSIM4sccGiven) here->BSIM4scc = 0.0; if (!here->BSIM4scGiven) here->BSIM4sc = 0.0; /* m */ /* process drain series resistance */ createNode = 0; if ( (model->BSIM4rdsMod != 0) || (model->BSIM4tnoiMod == 1 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4sheetResistance > 0) { if (here->BSIM4drainSquaresGiven && here->BSIM4drainSquares > 0) { createNode = 1; } else if (!here->BSIM4drainSquaresGiven && (here->BSIM4rgeoMod != 0)) { BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, here->BSIM4w, model->BSIM4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if ( here->BSIM4dNodePrime == 0 ) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"drain"); if(error) return(error); here->BSIM4dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->BSIM4dNodePrime = here->BSIM4dNode; } /* process source series resistance */ createNode = 0; if ( (model->BSIM4rdsMod != 0) || (model->BSIM4tnoiMod == 1 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4sheetResistance > 0) { if (here->BSIM4sourceSquaresGiven && here->BSIM4sourceSquares > 0) { createNode = 1; } else if (!here->BSIM4sourceSquaresGiven && (here->BSIM4rgeoMod != 0)) { BSIM4RdseffGeo(here->BSIM4nf*here->BSIM4m, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, here->BSIM4w, model->BSIM4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if ( here->BSIM4sNodePrime == 0 ) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"source"); if(error) return(error); here->BSIM4sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4sNodePrime = here->BSIM4sNode; if ( here->BSIM4rgateMod > 0 ) { if ( here->BSIM4gNodePrime == 0 ) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"gate"); if(error) return(error); here->BSIM4gNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,2,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else here->BSIM4gNodePrime = here->BSIM4gNodeExt; if ( here->BSIM4rgateMod == 3 ) { if ( here->BSIM4gNodeMid == 0 ) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"midgate"); if(error) return(error); here->BSIM4gNodeMid = tmp->number; } } else here->BSIM4gNodeMid = here->BSIM4gNodeExt; /* internal body nodes for body resistance model */ if ((here->BSIM4rbodyMod ==1) || (here->BSIM4rbodyMod ==2)) { if (here->BSIM4dbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"dbody"); if(error) return(error); here->BSIM4dbNode = tmp->number; } if (here->BSIM4bNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"body"); if(error) return(error); here->BSIM4bNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,4,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } if (here->BSIM4sbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"sbody"); if(error) return(error); here->BSIM4sbNode = tmp->number; } } else here->BSIM4dbNode = here->BSIM4bNodePrime = here->BSIM4sbNode = here->BSIM4bNode; /* NQS node */ if ( here->BSIM4trnqsMod ) { if ( here->BSIM4qNode == 0 ) { error = CKTmkVolt(ckt,&tmp,here->BSIM4name,"charge"); if(error) return(error); here->BSIM4qNode = tmp->number; } } else here->BSIM4qNode = 0; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM4DPbpPtr, BSIM4dNodePrime, BSIM4bNodePrime); TSTALLOC(BSIM4GPbpPtr, BSIM4gNodePrime, BSIM4bNodePrime); TSTALLOC(BSIM4SPbpPtr, BSIM4sNodePrime, BSIM4bNodePrime); TSTALLOC(BSIM4BPdpPtr, BSIM4bNodePrime, BSIM4dNodePrime); TSTALLOC(BSIM4BPgpPtr, BSIM4bNodePrime, BSIM4gNodePrime); TSTALLOC(BSIM4BPspPtr, BSIM4bNodePrime, BSIM4sNodePrime); TSTALLOC(BSIM4BPbpPtr, BSIM4bNodePrime, BSIM4bNodePrime); TSTALLOC(BSIM4DdPtr, BSIM4dNode, BSIM4dNode); TSTALLOC(BSIM4GPgpPtr, BSIM4gNodePrime, BSIM4gNodePrime); TSTALLOC(BSIM4SsPtr, BSIM4sNode, BSIM4sNode); TSTALLOC(BSIM4DPdpPtr, BSIM4dNodePrime, BSIM4dNodePrime); TSTALLOC(BSIM4SPspPtr, BSIM4sNodePrime, BSIM4sNodePrime); TSTALLOC(BSIM4DdpPtr, BSIM4dNode, BSIM4dNodePrime); TSTALLOC(BSIM4GPdpPtr, BSIM4gNodePrime, BSIM4dNodePrime); TSTALLOC(BSIM4GPspPtr, BSIM4gNodePrime, BSIM4sNodePrime); TSTALLOC(BSIM4SspPtr, BSIM4sNode, BSIM4sNodePrime); TSTALLOC(BSIM4DPspPtr, BSIM4dNodePrime, BSIM4sNodePrime); TSTALLOC(BSIM4DPdPtr, BSIM4dNodePrime, BSIM4dNode); TSTALLOC(BSIM4DPgpPtr, BSIM4dNodePrime, BSIM4gNodePrime); TSTALLOC(BSIM4SPgpPtr, BSIM4sNodePrime, BSIM4gNodePrime); TSTALLOC(BSIM4SPsPtr, BSIM4sNodePrime, BSIM4sNode); TSTALLOC(BSIM4SPdpPtr, BSIM4sNodePrime, BSIM4dNodePrime); TSTALLOC(BSIM4QqPtr, BSIM4qNode, BSIM4qNode); TSTALLOC(BSIM4QbpPtr, BSIM4qNode, BSIM4bNodePrime) ; TSTALLOC(BSIM4QdpPtr, BSIM4qNode, BSIM4dNodePrime); TSTALLOC(BSIM4QspPtr, BSIM4qNode, BSIM4sNodePrime); TSTALLOC(BSIM4QgpPtr, BSIM4qNode, BSIM4gNodePrime); TSTALLOC(BSIM4DPqPtr, BSIM4dNodePrime, BSIM4qNode); TSTALLOC(BSIM4SPqPtr, BSIM4sNodePrime, BSIM4qNode); TSTALLOC(BSIM4GPqPtr, BSIM4gNodePrime, BSIM4qNode); if (here->BSIM4rgateMod != 0) { TSTALLOC(BSIM4GEgePtr, BSIM4gNodeExt, BSIM4gNodeExt); TSTALLOC(BSIM4GEgpPtr, BSIM4gNodeExt, BSIM4gNodePrime); TSTALLOC(BSIM4GPgePtr, BSIM4gNodePrime, BSIM4gNodeExt); TSTALLOC(BSIM4GEdpPtr, BSIM4gNodeExt, BSIM4dNodePrime); TSTALLOC(BSIM4GEspPtr, BSIM4gNodeExt, BSIM4sNodePrime); TSTALLOC(BSIM4GEbpPtr, BSIM4gNodeExt, BSIM4bNodePrime); TSTALLOC(BSIM4GMdpPtr, BSIM4gNodeMid, BSIM4dNodePrime); TSTALLOC(BSIM4GMgpPtr, BSIM4gNodeMid, BSIM4gNodePrime); TSTALLOC(BSIM4GMgmPtr, BSIM4gNodeMid, BSIM4gNodeMid); TSTALLOC(BSIM4GMgePtr, BSIM4gNodeMid, BSIM4gNodeExt); TSTALLOC(BSIM4GMspPtr, BSIM4gNodeMid, BSIM4sNodePrime); TSTALLOC(BSIM4GMbpPtr, BSIM4gNodeMid, BSIM4bNodePrime); TSTALLOC(BSIM4DPgmPtr, BSIM4dNodePrime, BSIM4gNodeMid); TSTALLOC(BSIM4GPgmPtr, BSIM4gNodePrime, BSIM4gNodeMid); TSTALLOC(BSIM4GEgmPtr, BSIM4gNodeExt, BSIM4gNodeMid); TSTALLOC(BSIM4SPgmPtr, BSIM4sNodePrime, BSIM4gNodeMid); TSTALLOC(BSIM4BPgmPtr, BSIM4bNodePrime, BSIM4gNodeMid); } if ((here->BSIM4rbodyMod ==1) || (here->BSIM4rbodyMod ==2)) { TSTALLOC(BSIM4DPdbPtr, BSIM4dNodePrime, BSIM4dbNode); TSTALLOC(BSIM4SPsbPtr, BSIM4sNodePrime, BSIM4sbNode); TSTALLOC(BSIM4DBdpPtr, BSIM4dbNode, BSIM4dNodePrime); TSTALLOC(BSIM4DBdbPtr, BSIM4dbNode, BSIM4dbNode); TSTALLOC(BSIM4DBbpPtr, BSIM4dbNode, BSIM4bNodePrime); TSTALLOC(BSIM4DBbPtr, BSIM4dbNode, BSIM4bNode); TSTALLOC(BSIM4BPdbPtr, BSIM4bNodePrime, BSIM4dbNode); TSTALLOC(BSIM4BPbPtr, BSIM4bNodePrime, BSIM4bNode); TSTALLOC(BSIM4BPsbPtr, BSIM4bNodePrime, BSIM4sbNode); TSTALLOC(BSIM4SBspPtr, BSIM4sbNode, BSIM4sNodePrime); TSTALLOC(BSIM4SBbpPtr, BSIM4sbNode, BSIM4bNodePrime); TSTALLOC(BSIM4SBbPtr, BSIM4sbNode, BSIM4bNode); TSTALLOC(BSIM4SBsbPtr, BSIM4sbNode, BSIM4sbNode); TSTALLOC(BSIM4BdbPtr, BSIM4bNode, BSIM4dbNode); TSTALLOC(BSIM4BbpPtr, BSIM4bNode, BSIM4bNodePrime); TSTALLOC(BSIM4BsbPtr, BSIM4bNode, BSIM4sbNode); TSTALLOC(BSIM4BbPtr, BSIM4bNode, BSIM4bNode); } if (model->BSIM4rdsMod) { TSTALLOC(BSIM4DgpPtr, BSIM4dNode, BSIM4gNodePrime); TSTALLOC(BSIM4DspPtr, BSIM4dNode, BSIM4sNodePrime); TSTALLOC(BSIM4DbpPtr, BSIM4dNode, BSIM4bNodePrime); TSTALLOC(BSIM4SdpPtr, BSIM4sNode, BSIM4dNodePrime); TSTALLOC(BSIM4SgpPtr, BSIM4sNode, BSIM4gNodePrime); TSTALLOC(BSIM4SbpPtr, BSIM4sNode, BSIM4bNodePrime); } } } #ifdef USE_OMP InstCount = 0; model = (BSIM4model*)inModel; /* loop through all the BSIM4 device models to count the number of instances */ for( ; model != NULL; model = model->BSIM4nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM4instances; here != NULL ; here=here->BSIM4nextInstance) { InstCount++; } } InstArray = TMALLOC(BSIM4instance*, InstCount); model = (BSIM4model*)inModel; idx = 0; for( ; model != NULL; model = model->BSIM4nextModel ) { /* loop through all the instances of the model */ for (here = model->BSIM4instances; here != NULL ; here=here->BSIM4nextInstance) { InstArray[idx] = here; idx++; } /* set the array pointer and instance count into each model */ model->BSIM4InstCount = InstCount; model->BSIM4InstanceArray = InstArray; } #endif return(OK); } int BSIM4unsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM BSIM4model *model; BSIM4instance *here; for (model = (BSIM4model *)inModel; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here != NULL; here=here->BSIM4nextInstance) { if (here->BSIM4dNodePrime && here->BSIM4dNodePrime != here->BSIM4dNode) { CKTdltNNum(ckt, here->BSIM4dNodePrime); here->BSIM4dNodePrime = 0; } if (here->BSIM4sNodePrime && here->BSIM4sNodePrime != here->BSIM4sNode) { CKTdltNNum(ckt, here->BSIM4sNodePrime); here->BSIM4sNodePrime = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/bsim4/b4geo.c0000644000265600020320000003047112264261473020423 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4geo.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" /* * WDLiu: * This subrutine is a special module to process the geometry dependent * parasitics for BSIM4, which calculates Ps, Pd, As, Ad, and Rs and Rd * for multi-fingers and varous GEO and RGEO options. */ static int BSIM4NumFingerDiff( double nf, int minSD, double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS) { int NF; NF = (int)nf; if ((NF%2) != 0) { *nuEndD = *nuEndS = 1.0; *nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); } else { if (minSD == 1) /* minimize # of source */ { *nuEndD = 2.0; *nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); *nuEndS = 0.0; *nuIntS = nf; } else { *nuEndD = 0.0; *nuIntD = nf; *nuEndS = 2.0; *nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); } } return 0; } int BSIM4PAeffGeo( double nf, int geo, int minSD, double Weffcj, double DMCG, double DMCI, double DMDG, double *Ps, double *Pd, double *As, double *Ad) { double T0, T1, T2; double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ BSIM4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); T0 = DMCG + DMCI; T1 = DMCG + DMCG; T2 = DMDG + DMDG; PSiso = PDiso = T0 + T0 + Weffcj; PSsha = PDsha = T1; PSmer = PDmer = T2; ASiso = ADiso = T0 * Weffcj; ASsha = ADsha = DMCG * Weffcj; ASmer = ADmer = DMDG * Weffcj; switch(geo) { case 0: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 1: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 2: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 3: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 4: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 5: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 6: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 7: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 8: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 9: /* geo = 9 and 10 happen only when nf = even */ *Ps = PSiso + (nf - 1.0) * PSsha; *Pd = nf * PDsha; *As = ASiso + (nf - 1.0) * ASsha; *Ad = nf * ADsha; break; case 10: *Ps = nf * PSsha; *Pd = PDiso + (nf - 1.0) * PDsha; *As = nf * ASsha; *Ad = ADiso + (nf - 1.0) * ADsha; break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } return 0; } int BSIM4RdseffGeo( double nf, int geo, int rgeo, int minSD, double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, int Type, double *Rtot) { double Rint=0.0, Rend = 0.0; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ { BSIM4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); /* Internal S/D resistance -- assume shared S or D and all wide contacts */ if (Type == 1) { if (nuIntS == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntS); } else { if (nuIntD == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntD); } } /* End S/D resistance -- geo dependent */ switch(geo) { case 0: if (Type == 1) BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 1: if (Type == 1) BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 2: if (Type == 1) BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 3: if (Type == 1) BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 4: if (Type == 1) BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / Weffcj; break; case 5: if (Type == 1) BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / (Weffcj * nuEndD); break; case 6: if (Type == 1) Rend = Rsh * DMDG / Weffcj; else BSIM4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 7: if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); else BSIM4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 8: Rend = Rsh * DMDG / Weffcj; break; case 9: /* all wide contacts assumed for geo = 9 and 10 */ if (Type == 1) { Rend = 0.5 * Rsh * DMCG / Weffcj; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } else { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } break; case 10: if (Type == 1) { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } else { Rend = 0.5 * Rsh * DMCG / Weffcj;; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } if (Rint <= 0.0) *Rtot = Rend; else if (Rend <= 0.0) *Rtot = Rint; else *Rtot = Rint * Rend / (Rint + Rend); if(*Rtot==0.0) printf("Warning: Zero resistance returned from RdseffGeo\n"); return 0; } int BSIM4RdsEndIso( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if ((nuEnd == 0.0)||((DMCG+DMCI)==0.0)) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if ((nuEnd == 0.0)||((DMCG + DMCI)==0.0)) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } int BSIM4RdsEndSha( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMCI); NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } ngspice-26/src/spicelib/devices/bsim4/b4pzld.c0000644000265600020320000010605012264261473020617 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4pzld.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim4def.h" #include "ngspice/suffix.h" int BSIM4pzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0; double xcgmbb=0.0, xcbgmb=0.0; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; struct bsim4SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; for (; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here!= NULL; here = here->BSIM4nextInstance) { pParam = here->pParam; capbd = here->BSIM4capbd; capbs = here->BSIM4capbs; cgso = here->BSIM4cgso; cgdo = here->BSIM4cgdo; cgbo = pParam->BSIM4cgbo; if (here->BSIM4mode >= 0) { Gm = here->BSIM4gm; Gmbs = here->BSIM4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -(here->BSIM4gbds); gbbsp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = here->BSIM4gbgs; gbdpdp = here->BSIM4gbds; gbdpb = here->BSIM4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcsg; gIstotd = here->BSIM4gIgcsd; gIstots = here->BSIM4gIgss + here->BSIM4gIgcss; gIstotb = here->BSIM4gIgcsb; gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcdg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcdd; gIdtots = here->BSIM4gIgcds; gIdtotb = here->BSIM4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbd; gIbtots = here->BSIM4gIgbs; gIbtotb = here->BSIM4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4vges) - *(ckt->CKTstates[0] + here->BSIM4vgs); else if (here->BSIM4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4vgms) - *(ckt->CKTstates[0] + here->BSIM4vgs); if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgd * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgs * T0; gcrgb = here->BSIM4gcrgb * T0; gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4acnqsMod == 0) { if (here->BSIM4rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4cggb; xcgdb = here->BSIM4cgdb; xcgsb = here->BSIM4cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4cdgb; xcsgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb); xcbgb = here->BSIM4cbgb; } else { xcggb = here->BSIM4cggb + cgdo + cgso + pParam->BSIM4cgbo; xcgdb = here->BSIM4cgdb - cgdo; xcgsb = here->BSIM4cgsb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4cdgb - cgdo; xcsgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb + cgso); xcbgb = here->BSIM4cbgb - pParam->BSIM4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4cddb + here->BSIM4capbd + cgdo; xcdsb = here->BSIM4cdsb; xcsdb = -(here->BSIM4cgdb + here->BSIM4cbdb + here->BSIM4cddb); xcssb = here->BSIM4capbs + cgso - (here->BSIM4cgsb + here->BSIM4cbsb + here->BSIM4cdsb); if (!here->BSIM4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4cbdb - here->BSIM4capbd; xcbsb = here->BSIM4cbsb - here->BSIM4capbs; xcdbdb = 0.0; } else { xcdbb = -(here->BSIM4cddb + here->BSIM4cdgb + here->BSIM4cdsb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) + here->BSIM4capbs; xcbdb = here->BSIM4cbdb; xcbsb = here->BSIM4cbsb; xcdbdb = -here->BSIM4capbd; xcsbsb = -here->BSIM4capbs; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4gtg; xgtd = here->BSIM4gtd; xgts = here->BSIM4gts; xgtb = here->BSIM4gtb; xcqgb = here->BSIM4cqgb; xcqdb = here->BSIM4cqdb; xcqsb = here->BSIM4cqsb; xcqbb = here->BSIM4cqbb; CoxWL = model->BSIM4coxe * here->pParam->BSIM4weffCV * here->BSIM4nf * here->pParam->BSIM4leffCV; qcheq = -(here->BSIM4qgate + here->BSIM4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM4qdrn / qcheq; Cdd = here->BSIM4cddb; Csd = -(here->BSIM4cgdb + here->BSIM4cddb + here->BSIM4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4cdgb; Csg = -(here->BSIM4cggb + here->BSIM4cdgb + here->BSIM4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4cdsb; Css = -(here->BSIM4cgsb + here->BSIM4cdsb + here->BSIM4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM4gm; Gmbs = -here->BSIM4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -(here->BSIM4gbds); gbbdp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4gbgs; gbspsp = here->BSIM4gbds; gbspb = here->BSIM4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcdg; gIstotd = here->BSIM4gIgcds; gIstots = here->BSIM4gIgss + here->BSIM4gIgcdd; gIstotb = here->BSIM4gIgcdb; gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcsg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcss; gIdtots = here->BSIM4gIgcsd; gIdtotb = here->BSIM4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbs; gIbtots = here->BSIM4gIgbd; gIbtotb = here->BSIM4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4vges) - *(ckt->CKTstates[0] + here->BSIM4vgs); else if (here->BSIM4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4vgms) - *(ckt->CKTstates[0] + here->BSIM4vgs); if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgs * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgd * T0; gcrgb = here->BSIM4gcrgb * T0; gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4acnqsMod == 0) { if (here->BSIM4rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4cggb; xcgdb = here->BSIM4cgsb; xcgsb = here->BSIM4cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb); xcsgb = here->BSIM4cdgb; xcbgb = here->BSIM4cbgb; } else { xcggb = here->BSIM4cggb + cgdo + cgso + pParam->BSIM4cgbo; xcgdb = here->BSIM4cgsb - cgdo; xcgsb = here->BSIM4cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb + cgdo); xcsgb = here->BSIM4cdgb - cgso; xcbgb = here->BSIM4cbgb - pParam->BSIM4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4capbd + cgdo - (here->BSIM4cgsb + here->BSIM4cbsb + here->BSIM4cdsb); xcdsb = -(here->BSIM4cgdb + here->BSIM4cbdb + here->BSIM4cddb); xcsdb = here->BSIM4cdsb; xcssb = here->BSIM4cddb + here->BSIM4capbs + cgso; if (!here->BSIM4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4cbsb - here->BSIM4capbd; xcbsb = here->BSIM4cbdb - here->BSIM4capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) + here->BSIM4capbd; xcsbb = -(here->BSIM4cddb + here->BSIM4cdgb + here->BSIM4cdsb); xcbdb = here->BSIM4cbsb; xcbsb = here->BSIM4cbdb; xcdbdb = -here->BSIM4capbd; xcsbsb = -here->BSIM4capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4gtg; xgtd = here->BSIM4gts; xgts = here->BSIM4gtd; xgtb = here->BSIM4gtb; xcqgb = here->BSIM4cqgb; xcqdb = here->BSIM4cqsb; xcqsb = here->BSIM4cqdb; xcqbb = here->BSIM4cqbb; CoxWL = model->BSIM4coxe * here->pParam->BSIM4weffCV * here->BSIM4nf * here->pParam->BSIM4leffCV; qcheq = -(here->BSIM4qgate + here->BSIM4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM4qdrn / qcheq; Css = here->BSIM4cddb; Cds = -(here->BSIM4cgdb + here->BSIM4cddb + here->BSIM4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4cdgb; Cdg = -(here->BSIM4cggb + here->BSIM4cdgb + here->BSIM4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4cdsb; Cdd = -(here->BSIM4cgsb + here->BSIM4cdsb + here->BSIM4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } if (model->BSIM4rdsMod == 1) { gstot = here->BSIM4gstot; gstotd = here->BSIM4gstotd; gstotg = here->BSIM4gstotg; gstots = here->BSIM4gstots - gstot; gstotb = here->BSIM4gstotb; gdtot = here->BSIM4gdtot; gdtotd = here->BSIM4gdtotd - gdtot; gdtotg = here->BSIM4gdtotg; gdtots = here->BSIM4gdtots; gdtotb = here->BSIM4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } T1 = *(ckt->CKTstate0 + here->BSIM4qdef) * here->BSIM4gtau; gds = here->BSIM4gds; /* * Loading PZ matrix */ m = here->BSIM4m; if (!model->BSIM4rdsMod) { gdpr = here->BSIM4drainConductance; gspr = here->BSIM4sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4rbodyMod) { gjbd = here->BSIM4gbd; gjbs = here->BSIM4gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4grgeltd; if (here->BSIM4rgateMod == 1) { *(here->BSIM4GEgePtr) += m * geltd; *(here->BSIM4GPgePtr) -= m * geltd; *(here->BSIM4GEgpPtr) -= m * geltd; *(here->BSIM4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4GPgpPtr) += m * (geltd - xgtg + gIgtotg); *(here->BSIM4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4GPbpPtr) -= m * (xgtb - gIgtotb); } else if (here->BSIM4rgateMod == 2) { *(here->BSIM4GEgePtr) += m * gcrg; *(here->BSIM4GEgpPtr) += m * gcrgg; *(here->BSIM4GEdpPtr) += m * gcrgd; *(here->BSIM4GEspPtr) += m * gcrgs; *(here->BSIM4GEbpPtr) += m * gcrgb; *(here->BSIM4GPgePtr) -= m * gcrg; *(here->BSIM4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); } else if (here->BSIM4rgateMod == 3) { *(here->BSIM4GEgePtr) += m * geltd; *(here->BSIM4GEgmPtr) -= m * geltd; *(here->BSIM4GMgePtr) -= m * geltd; *(here->BSIM4GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4GMgmPtr ) += m * xcgmgmb * s->real; *(here->BSIM4GMgmPtr +1) += m * xcgmgmb * s->imag; *(here->BSIM4GMdpPtr) += m * gcrgd; *(here->BSIM4GMdpPtr ) += m * xcgmdb * s->real; *(here->BSIM4GMdpPtr +1) += m * xcgmdb * s->imag; *(here->BSIM4GMgpPtr) += m * gcrgg; *(here->BSIM4GMspPtr) += m * gcrgs; *(here->BSIM4GMspPtr ) += m * xcgmsb * s->real; *(here->BSIM4GMspPtr +1) += m * xcgmsb * s->imag; *(here->BSIM4GMbpPtr) += m * gcrgb; *(here->BSIM4GMbpPtr ) += m * xcgmbb * s->real; *(here->BSIM4GMbpPtr +1) += m * xcgmbb * s->imag; *(here->BSIM4DPgmPtr ) += m * xcdgmb * s->real; *(here->BSIM4DPgmPtr +1) += m * xcdgmb * s->imag; *(here->BSIM4GPgmPtr) -= m * gcrg; *(here->BSIM4SPgmPtr ) += m * xcsgmb * s->real; *(here->BSIM4SPgmPtr +1) += m * xcsgmb * s->imag; *(here->BSIM4BPgmPtr ) += m * xcbgmb * s->real; *(here->BSIM4BPgmPtr +1) += m * xcbgmb * s->imag; *(here->BSIM4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); *(here->BSIM4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4GPbpPtr +1) += m * xcgbb * s->imag; } else { *(here->BSIM4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4GPgpPtr) -= m * (xgtg - gIgtotg); *(here->BSIM4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4GPbpPtr) -= m * (xgtb - gIgtotb); } if (model->BSIM4rdsMod) { (*(here->BSIM4DgpPtr) += m * gdtotg); (*(here->BSIM4DspPtr) += m * gdtots); (*(here->BSIM4DbpPtr) += m * gdtotb); (*(here->BSIM4SdpPtr) += m * gstotd); (*(here->BSIM4SgpPtr) += m * gstotg); (*(here->BSIM4SbpPtr) += m * gstotb); } *(here->BSIM4DPdpPtr ) += m * xcddb * s->real; *(here->BSIM4DPdpPtr +1) += m * xcddb * s->imag; *(here->BSIM4DPdpPtr) += m * (gdpr + gds + here->BSIM4gbd - gdtotd + RevSum + gbdpdp - gIdtotd + dxpart * xgtd + T1 * ddxpart_dVd); *(here->BSIM4DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4DPgpPtr ) += m * xcdgb * s->real; *(here->BSIM4DPgpPtr +1) += m * xcdgb * s->imag; *(here->BSIM4DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + T1 * ddxpart_dVg + dxpart * xgtg); *(here->BSIM4DPspPtr ) += m * xcdsb * s->real; *(here->BSIM4DPspPtr +1) += m * xcdsb * s->imag; *(here->BSIM4DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots - T1 * ddxpart_dVs - dxpart * xgts); *(here->BSIM4DPbpPtr ) += m * xcdbb * s->real; *(here->BSIM4DPbpPtr +1) += m * xcdbb * s->imag; *(here->BSIM4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * xgtb); *(here->BSIM4DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4DdPtr) += m * (gdpr + gdtot); *(here->BSIM4SPdpPtr ) += m * xcsdb * s->real; *(here->BSIM4SPdpPtr +1) += m * xcsdb * s->imag; *(here->BSIM4SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd - T1 * dsxpart_dVd - sxpart * xgtd); *(here->BSIM4SPgpPtr ) += m * xcsgb * s->real; *(here->BSIM4SPgpPtr +1) += m * xcsgb * s->imag; *(here->BSIM4SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg - T1 * dsxpart_dVg - sxpart * xgtg); *(here->BSIM4SPspPtr ) += m * xcssb * s->real; *(here->BSIM4SPspPtr +1) += m * xcssb * s->imag; *(here->BSIM4SPspPtr) += m * (gspr + gds + here->BSIM4gbs - gIstots - gstots + FwdSum + gbspsp + sxpart * xgts + T1 * dsxpart_dVs); *(here->BSIM4SPsPtr) -= m * (gspr + gstot); *(here->BSIM4SPbpPtr ) += m * xcsbb * s->real; *(here->BSIM4SPbpPtr +1) += m * xcsbb * s->imag; *(here->BSIM4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb - T1 * dsxpart_dVb - sxpart * xgtb); *(here->BSIM4SspPtr) -= m * (gspr - gstots); *(here->BSIM4SsPtr) += m * (gspr + gstot); *(here->BSIM4BPdpPtr ) += m * xcbdb * s->real; *(here->BSIM4BPdpPtr +1) += m * xcbdb * s->imag; *(here->BSIM4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4BPgpPtr ) += m * xcbgb * s->real; *(here->BSIM4BPgpPtr +1) += m * xcbgb * s->imag; *(here->BSIM4BPgpPtr) -= m * (here->BSIM4gbgs + gIbtotg); *(here->BSIM4BPspPtr ) += m * xcbsb * s->real; *(here->BSIM4BPspPtr +1) += m * xcbsb * s->imag; *(here->BSIM4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4BPbpPtr ) += m * xcbbb * s->real; *(here->BSIM4BPbpPtr +1) += m * xcbbb * s->imag; *(here->BSIM4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4gbbs - gIbtotb); ggidld = here->BSIM4ggidld; ggidlg = here->BSIM4ggidlg; ggidlb = here->BSIM4ggidlb; ggislg = here->BSIM4ggislg; ggisls = here->BSIM4ggisls; ggislb = here->BSIM4ggislb; /* stamp gidl */ (*(here->BSIM4DPdpPtr) += m * ggidld); (*(here->BSIM4DPgpPtr) += m * ggidlg); (*(here->BSIM4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4DPbpPtr) += m * ggidlb); (*(here->BSIM4BPdpPtr) -= m * ggidld); (*(here->BSIM4BPgpPtr) -= m * ggidlg); (*(here->BSIM4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4SPgpPtr) += m * ggislg); (*(here->BSIM4SPspPtr) += m * ggisls); (*(here->BSIM4SPbpPtr) += m * ggislb); (*(here->BSIM4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4BPgpPtr) -= m * ggislg); (*(here->BSIM4BPspPtr) -= m * ggisls); (*(here->BSIM4BPbpPtr) -= m * ggislb); if (here->BSIM4rbodyMod) { (*(here->BSIM4DPdbPtr ) += m * xcdbdb * s->real); (*(here->BSIM4DPdbPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4DPdbPtr) -= m * here->BSIM4gbd); (*(here->BSIM4SPsbPtr ) += m * xcsbsb * s->real); (*(here->BSIM4SPsbPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4SPsbPtr) -= m * here->BSIM4gbs); (*(here->BSIM4DBdpPtr ) += m * xcdbdb * s->real); (*(here->BSIM4DBdpPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4DBdpPtr) -= m * here->BSIM4gbd); (*(here->BSIM4DBdbPtr ) -= m * xcdbdb * s->real); (*(here->BSIM4DBdbPtr +1) -= m * xcdbdb * s->imag); (*(here->BSIM4DBdbPtr) += m * (here->BSIM4gbd + here->BSIM4grbpd + here->BSIM4grbdb)); (*(here->BSIM4DBbpPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4DBbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BPdbPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4BPbPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BPsbPtr) -= m * here->BSIM4grbps); (*(here->BSIM4BPbpPtr) += m * (here->BSIM4grbpd + here->BSIM4grbps + here->BSIM4grbpb)); /* WDL: (-here->BSIM4gbbs) already added to BPbpPtr */ (*(here->BSIM4SBspPtr ) += m * xcsbsb * s->real); (*(here->BSIM4SBspPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4SBspPtr) -= m * here->BSIM4gbs); (*(here->BSIM4SBbpPtr) -= m * here->BSIM4grbps); (*(here->BSIM4SBbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4SBsbPtr ) -= m * xcsbsb * s->real); (*(here->BSIM4SBsbPtr +1) -= m * xcsbsb * s->imag); (*(here->BSIM4SBsbPtr) += m * (here->BSIM4gbs + here->BSIM4grbps + here->BSIM4grbsb)); (*(here->BSIM4BdbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BbpPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BsbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4BbPtr) += m * (here->BSIM4grbsb + here->BSIM4grbdb + here->BSIM4grbpb)); } if (here->BSIM4acnqsMod) { *(here->BSIM4QqPtr ) += m * s->real * ScalingFactor; *(here->BSIM4QqPtr +1) += m * s->imag * ScalingFactor; *(here->BSIM4QgpPtr ) -= m * xcqgb * s->real; *(here->BSIM4QgpPtr +1) -= m * xcqgb * s->imag; *(here->BSIM4QdpPtr ) -= m * xcqdb * s->real; *(here->BSIM4QdpPtr +1) -= m * xcqdb * s->imag; *(here->BSIM4QbpPtr ) -= m * xcqbb * s->real; *(here->BSIM4QbpPtr +1) -= m * xcqbb * s->imag; *(here->BSIM4QspPtr ) -= m * xcqsb * s->real; *(here->BSIM4QspPtr +1) -= m * xcqsb * s->imag; *(here->BSIM4GPqPtr) -= m * here->BSIM4gtau; *(here->BSIM4DPqPtr) += m * dxpart * here->BSIM4gtau; *(here->BSIM4SPqPtr) += m * sxpart * here->BSIM4gtau; *(here->BSIM4QqPtr) += m * here->BSIM4gtau; *(here->BSIM4QgpPtr) += m * xgtg; *(here->BSIM4QdpPtr) += m * xgtd; *(here->BSIM4QbpPtr) += m * xgtb; *(here->BSIM4QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4trunc.c0000644000265600020320000000336012264261473021001 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4trunc.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here != NULL; here = here->BSIM4nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM4qb,ckt,timeStep); CKTterr(here->BSIM4qg,ckt,timeStep); CKTterr(here->BSIM4qd,ckt,timeStep); if (here->BSIM4trnqsMod) CKTterr(here->BSIM4qcdump,ckt,timeStep); if (here->BSIM4rbodyMod) { CKTterr(here->BSIM4qbs,ckt,timeStep); CKTterr(here->BSIM4qbd,ckt,timeStep); } if (here->BSIM4rgateMod == 3) CKTterr(here->BSIM4qgmid,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM4name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4noi.c0000644000265600020320000010532712264261473020441 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4noi.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* * WDL: 1/f noise model has been smoothed out and enhanced with * bulk charge effect as well as physical N* equ. and necessary * conversion into the SI unit system. */ static double Eval1ovFNoise( double Vds, BSIM4model *model, BSIM4instance *here, double freq, double temp) { struct bsim4SizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Leff, Leffsq; double T0=0.0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM4cd); Leff = pParam->BSIM4leff - 2.0 * model->BSIM4lintnoi; Leffsq = Leff * Leff; esat = 2.0 * here->BSIM4vsattemp / here->BSIM4ueff; if(model->BSIM4em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ else { T0 = ((((Vds - here->BSIM4Vdseff) / pParam->BSIM4litl) + model->BSIM4em) / esat); DelClm = pParam->BSIM4litl * log (MAX(T0, N_MINLOG)); if (DelClm < 0.0) DelClm = 0.0; /* bugfix */ } EffFreq = pow(freq, model->BSIM4ef); T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4ueff; T2 = 1.0e10 * EffFreq * here->BSIM4Abulk * model->BSIM4coxe * Leffsq; N0 = model->BSIM4coxe * here->BSIM4Vgsteff / CHARGE; Nl = model->BSIM4coxe * here->BSIM4Vgsteff * (1.0 - here->BSIM4AbovVgst2Vtm * here->BSIM4Vdseff) / CHARGE; T3 = model->BSIM4oxideTrapDensityA * log(MAX(((N0 + here->BSIM4nstar) / (Nl + here->BSIM4nstar)), N_MINLOG)); T4 = model->BSIM4oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM4oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4weff * here->BSIM4nf; T8 = model->BSIM4oxideTrapDensityA + model->BSIM4oxideTrapDensityB * Nl + model->BSIM4oxideTrapDensityC * Nl * Nl; T9 = (Nl + here->BSIM4nstar) * (Nl + here->BSIM4nstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM4noise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM4model *model = (BSIM4model *)inModel; BSIM4instance *here; struct bsim4SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM4NSRCS]; double lnNdens[BSIM4NSRCS]; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T10, T11; double Vds, Ssi, Swi; double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare, bodymode; /* tnoiMod=2 (v4.7) */ double eta, Leff, Lvsat, gamma, delta, epsilon, GammaGd0=0.0; double npart_c, sigrat=0.0, C0, omega, ctnoi=0.0; int i; double m; /* define the names of the noise sources */ static char *BSIM4nNames[BSIM4NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".rg", /* noise due to rgeltd */ ".rbps", /* noise due to rbps */ ".rbpd", /* noise due to rbpd */ ".rbpb", /* noise due to rbpb */ ".rbsb", /* noise due to rbsb */ ".rbdb", /* noise due to rbdb */ ".id", /* noise due to id (for tnoiMod2: uncorrelated portion only) */ ".1overf", /* flicker (1/f) noise */ ".igs", /* shot noise due to IGS */ ".igd", /* shot noise due to IGD */ ".igb", /* shot noise due to IGB */ ".corl", /* contribution of correlated drain and induced gate noise */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM4nextModel) { if(model->BSIM4tnoiMod != 2) { noizDens[BSIM4CORLNOIZ] = 0.0; lnNdens[BSIM4CORLNOIZ] = N_MINLOG; } for (here = model->BSIM4instances; here != NULL; here = here->BSIM4nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM4NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM4name, BSIM4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM4NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM4name, BSIM4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM4name, BSIM4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM4m; switch (mode) { case N_DENS: if (model->BSIM4tnoiMod == 0) { if (model->BSIM4rdsMod == 0) { gspr = here->BSIM4sourceConductance; gdpr = here->BSIM4drainConductance; if (here->BSIM4grdsw > 0.0) tmp = 1.0 / here->BSIM4grdsw; /* tmp used below */ else tmp = 0.0; } else { gspr = here->BSIM4gstot; gdpr = here->BSIM4gdtot; tmp = 0.0; } } else if(model->BSIM4tnoiMod == 1) { T5 = here->BSIM4Vgsteff / here->BSIM4EsatL; T5 *= T5; npart_beta = model->BSIM4rnoia * (1.0 + T5 * model->BSIM4tnoia * pParam->BSIM4leff); npart_theta = model->BSIM4rnoib * (1.0 + T5 * model->BSIM4tnoib * pParam->BSIM4leff); if(npart_theta > 0.9) npart_theta = 0.9; if(npart_theta > 0.9 * npart_beta) npart_theta = 0.9 * npart_beta; //4.6.2 if (model->BSIM4rdsMod == 0) { gspr = here->BSIM4sourceConductance; gdpr = here->BSIM4drainConductance; } else { gspr = here->BSIM4gstot; gdpr = here->BSIM4gdtot; } if ((*(ckt->CKTstates[0] + here->BSIM4vds)) >= 0.0) gspr = gspr * (1.0 + npart_theta * npart_theta * gspr / here->BSIM4IdovVds); else gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr / here->BSIM4IdovVds); } else { /* tnoiMod=2 (v4.7) */ if (model->BSIM4rdsMod == 0) { gspr = here->BSIM4sourceConductance; gdpr = here->BSIM4drainConductance; } else { gspr = here->BSIM4gstot; gdpr = here->BSIM4gdtot; } } NevalSrc(&noizDens[BSIM4RDNOIZ], &lnNdens[BSIM4RDNOIZ], ckt, THERMNOISE, here->BSIM4dNodePrime, here->BSIM4dNode, gdpr * m); NevalSrc(&noizDens[BSIM4RSNOIZ], &lnNdens[BSIM4RSNOIZ], ckt, THERMNOISE, here->BSIM4sNodePrime, here->BSIM4sNode, gspr * m); if (here->BSIM4rgateMod == 1) { NevalSrc(&noizDens[BSIM4RGNOIZ], &lnNdens[BSIM4RGNOIZ], ckt, THERMNOISE, here->BSIM4gNodePrime, here->BSIM4gNodeExt, here->BSIM4grgeltd * m); } else if (here->BSIM4rgateMod == 2) { T0 = 1.0 + here->BSIM4grgeltd/here->BSIM4gcrg; T1 = T0 * T0; NevalSrc(&noizDens[BSIM4RGNOIZ], &lnNdens[BSIM4RGNOIZ], ckt, THERMNOISE, here->BSIM4gNodePrime, here->BSIM4gNodeExt, here->BSIM4grgeltd * m / T1); } else if (here->BSIM4rgateMod == 3) { NevalSrc(&noizDens[BSIM4RGNOIZ], &lnNdens[BSIM4RGNOIZ], ckt, THERMNOISE, here->BSIM4gNodeMid, here->BSIM4gNodeExt, here->BSIM4grgeltd * m); } else { noizDens[BSIM4RGNOIZ] = 0.0; lnNdens[BSIM4RGNOIZ] = log(MAX(noizDens[BSIM4RGNOIZ], N_MINLOG)); } bodymode = 5; if (here->BSIM4rbodyMod == 2) { if( ( !model->BSIM4rbps0Given) || ( !model->BSIM4rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4rbsbx0Given && !model->BSIM4rbsby0Given) || (!model->BSIM4rbdbx0Given && !model->BSIM4rbdby0Given) ) bodymode = 3; } if (here->BSIM4rbodyMod) { if(bodymode == 5) { NevalSrc(&noizDens[BSIM4RBPSNOIZ], &lnNdens[BSIM4RBPSNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4sbNode, here->BSIM4grbps * m); NevalSrc(&noizDens[BSIM4RBPDNOIZ], &lnNdens[BSIM4RBPDNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4dbNode, here->BSIM4grbpd * m); NevalSrc(&noizDens[BSIM4RBPBNOIZ], &lnNdens[BSIM4RBPBNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4bNode, here->BSIM4grbpb * m); NevalSrc(&noizDens[BSIM4RBSBNOIZ], &lnNdens[BSIM4RBSBNOIZ], ckt, THERMNOISE, here->BSIM4bNode, here->BSIM4sbNode, here->BSIM4grbsb * m); NevalSrc(&noizDens[BSIM4RBDBNOIZ], &lnNdens[BSIM4RBDBNOIZ], ckt, THERMNOISE, here->BSIM4bNode, here->BSIM4dbNode, here->BSIM4grbdb * m); } if(bodymode == 3) { NevalSrc(&noizDens[BSIM4RBPSNOIZ], &lnNdens[BSIM4RBPSNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4sbNode, here->BSIM4grbps * m); NevalSrc(&noizDens[BSIM4RBPDNOIZ], &lnNdens[BSIM4RBPDNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4dbNode, here->BSIM4grbpd * m); NevalSrc(&noizDens[BSIM4RBPBNOIZ], &lnNdens[BSIM4RBPBNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4bNode, here->BSIM4grbpb * m); noizDens[BSIM4RBSBNOIZ] = noizDens[BSIM4RBDBNOIZ] = 0.0; lnNdens[BSIM4RBSBNOIZ] = log(MAX(noizDens[BSIM4RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4RBDBNOIZ] = log(MAX(noizDens[BSIM4RBDBNOIZ], N_MINLOG)); } if(bodymode == 1) { NevalSrc(&noizDens[BSIM4RBPBNOIZ], &lnNdens[BSIM4RBPBNOIZ], ckt, THERMNOISE, here->BSIM4bNodePrime, here->BSIM4bNode, here->BSIM4grbpb * m); noizDens[BSIM4RBPSNOIZ] = noizDens[BSIM4RBPDNOIZ] = 0.0; noizDens[BSIM4RBSBNOIZ] = noizDens[BSIM4RBDBNOIZ] = 0.0; lnNdens[BSIM4RBPSNOIZ] = log(MAX(noizDens[BSIM4RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4RBPDNOIZ] = log(MAX(noizDens[BSIM4RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4RBSBNOIZ] = log(MAX(noizDens[BSIM4RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4RBDBNOIZ] = log(MAX(noizDens[BSIM4RBDBNOIZ], N_MINLOG)); } } else { noizDens[BSIM4RBPSNOIZ] = noizDens[BSIM4RBPDNOIZ] = 0.0; noizDens[BSIM4RBPBNOIZ] = 0.0; noizDens[BSIM4RBSBNOIZ] = noizDens[BSIM4RBDBNOIZ] = 0.0; lnNdens[BSIM4RBPSNOIZ] = log(MAX(noizDens[BSIM4RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4RBPDNOIZ] = log(MAX(noizDens[BSIM4RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4RBPBNOIZ] = log(MAX(noizDens[BSIM4RBPBNOIZ], N_MINLOG)); lnNdens[BSIM4RBSBNOIZ] = log(MAX(noizDens[BSIM4RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4RBDBNOIZ] = log(MAX(noizDens[BSIM4RBDBNOIZ], N_MINLOG)); } if(model->BSIM4tnoiMod == 2) { eta = 1.0 - here->BSIM4Vdseff * here->BSIM4AbovVgst2Vtm; T0 = 1.0 - eta; T1 = 1.0 + eta; T2 = T1 + 2.0 * here->BSIM4Abulk * model->BSIM4vtm / here->BSIM4Vgsteff; Leff = pParam->BSIM4leff; Lvsat = Leff * (1.0 + here->BSIM4Vdseff / here->BSIM4EsatL); T6 = Leff / Lvsat; T5 = here->BSIM4Vgsteff / here->BSIM4EsatL; T5 = T5 * T5; gamma = T6 * (0.5 * T1 + T0 * T0 / (6.0 * T2)); T3 = T2 * T2; T4 = T0 * T0; T5 = T3 * T3; delta = (T1 / T3 - (5.0 * T1 + T2) * T4 / (15.0 * T5) + T4 * T4 / (9.0 * T5 * T2)) / (6.0 * T6 * T6 * T6); T7 = T0 / T2; epsilon = (T7 - T7 * T7 * T7 / 3.0) / (6.0 * T6); T8 = here->BSIM4Vgsteff / here->BSIM4EsatL; T8 *= T8; npart_c = model->BSIM4rnoic * (1.0 + T8 * model->BSIM4tnoic * Leff); ctnoi = epsilon / sqrt(gamma * delta) * (2.5316 * npart_c); npart_beta = model->BSIM4rnoia * (1.0 + T8 * model->BSIM4tnoia * Leff); npart_theta = model->BSIM4rnoib * (1.0 + T8 * model->BSIM4tnoib * Leff); gamma = gamma * (3.0 * npart_beta * npart_beta); delta = delta * (3.75 * npart_theta * npart_theta); GammaGd0 = gamma * here->BSIM4noiGd0; C0 = here->BSIM4Coxeff * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV; T0 = C0 / here->BSIM4noiGd0; sigrat = T0 * sqrt(delta / gamma); } switch(model->BSIM4tnoiMod) { case 0: T0 = here->BSIM4ueff * fabs(here->BSIM4qinv); T1 = T0 * tmp + pParam->BSIM4leff * pParam->BSIM4leff; NevalSrc(&noizDens[BSIM4IDNOIZ], &lnNdens[BSIM4IDNOIZ], ckt, THERMNOISE, here->BSIM4dNodePrime, here->BSIM4sNodePrime, (T0 / T1) * model->BSIM4ntnoi * m); break; case 1: T0 = here->BSIM4gm + here->BSIM4gmbs + here->BSIM4gds; T0 *= T0; igsquare = npart_theta * npart_theta * T0 / here->BSIM4IdovVds; T1 = npart_beta * (here->BSIM4gm + here->BSIM4gmbs) + here->BSIM4gds; T2 = T1 * T1 / here->BSIM4IdovVds; NevalSrc(&noizDens[BSIM4IDNOIZ], &lnNdens[BSIM4IDNOIZ], ckt, THERMNOISE, here->BSIM4dNodePrime, here->BSIM4sNodePrime, (T2 - igsquare) * m); break; case 2: T2 = GammaGd0; T3 = ctnoi * ctnoi; T4 = 1.0 - T3; NevalSrc(&noizDens[BSIM4IDNOIZ], &lnNdens[BSIM4IDNOIZ], ckt, THERMNOISE, here->BSIM4dNodePrime, here->BSIM4sNodePrime, T2 * T4 * m); /* Evaluate output noise due to two correlated noise sources */ omega = 2.0 * M_PI * data->freq; T5 = omega * sigrat; T6 = T5 * T5; T7 = T6 / (1.0 + T6); if (here->BSIM4mode >= 0) { NevalSrc2(&noizDens[BSIM4CORLNOIZ], &lnNdens[BSIM4CORLNOIZ], ckt, THERMNOISE, here->BSIM4dNodePrime, here->BSIM4sNodePrime, T2 * T3 * m, here->BSIM4gNodePrime, here->BSIM4sNodePrime, T2 * T7 * m, 0.5 * M_PI); } else { NevalSrc2(&noizDens[BSIM4CORLNOIZ], &lnNdens[BSIM4CORLNOIZ], ckt, THERMNOISE, here->BSIM4sNodePrime, here->BSIM4dNodePrime, T2 * T3 * m, here->BSIM4gNodePrime, here->BSIM4dNodePrime, T2 * T7 * m, 0.5 * M_PI); } break; } NevalSrc(&noizDens[BSIM4FLNOIZ], (double*) NULL, ckt, N_GAIN, here->BSIM4dNodePrime, here->BSIM4sNodePrime, (double) 0.0); switch(model->BSIM4fnoiMod) { case 0: noizDens[BSIM4FLNOIZ] *= m * model->BSIM4kf * exp(model->BSIM4af * log(MAX(fabs(here->BSIM4cd), N_MINLOG))) / (pow(data->freq, model->BSIM4ef) * pParam->BSIM4leff * pParam->BSIM4leff * model->BSIM4coxe); break; case 1: Vds = *(ckt->CKTstates[0] + here->BSIM4vds); if (Vds < 0.0) Vds = -Vds; Ssi = Eval1ovFNoise(Vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM4oxideTrapDensityA * CONSTboltz * ckt->CKTtemp; T11 = pParam->BSIM4weff * here->BSIM4nf * pParam->BSIM4leff * pow(data->freq, model->BSIM4ef) * 1.0e10 * here->BSIM4nstar * here->BSIM4nstar; Swi = T10 / T11 * here->BSIM4cd * here->BSIM4cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM4FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM4FLNOIZ] *= 0.0; break; } lnNdens[BSIM4FLNOIZ] = log(MAX(noizDens[BSIM4FLNOIZ], N_MINLOG)); if(here->BSIM4mode >= 0) { /* bugfix */ NevalSrc(&noizDens[BSIM4IGSNOIZ], &lnNdens[BSIM4IGSNOIZ], ckt, SHOTNOISE, here->BSIM4gNodePrime, here->BSIM4sNodePrime, m * (here->BSIM4Igs + here->BSIM4Igcs)); NevalSrc(&noizDens[BSIM4IGDNOIZ], &lnNdens[BSIM4IGDNOIZ], ckt, SHOTNOISE, here->BSIM4gNodePrime, here->BSIM4dNodePrime, m * (here->BSIM4Igd + here->BSIM4Igcd)); } else { NevalSrc(&noizDens[BSIM4IGSNOIZ], &lnNdens[BSIM4IGSNOIZ], ckt, SHOTNOISE, here->BSIM4gNodePrime, here->BSIM4sNodePrime, m * (here->BSIM4Igs + here->BSIM4Igcd)); NevalSrc(&noizDens[BSIM4IGDNOIZ], &lnNdens[BSIM4IGDNOIZ], ckt, SHOTNOISE, here->BSIM4gNodePrime, here->BSIM4dNodePrime, m * (here->BSIM4Igd + here->BSIM4Igcs)); } NevalSrc(&noizDens[BSIM4IGBNOIZ], &lnNdens[BSIM4IGBNOIZ], ckt, SHOTNOISE, here->BSIM4gNodePrime, here->BSIM4bNodePrime, m * here->BSIM4Igb); noizDens[BSIM4TOTNOIZ] = noizDens[BSIM4RDNOIZ] + noizDens[BSIM4RSNOIZ] + noizDens[BSIM4RGNOIZ] + noizDens[BSIM4RBPSNOIZ] + noizDens[BSIM4RBPDNOIZ] + noizDens[BSIM4RBPBNOIZ] + noizDens[BSIM4RBSBNOIZ] + noizDens[BSIM4RBDBNOIZ] + noizDens[BSIM4IDNOIZ] + noizDens[BSIM4FLNOIZ] + noizDens[BSIM4IGSNOIZ] + noizDens[BSIM4IGDNOIZ] + noizDens[BSIM4IGBNOIZ] + noizDens[BSIM4CORLNOIZ]; lnNdens[BSIM4TOTNOIZ] = log(MAX(noizDens[BSIM4TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM4TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM4NSRCS; i++) { here->BSIM4nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM4NSRCS; i++) { here->BSIM4nVar[OUTNOIZ][i] = 0.0; here->BSIM4nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM4NSRCS; i++) { if (i != BSIM4TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM4nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM4nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM4nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM4nVar[OUTNOIZ][i] += tempOnoise; here->BSIM4nVar[OUTNOIZ][BSIM4TOTNOIZ] += tempOnoise; here->BSIM4nVar[INNOIZ][i] += tempInoise; here->BSIM4nVar[INNOIZ][BSIM4TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM4NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM4NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM4nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM4nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4ld.c0000644000265600020320000072123512264261473020255 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /**** OpenMP support ngspice 06/28/2010 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4ld.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define MAX_EXPL 2.688117142e+43 #define MIN_EXPL 3.720075976e-44 #define EXPL_THRESHOLD 100.0 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define MM 3 /* smooth coeff */ #define DEXP(A,B,C) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ C = MAX_EXP; \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } #ifdef USE_OMP int BSIM4LoadOMP(BSIM4instance *here, CKTcircuit *ckt); void BSIM4LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt); #endif int BSIM4polyDepletion(double phi, double ngate,double epsgate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); int BSIM4load( GENmodel *inModel, CKTcircuit *ckt) { #ifdef USE_OMP int idx; BSIM4model *model = (BSIM4model*)inModel; int good = 0; BSIM4instance *here; BSIM4instance **InstArray; InstArray = model->BSIM4InstanceArray; #pragma omp parallel for private(here) for (idx = 0; idx < model->BSIM4InstCount; idx++) { here = InstArray[idx]; good = BSIM4LoadOMP(here, ckt); } BSIM4LoadRhsMat(inModel, ckt); return good; } int BSIM4LoadOMP(BSIM4instance *here, CKTcircuit *ckt) { BSIM4model *model; #else BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; #endif double ceqgstot, dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb; double ceqgdtot, dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb; double gstot, gstotd, gstotg, gstots, gstotb, gspr, Rs, Rd; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double vgs_eff, vgd_eff, dvgs_eff_dvg, dvgd_eff_dvg; double dRs_dvg, dRd_dvg, dRs_dvb, dRd_dvb; double dT0_dvg, dT1_dvb, dT3_dvg, dT3_dvb; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; #ifndef NEWCONV double tol0, tol1, tol2, tol3, tol4, tol5, tol6; #endif double geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb, ceqgcrg; double vges, vgms, vgedo, vgmdo, vged, vgmd, delvged, delvgmd; double delvges, delvgms, vgmb; double gcgmgmb=0.0, gcgmdb=0.0, gcgmsb=0.0, gcdgmb, gcsgmb; double gcgmbb=0.0, gcbgmb, qgmb, qgmid=0.0, ceqqgmid; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vdbs, vdbd, vsbs, vsbdo, vsbd; double delvdbs, delvdbd, delvsbs; double delvbd_jct, delvbs_jct, vbs_jct, vbd_jct; double SourceSatCurrent, DrainSatCurrent; double ag0, qgb, von, cbhat, VgstNVt, ExpVgst; double ceqqb, ceqqd, ceqqg, ceqqjd=0.0, ceqqjs=0.0, ceq, geq; double cdrain, cdhat, ceqdrn, ceqbd, ceqbs, ceqjd, ceqjs, gjbd, gjbs; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVg, dVfbeff_dVb, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; double gcgbb, gcdbb, gcsbb, gcbbb; double gcdbdb, gcsbsb; double gcsgb, gcssb, MJD, MJSWD, MJSWGD, MJS, MJSWS, MJSWGS; double qgate=0.0, qbulk=0.0, qdrn=0.0, qsrc, cqgate, cqbody, cqdrn; double Vdb, Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Igidl, Ggidld, Ggidlg, Ggidlb; double Voxacc=0.0, dVoxacc_dVg=0.0, dVoxacc_dVb=0.0; double Voxdepinv=0.0, dVoxdepinv_dVg=0.0, dVoxdepinv_dVd=0.0, dVoxdepinv_dVb=0.0; double VxNVt=0.0, ExpVxNVt, Vaux=0.0, dVaux_dVg=0.0, dVaux_dVd=0.0, dVaux_dVb=0.0; double Igc, dIgc_dVg, dIgc_dVd, dIgc_dVb; double Igcs, dIgcs_dVg, dIgcs_dVd, dIgcs_dVb; double Igcd, dIgcd_dVg, dIgcd_dVd, dIgcd_dVb; double Igs, dIgs_dVg, dIgs_dVs, Igd, dIgd_dVg, dIgd_dVd; double Igbacc, dIgbacc_dVg, dIgbacc_dVb; double Igbinv, dIgbinv_dVg, dIgbinv_dVd, dIgbinv_dVb; double Pigcd, dPigcd_dVg, dPigcd_dVd, dPigcd_dVb; double Istoteq, gIstotg, gIstotd, gIstots, gIstotb; double Idtoteq, gIdtotg, gIdtotd, gIdtots, gIdtotb; double Ibtoteq, gIbtotg, gIbtotd, gIbtots, gIbtotb; double Igtoteq, gIgtotg, gIgtotd, gIgtots, gIgtotb; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double Vgs_eff, Vfb=0.0, Vth_NarrowW; /* double Vgd_eff, dVgd_eff_dVg; v4.7.0 */ double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth, dVth_dVb, dVth_dVd; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtms, Nvtmd; double Vtm, Vtm0; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg, VgDP, dVgDP_dVg; double Cox, Tox, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVd, dCoxeff_dVg, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff, dueff_dVg, dueff_dVd, dueff_dVb; double Esat, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff, dVbseff_dVb, VbseffCV, dVbseffCV_dVb; double VgsteffVth, dT11_dVg; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0=0.0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4, dT4_dVd, dT4_dVb; double T5, dT5_dVg, dT5_dVd, dT5_dVb; double T6, dT6_dVg, dT6_dVd, dT6_dVb; double T7, dT7_dVg, dT7_dVd, dT7_dVb; double T8, dT8_dVg, dT8_dVd, dT8_dVb; double T9, dT9_dVg, dT9_dVd, dT9_dVb; double T10, dT10_dVg, dT10_dVb, dT10_dVd; double T11, T12, T13, T14; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double Cclm, dCclm_dVg, dCclm_dVd, dCclm_dVb; double FP, dFP_dVg, PvagTerm, dPvagTerm_dVg, dPvagTerm_dVd, dPvagTerm_dVb; double VADITS, dVADITS_dVg, dVADITS_dVd; double Lpe_Vb, dDITS_Sft_dVb, dDITS_Sft_dVd; double DITS_Sft2, dDITS_Sft2_dVd; /* v4.7 New DITS */ double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot, Ibtot, a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb, devbs_dvb, devbd_dvb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxeffWovL; double Rds, dRds_dVg, dRds_dVb, WVCox, WVCoxRds; double Vgst2Vtm, VdsatCV; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qcheq, qdef, gqdef=0.0, cqdef=0.0, cqcheq=0.0; double gcqdb=0.0, gcqsb=0.0, gcqgb=0.0, gcqbb=0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double qgdo, qgso, cgdo, cgso; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgd1, Cgb1, Cbg1, Cbb1, Cbd1, Qac0, Qsub0; double dQac0_dVg, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double Igisl, Ggislg, Ggislb, Ggisls; double Nvtmrss, Nvtmrssws, Nvtmrsswgs; double Nvtmrsd, Nvtmrsswd, Nvtmrsswgd; double vs, Fsevl, dvs_dVg, dvs_dVd, dvs_dVb, dFsevl_dVg, dFsevl_dVd, dFsevl_dVb; double vgdx, vgsx, epssub, toxe, epsrox; struct bsim4SizeDependParam *pParam; int ByPass, ChargeComputationNeeded, error, Check, Check1, Check2; double m; #ifdef USE_OMP model = here->BSIM4modPtr; #endif ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEDCTRANCURVE | MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; #ifndef USE_OMP for (; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here != NULL; here = here->BSIM4nextInstance) { #endif Check = Check1 = Check2 = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vds = *(ckt->CKTstate0 + here->BSIM4vds); vgs = *(ckt->CKTstate0 + here->BSIM4vgs); vbs = *(ckt->CKTstate0 + here->BSIM4vbs); vges = *(ckt->CKTstate0 + here->BSIM4vges); vgms = *(ckt->CKTstate0 + here->BSIM4vgms); vdbs = *(ckt->CKTstate0 + here->BSIM4vdbs); vsbs = *(ckt->CKTstate0 + here->BSIM4vsbs); vses = *(ckt->CKTstate0 + here->BSIM4vses); vdes = *(ckt->CKTstate0 + here->BSIM4vdes); qdef = *(ckt->CKTstate0 + here->BSIM4qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vds = *(ckt->CKTstate1 + here->BSIM4vds); vgs = *(ckt->CKTstate1 + here->BSIM4vgs); vbs = *(ckt->CKTstate1 + here->BSIM4vbs); vges = *(ckt->CKTstate1 + here->BSIM4vges); vgms = *(ckt->CKTstate1 + here->BSIM4vgms); vdbs = *(ckt->CKTstate1 + here->BSIM4vdbs); vsbs = *(ckt->CKTstate1 + here->BSIM4vsbs); vses = *(ckt->CKTstate1 + here->BSIM4vses); vdes = *(ckt->CKTstate1 + here->BSIM4vdes); qdef = *(ckt->CKTstate1 + here->BSIM4qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4off) { vds = model->BSIM4type * here->BSIM4icVDS; vgs = vges = vgms = model->BSIM4type * here->BSIM4icVGS; vbs = vdbs = vsbs = model->BSIM4type * here->BSIM4icVBS; if (vds > 0.0) { vdes = vds + 0.01; vses = -0.01; } else if (vds < 0.0) { vdes = vds - 0.01; vses = 0.01; } else vdes = vses = 0.0; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vds = 0.1; vdes = 0.11; vses = -0.01; vgs = vges = vgms = model->BSIM4type * here->BSIM4vth0 + 0.1; vbs = vdbs = vsbs = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM4off)) { vds = vgs = vbs = vges = vgms = 0.0; vdbs = vsbs = vdes = vses = qdef = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM4vds) = *(ckt->CKTstate1 + here->BSIM4vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vds))); *(ckt->CKTstate0 + here->BSIM4vgs) = *(ckt->CKTstate1 + here->BSIM4vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vgs))); *(ckt->CKTstate0 + here->BSIM4vges) = *(ckt->CKTstate1 + here->BSIM4vges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vges)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vges))); *(ckt->CKTstate0 + here->BSIM4vgms) = *(ckt->CKTstate1 + here->BSIM4vgms); vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vgms)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vgms))); *(ckt->CKTstate0 + here->BSIM4vbs) = *(ckt->CKTstate1 + here->BSIM4vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vbs))); *(ckt->CKTstate0 + here->BSIM4vbd) = *(ckt->CKTstate0 + here->BSIM4vbs) - *(ckt->CKTstate0 + here->BSIM4vds); *(ckt->CKTstate0 + here->BSIM4vdbs) = *(ckt->CKTstate1 + here->BSIM4vdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vdbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vdbs))); *(ckt->CKTstate0 + here->BSIM4vdbd) = *(ckt->CKTstate0 + here->BSIM4vdbs) - *(ckt->CKTstate0 + here->BSIM4vds); *(ckt->CKTstate0 + here->BSIM4vsbs) = *(ckt->CKTstate1 + here->BSIM4vsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vsbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vsbs))); *(ckt->CKTstate0 + here->BSIM4vses) = *(ckt->CKTstate1 + here->BSIM4vses); vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vses)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vses))); *(ckt->CKTstate0 + here->BSIM4vdes) = *(ckt->CKTstate1 + here->BSIM4vdes); vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4vdes)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4vdes))); *(ckt->CKTstate0 + here->BSIM4qdef) = *(ckt->CKTstate1 + here->BSIM4qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM4qdef))); } else { #endif /* PREDICTOR */ vds = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vgs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vges = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4gNodeExt) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vgms = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4gNodeMid) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vdbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dbNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vsbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4sbNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vses = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4sNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vdes = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); qdef = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vgdo = *(ckt->CKTstate0 + here->BSIM4vgs) - *(ckt->CKTstate0 + here->BSIM4vds); vgedo = *(ckt->CKTstate0 + here->BSIM4vges) - *(ckt->CKTstate0 + here->BSIM4vds); vgmdo = *(ckt->CKTstate0 + here->BSIM4vgms) - *(ckt->CKTstate0 + here->BSIM4vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; vged = vges - vds; vgmd = vgms - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4vgs); delvges = vges - *(ckt->CKTstate0 + here->BSIM4vges); delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4vgms); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4vbs); delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4vdbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4vdes) - *(ckt->CKTstate0 + here->BSIM4vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4rbodyMod) ? delvbs : delvsbs; if (here->BSIM4mode >= 0) { Idtot = here->BSIM4cd + here->BSIM4csub - here->BSIM4cbd + here->BSIM4Igidl; cdhat = Idtot - here->BSIM4gbd * delvbd_jct + (here->BSIM4gmbs + here->BSIM4gbbs + here->BSIM4ggidlb) * delvbs + (here->BSIM4gm + here->BSIM4gbgs + here->BSIM4ggidlg) * delvgs + (here->BSIM4gds + here->BSIM4gbds + here->BSIM4ggidld) * delvds; Ibtot = here->BSIM4cbs + here->BSIM4cbd - here->BSIM4Igidl - here->BSIM4Igisl - here->BSIM4csub; cbhat = Ibtot + here->BSIM4gbd * delvbd_jct + here->BSIM4gbs * delvbs_jct - (here->BSIM4gbbs + here->BSIM4ggidlb) * delvbs - (here->BSIM4gbgs + here->BSIM4ggidlg) * delvgs - (here->BSIM4gbds + here->BSIM4ggidld - here->BSIM4ggisls) * delvds - here->BSIM4ggislg * delvgd - here->BSIM4ggislb* delvbd; Igstot = here->BSIM4Igs + here->BSIM4Igcs; cgshat = Igstot + (here->BSIM4gIgsg + here->BSIM4gIgcsg) * delvgs + here->BSIM4gIgcsd * delvds + here->BSIM4gIgcsb * delvbs; Igdtot = here->BSIM4Igd + here->BSIM4Igcd; cgdhat = Igdtot + here->BSIM4gIgdg * delvgd + here->BSIM4gIgcdg * delvgs + here->BSIM4gIgcdd * delvds + here->BSIM4gIgcdb * delvbs; Igbtot = here->BSIM4Igb; cgbhat = here->BSIM4Igb + here->BSIM4gIgbg * delvgs + here->BSIM4gIgbd * delvds + here->BSIM4gIgbb * delvbs; } else { Idtot = here->BSIM4cd + here->BSIM4cbd - here->BSIM4Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4gbd * delvbd_jct + here->BSIM4gmbs * delvbd + here->BSIM4gm * delvgd - (here->BSIM4gds + here->BSIM4ggidls) * delvds - here->BSIM4ggidlg * delvgs - here->BSIM4ggidlb * delvbs; Ibtot = here->BSIM4cbs + here->BSIM4cbd - here->BSIM4Igidl - here->BSIM4Igisl - here->BSIM4csub; cbhat = Ibtot + here->BSIM4gbs * delvbs_jct + here->BSIM4gbd * delvbd_jct - (here->BSIM4gbbs + here->BSIM4ggislb) * delvbd - (here->BSIM4gbgs + here->BSIM4ggislg) * delvgd + (here->BSIM4gbds + here->BSIM4ggisld - here->BSIM4ggidls) * delvds - here->BSIM4ggidlg * delvgs - here->BSIM4ggidlb * delvbs; Igstot = here->BSIM4Igs + here->BSIM4Igcd; cgshat = Igstot + here->BSIM4gIgsg * delvgs + here->BSIM4gIgcdg * delvgd - here->BSIM4gIgcdd * delvds + here->BSIM4gIgcdb * delvbd; Igdtot = here->BSIM4Igd + here->BSIM4Igcs; cgdhat = Igdtot + (here->BSIM4gIgdg + here->BSIM4gIgcsg) * delvgd - here->BSIM4gIgcsd * delvds + here->BSIM4gIgcsb * delvbd; Igbtot = here->BSIM4Igb; cgbhat = here->BSIM4Igb + here->BSIM4gIgbg * delvgd - here->BSIM4gIgbd * delvds + here->BSIM4gIgbb * delvbd; } Isestot = here->BSIM4gstot * (*(ckt->CKTstate0 + here->BSIM4vses)); cseshat = Isestot + here->BSIM4gstot * delvses + here->BSIM4gstotd * delvds + here->BSIM4gstotg * delvgs + here->BSIM4gstotb * delvbs; Idedtot = here->BSIM4gdtot * vdedo; cdedhat = Idedtot + here->BSIM4gdtot * delvded + here->BSIM4gdtotd * delvds + here->BSIM4gdtotg * delvgs + here->BSIM4gdtotb * delvbs; #ifndef NOBYPASS /* Following should be one IF statement, but some C compilers * can't handle that all at once, so we split it into several * successive IF's */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0 + here->BSIM4vds))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->BSIM4vgs))) + ckt->CKTvoltTol))) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0 + here->BSIM4vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0 + here->BSIM4vbd))) + ckt->CKTvoltTol))) if ((here->BSIM4rgateMod == 0) || (here->BSIM4rgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->BSIM4vges))) + ckt->CKTvoltTol))) if ((here->BSIM4rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4vgms))) + ckt->CKTvoltTol))) if ((!here->BSIM4rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4vdbs))) + ckt->CKTvoltTol))) if ((!here->BSIM4rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4vdbd))) + ckt->CKTvoltTol))) if ((!here->BSIM4rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4vsbs))) + ckt->CKTvoltTol))) if ((!model->BSIM4rdsMod) || (fabs(delvses) < (ckt->CKTreltol * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4vses))) + ckt->CKTvoltTol))) if ((!model->BSIM4rdsMod) || (fabs(delvdes) < (ckt->CKTreltol * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4vdes))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol)) if ((fabs(cbhat - Ibtot) < ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol)) if ((!model->BSIM4igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol))) if ((!model->BSIM4igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol))) if ((!model->BSIM4igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol))) if ((!model->BSIM4rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) if ((!model->BSIM4rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) { vds = *(ckt->CKTstate0 + here->BSIM4vds); vgs = *(ckt->CKTstate0 + here->BSIM4vgs); vbs = *(ckt->CKTstate0 + here->BSIM4vbs); vges = *(ckt->CKTstate0 + here->BSIM4vges); vgms = *(ckt->CKTstate0 + here->BSIM4vgms); vbd = *(ckt->CKTstate0 + here->BSIM4vbd); vdbs = *(ckt->CKTstate0 + here->BSIM4vdbs); vdbd = *(ckt->CKTstate0 + here->BSIM4vdbd); vsbs = *(ckt->CKTstate0 + here->BSIM4vsbs); vses = *(ckt->CKTstate0 + here->BSIM4vses); vdes = *(ckt->CKTstate0 + here->BSIM4vdes); vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vbs_jct = (!here->BSIM4rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4rbodyMod) ? vbd : vdbd; /*** qdef should not be kept fixed even if vgs, vds & vbs has converged **** qdef = *(ckt->CKTstate0 + here->BSIM4qdef); ***/ cdrain = here->BSIM4cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM4qgate; qbulk = here->BSIM4qbulk; qdrn = here->BSIM4qdrn; cgdo = here->BSIM4cgdo; qgdo = here->BSIM4qgdo; cgso = here->BSIM4cgso; qgso = here->BSIM4qgso; goto line755; } else goto line850; } #endif /*NOBYPASS*/ von = here->BSIM4von; if (*(ckt->CKTstate0 + here->BSIM4vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4vds)); vgd = vgs - vds; if (here->BSIM4rgateMod == 3) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4vges), von); vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4vgms), von); vged = vges - vds; vgmd = vgms - vds; } else if ((here->BSIM4rgateMod == 1) || (here->BSIM4rgateMod == 2)) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4vges), von); vged = vges - vds; } if (model->BSIM4rdsMod) { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4vdes)); vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4vses))); } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4vds))); vgs = vgd + vds; if (here->BSIM4rgateMod == 3) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; vgmd = DEVfetlim(vgmd, vgmdo, von); vgms = vgmd + vds; } if ((here->BSIM4rgateMod == 1) || (here->BSIM4rgateMod == 2)) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } if (model->BSIM4rdsMod) { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4vdes))); vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4vses)); } } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4vbs), CONSTvt0, model->BSIM4vcrit, &Check); vbd = vbs - vds; if (here->BSIM4rbodyMod) { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4vdbs), CONSTvt0, model->BSIM4vcrit, &Check1); vdbd = vdbs - vds; vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4vsbs), CONSTvt0, model->BSIM4vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4vbd), CONSTvt0, model->BSIM4vcrit, &Check); vbs = vbd + vds; if (here->BSIM4rbodyMod) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4vdbd), CONSTvt0, model->BSIM4vcrit, &Check1); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->BSIM4vsbs) - *(ckt->CKTstate0 + here->BSIM4vds); vsbd = vsbs - vds; vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } } /* Calculate DC currents and their derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vdbd = vdbs - vds; vbs_jct = (!here->BSIM4rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4rbodyMod) ? vbd : vdbd; /* Source/drain junction diode DC model begins */ Nvtms = model->BSIM4vtm * model->BSIM4SjctEmissionCoeff; /* if ((here->BSIM4Aseff <= 0.0) && (here->BSIM4Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } v4.7 */ if ((here->BSIM4Aseff <= 0.0) && (here->BSIM4Pseff <= 0.0)) { SourceSatCurrent = 0.0; } else { SourceSatCurrent = here->BSIM4Aseff * model->BSIM4SjctTempSatCurDensity + here->BSIM4Pseff * model->BSIM4SjctSidewallTempSatCurDensity + pParam->BSIM4weffCJ * here->BSIM4nf * model->BSIM4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent <= 0.0) { here->BSIM4gbs = ckt->CKTgmin; here->BSIM4cbs = here->BSIM4gbs * vbs_jct; } else { switch(model->BSIM4dioMod) { case 0: evbs = exp(vbs_jct / Nvtms); T1 = model->BSIM4xjbvs * exp(-(model->BSIM4bvs + vbs_jct) / Nvtms); /* WDLiu: Magic T1 in this form; different from BSIM4 beta. */ here->BSIM4gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; here->BSIM4cbs = SourceSatCurrent * (evbs + here->BSIM4XExpBVS - T1 - 1.0) + ckt->CKTgmin * vbs_jct; break; case 1: T2 = vbs_jct / Nvtms; if (T2 < -EXP_THRESHOLD) { here->BSIM4gbs = ckt->CKTgmin; here->BSIM4cbs = SourceSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4vjsmFwd) { evbs = exp(T2); here->BSIM4gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; here->BSIM4cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs_jct; } else { T0 = here->BSIM4IVjsmFwd / Nvtms; here->BSIM4gbs = T0 + ckt->CKTgmin; here->BSIM4cbs = here->BSIM4IVjsmFwd - SourceSatCurrent + T0 * (vbs_jct - here->BSIM4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; case 2: if (vbs_jct < here->BSIM4vjsmRev) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = evbs - 1.0; T2 = here->BSIM4IVjsmRev + here->BSIM4SslpRev * (vbs_jct - here->BSIM4vjsmRev); here->BSIM4gbs = devbs_dvb * T2 + T1 * here->BSIM4SslpRev + ckt->CKTgmin; here->BSIM4cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4vjsmFwd) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = (model->BSIM4bvs + vbs_jct) / Nvtms; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtms; } here->BSIM4gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4xjbvs * T3) + ckt->CKTgmin; here->BSIM4cbs = SourceSatCurrent * (evbs + here->BSIM4XExpBVS - 1.0 - model->BSIM4xjbvs * T2) + ckt->CKTgmin * vbs_jct; } else { here->BSIM4gbs = here->BSIM4SslpFwd + ckt->CKTgmin; here->BSIM4cbs = here->BSIM4IVjsmFwd + here->BSIM4SslpFwd * (vbs_jct - here->BSIM4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; default: break; } } Nvtmd = model->BSIM4vtm * model->BSIM4DjctEmissionCoeff; /* if ((here->BSIM4Adeff <= 0.0) && (here->BSIM4Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } v4.7 */ if ((here->BSIM4Adeff <= 0.0) && (here->BSIM4Pdeff <= 0.0)) { DrainSatCurrent = 0.0; } else { DrainSatCurrent = here->BSIM4Adeff * model->BSIM4DjctTempSatCurDensity + here->BSIM4Pdeff * model->BSIM4DjctSidewallTempSatCurDensity + pParam->BSIM4weffCJ * here->BSIM4nf * model->BSIM4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) { here->BSIM4gbd = ckt->CKTgmin; here->BSIM4cbd = here->BSIM4gbd * vbd_jct; } else { switch(model->BSIM4dioMod) { case 0: evbd = exp(vbd_jct / Nvtmd); T1 = model->BSIM4xjbvd * exp(-(model->BSIM4bvd + vbd_jct) / Nvtmd); /* WDLiu: Magic T1 in this form; different from BSIM4 beta. */ here->BSIM4gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; here->BSIM4cbd = DrainSatCurrent * (evbd + here->BSIM4XExpBVD - T1 - 1.0) + ckt->CKTgmin * vbd_jct; break; case 1: T2 = vbd_jct / Nvtmd; if (T2 < -EXP_THRESHOLD) { here->BSIM4gbd = ckt->CKTgmin; here->BSIM4cbd = DrainSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4vjdmFwd) { evbd = exp(T2); here->BSIM4gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; here->BSIM4cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd_jct; } else { T0 = here->BSIM4IVjdmFwd / Nvtmd; here->BSIM4gbd = T0 + ckt->CKTgmin; here->BSIM4cbd = here->BSIM4IVjdmFwd - DrainSatCurrent + T0 * (vbd_jct - here->BSIM4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; case 2: if (vbd_jct < here->BSIM4vjdmRev) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = evbd - 1.0; T2 = here->BSIM4IVjdmRev + here->BSIM4DslpRev * (vbd_jct - here->BSIM4vjdmRev); here->BSIM4gbd = devbd_dvb * T2 + T1 * here->BSIM4DslpRev + ckt->CKTgmin; here->BSIM4cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4vjdmFwd) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = (model->BSIM4bvd + vbd_jct) / Nvtmd; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtmd; } here->BSIM4gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4xjbvd * T3) + ckt->CKTgmin; here->BSIM4cbd = DrainSatCurrent * (evbd + here->BSIM4XExpBVD - 1.0 - model->BSIM4xjbvd * T2) + ckt->CKTgmin * vbd_jct; } else { here->BSIM4gbd = here->BSIM4DslpFwd + ckt->CKTgmin; here->BSIM4cbd = here->BSIM4IVjdmFwd + here->BSIM4DslpFwd * (vbd_jct - here->BSIM4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; default: break; } } /* trap-assisted tunneling and recombination current for reverse bias */ Nvtmrssws = model->BSIM4vtm0 * model->BSIM4njtsswstemp; Nvtmrsswgs = model->BSIM4vtm0 * model->BSIM4njtsswgstemp; Nvtmrss = model->BSIM4vtm0 * model->BSIM4njtsstemp; Nvtmrsswd = model->BSIM4vtm0 * model->BSIM4njtsswdtemp; Nvtmrsswgd = model->BSIM4vtm0 * model->BSIM4njtsswgdtemp; Nvtmrsd = model->BSIM4vtm0 * model->BSIM4njtsdtemp; if ((model->BSIM4vtss - vbs_jct) < (model->BSIM4vtss * 1e-3)) { T9 = 1.0e3; T0 = - vbs_jct / Nvtmrss * T9; DEXP(T0, T1, T10); dT1_dVb = T10 / Nvtmrss * T9; } else { T9 = 1.0 / (model->BSIM4vtss - vbs_jct); T0 = -vbs_jct / Nvtmrss * model->BSIM4vtss * T9; dT0_dVb = model->BSIM4vtss / Nvtmrss * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T1, T10); dT1_dVb = T10 * dT0_dVb; } if ((model->BSIM4vtsd - vbd_jct) < (model->BSIM4vtsd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsd * T9; DEXP(T0, T2, T10); dT2_dVb = T10 / Nvtmrsd * T9; } else { T9 = 1.0 / (model->BSIM4vtsd - vbd_jct); T0 = -vbd_jct / Nvtmrsd * model->BSIM4vtsd * T9; dT0_dVb = model->BSIM4vtsd / Nvtmrsd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T2, T10); dT2_dVb = T10 * dT0_dVb; } if ((model->BSIM4vtssws - vbs_jct) < (model->BSIM4vtssws * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrssws * T9; DEXP(T0, T3, T10); dT3_dVb = T10 / Nvtmrssws * T9; } else { T9 = 1.0 / (model->BSIM4vtssws - vbs_jct); T0 = -vbs_jct / Nvtmrssws * model->BSIM4vtssws * T9; dT0_dVb = model->BSIM4vtssws / Nvtmrssws * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T3, T10); dT3_dVb = T10 * dT0_dVb; } if ((model->BSIM4vtsswd - vbd_jct) < (model->BSIM4vtsswd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsswd * T9; DEXP(T0, T4, T10); dT4_dVb = T10 / Nvtmrsswd * T9; } else { T9 = 1.0 / (model->BSIM4vtsswd - vbd_jct); T0 = -vbd_jct / Nvtmrsswd * model->BSIM4vtsswd * T9; dT0_dVb = model->BSIM4vtsswd / Nvtmrsswd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T4, T10); dT4_dVb = T10 * dT0_dVb; } if ((model->BSIM4vtsswgs - vbs_jct) < (model->BSIM4vtsswgs * 1e-3) ) { T9 = 1.0e3; T0 = -vbs_jct / Nvtmrsswgs * T9; DEXP(T0, T5, T10); dT5_dVb = T10 / Nvtmrsswgs * T9; } else { T9 = 1.0 / (model->BSIM4vtsswgs - vbs_jct); T0 = -vbs_jct / Nvtmrsswgs * model->BSIM4vtsswgs * T9; dT0_dVb = model->BSIM4vtsswgs / Nvtmrsswgs * (T9 + vbs_jct * T9 * T9) ; DEXP(T0, T5, T10); dT5_dVb = T10 * dT0_dVb; } if ((model->BSIM4vtsswgd - vbd_jct) < (model->BSIM4vtsswgd * 1e-3) ) { T9 = 1.0e3; T0 = -vbd_jct / Nvtmrsswgd * T9; DEXP(T0, T6, T10); dT6_dVb = T10 / Nvtmrsswgd * T9; } else { T9 = 1.0 / (model->BSIM4vtsswgd - vbd_jct); T0 = -vbd_jct / Nvtmrsswgd * model->BSIM4vtsswgd * T9; dT0_dVb = model->BSIM4vtsswgd / Nvtmrsswgd * (T9 + vbd_jct * T9 * T9) ; DEXP(T0, T6, T10); dT6_dVb = T10 * dT0_dVb; } here->BSIM4gbs += here->BSIM4SjctTempRevSatCur * dT1_dVb + here->BSIM4SswTempRevSatCur * dT3_dVb + here->BSIM4SswgTempRevSatCur * dT5_dVb; here->BSIM4cbs -= here->BSIM4SjctTempRevSatCur * (T1 - 1.0) + here->BSIM4SswTempRevSatCur * (T3 - 1.0) + here->BSIM4SswgTempRevSatCur * (T5 - 1.0); here->BSIM4gbd += here->BSIM4DjctTempRevSatCur * dT2_dVb + here->BSIM4DswTempRevSatCur * dT4_dVb + here->BSIM4DswgTempRevSatCur * dT6_dVb; here->BSIM4cbd -= here->BSIM4DjctTempRevSatCur * (T2 - 1.0) + here->BSIM4DswTempRevSatCur * (T4 - 1.0) + here->BSIM4DswgTempRevSatCur * (T6 - 1.0); /* End of diode DC model */ if (vds >= 0.0) { here->BSIM4mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vdb = vds - vbs; /* WDLiu: for GIDL */ } else { here->BSIM4mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vdb = -vbs; } /* dunga */ if(model->BSIM4mtrlMod) { epsrox = 3.9; toxe = model->BSIM4eot; epssub = EPS0 * model->BSIM4epsrsub; } else { epsrox = model->BSIM4epsrox; toxe = model->BSIM4toxe; epssub = EPSSI; } T0 = Vbs - here->BSIM4vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4vbsc); if (T0 >= 0.0) { Vbseff = here->BSIM4vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); Vbseff = here->BSIM4vbsc * (1.0 + T2); dVbseff_dVb = T2 * here->BSIM4vbsc / T1; } /* JX: Correction to forward body bias */ T9 = 0.95 * pParam->BSIM4phi; T0 = T9 - Vbseff - 0.001; T1 = sqrt(T0 * T0 + 0.004 * T9); Vbseff = T9 - 0.5 * (T0 + T1); dVbseff_dVb *= 0.5 * (1.0 + T0 / T1); Phis = pParam->BSIM4phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = pParam->BSIM4Xdep0 * sqrtPhis / pParam->BSIM4sqrtPhi; dXdep_dVb = (pParam->BSIM4Xdep0 / pParam->BSIM4sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM4leff; Vtm = model->BSIM4vtm; Vtm0 = model->BSIM4vtm0; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM4vbi - pParam->BSIM4phi; T0 = pParam->BSIM4dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4dvt2; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4dvt2 * T4 * T4; } lt1 = model->BSIM4factor1 * T3 * T1; dlt1_dVb = model->BSIM4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4dvt2w; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4dvt2w * T4 * T4; } ltw = model->BSIM4factor1 * T3 * T1; dltw_dVb = model->BSIM4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4dvt1 * Leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; dT1_dVb = -T0 * T1 * dlt1_dVb / lt1; dTheta0_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { Theta0 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dTheta0_dVb = 0.0; } here->BSIM4thetavth = pParam->BSIM4dvt0 * Theta0; Delt_vth = here->BSIM4thetavth * V0; dDelt_vth_dVb = pParam->BSIM4dvt0 * dTheta0_dVb * V0; T0 = pParam->BSIM4dvt1w * pParam->BSIM4weff * Leff / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; dT1_dVb = -T0 * T1 * dltw_dVb / ltw; dT5_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dT5_dVb = 0.0; } T0 = pParam->BSIM4dvt0w * T5; T2 = T0 * V0; dT2_dVb = pParam->BSIM4dvt0w * dT5_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM4tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4lpe0 / Leff); T1 = pParam->BSIM4k1ox * (T0 - 1.0) * pParam->BSIM4sqrtPhi + (pParam->BSIM4kt1 + pParam->BSIM4kt1l / Leff + pParam->BSIM4kt2 * Vbseff) * TempRatio; Vth_NarrowW = toxe * pParam->BSIM4phi / (pParam->BSIM4weff + pParam->BSIM4w0); T3 = here->BSIM4eta0 + pParam->BSIM4etab * Vbseff; if (T3 < 1.0e-4) { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM4theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Lpe_Vb = sqrt(1.0 + pParam->BSIM4lpeb / Leff); Vth = model->BSIM4type * here->BSIM4vth0 + (pParam->BSIM4k1ox * sqrtPhis - pParam->BSIM4k1 * pParam->BSIM4sqrtPhi) * Lpe_Vb - here->BSIM4k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4k3 + pParam->BSIM4k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; dVth_dVb = Lpe_Vb * pParam->BSIM4k1ox * dsqrtPhis_dVb - here->BSIM4k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4k3b * Vth_NarrowW - pParam->BSIM4etab * Vds * pParam->BSIM4theta0vb0 * T4 + pParam->BSIM4kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; /* Calculate n */ tmp1 = epssub / Xdep; here->BSIM4nstar = model->BSIM4vtm / Charge_q * (model->BSIM4coxe + tmp1 + pParam->BSIM4cit); tmp2 = pParam->BSIM4nfactor * tmp1; tmp3 = pParam->BSIM4cdsc + pParam->BSIM4cdscb * Vbseff + pParam->BSIM4cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4cit) / model->BSIM4coxe; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4cdscb * Theta0) / model->BSIM4coxe; dn_dVd = pParam->BSIM4cdscd * Theta0 / model->BSIM4coxe; } else { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4cdscb * Theta0) / model->BSIM4coxe * T0; dn_dVd = pParam->BSIM4cdscd * Theta0 / model->BSIM4coxe * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4dvtp0 > 0.0) { T0 = -pParam->BSIM4dvtp1 * Vds; if (T0 < -EXP_THRESHOLD) { T2 = MIN_EXP; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->BSIM4dvtp1 * T2; } T3 = Leff + pParam->BSIM4dvtp0 * (1.0 + T2); dT3_dVd = pParam->BSIM4dvtp0 * dT2_dVd; if (model->BSIM4tempMod < 2) { T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; } else { T4 = model->BSIM4vtm0 * log(Leff / T3); dT4_dVd = -model->BSIM4vtm0 * dT3_dVd / T3; } dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; Vth -= n * T4; dVth_dVd -= dDITS_Sft_dVd; dVth_dVb -= dDITS_Sft_dVb; } /* v4.7 DITS_SFT2 */ if ((pParam->BSIM4dvtp4 == 0.0) || (pParam->BSIM4dvtp2factor == 0.0)) { T0 = 0.0; DITS_Sft2 = 0.0; } else { //T0 = exp(2.0 * pParam->BSIM4dvtp4 * Vds); /* beta code */ T1 = 2.0 * pParam->BSIM4dvtp4 * Vds; DEXP(T1, T0, T10); DITS_Sft2 = pParam->BSIM4dvtp2factor * (T0-1) / (T0+1); //dDITS_Sft2_dVd = pParam->BSIM4dvtp2factor * pParam->BSIM4dvtp4 * 4.0 * T0 / ((T0+1) * (T0+1)); /* beta code */ dDITS_Sft2_dVd = pParam->BSIM4dvtp2factor * pParam->BSIM4dvtp4 * 4.0 * T10 / ((T0+1) * (T0+1)); Vth -= DITS_Sft2; dVth_dVd -= dDITS_Sft2_dVd; } here->BSIM4von = Vth; /* Poly Gate Si Depletion Effect */ T0 = here->BSIM4vfb + pParam->BSIM4phi; if(model->BSIM4mtrlMod == 0) T1 = EPSSI; else T1 = model->BSIM4epsrgate * EPS0; BSIM4polyDepletion(T0, pParam->BSIM4ngate, T1, model->BSIM4coxe, vgs, &vgs_eff, &dvgs_eff_dvg); BSIM4polyDepletion(T0, pParam->BSIM4ngate, T1, model->BSIM4coxe, vgd, &vgd_eff, &dvgd_eff_dvg); if(here->BSIM4mode>0) { Vgs_eff = vgs_eff; dVgs_eff_dVg = dvgs_eff_dvg; } else { Vgs_eff = vgd_eff; dVgs_eff_dVg = dvgd_eff_dvg; } here->BSIM4vgs_eff = vgs_eff; here->BSIM4vgd_eff = vgd_eff; here->BSIM4dvgs_eff_dvg = dvgs_eff_dvg; here->BSIM4dvgd_eff_dvg = dvgd_eff_dvg; Vgst = Vgs_eff - Vth; /* Calculate Vgsteff */ T0 = n * Vtm; T1 = pParam->BSIM4mstar * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4mstar * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4mstar; dT10_dVb = -dVth_dVb * pParam->BSIM4mstar; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4mstar * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4voffcbn - (1.0 - pParam->BSIM4mstar) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4coxe * MIN_EXP / pParam->BSIM4cdep0; T9 = pParam->BSIM4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4coxe * MAX_EXP / pParam->BSIM4cdep0; T9 = pParam->BSIM4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4coxe / pParam->BSIM4cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4mstar + n * T4; dT9_dVg = T3 * (pParam->BSIM4mstar - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } here->BSIM4Vgsteff = Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM4sqrtPhi; Weff = pParam->BSIM4weff - 2.0 * (pParam->BSIM4dwg * Vgsteff + pParam->BSIM4dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM4dwg; dWeff_dVb = -2.0 * pParam->BSIM4dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } if (model->BSIM4rdsMod == 1) Rds = dRds_dVg = dRds_dVb = 0.0; else { T0 = 1.0 + pParam->BSIM4prwg * Vgsteff; dT0_dVg = -pParam->BSIM4prwg / T0 / T0; T1 = pParam->BSIM4prwb * T9; dT1_dVb = pParam->BSIM4prwb * dsqrtPhis_dVb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); /* 0.01 = 4.0 * 0.05 * 0.05 */ dT3_dVg = 1.0 + T2 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; T4 = pParam->BSIM4rds0 * 0.5; Rds = pParam->BSIM4rdswmin + T3 * T4; dRds_dVg = T4 * dT3_dVg; dRds_dVb = T4 * dT3_dVb; if (Rds > 0.0) here->BSIM4grdsw = 1.0 / Rds* here->BSIM4nf; /*4.6.2*/ else here->BSIM4grdsw = 0.0; } /* Calculate Abulk */ T9 = 0.5 * pParam->BSIM4k1ox * Lpe_Vb / sqrtPhis; T1 = T9 + here->BSIM4k2ox - pParam->BSIM4k3b * Vth_NarrowW; dT1_dVb = -T9 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM4xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM4a0 * T5; tmp3 = pParam->BSIM4weff + pParam->BSIM4b1; tmp4 = pParam->BSIM4b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM4ags * pParam->BSIM4a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } here->BSIM4Abulk = Abulk; T2 = pParam->BSIM4keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM4keta * T0 * T0; } else { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM4keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM4mtrlMod && model->BSIM4mtrlCompatMod == 0) T14 = 2.0 * model->BSIM4type *(model->BSIM4phig - model->BSIM4easub - 0.5*model->BSIM4Eg0 + 0.45); else T14 = 0.0; if (model->BSIM4mobMod == 0) { T0 = Vgsteff + Vth + Vth - T14; T2 = pParam->BSIM4ua + pParam->BSIM4uc * Vbseff; T3 = T0 / toxe; T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T3 * (T2 + pParam->BSIM4ub * T3) + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4ub * T3) / toxe; T13 = 2.0 * (dDenomi_dVg + T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + pParam->BSIM4uc * T3; dDenomi_dVg+= T7; } else if (model->BSIM4mobMod == 1) { T0 = Vgsteff + Vth + Vth - T14; T2 = 1.0 + pParam->BSIM4uc * Vbseff; T3 = T0 / toxe; T4 = T3 * (pParam->BSIM4ua + pParam->BSIM4ub * T3); T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T4 * T2 + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = (pParam->BSIM4ua + 2.0 * pParam->BSIM4ub * T3) * T2 / toxe; T13 = 2.0 * (dDenomi_dVg + T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + pParam->BSIM4uc * T4; dDenomi_dVg+= T7; } else if (model->BSIM4mobMod == 2) { T0 = (Vgsteff + here->BSIM4vtfbphi1) / toxe; T1 = exp(pParam->BSIM4eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4eu / T0 / toxe; T2 = pParam->BSIM4ua + pParam->BSIM4uc * Vbseff; T3 = T0 / toxe; /*Do we need it?*/ T12 = sqrt(Vth * Vth + 0.0001); T9 = 1.0/(Vgsteff + 2*T12); T10 = T9*toxe; T8 = pParam->BSIM4ud * T10 * T10 * Vth; T6 = T8 * Vth; T5 = T1 * T2 + T6; T7 = - 2.0 * T6 * T9; T11 = T7 * Vth/T12; dDenomi_dVg = T2 * dT1_dVg + T7; T13 = 2.0 * (T11 + T8); dDenomi_dVd = T13 * dVth_dVd; dDenomi_dVb = T13 * dVth_dVb + T1 * pParam->BSIM4uc; } /*high K mobility*/ else { /*univsersal mobility*/ T0 = (Vgsteff + here->BSIM4vtfbphi1)* 1.0e-8 / toxe/6.0; T1 = exp(pParam->BSIM4eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4eu * 1.0e-8/ T0 / toxe/6.0; T2 = pParam->BSIM4ua + pParam->BSIM4uc * Vbseff; /*Coulombic*/ VgsteffVth = pParam->BSIM4VgsteffVth; T10 = exp(pParam->BSIM4ucs * log(0.5 + 0.5 * Vgsteff/VgsteffVth)); T11 = pParam->BSIM4ud/T10; dT11_dVg = - 0.5 * pParam->BSIM4ucs * T11 /(0.5 + 0.5*Vgsteff/VgsteffVth)/VgsteffVth; dDenomi_dVg = T2 * dT1_dVg + dT11_dVg; dDenomi_dVd = 0.0; dDenomi_dVb = T1 * pParam->BSIM4uc; T5 = T1 * T2 + T11; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } here->BSIM4ueff = ueff = here->BSIM4u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * here->BSIM4vsattemp * model->BSIM4coxe; WVCoxRds = WVCox * Rds; Esat = 2.0 * here->BSIM4vsattemp / ueff; here->BSIM4EsatL = EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM4a1; if (a1 == 0.0) { Lambda = pParam->BSIM4a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) { T0 = 1.0 - pParam->BSIM4a2; T1 = T0 - pParam->BSIM4a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM4a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM4a2 + pParam->BSIM4a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM4vdsat = Vdsat; /* Calculate Vdseff */ T1 = Vdsat - Vds - pParam->BSIM4delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4delta * Vdsat); T0 = T1 / T2; T9 = 2.0 * pParam->BSIM4delta; T3 = T9 / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; if (T1 >= 0.0) { Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); } else { T4 = T9 / (T2 - T1); T5 = 1.0 - T4; T6 = Vdsat * T4 / (T2 - T1); Vdseff = Vdsat * T5; dVdseff_dVg = dVdsat_dVg * T5 + T6 * (dT2_dVg - dT1_dVg); dVdseff_dVd = dVdsat_dVd * T5 + T6 * (dT2_dVd - dT1_dVd); dVdseff_dVb = dVdsat_dVb * T5 + T6 * (dT2_dVb - dT1_dVb); } if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; here->BSIM4Vdseff = Vdseff; /* Velocity Overshoot */ if((model->BSIM4lambdaGiven) && (model->BSIM4lambda > 0.0) ) { T1 = Leff * ueff; T2 = pParam->BSIM4lambda / T1; T3 = -T2 / T1 * Leff; dT2_dVd = T3 * dueff_dVd; dT2_dVg = T3 * dueff_dVg; dT2_dVb = T3 * dueff_dVb; T5 = 1.0 / (Esat * pParam->BSIM4litl); T4 = -T5 / EsatL; dT5_dVg = dEsatL_dVg * T4; dT5_dVd = dEsatL_dVd * T4; dT5_dVb = dEsatL_dVb * T4; T6 = 1.0 + diffVds * T5; dT6_dVg = dT5_dVg * diffVds - dVdseff_dVg * T5; dT6_dVd = dT5_dVd * diffVds + (1.0 - dVdseff_dVd) * T5; dT6_dVb = dT5_dVb * diffVds - dVdseff_dVb * T5; T7 = 2.0 / (T6 * T6 + 1.0); T8 = 1.0 - T7; T9 = T6 * T7 * T7; dT8_dVg = T9 * dT6_dVg; dT8_dVd = T9 * dT6_dVd; dT8_dVb = T9 * dT6_dVb; T10 = 1.0 + T2 * T8; dT10_dVg = dT2_dVg * T8 + T2 * dT8_dVg; dT10_dVd = dT2_dVd * T8 + T2 * dT8_dVd; dT10_dVb = dT2_dVb * T8 + T2 * dT8_dVb; if(T10 == 1.0) dT10_dVg = dT10_dVd = dT10_dVb = 0.0; dEsatL_dVg *= T10; dEsatL_dVg += EsatL * dT10_dVg; dEsatL_dVd *= T10; dEsatL_dVd += EsatL * dT10_dVd; dEsatL_dVb *= T10; dEsatL_dVb += EsatL * dT10_dVb; EsatL *= T10; Esat = EsatL / Leff; /* bugfix by Wenwei Yang (4.6.4) */ here->BSIM4EsatL = EsatL; } /* Calculate Vasat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; /* Calculate Idl first */ tmp1 = here->BSIM4vtfbphi2; tmp2 = 2.0e8 * model->BSIM4toxp; dT0_dVg = 1.0 / tmp2; T0 = (Vgsteff + tmp1) * dT0_dVg; tmp3 = exp(model->BSIM4bdos * 0.7 * log(T0)); T1 = 1.0 + tmp3; T2 = model->BSIM4bdos * 0.7 * tmp3 / T0; Tcen = model->BSIM4ados * 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 * dT0_dVg / T1; Coxeff = epssub * model->BSIM4coxp / (epssub + model->BSIM4coxp * Tcen); here->BSIM4Coxeff = Coxeff; dCoxeff_dVg = -Coxeff * Coxeff * dTcen_dVg / epssub; CoxeffWovL = Coxeff * Weff / Leff; beta = ueff * CoxeffWovL; T3 = ueff / Leff; dbeta_dVg = CoxeffWovL * dueff_dVg + T3 * (Weff * dCoxeff_dVg + Coxeff * dWeff_dVg); dbeta_dVd = CoxeffWovL * dueff_dVd; dbeta_dVb = CoxeffWovL * dueff_dVb + T3 * Coxeff * dWeff_dVb; here->BSIM4AbovVgst2Vtm = Abulk / Vgst2Vtm; T0 = 1.0 - 0.5 * Vdseff * here->BSIM4AbovVgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; Idl = gche / T0; T1 = (1.0 - Idl * Rds) / T0; T2 = Idl * Idl; dIdl_dVg = T1 * dgche_dVg - T2 * dRds_dVg; dIdl_dVd = T1 * dgche_dVd; dIdl_dVb = T1 * dgche_dVb - T2 * dRds_dVb; /* Calculate degradation factor due to pocket implant */ if (pParam->BSIM4fprout <= 0.0) { FP = 1.0; dFP_dVg = 0.0; } else { T9 = pParam->BSIM4fprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); dFP_dVg = FP * FP * T9 / Vgst2Vtm; } /* Calculate VACLM */ T8 = pParam->BSIM4pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { PvagTerm = 1.0 + T9; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dPvagTerm_dVb = -T9 * dEsatL_dVb / EsatL; dPvagTerm_dVd = -T9 * dEsatL_dVd / EsatL; } else { T4 = 1.0 / (17.0 + 20.0 * T9); PvagTerm = (0.8 + T9) * T4; T4 *= T4; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T4; T9 *= T4 / EsatL; dPvagTerm_dVb = -T9 * dEsatL_dVb; dPvagTerm_dVd = -T9 * dEsatL_dVd; } if ((pParam->BSIM4pclm > MIN_EXP) && (diffVds > 1.0e-10)) { T0 = 1.0 + Rds * Idl; dT0_dVg = dRds_dVg * Idl + Rds * dIdl_dVg; dT0_dVd = Rds * dIdl_dVd; dT0_dVb = dRds_dVb * Idl + Rds * dIdl_dVb; T2 = Vdsat / Esat; T1 = Leff + T2; dT1_dVg = (dVdsat_dVg - T2 * dEsatL_dVg / Leff) / Esat; dT1_dVd = (dVdsat_dVd - T2 * dEsatL_dVd / Leff) / Esat; dT1_dVb = (dVdsat_dVb - T2 * dEsatL_dVb / Leff) / Esat; Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4pclm * pParam->BSIM4litl); dCclm_dVg = Cclm * (dFP_dVg / FP + dPvagTerm_dVg / PvagTerm + dT0_dVg / T0 + dT1_dVg / T1); dCclm_dVb = Cclm * (dPvagTerm_dVb / PvagTerm + dT0_dVb / T0 + dT1_dVb / T1); dCclm_dVd = Cclm * (dPvagTerm_dVd / PvagTerm + dT0_dVd / T0 + dT1_dVd / T1); VACLM = Cclm * diffVds; dVACLM_dVg = dCclm_dVg * diffVds - dVdseff_dVg * Cclm; dVACLM_dVb = dCclm_dVb * diffVds - dVdseff_dVb * Cclm; dVACLM_dVd = dCclm_dVd * diffVds + (1.0 - dVdseff_dVd) * Cclm; } else { VACLM = Cclm = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; dCclm_dVd = dCclm_dVg = dCclm_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM4thetaRout > MIN_EXP) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM4thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM4pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4pdiblb) * T3; dVADIBL_dVd *= T3; } else { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM4pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } dVADIBL_dVg = dVADIBL_dVg * PvagTerm + VADIBL * dPvagTerm_dVg; dVADIBL_dVb = dVADIBL_dVb * PvagTerm + VADIBL * dPvagTerm_dVb; dVADIBL_dVd = dVADIBL_dVd * PvagTerm + VADIBL * dPvagTerm_dVd; VADIBL *= PvagTerm; } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate Va */ Va = Vasat + VACLM; dVa_dVg = dVasat_dVg + dVACLM_dVg; dVa_dVb = dVasat_dVb + dVACLM_dVb; dVa_dVd = dVasat_dVd + dVACLM_dVd; /* Calculate VADITS */ T0 = pParam->BSIM4pditsd * Vds; if (T0 > EXP_THRESHOLD) { T1 = MAX_EXP; dT1_dVd = 0; } else { T1 = exp(T0); dT1_dVd = T1 * pParam->BSIM4pditsd; } if (pParam->BSIM4pdits > MIN_EXP) { T2 = 1.0 + model->BSIM4pditsl * Leff; VADITS = (1.0 + T2 * T1) / pParam->BSIM4pdits; dVADITS_dVg = VADITS * dFP_dVg; dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4pdits; VADITS *= FP; } else { VADITS = MAX_EXP; dVADITS_dVg = dVADITS_dVd = 0; } /* Calculate VASCBE */ if ((pParam->BSIM4pscbe2 > 0.0)&&(pParam->BSIM4pscbe1>=0.0)) /*4.6.2*/ { if (diffVds > pParam->BSIM4pscbe1 * pParam->BSIM4litl / EXP_THRESHOLD) { T0 = pParam->BSIM4pscbe1 * pParam->BSIM4litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM4pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM4pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Add DIBL to Ids */ T9 = diffVds / VADIBL; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVADIBL_dVg) / VADIBL; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVADIBL_dVd) / VADIBL; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVADIBL_dVb) / VADIBL; /* Add DITS to Ids */ T9 = diffVds / VADITS; T0 = 1.0 + T9; dIdsa_dVg = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVADITS_dVg) / VADITS; dIdsa_dVd = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVADITS_dVd) / VADITS; dIdsa_dVb = T0 * dIdsa_dVb - Idsa * dVdseff_dVb / VADITS; Idsa *= T0; /* Add CLM to Ids */ T0 = log(Va / Vasat); dT0_dVg = dVa_dVg / Va - dVasat_dVg / Vasat; dT0_dVb = dVa_dVb / Va - dVasat_dVb / Vasat; dT0_dVd = dVa_dVd / Va - dVasat_dVd / Vasat; T1 = T0 / Cclm; T9 = 1.0 + T1; dT9_dVg = (dT0_dVg - T1 * dCclm_dVg) / Cclm; dT9_dVb = (dT0_dVb - T1 * dCclm_dVb) / Cclm; dT9_dVd = (dT0_dVd - T1 * dCclm_dVd) / Cclm; dIdsa_dVg = dIdsa_dVg * T9 + Idsa * dT9_dVg; dIdsa_dVb = dIdsa_dVb * T9 + Idsa * dT9_dVb; dIdsa_dVd = dIdsa_dVd * T9 + Idsa * dT9_dVd; Idsa *= T9; /* Substrate current begins */ tmp = pParam->BSIM4alpha0 + pParam->BSIM4alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM4beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM4beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM4beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } T4 = Idsa * Vdseff; Isub = T1 * T4; Gbg = T1 * (dIdsa_dVg * Vdseff + Idsa * dVdseff_dVg) + T4 * dT1_dVg; Gbd = T1 * (dIdsa_dVd * Vdseff + Idsa * dVdseff_dVd) + T4 * dT1_dVd; Gbb = T1 * (dIdsa_dVb * Vdseff + Idsa * dVdseff_dVb) + T4 * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; } here->BSIM4csub = Isub; here->BSIM4gbbs = Gbb; here->BSIM4gbgs = Gbg; here->BSIM4gbds = Gbd; /* Add SCBE to Ids */ T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; tmp1 = Gds + Gm * dVgsteff_dVd; tmp2 = Gmb + Gm * dVgsteff_dVb; tmp3 = Gm; Gm = (Ids * dVdseff_dVg + Vdseff * tmp3) * dVgsteff_dVg; Gds = Ids * (dVdseff_dVd + dVdseff_dVg * dVgsteff_dVd) + Vdseff * tmp1; Gmb = (Ids * (dVdseff_dVb + dVdseff_dVg * dVgsteff_dVb) + Vdseff * tmp2) * dVbseff_dVb; cdrain = Ids * Vdseff; /* Source End Velocity Limit */ if((model->BSIM4vtlGiven) && (model->BSIM4vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; vs = cdrain * T11; /* vs */ dvs_dVg = Gm * T11 + cdrain * T10 * dVgsteff_dVg; dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; T1 = vs / (pParam->BSIM4vtl * pParam->BSIM4tfactor); if(T1 > 0.0) { T2 = 1.0 + exp(T0 * log(T1)); T3 = (T2 - 1.0) * T0 / vs; Fsevl = 1.0 / exp(log(T2)/ T0); dT2_dVg = T3 * dvs_dVg; dT2_dVd = T3 * dvs_dVd; dT2_dVb = T3 * dvs_dVb; T4 = -1.0 / T0 * Fsevl / T2; dFsevl_dVg = T4 * dT2_dVg; dFsevl_dVd = T4 * dT2_dVd; dFsevl_dVb = T4 * dT2_dVb; } else { Fsevl = 1.0; dFsevl_dVg = 0.0; dFsevl_dVd = 0.0; dFsevl_dVb = 0.0; } Gm *=Fsevl; Gm += cdrain * dFsevl_dVg; Gmb *=Fsevl; Gmb += cdrain * dFsevl_dVb; Gds *=Fsevl; Gds += cdrain * dFsevl_dVd; cdrain *= Fsevl; } here->BSIM4gds = Gds; here->BSIM4gm = Gm; here->BSIM4gmbs = Gmb; here->BSIM4IdovVds = Ids; if( here->BSIM4IdovVds <= 1.0e-9) here->BSIM4IdovVds = 1.0e-9; /* Calculate Rg */ if ((here->BSIM4rgateMod > 1) || (here->BSIM4trnqsMod != 0) || (here->BSIM4acnqsMod != 0)) { T9 = pParam->BSIM4xrcrg2 * model->BSIM4vtm; T0 = T9 * beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; here->BSIM4gcrg = pParam->BSIM4xrcrg1 * ( T0 + Ids); here->BSIM4gcrgd = pParam->BSIM4xrcrg1 * (dT0_dVd + tmp1); here->BSIM4gcrgb = pParam->BSIM4xrcrg1 * (dT0_dVb + tmp2) * dVbseff_dVb; here->BSIM4gcrgg = pParam->BSIM4xrcrg1 * (dT0_dVg + tmp3) * dVgsteff_dVg; if (here->BSIM4nf != 1.0) { here->BSIM4gcrg *= here->BSIM4nf; here->BSIM4gcrgg *= here->BSIM4nf; here->BSIM4gcrgd *= here->BSIM4nf; here->BSIM4gcrgb *= here->BSIM4nf; } if (here->BSIM4rgateMod == 2) { T10 = here->BSIM4grgeltd * here->BSIM4grgeltd; T11 = here->BSIM4grgeltd + here->BSIM4gcrg; here->BSIM4gcrg = here->BSIM4grgeltd * here->BSIM4gcrg / T11; T12 = T10 / T11 / T11; here->BSIM4gcrgg *= T12; here->BSIM4gcrgd *= T12; here->BSIM4gcrgb *= T12; } here->BSIM4gcrgs = -(here->BSIM4gcrgg + here->BSIM4gcrgd + here->BSIM4gcrgb); } /* Calculate bias-dependent external S/D resistance */ if (model->BSIM4rdsMod) { /* Rs(V) */ T0 = vgs - pParam->BSIM4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; T0 = 1.0 + pParam->BSIM4prwg * vgs_eff; dT0_dvg = -pParam->BSIM4prwg / T0 / T0 * dvgs_eff_dvg; T1 = -pParam->BSIM4prwb * vbs; dT1_dvb = -pParam->BSIM4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4rs0 * 0.5; Rs = pParam->BSIM4rswmin + T3 * T4; dRs_dvg = T4 * dT3_dvg; dRs_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4sourceConductance * Rs; here->BSIM4gstot = here->BSIM4sourceConductance / T0; T0 = -here->BSIM4gstot * here->BSIM4gstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dvg; dgstot_dvb = T0 * dRs_dvb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd); /* Rd(V) */ T0 = vgd - pParam->BSIM4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; T0 = 1.0 + pParam->BSIM4prwg * vgd_eff; dT0_dvg = -pParam->BSIM4prwg / T0 / T0 * dvgd_eff_dvg; T1 = -pParam->BSIM4prwb * vbd; dT1_dvb = -pParam->BSIM4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4rd0 * 0.5; Rd = pParam->BSIM4rdwmin + T3 * T4; dRd_dvg = T4 * dT3_dvg; dRd_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4drainConductance * Rd; here->BSIM4gdtot = here->BSIM4drainConductance / T0; T0 = -here->BSIM4gdtot * here->BSIM4gdtot; dgdtot_dvs = 0.0; dgdtot_dvg = T0 * dRd_dvg; dgdtot_dvb = T0 * dRd_dvb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs); here->BSIM4gstotd = vses * dgstot_dvd; here->BSIM4gstotg = vses * dgstot_dvg; here->BSIM4gstots = vses * dgstot_dvs; here->BSIM4gstotb = vses * dgstot_dvb; T2 = vdes - vds; here->BSIM4gdtotd = T2 * dgdtot_dvd; here->BSIM4gdtotg = T2 * dgdtot_dvg; here->BSIM4gdtots = T2 * dgdtot_dvs; here->BSIM4gdtotb = T2 * dgdtot_dvb; } else /* WDLiu: for bypass */ { here->BSIM4gstot = here->BSIM4gstotd = here->BSIM4gstotg = 0.0; here->BSIM4gstots = here->BSIM4gstotb = 0.0; here->BSIM4gdtot = here->BSIM4gdtotd = here->BSIM4gdtotg = 0.0; here->BSIM4gdtots = here->BSIM4gdtotb = 0.0; } /* GIDL/GISL Models */ if(model->BSIM4mtrlMod == 0) T0 = 3.0 * toxe; else T0 = model->BSIM4epsrsub * toxe / epsrox; /* Calculate GIDL current */ vgs_eff = here->BSIM4vgs_eff; dvgs_eff_dvg = here->BSIM4dvgs_eff_dvg; vgd_eff = here->BSIM4vgd_eff; dvgd_eff_dvg = here->BSIM4dvgd_eff_dvg; if (model->BSIM4gidlMod==0){ if(model->BSIM4mtrlMod ==0) T1 = (vds - vgs_eff - pParam->BSIM4egidl ) / T0; else T1 = (vds - vgs_eff - pParam->BSIM4egidl + pParam->BSIM4vfbsd) / T0; if ((pParam->BSIM4agidl <= 0.0) || (pParam->BSIM4bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4cgidl <= 0.0) || (vbd > 0.0)) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgs_eff_dvg * dT1_dVd; T2 = pParam->BSIM4bgidl / T1; if (T2 < 100.0) { Igidl = pParam->BSIM4agidl * pParam->BSIM4weffCJ * T1 * exp(-T2); T3 = Igidl * (1.0 + T2) / T1; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else { Igidl = pParam->BSIM4agidl * pParam->BSIM4weffCJ * 3.720075976e-44; Ggidld = Igidl * dT1_dVd; Ggidlg = Igidl * dT1_dVg; Igidl *= T1; } T4 = vbd * vbd; T5 = -vbd * T4; T6 = pParam->BSIM4cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; Igidl *= T7; } here->BSIM4Igidl = Igidl; here->BSIM4ggidld = Ggidld; here->BSIM4ggidlg = Ggidlg; here->BSIM4ggidlb = Ggidlb; /* Calculate GISL current */ if(model->BSIM4mtrlMod ==0) T1 = (-vds - vgd_eff - pParam->BSIM4egisl ) / T0; else T1 = (-vds - vgd_eff - pParam->BSIM4egisl + pParam->BSIM4vfbsd ) / T0; if ((pParam->BSIM4agisl <= 0.0) || (pParam->BSIM4bgisl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4cgisl <= 0.0) || (vbs > 0.0)) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgd_eff_dvg * dT1_dVd; T2 = pParam->BSIM4bgisl / T1; if (T2 < 100.0) { Igisl = pParam->BSIM4agisl * pParam->BSIM4weffCJ * T1 * exp(-T2); T3 = Igisl * (1.0 + T2) / T1; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else { Igisl = pParam->BSIM4agisl * pParam->BSIM4weffCJ * 3.720075976e-44; Ggisls = Igisl * dT1_dVd; Ggislg = Igisl * dT1_dVg; Igisl *= T1; } T4 = vbs * vbs; T5 = -vbs * T4; T6 = pParam->BSIM4cgisl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4cgisl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; Igisl *= T7; } here->BSIM4Igisl = Igisl; here->BSIM4ggisls = Ggisls; here->BSIM4ggislg = Ggislg; here->BSIM4ggislb = Ggislb; } else{ /* v4.7 New Gidl/GISL model */ /* GISL */ if (model->BSIM4mtrlMod==0) T1 = (-vds - pParam->BSIM4rgisl * vgd_eff - pParam->BSIM4egisl) / T0; else T1 = (-vds - pParam->BSIM4rgisl * vgd_eff - pParam->BSIM4egisl + pParam->BSIM4vfbsd) / T0; if ((pParam->BSIM4agisl <= 0.0) || (pParam->BSIM4bgisl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4cgisl < 0.0) ) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1 / T0; dT1_dVg = - pParam->BSIM4rgisl * dT1_dVd * dvgd_eff_dvg; T2 = pParam->BSIM4bgisl / T1; if (T2 < EXPL_THRESHOLD) { Igisl = pParam->BSIM4weffCJ * pParam->BSIM4agisl * T1 * exp(-T2); T3 = Igisl / T1 * (T2 + 1); Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else { T3 = pParam->BSIM4weffCJ * pParam->BSIM4agisl * MIN_EXPL; Igisl = T3 * T1 ; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } T4 = vbs - pParam->BSIM4fgisl; if (T4==0) T5 = EXPL_THRESHOLD; else T5 = pParam->BSIM4kgisl / T4; if (T5BSIM4Igisl = Igisl; here->BSIM4ggisls = Ggisls; here->BSIM4ggislg = Ggislg; here->BSIM4ggislb = Ggislb; /* End of GISL */ /* GIDL */ if (model->BSIM4mtrlMod==0) T1 = (vds - pParam->BSIM4rgidl * vgs_eff - pParam->BSIM4egidl) / T0; else T1 = (vds - pParam->BSIM4rgidl * vgs_eff - pParam->BSIM4egidl + pParam->BSIM4vfbsd) / T0; if ((pParam->BSIM4agidl <= 0.0) || (pParam->BSIM4bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4cgidl < 0.0) ) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1 / T0; dT1_dVg = - pParam->BSIM4rgidl * dT1_dVd * dvgs_eff_dvg; T2 = pParam->BSIM4bgidl / T1; if (T2 < EXPL_THRESHOLD) { Igidl = pParam->BSIM4weffCJ * pParam->BSIM4agidl * T1 * exp(-T2); T3 = Igidl / T1 * (T2 + 1); Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else { T3 = pParam->BSIM4weffCJ * pParam->BSIM4agidl * MIN_EXPL; Igidl = T3 * T1 ; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } T4 = vbd - pParam->BSIM4fgidl; if (T4==0) T5 = EXPL_THRESHOLD; else T5 = pParam->BSIM4kgidl / T4; if (T5BSIM4Igidl = Igidl; here->BSIM4ggidld = Ggidld; here->BSIM4ggidlg = Ggidlg; here->BSIM4ggidlb = Ggidlb; /* End of New GIDL */ } /*End of Gidl*/ /* Calculate gate tunneling current */ if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { Vfb = here->BSIM4vfbzb; V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1; /* WDLiu: -No surprise? No. -Good! */ Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) /* WDLiu: Avoiding numerical instability. */ Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; T0 = 0.5 * pParam->BSIM4k1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->BSIM4k1ox == 0.0) Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = 0.0; else if (T3 < 0.0) { Voxdepinv = -T3; dVoxdepinv_dVg = -dVgs_eff_dVg + dVfbeff_dVg + dVgsteff_dVg; dVoxdepinv_dVd = dVgsteff_dVd; dVoxdepinv_dVb = dVfbeff_dVb + 1.0 + dVgsteff_dVb; } else { T1 = sqrt(T0 * T0 + T3); T2 = T0 / T1; Voxdepinv = pParam->BSIM4k1ox * (T1 - T0); dVoxdepinv_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dVoxdepinv_dVd = -T2 * dVgsteff_dVd; dVoxdepinv_dVb = -T2 * (dVfbeff_dVb + 1.0 + dVgsteff_dVb); } Voxdepinv += Vgsteff; dVoxdepinv_dVg += dVgsteff_dVg; dVoxdepinv_dVd += dVgsteff_dVd; dVoxdepinv_dVb += dVgsteff_dVb; } if(model->BSIM4tempMod < 2) tmp = Vtm; else /* model->BSIM4tempMod = 2 , 3*/ tmp = Vtm0; if (model->BSIM4igcMod) { T0 = tmp * pParam->BSIM4nigc; if(model->BSIM4igcMod == 1) { VxNVt = (Vgs_eff - model->BSIM4type * here->BSIM4vth0) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - model->BSIM4type * here->BSIM4vth0; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; } } else if (model->BSIM4igcMod == 2) { VxNVt = (Vgs_eff - here->BSIM4von) / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = Vgs_eff - here->BSIM4von; dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = -dVth_dVd; dVaux_dVb = -dVth_dVb; } } if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else if ((VxNVt >= -EXP_THRESHOLD) && (VxNVt <= EXP_THRESHOLD)) { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); if(model->BSIM4igcMod == 1) { dVaux_dVd = 0.0; dVaux_dVb = 0.0; } else if (model->BSIM4igcMod == 2) { dVaux_dVd = -dVgs_eff_dVg * dVth_dVd; dVaux_dVb = -dVgs_eff_dVg * dVth_dVb; } dVaux_dVg *= dVgs_eff_dVg; } T2 = Vgs_eff * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + Vgs_eff * dVaux_dVg; dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; T11 = pParam->BSIM4Aechvb; T12 = pParam->BSIM4Bechvb; T3 = pParam->BSIM4aigc * pParam->BSIM4cigc - pParam->BSIM4bigc; T4 = pParam->BSIM4bigc * pParam->BSIM4cigc; T5 = T12 * (pParam->BSIM4aigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igc = T11 * T2 * T6; dIgc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); if (model->BSIM4pigcdGiven) { Pigcd = pParam->BSIM4pigcd; dPigcd_dVg = dPigcd_dVd = dPigcd_dVb = 0.0; } else { /* T11 = pParam->BSIM4Bechvb * toxe; v4.7 */ T11 = -pParam->BSIM4Bechvb; T12 = Vgsteff + 1.0e-20; T13 = T11 / T12 / T12; T14 = -T13 / T12; Pigcd = T13 * (1.0 - 0.5 * Vdseff / T12); dPigcd_dVg = T14 * (2.0 + 0.5 * (dVdseff_dVg - 3.0 * Vdseff / T12)); dPigcd_dVd = 0.5 * T14 * dVdseff_dVd; dPigcd_dVb = 0.5 * T14 * dVdseff_dVb; } T7 = -Pigcd * Vdseff; /* bugfix */ dT7_dVg = -Vdseff * dPigcd_dVg - Pigcd * dVdseff_dVg; dT7_dVd = -Vdseff * dPigcd_dVd - Pigcd * dVdseff_dVd + dT7_dVg * dVgsteff_dVd; dT7_dVb = -Vdseff * dPigcd_dVb - Pigcd * dVdseff_dVb + dT7_dVg * dVgsteff_dVb; dT7_dVg *= dVgsteff_dVg; dT7_dVb *= dVbseff_dVb; T8 = T7 * T7 + 2.0e-4; dT8_dVg = 2.0 * T7; dT8_dVd = dT8_dVg * dT7_dVd; dT8_dVb = dT8_dVg * dT7_dVb; dT8_dVg *= dT7_dVg; if (T7 > EXP_THRESHOLD) { T9 = MAX_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else if (T7 < -EXP_THRESHOLD) { T9 = MIN_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else { T9 = exp(T7); dT9_dVg = T9 * dT7_dVg; dT9_dVd = T9 * dT7_dVd; dT9_dVb = T9 * dT7_dVb; } T0 = T8 * T8; T1 = T9 - 1.0 + 1.0e-4; T10 = (T1 - T7) / T8; dT10_dVg = (dT9_dVg - dT7_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT9_dVd - dT7_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT9_dVb - dT7_dVb - T10 * dT8_dVb) / T8; Igcs = Igc * T10; dIgcs_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcs_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcs_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; T1 = T9 - 1.0 - 1.0e-4; T10 = (T7 * T9 - T1) / T8; dT10_dVg = (dT7_dVg * T9 + (T7 - 1.0) * dT9_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT7_dVd * T9 + (T7 - 1.0) * dT9_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT7_dVb * T9 + (T7 - 1.0) * dT9_dVb - T10 * dT8_dVb) / T8; Igcd = Igc * T10; dIgcd_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; here->BSIM4Igcs = Igcs; here->BSIM4gIgcsg = dIgcs_dVg; here->BSIM4gIgcsd = dIgcs_dVd; here->BSIM4gIgcsb = dIgcs_dVb * dVbseff_dVb; here->BSIM4Igcd = Igcd; here->BSIM4gIgcdg = dIgcd_dVg; here->BSIM4gIgcdd = dIgcd_dVd; here->BSIM4gIgcdb = dIgcd_dVb * dVbseff_dVb; T0 = vgs - (pParam->BSIM4vfbsd + pParam->BSIM4vfbsdoff); vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; T11 = pParam->BSIM4AechvbEdgeS; T12 = pParam->BSIM4BechvbEdge; T3 = pParam->BSIM4aigs * pParam->BSIM4cigs - pParam->BSIM4bigs; T4 = pParam->BSIM4bigs * pParam->BSIM4cigs; T5 = T12 * (pParam->BSIM4aigs + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgs_eff) * dvgs_eff_dvg; } Igs = T11 * T2 * T6; dIgs_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgs_dVs = -dIgs_dVg; T0 = vgd - (pParam->BSIM4vfbsd + pParam->BSIM4vfbsdoff); vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; T11 = pParam->BSIM4AechvbEdgeD; T3 = pParam->BSIM4aigd * pParam->BSIM4cigd - pParam->BSIM4bigd; T4 = pParam->BSIM4bigd * pParam->BSIM4cigd; T5 = T12 * (pParam->BSIM4aigd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgd_eff) * dvgd_eff_dvg; } Igd = T11 * T2 * T6; dIgd_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; here->BSIM4Igs = Igs; here->BSIM4gIgsg = dIgs_dVg; here->BSIM4gIgss = dIgs_dVs; here->BSIM4Igd = Igd; here->BSIM4gIgdg = dIgd_dVg; here->BSIM4gIgdd = dIgd_dVd; } else { here->BSIM4Igcs = here->BSIM4gIgcsg = here->BSIM4gIgcsd = here->BSIM4gIgcsb = 0.0; here->BSIM4Igcd = here->BSIM4gIgcdg = here->BSIM4gIgcdd = here->BSIM4gIgcdb = 0.0; here->BSIM4Igs = here->BSIM4gIgsg = here->BSIM4gIgss = 0.0; here->BSIM4Igd = here->BSIM4gIgdg = here->BSIM4gIgdd = 0.0; } if (model->BSIM4igbMod) { T0 = tmp * pParam->BSIM4nigbacc; T1 = -Vgs_eff + Vbseff + Vfb; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = -dVgs_eff_dVg; dVaux_dVb = 1.0; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVb = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVg = -dVaux_dVb * dVgs_eff_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 = 4.97232e-7 * pParam->BSIM4weff * pParam->BSIM4leff * pParam->BSIM4ToxRatio; T12 = -7.45669e11 * toxe; T3 = pParam->BSIM4aigbacc * pParam->BSIM4cigbacc - pParam->BSIM4bigbacc; T4 = pParam->BSIM4bigbacc * pParam->BSIM4cigbacc; T5 = T12 * (pParam->BSIM4aigbacc + T3 * Voxacc - T4 * Voxacc * Voxacc); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxacc); dT6_dVb = dT6_dVg * dVoxacc_dVb; dT6_dVg *= dVoxacc_dVg; } Igbacc = T11 * T2 * T6; dIgbacc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbacc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); T0 = tmp * pParam->BSIM4nigbinv; T1 = Voxdepinv - pParam->BSIM4eigbinv; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = dVoxdepinv_dVg; dVaux_dVd = dVoxdepinv_dVd; dVaux_dVb = dVoxdepinv_dVb; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = dVaux_dVg * dVoxdepinv_dVd; dVaux_dVb = dVaux_dVg * dVoxdepinv_dVb; dVaux_dVg *= dVoxdepinv_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVd = (Vgs_eff - Vbseff) * dVaux_dVd; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 *= 0.75610; T12 *= 1.31724; T3 = pParam->BSIM4aigbinv * pParam->BSIM4cigbinv - pParam->BSIM4bigbinv; T4 = pParam->BSIM4bigbinv * pParam->BSIM4cigbinv; T5 = T12 * (pParam->BSIM4aigbinv + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igbinv = T11 * T2 * T6; dIgbinv_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbinv_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgbinv_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); here->BSIM4Igb = Igbinv + Igbacc; here->BSIM4gIgbg = dIgbinv_dVg + dIgbacc_dVg; here->BSIM4gIgbd = dIgbinv_dVd; here->BSIM4gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; } else { here->BSIM4Igb = here->BSIM4gIgbg = here->BSIM4gIgbd = here->BSIM4gIgbs = here->BSIM4gIgbb = 0.0; } /* End of Gate current */ if (here->BSIM4nf != 1.0) { cdrain *= here->BSIM4nf; here->BSIM4gds *= here->BSIM4nf; here->BSIM4gm *= here->BSIM4nf; here->BSIM4gmbs *= here->BSIM4nf; here->BSIM4IdovVds *= here->BSIM4nf; here->BSIM4gbbs *= here->BSIM4nf; here->BSIM4gbgs *= here->BSIM4nf; here->BSIM4gbds *= here->BSIM4nf; here->BSIM4csub *= here->BSIM4nf; here->BSIM4Igidl *= here->BSIM4nf; here->BSIM4ggidld *= here->BSIM4nf; here->BSIM4ggidlg *= here->BSIM4nf; here->BSIM4ggidlb *= here->BSIM4nf; here->BSIM4Igisl *= here->BSIM4nf; here->BSIM4ggisls *= here->BSIM4nf; here->BSIM4ggislg *= here->BSIM4nf; here->BSIM4ggislb *= here->BSIM4nf; here->BSIM4Igcs *= here->BSIM4nf; here->BSIM4gIgcsg *= here->BSIM4nf; here->BSIM4gIgcsd *= here->BSIM4nf; here->BSIM4gIgcsb *= here->BSIM4nf; here->BSIM4Igcd *= here->BSIM4nf; here->BSIM4gIgcdg *= here->BSIM4nf; here->BSIM4gIgcdd *= here->BSIM4nf; here->BSIM4gIgcdb *= here->BSIM4nf; here->BSIM4Igs *= here->BSIM4nf; here->BSIM4gIgsg *= here->BSIM4nf; here->BSIM4gIgss *= here->BSIM4nf; here->BSIM4Igd *= here->BSIM4nf; here->BSIM4gIgdg *= here->BSIM4nf; here->BSIM4gIgdd *= here->BSIM4nf; here->BSIM4Igb *= here->BSIM4nf; here->BSIM4gIgbg *= here->BSIM4nf; here->BSIM4gIgbd *= here->BSIM4nf; here->BSIM4gIgbb *= here->BSIM4nf; } here->BSIM4ggidls = -(here->BSIM4ggidld + here->BSIM4ggidlg + here->BSIM4ggidlb); here->BSIM4ggisld = -(here->BSIM4ggisls + here->BSIM4ggislg + here->BSIM4ggislb); here->BSIM4gIgbs = -(here->BSIM4gIgbg + here->BSIM4gIgbd + here->BSIM4gIgbb); here->BSIM4gIgcss = -(here->BSIM4gIgcsg + here->BSIM4gIgcsd + here->BSIM4gIgcsb); here->BSIM4gIgcds = -(here->BSIM4gIgcdg + here->BSIM4gIgcdd + here->BSIM4gIgcdb); here->BSIM4cd = cdrain; /* Calculations for noise analysis */ if (model->BSIM4tnoiMod == 0) { Abulk = Abulk0 * pParam->BSIM4abulkCVfactor; Vdsat = Vgsteff / Abulk; T0 = Vdsat - Vds - DELTA_4; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * Vdsat); if (T0 >= 0.0) Vdseff = Vdsat - 0.5 * (T0 + T1); else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = Vdsat * T3 / (T1 - T0); Vdseff = Vdsat * T4; } if (Vds == 0.0) Vdseff = 0.0; T0 = Abulk * Vdseff; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = Vdseff / T1; T3 = T0 * T2; here->BSIM4qinv = Coxeff * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV * (Vgsteff - 0.5 * T0 + Abulk * T3); } else if(model->BSIM4tnoiMod == 2) { here->BSIM4noiGd0 = here->BSIM4nf * beta * Vgsteff / (1.0 + gche * Rds); } /* * BSIM4 C-V begins */ if ((model->BSIM4xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM4cggb = here->BSIM4cgsb = here->BSIM4cgdb = 0.0; here->BSIM4cdgb = here->BSIM4cdsb = here->BSIM4cddb = 0.0; here->BSIM4cbgb = here->BSIM4cbsb = here->BSIM4cbdb = 0.0; here->BSIM4csgb = here->BSIM4cssb = here->BSIM4csdb = 0.0; here->BSIM4cgbb = here->BSIM4csbb = here->BSIM4cdbb = here->BSIM4cbbb = 0.0; here->BSIM4cqdb = here->BSIM4cqsb = here->BSIM4cqgb = here->BSIM4cqbb = 0.0; here->BSIM4gtau = 0.0; goto finished; } else if (model->BSIM4capMod == 0) { if (Vbseff < 0.0) { VbseffCV = Vbs; /*4.6.2*/ dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4phi - Phis; dVbseffCV_dVb = -dPhis_dVb * dVbseff_dVb; /*4.6.2*/ } Vfb = pParam->BSIM4vfbcv; Vth = Vfb + pParam->BSIM4phi + pParam->BSIM4k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM4k1ox * dsqrtPhis_dVb *dVbseff_dVb; /*4.6.2*/ dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * pParam->BSIM4leffCV * here->BSIM4nf; Arg1 = Vgs_eff - VbseffCV - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM4cggb = CoxWL * dVgs_eff_dVg; here->BSIM4cgdb = 0.0; here->BSIM4cgsb = CoxWL * (dVbseffCV_dVb - dVgs_eff_dVg); here->BSIM4cdgb = 0.0; here->BSIM4cddb = 0.0; here->BSIM4cdsb = 0.0; here->BSIM4cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM4cbdb = 0.0; here->BSIM4cbsb = -here->BSIM4cgsb; } /* Arg1 <= 0.0, end of accumulation */ else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM4k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM4k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM4cggb = T0 * dVgs_eff_dVg; here->BSIM4cgdb = 0.0; here->BSIM4cgsb = T0 * (dVbseffCV_dVb - dVgs_eff_dVg); here->BSIM4cdgb = 0.0; here->BSIM4cddb = 0.0; here->BSIM4cdsb = 0.0; here->BSIM4cbgb = -here->BSIM4cggb; here->BSIM4cbdb = 0.0; here->BSIM4cbsb = -here->BSIM4cgsb; } /* Vgst <= 0.0, end of depletion */ else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4abulkCVfactor * dAbulk0_dVb*dVbseff_dVb; dVdsat_dVg = 1.0 / AbulkCV; /*4.6.2*/ Vdsat = Vgst * dVdsat_dVg; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)* dVdsat_dVg; if (model->BSIM4xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4cgsb = -(here->BSIM4cggb + T2); here->BSIM4cgdb = 0.0; here->BSIM4cdgb = 0.0; here->BSIM4cddb = 0.0; here->BSIM4cdsb = 0.0; here->BSIM4cbgb = -(here->BSIM4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4cbsb = -(here->BSIM4cbgb + T3); here->BSIM4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4cgsb = -(here->BSIM4cggb + T11 + here->BSIM4cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM4cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM4cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM4cdsb = -(here->BSIM4cdgb + T12 + here->BSIM4cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM4cbgb = -(here->BSIM4cggb + here->BSIM4cdgb + T10); here->BSIM4cbdb = -(here->BSIM4cgdb + here->BSIM4cddb + T12); here->BSIM4cbsb = -(here->BSIM4cgsb + here->BSIM4cdsb + T0); } } else if (model->BSIM4xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4cgsb = -(here->BSIM4cggb + T2); here->BSIM4cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM4cdgb = -T3 * dVgs_eff_dVg; here->BSIM4cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM4cdsb = -(T4 + here->BSIM4cdgb); here->BSIM4cbgb = -(here->BSIM4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4cbsb = -(here->BSIM4cbgb + T3); here->BSIM4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4cgsb = -(here->BSIM4cggb + here->BSIM4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM4cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM4cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM4cdsb = -(here->BSIM4cdgb + T10 + here->BSIM4cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - T0 * dVdsat_dVg) * dVgs_eff_dVg - here->BSIM4cdgb; /*4.6.2*/ T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM4cddb; tmp = -(T10 + T11 + T12); here->BSIM4cbgb = -(here->BSIM4cggb + here->BSIM4cdgb + T12); here->BSIM4cbdb = -(here->BSIM4cgdb + here->BSIM4cddb + T10); here->BSIM4cbsb = -(here->BSIM4cgsb + here->BSIM4cdsb + tmp); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4cgsb = -(here->BSIM4cggb + T2); here->BSIM4cgdb = 0.0; here->BSIM4cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM4cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM4cdsb = -(T4 + here->BSIM4cdgb); here->BSIM4cbgb = -(here->BSIM4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4cbsb = -(here->BSIM4cbgb + T3); here->BSIM4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4cgsb = -(here->BSIM4cggb + here->BSIM4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM4cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM4cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM4cdsb = -(here->BSIM4cdgb + T12 + here->BSIM4cddb); here->BSIM4cbgb = -(here->BSIM4cggb + 2.0 * here->BSIM4cdgb); here->BSIM4cbdb = -(here->BSIM4cgdb + 2.0 * here->BSIM4cddb); here->BSIM4cbsb = -(here->BSIM4cgsb + 2.0 * here->BSIM4cdsb); } /* end of linear region */ } /* end of 50/50 partition */ } /* end of inversion */ } /* end of capMod=0 */ else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * pParam->BSIM4leffCV * here->BSIM4nf; if(model->BSIM4cvchargeMod == 0) { /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM4noff; dnoff_dVd = pParam->BSIM4noff * dn_dVd; dnoff_dVb = pParam->BSIM4noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM4voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV for cvchargeMod = 0 */ } else { T0 = n * Vtm; T1 = pParam->BSIM4mstarcv * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4mstarcv * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4mstarcv; dT10_dVb = -dVth_dVb * pParam->BSIM4mstarcv; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4mstarcv * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4voffcbncv - (1.0 - pParam->BSIM4mstarcv) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4coxe * MIN_EXP / pParam->BSIM4cdep0; T9 = pParam->BSIM4mstarcv + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4coxe * MAX_EXP / pParam->BSIM4cdep0; T9 = pParam->BSIM4mstarcv + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4coxe / pParam->BSIM4cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4mstarcv + n * T4; dT9_dVg = T3 * (pParam->BSIM4mstarcv - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* End of VgsteffCV for cvchargeMod = 1 */ } if (model->BSIM4capMod == 1) { Vfb = here->BSIM4vfbzb; V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; T0 = 0.5 * pParam->BSIM4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM4k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = 1.0 / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (T4 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM4xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM4xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4cggb = Cgg; here->BSIM4cgsb = -(Cgg + Cgd + Cgb); here->BSIM4cgdb = Cgd; here->BSIM4cdgb = -(Cgg + Cbg + Csg); here->BSIM4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4cddb = -(Cgd + Cbd + Csd); here->BSIM4cbgb = Cbg; here->BSIM4cbsb = -(Cbg + Cbd + Cbb); here->BSIM4cbdb = Cbd; } /* Charge-Thickness capMod (CTM) begins */ else if (model->BSIM4capMod == 2) { V3 = here->BSIM4vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM4vfbzb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4vfbzb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4vfbzb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM4vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM4coxp; Tox = 1.0e8 * model->BSIM4toxp; T0 = (Vgs_eff - VbseffCV - here->BSIM4vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; tmp = T0 * pParam->BSIM4acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM4ldeb * exp(tmp); dTcen_dVg = pParam->BSIM4acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM4ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM4ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM4toxp; V3 = pParam->BSIM4ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4ldeb); Tcen = pParam->BSIM4ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = epssub / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4coxe; Qac0 = CoxWLcen * (Vfbeff - here->BSIM4vfbzb); QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM4k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM4k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM4moin * Vtm; T0 = 0.5 * pParam->BSIM4sqrtPhi; } else { Denomi = pParam->BSIM4moin * Vtm * pParam->BSIM4k1ox * pParam->BSIM4k1ox; T0 = pParam->BSIM4k1ox * pParam->BSIM4sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); /* End of delta Phis */ /* VgDP = Vgsteff - DeltaPhi */ T0 = Vgsteff - DeltaPhi - 0.001; dT0_dVg = 1.0 - dDeltaPhi_dVg; T1 = sqrt(T0 * T0 + Vgsteff * 0.004); VgDP = 0.5 * (T0 + T1); dVgDP_dVg = 0.5 * (dT0_dVg + (T0 * dT0_dVg + 0.002) / T1); Tox += Tox; /* WDLiu: Tcen reevaluated below due to different Vgsteff */ T0 = (Vgsteff + here->BSIM4vtfbphi2) / Tox; tmp = exp(model->BSIM4bdos * 0.7 * log(T0)); T1 = 1.0 + tmp; T2 = model->BSIM4bdos * 0.7 * tmp / (T0 * Tox); Tcen = model->BSIM4ados * 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 / T1; dTcen_dVd = dTcen_dVg * dVgsteff_dVd; dTcen_dVb = dTcen_dVg * dVgsteff_dVb; dTcen_dVg *= dVgsteff_dVg; Ccen = epssub / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4coxe; AbulkCV = Abulk0 * pParam->BSIM4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4abulkCVfactor * dAbulk0_dVb; VdsatCV = VgDP / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = dVgDP_dVg / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (T4 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = VgDP; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * dVgDP_dVg + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * dVgDP_dVg; T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM4xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * dVgDP_dVg; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM4xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * dVgDP_dVg + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4cggb = Cgg; here->BSIM4cgsb = -(Cgg + Cgd + Cgb); here->BSIM4cgdb = Cgd; here->BSIM4cdgb = -(Cgg + Cbg + Csg); here->BSIM4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4cddb = -(Cgd + Cbd + Csd); here->BSIM4cbgb = Cbg; here->BSIM4cbsb = -(Cbg + Cbd + Cbb); here->BSIM4cbdb = Cbd; } /* End of CTM */ } here->BSIM4csgb = - here->BSIM4cggb - here->BSIM4cdgb - here->BSIM4cbgb; here->BSIM4csdb = - here->BSIM4cgdb - here->BSIM4cddb - here->BSIM4cbdb; here->BSIM4cssb = - here->BSIM4cgsb - here->BSIM4cdsb - here->BSIM4cbsb; here->BSIM4cgbb = - here->BSIM4cgdb - here->BSIM4cggb - here->BSIM4cgsb; here->BSIM4cdbb = - here->BSIM4cddb - here->BSIM4cdgb - here->BSIM4cdsb; here->BSIM4cbbb = - here->BSIM4cbgb - here->BSIM4cbdb - here->BSIM4cbsb; here->BSIM4csbb = - here->BSIM4cgbb - here->BSIM4cdbb - here->BSIM4cbbb; here->BSIM4qgate = qgate; here->BSIM4qbulk = qbulk; here->BSIM4qdrn = qdrn; here->BSIM4qsrc = -(qgate + qbulk + qdrn); /* NQS begins */ if ((here->BSIM4trnqsMod) || (here->BSIM4acnqsMod)) { here->BSIM4qchqs = qcheq = -(qbulk + qgate); here->BSIM4cqgb = -(here->BSIM4cggb + here->BSIM4cbgb); here->BSIM4cqdb = -(here->BSIM4cgdb + here->BSIM4cbdb); here->BSIM4cqsb = -(here->BSIM4cgsb + here->BSIM4cbsb); here->BSIM4cqbb = -(here->BSIM4cqgb + here->BSIM4cqdb + here->BSIM4cqsb); CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV; T1 = here->BSIM4gcrg / CoxWL; /* 1 / tau */ here->BSIM4gtau = T1 * ScalingFactor; if (here->BSIM4acnqsMod) here->BSIM4taunet = 1.0 / T1; *(ckt->CKTstate0 + here->BSIM4qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4qcheq) = *(ckt->CKTstate0 + here->BSIM4qcheq); if (here->BSIM4trnqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qcheq); if (error) return(error); } } finished: /* Calculate junction C-V */ if (ChargeComputationNeeded) { czbd = model->BSIM4DunitAreaTempJctCap * here->BSIM4Adeff; /* bug fix */ czbs = model->BSIM4SunitAreaTempJctCap * here->BSIM4Aseff; czbdsw = model->BSIM4DunitLengthSidewallTempJctCap * here->BSIM4Pdeff; czbdswg = model->BSIM4DunitLengthGateSidewallTempJctCap * pParam->BSIM4weffCJ * here->BSIM4nf; czbssw = model->BSIM4SunitLengthSidewallTempJctCap * here->BSIM4Pseff; czbsswg = model->BSIM4SunitLengthGateSidewallTempJctCap * pParam->BSIM4weffCJ * here->BSIM4nf; MJS = model->BSIM4SbulkJctBotGradingCoeff; MJSWS = model->BSIM4SbulkJctSideGradingCoeff; MJSWGS = model->BSIM4SbulkJctGateSideGradingCoeff; MJD = model->BSIM4DbulkJctBotGradingCoeff; MJSWD = model->BSIM4DbulkJctSideGradingCoeff; MJSWGD = model->BSIM4DbulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4qbs) = 0.0; here->BSIM4capbs = czbs + czbssw + czbsswg; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4PhiBS; if (MJS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJS * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbs) = model->BSIM4PhiBS * czbs * (1.0 - arg * sarg) / (1.0 - MJS); here->BSIM4capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM4qbs) = 0.0; here->BSIM4capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4PhiBSWS; if (MJSWS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWS * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbs) += model->BSIM4PhiBSWS * czbssw * (1.0 - arg * sarg) / (1.0 - MJSWS); here->BSIM4capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4PhiBSWGS; if (MJSWGS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGS * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbs) += model->BSIM4PhiBSWGS * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWGS); here->BSIM4capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs_jct * (czbs * MJS / model->BSIM4PhiBS + czbssw * MJSWS / model->BSIM4PhiBSWS + czbsswg * MJSWGS / model->BSIM4PhiBSWGS); *(ckt->CKTstate0 + here->BSIM4qbs) = vbs_jct * (T0 + 0.5 * T1); here->BSIM4capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4qbd) = 0.0; here->BSIM4capbd = czbd + czbdsw + czbdswg; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4PhiBD; if (MJD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJD * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbd) = model->BSIM4PhiBD* czbd * (1.0 - arg * sarg) / (1.0 - MJD); here->BSIM4capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM4qbd) = 0.0; here->BSIM4capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4PhiBSWD; if (MJSWD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWD * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbd) += model->BSIM4PhiBSWD * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSWD); here->BSIM4capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4PhiBSWGD; if (MJSWGD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGD * log(arg)); *(ckt->CKTstate0 + here->BSIM4qbd) += model->BSIM4PhiBSWGD * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWGD); here->BSIM4capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd_jct * (czbd * MJD / model->BSIM4PhiBD + czbdsw * MJSWD / model->BSIM4PhiBSWD + czbdswg * MJSWGD / model->BSIM4PhiBSWGD); *(ckt->CKTstate0 + here->BSIM4qbd) = vbd_jct * (T0 + 0.5 * T1); here->BSIM4capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM4mode >= 0) { Idtot = here->BSIM4cd + here->BSIM4csub + here->BSIM4Igidl - here->BSIM4cbd; } else { Idtot = here->BSIM4cd + here->BSIM4cbd - here->BSIM4Igidl; /* bugfix */ } tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; } else if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; } else { Ibtot = here->BSIM4cbs + here->BSIM4cbd - here->BSIM4Igidl - here->BSIM4Igisl - here->BSIM4csub; tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM4vds) = vds; *(ckt->CKTstate0 + here->BSIM4vgs) = vgs; *(ckt->CKTstate0 + here->BSIM4vbs) = vbs; *(ckt->CKTstate0 + here->BSIM4vbd) = vbd; *(ckt->CKTstate0 + here->BSIM4vges) = vges; *(ckt->CKTstate0 + here->BSIM4vgms) = vgms; *(ckt->CKTstate0 + here->BSIM4vdbs) = vdbs; *(ckt->CKTstate0 + here->BSIM4vdbd) = vdbd; *(ckt->CKTstate0 + here->BSIM4vsbs) = vsbs; *(ckt->CKTstate0 + here->BSIM4vses) = vses; *(ckt->CKTstate0 + here->BSIM4vdes) = vdes; *(ckt->CKTstate0 + here->BSIM4qdef) = qdef; if (!ChargeComputationNeeded) goto line850; if (here->BSIM4rgateMod == 3) { vgdx = vgmd; vgsx = vgms; } else /* For rgateMod == 0, 1 and 2 */ { vgdx = vgd; vgsx = vgs; } if (model->BSIM4capMod == 0) { cgdo = pParam->BSIM4cgdo; qgdo = pParam->BSIM4cgdo * vgdx; cgso = pParam->BSIM4cgso; qgso = pParam->BSIM4cgso * vgsx; } else /* For both capMod == 1 and 2 */ { T0 = vgdx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4weffCV * pParam->BSIM4cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4ckappad); cgdo = pParam->BSIM4cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM4cgdo + T3) * vgdx - T3 * (T2 + 0.5 * pParam->BSIM4ckappad * (T4 - 1.0)); T0 = vgsx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4weffCV * pParam->BSIM4cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4ckappas); cgso = pParam->BSIM4cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM4cgso + T3) * vgsx - T3 * (T2 + 0.5 * pParam->BSIM4ckappas * (T4 - 1.0)); } if (here->BSIM4nf != 1.0) { cgdo *= here->BSIM4nf; cgso *= here->BSIM4nf; qgdo *= here->BSIM4nf; qgso *= here->BSIM4nf; } here->BSIM4cgdo = cgdo; here->BSIM4qgdo = qgdo; here->BSIM4cgso = cgso; here->BSIM4qgso = qgso; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (here->BSIM4mode > 0) { if (here->BSIM4trnqsMod == 0) { qdrn -= qgdo; if (here->BSIM4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4cggb * ag0; gcgdb = here->BSIM4cgdb * ag0; gcgsb = here->BSIM4cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = here->BSIM4cdgb * ag0; gcsgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb) * ag0; gcbgb = here->BSIM4cbgb * ag0; qgmb = pParam->BSIM4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qsrc = -(qgate + qgmid + qbulk + qdrn); } else { gcggb = (here->BSIM4cggb + cgdo + cgso + pParam->BSIM4cgbo ) * ag0; gcgdb = (here->BSIM4cgdb - cgdo) * ag0; gcgsb = (here->BSIM4cgsb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = (here->BSIM4cdgb - cgdo) * ag0; gcsgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb + cgso) * ag0; gcbgb = (here->BSIM4cbgb - pParam->BSIM4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4cddb + here->BSIM4capbd + cgdo) * ag0; gcdsb = here->BSIM4cdsb * ag0; gcsdb = -(here->BSIM4cgdb + here->BSIM4cbdb + here->BSIM4cddb) * ag0; gcssb = (here->BSIM4capbs + cgso - (here->BSIM4cgsb + here->BSIM4cbsb + here->BSIM4cdsb)) * ag0; if (!here->BSIM4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4cbdb - here->BSIM4capbd) * ag0; gcbsb = (here->BSIM4cbsb - here->BSIM4capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(here->BSIM4cddb + here->BSIM4cdgb + here->BSIM4cdsb) * ag0; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb) + here->BSIM4capbs * ag0; gcbdb = here->BSIM4cbdb * ag0; gcbsb = here->BSIM4cbsb * ag0; gcdbdb = -here->BSIM4capbd * ag0; gcsbsb = -here->BSIM4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4qchqs; CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4gtg = T0 * here->BSIM4gcrgg; ggtd = here->BSIM4gtd = T0 * here->BSIM4gcrgd; ggts = here->BSIM4gts = T0 * here->BSIM4gcrgs; ggtb = here->BSIM4gtb = T0 * here->BSIM4gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4cqgb * ag0; gcqdb = here->BSIM4cqdb * ag0; gcqsb = here->BSIM4cqsb * ag0; gcqbb = here->BSIM4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM4cddb; Csd = -(here->BSIM4cgdb + here->BSIM4cddb + here->BSIM4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4cdgb; Csg = -(here->BSIM4cggb + here->BSIM4cdgb + here->BSIM4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4cdsb; Css = -(here->BSIM4cgsb + here->BSIM4cdsb + here->BSIM4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); if (here->BSIM4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -(qgmid + qbulk + qdrn); } else { gcggb = (cgdo + cgso + pParam->BSIM4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4capbs + cgso) * ag0; if (!here->BSIM4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4capbd * ag0; gcbsb = -here->BSIM4capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4capbd * ag0; gcsbsb = -here->BSIM4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } else { if (here->BSIM4trnqsMod == 0) { qsrc = qdrn - qgso; if (here->BSIM4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4cggb * ag0; gcgdb = here->BSIM4cgsb * ag0; gcgsb = here->BSIM4cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb) * ag0; gcsgb = here->BSIM4cdgb * ag0; gcbgb = here->BSIM4cbgb * ag0; qgmb = pParam->BSIM4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qdrn = -(qgate + qgmid + qbulk + qsrc); } else { gcggb = (here->BSIM4cggb + cgdo + cgso + pParam->BSIM4cgbo ) * ag0; gcgdb = (here->BSIM4cgsb - cgdo) * ag0; gcgsb = (here->BSIM4cgdb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4cggb + here->BSIM4cbgb + here->BSIM4cdgb + cgdo) * ag0; gcsgb = (here->BSIM4cdgb - cgso) * ag0; gcbgb = (here->BSIM4cbgb - pParam->BSIM4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qdrn = -(qgate + qbulk + qsrc); } gcddb = (here->BSIM4capbd + cgdo - (here->BSIM4cgsb + here->BSIM4cbsb + here->BSIM4cdsb)) * ag0; gcdsb = -(here->BSIM4cgdb + here->BSIM4cbdb + here->BSIM4cddb) * ag0; gcsdb = here->BSIM4cdsb * ag0; gcssb = (here->BSIM4cddb + here->BSIM4capbs + cgso) * ag0; if (!here->BSIM4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4cbsb - here->BSIM4capbd) * ag0; gcbsb = (here->BSIM4cbdb - here->BSIM4capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb) + here->BSIM4capbd * ag0; gcsbb = -(here->BSIM4cddb + here->BSIM4cdgb + here->BSIM4cdsb) * ag0; gcbdb = here->BSIM4cbsb * ag0; gcbsb = here->BSIM4cbdb * ag0; gcdbdb = -here->BSIM4capbd * ag0; gcsbsb = -here->BSIM4capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4qchqs; CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4gtg = T0 * here->BSIM4gcrgg; ggts = here->BSIM4gts = T0 * here->BSIM4gcrgd; ggtd = here->BSIM4gtd = T0 * here->BSIM4gcrgs; ggtb = here->BSIM4gtb = T0 * here->BSIM4gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4cqgb * ag0; gcqdb = here->BSIM4cqsb * ag0; gcqsb = here->BSIM4cqdb * ag0; gcqbb = here->BSIM4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM4cddb; Cds = -(here->BSIM4cgdb + here->BSIM4cddb + here->BSIM4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4cdgb; Cdg = -(here->BSIM4cggb + here->BSIM4cdgb + here->BSIM4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4cdsb; Cdd = -(here->BSIM4cgsb + here->BSIM4cdsb + here->BSIM4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); if (here->BSIM4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -qgso; } else { gcggb = (cgdo + cgso + pParam->BSIM4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -qgso; } gcddb = (here->BSIM4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4capbs + cgso) * ag0; if (!here->BSIM4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4capbd * ag0; gcbsb = -here->BSIM4capbs * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4capbd * ag0; gcsbsb = -here->BSIM4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } if (here->BSIM4trnqsMod) { *(ckt->CKTstate0 + here->BSIM4qcdump) = qdef * ScalingFactor; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4qcdump) = *(ckt->CKTstate0 + here->BSIM4qcdump); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qcdump); if (error) return(error); } if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM4qg) = qgate; *(ckt->CKTstate0 + here->BSIM4qd) = qdrn - *(ckt->CKTstate0 + here->BSIM4qbd); *(ckt->CKTstate0 + here->BSIM4qs) = qsrc - *(ckt->CKTstate0 + here->BSIM4qbs); if (here->BSIM4rgateMod == 3) *(ckt->CKTstate0 + here->BSIM4qgmid) = qgmid; if (!here->BSIM4rbodyMod) { *(ckt->CKTstate0 + here->BSIM4qb) = qbulk + *(ckt->CKTstate0 + here->BSIM4qbd) + *(ckt->CKTstate0 + here->BSIM4qbs); } else *(ckt->CKTstate0 + here->BSIM4qb) = qbulk; /* Store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4qb) = *(ckt->CKTstate0 + here->BSIM4qb); *(ckt->CKTstate1 + here->BSIM4qg) = *(ckt->CKTstate0 + here->BSIM4qg); *(ckt->CKTstate1 + here->BSIM4qd) = *(ckt->CKTstate0 + here->BSIM4qd); if (here->BSIM4rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4qgmid) = *(ckt->CKTstate0 + here->BSIM4qgmid); if (here->BSIM4rbodyMod) { *(ckt->CKTstate1 + here->BSIM4qbs) = *(ckt->CKTstate0 + here->BSIM4qbs); *(ckt->CKTstate1 + here->BSIM4qbd) = *(ckt->CKTstate0 + here->BSIM4qbd); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qd); if (error) return(error); if (here->BSIM4rgateMod == 3) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qgmid); if (error) return(error); } if (here->BSIM4rbodyMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qbs); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4qbd); if (error) return(error); } goto line860; line850: /* Zero gcap and ceqcap if (!ChargeComputationNeeded) */ ceqqg = ceqqb = ceqqd = 0.0; ceqqjd = ceqqjs = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = gcdbb = 0.0; gcsgb = gcsdb = gcssb = gcsbb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; gcbdb = gcbgb = gcbsb = gcbbb = 0.0; gcgmgmb = gcgmdb = gcgmsb = gcgmbb = 0.0; gcdgmb = gcsgmb = gcbgmb = ceqqgmid = 0.0; gcdbdb = gcsbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM4mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM4trnqsMod) { CoxWL = model->BSIM4coxe * pParam->BSIM4weffCV * here->BSIM4nf * pParam->BSIM4leffCV; T1 = here->BSIM4gcrg / CoxWL; here->BSIM4gtau = T1 * ScalingFactor; } else here->BSIM4gtau = 0.0; goto line900; line860: /* Calculate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM4cqg); cqbody = *(ckt->CKTstate0 + here->BSIM4cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM4cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb - gcdgmb * vgmb + (gcddb + gcdbdb) * vbd - gcdbdb * vbd_jct + gcdsb * vbs; ceqqb = cqbody - gcbgb * vgb - gcbgmb * vgmb + gcbdb * vbd + gcbsb * vbs; if (here->BSIM4rgateMod == 3) ceqqgmid = *(ckt->CKTstate0 + here->BSIM4cqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb; else ceqqgmid = 0.0; if (here->BSIM4rbodyMod) { ceqqjs = *(ckt->CKTstate0 + here->BSIM4cqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->BSIM4cqbd) + gcdbdb * vbd_jct; } if (here->BSIM4trnqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM4gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM4cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM4cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4cqb) = *(ckt->CKTstate0 + here->BSIM4cqb); *(ckt->CKTstate1 + here->BSIM4cqg) = *(ckt->CKTstate0 + here->BSIM4cqg); *(ckt->CKTstate1 + here->BSIM4cqd) = *(ckt->CKTstate0 + here->BSIM4cqd); if (here->BSIM4rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4cqgmid) = *(ckt->CKTstate0 + here->BSIM4cqgmid); if (here->BSIM4rbodyMod) { *(ckt->CKTstate1 + here->BSIM4cqbs) = *(ckt->CKTstate0 + here->BSIM4cqbs); *(ckt->CKTstate1 + here->BSIM4cqbd) = *(ckt->CKTstate0 + here->BSIM4cqbd); } } /* * Load current vector */ line900: if (here->BSIM4mode >= 0) { Gm = here->BSIM4gm; Gmbs = here->BSIM4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; ceqdrn = model->BSIM4type * (cdrain - here->BSIM4gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = model->BSIM4type * (here->BSIM4csub + here->BSIM4Igidl - (here->BSIM4gbds + here->BSIM4ggidld) * vds - (here->BSIM4gbgs + here->BSIM4ggidlg) * vgs - (here->BSIM4gbbs + here->BSIM4ggidlb) * vbs); ceqbs = model->BSIM4type * (here->BSIM4Igisl + here->BSIM4ggisls * vds - here->BSIM4ggislg * vgd - here->BSIM4ggislb * vbd); gbbdp = -(here->BSIM4gbds); gbbsp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = here->BSIM4gbgs; gbdpdp = here->BSIM4gbds; gbdpb = here->BSIM4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcsg; gIstotd = here->BSIM4gIgcsd; gIstots = here->BSIM4gIgss + here->BSIM4gIgcss; gIstotb = here->BSIM4gIgcsb; Istoteq = model->BSIM4type * (here->BSIM4Igs + here->BSIM4Igcs - gIstotg * vgs - here->BSIM4gIgcsd * vds - here->BSIM4gIgcsb * vbs); gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcdg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcdd; gIdtots = here->BSIM4gIgcds; gIdtotb = here->BSIM4gIgcdb; Idtoteq = model->BSIM4type * (here->BSIM4Igd + here->BSIM4Igcd - here->BSIM4gIgdg * vgd - here->BSIM4gIgcdg * vgs - here->BSIM4gIgcdd * vds - here->BSIM4gIgcdb * vbs); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbd; gIbtots = here->BSIM4gIgbs; gIbtotb = here->BSIM4gIgbb; Ibtoteq = model->BSIM4type * (here->BSIM4Igb - here->BSIM4gIgbg * vgs - here->BSIM4gIgbd * vds - here->BSIM4gIgbb * vbs); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgd * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgs * T0; gcrgb = here->BSIM4gcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } else { Gm = -here->BSIM4gm; Gmbs = -here->BSIM4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); ceqdrn = -model->BSIM4type * (cdrain + here->BSIM4gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = model->BSIM4type * (here->BSIM4csub + here->BSIM4Igisl + (here->BSIM4gbds + here->BSIM4ggisls) * vds - (here->BSIM4gbgs + here->BSIM4ggislg) * vgd - (here->BSIM4gbbs + here->BSIM4ggislb) * vbd); ceqbd = model->BSIM4type * (here->BSIM4Igidl - here->BSIM4ggidld * vds - here->BSIM4ggidlg * vgs - here->BSIM4ggidlb * vbs); gbbsp = -(here->BSIM4gbds); gbbdp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4gbgs; gbspsp = here->BSIM4gbds; gbspb = here->BSIM4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcdg; gIstotd = here->BSIM4gIgcds; gIstots = here->BSIM4gIgss + here->BSIM4gIgcdd; gIstotb = here->BSIM4gIgcdb; Istoteq = model->BSIM4type * (here->BSIM4Igs + here->BSIM4Igcd - here->BSIM4gIgsg * vgs - here->BSIM4gIgcdg * vgd + here->BSIM4gIgcdd * vds - here->BSIM4gIgcdb * vbd); gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcsg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcss; gIdtots = here->BSIM4gIgcsd; gIdtotb = here->BSIM4gIgcsb; Idtoteq = model->BSIM4type * (here->BSIM4Igd + here->BSIM4Igcs - (here->BSIM4gIgdg + here->BSIM4gIgcsg) * vgd + here->BSIM4gIgcsd * vds - here->BSIM4gIgcsb * vbd); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbs; gIbtots = here->BSIM4gIgbd; gIbtotb = here->BSIM4gIgbb; Ibtoteq = model->BSIM4type * (here->BSIM4Igb - here->BSIM4gIgbg * vgd + here->BSIM4gIgbd * vds - here->BSIM4gIgbb * vbd); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgs * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgd * T0; gcrgb = here->BSIM4gcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } if (model->BSIM4rdsMod == 1) { ceqgstot = model->BSIM4type * (here->BSIM4gstotd * vds + here->BSIM4gstotg * vgs + here->BSIM4gstotb * vbs); /* WDLiu: ceqgstot flowing away from sNodePrime */ gstot = here->BSIM4gstot; gstotd = here->BSIM4gstotd; gstotg = here->BSIM4gstotg; gstots = here->BSIM4gstots - gstot; gstotb = here->BSIM4gstotb; ceqgdtot = -model->BSIM4type * (here->BSIM4gdtotd * vds + here->BSIM4gdtotg * vgs + here->BSIM4gdtotb * vbs); /* WDLiu: ceqgdtot defined as flowing into dNodePrime */ gdtot = here->BSIM4gdtot; gdtotd = here->BSIM4gdtotd - gdtot; gdtotg = here->BSIM4gdtotg; gdtots = here->BSIM4gdtots; gdtotb = here->BSIM4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } if (model->BSIM4type > 0) { ceqjs = (here->BSIM4cbs - here->BSIM4gbs * vbs_jct); ceqjd = (here->BSIM4cbd - here->BSIM4gbd * vbd_jct); } else { ceqjs = -(here->BSIM4cbs - here->BSIM4gbs * vbs_jct); ceqjd = -(here->BSIM4cbd - here->BSIM4gbd * vbd_jct); ceqqg = -ceqqg; ceqqd = -ceqqd; ceqqb = -ceqqb; ceqgcrg = -ceqgcrg; if (here->BSIM4trnqsMod) { cqdef = -cqdef; cqcheq = -cqcheq; } if (here->BSIM4rbodyMod) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } if (here->BSIM4rgateMod == 3) ceqqgmid = -ceqqgmid; } /* * Loading RHS */ m = here->BSIM4m; #ifdef USE_OMP here->BSIM4rhsdPrime = m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq); here->BSIM4rhsgPrime = m * (ceqqg - ceqgcrg + Igtoteq); if (here->BSIM4rgateMod == 2) here->BSIM4rhsgExt = m * ceqgcrg; else if (here->BSIM4rgateMod == 3) here->BSIM4grhsMid = m * (ceqqgmid + ceqgcrg); if (!here->BSIM4rbodyMod) { here->BSIM4rhsbPrime = m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq); here->BSIM4rhssPrime = m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq); } else { here->BSIM4rhsdb = m * (ceqjd + ceqqjd); here->BSIM4rhsbPrime = m * (ceqbd + ceqbs - ceqqb + Ibtoteq); here->BSIM4rhssb = m * (ceqjs + ceqqjs); here->BSIM4rhssPrime = m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq); } if (model->BSIM4rdsMod) { here->BSIM4rhsd = m * ceqgdtot; here->BSIM4rhss = m * ceqgstot; } if (here->BSIM4trnqsMod) here->BSIM4rhsq = m * (cqcheq - cqdef); #else (*(ckt->CKTrhs + here->BSIM4dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq)); (*(ckt->CKTrhs + here->BSIM4gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); if (here->BSIM4rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4gNodeExt) -= m * ceqgcrg); else if (here->BSIM4rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4gNodeMid) -= m * (ceqqgmid + ceqgcrg)); if (!here->BSIM4rbodyMod) { (*(ckt->CKTrhs + here->BSIM4bNodePrime) += m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq)); } else { (*(ckt->CKTrhs + here->BSIM4dbNode) -= m * (ceqjd + ceqqjd)); (*(ckt->CKTrhs + here->BSIM4bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4sbNode) -= m * (ceqjs + ceqqjs)); (*(ckt->CKTrhs + here->BSIM4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq)); } if (model->BSIM4rdsMod) { (*(ckt->CKTrhs + here->BSIM4dNode) -= m * ceqgdtot); (*(ckt->CKTrhs + here->BSIM4sNode) += m * ceqgstot); } if (here->BSIM4trnqsMod) *(ckt->CKTrhs + here->BSIM4qNode) += m * (cqcheq - cqdef); #endif /* * Loading matrix */ if (!here->BSIM4rbodyMod) { gjbd = here->BSIM4gbd; gjbs = here->BSIM4gbs; } else gjbd = gjbs = 0.0; if (!model->BSIM4rdsMod) { gdpr = here->BSIM4drainConductance; gspr = here->BSIM4sourceConductance; } else gdpr = gspr = 0.0; geltd = here->BSIM4grgeltd; T1 = qdef * here->BSIM4gtau; #ifdef USE_OMP if (here->BSIM4rgateMod == 1) { here->BSIM4_1 = m * geltd; here->BSIM4_2 = m * geltd; here->BSIM4_3 = m * geltd; here->BSIM4_4 = m * (gcggb + geltd - ggtg + gIgtotg); here->BSIM4_5 = m * (gcgdb - ggtd + gIgtotd); here->BSIM4_6 = m * (gcgsb - ggts + gIgtots); here->BSIM4_7 = m * (gcgbb - ggtb + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4rgateMod == 2) { here->BSIM4_8 = m * gcrg; here->BSIM4_9 = m * gcrgg; here->BSIM4_10 = m * gcrgd; here->BSIM4_11 = m * gcrgs; here->BSIM4_12 = m * gcrgb; here->BSIM4_13 = m * gcrg; here->BSIM4_14 = m * (gcggb - gcrgg - ggtg + gIgtotg); here->BSIM4_15 = m * (gcgdb - gcrgd - ggtd + gIgtotd); here->BSIM4_16 = m * (gcgsb - gcrgs - ggts + gIgtots); here->BSIM4_17 = m * (gcgbb - gcrgb - ggtb + gIgtotb); } else if (here->BSIM4rgateMod == 3) { here->BSIM4_18 = m * geltd; here->BSIM4_19 = m * geltd; here->BSIM4_20 = m * geltd; here->BSIM4_21 = m * (geltd + gcrg + gcgmgmb); here->BSIM4_22 = m * (gcrgd + gcgmdb); here->BSIM4_23 = m * gcrgg; here->BSIM4_24 = m * (gcrgs + gcgmsb); here->BSIM4_25 = m * (gcrgb + gcgmbb); here->BSIM4_26 = m * gcdgmb; here->BSIM4_26 = m * gcrg; here->BSIM4_28 = m * gcsgmb; here->BSIM4_29 = m * gcbgmb; here->BSIM4_30 = m * (gcggb - gcrgg - ggtg + gIgtotg); here->BSIM4_31 = m * (gcgdb - gcrgd - ggtd + gIgtotd); here->BSIM4_32 = m * (gcgsb - gcrgs - ggts + gIgtots); here->BSIM4_33 = m * (gcgbb - gcrgb - ggtb + gIgtotb); } else { here->BSIM4_34 = m * (gcggb - ggtg + gIgtotg); here->BSIM4_35 = m * (gcgdb - ggtd + gIgtotd); here->BSIM4_36 = m * (gcgsb - ggts + gIgtots); here->BSIM4_37 = m * (gcgbb - ggtb + gIgtotb); } if (model->BSIM4rdsMod) { here->BSIM4_38 = m * gdtotg; here->BSIM4_39 = m * gdtots; here->BSIM4_40 = m * gdtotb; here->BSIM4_41 = m * gstotd; here->BSIM4_42 = m * gstotg; here->BSIM4_43 = m * gstotb; } here->BSIM4_44 = m * (gdpr + here->BSIM4gds + here->BSIM4gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd); here->BSIM4_45 = m * (gdpr + gdtot); here->BSIM4_46 = m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg); here->BSIM4_47 = m * (here->BSIM4gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp); here->BSIM4_48 = m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb); here->BSIM4_49 = m * (gdpr - gdtotd); here->BSIM4_50 = m * (gdpr + gdtot); here->BSIM4_51 = m * (here->BSIM4gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd); here->BSIM4_52 = m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg); here->BSIM4_53 = m * (gspr + here->BSIM4gds + here->BSIM4gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots); here->BSIM4_54 = m * (gspr + gstot); here->BSIM4_55 = m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb); here->BSIM4_56 = m * (gspr - gstots); here->BSIM4_57 = m * (gspr + gstot); here->BSIM4_58 = m * (gcbdb - gjbd + gbbdp - gIbtotd); here->BSIM4_59 = m * (gcbgb - here->BSIM4gbgs - gIbtotg); here->BSIM4_60 = m * (gcbsb - gjbs + gbbsp - gIbtots); here->BSIM4_61 = m * (gjbd + gjbs + gcbbb - here->BSIM4gbbs - gIbtotb); ggidld = here->BSIM4ggidld; ggidlg = here->BSIM4ggidlg; ggidlb = here->BSIM4ggidlb; ggislg = here->BSIM4ggislg; ggisls = here->BSIM4ggisls; ggislb = here->BSIM4ggislb; /* stamp gidl */ here->BSIM4_62 = m * ggidld; here->BSIM4_63 = m * ggidlg; here->BSIM4_64 = m * (ggidlg + ggidld + ggidlb); here->BSIM4_65 = m * ggidlb; here->BSIM4_66 = m * ggidld; here->BSIM4_67 = m * ggidlg; here->BSIM4_68 = m * (ggidlg + ggidld + ggidlb); here->BSIM4_69 = m * ggidlb; /* stamp gisl */ here->BSIM4_70 = m * (ggisls + ggislg + ggislb); here->BSIM4_71 = m * ggislg; here->BSIM4_72 = m * ggisls; here->BSIM4_73 = m * ggislb; here->BSIM4_74 = m * (ggislg + ggisls + ggislb); here->BSIM4_75 = m * ggislg; here->BSIM4_76 = m * ggisls; here->BSIM4_77 = m * ggislb; if (here->BSIM4rbodyMod) { here->BSIM4_78 = m * (gcdbdb - here->BSIM4gbd); here->BSIM4_79 = m * (here->BSIM4gbs - gcsbsb); here->BSIM4_80 = m * (gcdbdb - here->BSIM4gbd); here->BSIM4_81 = m * (here->BSIM4gbd - gcdbdb + here->BSIM4grbpd + here->BSIM4grbdb); here->BSIM4_82 = m * here->BSIM4grbpd; here->BSIM4_83 = m * here->BSIM4grbdb; here->BSIM4_84 = m * here->BSIM4grbpd; here->BSIM4_85 = m * here->BSIM4grbpb; here->BSIM4_86 = m * here->BSIM4grbps; here->BSIM4_87 = m * (here->BSIM4grbpd + here->BSIM4grbps + here->BSIM4grbpb); /* WDLiu: (gcbbb - here->BSIM4gbbs) already added to BPbpPtr */ here->BSIM4_88 = m * (gcsbsb - here->BSIM4gbs); here->BSIM4_89 = m * here->BSIM4grbps; here->BSIM4_90 = m * here->BSIM4grbsb; here->BSIM4_91 = m * (here->BSIM4gbs - gcsbsb + here->BSIM4grbps + here->BSIM4grbsb); here->BSIM4_92 = m * here->BSIM4grbdb; here->BSIM4_93 = m * here->BSIM4grbpb; here->BSIM4_94 = m * here->BSIM4grbsb; here->BSIM4_95 = m * (here->BSIM4grbsb + here->BSIM4grbdb + here->BSIM4grbpb); } if (here->BSIM4trnqsMod) { here->BSIM4_96 = m * (gqdef + here->BSIM4gtau); here->BSIM4_97 = m * (ggtg - gcqgb); here->BSIM4_98 = m * (ggtd - gcqdb); here->BSIM4_99 = m * (ggts - gcqsb); here->BSIM4_100 = m * (ggtb - gcqbb); here->BSIM4_101 = m * dxpart * here->BSIM4gtau; here->BSIM4_102 = m * sxpart * here->BSIM4gtau; here->BSIM4_103 = m * here->BSIM4gtau; } #else if (here->BSIM4rgateMod == 1) { (*(here->BSIM4GEgePtr) += m * geltd); (*(here->BSIM4GPgePtr) -= m * geltd); (*(here->BSIM4GEgpPtr) -= m * geltd); (*(here->BSIM4GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); (*(here->BSIM4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4rgateMod == 2) { (*(here->BSIM4GEgePtr) += m * gcrg); (*(here->BSIM4GEgpPtr) += m * gcrgg); (*(here->BSIM4GEdpPtr) += m * gcrgd); (*(here->BSIM4GEspPtr) += m * gcrgs); (*(here->BSIM4GEbpPtr) += m * gcrgb); (*(here->BSIM4GPgePtr) -= m * gcrg); (*(here->BSIM4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else if (here->BSIM4rgateMod == 3) { (*(here->BSIM4GEgePtr) += m * geltd); (*(here->BSIM4GEgmPtr) -= m * geltd); (*(here->BSIM4GMgePtr) -= m * geltd); (*(here->BSIM4GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); (*(here->BSIM4GMdpPtr) += m * (gcrgd + gcgmdb)); (*(here->BSIM4GMgpPtr) += m * gcrgg); (*(here->BSIM4GMspPtr) += m * (gcrgs + gcgmsb)); (*(here->BSIM4GMbpPtr) += m * (gcrgb + gcgmbb)); (*(here->BSIM4DPgmPtr) += m * gcdgmb); (*(here->BSIM4GPgmPtr) -= m * gcrg); (*(here->BSIM4SPgmPtr) += m * gcsgmb); (*(here->BSIM4BPgmPtr) += m * gcbgmb); (*(here->BSIM4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else { (*(here->BSIM4GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); (*(here->BSIM4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } if (model->BSIM4rdsMod) { (*(here->BSIM4DgpPtr) += m * gdtotg); (*(here->BSIM4DspPtr) += m * gdtots); (*(here->BSIM4DbpPtr) += m * gdtotb); (*(here->BSIM4SdpPtr) += m * gstotd); (*(here->BSIM4SgpPtr) += m * gstotg); (*(here->BSIM4SbpPtr) += m * gstotb); } (*(here->BSIM4DPdpPtr) += m * (gdpr + here->BSIM4gds + here->BSIM4gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd)); (*(here->BSIM4DPdPtr) -= m * (gdpr + gdtot)); (*(here->BSIM4DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg)); (*(here->BSIM4DPspPtr) -= m * (here->BSIM4gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp)); (*(here->BSIM4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb)); (*(here->BSIM4DdpPtr) -= m * (gdpr - gdtotd)); (*(here->BSIM4DdPtr) += m * (gdpr + gdtot)); (*(here->BSIM4SPdpPtr) -= m * (here->BSIM4gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd)); (*(here->BSIM4SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg)); (*(here->BSIM4SPspPtr) += m * (gspr + here->BSIM4gds + here->BSIM4gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots)); (*(here->BSIM4SPsPtr) -= m * (gspr + gstot)); (*(here->BSIM4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb)); (*(here->BSIM4SspPtr) -= m * (gspr - gstots)); (*(here->BSIM4SsPtr) += m * (gspr + gstot)); (*(here->BSIM4BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); (*(here->BSIM4BPgpPtr) += m * (gcbgb - here->BSIM4gbgs - gIbtotg)); (*(here->BSIM4BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); (*(here->BSIM4BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4gbbs - gIbtotb)); ggidld = here->BSIM4ggidld; ggidlg = here->BSIM4ggidlg; ggidlb = here->BSIM4ggidlb; ggislg = here->BSIM4ggislg; ggisls = here->BSIM4ggisls; ggislb = here->BSIM4ggislb; /* stamp gidl */ (*(here->BSIM4DPdpPtr) += m * ggidld); (*(here->BSIM4DPgpPtr) += m * ggidlg); (*(here->BSIM4DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4DPbpPtr) += m * ggidlb); (*(here->BSIM4BPdpPtr) -= m * ggidld); (*(here->BSIM4BPgpPtr) -= m * ggidlg); (*(here->BSIM4BPspPtr) += m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4SPdpPtr) -= m * (ggisls + ggislg + ggislb)); (*(here->BSIM4SPgpPtr) += m * ggislg); (*(here->BSIM4SPspPtr) += m * ggisls); (*(here->BSIM4SPbpPtr) += m * ggislb); (*(here->BSIM4BPdpPtr) += m * (ggislg + ggisls + ggislb)); (*(here->BSIM4BPgpPtr) -= m * ggislg); (*(here->BSIM4BPspPtr) -= m * ggisls); (*(here->BSIM4BPbpPtr) -= m * ggislb); if (here->BSIM4rbodyMod) { (*(here->BSIM4DPdbPtr) += m * (gcdbdb - here->BSIM4gbd)); (*(here->BSIM4SPsbPtr) -= m * (here->BSIM4gbs - gcsbsb)); (*(here->BSIM4DBdpPtr) += m * (gcdbdb - here->BSIM4gbd)); (*(here->BSIM4DBdbPtr) += m * (here->BSIM4gbd - gcdbdb + here->BSIM4grbpd + here->BSIM4grbdb)); (*(here->BSIM4DBbpPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4DBbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BPdbPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4BPbPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BPsbPtr) -= m * here->BSIM4grbps); (*(here->BSIM4BPbpPtr) += m * (here->BSIM4grbpd + here->BSIM4grbps + here->BSIM4grbpb)); /* WDLiu: (gcbbb - here->BSIM4gbbs) already added to BPbpPtr */ (*(here->BSIM4SBspPtr) += m * (gcsbsb - here->BSIM4gbs)); (*(here->BSIM4SBbpPtr) -= m * here->BSIM4grbps); (*(here->BSIM4SBbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4SBsbPtr) += m * (here->BSIM4gbs - gcsbsb + here->BSIM4grbps + here->BSIM4grbsb)); (*(here->BSIM4BdbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BbpPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BsbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4BbPtr) += m * (here->BSIM4grbsb + here->BSIM4grbdb + here->BSIM4grbpb)); } if (here->BSIM4trnqsMod) { (*(here->BSIM4QqPtr) += m * (gqdef + here->BSIM4gtau)); (*(here->BSIM4QgpPtr) += m * (ggtg - gcqgb)); (*(here->BSIM4QdpPtr) += m * (ggtd - gcqdb)); (*(here->BSIM4QspPtr) += m * (ggts - gcqsb)); (*(here->BSIM4QbpPtr) += m * (ggtb - gcqbb)); (*(here->BSIM4DPqPtr) += m * dxpart * here->BSIM4gtau); (*(here->BSIM4SPqPtr) += m * sxpart * here->BSIM4gtau); (*(here->BSIM4GPqPtr) -= m * here->BSIM4gtau); } #endif line1000: ; #ifndef USE_OMP } /* End of MOSFET Instance */ } /* End of Model Instance */ #endif return(OK); } /* function to compute poly depletion effect */ int BSIM4polyDepletion( double phi, double ngate, double epsgate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg) { double T1, T2, T3, T4, T5, T6, T7, T8; /* Poly Gate Si Depletion Effect */ if ((ngate > 1.0e18) && (ngate < 1.0e25) && (Vgs > phi) && (epsgate!=0) ){ T1 = 1.0e6 * CHARGE * epsgate * ngate / (coxe * coxe); T8 = Vgs - phi; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); *Vgs_eff = Vgs - T5; *dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { *Vgs_eff = Vgs; *dVgs_eff_dVg = 1.0; } return(0); } #ifdef USE_OMP void BSIM4LoadRhsMat(GENmodel *inModel, CKTcircuit *ckt) { unsigned int InstCount, idx; BSIM4instance **InstArray; BSIM4instance *here; BSIM4model *model = (BSIM4model*)inModel; InstArray = model->BSIM4InstanceArray; InstCount = model->BSIM4InstCount; for(idx = 0; idx < InstCount; idx++) { here = InstArray[idx]; /* Update b for Ax = b */ (*(ckt->CKTrhs + here->BSIM4dNodePrime) += here->BSIM4rhsdPrime); (*(ckt->CKTrhs + here->BSIM4gNodePrime) -= here->BSIM4rhsgPrime); if (here->BSIM4rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4gNodeExt) -= here->BSIM4rhsgExt); else if (here->BSIM4rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4gNodeMid) -= here->BSIM4grhsMid); if (!here->BSIM4rbodyMod) { (*(ckt->CKTrhs + here->BSIM4bNodePrime) += here->BSIM4rhsbPrime); (*(ckt->CKTrhs + here->BSIM4sNodePrime) += here->BSIM4rhssPrime); } else { (*(ckt->CKTrhs + here->BSIM4dbNode) -= here->BSIM4rhsdb); (*(ckt->CKTrhs + here->BSIM4bNodePrime) += here->BSIM4rhsbPrime); (*(ckt->CKTrhs + here->BSIM4sbNode) -= here->BSIM4rhssb); (*(ckt->CKTrhs + here->BSIM4sNodePrime) += here->BSIM4rhssPrime); } if (model->BSIM4rdsMod) { (*(ckt->CKTrhs + here->BSIM4dNode) -= here->BSIM4rhsd); (*(ckt->CKTrhs + here->BSIM4sNode) += here->BSIM4rhss); } if (here->BSIM4trnqsMod) *(ckt->CKTrhs + here->BSIM4qNode) += here->BSIM4rhsq; /* Update A for Ax = b */ if (here->BSIM4rgateMod == 1) { (*(here->BSIM4GEgePtr) += here->BSIM4_1); (*(here->BSIM4GPgePtr) -= here->BSIM4_2); (*(here->BSIM4GEgpPtr) -= here->BSIM4_3); (*(here->BSIM4GPgpPtr) += here->BSIM4_4); (*(here->BSIM4GPdpPtr) += here->BSIM4_5); (*(here->BSIM4GPspPtr) += here->BSIM4_6); (*(here->BSIM4GPbpPtr) += here->BSIM4_7); } else if (here->BSIM4rgateMod == 2) { (*(here->BSIM4GEgePtr) += here->BSIM4_8); (*(here->BSIM4GEgpPtr) += here->BSIM4_9); (*(here->BSIM4GEdpPtr) += here->BSIM4_10); (*(here->BSIM4GEspPtr) += here->BSIM4_11); (*(here->BSIM4GEbpPtr) += here->BSIM4_12); (*(here->BSIM4GPgePtr) -= here->BSIM4_13); (*(here->BSIM4GPgpPtr) += here->BSIM4_14); (*(here->BSIM4GPdpPtr) += here->BSIM4_15); (*(here->BSIM4GPspPtr) += here->BSIM4_16); (*(here->BSIM4GPbpPtr) += here->BSIM4_17); } else if (here->BSIM4rgateMod == 3) { (*(here->BSIM4GEgePtr) += here->BSIM4_18); (*(here->BSIM4GEgmPtr) -= here->BSIM4_19); (*(here->BSIM4GMgePtr) -= here->BSIM4_20); (*(here->BSIM4GMgmPtr) += here->BSIM4_21); (*(here->BSIM4GMdpPtr) += here->BSIM4_22); (*(here->BSIM4GMgpPtr) += here->BSIM4_23); (*(here->BSIM4GMspPtr) += here->BSIM4_24); (*(here->BSIM4GMbpPtr) += here->BSIM4_25); (*(here->BSIM4DPgmPtr) += here->BSIM4_26); (*(here->BSIM4GPgmPtr) -= here->BSIM4_27); (*(here->BSIM4SPgmPtr) += here->BSIM4_28); (*(here->BSIM4BPgmPtr) += here->BSIM4_29); (*(here->BSIM4GPgpPtr) += here->BSIM4_30); (*(here->BSIM4GPdpPtr) += here->BSIM4_31); (*(here->BSIM4GPspPtr) += here->BSIM4_32); (*(here->BSIM4GPbpPtr) += here->BSIM4_33); } else { (*(here->BSIM4GPgpPtr) += here->BSIM4_34); (*(here->BSIM4GPdpPtr) += here->BSIM4_35); (*(here->BSIM4GPspPtr) += here->BSIM4_36); (*(here->BSIM4GPbpPtr) += here->BSIM4_37); } if (model->BSIM4rdsMod) { (*(here->BSIM4DgpPtr) += here->BSIM4_38); (*(here->BSIM4DspPtr) += here->BSIM4_39); (*(here->BSIM4DbpPtr) += here->BSIM4_40); (*(here->BSIM4SdpPtr) += here->BSIM4_41); (*(here->BSIM4SgpPtr) += here->BSIM4_42); (*(here->BSIM4SbpPtr) += here->BSIM4_43); } (*(here->BSIM4DPdpPtr) += here->BSIM4_44); (*(here->BSIM4DPdPtr) -= here->BSIM4_45); (*(here->BSIM4DPgpPtr) += here->BSIM4_46); (*(here->BSIM4DPspPtr) -= here->BSIM4_47); (*(here->BSIM4DPbpPtr) -= here->BSIM4_48); (*(here->BSIM4DdpPtr) -= here->BSIM4_49); (*(here->BSIM4DdPtr) += here->BSIM4_50); (*(here->BSIM4SPdpPtr) -= here->BSIM4_51); (*(here->BSIM4SPgpPtr) += here->BSIM4_52); (*(here->BSIM4SPspPtr) += here->BSIM4_53); (*(here->BSIM4SPsPtr) -= here->BSIM4_54); (*(here->BSIM4SPbpPtr) -= here->BSIM4_55); (*(here->BSIM4SspPtr) -= here->BSIM4_56); (*(here->BSIM4SsPtr) += here->BSIM4_57); (*(here->BSIM4BPdpPtr) += here->BSIM4_58); (*(here->BSIM4BPgpPtr) += here->BSIM4_59); (*(here->BSIM4BPspPtr) += here->BSIM4_60); (*(here->BSIM4BPbpPtr) += here->BSIM4_61); /* stamp gidl */ (*(here->BSIM4DPdpPtr) += here->BSIM4_62); (*(here->BSIM4DPgpPtr) += here->BSIM4_63); (*(here->BSIM4DPspPtr) -= here->BSIM4_64); (*(here->BSIM4DPbpPtr) += here->BSIM4_65); (*(here->BSIM4BPdpPtr) -= here->BSIM4_66); (*(here->BSIM4BPgpPtr) -= here->BSIM4_67); (*(here->BSIM4BPspPtr) += here->BSIM4_68); (*(here->BSIM4BPbpPtr) -= here->BSIM4_69); /* stamp gisl */ (*(here->BSIM4SPdpPtr) -= here->BSIM4_70); (*(here->BSIM4SPgpPtr) += here->BSIM4_71); (*(here->BSIM4SPspPtr) += here->BSIM4_72); (*(here->BSIM4SPbpPtr) += here->BSIM4_73); (*(here->BSIM4BPdpPtr) += here->BSIM4_74); (*(here->BSIM4BPgpPtr) -= here->BSIM4_75); (*(here->BSIM4BPspPtr) -= here->BSIM4_76); (*(here->BSIM4BPbpPtr) -= here->BSIM4_77); if (here->BSIM4rbodyMod) { (*(here->BSIM4DPdbPtr) += here->BSIM4_78); (*(here->BSIM4SPsbPtr) -= here->BSIM4_79); (*(here->BSIM4DBdpPtr) += here->BSIM4_80); (*(here->BSIM4DBdbPtr) += here->BSIM4_81); (*(here->BSIM4DBbpPtr) -= here->BSIM4_82); (*(here->BSIM4DBbPtr) -= here->BSIM4_83); (*(here->BSIM4BPdbPtr) -= here->BSIM4_84); (*(here->BSIM4BPbPtr) -= here->BSIM4_85); (*(here->BSIM4BPsbPtr) -= here->BSIM4_86); (*(here->BSIM4BPbpPtr) += here->BSIM4_87); (*(here->BSIM4SBspPtr) += here->BSIM4_88); (*(here->BSIM4SBbpPtr) -= here->BSIM4_89); (*(here->BSIM4SBbPtr) -= here->BSIM4_90); (*(here->BSIM4SBsbPtr) += here->BSIM4_91); (*(here->BSIM4BdbPtr) -= here->BSIM4_92); (*(here->BSIM4BbpPtr) -= here->BSIM4_93); (*(here->BSIM4BsbPtr) -= here->BSIM4_94); (*(here->BSIM4BbPtr) += here->BSIM4_95); } if (here->BSIM4trnqsMod) { (*(here->BSIM4QqPtr) += here->BSIM4_96); (*(here->BSIM4QgpPtr) += here->BSIM4_97); (*(here->BSIM4QdpPtr) += here->BSIM4_98); (*(here->BSIM4QspPtr) += here->BSIM4_99); (*(here->BSIM4QbpPtr) += here->BSIM4_100); (*(here->BSIM4DPqPtr) += here->BSIM4_101); (*(here->BSIM4SPqPtr) += here->BSIM4_102); (*(here->BSIM4GPqPtr) -= here->BSIM4_103); } } } #endif ngspice-26/src/spicelib/devices/bsim4/bsim4ext.h0000644000265600020320000000272012264261473021163 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu Author: 2001- Xuemei Xi File: bsim4ext.h **********/ extern int BSIM4acLoad(GENmodel *,CKTcircuit*); extern int BSIM4ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM4convTest(GENmodel *,CKTcircuit*); extern int BSIM4delete(GENmodel*,IFuid,GENinstance**); extern void BSIM4destroy(GENmodel**); extern int BSIM4getic(GENmodel*,CKTcircuit*); extern int BSIM4load(GENmodel*,CKTcircuit*); extern int BSIM4mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM4mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM4mParam(int,IFvalue*,GENmodel*); extern void BSIM4mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM4param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM4pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM4setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM4temp(GENmodel*,CKTcircuit*); extern int BSIM4trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM4unsetup(GENmodel*,CKTcircuit*); extern int BSIM4soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/bsim4/bsim4init.c0000644000265600020320000000457512264261473021333 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim4itf.h" #include "bsim4ext.h" #include "bsim4init.h" SPICEdev BSIM4info = { { "BSIM4", "Berkeley Short Channel IGFET Model-4", &BSIM4nSize, &BSIM4nSize, BSIM4names, &BSIM4pTSize, BSIM4pTable, &BSIM4mPTSize, BSIM4mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, BSIM4param, /* DEVparam */ BSIM4mParam, /* DEVmodParam */ BSIM4load, /* DEVload */ BSIM4setup, /* DEVsetup */ BSIM4unsetup, /* DEVunsetup */ BSIM4setup, /* DEVpzSetup */ BSIM4temp, /* DEVtemperature */ BSIM4trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ BSIM4acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ BSIM4destroy, /* DEVdestroy */ BSIM4mDelete, /* DEVmodDelete */ BSIM4delete, /* DEVdelete */ BSIM4getic, /* DEVsetic */ BSIM4ask, /* DEVask */ BSIM4mAsk, /* DEVmodAsk */ BSIM4pzLoad, /* DEVpzLoad */ BSIM4convTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ BSIM4noise, /* DEVnoise */ BSIM4soaCheck, /* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &BSIM4iSize, /* DEVinstSize */ &BSIM4mSize /* DEVmodSize */ }; SPICEdev * get_bsim4_info(void) { return &BSIM4info; } ngspice-26/src/spicelib/devices/bsim4/b4getic.c0000644000265600020320000000273712264261473020750 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4getic.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4getic( GENmodel *inModel, CKTcircuit *ckt) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; for (; model ; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance) { if (!here->BSIM4icVDSGiven) { here->BSIM4icVDS = *(ckt->CKTrhs + here->BSIM4dNode) - *(ckt->CKTrhs + here->BSIM4sNode); } if (!here->BSIM4icVGSGiven) { here->BSIM4icVGS = *(ckt->CKTrhs + here->BSIM4gNodeExt) - *(ckt->CKTrhs + here->BSIM4sNode); } if(!here->BSIM4icVBSGiven) { here->BSIM4icVBS = *(ckt->CKTrhs + here->BSIM4bNode) - *(ckt->CKTrhs + here->BSIM4sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4mask.c0000644000265600020320000026650212264261473020612 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mask.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM4model *model = (BSIM4model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM4_MOD_MOBMOD : value->iValue = model->BSIM4mobMod; return(OK); case BSIM4_MOD_PARAMCHK : value->iValue = model->BSIM4paramChk; return(OK); case BSIM4_MOD_BINUNIT : value->iValue = model->BSIM4binUnit; return(OK); case BSIM4_MOD_CVCHARGEMOD : value->iValue = model->BSIM4cvchargeMod; return(OK); case BSIM4_MOD_CAPMOD : value->iValue = model->BSIM4capMod; return(OK); case BSIM4_MOD_DIOMOD : value->iValue = model->BSIM4dioMod; return(OK); case BSIM4_MOD_TRNQSMOD : value->iValue = model->BSIM4trnqsMod; return(OK); case BSIM4_MOD_ACNQSMOD : value->iValue = model->BSIM4acnqsMod; return(OK); case BSIM4_MOD_FNOIMOD : value->iValue = model->BSIM4fnoiMod; return(OK); case BSIM4_MOD_TNOIMOD : value->iValue = model->BSIM4tnoiMod; return(OK); case BSIM4_MOD_RDSMOD : value->iValue = model->BSIM4rdsMod; return(OK); case BSIM4_MOD_RBODYMOD : value->iValue = model->BSIM4rbodyMod; return(OK); case BSIM4_MOD_RGATEMOD : value->iValue = model->BSIM4rgateMod; return(OK); case BSIM4_MOD_PERMOD : value->iValue = model->BSIM4perMod; return(OK); case BSIM4_MOD_GEOMOD : value->iValue = model->BSIM4geoMod; return(OK); case BSIM4_MOD_RGEOMOD : value->iValue = model->BSIM4rgeoMod; return(OK); case BSIM4_MOD_MTRLMOD : value->iValue = model->BSIM4mtrlMod; return(OK); case BSIM4_MOD_GIDLMOD : /* v4.7 New GIDL/GISL*/ value->iValue = model->BSIM4gidlMod; return(OK); case BSIM4_MOD_MTRLCOMPATMOD : value->iValue = model->BSIM4mtrlCompatMod; return(OK); case BSIM4_MOD_IGCMOD : value->iValue = model->BSIM4igcMod; return(OK); case BSIM4_MOD_IGBMOD : value->iValue = model->BSIM4igbMod; return(OK); case BSIM4_MOD_TEMPMOD : value->iValue = model->BSIM4tempMod; return(OK); case BSIM4_MOD_VERSION : value->sValue = model->BSIM4version; return(OK); case BSIM4_MOD_TOXREF : value->rValue = model->BSIM4toxref; return(OK); case BSIM4_MOD_EOT : value->rValue = model->BSIM4eot; return(OK); case BSIM4_MOD_VDDEOT : value->rValue = model->BSIM4vddeot; return(OK); case BSIM4_MOD_TEMPEOT : value->rValue = model->BSIM4tempeot; return(OK); case BSIM4_MOD_LEFFEOT : value->rValue = model->BSIM4leffeot; return(OK); case BSIM4_MOD_WEFFEOT : value->rValue = model->BSIM4weffeot; return(OK); case BSIM4_MOD_ADOS : value->rValue = model->BSIM4ados; return(OK); case BSIM4_MOD_BDOS : value->rValue = model->BSIM4bdos; return(OK); case BSIM4_MOD_TOXE : value->rValue = model->BSIM4toxe; return(OK); case BSIM4_MOD_TOXP : value->rValue = model->BSIM4toxp; return(OK); case BSIM4_MOD_TOXM : value->rValue = model->BSIM4toxm; return(OK); case BSIM4_MOD_DTOX : value->rValue = model->BSIM4dtox; return(OK); case BSIM4_MOD_EPSROX : value->rValue = model->BSIM4epsrox; return(OK); case BSIM4_MOD_CDSC : value->rValue = model->BSIM4cdsc; return(OK); case BSIM4_MOD_CDSCB : value->rValue = model->BSIM4cdscb; return(OK); case BSIM4_MOD_CDSCD : value->rValue = model->BSIM4cdscd; return(OK); case BSIM4_MOD_CIT : value->rValue = model->BSIM4cit; return(OK); case BSIM4_MOD_NFACTOR : value->rValue = model->BSIM4nfactor; return(OK); case BSIM4_MOD_XJ: value->rValue = model->BSIM4xj; return(OK); case BSIM4_MOD_VSAT: value->rValue = model->BSIM4vsat; return(OK); case BSIM4_MOD_VTL: value->rValue = model->BSIM4vtl; return(OK); case BSIM4_MOD_XN: value->rValue = model->BSIM4xn; return(OK); case BSIM4_MOD_LC: value->rValue = model->BSIM4lc; return(OK); case BSIM4_MOD_LAMBDA: value->rValue = model->BSIM4lambda; return(OK); case BSIM4_MOD_AT: value->rValue = model->BSIM4at; return(OK); case BSIM4_MOD_A0: value->rValue = model->BSIM4a0; return(OK); case BSIM4_MOD_AGS: value->rValue = model->BSIM4ags; return(OK); case BSIM4_MOD_A1: value->rValue = model->BSIM4a1; return(OK); case BSIM4_MOD_A2: value->rValue = model->BSIM4a2; return(OK); case BSIM4_MOD_KETA: value->rValue = model->BSIM4keta; return(OK); case BSIM4_MOD_NSUB: value->rValue = model->BSIM4nsub; return(OK); case BSIM4_MOD_PHIG: value->rValue = model->BSIM4phig; return(OK); case BSIM4_MOD_EPSRGATE: value->rValue = model->BSIM4epsrgate; return(OK); case BSIM4_MOD_EASUB: value->rValue = model->BSIM4easub; return(OK); case BSIM4_MOD_EPSRSUB: value->rValue = model->BSIM4epsrsub; return(OK); case BSIM4_MOD_NI0SUB: value->rValue = model->BSIM4ni0sub; return(OK); case BSIM4_MOD_BG0SUB: value->rValue = model->BSIM4bg0sub; return(OK); case BSIM4_MOD_TBGASUB: value->rValue = model->BSIM4tbgasub; return(OK); case BSIM4_MOD_TBGBSUB: value->rValue = model->BSIM4tbgbsub; return(OK); case BSIM4_MOD_NDEP: value->rValue = model->BSIM4ndep; return(OK); case BSIM4_MOD_NSD: value->rValue = model->BSIM4nsd; return(OK); case BSIM4_MOD_NGATE: value->rValue = model->BSIM4ngate; return(OK); case BSIM4_MOD_GAMMA1: value->rValue = model->BSIM4gamma1; return(OK); case BSIM4_MOD_GAMMA2: value->rValue = model->BSIM4gamma2; return(OK); case BSIM4_MOD_VBX: value->rValue = model->BSIM4vbx; return(OK); case BSIM4_MOD_VBM: value->rValue = model->BSIM4vbm; return(OK); case BSIM4_MOD_XT: value->rValue = model->BSIM4xt; return(OK); case BSIM4_MOD_K1: value->rValue = model->BSIM4k1; return(OK); case BSIM4_MOD_KT1: value->rValue = model->BSIM4kt1; return(OK); case BSIM4_MOD_KT1L: value->rValue = model->BSIM4kt1l; return(OK); case BSIM4_MOD_KT2 : value->rValue = model->BSIM4kt2; return(OK); case BSIM4_MOD_K2 : value->rValue = model->BSIM4k2; return(OK); case BSIM4_MOD_K3: value->rValue = model->BSIM4k3; return(OK); case BSIM4_MOD_K3B: value->rValue = model->BSIM4k3b; return(OK); case BSIM4_MOD_W0: value->rValue = model->BSIM4w0; return(OK); case BSIM4_MOD_LPE0: value->rValue = model->BSIM4lpe0; return(OK); case BSIM4_MOD_LPEB: value->rValue = model->BSIM4lpeb; return(OK); case BSIM4_MOD_DVTP0: value->rValue = model->BSIM4dvtp0; return(OK); case BSIM4_MOD_DVTP1: value->rValue = model->BSIM4dvtp1; return(OK); case BSIM4_MOD_DVTP2: value->rValue = model->BSIM4dvtp2; /* New DIBL/Rout */ return(OK); case BSIM4_MOD_DVTP3: value->rValue = model->BSIM4dvtp3; return(OK); case BSIM4_MOD_DVTP4: value->rValue = model->BSIM4dvtp4; return(OK); case BSIM4_MOD_DVTP5: value->rValue = model->BSIM4dvtp5; return(OK); case BSIM4_MOD_DVT0 : value->rValue = model->BSIM4dvt0; return(OK); case BSIM4_MOD_DVT1 : value->rValue = model->BSIM4dvt1; return(OK); case BSIM4_MOD_DVT2 : value->rValue = model->BSIM4dvt2; return(OK); case BSIM4_MOD_DVT0W : value->rValue = model->BSIM4dvt0w; return(OK); case BSIM4_MOD_DVT1W : value->rValue = model->BSIM4dvt1w; return(OK); case BSIM4_MOD_DVT2W : value->rValue = model->BSIM4dvt2w; return(OK); case BSIM4_MOD_DROUT : value->rValue = model->BSIM4drout; return(OK); case BSIM4_MOD_DSUB : value->rValue = model->BSIM4dsub; return(OK); case BSIM4_MOD_VTH0: value->rValue = model->BSIM4vth0; return(OK); case BSIM4_MOD_EU: value->rValue = model->BSIM4eu; return(OK); case BSIM4_MOD_UCS: value->rValue = model->BSIM4ucs; return(OK); case BSIM4_MOD_UA: value->rValue = model->BSIM4ua; return(OK); case BSIM4_MOD_UA1: value->rValue = model->BSIM4ua1; return(OK); case BSIM4_MOD_UB: value->rValue = model->BSIM4ub; return(OK); case BSIM4_MOD_UB1: value->rValue = model->BSIM4ub1; return(OK); case BSIM4_MOD_UC: value->rValue = model->BSIM4uc; return(OK); case BSIM4_MOD_UC1: value->rValue = model->BSIM4uc1; return(OK); case BSIM4_MOD_UD: value->rValue = model->BSIM4ud; return(OK); case BSIM4_MOD_UD1: value->rValue = model->BSIM4ud1; return(OK); case BSIM4_MOD_UP: value->rValue = model->BSIM4up; return(OK); case BSIM4_MOD_LP: value->rValue = model->BSIM4lp; return(OK); case BSIM4_MOD_U0: value->rValue = model->BSIM4u0; return(OK); case BSIM4_MOD_UTE: value->rValue = model->BSIM4ute; return(OK); case BSIM4_MOD_UCSTE: value->rValue = model->BSIM4ucste; return(OK); case BSIM4_MOD_VOFF: value->rValue = model->BSIM4voff; return(OK); case BSIM4_MOD_TVOFF: value->rValue = model->BSIM4tvoff; return(OK); case BSIM4_MOD_TNFACTOR: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4tnfactor; return(OK); case BSIM4_MOD_TETA0: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4teta0; return(OK); case BSIM4_MOD_TVOFFCV: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4tvoffcv; return(OK); case BSIM4_MOD_VFBSDOFF: value->rValue = model->BSIM4vfbsdoff; return(OK); case BSIM4_MOD_TVFBSDOFF: value->rValue = model->BSIM4tvfbsdoff; return(OK); case BSIM4_MOD_VOFFL: value->rValue = model->BSIM4voffl; return(OK); case BSIM4_MOD_VOFFCVL: value->rValue = model->BSIM4voffcvl; return(OK); case BSIM4_MOD_MINV: value->rValue = model->BSIM4minv; return(OK); case BSIM4_MOD_MINVCV: value->rValue = model->BSIM4minvcv; return(OK); case BSIM4_MOD_FPROUT: value->rValue = model->BSIM4fprout; return(OK); case BSIM4_MOD_PDITS: value->rValue = model->BSIM4pdits; return(OK); case BSIM4_MOD_PDITSD: value->rValue = model->BSIM4pditsd; return(OK); case BSIM4_MOD_PDITSL: value->rValue = model->BSIM4pditsl; return(OK); case BSIM4_MOD_DELTA: value->rValue = model->BSIM4delta; return(OK); case BSIM4_MOD_RDSW: value->rValue = model->BSIM4rdsw; return(OK); case BSIM4_MOD_RDSWMIN: value->rValue = model->BSIM4rdswmin; return(OK); case BSIM4_MOD_RDWMIN: value->rValue = model->BSIM4rdwmin; return(OK); case BSIM4_MOD_RSWMIN: value->rValue = model->BSIM4rswmin; return(OK); case BSIM4_MOD_RDW: value->rValue = model->BSIM4rdw; return(OK); case BSIM4_MOD_RSW: value->rValue = model->BSIM4rsw; return(OK); case BSIM4_MOD_PRWG: value->rValue = model->BSIM4prwg; return(OK); case BSIM4_MOD_PRWB: value->rValue = model->BSIM4prwb; return(OK); case BSIM4_MOD_PRT: value->rValue = model->BSIM4prt; return(OK); case BSIM4_MOD_ETA0: value->rValue = model->BSIM4eta0; return(OK); case BSIM4_MOD_ETAB: value->rValue = model->BSIM4etab; return(OK); case BSIM4_MOD_PCLM: value->rValue = model->BSIM4pclm; return(OK); case BSIM4_MOD_PDIBL1: value->rValue = model->BSIM4pdibl1; return(OK); case BSIM4_MOD_PDIBL2: value->rValue = model->BSIM4pdibl2; return(OK); case BSIM4_MOD_PDIBLB: value->rValue = model->BSIM4pdiblb; return(OK); case BSIM4_MOD_PSCBE1: value->rValue = model->BSIM4pscbe1; return(OK); case BSIM4_MOD_PSCBE2: value->rValue = model->BSIM4pscbe2; return(OK); case BSIM4_MOD_PVAG: value->rValue = model->BSIM4pvag; return(OK); case BSIM4_MOD_WR: value->rValue = model->BSIM4wr; return(OK); case BSIM4_MOD_DWG: value->rValue = model->BSIM4dwg; return(OK); case BSIM4_MOD_DWB: value->rValue = model->BSIM4dwb; return(OK); case BSIM4_MOD_B0: value->rValue = model->BSIM4b0; return(OK); case BSIM4_MOD_B1: value->rValue = model->BSIM4b1; return(OK); case BSIM4_MOD_ALPHA0: value->rValue = model->BSIM4alpha0; return(OK); case BSIM4_MOD_ALPHA1: value->rValue = model->BSIM4alpha1; return(OK); case BSIM4_MOD_BETA0: value->rValue = model->BSIM4beta0; return(OK); case BSIM4_MOD_AGIDL: value->rValue = model->BSIM4agidl; return(OK); case BSIM4_MOD_BGIDL: value->rValue = model->BSIM4bgidl; return(OK); case BSIM4_MOD_CGIDL: value->rValue = model->BSIM4cgidl; return(OK); case BSIM4_MOD_EGIDL: value->rValue = model->BSIM4egidl; return(OK); case BSIM4_MOD_FGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4fgidl; return(OK); case BSIM4_MOD_KGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4kgidl; return(OK); case BSIM4_MOD_RGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4rgidl; return(OK); case BSIM4_MOD_AGISL: value->rValue = model->BSIM4agisl; return(OK); case BSIM4_MOD_BGISL: value->rValue = model->BSIM4bgisl; return(OK); case BSIM4_MOD_CGISL: value->rValue = model->BSIM4cgisl; return(OK); case BSIM4_MOD_EGISL: value->rValue = model->BSIM4egisl; return(OK); case BSIM4_MOD_FGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4fgisl; return(OK); case BSIM4_MOD_KGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4kgisl; return(OK); case BSIM4_MOD_RGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4rgisl; return(OK); case BSIM4_MOD_AIGC: value->rValue = model->BSIM4aigc; return(OK); case BSIM4_MOD_BIGC: value->rValue = model->BSIM4bigc; return(OK); case BSIM4_MOD_CIGC: value->rValue = model->BSIM4cigc; return(OK); case BSIM4_MOD_AIGSD: value->rValue = model->BSIM4aigsd; return(OK); case BSIM4_MOD_BIGSD: value->rValue = model->BSIM4bigsd; return(OK); case BSIM4_MOD_CIGSD: value->rValue = model->BSIM4cigsd; return(OK); case BSIM4_MOD_AIGS: value->rValue = model->BSIM4aigs; return(OK); case BSIM4_MOD_BIGS: value->rValue = model->BSIM4bigs; return(OK); case BSIM4_MOD_CIGS: value->rValue = model->BSIM4cigs; return(OK); case BSIM4_MOD_AIGD: value->rValue = model->BSIM4aigd; return(OK); case BSIM4_MOD_BIGD: value->rValue = model->BSIM4bigd; return(OK); case BSIM4_MOD_CIGD: value->rValue = model->BSIM4cigd; return(OK); case BSIM4_MOD_AIGBACC: value->rValue = model->BSIM4aigbacc; return(OK); case BSIM4_MOD_BIGBACC: value->rValue = model->BSIM4bigbacc; return(OK); case BSIM4_MOD_CIGBACC: value->rValue = model->BSIM4cigbacc; return(OK); case BSIM4_MOD_AIGBINV: value->rValue = model->BSIM4aigbinv; return(OK); case BSIM4_MOD_BIGBINV: value->rValue = model->BSIM4bigbinv; return(OK); case BSIM4_MOD_CIGBINV: value->rValue = model->BSIM4cigbinv; return(OK); case BSIM4_MOD_NIGC: value->rValue = model->BSIM4nigc; return(OK); case BSIM4_MOD_NIGBACC: value->rValue = model->BSIM4nigbacc; return(OK); case BSIM4_MOD_NIGBINV: value->rValue = model->BSIM4nigbinv; return(OK); case BSIM4_MOD_NTOX: value->rValue = model->BSIM4ntox; return(OK); case BSIM4_MOD_EIGBINV: value->rValue = model->BSIM4eigbinv; return(OK); case BSIM4_MOD_PIGCD: value->rValue = model->BSIM4pigcd; return(OK); case BSIM4_MOD_POXEDGE: value->rValue = model->BSIM4poxedge; return(OK); case BSIM4_MOD_PHIN: value->rValue = model->BSIM4phin; return(OK); case BSIM4_MOD_XRCRG1: value->rValue = model->BSIM4xrcrg1; return(OK); case BSIM4_MOD_XRCRG2: value->rValue = model->BSIM4xrcrg2; return(OK); case BSIM4_MOD_TNOIA: value->rValue = model->BSIM4tnoia; return(OK); case BSIM4_MOD_TNOIB: value->rValue = model->BSIM4tnoib; return(OK); case BSIM4_MOD_TNOIC: value->rValue = model->BSIM4tnoic; return(OK); case BSIM4_MOD_RNOIA: value->rValue = model->BSIM4rnoia; return(OK); case BSIM4_MOD_RNOIB: value->rValue = model->BSIM4rnoib; return(OK); case BSIM4_MOD_RNOIC: value->rValue = model->BSIM4rnoic; return(OK); case BSIM4_MOD_NTNOI: value->rValue = model->BSIM4ntnoi; return(OK); case BSIM4_MOD_IJTHDFWD: value->rValue = model->BSIM4ijthdfwd; return(OK); case BSIM4_MOD_IJTHSFWD: value->rValue = model->BSIM4ijthsfwd; return(OK); case BSIM4_MOD_IJTHDREV: value->rValue = model->BSIM4ijthdrev; return(OK); case BSIM4_MOD_IJTHSREV: value->rValue = model->BSIM4ijthsrev; return(OK); case BSIM4_MOD_XJBVD: value->rValue = model->BSIM4xjbvd; return(OK); case BSIM4_MOD_XJBVS: value->rValue = model->BSIM4xjbvs; return(OK); case BSIM4_MOD_BVD: value->rValue = model->BSIM4bvd; return(OK); case BSIM4_MOD_BVS: value->rValue = model->BSIM4bvs; return(OK); case BSIM4_MOD_VFB: value->rValue = model->BSIM4vfb; return(OK); case BSIM4_MOD_JTSS: value->rValue = model->BSIM4jtss; return(OK); case BSIM4_MOD_JTSD: value->rValue = model->BSIM4jtsd; return(OK); case BSIM4_MOD_JTSSWS: value->rValue = model->BSIM4jtssws; return(OK); case BSIM4_MOD_JTSSWD: value->rValue = model->BSIM4jtsswd; return(OK); case BSIM4_MOD_JTSSWGS: value->rValue = model->BSIM4jtsswgs; return(OK); case BSIM4_MOD_JTSSWGD: value->rValue = model->BSIM4jtsswgd; return(OK); case BSIM4_MOD_JTWEFF: value->rValue = model->BSIM4jtweff; return(OK); case BSIM4_MOD_NJTS: value->rValue = model->BSIM4njts; return(OK); case BSIM4_MOD_NJTSSW: value->rValue = model->BSIM4njtssw; return(OK); case BSIM4_MOD_NJTSSWG: value->rValue = model->BSIM4njtsswg; return(OK); case BSIM4_MOD_NJTSD: value->rValue = model->BSIM4njtsd; return(OK); case BSIM4_MOD_NJTSSWD: value->rValue = model->BSIM4njtsswd; return(OK); case BSIM4_MOD_NJTSSWGD: value->rValue = model->BSIM4njtsswgd; return(OK); case BSIM4_MOD_XTSS: value->rValue = model->BSIM4xtss; return(OK); case BSIM4_MOD_XTSD: value->rValue = model->BSIM4xtsd; return(OK); case BSIM4_MOD_XTSSWS: value->rValue = model->BSIM4xtssws; return(OK); case BSIM4_MOD_XTSSWD: value->rValue = model->BSIM4xtsswd; return(OK); case BSIM4_MOD_XTSSWGS: value->rValue = model->BSIM4xtsswgs; return(OK); case BSIM4_MOD_XTSSWGD: value->rValue = model->BSIM4xtsswgd; return(OK); case BSIM4_MOD_TNJTS: value->rValue = model->BSIM4tnjts; return(OK); case BSIM4_MOD_TNJTSSW: value->rValue = model->BSIM4tnjtssw; return(OK); case BSIM4_MOD_TNJTSSWG: value->rValue = model->BSIM4tnjtsswg; return(OK); case BSIM4_MOD_TNJTSD: value->rValue = model->BSIM4tnjtsd; return(OK); case BSIM4_MOD_TNJTSSWD: value->rValue = model->BSIM4tnjtsswd; return(OK); case BSIM4_MOD_TNJTSSWGD: value->rValue = model->BSIM4tnjtsswgd; return(OK); case BSIM4_MOD_VTSS: value->rValue = model->BSIM4vtss; return(OK); case BSIM4_MOD_VTSD: value->rValue = model->BSIM4vtsd; return(OK); case BSIM4_MOD_VTSSWS: value->rValue = model->BSIM4vtssws; return(OK); case BSIM4_MOD_VTSSWD: value->rValue = model->BSIM4vtsswd; return(OK); case BSIM4_MOD_VTSSWGS: value->rValue = model->BSIM4vtsswgs; return(OK); case BSIM4_MOD_VTSSWGD: value->rValue = model->BSIM4vtsswgd; return(OK); case BSIM4_MOD_GBMIN: value->rValue = model->BSIM4gbmin; return(OK); case BSIM4_MOD_RBDB: value->rValue = model->BSIM4rbdb; return(OK); case BSIM4_MOD_RBPB: value->rValue = model->BSIM4rbpb; return(OK); case BSIM4_MOD_RBSB: value->rValue = model->BSIM4rbsb; return(OK); case BSIM4_MOD_RBPS: value->rValue = model->BSIM4rbps; return(OK); case BSIM4_MOD_RBPD: value->rValue = model->BSIM4rbpd; return(OK); case BSIM4_MOD_RBPS0: value->rValue = model->BSIM4rbps0; return(OK); case BSIM4_MOD_RBPSL: value->rValue = model->BSIM4rbpsl; return(OK); case BSIM4_MOD_RBPSW: value->rValue = model->BSIM4rbpsw; return(OK); case BSIM4_MOD_RBPSNF: value->rValue = model->BSIM4rbpsnf; return(OK); case BSIM4_MOD_RBPD0: value->rValue = model->BSIM4rbpd0; return(OK); case BSIM4_MOD_RBPDL: value->rValue = model->BSIM4rbpdl; return(OK); case BSIM4_MOD_RBPDW: value->rValue = model->BSIM4rbpdw; return(OK); case BSIM4_MOD_RBPDNF: value->rValue = model->BSIM4rbpdnf; return(OK); case BSIM4_MOD_RBPBX0: value->rValue = model->BSIM4rbpbx0; return(OK); case BSIM4_MOD_RBPBXL: value->rValue = model->BSIM4rbpbxl; return(OK); case BSIM4_MOD_RBPBXW: value->rValue = model->BSIM4rbpbxw; return(OK); case BSIM4_MOD_RBPBXNF: value->rValue = model->BSIM4rbpbxnf; return(OK); case BSIM4_MOD_RBPBY0: value->rValue = model->BSIM4rbpby0; return(OK); case BSIM4_MOD_RBPBYL: value->rValue = model->BSIM4rbpbyl; return(OK); case BSIM4_MOD_RBPBYW: value->rValue = model->BSIM4rbpbyw; return(OK); case BSIM4_MOD_RBPBYNF: value->rValue = model->BSIM4rbpbynf; return(OK); case BSIM4_MOD_RBSBX0: value->rValue = model->BSIM4rbsbx0; return(OK); case BSIM4_MOD_RBSBY0: value->rValue = model->BSIM4rbsby0; return(OK); case BSIM4_MOD_RBDBX0: value->rValue = model->BSIM4rbdbx0; return(OK); case BSIM4_MOD_RBDBY0: value->rValue = model->BSIM4rbdby0; return(OK); case BSIM4_MOD_RBSDBXL: value->rValue = model->BSIM4rbsdbxl; return(OK); case BSIM4_MOD_RBSDBXW: value->rValue = model->BSIM4rbsdbxw; return(OK); case BSIM4_MOD_RBSDBXNF: value->rValue = model->BSIM4rbsdbxnf; return(OK); case BSIM4_MOD_RBSDBYL: value->rValue = model->BSIM4rbsdbyl; return(OK); case BSIM4_MOD_RBSDBYW: value->rValue = model->BSIM4rbsdbyw; return(OK); case BSIM4_MOD_RBSDBYNF: value->rValue = model->BSIM4rbsdbynf; return(OK); case BSIM4_MOD_CGSL: value->rValue = model->BSIM4cgsl; return(OK); case BSIM4_MOD_CGDL: value->rValue = model->BSIM4cgdl; return(OK); case BSIM4_MOD_CKAPPAS: value->rValue = model->BSIM4ckappas; return(OK); case BSIM4_MOD_CKAPPAD: value->rValue = model->BSIM4ckappad; return(OK); case BSIM4_MOD_CF: value->rValue = model->BSIM4cf; return(OK); case BSIM4_MOD_CLC: value->rValue = model->BSIM4clc; return(OK); case BSIM4_MOD_CLE: value->rValue = model->BSIM4cle; return(OK); case BSIM4_MOD_DWC: value->rValue = model->BSIM4dwc; return(OK); case BSIM4_MOD_DLC: value->rValue = model->BSIM4dlc; return(OK); case BSIM4_MOD_XW: value->rValue = model->BSIM4xw; return(OK); case BSIM4_MOD_XL: value->rValue = model->BSIM4xl; return(OK); case BSIM4_MOD_DLCIG: value->rValue = model->BSIM4dlcig; return(OK); case BSIM4_MOD_DLCIGD: value->rValue = model->BSIM4dlcigd; return(OK); case BSIM4_MOD_DWJ: value->rValue = model->BSIM4dwj; return(OK); case BSIM4_MOD_VFBCV: value->rValue = model->BSIM4vfbcv; return(OK); case BSIM4_MOD_ACDE: value->rValue = model->BSIM4acde; return(OK); case BSIM4_MOD_MOIN: value->rValue = model->BSIM4moin; return(OK); case BSIM4_MOD_NOFF: value->rValue = model->BSIM4noff; return(OK); case BSIM4_MOD_VOFFCV: value->rValue = model->BSIM4voffcv; return(OK); case BSIM4_MOD_DMCG: value->rValue = model->BSIM4dmcg; return(OK); case BSIM4_MOD_DMCI: value->rValue = model->BSIM4dmci; return(OK); case BSIM4_MOD_DMDG: value->rValue = model->BSIM4dmdg; return(OK); case BSIM4_MOD_DMCGT: value->rValue = model->BSIM4dmcgt; return(OK); case BSIM4_MOD_XGW: value->rValue = model->BSIM4xgw; return(OK); case BSIM4_MOD_XGL: value->rValue = model->BSIM4xgl; return(OK); case BSIM4_MOD_RSHG: value->rValue = model->BSIM4rshg; return(OK); case BSIM4_MOD_NGCON: value->rValue = model->BSIM4ngcon; return(OK); case BSIM4_MOD_TCJ: value->rValue = model->BSIM4tcj; return(OK); case BSIM4_MOD_TPB: value->rValue = model->BSIM4tpb; return(OK); case BSIM4_MOD_TCJSW: value->rValue = model->BSIM4tcjsw; return(OK); case BSIM4_MOD_TPBSW: value->rValue = model->BSIM4tpbsw; return(OK); case BSIM4_MOD_TCJSWG: value->rValue = model->BSIM4tcjswg; return(OK); case BSIM4_MOD_TPBSWG: value->rValue = model->BSIM4tpbswg; return(OK); /* Length dependence */ case BSIM4_MOD_LCDSC : value->rValue = model->BSIM4lcdsc; return(OK); case BSIM4_MOD_LCDSCB : value->rValue = model->BSIM4lcdscb; return(OK); case BSIM4_MOD_LCDSCD : value->rValue = model->BSIM4lcdscd; return(OK); case BSIM4_MOD_LCIT : value->rValue = model->BSIM4lcit; return(OK); case BSIM4_MOD_LNFACTOR : value->rValue = model->BSIM4lnfactor; return(OK); case BSIM4_MOD_LXJ: value->rValue = model->BSIM4lxj; return(OK); case BSIM4_MOD_LVSAT: value->rValue = model->BSIM4lvsat; return(OK); case BSIM4_MOD_LAT: value->rValue = model->BSIM4lat; return(OK); case BSIM4_MOD_LA0: value->rValue = model->BSIM4la0; return(OK); case BSIM4_MOD_LAGS: value->rValue = model->BSIM4lags; return(OK); case BSIM4_MOD_LA1: value->rValue = model->BSIM4la1; return(OK); case BSIM4_MOD_LA2: value->rValue = model->BSIM4la2; return(OK); case BSIM4_MOD_LKETA: value->rValue = model->BSIM4lketa; return(OK); case BSIM4_MOD_LNSUB: value->rValue = model->BSIM4lnsub; return(OK); case BSIM4_MOD_LNDEP: value->rValue = model->BSIM4lndep; return(OK); case BSIM4_MOD_LNSD: value->rValue = model->BSIM4lnsd; return(OK); case BSIM4_MOD_LNGATE: value->rValue = model->BSIM4lngate; return(OK); case BSIM4_MOD_LGAMMA1: value->rValue = model->BSIM4lgamma1; return(OK); case BSIM4_MOD_LGAMMA2: value->rValue = model->BSIM4lgamma2; return(OK); case BSIM4_MOD_LVBX: value->rValue = model->BSIM4lvbx; return(OK); case BSIM4_MOD_LVBM: value->rValue = model->BSIM4lvbm; return(OK); case BSIM4_MOD_LXT: value->rValue = model->BSIM4lxt; return(OK); case BSIM4_MOD_LK1: value->rValue = model->BSIM4lk1; return(OK); case BSIM4_MOD_LKT1: value->rValue = model->BSIM4lkt1; return(OK); case BSIM4_MOD_LKT1L: value->rValue = model->BSIM4lkt1l; return(OK); case BSIM4_MOD_LKT2 : value->rValue = model->BSIM4lkt2; return(OK); case BSIM4_MOD_LK2 : value->rValue = model->BSIM4lk2; return(OK); case BSIM4_MOD_LK3: value->rValue = model->BSIM4lk3; return(OK); case BSIM4_MOD_LK3B: value->rValue = model->BSIM4lk3b; return(OK); case BSIM4_MOD_LW0: value->rValue = model->BSIM4lw0; return(OK); case BSIM4_MOD_LLPE0: value->rValue = model->BSIM4llpe0; return(OK); case BSIM4_MOD_LLPEB: value->rValue = model->BSIM4llpeb; return(OK); case BSIM4_MOD_LDVTP0: value->rValue = model->BSIM4ldvtp0; return(OK); case BSIM4_MOD_LDVTP1: value->rValue = model->BSIM4ldvtp1; return(OK); case BSIM4_MOD_LDVTP2: value->rValue = model->BSIM4ldvtp2; /* New DIBL/Rout */ return(OK); case BSIM4_MOD_LDVTP3: value->rValue = model->BSIM4ldvtp3; return(OK); case BSIM4_MOD_LDVTP4: value->rValue = model->BSIM4ldvtp4; return(OK); case BSIM4_MOD_LDVTP5: value->rValue = model->BSIM4ldvtp5; return(OK); case BSIM4_MOD_LDVT0: value->rValue = model->BSIM4ldvt0; return(OK); case BSIM4_MOD_LDVT1 : value->rValue = model->BSIM4ldvt1; return(OK); case BSIM4_MOD_LDVT2 : value->rValue = model->BSIM4ldvt2; return(OK); case BSIM4_MOD_LDVT0W : value->rValue = model->BSIM4ldvt0w; return(OK); case BSIM4_MOD_LDVT1W : value->rValue = model->BSIM4ldvt1w; return(OK); case BSIM4_MOD_LDVT2W : value->rValue = model->BSIM4ldvt2w; return(OK); case BSIM4_MOD_LDROUT : value->rValue = model->BSIM4ldrout; return(OK); case BSIM4_MOD_LDSUB : value->rValue = model->BSIM4ldsub; return(OK); case BSIM4_MOD_LVTH0: value->rValue = model->BSIM4lvth0; return(OK); case BSIM4_MOD_LUA: value->rValue = model->BSIM4lua; return(OK); case BSIM4_MOD_LUA1: value->rValue = model->BSIM4lua1; return(OK); case BSIM4_MOD_LUB: value->rValue = model->BSIM4lub; return(OK); case BSIM4_MOD_LUB1: value->rValue = model->BSIM4lub1; return(OK); case BSIM4_MOD_LUC: value->rValue = model->BSIM4luc; return(OK); case BSIM4_MOD_LUC1: value->rValue = model->BSIM4luc1; return(OK); case BSIM4_MOD_LUD: value->rValue = model->BSIM4lud; return(OK); case BSIM4_MOD_LUD1: value->rValue = model->BSIM4lud1; return(OK); case BSIM4_MOD_LUP: value->rValue = model->BSIM4lup; return(OK); case BSIM4_MOD_LLP: value->rValue = model->BSIM4llp; return(OK); case BSIM4_MOD_LU0: value->rValue = model->BSIM4lu0; return(OK); case BSIM4_MOD_LUTE: value->rValue = model->BSIM4lute; return(OK); case BSIM4_MOD_LUCSTE: value->rValue = model->BSIM4lucste; return(OK); case BSIM4_MOD_LVOFF: value->rValue = model->BSIM4lvoff; return(OK); case BSIM4_MOD_LTVOFF: value->rValue = model->BSIM4ltvoff; return(OK); case BSIM4_MOD_LTNFACTOR: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4ltnfactor; return(OK); case BSIM4_MOD_LTETA0: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4lteta0; return(OK); case BSIM4_MOD_LTVOFFCV: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4ltvoffcv; return(OK); case BSIM4_MOD_LMINV: value->rValue = model->BSIM4lminv; return(OK); case BSIM4_MOD_LMINVCV: value->rValue = model->BSIM4lminvcv; return(OK); case BSIM4_MOD_LFPROUT: value->rValue = model->BSIM4lfprout; return(OK); case BSIM4_MOD_LPDITS: value->rValue = model->BSIM4lpdits; return(OK); case BSIM4_MOD_LPDITSD: value->rValue = model->BSIM4lpditsd; return(OK); case BSIM4_MOD_LDELTA: value->rValue = model->BSIM4ldelta; return(OK); case BSIM4_MOD_LRDSW: value->rValue = model->BSIM4lrdsw; return(OK); case BSIM4_MOD_LRDW: value->rValue = model->BSIM4lrdw; return(OK); case BSIM4_MOD_LRSW: value->rValue = model->BSIM4lrsw; return(OK); case BSIM4_MOD_LPRWB: value->rValue = model->BSIM4lprwb; return(OK); case BSIM4_MOD_LPRWG: value->rValue = model->BSIM4lprwg; return(OK); case BSIM4_MOD_LPRT: value->rValue = model->BSIM4lprt; return(OK); case BSIM4_MOD_LETA0: value->rValue = model->BSIM4leta0; return(OK); case BSIM4_MOD_LETAB: value->rValue = model->BSIM4letab; return(OK); case BSIM4_MOD_LPCLM: value->rValue = model->BSIM4lpclm; return(OK); case BSIM4_MOD_LPDIBL1: value->rValue = model->BSIM4lpdibl1; return(OK); case BSIM4_MOD_LPDIBL2: value->rValue = model->BSIM4lpdibl2; return(OK); case BSIM4_MOD_LPDIBLB: value->rValue = model->BSIM4lpdiblb; return(OK); case BSIM4_MOD_LPSCBE1: value->rValue = model->BSIM4lpscbe1; return(OK); case BSIM4_MOD_LPSCBE2: value->rValue = model->BSIM4lpscbe2; return(OK); case BSIM4_MOD_LPVAG: value->rValue = model->BSIM4lpvag; return(OK); case BSIM4_MOD_LWR: value->rValue = model->BSIM4lwr; return(OK); case BSIM4_MOD_LDWG: value->rValue = model->BSIM4ldwg; return(OK); case BSIM4_MOD_LDWB: value->rValue = model->BSIM4ldwb; return(OK); case BSIM4_MOD_LB0: value->rValue = model->BSIM4lb0; return(OK); case BSIM4_MOD_LB1: value->rValue = model->BSIM4lb1; return(OK); case BSIM4_MOD_LALPHA0: value->rValue = model->BSIM4lalpha0; return(OK); case BSIM4_MOD_LALPHA1: value->rValue = model->BSIM4lalpha1; return(OK); case BSIM4_MOD_LBETA0: value->rValue = model->BSIM4lbeta0; return(OK); case BSIM4_MOD_LAGIDL: value->rValue = model->BSIM4lagidl; return(OK); case BSIM4_MOD_LBGIDL: value->rValue = model->BSIM4lbgidl; return(OK); case BSIM4_MOD_LCGIDL: value->rValue = model->BSIM4lcgidl; return(OK); case BSIM4_MOD_LEGIDL: value->rValue = model->BSIM4legidl; return(OK); case BSIM4_MOD_LFGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lfgidl; return(OK); case BSIM4_MOD_LKGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lkgidl; return(OK); case BSIM4_MOD_LRGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lrgidl; return(OK); case BSIM4_MOD_LAGISL: value->rValue = model->BSIM4lagisl; return(OK); case BSIM4_MOD_LBGISL: value->rValue = model->BSIM4lbgisl; return(OK); case BSIM4_MOD_LCGISL: value->rValue = model->BSIM4lcgisl; return(OK); case BSIM4_MOD_LEGISL: value->rValue = model->BSIM4legisl; return(OK); case BSIM4_MOD_LFGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lfgisl; return(OK); case BSIM4_MOD_LKGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lkgisl; return(OK); case BSIM4_MOD_LRGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4lrgisl; return(OK); case BSIM4_MOD_LAIGC: value->rValue = model->BSIM4laigc; return(OK); case BSIM4_MOD_LBIGC: value->rValue = model->BSIM4lbigc; return(OK); case BSIM4_MOD_LCIGC: value->rValue = model->BSIM4lcigc; return(OK); case BSIM4_MOD_LAIGSD: value->rValue = model->BSIM4laigsd; return(OK); case BSIM4_MOD_LBIGSD: value->rValue = model->BSIM4lbigsd; return(OK); case BSIM4_MOD_LCIGSD: value->rValue = model->BSIM4lcigsd; return(OK); case BSIM4_MOD_LAIGS: value->rValue = model->BSIM4laigs; return(OK); case BSIM4_MOD_LBIGS: value->rValue = model->BSIM4lbigs; return(OK); case BSIM4_MOD_LCIGS: value->rValue = model->BSIM4lcigs; return(OK); case BSIM4_MOD_LAIGD: value->rValue = model->BSIM4laigd; return(OK); case BSIM4_MOD_LBIGD: value->rValue = model->BSIM4lbigd; return(OK); case BSIM4_MOD_LCIGD: value->rValue = model->BSIM4lcigd; return(OK); case BSIM4_MOD_LAIGBACC: value->rValue = model->BSIM4laigbacc; return(OK); case BSIM4_MOD_LBIGBACC: value->rValue = model->BSIM4lbigbacc; return(OK); case BSIM4_MOD_LCIGBACC: value->rValue = model->BSIM4lcigbacc; return(OK); case BSIM4_MOD_LAIGBINV: value->rValue = model->BSIM4laigbinv; return(OK); case BSIM4_MOD_LBIGBINV: value->rValue = model->BSIM4lbigbinv; return(OK); case BSIM4_MOD_LCIGBINV: value->rValue = model->BSIM4lcigbinv; return(OK); case BSIM4_MOD_LNIGC: value->rValue = model->BSIM4lnigc; return(OK); case BSIM4_MOD_LNIGBACC: value->rValue = model->BSIM4lnigbacc; return(OK); case BSIM4_MOD_LNIGBINV: value->rValue = model->BSIM4lnigbinv; return(OK); case BSIM4_MOD_LNTOX: value->rValue = model->BSIM4lntox; return(OK); case BSIM4_MOD_LEIGBINV: value->rValue = model->BSIM4leigbinv; return(OK); case BSIM4_MOD_LPIGCD: value->rValue = model->BSIM4lpigcd; return(OK); case BSIM4_MOD_LPOXEDGE: value->rValue = model->BSIM4lpoxedge; return(OK); case BSIM4_MOD_LPHIN: value->rValue = model->BSIM4lphin; return(OK); case BSIM4_MOD_LXRCRG1: value->rValue = model->BSIM4lxrcrg1; return(OK); case BSIM4_MOD_LXRCRG2: value->rValue = model->BSIM4lxrcrg2; return(OK); case BSIM4_MOD_LEU: value->rValue = model->BSIM4leu; return(OK); case BSIM4_MOD_LUCS: value->rValue = model->BSIM4lucs; return(OK); case BSIM4_MOD_LVFB: value->rValue = model->BSIM4lvfb; return(OK); case BSIM4_MOD_LCGSL: value->rValue = model->BSIM4lcgsl; return(OK); case BSIM4_MOD_LCGDL: value->rValue = model->BSIM4lcgdl; return(OK); case BSIM4_MOD_LCKAPPAS: value->rValue = model->BSIM4lckappas; return(OK); case BSIM4_MOD_LCKAPPAD: value->rValue = model->BSIM4lckappad; return(OK); case BSIM4_MOD_LCF: value->rValue = model->BSIM4lcf; return(OK); case BSIM4_MOD_LCLC: value->rValue = model->BSIM4lclc; return(OK); case BSIM4_MOD_LCLE: value->rValue = model->BSIM4lcle; return(OK); case BSIM4_MOD_LVFBCV: value->rValue = model->BSIM4lvfbcv; return(OK); case BSIM4_MOD_LACDE: value->rValue = model->BSIM4lacde; return(OK); case BSIM4_MOD_LMOIN: value->rValue = model->BSIM4lmoin; return(OK); case BSIM4_MOD_LNOFF: value->rValue = model->BSIM4lnoff; return(OK); case BSIM4_MOD_LVOFFCV: value->rValue = model->BSIM4lvoffcv; return(OK); case BSIM4_MOD_LVFBSDOFF: value->rValue = model->BSIM4lvfbsdoff; return(OK); case BSIM4_MOD_LTVFBSDOFF: value->rValue = model->BSIM4ltvfbsdoff; return(OK); case BSIM4_MOD_LLAMBDA: value->rValue = model->BSIM4llambda; return(OK); case BSIM4_MOD_LVTL: value->rValue = model->BSIM4lvtl; return(OK); case BSIM4_MOD_LXN: value->rValue = model->BSIM4lxn; return(OK); /* Width dependence */ case BSIM4_MOD_WCDSC : value->rValue = model->BSIM4wcdsc; return(OK); case BSIM4_MOD_WCDSCB : value->rValue = model->BSIM4wcdscb; return(OK); case BSIM4_MOD_WCDSCD : value->rValue = model->BSIM4wcdscd; return(OK); case BSIM4_MOD_WCIT : value->rValue = model->BSIM4wcit; return(OK); case BSIM4_MOD_WNFACTOR : value->rValue = model->BSIM4wnfactor; return(OK); case BSIM4_MOD_WXJ: value->rValue = model->BSIM4wxj; return(OK); case BSIM4_MOD_WVSAT: value->rValue = model->BSIM4wvsat; return(OK); case BSIM4_MOD_WAT: value->rValue = model->BSIM4wat; return(OK); case BSIM4_MOD_WA0: value->rValue = model->BSIM4wa0; return(OK); case BSIM4_MOD_WAGS: value->rValue = model->BSIM4wags; return(OK); case BSIM4_MOD_WA1: value->rValue = model->BSIM4wa1; return(OK); case BSIM4_MOD_WA2: value->rValue = model->BSIM4wa2; return(OK); case BSIM4_MOD_WKETA: value->rValue = model->BSIM4wketa; return(OK); case BSIM4_MOD_WNSUB: value->rValue = model->BSIM4wnsub; return(OK); case BSIM4_MOD_WNDEP: value->rValue = model->BSIM4wndep; return(OK); case BSIM4_MOD_WNSD: value->rValue = model->BSIM4wnsd; return(OK); case BSIM4_MOD_WNGATE: value->rValue = model->BSIM4wngate; return(OK); case BSIM4_MOD_WGAMMA1: value->rValue = model->BSIM4wgamma1; return(OK); case BSIM4_MOD_WGAMMA2: value->rValue = model->BSIM4wgamma2; return(OK); case BSIM4_MOD_WVBX: value->rValue = model->BSIM4wvbx; return(OK); case BSIM4_MOD_WVBM: value->rValue = model->BSIM4wvbm; return(OK); case BSIM4_MOD_WXT: value->rValue = model->BSIM4wxt; return(OK); case BSIM4_MOD_WK1: value->rValue = model->BSIM4wk1; return(OK); case BSIM4_MOD_WKT1: value->rValue = model->BSIM4wkt1; return(OK); case BSIM4_MOD_WKT1L: value->rValue = model->BSIM4wkt1l; return(OK); case BSIM4_MOD_WKT2 : value->rValue = model->BSIM4wkt2; return(OK); case BSIM4_MOD_WK2 : value->rValue = model->BSIM4wk2; return(OK); case BSIM4_MOD_WK3: value->rValue = model->BSIM4wk3; return(OK); case BSIM4_MOD_WK3B: value->rValue = model->BSIM4wk3b; return(OK); case BSIM4_MOD_WW0: value->rValue = model->BSIM4ww0; return(OK); case BSIM4_MOD_WLPE0: value->rValue = model->BSIM4wlpe0; return(OK); case BSIM4_MOD_WDVTP0: value->rValue = model->BSIM4wdvtp0; return(OK); case BSIM4_MOD_WDVTP1: value->rValue = model->BSIM4wdvtp1; return(OK); case BSIM4_MOD_WDVTP2: value->rValue = model->BSIM4wdvtp2; /* New DIBL/Rout */ return(OK); case BSIM4_MOD_WDVTP3: value->rValue = model->BSIM4wdvtp3; return(OK); case BSIM4_MOD_WDVTP4: value->rValue = model->BSIM4wdvtp4; return(OK); case BSIM4_MOD_WDVTP5: value->rValue = model->BSIM4wdvtp5; return(OK); case BSIM4_MOD_WLPEB: value->rValue = model->BSIM4wlpeb; return(OK); case BSIM4_MOD_WDVT0: value->rValue = model->BSIM4wdvt0; return(OK); case BSIM4_MOD_WDVT1 : value->rValue = model->BSIM4wdvt1; return(OK); case BSIM4_MOD_WDVT2 : value->rValue = model->BSIM4wdvt2; return(OK); case BSIM4_MOD_WDVT0W : value->rValue = model->BSIM4wdvt0w; return(OK); case BSIM4_MOD_WDVT1W : value->rValue = model->BSIM4wdvt1w; return(OK); case BSIM4_MOD_WDVT2W : value->rValue = model->BSIM4wdvt2w; return(OK); case BSIM4_MOD_WDROUT : value->rValue = model->BSIM4wdrout; return(OK); case BSIM4_MOD_WDSUB : value->rValue = model->BSIM4wdsub; return(OK); case BSIM4_MOD_WVTH0: value->rValue = model->BSIM4wvth0; return(OK); case BSIM4_MOD_WUA: value->rValue = model->BSIM4wua; return(OK); case BSIM4_MOD_WUA1: value->rValue = model->BSIM4wua1; return(OK); case BSIM4_MOD_WUB: value->rValue = model->BSIM4wub; return(OK); case BSIM4_MOD_WUB1: value->rValue = model->BSIM4wub1; return(OK); case BSIM4_MOD_WUC: value->rValue = model->BSIM4wuc; return(OK); case BSIM4_MOD_WUC1: value->rValue = model->BSIM4wuc1; return(OK); case BSIM4_MOD_WUD: value->rValue = model->BSIM4wud; return(OK); case BSIM4_MOD_WUD1: value->rValue = model->BSIM4wud1; return(OK); case BSIM4_MOD_WUP: value->rValue = model->BSIM4wup; return(OK); case BSIM4_MOD_WLP: value->rValue = model->BSIM4wlp; return(OK); case BSIM4_MOD_WU0: value->rValue = model->BSIM4wu0; return(OK); case BSIM4_MOD_WUTE: value->rValue = model->BSIM4wute; return(OK); case BSIM4_MOD_WUCSTE: value->rValue = model->BSIM4wucste; return(OK); case BSIM4_MOD_WVOFF: value->rValue = model->BSIM4wvoff; return(OK); case BSIM4_MOD_WTVOFF: value->rValue = model->BSIM4wtvoff; return(OK); case BSIM4_MOD_WTNFACTOR: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4wtnfactor; return(OK); case BSIM4_MOD_WTETA0: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4wteta0; return(OK); case BSIM4_MOD_WTVOFFCV: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4wtvoffcv; return(OK); case BSIM4_MOD_WMINV: value->rValue = model->BSIM4wminv; return(OK); case BSIM4_MOD_WMINVCV: value->rValue = model->BSIM4wminvcv; return(OK); case BSIM4_MOD_WFPROUT: value->rValue = model->BSIM4wfprout; return(OK); case BSIM4_MOD_WPDITS: value->rValue = model->BSIM4wpdits; return(OK); case BSIM4_MOD_WPDITSD: value->rValue = model->BSIM4wpditsd; return(OK); case BSIM4_MOD_WDELTA: value->rValue = model->BSIM4wdelta; return(OK); case BSIM4_MOD_WRDSW: value->rValue = model->BSIM4wrdsw; return(OK); case BSIM4_MOD_WRDW: value->rValue = model->BSIM4wrdw; return(OK); case BSIM4_MOD_WRSW: value->rValue = model->BSIM4wrsw; return(OK); case BSIM4_MOD_WPRWB: value->rValue = model->BSIM4wprwb; return(OK); case BSIM4_MOD_WPRWG: value->rValue = model->BSIM4wprwg; return(OK); case BSIM4_MOD_WPRT: value->rValue = model->BSIM4wprt; return(OK); case BSIM4_MOD_WETA0: value->rValue = model->BSIM4weta0; return(OK); case BSIM4_MOD_WETAB: value->rValue = model->BSIM4wetab; return(OK); case BSIM4_MOD_WPCLM: value->rValue = model->BSIM4wpclm; return(OK); case BSIM4_MOD_WPDIBL1: value->rValue = model->BSIM4wpdibl1; return(OK); case BSIM4_MOD_WPDIBL2: value->rValue = model->BSIM4wpdibl2; return(OK); case BSIM4_MOD_WPDIBLB: value->rValue = model->BSIM4wpdiblb; return(OK); case BSIM4_MOD_WPSCBE1: value->rValue = model->BSIM4wpscbe1; return(OK); case BSIM4_MOD_WPSCBE2: value->rValue = model->BSIM4wpscbe2; return(OK); case BSIM4_MOD_WPVAG: value->rValue = model->BSIM4wpvag; return(OK); case BSIM4_MOD_WWR: value->rValue = model->BSIM4wwr; return(OK); case BSIM4_MOD_WDWG: value->rValue = model->BSIM4wdwg; return(OK); case BSIM4_MOD_WDWB: value->rValue = model->BSIM4wdwb; return(OK); case BSIM4_MOD_WB0: value->rValue = model->BSIM4wb0; return(OK); case BSIM4_MOD_WB1: value->rValue = model->BSIM4wb1; return(OK); case BSIM4_MOD_WALPHA0: value->rValue = model->BSIM4walpha0; return(OK); case BSIM4_MOD_WALPHA1: value->rValue = model->BSIM4walpha1; return(OK); case BSIM4_MOD_WBETA0: value->rValue = model->BSIM4wbeta0; return(OK); case BSIM4_MOD_WAGIDL: value->rValue = model->BSIM4wagidl; return(OK); case BSIM4_MOD_WBGIDL: value->rValue = model->BSIM4wbgidl; return(OK); case BSIM4_MOD_WCGIDL: value->rValue = model->BSIM4wcgidl; return(OK); case BSIM4_MOD_WEGIDL: value->rValue = model->BSIM4wegidl; return(OK); case BSIM4_MOD_WFGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wfgidl; return(OK); case BSIM4_MOD_WKGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wkgidl; return(OK); case BSIM4_MOD_WRGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wrgidl; return(OK); case BSIM4_MOD_WAGISL: value->rValue = model->BSIM4wagisl; return(OK); case BSIM4_MOD_WBGISL: value->rValue = model->BSIM4wbgisl; return(OK); case BSIM4_MOD_WCGISL: value->rValue = model->BSIM4wcgisl; return(OK); case BSIM4_MOD_WEGISL: value->rValue = model->BSIM4wegisl; return(OK); case BSIM4_MOD_WFGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wfgisl; return(OK); case BSIM4_MOD_WKGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wkgisl; return(OK); case BSIM4_MOD_WRGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4wrgisl; return(OK); case BSIM4_MOD_WAIGC: value->rValue = model->BSIM4waigc; return(OK); case BSIM4_MOD_WBIGC: value->rValue = model->BSIM4wbigc; return(OK); case BSIM4_MOD_WCIGC: value->rValue = model->BSIM4wcigc; return(OK); case BSIM4_MOD_WAIGSD: value->rValue = model->BSIM4waigsd; return(OK); case BSIM4_MOD_WBIGSD: value->rValue = model->BSIM4wbigsd; return(OK); case BSIM4_MOD_WCIGSD: value->rValue = model->BSIM4wcigsd; return(OK); case BSIM4_MOD_WAIGS: value->rValue = model->BSIM4waigs; return(OK); case BSIM4_MOD_WBIGS: value->rValue = model->BSIM4wbigs; return(OK); case BSIM4_MOD_WCIGS: value->rValue = model->BSIM4wcigs; return(OK); case BSIM4_MOD_WAIGD: value->rValue = model->BSIM4waigd; return(OK); case BSIM4_MOD_WBIGD: value->rValue = model->BSIM4wbigd; return(OK); case BSIM4_MOD_WCIGD: value->rValue = model->BSIM4wcigd; return(OK); case BSIM4_MOD_WAIGBACC: value->rValue = model->BSIM4waigbacc; return(OK); case BSIM4_MOD_WBIGBACC: value->rValue = model->BSIM4wbigbacc; return(OK); case BSIM4_MOD_WCIGBACC: value->rValue = model->BSIM4wcigbacc; return(OK); case BSIM4_MOD_WAIGBINV: value->rValue = model->BSIM4waigbinv; return(OK); case BSIM4_MOD_WBIGBINV: value->rValue = model->BSIM4wbigbinv; return(OK); case BSIM4_MOD_WCIGBINV: value->rValue = model->BSIM4wcigbinv; return(OK); case BSIM4_MOD_WNIGC: value->rValue = model->BSIM4wnigc; return(OK); case BSIM4_MOD_WNIGBACC: value->rValue = model->BSIM4wnigbacc; return(OK); case BSIM4_MOD_WNIGBINV: value->rValue = model->BSIM4wnigbinv; return(OK); case BSIM4_MOD_WNTOX: value->rValue = model->BSIM4wntox; return(OK); case BSIM4_MOD_WEIGBINV: value->rValue = model->BSIM4weigbinv; return(OK); case BSIM4_MOD_WPIGCD: value->rValue = model->BSIM4wpigcd; return(OK); case BSIM4_MOD_WPOXEDGE: value->rValue = model->BSIM4wpoxedge; return(OK); case BSIM4_MOD_WPHIN: value->rValue = model->BSIM4wphin; return(OK); case BSIM4_MOD_WXRCRG1: value->rValue = model->BSIM4wxrcrg1; return(OK); case BSIM4_MOD_WXRCRG2: value->rValue = model->BSIM4wxrcrg2; return(OK); case BSIM4_MOD_WEU: value->rValue = model->BSIM4weu; return(OK); case BSIM4_MOD_WUCS: value->rValue = model->BSIM4wucs; return(OK); case BSIM4_MOD_WVFB: value->rValue = model->BSIM4wvfb; return(OK); case BSIM4_MOD_WCGSL: value->rValue = model->BSIM4wcgsl; return(OK); case BSIM4_MOD_WCGDL: value->rValue = model->BSIM4wcgdl; return(OK); case BSIM4_MOD_WCKAPPAS: value->rValue = model->BSIM4wckappas; return(OK); case BSIM4_MOD_WCKAPPAD: value->rValue = model->BSIM4wckappad; return(OK); case BSIM4_MOD_WCF: value->rValue = model->BSIM4wcf; return(OK); case BSIM4_MOD_WCLC: value->rValue = model->BSIM4wclc; return(OK); case BSIM4_MOD_WCLE: value->rValue = model->BSIM4wcle; return(OK); case BSIM4_MOD_WVFBCV: value->rValue = model->BSIM4wvfbcv; return(OK); case BSIM4_MOD_WACDE: value->rValue = model->BSIM4wacde; return(OK); case BSIM4_MOD_WMOIN: value->rValue = model->BSIM4wmoin; return(OK); case BSIM4_MOD_WNOFF: value->rValue = model->BSIM4wnoff; return(OK); case BSIM4_MOD_WVOFFCV: value->rValue = model->BSIM4wvoffcv; return(OK); case BSIM4_MOD_WVFBSDOFF: value->rValue = model->BSIM4wvfbsdoff; return(OK); case BSIM4_MOD_WTVFBSDOFF: value->rValue = model->BSIM4wtvfbsdoff; return(OK); case BSIM4_MOD_WLAMBDA: value->rValue = model->BSIM4wlambda; return(OK); case BSIM4_MOD_WVTL: value->rValue = model->BSIM4wvtl; return(OK); case BSIM4_MOD_WXN: value->rValue = model->BSIM4wxn; return(OK); /* Cross-term dependence */ case BSIM4_MOD_PCDSC : value->rValue = model->BSIM4pcdsc; return(OK); case BSIM4_MOD_PCDSCB : value->rValue = model->BSIM4pcdscb; return(OK); case BSIM4_MOD_PCDSCD : value->rValue = model->BSIM4pcdscd; return(OK); case BSIM4_MOD_PCIT : value->rValue = model->BSIM4pcit; return(OK); case BSIM4_MOD_PNFACTOR : value->rValue = model->BSIM4pnfactor; return(OK); case BSIM4_MOD_PXJ: value->rValue = model->BSIM4pxj; return(OK); case BSIM4_MOD_PVSAT: value->rValue = model->BSIM4pvsat; return(OK); case BSIM4_MOD_PAT: value->rValue = model->BSIM4pat; return(OK); case BSIM4_MOD_PA0: value->rValue = model->BSIM4pa0; return(OK); case BSIM4_MOD_PAGS: value->rValue = model->BSIM4pags; return(OK); case BSIM4_MOD_PA1: value->rValue = model->BSIM4pa1; return(OK); case BSIM4_MOD_PA2: value->rValue = model->BSIM4pa2; return(OK); case BSIM4_MOD_PKETA: value->rValue = model->BSIM4pketa; return(OK); case BSIM4_MOD_PNSUB: value->rValue = model->BSIM4pnsub; return(OK); case BSIM4_MOD_PNDEP: value->rValue = model->BSIM4pndep; return(OK); case BSIM4_MOD_PNSD: value->rValue = model->BSIM4pnsd; return(OK); case BSIM4_MOD_PNGATE: value->rValue = model->BSIM4pngate; return(OK); case BSIM4_MOD_PGAMMA1: value->rValue = model->BSIM4pgamma1; return(OK); case BSIM4_MOD_PGAMMA2: value->rValue = model->BSIM4pgamma2; return(OK); case BSIM4_MOD_PVBX: value->rValue = model->BSIM4pvbx; return(OK); case BSIM4_MOD_PVBM: value->rValue = model->BSIM4pvbm; return(OK); case BSIM4_MOD_PXT: value->rValue = model->BSIM4pxt; return(OK); case BSIM4_MOD_PK1: value->rValue = model->BSIM4pk1; return(OK); case BSIM4_MOD_PKT1: value->rValue = model->BSIM4pkt1; return(OK); case BSIM4_MOD_PKT1L: value->rValue = model->BSIM4pkt1l; return(OK); case BSIM4_MOD_PKT2 : value->rValue = model->BSIM4pkt2; return(OK); case BSIM4_MOD_PK2 : value->rValue = model->BSIM4pk2; return(OK); case BSIM4_MOD_PK3: value->rValue = model->BSIM4pk3; return(OK); case BSIM4_MOD_PK3B: value->rValue = model->BSIM4pk3b; return(OK); case BSIM4_MOD_PW0: value->rValue = model->BSIM4pw0; return(OK); case BSIM4_MOD_PLPE0: value->rValue = model->BSIM4plpe0; return(OK); case BSIM4_MOD_PLPEB: value->rValue = model->BSIM4plpeb; return(OK); case BSIM4_MOD_PDVTP0: value->rValue = model->BSIM4pdvtp0; return(OK); case BSIM4_MOD_PDVTP1: value->rValue = model->BSIM4pdvtp1; return(OK); case BSIM4_MOD_PDVTP2: value->rValue = model->BSIM4pdvtp2; /* New DIBL/Rout */ return(OK); case BSIM4_MOD_PDVTP3: value->rValue = model->BSIM4pdvtp3; return(OK); case BSIM4_MOD_PDVTP4: value->rValue = model->BSIM4pdvtp4; return(OK); case BSIM4_MOD_PDVTP5: value->rValue = model->BSIM4pdvtp5; return(OK); case BSIM4_MOD_PDVT0 : value->rValue = model->BSIM4pdvt0; return(OK); case BSIM4_MOD_PDVT1 : value->rValue = model->BSIM4pdvt1; return(OK); case BSIM4_MOD_PDVT2 : value->rValue = model->BSIM4pdvt2; return(OK); case BSIM4_MOD_PDVT0W : value->rValue = model->BSIM4pdvt0w; return(OK); case BSIM4_MOD_PDVT1W : value->rValue = model->BSIM4pdvt1w; return(OK); case BSIM4_MOD_PDVT2W : value->rValue = model->BSIM4pdvt2w; return(OK); case BSIM4_MOD_PDROUT : value->rValue = model->BSIM4pdrout; return(OK); case BSIM4_MOD_PDSUB : value->rValue = model->BSIM4pdsub; return(OK); case BSIM4_MOD_PVTH0: value->rValue = model->BSIM4pvth0; return(OK); case BSIM4_MOD_PUA: value->rValue = model->BSIM4pua; return(OK); case BSIM4_MOD_PUA1: value->rValue = model->BSIM4pua1; return(OK); case BSIM4_MOD_PUB: value->rValue = model->BSIM4pub; return(OK); case BSIM4_MOD_PUB1: value->rValue = model->BSIM4pub1; return(OK); case BSIM4_MOD_PUC: value->rValue = model->BSIM4puc; return(OK); case BSIM4_MOD_PUC1: value->rValue = model->BSIM4puc1; return(OK); case BSIM4_MOD_PUD: value->rValue = model->BSIM4pud; return(OK); case BSIM4_MOD_PUD1: value->rValue = model->BSIM4pud1; return(OK); case BSIM4_MOD_PUP: value->rValue = model->BSIM4pup; return(OK); case BSIM4_MOD_PLP: value->rValue = model->BSIM4plp; return(OK); case BSIM4_MOD_PU0: value->rValue = model->BSIM4pu0; return(OK); case BSIM4_MOD_PUTE: value->rValue = model->BSIM4pute; return(OK); case BSIM4_MOD_PUCSTE: value->rValue = model->BSIM4pucste; return(OK); case BSIM4_MOD_PVOFF: value->rValue = model->BSIM4pvoff; return(OK); case BSIM4_MOD_PTVOFF: value->rValue = model->BSIM4ptvoff; return(OK); case BSIM4_MOD_PTNFACTOR: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4ptnfactor; return(OK); case BSIM4_MOD_PTETA0: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4pteta0; return(OK); case BSIM4_MOD_PTVOFFCV: /* v4.7 temp dep of leakage current */ value->rValue = model->BSIM4ptvoffcv; return(OK); case BSIM4_MOD_PMINV: value->rValue = model->BSIM4pminv; return(OK); case BSIM4_MOD_PMINVCV: value->rValue = model->BSIM4pminvcv; return(OK); case BSIM4_MOD_PFPROUT: value->rValue = model->BSIM4pfprout; return(OK); case BSIM4_MOD_PPDITS: value->rValue = model->BSIM4ppdits; return(OK); case BSIM4_MOD_PPDITSD: value->rValue = model->BSIM4ppditsd; return(OK); case BSIM4_MOD_PDELTA: value->rValue = model->BSIM4pdelta; return(OK); case BSIM4_MOD_PRDSW: value->rValue = model->BSIM4prdsw; return(OK); case BSIM4_MOD_PRDW: value->rValue = model->BSIM4prdw; return(OK); case BSIM4_MOD_PRSW: value->rValue = model->BSIM4prsw; return(OK); case BSIM4_MOD_PPRWB: value->rValue = model->BSIM4pprwb; return(OK); case BSIM4_MOD_PPRWG: value->rValue = model->BSIM4pprwg; return(OK); case BSIM4_MOD_PPRT: value->rValue = model->BSIM4pprt; return(OK); case BSIM4_MOD_PETA0: value->rValue = model->BSIM4peta0; return(OK); case BSIM4_MOD_PETAB: value->rValue = model->BSIM4petab; return(OK); case BSIM4_MOD_PPCLM: value->rValue = model->BSIM4ppclm; return(OK); case BSIM4_MOD_PPDIBL1: value->rValue = model->BSIM4ppdibl1; return(OK); case BSIM4_MOD_PPDIBL2: value->rValue = model->BSIM4ppdibl2; return(OK); case BSIM4_MOD_PPDIBLB: value->rValue = model->BSIM4ppdiblb; return(OK); case BSIM4_MOD_PPSCBE1: value->rValue = model->BSIM4ppscbe1; return(OK); case BSIM4_MOD_PPSCBE2: value->rValue = model->BSIM4ppscbe2; return(OK); case BSIM4_MOD_PPVAG: value->rValue = model->BSIM4ppvag; return(OK); case BSIM4_MOD_PWR: value->rValue = model->BSIM4pwr; return(OK); case BSIM4_MOD_PDWG: value->rValue = model->BSIM4pdwg; return(OK); case BSIM4_MOD_PDWB: value->rValue = model->BSIM4pdwb; return(OK); case BSIM4_MOD_PB0: value->rValue = model->BSIM4pb0; return(OK); case BSIM4_MOD_PB1: value->rValue = model->BSIM4pb1; return(OK); case BSIM4_MOD_PALPHA0: value->rValue = model->BSIM4palpha0; return(OK); case BSIM4_MOD_PALPHA1: value->rValue = model->BSIM4palpha1; return(OK); case BSIM4_MOD_PBETA0: value->rValue = model->BSIM4pbeta0; return(OK); case BSIM4_MOD_PAGIDL: value->rValue = model->BSIM4pagidl; return(OK); case BSIM4_MOD_PBGIDL: value->rValue = model->BSIM4pbgidl; return(OK); case BSIM4_MOD_PCGIDL: value->rValue = model->BSIM4pcgidl; return(OK); case BSIM4_MOD_PEGIDL: value->rValue = model->BSIM4pegidl; return(OK); case BSIM4_MOD_PFGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4pfgidl; return(OK); case BSIM4_MOD_PKGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4pkgidl; return(OK); case BSIM4_MOD_PRGIDL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4prgidl; return(OK); case BSIM4_MOD_PAGISL: value->rValue = model->BSIM4pagisl; return(OK); case BSIM4_MOD_PBGISL: value->rValue = model->BSIM4pbgisl; return(OK); case BSIM4_MOD_PCGISL: value->rValue = model->BSIM4pcgisl; return(OK); case BSIM4_MOD_PEGISL: value->rValue = model->BSIM4pegisl; return(OK); case BSIM4_MOD_PFGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4pfgisl; return(OK); case BSIM4_MOD_PKGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4pkgisl; return(OK); case BSIM4_MOD_PRGISL: /* v4.7 New GIDL/GISL*/ value->rValue = model->BSIM4prgisl; return(OK); case BSIM4_MOD_PAIGC: value->rValue = model->BSIM4paigc; return(OK); case BSIM4_MOD_PBIGC: value->rValue = model->BSIM4pbigc; return(OK); case BSIM4_MOD_PCIGC: value->rValue = model->BSIM4pcigc; return(OK); case BSIM4_MOD_PAIGSD: value->rValue = model->BSIM4paigsd; return(OK); case BSIM4_MOD_PBIGSD: value->rValue = model->BSIM4pbigsd; return(OK); case BSIM4_MOD_PCIGSD: value->rValue = model->BSIM4pcigsd; return(OK); case BSIM4_MOD_PAIGS: value->rValue = model->BSIM4paigs; return(OK); case BSIM4_MOD_PBIGS: value->rValue = model->BSIM4pbigs; return(OK); case BSIM4_MOD_PCIGS: value->rValue = model->BSIM4pcigs; return(OK); case BSIM4_MOD_PAIGD: value->rValue = model->BSIM4paigd; return(OK); case BSIM4_MOD_PBIGD: value->rValue = model->BSIM4pbigd; return(OK); case BSIM4_MOD_PCIGD: value->rValue = model->BSIM4pcigd; return(OK); case BSIM4_MOD_PAIGBACC: value->rValue = model->BSIM4paigbacc; return(OK); case BSIM4_MOD_PBIGBACC: value->rValue = model->BSIM4pbigbacc; return(OK); case BSIM4_MOD_PCIGBACC: value->rValue = model->BSIM4pcigbacc; return(OK); case BSIM4_MOD_PAIGBINV: value->rValue = model->BSIM4paigbinv; return(OK); case BSIM4_MOD_PBIGBINV: value->rValue = model->BSIM4pbigbinv; return(OK); case BSIM4_MOD_PCIGBINV: value->rValue = model->BSIM4pcigbinv; return(OK); case BSIM4_MOD_PNIGC: value->rValue = model->BSIM4pnigc; return(OK); case BSIM4_MOD_PNIGBACC: value->rValue = model->BSIM4pnigbacc; return(OK); case BSIM4_MOD_PNIGBINV: value->rValue = model->BSIM4pnigbinv; return(OK); case BSIM4_MOD_PNTOX: value->rValue = model->BSIM4pntox; return(OK); case BSIM4_MOD_PEIGBINV: value->rValue = model->BSIM4peigbinv; return(OK); case BSIM4_MOD_PPIGCD: value->rValue = model->BSIM4ppigcd; return(OK); case BSIM4_MOD_PPOXEDGE: value->rValue = model->BSIM4ppoxedge; return(OK); case BSIM4_MOD_PPHIN: value->rValue = model->BSIM4pphin; return(OK); case BSIM4_MOD_PXRCRG1: value->rValue = model->BSIM4pxrcrg1; return(OK); case BSIM4_MOD_PXRCRG2: value->rValue = model->BSIM4pxrcrg2; return(OK); case BSIM4_MOD_PEU: value->rValue = model->BSIM4peu; return(OK); case BSIM4_MOD_PUCS: value->rValue = model->BSIM4pucs; return(OK); case BSIM4_MOD_PVFB: value->rValue = model->BSIM4pvfb; return(OK); case BSIM4_MOD_PCGSL: value->rValue = model->BSIM4pcgsl; return(OK); case BSIM4_MOD_PCGDL: value->rValue = model->BSIM4pcgdl; return(OK); case BSIM4_MOD_PCKAPPAS: value->rValue = model->BSIM4pckappas; return(OK); case BSIM4_MOD_PCKAPPAD: value->rValue = model->BSIM4pckappad; return(OK); case BSIM4_MOD_PCF: value->rValue = model->BSIM4pcf; return(OK); case BSIM4_MOD_PCLC: value->rValue = model->BSIM4pclc; return(OK); case BSIM4_MOD_PCLE: value->rValue = model->BSIM4pcle; return(OK); case BSIM4_MOD_PVFBCV: value->rValue = model->BSIM4pvfbcv; return(OK); case BSIM4_MOD_PACDE: value->rValue = model->BSIM4pacde; return(OK); case BSIM4_MOD_PMOIN: value->rValue = model->BSIM4pmoin; return(OK); case BSIM4_MOD_PNOFF: value->rValue = model->BSIM4pnoff; return(OK); case BSIM4_MOD_PVOFFCV: value->rValue = model->BSIM4pvoffcv; return(OK); case BSIM4_MOD_PVFBSDOFF: value->rValue = model->BSIM4pvfbsdoff; return(OK); case BSIM4_MOD_PTVFBSDOFF: value->rValue = model->BSIM4ptvfbsdoff; return(OK); case BSIM4_MOD_PLAMBDA: value->rValue = model->BSIM4plambda; return(OK); case BSIM4_MOD_PVTL: value->rValue = model->BSIM4pvtl; return(OK); case BSIM4_MOD_PXN: value->rValue = model->BSIM4pxn; return(OK); case BSIM4_MOD_TNOM : value->rValue = model->BSIM4tnom; return(OK); case BSIM4_MOD_CGSO: value->rValue = model->BSIM4cgso; return(OK); case BSIM4_MOD_CGDO: value->rValue = model->BSIM4cgdo; return(OK); case BSIM4_MOD_CGBO: value->rValue = model->BSIM4cgbo; return(OK); case BSIM4_MOD_XPART: value->rValue = model->BSIM4xpart; return(OK); case BSIM4_MOD_RSH: value->rValue = model->BSIM4sheetResistance; return(OK); case BSIM4_MOD_JSS: value->rValue = model->BSIM4SjctSatCurDensity; return(OK); case BSIM4_MOD_JSWS: value->rValue = model->BSIM4SjctSidewallSatCurDensity; return(OK); case BSIM4_MOD_JSWGS: value->rValue = model->BSIM4SjctGateSidewallSatCurDensity; return(OK); case BSIM4_MOD_PBS: value->rValue = model->BSIM4SbulkJctPotential; return(OK); case BSIM4_MOD_MJS: value->rValue = model->BSIM4SbulkJctBotGradingCoeff; return(OK); case BSIM4_MOD_PBSWS: value->rValue = model->BSIM4SsidewallJctPotential; return(OK); case BSIM4_MOD_MJSWS: value->rValue = model->BSIM4SbulkJctSideGradingCoeff; return(OK); case BSIM4_MOD_CJS: value->rValue = model->BSIM4SunitAreaJctCap; return(OK); case BSIM4_MOD_CJSWS: value->rValue = model->BSIM4SunitLengthSidewallJctCap; return(OK); case BSIM4_MOD_PBSWGS: value->rValue = model->BSIM4SGatesidewallJctPotential; return(OK); case BSIM4_MOD_MJSWGS: value->rValue = model->BSIM4SbulkJctGateSideGradingCoeff; return(OK); case BSIM4_MOD_CJSWGS: value->rValue = model->BSIM4SunitLengthGateSidewallJctCap; return(OK); case BSIM4_MOD_NJS: value->rValue = model->BSIM4SjctEmissionCoeff; return(OK); case BSIM4_MOD_XTIS: value->rValue = model->BSIM4SjctTempExponent; return(OK); case BSIM4_MOD_JSD: value->rValue = model->BSIM4DjctSatCurDensity; return(OK); case BSIM4_MOD_JSWD: value->rValue = model->BSIM4DjctSidewallSatCurDensity; return(OK); case BSIM4_MOD_JSWGD: value->rValue = model->BSIM4DjctGateSidewallSatCurDensity; return(OK); case BSIM4_MOD_PBD: value->rValue = model->BSIM4DbulkJctPotential; return(OK); case BSIM4_MOD_MJD: value->rValue = model->BSIM4DbulkJctBotGradingCoeff; return(OK); case BSIM4_MOD_PBSWD: value->rValue = model->BSIM4DsidewallJctPotential; return(OK); case BSIM4_MOD_MJSWD: value->rValue = model->BSIM4DbulkJctSideGradingCoeff; return(OK); case BSIM4_MOD_CJD: value->rValue = model->BSIM4DunitAreaJctCap; return(OK); case BSIM4_MOD_CJSWD: value->rValue = model->BSIM4DunitLengthSidewallJctCap; return(OK); case BSIM4_MOD_PBSWGD: value->rValue = model->BSIM4DGatesidewallJctPotential; return(OK); case BSIM4_MOD_MJSWGD: value->rValue = model->BSIM4DbulkJctGateSideGradingCoeff; return(OK); case BSIM4_MOD_CJSWGD: value->rValue = model->BSIM4DunitLengthGateSidewallJctCap; return(OK); case BSIM4_MOD_NJD: value->rValue = model->BSIM4DjctEmissionCoeff; return(OK); case BSIM4_MOD_XTID: value->rValue = model->BSIM4DjctTempExponent; return(OK); case BSIM4_MOD_LINTNOI: value->rValue = model->BSIM4lintnoi; return(OK); case BSIM4_MOD_LINT: value->rValue = model->BSIM4Lint; return(OK); case BSIM4_MOD_LL: value->rValue = model->BSIM4Ll; return(OK); case BSIM4_MOD_LLC: value->rValue = model->BSIM4Llc; return(OK); case BSIM4_MOD_LLN: value->rValue = model->BSIM4Lln; return(OK); case BSIM4_MOD_LW: value->rValue = model->BSIM4Lw; return(OK); case BSIM4_MOD_LWC: value->rValue = model->BSIM4Lwc; return(OK); case BSIM4_MOD_LWN: value->rValue = model->BSIM4Lwn; return(OK); case BSIM4_MOD_LWL: value->rValue = model->BSIM4Lwl; return(OK); case BSIM4_MOD_LWLC: value->rValue = model->BSIM4Lwlc; return(OK); case BSIM4_MOD_LMIN: value->rValue = model->BSIM4Lmin; return(OK); case BSIM4_MOD_LMAX: value->rValue = model->BSIM4Lmax; return(OK); case BSIM4_MOD_WINT: value->rValue = model->BSIM4Wint; return(OK); case BSIM4_MOD_WL: value->rValue = model->BSIM4Wl; return(OK); case BSIM4_MOD_WLC: value->rValue = model->BSIM4Wlc; return(OK); case BSIM4_MOD_WLN: value->rValue = model->BSIM4Wln; return(OK); case BSIM4_MOD_WW: value->rValue = model->BSIM4Ww; return(OK); case BSIM4_MOD_WWC: value->rValue = model->BSIM4Wwc; return(OK); case BSIM4_MOD_WWN: value->rValue = model->BSIM4Wwn; return(OK); case BSIM4_MOD_WWL: value->rValue = model->BSIM4Wwl; return(OK); case BSIM4_MOD_WWLC: value->rValue = model->BSIM4Wwlc; return(OK); case BSIM4_MOD_WMIN: value->rValue = model->BSIM4Wmin; return(OK); case BSIM4_MOD_WMAX: value->rValue = model->BSIM4Wmax; return(OK); /* stress effect */ case BSIM4_MOD_SAREF: value->rValue = model->BSIM4saref; return(OK); case BSIM4_MOD_SBREF: value->rValue = model->BSIM4sbref; return(OK); case BSIM4_MOD_WLOD: value->rValue = model->BSIM4wlod; return(OK); case BSIM4_MOD_KU0: value->rValue = model->BSIM4ku0; return(OK); case BSIM4_MOD_KVSAT: value->rValue = model->BSIM4kvsat; return(OK); case BSIM4_MOD_KVTH0: value->rValue = model->BSIM4kvth0; return(OK); case BSIM4_MOD_TKU0: value->rValue = model->BSIM4tku0; return(OK); case BSIM4_MOD_LLODKU0: value->rValue = model->BSIM4llodku0; return(OK); case BSIM4_MOD_WLODKU0: value->rValue = model->BSIM4wlodku0; return(OK); case BSIM4_MOD_LLODVTH: value->rValue = model->BSIM4llodvth; return(OK); case BSIM4_MOD_WLODVTH: value->rValue = model->BSIM4wlodvth; return(OK); case BSIM4_MOD_LKU0: value->rValue = model->BSIM4lku0; return(OK); case BSIM4_MOD_WKU0: value->rValue = model->BSIM4wku0; return(OK); case BSIM4_MOD_PKU0: value->rValue = model->BSIM4pku0; return(OK); case BSIM4_MOD_LKVTH0: value->rValue = model->BSIM4lkvth0; return(OK); case BSIM4_MOD_WKVTH0: value->rValue = model->BSIM4wkvth0; return(OK); case BSIM4_MOD_PKVTH0: value->rValue = model->BSIM4pkvth0; return(OK); case BSIM4_MOD_STK2: value->rValue = model->BSIM4stk2; return(OK); case BSIM4_MOD_LODK2: value->rValue = model->BSIM4lodk2; return(OK); case BSIM4_MOD_STETA0: value->rValue = model->BSIM4steta0; return(OK); case BSIM4_MOD_LODETA0: value->rValue = model->BSIM4lodeta0; return(OK); /* Well Proximity Effect */ case BSIM4_MOD_WEB: value->rValue = model->BSIM4web; return(OK); case BSIM4_MOD_WEC: value->rValue = model->BSIM4wec; return(OK); case BSIM4_MOD_KVTH0WE: value->rValue = model->BSIM4kvth0we; return(OK); case BSIM4_MOD_K2WE: value->rValue = model->BSIM4k2we; return(OK); case BSIM4_MOD_KU0WE: value->rValue = model->BSIM4ku0we; return(OK); case BSIM4_MOD_SCREF: value->rValue = model->BSIM4scref; return(OK); case BSIM4_MOD_WPEMOD: value->rValue = model->BSIM4wpemod; return(OK); case BSIM4_MOD_LKVTH0WE: value->rValue = model->BSIM4lkvth0we; return(OK); case BSIM4_MOD_LK2WE: value->rValue = model->BSIM4lk2we; return(OK); case BSIM4_MOD_LKU0WE: value->rValue = model->BSIM4lku0we; return(OK); case BSIM4_MOD_WKVTH0WE: value->rValue = model->BSIM4wkvth0we; return(OK); case BSIM4_MOD_WK2WE: value->rValue = model->BSIM4wk2we; return(OK); case BSIM4_MOD_WKU0WE: value->rValue = model->BSIM4wku0we; return(OK); case BSIM4_MOD_PKVTH0WE: value->rValue = model->BSIM4pkvth0we; return(OK); case BSIM4_MOD_PK2WE: value->rValue = model->BSIM4pk2we; return(OK); case BSIM4_MOD_PKU0WE: value->rValue = model->BSIM4pku0we; return(OK); case BSIM4_MOD_NOIA: value->rValue = model->BSIM4oxideTrapDensityA; return(OK); case BSIM4_MOD_NOIB: value->rValue = model->BSIM4oxideTrapDensityB; return(OK); case BSIM4_MOD_NOIC: value->rValue = model->BSIM4oxideTrapDensityC; return(OK); case BSIM4_MOD_EM: value->rValue = model->BSIM4em; return(OK); case BSIM4_MOD_EF: value->rValue = model->BSIM4ef; return(OK); case BSIM4_MOD_AF: value->rValue = model->BSIM4af; return(OK); case BSIM4_MOD_KF: value->rValue = model->BSIM4kf; return(OK); case BSIM4_MOD_VGS_MAX: value->rValue = model->BSIM4vgsMax; return(OK); case BSIM4_MOD_VGD_MAX: value->rValue = model->BSIM4vgdMax; return(OK); case BSIM4_MOD_VGB_MAX: value->rValue = model->BSIM4vgbMax; return(OK); case BSIM4_MOD_VDS_MAX: value->rValue = model->BSIM4vdsMax; return(OK); case BSIM4_MOD_VBS_MAX: value->rValue = model->BSIM4vbsMax; return(OK); case BSIM4_MOD_VBD_MAX: value->rValue = model->BSIM4vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4/b4soachk.c0000644000265600020320000000720412264261473021117 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int BSIM4soaCheck(CKTcircuit *ckt, GENmodel *inModel) { BSIM4model *model = (BSIM4model *) inModel; BSIM4instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here; here = here->BSIM4nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->BSIM4gNodePrime] - ckt->CKTrhsOld [here->BSIM4sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->BSIM4gNodePrime] - ckt->CKTrhsOld [here->BSIM4dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->BSIM4gNodePrime] - ckt->CKTrhsOld [here->BSIM4bNodePrime]); vds = fabs(ckt->CKTrhsOld [here->BSIM4dNodePrime] - ckt->CKTrhsOld [here->BSIM4sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->BSIM4bNodePrime] - ckt->CKTrhsOld [here->BSIM4sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->BSIM4bNodePrime] - ckt->CKTrhsOld [here->BSIM4dNodePrime]); if (vgs > model->BSIM4vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->BSIM4vgsMax); warns_vgs++; } if (vgd > model->BSIM4vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->BSIM4vgdMax); warns_vgd++; } if (vgb > model->BSIM4vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->BSIM4vgbMax); warns_vgb++; } if (vds > model->BSIM4vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->BSIM4vdsMax); warns_vds++; } if (vbs > model->BSIM4vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->BSIM4vbsMax); warns_vbs++; } if (vbd > model->BSIM4vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->BSIM4vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/bsim4/bsim4init.h0000644000265600020320000000040212264261473021321 0ustar andreasadmin#ifndef _BSIM4INIT_H #define _BSIM4INIT_H extern IFparm BSIM4pTable[ ]; extern IFparm BSIM4mPTable[ ]; extern char *BSIM4names[ ]; extern int BSIM4pTSize; extern int BSIM4mPTSize; extern int BSIM4nSize; extern int BSIM4iSize; extern int BSIM4mSize; #endif ngspice-26/src/spicelib/devices/bsim4/ChangeLog0000644000265600020320000000104512264261473021024 0ustar andreasadmin2001-11-26 Paolo Nenzi * *.c *.h: Code cleanups and made Manu import conformant to ngspice interface. Readded code for multiprocessors. 2001-11-25 Emmanuel Rouat * *.c *.h: Updated to version BSIM4.2.1 2000-04-04 Paolo Nenzi * *.c, *.h: Initial bsim4 support. Modified all files to conform to ngspice headers and added paraller architecture support (please do not use this, it is not supported, it is included for developers only). ngspice-26/src/spicelib/devices/bsim4/b4cvtest.c0000644000265600020320000002210212264261473021151 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4cvtest.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4convTest( GENmodel *inModel, CKTcircuit *ckt) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; double delvbd, delvbs, delvds, delvgd, delvgs; double delvdbd, delvsbs; double delvbd_jct, delvbs_jct; double vds, vgs, vgd, vgdo, vbs, vbd; double vdbd, vdbs, vsbs; double cbhat, cdhat, Idtot, Ibtot; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double tol0, tol1, tol2, tol3, tol4, tol5, tol6; for (; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here != NULL ; here=here->BSIM4nextInstance) { vds = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vgs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vdbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dbNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vsbs = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4sbNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vses = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4sNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vdes = model->BSIM4type * (*(ckt->CKTrhsOld + here->BSIM4dNode) - *(ckt->CKTrhsOld + here->BSIM4sNodePrime)); vgdo = *(ckt->CKTstate0 + here->BSIM4vgs) - *(ckt->CKTstate0 + here->BSIM4vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4vdbd); delvgd = vgd - vgdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4vgs); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4vbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4vdes) - *(ckt->CKTstate0 + here->BSIM4vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4rbodyMod) ? delvbs : delvsbs; if (here->BSIM4mode >= 0) { Idtot = here->BSIM4cd + here->BSIM4csub - here->BSIM4cbd + here->BSIM4Igidl; cdhat = Idtot - here->BSIM4gbd * delvbd_jct + (here->BSIM4gmbs + here->BSIM4gbbs + here->BSIM4ggidlb) * delvbs + (here->BSIM4gm + here->BSIM4gbgs + here->BSIM4ggidlg) * delvgs + (here->BSIM4gds + here->BSIM4gbds + here->BSIM4ggidld) * delvds; Igstot = here->BSIM4Igs + here->BSIM4Igcs; cgshat = Igstot + (here->BSIM4gIgsg + here->BSIM4gIgcsg) * delvgs + here->BSIM4gIgcsd * delvds + here->BSIM4gIgcsb * delvbs; Igdtot = here->BSIM4Igd + here->BSIM4Igcd; cgdhat = Igdtot + here->BSIM4gIgdg * delvgd + here->BSIM4gIgcdg * delvgs + here->BSIM4gIgcdd * delvds + here->BSIM4gIgcdb * delvbs; Igbtot = here->BSIM4Igb; cgbhat = here->BSIM4Igb + here->BSIM4gIgbg * delvgs + here->BSIM4gIgbd * delvds + here->BSIM4gIgbb * delvbs; } else { Idtot = here->BSIM4cd + here->BSIM4cbd - here->BSIM4Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4gbd * delvbd_jct + here->BSIM4gmbs * delvbd + here->BSIM4gm * delvgd - (here->BSIM4gds + here->BSIM4ggidls) * delvds - here->BSIM4ggidlg * delvgs - here->BSIM4ggidlb * delvbs; Igstot = here->BSIM4Igs + here->BSIM4Igcd; cgshat = Igstot + here->BSIM4gIgsg * delvgs + here->BSIM4gIgcdg * delvgd - here->BSIM4gIgcdd * delvds + here->BSIM4gIgcdb * delvbd; Igdtot = here->BSIM4Igd + here->BSIM4Igcs; cgdhat = Igdtot + (here->BSIM4gIgdg + here->BSIM4gIgcsg) * delvgd - here->BSIM4gIgcsd * delvds + here->BSIM4gIgcsb * delvbd; Igbtot = here->BSIM4Igb; cgbhat = here->BSIM4Igb + here->BSIM4gIgbg * delvgd - here->BSIM4gIgbd * delvds + here->BSIM4gIgbb * delvbd; } Isestot = here->BSIM4gstot * (*(ckt->CKTstate0 + here->BSIM4vses)); cseshat = Isestot + here->BSIM4gstot * delvses + here->BSIM4gstotd * delvds + here->BSIM4gstotg * delvgs + here->BSIM4gstotb * delvbs; Idedtot = here->BSIM4gdtot * vdedo; cdedhat = Idedtot + here->BSIM4gdtot * delvded + here->BSIM4gdtotd * delvds + here->BSIM4gdtotg * delvgs + here->BSIM4gdtotb * delvbs; /* * Check convergence */ if ((here->BSIM4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; return(OK); } if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; return(OK); } Ibtot = here->BSIM4cbs + here->BSIM4cbd - here->BSIM4Igidl - here->BSIM4Igisl - here->BSIM4csub; if (here->BSIM4mode >= 0) { cbhat = Ibtot + here->BSIM4gbd * delvbd_jct + here->BSIM4gbs * delvbs_jct - (here->BSIM4gbbs + here->BSIM4ggidlb) * delvbs - (here->BSIM4gbgs + here->BSIM4ggidlg) * delvgs - (here->BSIM4gbds + here->BSIM4ggidld) * delvds - here->BSIM4ggislg * delvgd - here->BSIM4ggislb* delvbd + here->BSIM4ggisls * delvds ; } else { cbhat = Ibtot + here->BSIM4gbs * delvbs_jct + here->BSIM4gbd * delvbd_jct - (here->BSIM4gbbs + here->BSIM4ggislb) * delvbd - (here->BSIM4gbgs + here->BSIM4ggislg) * delvgd + (here->BSIM4gbds + here->BSIM4ggisld - here->BSIM4ggidls) * delvds - here->BSIM4ggidlg * delvgs - here->BSIM4ggidlb * delvbs; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4mdel.c0000644000265600020320000000245412264261473020572 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mdel.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM4model **model = (BSIM4model**)inModel; BSIM4model *modfast = (BSIM4model*)kill; BSIM4instance *here; BSIM4instance *prev = NULL; BSIM4model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM4nextModel)) { if ((*model)->BSIM4modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM4nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM4instances; here; here = here->BSIM4nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim4/Makefile.am0000644000265600020320000000110012264261473021276 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim4.la libbsim4_la_SOURCES = \ b4.c \ b4acld.c \ b4ask.c \ b4check.c \ b4cvtest.c \ b4del.c \ b4dest.c \ b4geo.c \ b4getic.c \ b4ld.c \ b4mask.c \ b4mdel.c \ b4mpar.c \ b4noi.c \ b4par.c \ b4pzld.c \ b4set.c \ b4soachk.c \ b4temp.c \ b4trunc.c \ bsim4def.h \ bsim4ext.h \ bsim4init.c \ bsim4init.h \ bsim4itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim4/b4check.c0000644000265600020320000011760512264261473020733 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4check.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008 . * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int BSIM4checkModel( BSIM4model *model, BSIM4instance *here, CKTcircuit *ckt) { struct bsim4SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; if ((fplog = fopen("bsim4.out", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM4: Berkeley Short Channel IGFET Model-4\n"); fprintf(fplog, "Developed by Xuemei (Jane) Xi, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); fprintf(fplog, "\n"); fprintf(fplog, "++++++++++ BSIM4 PARAMETER CHECKING BELOW ++++++++++\n"); if ((strcmp(model->BSIM4version, "4.7.0")) && (strcmp(model->BSIM4version, "4.70")) && (strcmp(model->BSIM4version, "4.7"))) { fprintf(fplog, "Warning: This model is BSIM4.7.0; you specified a wrong version number.\n"); printf("Warning: This model is BSIM4.7.0; you specified a wrong version number.\n"); } fprintf(fplog, "Model = %s\n", model->BSIM4modName); if ((here->BSIM4rgateMod == 2) || (here->BSIM4rgateMod == 3)) { if ((here->BSIM4trnqsMod == 1) || (here->BSIM4acnqsMod == 1)) { fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); } } if (model->BSIM4toxe <= 0.0) { fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", model->BSIM4toxe); printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4toxe); Fatal_Flag = 1; } if (model->BSIM4toxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", model->BSIM4toxp); printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4toxp); Fatal_Flag = 1; } if (model->BSIM4eot <= 0.0) { fprintf(fplog, "Fatal: EOT = %g is not positive.\n", model->BSIM4eot); printf("Fatal: EOT = %g is not positive.\n", model->BSIM4eot); Fatal_Flag = 1; } if (model->BSIM4epsrgate < 0.0) { fprintf(fplog, "Fatal: Epsrgate = %g is not positive.\n", model->BSIM4epsrgate); printf("Fatal: Epsrgate = %g is not positive.\n", model->BSIM4epsrgate); Fatal_Flag = 1; } if (model->BSIM4epsrsub < 0.0) { fprintf(fplog, "Fatal: Epsrsub = %g is not positive.\n", model->BSIM4epsrsub); printf("Fatal: Epsrsub = %g is not positive.\n", model->BSIM4epsrsub); Fatal_Flag = 1; } if (model->BSIM4easub < 0.0) { fprintf(fplog, "Fatal: Easub = %g is not positive.\n", model->BSIM4easub); printf("Fatal: Easub = %g is not positive.\n", model->BSIM4easub); Fatal_Flag = 1; } if (model->BSIM4ni0sub <= 0.0) { fprintf(fplog, "Fatal: Ni0sub = %g is not positive.\n", model->BSIM4ni0sub); printf("Fatal: Easub = %g is not positive.\n", model->BSIM4ni0sub); Fatal_Flag = 1; } if (model->BSIM4toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM4toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4toxm); Fatal_Flag = 1; } if (model->BSIM4toxref <= 0.0) { fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", model->BSIM4toxref); printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4toxref); Fatal_Flag = 1; } if (pParam->BSIM4lpe0 < -pParam->BSIM4leff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4lpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4lpe0); Fatal_Flag = 1; } if (model->BSIM4lintnoi > pParam->BSIM4leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4lintnoi); Fatal_Flag = 1; } if (pParam->BSIM4lpeb < -pParam->BSIM4leff) { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4lpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4lpeb); Fatal_Flag = 1; } if (pParam->BSIM4ndep <= 0.0) { fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", pParam->BSIM4ndep); printf("Fatal: Ndep = %g is not positive.\n", pParam->BSIM4ndep); Fatal_Flag = 1; } if (pParam->BSIM4phi <= 0.0) { fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4phi); fprintf(fplog, " Phin = %g Ndep = %g \n", pParam->BSIM4phin, pParam->BSIM4ndep); printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4phi); printf(" Phin = %g Ndep = %g \n", pParam->BSIM4phin, pParam->BSIM4ndep); Fatal_Flag = 1; } if (pParam->BSIM4nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM4nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM4nsub); Fatal_Flag = 1; } if (pParam->BSIM4ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM4ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM4ngate); Fatal_Flag = 1; } if (pParam->BSIM4ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM4ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM4ngate); Fatal_Flag = 1; } if (pParam->BSIM4xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM4xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4xj); Fatal_Flag = 1; } if (pParam->BSIM4dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4dvt1); Fatal_Flag = 1; } if (pParam->BSIM4dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4dvt1w); Fatal_Flag = 1; } if (pParam->BSIM4w0 == -pParam->BSIM4weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM4dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4dsub); Fatal_Flag = 1; } if (pParam->BSIM4b1 == -pParam->BSIM4weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (here->BSIM4u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4u0temp); Fatal_Flag = 1; } if (pParam->BSIM4delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM4delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4delta); Fatal_Flag = 1; } if (here->BSIM4vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4vsattemp); Fatal_Flag = 1; } if (pParam->BSIM4pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4pclm); Fatal_Flag = 1; } if (pParam->BSIM4drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4drout); Fatal_Flag = 1; } if (here->BSIM4m < 1.0) { fprintf(fplog, "Fatal: Number of multiplier = %g is smaller than one.\n", here->BSIM4m); printf("Fatal: Number of multiplier = %g is smaller than one.\n", here->BSIM4m); Fatal_Flag = 1; } if (here->BSIM4nf < 1.0) { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4nf); printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4nf); Fatal_Flag = 1; } if((here->BSIM4sa > 0.0) && (here->BSIM4sb > 0.0) && ((here->BSIM4nf == 1.0) || ((here->BSIM4nf > 1.0) && (here->BSIM4sd > 0.0))) ) { if (model->BSIM4saref <= 0.0) { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4saref); printf("Fatal: SAref = %g is not positive.\n",model->BSIM4saref); Fatal_Flag = 1; } if (model->BSIM4sbref <= 0.0) { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4sbref); printf("Fatal: SBref = %g is not positive.\n",model->BSIM4sbref); Fatal_Flag = 1; } } if ((here->BSIM4l + model->BSIM4xl) <= model->BSIM4xgl) { fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); Fatal_Flag = 1; } if (here->BSIM4ngcon < 1.0) { fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); Fatal_Flag = 1; } if ((here->BSIM4ngcon != 1.0) && (here->BSIM4ngcon != 2.0)) { here->BSIM4ngcon = 1.0; fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); } if (model->BSIM4gbmin < 1.0e-20) { fprintf(fplog, "Warning: Gbmin = %g is too small.\n", model->BSIM4gbmin); printf("Warning: Gbmin = %g is too small.\n", model->BSIM4gbmin); } /* Check saturation parameters */ if (pParam->BSIM4fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->BSIM4fprout); printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4fprout); Fatal_Flag = 1; } if (pParam->BSIM4pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->BSIM4pdits); printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4pdits); Fatal_Flag = 1; } if (model->BSIM4pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->BSIM4pditsl); printf("Fatal: pditsl = %g is negative.\n", model->BSIM4pditsl); Fatal_Flag = 1; } /* Check gate current parameters */ if (model->BSIM4igbMod) { if (pParam->BSIM4nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4nigbinv); printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4nigbinv); Fatal_Flag = 1; } if (pParam->BSIM4nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4nigbacc); printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4nigbacc); Fatal_Flag = 1; } } if (model->BSIM4igcMod) { if (pParam->BSIM4nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->BSIM4nigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4nigc); Fatal_Flag = 1; } if (pParam->BSIM4poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4poxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4poxedge); Fatal_Flag = 1; } if (pParam->BSIM4pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4pigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4pigcd); Fatal_Flag = 1; } } /* Check capacitance parameters */ if (pParam->BSIM4clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4clc); Fatal_Flag = 1; } /* Check overlap capacitance parameters */ if (pParam->BSIM4ckappas < 0.02) { fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", pParam->BSIM4ckappas); printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4ckappas); pParam->BSIM4ckappas = 0.02; } if (pParam->BSIM4ckappad < 0.02) { fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", pParam->BSIM4ckappad); printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4ckappad); pParam->BSIM4ckappad = 0.02; } if (model->BSIM4vtss < 0.0) { fprintf(fplog, "Fatal: Vtss = %g is negative.\n", model->BSIM4vtss); printf("Fatal: Vtss = %g is negative.\n", model->BSIM4vtss); Fatal_Flag = 1; } if (model->BSIM4vtsd < 0.0) { fprintf(fplog, "Fatal: Vtsd = %g is negative.\n", model->BSIM4vtsd); printf("Fatal: Vtsd = %g is negative.\n", model->BSIM4vtsd); Fatal_Flag = 1; } if (model->BSIM4vtssws < 0.0) { fprintf(fplog, "Fatal: Vtssws = %g is negative.\n", model->BSIM4vtssws); printf("Fatal: Vtssws = %g is negative.\n", model->BSIM4vtssws); Fatal_Flag = 1; } if (model->BSIM4vtsswd < 0.0) { fprintf(fplog, "Fatal: Vtsswd = %g is negative.\n", model->BSIM4vtsswd); printf("Fatal: Vtsswd = %g is negative.\n", model->BSIM4vtsswd); Fatal_Flag = 1; } if (model->BSIM4vtsswgs < 0.0) { fprintf(fplog, "Fatal: Vtsswgs = %g is negative.\n", model->BSIM4vtsswgs); printf("Fatal: Vtsswgs = %g is negative.\n", model->BSIM4vtsswgs); Fatal_Flag = 1; } if (model->BSIM4vtsswgd < 0.0) { fprintf(fplog, "Fatal: Vtsswgd = %g is negative.\n", model->BSIM4vtsswgd); printf("Fatal: Vtsswgd = %g is negative.\n", model->BSIM4vtsswgd); Fatal_Flag = 1; } if (model->BSIM4paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM4leff <= 1.0e-9) { fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4leff); printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4leff); } if (pParam->BSIM4leffCV <= 1.0e-9) { fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4leffCV); printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4leffCV); } if (pParam->BSIM4weff <= 1.0e-9) { fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4weff); printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4weff); } if (pParam->BSIM4weffCV <= 1.0e-9) { fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4weffCV); printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4weffCV); } /* Check threshold voltage parameters */ if (model->BSIM4toxe < 1.0e-10) { fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4toxe); printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4toxe); } if (model->BSIM4toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4toxp); printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4toxp); } if (model->BSIM4toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4toxm); printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4toxm); } if (pParam->BSIM4ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", pParam->BSIM4ndep); printf("Warning: Ndep = %g may be too small.\n", pParam->BSIM4ndep); } else if (pParam->BSIM4ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", pParam->BSIM4ndep); printf("Warning: Ndep = %g may be too large.\n", pParam->BSIM4ndep); } if (pParam->BSIM4nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM4nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM4nsub); } else if (pParam->BSIM4nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM4nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM4nsub); } if ((pParam->BSIM4ngate > 0.0) && (pParam->BSIM4ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4ngate); } if (pParam->BSIM4dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM4dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4dvt0); } if (fabs(1.0e-8 / (pParam->BSIM4w0 + pParam->BSIM4weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->BSIM4nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM4nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4nfactor); } if (pParam->BSIM4cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM4cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4cdsc); } if (pParam->BSIM4cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM4cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4cdscd); } /* Check DIBL parameters */ if (here->BSIM4eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", here->BSIM4eta0); printf("Warning: Eta0 = %g is negative.\n", here->BSIM4eta0); } /* Check Abulk parameters */ if (fabs(1.0e-8 / (pParam->BSIM4b1 + pParam->BSIM4weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } /* Check Saturation parameters */ if (pParam->BSIM4a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4a2); pParam->BSIM4a2 = 0.01; } else if (pParam->BSIM4a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4a2); pParam->BSIM4a2 = 1.0; pParam->BSIM4a1 = 0.0; } if (pParam->BSIM4prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4prwg); pParam->BSIM4prwg = 0.0; } if (pParam->BSIM4rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4rdsw); pParam->BSIM4rdsw = 0.0; pParam->BSIM4rds0 = 0.0; } if (pParam->BSIM4rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rds0); pParam->BSIM4rds0 = 0.0; } if (pParam->BSIM4rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4rdswmin); pParam->BSIM4rdswmin = 0.0; } if (pParam->BSIM4pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4pscbe2); } if (pParam->BSIM4vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4vsattemp); } if((model->BSIM4lambdaGiven) && (pParam->BSIM4lambda > 0.0) ) { if (pParam->BSIM4lambda > 1.0e-9) { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4lambda); printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4lambda); } } if((model->BSIM4vtlGiven) && (pParam->BSIM4vtl > 0.0) ) { if (pParam->BSIM4vtl < 6.0e4) { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4vtl); printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4vtl); } if (pParam->BSIM4xn < 3.0) { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4xn); printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4xn); pParam->BSIM4xn = 3.0; } if (model->BSIM4lc < 0.0) { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4lc); printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4lc); pParam->BSIM4lc = 0.0; } } if (pParam->BSIM4pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4pdibl1); } if (pParam->BSIM4pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4pdibl2); } /* Check stress effect parameters */ if((here->BSIM4sa > 0.0) && (here->BSIM4sb > 0.0) && ((here->BSIM4nf == 1.0) || ((here->BSIM4nf > 1.0) && (here->BSIM4sd > 0.0))) ) { if (model->BSIM4lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4lodk2); } if (model->BSIM4lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4lodeta0); } } /* Check gate resistance parameters */ if (here->BSIM4rgateMod == 1) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->BSIM4rgateMod == 2) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); else if (pParam->BSIM4xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } if (here->BSIM4rgateMod == 3) { if (model->BSIM4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (pParam->BSIM4xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } /* Check capacitance parameters */ if (pParam->BSIM4noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4noff); } if (pParam->BSIM4voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4voffcv); } if (pParam->BSIM4moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4moin); } if (pParam->BSIM4moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4moin); } if(model->BSIM4capMod ==2) { if (pParam->BSIM4acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4acde); } if (pParam->BSIM4acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4acde); } } /* Check overlap capacitance parameters */ if (model->BSIM4cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4cgdo); model->BSIM4cgdo = 0.0; } if (model->BSIM4cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4cgso); model->BSIM4cgso = 0.0; } if (model->BSIM4cgbo < 0.0) { fprintf(fplog, "Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4cgbo); printf("Warning: cgbo = %g is negative. Set to zero.\n", model->BSIM4cgbo); model->BSIM4cgbo = 0.0; } /* v4.7 */ if (model->BSIM4tnoiMod == 1 || model->BSIM4tnoiMod == 2) { if (model->BSIM4tnoia < 0.0) { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4tnoia); printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4tnoia); model->BSIM4tnoia = 0.0; } if (model->BSIM4tnoib < 0.0) { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4tnoib); printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4tnoib); model->BSIM4tnoib = 0.0; } if (model->BSIM4rnoia < 0.0) { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4rnoia); printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4rnoia); model->BSIM4rnoia = 0.0; } if (model->BSIM4rnoib < 0.0) { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4rnoib); printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4rnoib); model->BSIM4rnoib = 0.0; } } /* v4.7 */ if (model->BSIM4tnoiMod == 2) { if (model->BSIM4tnoic < 0.0) { fprintf(fplog, "Warning: tnoic = %g is negative. Set to zero.\n", model->BSIM4tnoic); printf("Warning: tnoic = %g is negative. Set to zero.\n", model->BSIM4tnoic); model->BSIM4tnoic = 0.0; } if (model->BSIM4rnoic < 0.0) { fprintf(fplog, "Warning: rnoic = %g is negative. Set to zero.\n", model->BSIM4rnoic); printf("Warning: rnoic = %g is negative. Set to zero.\n", model->BSIM4rnoic); model->BSIM4rnoic = 0.0; } } /* Limits of Njs and Njd modified in BSIM4.7 */ if (model->BSIM4SjctEmissionCoeff < 0.1) { fprintf(fplog, "Warning: Njs = %g is less than 0.1. Setting Njs to 0.1.\n", model->BSIM4SjctEmissionCoeff); printf("Warning: Njs = %g is less than 0.1. Setting Njs to 0.1.\n", model->BSIM4SjctEmissionCoeff); model->BSIM4SjctEmissionCoeff = 0.1; } else if (model->BSIM4SjctEmissionCoeff < 0.7) { fprintf(fplog, "Warning: Njs = %g is less than 0.7.\n", model->BSIM4SjctEmissionCoeff); printf("Warning: Njs = %g is less than 0.7.\n", model->BSIM4SjctEmissionCoeff); } if (model->BSIM4DjctEmissionCoeff < 0.1) { fprintf(fplog, "Warning: Njd = %g is less than 0.1. Setting Njd to 0.1.\n", model->BSIM4DjctEmissionCoeff); printf("Warning: Njd = %g is less than 0.1. Setting Njd to 0.1.\n", model->BSIM4DjctEmissionCoeff); model->BSIM4DjctEmissionCoeff = 0.1; } else if (model->BSIM4DjctEmissionCoeff < 0.7) { fprintf(fplog, "Warning: Njd = %g is less than 0.7.\n", model->BSIM4DjctEmissionCoeff); printf("Warning: Njd = %g is less than 0.7.\n", model->BSIM4DjctEmissionCoeff); } if (model->BSIM4njtsstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4njtsstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4njtsstemp, ckt->CKTtemp); } if (model->BSIM4njtsswstemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4njtsswstemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4njtsswstemp, ckt->CKTtemp); } if (model->BSIM4njtsswgstemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4njtsswgstemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4njtsswgstemp, ckt->CKTtemp); } if (model->BSIM4njtsdGiven && model->BSIM4njtsdtemp < 0.0) { fprintf(fplog, "Warning: Njtsd = %g is negative at temperature = %g.\n", model->BSIM4njtsdtemp, ckt->CKTtemp); printf("Warning: Njtsd = %g is negative at temperature = %g.\n", model->BSIM4njtsdtemp, ckt->CKTtemp); } if (model->BSIM4njtsswdGiven && model->BSIM4njtsswdtemp < 0.0) { fprintf(fplog, "Warning: Njtsswd = %g is negative at temperature = %g.\n", model->BSIM4njtsswdtemp, ckt->CKTtemp); printf("Warning: Njtsswd = %g is negative at temperature = %g.\n", model->BSIM4njtsswdtemp, ckt->CKTtemp); } if (model->BSIM4njtsswgdGiven && model->BSIM4njtsswgdtemp < 0.0) { fprintf(fplog, "Warning: Njtsswgd = %g is negative at temperature = %g.\n", model->BSIM4njtsswgdtemp, ckt->CKTtemp); printf("Warning: Njtsswgd = %g is negative at temperature = %g.\n", model->BSIM4njtsswgdtemp, ckt->CKTtemp); } if (model->BSIM4ntnoi < 0.0) { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4ntnoi); printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4ntnoi); model->BSIM4ntnoi = 0.0; } /* diode model */ if (model->BSIM4SbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctBotGradingCoeff); printf("Warning: MJS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctBotGradingCoeff); model->BSIM4SbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4SbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctSideGradingCoeff); printf("Warning: MJSWS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctSideGradingCoeff); model->BSIM4SbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4SbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctGateSideGradingCoeff); printf("Warning: MJSWGS = %g is too big. Set to 0.99.\n", model->BSIM4SbulkJctGateSideGradingCoeff); model->BSIM4SbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4DbulkJctBotGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctBotGradingCoeff); printf("Warning: MJD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctBotGradingCoeff); model->BSIM4DbulkJctBotGradingCoeff = 0.99; } if (model->BSIM4DbulkJctSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctSideGradingCoeff); printf("Warning: MJSWD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctSideGradingCoeff); model->BSIM4DbulkJctSideGradingCoeff = 0.99; } if (model->BSIM4DbulkJctGateSideGradingCoeff >= 0.99) { fprintf(fplog, "Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctGateSideGradingCoeff); printf("Warning: MJSWGD = %g is too big. Set to 0.99.\n", model->BSIM4DbulkJctGateSideGradingCoeff); model->BSIM4DbulkJctGateSideGradingCoeff = 0.99; } if (model->BSIM4wpemod == 1) { if (model->BSIM4scref <= 0.0) { fprintf(fplog, "Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4scref); printf("Warning: SCREF = %g is not positive. Set to 1e-6.\n", model->BSIM4scref); model->BSIM4scref = 1e-6; } /*Move these checks to temp.c for sceff calculation*/ /* if (here->BSIM4sca < 0.0) { fprintf(fplog, "Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4sca); printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4sca); here->BSIM4sca = 0.0; } if (here->BSIM4scb < 0.0) { fprintf(fplog, "Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4scb); printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4scb); here->BSIM4scb = 0.0; } if (here->BSIM4scc < 0.0) { fprintf(fplog, "Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4scc); printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4scc); here->BSIM4scc = 0.0; } if (here->BSIM4sc < 0.0) { fprintf(fplog, "Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4sc); printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4sc); here->BSIM4sc = 0.0; } */ } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim4/Makefile.in0000644000265600020320000004346412264261536021332 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim4_la_LIBADD = am_libbsim4_la_OBJECTS = b4.lo b4acld.lo b4ask.lo b4check.lo \ b4cvtest.lo b4del.lo b4dest.lo b4geo.lo b4getic.lo b4ld.lo \ b4mask.lo b4mdel.lo b4mpar.lo b4noi.lo b4par.lo b4pzld.lo \ b4set.lo b4soachk.lo b4temp.lo b4trunc.lo bsim4init.lo libbsim4_la_OBJECTS = $(am_libbsim4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim4_la_SOURCES) DIST_SOURCES = $(libbsim4_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim4.la libbsim4_la_SOURCES = \ b4.c \ b4acld.c \ b4ask.c \ b4check.c \ b4cvtest.c \ b4del.c \ b4dest.c \ b4geo.c \ b4getic.c \ b4ld.c \ b4mask.c \ b4mdel.c \ b4mpar.c \ b4noi.c \ b4par.c \ b4pzld.c \ b4set.c \ b4soachk.c \ b4temp.c \ b4trunc.c \ bsim4def.h \ bsim4ext.h \ bsim4init.c \ bsim4init.h \ bsim4itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim4.la: $(libbsim4_la_OBJECTS) $(libbsim4_la_DEPENDENCIES) $(EXTRA_libbsim4_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim4_la_OBJECTS) $(libbsim4_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4geo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim4init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim4/b4ask.c0000644000265600020320000003205112264261473020423 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4ask.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM4instance *here = (BSIM4instance*)inst; NG_IGNORE(select); switch(which) { case BSIM4_L: value->rValue = here->BSIM4l; return(OK); case BSIM4_W: value->rValue = here->BSIM4w; return(OK); case BSIM4_M: value->rValue = here->BSIM4m; return(OK); case BSIM4_NF: value->rValue = here->BSIM4nf; return(OK); case BSIM4_MIN: value->iValue = here->BSIM4min; return(OK); case BSIM4_AS: value->rValue = here->BSIM4sourceArea; return(OK); case BSIM4_AD: value->rValue = here->BSIM4drainArea; return(OK); case BSIM4_PS: value->rValue = here->BSIM4sourcePerimeter; return(OK); case BSIM4_PD: value->rValue = here->BSIM4drainPerimeter; return(OK); case BSIM4_NRS: value->rValue = here->BSIM4sourceSquares; return(OK); case BSIM4_NRD: value->rValue = here->BSIM4drainSquares; return(OK); case BSIM4_OFF: value->rValue = here->BSIM4off; return(OK); case BSIM4_SA: value->rValue = here->BSIM4sa ; return(OK); case BSIM4_SB: value->rValue = here->BSIM4sb ; return(OK); case BSIM4_SD: value->rValue = here->BSIM4sd ; return(OK); case BSIM4_SCA: value->rValue = here->BSIM4sca ; return(OK); case BSIM4_SCB: value->rValue = here->BSIM4scb ; return(OK); case BSIM4_SCC: value->rValue = here->BSIM4scc ; return(OK); case BSIM4_SC: value->rValue = here->BSIM4sc ; return(OK); case BSIM4_RBSB: value->rValue = here->BSIM4rbsb; return(OK); case BSIM4_RBDB: value->rValue = here->BSIM4rbdb; return(OK); case BSIM4_RBPB: value->rValue = here->BSIM4rbpb; return(OK); case BSIM4_RBPS: value->rValue = here->BSIM4rbps; return(OK); case BSIM4_RBPD: value->rValue = here->BSIM4rbpd; return(OK); case BSIM4_DELVTO: value->rValue = here->BSIM4delvto; return(OK); case BSIM4_XGW: value->rValue = here->BSIM4xgw; return(OK); case BSIM4_NGCON: value->rValue = here->BSIM4ngcon; return(OK); case BSIM4_TRNQSMOD: value->iValue = here->BSIM4trnqsMod; return(OK); case BSIM4_ACNQSMOD: value->iValue = here->BSIM4acnqsMod; return(OK); case BSIM4_RBODYMOD: value->iValue = here->BSIM4rbodyMod; return(OK); case BSIM4_RGATEMOD: value->iValue = here->BSIM4rgateMod; return(OK); case BSIM4_GEOMOD: value->iValue = here->BSIM4geoMod; return(OK); case BSIM4_RGEOMOD: value->iValue = here->BSIM4rgeoMod; return(OK); case BSIM4_IC_VDS: value->rValue = here->BSIM4icVDS; return(OK); case BSIM4_IC_VGS: value->rValue = here->BSIM4icVGS; return(OK); case BSIM4_IC_VBS: value->rValue = here->BSIM4icVBS; return(OK); case BSIM4_DNODE: value->iValue = here->BSIM4dNode; return(OK); case BSIM4_GNODEEXT: value->iValue = here->BSIM4gNodeExt; return(OK); case BSIM4_SNODE: value->iValue = here->BSIM4sNode; return(OK); case BSIM4_BNODE: value->iValue = here->BSIM4bNode; return(OK); case BSIM4_DNODEPRIME: value->iValue = here->BSIM4dNodePrime; return(OK); case BSIM4_GNODEPRIME: value->iValue = here->BSIM4gNodePrime; return(OK); case BSIM4_GNODEMID: value->iValue = here->BSIM4gNodeMid; return(OK); case BSIM4_SNODEPRIME: value->iValue = here->BSIM4sNodePrime; return(OK); case BSIM4_DBNODE: value->iValue = here->BSIM4dbNode; return(OK); case BSIM4_BNODEPRIME: value->iValue = here->BSIM4bNodePrime; return(OK); case BSIM4_SBNODE: value->iValue = here->BSIM4sbNode; return(OK); case BSIM4_SOURCECONDUCT: value->rValue = here->BSIM4sourceConductance; value->rValue *= here->BSIM4m; return(OK); case BSIM4_DRAINCONDUCT: value->rValue = here->BSIM4drainConductance; value->rValue *= here->BSIM4m; return(OK); case BSIM4_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4vbd); return(OK); case BSIM4_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4vbs); return(OK); case BSIM4_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM4vgs); return(OK); case BSIM4_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM4vds); return(OK); case BSIM4_CD: value->rValue = here->BSIM4cd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBS: value->rValue = here->BSIM4cbs; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBD: value->rValue = here->BSIM4cbd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CSUB: value->rValue = here->BSIM4csub; value->rValue *= here->BSIM4m; return(OK); case BSIM4_QINV: value->rValue = here-> BSIM4qinv; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGIDL: value->rValue = here->BSIM4Igidl; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGISL: value->rValue = here->BSIM4Igisl; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGS: value->rValue = here->BSIM4Igs; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGD: value->rValue = here->BSIM4Igd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGB: value->rValue = here->BSIM4Igb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGCS: value->rValue = here->BSIM4Igcs; value->rValue *= here->BSIM4m; return(OK); case BSIM4_IGCD: value->rValue = here->BSIM4Igcd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GM: value->rValue = here->BSIM4gm; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GDS: value->rValue = here->BSIM4gds; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GMBS: value->rValue = here->BSIM4gmbs; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GBD: value->rValue = here->BSIM4gbd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GBS: value->rValue = here->BSIM4gbs; value->rValue *= here->BSIM4m; return(OK); /* case BSIM4_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM4qb); return(OK); */ case BSIM4_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM4cqb); return(OK); /* case BSIM4_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM4qg); return(OK); */ case BSIM4_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM4cqg); return(OK); /* case BSIM4_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM4qd); return(OK); */ case BSIM4_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM4cqd); return(OK); /* case BSIM4_QS: value->rValue = *(ckt->CKTstate0 + here->BSIM4qs); return(OK); */ case BSIM4_QB: value->rValue = here->BSIM4qbulk; value->rValue *= here->BSIM4m; return(OK); case BSIM4_QG: value->rValue = here->BSIM4qgate; value->rValue *= here->BSIM4m; return(OK); case BSIM4_QS: value->rValue = here->BSIM4qsrc; value->rValue *= here->BSIM4m; return(OK); case BSIM4_QD: value->rValue = here->BSIM4qdrn; value->rValue *= here->BSIM4m; return(OK); case BSIM4_QDEF: value->rValue = *(ckt->CKTstate0 + here->BSIM4qdef); return(OK); case BSIM4_GCRG: value->rValue = here->BSIM4gcrg; value->rValue *= here->BSIM4m; return(OK); case BSIM4_GTAU: value->rValue = here->BSIM4gtau; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CGGB: value->rValue = here->BSIM4cggb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CGDB: value->rValue = here->BSIM4cgdb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CGSB: value->rValue = here->BSIM4cgsb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CDGB: value->rValue = here->BSIM4cdgb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CDDB: value->rValue = here->BSIM4cddb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CDSB: value->rValue = here->BSIM4cdsb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBGB: value->rValue = here->BSIM4cbgb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBDB: value->rValue = here->BSIM4cbdb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBSB: value->rValue = here->BSIM4cbsb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CSGB: value->rValue = here->BSIM4csgb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CSDB: value->rValue = here->BSIM4csdb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CSSB: value->rValue = here->BSIM4cssb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CGBB: value->rValue = here->BSIM4cgbb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CDBB: value->rValue = here->BSIM4cdbb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CSBB: value->rValue = here->BSIM4csbb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CBBB: value->rValue = here->BSIM4cbbb; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CAPBD: value->rValue = here->BSIM4capbd; value->rValue *= here->BSIM4m; return(OK); case BSIM4_CAPBS: value->rValue = here->BSIM4capbs; value->rValue *= here->BSIM4m; return(OK); case BSIM4_VON: value->rValue = here->BSIM4von; return(OK); case BSIM4_VDSAT: value->rValue = here->BSIM4vdsat; return(OK); case BSIM4_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4qbs); return(OK); case BSIM4_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4qbd); return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4/b4.c0000644000265600020320000022334112264261473017730 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim4def.h" #include "ngspice/suffix.h" IFparm BSIM4pTable[] = { /* parameters */ IOP( "l", BSIM4_L, IF_REAL , "Length"), IOP( "w", BSIM4_W, IF_REAL , "Width"), IOP( "m", BSIM4_M, IF_REAL , "Separate Parallel multiplier"), IOP( "nf", BSIM4_NF, IF_REAL , "Number of fingers"), IOP( "sa", BSIM4_SA, IF_REAL , "distance between OD edge to poly of one side "), IOP( "sb", BSIM4_SB, IF_REAL , "distance between OD edge to poly of the other side"), IOP( "sd", BSIM4_SD, IF_REAL , "distance between neighbour fingers"), IOP( "sca", BSIM4_SCA, IF_REAL , "Integral of the first distribution function for scattered well dopant"), IOP( "scb", BSIM4_SCB, IF_REAL , "Integral of the second distribution function for scattered well dopant"), IOP( "scc", BSIM4_SCC, IF_REAL , "Integral of the third distribution function for scattered well dopant"), IOP( "sc", BSIM4_SC, IF_REAL , "Distance to a single well edge "), IOP( "min", BSIM4_MIN, IF_INTEGER , "Minimize either D or S"), IOP( "ad", BSIM4_AD, IF_REAL , "Drain area"), IOP( "as", BSIM4_AS, IF_REAL , "Source area"), IOP( "pd", BSIM4_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM4_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM4_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM4_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM4_OFF, IF_FLAG , "Device is initially off"), IOP( "rbdb", BSIM4_RBDB, IF_REAL , "Body resistance"), IOP( "rbsb", BSIM4_RBSB, IF_REAL , "Body resistance"), IOP( "rbpb", BSIM4_RBPB, IF_REAL , "Body resistance"), IOP( "rbps", BSIM4_RBPS, IF_REAL , "Body resistance"), IOP( "rbpd", BSIM4_RBPD, IF_REAL , "Body resistance"), IOP( "delvto", BSIM4_DELVTO, IF_REAL , "Zero bias threshold voltage variation"), IOP( "xgw", BSIM4_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "ngcon", BSIM4_NGCON, IF_REAL, "Number of gate contacts"), IOP( "trnqsmod", BSIM4_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "rbodymod", BSIM4_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), IOP( "geomod", BSIM4_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IP( "ic", BSIM4_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM4_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM4_GM, IF_REAL, "Gm"), OP( "gds", BSIM4_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM4_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM4_VON, IF_REAL, "Vth"), OP( "id", BSIM4_CD, IF_REAL, "Ids"), OP( "ibd", BSIM4_CBD, IF_REAL, "Ibd"), OP( "ibs", BSIM4_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM4_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM4_GBS, IF_REAL, "gbs"), OP( "isub", BSIM4_CSUB, IF_REAL, "Isub"), OP( "igidl", BSIM4_IGIDL, IF_REAL, "Igidl"), OP( "igisl", BSIM4_IGISL, IF_REAL, "Igisl"), OP( "igs", BSIM4_IGS, IF_REAL, "Igs"), OP( "igd", BSIM4_IGD, IF_REAL, "Igd"), OP( "igb", BSIM4_IGB, IF_REAL, "Igb"), OP( "igcs", BSIM4_IGCS, IF_REAL, "Igcs"), OP( "igcd", BSIM4_IGCD, IF_REAL, "Igcd"), OP( "vbs", BSIM4_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM4_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM4_VDS, IF_REAL, "Vds"), OP( "cgg", BSIM4_CGGB, IF_REAL, "Cggb"), OP( "cgs", BSIM4_CGSB, IF_REAL, "Cgsb"), OP( "cgd", BSIM4_CGDB, IF_REAL, "Cgdb"), OP( "cbg", BSIM4_CBGB, IF_REAL, "Cbgb"), OP( "cbd", BSIM4_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM4_CBSB, IF_REAL, "Cbsb"), OP( "cdg", BSIM4_CDGB, IF_REAL, "Cdgb"), OP( "cdd", BSIM4_CDDB, IF_REAL, "Cddb"), OP( "cds", BSIM4_CDSB, IF_REAL, "Cdsb"), OP( "csg", BSIM4_CSGB, IF_REAL, "Csgb"), OP( "csd", BSIM4_CSDB, IF_REAL, "Csdb"), OP( "css", BSIM4_CSSB, IF_REAL, "Cssb"), OP( "cgb", BSIM4_CGBB, IF_REAL, "Cgbb"), OP( "cdb", BSIM4_CDBB, IF_REAL, "Cdbb"), OP( "csb", BSIM4_CSBB, IF_REAL, "Csbb"), OP( "cbb", BSIM4_CBBB, IF_REAL, "Cbbb"), OP( "capbd", BSIM4_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM4_CAPBS, IF_REAL, "Capbs"), OP( "qg", BSIM4_QG, IF_REAL, "Qgate"), OP( "qb", BSIM4_QB, IF_REAL, "Qbulk"), OP( "qd", BSIM4_QD, IF_REAL, "Qdrain"), OP( "qs", BSIM4_QS, IF_REAL, "Qsource"), OP( "qinv", BSIM4_QINV, IF_REAL, "Qinversion"), OP( "qdef", BSIM4_QDEF, IF_REAL, "Qdef"), OP( "gcrg", BSIM4_GCRG, IF_REAL, "Gcrg"), OP( "gtau", BSIM4_GTAU, IF_REAL, "Gtau"), }; IFparm BSIM4mPTable[] = { /* model parameters */ IOP( "cvchargemod", BSIM4_MOD_CVCHARGEMOD, IF_INTEGER, "Capacitance Charge model selector"), IOP( "capmod", BSIM4_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "diomod", BSIM4_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), IOP( "rdsmod", BSIM4_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), IOP( "trnqsmod", BSIM4_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "mobmod", BSIM4_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "rbodymod", BSIM4_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), IOP( "permod", BSIM4_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), IOP( "geomod", BSIM4_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4_MOD_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IOP( "fnoimod", BSIM4_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), IOP( "tnoimod", BSIM4_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), IOP( "mtrlmod", BSIM4_MOD_MTRLMOD, IF_INTEGER, "parameter for non-silicon substrate or metal gate selector"), IOP( "mtrlcompatmod", BSIM4_MOD_MTRLCOMPATMOD, IF_INTEGER, "New Material Mod backward compatibility selector"), IOP( "igcmod", BSIM4_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), IOP( "igbmod", BSIM4_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), IOP( "tempmod", BSIM4_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), IOP( "gidlmod", BSIM4_MOD_GIDLMOD, IF_INTEGER, "parameter for GIDL selector"), /* v4.7 New GIDL/GISL */ IOP( "paramchk", BSIM4_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM4_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM4_MOD_VERSION, IF_STRING, "parameter for model version"), IOP( "eot", BSIM4_MOD_EOT, IF_REAL, "Equivalent gate oxide thickness in meters"), IOP( "vddeot", BSIM4_MOD_VDDEOT, IF_REAL, "Voltage for extraction of Equivalent gate oxide thickness"), IOP( "tempeot", BSIM4_MOD_TEMPEOT, IF_REAL, " Temperature for extraction of EOT"), IOP( "leffeot", BSIM4_MOD_LEFFEOT, IF_REAL, " Effective length for extraction of EOT"), IOP( "weffeot", BSIM4_MOD_WEFFEOT, IF_REAL, "Effective width for extraction of EOT"), IOP( "ados", BSIM4_MOD_ADOS, IF_REAL, "Charge centroid parameter"), IOP( "bdos", BSIM4_MOD_BDOS, IF_REAL, "Charge centroid parameter"), IOP( "toxe", BSIM4_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), IOP( "toxp", BSIM4_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), IOP( "toxm", BSIM4_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), IOP( "toxref", BSIM4_MOD_TOXREF, IF_REAL, "Target tox value"), IOP( "dtox", BSIM4_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), IOP( "epsrox", BSIM4_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), IOP( "cdsc", BSIM4_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM4_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM4_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM4_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM4_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM4_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM4_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM4_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM4_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM4_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM4_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM4_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM4_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "phig", BSIM4_MOD_PHIG, IF_REAL, "Work function of gate"), IOP( "epsrgate", BSIM4_MOD_EPSRGATE, IF_REAL, "Dielectric constant of gate relative to vacuum"), IOP( "easub",BSIM4_MOD_EASUB, IF_REAL, "Electron affinity of substrate"), IOP( "epsrsub", BSIM4_MOD_EPSRSUB, IF_REAL, "Dielectric constant of substrate relative to vacuum"), IOP( "ni0sub", BSIM4_MOD_NI0SUB, IF_REAL, "Intrinsic carrier concentration of substrate at 300.15K"), IOP( "bg0sub", BSIM4_MOD_BG0SUB, IF_REAL, "Band-gap of substrate at T=0K"), IOP( "tbgasub", BSIM4_MOD_TBGASUB, IF_REAL, "First parameter of band-gap change due to temperature"), IOP( "tbgbsub", BSIM4_MOD_TBGBSUB, IF_REAL, "Second parameter of band-gap change due to temperature"), IOP( "nsub", BSIM4_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "ndep", BSIM4_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), IOP( "nsd", BSIM4_MOD_NSD, IF_REAL, "S/D doping concentration"), IOP( "phin", BSIM4_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), IOP( "ngate", BSIM4_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM4_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM4_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM4_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM4_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM4_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM4_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM4_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM4_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM4_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM4_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM4_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM4_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM4_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "dvtp0", BSIM4_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), IOP( "dvtp1", BSIM4_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), IOP( "dvtp2", BSIM4_MOD_DVTP2, IF_REAL, "3rd parameter for Vth shift due to pocket"), IOP( "dvtp3", BSIM4_MOD_DVTP3, IF_REAL, "4th parameter for Vth shift due to pocket"), IOP( "dvtp4", BSIM4_MOD_DVTP4, IF_REAL, "5th parameter for Vth shift due to pocket"), IOP( "dvtp5", BSIM4_MOD_DVTP5, IF_REAL, "6th parameter for Vth shift due to pocket"), IOP( "lpe0", BSIM4_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), IOP( "lpeb", BSIM4_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), IOP( "dvt0", BSIM4_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM4_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM4_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM4_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM4_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM4_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM4_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM4_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM4_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM4_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM4_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM4_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM4_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM4_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM4_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM4_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "ud", BSIM4_MOD_UD, IF_REAL, "Coulomb scattering factor of mobility"), IOP( "ud1", BSIM4_MOD_UD1, IF_REAL, "Temperature coefficient of ud"), IOP( "up", BSIM4_MOD_UP, IF_REAL, "Channel length linear factor of mobility"), IOP( "lp", BSIM4_MOD_LP, IF_REAL, "Channel length exponential factor of mobility"), IOP( "u0", BSIM4_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "eu", BSIM4_MOD_EU, IF_REAL, "Mobility exponent"), IOP( "ucs", BSIM4_MOD_UCS, IF_REAL, "Colombic scattering exponent"), IOP( "ute", BSIM4_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "ucste", BSIM4_MOD_UCSTE, IF_REAL,"Temperature coefficient of colombic mobility"), IOP( "voff", BSIM4_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "minv", BSIM4_MOD_MINV, IF_REAL, "Fitting parameter for moderate inversion in Vgsteff"), IOP( "minvcv", BSIM4_MOD_MINVCV, IF_REAL, "Fitting parameter for moderate inversion in Vgsteffcv"), IOP( "voffl", BSIM4_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), IOP( "voffcvl", BSIM4_MOD_VOFFCVL, IF_REAL, "Length dependence parameter for Vth offset in CV"), IOP( "tnom", BSIM4_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM4_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM4_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM4_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM4_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", BSIM4_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM4_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM4_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "rdswmin", BSIM4_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), IOP( "rsw", BSIM4_MOD_RSW, IF_REAL, "Source resistance per width"), IOP( "rdw", BSIM4_MOD_RDW, IF_REAL, "Drain resistance per width"), IOP( "rdwmin", BSIM4_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), IOP( "rswmin", BSIM4_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), IOP( "prwg", BSIM4_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM4_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM4_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM4_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM4_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM4_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM4_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM4_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM4_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "fprout", BSIM4_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), IOP( "pdits", BSIM4_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), IOP( "pditsl", BSIM4_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), IOP( "pditsd", BSIM4_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), IOP( "pscbe1", BSIM4_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM4_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM4_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "jss", BSIM4_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), IOP( "jsws", BSIM4_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), IOP( "jswgs", BSIM4_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), IOP( "pbs", BSIM4_MOD_PBS, IF_REAL, "Source junction built-in potential"), IOP( "njs", BSIM4_MOD_NJS, IF_REAL, "Source junction emission coefficient"), IOP( "xtis", BSIM4_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), IOP( "mjs", BSIM4_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), IOP( "pbsws", BSIM4_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), IOP( "mjsws", BSIM4_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), IOP( "pbswgs", BSIM4_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgs", BSIM4_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjs", BSIM4_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), IOP( "cjsws", BSIM4_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), IOP( "cjswgs", BSIM4_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), IOP( "jsd", BSIM4_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), IOP( "jswd", BSIM4_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), IOP( "jswgd", BSIM4_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), IOP( "pbd", BSIM4_MOD_PBD, IF_REAL, "Drain junction built-in potential"), IOP( "njd", BSIM4_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), IOP( "xtid", BSIM4_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), IOP( "mjd", BSIM4_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), IOP( "pbswd", BSIM4_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), IOP( "mjswd", BSIM4_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), IOP( "pbswgd", BSIM4_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgd", BSIM4_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjd", BSIM4_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), IOP( "cjswd", BSIM4_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), IOP( "cjswgd", BSIM4_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), IOP( "vfbcv", BSIM4_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM4_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "tpb", BSIM4_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM4_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM4_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM4_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM4_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM4_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM4_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM4_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM4_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM4_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "dmcg", BSIM4_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), IOP( "dmci", BSIM4_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), IOP( "dmdg", BSIM4_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), IOP( "dmcgt", BSIM4_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), IOP( "xgw", BSIM4_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "xgl", BSIM4_MOD_XGL, IF_REAL, "Variation in Ldrawn"), IOP( "rshg", BSIM4_MOD_RSHG, IF_REAL, "Gate sheet resistance"), IOP( "ngcon", BSIM4_MOD_NGCON, IF_REAL, "Number of gate contacts"), IOP( "xrcrg1", BSIM4_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), IOP( "xrcrg2", BSIM4_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), IOP( "lambda", BSIM4_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), IOP( "vtl", BSIM4_MOD_VTL, IF_REAL, " thermal velocity"), IOP( "lc", BSIM4_MOD_LC, IF_REAL, " back scattering parameter"), IOP( "xn", BSIM4_MOD_XN, IF_REAL, " back scattering parameter"), IOP( "vfbsdoff", BSIM4_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), IOP( "tvfbsdoff", BSIM4_MOD_TVFBSDOFF, IF_REAL, "Temperature parameter for vfbsdoff"), IOP( "tvoff", BSIM4_MOD_TVOFF, IF_REAL, "Temperature parameter for voff"), IOP( "tnfactor", BSIM4_MOD_TNFACTOR, IF_REAL, "Temperature parameter for nfactor"), /* v4.7 Tanvir*/ IOP( "teta0", BSIM4_MOD_TETA0, IF_REAL, "Temperature parameter for eta0"), /* v4.7 Tanvir*/ IOP( "tvoffcv", BSIM4_MOD_TVOFFCV, IF_REAL, "Temperature parameter for tvoffcv"), /* v4.7 Tanvir*/ IOP( "lintnoi", BSIM4_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), IOP( "lint", BSIM4_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM4_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM4_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM4_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM4_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM4_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM4_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM4_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM4_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM4_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM4_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM4_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM4_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM4_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM4_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM4_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM4_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM4_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM4_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM4_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM4_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM4_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM4_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM4_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM4_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM4_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM4_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM4_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM4_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappas", BSIM4_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), IOP( "ckappad", BSIM4_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), IOP( "cf", BSIM4_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM4_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM4_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM4_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM4_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "xw", BSIM4_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), IOP( "xl", BSIM4_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), IOP( "dlcig", BSIM4_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), IOP( "dlcigd", BSIM4_MOD_DLCIGD, IF_REAL, "Delta L for Ig model drain side"), IOP( "dwj", BSIM4_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), IOP( "alpha0", BSIM4_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM4_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM4_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "agidl", BSIM4_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), IOP( "bgidl", BSIM4_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), IOP( "cgidl", BSIM4_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), IOP( "rgidl", BSIM4_MOD_RGIDL, IF_REAL, "GIDL vg parameter"), /* v4.7 New GIDL/GISL */ IOP( "kgidl", BSIM4_MOD_KGIDL, IF_REAL, "GIDL vb parameter"), /* v4.7 New GIDL/GISL */ IOP( "fgidl", BSIM4_MOD_FGIDL, IF_REAL, "GIDL vb parameter"), /* v4.7 New GIDL/GISL */ IOP( "egidl", BSIM4_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "agisl", BSIM4_MOD_AGISL, IF_REAL, "Pre-exponential constant for GISL"), IOP( "bgisl", BSIM4_MOD_BGISL, IF_REAL, "Exponential constant for GISL"), IOP( "cgisl", BSIM4_MOD_CGISL, IF_REAL, "Parameter for body-bias dependence of GISL"), IOP( "rgisl", BSIM4_MOD_RGISL, IF_REAL, "GISL vg parameter"), /* v4.7 New GIDL/GISL */ IOP( "kgisl", BSIM4_MOD_KGISL, IF_REAL, "GISL vb parameter"), /* v4.7 New GIDL/GISL */ IOP( "fgisl", BSIM4_MOD_FGISL, IF_REAL, "GISL vb parameter"), /* v4.7 New GIDL/GISL */ IOP( "egisl", BSIM4_MOD_EGISL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "aigc", BSIM4_MOD_AIGC, IF_REAL, "Parameter for Igc"), IOP( "bigc", BSIM4_MOD_BIGC, IF_REAL, "Parameter for Igc"), IOP( "cigc", BSIM4_MOD_CIGC, IF_REAL, "Parameter for Igc"), IOP( "aigsd", BSIM4_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "bigsd", BSIM4_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "cigsd", BSIM4_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "aigs", BSIM4_MOD_AIGS, IF_REAL, "Parameter for Igs"), IOP( "bigs", BSIM4_MOD_BIGS, IF_REAL, "Parameter for Igs"), IOP( "cigs", BSIM4_MOD_CIGS, IF_REAL, "Parameter for Igs"), IOP( "aigd", BSIM4_MOD_AIGD, IF_REAL, "Parameter for Igd"), IOP( "bigd", BSIM4_MOD_BIGD, IF_REAL, "Parameter for Igd"), IOP( "cigd", BSIM4_MOD_CIGD, IF_REAL, "Parameter for Igd"), IOP( "aigbacc", BSIM4_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), IOP( "bigbacc", BSIM4_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), IOP( "cigbacc", BSIM4_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), IOP( "aigbinv", BSIM4_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), IOP( "bigbinv", BSIM4_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), IOP( "cigbinv", BSIM4_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), IOP( "nigc", BSIM4_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), IOP( "nigbinv", BSIM4_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), IOP( "nigbacc", BSIM4_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), IOP( "ntox", BSIM4_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), IOP( "eigbinv", BSIM4_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), IOP( "pigcd", BSIM4_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), IOP( "poxedge", BSIM4_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), IOP( "ijthdfwd", BSIM4_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), IOP( "ijthsfwd", BSIM4_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), IOP( "ijthdrev", BSIM4_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), IOP( "ijthsrev", BSIM4_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), IOP( "xjbvd", BSIM4_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), IOP( "xjbvs", BSIM4_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), IOP( "bvd", BSIM4_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), IOP( "bvs", BSIM4_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), IOP( "jtss", BSIM4_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), IOP( "jtsd", BSIM4_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), IOP( "jtssws", BSIM4_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), IOP( "jtsswd", BSIM4_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), IOP( "jtsswgs", BSIM4_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), IOP( "jtsswgd", BSIM4_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), IOP( "jtweff", BSIM4_MOD_JTWEFF, IF_REAL, "TAT current width dependance"), IOP( "njts", BSIM4_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), IOP( "njtssw", BSIM4_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), IOP( "njtsswg", BSIM4_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), IOP( "njtsd", BSIM4_MOD_NJTSD, IF_REAL, "Non-ideality factor for bottom junction drain side"), IOP( "njtsswd", BSIM4_MOD_NJTSSWD, IF_REAL, "Non-ideality factor for STI sidewall junction drain side"), IOP( "njtsswgd", BSIM4_MOD_NJTSSWGD, IF_REAL, "Non-ideality factor for gate-edge sidewall junction drain side"), IOP( "xtss", BSIM4_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), IOP( "xtsd", BSIM4_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), IOP( "xtssws", BSIM4_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), IOP( "xtsswd", BSIM4_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), IOP( "xtsswgs", BSIM4_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), IOP( "xtsswgd", BSIM4_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), IOP( "tnjts", BSIM4_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), IOP( "tnjtssw", BSIM4_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), IOP( "tnjtsswg", BSIM4_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), IOP( "tnjtsd", BSIM4_MOD_TNJTSD, IF_REAL, "Temperature coefficient for NJTSD"), IOP( "tnjtsswd", BSIM4_MOD_TNJTSSWD, IF_REAL, "Temperature coefficient for NJTSSWD"), IOP( "tnjtsswgd", BSIM4_MOD_TNJTSSWGD, IF_REAL, "Temperature coefficient for NJTSSWGD"), IOP( "vtss", BSIM4_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), IOP( "vtsd", BSIM4_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), IOP( "vtssws", BSIM4_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswd", BSIM4_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgs", BSIM4_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgd", BSIM4_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "gbmin", BSIM4_MOD_GBMIN, IF_REAL, "Minimum body conductance"), IOP( "rbdb", BSIM4_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), IOP( "rbpb", BSIM4_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbsb", BSIM4_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), IOP( "rbps", BSIM4_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), IOP( "rbpd", BSIM4_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbps0", BSIM4_MOD_RBPS0, IF_REAL , "Body resistance RBPS scaling"), IOP( "rbpsl", BSIM4_MOD_RBPSL, IF_REAL , "Body resistance RBPS L scaling"), IOP( "rbpsw", BSIM4_MOD_RBPSW, IF_REAL , "Body resistance RBPS W scaling"), IOP( "rbpsnf", BSIM4_MOD_RBPSNF, IF_REAL , "Body resistance RBPS NF scaling"), IOP( "rbpd0", BSIM4_MOD_RBPD0, IF_REAL , "Body resistance RBPD scaling"), IOP( "rbpdl", BSIM4_MOD_RBPDL, IF_REAL , "Body resistance RBPD L scaling"), IOP( "rbpdw", BSIM4_MOD_RBPDW, IF_REAL , "Body resistance RBPD W scaling"), IOP( "rbpdnf", BSIM4_MOD_RBPDNF, IF_REAL , "Body resistance RBPD NF scaling"), IOP( "rbpbx0", BSIM4_MOD_RBPBX0, IF_REAL , "Body resistance RBPBX scaling"), IOP( "rbpbxl", BSIM4_MOD_RBPBXL, IF_REAL , "Body resistance RBPBX L scaling"), IOP( "rbpbxw", BSIM4_MOD_RBPBXW, IF_REAL , "Body resistance RBPBX W scaling"), IOP( "rbpbxnf", BSIM4_MOD_RBPBXNF, IF_REAL , "Body resistance RBPBX NF scaling"), IOP( "rbpby0", BSIM4_MOD_RBPBY0, IF_REAL , "Body resistance RBPBY scaling"), IOP( "rbpbyl", BSIM4_MOD_RBPBYL, IF_REAL , "Body resistance RBPBY L scaling"), IOP( "rbpbyw", BSIM4_MOD_RBPBYW, IF_REAL , "Body resistance RBPBY W scaling"), IOP( "rbpbynf", BSIM4_MOD_RBPBYNF, IF_REAL , "Body resistance RBPBY NF scaling"), IOP( "rbsbx0", BSIM4_MOD_RBSBX0, IF_REAL , "Body resistance RBSBX scaling"), IOP( "rbsby0", BSIM4_MOD_RBSBY0, IF_REAL , "Body resistance RBSBY scaling"), IOP( "rbdbx0", BSIM4_MOD_RBDBX0, IF_REAL , "Body resistance RBDBX scaling"), IOP( "rbdby0", BSIM4_MOD_RBDBY0, IF_REAL , "Body resistance RBDBY scaling"), IOP( "rbsdbxl", BSIM4_MOD_RBSDBXL, IF_REAL , "Body resistance RBSDBX L scaling"), IOP( "rbsdbxw", BSIM4_MOD_RBSDBXW, IF_REAL , "Body resistance RBSDBX W scaling"), IOP( "rbsdbxnf", BSIM4_MOD_RBSDBXNF, IF_REAL , "Body resistance RBSDBX NF scaling"), IOP( "rbsdbyl", BSIM4_MOD_RBSDBYL, IF_REAL , "Body resistance RBSDBY L scaling"), IOP( "rbsdbyw", BSIM4_MOD_RBSDBYW, IF_REAL , "Body resistance RBSDBY W scaling"), IOP( "rbsdbynf", BSIM4_MOD_RBSDBYNF, IF_REAL , "Body resistance RBSDBY NF scaling"), IOP( "lcdsc", BSIM4_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM4_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM4_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM4_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM4_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM4_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM4_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM4_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM4_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM4_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM4_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM4_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM4_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM4_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lndep", BSIM4_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP( "lnsd", BSIM4_MOD_LNSD, IF_REAL, "Length dependence of nsd"), IOP( "lphin", BSIM4_MOD_LPHIN, IF_REAL, "Length dependence of phin"), IOP( "lngate", BSIM4_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM4_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM4_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM4_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM4_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM4_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM4_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM4_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM4_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM4_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM4_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM4_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM4_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM4_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "ldvtp0", BSIM4_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), IOP( "ldvtp1", BSIM4_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), IOP( "ldvtp2", BSIM4_MOD_LDVTP2, IF_REAL, "Length dependence of dvtp2"), IOP( "ldvtp3", BSIM4_MOD_LDVTP3, IF_REAL, "Length dependence of dvtp3"), IOP( "ldvtp4", BSIM4_MOD_LDVTP4, IF_REAL, "Length dependence of dvtp4"), IOP( "ldvtp5", BSIM4_MOD_LDVTP5, IF_REAL, "Length dependence of dvtp5"), IOP( "llpe0", BSIM4_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), IOP( "llpeb", BSIM4_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), IOP( "ldvt0", BSIM4_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM4_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM4_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM4_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM4_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM4_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM4_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM4_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM4_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM4_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM4_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM4_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM4_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM4_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lud", BSIM4_MOD_LUD, IF_REAL, "Length dependence of ud"), IOP( "lud1", BSIM4_MOD_LUD1, IF_REAL, "Length dependence of ud1"), IOP( "lup", BSIM4_MOD_LUP, IF_REAL, "Length dependence of up"), IOP( "llp", BSIM4_MOD_LLP, IF_REAL, "Length dependence of lp"), IOP( "lu0", BSIM4_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM4_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lucste", BSIM4_MOD_LUCSTE, IF_REAL, "Length dependence of ucste"), IOP( "lvoff", BSIM4_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lminv", BSIM4_MOD_LMINV, IF_REAL, "Length dependence of minv"), IOP( "lminvcv", BSIM4_MOD_LMINVCV, IF_REAL, "Length dependence of minvcv"), IOP( "ldelta", BSIM4_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM4_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lrsw", BSIM4_MOD_LRSW, IF_REAL, "Length dependence of rsw"), IOP( "lrdw", BSIM4_MOD_LRDW, IF_REAL, "Length dependence of rdw"), IOP( "lprwg", BSIM4_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM4_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM4_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM4_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM4_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM4_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM4_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM4_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM4_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lfprout", BSIM4_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpdits", BSIM4_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), IOP( "lpditsd", BSIM4_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), IOP( "lpscbe1", BSIM4_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM4_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM4_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM4_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM4_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM4_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM4_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM4_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM4_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM4_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappas", BSIM4_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), IOP( "lckappad", BSIM4_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), IOP( "lcf", BSIM4_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM4_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM4_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM4_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM4_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM4_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", BSIM4_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", BSIM4_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lcgidl", BSIM4_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), IOP( "lrgidl", BSIM4_MOD_LRGIDL, IF_REAL, "Length dependence of rgidl"), /* v4.7 New GIDL/GISL */ IOP( "lkgidl", BSIM4_MOD_LKGIDL, IF_REAL, "Length dependence of kgidl"), /* v4.7 New GIDL/GISL */ IOP( "lfgidl", BSIM4_MOD_LFGIDL, IF_REAL, "Length dependence of fgidl"), /* v4.7 New GIDL/GISL */ IOP( "legidl", BSIM4_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), IOP( "lagisl", BSIM4_MOD_LAGISL, IF_REAL, "Length dependence of agisl"), IOP( "lbgisl", BSIM4_MOD_LBGISL, IF_REAL, "Length dependence of bgisl"), IOP( "lcgisl", BSIM4_MOD_LCGISL, IF_REAL, "Length dependence of cgisl"), IOP( "lrgisl", BSIM4_MOD_LRGISL, IF_REAL, "Length dependence of rgisl"), /* v4.7 New GIDL/GISL */ IOP( "lkgisl", BSIM4_MOD_LKGISL, IF_REAL, "Length dependence of kgisl"), /* v4.7 New GIDL/GISL */ IOP( "lfgisl", BSIM4_MOD_LFGISL, IF_REAL, "Length dependence of fgisl"), /* v4.7 New GIDL/GISL */ IOP( "legisl", BSIM4_MOD_LEGISL, IF_REAL, "Length dependence of egisl"), IOP( "laigc", BSIM4_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), IOP( "lbigc", BSIM4_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), IOP( "lcigc", BSIM4_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), IOP( "laigsd", BSIM4_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), IOP( "lbigsd", BSIM4_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), IOP( "lcigsd", BSIM4_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), IOP( "laigs", BSIM4_MOD_LAIGS, IF_REAL, "Length dependence of aigs"), IOP( "lbigs", BSIM4_MOD_LBIGS, IF_REAL, "Length dependence of bigs"), IOP( "lcigs", BSIM4_MOD_LCIGS, IF_REAL, "Length dependence of cigs"), IOP( "laigd", BSIM4_MOD_LAIGD, IF_REAL, "Length dependence of aigd"), IOP( "lbigd", BSIM4_MOD_LBIGD, IF_REAL, "Length dependence of bigd"), IOP( "lcigd", BSIM4_MOD_LCIGD, IF_REAL, "Length dependence of cigd"), IOP( "laigbacc", BSIM4_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), IOP( "lbigbacc", BSIM4_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), IOP( "lcigbacc", BSIM4_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), IOP( "laigbinv", BSIM4_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), IOP( "lbigbinv", BSIM4_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), IOP( "lcigbinv", BSIM4_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), IOP( "lnigc", BSIM4_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), IOP( "lnigbinv", BSIM4_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), IOP( "lnigbacc", BSIM4_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), IOP( "lntox", BSIM4_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), IOP( "leigbinv", BSIM4_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), IOP( "lpigcd", BSIM4_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), IOP( "lpoxedge", BSIM4_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), IOP( "lvfbcv", BSIM4_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM4_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM4_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM4_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM4_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM4_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "lxrcrg1", BSIM4_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), IOP( "lxrcrg2", BSIM4_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), IOP( "llambda", BSIM4_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), IOP( "lvtl", BSIM4_MOD_LVTL, IF_REAL, " Length dependence of vtl"), IOP( "lxn", BSIM4_MOD_LXN, IF_REAL, " Length dependence of xn"), IOP( "leu", BSIM4_MOD_LEU, IF_REAL, " Length dependence of eu"), IOP( "lucs", BSIM4_MOD_LUCS, IF_REAL, "Length dependence of lucs"), IOP( "lvfbsdoff", BSIM4_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), IOP( "ltvfbsdoff", BSIM4_MOD_LTVFBSDOFF, IF_REAL, "Length dependence of tvfbsdoff"), IOP( "ltvoff", BSIM4_MOD_LTVOFF, IF_REAL, "Length dependence of tvoff"), IOP( "ltnfactor", BSIM4_MOD_LTNFACTOR, IF_REAL, "Length dependence of tnfactor"), /* v4.7 Tanvir*/ IOP( "lteta0", BSIM4_MOD_LTETA0, IF_REAL, "Length dependence of teta0"), /* v4.7 Tanvir*/ IOP( "ltvoffcv", BSIM4_MOD_LTVOFFCV, IF_REAL, "Length dependence of tvoffcv"), /* v4.7 Tanvir*/ IOP( "wcdsc", BSIM4_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM4_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM4_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM4_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM4_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM4_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM4_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM4_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM4_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM4_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM4_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM4_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM4_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM4_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wndep", BSIM4_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP( "wnsd", BSIM4_MOD_WNSD, IF_REAL, "Width dependence of nsd"), IOP( "wphin", BSIM4_MOD_WPHIN, IF_REAL, "Width dependence of phin"), IOP( "wngate", BSIM4_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM4_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM4_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM4_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM4_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM4_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM4_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM4_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM4_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM4_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM4_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM4_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM4_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM4_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wdvtp0", BSIM4_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), IOP( "wdvtp1", BSIM4_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), IOP( "wdvtp2", BSIM4_MOD_WDVTP2, IF_REAL, "Width dependence of dvtp2"), IOP( "wdvtp3", BSIM4_MOD_WDVTP3, IF_REAL, "Width dependence of dvtp3"), IOP( "wdvtp4", BSIM4_MOD_WDVTP4, IF_REAL, "Width dependence of dvtp4"), IOP( "wdvtp5", BSIM4_MOD_WDVTP5, IF_REAL, "Width dependence of dvtp5"), IOP( "wlpe0", BSIM4_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), IOP( "wlpeb", BSIM4_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), IOP( "wdvt0", BSIM4_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM4_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM4_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM4_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM4_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM4_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM4_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM4_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM4_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM4_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM4_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM4_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM4_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM4_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wud", BSIM4_MOD_WUD, IF_REAL, "Width dependence of ud"), IOP( "wud1", BSIM4_MOD_WUD1, IF_REAL, "Width dependence of ud1"), IOP( "wup", BSIM4_MOD_WUP, IF_REAL, "Width dependence of up"), IOP( "wlp", BSIM4_MOD_WLP, IF_REAL, "Width dependence of lp"), IOP( "wu0", BSIM4_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM4_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wucste", BSIM4_MOD_WUCSTE, IF_REAL, "Width dependence of ucste"), IOP( "wvoff", BSIM4_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "wminv", BSIM4_MOD_WMINV, IF_REAL, "Width dependence of minv"), IOP( "wminvcv", BSIM4_MOD_WMINVCV, IF_REAL, "Width dependence of minvcv"), IOP( "wdelta", BSIM4_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM4_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wrsw", BSIM4_MOD_WRSW, IF_REAL, "Width dependence of rsw"), IOP( "wrdw", BSIM4_MOD_WRDW, IF_REAL, "Width dependence of rdw"), IOP( "wprwg", BSIM4_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM4_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM4_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM4_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM4_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM4_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM4_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM4_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM4_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wfprout", BSIM4_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpdits", BSIM4_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), IOP( "wpditsd", BSIM4_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), IOP( "wpscbe1", BSIM4_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM4_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM4_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM4_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM4_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM4_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM4_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM4_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM4_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM4_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappas", BSIM4_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), IOP( "wckappad", BSIM4_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), IOP( "wcf", BSIM4_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM4_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM4_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM4_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM4_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM4_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", BSIM4_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", BSIM4_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wcgidl", BSIM4_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), IOP( "wrgidl", BSIM4_MOD_WRGIDL, IF_REAL, "Width dependence of rgidl"), /* v4.7 New GIDL/GISL */ IOP( "wkgidl", BSIM4_MOD_WKGIDL, IF_REAL, "Width dependence of kgidl"), /* v4.7 New GIDL/GISL */ IOP( "wfgidl", BSIM4_MOD_WFGIDL, IF_REAL, "Width dependence of fgidl"), /* v4.7 New GIDL/GISL */ IOP( "wegidl", BSIM4_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), IOP( "wagisl", BSIM4_MOD_WAGISL, IF_REAL, "Width dependence of agisl"), IOP( "wbgisl", BSIM4_MOD_WBGISL, IF_REAL, "Width dependence of bgisl"), IOP( "wcgisl", BSIM4_MOD_WCGISL, IF_REAL, "Width dependence of cgisl"), IOP( "wrgisl", BSIM4_MOD_WRGISL, IF_REAL, "Width dependence of rgisl"), /* v4.7 New GIDL/GISL */ IOP( "wkgisl", BSIM4_MOD_WKGISL, IF_REAL, "Width dependence of kgisl"), /* v4.7 New GIDL/GISL */ IOP( "wfgisl", BSIM4_MOD_WFGISL, IF_REAL, "Width dependence of fgisl"), /* v4.7 New GIDL/GISL */ IOP( "wegisl", BSIM4_MOD_WEGISL, IF_REAL, "Width dependence of egisl"), IOP( "waigc", BSIM4_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), IOP( "wbigc", BSIM4_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), IOP( "wcigc", BSIM4_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), IOP( "waigsd", BSIM4_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), IOP( "wbigsd", BSIM4_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), IOP( "wcigsd", BSIM4_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), IOP( "waigs", BSIM4_MOD_WAIGS, IF_REAL, "Width dependence of aigs"), IOP( "wbigs", BSIM4_MOD_WBIGS, IF_REAL, "Width dependence of bigs"), IOP( "wcigs", BSIM4_MOD_WCIGS, IF_REAL, "Width dependence of cigs"), IOP( "waigd", BSIM4_MOD_WAIGD, IF_REAL, "Width dependence of aigd"), IOP( "wbigd", BSIM4_MOD_WBIGD, IF_REAL, "Width dependence of bigd"), IOP( "wcigd", BSIM4_MOD_WCIGD, IF_REAL, "Width dependence of cigd"), IOP( "waigbacc", BSIM4_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), IOP( "wbigbacc", BSIM4_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), IOP( "wcigbacc", BSIM4_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), IOP( "waigbinv", BSIM4_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), IOP( "wbigbinv", BSIM4_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), IOP( "wcigbinv", BSIM4_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), IOP( "wnigc", BSIM4_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), IOP( "wnigbinv", BSIM4_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), IOP( "wnigbacc", BSIM4_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), IOP( "wntox", BSIM4_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), IOP( "weigbinv", BSIM4_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), IOP( "wpigcd", BSIM4_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), IOP( "wpoxedge", BSIM4_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), IOP( "wvfbcv", BSIM4_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM4_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM4_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM4_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM4_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM4_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "wxrcrg1", BSIM4_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), IOP( "wxrcrg2", BSIM4_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), IOP( "wlambda", BSIM4_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), IOP( "wvtl", BSIM4_MOD_WVTL, IF_REAL, "Width dependence of vtl"), IOP( "wxn", BSIM4_MOD_WXN, IF_REAL, "Width dependence of xn"), IOP( "weu", BSIM4_MOD_WEU, IF_REAL, "Width dependence of eu"), IOP( "wucs", BSIM4_MOD_WUCS, IF_REAL, "Width dependence of ucs"), IOP( "wvfbsdoff", BSIM4_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), IOP( "wtvfbsdoff", BSIM4_MOD_WTVFBSDOFF, IF_REAL, "Width dependence of tvfbsdoff"), IOP( "wtvoff", BSIM4_MOD_WTVOFF, IF_REAL, "Width dependence of tvoff"), IOP( "wtnfactor", BSIM4_MOD_WTNFACTOR, IF_REAL, "Width dependence of tnfactor"), /* v4.7 Tanvir*/ IOP( "wteta0", BSIM4_MOD_WTETA0, IF_REAL, "Width dependence of teta0"), /* v4.7 Tanvir*/ IOP( "wtvoffcv", BSIM4_MOD_WTVOFFCV, IF_REAL, "Width dependence of tvoffcv"), /* v4.7 Tanvir*/ IOP( "pcdsc", BSIM4_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM4_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM4_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM4_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM4_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM4_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM4_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM4_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM4_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM4_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM4_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM4_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM4_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM4_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pndep", BSIM4_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP( "pnsd", BSIM4_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), IOP( "pphin", BSIM4_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), IOP( "pngate", BSIM4_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM4_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM4_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM4_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM4_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM4_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM4_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM4_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM4_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM4_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM4_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM4_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM4_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM4_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pdvtp0", BSIM4_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), IOP( "pdvtp1", BSIM4_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), IOP( "pdvtp2", BSIM4_MOD_PDVTP2, IF_REAL, "Cross-term dependence of dvtp2"), IOP( "pdvtp3", BSIM4_MOD_PDVTP3, IF_REAL, "Cross-term dependence of dvtp3"), IOP( "pdvtp4", BSIM4_MOD_PDVTP4, IF_REAL, "Cross-term dependence of dvtp4"), IOP( "pdvtp5", BSIM4_MOD_PDVTP5, IF_REAL, "Cross-term dependence of dvtp5"), IOP( "plpe0", BSIM4_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), IOP( "plpeb", BSIM4_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), IOP( "pdvt0", BSIM4_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM4_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM4_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM4_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM4_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM4_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM4_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM4_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM4_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM4_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM4_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM4_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM4_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM4_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pud", BSIM4_MOD_PUD, IF_REAL, "Cross-term dependence of ud"), IOP( "pud1", BSIM4_MOD_PUD1, IF_REAL, "Cross-term dependence of ud1"), IOP( "pup", BSIM4_MOD_PUP, IF_REAL, "Cross-term dependence of up"), IOP( "plp", BSIM4_MOD_PLP, IF_REAL, "Cross-term dependence of lp"), IOP( "pu0", BSIM4_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM4_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pucste", BSIM4_MOD_PUCSTE, IF_REAL, "Cross-term dependence of ucste"), IOP( "pvoff", BSIM4_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pminv", BSIM4_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), IOP( "pminvcv", BSIM4_MOD_PMINVCV, IF_REAL, "Cross-term dependence of minvcv"), IOP( "pdelta", BSIM4_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM4_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "prsw", BSIM4_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), IOP( "prdw", BSIM4_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), IOP( "pprwg", BSIM4_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM4_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM4_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM4_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM4_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM4_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM4_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM4_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM4_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pfprout", BSIM4_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppdits", BSIM4_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), IOP( "ppditsd", BSIM4_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), IOP( "ppscbe1", BSIM4_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM4_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM4_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM4_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM4_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM4_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM4_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM4_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM4_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM4_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappas", BSIM4_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), IOP( "pckappad", BSIM4_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), IOP( "pcf", BSIM4_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM4_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM4_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM4_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM4_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM4_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", BSIM4_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", BSIM4_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pcgidl", BSIM4_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), IOP( "prgidl", BSIM4_MOD_PRGIDL, IF_REAL, "Cross-term dependence of rgidl"), /* v4.7 New GIDL/GISL */ IOP( "pkgidl", BSIM4_MOD_PKGIDL, IF_REAL, "Cross-term dependence of kgidl"), /* v4.7 New GIDL/GISL */ IOP( "pfgidl", BSIM4_MOD_PFGIDL, IF_REAL, "Cross-term dependence of fgidl"), /* v4.7 New GIDL/GISL */ IOP( "pegidl", BSIM4_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), IOP( "pagisl", BSIM4_MOD_PAGISL, IF_REAL, "Cross-term dependence of agisl"), IOP( "pbgisl", BSIM4_MOD_PBGISL, IF_REAL, "Cross-term dependence of bgisl"), IOP( "pcgisl", BSIM4_MOD_PCGISL, IF_REAL, "Cross-term dependence of cgisl"), IOP( "pegisl", BSIM4_MOD_PEGISL, IF_REAL, "Cross-term dependence of egisl"), IOP( "prgisl", BSIM4_MOD_PRGISL, IF_REAL, "Cross-term dependence of rgisl"), /* v4.7 New GIDL/GISL */ IOP( "pkgisl", BSIM4_MOD_PKGISL, IF_REAL, "Cross-term dependence of kgisl"), /* v4.7 New GIDL/GISL */ IOP( "pfgisl", BSIM4_MOD_PFGISL, IF_REAL, "Cross-term dependence of fgisl"), /* v4.7 New GIDL/GISL */ IOP( "paigc", BSIM4_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), IOP( "pbigc", BSIM4_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), IOP( "pcigc", BSIM4_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), IOP( "paigsd", BSIM4_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), IOP( "pbigsd", BSIM4_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), IOP( "pcigsd", BSIM4_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), IOP( "paigs", BSIM4_MOD_PAIGS, IF_REAL, "Cross-term dependence of aigs"), IOP( "pbigs", BSIM4_MOD_PBIGS, IF_REAL, "Cross-term dependence of bigs"), IOP( "pcigs", BSIM4_MOD_PCIGS, IF_REAL, "Cross-term dependence of cigs"), IOP( "paigd", BSIM4_MOD_PAIGD, IF_REAL, "Cross-term dependence of aigd"), IOP( "pbigd", BSIM4_MOD_PBIGD, IF_REAL, "Cross-term dependence of bigd"), IOP( "pcigd", BSIM4_MOD_PCIGD, IF_REAL, "Cross-term dependence of cigd"), IOP( "paigbacc", BSIM4_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), IOP( "pbigbacc", BSIM4_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), IOP( "pcigbacc", BSIM4_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), IOP( "paigbinv", BSIM4_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), IOP( "pbigbinv", BSIM4_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), IOP( "pcigbinv", BSIM4_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), IOP( "pnigc", BSIM4_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), IOP( "pnigbinv", BSIM4_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), IOP( "pnigbacc", BSIM4_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), IOP( "pntox", BSIM4_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), IOP( "peigbinv", BSIM4_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), IOP( "ppigcd", BSIM4_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), IOP( "ppoxedge", BSIM4_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), IOP( "pvfbcv", BSIM4_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM4_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM4_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM4_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM4_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM4_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "pxrcrg1", BSIM4_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), IOP( "pxrcrg2", BSIM4_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), IOP( "plambda", BSIM4_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), IOP( "pvtl", BSIM4_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), IOP( "pxn", BSIM4_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), IOP( "peu", BSIM4_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), IOP( "pucs", BSIM4_MOD_PUCS, IF_REAL, "Cross-term dependence of ucs"), IOP( "pvfbsdoff", BSIM4_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), IOP( "ptvfbsdoff", BSIM4_MOD_PTVFBSDOFF, IF_REAL, "Cross-term dependence of tvfbsdoff"), IOP( "ptvoff", BSIM4_MOD_PTVOFF, IF_REAL, "Cross-term dependence of tvoff"), IOP( "ptnfactor", BSIM4_MOD_PTNFACTOR, IF_REAL, "Cross-term dependence of tnfactor"), /* v4.7 Tanvir*/ IOP( "pteta0", BSIM4_MOD_PTETA0, IF_REAL, "Cross-term dependence of teta0"), /* v4.7 Tanvir*/ IOP( "ptvoffcv", BSIM4_MOD_PTVOFFCV, IF_REAL, "Cross-term dependence of tvoffcv"), /* v4.7 Tanvir*/ /* stress effect*/ IOP( "saref", BSIM4_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), IOP( "sbref", BSIM4_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), IOP( "wlod", BSIM4_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), IOP( "ku0", BSIM4_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), IOP( "kvsat", BSIM4_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), IOP( "kvth0", BSIM4_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), IOP( "tku0", BSIM4_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), IOP( "llodku0", BSIM4_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), IOP( "wlodku0", BSIM4_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), IOP( "llodvth", BSIM4_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), IOP( "wlodvth", BSIM4_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), IOP( "lku0", BSIM4_MOD_LKU0, IF_REAL, "Length dependence of ku0"), IOP( "wku0", BSIM4_MOD_WKU0, IF_REAL, "Width dependence of ku0"), IOP( "pku0", BSIM4_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), IOP( "lkvth0", BSIM4_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), IOP( "wkvth0", BSIM4_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), IOP( "pkvth0", BSIM4_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), IOP( "stk2", BSIM4_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), IOP( "lodk2", BSIM4_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), IOP( "steta0", BSIM4_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), IOP( "lodeta0", BSIM4_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), /* Well Proximity Effect */ IOP( "web", BSIM4_MOD_WEB, IF_REAL, "Coefficient for SCB"), IOP( "wec", BSIM4_MOD_WEC, IF_REAL, "Coefficient for SCC"), IOP( "kvth0we", BSIM4_MOD_KVTH0WE, IF_REAL, "Threshold shift factor for well proximity effect"), IOP( "k2we", BSIM4_MOD_K2WE, IF_REAL, " K2 shift factor for well proximity effect "), IOP( "ku0we", BSIM4_MOD_KU0WE, IF_REAL, " Mobility degradation factor for well proximity effect "), IOP( "scref", BSIM4_MOD_SCREF, IF_REAL, " Reference distance to calculate SCA, SCB and SCC"), IOP( "wpemod", BSIM4_MOD_WPEMOD, IF_REAL, " Flag for WPE model (WPEMOD=1 to activate this model) "), IOP( "lkvth0we", BSIM4_MOD_LKVTH0WE, IF_REAL, "Length dependence of kvth0we"), IOP( "lk2we", BSIM4_MOD_LK2WE, IF_REAL, " Length dependence of k2we "), IOP( "lku0we", BSIM4_MOD_LKU0WE, IF_REAL, " Length dependence of ku0we "), IOP( "wkvth0we", BSIM4_MOD_WKVTH0WE, IF_REAL, "Width dependence of kvth0we"), IOP( "wk2we", BSIM4_MOD_WK2WE, IF_REAL, " Width dependence of k2we "), IOP( "wku0we", BSIM4_MOD_WKU0WE, IF_REAL, " Width dependence of ku0we "), IOP( "pkvth0we", BSIM4_MOD_PKVTH0WE, IF_REAL, "Cross-term dependence of kvth0we"), IOP( "pk2we", BSIM4_MOD_PK2WE, IF_REAL, " Cross-term dependence of k2we "), IOP( "pku0we", BSIM4_MOD_PKU0WE, IF_REAL, " Cross-term dependence of ku0we "), IOP( "noia", BSIM4_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM4_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM4_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "tnoia", BSIM4_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), IOP( "tnoib", BSIM4_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), IOP( "tnoic", BSIM4_MOD_TNOIC, IF_REAL, "Thermal noise parameter"), IOP( "rnoia", BSIM4_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), IOP( "rnoib", BSIM4_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), IOP( "rnoic", BSIM4_MOD_RNOIC, IF_REAL, "Thermal noise coefficient"), IOP( "ntnoi", BSIM4_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), IOP( "em", BSIM4_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM4_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM4_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM4_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP("vgs_max", BSIM4_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", BSIM4_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", BSIM4_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", BSIM4_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", BSIM4_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", BSIM4_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch"), IP( "nmos", BSIM4_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM4_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM4names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM4nSize = NUMELEMS(BSIM4names); int BSIM4pTSize = NUMELEMS(BSIM4pTable); int BSIM4mPTSize = NUMELEMS(BSIM4mPTable); int BSIM4iSize = sizeof(BSIM4instance); int BSIM4mSize = sizeof(BSIM4model); ngspice-26/src/spicelib/devices/bsim4/b4acld.c0000644000265600020320000007043612264261473020561 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4acld.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4acLoad( GENmodel *inModel, CKTcircuit *ckt) { BSIM4model *model = (BSIM4model*)inModel; BSIM4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcbgb, xcbdb, xcbsb, xcbbb; double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb; double xcgmbb=0.0, xcbgmb; double capbd, capbs, omega; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double T0=0.0, T1, T2, T3; double Csg, Csd, Css; double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; double FwdSumr, RevSumr, Gmr, Gmbsr; double FwdSumi, RevSumi, Gmi, Gmbsi; struct bsim4SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM4nextModel) { for (here = model->BSIM4instances; here!= NULL; here = here->BSIM4nextInstance) { pParam = here->pParam; capbd = here->BSIM4capbd; capbs = here->BSIM4capbs; cgso = here->BSIM4cgso; cgdo = here->BSIM4cgdo; cgbo = pParam->BSIM4cgbo; Csd = -(here->BSIM4cddb + here->BSIM4cgdb + here->BSIM4cbdb); Csg = -(here->BSIM4cdgb + here->BSIM4cggb + here->BSIM4cbgb); Css = -(here->BSIM4cdsb + here->BSIM4cgsb + here->BSIM4cbsb); if (here->BSIM4acnqsMod) { T0 = omega * here->BSIM4taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; gmr = here->BSIM4gm * T2; gmbsr = here->BSIM4gmbs * T2; gdsr = here->BSIM4gds * T2; gmi = -here->BSIM4gm * T3; gmbsi = -here->BSIM4gmbs * T3; gdsi = -here->BSIM4gds * T3; Cddr = here->BSIM4cddb * T2; Cdgr = here->BSIM4cdgb * T2; Cdsr = here->BSIM4cdsb * T2; Cdbr = -(Cddr + Cdgr + Cdsr); /* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ Cddi = here->BSIM4cddb * T3 * omega; Cdgi = here->BSIM4cdgb * T3 * omega; Cdsi = here->BSIM4cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; Csgr = Csg * T2; Cssr = Css * T2; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csd * T3 * omega; Csgi = Csg * T3 * omega; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); Cgdr = -(Cddr + Csdr + here->BSIM4cbdb); Cggr = -(Cdgr + Csgr + here->BSIM4cbgb); Cgsr = -(Cdsr + Cssr + here->BSIM4cbsb); Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = -(Cddi + Csdi); Cggi = -(Cdgi + Csgi); Cgsi = -(Cdsi + Cssi); Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ { gmr = here->BSIM4gm; gmbsr = here->BSIM4gmbs; gdsr = here->BSIM4gds; gmi = gmbsi = gdsi = 0.0; Cddr = here->BSIM4cddb; Cdgr = here->BSIM4cdgb; Cdsr = here->BSIM4cdsb; Cdbr = -(Cddr + Cdgr + Cdsr); Cddi = Cdgi = Cdsi = Cdbi = 0.0; Csdr = Csd; Csgr = Csg; Cssr = Css; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csgi = Cssi = Csbi = 0.0; Cgdr = here->BSIM4cgdb; Cggr = here->BSIM4cggb; Cgsr = here->BSIM4cgsb; Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = Cggi = Cgsi = Cgbi = 0.0; } if (here->BSIM4mode >= 0) { Gmr = gmr; Gmbsr = gmbsr; FwdSumr = Gmr + Gmbsr; RevSumr = 0.0; Gmi = gmi; Gmbsi = gmbsi; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; gbbdp = -(here->BSIM4gbds); gbbsp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = here->BSIM4gbgs; gbdpdp = here->BSIM4gbds; gbdpb = here->BSIM4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcsg; gIstotd = here->BSIM4gIgcsd; gIstots = here->BSIM4gIgss + here->BSIM4gIgcss; gIstotb = here->BSIM4gIgcsb; gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcdg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcdd; gIdtots = here->BSIM4gIgcds; gIdtotb = here->BSIM4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbd; gIbtots = here->BSIM4gIgbs; gIbtotb = here->BSIM4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4vges) - *(ckt->CKTstates[0] + here->BSIM4vgs); else if (here->BSIM4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4vgms) - *(ckt->CKTstates[0] + here->BSIM4vgs); if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgd * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgs * T0; gcrgb = here->BSIM4gcrgb * T0; gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgdr * omega; xcgsbr = Cgsr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Cdgr * omega; xcsgbr = Csgr * omega; xcbgb = here->BSIM4cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4cgbo ) * omega; xcgdbr = (Cgdr - cgdo) * omega; xcgsbr = (Cgsr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Cdgr - cgdo) * omega; xcsgbr = (Csgr - cgso) * omega; xcbgb = (here->BSIM4cbgb - pParam->BSIM4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (Cddr + here->BSIM4capbd + cgdo) * omega; xcdsbr = Cdsr * omega; xcsdbr = Csdr * omega; xcssbr = (here->BSIM4capbs + cgso + Cssr) * omega; if (!here->BSIM4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4cbdb - here->BSIM4capbd) * omega; xcbsb = (here->BSIM4cbsb - here->BSIM4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = Cdbr * omega; xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) + here->BSIM4capbs * omega; xcbdb = here->BSIM4cbdb * omega; xcbsb = here->BSIM4cbsb * omega; xcdbdb = -here->BSIM4capbd * omega; xcsbsb = -here->BSIM4capbs * omega; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xcdgbi = Cdgi; xcsgbi = Csgi; xcddbi = Cddi; xcdsbi = Cdsi; xcsdbi = Csdi; xcssbi = Cssi; xcdbbi = Cdbi; xcsbbi = Csbi; xcggbi = Cggi; xcgdbi = Cgdi; xcgsbi = Cgsi; xcgbbi = Cgbi; } else /* Reverse mode */ { Gmr = -gmr; Gmbsr = -gmbsr; FwdSumr = 0.0; RevSumr = -(Gmr + Gmbsr); Gmi = -gmi; Gmbsi = -gmbsi; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); gbbsp = -(here->BSIM4gbds); gbbdp = here->BSIM4gbds + here->BSIM4gbgs + here->BSIM4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4gbgs; gbspsp = here->BSIM4gbds; gbspb = here->BSIM4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4igcMod) { gIstotg = here->BSIM4gIgsg + here->BSIM4gIgcdg; gIstotd = here->BSIM4gIgcds; gIstots = here->BSIM4gIgss + here->BSIM4gIgcdd; gIstotb = here->BSIM4gIgcdb; gIdtotg = here->BSIM4gIgdg + here->BSIM4gIgcsg; gIdtotd = here->BSIM4gIgdd + here->BSIM4gIgcss; gIdtots = here->BSIM4gIgcsd; gIdtotb = here->BSIM4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4igbMod) { gIbtotg = here->BSIM4gIgbg; gIbtotd = here->BSIM4gIgbs; gIbtots = here->BSIM4gIgbd; gIbtotb = here->BSIM4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4igcMod != 0) || (model->BSIM4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4vges) - *(ckt->CKTstates[0] + here->BSIM4vgs); else if (here->BSIM4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4vgms) - *(ckt->CKTstates[0] + here->BSIM4vgs); if (here->BSIM4rgateMod > 1) { gcrgd = here->BSIM4gcrgs * T0; gcrgg = here->BSIM4gcrgg * T0; gcrgs = here->BSIM4gcrgd * T0; gcrgb = here->BSIM4gcrgb * T0; gcrgg -= here->BSIM4gcrg; gcrg = here->BSIM4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgsr * omega; xcgsbr = Cgdr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Csgr * omega; xcsgbr = Cdgr * omega; xcbgb = here->BSIM4cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4cgbo ) * omega; xcgdbr = (Cgsr - cgdo) * omega; xcgsbr = (Cgdr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Csgr - cgdo) * omega; xcsgbr = (Cdgr - cgso) * omega; xcbgb = (here->BSIM4cbgb - pParam->BSIM4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (here->BSIM4capbd + cgdo + Cssr) * omega; xcdsbr = Csdr * omega; xcsdbr = Cdsr * omega; xcssbr = (Cddr + here->BSIM4capbs + cgso) * omega; if (!here->BSIM4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4cbsb - here->BSIM4capbd) * omega; xcbsb = (here->BSIM4cbdb - here->BSIM4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) + here->BSIM4capbd * omega; xcsbbr = Cdbr * omega; xcbdb = here->BSIM4cbsb * omega; xcbsb = here->BSIM4cbdb * omega; xcdbdb = -here->BSIM4capbd * omega; xcsbsb = -here->BSIM4capbs * omega; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xcdgbi = Csgi; xcsgbi = Cdgi; xcddbi = Cssi; xcdsbi = Csdi; xcsdbi = Cdsi; xcssbi = Cddi; xcdbbi = Csbi; xcsbbi = Cdbi; xcggbi = Cggi; xcgdbi = Cgsi; xcgsbi = Cgdi; xcgbbi = Cgbi; } if (model->BSIM4rdsMod == 1) { gstot = here->BSIM4gstot; gstotd = here->BSIM4gstotd; gstotg = here->BSIM4gstotg; gstots = here->BSIM4gstots - gstot; gstotb = here->BSIM4gstotb; gdtot = here->BSIM4gdtot; gdtotd = here->BSIM4gdtotd - gdtot; gdtotg = here->BSIM4gdtotg; gdtots = here->BSIM4gdtots; gdtotb = here->BSIM4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } /* * Loading AC matrix */ m = here->BSIM4m; if (!model->BSIM4rdsMod) { gdpr = here->BSIM4drainConductance; gspr = here->BSIM4sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4rbodyMod) { gjbd = here->BSIM4gbd; gjbs = here->BSIM4gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4grgeltd; if (here->BSIM4rgateMod == 1) { *(here->BSIM4GEgePtr) += m * geltd; *(here->BSIM4GPgePtr) -= m * geltd; *(here->BSIM4GEgpPtr) -= m * geltd; *(here->BSIM4GPgpPtr +1) += m * xcggbr; *(here->BSIM4GPgpPtr) += m * (geltd + xcggbi + gIgtotg); *(here->BSIM4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4GPspPtr +1) += m * xcgsbr; *(here->BSIM4GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4GPbpPtr) += m * (xcgbbi + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4rgateMod == 2) { *(here->BSIM4GEgePtr) += m * gcrg; *(here->BSIM4GEgpPtr) += m * gcrgg; *(here->BSIM4GEdpPtr) += m * gcrgd; *(here->BSIM4GEspPtr) += m * gcrgs; *(here->BSIM4GEbpPtr) += m * gcrgb; *(here->BSIM4GPgePtr) -= m * gcrg; *(here->BSIM4GPgpPtr +1) += m * xcggbr; *(here->BSIM4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4GPspPtr +1) += m * xcgsbr; *(here->BSIM4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); } else if (here->BSIM4rgateMod == 3) { *(here->BSIM4GEgePtr) += m * geltd; *(here->BSIM4GEgmPtr) -= m * geltd; *(here->BSIM4GMgePtr) -= m * geltd; *(here->BSIM4GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4GMgmPtr +1) += m * xcgmgmb; *(here->BSIM4GMdpPtr) += m * gcrgd; *(here->BSIM4GMdpPtr +1) += m * xcgmdb; *(here->BSIM4GMgpPtr) += m * gcrgg; *(here->BSIM4GMspPtr) += m * gcrgs; *(here->BSIM4GMspPtr +1) += m * xcgmsb; *(here->BSIM4GMbpPtr) += m * gcrgb; *(here->BSIM4GMbpPtr +1) += m * xcgmbb; *(here->BSIM4DPgmPtr +1) += m * xcdgmb; *(here->BSIM4GPgmPtr) -= m * gcrg; *(here->BSIM4SPgmPtr +1) += m * xcsgmb; *(here->BSIM4BPgmPtr +1) += m * xcbgmb; *(here->BSIM4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4GPgpPtr +1) += m * xcggbr; *(here->BSIM4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4GPspPtr +1) += m * xcgsbr; *(here->BSIM4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); *(here->BSIM4GPbpPtr +1) += m * xcgbbr; } else { *(here->BSIM4GPgpPtr +1) += m * xcggbr; *(here->BSIM4GPgpPtr) += m * (xcggbi + gIgtotg); *(here->BSIM4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4GPspPtr +1) += m * xcgsbr; *(here->BSIM4GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4GPbpPtr) += m * (xcgbbi + gIgtotb); } if (model->BSIM4rdsMod) { (*(here->BSIM4DgpPtr) += m * gdtotg); (*(here->BSIM4DspPtr) += m * gdtots); (*(here->BSIM4DbpPtr) += m * gdtotb); (*(here->BSIM4SdpPtr) += m * gstotd); (*(here->BSIM4SgpPtr) += m * gstotg); (*(here->BSIM4SbpPtr) += m * gstotb); } *(here->BSIM4DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); *(here->BSIM4DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4gbd - gdtotd + RevSumr + gbdpdp - gIdtotd); *(here->BSIM4DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4DPgpPtr +1) += m * (xcdgbr + Gmi); *(here->BSIM4DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); *(here->BSIM4DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); *(here->BSIM4DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); *(here->BSIM4DPbpPtr +1) += m * (xcdbbr + Gmbsi); *(here->BSIM4DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); *(here->BSIM4DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4DdPtr) += m * (gdpr + gdtot); *(here->BSIM4SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); *(here->BSIM4SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); *(here->BSIM4SPgpPtr +1) += m * (xcsgbr - Gmi); *(here->BSIM4SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); *(here->BSIM4SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); *(here->BSIM4SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4gbs - gstots + FwdSumr + gbspsp - gIstots); *(here->BSIM4SPsPtr) -= m * (gspr + gstot); *(here->BSIM4SPbpPtr +1) += m * (xcsbbr - Gmbsi); *(here->BSIM4SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); *(here->BSIM4SspPtr) -= m * (gspr - gstots); *(here->BSIM4SsPtr) += m * (gspr + gstot); *(here->BSIM4BPdpPtr +1) += m * xcbdb; *(here->BSIM4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4BPgpPtr +1) += m * xcbgb; *(here->BSIM4BPgpPtr) -= m * (here->BSIM4gbgs + gIbtotg); *(here->BSIM4BPspPtr +1) += m * xcbsb; *(here->BSIM4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4BPbpPtr +1) += m * xcbbb; *(here->BSIM4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4gbbs - gIbtotb); ggidld = here->BSIM4ggidld; ggidlg = here->BSIM4ggidlg; ggidlb = here->BSIM4ggidlb; ggislg = here->BSIM4ggislg; ggisls = here->BSIM4ggisls; ggislb = here->BSIM4ggislb; /* stamp gidl */ (*(here->BSIM4DPdpPtr) += m * ggidld); (*(here->BSIM4DPgpPtr) += m * ggidlg); (*(here->BSIM4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4DPbpPtr) += m * ggidlb); (*(here->BSIM4BPdpPtr) -= m * ggidld); (*(here->BSIM4BPgpPtr) -= m * ggidlg); (*(here->BSIM4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4SPgpPtr) += m * ggislg); (*(here->BSIM4SPspPtr) += m * ggisls); (*(here->BSIM4SPbpPtr) += m * ggislb); (*(here->BSIM4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4BPgpPtr) -= m * ggislg); (*(here->BSIM4BPspPtr) -= m * ggisls); (*(here->BSIM4BPbpPtr) -= m * ggislb); if (here->BSIM4rbodyMod) { (*(here->BSIM4DPdbPtr +1) += m * xcdbdb); (*(here->BSIM4DPdbPtr) -= m * here->BSIM4gbd); (*(here->BSIM4SPsbPtr +1) += m * xcsbsb); (*(here->BSIM4SPsbPtr) -= m * here->BSIM4gbs); (*(here->BSIM4DBdpPtr +1) += m * xcdbdb); (*(here->BSIM4DBdpPtr) -= m * here->BSIM4gbd); (*(here->BSIM4DBdbPtr +1) -= m * xcdbdb); (*(here->BSIM4DBdbPtr) += m * (here->BSIM4gbd + here->BSIM4grbpd + here->BSIM4grbdb)); (*(here->BSIM4DBbpPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4DBbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BPdbPtr) -= m * here->BSIM4grbpd); (*(here->BSIM4BPbPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BPsbPtr) -= m * here->BSIM4grbps); (*(here->BSIM4BPbpPtr) += m * (here->BSIM4grbpd + here->BSIM4grbps + here->BSIM4grbpb)); /* WDLiu: (-here->BSIM4gbbs) already added to BPbpPtr */ (*(here->BSIM4SBspPtr +1) += m * xcsbsb); (*(here->BSIM4SBspPtr) -= m * here->BSIM4gbs); (*(here->BSIM4SBbpPtr) -= m * here->BSIM4grbps); (*(here->BSIM4SBbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4SBsbPtr +1) -= m * xcsbsb); (*(here->BSIM4SBsbPtr) += m * (here->BSIM4gbs + here->BSIM4grbps + here->BSIM4grbsb)); (*(here->BSIM4BdbPtr) -= m * here->BSIM4grbdb); (*(here->BSIM4BbpPtr) -= m * here->BSIM4grbpb); (*(here->BSIM4BsbPtr) -= m * here->BSIM4grbsb); (*(here->BSIM4BbPtr) += m * (here->BSIM4grbsb + here->BSIM4grbdb + here->BSIM4grbpb)); } /* * WDLiu: The internal charge node generated for transient NQS is not needed for * AC NQS. The following is not doing a real job, but we have to keep it; * otherwise a singular AC NQS matrix may occur if the transient NQS is on. * The charge node is isolated from the instance. */ if (here->BSIM4trnqsMod) { (*(here->BSIM4QqPtr) += m * 1.0); (*(here->BSIM4QgpPtr) += 0.0); (*(here->BSIM4QdpPtr) += 0.0); (*(here->BSIM4QspPtr) += 0.0); (*(here->BSIM4QbpPtr) += 0.0); (*(here->BSIM4DPqPtr) += 0.0); (*(here->BSIM4SPqPtr) += 0.0); (*(here->BSIM4GPqPtr) += 0.0); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4temp.c0000644000265600020320000035736712264261473020636 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4temp.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006. * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 #define DELTA 1.0E-9 #define DEXP(A,B) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ } else { \ B = exp(A); \ } \ } static int BSIM4DioIjthVjmEval( double Nvtm, double Ijth, double Isb, double XExpBV, double *Vjm) { double Tb, Tc, EVjmovNv; Tc = XExpBV; Tb = 1.0 + Ijth / Isb - Tc; EVjmovNv = 0.5 * (Tb + sqrt(Tb * Tb + 4.0 * Tc)); *Vjm = Nvtm * log(EVjmovNv); return 0; } int BSIM4temp( GENmodel *inModel, CKTcircuit *ckt) { BSIM4model *model = (BSIM4model*) inModel; BSIM4instance *here; struct bsim4SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni, epssub; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Lnew=0.0, Wnew; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double dumPs, dumPd, dumAs, dumAd, PowWeffWr; double DMCGeff, DMCIeff, DMDGeff; double Nvtms, Nvtmd, SourceSatCurrent, DrainSatCurrent; double T10, T11; double Inv_saref, Inv_sbref, Inv_sa, Inv_sb, rho, Ldrn, dvth0_lod; double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod; double lnl, lnw, lnnf, rbpbx, rbpby, rbsbx, rbsby, rbdbx, rbdby,bodymode; double kvsat, wlod, sceff, Wdrn; double V0, lt1, ltw, Theta0, Delt_vth, Vth_NarrowW, Lpe_Vb, Vth; double n,n0, Vgsteff, Vgs_eff, niter, toxpf, toxpi, Tcen, toxe, epsrox, vddeot; double vtfbphi2eot, phieot, TempRatioeot, Vtm0eot, Vtmeot,vbieot; int Size_Not_Found, i; /* loop through all the BSIM4 device models */ for (; model != NULL; model = model->BSIM4nextModel) { Temp = ckt->CKTtemp; if (model->BSIM4SbulkJctPotential < 0.1) { model->BSIM4SbulkJctPotential = 0.1; fprintf(stderr, "Given pbs is less than 0.1. Pbs is set to 0.1.\n"); } if (model->BSIM4SsidewallJctPotential < 0.1) { model->BSIM4SsidewallJctPotential = 0.1; fprintf(stderr, "Given pbsws is less than 0.1. Pbsws is set to 0.1.\n"); } if (model->BSIM4SGatesidewallJctPotential < 0.1) { model->BSIM4SGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgs is less than 0.1. Pbswgs is set to 0.1.\n"); } if (model->BSIM4DbulkJctPotential < 0.1) { model->BSIM4DbulkJctPotential = 0.1; fprintf(stderr, "Given pbd is less than 0.1. Pbd is set to 0.1.\n"); } if (model->BSIM4DsidewallJctPotential < 0.1) { model->BSIM4DsidewallJctPotential = 0.1; fprintf(stderr, "Given pbswd is less than 0.1. Pbswd is set to 0.1.\n"); } if (model->BSIM4DGatesidewallJctPotential < 0.1) { model->BSIM4DGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgd is less than 0.1. Pbswgd is set to 0.1.\n"); } if(model->BSIM4mtrlMod == 0) { if ((model->BSIM4toxeGiven) && (model->BSIM4toxpGiven) && (model->BSIM4dtoxGiven) && (model->BSIM4toxe != (model->BSIM4toxp + model->BSIM4dtox))) printf("Warning: toxe, toxp and dtox all given and toxe != toxp + dtox; dtox ignored.\n"); else if ((model->BSIM4toxeGiven) && (!model->BSIM4toxpGiven)) model->BSIM4toxp = model->BSIM4toxe - model->BSIM4dtox; else if ((!model->BSIM4toxeGiven) && (model->BSIM4toxpGiven)){ model->BSIM4toxe = model->BSIM4toxp + model->BSIM4dtox; if (!model->BSIM4toxmGiven) /* v4.7 */ model->BSIM4toxm = model->BSIM4toxe; } } else if(model->BSIM4mtrlCompatMod != 0) /* v4.7 */ { T0 = model->BSIM4epsrox / 3.9; if ((model->BSIM4eotGiven) && (model->BSIM4toxpGiven) && (model->BSIM4dtoxGiven) && (ABS(model->BSIM4eot * T0 - (model->BSIM4toxp + model->BSIM4dtox)) > 1.0e-20)) { printf("Warning: eot, toxp and dtox all given and eot * EPSROX / 3.9 != toxp + dtox; dtox ignored.\n"); } else if ((model->BSIM4eotGiven) && (!model->BSIM4toxpGiven)) model->BSIM4toxp = T0 * model->BSIM4eot - model->BSIM4dtox; else if ((!model->BSIM4eotGiven) && (model->BSIM4toxpGiven)){ model->BSIM4eot = (model->BSIM4toxp + model->BSIM4dtox) / T0; if (!model->BSIM4toxmGiven) model->BSIM4toxm = model->BSIM4eot; } } if(model->BSIM4mtrlMod) { epsrox = 3.9; toxe = model->BSIM4eot; epssub = EPS0 * model->BSIM4epsrsub; } else { epsrox = model->BSIM4epsrox; toxe = model->BSIM4toxe; epssub = EPSSI; } model->BSIM4coxe = epsrox * EPS0 / toxe; if(model->BSIM4mtrlMod == 0 || model->BSIM4mtrlCompatMod != 0) model->BSIM4coxp = model->BSIM4epsrox * EPS0 / model->BSIM4toxp; if (!model->BSIM4cgdoGiven) { if (model->BSIM4dlcGiven && (model->BSIM4dlc > 0.0)) model->BSIM4cgdo = model->BSIM4dlc * model->BSIM4coxe - model->BSIM4cgdl ; else model->BSIM4cgdo = 0.6 * model->BSIM4xj * model->BSIM4coxe; } if (!model->BSIM4cgsoGiven) { if (model->BSIM4dlcGiven && (model->BSIM4dlc > 0.0)) model->BSIM4cgso = model->BSIM4dlc * model->BSIM4coxe - model->BSIM4cgsl ; else model->BSIM4cgso = 0.6 * model->BSIM4xj * model->BSIM4coxe; } if (!model->BSIM4cgboGiven) model->BSIM4cgbo = 2.0 * model->BSIM4dwc * model->BSIM4coxe; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM4tnom; TRatio = Temp / Tnom; model->BSIM4vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM4factor1 = sqrt(epssub / (epsrox * EPS0)* toxe); Vtm0 = model->BSIM4vtm0 = KboQ * Tnom; if(model->BSIM4mtrlMod==0) { Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); } else { Eg0 = model->BSIM4bg0sub - model->BSIM4tbgasub * Tnom * Tnom / (Tnom + model->BSIM4tbgbsub); T0 = model->BSIM4bg0sub - model->BSIM4tbgasub * 90090.0225 / (300.15 + model->BSIM4tbgbsub); ni = model->BSIM4ni0sub * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp((T0 - Eg0) / (2.0 * Vtm0)); } model->BSIM4Eg0 = Eg0; model->BSIM4vtm = KboQ * Temp; if(model->BSIM4mtrlMod == 0) Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); else Eg = model->BSIM4bg0sub - model->BSIM4tbgasub * Temp * Temp / (Temp + model->BSIM4tbgbsub); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM4vtm; T1 = log(Temp / Tnom); T2 = T0 + model->BSIM4SjctTempExponent * T1; T3 = exp(T2 / model->BSIM4SjctEmissionCoeff); model->BSIM4SjctTempSatCurDensity = model->BSIM4SjctSatCurDensity * T3; model->BSIM4SjctSidewallTempSatCurDensity = model->BSIM4SjctSidewallSatCurDensity * T3; model->BSIM4SjctGateSidewallTempSatCurDensity = model->BSIM4SjctGateSidewallSatCurDensity * T3; T2 = T0 + model->BSIM4DjctTempExponent * T1; T3 = exp(T2 / model->BSIM4DjctEmissionCoeff); model->BSIM4DjctTempSatCurDensity = model->BSIM4DjctSatCurDensity * T3; model->BSIM4DjctSidewallTempSatCurDensity = model->BSIM4DjctSidewallSatCurDensity * T3; model->BSIM4DjctGateSidewallTempSatCurDensity = model->BSIM4DjctGateSidewallSatCurDensity * T3; } else { model->BSIM4SjctTempSatCurDensity = model->BSIM4SjctSatCurDensity; model->BSIM4SjctSidewallTempSatCurDensity = model->BSIM4SjctSidewallSatCurDensity; model->BSIM4SjctGateSidewallTempSatCurDensity = model->BSIM4SjctGateSidewallSatCurDensity; model->BSIM4DjctTempSatCurDensity = model->BSIM4DjctSatCurDensity; model->BSIM4DjctSidewallTempSatCurDensity = model->BSIM4DjctSidewallSatCurDensity; model->BSIM4DjctGateSidewallTempSatCurDensity = model->BSIM4DjctGateSidewallSatCurDensity; } if (model->BSIM4SjctTempSatCurDensity < 0.0) model->BSIM4SjctTempSatCurDensity = 0.0; if (model->BSIM4SjctSidewallTempSatCurDensity < 0.0) model->BSIM4SjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4SjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4SjctGateSidewallTempSatCurDensity = 0.0; if (model->BSIM4DjctTempSatCurDensity < 0.0) model->BSIM4DjctTempSatCurDensity = 0.0; if (model->BSIM4DjctSidewallTempSatCurDensity < 0.0) model->BSIM4DjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4DjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4DjctGateSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM4tnom; T0 = model->BSIM4tcj * delTemp; if (T0 >= -1.0) { model->BSIM4SunitAreaTempJctCap = model->BSIM4SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ model->BSIM4DunitAreaTempJctCap = model->BSIM4DunitAreaJctCap *(1.0 + T0); } else { if (model->BSIM4SunitAreaJctCap > 0.0) { model->BSIM4SunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjs to be negative. Cjs is clamped to zero.\n"); } if (model->BSIM4DunitAreaJctCap > 0.0) { model->BSIM4DunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjd to be negative. Cjd is clamped to zero.\n"); } } T0 = model->BSIM4tcjsw * delTemp; if (model->BSIM4SunitLengthSidewallJctCap < 0.0)/*4.6.2*/ {model->BSIM4SunitLengthSidewallJctCap = 0.0; fprintf(stderr, "CJSWS is negative. Cjsws is clamped to zero.\n");} if (model->BSIM4DunitLengthSidewallJctCap < 0.0) {model->BSIM4DunitLengthSidewallJctCap = 0.0; fprintf(stderr, "CJSWD is negative. Cjswd is clamped to zero.\n");} if (T0 >= -1.0) { model->BSIM4SunitLengthSidewallTempJctCap = model->BSIM4SunitLengthSidewallJctCap *(1.0 + T0); model->BSIM4DunitLengthSidewallTempJctCap = model->BSIM4DunitLengthSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4SunitLengthSidewallJctCap > 0.0) { model->BSIM4SunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsws to be negative. Cjsws is clamped to zero.\n"); } if (model->BSIM4DunitLengthSidewallJctCap > 0.0) { model->BSIM4DunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswd to be negative. Cjswd is clamped to zero.\n"); } } T0 = model->BSIM4tcjswg * delTemp; if (T0 >= -1.0) { model->BSIM4SunitLengthGateSidewallTempJctCap = model->BSIM4SunitLengthGateSidewallJctCap *(1.0 + T0); model->BSIM4DunitLengthGateSidewallTempJctCap = model->BSIM4DunitLengthGateSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4SunitLengthGateSidewallJctCap > 0.0) { model->BSIM4SunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgs to be negative. Cjswgs is clamped to zero.\n"); } if (model->BSIM4DunitLengthGateSidewallJctCap > 0.0) { model->BSIM4DunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgd to be negative. Cjswgd is clamped to zero.\n"); } } model->BSIM4PhiBS = model->BSIM4SbulkJctPotential - model->BSIM4tpb * delTemp; if (model->BSIM4PhiBS < 0.01) { model->BSIM4PhiBS = 0.01; fprintf(stderr, "Temperature effect has caused pbs to be less than 0.01. Pbs is clamped to 0.01.\n"); } model->BSIM4PhiBD = model->BSIM4DbulkJctPotential - model->BSIM4tpb * delTemp; if (model->BSIM4PhiBD < 0.01) { model->BSIM4PhiBD = 0.01; fprintf(stderr, "Temperature effect has caused pbd to be less than 0.01. Pbd is clamped to 0.01.\n"); } model->BSIM4PhiBSWS = model->BSIM4SsidewallJctPotential - model->BSIM4tpbsw * delTemp; if (model->BSIM4PhiBSWS <= 0.01) { model->BSIM4PhiBSWS = 0.01; fprintf(stderr, "Temperature effect has caused pbsws to be less than 0.01. Pbsws is clamped to 0.01.\n"); } model->BSIM4PhiBSWD = model->BSIM4DsidewallJctPotential - model->BSIM4tpbsw * delTemp; if (model->BSIM4PhiBSWD <= 0.01) { model->BSIM4PhiBSWD = 0.01; fprintf(stderr, "Temperature effect has caused pbswd to be less than 0.01. Pbswd is clamped to 0.01.\n"); } model->BSIM4PhiBSWGS = model->BSIM4SGatesidewallJctPotential - model->BSIM4tpbswg * delTemp; if (model->BSIM4PhiBSWGS <= 0.01) { model->BSIM4PhiBSWGS = 0.01; fprintf(stderr, "Temperature effect has caused pbswgs to be less than 0.01. Pbswgs is clamped to 0.01.\n"); } model->BSIM4PhiBSWGD = model->BSIM4DGatesidewallJctPotential - model->BSIM4tpbswg * delTemp; if (model->BSIM4PhiBSWGD <= 0.01) { model->BSIM4PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ if (model->BSIM4ijthdfwd <= 0.0) { model->BSIM4ijthdfwd = 0.0; fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4ijthdfwd); } if (model->BSIM4ijthsfwd <= 0.0) { model->BSIM4ijthsfwd = 0.0; fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4ijthsfwd); } if (model->BSIM4ijthdrev <= 0.0) { model->BSIM4ijthdrev = 0.0; fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4ijthdrev); } if (model->BSIM4ijthsrev <= 0.0) { model->BSIM4ijthsrev = 0.0; fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4ijthsrev); } if ((model->BSIM4xjbvd <= 0.0) && (model->BSIM4dioMod == 2)) { model->BSIM4xjbvd = 0.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4xjbvd); } else if ((model->BSIM4xjbvd < 0.0) && (model->BSIM4dioMod == 0)) { model->BSIM4xjbvd = 0.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4xjbvd); } if (model->BSIM4bvd <= 0.0) /*4.6.2*/ { model->BSIM4bvd = 0.0; fprintf(stderr, "BVD reset to %g.\n", model->BSIM4bvd); } if ((model->BSIM4xjbvs <= 0.0) && (model->BSIM4dioMod == 2)) { model->BSIM4xjbvs = 0.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4xjbvs); } else if ((model->BSIM4xjbvs < 0.0) && (model->BSIM4dioMod == 0)) { model->BSIM4xjbvs = 0.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4xjbvs); } if (model->BSIM4bvs <= 0.0) { model->BSIM4bvs = 0.0; fprintf(stderr, "BVS reset to %g.\n", model->BSIM4bvs); } /* loop through all the instances of the model */ for (here = model->BSIM4instances; here != NULL; here = here->BSIM4nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM4l == pSizeDependParamKnot->Length) && (here->BSIM4w == pSizeDependParamKnot->Width) && (here->BSIM4nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } /* stress effect */ Ldrn = here->BSIM4l; Wdrn = here->BSIM4w / here->BSIM4nf; if (Size_Not_Found) { pParam = TMALLOC(struct bsim4SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; pParam->Length = here->BSIM4l; pParam->Width = here->BSIM4w; pParam->NFinger = here->BSIM4nf; Lnew = here->BSIM4l + model->BSIM4xl ; Wnew = here->BSIM4w / here->BSIM4nf + model->BSIM4xw; T0 = pow(Lnew, model->BSIM4Lln); T1 = pow(Wnew, model->BSIM4Lwn); tmp1 = model->BSIM4Ll / T0 + model->BSIM4Lw / T1 + model->BSIM4Lwl / (T0 * T1); pParam->BSIM4dl = model->BSIM4Lint + tmp1; tmp2 = model->BSIM4Llc / T0 + model->BSIM4Lwc / T1 + model->BSIM4Lwlc / (T0 * T1); pParam->BSIM4dlc = model->BSIM4dlc + tmp2; T2 = pow(Lnew, model->BSIM4Wln); T3 = pow(Wnew, model->BSIM4Wwn); tmp1 = model->BSIM4Wl / T2 + model->BSIM4Ww / T3 + model->BSIM4Wwl / (T2 * T3); pParam->BSIM4dw = model->BSIM4Wint + tmp1; tmp2 = model->BSIM4Wlc / T2 + model->BSIM4Wwc / T3 + model->BSIM4Wwlc / (T2 * T3); pParam->BSIM4dwc = model->BSIM4dwc + tmp2; pParam->BSIM4dwj = model->BSIM4dwj + tmp2; pParam->BSIM4leff = Lnew - 2.0 * pParam->BSIM4dl; if (pParam->BSIM4leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weff = Wnew - 2.0 * pParam->BSIM4dw; if (pParam->BSIM4weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM4leffCV = Lnew - 2.0 * pParam->BSIM4dlc; if (pParam->BSIM4leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weffCV = Wnew - 2.0 * pParam->BSIM4dwc; if (pParam->BSIM4weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4weffCJ = Wnew - 2.0 * pParam->BSIM4dwj; if (pParam->BSIM4weffCJ <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror))(ERR_FATAL, "BSIM4: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } if (model->BSIM4binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM4leff; Inv_W = 1.0e-6 / pParam->BSIM4weff; Inv_LW = 1.0e-12 / (pParam->BSIM4leff * pParam->BSIM4weff); } else { Inv_L = 1.0 / pParam->BSIM4leff; Inv_W = 1.0 / pParam->BSIM4weff; Inv_LW = 1.0 / (pParam->BSIM4leff * pParam->BSIM4weff); } pParam->BSIM4cdsc = model->BSIM4cdsc + model->BSIM4lcdsc * Inv_L + model->BSIM4wcdsc * Inv_W + model->BSIM4pcdsc * Inv_LW; pParam->BSIM4cdscb = model->BSIM4cdscb + model->BSIM4lcdscb * Inv_L + model->BSIM4wcdscb * Inv_W + model->BSIM4pcdscb * Inv_LW; pParam->BSIM4cdscd = model->BSIM4cdscd + model->BSIM4lcdscd * Inv_L + model->BSIM4wcdscd * Inv_W + model->BSIM4pcdscd * Inv_LW; pParam->BSIM4cit = model->BSIM4cit + model->BSIM4lcit * Inv_L + model->BSIM4wcit * Inv_W + model->BSIM4pcit * Inv_LW; pParam->BSIM4nfactor = model->BSIM4nfactor + model->BSIM4lnfactor * Inv_L + model->BSIM4wnfactor * Inv_W + model->BSIM4pnfactor * Inv_LW; pParam->BSIM4tnfactor = model->BSIM4tnfactor /* v4.7 */ + model->BSIM4ltnfactor * Inv_L + model->BSIM4wtnfactor * Inv_W + model->BSIM4ptnfactor * Inv_LW; pParam->BSIM4xj = model->BSIM4xj + model->BSIM4lxj * Inv_L + model->BSIM4wxj * Inv_W + model->BSIM4pxj * Inv_LW; pParam->BSIM4vsat = model->BSIM4vsat + model->BSIM4lvsat * Inv_L + model->BSIM4wvsat * Inv_W + model->BSIM4pvsat * Inv_LW; pParam->BSIM4at = model->BSIM4at + model->BSIM4lat * Inv_L + model->BSIM4wat * Inv_W + model->BSIM4pat * Inv_LW; pParam->BSIM4a0 = model->BSIM4a0 + model->BSIM4la0 * Inv_L + model->BSIM4wa0 * Inv_W + model->BSIM4pa0 * Inv_LW; pParam->BSIM4ags = model->BSIM4ags + model->BSIM4lags * Inv_L + model->BSIM4wags * Inv_W + model->BSIM4pags * Inv_LW; pParam->BSIM4a1 = model->BSIM4a1 + model->BSIM4la1 * Inv_L + model->BSIM4wa1 * Inv_W + model->BSIM4pa1 * Inv_LW; pParam->BSIM4a2 = model->BSIM4a2 + model->BSIM4la2 * Inv_L + model->BSIM4wa2 * Inv_W + model->BSIM4pa2 * Inv_LW; pParam->BSIM4keta = model->BSIM4keta + model->BSIM4lketa * Inv_L + model->BSIM4wketa * Inv_W + model->BSIM4pketa * Inv_LW; pParam->BSIM4nsub = model->BSIM4nsub + model->BSIM4lnsub * Inv_L + model->BSIM4wnsub * Inv_W + model->BSIM4pnsub * Inv_LW; pParam->BSIM4ndep = model->BSIM4ndep + model->BSIM4lndep * Inv_L + model->BSIM4wndep * Inv_W + model->BSIM4pndep * Inv_LW; pParam->BSIM4nsd = model->BSIM4nsd + model->BSIM4lnsd * Inv_L + model->BSIM4wnsd * Inv_W + model->BSIM4pnsd * Inv_LW; pParam->BSIM4phin = model->BSIM4phin + model->BSIM4lphin * Inv_L + model->BSIM4wphin * Inv_W + model->BSIM4pphin * Inv_LW; pParam->BSIM4ngate = model->BSIM4ngate + model->BSIM4lngate * Inv_L + model->BSIM4wngate * Inv_W + model->BSIM4pngate * Inv_LW; pParam->BSIM4gamma1 = model->BSIM4gamma1 + model->BSIM4lgamma1 * Inv_L + model->BSIM4wgamma1 * Inv_W + model->BSIM4pgamma1 * Inv_LW; pParam->BSIM4gamma2 = model->BSIM4gamma2 + model->BSIM4lgamma2 * Inv_L + model->BSIM4wgamma2 * Inv_W + model->BSIM4pgamma2 * Inv_LW; pParam->BSIM4vbx = model->BSIM4vbx + model->BSIM4lvbx * Inv_L + model->BSIM4wvbx * Inv_W + model->BSIM4pvbx * Inv_LW; pParam->BSIM4vbm = model->BSIM4vbm + model->BSIM4lvbm * Inv_L + model->BSIM4wvbm * Inv_W + model->BSIM4pvbm * Inv_LW; pParam->BSIM4xt = model->BSIM4xt + model->BSIM4lxt * Inv_L + model->BSIM4wxt * Inv_W + model->BSIM4pxt * Inv_LW; pParam->BSIM4vfb = model->BSIM4vfb + model->BSIM4lvfb * Inv_L + model->BSIM4wvfb * Inv_W + model->BSIM4pvfb * Inv_LW; pParam->BSIM4k1 = model->BSIM4k1 + model->BSIM4lk1 * Inv_L + model->BSIM4wk1 * Inv_W + model->BSIM4pk1 * Inv_LW; pParam->BSIM4kt1 = model->BSIM4kt1 + model->BSIM4lkt1 * Inv_L + model->BSIM4wkt1 * Inv_W + model->BSIM4pkt1 * Inv_LW; pParam->BSIM4kt1l = model->BSIM4kt1l + model->BSIM4lkt1l * Inv_L + model->BSIM4wkt1l * Inv_W + model->BSIM4pkt1l * Inv_LW; pParam->BSIM4k2 = model->BSIM4k2 + model->BSIM4lk2 * Inv_L + model->BSIM4wk2 * Inv_W + model->BSIM4pk2 * Inv_LW; pParam->BSIM4kt2 = model->BSIM4kt2 + model->BSIM4lkt2 * Inv_L + model->BSIM4wkt2 * Inv_W + model->BSIM4pkt2 * Inv_LW; pParam->BSIM4k3 = model->BSIM4k3 + model->BSIM4lk3 * Inv_L + model->BSIM4wk3 * Inv_W + model->BSIM4pk3 * Inv_LW; pParam->BSIM4k3b = model->BSIM4k3b + model->BSIM4lk3b * Inv_L + model->BSIM4wk3b * Inv_W + model->BSIM4pk3b * Inv_LW; pParam->BSIM4w0 = model->BSIM4w0 + model->BSIM4lw0 * Inv_L + model->BSIM4ww0 * Inv_W + model->BSIM4pw0 * Inv_LW; pParam->BSIM4lpe0 = model->BSIM4lpe0 + model->BSIM4llpe0 * Inv_L + model->BSIM4wlpe0 * Inv_W + model->BSIM4plpe0 * Inv_LW; pParam->BSIM4lpeb = model->BSIM4lpeb + model->BSIM4llpeb * Inv_L + model->BSIM4wlpeb * Inv_W + model->BSIM4plpeb * Inv_LW; pParam->BSIM4dvtp0 = model->BSIM4dvtp0 + model->BSIM4ldvtp0 * Inv_L + model->BSIM4wdvtp0 * Inv_W + model->BSIM4pdvtp0 * Inv_LW; pParam->BSIM4dvtp1 = model->BSIM4dvtp1 + model->BSIM4ldvtp1 * Inv_L + model->BSIM4wdvtp1 * Inv_W + model->BSIM4pdvtp1 * Inv_LW; pParam->BSIM4dvtp2 = model->BSIM4dvtp2 /* v4.7 */ + model->BSIM4ldvtp2 * Inv_L + model->BSIM4wdvtp2 * Inv_W + model->BSIM4pdvtp2 * Inv_LW; pParam->BSIM4dvtp3 = model->BSIM4dvtp3 /* v4.7 */ + model->BSIM4ldvtp3 * Inv_L + model->BSIM4wdvtp3 * Inv_W + model->BSIM4pdvtp3 * Inv_LW; pParam->BSIM4dvtp4 = model->BSIM4dvtp4 /* v4.7 */ + model->BSIM4ldvtp4 * Inv_L + model->BSIM4wdvtp4 * Inv_W + model->BSIM4pdvtp4 * Inv_LW; pParam->BSIM4dvtp5 = model->BSIM4dvtp5 /* v4.7 */ + model->BSIM4ldvtp5 * Inv_L + model->BSIM4wdvtp5 * Inv_W + model->BSIM4pdvtp5 * Inv_LW; pParam->BSIM4dvt0 = model->BSIM4dvt0 + model->BSIM4ldvt0 * Inv_L + model->BSIM4wdvt0 * Inv_W + model->BSIM4pdvt0 * Inv_LW; pParam->BSIM4dvt1 = model->BSIM4dvt1 + model->BSIM4ldvt1 * Inv_L + model->BSIM4wdvt1 * Inv_W + model->BSIM4pdvt1 * Inv_LW; pParam->BSIM4dvt2 = model->BSIM4dvt2 + model->BSIM4ldvt2 * Inv_L + model->BSIM4wdvt2 * Inv_W + model->BSIM4pdvt2 * Inv_LW; pParam->BSIM4dvt0w = model->BSIM4dvt0w + model->BSIM4ldvt0w * Inv_L + model->BSIM4wdvt0w * Inv_W + model->BSIM4pdvt0w * Inv_LW; pParam->BSIM4dvt1w = model->BSIM4dvt1w + model->BSIM4ldvt1w * Inv_L + model->BSIM4wdvt1w * Inv_W + model->BSIM4pdvt1w * Inv_LW; pParam->BSIM4dvt2w = model->BSIM4dvt2w + model->BSIM4ldvt2w * Inv_L + model->BSIM4wdvt2w * Inv_W + model->BSIM4pdvt2w * Inv_LW; pParam->BSIM4drout = model->BSIM4drout + model->BSIM4ldrout * Inv_L + model->BSIM4wdrout * Inv_W + model->BSIM4pdrout * Inv_LW; pParam->BSIM4dsub = model->BSIM4dsub + model->BSIM4ldsub * Inv_L + model->BSIM4wdsub * Inv_W + model->BSIM4pdsub * Inv_LW; pParam->BSIM4vth0 = model->BSIM4vth0 + model->BSIM4lvth0 * Inv_L + model->BSIM4wvth0 * Inv_W + model->BSIM4pvth0 * Inv_LW; pParam->BSIM4ua = model->BSIM4ua + model->BSIM4lua * Inv_L + model->BSIM4wua * Inv_W + model->BSIM4pua * Inv_LW; pParam->BSIM4ua1 = model->BSIM4ua1 + model->BSIM4lua1 * Inv_L + model->BSIM4wua1 * Inv_W + model->BSIM4pua1 * Inv_LW; pParam->BSIM4ub = model->BSIM4ub + model->BSIM4lub * Inv_L + model->BSIM4wub * Inv_W + model->BSIM4pub * Inv_LW; pParam->BSIM4ub1 = model->BSIM4ub1 + model->BSIM4lub1 * Inv_L + model->BSIM4wub1 * Inv_W + model->BSIM4pub1 * Inv_LW; pParam->BSIM4uc = model->BSIM4uc + model->BSIM4luc * Inv_L + model->BSIM4wuc * Inv_W + model->BSIM4puc * Inv_LW; pParam->BSIM4uc1 = model->BSIM4uc1 + model->BSIM4luc1 * Inv_L + model->BSIM4wuc1 * Inv_W + model->BSIM4puc1 * Inv_LW; pParam->BSIM4ud = model->BSIM4ud + model->BSIM4lud * Inv_L + model->BSIM4wud * Inv_W + model->BSIM4pud * Inv_LW; pParam->BSIM4ud1 = model->BSIM4ud1 + model->BSIM4lud1 * Inv_L + model->BSIM4wud1 * Inv_W + model->BSIM4pud1 * Inv_LW; pParam->BSIM4up = model->BSIM4up + model->BSIM4lup * Inv_L + model->BSIM4wup * Inv_W + model->BSIM4pup * Inv_LW; pParam->BSIM4lp = model->BSIM4lp + model->BSIM4llp * Inv_L + model->BSIM4wlp * Inv_W + model->BSIM4plp * Inv_LW; pParam->BSIM4eu = model->BSIM4eu + model->BSIM4leu * Inv_L + model->BSIM4weu * Inv_W + model->BSIM4peu * Inv_LW; pParam->BSIM4u0 = model->BSIM4u0 + model->BSIM4lu0 * Inv_L + model->BSIM4wu0 * Inv_W + model->BSIM4pu0 * Inv_LW; pParam->BSIM4ute = model->BSIM4ute + model->BSIM4lute * Inv_L + model->BSIM4wute * Inv_W + model->BSIM4pute * Inv_LW; /*high k mobility*/ pParam->BSIM4ucs = model->BSIM4ucs + model->BSIM4lucs * Inv_L + model->BSIM4wucs * Inv_W + model->BSIM4pucs * Inv_LW; pParam->BSIM4ucste = model->BSIM4ucste + model->BSIM4lucste * Inv_L + model->BSIM4wucste * Inv_W + model->BSIM4pucste * Inv_LW; pParam->BSIM4voff = model->BSIM4voff + model->BSIM4lvoff * Inv_L + model->BSIM4wvoff * Inv_W + model->BSIM4pvoff * Inv_LW; pParam->BSIM4tvoff = model->BSIM4tvoff + model->BSIM4ltvoff * Inv_L + model->BSIM4wtvoff * Inv_W + model->BSIM4ptvoff * Inv_LW; pParam->BSIM4minv = model->BSIM4minv + model->BSIM4lminv * Inv_L + model->BSIM4wminv * Inv_W + model->BSIM4pminv * Inv_LW; pParam->BSIM4minvcv = model->BSIM4minvcv + model->BSIM4lminvcv * Inv_L + model->BSIM4wminvcv * Inv_W + model->BSIM4pminvcv * Inv_LW; pParam->BSIM4fprout = model->BSIM4fprout + model->BSIM4lfprout * Inv_L + model->BSIM4wfprout * Inv_W + model->BSIM4pfprout * Inv_LW; pParam->BSIM4pdits = model->BSIM4pdits + model->BSIM4lpdits * Inv_L + model->BSIM4wpdits * Inv_W + model->BSIM4ppdits * Inv_LW; pParam->BSIM4pditsd = model->BSIM4pditsd + model->BSIM4lpditsd * Inv_L + model->BSIM4wpditsd * Inv_W + model->BSIM4ppditsd * Inv_LW; pParam->BSIM4delta = model->BSIM4delta + model->BSIM4ldelta * Inv_L + model->BSIM4wdelta * Inv_W + model->BSIM4pdelta * Inv_LW; pParam->BSIM4rdsw = model->BSIM4rdsw + model->BSIM4lrdsw * Inv_L + model->BSIM4wrdsw * Inv_W + model->BSIM4prdsw * Inv_LW; pParam->BSIM4rdw = model->BSIM4rdw + model->BSIM4lrdw * Inv_L + model->BSIM4wrdw * Inv_W + model->BSIM4prdw * Inv_LW; pParam->BSIM4rsw = model->BSIM4rsw + model->BSIM4lrsw * Inv_L + model->BSIM4wrsw * Inv_W + model->BSIM4prsw * Inv_LW; pParam->BSIM4prwg = model->BSIM4prwg + model->BSIM4lprwg * Inv_L + model->BSIM4wprwg * Inv_W + model->BSIM4pprwg * Inv_LW; pParam->BSIM4prwb = model->BSIM4prwb + model->BSIM4lprwb * Inv_L + model->BSIM4wprwb * Inv_W + model->BSIM4pprwb * Inv_LW; pParam->BSIM4prt = model->BSIM4prt + model->BSIM4lprt * Inv_L + model->BSIM4wprt * Inv_W + model->BSIM4pprt * Inv_LW; pParam->BSIM4eta0 = model->BSIM4eta0 + model->BSIM4leta0 * Inv_L + model->BSIM4weta0 * Inv_W + model->BSIM4peta0 * Inv_LW; pParam->BSIM4teta0 = model->BSIM4teta0 /* v4.7 */ + model->BSIM4lteta0 * Inv_L + model->BSIM4wteta0 * Inv_W + model->BSIM4pteta0 * Inv_LW; pParam->BSIM4etab = model->BSIM4etab + model->BSIM4letab * Inv_L + model->BSIM4wetab * Inv_W + model->BSIM4petab * Inv_LW; pParam->BSIM4pclm = model->BSIM4pclm + model->BSIM4lpclm * Inv_L + model->BSIM4wpclm * Inv_W + model->BSIM4ppclm * Inv_LW; pParam->BSIM4pdibl1 = model->BSIM4pdibl1 + model->BSIM4lpdibl1 * Inv_L + model->BSIM4wpdibl1 * Inv_W + model->BSIM4ppdibl1 * Inv_LW; pParam->BSIM4pdibl2 = model->BSIM4pdibl2 + model->BSIM4lpdibl2 * Inv_L + model->BSIM4wpdibl2 * Inv_W + model->BSIM4ppdibl2 * Inv_LW; pParam->BSIM4pdiblb = model->BSIM4pdiblb + model->BSIM4lpdiblb * Inv_L + model->BSIM4wpdiblb * Inv_W + model->BSIM4ppdiblb * Inv_LW; pParam->BSIM4pscbe1 = model->BSIM4pscbe1 + model->BSIM4lpscbe1 * Inv_L + model->BSIM4wpscbe1 * Inv_W + model->BSIM4ppscbe1 * Inv_LW; pParam->BSIM4pscbe2 = model->BSIM4pscbe2 + model->BSIM4lpscbe2 * Inv_L + model->BSIM4wpscbe2 * Inv_W + model->BSIM4ppscbe2 * Inv_LW; pParam->BSIM4pvag = model->BSIM4pvag + model->BSIM4lpvag * Inv_L + model->BSIM4wpvag * Inv_W + model->BSIM4ppvag * Inv_LW; pParam->BSIM4wr = model->BSIM4wr + model->BSIM4lwr * Inv_L + model->BSIM4wwr * Inv_W + model->BSIM4pwr * Inv_LW; pParam->BSIM4dwg = model->BSIM4dwg + model->BSIM4ldwg * Inv_L + model->BSIM4wdwg * Inv_W + model->BSIM4pdwg * Inv_LW; pParam->BSIM4dwb = model->BSIM4dwb + model->BSIM4ldwb * Inv_L + model->BSIM4wdwb * Inv_W + model->BSIM4pdwb * Inv_LW; pParam->BSIM4b0 = model->BSIM4b0 + model->BSIM4lb0 * Inv_L + model->BSIM4wb0 * Inv_W + model->BSIM4pb0 * Inv_LW; pParam->BSIM4b1 = model->BSIM4b1 + model->BSIM4lb1 * Inv_L + model->BSIM4wb1 * Inv_W + model->BSIM4pb1 * Inv_LW; pParam->BSIM4alpha0 = model->BSIM4alpha0 + model->BSIM4lalpha0 * Inv_L + model->BSIM4walpha0 * Inv_W + model->BSIM4palpha0 * Inv_LW; pParam->BSIM4alpha1 = model->BSIM4alpha1 + model->BSIM4lalpha1 * Inv_L + model->BSIM4walpha1 * Inv_W + model->BSIM4palpha1 * Inv_LW; pParam->BSIM4beta0 = model->BSIM4beta0 + model->BSIM4lbeta0 * Inv_L + model->BSIM4wbeta0 * Inv_W + model->BSIM4pbeta0 * Inv_LW; pParam->BSIM4agidl = model->BSIM4agidl + model->BSIM4lagidl * Inv_L + model->BSIM4wagidl * Inv_W + model->BSIM4pagidl * Inv_LW; pParam->BSIM4bgidl = model->BSIM4bgidl + model->BSIM4lbgidl * Inv_L + model->BSIM4wbgidl * Inv_W + model->BSIM4pbgidl * Inv_LW; pParam->BSIM4cgidl = model->BSIM4cgidl + model->BSIM4lcgidl * Inv_L + model->BSIM4wcgidl * Inv_W + model->BSIM4pcgidl * Inv_LW; pParam->BSIM4egidl = model->BSIM4egidl + model->BSIM4legidl * Inv_L + model->BSIM4wegidl * Inv_W + model->BSIM4pegidl * Inv_LW; pParam->BSIM4rgidl = model->BSIM4rgidl /* v4.7 New GIDL/GISL */ + model->BSIM4lrgidl * Inv_L + model->BSIM4wrgidl * Inv_W + model->BSIM4prgidl * Inv_LW; pParam->BSIM4kgidl = model->BSIM4kgidl /* v4.7 New GIDL/GISL */ + model->BSIM4lkgidl * Inv_L + model->BSIM4wkgidl * Inv_W + model->BSIM4pkgidl * Inv_LW; pParam->BSIM4fgidl = model->BSIM4fgidl /* v4.7 New GIDL/GISL */ + model->BSIM4lfgidl * Inv_L + model->BSIM4wfgidl * Inv_W + model->BSIM4pfgidl * Inv_LW; pParam->BSIM4agisl = model->BSIM4agisl + model->BSIM4lagisl * Inv_L + model->BSIM4wagisl * Inv_W + model->BSIM4pagisl * Inv_LW; pParam->BSIM4bgisl = model->BSIM4bgisl + model->BSIM4lbgisl * Inv_L + model->BSIM4wbgisl * Inv_W + model->BSIM4pbgisl * Inv_LW; pParam->BSIM4cgisl = model->BSIM4cgisl + model->BSIM4lcgisl * Inv_L + model->BSIM4wcgisl * Inv_W + model->BSIM4pcgisl * Inv_LW; pParam->BSIM4egisl = model->BSIM4egisl + model->BSIM4legisl * Inv_L + model->BSIM4wegisl * Inv_W + model->BSIM4pegisl * Inv_LW; pParam->BSIM4rgisl = model->BSIM4rgisl /* v4.7 New GIDL/GISL */ + model->BSIM4lrgisl * Inv_L + model->BSIM4wrgisl * Inv_W + model->BSIM4prgisl * Inv_LW; pParam->BSIM4kgisl = model->BSIM4kgisl /* v4.7 New GIDL/GISL */ + model->BSIM4lkgisl * Inv_L + model->BSIM4wkgisl * Inv_W + model->BSIM4pkgisl * Inv_LW; pParam->BSIM4fgisl = model->BSIM4fgisl /* v4.7 New GIDL/GISL */ + model->BSIM4lfgisl * Inv_L + model->BSIM4wfgisl * Inv_W + model->BSIM4pfgisl * Inv_LW; pParam->BSIM4aigc = model->BSIM4aigc + model->BSIM4laigc * Inv_L + model->BSIM4waigc * Inv_W + model->BSIM4paigc * Inv_LW; pParam->BSIM4bigc = model->BSIM4bigc + model->BSIM4lbigc * Inv_L + model->BSIM4wbigc * Inv_W + model->BSIM4pbigc * Inv_LW; pParam->BSIM4cigc = model->BSIM4cigc + model->BSIM4lcigc * Inv_L + model->BSIM4wcigc * Inv_W + model->BSIM4pcigc * Inv_LW; pParam->BSIM4aigs = model->BSIM4aigs + model->BSIM4laigs * Inv_L + model->BSIM4waigs * Inv_W + model->BSIM4paigs * Inv_LW; pParam->BSIM4bigs = model->BSIM4bigs + model->BSIM4lbigs * Inv_L + model->BSIM4wbigs * Inv_W + model->BSIM4pbigs * Inv_LW; pParam->BSIM4cigs = model->BSIM4cigs + model->BSIM4lcigs * Inv_L + model->BSIM4wcigs * Inv_W + model->BSIM4pcigs * Inv_LW; pParam->BSIM4aigd = model->BSIM4aigd + model->BSIM4laigd * Inv_L + model->BSIM4waigd * Inv_W + model->BSIM4paigd * Inv_LW; pParam->BSIM4bigd = model->BSIM4bigd + model->BSIM4lbigd * Inv_L + model->BSIM4wbigd * Inv_W + model->BSIM4pbigd * Inv_LW; pParam->BSIM4cigd = model->BSIM4cigd + model->BSIM4lcigd * Inv_L + model->BSIM4wcigd * Inv_W + model->BSIM4pcigd * Inv_LW; pParam->BSIM4aigbacc = model->BSIM4aigbacc + model->BSIM4laigbacc * Inv_L + model->BSIM4waigbacc * Inv_W + model->BSIM4paigbacc * Inv_LW; pParam->BSIM4bigbacc = model->BSIM4bigbacc + model->BSIM4lbigbacc * Inv_L + model->BSIM4wbigbacc * Inv_W + model->BSIM4pbigbacc * Inv_LW; pParam->BSIM4cigbacc = model->BSIM4cigbacc + model->BSIM4lcigbacc * Inv_L + model->BSIM4wcigbacc * Inv_W + model->BSIM4pcigbacc * Inv_LW; pParam->BSIM4aigbinv = model->BSIM4aigbinv + model->BSIM4laigbinv * Inv_L + model->BSIM4waigbinv * Inv_W + model->BSIM4paigbinv * Inv_LW; pParam->BSIM4bigbinv = model->BSIM4bigbinv + model->BSIM4lbigbinv * Inv_L + model->BSIM4wbigbinv * Inv_W + model->BSIM4pbigbinv * Inv_LW; pParam->BSIM4cigbinv = model->BSIM4cigbinv + model->BSIM4lcigbinv * Inv_L + model->BSIM4wcigbinv * Inv_W + model->BSIM4pcigbinv * Inv_LW; pParam->BSIM4nigc = model->BSIM4nigc + model->BSIM4lnigc * Inv_L + model->BSIM4wnigc * Inv_W + model->BSIM4pnigc * Inv_LW; pParam->BSIM4nigbacc = model->BSIM4nigbacc + model->BSIM4lnigbacc * Inv_L + model->BSIM4wnigbacc * Inv_W + model->BSIM4pnigbacc * Inv_LW; pParam->BSIM4nigbinv = model->BSIM4nigbinv + model->BSIM4lnigbinv * Inv_L + model->BSIM4wnigbinv * Inv_W + model->BSIM4pnigbinv * Inv_LW; pParam->BSIM4ntox = model->BSIM4ntox + model->BSIM4lntox * Inv_L + model->BSIM4wntox * Inv_W + model->BSIM4pntox * Inv_LW; pParam->BSIM4eigbinv = model->BSIM4eigbinv + model->BSIM4leigbinv * Inv_L + model->BSIM4weigbinv * Inv_W + model->BSIM4peigbinv * Inv_LW; pParam->BSIM4pigcd = model->BSIM4pigcd + model->BSIM4lpigcd * Inv_L + model->BSIM4wpigcd * Inv_W + model->BSIM4ppigcd * Inv_LW; pParam->BSIM4poxedge = model->BSIM4poxedge + model->BSIM4lpoxedge * Inv_L + model->BSIM4wpoxedge * Inv_W + model->BSIM4ppoxedge * Inv_LW; pParam->BSIM4xrcrg1 = model->BSIM4xrcrg1 + model->BSIM4lxrcrg1 * Inv_L + model->BSIM4wxrcrg1 * Inv_W + model->BSIM4pxrcrg1 * Inv_LW; pParam->BSIM4xrcrg2 = model->BSIM4xrcrg2 + model->BSIM4lxrcrg2 * Inv_L + model->BSIM4wxrcrg2 * Inv_W + model->BSIM4pxrcrg2 * Inv_LW; pParam->BSIM4lambda = model->BSIM4lambda + model->BSIM4llambda * Inv_L + model->BSIM4wlambda * Inv_W + model->BSIM4plambda * Inv_LW; pParam->BSIM4vtl = model->BSIM4vtl + model->BSIM4lvtl * Inv_L + model->BSIM4wvtl * Inv_W + model->BSIM4pvtl * Inv_LW; pParam->BSIM4xn = model->BSIM4xn + model->BSIM4lxn * Inv_L + model->BSIM4wxn * Inv_W + model->BSIM4pxn * Inv_LW; pParam->BSIM4vfbsdoff = model->BSIM4vfbsdoff + model->BSIM4lvfbsdoff * Inv_L + model->BSIM4wvfbsdoff * Inv_W + model->BSIM4pvfbsdoff * Inv_LW; pParam->BSIM4tvfbsdoff = model->BSIM4tvfbsdoff + model->BSIM4ltvfbsdoff * Inv_L + model->BSIM4wtvfbsdoff * Inv_W + model->BSIM4ptvfbsdoff * Inv_LW; pParam->BSIM4cgsl = model->BSIM4cgsl + model->BSIM4lcgsl * Inv_L + model->BSIM4wcgsl * Inv_W + model->BSIM4pcgsl * Inv_LW; pParam->BSIM4cgdl = model->BSIM4cgdl + model->BSIM4lcgdl * Inv_L + model->BSIM4wcgdl * Inv_W + model->BSIM4pcgdl * Inv_LW; pParam->BSIM4ckappas = model->BSIM4ckappas + model->BSIM4lckappas * Inv_L + model->BSIM4wckappas * Inv_W + model->BSIM4pckappas * Inv_LW; pParam->BSIM4ckappad = model->BSIM4ckappad + model->BSIM4lckappad * Inv_L + model->BSIM4wckappad * Inv_W + model->BSIM4pckappad * Inv_LW; pParam->BSIM4cf = model->BSIM4cf + model->BSIM4lcf * Inv_L + model->BSIM4wcf * Inv_W + model->BSIM4pcf * Inv_LW; pParam->BSIM4clc = model->BSIM4clc + model->BSIM4lclc * Inv_L + model->BSIM4wclc * Inv_W + model->BSIM4pclc * Inv_LW; pParam->BSIM4cle = model->BSIM4cle + model->BSIM4lcle * Inv_L + model->BSIM4wcle * Inv_W + model->BSIM4pcle * Inv_LW; pParam->BSIM4vfbcv = model->BSIM4vfbcv + model->BSIM4lvfbcv * Inv_L + model->BSIM4wvfbcv * Inv_W + model->BSIM4pvfbcv * Inv_LW; pParam->BSIM4acde = model->BSIM4acde + model->BSIM4lacde * Inv_L + model->BSIM4wacde * Inv_W + model->BSIM4pacde * Inv_LW; pParam->BSIM4moin = model->BSIM4moin + model->BSIM4lmoin * Inv_L + model->BSIM4wmoin * Inv_W + model->BSIM4pmoin * Inv_LW; pParam->BSIM4noff = model->BSIM4noff + model->BSIM4lnoff * Inv_L + model->BSIM4wnoff * Inv_W + model->BSIM4pnoff * Inv_LW; pParam->BSIM4voffcv = model->BSIM4voffcv + model->BSIM4lvoffcv * Inv_L + model->BSIM4wvoffcv * Inv_W + model->BSIM4pvoffcv * Inv_LW; pParam->BSIM4kvth0we = model->BSIM4kvth0we + model->BSIM4lkvth0we * Inv_L + model->BSIM4wkvth0we * Inv_W + model->BSIM4pkvth0we * Inv_LW; pParam->BSIM4k2we = model->BSIM4k2we + model->BSIM4lk2we * Inv_L + model->BSIM4wk2we * Inv_W + model->BSIM4pk2we * Inv_LW; pParam->BSIM4ku0we = model->BSIM4ku0we + model->BSIM4lku0we * Inv_L + model->BSIM4wku0we * Inv_W + model->BSIM4pku0we * Inv_LW; pParam->BSIM4abulkCVfactor = 1.0 + pow((pParam->BSIM4clc / pParam->BSIM4leffCV), pParam->BSIM4cle); T0 = (TRatio - 1.0); PowWeffWr = pow(pParam->BSIM4weffCJ * 1.0e6, pParam->BSIM4wr) * here->BSIM4nf; T1 = T2 = T3 = T4 = 0.0; pParam->BSIM4ucs = pParam->BSIM4ucs * pow(TRatio, pParam->BSIM4ucste); if(model->BSIM4tempMod == 0) { pParam->BSIM4ua = pParam->BSIM4ua + pParam->BSIM4ua1 * T0; pParam->BSIM4ub = pParam->BSIM4ub + pParam->BSIM4ub1 * T0; pParam->BSIM4uc = pParam->BSIM4uc + pParam->BSIM4uc1 * T0; pParam->BSIM4ud = pParam->BSIM4ud + pParam->BSIM4ud1 * T0; pParam->BSIM4vsattemp = pParam->BSIM4vsat - pParam->BSIM4at * T0; T10 = pParam->BSIM4prt * T0; if(model->BSIM4rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4rdw + T10; T2 = model->BSIM4rdwmin + T10; /* External Rs(V) */ T3 = pParam->BSIM4rsw + T10; T4 = model->BSIM4rswmin + T10; } /* Internal Rds(V) in IV */ pParam->BSIM4rds0 = (pParam->BSIM4rdsw + T10) * here->BSIM4nf / PowWeffWr; pParam->BSIM4rdswmin = (model->BSIM4rdswmin + T10) * here->BSIM4nf / PowWeffWr; } else { if (model->BSIM4tempMod == 3) { pParam->BSIM4ua = pParam->BSIM4ua * pow(TRatio, pParam->BSIM4ua1) ; pParam->BSIM4ub = pParam->BSIM4ub * pow(TRatio, pParam->BSIM4ub1); pParam->BSIM4uc = pParam->BSIM4uc * pow(TRatio, pParam->BSIM4uc1); pParam->BSIM4ud = pParam->BSIM4ud * pow(TRatio, pParam->BSIM4ud1); } else { /* tempMod = 1, 2 */ pParam->BSIM4ua = pParam->BSIM4ua * (1.0 + pParam->BSIM4ua1 * delTemp) ; pParam->BSIM4ub = pParam->BSIM4ub * (1.0 + pParam->BSIM4ub1 * delTemp); pParam->BSIM4uc = pParam->BSIM4uc * (1.0 + pParam->BSIM4uc1 * delTemp); pParam->BSIM4ud = pParam->BSIM4ud * (1.0 + pParam->BSIM4ud1 * delTemp); } pParam->BSIM4vsattemp = pParam->BSIM4vsat * (1.0 - pParam->BSIM4at * delTemp); T10 = 1.0 + pParam->BSIM4prt * delTemp; if(model->BSIM4rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4rdw * T10; T2 = model->BSIM4rdwmin * T10; /* External Rs(V) */ T3 = pParam->BSIM4rsw * T10; T4 = model->BSIM4rswmin * T10; } /* Internal Rds(V) in IV */ pParam->BSIM4rds0 = pParam->BSIM4rdsw * T10 * here->BSIM4nf / PowWeffWr; pParam->BSIM4rdswmin = model->BSIM4rdswmin * T10 * here->BSIM4nf / PowWeffWr; } if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4rd0 = T1 / PowWeffWr; pParam->BSIM4rdwmin = T2 / PowWeffWr; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } if (T4 < 0.0) { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4rs0 = T3 / PowWeffWr; pParam->BSIM4rswmin = T4 / PowWeffWr; if (pParam->BSIM4u0 > 1.0) pParam->BSIM4u0 = pParam->BSIM4u0 / 1.0e4; /* mobility channel length dependence */ T5 = 1.0 - pParam->BSIM4up * exp( - pParam->BSIM4leff / pParam->BSIM4lp); pParam->BSIM4u0temp = pParam->BSIM4u0 * T5 * pow(TRatio, pParam->BSIM4ute); if (pParam->BSIM4eu < 0.0) { pParam->BSIM4eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } if (pParam->BSIM4ucs < 0.0) { pParam->BSIM4ucs = 0.0; printf("Warning: ucs has been negative; reset to 0.0.\n"); } pParam->BSIM4vfbsdoff = pParam->BSIM4vfbsdoff * (1.0 + pParam->BSIM4tvfbsdoff * delTemp); pParam->BSIM4voff = pParam->BSIM4voff * (1.0 + pParam->BSIM4tvoff * delTemp); pParam->BSIM4nfactor = pParam->BSIM4nfactor + pParam->BSIM4tnfactor * delTemp / Tnom; /* v4.7 temp dep of leakage currents */ pParam->BSIM4voffcv = pParam->BSIM4voffcv * (1.0 + pParam->BSIM4tvoffcv * delTemp); /* v4.7 temp dep of leakage currents */ pParam->BSIM4eta0 = pParam->BSIM4eta0 + pParam->BSIM4teta0 * delTemp / Tnom; /* v4.7 temp dep of leakage currents */ /* Source End Velocity Limit */ if((model->BSIM4vtlGiven) && (model->BSIM4vtl > 0.0) ) { if(model->BSIM4lc < 0.0) pParam->BSIM4lc = 0.0; else pParam->BSIM4lc = model->BSIM4lc ; T0 = pParam->BSIM4leff / (pParam->BSIM4xn * pParam->BSIM4leff + pParam->BSIM4lc); pParam->BSIM4tfactor = (1.0 - T0) / (1.0 + T0 ); } pParam->BSIM4cgdo = (model->BSIM4cgdo + pParam->BSIM4cf) * pParam->BSIM4weffCV; pParam->BSIM4cgso = (model->BSIM4cgso + pParam->BSIM4cf) * pParam->BSIM4weffCV; pParam->BSIM4cgbo = model->BSIM4cgbo * pParam->BSIM4leffCV * here->BSIM4nf; if (!model->BSIM4ndepGiven && model->BSIM4gamma1Given) { T0 = pParam->BSIM4gamma1 * model->BSIM4coxe; pParam->BSIM4ndep = 3.01248e22 * T0 * T0; } pParam->BSIM4phi = Vtm0 * log(pParam->BSIM4ndep / ni) + pParam->BSIM4phin + 0.4; pParam->BSIM4sqrtPhi = sqrt(pParam->BSIM4phi); pParam->BSIM4phis3 = pParam->BSIM4sqrtPhi * pParam->BSIM4phi; pParam->BSIM4Xdep0 = sqrt(2.0 * epssub / (Charge_q * pParam->BSIM4ndep * 1.0e6)) * pParam->BSIM4sqrtPhi; pParam->BSIM4sqrtXdep0 = sqrt(pParam->BSIM4Xdep0); if(model->BSIM4mtrlMod == 0) pParam->BSIM4litl = sqrt(3.0 * 3.9 / epsrox * pParam->BSIM4xj * toxe); else pParam->BSIM4litl = sqrt(model->BSIM4epsrsub/epsrox * pParam->BSIM4xj * toxe); pParam->BSIM4vbi = Vtm0 * log(pParam->BSIM4nsd * pParam->BSIM4ndep / (ni * ni)); if (model->BSIM4mtrlMod == 0) { if (pParam->BSIM4ngate > 0.0) { pParam->BSIM4vfbsd = Vtm0 * log(pParam->BSIM4ngate / pParam->BSIM4nsd); } else pParam->BSIM4vfbsd = 0.0; } else { T0 = Vtm0 * log(pParam->BSIM4nsd/ni); T1 = 0.5 * Eg0; if(T0 > T1) T0 = T1; T2 = model->BSIM4easub + T1 - model->BSIM4type * T0; pParam->BSIM4vfbsd = model->BSIM4phig - T2; } pParam->BSIM4cdep0 = sqrt(Charge_q * epssub * pParam->BSIM4ndep * 1.0e6 / 2.0 / pParam->BSIM4phi); pParam->BSIM4ToxRatio = exp(pParam->BSIM4ntox * log(model->BSIM4toxref / toxe)) / toxe / toxe; pParam->BSIM4ToxRatioEdge = exp(pParam->BSIM4ntox * log(model->BSIM4toxref / (toxe * pParam->BSIM4poxedge))) / toxe / toxe / pParam->BSIM4poxedge / pParam->BSIM4poxedge; pParam->BSIM4Aechvb = (model->BSIM4type == NMOS) ? 4.97232e-7 : 3.42537e-7; pParam->BSIM4Bechvb = (model->BSIM4type == NMOS) ? 7.45669e11 : 1.16645e12; pParam->BSIM4AechvbEdgeS = pParam->BSIM4Aechvb * pParam->BSIM4weff * model->BSIM4dlcig * pParam->BSIM4ToxRatioEdge; pParam->BSIM4AechvbEdgeD = pParam->BSIM4Aechvb * pParam->BSIM4weff * model->BSIM4dlcigd * pParam->BSIM4ToxRatioEdge; pParam->BSIM4BechvbEdge = -pParam->BSIM4Bechvb * toxe * pParam->BSIM4poxedge; pParam->BSIM4Aechvb *= pParam->BSIM4weff * pParam->BSIM4leff * pParam->BSIM4ToxRatio; pParam->BSIM4Bechvb *= -toxe; pParam->BSIM4mstar = 0.5 + atan(pParam->BSIM4minv) / PI; pParam->BSIM4mstarcv = 0.5 + atan(pParam->BSIM4minvcv) / PI; pParam->BSIM4voffcbn = pParam->BSIM4voff + model->BSIM4voffl / pParam->BSIM4leff; pParam->BSIM4voffcbncv = pParam->BSIM4voffcv + model->BSIM4voffcvl / pParam->BSIM4leff; pParam->BSIM4ldeb = sqrt(epssub * Vtm0 / (Charge_q * pParam->BSIM4ndep * 1.0e6)) / 3.0; pParam->BSIM4acde *= pow((pParam->BSIM4ndep / 2.0e16), -0.25); if (model->BSIM4k1Given || model->BSIM4k2Given) { if (!model->BSIM4k1Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4k1 = 0.53; } if (!model->BSIM4k2Given) { if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) /* don't print in sensitivity */ fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4k2 = -0.0186; } if ((!ckt->CKTcurJob) || (ckt->CKTcurJob->JOBtype < 9)) { /* don't print in sensitivity */ if (model->BSIM4nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM4xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM4vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM4gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM4gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } } else { if (!model->BSIM4vbxGiven) pParam->BSIM4vbx = pParam->BSIM4phi - 7.7348e-4 * pParam->BSIM4ndep * pParam->BSIM4xt * pParam->BSIM4xt; if (pParam->BSIM4vbx > 0.0) pParam->BSIM4vbx = -pParam->BSIM4vbx; if (pParam->BSIM4vbm > 0.0) pParam->BSIM4vbm = -pParam->BSIM4vbm; if (!model->BSIM4gamma1Given) pParam->BSIM4gamma1 = 5.753e-12 * sqrt(pParam->BSIM4ndep) / model->BSIM4coxe; if (!model->BSIM4gamma2Given) pParam->BSIM4gamma2 = 5.753e-12 * sqrt(pParam->BSIM4nsub) / model->BSIM4coxe; T0 = pParam->BSIM4gamma1 - pParam->BSIM4gamma2; T1 = sqrt(pParam->BSIM4phi - pParam->BSIM4vbx) - pParam->BSIM4sqrtPhi; T2 = sqrt(pParam->BSIM4phi * (pParam->BSIM4phi - pParam->BSIM4vbm)) - pParam->BSIM4phi; pParam->BSIM4k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4vbm); pParam->BSIM4k1 = pParam->BSIM4gamma2 - 2.0 * pParam->BSIM4k2 * sqrt(pParam->BSIM4phi - pParam->BSIM4vbm); } if (!model->BSIM4vfbGiven) { if (model->BSIM4vth0Given) { pParam->BSIM4vfb = model->BSIM4type * pParam->BSIM4vth0 - pParam->BSIM4phi - pParam->BSIM4k1 * pParam->BSIM4sqrtPhi; } else { if ((model->BSIM4mtrlMod) && (model->BSIM4phigGiven) && (model->BSIM4nsubGiven)) { T0 = Vtm0 * log(pParam->BSIM4nsub/ni); T1 = 0.5 * Eg0; if(T0 > T1) T0 = T1; T2 = model->BSIM4easub + T1 + model->BSIM4type * T0; pParam->BSIM4vfb = model->BSIM4phig - T2; } else { pParam->BSIM4vfb = -1.0; } } } if (!model->BSIM4vth0Given) { pParam->BSIM4vth0 = model->BSIM4type * (pParam->BSIM4vfb + pParam->BSIM4phi + pParam->BSIM4k1 * pParam->BSIM4sqrtPhi); } pParam->BSIM4k1ox = pParam->BSIM4k1 * toxe / model->BSIM4toxm; tmp = sqrt(epssub / (epsrox * EPS0) * toxe * pParam->BSIM4Xdep0); T0 = pParam->BSIM4dsub * pParam->BSIM4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; pParam->BSIM4theta0vb0 = T1 / T4; } else pParam->BSIM4theta0vb0 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4drout * pParam->BSIM4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ pParam->BSIM4thetaRout = pParam->BSIM4pdibl1 * T5 + pParam->BSIM4pdibl2; tmp = sqrt(pParam->BSIM4Xdep0); tmp1 = pParam->BSIM4vbi - pParam->BSIM4phi; tmp2 = model->BSIM4factor1 * tmp; T0 = pParam->BSIM4dvt1w * pParam->BSIM4weff * pParam->BSIM4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T8 = T1 / T4; } else T8 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4dvt0w * T8; T8 = T0 * tmp1; T0 = pParam->BSIM4dvt1 * pParam->BSIM4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T9 = T1 / T4; } else T9 = 1.0 / (MAX_EXP - 2.0); T9 = pParam->BSIM4dvt0 * T9 * tmp1; T4 = toxe * pParam->BSIM4phi / (pParam->BSIM4weff + pParam->BSIM4w0); T0 = sqrt(1.0 + pParam->BSIM4lpe0 / pParam->BSIM4leff); if((model->BSIM4tempMod == 1) || (model->BSIM4tempMod == 0)) T3 = (pParam->BSIM4kt1 + pParam->BSIM4kt1l / pParam->BSIM4leff) * (TRatio - 1.0); if((model->BSIM4tempMod == 2)||(model->BSIM4tempMod == 3)) T3 = - pParam->BSIM4kt1 * (TRatio - 1.0); T5 = pParam->BSIM4k1ox * (T0 - 1.0) * pParam->BSIM4sqrtPhi + T3; pParam->BSIM4vfbzbfactor = - T8 - T9 + pParam->BSIM4k3 * T4 + T5 - pParam->BSIM4phi - pParam->BSIM4k1 * pParam->BSIM4sqrtPhi; /* stress effect */ wlod = model->BSIM4wlod; if (model->BSIM4wlod < 0.0) { fprintf(stderr, "Warning: WLOD = %g is less than 0. 0.0 is used\n",model->BSIM4wlod); wlod = 0.0; } T0 = pow(Lnew, model->BSIM4llodku0); W_tmp = Wnew + wlod; T1 = pow(W_tmp, model->BSIM4wlodku0); tmp1 = model->BSIM4lku0 / T0 + model->BSIM4wku0 / T1 + model->BSIM4pku0 / (T0 * T1); pParam->BSIM4ku0 = 1.0 + tmp1; T0 = pow(Lnew, model->BSIM4llodvth); T1 = pow(W_tmp, model->BSIM4wlodvth); tmp1 = model->BSIM4lkvth0 / T0 + model->BSIM4wkvth0 / T1 + model->BSIM4pkvth0 / (T0 * T1); pParam->BSIM4kvth0 = 1.0 + tmp1; pParam->BSIM4kvth0 = sqrt(pParam->BSIM4kvth0*pParam->BSIM4kvth0 + DELTA); T0 = (TRatio - 1.0); pParam->BSIM4ku0temp = pParam->BSIM4ku0 * (1.0 + model->BSIM4tku0 *T0) + DELTA; Inv_saref = 1.0/(model->BSIM4saref + 0.5*Ldrn); Inv_sbref = 1.0/(model->BSIM4sbref + 0.5*Ldrn); pParam->BSIM4inv_od_ref = Inv_saref + Inv_sbref; pParam->BSIM4rho_ref = model->BSIM4ku0 / pParam->BSIM4ku0temp * pParam->BSIM4inv_od_ref; } /* End of SizeNotFound */ /* stress effect */ if( (here->BSIM4sa > 0.0) && (here->BSIM4sb > 0.0) && ((here->BSIM4nf == 1.0) || ((here->BSIM4nf > 1.0) && (here->BSIM4sd > 0.0))) ) { Inv_sa = 0; Inv_sb = 0; kvsat = model->BSIM4kvsat; if (model->BSIM4kvsat < -1.0 ) { fprintf(stderr, "Warning: KVSAT = %g is too small; -1.0 is used.\n",model->BSIM4kvsat); kvsat = -1.0; } if (model->BSIM4kvsat > 1.0) { fprintf(stderr, "Warning: KVSAT = %g is too big; 1.0 is used.\n",model->BSIM4kvsat); kvsat = 1.0; } for(i = 0; i < here->BSIM4nf; i++){ T0 = 1.0 / here->BSIM4nf / (here->BSIM4sa + 0.5*Ldrn + i * (here->BSIM4sd +Ldrn)); T1 = 1.0 / here->BSIM4nf / (here->BSIM4sb + 0.5*Ldrn + i * (here->BSIM4sd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; rho = model->BSIM4ku0 / pParam->BSIM4ku0temp * Inv_ODeff; T0 = (1.0 + rho)/(1.0 + pParam->BSIM4rho_ref); here->BSIM4u0temp = pParam->BSIM4u0temp * T0; T1 = (1.0 + kvsat * rho)/(1.0 + kvsat * pParam->BSIM4rho_ref); here->BSIM4vsattemp = pParam->BSIM4vsattemp * T1; OD_offset = Inv_ODeff - pParam->BSIM4inv_od_ref; dvth0_lod = model->BSIM4kvth0 / pParam->BSIM4kvth0 * OD_offset; dk2_lod = model->BSIM4stk2 / pow(pParam->BSIM4kvth0, model->BSIM4lodk2) * OD_offset; deta0_lod = model->BSIM4steta0 / pow(pParam->BSIM4kvth0, model->BSIM4lodeta0) * OD_offset; here->BSIM4vth0 = pParam->BSIM4vth0 + dvth0_lod; here->BSIM4eta0 = pParam->BSIM4eta0 + deta0_lod; here->BSIM4k2 = pParam->BSIM4k2 + dk2_lod; } else { here->BSIM4u0temp = pParam->BSIM4u0temp; here->BSIM4vth0 = pParam->BSIM4vth0; here->BSIM4vsattemp = pParam->BSIM4vsattemp; here->BSIM4eta0 = pParam->BSIM4eta0; here->BSIM4k2 = pParam->BSIM4k2; } /* Well Proximity Effect */ if (model->BSIM4wpemod) { if( (!here->BSIM4scaGiven) && (!here->BSIM4scbGiven) && (!here->BSIM4sccGiven) ) { if((here->BSIM4scGiven) && (here->BSIM4sc > 0.0) ) { T1 = here->BSIM4sc + Wdrn; T2 = 1.0 / model->BSIM4scref; here->BSIM4sca = model->BSIM4scref * model->BSIM4scref / (here->BSIM4sc * T1); here->BSIM4scb = ( (0.1 * here->BSIM4sc + 0.01 * model->BSIM4scref) * exp(-10.0 * here->BSIM4sc * T2) - (0.1 * T1 + 0.01 * model->BSIM4scref) * exp(-10.0 * T1 * T2) ) / Wdrn; here->BSIM4scc = ( (0.05 * here->BSIM4sc + 0.0025 * model->BSIM4scref) * exp(-20.0 * here->BSIM4sc * T2) - (0.05 * T1 + 0.0025 * model->BSIM4scref) * exp(-20.0 * T1 * T2) ) / Wdrn; } else { fprintf(stderr, "Warning: No WPE as none of SCA, SCB, SCC, SC is given and/or SC not positive.\n"); } } if (here->BSIM4sca < 0.0) { printf("Warning: SCA = %g is negative. Set to 0.0.\n", here->BSIM4sca); here->BSIM4sca = 0.0; } if (here->BSIM4scb < 0.0) { printf("Warning: SCB = %g is negative. Set to 0.0.\n", here->BSIM4scb); here->BSIM4scb = 0.0; } if (here->BSIM4scc < 0.0) { printf("Warning: SCC = %g is negative. Set to 0.0.\n", here->BSIM4scc); here->BSIM4scc = 0.0; } if (here->BSIM4sc < 0.0) { printf("Warning: SC = %g is negative. Set to 0.0.\n", here->BSIM4sc); here->BSIM4sc = 0.0; } /*4.6.2*/ sceff = here->BSIM4sca + model->BSIM4web * here->BSIM4scb + model->BSIM4wec * here->BSIM4scc; here->BSIM4vth0 += pParam->BSIM4kvth0we * sceff; here->BSIM4k2 += pParam->BSIM4k2we * sceff; T3 = 1.0 + pParam->BSIM4ku0we * sceff; if (T3 <= 0.0) { T3 = 0.0; fprintf(stderr, "Warning: ku0we = %g is negatively too high. Negative mobility! \n", pParam->BSIM4ku0we); } here->BSIM4u0temp *= T3; } /* adding delvto */ here->BSIM4vth0 += here->BSIM4delvto; here->BSIM4vfb = pParam->BSIM4vfb + model->BSIM4type * here->BSIM4delvto; /* Instance variables calculation */ T3 = model->BSIM4type * here->BSIM4vth0 - here->BSIM4vfb - pParam->BSIM4phi; T4 = T3 + T3; T5 = 2.5 * T3; here->BSIM4vtfbphi1 = (model->BSIM4type == NMOS) ? T4 : T5; if (here->BSIM4vtfbphi1 < 0.0) here->BSIM4vtfbphi1 = 0.0; here->BSIM4vtfbphi2 = 4.0 * T3; if (here->BSIM4vtfbphi2 < 0.0) here->BSIM4vtfbphi2 = 0.0; if (here->BSIM4k2 < 0.0) { T0 = 0.5 * pParam->BSIM4k1 / here->BSIM4k2; here->BSIM4vbsc = 0.9 * (pParam->BSIM4phi - T0 * T0); if (here->BSIM4vbsc > -3.0) here->BSIM4vbsc = -3.0; else if (here->BSIM4vbsc < -30.0) here->BSIM4vbsc = -30.0; } else here->BSIM4vbsc = -30.0; if (here->BSIM4vbsc > pParam->BSIM4vbm) here->BSIM4vbsc = pParam->BSIM4vbm; here->BSIM4k2ox = here->BSIM4k2 * toxe / model->BSIM4toxm; here->BSIM4vfbzb = pParam->BSIM4vfbzbfactor + model->BSIM4type * here->BSIM4vth0 ; here->BSIM4cgso = pParam->BSIM4cgso; here->BSIM4cgdo = pParam->BSIM4cgdo; lnl = log(pParam->BSIM4leff * 1.0e6); lnw = log(pParam->BSIM4weff * 1.0e6); lnnf = log(here->BSIM4nf); bodymode = 5; if( ( !model->BSIM4rbps0Given) || ( !model->BSIM4rbpd0Given) ) bodymode = 1; else if( (!model->BSIM4rbsbx0Given && !model->BSIM4rbsby0Given) || (!model->BSIM4rbdbx0Given && !model->BSIM4rbdby0Given) ) bodymode = 3; if(here->BSIM4rbodyMod == 2) { if (bodymode == 5) { rbsbx = exp( log(model->BSIM4rbsbx0) + model->BSIM4rbsdbxl * lnl + model->BSIM4rbsdbxw * lnw + model->BSIM4rbsdbxnf * lnnf ); rbsby = exp( log(model->BSIM4rbsby0) + model->BSIM4rbsdbyl * lnl + model->BSIM4rbsdbyw * lnw + model->BSIM4rbsdbynf * lnnf ); here->BSIM4rbsb = rbsbx * rbsby / (rbsbx + rbsby); rbdbx = exp( log(model->BSIM4rbdbx0) + model->BSIM4rbsdbxl * lnl + model->BSIM4rbsdbxw * lnw + model->BSIM4rbsdbxnf * lnnf ); rbdby = exp( log(model->BSIM4rbdby0) + model->BSIM4rbsdbyl * lnl + model->BSIM4rbsdbyw * lnw + model->BSIM4rbsdbynf * lnnf ); here->BSIM4rbdb = rbdbx * rbdby / (rbdbx + rbdby); } if ((bodymode == 3)|| (bodymode == 5)) { here->BSIM4rbps = exp( log(model->BSIM4rbps0) + model->BSIM4rbpsl * lnl + model->BSIM4rbpsw * lnw + model->BSIM4rbpsnf * lnnf ); here->BSIM4rbpd = exp( log(model->BSIM4rbpd0) + model->BSIM4rbpdl * lnl + model->BSIM4rbpdw * lnw + model->BSIM4rbpdnf * lnnf ); } rbpbx = exp( log(model->BSIM4rbpbx0) + model->BSIM4rbpbxl * lnl + model->BSIM4rbpbxw * lnw + model->BSIM4rbpbxnf * lnnf ); rbpby = exp( log(model->BSIM4rbpby0) + model->BSIM4rbpbyl * lnl + model->BSIM4rbpbyw * lnw + model->BSIM4rbpbynf * lnnf ); here->BSIM4rbpb = rbpbx*rbpby/(rbpbx + rbpby); } if ((here->BSIM4rbodyMod == 1 ) || ((here->BSIM4rbodyMod == 2 ) && (bodymode == 5)) ) { if (here->BSIM4rbdb < 1.0e-3) here->BSIM4grbdb = 1.0e3; /* in mho */ else here->BSIM4grbdb = model->BSIM4gbmin + 1.0 / here->BSIM4rbdb; if (here->BSIM4rbpb < 1.0e-3) here->BSIM4grbpb = 1.0e3; else here->BSIM4grbpb = model->BSIM4gbmin + 1.0 / here->BSIM4rbpb; if (here->BSIM4rbps < 1.0e-3) here->BSIM4grbps = 1.0e3; else here->BSIM4grbps = model->BSIM4gbmin + 1.0 / here->BSIM4rbps; if (here->BSIM4rbsb < 1.0e-3) here->BSIM4grbsb = 1.0e3; else here->BSIM4grbsb = model->BSIM4gbmin + 1.0 / here->BSIM4rbsb; if (here->BSIM4rbpd < 1.0e-3) here->BSIM4grbpd = 1.0e3; else here->BSIM4grbpd = model->BSIM4gbmin + 1.0 / here->BSIM4rbpd; } if((here->BSIM4rbodyMod == 2) && (bodymode == 3)) { here->BSIM4grbdb = here->BSIM4grbsb = model->BSIM4gbmin; if (here->BSIM4rbpb < 1.0e-3) here->BSIM4grbpb = 1.0e3; else here->BSIM4grbpb = model->BSIM4gbmin + 1.0 / here->BSIM4rbpb; if (here->BSIM4rbps < 1.0e-3) here->BSIM4grbps = 1.0e3; else here->BSIM4grbps = model->BSIM4gbmin + 1.0 / here->BSIM4rbps; if (here->BSIM4rbpd < 1.0e-3) here->BSIM4grbpd = 1.0e3; else here->BSIM4grbpd = model->BSIM4gbmin + 1.0 / here->BSIM4rbpd; } if((here->BSIM4rbodyMod == 2) && (bodymode == 1)) { here->BSIM4grbdb = here->BSIM4grbsb = model->BSIM4gbmin; here->BSIM4grbps = here->BSIM4grbpd = 1.0e3; if (here->BSIM4rbpb < 1.0e-3) here->BSIM4grbpb = 1.0e3; else here->BSIM4grbpb = model->BSIM4gbmin + 1.0 / here->BSIM4rbpb; } /* * Process geomertry dependent parasitics */ here->BSIM4grgeltd = model->BSIM4rshg * (here->BSIM4xgw + pParam->BSIM4weffCJ / 3.0 / here->BSIM4ngcon) / (here->BSIM4ngcon * here->BSIM4nf * (Lnew - model->BSIM4xgl)); if (here->BSIM4grgeltd > 0.0) here->BSIM4grgeltd = 1.0 / here->BSIM4grgeltd; else { here->BSIM4grgeltd = 1.0e3; /* mho */ if (here->BSIM4rgateMod != 0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } DMCGeff = model->BSIM4dmcg - model->BSIM4dmcgt; DMCIeff = model->BSIM4dmci; DMDGeff = model->BSIM4dmdg - model->BSIM4dmcgt; /* if (here->BSIM4sourcePerimeterGiven) { if (model->BSIM4perMod == 0) here->BSIM4Pseff = here->BSIM4sourcePerimeter; else here->BSIM4Pseff = here->BSIM4sourcePerimeter - pParam->BSIM4weffCJ * here->BSIM4nf; } else BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &(here->BSIM4Pseff), &dumPd, &dumAs, &dumAd); if (here->BSIM4Pseff < 0.0) /4.6.2/ here->BSIM4Pseff = 0.0; */ /* New Diode Model v4.7*/ if (here->BSIM4sourcePerimeterGiven) { /* given */ if (here->BSIM4sourcePerimeter == 0.0) here->BSIM4Pseff = 0.0; else if (here->BSIM4sourcePerimeter < 0.0) { printf("Warning: Source Perimeter is specified as negative, it is set to zero.\n"); here->BSIM4Pseff = 0.0; } else { if (model->BSIM4perMod == 0) here->BSIM4Pseff = here->BSIM4sourcePerimeter; else here->BSIM4Pseff = here->BSIM4sourcePerimeter - pParam->BSIM4weffCJ * here->BSIM4nf; } } else /* not given */ BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &(here->BSIM4Pseff), &dumPd, &dumAs, &dumAd); if (here->BSIM4Pseff < 0.0){ /* v4.7 final check */ here->BSIM4Pseff = 0.0; printf("Warning: Pseff is negative, it is set to zero.\n"); } /* if (here->BSIM4drainPerimeterGiven) { if (model->BSIM4perMod == 0) here->BSIM4Pdeff = here->BSIM4drainPerimeter; else here->BSIM4Pdeff = here->BSIM4drainPerimeter - pParam->BSIM4weffCJ * here->BSIM4nf; } else BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &(here->BSIM4Pdeff), &dumAs, &dumAd); if (here->BSIM4Pdeff < 0.0) /4.6.2/ here->BSIM4Pdeff = 0.0; */ if (here->BSIM4drainPerimeterGiven) { /* given */ if (here->BSIM4drainPerimeter == 0.0) here->BSIM4Pdeff = 0.0; else if (here->BSIM4drainPerimeter < 0.0) { printf("Warning: Drain Perimeter is specified as negative, it is set to zero.\n"); here->BSIM4Pdeff = 0.0; } else { if (model->BSIM4perMod == 0) here->BSIM4Pdeff = here->BSIM4drainPerimeter; else here->BSIM4Pdeff = here->BSIM4drainPerimeter - pParam->BSIM4weffCJ * here->BSIM4nf; } } else /* not given */ BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &(here->BSIM4Pdeff), &dumAs, &dumAd); if (here->BSIM4Pdeff < 0.0){ here->BSIM4Pdeff = 0.0; /*New Diode v4.7*/ printf("Warning: Pdeff is negative, it is set to zero.\n"); } if (here->BSIM4sourceAreaGiven) here->BSIM4Aseff = here->BSIM4sourceArea; else BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &(here->BSIM4Aseff), &dumAd); if (here->BSIM4Aseff < 0.0){ here->BSIM4Aseff = 0.0; /* v4.7 */ printf("Warning: Aseff is negative, it is set to zero.\n"); } if (here->BSIM4drainAreaGiven) here->BSIM4Adeff = here->BSIM4drainArea; else BSIM4PAeffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4min, pParam->BSIM4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &dumAs, &(here->BSIM4Adeff)); if (here->BSIM4Adeff < 0.0){ here->BSIM4Adeff = 0.0; /* v4.7 */ printf("Warning: Adeff is negative, it is set to zero.\n"); } /* Processing S/D resistance and conductance below */ if(here->BSIM4sNodePrime != here->BSIM4sNode) { here->BSIM4sourceConductance = 0.0; if(here->BSIM4sourceSquaresGiven) { here->BSIM4sourceConductance = model->BSIM4sheetResistance * here->BSIM4sourceSquares; } else if (here->BSIM4rgeoMod > 0) { BSIM4RdseffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, pParam->BSIM4weffCJ, model->BSIM4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4sourceConductance)); } else { here->BSIM4sourceConductance = 0.0; } if (here->BSIM4sourceConductance > 0.0) here->BSIM4sourceConductance = 1.0 / here->BSIM4sourceConductance; else { here->BSIM4sourceConductance = 1.0e3; /* mho */ printf ("Warning: Source conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4sourceConductance = 0.0; } if(here->BSIM4dNodePrime != here->BSIM4dNode) { here->BSIM4drainConductance = 0.0; if(here->BSIM4drainSquaresGiven) { here->BSIM4drainConductance = model->BSIM4sheetResistance * here->BSIM4drainSquares; } else if (here->BSIM4rgeoMod > 0) { BSIM4RdseffGeo(here->BSIM4nf, here->BSIM4geoMod, here->BSIM4rgeoMod, here->BSIM4min, pParam->BSIM4weffCJ, model->BSIM4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4drainConductance)); } else { here->BSIM4drainConductance = 0.0; } if (here->BSIM4drainConductance > 0.0) here->BSIM4drainConductance = 1.0 / here->BSIM4drainConductance; else { here->BSIM4drainConductance = 1.0e3; /* mho */ printf ("Warning: Drain conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4drainConductance = 0.0; } /* End of Rsd processing */ Nvtms = model->BSIM4vtm * model->BSIM4SjctEmissionCoeff; if ((here->BSIM4Aseff <= 0.0) && (here->BSIM4Pseff <= 0.0)) { SourceSatCurrent = 0.0; /* v4.7 */ /* SourceSatCurrent = 1.0e-14; */ } else { SourceSatCurrent = here->BSIM4Aseff * model->BSIM4SjctTempSatCurDensity + here->BSIM4Pseff * model->BSIM4SjctSidewallTempSatCurDensity + pParam->BSIM4weffCJ * here->BSIM4nf * model->BSIM4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent > 0.0) { switch(model->BSIM4dioMod) { case 0: if ((model->BSIM4bvs / Nvtms) > EXP_THRESHOLD) here->BSIM4XExpBVS = model->BSIM4xjbvs * MIN_EXP; else here->BSIM4XExpBVS = model->BSIM4xjbvs * exp(-model->BSIM4bvs / Nvtms); break; case 1: BSIM4DioIjthVjmEval(Nvtms, model->BSIM4ijthsfwd, SourceSatCurrent, 0.0, &(here->BSIM4vjsmFwd)); here->BSIM4IVjsmFwd = SourceSatCurrent * exp(here->BSIM4vjsmFwd / Nvtms); break; case 2: if ((model->BSIM4bvs / Nvtms) > EXP_THRESHOLD) { here->BSIM4XExpBVS = model->BSIM4xjbvs * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4XExpBVS = exp(-model->BSIM4bvs / Nvtms); tmp = here->BSIM4XExpBVS; here->BSIM4XExpBVS *= model->BSIM4xjbvs; } BSIM4DioIjthVjmEval(Nvtms, model->BSIM4ijthsfwd, SourceSatCurrent, here->BSIM4XExpBVS, &(here->BSIM4vjsmFwd)); T0 = exp(here->BSIM4vjsmFwd / Nvtms); here->BSIM4IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4XExpBVS / T0 + here->BSIM4XExpBVS - 1.0); here->BSIM4SslpFwd = SourceSatCurrent * (T0 + here->BSIM4XExpBVS / T0) / Nvtms; T2 = model->BSIM4ijthsrev / SourceSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthsrev too small and set to 10 times IsbSat.\n"); } here->BSIM4vjsmRev = -model->BSIM4bvs - Nvtms * log((T2 - 1.0) / model->BSIM4xjbvs); T1 = model->BSIM4xjbvs * exp(-(model->BSIM4bvs + here->BSIM4vjsmRev) / Nvtms); here->BSIM4IVjsmRev = SourceSatCurrent * (1.0 + T1); here->BSIM4SslpRev = -SourceSatCurrent * T1 / Nvtms; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4dioMod); } } Nvtmd = model->BSIM4vtm * model->BSIM4DjctEmissionCoeff; if ((here->BSIM4Adeff <= 0.0) && (here->BSIM4Pdeff <= 0.0)) { /* DrainSatCurrent = 1.0e-14; v4.7 */ DrainSatCurrent = 0.0; } else { DrainSatCurrent = here->BSIM4Adeff * model->BSIM4DjctTempSatCurDensity + here->BSIM4Pdeff * model->BSIM4DjctSidewallTempSatCurDensity + pParam->BSIM4weffCJ * here->BSIM4nf * model->BSIM4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent > 0.0) { switch(model->BSIM4dioMod) { case 0: if ((model->BSIM4bvd / Nvtmd) > EXP_THRESHOLD) here->BSIM4XExpBVD = model->BSIM4xjbvd * MIN_EXP; else here->BSIM4XExpBVD = model->BSIM4xjbvd * exp(-model->BSIM4bvd / Nvtmd); break; case 1: BSIM4DioIjthVjmEval(Nvtmd, model->BSIM4ijthdfwd, DrainSatCurrent, 0.0, &(here->BSIM4vjdmFwd)); here->BSIM4IVjdmFwd = DrainSatCurrent * exp(here->BSIM4vjdmFwd / Nvtmd); break; case 2: if ((model->BSIM4bvd / Nvtmd) > EXP_THRESHOLD) { here->BSIM4XExpBVD = model->BSIM4xjbvd * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4XExpBVD = exp(-model->BSIM4bvd / Nvtmd); tmp = here->BSIM4XExpBVD; here->BSIM4XExpBVD *= model->BSIM4xjbvd; } BSIM4DioIjthVjmEval(Nvtmd, model->BSIM4ijthdfwd, DrainSatCurrent, here->BSIM4XExpBVD, &(here->BSIM4vjdmFwd)); T0 = exp(here->BSIM4vjdmFwd / Nvtmd); here->BSIM4IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4XExpBVD / T0 + here->BSIM4XExpBVD - 1.0); here->BSIM4DslpFwd = DrainSatCurrent * (T0 + here->BSIM4XExpBVD / T0) / Nvtmd; T2 = model->BSIM4ijthdrev / DrainSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthdrev too small and set to 10 times IdbSat.\n"); } here->BSIM4vjdmRev = -model->BSIM4bvd - Nvtmd * log((T2 - 1.0) / model->BSIM4xjbvd); /* bugfix */ T1 = model->BSIM4xjbvd * exp(-(model->BSIM4bvd + here->BSIM4vjdmRev) / Nvtmd); here->BSIM4IVjdmRev = DrainSatCurrent * (1.0 + T1); here->BSIM4DslpRev = -DrainSatCurrent * T1 / Nvtmd; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4dioMod); } } /* GEDL current reverse bias */ T0 = (TRatio - 1.0); model->BSIM4njtsstemp = model->BSIM4njts * (1.0 + model->BSIM4tnjts * T0); model->BSIM4njtsswstemp = model->BSIM4njtssw * (1.0 + model->BSIM4tnjtssw * T0); model->BSIM4njtsswgstemp = model->BSIM4njtsswg * (1.0 + model->BSIM4tnjtsswg * T0); model->BSIM4njtsdtemp = model->BSIM4njtsd * (1.0 + model->BSIM4tnjtsd * T0); model->BSIM4njtsswdtemp = model->BSIM4njtsswd * (1.0 + model->BSIM4tnjtsswd * T0); model->BSIM4njtsswgdtemp = model->BSIM4njtsswgd * (1.0 + model->BSIM4tnjtsswgd * T0); T7 = Eg0 / model->BSIM4vtm * T0; T9 = model->BSIM4xtss * T7; DEXP(T9, T1); T9 = model->BSIM4xtsd * T7; DEXP(T9, T2); T9 = model->BSIM4xtssws * T7; DEXP(T9, T3); T9 = model->BSIM4xtsswd * T7; DEXP(T9, T4); T9 = model->BSIM4xtsswgs * T7; DEXP(T9, T5); T9 = model->BSIM4xtsswgd * T7; DEXP(T9, T6); /*IBM TAT*/ if(model->BSIM4jtweff < 0.0) { model->BSIM4jtweff = 0.0; fprintf(stderr, "TAT width dependence effect is negative. Jtweff is clamped to zero.\n"); } T11 = sqrt(model->BSIM4jtweff / pParam->BSIM4weffCJ) + 1.0; T10 = pParam->BSIM4weffCJ * here->BSIM4nf; here->BSIM4SjctTempRevSatCur = T1 * here->BSIM4Aseff * model->BSIM4jtss; here->BSIM4DjctTempRevSatCur = T2 * here->BSIM4Adeff * model->BSIM4jtsd; here->BSIM4SswTempRevSatCur = T3 * here->BSIM4Pseff * model->BSIM4jtssws; here->BSIM4DswTempRevSatCur = T4 * here->BSIM4Pdeff * model->BSIM4jtsswd; here->BSIM4SswgTempRevSatCur = T5 * T10 * T11 * model->BSIM4jtsswgs; here->BSIM4DswgTempRevSatCur = T6 * T10 * T11 * model->BSIM4jtsswgd; /*high k*/ /*Calculate VgsteffVth for mobMod=3*/ if(model->BSIM4mobMod==3) { /*Calculate n @ Vbs=Vds=0*/ V0 = pParam->BSIM4vbi - pParam->BSIM4phi; lt1 = model->BSIM4factor1* pParam->BSIM4sqrtXdep0; ltw = lt1; T0 = pParam->BSIM4dvt1 * pParam->BSIM4leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; } else Theta0 = 1.0 / (MAX_EXP - 2.0); tmp1 = epssub / pParam->BSIM4Xdep0; here->BSIM4nstar = model->BSIM4vtm / Charge_q * (model->BSIM4coxe + tmp1 + pParam->BSIM4cit); tmp2 = pParam->BSIM4nfactor * tmp1; tmp3 = (tmp2 + pParam->BSIM4cdsc * Theta0 + pParam->BSIM4cit) / model->BSIM4coxe; if (tmp3 >= -0.5) n0 = 1.0 + tmp3; else { T0 = 1.0 / (3.0 + 8.0 * tmp3); n0 = (1.0 + 3.0 * tmp3) * T0; } T0 = n0 * model->BSIM4vtm; T1 = pParam->BSIM4voffcbn; T2 = T1/T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4coxe * MIN_EXP / pParam->BSIM4cdep0; T4 = pParam->BSIM4mstar + T3 * n0; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4coxe * MAX_EXP / pParam->BSIM4cdep0; T4 = pParam->BSIM4mstar + T3 * n0; } else { T3 = exp(T2)* model->BSIM4coxe / pParam->BSIM4cdep0; T4 = pParam->BSIM4mstar + T3 * n0; } pParam->BSIM4VgsteffVth = T0 * log(2.0)/T4; } /* New DITS term added in 4.7 */ T0 = -pParam->BSIM4dvtp3 * log(pParam->BSIM4leff); DEXP(T0, T1); pParam->BSIM4dvtp2factor = pParam->BSIM4dvtp5 + pParam->BSIM4dvtp2 * T1; if(model->BSIM4mtrlMod != 0 && model->BSIM4mtrlCompatMod == 0) { /* Calculate TOXP from EOT */ /* Calculate Vgs_eff @ Vgs = VDD with Poly Depletion Effect */ Vtm0eot = KboQ * model->BSIM4tempeot; Vtmeot = Vtm0eot; vbieot = Vtm0eot * log(pParam->BSIM4nsd * pParam->BSIM4ndep / (ni * ni)); phieot = Vtm0eot * log(pParam->BSIM4ndep / ni) + pParam->BSIM4phin + 0.4; tmp2 = here->BSIM4vfb + phieot; vddeot = model->BSIM4type * model->BSIM4vddeot; T0 = model->BSIM4epsrgate * EPS0; if ((pParam->BSIM4ngate > 1.0e18) && (pParam->BSIM4ngate < 1.0e25) && (vddeot > tmp2) && (T0!=0)) { T1 = 1.0e6 * CHARGE * T0 * pParam->BSIM4ngate / (model->BSIM4coxe * model->BSIM4coxe); T8 = vddeot - tmp2; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = vddeot - T5; } else Vgs_eff = vddeot; /* Calculate Vth @ Vds=Vbs=0 */ V0 = vbieot - phieot; lt1 = model->BSIM4factor1* pParam->BSIM4sqrtXdep0; ltw = lt1; T0 = pParam->BSIM4dvt1 * model->BSIM4leffeot / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; } else Theta0 = 1.0 / (MAX_EXP - 2.0); Delt_vth = pParam->BSIM4dvt0 * Theta0 * V0; T0 = pParam->BSIM4dvt1w * model->BSIM4weffeot * model->BSIM4leffeot / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ T2 = pParam->BSIM4dvt0w * T5 * V0; TempRatioeot = model->BSIM4tempeot / model->BSIM4tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4lpe0 / model->BSIM4leffeot); T1 = pParam->BSIM4k1ox * (T0 - 1.0) * sqrt(phieot) + (pParam->BSIM4kt1 + pParam->BSIM4kt1l / model->BSIM4leffeot) * TempRatioeot; Vth_NarrowW = toxe * phieot / (model->BSIM4weffeot + pParam->BSIM4w0); Lpe_Vb = sqrt(1.0 + pParam->BSIM4lpeb / model->BSIM4leffeot); Vth = model->BSIM4type * here->BSIM4vth0 + (pParam->BSIM4k1ox - pParam->BSIM4k1)*sqrt(phieot)*Lpe_Vb - Delt_vth - T2 + pParam->BSIM4k3 * Vth_NarrowW + T1; /* Calculate n */ tmp1 = epssub / pParam->BSIM4Xdep0; here->BSIM4nstar = Vtmeot / Charge_q * (model->BSIM4coxe + tmp1 + pParam->BSIM4cit); tmp2 = pParam->BSIM4nfactor * tmp1; tmp3 = (tmp2 + pParam->BSIM4cdsc * Theta0 + pParam->BSIM4cit) / model->BSIM4coxe; if (tmp3 >= -0.5) n = 1.0 + tmp3; else { T0 = 1.0 / (3.0 + 8.0 * tmp3); n = (1.0 + 3.0 * tmp3) * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4dvtp0 > 0.0) { T3 = model->BSIM4leffeot + pParam->BSIM4dvtp0 * 2.0; if (model->BSIM4tempMod < 2) T4 = Vtmeot * log(model->BSIM4leffeot / T3); else T4 = Vtm0eot * log(model->BSIM4leffeot / T3); Vth -= n * T4; } Vgsteff = Vgs_eff-Vth; /* calculating Toxp */ T3 = model->BSIM4type * here->BSIM4vth0 - here->BSIM4vfb - phieot; T4 = T3 + T3; T5 = 2.5 * T3; vtfbphi2eot = 4.0 * T3; if (vtfbphi2eot < 0.0) vtfbphi2eot = 0.0; niter = 0; toxpf = toxe; do { toxpi = toxpf; tmp2 = 2.0e8 * toxpf; T0 = (Vgsteff + vtfbphi2eot) / tmp2; T1 = 1.0 + exp(model->BSIM4bdos * 0.7 * log(T0)); Tcen = model->BSIM4ados * 1.9e-9 / T1; toxpf = toxe - epsrox/model->BSIM4epsrsub * Tcen; niter++; } while ((niter<=4)&&(ABS(toxpf-toxpi)>1e-12)); model->BSIM4toxp = toxpf; model->BSIM4coxp = epsrox * EPS0 / model->BSIM4toxp; } if (BSIM4checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM4modName; namarray[1] = here->BSIM4name; (*(SPfrontEnd->IFerror)) (ERR_FATAL, "Fatal error(s) detected during BSIM4.6.0 parameter checking for %s in model %s", namarray); return(E_BADPARM); } } /* End instance */ } return(OK); } ngspice-26/src/spicelib/devices/bsim4/b4mpar.c0000644000265600020320000037161712264261473020622 0ustar andreasadmin/**** BSIM4.7.0 Released by Darsen Lu 04/08/2011 ****/ /********** * Copyright 2006 Regents of the University of California. All rights reserved. * File: b4mpar.c of BSIM4.7.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Mohan Dunga, Ali Niknejad, Chenming Hu. * Authors: 2006- Mohan Dunga, Ali Niknejad, Chenming Hu * Authors: 2007- Mohan Dunga, Wenwei Yang, Ali Niknejad, Chenming Hu * Authors: 2008- Wenwei Yang, Ali Niknejad, Chenming Hu * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. * Modified by Xuemei Xi, Mohan Dunga, 07/29/2005. * Modified by Mohan Dunga, 12/13/2006 * Modified by Mohan Dunga, Wenwei Yang, 05/18/2007. * Modified by Wenwei Yang, 07/31/2008. * Modified by Tanvir Morshed, Darsen Lu 03/27/2011 **********/ #include "ngspice/ngspice.h" #include "bsim4def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/const.h" int BSIM4mParam( int param, IFvalue *value, GENmodel *inMod) { BSIM4model *mod = (BSIM4model*)inMod; switch(param) { case BSIM4_MOD_MOBMOD : mod->BSIM4mobMod = value->iValue; mod->BSIM4mobModGiven = TRUE; break; case BSIM4_MOD_BINUNIT : mod->BSIM4binUnit = value->iValue; mod->BSIM4binUnitGiven = TRUE; break; case BSIM4_MOD_PARAMCHK : mod->BSIM4paramChk = value->iValue; mod->BSIM4paramChkGiven = TRUE; break; case BSIM4_MOD_CVCHARGEMOD : mod->BSIM4cvchargeMod = value->iValue; mod->BSIM4cvchargeModGiven = TRUE; break; case BSIM4_MOD_CAPMOD : mod->BSIM4capMod = value->iValue; mod->BSIM4capModGiven = TRUE; break; case BSIM4_MOD_DIOMOD : mod->BSIM4dioMod = value->iValue; mod->BSIM4dioModGiven = TRUE; break; case BSIM4_MOD_RDSMOD : mod->BSIM4rdsMod = value->iValue; mod->BSIM4rdsModGiven = TRUE; break; case BSIM4_MOD_TRNQSMOD : mod->BSIM4trnqsMod = value->iValue; mod->BSIM4trnqsModGiven = TRUE; break; case BSIM4_MOD_ACNQSMOD : mod->BSIM4acnqsMod = value->iValue; mod->BSIM4acnqsModGiven = TRUE; break; case BSIM4_MOD_RBODYMOD : mod->BSIM4rbodyMod = value->iValue; mod->BSIM4rbodyModGiven = TRUE; break; case BSIM4_MOD_RGATEMOD : mod->BSIM4rgateMod = value->iValue; mod->BSIM4rgateModGiven = TRUE; break; case BSIM4_MOD_PERMOD : mod->BSIM4perMod = value->iValue; mod->BSIM4perModGiven = TRUE; break; case BSIM4_MOD_GEOMOD : mod->BSIM4geoMod = value->iValue; mod->BSIM4geoModGiven = TRUE; break; case BSIM4_MOD_RGEOMOD : mod->BSIM4rgeoMod = value->iValue; mod->BSIM4rgeoModGiven = TRUE; break; case BSIM4_MOD_FNOIMOD : mod->BSIM4fnoiMod = value->iValue; mod->BSIM4fnoiModGiven = TRUE; break; case BSIM4_MOD_TNOIMOD : mod->BSIM4tnoiMod = value->iValue; mod->BSIM4tnoiModGiven = TRUE; break; case BSIM4_MOD_MTRLMOD : mod->BSIM4mtrlMod = value->iValue; mod->BSIM4mtrlModGiven = TRUE; break; case BSIM4_MOD_MTRLCOMPATMOD : mod->BSIM4mtrlCompatMod = value->iValue; mod->BSIM4mtrlCompatModGiven = TRUE; break; case BSIM4_MOD_GIDLMOD : /* v4.7 New GIDL/GISL */ mod->BSIM4gidlMod = value->iValue; mod->BSIM4gidlModGiven = TRUE; break; case BSIM4_MOD_IGCMOD : mod->BSIM4igcMod = value->iValue; mod->BSIM4igcModGiven = TRUE; break; case BSIM4_MOD_IGBMOD : mod->BSIM4igbMod = value->iValue; mod->BSIM4igbModGiven = TRUE; break; case BSIM4_MOD_TEMPMOD : mod->BSIM4tempMod = value->iValue; mod->BSIM4tempModGiven = TRUE; break; case BSIM4_MOD_VERSION : mod->BSIM4version = value->sValue; mod->BSIM4versionGiven = TRUE; break; case BSIM4_MOD_TOXREF : mod->BSIM4toxref = value->rValue; mod->BSIM4toxrefGiven = TRUE; break; case BSIM4_MOD_EOT : mod->BSIM4eot = value->rValue; mod->BSIM4eotGiven = TRUE; break; case BSIM4_MOD_VDDEOT : mod->BSIM4vddeot = value->rValue; mod->BSIM4vddeotGiven = TRUE; break; case BSIM4_MOD_TEMPEOT : mod->BSIM4tempeot = value->rValue; mod->BSIM4tempeotGiven = TRUE; break; case BSIM4_MOD_LEFFEOT : mod->BSIM4leffeot = value->rValue; mod->BSIM4leffeotGiven = TRUE; break; case BSIM4_MOD_WEFFEOT : mod->BSIM4weffeot = value->rValue; mod->BSIM4weffeotGiven = TRUE; break; case BSIM4_MOD_ADOS : mod->BSIM4ados = value->rValue; mod->BSIM4adosGiven = TRUE; break; case BSIM4_MOD_BDOS : mod->BSIM4bdos = value->rValue; mod->BSIM4bdosGiven = TRUE; break; case BSIM4_MOD_TOXE : mod->BSIM4toxe = value->rValue; mod->BSIM4toxeGiven = TRUE; break; case BSIM4_MOD_TOXP : mod->BSIM4toxp = value->rValue; mod->BSIM4toxpGiven = TRUE; break; case BSIM4_MOD_TOXM : mod->BSIM4toxm = value->rValue; mod->BSIM4toxmGiven = TRUE; break; case BSIM4_MOD_DTOX : mod->BSIM4dtox = value->rValue; mod->BSIM4dtoxGiven = TRUE; break; case BSIM4_MOD_EPSROX : mod->BSIM4epsrox = value->rValue; mod->BSIM4epsroxGiven = TRUE; break; case BSIM4_MOD_CDSC : mod->BSIM4cdsc = value->rValue; mod->BSIM4cdscGiven = TRUE; break; case BSIM4_MOD_CDSCB : mod->BSIM4cdscb = value->rValue; mod->BSIM4cdscbGiven = TRUE; break; case BSIM4_MOD_CDSCD : mod->BSIM4cdscd = value->rValue; mod->BSIM4cdscdGiven = TRUE; break; case BSIM4_MOD_CIT : mod->BSIM4cit = value->rValue; mod->BSIM4citGiven = TRUE; break; case BSIM4_MOD_NFACTOR : mod->BSIM4nfactor = value->rValue; mod->BSIM4nfactorGiven = TRUE; break; case BSIM4_MOD_XJ: mod->BSIM4xj = value->rValue; mod->BSIM4xjGiven = TRUE; break; case BSIM4_MOD_VSAT: mod->BSIM4vsat = value->rValue; mod->BSIM4vsatGiven = TRUE; break; case BSIM4_MOD_A0: mod->BSIM4a0 = value->rValue; mod->BSIM4a0Given = TRUE; break; case BSIM4_MOD_AGS: mod->BSIM4ags= value->rValue; mod->BSIM4agsGiven = TRUE; break; case BSIM4_MOD_A1: mod->BSIM4a1 = value->rValue; mod->BSIM4a1Given = TRUE; break; case BSIM4_MOD_A2: mod->BSIM4a2 = value->rValue; mod->BSIM4a2Given = TRUE; break; case BSIM4_MOD_AT: mod->BSIM4at = value->rValue; mod->BSIM4atGiven = TRUE; break; case BSIM4_MOD_KETA: mod->BSIM4keta = value->rValue; mod->BSIM4ketaGiven = TRUE; break; case BSIM4_MOD_NSUB: mod->BSIM4nsub = value->rValue; mod->BSIM4nsubGiven = TRUE; break; case BSIM4_MOD_PHIG: mod->BSIM4phig = value->rValue; mod->BSIM4phigGiven = TRUE; break; case BSIM4_MOD_EPSRGATE: mod->BSIM4epsrgate = value->rValue; mod->BSIM4epsrgateGiven = TRUE; break; case BSIM4_MOD_EASUB: mod->BSIM4easub = value->rValue; mod->BSIM4easubGiven = TRUE; break; case BSIM4_MOD_EPSRSUB: mod->BSIM4epsrsub = value->rValue; mod->BSIM4epsrsubGiven = TRUE; break; case BSIM4_MOD_NI0SUB: mod->BSIM4ni0sub = value->rValue; mod->BSIM4ni0subGiven = TRUE; break; case BSIM4_MOD_BG0SUB: mod->BSIM4bg0sub = value->rValue; mod->BSIM4bg0subGiven = TRUE; break; case BSIM4_MOD_TBGASUB: mod->BSIM4tbgasub = value->rValue; mod->BSIM4tbgasubGiven = TRUE; break; case BSIM4_MOD_TBGBSUB: mod->BSIM4tbgbsub = value->rValue; mod->BSIM4tbgbsubGiven = TRUE; break; case BSIM4_MOD_NDEP: mod->BSIM4ndep = value->rValue; mod->BSIM4ndepGiven = TRUE; if (mod->BSIM4ndep > 1.0e20) mod->BSIM4ndep *= 1.0e-6; break; case BSIM4_MOD_NSD: mod->BSIM4nsd = value->rValue; mod->BSIM4nsdGiven = TRUE; if (mod->BSIM4nsd > 1.0e23) mod->BSIM4nsd *= 1.0e-6; break; case BSIM4_MOD_NGATE: mod->BSIM4ngate = value->rValue; mod->BSIM4ngateGiven = TRUE; if (mod->BSIM4ngate > 1.0e23) mod->BSIM4ngate *= 1.0e-6; break; case BSIM4_MOD_GAMMA1: mod->BSIM4gamma1 = value->rValue; mod->BSIM4gamma1Given = TRUE; break; case BSIM4_MOD_GAMMA2: mod->BSIM4gamma2 = value->rValue; mod->BSIM4gamma2Given = TRUE; break; case BSIM4_MOD_VBX: mod->BSIM4vbx = value->rValue; mod->BSIM4vbxGiven = TRUE; break; case BSIM4_MOD_VBM: mod->BSIM4vbm = value->rValue; mod->BSIM4vbmGiven = TRUE; break; case BSIM4_MOD_XT: mod->BSIM4xt = value->rValue; mod->BSIM4xtGiven = TRUE; break; case BSIM4_MOD_K1: mod->BSIM4k1 = value->rValue; mod->BSIM4k1Given = TRUE; break; case BSIM4_MOD_KT1: mod->BSIM4kt1 = value->rValue; mod->BSIM4kt1Given = TRUE; break; case BSIM4_MOD_KT1L: mod->BSIM4kt1l = value->rValue; mod->BSIM4kt1lGiven = TRUE; break; case BSIM4_MOD_KT2: mod->BSIM4kt2 = value->rValue; mod->BSIM4kt2Given = TRUE; break; case BSIM4_MOD_K2: mod->BSIM4k2 = value->rValue; mod->BSIM4k2Given = TRUE; break; case BSIM4_MOD_K3: mod->BSIM4k3 = value->rValue; mod->BSIM4k3Given = TRUE; break; case BSIM4_MOD_K3B: mod->BSIM4k3b = value->rValue; mod->BSIM4k3bGiven = TRUE; break; case BSIM4_MOD_LPE0: mod->BSIM4lpe0 = value->rValue; mod->BSIM4lpe0Given = TRUE; break; case BSIM4_MOD_LPEB: mod->BSIM4lpeb = value->rValue; mod->BSIM4lpebGiven = TRUE; break; case BSIM4_MOD_DVTP0: mod->BSIM4dvtp0 = value->rValue; mod->BSIM4dvtp0Given = TRUE; break; case BSIM4_MOD_DVTP1: mod->BSIM4dvtp1 = value->rValue; mod->BSIM4dvtp1Given = TRUE; break; case BSIM4_MOD_DVTP2: /* New DIBL/Rout */ mod->BSIM4dvtp2 = value->rValue; mod->BSIM4dvtp2Given = TRUE; break; case BSIM4_MOD_DVTP3: mod->BSIM4dvtp3 = value->rValue; mod->BSIM4dvtp3Given = TRUE; break; case BSIM4_MOD_DVTP4: mod->BSIM4dvtp4 = value->rValue; mod->BSIM4dvtp4Given = TRUE; break; case BSIM4_MOD_DVTP5: mod->BSIM4dvtp5 = value->rValue; mod->BSIM4dvtp5Given = TRUE; break; case BSIM4_MOD_W0: mod->BSIM4w0 = value->rValue; mod->BSIM4w0Given = TRUE; break; case BSIM4_MOD_DVT0: mod->BSIM4dvt0 = value->rValue; mod->BSIM4dvt0Given = TRUE; break; case BSIM4_MOD_DVT1: mod->BSIM4dvt1 = value->rValue; mod->BSIM4dvt1Given = TRUE; break; case BSIM4_MOD_DVT2: mod->BSIM4dvt2 = value->rValue; mod->BSIM4dvt2Given = TRUE; break; case BSIM4_MOD_DVT0W: mod->BSIM4dvt0w = value->rValue; mod->BSIM4dvt0wGiven = TRUE; break; case BSIM4_MOD_DVT1W: mod->BSIM4dvt1w = value->rValue; mod->BSIM4dvt1wGiven = TRUE; break; case BSIM4_MOD_DVT2W: mod->BSIM4dvt2w = value->rValue; mod->BSIM4dvt2wGiven = TRUE; break; case BSIM4_MOD_DROUT: mod->BSIM4drout = value->rValue; mod->BSIM4droutGiven = TRUE; break; case BSIM4_MOD_DSUB: mod->BSIM4dsub = value->rValue; mod->BSIM4dsubGiven = TRUE; break; case BSIM4_MOD_VTH0: mod->BSIM4vth0 = value->rValue; mod->BSIM4vth0Given = TRUE; break; case BSIM4_MOD_EU: mod->BSIM4eu = value->rValue; mod->BSIM4euGiven = TRUE; break; case BSIM4_MOD_UCS: mod->BSIM4ucs = value->rValue; mod->BSIM4ucsGiven = TRUE; break; case BSIM4_MOD_UA: mod->BSIM4ua = value->rValue; mod->BSIM4uaGiven = TRUE; break; case BSIM4_MOD_UA1: mod->BSIM4ua1 = value->rValue; mod->BSIM4ua1Given = TRUE; break; case BSIM4_MOD_UB: mod->BSIM4ub = value->rValue; mod->BSIM4ubGiven = TRUE; break; case BSIM4_MOD_UB1: mod->BSIM4ub1 = value->rValue; mod->BSIM4ub1Given = TRUE; break; case BSIM4_MOD_UC: mod->BSIM4uc = value->rValue; mod->BSIM4ucGiven = TRUE; break; case BSIM4_MOD_UC1: mod->BSIM4uc1 = value->rValue; mod->BSIM4uc1Given = TRUE; break; case BSIM4_MOD_U0 : mod->BSIM4u0 = value->rValue; mod->BSIM4u0Given = TRUE; break; case BSIM4_MOD_UTE : mod->BSIM4ute = value->rValue; mod->BSIM4uteGiven = TRUE; break; case BSIM4_MOD_UCSTE : mod->BSIM4ucste = value->rValue; mod->BSIM4ucsteGiven = TRUE; break; case BSIM4_MOD_UD: mod->BSIM4ud = value->rValue; mod->BSIM4udGiven = TRUE; break; case BSIM4_MOD_UD1: mod->BSIM4ud1 = value->rValue; mod->BSIM4ud1Given = TRUE; break; case BSIM4_MOD_UP: mod->BSIM4up = value->rValue; mod->BSIM4upGiven = TRUE; break; case BSIM4_MOD_LP: mod->BSIM4lp = value->rValue; mod->BSIM4lpGiven = TRUE; break; case BSIM4_MOD_LUD: mod->BSIM4lud = value->rValue; mod->BSIM4ludGiven = TRUE; break; case BSIM4_MOD_LUD1: mod->BSIM4lud1 = value->rValue; mod->BSIM4lud1Given = TRUE; break; case BSIM4_MOD_LUP: mod->BSIM4lup = value->rValue; mod->BSIM4lupGiven = TRUE; break; case BSIM4_MOD_LLP: mod->BSIM4llp = value->rValue; mod->BSIM4llpGiven = TRUE; break; case BSIM4_MOD_WUD: mod->BSIM4wud = value->rValue; mod->BSIM4wudGiven = TRUE; break; case BSIM4_MOD_WUD1: mod->BSIM4wud1 = value->rValue; mod->BSIM4wud1Given = TRUE; break; case BSIM4_MOD_WUP: mod->BSIM4wup = value->rValue; mod->BSIM4wupGiven = TRUE; break; case BSIM4_MOD_WLP: mod->BSIM4wlp = value->rValue; mod->BSIM4wlpGiven = TRUE; break; case BSIM4_MOD_PUD: mod->BSIM4pud = value->rValue; mod->BSIM4pudGiven = TRUE; break; case BSIM4_MOD_PUD1: mod->BSIM4pud1 = value->rValue; mod->BSIM4pud1Given = TRUE; break; case BSIM4_MOD_PUP: mod->BSIM4pup = value->rValue; mod->BSIM4pupGiven = TRUE; break; case BSIM4_MOD_PLP: mod->BSIM4plp = value->rValue; mod->BSIM4plpGiven = TRUE; break; case BSIM4_MOD_VOFF: mod->BSIM4voff = value->rValue; mod->BSIM4voffGiven = TRUE; break; case BSIM4_MOD_TVOFF: mod->BSIM4tvoff = value->rValue; mod->BSIM4tvoffGiven = TRUE; break; case BSIM4_MOD_TNFACTOR: /* v4.7 temp dep of leakage current */ mod->BSIM4tnfactor = value->rValue; mod->BSIM4tnfactorGiven = TRUE; break; case BSIM4_MOD_TETA0: /* v4.7 temp dep of leakage current */ mod->BSIM4teta0 = value->rValue; mod->BSIM4teta0Given = TRUE; break; case BSIM4_MOD_TVOFFCV: /* v4.7 temp dep of leakage current */ mod->BSIM4tvoffcv = value->rValue; mod->BSIM4tvoffcvGiven = TRUE; break; case BSIM4_MOD_VOFFL: mod->BSIM4voffl = value->rValue; mod->BSIM4vofflGiven = TRUE; break; case BSIM4_MOD_VOFFCVL: mod->BSIM4voffcvl = value->rValue; mod->BSIM4voffcvlGiven = TRUE; break; case BSIM4_MOD_MINV: mod->BSIM4minv = value->rValue; mod->BSIM4minvGiven = TRUE; break; case BSIM4_MOD_MINVCV: mod->BSIM4minvcv = value->rValue; mod->BSIM4minvcvGiven = TRUE; break; case BSIM4_MOD_FPROUT: mod->BSIM4fprout = value->rValue; mod->BSIM4fproutGiven = TRUE; break; case BSIM4_MOD_PDITS: mod->BSIM4pdits = value->rValue; mod->BSIM4pditsGiven = TRUE; break; case BSIM4_MOD_PDITSD: mod->BSIM4pditsd = value->rValue; mod->BSIM4pditsdGiven = TRUE; break; case BSIM4_MOD_PDITSL: mod->BSIM4pditsl = value->rValue; mod->BSIM4pditslGiven = TRUE; break; case BSIM4_MOD_DELTA : mod->BSIM4delta = value->rValue; mod->BSIM4deltaGiven = TRUE; break; case BSIM4_MOD_RDSW: mod->BSIM4rdsw = value->rValue; mod->BSIM4rdswGiven = TRUE; break; case BSIM4_MOD_RDSWMIN: mod->BSIM4rdswmin = value->rValue; mod->BSIM4rdswminGiven = TRUE; break; case BSIM4_MOD_RDWMIN: mod->BSIM4rdwmin = value->rValue; mod->BSIM4rdwminGiven = TRUE; break; case BSIM4_MOD_RSWMIN: mod->BSIM4rswmin = value->rValue; mod->BSIM4rswminGiven = TRUE; break; case BSIM4_MOD_RDW: mod->BSIM4rdw = value->rValue; mod->BSIM4rdwGiven = TRUE; break; case BSIM4_MOD_RSW: mod->BSIM4rsw = value->rValue; mod->BSIM4rswGiven = TRUE; break; case BSIM4_MOD_PRWG: mod->BSIM4prwg = value->rValue; mod->BSIM4prwgGiven = TRUE; break; case BSIM4_MOD_PRWB: mod->BSIM4prwb = value->rValue; mod->BSIM4prwbGiven = TRUE; break; case BSIM4_MOD_PRT: mod->BSIM4prt = value->rValue; mod->BSIM4prtGiven = TRUE; break; case BSIM4_MOD_ETA0: mod->BSIM4eta0 = value->rValue; mod->BSIM4eta0Given = TRUE; break; case BSIM4_MOD_ETAB: mod->BSIM4etab = value->rValue; mod->BSIM4etabGiven = TRUE; break; case BSIM4_MOD_PCLM: mod->BSIM4pclm = value->rValue; mod->BSIM4pclmGiven = TRUE; break; case BSIM4_MOD_PDIBL1: mod->BSIM4pdibl1 = value->rValue; mod->BSIM4pdibl1Given = TRUE; break; case BSIM4_MOD_PDIBL2: mod->BSIM4pdibl2 = value->rValue; mod->BSIM4pdibl2Given = TRUE; break; case BSIM4_MOD_PDIBLB: mod->BSIM4pdiblb = value->rValue; mod->BSIM4pdiblbGiven = TRUE; break; case BSIM4_MOD_PSCBE1: mod->BSIM4pscbe1 = value->rValue; mod->BSIM4pscbe1Given = TRUE; break; case BSIM4_MOD_PSCBE2: mod->BSIM4pscbe2 = value->rValue; mod->BSIM4pscbe2Given = TRUE; break; case BSIM4_MOD_PVAG: mod->BSIM4pvag = value->rValue; mod->BSIM4pvagGiven = TRUE; break; case BSIM4_MOD_WR : mod->BSIM4wr = value->rValue; mod->BSIM4wrGiven = TRUE; break; case BSIM4_MOD_DWG : mod->BSIM4dwg = value->rValue; mod->BSIM4dwgGiven = TRUE; break; case BSIM4_MOD_DWB : mod->BSIM4dwb = value->rValue; mod->BSIM4dwbGiven = TRUE; break; case BSIM4_MOD_B0 : mod->BSIM4b0 = value->rValue; mod->BSIM4b0Given = TRUE; break; case BSIM4_MOD_B1 : mod->BSIM4b1 = value->rValue; mod->BSIM4b1Given = TRUE; break; case BSIM4_MOD_ALPHA0 : mod->BSIM4alpha0 = value->rValue; mod->BSIM4alpha0Given = TRUE; break; case BSIM4_MOD_ALPHA1 : mod->BSIM4alpha1 = value->rValue; mod->BSIM4alpha1Given = TRUE; break; case BSIM4_MOD_PHIN : mod->BSIM4phin = value->rValue; mod->BSIM4phinGiven = TRUE; break; case BSIM4_MOD_AGIDL : mod->BSIM4agidl = value->rValue; mod->BSIM4agidlGiven = TRUE; break; case BSIM4_MOD_BGIDL : mod->BSIM4bgidl = value->rValue; mod->BSIM4bgidlGiven = TRUE; break; case BSIM4_MOD_CGIDL : mod->BSIM4cgidl = value->rValue; mod->BSIM4cgidlGiven = TRUE; break; case BSIM4_MOD_EGIDL : mod->BSIM4egidl = value->rValue; mod->BSIM4egidlGiven = TRUE; break; case BSIM4_MOD_FGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4fgidl = value->rValue; mod->BSIM4fgidlGiven = TRUE; break; case BSIM4_MOD_KGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4kgidl = value->rValue; mod->BSIM4kgidlGiven = TRUE; break; case BSIM4_MOD_RGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4rgidl = value->rValue; mod->BSIM4rgidlGiven = TRUE; break; case BSIM4_MOD_AGISL : mod->BSIM4agisl = value->rValue; mod->BSIM4agislGiven = TRUE; break; case BSIM4_MOD_BGISL : mod->BSIM4bgisl = value->rValue; mod->BSIM4bgislGiven = TRUE; break; case BSIM4_MOD_CGISL : mod->BSIM4cgisl = value->rValue; mod->BSIM4cgislGiven = TRUE; break; case BSIM4_MOD_EGISL : mod->BSIM4egisl = value->rValue; mod->BSIM4egislGiven = TRUE; break; case BSIM4_MOD_FGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4fgisl = value->rValue; mod->BSIM4fgislGiven = TRUE; break; case BSIM4_MOD_KGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4kgisl = value->rValue; mod->BSIM4kgislGiven = TRUE; break; case BSIM4_MOD_RGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4rgisl = value->rValue; mod->BSIM4rgislGiven = TRUE; break; case BSIM4_MOD_AIGC : mod->BSIM4aigc = value->rValue; mod->BSIM4aigcGiven = TRUE; break; case BSIM4_MOD_BIGC : mod->BSIM4bigc = value->rValue; mod->BSIM4bigcGiven = TRUE; break; case BSIM4_MOD_CIGC : mod->BSIM4cigc = value->rValue; mod->BSIM4cigcGiven = TRUE; break; case BSIM4_MOD_AIGSD : mod->BSIM4aigsd = value->rValue; mod->BSIM4aigsdGiven = TRUE; break; case BSIM4_MOD_BIGSD : mod->BSIM4bigsd = value->rValue; mod->BSIM4bigsdGiven = TRUE; break; case BSIM4_MOD_CIGSD : mod->BSIM4cigsd = value->rValue; mod->BSIM4cigsdGiven = TRUE; break; case BSIM4_MOD_AIGS : mod->BSIM4aigs = value->rValue; mod->BSIM4aigsGiven = TRUE; break; case BSIM4_MOD_BIGS : mod->BSIM4bigs = value->rValue; mod->BSIM4bigsGiven = TRUE; break; case BSIM4_MOD_CIGS : mod->BSIM4cigs = value->rValue; mod->BSIM4cigsGiven = TRUE; break; case BSIM4_MOD_AIGD : mod->BSIM4aigd = value->rValue; mod->BSIM4aigdGiven = TRUE; break; case BSIM4_MOD_BIGD : mod->BSIM4bigd = value->rValue; mod->BSIM4bigdGiven = TRUE; break; case BSIM4_MOD_CIGD : mod->BSIM4cigd = value->rValue; mod->BSIM4cigdGiven = TRUE; break; case BSIM4_MOD_AIGBACC : mod->BSIM4aigbacc = value->rValue; mod->BSIM4aigbaccGiven = TRUE; break; case BSIM4_MOD_BIGBACC : mod->BSIM4bigbacc = value->rValue; mod->BSIM4bigbaccGiven = TRUE; break; case BSIM4_MOD_CIGBACC : mod->BSIM4cigbacc = value->rValue; mod->BSIM4cigbaccGiven = TRUE; break; case BSIM4_MOD_AIGBINV : mod->BSIM4aigbinv = value->rValue; mod->BSIM4aigbinvGiven = TRUE; break; case BSIM4_MOD_BIGBINV : mod->BSIM4bigbinv = value->rValue; mod->BSIM4bigbinvGiven = TRUE; break; case BSIM4_MOD_CIGBINV : mod->BSIM4cigbinv = value->rValue; mod->BSIM4cigbinvGiven = TRUE; break; case BSIM4_MOD_NIGC : mod->BSIM4nigc = value->rValue; mod->BSIM4nigcGiven = TRUE; break; case BSIM4_MOD_NIGBINV : mod->BSIM4nigbinv = value->rValue; mod->BSIM4nigbinvGiven = TRUE; break; case BSIM4_MOD_NIGBACC : mod->BSIM4nigbacc = value->rValue; mod->BSIM4nigbaccGiven = TRUE; break; case BSIM4_MOD_NTOX : mod->BSIM4ntox = value->rValue; mod->BSIM4ntoxGiven = TRUE; break; case BSIM4_MOD_EIGBINV : mod->BSIM4eigbinv = value->rValue; mod->BSIM4eigbinvGiven = TRUE; break; case BSIM4_MOD_PIGCD : mod->BSIM4pigcd = value->rValue; mod->BSIM4pigcdGiven = TRUE; break; case BSIM4_MOD_POXEDGE : mod->BSIM4poxedge = value->rValue; mod->BSIM4poxedgeGiven = TRUE; break; case BSIM4_MOD_XRCRG1 : mod->BSIM4xrcrg1 = value->rValue; mod->BSIM4xrcrg1Given = TRUE; break; case BSIM4_MOD_XRCRG2 : mod->BSIM4xrcrg2 = value->rValue; mod->BSIM4xrcrg2Given = TRUE; break; case BSIM4_MOD_LAMBDA : mod->BSIM4lambda = value->rValue; mod->BSIM4lambdaGiven = TRUE; break; case BSIM4_MOD_VTL : mod->BSIM4vtl = value->rValue; mod->BSIM4vtlGiven = TRUE; break; case BSIM4_MOD_XN: mod->BSIM4xn = value->rValue; mod->BSIM4xnGiven = TRUE; break; case BSIM4_MOD_LC: mod->BSIM4lc = value->rValue; mod->BSIM4lcGiven = TRUE; break; case BSIM4_MOD_TNOIA : mod->BSIM4tnoia = value->rValue; mod->BSIM4tnoiaGiven = TRUE; break; case BSIM4_MOD_TNOIB : mod->BSIM4tnoib = value->rValue; mod->BSIM4tnoibGiven = TRUE; break; case BSIM4_MOD_TNOIC : mod->BSIM4tnoic = value->rValue; mod->BSIM4tnoicGiven = TRUE; break; case BSIM4_MOD_RNOIA : mod->BSIM4rnoia = value->rValue; mod->BSIM4rnoiaGiven = TRUE; break; case BSIM4_MOD_RNOIB : mod->BSIM4rnoib = value->rValue; mod->BSIM4rnoibGiven = TRUE; break; case BSIM4_MOD_RNOIC : mod->BSIM4rnoic = value->rValue; mod->BSIM4rnoicGiven = TRUE; break; case BSIM4_MOD_NTNOI : mod->BSIM4ntnoi = value->rValue; mod->BSIM4ntnoiGiven = TRUE; break; case BSIM4_MOD_VFBSDOFF: mod->BSIM4vfbsdoff = value->rValue; mod->BSIM4vfbsdoffGiven = TRUE; break; case BSIM4_MOD_TVFBSDOFF: mod->BSIM4tvfbsdoff = value->rValue; mod->BSIM4tvfbsdoffGiven = TRUE; break; case BSIM4_MOD_LINTNOI: mod->BSIM4lintnoi = value->rValue; mod->BSIM4lintnoiGiven = TRUE; break; /* stress effect */ case BSIM4_MOD_SAREF : mod->BSIM4saref = value->rValue; mod->BSIM4sarefGiven = TRUE; break; case BSIM4_MOD_SBREF : mod->BSIM4sbref = value->rValue; mod->BSIM4sbrefGiven = TRUE; break; case BSIM4_MOD_WLOD : mod->BSIM4wlod = value->rValue; mod->BSIM4wlodGiven = TRUE; break; case BSIM4_MOD_KU0 : mod->BSIM4ku0 = value->rValue; mod->BSIM4ku0Given = TRUE; break; case BSIM4_MOD_KVSAT : mod->BSIM4kvsat = value->rValue; mod->BSIM4kvsatGiven = TRUE; break; case BSIM4_MOD_KVTH0 : mod->BSIM4kvth0 = value->rValue; mod->BSIM4kvth0Given = TRUE; break; case BSIM4_MOD_TKU0 : mod->BSIM4tku0 = value->rValue; mod->BSIM4tku0Given = TRUE; break; case BSIM4_MOD_LLODKU0 : mod->BSIM4llodku0 = value->rValue; mod->BSIM4llodku0Given = TRUE; break; case BSIM4_MOD_WLODKU0 : mod->BSIM4wlodku0 = value->rValue; mod->BSIM4wlodku0Given = TRUE; break; case BSIM4_MOD_LLODVTH : mod->BSIM4llodvth = value->rValue; mod->BSIM4llodvthGiven = TRUE; break; case BSIM4_MOD_WLODVTH : mod->BSIM4wlodvth = value->rValue; mod->BSIM4wlodvthGiven = TRUE; break; case BSIM4_MOD_LKU0 : mod->BSIM4lku0 = value->rValue; mod->BSIM4lku0Given = TRUE; break; case BSIM4_MOD_WKU0 : mod->BSIM4wku0 = value->rValue; mod->BSIM4wku0Given = TRUE; break; case BSIM4_MOD_PKU0 : mod->BSIM4pku0 = value->rValue; mod->BSIM4pku0Given = TRUE; break; case BSIM4_MOD_LKVTH0 : mod->BSIM4lkvth0 = value->rValue; mod->BSIM4lkvth0Given = TRUE; break; case BSIM4_MOD_WKVTH0 : mod->BSIM4wkvth0 = value->rValue; mod->BSIM4wkvth0Given = TRUE; break; case BSIM4_MOD_PKVTH0 : mod->BSIM4pkvth0 = value->rValue; mod->BSIM4pkvth0Given = TRUE; break; case BSIM4_MOD_STK2 : mod->BSIM4stk2 = value->rValue; mod->BSIM4stk2Given = TRUE; break; case BSIM4_MOD_LODK2 : mod->BSIM4lodk2 = value->rValue; mod->BSIM4lodk2Given = TRUE; break; case BSIM4_MOD_STETA0 : mod->BSIM4steta0 = value->rValue; mod->BSIM4steta0Given = TRUE; break; case BSIM4_MOD_LODETA0 : mod->BSIM4lodeta0 = value->rValue; mod->BSIM4lodeta0Given = TRUE; break; case BSIM4_MOD_WEB : mod->BSIM4web = value->rValue; mod->BSIM4webGiven = TRUE; break; case BSIM4_MOD_WEC : mod->BSIM4wec = value->rValue; mod->BSIM4wecGiven = TRUE; break; case BSIM4_MOD_KVTH0WE : mod->BSIM4kvth0we = value->rValue; mod->BSIM4kvth0weGiven = TRUE; break; case BSIM4_MOD_K2WE : mod->BSIM4k2we = value->rValue; mod->BSIM4k2weGiven = TRUE; break; case BSIM4_MOD_KU0WE : mod->BSIM4ku0we = value->rValue; mod->BSIM4ku0weGiven = TRUE; break; case BSIM4_MOD_SCREF : mod->BSIM4scref = value->rValue; mod->BSIM4screfGiven = TRUE; break; case BSIM4_MOD_WPEMOD : mod->BSIM4wpemod = value->rValue; mod->BSIM4wpemodGiven = TRUE; break; case BSIM4_MOD_LKVTH0WE : mod->BSIM4lkvth0we = value->rValue; mod->BSIM4lkvth0weGiven = TRUE; break; case BSIM4_MOD_LK2WE : mod->BSIM4lk2we = value->rValue; mod->BSIM4lk2weGiven = TRUE; break; case BSIM4_MOD_LKU0WE : mod->BSIM4lku0we = value->rValue; mod->BSIM4lku0weGiven = TRUE; break; case BSIM4_MOD_WKVTH0WE : mod->BSIM4wkvth0we = value->rValue; mod->BSIM4wkvth0weGiven = TRUE; break; case BSIM4_MOD_WK2WE : mod->BSIM4wk2we = value->rValue; mod->BSIM4wk2weGiven = TRUE; break; case BSIM4_MOD_WKU0WE : mod->BSIM4wku0we = value->rValue; mod->BSIM4wku0weGiven = TRUE; break; case BSIM4_MOD_PKVTH0WE : mod->BSIM4pkvth0we = value->rValue; mod->BSIM4pkvth0weGiven = TRUE; break; case BSIM4_MOD_PK2WE : mod->BSIM4pk2we = value->rValue; mod->BSIM4pk2weGiven = TRUE; break; case BSIM4_MOD_PKU0WE : mod->BSIM4pku0we = value->rValue; mod->BSIM4pku0weGiven = TRUE; break; case BSIM4_MOD_BETA0 : mod->BSIM4beta0 = value->rValue; mod->BSIM4beta0Given = TRUE; break; case BSIM4_MOD_IJTHDFWD : mod->BSIM4ijthdfwd = value->rValue; mod->BSIM4ijthdfwdGiven = TRUE; break; case BSIM4_MOD_IJTHSFWD : mod->BSIM4ijthsfwd = value->rValue; mod->BSIM4ijthsfwdGiven = TRUE; break; case BSIM4_MOD_IJTHDREV : mod->BSIM4ijthdrev = value->rValue; mod->BSIM4ijthdrevGiven = TRUE; break; case BSIM4_MOD_IJTHSREV : mod->BSIM4ijthsrev = value->rValue; mod->BSIM4ijthsrevGiven = TRUE; break; case BSIM4_MOD_XJBVD : mod->BSIM4xjbvd = value->rValue; mod->BSIM4xjbvdGiven = TRUE; break; case BSIM4_MOD_XJBVS : mod->BSIM4xjbvs = value->rValue; mod->BSIM4xjbvsGiven = TRUE; break; case BSIM4_MOD_BVD : mod->BSIM4bvd = value->rValue; mod->BSIM4bvdGiven = TRUE; break; case BSIM4_MOD_BVS : mod->BSIM4bvs = value->rValue; mod->BSIM4bvsGiven = TRUE; break; /* reverse diode */ case BSIM4_MOD_JTSS : mod->BSIM4jtss = value->rValue; mod->BSIM4jtssGiven = TRUE; break; case BSIM4_MOD_JTSD : mod->BSIM4jtsd = value->rValue; mod->BSIM4jtsdGiven = TRUE; break; case BSIM4_MOD_JTSSWS : mod->BSIM4jtssws = value->rValue; mod->BSIM4jtsswsGiven = TRUE; break; case BSIM4_MOD_JTSSWD : mod->BSIM4jtsswd = value->rValue; mod->BSIM4jtsswdGiven = TRUE; break; case BSIM4_MOD_JTSSWGS : mod->BSIM4jtsswgs = value->rValue; mod->BSIM4jtsswgsGiven = TRUE; break; case BSIM4_MOD_JTSSWGD : mod->BSIM4jtsswgd = value->rValue; mod->BSIM4jtsswgdGiven = TRUE; break; case BSIM4_MOD_JTWEFF : mod->BSIM4jtweff = value->rValue; mod->BSIM4jtweffGiven = TRUE; break; case BSIM4_MOD_NJTS : mod->BSIM4njts = value->rValue; mod->BSIM4njtsGiven = TRUE; break; case BSIM4_MOD_NJTSSW : mod->BSIM4njtssw = value->rValue; mod->BSIM4njtsswGiven = TRUE; break; case BSIM4_MOD_NJTSSWG : mod->BSIM4njtsswg = value->rValue; mod->BSIM4njtsswgGiven = TRUE; break; case BSIM4_MOD_NJTSD : mod->BSIM4njtsd = value->rValue; mod->BSIM4njtsdGiven = TRUE; break; case BSIM4_MOD_NJTSSWD : mod->BSIM4njtsswd = value->rValue; mod->BSIM4njtsswdGiven = TRUE; break; case BSIM4_MOD_NJTSSWGD : mod->BSIM4njtsswgd = value->rValue; mod->BSIM4njtsswgdGiven = TRUE; break; case BSIM4_MOD_XTSS : mod->BSIM4xtss = value->rValue; mod->BSIM4xtssGiven = TRUE; break; case BSIM4_MOD_XTSD : mod->BSIM4xtsd = value->rValue; mod->BSIM4xtsdGiven = TRUE; break; case BSIM4_MOD_XTSSWS : mod->BSIM4xtssws = value->rValue; mod->BSIM4xtsswsGiven = TRUE; break; case BSIM4_MOD_XTSSWD : mod->BSIM4xtsswd = value->rValue; mod->BSIM4xtsswdGiven = TRUE; break; case BSIM4_MOD_XTSSWGS : mod->BSIM4xtsswgs = value->rValue; mod->BSIM4xtsswgsGiven = TRUE; break; case BSIM4_MOD_XTSSWGD : mod->BSIM4xtsswgd = value->rValue; mod->BSIM4xtsswgdGiven = TRUE; break; case BSIM4_MOD_TNJTS : mod->BSIM4tnjts = value->rValue; mod->BSIM4tnjtsGiven = TRUE; break; case BSIM4_MOD_TNJTSSW : mod->BSIM4tnjtssw = value->rValue; mod->BSIM4tnjtsswGiven = TRUE; break; case BSIM4_MOD_TNJTSSWG : mod->BSIM4tnjtsswg = value->rValue; mod->BSIM4tnjtsswgGiven = TRUE; break; case BSIM4_MOD_TNJTSD : mod->BSIM4tnjtsd = value->rValue; mod->BSIM4tnjtsdGiven = TRUE; break; case BSIM4_MOD_TNJTSSWD : mod->BSIM4tnjtsswd = value->rValue; mod->BSIM4tnjtsswdGiven = TRUE; break; case BSIM4_MOD_TNJTSSWGD : mod->BSIM4tnjtsswgd = value->rValue; mod->BSIM4tnjtsswgdGiven = TRUE; break; case BSIM4_MOD_VTSS : mod->BSIM4vtss = value->rValue; mod->BSIM4vtssGiven = TRUE; break; case BSIM4_MOD_VTSD : mod->BSIM4vtsd = value->rValue; mod->BSIM4vtsdGiven = TRUE; break; case BSIM4_MOD_VTSSWS : mod->BSIM4vtssws = value->rValue; mod->BSIM4vtsswsGiven = TRUE; break; case BSIM4_MOD_VTSSWD : mod->BSIM4vtsswd = value->rValue; mod->BSIM4vtsswdGiven = TRUE; break; case BSIM4_MOD_VTSSWGS : mod->BSIM4vtsswgs = value->rValue; mod->BSIM4vtsswgsGiven = TRUE; break; case BSIM4_MOD_VTSSWGD : mod->BSIM4vtsswgd = value->rValue; mod->BSIM4vtsswgdGiven = TRUE; break; case BSIM4_MOD_VFB : mod->BSIM4vfb = value->rValue; mod->BSIM4vfbGiven = TRUE; break; case BSIM4_MOD_GBMIN : mod->BSIM4gbmin = value->rValue; mod->BSIM4gbminGiven = TRUE; break; case BSIM4_MOD_RBDB : mod->BSIM4rbdb = value->rValue; mod->BSIM4rbdbGiven = TRUE; break; case BSIM4_MOD_RBPB : mod->BSIM4rbpb = value->rValue; mod->BSIM4rbpbGiven = TRUE; break; case BSIM4_MOD_RBSB : mod->BSIM4rbsb = value->rValue; mod->BSIM4rbsbGiven = TRUE; break; case BSIM4_MOD_RBPS : mod->BSIM4rbps = value->rValue; mod->BSIM4rbpsGiven = TRUE; break; case BSIM4_MOD_RBPD : mod->BSIM4rbpd = value->rValue; mod->BSIM4rbpdGiven = TRUE; break; case BSIM4_MOD_RBPS0 : mod->BSIM4rbps0 = value->rValue; mod->BSIM4rbps0Given = TRUE; break; case BSIM4_MOD_RBPSL : mod->BSIM4rbpsl = value->rValue; mod->BSIM4rbpslGiven = TRUE; break; case BSIM4_MOD_RBPSW : mod->BSIM4rbpsw = value->rValue; mod->BSIM4rbpswGiven = TRUE; break; case BSIM4_MOD_RBPSNF : mod->BSIM4rbpsnf = value->rValue; mod->BSIM4rbpsnfGiven = TRUE; break; case BSIM4_MOD_RBPD0 : mod->BSIM4rbpd0 = value->rValue; mod->BSIM4rbpd0Given = TRUE; break; case BSIM4_MOD_RBPDL : mod->BSIM4rbpdl = value->rValue; mod->BSIM4rbpdlGiven = TRUE; break; case BSIM4_MOD_RBPDW : mod->BSIM4rbpdw = value->rValue; mod->BSIM4rbpdwGiven = TRUE; break; case BSIM4_MOD_RBPDNF : mod->BSIM4rbpdnf = value->rValue; mod->BSIM4rbpdnfGiven = TRUE; break; case BSIM4_MOD_RBPBX0 : mod->BSIM4rbpbx0 = value->rValue; mod->BSIM4rbpbx0Given = TRUE; break; case BSIM4_MOD_RBPBXL : mod->BSIM4rbpbxl = value->rValue; mod->BSIM4rbpbxlGiven = TRUE; break; case BSIM4_MOD_RBPBXW : mod->BSIM4rbpbxw = value->rValue; mod->BSIM4rbpbxwGiven = TRUE; break; case BSIM4_MOD_RBPBXNF : mod->BSIM4rbpbxnf = value->rValue; mod->BSIM4rbpbxnfGiven = TRUE; break; case BSIM4_MOD_RBPBY0 : mod->BSIM4rbpby0 = value->rValue; mod->BSIM4rbpby0Given = TRUE; break; case BSIM4_MOD_RBPBYL : mod->BSIM4rbpbyl = value->rValue; mod->BSIM4rbpbylGiven = TRUE; break; case BSIM4_MOD_RBPBYW : mod->BSIM4rbpbyw = value->rValue; mod->BSIM4rbpbywGiven = TRUE; break; case BSIM4_MOD_RBPBYNF : mod->BSIM4rbpbynf = value->rValue; mod->BSIM4rbpbynfGiven = TRUE; break; case BSIM4_MOD_RBSBX0 : mod->BSIM4rbsbx0 = value->rValue; mod->BSIM4rbsbx0Given = TRUE; break; case BSIM4_MOD_RBSBY0 : mod->BSIM4rbsby0 = value->rValue; mod->BSIM4rbsby0Given = TRUE; break; case BSIM4_MOD_RBDBX0 : mod->BSIM4rbdbx0 = value->rValue; mod->BSIM4rbdbx0Given = TRUE; break; case BSIM4_MOD_RBDBY0 : mod->BSIM4rbdby0 = value->rValue; mod->BSIM4rbdby0Given = TRUE; break; case BSIM4_MOD_RBSDBXL : mod->BSIM4rbsdbxl = value->rValue; mod->BSIM4rbsdbxlGiven = TRUE; break; case BSIM4_MOD_RBSDBXW : mod->BSIM4rbsdbxw = value->rValue; mod->BSIM4rbsdbxwGiven = TRUE; break; case BSIM4_MOD_RBSDBXNF : mod->BSIM4rbsdbxnf = value->rValue; mod->BSIM4rbsdbxnfGiven = TRUE; break; case BSIM4_MOD_RBSDBYL : mod->BSIM4rbsdbyl = value->rValue; mod->BSIM4rbsdbylGiven = TRUE; break; case BSIM4_MOD_RBSDBYW : mod->BSIM4rbsdbyw = value->rValue; mod->BSIM4rbsdbywGiven = TRUE; break; case BSIM4_MOD_RBSDBYNF : mod->BSIM4rbsdbynf = value->rValue; mod->BSIM4rbsdbynfGiven = TRUE; break; case BSIM4_MOD_CGSL : mod->BSIM4cgsl = value->rValue; mod->BSIM4cgslGiven = TRUE; break; case BSIM4_MOD_CGDL : mod->BSIM4cgdl = value->rValue; mod->BSIM4cgdlGiven = TRUE; break; case BSIM4_MOD_CKAPPAS : mod->BSIM4ckappas = value->rValue; mod->BSIM4ckappasGiven = TRUE; break; case BSIM4_MOD_CKAPPAD : mod->BSIM4ckappad = value->rValue; mod->BSIM4ckappadGiven = TRUE; break; case BSIM4_MOD_CF : mod->BSIM4cf = value->rValue; mod->BSIM4cfGiven = TRUE; break; case BSIM4_MOD_CLC : mod->BSIM4clc = value->rValue; mod->BSIM4clcGiven = TRUE; break; case BSIM4_MOD_CLE : mod->BSIM4cle = value->rValue; mod->BSIM4cleGiven = TRUE; break; case BSIM4_MOD_DWC : mod->BSIM4dwc = value->rValue; mod->BSIM4dwcGiven = TRUE; break; case BSIM4_MOD_DLC : mod->BSIM4dlc = value->rValue; mod->BSIM4dlcGiven = TRUE; break; case BSIM4_MOD_XW : mod->BSIM4xw = value->rValue; mod->BSIM4xwGiven = TRUE; break; case BSIM4_MOD_XL : mod->BSIM4xl = value->rValue; mod->BSIM4xlGiven = TRUE; break; case BSIM4_MOD_DLCIG : mod->BSIM4dlcig = value->rValue; mod->BSIM4dlcigGiven = TRUE; break; case BSIM4_MOD_DLCIGD : mod->BSIM4dlcigd = value->rValue; mod->BSIM4dlcigdGiven = TRUE; break; case BSIM4_MOD_DWJ : mod->BSIM4dwj = value->rValue; mod->BSIM4dwjGiven = TRUE; break; case BSIM4_MOD_VFBCV : mod->BSIM4vfbcv = value->rValue; mod->BSIM4vfbcvGiven = TRUE; break; case BSIM4_MOD_ACDE : mod->BSIM4acde = value->rValue; mod->BSIM4acdeGiven = TRUE; break; case BSIM4_MOD_MOIN : mod->BSIM4moin = value->rValue; mod->BSIM4moinGiven = TRUE; break; case BSIM4_MOD_NOFF : mod->BSIM4noff = value->rValue; mod->BSIM4noffGiven = TRUE; break; case BSIM4_MOD_VOFFCV : mod->BSIM4voffcv = value->rValue; mod->BSIM4voffcvGiven = TRUE; break; case BSIM4_MOD_DMCG : mod->BSIM4dmcg = value->rValue; mod->BSIM4dmcgGiven = TRUE; break; case BSIM4_MOD_DMCI : mod->BSIM4dmci = value->rValue; mod->BSIM4dmciGiven = TRUE; break; case BSIM4_MOD_DMDG : mod->BSIM4dmdg = value->rValue; mod->BSIM4dmdgGiven = TRUE; break; case BSIM4_MOD_DMCGT : mod->BSIM4dmcgt = value->rValue; mod->BSIM4dmcgtGiven = TRUE; break; case BSIM4_MOD_XGW : mod->BSIM4xgw = value->rValue; mod->BSIM4xgwGiven = TRUE; break; case BSIM4_MOD_XGL : mod->BSIM4xgl = value->rValue; mod->BSIM4xglGiven = TRUE; break; case BSIM4_MOD_RSHG : mod->BSIM4rshg = value->rValue; mod->BSIM4rshgGiven = TRUE; break; case BSIM4_MOD_NGCON : mod->BSIM4ngcon = value->rValue; mod->BSIM4ngconGiven = TRUE; break; case BSIM4_MOD_TCJ : mod->BSIM4tcj = value->rValue; mod->BSIM4tcjGiven = TRUE; break; case BSIM4_MOD_TPB : mod->BSIM4tpb = value->rValue; mod->BSIM4tpbGiven = TRUE; break; case BSIM4_MOD_TCJSW : mod->BSIM4tcjsw = value->rValue; mod->BSIM4tcjswGiven = TRUE; break; case BSIM4_MOD_TPBSW : mod->BSIM4tpbsw = value->rValue; mod->BSIM4tpbswGiven = TRUE; break; case BSIM4_MOD_TCJSWG : mod->BSIM4tcjswg = value->rValue; mod->BSIM4tcjswgGiven = TRUE; break; case BSIM4_MOD_TPBSWG : mod->BSIM4tpbswg = value->rValue; mod->BSIM4tpbswgGiven = TRUE; break; /* Length dependence */ case BSIM4_MOD_LCDSC : mod->BSIM4lcdsc = value->rValue; mod->BSIM4lcdscGiven = TRUE; break; case BSIM4_MOD_LCDSCB : mod->BSIM4lcdscb = value->rValue; mod->BSIM4lcdscbGiven = TRUE; break; case BSIM4_MOD_LCDSCD : mod->BSIM4lcdscd = value->rValue; mod->BSIM4lcdscdGiven = TRUE; break; case BSIM4_MOD_LCIT : mod->BSIM4lcit = value->rValue; mod->BSIM4lcitGiven = TRUE; break; case BSIM4_MOD_LNFACTOR : mod->BSIM4lnfactor = value->rValue; mod->BSIM4lnfactorGiven = TRUE; break; case BSIM4_MOD_LXJ: mod->BSIM4lxj = value->rValue; mod->BSIM4lxjGiven = TRUE; break; case BSIM4_MOD_LVSAT: mod->BSIM4lvsat = value->rValue; mod->BSIM4lvsatGiven = TRUE; break; case BSIM4_MOD_LA0: mod->BSIM4la0 = value->rValue; mod->BSIM4la0Given = TRUE; break; case BSIM4_MOD_LAGS: mod->BSIM4lags = value->rValue; mod->BSIM4lagsGiven = TRUE; break; case BSIM4_MOD_LA1: mod->BSIM4la1 = value->rValue; mod->BSIM4la1Given = TRUE; break; case BSIM4_MOD_LA2: mod->BSIM4la2 = value->rValue; mod->BSIM4la2Given = TRUE; break; case BSIM4_MOD_LAT: mod->BSIM4lat = value->rValue; mod->BSIM4latGiven = TRUE; break; case BSIM4_MOD_LKETA: mod->BSIM4lketa = value->rValue; mod->BSIM4lketaGiven = TRUE; break; case BSIM4_MOD_LNSUB: mod->BSIM4lnsub = value->rValue; mod->BSIM4lnsubGiven = TRUE; break; case BSIM4_MOD_LNDEP: mod->BSIM4lndep = value->rValue; mod->BSIM4lndepGiven = TRUE; if (mod->BSIM4lndep > 1.0e20) mod->BSIM4lndep *= 1.0e-6; break; case BSIM4_MOD_LNSD: mod->BSIM4lnsd = value->rValue; mod->BSIM4lnsdGiven = TRUE; if (mod->BSIM4lnsd > 1.0e23) mod->BSIM4lnsd *= 1.0e-6; break; case BSIM4_MOD_LNGATE: mod->BSIM4lngate = value->rValue; mod->BSIM4lngateGiven = TRUE; if (mod->BSIM4lngate > 1.0e23) mod->BSIM4lngate *= 1.0e-6; break; case BSIM4_MOD_LGAMMA1: mod->BSIM4lgamma1 = value->rValue; mod->BSIM4lgamma1Given = TRUE; break; case BSIM4_MOD_LGAMMA2: mod->BSIM4lgamma2 = value->rValue; mod->BSIM4lgamma2Given = TRUE; break; case BSIM4_MOD_LVBX: mod->BSIM4lvbx = value->rValue; mod->BSIM4lvbxGiven = TRUE; break; case BSIM4_MOD_LVBM: mod->BSIM4lvbm = value->rValue; mod->BSIM4lvbmGiven = TRUE; break; case BSIM4_MOD_LXT: mod->BSIM4lxt = value->rValue; mod->BSIM4lxtGiven = TRUE; break; case BSIM4_MOD_LK1: mod->BSIM4lk1 = value->rValue; mod->BSIM4lk1Given = TRUE; break; case BSIM4_MOD_LKT1: mod->BSIM4lkt1 = value->rValue; mod->BSIM4lkt1Given = TRUE; break; case BSIM4_MOD_LKT1L: mod->BSIM4lkt1l = value->rValue; mod->BSIM4lkt1lGiven = TRUE; break; case BSIM4_MOD_LKT2: mod->BSIM4lkt2 = value->rValue; mod->BSIM4lkt2Given = TRUE; break; case BSIM4_MOD_LK2: mod->BSIM4lk2 = value->rValue; mod->BSIM4lk2Given = TRUE; break; case BSIM4_MOD_LK3: mod->BSIM4lk3 = value->rValue; mod->BSIM4lk3Given = TRUE; break; case BSIM4_MOD_LK3B: mod->BSIM4lk3b = value->rValue; mod->BSIM4lk3bGiven = TRUE; break; case BSIM4_MOD_LLPE0: mod->BSIM4llpe0 = value->rValue; mod->BSIM4llpe0Given = TRUE; break; case BSIM4_MOD_LLPEB: mod->BSIM4llpeb = value->rValue; mod->BSIM4llpebGiven = TRUE; break; case BSIM4_MOD_LDVTP0: mod->BSIM4ldvtp0 = value->rValue; mod->BSIM4ldvtp0Given = TRUE; break; case BSIM4_MOD_LDVTP1: mod->BSIM4ldvtp1 = value->rValue; mod->BSIM4ldvtp1Given = TRUE; break; case BSIM4_MOD_LDVTP2: /* New DIBL/Rout */ mod->BSIM4ldvtp2 = value->rValue; mod->BSIM4ldvtp2Given = TRUE; break; case BSIM4_MOD_LDVTP3: mod->BSIM4ldvtp3 = value->rValue; mod->BSIM4ldvtp3Given = TRUE; break; case BSIM4_MOD_LDVTP4: mod->BSIM4ldvtp4 = value->rValue; mod->BSIM4ldvtp4Given = TRUE; break; case BSIM4_MOD_LDVTP5: mod->BSIM4ldvtp5 = value->rValue; mod->BSIM4ldvtp5Given = TRUE; break; case BSIM4_MOD_LW0: mod->BSIM4lw0 = value->rValue; mod->BSIM4lw0Given = TRUE; break; case BSIM4_MOD_LDVT0: mod->BSIM4ldvt0 = value->rValue; mod->BSIM4ldvt0Given = TRUE; break; case BSIM4_MOD_LDVT1: mod->BSIM4ldvt1 = value->rValue; mod->BSIM4ldvt1Given = TRUE; break; case BSIM4_MOD_LDVT2: mod->BSIM4ldvt2 = value->rValue; mod->BSIM4ldvt2Given = TRUE; break; case BSIM4_MOD_LDVT0W: mod->BSIM4ldvt0w = value->rValue; mod->BSIM4ldvt0wGiven = TRUE; break; case BSIM4_MOD_LDVT1W: mod->BSIM4ldvt1w = value->rValue; mod->BSIM4ldvt1wGiven = TRUE; break; case BSIM4_MOD_LDVT2W: mod->BSIM4ldvt2w = value->rValue; mod->BSIM4ldvt2wGiven = TRUE; break; case BSIM4_MOD_LDROUT: mod->BSIM4ldrout = value->rValue; mod->BSIM4ldroutGiven = TRUE; break; case BSIM4_MOD_LDSUB: mod->BSIM4ldsub = value->rValue; mod->BSIM4ldsubGiven = TRUE; break; case BSIM4_MOD_LVTH0: mod->BSIM4lvth0 = value->rValue; mod->BSIM4lvth0Given = TRUE; break; case BSIM4_MOD_LUA: mod->BSIM4lua = value->rValue; mod->BSIM4luaGiven = TRUE; break; case BSIM4_MOD_LUA1: mod->BSIM4lua1 = value->rValue; mod->BSIM4lua1Given = TRUE; break; case BSIM4_MOD_LUB: mod->BSIM4lub = value->rValue; mod->BSIM4lubGiven = TRUE; break; case BSIM4_MOD_LUB1: mod->BSIM4lub1 = value->rValue; mod->BSIM4lub1Given = TRUE; break; case BSIM4_MOD_LUC: mod->BSIM4luc = value->rValue; mod->BSIM4lucGiven = TRUE; break; case BSIM4_MOD_LUC1: mod->BSIM4luc1 = value->rValue; mod->BSIM4luc1Given = TRUE; break; case BSIM4_MOD_LU0 : mod->BSIM4lu0 = value->rValue; mod->BSIM4lu0Given = TRUE; break; case BSIM4_MOD_LUTE : mod->BSIM4lute = value->rValue; mod->BSIM4luteGiven = TRUE; break; case BSIM4_MOD_LUCSTE : mod->BSIM4lucste = value->rValue; mod->BSIM4lucsteGiven = TRUE; break; case BSIM4_MOD_LVOFF: mod->BSIM4lvoff = value->rValue; mod->BSIM4lvoffGiven = TRUE; break; case BSIM4_MOD_LTVOFF: mod->BSIM4ltvoff = value->rValue; mod->BSIM4ltvoffGiven = TRUE; break; case BSIM4_MOD_LTNFACTOR: /* v4.7 temp dep of leakage current */ mod->BSIM4ltnfactor = value->rValue; mod->BSIM4ltnfactorGiven = TRUE; break; case BSIM4_MOD_LTETA0: /* v4.7 temp dep of leakage current */ mod->BSIM4lteta0 = value->rValue; mod->BSIM4lteta0Given = TRUE; break; case BSIM4_MOD_LTVOFFCV: /* v4.7 temp dep of leakage current */ mod->BSIM4ltvoffcv = value->rValue; mod->BSIM4ltvoffcvGiven = TRUE; break; case BSIM4_MOD_LMINV: mod->BSIM4lminv = value->rValue; mod->BSIM4lminvGiven = TRUE; break; case BSIM4_MOD_LMINVCV: mod->BSIM4lminvcv = value->rValue; mod->BSIM4lminvcvGiven = TRUE; break; case BSIM4_MOD_LFPROUT: mod->BSIM4lfprout = value->rValue; mod->BSIM4lfproutGiven = TRUE; break; case BSIM4_MOD_LPDITS: mod->BSIM4lpdits = value->rValue; mod->BSIM4lpditsGiven = TRUE; break; case BSIM4_MOD_LPDITSD: mod->BSIM4lpditsd = value->rValue; mod->BSIM4lpditsdGiven = TRUE; break; case BSIM4_MOD_LDELTA : mod->BSIM4ldelta = value->rValue; mod->BSIM4ldeltaGiven = TRUE; break; case BSIM4_MOD_LRDSW: mod->BSIM4lrdsw = value->rValue; mod->BSIM4lrdswGiven = TRUE; break; case BSIM4_MOD_LRDW: mod->BSIM4lrdw = value->rValue; mod->BSIM4lrdwGiven = TRUE; break; case BSIM4_MOD_LRSW: mod->BSIM4lrsw = value->rValue; mod->BSIM4lrswGiven = TRUE; break; case BSIM4_MOD_LPRWB: mod->BSIM4lprwb = value->rValue; mod->BSIM4lprwbGiven = TRUE; break; case BSIM4_MOD_LPRWG: mod->BSIM4lprwg = value->rValue; mod->BSIM4lprwgGiven = TRUE; break; case BSIM4_MOD_LPRT: mod->BSIM4lprt = value->rValue; mod->BSIM4lprtGiven = TRUE; break; case BSIM4_MOD_LETA0: mod->BSIM4leta0 = value->rValue; mod->BSIM4leta0Given = TRUE; break; case BSIM4_MOD_LETAB: mod->BSIM4letab = value->rValue; mod->BSIM4letabGiven = TRUE; break; case BSIM4_MOD_LPCLM: mod->BSIM4lpclm = value->rValue; mod->BSIM4lpclmGiven = TRUE; break; case BSIM4_MOD_LPDIBL1: mod->BSIM4lpdibl1 = value->rValue; mod->BSIM4lpdibl1Given = TRUE; break; case BSIM4_MOD_LPDIBL2: mod->BSIM4lpdibl2 = value->rValue; mod->BSIM4lpdibl2Given = TRUE; break; case BSIM4_MOD_LPDIBLB: mod->BSIM4lpdiblb = value->rValue; mod->BSIM4lpdiblbGiven = TRUE; break; case BSIM4_MOD_LPSCBE1: mod->BSIM4lpscbe1 = value->rValue; mod->BSIM4lpscbe1Given = TRUE; break; case BSIM4_MOD_LPSCBE2: mod->BSIM4lpscbe2 = value->rValue; mod->BSIM4lpscbe2Given = TRUE; break; case BSIM4_MOD_LPVAG: mod->BSIM4lpvag = value->rValue; mod->BSIM4lpvagGiven = TRUE; break; case BSIM4_MOD_LWR : mod->BSIM4lwr = value->rValue; mod->BSIM4lwrGiven = TRUE; break; case BSIM4_MOD_LDWG : mod->BSIM4ldwg = value->rValue; mod->BSIM4ldwgGiven = TRUE; break; case BSIM4_MOD_LDWB : mod->BSIM4ldwb = value->rValue; mod->BSIM4ldwbGiven = TRUE; break; case BSIM4_MOD_LB0 : mod->BSIM4lb0 = value->rValue; mod->BSIM4lb0Given = TRUE; break; case BSIM4_MOD_LB1 : mod->BSIM4lb1 = value->rValue; mod->BSIM4lb1Given = TRUE; break; case BSIM4_MOD_LALPHA0 : mod->BSIM4lalpha0 = value->rValue; mod->BSIM4lalpha0Given = TRUE; break; case BSIM4_MOD_LALPHA1 : mod->BSIM4lalpha1 = value->rValue; mod->BSIM4lalpha1Given = TRUE; break; case BSIM4_MOD_LBETA0 : mod->BSIM4lbeta0 = value->rValue; mod->BSIM4lbeta0Given = TRUE; break; case BSIM4_MOD_LPHIN : mod->BSIM4lphin = value->rValue; mod->BSIM4lphinGiven = TRUE; break; case BSIM4_MOD_LAGIDL : mod->BSIM4lagidl = value->rValue; mod->BSIM4lagidlGiven = TRUE; break; case BSIM4_MOD_LBGIDL : mod->BSIM4lbgidl = value->rValue; mod->BSIM4lbgidlGiven = TRUE; break; case BSIM4_MOD_LCGIDL : mod->BSIM4lcgidl = value->rValue; mod->BSIM4lcgidlGiven = TRUE; break; case BSIM4_MOD_LEGIDL : mod->BSIM4legidl = value->rValue; mod->BSIM4legidlGiven = TRUE; break; case BSIM4_MOD_LFGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4lfgidl = value->rValue; mod->BSIM4lfgidlGiven = TRUE; break; case BSIM4_MOD_LKGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4lkgidl = value->rValue; mod->BSIM4lkgidlGiven = TRUE; break; case BSIM4_MOD_LRGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4lrgidl = value->rValue; mod->BSIM4lrgidlGiven = TRUE; break; case BSIM4_MOD_LAGISL : mod->BSIM4lagisl = value->rValue; mod->BSIM4lagislGiven = TRUE; break; case BSIM4_MOD_LBGISL : mod->BSIM4lbgisl = value->rValue; mod->BSIM4lbgislGiven = TRUE; break; case BSIM4_MOD_LCGISL : mod->BSIM4lcgisl = value->rValue; mod->BSIM4lcgislGiven = TRUE; break; case BSIM4_MOD_LEGISL : mod->BSIM4legisl = value->rValue; mod->BSIM4legislGiven = TRUE; break; case BSIM4_MOD_LFGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4lfgisl = value->rValue; mod->BSIM4lfgislGiven = TRUE; break; case BSIM4_MOD_LKGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4lkgisl = value->rValue; mod->BSIM4lkgislGiven = TRUE; break; case BSIM4_MOD_LRGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4lrgisl = value->rValue; mod->BSIM4lrgislGiven = TRUE; break; case BSIM4_MOD_LAIGC : mod->BSIM4laigc = value->rValue; mod->BSIM4laigcGiven = TRUE; break; case BSIM4_MOD_LBIGC : mod->BSIM4lbigc = value->rValue; mod->BSIM4lbigcGiven = TRUE; break; case BSIM4_MOD_LCIGC : mod->BSIM4lcigc = value->rValue; mod->BSIM4lcigcGiven = TRUE; break; case BSIM4_MOD_LAIGSD : mod->BSIM4laigsd = value->rValue; mod->BSIM4laigsdGiven = TRUE; break; case BSIM4_MOD_LBIGSD : mod->BSIM4lbigsd = value->rValue; mod->BSIM4lbigsdGiven = TRUE; break; case BSIM4_MOD_LCIGSD : mod->BSIM4lcigsd = value->rValue; mod->BSIM4lcigsdGiven = TRUE; break; case BSIM4_MOD_LAIGS : mod->BSIM4laigs = value->rValue; mod->BSIM4laigsGiven = TRUE; break; case BSIM4_MOD_LBIGS : mod->BSIM4lbigs = value->rValue; mod->BSIM4lbigsGiven = TRUE; break; case BSIM4_MOD_LCIGS : mod->BSIM4lcigs = value->rValue; mod->BSIM4lcigsGiven = TRUE; break; case BSIM4_MOD_LAIGD : mod->BSIM4laigd = value->rValue; mod->BSIM4laigdGiven = TRUE; break; case BSIM4_MOD_LBIGD : mod->BSIM4lbigd = value->rValue; mod->BSIM4lbigdGiven = TRUE; break; case BSIM4_MOD_LCIGD : mod->BSIM4lcigd = value->rValue; mod->BSIM4lcigdGiven = TRUE; break; case BSIM4_MOD_LAIGBACC : mod->BSIM4laigbacc = value->rValue; mod->BSIM4laigbaccGiven = TRUE; break; case BSIM4_MOD_LBIGBACC : mod->BSIM4lbigbacc = value->rValue; mod->BSIM4lbigbaccGiven = TRUE; break; case BSIM4_MOD_LCIGBACC : mod->BSIM4lcigbacc = value->rValue; mod->BSIM4lcigbaccGiven = TRUE; break; case BSIM4_MOD_LAIGBINV : mod->BSIM4laigbinv = value->rValue; mod->BSIM4laigbinvGiven = TRUE; break; case BSIM4_MOD_LBIGBINV : mod->BSIM4lbigbinv = value->rValue; mod->BSIM4lbigbinvGiven = TRUE; break; case BSIM4_MOD_LCIGBINV : mod->BSIM4lcigbinv = value->rValue; mod->BSIM4lcigbinvGiven = TRUE; break; case BSIM4_MOD_LNIGC : mod->BSIM4lnigc = value->rValue; mod->BSIM4lnigcGiven = TRUE; break; case BSIM4_MOD_LNIGBINV : mod->BSIM4lnigbinv = value->rValue; mod->BSIM4lnigbinvGiven = TRUE; break; case BSIM4_MOD_LNIGBACC : mod->BSIM4lnigbacc = value->rValue; mod->BSIM4lnigbaccGiven = TRUE; break; case BSIM4_MOD_LNTOX : mod->BSIM4lntox = value->rValue; mod->BSIM4lntoxGiven = TRUE; break; case BSIM4_MOD_LEIGBINV : mod->BSIM4leigbinv = value->rValue; mod->BSIM4leigbinvGiven = TRUE; break; case BSIM4_MOD_LPIGCD : mod->BSIM4lpigcd = value->rValue; mod->BSIM4lpigcdGiven = TRUE; break; case BSIM4_MOD_LPOXEDGE : mod->BSIM4lpoxedge = value->rValue; mod->BSIM4lpoxedgeGiven = TRUE; break; case BSIM4_MOD_LXRCRG1 : mod->BSIM4lxrcrg1 = value->rValue; mod->BSIM4lxrcrg1Given = TRUE; break; case BSIM4_MOD_LXRCRG2 : mod->BSIM4lxrcrg2 = value->rValue; mod->BSIM4lxrcrg2Given = TRUE; break; case BSIM4_MOD_LLAMBDA : mod->BSIM4llambda = value->rValue; mod->BSIM4llambdaGiven = TRUE; break; case BSIM4_MOD_LVTL : mod->BSIM4lvtl = value->rValue; mod->BSIM4lvtlGiven = TRUE; break; case BSIM4_MOD_LXN: mod->BSIM4lxn = value->rValue; mod->BSIM4lxnGiven = TRUE; break; case BSIM4_MOD_LVFBSDOFF: mod->BSIM4lvfbsdoff = value->rValue; mod->BSIM4lvfbsdoffGiven = TRUE; break; case BSIM4_MOD_LTVFBSDOFF: mod->BSIM4ltvfbsdoff = value->rValue; mod->BSIM4ltvfbsdoffGiven = TRUE; break; case BSIM4_MOD_LEU : mod->BSIM4leu = value->rValue; mod->BSIM4leuGiven = TRUE; break; case BSIM4_MOD_LUCS : mod->BSIM4lucs = value->rValue; mod->BSIM4lucsGiven = TRUE; break; case BSIM4_MOD_LVFB : mod->BSIM4lvfb = value->rValue; mod->BSIM4lvfbGiven = TRUE; break; case BSIM4_MOD_LCGSL : mod->BSIM4lcgsl = value->rValue; mod->BSIM4lcgslGiven = TRUE; break; case BSIM4_MOD_LCGDL : mod->BSIM4lcgdl = value->rValue; mod->BSIM4lcgdlGiven = TRUE; break; case BSIM4_MOD_LCKAPPAS : mod->BSIM4lckappas = value->rValue; mod->BSIM4lckappasGiven = TRUE; break; case BSIM4_MOD_LCKAPPAD : mod->BSIM4lckappad = value->rValue; mod->BSIM4lckappadGiven = TRUE; break; case BSIM4_MOD_LCF : mod->BSIM4lcf = value->rValue; mod->BSIM4lcfGiven = TRUE; break; case BSIM4_MOD_LCLC : mod->BSIM4lclc = value->rValue; mod->BSIM4lclcGiven = TRUE; break; case BSIM4_MOD_LCLE : mod->BSIM4lcle = value->rValue; mod->BSIM4lcleGiven = TRUE; break; case BSIM4_MOD_LVFBCV : mod->BSIM4lvfbcv = value->rValue; mod->BSIM4lvfbcvGiven = TRUE; break; case BSIM4_MOD_LACDE : mod->BSIM4lacde = value->rValue; mod->BSIM4lacdeGiven = TRUE; break; case BSIM4_MOD_LMOIN : mod->BSIM4lmoin = value->rValue; mod->BSIM4lmoinGiven = TRUE; break; case BSIM4_MOD_LNOFF : mod->BSIM4lnoff = value->rValue; mod->BSIM4lnoffGiven = TRUE; break; case BSIM4_MOD_LVOFFCV : mod->BSIM4lvoffcv = value->rValue; mod->BSIM4lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM4_MOD_WCDSC : mod->BSIM4wcdsc = value->rValue; mod->BSIM4wcdscGiven = TRUE; break; case BSIM4_MOD_WCDSCB : mod->BSIM4wcdscb = value->rValue; mod->BSIM4wcdscbGiven = TRUE; break; case BSIM4_MOD_WCDSCD : mod->BSIM4wcdscd = value->rValue; mod->BSIM4wcdscdGiven = TRUE; break; case BSIM4_MOD_WCIT : mod->BSIM4wcit = value->rValue; mod->BSIM4wcitGiven = TRUE; break; case BSIM4_MOD_WNFACTOR : mod->BSIM4wnfactor = value->rValue; mod->BSIM4wnfactorGiven = TRUE; break; case BSIM4_MOD_WXJ: mod->BSIM4wxj = value->rValue; mod->BSIM4wxjGiven = TRUE; break; case BSIM4_MOD_WVSAT: mod->BSIM4wvsat = value->rValue; mod->BSIM4wvsatGiven = TRUE; break; case BSIM4_MOD_WA0: mod->BSIM4wa0 = value->rValue; mod->BSIM4wa0Given = TRUE; break; case BSIM4_MOD_WAGS: mod->BSIM4wags = value->rValue; mod->BSIM4wagsGiven = TRUE; break; case BSIM4_MOD_WA1: mod->BSIM4wa1 = value->rValue; mod->BSIM4wa1Given = TRUE; break; case BSIM4_MOD_WA2: mod->BSIM4wa2 = value->rValue; mod->BSIM4wa2Given = TRUE; break; case BSIM4_MOD_WAT: mod->BSIM4wat = value->rValue; mod->BSIM4watGiven = TRUE; break; case BSIM4_MOD_WKETA: mod->BSIM4wketa = value->rValue; mod->BSIM4wketaGiven = TRUE; break; case BSIM4_MOD_WNSUB: mod->BSIM4wnsub = value->rValue; mod->BSIM4wnsubGiven = TRUE; break; case BSIM4_MOD_WNDEP: mod->BSIM4wndep = value->rValue; mod->BSIM4wndepGiven = TRUE; if (mod->BSIM4wndep > 1.0e20) mod->BSIM4wndep *= 1.0e-6; break; case BSIM4_MOD_WNSD: mod->BSIM4wnsd = value->rValue; mod->BSIM4wnsdGiven = TRUE; if (mod->BSIM4wnsd > 1.0e23) mod->BSIM4wnsd *= 1.0e-6; break; case BSIM4_MOD_WNGATE: mod->BSIM4wngate = value->rValue; mod->BSIM4wngateGiven = TRUE; if (mod->BSIM4wngate > 1.0e23) mod->BSIM4wngate *= 1.0e-6; break; case BSIM4_MOD_WGAMMA1: mod->BSIM4wgamma1 = value->rValue; mod->BSIM4wgamma1Given = TRUE; break; case BSIM4_MOD_WGAMMA2: mod->BSIM4wgamma2 = value->rValue; mod->BSIM4wgamma2Given = TRUE; break; case BSIM4_MOD_WVBX: mod->BSIM4wvbx = value->rValue; mod->BSIM4wvbxGiven = TRUE; break; case BSIM4_MOD_WVBM: mod->BSIM4wvbm = value->rValue; mod->BSIM4wvbmGiven = TRUE; break; case BSIM4_MOD_WXT: mod->BSIM4wxt = value->rValue; mod->BSIM4wxtGiven = TRUE; break; case BSIM4_MOD_WK1: mod->BSIM4wk1 = value->rValue; mod->BSIM4wk1Given = TRUE; break; case BSIM4_MOD_WKT1: mod->BSIM4wkt1 = value->rValue; mod->BSIM4wkt1Given = TRUE; break; case BSIM4_MOD_WKT1L: mod->BSIM4wkt1l = value->rValue; mod->BSIM4wkt1lGiven = TRUE; break; case BSIM4_MOD_WKT2: mod->BSIM4wkt2 = value->rValue; mod->BSIM4wkt2Given = TRUE; break; case BSIM4_MOD_WK2: mod->BSIM4wk2 = value->rValue; mod->BSIM4wk2Given = TRUE; break; case BSIM4_MOD_WK3: mod->BSIM4wk3 = value->rValue; mod->BSIM4wk3Given = TRUE; break; case BSIM4_MOD_WK3B: mod->BSIM4wk3b = value->rValue; mod->BSIM4wk3bGiven = TRUE; break; case BSIM4_MOD_WLPE0: mod->BSIM4wlpe0 = value->rValue; mod->BSIM4wlpe0Given = TRUE; break; case BSIM4_MOD_WLPEB: mod->BSIM4wlpeb = value->rValue; mod->BSIM4wlpebGiven = TRUE; break; case BSIM4_MOD_WDVTP0: mod->BSIM4wdvtp0 = value->rValue; mod->BSIM4wdvtp0Given = TRUE; break; case BSIM4_MOD_WDVTP1: mod->BSIM4wdvtp1 = value->rValue; mod->BSIM4wdvtp1Given = TRUE; break; case BSIM4_MOD_WDVTP2: /* New DIBL/Rout */ mod->BSIM4wdvtp2 = value->rValue; mod->BSIM4wdvtp2Given = TRUE; break; case BSIM4_MOD_WDVTP3: mod->BSIM4wdvtp3 = value->rValue; mod->BSIM4wdvtp3Given = TRUE; break; case BSIM4_MOD_WDVTP4: mod->BSIM4wdvtp4 = value->rValue; mod->BSIM4wdvtp4Given = TRUE; break; case BSIM4_MOD_WDVTP5: mod->BSIM4wdvtp5 = value->rValue; mod->BSIM4wdvtp5Given = TRUE; break; case BSIM4_MOD_WW0: mod->BSIM4ww0 = value->rValue; mod->BSIM4ww0Given = TRUE; break; case BSIM4_MOD_WDVT0: mod->BSIM4wdvt0 = value->rValue; mod->BSIM4wdvt0Given = TRUE; break; case BSIM4_MOD_WDVT1: mod->BSIM4wdvt1 = value->rValue; mod->BSIM4wdvt1Given = TRUE; break; case BSIM4_MOD_WDVT2: mod->BSIM4wdvt2 = value->rValue; mod->BSIM4wdvt2Given = TRUE; break; case BSIM4_MOD_WDVT0W: mod->BSIM4wdvt0w = value->rValue; mod->BSIM4wdvt0wGiven = TRUE; break; case BSIM4_MOD_WDVT1W: mod->BSIM4wdvt1w = value->rValue; mod->BSIM4wdvt1wGiven = TRUE; break; case BSIM4_MOD_WDVT2W: mod->BSIM4wdvt2w = value->rValue; mod->BSIM4wdvt2wGiven = TRUE; break; case BSIM4_MOD_WDROUT: mod->BSIM4wdrout = value->rValue; mod->BSIM4wdroutGiven = TRUE; break; case BSIM4_MOD_WDSUB: mod->BSIM4wdsub = value->rValue; mod->BSIM4wdsubGiven = TRUE; break; case BSIM4_MOD_WVTH0: mod->BSIM4wvth0 = value->rValue; mod->BSIM4wvth0Given = TRUE; break; case BSIM4_MOD_WUA: mod->BSIM4wua = value->rValue; mod->BSIM4wuaGiven = TRUE; break; case BSIM4_MOD_WUA1: mod->BSIM4wua1 = value->rValue; mod->BSIM4wua1Given = TRUE; break; case BSIM4_MOD_WUB: mod->BSIM4wub = value->rValue; mod->BSIM4wubGiven = TRUE; break; case BSIM4_MOD_WUB1: mod->BSIM4wub1 = value->rValue; mod->BSIM4wub1Given = TRUE; break; case BSIM4_MOD_WUC: mod->BSIM4wuc = value->rValue; mod->BSIM4wucGiven = TRUE; break; case BSIM4_MOD_WUC1: mod->BSIM4wuc1 = value->rValue; mod->BSIM4wuc1Given = TRUE; break; case BSIM4_MOD_WU0 : mod->BSIM4wu0 = value->rValue; mod->BSIM4wu0Given = TRUE; break; case BSIM4_MOD_WUTE : mod->BSIM4wute = value->rValue; mod->BSIM4wuteGiven = TRUE; break; case BSIM4_MOD_WUCSTE : mod->BSIM4wucste = value->rValue; mod->BSIM4wucsteGiven = TRUE; break; case BSIM4_MOD_WVOFF: mod->BSIM4wvoff = value->rValue; mod->BSIM4wvoffGiven = TRUE; break; case BSIM4_MOD_WTVOFF: mod->BSIM4wtvoff = value->rValue; mod->BSIM4wtvoffGiven = TRUE; break; case BSIM4_MOD_WTNFACTOR: /* v4.7 temp dep of leakage current */ mod->BSIM4wtnfactor = value->rValue; mod->BSIM4wtnfactorGiven = TRUE; break; case BSIM4_MOD_WTETA0: /* v4.7 temp dep of leakage current */ mod->BSIM4wteta0 = value->rValue; mod->BSIM4wteta0Given = TRUE; break; case BSIM4_MOD_WTVOFFCV: /* v4.7 temp dep of leakage current */ mod->BSIM4wtvoffcv = value->rValue; mod->BSIM4wtvoffcvGiven = TRUE; break; case BSIM4_MOD_WMINV: mod->BSIM4wminv = value->rValue; mod->BSIM4wminvGiven = TRUE; break; case BSIM4_MOD_WMINVCV: mod->BSIM4wminvcv = value->rValue; mod->BSIM4wminvcvGiven = TRUE; break; case BSIM4_MOD_WFPROUT: mod->BSIM4wfprout = value->rValue; mod->BSIM4wfproutGiven = TRUE; break; case BSIM4_MOD_WPDITS: mod->BSIM4wpdits = value->rValue; mod->BSIM4wpditsGiven = TRUE; break; case BSIM4_MOD_WPDITSD: mod->BSIM4wpditsd = value->rValue; mod->BSIM4wpditsdGiven = TRUE; break; case BSIM4_MOD_WDELTA : mod->BSIM4wdelta = value->rValue; mod->BSIM4wdeltaGiven = TRUE; break; case BSIM4_MOD_WRDSW: mod->BSIM4wrdsw = value->rValue; mod->BSIM4wrdswGiven = TRUE; break; case BSIM4_MOD_WRDW: mod->BSIM4wrdw = value->rValue; mod->BSIM4wrdwGiven = TRUE; break; case BSIM4_MOD_WRSW: mod->BSIM4wrsw = value->rValue; mod->BSIM4wrswGiven = TRUE; break; case BSIM4_MOD_WPRWB: mod->BSIM4wprwb = value->rValue; mod->BSIM4wprwbGiven = TRUE; break; case BSIM4_MOD_WPRWG: mod->BSIM4wprwg = value->rValue; mod->BSIM4wprwgGiven = TRUE; break; case BSIM4_MOD_WPRT: mod->BSIM4wprt = value->rValue; mod->BSIM4wprtGiven = TRUE; break; case BSIM4_MOD_WETA0: mod->BSIM4weta0 = value->rValue; mod->BSIM4weta0Given = TRUE; break; case BSIM4_MOD_WETAB: mod->BSIM4wetab = value->rValue; mod->BSIM4wetabGiven = TRUE; break; case BSIM4_MOD_WPCLM: mod->BSIM4wpclm = value->rValue; mod->BSIM4wpclmGiven = TRUE; break; case BSIM4_MOD_WPDIBL1: mod->BSIM4wpdibl1 = value->rValue; mod->BSIM4wpdibl1Given = TRUE; break; case BSIM4_MOD_WPDIBL2: mod->BSIM4wpdibl2 = value->rValue; mod->BSIM4wpdibl2Given = TRUE; break; case BSIM4_MOD_WPDIBLB: mod->BSIM4wpdiblb = value->rValue; mod->BSIM4wpdiblbGiven = TRUE; break; case BSIM4_MOD_WPSCBE1: mod->BSIM4wpscbe1 = value->rValue; mod->BSIM4wpscbe1Given = TRUE; break; case BSIM4_MOD_WPSCBE2: mod->BSIM4wpscbe2 = value->rValue; mod->BSIM4wpscbe2Given = TRUE; break; case BSIM4_MOD_WPVAG: mod->BSIM4wpvag = value->rValue; mod->BSIM4wpvagGiven = TRUE; break; case BSIM4_MOD_WWR : mod->BSIM4wwr = value->rValue; mod->BSIM4wwrGiven = TRUE; break; case BSIM4_MOD_WDWG : mod->BSIM4wdwg = value->rValue; mod->BSIM4wdwgGiven = TRUE; break; case BSIM4_MOD_WDWB : mod->BSIM4wdwb = value->rValue; mod->BSIM4wdwbGiven = TRUE; break; case BSIM4_MOD_WB0 : mod->BSIM4wb0 = value->rValue; mod->BSIM4wb0Given = TRUE; break; case BSIM4_MOD_WB1 : mod->BSIM4wb1 = value->rValue; mod->BSIM4wb1Given = TRUE; break; case BSIM4_MOD_WALPHA0 : mod->BSIM4walpha0 = value->rValue; mod->BSIM4walpha0Given = TRUE; break; case BSIM4_MOD_WALPHA1 : mod->BSIM4walpha1 = value->rValue; mod->BSIM4walpha1Given = TRUE; break; case BSIM4_MOD_WBETA0 : mod->BSIM4wbeta0 = value->rValue; mod->BSIM4wbeta0Given = TRUE; break; case BSIM4_MOD_WPHIN : mod->BSIM4wphin = value->rValue; mod->BSIM4wphinGiven = TRUE; break; case BSIM4_MOD_WAGIDL : mod->BSIM4wagidl = value->rValue; mod->BSIM4wagidlGiven = TRUE; break; case BSIM4_MOD_WBGIDL : mod->BSIM4wbgidl = value->rValue; mod->BSIM4wbgidlGiven = TRUE; break; case BSIM4_MOD_WCGIDL : mod->BSIM4wcgidl = value->rValue; mod->BSIM4wcgidlGiven = TRUE; break; case BSIM4_MOD_WEGIDL : mod->BSIM4wegidl = value->rValue; mod->BSIM4wegidlGiven = TRUE; break; case BSIM4_MOD_WFGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4wfgidl = value->rValue; mod->BSIM4wfgidlGiven = TRUE; break; case BSIM4_MOD_WKGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4wkgidl = value->rValue; mod->BSIM4wkgidlGiven = TRUE; break; case BSIM4_MOD_WRGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4wrgidl = value->rValue; mod->BSIM4wrgidlGiven = TRUE; break; case BSIM4_MOD_WAGISL : mod->BSIM4wagisl = value->rValue; mod->BSIM4wagislGiven = TRUE; break; case BSIM4_MOD_WBGISL : mod->BSIM4wbgisl = value->rValue; mod->BSIM4wbgislGiven = TRUE; break; case BSIM4_MOD_WCGISL : mod->BSIM4wcgisl = value->rValue; mod->BSIM4wcgislGiven = TRUE; break; case BSIM4_MOD_WEGISL : mod->BSIM4wegisl = value->rValue; mod->BSIM4wegislGiven = TRUE; break; case BSIM4_MOD_WFGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4wfgisl = value->rValue; mod->BSIM4wfgislGiven = TRUE; break; case BSIM4_MOD_WKGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4wkgisl = value->rValue; mod->BSIM4wkgislGiven = TRUE; break; case BSIM4_MOD_WRGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4wrgisl = value->rValue; mod->BSIM4wrgislGiven = TRUE; break; case BSIM4_MOD_WAIGC : mod->BSIM4waigc = value->rValue; mod->BSIM4waigcGiven = TRUE; break; case BSIM4_MOD_WBIGC : mod->BSIM4wbigc = value->rValue; mod->BSIM4wbigcGiven = TRUE; break; case BSIM4_MOD_WCIGC : mod->BSIM4wcigc = value->rValue; mod->BSIM4wcigcGiven = TRUE; break; case BSIM4_MOD_WAIGSD : mod->BSIM4waigsd = value->rValue; mod->BSIM4waigsdGiven = TRUE; break; case BSIM4_MOD_WBIGSD : mod->BSIM4wbigsd = value->rValue; mod->BSIM4wbigsdGiven = TRUE; break; case BSIM4_MOD_WCIGSD : mod->BSIM4wcigsd = value->rValue; mod->BSIM4wcigsdGiven = TRUE; break; case BSIM4_MOD_WAIGS : mod->BSIM4waigs = value->rValue; mod->BSIM4waigsGiven = TRUE; break; case BSIM4_MOD_WBIGS : mod->BSIM4wbigs = value->rValue; mod->BSIM4wbigsGiven = TRUE; break; case BSIM4_MOD_WCIGS : mod->BSIM4wcigs = value->rValue; mod->BSIM4wcigsGiven = TRUE; break; case BSIM4_MOD_WAIGD : mod->BSIM4waigd = value->rValue; mod->BSIM4waigdGiven = TRUE; break; case BSIM4_MOD_WBIGD : mod->BSIM4wbigd = value->rValue; mod->BSIM4wbigdGiven = TRUE; break; case BSIM4_MOD_WCIGD : mod->BSIM4wcigd = value->rValue; mod->BSIM4wcigdGiven = TRUE; break; case BSIM4_MOD_WAIGBACC : mod->BSIM4waigbacc = value->rValue; mod->BSIM4waigbaccGiven = TRUE; break; case BSIM4_MOD_WBIGBACC : mod->BSIM4wbigbacc = value->rValue; mod->BSIM4wbigbaccGiven = TRUE; break; case BSIM4_MOD_WCIGBACC : mod->BSIM4wcigbacc = value->rValue; mod->BSIM4wcigbaccGiven = TRUE; break; case BSIM4_MOD_WAIGBINV : mod->BSIM4waigbinv = value->rValue; mod->BSIM4waigbinvGiven = TRUE; break; case BSIM4_MOD_WBIGBINV : mod->BSIM4wbigbinv = value->rValue; mod->BSIM4wbigbinvGiven = TRUE; break; case BSIM4_MOD_WCIGBINV : mod->BSIM4wcigbinv = value->rValue; mod->BSIM4wcigbinvGiven = TRUE; break; case BSIM4_MOD_WNIGC : mod->BSIM4wnigc = value->rValue; mod->BSIM4wnigcGiven = TRUE; break; case BSIM4_MOD_WNIGBINV : mod->BSIM4wnigbinv = value->rValue; mod->BSIM4wnigbinvGiven = TRUE; break; case BSIM4_MOD_WNIGBACC : mod->BSIM4wnigbacc = value->rValue; mod->BSIM4wnigbaccGiven = TRUE; break; case BSIM4_MOD_WNTOX : mod->BSIM4wntox = value->rValue; mod->BSIM4wntoxGiven = TRUE; break; case BSIM4_MOD_WEIGBINV : mod->BSIM4weigbinv = value->rValue; mod->BSIM4weigbinvGiven = TRUE; break; case BSIM4_MOD_WPIGCD : mod->BSIM4wpigcd = value->rValue; mod->BSIM4wpigcdGiven = TRUE; break; case BSIM4_MOD_WPOXEDGE : mod->BSIM4wpoxedge = value->rValue; mod->BSIM4wpoxedgeGiven = TRUE; break; case BSIM4_MOD_WXRCRG1 : mod->BSIM4wxrcrg1 = value->rValue; mod->BSIM4wxrcrg1Given = TRUE; break; case BSIM4_MOD_WXRCRG2 : mod->BSIM4wxrcrg2 = value->rValue; mod->BSIM4wxrcrg2Given = TRUE; break; case BSIM4_MOD_WLAMBDA : mod->BSIM4wlambda = value->rValue; mod->BSIM4wlambdaGiven = TRUE; break; case BSIM4_MOD_WVTL : mod->BSIM4wvtl = value->rValue; mod->BSIM4wvtlGiven = TRUE; break; case BSIM4_MOD_WXN: mod->BSIM4wxn = value->rValue; mod->BSIM4wxnGiven = TRUE; break; case BSIM4_MOD_WVFBSDOFF: mod->BSIM4wvfbsdoff = value->rValue; mod->BSIM4wvfbsdoffGiven = TRUE; break; case BSIM4_MOD_WTVFBSDOFF: mod->BSIM4wtvfbsdoff = value->rValue; mod->BSIM4wtvfbsdoffGiven = TRUE; break; case BSIM4_MOD_WEU : mod->BSIM4weu = value->rValue; mod->BSIM4weuGiven = TRUE; break; case BSIM4_MOD_WUCS : mod->BSIM4wucs = value->rValue; mod->BSIM4wucsGiven = TRUE; break; case BSIM4_MOD_WVFB : mod->BSIM4wvfb = value->rValue; mod->BSIM4wvfbGiven = TRUE; break; case BSIM4_MOD_WCGSL : mod->BSIM4wcgsl = value->rValue; mod->BSIM4wcgslGiven = TRUE; break; case BSIM4_MOD_WCGDL : mod->BSIM4wcgdl = value->rValue; mod->BSIM4wcgdlGiven = TRUE; break; case BSIM4_MOD_WCKAPPAS : mod->BSIM4wckappas = value->rValue; mod->BSIM4wckappasGiven = TRUE; break; case BSIM4_MOD_WCKAPPAD : mod->BSIM4wckappad = value->rValue; mod->BSIM4wckappadGiven = TRUE; break; case BSIM4_MOD_WCF : mod->BSIM4wcf = value->rValue; mod->BSIM4wcfGiven = TRUE; break; case BSIM4_MOD_WCLC : mod->BSIM4wclc = value->rValue; mod->BSIM4wclcGiven = TRUE; break; case BSIM4_MOD_WCLE : mod->BSIM4wcle = value->rValue; mod->BSIM4wcleGiven = TRUE; break; case BSIM4_MOD_WVFBCV : mod->BSIM4wvfbcv = value->rValue; mod->BSIM4wvfbcvGiven = TRUE; break; case BSIM4_MOD_WACDE : mod->BSIM4wacde = value->rValue; mod->BSIM4wacdeGiven = TRUE; break; case BSIM4_MOD_WMOIN : mod->BSIM4wmoin = value->rValue; mod->BSIM4wmoinGiven = TRUE; break; case BSIM4_MOD_WNOFF : mod->BSIM4wnoff = value->rValue; mod->BSIM4wnoffGiven = TRUE; break; case BSIM4_MOD_WVOFFCV : mod->BSIM4wvoffcv = value->rValue; mod->BSIM4wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM4_MOD_PCDSC : mod->BSIM4pcdsc = value->rValue; mod->BSIM4pcdscGiven = TRUE; break; case BSIM4_MOD_PCDSCB : mod->BSIM4pcdscb = value->rValue; mod->BSIM4pcdscbGiven = TRUE; break; case BSIM4_MOD_PCDSCD : mod->BSIM4pcdscd = value->rValue; mod->BSIM4pcdscdGiven = TRUE; break; case BSIM4_MOD_PCIT : mod->BSIM4pcit = value->rValue; mod->BSIM4pcitGiven = TRUE; break; case BSIM4_MOD_PNFACTOR : mod->BSIM4pnfactor = value->rValue; mod->BSIM4pnfactorGiven = TRUE; break; case BSIM4_MOD_PXJ: mod->BSIM4pxj = value->rValue; mod->BSIM4pxjGiven = TRUE; break; case BSIM4_MOD_PVSAT: mod->BSIM4pvsat = value->rValue; mod->BSIM4pvsatGiven = TRUE; break; case BSIM4_MOD_PA0: mod->BSIM4pa0 = value->rValue; mod->BSIM4pa0Given = TRUE; break; case BSIM4_MOD_PAGS: mod->BSIM4pags = value->rValue; mod->BSIM4pagsGiven = TRUE; break; case BSIM4_MOD_PA1: mod->BSIM4pa1 = value->rValue; mod->BSIM4pa1Given = TRUE; break; case BSIM4_MOD_PA2: mod->BSIM4pa2 = value->rValue; mod->BSIM4pa2Given = TRUE; break; case BSIM4_MOD_PAT: mod->BSIM4pat = value->rValue; mod->BSIM4patGiven = TRUE; break; case BSIM4_MOD_PKETA: mod->BSIM4pketa = value->rValue; mod->BSIM4pketaGiven = TRUE; break; case BSIM4_MOD_PNSUB: mod->BSIM4pnsub = value->rValue; mod->BSIM4pnsubGiven = TRUE; break; case BSIM4_MOD_PNDEP: mod->BSIM4pndep = value->rValue; mod->BSIM4pndepGiven = TRUE; if (mod->BSIM4pndep > 1.0e20) mod->BSIM4pndep *= 1.0e-6; break; case BSIM4_MOD_PNSD: mod->BSIM4pnsd = value->rValue; mod->BSIM4pnsdGiven = TRUE; if (mod->BSIM4pnsd > 1.0e23) mod->BSIM4pnsd *= 1.0e-6; break; case BSIM4_MOD_PNGATE: mod->BSIM4pngate = value->rValue; mod->BSIM4pngateGiven = TRUE; if (mod->BSIM4pngate > 1.0e23) mod->BSIM4pngate *= 1.0e-6; break; case BSIM4_MOD_PGAMMA1: mod->BSIM4pgamma1 = value->rValue; mod->BSIM4pgamma1Given = TRUE; break; case BSIM4_MOD_PGAMMA2: mod->BSIM4pgamma2 = value->rValue; mod->BSIM4pgamma2Given = TRUE; break; case BSIM4_MOD_PVBX: mod->BSIM4pvbx = value->rValue; mod->BSIM4pvbxGiven = TRUE; break; case BSIM4_MOD_PVBM: mod->BSIM4pvbm = value->rValue; mod->BSIM4pvbmGiven = TRUE; break; case BSIM4_MOD_PXT: mod->BSIM4pxt = value->rValue; mod->BSIM4pxtGiven = TRUE; break; case BSIM4_MOD_PK1: mod->BSIM4pk1 = value->rValue; mod->BSIM4pk1Given = TRUE; break; case BSIM4_MOD_PKT1: mod->BSIM4pkt1 = value->rValue; mod->BSIM4pkt1Given = TRUE; break; case BSIM4_MOD_PKT1L: mod->BSIM4pkt1l = value->rValue; mod->BSIM4pkt1lGiven = TRUE; break; case BSIM4_MOD_PKT2: mod->BSIM4pkt2 = value->rValue; mod->BSIM4pkt2Given = TRUE; break; case BSIM4_MOD_PK2: mod->BSIM4pk2 = value->rValue; mod->BSIM4pk2Given = TRUE; break; case BSIM4_MOD_PK3: mod->BSIM4pk3 = value->rValue; mod->BSIM4pk3Given = TRUE; break; case BSIM4_MOD_PK3B: mod->BSIM4pk3b = value->rValue; mod->BSIM4pk3bGiven = TRUE; break; case BSIM4_MOD_PLPE0: mod->BSIM4plpe0 = value->rValue; mod->BSIM4plpe0Given = TRUE; break; case BSIM4_MOD_PLPEB: mod->BSIM4plpeb = value->rValue; mod->BSIM4plpebGiven = TRUE; break; case BSIM4_MOD_PDVTP0: mod->BSIM4pdvtp0 = value->rValue; mod->BSIM4pdvtp0Given = TRUE; break; case BSIM4_MOD_PDVTP1: mod->BSIM4pdvtp1 = value->rValue; mod->BSIM4pdvtp1Given = TRUE; break; case BSIM4_MOD_PDVTP2: /* New DIBL/Rout */ mod->BSIM4pdvtp2 = value->rValue; mod->BSIM4pdvtp2Given = TRUE; break; case BSIM4_MOD_PDVTP3: mod->BSIM4pdvtp3 = value->rValue; mod->BSIM4pdvtp3Given = TRUE; break; case BSIM4_MOD_PDVTP4: mod->BSIM4pdvtp4 = value->rValue; mod->BSIM4pdvtp4Given = TRUE; break; case BSIM4_MOD_PDVTP5: mod->BSIM4pdvtp5 = value->rValue; mod->BSIM4pdvtp5Given = TRUE; break; case BSIM4_MOD_PW0: mod->BSIM4pw0 = value->rValue; mod->BSIM4pw0Given = TRUE; break; case BSIM4_MOD_PDVT0: mod->BSIM4pdvt0 = value->rValue; mod->BSIM4pdvt0Given = TRUE; break; case BSIM4_MOD_PDVT1: mod->BSIM4pdvt1 = value->rValue; mod->BSIM4pdvt1Given = TRUE; break; case BSIM4_MOD_PDVT2: mod->BSIM4pdvt2 = value->rValue; mod->BSIM4pdvt2Given = TRUE; break; case BSIM4_MOD_PDVT0W: mod->BSIM4pdvt0w = value->rValue; mod->BSIM4pdvt0wGiven = TRUE; break; case BSIM4_MOD_PDVT1W: mod->BSIM4pdvt1w = value->rValue; mod->BSIM4pdvt1wGiven = TRUE; break; case BSIM4_MOD_PDVT2W: mod->BSIM4pdvt2w = value->rValue; mod->BSIM4pdvt2wGiven = TRUE; break; case BSIM4_MOD_PDROUT: mod->BSIM4pdrout = value->rValue; mod->BSIM4pdroutGiven = TRUE; break; case BSIM4_MOD_PDSUB: mod->BSIM4pdsub = value->rValue; mod->BSIM4pdsubGiven = TRUE; break; case BSIM4_MOD_PVTH0: mod->BSIM4pvth0 = value->rValue; mod->BSIM4pvth0Given = TRUE; break; case BSIM4_MOD_PUA: mod->BSIM4pua = value->rValue; mod->BSIM4puaGiven = TRUE; break; case BSIM4_MOD_PUA1: mod->BSIM4pua1 = value->rValue; mod->BSIM4pua1Given = TRUE; break; case BSIM4_MOD_PUB: mod->BSIM4pub = value->rValue; mod->BSIM4pubGiven = TRUE; break; case BSIM4_MOD_PUB1: mod->BSIM4pub1 = value->rValue; mod->BSIM4pub1Given = TRUE; break; case BSIM4_MOD_PUC: mod->BSIM4puc = value->rValue; mod->BSIM4pucGiven = TRUE; break; case BSIM4_MOD_PUC1: mod->BSIM4puc1 = value->rValue; mod->BSIM4puc1Given = TRUE; break; case BSIM4_MOD_PU0 : mod->BSIM4pu0 = value->rValue; mod->BSIM4pu0Given = TRUE; break; case BSIM4_MOD_PUTE : mod->BSIM4pute = value->rValue; mod->BSIM4puteGiven = TRUE; break; case BSIM4_MOD_PUCSTE : mod->BSIM4pucste = value->rValue; mod->BSIM4pucsteGiven = TRUE; break; case BSIM4_MOD_PVOFF: mod->BSIM4pvoff = value->rValue; mod->BSIM4pvoffGiven = TRUE; break; case BSIM4_MOD_PTVOFF: mod->BSIM4ptvoff = value->rValue; mod->BSIM4ptvoffGiven = TRUE; break; case BSIM4_MOD_PTNFACTOR: /* v4.7 temp dep of leakage current */ mod->BSIM4ptnfactor = value->rValue; mod->BSIM4ptnfactorGiven = TRUE; break; case BSIM4_MOD_PTETA0: /* v4.7 temp dep of leakage current */ mod->BSIM4pteta0 = value->rValue; mod->BSIM4pteta0Given = TRUE; break; case BSIM4_MOD_PTVOFFCV: /* v4.7 temp dep of leakage current */ mod->BSIM4ptvoffcv = value->rValue; mod->BSIM4ptvoffcvGiven = TRUE; break; case BSIM4_MOD_PMINV: mod->BSIM4pminv = value->rValue; mod->BSIM4pminvGiven = TRUE; break; case BSIM4_MOD_PMINVCV: mod->BSIM4pminvcv = value->rValue; mod->BSIM4pminvcvGiven = TRUE; break; case BSIM4_MOD_PFPROUT: mod->BSIM4pfprout = value->rValue; mod->BSIM4pfproutGiven = TRUE; break; case BSIM4_MOD_PPDITS: mod->BSIM4ppdits = value->rValue; mod->BSIM4ppditsGiven = TRUE; break; case BSIM4_MOD_PPDITSD: mod->BSIM4ppditsd = value->rValue; mod->BSIM4ppditsdGiven = TRUE; break; case BSIM4_MOD_PDELTA : mod->BSIM4pdelta = value->rValue; mod->BSIM4pdeltaGiven = TRUE; break; case BSIM4_MOD_PRDSW: mod->BSIM4prdsw = value->rValue; mod->BSIM4prdswGiven = TRUE; break; case BSIM4_MOD_PRDW: mod->BSIM4prdw = value->rValue; mod->BSIM4prdwGiven = TRUE; break; case BSIM4_MOD_PRSW: mod->BSIM4prsw = value->rValue; mod->BSIM4prswGiven = TRUE; break; case BSIM4_MOD_PPRWB: mod->BSIM4pprwb = value->rValue; mod->BSIM4pprwbGiven = TRUE; break; case BSIM4_MOD_PPRWG: mod->BSIM4pprwg = value->rValue; mod->BSIM4pprwgGiven = TRUE; break; case BSIM4_MOD_PPRT: mod->BSIM4pprt = value->rValue; mod->BSIM4pprtGiven = TRUE; break; case BSIM4_MOD_PETA0: mod->BSIM4peta0 = value->rValue; mod->BSIM4peta0Given = TRUE; break; case BSIM4_MOD_PETAB: mod->BSIM4petab = value->rValue; mod->BSIM4petabGiven = TRUE; break; case BSIM4_MOD_PPCLM: mod->BSIM4ppclm = value->rValue; mod->BSIM4ppclmGiven = TRUE; break; case BSIM4_MOD_PPDIBL1: mod->BSIM4ppdibl1 = value->rValue; mod->BSIM4ppdibl1Given = TRUE; break; case BSIM4_MOD_PPDIBL2: mod->BSIM4ppdibl2 = value->rValue; mod->BSIM4ppdibl2Given = TRUE; break; case BSIM4_MOD_PPDIBLB: mod->BSIM4ppdiblb = value->rValue; mod->BSIM4ppdiblbGiven = TRUE; break; case BSIM4_MOD_PPSCBE1: mod->BSIM4ppscbe1 = value->rValue; mod->BSIM4ppscbe1Given = TRUE; break; case BSIM4_MOD_PPSCBE2: mod->BSIM4ppscbe2 = value->rValue; mod->BSIM4ppscbe2Given = TRUE; break; case BSIM4_MOD_PPVAG: mod->BSIM4ppvag = value->rValue; mod->BSIM4ppvagGiven = TRUE; break; case BSIM4_MOD_PWR : mod->BSIM4pwr = value->rValue; mod->BSIM4pwrGiven = TRUE; break; case BSIM4_MOD_PDWG : mod->BSIM4pdwg = value->rValue; mod->BSIM4pdwgGiven = TRUE; break; case BSIM4_MOD_PDWB : mod->BSIM4pdwb = value->rValue; mod->BSIM4pdwbGiven = TRUE; break; case BSIM4_MOD_PB0 : mod->BSIM4pb0 = value->rValue; mod->BSIM4pb0Given = TRUE; break; case BSIM4_MOD_PB1 : mod->BSIM4pb1 = value->rValue; mod->BSIM4pb1Given = TRUE; break; case BSIM4_MOD_PALPHA0 : mod->BSIM4palpha0 = value->rValue; mod->BSIM4palpha0Given = TRUE; break; case BSIM4_MOD_PALPHA1 : mod->BSIM4palpha1 = value->rValue; mod->BSIM4palpha1Given = TRUE; break; case BSIM4_MOD_PBETA0 : mod->BSIM4pbeta0 = value->rValue; mod->BSIM4pbeta0Given = TRUE; break; case BSIM4_MOD_PPHIN : mod->BSIM4pphin = value->rValue; mod->BSIM4pphinGiven = TRUE; break; case BSIM4_MOD_PAGIDL : mod->BSIM4pagidl = value->rValue; mod->BSIM4pagidlGiven = TRUE; break; case BSIM4_MOD_PBGIDL : mod->BSIM4pbgidl = value->rValue; mod->BSIM4pbgidlGiven = TRUE; break; case BSIM4_MOD_PCGIDL : mod->BSIM4pcgidl = value->rValue; mod->BSIM4pcgidlGiven = TRUE; break; case BSIM4_MOD_PEGIDL : mod->BSIM4pegidl = value->rValue; mod->BSIM4pegidlGiven = TRUE; break; case BSIM4_MOD_PFGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4pfgidl = value->rValue; mod->BSIM4pfgidlGiven = TRUE; break; case BSIM4_MOD_PKGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4pkgidl = value->rValue; mod->BSIM4pkgidlGiven = TRUE; break; case BSIM4_MOD_PRGIDL : /* v4.7 New GIDL/GISL */ mod->BSIM4prgidl = value->rValue; mod->BSIM4prgidlGiven = TRUE; break; case BSIM4_MOD_PAGISL : mod->BSIM4pagisl = value->rValue; mod->BSIM4pagislGiven = TRUE; break; case BSIM4_MOD_PBGISL : mod->BSIM4pbgisl = value->rValue; mod->BSIM4pbgislGiven = TRUE; break; case BSIM4_MOD_PCGISL : mod->BSIM4pcgisl = value->rValue; mod->BSIM4pcgislGiven = TRUE; break; case BSIM4_MOD_PEGISL : mod->BSIM4pegisl = value->rValue; mod->BSIM4pegislGiven = TRUE; break; case BSIM4_MOD_PFGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4pfgisl = value->rValue; mod->BSIM4pfgislGiven = TRUE; break; case BSIM4_MOD_PKGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4pkgisl = value->rValue; mod->BSIM4pkgislGiven = TRUE; break; case BSIM4_MOD_PRGISL : /* v4.7 New GIDL/GISL */ mod->BSIM4prgisl = value->rValue; mod->BSIM4prgislGiven = TRUE; break; case BSIM4_MOD_PAIGC : mod->BSIM4paigc = value->rValue; mod->BSIM4paigcGiven = TRUE; break; case BSIM4_MOD_PBIGC : mod->BSIM4pbigc = value->rValue; mod->BSIM4pbigcGiven = TRUE; break; case BSIM4_MOD_PCIGC : mod->BSIM4pcigc = value->rValue; mod->BSIM4pcigcGiven = TRUE; break; case BSIM4_MOD_PAIGSD : mod->BSIM4paigsd = value->rValue; mod->BSIM4paigsdGiven = TRUE; break; case BSIM4_MOD_PBIGSD : mod->BSIM4pbigsd = value->rValue; mod->BSIM4pbigsdGiven = TRUE; break; case BSIM4_MOD_PCIGSD : mod->BSIM4pcigsd = value->rValue; mod->BSIM4pcigsdGiven = TRUE; break; case BSIM4_MOD_PAIGS : mod->BSIM4paigs = value->rValue; mod->BSIM4paigsGiven = TRUE; break; case BSIM4_MOD_PBIGS : mod->BSIM4pbigs = value->rValue; mod->BSIM4pbigsGiven = TRUE; break; case BSIM4_MOD_PCIGS : mod->BSIM4pcigs = value->rValue; mod->BSIM4pcigsGiven = TRUE; break; case BSIM4_MOD_PAIGD : mod->BSIM4paigd = value->rValue; mod->BSIM4paigdGiven = TRUE; break; case BSIM4_MOD_PBIGD : mod->BSIM4pbigd = value->rValue; mod->BSIM4pbigdGiven = TRUE; break; case BSIM4_MOD_PCIGD : mod->BSIM4pcigd = value->rValue; mod->BSIM4pcigdGiven = TRUE; break; case BSIM4_MOD_PAIGBACC : mod->BSIM4paigbacc = value->rValue; mod->BSIM4paigbaccGiven = TRUE; break; case BSIM4_MOD_PBIGBACC : mod->BSIM4pbigbacc = value->rValue; mod->BSIM4pbigbaccGiven = TRUE; break; case BSIM4_MOD_PCIGBACC : mod->BSIM4pcigbacc = value->rValue; mod->BSIM4pcigbaccGiven = TRUE; break; case BSIM4_MOD_PAIGBINV : mod->BSIM4paigbinv = value->rValue; mod->BSIM4paigbinvGiven = TRUE; break; case BSIM4_MOD_PBIGBINV : mod->BSIM4pbigbinv = value->rValue; mod->BSIM4pbigbinvGiven = TRUE; break; case BSIM4_MOD_PCIGBINV : mod->BSIM4pcigbinv = value->rValue; mod->BSIM4pcigbinvGiven = TRUE; break; case BSIM4_MOD_PNIGC : mod->BSIM4pnigc = value->rValue; mod->BSIM4pnigcGiven = TRUE; break; case BSIM4_MOD_PNIGBINV : mod->BSIM4pnigbinv = value->rValue; mod->BSIM4pnigbinvGiven = TRUE; break; case BSIM4_MOD_PNIGBACC : mod->BSIM4pnigbacc = value->rValue; mod->BSIM4pnigbaccGiven = TRUE; break; case BSIM4_MOD_PNTOX : mod->BSIM4pntox = value->rValue; mod->BSIM4pntoxGiven = TRUE; break; case BSIM4_MOD_PEIGBINV : mod->BSIM4peigbinv = value->rValue; mod->BSIM4peigbinvGiven = TRUE; break; case BSIM4_MOD_PPIGCD : mod->BSIM4ppigcd = value->rValue; mod->BSIM4ppigcdGiven = TRUE; break; case BSIM4_MOD_PPOXEDGE : mod->BSIM4ppoxedge = value->rValue; mod->BSIM4ppoxedgeGiven = TRUE; break; case BSIM4_MOD_PXRCRG1 : mod->BSIM4pxrcrg1 = value->rValue; mod->BSIM4pxrcrg1Given = TRUE; break; case BSIM4_MOD_PXRCRG2 : mod->BSIM4pxrcrg2 = value->rValue; mod->BSIM4pxrcrg2Given = TRUE; break; case BSIM4_MOD_PLAMBDA : mod->BSIM4plambda = value->rValue; mod->BSIM4plambdaGiven = TRUE; break; case BSIM4_MOD_PVTL : mod->BSIM4pvtl = value->rValue; mod->BSIM4pvtlGiven = TRUE; break; case BSIM4_MOD_PXN: mod->BSIM4pxn = value->rValue; mod->BSIM4pxnGiven = TRUE; break; case BSIM4_MOD_PVFBSDOFF: mod->BSIM4pvfbsdoff = value->rValue; mod->BSIM4pvfbsdoffGiven = TRUE; break; case BSIM4_MOD_PTVFBSDOFF: mod->BSIM4ptvfbsdoff = value->rValue; mod->BSIM4ptvfbsdoffGiven = TRUE; break; case BSIM4_MOD_PEU : mod->BSIM4peu = value->rValue; mod->BSIM4peuGiven = TRUE; break; case BSIM4_MOD_PUCS : mod->BSIM4pucs = value->rValue; mod->BSIM4pucsGiven = TRUE; break; case BSIM4_MOD_PVFB : mod->BSIM4pvfb = value->rValue; mod->BSIM4pvfbGiven = TRUE; break; case BSIM4_MOD_PCGSL : mod->BSIM4pcgsl = value->rValue; mod->BSIM4pcgslGiven = TRUE; break; case BSIM4_MOD_PCGDL : mod->BSIM4pcgdl = value->rValue; mod->BSIM4pcgdlGiven = TRUE; break; case BSIM4_MOD_PCKAPPAS : mod->BSIM4pckappas = value->rValue; mod->BSIM4pckappasGiven = TRUE; break; case BSIM4_MOD_PCKAPPAD : mod->BSIM4pckappad = value->rValue; mod->BSIM4pckappadGiven = TRUE; break; case BSIM4_MOD_PCF : mod->BSIM4pcf = value->rValue; mod->BSIM4pcfGiven = TRUE; break; case BSIM4_MOD_PCLC : mod->BSIM4pclc = value->rValue; mod->BSIM4pclcGiven = TRUE; break; case BSIM4_MOD_PCLE : mod->BSIM4pcle = value->rValue; mod->BSIM4pcleGiven = TRUE; break; case BSIM4_MOD_PVFBCV : mod->BSIM4pvfbcv = value->rValue; mod->BSIM4pvfbcvGiven = TRUE; break; case BSIM4_MOD_PACDE : mod->BSIM4pacde = value->rValue; mod->BSIM4pacdeGiven = TRUE; break; case BSIM4_MOD_PMOIN : mod->BSIM4pmoin = value->rValue; mod->BSIM4pmoinGiven = TRUE; break; case BSIM4_MOD_PNOFF : mod->BSIM4pnoff = value->rValue; mod->BSIM4pnoffGiven = TRUE; break; case BSIM4_MOD_PVOFFCV : mod->BSIM4pvoffcv = value->rValue; mod->BSIM4pvoffcvGiven = TRUE; break; case BSIM4_MOD_TNOM : mod->BSIM4tnom = value->rValue + CONSTCtoK; mod->BSIM4tnomGiven = TRUE; break; case BSIM4_MOD_CGSO : mod->BSIM4cgso = value->rValue; mod->BSIM4cgsoGiven = TRUE; break; case BSIM4_MOD_CGDO : mod->BSIM4cgdo = value->rValue; mod->BSIM4cgdoGiven = TRUE; break; case BSIM4_MOD_CGBO : mod->BSIM4cgbo = value->rValue; mod->BSIM4cgboGiven = TRUE; break; case BSIM4_MOD_XPART : mod->BSIM4xpart = value->rValue; mod->BSIM4xpartGiven = TRUE; break; case BSIM4_MOD_RSH : mod->BSIM4sheetResistance = value->rValue; mod->BSIM4sheetResistanceGiven = TRUE; break; case BSIM4_MOD_JSS : mod->BSIM4SjctSatCurDensity = value->rValue; mod->BSIM4SjctSatCurDensityGiven = TRUE; break; case BSIM4_MOD_JSWS : mod->BSIM4SjctSidewallSatCurDensity = value->rValue; mod->BSIM4SjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4_MOD_JSWGS : mod->BSIM4SjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4SjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4_MOD_PBS : mod->BSIM4SbulkJctPotential = value->rValue; mod->BSIM4SbulkJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJS : mod->BSIM4SbulkJctBotGradingCoeff = value->rValue; mod->BSIM4SbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4_MOD_PBSWS : mod->BSIM4SsidewallJctPotential = value->rValue; mod->BSIM4SsidewallJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJSWS : mod->BSIM4SbulkJctSideGradingCoeff = value->rValue; mod->BSIM4SbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4_MOD_CJS : mod->BSIM4SunitAreaJctCap = value->rValue; mod->BSIM4SunitAreaJctCapGiven = TRUE; break; case BSIM4_MOD_CJSWS : mod->BSIM4SunitLengthSidewallJctCap = value->rValue; mod->BSIM4SunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4_MOD_NJS : mod->BSIM4SjctEmissionCoeff = value->rValue; mod->BSIM4SjctEmissionCoeffGiven = TRUE; break; case BSIM4_MOD_PBSWGS : mod->BSIM4SGatesidewallJctPotential = value->rValue; mod->BSIM4SGatesidewallJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJSWGS : mod->BSIM4SbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4SbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4_MOD_CJSWGS : mod->BSIM4SunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4SunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4_MOD_XTIS : mod->BSIM4SjctTempExponent = value->rValue; mod->BSIM4SjctTempExponentGiven = TRUE; break; case BSIM4_MOD_JSD : mod->BSIM4DjctSatCurDensity = value->rValue; mod->BSIM4DjctSatCurDensityGiven = TRUE; break; case BSIM4_MOD_JSWD : mod->BSIM4DjctSidewallSatCurDensity = value->rValue; mod->BSIM4DjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4_MOD_JSWGD : mod->BSIM4DjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4DjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4_MOD_PBD : mod->BSIM4DbulkJctPotential = value->rValue; mod->BSIM4DbulkJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJD : mod->BSIM4DbulkJctBotGradingCoeff = value->rValue; mod->BSIM4DbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4_MOD_PBSWD : mod->BSIM4DsidewallJctPotential = value->rValue; mod->BSIM4DsidewallJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJSWD : mod->BSIM4DbulkJctSideGradingCoeff = value->rValue; mod->BSIM4DbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4_MOD_CJD : mod->BSIM4DunitAreaJctCap = value->rValue; mod->BSIM4DunitAreaJctCapGiven = TRUE; break; case BSIM4_MOD_CJSWD : mod->BSIM4DunitLengthSidewallJctCap = value->rValue; mod->BSIM4DunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4_MOD_NJD : mod->BSIM4DjctEmissionCoeff = value->rValue; mod->BSIM4DjctEmissionCoeffGiven = TRUE; break; case BSIM4_MOD_PBSWGD : mod->BSIM4DGatesidewallJctPotential = value->rValue; mod->BSIM4DGatesidewallJctPotentialGiven = TRUE; break; case BSIM4_MOD_MJSWGD : mod->BSIM4DbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4DbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4_MOD_CJSWGD : mod->BSIM4DunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4DunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4_MOD_XTID : mod->BSIM4DjctTempExponent = value->rValue; mod->BSIM4DjctTempExponentGiven = TRUE; break; case BSIM4_MOD_LINT : mod->BSIM4Lint = value->rValue; mod->BSIM4LintGiven = TRUE; break; case BSIM4_MOD_LL : mod->BSIM4Ll = value->rValue; mod->BSIM4LlGiven = TRUE; break; case BSIM4_MOD_LLC : mod->BSIM4Llc = value->rValue; mod->BSIM4LlcGiven = TRUE; break; case BSIM4_MOD_LLN : mod->BSIM4Lln = value->rValue; mod->BSIM4LlnGiven = TRUE; break; case BSIM4_MOD_LW : mod->BSIM4Lw = value->rValue; mod->BSIM4LwGiven = TRUE; break; case BSIM4_MOD_LWC : mod->BSIM4Lwc = value->rValue; mod->BSIM4LwcGiven = TRUE; break; case BSIM4_MOD_LWN : mod->BSIM4Lwn = value->rValue; mod->BSIM4LwnGiven = TRUE; break; case BSIM4_MOD_LWL : mod->BSIM4Lwl = value->rValue; mod->BSIM4LwlGiven = TRUE; break; case BSIM4_MOD_LWLC : mod->BSIM4Lwlc = value->rValue; mod->BSIM4LwlcGiven = TRUE; break; case BSIM4_MOD_LMIN : mod->BSIM4Lmin = value->rValue; mod->BSIM4LminGiven = TRUE; break; case BSIM4_MOD_LMAX : mod->BSIM4Lmax = value->rValue; mod->BSIM4LmaxGiven = TRUE; break; case BSIM4_MOD_WINT : mod->BSIM4Wint = value->rValue; mod->BSIM4WintGiven = TRUE; break; case BSIM4_MOD_WL : mod->BSIM4Wl = value->rValue; mod->BSIM4WlGiven = TRUE; break; case BSIM4_MOD_WLC : mod->BSIM4Wlc = value->rValue; mod->BSIM4WlcGiven = TRUE; break; case BSIM4_MOD_WLN : mod->BSIM4Wln = value->rValue; mod->BSIM4WlnGiven = TRUE; break; case BSIM4_MOD_WW : mod->BSIM4Ww = value->rValue; mod->BSIM4WwGiven = TRUE; break; case BSIM4_MOD_WWC : mod->BSIM4Wwc = value->rValue; mod->BSIM4WwcGiven = TRUE; break; case BSIM4_MOD_WWN : mod->BSIM4Wwn = value->rValue; mod->BSIM4WwnGiven = TRUE; break; case BSIM4_MOD_WWL : mod->BSIM4Wwl = value->rValue; mod->BSIM4WwlGiven = TRUE; break; case BSIM4_MOD_WWLC : mod->BSIM4Wwlc = value->rValue; mod->BSIM4WwlcGiven = TRUE; break; case BSIM4_MOD_WMIN : mod->BSIM4Wmin = value->rValue; mod->BSIM4WminGiven = TRUE; break; case BSIM4_MOD_WMAX : mod->BSIM4Wmax = value->rValue; mod->BSIM4WmaxGiven = TRUE; break; case BSIM4_MOD_NOIA : mod->BSIM4oxideTrapDensityA = value->rValue; mod->BSIM4oxideTrapDensityAGiven = TRUE; break; case BSIM4_MOD_NOIB : mod->BSIM4oxideTrapDensityB = value->rValue; mod->BSIM4oxideTrapDensityBGiven = TRUE; break; case BSIM4_MOD_NOIC : mod->BSIM4oxideTrapDensityC = value->rValue; mod->BSIM4oxideTrapDensityCGiven = TRUE; break; case BSIM4_MOD_EM : mod->BSIM4em = value->rValue; mod->BSIM4emGiven = TRUE; break; case BSIM4_MOD_EF : mod->BSIM4ef = value->rValue; mod->BSIM4efGiven = TRUE; break; case BSIM4_MOD_AF : mod->BSIM4af = value->rValue; mod->BSIM4afGiven = TRUE; break; case BSIM4_MOD_KF : mod->BSIM4kf = value->rValue; mod->BSIM4kfGiven = TRUE; break; case BSIM4_MOD_VGS_MAX: mod->BSIM4vgsMax = value->rValue; mod->BSIM4vgsMaxGiven = TRUE; break; case BSIM4_MOD_VGD_MAX: mod->BSIM4vgdMax = value->rValue; mod->BSIM4vgdMaxGiven = TRUE; break; case BSIM4_MOD_VGB_MAX: mod->BSIM4vgbMax = value->rValue; mod->BSIM4vgbMaxGiven = TRUE; break; case BSIM4_MOD_VDS_MAX: mod->BSIM4vdsMax = value->rValue; mod->BSIM4vdsMaxGiven = TRUE; break; case BSIM4_MOD_VBS_MAX: mod->BSIM4vbsMax = value->rValue; mod->BSIM4vbsMaxGiven = TRUE; break; case BSIM4_MOD_VBD_MAX: mod->BSIM4vbdMax = value->rValue; mod->BSIM4vbdMaxGiven = TRUE; break; case BSIM4_MOD_NMOS : if(value->iValue) { mod->BSIM4type = 1; mod->BSIM4typeGiven = TRUE; } break; case BSIM4_MOD_PMOS : if(value->iValue) { mod->BSIM4type = - 1; mod->BSIM4typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4/B4TERMS_OF_USE0000644000265600020320000000254412264261473021362 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. Chenming Hu, and Weidong Liu Mar. 2000 ngspice-26/src/spicelib/devices/vcvs/0000755000265600020320000000000012264261711017210 5ustar andreasadminngspice-26/src/spicelib/devices/vcvs/vcvsdest.c0000644000265600020320000000141112264261473021217 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vcvsdefs.h" #include "ngspice/suffix.h" void VCVSdestroy(GENmodel **inModel) { VCVSmodel **model = (VCVSmodel **)inModel; VCVSinstance *here; VCVSinstance *prev = NULL; VCVSmodel *mod = *model; VCVSmodel *oldmod = NULL; for( ; mod ; mod = mod->VCVSnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->VCVSinstances ; here ; here = here->VCVSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/vcvs/vcvsask.c0000644000265600020320000001205112264261473021040 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* * This routine gives access to the internal device parameters * of Voltage Controlled Voltage Source */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VCVSask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { VCVSinstance *here = (VCVSinstance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case VCVS_POS_NODE: value->iValue = here->VCVSposNode; return (OK); case VCVS_NEG_NODE: value->iValue = here->VCVSnegNode; return (OK); case VCVS_CONT_P_NODE: value->iValue = here->VCVScontPosNode; return (OK); case VCVS_CONT_N_NODE: value->iValue = here->VCVScontNegNode; return (OK); case VCVS_IC: value->rValue = here->VCVSinitCond; return (OK); case VCVS_GAIN: value->rValue = here->VCVScoeff; return (OK); case VCVS_CONT_V_OLD: value->rValue = *(ckt->CKTstate0 + here->VCVScontVOld); return (OK); case VCVS_BR: value->iValue = here->VCVSbranch; return (OK); case VCVS_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->VCVSsenParmNo); } return(OK); case VCVS_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCVSsenParmNo); } return(OK); case VCVS_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCVSsenParmNo); } return(OK); case VCVS_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCVSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCVSsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case VCVS_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCVSsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCVSsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case VCVS_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->VCVSsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->VCVSsenParmNo); } return(OK); case VCVS_CURRENT : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VCVSask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = *(ckt->CKTrhsOld + here->VCVSbranch); } return(OK); case VCVS_VOLTS : value->rValue = (*(ckt->CKTrhsOld + here->VCVSposNode) - *(ckt->CKTrhsOld + here->VCVSnegNode)); return(OK); case VCVS_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "VCVSask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTrhsOld + here->VCVSbranch) * (*(ckt->CKTrhsOld + here->VCVSposNode) - *(ckt->CKTrhsOld + here->VCVSnegNode)); } return(OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/vcvs/vcvsfbr.c0000644000265600020320000000175212264261473021041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSfindBr(CKTcircuit *ckt, GENmodel *inModel, IFuid name) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; int error; CKTnode *tmp; for( ; model != NULL; model = model->VCVSnextModel) { for (here = model->VCVSinstances; here != NULL; here = here->VCVSnextInstance) { if(here->VCVSname == name) { if(here->VCVSbranch == 0) { error = CKTmkCur(ckt,&tmp,here->VCVSname,"branch"); if(error) return(error); here->VCVSbranch = tmp->number; } return(here->VCVSbranch); } } } return(0); } ngspice-26/src/spicelib/devices/vcvs/vcvs.c0000644000265600020320000000331412264261473020343 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "vcvsdefs.h" #include "ngspice/suffix.h" IFparm VCVSpTable[] = { /* parameters */ IOPU("gain", VCVS_GAIN, IF_REAL,"Voltage gain"), IP("sens_gain",VCVS_GAIN_SENS,IF_FLAG,"flag to request sensitivity WRT gain"), OPU("pos_node", VCVS_POS_NODE, IF_INTEGER, "Positive node of source"), OPU("neg_node", VCVS_NEG_NODE, IF_INTEGER, "Negative node of source"), OPU("cont_p_node",VCVS_CONT_P_NODE,IF_INTEGER, "Positive node of contr. source"), OPU("cont_n_node",VCVS_CONT_N_NODE,IF_INTEGER, "Negative node of contr. source"), IP("ic", VCVS_IC, IF_REAL, "Initial condition of controlling source"), OP("i", VCVS_CURRENT, IF_REAL, "Output current"), OP("v", VCVS_VOLTS, IF_REAL, "Output voltage"), OP("p", VCVS_POWER, IF_REAL, "Power"), OPU("sens_dc", VCVS_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU("sens_real", VCVS_QUEST_SENS_REAL,IF_REAL, "real part of ac sensitivity"), OPU("sens_imag", VCVS_QUEST_SENS_IMAG,IF_REAL, "imag part of ac sensitivity"), OPU("sens_mag", VCVS_QUEST_SENS_MAG, IF_REAL, "sensitivity of ac magnitude"), OPU("sens_ph", VCVS_QUEST_SENS_PH, IF_REAL, "sensitivity of ac phase"), OPU("sens_cplx", VCVS_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; char *VCVSnames[] = { "V+", "V-", "VC+", "VC-" }; int VCVSnSize = NUMELEMS(VCVSnames); int VCVSpTSize = NUMELEMS(VCVSpTable); int VCVSmPTSize = 0; int VCVSiSize = sizeof(VCVSinstance); int VCVSmSize = sizeof(VCVSmodel); ngspice-26/src/spicelib/devices/vcvs/vcvsset.c0000644000265600020320000000456712264261473021072 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* load the voltage source structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCVSsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; int error; CKTnode *tmp; NG_IGNORE(states); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { if(here->VCVSposNode == here->VCVSnegNode) { SPfrontEnd->IFerror (ERR_FATAL, "instance %s is a shorted VCVS", &here->VCVSname); return(E_UNSUPP); } if(here->VCVSbranch == 0) { error = CKTmkCur(ckt,&tmp,here->VCVSname,"branch"); if(error) return(error); here->VCVSbranch = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(VCVSposIbrptr, VCVSposNode, VCVSbranch); TSTALLOC(VCVSnegIbrptr, VCVSnegNode, VCVSbranch); TSTALLOC(VCVSibrPosptr, VCVSbranch, VCVSposNode); TSTALLOC(VCVSibrNegptr, VCVSbranch, VCVSnegNode); TSTALLOC(VCVSibrContPosptr, VCVSbranch, VCVScontPosNode); TSTALLOC(VCVSibrContNegptr, VCVSbranch, VCVScontNegNode); } } return(OK); } int VCVSunsetup(GENmodel *inModel, CKTcircuit *ckt) { VCVSmodel *model; VCVSinstance *here; for (model = (VCVSmodel *)inModel; model != NULL; model = model->VCVSnextModel) { for (here = model->VCVSinstances; here != NULL; here=here->VCVSnextInstance) { if (here->VCVSbranch) { CKTdltNNum(ckt, here->VCVSbranch); here->VCVSbranch = 0; } } } return OK; } ngspice-26/src/spicelib/devices/vcvs/vcvsitf.h0000644000265600020320000000026012264261473021050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_VCVS #define DEV_VCVS SPICEdev *get_vcvs_info(void); #endif ngspice-26/src/spicelib/devices/vcvs/vcvspar.c0000644000265600020320000000137212264261473021050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int VCVSparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { VCVSinstance *here = (VCVSinstance *)inst; NG_IGNORE(select); switch(param) { case VCVS_GAIN: here->VCVScoeff = value->rValue; here->VCVScoeffGiven = TRUE; break; case VCVS_GAIN_SENS: here->VCVSsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/vcvs/vcvssacl.c0000644000265600020320000000256712264261473021217 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current ac sensitivity information into the * array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; double vc; double ivc; /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { if(here->VCVSsenParmNo){ vc = *(ckt->CKTrhsOld + here->VCVScontPosNode) - *(ckt->CKTrhsOld + here->VCVScontNegNode); ivc = *(ckt->CKTirhsOld + here->VCVScontPosNode) - *(ckt->CKTirhsOld + here->VCVScontNegNode); *(ckt->CKTsenInfo->SEN_RHS[here->VCVSbranch] + here->VCVSsenParmNo) += vc; *(ckt->CKTsenInfo->SEN_iRHS[here->VCVSbranch] + here->VCVSsenParmNo) += ivc; } } } return(OK); } ngspice-26/src/spicelib/devices/vcvs/vcvsdefs.h0000644000265600020320000000671512264261473021222 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef VCVS #define VCVS #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* * structures to describe Voltage Controlled Voltage Sources */ /* information to describe a single instance */ typedef struct sVCVSinstance { struct sVCVSmodel *VCVSmodPtr; /* backpointer to model */ struct sVCVSinstance *VCVSnextInstance; /* pointer to next instance of *current model*/ IFuid VCVSname; /* pointer to character string naming this instance */ int VCVSstates; /* state info */ int VCVSposNode; /* number of positive node of source */ int VCVSnegNode; /* number of negative node of source */ int VCVScontPosNode; /* number of positive node of controlling source */ int VCVScontNegNode; /* number of negative node of controlling source */ int VCVSbranch; /* equation number of branch equation added for v source */ double VCVSinitCond; /* initial condition (of controlling source) */ double VCVScoeff; /* coefficient */ double *VCVSposIbrptr; /* pointer to sparse matrix element at * (positive node, branch equation) */ double *VCVSnegIbrptr; /* pointer to sparse matrix element at * (negative node, branch equation) */ double *VCVSibrPosptr; /* pointer to sparse matrix element at * (branch equation, positive node) */ double *VCVSibrNegptr; /* pointer to sparse matrix element at * (branch equation, negative node) */ double *VCVSibrContPosptr; /* pointer to sparse matrix element at *(branch equation, control positive node)*/ double *VCVSibrContNegptr; /* pointer to sparse matrix element at *(branch equation, control negative node)*/ unsigned VCVScoeffGiven :1 ;/* flag to indicate function coeffs given */ int VCVSsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } VCVSinstance ; #define VCVSvOld VCVSstates #define VCVScontVOld VCVSstates + 1 /* per model data */ typedef struct sVCVSmodel { /* model structure for a source */ int VCVSmodType; /* type index of this device type */ struct sVCVSmodel *VCVSnextModel; /* pointer to next possible model *in linked list */ VCVSinstance * VCVSinstances; /* pointer to list of instances * that have this model */ IFuid VCVSmodName; /* pointer to character string naming this model */ } VCVSmodel; /* device parameters */ #define VCVS_GAIN 1 #define VCVS_POS_NODE 2 #define VCVS_NEG_NODE 3 #define VCVS_CONT_P_NODE 4 #define VCVS_CONT_N_NODE 5 #define VCVS_BR 6 #define VCVS_IC 7 #define VCVS_CONT_V_OLD 8 #define VCVS_GAIN_SENS 9 #define VCVS_CURRENT 10 #define VCVS_POWER 11 #define VCVS_VOLTS 12 /* model parameters */ /* device questions */ #define VCVS_QUEST_SENS_REAL 201 #define VCVS_QUEST_SENS_IMAG 202 #define VCVS_QUEST_SENS_MAG 203 #define VCVS_QUEST_SENS_PH 204 #define VCVS_QUEST_SENS_CPLX 205 #define VCVS_QUEST_SENS_DC 206 /* model questions */ #include "vcvsext.h" #endif /*VCVS*/ ngspice-26/src/spicelib/devices/vcvs/vcvsdel.c0000644000265600020320000000155612264261473021036 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance **fast = (VCVSinstance**)inst; VCVSinstance **prev = NULL; VCVSinstance *here; for( ; model ; model = model->VCVSnextModel) { prev = &(model->VCVSinstances); for(here = *prev; here ; here = *prev) { if(here->VCVSname == name || (fast && here==*fast) ) { *prev= here->VCVSnextInstance; FREE(here); return(OK); } prev = &(here->VCVSnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/vcvs/vcvspzld.c0000644000265600020320000000232412264261473021235 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "vcvsdefs.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCVSpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current voltage value into the * sparse matrix previously provided */ { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; NG_IGNORE(s); NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { *(here->VCVSposIbrptr) += 1.0 ; *(here->VCVSnegIbrptr) -= 1.0 ; *(here->VCVSibrPosptr) += 1.0 ; *(here->VCVSibrNegptr) -= 1.0 ; *(here->VCVSibrContPosptr) -= here->VCVScoeff ; *(here->VCVSibrContNegptr) += here->VCVScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/vcvs/vcvssset.c0000644000265600020320000000165612264261473021251 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSsSetup(SENstruct *info, GENmodel *inModel) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { if(here->VCVSsenParmNo){ here->VCVSsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/vcvs/vcvsinit.h0000644000265600020320000000030212264261473021226 0ustar andreasadmin#ifndef _VCVSINIT_H #define _VCVSINIT_H extern IFparm VCVSpTable[ ]; extern char *VCVSnames[ ]; extern int VCVSpTSize; extern int VCVSnSize; extern int VCVSiSize; extern int VCVSmSize; #endif ngspice-26/src/spicelib/devices/vcvs/vcvssprt.c0000644000265600020320000000304412264261473021254 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* Pretty print the sensitivity info for * all the VCVS in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void VCVSsPrint(GENmodel *inModel, CKTcircuit *ckt) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; printf("VOLTAGE CONTROLLED VOLTAGE SOURCES-----------------\n"); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { printf("Model name:%s\n",model->VCVSmodName); /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { printf(" Instance name:%s\n",here->VCVSname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->VCVSposNode), CKTnodName(ckt,here->VCVSnegNode)); printf(" Controlling Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->VCVScontPosNode), CKTnodName(ckt,here->VCVScontNegNode)); printf(" Branch equation number: %s\n", CKTnodName(ckt,here->VCVSbranch)); printf(" Coefficient: %f\n",here->VCVScoeff); printf(" VCVSsenParmNo:%d\n",here->VCVSsenParmNo); } } } ngspice-26/src/spicelib/devices/vcvs/vcvsinit.c0000644000265600020320000000416412264261473021233 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "vcvsitf.h" #include "vcvsext.h" #include "vcvsinit.h" SPICEdev VCVSinfo = { { "VCVS", "Voltage controlled voltage source", &VCVSnSize, &VCVSnSize, VCVSnames, &VCVSpTSize, VCVSpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ VCVSparam, /* DEVmodParam */ NULL, /* DEVload */ VCVSload, /* DEVsetup */ VCVSsetup, /* DEVunsetup */ VCVSunsetup, /* DEVpzSetup */ VCVSsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ VCVSfindBr, /* DEVacLoad */ VCVSload, /* AC and normal loads are identical */ /* DEVaccept */ NULL, /* DEVdestroy */ VCVSdestroy, /* DEVmodDelete */ VCVSmDelete, /* DEVdelete */ VCVSdelete, /* DEVsetic */ NULL, /* DEVask */ VCVSask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ VCVSpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ VCVSsSetup, /* DEVsenLoad */ VCVSsLoad, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ VCVSsAcLoad, /* DEVsenPrint */ VCVSsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &VCVSiSize, /* DEVmodSize */ &VCVSmSize }; SPICEdev * get_vcvs_info(void) { return &VCVSinfo; } ngspice-26/src/spicelib/devices/vcvs/vcvsext.h0000644000265600020320000000152112264261473021067 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int VCVSask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int VCVSdelete(GENmodel*,IFuid,GENinstance**); extern void VCVSdestroy(GENmodel**); extern int VCVSfindBr(CKTcircuit*,GENmodel*,IFuid); extern int VCVSload(GENmodel*,CKTcircuit*); extern int VCVSmDelete(GENmodel**,IFuid,GENmodel*); extern int VCVSparam(int,IFvalue*,GENinstance*,IFvalue*); extern int VCVSpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int VCVSsAcLoad(GENmodel*,CKTcircuit*); extern int VCVSsLoad(GENmodel*,CKTcircuit*); extern int VCVSsSetup(SENstruct*,GENmodel*); extern void VCVSsPrint(GENmodel*,CKTcircuit*); extern int VCVSsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int VCVSunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/vcvs/vcvsload.c0000644000265600020320000000222512264261473021203 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int VCVSload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current voltage value into the * sparse matrix previously provided */ { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { *(here->VCVSposIbrptr) += 1.0 ; *(here->VCVSnegIbrptr) -= 1.0 ; *(here->VCVSibrPosptr) += 1.0 ; *(here->VCVSibrNegptr) -= 1.0 ; *(here->VCVSibrContPosptr) -= here->VCVScoeff ; *(here->VCVSibrContNegptr) += here->VCVScoeff ; } } return(OK); } ngspice-26/src/spicelib/devices/vcvs/Makefile.am0000644000265600020320000000074412264261473021256 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libvcvs.la libvcvs_la_SOURCES = \ vcvs.c \ vcvsask.c \ vcvsdefs.h \ vcvsdel.c \ vcvsdest.c \ vcvsext.h \ vcvsfbr.c \ vcvsinit.c \ vcvsinit.h \ vcvsitf.h \ vcvsload.c \ vcvsmdel.c \ vcvspar.c \ vcvspzld.c \ vcvssacl.c \ vcvsset.c \ vcvssld.c \ vcvssprt.c \ vcvssset.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/vcvs/Makefile.in0000644000265600020320000004240712264261540021264 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/vcvs DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libvcvs_la_LIBADD = am_libvcvs_la_OBJECTS = vcvs.lo vcvsask.lo vcvsdel.lo vcvsdest.lo \ vcvsfbr.lo vcvsinit.lo vcvsload.lo vcvsmdel.lo vcvspar.lo \ vcvspzld.lo vcvssacl.lo vcvsset.lo vcvssld.lo vcvssprt.lo \ vcvssset.lo libvcvs_la_OBJECTS = $(am_libvcvs_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libvcvs_la_SOURCES) DIST_SOURCES = $(libvcvs_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libvcvs.la libvcvs_la_SOURCES = \ vcvs.c \ vcvsask.c \ vcvsdefs.h \ vcvsdel.c \ vcvsdest.c \ vcvsext.h \ vcvsfbr.c \ vcvsinit.c \ vcvsinit.h \ vcvsitf.h \ vcvsload.c \ vcvsmdel.c \ vcvspar.c \ vcvspzld.c \ vcvssacl.c \ vcvsset.c \ vcvssld.c \ vcvssprt.c \ vcvssset.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/vcvs/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/vcvs/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libvcvs.la: $(libvcvs_la_OBJECTS) $(libvcvs_la_DEPENDENCIES) $(EXTRA_libvcvs_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libvcvs_la_OBJECTS) $(libvcvs_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsfbr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvspar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvspzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvssacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvssld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvssprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vcvssset.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/vcvs/vcvsmdel.c0000644000265600020320000000176512264261473021215 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { VCVSmodel **model = (VCVSmodel**)inModel; VCVSmodel *modfast = (VCVSmodel *)kill; VCVSinstance *here; VCVSinstance *prev = NULL; VCVSmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->VCVSnextModel)) { if( (*model)->VCVSmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->VCVSnextModel; /* cut deleted device out of list */ for(here = (*model)->VCVSinstances ; here ; here = here->VCVSnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/vcvs/vcvssld.c0000644000265600020320000000215212264261473021045 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* actually load the current sensitivity information into the * array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "vcvsdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int VCVSsLoad(GENmodel *inModel, CKTcircuit *ckt) { VCVSmodel *model = (VCVSmodel *)inModel; VCVSinstance *here; double vc; /* loop through all the voltage source models */ for( ; model != NULL; model = model->VCVSnextModel ) { /* loop through all the instances of the model */ for (here = model->VCVSinstances; here != NULL ; here=here->VCVSnextInstance) { if(here->VCVSsenParmNo){ vc = *(ckt->CKTrhsOld + here->VCVScontPosNode) - *(ckt->CKTrhsOld + here->VCVScontNegNode); *(ckt->CKTsenInfo->SEN_RHS[here->VCVSbranch] + here->VCVSsenParmNo) += vc; } } } return(OK); } ngspice-26/src/spicelib/devices/Makefile.am0000644000265600020320000000277012264261473020276 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = \ asrc \ bjt \ bsim1 \ bsim2 \ bsim3 \ bsimsoi \ bsim4 \ bsim4v4 \ bsim4v5 \ bsim4v6 \ bsim3v0 \ bsim3v1 \ bsim3v32 \ bsim3soi_pd \ bsim3soi_fd \ bsim3soi_dd \ cap \ cccs \ ccvs \ cpl \ csw \ dio \ ind \ isrc \ hfet1 \ hfet2 \ hisim2 \ hisimhv1 \ jfet \ jfet2 \ ltra \ mes \ mesa \ mos1 \ mos2 \ mos3 \ mos6 \ mos9 \ res \ soi3 \ sw \ tra \ txl \ urc \ vbic \ vccs \ vcvs \ vsrc \ @VLADEVDIR@ if NDEV_WANTED SUBDIRS += ndev endif if NUMDEV_WANTED SUBDIRS += nbjt nbjt2 numd numd2 numos endif DIST_SUBDIRS = \ @VLADEVDIR@ \ asrc \ bjt \ bsim1 \ bsim2 \ bsim3 \ bsimsoi \ bsim4 \ bsim4v4 \ bsim4v5 \ bsim4v6 \ bsim3v0 \ bsim3v1 \ bsim3v32 \ bsim3soi_pd \ bsim3soi_fd \ bsim3soi_dd \ cap \ cccs \ ccvs \ cpl \ csw \ dio \ ind \ isrc \ hfet1 \ hfet2 \ hisim2 \ hisimhv1 \ jfet \ jfet2 \ ltra \ mes \ mesa \ mos1 \ mos2 \ mos3 \ mos6 \ mos9 \ ndev \ res \ soi3 \ sw \ tra \ txl \ urc \ vbic \ vccs \ vcvs \ vsrc \ nbjt \ nbjt2 \ numd \ numd2 \ numos noinst_LTLIBRARIES = libdev.la libdev_la_SOURCES = \ dev.c \ dev.h \ devsup.c \ cktaccept.c \ cktaccept.h \ cktask.c \ cktbindnode.c \ cktcrte.c \ cktfinddev.c \ cktinit.c \ cktsoachk.c \ limit.c EXTRA_DIST = @NOTVLADEVDIR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/jfet2/0000755000265600020320000000000012264261710017240 5ustar andreasadminngspice-26/src/spicelib/devices/jfet2/jfet2parm.h0000644000265600020320000000743612264261473021323 0ustar andreasadmin #ifndef PARAMA #define PARAMA(code,id,flag,ref,default,descrip) PARAM(code,id,flag,ref,default,descrip) #endif #ifndef JFET2_MOD_VTO #define JFET2_MOD_VTO 141 #define JFET2_MOD_NJF 102 #define JFET2_MOD_PJF 103 #define JFET2_MOD_TNOM 104 #define JFET2_MOD_PB 131 #endif PARAM("acgam", 107, JFET2acgamGiven, JFET2acgam, 0, "") PARAM("af", 108, JFET2fNexpGiven, JFET2fNexp, 1, "Flicker Noise Exponent") PARAM("beta", 109, JFET2betaGiven, JFET2beta, 1e-4, "Transconductance parameter") PARAMA("cds", 146, JFET2capDSGiven, JFET2capds, 0, "D-S junction capacitance") PARAMA("cgd", 110, JFET2capGDGiven, JFET2capgd, 0, "G-D junction capacitance") PARAMA("cgs", 111, JFET2capGSGiven, JFET2capgs, 0, "G-S junction capacitance") PARAM("delta", 113, JFET2deltaGiven, JFET2delta, 0, "coef of thermal current reduction") PARAM("hfeta", 114, JFET2hfetaGiven, JFET2hfeta, 0, "drain feedback modulation") PARAM("hfe1", 115, JFET2hfe1Given, JFET2hfe1, 0, "") PARAM("hfe2", 116, JFET2hfe2Given, JFET2hfe2, 0, "") PARAM("hfg1", 117, JFET2hfg1Given, JFET2hfg1, 0, "") PARAM("hfg2", 118, JFET2hfg2Given, JFET2hfg2, 0, "") PARAM("mvst", 119, JFET2mvstGiven, JFET2mvst, 0, "modulation index for subtreshold current") PARAM("mxi", 120, JFET2mxiGiven, JFET2mxi, 0, "saturation potential modulation parameter") PARAM("fc", 121, JFET2fcGiven, JFET2fc, 0.5, "Forward bias junction fit parm.") PARAM("ibd", 122, JFET2ibdGiven, JFET2ibd, 0, "Breakdown current of diode jnc") PARAM("is", 123, JFET2isGiven, JFET2is, 1e-14, "Gate junction saturation current") PARAM("kf", 124, JFET2kfGiven, JFET2fNcoef, 0, "Flicker Noise Coefficient") PARAM("lambda",125, JFET2lamGiven, JFET2lambda, 0, "Channel length modulation param.") PARAM("lfgam", 126, JFET2lfgamGiven, JFET2lfgam, 0, "drain feedback parameter") PARAM("lfg1", 127, JFET2lfg1Given, JFET2lfg1, 0, "") PARAM("lfg2", 128, JFET2lfg2Given, JFET2lfg2, 0, "") PARAM("n", 129, JFET2nGiven, JFET2n, 1, "gate junction ideality factor") PARAM("p", 130, JFET2pGiven, JFET2p, 2, "Power law (triode region)") PARAM("pb", JFET2_MOD_PB, JFET2phiGiven, JFET2phi, 1, "Gate junction potential") PARAM("q", 132, JFET2qGiven, JFET2q, 2, "Power Law (Saturated region)") PARAM("rd", 133, JFET2rdGiven, JFET2rd, 0, "Drain ohmic resistance") PARAM("rs", 134, JFET2rsGiven, JFET2rs, 0, "Source ohmic resistance") PARAM("taud", 135, JFET2taudGiven, JFET2taud, 0, "Thermal relaxation time") PARAM("taug", 136, JFET2taugGiven, JFET2taug, 0, "Drain feedback relaxation time") PARAM("vbd", 137, JFET2vbdGiven, JFET2vbd, 1, "Breakdown potential of diode jnc") PARAM("ver", 139, JFET2verGiven, JFET2ver, 0, "version number of PS model") PARAM("vst", 140, JFET2vstGiven, JFET2vst, 0, "Crit Poten subthreshold conductn") PARAM("vto", JFET2_MOD_VTO, JFET2vtoGiven, JFET2vto, -2, "Threshold voltage") PARAM("xc", 142, JFET2xcGiven, JFET2xc, 0, "amount of cap. red at pinch-off") PARAM("xi", 143, JFET2xiGiven, JFET2xi, 1000, "velocity saturation index") PARAM("z", 144, JFET2zGiven, JFET2z, 1, "rate of velocity saturation") PARAM("hfgam", 145, JFET2hfgGiven, JFET2hfgam, model->JFET2lfgam, "high freq drain feedback parm") #undef PARAM #undef PARAMA ngspice-26/src/spicelib/devices/jfet2/jfet2itf.h0000644000265600020320000000055512264261473021141 0ustar andreasadmin/********** Based on jfetitf.h Copyright 1990 Regents of the University of California. All rights reserved. Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. pz and disto not supported **********/ #ifndef DEV_JFET2 #define DEV_JFET2 SPICEdev *get_jfet2_info(void); #endif ngspice-26/src/spicelib/devices/jfet2/jfet2ask.c0000644000265600020320000001302312264261473021122 0ustar andreasadmin/********** Based on jfetask.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: JFET2vtrap and JFET2pave added **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int JFET2ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { JFET2instance *here = (JFET2instance*)inst; static char *msg = "Current and power not available for ac analysis"; NG_IGNORE(select); switch(which) { case JFET2_TEMP: value->rValue = here->JFET2temp-CONSTCtoK; return(OK); case JFET2_DTEMP: value->rValue = here->JFET2dtemp; return(OK); case JFET2_AREA: value->rValue = here->JFET2area; value->rValue *=here->JFET2m; return(OK); case JFET2_M: value->rValue = here->JFET2m; return(OK); case JFET2_IC_VDS: value->rValue = here->JFET2icVDS; return(OK); case JFET2_IC_VGS: value->rValue = here->JFET2icVGS; return(OK); case JFET2_OFF: value->iValue = here->JFET2off; return(OK); case JFET2_DRAINNODE: value->iValue = here->JFET2drainNode; return(OK); case JFET2_GATENODE: value->iValue = here->JFET2gateNode; return(OK); case JFET2_SOURCENODE: value->iValue = here->JFET2sourceNode; return(OK); case JFET2_DRAINPRIMENODE: value->iValue = here->JFET2drainPrimeNode; return(OK); case JFET2_SOURCEPRIMENODE: value->iValue = here->JFET2sourcePrimeNode; return(OK); case JFET2_VGS: value->rValue = *(ckt->CKTstate0 + here->JFET2vgs); return(OK); case JFET2_VGD: value->rValue = *(ckt->CKTstate0 + here->JFET2vgd); return(OK); case JFET2_CG: value->rValue = *(ckt->CKTstate0 + here->JFET2cg); value->rValue *=here->JFET2m; return(OK); case JFET2_CD: value->rValue = *(ckt->CKTstate0 + here->JFET2cd); value->rValue *=here->JFET2m; return(OK); case JFET2_CGD: value->rValue = *(ckt->CKTstate0 + here->JFET2cgd); value->rValue *=here->JFET2m; return(OK); case JFET2_GM: value->rValue = *(ckt->CKTstate0 + here->JFET2gm); value->rValue *=here->JFET2m; return(OK); case JFET2_GDS: value->rValue = *(ckt->CKTstate0 + here->JFET2gds); value->rValue *=here->JFET2m; return(OK); case JFET2_GGS: value->rValue = *(ckt->CKTstate0 + here->JFET2ggs); value->rValue *=here->JFET2m; return(OK); case JFET2_GGD: value->rValue = *(ckt->CKTstate0 + here->JFET2ggd); value->rValue *=here->JFET2m; return(OK); case JFET2_QGS: value->rValue = *(ckt->CKTstate0 + here->JFET2qgs); value->rValue *=here->JFET2m; return(OK); case JFET2_CQGS: value->rValue = *(ckt->CKTstate0 + here->JFET2cqgs); value->rValue *=here->JFET2m; return(OK); case JFET2_QGD: value->rValue = *(ckt->CKTstate0 + here->JFET2qgd); value->rValue *=here->JFET2m; return(OK); case JFET2_CQGD: value->rValue = *(ckt->CKTstate0 + here->JFET2cqgd); value->rValue *=here->JFET2m; return(OK); case JFET2_VTRAP: value->rValue = *(ckt->CKTstate0 + here->JFET2vtrap); return(OK); case JFET2_PAVE: value->rValue = *(ckt->CKTstate0 + here->JFET2pave); return(OK); case JFET2_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "JFET2ask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->JFET2cd); value->rValue -= *(ckt->CKTstate0 + here->JFET2cg); value->rValue *=here->JFET2m; } return(OK); case JFET2_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "JFET2ask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->JFET2cd) * *(ckt->CKTrhsOld + here->JFET2drainNode); value->rValue += *(ckt->CKTstate0 + here->JFET2cg) * *(ckt->CKTrhsOld + here->JFET2gateNode); value->rValue -= (*(ckt->CKTstate0 + here->JFET2cd) + *(ckt->CKTstate0 + here->JFET2cg)) * *(ckt->CKTrhsOld + here->JFET2sourceNode); value->rValue *=here->JFET2m; } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/jfet2/jfet2trun.c0000644000265600020320000000151612264261473021340 0ustar andreasadmin/********** Based on jfettrunc.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; for( ; model != NULL; model = model->JFET2nextModel) { for(here=model->JFET2instances;here!=NULL;here = here->JFET2nextInstance){ CKTterr(here->JFET2qgs,ckt,timeStep); CKTterr(here->JFET2qgd,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2acld.c0000644000265600020320000000750212264261473021254 0ustar andreasadmin/********** Based on jfetacld.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: New call to PSacload() with matrix loading **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "psmodel.h" #include "ngspice/suffix.h" int JFET2acLoad(GENmodel *inModel, CKTcircuit *ckt) { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double xgm, xgds, vgd, vgs, cd; double m; for( ; model != NULL; model = model->JFET2nextModel ) { for( here = model->JFET2instances; here != NULL; here = here->JFET2nextInstance) { gdpr=model->JFET2drainConduct * here->JFET2area; gspr=model->JFET2sourceConduct * here->JFET2area; gm= *(ckt->CKTstate0 + here->JFET2gm) ; gds= *(ckt->CKTstate0 + here->JFET2gds) ; ggs= *(ckt->CKTstate0 + here->JFET2ggs) ; xgs= *(ckt->CKTstate0 + here->JFET2qgs) * ckt->CKTomega ; ggd= *(ckt->CKTstate0 + here->JFET2ggd) ; xgd= *(ckt->CKTstate0 + here->JFET2qgd) * ckt->CKTomega ; vgs = *(ckt->CKTstate0 + here->JFET2vgs); vgd = *(ckt->CKTstate0 + here->JFET2vgd); cd = *(ckt->CKTstate0 + here->JFET2cd); PSacload(ckt,model, here, vgs, vgd, cd, ckt->CKTomega, &gm, &xgm, &gds, &xgds); xgds += *(ckt->CKTstate0 + here->JFET2qds) * ckt->CKTomega ; m = here->JFET2m; *(here->JFET2drainPrimeDrainPrimePtr +1) += m * (xgds); *(here->JFET2sourcePrimeSourcePrimePtr +1) += m * (xgds+xgm); *(here->JFET2drainPrimeGatePtr +1) += m * (xgm); *(here->JFET2drainPrimeSourcePrimePtr +1) -= m * (xgds+xgm); *(here->JFET2sourcePrimeGatePtr +1) -= m * (xgm); *(here->JFET2sourcePrimeDrainPrimePtr +1) -= m * (xgds); *(here->JFET2drainDrainPtr ) += m * (gdpr); *(here->JFET2gateGatePtr ) += m * (ggd+ggs); *(here->JFET2gateGatePtr +1) += m * (xgd+xgs); *(here->JFET2sourceSourcePtr ) += m * (gspr); *(here->JFET2drainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->JFET2drainPrimeDrainPrimePtr +1) += m * (xgd); *(here->JFET2sourcePrimeSourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->JFET2sourcePrimeSourcePrimePtr +1) += m * (xgs); *(here->JFET2drainDrainPrimePtr ) -= m * (gdpr); *(here->JFET2gateDrainPrimePtr ) -= m * (ggd); *(here->JFET2gateDrainPrimePtr +1) -= m * (xgd); *(here->JFET2gateSourcePrimePtr ) -= m * (ggs); *(here->JFET2gateSourcePrimePtr +1) -= m * (xgs); *(here->JFET2sourceSourcePrimePtr ) -= m * (gspr); *(here->JFET2drainPrimeDrainPtr ) -= m * (gdpr); *(here->JFET2drainPrimeGatePtr ) += m * (-ggd+gm); *(here->JFET2drainPrimeGatePtr +1) -= m * (xgd); *(here->JFET2drainPrimeSourcePrimePtr ) += m * (-gds-gm); *(here->JFET2sourcePrimeGatePtr ) += m * (-ggs-gm); *(here->JFET2sourcePrimeGatePtr +1) -= m * (xgs); *(here->JFET2sourcePrimeSourcePtr ) -= m * (gspr); *(here->JFET2sourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2noi.c0000644000265600020320000001502012264261473021130 0ustar andreasadmin/********** based on jfetnoi.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ #include "ngspice/ngspice.h" #include "jfet2defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * JFET2noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with JFET2's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the JFET2's is summed with the variable "OnDens". */ int JFET2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; JFET2model *firstModel = (JFET2model *) genmodel; JFET2model *model; JFET2instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[JFET2NSRCS]; double lnNdens[JFET2NSRCS]; int i; /* define the names of the noise sources */ static char *JFET2nNames[JFET2NSRCS] = { /* Note that we have to keep the order consistent with the strchr definitions in JFET2defs.h */ "_rd", /* noise due to rd */ "_rs", /* noise due to rs */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->JFET2nextModel) { for (inst=model->JFET2instances; inst != NULL; inst=inst->JFET2nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < JFET2NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->JFET2name,JFET2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < JFET2NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->JFET2name,JFET2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->JFET2name,JFET2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[JFET2RDNOIZ],&lnNdens[JFET2RDNOIZ], ckt,THERMNOISE,inst->JFET2drainPrimeNode,inst->JFET2drainNode, model->JFET2drainConduct * inst->JFET2area * inst->JFET2m); NevalSrc(&noizDens[JFET2RSNOIZ],&lnNdens[JFET2RSNOIZ], ckt,THERMNOISE,inst->JFET2sourcePrimeNode, inst->JFET2sourceNode,model->JFET2sourceConduct * inst->JFET2area * inst->JFET2m); NevalSrc(&noizDens[JFET2IDNOIZ],&lnNdens[JFET2IDNOIZ], ckt,THERMNOISE,inst->JFET2drainPrimeNode, inst->JFET2sourcePrimeNode, (2.0/3.0 * inst->JFET2m * fabs(*(ckt->CKTstate0 + inst->JFET2gm)))); NevalSrc(&noizDens[JFET2FLNOIZ], NULL, ckt, N_GAIN,inst->JFET2drainPrimeNode, inst->JFET2sourcePrimeNode, (double)0.0); noizDens[JFET2FLNOIZ] *= inst->JFET2m * model->JFET2fNcoef * exp(model->JFET2fNexp * log(MAX(fabs(*(ckt->CKTstate0 + inst->JFET2cd)),N_MINLOG))) / data->freq; lnNdens[JFET2FLNOIZ] = log(MAX(noizDens[JFET2FLNOIZ],N_MINLOG)); noizDens[JFET2TOTNOIZ] = noizDens[JFET2RDNOIZ] + noizDens[JFET2RSNOIZ] + noizDens[JFET2IDNOIZ] + noizDens[JFET2FLNOIZ]; lnNdens[JFET2TOTNOIZ] = log(MAX(noizDens[JFET2TOTNOIZ], N_MINLOG)); *OnDens += noizDens[JFET2TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < JFET2NSRCS; i++) { inst->JFET2nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < JFET2NSRCS; i++) { inst->JFET2nVar[OUTNOIZ][i] = 0.0; inst->JFET2nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < JFET2NSRCS; i++) { if (i != JFET2TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->JFET2nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->JFET2nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->JFET2nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->JFET2nVar[OUTNOIZ][i] += tempOnoise; inst->JFET2nVar[OUTNOIZ][JFET2TOTNOIZ] += tempOnoise; inst->JFET2nVar[INNOIZ][i] += tempInoise; inst->JFET2nVar[INNOIZ][JFET2TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < JFET2NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < JFET2NSRCS; i++) { data->outpVector[data->outNumber++] = inst->JFET2nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->JFET2nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/jfet2/psmodel.h0000644000265600020320000001342512264261473021067 0ustar andreasadmin/* Parker-Skellern MESFET model, UCB Spice Glue Header Copyright (C) 1994, 1995, 1996 Macquarie University All Rights Reserved Author: Anthony Parker Creation Date: 2 Feb 1994 Modified: 24 Mar 1994: Parameters MVST and ETA added. 18 Apr 1994: Added new parameters and comments 12 Sep 1995: Changed _XXX to PS_XXX to aid portability */ #ifdef PSMODEL_C /* PSMODEL_C defined when included from "psmodel.c" */ #include "ngspice/ngspice.h" #include "jfet2defs.h" #include "ngspice/const.h" #endif /* Glue definitions for cref modl and inst */ typedef CKTcircuit cref; /* circuit specific variables */ typedef JFET2model modl; /* model parameters for this type of device */ typedef JFET2instance inst; /* parameters specific to this device instance */ extern void PSinstanceinit(modl *,inst *); extern double PSids(cref *,modl *,inst *,double,double, double *,double *,double *,double *,double *,double *); extern void PScharge(cref *,modl *,inst *,double,double,double *,double *); extern void PSacload(cref *,modl *,inst *,double,double,double,double, double *,double *,double *,double *); #ifdef PSMODEL_C /* PSMODEL_C defined when included from "psmodel.c" */ /* The following glue definitions need to be changed to suit the specific simulator. */ /* simulator mode flags TRAN_ANAL should be true during transient analysis iteration. (ie. false for other analysis functions and tran operating point.) TRAN_INIT should be true only during the first calculation of the initial transient analysis time point. It should be false for remaining iterations at that time point and the rest of the transient analysis. */ #define TRAN_ANAL (ckt->CKTmode & MODETRAN) #define TRAN_INIT (ckt->CKTmode & MODEINITTRAN) /* state variables */ /* initialized when TRAN_ANAL is false */ #define VGSTRAP_BEFORE (*(ckt->CKTstate1 + here->JFET2vgstrap)) #define VGSTRAP_NOW (*(ckt->CKTstate0 + here->JFET2vgstrap)) #define VGDTRAP_BEFORE (*(ckt->CKTstate1 + here->JFET2vtrap)) #define VGDTRAP_NOW (*(ckt->CKTstate0 + here->JFET2vtrap)) #define POWR_BEFORE (*(ckt->CKTstate1 + here->JFET2pave)) #define POWR_NOW (*(ckt->CKTstate0 + here->JFET2pave)) /* initialized when TRAN_INIT is true or TRAN_ANAL is false */ #define QGS_BEFORE (*(ckt->CKTstate1 + here->JFET2qgs)) #define QGS_NOW (*(ckt->CKTstate0 + here->JFET2qgs)) #define QGD_BEFORE (*(ckt->CKTstate1 + here->JFET2qgd)) #define QGD_NOW (*(ckt->CKTstate0 + here->JFET2qgd)) /* past terminal potentials used if TRAN_INIT is false and TRAN_ANAL is true */ #define VGS1 (*(ckt->CKTstate1 + here->JFET2vgs)) #define VGD1 (*(ckt->CKTstate1 + here->JFET2vgd)) /* simulator specific parameters */ #define GMIN ckt->CKTgmin /* SPICE gmin (1E12 ohms) */ #define NVT here->JFET2temp*CONSTKoverQ*model->JFET2n /* nkT/q */ #define STEP ckt->CKTdelta /* time step of this transient solution */ #define FOURTH 0.25 /* eldo requires 2.5e-10 for units conversion */ /* model parameters */ /* dc model */ #define BETA model->JFET2beta /* transconductance scaling */ #define DELT model->JFET2delta /* thermal current reduction */ #define IBD model->JFET2ibd /* breakdown current */ #define IS here->JFET2tSatCur /* gate reverse saturation current */ #define LAM model->JFET2lambda /* channel length modulation */ #define LFGAM model->JFET2lfgam /* dc drain feedback */ #define LFG1 model->JFET2lfg1 /* dc drain feedback vgs modulation */ #define LFG2 model->JFET2lfg2 /* dc drain feedback vgd modulation */ #define MVST model->JFET2mvst /* subthreshold vds modulation */ #define MXI model->JFET2mxi /* saturation index vgs modulation */ #define P model->JFET2p /* power law in controlled resistance */ #define Q model->JFET2q /* power law in controlled current */ #define VBD model->JFET2vbd /* breakdown exponential coef */ #define VBI here->JFET2tGatePot /* junction built-in potential */ #define VSUB model->JFET2vst /* subthreshold exponential coef */ #define VTO model->JFET2vto /* pinch-off potential */ #define XI model->JFET2xi /* saturation index */ #define Z model->JFET2z /* saturation knee curvature */ /* ac model */ #define ACGAM model->JFET2acgam /* capacitance vds modulation */ #define CGS here->JFET2tCGS /* zero bias cgs */ #define CGD here->JFET2tCGD /* zero bias cgd */ #define HFETA model->JFET2hfeta /* ac source feedback */ #define HFE1 model->JFET2hfe1 /* ac source feedback vgd modulation */ #define HFE2 model->JFET2hfe2 /* ac source feedback vgs modulation */ #define HFGAM model->JFET2hfgam /* ac drain feedback */ #define HFG1 model->JFET2hfg1 /* ac drain feedback vgs modulation */ #define HFG2 model->JFET2hfg2 /* ac drain feedback vgd modulation */ #define TAUD model->JFET2taud /* thermal time constant */ #define TAUG model->JFET2taug /* dc ac feedback time constant */ #define XC model->JFET2xc /* cgs reduction at pinch-off */ /* device instance */ #define AREA here->JFET2area /* area factor of fet */ /* internally derived model parameters */ #define ALPHA here->JFET2alpha /* cgs cgd reversal interval */ #define D3 here->JFET2d3 /* dual power-law parameter */ #define VMAX here->JFET2corDepCap /* forward capacitance potential */ #define XI_WOO here->JFET2xiwoo /* saturation potential */ #define ZA model->JFET2za /* saturation knee parameter */ #endif ngspice-26/src/spicelib/devices/jfet2/jfet2dest.c0000644000265600020320000000164312264261473021310 0ustar andreasadmin/********** Based on jfetdest.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ /* */ #include "ngspice/ngspice.h" #include "jfet2defs.h" #include "ngspice/suffix.h" void JFET2destroy(GENmodel **inModel) { JFET2model **model = (JFET2model**)inModel; JFET2instance *here; JFET2instance *prev = NULL; JFET2model *mod = *model; JFET2model *oldmod = NULL; for( ; mod ; mod = mod->JFET2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->JFET2instances ; here ; here = here->JFET2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/jfet2/jfet2defs.h0000644000265600020320000002246512264261473021304 0ustar andreasadmin/********** Based on jfetdefs.h Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Added xiwoo, d3 and alpha to JFET2instance JFET2pave, JFET2vtrap ad JFET2_STATE_COUNT Changed model to call jfetparm.h, added JFET2za to model struct Defined JFET2_VTRAP and JFET2_PAVE **********/ #ifndef JFET2 #define JFET2 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures used to describe Junction Field Effect Transistors */ /* information used to describe a single instance */ typedef struct sJFET2instance { struct sJFET2model *JFET2modPtr; /* backpointer to model */ struct sJFET2instance *JFET2nextInstance; /* pointer to next instance of * current model*/ IFuid JFET2name; /* pointer to character string naming this instance */ int JFET2state; /* pointer to start of state vector for jfet */ int JFET2drainNode; /* number of drain node of jfet */ int JFET2gateNode; /* number of gate node of jfet */ int JFET2sourceNode; /* number of source node of jfet */ int JFET2drainPrimeNode; /* number of internal drain node of jfet */ int JFET2sourcePrimeNode; /* number of internal source node of jfet */ double *JFET2drainDrainPrimePtr; /* pointer to sparse matrix at * (drain,drain prime) */ double *JFET2gateDrainPrimePtr; /* pointer to sparse matrix at * (gate,drain prime) */ double *JFET2gateSourcePrimePtr; /* pointer to sparse matrix at * (gate,source prime) */ double *JFET2sourceSourcePrimePtr; /* pointer to sparse matrix at * (source,source prime) */ double *JFET2drainPrimeDrainPtr; /* pointer to sparse matrix at * (drain prime,drain) */ double *JFET2drainPrimeGatePtr; /* pointer to sparse matrix at * (drain prime,gate) */ double *JFET2drainPrimeSourcePrimePtr; /* pointer to sparse matrix * (drain prime,source prime) */ double *JFET2sourcePrimeGatePtr; /* pointer to sparse matrix at * (source prime,gate) */ double *JFET2sourcePrimeSourcePtr; /* pointer to sparse matrix at * (source prime,source) */ double *JFET2sourcePrimeDrainPrimePtr; /* pointer to sparse matrix * (source prime,drain prime) */ double *JFET2drainDrainPtr; /* pointer to sparse matrix at * (drain,drain) */ double *JFET2gateGatePtr; /* pointer to sparse matrix at * (gate,gate) */ double *JFET2sourceSourcePtr; /* pointer to sparse matrix at * (source,source) */ double *JFET2drainPrimeDrainPrimePtr; /* pointer to sparse matrix * (drain prime,drain prime) */ double *JFET2sourcePrimeSourcePrimePtr; /* pointer to sparse matrix * (source prime,source prime) */ int JFET2mode; /* distortion analysis Taylor coeffs. */ /* * naming convention: * x = vgs * y = vds * cdr = cdrain */ #define JFET2NDCOEFFS 21 #ifndef NODISTO double JFET2dCoeffs[JFET2NDCOEFFS]; #else /* NODISTO */ double *JFET2dCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define cdr_x JFET2dCoeffs[0] #define cdr_y JFET2dCoeffs[1] #define cdr_x2 JFET2dCoeffs[2] #define cdr_y2 JFET2dCoeffs[3] #define cdr_xy JFET2dCoeffs[4] #define cdr_x3 JFET2dCoeffs[5] #define cdr_y3 JFET2dCoeffs[6] #define cdr_x2y JFET2dCoeffs[7] #define cdr_xy2 JFET2dCoeffs[8] #define ggs1 JFET2dCoeffs[9] #define ggd1 JFET2dCoeffs[10] #define ggs2 JFET2dCoeffs[11] #define ggd2 JFET2dCoeffs[12] #define ggs3 JFET2dCoeffs[13] #define ggd3 JFET2dCoeffs[14] #define capgs1 JFET2dCoeffs[15] #define capgd1 JFET2dCoeffs[16] #define capgs2 JFET2dCoeffs[17] #define capgd2 JFET2dCoeffs[18] #define capgs3 JFET2dCoeffs[19] #define capgd3 JFET2dCoeffs[20] #endif /* indices to an array of JFET2 noise sources */ #define JFET2RDNOIZ 0 #define JFET2RSNOIZ 1 #define JFET2IDNOIZ 2 #define JFET2FLNOIZ 3 #define JFET2TOTNOIZ 4 #define JFET2NSRCS 5 #ifndef NONOISE double JFET2nVar[NSTATVARS][JFET2NSRCS]; #else /* NONOISE */ double **JFET2nVar; #endif /* NONOISE */ unsigned JFET2off :1; /* 'off' flag for jfet */ unsigned JFET2areaGiven : 1; /* flag to indicate area was specified */ unsigned JFET2mGiven : 1; /* flag to indicate multiplier given */ unsigned JFET2icVDSGiven : 1; /* initial condition given flag for V D-S*/ unsigned JFET2icVGSGiven : 1; /* initial condition given flag for V G-S*/ unsigned JFET2tempGiven : 1; /* flag to indicate instance temp given */ unsigned JFET2dtempGiven : 1; /* flag to indicate temperature difference given */ double JFET2area; /* area factor for the jfet */ double JFET2m; /* parallel multiplier for the diode */ double JFET2icVDS; /* initial condition voltage D-S*/ double JFET2icVGS; /* initial condition voltage G-S*/ double JFET2temp; /* operating temperature */ double JFET2dtemp; /* Instance temperature difference */ double JFET2tSatCur; /* temperature adjusted saturation current */ double JFET2tGatePot; /* temperature adjusted gate potential */ double JFET2tCGS; /* temperature corrected G-S capacitance */ double JFET2tCGD; /* temperature corrected G-D capacitance */ double JFET2corDepCap; /* joining point of the fwd bias dep. cap eq.s */ double JFET2vcrit; /* critical voltage for the instance */ double JFET2f1; /* coefficient of capacitance polynomial exp */ double JFET2xiwoo; /* velocity saturation potential */ double JFET2d3; /* Dual Power-law parameter */ double JFET2alpha; /* capacitance model transition parameter */ } JFET2instance ; #define JFET2vgs JFET2state #define JFET2vgd JFET2state+1 #define JFET2cg JFET2state+2 #define JFET2cd JFET2state+3 #define JFET2cgd JFET2state+4 #define JFET2gm JFET2state+5 #define JFET2gds JFET2state+6 #define JFET2ggs JFET2state+7 #define JFET2ggd JFET2state+8 #define JFET2qgs JFET2state+9 #define JFET2cqgs JFET2state+10 #define JFET2qgd JFET2state+11 #define JFET2cqgd JFET2state+12 #define JFET2qds JFET2state+13 #define JFET2cqds JFET2state+14 #define JFET2pave JFET2state+15 #define JFET2vtrap JFET2state+16 #define JFET2vgstrap JFET2state+17 #define JFET2_STATE_COUNT 18 /* per model data */ typedef struct sJFET2model { /* model structure for a jfet */ int JFET2modType; /* type index of this device type */ struct sJFET2model *JFET2nextModel; /* pointer to next possible model in * linked list */ JFET2instance * JFET2instances; /* pointer to list of instances * that have this model */ IFuid JFET2modName; /* pointer to character string naming this model */ int JFET2type; #define PARAM(code,id,flag,ref,default,descrip) double ref; #include "jfet2parm.h" double JFET2drainConduct; double JFET2sourceConduct; double JFET2f2; double JFET2f3; double JFET2za; /* saturation index parameter */ double JFET2tnom; /* temperature at which parameters were measured */ #define PARAM(code,id,flag,ref,default,descrip) unsigned flag : 1; #include "jfet2parm.h" unsigned JFET2tnomGiven : 1; /* user specified Tnom for model */ } JFET2model; #ifndef NJF #define NJF 1 #define PJF -1 #endif /*NJF*/ /* device parameters */ #define JFET2_AREA 1 #define JFET2_IC_VDS 2 #define JFET2_IC_VGS 3 #define JFET2_IC 4 #define JFET2_OFF 5 #define JFET2_TEMP 6 #define JFET2_DTEMP 7 #define JFET2_M 8 /* device questions */ #define JFET2_DRAINNODE 301 #define JFET2_GATENODE 302 #define JFET2_SOURCENODE 303 #define JFET2_DRAINPRIMENODE 304 #define JFET2_SOURCEPRIMENODE 305 #define JFET2_VGS 306 #define JFET2_VGD 307 #define JFET2_CG 308 #define JFET2_CD 309 #define JFET2_CGD 310 #define JFET2_GM 311 #define JFET2_GDS 312 #define JFET2_GGS 313 #define JFET2_GGD 314 #define JFET2_QGS 315 #define JFET2_CQGS 316 #define JFET2_QGD 317 #define JFET2_CQGD 318 #define JFET2_CS 319 #define JFET2_POWER 320 #define JFET2_VTRAP 321 #define JFET2_PAVE 322 /* model questions */ #define JFET2_MOD_DRAINCONDUCT 301 #define JFET2_MOD_SOURCECONDUCT 302 #define JFET2_MOD_DEPLETIONCAP 303 #define JFET2_MOD_VCRIT 304 #define JFET2_MOD_TYPE 305 /* function definitions */ #include "jfet2ext.h" #endif /*JFET2*/ ngspice-26/src/spicelib/devices/jfet2/jfet2init.c0000644000265600020320000000417412264261473021316 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "jfet2itf.h" #include "jfet2ext.h" #include "jfet2init.h" SPICEdev JFET2info = { { "JFET2", "Short channel field effect transistor", &JFET2nSize, &JFET2nSize, JFET2names, &JFET2pTSize, JFET2pTable, &JFET2mPTSize, JFET2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ JFET2param, /* DEVmodParam */ JFET2mParam, /* DEVload */ JFET2load, /* DEVsetup */ JFET2setup, /* DEVunsetup */ JFET2unsetup, /* DEVpzSetup */ JFET2setup, /* DEVtemperature*/ JFET2temp, /* DEVtrunc */ JFET2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ JFET2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ JFET2destroy, /* DEVmodDelete */ JFET2mDelete, /* DEVdelete */ JFET2delete, /* DEVsetic */ JFET2getic, /* DEVask */ JFET2ask, /* DEVmodAsk */ JFET2mAsk, /* DEVpzLoad */ NULL, /* AN_pz */ /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* AN_disto */ /* DEVnoise */ JFET2noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &JFET2iSize, /* DEVmodSize */ &JFET2mSize }; SPICEdev * get_jfet2_info(void) { return &JFET2info; } ngspice-26/src/spicelib/devices/jfet2/jfet2del.c0000644000265600020320000000200212264261473021103 0ustar andreasadmin/********** Based on jfetdel.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ #include "ngspice/ngspice.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2delete(GENmodel *inModel, IFuid name, GENinstance **inst) { JFET2model *model = (JFET2model*)inModel; JFET2instance **fast = (JFET2instance**)inst; JFET2instance **prev = NULL; JFET2instance *here; for( ; model ; model = model->JFET2nextModel) { prev = &(model->JFET2instances); for(here = *prev; here ; here = *prev) { if(here->JFET2name == name || (fast && here==*fast) ) { *prev= here->JFET2nextInstance; FREE(here); return(OK); } prev = &(here->JFET2nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/jfet2/jfet2set.c0000644000265600020320000001245512264261473021147 0ustar andreasadmin/********** Based on jfetset.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Added call to jfetparm.h, used JFET_STATE_COUNT **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the diode structure with those pointers needed later * for fast matrix loading */ { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->JFET2nextModel ) { if( (model->JFET2type != NJF) && (model->JFET2type != PJF) ) { model->JFET2type = NJF; } #define PARAM(code,id,flag,ref,default,descrip) \ if(!model->flag) {model->ref = default;} #include "jfet2parm.h" /* loop through all the instances of the model */ for (here = model->JFET2instances; here != NULL ; here=here->JFET2nextInstance) { if(!here->JFET2areaGiven) { here->JFET2area = 1; } if(!here->JFET2mGiven) { here->JFET2m = 1; } here->JFET2state = *states; *states += JFET2_STATE_COUNT + 1; if(model->JFET2rs != 0) { if(here->JFET2sourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->JFET2name,"source"); if(error) return(error); here->JFET2sourcePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->JFET2sourcePrimeNode = here->JFET2sourceNode; } if(model->JFET2rd != 0) { if(here->JFET2drainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->JFET2name,"drain"); if(error) return(error); here->JFET2drainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->JFET2drainPrimeNode = here->JFET2drainNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(JFET2drainDrainPrimePtr,JFET2drainNode,JFET2drainPrimeNode); TSTALLOC(JFET2gateDrainPrimePtr,JFET2gateNode,JFET2drainPrimeNode); TSTALLOC(JFET2gateSourcePrimePtr,JFET2gateNode,JFET2sourcePrimeNode); TSTALLOC(JFET2sourceSourcePrimePtr,JFET2sourceNode,JFET2sourcePrimeNode); TSTALLOC(JFET2drainPrimeDrainPtr,JFET2drainPrimeNode,JFET2drainNode); TSTALLOC(JFET2drainPrimeGatePtr,JFET2drainPrimeNode,JFET2gateNode); TSTALLOC(JFET2drainPrimeSourcePrimePtr,JFET2drainPrimeNode,JFET2sourcePrimeNode); TSTALLOC(JFET2sourcePrimeGatePtr,JFET2sourcePrimeNode,JFET2gateNode); TSTALLOC(JFET2sourcePrimeSourcePtr,JFET2sourcePrimeNode,JFET2sourceNode); TSTALLOC(JFET2sourcePrimeDrainPrimePtr,JFET2sourcePrimeNode,JFET2drainPrimeNode); TSTALLOC(JFET2drainDrainPtr,JFET2drainNode,JFET2drainNode); TSTALLOC(JFET2gateGatePtr,JFET2gateNode,JFET2gateNode); TSTALLOC(JFET2sourceSourcePtr,JFET2sourceNode,JFET2sourceNode); TSTALLOC(JFET2drainPrimeDrainPrimePtr,JFET2drainPrimeNode,JFET2drainPrimeNode); TSTALLOC(JFET2sourcePrimeSourcePrimePtr,JFET2sourcePrimeNode,JFET2sourcePrimeNode); } } return(OK); } int JFET2unsetup(GENmodel *inModel, CKTcircuit *ckt) { JFET2model *model; JFET2instance *here; for (model = (JFET2model *)inModel; model != NULL; model = model->JFET2nextModel) { for (here = model->JFET2instances; here != NULL; here=here->JFET2nextInstance) { if (here->JFET2sourcePrimeNode && here->JFET2sourcePrimeNode != here->JFET2sourceNode) { CKTdltNNum(ckt, here->JFET2sourcePrimeNode); here->JFET2sourcePrimeNode = 0; } if (here->JFET2drainPrimeNode && here->JFET2drainPrimeNode != here->JFET2drainNode) { CKTdltNNum(ckt, here->JFET2drainPrimeNode); here->JFET2drainPrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/jfet2/ChangeLog0000644000265600020320000000126412264261473021023 0ustar andreasadmin2000-03-11 Paolo Nenzi * jfet2acld.c: prepared the code for multiprocessing and CIDER integration. * jfet2ic.c: prepared the code for multiprocessing and CIDER integration. * jfet2set.c: prepared the code for multiprocessing and CIDER integration. * jfet2load.c: prepared the code for multiprocessing and CIDER integration. * jfet2noi.c: prepared the code for multiprocessing and CIDER integration. * jfet2trun.c: prepared the code for multiprocessing and CIDER integration. 1999-09-07 Arno * jfet2load.c: removed unused variables. * jfet2noi.c: removed unused variable. Reformatted some comments. ngspice-26/src/spicelib/devices/jfet2/psmodel.c0000644000265600020320000003050412264261473021057 0ustar andreasadmin/* Parker-Skellern MESFET model Copyright (C) 1994, 1995, 1996 Macquarie University All Rights Reserved Author: Anthony Parker Date: 2 Feb 1994 created 9 Feb 1994 correct NaN problem in strong cut-off region 20 MAR 1994 corrected capacitance initialization 24 MAR 1994 added parameter MVST 28 MAR 1994 reorganized declaration scopes 19 APR 1994 added new parameters: PS_HFETA, PS_HFE1, PS_HFE2, PS_HFG1, and PS_HFG2 18 May 1994 corrected 1/0 error when PS_VSUB=0 15 Jul 1994 corrected errors in acload routine 10 Aug 1995 added PS_VSUB to gds += gm*PS_VSUB*mvst*(vgt-vgst*(a.. 12 Sep 1995 changed _XXX to PS_XXX to aid portability 13 Sep 1995 change to give arg=1-1/subfac; if(vst!=0) gds+=gm*PS_VSUB..; gm *= arg; 10 Feb 1996 change to names to match MicroSim code. 5 Jul 1996 corrected diode eq (change Gmin*vgs to Gmin*vgd). *****************************************************************************/ /*----------- | functions defined in this file are: PSids() returns dc drain source current and assigns other current and branch conductances qgg() static function that returns gate charge PScharge() returns gate-source and gate-drain charge and capacitance PSacload() returns small-signal conductance elements PSinstanceinit() initializes model parameters */ #define PSMODEL_C /* activate local definitions in psmesfet.h */ #include "psmodel.h" /*----------- | dc current and conductance calculation */ double PSids( cref *ckt, modl *model, inst *here, double vgs, double vgd, double *igs, double *igd, double *ggs, double *ggd, double *Gm, double *Gds) { #define FX -10.0 /* not too small else fatal rounding error in (rpt-a_rpt) */ #define MX 40.0 /* maximum exponential argument */ #define EMX 2.353852668370199842e17 /* exp(MX) */ double idrain, arg; double area = AREA; { /* gate junction diodes */ double zz; { /* gate-junction forward conduction */ double Gmin = GMIN; double Vt = NVT; double isat = IS * area; if ((arg=vgs/Vt) > FX) { if(arg < MX) { *ggs=(zz=isat*exp(arg))/Vt+Gmin; *igs= zz -isat +Gmin*vgs; } else { *ggs=(zz=isat*EMX)/Vt+Gmin; *igs=zz*(arg-MX+1)-isat+Gmin*vgs; } } else { *ggs = Gmin; *igs = -isat + Gmin * vgs; } if ((arg=vgd/Vt) > FX) { if(arg < MX) { *ggd=(zz=isat*exp(arg))/Vt+Gmin; *igd= zz -isat +Gmin*vgd; } else { *ggd=(zz=isat*EMX)/Vt+Gmin; *igd=zz*(arg-MX+1)-isat+Gmin*vgd; } } else { *ggd = Gmin; *igd = -isat + Gmin * vgd; } } { /* gate-junction reverse 'breakdown' conduction */ double Vbd = VBD; double ibd = IBD * area; if ((arg=-vgs/Vbd) > FX) { if(arg < MX) { *ggs += (zz=ibd*exp(arg))/Vbd; *igs -= zz-ibd; } else { *ggs += (zz=ibd*EMX)/Vbd; *igs -= zz*((arg-MX)+1) - ibd; } } else *igs += ibd; if ((arg=-vgd/Vbd) > FX) { if(arg < MX) { *ggd += (zz=ibd*exp(arg))/Vbd; *igd -= zz-ibd; } else { *ggd += (zz=ibd*EMX)/Vbd; *igd -= zz*((arg-MX)+1) - ibd; } } else *igd += ibd; } } { /* compute drain current and derivitives */ double gm, gds; double vdst = vgs - vgd; double stepofour = STEP * FOURTH; { /* Include rate dependent threshold modulation */ double vgst, dvgd, dvgs, h, vgdtrap, vgstrap, eta, gam; double vto = VTO; double LFg = LFGAM, LFg1 = LFG1, LFg2 = LFG2; double HFg = HFGAM, HFg1 = HFG1, HFg2 = HFG2; double HFe = HFETA, HFe1 = HFE1, HFe2 = HFE2; if(TRAN_ANAL) { double taug = TAUG; h = taug/(taug + stepofour); h*=h; h*=h; /*4th power*/ VGDTRAP_NOW = vgdtrap = h*VGDTRAP_BEFORE + (1-h) * vgd; VGSTRAP_NOW = vgstrap = h*VGSTRAP_BEFORE + (1-h) * vgs; } else { h = 0; VGDTRAP_NOW = vgdtrap = vgd; VGSTRAP_NOW = vgstrap = vgs; } vgst = vgs - vto; vgst -= ( LFg - LFg1*vgstrap + LFg2*vgdtrap)*vgdtrap; vgst += (eta = HFe - HFe1*vgdtrap + HFe2*vgstrap)*(dvgs = vgstrap-vgs); vgst += (gam = HFg - HFg1*vgstrap + HFg2*vgdtrap)*(dvgd = vgdtrap-vgd); { /* Exponential Subthreshold effect ids(vgst,vdst) */ double vgt, subfac; double mvst = MVST; double vst = VSUB * (1 + mvst*vdst); if (vgst > FX*vst) { if (vgst > (arg=MX*vst)) { /* numerically large */ vgt = (EMX/(subfac = EMX+1))*(vgst-arg) + arg; } else /* limit gate bias exponentially */ vgt = vst * log( subfac=(1 + exp(vgst/vst)) ); { /* Dual Power-law ids(vgt,vdst) */ double mQ = Q; double PmQ = P - mQ; double dvpd_dvdst=(double)D3*pow(vgt,PmQ); double vdp = vdst*dvpd_dvdst; /*D3=P/Q/((VBI-vto)^PmQ)*/ { /* Early saturation effect ids(vgt,vdp) */ double za = (double)ZA; /* sqrt(1 + Z)/2 */ double mxi = MXI; double vsatFac = vgt/(mxi*vgt + (double)XI_WOO); double vsat=vgt/(1 + vsatFac); double aa = za*vdp+vsat/2.0; double a_aa = aa-vsat; double rpt = sqrt( aa * aa + (arg=vsat*vsat*Z/4.0)); double a_rpt = sqrt(a_aa * a_aa + arg); double vdt = (rpt - a_rpt); double dvdt_dvdp = za * (aa/rpt - a_aa/a_rpt); double dvdt_dvgt = (vdt - vdp*dvdt_dvdp) *(1 + mxi*vsatFac*vsatFac)/(1 + vsatFac)/vgt; { /* Intrinsic Q-law FET equation ids(vgt,vdt) */ gds=pow(vgt-vdt,mQ-1); idrain = vdt*gds + vgt*(gm=pow(vgt,mQ-1)-gds); gds *= mQ; gm *= mQ; } gm += gds*dvdt_dvgt; gds *= dvdt_dvdp; } gm += gds*PmQ*vdp/vgt; gds *= dvpd_dvdst; } arg = 1 - 1/subfac; if(vst != 0) gds += gm*VSUB*mvst*(vgt-vgst*arg)/vst; gm *= arg; } else { /* in extreme cut-off (numerically) */ idrain = gm = gds = 0.0e0; } } gds += gm*(arg = h*gam + (1-h)*(HFe1*dvgs-HFg2*dvgd+2*LFg2*vgdtrap-LFg1*vgstrap+LFg)); gm *= 1 - h*eta + (1-h)*(HFe2*dvgs -HFg1*dvgd + LFg1*vgdtrap) - arg; } { /* apply channel length modulation and beta scaling */ double lambda = LAM; double beta = BETA * area; gm *= (arg = beta*(1 + lambda*vdst)); gds = beta*lambda*idrain + gds*arg; idrain *= arg; } { /* apply thermal reduction of drain current */ double h, pfac, pAverage; double delta = DELT / area; if(TRAN_ANAL) { double taud = TAUD; h = taud/(taud + stepofour); h*=h; h*=h; POWR_NOW = pAverage = h*POWR_BEFORE + (1-h)*vdst*idrain; } else { POWR_NOW = POWR_BEFORE = pAverage = vdst*idrain; h = 0; } idrain /= (pfac = 1+pAverage*delta); *Gm = gm * (arg = (h*delta*POWR_BEFORE + 1)/pfac/pfac); *Gds = gds * arg - (1-h) * delta*idrain*idrain; } } return(idrain); } /*----------- | code based on Statz et. al. capacitance model, IEEE Tran ED Feb 87 */ static double qgg( double vgs, double vgd, double gamma, double pb, double alpha, double vto, double vmax, double xc, double cgso, double cgdo, double *cgs, double *cgd ) /*vgs, vgd, gamma, pb, alpha, vto, vmax, xc, cgso, cgdo, *cgs, *cgd;*/ { double qrt, ext, Cgso, cpm, cplus, cminus; double vds = vgs-vgd; double d1_xc = 1-xc; double vert = sqrt( vds * vds + alpha ); double veff = 0.5*(vgs + vgd + vert) + gamma*vds; double vnr = d1_xc*(veff-vto); double vnrt = sqrt( vnr*vnr + 0.04 ); double vnew = veff + 0.5*(vnrt - vnr); if ( vnew < vmax ) { ext = 0; qrt = sqrt(1 - vnew/pb); Cgso = 0.5*cgso/qrt*(1+xc + d1_xc*vnr/vnrt); } else { double vx = 0.5*(vnew-vmax); double par = 1+vx/(pb-vmax); qrt = sqrt(1 - vmax/pb); ext = vx*(1 + par)/qrt; Cgso = 0.5*cgso/qrt*(1+xc + d1_xc*vnr/vnrt) * par; } cplus = 0.5*(1 + (cpm = vds/vert)); cminus = cplus - cpm; *cgs = Cgso*(cplus +gamma) + cgdo*(cminus+gamma); *cgd = Cgso*(cminus-gamma) + cgdo*(cplus -gamma); return(cgso*((pb+pb)*(1-qrt) + ext) + cgdo*(veff - vert)); } /*----------- | call during ac analysis initialisation or during transient analysis */ void PScharge( cref *ckt, modl *model, inst *here, double vgs, double vgd, double *capgs, double *capgd ) { #define QGG(a,b,c,d) qgg(a,b,gac,phib,alpha,vto,vmax,xc,czgs,czgd,c,d) /* double qgg(); */ double czgs = CGS * AREA; double czgd = CGD * AREA; double vto = VTO; double alpha = (double)ALPHA; /* (XI*woo/(XI+1)/2)^2 */ double xc = XC; double vmax = VMAX; double phib = VBI; double gac = ACGAM; if(/*TRAN_INIT ||*/ !TRAN_ANAL) QGS_NOW = QGD_NOW = QGS_BEFORE = QGD_BEFORE = QGG(vgs,vgd,capgs,capgd); else { double cgsna,cgsnc; double cgdna,cgdnb, a_cap; double vgs1 = VGS1; double vgd1 = VGD1; double qgga=QGG(vgs ,vgd ,&cgsna,&cgdna); double qggb=QGG(vgs1,vgd ,&a_cap,&cgdnb); double qggc=QGG(vgs ,vgd1,&cgsnc,&a_cap); double qggd=QGG(vgs1,vgd1,&a_cap,&a_cap); QGS_NOW = QGS_BEFORE + 0.5 * (qgga-qggb + qggc-qggd); QGD_NOW = QGD_BEFORE + 0.5 * (qgga-qggc + qggb-qggd); *capgs = 0.5 * (cgsna + cgsnc); *capgd = 0.5 * (cgdna + cgdnb); } } /*----------- | call for each frequency in ac analysis */ void PSacload( cref *ckt, modl *model, inst *here, double vgs, double vgd, double ids, double omega, double *Gm, double *xGm, double *Gds, double *xGds ) { double arg; double vds = vgs - vgd; double LFgam = LFGAM; double LFg1 = LFG1; double LFg2 = LFG2*vgd; double HFg1 = HFG1; double HFg2 = HFG2*vgd; double HFeta = HFETA; double HFe1 = HFE1; double HFe2 = HFE2*vgs; double hfgam= HFGAM - HFg1*vgs + HFg2; double eta = HFeta - HFe1*vgd + HFe2; double lfga = LFgam - LFg1*vgs + LFg2 + LFg2; double gmo = *Gm/(1 - lfga + LFg1*vgd); double wtg = TAUG * omega; double wtgdet = 1 + wtg*wtg; double gwtgdet = gmo/wtgdet; double gdsi = (arg=hfgam - lfga)*gwtgdet; double gdsr = arg*gmo - gdsi; double gmi = (eta + LFg1*vgd)*gwtgdet + gdsi; double xgds = wtg*gdsi; double gds = *Gds + gdsr; double xgm = -wtg*gmi; double gm = gmi + gmo*(1 -eta - hfgam); double delta = DELT / AREA; double wtd = TAUD * omega ; double wtddet = 1 + wtd * wtd; double fac = delta * ids; double del = 1/(1 - fac * vds); double dd = (del-1) / wtddet; double dr = del - dd; double di = wtd * dd; double cdsqr = fac * ids * del * wtd/wtddet; NG_IGNORE(ckt); *Gm = dr*gm - di*xgm; *xGm = di*gm + dr*xgm; *Gds = dr*gds - di*xgds + cdsqr*wtd; *xGds = di*gds + dr*xgds + cdsqr; } void /* call when temperature changes */ PSinstanceinit( modl *model, inst *here ) { #ifndef PARAM_CAST /* allow casting to parameter type */ #define PARAM_CAST /* if not specified then don't cast */ #endif double woo = (VBI - VTO); XI_WOO = PARAM_CAST (XI * woo); ZA = PARAM_CAST (sqrt(1 + Z)/2); ALPHA = PARAM_CAST (XI_WOO*XI_WOO/(XI+1)/(XI+1)/ 4); D3 = PARAM_CAST (P/Q/pow(woo,(P - Q))); } ngspice-26/src/spicelib/devices/jfet2/jfet2ic.c0000644000265600020320000000240112264261473020735 0ustar andreasadmin/********** Based on jfetic.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2getic(GENmodel *inModel, CKTcircuit *ckt) { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->JFET2nextModel) { for(here = model->JFET2instances; here ; here = here->JFET2nextInstance) { if(!here->JFET2icVDSGiven) { here->JFET2icVDS = *(ckt->CKTrhs + here->JFET2drainNode) - *(ckt->CKTrhs + here->JFET2sourceNode); } if(!here->JFET2icVGSGiven) { here->JFET2icVGS = *(ckt->CKTrhs + here->JFET2gateNode) - *(ckt->CKTrhs + here->JFET2sourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2load.c0000644000265600020320000003333612264261473021274 0ustar andreasadmin/********** Based on jfetload.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: New code added to call psmodel.c routines **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "psmodel.h" #include "ngspice/suffix.h" int JFET2load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; double capgd; double capgs; double cd; double cdhat = 0.0; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd; double cghat = 0.0; double delvds; double delvgd; double delvgs; double gdpr; double gds; double geq; double ggd; double ggs; double gm; double gspr; double vds; double vgd; double vgs; #ifndef PREDICTOR double xfact; #endif int icheck; int ichk1; int error; double m; /* loop through all the models */ for( ; model != NULL; model = model->JFET2nextModel ) { /* loop through all the instances of the model */ for (here = model->JFET2instances; here != NULL ; here=here->JFET2nextInstance) { /* * dc model parameters */ gdpr=model->JFET2drainConduct*here->JFET2area; gspr=model->JFET2sourceConduct*here->JFET2area; /* * initialization */ icheck=1; if( ckt->CKTmode & MODEINITSMSIG) { vgs= *(ckt->CKTstate0 + here->JFET2vgs); vgd= *(ckt->CKTstate0 + here->JFET2vgd); } else if (ckt->CKTmode & MODEINITTRAN) { vgs= *(ckt->CKTstate1 + here->JFET2vgs); vgd= *(ckt->CKTstate1 + here->JFET2vgd); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds=model->JFET2type*here->JFET2icVDS; vgs=model->JFET2type*here->JFET2icVGS; vgd=vgs-vds; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->JFET2off == 0) ) { vgs = -1; vgd = -1; } else if( (ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->JFET2off))) { vgs = 0; vgd = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->JFET2vgs)= *(ckt->CKTstate1 + here->JFET2vgs); vgs=(1+xfact)* *(ckt->CKTstate1 + here->JFET2vgs)-xfact* *(ckt->CKTstate2 + here->JFET2vgs); *(ckt->CKTstate0 + here->JFET2vgd)= *(ckt->CKTstate1 + here->JFET2vgd); vgd=(1+xfact)* *(ckt->CKTstate1 + here->JFET2vgd)-xfact* *(ckt->CKTstate2 + here->JFET2vgd); *(ckt->CKTstate0 + here->JFET2cg)= *(ckt->CKTstate1 + here->JFET2cg); *(ckt->CKTstate0 + here->JFET2cd)= *(ckt->CKTstate1 + here->JFET2cd); *(ckt->CKTstate0 + here->JFET2cgd)= *(ckt->CKTstate1 + here->JFET2cgd); *(ckt->CKTstate0 + here->JFET2gm)= *(ckt->CKTstate1 + here->JFET2gm); *(ckt->CKTstate0 + here->JFET2gds)= *(ckt->CKTstate1 + here->JFET2gds); *(ckt->CKTstate0 + here->JFET2ggs)= *(ckt->CKTstate1 + here->JFET2ggs); *(ckt->CKTstate0 + here->JFET2ggd)= *(ckt->CKTstate1 + here->JFET2ggd); } else { #endif /*PREDICTOR*/ /* * compute new nonlinear branch voltages */ vgs=model->JFET2type* (*(ckt->CKTrhsOld+ here->JFET2gateNode)- *(ckt->CKTrhsOld+ here->JFET2sourcePrimeNode)); vgd=model->JFET2type* (*(ckt->CKTrhsOld+here->JFET2gateNode)- *(ckt->CKTrhsOld+ here->JFET2drainPrimeNode)); #ifndef PREDICTOR } #endif /*PREDICTOR*/ delvgs=vgs- *(ckt->CKTstate0 + here->JFET2vgs); delvgd=vgd- *(ckt->CKTstate0 + here->JFET2vgd); delvds=delvgs-delvgd; cghat= *(ckt->CKTstate0 + here->JFET2cg)+ *(ckt->CKTstate0 + here->JFET2ggd)*delvgd+ *(ckt->CKTstate0 + here->JFET2ggs)*delvgs; cdhat= *(ckt->CKTstate0 + here->JFET2cd)+ *(ckt->CKTstate0 + here->JFET2gm)*delvgs+ *(ckt->CKTstate0 + here->JFET2gds)*delvds- *(ckt->CKTstate0 + here->JFET2ggd)*delvgd; /* * bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->JFET2vgs)))+ ckt->CKTvoltTol) ) if ( (fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->JFET2vgd)))+ ckt->CKTvoltTol)) if ( (fabs(cghat-*(ckt->CKTstate0 + here->JFET2cg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->JFET2cg)))+ ckt->CKTabstol) ) if ( /* hack - expression too big */ (fabs(cdhat-*(ckt->CKTstate0 + here->JFET2cd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->JFET2cd)))+ ckt->CKTabstol) ) { /* we can do a bypass */ vgs= *(ckt->CKTstate0 + here->JFET2vgs); vgd= *(ckt->CKTstate0 + here->JFET2vgd); vds= vgs-vgd; cg= *(ckt->CKTstate0 + here->JFET2cg); cd= *(ckt->CKTstate0 + here->JFET2cd); cgd= *(ckt->CKTstate0 + here->JFET2cgd); gm= *(ckt->CKTstate0 + here->JFET2gm); gds= *(ckt->CKTstate0 + here->JFET2gds); ggs= *(ckt->CKTstate0 + here->JFET2ggs); ggd= *(ckt->CKTstate0 + here->JFET2ggd); goto load; } /* * limit nonlinear branch voltages */ ichk1=1; vgs = DEVpnjlim(vgs,*(ckt->CKTstate0 + here->JFET2vgs), (here->JFET2temp*CONSTKoverQ), here->JFET2vcrit, &icheck); vgd = DEVpnjlim(vgd,*(ckt->CKTstate0 + here->JFET2vgd), (here->JFET2temp*CONSTKoverQ), here->JFET2vcrit,&ichk1); if (ichk1 == 1) { icheck=1; } vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->JFET2vgs), model->JFET2vto); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->JFET2vgd), model->JFET2vto); } /* * determine dc current and derivatives */ vds=vgs-vgd; if (vds < 0.0) { cd = -PSids(ckt, model, here, vgd, vgs, &cgd, &cg, &ggd, &ggs, &gm, &gds); gds += gm; gm = -gm; } else { cd = PSids(ckt, model, here, vgs, vgd, &cg, &cgd, &ggs, &ggd, &gm, &gds); } cg = cg + cgd; cd = cd - cgd; if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG) ) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * charge storage elements */ double capds = model->JFET2capds*here->JFET2area; PScharge(ckt, model, here, vgs, vgd, &capgs, &capgd); *(ckt->CKTstate0 + here->JFET2qds) = capds * vds; /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->JFET2qgs) = capgs; *(ckt->CKTstate0 + here->JFET2qgd) = capgd; *(ckt->CKTstate0 + here->JFET2qds) = capds; continue; /*go to 1000*/ } /* * transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->JFET2qgs) = *(ckt->CKTstate0 + here->JFET2qgs); *(ckt->CKTstate1 + here->JFET2qgd) = *(ckt->CKTstate0 + here->JFET2qgd); *(ckt->CKTstate1 + here->JFET2qds) = *(ckt->CKTstate0 + here->JFET2qds); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->JFET2qgs); if(error) return(error); ggs = ggs + geq; cg = cg + *(ckt->CKTstate0 + here->JFET2cqgs); error = NIintegrate(ckt,&geq,&ceq,capgd,here->JFET2qgd); if(error) return(error); ggd = ggd + geq; cg = cg + *(ckt->CKTstate0 + here->JFET2cqgd); cd = cd - *(ckt->CKTstate0 + here->JFET2cqgd); cgd = cgd + *(ckt->CKTstate0 + here->JFET2cqgd); error = NIintegrate(ckt,&geq,&ceq,capds,here->JFET2qds); cd = cd + *(ckt->CKTstate0 + here->JFET2cqds); if(error) return(error); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->JFET2cqgs) = *(ckt->CKTstate0 + here->JFET2cqgs); *(ckt->CKTstate1 + here->JFET2cqgd) = *(ckt->CKTstate0 + here->JFET2cqgd); *(ckt->CKTstate1 + here->JFET2cqds) = *(ckt->CKTstate0 + here->JFET2cqds); } } } /* * check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if((icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol* MAX(fabs(cghat),fabs(cg))+ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol* MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol)) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->JFET2vgs) = vgs; *(ckt->CKTstate0 + here->JFET2vgd) = vgd; *(ckt->CKTstate0 + here->JFET2cg) = cg; *(ckt->CKTstate0 + here->JFET2cd) = cd; *(ckt->CKTstate0 + here->JFET2cgd) = cgd; *(ckt->CKTstate0 + here->JFET2gm) = gm; *(ckt->CKTstate0 + here->JFET2gds) = gds; *(ckt->CKTstate0 + here->JFET2ggs) = ggs; *(ckt->CKTstate0 + here->JFET2ggd) = ggd; /* * load current vector */ load: m = here->JFET2m; ceqgd=model->JFET2type*(cgd-ggd*vgd); ceqgs=model->JFET2type*((cg-cgd)-ggs*vgs); cdreq=model->JFET2type*((cd+cgd)-gds*vds-gm*vgs); *(ckt->CKTrhs + here->JFET2gateNode) += m * (-ceqgs-ceqgd); *(ckt->CKTrhs + here->JFET2drainPrimeNode) += m * (-cdreq+ceqgd); *(ckt->CKTrhs + here->JFET2sourcePrimeNode) += m * (cdreq+ceqgs); /* * load y matrix */ *(here->JFET2drainDrainPrimePtr) += m * (-gdpr); *(here->JFET2gateDrainPrimePtr) += m * (-ggd); *(here->JFET2gateSourcePrimePtr) += m * (-ggs); *(here->JFET2sourceSourcePrimePtr) += m * (-gspr); *(here->JFET2drainPrimeDrainPtr) += m * (-gdpr); *(here->JFET2drainPrimeGatePtr) += m * (gm-ggd); *(here->JFET2drainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->JFET2sourcePrimeGatePtr) += m * (-ggs-gm); *(here->JFET2sourcePrimeSourcePtr) += m * (-gspr); *(here->JFET2sourcePrimeDrainPrimePtr) += m * (-gds); *(here->JFET2drainDrainPtr) += m * (gdpr); *(here->JFET2gateGatePtr) += m * (ggd+ggs); *(here->JFET2sourceSourcePtr) += m * (gspr); *(here->JFET2drainPrimeDrainPrimePtr) += m * (gdpr+gds+ggd); *(here->JFET2sourcePrimeSourcePrimePtr) += m * (gspr+gds+gm+ggs); } } return(OK); } ngspice-26/src/spicelib/devices/jfet2/Makefile.am0000644000265600020320000000106112264261473021300 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libjfet2.la libjfet2_la_SOURCES = \ jfet2.c \ jfet2acld.c \ jfet2ask.c \ jfet2defs.h \ jfet2del.c \ jfet2dest.c \ jfet2ext.h \ jfet2ic.c \ jfet2init.c \ jfet2init.h \ jfet2itf.h \ jfet2load.c \ jfet2mask.c \ jfet2mdel.c \ jfet2mpar.c \ jfet2noi.c \ jfet2par.c \ jfet2parm.h \ jfet2set.c \ jfet2temp.c \ jfet2trun.c \ psmodel.c \ psmodel.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/jfet2/jfet2mdel.c0000644000265600020320000000222212264261473021264 0ustar andreasadmin/********** based on jfetmdel.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ /* */ #include "ngspice/ngspice.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { JFET2model **model = (JFET2model**)inModel; JFET2model *modfast = (JFET2model*)kill; JFET2instance *here; JFET2instance *prev = NULL; JFET2model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->JFET2nextModel)) { if( (*model)->JFET2modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->JFET2nextModel; /* cut deleted device out of list */ for(here = (*model)->JFET2instances ; here ; here = here->JFET2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/jfet2/Makefile.in0000644000265600020320000004306212264261537021321 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/jfet2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjfet2_la_LIBADD = am_libjfet2_la_OBJECTS = jfet2.lo jfet2acld.lo jfet2ask.lo jfet2del.lo \ jfet2dest.lo jfet2ic.lo jfet2init.lo jfet2load.lo jfet2mask.lo \ jfet2mdel.lo jfet2mpar.lo jfet2noi.lo jfet2par.lo jfet2set.lo \ jfet2temp.lo jfet2trun.lo psmodel.lo libjfet2_la_OBJECTS = $(am_libjfet2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libjfet2_la_SOURCES) DIST_SOURCES = $(libjfet2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libjfet2.la libjfet2_la_SOURCES = \ jfet2.c \ jfet2acld.c \ jfet2ask.c \ jfet2defs.h \ jfet2del.c \ jfet2dest.c \ jfet2ext.h \ jfet2ic.c \ jfet2init.c \ jfet2init.h \ jfet2itf.h \ jfet2load.c \ jfet2mask.c \ jfet2mdel.c \ jfet2mpar.c \ jfet2noi.c \ jfet2par.c \ jfet2parm.h \ jfet2set.c \ jfet2temp.c \ jfet2trun.c \ psmodel.c \ psmodel.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/jfet2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/jfet2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjfet2.la: $(libjfet2_la_OBJECTS) $(libjfet2_la_DEPENDENCIES) $(EXTRA_libjfet2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libjfet2_la_OBJECTS) $(libjfet2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet2trun.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/psmodel.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/jfet2/jfet2par.c0000644000265600020320000000400612264261473021127 0ustar andreasadmin/********** based on jfetpar.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to jfet2 for PS model definition ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int JFET2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { JFET2instance *here = (JFET2instance *)inst; NG_IGNORE(select); switch(param) { case JFET2_TEMP: here->JFET2temp = value->rValue+CONSTCtoK; here->JFET2tempGiven = TRUE; break; case JFET2_DTEMP: here->JFET2temp = value->rValue; here->JFET2tempGiven = TRUE; break; case JFET2_AREA: here->JFET2area = value->rValue; here->JFET2areaGiven = TRUE; break; case JFET2_M: here->JFET2m = value->rValue; here->JFET2mGiven = TRUE; break; case JFET2_IC_VDS: here->JFET2icVDS = value->rValue; here->JFET2icVDSGiven = TRUE; break; case JFET2_IC_VGS: here->JFET2icVGS = value->rValue; here->JFET2icVGSGiven = TRUE; break; case JFET2_OFF: here->JFET2off = (value->iValue != 0); break; case JFET2_IC: switch(value->v.numValue) { case 2: here->JFET2icVGS = *(value->v.vec.rVec+1); here->JFET2icVGSGiven = TRUE; case 1: here->JFET2icVDS = *(value->v.vec.rVec); here->JFET2icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2temp.c0000644000265600020320000001014712264261473021315 0ustar andreasadmin/********** Base on jfettemp.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Call to PSinstanceinit() added Change gatePotential to phi and used rs and rd for sourceResist and drainResist, and fc for depletionCapCoef **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "jfet2defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "psmodel.h" #include "ngspice/suffix.h" int JFET2temp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-process the model parameters after a possible change */ { JFET2model *model = (JFET2model*)inModel; JFET2instance *here; double xfc; double vt; double vtnom; double kt,kt1; double arg,arg1; double fact1,fact2; double egfet,egfet1; double pbfact,pbfact1; double gmanew,gmaold; double ratio1; double pbo; double cjfact,cjfact1; /* loop through all the diode models */ for( ; model != NULL; model = model->JFET2nextModel ) { if(!(model->JFET2tnomGiven)) { model->JFET2tnom = ckt->CKTnomTemp; } vtnom = CONSTKoverQ * model->JFET2tnom; fact1 = model->JFET2tnom/REFTEMP; kt1 = CONSTboltz * model->JFET2tnom; egfet1 = 1.16-(7.02e-4*model->JFET2tnom*model->JFET2tnom)/ (model->JFET2tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom * (1.5*log(fact1)+CHARGE*arg1); pbo = (model->JFET2phi-pbfact1)/fact1; gmaold = (model->JFET2phi-pbo)/pbo; cjfact = 1/(1+.5*(4e-4*(model->JFET2tnom-REFTEMP)-gmaold)); if(model->JFET2rd != 0) { model->JFET2drainConduct = 1/model->JFET2rd; } else { model->JFET2drainConduct = 0; } if(model->JFET2rs != 0) { model->JFET2sourceConduct = 1/model->JFET2rs; } else { model->JFET2sourceConduct = 0; } if(model->JFET2fc >.95) { SPfrontEnd->IFerror (ERR_WARNING, "%s: Depletion cap. coefficient too large, limited to .95", &(model->JFET2modName)); model->JFET2fc = .95; } xfc = log(1 - model->JFET2fc); model->JFET2f2 = exp((1+.5)*xfc); model->JFET2f3 = 1 - model->JFET2fc * (1 + .5); /* loop through all the instances of the model */ for (here = model->JFET2instances; here != NULL ; here=here->JFET2nextInstance) { if(!(here->JFET2dtempGiven)) { here->JFET2dtemp = 0.0; } if(!(here->JFET2tempGiven)) { here->JFET2temp = ckt->CKTtemp + here->JFET2dtemp; } vt = here->JFET2temp * CONSTKoverQ; fact2 = here->JFET2temp/REFTEMP; ratio1 = here->JFET2temp/model->JFET2tnom -1; here->JFET2tSatCur = model->JFET2is * exp(ratio1*1.11/vt); here->JFET2tCGS = model->JFET2capgs * cjfact; here->JFET2tCGD = model->JFET2capgd * cjfact; kt = CONSTboltz*here->JFET2temp; egfet = 1.16-(7.02e-4*here->JFET2temp*here->JFET2temp)/ (here->JFET2temp+1108); arg = -egfet/(kt+kt) + 1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2 * vt * (1.5*log(fact2)+CHARGE*arg); here->JFET2tGatePot = fact2 * pbo + pbfact; gmanew = (here->JFET2tGatePot-pbo)/pbo; cjfact1 = 1+.5*(4e-4*(here->JFET2temp-REFTEMP)-gmanew); here->JFET2tCGS *= cjfact1; here->JFET2tCGD *= cjfact1; here->JFET2corDepCap = model->JFET2fc * here->JFET2tGatePot; here->JFET2f1 = here->JFET2tGatePot * (1 - exp((1-.5)*xfc))/(1-.5); here->JFET2vcrit = vt * log(vt/(CONSTroot2 * here->JFET2tSatCur)); PSinstanceinit(model, here); } } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2ext.h0000644000265600020320000000207612264261473021157 0ustar andreasadmin/********** Based on jfetext.h Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. **********/ extern int JFET2acLoad(GENmodel*,CKTcircuit*); extern int JFET2ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int JFET2delete(GENmodel*,IFuid,GENinstance**); extern void JFET2destroy(GENmodel**); extern int JFET2getic(GENmodel*,CKTcircuit*); extern int JFET2load(GENmodel*,CKTcircuit*); extern int JFET2mAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int JFET2mDelete(GENmodel**,IFuid,GENmodel*); extern int JFET2mParam(int,IFvalue*,GENmodel*); extern int JFET2param(int,IFvalue*,GENinstance*,IFvalue*); extern int JFET2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int JFET2unsetup(GENmodel*,CKTcircuit*); extern int JFET2temp(GENmodel*,CKTcircuit*); extern int JFET2trunc(GENmodel*,CKTcircuit*,double*); extern int JFET2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); ngspice-26/src/spicelib/devices/jfet2/jfet2.c0000644000265600020320000000723712264261473020435 0ustar andreasadmin/********** Based on jfet.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Parameter definitions called from jfetparm.h Extra state vectors added to JFET2pTable **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "jfet2defs.h" #include "ngspice/suffix.h" IFparm JFET2pTable[] = { /* device parameters */ IOPU("off", JFET2_OFF, IF_FLAG, "Device initially off"), IOPAU("ic", JFET2_IC, IF_REALVEC,"Initial VDS,VGS vector"), IOPU("area", JFET2_AREA, IF_REAL, "Area factor"), IOPU("m", JFET2_M, IF_REAL, "Parallel Multiplier"), IOPAU("ic-vds", JFET2_IC_VDS, IF_REAL, "Initial D-S voltage"), IOPAU("ic-vgs", JFET2_IC_VGS, IF_REAL, "Initial G-S volrage"), IOPU("temp", JFET2_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", JFET2_DTEMP, IF_REAL, "Instance temperature difference"), OPU("drain-node", JFET2_DRAINNODE, IF_INTEGER,"Number of drain node"), OPU("gate-node", JFET2_GATENODE, IF_INTEGER,"Number of gate node"), OPU("source-node", JFET2_SOURCENODE, IF_INTEGER,"Number of source node"), OPU("drain-prime-node", JFET2_DRAINPRIMENODE, IF_INTEGER,"Internal drain node"), OPU("source-prime-node",JFET2_SOURCEPRIMENODE,IF_INTEGER,"Internal source node"), OP("vgs", JFET2_VGS, IF_REAL, "Voltage G-S"), OP("vgd", JFET2_VGD, IF_REAL, "Voltage G-D"), OP("ig", JFET2_CG, IF_REAL, "Current at gate node"), OP("id", JFET2_CD, IF_REAL, "Current at drain node"), OP("is", JFET2_CS, IF_REAL, "Source current"), OP("igd", JFET2_CGD, IF_REAL, "Current G-D"), OP("gm", JFET2_GM, IF_REAL, "Transconductance"), OP("gds", JFET2_GDS, IF_REAL, "Conductance D-S"), OP("ggs", JFET2_GGS, IF_REAL, "Conductance G-S"), OP("ggd", JFET2_GGD, IF_REAL, "Conductance G-D"), OPU("qgs", JFET2_QGS, IF_REAL, "Charge storage G-S junction"), OPU("qgd", JFET2_QGD, IF_REAL, "Charge storage G-D junction"), OPU("cqgs", JFET2_CQGS, IF_REAL, "Capacitance due to charge storage G-S junction"), OPU("cqgd", JFET2_CQGD, IF_REAL, "Capacitance due to charge storage G-D junction"), OPU("p", JFET2_POWER,IF_REAL, "Power dissipated by the JFET2"), OPU("vtrap",JFET2_VTRAP,IF_REAL, "Quiescent drain feedback potential"), OPU("vpave",JFET2_PAVE, IF_REAL, "Quiescent power dissipation"), }; IFparm JFET2mPTable[] = { /* model parameters */ OP("type", JFET2_MOD_TYPE, IF_STRING, "N-type or P-type JFET2 model"), IOP("njf", JFET2_MOD_NJF, IF_FLAG,"N type JFET2 model"), IOP("pjf", JFET2_MOD_PJF, IF_FLAG,"P type JFET2 model"), IOPR("vt0", JFET2_MOD_VTO, IF_REAL,"Threshold voltage"), IOPR("vbi", JFET2_MOD_PB, IF_REAL,"Gate junction potential"), #define PARAM(code,id,flag,ref,default,descrip) IOP(code,id,IF_REAL,descrip), #define PARAMA(code,id,flag,ref,default,descrip) IOPA(code,id,IF_REAL,descrip), #include "jfet2parm.h" OPU("gd", JFET2_MOD_DRAINCONDUCT, IF_REAL,"Drain conductance"), OPU("gs", JFET2_MOD_SOURCECONDUCT,IF_REAL,"Source conductance"), IOPU("tnom", JFET2_MOD_TNOM, IF_REAL,"parameter measurement temperature"), }; char *JFET2names[] = { "Drain", "Gate", "Source" }; int JFET2nSize = NUMELEMS(JFET2names); int JFET2pTSize = NUMELEMS(JFET2pTable); int JFET2mPTSize = NUMELEMS(JFET2mPTable); int JFET2iSize = sizeof(JFET2instance); int JFET2mSize = sizeof(JFET2model); ngspice-26/src/spicelib/devices/jfet2/jfet2mpar.c0000644000265600020320000000237012264261473021306 0ustar andreasadmin/********** Based on jfetmpar.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Added call to jfetparm.h **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFET2mParam(int param, IFvalue *value, GENmodel *inModels) { JFET2model *model = (JFET2model*)inModels; switch(param) { case JFET2_MOD_TNOM: model->JFET2tnomGiven = TRUE; model->JFET2tnom = value->rValue+CONSTCtoK; break; #define PARAM(code,id,flag,ref,default,descrip) case id: \ model->flag = TRUE; model->ref = value->rValue; break; #include "jfet2parm.h" case JFET2_MOD_NJF: if(value->iValue) { model->JFET2type = NJF; } break; case JFET2_MOD_PJF: if(value->iValue) { model->JFET2type = PJF; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/jfet2/jfet2init.h0000644000265600020320000000040212264261473021311 0ustar andreasadmin#ifndef _JFET2INIT_H #define _JFET2INIT_H extern IFparm JFET2pTable[ ]; extern IFparm JFET2mPTable[ ]; extern char *JFET2names[ ]; extern int JFET2pTSize; extern int JFET2mPTSize; extern int JFET2nSize; extern int JFET2iSize; extern int JFET2mSize; #endif ngspice-26/src/spicelib/devices/jfet2/jfet2mask.c0000644000265600020320000000275012264261473021304 0ustar andreasadmin/********** Based on jfetmask.c Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Modified to add PS model and new parameter definitions ( Anthony E. Parker ) Copyright 1994 Macquarie University, Sydney Australia. 10 Feb 1994: Added call to jfetparm.h **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "jfet2defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int JFET2mAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { JFET2model *model = (JFET2model*)inModel; NG_IGNORE(ckt); switch(which) { case JFET2_MOD_TNOM: value->rValue = model->JFET2tnom-CONSTCtoK; return(OK); #define PARAM(code,id,flag,ref,default,descrip) case id: \ value->rValue = model->ref; return(OK); #include "jfet2parm.h" case JFET2_MOD_DRAINCONDUCT: value->rValue = model->JFET2drainConduct; return(OK); case JFET2_MOD_SOURCECONDUCT: value->rValue = model->JFET2sourceConduct; return(OK); case JFET2_MOD_TYPE: if (model->JFET2type == NJF) value->sValue = "njf"; else value->sValue = "pjf"; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/cpl/0000755000265600020320000000000012264261707017012 5ustar andreasadminngspice-26/src/spicelib/devices/cpl/cplmask.c0000644000265600020320000000243112264261473020610 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 2004 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int CPLmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { CPLmodel *model = (CPLmodel *)inModel; NG_IGNORE(ckt); switch(which) { case CPL_R: value->v.vec.rVec = model->Rm; value->v.numValue = model->Rm_counter; return(OK); case CPL_L: value->v.vec.rVec = model->Lm; value->v.numValue = model->Lm_counter; return(OK); case CPL_G: value->v.vec.rVec = model->Gm; value->v.numValue = model->Gm_counter; return(OK); case CPL_C: value->v.vec.rVec = model->Cm; value->v.numValue = model->Cm_counter; return(OK); case CPL_length: value->rValue = model->length; return(OK); case CPL_MOD_R: /* No op */ return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/cpl/cplext.h0000644000265600020320000000125712264261473020467 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. **********/ /* extern int CPLaccept(CKTcircuit*, GENmodel*); */ extern int CPLask(CKTcircuit*, GENinstance*, int, IFvalue*, IFvalue*); extern int CPLdelete(GENmodel*, IFuid,GENinstance**); extern void CPLdestroy(GENmodel**); extern int CPLload(GENmodel*, CKTcircuit*); extern int CPLmAsk(CKTcircuit*, GENmodel*, int, IFvalue*); extern int CPLmDelete(GENmodel**, IFuid,GENmodel*); extern int CPLmParam(int,IFvalue*, GENmodel*); extern int CPLparam(int,IFvalue*, GENinstance*, IFvalue*); extern int CPLsetup(SMPmatrix*, GENmodel*, CKTcircuit*, int*); extern int CPLunsetup(GENmodel*, CKTcircuit*); ngspice-26/src/spicelib/devices/cpl/cpldel.c0000644000265600020320000000153012264261473020420 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CPLdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { CPLmodel *model = (CPLmodel *)inModel; CPLinstance **fast = (CPLinstance **)inst; CPLinstance **prev = NULL; CPLinstance *here; for( ; model ; model = model->CPLnextModel) { prev = &(model->CPLinstances); for(here = *prev; here ; here = *prev) { if(here->CPLname == name || (fast && here==*fast) ) { *prev= here->CPLnextInstance; FREE(here); return(OK); } prev = &(here->CPLnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/cpl/cplask.c0000644000265600020320000000206112264261473020432 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 2004 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CPLask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { CPLinstance *here = (CPLinstance *)inst; NG_IGNORE(ckt); NG_IGNORE(select); switch(which) { case CPL_POS_NODE: value->v.vec.sVec = here->in_node_names; value->v.numValue = here->dimension; return(OK); case CPL_NEG_NODE: value->v.vec.sVec = here->out_node_names; value->v.numValue = here->dimension; return(OK); case CPL_DIM: value->iValue = here->dimension; return(OK); case CPL_LENGTH: value->rValue = here->CPLlength; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/cpl/cpldest.c0000644000265600020320000000136212264261473020616 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "cpldefs.h" #include "ngspice/suffix.h" void CPLdestroy(GENmodel **inModel) { CPLmodel **model = (CPLmodel **)inModel; CPLinstance *here; CPLinstance *prev = NULL; CPLmodel *mod = *model; CPLmodel *oldmod = NULL; for( ; mod ; mod = mod->CPLnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->CPLinstances ; here ; here = here->CPLnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/cpl/cplinit.h0000644000265600020320000000035612264261473020631 0ustar andreasadmin#ifndef _CPLINIT_H #define _CPLINIT_H extern IFparm CPLpTable[ ]; extern IFparm CPLmPTable[ ]; extern int CPLmPTSize; extern int CPLpTSize; extern char *CPLnames[ ]; extern int CPLiSize; extern int CPLmSize; extern int CPLnSize; #endif ngspice-26/src/spicelib/devices/cpl/cplinit.c0000644000265600020320000000373412264261473020627 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "cplitf.h" #include "cplext.h" #include "cplinit.h" SPICEdev CPLinfo = { { "CplLines", "Simple Coupled Multiconductor Lines", &CPLnSize, &CPLnSize, CPLnames, &CPLpTSize, CPLpTable, &CPLmPTSize, CPLmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ CPLparam, /* DEVmodParam */ CPLmParam, /* DEVload */ CPLload, /* DEVsetup */ CPLsetup, /* DEVunsetup */ CPLunsetup, /* DEVpzSetup */ NULL, /* DEVtemperature */ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* CPLfindBranch, */ /* DEVacLoad */ NULL, /* DEVaccept */ NULL, /* DEVdestroy */ CPLdestroy, /* DEVmodDelete */ CPLmDelete, /* DEVdelete */ CPLdelete, /* DEVsetic */ NULL, /* DEVask */ CPLask, /* DEVmodAsk */ CPLmAsk, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &CPLiSize, /* DEVmodSize */ &CPLmSize }; SPICEdev * get_cpl_info(void) { return &CPLinfo; } ngspice-26/src/spicelib/devices/cpl/cplmpar.c0000644000265600020320000000303012264261473020610 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" static void copy_coeffs(double **dst, IFvalue *value) { int n = value->v.numValue; if(*dst) tfree(*dst); *dst = TMALLOC(double, n); memcpy(*dst, value->v.vec.rVec, (size_t) n * sizeof(double)); } int CPLmParam(int param, IFvalue *value, GENmodel *inModel) { register CPLmodel *model = (CPLmodel *)inModel; switch(param) { case CPL_R: copy_coeffs(& model->Rm, value); model->Rm_counter = value->v.numValue; model->Rmgiven = TRUE; break; case CPL_L: copy_coeffs(& model->Lm, value); model->Lm_counter = value->v.numValue; model->Lmgiven = TRUE; break; case CPL_G: copy_coeffs(& model->Gm, value); model->Gm_counter = value->v.numValue; model->Gmgiven = TRUE; break; case CPL_C: copy_coeffs(& model->Cm, value); model->Cm_counter = value->v.numValue; model->Cmgiven = TRUE; break; case CPL_length: model->length = value->rValue; model->lengthgiven = TRUE; break; case CPL_MOD_R: break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cpl/cplload.c0000644000265600020320000005635312264261473020610 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* controlled_exit() */ VI_list *pool_vi; static double ratio[MAX_CP_TX_LINES]; static VI_list *new_vi(void); static void free_vi(VI_list*); static int get_pvs_vi(int t1, int t2, CPLine *cp, double v1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]); static int update_cnv(CPLine*, double); static int add_new_vi(CPLinstance*, CKTcircuit*, int); static int right_consts(CPLinstance*, CPLine*, int, int, double, double, int*, int*, CKTcircuit*); static int update_delayed_cnv(CPLine*, double); static int multC(double, double, double, double, double*, double*); static int expC(double, double, double, double*, double*); static int divC(double, double, double, double, double*, double*); static void update_cnv_a(TMS*, double, double, double, double, double, double, double); static void copy_cp(CPLine*, CPLine*); /*ARGSUSED*/ int CPLload(GENmodel *inModel, CKTcircuit *ckt) { CPLmodel *model = (CPLmodel *)inModel; CPLinstance *here; CPLine *cp, *cp2; int *k_p, *l_p; int time, time2; double h, h1, f; /* int hint; never used */ double hf; NODE *nd; double v, v1, g; int i, j, k, l; int cond1; int noL, m, p, q; CKTnode *node; VI_list *vi, *vi_before; int before, delta; int resindex; double gmin; /* dc solution */ h = ckt->CKTdelta; h1 = 0.5 * h; time2 = (int) (ckt->CKTtime * 1e12); /* hint = (int)(h * 1e12); never used */ hf = h * 1e12; time = (int) ((ckt->CKTtime - ckt->CKTdelta) * 1e12); cond1= ckt->CKTmode & MODEDC; gmin = 0.1 * ckt->CKTgmin; /* dc solution */ for( ; model != NULL; model = model->CPLnextModel ) { for (here = model->CPLinstances; here != NULL ; here=here->CPLnextInstance) { cp = here->cplines; noL = cp->noL = here->dimension; for(m = 0 ; m < noL ; m++) /* dc solution */ { *here->CPLposPos[m] += gmin; *here->CPLnegNeg[m] += gmin; *here->CPLnegPos[m] += gmin; *here->CPLposNeg[m] += gmin; } if (cond1 || cp->vi_head == NULL) continue; if (cp->vi_tail->time > time) { time = cp->vi_tail->time; /* hint = time2 - time; never used */ } before = cp->vi_tail->time; vi_before = cp->vi_tail; if (time > cp->vi_tail->time) { copy_cp(cp, here->cplines2); add_new_vi(here, ckt, time); delta = time - before; for (m = 0; m < noL; m++) { nd = cp->in_node[m]; v = vi_before->v_i[m]; v1 = nd->V = cp->vi_tail->v_i[m]; nd->dv = (v1 - v) / delta; } for (m = 0; m < noL; m++) { nd = cp->out_node[m]; v = vi_before->v_o[m]; v1 = nd->V = cp->vi_tail->v_o[m]; nd->dv = (v1 - v) / delta; } update_cnv(cp, delta); if (cp->ext) update_delayed_cnv(cp, delta); } } } model = (CPLmodel *)inModel; /* loop through all the models */ for( ; model != NULL; model = model->CPLnextModel ) { /* loop through all the instances of the model */ for (here = model->CPLinstances; here != NULL ; here=here->CPLnextInstance) { double mintaul = 123456789.0; cp = here->cplines; cp2 = here->cplines2; for (i = 0; i < cp->noL; i++) { if (mintaul > cp->taul[i]) mintaul = cp->taul[i]; } if (mintaul < hf) { fprintf(stderr, "your time step was too large for CPL tau.\n"); /* fprintf(stderr, "please decrease max time step in .tran card.\n"); fprintf(stderr, ".tran tstep tstop tstart tmax.\n"); fprintf(stderr, "make tmax smaller than %e and try again.\n", mintaul * 1e-12); return (1111); */ fprintf(stderr, "tmax is now set to %e.\n", 0.9 * mintaul * 1e-12); ckt->CKTmaxStep = 0.9 * mintaul * 1e-12; } noL = cp->noL = here->dimension; if (cond1) { resindex = 0; for (m = 0; m < noL; m++) { if (here->CPLlengthGiven) g = model->Rm[resindex] * here->CPLlength; else g = model->Rm[resindex] * here->CPLmodPtr->length; *(here->CPLposIbr1[m]) += 1.0; *(here->CPLnegIbr2[m]) += 1.0; *(here->CPLibr1Ibr1[m]) += 1.0; *(here->CPLibr1Ibr2[m][m]) += 1.0; *(here->CPLibr2Pos[m][m]) += 1.0; *(here->CPLibr2Neg[m][m]) -= 1.0; *(here->CPLibr2Ibr1[m][m]) -= g; resindex = resindex + noL - m; } continue; } /* dc setup */ if (here->CPLdcGiven == 0 && !cond1) { for (i = 0; i < cp->noL; i++) { nd = cp->in_node[i]; for(node = ckt->CKTnodes;node; node = node->next) { if (strcmp(nd->name->id, node->name) == 0) { cp->dc1[i] = ckt->CKTrhsOld[node->number]; cp2->dc1[i] = nd->V = cp->dc1[i]; break; } } nd = cp->out_node[i]; for(node = ckt->CKTnodes;node; node = node->next) { if (strcmp(nd->name->id, node->name) == 0) { cp->dc2[i] = ckt->CKTrhsOld[node->number]; cp2->dc2[i] = nd->V = cp->dc2[i]; break; } } } here->CPLdcGiven = 1; vi = new_vi(); vi->time = 0; { for (i = 0; i < cp->noL; i++) { for (j = 0; j < cp->noL; j++) { TMS *tms; double a, b; tms = cp->h1t[i][j]; if (tms->ifImg) { tms->tm[0].cnv_i = - cp->dc1[j] * tms->tm[0].c / tms->tm[0].x; tms->tm[0].cnv_o = - cp->dc2[j] * tms->tm[0].c / tms->tm[0].x; divC(tms->tm[1].c, tms->tm[2].c, tms->tm[1].x, tms->tm[2].x, &a, &b); tms->tm[1].cnv_i = - cp->dc1[j] * a; tms->tm[1].cnv_o = - cp->dc2[j] * a; tms->tm[2].cnv_i = - cp->dc1[j] * b; tms->tm[2].cnv_o = - cp->dc2[j] * b; } else for (k = 0; k < 3; k++) { tms->tm[k].cnv_i = - cp->dc1[j] * tms->tm[k].c / tms->tm[k].x; tms->tm[k].cnv_o = - cp->dc2[j] * tms->tm[k].c / tms->tm[k].x; } for (l = 0; l < cp->noL; l++) { tms = cp->h2t[i][j][l]; for (k = 0; k < 3; k++) { tms->tm[k].cnv_i = 0.0; tms->tm[k].cnv_o = 0.0; } } for (l = 0; l < cp->noL; l++) { tms = cp->h3t[i][j][l]; if (tms->ifImg) { tms->tm[0].cnv_i = - cp->dc1[j] * tms->tm[0].c / tms->tm[0].x; tms->tm[0].cnv_o = - cp->dc2[j] * tms->tm[0].c / tms->tm[0].x; divC(tms->tm[1].c, tms->tm[2].c, tms->tm[1].x, tms->tm[2].x, &a, &b); tms->tm[1].cnv_i = - cp->dc1[j] * a; tms->tm[1].cnv_o = - cp->dc2[j] * a; tms->tm[2].cnv_i = - cp->dc1[j] * b; tms->tm[2].cnv_o = - cp->dc2[j] * b; } else for (k = 0; k < 3; k++) { tms->tm[k].cnv_i = - cp->dc1[j] * tms->tm[k].c / tms->tm[k].x; tms->tm[k].cnv_o = - cp->dc2[j] * tms->tm[k].c / tms->tm[k].x; } } } for (j = 0; j < cp->noL; j++) { vi->i_i[j] = vi->i_o[j] = 0.0; vi->v_i[j] = cp->dc1[j]; vi->v_o[j] = cp->dc2[j]; } } vi->next = NULL; cp->vi_tail = vi; cp->vi_head = vi; cp2->vi_tail = vi; cp2->vi_head = vi; } } for (m = 0; m < noL; m++) { *(here->CPLibr1Ibr1[m]) = -1.0; *(here->CPLibr2Ibr2[m]) = -1.0; } for (m = 0; m < noL; m++) { *(here->CPLposIbr1[m]) = 1.0; *(here->CPLnegIbr2[m]) = 1.0; } for (m = 0; m < noL; m++) { for (p = 0; p < noL; p++) { *(here->CPLibr1Pos[m][p]) = cp->h1t[m][p]->aten + h1 * cp->h1C[m][p]; *(here->CPLibr2Neg[m][p]) = cp->h1t[m][p]->aten + h1 * cp->h1C[m][p]; } } k_p = here->CPLibr1; l_p = here->CPLibr2; copy_cp(cp2, cp); if (right_consts(here,cp2, time,time2,h,h1,k_p,l_p,ckt)) { cp2->ext = 1; for (q = 0; q < noL; q++) { cp->ratio[q] = ratio[q]; if (ratio[q] > 0.0) { for (m = 0; m < noL; m++) { for (p = 0; p < noL; p++) { if (cp->h3t[m][p][q]) { f = ratio[q] * (h1 * cp->h3C[m][p][q] + cp->h3t[m][p][q]->aten); *(here->CPLibr1Neg[m][p]) = -f; *(here->CPLibr2Pos[m][p]) = -f; } if (cp->h2t[m][p][q]) { f = ratio[q] * (h1 * cp->h2C[m][p][q] + cp->h2t[m][p][q]->aten); *(here->CPLibr1Ibr2[m][p]) = -f; *(here->CPLibr2Ibr1[m][p]) = -f; } } } } } } else cp->ext = 0; } } return(OK); } static void copy_cp(CPLine *new, CPLine *old) { int i, j, k, l, m; VI_list *temp; new->noL = m = old->noL; new->ext = old->ext; for (i = 0; i < m; i++) { new->ratio[i] = old->ratio[i]; new->taul[i] = old->taul[i]; for (j = 0; j < m; j++) { if (new->h1t[i][j] == NULL) new->h1t[i][j] = TMALLOC(TMS, 1); new->h1t[i][j]->ifImg = old->h1t[i][j]->ifImg; new->h1t[i][j]->aten = old->h1t[i][j]->aten; new->h1C[i][j] = old->h1C[i][j]; for (k = 0; k < 3; k++) { new->h1t[i][j]->tm[k].c = old->h1t[i][j]->tm[k].c; new->h1t[i][j]->tm[k].x = old->h1t[i][j]->tm[k].x; new->h1t[i][j]->tm[k].cnv_i = old->h1t[i][j]->tm[k].cnv_i; new->h1t[i][j]->tm[k].cnv_o = old->h1t[i][j]->tm[k].cnv_o; new->h1e[i][j][k] = old->h1e[i][j][k]; } for (l = 0; l < m; l++) { if (new->h2t[i][j][l] == NULL) new->h2t[i][j][l] = TMALLOC(TMS, 1); new->h2t[i][j][l]->ifImg = old->h2t[i][j][l]->ifImg; new->h2t[i][j][l]->aten = old->h2t[i][j][l]->aten; new->h2C[i][j][l] = old->h2C[i][j][l]; new->h3C[i][j][l] = old->h3C[i][j][l]; for (k = 0; k < 3; k++) { new->h2t[i][j][l]->tm[k].c = old->h2t[i][j][l]->tm[k].c; new->h2t[i][j][l]->tm[k].x = old->h2t[i][j][l]->tm[k].x; new->h2t[i][j][l]->tm[k].cnv_i = old->h2t[i][j][l]->tm[k].cnv_i; new->h2t[i][j][l]->tm[k].cnv_o = old->h2t[i][j][l]->tm[k].cnv_o; } if (new->h3t[i][j][l] == NULL) new->h3t[i][j][l] = TMALLOC(TMS, 1); new->h3t[i][j][l]->ifImg = old->h3t[i][j][l]->ifImg; new->h3t[i][j][l]->aten = old->h3t[i][j][l]->aten; for (k = 0; k < 3; k++) { new->h3t[i][j][l]->tm[k].c = old->h3t[i][j][l]->tm[k].c; new->h3t[i][j][l]->tm[k].x = old->h3t[i][j][l]->tm[k].x; new->h3t[i][j][l]->tm[k].cnv_i = old->h3t[i][j][l]->tm[k].cnv_i; new->h3t[i][j][l]->tm[k].cnv_o = old->h3t[i][j][l]->tm[k].cnv_o; } } } } while (new->vi_head->time < old->vi_head->time) { temp = new->vi_head; new->vi_head = new->vi_head->next; free_vi(temp); } } static int right_consts(CPLinstance *here, CPLine *cp, int t, int time, double h, double h1, int *l1, int *l2, CKTcircuit *ckt) { int i, j, k, l; double e; double ff[MAX_CP_TX_LINES], gg[MAX_CP_TX_LINES]; double v1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double v2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double i1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double i2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double v1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double v2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double i1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double i2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; int ext; int noL; NG_IGNORE(here); noL = cp->noL; for (j = 0; j < noL; j++) { double ff1; ff[j] = 0.0; gg[j] = 0.0; for (k = 0; k < noL; k++) if (cp->h1t[j][k]) { if (cp->h1t[j][k]->ifImg) { double er, ei, a, b, a1, b1; TMS *tms; tms = cp->h1t[j][k]; cp->h1e[j][k][0] = e = exp(tms->tm[0].x * h); expC(tms->tm[1].x, tms->tm[2].x, h, &er, &ei); cp->h1e[j][k][1] = er; cp->h1e[j][k][2] = ei; ff1 = tms->tm[0].c * e * h1; ff[j] -= tms->tm[0].cnv_i * e; gg[j] -= tms->tm[0].cnv_o * e; ff[j] -= ff1 * cp->in_node[k]->V; gg[j] -= ff1 * cp->out_node[k]->V; multC(tms->tm[1].c, tms->tm[2].c, er, ei, &a1, &b1); multC(tms->tm[1].cnv_i, tms->tm[2].cnv_i, er, ei, &a, &b); ff[j] -= 2.0 * (a1 * h1 * cp->in_node[k]->V + a); multC(tms->tm[1].cnv_o, tms->tm[2].cnv_o, er, ei, &a, &b); gg[j] -= 2.0 * (a1 * h1 * cp->out_node[k]->V + a); } else { ff1 = 0.0; for (i = 0; i < 3; i++) { cp->h1e[j][k][i] = e = exp(cp->h1t[j][k]->tm[i].x * h); ff1 -= cp->h1t[j][k]->tm[i].c * e; ff[j] -= cp->h1t[j][k]->tm[i].cnv_i * e; gg[j] -= cp->h1t[j][k]->tm[i].cnv_o * e; } ff[j] += ff1 * h1 * cp->in_node[k]->V; gg[j] += ff1 * h1 * cp->out_node[k]->V; } } } ext = get_pvs_vi(t, time, cp, v1_i, v2_i, i1_i, i2_i, v1_o, v2_o, i1_o, i2_o); for (j = 0; j < noL; j++) { /** current eqn **/ TERM *tm; for (k = 0; k < noL; k++) /** node voltage **/ for (l = 0; l < noL; l++) /** different mode **/ if (cp->h3t[j][k][l]) { if (cp->h3t[j][k][l]->ifImg) { double er, ei, a, b, a1, b1, a2, b2; TMS *tms; tms = cp->h3t[j][k][l]; expC(tms->tm[1].x, tms->tm[2].x, h, &er, &ei); a2 = h1 * tms->tm[1].c; b2 = h1 * tms->tm[2].c; a = tms->tm[1].cnv_i; b = tms->tm[2].cnv_i; multC(a, b, er, ei, &a, &b); multC(a2, b2, v1_i[l][k] * er + v2_i[l][k], v1_i[l][k] * ei, &a1, &b1); tms->tm[1].cnv_i = a + a1; tms->tm[2].cnv_i = b + b1; a = tms->tm[1].cnv_o; b = tms->tm[2].cnv_o; multC(a, b, er, ei, &a, &b); multC(a2, b2, v1_o[l][k] * er + v2_o[l][k], v1_o[l][k] * ei, &a1, &b1); tms->tm[1].cnv_o = a + a1; tms->tm[2].cnv_o = b + b1; tm = &(tms->tm[0]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (v1_i[l][k] * e + v2_i[l][k]); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (v1_o[l][k] * e + v2_o[l][k]); ff[j] += tms->aten * v2_o[l][k] + tm->cnv_o + 2.0 * tms->tm[1].cnv_o; gg[j] += tms->aten * v2_i[l][k] + tm->cnv_i + 2.0 * tms->tm[1].cnv_i; } else { for (i = 0; i < 3; i++) { /** 3 poles **/ tm = &(cp->h3t[j][k][l]->tm[i]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (v1_i[l][k] * e + v2_i[l][k]); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (v1_o[l][k] * e + v2_o[l][k]); ff[j] += tm->cnv_o; gg[j] += tm->cnv_i; } ff[j] += cp->h3t[j][k][l]->aten * v2_o[l][k]; gg[j] += cp->h3t[j][k][l]->aten * v2_i[l][k]; } } for (k = 0; k < noL; k++) /** line current **/ for (l = 0; l < noL; l++) /** different mode **/ if (cp->h2t[j][k][l]) { if (cp->h2t[j][k][l]->ifImg) { double er, ei, a, b, a1, b1, a2, b2; TMS *tms; tms = cp->h2t[j][k][l]; expC(tms->tm[1].x, tms->tm[2].x, h, &er, &ei); a2 = h1 * tms->tm[1].c; b2 = h1 * tms->tm[2].c; a = tms->tm[1].cnv_i; b = tms->tm[2].cnv_i; multC(a, b, er, ei, &a, &b); multC(a2, b2, i1_i[l][k] * er + i2_i[l][k], i1_i[l][k] * ei, &a1, &b1); tms->tm[1].cnv_i = a + a1; tms->tm[2].cnv_i = b + b1; a = tms->tm[1].cnv_o; b = tms->tm[2].cnv_o; multC(a, b, er, ei, &a, &b); multC(a2, b2, i1_o[l][k] * er + i2_o[l][k], i1_o[l][k] * ei, &a1, &b1); tms->tm[1].cnv_o = a + a1; tms->tm[2].cnv_o = b + b1; tm = &(tms->tm[0]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (i1_i[l][k] * e + i2_i[l][k]); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (i1_o[l][k] * e + i2_o[l][k]); ff[j] += tms->aten * i2_o[l][k] + tm->cnv_o + 2.0 * tms->tm[1].cnv_o; gg[j] += tms->aten * i2_i[l][k] + tm->cnv_i + 2.0 * tms->tm[1].cnv_i; } else { for (i = 0; i < 3; i++) { /** 3 poles **/ tm = &(cp->h2t[j][k][l]->tm[i]); e = exp(tm->x * h); tm->cnv_i = tm->cnv_i * e + h1 * tm->c * (i1_i[l][k] * e + i2_i[l][k]); tm->cnv_o = tm->cnv_o * e + h1 * tm->c * (i1_o[l][k] * e + i2_o[l][k]); ff[j] += tm->cnv_o; gg[j] += tm->cnv_i; } ff[j] += cp->h2t[j][k][l]->aten * i2_o[l][k]; gg[j] += cp->h2t[j][k][l]->aten * i2_i[l][k]; } } } for (i = 0; i < noL; i++) { *(ckt->CKTrhs + l1[i]) = ff[i]; *(ckt->CKTrhs + l2[i]) = gg[i]; } return(ext); } static int update_cnv(CPLine *cp, double h) { int i, j, k; int noL; double ai, bi, ao, bo; double e, t; TMS *tms; TERM *tm; noL = cp->noL; for (j = 0; j < noL; j++) for (k = 0; k < noL; k++) { ai = cp->in_node[k]->V; ao = cp->out_node[k]->V; bi = cp->in_node[k]->dv; bo = cp->out_node[k]->dv; if (cp->h1t[j][k]) { if (cp->h1t[j][k]->ifImg) { tms = cp->h1t[j][k]; if (tms == NULL) continue; tm = &(tms->tm[0]); e = cp->h1e[j][k][0]; t = tm->c / tm->x; update_cnv_a(tms, h, ai, ao, ai - bi * h, ao - bo * h, cp->h1e[j][k][1], cp->h1e[j][k][2]); bi *= t; bo *= t; tm->cnv_i = (tm->cnv_i - bi*h) * e + (e - 1.0)*(ai*t + 1.0e+12*bi/tm->x); tm->cnv_o = (tm->cnv_o - bo*h) * e + (e - 1.0)*(ao*t + 1.0e+12*bo/tm->x); } else for (i = 0; i < 3; i++) { tm = &(cp->h1t[j][k]->tm[i]); e = cp->h1e[j][k][i]; t = tm->c / tm->x; bi *= t; bo *= t; tm->cnv_i = (tm->cnv_i - bi*h) * e + (e - 1.0)*(ai*t + 1.0e+12*bi/tm->x); tm->cnv_o = (tm->cnv_o - bo*h) * e + (e - 1.0)*(ao*t + 1.0e+12*bo/tm->x); } } } return 0; } static VI_list *new_vi(void) { VI_list *q; if (pool_vi) { q = pool_vi; pool_vi = pool_vi->pool; return(q); } else return(TMALLOC(VI_list, 1)); } static void free_vi(VI_list *q) { q->pool = pool_vi; pool_vi = q; } static int add_new_vi(CPLinstance *here, CKTcircuit *ckt, int time) { VI_list *vi; int i, noL; CPLine *cp, *cp2; cp = here->cplines; cp2 = here->cplines2; vi = new_vi(); vi->time = time; noL = cp->noL; for (i = 0; i < noL; i++) { /* vi->v_i[i] = cp->in_node[i]->V; vi->v_o[i] = cp->out_node[i]->V; */ vi->v_i[i] = *(ckt->CKTrhsOld + here->CPLposNodes[i]); vi->v_o[i] = *(ckt->CKTrhsOld + here->CPLnegNodes[i]); vi->i_i[i] = *(ckt->CKTrhsOld + here->CPLibr1[i]); vi->i_o[i] = *(ckt->CKTrhsOld + here->CPLibr2[i]); } cp->vi_tail->next = vi; cp2->vi_tail->next = vi; vi->next = NULL; cp->vi_tail = vi; cp2->vi_tail = vi; return(1); } static int get_pvs_vi(int t1, int t2, CPLine *cp, double v1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i1_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i2_i[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double v2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i1_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES], double i2_o[MAX_CP_TX_LINES][MAX_CP_TX_LINES]) { double ta[MAX_CP_TX_LINES], tb[MAX_CP_TX_LINES]; VI_list *vi, *vi1; double f; int i, j; int mini = -1; double minta = 123456789.0; int ext = 0; int noL; noL = cp->noL; for (i = 0; i < noL; i++) { ta[i] = t1 - cp->taul[i]; tb[i] = t2 - cp->taul[i]; if (ta[i] < minta) { minta = ta[i]; mini = i; } } for (i = 0; i < noL; i++) { ratio[i] = 0.0; if (tb[i] <= 0) { for (j = 0; j < noL; j++) { i1_i[i][j] = i2_i[i][j] = i1_o[i][j] = i2_o[i][j] = 0.0; v1_i[i][j] = v2_i[i][j] = cp->dc1[j]; v1_o[i][j] = v2_o[i][j] = cp->dc2[j]; } } else { if (ta[i] <= 0) { for (j = 0; j < noL; j++) { i1_i[i][j] = i1_o[i][j] = 0.0; v1_i[i][j] = cp->dc1[j]; v1_o[i][j] = cp->dc2[j]; } vi1 = cp->vi_head; vi = vi1->next; } else { vi1 = cp->vi_head; for (vi = vi1->next; vi->time < ta[i]; ) { /* if (i == mini) free_vi(vi1); */ vi1 = vi; /* new */ vi = vi->next; if (vi == NULL) goto errordetect; } f = (ta[i] - vi1->time) / (vi->time - vi1->time); for (j = 0; j < noL; j++) { v1_i[i][j] = vi1->v_i[j] + f * (vi->v_i[j] - vi1->v_i[j]); v1_o[i][j] = vi1->v_o[j] + f * (vi->v_o[j] - vi1->v_o[j]); i1_i[i][j] = vi1->i_i[j] + f * (vi->i_i[j] - vi1->i_i[j]); i1_o[i][j] = vi1->i_o[j] + f * (vi->i_o[j] - vi1->i_o[j]); } if (i == mini) cp->vi_head = vi1; } if (tb[i] > t1) { /* fprintf(stderr, "pvs: time = %d\n", t2); */ ext = 1; ratio[i] = f = (tb[i] - t1) / (t2 - t1); if (vi) for (; vi->next; vi = vi->next) ; else vi = vi1; f = 1 - f; for (j = 0; j < noL; j++) { v2_i[i][j] = vi->v_i[j] * f; v2_o[i][j] = vi->v_o[j] * f; i2_i[i][j] = vi->i_i[j] * f; i2_o[i][j] = vi->i_o[j] * f; } } else { for (; vi->time < tb[i];) { vi1 = vi; /* new */ vi = vi->next; if (vi == NULL) goto errordetect; } f = (tb[i] - vi1->time) / (vi->time - vi1->time); for (j = 0; j < noL; j++) { v2_i[i][j] = vi1->v_i[j] + f * (vi->v_i[j] - vi1->v_i[j]); v2_o[i][j] = vi1->v_o[j] + f * (vi->v_o[j] - vi1->v_o[j]); i2_i[i][j] = vi1->i_i[j] + f * (vi->i_i[j] - vi1->i_i[j]); i2_o[i][j] = vi1->i_o[j] + f * (vi->i_o[j] - vi1->i_o[j]); } } } } return(ext); errordetect: fprintf(stderr, "your maximum time step is too large for tau.\n"); fprintf(stderr, "decrease max time step in .tran card and try again\n"); controlled_exit(0); return(0); } static int update_delayed_cnv(CPLine *cp, double h) { int i, j, k; double *ratio; double f; VI_list *vi; TMS *tms; int noL; h *= 0.5e-12; ratio = cp->ratio; vi = cp->vi_tail; noL = cp->noL; for (k = 0; k < noL; k++) /* mode */ if (ratio[k] > 0.0) for (i = 0; i < noL; i++) /* current eqn */ for (j = 0; j < noL; j++) { tms = cp->h3t[i][j][k]; if (tms == NULL) continue; f = h * ratio[k] * vi->v_i[j]; tms->tm[0].cnv_i += f * tms->tm[0].c; tms->tm[1].cnv_i += f * tms->tm[1].c; tms->tm[2].cnv_i += f * tms->tm[2].c; f = h * ratio[k] * vi->v_o[j]; tms->tm[0].cnv_o += f * tms->tm[0].c; tms->tm[1].cnv_o += f * tms->tm[1].c; tms->tm[2].cnv_o += f * tms->tm[2].c; tms = cp->h2t[i][j][k]; f = h * ratio[k] * vi->i_i[j]; tms->tm[0].cnv_i += f * tms->tm[0].c; tms->tm[1].cnv_i += f * tms->tm[1].c; tms->tm[2].cnv_i += f * tms->tm[2].c; f = h * ratio[k] * vi->i_o[j]; tms->tm[0].cnv_o += f * tms->tm[0].c; tms->tm[1].cnv_o += f * tms->tm[1].c; tms->tm[2].cnv_o += f * tms->tm[2].c; } return(1); } static int expC(double ar, double ai, double h, double *cr, double *ci) { double e, cs, si; e = exp(ar * h); cs = cos(ai * h); si = sin(ai * h); *cr = e * cs; *ci = e * si; return(1); } static int multC(double ar, double ai, double br, double bi, double *cr, double *ci) { double tp; tp = ar*br - ai*bi; *ci = ar*bi+ai*br; *cr = tp; return (1); } static void update_cnv_a(TMS *tms, double h, double ai, double ao, double bi, double bo, double er, double ei) { double a, b, a1, b1; h *= 0.5e-12; multC(tms->tm[1].c, tms->tm[2].c, er, ei, &a1, &b1); multC(tms->tm[1].cnv_i, tms->tm[2].cnv_i, er, ei, &a, &b); tms->tm[1].cnv_i = a + h * (a1 * bi + ai * tms->tm[1].c); tms->tm[2].cnv_i = b + h * (b1 * bi + ai * tms->tm[2].c); multC(tms->tm[1].cnv_o, tms->tm[2].cnv_o, er, ei, &a, &b); tms->tm[1].cnv_o = a + h * (a1 * bo + ao * tms->tm[1].c); tms->tm[2].cnv_o = b + h * (b1 * bo + ao * tms->tm[2].c); } static int divC(double ar, double ai, double br, double bi, double *cr, double *ci) { double t; t = br*br + bi*bi; *cr = (ar*br + ai*bi) / t; *ci = (ai*br - ar*bi) / t; return(1); } ngspice-26/src/spicelib/devices/cpl/cpldefs.h0000644000265600020320000000477012264261473020613 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. **********/ #ifndef CPL #define CPL #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" #include "ngspice/swec.h" /* information used to describe a single instance */ typedef struct sCPLinstance { struct sCPLmodel *CPLmodPtr; /* backpointer to model */ struct sCPLinstance *CPLnextInstance; /* pointer to next instance of * current model*/ IFuid CPLname; /* pointer to character string naming this instance */ int CPLstate; /* not used */ int *CPLposNodes; int *CPLnegNodes; int dimension; double CPLlength; int *CPLibr1; int *CPLibr2; CPLine *cplines; /* pointer to SWEC cplines type */ CPLine *cplines2; /* temporary pointer to SWEC cplines type */ char **in_node_names; char **out_node_names; double **CPLibr1Ibr1; double **CPLibr2Ibr2; double **CPLposIbr1; double **CPLnegIbr2; /* trial */ double **CPLposPos; double **CPLnegNeg; double **CPLposNeg; double **CPLnegPos; double ***CPLibr1Pos; double ***CPLibr2Neg; double ***CPLibr1Neg; double ***CPLibr2Pos; double ***CPLibr1Ibr2; double ***CPLibr2Ibr1; unsigned CPLibr1Given : 1; unsigned CPLibr2Given : 1; unsigned CPLdcGiven : 1; unsigned CPLlengthGiven : 1; } CPLinstance ; /* per model data */ typedef struct sCPLmodel { /* model structure for a cpl */ int CPLmodType; /* type index of this device type */ struct sCPLmodel *CPLnextModel; /* pointer to next possible model in * linked list */ CPLinstance * CPLinstances; /* pointer to list of instances that have this * model */ IFuid CPLmodName; /* pointer to character string naming this model */ double *Rm; int Rm_counter; double *Gm; int Gm_counter; double *Lm; int Lm_counter; double *Cm; int Cm_counter; double length; unsigned Rmgiven : 1; unsigned Lmgiven : 1; unsigned Gmgiven : 1; unsigned Cmgiven : 1; unsigned lengthgiven : 1; } CPLmodel; /* instance parameters */ #define CPL_POS_NODE 1 #define CPL_NEG_NODE 2 #define CPL_DIM 3 #define CPL_LENGTH 4 /* model parameters */ #define CPL_R 101 #define CPL_C 102 #define CPL_G 103 #define CPL_L 104 #define CPL_length 105 #define CPL_MOD_R 106 #include "cplext.h" extern VI_list *pool_vi; #endif /*CPL*/ ngspice-26/src/spicelib/devices/cpl/Makefile.am0000644000265600020320000000066312264261473021053 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcpl.la libcpl_la_SOURCES = \ cpl.c \ cplask.c \ cpldefs.h \ cpldest.c \ cplext.h \ cplinit.h \ cplitf.h \ cplmask.c \ cplmdel.c \ cplparam.c \ cpldel.c \ cplload.c \ cplmpar.c \ cplsetup.c \ cplinit.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/cpl/Makefile.in0000644000265600020320000004154712264261536021072 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/cpl DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcpl_la_LIBADD = am_libcpl_la_OBJECTS = cpl.lo cplask.lo cpldest.lo cplmask.lo \ cplmdel.lo cplparam.lo cpldel.lo cplload.lo cplmpar.lo \ cplsetup.lo cplinit.lo libcpl_la_OBJECTS = $(am_libcpl_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcpl_la_SOURCES) DIST_SOURCES = $(libcpl_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcpl.la libcpl_la_SOURCES = \ cpl.c \ cplask.c \ cpldefs.h \ cpldest.c \ cplext.h \ cplinit.h \ cplitf.h \ cplmask.c \ cplmdel.c \ cplparam.c \ cpldel.c \ cplload.c \ cplmpar.c \ cplsetup.c \ cplinit.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/cpl/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/cpl/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcpl.la: $(libcpl_la_OBJECTS) $(libcpl_la_DEPENDENCIES) $(EXTRA_libcpl_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcpl_la_OBJECTS) $(libcpl_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpldel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cpldest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cplsetup.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/cpl/cplmdel.c0000644000265600020320000000173712264261473020606 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int CPLmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { CPLmodel **model = (CPLmodel **)inModel; CPLmodel *modfast = (CPLmodel *)kill; CPLinstance *here; CPLinstance *prev = NULL; CPLmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->CPLnextModel)) { if( (*model)->CPLmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->CPLnextModel; /* cut deleted device out of list */ for(here = (*model)->CPLinstances ; here ; here = here->CPLnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/cpl/cpl.c0000644000265600020320000000225312264261473017736 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "cpldefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" IFparm CPLpTable[] = { IOPU("pos_nodes", CPL_POS_NODE, IF_VECTOR|IF_STRING, "in nodes"), IOPU("neg_nodes", CPL_NEG_NODE, IF_VECTOR|IF_STRING, "out nodes"), IOP("dimension", CPL_DIM, IF_INTEGER, "number of coupled lines"), IOP("length", CPL_LENGTH, IF_REAL, "length of lines"), }; IFparm CPLmPTable[] = { /* model parameters */ IOP( "r", CPL_R, IF_REALVEC,"resistance per length"), IOP( "l", CPL_L, IF_REALVEC,"inductance per length"), IOP( "c", CPL_C, IF_REALVEC,"capacitance per length"), IOP( "g", CPL_G, IF_REALVEC,"conductance per length"), IOP( "length", CPL_length, IF_REAL,"length"), IP( "cpl", CPL_MOD_R, IF_FLAG,"Device is a cpl model"), }; char *CPLnames[] = { "P+", "P-" }; int CPLnSize = NUMELEMS(CPLnames); int CPLiSize = sizeof(CPLinstance); int CPLmSize = sizeof(CPLmodel); int CPLmPTSize = NUMELEMS(CPLmPTable); int CPLpTSize = NUMELEMS(CPLpTable); ngspice-26/src/spicelib/devices/cpl/cplitf.h0000644000265600020320000000010712264261473020442 0ustar andreasadmin#ifndef DEV_CPL #define DEV_CPL SPICEdev *get_cpl_info(void); #endif ngspice-26/src/spicelib/devices/cpl/cplparam.c0000644000265600020320000000165112264261473020760 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int CPLparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { CPLinstance *here = (CPLinstance *)inst; NG_IGNORE(select); switch(param) { case CPL_POS_NODE: here->in_node_names = value->v.vec.sVec; break; case CPL_NEG_NODE: here->out_node_names = value->v.vec.sVec; break; case CPL_DIM: here->dimension = value->iValue; break; case CPL_LENGTH: here->CPLlength = value->rValue; here->CPLlengthGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/cpl/cplsetup.c0000644000265600020320000015665312264261473021035 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough Modified: 2004 Paolo Nenzi - (ng)spice integration **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "cpldefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/multi_line.h" #include "ngspice/fteext.h" /* controlled_exit() */ #define VECTOR_ALLOC(vec, n) { \ vec = TMALLOC(double *, n); \ } #define MATRIX_ALLOC(mat, m, j) { \ int k; \ mat = TMALLOC(double **, m); \ for (k = 0; k < m; k++) { \ VECTOR_ALLOC(mat[k], j); \ } \ } #define VECTOR_FREE(vec) free(vec) #define MATRIX_FREE(mat, m, j) { \ int k; \ for (k = 0; k < m; k++) { \ free(mat[k]); \ } \ free(mat); \ } #define MAX_DEG 8 #define epsilon 1.0e-88 #define MAX_STRING 128 static double ZY[MAX_DIM][MAX_DIM]; static double Sv[MAX_DIM][MAX_DIM]; static double D[MAX_DIM]; static double Y5[MAX_DIM][MAX_DIM]; static double Y5_1[MAX_DIM][MAX_DIM]; static double Sv_1[MAX_DIM][MAX_DIM]; static double R_m[MAX_DIM][MAX_DIM]; static double G_m[MAX_DIM][MAX_DIM]; static double L_m[MAX_DIM][MAX_DIM]; static double C_m[MAX_DIM][MAX_DIM]; static double length; static double TAU[MAX_DIM]; static double A[MAX_DIM][2*MAX_DIM]; static double frequency[MAX_DEG]; static double Si[MAX_DIM][MAX_DIM]; static double Si_1[MAX_DIM][MAX_DIM]; /* MacLaurin Series */ static double *SiSv_1[MAX_DIM][MAX_DIM]; static double *Sip[MAX_DIM][MAX_DIM]; static double *Si_1p[MAX_DIM][MAX_DIM]; static double *Sv_1p[MAX_DIM][MAX_DIM]; static double *W[MAX_DIM]; static Mult_Out IWI[MAX_DIM][MAX_DIM]; static Mult_Out IWV[MAX_DIM][MAX_DIM]; static Single_Out SIV[MAX_DIM][MAX_DIM]; static double At[4][4]; static double Scaling_F; static double Scaling_F2; /* misc.c match */ static void new_memory(int, int, int); static double *vector(int, int); static void free_vector(double*, int, int); static void polint(double*, double*, int, double, double*, double*); static int match(int, double*, double*, double*); /* static int match_x(int, double*, double*, double*); */ static int Gaussian_Elimination2(int, int); static void eval_Si_Si_1(int, double); static void loop_ZY(int, double); static void poly_matrix(double *A[MAX_DIM][MAX_DIM], int dim, int deg); /* static int checkW(double*, double); */ static void poly_W(int, int); static void eval_frequency(int, int); static void store(int, int); static void store_SiSv_1(int, int); /*static int check(); quale è il prototipo ?*/ static int coupled(int); static int generate_out(int, int); static int ReadCpL(CPLinstance*, CKTcircuit*); /* static int divC(double, double, double, double, double*, double*); */ /* mult */ static void mult_p(double*, double*, double*, int, int, int); static void matrix_p_mult(double *A[MAX_DIM][MAX_DIM], double *D[MAX_DIM], double *B[MAX_DIM][MAX_DIM], int dim, int deg, int deg_o, Mult_Out X[MAX_DIM][MAX_DIM]); static double approx_mode(double*, double*, double); static double eval2(double, double, double, double); static int get_c(double, double, double, double, double, double, double, double*, double*); static int Pade_apx(double, double*, double*, double*, double*, double*, double*, double*); static int Gaussian_Elimination(int); static double root3(double, double, double, double); static int div3(double, double, double, double, double*, double*); static int find_roots(double, double, double, double*, double*, double*); static NODE* insert_node(char*); static NDnamePt insert_ND(char*, NDnamePt*); static NODE* NEW_node(void); static NDnamePt ndn; static NODE *node_tab; #define epsi_mult 1e-28 /* diag */ static MAXE_PTR sort(MAXE_PTR, double, int, int, MAXE_PTR); static void ordering(void); static MAXE_PTR delete_1(MAXE_PTR*, int); static void reordering(int, int); static void diag(int); static int rotate(int, int, int); #define epsi 1.0e-16 static char *message = "tau of coupled lines is larger than max time step"; /* ARGSUSED */ int CPLsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) { CPLmodel *model = (CPLmodel *)inModel; CPLinstance *here; CKTnode *tmp, *node; int error, m, p; char **branchname; int noL; NG_IGNORE(state); /* loop through all the models */ for( ; model != NULL; model = model->CPLnextModel ) { if (!model->Rmgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line series resistance not given", &(model->CPLmodName)); return(E_BADPARM); } if (!model->Gmgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line parallel conductance not given", &(model->CPLmodName)); return(E_BADPARM); } if (!model->Lmgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line series inductance not given", &(model->CPLmodName)); return (E_BADPARM); } if (!model->Cmgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line parallel capacitance not given", &(model->CPLmodName)); return (E_BADPARM); } if (!model->lengthgiven) { SPfrontEnd->IFerror (ERR_FATAL, "model %s: lossy line length must be given", &(model->CPLmodName)); return (E_BADPARM); } /* loop through all the instances of the model */ for (here = model->CPLinstances; here != NULL ; here=here->CPLnextInstance) { if (!here->CPLlengthGiven) here->CPLlength=0.0; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) noL = here->dimension; here->CPLposNodes = TMALLOC(int, noL); here->CPLnegNodes = TMALLOC(int, noL); here->CPLibr1 = TMALLOC(int, noL); here->CPLibr2 = TMALLOC(int, noL); VECTOR_ALLOC(here->CPLibr1Ibr1, noL); VECTOR_ALLOC(here->CPLibr2Ibr2, noL); VECTOR_ALLOC(here->CPLposIbr1, noL); VECTOR_ALLOC(here->CPLnegIbr2, noL); VECTOR_ALLOC(here->CPLposPos, noL); VECTOR_ALLOC(here->CPLnegNeg, noL); VECTOR_ALLOC(here->CPLnegPos, noL); VECTOR_ALLOC(here->CPLposNeg, noL); MATRIX_ALLOC(here->CPLibr1Pos, noL, noL); MATRIX_ALLOC(here->CPLibr2Neg, noL, noL); MATRIX_ALLOC(here->CPLibr1Neg, noL, noL); MATRIX_ALLOC(here->CPLibr2Pos, noL, noL); MATRIX_ALLOC(here->CPLibr1Ibr2, noL, noL); MATRIX_ALLOC(here->CPLibr2Ibr1, noL, noL); branchname = TMALLOC(char *, here->dimension); if (! here->CPLibr1Given) { for (m = 0; m < here->dimension; m++) { branchname[m] = TMALLOC(char, MAX_STRING); sprintf(branchname[m], "branch1_%d", m); error = CKTmkCur(ckt, &tmp, here->CPLname, branchname[m]); if (error) return (error); here->CPLibr1[m] = tmp->number; tfree(branchname[m]); } here->CPLibr1Given = 1; } free(branchname); branchname = TMALLOC(char *, here->dimension); if (! here->CPLibr2Given) { for (m = 0; m < here->dimension; m++) { branchname[m] = TMALLOC(char, MAX_STRING); sprintf(branchname[m], "branch2_%d", m); error = CKTmkCur(ckt, &tmp, here->CPLname, branchname[m]); if (error) return (error); here->CPLibr2[m] = tmp->number; tfree(branchname[m]); } here->CPLibr2Given = 1; } free(branchname); for (m = 0; m < here->dimension; m++) { for (node = ckt->CKTnodes; node; node = node->next) { if (strcmp(here->in_node_names[m], node->name) == 0) { here->CPLposNodes[m] = node->number; } } } for (m = 0; m < here->dimension; m++) { for (node = ckt->CKTnodes; node; node = node->next) { if (strcmp(here->out_node_names[m], node->name) == 0) { here->CPLnegNodes[m] = node->number; } } } for (m = 0; m < here->dimension; m++) { TSTALLOC(CPLibr1Ibr1[m],CPLibr1[m],CPLibr1[m]); TSTALLOC(CPLibr2Ibr2[m],CPLibr2[m],CPLibr2[m]); TSTALLOC(CPLposIbr1[m],CPLposNodes[m],CPLibr1[m]); TSTALLOC(CPLnegIbr2[m],CPLnegNodes[m],CPLibr2[m]); TSTALLOC(CPLposPos[m],CPLposNodes[m],CPLposNodes[m]); TSTALLOC(CPLnegNeg[m],CPLnegNodes[m],CPLnegNodes[m]); TSTALLOC(CPLnegPos[m],CPLnegNodes[m],CPLposNodes[m]); TSTALLOC(CPLposNeg[m],CPLposNodes[m],CPLnegNodes[m]); for (p = 0; p < here->dimension; p++) { TSTALLOC(CPLibr1Pos[m][p],CPLibr1[m],CPLposNodes[p]); TSTALLOC(CPLibr2Neg[m][p],CPLibr2[m],CPLnegNodes[p]); TSTALLOC(CPLibr1Neg[m][p],CPLibr1[m],CPLnegNodes[p]); TSTALLOC(CPLibr2Pos[m][p],CPLibr2[m],CPLposNodes[p]); TSTALLOC(CPLibr1Ibr2[m][p],CPLibr1[m],CPLibr2[p]); TSTALLOC(CPLibr2Ibr1[m][p],CPLibr2[m],CPLibr1[p]); } } ReadCpL(here, ckt); } } return(OK); } int CPLunsetup(GENmodel *inModel, CKTcircuit *ckt) { CPLmodel *model; CPLinstance *here; int m; int noL; for (model = (CPLmodel *) inModel; model != NULL; model = model->CPLnextModel) { for (here = model->CPLinstances; here != NULL; here = here->CPLnextInstance) { noL = here->dimension; VECTOR_FREE(here->CPLibr1Ibr1); VECTOR_FREE(here->CPLibr2Ibr2); VECTOR_FREE(here->CPLposIbr1); VECTOR_FREE(here->CPLnegIbr2); VECTOR_FREE(here->CPLposPos); VECTOR_FREE(here->CPLnegNeg); VECTOR_FREE(here->CPLnegPos); VECTOR_FREE(here->CPLposNeg); MATRIX_FREE(here->CPLibr1Pos, noL, noL); MATRIX_FREE(here->CPLibr2Neg, noL, noL); MATRIX_FREE(here->CPLibr1Neg, noL, noL); MATRIX_FREE(here->CPLibr2Pos, noL, noL); MATRIX_FREE(here->CPLibr1Ibr2, noL, noL); MATRIX_FREE(here->CPLibr2Ibr1, noL, noL); for (m = 0; m < noL; m++) { if (here->CPLibr1[m]) { CKTdltNNum(ckt, here->CPLibr1[m]); here->CPLibr1[m] = 0; } } for (m = 0; m < noL; m++) { if (here->CPLibr2[m]) { CKTdltNNum(ckt, here->CPLibr2[m]); here->CPLibr2[m] = 0; } } free(here->CPLposNodes); free(here->CPLnegNodes); free(here->CPLibr1); free(here->CPLibr2); /* reset switches */ here->CPLdcGiven=0; here->CPLibr1Given = 0; here->CPLibr2Given = 0; } } return OK; } static int ReadCpL(CPLinstance *here, CKTcircuit *ckt) { int i, j, noL, counter; double f; char *name; CPLine *c, *c2; ECPLine *ec; NODE *nd; RLINE *lines[MAX_CP_TX_LINES]; ERLINE *er; c = TMALLOC(CPLine, 1); c2 = TMALLOC(CPLine, 1); c->vi_head = c->vi_tail = NULL; noL = c->noL = here->dimension; here->cplines = c; here->cplines2 = c2; for (i = 0; i < noL; i++) { ec = TMALLOC(ECPLine, 1); name = here->in_node_names[i]; nd = insert_node(name); ec->link = nd->cplptr; nd->cplptr = ec; ec->line = c; c->in_node[i] = nd; c2->in_node[i] = nd; er = TMALLOC(ERLINE, 1); er->link = nd->rlptr; nd->rlptr = er; er->rl = lines[i] = TMALLOC(RLINE, 1); er->rl->in_node = nd; c->dc1[i] = c->dc2[i] = 0.0; } for (i = 0; i < noL; i++) { ec = TMALLOC(ECPLine, 1); name = here->out_node_names[i]; nd = insert_node(name); ec->link = nd->cplptr; nd->cplptr = ec; ec->line = c; c->out_node[i] = nd; c2->out_node[i] = nd; er = TMALLOC(ERLINE, 1); er->link = nd->rlptr; nd->rlptr = er; er->rl = lines[i]; er->rl->out_node = nd; } counter = 0; for (i = 0; i < noL; i++) { for (j = 0; j < noL; j++) { if (i > j) { R_m[i][j] = R_m[j][i]; G_m[i][j] = G_m[j][i]; C_m[i][j] = C_m[j][i]; L_m[i][j] = L_m[j][i]; } else { f = here->CPLmodPtr->Rm[counter]; R_m[i][j] = here->CPLmodPtr->Rm[counter] = MAX(f, 1.0e-4); G_m[i][j] = here->CPLmodPtr->Gm[counter]; L_m[i][j] = here->CPLmodPtr->Lm[counter]; C_m[i][j] = here->CPLmodPtr->Cm[counter]; counter++; } } } if (here->CPLlengthGiven) length = here->CPLlength; else length = here->CPLmodPtr->length; for (i = 0; i < noL; i++) lines[i]->g = 1.0 / (R_m[i][i] * length); coupled(noL); for (i = 0; i < noL; i++) { double d, t; int k; c->taul[i] = TAU[i] * 1.0e+12; for (j = 0; j < noL; j++) { if (SIV[i][j].C_0 == 0.0) c->h1t[i][j] = NULL; else { c->h1t[i][j] = TMALLOC(TMS, 1); d = c->h1t[i][j]->aten = SIV[i][j].C_0; c->h1t[i][j]->ifImg = (int) (SIV[i][j].Poly[6] - 1.0); /* since originally 2 for img 1 for noimg */ c->h1t[i][j]->tm[0].c = SIV[i][j].Poly[0] * d; c->h1t[i][j]->tm[1].c = SIV[i][j].Poly[1] * d; c->h1t[i][j]->tm[2].c = SIV[i][j].Poly[2] * d; c->h1t[i][j]->tm[0].x = SIV[i][j].Poly[3]; c->h1t[i][j]->tm[1].x = SIV[i][j].Poly[4]; c->h1t[i][j]->tm[2].x = SIV[i][j].Poly[5]; if (c->h1t[i][j]->ifImg) c->h1C[i][j] = c->h1t[i][j]->tm[0].c + 2.0 * c->h1t[i][j]->tm[1].c; else { t = 0.0; for (k = 0; k < 3; k++) t += c->h1t[i][j]->tm[k].c; c->h1C[i][j] = t; } } for (k = 0; k < noL; k++) { if (IWI[i][j].C_0[k] == 0.0) c->h2t[i][j][k] = NULL; else { c->h2t[i][j][k] = TMALLOC(TMS, 1); d = c->h2t[i][j][k]->aten = IWI[i][j].C_0[k]; c->h2t[i][j][k]->ifImg = (int) (IWI[i][j].Poly[k][6] - 1.0); /* since originally 2 for img 1 for noimg */ c->h2t[i][j][k]->tm[0].c = IWI[i][j].Poly[k][0] * d; c->h2t[i][j][k]->tm[1].c = IWI[i][j].Poly[k][1] * d; c->h2t[i][j][k]->tm[2].c = IWI[i][j].Poly[k][2] * d; c->h2t[i][j][k]->tm[0].x = IWI[i][j].Poly[k][3]; c->h2t[i][j][k]->tm[1].x = IWI[i][j].Poly[k][4]; c->h2t[i][j][k]->tm[2].x = IWI[i][j].Poly[k][5]; if (c->h2t[i][j][k]->ifImg) c->h2C[i][j][k] = c->h2t[i][j][k]->tm[0].c + 2.0 * c->h2t[i][j][k]->tm[1].c; else c->h2C[i][j][k] = c->h2t[i][j][k]->tm[0].c + c->h2t[i][j][k]->tm[1].c + c->h2t[i][j][k]->tm[2].c; } if (IWV[i][j].C_0[k] == 0.0) c->h3t[i][j][k] = NULL; else { c->h3t[i][j][k] = TMALLOC(TMS, 1); d = c->h3t[i][j][k]->aten = IWV[i][j].C_0[k]; c->h3t[i][j][k]->ifImg = (int) (IWV[i][j].Poly[k][6] - 1.0); /* since originally 2 for img 1 for noimg */ c->h3t[i][j][k]->tm[0].c = IWV[i][j].Poly[k][0] * d; c->h3t[i][j][k]->tm[1].c = IWV[i][j].Poly[k][1] * d; c->h3t[i][j][k]->tm[2].c = IWV[i][j].Poly[k][2] * d; c->h3t[i][j][k]->tm[0].x = IWV[i][j].Poly[k][3]; c->h3t[i][j][k]->tm[1].x = IWV[i][j].Poly[k][4]; c->h3t[i][j][k]->tm[2].x = IWV[i][j].Poly[k][5]; if (c->h3t[i][j][k]->ifImg) c->h3C[i][j][k] = c->h3t[i][j][k]->tm[0].c + 2.0 * c->h3t[i][j][k]->tm[1].c; else c->h3C[i][j][k] = c->h3t[i][j][k]->tm[0].c + c->h3t[i][j][k]->tm[1].c + c->h3t[i][j][k]->tm[2].c; } } } } for (i = 0; i < noL; i++) { if (c->taul[i] < ckt->CKTmaxStep) { errMsg = TMALLOC(char, strlen(message) + 1); strcpy(errMsg,message); return(-1); } } return(1); } /**************************************************************** misc.c Miscellaneous procedures for simulation of coupled transmission lines. ****************************************************************/ static void new_memory(int dim, int deg, int deg_o) { int i, j; NG_IGNORE(deg); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) SiSv_1[i][j] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Sip[i][j] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Si_1p[i][j] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Sv_1p[i][j] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); for (i = 0; i < dim; i++) W[i] = (double *) calloc(MAX_DEG, sizeof(double)); } /*** ***/ /**************************************************************** match Create a polynomial matching given data points ****************************************************************/ static double *vector(int nl, int nh) { double *v; v = TMALLOC(double, (unsigned) (nh - nl + 1)); if (!v) { fprintf(stderr, "Memory Allocation Error by tmalloc in vector().\n"); fprintf(stderr, "...now exiting to system ...\n"); controlled_exit(EXIT_FAILURE); } return v-nl; } static void free_vector(double *v, int nl, int nh) { NG_IGNORE(nh); free((void*) (v +nl)); } static void polint(double *xa, double *ya, int n, double x, double *y, double *dy) /* Given arrays xa[1..n] and ya[1..n], and given a value x, this routine returns a value y, and an error estimate dy. If P(x) is the polynomial of degree n-1 such that P(xa) = ya, then the returned value y = P(x) */ { int i, m, ns = 1; double den, dif, dift, ho, hp, w; double *c, *d; dif = ABS(x - xa[1]); c = vector(1, n); d = vector(1, n); for (i = 1; i <= n; i++) { if ((dift = ABS(x - xa[i])) < dif) { ns = i; dif = dift; } c[i] = ya[i]; d[i] = ya[i]; } *y = ya[ns--]; for (m = 1; m < n; m++) { for (i = 1; i <= n-m; i++) { ho = xa[i]-x; hp = xa[i+m]-x; w = c[i+1]-d[i]; if ((den=ho-hp) == 0.0) { fprintf(stderr, "(Error) in routine POLINT\n"); fprintf(stderr, "...now exiting to system ...\n"); controlled_exit(EXIT_FAILURE); } den = w/den; d[i] = hp * den; c[i] = ho * den; } *y += (*dy = (2*ns < (n-m) ? c[ns+1] : d[ns--])); } free_vector(d, 1, n); free_vector(c, 1, n); } static int match(int n, double *cof, double *xa, double *ya) /* Given arrays xa[0..n] and ya[0..n] containing a tabulated function ya = f(xa), this routine returns an array of coefficients cof[0..n], such that ya[i] = sum_j {cof[j]*xa[i]**j}. */ { int k, j, i; double xmin, dy, *x, *y, *xx; x = vector(0, n); y = vector(0, n); xx = vector(0, n); for (j = 0; j <= n; j++) { x[j] = xa[j]; xx[j] = y[j] = ya[j]; } for (j = 0; j <= n; j++) { polint(x-1, y-1, n+1-j, 0.0, &cof[j], &dy); xmin = 1.0e38; k = -1; for (i = 0; i <= n-j; i++) { if (ABS(x[i]) < xmin) { xmin = ABS(x[i]); k = i; } if (x[i]) y[i] = (y[i] - cof[j]) / x[i]; } for (i = k+1; i <= n-j; i++) { y[i-1] = y[i]; x[i-1] = x[i]; } } free_vector(y, 0, n); free_vector(x, 0, n); free_vector(xx, 0, n); /**** check ****/ /* for (i = 0; i <= n; i++) { xmin = xa[i]; dy = cof[0]; for (j = 1; j <= n; j++) { dy += xmin * cof[j]; xmin *= xa[i]; } printf("*** real x = %e y = %e\n", xa[i], xx[i]); printf("*** calculated y = %e\n", dy); printf("*** error = %e \% \n", (dy-xx[i])/xx[i]); } */ return 0; } /*** ***/ /*** static int match_x(int dim, double *Alfa, double *X, double *Y) { int i, j; double f; double scale; **** check **** double xx[16]; for (i = 0; i <= dim; i++) xx[i] = Y[i]; if (Y[1] == Y[0]) scale = 1.0; else scale = X[1] / (Y[1] - Y[0]); for (i = 0; i < dim; i++) { f = X[i+1]; for (j = dim-1; j >= 0; j--) { A[i][j] = f; f *= X[i+1]; } A[i][dim] = (Y[i+1] - Y[0])*scale; } Gaussian_Elimination2(dim, 1); Alfa[0] = Y[0]; for (i = 1; i <= dim; i++) Alfa[i] = A[dim-i][dim] / scale; **** check **** * for (i = 0; i <= dim; i++) { f = X[i]; scale = Alfa[0]; for (j = 1; j <= dim; j++) { scale += f * Alfa[j]; f *= X[i]; } printf("*** real x = %e y = %e\n", X[i], xx[i]); printf("*** calculated y = %e\n", scale); printf("*** error = %e \% \n", (scale-xx[i])/xx[i]); } * return(1); } ***/ /*** ***/ static int Gaussian_Elimination2(int dims, int type) /* type = 1 : to solve a linear system -1 : to inverse a matrix */ { int i, j, k, dim; double f; double max; int imax; if (type == -1) dim = 2 * dims; else dim = dims; for (i = 0; i < dims; i++) { imax = i; max = ABS(A[i][i]); for (j = i+1; j < dim; j++) if (ABS(A[j][i]) > max) { imax = j; max = ABS(A[j][i]); } if (max < epsilon) { fprintf(stderr, " can not choose a pivot (misc)\n"); controlled_exit(EXIT_FAILURE); } if (imax != i) for (k = i; k <= dim; k++) { f = A[i][k]; A[i][k] = A[imax][k]; A[imax][k] = f; } f = 1.0 / A[i][i]; A[i][i] = 1.0; for (j = i+1; j <= dim; j++) A[i][j] *= f; for (j = 0; j < dims ; j++) { if (i == j) continue; f = A[j][i]; A[j][i] = 0.0; for (k = i+1; k <= dim; k++) A[j][k] -= f * A[i][k]; } } return(1); } /*** static void eval_Si_Si_1(int dim, double y) { int i, j, k; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Si_1[i][j] = 0.0; for (k = 0; k < dim; k++) if (k == j) Si_1[i][j] += Sv_1[i][k] * (y * R_m[k][j] + Scaling_F * L_m[k][j]); else Si_1[i][j] += Sv_1[i][k] * L_m[k][j] * Scaling_F; / Si_1[i][j] *= Scaling_F; / } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Si_1[i][j] /= sqrt((double) D[i]); for (i = 0; i < dim; i++) { for (j = 0; j < dim; j++) A[i][j] = Si_1[i][j]; for (j = dim; j < 2* dim; j++) A[i][j] = 0.0; A[i][i+dim] = 1.0; } Gaussian_Elimination2(dim, -1); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Si[i][j] = A[i][j+dim]; } ***/ static void eval_Si_Si_1(int dim, double y) { int i, j, k; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Si_1[i][j] = 0.0; for (k = 0; k < dim; k++) Si_1[i][j] += Sv_1[i][k] * (y * R_m[k][j] + Scaling_F * L_m[k][j]); /* else Si_1[i][j] += Sv_1[i][k] * L_m[k][j] * Scaling_F; Si_1[i][j] *= Scaling_F; */ } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Si_1[i][j] /= sqrt(D[i]); for (i = 0; i < dim; i++) { for (j = 0; j < dim; j++) A[i][j] = Si_1[i][j]; for (j = dim; j < 2* dim; j++) A[i][j] = 0.0; A[i][i+dim] = 1.0; } Gaussian_Elimination2(dim, -1); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Si[i][j] = A[i][j+dim]; } /*** static void loop_ZY(int dim, double y) { int i, j, k; double fmin, fmin1; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) if (i == j) ZY[i][j] = Scaling_F * C_m[i][i] + G_m[i] * y; else ZY[i][j] = Scaling_F * C_m[i][j]; diag(dim); fmin = D[0]; for (i = 1; i < dim; i++) if (D[i] < fmin) fmin = D[i]; if (fmin < 0) { fprintf(stderr, "(Error) The capacitance matrix of the multiconductor system is not positive definite.\n"); exit(0); } else { fmin = sqrt(fmin); fmin1 = 1 / fmin; } for (i = 0; i < dim; i++) D[i] = sqrt((double) D[i]); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Y5[i][j] = D[i] * Sv[j][i]; Y5_1[i][j] = Sv[j][i] / D[i]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[i][k] * Y5[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Y5[i][j] = Sv_1[i][j]; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[i][k] * Y5_1[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Y5_1[i][j] = Sv_1[i][j]; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { ZY[i][j] = 0.0; for (k = 0; k < dim; k++) if (k == i) ZY[i][j] += (Scaling_F * L_m[i][i] + R_m[i] * y) * Y5[k][j]; else ZY[i][j] += L_m[i][k] * Y5[k][j] * Scaling_F; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Y5[i][k] * ZY[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) ZY[i][j] = Sv_1[i][j]; diag(dim); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[k][i] * Y5[k][j]; Sv_1[i][j] *= fmin1; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { ZY[i][j] = 0.0; for (k = 0; k < dim; k++) ZY[i][j] += Y5_1[i][k] * Sv[k][j]; ZY[i][j] *= fmin; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Sv[i][j] = ZY[i][j]; } ***/ static void loop_ZY(int dim, double y) { int i, j, k; double fmin, fmin1=0.0; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) ZY[i][j] = Scaling_F * C_m[i][j] + G_m[i][j] * y; /* else ZY[i][j] = Scaling_F * C_m[i][j]; */ diag(dim); fmin = D[0]; for (i = 1; i < dim; i++) if (D[i] < fmin) fmin = D[i]; if (fmin < 0) { fprintf(stderr, "(Error) The capacitance matrix of the multiconductor system is not positive definite.\n"); controlled_exit(EXIT_FAILURE); } else { fmin = sqrt(fmin); fmin1 = 1 / fmin; } for (i = 0; i < dim; i++) D[i] = sqrt(D[i]); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Y5[i][j] = D[i] * Sv[j][i]; Y5_1[i][j] = Sv[j][i] / D[i]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[i][k] * Y5[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Y5[i][j] = Sv_1[i][j]; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[i][k] * Y5_1[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Y5_1[i][j] = Sv_1[i][j]; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { ZY[i][j] = 0.0; for (k = 0; k < dim; k++) ZY[i][j] += (Scaling_F * L_m[i][k] + R_m[i][k] * y) * Y5[k][j]; /* else ZY[i][j] += L_m[i][k] * Y5[k][j] * Scaling_F; */ } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Y5[i][k] * ZY[k][j]; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) ZY[i][j] = Sv_1[i][j]; diag(dim); for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { Sv_1[i][j] = 0.0; for (k = 0; k < dim; k++) Sv_1[i][j] += Sv[k][i] * Y5[k][j]; Sv_1[i][j] *= fmin1; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { ZY[i][j] = 0.0; for (k = 0; k < dim; k++) ZY[i][j] += Y5_1[i][k] * Sv[k][j]; ZY[i][j] *= fmin; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) Sv[i][j] = ZY[i][j]; } /*** ***/ static void poly_matrix( double *A[MAX_DIM][MAX_DIM], int dim, int deg) { int i, j; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) match(deg, A[i][j], frequency, A[i][j]); } /*** ***/ /*** static int checkW(double *W, double d) { double f, y; float y1; int k; printf("(W)y ="); scanf("%f", &y1); f = W[0]; y = y1; f += y * W[1]; for (k = 2; k < 6; k++) { y *= y1; f += y * W[k]; } printf("W[i]= %e\n ", f*exp((double)-d/y1)); return(1); } ***/ /*** ***/ static void poly_W(int dim, int deg) { int i; for (i = 0; i < dim; i++) { match(deg, W[i], frequency, W[i]); TAU[i] = approx_mode(W[i], W[i], length); /* checkW(W[i], TAU[i]); */ } } /*** ***/ static void eval_frequency(int dim, int deg_o) { int i; double min; min = D[0]; for (i = 1; i < dim; i++) if (D[i] < min) { min = D[i]; } if (min <= 0) { fprintf(stderr, "A mode frequency is not positive. Abort!\n"); controlled_exit(EXIT_FAILURE); } Scaling_F2 = 1.0 / min; Scaling_F = sqrt(Scaling_F2); min = length * 8.0; /* min *= 1.0e18; min = sqrt(min)*1.0e-9*length/8.0; */ frequency[0] = 0.0; for (i = 1; i <= deg_o; i++) frequency[i] = frequency[i-1] + min; for (i = 0; i < dim; i++) D[i] *= Scaling_F2; } /*** ***/ static void store(int dim, int ind) { int i, j; for (i = 0; i < dim; i++) { for (j = 0; j < dim; j++) { /* store_Sip */ Sip[i][j][ind] = Si[i][j]; /* store_Si_1p */ Si_1p[i][j][ind] = Si_1[i][j]; /* store_Sv_1p */ Sv_1p[i][j][ind] = Sv_1[i][j]; } /* store_W */ W[i][ind] = D[i]; } } /*** ***/ static void store_SiSv_1(int dim, int ind) { int i, j, k; double temp; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { temp = 0.0; for (k = 0; k < dim; k++) temp += Si[i][k] * Sv_1[k][j]; SiSv_1[i][j][ind] = temp; } } /*** ***/ /*** static int check(Sip, Si_1p, Sv_1p, SiSv_1p) double *Sip[MAX_DIM][MAX_DIM]; double *Si_1p[MAX_DIM][MAX_DIM]; double *Sv_1p[MAX_DIM][MAX_DIM]; double *SiSv_1p[MAX_DIM][MAX_DIM]; { double f, y; float y1; int i, j, k; printf("y ="); scanf("%f", &y1); printf("\n"); printf("Si =\n"); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { f = Sip[i][j][0]; y = y1; f += y * Sip[i][j][1]; for (k = 2; k < 8; k++) { y *= y1; f += y * Sip[i][j][k]; } printf("%e ", f); } printf("\n"); } printf("\n"); printf("Si_1 =\n"); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { f = Si_1p[i][j][0]; y = y1; f += y * Si_1p[i][j][1]; for (k = 2; k < 8; k++) { y *= y1; f += y * Si_1p[i][j][k]; } printf("%e ", f); } printf("\n"); } printf("\n"); printf("Sv_1 =\n"); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { f = Sv_1p[i][j][0]; y = y1; f += y * Sv_1p[i][j][1]; for (k = 2; k < 8; k++) { y *= y1; f += y * Sv_1p[i][j][k]; } printf("%e ", f); } printf("\n"); } printf("\n"); printf("SiSv_1 =\n"); for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) { f = SiSv_1p[i][j][0]; y = y1; f += y * SiSv_1p[i][j][1]; for (k = 2; k < 8; k++) { y *= y1; f += y * SiSv_1p[i][j][k]; } printf("%e ", f); } printf("\n"); } return(1); } ***/ /*** ***/ static int coupled(int dim) { int deg, deg_o; int i; deg = Right_deg; deg_o = Left_deg; new_memory(dim, deg, deg_o); Scaling_F = Scaling_F2 = 1.0; /*** y = 0 : ZY = LC ***/ loop_ZY(dim, 0.0); eval_frequency(dim, deg_o); eval_Si_Si_1(dim, 0.0); store_SiSv_1(dim, 0); store(dim, 0); /*** Step 1 ***/ /*** Step 2 ***/ for (i = 1; i <= deg_o; i++) { loop_ZY(dim, frequency[i]); eval_Si_Si_1(dim, frequency[i]); store_SiSv_1(dim, i); store(dim, i); } poly_matrix(Sip, dim, deg_o); poly_matrix(Si_1p, dim, deg_o); poly_matrix(Sv_1p, dim, deg_o); poly_W(dim, deg_o); matrix_p_mult(Sip, W, Si_1p, dim, deg_o, deg_o, IWI); matrix_p_mult(Sip, W, Sv_1p, dim, deg_o, deg_o, IWV); poly_matrix(SiSv_1, dim, deg_o); /*** check(Sip, Si_1p, Sv_1p, SiSv_1); ***/ generate_out(dim, deg_o); return(1); } /*** ***/ static int generate_out(int dim, int deg_o) { int i, j, k, rtv; double C; double *p; double c1, c2, c3, x1, x2, x3; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { p = SiSv_1[i][j]; SIV[i][j].C_0 = C = p[0]; if (C == 0.0) continue; for (k = 0; k <= deg_o; k++) p[k] /= C; if (i == j) { rtv = Pade_apx(sqrt(G_m[i][i] / R_m[i][i]) / C, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { SIV[i][j].C_0 = 0.0; printf("SIV\n"); continue; } } else { rtv = Pade_apx(0.0, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { SIV[i][j].C_0 = 0.0; printf("SIV\n"); continue; } } p = SIV[i][j].Poly = (double *) calloc(7, sizeof(double)); p[0] = c1; p[1] = c2; p[2] = c3; p[3] = x1; p[4] = x2; p[5] = x3; p[6] = rtv; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) for (k = 0; k < dim; k++) { p = IWI[i][j].Poly[k]; C = IWI[i][j].C_0[k]; if (C == 0.0) continue; if (i == j && k == i) { rtv = Pade_apx( exp(- sqrt(G_m[i][i] * R_m[i][i]) * length) / C, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { IWI[i][j].C_0[k] = 0.0; printf("IWI %d %d %d\n", i, j, k); continue; } } else { rtv = Pade_apx(0.0, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { IWI[i][j].C_0[k] = 0.0; printf("IWI %d %d %d\n", i, j, k); continue; } } p[0] = c1; p[1] = c2; p[2] = c3; p[3] = x1; p[4] = x2; p[5] = x3; p[6] = rtv; } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) for (k = 0; k < dim; k++) { p = IWV[i][j].Poly[k]; C = IWV[i][j].C_0[k]; if (C == 0.0) continue; if (i == j && k == i) { rtv = Pade_apx(sqrt(G_m[i][i] / R_m[i][i]) * exp(- sqrt(G_m[i][i] * R_m[i][i]) * length) / C, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { IWV[i][j].C_0[k] = 0.0; printf("IWV %d %d %d\n", i, j, k); continue; } } else { rtv = Pade_apx(0.0, p, &c1, &c2, &c3, &x1, &x2, &x3); if (rtv == 0) { IWV[i][j].C_0[k] = 0.0; printf("IWV %d %d %d\n", i, j, k); continue; } } p[0] = c1; p[1] = c2; p[2] = c3; p[3] = x1; p[4] = x2; p[5] = x3; p[6] = rtv; } return(1); } /**************************************************************** mult.c Multiplication for Matrix of Polynomial X(y) = A(y) D(y) B(y), where D(y) is a diagonal matrix with each diagonal entry of the form e^{-a_i s}d(y), for which s = 1/y and i = 1..N. Each entry of X(y) will be of the form \sum_{i=1}^N c_i e^{-a_i s} b_i(y), where b_i(0) = 1; therefore, those b_i(y)'s will be each entry's output. ****************************************************************/ static void mult_p(double *p1, double *p2, double *p3, int d1, int d2, int d3) /* p3 = p1 * p2 */ { int i, j, k; for (i = 0; i <= d3; i++) p3[i] = 0.0; for (i = 0; i <= d1; i++) for (j = i, k = 0; k <= d2; j++, k++) { if (j > d3) break; p3[j] += p1[i] * p2[k]; } } static void matrix_p_mult( double *A[MAX_DIM][MAX_DIM], double *D[MAX_DIM], double *B[MAX_DIM][MAX_DIM], int dim, int deg, int deg_o, Mult_Out X[MAX_DIM][MAX_DIM]) { int i, j, k, l; double *p; double *T[MAX_DIM][MAX_DIM]; double t1; for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { p = T[i][j] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); mult_p(B[i][j], D[i], p, deg, deg_o, deg_o); } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) for (k = 0; k < dim; k++) { p = X[i][j].Poly[k] = (double *) calloc((size_t) (deg_o+1), sizeof(double)); mult_p(A[i][k], T[k][j], p, deg, deg_o, deg_o); t1 = X[i][j].C_0[k] = p[0]; if (t1 != 0.0) { p[0] = 1.0; for (l = 1; l <= deg_o; l++) p[l] /= t1; } } for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) tfree(T[i][j]); /********** for (i = 0; i < dim; i++) for (j = 0; j < dim; j++) { for (k = 0; k < dim; k++) { fprintf(outFile, "(%5.3f)", X[i][j].C_0[k]); p = X[i][j].Poly[k]; for (l = 0; l <= deg_o; l++) fprintf(outFile, "%5.3f ", p[l]); fprintf(outFile, "\n"); } fprintf(outFile, "\n"); } ***********/ } /**************************************************************** mode approximation ****************************************************************/ /*** ***/ static double approx_mode(double *X, double *b, double length) { double w0, w1, w2, w3, w4, w5; double a[8]; double delay, atten; double y1, y2, y3, y4, y5, y6; int i, j; w0 = X[0]; w1 = X[1] / w0; /* a */ w2 = X[2] / w0; /* b */ w3 = X[3] / w0; /* c */ w4 = X[4] / w0; /* d */ w5 = X[5] / w0; /* e */ y1 = 0.5 * w1; y2 = w2 - y1 * y1; y3 = 3 * w3 - 3.0 * y1 * y2; y4 = 12.0 * w4 - 3.0 * y2 * y2 - 4.0 * y1 * y3; y5 = 60.0 * w5 - 5.0 * y1 * y4 -10.0 * y2 * y3; y6 = -10.0 * y3 * y3 - 15.0 * y2 * y4 - 6.0 * y1 * y5; delay = sqrt(w0) * length / Scaling_F; atten = exp(- delay * y1); a[1] = y2 / 2.0; a[2] = y3 / 6.0; a[3] = y4 / 24.0; a[4] = y5 / 120.0; a[5] = y6 / 720.0; a[1] *= -delay; a[2] *= -delay; a[3] *= -delay; a[4] *= -delay; a[5] *= -delay; b[0] = 1.0; b[1] = a[1]; for (i = 2; i <= 5; i++) { b[i] = 0.0; for (j = 1; j <= i; j++) b[i] += j * a[j] * b[i-j]; b[i] = b[i] / (double) i; } for (i = 0; i <= 5; i++) b[i] *= atten; return(delay); } /*** ***/ static double eval2(double a, double b, double c, double x) { return(a*x*x + b*x + c); } /*** ***/ static int get_c(double q1, double q2, double q3, double p1, double p2, double a, double b, double *cr, double *ci) { double d, n; d = (3.0*(a*a-b*b)+2.0*p1*a+p2)*(3.0*(a*a-b*b)+2.0*p1*a+p2); d += (6.0*a*b+2.0*p1*b)*(6.0*a*b+2.0*p1*b); n = -(q1*(a*a-b*b)+q2*a+q3)*(6.0*a*b+2.0*p1*b); n += (2.0*q1*a*b+q2*b)*(3.0*(a*a-b*b)+2.0*p1*a+p2); *ci = n/d; n = (3.0*(a*a-b*b)+2.0*p1*a+p2)*(q1*(a*a-b*b)+q2*a+q3); n += (6.0*a*b+2.0*p1*b)*(2.0*q1*a*b+q2*b); *cr = n/d; return(1); } static int Pade_apx(double a_b, double *b, double *c1, double *c2, double *c3, double *x1, double *x2, double *x3) /* b[0] + b[1]*y + b[2]*y^2 + ... + b[5]*y^5 + ... = (q3*y^3 + q2*y^2 + q1*y + 1) / (p3*y^3 + p2*y^2 + p1*y + 1) where b[0] is always equal to 1.0 and neglected, and y = 1/s. (q3*y^3 + q2*y^2 + q1*y + 1) / (p3*y^3 + p2*y^2 + p1*y + 1) = (s^3 + q1*s^2 + q2*s + q3) / (s^3 + p1*s^2 + p2*s + p3) = c1 / (s - x1) + c2 / (s - x2) + c3 / (s - x3) + 1.0 */ { double p1, p2, p3, q1, q2, q3; At[0][0] = 1.0 - a_b; At[0][1] = b[1]; At[0][2] = b[2]; At[0][3] = -b[3]; At[1][0] = b[1]; At[1][1] = b[2]; At[1][2] = b[3]; At[1][3] = -b[4]; At[2][0] = b[2]; At[2][1] = b[3]; At[2][2] = b[4]; At[2][3] = -b[5]; Gaussian_Elimination(3); p3 = At[0][3]; p2 = At[1][3]; p1 = At[2][3]; /* if (p3 < 0.0 || p2 < 0.0 || p1 < 0.0 || p1*p2 <= p3) return(0); */ q1 = p1 + b[1]; q2 = b[1] * p1 + p2 + b[2]; q3 = p3 * a_b; if (find_roots(p1, p2, p3, x1, x2, x3)) { /* printf("complex roots : %e %e %e \n", *x1, *x2, *x3); */ *c1 = eval2(q1 - p1, q2 - p2, q3 - p3, *x1) / eval2(3.0, 2.0 * p1, p2, *x1); get_c(q1 - p1, q2 - p2, q3 - p3, p1, p2, *x2, *x3, c2, c3); return(2); } else { /* new printf("roots are %e %e %e \n", *x1, *x2, *x3); */ *c1 = eval2(q1 - p1, q2 - p2, q3 - p3, *x1) / eval2(3.0, 2.0 * p1, p2, *x1); *c2 = eval2(q1 - p1, q2 - p2, q3 - p3, *x2) / eval2(3.0, 2.0 * p1, p2, *x2); *c3 = eval2(q1 - p1, q2 - p2, q3 - p3, *x3) / eval2(3.0, 2.0 * p1, p2, *x3); return(1); } } static int Gaussian_Elimination(int dims) { int i, j, k, dim; double f; double max; int imax; dim = dims; for (i = 0; i < dim; i++) { imax = i; max = ABS(At[i][i]); for (j = i+1; j < dim; j++) if (ABS(At[j][i]) > max) { imax = j; max = ABS(At[j][i]); } if (max < epsi_mult) { fprintf(stderr, " can not choose a pivot (mult)\n"); controlled_exit(EXIT_FAILURE); } if (imax != i) for (k = i; k <= dim; k++) { f = At[i][k]; At[i][k] = At[imax][k]; At[imax][k] = f; } f = 1.0 / At[i][i]; At[i][i] = 1.0; for (j = i+1; j <= dim; j++) At[i][j] *= f; for (j = 0; j < dim ; j++) { if (i == j) continue; f = At[j][i]; At[j][i] = 0.0; for (k = i+1; k <= dim; k++) At[j][k] -= f * At[i][k]; } } return(1); } static double root3(double a1, double a2, double a3, double x) { double t1, t2; t1 = x * (x * (x + a1) + a2) + a3; t2 = x * (2.0*a1 + 3.0*x) + a2; return(x - t1 / t2); } static int div3(double a1, double a2, double a3, double x, double *p1, double *p2) { NG_IGNORE(a2); *p1 = a1 + x; /* *p2 = a2 + (a1 + x) * x; */ *p2 = - a3 / x; return(1); } static int find_roots(double a1, double a2, double a3, double *x1, double *x2, double *x3) { double x, t; double p, q; /*********************************************** double m,n; p = a1*a1/3.0 - a2; q = a1*a2/3.0 - a3 - 2.0*a1*a1*a1/27.0; p = p*p*p/27.0; t = q*q - 4.0*p; if (t < 0.0) { if (q != 0.0) { t = atan(sqrt((double)-t)/q); if (t < 0.0) t += 3.141592654; t /= 3.0; x = 2.0 * pow(p, 0.16666667) * cos(t) - a1 / 3.0; } else { t /= -4.0; x = pow(t, 0.16666667) * 1.732 - a1 / 3.0; } } else { t = sqrt(t); m = 0.5*(q - t); n = 0.5*(q + t); if (m < 0.0) m = -pow((double) -m, (double) 0.3333333); else m = pow((double) m, (double) 0.3333333); if (n < 0.0) n = -pow((double) -n, (double) 0.3333333); else n = pow((double) n, (double) 0.3333333); x = m + n - a1 / 3.0; } ************************************************/ q = (a1*a1-3.0*a2) / 9.0; p = (2.0*a1*a1*a1-9.0*a1*a2+27.0*a3) / 54.0; t = q*q*q - p*p; if (t >= 0.0) { t = acos(p /(q * sqrt(q))); x = -2.0*sqrt(q)*cos(t / 3.0) - a1/3.0; } else { if (p > 0.0) { t = pow(sqrt(-t)+p, 1.0 / 3.0); x = -(t + q / t) - a1/3.0; } else if (p == 0.0) { x = -a1/3.0; } else { t = pow(sqrt(-t)-p, 1.0 / 3.0); x = (t + q / t) - a1/3.0; } } /* fprintf(stderr, "..1.. %e\n", x*x*x+a1*x*x+a2*x+a3); */ { double x1; int i = 0; x1 = x; for (t = root3(a1, a2, a3, x); ABS(t-x) > 5.0e-4; t = root3(a1, a2, a3, x)) if (++i == 32) { x = x1; break; } else x = t; } /* fprintf(stderr, "..2.. %e\n", x*x*x+a1*x*x+a2*x+a3); */ *x1 = x; div3(a1, a2, a3, x, &a1, &a2); t = a1 * a1 - 4.0 * a2; if (t < 0) { /* fprintf(stderr, "***** Two Imaginary Roots.\n Update.\n"); *x2 = -0.5 * a1; *x3 = a2 / *x2; */ *x3 = 0.5 * sqrt(-t); *x2 = -0.5 * a1; return(1); } else { t = sqrt(t); if (a1 >= 0.0) *x2 = t = -0.5 * (a1 + t); else *x2 = t = -0.5 * (a1 - t); *x3 = a2 / t; return(0); } } static NDnamePt insert_ND(char *name, NDnamePt *ndn) { int cmp; NDnamePt p; if (*ndn == NULL) { p = *ndn = TMALLOC(NDname, 1); p->nd = NULL; p->right = p->left = NULL; strcpy(p->id, name); return(p); } cmp = strcmp((*ndn)->id, name); if (cmp == 0) return(*ndn); else { if (cmp < 0) return(insert_ND(name, &((*ndn)->left))); else return(insert_ND(name, &((*ndn)->right))); } } static NODE * insert_node(char *name) { NDnamePt n; NODE *p; n = insert_ND(name, &ndn); if (n->nd == NULL) { p = NEW_node(); p->name = n; n->nd = p; p->next = node_tab; node_tab = p; return(p); } else return(n->nd); } /*** static int divC(double ar, double ai, double br, double bi, double *cr, double *ci) { double t; t = br*br + bi*bi; *cr = (ar*br + ai*bi) / t; *ci = (ai*br - ar*bi) / t; return(1); } ***/ static NODE *NEW_node(void) { NODE *n; n = TMALLOC(NODE, 1); n->mptr = NULL; n->gptr = NULL; n->cptr = NULL; n->rptr = NULL; n->tptr = NULL; n->cplptr = NULL; n->rlptr = NULL; n->ddptr = NULL; n->cvccsptr = NULL; n->vccsptr = NULL; n->CL = 0.001; n->V = n->dv = 0.0; n->gsum = n->cgsum = 0; n->is = 0; n->tag = 0; n->flag = 0; n->region = NULL; n->ofile = NULL; n->dvtag = 0; return(n); } /**************************************************************** diag.c This file contains the main(). ****************************************************************/ #define epsi2 1.0e-8 static int dim; static MAXE_PTR row; static MAXE_PTR sort(MAXE_PTR list, double val, int r, int c, MAXE_PTR e) { if (list == NULL || list->value < val) { e->row = r; e->col = c; e->value = val; e->next = list; return(e); } else { list->next = sort(list->next, val, r, c, e); return(list); } } static void ordering(void) { MAXE_PTR e; int i, j, m; double mv; for (i = 0; i < dim-1; i++) { m = i+1; mv = ABS(ZY[i][m]); for (j = m+1; j < dim; j++) if ((int)(ABS(ZY[i][j]) * 1e7) > (int) (1e7 *mv)) { mv = ABS(ZY[i][j]); m = j; } e = TMALLOC(MAXE, 1); row = sort(row, mv, i, m, e); } } static MAXE_PTR delete_1(MAXE_PTR *list, int rc) { MAXE_PTR list1, e; list1 = *list; if ((*list)->row == rc) { *list = (*list)->next; return(list1); } for (e = list1->next; e->row != rc; e = e->next) list1 = e; list1->next = e->next; return(e); } static void reordering(int p, int q) { MAXE_PTR e; int j, m; double mv; m = p+1; mv = ABS(ZY[p][m]); for (j = m+1; j < dim; j++) if ((int)(ABS(ZY[p][j]) * 1e7) > (int) (1e7 *mv)) { mv = ABS(ZY[p][j]); m = j; } e = delete_1(&row, p); row = sort(row, mv, p, m, e); m = q+1; if (m != dim) { mv = ABS(ZY[q][m]); for (j = m+1; j < dim; j++) if ((int)(ABS(ZY[q][j]) * 1e7) > (int) (1e7 *mv)) { mv = ABS(ZY[q][j]); m = j; } e = delete_1(&row, q); row = sort(row, mv, q, m, e); } } static void diag(int dims) { int i, j, c; double fmin, fmax; dim = dims; row = NULL; fmin = fmax = ABS(ZY[0][0]); for (i = 0; i < dim; i++) for (j = i; j < dim; j++) if (ABS(ZY[i][j]) > fmax) fmax = ABS(ZY[i][j]); else if (ABS(ZY[i][j]) < fmin) fmin = ABS(ZY[i][j]); fmin = 2.0 / (fmin + fmax); for (i = 0; i < dim; i++) for (j = i; j < dim; j++) ZY[i][j] *= fmin; for (i = 0; i < dim; i++) { for (j = 0; j < dim; j++) if (i == j) Sv[i][i] = 1.0; else Sv[i][j] = 0.0; } ordering(); if (row) for (c = 0; row->value > epsi2; c++) { int p, q; p = row->row; q = row->col; rotate(dim, p, q); reordering(p, q); } for (i = 0; i < dim; i++) D[i] = ZY[i][i] / fmin; while (row) { MAXE_PTR tmp_row = row->next; tfree(row); row = tmp_row; } } /**************************************************************** rotate() rotation of the Jacobi's method ****************************************************************/ static int rotate(int dim, int p, int q) { int j; double co, si; double ve, mu, ld; double T[MAX_DIM]; double t; ld = - ZY[p][q]; mu = 0.5 * (ZY[p][p] - ZY[q][q]); ve = sqrt(ld*ld + mu*mu); co = sqrt((ve + ABS(mu)) / (2.0 * ve)); si = SGN(mu) * ld / (2.0 * ve * co); for (j = p+1; j < dim; j++) T[j] = ZY[p][j]; for (j = 0; j < p; j++) T[j] = ZY[j][p]; for (j = p+1; j < dim; j++) { if (j == q) continue; if (j > q) ZY[p][j] = T[j] * co - ZY[q][j] * si; else ZY[p][j] = T[j] * co - ZY[j][q] * si; } for (j = q+1; j < dim; j++) { if (j == p) continue; ZY[q][j] = T[j] * si + ZY[q][j] * co; } for (j = 0; j < p; j++) { if (j == q) continue; ZY[j][p] = T[j] * co - ZY[j][q] * si; } for (j = 0; j < q; j++) { if (j == p) continue; ZY[j][q] = T[j] * si + ZY[j][q] * co; } t = ZY[p][p]; ZY[p][p] = t * co * co + ZY[q][q] * si * si - 2.0 * ZY[p][q] * si * co; ZY[q][q] = t * si * si + ZY[q][q] * co * co + 2.0 * ZY[p][q] * si * co; ZY[p][q] = 0.0; { double R[MAX_DIM]; for (j = 0; j < dim; j++) { T[j] = Sv[j][p]; R[j] = Sv[j][q]; } for (j = 0; j < dim; j++) { Sv[j][p] = T[j] * co - R[j] * si; Sv[j][q] = T[j] * si + R[j] * co; } } return(1); } ngspice-26/src/spicelib/devices/cktaccept.c0000644000265600020320000000224412264261473020343 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* CKTaccept(ckt) * * this is a driver program to iterate through all the various accept * functions provided for the circuit elements in the given circuit */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "dev.h" int CKTaccept(CKTcircuit *ckt) { int i; int error; SPICEdev **devs; #ifdef PREDICTOR double *temp; int size; #endif devs = devices(); for (i = 0; i < DEVmaxnum; i++) { if ( devs[i] && devs[i]->DEVaccept && ckt->CKThead[i] ) { error = devs[i]->DEVaccept (ckt, ckt->CKThead[i]); if (error) return(error); } } #ifdef PREDICTOR /* now, move the sols vectors around */ temp = ckt->CKTsols[7]; for ( i=7;i>0;i--) { ckt->CKTsols[i] = ckt->CKTsols[i-1]; } ckt->CKTsols[0]=temp; size = SMPmatSize(ckt->CKTmatrix); for(i=0;i<=size;i++) { ckt->CKTsols[0][i]=ckt->CKTrhs[i]; } #endif /* PREDICTOR */ return(OK); } ngspice-26/src/spicelib/devices/Makefile.in0000644000265600020320000005575112264261535020315 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @NDEV_WANTED_TRUE@am__append_1 = ndev @NUMDEV_WANTED_TRUE@am__append_2 = nbjt nbjt2 numd numd2 numos subdir = src/spicelib/devices DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdev_la_LIBADD = am_libdev_la_OBJECTS = dev.lo devsup.lo cktaccept.lo cktask.lo \ cktbindnode.lo cktcrte.lo cktfinddev.lo cktinit.lo \ cktsoachk.lo limit.lo libdev_la_OBJECTS = $(am_libdev_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libdev_la_SOURCES) DIST_SOURCES = $(libdev_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = asrc bjt bsim1 bsim2 bsim3 bsimsoi bsim4 bsim4v4 bsim4v5 \ bsim4v6 bsim3v0 bsim3v1 bsim3v32 bsim3soi_pd bsim3soi_fd \ bsim3soi_dd cap cccs ccvs cpl csw dio ind isrc hfet1 hfet2 \ hisim2 hisimhv1 jfet jfet2 ltra mes mesa mos1 mos2 mos3 mos6 \ mos9 res soi3 sw tra txl urc vbic vccs vcvs vsrc @VLADEVDIR@ \ $(am__append_1) $(am__append_2) DIST_SUBDIRS = \ @VLADEVDIR@ \ asrc \ bjt \ bsim1 \ bsim2 \ bsim3 \ bsimsoi \ bsim4 \ bsim4v4 \ bsim4v5 \ bsim4v6 \ bsim3v0 \ bsim3v1 \ bsim3v32 \ bsim3soi_pd \ bsim3soi_fd \ bsim3soi_dd \ cap \ cccs \ ccvs \ cpl \ csw \ dio \ ind \ isrc \ hfet1 \ hfet2 \ hisim2 \ hisimhv1 \ jfet \ jfet2 \ ltra \ mes \ mesa \ mos1 \ mos2 \ mos3 \ mos6 \ mos9 \ ndev \ res \ soi3 \ sw \ tra \ txl \ urc \ vbic \ vccs \ vcvs \ vsrc \ nbjt \ nbjt2 \ numd \ numd2 \ numos noinst_LTLIBRARIES = libdev.la libdev_la_SOURCES = \ dev.c \ dev.h \ devsup.c \ cktaccept.c \ cktaccept.h \ cktask.c \ cktbindnode.c \ cktcrte.c \ cktfinddev.c \ cktinit.c \ cktsoachk.c \ limit.c EXTRA_DIST = @NOTVLADEVDIR@ AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libdev.la: $(libdev_la_OBJECTS) $(libdev_la_DEPENDENCIES) $(EXTRA_libdev_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdev_la_OBJECTS) $(libdev_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktaccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktbindnode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktcrte.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktfinddev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cktsoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dev.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/devsup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/limit.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ clean-noinstLTLIBRARIES ctags ctags-recursive distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/hisim2/0000755000265600020320000000000012264261707017427 5ustar andreasadminngspice-26/src/spicelib/devices/hisim2/hsm2.c0000644000265600020320000012305512264261473020452 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "hsm2def.h" #include "ngspice/suffix.h" IFparm HSM2pTable[] = { /* parameters */ IOP( "l", HSM2_L, IF_REAL , "Length"), IOP( "w", HSM2_W, IF_REAL , "Width"), IOP( "ad", HSM2_AD, IF_REAL , "Drain area"), IOP( "as", HSM2_AS, IF_REAL , "Source area"), IOP( "pd", HSM2_PD, IF_REAL , "Drain perimeter"), IOP( "ps", HSM2_PS, IF_REAL , "Source perimeter"), IOP( "nrd", HSM2_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", HSM2_NRS, IF_REAL , "Number of squares in source"), IOP( "temp", HSM2_TEMP, IF_REAL , "Lattice temperature [K]"), IOP( "dtemp", HSM2_DTEMP,IF_REAL , ""), IOP( "off", HSM2_OFF, IF_FLAG , "Device is initially off"), IP ( "ic", HSM2_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), IOP("corbnet", HSM2_CORBNET, IF_INTEGER, "activate body resistance (1) or not (0)"), IOP("rbpb", HSM2_RBPB, IF_REAL, ""), IOP("rbpd", HSM2_RBPD, IF_REAL, ""), IOP("rbps", HSM2_RBPS, IF_REAL, ""), IOP("rbdb", HSM2_RBDB, IF_REAL, ""), IOP("rbsb", HSM2_RBSB, IF_REAL, ""), IOP("corg", HSM2_CORG, IF_INTEGER, "activate gate resistance (1) or not (0)"), /* IOP("rshg", HSM2_RSHG, IF_REAL, "gate-elecrode sheet resistance"), */ IOP("ngcon", HSM2_NGCON, IF_REAL, "number of gate contacts"), IOP("xgw", HSM2_XGW, IF_REAL, "distance from gate contact to channel edge"), IOP("xgl", HSM2_XGL, IF_REAL, "offset of gate length due to variation in patterning"), IOP("nf", HSM2_NF, IF_REAL, "number of fingers"), IOP("sa", HSM2_SA, IF_REAL, "distance from STI edge to Gate edge [m]"), IOP("sb", HSM2_SB, IF_REAL, "distance from STI edge to Gate edge [m]"), IOP("sd", HSM2_SD, IF_REAL, "distance from Gate edge to Gate edge [m]"), IOP("nsubcdfm", HSM2_NSUBCDFM, IF_REAL, "constant part of Nsub for DFM [1/cm^3]"), IOP("mphdfm", HSM2_MPHDFM, IF_REAL, "NSUBCDFM dependence of phonon scattering for DFM"), IOP("m", HSM2_M, IF_REAL, "Multiplication factor [-]"), /* WPE */ IOP("sca", HSM2_SCA, IF_REAL, "WPE sca"), IOP("scb", HSM2_SCB, IF_REAL, "WPE scb"), IOP("scc", HSM2_SCC, IF_REAL, "WPE scc"), /* Output Physical Values: */ OP ( "ids", HSM2_CD, IF_REAL , "Ids"), /* Drain-Source current */ OP ( "isub", HSM2_ISUB, IF_REAL , "Isub"), /* Substrate current */ OP ( "igidl", HSM2_IGIDL, IF_REAL , "Igidl"), /* Gate-Induced Drain Leakage current */ OP ( "igisl", HSM2_IGISL, IF_REAL , "Igisl"), /* Gate-Induced Source Leakage current */ OP ( "igd", HSM2_IGD, IF_REAL , "Igd"), /* Gate-Drain current */ OP ( "igs", HSM2_IGS, IF_REAL , "Igs"), /* Gate-Source current */ OP ( "igb", HSM2_IGB, IF_REAL , "Igb"), /* Gate-Substrate current */ OP ( "gm", HSM2_GM, IF_REAL , "Gm"), /* Transconductance */ OP ( "gds", HSM2_GDS, IF_REAL , "Gds"), /* Channel conductance */ OP ( "gmbs", HSM2_GMBS, IF_REAL , "Gmbs"), /* Body effect (Back gate) transconductance */ OP ( "von", HSM2_VON, IF_REAL , "Von"), /* Threshold voltage */ OP ( "vdsat", HSM2_VDSAT, IF_REAL , "Vdsat"), /* Saturation voltage */ OP ( "qb", HSM2_QB, IF_REAL , "Qb"), /* Bulk charge */ OP ( "qg", HSM2_QG, IF_REAL , "Qg"), /* Gate charge */ OP ( "qd", HSM2_QD, IF_REAL , "Qd"), /* Drain charge */ OP ( "cgg", HSM2_CGG, IF_REAL , "Cgg"), /* MOSFET capacitance */ OP ( "cgd", HSM2_CGD, IF_REAL , "Cgd"), /* MOSFET capacitance */ OP ( "cgs", HSM2_CGS, IF_REAL , "Cgs"), /* MOSFET capacitance */ OP ( "cbg", HSM2_CBG, IF_REAL , "Cbg"), /* MOSFET capacitance */ OP ( "cbs", HSM2_CBSB, IF_REAL , "Cbs"), /* MOSFET capacitance */ OP ( "cbd", HSM2_CBDB, IF_REAL , "Cbd"), /* MOSFET capacitance */ OP ( "cdg", HSM2_CDG, IF_REAL , "Cdg"), /* MOSFET capacitance */ OP ( "cdd", HSM2_CDD, IF_REAL , "Cdd"), /* MOSFET capacitance */ OP ( "cds", HSM2_CDS, IF_REAL , "Cds"), /* MOSFET capacitance */ OP ( "cgdo", HSM2_CGDO, IF_REAL , "Cgdo"), /* MOSFET overlap capacitance */ OP ( "cgso", HSM2_CGSO, IF_REAL , "Cgso"), /* MOSFET overlap capacitance */ OP ( "cgbo", HSM2_CGBO, IF_REAL , "Cgbo"), /* MOSFET overlap capacitance */ OP ( "ibd", HSM2_CBD, IF_REAL , "Ibd"), /* Diode current */ OP ( "ibs", HSM2_CBS, IF_REAL , "Ibs"), /* Diode current */ OP ( "gbd", HSM2_GBD, IF_REAL , "Gbd"), /* Diode conductance */ OP ( "gbs", HSM2_GBS, IF_REAL , "Gbs"), /* Diode conductance */ OP ( "capbd", HSM2_CAPBD, IF_REAL , "Capbd"), /* Diode capacitance */ OP ( "capbs", HSM2_CAPBS, IF_REAL , "Capbs") /* Diode capacitance */ }; IFparm HSM2mPTable[] = { /* model parameters */ IP("nmos", HSM2_MOD_NMOS, IF_FLAG, ""), IP("pmos", HSM2_MOD_PMOS, IF_FLAG, ""), IOP("level", HSM2_MOD_LEVEL, IF_INTEGER, ""), IOP("info", HSM2_MOD_INFO, IF_INTEGER, "information level (for debug, etc.)"), IOP("noise", HSM2_MOD_NOISE, IF_INTEGER, "noise model selector"), IOP("version", HSM2_MOD_VERSION, IF_INTEGER, "model version 220"), IOP("show", HSM2_MOD_SHOW, IF_INTEGER, "show physical value"), IOP("corsrd", HSM2_MOD_CORSRD, IF_INTEGER, "solve equations accounting Rs and Rd."), IOP("corg", HSM2_MOD_CORG, IF_INTEGER, "solve equations accounting Rg."), IOP("coiprv", HSM2_MOD_COIPRV, IF_INTEGER, "use ids_prv as initial guess of Ids (internal flag)"), IOP("copprv", HSM2_MOD_COPPRV, IF_INTEGER, "use ps{0/l}_prv as initial guess of Ps{0/l} (internal flag)"), IOP("coadov", HSM2_MOD_COADOV, IF_INTEGER, "add overlap to intrisic"), IOP("coisub", HSM2_MOD_COISUB, IF_INTEGER, "calculate isub"), IOP("coiigs", HSM2_MOD_COIIGS, IF_INTEGER, "calculate igate"), IOP("cogidl", HSM2_MOD_COGIDL, IF_INTEGER, "calculate igidl"), IOP("coovlp", HSM2_MOD_COOVLP, IF_INTEGER, "calculate overlap charge"), IOP("coflick", HSM2_MOD_COFLICK, IF_INTEGER, "calculate 1/f noise"), IOP("coisti", HSM2_MOD_COISTI, IF_INTEGER, "calculate STI"), IOP("conqs", HSM2_MOD_CONQS, IF_INTEGER, "calculate in nqs mode or qs mode"), IOP("corbnet", HSM2_MOD_CORBNET, IF_INTEGER, ""), IOP("cothrml", HSM2_MOD_COTHRML, IF_INTEGER, "calculate thermal noise"), IOP("coign", HSM2_MOD_COIGN, IF_INTEGER, "calculate induced gate noise"), IOP("codfm", HSM2_MOD_CODFM, IF_INTEGER, "calculation of model for DFM"), IOP("corecip", HSM2_MOD_CORECIP, IF_INTEGER, "capacitance reciprocity takes first priority"), IOP("coqy", HSM2_MOD_COQY, IF_INTEGER, "calculate lateral-field-induced charge/capacitance"), IOP("coqovsm", HSM2_MOD_COQOVSM, IF_INTEGER, "select smoothing method of Qover"), IOP("coerrrep", HSM2_MOD_COERRREP, IF_INTEGER, "selector for error report"), IOP("vmax", HSM2_MOD_VMAX, IF_REAL, "saturation velocity [cm/s"), IOP("bgtmp1", HSM2_MOD_BGTMP1, IF_REAL, "first order temp. coeff. for band gap [V/K]"), IOP("bgtmp2", HSM2_MOD_BGTMP2, IF_REAL, "second order temp. coeff. for band gap [V/K^2]"), IOP("eg0", HSM2_MOD_EG0, IF_REAL, ""), IOP("tox", HSM2_MOD_TOX, IF_REAL, "oxide thickness [m]"), IOP("xld", HSM2_MOD_XLD, IF_REAL, "lateral diffusion of S/D under the gate [m]"), IOP("lover", HSM2_MOD_LOVER, IF_REAL, "overlap length"), IOP("ddltmax", HSM2_MOD_DDLTMAX, IF_REAL, ""), /* Vdseff */ IOP("ddltslp", HSM2_MOD_DDLTSLP, IF_REAL, ""), /* Vdseff */ IOP("ddltict", HSM2_MOD_DDLTICT, IF_REAL, ""), /* Vdseff */ IOP("vfbover", HSM2_MOD_VFBOVER, IF_REAL, ""), IOP("nover", HSM2_MOD_NOVER, IF_REAL, ""), IOP("xwd", HSM2_MOD_XWD, IF_REAL, "lateral diffusion along the width dir. [m]"), IOP("xl", HSM2_MOD_XL, IF_REAL, "gate length offset due to mask/etch effect [m]"), IOP("xw", HSM2_MOD_XW, IF_REAL, "gate width offset due to mask/etch effect [m]"), IOP("saref", HSM2_MOD_SAREF, IF_REAL, "reference distance from STI edge to Gate edge [m]"), IOP("sbref", HSM2_MOD_SBREF, IF_REAL, "reference distance from STI edge to Gate edge [m]"), IOP("ll", HSM2_MOD_LL, IF_REAL, "gate length parameter"), IOP("lld", HSM2_MOD_LLD, IF_REAL, "gate length parameter"), IOP("lln", HSM2_MOD_LLN, IF_REAL, "gate length parameter"), IOP("wl", HSM2_MOD_WL, IF_REAL, "gate width parameter"), IOP("wl1", HSM2_MOD_WL1, IF_REAL, "gate width parameter"), IOP("wl1p", HSM2_MOD_WL1P, IF_REAL, "gate width parameter"), IOP("wl2", HSM2_MOD_WL2, IF_REAL, "gate width parameter"), IOP("wl2p", HSM2_MOD_WL2P, IF_REAL, "gate width parameter"), IOP("wld", HSM2_MOD_WLD, IF_REAL, "gate width parameter"), IOP("wln", HSM2_MOD_WLN, IF_REAL, "gate width parameter"), IOP("xqy", HSM2_MOD_XQY, IF_REAL, "[m]"), IOP("xqy1", HSM2_MOD_XQY1, IF_REAL, "[F m^{XQY2}]"), IOP("xqy2", HSM2_MOD_XQY2, IF_REAL, "[-]"), IOP("qyrat", HSM2_MOD_QYRAT, IF_REAL, ""), IOP("rs", HSM2_MOD_RS, IF_REAL, "source contact resistance [ohm m]"), IOP("rd", HSM2_MOD_RD, IF_REAL, "drain contact resistance [ohm m]"), IOP("rsh", HSM2_MOD_RSH, IF_REAL, "source/drain diffusion sheet resistance [ohm]"), IOP("rshg", HSM2_MOD_RSHG, IF_REAL, "gate-elecrode sheet resistance"), /* IOP("ngcon", HSM2_MOD_NGCON, IF_REAL, "number of gate contacts"), */ /* IOP("xgw", HSM2_MOD_XGW, IF_REAL, "distance from gate contact to channel edge"), */ /* IOP("xgl", HSM2_MOD_XGL, IF_REAL, "offset of gate length due to variation in patterning"), */ /* IOP("nf", HSM2_MOD_NF, IF_REAL, "number of fingers"), */ IOP("vfbc", HSM2_MOD_VFBC, IF_REAL, "constant part of Vfb [V]"), IOP("vbi", HSM2_MOD_VBI, IF_REAL, "built-in potential [V]"), IOP("nsubc", HSM2_MOD_NSUBC, IF_REAL, "constant part of Nsub [1/cm^3]"), IOP("vfbcl", HSM2_MOD_VFBCL, IF_REAL, "gate-length dependence of VFBC [um]"), IOP("vfbclp", HSM2_MOD_VFBCLP, IF_REAL, "gate-length dependence of VFBC [-]"), IOP("parl2", HSM2_MOD_PARL2, IF_REAL, "under diffusion [m]"), IOP("lp", HSM2_MOD_LP, IF_REAL, "length of pocket potential [m]"), IOP("nsubp", HSM2_MOD_NSUBP, IF_REAL, "[1/cm^3]"), IOP("nsubpl", HSM2_MOD_NSUBPL, IF_REAL, "gate-length dependence of NSUBP"), IOP("nsubpfac", HSM2_MOD_NSUBPFAC, IF_REAL, "gate-length dependence of NSUBP"), IOP("nsubpdlt", HSM2_MOD_NSUBPDLT, IF_REAL, "Delta for nsubp smoothing [-]"), IOP("nsubpw", HSM2_MOD_NSUBPW, IF_REAL, "pocket implant parameter"), IOP("nsubpwp", HSM2_MOD_NSUBPWP, IF_REAL, "pocket implant parameter"), IOP("scp1", HSM2_MOD_SCP1, IF_REAL, "parameter for pocket [-]"), IOP("scp2", HSM2_MOD_SCP2, IF_REAL, "parameter for pocket [1/V]"), IOP("scp3", HSM2_MOD_SCP3, IF_REAL, "parameter for pocket [m/V]"), IOP("sc1", HSM2_MOD_SC1, IF_REAL, "parameter for SCE [-]"), IOP("sc2", HSM2_MOD_SC2, IF_REAL, "parameter for SCE [1/V]"), IOP("sc3", HSM2_MOD_SC3, IF_REAL, "parameter for SCE [m/V]"), IOP("sc4", HSM2_MOD_SC4, IF_REAL, "parameter for SCE []"), IOP("pgd1", HSM2_MOD_PGD1, IF_REAL, "parameter for gate-poly depletion [V]"), IOP("pgd2", HSM2_MOD_PGD2, IF_REAL, "parameter for gate-poly depletion [V]"), //IOP("pgd3", HSM2_MOD_PGD3, IF_REAL, "parameter for gate-poly depletion [-]"), IOP("pgd4", HSM2_MOD_PGD4, IF_REAL, "parameter for gate-poly depletion [-]"), IOP("ndep", HSM2_MOD_NDEP, IF_REAL, "coeff. of Qbm for Eeff [-]"), IOP("ndepl", HSM2_MOD_NDEPL, IF_REAL, "coeff. of Qbm for Eeff [-]"), IOP("ndeplp", HSM2_MOD_NDEPLP, IF_REAL, "coeff. of Qbm for Eeff [-]"), IOP("ndepw", HSM2_MOD_NDEPW, IF_REAL, "coeff. of Qbm for Eeff [-]"), IOP("ndepwp", HSM2_MOD_NDEPWP, IF_REAL, "coeff. of Qbm for Eeff [-]"), IOP("ninv", HSM2_MOD_NINV, IF_REAL, "coeff. of Qnm for Eeff [-]"), IOP("ninvd", HSM2_MOD_NINVD, IF_REAL, "modification of Vdse dependence on Eeff [1/V]"), IOP("muecb0", HSM2_MOD_MUECB0, IF_REAL, "const. part of coulomb scattering [cm^2/Vs]"), IOP("muecb1", HSM2_MOD_MUECB1, IF_REAL, "coeff. for coulomb scattering [cm^2/Vs]"), IOP("mueph0", HSM2_MOD_MUEPH0, IF_REAL, "power of Eeff for phonon scattering [-]"), IOP("mueph1", HSM2_MOD_MUEPH1, IF_REAL, ""), IOP("muephw", HSM2_MOD_MUEPHW, IF_REAL, ""), IOP("muepwp", HSM2_MOD_MUEPWP, IF_REAL, "phonon scattering parameter"), IOP("muepwd", HSM2_MOD_MUEPWD, IF_REAL, "phonon scattering parameter"), IOP("muephl", HSM2_MOD_MUEPHL, IF_REAL, "phonon scattering parameter"), IOP("mueplp", HSM2_MOD_MUEPLP, IF_REAL, "phonon scattering parameter"), IOP("muepld", HSM2_MOD_MUEPLD, IF_REAL, "phonon scattering parameter"), IOP("muephs", HSM2_MOD_MUEPHS, IF_REAL, ""), IOP("muepsp", HSM2_MOD_MUEPSP, IF_REAL, ""), IOP("vtmp", HSM2_MOD_VTMP, IF_REAL, ""), IOP("wvth0", HSM2_MOD_WVTH0, IF_REAL, ""), IOP("muesr0", HSM2_MOD_MUESR0, IF_REAL, "power of Eeff for S.R. scattering [-]"), IOP("muesr1", HSM2_MOD_MUESR1, IF_REAL, "coeff. for S.R. scattering [-]"), IOP("muesrl", HSM2_MOD_MUESRL, IF_REAL, "surface roughness parameter"), IOP("muesrw", HSM2_MOD_MUESRW, IF_REAL, "change of surface roughness related mobility"), IOP("mueswp", HSM2_MOD_MUESWP, IF_REAL, "change of surface roughness related mobility"), IOP("mueslp", HSM2_MOD_MUESLP, IF_REAL, "surface roughness parameter"), IOP("muetmp", HSM2_MOD_MUETMP, IF_REAL, "parameter for mobility [-]"), IOP("bb", HSM2_MOD_BB, IF_REAL, "empirical mobility model coefficient [-]"), IOP("sub1", HSM2_MOD_SUB1, IF_REAL, "parameter for Isub [1/V]"), IOP("sub2", HSM2_MOD_SUB2, IF_REAL, "parameter for Isub [V]"), IOP("svgs", HSM2_MOD_SVGS, IF_REAL, "coefficient for Vg of Psislsat"), IOP("svbs", HSM2_MOD_SVBS, IF_REAL, "coefficient for Vbs of Psislsat"), IOP("svbsl", HSM2_MOD_SVBSL, IF_REAL, " "), IOP("svds", HSM2_MOD_SVDS, IF_REAL, " "), IOP("slg", HSM2_MOD_SLG, IF_REAL, " "), IOP("sub1l", HSM2_MOD_SUB1L, IF_REAL, " "), IOP("sub2l", HSM2_MOD_SUB2L, IF_REAL, " "), IOP("svgsl", HSM2_MOD_SVGSL, IF_REAL, " "), IOP("svgslp", HSM2_MOD_SVGSLP, IF_REAL, " "), IOP("svgswp", HSM2_MOD_SVGSWP, IF_REAL, " "), IOP("svgsw", HSM2_MOD_SVGSW, IF_REAL, " "), IOP("svbslp", HSM2_MOD_SVBSLP, IF_REAL, " "), IOP("slgl", HSM2_MOD_SLGL, IF_REAL, " "), IOP("slglp", HSM2_MOD_SLGLP, IF_REAL, " "), IOP("sub1lp", HSM2_MOD_SUB1LP, IF_REAL, " "), IOP("nsti", HSM2_MOD_NSTI, IF_REAL, "parameter for STI [1/cm^3]"), IOP("wsti", HSM2_MOD_WSTI, IF_REAL, "parameter for STI [m]"), IOP("wstil", HSM2_MOD_WSTIL, IF_REAL, "parameter for STI [?]"), IOP("wstilp", HSM2_MOD_WSTILP, IF_REAL, "parameter for STI [?]"), IOP("wstiw", HSM2_MOD_WSTIW, IF_REAL, "parameter for STI [?]"), IOP("wstiwp", HSM2_MOD_WSTIWP, IF_REAL, "parameter for STI [?]"), IOP("scsti1", HSM2_MOD_SCSTI1, IF_REAL, "parameter for STI [-]"), IOP("scsti2", HSM2_MOD_SCSTI2, IF_REAL, "parameter for STI [1/V]"), IOP("vthsti", HSM2_MOD_VTHSTI, IF_REAL, "parameter for STI"), IOP("vdsti", HSM2_MOD_VDSTI, IF_REAL, "parameter for STI [-]"), IOP("muesti1", HSM2_MOD_MUESTI1, IF_REAL, "STI Stress mobility parameter"), IOP("muesti2", HSM2_MOD_MUESTI2, IF_REAL, "STI Stress mobility parameter"), IOP("muesti3", HSM2_MOD_MUESTI3, IF_REAL, "STI Stress mobility parameter"), IOP("nsubpsti1", HSM2_MOD_NSUBPSTI1, IF_REAL, "STI Stress pocket impla parameter"), IOP("nsubpsti2", HSM2_MOD_NSUBPSTI2, IF_REAL, "STI Stress pocket impla parameter"), IOP("nsubpsti3", HSM2_MOD_NSUBPSTI3, IF_REAL, "STI Stress pocket impla parameter"), IOP("nsubcsti1", HSM2_MOD_NSUBCSTI1, IF_REAL, "STI Stress Parameter for Nsubc [-]"), IOP("nsubcsti2", HSM2_MOD_NSUBCSTI2, IF_REAL, "STI Stress Parameter for Nsubc [-]"), IOP("nsubcsti3", HSM2_MOD_NSUBCSTI3, IF_REAL, "STI Stress Parameter for Nsubc [-]"), IOP("lpext", HSM2_MOD_LPEXT, IF_REAL, "Pocket extension"), IOP("npext", HSM2_MOD_NPEXT, IF_REAL, "Pocket extension"), IOP("npextw", HSM2_MOD_NPEXTW, IF_REAL, "new model parameter NPEXTW"), IOP("npextwp", HSM2_MOD_NPEXTWP, IF_REAL, "new model parameter NPEXTWP"), IOP("scp22", HSM2_MOD_SCP22, IF_REAL, ""), IOP("scp21", HSM2_MOD_SCP21, IF_REAL, ""), IOP("bs1", HSM2_MOD_BS1, IF_REAL, ""), IOP("bs2", HSM2_MOD_BS2, IF_REAL, ""), IOP("cgso", HSM2_MOD_CGSO, IF_REAL, "G-S overlap capacitance per unit W [F/m]"), IOP("cgdo", HSM2_MOD_CGDO, IF_REAL, "G-D overlap capacitance per unit W [F/m]"), IOP("cgbo", HSM2_MOD_CGBO, IF_REAL, "G-B overlap capacitance per unit L [F/m]"), IOP("tpoly", HSM2_MOD_TPOLY, IF_REAL, "hight of poly gate [m]"), IOP("js0", HSM2_MOD_JS0, IF_REAL, "Saturation current density [A/m^2]"), IOP("js0sw", HSM2_MOD_JS0SW, IF_REAL, "Side wall saturation current density [A/m]"), IOP("nj", HSM2_MOD_NJ, IF_REAL, "Emission coefficient [-]"), IOP("njsw", HSM2_MOD_NJSW, IF_REAL, "Sidewall emission coefficient"), IOP("xti", HSM2_MOD_XTI, IF_REAL, "Junction current temparature exponent coefficient [-]"), IOP("cj", HSM2_MOD_CJ, IF_REAL, "Bottom junction capacitance per unit area at zero bias [F/m^2]"), IOP("cjsw", HSM2_MOD_CJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient per unit length at zero bias [F/m]"), IOP("cjswg", HSM2_MOD_CJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance per unit length at zero bias [F/m]"), IOP("mj", HSM2_MOD_MJ, IF_REAL, "Bottom junction capacitance grading coefficient"), IOP("mjsw", HSM2_MOD_MJSW, IF_REAL, "Source/drain sidewall junction capacitance grading coefficient"), IOP("mjswg", HSM2_MOD_MJSWG, IF_REAL, "Source/drain gate sidewall junction capacitance grading coefficient"), IOP("pb", HSM2_MOD_PB, IF_REAL, "Bottom junction build-in potential [V]"), IOP("pbsw", HSM2_MOD_PBSW, IF_REAL, "Source/drain sidewall junction build-in potential [V]"), IOP("pbswg", HSM2_MOD_PBSWG, IF_REAL, "Source/drain gate sidewall junction build-in potential [V]"), IOP("tcjbd", HSM2_MOD_TCJBD, IF_REAL, "Temperature dependence of czbd"), IOP("tcjbs", HSM2_MOD_TCJBS, IF_REAL, "Temperature dependence of czbs"), IOP("tcjbdsw", HSM2_MOD_TCJBDSW, IF_REAL, "Temperature dependence of czbdsw"), IOP("tcjbssw", HSM2_MOD_TCJBSSW, IF_REAL, "Temperature dependence of czbssw"), IOP("tcjbdswg", HSM2_MOD_TCJBDSWG, IF_REAL, "Temperature dependence of czbdswg"), IOP("tcjbsswg", HSM2_MOD_TCJBSSWG, IF_REAL, "Temperature dependence of czbsswg"), IOP("xti2", HSM2_MOD_XTI2, IF_REAL, " temperature coefficient [-]"), IOP("cisb", HSM2_MOD_CISB, IF_REAL, " reverse bias saturation current [-]"), IOP("cvb", HSM2_MOD_CVB, IF_REAL, " bias dependence coefficient of cisb [-]"), IOP("ctemp", HSM2_MOD_CTEMP, IF_REAL, " temperature coefficient [-]"), IOP("cisbk", HSM2_MOD_CISBK, IF_REAL, " reverse bias saturation current [A]"), IOP("cvbk", HSM2_MOD_CVBK, IF_REAL, " bias dependence coefficient of cisb [-]"), IOP("divx", HSM2_MOD_DIVX, IF_REAL, " [1/V]"), IOP("clm1", HSM2_MOD_CLM1, IF_REAL, "parameter for CLM [-]"), IOP("clm2", HSM2_MOD_CLM2, IF_REAL, "parameter for CLM [1/m]"), IOP("clm3", HSM2_MOD_CLM3, IF_REAL, "parameter for CLM [-]"), IOP("clm5", HSM2_MOD_CLM5, IF_REAL, "parameter for CLM [-]"), IOP("clm6", HSM2_MOD_CLM6, IF_REAL, "parameter for CLM [um^{-clm5}]"), IOP("vover", HSM2_MOD_VOVER, IF_REAL, "parameter for overshoot [m^{voverp}]"), IOP("voverp", HSM2_MOD_VOVERP, IF_REAL, "parameter for overshoot [-]"), IOP("vovers", HSM2_MOD_VOVERS, IF_REAL, "parameter for overshoot [-]"), IOP("voversp", HSM2_MOD_VOVERSP, IF_REAL, "parameter for overshoot [-]"), IOP("wfc", HSM2_MOD_WFC, IF_REAL, "parameter for narrow channel effect [m*F/(cm^2)]"), IOP("nsubcw", HSM2_MOD_NSUBCW, IF_REAL, "Parameter for narrow channel effect "), IOP("nsubcwp", HSM2_MOD_NSUBCWP, IF_REAL, "Parameter for narrow channel effect "), IOP("nsubcmax", HSM2_MOD_NSUBCMAX, IF_REAL, "Parameter for narrow channel effect "), IOP("qme1", HSM2_MOD_QME1, IF_REAL, "parameter for quantum effect [mV]"), IOP("qme2", HSM2_MOD_QME2, IF_REAL, "parameter for quantum effect [V]"), IOP("qme3", HSM2_MOD_QME3, IF_REAL, "parameter for quantum effect [m]"), IOP("gidl1", HSM2_MOD_GIDL1, IF_REAL, "parameter for GIDL [?]"), IOP("gidl2", HSM2_MOD_GIDL2, IF_REAL, "parameter for GIDL [?]"), IOP("gidl3", HSM2_MOD_GIDL3, IF_REAL, "parameter for GIDL [?]"), IOP("gidl4", HSM2_MOD_GIDL4, IF_REAL, "parameter for GIDL [?]"), IOP("gidl5", HSM2_MOD_GIDL5, IF_REAL, "parameter for GIDL [?]"), IOP("gidl6", HSM2_MOD_GIDL6, IF_REAL, "parameter for GIDL [-]"), IOP("gidl7", HSM2_MOD_GIDL7, IF_REAL, "parameter for GIDL [-]"), IOP("gleak1", HSM2_MOD_GLEAK1, IF_REAL, "parameter for gate current [A*V^(-3/2)/C]"), IOP("gleak2", HSM2_MOD_GLEAK2, IF_REAL, "parameter for gate current [V^(-1/2)/m ]"), IOP("gleak3", HSM2_MOD_GLEAK3, IF_REAL, "parameter for gate current [-]"), IOP("gleak4", HSM2_MOD_GLEAK4, IF_REAL, "parameter for gate current [1/m]"), IOP("gleak5", HSM2_MOD_GLEAK5, IF_REAL, "parameter for gate current [V/m]"), IOP("gleak6", HSM2_MOD_GLEAK6, IF_REAL, "parameter for gate current [V]"), IOP("gleak7", HSM2_MOD_GLEAK7, IF_REAL, "parameter for gate current [m^2]"), IOP("glksd1", HSM2_MOD_GLKSD1, IF_REAL, "parameter for gate current [A*m/V^2]"), IOP("glksd2", HSM2_MOD_GLKSD2, IF_REAL, "parameter for gate current [1/(V*m)]"), IOP("glksd3", HSM2_MOD_GLKSD3, IF_REAL, "parameter for gate current [1/m]"), IOP("glkb1", HSM2_MOD_GLKB1, IF_REAL, "parameter for gate current [A/V^2]"), IOP("glkb2", HSM2_MOD_GLKB2, IF_REAL, "parameter for gate current [m/V]"), IOP("glkb3", HSM2_MOD_GLKB3, IF_REAL, "parameter for gate current [V]"), IOP("egig", HSM2_MOD_EGIG, IF_REAL, "parameter for gate current [V]"), IOP("igtemp2", HSM2_MOD_IGTEMP2, IF_REAL, "parameter for gate current [V*k]"), IOP("igtemp3", HSM2_MOD_IGTEMP3, IF_REAL, "parameter for gate current [V*k^2]"), IOP("vzadd0", HSM2_MOD_VZADD0, IF_REAL, "Vzadd at Vds=0 [V]"), IOP("pzadd0", HSM2_MOD_PZADD0, IF_REAL, "Pzadd at Vds=0 [V]"), IOP("nftrp", HSM2_MOD_NFTRP, IF_REAL, ""), IOP("nfalp", HSM2_MOD_NFALP, IF_REAL, ""), IOP("falph", HSM2_MOD_FALPH, IF_REAL, "parameter for 1/f noise"), IOP("cit", HSM2_MOD_CIT, IF_REAL, ""), IOP("kappa", HSM2_MOD_KAPPA, IF_REAL, "dielectric constant for high-k stacked gate"), IOP("vdiffj", HSM2_MOD_VDIFFJ, IF_REAL, "threshold voltage for S/D junction diode [V]"), IOP("dly1", HSM2_MOD_DLY1, IF_REAL, "parameter for transit time [-]"), IOP("dly2", HSM2_MOD_DLY2, IF_REAL, "parameter for transit time [-]"), IOP("dly3", HSM2_MOD_DLY3, IF_REAL, "parameter for trandforming bulk charge [s/F]"), IOP("tnom", HSM2_MOD_TNOM, IF_REAL, "nominal temperature [K]"), IOP("ovslp", HSM2_MOD_OVSLP, IF_REAL, ""), IOP("ovmag", HSM2_MOD_OVMAG, IF_REAL, ""), IOP("gbmin", HSM2_MOD_GBMIN, IF_REAL, ""), IOP("rbpb", HSM2_MOD_RBPB, IF_REAL, ""), IOP("rbpd", HSM2_MOD_RBPD, IF_REAL, ""), IOP("rbps", HSM2_MOD_RBPS, IF_REAL, ""), IOP("rbdb", HSM2_MOD_RBDB, IF_REAL, ""), IOP("rbsb", HSM2_MOD_RBSB, IF_REAL, ""), IOP("ibpc1", HSM2_MOD_IBPC1, IF_REAL, "parameter for Impact-Ionization Induced Bulk Potential Change"), IOP("ibpc2", HSM2_MOD_IBPC2, IF_REAL, "parameter for Impact-Ionization Induced Bulk Potential Change"), IOP("mphdfm", HSM2_MOD_MPHDFM, IF_REAL, "NSUBCDFM dependence of phonon scattering for DFM"), IOP("ptl", HSM2_MOD_PTL, IF_REAL, ""), IOP("ptp", HSM2_MOD_PTP, IF_REAL, ""), IOP("pt2", HSM2_MOD_PT2, IF_REAL, ""), IOP("ptlp", HSM2_MOD_PTLP, IF_REAL, ""), IOP("gdl", HSM2_MOD_GDL, IF_REAL, ""), IOP("gdlp", HSM2_MOD_GDLP, IF_REAL, ""), IOP("gdld", HSM2_MOD_GDLD, IF_REAL, ""), IOP("pt4", HSM2_MOD_PT4, IF_REAL, ""), IOP("pt4p", HSM2_MOD_PT4P, IF_REAL, ""), IOP("muephl2", HSM2_MOD_MUEPHL2, IF_REAL, ""), IOP("mueplp2", HSM2_MOD_MUEPLP2, IF_REAL, ""), IOP("nsubcw2", HSM2_MOD_NSUBCW2, IF_REAL, ""), IOP("nsubcwp2", HSM2_MOD_NSUBCWP2, IF_REAL, ""), IOP("muephw2", HSM2_MOD_MUEPHW2, IF_REAL, ""), IOP("muepwp2", HSM2_MOD_MUEPWP2, IF_REAL, ""), /* WPE */ IOP("web", HSM2_MOD_WEB, IF_REAL, "Description for the model parameter WPE web"), IOP("wec", HSM2_MOD_WEC, IF_REAL, "Description for the model parameter WPE wec"), IOP("nsubcwpe" , HSM2_MOD_NSUBCWPE, IF_REAL, "Description for the model parameter WPE nsubcwpe"), IOP("npextwpe" , HSM2_MOD_NPEXTWPE, IF_REAL, "Description for the model parameter WPE npextwpe"), IOP("nsubpwpe" , HSM2_MOD_NSUBPWPE, IF_REAL, "Description for the model parameter WPE nsubpwpe"), IOP("vgsmin", HSM2_MOD_VGSMIN, IF_REAL, "minimal/maximal expected Vgs (NMOS/PMOS) [V]"), IOP("sc3vbs", HSM2_MOD_SC3VBS, IF_REAL, "Vbs value for clamping sc3 [V]"), IOP("byptol", HSM2_MOD_BYPTOL, IF_REAL, "BYP_TOL_FACTOR for bypass control"), IOP("muecb0lp", HSM2_MOD_MUECB0LP, IF_REAL, "L dependence of MUECB0"), IOP("muecb1lp", HSM2_MOD_MUECB1LP, IF_REAL, "L dependence of MUECB1"), /* binning parameters */ IOP("lmin", HSM2_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP("lmax", HSM2_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP("wmin", HSM2_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP("wmax", HSM2_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP("lbinn", HSM2_MOD_LBINN, IF_REAL, "L modulation coefficient for binning"), IOP("wbinn", HSM2_MOD_WBINN, IF_REAL, "W modulation coefficient for binning"), /* Length dependence */ IOP("lvmax", HSM2_MOD_LVMAX, IF_REAL, "Length dependence of vmax"), IOP("lbgtmp1", HSM2_MOD_LBGTMP1, IF_REAL, "Length dependence of bgtmp1"), IOP("lbgtmp2", HSM2_MOD_LBGTMP2, IF_REAL, "Length dependence of bgtmp2"), IOP("leg0", HSM2_MOD_LEG0, IF_REAL, "Length dependence of eg0"), IOP("llover", HSM2_MOD_LLOVER, IF_REAL, "Length dependence of lover"), IOP("lvfbover", HSM2_MOD_LVFBOVER, IF_REAL, "Length dependence of vfbover"), IOP("lnover", HSM2_MOD_LNOVER, IF_REAL, "Length dependence of nover"), IOP("lwl2", HSM2_MOD_LWL2, IF_REAL, "Length dependence of wl2"), IOP("lvfbc", HSM2_MOD_LVFBC, IF_REAL, "Length dependence of vfbc"), IOP("lnsubc", HSM2_MOD_LNSUBC, IF_REAL, "Length dependence of nsubc"), IOP("lnsubp", HSM2_MOD_LNSUBP, IF_REAL, "Length dependence of nsubp"), IOP("lscp1", HSM2_MOD_LSCP1, IF_REAL, "Length dependence of scp1"), IOP("lscp2", HSM2_MOD_LSCP2, IF_REAL, "Length dependence of scp2"), IOP("lscp3", HSM2_MOD_LSCP3, IF_REAL, "Length dependence of scp3"), IOP("lsc1", HSM2_MOD_LSC1, IF_REAL, "Length dependence of sc1"), IOP("lsc2", HSM2_MOD_LSC2, IF_REAL, "Length dependence of sc2"), IOP("lsc3", HSM2_MOD_LSC3, IF_REAL, "Length dependence of sc3"), IOP("lsc4", HSM2_MOD_LSC4, IF_REAL, "Length dependence of sc4"), IOP("lpgd1", HSM2_MOD_LPGD1, IF_REAL, "Length dependence of pgd1"), //IOP("lpgd3", HSM2_MOD_LPGD3, IF_REAL, "Length dependence of pgd3"), IOP("lndep", HSM2_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP("lninv", HSM2_MOD_LNINV, IF_REAL, "Length dependence of ninv"), IOP("lmuecb0", HSM2_MOD_LMUECB0, IF_REAL, "Length dependence of muecb0"), IOP("lmuecb1", HSM2_MOD_LMUECB1, IF_REAL, "Length dependence of muecb1"), IOP("lmueph1", HSM2_MOD_LMUEPH1, IF_REAL, "Length dependence of mueph1"), IOP("lvtmp", HSM2_MOD_LVTMP, IF_REAL, "Length dependence of vtmp"), IOP("lwvth0", HSM2_MOD_LWVTH0, IF_REAL, "Length dependence of wvth0"), IOP("lmuesr1", HSM2_MOD_LMUESR1, IF_REAL, "Length dependence of muesr1"), IOP("lmuetmp", HSM2_MOD_LMUETMP, IF_REAL, "Length dependence of muetmp"), IOP("lsub1", HSM2_MOD_LSUB1, IF_REAL, "Length dependence of sub1"), IOP("lsub2", HSM2_MOD_LSUB2, IF_REAL, "Length dependence of sub2"), IOP("lsvds", HSM2_MOD_LSVDS, IF_REAL, "Length dependence of svds"), IOP("lsvbs", HSM2_MOD_LSVBS, IF_REAL, "Length dependence of svbs"), IOP("lsvgs", HSM2_MOD_LSVGS, IF_REAL, "Length dependence of svgs"), IOP("lnsti", HSM2_MOD_LNSTI, IF_REAL, "Length dependence of nsti"), IOP("lwsti", HSM2_MOD_LWSTI, IF_REAL, "Length dependence of wsti"), IOP("lscsti1", HSM2_MOD_LSCSTI1, IF_REAL, "Length dependence of scsti1"), IOP("lscsti2", HSM2_MOD_LSCSTI2, IF_REAL, "Length dependence of scsti2"), IOP("lvthsti", HSM2_MOD_LVTHSTI, IF_REAL, "Length dependence of vthsti"), IOP("lmuesti1", HSM2_MOD_LMUESTI1, IF_REAL, "Length dependence of muesti1"), IOP("lmuesti2", HSM2_MOD_LMUESTI2, IF_REAL, "Length dependence of muesti2"), IOP("lmuesti3", HSM2_MOD_LMUESTI3, IF_REAL, "Length dependence of muesti3"), IOP("lnsubpsti1", HSM2_MOD_LNSUBPSTI1, IF_REAL, "Length dependence of nsubpsti1"), IOP("lnsubpsti2", HSM2_MOD_LNSUBPSTI2, IF_REAL, "Length dependence of nsubpsti2"), IOP("lnsubpsti3", HSM2_MOD_LNSUBPSTI3, IF_REAL, "Length dependence of nsubpsti3"), IOP("lnsubcsti1", HSM2_MOD_LNSUBCSTI1, IF_REAL, "Length dependence of nsubcsti1"), IOP("lnsubcsti2", HSM2_MOD_LNSUBCSTI2, IF_REAL, "Length dependence of nsubcsti2"), IOP("lnsubcsti3", HSM2_MOD_LNSUBCSTI3, IF_REAL, "Length dependence of nsubcsti3"), IOP("lcgso", HSM2_MOD_LCGSO, IF_REAL, "Length dependence of cgso"), IOP("lcgdo", HSM2_MOD_LCGDO, IF_REAL, "Length dependence of cgdo"), IOP("ljs0", HSM2_MOD_LJS0, IF_REAL, "Length dependence of js0"), IOP("ljs0sw", HSM2_MOD_LJS0SW, IF_REAL, "Length dependence of js0sw"), IOP("lnj", HSM2_MOD_LNJ, IF_REAL, "Length dependence of nj"), IOP("lcisbk", HSM2_MOD_LCISBK, IF_REAL, "Length dependence of cisbk"), IOP("lclm1", HSM2_MOD_LCLM1, IF_REAL, "Length dependence of clm1"), IOP("lclm2", HSM2_MOD_LCLM2, IF_REAL, "Length dependence of clm2"), IOP("lclm3", HSM2_MOD_LCLM3, IF_REAL, "Length dependence of clm3"), IOP("lwfc", HSM2_MOD_LWFC, IF_REAL, "Length dependence of wfc"), IOP("lgidl1", HSM2_MOD_LGIDL1, IF_REAL, "Length dependence of gidl1"), IOP("lgidl2", HSM2_MOD_LGIDL2, IF_REAL, "Length dependence of gidl2"), IOP("lgleak1", HSM2_MOD_LGLEAK1, IF_REAL, "Length dependence of gleak1"), IOP("lgleak2", HSM2_MOD_LGLEAK2, IF_REAL, "Length dependence of gleak2"), IOP("lgleak3", HSM2_MOD_LGLEAK3, IF_REAL, "Length dependence of gleak3"), IOP("lgleak6", HSM2_MOD_LGLEAK6, IF_REAL, "Length dependence of gleak6"), IOP("lglksd1", HSM2_MOD_LGLKSD1, IF_REAL, "Length dependence of glksd1"), IOP("lglksd2", HSM2_MOD_LGLKSD2, IF_REAL, "Length dependence of glksd2"), IOP("lglkb1", HSM2_MOD_LGLKB1, IF_REAL, "Length dependence of glkb1"), IOP("lglkb2", HSM2_MOD_LGLKB2, IF_REAL, "Length dependence of glkb2"), IOP("lnftrp", HSM2_MOD_LNFTRP, IF_REAL, "Length dependence of nftrp"), IOP("lnfalp", HSM2_MOD_LNFALP, IF_REAL, "Length dependence of nfalp"), IOP("lvdiffj", HSM2_MOD_LVDIFFJ, IF_REAL, "Length dependence of vdiffj"), IOP("libpc1", HSM2_MOD_LIBPC1, IF_REAL, "Length dependence of ibpc1"), IOP("libpc2", HSM2_MOD_LIBPC2, IF_REAL, "Length dependence of ibpc2"), /* Width dependence */ IOP("wvmax", HSM2_MOD_WVMAX, IF_REAL, "Width dependence of vmax"), IOP("wbgtmp1", HSM2_MOD_WBGTMP1, IF_REAL, "Width dependence of bgtmp1"), IOP("wbgtmp2", HSM2_MOD_WBGTMP2, IF_REAL, "Width dependence of bgtmp2"), IOP("weg0", HSM2_MOD_WEG0, IF_REAL, "Width dependence of eg0"), IOP("wlover", HSM2_MOD_WLOVER, IF_REAL, "Width dependence of lover"), IOP("wvfbover", HSM2_MOD_WVFBOVER, IF_REAL, "Width dependence of vfbover"), IOP("wnover", HSM2_MOD_WNOVER, IF_REAL, "Width dependence of nover"), IOP("wwl2", HSM2_MOD_WWL2, IF_REAL, "Width dependence of wl2"), IOP("wvfbc", HSM2_MOD_WVFBC, IF_REAL, "Width dependence of vfbc"), IOP("wnsubc", HSM2_MOD_WNSUBC, IF_REAL, "Width dependence of nsubc"), IOP("wnsubp", HSM2_MOD_WNSUBP, IF_REAL, "Width dependence of nsubp"), IOP("wscp1", HSM2_MOD_WSCP1, IF_REAL, "Width dependence of scp1"), IOP("wscp2", HSM2_MOD_WSCP2, IF_REAL, "Width dependence of scp2"), IOP("wscp3", HSM2_MOD_WSCP3, IF_REAL, "Width dependence of scp3"), IOP("wsc1", HSM2_MOD_WSC1, IF_REAL, "Width dependence of sc1"), IOP("wsc2", HSM2_MOD_WSC2, IF_REAL, "Width dependence of sc2"), IOP("wsc3", HSM2_MOD_WSC3, IF_REAL, "Width dependence of sc3"), IOP("wsc4", HSM2_MOD_WSC4, IF_REAL, "Width dependence of sc4"), IOP("wpgd1", HSM2_MOD_WPGD1, IF_REAL, "Width dependence of pgd1"), //IOP("wpgd3", HSM2_MOD_WPGD3, IF_REAL, "Width dependence of pgd3"), IOP("wndep", HSM2_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP("wninv", HSM2_MOD_WNINV, IF_REAL, "Width dependence of ninv"), IOP("wmuecb0", HSM2_MOD_WMUECB0, IF_REAL, "Width dependence of muecb0"), IOP("wmuecb1", HSM2_MOD_WMUECB1, IF_REAL, "Width dependence of muecb1"), IOP("wmueph1", HSM2_MOD_WMUEPH1, IF_REAL, "Width dependence of mueph1"), IOP("wvtmp", HSM2_MOD_WVTMP, IF_REAL, "Width dependence of vtmp"), IOP("wwvth0", HSM2_MOD_WWVTH0, IF_REAL, "Width dependence of wvth0"), IOP("wmuesr1", HSM2_MOD_WMUESR1, IF_REAL, "Width dependence of muesr1"), IOP("wmuetmp", HSM2_MOD_WMUETMP, IF_REAL, "Width dependence of muetmp"), IOP("wsub1", HSM2_MOD_WSUB1, IF_REAL, "Width dependence of sub1"), IOP("wsub2", HSM2_MOD_WSUB2, IF_REAL, "Width dependence of sub2"), IOP("wsvds", HSM2_MOD_WSVDS, IF_REAL, "Width dependence of svds"), IOP("wsvbs", HSM2_MOD_WSVBS, IF_REAL, "Width dependence of svbs"), IOP("wsvgs", HSM2_MOD_WSVGS, IF_REAL, "Width dependence of svgs"), IOP("wnsti", HSM2_MOD_WNSTI, IF_REAL, "Width dependence of nsti"), IOP("wwsti", HSM2_MOD_WWSTI, IF_REAL, "Width dependence of wsti"), IOP("wscsti1", HSM2_MOD_WSCSTI1, IF_REAL, "Width dependence of scsti1"), IOP("wscsti2", HSM2_MOD_WSCSTI2, IF_REAL, "Width dependence of scsti2"), IOP("wvthsti", HSM2_MOD_WVTHSTI, IF_REAL, "Width dependence of vthsti"), IOP("wmuesti1", HSM2_MOD_WMUESTI1, IF_REAL, "Width dependence of muesti1"), IOP("wmuesti2", HSM2_MOD_WMUESTI2, IF_REAL, "Width dependence of muesti2"), IOP("wmuesti3", HSM2_MOD_WMUESTI3, IF_REAL, "Width dependence of muesti3"), IOP("wnsubpsti1", HSM2_MOD_WNSUBPSTI1, IF_REAL, "Width dependence of nsubpsti1"), IOP("wnsubpsti2", HSM2_MOD_WNSUBPSTI2, IF_REAL, "Width dependence of nsubpsti2"), IOP("wnsubpsti3", HSM2_MOD_WNSUBPSTI3, IF_REAL, "Width dependence of nsubpsti3"), IOP("wnsubcsti1", HSM2_MOD_WNSUBCSTI1, IF_REAL, "Wength dependence of nsubcsti1"), IOP("wnsubcsti2", HSM2_MOD_WNSUBCSTI2, IF_REAL, "Wength dependence of nsubcsti2"), IOP("wnsubcsti3", HSM2_MOD_WNSUBCSTI3, IF_REAL, "Wength dependence of nsubcsti3"), IOP("wcgso", HSM2_MOD_WCGSO, IF_REAL, "Width dependence of cgso"), IOP("wcgdo", HSM2_MOD_WCGDO, IF_REAL, "Width dependence of cgdo"), IOP("wjs0", HSM2_MOD_WJS0, IF_REAL, "Width dependence of js0"), IOP("wjs0sw", HSM2_MOD_WJS0SW, IF_REAL, "Width dependence of js0sw"), IOP("wnj", HSM2_MOD_WNJ, IF_REAL, "Width dependence of nj"), IOP("wcisbk", HSM2_MOD_WCISBK, IF_REAL, "Width dependence of cisbk"), IOP("wclm1", HSM2_MOD_WCLM1, IF_REAL, "Width dependence of clm1"), IOP("wclm2", HSM2_MOD_WCLM2, IF_REAL, "Width dependence of clm2"), IOP("wclm3", HSM2_MOD_WCLM3, IF_REAL, "Width dependence of clm3"), IOP("wwfc", HSM2_MOD_WWFC, IF_REAL, "Width dependence of wfc"), IOP("wgidl1", HSM2_MOD_WGIDL1, IF_REAL, "Width dependence of gidl1"), IOP("wgidl2", HSM2_MOD_WGIDL2, IF_REAL, "Width dependence of gidl2"), IOP("wgleak1", HSM2_MOD_WGLEAK1, IF_REAL, "Width dependence of gleak1"), IOP("wgleak2", HSM2_MOD_WGLEAK2, IF_REAL, "Width dependence of gleak2"), IOP("wgleak3", HSM2_MOD_WGLEAK3, IF_REAL, "Width dependence of gleak3"), IOP("wgleak6", HSM2_MOD_WGLEAK6, IF_REAL, "Width dependence of gleak6"), IOP("wglksd1", HSM2_MOD_WGLKSD1, IF_REAL, "Width dependence of glksd1"), IOP("wglksd2", HSM2_MOD_WGLKSD2, IF_REAL, "Width dependence of glksd2"), IOP("wglkb1", HSM2_MOD_WGLKB1, IF_REAL, "Width dependence of glkb1"), IOP("wglkb2", HSM2_MOD_WGLKB2, IF_REAL, "Width dependence of glkb2"), IOP("wnftrp", HSM2_MOD_WNFTRP, IF_REAL, "Width dependence of nftrp"), IOP("wnfalp", HSM2_MOD_WNFALP, IF_REAL, "Width dependence of nfalp"), IOP("wvdiffj", HSM2_MOD_WVDIFFJ, IF_REAL, "Width dependence of vdiffj"), IOP("wibpc1", HSM2_MOD_WIBPC1, IF_REAL, "Width dependence of ibpc1"), IOP("wibpc2", HSM2_MOD_WIBPC2, IF_REAL, "Width dependence of ibpc2"), /* Cross-term dependence */ IOP("pvmax", HSM2_MOD_PVMAX, IF_REAL, "Cross-term dependence of vmax"), IOP("pbgtmp1", HSM2_MOD_PBGTMP1, IF_REAL, "Cross-term dependence of bgtmp1"), IOP("pbgtmp2", HSM2_MOD_PBGTMP2, IF_REAL, "Cross-term dependence of bgtmp2"), IOP("peg0", HSM2_MOD_PEG0, IF_REAL, "Cross-term dependence of eg0"), IOP("plover", HSM2_MOD_PLOVER, IF_REAL, "Cross-term dependence of lover"), IOP("pvfbover", HSM2_MOD_PVFBOVER, IF_REAL, "Cross-term dependence of vfbover"), IOP("pnover", HSM2_MOD_PNOVER, IF_REAL, "Cross-term dependence of nover"), IOP("pwl2", HSM2_MOD_PWL2, IF_REAL, "Cross-term dependence of wl2"), IOP("pvfbc", HSM2_MOD_PVFBC, IF_REAL, "Cross-term dependence of vfbc"), IOP("pnsubc", HSM2_MOD_PNSUBC, IF_REAL, "Cross-term dependence of nsubc"), IOP("pnsubp", HSM2_MOD_PNSUBP, IF_REAL, "Cross-term dependence of nsubp"), IOP("pscp1", HSM2_MOD_PSCP1, IF_REAL, "Cross-term dependence of scp1"), IOP("pscp2", HSM2_MOD_PSCP2, IF_REAL, "Cross-term dependence of scp2"), IOP("pscp3", HSM2_MOD_PSCP3, IF_REAL, "Cross-term dependence of scp3"), IOP("psc1", HSM2_MOD_PSC1, IF_REAL, "Cross-term dependence of sc1"), IOP("psc2", HSM2_MOD_PSC2, IF_REAL, "Cross-term dependence of sc2"), IOP("psc3", HSM2_MOD_PSC3, IF_REAL, "Cross-term dependence of sc3"), IOP("psc4", HSM2_MOD_PSC4, IF_REAL, "Cross-term dependence of sc4"), IOP("ppgd1", HSM2_MOD_PPGD1, IF_REAL, "Cross-term dependence of pgd1"), //IOP("ppgd3", HSM2_MOD_PPGD3, IF_REAL, "Cross-term dependence of pgd3"), IOP("pndep", HSM2_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP("pninv", HSM2_MOD_PNINV, IF_REAL, "Cross-term dependence of ninv"), IOP("pmuecb0", HSM2_MOD_PMUECB0, IF_REAL, "Cross-term dependence of muecb0"), IOP("pmuecb1", HSM2_MOD_PMUECB1, IF_REAL, "Cross-term dependence of muecb1"), IOP("pmueph1", HSM2_MOD_PMUEPH1, IF_REAL, "Cross-term dependence of mueph1"), IOP("pvtmp", HSM2_MOD_PVTMP, IF_REAL, "Cross-term dependence of vtmp"), IOP("pwvth0", HSM2_MOD_PWVTH0, IF_REAL, "Cross-term dependence of wvth0"), IOP("pmuesr1", HSM2_MOD_PMUESR1, IF_REAL, "Cross-term dependence of muesr1"), IOP("pmuetmp", HSM2_MOD_PMUETMP, IF_REAL, "Cross-term dependence of muetmp"), IOP("psub1", HSM2_MOD_PSUB1, IF_REAL, "Cross-term dependence of sub1"), IOP("psub2", HSM2_MOD_PSUB2, IF_REAL, "Cross-term dependence of sub2"), IOP("psvds", HSM2_MOD_PSVDS, IF_REAL, "Cross-term dependence of svds"), IOP("psvbs", HSM2_MOD_PSVBS, IF_REAL, "Cross-term dependence of svbs"), IOP("psvgs", HSM2_MOD_PSVGS, IF_REAL, "Cross-term dependence of svgs"), IOP("pnsti", HSM2_MOD_PNSTI, IF_REAL, "Cross-term dependence of nsti"), IOP("pwsti", HSM2_MOD_PWSTI, IF_REAL, "Cross-term dependence of wsti"), IOP("pscsti1", HSM2_MOD_PSCSTI1, IF_REAL, "Cross-term dependence of scsti1"), IOP("pscsti2", HSM2_MOD_PSCSTI2, IF_REAL, "Cross-term dependence of scsti2"), IOP("pvthsti", HSM2_MOD_PVTHSTI, IF_REAL, "Cross-term dependence of vthsti"), IOP("pmuesti1", HSM2_MOD_PMUESTI1, IF_REAL, "Cross-term dependence of muesti1"), IOP("pmuesti2", HSM2_MOD_PMUESTI2, IF_REAL, "Cross-term dependence of muesti2"), IOP("pmuesti3", HSM2_MOD_PMUESTI3, IF_REAL, "Cross-term dependence of muesti3"), IOP("pnsubpsti1", HSM2_MOD_PNSUBPSTI1, IF_REAL, "Cross-term dependence of nsubpsti1"), IOP("pnsubpsti2", HSM2_MOD_PNSUBPSTI2, IF_REAL, "Cross-term dependence of nsubpsti2"), IOP("pnsubpsti3", HSM2_MOD_PNSUBPSTI3, IF_REAL, "Cross-term dependence of nsubpsti3"), IOP("pnsubcsti1", HSM2_MOD_PNSUBCSTI1, IF_REAL, "Cross-term dependence of nsubcsti1"), IOP("pnsubcsti2", HSM2_MOD_PNSUBCSTI2, IF_REAL, "Cross-term dependence of nsubcsti2"), IOP("pnsubcsti3", HSM2_MOD_PNSUBCSTI3, IF_REAL, "Cross-term dependence of nsubcsti3"), IOP("pcgso", HSM2_MOD_PCGSO, IF_REAL, "Cross-term dependence of cgso"), IOP("pcgdo", HSM2_MOD_PCGDO, IF_REAL, "Cross-term dependence of cgdo"), IOP("pjs0", HSM2_MOD_PJS0, IF_REAL, "Cross-term dependence of js0"), IOP("pjs0sw", HSM2_MOD_PJS0SW, IF_REAL, "Cross-term dependence of js0sw"), IOP("pnj", HSM2_MOD_PNJ, IF_REAL, "Cross-term dependence of nj"), IOP("pcisbk", HSM2_MOD_PCISBK, IF_REAL, "Cross-term dependence of cisbk"), IOP("pclm1", HSM2_MOD_PCLM1, IF_REAL, "Cross-term dependence of clm1"), IOP("pclm2", HSM2_MOD_PCLM2, IF_REAL, "Cross-term dependence of clm2"), IOP("pclm3", HSM2_MOD_PCLM3, IF_REAL, "Cross-term dependence of clm3"), IOP("pwfc", HSM2_MOD_PWFC, IF_REAL, "Cross-term dependence of wfc"), IOP("pgidl1", HSM2_MOD_PGIDL1, IF_REAL, "Cross-term dependence of gidl1"), IOP("pgidl2", HSM2_MOD_PGIDL2, IF_REAL, "Cross-term dependence of gidl2"), IOP("pgleak1", HSM2_MOD_PGLEAK1, IF_REAL, "Cross-term dependence of gleak1"), IOP("pgleak2", HSM2_MOD_PGLEAK2, IF_REAL, "Cross-term dependence of gleak2"), IOP("pgleak3", HSM2_MOD_PGLEAK3, IF_REAL, "Cross-term dependence of gleak3"), IOP("pgleak6", HSM2_MOD_PGLEAK6, IF_REAL, "Cross-term dependence of gleak6"), IOP("pglksd1", HSM2_MOD_PGLKSD1, IF_REAL, "Cross-term dependence of glksd1"), IOP("pglksd2", HSM2_MOD_PGLKSD2, IF_REAL, "Cross-term dependence of glksd2"), IOP("pglkb1", HSM2_MOD_PGLKB1, IF_REAL, "Cross-term dependence of glkb1"), IOP("pglkb2", HSM2_MOD_PGLKB2, IF_REAL, "Cross-term dependence of glkb2"), IOP("pnftrp", HSM2_MOD_PNFTRP, IF_REAL, "Cross-term dependence of nftrp"), IOP("pnfalp", HSM2_MOD_PNFALP, IF_REAL, "Cross-term dependence of nfalp"), IOP("pvdiffj", HSM2_MOD_PVDIFFJ, IF_REAL, "Cross-term dependence of vdiffj"), IOP("pibpc1", HSM2_MOD_PIBPC1, IF_REAL, "Cross-term dependence of ibpc1"), IOP("pibpc2", HSM2_MOD_PIBPC2, IF_REAL, "Cross-term dependence of ibpc2"), IOP("vgs_max", HSM2_MOD_VGS_MAX, IF_REAL, "maximum voltage G-S branch"), IOP("vgd_max", HSM2_MOD_VGD_MAX, IF_REAL, "maximum voltage G-D branch"), IOP("vgb_max", HSM2_MOD_VGB_MAX, IF_REAL, "maximum voltage G-B branch"), IOP("vds_max", HSM2_MOD_VDS_MAX, IF_REAL, "maximum voltage D-S branch"), IOP("vbs_max", HSM2_MOD_VBS_MAX, IF_REAL, "maximum voltage B-S branch"), IOP("vbd_max", HSM2_MOD_VBD_MAX, IF_REAL, "maximum voltage B-D branch") }; char *HSM2names[] = { "Drain", "Gate", "Source", "Bulk" }; int HSM2nSize = NUMELEMS(HSM2names); int HSM2pTSize = NUMELEMS(HSM2pTable); int HSM2mPTSize = NUMELEMS(HSM2mPTable); int HSM2iSize = sizeof(HSM2instance); int HSM2mSize = sizeof(HSM2model); ngspice-26/src/spicelib/devices/hisim2/hsm2evalenv.h0000644000265600020320000000472512264261473022042 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2evalenv.h Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #ifndef HSM2_EVAL_ENV_H #define HSM2_EVAL_ENV_H /* macros and constants used in hsm2eval2yz.c */ /*---------------------------------------------------* * Numerical constants. (macro) *-----------------*/ /* machine epsilon */ #if defined(_FLOAT_H) && defined(DBL_EPSILON) #define C_EPS_M (DBL_EPSILON) #else #define C_EPS_M (2.2204460492503131e-16) #endif #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THR 34.0 /* sqrt(2) */ #define C_SQRT_2 (1.414213562373095e+00) /* 1/3 */ #define C_1o3 (3.333333333333333e-01) /* 2/3 */ #define C_2o3 (6.666666666666667e-01) /* 2^(1/3) */ #define C_2p_1o3 (1.259921049894873e+00) /* Pi */ #define C_Pi (3.141592653589793) #define C_Pio2 (1.570796326794897) /* Unit change */ #define C_m2cm (1.0e2) #define C_m2cm_p2 (1.0e4) #define C_m2cm_p1o2 (1.0e1) #define C_m2um (1.0e6) #define C_cm2m_p3 (1.0e-6) #define C_vmax (1.0e5) #define C_E0_p2 (1.0e9) /*---------------------------------------------------* * Physical constants/properties. (macro) *-----------------*/ /* Elemental charge */ #define C_QE (1.6021918e-19) /* Boltzmann constant */ #define C_KB (1.3806226e-23) /* Permitivity of Si, SiO2 and vacuum */ #define C_ESI (1.034943e-10) #define C_EOX (3.453133e-11) #define C_VAC (8.8541878e-12) /* Room temperature constants */ #define C_T300 (300e+00) #define C_b300 (3.868283e+01) /* #define C_Eg0 (1.1785e0) */ /*changed to parameter sIN.eg0*/ /* Build-in potential */ /*#define C_Vbi (1.0e0)*/ /* changed to parameter sIN.vbi */ /* Intrinsic carrier density at 300K */ #define C_Nin0 (1.04e+16) /*---------------------------------------------------* * Functions. (macro) Take care of the arguments. *-----------------*/ #define Fn_Sqr(x) ( (x)*(x) ) /* x^2 */ #define Fn_Max(x,y) ( (x) >= (y) ? (x) : (y) ) /* max[x,y] */ #define Fn_Min(x,y) ( (x) <= (y) ? (x) : (y) ) /* min[x,y] */ #define Fn_Sgn(x) ( (x) >= 0 ? (1) : (-1) ) /* sign[x] */ #endif /* HSM2_EVAL_ENV_H */ ngspice-26/src/spicelib/devices/hisim2/hisim2.h0000644000265600020320000000262012264261473020773 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hisim2.h Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "hsm2def.h" #include "ngspice/cktdefs.h" #ifndef _HiSIM2_H #define _HiSIM2_H /* return value */ #ifndef OK #define HiSIM_OK 0 #define HiSIM_ERROR 1 #else #define HiSIM_OK OK #define HiSIM_ERROR E_PANIC #endif /* MOS type */ #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /* device working mode */ #ifndef CMI_NORMAL_MODE #define HiSIM_NORMAL_MODE 1 #define HiSIM_REVERSE_MODE -1 #else #define HiSIM_NORMAL_MODE CMI_NORMAL_MODE #define HiSIM_REVERSE_MODE CMI_REVERSE_MODE #endif /* others */ #ifndef NULL #define NULL 0 #endif #define HiSIM_FALSE 0 #define HiSIM_TRUE 1 #ifndef return_if_error #define return_if_error(s) { int error = s; if(error) return(error); } #endif extern int HSM2evaluate ( double ivds, double ivgs, double ivbs, double vbs_jct, double vbd_jct, HSM2instance *here, HSM2model *model, CKTcircuit *ckt ) ; #endif /* _HiSIM2_H */ ngspice-26/src/spicelib/devices/hisim2/hsm2del.c0000644000265600020320000000223712264261473021135 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2del.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int HSM2delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { HSM2instance **fast = (HSM2instance**)inInst; HSM2model *model = (HSM2model*)inModel; HSM2instance **prev = NULL; HSM2instance *here; for( ;model ;model = model->HSM2nextModel ) { prev = &(model->HSM2instances); for ( here = *prev ;here ;here = *prev ) { if ( here->HSM2name == name || (fast && here==*fast) ) { *prev= here->HSM2nextInstance; FREE(here); return(OK); } prev = &(here->HSM2nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/hisim2/hsm2pzld.c0000644000265600020320000002610312264261473021340 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2pzld.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "hsm2def.h" #include "ngspice/suffix.h" int HSM2pzLoad( GENmodel *inModel, register CKTcircuit *ckt, register SPcomplex *s) { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb = 0.0, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb = 0.0, xcssb, xcsbb; double xcdbdb = 0.0, xcsbsb = 0.0; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, FwdSum, RevSum, gm, gmbs; double gjbd, gjbs, grg; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIstotg, gIstotd, gIstots, gIstotb; NG_IGNORE(ckt); for ( ;model != NULL ;model = model->HSM2nextModel ) { for ( here = model->HSM2instances ;here!= NULL ; here = here->HSM2nextInstance ) { if ( here->HSM2_mode >= 0 ) { gm = here->HSM2_gm; gmbs = here->HSM2_gmbs; FwdSum = gm + gmbs; RevSum = 0.0; gbbdp = -here->HSM2_gbds; gbbsp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = here->HSM2_gbgs; gbdpdp = here->HSM2_gbds; gbdpb = here->HSM2_gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; cggb = here->HSM2_cggb; cgsb = here->HSM2_cgsb; cgdb = here->HSM2_cgdb; cbgb = here->HSM2_cbgb; cbsb = here->HSM2_cbsb; cbdb = here->HSM2_cbdb; cdgb = here->HSM2_cdgb; cdsb = here->HSM2_cdsb; cddb = here->HSM2_cddb; } else { gm = -here->HSM2_gm; gmbs = -here->HSM2_gmbs; FwdSum = 0.0; RevSum = -(gm + gmbs); gbbsp = -here->HSM2_gbds; gbbdp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; gbspg = here->HSM2_gbgs; gbspsp = here->HSM2_gbds; gbspb = here->HSM2_gbbs; gbspdp = -(gbspg + gbspsp + gbspb); cggb = here->HSM2_cggb; cgsb = here->HSM2_cgdb; cgdb = here->HSM2_cgsb; cbgb = here->HSM2_cbgb; cbsb = here->HSM2_cbdb; cbdb = here->HSM2_cbsb; cdgb = -(here->HSM2_cdgb + cggb + cbgb); cdsb = -(here->HSM2_cddb + cgsb + cbsb); cddb = -(here->HSM2_cdsb + cgdb + cbdb); } gdpr = here->HSM2drainConductance; gspr = here->HSM2sourceConductance; gds = here->HSM2_gds; gbd = here->HSM2_gbd; gbs = here->HSM2_gbs; capbd = here->HSM2_capbd; capbs = here->HSM2_capbs; xcdgb = cdgb; xcddb = cddb + capbd; xcdsb = cdsb; xcdbb = -(xcdgb + xcddb + xcdsb); if (here->HSM2_corbnet == 1) xcdbb += capbd; xcsgb = -(cggb + cbgb + cdgb); xcsdb = -(cgdb + cbdb + cddb); xcssb = capbs - (cgsb + cbsb + cdsb); xcsbb = -(xcsgb + xcsdb + xcssb); if (here->HSM2_corbnet == 1) xcsbb += capbs; xcggb = cggb; xcgdb = cgdb; xcgsb = cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); xcbgb = cbgb; if (!here->HSM2_corbnet) { xcbdb = cbdb - capbd; xcbsb = cbsb - capbs; } else { xcbdb = cbdb; xcbsb = cbsb; xcdbdb = - capbd; xcsbsb = - capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb); if (!here->HSM2_corbnet) { gjbd = gbd; gjbs = gbs; } else gjbd = gjbs = 0.0; if (here->HSM2_corg == 1) { grg = here->HSM2_grg; *(here->HSM2GgPtr) += grg; *(here->HSM2GPgPtr) -= grg; *(here->HSM2GgpPtr) -= grg; *(here->HSM2GPdpPtr ) += xcgdb * s->real; *(here->HSM2GPdpPtr +1) += xcgdb * s->imag; *(here->HSM2GPdpPtr) += grg + gIgtotd; *(here->HSM2GPgpPtr ) += xcggb * s->real; *(here->HSM2GPgpPtr +1) += xcggb * s->imag; *(here->HSM2GPgpPtr) += gIgtotg; *(here->HSM2GPspPtr ) += xcgsb * s->real; *(here->HSM2GPspPtr +1) += xcgsb * s->imag; *(here->HSM2GPspPtr) += gIgtots; *(here->HSM2GPbpPtr ) += xcgbb * s->real; *(here->HSM2GPbpPtr +1) += xcgbb * s->imag; *(here->HSM2GPbpPtr) += gIgtotb; } else { *(here->HSM2GPdpPtr ) += xcgdb * s->real; *(here->HSM2GPdpPtr +1) += xcgdb * s->imag; *(here->HSM2GPdpPtr) += gIgtotd; *(here->HSM2GPgpPtr ) += xcggb * s->real; *(here->HSM2GPgpPtr +1) += xcggb * s->imag; *(here->HSM2GPgpPtr) += gIgtotg; *(here->HSM2GPspPtr ) += xcgsb * s->real; *(here->HSM2GPspPtr +1) += xcgsb * s->imag; *(here->HSM2GPspPtr) += gIgtots; *(here->HSM2GPbpPtr ) += xcgbb * s->real; *(here->HSM2GPbpPtr +1) += xcgbb * s->imag; *(here->HSM2GPbpPtr) += gIgtotb; } *(here->HSM2DPdpPtr ) += xcddb * s->real; *(here->HSM2DPdpPtr +1) += xcddb * s->imag; *(here->HSM2DPdpPtr) += gdpr + gds + gbd + RevSum + gbdpdp - gIdtotd; *(here->HSM2DPdPtr) -= gdpr; *(here->HSM2DPgpPtr ) += xcdgb * s->real; *(here->HSM2DPgpPtr +1) += xcdgb * s->imag; *(here->HSM2DPgpPtr) += gm + gbdpg - gIdtotg; *(here->HSM2DPspPtr ) += xcdsb * s->real; *(here->HSM2DPspPtr +1) += xcdsb * s->imag; *(here->HSM2DPspPtr) -= gds + FwdSum - gbdpsp + gIdtots; *(here->HSM2DPbpPtr ) += xcdbb * s->real; *(here->HSM2DPbpPtr +1) += xcdbb * s->imag; *(here->HSM2DPbpPtr) -= gjbd - gmbs - gbdpb + gIdtotb; *(here->HSM2DdpPtr) -= gdpr; *(here->HSM2DdPtr) += gdpr; *(here->HSM2SPdpPtr ) += xcsdb * s->real; *(here->HSM2SPdpPtr +1) += xcsdb * s->imag; *(here->HSM2SPdpPtr) -= gds + RevSum - gbspdp + gIstotd; *(here->HSM2SPgpPtr ) += xcsgb * s->real; *(here->HSM2SPgpPtr +1) += xcsgb * s->imag; *(here->HSM2SPgpPtr) -= gm - gbspg + gIstotg; *(here->HSM2SPspPtr ) += xcssb * s->real; *(here->HSM2SPspPtr +1) += xcssb * s->imag; *(here->HSM2SPspPtr) += gspr + gds + gbs + FwdSum + gbspsp - gIstots; *(here->HSM2SPsPtr) -= gspr; *(here->HSM2SPbpPtr ) += xcsbb * s->real; *(here->HSM2SPbpPtr +1) += xcsbb * s->imag; *(here->HSM2SPbpPtr) -= gjbs + gmbs - gbspb + gIstotb; *(here->HSM2SspPtr) -= gspr; *(here->HSM2SsPtr) += gspr; *(here->HSM2BPdpPtr ) += xcbdb * s->real; *(here->HSM2BPdpPtr +1) += xcbdb * s->imag; *(here->HSM2BPdpPtr) -= gjbd - gbbdp + gIbtotd; *(here->HSM2BPgpPtr ) += xcbgb * s->real; *(here->HSM2BPgpPtr +1) += xcbgb * s->imag; *(here->HSM2BPgpPtr) -= here->HSM2_gbgs + gIbtotg; *(here->HSM2BPspPtr ) += xcbsb * s->real; *(here->HSM2BPspPtr +1) += xcbsb * s->imag; *(here->HSM2BPspPtr) -= gjbs - gbbsp + gIbtots; *(here->HSM2BPbpPtr ) += xcbbb * s->real; *(here->HSM2BPbpPtr +1) += xcbbb * s->imag; *(here->HSM2BPbpPtr) += gjbd + gjbs - here->HSM2_gbbs - gIbtotb; if (model->HSM2_cogidl) { /* stamp gidl */ *(here->HSM2DPdpPtr) += here->HSM2_gigidlds; *(here->HSM2DPgpPtr) += here->HSM2_gigidlgs; *(here->HSM2DPspPtr) -= (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs); *(here->HSM2DPbpPtr) += here->HSM2_gigidlbs; *(here->HSM2BPdpPtr) -= here->HSM2_gigidlds; *(here->HSM2BPgpPtr) -= here->HSM2_gigidlgs; *(here->HSM2BPspPtr) += (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs); *(here->HSM2BPbpPtr) -= here->HSM2_gigidlbs; /* stamp gisl */ *(here->HSM2SPdpPtr) -= (here->HSM2_gigislsd + here->HSM2_gigislgd + here->HSM2_gigislbd); *(here->HSM2SPgpPtr) += here->HSM2_gigislgd; *(here->HSM2SPspPtr) += here->HSM2_gigislsd; *(here->HSM2SPbpPtr) += here->HSM2_gigislbd; *(here->HSM2BPdpPtr) += (here->HSM2_gigislgd + here->HSM2_gigislsd + here->HSM2_gigislbd); *(here->HSM2BPgpPtr) -= here->HSM2_gigislgd; *(here->HSM2BPspPtr) -= here->HSM2_gigislsd; *(here->HSM2BPbpPtr) -= here->HSM2_gigislbd; } if (here->HSM2_corbnet) { *(here->HSM2DPdbPtr ) += xcdbdb * s->real; *(here->HSM2DPdbPtr +1) += xcdbdb * s->imag; *(here->HSM2DPdbPtr) -= gbd; *(here->HSM2SPsbPtr ) += xcsbsb * s->real; *(here->HSM2SPsbPtr +1) += xcsbsb * s->imag; *(here->HSM2SPsbPtr) -= gbs; *(here->HSM2DBdpPtr ) += xcdbdb * s->real; *(here->HSM2DBdpPtr +1) += xcdbdb * s->imag; *(here->HSM2DBdpPtr) -= gbd; *(here->HSM2DBdbPtr ) -= xcdbdb * s->real; *(here->HSM2DBdbPtr +1) -= xcdbdb * s->imag; *(here->HSM2DBdbPtr) += gbd + here->HSM2_grbpd + here->HSM2_grbdb; *(here->HSM2DBbpPtr) -= here->HSM2_grbpd; *(here->HSM2DBbPtr) -= here->HSM2_grbdb; *(here->HSM2BPdbPtr) -= here->HSM2_grbpd; *(here->HSM2BPbPtr) -= here->HSM2_grbpb; *(here->HSM2BPsbPtr) -= here->HSM2_grbps; *(here->HSM2BPbpPtr) += here->HSM2_grbpd + here->HSM2_grbps + here->HSM2_grbpb; *(here->HSM2SBspPtr ) += xcsbsb * s->real; *(here->HSM2SBspPtr +1) += xcsbsb * s->imag; *(here->HSM2SBspPtr) -= gbs; *(here->HSM2SBbpPtr) -= here->HSM2_grbps; *(here->HSM2SBbPtr) -= here->HSM2_grbsb; *(here->HSM2SBsbPtr ) -= xcsbsb * s->real; *(here->HSM2SBsbPtr +1) -= xcsbsb * s->imag; *(here->HSM2SBsbPtr) += gbs + here->HSM2_grbps + here->HSM2_grbsb; *(here->HSM2BdbPtr) -= here->HSM2_grbdb; *(here->HSM2BbpPtr) -= here->HSM2_grbpb; *(here->HSM2BsbPtr) -= here->HSM2_grbsb; *(here->HSM2BbPtr) += here->HSM2_grbsb + here->HSM2_grbdb + here->HSM2_grbpb; } } } return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2init.h0000644000265600020320000000037412264261473021341 0ustar andreasadmin#ifndef _HISIM2INIT_H #define _HISIM2INIT_H extern IFparm HSM2pTable[ ]; extern IFparm HSM2mPTable[ ]; extern char *HSM2names[ ]; extern int HSM2pTSize; extern int HSM2mPTSize; extern int HSM2nSize; extern int HSM2iSize; extern int HSM2mSize; #endif ngspice-26/src/spicelib/devices/hisim2/hsm2itf.h0000644000265600020320000000011712264261473021153 0ustar andreasadmin #ifndef DEV_HISIM2 #define DEV_HISIM2 SPICEdev *get_hsm2_info(void); #endif ngspice-26/src/spicelib/devices/hisim2/hsm2trunc.c0000644000265600020320000000257712264261473021533 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2trunc.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2trunc( GENmodel *inModel, register CKTcircuit *ckt, double *timeStep) { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for ( ;model != NULL ;model = model->HSM2nextModel ) { for ( here=model->HSM2instances ;here!=NULL ; here = here->HSM2nextInstance ) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->HSM2qb,ckt,timeStep); CKTterr(here->HSM2qg,ckt,timeStep); CKTterr(here->HSM2qd,ckt,timeStep); #ifdef STEPDEBUG if ( debugtemp != *timeStep ) printf("device %s reduces step from %g to %g\n", here->HSM2name, debugtemp, *timeStep); #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2mask.c0000644000265600020320000012216012264261473021322 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2mask.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { HSM2model *model = (HSM2model *)inst; NG_IGNORE(ckt); switch (which) { case HSM2_MOD_NMOS: value->iValue = model->HSM2_type; return(OK); case HSM2_MOD_PMOS: value->iValue = model->HSM2_type; return(OK); case HSM2_MOD_LEVEL: value->iValue = model->HSM2_level; return(OK); case HSM2_MOD_INFO: value->iValue = model->HSM2_info; return(OK); case HSM2_MOD_NOISE: value->iValue = model->HSM2_noise; return(OK); case HSM2_MOD_VERSION: value->iValue = model->HSM2_version; return(OK); case HSM2_MOD_SHOW: value->iValue = model->HSM2_show; return(OK); case HSM2_MOD_CORSRD: value->iValue = model->HSM2_corsrd; return(OK); case HSM2_MOD_CORG: value->iValue = model->HSM2_corg; return(OK); case HSM2_MOD_COIPRV: value->iValue = model->HSM2_coiprv; return(OK); case HSM2_MOD_COPPRV: value->iValue = model->HSM2_copprv; return(OK); case HSM2_MOD_COADOV: value->iValue = model->HSM2_coadov; return(OK); case HSM2_MOD_COISUB: value->iValue = model->HSM2_coisub; return(OK); case HSM2_MOD_COIIGS: value->iValue = model->HSM2_coiigs; return(OK); case HSM2_MOD_COGIDL: value->iValue = model->HSM2_cogidl; return(OK); case HSM2_MOD_COOVLP: value->iValue = model->HSM2_coovlp; return(OK); case HSM2_MOD_COFLICK: value->iValue = model->HSM2_coflick; return(OK); case HSM2_MOD_COISTI: value->iValue = model->HSM2_coisti; return(OK); case HSM2_MOD_CONQS: value->iValue = model->HSM2_conqs; return(OK); case HSM2_MOD_CORBNET: value->iValue = model->HSM2_corbnet; return(OK); case HSM2_MOD_COTHRML: value->iValue = model->HSM2_cothrml; return(OK); case HSM2_MOD_COIGN: value->iValue = model->HSM2_coign; return(OK); case HSM2_MOD_CODFM: value->iValue = model->HSM2_codfm; return(OK); case HSM2_MOD_CORECIP: value->iValue = model->HSM2_corecip; return(OK); case HSM2_MOD_COQY: value->iValue = model->HSM2_coqy; return(OK); case HSM2_MOD_COQOVSM: value->iValue = model->HSM2_coqovsm; return(OK); case HSM2_MOD_COERRREP: value->iValue = model->HSM2_coerrrep; return(OK); case HSM2_MOD_VMAX: value->rValue = model->HSM2_vmax; return(OK); case HSM2_MOD_BGTMP1: value->rValue = model->HSM2_bgtmp1; return(OK); case HSM2_MOD_BGTMP2: value->rValue = model->HSM2_bgtmp2; return(OK); case HSM2_MOD_EG0: value->rValue = model->HSM2_eg0; return(OK); case HSM2_MOD_TOX: value->rValue = model->HSM2_tox; return(OK); case HSM2_MOD_XLD: value->rValue = model->HSM2_xld; return(OK); case HSM2_MOD_LOVER: value->rValue = model->HSM2_lover; return(OK); case HSM2_MOD_DDLTMAX: /* Vdseff */ value->rValue = model->HSM2_ddltmax; return(OK); case HSM2_MOD_DDLTSLP: /* Vdseff */ value->rValue = model->HSM2_ddltslp; return(OK); case HSM2_MOD_DDLTICT: /* Vdseff */ value->rValue = model->HSM2_ddltict; return(OK); case HSM2_MOD_VFBOVER: value->rValue = model->HSM2_vfbover; return(OK); case HSM2_MOD_NOVER: value->rValue = model->HSM2_nover; return(OK); case HSM2_MOD_XWD: value->rValue = model->HSM2_xwd; return(OK); case HSM2_MOD_XL: value->rValue = model->HSM2_xl; return(OK); case HSM2_MOD_XW: value->rValue = model->HSM2_xw; return(OK); case HSM2_MOD_SAREF: value->rValue = model->HSM2_saref; return(OK); case HSM2_MOD_SBREF: value->rValue = model->HSM2_sbref; return(OK); case HSM2_MOD_LL: value->rValue = model->HSM2_ll; return(OK); case HSM2_MOD_LLD: value->rValue = model->HSM2_lld; return(OK); case HSM2_MOD_LLN: value->rValue = model->HSM2_lln; return(OK); case HSM2_MOD_WL: value->rValue = model->HSM2_wl; return(OK); case HSM2_MOD_WL1: value->rValue = model->HSM2_wl1; return(OK); case HSM2_MOD_WL1P: value->rValue = model->HSM2_wl1p; return(OK); case HSM2_MOD_WL2: value->rValue = model->HSM2_wl2; return(OK); case HSM2_MOD_WL2P: value->rValue = model->HSM2_wl2p; return(OK); case HSM2_MOD_WLD: value->rValue = model->HSM2_wld; return(OK); case HSM2_MOD_WLN: value->rValue = model->HSM2_wln; return(OK); case HSM2_MOD_XQY: value->rValue = model->HSM2_xqy; return(OK); case HSM2_MOD_XQY1: value->rValue = model->HSM2_xqy1; return(OK); case HSM2_MOD_XQY2: value->rValue = model->HSM2_xqy2; return(OK); case HSM2_MOD_QYRAT: value->rValue = model->HSM2_qyrat; return(OK); case HSM2_MOD_RS: value->rValue = model->HSM2_rs; return(OK); case HSM2_MOD_RD: value->rValue = model->HSM2_rd; return(OK); case HSM2_MOD_RSH: value->rValue = model->HSM2_rsh; return(OK); case HSM2_MOD_RSHG: value->rValue = model->HSM2_rshg; return(OK); /* case HSM2_MOD_NGCON: */ /* value->rValue = model->HSM2_ngcon; */ /* return(OK); */ /* case HSM2_MOD_XGW: */ /* value->rValue = model->HSM2_xgw; */ /* return(OK); */ /* case HSM2_MOD_XGL: */ /* value->rValue = model->HSM2_xgl; */ /* return(OK); */ /* case HSM2_MOD_NF: */ /* value->rValue = model->HSM2_nf; */ /* return(OK); */ case HSM2_MOD_VFBC: value->rValue = model->HSM2_vfbc; return(OK); case HSM2_MOD_VBI: value->rValue = model->HSM2_vbi; return(OK); case HSM2_MOD_NSUBC: value->rValue = model->HSM2_nsubc; return(OK); case HSM2_MOD_VFBCL: value->rValue = model->HSM2_vfbcl; return(OK); case HSM2_MOD_VFBCLP: value->rValue = model->HSM2_vfbclp; return(OK); case HSM2_MOD_PARL2: value->rValue = model->HSM2_parl2; return(OK); case HSM2_MOD_LP: value->rValue = model->HSM2_lp; return(OK); case HSM2_MOD_NSUBP: value->rValue = model->HSM2_nsubp; return(OK); case HSM2_MOD_NSUBPL: value->rValue = model->HSM2_nsubpl; return(OK); case HSM2_MOD_NSUBPFAC: value->rValue = model->HSM2_nsubpfac; return(OK); case HSM2_MOD_NSUBPDLT: value->rValue = model->HSM2_nsubpdlt; return(OK); case HSM2_MOD_NSUBPW: value->rValue = model->HSM2_nsubpw; return(OK); case HSM2_MOD_NSUBPWP: value->rValue = model->HSM2_nsubpwp; return(OK); case HSM2_MOD_SCP1: value->rValue = model->HSM2_scp1; return(OK); case HSM2_MOD_SCP2: value->rValue = model->HSM2_scp2; return(OK); case HSM2_MOD_SCP3: value->rValue = model->HSM2_scp3; return(OK); case HSM2_MOD_SC1: value->rValue = model->HSM2_sc1; return(OK); case HSM2_MOD_SC2: value->rValue = model->HSM2_sc2; return(OK); case HSM2_MOD_SC3: value->rValue = model->HSM2_sc3; return(OK); case HSM2_MOD_SC4: value->rValue = model->HSM2_sc4; return(OK); case HSM2_MOD_PGD1: value->rValue = model->HSM2_pgd1; return(OK); case HSM2_MOD_PGD2: value->rValue = model->HSM2_pgd2; return(OK); //case HSM2_MOD_PGD3: // value->rValue = model->HSM2_pgd3; // return(OK); case HSM2_MOD_PGD4: value->rValue = model->HSM2_pgd4; return(OK); case HSM2_MOD_NDEP: value->rValue = model->HSM2_ndep; return(OK); case HSM2_MOD_NDEPL: value->rValue = model->HSM2_ndepl; return(OK); case HSM2_MOD_NDEPLP: value->rValue = model->HSM2_ndeplp; return(OK); case HSM2_MOD_NDEPW: value->rValue = model->HSM2_ndepw; return(OK); case HSM2_MOD_NDEPWP: value->rValue = model->HSM2_ndepwp; return(OK); case HSM2_MOD_NINV: value->rValue = model->HSM2_ninv; return(OK); case HSM2_MOD_NINVD: value->rValue = model->HSM2_ninvd; return(OK); case HSM2_MOD_MUECB0: value->rValue = model->HSM2_muecb0; return(OK); case HSM2_MOD_MUECB1: value->rValue = model->HSM2_muecb1; return(OK); case HSM2_MOD_MUEPH1: value->rValue = model->HSM2_mueph1; return(OK); case HSM2_MOD_MUEPH0: value->rValue = model->HSM2_mueph0; return(OK); case HSM2_MOD_MUEPHW: value->rValue = model->HSM2_muephw; return(OK); case HSM2_MOD_MUEPWP: value->rValue = model->HSM2_muepwp; return(OK); case HSM2_MOD_MUEPWD: value->rValue = model->HSM2_muepwd; return(OK); case HSM2_MOD_MUEPHL: value->rValue = model->HSM2_muephl; return(OK); case HSM2_MOD_MUEPLP: value->rValue = model->HSM2_mueplp; return(OK); case HSM2_MOD_MUEPLD: value->rValue = model->HSM2_muepld; return(OK); case HSM2_MOD_MUEPHS: value->rValue = model->HSM2_muephs; return(OK); case HSM2_MOD_MUEPSP: value->rValue = model->HSM2_muepsp; return(OK); case HSM2_MOD_VTMP: value->rValue = model->HSM2_vtmp; return(OK); case HSM2_MOD_WVTH0: value->rValue = model->HSM2_wvth0; return(OK); case HSM2_MOD_MUESR1: value->rValue = model->HSM2_muesr1; return(OK); case HSM2_MOD_MUESR0: value->rValue = model->HSM2_muesr0; return(OK); case HSM2_MOD_MUESRL: value->rValue = model->HSM2_muesrl; return(OK); case HSM2_MOD_MUESLP: value->rValue = model->HSM2_mueslp; return(OK); case HSM2_MOD_MUESRW: value->rValue = model->HSM2_muesrw; return(OK); case HSM2_MOD_MUESWP: value->rValue = model->HSM2_mueswp; return(OK); case HSM2_MOD_BB: value->rValue = model->HSM2_bb; return(OK); case HSM2_MOD_SUB1: value->rValue = model->HSM2_sub1; return(OK); case HSM2_MOD_SUB2: value->rValue = model->HSM2_sub2; return(OK); case HSM2_MOD_SVGS: value->rValue = model->HSM2_svgs; return(OK); case HSM2_MOD_SVGSL: value->rValue = model->HSM2_svgsl; return(OK); case HSM2_MOD_SVGSLP: value->rValue = model->HSM2_svgslp; return(OK); case HSM2_MOD_SVGSW: value->rValue = model->HSM2_svgsw; return(OK); case HSM2_MOD_SVGSWP: value->rValue = model->HSM2_svgswp; return(OK); case HSM2_MOD_SVBS: value->rValue = model->HSM2_svbs; return(OK); case HSM2_MOD_SVBSL: value->rValue = model->HSM2_svbsl; return(OK); case HSM2_MOD_SVBSLP: value->rValue = model->HSM2_svbslp; return(OK); case HSM2_MOD_SVDS: value->rValue = model->HSM2_svds; return(OK); case HSM2_MOD_SLG: value->rValue = model->HSM2_slg; return(OK); case HSM2_MOD_SLGL: value->rValue = model->HSM2_slgl; return(OK); case HSM2_MOD_SLGLP: value->rValue = model->HSM2_slglp; return(OK); case HSM2_MOD_SUB1L: value->rValue = model->HSM2_sub1l; return(OK); case HSM2_MOD_SUB1LP: value->rValue = model->HSM2_sub1lp; return(OK); case HSM2_MOD_SUB2L: value->rValue = model->HSM2_sub2l; return(OK); case HSM2_MOD_NSTI: value->rValue = model->HSM2_nsti; return(OK); case HSM2_MOD_WSTI: value->rValue = model->HSM2_wsti; return(OK); case HSM2_MOD_WSTIL: value->rValue = model->HSM2_wstil; return(OK); case HSM2_MOD_WSTILP: value->rValue = model->HSM2_wstilp; return(OK); case HSM2_MOD_WSTIW: value->rValue = model->HSM2_wstiw; return(OK); case HSM2_MOD_WSTIWP: value->rValue = model->HSM2_wstiwp; return(OK); case HSM2_MOD_SCSTI1: value->rValue = model->HSM2_scsti1; return(OK); case HSM2_MOD_SCSTI2: value->rValue = model->HSM2_scsti2; return(OK); case HSM2_MOD_VTHSTI: value->rValue = model->HSM2_vthsti; return(OK); case HSM2_MOD_VDSTI: value->rValue = model->HSM2_vdsti; return(OK); case HSM2_MOD_MUESTI1: value->rValue = model->HSM2_muesti1; return(OK); case HSM2_MOD_MUESTI2: value->rValue = model->HSM2_muesti2; return(OK); case HSM2_MOD_MUESTI3: value->rValue = model->HSM2_muesti3; return(OK); case HSM2_MOD_NSUBPSTI1: value->rValue = model->HSM2_nsubpsti1; return(OK); case HSM2_MOD_NSUBPSTI2: value->rValue = model->HSM2_nsubpsti2; return(OK); case HSM2_MOD_NSUBPSTI3: value->rValue = model->HSM2_nsubpsti3; return(OK); case HSM2_MOD_NSUBCSTI1: value->rValue = model->HSM2_nsubcsti1; return(OK); case HSM2_MOD_NSUBCSTI2: value->rValue = model->HSM2_nsubcsti2; return(OK); case HSM2_MOD_NSUBCSTI3: value->rValue = model->HSM2_nsubcsti3; return(OK); case HSM2_MOD_LPEXT: value->rValue = model->HSM2_lpext; return(OK); case HSM2_MOD_NPEXT: value->rValue = model->HSM2_npext; return(OK); case HSM2_MOD_NPEXTW: value->rValue = model->HSM2_npextw; return(OK); case HSM2_MOD_NPEXTWP: value->rValue = model->HSM2_npextwp; return(OK); case HSM2_MOD_SCP22: value->rValue = model->HSM2_scp22; return(OK); case HSM2_MOD_SCP21: value->rValue = model->HSM2_scp21; return(OK); case HSM2_MOD_BS1: value->rValue = model->HSM2_bs1; return(OK); case HSM2_MOD_BS2: value->rValue = model->HSM2_bs2; return(OK); case HSM2_MOD_CGSO: value->rValue = model->HSM2_cgso; return(OK); case HSM2_MOD_CGDO: value->rValue = model->HSM2_cgdo; return(OK); case HSM2_MOD_CGBO: value->rValue = model->HSM2_cgbo; return(OK); case HSM2_MOD_TPOLY: value->rValue = model->HSM2_tpoly; return(OK); case HSM2_MOD_JS0: value->rValue = model->HSM2_js0; return(OK); case HSM2_MOD_JS0SW: value->rValue = model->HSM2_js0sw; return(OK); case HSM2_MOD_NJ: value->rValue = model->HSM2_nj; return(OK); case HSM2_MOD_NJSW: value->rValue = model->HSM2_njsw; return(OK); case HSM2_MOD_XTI: value->rValue = model->HSM2_xti; return(OK); case HSM2_MOD_CJ: value->rValue = model->HSM2_cj; return(OK); case HSM2_MOD_CJSW: value->rValue = model->HSM2_cjsw; return(OK); case HSM2_MOD_CJSWG: value->rValue = model->HSM2_cjswg; return(OK); case HSM2_MOD_MJ: value->rValue = model->HSM2_mj; return(OK); case HSM2_MOD_MJSW: value->rValue = model->HSM2_mjsw; return(OK); case HSM2_MOD_MJSWG: value->rValue = model->HSM2_mjswg; return(OK); case HSM2_MOD_PB: value->rValue = model->HSM2_pb; return(OK); case HSM2_MOD_PBSW: value->rValue = model->HSM2_pbsw; return(OK); case HSM2_MOD_PBSWG: value->rValue = model->HSM2_pbswg; return(OK); case HSM2_MOD_TCJBD: value->rValue = model->HSM2_tcjbd; return(OK); case HSM2_MOD_TCJBS: value->rValue = model->HSM2_tcjbs; return(OK); case HSM2_MOD_TCJBDSW: value->rValue = model->HSM2_tcjbdsw; return(OK); case HSM2_MOD_TCJBSSW: value->rValue = model->HSM2_tcjbssw; return(OK); case HSM2_MOD_TCJBDSWG: value->rValue = model->HSM2_tcjbdswg; return(OK); case HSM2_MOD_TCJBSSWG: value->rValue = model->HSM2_tcjbsswg; return(OK); case HSM2_MOD_XTI2: value->rValue = model->HSM2_xti2; return(OK); case HSM2_MOD_CISB: value->rValue = model->HSM2_cisb; return(OK); case HSM2_MOD_CVB: value->rValue = model->HSM2_cvb; return(OK); case HSM2_MOD_CTEMP: value->rValue = model->HSM2_ctemp; return(OK); case HSM2_MOD_CISBK: value->rValue = model->HSM2_cisbk; return(OK); case HSM2_MOD_CVBK: value->rValue = model->HSM2_cvbk; return(OK); case HSM2_MOD_DIVX: value->rValue = model->HSM2_divx; return(OK); case HSM2_MOD_CLM1: value->rValue = model->HSM2_clm1; return(OK); case HSM2_MOD_CLM2: value->rValue = model->HSM2_clm2; return(OK); case HSM2_MOD_CLM3: value->rValue = model->HSM2_clm3; return(OK); case HSM2_MOD_CLM5: value->rValue = model->HSM2_clm5; return(OK); case HSM2_MOD_CLM6: value->rValue = model->HSM2_clm6; return(OK); case HSM2_MOD_MUETMP: value->rValue = model->HSM2_muetmp; return(OK); case HSM2_MOD_VOVER: value->rValue = model->HSM2_vover; return(OK); case HSM2_MOD_VOVERP: value->rValue = model->HSM2_voverp; return(OK); case HSM2_MOD_VOVERS: value->rValue = model->HSM2_vovers; return(OK); case HSM2_MOD_VOVERSP: value->rValue = model->HSM2_voversp; return(OK); case HSM2_MOD_WFC: value->rValue = model->HSM2_wfc; return(OK); case HSM2_MOD_NSUBCW: value->rValue = model->HSM2_nsubcw; return(OK); case HSM2_MOD_NSUBCWP: value->rValue = model->HSM2_nsubcwp; return(OK); case HSM2_MOD_NSUBCMAX: value->rValue = model->HSM2_nsubcmax; return(OK); case HSM2_MOD_QME1: value->rValue = model->HSM2_qme1; return(OK); case HSM2_MOD_QME2: value->rValue = model->HSM2_qme2; return(OK); case HSM2_MOD_QME3: value->rValue = model->HSM2_qme3; return(OK); case HSM2_MOD_GIDL1: value->rValue = model->HSM2_gidl1; return(OK); case HSM2_MOD_GIDL2: value->rValue = model->HSM2_gidl2; return(OK); case HSM2_MOD_GIDL3: value->rValue = model->HSM2_gidl3; return(OK); case HSM2_MOD_GIDL4: value->rValue = model->HSM2_gidl4; return(OK); case HSM2_MOD_GIDL5: value->rValue = model->HSM2_gidl5; return(OK); case HSM2_MOD_GIDL6: value->rValue = model->HSM2_gidl6; return(OK); case HSM2_MOD_GIDL7: value->rValue = model->HSM2_gidl7; return(OK); case HSM2_MOD_GLEAK1: value->rValue = model->HSM2_gleak1; return(OK); case HSM2_MOD_GLEAK2: value->rValue = model->HSM2_gleak2; return(OK); case HSM2_MOD_GLEAK3: value->rValue = model->HSM2_gleak3; return(OK); case HSM2_MOD_GLEAK4: value->rValue = model->HSM2_gleak4; return(OK); case HSM2_MOD_GLEAK5: value->rValue = model->HSM2_gleak5; return(OK); case HSM2_MOD_GLEAK6: value->rValue = model->HSM2_gleak6; return(OK); case HSM2_MOD_GLEAK7: value->rValue = model->HSM2_gleak7; return(OK); case HSM2_MOD_GLKSD1: value->rValue = model->HSM2_glksd1; return(OK); case HSM2_MOD_GLKSD2: value->rValue = model->HSM2_glksd2; return(OK); case HSM2_MOD_GLKSD3: value->rValue = model->HSM2_glksd3; return(OK); case HSM2_MOD_GLKB1: value->rValue = model->HSM2_glkb1; return(OK); case HSM2_MOD_GLKB2: value->rValue = model->HSM2_glkb2; return(OK); case HSM2_MOD_GLKB3: value->rValue = model->HSM2_glkb3; return(OK); case HSM2_MOD_EGIG: value->rValue = model->HSM2_egig; return(OK); case HSM2_MOD_IGTEMP2: value->rValue = model->HSM2_igtemp2; return(OK); case HSM2_MOD_IGTEMP3: value->rValue = model->HSM2_igtemp3; return(OK); case HSM2_MOD_VZADD0: value->rValue = model->HSM2_vzadd0; return(OK); case HSM2_MOD_PZADD0: value->rValue = model->HSM2_pzadd0; return(OK); case HSM2_MOD_NFTRP: value->rValue = model->HSM2_nftrp; return(OK); case HSM2_MOD_NFALP: value->rValue = model->HSM2_nfalp; return(OK); case HSM2_MOD_CIT: value->rValue = model->HSM2_cit; return(OK); case HSM2_MOD_FALPH: value->rValue = model->HSM2_falph; return(OK); case HSM2_MOD_KAPPA: value->rValue = model->HSM2_kappa; return(OK); case HSM2_MOD_VDIFFJ: value->rValue = model->HSM2_vdiffj; return(OK); case HSM2_MOD_DLY1: value->rValue = model->HSM2_dly1; return(OK); case HSM2_MOD_DLY2: value->rValue = model->HSM2_dly2; return(OK); case HSM2_MOD_DLY3: value->rValue = model->HSM2_dly3; return(OK); case HSM2_MOD_TNOM: value->rValue = model->HSM2_tnom; return(OK); case HSM2_MOD_OVSLP: value->rValue = model->HSM2_ovslp; return(OK); case HSM2_MOD_OVMAG: value->rValue = model->HSM2_ovmag; return(OK); case HSM2_MOD_GBMIN: value->rValue = model->HSM2_gbmin; return(OK); case HSM2_MOD_RBPB: value->rValue = model->HSM2_rbpb; return(OK); case HSM2_MOD_RBPD: value->rValue = model->HSM2_rbpd; return(OK); case HSM2_MOD_RBPS: value->rValue = model->HSM2_rbps; return(OK); case HSM2_MOD_RBDB: value->rValue = model->HSM2_rbdb; return(OK); case HSM2_MOD_RBSB: value->rValue = model->HSM2_rbsb; return(OK); case HSM2_MOD_IBPC1: value->rValue = model->HSM2_ibpc1; return(OK); case HSM2_MOD_IBPC2: value->rValue = model->HSM2_ibpc2; return(OK); case HSM2_MOD_MPHDFM: value->rValue = model->HSM2_mphdfm; return(OK); case HSM2_MOD_PTL: value->rValue = model->HSM2_ptl; return(OK); case HSM2_MOD_PTP: value->rValue = model->HSM2_ptp; return(OK); case HSM2_MOD_PT2: value->rValue = model->HSM2_pt2; return(OK); case HSM2_MOD_PTLP: value->rValue = model->HSM2_ptlp; return(OK); case HSM2_MOD_GDL: value->rValue = model->HSM2_gdl; return(OK); case HSM2_MOD_GDLP: value->rValue = model->HSM2_gdlp; return(OK); case HSM2_MOD_GDLD: value->rValue = model->HSM2_gdld; return(OK); case HSM2_MOD_PT4: value->rValue = model->HSM2_pt4; return(OK); case HSM2_MOD_PT4P: value->rValue = model->HSM2_pt4p; return(OK); case HSM2_MOD_MUEPHL2: value->rValue = model->HSM2_muephl2; return(OK); case HSM2_MOD_MUEPLP2: value->rValue = model->HSM2_mueplp2; return(OK); case HSM2_MOD_NSUBCW2: value->rValue = model->HSM2_nsubcw2; return(OK); case HSM2_MOD_NSUBCWP2: value->rValue = model->HSM2_nsubcwp2; return(OK); case HSM2_MOD_MUEPHW2: value->rValue = model->HSM2_muephw2; return(OK); case HSM2_MOD_MUEPWP2: value->rValue = model->HSM2_muepwp2; return(OK); /* WPE */ case HSM2_MOD_WEB: value->rValue = model->HSM2_web; return(OK); case HSM2_MOD_WEC: value->rValue = model->HSM2_wec; return(OK); case HSM2_MOD_NSUBCWPE: value->rValue = model->HSM2_nsubcwpe; return(OK); case HSM2_MOD_NPEXTWPE: value->rValue = model->HSM2_npextwpe; return(OK); case HSM2_MOD_NSUBPWPE: value->rValue = model->HSM2_nsubpwpe; return(OK); case HSM2_MOD_VGSMIN: value->rValue = model->HSM2_Vgsmin; return(OK); case HSM2_MOD_SC3VBS: value->rValue = model->HSM2_sc3Vbs; return(OK); case HSM2_MOD_BYPTOL: value->rValue = model->HSM2_byptol; return(OK); case HSM2_MOD_MUECB0LP: value->rValue = model->HSM2_muecb0lp; return(OK); case HSM2_MOD_MUECB1LP: value->rValue = model->HSM2_muecb1lp; return(OK); /* binning parameters */ case HSM2_MOD_LMIN: value->rValue = model->HSM2_lmin; return(OK); case HSM2_MOD_LMAX: value->rValue = model->HSM2_lmax; return(OK); case HSM2_MOD_WMIN: value->rValue = model->HSM2_wmin; return(OK); case HSM2_MOD_WMAX: value->rValue = model->HSM2_wmax; return(OK); case HSM2_MOD_LBINN: value->rValue = model->HSM2_lbinn; return(OK); case HSM2_MOD_WBINN: value->rValue = model->HSM2_wbinn; return(OK); /* Length dependence */ case HSM2_MOD_LVMAX: value->rValue = model->HSM2_lvmax; return(OK); case HSM2_MOD_LBGTMP1: value->rValue = model->HSM2_lbgtmp1; return(OK); case HSM2_MOD_LBGTMP2: value->rValue = model->HSM2_lbgtmp2; return(OK); case HSM2_MOD_LEG0: value->rValue = model->HSM2_leg0; return(OK); case HSM2_MOD_LLOVER: value->rValue = model->HSM2_llover; return(OK); case HSM2_MOD_LVFBOVER: value->rValue = model->HSM2_lvfbover; return(OK); case HSM2_MOD_LNOVER: value->rValue = model->HSM2_lnover; return(OK); case HSM2_MOD_LWL2: value->rValue = model->HSM2_lwl2; return(OK); case HSM2_MOD_LVFBC: value->rValue = model->HSM2_lvfbc; return(OK); case HSM2_MOD_LNSUBC: value->rValue = model->HSM2_lnsubc; return(OK); case HSM2_MOD_LNSUBP: value->rValue = model->HSM2_lnsubp; return(OK); case HSM2_MOD_LSCP1: value->rValue = model->HSM2_lscp1; return(OK); case HSM2_MOD_LSCP2: value->rValue = model->HSM2_lscp2; return(OK); case HSM2_MOD_LSCP3: value->rValue = model->HSM2_lscp3; return(OK); case HSM2_MOD_LSC1: value->rValue = model->HSM2_lsc1; return(OK); case HSM2_MOD_LSC2: value->rValue = model->HSM2_lsc2; return(OK); case HSM2_MOD_LSC3: value->rValue = model->HSM2_lsc3; return(OK); case HSM2_MOD_LSC4: value->rValue = model->HSM2_lsc4; return(OK); case HSM2_MOD_LPGD1: value->rValue = model->HSM2_lpgd1; return(OK); //case HSM2_MOD_LPGD3: // value->rValue = model->HSM2_lpgd3; // return(OK); case HSM2_MOD_LNDEP: value->rValue = model->HSM2_lndep; return(OK); case HSM2_MOD_LNINV: value->rValue = model->HSM2_lninv; return(OK); case HSM2_MOD_LMUECB0: value->rValue = model->HSM2_lmuecb0; return(OK); case HSM2_MOD_LMUECB1: value->rValue = model->HSM2_lmuecb1; return(OK); case HSM2_MOD_LMUEPH1: value->rValue = model->HSM2_lmueph1; return(OK); case HSM2_MOD_LVTMP: value->rValue = model->HSM2_lvtmp; return(OK); case HSM2_MOD_LWVTH0: value->rValue = model->HSM2_lwvth0; return(OK); case HSM2_MOD_LMUESR1: value->rValue = model->HSM2_lmuesr1; return(OK); case HSM2_MOD_LMUETMP: value->rValue = model->HSM2_lmuetmp; return(OK); case HSM2_MOD_LSUB1: value->rValue = model->HSM2_lsub1; return(OK); case HSM2_MOD_LSUB2: value->rValue = model->HSM2_lsub2; return(OK); case HSM2_MOD_LSVDS: value->rValue = model->HSM2_lsvds; return(OK); case HSM2_MOD_LSVBS: value->rValue = model->HSM2_lsvbs; return(OK); case HSM2_MOD_LSVGS: value->rValue = model->HSM2_lsvgs; return(OK); case HSM2_MOD_LNSTI: value->rValue = model->HSM2_lnsti; return(OK); case HSM2_MOD_LWSTI: value->rValue = model->HSM2_lwsti; return(OK); case HSM2_MOD_LSCSTI1: value->rValue = model->HSM2_lscsti1; return(OK); case HSM2_MOD_LSCSTI2: value->rValue = model->HSM2_lscsti2; return(OK); case HSM2_MOD_LVTHSTI: value->rValue = model->HSM2_lvthsti; return(OK); case HSM2_MOD_LMUESTI1: value->rValue = model->HSM2_lmuesti1; return(OK); case HSM2_MOD_LMUESTI2: value->rValue = model->HSM2_lmuesti2; return(OK); case HSM2_MOD_LMUESTI3: value->rValue = model->HSM2_lmuesti3; return(OK); case HSM2_MOD_LNSUBPSTI1: value->rValue = model->HSM2_lnsubpsti1; return(OK); case HSM2_MOD_LNSUBPSTI2: value->rValue = model->HSM2_lnsubpsti2; return(OK); case HSM2_MOD_LNSUBPSTI3: value->rValue = model->HSM2_lnsubpsti3; return(OK); case HSM2_MOD_LNSUBCSTI1: value->rValue = model->HSM2_lnsubcsti1; return(OK); case HSM2_MOD_LNSUBCSTI2: value->rValue = model->HSM2_lnsubcsti2; return(OK); case HSM2_MOD_LNSUBCSTI3: value->rValue = model->HSM2_lnsubcsti3; return(OK); case HSM2_MOD_LCGSO: value->rValue = model->HSM2_lcgso; return(OK); case HSM2_MOD_LCGDO: value->rValue = model->HSM2_lcgdo; return(OK); case HSM2_MOD_LJS0: value->rValue = model->HSM2_ljs0; return(OK); case HSM2_MOD_LJS0SW: value->rValue = model->HSM2_ljs0sw; return(OK); case HSM2_MOD_LNJ: value->rValue = model->HSM2_lnj; return(OK); case HSM2_MOD_LCISBK: value->rValue = model->HSM2_lcisbk; return(OK); case HSM2_MOD_LCLM1: value->rValue = model->HSM2_lclm1; return(OK); case HSM2_MOD_LCLM2: value->rValue = model->HSM2_lclm2; return(OK); case HSM2_MOD_LCLM3: value->rValue = model->HSM2_lclm3; return(OK); case HSM2_MOD_LWFC: value->rValue = model->HSM2_lwfc; return(OK); case HSM2_MOD_LGIDL1: value->rValue = model->HSM2_lgidl1; return(OK); case HSM2_MOD_LGIDL2: value->rValue = model->HSM2_lgidl2; return(OK); case HSM2_MOD_LGLEAK1: value->rValue = model->HSM2_lgleak1; return(OK); case HSM2_MOD_LGLEAK2: value->rValue = model->HSM2_lgleak2; return(OK); case HSM2_MOD_LGLEAK3: value->rValue = model->HSM2_lgleak3; return(OK); case HSM2_MOD_LGLEAK6: value->rValue = model->HSM2_lgleak6; return(OK); case HSM2_MOD_LGLKSD1: value->rValue = model->HSM2_lglksd1; return(OK); case HSM2_MOD_LGLKSD2: value->rValue = model->HSM2_lglksd2; return(OK); case HSM2_MOD_LGLKB1: value->rValue = model->HSM2_lglkb1; return(OK); case HSM2_MOD_LGLKB2: value->rValue = model->HSM2_lglkb2; return(OK); case HSM2_MOD_LNFTRP: value->rValue = model->HSM2_lnftrp; return(OK); case HSM2_MOD_LNFALP: value->rValue = model->HSM2_lnfalp; return(OK); case HSM2_MOD_LVDIFFJ: value->rValue = model->HSM2_lvdiffj; return(OK); case HSM2_MOD_LIBPC1: value->rValue = model->HSM2_libpc1; return(OK); case HSM2_MOD_LIBPC2: value->rValue = model->HSM2_libpc2; return(OK); /* Width dependence */ case HSM2_MOD_WVMAX: value->rValue = model->HSM2_wvmax; return(OK); case HSM2_MOD_WBGTMP1: value->rValue = model->HSM2_wbgtmp1; return(OK); case HSM2_MOD_WBGTMP2: value->rValue = model->HSM2_wbgtmp2; return(OK); case HSM2_MOD_WEG0: value->rValue = model->HSM2_weg0; return(OK); case HSM2_MOD_WLOVER: value->rValue = model->HSM2_wlover; return(OK); case HSM2_MOD_WVFBOVER: value->rValue = model->HSM2_wvfbover; return(OK); case HSM2_MOD_WNOVER: value->rValue = model->HSM2_wnover; return(OK); case HSM2_MOD_WWL2: value->rValue = model->HSM2_wwl2; return(OK); case HSM2_MOD_WVFBC: value->rValue = model->HSM2_wvfbc; return(OK); case HSM2_MOD_WNSUBC: value->rValue = model->HSM2_wnsubc; return(OK); case HSM2_MOD_WNSUBP: value->rValue = model->HSM2_wnsubp; return(OK); case HSM2_MOD_WSCP1: value->rValue = model->HSM2_wscp1; return(OK); case HSM2_MOD_WSCP2: value->rValue = model->HSM2_wscp2; return(OK); case HSM2_MOD_WSCP3: value->rValue = model->HSM2_wscp3; return(OK); case HSM2_MOD_WSC1: value->rValue = model->HSM2_wsc1; return(OK); case HSM2_MOD_WSC2: value->rValue = model->HSM2_wsc2; return(OK); case HSM2_MOD_WSC3: value->rValue = model->HSM2_wsc3; return(OK); case HSM2_MOD_WSC4: value->rValue = model->HSM2_wsc4; return(OK); case HSM2_MOD_WPGD1: value->rValue = model->HSM2_wpgd1; return(OK); //case HSM2_MOD_WPGD3: // value->rValue = model->HSM2_wpgd3; // return(OK); case HSM2_MOD_WNDEP: value->rValue = model->HSM2_wndep; return(OK); case HSM2_MOD_WNINV: value->rValue = model->HSM2_wninv; return(OK); case HSM2_MOD_WMUECB0: value->rValue = model->HSM2_wmuecb0; return(OK); case HSM2_MOD_WMUECB1: value->rValue = model->HSM2_wmuecb1; return(OK); case HSM2_MOD_WMUEPH1: value->rValue = model->HSM2_wmueph1; return(OK); case HSM2_MOD_WVTMP: value->rValue = model->HSM2_wvtmp; return(OK); case HSM2_MOD_WWVTH0: value->rValue = model->HSM2_wwvth0; return(OK); case HSM2_MOD_WMUESR1: value->rValue = model->HSM2_wmuesr1; return(OK); case HSM2_MOD_WMUETMP: value->rValue = model->HSM2_wmuetmp; return(OK); case HSM2_MOD_WSUB1: value->rValue = model->HSM2_wsub1; return(OK); case HSM2_MOD_WSUB2: value->rValue = model->HSM2_wsub2; return(OK); case HSM2_MOD_WSVDS: value->rValue = model->HSM2_wsvds; return(OK); case HSM2_MOD_WSVBS: value->rValue = model->HSM2_wsvbs; return(OK); case HSM2_MOD_WSVGS: value->rValue = model->HSM2_wsvgs; return(OK); case HSM2_MOD_WNSTI: value->rValue = model->HSM2_wnsti; return(OK); case HSM2_MOD_WWSTI: value->rValue = model->HSM2_wwsti; return(OK); case HSM2_MOD_WSCSTI1: value->rValue = model->HSM2_wscsti1; return(OK); case HSM2_MOD_WSCSTI2: value->rValue = model->HSM2_wscsti2; return(OK); case HSM2_MOD_WVTHSTI: value->rValue = model->HSM2_wvthsti; return(OK); case HSM2_MOD_WMUESTI1: value->rValue = model->HSM2_wmuesti1; return(OK); case HSM2_MOD_WMUESTI2: value->rValue = model->HSM2_wmuesti2; return(OK); case HSM2_MOD_WMUESTI3: value->rValue = model->HSM2_wmuesti3; return(OK); case HSM2_MOD_WNSUBPSTI1: value->rValue = model->HSM2_wnsubpsti1; return(OK); case HSM2_MOD_WNSUBPSTI2: value->rValue = model->HSM2_wnsubpsti2; return(OK); case HSM2_MOD_WNSUBPSTI3: value->rValue = model->HSM2_wnsubpsti3; return(OK); case HSM2_MOD_WNSUBCSTI1: value->rValue = model->HSM2_wnsubcsti1; return(OK); case HSM2_MOD_WNSUBCSTI2: value->rValue = model->HSM2_wnsubcsti2; return(OK); case HSM2_MOD_WNSUBCSTI3: value->rValue = model->HSM2_wnsubcsti3; return(OK); case HSM2_MOD_WCGSO: value->rValue = model->HSM2_wcgso; return(OK); case HSM2_MOD_WCGDO: value->rValue = model->HSM2_wcgdo; return(OK); case HSM2_MOD_WJS0: value->rValue = model->HSM2_wjs0; return(OK); case HSM2_MOD_WJS0SW: value->rValue = model->HSM2_wjs0sw; return(OK); case HSM2_MOD_WNJ: value->rValue = model->HSM2_wnj; return(OK); case HSM2_MOD_WCISBK: value->rValue = model->HSM2_wcisbk; return(OK); case HSM2_MOD_WCLM1: value->rValue = model->HSM2_wclm1; return(OK); case HSM2_MOD_WCLM2: value->rValue = model->HSM2_wclm2; return(OK); case HSM2_MOD_WCLM3: value->rValue = model->HSM2_wclm3; return(OK); case HSM2_MOD_WWFC: value->rValue = model->HSM2_wwfc; return(OK); case HSM2_MOD_WGIDL1: value->rValue = model->HSM2_wgidl1; return(OK); case HSM2_MOD_WGIDL2: value->rValue = model->HSM2_wgidl2; return(OK); case HSM2_MOD_WGLEAK1: value->rValue = model->HSM2_wgleak1; return(OK); case HSM2_MOD_WGLEAK2: value->rValue = model->HSM2_wgleak2; return(OK); case HSM2_MOD_WGLEAK3: value->rValue = model->HSM2_wgleak3; return(OK); case HSM2_MOD_WGLEAK6: value->rValue = model->HSM2_wgleak6; return(OK); case HSM2_MOD_WGLKSD1: value->rValue = model->HSM2_wglksd1; return(OK); case HSM2_MOD_WGLKSD2: value->rValue = model->HSM2_wglksd2; return(OK); case HSM2_MOD_WGLKB1: value->rValue = model->HSM2_wglkb1; return(OK); case HSM2_MOD_WGLKB2: value->rValue = model->HSM2_wglkb2; return(OK); case HSM2_MOD_WNFTRP: value->rValue = model->HSM2_wnftrp; return(OK); case HSM2_MOD_WNFALP: value->rValue = model->HSM2_wnfalp; return(OK); case HSM2_MOD_WVDIFFJ: value->rValue = model->HSM2_wvdiffj; return(OK); case HSM2_MOD_WIBPC1: value->rValue = model->HSM2_wibpc1; return(OK); case HSM2_MOD_WIBPC2: value->rValue = model->HSM2_wibpc2; return(OK); /* Cross-term dependence */ case HSM2_MOD_PVMAX: value->rValue = model->HSM2_pvmax; return(OK); case HSM2_MOD_PBGTMP1: value->rValue = model->HSM2_pbgtmp1; return(OK); case HSM2_MOD_PBGTMP2: value->rValue = model->HSM2_pbgtmp2; return(OK); case HSM2_MOD_PEG0: value->rValue = model->HSM2_peg0; return(OK); case HSM2_MOD_PLOVER: value->rValue = model->HSM2_plover; return(OK); case HSM2_MOD_PVFBOVER: value->rValue = model->HSM2_pvfbover; return(OK); case HSM2_MOD_PNOVER: value->rValue = model->HSM2_pnover; return(OK); case HSM2_MOD_PWL2: value->rValue = model->HSM2_pwl2; return(OK); case HSM2_MOD_PVFBC: value->rValue = model->HSM2_pvfbc; return(OK); case HSM2_MOD_PNSUBC: value->rValue = model->HSM2_pnsubc; return(OK); case HSM2_MOD_PNSUBP: value->rValue = model->HSM2_pnsubp; return(OK); case HSM2_MOD_PSCP1: value->rValue = model->HSM2_pscp1; return(OK); case HSM2_MOD_PSCP2: value->rValue = model->HSM2_pscp2; return(OK); case HSM2_MOD_PSCP3: value->rValue = model->HSM2_pscp3; return(OK); case HSM2_MOD_PSC1: value->rValue = model->HSM2_psc1; return(OK); case HSM2_MOD_PSC2: value->rValue = model->HSM2_psc2; return(OK); case HSM2_MOD_PSC3: value->rValue = model->HSM2_psc3; return(OK); case HSM2_MOD_PSC4: value->rValue = model->HSM2_psc4; return(OK); case HSM2_MOD_PPGD1: value->rValue = model->HSM2_ppgd1; return(OK); //case HSM2_MOD_PPGD3: // value->rValue = model->HSM2_ppgd3; // return(OK); case HSM2_MOD_PNDEP: value->rValue = model->HSM2_pndep; return(OK); case HSM2_MOD_PNINV: value->rValue = model->HSM2_pninv; return(OK); case HSM2_MOD_PMUECB0: value->rValue = model->HSM2_pmuecb0; return(OK); case HSM2_MOD_PMUECB1: value->rValue = model->HSM2_pmuecb1; return(OK); case HSM2_MOD_PMUEPH1: value->rValue = model->HSM2_pmueph1; return(OK); case HSM2_MOD_PVTMP: value->rValue = model->HSM2_pvtmp; return(OK); case HSM2_MOD_PWVTH0: value->rValue = model->HSM2_pwvth0; return(OK); case HSM2_MOD_PMUESR1: value->rValue = model->HSM2_pmuesr1; return(OK); case HSM2_MOD_PMUETMP: value->rValue = model->HSM2_pmuetmp; return(OK); case HSM2_MOD_PSUB1: value->rValue = model->HSM2_psub1; return(OK); case HSM2_MOD_PSUB2: value->rValue = model->HSM2_psub2; return(OK); case HSM2_MOD_PSVDS: value->rValue = model->HSM2_psvds; return(OK); case HSM2_MOD_PSVBS: value->rValue = model->HSM2_psvbs; return(OK); case HSM2_MOD_PSVGS: value->rValue = model->HSM2_psvgs; return(OK); case HSM2_MOD_PNSTI: value->rValue = model->HSM2_pnsti; return(OK); case HSM2_MOD_PWSTI: value->rValue = model->HSM2_pwsti; return(OK); case HSM2_MOD_PSCSTI1: value->rValue = model->HSM2_pscsti1; return(OK); case HSM2_MOD_PSCSTI2: value->rValue = model->HSM2_pscsti2; return(OK); case HSM2_MOD_PVTHSTI: value->rValue = model->HSM2_pvthsti; return(OK); case HSM2_MOD_PMUESTI1: value->rValue = model->HSM2_pmuesti1; return(OK); case HSM2_MOD_PMUESTI2: value->rValue = model->HSM2_pmuesti2; return(OK); case HSM2_MOD_PMUESTI3: value->rValue = model->HSM2_pmuesti3; return(OK); case HSM2_MOD_PNSUBPSTI1: value->rValue = model->HSM2_pnsubpsti1; return(OK); case HSM2_MOD_PNSUBPSTI2: value->rValue = model->HSM2_pnsubpsti2; return(OK); case HSM2_MOD_PNSUBPSTI3: value->rValue = model->HSM2_pnsubpsti3; return(OK); case HSM2_MOD_PNSUBCSTI1: value->rValue = model->HSM2_pnsubcsti1; return(OK); case HSM2_MOD_PNSUBCSTI2: value->rValue = model->HSM2_pnsubcsti2; return(OK); case HSM2_MOD_PNSUBCSTI3: value->rValue = model->HSM2_pnsubcsti3; return(OK); case HSM2_MOD_PCGSO: value->rValue = model->HSM2_pcgso; return(OK); case HSM2_MOD_PCGDO: value->rValue = model->HSM2_pcgdo; return(OK); case HSM2_MOD_PJS0: value->rValue = model->HSM2_pjs0; return(OK); case HSM2_MOD_PJS0SW: value->rValue = model->HSM2_pjs0sw; return(OK); case HSM2_MOD_PNJ: value->rValue = model->HSM2_pnj; return(OK); case HSM2_MOD_PCISBK: value->rValue = model->HSM2_pcisbk; return(OK); case HSM2_MOD_PCLM1: value->rValue = model->HSM2_pclm1; return(OK); case HSM2_MOD_PCLM2: value->rValue = model->HSM2_pclm2; return(OK); case HSM2_MOD_PCLM3: value->rValue = model->HSM2_pclm3; return(OK); case HSM2_MOD_PWFC: value->rValue = model->HSM2_pwfc; return(OK); case HSM2_MOD_PGIDL1: value->rValue = model->HSM2_pgidl1; return(OK); case HSM2_MOD_PGIDL2: value->rValue = model->HSM2_pgidl2; return(OK); case HSM2_MOD_PGLEAK1: value->rValue = model->HSM2_pgleak1; return(OK); case HSM2_MOD_PGLEAK2: value->rValue = model->HSM2_pgleak2; return(OK); case HSM2_MOD_PGLEAK3: value->rValue = model->HSM2_pgleak3; return(OK); case HSM2_MOD_PGLEAK6: value->rValue = model->HSM2_pgleak6; return(OK); case HSM2_MOD_PGLKSD1: value->rValue = model->HSM2_pglksd1; return(OK); case HSM2_MOD_PGLKSD2: value->rValue = model->HSM2_pglksd2; return(OK); case HSM2_MOD_PGLKB1: value->rValue = model->HSM2_pglkb1; return(OK); case HSM2_MOD_PGLKB2: value->rValue = model->HSM2_pglkb2; return(OK); case HSM2_MOD_PNFTRP: value->rValue = model->HSM2_pnftrp; return(OK); case HSM2_MOD_PNFALP: value->rValue = model->HSM2_pnfalp; return(OK); case HSM2_MOD_PVDIFFJ: value->rValue = model->HSM2_pvdiffj; return(OK); case HSM2_MOD_PIBPC1: value->rValue = model->HSM2_pibpc1; return(OK); case HSM2_MOD_PIBPC2: value->rValue = model->HSM2_pibpc2; return(OK); case HSM2_MOD_VGS_MAX: value->rValue = model->HSM2vgsMax; return(OK); case HSM2_MOD_VGD_MAX: value->rValue = model->HSM2vgdMax; return(OK); case HSM2_MOD_VGB_MAX: value->rValue = model->HSM2vgbMax; return(OK); case HSM2_MOD_VDS_MAX: value->rValue = model->HSM2vdsMax; return(OK); case HSM2_MOD_VBS_MAX: value->rValue = model->HSM2vbsMax; return(OK); case HSM2_MOD_VBD_MAX: value->rValue = model->HSM2vbdMax; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hisim2/hsm2par.c0000644000265600020320000001143612264261473021154 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2par.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int HSM2param( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; HSM2instance *here = (HSM2instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch (param) { case HSM2_W: here->HSM2_w = value->rValue * scale; here->HSM2_w_Given = TRUE; break; case HSM2_L: here->HSM2_l = value->rValue * scale; here->HSM2_l_Given = TRUE; break; case HSM2_AS: here->HSM2_as = value->rValue * scale * scale; here->HSM2_as_Given = TRUE; break; case HSM2_AD: here->HSM2_ad = value->rValue * scale * scale; here->HSM2_ad_Given = TRUE; break; case HSM2_PS: here->HSM2_ps = value->rValue * scale; here->HSM2_ps_Given = TRUE; break; case HSM2_PD: here->HSM2_pd = value->rValue * scale; here->HSM2_pd_Given = TRUE; break; case HSM2_NRS: here->HSM2_nrs = value->rValue; here->HSM2_nrs_Given = TRUE; break; case HSM2_NRD: here->HSM2_nrd = value->rValue; here->HSM2_nrd_Given = TRUE; break; case HSM2_TEMP: here->HSM2_temp = value->rValue; here->HSM2_temp_Given = TRUE; break; case HSM2_DTEMP: here->HSM2_dtemp = value->rValue; here->HSM2_dtemp_Given = TRUE; break; case HSM2_OFF: here->HSM2_off = value->iValue; break; case HSM2_IC_VBS: here->HSM2_icVBS = value->rValue; here->HSM2_icVBS_Given = TRUE; break; case HSM2_IC_VDS: here->HSM2_icVDS = value->rValue; here->HSM2_icVDS_Given = TRUE; break; case HSM2_IC_VGS: here->HSM2_icVGS = value->rValue; here->HSM2_icVGS_Given = TRUE; break; case HSM2_IC: switch (value->v.numValue) { case 3: here->HSM2_icVBS = *(value->v.vec.rVec + 2); here->HSM2_icVBS_Given = TRUE; case 2: here->HSM2_icVGS = *(value->v.vec.rVec + 1); here->HSM2_icVGS_Given = TRUE; case 1: here->HSM2_icVDS = *(value->v.vec.rVec); here->HSM2_icVDS_Given = TRUE; break; default: return(E_BADPARM); } break; case HSM2_CORBNET: here->HSM2_corbnet = value->iValue; here->HSM2_corbnet_Given = TRUE; break; case HSM2_RBPB: here->HSM2_rbpb = value->rValue; here->HSM2_rbpb_Given = TRUE; break; case HSM2_RBPD: here->HSM2_rbpd = value->rValue; here->HSM2_rbpd_Given = TRUE; break; case HSM2_RBPS: here->HSM2_rbps = value->rValue; here->HSM2_rbps_Given = TRUE; break; case HSM2_RBDB: here->HSM2_rbdb = value->rValue; here->HSM2_rbdb_Given = TRUE; break; case HSM2_RBSB: here->HSM2_rbsb = value->rValue; here->HSM2_rbsb_Given = TRUE; break; case HSM2_CORG: here->HSM2_corg = value->iValue; here->HSM2_corg_Given = TRUE; break; /* case HSM2_RSHG: */ /* here->HSM2_rshg = value->rValue; */ /* here->HSM2_rshg_Given = TRUE; */ /* break; */ case HSM2_NGCON: here->HSM2_ngcon = value->rValue; here->HSM2_ngcon_Given = TRUE; break; case HSM2_XGW: here->HSM2_xgw = value->rValue; here->HSM2_xgw_Given = TRUE; break; case HSM2_XGL: here->HSM2_xgl = value->rValue; here->HSM2_xgl_Given = TRUE; break; case HSM2_NF: here->HSM2_nf = value->rValue; here->HSM2_nf_Given = TRUE; break; case HSM2_SA: here->HSM2_sa = value->rValue; here->HSM2_sa_Given = TRUE; break; case HSM2_SB: here->HSM2_sb = value->rValue; here->HSM2_sb_Given = TRUE; break; case HSM2_SD: here->HSM2_sd = value->rValue; here->HSM2_sd_Given = TRUE; break; case HSM2_NSUBCDFM: here->HSM2_nsubcdfm = value->rValue; here->HSM2_nsubcdfm_Given = TRUE; break; case HSM2_MPHDFM: here->HSM2_mphdfm = value->rValue; here->HSM2_mphdfm_Given = TRUE; break; case HSM2_M: here->HSM2_m = value->rValue; here->HSM2_m_Given = TRUE; break; /* WPE */ case HSM2_SCA: here->HSM2_sca = value->rValue; here->HSM2_sca_Given = TRUE; break; case HSM2_SCB: here->HSM2_scb = value->rValue; here->HSM2_scb_Given = TRUE; break; case HSM2_SCC: here->HSM2_scc= value->rValue; here->HSM2_scc_Given = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2getic.c0000644000265600020320000000265312264261473021466 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2getic.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2getic( GENmodel *inModel, CKTcircuit *ckt) { HSM2model *model = (HSM2model*)inModel; HSM2instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for ( ;model ;model = model->HSM2nextModel ) { for ( here = model->HSM2instances; here ;here = here->HSM2nextInstance ) { if (!here->HSM2_icVBS_Given) { here->HSM2_icVBS = *(ckt->CKTrhs + here->HSM2bNode) - *(ckt->CKTrhs + here->HSM2sNode); } if (!here->HSM2_icVDS_Given) { here->HSM2_icVDS = *(ckt->CKTrhs + here->HSM2dNode) - *(ckt->CKTrhs + here->HSM2sNode); } if (!here->HSM2_icVGS_Given) { here->HSM2_icVGS = *(ckt->CKTrhs + here->HSM2gNode) - *(ckt->CKTrhs + here->HSM2sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2mdel.c0000644000265600020320000000245112264261473021310 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2mdel.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { HSM2model **model = (HSM2model**)inModel; HSM2model *modfast = (HSM2model*)kill; HSM2instance *here; HSM2instance *prev = NULL; HSM2model **oldmod; oldmod = model; for ( ;*model ;model = &((*model)->HSM2nextModel) ) { if ( (*model)->HSM2modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->HSM2nextModel; /* cut deleted device out of list */ for ( here = (*model)->HSM2instances ; here ;here = here->HSM2nextInstance ) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2eval.c0000644000265600020320000100362412264261473021322 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) FILE : hsm2eval.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ /********************************************************************** The following source code, and all copyrights, trade secrets or other intellectual property rights in and to the source code in its entirety, is owned by the Hiroshima University and the STARC organization. All users need to follow the "HiSIM2 Distribution Statement and Copyright Notice" attached to HiSIM2 model. -----HiSIM2 Distribution Statement and Copyright Notice-------------- Software is distributed as is, completely without warranty or service support. Hiroshima University or STARC and its employees are not liable for the condition or performance of the software. Hiroshima University and STARC own the copyright and grant users a perpetual, irrevocable, worldwide, non-exclusive, royalty-free license with respect to the software as set forth below. Hiroshima University and STARC hereby disclaim all implied warranties. Hiroshima University and STARC grant the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions 1. The users agree not to charge for Hiroshima University and STARC code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge Hiroshima University and STARC that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others." *************************************************************************/ /********************************************************************* * Memorandum on programming * * (1) Bias (x: b|d|g) * . vxs : Input argument. * . Vxse: External bias taking account device type (pMOS->nMOS). * . Vxsc: Confined bias within a specified region. * . Vxs : Internal bias. * . Y_dVxs denotes the partial derivative of Y w.r.t. Vxs. * * (2) Device Mode * . Normal mode (Vds>0 for nMOS) is assumed. * . In case of reverse mode, parent routines have to properly * transform or interchange inputs and outputs except ones * related to junction diodes, which are regarded as being * fixed to the nodal S/D. * * (3) Modification for symmetry at Vds=0 * . Vxsz: Modified bias. (x: b|d|g) * . Ps0z: Modified Ps0. * . The following variables are calculated as a function of * modified biases or potential. * Tox, Cox, (-- with quantum effect) * Vth*, dVth*, dPpg, Igate, Igidl, Igisl. * . The following variables are calculated using a transform * function. * Lred * * (4) Zones and Cases (terminology) * * Chi:=beta*(Ps0-Vbs)= 0 3 5 * * Zone: A | D1 | D2 | D3 * | * (accumulation)|(depletion) * | * Vgs = Vgs_fb Vth * / / * Case: Nonconductive / Conductive * / * VgVt:=Qn0/Cox= VgVt_small * * . Ids is regarded as zero in zone-A. * . Procedure to calculate Psl and dependent variables is * omitted in the nonconductive case. Ids and Qi are regarded * as zero in this case. * *********************************************************************/ /*===========================================================* * Preamble. *=================*/ /*---------------------------------------------------* * Header files. *-----------------*/ #include "ngspice/ngspice.h" #ifdef __STDC__ /* #include */ #endif #include "ngspice/cktdefs.h" /*-----------------------------------* * HiSIM macros *-----------------*/ #include "hisim2.h" #include "hsm2evalenv.h" /*-----------------------------------* * HiSIM constants *-----------------*/ #define C_sce_dlt (1.0e-2) #define C_gidl_delta 0.5 #define C_PSLK_DELTA 1e-3 /* delta for Pslk smoothing */ #define C_PSLK_SHIFT 1.0 /* constant value for temporary shift */ #define C_IDD_MIN 1.0e-15 /* local variables used in macro functions */ static double TMF1 , TMF2 , TMF3 , TMF4 ; /*===========================================================* * pow *=================*/ #ifdef POW_TO_EXP_AND_LOG #define Fn_Pow( x , y ) exp( (y) * log( x ) ) #else #define Fn_Pow( x , y ) pow( x , y ) #endif /*===========================================================* * Exp() for PGD. * - ExpLim(-3)=0 *=================*/ #define Fn_ExpLim( y , x , dx ) { \ if ( (x) < -3.0 ) { \ dx = 0.0 ; \ y = 0.0 ; \ } else if ( (x) < 0.0 ) { \ dx = 1.0 + (x) * ( 2 * (1.0/3.0) + (x) * 3 * (1.0/27.0) ) ; \ y = 1.0 + (x) * ( 1.0 + (x) * ( (1.0/3.0) + (x) * (1.0/27.0) ) ) ; \ } else { \ dx = 1.0 + (x) * ( 2 * (1.0/3.0) + (x) * ( 3 * 0.0402052934513951 \ + (x) * 4 * 0.148148111111111 ) ) ; \ y = 1.0 + (x) * ( 1.0 + (x) * ( (1.0/3.0) + (x) * ( 0.0402052934513951 \ + (x) * 0.148148111111111 ) ) ) ; \ } \ } /*===========================================================* * Ceiling, smoothing functions. *=================*/ /*---------------------------------------------------* * smoothUpper: ceiling. * y = xmax - 0.5 ( arg + sqrt( arg^2 + 4 xmax delta ) ) * arg = xmax - x - delta *-----------------*/ #define Fn_SU( y , x , xmax , delta , dx ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } #define Fn_SU2( y , x , xmax , delta , dy_dx , dy_dxmax ) { \ TMF1 = ( xmax ) - ( x ) - ( delta ) ; \ TMF2 = 4.0 * ( xmax ) * ( delta) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dy_dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ dy_dxmax = 0.5 * ( 1.0 - ( TMF1 + 2.0 * delta ) / TMF2 ) ; \ y = ( xmax ) - 0.5 * ( TMF1 + TMF2 ) ; \ } /*---------------------------------------------------* * smoothLower: flooring. * y = xmin + 0.5 ( arg + sqrt( arg^2 + 4 xmin delta ) ) * arg = x - xmin - delta *-----------------*/ #define Fn_SL( y , x , xmin , delta , dx ) { \ TMF1 = ( x ) - ( xmin ) - ( delta ) ; \ TMF2 = 4.0 * ( xmin ) * ( delta ) ; \ TMF2 = TMF2 > 0.0 ? TMF2 : - ( TMF2 ) ; \ TMF2 = sqrt ( TMF1 * TMF1 + TMF2 ) ; \ dx = 0.5 * ( 1.0 + TMF1 / TMF2 ) ; \ y = ( xmin ) + 0.5 * ( TMF1 + TMF2 ) ; \ } /*---------------------------------------------------* * smoothZero: flooring to zero. * y = 0.5 ( x + sqrt( x^2 + 4 delta^2 ) ) *-----------------*/ #define Fn_SZ( y , x , delta , dx ) { \ TMF2 = sqrt ( ( x ) * ( x ) + 4.0 * ( delta ) * ( delta) ) ; \ dx = 0.5 * ( 1.0 + ( x ) / TMF2 ) ; \ y = 0.5 * ( ( x ) + TMF2 ) ; \ if( y < 0.0 ) { y=0.0; dx=0.0; } \ } #if 0 /*---------------------------------------------------* * smoothZero: flooring to zero. * y = 0.5 ( x + sqrt( x^2 + 4 delta^2 ) ) *-----------------*/ static double smoothZero ( double x, double delta, double *dx ) { double sqr = sqrt ( x * x + 4.0 * delta * delta) ; if (dx) *dx = 0.5 * ( 1.0 + x / sqr ) ; return 0.5 * ( x + sqr ) ; } /*---------------------------------------------------* * CeilingPow: ceiling for positive x, flooring for negative x. * y = x * xmax / ( x^{2m} + xmax^{2m} )^{1/(2m)} * note: * - xmax has to be positive. * - -xmax < y < xmax. * - dy/dx|_{x=0} = 1. *-----------------*/ static double CeilingPow ( double x, double xmax, int pw, double *dx ) { double x2 = x * x ; double xmax2 = xmax * xmax ; double xp = 1.0 , xmp = 1.0 ; int m , mm ; double arg , dnm ; double result ; for ( m = 0 ; m < pw ; m ++ ) { xp *= x2 ; xmp *= xmax2 ; } arg = xp + xmp ; dnm = arg ; if ( pw == 1 || pw == 2 || pw == 4 || pw == 8 ) { if ( pw == 1 ) { mm = 1 ; } else if ( pw == 2 ) { mm = 2 ; } else if ( pw == 4 ) { mm = 3 ; } else if ( pw == 8 ) { mm = 4 ; } for ( m = 0 ; m < mm ; m ++ ) { dnm = sqrt( dnm ) ; } } else { dnm = pow( dnm , 1.0 / ( 2.0 * pw ) ) ; } dnm = 1.0 / dnm ; result = x * xmax * dnm ; (*dx) = xmax * xmp * dnm / arg ; return result ; } #endif /*---------------------------------------------------* * CeilingPow: ceiling for positive x, flooring for negative x. * y = x * xmax / ( x^{2m} + xmax^{2m} )^{1/(2m)} * note: * - xmax has to be positive. * - -xmax < y < xmax. * - dy/dx|_{x=0} = 1. *-----------------*/ #define Fn_CP( y , x , xmax , pw , dx ) { \ double x2 = (x) * (x) ; \ double xmax2 = (xmax) * (xmax) ; \ double xp = 1.0 , xmp = 1.0 ; \ int m , mm ; \ double arg , dnm ; \ for ( m = 0 ; m < pw ; m ++ ) { xp *= x2 ; xmp *= xmax2 ; } \ arg = xp + xmp ; \ dnm = arg ; \ if ( pw == 1 || pw == 2 || pw == 4 || pw == 8 ) { \ if ( pw == 1 ) { mm = 1 ; \ } else if ( pw == 2 ) { mm = 2 ; \ } else if ( pw == 4 ) { mm = 3 ; \ } else if ( pw == 8 ) { mm = 4 ; } \ for ( m = 0 ; m < mm ; m ++ ) { dnm = sqrt( dnm ) ; } \ } else { dnm = Fn_Pow( dnm , 1.0 / ( 2.0 * pw ) ) ; } \ dnm = 1.0 / dnm ; \ y = (x) * (xmax) * dnm ; \ dx = (xmax) * xmp * dnm / arg ; \ } /*===========================================================* * Functions for symmetry. *=================*/ /*---------------------------------------------------* * Declining function using a polynomial. *-----------------*/ #define Fn_DclPoly4( y , x , dx ) { \ TMF2 = (x) * (x) ; \ TMF3 = TMF2 * (x) ; \ TMF4 = TMF2 * TMF2 ; \ y = 1.0 / ( 1.0 + (x) + TMF2 + TMF3 + TMF4 ) ; \ dx = - ( 1.0 + 2.0 * (x) + 3.0 * TMF2 + 4.0 * TMF3 ) * y * y ; \ } /*---------------------------------------------------* * "smoothUpper" uasing a polynomial *-----------------*/ #define Fn_SUPoly4( y , x , xmax , dx ) { \ TMF1 = (x) / xmax ; \ Fn_DclPoly4( y , TMF1 , dx ) ; \ y = xmax * ( 1.0 - y ) ; \ dx = - dx ; \ } /*---------------------------------------------------* * SymAdd: evaluate additional term for symmetry. *-----------------*/ #define Fn_SymAdd( y , x , add0 , dx ) \ { \ TMF1 = 2.0 * ( x ) / ( add0 ) ; \ TMF2 = 1.0 + TMF1 * ( (1.0/2) + TMF1 * ( (1.0/6) \ + TMF1 * ( (1.0/24) + TMF1 * ( (1.0/120) \ + TMF1 * ( (1.0/720) + TMF1 * (1.0/5040) ) ) ) ) ) ; \ TMF3 = (1.0/2) + TMF1 * ( (1.0/3) \ + TMF1 * ( (1.0/8) + TMF1 * ( (1.0/30) \ + TMF1 * ( (1.0/144) + TMF1 * (1.0/840) ) ) ) ) ; \ y = add0 / TMF2 ; \ dx = - 2.0 * TMF3 / ( TMF2 * TMF2 ) ; \ } /*===========================================================* * Function hsm2evaluate. *=================*/ int HSM2evaluate ( double vds, double vgs, double vbs, double vbs_jct, double vbd_jct, HSM2instance *here, HSM2model *model, CKTcircuit *ckt ) { HSM2binningParam *pParam = &here->pParam ; HSM2modelMKSParam *modelMKS = &model->modelMKS ; /* HSM2hereMKSParam *hereMKS = &here->hereMKS ;*/ /*-----------------------------------* * Constants for Smoothing functions *---------------*/ const double vth_dlt = 1.0e-3 ; /* const double cclmmdf = 1.0e-2 ;*/ const double cclmmdf = 1.0e-1 ; const double qme_dlt = 1.0e-4 ; const double eef_dlt = 1.0e-2 * C_m2cm ; const double sti2_dlt = 2.0e-3 ; const double pol_dlt = 5.0e-2 ; const double psisti_dlt = 5.0e-3 ; /*---------------------------------------------------* * Local variables. *-----------------*/ /* Constants ----------------------- */ const int lp_s0_max = 20 ; const int lp_sl_max = 20 ; int lp_bs_max = 10 ; const double Ids_tol = 1.0e-10 ; const double Ids_maxvar = 1.0e-1 ; const double dP_max = 0.1e0 ; const double ps_conv = 5.0e-13 ; /* double ps_conv = 1.0e-13 ;*/ const double gs_conv = 1.0e-8 ; const double mini_current = 1.0e-15 ; /** depletion **/ const double znbd3 = 3.0e0 ; const double znbd5 = 5.0e0 ; const double cn_nc3 = C_SQRT_2 / 108e0 ; /* 5-degree, contact:Chi=5 */ const double cn_nc51 = 0.707106781186548 ; /* sqrt(2)/2 */ const double cn_nc52 = -0.117851130197758 ; /* -sqrt(2)/12 */ const double cn_nc53 = 0.0178800506338833 ; /* (187 - 112*sqrt(2))/1600 */ const double cn_nc54 = -0.00163730162779191 ; /* (-131 + 88*sqrt(2))/4000 */ const double cn_nc55 = 6.36964918866352e-5 ; /* (1509-1040*sqrt(2))/600000 */ /** inversion **/ /* 3-degree polynomial approx for ( exp[Chi]-1 )^{1/2} */ const double cn_im53 = 2.9693154855770998e-1 ; const double cn_im54 = -7.0536542840097616e-2 ; const double cn_im55 = 6.1152888951331797e-3 ; /** initial guess **/ const double c_ps0ini_2 = 8.0e-4 ; const double c_pslini_1 = 0.3e0 ; const double c_pslini_2 = 3.0e-2 ; const double VgVt_small = 1.0e-12 ; const double Vbs_min = -10.5e0 ; const double epsm10 = 10.0e0 * C_EPS_M ; const double small = 1.0e-50 ; const double small2 = 1.0e-12 ; /* for Qover */ double Vbs_max = 0.8e0 ; double Vbs_bnd = 0.4e0 ; /* start point of positive Vbs bending */ double Gdsmin = 0.0 ; double Gjmin = ckt->CKTgmin ; /* Internal flags --------------------*/ int flg_err = 0 ; /* error level */ int flg_rsrd = 0 ; /* Flag for bias loop accounting Rs and Rd */ int flg_iprv = 0 ; /* Flag for initial guess of Ids */ int flg_pprv = 0 ; /* Flag for initial guesses of Ps0 and Pds */ int flg_noqi =0; /* Flag for the cases regarding Qi=Qd=0 */ int flg_vbsc = 0 ; /* Flag for Vbs confining */ int flg_info = 0 ; int flg_conv = 0 ; /* Flag for Poisson loop convergence */ int flg_qme = 0 ; /* Flag for QME */ /* flag for NQS calculation */ int flg_nqs=0 ; /* Important Variables in HiSIM -------*/ /* external bias */ double Vbse =0.0, Vdse =0.0, Vgse =0.0 ; /* confine bias */ double Vbsc =0.0, Vdsc =0.0, Vgsc =0.0 ; double Vbsc_dVbse = 1.0 ; /* internal bias */ double Vbs =0.0, Vds =0.0, Vgs =0.0, Vdb =0.0, Vsb =0.0 ; double Vbs_dVbse = 1.0 , Vbs_dVdse = 0.0 , Vbs_dVgse = 0.0 ; double Vds_dVbse = 0.0 , Vds_dVdse = 1.0 , Vds_dVgse = 0.0 ; double Vgs_dVbse = 0.0 , Vgs_dVdse = 0.0 , Vgs_dVgse = 1.0 ; double Vgp =0.0 ; double Vgp_dVbs =0.0, Vgp_dVds =0.0, Vgp_dVgs =0.0 ; double Vgs_fb =0.0 ; /* Ps0 : surface potential at the source side */ double Ps0 =0.0 ; double Ps0_dVbs =0.0, Ps0_dVds =0.0, Ps0_dVgs =0.0 ; double Ps0_ini =0.0, Ps0_iniA =0.0, Ps0_iniB =0.0 ; /* Psl : surface potential at the drain side */ double Psl =0.0 ; double Psl_dVbs =0.0, Psl_dVds =0.0, Psl_dVgs =0.0 ; double Psl_lim =0.0, dPlim =0.0 ; /* Pds := Psl - Ps0 */ double Pds = 0.0 ; double Pds_dVbs = 0.0, Pds_dVds = 0.0 , Pds_dVgs = 0.0 ; double Pds_ini =0.0 ; double Pds_max =0.0 ; /* iteration numbers of Ps0 and Psl equations. */ int lp_s0 = 0 , lp_sl = 0 ; /* Xi0 := beta * ( Ps0 - Vbs ) - 1. */ double Xi0 =0.0 ; double Xi0_dVbs =0.0, Xi0_dVds =0.0, Xi0_dVgs =0.0 ; double Xi0p12 =0.0 ; double Xi0p12_dVbs =0.0, Xi0p12_dVds =0.0, Xi0p12_dVgs =0.0 ; double Xi0p32 =0.0 ; /* Xil := beta * ( Psl - Vbs ) - 1. */ double Xilp12 =0.0 ; double Xilp32 =0.0 ; double Xil =0.0 ; /* modified bias and potential for sym.*/ double Vbsz =0.0, Vdsz =0.0, Vgsz =0.0 ; double Vbsz_dVbs =0.0, Vbsz_dVds =0.0 ; double Vdsz_dVds =0.0 ; double Vgsz_dVgs =0.0, Vgsz_dVds =0.0 ; double Vzadd =0.0, Vzadd_dVds =0.0 ; double Ps0z =0.0, Ps0z_dVbs =0.0, Ps0z_dVds =0.0, Ps0z_dVgs =0.0 ; double Pzadd =0.0, Pzadd_dVbs =0.0, Pzadd_dVds =0.0, Pzadd_dVgs =0.0 ; double Vgpz , Vgpz_dVbs , Vgpz_dVds , Vgpz_dVgs ; /* (tmp) */ /* IBPC */ double dVbsIBPC =0.0, dVbsIBPC_dVbs =0.0, dVbsIBPC_dVds =0.0, dVbsIBPC_dVgs =0.0 ; double betaWL =0.0, betaWL_dVbs =0.0, betaWL_dVds =0.0, betaWL_dVgs =0.0 ; double Xi0p32_dVbs =0.0, Xi0p32_dVds =0.0, Xi0p32_dVgs =0.0 ; double Xil_dVbs =0.0, Xil_dVds =0.0, Xil_dVgs =0.0 ; double Xilp12_dVbs =0.0, Xilp12_dVds =0.0, Xilp12_dVgs =0.0 ; double Xilp32_dVbs =0.0, Xilp32_dVds =0.0, Xilp32_dVgs =0.0 ; double dG3 =0.0, dG3_dVbs =0.0, dG3_dVds =0.0, dG3_dVgs =0.0 ; double dG4 =0.0, dG4_dVbs =0.0, dG4_dVds =0.0, dG4_dVgs =0.0 ; double dIdd =0.0, dIdd_dVbs =0.0, dIdd_dVds =0.0, dIdd_dVgs =0.0 ; /* Chi := beta * ( Ps{0/l} - Vbs ) */ double Chi =0.0 ; double Chi_dVbs =0.0, Chi_dVds =0.0, Chi_dVgs =0.0 ; /* Rho := beta * ( Psl - Vds ) */ double Rho =0.0 ; /* threshold voltage */ double Vth =0.0 ; double Vth0 =0.0 ; double Vth0_dVb =0.0, Vth0_dVd =0.0, Vth0_dVg =0.0 ; /* variation of threshold voltage */ double dVth =0.0 ; double dVth_dVb =0.0, dVth_dVd =0.0, dVth_dVg =0.0 ; double dVth0 =0.0 ; double dVth0_dVb =0.0, dVth0_dVd =0.0, dVth0_dVg =0.0 ; double dVthSC =0.0 ; double dVthSC_dVb =0.0, dVthSC_dVd =0.0, dVthSC_dVg =0.0 ; double Pb20b =0.0 ; double Pb20b_dVg =0.0, Pb20b_dVb =0.0, Pb20b_dVd =0.0 ; double dVthW =0.0 ; double dVthW_dVb =0.0, dVthW_dVd =0.0, dVthW_dVg =0.0 ; /* Alpha and related parameters */ double Alpha =0.0 ; double Alpha_dVbs =0.0, Alpha_dVds =0.0, Alpha_dVgs =0.0 ; double Achi =0.0 ; double Achi_dVbs =0.0, Achi_dVds =0.0, Achi_dVgs =0.0 ; double VgVt = 0.0 ; double VgVt_dVbs = 0.0, VgVt_dVds = 0.0, VgVt_dVgs = 0.0 ; double Pslsat = 0.0 ; double Vdsat = 0.0 ; double VdsatS = 0.0 ; double VdsatS_dVbs = 0.0, VdsatS_dVds = 0.0, VdsatS_dVgs = 0.0 ; double Delta =0.0 ; /* Q_B and capacitances */ double Qb =0.0, Qb_dVbs =0.0, Qb_dVds =0.0, Qb_dVgs =0.0 ; double Qb_dVbse =0.0, Qb_dVdse =0.0, Qb_dVgse =0.0 ; double Qbu = 0.0 , Qbu_dVbs = 0.0 , Qbu_dVds = 0.0 , Qbu_dVgs = 0.0 ; /* Q_I and capacitances */ double Qi =0.0, Qi_dVbs =0.0, Qi_dVds =0.0, Qi_dVgs =0.0 ; double Qi_dVbse =0.0, Qi_dVdse =0.0, Qi_dVgse =0.0 ; double Qiu = 0.0 , Qiu_dVbs = 0.0 , Qiu_dVds = 0.0 , Qiu_dVgs = 0.0 ; /* Q_D and capacitances */ double Qd =0.0, Qd_dVbs =0.0, Qd_dVds =0.0, Qd_dVgs =0.0 ; double Qd_dVbse =0.0, Qd_dVdse =0.0, Qd_dVgse =0.0 ; double qd_dVgse=0.0, qd_dVdse=0.0, qd_dVbse=0.0, qd_dVsse =0.0 ; /* channel current */ double Ids =0.0 ; double Ids_dVbs =0.0, Ids_dVds =0.0, Ids_dVgs =0.0 ; double Ids_dVbse =0.0, Ids_dVdse =0.0, Ids_dVgse =0.0 ; double Ids0 =0.0 ; double Ids0_dVbs =0.0, Ids0_dVds =0.0, Ids0_dVgs =0.0 ; /* STI */ double dVthSCSTI =0.0 ; double dVthSCSTI_dVg =0.0, dVthSCSTI_dVd =0.0, dVthSCSTI_dVb =0.0 ; double Vgssti =0.0 ; double Vgssti_dVbs =0.0, Vgssti_dVds =0.0, Vgssti_dVgs =0.0 ; double costi0 =0.0, costi1 =0.0, costi3 =0.0 ; double costi4 =0.0, costi5 =0.0, costi6 =0.0, costi7 =0.0 ; double costi3_dVb =0.0, costi3_dVd=0.0, costi3_dVg =0.0 ; double costi3_dVb_c3 =0.0, costi3_dVd_c3=0.0, costi3_dVg_c3 =0.0 ; double Psasti =0.0 ; double Psasti_dVbs =0.0, Psasti_dVds =0.0, Psasti_dVgs =0.0 ; double Psbsti =0.0 ; double Psbsti_dVbs =0.0, Psbsti_dVds =0.0, Psbsti_dVgs =0.0 ; double Psab =0.0 ; double Psab_dVbs =0.0, Psab_dVds =0.0, Psab_dVgs =0.0 ; double Psti =0.0 ; double Psti_dVbs =0.0, Psti_dVds =0.0, Psti_dVgs =0.0 ; double sq1sti =0.0 ; double sq1sti_dVbs =0.0, sq1sti_dVds =0.0, sq1sti_dVgs =0.0 ; double sq2sti =0.0 ; double sq2sti_dVbs =0.0, sq2sti_dVds =0.0, sq2sti_dVgs =0.0 ; double Qn0sti =0.0 ; double Qn0sti_dVbs =0.0, Qn0sti_dVds =0.0, Qn0sti_dVgs =0.0 ; double Idssti =0.0 ; double Idssti_dVbs =0.0, Idssti_dVds =0.0, Idssti_dVgs =0.0 ; /* constants */ double beta =0.0, beta_inv =0.0 ; double beta2 =0.0 ; double Pb2 =0.0 ; double Pb20 =0.0 ; double Pb2c =0.0 ; double Vfb =0.0 ; double c_eox =0.0 ; double Leff=0.0, Weff =0.0 ; double q_Nsub =0.0 ; /* PART-1 */ /* Accumulation zone */ double Psa =0.0 ; double Psa_dVbs =0.0, Psa_dVds =0.0, Psa_dVgs =0.0 ; /* CLM*/ double Psdl =0.0, Psdl_dVbs =0.0, Psdl_dVds =0.0, Psdl_dVgs =0.0 ; double Lred =0.0, Lred_dVbs =0.0, Lred_dVds =0.0, Lred_dVgs =0.0 ; double Lch =0.0, Lch_dVbs =0.0, Lch_dVds =0.0, Lch_dVgs =0.0 ; double Wd =0.0, Wd_dVbs =0.0, Wd_dVds =0.0, Wd_dVgs =0.0 ; double Aclm =0.0 ; /* Pocket Implant */ double Vthp=0.0, Vthp_dVb=0.0, Vthp_dVd=0.0, Vthp_dVg =0.0 ; double dVthLP=0.0, dVthLP_dVb=0.0, dVthLP_dVd=0.0, dVthLP_dVg =0.0 ; double bs12=0.0, bs12_dVb=0.0, bs12_dVd =0.0, bs12_dVg =0.0 ; double Qbmm=0.0, Qbmm_dVb=0.0, Qbmm_dVd =0.0, Qbmm_dVg =0.0 ; double dqb=0.0, dqb_dVb=0.0, dqb_dVg=0.0, dqb_dVd =0.0 ; double Vdx=0.0, Vdx2 =0.0 ; double Pbsum=0.0, sqrt_Pbsum =0.0 ; double Pbsum_dVb=0.0, Pbsum_dVd=0.0, Pbsum_dVg =0.0 ; /* Poly-Depletion Effect */ const double pol_b = 1.0 ; double dPpg =0.0, dPpg_dVb =0.0, dPpg_dVd =0.0, dPpg_dVg =0.0; /* Quantum Effect */ double Tox =0.0, Tox_dVb =0.0, Tox_dVd =0.0, Tox_dVg =0.0 ; double dTox =0.0, dTox_dVb =0.0, dTox_dVd =0.0, dTox_dVg =0.0 ; double Cox =0.0, Cox_dVb =0.0, Cox_dVd =0.0, Cox_dVg =0.0 ; double Cox_inv =0.0, Cox_inv_dVb =0.0, Cox_inv_dVd =0.0, Cox_inv_dVg =0.0 ; double Tox0 =0.0, Cox0 =0.0, Cox0_inv =0.0 ; double Vthq=0.0, Vthq_dVb =0.0, Vthq_dVd =0.0 ; /* Igate , Igidl , Igisl */ const double igate_dlt = 1.0e-2 ; double Psdlz =0.0, Psdlz_dVbs =0.0, Psdlz_dVds =0.0, Psdlz_dVgs =0.0 ; double Egp12 =0.0, Egp32 =0.0 ; double E1 =0.0, E1_dVb =0.0, E1_dVd =0.0, E1_dVg =0.0 ; double Qb0Cox =0.0, Qb0Cox_dVb =0.0, Qb0Cox_dVd =0.0, Qb0Cox_dVg =0.0 ; double Etun =0.0, Etun_dVbs =0.0, Etun_dVds =0.0, Etun_dVgs =0.0 ; double Egidl =0.0, Egidl_dVb =0.0, Egidl_dVd =0.0, Egidl_dVg =0.0 ; double Egisl =0.0, Egisl_dVb =0.0, Egisl_dVd =0.0, Egisl_dVg =0.0 ; double Igate =0.0, Igate_dVbs =0.0, Igate_dVds =0.0, Igate_dVgs =0.0 ; double Igate_dVbse =0.0, Igate_dVdse =0.0, Igate_dVgse =0.0 ; double Igs =0.0, Igd =0.0, Igb =0.0 ; double Igs_dVbs =0.0, Igs_dVds =0.0, Igs_dVgs =0.0 ; double Igs_dVbse =0.0, Igs_dVdse =0.0, Igs_dVgse =0.0 ; double Igd_dVbs =0.0, Igd_dVds =0.0, Igd_dVgs =0.0 ; double Igd_dVbse =0.0, Igd_dVdse =0.0, Igd_dVgse =0.0 ; double Igb_dVbs =0.0, Igb_dVds =0.0, Igb_dVgs =0.0 ; double Igb_dVbse =0.0, Igb_dVdse =0.0, Igb_dVgse =0.0 ; double Igidl =0.0, Igidl_dVbs =0.0, Igidl_dVds =0.0, Igidl_dVgs =0.0 ; double Igidl_dVbse =0.0, Igidl_dVdse =0.0, Igidl_dVgse =0.0 ; double Igisl =0.0, Igisl_dVbs =0.0, Igisl_dVds =0.0, Igisl_dVgs =0.0 ; double Igisl_dVbse =0.0, Igisl_dVdse =0.0, Igisl_dVgse =0.0 ; /* connecting function */ double FD2 =0.0, FD2_dVbs =0.0, FD2_dVds =0.0, FD2_dVgs =0.0 ; double FMDVDS =0.0, FMDVDS_dVbs =0.0, FMDVDS_dVds =0.0, FMDVDS_dVgs =0.0 ; double cnst0 =0.0, cnst1 =0.0 ; double cnstCoxi =0.0 , cnstCoxi_dVg =0.0 , cnstCoxi_dVd =0.0 , cnstCoxi_dVb =0.0 ; double fac1 =0.0 ; double fac1_dVbs =0.0, fac1_dVds =0.0, fac1_dVgs =0.0 ; double fac1p2 =0.0 ; double fs01 =0.0 ; double fs01_dPs0 =0.0 ; double fs01_dVbs =0.0, fs01_dVds =0.0, fs01_dVgs =0.0 ; double fs02 =0.0 ; double fs02_dPs0 =0.0 ; double fs02_dVbs =0.0, fs02_dVds =0.0, fs02_dVgs =0.0 ; double fsl1 =0.0 ; double fsl1_dPsl =0.0 ; double fsl1_dVbs =0.0, fsl1_dVds =0.0, fsl1_dVgs =0.0; /* Vdseff */ double fsl2 =0.0 ; double fsl2_dPsl =0.0 ; double fsl2_dVbs =0.0, fsl2_dVds =0.0, fsl2_dVgs =0.0; /* Vdseff */ double cfs1 =0.0 ; double fb =0.0, fb_dChi =0.0 ; double fi =0.0, fi_dChi =0.0 ; double exp_Chi =0.0, exp_Rho =0.0, exp_bVbs =0.0, exp_bVbsVds =0.0 ; double Fs0=0.0, Fsl =0.0 ; double Fs0_dPs0 =0.0, Fsl_dPsl =0.0 ; double dPs0 =0.0, dPsl =0.0 ; double Qn0 = 0.0e0 ; double Qn0_dVbs =0.0, Qn0_dVds =0.0, Qn0_dVgs =0.0 ; double Qb0 =0.0 ; double Qb0_dVb =0.0, Qb0_dVd =0.0, Qb0_dVg =0.0 ; double Qbnm =0.0 ; double Qbnm_dVbs =0.0, Qbnm_dVds =0.0, Qbnm_dVgs =0.0 ; double DtPds =0.0 ; double DtPds_dVbs =0.0, DtPds_dVds =0.0, DtPds_dVgs =0.0 ; double Qinm =0.0 ; double Qinm_dVbs =0.0, Qinm_dVds =0.0, Qinm_dVgs =0.0 ; double Qidn =0.0 ; double Qidn_dVbs =0.0, Qidn_dVds =0.0, Qidn_dVgs =0.0 ; double Qdnm =0.0 ; double Qdnm_dVbs =0.0, Qdnm_dVds =0.0, Qdnm_dVgs =0.0 ; double Qddn =0.0 ; double Qddn_dVbs =0.0, Qddn_dVds =0.0, Qddn_dVgs =0.0 ; double Quot =0.0 ; double Qdrat = 0.5 ; double Qdrat_dVbs = 0.0 , Qdrat_dVds = 0.0, Qdrat_dVgs = 0.0 ; double Qdrat_dVbse =0.0, Qdrat_dVdse =0.0, Qdrat_dVgse =0.0 ; double Idd =0.0 ; double Idd_dVbs =0.0, Idd_dVds =0.0, Idd_dVgs =0.0 ; double Fdd =0.0 ; double Fdd_dVbs =0.0, Fdd_dVds =0.0, Fdd_dVgs =0.0 ; double Eeff =0.0 ; double Eeff_dVbs =0.0, Eeff_dVds =0.0, Eeff_dVgs =0.0 ; double Rns =0.0 ; double Mu = 0.0 ; double Mu_dVbs =0.0, Mu_dVds =0.0, Mu_dVgs =0.0 ; double Muun =0.0, Muun_dVbs =0.0, Muun_dVds =0.0, Muun_dVgs =0.0 ; double Ey = 0e0 ; double Ey_dVbs =0.0, Ey_dVds =0.0, Ey_dVgs =0.0 ; double Em =0.0 ; double Em_dVbs =0.0, Em_dVds =0.0, Em_dVgs =0.0 ; double Vmax =0.0 ; double Eta =0.0 ; double Eta_dVbs =0.0, Eta_dVds =0.0, Eta_dVgs =0.0 ; double Eta1 =0.0, Eta1p12 =0.0, Eta1p32 =0.0, Eta1p52 =0.0 ; double Zeta12 =0.0, Zeta32 =0.0, Zeta52 =0.0 ; double F00 =0.0 ; double F00_dVbs =0.0, F00_dVds =0.0, F00_dVgs =0.0 ; double F10 =0.0 ; double F10_dVbs =0.0, F10_dVds =0.0, F10_dVgs =0.0 ; double F30 =0.0 ; double F30_dVbs =0.0, F30_dVds =0.0, F30_dVgs =0.0 ; double F11 =0.0 ; double F11_dVbs =0.0, F11_dVds =0.0, F11_dVgs =0.0 ; double Ps0_min =0.0 ; double Ps0_min_dVbs =0.0, Ps0_min_dVds =0.0, Ps0_min_dVgs =0.0 ; double Acn =0.0, Acd =0.0, Ac1 =0.0, Ac2 =0.0, Ac3 =0.0, Ac4 =0.0, Ac31 =0.0, Ac41 =0.0 ; double Acn_dVbs =0.0, Acn_dVds =0.0, Acn_dVgs =0.0 ; double Acd_dVbs =0.0, Acd_dVds =0.0, Acd_dVgs =0.0 ; double Ac1_dVbs =0.0, Ac1_dVds =0.0, Ac1_dVgs =0.0 ; double Ac2_dVbs =0.0, Ac2_dVds =0.0, Ac2_dVgs =0.0 ; double Ac3_dVbs =0.0, Ac3_dVds =0.0, Ac3_dVgs =0.0 ; double Ac4_dVbs =0.0, Ac4_dVds =0.0, Ac4_dVgs =0.0 ; double Ac31_dVbs =0.0, Ac31_dVds =0.0, Ac31_dVgs =0.0 ; /* PART-2 (Isub) */ double Isub =0.0 ; double Isub_dVbs =0.0, Isub_dVds =0.0, Isub_dVgs =0.0 ; double Isub_dVbse =0.0, Isub_dVdse =0.0, Isub_dVgse =0.0 ; double Psislsat=0.0, Psisubsat =0.0 ; double Psislsat_dVd=0.0, Psislsat_dVg=0.0, Psislsat_dVb =0.0 ; double Psisubsat_dVd=0.0, Psisubsat_dVg=0.0, Psisubsat_dVb =0.0 ; /* PART-3 (overlap) */ double cov_slp =0.0, cov_mag =0.0, covvg =0.0, covvg_dVgs =0.0 ; double Lov =0.0 ; double Qgos = 0.0, Qgos_dVbs = 0.0, Qgos_dVds = 0.0, Qgos_dVgs = 0.0 ; double Qgos_dVbse =0.0, Qgos_dVdse =0.0, Qgos_dVgse =0.0 ; double Qgod = 0.0, Qgod_dVbs = 0.0, Qgod_dVds = 0.0, Qgod_dVgs = 0.0 ; double Qgod_dVbse =0.0, Qgod_dVdse =0.0, Qgod_dVgse =0.0 ; int flg_overgiven =0 ; double Qgbo =0.0, Qgbo_dVbs =0.0, Qgbo_dVds =0.0, Qgbo_dVgs =0.0 ; double Qgbo_dVbse =0.0, Qgbo_dVdse =0.0, Qgbo_dVgse =0.0 ; double Cggo = 0.0 , Cgdo = 0.0 , Cgso = 0.0 , Cgbo = 0.0 , Cgbo_loc=0.0 ; /* fringing capacitance */ double Cf =0.0 ; double Qfd =0.0, Qfs =0.0 ; /* Cqy */ double Ec =0.0, Ec_dVbs =0.0, Ec_dVds =0.0, Ec_dVgs =0.0 ; double Pslk =0.0, Pslk_dVbs =0.0, Pslk_dVds =0.0, Pslk_dVgs =0.0 ; double Qy =0.0 ; double Cqyd=0.0, Cqyg=0.0, Cqys=0.0, Cqyb =0.0 ; double Qy_dVbs =0.0, Qy_dVds =0.0, Qy_dVgs=0.0 ; double Qy_dVbse =0.0, Qy_dVdse=0.0, Qy_dVgse=0.0 ; double Qys=0.0, Qys_dVbse =0.0, Qys_dVdse=0.0, Qys_dVgse=0.0 ; /* PART-4 (junction diode) */ double Ibs =0.0, Ibd =0.0, Gbs =0.0, Gbd =0.0, Gbse =0.0, Gbde =0.0 ; /* junction capacitance */ double Qbs =0.0, Qbd =0.0, Capbs =0.0, Capbd =0.0, Capbse =0.0, Capbde =0.0 ; double czbd =0.0, czbdsw =0.0, czbdswg =0.0, czbs =0.0, czbssw =0.0, czbsswg =0.0 ; double arg =0.0, sarg =0.0 ; /* PART-5 (NQS) */ double tau=0.0, Qi_prev =0.0; double tau_dVgs=0.0, tau_dVds=0.0, tau_dVbs =0.0 ; double tau_dVgse=0.0, tau_dVdse=0.0, tau_dVbse =0.0 ; double Qi_nqs =0.0 ; double Qi_dVbs_nqs=0.0, Qi_dVds_nqs=0.0, Qi_dVgs_nqs =0.0 ; double Qi_dVbse_nqs=0.0, Qi_dVdse_nqs=0.0, Qi_dVgse_nqs =0.0 ; double taub=0.0, Qb_prev =0.0; double taub_dVgs=0.0, taub_dVds=0.0, taub_dVbs =0.0 ; double taub_dVgse=0.0, taub_dVdse=0.0, taub_dVbse =0.0 ; double Qb_nqs =0.0 ; double Qb_dVbs_nqs=0.0, Qb_dVds_nqs=0.0, Qb_dVgs_nqs =0.0 ; double Qb_dVbse_nqs=0.0, Qb_dVdse_nqs=0.0, Qb_dVgse_nqs =0.0 ; /* PART-6 (noise) */ /* 1/f */ double NFalp =0.0, NFtrp =0.0, Cit =0.0, Nflic =0.0 ; /* thermal */ double Eyd=0.0, Mu_Ave=0.0, Nthrml=0.0, Mud_hoso =0.0 ; /* induced gate noise ( Part 0/3 ) */ double kusai00 =0.0, kusaidd =0.0, kusaiL =0.0, kusai00L =0.0 ; int flg_ign = 0 ; double sqrtkusaiL =0.0, kusai_ig =0.0, gds0_ign =0.0, gds0_h2 =0.0, GAMMA =0.0, crl_f =0.0 ; const double c_sqrt_15 = 3.872983346207417e0 ; /* sqrt(15) */ const double Cox_small = 1.0e-6 ; const double c_16o135 = 1.185185185185185e-1 ; /* 16/135 */ double Nign0 =0.0, MuModA =0.0, MuModB =0.0, correct_w1 =0.0 ; /* Bias iteration accounting Rs/Rd */ int lp_bs =0 ; double Ids_last =0.0 ; double vtol_iprv = 2.0e-1 ; double vtol_pprv = 1.01e-1 ; double Vbsc_dif =0.0, Vdsc_dif =0.0, Vgsc_dif =0.0, sum_vdif =0.0 ; double Vbsc_dif2 =0.0, Vdsc_dif2 =0.0, Vgsc_dif2 =0.0, sum_vdif2 =0.0 ; double Rs =0.0, Rd =0.0 ; double Fbs =0.0, Fds =0.0, Fgs =0.0 ; double DJ =0.0, DJI =0.0 ; double JI11 =0.0, JI12 =0.0, JI13 =0.0, JI21 =0.0, JI22 =0.0, JI23 =0.0, JI31 =0.0, JI32 =0.0, JI33 =0.0 ; double dVbs =0.0, dVds =0.0, dVgs =0.0 ; double dV_sum =0.0 ; /* temporary vars. */ double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12 ; double TX =0.0, TX_dVbs =0.0, TX_dVds =0.0, TX_dVgs =0.0 ; double TY =0.0, TY_dVbs =0.0, TY_dVds =0.0, TY_dVgs =0.0 ; double T1_dVb =0.0, T1_dVd =0.0, T1_dVg =0.0 ; double T2_dVb =0.0, T2_dVd =0.0, T2_dVg =0.0 ; double T3_dVb =0.0, T3_dVd =0.0, T3_dVg =0.0 ; double T4_dVb =0.0, T4_dVd =0.0, T4_dVg =0.0 ; double T5_dVb =0.0, T5_dVd =0.0, T5_dVg =0.0 ; double T6_dVb =0.0, T6_dVd =0.0, T6_dVg =0.0 ; double T7_dVb =0.0, T7_dVd =0.0, T7_dVg =0.0 ; double T8_dVb =0.0, T8_dVd =0.0, T8_dVg =0.0 ; double T9_dVb =0.0, T9_dVd =0.0, T9_dVg =0.0 ; double T10_dVb =0.0, T10_dVd =0.0, T10_dVg =0.0 ; int flg_zone = 0 ; double Vfbsft = 0.0 , Vfbsft_dVbs =0.0, Vfbsft_dVds =0.0, Vfbsft_dVgs =0.0 ; /* Vdseff */ double Vdseff =0.0, Vdsorg =0.0 ; double Vdseff_dVbs =0.0, Vdseff_dVds =0.0, Vdseff_dVgs =0.0 ; /* G/S and G/D Overlap Charges: Qovs/Qovd */ double Qovd = 0.0, Qovd_dVbse = 0.0, Qovd_dVdse = 0.0, Qovd_dVgse = 0.0 ; double Qovd_dVbs = 0.0, Qovd_dVds = 0.0, Qovd_dVgs = 0.0 ; double Qovs = 0.0, Qovs_dVbse = 0.0, Qovs_dVdse = 0.0, Qovs_dVgse = 0.0 ; double Qovs_dVbs = 0.0, Qovs_dVds = 0.0, Qovs_dVgs = 0.0 ; int lcover = 0, flg_ovloops = 0, flg_ovloopd = 0 ; int flg_overs = 0, flg_overd = 0 ; double VgpLD =0.0 ; double QbdLD = 0.0 , QbdLD_dVbs = 0.0 , QbdLD_dVds = 0.0 , QbdLD_dVgs = 0.0 ; double QidLD = 0.0 , QidLD_dVbs = 0.0 , QidLD_dVds = 0.0 , QidLD_dVgs = 0.0 ; double QbsLD = 0.0 , QbsLD_dVbs = 0.0 , QbsLD_dVds = 0.0 , QbsLD_dVgs = 0.0 ; double QisLD = 0.0 , QisLD_dVbs = 0.0 , QisLD_dVds = 0.0 , QisLD_dVgs = 0.0 ; double QbdLD_dVbse = 0.0 , QbdLD_dVdse = 0.0 , QbdLD_dVgse = 0.0 ; double QidLD_dVbse = 0.0 , QidLD_dVdse = 0.0 , QidLD_dVgse = 0.0 ; double QbsLD_dVbse = 0.0 , QbsLD_dVdse = 0.0 , QbsLD_dVgse = 0.0 ; double QisLD_dVbse = 0.0 , QisLD_dVdse = 0.0 , QisLD_dVgse = 0.0 ; double QbuLD = 0.0 , QbuLD_dVbs = 0.0 , QbuLD_dVds = 0.0 , QbuLD_dVgs = 0.0 ; double QsuLD = 0.0 , QsuLD_dVbs = 0.0 , QsuLD_dVds = 0.0 , QsuLD_dVgs = 0.0 ; double QiuLD = 0.0 , QiuLD_dVbs = 0.0 , QiuLD_dVds = 0.0 , QiuLD_dVgs = 0.0 ; double Ps0LD = 0.0 , Ps0LD_dVds = 0.0 ; double QbuLD_dVxb = 0.0 , QbuLD_dVgb = 0.0 ; double QsuLD_dVxb = 0.0 , QsuLD_dVgb = 0.0 ; int flg_ovzone = 0 ; /* Vgsz for SCE and PGD */ double Vbsz2 =0.0, Vbsz2_dVbs =0.0, Vbsz2_dVds =0.0, Vbsz2_dVgs =0.0 ; /* Multiplication factor of a MOSFET instance */ double M = 1.0 ; /* Mode flag ( = 0 | 1 ) */ double ModeNML =0.0, ModeRVS =0.0 ; /* For Gate Leak Current Partitioning */ double GLPART1 ; double GLPART1_dVgs=0.0, GLPART1_dVds=0.0, GLPART1_dVbs =0.0; double GLPART1_dVgse=0.0, GLPART1_dVdse=0.0, GLPART1_dVbse =0.0; /* IBPC */ double IdsIBPC = 0.0 ; double IdsIBPC_dVbs = 0.0 , IdsIBPC_dVds = 0.0 , IdsIBPC_dVgs = 0.0 ; double IdsIBPC_dVbse = 0.0 , IdsIBPC_dVdse = 0.0 , IdsIBPC_dVgse = 0.0 ; /* Overlap Charge: Qover */ double Vbsgmt =0.0, Vdsgmt =0.0, Vgsgmt =0.0, Vdbgmt =0.0, Vgbgmt =0.0, Vsbgmt =0.0, Vxbgmt =0.0 ; double Vxbgmtcl = 0.0, Vxbgmtcl_dVxbgmt = 0.0 ; double Pb2over =0.0 ; /* Qover Iterative and Analytical Model */ const double large_arg = 80 ; int lp_ld =0 ; double T1_dVxb=0.0, T1_dVgb=0.0, T5_dVxb=0.0, T5_dVgb =0.0 ; double Vgb_fb_LD=0.0, VgpLD_dVgb =0.0 ; double VgpLD_shift=0.0, VgpLD_shift_dVxb=0.0, VgpLD_shift_dVgb =0.0 ; double TX_dVxb=0.0, TX_dVgb=0.0, TY_dVxb=0.0, TY_dVgb =0.0 ; double Ac1_dVxb=0.0, Ac1_dVgb=0.0, Ac2_dVxb=0.0, Ac2_dVgb =0.0 ; double Ac3_dVxb=0.0, Ac3_dVgb=0.0, Ac31_dVxb=0.0, Ac31_dVgb =0.0; double Acd_dVxb=0.0, Acd_dVgb=0.0, Acn_dVxb=0.0, Acn_dVgb =0.0; double Ta = 9.3868e-3, Tb = -0.1047839 ; double Tc=0.0, Tp =0.0 ; double Td=0.0, Td_dVxb=0.0, Td_dVgb =0.0 ; double Tq=0.0, Tq_dVxb=0.0, Tq_dVgb =0.0 ; double Tu=0.0, Tu_dVxb=0.0, Tu_dVgb =0.0 ; double Tv=0.0, Tv_dVxb=0.0, Tv_dVgb =0.0 ; double exp_bVbs_dVxb=0.0, exp_bPs0 =0.0 ; double cnst1over =0.0; double gamma=0.0, gamma_dVxb =0.0; double Chi_dVxb=0.0, Chi_dVgb =0.0 ; double Chi_A=0.0, Chi_A_dVxb=0.0, Chi_A_dVgb =0.0 ; double Chi_B=0.0, Chi_B_dVxb=0.0, Chi_B_dVgb =0.0 ; double Chi_1=0.0, Chi_1_dVxb=0.0, Chi_1_dVgb =0.0 ; double psi_B=0.0, arg_B =0.0 ; double psi=0.0, psi_dVgb=0.0, psi_dVxb =0.0 ; double Ps0_iniA_dVxb=0.0, Ps0_iniA_dVgb =0.0 ; double Ps0_iniB_dVxb=0.0, Ps0_iniB_dVgb =0.0 ; double Psa_dVxb=0.0, Psa_dVgb=0.0, Ps0LD_dVxb=0.0, Ps0LD_dVgb =0.0 ; double fs02_dVxb=0.0, fs02_dVgb =0.0 ; /* SCE LOOP */ double A =0.0, A_dVgs=0.0, A_dVds=0.0, A_dVbs =0.0 ; int NNN =0 ; double PS0_SCE=0 , PS0_SCE_dVgs = 0 , PS0_SCE_dVds = 0 , PS0_SCE_dVbs = 0 ; double PS0Z_SCE=0 , PS0Z_SCE_dVgs = 0 , PS0Z_SCE_dVds = 0 , PS0Z_SCE_dVbs = 0 ; /* double arg0 = 0.01 , arg1 = 0.04 ; */ double arg0 = 0.01 ; double arg2 = here->HSM2_2qnsub_esi * 1.0e-4 ; int MAX_LOOP_SCE =0 ; int codqb = 0 ; int corecip = model->HSM2_corecip ; /* modify Qy in accumulation region */ double Aclm_eff=0.0, Aclm_eff_dVds=0.0, Aclm_eff_dVgs=0.0, Aclm_eff_dVbs =0.0 ; double Idd1 =0.0, Idd1_dVbs =0.0, Idd1_dVgs =0.0, Idd1_dVds =0.0 ; double tcjbs=0.0, tcjbssw=0.0, tcjbsswg=0.0, tcjbd=0.0, tcjbdsw=0.0, tcjbdswg=0.0 ; double TTEMP =0.0 ; double PS0_SCE_tol = 4.0e-7 ; double PS0_SCE_deriv_tol = 1.0e-8 ; double Ps0_ini_dVds =0.0, Ps0_ini_dVgs =0.0, Ps0_ini_dVbs =0.0 ; double Ps0_iniA_dVds =0.0, Ps0_iniA_dVgs =0.0, Ps0_iniA_dVbs =0.0 ; double Ps0_iniB_dVds =0.0, Ps0_iniB_dVgs =0.0, Ps0_iniB_dVbs =0.0 ; double A_dPS0Z = 0.0, dqb_dPS0Z = 0.0, dVth_dPS0Z = 0.0, dVth0_dPS0Z = 0.0, dVthLP_dPS0Z = 0.0, dVthSC_dPS0Z = 0.0, Qbmm_dPS0Z = 0.0, Vfbsft_dPS0Z = 0.0, Vgp_dPS0Z = 0.0, Vgpz_dPS0Z = 0.0, Vthp_dPS0Z = 0.0, Vth0_dPS0Z = 0.0 ; double T1_dPS0Z=0.0, T3_dPS0Z=0.0, T4_dPS0Z=0.0, T5_dPS0Z=0.0, T6_dPS0Z=0.0, T7_dPS0Z=0.0, T8_dPS0Z=0.0, T9_dPS0Z=0.0, T10_dPS0Z=0.0, TX_dPS0Z =0.0 ; double Ac1_dPS0Z=0.0, Ac2_dPS0Z=0.0, Ac3_dPS0Z=0.0, Ac31_dPS0Z=0.0, Acd_dPS0Z=0.0, Acn_dPS0Z=0.0, Chi_dPS0Z=0.0, Psa_dPS0Z =0.0 ; double Fs0_dPS0Z=0.0, Fsl_dPS0Z=0.0, Ps0_dPS0Z=0.0, Psl_dPS0Z=0.0, Pds_dPS0Z=0.0, Pzadd_dPS0Z=0.0, Ps0z_dPS0Z =0.0 ; double G=0.0, delta_PS0Z_SCE=0.0, delta_PS0Z_SCE_dVds=0.0, delta_PS0Z_SCE_dVgs=0.0, delta_PS0Z_SCE_dVbs =0.0 ; double Vgs_min =0.0 ; /*================ Start of executable code.=================*/ if (here->HSM2_mode == HiSIM_NORMAL_MODE) { ModeNML = 1.0 ; ModeRVS = 0.0 ; } else { ModeNML = 0.0 ; ModeRVS = 1.0 ; } T1 = vbs + vds + vgs + vbd_jct + vbs_jct ; if ( ! finite (T1) ) { fprintf (stderr , "*** warning(HiSIM): Unacceptable Bias(es).\n" ) ; fprintf (stderr , "----- bias information (HiSIM)\n" ) ; fprintf (stderr , "name: %s\n" , here->HSM2name ) ; fprintf (stderr , "states: %d\n" , here->HSM2states ) ; fprintf (stderr , "vds= %12.5e vgs=%12.5e vbs=%12.5e\n" , vds , vgs , vbs ) ; fprintf (stderr , "vbs_jct= %12.5e vbd_jct= %12.5e\n" , vbs_jct , vbd_jct ) ; fprintf (stderr , "vd= %12.5e vg= %12.5e vb= %12.5e vs= %12.5e\n" , *( ckt->CKTrhsOld + here->HSM2dNodePrime ) , *( ckt->CKTrhsOld + here->HSM2gNodePrime ) , *( ckt->CKTrhsOld + here->HSM2bNodePrime ) , *( ckt->CKTrhsOld + here->HSM2sNodePrime ) ) ; if ( here->HSM2_called >= 1 ) { fprintf (stderr , "vdsc_prv= %12.5e vgsc_prv=%12.5e vbsc_prv=%12.5e\n" , here->HSM2_vdsc_prv , here->HSM2_vgsc_prv , here->HSM2_vbsc_prv ) ; } fprintf (stderr , "----- bias information (end)\n" ) ; return ( HiSIM_ERROR ) ; } flg_info = model->HSM2_info ; flg_nqs = model->HSM2_conqs ; /*-----------------------------------------------------------* * Start of the routine. (label) *-----------------*/ /*start_of_routine:*/ TTEMP = ckt->CKTtemp ; if ( here->HSM2_dtemp_Given ) { TTEMP = TTEMP + here->HSM2_dtemp ; } beta = here->HSM2_beta ; /* Inverse of the thermal voltage */ beta_inv = here->HSM2_beta_inv ; beta2 = here->HSM2_beta2 ; /* Bandgap */ Egp12 = here->HSM2_egp12 ; Egp32 = here->HSM2_egp32 ; /* Metallurgical channel geometry */ Leff = here->HSM2_leff ; Weff = here->HSM2_weff ; /* Flat band voltage */ Vfb = pParam->HSM2_vfbc ; /* Surface impurity profile */ q_Nsub = here->HSM2_qnsub ; /* Velocity Temperature Dependence */ Vmax = here->HSM2_vmax ; /* 2 phi_B */ Pb2 = here->HSM2_pb2 ; Pb20 = here->HSM2_pb20 ; Pb2c = here->HSM2_pb2c ; /* Coefficient of the F function for bulk charge */ cnst0 = here->HSM2_cnst0 ; /* cnst1: n_{p0} / p_{p0} */ cnst1 = here->HSM2_cnst1 ; /* c_eox: Permitivity in ox */ c_eox = here->HSM2_cecox ; /* Tox and Cox without QME */ Tox0 = model->HSM2_tox ; Cox0 = c_eox / Tox0 ; Cox0_inv = 1.0 / Cox0 ; /* for calculation of Ps0_min */ Vgs_min = model->HSM2_type * model->HSM2_Vgsmin ; /*-----------------------------------------------------------* * Exchange bias conditions according to MOS type. * - Vxse are external biases for HiSIM. ( type=NMOS , Vds >= 0 * are assumed.) *-----------------*/ Vbse = vbs ; Vdse = vds ; Vgse = vgs ; /*---------------------------------------------------* * Clamp too large biases. * -note: Quantities are extrapolated in PART-5. *-----------------*/ if ( Pb2 - model->HSM2_vzadd0 < Vbs_max ) { Vbs_max = Pb2 - model->HSM2_vzadd0 ; } if ( Pb20 - model->HSM2_vzadd0 < Vbs_max ) { Vbs_max = Pb20 - model->HSM2_vzadd0 ; } if ( Pb2c - model->HSM2_vzadd0 < Vbs_max ) { Vbs_max = Pb2c - model->HSM2_vzadd0 ; } if ( Vbs_bnd > Vbs_max * 0.5 ) { Vbs_bnd = 0.5 * Vbs_max ; } if ( Vbse > Vbs_bnd ) { flg_vbsc = 1 ; T1 = Vbse - Vbs_bnd ; T2 = Vbs_max - Vbs_bnd ; Fn_SUPoly4( TY , T1 , T2 , Vbsc_dVbse ) ; Vbsc = Vbs_bnd + TY ; } else if ( Vbse < Vbs_min ) { flg_vbsc = -1 ; Vbsc = Vbs_min ; Vbsc_dVbse = 1.0 ; } else { flg_vbsc = 0 ; Vbsc = Vbse ; Vbsc_dVbse = 1.0 ; } Vdsc = Vdse ; Vgsc = Vgse ; if (here->HSM2_rs > 0.0 || here->HSM2_rd > 0.0) { if ( model->HSM2_corsrd == 1 ) flg_rsrd = 1 ; if ( model->HSM2_corsrd == 2 ) flg_rsrd = 2 ; } /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-1: Basic device characteristics. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* * Prepare for potential initial guesses using previous values *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ flg_pprv = 0 ; if ( here->HSM2_called >= 1 ) { Vbsc_dif = Vbsc - here->HSM2_vbsc_prv ; Vdsc_dif = Vdsc - here->HSM2_vdsc_prv ; Vgsc_dif = Vgsc - here->HSM2_vgsc_prv ; sum_vdif = fabs( Vbsc_dif ) + fabs( Vdsc_dif ) + fabs( Vgsc_dif ) ; if ( model->HSM2_copprv >= 1 && sum_vdif <= vtol_pprv && here->HSM2_mode * here->HSM2_mode_prv > 0 ) { flg_pprv = 1 ;} if ( here->HSM2_called >= 2 && flg_pprv == 1 ) { Vbsc_dif2 = here->HSM2_vbsc_prv - here->HSM2_vbsc_prv2 ; Vdsc_dif2 = here->HSM2_vdsc_prv - here->HSM2_vdsc_prv2 ; Vgsc_dif2 = here->HSM2_vgsc_prv - here->HSM2_vgsc_prv2 ; sum_vdif2 = fabs( Vbsc_dif2 ) + fabs( Vdsc_dif2 ) + fabs( Vgsc_dif2 ) ; if ( epsm10 < sum_vdif2 && sum_vdif2 <= vtol_pprv && here->HSM2_mode_prv * here->HSM2_mode_prv2 > 0 ) { flg_pprv = 2 ; } } } else { Vbsc_dif = 0.0 ; Vdsc_dif = 0.0 ; Vgsc_dif = 0.0 ; sum_vdif = 0.0 ; Vbsc_dif2 = 0.0 ; Vdsc_dif2 = 0.0 ; Vgsc_dif2 = 0.0 ; sum_vdif2 = 0.0 ; flg_iprv = 0 ; flg_pprv = 0 ; } dVbs = Vbsc_dif ; dVds = Vdsc_dif ; dVgs = Vgsc_dif ; if ( flg_pprv >= 1 ) { Ps0 = here->HSM2_ps0_prv ; Ps0_dVbs = here->HSM2_ps0_dvbs_prv ; Ps0_dVds = here->HSM2_ps0_dvds_prv ; Ps0_dVgs = here->HSM2_ps0_dvgs_prv ; Pds = here->HSM2_pds_prv ; Pds_dVbs = here->HSM2_pds_dvbs_prv ; Pds_dVds = here->HSM2_pds_dvds_prv ; Pds_dVgs = here->HSM2_pds_dvgs_prv ; } /*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++* * Bias loop: iteration to solve the system of equations of * the small circuit taking into account Rs and Rd. * - Vxs are internal (or effective) biases. * - Equations: * Vbs = Vbsc - Rs * Ids * Vds = Vdsc - ( Rs + Rd ) * Ids * Vgs = Vgsc - Rs * Ids *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ if ( flg_rsrd == 1 ) { if (here->HSM2_mode == HiSIM_NORMAL_MODE) { Rs = here->HSM2_rs ; Rd = here->HSM2_rd ; } else { Rs = here->HSM2_rd ; Rd = here->HSM2_rs ; } if ( here->HSM2_called >= 1 ) { if ( model->HSM2_coiprv >= 1 && 0.0 < sum_vdif && sum_vdif <= vtol_iprv ) { flg_iprv = 1 ;} } /*-----------------------------------------------------------* * Initial guesses using the previous values. *-----------------*/ if ( flg_iprv == 1 ) { here->HSM2_ids_dvbs_prv = Fn_Max( 0.0 , here->HSM2_ids_dvbs_prv ) ; here->HSM2_ids_dvds_prv = Fn_Max( 0.0 , here->HSM2_ids_dvds_prv ) ; here->HSM2_ids_dvgs_prv = Fn_Max( 0.0 , here->HSM2_ids_dvgs_prv ) ; dVbs = Vbsc_dif * ( 1.0 - 1.0 / ( 1.0 + Rs * here->HSM2_ids_dvbs_prv ) ) ; dVds = Vdsc_dif * ( 1.0 - 1.0 / ( 1.0 + ( Rs + Rd ) * here->HSM2_ids_dvds_prv ) ) ; dVgs = Vgsc_dif * ( 1.0 - 1.0 / ( 1.0 + Rs * here->HSM2_ids_dvgs_prv ) ) ; Ids = here->HSM2_ids_prv + here->HSM2_ids_dvbs_prv * dVbs + here->HSM2_ids_dvds_prv * dVds + here->HSM2_ids_dvgs_prv * dVgs ; T1 = ( Ids - here->HSM2_ids_prv ) ; T2 = fabs( T1 ) ; if ( Ids_maxvar * here->HSM2_ids_prv < T2 ) { Ids = here->HSM2_ids_prv * ( 1.0 + Fn_Sgn( T1 ) * Ids_maxvar ) ; } if ( Ids < 0 ) Ids = 0.0 ; } else { Ids = 0.0 ; if ( flg_pprv >= 1 ) { dVbs = Vbsc_dif ; dVds = Vdsc_dif ; dVgs = Vgsc_dif ; } } /* end of flg_iprv if-blocks */ Vbs = Vbsc - Ids * Rs ; Vds = Vdsc - Ids * ( Rs + Rd ) ; if ( Vds * Vdsc <= 0.0 ) { Vds = 0.0 ; } Vgs = Vgsc - Ids * Rs ; } else { lp_bs_max = 1 ; Ids = 0.0 ; Vbs = Vbsc ; Vds = Vdsc ; Vgs = Vgsc ; } /* end of flg_rsrd if-blocks */ /*-----------------------------------------------------------* * start of the loop. *-----------------*/ for ( lp_bs = 1 ; lp_bs <= lp_bs_max ; lp_bs ++ ) { Ids_last = Ids ; /* Initialization of counters is needed for restart. */ lp_s0 = 0 ; lp_sl = 0 ; /*-----------------------------------------------------------* * Vxsz: Modified bias introduced to realize symmetry at Vds=0. *-----------------*/ T1 = Vbsc_dVbse * Vds / 2 ; Fn_SymAdd( Vzadd , T1 , model->HSM2_vzadd0 , T2 ) ; T2 *= Vbsc_dVbse / 2 ; Vzadd_dVds = T2 ; if ( Vzadd < ps_conv ) { Vzadd = ps_conv ; Vzadd_dVds = 0.0 ; } Vbsz = Vbs + Vzadd ; Vbsz_dVbs = 1.0 ; Vbsz_dVds = Vzadd_dVds ; Vdsz = Vds + 2.0 * Vzadd ; Vdsz_dVds = 1.0 + 2.0 * Vzadd_dVds ; Vgsz = Vgs + Vzadd ; Vgsz_dVgs = 1.0 ; Vgsz_dVds = Vzadd_dVds ; /*---------------------------------------------------* * Factor of modification for symmetry. *-----------------*/ T1 = here->HSM2_qnsub_esi * Cox0_inv * Cox0_inv ; T2 = Vgs - Vfb ; T3 = 1 + 2.0 / T1 * ( T2 - beta_inv - Vbs ) ; Fn_SZ( T4 , T3 , 1e-3 , T5 ) ; TX = sqrt( T4 ) ; Pslsat = T2 + T1 * ( 1.0 - TX ) ; VdsatS = Pslsat - Pb2 ; Fn_SL( VdsatS , VdsatS , 0.1 , 5e-2 , T6 ) ; VdsatS_dVbs = ( TX ? (T6 * T5 / TX ) : 0.0 ) ; VdsatS_dVds = 0.0 ; VdsatS_dVgs = ( TX ? (T6 * ( 1.0 - T5 / TX )) : 0.0 ) ; T1 = Vds / VdsatS ; Fn_SUPoly4( TX , T1 , 1.0 , T0 ) ; FMDVDS = TX * TX ; T2 = 2 * TX * T0 ; T3 = T2 / ( VdsatS * VdsatS ) ; FMDVDS_dVbs = T3 * ( - Vds * VdsatS_dVbs ) ; FMDVDS_dVds = T3 * ( 1.0 * VdsatS - Vds * VdsatS_dVds ) ; FMDVDS_dVgs = T3 * ( - Vds * VdsatS_dVgs ) ; /*-----------------------------------------------------------* * Quantum effect *-----------------*/ if ( model->HSM2_flg_qme == 0 ) { flg_qme = 0 ; } else { flg_qme = 1 ; } T1 = here->HSM2_2qnsub_esi ; T2 = sqrt( T1 * Pb20 ) ; Vthq = Pb20 + Vfb + T2 * Cox0_inv ; Vthq_dVb = 0.0 ; Vthq_dVd = 0.0 ; if ( flg_qme == 0 ) { Tox = Tox0 ; Tox_dVb = 0.0 ; Tox_dVd = 0.0 ; Tox_dVg = 0.0 ; Cox = Cox0 ; Cox_dVb = 0.0 ; Cox_dVd = 0.0 ; Cox_dVg = 0.0 ; Cox_inv = Cox0_inv ; Cox_inv_dVb = 0.0 ; Cox_inv_dVd = 0.0 ; Cox_inv_dVg = 0.0 ; T0 = cnst0 * cnst0 * Cox_inv ; cnstCoxi = T0 * Cox_inv ; cnstCoxi_dVb = 0.0 ; cnstCoxi_dVd = 0.0 ; cnstCoxi_dVg = 0.0 ; } else { T5 = Vgs - Vbs - Vthq + model->HSM2_qme2 ; T5_dVb = -1.0 - Vthq_dVb ; T5_dVd = - Vthq_dVd ; T5_dVg = 1.0 ; Fn_SZ( T2 , T5 , qme_dlt, T3) ; T2 = T2 + small ; T2_dVb = T3 * T5_dVb ; T2_dVd = T3 * T5_dVd ; T2_dVg = T3 * T5_dVg ; T3 = 1.0 / T2 ; T7 = -1.0 / ( T2 * T2 ) ; T3_dVb = T7 * T2_dVb ; T3_dVd = T7 * T2_dVd ; T3_dVg = T7 * T2_dVg ; T4 = 2.0 * fabs(Vthq) ; T6 = Vfb - Vthq + model->HSM2_qme2 ; if(T6 > T4) { T4 = T6; } Fn_SU( T2 , T3 , 1.0 / T4 , qme_dlt, T6 ) ; T2_dVb = T6 * T3_dVb ; T2_dVd = T6 * T3_dVd ; T2_dVg = T6 * T3_dVg ; dTox = model->HSM2_qme1 * T2 + model->HSM2_qme3 ; T7 = model->HSM2_qme1 ; dTox_dVb = T7 * T2_dVb ; dTox_dVd = T7 * T2_dVd ; dTox_dVg = T7 * T2_dVg ; if ( dTox * 1.0e12 < Tox0 ) { dTox = 0.0 ; dTox_dVb = 0.0 ; dTox_dVd = 0.0 ; dTox_dVg = 0.0 ; flg_qme = 0 ; } Tox = Tox0 + dTox ; Tox_dVb = dTox_dVb ; Tox_dVd = dTox_dVd ; Tox_dVg = dTox_dVg ; Cox = c_eox / Tox ; T1 = - c_eox / ( Tox * Tox ) ; Cox_dVb = T1 * Tox_dVb ; Cox_dVd = T1 * Tox_dVd ; Cox_dVg = T1 * Tox_dVg ; Cox_inv = Tox / c_eox ; T1 = 1.0 / c_eox ; Cox_inv_dVb = T1 * Tox_dVb ; Cox_inv_dVd = T1 * Tox_dVd ; Cox_inv_dVg = T1 * Tox_dVg ; T0 = cnst0 * cnst0 * Cox_inv ; cnstCoxi = T0 * Cox_inv ; T1 = 2.0 * T0 ; cnstCoxi_dVb = T1 * Cox_inv_dVb ; cnstCoxi_dVd = T1 * Cox_inv_dVd ; cnstCoxi_dVg = T1 * Cox_inv_dVg ; } fac1 = cnst0 * Cox_inv ; fac1_dVds = cnst0 * Cox_inv_dVd ; fac1_dVgs = cnst0 * Cox_inv_dVg ; fac1_dVbs = cnst0 * Cox_inv_dVb ; fac1p2 = fac1 * fac1 ; /* Ps0_min: approx. solution of Poisson equation at Vgs_min */ /* ( easy to improve, if necessary ) */ Ps0_min = 2.0 * beta_inv * log(-Vgs_min/fac1) ; Ps0_min_dVds = -2.0 * beta_inv * fac1_dVds / fac1 ; Ps0_min_dVgs = -2.0 * beta_inv * fac1_dVgs / fac1 ; Ps0_min_dVbs = -2.0 * beta_inv * fac1_dVbs / fac1 ; /*---------------------------------------------------* * Vbsz2 : Vbs for dVth *-----------------*/ Vbsz2 = Vbsz ; Vbsz2_dVbs = Vbsz_dVbs ; Vbsz2_dVds = Vbsz_dVds ; Vbsz2_dVgs = 0.0 ; if ( corecip ) { /* ************************** */ /* Initial value for PS0Z_SCE */ /* ************************** */ T1 = dP_max + dP_max ; if ( flg_pprv >= 1 ) { /* -------------------------- * * Extrapolate previous value * * -------------------------- */ T1 = here->HSM2_PS0Z_SCE_dvbs_prv * dVbs + here->HSM2_PS0Z_SCE_dvds_prv * dVds + here->HSM2_PS0Z_SCE_dvgs_prv * dVgs ; if ( fabs(T1) <= dP_max ) { Ps0_ini = here->HSM2_PS0Z_SCE_prv + T1 ; /* take extrapolated value */ Ps0_ini_dVds = here->HSM2_PS0Z_SCE_dvds_prv ; Ps0_ini_dVgs = here->HSM2_PS0Z_SCE_dvgs_prv ; Ps0_ini_dVbs = here->HSM2_PS0Z_SCE_dvbs_prv ; } } /* end of (flg_pprv >=1) if-block */ if ( fabs(T1) > dP_max) { /* ------------------------------------- * * Analytical initial value for PS0Z_SCE * * ------------------------------------- */ T1 = here->HSM2_2qnsub_esi ; T2 = sqrt( T1 * ( Pb20 - Vbsz ) ) ; Vthq = Pb20 + Vfb + T2 * Cox0_inv ; Vth = Vthq ; TX = 4.0e0 * ( beta * ( Vgs - Vbs ) - 1.0e0 ) / ( fac1p2 * beta2 ) ; TX_dVds = - 2.0 * TX / fac1 * fac1_dVds ; TX_dVgs = - 2.0 * TX / fac1 * fac1_dVgs + 4.0 * beta / ( fac1p2 * beta2 ) ; TX_dVbs = - 2.0 * TX / fac1 * fac1_dVbs - 4.0 * beta / ( fac1p2 * beta2 ) ; TX += 1.0 ; if ( TX > epsm10 ) { T3 = sqrt( TX ) ; T3_dVd = 0.5 * TX_dVds / T3 ; T3_dVg = 0.5 * TX_dVgs / T3 ; T3_dVb = 0.5 * TX_dVbs / T3 ; } else { T3 = sqrt( epsm10 ) ; T3_dVd = T3_dVg = T3_dVb = 0.0 ; } Ps0_iniA = Vgs + fac1p2 * beta * 0.5 * ( 1.0e0 - T3 ) ; Ps0_iniA_dVds = fac1 * beta * ( 1.0 - T3 ) * fac1_dVds - fac1p2 * beta * 0.5 * T3_dVd ; Ps0_iniA_dVgs = 1.0 + fac1 * beta * ( 1.0 - T3 ) * fac1_dVgs - fac1p2 * beta * 0.5 * T3_dVg ; Ps0_iniA_dVbs = fac1 * beta * ( 1.0 - T3 ) * fac1_dVbs - fac1p2 * beta * 0.5 * T3_dVb ; Chi = beta * ( Ps0_iniA - Vbs ) ; if ( Chi < znbd3 ) { /*-----------------------------------* * zone-D1/D2 * - Ps0_ini is the analytical solution of Qs=Qb0 with * Qb0 being approximated to 3-degree polynomial. *-----------------*/ TY = beta * ( Vgs - Vbs ) ; TY_dVds = 0.0 ; TY_dVgs = beta ; TY_dVbs = - beta ; T1 = 1.0e0 / ( cn_nc3 * beta * fac1 ) ; T1_dVd = - T1 / fac1 * fac1_dVds ; T1_dVg = - T1 / fac1 * fac1_dVgs ; T1_dVb = - T1 / fac1 * fac1_dVbs ; T2 = 81.0 + 3.0 * T1 ; T2_dVd = 3.0 * T1_dVd ; T2_dVg = 3.0 * T1_dVg ; T2_dVb = 3.0 * T1_dVb ; T3 = -2916.0 - 81.0 * T1 + 27.0 * T1 * TY ; T3_dVd = ( - 81.0 + 27.0 * TY ) * T1_dVd + 27.0 * T1 * TY_dVds ; T3_dVg = ( - 81.0 + 27.0 * TY ) * T1_dVg + 27.0 * T1 * TY_dVgs ; T3_dVb = ( - 81.0 + 27.0 * TY ) * T1_dVb + 27.0 * T1 * TY_dVbs ; T4 = T3 ; T4_dVd = T3_dVd ; T4_dVg = T3_dVg ; T4_dVb = T3_dVb ; T6 = sqrt( 4 * T2 * T2 * T2 + T4 * T4 ) ; T6_dVd = ( 6.0 * T2 * T2 * T2_dVd + T4 * T4_dVd ) / T6 ; T6_dVg = ( 6.0 * T2 * T2 * T2_dVg + T4 * T4_dVg ) / T6 ; T6_dVb = ( 6.0 * T2 * T2 * T2_dVb + T4 * T4_dVb ) / T6 ; T5 = Fn_Pow( T3 + T6 , C_1o3 ) ; T5_dVd = ( T3_dVd + T6_dVd ) / ( 3.0 * T5 * T5 ) ; T5_dVg = ( T3_dVg + T6_dVg ) / ( 3.0 * T5 * T5 ) ; T5_dVb = ( T3_dVb + T6_dVb ) / ( 3.0 * T5 * T5 ) ; TX = 3.0 - ( C_2p_1o3 * T2 ) / ( 3.0 * T5 ) + 1 / ( 3.0 * C_2p_1o3 ) * T5 ; TX_dVds = - C_2p_1o3 / (3.0 * T5) * T2_dVd + ( C_2p_1o3 * T2 / (3.0 * T5 * T5) + 1.0 / (3.0 * C_2p_1o3) ) * T5_dVd ; TX_dVgs = - C_2p_1o3 / (3.0 * T5) * T2_dVg + ( C_2p_1o3 * T2 / (3.0 * T5 * T5) + 1.0 / (3.0 * C_2p_1o3) ) * T5_dVg ; TX_dVbs = - C_2p_1o3 / (3.0 * T5) * T2_dVb + ( C_2p_1o3 * T2 / (3.0 * T5 * T5) + 1.0 / (3.0 * C_2p_1o3) ) * T5_dVb ; Ps0_iniA = TX * beta_inv + Vbs ; Ps0_iniA_dVds = TX_dVds * beta_inv ; Ps0_iniA_dVgs = TX_dVgs * beta_inv ; Ps0_iniA_dVbs = TX_dVbs * beta_inv + 1.0 ; Ps0_ini = Ps0_iniA ; Ps0_ini_dVds = Ps0_iniA_dVds ; Ps0_ini_dVgs = Ps0_iniA_dVgs ; Ps0_ini_dVbs = Ps0_iniA_dVbs ; } else if ( Vgs <= Vth ) { /*-----------------------------------* * Weak inversion zone. *-----------------*/ Ps0_ini = Ps0_iniA ; Ps0_ini_dVds = Ps0_iniA_dVds ; Ps0_ini_dVgs = Ps0_iniA_dVgs ; Ps0_ini_dVbs = Ps0_iniA_dVbs ; } else { /*-----------------------------------* * Strong inversion zone. * - Ps0_iniB : upper bound. *-----------------*/ T1 = 1.0 / cnst1 / cnstCoxi ; T1_dVd = - T1 / cnstCoxi * cnstCoxi_dVd ; T1_dVg = - T1 / cnstCoxi * cnstCoxi_dVg ; T1_dVb = - T1 / cnstCoxi * cnstCoxi_dVb ; T0 = Vgs - Vfb ; T2 = T1 * T0 * T0 ; T2_dVd = T1_dVd * T0 * T0 ; T2_dVg = T1_dVg * T0 * T0 + 2.0 * T1 * T0 ; T2_dVb = T1_dVb * T0 * T0 ; T3 = beta + 2.0 / T0 ; T3_dVg = -2.0 / (T0 * T0) ; Ps0_iniB = log( T2 + small ) / T3 ; Ps0_iniB_dVds = T2_dVd / (T2 * T3) ; Ps0_iniB_dVgs = T2_dVg / (T2 * T3) - T3_dVg * Ps0_iniB / T3 ; Ps0_iniB_dVbs = T2_dVb / (T2 * T3) ; Fn_SU2( Ps0_ini , Ps0_iniA, Ps0_iniB, c_ps0ini_2, T1,T2) ; Ps0_ini_dVds = Ps0_iniA_dVds * T1 + Ps0_iniB_dVds * T2 ; Ps0_ini_dVgs = Ps0_iniA_dVgs * T1 + Ps0_iniB_dVgs * T2 ; Ps0_ini_dVbs = Ps0_iniA_dVbs * T1 + Ps0_iniB_dVbs * T2 ; } } /* end of initial value calulation */ /**************************/ /* initial value for SCE LOOP */ PS0_SCE = Ps0_ini ; PS0_SCE_dVds = Ps0_ini_dVds ; PS0_SCE_dVgs = Ps0_ini_dVgs ; PS0_SCE_dVbs = Ps0_ini_dVbs ; PS0Z_SCE = Ps0_ini ; PS0Z_SCE_dVds = Ps0_ini_dVds ; PS0Z_SCE_dVgs = Ps0_ini_dVgs ; PS0Z_SCE_dVbs = Ps0_ini_dVbs ; } /* end of corecip=1 case (initial value calculation) */ MAX_LOOP_SCE = 5 ; NNN = 0 ; /* ************************************************************************* */ START_OF_SCE_LOOP : /* outer loop of multi level Newton framework */ /* ************************************************************************* */ /* for multi level Newton method we need the derivatives */ /* with respect to PS0Z_SCE */ /* naming convention: ..._dPS0Z means d.../dPS0Z_SCE */ if ( flg_qme == 1 ) { /*---------------------------------------------------* * Vthp : Vth with pocket. *-----------------*/ if( corecip ){ T1 = here->HSM2_2qnsub_esi ; Qb0 = sqrt ( T1 ) ; Qb0_dVb = 0.0 ; Qb0_dVd = 0.0 ; Qb0_dVg = 0.0 ; Vthp = PS0Z_SCE + Vfb + Qb0 * Cox_inv + here->HSM2_ptovr ; Vthp_dVb = PS0Z_SCE_dVbs + Qb0_dVb * Cox_inv + Qb0 * Cox_inv_dVb ; Vthp_dVd = PS0Z_SCE_dVds + Qb0_dVd * Cox_inv + Qb0 * Cox_inv_dVd ; Vthp_dVg = PS0Z_SCE_dVgs + Qb0_dVg * Cox_inv + Qb0 * Cox_inv_dVg ; Vthp_dPS0Z = 1.0 ; }else{ /* original */ T1 = here->HSM2_2qnsub_esi ; Qb0 = sqrt (T1 * (Pb20 - Vbsz2)) ; T2 = 0.5 * T1 / Qb0 ; Qb0_dVb = T2 * (- Vbsz2_dVbs) ; Qb0_dVd = T2 * (- Vbsz2_dVds) ; Qb0_dVg = T2 * (- Vbsz2_dVgs) ; Vthp = Pb20 + Vfb + Qb0 * Cox_inv + here->HSM2_ptovr; Vthp_dVb = Qb0_dVb * Cox_inv + Qb0 * Cox_inv_dVb ; Vthp_dVd = Qb0_dVd * Cox_inv + Qb0 * Cox_inv_dVd ; Vthp_dVg = Qb0_dVg * Cox_inv + Qb0 * Cox_inv_dVg ; } Pb20b = Pb20 ; Pb20b_dVb = 0.0 ; Pb20b_dVd = 0.0 ; Pb20b_dVg = 0.0 ; T0 = 0.95 ; T1 = T0 * Pb20b - Vbsz2 - 1.0e-3 ; T1_dVb = T0 * Pb20b_dVb - Vbsz2_dVbs ; T1_dVd = T0 * Pb20b_dVd - Vbsz2_dVds ; T1_dVg = T0 * Pb20b_dVg - Vbsz2_dVgs ; T2 = sqrt (T1 * T1 + 4.0 * T0 * Pb20b * 1.0e-3) ; T3 = T0 * Pb20b - 0.5 * (T1 + T2) ; T4 = 2.0 * T0 * 1.0e-3 ; T5 = T1 / T2 ; T6 = T4 / T2 ; T3_dVb = T0 * Pb20b_dVb - 0.5 * (T1_dVb + (T1_dVb * T5 + T6 * Pb20b_dVb ) ) ; T3_dVd = T0 * Pb20b_dVd - 0.5 * (T1_dVd + (T1_dVd * T5 + T6 * Pb20b_dVd ) ) ; T3_dVg = T0 * Pb20b_dVg - 0.5 * (T1_dVg + (T1_dVg * T5 + T6 * Pb20b_dVg ) ) ; Pbsum = Pb20b - T3 ; Pbsum_dVb = Pb20b_dVb - T3_dVb ; Pbsum_dVd = Pb20b_dVd - T3_dVd ; Pbsum_dVg = Pb20b_dVg - T3_dVg ; sqrt_Pbsum = sqrt( Pbsum ) ; /*-------------------------------------------* * dVthLP : Short-channel effect induced by pocket. * - Vth0 : Vth without pocket. *-----------------*/ if ( model->HSM2_lp != 0.0 ) { if( corecip ){ T1 = here->HSM2_2qnsub_esi ; T2 = model->HSM2_bs2 - Vbsz2 ; T3 = T2 + small ; T4 = sqrt (T3 * T3 + 4.0 * vth_dlt) ; T5 = 0.5 * (T3 + T4) ; T6 = 0.5 * (1.0 + T3 / T4) ; T5_dVb = - Vbsz2_dVbs * T6 ; T5_dVd = - Vbsz2_dVds * T6 ; T5_dVg = - Vbsz2_dVgs * T6 ; T7 = 1.0 / T5 ; bs12 = model->HSM2_bs1 * T7 ; T8 = - bs12 * T7 ; bs12_dVb = T8 * T5_dVb ; bs12_dVd = T8 * T5_dVd ; bs12_dVg = T8 * T5_dVg ; T1 = 0.93 * ( PS0Z_SCE + Ps0_min - Vbsz2 ); T1_dVb = 0.93 * ( PS0Z_SCE_dVbs + Ps0_min_dVbs - Vbsz2_dVbs ); T1_dVd = 0.93 * ( PS0Z_SCE_dVds + Ps0_min_dVds - Vbsz2_dVds ); T1_dVg = 0.93 * ( PS0Z_SCE_dVgs + Ps0_min_dVgs - Vbsz2_dVgs ); T1_dPS0Z = 0.93 ; T2 = bs12 ; T2_dVb = bs12_dVb ; T2_dVd = bs12_dVd ; T2_dVg = bs12_dVg ; Fn_SU2( T10 , T2 , T1 , vth_dlt, T0, T3 ) ; T10_dVb = T2_dVb * T0 + T1_dVb * T3 ; T10_dVd = T2_dVd * T0 + T1_dVd * T3 ; T10_dVg = T2_dVg * T0 + T1_dVg * T3 ; T10_dPS0Z = T1_dPS0Z * T3 ; T4 = here->HSM2_2qnsub_esi * ( PS0Z_SCE + Ps0_min - Vbsz2 - T10 ) ; T4_dVb = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVbs + Ps0_min_dVbs - Vbsz2_dVbs - T10_dVb ) ; T4_dVd = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVds + Ps0_min_dVds - Vbsz2_dVds - T10_dVd ) ; T4_dVg = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVgs + Ps0_min_dVgs - Vbsz2_dVgs - T10_dVg ) ; T4_dPS0Z = here->HSM2_2qnsub_esi * ( 1.0 - T10_dPS0Z ) ; if (T4 > arg2){ Qbmm = sqrt ( T4 ) ; Qbmm_dVb = 0.5 / Qbmm * T4_dVb ; Qbmm_dVd = 0.5 / Qbmm * T4_dVd ; Qbmm_dVg = 0.5 / Qbmm * T4_dVg ; Qbmm_dPS0Z = 0.5 / Qbmm * T4_dPS0Z ; } else { Qbmm = sqrt(arg2) + 0.5 / sqrt(arg2) * ( T4 - arg2) ; Qbmm_dVb = 0.5 / sqrt(arg2) * T4_dVb ; Qbmm_dVd = 0.5 / sqrt(arg2) * T4_dVd ; Qbmm_dVg = 0.5 / sqrt(arg2) * T4_dVg ; Qbmm_dPS0Z = 0.5 / sqrt(arg2) * T4_dPS0Z ; } dqb = ( Qb0 - Qbmm ) * Cox_inv ; dqb_dVb = ( Qb0_dVb - Qbmm_dVb ) * Cox_inv + ( Qb0 - Qbmm ) * Cox_inv_dVb ; dqb_dVd = ( Qb0_dVd - Qbmm_dVd ) * Cox_inv + ( Qb0 - Qbmm ) * Cox_inv_dVd ; dqb_dVg = ( Qb0_dVg - Qbmm_dVg ) * Cox_inv + ( Qb0 - Qbmm ) * Cox_inv_dVg ; dqb_dPS0Z = - Qbmm_dPS0Z * Cox_inv ; if( codqb == 0 ){ dqb = 0.0 ; dqb_dVb = 0.0 ; dqb_dVd = 0.0 ; dqb_dVg = 0.0 ; dqb_dPS0Z = 0.0 ; } T1 = 2.0 * C_QE * here->HSM2_nsubc * C_ESI ; T2 = sqrt( T1 ) ; T2_dVb = 0.0 ; T2_dVd = 0.0 ; T2_dVg = 0.0 ; Vth0 = PS0Z_SCE + Vfb + T2 * Cox_inv ; Vth0_dVb = PS0Z_SCE_dVbs + T2_dVb * Cox_inv + T2 * Cox_inv_dVb ; Vth0_dVd = PS0Z_SCE_dVds + T2_dVd * Cox_inv + T2 * Cox_inv_dVd ; Vth0_dVg = PS0Z_SCE_dVgs + T2_dVg * Cox_inv + T2 * Cox_inv_dVg ; Vth0_dPS0Z = 1.0 ; T1 = C_ESI * Cox_inv ; T1_dVb = C_ESI * Cox_inv_dVb ; T1_dVd = C_ESI * Cox_inv_dVd ; T1_dVg = C_ESI * Cox_inv_dVg ; T2 = here->HSM2_wdplp ; T4 = 1.0e0 / ( model->HSM2_lp * model->HSM2_lp ) ; T3 = 2.0 * ( model->HSM2_vbi - Pb20 ) * T2 * T4 ; T5 = T1 * T3 ; T5_dVb = T1_dVb * T3 ; T5_dVd = T1_dVd * T3 ; T5_dVg = T1_dVg * T3 ; T6 = PS0Z_SCE - Vbsz ; T6_dVb = PS0Z_SCE_dVbs - Vbsz_dVbs ; T6_dVd = PS0Z_SCE_dVds - Vbsz_dVds ; T6_dVg = PS0Z_SCE_dVgs ; T6_dPS0Z = 1.0 ; Fn_SZ( T6, T6, C_sce_dlt, T0 ); T6_dVb *= T0 ; T6_dVd *= T0 ; T6_dVg *= T0 ; T6_dPS0Z *= T0 ; dVth0 = T5 * sqrt( T6 ) ; dVth0_dVb = T5 * 0.5 / sqrt( T6 ) * T6_dVb + T5_dVb * sqrt( T6 ); dVth0_dVd = T5 * 0.5 / sqrt( T6 ) * T6_dVd + T5_dVd * sqrt( T6 ) ; dVth0_dVg = T5 * 0.5 / sqrt( T6 ) * T6_dVg + T5_dVg * sqrt( T6 ) ; dVth0_dPS0Z = T5 * 0.5 / sqrt( T6 ) * T6_dPS0Z ; T1 = Vthp - Vth0 ; T1_dVb = Vthp_dVb - Vth0_dVb ; T1_dVd = Vthp_dVd - Vth0_dVd ; T1_dVg = Vthp_dVg - Vth0_dVg ; T1_dPS0Z = Vthp_dPS0Z - Vth0_dPS0Z ; T9 = PS0Z_SCE - Vbsz2 ; T9_dVb = PS0Z_SCE_dVbs - Vbsz2_dVbs ; T9_dVd = PS0Z_SCE_dVds - Vbsz2_dVds ; T9_dVg = PS0Z_SCE_dVgs - Vbsz2_dVgs ; T9_dPS0Z = 1.0 ; T3 = pParam->HSM2_scp1 + pParam->HSM2_scp3 * T9 / model->HSM2_lp + pParam->HSM2_scp2 * Vdsz ; T3_dVb = pParam->HSM2_scp3 * T9_dVb / model->HSM2_lp ; T3_dVd = pParam->HSM2_scp3 * T9_dVd / model->HSM2_lp + pParam->HSM2_scp2 * Vdsz_dVds ; T3_dVg = pParam->HSM2_scp3 * T9_dVg / model->HSM2_lp ; T3_dPS0Z = pParam->HSM2_scp3 * T9_dPS0Z / model->HSM2_lp ; Vdx = model->HSM2_scp21 + Vdsz ; Vdx2 = Vdx * Vdx + small ; T4 = Vdx * Vdx + small ; T4_dVb = 0.0 ; T4_dVd = 2.0 * Vdx * Vdsz_dVds ; T4_dVg = 0.0 ; T5 = 1.0 / T4 ; T5_dVb = - T4_dVb / T4 / T4 ; T5_dVd = - T4_dVd / T4 / T4 ; T5_dVg = - T4_dVg / T4 / T4 ; dVthLP = T1 * dVth0 * T3 + dqb - here->HSM2_msc * T5 ; dVthLP_dVb = T1_dVb * dVth0 * T3 + T1 * dVth0_dVb * T3 + T1 * dVth0 * T3_dVb + dqb_dVb - here->HSM2_msc * T5_dVb ; dVthLP_dVd = T1_dVd * dVth0 * T3 + T1 * dVth0_dVd * T3 + T1 * dVth0 * T3_dVd + dqb_dVd - here->HSM2_msc * T5_dVd ; dVthLP_dVg = T1_dVg * dVth0 * T3 + T1 * dVth0_dVg * T3 + T1 * dVth0 * T3_dVg + dqb_dVg - here->HSM2_msc * T5_dVg ; dVthLP_dPS0Z = T1_dPS0Z * dVth0 * T3 + T1 * dVth0_dPS0Z * T3 + T1 * dVth0 * T3_dPS0Z + dqb_dPS0Z ; }else{ /* original */ T1 = here->HSM2_2qnsub_esi ; T2 = model->HSM2_bs2 - Vbsz2 ; T3 = T2 + small ; T4 = sqrt (T3 * T3 + 4.0 * vth_dlt) ; T5 = 0.5 * (T3 + T4) ; T6 = 0.5 * (1.0 + T3 / T4) ; T5_dVb = - Vbsz2_dVbs * T6 ; T5_dVd = - Vbsz2_dVds * T6 ; T5_dVg = - Vbsz2_dVgs * T6 ; T7 = 1.0 / T5 ; bs12 = model->HSM2_bs1 * T7 ; T8 = - bs12 * T7 ; bs12_dVb = T8 * T5_dVb ; bs12_dVd = T8 * T5_dVd ; bs12_dVg = T8 * T5_dVg ; Fn_SU( T10 , Vbsz2 + bs12, 0.93 * Pb20, vth_dlt, T0) ; Qbmm = sqrt (T1 * (Pb20 - T10 )) ; T9 = T0 / Qbmm ; Qbmm_dVb = 0.5 * T1 * - (Vbsz2_dVbs + bs12_dVb) * T9 ; Qbmm_dVd = 0.5 * T1 * - (Vbsz2_dVds + bs12_dVd) * T9 ; Qbmm_dVg = 0.5 * T1 * - (Vbsz2_dVgs + bs12_dVg) * T9 ; dqb = (Qb0 - Qbmm) * Cox_inv ; dqb_dVb = Vthp_dVb - Qbmm_dVb * Cox_inv - Qbmm * Cox_inv_dVb ; dqb_dVd = Vthp_dVd - Qbmm_dVd * Cox_inv - Qbmm * Cox_inv_dVd ; dqb_dVg = Vthp_dVg - Qbmm_dVg * Cox_inv - Qbmm * Cox_inv_dVg ; T1 = 2.0 * C_QE * here->HSM2_nsubc * C_ESI ; T2 = sqrt( T1 * ( Pb2c - Vbsz2 ) ) ; Vth0 = Pb2c + Vfb + T2 * Cox_inv ; T3 = 0.5 * T1 / T2 * Cox_inv ; Vth0_dVb = T3 * ( - Vbsz2_dVbs ) + T2 * Cox_inv_dVb ; Vth0_dVd = T3 * ( - Vbsz2_dVds ) + T2 * Cox_inv_dVd ; Vth0_dVg = T3 * ( - Vbsz2_dVgs ) + T2 * Cox_inv_dVg ; T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdplp ; T4 = 1.0e0 / ( model->HSM2_lp * model->HSM2_lp ) ; T5 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = 0.5 * T5 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; T1 = Vthp - Vth0 ; T2 = pParam->HSM2_scp1 + pParam->HSM2_scp3 * Pbsum / model->HSM2_lp ; T3 = T2 + pParam->HSM2_scp2 * Vdsz ; Vdx = model->HSM2_scp21 + Vdsz ; Vdx2 = Vdx * Vdx + small ; dVthLP = T1 * dVth0 * T3 + dqb - here->HSM2_msc / Vdx2 ; T4 = T1 * dVth0 * pParam->HSM2_scp3 / model->HSM2_lp ; dVthLP_dVb = (Vthp_dVb - Vth0_dVb) * dVth0 * T3 + T1 * dVth0_dVb * T3 + T4 * Pbsum_dVb + dqb_dVb ; dVthLP_dVd = (Vthp_dVd - Vth0_dVd) * dVth0 * T3 + T1 * dVth0_dVd * T3 + T4 * Pbsum_dVd + T1 * dVth0 * pParam->HSM2_scp2 * Vdsz_dVds + dqb_dVd + 2.0e0 * here->HSM2_msc * Vdx * Vdsz_dVds / ( Vdx2 * Vdx2 ) ; dVthLP_dVg = (Vthp_dVg - Vth0_dVg) * dVth0 * T3 + T1 * dVth0_dVg * T3 + T4 * Pbsum_dVg + dqb_dVg ; } } else { dVthLP = 0.0e0 ; dVthLP_dVb = 0.0e0 ; dVthLP_dVd = 0.0e0 ; dVthLP_dVg = 0.0e0 ; } /*---------------------------------------------------* * dVthSC : Short-channel effect induced by Vds. *-----------------*/ if( corecip ){ T3 = here->HSM2_lgate - model->HSM2_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T5 = pParam->HSM2_sc3 / here->HSM2_lgate ; T6 = pParam->HSM2_sc1 + T5 * ( PS0Z_SCE - Vbsz ) ; T6_dVb = T5 * ( PS0Z_SCE_dVbs - Vbsz_dVbs ); T6_dVd = T5 * ( PS0Z_SCE_dVds - Vbsz_dVds ); T6_dVg = T5 * PS0Z_SCE_dVgs ; T6_dPS0Z = T5 ; /* QME:1 CORECIP:1 */ if( pParam->HSM2_sc4 != 0 ){ T8 = pParam->HSM2_sc4 * Vdsz * ( PS0Z_SCE - Vbsz ) ; T8_dVd = pParam->HSM2_sc4 * ( Vdsz_dVds * ( PS0Z_SCE - Vbsz ) + Vdsz * ( PS0Z_SCE_dVds - Vbsz_dVds ) ) ; T8_dVb = pParam->HSM2_sc4 * Vdsz * ( PS0Z_SCE_dVbs - Vbsz_dVbs ) ; T8_dVg = pParam->HSM2_sc4 * Vdsz * PS0Z_SCE_dVgs ; T8_dPS0Z = pParam->HSM2_sc4 * Vdsz ; T1 = T6 + pParam->HSM2_sc2 * Vdsz + T8 ; T1_dVd = T6_dVd + pParam->HSM2_sc2 * Vdsz_dVds + T8_dVd ; T1_dVb = T6_dVb + T8_dVb ; T1_dVg = T6_dVg + T8_dVg ; T1_dPS0Z = T6_dPS0Z + T8_dPS0Z ; }else{ T1 = T6 + pParam->HSM2_sc2 * Vdsz ; T1_dVb = T6_dVb ; T1_dVd = T6_dVd + pParam->HSM2_sc2 * Vdsz_dVds ; T1_dVg = T6_dVg ; T1_dPS0Z = T6_dPS0Z ; } T0 = C_ESI * here->HSM2_wdpl * 2.0e0 * ( model->HSM2_vbi - Pb20 ) * T4 ; T2 = T0 * Cox_inv ; T2_dVb = T0 * Cox_inv_dVb ; T2_dVd = T0 * Cox_inv_dVd ; T2_dVg = T0 * Cox_inv_dVg ; A = T2 * T1 ; A_dVbs = T2 * T1_dVb + T1 * T2_dVb ; A_dVds = T2 * T1_dVd + T1 * T2_dVd ; A_dVgs = T2 * T1_dVg + T1 * T2_dVg ; A_dPS0Z = T2 * T1_dPS0Z ; T9 = PS0Z_SCE - Vbsz + Ps0_min ; T9_dVb = PS0Z_SCE_dVbs - Vbsz_dVbs + Ps0_min_dVbs ; T9_dVd = PS0Z_SCE_dVds - Vbsz_dVds + Ps0_min_dVds ; T9_dVg = PS0Z_SCE_dVgs + Ps0_min_dVgs ; T9_dPS0Z = 1.0 ; if ( T9 > arg0 ) { T8 = sqrt( T9 ) ; T8_dVb = 0.5 * T9_dVb / T8 ; T8_dVd = 0.5 * T9_dVd / T8 ; T8_dVg = 0.5 * T9_dVg / T8 ; T8_dPS0Z = 0.5 * T9_dPS0Z / T8 ; } else { T8 = sqrt(arg0) + 0.5 / sqrt(arg0) * ( T9 - arg0) ; T8_dVb = 0.5 / sqrt(arg0) * T9_dVb ; T8_dVd = 0.5 / sqrt(arg0) * T9_dVd ; T8_dVg = 0.5 / sqrt(arg0) * T9_dVg ; T8_dPS0Z = 0.5 / sqrt(arg0) * T9_dPS0Z ; } dVthSC = A * T8 ; dVthSC_dVb = A * T8_dVb + A_dVbs * T8; dVthSC_dVd = A * T8_dVd + A_dVds * T8; dVthSC_dVg = A * T8_dVg + A_dVgs * T8; dVthSC_dPS0Z = A * T8_dPS0Z + A_dPS0Z * T8; }else{ /* original */ T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdpl ; T3 = here->HSM2_lgate - model->HSM2_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T5 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = T5 / 2.0 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; T1 = pParam->HSM2_sc3 / here->HSM2_lgate ; T4 = pParam->HSM2_sc1 + T1 * Pbsum ; T4_dVb = T1 * Pbsum_dVb ; T4_dVd = T1 * Pbsum_dVd ; T4_dVg = T1 * Pbsum_dVg ; /* QME:1 CORECIP:0 */ if( pParam->HSM2_sc4 != 0 ){ T8 = pParam->HSM2_sc4 * Vdsz * Pbsum ; T8_dVd = pParam->HSM2_sc4 * ( Vdsz_dVds * Pbsum + Vdsz * Pbsum_dVd ) ; T8_dVb = pParam->HSM2_sc4 * Vdsz * Pbsum_dVb ; T8_dVg = pParam->HSM2_sc4 * Vdsz * Pbsum_dVg ; T5 = T4 + pParam->HSM2_sc2 * Vdsz + T8 ; T5_dVd = T4_dVd + pParam->HSM2_sc2 * Vdsz_dVds + T8_dVd ; T5_dVb = T4_dVb + T8_dVb ; T5_dVg = T4_dVg + T8_dVg ; }else{ T5 = T4 + pParam->HSM2_sc2 * Vdsz ; T5_dVb = T4_dVb ; T5_dVd = T4_dVd + pParam->HSM2_sc2 * Vdsz_dVds ; T5_dVg = T4_dVg ; } dVthSC = dVth0 * T5 ; dVthSC_dVb = dVth0_dVb * T5 + dVth0 * T5_dVb ; dVthSC_dVd = dVth0_dVd * T5 + dVth0 * T5_dVd ; dVthSC_dVg = dVth0_dVg * T5 + dVth0 * T5_dVg ; } /*---------------------------------------------------* * dVthW : narrow-channel effect. *-----------------*/ T1 = 1.0 / Cox ; T2 = T1 * T1 ; T3 = 1.0 / ( Cox + pParam->HSM2_wfc / Weff ) ; T4 = T3 * T3 ; T5 = T1 - T3 ; T6 = Qb0 * ( T2 - T4 ) ; if( corecip ){ dVthW = Qb0 * T5 + pParam->HSM2_wvth0 / here->HSM2_wg ; dVthW_dVb = Qb0_dVb * T5 - Cox_dVb * T6 ; dVthW_dVd = Qb0_dVd * T5 - Cox_dVd * T6 ; dVthW_dVg = Qb0_dVg * T5 - Cox_dVg * T6 ; }else{ /* original */ dVthW = Qb0 * T5 + pParam->HSM2_wvth0 / here->HSM2_wg ; dVthW_dVb = Qb0_dVb * T5 - Cox_dVb * T6 ; dVthW_dVd = Qb0_dVd * T5 - Cox_dVd * T6 ; dVthW_dVg = - Cox_dVg * T6 ; } /* end of case flg_qme = 1 */ } else { /* now case flg_qme = 0 */ /*---------------------------------------------------* * Vthp : Vth with pocket. *-----------------*/ if( corecip ){ T1 = here->HSM2_2qnsub_esi ; Qb0 = sqrt ( T1 ) ; Qb0_dVb = 0.0 ; Qb0_dVd = 0.0 ; Qb0_dVg = 0.0 ; Vthp = PS0Z_SCE + Vfb + Qb0 * Cox_inv + here->HSM2_ptovr; Vthp_dVb = PS0Z_SCE_dVbs + Qb0_dVb * Cox_inv ; Vthp_dVd = PS0Z_SCE_dVds + Qb0_dVd * Cox_inv ; Vthp_dVg = PS0Z_SCE_dVgs + Qb0_dVg * Cox_inv ; Vthp_dPS0Z = 1.0 ; }else{ /* original */ T1 = here->HSM2_2qnsub_esi ; Qb0 = sqrt (T1 * (Pb20 - Vbsz2)) ; T2 = 0.5 * T1 / Qb0 ; Qb0_dVb = T2 * (- Vbsz2_dVbs) ; Qb0_dVd = T2 * (- Vbsz2_dVds) ; Qb0_dVg = T2 * (- Vbsz2_dVgs) ; Vthp = Pb20 + Vfb + Qb0 * Cox_inv + here->HSM2_ptovr; Vthp_dVb = Qb0_dVb * Cox_inv ; Vthp_dVd = Qb0_dVd * Cox_inv ; Vthp_dVg = Qb0_dVg * Cox_inv ; } Pb20b = Pb20 ; Pb20b_dVb = 0.0 ; Pb20b_dVd = 0.0 ; Pb20b_dVg = 0.0 ; T0 = 0.95 ; T1 = T0 * Pb20b - Vbsz2 - 1.0e-3 ; T1_dVb = T0 * Pb20b_dVb - Vbsz2_dVbs ; T1_dVd = T0 * Pb20b_dVd - Vbsz2_dVds ; T1_dVg = T0 * Pb20b_dVg - Vbsz2_dVgs ; T2 = sqrt (T1 * T1 + 4.0 * T0 * Pb20b * 1.0e-3) ; T3 = T0 * Pb20b - 0.5 * (T1 + T2) ; T4 = 2.0 * T0 * 1.0e-3 ; T5 = T1 / T2 ; T6 = T4 / T2 ; T3_dVb = T0 * Pb20b_dVb - 0.5 * (T1_dVb + (T1_dVb * T5 + T6 * Pb20b_dVb ) ) ; T3_dVd = T0 * Pb20b_dVd - 0.5 * (T1_dVd + (T1_dVd * T5 + T6 * Pb20b_dVd ) ) ; T3_dVg = T0 * Pb20b_dVg - 0.5 * (T1_dVg + (T1_dVg * T5 + T6 * Pb20b_dVg ) ) ; Pbsum = Pb20b - T3 ; Pbsum_dVb = Pb20b_dVb - T3_dVb ; Pbsum_dVd = Pb20b_dVd - T3_dVd ; Pbsum_dVg = Pb20b_dVg - T3_dVg ; sqrt_Pbsum = sqrt( Pbsum ) ; /*-------------------------------------------* * dVthLP : Short-channel effect induced by pocket. * - Vth0 : Vth without pocket. *-----------------*/ if ( model->HSM2_lp != 0.0 ) { if( corecip ){ T1 = here->HSM2_2qnsub_esi ; T2 = model->HSM2_bs2 - Vbsz2 ; T3 = T2 + small ; T4 = sqrt (T3 * T3 + 4.0 * vth_dlt) ; T5 = 0.5 * (T3 + T4) ; T6 = 0.5 * (1.0 + T3 / T4) ; T5_dVb = - Vbsz2_dVbs * T6 ; T5_dVd = - Vbsz2_dVds * T6 ; T5_dVg = - Vbsz2_dVgs * T6 ; T7 = 1.0 / T5 ; bs12 = model->HSM2_bs1 * T7 ; T8 = - bs12 * T7 ; bs12_dVb = T8 * T5_dVb ; bs12_dVd = T8 * T5_dVd ; bs12_dVg = T8 * T5_dVg ; T1 = 0.93 * ( PS0Z_SCE + Ps0_min - Vbsz2 ); T1_dVb = 0.93 * ( PS0Z_SCE_dVbs + Ps0_min_dVbs - Vbsz2_dVbs ); T1_dVd = 0.93 * ( PS0Z_SCE_dVds + Ps0_min_dVds - Vbsz2_dVds ); T1_dVg = 0.93 * ( PS0Z_SCE_dVgs + Ps0_min_dVgs - Vbsz2_dVgs ); T1_dPS0Z = 0.93 ; T2 = bs12 ; T2_dVb = bs12_dVb ; T2_dVd = bs12_dVd ; T2_dVg = bs12_dVg ; Fn_SU2( T10 , T2 , T1 , vth_dlt, T0, T3 ) ; T10_dVb = T2_dVb * T0 + T1_dVb * T3 ; T10_dVd = T2_dVd * T0 + T1_dVd * T3 ; T10_dVg = T2_dVg * T0 + T1_dVg * T3 ; T10_dPS0Z = T1_dPS0Z * T3 ; T4 = here->HSM2_2qnsub_esi * ( PS0Z_SCE + Ps0_min - Vbsz2 - T10 ) ; T4_dVb = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVbs + Ps0_min_dVbs - Vbsz2_dVbs - T10_dVb ) ; T4_dVd = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVds + Ps0_min_dVds - Vbsz2_dVds - T10_dVd ) ; T4_dVg = here->HSM2_2qnsub_esi * ( PS0Z_SCE_dVgs + Ps0_min_dVgs - Vbsz2_dVgs - T10_dVg ) ; T4_dPS0Z = here->HSM2_2qnsub_esi * ( 1.0 - T10_dPS0Z ) ; if (T4 > arg2){ Qbmm = sqrt ( T4 ) ; Qbmm_dVb = 0.5 / Qbmm * T4_dVb ; Qbmm_dVd = 0.5 / Qbmm * T4_dVd ; Qbmm_dVg = 0.5 / Qbmm * T4_dVg ; Qbmm_dPS0Z = 0.5 / Qbmm * T4_dPS0Z ; } else { Qbmm = sqrt(arg2) + 0.5 / sqrt(arg2) * ( T4 - arg2) ; Qbmm_dVb = 0.5 / sqrt(arg2) * T4_dVb ; Qbmm_dVd = 0.5 / sqrt(arg2) * T4_dVd ; Qbmm_dVg = 0.5 / sqrt(arg2) * T4_dVg ; Qbmm_dPS0Z = 0.5 / sqrt(arg2) * T4_dPS0Z ; } dqb = ( Qb0 - Qbmm ) * Cox_inv ; dqb_dVb = ( Qb0_dVb - Qbmm_dVb ) * Cox_inv ; dqb_dVd = ( Qb0_dVd - Qbmm_dVd ) * Cox_inv ; dqb_dVg = ( Qb0_dVg - Qbmm_dVg ) * Cox_inv ; dqb_dPS0Z = ( - Qbmm_dPS0Z ) * Cox_inv ; /* W/O QME PART */ if( codqb == 0 ){ dqb = 0 ; dqb_dVb = 0 ; dqb_dVd = 0 ; dqb_dVg = 0 ; dqb_dPS0Z = 0.0 ; } T1 = 2.0 * C_QE * here->HSM2_nsubc * C_ESI ; T2 = sqrt( T1 ) ; T2_dVb = 0.0 ; T2_dVd = 0.0 ; T2_dVg = 0.0 ; Vth0 = PS0Z_SCE + Vfb + T2 * Cox_inv ; Vth0_dVb = PS0Z_SCE_dVbs + T2_dVb * Cox_inv ; Vth0_dVd = PS0Z_SCE_dVds + T2_dVd * Cox_inv ; Vth0_dVg = PS0Z_SCE_dVgs + T2_dVg * Cox_inv ; Vth0_dPS0Z = 1.0 ; T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdplp ; T4 = 1.0e0 / ( model->HSM2_lp * model->HSM2_lp ) ; T5 = 2.0e0 * ( model->HSM2_vbi - Pb20 ) * T1 * T2 * T4 ; T5_dVb = 0.0 ; T5_dVd = 0.0 ; T5_dVg = 0.0 ; T6 = PS0Z_SCE - Vbsz ; T6_dVb = PS0Z_SCE_dVbs - Vbsz_dVbs ; T6_dVd = PS0Z_SCE_dVds - Vbsz_dVds ; T6_dVg = PS0Z_SCE_dVgs ; T6_dPS0Z = 1.0 ; Fn_SZ(T6, T6, C_sce_dlt, T0 ); T6 += small ; T6_dVb *= T0 ; T6_dVd *= T0 ; T6_dVg *= T0 ; T6_dPS0Z *= T0 ; dVth0 = T5 * sqrt( T6 ) ; dVth0_dVb = T5 * 0.5 / sqrt( T6 ) * T6_dVb + T5_dVb * sqrt( T6 ); dVth0_dVd = T5 * 0.5 / sqrt( T6 ) * T6_dVd + T5_dVd * sqrt( T6 ) ; dVth0_dVg = T5 * 0.5 / sqrt( T6 ) * T6_dVg + T5_dVg * sqrt( T6 ) ; dVth0_dPS0Z = T5 * 0.5 / sqrt( T6 ) * T6_dPS0Z ; T1 = Vthp - Vth0 ; T1_dVb = Vthp_dVb - Vth0_dVb ; T1_dVd = Vthp_dVd - Vth0_dVd ; T1_dVg = Vthp_dVg - Vth0_dVg ; T1_dPS0Z = Vthp_dPS0Z - Vth0_dPS0Z ; T9 = PS0Z_SCE - Vbsz2 ; T9_dVb = PS0Z_SCE_dVbs - Vbsz2_dVbs ; T9_dVd = PS0Z_SCE_dVds - Vbsz2_dVds ; T9_dVg = PS0Z_SCE_dVgs - Vbsz2_dVgs ; T9_dPS0Z = 1.0 ; T3 = pParam->HSM2_scp1 + pParam->HSM2_scp3 * T9 / model->HSM2_lp + pParam->HSM2_scp2 * Vdsz ; T3_dVb = pParam->HSM2_scp3 * T9_dVb / model->HSM2_lp ; T3_dVd = pParam->HSM2_scp3 * T9_dVd / model->HSM2_lp + pParam->HSM2_scp2 * Vdsz_dVds ; T3_dVg = pParam->HSM2_scp3 * T9_dVg / model->HSM2_lp ; T3_dPS0Z = pParam->HSM2_scp3 * T9_dPS0Z / model->HSM2_lp ; Vdx = model->HSM2_scp21 + Vdsz ; Vdx2 = Vdx * Vdx + small ; T4 = Vdx * Vdx + small ; T4_dVb = 0.0 ; T4_dVd = 2.0 * Vdx * Vdsz_dVds ; T4_dVg = 0.0 ; T5 = 1.0 / T4 ; T5_dVb = - T4_dVb / T4 / T4 ; T5_dVd = - T4_dVd / T4 / T4 ; T5_dVg = - T4_dVg / T4 / T4 ; dVthLP = T1 * dVth0 * T3 + dqb - here->HSM2_msc * T5 ; dVthLP_dVb = T1_dVb * dVth0 * T3 + T1 * dVth0_dVb * T3 + T1 * dVth0 * T3_dVb + dqb_dVb - here->HSM2_msc * T5_dVb ; dVthLP_dVd = T1_dVd * dVth0 * T3 + T1 * dVth0_dVd * T3 + T1 * dVth0 * T3_dVd + dqb_dVd - here->HSM2_msc * T5_dVd ; dVthLP_dVg = T1_dVg * dVth0 * T3 + T1 * dVth0_dVg * T3 + T1 * dVth0 * T3_dVg + dqb_dVg - here->HSM2_msc * T5_dVg ; dVthLP_dPS0Z = T1_dPS0Z * dVth0 * T3 + T1 * dVth0_dPS0Z * T3 + T1 * dVth0 * T3_dPS0Z + dqb_dPS0Z ; }else{ /* Original */ T1 = here->HSM2_2qnsub_esi ; T2 = model->HSM2_bs2 - Vbsz2 ; T3 = T2 + small ; T4 = sqrt (T3 * T3 + 4.0 * vth_dlt) ; T5 = 0.5 * (T3 + T4) ; T6 = 0.5 * (1.0 + T3 / T4) ; T5_dVb = - Vbsz2_dVbs * T6 ; T5_dVd = - Vbsz2_dVds * T6 ; T5_dVg = - Vbsz2_dVgs * T6 ; T7 = 1.0 / T5 ; bs12 = model->HSM2_bs1 * T7 ; T8 = - bs12 * T7 ; bs12_dVb = T8 * T5_dVb ; bs12_dVd = T8 * T5_dVd ; bs12_dVg = T8 * T5_dVg ; Fn_SU( T10 , Vbsz2 + bs12, 0.93 * Pb20, vth_dlt, T0) ; Qbmm = sqrt (T1 * (Pb20 - T10 )) ; T9 = T0 / Qbmm ; Qbmm_dVb = 0.5 * T1 * - (Vbsz2_dVbs + bs12_dVb) * T9 ; Qbmm_dVd = 0.5 * T1 * - (Vbsz2_dVds + bs12_dVd) * T9 ; Qbmm_dVg = 0.5 * T1 * - (Vbsz2_dVgs + bs12_dVg) * T9 ; dqb = (Qb0 - Qbmm) * Cox_inv ; dqb_dVb = Vthp_dVb - Qbmm_dVb * Cox_inv ; dqb_dVd = Vthp_dVd - Qbmm_dVd * Cox_inv ; dqb_dVg = Vthp_dVg - Qbmm_dVg * Cox_inv ; T1 = 2.0 * C_QE * here->HSM2_nsubc * C_ESI ; T2 = sqrt( T1 * ( Pb2c - Vbsz2 ) ) ; Vth0 = Pb2c + Vfb + T2 * Cox_inv ; T3 = 0.5 * T1 / T2 * Cox_inv ; Vth0_dVb = T3 * ( - Vbsz2_dVbs ) ; Vth0_dVd = T3 * ( - Vbsz2_dVds ) ; Vth0_dVg = T3 * ( - Vbsz2_dVgs ) ; T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdplp ; T4 = 1.0e0 / ( model->HSM2_lp * model->HSM2_lp ) ; T5 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = 0.5 * T5 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T8 * Pb20b_dVg ; T1 = Vthp - Vth0 ; T2 = pParam->HSM2_scp1 + pParam->HSM2_scp3 * Pbsum / model->HSM2_lp ; T3 = T2 + pParam->HSM2_scp2 * Vdsz ; Vdx = model->HSM2_scp21 + Vdsz ; Vdx2 = Vdx * Vdx + small ; dVthLP = T1 * dVth0 * T3 + dqb - here->HSM2_msc / Vdx2 ; T4 = T1 * dVth0 * pParam->HSM2_scp3 / model->HSM2_lp ; dVthLP_dVb = (Vthp_dVb - Vth0_dVb) * dVth0 * T3 + T1 * dVth0_dVb * T3 + T4 * Pbsum_dVb + dqb_dVb ; dVthLP_dVd = (Vthp_dVd - Vth0_dVd) * dVth0 * T3 + T1 * dVth0_dVd * T3 + T4 * Pbsum_dVd + T1 * dVth0 * pParam->HSM2_scp2 * Vdsz_dVds + dqb_dVd + 2.0e0 * here->HSM2_msc * Vdx * Vdsz_dVds / ( Vdx2 * Vdx2 ) ; dVthLP_dVg = (Vthp_dVg - Vth0_dVg) * dVth0 * T3 + T1 * dVth0_dVg * T3 + T4 * Pbsum_dVg + dqb_dVg ; } } else { dVthLP = 0.0e0 ; dVthLP_dVb = 0.0e0 ; dVthLP_dVd = 0.0e0 ; dVthLP_dVg = 0.0e0 ; } /*---------------------------------------------------* * dVthSC : Short-channel effect induced by Vds. *-----------------*/ if( corecip ){ T3 = here->HSM2_lgate - model->HSM2_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T5 = pParam->HSM2_sc3 / here->HSM2_lgate ; T6 = pParam->HSM2_sc1 + T5 * ( PS0Z_SCE - Vbsz ) ; T6_dVb = T5 * ( PS0Z_SCE_dVbs - Vbsz_dVbs ); T6_dVd = T5 * ( PS0Z_SCE_dVds - Vbsz_dVds ); T6_dVg = T5 * PS0Z_SCE_dVgs ; T6_dPS0Z = T5 ; /* QME:0 CORECIP:1 */ if( pParam->HSM2_sc4 != 0 ){ T8 = pParam->HSM2_sc4 * Vdsz * ( PS0Z_SCE - Vbsz ) ; T8_dVd = pParam->HSM2_sc4 * ( Vdsz_dVds * ( PS0Z_SCE - Vbsz ) + Vdsz * ( PS0Z_SCE_dVds - Vbsz_dVds ) ) ; T8_dVb = pParam->HSM2_sc4 * Vdsz * ( PS0Z_SCE_dVbs - Vbsz_dVbs ) ; T8_dVg = pParam->HSM2_sc4 * Vdsz * PS0Z_SCE_dVgs ; T8_dPS0Z = pParam->HSM2_sc4 * Vdsz ; T1 = T6 + pParam->HSM2_sc2 * Vdsz + T8 ; T1_dVd = T6_dVd + pParam->HSM2_sc2 * Vdsz_dVds + T8_dVd ; T1_dVb = T6_dVb + T8_dVb ; T1_dVg = T6_dVg + T8_dVg ; T1_dPS0Z = T6_dPS0Z + T8_dPS0Z ; }else{ T1 = T6 + pParam->HSM2_sc2 * Vdsz ; T1_dVb = T6_dVb ; T1_dVd = T6_dVd + pParam->HSM2_sc2 * Vdsz_dVds ; T1_dVg = T6_dVg ; T1_dPS0Z = T6_dPS0Z ; } T2 = C_ESI * Cox_inv * here->HSM2_wdpl * 2.0e0 * ( model->HSM2_vbi - Pb20 ) * T4 ; A = T2 * T1 ; A_dVbs = T2 * T1_dVb ; A_dVds = T2 * T1_dVd ; A_dVgs = T2 * T1_dVg ; A_dPS0Z = T2 * T1_dPS0Z ; T7 = PS0Z_SCE - Vbsz + Ps0_min ; T7_dVb = PS0Z_SCE_dVbs - Vbsz_dVbs + Ps0_min_dVbs; T7_dVd = PS0Z_SCE_dVds - Vbsz_dVds + Ps0_min_dVds ; T7_dVg = PS0Z_SCE_dVgs + Ps0_min_dVgs ; T7_dPS0Z = 1.0 ; if ( T7 > arg0 ) { T8 = sqrt( T7 ) ; T8_dVb = 0.5 * T7_dVb / T8 ; T8_dVd = 0.5 * T7_dVd / T8 ; T8_dVg = 0.5 * T7_dVg / T8 ; T8_dPS0Z = 0.5 * T7_dPS0Z / T8 ; } else { T8 = sqrt(arg0) + 0.5 / sqrt(arg0) * ( T7 - arg0) ; T8_dVb = 0.5 / sqrt(arg0) * T7_dVb ; T8_dVd = 0.5 / sqrt(arg0) * T7_dVd ; T8_dVg = 0.5 / sqrt(arg0) * T7_dVg ; T8_dPS0Z = 0.5 / sqrt(arg0) * T7_dPS0Z ; } dVthSC = A * T8 ; dVthSC_dVb = A * T8_dVb + A_dVbs * T8; dVthSC_dVd = A * T8_dVd + A_dVds * T8; dVthSC_dVg = A * T8_dVg + A_dVgs * T8; dVthSC_dPS0Z = A * T8_dPS0Z + A_dPS0Z * T8; }else{ /* original */ T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdpl ; T3 = here->HSM2_lgate - model->HSM2_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T5 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = T5 / 2.0 / sqrt_Pbsum ; T7 = 2.0e0 * ( model->HSM2_vbi - Pb20b ) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0e0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T8 * Pb20b_dVg ; T1 = pParam->HSM2_sc3 / here->HSM2_lgate ; T4 = pParam->HSM2_sc1 + T1 * Pbsum ; T4_dVb = T1 * Pbsum_dVb ; T4_dVd = T1 * Pbsum_dVd ; T4_dVg = T1 * Pbsum_dVg ; /* QME:0 CORECIP:0 */ if( pParam->HSM2_sc4 != 0 ){ T8 = pParam->HSM2_sc4 * Vdsz * Pbsum ; T8_dVd = pParam->HSM2_sc4 * ( Vdsz_dVds * Pbsum + Vdsz * Pbsum_dVd ) ; T8_dVb = pParam->HSM2_sc4 * Vdsz * Pbsum_dVb ; T8_dVg = pParam->HSM2_sc4 * Vdsz * Pbsum_dVg ; T5 = T4 + pParam->HSM2_sc2 * Vdsz + T8 ; T5_dVd = T4_dVd + pParam->HSM2_sc2 * Vdsz_dVds + T8_dVd ; T5_dVb = T4_dVb + T8_dVb ; T5_dVg = T4_dVg + T8_dVg ; }else{ T5 = T4 + pParam->HSM2_sc2 * Vdsz ; T5_dVb = T4_dVb ; T5_dVd = T4_dVd + pParam->HSM2_sc2 * Vdsz_dVds ; T5_dVg = T4_dVg ; } dVthSC = dVth0 * T5 ; dVthSC_dVb = dVth0_dVb * T5 + dVth0 * T5_dVb ; dVthSC_dVd = dVth0_dVd * T5 + dVth0 * T5_dVd ; dVthSC_dVg = dVth0_dVg * T5 + dVth0 * T5_dVg ; } /*---------------------------------------------------* * dVthW : narrow-channel effect. *-----------------*/ T1 = 1.0 / Cox ; T3 = 1.0 / ( Cox + pParam->HSM2_wfc / Weff ) ; T5 = T1 - T3 ; if( corecip ){ dVthW = Qb0 * T5 + pParam->HSM2_wvth0 / here->HSM2_wg ; dVthW_dVb = Qb0_dVb * T5 ; dVthW_dVd = Qb0_dVd * T5 ; dVthW_dVg = Qb0_dVg * T5 ; }else{ /* original */ dVthW = Qb0 * T5 + pParam->HSM2_wvth0 / here->HSM2_wg ; dVthW_dVb = Qb0_dVb * T5 ; dVthW_dVd = Qb0_dVd * T5 ; dVthW_dVg = 0.0 ; } } /* end of flg_qme if-blocks */ /*---------------------------------------------------* * dVth : Total variation. * - Positive dVth means the decrease in Vth. *-----------------*/ dVth = dVthSC + dVthLP + dVthW + here->HSM2_dVthsm ; dVth_dVb = dVthSC_dVb + dVthLP_dVb + dVthW_dVb ; dVth_dVd = dVthSC_dVd + dVthLP_dVd + dVthW_dVd ; dVth_dVg = dVthSC_dVg + dVthLP_dVg + dVthW_dVg ; dVth_dPS0Z = dVthSC_dPS0Z + dVthLP_dPS0Z ; /*---------------------------------------------------* * Vth : Threshold voltagei for OP. *-----------------*/ T2 = sqrt( here->HSM2_2qnsub_esi * Pb2 ) ; Vth = Pb2 + Vfb + T2 * Cox0_inv - dVth ; /*-----------------------------------------------------------* * Constants in the equation of Ps0 . *-----------------*/ fac1 = cnst0 * Cox_inv ; fac1_dVbs = cnst0 * Cox_inv_dVb ; fac1_dVds = cnst0 * Cox_inv_dVd ; fac1_dVgs = cnst0 * Cox_inv_dVg ; fac1p2 = fac1 * fac1 ; /*---------------------------------------------------* * Poly-Depletion Effect *-----------------*/ if ( here->HSM2_flg_pgd == 0 ) { dPpg = 0.0 ; dPpg_dVb = 0.0 ; dPpg_dVd = 0.0 ; dPpg_dVg = 0.0 ; } else { T7 = Vgsz ; T7_dVb = 0.0 ; T7_dVd = Vgsz_dVds ; T7_dVg = Vgsz_dVgs ; T0 = here->HSM2_cnstpgd ; T3 = T7 - model->HSM2_pgd2 ; T3_dVb = T7_dVb ; T3_dVd = T7_dVd ; T3_dVg = T7_dVg ; Fn_ExpLim( dPpg , T3 , T6 ) ; dPpg_dVb = T6 * T3_dVb ; dPpg_dVd = T6 * T3_dVd ; dPpg_dVg = T6 * T3_dVg ; Fn_SZ( dPpg , dPpg - 1.0 , 0.1 , T6 ) ; dPpg_dVb *= T6 ; dPpg_dVd *= T6 ; dPpg_dVg *= T6 ; dPpg *= T0 ; dPpg_dVb *= T0 ; dPpg_dVd *= T0 ; dPpg_dVg *= T0 ; Fn_SU( dPpg , dPpg , pol_b , pol_dlt , T9 ) ; dPpg_dVb *= T9 ; dPpg_dVd *= T9 ; dPpg_dVg *= T9 ; } /*---------------------------------------------------* * Vgp : Effective gate bias with SCE & RSCE & flatband. *-----------------*/ Vgp = Vgs - Vfb + dVth - dPpg ; Vgp_dVbs = dVth_dVb - dPpg_dVb ; Vgp_dVds = dVth_dVd - dPpg_dVd ; Vgp_dVgs = 1.0e0 + dVth_dVg - dPpg_dVg ; Vgp_dPS0Z = dVth_dPS0Z ; Vgpz = Vgsz - Vfb + dVth - dPpg ; /* (tmp) */ Vgpz_dVbs = dVth_dVb ; Vgpz_dVds = Vgsz_dVds + dVth_dVd - dPpg_dVd ; Vgpz_dVgs = Vgsz_dVgs + dVth_dVg - dPpg_dVg ; Vgpz_dPS0Z = dVth_dPS0Z ; /*---------------------------------------------------* * Vgs_fb : Actual flatband voltage taking account Vbs. * - note: if Vgs == Vgs_fb then Vgp == Ps0 == Vbs . *------------------*/ Vgs_fb = Vfb - dVth + dPpg + Vbs ; /*---------------------------------------------------* * Vfbsft : Vfb shift *-----------------*/ Vfbsft = 0.0 ; Vfbsft_dVbs = 0.0 ; Vfbsft_dVds = 0.0 ; Vfbsft_dVgs = 0.0 ; Vfbsft_dPS0Z = 0.0 ; if ( Vbs > 0.0 ) { /* values at D2/D3 boundary + beta */ /* Ps0 */ T1 = Vbs + ( znbd5 + 1 ) * beta_inv ; /* Qb0 */ /* T2 = cnst0 * sqrt( znbd5 ) */ T2 = cnst0 * 2.23606797749979 ; /* Vgp assuming Qn0=0 */ T3 = T2 * Cox_inv + T1 ; /* Vgp difference */ TX = T3 - Vgp ; TX_dVbs = 1.0 - Vgp_dVbs ; TX_dVds = - Vgp_dVds ; TX_dVgs = - Vgp_dVgs ; TX_dPS0Z = - Vgp_dPS0Z ; /* set lower limit to 0 */ Fn_SZ( TX , TX , 0.1 , T4 ) ; TX_dVbs *= T4 ; TX_dVds *= T4 ; TX_dVgs *= T4 ; TX_dPS0Z *= T4 ; /* TY: damping factor */ T1 = 0.5 ; T5 = Vbs / T1 ; T5_dVb = 1.0 / T1 ; T6 = T5 * T5 ; T6 *= T6 ; T6_dVb = 4 * T5 * T5 * T5 * T5_dVb ; T7 = 1.0 / ( 1.0 + T6 ) ; T8 = T7 * T7 ; TY = 1.0 - T7 ; TY_dVbs = T8 * T6_dVb ; TX = TY = 0.0 ; TX_dVbs = TX_dVds = TX_dVgs = TX_dPS0Z = TY_dVbs = 0.0 ; Vfbsft = TX * TY ; Vfbsft_dVbs = TX_dVbs * TY + TX * TY_dVbs ; Vfbsft_dVds = TX_dVds * TY ; Vfbsft_dVgs = TX_dVgs * TY ; Vfbsft_dPS0Z = TX_dPS0Z * TY ; Vgs_fb -= Vfbsft ; Vgp += Vfbsft ; Vgp_dVbs += Vfbsft_dVbs ; Vgp_dVds += Vfbsft_dVds ; Vgp_dVgs += Vfbsft_dVgs ; Vgp_dPS0Z += Vfbsft_dPS0Z ; Vgpz += Vfbsft ; Vgpz_dVbs += Vfbsft_dVbs ; Vgpz_dVds += Vfbsft_dVds ; Vgpz_dVgs += Vfbsft_dVgs ; Vgpz_dPS0Z += Vfbsft_dPS0Z ; } /*-----------------------------------------------------------* * Accumulation zone. (zone-A) * - evaluate basic characteristics and exit from this part. *-----------------*/ if ( Vgs < Vgs_fb ) { flg_zone = -1 ; /*---------------------------------------------------* * Evaluation of Ps0. * - Psa : Analytical solution of * Cox( Vgp - Psa ) = cnst0 * Qacc * where Qacc is the 3-degree series of (fdep)^{1/2}. * The unkown is transformed to Chi=beta(Ps0-Vbs). * - Ps0_min : |Ps0_min| when Vbs=0. *-----------------*/ /* Ps0_min = here->HSM2_eg - Pb2 ; */ /* -> replaced by approx. solving Poisson equation at Vgs=Vgs_min */ /* Ps0_min = 2.0 * beta_inv * log(-Vgs_min/fac1) ; already done above */ TX = beta * ( Vgp - Vbs ) ; TX_dVbs = beta * ( Vgp_dVbs - 1.0 ) ; TX_dVds = beta * Vgp_dVds ; TX_dVgs = beta * Vgp_dVgs ; TX_dPS0Z = beta * Vgp_dPS0Z ; T1 = 1.0 / ( beta * cnst0 ) ; TY = T1 * Cox ; TY_dVbs = T1 * Cox_dVb ; TY_dVds = T1 * Cox_dVd ; TY_dVgs = T1 * Cox_dVg ; Ac41 = 2.0 + 3.0 * C_SQRT_2 * TY ; Ac4 = 8.0 * Ac41 * Ac41 * Ac41 ; T1 = 72.0 * Ac41 * Ac41 * C_SQRT_2 ; Ac4_dVbs = T1 * TY_dVbs ; Ac4_dVds = T1 * TY_dVds ; Ac4_dVgs = T1 * TY_dVgs ; T4 = ( TX - 2.0 ) ; T5 = 9.0 * TY * T4 ; T5_dVb = 9.0 * ( TY_dVbs * T4 + TY * TX_dVbs ) ; T5_dVd = 9.0 * ( TY_dVds * T4 + TY * TX_dVds ) ; T5_dVg = 9.0 * ( TY_dVgs * T4 + TY * TX_dVgs ) ; T5_dPS0Z = 9.0 * ( TY * TX_dPS0Z ) ; Ac31 = 7.0 * C_SQRT_2 - T5 ; Ac31_dVbs = -T5_dVb ; Ac31_dVds = -T5_dVd ; Ac31_dVgs = -T5_dVg ; Ac31_dPS0Z = -T5_dPS0Z ; Ac3 = Ac31 * Ac31 ; T1 = 2.0 * Ac31 ; Ac3_dVbs = T1 * Ac31_dVbs ; Ac3_dVds = T1 * Ac31_dVds ; Ac3_dVgs = T1 * Ac31_dVgs ; Ac3_dPS0Z = T1 * Ac31_dPS0Z ; Ac2 = sqrt( Ac4 + Ac3 ) ; T1 = 0.5 / Ac2 ; Ac2_dVbs = T1 * ( Ac4_dVbs + Ac3_dVbs ) ; Ac2_dVds = T1 * ( Ac4_dVds + Ac3_dVds ) ; Ac2_dVgs = T1 * ( Ac4_dVgs + Ac3_dVgs ) ; Ac2_dPS0Z = T1 * ( Ac3_dPS0Z ) ; Ac1 = -7.0 * C_SQRT_2 + Ac2 + T5 ; Ac1_dVbs = Ac2_dVbs + T5_dVb ; Ac1_dVds = Ac2_dVds + T5_dVd ; Ac1_dVgs = Ac2_dVgs + T5_dVg ; Ac1_dPS0Z = Ac2_dPS0Z + T5_dPS0Z ; Acd = Fn_Pow( Ac1 , C_1o3 ) ; T1 = C_1o3 / ( Acd * Acd ) ; Acd_dVbs = Ac1_dVbs * T1 ; Acd_dVds = Ac1_dVds * T1 ; Acd_dVgs = Ac1_dVgs * T1 ; Acd_dPS0Z = Ac1_dPS0Z * T1 ; Acn = -4.0 * C_SQRT_2 - 12.0 * TY + 2.0 * Acd + C_SQRT_2 * Acd * Acd ; T1 = 2.0 + 2.0 * C_SQRT_2 * Acd ; Acn_dVbs = - 12.0 * TY_dVbs + T1 * Acd_dVbs ; Acn_dVds = - 12.0 * TY_dVds + T1 * Acd_dVds ; Acn_dVgs = - 12.0 * TY_dVgs + T1 * Acd_dVgs ; Acn_dPS0Z = T1 * Acd_dPS0Z ; T1 = 1.0 / Acd ; Chi = Acn * T1 ; Chi_dVbs = ( Acn_dVbs - Chi * Acd_dVbs ) * T1 ; Chi_dVds = ( Acn_dVds - Chi * Acd_dVds ) * T1 ; Chi_dVgs = ( Acn_dVgs - Chi * Acd_dVgs ) * T1 ; Chi_dPS0Z = ( Acn_dPS0Z - Chi * Acd_dPS0Z ) * T1 ; Psa = Chi * beta_inv + Vbs ; Psa_dVbs = Chi_dVbs * beta_inv + 1.0 ; Psa_dVds = Chi_dVds * beta_inv ; Psa_dVgs = Chi_dVgs * beta_inv ; Psa_dPS0Z = Chi_dPS0Z * beta_inv ; T1 = Psa - Vbs ; T2 = T1 / Ps0_min ; T3 = sqrt( 1.0 + ( T2 * T2 ) ) ; T9 = T2 / T3 / Ps0_min ; T3_dVb = T9 * ( Psa_dVbs - 1.0 ) ; T3_dVd = T9 * ( Psa_dVds ) ; T3_dVg = T9 * ( Psa_dVgs ) ; T3_dPS0Z = T9 * ( Psa_dPS0Z ) ; Ps0 = T1 / T3 + Vbs ; T9 = 1.0 / ( T3 * T3 ) ; Ps0_dVbs = T9 * ( ( Psa_dVbs - 1.0 ) * T3 - T1 * T3_dVb ) + 1.0 ; Ps0_dVds = T9 * ( Psa_dVds * T3 - T1 * T3_dVd ) ; Ps0_dVgs = T9 * ( Psa_dVgs * T3 - T1 * T3_dVg ) ; Ps0_dPS0Z = T9 * ( Psa_dPS0Z * T3 - T1 * T3_dPS0Z ) ; /*---------------------------------------------------* * Characteristics. *-----------------*/ Psl = Ps0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVds = Ps0_dVds ; Psl_dVgs = Ps0_dVgs ; T2 = ( Vgp - Ps0 ) ; Qbu = Cox * T2 ; Qbu_dVbs = Cox * ( Vgp_dVbs - Ps0_dVbs ) + Cox_dVb * T2 ; Qbu_dVds = Cox * ( Vgp_dVds - Ps0_dVds ) + Cox_dVd * T2 ; Qbu_dVgs = Cox * ( Vgp_dVgs - Ps0_dVgs ) + Cox_dVg * T2 ; Qiu = 0.0e0 ; Qiu_dVbs = 0.0e0 ; Qiu_dVds = 0.0e0 ; Qiu_dVgs = 0.0e0 ; Qdrat = 0.5e0 ; Qdrat_dVbs = 0.0e0 ; Qdrat_dVds = 0.0e0 ; Qdrat_dVgs = 0.0e0 ; Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; Ids = 0.0e0 ; Ids_dVbs = 0.0e0 ; Ids_dVds = 0.0e0 ; Ids_dVgs = 0.0e0 ; VgVt = 0.0 ; flg_noqi = 1 ; DJI = 1.0 ; if( corecip ){ /*!! This is for Accumulation Region !!*/ T1 = Vds * 0.5 ; Fn_SymAdd( Pzadd , T1 , model->HSM2_pzadd0 , T2 ) ; T2 /= 2 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = T2 * ( 1.0 ) ; Pzadd_dVgs = 0.0 ; Pzadd_dPS0Z = 0.0 ; if ( Pzadd < epsm10 ) { Pzadd = epsm10 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = 0.0 ; Pzadd_dVgs = 0.0 ; Pzadd_dPS0Z = 0.0 ; } Ps0z = Ps0 + Pzadd ; Ps0z_dVbs = Ps0_dVbs + Pzadd_dVbs ; Ps0z_dVds = Ps0_dVds + Pzadd_dVds ; Ps0z_dVgs = Ps0_dVgs + Pzadd_dVgs ; Ps0z_dPS0Z = Ps0_dPS0Z + Pzadd_dPS0Z ; /* calculate Newton correction: */ G = PS0Z_SCE - Ps0z ; delta_PS0Z_SCE = - G / (1.0 - Ps0z_dPS0Z) ; delta_PS0Z_SCE_dVbs = Ps0z_dVbs - PS0Z_SCE_dVbs; delta_PS0Z_SCE_dVds = Ps0z_dVds - PS0Z_SCE_dVds; delta_PS0Z_SCE_dVgs = Ps0z_dVgs - PS0Z_SCE_dVgs; PS0Z_SCE += delta_PS0Z_SCE ; PS0Z_SCE_dVbs = Ps0z_dVbs ; PS0Z_SCE_dVds = Ps0z_dVds ; PS0Z_SCE_dVgs = Ps0z_dVgs ; PS0_SCE = PS0Z_SCE - Pzadd ; PS0_SCE_dVbs = Ps0_dVbs ; PS0_SCE_dVds = Ps0_dVds ; PS0_SCE_dVgs = Ps0_dVgs ; NNN += 1 ; if( ( fabs(delta_PS0Z_SCE) > PS0_SCE_tol || fabs(delta_PS0Z_SCE_dVbs) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVds) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVgs) > PS0_SCE_deriv_tol ) && (NNN < MAX_LOOP_SCE) ){ goto START_OF_SCE_LOOP; } } goto end_of_part_1 ; } /*-----------------------------------------------------------* * Initial guess for Ps0. *-----------------*/ /*---------------------------------------------------* * Ps0_iniA: solution of subthreshold equation assuming zone-D1/D2. *-----------------*/ TX = 1.0e0 + 4.0e0 * ( beta * ( Vgp - Vbs ) - 1.0e0 ) / ( fac1p2 * beta2 ) ; TX = Fn_Max( TX , epsm10 ) ; Ps0_iniA = Vgp + fac1p2 * beta * 0.5 * ( 1.0e0 - sqrt( TX ) ) ; /* use analitical value in subthreshold region. */ if ( Vgs < ( Vfb + Vth ) * 0.5 ) { flg_pprv = 0 ; } if ( flg_pprv >= 1 ) { /*---------------------------------------------------* * Use previous value. *-----------------*/ T1 = Ps0_dVbs * dVbs + Ps0_dVds * dVds + Ps0_dVgs * dVgs ; Ps0_ini = Ps0 + T1 ; if ( flg_pprv == 2 ) { /* TX_dVxs = d^2 Ps0 / d Vxs^2 here */ if ( Vbsc_dif2 > epsm10 ) { TX_dVbs = ( here->HSM2_ps0_dvbs_prv - here->HSM2_ps0_dvbs_prv2 ) / Vbsc_dif2 ; } else { TX_dVbs = 0.0 ; } if ( Vdsc_dif2 > epsm10 ) { TX_dVds = ( here->HSM2_ps0_dvds_prv - here->HSM2_ps0_dvds_prv2 ) / Vdsc_dif2 ; } else { TX_dVds = 0.0 ; } if ( Vgsc_dif2 > epsm10 ) { TX_dVgs = ( here->HSM2_ps0_dvgs_prv - here->HSM2_ps0_dvgs_prv2 ) / Vgsc_dif2 ; } else { TX_dVgs = 0.0 ; } T2 = ( dVbs * dVbs ) / 2 * TX_dVbs + ( dVds * dVds ) / 2 * TX_dVds + ( dVgs * dVgs ) / 2 * TX_dVgs ; if ( fabs( T2 ) < fabs( 0.5 * T1 ) ) { Ps0_ini += T2 ; } else { flg_pprv = 1 ; } } T1 = Ps0_ini - Ps0 ; if ( T1 < - dP_max || T1 > dP_max ) { flg_pprv = 0 ; /* flag changes to analitical */ } else { Ps0_iniA = Fn_Max( Ps0_ini , Ps0_iniA ) ; } } /* end of (flg_pprv >=1) if-block */ if ( flg_pprv == 0 ) { /*---------------------------------------------------* * Analytical initial guess. *-----------------*/ /*-------------------------------------------* * Common part. *-----------------*/ Chi = beta * ( Ps0_iniA - Vbs ) ; if ( Chi < znbd3 ) { /*-----------------------------------* * zone-D1/D2 * - Ps0_ini is the analytical solution of Qs=Qb0 with * Qb0 being approximated to 3-degree polynomial. *-----------------*/ TY = beta * ( Vgp - Vbs ) ; T1 = 1.0e0 / ( cn_nc3 * beta * fac1 ) ; T2 = 81.0 + 3.0 * T1 ; T3 = -2916.0 - 81.0 * T1 + 27.0 * T1 * TY ; T4 = 1458.0 - 81.0 * ( 54.0 + T1 ) + 27.0 * T1 * TY ; T4 = T4 * T4 ; T5 = Fn_Pow( T3 + sqrt( 4 * T2 * T2 * T2 + T4 ) , C_1o3 ) ; TX = 3.0 - ( C_2p_1o3 * T2 ) / ( 3.0 * T5 ) + 1 / ( 3.0 * C_2p_1o3 ) * T5 ; Ps0_iniA = TX * beta_inv + Vbs ; Ps0_ini = Ps0_iniA ; } else if ( Vgs <= Vth ) { /*-----------------------------------* * Weak inversion zone. *-----------------*/ Ps0_ini = Ps0_iniA ; } else { /*-----------------------------------* * Strong inversion zone. * - Ps0_iniB : upper bound. *-----------------*/ T1 = 1.0 / cnst1 / cnstCoxi ; T2 = T1 * Vgp * Vgp ; T3 = beta + 2.0 / Vgp ; Ps0_iniB = log( T2 + small ) / T3 ; Fn_SU( Ps0_ini , Ps0_iniA, Ps0_iniB, c_ps0ini_2, T1) ; } } TX = Vbs + ps_conv / 2 ; if ( Ps0_ini < TX ) Ps0_ini = TX ; /*---------------------------------------------------* * Assign initial guess. *-----------------*/ if ( NNN == 0 ) { Ps0 = Ps0_ini ; } Psl_lim = Ps0_iniA ; /*---------------------------------------------------* * Calculation of Ps0. (beginning of Newton loop) * - Fs0 : Fs0 = 0 is the equation to be solved. * - dPs0 : correction value. *-----------------*/ exp_bVbs = exp( beta * Vbs ) ; cfs1 = cnst1 * exp_bVbs ; flg_conv = 0 ; for ( lp_s0 = 1 ; lp_s0 <= lp_s0_max + 1 ; lp_s0 ++ ) { Chi = beta * ( Ps0 - Vbs ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0) * - Qb0 is approximated to 5-degree polynomial. *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; fs01 = cfs1 * fi * fi ; fs01_dPs0 = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fs02 = sqrt( fb * fb + fs01 ) ; fs02_dPs0 = ( beta * fb_dChi * 2 * fb + fs01_dPs0 ) / ( fs02 + fs02 ) ; } else { /*-------------------------------------------* * zone-D3. (Ps0) *-----------------*/ if ( Chi < large_arg ) { /* avoid exp_Chi to become extremely large */ exp_Chi = exp( Chi ) ; fs01 = cfs1 * ( exp_Chi - 1.0e0 ) ; fs01_dPs0 = cfs1 * beta * ( exp_Chi ) ; } else { exp_bPs0 = exp( beta*Ps0 ) ; fs01 = cnst1 * ( exp_bPs0 - exp_bVbs ) ; fs01_dPs0 = cnst1 * beta * exp_bPs0 ; } fs02 = sqrt( Chi - 1.0 + fs01 ) ; fs02_dPs0 = ( beta + fs01_dPs0 ) / ( fs02 + fs02 ) ; } /* end of if ( Chi ... ) else block */ Fs0 = Vgp - Ps0 - fac1 * fs02 ; Fs0_dPs0 = - 1.0e0 - fac1 * fs02_dPs0 ; if ( flg_conv == 1 ) break ; dPs0 = - Fs0 / Fs0_dPs0 ; /*-------------------------------------------* * Update Ps0 . * - clamped to Vbs if Ps0 < Vbs . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Ps0))) ; if ( fabs( dPs0 ) > dPlim ) dPs0 = dPlim * Fn_Sgn( dPs0 ) ; Ps0 = Ps0 + dPs0 ; TX = Vbs + ps_conv / 2 ; if ( Ps0 < TX ) Ps0 = TX ; /*-------------------------------------------* * Check convergence. * NOTE: This condition may be too rigid. *-----------------*/ if ( fabs( dPs0 ) <= ps_conv && fabs( Fs0 ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Ps0 Newton loop */ /* Eliminate loop count to take account of the derivative loop */ lp_s0 -- ; /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM): Went Over Iteration Maximum (Ps0)\n" ) ; fprintf( stderr , " Vbse = %7.3f Vdse = %7.3f Vgse = %7.3f\n" , Vbse , Vdse , Vgse ) ; if ( flg_info >= 2 ) { printf( "*** warning(HiSIM): Went Over Iteration Maximum (Ps0)\n" ) ; } } /*---------------------------------------------------* * Evaluate derivatives of Ps0. * - note: Here, fs01_dVbs and fs02_dVbs are derivatives * w.r.t. explicit Vbs. So, Ps0 in the fs01 and fs02 * expressions is regarded as a constant. *-----------------*/ /* derivatives of fs0* w.r.t. explicit Vbs */ if ( Chi < znbd5 ) { fs01_dVbs = cfs1 * beta * fi * ( fi - 2 * fi_dChi ) ; T2 = 1.0e0 / ( fs02 + fs02 ) ; fs02_dVbs = ( - beta * fb_dChi * 2 * fb + fs01_dVbs ) * T2 ; } else { fs01_dVbs = - cfs1 * beta ; T2 = 0.5e0 / fs02 ; fs02_dVbs = ( - beta + fs01_dVbs ) * T2 ; } T1 = 1.0 / Fs0_dPs0 ; Ps0_dVbs = - ( Vgp_dVbs - ( fac1 * fs02_dVbs + fac1_dVbs * fs02 ) ) * T1 ; Ps0_dVds = - ( Vgp_dVds - fac1_dVds * fs02 ) * T1 ; Ps0_dVgs = - ( Vgp_dVgs - fac1_dVgs * fs02 ) * T1 ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0) * Xi0 := fdep0^2 = fb * fb [D1,D2] *-----------------*/ Xi0 = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xi0_dVbs = T1 * ( Ps0_dVbs - 1.0 ) ; Xi0_dVds = T1 * Ps0_dVds ; Xi0_dVgs = T1 * Ps0_dVgs ; Xi0p12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xi0p12_dVbs = T1 * ( Ps0_dVbs - 1.0 ) ; Xi0p12_dVds = T1 * Ps0_dVds ; Xi0p12_dVgs = T1 * Ps0_dVgs ; Xi0p32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xi0p32_dVbs = T1 * ( Ps0_dVbs - 1.0 ) ; Xi0p32_dVds = T1 * Ps0_dVds ; Xi0p32_dVgs = T1 * Ps0_dVgs ; } else { /*-------------------------------------------* * zone-D3. (Ps0) *-----------------*/ flg_zone = 3 ; flg_noqi = 0 ; /*-----------------------------------* * Xi0 := fdep0^2 = Chi - 1 = beta * ( Ps0 - Vbs ) - 1 [D3] *-----------------*/ Xi0 = Chi - 1.0e0 ; Xi0_dVbs = beta * ( Ps0_dVbs - 1.0e0 ) ; Xi0_dVds = beta * Ps0_dVds ; Xi0_dVgs = beta * Ps0_dVgs ; Xi0p12 = sqrt( Xi0 ) ; T1 = 0.5e0 / Xi0p12 ; Xi0p12_dVbs = T1 * Xi0_dVbs ; Xi0p12_dVds = T1 * Xi0_dVds ; Xi0p12_dVgs = T1 * Xi0_dVgs ; Xi0p32 = Xi0 * Xi0p12 ; T1 = 1.5e0 * Xi0p12 ; Xi0p32_dVbs = T1 * Xi0_dVbs ; Xi0p32_dVds = T1 * Xi0_dVds ; Xi0p32_dVgs = T1 * Xi0_dVgs ; } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * - Recalculate the derivatives of fs01 and fs02. * note: fs01 = cnst1 * exp( Vbs ) * ( exp( Chi ) - Chi - 1.0e0 ) ; * fs02 = sqrt( Xi0 + fs01 ) ; *-----------------*/ fs01_dVbs = Ps0_dVbs * fs01_dPs0 + fs01_dVbs ; fs01_dVds = Ps0_dVds * fs01_dPs0 ; fs01_dVgs = Ps0_dVgs * fs01_dPs0 ; fs02_dVbs = Ps0_dVbs * fs02_dPs0 + fs02_dVbs ; fs02_dVds = Ps0_dVds * fs02_dPs0 ; fs02_dVgs = Ps0_dVgs * fs02_dPs0 ; /*-----------------------------------------------------------* * Qb0 : Qb at source side. * Qn0 : Qi at source side. *-----------------*/ Qb0 = cnst0 * Xi0p12 ; Qb0_dVb = cnst0 * Xi0p12_dVbs ; Qb0_dVd = cnst0 * Xi0p12_dVds ; Qb0_dVg = cnst0 * Xi0p12_dVgs ; T1 = 1.0 / ( fs02 + Xi0p12 ) ; Qn0 = cnst0 * fs01 * T1 ; T2 = 1.0 / ( fs01 + epsm10 ) ; Qn0_dVbs = Qn0 * ( fs01_dVbs * T2 - ( fs02_dVbs + Xi0p12_dVbs ) * T1 ) ; Qn0_dVds = Qn0 * ( fs01_dVds * T2 - ( fs02_dVds + Xi0p12_dVds ) * T1 ) ; Qn0_dVgs = Qn0 * ( fs01_dVgs * T2 - ( fs02_dVgs + Xi0p12_dVgs ) * T1 ) ; /*-----------------------------------------------------------* * zone-D1 and D2 *-----------------*/ if ( Chi < znbd5 ) { if ( Chi < znbd3 ) { /*-------------------------------------------* * zone-D1. (Ps0) *-----------------*/ flg_zone = 1 ; flg_noqi = 1 ; /** !! to be revisited !! **/ Qiu = Qn0 ; Qiu_dVbs = Qn0_dVbs ; Qiu_dVds = Qn0_dVds ; Qiu_dVgs = Qn0_dVgs ; Qbu = Qb0 ; Qbu_dVbs = Qb0_dVb ; Qbu_dVds = Qb0_dVd ; Qbu_dVgs = Qb0_dVg ; Qdrat = 0.5 ; Qdrat_dVbs = 0.0 ; Qdrat_dVds = 0.0 ; Qdrat_dVgs = 0.0 ; Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; } else { /*-------------------------------------------* * zone-D2 (Ps0) *-----------------*/ flg_zone = 2 ; flg_noqi = 0 ; /*-----------------------------------------------------------* * FD2 : connecting function for zone-D2. * - Qiu, Qbu, Qdrat and Lred should be interpolated later. *-----------------*/ T1 = 1.0 / ( znbd5 - znbd3 ) ; TX = T1 * ( Chi - znbd3 ) ; TX_dVbs = beta * T1 * ( Ps0_dVbs - 1.0 ) ; TX_dVds = beta * T1 * Ps0_dVds ; TX_dVgs = beta * T1 * Ps0_dVgs ; FD2 = TX * TX * TX * ( 10.0 + TX * ( -15.0 + TX * 6.0 ) ) ; T4 = TX * TX * ( 30.0 + TX * ( -60.0 + TX * 30.0 ) ) ; FD2_dVbs = T4 * TX_dVbs ; FD2_dVds = T4 * TX_dVds ; FD2_dVgs = T4 * TX_dVgs ; } /* end of zone-D2 */ } /*---------------------------------------------------* * VgVt : Vgp - Vth_qi. ( Vth_qi is Vth for Qi evaluation. ) *-----------------*/ VgVt = Qn0 * Cox_inv ; VgVt_dVbs = Qn0_dVbs * Cox_inv + Qn0 * Cox_inv_dVb ; VgVt_dVds = Qn0_dVds * Cox_inv + Qn0 * Cox_inv_dVd ; VgVt_dVgs = Qn0_dVgs * Cox_inv + Qn0 * Cox_inv_dVg ; /*-----------------------------------------------------------* * make Qi=Qd=Ids=0 if VgVt <= VgVt_small *-----------------*/ if ( VgVt <= VgVt_small && model->HSM2_bypass_enable ) { flg_zone = 4 ; flg_noqi = 1 ; Psl = Ps0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVds = Ps0_dVds ; Psl_dVgs = Ps0_dVgs ; Pds = 0.0 ; Pds_dVbs = 0.0 ; Pds_dVds = 0.0 ; Pds_dVgs = 0.0 ; Qbu = Qb0 ; Qbu_dVbs = Qb0_dVb ; Qbu_dVds = Qb0_dVd ; Qbu_dVgs = Qb0_dVg ; Qiu = 0.0 ; Qiu_dVbs = 0.0 ; Qiu_dVds = 0.0 ; Qiu_dVgs = 0.0 ; Qdrat = 0.5 ; Qdrat_dVbs = 0.0 ; Qdrat_dVds = 0.0 ; Qdrat_dVgs = 0.0 ; Lred = 0.0 ; Lred_dVbs = 0.0 ; Lred_dVds = 0.0 ; Lred_dVgs = 0.0 ; Ids = 0.0e0 ; Ids_dVbs = 0.0e0 ; Ids_dVds = 0.0e0 ; Ids_dVgs = 0.0e0 ; DJI = 1.0 ; if( corecip ){ Fs0_dPS0Z = Vgp_dPS0Z ; Ps0_dPS0Z = - Fs0_dPS0Z / Fs0_dPs0 ; T1 = Vds * 0.5 ; Fn_SymAdd( Pzadd , T1 , model->HSM2_pzadd0 , T2 ) ; T2 /= 2 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = T2 * ( 1.0 ) ; Pzadd_dVgs = 0.0 ; Pzadd_dPS0Z = 0.0 ; if ( Pzadd < epsm10 ) { Pzadd = epsm10 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = 0.0 ; Pzadd_dVgs = 0.0 ; Pzadd_dPS0Z = 0.0 ; } Ps0z = Ps0 + Pzadd ; Ps0z_dVbs = Ps0_dVbs + Pzadd_dVbs ; Ps0z_dVds = Ps0_dVds + Pzadd_dVds ; Ps0z_dVgs = Ps0_dVgs + Pzadd_dVgs ; Ps0z_dPS0Z = Ps0_dPS0Z + Pzadd_dPS0Z ; /* calculate Newton correction: */ G = PS0Z_SCE - Ps0z ; delta_PS0Z_SCE = - G / (1.0 - Ps0z_dPS0Z) ; delta_PS0Z_SCE_dVbs = Ps0z_dVbs - PS0Z_SCE_dVbs; delta_PS0Z_SCE_dVds = Ps0z_dVds - PS0Z_SCE_dVds; delta_PS0Z_SCE_dVgs = Ps0z_dVgs - PS0Z_SCE_dVgs; PS0Z_SCE += delta_PS0Z_SCE ; PS0Z_SCE_dVbs = Ps0z_dVbs ; PS0Z_SCE_dVds = Ps0z_dVds ; PS0Z_SCE_dVgs = Ps0z_dVgs ; PS0_SCE = PS0Z_SCE - Pzadd ; PS0_SCE_dVbs = Ps0_dVbs ; PS0_SCE_dVds = Ps0_dVds ; PS0_SCE_dVgs = Ps0_dVgs ; NNN += 1 ; if( ( fabs(delta_PS0Z_SCE) > PS0_SCE_tol || fabs(delta_PS0Z_SCE_dVbs) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVds) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVgs) > PS0_SCE_deriv_tol ) && (NNN < MAX_LOOP_SCE) ){ goto START_OF_SCE_LOOP; } } goto end_of_part_1 ; } /*-----------------------------------------------------------* * Start point of Psl (= Ps0 + Pds) calculation. (label) *-----------------*/ /* start_of_Psl:*/ /* Vdseff (begin) */ Vdsorg = Vds ; T2 = here->HSM2_qnsub_esi / ( Cox * Cox ) ; T4 = - 2.0e0 * T2 / Cox ; T2_dVb = T4 * Cox_dVb ; T2_dVd = T4 * Cox_dVd ; T2_dVg = T4 * Cox_dVg ; T5 = Vgpz - beta_inv - Vbsz ; T5_dVb = Vgpz_dVbs - Vbsz_dVbs ; T5_dVd = Vgpz_dVds - Vbsz_dVds ; T5_dVg = Vgpz_dVgs ; T0 = 2.0 / T2 ; T1 = 1.0e0 + T0 * T5 ; T1_dVb = ( T5_dVb * T2 - T5 * T2_dVb ) * T0 / T2 ; T1_dVd = ( T5_dVd * T2 - T5 * T2_dVd ) * T0 / T2 ; T1_dVg = ( T5_dVg * T2 - T5 * T2_dVg ) * T0 / T2 ; Fn_SZ( T1 , T1 , 0.05 , T9 ) ; T1 += small ; T1_dVb *= T9 ; T1_dVd *= T9 ; T1_dVg *= T9 ; T3 = sqrt( T1 ) ; T3_dVb = 0.5 / T3 * T1_dVb ; T3_dVd = 0.5 / T3 * T1_dVd ; T3_dVg = 0.5 / T3 * T1_dVg ; T10 = Vgpz + T2 * ( 1.0e0 - T3 ) ; T10_dVb = Vgpz_dVbs + T2_dVb * ( 1.0e0 - T3 ) - T2 * T3_dVb ; T10_dVd = Vgpz_dVds + T2_dVd * ( 1.0e0 - T3 ) - T2 * T3_dVd ; T10_dVg = Vgpz_dVgs + T2_dVg * ( 1.0e0 - T3 ) - T2 * T3_dVg ; Fn_SZ( T10 , T10 , 0.01 , T0 ) ; T10 += epsm10 ; T10_dVb *= T0 ; T10_dVd *= T0 ; T10_dVg *= T0 ; T1 = Vds / T10 ; T2 = Fn_Pow( T1 , here->HSM2_ddlt - 1.0e0 ) ; T7 = T2 * T1 ; T0 = here->HSM2_ddlt * T2 / ( T10 * T10 ) ; T7_dVb = T0 * ( - Vds * T10_dVb ) ; T7_dVd = T0 * ( T10 - Vds * T10_dVd ) ; T7_dVg = T0 * ( - Vds * T10_dVg ) ; T3 = 1.0 + T7 ; T4 = Fn_Pow( T3 , 1.0 / here->HSM2_ddlt - 1.0 ) ; T6 = T4 * T3 ; T0 = T4 / here->HSM2_ddlt ; T6_dVb = T0 * T7_dVb ; T6_dVd = T0 * T7_dVd ; T6_dVg = T0 * T7_dVg ; Vdseff = Vds / T6 ; T0 = 1.0 / ( T6 * T6 ) ; Vdseff_dVbs = - Vds * T6_dVb * T0 ; Vdseff_dVds = ( T6 - Vds * T6_dVd ) * T0 ; Vdseff_dVgs = - Vds * T6_dVg * T0 ; Vds = Vdseff ; /* Vdseff (end) */ exp_bVbsVds = exp( beta * ( Vbs - Vds ) ) ; /*---------------------------------------------------* * Skip Psl calculation when Vds is very small. *-----------------*/ if ( Vds <= 0.0 ) { Pds = 0.0 ; Psl = Ps0 ; flg_conv = 1 ; goto start_of_loopl ; } /*-----------------------------------------------------------* * Initial guess for Pds ( = Psl - Ps0 ). *-----------------*/ if ( flg_pprv >= 1 ) { /*---------------------------------------------------* * Use previous value. *-----------------*/ T1 = Pds_dVbs * dVbs + Pds_dVds * dVds + Pds_dVgs * dVgs ; Pds_ini = Pds + T1 ; if ( flg_pprv == 2 ) { /* TX_dVxs = d^2 Pds / d Vxs^2 here */ if ( Vbsc_dif2 > epsm10 ) { TX_dVbs = ( here->HSM2_pds_dvbs_prv - here->HSM2_pds_dvbs_prv2 ) / Vbsc_dif2 ; } else { TX_dVbs = 0.0 ; } if ( Vdsc_dif2 > epsm10 ) { TX_dVds = ( here->HSM2_pds_dvds_prv - here->HSM2_pds_dvds_prv2 ) / Vdsc_dif2 ; } else { TX_dVds = 0.0 ; } if ( Vgsc_dif2 > epsm10 ) { TX_dVgs = ( here->HSM2_pds_dvgs_prv - here->HSM2_pds_dvgs_prv2 ) / Vgsc_dif2 ; } else { TX_dVgs = 0.0 ; } T2 = ( dVbs * dVbs ) / 2 * TX_dVbs + ( dVds * dVds ) / 2 * TX_dVds + ( dVgs * dVgs ) / 2 * TX_dVgs ; if ( fabs( T2 ) < fabs( 0.5 * T1 ) ) { Pds_ini += T2 ; } else { flg_pprv = 1 ; } } T1 = Pds_ini - Pds ; if ( T1 < - dP_max || T1 > dP_max ) flg_pprv = 0 ; /* flag changes */ } /* end of (flg_pprv>=1) if-block */ if ( flg_pprv == 0 ) { /*---------------------------------------------------* * Analytical initial guess. *-----------------*/ Pds_max = Fn_Max( Psl_lim - Ps0 , 0.0e0 ) ; Fn_SU( Pds_ini , Vds, (1.0e0 + c_pslini_1) * Pds_max, c_pslini_2, T1 ) ; Pds_ini = Fn_Min( Pds_ini , Pds_max ) ; } if ( Pds_ini < 0.0 ) Pds_ini = 0.0 ; else if ( Pds_ini > Vds ) Pds_ini = Vds ; /*---------------------------------------------------* * Assign initial guess. *-----------------*/ if ( NNN == 0 ) { Pds = Pds_ini ; Psl = Ps0 + Pds ; } else { /* take solution from previous PS0_SCE_loop as initial value */ Pds = Psl - Ps0 ; } TX = Vbs + ps_conv / 2 ; if ( Psl < TX ) Psl = TX ; /*---------------------------------------------------* * Calculation of Psl by solving Poisson eqn. * (beginning of Newton loop) * - Fsl : Fsl = 0 is the equation to be solved. * - dPsl : correction value. *-----------------*/ flg_conv = 0 ; /*---------------------------------------------------* * start of Psl calculation. (label) *-----------------*/ start_of_loopl: for ( lp_sl = 1 ; lp_sl <= lp_sl_max + 1 ; lp_sl ++ ) { Chi = beta * ( Psl - Vbs ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D2. (Psl) * - Qb0 is approximated to 5-degree polynomial. *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; cfs1 = cnst1 * exp_bVbsVds ; fsl1 = cfs1 * fi * fi ; fsl1_dPsl = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fsl2 = sqrt( fb * fb + fsl1 ) ; fsl2_dPsl = ( beta * fb_dChi * 2 * fb + fsl1_dPsl ) / ( fsl2 + fsl2 ) ; } else { /*-------------------------------------------* * zone-D3. (Psl) *-----------------*/ Rho = beta * ( Psl - Vds ) ; exp_Rho = exp( Rho ) ; fsl1 = cnst1 * ( exp_Rho - exp_bVbsVds ) ; fsl1_dPsl = cnst1 * beta * ( exp_Rho ) ; Xil = Chi - 1.0e0 ; fsl2 = sqrt( Xil + fsl1 ) ; fsl2_dPsl = ( beta + fsl1_dPsl ) / ( fsl2 + fsl2 ) ; } Fsl = Vgp - Psl - fac1 * fsl2 ; Fsl_dPsl = - 1.0e0 - fac1 * fsl2_dPsl ; if ( flg_conv == 1 ) break ; dPsl = - Fsl / Fsl_dPsl ; /*-------------------------------------------* * Update Psl . * - clamped to Vbs if Psl < Vbs . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Psl))) ; if ( fabs( dPsl ) > dPlim ) dPsl = dPlim * Fn_Sgn( dPsl ) ; Psl = Psl + dPsl ; TX = Vbs + ps_conv / 2 ; if ( Psl < TX ) Psl = TX ; /*-------------------------------------------* * Check convergence. * NOTE: This condition may be too rigid. *-----------------*/ if ( fabs( dPsl ) <= ps_conv && fabs( Fsl ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Psl Newton loop */ /* Eliminate loop count to take account of the derivative loop */ lp_sl -- ; /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM): Went Over Iteration Maximum (Psl)\n" ) ; fprintf( stderr , " Vbse = %7.3f Vdse = %7.3f Vgse = %7.3f\n" , Vbse , Vdse , Vgse ) ; if ( flg_info >= 2 ) { printf("*** warning(HiSIM): Went Over Iteration Maximum (Psl)\n" ) ; } } /*---------------------------------------------------* * Evaluate derivatives of Psl. * - note: Here, fsl1_dVbs and fsl2_dVbs are derivatives * w.r.t. explicit Vbs. So, Psl in the fsl1 and fsl2 * expressions is regarded as a constant. *-----------------*/ if ( Chi < znbd5 ) { T1 = cfs1 * beta * fi ; fsl1_dVbs = T1 * ( ( 1.0 - Vdseff_dVbs ) * fi - 2.0 * fi_dChi ) ; fsl1_dVds = - T1 * fi * Vdseff_dVds ; fsl1_dVgs = - T1 * fi * Vdseff_dVgs ; T2 = 0.5 / fsl2 ; fsl2_dVbs = ( - beta * fb_dChi * 2 * fb + fsl1_dVbs ) * T2 ; fsl2_dVds = fsl1_dVds * T2 ; fsl2_dVgs = fsl1_dVgs * T2 ; } else { T1 = cnst1 * beta ; fsl1_dVbs = - T1 * ( exp_Rho * Vdseff_dVbs + ( 1.0 - Vdseff_dVbs ) * exp_bVbsVds ); fsl1_dVds = - T1 * Vdseff_dVds * ( exp_Rho - exp_bVbsVds ); fsl1_dVgs = T1 * Vdseff_dVgs * ( - exp_Rho + exp_bVbsVds ); T2 = 0.5e0 / fsl2 ; fsl2_dVbs = ( - beta + fsl1_dVbs ) * T2 ; fsl2_dVds = ( fsl1_dVds ) * T2 ; fsl2_dVgs = ( fsl1_dVgs ) * T2 ; } T1 = 1.0 / Fsl_dPsl ; Psl_dVbs = - ( Vgp_dVbs - ( fac1 * fsl2_dVbs + fac1_dVbs * fsl2 ) ) * T1 ; Psl_dVds = - ( Vgp_dVds - ( fac1 * fsl2_dVds + fac1_dVds * fsl2 ) ) * T1 ; Psl_dVgs = - ( Vgp_dVgs - ( fac1 * fsl2_dVgs + fac1_dVgs * fsl2 ) ) * T1 ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Psl) *-----------------*/ Xil = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xil_dVbs = T1 * ( Psl_dVbs - 1.0 ) ; Xil_dVds = T1 * Psl_dVds ; Xil_dVgs = T1 * Psl_dVgs ; Xilp12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xilp12_dVbs = T1 * ( Psl_dVbs - 1.0 ) ; Xilp12_dVds = T1 * Psl_dVds ; Xilp12_dVgs = T1 * Psl_dVgs ; Xilp32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xilp32_dVbs = T1 * ( Psl_dVbs - 1.0 ) ; Xilp32_dVds = T1 * Psl_dVds ; Xilp32_dVgs = T1 * Psl_dVgs ; } else { /*-------------------------------------------* * zone-D3. (Psl) *-----------------*/ Xil = Chi - 1.0e0 ; Xil_dVbs = beta * ( Psl_dVbs - 1.0e0 ) ; Xil_dVds = beta * Psl_dVds ; Xil_dVgs = beta * Psl_dVgs ; Xilp12 = sqrt( Xil ) ; T1 = 0.5e0 / Xilp12 ; Xilp12_dVbs = T1 * Xil_dVbs ; Xilp12_dVds = T1 * Xil_dVds ; Xilp12_dVgs = T1 * Xil_dVgs ; Xilp32 = Xil * Xilp12 ; T1 = 1.5e0 * Xilp12 ; Xilp32_dVbs = T1 * Xil_dVbs ; Xilp32_dVds = T1 * Xil_dVds ; Xilp32_dVgs = T1 * Xil_dVgs ; } /*---------------------------------------------------* * Assign Pds. *-----------------*/ Pds = Psl - Ps0 ; if ( Pds < 0.0 ) { Pds = 0.0 ; Psl = Ps0 ; } Pds_dVbs = Psl_dVbs - Ps0_dVbs ; Pds_dVds = Psl_dVds - Ps0_dVds ; Pds_dVgs = Psl_dVgs - Ps0_dVgs ; if ( Pds < ps_conv ) { Pds_dVbs = 0.0 ; Pds_dVgs = 0.0 ; Psl_dVbs = Ps0_dVbs ; Psl_dVgs = Ps0_dVgs ; } /* Vdseff */ Vds = Vdsorg; if( corecip ){ /* For multi level Newton method to calculate PS0Z_SCE */ /* remember that for the inner Newton: */ /* Fs0(PS0Z_SCE,Ps0) = Vgp(PSOZ_SCE) - Ps0 - fac1 * fs02(Ps0) */ /* -> dPs0/dPS0Z_SCE = - (dFs0/dPS0Z_SCE) / (dFs0/dPs0) */ /* and */ /* Fsl(PS0Z_SCE,Psl) = Vgp(PS0Z_SCE) - Psl - fac1 * fsl1(Psl) */ /* -> dPsl/dPS0Z_SCE = - (dFsl/dPS0Z_SCE) / (dFsl/dPsl) */ /* Outer Newton: */ /* PS0Z_SCE = Ps0 + Pzadd(Ps0,Psl) */ /* -> G(PS0Z_SCE) := PS0Z_SCE - Ps0(PS0Z_SCE) - Pzadd(Ps0(PS0Z_SCE),Psl(Ps0Z_SCE)) = 0 */ /* -> Newton correction delta_PS0Z_SCE from: */ /* (1.0 - dPs0/dPS0Z_SCE - dPzadd/dPS0Z_SCE) * delta_PS0Z_SCE = - G */ Fs0_dPS0Z = Vgp_dPS0Z ; Ps0_dPS0Z = - Fs0_dPS0Z / Fs0_dPs0 ; Fsl_dPS0Z = Vgp_dPS0Z ; Psl_dPS0Z = - Fsl_dPS0Z / Fsl_dPsl ; if ( Pds < ps_conv ) { Pds_dPS0Z = 0.0 ; } else { Pds_dPS0Z = Psl_dPS0Z - Ps0_dPS0Z ; } T1 = ( Vds - Pds ) / 2 ; Fn_SymAdd( Pzadd , T1 , model->HSM2_pzadd0 , T2 ) ; T2 /= 2 ; Pzadd_dVbs = T2 * ( - Pds_dVbs ) ; Pzadd_dVds = T2 * ( 1.0 - Pds_dVds ) ; Pzadd_dVgs = T2 * ( - Pds_dVgs ) ; Pzadd_dPS0Z = T2 * ( - Pds_dPS0Z) ; if ( Pzadd < epsm10 ) { Pzadd = epsm10 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = 0.0 ; Pzadd_dVgs = 0.0 ; Pzadd_dPS0Z = 0.0 ; } Ps0z = Ps0 + Pzadd ; Ps0z_dVbs = Ps0_dVbs + Pzadd_dVbs ; Ps0z_dVds = Ps0_dVds + Pzadd_dVds ; Ps0z_dVgs = Ps0_dVgs + Pzadd_dVgs ; Ps0z_dPS0Z = Ps0_dPS0Z + Pzadd_dPS0Z ; /* calculate Newton correction: */ G = PS0Z_SCE - Ps0z ; delta_PS0Z_SCE = - G / (1.0 - Ps0z_dPS0Z) ; delta_PS0Z_SCE_dVbs = Ps0z_dVbs - PS0Z_SCE_dVbs; delta_PS0Z_SCE_dVds = Ps0z_dVds - PS0Z_SCE_dVds; delta_PS0Z_SCE_dVgs = Ps0z_dVgs - PS0Z_SCE_dVgs; PS0Z_SCE += delta_PS0Z_SCE ; PS0Z_SCE_dVbs = Ps0z_dVbs ; PS0Z_SCE_dVds = Ps0z_dVds ; PS0Z_SCE_dVgs = Ps0z_dVgs ; PS0_SCE = PS0Z_SCE - Pzadd ; PS0_SCE_dVbs = Ps0_dVbs ; PS0_SCE_dVds = Ps0_dVds ; PS0_SCE_dVgs = Ps0_dVgs ; NNN += 1 ; if( ( fabs(delta_PS0Z_SCE) > PS0_SCE_tol || fabs(delta_PS0Z_SCE_dVbs) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVds) > PS0_SCE_deriv_tol || fabs(delta_PS0Z_SCE_dVgs) > PS0_SCE_deriv_tol ) && (NNN < MAX_LOOP_SCE) ){ goto START_OF_SCE_LOOP; } } /*-----------------------------------------------------------* * Evaluate Idd. * - Eta : substantial variable of QB'/Pds and Idd/Pds. * - note: Eta = 4 * GAMMA_{hisim_0} *-----------------*/ T1 = beta / Xi0 ; Eta = T1 * Pds ; T2 = Eta * beta_inv ; Eta_dVbs = T1 * ( Pds_dVbs - Xi0_dVbs * T2 ) ; Eta_dVds = T1 * ( Pds_dVds - Xi0_dVds * T2 ) ; Eta_dVgs = T1 * ( Pds_dVgs - Xi0_dVgs * T2 ) ; /* ( Eta + 1 )^n */ Eta1 = Eta + 1.0e0 ; Eta1p12 = sqrt( Eta1 ) ; Eta1p32 = Eta1p12 * Eta1 ; Eta1p52 = Eta1p32 * Eta1 ; /* 1 / ( ( Eta + 1 )^n + 1 ) */ Zeta12 = 1.0e0 / ( Eta1p12 + 1.0e0 ) ; Zeta32 = 1.0e0 / ( Eta1p32 + 1.0e0 ) ; Zeta52 = 1.0e0 / ( Eta1p52 + 1.0e0 ) ; /*---------------------------------------------------* * F00 := PS00/Pds (n=1/2) *-----------------*/ F00 = Zeta12 / Xi0p12 ; T3 = - 1 / Xi0 ; T4 = - 0.5e0 / Eta1p12 * F00 ; T5 = Zeta12 * T3 ; T6 = Zeta12 * T4 ; F00_dVbs = ( Xi0p12_dVbs * T5 + Eta_dVbs * T6 ) ; F00_dVds = ( Xi0p12_dVds * T5 + Eta_dVds * T6 ) ; F00_dVgs = ( Xi0p12_dVgs * T5 + Eta_dVgs * T6 ) ; /*---------------------------------------------------* * F10 := PS10/Pds (n=3/2) *-----------------*/ T1 = 3.0e0 + Eta * ( 3.0e0 + Eta ) ; F10 = C_2o3 * Xi0p12 * Zeta32 * T1 ; T2 = 3.0e0 + Eta * 2.0e0 ; T3 = C_2o3 * T1 ; T4 = - 1.5e0 * Eta1p12 * F10 + C_2o3 * Xi0p12 * T2 ; T5 = Zeta32 * T3 ; T6 = Zeta32 * T4 ; F10_dVbs = ( Xi0p12_dVbs * T5 + Eta_dVbs * T6 ) ; F10_dVds = ( Xi0p12_dVds * T5 + Eta_dVds * T6 ) ; F10_dVgs = ( Xi0p12_dVgs * T5 + Eta_dVgs * T6 ) ; /*---------------------------------------------------* * F30 := PS30/Pds (n=5/2) *-----------------*/ T1 = 5e0 + Eta * ( 10e0 + Eta * ( 10e0 + Eta * ( 5e0 + Eta ) ) ) ; F30 = 4e0 / ( 15e0 * beta ) * Xi0p32 * Zeta52 * T1 ; T2 = 10e0 + Eta * ( 20e0 + Eta * ( 15e0 + Eta * 4e0 ) ) ; T3 = 4e0 / ( 15e0 * beta ) * T1 ; T4 = - ( 5e0 / 2e0 ) * Eta1p32 * F30 + 4e0 / ( 15e0 * beta ) * Xi0p32 * T2 ; T5 = Zeta52 * T3 ; T6 = Zeta52 * T4 ; F30_dVbs = ( Xi0p32_dVbs * T5 + Eta_dVbs * T6 ) ; F30_dVds = ( Xi0p32_dVds * T5 + Eta_dVds * T6 ) ; F30_dVgs = ( Xi0p32_dVgs * T5 + Eta_dVgs * T6 ) ; /*---------------------------------------------------* * F11 := PS11/Pds. *-----------------*/ F11 = Ps0 * F10 + C_2o3 * beta_inv * Xilp32 - F30 ; T1 = C_2o3 * beta_inv ; F11_dVbs = Ps0_dVbs * F10 + Ps0 * F10_dVbs + T1 * Xilp32_dVbs - F30_dVbs ; F11_dVds = Ps0_dVds * F10 + Ps0 * F10_dVds + T1 * Xilp32_dVds - F30_dVds ; F11_dVgs = Ps0_dVgs * F10 + Ps0 * F10_dVgs + T1 * Xilp32_dVgs - F30_dVgs ; /*---------------------------------------------------* * Fdd := Idd/Pds. *-----------------*/ T1 = Vgp + beta_inv - 0.5e0 * ( 2.0e0 * Ps0 + Pds ) ; T2 = - F10 + F00 ; T3 = beta * Cox ; T4 = beta * cnst0 ; Fdd = T3 * T1 + T4 * T2 ; Fdd_dVbs = T3 * ( Vgp_dVbs - Ps0_dVbs - 0.5e0 * Pds_dVbs ) + beta * Cox_dVb * T1 + T4 * ( - F10_dVbs + F00_dVbs ) ; Fdd_dVds = T3 * ( Vgp_dVds - Ps0_dVds - 0.5e0 * Pds_dVds ) + beta * Cox_dVd * T1 + T4 * ( - F10_dVds + F00_dVds ) ; Fdd_dVgs = T3 * ( Vgp_dVgs - Ps0_dVgs - 0.5e0 * Pds_dVgs ) + beta * Cox_dVg * T1 + T4 * ( - F10_dVgs + F00_dVgs ) ; /*---------------------------------------------------* * Idd: *-----------------*/ Idd = Pds * Fdd ; Idd_dVbs = Pds_dVbs * Fdd + Pds * Fdd_dVbs ; Idd_dVds = Pds_dVds * Fdd + Pds * Fdd_dVds ; Idd_dVgs = Pds_dVgs * Fdd + Pds * Fdd_dVgs ; /*-----------------------------------------------------------* * Skip CLM and integrated charges if zone==D1 *-----------------*/ if( flg_zone == 1 ) { goto start_of_mobility ; } /*-----------------------------------------------------------* * Channel Length Modulation. Lred: \Delta L *-----------------*/ if( pParam->HSM2_clm2 < epsm10 && pParam->HSM2_clm3 < epsm10 ) { Lred = 0.0e0 ; Lred_dVbs = 0.0e0 ; Lred_dVds = 0.0e0 ; Lred_dVgs = 0.0e0 ; Psdl = Psl ; Psdl_dVbs = Psl_dVbs ; Psdl_dVds = Psl_dVds ; Psdl_dVgs = Psl_dVgs ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; } } else { T1 = here->HSM2_wdpl ; T8 = sqrt (Psl - Vbs) ; Wd = T1 * T8 ; T9 = 0.5 * T1 / T8 ; Wd_dVbs = T9 * (Psl_dVbs - 1.0) ; Wd_dVds = T9 * Psl_dVds ; Wd_dVgs = T9 * Psl_dVgs ; T0 = 1.0 / Wd ; T1 = Qn0 * T0 ; T2 = pParam->HSM2_clm3 * T1 ; T3 = pParam->HSM2_clm3 * T0 ; T2_dVb = T3 * (Qn0_dVbs - T1 * Wd_dVbs) ; T2_dVd = T3 * (Qn0_dVds - T1 * Wd_dVds) ; T2_dVg = T3 * (Qn0_dVgs - T1 * Wd_dVgs) ; T5 = pParam->HSM2_clm2 * q_Nsub + T2 ; T1 = 1.0 / T5 ; T4 = C_ESI * T1 ; T4_dVb = - T4 * T2_dVb * T1 ; T4_dVd = - T4 * T2_dVd * T1 ; T4_dVg = - T4 * T2_dVg * T1 ; T1 = (1.0e0 - pParam->HSM2_clm1) ; Psdl = pParam->HSM2_clm1 * (Vds + Ps0) + T1 * Psl ; Psdl_dVbs = pParam->HSM2_clm1 * Ps0_dVbs + T1 * Psl_dVbs ; Psdl_dVds = pParam->HSM2_clm1 * (1.0 + Ps0_dVds) + T1 * Psl_dVds ; Psdl_dVgs = pParam->HSM2_clm1 * Ps0_dVgs + T1 * Psl_dVgs ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; } T6 = Psdl - Psl ; T6_dVb = Psdl_dVbs - Psl_dVbs ; T6_dVd = Psdl_dVds - Psl_dVds ; T6_dVg = Psdl_dVgs - Psl_dVgs ; T3 = beta * Qn0 ; T1 = 1.0 / T3 ; T5 = Idd * T1 ; T2 = T5 * beta ; T5_dVb = (Idd_dVbs - T2 * Qn0_dVbs) * T1 ; T5_dVd = (Idd_dVds - T2 * Qn0_dVds) * T1 ; T5_dVg = (Idd_dVgs - T2 * Qn0_dVgs) * T1 ; T10 = q_Nsub / C_ESI ; T1 = C_E0_p2 ; // E0^2 T2 = 1.0 / Leff ; T11 = (2.0 * T5 + 2.0 * T10 * T6 * T4 + T1 * T4) * T2 ; T3 = T2 * T4 ; T7 = T11 * T4 ; T7_dVb = (2.0 * T5_dVb + 2.0 * T10 * (T6_dVb * T4 + T6 * T4_dVb) + T1 * T4_dVb) * T3 + T11 * T4_dVb ; T7_dVd = (2.0 * T5_dVd + 2.0 * T10 * (T6_dVd * T4 + T6 * T4_dVd) + T1 * T4_dVd) * T3 + T11 * T4_dVd ; T7_dVg = (2.0 * T5_dVg + 2.0 * T10 * (T6_dVg * T4 + T6 * T4_dVg) + T1 * T4_dVg) * T3 + T11 * T4_dVg ; T11 = 4.0 * (2.0 * T10 * T6 + T1) ; T1 = 8.0 * T10 * T4 * T4 ; T2 = 2.0 * T11 * T4 ; T8 = T11 * T4 * T4 ; T8_dVb = ( T1 * T6_dVb + T2 * T4_dVb) ; T8_dVd = ( T1 * T6_dVd + T2 * T4_dVd) ; T8_dVg = ( T1 * T6_dVg + T2 * T4_dVg) ; T9 = sqrt (T7 * T7 + T8); T1 = 1.0 / T9 ; T2 = T7 * T1 ; T3 = 0.5 * T1 ; T9_dVb = (T2 * T7_dVb + T3 * T8_dVb) ; T9_dVd = (T2 * T7_dVd + T3 * T8_dVd) ; T9_dVg = (T2 * T7_dVg + T3 * T8_dVg) ; Lred = 0.5 * (- T7 + T9) ; Lred_dVbs = 0.5 * (- T7_dVb + T9_dVb) ; Lred_dVds = 0.5 * (- T7_dVd + T9_dVd) ; Lred_dVgs = 0.5 * (- T7_dVg + T9_dVg) ; /*---------------------------------------------------* * Modify Lred for symmetry. *-----------------*/ T1 = Lred ; Lred = FMDVDS * T1 ; Lred_dVbs = FMDVDS_dVbs * T1 + FMDVDS * Lred_dVbs ; Lred_dVds = FMDVDS_dVds * T1 + FMDVDS * Lred_dVds ; Lred_dVgs = FMDVDS_dVgs * T1 + FMDVDS * Lred_dVgs ; } /* CLM5 & CLM6 */ Lred *= here->HSM2_clmmod ; Lred_dVbs *= here->HSM2_clmmod ; Lred_dVds *= here->HSM2_clmmod ; Lred_dVgs *= here->HSM2_clmmod ; /*---------------------------------------------------* * Qbu : -Qb in unit area. *-----------------*/ T1 = Vgp + beta_inv ; T2 = T1 * F10 - F11 ; Qbnm = cnst0 * ( cnst0 * ( 1.5e0 - ( Xi0 + 1.0e0 ) - 0.5e0 * beta * Pds ) + Cox * T2 ) ; Qbnm_dVbs = cnst0 * ( cnst0 * ( - Xi0_dVbs - 0.5e0 * beta * Pds_dVbs ) + Cox * ( Vgp_dVbs * F10 + T1 * F10_dVbs - F11_dVbs ) + Cox_dVb * T2 ) ; Qbnm_dVds = cnst0 * ( cnst0 * ( - Xi0_dVds - 0.5e0 * beta * Pds_dVds ) + Cox * ( Vgp_dVds * F10 + T1 * F10_dVds - F11_dVds ) + Cox_dVd * T2 ) ; Qbnm_dVgs = cnst0 * ( cnst0 * ( - Xi0_dVgs - 0.5e0 * beta * Pds_dVgs ) + Cox * ( Vgp_dVgs * F10 + T1 * F10_dVgs - F11_dVgs ) + Cox_dVg * T2 ) ; T1 = beta ; Qbu = T1 * Qbnm / Fdd ; T2 = T1 / ( Fdd * Fdd ) ; Qbu_dVbs = T2 * ( Fdd * Qbnm_dVbs - Qbnm * Fdd_dVbs ) ; Qbu_dVds = T2 * ( Fdd * Qbnm_dVds - Qbnm * Fdd_dVds ) ; Qbu_dVgs = T2 * ( Fdd * Qbnm_dVgs - Qbnm * Fdd_dVgs ) ; /*---------------------------------------------------* * preparation for Qi and Qd. * - DtPds: Delta * Pds ; * - Achi: (1+Delta) * Pds ; *-----------------*/ T1 = 2.0e0 * fac1 ; DtPds = T1 * ( F10 - Xi0p12 ) ; T2 = 2.0 * ( F10 - Xi0p12 ) ; DtPds_dVbs = T1 * ( F10_dVbs - Xi0p12_dVbs ) + T2 * fac1_dVbs ; DtPds_dVds = T1 * ( F10_dVds - Xi0p12_dVds ) + T2 * fac1_dVds ; DtPds_dVgs = T1 * ( F10_dVgs - Xi0p12_dVgs ) + T2 * fac1_dVgs ; Achi = Pds + DtPds ; Achi_dVbs = Pds_dVbs + DtPds_dVbs ; Achi_dVds = Pds_dVds + DtPds_dVds ; Achi_dVgs = Pds_dVgs + DtPds_dVgs ; /*-----------------------------------------------------------* * Alpha : parameter to evaluate charges. * - Achi: (1+Delta) * Pds ; * - clamped to 0 if Alpha < 0. *-----------------*/ T1 = 1.0 / VgVt ; T2 = Achi * T1 ; T3 = 1.0e0 - T2 ; TX = 1.0 - T3 ; Fn_CP( TY , TX , 1.0 , 4 , T4 ) ; Alpha = 1.0 - TY ; T5 = T1 * T4 ; Alpha_dVbs = - ( Achi_dVbs - T2 * VgVt_dVbs ) * T5 ; Alpha_dVds = - ( Achi_dVds - T2 * VgVt_dVds ) * T5 ; Alpha_dVgs = - ( Achi_dVgs - T2 * VgVt_dVgs ) * T5 ; /*-----------------------------------------------------------* * Qiu : -Qi in unit area. *-----------------*/ Qinm = 1.0e0 + Alpha * ( 1.0e0 + Alpha ) ; T1 = 1.0e0 + Alpha + Alpha ; Qinm_dVbs = Alpha_dVbs * T1 ; Qinm_dVds = Alpha_dVds * T1 ; Qinm_dVgs = Alpha_dVgs * T1 ; Qidn = Fn_Max( 1.0e0 + Alpha , epsm10 ) ; Qidn_dVbs = Alpha_dVbs ; Qidn_dVds = Alpha_dVds ; Qidn_dVgs = Alpha_dVgs ; T1 = C_2o3 * VgVt * Qinm / Qidn ; Qiu = T1 * Cox ; T2 = 1.0 / VgVt ; T3 = 1.0 / Qinm ; T4 = 1.0 / Qidn ; Qiu_dVbs = Qiu * ( VgVt_dVbs * T2 + Qinm_dVbs * T3 - Qidn_dVbs * T4 ) + T1 * Cox_dVb ; Qiu_dVds = Qiu * ( VgVt_dVds * T2 + Qinm_dVds * T3 - Qidn_dVds * T4) + T1 * Cox_dVd ; Qiu_dVgs = Qiu * ( VgVt_dVgs * T2 + Qinm_dVgs * T3 - Qidn_dVgs * T4) + T1 * Cox_dVg ; /*-----------------------------------------------------------* * Qdrat : Qd/Qi *-----------------*/ Qdnm = 0.5e0 + Alpha ; Qdnm_dVbs = Alpha_dVbs ; Qdnm_dVds = Alpha_dVds ; Qdnm_dVgs = Alpha_dVgs ; Qddn = Qidn * Qinm ; Qddn_dVbs = Qidn_dVbs * Qinm + Qidn * Qinm_dVbs ; Qddn_dVds = Qidn_dVds * Qinm + Qidn * Qinm_dVds ; Qddn_dVgs = Qidn_dVgs * Qinm + Qidn * Qinm_dVgs ; Quot = 0.4e0 * Qdnm / Qddn ; Qdrat = 0.6e0 - Quot ; if ( Qdrat <= 0.5e0 ) { T1 = 1.0 / Qddn ; T2 = 1.0 / Qdnm ; Qdrat_dVbs = Quot * ( Qddn_dVbs * T1 - Qdnm_dVbs * T2 ) ; Qdrat_dVds = Quot * ( Qddn_dVds * T1 - Qdnm_dVds * T2 ) ; Qdrat_dVgs = Quot * ( Qddn_dVgs * T1 - Qdnm_dVgs * T2 ) ; } else { Qdrat = 0.5e0 ; Qdrat_dVbs = 0.0e0 ; Qdrat_dVds = 0.0e0 ; Qdrat_dVgs = 0.0e0 ; } /*-----------------------------------------------------------* * Interpolate charges and CLM for zone-D2. *-----------------*/ if ( flg_zone == 2 ) { T1 = Qbu ; Qbu = FD2 * Qbu + ( 1.0 - FD2 ) * Qb0 ; Qbu_dVbs = FD2 * Qbu_dVbs + FD2_dVbs * T1 + ( 1.0 - FD2 ) * Qb0_dVb - FD2_dVbs * Qb0 ; Qbu_dVds = FD2 * Qbu_dVds + FD2_dVds * T1 + ( 1.0 - FD2 ) * Qb0_dVd - FD2_dVds * Qb0 ; Qbu_dVgs = FD2 * Qbu_dVgs + FD2_dVgs * T1 + ( 1.0 - FD2 ) * Qb0_dVg - FD2_dVgs * Qb0 ; if ( Qbu < 0.0 ) { Qbu = 0.0 ; Qbu_dVbs = 0.0 ; Qbu_dVds = 0.0 ; Qbu_dVgs = 0.0 ; } T1 = Qiu ; Qiu = FD2 * Qiu + ( 1.0 - FD2 ) * Qn0 ; Qiu_dVbs = FD2 * Qiu_dVbs + FD2_dVbs * T1 + ( 1.0 - FD2 ) * Qn0_dVbs - FD2_dVbs * Qn0 ; Qiu_dVds = FD2 * Qiu_dVds + FD2_dVds * T1 + ( 1.0 - FD2 ) * Qn0_dVds - FD2_dVds * Qn0 ; Qiu_dVgs = FD2 * Qiu_dVgs + FD2_dVgs * T1 + ( 1.0 - FD2 ) * Qn0_dVgs - FD2_dVgs * Qn0 ; if ( Qiu < 0.0 ) { Qiu = 0.0 ; Qiu_dVbs = 0.0 ; Qiu_dVds = 0.0 ; Qiu_dVgs = 0.0 ; } T1 = Qdrat ; Qdrat = FD2 * Qdrat + ( 1.0 - FD2 ) * 0.5e0 ; Qdrat_dVbs = FD2 * Qdrat_dVbs + FD2_dVbs * T1 - FD2_dVbs * 0.5e0 ; Qdrat_dVds = FD2 * Qdrat_dVds + FD2_dVds * T1 - FD2_dVds * 0.5e0 ; Qdrat_dVgs = FD2 * Qdrat_dVgs + FD2_dVgs * T1 - FD2_dVgs * 0.5e0 ; /* note: Lred=0 in zone-D1 */ T1 = Lred ; Lred = FD2 * Lred ; Lred_dVbs = FD2 * Lred_dVbs + FD2_dVbs * T1 ; Lred_dVds = FD2 * Lred_dVds + FD2_dVds * T1 ; Lred_dVgs = FD2 * Lred_dVgs + FD2_dVgs * T1 ; } /* end of flg_zone==2 if-block */ start_of_mobility: Lch = Leff - Lred ; if ( Lch < 1.0e-9 ) { Lch = 1.0e-9 ; Lch_dVbs = Lch_dVds = Lch_dVgs = 0.0 ; } else { Lch_dVbs = - Lred_dVbs ; Lch_dVds = - Lred_dVds ; Lch_dVgs = - Lred_dVgs ; } /*-----------------------------------------------------------* * Modified potential for symmetry. *-----------------*/ T1 = ( Vds - Pds ) / 2 ; Fn_SymAdd( Pzadd , T1 , model->HSM2_pzadd0 , T2 ) ; T2 /= 2 ; Pzadd_dVbs = T2 * ( - Pds_dVbs ) ; Pzadd_dVds = T2 * ( 1.0 - Pds_dVds ) ; Pzadd_dVgs = T2 * ( - Pds_dVgs ) ; if ( Pzadd < epsm10 ) { Pzadd = epsm10 ; Pzadd_dVbs = 0.0 ; Pzadd_dVds = 0.0 ; Pzadd_dVgs = 0.0 ; } Ps0z = Ps0 + Pzadd ; Ps0z_dVbs = Ps0_dVbs + Pzadd_dVbs ; Ps0z_dVds = Ps0_dVds + Pzadd_dVds ; Ps0z_dVgs = Ps0_dVgs + Pzadd_dVgs ; /*-----------------------------------------------------------* * Muun : universal mobility. (CGS unit) *-----------------*/ T1 = here->HSM2_ndep_o_esi ; T2 = here->HSM2_ninv_o_esi ; T0 = model->HSM2_ninvd ; T4 = 1.0 + ( Psl - Ps0 ) * T0 ; T4_dVb = ( Psl_dVbs - Ps0_dVbs ) * T0 ; T4_dVd = ( Psl_dVds - Ps0_dVds ) * T0 ; T4_dVg = ( Psl_dVgs - Ps0_dVgs ) * T0 ; T5 = T1 * Qbu + T2 * Qiu ; T5_dVb = T1 * Qbu_dVbs + T2 * Qiu_dVbs ; T5_dVd = T1 * Qbu_dVds + T2 * Qiu_dVds ; T5_dVg = T1 * Qbu_dVgs + T2 * Qiu_dVgs ; T3 = T5 / T4 ; T3_dVb = ( - T4_dVb * T5 + T4 * T5_dVb ) / T4 / T4 ; T3_dVd = ( - T4_dVd * T5 + T4 * T5_dVd ) / T4 / T4 ; T3_dVg = ( - T4_dVg * T5 + T4 * T5_dVg ) / T4 / T4 ; Eeff = T3 ; Eeff_dVbs = T3_dVb ; Eeff_dVds = T3_dVd ; Eeff_dVgs = T3_dVg ; T5 = Fn_Pow( Eeff , model->HSM2_mueph0 - 1.0e0 ) ; T8 = T5 * Eeff ; T7 = Fn_Pow( Eeff , here->HSM2_muesr - 1.0e0 ) ; T6 = T7 * Eeff ; T9 = C_QE * C_m2cm_p2 ; Rns = Qiu / T9 ; T1 = 1.0e0 / ( here->HSM2_muecb0 + here->HSM2_muecb1 * Rns / 1.0e11 ) + here->HSM2_mphn0 * T8 + T6 / pParam->HSM2_muesr1 ; Muun = 1.0e0 / T1 ; T1 = 1.0e0 / ( T1 * T1 ) ; T2 = here->HSM2_muecb0 + here->HSM2_muecb1 * Rns / 1.0e11 ; T2 = 1.0e0 / ( T2 * T2 ) ; T3 = here->HSM2_mphn1 * T5 ; T4 = here->HSM2_muesr * T7 / pParam->HSM2_muesr1 ; T5 = - 1.0e-11 * here->HSM2_muecb1 / C_QE * T2 / C_m2cm_p2 ; Muun_dVbs = - ( T5 * Qiu_dVbs + Eeff_dVbs * T3 + Eeff_dVbs * T4 ) * T1 ; Muun_dVds = - ( T5 * Qiu_dVds + Eeff_dVds * T3 + Eeff_dVds * T4 ) * T1 ; Muun_dVgs = - ( T5 * Qiu_dVgs + Eeff_dVgs * T3 + Eeff_dVgs * T4 ) * T1 ; /* Change to MKS unit */ Muun /= C_m2cm_p2 ; Muun_dVbs /= C_m2cm_p2 ; Muun_dVds /= C_m2cm_p2 ; Muun_dVgs /= C_m2cm_p2 ; /*-----------------------------------------------------------* * Mu : mobility *-----------------*/ T2 = beta * (Qn0 + small) * Lch ; T1 = 1.0e0 / T2 ; T3 = T1 * T1 ; T4 = - beta * T3 ; T5 = T4 * Lch ; T6 = T4 * (Qn0 + small) ; T1_dVb = ( T5 * Qn0_dVbs + T6 * Lch_dVbs) ; T1_dVd = ( T5 * Qn0_dVds + T6 * Lch_dVds) ; T1_dVg = ( T5 * Qn0_dVgs + T6 * Lch_dVgs) ; TY = Idd * T1 ; TY_dVbs = Idd_dVbs * T1 + Idd * T1_dVb ; TY_dVds = Idd_dVds * T1 + Idd * T1_dVd ; TY_dVgs = Idd_dVgs * T1 + Idd * T1_dVg ; T2 = 0.2 * Vmax / Muun ; T3 = - T2 / Muun ; T2_dVb = T3 * Muun_dVbs ; T2_dVd = T3 * Muun_dVds ; T2_dVg = T3 * Muun_dVgs ; Ey = sqrt( TY * TY + T2 * T2 ) ; T4 = 1.0 / Ey ; Ey_dVbs = T4 * ( TY * TY_dVbs + T2 * T2_dVb ) ; Ey_dVds = T4 * ( TY * TY_dVds + T2 * T2_dVd ) ; Ey_dVgs = T4 * ( TY * TY_dVgs + T2 * T2_dVg ) ; Em = Muun * Ey ; Em_dVbs = Muun_dVbs * Ey + Muun * Ey_dVbs ; Em_dVds = Muun_dVds * Ey + Muun * Ey_dVds ; Em_dVgs = Muun_dVgs * Ey + Muun * Ey_dVgs ; T1 = Em / Vmax ; /* note: model->HSM2_bb = 2 (electron) ;1 (hole) */ if ( 1.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 1.0e0 + epsm10 ) { T3 = 1.0e0 ; } else if ( 2.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 2.0e0 + epsm10 ) { T3 = T1 ; } else { T3 = Fn_Pow( T1 , model->HSM2_bb - 1.0e0 ) ; } T2 = T1 * T3 ; T4 = 1.0e0 + T2 ; if ( 1.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 1.0e0 + epsm10 ) { T5 = 1.0 / T4 ; T6 = T5 / T4 ; } else if ( 2.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 2.0e0 + epsm10 ) { T5 = 1.0 / sqrt( T4 ) ; T6 = T5 / T4 ; } else { T6 = Fn_Pow( T4 , ( - 1.0e0 / model->HSM2_bb - 1.0e0 ) ) ; T5 = T4 * T6 ; } T7 = Muun / Vmax * T6 * T3 ; Mu = Muun * T5 ; Mu_dVbs = Muun_dVbs * T5 - T7 * Em_dVbs ; Mu_dVds = Muun_dVds * T5 - T7 * Em_dVds ; Mu_dVgs = Muun_dVgs * T5 - T7 * Em_dVgs ; /* end_of_mobility : */ /*-----------------------------------------------------------* * Ids: channel current. *-----------------*/ betaWL = here->HSM2_weff_nf * beta_inv / Lch ; T1 = - betaWL / Lch ; betaWL_dVbs = T1 * Lch_dVbs ; betaWL_dVds = T1 * Lch_dVds ; betaWL_dVgs = T1 * Lch_dVgs ; Ids0 = betaWL * Idd * Mu ; T1 = betaWL * Idd ; T2 = Idd * Mu ; T3 = Mu * betaWL ; Ids0_dVbs = T3 * Idd_dVbs + T1 * Mu_dVbs + T2 * betaWL_dVbs ; Ids0_dVds = T3 * Idd_dVds + T1 * Mu_dVds + T2 * betaWL_dVds ; Ids0_dVgs = T3 * Idd_dVgs + T1 * Mu_dVgs + T2 * betaWL_dVgs ; /*-----------------------------------------------------------* * Adding parasitic components to the channel current. *-----------------*/ if( model->HSM2_ptl != 0 ){ T1 = 0.5 * ( Vds - Pds ) ; Fn_SymAdd( T6 , T1 , 0.01 , T2 ) ; T2 *= 0.5 ; T6_dVb = T2 * ( - Pds_dVbs ) ; T6_dVd = T2 * ( 1.0 - Pds_dVds ) ; T6_dVg = T2 * ( - Pds_dVgs ) ; T1 = 1.1 - ( Ps0 + T6 ); T1_dVb = - ( Ps0_dVbs + T6_dVb ); T1_dVd = - ( Ps0_dVds + T6_dVd ); T1_dVg = - ( Ps0_dVgs + T6_dVg ); Fn_SZ( T2 , T1 , 0.05 , T0 ) ; T2 += small ; T2_dVb = T1_dVb * T0 ; T2_dVd = T1_dVd * T0 ; T2_dVg = T1_dVg * T0 ; T0 = beta * here->HSM2_ptl0 ; T3 = Cox * T0 ; T3_dVb = Cox_dVb * T0 ; T3_dVd = Cox_dVd * T0 ; T3_dVg = Cox_dVg * T0 ; T0 = pow( T2 , model->HSM2_ptp ) ; T9 = T3 * T0 ; T9_dVb = T3 * model->HSM2_ptp * T0 / T2 * T2_dVb + T3_dVb * T0 ; T9_dVd = T3 * model->HSM2_ptp * T0 / T2 * T2_dVd + T3_dVd * T0 ; T9_dVg = T3 * model->HSM2_ptp * T0 / T2 * T2_dVg + T3_dVg * T0 ; T4 = 1.0 + Vdsz * model->HSM2_pt2 ; T4_dVb = 0.0 ; T4_dVd = Vdsz_dVds * model->HSM2_pt2 ; T4_dVg = 0.0 ; T0 = here->HSM2_pt40 ; T5 = Ps0 + T6 - Vbsz ; T5_dVb = Ps0_dVbs + T6_dVb - Vbsz_dVbs ; T5_dVd = Ps0_dVds + T6_dVd - Vbsz_dVds ; T5_dVg = Ps0_dVgs + T6_dVg ; T4 += Vdsz * T0 * T5 ; T4_dVb += Vdsz * T0 * T5_dVb ; T4_dVd += Vdsz * T0 * T5_dVd + Vdsz_dVds * T0 * T5 ; T4_dVg += Vdsz * T0 * T5_dVg ; T6 = T9 * T4 ; T9_dVb = T9_dVb * T4 + T9 * T4_dVb ; T9_dVd = T9_dVd * T4 + T9 * T4_dVd ; T9_dVg = T9_dVg * T4 + T9 * T4_dVg ; T9 = T6 ; }else{ T9 = 0.0 ; T9_dVb = 0.0 ; T9_dVd = 0.0 ; T9_dVg = 0.0 ; } if( model->HSM2_gdl != 0 ){ T1 = beta * here->HSM2_gdl0 ; T2 = Cox * T1 ; T2_dVb = Cox_dVb * T1 ; T2_dVd = Cox_dVd * T1 ; T2_dVg = Cox_dVg * T1 ; T8 = T2 * Vdsz ; T8_dVb = T2_dVb * Vdsz ; T8_dVd = T2_dVd * Vdsz + T2 * Vdsz_dVds ; T8_dVg = T2_dVg * Vdsz ; }else{ T8 = 0.0 ; T8_dVb = 0.0 ; T8_dVd = 0.0 ; T8_dVg = 0.0 ; } if ( ( T9 + T8 ) > 0.0 ) { Idd1 = Pds * ( T9 + T8 ) ; Idd1_dVbs = Pds_dVbs * ( T9 + T8 ) + Pds * ( T9_dVb + T8_dVb ) ; Idd1_dVds = Pds_dVds * ( T9 + T8 ) + Pds * ( T9_dVd + T8_dVd ) ; Idd1_dVgs = Pds_dVgs * ( T9 + T8 ) + Pds * ( T9_dVg + T8_dVg ) ; Ids0 += betaWL * Idd1 * Mu ; T1 = betaWL * Idd1 ; T2 = Idd1 * Mu ; T3 = Mu * betaWL ; Ids0_dVbs += T3 * Idd1_dVbs + T1 * Mu_dVbs + T2 * betaWL_dVbs ; Ids0_dVds += T3 * Idd1_dVds + T1 * Mu_dVds + T2 * betaWL_dVds ; Ids0_dVgs += T3 * Idd1_dVgs + T1 * Mu_dVgs + T2 * betaWL_dVgs ; } /* (note: rpock procedure was removed. (2006.04.20) */ if ( flg_rsrd == 2 ) { Rd = here->HSM2_rd ; T0 = Rd * Ids0 ; T1 = Vds + small ; T2 = 1.0 / T1 ; T3 = 1.0 + T0 * T2 ; T3_dVb = Rd * Ids0_dVbs * T2 ; T3_dVd = ( Rd * Ids0_dVds * T1 - T0 ) * T2 * T2 ; T3_dVg = Rd * Ids0_dVgs * T2 ; T4 = 1.0 / T3 ; Ids = Ids0 * T4 ; T5 = T4 * T4 ; Ids_dVbs = ( Ids0_dVbs * T3 - Ids0 * T3_dVb ) * T5 ; Ids_dVds = ( Ids0_dVds * T3 - Ids0 * T3_dVd ) * T5 ; Ids_dVgs = ( Ids0_dVgs * T3 - Ids0 * T3_dVg ) * T5 ; } else { Ids = Ids0 ; Ids_dVbs = Ids0_dVbs ; Ids_dVds = Ids0_dVds ; Ids_dVgs = Ids0_dVgs ; } if ( Pds < ps_conv ) { Ids_dVbs = 0.0 ; Ids_dVgs = 0.0 ; } Ids += Gdsmin * Vds ; Ids_dVds += Gdsmin ; /*-----------------------------------------------------------* * STI *-----------------*/ if ( model->HSM2_coisti != 0 ) { /*---------------------------------------------------* * dVthSCSTI : Short-channel effect induced by Vds (STI). *-----------------*/ T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdpl ; T3 = here->HSM2_lgatesm - model->HSM2_parl2 ; T4 = 1.0 / (T3 * T3) ; T5 = 2.0 * (model->HSM2_vbi - Pb20b) * T1 * T2 * T4 ; dVth0 = T5 * sqrt_Pbsum ; T6 = T5 * 0.5 / sqrt_Pbsum ; T7 = 2.0 * (model->HSM2_vbi - Pb20b) * C_ESI * T2 * T4 * sqrt_Pbsum ; T8 = - 2.0 * T1 * T2 * T4 * sqrt_Pbsum ; dVth0_dVb = T6 * Pbsum_dVb + T7 * Cox_inv_dVb + T8 * Pb20b_dVb ; dVth0_dVd = T6 * Pbsum_dVd + T7 * Cox_inv_dVd + T8 * Pb20b_dVd ; dVth0_dVg = T6 * Pbsum_dVg + T7 * Cox_inv_dVg + T8 * Pb20b_dVg ; T4 = pParam->HSM2_scsti1 ; T6 = pParam->HSM2_scsti2 ; T1 = T4 + T6 * Vdsz ; dVthSCSTI = dVth0 * T1 ; dVthSCSTI_dVb = dVth0_dVb * T1 ; dVthSCSTI_dVd = dVth0_dVd * T1 + dVth0 * T6 * Vdsz_dVds ; dVthSCSTI_dVg = dVth0_dVg * T1 ; T1 = pParam->HSM2_vthsti - model->HSM2_vdsti * Vds ; T1_dVd = - model->HSM2_vdsti ; Vgssti = Vgsz - Vfb + T1 + dVthSCSTI ; Vgssti_dVbs = dVthSCSTI_dVb ; Vgssti_dVds = Vgsz_dVds + T1_dVd + dVthSCSTI_dVd ; Vgssti_dVgs = Vgsz_dVgs + dVthSCSTI_dVg ; costi0 = here->HSM2_costi0 ; costi1 = here->HSM2_costi1 ; costi3 = here->HSM2_costi0_p2 * Cox_inv * Cox_inv ; T1 = 2.0 * here->HSM2_costi0_p2 * Cox_inv ; costi3_dVb = T1 * Cox_inv_dVb ; costi3_dVd = T1 * Cox_inv_dVd ; costi3_dVg = T1 * Cox_inv_dVg ; T2 = 1.0 / costi3 ; costi3_dVb_c3 = costi3_dVb * T2 ; costi3_dVd_c3 = costi3_dVd * T2 ; costi3_dVg_c3 = costi3_dVg * T2 ; costi4 = costi3 * beta * 0.5 ; costi5 = costi4 * beta * 2.0 ; T11 = beta * 0.25 ; T10 = beta_inv - costi3 * T11 + Vfb - pParam->HSM2_vthsti - dVthSCSTI + small ; T10_dVb = - T11 * costi3_dVb - dVthSCSTI_dVb ; T10_dVd = - T11 * costi3_dVd - dVthSCSTI_dVd ; T10_dVg = - T11 * costi3_dVg - dVthSCSTI_dVg ; T1 = Vgsz - T10 - psisti_dlt ; T1_dVb = - T10_dVb ; T1_dVd = Vgsz_dVds - T10_dVd ; T1_dVg = Vgsz_dVgs - T10_dVg ; T0 = Fn_Sgn(T10) ; T2 = sqrt (T1 * T1 + T0 * 4.0 * T10 * psisti_dlt) ; T3 = T10 + 0.5 * (T1 + T2) - Vfb + pParam->HSM2_vthsti + dVthSCSTI - Vbsz ; T3_dVb = T10_dVb + 0.5 * (T1_dVb + (T1 * T1_dVb + T0 * 2.0 * T10_dVb * psisti_dlt) / T2) + dVthSCSTI_dVb - Vbsz_dVbs ; T3_dVd = T10_dVd + 0.5 * (T1_dVd + (T1 * T1_dVd + T0 * 2.0 * T10_dVd * psisti_dlt) / T2) + dVthSCSTI_dVd - Vbsz_dVds ; T3_dVg = T10_dVg + 0.5 * (T1_dVg + (T1 * T1_dVg + T0 * 2.0 * T10_dVg * psisti_dlt) / T2) + dVthSCSTI_dVg ; T4 = beta * T3 - 1.0 ; T5 = 4.0 / costi5 ; T1 = 1.0 + T4 * T5 ; T6 = beta * T5 ; T7 = T4 * T5 ; T1_dVb = (T6 * T3_dVb - T7 * costi3_dVb_c3) ; T1_dVd = (T6 * T3_dVd - T7 * costi3_dVd_c3) ; T1_dVg = (T6 * T3_dVg - T7 * costi3_dVg_c3) ; Fn_SZ( T1 , T1, 1.0e-2, T2) ; T1 += small ; T1_dVb *= T2 ; T1_dVd *= T2 ; T1_dVg *= T2 ; costi6 = sqrt (T1) ; T0 = costi4 * (1.0 - costi6) ; Psasti = Vgssti + T0 ; T2 = 0.5 * costi4 / costi6 ; Psasti_dVbs = Vgssti_dVbs + costi3_dVb_c3 * T0 - T2 * T1_dVb ; Psasti_dVds = Vgssti_dVds + costi3_dVd_c3 * T0 - T2 * T1_dVd ; Psasti_dVgs = Vgssti_dVgs + costi3_dVg_c3 * T0 - T2 * T1_dVg ; T0 = 1.0 / (beta + 2.0 / (Vgssti + small)) ; Psbsti = log (1.0 / costi1 / costi3 * (Vgssti * Vgssti)) * T0 ; T2 = 2.0 * T0 / (Vgssti + small) ; T3 = Psbsti / (Vgssti + small) ; Psbsti_dVbs = T2 * (Vgssti_dVbs - 0.5 * costi3_dVb_c3 * Vgssti + T3 * Vgssti_dVbs ) ; Psbsti_dVds = T2 * (Vgssti_dVds - 0.5 * costi3_dVd_c3 * Vgssti + T3 * Vgssti_dVds ) ; Psbsti_dVgs = T2 * (Vgssti_dVgs - 0.5 * costi3_dVg_c3 * Vgssti + T3 * Vgssti_dVgs ) ; Psab = Psbsti - Psasti - sti2_dlt ; Psab_dVbs = Psbsti_dVbs - Psasti_dVbs ; Psab_dVds = Psbsti_dVds - Psasti_dVds ; Psab_dVgs = Psbsti_dVgs - Psasti_dVgs ; T0 = sqrt (Psab * Psab + 4.0 * sti2_dlt * Psbsti) ; Psti = Psbsti - 0.5 * (Psab + T0) ; T1 = 1.0 / T0 ; Psti_dVbs = Psbsti_dVbs - 0.5 * ( Psab_dVbs + ( Psab * Psab_dVbs + 2.0 * sti2_dlt * Psbsti_dVbs ) * T1 ) ; Psti_dVds = Psbsti_dVds - 0.5 * ( Psab_dVds + ( Psab * Psab_dVds + 2.0 * sti2_dlt * Psbsti_dVds ) * T1 ) ; Psti_dVgs = Psbsti_dVgs - 0.5 * ( Psab_dVgs + ( Psab * Psab_dVgs + 2.0 * sti2_dlt * Psbsti_dVgs ) * T1 ) ; T0 = costi1 * exp (beta * Psti) ; T1 = beta * (Psti - Vbsz) - 1.0 + T0 ; T1_dVb = beta * ((Psti_dVbs - Vbsz_dVbs) + T0 * Psti_dVbs) ; T1_dVd = beta * ((Psti_dVds - Vbsz_dVds) + T0 * Psti_dVds) ; T1_dVg = beta * (Psti_dVgs + T0 * Psti_dVgs) ; Fn_SZ ( T1 , T1, 1.0e-2, T0) ; T1 += epsm10 ; T1_dVb *= T0 ; T1_dVd *= T0 ; T1_dVg *= T0 ; sq1sti = sqrt (T1); T2 = 0.5 / sq1sti ; sq1sti_dVbs = T2 * T1_dVb ; sq1sti_dVds = T2 * T1_dVd ; sq1sti_dVgs = T2 * T1_dVg ; T1 = beta * (Psti - Vbsz) - 1.0; T1_dVb = beta * (Psti_dVbs - Vbsz_dVbs) ; T1_dVd = beta * (Psti_dVds - Vbsz_dVds) ; T1_dVg = beta * Psti_dVgs ; Fn_SZ( T1 , T1, 1.0e-2, T0) ; T1 += epsm10 ; T1_dVb *= T0 ; T1_dVd *= T0 ; T1_dVg *= T0 ; sq2sti = sqrt (T1); T2 = 0.5 / sq2sti ; sq2sti_dVbs = T2 * T1_dVb ; sq2sti_dVds = T2 * T1_dVd ; sq2sti_dVgs = T2 * T1_dVg ; Qn0sti = costi0 * (sq1sti - sq2sti) ; Qn0sti_dVbs = costi0 * (sq1sti_dVbs - sq2sti_dVbs) ; Qn0sti_dVds = costi0 * (sq1sti_dVds - sq2sti_dVds) ; Qn0sti_dVgs = costi0 * (sq1sti_dVgs - sq2sti_dVgs) ; /* T1: Vdsatsti */ T1 = Psasti - Psti ; T1_dVb = Psasti_dVbs - Psti_dVbs ; T1_dVd = Psasti_dVds - Psti_dVds ; T1_dVg = Psasti_dVgs - Psti_dVgs ; Fn_SZ( T1 , T1 , 1.0e-1 , T2 ) ; T1 += epsm10 ; T1_dVb *= T2 ; T1_dVd *= T2 ; T1_dVg *= T2 ; TX = Vds / T1 ; T2 = 1.0 / ( T1 * T1 ) ; TX_dVbs = T2 * ( - Vds * T1_dVb ) ; TX_dVds = T2 * ( T1 - Vds * T1_dVd ) ; TX_dVgs = T2 * ( - Vds * T1_dVg ) ; Fn_CP( TY , TX , 1.0 , 4 , T2 ) ; TY_dVbs = T2 * TX_dVbs ; TY_dVds = T2 * TX_dVds ; TY_dVgs = T2 * TX_dVgs ; costi7 = 2.0 * here->HSM2_wsti * here->HSM2_nf * beta_inv ; T1 = Lch ; Idssti = costi7 * Mu * Qn0sti * TY / T1; T3 = 1.0 / T1 ; T4 = Mu * Qn0sti * TY / T1 / T1 ; T5 = Mu * Qn0sti ; Idssti_dVbs = costi7 * (((Mu_dVbs * Qn0sti + Mu * Qn0sti_dVbs) * TY + T5 * TY_dVbs ) * T3 - Lch_dVbs * T4 ) ; Idssti_dVds = costi7 * (((Mu_dVds * Qn0sti + Mu * Qn0sti_dVds) * TY + T5 * TY_dVds ) * T3 - Lch_dVds * T4 ) ; Idssti_dVgs = costi7 * (((Mu_dVgs * Qn0sti + Mu * Qn0sti_dVgs) * TY + T5 * TY_dVgs ) * T3 - Lch_dVgs * T4 ) ; Ids = Ids + Idssti ; Ids_dVbs = Ids_dVbs + Idssti_dVbs ; Ids_dVds = Ids_dVds + Idssti_dVds ; Ids_dVgs = Ids_dVgs + Idssti_dVgs ; } /*-----------------------------------------------------------* * Break point for the case of Rs=Rd=0. *-----------------*/ if ( flg_rsrd == 0 ) { DJI = 1.0 ; break ; } /*-----------------------------------------------------------* * calculate corrections of biases. * - Fbs = 0, etc. are the small ciucuit equations. * - DJ, Jacobian of the small circuit matrix, is g.t. 1 * provided Rs, Rd and conductances are positive. *-----------------*/ Fbs = Vbs - Vbsc + Ids * Rs ; Fds = Vds - Vdsc + Ids * ( Rs + Rd ) ; Fgs = Vgs - Vgsc + Ids * Rs ; DJ = 1.0 + Rs * Ids_dVbs + ( Rs + Rd ) * Ids_dVds + Rs * Ids_dVgs ; DJI = 1.0 / DJ ; JI11 = 1 + ( Rs + Rd ) * Ids_dVds + Rs * Ids_dVgs ; JI12 = - Rs * Ids_dVds ; JI13 = - Rs * Ids_dVgs ; JI21 = - ( Rs + Rd ) * Ids_dVbs ; JI22 = 1 + Rs * Ids_dVbs + Rs * Ids_dVgs ; JI23 = - ( Rs + Rd ) * Ids_dVgs ; JI31 = - Rs * Ids_dVbs ; JI32 = - Rs * Ids_dVds ; JI33 = 1 + Rs * Ids_dVbs + ( Rs + Rd ) * Ids_dVds ; dVbs = - DJI * ( JI11 * Fbs + JI12 * Fds + JI13 * Fgs ) ; dVds = - DJI * ( JI21 * Fbs + JI22 * Fds + JI23 * Fgs ) ; dVgs = - DJI * ( JI31 * Fbs + JI32 * Fds + JI33 * Fgs ) ; dV_sum = fabs( dVbs ) + fabs( dVds ) + fabs( dVgs ) ; /*-----------------------------------------------------------* * Break point for converged case. * - Exit from the bias loop. * - NOTE: Update of internal biases is avoided. *-----------------*/ if ( Ids_last * Ids_tol >= fabs( Ids_last - Ids ) || mini_current >= fabs( Ids_last - Ids ) || dV_sum < ps_conv ) break ; /*-----------------------------------------------------------* * Update the internal biases. *-----------------*/ Vbs = Vbs + dVbs ; Vds = Vds + dVds ; Vgs = Vgs + dVgs ; if ( Vds < 0.0 ) { Vds = 0.0 ; dVds = 0.0 ; } /*-----------------------------------------------------------* * Bottom of bias loop. (label) *-----------------*/ /* bottom_of_bias_loop :*/ /*-----------------------------------------------------------* * Make initial guess flag of potential ON. * - This effects for the 2nd and later iterations of bias loop. *-----------------*/ flg_pprv = 1 ; } /*++ End of the bias loop +++++++++++++++++++++++++++++*/ if ( lp_bs > lp_bs_max ) { lp_bs -- ; } /*----------------------------------------------------------* * induced gate noise. ( Part 1/3 ) *----------------------*/ if ( model->HSM2_coign != 0 && model->HSM2_cothrml != 0 ) { kusai00 = VgVt * VgVt ; kusaidd = 2.0e0 * beta_inv * Cox_inv * Idd ; kusaiL = kusai00 - kusaidd ; Fn_SZ( kusai00 , kusai00 , 1.0e-3 , T0 ) ; Fn_SZ( kusaiL , kusaiL , 1.0e-3 , T0 ) ; kusai00L = kusai00 - kusaiL ; if ( Qn0 < epsm10 || kusai00L < epsm10 ) flg_ign = 0 ; else flg_ign = 1 ; } /*-----------------------------------------------------------* * End of PART-1. (label) *-----------------*/ end_of_part_1: /*----------------------------------------------------------* * Evaluate integrated chages in unit [C]. *----------------------*/ T1 = - here->HSM2_weff_nf * Leff ; Qb = T1 * Qbu ; Qb_dVbs = T1 * Qbu_dVbs ; Qb_dVds = T1 * Qbu_dVds ; Qb_dVgs = T1 * Qbu_dVgs ; Qi = T1 * Qiu ; Qi_dVbs = T1 * Qiu_dVbs ; Qi_dVds = T1 * Qiu_dVds ; Qi_dVgs = T1 * Qiu_dVgs ; Qd = Qi * Qdrat ; Qd_dVbs = Qi_dVbs * Qdrat + Qi * Qdrat_dVbs ; Qd_dVds = Qi_dVds * Qdrat + Qi * Qdrat_dVds ; Qd_dVgs = Qi_dVgs * Qdrat + Qi * Qdrat_dVgs ; /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-2: Substrate / gate / leak currents *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Isub : substrate current induced by impact ionization. *-----------------*/ if ( flg_noqi == 1 || model->HSM2_coisub == 0 ) { /* Accumulation zone or nonconductive case, in which Ids==0. */ Isub = 0.0e0 ; Isub_dVbs = Isub_dVds = Isub_dVgs = 0.0e0 ; } else { /*-------------------------------------------* * Conductive case. *-----------------*/ if ( pParam->HSM2_sub1 > 0.0e0 && pParam->HSM2_vmax > 0.0e0 ) { T0 = here->HSM2_vg2const ; T1 = T0 * Vgp ; T1_dVd = T0 * Vgp_dVds ; T1_dVg = T0 * Vgp_dVgs ; T1_dVb = T0 * Vgp_dVbs ; T7 = Cox0 * Cox0 ; T8 = here->HSM2_qnsub_esi ; T3 = T8 / T7 ; T9 = 2.0 / T8 ; T4 = 1.0e0 + T9 * T7 ; T2 = here->HSM2_xvbs ; T5 = T1 - beta_inv - T2 * Vbsz ; T5_dVd = T1_dVd - T2 * Vbsz_dVds; T5_dVg = T1_dVg ; T5_dVb = T1_dVb - T2 * Vbsz_dVbs; T6 = T4 * T5 ; T6_dVd = T4 * T5_dVd ; T6_dVg = T4 * T5_dVg ; T6_dVb = T4 * T5_dVb ; Fn_SZ( T6 , T6, 1.0e-3, T9) ; T6 += small ; T6_dVd *= T9 ; T6_dVg *= T9 ; T6_dVb *= T9 ; T6 = sqrt( T6 ) ; T9 = 0.5 / T6 ; T6_dVd = T9 * T6_dVd ; T6_dVg = T9 * T6_dVg ; T6_dVb = T9 * T6_dVb ; Psislsat = T1 + T3 * ( 1.0 - T6 ) ; Psislsat_dVd = T1_dVd - T3 * T6_dVd ; Psislsat_dVg = T1_dVg - T3 * T6_dVg ; Psislsat_dVb = T1_dVb - T3 * T6_dVb ; T2 = here->HSM2_lgate / (here->HSM2_xgate + here->HSM2_lgate) ; Psisubsat = pParam->HSM2_svds * Vdsz + Ps0z - T2 * Psislsat ; Psisubsat_dVd = pParam->HSM2_svds * Vdsz_dVds + Ps0z_dVds - T2 * Psislsat_dVd ; Psisubsat_dVg = Ps0z_dVgs - T2 * Psislsat_dVg ; Psisubsat_dVb = Ps0z_dVbs - T2 * Psislsat_dVb ; Fn_SZ( Psisubsat , Psisubsat, 1.0e-3, T9 ) ; Psisubsat += small ; Psisubsat_dVd *= T9 ; Psisubsat_dVg *= T9 ; Psisubsat_dVb *= T9 ; T5 = here->HSM2_xsub1 ; T6 = here->HSM2_xsub2 ; T2 = exp( - T6 / Psisubsat ) ; T3 = T2 * T6 / ( Psisubsat * Psisubsat ) ; T2_dVd = T3 * Psisubsat_dVd ; T2_dVg = T3 * Psisubsat_dVg ; T2_dVb = T3 * Psisubsat_dVb ; Isub = T5 * Psisubsat * Ids * T2 ; Isub_dVds = T5 * ( Psisubsat_dVd * Ids * T2 + Psisubsat * Ids_dVds * T2 + Psisubsat * Ids * T2_dVd ) ; Isub_dVgs = T5 * ( Psisubsat_dVg * Ids * T2 + Psisubsat * Ids_dVgs * T2 + Psisubsat * Ids * T2_dVg ) ; Isub_dVbs = T5 * ( Psisubsat_dVb * Ids * T2 + Psisubsat * Ids_dVbs * T2 + Psisubsat * Ids * T2_dVb ) ; } else { Isub = 0.0e0 ; Isub_dVbs = Isub_dVds = Isub_dVgs = 0.0e0 ; } /* end of if ( pParam->HSM2_sub1 ... ) else block. */ } /*---------------------------------------------------* * Impact-Ionization Induced Bulk Potential Change (IBPC) *-----------------*/ if ( flg_noqi == 0 && Isub > 0e0 && pParam->HSM2_ibpc1 != 0e0 ) { /* delta Vbs */ T0 = 1e0 + pParam->HSM2_ibpc2 * dVth ; dVbsIBPC = pParam->HSM2_ibpc1 * T0 * Isub ; dVbsIBPC_dVbs = pParam->HSM2_ibpc1 * ( pParam->HSM2_ibpc2 * dVth_dVb * Isub + T0 * Isub_dVbs ) ; dVbsIBPC_dVds = pParam->HSM2_ibpc1 * ( pParam->HSM2_ibpc2 * dVth_dVd * Isub + T0 * Isub_dVds ) ; dVbsIBPC_dVgs = pParam->HSM2_ibpc1 * ( pParam->HSM2_ibpc2 * dVth_dVg * Isub + T0 * Isub_dVgs ) ; /* dG3 & dG4 */ T10 = 1e0 / Xi0 ; T1 = beta * dVbsIBPC * T10 ; T10 *= T10 ; T1_dVb = beta * ( dVbsIBPC_dVbs * Xi0 - dVbsIBPC * Xi0_dVbs ) * T10 ; T1_dVd = beta * ( dVbsIBPC_dVds * Xi0 - dVbsIBPC * Xi0_dVds ) * T10 ; T1_dVg = beta * ( dVbsIBPC_dVgs * Xi0 - dVbsIBPC * Xi0_dVgs ) * T10 ; T10 = 1e0 / Xil ; T2 = beta * dVbsIBPC * T10 ; T10 *= T10 ; T2_dVb = beta * ( dVbsIBPC_dVbs * Xil - dVbsIBPC * Xil_dVbs ) * T10 ; T2_dVd = beta * ( dVbsIBPC_dVds * Xil - dVbsIBPC * Xil_dVds ) * T10 ; T2_dVg = beta * ( dVbsIBPC_dVgs * Xil - dVbsIBPC * Xil_dVgs ) * T10 ; dG3 = cnst0 * ( Xilp32 * T2 - Xi0p32 * T1 ) ; dG3_dVbs = cnst0 * ( Xilp32_dVbs * T2 + Xilp32 * T2_dVb - Xi0p32_dVbs * T1 - Xi0p32 * T1_dVb ) ; dG3_dVds = cnst0 * ( Xilp32_dVds * T2 + Xilp32 * T2_dVd - Xi0p32_dVds * T1 - Xi0p32 * T1_dVd ) ; dG3_dVgs = cnst0 * ( Xilp32_dVgs * T2 + Xilp32 * T2_dVg - Xi0p32_dVgs * T1 - Xi0p32 * T1_dVg ) ; dG4 = cnst0 * 0.5 * ( - Xilp12 * T2 + Xi0p12 * T1 ) ; dG4_dVbs = cnst0 * 0.5 * ( - Xilp12_dVbs * T2 - Xilp12 * T2_dVb + Xi0p12_dVbs * T1 + Xi0p12 * T1_dVb ) ; dG4_dVds = cnst0 * 0.5 * ( - Xilp12_dVds * T2 - Xilp12 * T2_dVd + Xi0p12_dVds * T1 + Xi0p12 * T1_dVd ) ; dG4_dVgs = cnst0 * 0.5 * ( - Xilp12_dVgs * T2 - Xilp12 * T2_dVg + Xi0p12_dVgs * T1 + Xi0p12 * T1_dVg ) ; /* Add IBPC current into Ids */ dIdd = dG3 + dG4 ; dIdd_dVbs = dG3_dVbs + dG4_dVbs ; dIdd_dVds = dG3_dVds + dG4_dVds ; dIdd_dVgs = dG3_dVgs + dG4_dVgs ; IdsIBPC = betaWL * dIdd * Mu ; IdsIBPC_dVbs = betaWL * ( Mu * dIdd_dVbs + dIdd * Mu_dVbs ) + betaWL_dVbs * Mu * dIdd ; IdsIBPC_dVds = betaWL * ( Mu * dIdd_dVds + dIdd * Mu_dVds ) + betaWL_dVds * Mu * dIdd ; IdsIBPC_dVgs = betaWL * ( Mu * dIdd_dVgs + dIdd * Mu_dVgs ) + betaWL_dVgs * Mu * dIdd ; } /* End if (IBPC) */ /*-----------------------------------------------------------* * Igate : Gate current induced by tunneling. *-----------------*/ if ( model->HSM2_coiigs == 0 ) { Igate = 0.0 ; Igate_dVbs = Igate_dVds = Igate_dVgs = 0.0 ; Igs = 0.0 ; Igs_dVbs = Igs_dVds = Igs_dVgs = 0.0 ; Igd = 0.0 ; Igd_dVbs = Igd_dVds = Igd_dVgs = 0.0 ; Igb = 0.0 ; Igb_dVbs = Igb_dVds = Igb_dVgs = 0.0 ; GLPART1 = 0.0 ; GLPART1_dVgs = GLPART1_dVds = GLPART1_dVbs = 0.0 ; } else { /* Igate */ if ( flg_noqi == 0 ) { Psdlz = Ps0z + Vdsz - epsm10 ; Psdlz_dVbs = Ps0z_dVbs ; Psdlz_dVds = Ps0z_dVds + Vdsz_dVds ; Psdlz_dVgs = Ps0z_dVgs ; T1 = Vgsz - Vfb + modelMKS->HSM2_gleak4 * (dVth - dPpg) * Leff - Psdlz * pParam->HSM2_gleak3 ; T1_dVg = Vgsz_dVgs + modelMKS->HSM2_gleak4 * (dVth_dVg - dPpg_dVg) * Leff - Psdlz_dVgs * pParam->HSM2_gleak3 ; T1_dVd = Vgsz_dVds + modelMKS->HSM2_gleak4 * (dVth_dVd - dPpg_dVd) * Leff - Psdlz_dVds * pParam->HSM2_gleak3 ; T1_dVb = modelMKS->HSM2_gleak4 * ( dVth_dVb - dPpg_dVb ) * Leff - Psdlz_dVbs * pParam->HSM2_gleak3 ; T3 = 1.0 / Tox0 ; T2 = T1 * T3 ; T2_dVg = (T1_dVg ) * T3 ; T2_dVd = (T1_dVd ) * T3 ; T2_dVb = (T1_dVb ) * T3 ; T3 = 1.0 / modelMKS->HSM2_gleak5 ; if ( VgVt <= VgVt_small ) { Ey = 0.0 ; Ey_dVgs = 0.0 ; Ey_dVds = 0.0 ; Ey_dVbs = 0.0 ; } T7 = 1.0 + Ey * T3 ; T7_dVg = Ey_dVgs * T3 ; T7_dVd = Ey_dVds * T3 ; T7_dVb = Ey_dVbs * T3 ; Etun = T2 * T7 ; Etun_dVgs = T2_dVg * T7 + T7_dVg * T2 ; Etun_dVds = T2_dVd * T7 + T7_dVd * T2 ; Etun_dVbs = T2_dVb * T7 + T7_dVb * T2 ; Fn_SZ( Etun , Etun , igate_dlt , T5 ) ; Etun_dVgs *= T5 ; Etun_dVds *= T5 ; Etun_dVbs *= T5 ; Fn_SZ( T3 , Vgsz , 1.0e-3 , T4 ) ; T3 -= model->HSM2_vzadd0 ; TX = T3 / cclmmdf ; T2 = 1.0 + TX * TX ; T1 = 1.0 - 1.0 / T2 ; T1_dVg = 2.0 * TX * T4 / ( T2 * T2 * cclmmdf ) ; T1_dVd = T1_dVg * Vgsz_dVds ; Etun_dVgs = T1 * Etun_dVgs + Etun * T1_dVg ; Etun_dVds = T1 * Etun_dVds + Etun * T1_dVd ; Etun_dVbs *= T1 ; Etun *= T1 ; T0 = Leff * here->HSM2_weff_nf ; T7 = modelMKS->HSM2_gleak7 / (modelMKS->HSM2_gleak7 + T0) ; T6 = pParam->HSM2_gleak6 ; T9 = T6 / (T6 + Vdsz) ; T9_dVd = - T9 / (T6 + Vdsz) * Vdsz_dVds ; T1 = - pParam->HSM2_gleak2 * Egp32 / (Etun + small) ; if ( T1 < - EXP_THR ) { Igate = 0.0 ; Igate_dVbs = Igate_dVds = Igate_dVgs = 0.0 ; } else { T2 = exp ( T1 ) ; T3 = pParam->HSM2_gleak1 / Egp12 * C_QE * T0 ; T4 = T2 * T3 * sqrt ((Qiu + Cox0 * VgVt_small ) / cnst0) ; T5 = T4 * Etun ; T6 = 0.5 * Etun / (Qiu + Cox0 * VgVt_small ) ; T10 = T5 * Etun ; T10_dVb = T5 * (2.0 * Etun_dVbs - T1 * Etun_dVbs + T6 * Qiu_dVbs) ; T10_dVd = T5 * (2.0 * Etun_dVds - T1 * Etun_dVds + T6 * Qiu_dVds) ; T10_dVg = T5 * (2.0 * Etun_dVgs - T1 * Etun_dVgs + T6 * Qiu_dVgs) ; Igate = T7 * T9 * T10 ; Igate_dVbs = T7 * T9 * T10_dVb ; Igate_dVds = T7 * (T9_dVd * T10 + T9 * T10_dVd) ; Igate_dVgs = T7 * T9 * T10_dVg ; } } else { Igate = 0.0 ; Igate_dVbs = Igate_dVds = Igate_dVgs = 0.0 ; } /* Igs */ T0 = - pParam->HSM2_glksd2 * Vgs + modelMKS->HSM2_glksd3 ; T2 = exp (Tox0 * T0); T2_dVg = (- Tox0 * pParam->HSM2_glksd2) * T2; T0 = Vgs / Tox0 / Tox0 ; T3 = Vgs * T0 ; T3_dVg = 2.0 * T0 * (1.0 ) ; T4 = pParam->HSM2_glksd1 / 1.0e6 * here->HSM2_weff_nf ; Igs = T4 * T2 * T3 ; Igs_dVgs = T4 * (T2_dVg * T3 + T2 * T3_dVg) ; Igs_dVds = 0.0 ; Igs_dVbs = 0.0 ; if ( Vgs >= 0.0e0 ){ Igs *= -1.0 ; Igs_dVgs *= -1.0 ; Igs_dVds *= -1.0 ; Igs_dVbs *= -1.0 ; } /* Igd */ T1 = Vgs - Vds ; T0 = - pParam->HSM2_glksd2 * T1 + modelMKS->HSM2_glksd3 ; T2 = exp (Tox0 * T0); T2_dVg = (- Tox0 * pParam->HSM2_glksd2) * T2; T2_dVd = (+ Tox0 * pParam->HSM2_glksd2) * T2; T2_dVb = 0.0 ; T0 = T1 / Tox0 / Tox0 ; T3 = T1 * T0 ; T3_dVg = 2.0 * T0 ; T3_dVd = - 2.0 * T0 ; T3_dVb = 0.0 ; T4 = pParam->HSM2_glksd1 / 1.0e6 * here->HSM2_weff_nf ; Igd = T4 * T2 * T3 ; Igd_dVgs = T4 * (T2_dVg * T3 + T2 * T3_dVg) ; Igd_dVds = T4 * (T2_dVd * T3 + T2 * T3_dVd) ; Igd_dVbs = 0.0 ; if( T1 >= 0.0e0 ){ Igd *= -1.0 ; Igd_dVgs *= -1.0 ; Igd_dVds *= -1.0 ; Igd_dVbs *= -1.0 ; } /* Igb */ Etun = (- Vgs + Vbs + Vfb + model->HSM2_glkb3 ) / Tox0 ; Etun_dVgs = - 1.0 / Tox0 ; Etun_dVds = 0.0 ; Etun_dVbs = 1.0 / Tox0 ; Fn_SZ( Etun , Etun, igate_dlt, T5) ; Etun += small ; Etun_dVgs *= T5 ; Etun_dVbs *= T5 ; T1 = - pParam->HSM2_glkb2 / Etun ; if ( T1 < - EXP_THR ) { Igb = 0.0 ; Igb_dVgs = Igb_dVds = Igb_dVbs = 0.0 ; } else { T2 = exp ( T1 ); T3 = pParam->HSM2_glkb2 / ( Etun * Etun ) * T2 ; T2_dVg = T3 * Etun_dVgs ; T2_dVb = T3 * Etun_dVbs ; T3 = pParam->HSM2_glkb1 * here->HSM2_weff_nf * Leff ; Igb = T3 * Etun * Etun * T2 ; Igb_dVgs = T3 * (2.0 * Etun * Etun_dVgs * T2 + Etun * Etun * T2_dVg); Igb_dVds = 0.0 ; Igb_dVbs = T3 * (2.0 * Etun * Etun_dVbs * T2 + Etun * Etun * T2_dVb); } GLPART1 = 0.5 ; GLPART1_dVgs = 0.0 ; GLPART1_dVds = 0.0 ; GLPART1_dVbs = 0.0 ; } /* if ( model->HSM2_coiigs == 0 ) */ /*-----------------------------------------------------------* * Igidl : GIDL *-----------------*/ if( model->HSM2_cogidl == 0 ){ Igidl = 0.0e0 ; Igidl_dVbs = 0.0e0 ; Igidl_dVds = 0.0e0 ; Igidl_dVgs = 0.0e0 ; } else { T3 = here->HSM2_2qnsub_esi ; Qb0 = sqrt (T3 * (Pb20 - Vbsz2)) ; T4 = 0.5 * T3 / Qb0 ; Qb0_dVb = T4 * (- Vbsz2_dVbs) ; Qb0_dVd = T4 * (- Vbsz2_dVds) ; Qb0_dVg = T4 * (- Vbsz2_dVgs) ; Qb0Cox = model->HSM2_gidl6 * Qb0 * Cox_inv ; Qb0Cox_dVb = model->HSM2_gidl6 * ( Qb0_dVb * Cox_inv + Qb0 * Cox_inv_dVb ) ; Qb0Cox_dVd = model->HSM2_gidl6 * ( Qb0_dVd * Cox_inv + Qb0 * Cox_inv_dVd ) ; Qb0Cox_dVg = model->HSM2_gidl6 * ( Qb0_dVg * Cox_inv + Qb0 * Cox_inv_dVg ) ; T1 = model->HSM2_gidl3 * (Vds + model->HSM2_gidl4) - Vgs + (dVthSC + dVthLP) * model->HSM2_gidl5 - Qb0Cox ; T2 = 1.0 / Tox0 ; E1 = T1 * T2 ; E1_dVb = ( model->HSM2_gidl5 * (dVthSC_dVb + dVthLP_dVb) - Qb0Cox_dVb ) * T2 ; E1_dVd = ( model->HSM2_gidl3 + model->HSM2_gidl5 * (dVthSC_dVd + dVthLP_dVd) - Qb0Cox_dVd ) * T2 ; E1_dVg = ( -1.0 + model->HSM2_gidl5 * (dVthSC_dVg + dVthLP_dVg) - Qb0Cox_dVg ) * T2 ; Fn_SZ( Egidl , E1, eef_dlt, T5) ; Egidl_dVb = T5 * E1_dVb ; Egidl_dVd = T5 * E1_dVd ; Egidl_dVg = T5 * E1_dVg ; Egidl += small ; T6 = pow(Egidl,model->HSM2_gidl7) ; T1 = model->HSM2_gidl7 * pow(Egidl,model->HSM2_gidl7 -1.0) ; T6_dVb = Egidl_dVb * T1 ; T6_dVd = Egidl_dVd * T1 ; T6_dVg = Egidl_dVg * T1 ; T0 = - pParam->HSM2_gidl2 * Egp32 / T6 ; if ( T0 < - EXP_THR ) { Igidl = 0.0 ; Igidl_dVbs = Igidl_dVds = Igidl_dVgs = 0.0 ; } else { T1 = exp ( T0 ) ; T2 = pParam->HSM2_gidl1 / Egp12 * C_QE * here->HSM2_weff_nf ; Igidl = T2 * Egidl * Egidl * T1 ; T3 = T2 * T1 * Egidl * (2.0 + pParam->HSM2_gidl2 * Egp32 * Egidl / T6 / T6 ) ; Igidl_dVbs = T3 * Egidl_dVb ; Igidl_dVds = T3 * Egidl_dVd ; Igidl_dVgs = T3 * Egidl_dVg ; } Vdb = Vds - Vbs ; if ( Vdb > 0.0 ) { T2 = Vdb * Vdb ; T4 = T2 * Vdb ; T0 = T4 + C_gidl_delta ; T5 = T4 / T0 ; T7 = ( 3.0 * T2 * T0 - T4 * 3.0 * T2 ) / ( T0 * T0 ) ; /* == T5_dVdb */ Igidl_dVbs = Igidl_dVbs * T5 + Igidl * T7 * ( - 1.0 ) ; /* Vdb_dVbs = -1 */ Igidl_dVds = Igidl_dVds * T5 + Igidl * T7 * ( + 1.0 ) ; /* Vdb_dVds = +1 */ Igidl_dVgs = Igidl_dVgs * T5 ; /* Vdb_dVgs = 0 */ Igidl *= T5 ; } else { Igidl = 0.0 ; Igidl_dVbs = Igidl_dVds = Igidl_dVgs = 0.0 ; } } /*-----------------------------------------------------------* * Igisl : GISL *-----------------*/ if( model->HSM2_cogidl == 0){ Igisl = 0.0e0 ; Igisl_dVbs = 0.0e0 ; Igisl_dVds = 0.0e0 ; Igisl_dVgs = 0.0e0 ; } else { T1 = model->HSM2_gidl3 * ( - Vds + model->HSM2_gidl4 ) - ( Vgs - Vds ) + ( dVthSC + dVthLP ) * model->HSM2_gidl5 - Qb0Cox ; T2 = 1.0 / Tox0 ; E1 = T1 * T2 ; E1_dVb = ( model->HSM2_gidl5 * (dVthSC_dVb + dVthLP_dVb) - Qb0Cox_dVb ) * T2 ; E1_dVd = ( -1.0 * model->HSM2_gidl3 + 1.0 + model->HSM2_gidl5 * (dVthSC_dVd + dVthLP_dVd) - Qb0Cox_dVd ) * T2 ; E1_dVg = ( -1.0 + model->HSM2_gidl5 * (dVthSC_dVg + dVthLP_dVg) - Qb0Cox_dVg ) * T2 ; Fn_SZ( Egisl , E1, eef_dlt, T5) ; Egisl_dVb = T5 * E1_dVb ; Egisl_dVd = T5 * E1_dVd ; Egisl_dVg = T5 * E1_dVg ; Egisl += small ; T6 = pow(Egisl,model->HSM2_gidl7) ; T1 = model->HSM2_gidl7 * pow(Egisl,model->HSM2_gidl7 -1.0) ; T6_dVb = Egisl_dVb * T1 ; T6_dVd = Egisl_dVd * T1 ; T6_dVg = Egisl_dVg * T1 ; T0 = - pParam->HSM2_gidl2 * Egp32 / T6 ; if ( T0 < - EXP_THR ) { Igisl = 0.0 ; Igisl_dVbs = Igisl_dVds = Igisl_dVgs = 0.0 ; } else { T1 = exp ( T0 ) ; T2 = pParam->HSM2_gidl1 / Egp12 * C_QE * here->HSM2_weff_nf ; Igisl = T2 * Egisl * Egisl * T1 ; T3 = T2 * T1 * Egisl * (2.0 + pParam->HSM2_gidl2 * Egp32 * Egisl / T6 / T6) ; Igisl_dVbs = T3 * Egisl_dVb ; Igisl_dVds = T3 * Egisl_dVd ; Igisl_dVgs = T3 * Egisl_dVg ; } Vsb = - Vbs ; if ( Vsb > 0.0 ) { T2 = Vsb * Vsb ; T4 = T2 * Vsb ; T0 = T4 + C_gidl_delta ; T5 = T4 / T0 ; T7 = ( 3.0 * T2 * T0 - T4 * 3.0 * T2 ) / ( T0 * T0 ) ; /* == T5_dVsb */ Igisl_dVbs = Igisl_dVbs * T5 + Igisl * T7 * ( - 1.0 ) ; /* Vsb_dVbs = -1 */ Igisl_dVds = Igisl_dVds * T5 ; /* Vsb_dVds = 0 */ Igisl_dVgs = Igisl_dVgs * T5 ; /* Vsb_dVgs = 0 */ Igisl *= T5 ; } else { Igisl = 0.0 ; Igisl_dVbs = Igisl_dVds = Igisl_dVgs = 0.0 ; } } /*-----------------------------------------------------------* * End of PART-2. (label) *-----------------*/ /* end_of_part_2: */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-3: Overlap charge *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ Aclm = pParam->HSM2_clm1 ; if ( flg_noqi != 0 ) { /*-------------------------------------------* * Calculation of Psdl for cases of flg_noqi==1. *-----------------*/ Psdl = Aclm * (Vds + Ps0) + (1.0e0 - Aclm) * Psl ; Psdl_dVbs = Aclm * Ps0_dVbs + (1.0e0 - Aclm) * Psl_dVbs ; Psdl_dVds = Aclm * (1.0e0 + Ps0_dVds) + (1.0e0 - Aclm) * Psl_dVds ; Psdl_dVgs = Aclm * Ps0_dVgs + (1.0e0 - Aclm) * Psl_dVgs ; if ( Psdl > Ps0 + Vds - epsm10 ) { Psdl = Ps0 + Vds - epsm10 ; Psdl_dVbs = Ps0_dVbs ; Psdl_dVds = Ps0_dVds + 1.0 ; Psdl_dVgs = Ps0_dVgs ; } if (model->HSM2_xqy !=0) { Ec = 0.0e0 ; Ec_dVbs =0.0e0 ; Ec_dVds =0.0e0 ; Ec_dVgs =0.0e0 ; } } else { /* Ec is removed from Lred calc. part */ if (model->HSM2_xqy !=0) { if ( Idd < C_IDD_MIN ) { Ec = 0.0e0 ; Ec_dVbs =0.0e0 ; Ec_dVds =0.0e0 ; Ec_dVgs =0.0e0 ; } else { T1 = beta_inv / Leff ; T2 = 1.0 / Qn0 ; T3 = T2 * T2 ; Ec = Idd * T1 * T2 ; Ec_dVbs = T1 * (Idd_dVbs * T2 - Idd * Qn0_dVbs * T3 ) ; Ec_dVds = T1 * (Idd_dVds * T2 - Idd * Qn0_dVds * T3 ) ; Ec_dVgs = T1 * (Idd_dVgs * T2 - Idd * Qn0_dVgs * T3 ) ; } } } /*-------------------------------------------* * Overlap charges: Qgod, Qgos, and Qover *-----------------*/ if ( model->HSM2_coovlp >= 1 && pParam->HSM2_lover > 0.0 ){ cov_slp = modelMKS->HSM2_ovslp ; cov_mag = model->HSM2_ovmag ; covvg = Vgs ; covvg_dVgs = 1.0 ; T1 = Cox0 * here->HSM2_weff_nf ; Lov = pParam->HSM2_lover ; if ( pParam->HSM2_nover == 0.0 ){ T4 = cov_slp * T1 * ( cov_mag + covvg ) ; T4_dVg = cov_slp * T1 * covvg_dVgs ; T4_dVd = 0.0 ; T5 = Lov * T1 ; TX = Ps0 ; TX_dVbs = Ps0_dVbs ; TX_dVds = Ps0_dVds ; TX_dVgs = Ps0_dVgs ; T9 = 1.2e0 - TX ; Qgos = Vgs * T5 - T9 * T4 ; Qgos_dVbs = T4 * TX_dVbs ; Qgos_dVds = T4 * TX_dVds - T9 * T4_dVd ; Qgos_dVgs = T5 + T4 * TX_dVgs - T9 * T4_dVg ; T4 = cov_slp * T1 * ( cov_mag + covvg - Vds ) ; T4_dVg = cov_slp * T1 * covvg_dVgs ; T4_dVd = - cov_slp * T1 ; TX = Psl - Vds ; TX_dVbs = Psl_dVbs ; TX_dVds = Psl_dVds - 1.0 ; TX_dVgs = Psl_dVgs ; T9 = 1.2e0 - TX ; Qgod = (Vgs - Vds) * T5 - T4 * T9 ; Qgod_dVbs = T4 * TX_dVbs ; Qgod_dVds = - T5 + T4 * TX_dVds - T9 * T4_dVd ; Qgod_dVgs = T5 + T4 * TX_dVgs - T9 * T4_dVg ; } else { for ( lcover = -1 ; lcover <= +1 ; lcover += 2 ) { flg_ovloops = ( 1 - lcover ) / 2 ; /* 1 in Source overlap calc. */ flg_ovloopd = ( 1 + lcover ) / 2 ; /* 1 in Drain overlap calc. */ /*-------------------------------------------* * Qover (G/D overlap charge) | note: _dVxs means _dVxse *------------------------*/ Vbsgmt = ModeNML * Vbse + ModeRVS * ( Vbse - Vdse ) ; Vdsgmt = ModeNML * Vdse + ModeRVS * ( - Vdse ) ; Vgsgmt = ModeNML * Vgse + ModeRVS * ( Vgse - Vdse ) ; Vdbgmt = Vdsgmt - Vbsgmt ; Vgbgmt = Vgsgmt - Vbsgmt ; Vsbgmt = - Vbsgmt ; flg_overs = flg_ovloops * (int)ModeNML + flg_ovloopd * (int)ModeRVS ; /* geometrical source */ flg_overd = flg_ovloops * (int)ModeRVS + flg_ovloopd * (int)ModeNML ; /* geometrical drain */ Vxbgmt = flg_overs * Vsbgmt + flg_overd * Vdbgmt + epsm10 ; /*---------------------------------------------------* * Clamp -Vxbgmt. *-----------------*/ T0 = - Vxbgmt; if ( T0 > Vbs_bnd ) { T1 = T0 - Vbs_bnd; T2 = Vbs_max - Vbs_bnd; Fn_SUPoly4( TY, T1, T2, T11 ); T10 = Vbs_bnd + TY ; } else { T10 = T0 ; T11 = 1.0 ; } Vxbgmtcl = - T10 - small2 ; Vxbgmtcl_dVxbgmt = T11; fac1 = here->HSM2_cnst0over * Cox0_inv ; fac1_dVbs = 0.0; fac1_dVds = 0.0; fac1_dVgs = 0.0; fac1p2 = fac1 * fac1 ; VgpLD = - Vgbgmt + pParam->HSM2_vfbover; VgpLD_dVgb = - 1.0e0 ; T0 = pParam->HSM2_nover / here->HSM2_nin ; Pb2over = 2.0 / beta * log( T0 ) ; Vgb_fb_LD = - Vxbgmtcl ; /*-----------------------------------* * QsuLD: total charge = Accumulation | Depletion+inversion *-----------------*/ if ( VgpLD < Vgb_fb_LD ){ /*---------------------------* * Accumulation *-----------------*/ flg_ovzone = -1 ; T1 = 1.0 / ( beta * here->HSM2_cnst0over ) ; TY = T1 * Cox0 ; Ac41 = 2.0 + 3.0 * C_SQRT_2 * TY ; Ac4 = 8.0 * Ac41 * Ac41 * Ac41 ; Ps0_min = here->HSM2_eg - Pb2over ; TX = beta * ( VgpLD + Vxbgmtcl ) ; TX_dVxb = beta * Vxbgmtcl_dVxbgmt ; TX_dVgb = beta * VgpLD_dVgb ; Ac31 = 7.0 * C_SQRT_2 - 9.0 * TY * ( TX - 2.0 ) ; Ac31_dVxb = - 9.0 * TY * TX_dVxb ; Ac31_dVgb = - 9.0 * TY * TX_dVgb ; Ac3 = Ac31 * Ac31 ; T1 = 2.0 * Ac31 ; Ac3_dVxb = T1 * Ac31_dVxb ; Ac3_dVgb = T1 * Ac31_dVgb ; Ac2 = sqrt( Ac4 + Ac3 ) ; T1 = 0.5 / Ac2 ; Ac2_dVxb = T1 * Ac3_dVxb ; Ac2_dVgb = T1 * Ac3_dVgb ; Ac1 = -7.0 * C_SQRT_2 + Ac2 + 9.0 * TY * ( TX - 2.0 ) ; Ac1_dVxb = Ac2_dVxb + 9.0 * TY * TX_dVxb ; Ac1_dVgb = Ac2_dVgb + 9.0 * TY * TX_dVgb ; Acd = pow( Ac1 , C_1o3 ) ; T1 = C_1o3 / ( Acd * Acd ) ; Acd_dVxb = Ac1_dVxb * T1 ; Acd_dVgb = Ac1_dVgb * T1 ; Acn = -4.0 * C_SQRT_2 - 12.0 * TY + 2.0 * Acd + C_SQRT_2 * Acd * Acd ; T1 = 2.0 + 2.0 * C_SQRT_2 * Acd ; Acn_dVxb = T1 * Acd_dVxb ; Acn_dVgb = T1 * Acd_dVgb ; Chi = Acn / Acd ; T1 = 1.0 / ( Acd * Acd ) ; Chi_dVxb = ( Acn_dVxb * Acd - Acn * Acd_dVxb ) * T1 ; Chi_dVgb = ( Acn_dVgb * Acd - Acn * Acd_dVgb ) * T1 ; Psa = Chi * beta_inv - Vxbgmtcl ; Psa_dVxb = Chi_dVxb * beta_inv - Vxbgmtcl_dVxbgmt ; Psa_dVgb = Chi_dVgb * beta_inv ; T1 = Psa + Vxbgmtcl ; T2 = T1 / Ps0_min ; T3 = sqrt( 1.0 + ( T2 * T2 ) ) ; T9 = T2 / T3 / Ps0_min ; T3_dVd = T9 * ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) ; T3_dVg = T9 * Psa_dVgb ; Ps0LD = T1 / T3 - Vxbgmtcl ; T9 = 1.0 / ( T3 * T3 ) ; Ps0LD_dVxb = T9 * ( ( Psa_dVxb + Vxbgmtcl_dVxbgmt ) * T3 - T1 * T3_dVd ) - Vxbgmtcl_dVxbgmt ; Ps0LD_dVgb = T9 * ( Psa_dVgb * T3 - T1 * T3_dVg ); T2 = ( VgpLD - Ps0LD ) ; QsuLD = Cox0 * T2 ; QsuLD_dVxb = - Cox0 * Ps0LD_dVxb ; QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ; QbuLD = QsuLD ; QbuLD_dVxb = QsuLD_dVxb ; QbuLD_dVgb = QsuLD_dVgb ; } else { /*---------------------------* * Depletion and inversion *-----------------*/ /* initial value for a few fixpoint iterations to get Ps0_iniA from simplified Poisson equation: */ flg_ovzone = 2 ; Chi = znbd3 ; Chi_dVxb = 0.0 ; Chi_dVgb = 0.0 ; Ps0_iniA= Chi/beta - Vxbgmtcl ; Ps0_iniA_dVxb = Chi_dVxb/beta - Vxbgmtcl_dVxbgmt ; Ps0_iniA_dVgb = Chi_dVgb/beta ; /* 1 .. 2 relaxation steps should be sufficient */ for ( lp_ld = 1; lp_ld <= 2; lp_ld ++ ) { TY = exp(-Chi); TY_dVxb = -Chi_dVxb * TY; TY_dVgb = -Chi_dVgb * TY; TX = 1.0e0 + 4.0e0 * ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY ) / ( fac1p2 * beta2 ) ; TX_dVxb = 4.0e0 * ( beta * ( Vxbgmtcl_dVxbgmt ) + TY_dVxb ) / ( fac1p2 * beta2 ); TX_dVgb = 4.0e0 * ( beta * ( VgpLD_dVgb ) + TY_dVgb ) / ( fac1p2 * beta2 ); T1 = ( beta * ( VgpLD + Vxbgmtcl ) - 1.0e0 + TY ); T3 = fac1p2 * beta2 ; if ( TX < epsm10) { TX = epsm10; TX_dVxb = 0.0; TX_dVgb = 0.0; } Ps0_iniA = VgpLD + fac1p2 * beta / 2.0e0 * ( 1.0e0 - sqrt( TX ) ) ; Ps0_iniA_dVxb = - fac1p2 * beta / 2.0e0 * TX_dVxb * 0.5 / sqrt( TX ); Ps0_iniA_dVgb = VgpLD_dVgb - fac1p2 * beta / 2.0e0 * TX_dVgb * 0.5 / sqrt( TX ); T1 = fac1p2 * beta ; T2 = 1.0 - sqrt( TX ); Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ; Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ; Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ; } /* End of iteration */ if ( Chi < znbd3 ) { flg_ovzone = 1 ; /*-----------------------------------* * zone-D1 * - Ps0_iniA is the analytical solution of QovLD=Qb0 with * Qb0 being approximated by 3-degree polynomial. * * new: Inclusion of exp(-Chi) term at right border *-----------------*/ Ta = 1.0/(9.0*sqrt(2.0)) - (5.0+7.0*exp(-3.0)) / (54.0*sqrt(2.0+exp(-3.0))); Tb = (1.0+exp(-3.0)) / (2.0*sqrt(2.0+exp(-3.0))) - sqrt(2.0) / 3.0; Tc = 1.0/sqrt(2.0) + 1.0/(beta*fac1); Td = - (VgpLD + Vxbgmtcl) / fac1; Td_dVxb = - Vxbgmtcl_dVxbgmt / fac1; Td_dVgb = - VgpLD_dVgb / fac1; Tq = Tb*Tb*Tb / (27.0*Ta*Ta*Ta) - Tb*Tc/(6.0*Ta*Ta) + Td/(2.0*Ta); Tq_dVxb = Td_dVxb/(2.0*Ta); Tq_dVgb = Td_dVgb / (2.0*Ta); Tp = (3.0*Ta*Tc-Tb*Tb)/(9.0*Ta*Ta); T5 = sqrt(Tq*Tq + Tp*Tp*Tp); T5_dVxb = 2.0*Tq*Tq_dVxb / (2.0*T5); T5_dVgb = 2.0*Tq*Tq_dVgb / (2.0*T5); Tu = pow(-Tq + T5,C_1o3); Tu_dVxb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVxb + T5_dVxb); Tu_dVgb = Tu / (3.0 * (-Tq + T5)) * (-Tq_dVgb + T5_dVgb); Tv = -pow(Tq + T5,C_1o3); Tv_dVxb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVxb - T5_dVxb); Tv_dVgb = Tv / (3.0 * (-Tq - T5)) * (-Tq_dVgb - T5_dVgb); TX = Tu + Tv - Tb/(3.0*Ta); TX_dVxb = Tu_dVxb + Tv_dVxb; TX_dVgb = Tu_dVgb + Tv_dVgb; Ps0_iniA = TX * beta_inv - Vxbgmtcl ; Ps0_iniA_dVxb = TX_dVxb * beta_inv - Vxbgmtcl_dVxbgmt; Ps0_iniA_dVgb = TX_dVgb * beta_inv; Chi = beta * ( Ps0_iniA + Vxbgmtcl ) ; Chi_dVxb = beta * ( Ps0_iniA_dVxb + Vxbgmtcl_dVxbgmt ) ; Chi_dVgb = beta * ( Ps0_iniA_dVgb ) ; } if ( model->HSM2_coqovsm > 0 ) { /*-----------------------------------* * - Ps0_iniB : upper bound. *-----------------*/ flg_ovzone += 2; VgpLD_shift = VgpLD + Vxbgmtcl + 0.1; VgpLD_shift_dVgb = VgpLD_dVgb; VgpLD_shift_dVxb = Vxbgmtcl_dVxbgmt; exp_bVbs = exp( beta * - Vxbgmtcl ) + small ; exp_bVbs_dVxb = - exp_bVbs * beta * Vxbgmtcl_dVxbgmt; T0 = here->HSM2_nin / pParam->HSM2_nover; cnst1over = T0 * T0; gamma = cnst1over * exp_bVbs ; gamma_dVxb = cnst1over * exp_bVbs_dVxb; T0 = beta2 * fac1p2; psi = beta*VgpLD_shift; psi_dVgb = beta*VgpLD_shift_dVgb; psi_dVxb = beta*VgpLD_shift_dVxb; Chi_1 = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl; Chi_1_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi); Chi_1_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi) + beta*Vxbgmtcl_dVxbgmt; Fn_SU2( Chi_1, Chi_1, psi, 1.0, T1, T2 ); Chi_1_dVgb = Chi_1_dVgb*T1 + psi_dVgb*T2; Chi_1_dVxb = Chi_1_dVxb*T1 + psi_dVxb*T2; /* 1 fixpoint step for getting more accurate Chi_B */ psi -= Chi_1 ; psi_dVgb -= Chi_1_dVgb ; psi_dVxb -= Chi_1_dVxb ; psi += beta*0.1 ; psi_B = psi; arg_B = psi*psi/(gamma*T0); Chi_B = log(gamma*T0 + psi*psi) - log(cnst1over*T0) + beta*Vxbgmtcl; Chi_B_dVgb = 2.0*psi*psi_dVgb/ (gamma*T0 + psi*psi); Chi_B_dVxb = (gamma_dVxb*T0+2.0*psi*psi_dVxb)/(gamma*T0+psi*psi) + beta*Vxbgmtcl_dVxbgmt; Ps0_iniB = Chi_B/beta - Vxbgmtcl ; Ps0_iniB_dVgb = Chi_B_dVgb/beta; Ps0_iniB_dVxb = Chi_B_dVxb/beta- Vxbgmtcl_dVxbgmt; /* construction of Ps0LD by taking Ps0_iniB as an upper limit of Ps0_iniA * * Limiting is done for Chi rather than for Ps0LD, to avoid shifting * for Fn_SU2 */ Chi_A = Chi; Chi_A_dVxb = Chi_dVxb; Chi_A_dVgb = Chi_dVgb; Fn_SU2( Chi, Chi_A, Chi_B, c_ps0ini_2*75.00, T1, T2 ); /* org: 50 */ Chi_dVgb = Chi_A_dVgb * T1 + Chi_B_dVgb * T2; Chi_dVxb = Chi_A_dVxb * T1 + Chi_B_dVxb * T2; } /* updating Ps0LD */ Ps0LD= Chi/beta - Vxbgmtcl ; Ps0LD_dVgb = Chi_dVgb/beta; Ps0LD_dVxb = Chi_dVxb/beta- Vxbgmtcl_dVxbgmt; T1 = Chi - 1.0 + exp(-Chi); T1_dVxb = (1.0 - exp(-Chi)) * Chi_dVxb ; T1_dVgb = (1.0 - exp(-Chi)) * Chi_dVgb ; if (T1 < epsm10) { T1 = epsm10 ; T1_dVxb = 0.0 ; T1_dVgb = 0.0 ; } T2 = sqrt(T1); QbuLD = here->HSM2_cnst0over * T2 ; T3 = here->HSM2_cnst0over * 0.5 / T2 ; QbuLD_dVxb = T3 * T1_dVxb ; QbuLD_dVgb = T3 * T1_dVgb ; /*-----------------------------------------------------------* * QsuLD : Qovs or Qovd in unit area. * note: QsuLD = Qdep+Qinv. *-----------------*/ QsuLD = Cox0 * ( VgpLD - Ps0LD ) ; QsuLD_dVxb = Cox0 * ( - Ps0LD_dVxb ) ; QsuLD_dVgb = Cox0 * ( VgpLD_dVgb - Ps0LD_dVgb ) ; if ( model->HSM2_coqovsm == 1 ) { /* take initial values from analytical model */ /*---------------------------------------------------* * Calculation of Ps0LD. (beginning of Newton loop) * - Fs0 : Fs0 = 0 is the equation to be solved. * - dPs0 : correction value. *-----------------*/ /* initial value too close to flat band should not be used */ exp_bVbs = exp( beta * - Vxbgmtcl ) ; T0 = here->HSM2_nin / pParam->HSM2_nover; cnst1over = T0 * T0; cfs1 = cnst1over * exp_bVbs ; flg_conv = 0 ; for ( lp_s0 = 1 ; lp_s0 <= 2*lp_s0_max + 1 ; lp_s0 ++ ) { Chi = beta * ( Ps0LD + Vxbgmtcl ) ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0LD) *-----------------*/ fi = Chi * Chi * Chi * ( cn_im53 + Chi * ( cn_im54 + Chi * cn_im55 ) ) ; fi_dChi = Chi * Chi * ( 3 * cn_im53 + Chi * ( 4 * cn_im54 + Chi * 5 * cn_im55 ) ) ; fs01 = cfs1 * fi * fi ; fs01_dPs0 = cfs1 * beta * 2 * fi * fi_dChi ; fb = Chi * ( cn_nc51 + Chi * ( cn_nc52 + Chi * ( cn_nc53 + Chi * ( cn_nc54 + Chi * cn_nc55 ) ) ) ) ; fb_dChi = cn_nc51 + Chi * ( 2 * cn_nc52 + Chi * ( 3 * cn_nc53 + Chi * ( 4 * cn_nc54 + Chi * 5 * cn_nc55 ) ) ) ; fs02 = sqrt( fb * fb + fs01 + small ) ; fs02_dPs0 = ( beta * fb_dChi * 2 * fb + fs01_dPs0 ) / ( fs02 + fs02 ) ; } else { /*-------------------------------------------* * zone-D3. (Ps0LD) *-----------------*/ if ( Chi < large_arg ) { /* avoid exp_Chi to become extremely large */ exp_Chi = exp( Chi ) ; fs01 = cfs1 * ( exp_Chi - 1.0e0 ) ; fs01_dPs0 = cfs1 * beta * ( exp_Chi ) ; } else { exp_bPs0 = exp( beta*Ps0LD ) ; fs01 = cnst1over * ( exp_bPs0 - exp_bVbs ) ; fs01_dPs0 = cnst1over * beta * exp_bPs0 ; } fs02 = sqrt( Chi - 1.0 + fs01 ) ; fs02_dPs0 = ( beta + fs01_dPs0 ) / fs02 * 0.5 ; } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * Fs0 *-----------------*/ Fs0 = VgpLD - Ps0LD - fac1 * fs02 ; Fs0_dPs0 = - 1.0e0 - fac1 * fs02_dPs0 ; if ( flg_conv == 1 ) break ; dPs0 = - Fs0 / Fs0_dPs0 ; /*-------------------------------------------* * Update Ps0LD . *-----------------*/ dPlim = 0.5*dP_max*(1.0 + Fn_Max(1.e0,fabs(Ps0LD))) ; if ( fabs( dPs0 ) > dPlim ) dPs0 = dPlim * Fn_Sgn( dPs0 ) ; Ps0LD = Ps0LD + dPs0 ; TX = -Vxbgmtcl + ps_conv / 2 ; if ( Ps0LD < TX ) Ps0LD = TX ; /*-------------------------------------------* * Check convergence. *-----------------*/ if ( fabs( dPs0 ) <= ps_conv && fabs( Fs0 ) <= gs_conv ) { flg_conv = 1 ; } } /* end of Ps0LD Newton loop */ /*-------------------------------------------* * Procedure for diverged case. *-----------------*/ if ( flg_conv == 0 ) { fprintf( stderr , "*** warning(HiSIM_HV): Went Over Iteration Maximum (Ps0LD)\n" ) ; fprintf( stderr , " -Vxbgmtcl = %e Vgbgmt = %e\n" , -Vxbgmtcl , Vgbgmt ) ; } /*---------------------------------------------------* * Evaluate derivatives of Ps0LD. *-----------------*/ if ( Chi < znbd5 ) { fs01_dVbs = cfs1 * beta * fi * ( - fi + 2 * fi_dChi ) ; /* fs01_dVxbgmtcl */ T2 = 1.0e0 / ( fs02 + fs02 ) ; fs02_dVbs = ( + beta * fb_dChi * 2 * fb + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */ } else { if ( Chi < large_arg ) { fs01_dVbs = + cfs1 * beta ; /* fs01_dVxbgmtcl */ } else { fs01_dVbs = + cfs1 * beta ; } T2 = 0.5e0 / fs02 ; fs02_dVbs = ( + beta + fs01_dVbs ) * T2 ; /* fs02_dVxbgmtcl */ } T1 = 1.0 / Fs0_dPs0 ; Ps0LD_dVxb = - ( - fac1 * fs02_dVbs ) * T1 ; Ps0LD_dVds = 0.0 ; Ps0LD_dVgb = - ( VgpLD_dVgb - fac1_dVgs * fs02 ) * T1 ; if ( Chi < znbd5 ) { /*-------------------------------------------* * zone-D1/D2. (Ps0LD) *-----------------*/ if ( Chi < znbd3 ) { flg_ovzone = 1; } else { flg_ovzone = 2; } Xi0 = fb * fb + epsm10 ; T1 = 2 * fb * fb_dChi * beta ; Xi0_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0_dVxbgmtcl */ Xi0_dVds = T1 * Ps0LD_dVds ; Xi0_dVgs = T1 * Ps0LD_dVgb ; Xi0p12 = fb + epsm10 ; T1 = fb_dChi * beta ; Xi0p12_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p12_dVxbgmtcl */ Xi0p12_dVds = T1 * Ps0LD_dVds ; Xi0p12_dVgs = T1 * Ps0LD_dVgb ; Xi0p32 = fb * fb * fb + epsm10 ; T1 = 3 * fb * fb * fb_dChi * beta ; Xi0p32_dVbs = T1 * ( Ps0LD_dVxb + 1.0 ) ; /* Xi0p32_dVxbgmtcl */ Xi0p32_dVds = T1 * Ps0LD_dVds ; Xi0p32_dVgs = T1 * Ps0LD_dVgb ; } else { /*-------------------------------------------* * zone-D3. (Ps0LD) *-----------------*/ flg_ovzone = 3 ; Xi0 = Chi - 1.0e0 ; Xi0_dVbs = beta * ( Ps0LD_dVxb + 1.0e0 ) ; /* Xi0_dVxbgmtcl */ Xi0_dVds = beta * Ps0LD_dVds ; Xi0_dVgs = beta * Ps0LD_dVgb ; Xi0p12 = sqrt( Xi0 ) ; T1 = 0.5e0 / Xi0p12 ; Xi0p12_dVbs = T1 * Xi0_dVbs ; Xi0p12_dVds = T1 * Xi0_dVds ; Xi0p12_dVgs = T1 * Xi0_dVgs ; Xi0p32 = Xi0 * Xi0p12 ; T1 = 1.5e0 * Xi0p12 ; Xi0p32_dVbs = T1 * Xi0_dVbs ; Xi0p32_dVds = T1 * Xi0_dVds ; Xi0p32_dVgs = T1 * Xi0_dVgs ; if ( Chi < large_arg ) { } else { } } /* end of if ( Chi ... ) block */ /*-----------------------------------------------------------* * - Recalculate the derivatives of fs01 and fs02. *-----------------*/ fs01_dVbs = Ps0LD_dVxb * fs01_dPs0 + fs01_dVbs ; fs01_dVds = Ps0LD_dVds * fs01_dPs0 ; fs01_dVgs = Ps0LD_dVgb * fs01_dPs0 ; fs02_dVbs = Ps0LD_dVxb * fs02_dPs0 + fs02_dVbs ; fs02_dVxb = Ps0LD_dVds * fs02_dPs0 ; fs02_dVgb = Ps0LD_dVgb * fs02_dPs0 ; /*-----------------------------------------------------------* * QbuLD and QiuLD *-----------------*/ QbuLD = here->HSM2_cnst0over * Xi0p12 ; QbuLD_dVxb = here->HSM2_cnst0over * Xi0p12_dVbs ; QbuLD_dVgb = here->HSM2_cnst0over * Xi0p12_dVgs ; T1 = 1.0 / ( fs02 + Xi0p12 ) ; QiuLD = here->HSM2_cnst0over * fs01 * T1 ; T2 = 1.0 / ( fs01 + epsm10 ) ; QiuLD_dVbs = QiuLD * ( fs01_dVbs * T2 - ( fs02_dVbs + Xi0p12_dVbs ) * T1 ) ; QiuLD_dVgs = QiuLD * ( fs01_dVgs * T2 - ( fs02_dVgb + Xi0p12_dVgs ) * T1 ) ; /*-----------------------------------------------------------* * Extrapolation: X_dVxbgmt = X_dVxbgmtcl * Vxbgmtcl_dVxbgmt *-----------------*/ QbuLD_dVxb *= Vxbgmtcl_dVxbgmt ; QiuLD_dVbs *= Vxbgmtcl_dVxbgmt ; /*-----------------------------------------------------------* * Total overlap charge *-----------------*/ QsuLD = QbuLD + QiuLD; QsuLD_dVxb = QbuLD_dVxb + QiuLD_dVbs; QsuLD_dVgb = QbuLD_dVgb + QiuLD_dVgs; } /* end of COQOVSM branches */ } /* end of Vgbgmt region blocks */ /* convert to source ref. */ QsuLD_dVbs = - (QsuLD_dVxb + QsuLD_dVgb) ; QsuLD_dVds = QsuLD_dVxb * flg_overd ; QsuLD_dVgs = QsuLD_dVgb ; QbuLD_dVbs = - (QbuLD_dVxb + QbuLD_dVgb) ; QbuLD_dVds = QbuLD_dVxb * flg_overd ; QbuLD_dVgs = QbuLD_dVgb ; /* inversion charge = total - depletion */ QiuLD = QsuLD - QbuLD ; QiuLD_dVbs = QsuLD_dVbs - QbuLD_dVbs ; QiuLD_dVds = QsuLD_dVds - QbuLD_dVds ; QiuLD_dVgs = QsuLD_dVgs - QbuLD_dVgs ; /* assign final outputs of Qover model */ /* note: Qovs and Qovd are exchanged in reverse mode */ T4 = here->HSM2_weff_nf * Lov ; if(flg_ovloops) { Qovs = T4 * QsuLD ; Qovs_dVbs = T4 * QsuLD_dVbs ; Qovs_dVds = T4 * QsuLD_dVds ; Qovs_dVgs = T4 * QsuLD_dVgs ; QisLD = T4 * QiuLD ; QisLD_dVbs = T4 * QiuLD_dVbs ; QisLD_dVds = T4 * QiuLD_dVds ; QisLD_dVgs = T4 * QiuLD_dVgs ; QbsLD = T4 * QbuLD ; QbsLD_dVbs = T4 * QbuLD_dVbs ; QbsLD_dVds = T4 * QbuLD_dVds ; QbsLD_dVgs = T4 * QbuLD_dVgs ; } if(flg_ovloopd) { Qovd = T4 * QsuLD ; Qovd_dVbs = T4 * QsuLD_dVbs ; Qovd_dVds = T4 * QsuLD_dVds ; Qovd_dVgs = T4 * QsuLD_dVgs ; QidLD = T4 * QiuLD ; QidLD_dVbs = T4 * QiuLD_dVbs ; QidLD_dVds = T4 * QiuLD_dVds ; QidLD_dVgs = T4 * QiuLD_dVgs ; QbdLD = T4 * QbuLD ; QbdLD_dVbs = T4 * QbuLD_dVbs ; QbdLD_dVds = T4 * QbuLD_dVds ; QbdLD_dVgs = T4 * QbuLD_dVgs ; } } /* end of lcover loop */ /* convert to the derivatives w.r.t. mode-dependent biases */ Qovs_dVds = ModeNML * Qovs_dVds - ModeRVS * ( Qovs_dVds + Qovs_dVgs + Qovs_dVbs ) ; QisLD_dVds = ModeNML * QisLD_dVds - ModeRVS * ( QisLD_dVds + QisLD_dVgs + QisLD_dVbs ) ; QbsLD_dVds = ModeNML * QbsLD_dVds - ModeRVS * ( QbsLD_dVds + QbsLD_dVgs + QbsLD_dVbs ) ; Qovd_dVds = ModeNML * Qovd_dVds - ModeRVS * ( Qovd_dVds + Qovd_dVgs + Qovd_dVbs ); QidLD_dVds = ModeNML * QidLD_dVds - ModeRVS * ( QidLD_dVds + QidLD_dVgs + QidLD_dVbs ) ; QbdLD_dVds = ModeNML * QbdLD_dVds - ModeRVS * ( QbdLD_dVds + QbdLD_dVgs + QbdLD_dVbs ) ; } /* end of if ( pParam->HSM2_nover == 0.0 ) */ /*-----------------------------------* * Additional constant capacitance model *-----------------*/ flg_overgiven = ( (int)ModeRVS * model->HSM2_cgso_Given + (int)ModeNML * model->HSM2_cgdo_Given ) ; if ( flg_overgiven ) { Cgdo = ModeRVS * pParam->HSM2_cgso + ModeNML * pParam->HSM2_cgdo ; Cgdo *= - here->HSM2_weff_nf ; Qgod += - Cgdo * (Vgs - Vds) ; Qgod_dVds += Cgdo ; Qgod_dVgs += -Cgdo ; } flg_overgiven = ( (int)ModeNML * model->HSM2_cgso_Given + (int)ModeRVS * model->HSM2_cgdo_Given ) ; if(flg_overgiven) { Cgso = ModeNML * pParam->HSM2_cgso + ModeRVS * pParam->HSM2_cgdo ; Cgso *= - here->HSM2_weff_nf ; Qgos += - Cgso * Vgs ; Qgos_dVgs += -Cgso ; } } else { /* else case of if ( model->HSM2_coovlp >= 1 ) */ if ( (here->HSM2_mode == HiSIM_NORMAL_MODE && !model->HSM2_cgdo_Given) || (here->HSM2_mode != HiSIM_NORMAL_MODE && !model->HSM2_cgso_Given) ) { Cgdo = - Cox0 * pParam->HSM2_lover * here->HSM2_weff_nf ; } else { Cgdo = ModeRVS * pParam->HSM2_cgso + ModeNML * pParam->HSM2_cgdo ; Cgdo *= - here->HSM2_weff_nf ; } Qgod = - Cgdo * (Vgs - Vds) ; Qgod_dVbs = 0.0 ; Qgod_dVds = Cgdo ; Qgod_dVgs = - Cgdo ; if ( (here->HSM2_mode == HiSIM_NORMAL_MODE && !model->HSM2_cgso_Given) || (here->HSM2_mode != HiSIM_NORMAL_MODE && !model->HSM2_cgdo_Given) ) { Cgso = - Cox0 * pParam->HSM2_lover * here->HSM2_weff_nf ; } else { Cgso = ModeNML * pParam->HSM2_cgso + ModeRVS * pParam->HSM2_cgdo ; Cgso *= - here->HSM2_weff_nf ; } Qgos = - Cgso * Vgs ; Qgos_dVbs = 0.0 ; Qgos_dVds = 0.0 ; Qgos_dVgs = - Cgso ; } /* end of if ( model->HSM2_coovlp >= 1 ) */ /*-------------------------------------------* * Gate/Bulk overlap charge: Qgbo *-----------------*/ Cgbo_loc = - model->HSM2_cgbo * here->HSM2_lgate ; Qgbo = - Cgbo_loc * (Vgs -Vbs) ; Qgbo_dVgs = - Cgbo_loc ; Qgbo_dVbs = Cgbo_loc ; Qgbo_dVds = 0.0 ; /*---------------------------------------------------* * Lateral-field-induced capacitance. *-----------------*/ if ( model->HSM2_coqy == 0 || model->HSM2_xqy == 0 ){ Qy = 0.0e0 ; Qy_dVds = 0.0e0 ; Qy_dVgs = 0.0e0 ; Qy_dVbs = 0.0e0 ; } else { Pslk = Ec * Leff + Ps0 ; Pslk_dVbs = Ec_dVbs * Leff + Ps0_dVbs; Pslk_dVds = Ec_dVds * Leff + Ps0_dVds; Pslk_dVgs = Ec_dVgs * Leff + Ps0_dVgs; Fn_SU2( T10, (Pslk + C_PSLK_SHIFT), (Psdl + C_PSLK_SHIFT), C_PSLK_DELTA, T1, T2 ); Pslk_dVbs = Pslk_dVbs * T1 + Psdl_dVbs * T2; Pslk_dVds = Pslk_dVds * T1 + Psdl_dVds * T2; Pslk_dVgs = Pslk_dVgs * T1 + Psdl_dVgs * T2; Pslk = T10 - C_PSLK_SHIFT; /* suppress Qy in accumulation region */ /* Aclm_eff = 1.0 - Pds / (eps_qy + Pds) * (1.0 - Aclm) ; Aclm_eff_dVds = eps_qy * Pds_dVds / ((eps_qy + Pds)*(eps_qy + Pds)) ; Aclm_eff_dVgs = eps_qy * Pds_dVgs / ((eps_qy + Pds)*(eps_qy + Pds)) ; Aclm_eff_dVbs = eps_qy * Pds_dVbs / ((eps_qy + Pds)*(eps_qy + Pds)) ; */ Aclm_eff = Aclm ; Aclm_eff_dVds = Aclm_eff_dVgs = Aclm_eff_dVbs = 0.0 ; T1 = Aclm_eff * ( Vds + Ps0 ) + ( 1.0e0 - Aclm_eff ) * Pslk ; T1_dVb = Aclm_eff * ( Ps0_dVbs ) + ( 1.0e0 - Aclm_eff ) * Pslk_dVbs + Aclm_eff_dVbs * ( Vds + Ps0 - Pslk ) ; T1_dVd = Aclm_eff * ( 1.0 + Ps0_dVds ) + ( 1.0e0 - Aclm_eff ) * Pslk_dVds + Aclm_eff_dVds * ( Vds + Ps0 - Pslk ) ; T1_dVg = Aclm_eff * ( Ps0_dVgs ) + ( 1.0e0 - Aclm_eff ) * Pslk_dVgs + Aclm_eff_dVgs * ( Vds + Ps0 - Pslk ) ; T10 = here->HSM2_wdpl ; T3 = T10 * 1.3 ; T2 = C_ESI * here->HSM2_weff_nf * T3 ; T7 = 1.0e-9 ; /* 1nm */ T0 = Fn_Max( model->HSM2_xqy , T7 ) ; T4 = T2 / T0 ; Qy = - ( Ps0 + Vds - T1 ) * T4 ; Qy_dVds = - ( Ps0_dVds + 1.0e0 - T1_dVd ) * T4 ; Qy_dVgs = - ( Ps0_dVgs - T1_dVg ) * T4 ; Qy_dVbs = - ( Ps0_dVbs - T1_dVb ) * T4 ; } if ( model->HSM2_xqy1 != 0.0 ){ Qy += here->HSM2_cqyb0 * Vbs ; Qy_dVbs += here->HSM2_cqyb0 ; } Qy = Qy * FMDVDS ; Qy_dVbs = Qy_dVbs * FMDVDS + Qy * FMDVDS_dVbs ; Qy_dVds = Qy_dVds * FMDVDS + Qy * FMDVDS_dVds ; Qy_dVgs = Qy_dVgs * FMDVDS + Qy * FMDVDS_dVgs ; /*---------------------------------------------------* * Fringing capacitance. *-----------------*/ Cf = here->HSM2_cfrng ; Qfd = Cf * ( Vgs - Vds ) ; Qfs = Cf * Vgs ; /*-----------------------------------------------------------* * End of PART-3. (label) *-----------------*/ /* end_of_part_3:*/ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-4: Substrate-source/drain junction diode. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Cbsj, Cbdj: node-base S/D biases. *-----------------*/ T10 = model->HSM2_cvb * here->HSM2_jd_nvtm_inv ; T11 = model->HSM2_cvbk * here->HSM2_jd_nvtm_inv ; T9 = model->HSM2_cisb * here->HSM2_exptemp ; T0 = here->HSM2_isbd2 * T9 ; T2 = exp (- vbd_jct * T10 ); T2_dVb = - T2 * T10 ; T3 = exp (- vbd_jct * T11 ); T3_dVb = - T3 * T11 ; /* ibd */ if ( vbd_jct < here->HSM2_vbdt ) { TX = vbd_jct * here->HSM2_jd_nvtm_inv ; if ( TX < - EXP_THR ) { T1 = 0.0 ; T1_dVb = 0.0 ; } else { T1 = exp ( TX ) ; T1_dVb = T1 * here->HSM2_jd_nvtm_inv ; } Ibd = here->HSM2_isbd * (T1 - 1.0) + T0 * (T2 - 1.0) + pParam->HSM2_cisbk * (T3 - 1.0); Gbd = here->HSM2_isbd * T1_dVb + T0 * T2_dVb + pParam->HSM2_cisbk * T3_dVb ; } else { T1 = here->HSM2_jd_expcd ; T4 = here->HSM2_isbd * here->HSM2_jd_nvtm_inv * T1 ; Ibd = here->HSM2_isbd * (T1 - 1.0) + T4 * (vbd_jct - here->HSM2_vbdt) + T0 * (T2 - 1.0) + pParam->HSM2_cisbk * (T3 - 1.0) ; Gbd = T4 + T0 * T2_dVb + pParam->HSM2_cisbk * T3_dVb ; } T12 = model->HSM2_divx * here->HSM2_isbd2 ; Ibd += T12 * vbd_jct ; Gbd += T12 ; /* ibs */ T0 = here->HSM2_isbs2 * T9 ; TX = - vbs_jct * T10 ; if ( TX < - EXP_THR ) { T2 = 0.0 ; T2_dVb = 0.0 ; } else { T2 = exp ( TX ); T2_dVb = - T2 * T10 ; } TX = - vbs_jct * T11 ; if ( TX < - EXP_THR ) { T3 = 0.0 ; T3_dVb = 0.0 ; } else { T3 = exp ( TX ); T3_dVb = - T3 * T11 ; } if ( vbs_jct < here->HSM2_vbst ) { TX = vbs_jct * here->HSM2_jd_nvtm_inv ; if ( TX < - EXP_THR ) { T1 = 0.0 ; T1_dVb = 0.0 ; } else { T1 = exp ( TX ) ; T1_dVb = T1 * here->HSM2_jd_nvtm_inv ; } Ibs = here->HSM2_isbs * (T1 - 1.0) + T0 * (T2 - 1.0) + pParam->HSM2_cisbk * (T3 - 1.0); Gbs = here->HSM2_isbs * T1_dVb + T0 * T2_dVb + pParam->HSM2_cisbk * T3_dVb ; } else { T1 = here->HSM2_jd_expcs ; T4 = here->HSM2_isbs * here->HSM2_jd_nvtm_inv * T1 ; Ibs = here->HSM2_isbs * (T1 - 1.0) + T4 * (vbs_jct - here->HSM2_vbst) + T0 * (T2 - 1.0) + pParam->HSM2_cisbk * (T3 - 1.0) ; Gbs = T4 + T0 * T2_dVb + pParam->HSM2_cisbk * T3_dVb ; } T12 = model->HSM2_divx * here->HSM2_isbs2 ; Ibs += T12 * vbs_jct ; Gbs += T12 ; /*---------------------------------------------------* * Add Gjmin. *-----------------*/ Ibd += Gjmin * vbd_jct ; Ibs += Gjmin * vbs_jct ; Gbd += Gjmin ; Gbs += Gjmin ; /*-----------------------------------------------------------* * Charges and Capacitances. *-----------------*/ /* charge storage elements * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ /* add new parameters tcjbs : temperature dependence of czbs tcjbd : temperature dependence of czbd tcjbssw : temperature dependence of czbssw tcjbdsw : temperature dependence of czbdsw tcjbsswg : temperature dependence of czbsswg tcjbdswg : temperature dependence of czbdswg */ tcjbd=model->HSM2_tcjbd; tcjbs=model->HSM2_tcjbs; tcjbdsw=model->HSM2_tcjbdsw; tcjbssw=model->HSM2_tcjbssw; tcjbdswg=model->HSM2_tcjbdswg; tcjbsswg=model->HSM2_tcjbsswg; czbs = model->HSM2_cj * here->HSM2_as ; czbs = czbs * ( 1.0 + tcjbs * ( TTEMP - model->HSM2_ktnom )) ; czbd = model->HSM2_cj * here->HSM2_ad ; czbd = czbd * ( 1.0 + tcjbd * ( TTEMP - model->HSM2_ktnom )) ; /* Source Bulk Junction */ if (here->HSM2_ps > here->HSM2_weff_nf) { czbssw = model->HSM2_cjsw * ( here->HSM2_ps - here->HSM2_weff_nf ) ; czbssw = czbssw * ( 1.0 + tcjbssw * ( TTEMP - model->HSM2_ktnom )) ; czbsswg = model->HSM2_cjswg * here->HSM2_weff_nf ; czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSM2_ktnom )) ; if (vbs_jct == 0.0) { Qbs = 0.0 ; Capbs = czbs + czbssw + czbsswg ; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->HSM2_pb ; if (model->HSM2_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mj ) ; Qbs = model->HSM2_pb * czbs * (1.0 - arg * sarg) / (1.0 - model->HSM2_mj) ; Capbs = czbs * sarg ; } else { Qbs = 0.0 ; Capbs = 0.0 ; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->HSM2_pbsw ; if (model->HSM2_mjsw == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjsw ) ; Qbs += model->HSM2_pbsw * czbssw * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjsw) ; Capbs += czbssw * sarg ; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->HSM2_pbswg ; if (model->HSM2_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjswg ) ; Qbs += model->HSM2_pbswg * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjswg) ; Capbs += czbsswg * sarg ; } } else { T1 = czbs + czbssw + czbsswg ; T2 = czbs * model->HSM2_mj / model->HSM2_pb + czbssw * model->HSM2_mjsw / model->HSM2_pbsw + czbsswg * model->HSM2_mjswg / model->HSM2_pbswg ; Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ; Capbs = T1 + vbs_jct * T2 ; } } else { czbsswg = model->HSM2_cjswg * here->HSM2_ps ; czbsswg = czbsswg * ( 1.0 + tcjbsswg * ( TTEMP - model->HSM2_ktnom )) ; if (vbs_jct == 0.0) { Qbs = 0.0 ; Capbs = czbs + czbsswg ; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->HSM2_pb ; if (model->HSM2_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mj ) ; Qbs = model->HSM2_pb * czbs * (1.0 - arg * sarg) / (1.0 - model->HSM2_mj) ; Capbs = czbs * sarg ; } else { Qbs = 0.0 ; Capbs = 0.0 ; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->HSM2_pbswg ; if (model->HSM2_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjswg ) ; Qbs += model->HSM2_pbswg * czbsswg * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjswg) ; Capbs += czbsswg * sarg ; } } else { T1 = czbs + czbsswg ; T2 = czbs * model->HSM2_mj / model->HSM2_pb + czbsswg * model->HSM2_mjswg / model->HSM2_pbswg ; Qbs = vbs_jct * (T1 + vbs_jct * 0.5 * T2) ; Capbs = T1 + vbs_jct * T2 ; } } /* Drain Bulk Junction */ if (here->HSM2_pd > here->HSM2_weff_nf) { czbdsw = model->HSM2_cjsw * ( here->HSM2_pd - here->HSM2_weff_nf ) ; czbdsw = czbdsw * ( 1.0 + tcjbdsw * ( TTEMP - model->HSM2_ktnom )) ; czbdswg = model->HSM2_cjswg * here->HSM2_weff_nf ; czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSM2_ktnom )) ; if (vbd_jct == 0.0) { Qbd = 0.0 ; Capbd = czbd + czbdsw + czbdswg ; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->HSM2_pb ; if (model->HSM2_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mj ) ; Qbd = model->HSM2_pb * czbd * (1.0 - arg * sarg) / (1.0 - model->HSM2_mj) ; Capbd = czbd * sarg ; } else { Qbd = 0.0 ; Capbd = 0.0 ; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->HSM2_pbsw ; if (model->HSM2_mjsw == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjsw ) ; Qbd += model->HSM2_pbsw * czbdsw * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjsw) ; Capbd += czbdsw * sarg ; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->HSM2_pbswg ; if (model->HSM2_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjswg ) ; Qbd += model->HSM2_pbswg * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjswg) ; Capbd += czbdswg * sarg ; } } else { T1 = czbd + czbdsw + czbdswg ; T2 = czbd * model->HSM2_mj / model->HSM2_pb + czbdsw * model->HSM2_mjsw / model->HSM2_pbsw + czbdswg * model->HSM2_mjswg / model->HSM2_pbswg ; Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ; Capbd = T1 + vbd_jct * T2 ; } } else { czbdswg = model->HSM2_cjswg * here->HSM2_pd ; czbdswg = czbdswg * ( 1.0 + tcjbdswg * ( TTEMP - model->HSM2_ktnom )) ; if (vbd_jct == 0.0) { Qbd = 0.0 ; Capbd = czbd + czbdswg ; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->HSM2_pb ; if (model->HSM2_mj == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mj ) ; Qbd = model->HSM2_pb * czbd * (1.0 - arg * sarg) / (1.0 - model->HSM2_mj) ; Capbd = czbd * sarg ; } else { Qbd = 0.0 ; Capbd = 0.0 ; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->HSM2_pbswg ; if (model->HSM2_mjswg == 0.5) sarg = 1.0 / sqrt(arg) ; else sarg = Fn_Pow( arg , -model->HSM2_mjswg ) ; Qbd += model->HSM2_pbswg * czbdswg * (1.0 - arg * sarg) / (1.0 - model->HSM2_mjswg) ; Capbd += czbdswg * sarg ; } } else { T1 = czbd + czbdswg ; T2 = czbd * model->HSM2_mj / model->HSM2_pb + czbdswg * model->HSM2_mjswg / model->HSM2_pbswg ; Qbd = vbd_jct * (T1 + vbd_jct * 0.5 * T2) ; Capbd = T1 + vbd_jct * T2 ; } } /*-----------------------------------------------------------* * End of PART-4. (label) *-----------------*/ /* end_of_part_4:*/ /*-----------------------------------------------------------* * PART-5: NQS. (label) *-----------------*/ if (flg_nqs) { if(ckt->CKTmode & MODETRAN){ if( ckt->CKTmode & MODEINITTRAN ){ Qi_nqs = Qi ; Qi_dVgs_nqs = Qi_dVgs ; Qi_dVds_nqs = Qi_dVds ; Qi_dVbs_nqs = Qi_dVbs ; Qb_nqs = Qb ; Qb_dVgs_nqs = Qb_dVgs ; Qb_dVds_nqs = Qb_dVds ; Qb_dVbs_nqs = Qb_dVbs ; } else { /* tau for inversion charge */ if (flg_noqi == 0) { T12 = model->HSM2_dly1; T10 = model->HSM2_dly2; T3 = Lch ; T1 = T10 * T12 * T3 * T3 ; T2 = Mu * VgVt * T12 + T10 * T3 * T3 + small ; tau = T1 / T2 ; T1_dVg = T10 * T12 * 2.0 * T3 * Lch_dVgs ; T1_dVd = T10 * T12 * 2.0 * T3 * Lch_dVds ; T1_dVb = T10 * T12 * 2.0 * T3 * Lch_dVbs ; T2_dVg = T12 * Mu_dVgs * VgVt + T12 * Mu * VgVt_dVgs + T10 * 2.0 * T3 * Lch_dVgs ; T2_dVd = T12 * Mu_dVds * VgVt + T12 * Mu * VgVt_dVds + T10 * 2.0 * T3 * Lch_dVds ; T2_dVb = T12 * Mu_dVbs * VgVt + T12 * Mu * VgVt_dVbs + T10 * 2.0 * T3 * Lch_dVbs ; T4 = 1.0 / ( T2 * T2 ) ; tau_dVgs = ( T2 * T1_dVg - T1 * T2_dVg ) * T4 ; tau_dVds = ( T2 * T1_dVd - T1 * T2_dVd ) * T4 ; tau_dVbs = ( T2 * T1_dVb - T1 * T2_dVb ) * T4 ; } else { tau = model->HSM2_dly1 + small ; tau_dVgs = tau_dVds = tau_dVbs = 0.0 ; } T1 = ckt->CKTdelta ; /* Calculation of Qi */ Qi_prev = *(ckt->CKTstate1 + here->HSM2qi_nqs) ; T2 = T1 + tau ; T0 = Qi - Qi_prev ; Qi_nqs = Qi_prev + T1 / T2 * T0; T3 = T1 / T2 ; T4 = T0 / T2 ; Qi_dVgs_nqs = T3 * (Qi_dVgs - T4 * tau_dVgs); Qi_dVds_nqs = T3 * (Qi_dVds - T4 * tau_dVds); Qi_dVbs_nqs = T3 * (Qi_dVbs - T4 * tau_dVbs); /* tau for bulk charge */ T2 = modelMKS->HSM2_dly3 ; taub = T2 * Cox ; taub_dVgs = T2 * Cox_dVg ; taub_dVds = T2 * Cox_dVd ; taub_dVbs = T2 * Cox_dVb ; /* Calculation of Qb */ Qb_prev = *(ckt->CKTstate1 + here->HSM2qb_nqs) ; T2 = T1 + taub ; T0 = Qb - Qb_prev ; Qb_nqs = Qb_prev + T1 / T2 * T0 ; T3 = T1 / T2 ; T4 = T0 / T2 ; Qb_dVgs_nqs = T3 * (Qb_dVgs - T4 * taub_dVgs) ; Qb_dVds_nqs = T3 * (Qb_dVds - T4 * taub_dVds) ; Qb_dVbs_nqs = T3 * (Qb_dVbs - T4 * taub_dVbs) ; } } else { /* !(CKT_mode & MODETRAN) */ Qi_nqs = Qi ; Qi_dVgs_nqs = Qi_dVgs ; Qi_dVds_nqs = Qi_dVds ; Qi_dVbs_nqs = Qi_dVbs ; Qb_nqs = Qb ; Qb_dVgs_nqs = Qb_dVgs ; Qb_dVds_nqs = Qb_dVds ; Qb_dVbs_nqs = Qb_dVbs ; } } if ( flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG)) ) { /* ACNQS */ if (flg_noqi == 0) { T10 = model->HSM2_dly1 ; T11 = model->HSM2_dly2 ; T12 = Lch ; T1 = T10 * T11 * T12 * T12 ; T2 = Mu * VgVt * T10 + T11 * T12 * T12 + small ; tau = T1 / T2 ; T1_dVg = T10 * T11 * 2.0 * T12 * Lch_dVgs ; T1_dVd = T10 * T11 * 2.0 * T12 * Lch_dVds ; T1_dVb = T10 * T11 * 2.0 * T12 * Lch_dVbs ; T2_dVg = T10 * Mu_dVgs * VgVt + T10 * Mu * VgVt_dVgs + T11 * 2.0 * T12 * Lch_dVgs ; T2_dVd = T10 * Mu_dVds * VgVt + T10 * Mu * VgVt_dVds + T11 * 2.0 * T12 * Lch_dVds ; T2_dVb = T10 * Mu_dVbs * VgVt + T10 * Mu * VgVt_dVbs + T11 * 2.0 * T12 * Lch_dVbs ; T3 = 1.0 / T2 ; tau_dVgs = (T1_dVg - tau * T2_dVg) * T3 ; tau_dVds = (T1_dVd - tau * T2_dVd) * T3 ; tau_dVbs = (T1_dVb - tau * T2_dVb) * T3 ; } else { tau = model->HSM2_dly1 + small ; tau_dVgs = tau_dVds = tau_dVbs = 0.0 ; } T1 = modelMKS->HSM2_dly3 ; taub = T1 * Cox ; taub_dVgs = T1 * Cox_dVg ; taub_dVds = T1 * Cox_dVd ; taub_dVbs = T1 * Cox_dVb ; } /*-----------------------------------------------------------* * End of PART-5. (label) *-----------------*/ /* end_of_part_5: */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-6: Noise Calculation. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * 1/f noise. *-----------------*/ if ( model->HSM2_coflick != 0 && !flg_noqi ) { NFalp = pParam->HSM2_nfalp ; NFtrp = pParam->HSM2_nftrp ; Cit = modelMKS->HSM2_cit ; T1 = Qn0 / C_QE ; T2 = ( Cox + Qn0 / ( Ps0 - Vbs ) + Cit ) * beta_inv / C_QE ; T3 = -2.0E0 * Qi / C_QE / Lch / here->HSM2_weff_nf - T1 ; if ( T3 != T1 ) { T4 = 1.0E0 / ( T1 + T2 ) / ( T3 + T2 ) + 2.0E0 * NFalp * Ey * Mu / ( T3 - T1 ) * log( ( T3 + T2 ) / ( T1 + T2 ) ) + NFalp * Ey * Mu * NFalp * Ey * Mu ; } else { T4 = 1.0 / ( T1 + T2 ) / ( T3 + T2 ) + 2.0 * NFalp * Ey * Mu / ( T1 + T2 ) + NFalp * Ey * Mu * NFalp * Ey * Mu; } Nflic = Ids * Ids * NFtrp / ( Lch * beta * here->HSM2_weff_nf ) * T4 ; } else { Nflic = 0.0 ; } /*-----------------------------------------------------------* * thermal noise. *-----------------*/ if ( model->HSM2_cothrml != 0 && !flg_noqi ) { Eyd = ( Psdl - Ps0 ) / Lch ; T12 = Muun * Eyd / C_vmax ; /* note: model->HSM2_bb = 2 (electron) ;1 (hole) */ if ( 1.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 1.0e0 + epsm10 ) { T7 = 1.0e0 ; } else if ( 2.0e0 - epsm10 <= model->HSM2_bb && model->HSM2_bb <= 2.0e0 + epsm10 ) { T7 = T12 ; } else { T7 = Fn_Pow( Eyd, model->HSM2_bb - 1.0e0 ) ; } T8 = T12 * T7 ; T9 = 1.0e0 + T8 ; T10 = Fn_Pow( T9, ( - 1.0e0 / model->HSM2_bb - 1.0e0 ) ) ; T11 = T9 * T10 ; Mud_hoso = Muun * T11 ; Mu_Ave = ( Mu + Mud_hoso ) / 2.0 ; /* Sid_h = GAMMA * 4.0 * C_KB * model->HSM2_temp * gds0_h2; */ T0 = Alpha * Alpha ; Nthrml = here->HSM2_weff_nf * Cox * VgVt * Mu * ( ( 1e0 + 3e0 * Alpha + 6e0 * T0 ) * Mud_hoso * Mud_hoso + ( 3e0 + 4e0 * Alpha + 3e0 * T0 ) * Mud_hoso * Mu + ( 6e0 + 3e0 * Alpha + T0 ) * Mu * Mu ) / ( 15e0 * Lch * ( 1e0 + Alpha ) * Mu_Ave * Mu_Ave ) ; } else { Nthrml = 0e0 ; } /*----------------------------------------------------------* * induced gate noise. ( Part 2/3 ) *----------------------*/ if ( model->HSM2_coign != 0 && model->HSM2_cothrml != 0 && flg_ign == 1 && !flg_noqi ) { sqrtkusaiL = sqrt( kusaiL ) ; T2 = VgVt + sqrtkusaiL ; T3 = kusai00 * kusai00 ; T4 = kusaiL * kusaiL ; T5 = 42.0e0 * kusai00 * kusaiL ; T5 += 4.0e0 * ( T3 + T4 ) ; T5 += 20.0e0 * sqrtkusaiL * VgVt * ( kusai00 + kusaiL ) ; T10 = T2 * T2 ; T10 *= T10 ; kusai_ig = T5 / ( T10 * T2 ) ; /* Induced Gate Noise parameter */ gds0_ign = here->HSM2_weff_nf / Lch * Mu * Cox ; gds0_h2 = gds0_ign * VgVt ; GAMMA = Nthrml / gds0_h2 ; T7 = kusai00 + 4.0e0 * VgVt * sqrtkusaiL + kusaiL ; /* cross-correlation coefficient (= Sigid/sqrt(Sig*Sid) ) */ crl_f = c_sqrt_15 * kusai00L * T7 / ( 6.0e0 * T2 * sqrt( GAMMA * T2 * VgVt * T5 ) ) ; } /*-----------------------------------------------------------* * End of PART-6. (label) *-----------------*/ /* end_of_part_6: */ /*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ * PART-7: Evaluation of outputs. *++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/ /*-----------------------------------------------------------* * Implicit quantities related to Alpha. *-----------------*/ /* note: T1 = 1 + Delta */ if ( flg_noqi == 0 && VgVt > VgVt_small ) { Delta = fac1 * beta / ( 2 * Xi0p12 ) ; Pslsat = VgVt / ( 1.0 + Delta ) + Ps0 ; } else { Pslsat = 0.0 ; } Vdsat = Pslsat - Pb2 ; if ( Vdsat < 0.0 ) { Vdsat = 0.0 ; } /*-----------------------------------------------------------* * Evaluate the derivatives w.r.t. external biases. * - All derivatives that influence outputs must be modified here. *-----------------*/ /*---------------------------------------------------* * Case ignoring Rs/Rd. *-----------------*/ if ( flg_rsrd != 1 || Ids < 0.0 ) { Ids_dVbse = Ids_dVbs ; Ids_dVdse = Ids_dVds ; Ids_dVgse = Ids_dVgs ; Qb_dVbse = Qb_dVbs ; Qb_dVdse = Qb_dVds ; Qb_dVgse = Qb_dVgs ; Qi_dVbse = Qi_dVbs ; Qi_dVdse = Qi_dVds ; Qi_dVgse = Qi_dVgs ; Qd_dVbse = Qd_dVbs ; Qd_dVdse = Qd_dVds ; Qd_dVgse = Qd_dVgs ; Isub_dVbse = Isub_dVbs ; Isub_dVdse = Isub_dVds ; Isub_dVgse = Isub_dVgs ; IdsIBPC_dVbse = IdsIBPC_dVbs ; IdsIBPC_dVdse = IdsIBPC_dVds ; IdsIBPC_dVgse = IdsIBPC_dVgs ; Igate_dVbse = Igate_dVbs ; Igate_dVdse = Igate_dVds ; Igate_dVgse = Igate_dVgs ; Igd_dVbse = Igd_dVbs ; Igd_dVdse = Igd_dVds ; Igd_dVgse = Igd_dVgs ; Igs_dVbse = Igs_dVbs ; Igs_dVdse = Igs_dVds ; Igs_dVgse = Igs_dVgs ; Igb_dVbse = Igb_dVbs ; Igb_dVdse = Igb_dVds ; Igb_dVgse = Igb_dVgs ; Igidl_dVbse = Igidl_dVbs ; Igidl_dVdse = Igidl_dVds ; Igidl_dVgse = Igidl_dVgs ; Igisl_dVbse = Igisl_dVbs ; Igisl_dVdse = Igisl_dVds ; Igisl_dVgse = Igisl_dVgs ; Qgos_dVbse = Qgos_dVbs ; Qgos_dVdse = Qgos_dVds ; Qgos_dVgse = Qgos_dVgs ; Qgod_dVbse = Qgod_dVbs ; Qgod_dVdse = Qgod_dVds ; Qgod_dVgse = Qgod_dVgs ; Qgbo_dVbse = Qgbo_dVbs ; Qgbo_dVdse = Qgbo_dVds ; Qgbo_dVgse = Qgbo_dVgs ; Qovd_dVbse = Qovd_dVbs ; Qovd_dVdse = Qovd_dVds ; Qovd_dVgse = Qovd_dVgs ; QidLD_dVbse = QidLD_dVbs ; QidLD_dVdse = QidLD_dVds ; QidLD_dVgse = QidLD_dVgs ; QbdLD_dVbse = QbdLD_dVbs ; QbdLD_dVdse = QbdLD_dVds ; QbdLD_dVgse = QbdLD_dVgs ; Qovs_dVbse = Qovs_dVbs ; Qovs_dVdse = Qovs_dVds ; Qovs_dVgse = Qovs_dVgs ; QisLD_dVbse = QisLD_dVbs ; QisLD_dVdse = QisLD_dVds ; QisLD_dVgse = QisLD_dVgs ; QbsLD_dVbse = QbsLD_dVbs ; QbsLD_dVdse = QbsLD_dVds ; QbsLD_dVgse = QbsLD_dVgs ; Qy_dVbse = Qy_dVbs ; Qy_dVdse = Qy_dVds ; Qy_dVgse = Qy_dVgs ; Qdrat_dVbse = Qdrat_dVbs; Qdrat_dVdse = Qdrat_dVds; Qdrat_dVgse = Qdrat_dVgs; GLPART1_dVbse = GLPART1_dVbs ;GLPART1_dVdse = GLPART1_dVds ;GLPART1_dVgse = GLPART1_dVgs ; if (flg_nqs) { /* NQS */ Qi_dVgse_nqs = Qi_dVgs_nqs; Qi_dVdse_nqs = Qi_dVds_nqs; Qi_dVbse_nqs = Qi_dVbs_nqs; Qb_dVgse_nqs = Qb_dVgs_nqs; Qb_dVdse_nqs = Qb_dVds_nqs; Qb_dVbse_nqs = Qb_dVbs_nqs; } if (flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG))) { /* ACNQS */ tau_dVgse = tau_dVgs ; tau_dVdse = tau_dVds ; tau_dVbse = tau_dVbs ; taub_dVgse = taub_dVgs ; taub_dVdse = taub_dVds ; taub_dVbse = taub_dVbs ; } } else { /*---------------------------------------------------* * Case Rs>0 or Rd>0 *-----------------*/ /*-------------------------------------------* * Conductances w.r.t. confined biases. *-----------------*/ Ids_dVbse = Ids_dVbs * DJI ; Ids_dVdse = Ids_dVds * DJI ; Ids_dVgse = Ids_dVgs * DJI ; /*-------------------------------------------* * Derivatives of internal biases w.r.t. external biases. *-----------------*/ Vbs_dVbse = ( 1.0 - Rs * Ids_dVbse ) ; Vbs_dVdse = - Rs * Ids_dVdse ; Vbs_dVgse = - Rs * Ids_dVgse ; Vds_dVbse = - ( Rs + Rd ) * Ids_dVbse ; Vds_dVdse = ( 1.0 - ( Rs + Rd ) * Ids_dVdse ) ; Vds_dVgse = - ( Rs + Rd ) * Ids_dVgse ; Vgs_dVbse = - Rs * Ids_dVbse ; Vgs_dVdse = - Rs * Ids_dVdse ; Vgs_dVgse = ( 1.0 - Rs * Ids_dVgse ) ; /*-------------------------------------------* * Derivatives of charges. *-----------------*/ Qb_dVbse = Qb_dVbs * Vbs_dVbse + Qb_dVds * Vds_dVbse + Qb_dVgs * Vgs_dVbse ; Qb_dVdse = Qb_dVbs * Vbs_dVdse + Qb_dVds * Vds_dVdse + Qb_dVgs * Vgs_dVdse ; Qb_dVgse = Qb_dVbs * Vbs_dVgse + Qb_dVds * Vds_dVgse + Qb_dVgs * Vgs_dVgse ; Qi_dVbse = Qi_dVbs * Vbs_dVbse + Qi_dVds * Vds_dVbse + Qi_dVgs * Vgs_dVbse ; Qi_dVdse = Qi_dVbs * Vbs_dVdse + Qi_dVds * Vds_dVdse + Qi_dVgs * Vgs_dVdse ; Qi_dVgse = Qi_dVbs * Vbs_dVgse + Qi_dVds * Vds_dVgse + Qi_dVgs * Vgs_dVgse ; Qd_dVbse = Qd_dVbs * Vbs_dVbse + Qd_dVds * Vds_dVbse + Qd_dVgs * Vgs_dVbse ; Qd_dVdse = Qd_dVbs * Vbs_dVdse + Qd_dVds * Vds_dVdse + Qd_dVgs * Vgs_dVdse ; Qd_dVgse = Qd_dVbs * Vbs_dVgse + Qd_dVds * Vds_dVgse + Qd_dVgs * Vgs_dVgse ; /*-------------------------------------------* * Substrate/gate/leak conductances. *-----------------*/ Isub_dVbse = Isub_dVbs * Vbs_dVbse + Isub_dVds * Vds_dVbse + Isub_dVgs * Vgs_dVbse ; Isub_dVdse = Isub_dVbs * Vbs_dVdse + Isub_dVds * Vds_dVdse + Isub_dVgs * Vgs_dVdse ; Isub_dVgse = Isub_dVbs * Vbs_dVgse + Isub_dVds * Vds_dVgse + Isub_dVgs * Vgs_dVgse ; IdsIBPC_dVbse = IdsIBPC_dVbs * Vbs_dVbse + IdsIBPC_dVds * Vds_dVbse + IdsIBPC_dVgs * Vgs_dVbse ; IdsIBPC_dVdse = IdsIBPC_dVbs * Vbs_dVdse + IdsIBPC_dVds * Vds_dVdse + IdsIBPC_dVgs * Vgs_dVdse ; IdsIBPC_dVgse = IdsIBPC_dVbs * Vbs_dVgse + IdsIBPC_dVds * Vds_dVgse + IdsIBPC_dVgs * Vgs_dVgse ; Igate_dVbse = Igate_dVbs * Vbs_dVbse + Igate_dVds * Vds_dVbse + Igate_dVgs * Vgs_dVbse ; Igate_dVdse = Igate_dVbs * Vbs_dVdse + Igate_dVds * Vds_dVdse + Igate_dVgs * Vgs_dVdse ; Igate_dVgse = Igate_dVbs * Vbs_dVgse + Igate_dVds * Vds_dVgse + Igate_dVgs * Vgs_dVgse ; Igb_dVbse = Igb_dVbs * Vbs_dVbse + Igb_dVds * Vds_dVbse + Igb_dVgs * Vgs_dVbse ; Igb_dVdse = Igb_dVbs * Vbs_dVdse + Igb_dVds * Vds_dVdse + Igb_dVgs * Vgs_dVdse ; Igb_dVgse = Igb_dVbs * Vbs_dVgse + Igb_dVds * Vds_dVgse + Igb_dVgs * Vgs_dVgse ; Igd_dVbse = Igd_dVbs * Vbs_dVbse + Igd_dVds * Vds_dVbse + Igd_dVgs * Vgs_dVbse ; Igd_dVdse = Igd_dVbs * Vbs_dVdse + Igd_dVds * Vds_dVdse + Igd_dVgs * Vgs_dVdse ; Igd_dVgse = Igd_dVbs * Vbs_dVgse + Igd_dVds * Vds_dVgse + Igd_dVgs * Vgs_dVgse ; Igs_dVbse = Igs_dVbs * Vbs_dVbse + Igs_dVds * Vds_dVbse + Igs_dVgs * Vgs_dVbse ; Igs_dVdse = Igs_dVbs * Vbs_dVdse + Igs_dVds * Vds_dVdse + Igs_dVgs * Vgs_dVdse ; Igs_dVgse = Igs_dVbs * Vbs_dVgse + Igs_dVds * Vds_dVgse + Igs_dVgs * Vgs_dVgse ; Igidl_dVbse = Igidl_dVbs * Vbs_dVbse + Igidl_dVds * Vds_dVbse + Igidl_dVgs * Vgs_dVbse ; Igidl_dVdse = Igidl_dVbs * Vbs_dVdse + Igidl_dVds * Vds_dVdse + Igidl_dVgs * Vgs_dVdse ; Igidl_dVgse = Igidl_dVbs * Vbs_dVgse + Igidl_dVds * Vds_dVgse + Igidl_dVgs * Vgs_dVgse ; Igisl_dVbse = Igisl_dVbs * Vbs_dVbse + Igisl_dVds * Vds_dVbse + Igisl_dVgs * Vgs_dVbse ; Igisl_dVdse = Igisl_dVbs * Vbs_dVdse + Igisl_dVds * Vds_dVdse + Igisl_dVgs * Vgs_dVdse ; Igisl_dVgse = Igisl_dVbs * Vbs_dVgse + Igisl_dVds * Vds_dVgse + Igisl_dVgs * Vgs_dVgse ; GLPART1_dVbse = GLPART1_dVbs * Vbs_dVbse + GLPART1_dVds * Vds_dVbse + GLPART1_dVgs * Vgs_dVbse ; GLPART1_dVdse = GLPART1_dVbs * Vbs_dVdse + GLPART1_dVds * Vds_dVdse + GLPART1_dVgs * Vgs_dVdse ; GLPART1_dVgse = GLPART1_dVbs * Vbs_dVgse + GLPART1_dVds * Vds_dVgse + GLPART1_dVgs * Vgs_dVgse ; /*---------------------------------------------------* * Derivatives of overlap charges. *-----------------*/ Qgos_dVbse = Qgos_dVbs * Vbs_dVbse + Qgos_dVds * Vds_dVbse + Qgos_dVgs * Vgs_dVbse ; Qgos_dVdse = Qgos_dVbs * Vbs_dVdse + Qgos_dVds * Vds_dVdse + Qgos_dVgs * Vgs_dVdse ; Qgos_dVgse = Qgos_dVbs * Vbs_dVgse + Qgos_dVds * Vds_dVgse + Qgos_dVgs * Vgs_dVgse ; Qgod_dVbse = Qgod_dVbs * Vbs_dVbse + Qgod_dVds * Vds_dVbse + Qgod_dVgs * Vgs_dVbse ; Qgod_dVdse = Qgod_dVbs * Vbs_dVdse + Qgod_dVds * Vds_dVdse + Qgod_dVgs * Vgs_dVdse ; Qgod_dVgse = Qgod_dVbs * Vbs_dVgse + Qgod_dVds * Vds_dVgse + Qgod_dVgs * Vgs_dVgse ; Qgbo_dVbse = Qgbo_dVbs * Vbs_dVbse + Qgbo_dVds * Vds_dVbse + Qgbo_dVgs * Vgs_dVbse ; Qgbo_dVdse = Qgbo_dVbs * Vbs_dVdse + Qgbo_dVds * Vds_dVdse + Qgbo_dVgs * Vgs_dVdse ; Qgbo_dVgse = Qgbo_dVbs * Vbs_dVgse + Qgbo_dVds * Vds_dVgse + Qgbo_dVgs * Vgs_dVgse ; Qovd_dVbse = Qovd_dVbs * Vbs_dVbse + Qovd_dVds * Vds_dVbse + Qovd_dVgs * Vgs_dVbse ; Qovd_dVdse = Qovd_dVbs * Vbs_dVdse + Qovd_dVds * Vds_dVdse + Qovd_dVgs * Vgs_dVdse ; Qovd_dVgse = Qovd_dVbs * Vbs_dVgse + Qovd_dVds * Vds_dVgse + Qovd_dVgs * Vgs_dVgse ; QidLD_dVbse = QidLD_dVbs * Vbs_dVbse + QidLD_dVds * Vds_dVbse + QidLD_dVgs * Vgs_dVbse ; QidLD_dVdse = QidLD_dVbs * Vbs_dVdse + QidLD_dVds * Vds_dVdse + QidLD_dVgs * Vgs_dVdse ; QidLD_dVgse = QidLD_dVbs * Vbs_dVgse + QidLD_dVds * Vds_dVgse + QidLD_dVgs * Vgs_dVgse ; QbdLD_dVbse = QbdLD_dVbs * Vbs_dVbse + QbdLD_dVds * Vds_dVbse + QbdLD_dVgs * Vgs_dVbse ; QbdLD_dVdse = QbdLD_dVbs * Vbs_dVdse + QbdLD_dVds * Vds_dVdse + QbdLD_dVgs * Vgs_dVdse ; QbdLD_dVgse = QbdLD_dVbs * Vbs_dVgse + QbdLD_dVds * Vds_dVgse + QbdLD_dVgs * Vgs_dVgse ; Qovs_dVbse = Qovs_dVbs * Vbs_dVbse + Qovs_dVds * Vds_dVbse + Qovs_dVgs * Vgs_dVbse ; Qovs_dVdse = Qovs_dVbs * Vbs_dVdse + Qovs_dVds * Vds_dVdse + Qovs_dVgs * Vgs_dVdse ; Qovs_dVgse = Qovs_dVbs * Vbs_dVgse + Qovs_dVds * Vds_dVgse + Qovs_dVgs * Vgs_dVgse ; QisLD_dVbse = QisLD_dVbs * Vbs_dVbse + QisLD_dVds * Vds_dVbse + QisLD_dVgs * Vgs_dVbse ; QisLD_dVdse = QisLD_dVbs * Vbs_dVdse + QisLD_dVds * Vds_dVdse + QisLD_dVgs * Vgs_dVdse ; QisLD_dVgse = QisLD_dVbs * Vbs_dVgse + QisLD_dVds * Vds_dVgse + QisLD_dVgs * Vgs_dVgse ; QbsLD_dVbse = QbsLD_dVbs * Vbs_dVbse + QbsLD_dVds * Vds_dVbse + QbsLD_dVgs * Vgs_dVbse ; QbsLD_dVdse = QbsLD_dVbs * Vbs_dVdse + QbsLD_dVds * Vds_dVdse + QbsLD_dVgs * Vgs_dVdse ; QbsLD_dVgse = QbsLD_dVbs * Vbs_dVgse + QbsLD_dVds * Vds_dVgse + QbsLD_dVgs * Vgs_dVgse ; Qy_dVbse = Qy_dVbs * Vbs_dVbse + Qy_dVds * Vds_dVbse + Qy_dVgs * Vgs_dVbse ; Qy_dVdse = Qy_dVbs * Vbs_dVdse + Qy_dVds * Vds_dVdse + Qy_dVgs * Vgs_dVdse ; Qy_dVgse = Qy_dVbs * Vbs_dVgse + Qy_dVds * Vds_dVgse + Qy_dVgs * Vgs_dVgse ; Qdrat_dVbse = Qdrat_dVbs * Vbs_dVbse + Qdrat_dVds * Vds_dVbse + Qdrat_dVgs * Vgs_dVbse ; Qdrat_dVdse = Qdrat_dVbs * Vbs_dVdse + Qdrat_dVds * Vds_dVdse + Qdrat_dVgs * Vgs_dVdse ; Qdrat_dVgse = Qdrat_dVbs * Vbs_dVgse + Qdrat_dVds * Vds_dVgse + Qdrat_dVgs * Vgs_dVgse ; if (flg_nqs) { /* NQS */ Qi_dVgse_nqs = Qi_dVgs_nqs * Vgs_dVgse + Qi_dVds_nqs * Vds_dVgse + Qi_dVbs_nqs * Vbs_dVgse; Qi_dVdse_nqs = Qi_dVgs_nqs * Vgs_dVdse + Qi_dVds_nqs * Vds_dVdse + Qi_dVbs_nqs * Vbs_dVdse; Qi_dVbse_nqs = Qi_dVgs_nqs * Vgs_dVbse + Qi_dVds_nqs * Vds_dVbse + Qi_dVbs_nqs * Vbs_dVbse; Qb_dVgse_nqs = Qb_dVgs_nqs * Vgs_dVgse + Qb_dVds_nqs * Vds_dVgse + Qb_dVbs_nqs * Vbs_dVgse; Qb_dVdse_nqs = Qb_dVgs_nqs * Vgs_dVdse + Qb_dVds_nqs * Vds_dVdse + Qb_dVbs_nqs * Vbs_dVdse; Qb_dVbse_nqs = Qb_dVgs_nqs * Vgs_dVbse + Qb_dVds_nqs * Vds_dVbse + Qb_dVbs_nqs * Vbs_dVbse; } if (flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG))) { /* ACNQS */ tau_dVgse = tau_dVgs * Vgs_dVgse + tau_dVds * Vds_dVgse + tau_dVbs * Vbs_dVgse; tau_dVdse = tau_dVgs * Vgs_dVdse + tau_dVds * Vds_dVdse + tau_dVbs * Vbs_dVdse; tau_dVbse = tau_dVgs * Vgs_dVbse + tau_dVds * Vds_dVbse + tau_dVbs * Vbs_dVbse; taub_dVgse = taub_dVgs * Vgs_dVgse + taub_dVds * Vds_dVgse + taub_dVbs * Vbs_dVgse; taub_dVdse = taub_dVgs * Vgs_dVdse + taub_dVds * Vds_dVdse + taub_dVbs * Vbs_dVdse; taub_dVbse = taub_dVgs * Vgs_dVbse + taub_dVds * Vds_dVbse + taub_dVbs * Vbs_dVbse; } } /* end of if ( flg_rsrd == 0 ) blocks */ /*-------------------------------------------* * Add IdsIBPC to Ids. *-----------------*/ Ids += IdsIBPC ; Ids_dVbse += IdsIBPC_dVbse ; Ids_dVdse += IdsIBPC_dVdse ; Ids_dVgse += IdsIBPC_dVgse ; /*---------------------------------------------------* * Derivatives of junction diode currents and charges. * - NOTE: These quantities are regarded as functions of * external biases. * - NOTE: node-base S/D *-----------------*/ Gbse = Gbs ; Gbde = Gbd ; Capbse = Capbs ; Capbde = Capbd ; /*---------------------------------------------------* * Extrapolate quantities if external biases are out of bounds. *-----------------*/ if ( flg_vbsc == 1 ) { Ids_dVbse *= Vbsc_dVbse ; Qb_dVbse *= Vbsc_dVbse ; Qi_dVbse *= Vbsc_dVbse ; Qd_dVbse *= Vbsc_dVbse ; Isub_dVbse *= Vbsc_dVbse ; Igate_dVbse *= Vbsc_dVbse ; Igs_dVbse *= Vbsc_dVbse ; Igd_dVbse *= Vbsc_dVbse ; Igb_dVbse *= Vbsc_dVbse ; Igidl_dVbse *= Vbsc_dVbse ; Igisl_dVbse *= Vbsc_dVbse ; Qgos_dVbse *= Vbsc_dVbse ; Qgod_dVbse *= Vbsc_dVbse ; Qgbo_dVbse *= Vbsc_dVbse ; Qy_dVbse *= Vbsc_dVbse ; if (flg_nqs) { Qi_dVbse_nqs *= Vbsc_dVbse ; Qb_dVbse_nqs *= Vbsc_dVbse ; } if (flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG))) { /* ACNQS */ tau_dVbse *= Vbsc_dVbse ; taub_dVbse *= Vbsc_dVbse ; } } else if ( flg_vbsc == -1 ) { T1 = Vbse - Vbsc ; TX = Ids + T1 * Ids_dVbse ; if ( TX * Ids >= 0.0 ) { Ids = TX ; } else { Ids_dVbse = 0.0 ; Ids_dVdse = 0.0 ; Ids_dVgse = 0.0 ; Ids = 0.0 ; } TX = Qb + T1 * Qb_dVbse ; /*note: The sign of Qb can be changed.*/ Qb = TX ; TX = Qd + T1 * Qd_dVbse ; if ( TX * Qd >= 0.0 ) { Qd = TX ; } else { Qd_dVbse = 0.0 ; Qd_dVdse = 0.0 ; Qd_dVgse = 0.0 ; Qd = 0.0 ; } TX = Qi + T1 * Qi_dVbse ; if ( TX * Qi >= 0.0 ) { Qi = TX ; } else { Qi_dVbse = 0.0 ; Qi_dVdse = 0.0 ; Qi_dVgse = 0.0 ; Qi = 0.0 ; } TX = Isub + T1 * Isub_dVbse ; if ( TX * Isub >= 0.0 ) { Isub = TX ; } else { Isub_dVbse = 0.0 ; Isub_dVdse = 0.0 ; Isub_dVgse = 0.0 ; Isub = 0.0 ; } TX = Igate + T1 * Igate_dVbse ; if ( TX * Igate >= 0.0 ) { Igate = TX ; } else { Igate_dVbse = 0.0 ; Igate_dVdse = 0.0 ; Igate_dVgse = 0.0 ; Igate = 0.0 ; } TX = Igs + T1 * Igs_dVbse ; if ( TX * Igs >= 0.0 ) { Igs = TX ; } else { Igs_dVbse = 0.0 ; Igs_dVdse = 0.0 ; Igs_dVgse = 0.0 ; Igs = 0.0 ; } TX = Igd + T1 * Igd_dVbse ; if ( TX * Igd >= 0.0 ) { Igd = TX ; } else { Igd_dVbse = 0.0 ; Igd_dVdse = 0.0 ; Igd_dVgse = 0.0 ; Igd = 0.0 ; } TX = Igb + T1 * Igb_dVbse ; if ( TX * Igb >= 0.0 ) { Igb = TX ; } else { Igb_dVbse = 0.0 ; Igb_dVdse = 0.0 ; Igb_dVgse = 0.0 ; Igb = 0.0 ; } TX = Igidl + T1 * Igidl_dVbse ; if ( TX * Igidl >= 0.0 ) { Igidl = TX ; } else { Igidl_dVbse = 0.0 ; Igidl_dVdse = 0.0 ; Igidl_dVgse = 0.0 ; Igidl = 0.0 ; } TX = Igisl + T1 * Igisl_dVbse ; if ( TX * Igisl >= 0.0 ) { Igisl = TX ; } else { Igisl_dVbse = 0.0 ; Igisl_dVdse = 0.0 ; Igisl_dVgse = 0.0 ; Igisl = 0.0 ; } TX = GLPART1 + T1 * GLPART1_dVbse ; if ( TX * GLPART1 >= 0.0 ) { GLPART1 = TX ; } else{ GLPART1_dVbse = 0.0 ; GLPART1_dVdse = 0.0 ; GLPART1_dVgse = 0.0 ; GLPART1 = 0.0 ; } TX = Qgod + T1 * Qgod_dVbse ; if ( TX * Qgod >= 0.0 ) { Qgod = TX ; } else { Qgod_dVbse = 0.0 ; Qgod_dVdse = 0.0 ; Qgod_dVgse = 0.0 ; Qgod = 0.0 ; } TX = Qgos + T1 * Qgos_dVbse ; if ( TX * Qgos >= 0.0 ) { Qgos = TX ; } else { Qgos_dVbse = 0.0 ; Qgos_dVdse = 0.0 ; Qgos_dVgse = 0.0 ; Qgos = 0.0 ; } TX = Qgbo + T1 * Qgbo_dVbse ; if ( TX * Qgbo >= 0.0 ) { Qgbo = TX ; } else { Qgbo_dVbse = 0.0 ; Qgbo_dVdse = 0.0 ; Qgbo_dVgse = 0.0 ; Qgbo = 0.0 ; } TX = Qy + T1 * Qy_dVbse ; if ( TX * Qy >= 0.0 ) { Qy = TX ; } else { Qy_dVbse = 0.0 ; Qy_dVdse = 0.0 ; Qy_dVgse = 0.0 ; Qy = 0.0 ; } TX = Qdrat + T1 * Qdrat_dVbse ; if ( TX * Qdrat >= 0.0 ) { Qdrat = TX ; } else{ Qdrat_dVbse = 0.0 ; Qdrat_dVdse = 0.0 ; Qdrat_dVgse = 0.0 ; Qdrat = 0.0 ; } TX = Qovd + T1 * Qovd_dVbse ; if ( TX * Qovd >= 0.0 ) { Qovd = TX ; } else{ Qovd_dVbse = 0.0 ; Qovd_dVdse = 0.0 ; Qovd_dVgse = 0.0 ; Qovd = 0.0 ; } TX = QidLD + T1 * QidLD_dVbse ; if ( TX * QidLD >= 0.0 ) { QidLD = TX ; } else{ QidLD_dVbse = 0.0 ; QidLD_dVdse = 0.0 ; QidLD_dVgse = 0.0 ; QidLD = 0.0 ; } TX = QbdLD + T1 * QbdLD_dVbse ; if ( TX * QbdLD >= 0.0 ) { QbdLD = TX ; } else{ QbdLD_dVbse = 0.0 ; QbdLD_dVdse = 0.0 ; QbdLD_dVgse = 0.0 ; QbdLD = 0.0 ; } TX = Qovs + T1 * Qovs_dVbse ; if ( TX * Qovs >= 0.0 ) { Qovs = TX ; } else{ T7 = Qovs / ( Qovs - TX ) ; Qovs_dVbse *= T7 ; Qovs_dVdse *= T7 ; Qovs_dVgse *= T7 ; Qovs = 0.0 ; } TX = QisLD + T1 * QisLD_dVbse ; if ( TX * QisLD >= 0.0 ) { QisLD = TX ; } else{ QisLD_dVbse = 0.0 ; QisLD_dVdse = 0.0 ; QisLD_dVgse = 0.0 ; QisLD = 0.0 ; } TX = QbsLD + T1 * QbsLD_dVbse ; if ( TX * QbsLD >= 0.0 ) { QbsLD = TX ; } else{ QbsLD_dVbse = 0.0 ; QbsLD_dVdse = 0.0 ; QbsLD_dVgse = 0.0 ; QbsLD = 0.0 ; } if (flg_nqs) { /* for NQS charge */ TX = Qi_nqs + T1 * Qi_dVbse_nqs ; if ( TX * Qi_nqs >= 0.0 ) { Qi_nqs = TX ; } else { Qi_dVbse_nqs = 0.0 ; Qi_dVdse_nqs = 0.0 ; Qi_dVgse_nqs = 0.0 ; Qi_nqs = 0.0 ; } TX = Qb_nqs + T1 * Qb_dVbse_nqs ; Qb_nqs = TX ; } if (flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG))) { /* ACNQS */ TX = tau + T1 * tau_dVbse ; if ( TX * tau >= 0.0 ) { tau = TX ; } else { tau_dVbse = 0.0 ; tau_dVdse = 0.0 ; tau_dVgse = 0.0 ; tau = 0.0 ; } TX = taub + T1 * taub_dVbse ; if ( TX * taub >= 0.0 ) { taub = TX ; } else { taub_dVbse = 0.0 ; taub_dVdse = 0.0 ; taub_dVgse = 0.0 ; taub = 0.0 ; } } } /*-----------------------------------------------------------* * Warn negative conductance. * - T1 ( = d Ids / d Vds ) is the derivative w.r.t. circuit bias. *-----------------*/ if ( here->HSM2_mode == HiSIM_NORMAL_MODE ) { T1 = Ids_dVdse ; } else { T1 = Ids_dVbse + Ids_dVdse + Ids_dVgse ; /* Ids_dVss * -1 */ } if ( flg_info >= 1 && (Ids_dVbse < 0.0 || T1 < 0.0 || Ids_dVgse < 0.0) ) { printf( "*** warning(HiSIM): Negative Conductance\n" ) ; printf( " type = %d mode = %d\n" , model->HSM2_type , here->HSM2_mode ) ; printf( " Vbse = %12.5e Vdse = %12.5e Vgse = %12.5e\n" , Vbse , Vdse , Vgse ) ; printf( " Ids_dVbse = %12.5e\n" , Ids_dVbse ) ; printf( " Ids_dVdse = %12.5e\n" , T1 ) ; printf( " Ids_dVgse = %12.5e\n" , Ids_dVgse ) ; } /*-----------------------------------------------------------* * Redefine overlap charges/capacitances. *-----------------*/ /*---------------------------------------------------* * Overlap capacitance. *-----------------*/ Cggo = Qgos_dVgse + Qgod_dVgse + Qgbo_dVgse ; Cgdo = Qgos_dVdse + Qgod_dVdse ; Cgso = - (Qgos_dVbse + Qgod_dVbse + Qgos_dVdse + Qgod_dVdse + Qgos_dVgse + Qgod_dVgse) ; Cgbo = Qgos_dVbse + Qgod_dVbse + Qgbo_dVbse ; /*---------------------------------------------------* * Add fringing charge/capacitance to overlap. *-----------------*/ Qgod += Qfd ; Qgos += Qfs ; Cggo += 2.0 * Cf ; Cgdo += - Cf ; Cgso += - Cf ; /*-----------------------------------------------------------* * Assign outputs. *-----------------*/ /*---------------------------------------------------* * Multiplication factor of a MOSFET instance. *-----------------*/ M = here->HSM2_m ; /*---------------------------------------------------* * Channel current and conductances. *-----------------*/ here->HSM2_ids = M * Ids ; here->HSM2_gmbs = M * Ids_dVbse ; here->HSM2_gds = M * Ids_dVdse ; here->HSM2_gm = M * Ids_dVgse ; /*---------------------------------------------------* * Overlap capacitances. *-----------------*/ /* Q_dVsx */ T2 = - ( Qovd_dVbse + Qovd_dVdse + Qovd_dVgse ) ; T6 = - ( Qovs_dVbse + Qovs_dVdse + Qovs_dVgse ) ; T5 = - ( QbdLD_dVbse + QbdLD_dVdse + QbdLD_dVgse ) ; T7 = - ( QbsLD_dVbse + QbsLD_dVdse + QbsLD_dVgse ) ; here->HSM2_cgdo = M * ( Cgdo - Qovd_dVdse - Qovs_dVdse ) ; here->HSM2_cgso = M * ( Cgso - T2 - T6 ) ; here->HSM2_cgbo = M * ( Cgbo - Qovd_dVbse - Qovs_dVbse ) ; here->HSM2_cdgo = M * ( - Qgod_dVgse - Cf + QbdLD_dVgse ) ; here->HSM2_cddo = M * ( - Qgod_dVdse + Cf + QbdLD_dVdse ) ; here->HSM2_cdso = M * ( Qgod_dVbse + Qgod_dVdse + Qgod_dVgse + T5 ) ; here->HSM2_csgo = M * ( - Qgos_dVgse - Cf + QbsLD_dVgse ) ; here->HSM2_csdo = M * ( - Qgos_dVdse + QbsLD_dVdse ) ; here->HSM2_csso = M * ( Qgos_dVbse + Qgos_dVdse + Qgos_dVgse + Cf + T7 ) ; /*---------------------------------------------------* * Lateral-field-induced capacitance. *-----------------*/ T0 = model->HSM2_qyrat ; T1 = 1.0 - T0 ; Qys = Qy * T1 ; Qys_dVdse = Qy_dVdse * T1 ; Qys_dVgse = Qy_dVgse * T1 ; Qys_dVbse = Qy_dVbse * T1 ; Qy = Qy * T0 ; Qy_dVdse = Qy_dVdse * T0 ; Qy_dVgse = Qy_dVgse * T0 ; Qy_dVbse = Qy_dVbse * T0 ; Cqyd = Qy_dVdse ; Cqyg = Qy_dVgse ; Cqyb = Qy_dVbse ; Cqys = - ( Cqyb + Cqyd + Cqyg ) ; here->HSM2_cqyd = M * Cqyd ; here->HSM2_cqyg = M * Cqyg ; here->HSM2_cqyb = M * Cqyb ; /* -------------------------------------* * Intrinsic charges / capacitances. *-----------------*/ if ( flg_nqs && ((ckt->CKTmode & MODETRAN) || (ckt->CKTmode & MODEINITFIX)) ) { /* NQS (tran. analysis) */ *(ckt->CKTstate0 + here->HSM2qi_nqs) = Qi_nqs ; *(ckt->CKTstate0 + here->HSM2qb_nqs) = Qb_nqs ; here->HSM2_qg = M * - (Qb_nqs + Qi_nqs) ; here->HSM2_qd = M * Qi_nqs * Qdrat ; here->HSM2_qs = M * Qi_nqs * (1.0 - Qdrat) ; here->HSM2_cbgb = M * Qb_dVgse_nqs ; here->HSM2_cbdb = M * Qb_dVdse_nqs ; here->HSM2_cbsb = M * - (Qb_dVbse_nqs + Qb_dVdse_nqs + Qb_dVgse_nqs) ; here->HSM2_cggb = M * ( - Qb_dVgse_nqs - Qi_dVgse_nqs ) ; here->HSM2_cgdb = M * ( - Qb_dVdse_nqs - Qi_dVdse_nqs ) ; here->HSM2_cgsb = M * ( Qb_dVbse_nqs + Qb_dVdse_nqs + Qb_dVgse_nqs + Qi_dVbse_nqs + Qi_dVdse_nqs + Qi_dVgse_nqs ) ; qd_dVgse = Qi_dVgse_nqs * Qdrat + Qdrat_dVgse * Qi_nqs ; qd_dVdse = Qi_dVdse_nqs * Qdrat + Qdrat_dVdse * Qi_nqs ; qd_dVbse = Qi_dVbse_nqs * Qdrat + Qdrat_dVbse * Qi_nqs ; qd_dVsse = - ( qd_dVgse + qd_dVdse + qd_dVbse ) ; here->HSM2_cdgb = M * qd_dVgse ; here->HSM2_cddb = M * qd_dVdse ; here->HSM2_cdsb = M * qd_dVsse ; } else { /* QS or NQS (ac dc analysis) */ here->HSM2_qg = M * - (Qb + Qi) ; here->HSM2_qd = M * Qd ; here->HSM2_qs = M * ( Qi - Qd ) ; here->HSM2_cbgb = M * Qb_dVgse ; here->HSM2_cbdb = M * Qb_dVdse ; here->HSM2_cbsb = M * - (Qb_dVbse + Qb_dVdse + Qb_dVgse) ; here->HSM2_cggb = M * ( - Qb_dVgse - Qi_dVgse ) ; here->HSM2_cgdb = M * ( - Qb_dVdse - Qi_dVdse ) ; here->HSM2_cgsb = M * ( Qb_dVbse + Qb_dVdse + Qb_dVgse + Qi_dVbse + Qi_dVdse + Qi_dVgse ) ; here->HSM2_cdgb = M * Qd_dVgse ; here->HSM2_cddb = M * Qd_dVdse ; here->HSM2_cdsb = M * - (Qd_dVgse + Qd_dVdse + Qd_dVbse) ; } /*---------------------------------------------------* * Add lateral-field-induced charges/capacitances to intrinsic ones. * - NOTE: This function depends on coqy, a control option. *-----------------*/ if ( model->HSM2_coqy == 1 ) { here->HSM2_qg += M * ( Qy + Qys ) ; here->HSM2_qd += M * ( - Qy ) ; here->HSM2_qs += M * ( - Qys ) ; T8 = - ( Qys_dVbse + Qys_dVdse + Qys_dVgse ) ; here->HSM2_cggb += M * ( Cqyg + Qys_dVgse ) ; here->HSM2_cgdb += M * ( Cqyd + Qys_dVdse ) ; here->HSM2_cgsb += M * ( Cqys + T8 ) ; here->HSM2_cdgb += M * ( - Cqyg ) ; here->HSM2_cddb += M * ( - Cqyd ) ; here->HSM2_cdsb += M * ( - Cqys ) ; } /*---------------------------------------------------* * Add S/D overlap charges/capacitances to intrinsic ones. * - NOTE: This function depends on coadov, a control option. *-----------------*/ if ( model->HSM2_coadov == 1 ) { /* Q_dVsb */ T0 = - ( Qgbo_dVbse + Qgbo_dVdse + Qgbo_dVgse ) ; T1 = - ( Qovd_dVbse + Qovd_dVdse + Qovd_dVgse ) ; T3 = - ( Qovs_dVbse + Qovs_dVdse + Qovs_dVgse ) ; T4 = - ( QidLD_dVbse + QidLD_dVdse + QidLD_dVgse + QisLD_dVbse + QisLD_dVdse + QisLD_dVgse ) ; T5 = - ( QbdLD_dVbse + QbdLD_dVdse + QbdLD_dVgse ) ; T7 = - ( Qgod_dVbse + Qgod_dVdse + Qgod_dVgse ) ; here->HSM2_qg += M * ( Qgod + Qgos + Qgbo - Qovd - Qovs ) ; here->HSM2_qd += M * ( - Qgod + QbdLD ) ; here->HSM2_qs += M * ( - Qgos + QbsLD ) ; here->HSM2_cbgb += M * ( - Qgbo_dVgse + QidLD_dVgse + QisLD_dVgse ) ; here->HSM2_cbdb += M * ( - Qgbo_dVdse + QidLD_dVdse + QisLD_dVdse ) ; here->HSM2_cbsb += M * ( - T0 + T4 ) ; here->HSM2_cggb += M * ( Cggo - Qovd_dVgse - Qovs_dVgse ) ; here->HSM2_cgdb += M * ( Cgdo - Qovd_dVdse - Qovs_dVdse ) ; here->HSM2_cgsb += M * ( Cgso - T1 - T3 ) ; here->HSM2_cdgb += M * ( - Qgod_dVgse - Cf + QbdLD_dVgse ) ; here->HSM2_cddb += M * ( - Qgod_dVdse + Cf + QbdLD_dVdse ) ; here->HSM2_cdsb += M * ( - T7 + T5 ) ; } /*---------------------------------------------------* * tau (channel/bulk charge) for ACNQS. *-----------------*/ if (flg_nqs && (ckt->CKTmode & (MODEDCOP | MODEINITSMSIG))) { here->HSM2_tau = tau ; here->HSM2_tau_dVgs = tau_dVgse ; here->HSM2_tau_dVds = tau_dVdse ; here->HSM2_tau_dVbs = tau_dVbse ; here->HSM2_taub = taub ; here->HSM2_taub_dVgs = taub_dVgse ; here->HSM2_taub_dVds = taub_dVdse ; here->HSM2_taub_dVbs = taub_dVbse ; here->HSM2_Xd = Qdrat; here->HSM2_Xd_dVgs = Qdrat_dVgse ; here->HSM2_Xd_dVds = Qdrat_dVdse ; here->HSM2_Xd_dVbs = Qdrat_dVbse ; here->HSM2_Qb = M * Qb ; here->HSM2_Qb_dVgs = M * Qb_dVgse ; here->HSM2_Qb_dVds = M * Qb_dVdse ; here->HSM2_Qb_dVbs = M * Qb_dVbse ; here->HSM2_Qi = M * Qi ; here->HSM2_Qi_dVgs = M * Qi_dVgse ; here->HSM2_Qi_dVds = M * Qi_dVdse ; here->HSM2_Qi_dVbs = M * Qi_dVbse ; here->HSM2_alpha = Alpha ; } /*---------------------------------------------------* * Substrate/gate/leak currents. *-----------------*/ here->HSM2_isub = M * Isub ; here->HSM2_gbbs = M * Isub_dVbse ; here->HSM2_gbds = M * Isub_dVdse ; here->HSM2_gbgs = M * Isub_dVgse ; here->HSM2_igb = M * -Igb ; here->HSM2_gigbb = M * -Igb_dVbse ; here->HSM2_gigbg = M * -Igb_dVgse ; if (here->HSM2_mode == HiSIM_NORMAL_MODE) { here->HSM2_gigbd = M * -Igb_dVdse ; here->HSM2_gigbs = M * ( Igb_dVbse + Igb_dVdse + Igb_dVgse ) ; } else { here->HSM2_gigbd = M * ( Igb_dVbse + Igb_dVdse + Igb_dVgse ) ; here->HSM2_gigbs = M * -Igb_dVdse ; } if (here->HSM2_mode == HiSIM_NORMAL_MODE) { here->HSM2_igd = M * ( GLPART1 * Igate - Igd ) ; here->HSM2_gigdb = M * ( GLPART1 * Igate_dVbse + GLPART1_dVbse * Igate - Igd_dVbse ) ; here->HSM2_gigdd = M * ( GLPART1 * Igate_dVdse + GLPART1_dVdse * Igate - Igd_dVdse ) ; here->HSM2_gigdg = M * ( GLPART1 * Igate_dVgse + GLPART1_dVgse * Igate - Igd_dVgse ) ; } else { T1 = 1.0 - GLPART1 ; T1_dVb = - GLPART1_dVbse ; T1_dVd = - GLPART1_dVdse ; T1_dVg = - GLPART1_dVgse ; here->HSM2_igd = M * ( T1 * Igate - Igs ) ; here->HSM2_gigdb = M * ( T1 * Igate_dVbse + T1_dVb * Igate - Igs_dVbse ) ; here->HSM2_gigdd = M * ( T1 * - ( Igate_dVgse + Igate_dVbse + Igate_dVdse ) + ( - T1_dVb - T1_dVg - T1_dVd ) * Igate + ( Igs_dVgse + Igs_dVbse + Igs_dVdse ) ) ; here->HSM2_gigdg = M * ( T1 * Igate_dVgse + T1_dVg * Igate - Igs_dVgse ) ; } here->HSM2_gigds = -(here->HSM2_gigdb + here->HSM2_gigdd + here->HSM2_gigdg) ; if (here->HSM2_mode == HiSIM_NORMAL_MODE) { T1 = 1.0 - GLPART1 ; T1_dVb = - GLPART1_dVbse ; T1_dVd = - GLPART1_dVdse ; T1_dVg = - GLPART1_dVgse ; here->HSM2_igs = M * ( T1 * Igate - Igs ) ; here->HSM2_gigsb = M * ( T1 * Igate_dVbse + T1_dVb * Igate - Igs_dVbse ) ; here->HSM2_gigsd = M * ( T1 * Igate_dVdse + T1_dVd * Igate - Igs_dVdse ) ; here->HSM2_gigsg = M * ( T1 * Igate_dVgse + T1_dVg * Igate - Igs_dVgse ) ; } else { here->HSM2_igs = M * ( GLPART1 * Igate - Igd ) ; here->HSM2_gigsb = M * ( GLPART1 * Igate_dVbse + GLPART1_dVbse * Igate - Igd_dVbse ) ; here->HSM2_gigsd = M * ( GLPART1 * -(Igate_dVgse + Igate_dVbse + Igate_dVdse) - Igate * ( GLPART1_dVbse + GLPART1_dVdse + GLPART1_dVgse ) + (Igs_dVgse + Igs_dVbse + Igs_dVdse) ) ; here->HSM2_gigsg = M * ( GLPART1 * Igate_dVgse + GLPART1_dVgse * Igate - Igd_dVgse ) ; } here->HSM2_gigss = -(here->HSM2_gigsb + here->HSM2_gigsd + here->HSM2_gigsg) ; here->HSM2_igidl = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igidl : M * Igisl ; here->HSM2_gigidlbs = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igidl_dVbse : M * Igisl_dVbse ; here->HSM2_gigidlds = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igidl_dVdse : M * ( - Igisl_dVbse - Igisl_dVdse - Igisl_dVgse ) ; here->HSM2_gigidlgs = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igidl_dVgse : M * Igisl_dVgse ; here->HSM2_igisl = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igisl : M * Igidl ; here->HSM2_gigislbd = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igisl_dVbse : M * Igidl_dVbse ; here->HSM2_gigislsd = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igisl_dVdse : M * ( - Igidl_dVbse - Igidl_dVdse - Igidl_dVgse ) ; here->HSM2_gigislgd = (here->HSM2_mode == HiSIM_NORMAL_MODE) ? M * Igisl_dVgse : M * Igidl_dVgse ; /*---------------------------------------------------* * Von, Vdsat. *-----------------*/ here->HSM2_von = Vth ; here->HSM2_vdsat = Vdsat ; /*---------------------------------------------------* * Junction diode. *-----------------*/ here->HSM2_ibs = M * Ibs ; here->HSM2_ibd = M * Ibd ; here->HSM2_gbs = M * Gbse ; here->HSM2_gbd = M * Gbde ; *(ckt->CKTstate0 + here->HSM2qbs) = M * Qbs ; *(ckt->CKTstate0 + here->HSM2qbd) = M * Qbd ; here->HSM2_capbs = M * Capbse ; here->HSM2_capbd = M * Capbde ; /*-----------------------------------------------------------* * Warn floating-point exceptions. * - Function finite() in libm is called. * - Go to start with info==5. *-----------------*/ T1 = here->HSM2_ids + here->HSM2_gmbs + here->HSM2_gds + here->HSM2_gm ; T1 = T1 + here->HSM2_qd + here->HSM2_cdsb ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf (stderr , "*** warning(HiSIM): FP-exception (PART-1)\n" ) ; if ( flg_info >= 1 ) { printf ( "*** warning(HiSIM): FP-exception\n") ; printf ( "here->HSM2_ids = %12.5e\n" , here->HSM2_ids ) ; printf ( "here->HSM2_gmbs = %12.5e\n" , here->HSM2_gmbs) ; printf ( "here->HSM2_gds = %12.5e\n" , here->HSM2_gds ) ; printf ( "here->HSM2_gm = %12.5e\n" , here->HSM2_gm ) ; printf ( "here->HSM2_qd = %12.5e\n" , here->HSM2_qd ) ; printf ( "here->HSM2_cdsb = %12.5e\n" , here->HSM2_cdsb) ; } } T1 = here->HSM2_isub + here->HSM2_gbbs + here->HSM2_gbds + here->HSM2_gbgs ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf (stderr , "*** warning(HiSIM): FP-exception (PART-2)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM): FP-exception\n") ; } } T1 = here->HSM2_cgbo + Cgdo + Cgso + Cggo ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf(stderr , "*** warning(HiSIM): FP-exception (PART-3)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM): FP-exception\n") ; } } T1 = here->HSM2_ibs + here->HSM2_ibd + here->HSM2_gbs + here->HSM2_gbd ; T1 = T1 + *(ckt->CKTstate0 + here->HSM2qbs) + *(ckt->CKTstate0 + here->HSM2qbd) + here->HSM2_capbs + here->HSM2_capbd ; if ( ! finite (T1) ) { flg_err = 1 ; fprintf(stderr , "*** warning(HiSIM): FP-exception (PART-4)\n") ; if ( flg_info >= 1 ) { printf ("*** warning(HiSIM): FP-exception\n") ; } } /*-----------------------------------------------------------* * Exit for error case. *-----------------*/ if ( flg_err != 0 ) { fprintf (stderr , "----- bias information (HiSIM)\n" ) ; fprintf (stderr , "name: %s\n" , here->HSM2name ) ; fprintf (stderr , "stetes: %d\n" , here->HSM2states ) ; fprintf (stderr , "vds= %12.5e vgs=%12.5e vbs=%12.5e\n" , vds , vgs , vbs ) ; fprintf (stderr , "vbs_jct= %12.5e vbd_jct= %12.5e\n" , vbs_jct , vbd_jct ) ; fprintf (stderr , "vd= %12.5e vg= %12.5e vb= %12.5e vs= %12.5e\n" , *( ckt->CKTrhsOld + here->HSM2dNodePrime ) , *( ckt->CKTrhsOld + here->HSM2gNodePrime ) , *( ckt->CKTrhsOld + here->HSM2bNodePrime ) , *( ckt->CKTrhsOld + here->HSM2sNodePrime ) ) ; if ( here->HSM2_called >= 1 ) { fprintf (stderr , "vdsc_prv= %12.5e vgsc_prv=%12.5e vbsc_prv=%12.5e\n" , here->HSM2_vdsc_prv , here->HSM2_vgsc_prv , here->HSM2_vbsc_prv ) ; } fprintf (stderr , "----- bias information (end)\n" ) ; } if ( flg_err != 0 ) return ( HiSIM_ERROR ) ; /*-----------------------------------------------------------* * Noise. *-----------------*/ here->HSM2_noiflick = M * Nflic ; here->HSM2_noithrml = M * Nthrml ; /*----------------------------------------------------------* * induced gate noise. ( Part 3/3 ) *----------------------*/ if ( model->HSM2_coign != 0 && model->HSM2_cothrml != 0 && flg_ign == 1 && !flg_noqi ) { T0 = Cox_small * Cox * here->HSM2_weff_nf * Leff ; T1 = here->HSM2_cgsb / M ; if( - T1 > T0 ){ Nign0 = c_16o135 * C_QE * beta_inv * T1 * T1 / gds0_ign ; if ( kusai00L > epsm10 && Vds > epsm10 ) { MuModA = Muun / Mu ; MuModB = ( Muun / Mud_hoso - MuModA ) / Vds ; correct_w1 = MuModA + C_2o3 * MuModB * ( kusai00 + VgVt * sqrtkusaiL + kusaiL ) / ( VgVt + sqrtkusaiL ) ; } else { correct_w1 = Muun / Mud_hoso ; } here->HSM2_noiigate = M * Nign0 * kusai_ig * correct_w1 ; here->HSM2_noicross = crl_f ; if ( here->HSM2_noiigate < 0.0 ) here->HSM2_noiigate = 0.0e0 ; }else{ here->HSM2_noiigate = 0.0e0 ; here->HSM2_noicross = 0.0e0 ; } here->HSM2_Qdrat = Qdrat ; /* needed for calculating induced gate noise */ }else{ here->HSM2_noiigate = 0.0e0 ; here->HSM2_noicross = 0.0e0 ; } /*-----------------------------------------------------------* * Restore values for next calculation. *-----------------*/ /* Confined biases */ if ( here->HSM2_called >= 1 ) { here->HSM2_vbsc_prv2 = here->HSM2_vbsc_prv ; here->HSM2_vdsc_prv2 = here->HSM2_vdsc_prv ; here->HSM2_vgsc_prv2 = here->HSM2_vgsc_prv ; here->HSM2_mode_prv2 = here->HSM2_mode_prv ; } here->HSM2_vbsc_prv = Vbsc ; here->HSM2_vdsc_prv = Vdsc ; here->HSM2_vgsc_prv = Vgsc ; here->HSM2_mode_prv = here->HSM2_mode ; /* Surface potentials and derivatives w.r.t. internal biases */ if ( here->HSM2_called >= 1 ) { here->HSM2_ps0_prv2 = here->HSM2_ps0_prv ; here->HSM2_ps0_dvbs_prv2 = here->HSM2_ps0_dvbs_prv ; here->HSM2_ps0_dvds_prv2 = here->HSM2_ps0_dvds_prv ; here->HSM2_ps0_dvgs_prv2 = here->HSM2_ps0_dvgs_prv ; here->HSM2_pds_prv2 = here->HSM2_pds_prv ; here->HSM2_pds_dvbs_prv2 = here->HSM2_pds_dvbs_prv ; here->HSM2_pds_dvds_prv2 = here->HSM2_pds_dvds_prv ; here->HSM2_pds_dvgs_prv2 = here->HSM2_pds_dvgs_prv ; } here->HSM2_ps0_prv = Ps0 ; here->HSM2_ps0_dvbs_prv = Ps0_dVbs ; here->HSM2_ps0_dvds_prv = Ps0_dVds ; here->HSM2_ps0_dvgs_prv = Ps0_dVgs ; here->HSM2_pds_prv = Pds ; here->HSM2_pds_dvbs_prv = Pds_dVbs ; here->HSM2_pds_dvds_prv = Pds_dVds ; here->HSM2_pds_dvgs_prv = Pds_dVgs ; /* Derivatives of channel current w.r.t. internal biases */ here->HSM2_ids_prv = Ids ; here->HSM2_ids_dvbs_prv = Ids_dVbs ; here->HSM2_ids_dvds_prv = Ids_dVds ; here->HSM2_ids_dvgs_prv = Ids_dVgs ; /* For CORECIP = 1 */ if ( corecip ) { here->HSM2_PS0Z_SCE_prv = PS0Z_SCE ; here->HSM2_PS0Z_SCE_dvds_prv = PS0Z_SCE_dVds ; here->HSM2_PS0Z_SCE_dvgs_prv = PS0Z_SCE_dVgs ; here->HSM2_PS0Z_SCE_dvbs_prv = PS0Z_SCE_dVbs ; /* here->HSM2_nnn = NNN ; */ } /*-----------------------------------------------------------* * End of PART-7. (label) *-----------------*/ /* end_of_part_7: */ /*-----------------------------------------------------------* * Bottom of hsm2eval. *-----------------*/ return ( HiSIM_OK ) ; } /* end of hsm2eval */ ngspice-26/src/spicelib/devices/hisim2/hsm2ld.c0000644000265600020320000013300712264261473020770 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2ld.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "hisim2.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #define SHOW_EPS_QUANT 1.0e-15 #define BYP_TOL_FACTOR model->HSM2_byptol #ifdef MOS_MODEL_TIME /** MOS Model Time **/ #include extern char *mos_model_name ; extern double mos_model_time ; double gtodsecld(void) { struct timeval tv; const double sec2000 = 9.46e8 ; gettimeofday(&tv, NULL); return ( tv.tv_sec - sec2000 ) + (double)tv.tv_usec*1e-6; } double tm0 , tm1 ; #ifdef PARAMOS_TIME #include double vsum ; static double vsum0 = 1.0e5 ; #endif #endif static void ShowPhysVals ( HSM2instance *here, HSM2model *model, int isFirst, double vds, double vgs, double vbs, double vgd, double vbd, double vgb ) { NG_IGNORE(vgd); NG_IGNORE(vbd); /* regard the epsilon-quantity as 0.0 */ vds = (fabs(vds) < SHOW_EPS_QUANT) ? 0.0 : vds; vgs = (fabs(vgs) < SHOW_EPS_QUANT) ? 0.0 : vgs; vbs = (fabs(vbs) < SHOW_EPS_QUANT) ? 0.0 : vbs; vgb = (fabs(vgb) < SHOW_EPS_QUANT) ? 0.0 : vgb; switch (model->HSM2_show) { case 1: if (isFirst) printf("Vds Ids\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_mode*here->HSM2_ids); break; case 2: if (isFirst) printf("Vgs Ids\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_mode*here->HSM2_ids); break; case 3: if (isFirst) printf("Vgs log10(|Ids|)\n"); printf("%e %e\n", model->HSM2_type*vgs, log10(here->HSM2_ids)); break; case 4: if (isFirst) printf("log10(|Ids|) gm/|Ids|\n"); if (here->HSM2_ids == 0.0) printf("I can't show gm/Ids - log10(Ids), because Ids = 0.\n"); else printf("%e %e\n", log10(here->HSM2_ids), here->HSM2_gm/here->HSM2_ids); break; case 5: if (isFirst) printf("Vds gds\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_gds); break; case 6: if (isFirst) printf("Vgs gm\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_gm); break; case 7: if (isFirst) printf("Vbs gbs\n"); printf("%e %e\n", model->HSM2_type*vbs, here->HSM2_gmbs); break; case 8: if (isFirst) printf("Vgs Cgg\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_cggb); break; case 9: if (isFirst) printf("Vgs Cgs\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_cgsb); break; case 10: if (isFirst) printf("Vgs Cgd\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_cgdb); break; case 11: if (isFirst) printf("Vgs Cgb\n"); printf("%e %e\n", model->HSM2_type*vgs, -(here->HSM2_cggb+here->HSM2_cgsb+here->HSM2_cgdb)); break; case 12: if (isFirst) printf("Vds Csg\n"); printf("%e %e\n", model->HSM2_type*vds, -(here->HSM2_cggb+here->HSM2_cbgb+here->HSM2_cdgb)); break; case 13: if (isFirst) printf("Vds Cdg\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_cdgb); break; case 14: if (isFirst) printf("Vds Cbg\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_cbgb); break; case 15: if (isFirst) printf("Vds Cgg\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_cggb); break; case 16: if (isFirst) printf("Vds Cgs\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_cgsb); break; case 17: if (isFirst) printf("Vds Cgd\n"); printf("%e %e\n", model->HSM2_type*vds, here->HSM2_cgdb); break; case 18: if (isFirst) printf("Vds Cgb\n"); printf("%e %e\n", model->HSM2_type*vds, -(here->HSM2_cggb+here->HSM2_cgsb+here->HSM2_cgdb)); break; case 19: if (isFirst) printf("Vgs Csg\n"); printf("%e %e\n", model->HSM2_type*vgs, -(here->HSM2_cggb+here->HSM2_cbgb+here->HSM2_cdgb)); break; case 20: if (isFirst) printf("Vgs Cdg\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_cdgb); break; case 21: if (isFirst) printf("Vgs Cbg\n"); printf("%e %e\n", model->HSM2_type*vgs, here->HSM2_cbgb); break; case 22: if (isFirst) printf("Vgb Cgb\n"); printf("%e %e\n", model->HSM2_type*vgb, -(here->HSM2_cggb+here->HSM2_cgsb+here->HSM2_cgdb)); break; case 50: if (isFirst) printf("Vgs Vds Vbs Vgb Ids log10(|Ids|) gm/|Ids| gm gds gbs Cgg Cgs Cgb Cgd Csg Cbg Cdg\n"); printf("%e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e %e\n", model->HSM2_type*vgs, model->HSM2_type*vds, model->HSM2_type*vbs, model->HSM2_type*vgb, here->HSM2_mode*here->HSM2_ids, log10(here->HSM2_ids), here->HSM2_gm/here->HSM2_ids, here->HSM2_gm, here->HSM2_gds, here->HSM2_gmbs, here->HSM2_cggb, here->HSM2_cgsb, -(here->HSM2_cggb+here->HSM2_cgsb+here->HSM2_cgdb), here->HSM2_cgdb, -(here->HSM2_cggb+here->HSM2_cbgb+here->HSM2_cdgb), here->HSM2_cbgb, here->HSM2_cdgb); break; default: /* printf("There is no physical value corrsponding to %d\n", flag); */ break; } } int HSM2load( GENmodel *inModel, register CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; HSM2binningParam *pParam; double cbhat=0.0, cdrain=0.0, cdhat=0.0, cdreq=0.0, cgbhat=0.0, cgshat=0.0, cgdhat=0.0 ; double Ibtot=0.0, Idtot=0.0, Igbtot=0.0, Igstot=0.0, Igdtot=0.0 ; double ceq=0.0, ceqbd=0.0, ceqbs=0.0, ceqqb=0.0, ceqqd=0.0, ceqqg=0.0 ; double ceqjs=0.0, ceqjd=0.0, ceqqjs=0.0, ceqqjd=0.0 ; double delvbd=0.0, delvbs=0.0, delvds=0.0, delvgd=0.0, delvgs=0.0 ; double gcbdb=0.0, gcbgb=0.0, gcbsb=0.0, gcddb=0.0, gcdgb=0.0, gcdsb=0.0 ; double gcgdb=0.0, gcggb=0.0, gcgsb=0.0, gcgbb=0.0, gcsdb=0.0, gcsgb=0.0, gcssb=0.0 ; double geq=0.0, xfact=0.0 ; double vbd=0.0, vbs=0.0, vds=0.0, vgb=0.0, vgd=0.0, vgdo=0.0, vgs=0.0, von=0.0 ; double gbbdp=0.0, gbbsp=0.0, gbspg=0.0, gbspdp=0.0, gbspb=0.0, gbspsp=0.0 ; double qgate=0.0, qbulk=0.0, qdrn=0.0 ; double cqgate=0.0, cqbulk=0.0, cqdrn=0.0 ; double gbdpdp=0.0, gbdpg=0.0, gbdpb=0.0, gbdpsp=0.0; double gm=0.0, gmbs=0.0, FwdSum=0.0, RevSum=0.0 ; double ag0=0.0 ; double Ibtoteq=0.0, gIbtotg=0.0, gIbtotd=0.0, gIbtots=0.0, gIbtotb=0.0 ; double Igtoteq=0.0, gIgtotg=0.0, gIgtotd=0.0, gIgtots=0.0, gIgtotb=0.0 ; double Idtoteq=0.0, gIdtotg=0.0, gIdtotd=0.0, gIdtots=0.0, gIdtotb=0.0 ; double Istoteq=0.0, gIstotg=0.0, gIstotd=0.0, gIstots=0.0, gIstotb=0.0 ; double ivds=0.0, ivgs=0.0, ivbs=0.0 ; double gjbs=0.0, gjbd=0.0, gcdbdb=0.0, gcsbsb=0.0, gcbbb=0.0, gcdbb=0.0, gcsbb=0.0, grg=0.0 ; double vdbs=0.0, vsbs=0.0, vdbd=0.0, delvdbs=0.0, delvsbs=0.0, delvdbd=0.0 ; double vges=0.0, vged=0.0, delvges=0.0, delvged=0.0, vgedo=0.0 ; double vsbdo=0.0, vsbd=0.0; double vbs_jct=0.0, vbd_jct=0.0, delvbs_jct=0.0, delvbd_jct=0.0 ; int ByPass=0, Check=0, Check1=0, Check2=0 ; int BYPASS_enable =0 ; #ifndef NOBYPASS double tempv=0.0 ; #endif /*NOBYPASS*/ #ifndef NEWCONV double tol=0.0, tol2=0.0, tol3=0.0, tol4=0.0 ; #endif int ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; int showPhysVal; int isConv; double vds_pre = 0.0; double reltol, abstol , voltTol ; #ifdef MOS_MODEL_TIME tm0 = gtodsecld() ; #endif /* loop through all the HSM2 device models */ for ( ; model != NULL; model = model->HSM2nextModel ) { /* loop through all the instances of the model */ reltol = ckt->CKTreltol * BYP_TOL_FACTOR ; abstol = ckt->CKTabstol * BYP_TOL_FACTOR ; voltTol= ckt->CKTvoltTol* BYP_TOL_FACTOR ; BYPASS_enable = (BYP_TOL_FACTOR > 0.0 && ckt->CKTbypass) ; model->HSM2_bypass_enable = BYPASS_enable ; for (here = model->HSM2instances; here != NULL ; here = here->HSM2nextInstance) { pParam = &here->pParam ; showPhysVal = 0; Check=1; ByPass = 0; #ifdef DEBUG_HISIM2LD_VX printf("mode = %x\n", ckt->CKTmode); printf("Vd Vg Vs Vb %e %e %e %e\n", *(ckt->CKTrhsOld+here->HSM2dNodePrime), *(ckt->CKTrhsOld+here->HSM2gNodePrime), *(ckt->CKTrhsOld+here->HSM2sNodePrime), *(ckt->CKTrhsOld+here->HSM2bNodePrime)); #endif if ( ckt->CKTmode & MODEINITSMSIG ) { vbs = *(ckt->CKTstate0 + here->HSM2vbs); vgs = *(ckt->CKTstate0 + here->HSM2vgs); vds = *(ckt->CKTstate0 + here->HSM2vds); vges = *(ckt->CKTstate0 + here->HSM2vges); vdbs = *(ckt->CKTstate0 + here->HSM2vdbs); vsbs = *(ckt->CKTstate0 + here->HSM2vsbs); } else if ( ckt->CKTmode & MODEINITTRAN ) { vbs = *(ckt->CKTstate1 + here->HSM2vbs); vgs = *(ckt->CKTstate1 + here->HSM2vgs); vds = *(ckt->CKTstate1 + here->HSM2vds); vges = *(ckt->CKTstate1 + here->HSM2vges); vdbs = *(ckt->CKTstate1 + here->HSM2vdbs); vsbs = *(ckt->CKTstate1 + here->HSM2vsbs); } else if ( (ckt->CKTmode & MODEINITJCT) && !here->HSM2_off ) { vds = model->HSM2_type * here->HSM2_icVDS; vgs = vges = model->HSM2_type * here->HSM2_icVGS; vbs = vdbs = vsbs = model->HSM2_type * here->HSM2_icVBS; if ( (vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ( (ckt->CKTmode & (MODETRAN|MODEAC|MODEDCOP|MODEDCTRANCURVE)) || !(ckt->CKTmode & MODEUIC) ) ) { /* set biases for starting analysis */ vbs = vdbs = vsbs = 0.0; /* vgs = vges = model->HSM2_type * pParam->HSM2_vfbc + 0.1; */ vgs = vges = 0.1; vds = 0.1; } } else if ( ( ckt->CKTmode & (MODEINITJCT | MODEINITFIX) ) && here->HSM2_off ) { vbs = vgs = vds = 0.0; vges = 0.0; vdbs = vsbs = 0.0; } else { #ifndef PREDICTOR /* BSIM3 style */ if (ckt->CKTmode & MODEINITPRED) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->HSM2vbs) = *(ckt->CKTstate1 + here->HSM2vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vbs)) -(xfact * (*(ckt->CKTstate2 + here->HSM2vbs))); *(ckt->CKTstate0 + here->HSM2vgs) = *(ckt->CKTstate1 + here->HSM2vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vgs)) -(xfact * (*(ckt->CKTstate2 + here->HSM2vgs))); *(ckt->CKTstate0 + here->HSM2vds) = *(ckt->CKTstate1 + here->HSM2vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vds)) -(xfact * (*(ckt->CKTstate2 + here->HSM2vds))); *(ckt->CKTstate0 + here->HSM2vbd) = *(ckt->CKTstate0 + here->HSM2vbs)- *(ckt->CKTstate0 + here->HSM2vds); *(ckt->CKTstate0 + here->HSM2vges) = *(ckt->CKTstate1 + here->HSM2vges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vges)) -(xfact * (*(ckt->CKTstate2 + here->HSM2vges))); *(ckt->CKTstate0 + here->HSM2vdbs) = *(ckt->CKTstate1 + here->HSM2vdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vdbs)) - (xfact * (*(ckt->CKTstate2 + here->HSM2vdbs))); *(ckt->CKTstate0 + here->HSM2vdbd) = *(ckt->CKTstate0 + here->HSM2vdbs) - *(ckt->CKTstate0 + here->HSM2vds); *(ckt->CKTstate0 + here->HSM2vsbs) = *(ckt->CKTstate1 + here->HSM2vsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->HSM2vsbs)) - (xfact * (*(ckt->CKTstate2 + here->HSM2vsbs))); } else { #endif /* PREDICTOR */ /* get biases from CKT */ vbs = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2bNodePrime) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vgs = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2gNodePrime) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vds = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2dNodePrime) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vges = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2gNode) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vdbs = model->HSM2_type * (*(ckt->CKTrhsOld + here->HSM2dbNode) - *(ckt->CKTrhsOld + here->HSM2sNodePrime)); vsbs = model->HSM2_type * (*(ckt->CKTrhsOld + here->HSM2sbNode) - *(ckt->CKTrhsOld + here->HSM2sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; vged = vges - vds; vdbd = vdbs - vds; vgdo = *(ckt->CKTstate0 + here->HSM2vgs) - *(ckt->CKTstate0 + here->HSM2vds); vgedo = *(ckt->CKTstate0 + here->HSM2vges) - *(ckt->CKTstate0 + here->HSM2vds); delvbs = vbs - *(ckt->CKTstate0 + here->HSM2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->HSM2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->HSM2vgs); delvges = vges - *(ckt->CKTstate0 + here->HSM2vges); delvds = vds - *(ckt->CKTstate0 + here->HSM2vds); delvdbs = vdbs - *(ckt->CKTstate0 + here->HSM2vdbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->HSM2vsbs); delvdbd = vdbd - *(ckt->CKTstate0 + here->HSM2vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvbd_jct = (!here->HSM2_corbnet) ? delvbd : delvdbd; delvbs_jct = (!here->HSM2_corbnet) ? delvbs : delvsbs; if (here->HSM2_mode >= 0) { Idtot = here->HSM2_ids + here->HSM2_isub - here->HSM2_ibd + here->HSM2_igidl; cdhat = Idtot - here->HSM2_gbd * delvbd_jct + (here->HSM2_gmbs + here->HSM2_gbbs + here->HSM2_gigidlbs) * delvbs + (here->HSM2_gm + here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgs + (here->HSM2_gds + here->HSM2_gbds + here->HSM2_gigidlds) * delvds; Ibtot = here->HSM2_ibs + here->HSM2_ibd - here->HSM2_isub - here->HSM2_igidl - here->HSM2_igisl; cbhat = Ibtot + here->HSM2_gbd * delvbd_jct + here->HSM2_gbs * delvbs_jct - (here->HSM2_gbbs + here->HSM2_gigidlbs) * delvbs - (here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgs - (here->HSM2_gbds + here->HSM2_gigidlds) * delvds - here->HSM2_gigislgd * delvgd - here->HSM2_gigislbd * delvbd + here->HSM2_gigislsd * delvds; Igstot = here->HSM2_igs; cgshat = Igstot + here->HSM2_gigsg * delvgs + here->HSM2_gigsd * delvds + here->HSM2_gigsb * delvbs; Igdtot = here->HSM2_igd; cgdhat = Igdtot + here->HSM2_gigdg * delvgs + here->HSM2_gigdd * delvds + here->HSM2_gigdb * delvbs; Igbtot = here->HSM2_igb; cgbhat = Igbtot + here->HSM2_gigbg * delvgs + here->HSM2_gigbd * delvds + here->HSM2_gigbb * delvbs; } else { Idtot = here->HSM2_ids + here->HSM2_ibd - here->HSM2_igidl; cdhat = Idtot + here->HSM2_gbd * delvbd_jct + here->HSM2_gmbs * delvbd + here->HSM2_gm * delvgd - here->HSM2_gds * delvds - here->HSM2_gigidlgs * delvgd - here->HSM2_gigidlbs * delvbd + here->HSM2_gigidlds * delvds ; Ibtot = here->HSM2_ibs + here->HSM2_ibd - here->HSM2_isub - here->HSM2_igidl - here->HSM2_igisl; cbhat = Ibtot + here->HSM2_gbs * delvbs_jct + here->HSM2_gbd * delvbd_jct - (here->HSM2_gbbs + here->HSM2_gigidlbs) * delvbd - (here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgd + (here->HSM2_gbds + here->HSM2_gigidlds) * delvds - here->HSM2_gigislgd * delvgd - here->HSM2_gigislbd * delvbd + here->HSM2_gigislsd * delvds; Igbtot = here->HSM2_igb; cgbhat = Igbtot + here->HSM2_gigbg * delvgd - here->HSM2_gigbs * delvds + here->HSM2_gigbb * delvbd; Igstot = here->HSM2_igs; cgshat = Igstot + here->HSM2_gigsg * delvgd - here->HSM2_gigss * delvds + here->HSM2_gigsb * delvbd; Igdtot = here->HSM2_igd; cgdhat = Igdtot + here->HSM2_gigdg * delvgd - here->HSM2_gigds * delvds + here->HSM2_gigdb * delvbd; } vds_pre = vds; #ifndef NOBYPASS /* BSIM3 style */ /* now lets see if we can bypass (ugh) */ /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if ( !(ckt->CKTmode & MODEINITPRED) && BYPASS_enable ) if ((!here->HSM2_corbnet) || (fabs(delvdbs) < (reltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->HSM2vdbs))) + voltTol))) if ((!here->HSM2_corbnet) || (fabs(delvdbd) < (reltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->HSM2vdbd))) + voltTol))) if ((!here->HSM2_corbnet) || (fabs(delvsbs) < (reltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->HSM2vsbs))) + voltTol))) if ((here->HSM2_corg == 0) || (here->HSM2_corg == 1) || (fabs(delvges) < (reltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->HSM2vges))) + voltTol))) if ( fabs(delvbs) < ( reltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->HSM2vbs))) + voltTol ) ) if ( fabs(delvbd) < ( reltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->HSM2vbd))) + voltTol ) ) if ( fabs(delvgs) < ( reltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->HSM2vgs))) + voltTol ) ) if ( fabs(delvds) < ( reltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->HSM2vds))) + voltTol ) ) if ( fabs(cdhat - Idtot) < ( reltol * MAX(fabs(cdhat),fabs(Idtot)) + abstol ) ) if (!model->HSM2_coiigs || (fabs(cgbhat - Igbtot) < reltol * MAX(fabs(cgbhat), fabs(Igbtot)) + abstol)) if (!model->HSM2_coiigs || (fabs(cgshat - Igstot) < reltol * MAX(fabs(cgshat), fabs(Igstot)) + abstol)) if (!model->HSM2_coiigs || (fabs(cgdhat - Igdtot) < reltol * MAX(fabs(cgdhat), fabs(Igdtot)) + abstol)){ tempv = MAX(fabs(cbhat),fabs(Ibtot)) + abstol; if ((fabs(cbhat - Ibtot)) < reltol * tempv) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->HSM2vbs); vbd = *(ckt->CKTstate0 + here->HSM2vbd); vgs = *(ckt->CKTstate0 + here->HSM2vgs); vds = *(ckt->CKTstate0 + here->HSM2vds); vges = *(ckt->CKTstate0 + here->HSM2vges); vdbs = *(ckt->CKTstate0 + here->HSM2vdbs); vdbd = *(ckt->CKTstate0 + here->HSM2vdbd); vsbs = *(ckt->CKTstate0 + here->HSM2vsbs); vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vbs_jct = (!here->HSM2_corbnet) ? vbs : vsbs; vbd_jct = (!here->HSM2_corbnet) ? vbd : vdbd; cdrain = here->HSM2_ids; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->HSM2_qg; qbulk = here->HSM2_qb; qdrn = here->HSM2_qd; goto line755; } else goto line850; } } #endif /*NOBYPASS*/ #ifdef DEBUG_HISIM2LD_VX printf( "vbd_p = %12.5e\n" , vbd ); printf( "vbs_p = %12.5e\n" , vbs ); printf( "vgs_p = %12.5e\n" , vgs ); printf( "vds_p = %12.5e\n" , vds ); #endif von = here->HSM2_von; if(*(ckt->CKTstate0 + here->HSM2vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->HSM2vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->HSM2vds)); vgd = vgs - vds; if (here->HSM2_corg == 1) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->HSM2vges), von); vged = vges - vds; } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->HSM2vds))); vgs = vgd + vds; if (here->HSM2_corg == 1) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->HSM2vbs), CONSTvt0, model->HSM2_vcrit, &Check); vbd = vbs - vds; if (here->HSM2_corbnet) { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->HSM2vdbs), CONSTvt0, model->HSM2_vcrit, &Check1); vdbd = vdbs - vds; vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->HSM2vsbs), CONSTvt0, model->HSM2_vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->HSM2vbd), CONSTvt0, model->HSM2_vcrit, &Check); vbs = vbd + vds; if (here->HSM2_corbnet) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->HSM2vdbd), CONSTvt0, model->HSM2_vcrit, &Check1); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->HSM2vsbs) - *(ckt->CKTstate0 + here->HSM2vds); vsbd = vsbs - vds; vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->HSM2_vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } } vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vdbd = vdbs - vds; vbs_jct = (!here->HSM2_corbnet) ? vbs : vsbs; vbd_jct = (!here->HSM2_corbnet) ? vbd : vdbd; #ifdef DEBUG_HISIM2LD_VX printf( "vbd = %12.5e\n" , vbd ); printf( "vbs = %12.5e\n" , vbs ); printf( "vgs = %12.5e\n" , vgs ); printf( "vds = %12.5e\n" , vds ); #endif if (vds >= 0) { /* normal mode */ here->HSM2_mode = 1; ivds = vds; ivgs = vgs; ivbs = vbs; } else { /* reverse mode */ here->HSM2_mode = -1; ivds = -vds; ivgs = vgd; ivbs = vbd; } if ( model->HSM2_info >= 5 ) { /* mode, bias conditions ... */ printf( "--- variables given to HSM2evaluate() ----\n" ); printf( "type = %s\n" , (model->HSM2_type>0) ? "NMOS" : "PMOS" ); printf( "mode = %s\n" , (here->HSM2_mode>0) ? "NORMAL" : "REVERSE" ); printf( "vbs = %12.5e\n" , ivbs ); printf( "vds = %12.5e\n" , ivds ); printf( "vgs = %12.5e\n" , ivgs ); } if ( model->HSM2_info >= 6 ) { /* input flags */ printf( "corsrd = %s\n" , (model->HSM2_corsrd) ? "true" : "false" ) ; printf( "coadov = %s\n" , (model->HSM2_coadov) ? "true" : "false" ) ; printf( "coisub = %s\n" , (model->HSM2_coisub) ? "true" : "false" ) ; printf( "coiigs = %s\n" , (model->HSM2_coiigs) ? "true" : "false" ) ; printf( "cogidl = %s\n" , (model->HSM2_cogidl) ? "true" : "false" ) ; printf( "coovlp = %s\n" , (model->HSM2_coovlp) ? "true" : "false" ) ; printf( "coflick = %s\n" , (model->HSM2_coflick) ? "true" : "false" ) ; printf( "coisti = %s\n" , (model->HSM2_coisti) ? "true" : "false" ) ; printf( "conqs = %s\n" , (model->HSM2_conqs) ? "true" : "false" ) ; printf( "cothrml = %s\n" , (model->HSM2_cothrml) ? "true" : "false" ) ; printf( "coign = %s\n" , (model->HSM2_coign) ? "true" : "false" ) ; } /* print inputs ------------AA */ #ifdef DEBUG_HISIM2CGG /* Print convergence flag */ printf("isConv %d ", isConv ); printf("CKTtime %e ", ckt->CKTtime ); printf("Vb %1.3e ", (model->HSM2_type>0) ? vbs:-vbs ); printf("Vd %1.3e ", (model->HSM2_type>0) ? vds:-vds ); printf("Vg %1.3e ", (model->HSM2_type>0) ? vgs:-vgs ); #endif /* call model evaluation */ if ( HSM2evaluate(ivds, ivgs, ivbs, vbs_jct, vbd_jct, here, model, ckt) == HiSIM_ERROR ) return (HiSIM_ERROR); #ifdef DEBUG_HISIM2CGG printf("HSM2_ids %e ", here->HSM2_ids ) ; printf("HSM2_cggb %e ", here->HSM2_cggb ) ; printf("\n") ; #endif /* modified by T.Y. 2006.05.31 * if ( !here->HSM2_called ) here->HSM2_called = 1; */ here->HSM2_called += 1; cdrain = here->HSM2_ids ; /* cdrain */ qgate = here->HSM2_qg ; /* gate */ qdrn = here->HSM2_qd ; /* drain */ qbulk = here->HSM2_qb = -1.0 * (here->HSM2_qg + here->HSM2_qd + here->HSM2_qs); /* bulk */ /* print all outputs ------------VV */ if ( model->HSM2_info >= 4 ) { printf( "--- variables returned from HSM2evaluate() ----\n" ) ; printf( "von = %12.5e\n" , here->HSM2_von ) ; printf( "vdsat = %12.5e\n" , here->HSM2_vdsat ) ; printf( "ids = %12.5e\n" , here->HSM2_ids ) ; printf( "gds = %12.5e\n" , here->HSM2_gds ) ; printf( "gm = %12.5e\n" , here->HSM2_gm ) ; printf( "gmbs = %12.5e\n" , here->HSM2_gmbs ) ; printf( "cggo = %12.5e\n" , -(here->HSM2_cgdo + here->HSM2_cgso +here->HSM2_cgbo) ) ; printf( "cgdo = %12.5e\n" , here->HSM2_cgdo ) ; printf( "cgso = %12.5e\n" , here->HSM2_cgso ) ; printf( "cdgo = %12.5e\n" , here->HSM2_cdgo ) ; printf( "cddo = %12.5e\n" , here->HSM2_cddo ) ; printf( "cdso = %12.5e\n" , here->HSM2_cdso ) ; printf( "csgo = %12.5e\n" , here->HSM2_csgo ) ; printf( "csdo = %12.5e\n" , here->HSM2_csdo ) ; printf( "csso = %12.5e\n" , here->HSM2_csso ) ; printf( "qg = %12.5e\n" , here->HSM2_qg ) ; printf( "qd = %12.5e\n" , here->HSM2_qd ) ; printf( "qs = %12.5e\n" , here->HSM2_qs ) ; printf( "cggb = %12.5e\n" , here->HSM2_cggb ) ; printf( "cgsb = %12.5e\n" , here->HSM2_cgsb ) ; printf( "cgdb = %12.5e\n" , here->HSM2_cgdb ) ; printf( "cbgb = %12.5e\n" , here->HSM2_cbgb ) ; printf( "cbsb = %12.5e\n" , here->HSM2_cbsb ) ; printf( "cbdb = %12.5e\n" , here->HSM2_cbdb ) ; printf( "cdgb = %12.5e\n" , here->HSM2_cdgb ) ; printf( "cdsb = %12.5e\n" , here->HSM2_cdsb ) ; printf( "cddb = %12.5e\n" , here->HSM2_cddb ) ; printf( "ibd = %12.5e\n" , here->HSM2_ibd ) ; printf( "ibs = %12.5e\n" , here->HSM2_ibs ) ; printf( "gbd = %12.5e\n" , here->HSM2_gbd ) ; printf( "gbs = %12.5e\n" , here->HSM2_gbs ) ; printf( "capbd = %12.5e\n" , here->HSM2_capbd ) ; printf( "capbs = %12.5e\n" , here->HSM2_capbs ) ; printf( "qbd = %12.5e\n" , *(ckt->CKTstate0 + here->HSM2qbd) ) ; printf( "qbs = %12.5e\n" , *(ckt->CKTstate0 + here->HSM2qbs) ) ; printf( "isub = %12.5e\n" , here->HSM2_isub ) ; printf( "gbgs = %12.5e\n" , here->HSM2_gbgs ) ; printf( "gbds = %12.5e\n" , here->HSM2_gbds ) ; printf( "gbbs = %12.5e\n" , here->HSM2_gbbs ) ; printf( "S_flicker_noise * ( freq / gain ) = %.16e\n" , here->HSM2_noiflick ) ; printf( "S_thermal_noise / ( gain * 4kT ) = %.16e\n" , here->HSM2_noithrml ) ; printf( "S_induced_gate_noise / ( gain * freq^2 ) = %.16e\n" , here->HSM2_noiigate ) ; printf( "cross-correlation coefficient (= Sigid/sqrt(Sig*Sid) ) = %.16e\n" , here->HSM2_noicross ) ; /* print Surface Potentials */ printf( "ivds %e ivgs %e ivbs %e Ps0 %.16e Pds %.16e\n" , ivds, ivgs, ivbs, here->HSM2_ps0_prv, here->HSM2_pds_prv ) ; } /* print all outputs ------------AA */ if ( model->HSM2_info >= 3 ) { /* physical valiables vs bias */ static int isFirst = 1; if (isFirst) { printf("# vbs vds vgs cggb cgdb cgsb cbgb cbdb cbsb cdgb cddb cdsb\n"); isFirst = 0; } printf("%12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e %12.5e\n", vbs, vds, vgs , here->HSM2_cggb, here->HSM2_cgdb, here->HSM2_cgsb, here->HSM2_cbgb, here->HSM2_cbdb, here->HSM2_cbsb, here->HSM2_cdgb, here->HSM2_cddb, here->HSM2_cdsb); } /* * check convergence */ isConv = 1; if ( (here->HSM2_off == 0) || !(ckt->CKTmode & MODEINITFIX) ) { if (Check == 1) { ckt->CKTnoncon++; isConv = 0; #ifndef NEWCONV } else { if (here->HSM2_mode >= 0) Idtot = here->HSM2_ids + here->HSM2_isub - here->HSM2_ibd + here->HSM2_igidl; else Idtot = here->HSM2_ids + here->HSM2_ibd - here->HSM2_igidl; tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; if (fabs(cdhat - Idtot) >= tol) { ckt->CKTnoncon++; isConv = 0; } else if (fabs(cgbhat - Igbtot) >= tol2 || fabs(cgshat - Igstot) >= tol3 || fabs(cgdhat - Igdtot) >= tol4) { ckt->CKTnoncon++; isConv = 0; } else { Ibtot = here->HSM2_ibs + here->HSM2_ibd - here->HSM2_isub - here->HSM2_igidl - here->HSM2_igisl; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol) { ckt->CKTnoncon++; isConv = 0; } } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->HSM2vbs) = vbs; *(ckt->CKTstate0 + here->HSM2vbd) = vbd; *(ckt->CKTstate0 + here->HSM2vgs) = vgs; *(ckt->CKTstate0 + here->HSM2vds) = vds; *(ckt->CKTstate0 + here->HSM2vsbs) = vsbs; *(ckt->CKTstate0 + here->HSM2vdbs) = vdbs; *(ckt->CKTstate0 + here->HSM2vdbd) = vdbd; *(ckt->CKTstate0 + here->HSM2vges) = vges; if ((ckt->CKTmode & MODEDC) && !(ckt->CKTmode & MODEINITFIX) && !(ckt->CKTmode & MODEINITJCT)) showPhysVal = 1; if (model->HSM2_show_Given && showPhysVal && isConv) { static int isFirst = 1; if (vds != vds_pre) ShowPhysVals(here, model, isFirst, vds_pre, vgs, vbs, vgd, vbd, vgb); else ShowPhysVals(here, model, isFirst, vds, vgs, vbs, vgd, vbd, vgb); if (isFirst) isFirst = 0; } /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; line755: ag0 = ckt->CKTag[0]; if (here->HSM2_mode > 0) { /* NORMAL mode */ gcggb = here->HSM2_cggb * ag0; gcgdb = here->HSM2_cgdb * ag0; gcgsb = here->HSM2_cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = here->HSM2_cdgb * ag0; gcddb = (here->HSM2_cddb + here->HSM2_capbd) * ag0; gcdsb = here->HSM2_cdsb * ag0; gcsgb = -(here->HSM2_cggb + here->HSM2_cbgb + here->HSM2_cdgb) * ag0; gcsdb = -(here->HSM2_cgdb + here->HSM2_cbdb + here->HSM2_cddb) * ag0; gcssb = (here->HSM2_capbs - (here->HSM2_cgsb + here->HSM2_cbsb + here->HSM2_cdsb)) * ag0; gcbgb = here->HSM2_cbgb * ag0; if ( !here->HSM2_corbnet ) { gcdbb = -(gcdgb + gcddb + gcdsb); gcsbb = -(gcsgb + gcsdb + gcssb); gcbdb = (here->HSM2_cbdb - here->HSM2_capbd) * ag0; gcbsb = (here->HSM2_cbsb - here->HSM2_capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb) + here->HSM2_capbd * ag0; gcsbb = -(gcsgb + gcsdb + gcssb) + here->HSM2_capbs * ag0; gcbdb = here->HSM2_cbdb * ag0; gcbsb = here->HSM2_cbsb * ag0; gcdbdb = - here->HSM2_capbd * ag0; gcsbsb = - here->HSM2_capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb); } else { /* REVERSE mode */ gcggb = here->HSM2_cggb * ag0; gcgdb = here->HSM2_cgsb * ag0; gcgsb = here->HSM2_cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->HSM2_cggb + here->HSM2_cbgb + here->HSM2_cdgb) * ag0; gcddb = (here->HSM2_capbd - (here->HSM2_cgsb + here->HSM2_cbsb + here->HSM2_cdsb)) * ag0; gcdsb = -(here->HSM2_cgdb + here->HSM2_cbdb + here->HSM2_cddb) * ag0; gcsgb = here->HSM2_cdgb * ag0; gcsdb = here->HSM2_cdsb * ag0; gcssb = (here->HSM2_cddb + here->HSM2_capbs) * ag0; gcbgb = here->HSM2_cbgb * ag0; if ( !here->HSM2_corbnet ){ gcdbb = -(gcdgb + gcddb + gcdsb); gcsbb = -(gcsgb + gcsdb + gcssb); gcbdb = (here->HSM2_cbsb - here->HSM2_capbd) * ag0; gcbsb = (here->HSM2_cbdb - here->HSM2_capbs) * ag0; gcdbdb = 0.0; gcsbsb = 0.0; } else { gcdbb = -(gcdgb + gcddb + gcdsb) + here->HSM2_capbd * ag0; gcsbb = -(gcsgb + gcsdb + gcssb) + here->HSM2_capbs * ag0; gcbdb = here->HSM2_cbsb * ag0; gcbsb = here->HSM2_cbdb * ag0; gcdbdb = - here->HSM2_capbd * ag0; gcsbsb = - here->HSM2_capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb); qdrn = -(qgate + qbulk + qdrn); } if (ByPass) goto line860; *(ckt->CKTstate0 + here->HSM2qg) = qgate; *(ckt->CKTstate0 + here->HSM2qd) = qdrn - *(ckt->CKTstate0 + here->HSM2qbd); if ( !here->HSM2_corbnet ) { *(ckt->CKTstate0 + here->HSM2qb) = qbulk + *(ckt->CKTstate0 + here->HSM2qbd) + *(ckt->CKTstate0 + here->HSM2qbs); } else { *(ckt->CKTstate0 + here->HSM2qb) = qbulk; } #ifdef DEBUG_HISIM2LD printf( "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n" ) ; printf( "HSM2qg = %12.5e\n" , *(ckt->CKTstate0 + here->HSM2qg) ) ; printf( "HSM2qd = %12.5e\n" , *(ckt->CKTstate0 + here->HSM2qd) ) ; printf( "HSM2qb = %12.5e\n" , *(ckt->CKTstate0 + here->HSM2qb) ) ; printf( "qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq\n" ) ; #endif /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) goto line1000; if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HSM2qb) = *(ckt->CKTstate0 + here->HSM2qb); *(ckt->CKTstate1 + here->HSM2qg) = *(ckt->CKTstate0 + here->HSM2qg); *(ckt->CKTstate1 + here->HSM2qd) = *(ckt->CKTstate0 + here->HSM2qd); if ( here->HSM2_corbnet ) { *(ckt->CKTstate1 + here->HSM2qbs) = *(ckt->CKTstate0 + here->HSM2qbs); *(ckt->CKTstate1 + here->HSM2qbd) = *(ckt->CKTstate0 + here->HSM2qbd); } } return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSM2qb)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSM2qg)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSM2qd)); if ( here->HSM2_corbnet ) { return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSM2qbs)); return_if_error (NIintegrate(ckt, &geq, &ceq, 0.0, here->HSM2qbd)); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; ceqqjd = ceqqjs = 0.0; gcdgb = gcddb = gcdsb = gcdbb = 0.0; gcsgb = gcsdb = gcssb = gcsbb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; gcbgb = gcbdb = gcbsb = gcbbb = 0.0; gcdbdb = gcsbsb = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->HSM2cqg); cqbulk = *(ckt->CKTstate0 + here->HSM2cqb); cqdrn = *(ckt->CKTstate0 + here->HSM2cqd); #ifdef DEBUG_HISIM2LD printf( "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\n" ) ; printf( "cqgate = %12.5e\n" , cqgate ) ; printf( "cqbulk = %12.5e\n" , cqbulk ) ; printf( "cqdrn = %12.5e\n" , cqdrn ) ; printf( "iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii\n" ) ; #endif ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb + (gcddb + gcdbdb) * vbd - gcdbdb * vbd_jct + gcdsb * vbs; ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; if (here->HSM2_corbnet) { ceqqjs = *(ckt->CKTstate0 + here->HSM2cqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->HSM2cqbd) + gcdbdb * vbd_jct; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->HSM2cqb) = *(ckt->CKTstate0 + here->HSM2cqb); *(ckt->CKTstate1 + here->HSM2cqg) = *(ckt->CKTstate0 + here->HSM2cqg); *(ckt->CKTstate1 + here->HSM2cqd) = *(ckt->CKTstate0 + here->HSM2cqd); if (here->HSM2_corbnet) { *(ckt->CKTstate1 + here->HSM2cqbs) = *(ckt->CKTstate0 + here->HSM2cqbs); *(ckt->CKTstate1 + here->HSM2cqbd) = *(ckt->CKTstate0 + here->HSM2cqbd); } } /* * load current vector */ line900: if (here->HSM2_mode >= 0) { /* NORMAL mode */ gm = here->HSM2_gm; gmbs = here->HSM2_gmbs; FwdSum = gm + gmbs; RevSum = 0.0; cdreq = model->HSM2_type * (cdrain - here->HSM2_gds * vds - gm * vgs - gmbs * vbs); ceqbd = model->HSM2_type * (here->HSM2_isub + here->HSM2_igidl - (here->HSM2_gbds + here->HSM2_gigidlds) * vds - (here->HSM2_gbgs + here->HSM2_gigidlgs) * vgs - (here->HSM2_gbbs + here->HSM2_gigidlbs) * vbs); ceqbs = model->HSM2_type * (here->HSM2_igisl + here->HSM2_gigislsd * vds - here->HSM2_gigislgd * vgd - here->HSM2_gigislbd * vbd); gbbdp = -here->HSM2_gbds; gbbsp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = here->HSM2_gbgs; gbdpdp = here->HSM2_gbds; gbdpb = here->HSM2_gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; Ibtoteq = model->HSM2_type * (here->HSM2_igb - here->HSM2_gigbg * vgs - here->HSM2_gigbd * vds - here->HSM2_gigbb * vbs); gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; Istoteq = model->HSM2_type * (here->HSM2_igs - here->HSM2_gigsg * vgs - here->HSM2_gigsd * vds - here->HSM2_gigsb * vbs); gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; Idtoteq = model->HSM2_type * (here->HSM2_igd - here->HSM2_gigdg * vgs - here->HSM2_gigdd * vds - here->HSM2_gigdb * vbs); } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; Igtoteq = Ibtoteq + Istoteq + Idtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; } else { /* REVERSE mode */ gm = - here->HSM2_gm; gmbs = - here->HSM2_gmbs; FwdSum = 0.0; RevSum = -(gm + gmbs); cdreq = -model->HSM2_type * (cdrain + here->HSM2_gds * vds + gm * vgd + gmbs * vbd); ceqbs = model->HSM2_type * (here->HSM2_isub + here->HSM2_igisl + (here->HSM2_gbds + here->HSM2_gigislsd) * vds - (here->HSM2_gbgs + here->HSM2_gigislgd) * vgd - (here->HSM2_gbbs + here->HSM2_gigislbd) * vbd); ceqbd = model->HSM2_type * (here->HSM2_igidl - here->HSM2_gigidlds * vds - here->HSM2_gigidlgs * vgs - here->HSM2_gigidlbs * vbs); gbbsp = - here->HSM2_gbds; gbbdp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->HSM2_gbgs; gbspsp = here->HSM2_gbds; gbspb = here->HSM2_gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; Ibtoteq = model->HSM2_type * (here->HSM2_igb - here->HSM2_gigbg * vgd + here->HSM2_gigbs * vds - here->HSM2_gigbb * vbd); gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; Istoteq = model->HSM2_type * (here->HSM2_igs - here->HSM2_gigsg * vgd + here->HSM2_gigss * vds - here->HSM2_gigsb * vbd); gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; Idtoteq = model->HSM2_type * (here->HSM2_igd - here->HSM2_gigdg * vgd + here->HSM2_gigds * vds - here->HSM2_gigdb * vbd); } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; Igtoteq = Ibtoteq + Istoteq + Idtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; } if (model->HSM2_type > 0) { ceqjs = here->HSM2_ibs - here->HSM2_gbs * vbs_jct; ceqjd = here->HSM2_ibd - here->HSM2_gbd * vbd_jct; } else { ceqjs = -(here->HSM2_ibs - here->HSM2_gbs * vbs_jct); ceqjd = -(here->HSM2_ibd - here->HSM2_gbd * vbd_jct); ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; if (here->HSM2_corbnet) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } } #ifdef DEBUG_HISIM2LD printf( "----------------------------------------------------\n" ) ; printf( "ceqqg = %12.5e\n" , ceqqg ) ; printf( "....................................................\n" ) ; printf( "ceqbs = %12.5e\n" , ceqbs ) ; printf( "ceqbd = %12.5e\n" , ceqbd ) ; printf( "ceqqb = %12.5e\n" , ceqqb ) ; printf( "....................................................\n" ) ; printf( "ceqbd = %12.5e\n" , ceqbd ) ; printf( "cdreq = %12.5e\n" , cdreq ) ; printf( "ceqqd = %12.5e\n" , ceqqd ) ; printf( "----------------------------------------------------\n" ) ; #endif *(ckt->CKTrhs + here->HSM2dNodePrime) += ceqjd - ceqbd - cdreq - ceqqd + Idtoteq; *(ckt->CKTrhs + here->HSM2gNodePrime) -= ceqqg + Igtoteq; if ( !here->HSM2_corbnet ) { *(ckt->CKTrhs + here->HSM2bNodePrime) += ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq; *(ckt->CKTrhs + here->HSM2sNodePrime) += cdreq - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + Istoteq; } else { *(ckt->CKTrhs + here->HSM2dbNode) -= ceqjd + ceqqjd; *(ckt->CKTrhs + here->HSM2bNodePrime) += ceqbd + ceqbs - ceqqb + Ibtoteq; *(ckt->CKTrhs + here->HSM2sbNode) -= ceqjs + ceqqjs; *(ckt->CKTrhs + here->HSM2sNodePrime) += cdreq - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + Istoteq; } #ifdef DEBUG_HISIM2LD printf ("id ig ib is %12.5e %12.5e %12.5e %12.5e\n", ceqjd - ceqbd - cdreq - ceqqd + Idtoteq, -(ceqqg + Igtoteq), ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq, cdreq - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + Istoteq); #endif /* * load y matrix */ if ( !here->HSM2_corbnet ){ gjbd = here->HSM2_gbd; gjbs = here->HSM2_gbs; } else gjbd = gjbs = 0.0; if (here->HSM2_corg == 1) { grg = here->HSM2_grg; *(here->HSM2GgPtr) += grg; *(here->HSM2GPgPtr) -= grg; *(here->HSM2GgpPtr) -= grg; *(here->HSM2GPgpPtr) += gcggb + grg + gIgtotg; *(here->HSM2GPdpPtr) += gcgdb + gIgtotd; *(here->HSM2GPspPtr) += gcgsb + gIgtots; *(here->HSM2GPbpPtr) += gcgbb + gIgtotb; } else { *(here->HSM2GPgpPtr) += gcggb + gIgtotg; *(here->HSM2GPdpPtr) += gcgdb + gIgtotd; *(here->HSM2GPspPtr) += gcgsb + gIgtots; *(here->HSM2GPbpPtr) += gcgbb + gIgtotb; } *(here->HSM2DPdpPtr) += here->HSM2drainConductance + here->HSM2_gds + here->HSM2_gbd + RevSum + gcddb + gbdpdp - gIdtotd; *(here->HSM2DPdPtr) -= here->HSM2drainConductance; *(here->HSM2DPgpPtr) += gm + gcdgb + gbdpg - gIdtotg; *(here->HSM2DPspPtr) -= here->HSM2_gds + FwdSum - gcdsb - gbdpsp + gIdtots; *(here->HSM2DPbpPtr) -= gjbd - gmbs - gcdbb - gbdpb + gIdtotb; *(here->HSM2DdpPtr) -= here->HSM2drainConductance; *(here->HSM2DdPtr) += here->HSM2drainConductance; *(here->HSM2SPdpPtr) -= here->HSM2_gds + RevSum - gcsdb - gbspdp + gIstotd; *(here->HSM2SPgpPtr) += gcsgb - gm + gbspg - gIstotg; *(here->HSM2SPspPtr) += here->HSM2sourceConductance + here->HSM2_gds + here->HSM2_gbs + FwdSum + gcssb + gbspsp - gIstots; *(here->HSM2SPsPtr) -= here->HSM2sourceConductance; *(here->HSM2SPbpPtr) -= gjbs + gmbs - gcsbb - gbspb + gIstotb; *(here->HSM2SspPtr) -= here->HSM2sourceConductance; *(here->HSM2SsPtr) += here->HSM2sourceConductance; *(here->HSM2BPdpPtr) += gcbdb - gjbd + gbbdp - gIbtotd; *(here->HSM2BPgpPtr) += gcbgb - here->HSM2_gbgs - gIbtotg; *(here->HSM2BPspPtr) += gcbsb - gjbs + gbbsp - gIbtots; *(here->HSM2BPbpPtr) += gjbd + gjbs + gcbbb - here->HSM2_gbbs - gIbtotb; if (model->HSM2_cogidl) { /* stamp GIDL */ *(here->HSM2DPdpPtr) += here->HSM2_gigidlds; *(here->HSM2DPgpPtr) += here->HSM2_gigidlgs; *(here->HSM2DPspPtr) -= (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs); *(here->HSM2DPbpPtr) += here->HSM2_gigidlbs; *(here->HSM2BPdpPtr) -= here->HSM2_gigidlds; *(here->HSM2BPgpPtr) -= here->HSM2_gigidlgs; *(here->HSM2BPspPtr) += (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs); *(here->HSM2BPbpPtr) -= here->HSM2_gigidlbs; /* stamp GISL */ *(here->HSM2SPdpPtr) -= (here->HSM2_gigislsd + here->HSM2_gigislgd + here->HSM2_gigislbd); *(here->HSM2SPgpPtr) += here->HSM2_gigislgd; *(here->HSM2SPspPtr) += here->HSM2_gigislsd; *(here->HSM2SPbpPtr) += here->HSM2_gigislbd; *(here->HSM2BPdpPtr) += (here->HSM2_gigislgd + here->HSM2_gigislsd + here->HSM2_gigislbd); *(here->HSM2BPgpPtr) -= here->HSM2_gigislgd; *(here->HSM2BPspPtr) -= here->HSM2_gigislsd; *(here->HSM2BPbpPtr) -= here->HSM2_gigislbd; } if (here->HSM2_corbnet) { /* body resistance network */ *(here->HSM2DPdbPtr) += gcdbdb - here->HSM2_gbd; *(here->HSM2SPsbPtr) -= here->HSM2_gbs - gcsbsb; *(here->HSM2DBdpPtr) += gcdbdb - here->HSM2_gbd; *(here->HSM2DBdbPtr) += here->HSM2_gbd - gcdbdb + here->HSM2_grbpd + here->HSM2_grbdb; *(here->HSM2DBbpPtr) -= here->HSM2_grbpd; *(here->HSM2DBbPtr) -= here->HSM2_grbdb; *(here->HSM2BPdbPtr) -= here->HSM2_grbpd; *(here->HSM2BPbPtr) -= here->HSM2_grbpb; *(here->HSM2BPsbPtr) -= here->HSM2_grbps; *(here->HSM2BPbpPtr) += here->HSM2_grbpd + here->HSM2_grbps + here->HSM2_grbpb; *(here->HSM2SBspPtr) += gcsbsb - here->HSM2_gbs; *(here->HSM2SBbpPtr) -= here->HSM2_grbps; *(here->HSM2SBbPtr) -= here->HSM2_grbsb; *(here->HSM2SBsbPtr) += here->HSM2_gbs - gcsbsb + here->HSM2_grbps + here->HSM2_grbsb; *(here->HSM2BdbPtr) -= here->HSM2_grbdb; *(here->HSM2BbpPtr) -= here->HSM2_grbpb; *(here->HSM2BsbPtr) -= here->HSM2_grbsb; *(here->HSM2BbPtr) += here->HSM2_grbsb + here->HSM2_grbdb + here->HSM2_grbpb; } line1000: ; } /* End of MOSFET Instance */ } /* End of Model Instance */ #ifdef MOS_MODEL_TIME tm1 = gtodsecld() ; mos_model_time += ( tm1 - tm0 ) ; sprintf( mos_model_name , "HiSIM 240BSC1" ) ; #ifdef PARAMOS_TIME vsum = vbs + vds + vgs ; if ( vsum < vsum0 - 1e-6 || vsum > vsum0 + 1e-6 ) { printf( "PMVbs= %12.5e\n" , vbs ) ; printf( "PMVds= %12.5e\n" , vds ) ; printf( "PMVgs= %12.5e\n" , vgs ) ; printf( "PMTime= %12.5e\n" , tm1 - tm0 ) ; } vsum0 = vsum ; #endif #endif return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2ask.c0000644000265600020320000001610612264261473021147 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2ask.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "hsm2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { HSM2instance *here = (HSM2instance*)inst; NG_IGNORE(select); switch (which) { case HSM2_L: value->rValue = here->HSM2_l; return(OK); case HSM2_W: value->rValue = here->HSM2_w; return(OK); case HSM2_AS: value->rValue = here->HSM2_as; return(OK); case HSM2_AD: value->rValue = here->HSM2_ad; return(OK); case HSM2_PS: value->rValue = here->HSM2_ps; return(OK); case HSM2_PD: value->rValue = here->HSM2_pd; return(OK); case HSM2_NRS: value->rValue = here->HSM2_nrs; return(OK); case HSM2_NRD: value->rValue = here->HSM2_nrd; return(OK); case HSM2_TEMP: value->rValue = here->HSM2_temp; return(OK); case HSM2_DTEMP: value->rValue = here->HSM2_dtemp; return(OK); case HSM2_OFF: value->iValue = here->HSM2_off; return(OK); case HSM2_IC_VBS: value->rValue = here->HSM2_icVBS; return(OK); case HSM2_IC_VDS: value->rValue = here->HSM2_icVDS; return(OK); case HSM2_IC_VGS: value->rValue = here->HSM2_icVGS; return(OK); case HSM2_DNODE: value->iValue = here->HSM2dNode; return(OK); case HSM2_GNODE: value->iValue = here->HSM2gNode; return(OK); case HSM2_SNODE: value->iValue = here->HSM2sNode; return(OK); case HSM2_BNODE: value->iValue = here->HSM2bNode; return(OK); case HSM2_DNODEPRIME: value->iValue = here->HSM2dNodePrime; return(OK); case HSM2_SNODEPRIME: value->iValue = here->HSM2sNodePrime; return(OK); case HSM2_SOURCECONDUCT: value->rValue = here->HSM2sourceConductance; return(OK); case HSM2_DRAINCONDUCT: value->rValue = here->HSM2drainConductance; return(OK); case HSM2_VBD: value->rValue = *(ckt->CKTstate0 + here->HSM2vbd); return(OK); case HSM2_VBS: value->rValue = *(ckt->CKTstate0 + here->HSM2vbs); return(OK); case HSM2_VGS: value->rValue = *(ckt->CKTstate0 + here->HSM2vgs); return(OK); case HSM2_VDS: value->rValue = *(ckt->CKTstate0 + here->HSM2vds); return(OK); case HSM2_CD: value->rValue = here->HSM2_ids; return(OK); case HSM2_ISUB: value->rValue = here->HSM2_isub; return(OK); case HSM2_IGIDL: value->rValue = here->HSM2_igidl; return(OK); case HSM2_IGISL: value->rValue = here->HSM2_igisl; return(OK); case HSM2_IGD: value->rValue = here->HSM2_igd; return(OK); case HSM2_IGS: value->rValue = here->HSM2_igs; return(OK); case HSM2_IGB: value->rValue = here->HSM2_igb; return(OK); case HSM2_CBS: value->rValue = here->HSM2_ibs; return(OK); case HSM2_CBD: value->rValue = here->HSM2_ibd; return(OK); case HSM2_GM: value->rValue = here->HSM2_gm; return(OK); case HSM2_GDS: value->rValue = here->HSM2_gds; return(OK); case HSM2_GMBS: value->rValue = here->HSM2_gmbs; return(OK); case HSM2_GBD: value->rValue = here->HSM2_gbd; return(OK); case HSM2_GBS: value->rValue = here->HSM2_gbs; return(OK); case HSM2_QB: value->rValue = *(ckt->CKTstate0 + here->HSM2qb); return(OK); case HSM2_CQB: value->rValue = *(ckt->CKTstate0 + here->HSM2cqb); return(OK); case HSM2_QG: value->rValue = *(ckt->CKTstate0 + here->HSM2qg); return(OK); case HSM2_CQG: value->rValue = *(ckt->CKTstate0 + here->HSM2cqg); return(OK); case HSM2_QD: value->rValue = *(ckt->CKTstate0 + here->HSM2qd); return(OK); case HSM2_CQD: value->rValue = *(ckt->CKTstate0 + here->HSM2cqd); return(OK); case HSM2_CGG: value->rValue = here->HSM2_cggb; return(OK); case HSM2_CGD: value->rValue = here->HSM2_cgdb; return(OK); case HSM2_CGS: value->rValue = here->HSM2_cgsb; return(OK); case HSM2_CDG: value->rValue = here->HSM2_cdgb; return(OK); case HSM2_CDD: value->rValue = here->HSM2_cddb; return(OK); case HSM2_CDS: value->rValue = here->HSM2_cdsb; return(OK); case HSM2_CBG: value->rValue = here->HSM2_cbgb; return(OK); case HSM2_CBDB: value->rValue = here->HSM2_cbdb; return(OK); case HSM2_CBSB: value->rValue = here->HSM2_cbsb; return(OK); case HSM2_CGDO: value->rValue = here->HSM2_cgdo; return(OK); case HSM2_CGSO: value->rValue = here->HSM2_cgso; return(OK); case HSM2_CGBO: value->rValue = here->HSM2_cgbo; return(OK); case HSM2_CAPBD: value->rValue = here->HSM2_capbd; return(OK); case HSM2_CAPBS: value->rValue = here->HSM2_capbs; return(OK); case HSM2_VON: value->rValue = here->HSM2_von; return(OK); case HSM2_VDSAT: value->rValue = here->HSM2_vdsat; return(OK); case HSM2_QBS: value->rValue = *(ckt->CKTstate0 + here->HSM2qbs); return(OK); case HSM2_QBD: value->rValue = *(ckt->CKTstate0 + here->HSM2qbd); return(OK); case HSM2_CORBNET: value->iValue = here->HSM2_corbnet; return(OK); case HSM2_RBPB: value->rValue = here->HSM2_rbpb; return (OK); case HSM2_RBPD: value->rValue = here->HSM2_rbpd; return(OK); case HSM2_RBPS: value->rValue = here->HSM2_rbps; return(OK); case HSM2_RBDB: value->rValue = here->HSM2_rbdb; return(OK); case HSM2_RBSB: value->rValue = here->HSM2_rbsb; return(OK); case HSM2_CORG: value->iValue = here->HSM2_corg; return(OK); /* case HSM2_RSHG: */ /* value->rValue = here->HSM2_rshg; */ /* return(OK); */ case HSM2_NGCON: value->rValue = here->HSM2_ngcon; return(OK); case HSM2_XGW: value->rValue = here->HSM2_xgw; return(OK); case HSM2_XGL: value->rValue = here->HSM2_xgl; return(OK); case HSM2_NF: value->rValue = here->HSM2_nf; return(OK); case HSM2_SA: value->rValue = here->HSM2_sa; return(OK); case HSM2_SB: value->rValue = here->HSM2_sb; return(OK); case HSM2_SD: value->rValue = here->HSM2_sd; return(OK); case HSM2_NSUBCDFM: value->rValue = here->HSM2_nsubcdfm; return(OK); case HSM2_MPHDFM: value->rValue = here->HSM2_mphdfm; return(OK); case HSM2_M: value->rValue = here->HSM2_m; return(OK); /* WPE */ case HSM2_SCA: value->rValue = here->HSM2_sca; return(OK); case HSM2_SCB: value->rValue = here->HSM2_scb; return(OK); case HSM2_SCC: value->rValue = here->HSM2_scc; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/hisim2/hsm2ext.h0000644000265600020320000000326412264261473021177 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2ext.h Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ extern int HSM2acLoad(GENmodel *,CKTcircuit*); extern int HSM2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int HSM2convTest(GENmodel *,CKTcircuit*); extern int HSM2delete(GENmodel*,IFuid,GENinstance**); extern void HSM2destroy(GENmodel**); extern int HSM2getic(GENmodel*,CKTcircuit*); extern int HSM2load(GENmodel*,CKTcircuit*); extern int HSM2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int HSM2mDelete(GENmodel**,IFuid,GENmodel*); extern int HSM2mParam(int,IFvalue*,GENmodel*); extern void HSM2mosCap(CKTcircuit*, double, double, double, double*, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int HSM2param(int,IFvalue*,GENinstance*,IFvalue*); extern int HSM2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int HSM2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int HSM2unsetup(GENmodel*,CKTcircuit*); extern int HSM2temp(GENmodel*,CKTcircuit*); extern int HSM2trunc(GENmodel*,CKTcircuit*,double*); extern int HSM2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int HSM2soaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/hisim2/hsm2noi.c0000644000265600020320000002623412264261473021161 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2noi.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsm2def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * HSM2noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int HSM2noise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, register Ndata *data, double *OnDens) { register HSM2model *model = (HSM2model *)inModel; register HSM2instance *here; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[HSM2NSRCS]; double lnNdens[HSM2NSRCS]; register int i; double R = 0.0 , G = 0.0 ; double TTEMP = 0.0 ; /* for induced gate noise calculation: */ double omega = ckt->CKTomega; double sid, ci, sigrat, Qdrat; double realXds, imagXds, realXgs, imagXgs ; /* define the names of the noise sources */ static char * HSM2nNames[HSM2NSRCS] = { /* Note that we have to keep the order consistent with the index definitions in hsm2defs.h */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".id", /* noise due to id */ ".1ovf", /* flicker (1/f) noise */ ".igs", /* shot noise due to Igs */ ".igd", /* shot noise due to Igd */ ".igb", /* shot noise due to Igb */ ".ign", /* induced gate noise component at the drain node */ "" /* total transistor noise */ }; for ( ;model != NULL; model = model->HSM2nextModel ) { for ( here = model->HSM2instances; here != NULL; here = here->HSM2nextInstance ) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0) { switch (mode) { case N_DENS: for ( i = 0; i < HSM2NSRCS; i++ ) { (void) sprintf(name, "onoise.%s%s", (char *)here->HSM2name, HSM2nNames[i]); data->namelist = (IFuid *) trealloc((char *) data->namelist, ((long unsigned int)data->numPlots + 1) * sizeof(IFuid)); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); } break; case INT_NOIZ: for ( i = 0; i < HSM2NSRCS; i++ ) { (void) sprintf(name, "onoise_total.%s%s", (char *)here->HSM2name, HSM2nNames[i]); data->namelist = (IFuid *) trealloc((char *) data->namelist, ((long unsigned int)data->numPlots + 1) * sizeof(IFuid)); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); (void) sprintf(name, "inoise_total.%s%s", (char *)here->HSM2name, HSM2nNames[i]); data->namelist = (IFuid *) trealloc((char *) data->namelist, ((long unsigned int)data->numPlots + 1) * sizeof(IFuid)); if (!data->namelist) return(E_NOMEM); (*(SPfrontEnd->IFnewUid)) (ckt, &(data->namelist[data->numPlots++]), (IFuid) NULL, name, UID_OTHER, NULL); } break; } } break; case N_CALC: switch (mode) { case N_DENS: /* temperature */ TTEMP = ckt->CKTtemp ; if ( here->HSM2_temp_Given ) TTEMP = here->HSM2_ktemp ; if ( here->HSM2_dtemp_Given ) { TTEMP = TTEMP + here->HSM2_dtemp ; } /* rs/rd thermal noise */ if ( model->HSM2_corsrd < 0 ) { NevalSrc(&noizDens[HSM2RDNOIZ], (double*) NULL, ckt, N_GAIN, here->HSM2dNodePrime, here->HSM2dNode, (double) 0.0); noizDens[HSM2RDNOIZ] *= 4 * CONSTboltz * TTEMP * here->HSM2drainConductance ; lnNdens[HSM2RDNOIZ] = log( MAX(noizDens[HSM2RDNOIZ],N_MINLOG) ) ; NevalSrc(&noizDens[HSM2RSNOIZ], (double*) NULL, ckt, N_GAIN, here->HSM2sNodePrime, here->HSM2sNode, (double) 0.0); noizDens[HSM2RSNOIZ] *= 4 * CONSTboltz * TTEMP * here->HSM2sourceConductance ; lnNdens[HSM2RSNOIZ] = log( MAX(noizDens[HSM2RSNOIZ],N_MINLOG) ) ; /* NevalSrc(&noizDens[HSM2RDNOIZ], &lnNdens[HSM2RDNOIZ], ckt, THERMNOISE, here->HSM2dNodePrime, here->HSM2dNode, here->HSM2_weff / model->HSM2_rsh); NevalSrc(&noizDens[HSM2RSNOIZ], &lnNdens[HSM2RSNOIZ], ckt, THERMNOISE, here->HSM2sNodePrime, here->HSM2sNode, here->HSM2_weff / model->HSM2_rsh); */ } else { noizDens[HSM2RDNOIZ] = 0e0 ; lnNdens[HSM2RDNOIZ] = N_MINLOG ; noizDens[HSM2RSNOIZ] = 0e0 ; lnNdens[HSM2RSNOIZ] = N_MINLOG ; } /* channel thermal noise */ switch( model->HSM2_noise ) { case 1: /* HiSIM2 model */ if ( model->HSM2_corsrd <= 0 || here->HSM2internalGd <= 0.0 ) { G = here->HSM2_noithrml ; } else { R = 0.0 , G = 0.0 ; if ( here->HSM2_noithrml > 0.0 ) R += 1.0 / here->HSM2_noithrml ; if ( here->HSM2internalGd > 0.0 ) R += 1.0 / here->HSM2internalGd ; if ( here->HSM2internalGs > 0.0 ) R += 1.0 / here->HSM2internalGs ; if ( R > 0.0 ) G = 1.0 / R ; } NevalSrc(&noizDens[HSM2IDNOIZ], (double*) NULL, ckt, N_GAIN, here->HSM2dNodePrime, here->HSM2sNodePrime, (double) 0.0); noizDens[HSM2IDNOIZ] *= 4 * CONSTboltz * TTEMP * G ; lnNdens[HSM2IDNOIZ] = log( MAX(noizDens[HSM2IDNOIZ],N_MINLOG) ); break; } /* flicker noise */ NevalSrc(&noizDens[HSM2FLNOIZ], (double*) NULL, ckt, N_GAIN, here->HSM2dNodePrime, here->HSM2sNodePrime, (double) 0.0); switch ( model->HSM2_noise ) { case 1: /* HiSIM model */ noizDens[HSM2FLNOIZ] *= here->HSM2_noiflick / pow(data->freq, model->HSM2_falph) ; break; } lnNdens[HSM2FLNOIZ] = log(MAX(noizDens[HSM2FLNOIZ], N_MINLOG)); /* shot noise */ NevalSrc(&noizDens[HSM2IGSNOIZ], &lnNdens[HSM2IGSNOIZ], ckt, SHOTNOISE, here->HSM2gNodePrime, here->HSM2sNodePrime, here->HSM2_igs); NevalSrc(&noizDens[HSM2IGDNOIZ], &lnNdens[HSM2IGDNOIZ], ckt, SHOTNOISE, here->HSM2gNodePrime, here->HSM2dNodePrime, here->HSM2_igd); NevalSrc(&noizDens[HSM2IGBNOIZ], &lnNdens[HSM2IGBNOIZ], ckt, SHOTNOISE, here->HSM2gNodePrime, here->HSM2bNodePrime, here->HSM2_igb); /* induced gate noise */ switch ( model->HSM2_noise ) { case 1: /* HiSIM model */ sid = 4.0 * CONSTboltz * TTEMP * here->HSM2_noithrml ; ci = here->HSM2_noicross ; sigrat = (sid > 0.0 && here->HSM2_noiigate > 0.0) ? sqrt(here->HSM2_noiigate/sid) : 0.0 ; Qdrat = here->HSM2_Qdrat ; realXds = *(ckt->CKTrhs +here->HSM2dNodePrime) - *(ckt->CKTrhs +here->HSM2sNodePrime); imagXds = *(ckt->CKTirhs+here->HSM2dNodePrime) - *(ckt->CKTirhs+here->HSM2sNodePrime); realXgs = *(ckt->CKTrhs +here->HSM2gNodePrime) - *(ckt->CKTrhs +here->HSM2sNodePrime); imagXgs = *(ckt->CKTirhs+here->HSM2gNodePrime) - *(ckt->CKTirhs+here->HSM2sNodePrime); noizDens[HSM2IGNOIZ] = 2.0 * omega * ci * sigrat * sid * ( realXgs*imagXds - realXds*imagXgs ) + omega*omega * sigrat*sigrat * sid * ( (realXgs-Qdrat*realXds) * (realXgs-Qdrat*realXds) +(imagXgs-Qdrat*imagXds) * (imagXgs-Qdrat*imagXds) ) ; lnNdens[HSM2IGNOIZ] = log(MAX(noizDens[HSM2IGNOIZ], N_MINLOG)); break; } /* total */ noizDens[HSM2TOTNOIZ] = noizDens[HSM2RDNOIZ] + noizDens[HSM2RSNOIZ] + noizDens[HSM2IDNOIZ] + noizDens[HSM2FLNOIZ] + noizDens[HSM2IGSNOIZ] + noizDens[HSM2IGDNOIZ] + noizDens[HSM2IGBNOIZ] + noizDens[HSM2IGNOIZ]; lnNdens[HSM2TOTNOIZ] = log(MAX(noizDens[HSM2TOTNOIZ], N_MINLOG)); /* printf("f %e Sid %.16e Srd %.16e Srs %.16e Sflick %.16e Stherm %.16e Sign %.16e\n", */ /* data->freq,noizDens[HSM2TOTNOIZ],noizDens[HSM2RDNOIZ],noizDens[HSM2RSNOIZ],noizDens[HSM2FLNOIZ],noizDens[HSM2IDNOIZ],noizDens[HSM2IGNOIZ]); */ *OnDens += noizDens[HSM2TOTNOIZ]; if ( data->delFreq == 0.0 ) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for ( i = 0; i < HSM2NSRCS; i++ ) here->HSM2nVar[LNLSTDENS][i] = lnNdens[i]; /* clear out our integration variables if it's the first pass */ if (data->freq == ((NOISEAN*) ckt->CKTcurJob)->NstartFreq) { for (i = 0; i < HSM2NSRCS; i++) { here->HSM2nVar[OUTNOIZ][i] = 0.0; here->HSM2nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for ( i = 0; i < HSM2NSRCS; i++ ) { if ( i != HSM2TOTNOIZ ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->HSM2nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->HSM2nVar[LNLSTDENS][i] + data->lnGainInv, data); here->HSM2nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if ( ((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0 ) { here->HSM2nVar[OUTNOIZ][i] += tempOnoise; here->HSM2nVar[OUTNOIZ][HSM2TOTNOIZ] += tempOnoise; here->HSM2nVar[INNOIZ][i] += tempInoise; here->HSM2nVar[INNOIZ][HSM2TOTNOIZ] += tempInoise; } } } } if ( data->prtSummary ) { for (i = 0; i < HSM2NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if ( ((NOISEAN*)ckt->CKTcurJob)->NStpsSm != 0 ) { for ( i = 0; i < HSM2NSRCS; i++ ) { data->outpVector[data->outNumber++] = here->HSM2nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->HSM2nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2set.c0000644000265600020320000016101612264261473021165 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2set.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "hsm2evalenv.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define BINNING(param) pParam->HSM2_##param = model->HSM2_##param \ + model->HSM2_l##param / Lbin + model->HSM2_w##param / Wbin \ + model->HSM2_p##param / LWbin ; #define RANGECHECK(param, min, max, pname) \ if ( model->HSM2_coerrrep && ((param) < (min) || (param) > (max)) ) { \ printf("warning: (%s = %g) range [%g , %g].\n", \ (pname), (param), (min), (max) ); \ } #define RANGERESET(param, min, max, pname) \ if ( model->HSM2_coerrrep && ((param) > (max)) ) { \ printf("reset : (%s = %g to %g) range [%g , %g].\n", \ (pname), (param), (max), (min), (max) ); \ } \ if ( model->HSM2_coerrrep && ((param) < (min)) ) { \ printf("reset : (%s = %g to %g) range [%g , %g].\n", \ (pname), (param), (min), (min), (max) ); \ } \ if ( (param) < (min) ) { param = (min); } \ if ( (param) > (max) ) { param = (max); } #define MINCHECK(param, min, pname) \ if ( model->HSM2_coerrrep && ((param) < (min)) ) { \ printf("warning: (%s = %g) range [%g , %g].\n", \ (pname), (param), (min), (min) ); \ } int HSM2setup( register SMPmatrix *matrix, register GENmodel *inModel, register CKTcircuit *ckt, int *states) /* load the HSM2 device structure with those pointers needed later * for fast matrix loading */ { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; int error; CKTnode *tmp; HSM2binningParam *pParam ; HSM2modelMKSParam *modelMKS ; HSM2hereMKSParam *hereMKS ; double Lgate =0.0, LG =0.0, Wgate =0.0, WG=0.0 ; double Lbin=0.0, Wbin=0.0, LWbin =0.0; /* binning */ /* loop through all the HSM2 device models */ for ( ;model != NULL ;model = model->HSM2nextModel ) { /* Default value Processing for HSM2 MOSFET Models */ if ( !model->HSM2_type_Given ) model->HSM2_type = NMOS ; /***/ if ( !model->HSM2_info_Given ) model->HSM2_info = 0 ; /* if ( !model->HSM2_noise_Given) model->HSM2_noise = 1;*/ model->HSM2_noise = 1; /* allways noise is set to be 1 */ if ( !model->HSM2_version_Given) { model->HSM2_version = 270; /* default 270 */ printf(" 270 is selected for VERSION. (default) \n"); } else { if (model->HSM2_version != 270) { model->HSM2_version = 270; /* default 270 */ printf(" 270 is the only available VERSION. \n"); printf(" 270 is selected for VERSION. (default) \n"); } else { printf(" %d is selected for VERSION \n", (int)model->HSM2_version); } } if ( !model->HSM2_corsrd_Given ) model->HSM2_corsrd = 0 ; if ( !model->HSM2_corg_Given ) model->HSM2_corg = 0 ; if ( !model->HSM2_coiprv_Given ) model->HSM2_coiprv = 1 ; if ( !model->HSM2_copprv_Given ) model->HSM2_copprv = 1 ; if ( !model->HSM2_coadov_Given ) model->HSM2_coadov = 1 ; if ( !model->HSM2_coisub_Given ) model->HSM2_coisub = 0 ; if ( !model->HSM2_coiigs_Given ) model->HSM2_coiigs = 0 ; if ( !model->HSM2_cogidl_Given ) model->HSM2_cogidl = 0 ; if ( !model->HSM2_coovlp_Given ) model->HSM2_coovlp = 1 ; if ( !model->HSM2_coflick_Given ) model->HSM2_coflick = 0 ; if ( !model->HSM2_coisti_Given ) model->HSM2_coisti = 0 ; if ( !model->HSM2_conqs_Given ) model->HSM2_conqs = 0 ; /* QS (default) */ if ( !model->HSM2_cothrml_Given ) model->HSM2_cothrml = 0 ; if ( !model->HSM2_coign_Given ) model->HSM2_coign = 0 ; /* induced gate noise */ if ( !model->HSM2_codfm_Given ) model->HSM2_codfm = 0 ; /* DFM */ if ( !model->HSM2_corbnet_Given ) model->HSM2_corbnet = 0 ; else if ( model->HSM2_corbnet != 0 && model->HSM2_corbnet != 1 ) { model->HSM2_corbnet = 0; printf("warning(HiSIM2): CORBNET has been set to its default value: %d.\n", model->HSM2_corbnet); } if ( !model->HSM2_corecip_Given ) model->HSM2_corecip = 1 ; if ( !model->HSM2_coqy_Given ) model->HSM2_coqy = 0 ; if ( !model->HSM2_coqovsm_Given ) model->HSM2_coqovsm = 1 ; if ( !model->HSM2_coerrrep_Given ) model->HSM2_coerrrep = 1 ; if ( !model->HSM2_vmax_Given ) model->HSM2_vmax = 1.0e7 ; if ( !model->HSM2_bgtmp1_Given ) model->HSM2_bgtmp1 = 90.25e-6 ; if ( !model->HSM2_bgtmp2_Given ) model->HSM2_bgtmp2 = 1.0e-7 ; if ( !model->HSM2_eg0_Given ) model->HSM2_eg0 = 1.1785e0 ; if ( !model->HSM2_tox_Given ) model->HSM2_tox = 3.0e-9 ; if ( !model->HSM2_xld_Given ) model->HSM2_xld = 0.0 ; if ( !model->HSM2_lover_Given ) model->HSM2_lover = 30e-9 ; if ( !model->HSM2_ddltmax_Given ) model->HSM2_ddltmax = 10.0 ; /* Vdseff */ if ( !model->HSM2_ddltslp_Given ) model->HSM2_ddltslp = 0.0 ; /* Vdseff */ if ( !model->HSM2_ddltict_Given ) model->HSM2_ddltict = 10.0 ; /* Vdseff */ if ( !model->HSM2_vfbover_Given ) model->HSM2_vfbover = 0.0 ; if ( !model->HSM2_nover_Given ) model->HSM2_nover = 1E19 ; if ( !model->HSM2_xwd_Given ) model->HSM2_xwd = 0.0 ; if ( !model->HSM2_xl_Given ) model->HSM2_xl = 0.0 ; if ( !model->HSM2_xw_Given ) model->HSM2_xw = 0.0 ; if ( !model->HSM2_saref_Given ) model->HSM2_saref = 1e-6 ; if ( !model->HSM2_sbref_Given ) model->HSM2_sbref = 1e-6 ; if ( !model->HSM2_ll_Given ) model->HSM2_ll = 0.0 ; if ( !model->HSM2_lld_Given ) model->HSM2_lld = 0.0 ; if ( !model->HSM2_lln_Given ) model->HSM2_lln = 0.0 ; if ( !model->HSM2_wl_Given ) model->HSM2_wl = 0.0 ; if ( !model->HSM2_wl1_Given ) model->HSM2_wl1 = 0.0 ; if ( !model->HSM2_wl1p_Given ) model->HSM2_wl1p = 1.0 ; if ( !model->HSM2_wl2_Given ) model->HSM2_wl2 = 0.0 ; if ( !model->HSM2_wl2p_Given ) model->HSM2_wl2p = 1.0 ; if ( !model->HSM2_wld_Given ) model->HSM2_wld = 0.0 ; if ( !model->HSM2_wln_Given ) model->HSM2_wln = 0.0 ; if ( !model->HSM2_rsh_Given ) model->HSM2_rsh = 0.0 ; if ( !model->HSM2_rshg_Given ) model->HSM2_rshg = 0.0 ; if ( !model->HSM2_xqy_Given ) model->HSM2_xqy = 10e-9 ; if ( !model->HSM2_xqy1_Given ) model->HSM2_xqy1 = 0.0 ; if ( !model->HSM2_xqy2_Given ) model->HSM2_xqy2 = 2.0 ; if ( !model->HSM2_qyrat_Given ) model->HSM2_qyrat = 0.5 ; if ( !model->HSM2_rs_Given ) model->HSM2_rs = 0.0 ; if ( !model->HSM2_rd_Given ) model->HSM2_rd = 0.0 ; if ( !model->HSM2_vfbc_Given ) model->HSM2_vfbc = -1.0 ; if ( !model->HSM2_vbi_Given ) model->HSM2_vbi = 1.1 ; if ( !model->HSM2_nsubc_Given ) model->HSM2_nsubc = 5.0e17 ; if ( !model->HSM2_vfbcl_Given ) model->HSM2_vfbcl = 0 ; if ( !model->HSM2_vfbclp_Given ) model->HSM2_vfbclp = 1 ; if ( !model->HSM2_parl2_Given ) model->HSM2_parl2 = 10.0e-9 ; if ( !model->HSM2_lp_Given ) model->HSM2_lp = 15.0e-9 ; if ( !model->HSM2_nsubp_Given ) model->HSM2_nsubp = 1.0e18 ; if ( !model->HSM2_nsubpl_Given ) model->HSM2_nsubpl = 0.001 ; /* um */ if ( !model->HSM2_nsubpfac_Given ) model->HSM2_nsubpfac = 1.0 ; if ( !model->HSM2_nsubpdlt_Given ) model->HSM2_nsubpdlt = 0.01 ; if ( !model->HSM2_nsubpw_Given ) model->HSM2_nsubpw = 0.0 ; if ( !model->HSM2_nsubpwp_Given ) model->HSM2_nsubpwp = 1.0 ; if ( !model->HSM2_scp1_Given ) model->HSM2_scp1 = 1.0 ; if ( !model->HSM2_scp2_Given ) model->HSM2_scp2 = 0.0 ; if ( !model->HSM2_scp3_Given ) model->HSM2_scp3 = 0.0 ; if ( !model->HSM2_sc1_Given ) model->HSM2_sc1 = 1.0 ; if ( !model->HSM2_sc2_Given ) model->HSM2_sc2 = 0.0 ; if ( !model->HSM2_sc3_Given ) model->HSM2_sc3 = 0.0 ; if ( !model->HSM2_sc4_Given ) model->HSM2_sc4 = 0.0 ; if ( !model->HSM2_pgd1_Given ) model->HSM2_pgd1 = 0.0 ; if ( !model->HSM2_pgd2_Given ) model->HSM2_pgd2 = 0.3 ; if ( !model->HSM2_pgd4_Given ) model->HSM2_pgd4 = 0.0 ; if ( !model->HSM2_ndep_Given ) model->HSM2_ndep = 1.0 ; if ( !model->HSM2_ndepl_Given ) model->HSM2_ndepl = 0.0 ; if ( !model->HSM2_ndeplp_Given ) model->HSM2_ndeplp = 1.0 ; if ( !model->HSM2_ndepw_Given ) model->HSM2_ndepw = 0.0 ; if ( !model->HSM2_ndepwp_Given ) model->HSM2_ndepwp = 1.0 ; if ( !model->HSM2_ninv_Given ) model->HSM2_ninv = 0.5 ; if ( !model->HSM2_ninvd_Given ) model->HSM2_ninvd = 0.0 ; if ( !model->HSM2_muecb0_Given ) model->HSM2_muecb0 = 1.0e3 ; if ( !model->HSM2_muecb1_Given ) model->HSM2_muecb1 = 100.0 ; if ( !model->HSM2_mueph0_Given ) model->HSM2_mueph0 = 300.0e-3 ; if ( !model->HSM2_mueph1_Given ) { if (model->HSM2_type == NMOS) model->HSM2_mueph1 = 25.0e3 ; else model->HSM2_mueph1 = 9.0e3 ; } if ( !model->HSM2_muephw_Given ) model->HSM2_muephw = 0.0 ; if ( !model->HSM2_muepwp_Given ) model->HSM2_muepwp = 1.0 ; if ( !model->HSM2_muepwd_Given ) model->HSM2_muepwd = 0.0 ; if ( !model->HSM2_muephl_Given ) model->HSM2_muephl = 0.0 ; if ( !model->HSM2_mueplp_Given ) model->HSM2_mueplp = 1.0 ; if ( !model->HSM2_muepld_Given ) model->HSM2_muepld = 0.0 ; if ( !model->HSM2_muephs_Given ) model->HSM2_muephs = 0.0 ; if ( !model->HSM2_muepsp_Given ) model->HSM2_muepsp = 1.0 ; if ( !model->HSM2_vtmp_Given ) model->HSM2_vtmp = 0.0 ; if ( !model->HSM2_wvth0_Given ) model->HSM2_wvth0 = 0.0 ; if ( !model->HSM2_muesr0_Given ) model->HSM2_muesr0 = 2.0 ; if ( !model->HSM2_muesr1_Given ) model->HSM2_muesr1 = 1.0e15 ; if ( !model->HSM2_muesrl_Given ) model->HSM2_muesrl = 0.0 ; if ( !model->HSM2_muesrw_Given ) model->HSM2_muesrw = 0.0 ; if ( !model->HSM2_mueswp_Given ) model->HSM2_mueswp = 1.0 ; if ( !model->HSM2_mueslp_Given ) model->HSM2_mueslp = 1.0 ; if ( !model->HSM2_muetmp_Given ) model->HSM2_muetmp = 1.5 ; if ( !model->HSM2_bb_Given ) { if (model->HSM2_type == NMOS) model->HSM2_bb = 2.0 ; else model->HSM2_bb = 1.0 ; } if ( !model->HSM2_sub1_Given ) model->HSM2_sub1 = 10e0 ; if ( !model->HSM2_sub2_Given ) model->HSM2_sub2 = 25e0 ; if ( !model->HSM2_svgs_Given ) model->HSM2_svgs = 0.8e0 ; if ( !model->HSM2_svbs_Given ) model->HSM2_svbs = 0.5e0 ; if ( !model->HSM2_svbsl_Given ) model->HSM2_svbsl = 0e0 ; if ( !model->HSM2_svds_Given ) model->HSM2_svds = 0.8e0 ; if ( !model->HSM2_slg_Given ) model->HSM2_slg = 30e-9 ; if ( !model->HSM2_sub1l_Given ) model->HSM2_sub1l = 2.5e-3 ; if ( !model->HSM2_sub2l_Given ) model->HSM2_sub2l = 2e-6 ; if ( !model->HSM2_svgsl_Given ) model->HSM2_svgsl = 0.0 ; if ( !model->HSM2_svgslp_Given ) model->HSM2_svgslp = 1.0 ; if ( !model->HSM2_svgswp_Given ) model->HSM2_svgswp = 1.0 ; if ( !model->HSM2_svgsw_Given ) model->HSM2_svgsw = 0.0 ; if ( !model->HSM2_svbslp_Given ) model->HSM2_svbslp = 1.0 ; if ( !model->HSM2_slgl_Given ) model->HSM2_slgl = 0.0 ; if ( !model->HSM2_slglp_Given ) model->HSM2_slglp = 1.0 ; if ( !model->HSM2_sub1lp_Given ) model->HSM2_sub1lp = 1.0 ; if ( !model->HSM2_nsti_Given ) model->HSM2_nsti = 5.0e17 ; if ( !model->HSM2_wsti_Given ) model->HSM2_wsti = 0.0 ; if ( !model->HSM2_wstil_Given ) model->HSM2_wstil = 0.0 ; if ( !model->HSM2_wstilp_Given ) model->HSM2_wstilp = 1.0 ; if ( !model->HSM2_wstiw_Given ) model->HSM2_wstiw = 0.0 ; if ( !model->HSM2_wstiwp_Given ) model->HSM2_wstiwp = 1.0 ; if ( !model->HSM2_scsti1_Given ) model->HSM2_scsti1 = 0.0 ; if ( !model->HSM2_scsti2_Given ) model->HSM2_scsti2 = 0.0 ; if ( !model->HSM2_vthsti_Given ) model->HSM2_vthsti = 0.0 ; if ( !model->HSM2_vdsti_Given ) model->HSM2_vdsti = 0.0 ; if ( !model->HSM2_muesti1_Given ) model->HSM2_muesti1 = 0.0 ; if ( !model->HSM2_muesti2_Given ) model->HSM2_muesti2 = 0.0 ; if ( !model->HSM2_muesti3_Given ) model->HSM2_muesti3 = 1.0 ; if ( !model->HSM2_nsubpsti1_Given ) model->HSM2_nsubpsti1 = 0.0 ; if ( !model->HSM2_nsubpsti2_Given ) model->HSM2_nsubpsti2 = 0.0 ; if ( !model->HSM2_nsubpsti3_Given ) model->HSM2_nsubpsti3 = 1.0 ; if ( !model->HSM2_nsubcsti1_Given ) model->HSM2_nsubcsti1 = 0.0 ; if ( !model->HSM2_nsubcsti2_Given ) model->HSM2_nsubcsti2 = 0.0 ; if ( !model->HSM2_nsubcsti3_Given ) model->HSM2_nsubcsti3 = 1.0 ; if ( !model->HSM2_lpext_Given ) model->HSM2_lpext = 1.0e-50 ; if ( !model->HSM2_npext_Given ) model->HSM2_npext = 5.0e17 ; if ( !model->HSM2_npextw_Given ) model->HSM2_npextw = 0.0 ; if ( !model->HSM2_npextwp_Given ) model->HSM2_npextwp = 1.0 ; if ( !model->HSM2_scp21_Given ) model->HSM2_scp21 = 0.0 ; if ( !model->HSM2_scp22_Given ) model->HSM2_scp22 = 0.0 ; if ( !model->HSM2_bs1_Given ) model->HSM2_bs1 = 0.0 ; if ( !model->HSM2_bs2_Given ) model->HSM2_bs2 = 0.9 ; if ( !model->HSM2_tpoly_Given ) model->HSM2_tpoly = 200e-9 ; if ( !model->HSM2_cgbo_Given ) model->HSM2_cgbo = 0.0 ; if ( !model->HSM2_js0_Given ) model->HSM2_js0 = 0.5e-6 ; if ( !model->HSM2_js0sw_Given ) model->HSM2_js0sw = 0.0 ; if ( !model->HSM2_nj_Given ) model->HSM2_nj = 1.0 ; if ( !model->HSM2_njsw_Given ) model->HSM2_njsw = 1.0 ; if ( !model->HSM2_xti_Given ) model->HSM2_xti = 2.0 ; if ( !model->HSM2_cj_Given ) model->HSM2_cj = 5.0e-04 ; if ( !model->HSM2_cjsw_Given ) model->HSM2_cjsw = 5.0e-10 ; if ( !model->HSM2_cjswg_Given ) model->HSM2_cjswg = 5.0e-10 ; if ( !model->HSM2_mj_Given ) model->HSM2_mj = 0.5e0 ; if ( !model->HSM2_mjsw_Given ) model->HSM2_mjsw = 0.33e0 ; if ( !model->HSM2_mjswg_Given ) model->HSM2_mjswg = 0.33e0 ; if ( !model->HSM2_pb_Given ) model->HSM2_pb = 1.0e0 ; if ( !model->HSM2_pbsw_Given ) model->HSM2_pbsw = 1.0e0 ; if ( !model->HSM2_pbswg_Given ) model->HSM2_pbswg = 1.0e0 ; if ( !model->HSM2_tcjbd_Given ) model->HSM2_tcjbd = 0.0 ; if ( !model->HSM2_tcjbs_Given ) model->HSM2_tcjbs = 0.0 ; if ( !model->HSM2_tcjbdsw_Given ) model->HSM2_tcjbdsw = 0.0 ; if ( !model->HSM2_tcjbssw_Given ) model->HSM2_tcjbssw = 0.0 ; if ( !model->HSM2_tcjbdswg_Given ) model->HSM2_tcjbdswg = 0.0 ; if ( !model->HSM2_tcjbsswg_Given ) model->HSM2_tcjbsswg = 0.0 ; if ( !model->HSM2_xti2_Given ) model->HSM2_xti2 = 0.0e0 ; if ( !model->HSM2_cisb_Given ) model->HSM2_cisb = 0.0e0 ; if ( !model->HSM2_cvb_Given ) model->HSM2_cvb = 0.0e0 ; if ( !model->HSM2_ctemp_Given ) model->HSM2_ctemp = 0.0e0 ; if ( !model->HSM2_cisbk_Given ) model->HSM2_cisbk = 0.0e0 ; if ( !model->HSM2_cvbk_Given ) model->HSM2_cvbk = 0.0e0 ; if ( !model->HSM2_divx_Given ) model->HSM2_divx = 0.0e0 ; if ( !model->HSM2_clm1_Given ) model->HSM2_clm1 = 700.0e-3 ; if ( !model->HSM2_clm2_Given ) model->HSM2_clm2 = 2.0 ; if ( !model->HSM2_clm3_Given ) model->HSM2_clm3 = 1.0 ; if ( !model->HSM2_clm5_Given ) model->HSM2_clm5 = 1.0 ; if ( !model->HSM2_clm6_Given ) model->HSM2_clm6 = 0.0 ; if ( !model->HSM2_vover_Given ) model->HSM2_vover = 0.3 ; if ( !model->HSM2_voverp_Given ) model->HSM2_voverp = 0.3 ; if ( !model->HSM2_wfc_Given ) model->HSM2_wfc = 0.0 ; if ( !model->HSM2_nsubcw_Given ) model->HSM2_nsubcw = 0.0 ; if ( !model->HSM2_nsubcwp_Given ) model->HSM2_nsubcwp = 1.0 ; if ( !model->HSM2_nsubcmax_Given ) model->HSM2_nsubcmax = 5e18 ; if ( !model->HSM2_qme1_Given ) model->HSM2_qme1 = 0.0 ; if ( !model->HSM2_qme2_Given ) model->HSM2_qme2 = 0.0 ; if ( !model->HSM2_qme3_Given ) model->HSM2_qme3 = 0.0 ; if ( !model->HSM2_vovers_Given ) model->HSM2_vovers = 0.0 ; if ( !model->HSM2_voversp_Given ) model->HSM2_voversp = 0.0 ; if ( !model->HSM2_gidl1_Given ) model->HSM2_gidl1 = 2e0 ; if ( !model->HSM2_gidl2_Given ) model->HSM2_gidl2 = 3e7 ; if ( !model->HSM2_gidl3_Given ) model->HSM2_gidl3 = 0.9e0 ; if ( !model->HSM2_gidl4_Given ) model->HSM2_gidl4 = 0.0 ; if ( !model->HSM2_gidl5_Given ) model->HSM2_gidl5 = 0.2e0 ; if ( !model->HSM2_gidl6_Given ) model->HSM2_gidl6 = 0 ; if ( !model->HSM2_gidl7_Given ) model->HSM2_gidl7 = 1 ; if ( !model->HSM2_gleak1_Given ) model->HSM2_gleak1 = 50e0 ; if ( !model->HSM2_gleak2_Given ) model->HSM2_gleak2 = 10e6 ; if ( !model->HSM2_gleak3_Given ) model->HSM2_gleak3 = 60e-3 ; if ( !model->HSM2_gleak4_Given ) model->HSM2_gleak4 = 4e0 ; if ( !model->HSM2_gleak5_Given ) model->HSM2_gleak5 = 7.5e3 ; if ( !model->HSM2_gleak6_Given ) model->HSM2_gleak6 = 250e-3 ; if ( !model->HSM2_gleak7_Given ) model->HSM2_gleak7 = 1e-6 ; if ( !model->HSM2_glksd1_Given ) model->HSM2_glksd1 = 1.0e-15 ; if ( !model->HSM2_glksd2_Given ) model->HSM2_glksd2 = 5e6 ; if ( !model->HSM2_glksd3_Given ) model->HSM2_glksd3 = -5e6 ; if ( !model->HSM2_glkb1_Given ) model->HSM2_glkb1 = 5e-16 ; if ( !model->HSM2_glkb2_Given ) model->HSM2_glkb2 = 1e0 ; if ( !model->HSM2_glkb3_Given ) model->HSM2_glkb3 = 0e0 ; if ( !model->HSM2_egig_Given ) model->HSM2_egig = 0e0 ; if ( !model->HSM2_igtemp2_Given ) model->HSM2_igtemp2 = 0e0 ; if ( !model->HSM2_igtemp3_Given ) model->HSM2_igtemp3 = 0e0 ; if ( !model->HSM2_vzadd0_Given ) model->HSM2_vzadd0 = 20.0e-3 ; if ( !model->HSM2_pzadd0_Given ) model->HSM2_pzadd0 = 20.0e-3 ; if ( !model->HSM2_nftrp_Given ) model->HSM2_nftrp = 10e9 ; if ( !model->HSM2_nfalp_Given ) model->HSM2_nfalp = 1.0e-19 ; if ( !model->HSM2_falph_Given ) model->HSM2_falph = 1.0 ; if ( !model->HSM2_cit_Given ) model->HSM2_cit = 0e0 ; if ( !model->HSM2_kappa_Given ) model->HSM2_kappa = 3.90e0 ; if ( !model->HSM2_cgso_Given ) model->HSM2_cgso = 0.0 ; if ( !model->HSM2_cgdo_Given ) model->HSM2_cgdo = 0.0 ; if ( !model->HSM2_vdiffj_Given ) model->HSM2_vdiffj = 0.6e-3 ; if ( !model->HSM2_dly1_Given ) model->HSM2_dly1 = 100.0e-12 ; if ( !model->HSM2_dly2_Given ) model->HSM2_dly2 = 0.7e0 ; if ( !model->HSM2_dly3_Given ) model->HSM2_dly3 = 0.8e-6 ; if ( !model->HSM2_tnom_Given ) model->HSM2_tnom = 27.0 ; /* [C] */ if ( !model->HSM2_ovslp_Given ) model->HSM2_ovslp = 2.1e-7 ; if ( !model->HSM2_ovmag_Given ) model->HSM2_ovmag = 0.6e0 ; if ( !model->HSM2_gbmin_Given ) model->HSM2_gbmin = 1.0e-12; /* in mho */ if ( !model->HSM2_rbpb_Given ) model->HSM2_rbpb = 50.0e0 ; if ( !model->HSM2_rbpd_Given ) model->HSM2_rbpd = 50.0e0 ; if ( !model->HSM2_rbps_Given ) model->HSM2_rbps = 50.0e0 ; if ( !model->HSM2_rbdb_Given ) model->HSM2_rbdb = 50.0e0 ; if ( !model->HSM2_rbsb_Given ) model->HSM2_rbsb = 50.0e0 ; if ( !model->HSM2_ibpc1_Given ) model->HSM2_ibpc1 = 0.0 ; if ( !model->HSM2_ibpc2_Given ) model->HSM2_ibpc2 = 0.0 ; if ( !model->HSM2_mphdfm_Given ) model->HSM2_mphdfm = -0.3 ; if ( !model->HSM2_ptl_Given ) model->HSM2_ptl = 0.0 ; if ( !model->HSM2_ptp_Given ) model->HSM2_ptp = 3.5 ; if ( !model->HSM2_pt2_Given ) model->HSM2_pt2 = 0.0 ; if ( !model->HSM2_ptlp_Given ) model->HSM2_ptlp = 1.0 ; if ( !model->HSM2_gdl_Given ) model->HSM2_gdl = 0.0 ; if ( !model->HSM2_gdlp_Given ) model->HSM2_gdlp = 0.0 ; if ( !model->HSM2_gdld_Given ) model->HSM2_gdld = 0.0 ; if ( !model->HSM2_pt4_Given ) model->HSM2_pt4 = 0.0 ; if ( !model->HSM2_pt4p_Given ) model->HSM2_pt4p = 1.0 ; if ( !model->HSM2_muephl2_Given ) model->HSM2_muephl2 = 0.0 ; if ( !model->HSM2_mueplp2_Given ) model->HSM2_mueplp2 = 1.0 ; if ( !model->HSM2_nsubcw2_Given ) model->HSM2_nsubcw2 = 0.0 ; if ( !model->HSM2_nsubcwp2_Given ) model->HSM2_nsubcwp2 = 1.0 ; if ( !model->HSM2_muephw2_Given ) model->HSM2_muephw2 = 0.0 ; if ( !model->HSM2_muepwp2_Given ) model->HSM2_muepwp2 = 1.0 ; /* WPE set default Model parameter value */ if ( !model->HSM2_web_Given ) model->HSM2_web = 0.0 ; if ( !model->HSM2_wec_Given ) model->HSM2_wec = 0.0 ; if ( !model->HSM2_nsubcwpe_Given ) model->HSM2_nsubcwpe = 0.0 ; if ( !model->HSM2_npextwpe_Given ) model->HSM2_npextwpe = 0.0 ; if ( !model->HSM2_nsubpwpe_Given ) model->HSM2_nsubpwpe = 0.0 ; if ( !model->HSM2_Vgsmin_Given ) model->HSM2_Vgsmin = -5.0 * model->HSM2_type ; if ( !model->HSM2_sc3Vbs_Given ) model->HSM2_sc3Vbs = 0.0 ; if ( !model->HSM2_byptol_Given ) model->HSM2_byptol = 0.0 ; if ( !model->HSM2_muecb0lp_Given ) model->HSM2_muecb0lp = 0.0; if ( !model->HSM2_muecb1lp_Given ) model->HSM2_muecb1lp = 0.0; /* binning parameters */ if ( !model->HSM2_lmin_Given ) model->HSM2_lmin = 0.0 ; if ( !model->HSM2_lmax_Given ) model->HSM2_lmax = 1.0 ; if ( !model->HSM2_wmin_Given ) model->HSM2_wmin = 0.0 ; if ( !model->HSM2_wmax_Given ) model->HSM2_wmax = 1.0 ; if ( !model->HSM2_lbinn_Given ) model->HSM2_lbinn = 1.0 ; if ( !model->HSM2_wbinn_Given ) model->HSM2_wbinn = 1.0 ; /* Length dependence */ if ( !model->HSM2_lvmax_Given ) model->HSM2_lvmax = 0.0 ; if ( !model->HSM2_lbgtmp1_Given ) model->HSM2_lbgtmp1 = 0.0 ; if ( !model->HSM2_lbgtmp2_Given ) model->HSM2_lbgtmp2 = 0.0 ; if ( !model->HSM2_leg0_Given ) model->HSM2_leg0 = 0.0 ; if ( !model->HSM2_llover_Given ) model->HSM2_llover = 0.0 ; if ( !model->HSM2_lvfbover_Given ) model->HSM2_lvfbover = 0.0 ; if ( !model->HSM2_lnover_Given ) model->HSM2_lnover = 0.0 ; if ( !model->HSM2_lwl2_Given ) model->HSM2_lwl2 = 0.0 ; if ( !model->HSM2_lvfbc_Given ) model->HSM2_lvfbc = 0.0 ; if ( !model->HSM2_lnsubc_Given ) model->HSM2_lnsubc = 0.0 ; if ( !model->HSM2_lnsubp_Given ) model->HSM2_lnsubp = 0.0 ; if ( !model->HSM2_lscp1_Given ) model->HSM2_lscp1 = 0.0 ; if ( !model->HSM2_lscp2_Given ) model->HSM2_lscp2 = 0.0 ; if ( !model->HSM2_lscp3_Given ) model->HSM2_lscp3 = 0.0 ; if ( !model->HSM2_lsc1_Given ) model->HSM2_lsc1 = 0.0 ; if ( !model->HSM2_lsc2_Given ) model->HSM2_lsc2 = 0.0 ; if ( !model->HSM2_lsc3_Given ) model->HSM2_lsc3 = 0.0 ; if ( !model->HSM2_lsc4_Given ) model->HSM2_lsc4 = 0.0 ; if ( !model->HSM2_lpgd1_Given ) model->HSM2_lpgd1 = 0.0 ; if ( !model->HSM2_lndep_Given ) model->HSM2_lndep = 0.0 ; if ( !model->HSM2_lninv_Given ) model->HSM2_lninv = 0.0 ; if ( !model->HSM2_lmuecb0_Given ) model->HSM2_lmuecb0 = 0.0 ; if ( !model->HSM2_lmuecb1_Given ) model->HSM2_lmuecb1 = 0.0 ; if ( !model->HSM2_lmueph1_Given ) model->HSM2_lmueph1 = 0.0 ; if ( !model->HSM2_lvtmp_Given ) model->HSM2_lvtmp = 0.0 ; if ( !model->HSM2_lwvth0_Given ) model->HSM2_lwvth0 = 0.0 ; if ( !model->HSM2_lmuesr1_Given ) model->HSM2_lmuesr1 = 0.0 ; if ( !model->HSM2_lmuetmp_Given ) model->HSM2_lmuetmp = 0.0 ; if ( !model->HSM2_lsub1_Given ) model->HSM2_lsub1 = 0.0 ; if ( !model->HSM2_lsub2_Given ) model->HSM2_lsub2 = 0.0 ; if ( !model->HSM2_lsvds_Given ) model->HSM2_lsvds = 0.0 ; if ( !model->HSM2_lsvbs_Given ) model->HSM2_lsvbs = 0.0 ; if ( !model->HSM2_lsvgs_Given ) model->HSM2_lsvgs = 0.0 ; if ( !model->HSM2_lnsti_Given ) model->HSM2_lnsti = 0.0 ; if ( !model->HSM2_lwsti_Given ) model->HSM2_lwsti = 0.0 ; if ( !model->HSM2_lscsti1_Given ) model->HSM2_lscsti1 = 0.0 ; if ( !model->HSM2_lscsti2_Given ) model->HSM2_lscsti2 = 0.0 ; if ( !model->HSM2_lvthsti_Given ) model->HSM2_lvthsti = 0.0 ; if ( !model->HSM2_lmuesti1_Given ) model->HSM2_lmuesti1 = 0.0 ; if ( !model->HSM2_lmuesti2_Given ) model->HSM2_lmuesti2 = 0.0 ; if ( !model->HSM2_lmuesti3_Given ) model->HSM2_lmuesti3 = 0.0 ; if ( !model->HSM2_lnsubpsti1_Given ) model->HSM2_lnsubpsti1 = 0.0 ; if ( !model->HSM2_lnsubpsti2_Given ) model->HSM2_lnsubpsti2 = 0.0 ; if ( !model->HSM2_lnsubpsti3_Given ) model->HSM2_lnsubpsti3 = 0.0 ; if ( !model->HSM2_lnsubcsti1_Given ) model->HSM2_lnsubcsti1 = 0.0 ; if ( !model->HSM2_lnsubcsti2_Given ) model->HSM2_lnsubcsti2 = 0.0 ; if ( !model->HSM2_lnsubcsti3_Given ) model->HSM2_lnsubcsti3 = 0.0 ; if ( !model->HSM2_lcgso_Given ) model->HSM2_lcgso = 0.0 ; if ( !model->HSM2_lcgdo_Given ) model->HSM2_lcgdo = 0.0 ; if ( !model->HSM2_ljs0_Given ) model->HSM2_ljs0 = 0.0 ; if ( !model->HSM2_ljs0sw_Given ) model->HSM2_ljs0sw = 0.0 ; if ( !model->HSM2_lnj_Given ) model->HSM2_lnj = 0.0 ; if ( !model->HSM2_lcisbk_Given ) model->HSM2_lcisbk = 0.0 ; if ( !model->HSM2_lclm1_Given ) model->HSM2_lclm1 = 0.0 ; if ( !model->HSM2_lclm2_Given ) model->HSM2_lclm2 = 0.0 ; if ( !model->HSM2_lclm3_Given ) model->HSM2_lclm3 = 0.0 ; if ( !model->HSM2_lwfc_Given ) model->HSM2_lwfc = 0.0 ; if ( !model->HSM2_lgidl1_Given ) model->HSM2_lgidl1 = 0.0 ; if ( !model->HSM2_lgidl2_Given ) model->HSM2_lgidl2 = 0.0 ; if ( !model->HSM2_lgleak1_Given ) model->HSM2_lgleak1 = 0.0 ; if ( !model->HSM2_lgleak2_Given ) model->HSM2_lgleak2 = 0.0 ; if ( !model->HSM2_lgleak3_Given ) model->HSM2_lgleak3 = 0.0 ; if ( !model->HSM2_lgleak6_Given ) model->HSM2_lgleak6 = 0.0 ; if ( !model->HSM2_lglksd1_Given ) model->HSM2_lglksd1 = 0.0 ; if ( !model->HSM2_lglksd2_Given ) model->HSM2_lglksd2 = 0.0 ; if ( !model->HSM2_lglkb1_Given ) model->HSM2_lglkb1 = 0.0 ; if ( !model->HSM2_lglkb2_Given ) model->HSM2_lglkb2 = 0.0 ; if ( !model->HSM2_lnftrp_Given ) model->HSM2_lnftrp = 0.0 ; if ( !model->HSM2_lnfalp_Given ) model->HSM2_lnfalp = 0.0 ; if ( !model->HSM2_lvdiffj_Given ) model->HSM2_lvdiffj = 0.0 ; if ( !model->HSM2_libpc1_Given ) model->HSM2_libpc1 = 0.0 ; if ( !model->HSM2_libpc2_Given ) model->HSM2_libpc2 = 0.0 ; /* Width dependence */ if ( !model->HSM2_wvmax_Given ) model->HSM2_wvmax = 0.0 ; if ( !model->HSM2_wbgtmp1_Given ) model->HSM2_wbgtmp1 = 0.0 ; if ( !model->HSM2_wbgtmp2_Given ) model->HSM2_wbgtmp2 = 0.0 ; if ( !model->HSM2_weg0_Given ) model->HSM2_weg0 = 0.0 ; if ( !model->HSM2_wlover_Given ) model->HSM2_wlover = 0.0 ; if ( !model->HSM2_wvfbover_Given ) model->HSM2_wvfbover = 0.0 ; if ( !model->HSM2_wnover_Given ) model->HSM2_wnover = 0.0 ; if ( !model->HSM2_wwl2_Given ) model->HSM2_wwl2 = 0.0 ; if ( !model->HSM2_wvfbc_Given ) model->HSM2_wvfbc = 0.0 ; if ( !model->HSM2_wnsubc_Given ) model->HSM2_wnsubc = 0.0 ; if ( !model->HSM2_wnsubp_Given ) model->HSM2_wnsubp = 0.0 ; if ( !model->HSM2_wscp1_Given ) model->HSM2_wscp1 = 0.0 ; if ( !model->HSM2_wscp2_Given ) model->HSM2_wscp2 = 0.0 ; if ( !model->HSM2_wscp3_Given ) model->HSM2_wscp3 = 0.0 ; if ( !model->HSM2_wsc1_Given ) model->HSM2_wsc1 = 0.0 ; if ( !model->HSM2_wsc2_Given ) model->HSM2_wsc2 = 0.0 ; if ( !model->HSM2_wsc3_Given ) model->HSM2_wsc3 = 0.0 ; if ( !model->HSM2_wsc4_Given ) model->HSM2_wsc4 = 0.0 ; if ( !model->HSM2_wpgd1_Given ) model->HSM2_wpgd1 = 0.0 ; if ( !model->HSM2_wndep_Given ) model->HSM2_wndep = 0.0 ; if ( !model->HSM2_wninv_Given ) model->HSM2_wninv = 0.0 ; if ( !model->HSM2_wmuecb0_Given ) model->HSM2_wmuecb0 = 0.0 ; if ( !model->HSM2_wmuecb1_Given ) model->HSM2_wmuecb1 = 0.0 ; if ( !model->HSM2_wmueph1_Given ) model->HSM2_wmueph1 = 0.0 ; if ( !model->HSM2_wvtmp_Given ) model->HSM2_wvtmp = 0.0 ; if ( !model->HSM2_wwvth0_Given ) model->HSM2_wwvth0 = 0.0 ; if ( !model->HSM2_wmuesr1_Given ) model->HSM2_wmuesr1 = 0.0 ; if ( !model->HSM2_wmuetmp_Given ) model->HSM2_wmuetmp = 0.0 ; if ( !model->HSM2_wsub1_Given ) model->HSM2_wsub1 = 0.0 ; if ( !model->HSM2_wsub2_Given ) model->HSM2_wsub2 = 0.0 ; if ( !model->HSM2_wsvds_Given ) model->HSM2_wsvds = 0.0 ; if ( !model->HSM2_wsvbs_Given ) model->HSM2_wsvbs = 0.0 ; if ( !model->HSM2_wsvgs_Given ) model->HSM2_wsvgs = 0.0 ; if ( !model->HSM2_wnsti_Given ) model->HSM2_wnsti = 0.0 ; if ( !model->HSM2_wwsti_Given ) model->HSM2_wwsti = 0.0 ; if ( !model->HSM2_wscsti1_Given ) model->HSM2_wscsti1 = 0.0 ; if ( !model->HSM2_wscsti2_Given ) model->HSM2_wscsti2 = 0.0 ; if ( !model->HSM2_wvthsti_Given ) model->HSM2_wvthsti = 0.0 ; if ( !model->HSM2_wmuesti1_Given ) model->HSM2_wmuesti1 = 0.0 ; if ( !model->HSM2_wmuesti2_Given ) model->HSM2_wmuesti2 = 0.0 ; if ( !model->HSM2_wmuesti3_Given ) model->HSM2_wmuesti3 = 0.0 ; if ( !model->HSM2_wnsubpsti1_Given ) model->HSM2_wnsubpsti1 = 0.0 ; if ( !model->HSM2_wnsubpsti2_Given ) model->HSM2_wnsubpsti2 = 0.0 ; if ( !model->HSM2_wnsubpsti3_Given ) model->HSM2_wnsubpsti3 = 0.0 ; if ( !model->HSM2_wnsubcsti1_Given ) model->HSM2_wnsubcsti1 = 0.0 ; if ( !model->HSM2_wnsubcsti2_Given ) model->HSM2_wnsubcsti2 = 0.0 ; if ( !model->HSM2_wnsubcsti3_Given ) model->HSM2_wnsubcsti3 = 0.0 ; if ( !model->HSM2_wcgso_Given ) model->HSM2_wcgso = 0.0 ; if ( !model->HSM2_wcgdo_Given ) model->HSM2_wcgdo = 0.0 ; if ( !model->HSM2_wjs0_Given ) model->HSM2_wjs0 = 0.0 ; if ( !model->HSM2_wjs0sw_Given ) model->HSM2_wjs0sw = 0.0 ; if ( !model->HSM2_wnj_Given ) model->HSM2_wnj = 0.0 ; if ( !model->HSM2_wcisbk_Given ) model->HSM2_wcisbk = 0.0 ; if ( !model->HSM2_wclm1_Given ) model->HSM2_wclm1 = 0.0 ; if ( !model->HSM2_wclm2_Given ) model->HSM2_wclm2 = 0.0 ; if ( !model->HSM2_wclm3_Given ) model->HSM2_wclm3 = 0.0 ; if ( !model->HSM2_wwfc_Given ) model->HSM2_wwfc = 0.0 ; if ( !model->HSM2_wgidl1_Given ) model->HSM2_wgidl1 = 0.0 ; if ( !model->HSM2_wgidl2_Given ) model->HSM2_wgidl2 = 0.0 ; if ( !model->HSM2_wgleak1_Given ) model->HSM2_wgleak1 = 0.0 ; if ( !model->HSM2_wgleak2_Given ) model->HSM2_wgleak2 = 0.0 ; if ( !model->HSM2_wgleak3_Given ) model->HSM2_wgleak3 = 0.0 ; if ( !model->HSM2_wgleak6_Given ) model->HSM2_wgleak6 = 0.0 ; if ( !model->HSM2_wglksd1_Given ) model->HSM2_wglksd1 = 0.0 ; if ( !model->HSM2_wglksd2_Given ) model->HSM2_wglksd2 = 0.0 ; if ( !model->HSM2_wglkb1_Given ) model->HSM2_wglkb1 = 0.0 ; if ( !model->HSM2_wglkb2_Given ) model->HSM2_wglkb2 = 0.0 ; if ( !model->HSM2_wnftrp_Given ) model->HSM2_wnftrp = 0.0 ; if ( !model->HSM2_wnfalp_Given ) model->HSM2_wnfalp = 0.0 ; if ( !model->HSM2_wvdiffj_Given ) model->HSM2_wvdiffj = 0.0 ; if ( !model->HSM2_wibpc1_Given ) model->HSM2_wibpc1 = 0.0 ; if ( !model->HSM2_wibpc2_Given ) model->HSM2_wibpc2 = 0.0 ; /* Cross-term dependence */ if ( !model->HSM2_pvmax_Given ) model->HSM2_pvmax = 0.0 ; if ( !model->HSM2_pbgtmp1_Given ) model->HSM2_pbgtmp1 = 0.0 ; if ( !model->HSM2_pbgtmp2_Given ) model->HSM2_pbgtmp2 = 0.0 ; if ( !model->HSM2_peg0_Given ) model->HSM2_peg0 = 0.0 ; if ( !model->HSM2_plover_Given ) model->HSM2_plover = 0.0 ; if ( !model->HSM2_pvfbover_Given ) model->HSM2_pvfbover = 0.0 ; if ( !model->HSM2_pnover_Given ) model->HSM2_pnover = 0.0 ; if ( !model->HSM2_pwl2_Given ) model->HSM2_pwl2 = 0.0 ; if ( !model->HSM2_pvfbc_Given ) model->HSM2_pvfbc = 0.0 ; if ( !model->HSM2_pnsubc_Given ) model->HSM2_pnsubc = 0.0 ; if ( !model->HSM2_pnsubp_Given ) model->HSM2_pnsubp = 0.0 ; if ( !model->HSM2_pscp1_Given ) model->HSM2_pscp1 = 0.0 ; if ( !model->HSM2_pscp2_Given ) model->HSM2_pscp2 = 0.0 ; if ( !model->HSM2_pscp3_Given ) model->HSM2_pscp3 = 0.0 ; if ( !model->HSM2_psc1_Given ) model->HSM2_psc1 = 0.0 ; if ( !model->HSM2_psc2_Given ) model->HSM2_psc2 = 0.0 ; if ( !model->HSM2_psc3_Given ) model->HSM2_psc3 = 0.0 ; if ( !model->HSM2_psc4_Given ) model->HSM2_psc4 = 0.0 ; if ( !model->HSM2_ppgd1_Given ) model->HSM2_ppgd1 = 0.0 ; if ( !model->HSM2_pndep_Given ) model->HSM2_pndep = 0.0 ; if ( !model->HSM2_pninv_Given ) model->HSM2_pninv = 0.0 ; if ( !model->HSM2_pmuecb0_Given ) model->HSM2_pmuecb0 = 0.0 ; if ( !model->HSM2_pmuecb1_Given ) model->HSM2_pmuecb1 = 0.0 ; if ( !model->HSM2_pmueph1_Given ) model->HSM2_pmueph1 = 0.0 ; if ( !model->HSM2_pvtmp_Given ) model->HSM2_pvtmp = 0.0 ; if ( !model->HSM2_pwvth0_Given ) model->HSM2_pwvth0 = 0.0 ; if ( !model->HSM2_pmuesr1_Given ) model->HSM2_pmuesr1 = 0.0 ; if ( !model->HSM2_pmuetmp_Given ) model->HSM2_pmuetmp = 0.0 ; if ( !model->HSM2_psub1_Given ) model->HSM2_psub1 = 0.0 ; if ( !model->HSM2_psub2_Given ) model->HSM2_psub2 = 0.0 ; if ( !model->HSM2_psvds_Given ) model->HSM2_psvds = 0.0 ; if ( !model->HSM2_psvbs_Given ) model->HSM2_psvbs = 0.0 ; if ( !model->HSM2_psvgs_Given ) model->HSM2_psvgs = 0.0 ; if ( !model->HSM2_pnsti_Given ) model->HSM2_pnsti = 0.0 ; if ( !model->HSM2_pwsti_Given ) model->HSM2_pwsti = 0.0 ; if ( !model->HSM2_pscsti1_Given ) model->HSM2_pscsti1 = 0.0 ; if ( !model->HSM2_pscsti2_Given ) model->HSM2_pscsti2 = 0.0 ; if ( !model->HSM2_pvthsti_Given ) model->HSM2_pvthsti = 0.0 ; if ( !model->HSM2_pmuesti1_Given ) model->HSM2_pmuesti1 = 0.0 ; if ( !model->HSM2_pmuesti2_Given ) model->HSM2_pmuesti2 = 0.0 ; if ( !model->HSM2_pmuesti3_Given ) model->HSM2_pmuesti3 = 0.0 ; if ( !model->HSM2_pnsubpsti1_Given ) model->HSM2_pnsubpsti1 = 0.0 ; if ( !model->HSM2_pnsubpsti2_Given ) model->HSM2_pnsubpsti2 = 0.0 ; if ( !model->HSM2_pnsubpsti3_Given ) model->HSM2_pnsubpsti3 = 0.0 ; if ( !model->HSM2_pnsubcsti1_Given ) model->HSM2_pnsubcsti1 = 0.0 ; if ( !model->HSM2_pnsubcsti2_Given ) model->HSM2_pnsubcsti2 = 0.0 ; if ( !model->HSM2_pnsubcsti3_Given ) model->HSM2_pnsubcsti3 = 0.0 ; if ( !model->HSM2_pcgso_Given ) model->HSM2_pcgso = 0.0 ; if ( !model->HSM2_pcgdo_Given ) model->HSM2_pcgdo = 0.0 ; if ( !model->HSM2_pjs0_Given ) model->HSM2_pjs0 = 0.0 ; if ( !model->HSM2_pjs0sw_Given ) model->HSM2_pjs0sw = 0.0 ; if ( !model->HSM2_pnj_Given ) model->HSM2_pnj = 0.0 ; if ( !model->HSM2_pcisbk_Given ) model->HSM2_pcisbk = 0.0 ; if ( !model->HSM2_pclm1_Given ) model->HSM2_pclm1 = 0.0 ; if ( !model->HSM2_pclm2_Given ) model->HSM2_pclm2 = 0.0 ; if ( !model->HSM2_pclm3_Given ) model->HSM2_pclm3 = 0.0 ; if ( !model->HSM2_pwfc_Given ) model->HSM2_pwfc = 0.0 ; if ( !model->HSM2_pgidl1_Given ) model->HSM2_pgidl1 = 0.0 ; if ( !model->HSM2_pgidl2_Given ) model->HSM2_pgidl2 = 0.0 ; if ( !model->HSM2_pgleak1_Given ) model->HSM2_pgleak1 = 0.0 ; if ( !model->HSM2_pgleak2_Given ) model->HSM2_pgleak2 = 0.0 ; if ( !model->HSM2_pgleak3_Given ) model->HSM2_pgleak3 = 0.0 ; if ( !model->HSM2_pgleak6_Given ) model->HSM2_pgleak6 = 0.0 ; if ( !model->HSM2_pglksd1_Given ) model->HSM2_pglksd1 = 0.0 ; if ( !model->HSM2_pglksd2_Given ) model->HSM2_pglksd2 = 0.0 ; if ( !model->HSM2_pglkb1_Given ) model->HSM2_pglkb1 = 0.0 ; if ( !model->HSM2_pglkb2_Given ) model->HSM2_pglkb2 = 0.0 ; if ( !model->HSM2_pnftrp_Given ) model->HSM2_pnftrp = 0.0 ; if ( !model->HSM2_pnfalp_Given ) model->HSM2_pnfalp = 0.0 ; if ( !model->HSM2_pvdiffj_Given ) model->HSM2_pvdiffj = 0.0 ; if ( !model->HSM2_pibpc1_Given ) model->HSM2_pibpc1 = 0.0 ; if ( !model->HSM2_pibpc2_Given ) model->HSM2_pibpc2 = 0.0 ; if (!model->HSM2vgsMaxGiven) model->HSM2vgsMax = 1e99; if (!model->HSM2vgdMaxGiven) model->HSM2vgdMax = 1e99; if (!model->HSM2vgbMaxGiven) model->HSM2vgbMax = 1e99; if (!model->HSM2vdsMaxGiven) model->HSM2vdsMax = 1e99; if (!model->HSM2vbsMaxGiven) model->HSM2vbsMax = 1e99; if (!model->HSM2vbdMaxGiven) model->HSM2vbdMax = 1e99; if ( model->HSM2_corecip == 1 ){ model->HSM2_sc2 = 0.0 ; model->HSM2_lsc2 = 0.0 ; model->HSM2_wsc2 = 0.0 ; model->HSM2_psc2 = 0.0 ; model->HSM2_scp2 = 0.0 ; model->HSM2_lscp2 = 0.0 ; model->HSM2_wscp2 = 0.0 ; model->HSM2_pscp2 = 0.0 ; model->HSM2_sc4 = 0.0 ; model->HSM2_lsc4 = 0.0 ; model->HSM2_wsc4 = 0.0 ; model->HSM2_psc4 = 0.0 ; model->HSM2_coqy = 0 ; } modelMKS = &model->modelMKS ; /* loop through all the instances of the model */ for ( here = model->HSM2instances ;here != NULL ; here = here->HSM2nextInstance ) { /* allocate a chunk of the state vector */ here->HSM2states = *states; if (model->HSM2_conqs) *states += HSM2numStatesNqs; else *states += HSM2numStates; hereMKS = &here->hereMKS ; /* perform the parameter defaulting */ if ( !here->HSM2_l_Given ) here->HSM2_l = 5.0e-6 ; if ( !here->HSM2_w_Given ) here->HSM2_w = 5.0e-6 ; if ( !here->HSM2_ad_Given ) here->HSM2_ad = 0.0 ; if ( !here->HSM2_as_Given ) here->HSM2_as = 0.0 ; if ( !here->HSM2_pd_Given ) here->HSM2_pd = 0.0 ; if ( !here->HSM2_ps_Given ) here->HSM2_ps = 0.0 ; if ( !here->HSM2_nrd_Given ) here->HSM2_nrd = 0.0 ; if ( !here->HSM2_nrs_Given ) here->HSM2_nrs = 0.0 ; if ( !here->HSM2_ngcon_Given ) here->HSM2_ngcon = 1.0 ; if ( !here->HSM2_xgw_Given ) here->HSM2_xgw = 0e0 ; if ( !here->HSM2_xgl_Given ) here->HSM2_xgl = 0e0 ; if ( !here->HSM2_nf_Given ) here->HSM2_nf = 1.0 ; if ( !here->HSM2_sa_Given ) here->HSM2_sa = 0 ; if ( !here->HSM2_sb_Given ) here->HSM2_sb = 0 ; if ( !here->HSM2_sd_Given ) here->HSM2_sd = 0 ; if ( !here->HSM2_temp_Given ) here->HSM2_temp = 27.0 ; /* [C] */ if ( !here->HSM2_dtemp_Given ) here->HSM2_dtemp = 0.0 ; if ( !here->HSM2_icVBS_Given ) here->HSM2_icVBS = 0.0; if ( !here->HSM2_icVDS_Given ) here->HSM2_icVDS = 0.0; if ( !here->HSM2_icVGS_Given ) here->HSM2_icVGS = 0.0; if ( !here->HSM2_corbnet_Given ) here->HSM2_corbnet = model->HSM2_corbnet ; else if ( here->HSM2_corbnet != 0 && here->HSM2_corbnet != 1 ) { here->HSM2_corbnet = model->HSM2_corbnet ; if(model->HSM2_coerrrep) printf("warning(HiSIM2): CORBNET has been set to its default value: %d.\n", here->HSM2_corbnet); } if ( !here->HSM2_rbdb_Given) here->HSM2_rbdb = model->HSM2_rbdb; /* in ohm */ if ( !here->HSM2_rbsb_Given) here->HSM2_rbsb = model->HSM2_rbsb; if ( !here->HSM2_rbpb_Given) here->HSM2_rbpb = model->HSM2_rbpb; if ( !here->HSM2_rbps_Given) here->HSM2_rbps = model->HSM2_rbps; if ( !here->HSM2_rbpd_Given) here->HSM2_rbpd = model->HSM2_rbpd; if ( !here->HSM2_corg_Given ) here->HSM2_corg = model->HSM2_corg ; else if ( here->HSM2_corg != 0 && here->HSM2_corg != 1 ) { here->HSM2_corg = model->HSM2_corg ; if(model->HSM2_coerrrep) printf("warning(HiSIM2): CORG has been set to its default value: %d.\n", here->HSM2_corg); } if ( !here->HSM2_mphdfm_Given ) here->HSM2_mphdfm = model->HSM2_mphdfm ; if ( !here->HSM2_m_Given ) here->HSM2_m = 1.0 ; /* WPE */ if ( !here->HSM2_sca_Given ) here->HSM2_sca = 0.0 ; /* default value */ if ( !here->HSM2_scb_Given ) here->HSM2_scb = 0.0 ; /* default value */ if ( !here->HSM2_scc_Given ) here->HSM2_scc = 0.0 ; /* default value */ /* process drain series resistance */ if ((model->HSM2_corsrd < 0 && (model->HSM2_rsh > 0.0 || model->HSM2_rd > 0.0))) { if(here->HSM2dNodePrime <= 0) { error = CKTmkVolt(ckt, &tmp, here->HSM2name, "drain"); if (error) return(error); here->HSM2dNodePrime = tmp->number; } } else { here->HSM2dNodePrime = here->HSM2dNode; } /* process source series resistance */ if ((model->HSM2_corsrd < 0 && (model->HSM2_rsh > 0.0 || model->HSM2_rs > 0.0))) { if(here->HSM2sNodePrime == 0) { error = CKTmkVolt(ckt, &tmp, here->HSM2name, "source"); if (error) return(error); here->HSM2sNodePrime = tmp->number; } } else { here->HSM2sNodePrime = here->HSM2sNode; } /* process gate resistance */ if ((here->HSM2_corg == 1 && model->HSM2_rshg > 0.0)) { if(here->HSM2gNodePrime <= 0) { error = CKTmkVolt(ckt, &tmp, here->HSM2name, "gate"); if (error) return(error); here->HSM2gNodePrime = tmp->number; } } else { here->HSM2gNodePrime = here->HSM2gNode; } /* internal body nodes for body resistance model */ if ( here->HSM2_corbnet == 1 ) { if (here->HSM2dbNode == 0) { error = CKTmkVolt(ckt, &tmp, here->HSM2name, "dbody"); if (error) return(error); here->HSM2dbNode = tmp->number; } if (here->HSM2bNodePrime == 0) { error = CKTmkVolt(ckt, &tmp,here->HSM2name, "body"); if (error) return(error); here->HSM2bNodePrime = tmp->number; } if (here->HSM2sbNode == 0) { error = CKTmkVolt(ckt, &tmp, here->HSM2name,"sbody"); if (error) return(error); here->HSM2sbNode = tmp->number; } } else { here->HSM2dbNode = here->HSM2bNodePrime = here->HSM2sbNode = here->HSM2bNode; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix,here->first,here->second))==(double *)NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(HSM2DPbpPtr, HSM2dNodePrime, HSM2bNodePrime); TSTALLOC(HSM2SPbpPtr, HSM2sNodePrime, HSM2bNodePrime); TSTALLOC(HSM2GPbpPtr, HSM2gNodePrime, HSM2bNodePrime); TSTALLOC(HSM2BPdpPtr, HSM2bNodePrime, HSM2dNodePrime); TSTALLOC(HSM2BPspPtr, HSM2bNodePrime, HSM2sNodePrime); TSTALLOC(HSM2BPgpPtr, HSM2bNodePrime, HSM2gNodePrime); TSTALLOC(HSM2BPbpPtr, HSM2bNodePrime, HSM2bNodePrime); TSTALLOC(HSM2DdPtr, HSM2dNode, HSM2dNode); TSTALLOC(HSM2GPgpPtr, HSM2gNodePrime, HSM2gNodePrime); TSTALLOC(HSM2SsPtr, HSM2sNode, HSM2sNode); TSTALLOC(HSM2DPdpPtr, HSM2dNodePrime, HSM2dNodePrime); TSTALLOC(HSM2SPspPtr, HSM2sNodePrime, HSM2sNodePrime); TSTALLOC(HSM2DdpPtr, HSM2dNode, HSM2dNodePrime); TSTALLOC(HSM2GPdpPtr, HSM2gNodePrime, HSM2dNodePrime); TSTALLOC(HSM2GPspPtr, HSM2gNodePrime, HSM2sNodePrime); TSTALLOC(HSM2SspPtr, HSM2sNode, HSM2sNodePrime); TSTALLOC(HSM2DPspPtr, HSM2dNodePrime, HSM2sNodePrime); TSTALLOC(HSM2DPdPtr, HSM2dNodePrime, HSM2dNode); TSTALLOC(HSM2DPgpPtr, HSM2dNodePrime, HSM2gNodePrime); TSTALLOC(HSM2SPgpPtr, HSM2sNodePrime, HSM2gNodePrime); TSTALLOC(HSM2SPsPtr, HSM2sNodePrime, HSM2sNode); TSTALLOC(HSM2SPdpPtr, HSM2sNodePrime, HSM2dNodePrime); if ( here->HSM2_corg == 1 ) { TSTALLOC(HSM2GgPtr, HSM2gNode, HSM2gNode); TSTALLOC(HSM2GgpPtr, HSM2gNode, HSM2gNodePrime); TSTALLOC(HSM2GPgPtr, HSM2gNodePrime, HSM2gNode); TSTALLOC(HSM2GdpPtr, HSM2gNode, HSM2dNodePrime); TSTALLOC(HSM2GspPtr, HSM2gNode, HSM2sNodePrime); TSTALLOC(HSM2GbpPtr, HSM2gNode, HSM2bNodePrime); } if ( here->HSM2_corbnet == 1 ) { /* consider body resistance net */ TSTALLOC(HSM2DPdbPtr, HSM2dNodePrime, HSM2dbNode); TSTALLOC(HSM2SPsbPtr, HSM2sNodePrime, HSM2sbNode); TSTALLOC(HSM2DBdpPtr, HSM2dbNode, HSM2dNodePrime); TSTALLOC(HSM2DBdbPtr, HSM2dbNode, HSM2dbNode); TSTALLOC(HSM2DBbpPtr, HSM2dbNode, HSM2bNodePrime); TSTALLOC(HSM2DBbPtr, HSM2dbNode, HSM2bNode); TSTALLOC(HSM2BPdbPtr, HSM2bNodePrime, HSM2dbNode); TSTALLOC(HSM2BPbPtr, HSM2bNodePrime, HSM2bNode); TSTALLOC(HSM2BPsbPtr, HSM2bNodePrime, HSM2sbNode); TSTALLOC(HSM2SBspPtr, HSM2sbNode, HSM2sNodePrime); TSTALLOC(HSM2SBbpPtr, HSM2sbNode, HSM2bNodePrime); TSTALLOC(HSM2SBbPtr, HSM2sbNode, HSM2bNode); TSTALLOC(HSM2SBsbPtr, HSM2sbNode, HSM2sbNode); TSTALLOC(HSM2BdbPtr, HSM2bNode, HSM2dbNode); TSTALLOC(HSM2BbpPtr, HSM2bNode, HSM2bNodePrime); TSTALLOC(HSM2BsbPtr, HSM2bNode, HSM2sbNode); TSTALLOC(HSM2BbPtr, HSM2bNode, HSM2bNode); } /*-----------------------------------------------------------* * Range check of instance parameters *-----------------*/ RANGECHECK(here->HSM2_l, model->HSM2_lmin, model->HSM2_lmax, "L") ; RANGECHECK(here->HSM2_w/here->HSM2_nf, model->HSM2_wmin, model->HSM2_wmax, "W/NF") ; RANGECHECK(here->HSM2_mphdfm, -3.0, 3.0, "MPHDFM") ; /*-----------------------------------------------------------* * Change unit into Kelvin. *-----------------*/ here->HSM2_ktemp = here->HSM2_temp + 273.15 ; /* [C] -> [K] */ here->HSM2_lgate = Lgate = here->HSM2_l + model->HSM2_xl ; Wgate = here->HSM2_w / here->HSM2_nf + model->HSM2_xw ; LG = Lgate * C_m2um ; here->HSM2_wg = WG = Wgate * C_m2um ; /* binning calculation */ pParam = &here->pParam ; Lbin = pow(LG, model->HSM2_lbinn) ; Wbin = pow(WG, model->HSM2_wbinn) ; LWbin = Lbin * Wbin ; BINNING(vmax) BINNING(bgtmp1) BINNING(bgtmp2) BINNING(eg0) BINNING(lover) BINNING(vfbover) BINNING(nover) BINNING(wl2) BINNING(vfbc) BINNING(nsubc) BINNING(nsubp) BINNING(scp1) BINNING(scp2) BINNING(scp3) BINNING(sc1) BINNING(sc2) BINNING(sc3) BINNING(sc4) BINNING(pgd1) BINNING(ndep) BINNING(ninv) BINNING(muecb0) BINNING(muecb1) BINNING(mueph1) BINNING(vtmp) BINNING(wvth0) BINNING(muesr1) BINNING(muetmp) BINNING(sub1) BINNING(sub2) BINNING(svds) BINNING(svbs) BINNING(svgs) BINNING(nsti) BINNING(wsti) BINNING(scsti1) BINNING(scsti2) BINNING(vthsti) BINNING(muesti1) BINNING(muesti2) BINNING(muesti3) BINNING(nsubpsti1) BINNING(nsubpsti2) BINNING(nsubpsti3) BINNING(nsubcsti1) BINNING(nsubcsti2) BINNING(nsubcsti3) BINNING(cgso) BINNING(cgdo) BINNING(js0) BINNING(js0sw) BINNING(nj) BINNING(cisbk) BINNING(clm1) BINNING(clm2) BINNING(clm3) BINNING(wfc) BINNING(gidl1) BINNING(gidl2) BINNING(gleak1) BINNING(gleak2) BINNING(gleak3) BINNING(gleak6) BINNING(glksd1) BINNING(glksd2) BINNING(glkb1) BINNING(glkb2) BINNING(nftrp) BINNING(nfalp) BINNING(vdiffj) BINNING(ibpc1) BINNING(ibpc2) /*-----------------------------------------------------------* * Range check of binning parameters *-----------------*/ RANGECHECK(pParam->HSM2_vmax, 1.0e5, 20.0e6, "VMAX") ; RANGECHECK(pParam->HSM2_bgtmp1, 50.0e-6, 1.0e-3, "BGTMP1") ; RANGECHECK(pParam->HSM2_bgtmp2, -1.0e-6, 1.0e-6, "BGTMP2") ; RANGECHECK(pParam->HSM2_eg0, 1.0, 1.3, "EG0") ; RANGECHECK(pParam->HSM2_vfbc, -1.2, -0.8, "VFBC") ; RANGECHECK(pParam->HSM2_vfbover, -0.2, 0.2, "VFBOVER") ; RANGECHECK(pParam->HSM2_nsubc, 1.0e16, 1.0e19, "NSUBC") ; RANGECHECK(pParam->HSM2_nsubp, 1.0e16, 1.0e19, "NSUBP") ; RANGECHECK(pParam->HSM2_scp1, 0.0, 20.0, "SCP1") ; RANGECHECK(pParam->HSM2_scp2, 0.0, 2.0, "SCP2") ; RANGECHECK(pParam->HSM2_scp3, 0.0, 100.0e-9, "SCP3") ; RANGECHECK(pParam->HSM2_sc1, 0.0, 20.0, "SC1") ; RANGECHECK(pParam->HSM2_sc2, 0.0, 2.0, "SC2") ; RANGECHECK(pParam->HSM2_sc3, 0.0, 200.0e-9, "SC3") ; RANGECHECK(pParam->HSM2_pgd1, 0.0, 50.0e-3, "PGD1") ; RANGECHECK(pParam->HSM2_ndep, 0.0, 1.0, "NDEP") ; RANGECHECK(pParam->HSM2_ninv, 0.0, 1.0, "NINV") ; RANGECHECK(pParam->HSM2_muecb0, 100.0, 100.0e3, "MUECB0") ; RANGECHECK(pParam->HSM2_muecb1, 5.0, 1.0e4, "MUECB1") ; RANGECHECK(pParam->HSM2_mueph1, 2.0e3, 35.0e3, "MUEPH1") ; RANGECHECK(pParam->HSM2_vtmp, -5.0, 1.0, "VTMP") ; RANGECHECK(pParam->HSM2_muesr1, 1.0e13, 1.0e16, "MUESR1") ; RANGECHECK(pParam->HSM2_muetmp, 0.5, 2.0, "MUETMP") ; RANGECHECK(pParam->HSM2_clm1, 0.5, 1.0, "CLM1") ; RANGECHECK(pParam->HSM2_clm2, 1.0, 4.0, "CLM2") ; RANGECHECK(pParam->HSM2_clm3, 0.5, 5.0, "CLM3") ; RANGECHECK(pParam->HSM2_wfc, -5.0e-15, 1.0e-6, "WFC") ; RANGECHECK(pParam->HSM2_cgso, 0.0, 100e-9 * 100*C_VAC*model->HSM2_kappa/model->HSM2_tox*C_m2cm, "CGSO") ; RANGECHECK(pParam->HSM2_cgdo, 0.0, 100e-9 * 100*C_VAC*model->HSM2_kappa/model->HSM2_tox*C_m2cm, "CGDO") ; RANGECHECK(pParam->HSM2_ibpc1, 0.0, 1.0e12, "IBPC1") ; RANGECHECK(pParam->HSM2_ibpc2, 0.0, 1.0e12, "IBPC2") ; RANGECHECK(pParam->HSM2_nsti, 1.0e16, 1.0e19, "NSTI") ; /*-----------------------------------------------------------* * Lg dependence of binning parameters *-----------------*/ /* Vfbc */ pParam->HSM2_vfbc = pParam->HSM2_vfbc * (1.0e0 + (model->HSM2_vfbcl / pow (LG, model->HSM2_vfbclp))) ; /*-----------------------------------------------------------* * Conversion to MKS unit for instance parameters. *-----------------*/ hereMKS->HSM2_nsubcdfm = here->HSM2_nsubcdfm / C_cm2m_p3 ; pParam->HSM2_nsubc = pParam->HSM2_nsubc / C_cm2m_p3 ; pParam->HSM2_nsubp = pParam->HSM2_nsubp / C_cm2m_p3 ; pParam->HSM2_nsti = pParam->HSM2_nsti / C_cm2m_p3 ; pParam->HSM2_nover = pParam->HSM2_nover / C_cm2m_p3 ; pParam->HSM2_nsubpsti1 = pParam->HSM2_nsubpsti1 / C_m2cm ; pParam->HSM2_nsubcsti1 = pParam->HSM2_nsubcsti1 / C_m2cm ; pParam->HSM2_muesti1 = pParam->HSM2_muesti1 / C_m2cm ; pParam->HSM2_ndep = pParam->HSM2_ndep / C_m2cm ; pParam->HSM2_ninv = pParam->HSM2_ninv / C_m2cm ; pParam->HSM2_vmax = pParam->HSM2_vmax / C_m2cm ; pParam->HSM2_wfc = pParam->HSM2_wfc * C_m2cm_p2 ; pParam->HSM2_glksd1 = pParam->HSM2_glksd1 / C_m2cm ; pParam->HSM2_glksd2 = pParam->HSM2_glksd2 * C_m2cm ; pParam->HSM2_gleak2 = pParam->HSM2_gleak2 * C_m2cm ; pParam->HSM2_glkb2 = pParam->HSM2_glkb2 * C_m2cm ; pParam->HSM2_gidl1 = pParam->HSM2_gidl1 / C_m2cm_p1o2 ; pParam->HSM2_gidl2 = pParam->HSM2_gidl2 * C_m2cm ; pParam->HSM2_nfalp = pParam->HSM2_nfalp / C_m2cm ; pParam->HSM2_nftrp = pParam->HSM2_nftrp * C_m2cm_p2 ; } /* End of instance */ /*-----------------------------------------------------------* * Range check of model parameters *-----------------*/ MINCHECK (model->HSM2_tox, 0.0, "TOX") ; RANGECHECK(model->HSM2_xld, 0.0, 50.0e-9, "XLD") ; RANGECHECK(model->HSM2_xwd, -10.0e-9, 100.0e-9, "XWD") ; RANGECHECK(model->HSM2_rsh, 0.0, 1.0e-3, "RSH") ; RANGECHECK(model->HSM2_rshg, 0.0, 100.0, "RSHG") ; RANGECHECK(model->HSM2_xqy, 10.0e-9, 50.0e-9, "XQY") ; RANGECHECK(model->HSM2_rs, 0.0, 10.0e-3, "RS") ; RANGECHECK(model->HSM2_rd, 0.0, 10.0e-3, "RD") ; RANGECHECK(model->HSM2_vbi, 1.0, 1.2, "VBI") ; RANGECHECK(model->HSM2_parl2, 0.0, 50.0e-9, "PARL2") ; RANGECHECK(model->HSM2_lp, 0.0, 300.0e-9, "LP") ; RANGECHECK(model->HSM2_pgd2, 0.0, 1.5, "PGD2") ; RANGECHECK(model->HSM2_pgd4, 0.0, 3.0, "PGD4") ; RANGECHECK(model->HSM2_muecb0lp, 0.0, 2.0, "MUECB0LP") ; RANGECHECK(model->HSM2_muecb1lp, 0.0, 2.0, "MUECB1LP") ; RANGECHECK(model->HSM2_mueph0, 0.25, 0.35, "MUEPH0") ; RANGECHECK(model->HSM2_muesr0, 1.8, 2.2, "MUESR0") ; RANGECHECK(model->HSM2_lpext, 1.0e-50, 10.0e-6, "LPEXT") ; RANGECHECK(model->HSM2_npext, 1.0e16, 1.0e18, "NPEXT") ; RANGECHECK(model->HSM2_scp21, 0.0, 5.0, "SCP21") ; RANGECHECK(model->HSM2_scp22, 0.0, 0.0, "SCP22") ; RANGECHECK(model->HSM2_bs1, 0.0, 50.0e-3, "BS1") ; RANGECHECK(model->HSM2_bs2, 0.5, 1.0, "BS2") ; MINCHECK (model->HSM2_cgbo, 0.0, "CGBO") ; RANGECHECK(model->HSM2_clm5, 0.0, 2.0, "CLM5") ; RANGECHECK(model->HSM2_clm6, 0.0, 20.0, "CLM6") ; RANGECHECK(model->HSM2_vover, 0.0, 50.0, "VOVER") ; RANGECHECK(model->HSM2_voverp, 0.0, 2.0, "VOVERP") ; RANGECHECK(model->HSM2_qme1, 0.0, 300.0e-9, "QME1") ; RANGECHECK(model->HSM2_qme3, 0.0,800.0e-12, "QME3") ; RANGECHECK(model->HSM2_tnom, 22.0, 32.0, "TNOM") ; RANGECHECK(model->HSM2_ddltmax, 1.0, 20.0, "DDLTMAX") ; RANGECHECK(model->HSM2_ddltict, -3.0, 20.0, "DDLTICT") ; RANGECHECK(model->HSM2_ddltslp, 0.0, 20.0, "DDLTSLP") ; RANGECHECK(model->HSM2_cvb, -0.1, 0.2, "CVB") ; RANGECHECK(model->HSM2_cvbk, -0.1, 0.2, "CVBK") ; RANGECHECK(model->HSM2_byptol, 0.0, 1.0, "BYPTOL") ; RANGECHECK(model->HSM2_sc3Vbs, -3.0, 0.0, "SC3VBS") ; RANGERESET(model->HSM2_nsubpfac, 0.2, 1.0, "NSUBPFAC") ; RANGERESET(model->HSM2_nsubpdlt, 1E-50, 0.1, "NSUBPDLT") ; /*-----------------------------------------------------------* * Conversion to MKS unit for model parameters. *-----------------*/ modelMKS->HSM2_npext = model->HSM2_npext / C_cm2m_p3 ; modelMKS->HSM2_nsubcwpe = model->HSM2_nsubcwpe / C_cm2m_p3 ; modelMKS->HSM2_nsubpwpe = model->HSM2_nsubpwpe / C_cm2m_p3 ; modelMKS->HSM2_npextwpe = model->HSM2_npextwpe / C_cm2m_p3 ; modelMKS->HSM2_ll = model->HSM2_ll / pow( C_m2cm , model->HSM2_lln ) ; modelMKS->HSM2_wl = model->HSM2_wl / pow( C_m2cm , model->HSM2_wln ) ; modelMKS->HSM2_svgsl = model->HSM2_svgsl / pow( C_m2cm , model->HSM2_svgslp ) ; modelMKS->HSM2_svgsw = model->HSM2_svgsw / pow( C_m2cm , model->HSM2_svgswp ) ; modelMKS->HSM2_svbsl = model->HSM2_svbsl / pow( C_m2cm , model->HSM2_svbslp ) ; modelMKS->HSM2_slgl = model->HSM2_slgl / pow( C_m2cm , model->HSM2_slglp ) ; modelMKS->HSM2_sub1l = model->HSM2_sub1l / pow( C_m2cm , model->HSM2_sub1lp ) ; modelMKS->HSM2_slg = model->HSM2_slg / C_m2cm ; modelMKS->HSM2_sub2l = model->HSM2_sub2l / C_m2cm ; modelMKS->HSM2_nsubcmax = model->HSM2_nsubcmax / C_cm2m_p3 ; modelMKS->HSM2_glksd3 = model->HSM2_glksd3 * C_m2cm ; modelMKS->HSM2_gleak2 = model->HSM2_gleak2 * C_m2cm ; modelMKS->HSM2_gleak4 = model->HSM2_gleak4 * C_m2cm ; modelMKS->HSM2_gleak5 = model->HSM2_gleak5 * C_m2cm ; modelMKS->HSM2_gleak7 = model->HSM2_gleak7 / C_m2cm_p2 ; modelMKS->HSM2_cit = model->HSM2_cit * C_m2cm_p2 ; modelMKS->HSM2_ovslp = model->HSM2_ovslp / C_m2cm ; modelMKS->HSM2_dly3 = model->HSM2_dly3 / C_m2cm_p2 ; /*-----------------------------------------------------------* * Change unit into Kelvin. *-----------------*/ model->HSM2_ktnom = model->HSM2_tnom + 273.15 ; /* [C] -> [K] */ /* SourceSatCurrent = 1.0e-14 */ /* DrainSatCurrent = 1.0e-14 */ model->HSM2_vcrit = CONSTvt0 * log( CONSTvt0 / (CONSTroot2 * 1.0e-14) ) ; /* Quantum Mechanical Effect */ if ( ( model->HSM2_qme1 == 0.0 && model->HSM2_qme3 == 0.0 ) || model->HSM2_qme2 == 0.0 ) { model->HSM2_flg_qme = 0 ; } else { model->HSM2_flg_qme = 1 ; model->HSM2_qme12 = model->HSM2_qme1 / ( model->HSM2_qme2 * model->HSM2_qme2 ) ; } } /* End of model */ return(OK); } int HSM2unsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM HSM2model *model; HSM2instance *here; for (model = (HSM2model *)inModel; model != NULL; model = model->HSM2nextModel) { for (here = model->HSM2instances; here != NULL; here=here->HSM2nextInstance) { if (here->HSM2dNodePrime && here->HSM2dNodePrime != here->HSM2dNode) { CKTdltNNum(ckt, here->HSM2dNodePrime); here->HSM2dNodePrime = 0; } if (here->HSM2sNodePrime && here->HSM2sNodePrime != here->HSM2sNode) { CKTdltNNum(ckt, here->HSM2sNodePrime); here->HSM2sNodePrime = 0; } if (here->HSM2gNodePrime && here->HSM2gNodePrime != here->HSM2gNode) { CKTdltNNum(ckt, here->HSM2gNodePrime); here->HSM2gNodePrime = 0; } if (here->HSM2bNodePrime && here->HSM2bNodePrime != here->HSM2bNode) { CKTdltNNum(ckt, here->HSM2bNodePrime); here->HSM2bNodePrime = 0; } if (here->HSM2dbNode && here->HSM2dbNode != here->HSM2bNode) { CKTdltNNum(ckt, here->HSM2dbNode); here->HSM2dbNode = 0; } if (here->HSM2sbNode && here->HSM2sbNode != here->HSM2bNode) { CKTdltNNum(ckt, here->HSM2sbNode); here->HSM2sbNode = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/hisim2/hsm2init.c0000644000265600020320000000407212264261473021333 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "hsm2def.h" #include "hsm2itf.h" #include "hsm2init.h" SPICEdev HSM2info = { { "HiSIM2", "Hiroshima University STARC IGFET Model 2.7.0", &HSM2nSize, &HSM2nSize, HSM2names, &HSM2pTSize, HSM2pTable, &HSM2mPTSize, HSM2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ HSM2param, /* DEVmodParam */ HSM2mParam, /* DEVload */ HSM2load, /* DEVsetup */ HSM2setup, /* DEVunsetup */ HSM2unsetup, /* DEVpzSetup */ HSM2setup, /* DEVtemperature*/ HSM2temp, /* DEVtrunc */ HSM2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ HSM2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ HSM2destroy, /* DEVmodDelete */ HSM2mDelete, /* DEVdelete */ HSM2delete, /* DEVsetic */ HSM2getic, /* DEVask */ HSM2ask, /* DEVmodAsk */ HSM2mAsk, /* DEVpzLoad */ HSM2pzLoad, /* DEVconvTest */ HSM2convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ HSM2noise, /* DEVsoaCheck */ HSM2soaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &HSM2iSize, /* DEVmodSize */ &HSM2mSize }; SPICEdev * get_hsm2_info(void) { return &HSM2info; } ngspice-26/src/spicelib/devices/hisim2/hsm2dest.c0000644000265600020320000000211012264261473021316 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2dest.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsm2def.h" #include "ngspice/suffix.h" void HSM2destroy( GENmodel **inModel) { HSM2model **model = (HSM2model**)inModel; HSM2instance *here; HSM2instance *prev = NULL; HSM2model *mod = *model; HSM2model *oldmod = NULL; for ( ;mod ;mod = mod->HSM2nextModel ) { if (oldmod) FREE(oldmod); oldmod = mod; prev = (HSM2instance *)NULL; for ( here = mod->HSM2instances ;here ;here = here->HSM2nextInstance ) { if (prev) FREE(prev); prev = here; } if (prev) FREE(prev); } if (oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/hisim2/hsm2soachk.c0000644000265600020320000000710612264261473021641 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int HSM2soaCheck(CKTcircuit *ckt, GENmodel *inModel) { HSM2model *model = (HSM2model *) inModel; HSM2instance *here; double vgs, vgd, vgb, vds, vbs, vbd; /* actual mos voltages */ int maxwarns; static int warns_vgs = 0, warns_vgd = 0, warns_vgb = 0, warns_vds = 0, warns_vbs = 0, warns_vbd = 0; if (!ckt) { warns_vgs = 0; warns_vgd = 0; warns_vgb = 0; warns_vds = 0; warns_vbs = 0; warns_vbd = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->HSM2nextModel) { for (here = model->HSM2instances; here; here = here->HSM2nextInstance) { vgs = fabs(ckt->CKTrhsOld [here->HSM2gNode] - ckt->CKTrhsOld [here->HSM2sNodePrime]); vgd = fabs(ckt->CKTrhsOld [here->HSM2gNode] - ckt->CKTrhsOld [here->HSM2dNodePrime]); vgb = fabs(ckt->CKTrhsOld [here->HSM2gNode] - ckt->CKTrhsOld [here->HSM2bNode]); vds = fabs(ckt->CKTrhsOld [here->HSM2dNodePrime] - ckt->CKTrhsOld [here->HSM2sNodePrime]); vbs = fabs(ckt->CKTrhsOld [here->HSM2bNode] - ckt->CKTrhsOld [here->HSM2sNodePrime]); vbd = fabs(ckt->CKTrhsOld [here->HSM2bNode] - ckt->CKTrhsOld [here->HSM2dNodePrime]); if (vgs > model->HSM2vgsMax) if (warns_vgs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgs|=%g has exceeded Vgs_max=%g\n", vgs, model->HSM2vgsMax); warns_vgs++; } if (vgd > model->HSM2vgdMax) if (warns_vgd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgd|=%g has exceeded Vgd_max=%g\n", vgd, model->HSM2vgdMax); warns_vgd++; } if (vgb > model->HSM2vgbMax) if (warns_vgb < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vgb|=%g has exceeded Vgb_max=%g\n", vgb, model->HSM2vgbMax); warns_vgb++; } if (vds > model->HSM2vdsMax) if (warns_vds < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vds|=%g has exceeded Vds_max=%g\n", vds, model->HSM2vdsMax); warns_vds++; } if (vbs > model->HSM2vbsMax) if (warns_vbs < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbs|=%g has exceeded Vbs_max=%g\n", vbs, model->HSM2vbsMax); warns_vbs++; } if (vbd > model->HSM2vbdMax) if (warns_vbd < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vbd|=%g has exceeded Vbd_max=%g\n", vbd, model->HSM2vbdMax); warns_vbd++; } } } return OK; } ngspice-26/src/spicelib/devices/hisim2/hsm2def.h0000644000265600020320000020566112264261473021142 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2def.h Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #ifndef HSM2 #define HSM2 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for HiSIM2 MOSFETs */ /* unit-converted model parameters */ typedef struct sHSM2modelMKSParam { double HSM2_npext ; double HSM2_nsubcwpe ; double HSM2_nsubpwpe ; double HSM2_npextwpe ; double HSM2_ll ; double HSM2_wl ; double HSM2_svgsl ; double HSM2_svgsw ; double HSM2_svbsl ; double HSM2_slgl ; double HSM2_sub1l ; double HSM2_slg ; double HSM2_sub2l ; double HSM2_nsubcmax ; double HSM2_glksd3 ; double HSM2_gleak2 ; double HSM2_gleak4 ; double HSM2_gleak5 ; double HSM2_gleak7 ; double HSM2_cit ; double HSM2_ovslp ; double HSM2_dly3 ; } HSM2modelMKSParam ; /* binning parameters */ typedef struct sHSM2binningParam { double HSM2_vmax ; double HSM2_bgtmp1 ; double HSM2_bgtmp2 ; double HSM2_eg0 ; double HSM2_lover ; double HSM2_vfbover ; double HSM2_nover ; double HSM2_wl2 ; double HSM2_vfbc ; double HSM2_nsubc ; double HSM2_nsubp ; double HSM2_scp1 ; double HSM2_scp2 ; double HSM2_scp3 ; double HSM2_sc1 ; double HSM2_sc2 ; double HSM2_sc3 ; double HSM2_sc4 ; double HSM2_pgd1 ; //double HSM2_pgd3 ; double HSM2_ndep ; double HSM2_ninv ; double HSM2_muecb0 ; double HSM2_muecb1 ; double HSM2_mueph1 ; double HSM2_vtmp ; double HSM2_wvth0 ; double HSM2_muesr1 ; double HSM2_muetmp ; double HSM2_sub1 ; double HSM2_sub2 ; double HSM2_svds ; double HSM2_svbs ; double HSM2_svgs ; double HSM2_nsti ; double HSM2_wsti ; double HSM2_scsti1 ; double HSM2_scsti2 ; double HSM2_vthsti ; double HSM2_muesti1 ; double HSM2_muesti2 ; double HSM2_muesti3 ; double HSM2_nsubpsti1 ; double HSM2_nsubpsti2 ; double HSM2_nsubpsti3 ; double HSM2_nsubcsti1; double HSM2_nsubcsti2; double HSM2_nsubcsti3; double HSM2_cgso ; double HSM2_cgdo ; double HSM2_js0 ; double HSM2_js0sw ; double HSM2_nj ; double HSM2_cisbk ; double HSM2_clm1 ; double HSM2_clm2 ; double HSM2_clm3 ; double HSM2_wfc ; double HSM2_gidl1 ; double HSM2_gidl2 ; double HSM2_gleak1 ; double HSM2_gleak2 ; double HSM2_gleak3 ; double HSM2_gleak6 ; double HSM2_glksd1 ; double HSM2_glksd2 ; double HSM2_glkb1 ; double HSM2_glkb2 ; double HSM2_nftrp ; double HSM2_nfalp ; double HSM2_vdiffj ; double HSM2_ibpc1 ; double HSM2_ibpc2 ; } HSM2binningParam ; /* unit-converted parameters for each instance */ typedef struct sHSM2hereMKSParam { double HSM2_nsubcdfm ; } HSM2hereMKSParam ; /* information needed for each instance */ typedef struct sHSM2instance { struct sHSM2model *HSM2modPtr; /* pointer to model */ struct sHSM2instance *HSM2nextInstance; /* pointer to next instance of current model*/ IFuid HSM2name; /* pointer to character string naming this instance */ int HSM2states; /* index into state table for this device */ int HSM2dNode; /* number of the drain node of the mosfet */ int HSM2gNode; /* number of the gate node of the mosfet */ int HSM2sNode; /* number of the source node of the mosfet */ int HSM2bNode; /* number of the bulk node of the mosfet */ int HSM2dNodePrime; /* number od the inner drain node */ int HSM2gNodePrime; /* number of the inner gate node */ int HSM2sNodePrime; /* number od the inner source node */ int HSM2bNodePrime; int HSM2dbNode; int HSM2sbNode; double HSM2_noiflick; /* for 1/f noise calc. */ double HSM2_noithrml; /* for thermal noise calc. */ double HSM2_noiigate; /* for induced gate noise */ double HSM2_noicross; /* for induced gate noise */ double HSM2_Qdrat; /* for induced gate noise */ /* instance */ double HSM2_l; /* the length of the channel region */ double HSM2_w; /* the width of the channel region */ double HSM2_ad; /* the area of the drain diffusion */ double HSM2_as; /* the area of the source diffusion */ double HSM2_pd; /* perimeter of drain junction [m] */ double HSM2_ps; /* perimeter of source junction [m] */ double HSM2_nrd; /* equivalent num of squares of drain [-] (unused) */ double HSM2_nrs; /* equivalent num of squares of source [-] (unused) */ double HSM2_temp; /* lattice temperature [C] */ double HSM2_dtemp; double HSM2_weff; /* the effective width of the channel region */ double HSM2_weff_nf; /* Weff * NF */ double HSM2_leff; /* the effective length of the channel region */ int HSM2_corbnet ; double HSM2_rbpb ; double HSM2_rbpd ; double HSM2_rbps ; double HSM2_rbdb ; double HSM2_rbsb ; int HSM2_corg ; /* double HSM2_rshg; */ double HSM2_ngcon; double HSM2_xgw; double HSM2_xgl; double HSM2_nf; double HSM2_sa; double HSM2_sb; double HSM2_sd; double HSM2_nsubcdfm; /* DFM */ double HSM2_mphdfm; /* DFM */ double HSM2_m; /* WPE */ double HSM2_sca; /* scc */ double HSM2_scb; /* scb */ double HSM2_scc; /* scc */ int HSM2_called; /* flag to check the first call */ /* previous values to evaluate initial guess */ double HSM2_mode_prv; double HSM2_vbsc_prv; double HSM2_vdsc_prv; double HSM2_vgsc_prv; double HSM2_ps0_prv; double HSM2_ps0_dvbs_prv; double HSM2_ps0_dvds_prv; double HSM2_ps0_dvgs_prv; double HSM2_pds_prv; double HSM2_pds_dvbs_prv; double HSM2_pds_dvds_prv; double HSM2_pds_dvgs_prv; double HSM2_ids_prv; double HSM2_ids_dvbs_prv; double HSM2_ids_dvds_prv; double HSM2_ids_dvgs_prv; double HSM2_mode_prv2; double HSM2_vbsc_prv2; double HSM2_vdsc_prv2; double HSM2_vgsc_prv2; double HSM2_ps0_prv2; double HSM2_ps0_dvbs_prv2; double HSM2_ps0_dvds_prv2; double HSM2_ps0_dvgs_prv2; double HSM2_pds_prv2; double HSM2_pds_dvbs_prv2; double HSM2_pds_dvds_prv2; double HSM2_pds_dvgs_prv2; double HSM2_PS0Z_SCE_prv ; double HSM2_PS0Z_SCE_dvds_prv ; double HSM2_PS0Z_SCE_dvgs_prv ; double HSM2_PS0Z_SCE_dvbs_prv ; /* output */ int HSM2_capop; double HSM2_gd; double HSM2_gs; double HSM2_cgso; double HSM2_cgdo; double HSM2_cgbo; double HSM2_cdso; double HSM2_cddo; double HSM2_cdgo; double HSM2_csso; double HSM2_csdo; double HSM2_csgo; double HSM2_cqyd; double HSM2_cqyg; double HSM2_cqyb; double HSM2_von; /* vth */ double HSM2_vdsat; double HSM2_ids; /* cdrain, HSM2_cd */ double HSM2_gds; double HSM2_gm; double HSM2_gmbs; double HSM2_ibs; /* HSM2_cbs */ double HSM2_ibd; /* HSM2_cbd */ double HSM2_gbs; double HSM2_gbd; double HSM2_capbs; double HSM2_capbd; double HSM2_capgs; double HSM2_capgd; double HSM2_capgb; double HSM2_isub; /* HSM2_csub */ double HSM2_gbgs; double HSM2_gbds; double HSM2_gbbs; double HSM2_qg; double HSM2_qd; double HSM2_qs; double HSM2_qb; /* bulk charge qb = -(qg + qd + qs) */ double HSM2_cggb; double HSM2_cgdb; double HSM2_cgsb; double HSM2_cbgb; double HSM2_cbdb; double HSM2_cbsb; double HSM2_cdgb; double HSM2_cddb; double HSM2_cdsb; double HSM2_mu; /* mobility */ double HSM2_igidl; /* gate induced drain leakage */ double HSM2_gigidlgs; double HSM2_gigidlds; double HSM2_gigidlbs; double HSM2_igisl; /* gate induced source leakage */ double HSM2_gigislgd; double HSM2_gigislsd; double HSM2_gigislbd; double HSM2_igb; /* gate tunneling current (gate to bulk) */ double HSM2_gigbg; double HSM2_gigbd; double HSM2_gigbb; double HSM2_gigbs; double HSM2_igs; /* gate tunneling current (gate to source) */ double HSM2_gigsg; double HSM2_gigsd; double HSM2_gigsb; double HSM2_gigss; double HSM2_igd; /* gate tunneling current (gate to drain) */ double HSM2_gigdg; double HSM2_gigdd; double HSM2_gigdb; double HSM2_gigds; /* NQS */ double HSM2_tau ; double HSM2_tau_dVgs ; double HSM2_tau_dVds ; double HSM2_tau_dVbs ; double HSM2_Xd ; double HSM2_Xd_dVgs ; double HSM2_Xd_dVds ; double HSM2_Xd_dVbs ; double HSM2_Qi ; double HSM2_Qi_dVgs ; double HSM2_Qi_dVds ; double HSM2_Qi_dVbs ; double HSM2_taub ; double HSM2_taub_dVgs ; double HSM2_taub_dVds ; double HSM2_taub_dVbs ; double HSM2_Qb ; double HSM2_Qb_dVgs ; double HSM2_Qb_dVds ; double HSM2_Qb_dVbs ; double HSM2_alpha; /* internal variables */ double HSM2_eg ; double HSM2_beta ; double HSM2_beta_inv ; double HSM2_beta2 ; double HSM2_betatnom ; double HSM2_nin ; double HSM2_egp12 ; double HSM2_egp32 ; double HSM2_lgate ; double HSM2_wg ; double HSM2_mueph ; double HSM2_mphn0 ; double HSM2_mphn1 ; double HSM2_muesr ; double HSM2_nsub ; double HSM2_qnsub ; double HSM2_qnsub_esi ; double HSM2_2qnsub_esi ; double HSM2_ptovr0 ; double HSM2_ptovr ; double HSM2_vmax0 ; double HSM2_vmax ; double HSM2_pb2 ; double HSM2_pb20 ; double HSM2_pb2c ; double HSM2_cnst0 ; double HSM2_cnst1 ; double HSM2_isbd ; double HSM2_isbd2 ; double HSM2_isbs ; double HSM2_isbs2 ; double HSM2_vbdt ; double HSM2_vbst ; double HSM2_exptemp ; double HSM2_wsti ; double HSM2_cnstpgd ; double HSM2_ninvp0 ; double HSM2_ninv0 ; double HSM2_grbpb ; double HSM2_grbpd ; double HSM2_grbps ; double HSM2_grbdb ; double HSM2_grbsb ; double HSM2_grg ; double HSM2_rs ; double HSM2_rd ; double HSM2_clmmod ; double HSM2_lgatesm ; double HSM2_dVthsm ; double HSM2_ddlt ; /* 2007.02.20--03.15 */ double HSM2_xsub1 ; double HSM2_xsub2 ; double HSM2_xgate ; double HSM2_xvbs ; double HSM2_vg2const ; double HSM2_wdpl ; double HSM2_wdplp ; double HSM2_cfrng ; double HSM2_jd_nvtm_inv ; double HSM2_jd_expcd ; double HSM2_jd_expcs ; double HSM2_sqrt_eg ; double HSM2_egtnom ; double HSM2_cecox ; double HSM2_msc ; int HSM2_flg_pgd ; double HSM2_ndep_o_esi ; double HSM2_ninv_o_esi ; double HSM2_cqyb0 ; double HSM2_cnst0over ; double HSM2_costi00 ; double HSM2_nsti_p2 ; double HSM2_costi0 ; double HSM2_costi0_p2 ; double HSM2_costi1 ; double HSM2_pb2over ; /* for Qover model */ double HSM2_ps0ldinib ; double HSM2_ptl0; double HSM2_pt40; double HSM2_gdl0; double HSM2_muecb0; double HSM2_muecb1; double HSM2_ktemp; /* lattice temperature [K] */ double HSM2_mueph1 ; double HSM2_nsubp ; double HSM2_nsubc ; HSM2hereMKSParam hereMKS ; /* unit-converted parameters */ HSM2binningParam pParam ; /* binning parameters */ /* no use in SPICE3f5 double HSM2drainSquares; the length of the drain in squares double HSM2sourceSquares; the length of the source in squares */ double HSM2sourceConductance; /* cond. of source (or 0): set in setup */ double HSM2drainConductance; /* cond. of drain (or 0): set in setup */ double HSM2internalGs; /* internal cond. of source for thermal noise calc. */ double HSM2internalGd; /* internal cond. of drain for thermal noise calc. */ double HSM2_icVBS; /* initial condition B-S voltage */ double HSM2_icVDS; /* initial condition D-S voltage */ double HSM2_icVGS; /* initial condition G-S voltage */ int HSM2_off; /* non-zero to indicate device is off for dc analysis */ int HSM2_mode; /* device mode : 1 = normal, -1 = inverse */ unsigned HSM2_l_Given :1; unsigned HSM2_w_Given :1; unsigned HSM2_ad_Given :1; unsigned HSM2_as_Given :1; /* unsigned HSM2drainSquaresGiven :1; unsigned HSM2sourceSquaresGiven :1;*/ unsigned HSM2_pd_Given :1; unsigned HSM2_ps_Given :1; unsigned HSM2_nrd_Given :1; unsigned HSM2_nrs_Given :1; unsigned HSM2_temp_Given :1; unsigned HSM2_dtemp_Given :1; unsigned HSM2_icVBS_Given :1; unsigned HSM2_icVDS_Given :1; unsigned HSM2_icVGS_Given :1; unsigned HSM2_corbnet_Given :1; unsigned HSM2_rbpb_Given :1; unsigned HSM2_rbpd_Given :1; unsigned HSM2_rbps_Given :1; unsigned HSM2_rbdb_Given :1; unsigned HSM2_rbsb_Given :1; unsigned HSM2_corg_Given :1; /* unsigned HSM2_rshg_Given :1; */ unsigned HSM2_ngcon_Given :1; unsigned HSM2_xgw_Given :1; unsigned HSM2_xgl_Given :1; unsigned HSM2_nf_Given :1; unsigned HSM2_sa_Given :1; unsigned HSM2_sb_Given :1; unsigned HSM2_sd_Given :1; unsigned HSM2_nsubcdfm_Given :1; /* DFM */ unsigned HSM2_mphdfm_Given :1; /* DFM */ unsigned HSM2_m_Given :1; /* WPE */ unsigned HSM2_sca_Given :1; /* sca */ unsigned HSM2_scb_Given :1; /* scb */ unsigned HSM2_scc_Given :1; /* scc */ /* pointer to sparse matrix */ double *HSM2GgPtr; /* pointer to sparse matrix element at (gate node,gate node) */ double *HSM2GgpPtr; /* pointer to sparse matrix element at (gate node,gate prime node) */ double *HSM2GdpPtr; /* pointer to sparse matrix element at (gate node,drain prime node) */ double *HSM2GspPtr; /* pointer to sparse matrix element at (gate node,source prime node) */ double *HSM2GbpPtr; /* pointer to sparse matrix element at (gate node,bulk prime node) */ double *HSM2GPgPtr; /* pointer to sparse matrix element at (gate prime node,gate node) */ double *HSM2GPgpPtr; /* pointer to sparse matrix element at (gate prime node,gate prime node) */ double *HSM2GPdpPtr; /* pointer to sparse matrix element at (gate prime node,drain prime node) */ double *HSM2GPspPtr; /* pointer to sparse matrix element at (gate prime node,source prime node) */ double *HSM2GPbpPtr; /* pointer to sparse matrix element at (gate prime node,bulk prime node) */ double *HSM2DPdPtr; /* pointer to sparse matrix element at (drain prime node,drain node) */ double *HSM2DPdpPtr; /* pointer to sparse matrix element at (drain prime node,drain prime node) */ double *HSM2DPgpPtr; /* pointer to sparse matrix element at (drain prime node,gate prime node) */ double *HSM2DPspPtr; /* pointer to sparse matrix element at (drain prime node,source prime node) */ double *HSM2DPbpPtr; /* pointer to sparse matrix element at (drain prime node,bulk prime node) */ double *HSM2DPdbPtr; /* pointer to sparse matrix element at (drain prime node,drain body node) */ double *HSM2DdPtr; /* pointer to sparse matrix element at (Drain node,drain node) */ double *HSM2DdpPtr; /* pointer to sparse matrix element at (drain node,drain prime node) */ double *HSM2SPsPtr; /* pointer to sparse matrix element at (source prime node,source node) */ double *HSM2SPspPtr; /* pointer to sparse matrix element at (source prime node,source prime node) */ double *HSM2SPgpPtr; /* pointer to sparse matrix element at (source prime node,gate prime node) */ double *HSM2SPdpPtr; /* pointer to sparse matrix element at (source prime node,drain prime node) */ double *HSM2SPbpPtr; /* pointer to sparse matrix element at (source prime node,bulk prime node) */ double *HSM2SPsbPtr; /* pointer to sparse matrix element at (source prime node,source body node) */ double *HSM2SsPtr; /* pointer to sparse matrix element at (source node,source node) */ double *HSM2SspPtr; /* pointer to sparse matrix element at (source node,source prime node) */ double *HSM2BPgpPtr; /* pointer to sparse matrix element at (bulk prime node,gate prime node) */ double *HSM2BPbpPtr; /* pointer to sparse matrix element at (bulk prime node,bulk prime node) */ double *HSM2BPdpPtr; /* pointer to sparse matrix element at (bulk prime node,drain prime node) */ double *HSM2BPspPtr; /* pointer to sparse matrix element at (bulk prime node,source prime node) */ double *HSM2BPbPtr; /* pointer to sparse matrix element at (bulk prime node,bulk node) */ double *HSM2BPdbPtr; /* pointer to sparse matrix element at (bulk prime node,source body node) */ double *HSM2BPsbPtr; /* pointer to sparse matrix element at (bulk prime node,source body node) */ double *HSM2DBdpPtr; /* pointer to sparse matrix element at (drain body node,drain prime node) */ double *HSM2DBdbPtr; /* pointer to sparse matrix element at (drain body node,drain body node) */ double *HSM2DBbpPtr; /* pointer to sparse matrix element at (drain body node,bulk prime node) */ double *HSM2DBbPtr; /* pointer to sparse matrix element at (drain body node,bulk node) */ double *HSM2SBspPtr; /* pointer to sparse matrix element at (source body node,drain prime node) */ double *HSM2SBbpPtr; /* pointer to sparse matrix element at (source body node,drain body node) */ double *HSM2SBbPtr; /* pointer to sparse matrix element at (source body node,bulk prime node) */ double *HSM2SBsbPtr; /* pointer to sparse matrix element at (source body node,bulk node) */ double *HSM2BsbPtr; /* pointer to sparse matrix element at (bulk node,source body node) */ double *HSM2BbpPtr; /* pointer to sparse matrix element at (bulk node,bulk prime node) */ double *HSM2BdbPtr; /* pointer to sparse matrix element at (bulk node,drain body node) */ double *HSM2BbPtr; /* pointer to sparse matrix element at (bulk node,bulk node) */ /* common state values in hisim module */ #define HSM2vbd HSM2states+ 0 #define HSM2vbs HSM2states+ 1 #define HSM2vgs HSM2states+ 2 #define HSM2vds HSM2states+ 3 #define HSM2vdbs HSM2states+ 4 #define HSM2vdbd HSM2states+ 5 #define HSM2vsbs HSM2states+ 6 #define HSM2vges HSM2states+ 7 #define HSM2qb HSM2states+ 8 #define HSM2cqb HSM2states+ 9 #define HSM2qg HSM2states+ 10 #define HSM2cqg HSM2states+ 11 #define HSM2qd HSM2states+ 12 #define HSM2cqd HSM2states+ 13 #define HSM2qbs HSM2states+ 14 #define HSM2cqbs HSM2states+ 15 #define HSM2qbd HSM2states+ 16 #define HSM2cqbd HSM2states+ 17 #define HSM2numStates 18 /* nqs charges */ #define HSM2qi_nqs HSM2states+ 19 #define HSM2qb_nqs HSM2states+ 20 #define HSM2numStatesNqs 21 /* indices to the array of HiSIM2 NOISE SOURCES (the same as BSIM3) */ #define HSM2RDNOIZ 0 #define HSM2RSNOIZ 1 #define HSM2IDNOIZ 2 #define HSM2FLNOIZ 3 #define HSM2IGSNOIZ 4 /* shot noise */ #define HSM2IGDNOIZ 5 /* shot noise */ #define HSM2IGBNOIZ 6 /* shot noise */ #define HSM2IGNOIZ 7 /* induced gate noise */ #define HSM2TOTNOIZ 8 #define HSM2NSRCS 9 /* the number of HiSIM2 MOSFET noise sources */ #ifndef NONOISE double HSM2nVar[NSTATVARS][HSM2NSRCS]; #else /* NONOISE */ double **HSM2nVar; #endif /* NONOISE */ } HSM2instance ; /* per model data */ typedef struct sHSM2model { /* model structure for a resistor */ int HSM2modType; /* type index of this device type */ struct sHSM2model *HSM2nextModel; /* pointer to next possible model in linked list */ HSM2instance * HSM2instances; /* pointer to list of instances that have this model */ IFuid HSM2modName; /* pointer to the name of this model */ int HSM2_type; /* device type: 1 = nmos, -1 = pmos */ int HSM2_level; /* level */ int HSM2_info; /* information */ int HSM2_noise; /* noise model selecter see hsm2noi.c */ int HSM2_version; /* model version 200 */ int HSM2_show; /* show physical value 1, 2, ... , 11 */ /* flags for initial guess */ int HSM2_corsrd ; int HSM2_corg ; int HSM2_coiprv ; int HSM2_copprv ; int HSM2_coadov ; int HSM2_coisub ; int HSM2_coiigs ; int HSM2_cogidl ; int HSM2_coovlp ; int HSM2_coflick ; int HSM2_coisti ; int HSM2_conqs ; /* HiSIM2 */ int HSM2_corbnet ; int HSM2_cothrml; int HSM2_coign; /* induced gate noise */ int HSM2_codfm; /* DFM */ int HSM2_corecip; int HSM2_coqy; int HSM2_coqovsm ; int HSM2_coerrrep; /* HiSIM original */ double HSM2_vmax ; double HSM2_bgtmp1 ; double HSM2_bgtmp2 ; double HSM2_eg0 ; double HSM2_tox ; double HSM2_xld ; double HSM2_lover ; double HSM2_ddltmax ; /* Vdseff */ double HSM2_ddltslp ; /* Vdseff */ double HSM2_ddltict ; /* Vdseff */ double HSM2_vfbover ; double HSM2_nover ; double HSM2_xwd ; double HSM2_xl ; double HSM2_xw ; double HSM2_saref ; double HSM2_sbref ; double HSM2_ll ; double HSM2_lld ; double HSM2_lln ; double HSM2_wl ; double HSM2_wl1 ; double HSM2_wl1p ; double HSM2_wl2 ; double HSM2_wl2p ; double HSM2_wld ; double HSM2_wln ; double HSM2_xqy ; double HSM2_xqy1 ; double HSM2_xqy2 ; double HSM2_qyrat ; double HSM2_rs; /* source contact resistance */ double HSM2_rd; /* drain contact resistance */ double HSM2_rsh; /* source/drain diffusion sheet resistance */ double HSM2_rshg; /* double HSM2_ngcon; */ /* double HSM2_xgw; */ /* double HSM2_xgl; */ /* double HSM2_nf; */ double HSM2_vfbc ; double HSM2_vbi ; double HSM2_vfbcl; double HSM2_vfbclp; double HSM2_nsubc ; double HSM2_parl2 ; double HSM2_lp ; double HSM2_nsubp ; double HSM2_nsubpl ; double HSM2_nsubpdlt; double HSM2_nsubpfac ; double HSM2_nsubpw ; double HSM2_nsubpwp ; double HSM2_scp1 ; double HSM2_scp2 ; double HSM2_scp3 ; double HSM2_sc1 ; double HSM2_sc2 ; double HSM2_sc3 ; double HSM2_sc4 ; double HSM2_pgd1 ; double HSM2_pgd2 ; //double HSM2_pgd3 ; double HSM2_pgd4 ; double HSM2_ndep ; double HSM2_ndepl ; double HSM2_ndeplp ; double HSM2_ndepw ; double HSM2_ndepwp ; double HSM2_ninv ; double HSM2_ninvd ; double HSM2_muecb0 ; double HSM2_muecb1 ; double HSM2_mueph1 ; double HSM2_mueph0 ; double HSM2_muephw ; double HSM2_muepwp ; double HSM2_muepwd ; double HSM2_muephl ; double HSM2_mueplp ; double HSM2_muepld ; double HSM2_muephs ; double HSM2_muepsp ; double HSM2_vtmp ; double HSM2_wvth0 ; double HSM2_muesr1 ; double HSM2_muesr0 ; double HSM2_muesrw ; double HSM2_mueswp ; double HSM2_muesrl ; double HSM2_mueslp ; double HSM2_bb ; double HSM2_sub1 ; double HSM2_sub2 ; double HSM2_svgs ; double HSM2_svbs ; double HSM2_svbsl ; double HSM2_svds ; double HSM2_slg ; double HSM2_sub1l ; double HSM2_sub2l ; double HSM2_svgsl ; double HSM2_svgslp ; double HSM2_svgswp ; double HSM2_svgsw ; double HSM2_svbslp ; double HSM2_slgl ; double HSM2_slglp ; double HSM2_sub1lp ; double HSM2_nsti ; double HSM2_wsti ; double HSM2_wstil ; double HSM2_wstilp ; double HSM2_wstiw ; double HSM2_wstiwp ; double HSM2_scsti1 ; double HSM2_scsti2 ; double HSM2_vthsti ; double HSM2_vdsti ; double HSM2_muesti1 ; double HSM2_muesti2 ; double HSM2_muesti3 ; double HSM2_nsubpsti1 ; double HSM2_nsubpsti2 ; double HSM2_nsubcsti1; double HSM2_nsubcsti2; double HSM2_nsubcsti3; double HSM2_nsubpsti3 ; double HSM2_lpext ; double HSM2_npext ; double HSM2_npextw ; double HSM2_npextwp ; double HSM2_scp22 ; double HSM2_scp21 ; double HSM2_bs1 ; double HSM2_bs2 ; double HSM2_cgso ; double HSM2_cgdo ; double HSM2_cgbo ; double HSM2_tpoly ; double HSM2_js0 ; double HSM2_js0sw ; double HSM2_nj ; double HSM2_njsw ; double HSM2_xti ; double HSM2_cj ; double HSM2_cjsw ; double HSM2_cjswg ; double HSM2_mj ; double HSM2_mjsw ; double HSM2_mjswg ; double HSM2_xti2 ; double HSM2_cisb ; double HSM2_cvb ; double HSM2_ctemp ; double HSM2_cisbk ; double HSM2_cvbk ; double HSM2_divx ; double HSM2_pb ; double HSM2_pbsw ; double HSM2_pbswg ; double HSM2_tcjbd ; double HSM2_tcjbs ; double HSM2_tcjbdsw ; double HSM2_tcjbssw ; double HSM2_tcjbdswg ; double HSM2_tcjbsswg ; double HSM2_clm1 ; double HSM2_clm2 ; double HSM2_clm3 ; double HSM2_clm5 ; double HSM2_clm6 ; double HSM2_muetmp ; double HSM2_vover ; double HSM2_voverp ; double HSM2_vovers ; double HSM2_voversp ; double HSM2_wfc ; double HSM2_nsubcw ; double HSM2_nsubcwp ; double HSM2_nsubcmax ; double HSM2_qme1 ; double HSM2_qme2 ; double HSM2_qme3 ; double HSM2_gidl1 ; double HSM2_gidl2 ; double HSM2_gidl3 ; double HSM2_gidl4 ; double HSM2_gidl6; double HSM2_gidl7; double HSM2_gidl5 ; double HSM2_gleak1 ; double HSM2_gleak2 ; double HSM2_gleak3 ; double HSM2_gleak4 ; double HSM2_gleak5 ; double HSM2_gleak6 ; double HSM2_gleak7 ; double HSM2_glksd1 ; double HSM2_glksd2 ; double HSM2_glksd3 ; double HSM2_glkb1 ; double HSM2_glkb2 ; double HSM2_glkb3 ; double HSM2_egig; double HSM2_igtemp2; double HSM2_igtemp3; double HSM2_vzadd0 ; double HSM2_pzadd0 ; double HSM2_nftrp ; double HSM2_nfalp ; double HSM2_falph ; double HSM2_cit ; double HSM2_kappa ; double HSM2_vdiffj ; double HSM2_dly1 ; double HSM2_dly2 ; double HSM2_dly3; double HSM2_tnom ; double HSM2_ovslp ; double HSM2_ovmag ; /* substrate resistances */ double HSM2_gbmin; double HSM2_rbpb ; double HSM2_rbpd ; double HSM2_rbps ; double HSM2_rbdb ; double HSM2_rbsb ; /* IBPC */ double HSM2_ibpc1 ; double HSM2_ibpc2 ; /* DFM */ double HSM2_mphdfm ; double HSM2_ptl, HSM2_ptp, HSM2_pt2, HSM2_ptlp, HSM2_gdl, HSM2_gdlp ; double HSM2_gdld ; double HSM2_pt4 ; double HSM2_pt4p ; double HSM2_muephl2 ; double HSM2_mueplp2 ; double HSM2_nsubcw2 ; double HSM2_nsubcwp2 ; double HSM2_muephw2 ; double HSM2_muepwp2 ; /* variables for WPE */ double HSM2_web ; double HSM2_wec ; double HSM2_nsubcwpe ; double HSM2_npextwpe ; double HSM2_nsubpwpe ; /* for Ps0_min */ double HSM2_Vgsmin ; double HSM2_sc3Vbs ; /* SC3 clamping */ double HSM2_byptol ; /* bypass control */ double HSM2_muecb0lp; double HSM2_muecb1lp; /* binning parameters */ double HSM2_lmin ; double HSM2_lmax ; double HSM2_wmin ; double HSM2_wmax ; double HSM2_lbinn ; double HSM2_wbinn ; /* Length dependence */ double HSM2_lvmax ; double HSM2_lbgtmp1 ; double HSM2_lbgtmp2 ; double HSM2_leg0 ; double HSM2_llover ; double HSM2_lvfbover ; double HSM2_lnover ; double HSM2_lwl2 ; double HSM2_lvfbc ; double HSM2_lnsubc ; double HSM2_lnsubp ; double HSM2_lscp1 ; double HSM2_lscp2 ; double HSM2_lscp3 ; double HSM2_lsc1 ; double HSM2_lsc2 ; double HSM2_lsc3 ; double HSM2_lsc4 ; double HSM2_lpgd1 ; //double HSM2_lpgd3 ; double HSM2_lndep ; double HSM2_lninv ; double HSM2_lmuecb0 ; double HSM2_lmuecb1 ; double HSM2_lmueph1 ; double HSM2_lvtmp ; double HSM2_lwvth0 ; double HSM2_lmuesr1 ; double HSM2_lmuetmp ; double HSM2_lsub1 ; double HSM2_lsub2 ; double HSM2_lsvds ; double HSM2_lsvbs ; double HSM2_lsvgs ; double HSM2_lnsti ; double HSM2_lwsti ; double HSM2_lscsti1 ; double HSM2_lscsti2 ; double HSM2_lvthsti ; double HSM2_lmuesti1 ; double HSM2_lmuesti2 ; double HSM2_lmuesti3 ; double HSM2_lnsubpsti1 ; double HSM2_lnsubpsti2 ; double HSM2_lnsubcsti1; double HSM2_lnsubcsti2; double HSM2_lnsubcsti3; double HSM2_lnsubpsti3 ; double HSM2_lcgso ; double HSM2_lcgdo ; double HSM2_ljs0 ; double HSM2_ljs0sw ; double HSM2_lnj ; double HSM2_lcisbk ; double HSM2_lclm1 ; double HSM2_lclm2 ; double HSM2_lclm3 ; double HSM2_lwfc ; double HSM2_lgidl1 ; double HSM2_lgidl2 ; double HSM2_lgleak1 ; double HSM2_lgleak2 ; double HSM2_lgleak3 ; double HSM2_lgleak6 ; double HSM2_lglksd1 ; double HSM2_lglksd2 ; double HSM2_lglkb1 ; double HSM2_lglkb2 ; double HSM2_lnftrp ; double HSM2_lnfalp ; double HSM2_lvdiffj ; double HSM2_libpc1 ; double HSM2_libpc2 ; /* Width dependence */ double HSM2_wvmax ; double HSM2_wbgtmp1 ; double HSM2_wbgtmp2 ; double HSM2_weg0 ; double HSM2_wlover ; double HSM2_wvfbover ; double HSM2_wnover ; double HSM2_wwl2 ; double HSM2_wvfbc ; double HSM2_wnsubc ; double HSM2_wnsubp ; double HSM2_wscp1 ; double HSM2_wscp2 ; double HSM2_wscp3 ; double HSM2_wsc1 ; double HSM2_wsc2 ; double HSM2_wsc3 ; double HSM2_wsc4 ; double HSM2_wpgd1 ; //double HSM2_wpgd3 ; double HSM2_wndep ; double HSM2_wninv ; double HSM2_wmuecb0 ; double HSM2_wmuecb1 ; double HSM2_wmueph1 ; double HSM2_wvtmp ; double HSM2_wwvth0 ; double HSM2_wmuesr1 ; double HSM2_wmuetmp ; double HSM2_wsub1 ; double HSM2_wsub2 ; double HSM2_wsvds ; double HSM2_wsvbs ; double HSM2_wsvgs ; double HSM2_wnsti ; double HSM2_wwsti ; double HSM2_wscsti1 ; double HSM2_wscsti2 ; double HSM2_wvthsti ; double HSM2_wmuesti1 ; double HSM2_wmuesti2 ; double HSM2_wmuesti3 ; double HSM2_wnsubpsti1 ; double HSM2_wnsubpsti2 ; double HSM2_wnsubcsti1; double HSM2_wnsubcsti2; double HSM2_wnsubcsti3; double HSM2_wnsubpsti3 ; double HSM2_wcgso ; double HSM2_wcgdo ; double HSM2_wjs0 ; double HSM2_wjs0sw ; double HSM2_wnj ; double HSM2_wcisbk ; double HSM2_wclm1 ; double HSM2_wclm2 ; double HSM2_wclm3 ; double HSM2_wwfc ; double HSM2_wgidl1 ; double HSM2_wgidl2 ; double HSM2_wgleak1 ; double HSM2_wgleak2 ; double HSM2_wgleak3 ; double HSM2_wgleak6 ; double HSM2_wglksd1 ; double HSM2_wglksd2 ; double HSM2_wglkb1 ; double HSM2_wglkb2 ; double HSM2_wnftrp ; double HSM2_wnfalp ; double HSM2_wvdiffj ; double HSM2_wibpc1 ; double HSM2_wibpc2 ; /* Cross-term dependence */ double HSM2_pvmax ; double HSM2_pbgtmp1 ; double HSM2_pbgtmp2 ; double HSM2_peg0 ; double HSM2_plover ; double HSM2_pvfbover ; double HSM2_pnover ; double HSM2_pwl2 ; double HSM2_pvfbc ; double HSM2_pnsubc ; double HSM2_pnsubp ; double HSM2_pscp1 ; double HSM2_pscp2 ; double HSM2_pscp3 ; double HSM2_psc1 ; double HSM2_psc2 ; double HSM2_psc3 ; double HSM2_psc4 ; double HSM2_ppgd1 ; //double HSM2_ppgd3 ; double HSM2_pndep ; double HSM2_pninv ; double HSM2_pmuecb0 ; double HSM2_pmuecb1 ; double HSM2_pmueph1 ; double HSM2_pvtmp ; double HSM2_pwvth0 ; double HSM2_pmuesr1 ; double HSM2_pmuetmp ; double HSM2_psub1 ; double HSM2_psub2 ; double HSM2_psvds ; double HSM2_psvbs ; double HSM2_psvgs ; double HSM2_pnsti ; double HSM2_pwsti ; double HSM2_pscsti1 ; double HSM2_pscsti2 ; double HSM2_pvthsti ; double HSM2_pmuesti1 ; double HSM2_pmuesti2 ; double HSM2_pmuesti3 ; double HSM2_pnsubpsti1 ; double HSM2_pnsubpsti2 ; double HSM2_pnsubcsti1; double HSM2_pnsubcsti2; double HSM2_pnsubcsti3; double HSM2_pnsubpsti3 ; double HSM2_pcgso ; double HSM2_pcgdo ; double HSM2_pjs0 ; double HSM2_pjs0sw ; double HSM2_pnj ; double HSM2_pcisbk ; double HSM2_pclm1 ; double HSM2_pclm2 ; double HSM2_pclm3 ; double HSM2_pwfc ; double HSM2_pgidl1 ; double HSM2_pgidl2 ; double HSM2_pgleak1 ; double HSM2_pgleak2 ; double HSM2_pgleak3 ; double HSM2_pgleak6 ; double HSM2_pglksd1 ; double HSM2_pglksd2 ; double HSM2_pglkb1 ; double HSM2_pglkb2 ; double HSM2_pnftrp ; double HSM2_pnfalp ; double HSM2_pvdiffj ; double HSM2_pibpc1 ; double HSM2_pibpc2 ; /* internal variables */ double HSM2_vcrit ; int HSM2_flg_qme ; double HSM2_qme12 ; double HSM2_ktnom ; int HSM2_bypass_enable ; double HSM2vgsMax; double HSM2vgdMax; double HSM2vgbMax; double HSM2vdsMax; double HSM2vbsMax; double HSM2vbdMax; HSM2modelMKSParam modelMKS ; /* unit-converted parameters */ /* flag for model */ unsigned HSM2_type_Given :1; unsigned HSM2_level_Given :1; unsigned HSM2_info_Given :1; unsigned HSM2_noise_Given :1; unsigned HSM2_version_Given :1; unsigned HSM2_show_Given :1; unsigned HSM2_corsrd_Given :1; unsigned HSM2_corg_Given :1; unsigned HSM2_coiprv_Given :1; unsigned HSM2_copprv_Given :1; unsigned HSM2_coadov_Given :1; unsigned HSM2_coisub_Given :1; unsigned HSM2_coiigs_Given :1; unsigned HSM2_cogidl_Given :1; unsigned HSM2_coovlp_Given :1; unsigned HSM2_coflick_Given :1; unsigned HSM2_coisti_Given :1; unsigned HSM2_conqs_Given :1; unsigned HSM2_corbnet_Given :1; unsigned HSM2_cothrml_Given :1; unsigned HSM2_coign_Given :1; /* induced gate noise */ unsigned HSM2_codfm_Given :1; /* DFM */ unsigned HSM2_corecip_Given :1; unsigned HSM2_coqy_Given :1; unsigned HSM2_coqovsm_Given :1; unsigned HSM2_coerrrep_Given :1; unsigned HSM2_kappa_Given :1; unsigned HSM2_vdiffj_Given :1; unsigned HSM2_vmax_Given :1; unsigned HSM2_bgtmp1_Given :1; unsigned HSM2_bgtmp2_Given :1; unsigned HSM2_eg0_Given :1; unsigned HSM2_tox_Given :1; unsigned HSM2_xld_Given :1; unsigned HSM2_lover_Given :1; unsigned HSM2_ddltmax_Given :1; /* Vdseff */ unsigned HSM2_ddltslp_Given :1; /* Vdseff */ unsigned HSM2_ddltict_Given :1; /* Vdseff */ unsigned HSM2_vfbover_Given :1; unsigned HSM2_nover_Given :1; unsigned HSM2_xwd_Given :1; unsigned HSM2_xl_Given :1; unsigned HSM2_xw_Given :1; unsigned HSM2_saref_Given :1; unsigned HSM2_sbref_Given :1; unsigned HSM2_ll_Given :1; unsigned HSM2_lld_Given :1; unsigned HSM2_lln_Given :1; unsigned HSM2_wl_Given :1; unsigned HSM2_wl1_Given :1; unsigned HSM2_wl1p_Given :1; unsigned HSM2_wl2_Given :1; unsigned HSM2_wl2p_Given :1; unsigned HSM2_wld_Given :1; unsigned HSM2_wln_Given :1; unsigned HSM2_xqy_Given :1; unsigned HSM2_xqy1_Given :1; unsigned HSM2_xqy2_Given :1; unsigned HSM2_qyrat_Given :1; unsigned HSM2_rs_Given :1; unsigned HSM2_rd_Given :1; unsigned HSM2_rsh_Given :1; unsigned HSM2_rshg_Given :1; /* unsigned HSM2_ngcon_Given :1; */ /* unsigned HSM2_xgw_Given :1; */ /* unsigned HSM2_xgl_Given :1; */ /* unsigned HSM2_nf_Given :1; */ unsigned HSM2_vfbc_Given :1; unsigned HSM2_vbi_Given :1; unsigned HSM2_vfbcl_Given :1; unsigned HSM2_vfbclp_Given :1; unsigned HSM2_nsubc_Given :1; unsigned HSM2_parl2_Given :1; unsigned HSM2_lp_Given :1; unsigned HSM2_nsubp_Given :1; unsigned HSM2_nsubpl_Given :1; unsigned HSM2_nsubpdlt_Given :1; unsigned HSM2_nsubpfac_Given :1; unsigned HSM2_nsubpw_Given :1; unsigned HSM2_nsubpwp_Given :1; unsigned HSM2_scp1_Given :1; unsigned HSM2_scp2_Given :1; unsigned HSM2_scp3_Given :1; unsigned HSM2_sc1_Given :1; unsigned HSM2_sc2_Given :1; unsigned HSM2_sc3_Given :1; unsigned HSM2_sc4_Given :1; unsigned HSM2_pgd1_Given :1; unsigned HSM2_pgd2_Given :1; //unsigned HSM2_pgd3_Given :1; unsigned HSM2_pgd4_Given :1; unsigned HSM2_ndep_Given :1; unsigned HSM2_ndepl_Given :1; unsigned HSM2_ndeplp_Given :1; unsigned HSM2_ndepw_Given :1; unsigned HSM2_ndepwp_Given :1; unsigned HSM2_ninv_Given :1; unsigned HSM2_ninvd_Given :1; unsigned HSM2_muecb0_Given :1; unsigned HSM2_muecb1_Given :1; unsigned HSM2_mueph1_Given :1; unsigned HSM2_mueph0_Given :1; unsigned HSM2_muephw_Given :1; unsigned HSM2_muepwp_Given :1; unsigned HSM2_muepwd_Given :1; unsigned HSM2_muephl_Given :1; unsigned HSM2_mueplp_Given :1; unsigned HSM2_muepld_Given :1; unsigned HSM2_muephs_Given :1; unsigned HSM2_muepsp_Given :1; unsigned HSM2_vtmp_Given :1; unsigned HSM2_wvth0_Given :1; unsigned HSM2_muesr1_Given :1; unsigned HSM2_muesr0_Given :1; unsigned HSM2_muesrl_Given :1; unsigned HSM2_mueslp_Given :1; unsigned HSM2_muesrw_Given :1; unsigned HSM2_mueswp_Given :1; unsigned HSM2_bb_Given :1; unsigned HSM2_sub1_Given :1; unsigned HSM2_sub2_Given :1; unsigned HSM2_svgs_Given :1; unsigned HSM2_svbs_Given :1; unsigned HSM2_svbsl_Given :1; unsigned HSM2_svds_Given :1; unsigned HSM2_slg_Given :1; unsigned HSM2_sub1l_Given :1; unsigned HSM2_sub2l_Given :1; unsigned HSM2_svgsl_Given :1; unsigned HSM2_svgslp_Given :1; unsigned HSM2_svgswp_Given :1; unsigned HSM2_svgsw_Given :1; unsigned HSM2_svbslp_Given :1; unsigned HSM2_slgl_Given :1; unsigned HSM2_slglp_Given :1; unsigned HSM2_sub1lp_Given :1; unsigned HSM2_nsti_Given :1; unsigned HSM2_wsti_Given :1; unsigned HSM2_wstil_Given :1; unsigned HSM2_wstilp_Given :1; unsigned HSM2_wstiw_Given :1; unsigned HSM2_wstiwp_Given :1; unsigned HSM2_scsti1_Given :1; unsigned HSM2_scsti2_Given :1; unsigned HSM2_vthsti_Given :1; unsigned HSM2_vdsti_Given :1; unsigned HSM2_muesti1_Given :1; unsigned HSM2_muesti2_Given :1; unsigned HSM2_muesti3_Given :1; unsigned HSM2_nsubpsti1_Given :1; unsigned HSM2_nsubpsti2_Given :1; unsigned HSM2_nsubcsti1_Given :1; unsigned HSM2_nsubcsti2_Given :1; unsigned HSM2_nsubcsti3_Given :1; unsigned HSM2_nsubpsti3_Given :1; unsigned HSM2_lpext_Given :1; unsigned HSM2_npext_Given :1; unsigned HSM2_npextw_Given :1; unsigned HSM2_npextwp_Given :1; unsigned HSM2_scp22_Given :1; unsigned HSM2_scp21_Given :1; unsigned HSM2_bs1_Given :1; unsigned HSM2_bs2_Given :1; unsigned HSM2_cgso_Given :1; unsigned HSM2_cgdo_Given :1; unsigned HSM2_cgbo_Given :1; unsigned HSM2_tpoly_Given :1; unsigned HSM2_js0_Given :1; unsigned HSM2_js0sw_Given :1; unsigned HSM2_nj_Given :1; unsigned HSM2_njsw_Given :1; unsigned HSM2_xti_Given :1; unsigned HSM2_cj_Given :1; unsigned HSM2_cjsw_Given :1; unsigned HSM2_cjswg_Given :1; unsigned HSM2_mj_Given :1; unsigned HSM2_mjsw_Given :1; unsigned HSM2_mjswg_Given :1; unsigned HSM2_xti2_Given :1; unsigned HSM2_cisb_Given :1; unsigned HSM2_cvb_Given :1; unsigned HSM2_ctemp_Given :1; unsigned HSM2_cisbk_Given :1; unsigned HSM2_cvbk_Given :1; unsigned HSM2_divx_Given :1; unsigned HSM2_pb_Given :1; unsigned HSM2_pbsw_Given :1; unsigned HSM2_pbswg_Given :1; unsigned HSM2_tcjbd_Given :1; unsigned HSM2_tcjbs_Given :1; unsigned HSM2_tcjbdsw_Given :1; unsigned HSM2_tcjbssw_Given :1; unsigned HSM2_tcjbdswg_Given :1; unsigned HSM2_tcjbsswg_Given :1; unsigned HSM2_clm1_Given :1; unsigned HSM2_clm2_Given :1; unsigned HSM2_clm3_Given :1; unsigned HSM2_clm5_Given :1; unsigned HSM2_clm6_Given :1; unsigned HSM2_muetmp_Given :1; unsigned HSM2_vover_Given :1; unsigned HSM2_voverp_Given :1; unsigned HSM2_vovers_Given :1; unsigned HSM2_voversp_Given :1; unsigned HSM2_wfc_Given :1; unsigned HSM2_nsubcw_Given :1; unsigned HSM2_nsubcwp_Given :1; unsigned HSM2_nsubcmax_Given :1; unsigned HSM2_qme1_Given :1; unsigned HSM2_qme2_Given :1; unsigned HSM2_qme3_Given :1; unsigned HSM2_gidl1_Given :1; unsigned HSM2_gidl2_Given :1; unsigned HSM2_gidl3_Given :1; unsigned HSM2_gidl4_Given :1; unsigned HSM2_gidl6_Given :1; unsigned HSM2_gidl7_Given :1; unsigned HSM2_gidl5_Given :1; unsigned HSM2_gleak1_Given :1; unsigned HSM2_gleak2_Given :1; unsigned HSM2_gleak3_Given :1; unsigned HSM2_gleak4_Given :1; unsigned HSM2_gleak5_Given :1; unsigned HSM2_gleak6_Given :1; unsigned HSM2_gleak7_Given :1; unsigned HSM2_glksd1_Given :1; unsigned HSM2_glksd2_Given :1; unsigned HSM2_glksd3_Given :1; unsigned HSM2_glkb1_Given :1; unsigned HSM2_glkb2_Given :1; unsigned HSM2_glkb3_Given :1; unsigned HSM2_egig_Given :1; unsigned HSM2_igtemp2_Given :1; unsigned HSM2_igtemp3_Given :1; unsigned HSM2_vzadd0_Given :1; unsigned HSM2_pzadd0_Given :1; unsigned HSM2_nftrp_Given :1; unsigned HSM2_nfalp_Given :1; unsigned HSM2_cit_Given :1; unsigned HSM2_falph_Given :1; unsigned HSM2_dly1_Given :1; unsigned HSM2_dly2_Given :1; unsigned HSM2_dly3_Given :1; unsigned HSM2_tnom_Given :1; unsigned HSM2_ovslp_Given :1; unsigned HSM2_ovmag_Given :1; unsigned HSM2_gbmin_Given :1; unsigned HSM2_rbpb_Given :1; unsigned HSM2_rbpd_Given :1; unsigned HSM2_rbps_Given :1; unsigned HSM2_rbdb_Given :1; unsigned HSM2_rbsb_Given :1; unsigned HSM2_ibpc1_Given :1; unsigned HSM2_ibpc2_Given :1; unsigned HSM2_mphdfm_Given :1; unsigned HSM2_ptl_Given :1; unsigned HSM2_ptp_Given :1; unsigned HSM2_pt2_Given :1; unsigned HSM2_ptlp_Given :1; unsigned HSM2_gdl_Given :1; unsigned HSM2_gdlp_Given :1; unsigned HSM2_gdld_Given :1; unsigned HSM2_pt4_Given :1; unsigned HSM2_pt4p_Given :1; unsigned HSM2_muephl2_Given :1; unsigned HSM2_mueplp2_Given :1; unsigned HSM2_nsubcw2_Given :1; unsigned HSM2_nsubcwp2_Given :1; unsigned HSM2_muephw2_Given :1; unsigned HSM2_muepwp2_Given :1; /* val set flag for WPE */ unsigned HSM2_web_Given :1; unsigned HSM2_wec_Given :1; unsigned HSM2_nsubcwpe_Given :1; unsigned HSM2_npextwpe_Given :1; unsigned HSM2_nsubpwpe_Given :1; unsigned HSM2_Vgsmin_Given :1; unsigned HSM2_sc3Vbs_Given :1; unsigned HSM2_byptol_Given :1; unsigned HSM2_muecb0lp_Given :1; unsigned HSM2_muecb1lp_Given :1; /* binning parameters */ unsigned HSM2_lmin_Given :1; unsigned HSM2_lmax_Given :1; unsigned HSM2_wmin_Given :1; unsigned HSM2_wmax_Given :1; unsigned HSM2_lbinn_Given :1; unsigned HSM2_wbinn_Given :1; /* Length dependence */ unsigned HSM2_lvmax_Given :1; unsigned HSM2_lbgtmp1_Given :1; unsigned HSM2_lbgtmp2_Given :1; unsigned HSM2_leg0_Given :1; unsigned HSM2_llover_Given :1; unsigned HSM2_lvfbover_Given :1; unsigned HSM2_lnover_Given :1; unsigned HSM2_lwl2_Given :1; unsigned HSM2_lvfbc_Given :1; unsigned HSM2_lnsubc_Given :1; unsigned HSM2_lnsubp_Given :1; unsigned HSM2_lscp1_Given :1; unsigned HSM2_lscp2_Given :1; unsigned HSM2_lscp3_Given :1; unsigned HSM2_lsc1_Given :1; unsigned HSM2_lsc2_Given :1; unsigned HSM2_lsc3_Given :1; unsigned HSM2_lsc4_Given :1; unsigned HSM2_lpgd1_Given :1; //unsigned HSM2_lpgd3_Given :1; unsigned HSM2_lndep_Given :1; unsigned HSM2_lninv_Given :1; unsigned HSM2_lmuecb0_Given :1; unsigned HSM2_lmuecb1_Given :1; unsigned HSM2_lmueph1_Given :1; unsigned HSM2_lvtmp_Given :1; unsigned HSM2_lwvth0_Given :1; unsigned HSM2_lmuesr1_Given :1; unsigned HSM2_lmuetmp_Given :1; unsigned HSM2_lsub1_Given :1; unsigned HSM2_lsub2_Given :1; unsigned HSM2_lsvds_Given :1; unsigned HSM2_lsvbs_Given :1; unsigned HSM2_lsvgs_Given :1; unsigned HSM2_lnsti_Given :1; unsigned HSM2_lwsti_Given :1; unsigned HSM2_lscsti1_Given :1; unsigned HSM2_lscsti2_Given :1; unsigned HSM2_lvthsti_Given :1; unsigned HSM2_lmuesti1_Given :1; unsigned HSM2_lmuesti2_Given :1; unsigned HSM2_lmuesti3_Given :1; unsigned HSM2_lnsubpsti1_Given :1; unsigned HSM2_lnsubpsti2_Given :1; unsigned HSM2_lnsubcsti1_Given :1; unsigned HSM2_lnsubcsti2_Given :1; unsigned HSM2_lnsubcsti3_Given :1; unsigned HSM2_lnsubpsti3_Given :1; unsigned HSM2_lcgso_Given :1; unsigned HSM2_lcgdo_Given :1; unsigned HSM2_ljs0_Given :1; unsigned HSM2_ljs0sw_Given :1; unsigned HSM2_lnj_Given :1; unsigned HSM2_lcisbk_Given :1; unsigned HSM2_lclm1_Given :1; unsigned HSM2_lclm2_Given :1; unsigned HSM2_lclm3_Given :1; unsigned HSM2_lwfc_Given :1; unsigned HSM2_lgidl1_Given :1; unsigned HSM2_lgidl2_Given :1; unsigned HSM2_lgleak1_Given :1; unsigned HSM2_lgleak2_Given :1; unsigned HSM2_lgleak3_Given :1; unsigned HSM2_lgleak6_Given :1; unsigned HSM2_lglksd1_Given :1; unsigned HSM2_lglksd2_Given :1; unsigned HSM2_lglkb1_Given :1; unsigned HSM2_lglkb2_Given :1; unsigned HSM2_lnftrp_Given :1; unsigned HSM2_lnfalp_Given :1; unsigned HSM2_lvdiffj_Given :1; unsigned HSM2_libpc1_Given :1; unsigned HSM2_libpc2_Given :1; /* Width dependence */ unsigned HSM2_wvmax_Given :1; unsigned HSM2_wbgtmp1_Given :1; unsigned HSM2_wbgtmp2_Given :1; unsigned HSM2_weg0_Given :1; unsigned HSM2_wlover_Given :1; unsigned HSM2_wvfbover_Given :1; unsigned HSM2_wnover_Given :1; unsigned HSM2_wwl2_Given :1; unsigned HSM2_wvfbc_Given :1; unsigned HSM2_wnsubc_Given :1; unsigned HSM2_wnsubp_Given :1; unsigned HSM2_wscp1_Given :1; unsigned HSM2_wscp2_Given :1; unsigned HSM2_wscp3_Given :1; unsigned HSM2_wsc1_Given :1; unsigned HSM2_wsc2_Given :1; unsigned HSM2_wsc3_Given :1; unsigned HSM2_wsc4_Given :1; unsigned HSM2_wpgd1_Given :1; //unsigned HSM2_wpgd3_Given :1; unsigned HSM2_wndep_Given :1; unsigned HSM2_wninv_Given :1; unsigned HSM2_wmuecb0_Given :1; unsigned HSM2_wmuecb1_Given :1; unsigned HSM2_wmueph1_Given :1; unsigned HSM2_wvtmp_Given :1; unsigned HSM2_wwvth0_Given :1; unsigned HSM2_wmuesr1_Given :1; unsigned HSM2_wmuetmp_Given :1; unsigned HSM2_wsub1_Given :1; unsigned HSM2_wsub2_Given :1; unsigned HSM2_wsvds_Given :1; unsigned HSM2_wsvbs_Given :1; unsigned HSM2_wsvgs_Given :1; unsigned HSM2_wnsti_Given :1; unsigned HSM2_wwsti_Given :1; unsigned HSM2_wscsti1_Given :1; unsigned HSM2_wscsti2_Given :1; unsigned HSM2_wvthsti_Given :1; unsigned HSM2_wmuesti1_Given :1; unsigned HSM2_wmuesti2_Given :1; unsigned HSM2_wmuesti3_Given :1; unsigned HSM2_wnsubpsti1_Given :1; unsigned HSM2_wnsubpsti2_Given :1; unsigned HSM2_wnsubcsti1_Given :1; unsigned HSM2_wnsubcsti2_Given :1; unsigned HSM2_wnsubcsti3_Given :1; unsigned HSM2_wnsubpsti3_Given :1; unsigned HSM2_wcgso_Given :1; unsigned HSM2_wcgdo_Given :1; unsigned HSM2_wjs0_Given :1; unsigned HSM2_wjs0sw_Given :1; unsigned HSM2_wnj_Given :1; unsigned HSM2_wcisbk_Given :1; unsigned HSM2_wclm1_Given :1; unsigned HSM2_wclm2_Given :1; unsigned HSM2_wclm3_Given :1; unsigned HSM2_wwfc_Given :1; unsigned HSM2_wgidl1_Given :1; unsigned HSM2_wgidl2_Given :1; unsigned HSM2_wgleak1_Given :1; unsigned HSM2_wgleak2_Given :1; unsigned HSM2_wgleak3_Given :1; unsigned HSM2_wgleak6_Given :1; unsigned HSM2_wglksd1_Given :1; unsigned HSM2_wglksd2_Given :1; unsigned HSM2_wglkb1_Given :1; unsigned HSM2_wglkb2_Given :1; unsigned HSM2_wnftrp_Given :1; unsigned HSM2_wnfalp_Given :1; unsigned HSM2_wvdiffj_Given :1; unsigned HSM2_wibpc1_Given :1; unsigned HSM2_wibpc2_Given :1; /* Cross-term dependence */ unsigned HSM2_pvmax_Given :1; unsigned HSM2_pbgtmp1_Given :1; unsigned HSM2_pbgtmp2_Given :1; unsigned HSM2_peg0_Given :1; unsigned HSM2_plover_Given :1; unsigned HSM2_pvfbover_Given :1; unsigned HSM2_pnover_Given :1; unsigned HSM2_pwl2_Given :1; unsigned HSM2_pvfbc_Given :1; unsigned HSM2_pnsubc_Given :1; unsigned HSM2_pnsubp_Given :1; unsigned HSM2_pscp1_Given :1; unsigned HSM2_pscp2_Given :1; unsigned HSM2_pscp3_Given :1; unsigned HSM2_psc1_Given :1; unsigned HSM2_psc2_Given :1; unsigned HSM2_psc3_Given :1; unsigned HSM2_psc4_Given :1; unsigned HSM2_ppgd1_Given :1; //unsigned HSM2_ppgd3_Given :1; unsigned HSM2_pndep_Given :1; unsigned HSM2_pninv_Given :1; unsigned HSM2_pmuecb0_Given :1; unsigned HSM2_pmuecb1_Given :1; unsigned HSM2_pmueph1_Given :1; unsigned HSM2_pvtmp_Given :1; unsigned HSM2_pwvth0_Given :1; unsigned HSM2_pmuesr1_Given :1; unsigned HSM2_pmuetmp_Given :1; unsigned HSM2_psub1_Given :1; unsigned HSM2_psub2_Given :1; unsigned HSM2_psvds_Given :1; unsigned HSM2_psvbs_Given :1; unsigned HSM2_psvgs_Given :1; unsigned HSM2_pnsti_Given :1; unsigned HSM2_pwsti_Given :1; unsigned HSM2_pscsti1_Given :1; unsigned HSM2_pscsti2_Given :1; unsigned HSM2_pvthsti_Given :1; unsigned HSM2_pmuesti1_Given :1; unsigned HSM2_pmuesti2_Given :1; unsigned HSM2_pmuesti3_Given :1; unsigned HSM2_pnsubpsti1_Given :1; unsigned HSM2_pnsubpsti2_Given :1; unsigned HSM2_pnsubcsti1_Given :1; unsigned HSM2_pnsubcsti2_Given :1; unsigned HSM2_pnsubcsti3_Given :1; unsigned HSM2_pnsubpsti3_Given :1; unsigned HSM2_pcgso_Given :1; unsigned HSM2_pcgdo_Given :1; unsigned HSM2_pjs0_Given :1; unsigned HSM2_pjs0sw_Given :1; unsigned HSM2_pnj_Given :1; unsigned HSM2_pcisbk_Given :1; unsigned HSM2_pclm1_Given :1; unsigned HSM2_pclm2_Given :1; unsigned HSM2_pclm3_Given :1; unsigned HSM2_pwfc_Given :1; unsigned HSM2_pgidl1_Given :1; unsigned HSM2_pgidl2_Given :1; unsigned HSM2_pgleak1_Given :1; unsigned HSM2_pgleak2_Given :1; unsigned HSM2_pgleak3_Given :1; unsigned HSM2_pgleak6_Given :1; unsigned HSM2_pglksd1_Given :1; unsigned HSM2_pglksd2_Given :1; unsigned HSM2_pglkb1_Given :1; unsigned HSM2_pglkb2_Given :1; unsigned HSM2_pnftrp_Given :1; unsigned HSM2_pnfalp_Given :1; unsigned HSM2_pvdiffj_Given :1; unsigned HSM2_pibpc1_Given :1; unsigned HSM2_pibpc2_Given :1; unsigned HSM2vgsMaxGiven :1; unsigned HSM2vgdMaxGiven :1; unsigned HSM2vgbMaxGiven :1; unsigned HSM2vdsMaxGiven :1; unsigned HSM2vbsMaxGiven :1; unsigned HSM2vbdMaxGiven :1; } HSM2model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ #define HSM2_BAD_PARAM -1 /* flags */ #define HSM2_MOD_NMOS 1 #define HSM2_MOD_PMOS 2 #define HSM2_MOD_LEVEL 3 #define HSM2_MOD_INFO 4 #define HSM2_MOD_NOISE 5 #define HSM2_MOD_VERSION 6 #define HSM2_MOD_SHOW 7 #define HSM2_MOD_CORSRD 11 #define HSM2_MOD_COIPRV 12 #define HSM2_MOD_COPPRV 13 #define HSM2_MOD_COADOV 17 #define HSM2_MOD_COISUB 21 #define HSM2_MOD_COIIGS 22 #define HSM2_MOD_COGIDL 23 #define HSM2_MOD_COOVLP 24 #define HSM2_MOD_COFLICK 25 #define HSM2_MOD_COISTI 26 #define HSM2_MOD_CONQS 29 /* HiSIM2 */ #define HSM2_MOD_COTHRML 30 #define HSM2_MOD_COIGN 31 /* induced gate noise */ #define HSM2_MOD_CORG 32 #define HSM2_MOD_CORBNET 33 #define HSM2_MOD_CODFM 36 /* DFM */ #define HSM2_MOD_CORECIP 37 #define HSM2_MOD_COQY 38 #define HSM2_MOD_COQOVSM 39 #define HSM2_MOD_COERRREP 153 /* device parameters */ #define HSM2_L 51 #define HSM2_W 52 #define HSM2_AD 53 #define HSM2_AS 54 #define HSM2_PD 55 #define HSM2_PS 56 #define HSM2_NRD 57 #define HSM2_NRS 58 #define HSM2_TEMP 59 #define HSM2_DTEMP 60 #define HSM2_OFF 61 #define HSM2_IC_VBS 62 #define HSM2_IC_VDS 63 #define HSM2_IC_VGS 64 #define HSM2_IC 65 #define HSM2_CORBNET 66 #define HSM2_RBPB 67 #define HSM2_RBPD 68 #define HSM2_RBPS 69 #define HSM2_RBDB 70 #define HSM2_RBSB 71 #define HSM2_CORG 72 /* #define HSM2_RSHG 73 */ #define HSM2_NGCON 74 #define HSM2_XGW 75 #define HSM2_XGL 76 #define HSM2_NF 77 #define HSM2_SA 78 #define HSM2_SB 79 #define HSM2_SD 80 #define HSM2_NSUBCDFM 82 #define HSM2_MPHDFM 84 #define HSM2_M 83 /* val symbol for WPE */ #define HSM2_SCA 85 /* sca */ #define HSM2_SCB 86 /* scb */ #define HSM2_SCC 87 /* scc */ /* model parameters */ #define HSM2_MOD_VMAX 100 #define HSM2_MOD_BGTMP1 101 #define HSM2_MOD_BGTMP2 102 #define HSM2_MOD_EG0 103 #define HSM2_MOD_TOX 104 #define HSM2_MOD_XLD 105 #define HSM2_MOD_LOVER 106 #define HSM2_MOD_DDLTMAX 421 /* Vdseff */ #define HSM2_MOD_DDLTSLP 422 /* Vdseff */ #define HSM2_MOD_DDLTICT 423 /* Vdseff */ #define HSM2_MOD_VFBOVER 428 #define HSM2_MOD_NOVER 430 #define HSM2_MOD_XWD 107 #define HSM2_MOD_XL 112 #define HSM2_MOD_XW 117 #define HSM2_MOD_SAREF 433 #define HSM2_MOD_SBREF 434 #define HSM2_MOD_LL 108 #define HSM2_MOD_LLD 109 #define HSM2_MOD_LLN 110 #define HSM2_MOD_WL 111 #define HSM2_MOD_WL1 113 #define HSM2_MOD_WL1P 114 #define HSM2_MOD_WL2 407 #define HSM2_MOD_WL2P 408 #define HSM2_MOD_WLD 115 #define HSM2_MOD_WLN 116 #define HSM2_MOD_XQY 178 #define HSM2_MOD_XQY1 118 #define HSM2_MOD_XQY2 120 #define HSM2_MOD_QYRAT 991 #define HSM2_MOD_RSH 119 #define HSM2_MOD_RSHG 384 /* #define HSM2_MOD_NGCON 385 */ /* #define HSM2_MOD_XGW 386 */ /* #define HSM2_MOD_XGL 387 */ /* #define HSM2_MOD_NF 388 */ #define HSM2_MOD_RS 398 #define HSM2_MOD_RD 399 #define HSM2_MOD_VFBC 121 #define HSM2_MOD_VBI 122 #define HSM2_MOD_NSUBC 123 #define HSM2_MOD_VFBCL 272 #define HSM2_MOD_VFBCLP 273 #define HSM2_MOD_TNOM 124 #define HSM2_MOD_PARL2 125 #define HSM2_MOD_SC1 126 #define HSM2_MOD_SC2 127 #define HSM2_MOD_SC3 128 #define HSM2_MOD_SC4 460 #define HSM2_MOD_NDEP 129 #define HSM2_MOD_NDEPL 419 #define HSM2_MOD_NDEPLP 420 #define HSM2_MOD_NDEPW 469 #define HSM2_MOD_NDEPWP 470 #define HSM2_MOD_NINV 130 #define HSM2_MOD_NINVD 300 #define HSM2_MOD_MUECB0 131 #define HSM2_MOD_MUECB1 132 #define HSM2_MOD_MUEPH1 133 #define HSM2_MOD_MUEPH0 134 #define HSM2_MOD_MUEPHW 135 #define HSM2_MOD_MUEPWP 136 #define HSM2_MOD_MUEPWD 333 #define HSM2_MOD_MUEPHL 137 #define HSM2_MOD_MUEPLP 138 #define HSM2_MOD_MUEPLD 150 #define HSM2_MOD_MUEPHS 139 #define HSM2_MOD_MUEPSP 140 #define HSM2_MOD_VTMP 141 #define HSM2_MOD_WVTH0 142 #define HSM2_MOD_MUESR1 143 #define HSM2_MOD_MUESR0 144 #define HSM2_MOD_MUESRL 145 #define HSM2_MOD_MUESLP 146 #define HSM2_MOD_MUESRW 147 #define HSM2_MOD_MUESWP 148 #define HSM2_MOD_BB 149 #define HSM2_MOD_SUB1 151 #define HSM2_MOD_SUB2 152 #define HSM2_MOD_CGSO 154 #define HSM2_MOD_CGDO 155 #define HSM2_MOD_CGBO 156 #define HSM2_MOD_JS0 157 #define HSM2_MOD_JS0SW 158 #define HSM2_MOD_NJ 159 #define HSM2_MOD_NJSW 160 #define HSM2_MOD_XTI 161 #define HSM2_MOD_CJ 162 #define HSM2_MOD_CJSW 163 #define HSM2_MOD_CJSWG 164 #define HSM2_MOD_MJ 165 #define HSM2_MOD_MJSW 166 #define HSM2_MOD_MJSWG 167 #define HSM2_MOD_XTI2 168 #define HSM2_MOD_CISB 169 #define HSM2_MOD_CVB 170 #define HSM2_MOD_CTEMP 171 #define HSM2_MOD_CISBK 172 #define HSM2_MOD_CVBK 173 #define HSM2_MOD_DIVX 174 #define HSM2_MOD_PB 175 #define HSM2_MOD_PBSW 176 #define HSM2_MOD_PBSWG 177 #define HSM2_MOD_TPOLY 179 #define HSM2_MOD_LP 180 #define HSM2_MOD_NSUBP 181 #define HSM2_MOD_NSUBPL 196 #define HSM2_MOD_NSUBPFAC 197 #define HSM2_MOD_NSUBPDLT 274 #define HSM2_MOD_NSUBPW 182 #define HSM2_MOD_NSUBPWP 183 #define HSM2_MOD_SCP1 184 #define HSM2_MOD_SCP2 185 #define HSM2_MOD_SCP3 186 #define HSM2_MOD_PGD1 187 #define HSM2_MOD_PGD2 188 //#define HSM2_MOD_PGD3 189 #define HSM2_MOD_PGD4 190 #define HSM2_MOD_CLM1 191 #define HSM2_MOD_CLM2 192 #define HSM2_MOD_CLM3 193 #define HSM2_MOD_CLM5 402 #define HSM2_MOD_CLM6 403 #define HSM2_MOD_MUETMP 195 #define HSM2_MOD_VOVER 199 #define HSM2_MOD_VOVERP 200 #define HSM2_MOD_WFC 201 #define HSM2_MOD_NSUBCW 249 #define HSM2_MOD_NSUBCWP 250 #define HSM2_MOD_NSUBCMAX 248 #define HSM2_MOD_QME1 202 #define HSM2_MOD_QME2 203 #define HSM2_MOD_QME3 204 #define HSM2_MOD_GIDL1 205 #define HSM2_MOD_GIDL2 206 #define HSM2_MOD_GIDL3 207 #define HSM2_MOD_GLEAK1 208 #define HSM2_MOD_GLEAK2 209 #define HSM2_MOD_GLEAK3 210 #define HSM2_MOD_GLEAK4 211 #define HSM2_MOD_GLEAK5 212 #define HSM2_MOD_GLEAK6 213 #define HSM2_MOD_GLEAK7 214 #define HSM2_MOD_GLKSD1 215 #define HSM2_MOD_GLKSD2 216 #define HSM2_MOD_GLKSD3 217 #define HSM2_MOD_GLKB1 218 #define HSM2_MOD_GLKB2 219 #define HSM2_MOD_GLKB3 429 #define HSM2_MOD_EGIG 220 #define HSM2_MOD_IGTEMP2 221 #define HSM2_MOD_IGTEMP3 222 #define HSM2_MOD_VZADD0 223 #define HSM2_MOD_PZADD0 224 #define HSM2_MOD_NSTI 225 #define HSM2_MOD_WSTI 226 #define HSM2_MOD_WSTIL 227 #define HSM2_MOD_WSTILP 231 #define HSM2_MOD_WSTIW 234 #define HSM2_MOD_WSTIWP 228 #define HSM2_MOD_SCSTI1 229 #define HSM2_MOD_SCSTI2 230 #define HSM2_MOD_VTHSTI 232 #define HSM2_MOD_VDSTI 233 #define HSM2_MOD_MUESTI1 235 #define HSM2_MOD_MUESTI2 236 #define HSM2_MOD_MUESTI3 237 #define HSM2_MOD_NSUBPSTI1 238 #define HSM2_MOD_NSUBPSTI2 239 #define HSM2_MOD_NSUBPSTI3 240 #define HSM2_MOD_NSUBCSTI1 198 #define HSM2_MOD_NSUBCSTI2 247 #define HSM2_MOD_NSUBCSTI3 252 #define HSM2_MOD_LPEXT 241 #define HSM2_MOD_NPEXT 242 #define HSM2_MOD_NPEXTW 471 #define HSM2_MOD_NPEXTWP 472 #define HSM2_MOD_SCP22 243 #define HSM2_MOD_SCP21 244 #define HSM2_MOD_BS1 245 #define HSM2_MOD_BS2 246 #define HSM2_MOD_KAPPA 251 #define HSM2_MOD_VDIFFJ 254 #define HSM2_MOD_DLY1 255 #define HSM2_MOD_DLY2 256 #define HSM2_MOD_DLY3 257 #define HSM2_MOD_NFTRP 258 #define HSM2_MOD_NFALP 259 #define HSM2_MOD_FALPH 263 #define HSM2_MOD_CIT 260 #define HSM2_MOD_OVSLP 261 #define HSM2_MOD_OVMAG 262 #define HSM2_MOD_GIDL4 281 #define HSM2_MOD_GIDL5 282 #define HSM2_MOD_GIDL6 189 #define HSM2_MOD_GIDL7 194 #define HSM2_MOD_SVGS 283 #define HSM2_MOD_SVBS 284 #define HSM2_MOD_SVBSL 285 #define HSM2_MOD_SVDS 286 #define HSM2_MOD_SLG 287 #define HSM2_MOD_SUB1L 290 #define HSM2_MOD_SUB2L 292 #define HSM2_MOD_VOVERS 303 #define HSM2_MOD_VOVERSP 304 #define HSM2_MOD_SVGSL 305 #define HSM2_MOD_SVGSLP 306 #define HSM2_MOD_SVGSWP 307 #define HSM2_MOD_SVGSW 308 #define HSM2_MOD_SVBSLP 309 #define HSM2_MOD_SLGL 310 #define HSM2_MOD_SLGLP 311 #define HSM2_MOD_SUB1LP 312 #define HSM2_MOD_IBPC1 404 #define HSM2_MOD_IBPC2 405 #define HSM2_MOD_MPHDFM 409 #define HSM2_MOD_PTL 450 #define HSM2_MOD_PTP 451 #define HSM2_MOD_PT2 452 #define HSM2_MOD_PTLP 455 #define HSM2_MOD_GDL 453 #define HSM2_MOD_GDLP 454 #define HSM2_MOD_GDLD 456 #define HSM2_MOD_PT4 457 #define HSM2_MOD_PT4P 465 #define HSM2_MOD_MUEPHL2 458 #define HSM2_MOD_MUEPLP2 459 #define HSM2_MOD_NSUBCW2 461 #define HSM2_MOD_NSUBCWP2 462 #define HSM2_MOD_MUEPHW2 463 #define HSM2_MOD_MUEPWP2 464 /* val symbol for WPE */ #define HSM2_MOD_WEB 88 #define HSM2_MOD_WEC 89 #define HSM2_MOD_NSUBCWPE 91 #define HSM2_MOD_NPEXTWPE 41 #define HSM2_MOD_NSUBPWPE 43 #define HSM2_MOD_VGSMIN 466 #define HSM2_MOD_SC3VBS 467 #define HSM2_MOD_BYPTOL 468 #define HSM2_MOD_MUECB0LP 473 #define HSM2_MOD_MUECB1LP 474 /* binning parameters */ #define HSM2_MOD_LMIN 1000 #define HSM2_MOD_LMAX 1001 #define HSM2_MOD_WMIN 1002 #define HSM2_MOD_WMAX 1003 #define HSM2_MOD_LBINN 1004 #define HSM2_MOD_WBINN 1005 /* Length dependence */ #define HSM2_MOD_LVMAX 1100 #define HSM2_MOD_LBGTMP1 1101 #define HSM2_MOD_LBGTMP2 1102 #define HSM2_MOD_LEG0 1103 #define HSM2_MOD_LLOVER 1106 #define HSM2_MOD_LVFBOVER 1428 #define HSM2_MOD_LNOVER 1430 #define HSM2_MOD_LWL2 1407 #define HSM2_MOD_LVFBC 1121 #define HSM2_MOD_LNSUBC 1123 #define HSM2_MOD_LNSUBP 1181 #define HSM2_MOD_LSCP1 1184 #define HSM2_MOD_LSCP2 1185 #define HSM2_MOD_LSCP3 1186 #define HSM2_MOD_LSC1 1126 #define HSM2_MOD_LSC2 1127 #define HSM2_MOD_LSC3 1128 #define HSM2_MOD_LSC4 1270 #define HSM2_MOD_LPGD1 1187 //#define HSM2_MOD_LPGD3 1189 #define HSM2_MOD_LNDEP 1129 #define HSM2_MOD_LNINV 1130 #define HSM2_MOD_LMUECB0 1131 #define HSM2_MOD_LMUECB1 1132 #define HSM2_MOD_LMUEPH1 1133 #define HSM2_MOD_LVTMP 1141 #define HSM2_MOD_LWVTH0 1142 #define HSM2_MOD_LMUESR1 1143 #define HSM2_MOD_LMUETMP 1195 #define HSM2_MOD_LSUB1 1151 #define HSM2_MOD_LSUB2 1152 #define HSM2_MOD_LSVDS 1286 #define HSM2_MOD_LSVBS 1284 #define HSM2_MOD_LSVGS 1283 #define HSM2_MOD_LNSTI 1225 #define HSM2_MOD_LWSTI 1226 #define HSM2_MOD_LSCSTI1 1229 #define HSM2_MOD_LSCSTI2 1230 #define HSM2_MOD_LVTHSTI 1232 #define HSM2_MOD_LMUESTI1 1235 #define HSM2_MOD_LMUESTI2 1236 #define HSM2_MOD_LMUESTI3 1237 #define HSM2_MOD_LNSUBPSTI1 1238 #define HSM2_MOD_LNSUBPSTI2 1239 #define HSM2_MOD_LNSUBPSTI3 1240 #define HSM2_MOD_LNSUBCSTI1 253 #define HSM2_MOD_LNSUBCSTI2 264 #define HSM2_MOD_LNSUBCSTI3 265 #define HSM2_MOD_LCGSO 1154 #define HSM2_MOD_LCGDO 1155 #define HSM2_MOD_LJS0 1157 #define HSM2_MOD_LJS0SW 1158 #define HSM2_MOD_LNJ 1159 #define HSM2_MOD_LCISBK 1172 #define HSM2_MOD_LCLM1 1191 #define HSM2_MOD_LCLM2 1192 #define HSM2_MOD_LCLM3 1193 #define HSM2_MOD_LWFC 1201 #define HSM2_MOD_LGIDL1 1205 #define HSM2_MOD_LGIDL2 1206 #define HSM2_MOD_LGLEAK1 1208 #define HSM2_MOD_LGLEAK2 1209 #define HSM2_MOD_LGLEAK3 1210 #define HSM2_MOD_LGLEAK6 1213 #define HSM2_MOD_LGLKSD1 1215 #define HSM2_MOD_LGLKSD2 1216 #define HSM2_MOD_LGLKB1 1218 #define HSM2_MOD_LGLKB2 1219 #define HSM2_MOD_LNFTRP 1258 #define HSM2_MOD_LNFALP 1259 #define HSM2_MOD_LVDIFFJ 1254 #define HSM2_MOD_LIBPC1 1404 #define HSM2_MOD_LIBPC2 1405 /* Width dependence */ #define HSM2_MOD_WVMAX 2100 #define HSM2_MOD_WBGTMP1 2101 #define HSM2_MOD_WBGTMP2 2102 #define HSM2_MOD_WEG0 2103 #define HSM2_MOD_WLOVER 2106 #define HSM2_MOD_WVFBOVER 2428 #define HSM2_MOD_WNOVER 2430 #define HSM2_MOD_WWL2 2407 #define HSM2_MOD_WVFBC 2121 #define HSM2_MOD_WNSUBC 2123 #define HSM2_MOD_WNSUBP 2181 #define HSM2_MOD_WSCP1 2184 #define HSM2_MOD_WSCP2 2185 #define HSM2_MOD_WSCP3 2186 #define HSM2_MOD_WSC1 2126 #define HSM2_MOD_WSC2 2127 #define HSM2_MOD_WSC3 2128 #define HSM2_MOD_WSC4 2270 #define HSM2_MOD_WPGD1 2187 //#define HSM2_MOD_WPGD3 2189 #define HSM2_MOD_WNDEP 2129 #define HSM2_MOD_WNINV 2130 #define HSM2_MOD_WMUECB0 2131 #define HSM2_MOD_WMUECB1 2132 #define HSM2_MOD_WMUEPH1 2133 #define HSM2_MOD_WVTMP 2141 #define HSM2_MOD_WWVTH0 2142 #define HSM2_MOD_WMUESR1 2143 #define HSM2_MOD_WMUETMP 2195 #define HSM2_MOD_WSUB1 2151 #define HSM2_MOD_WSUB2 2152 #define HSM2_MOD_WSVDS 2286 #define HSM2_MOD_WSVBS 2284 #define HSM2_MOD_WSVGS 2283 #define HSM2_MOD_WNSTI 2225 #define HSM2_MOD_WWSTI 2226 #define HSM2_MOD_WSCSTI1 2229 #define HSM2_MOD_WSCSTI2 2230 #define HSM2_MOD_WVTHSTI 2232 #define HSM2_MOD_WMUESTI1 2235 #define HSM2_MOD_WMUESTI2 2236 #define HSM2_MOD_WMUESTI3 2237 #define HSM2_MOD_WNSUBPSTI1 2238 #define HSM2_MOD_WNSUBPSTI2 2239 #define HSM2_MOD_WNSUBPSTI3 2240 #define HSM2_MOD_WNSUBCSTI1 266 #define HSM2_MOD_WNSUBCSTI2 267 #define HSM2_MOD_WNSUBCSTI3 268 #define HSM2_MOD_WCGSO 2154 #define HSM2_MOD_WCGDO 2155 #define HSM2_MOD_WJS0 2157 #define HSM2_MOD_WJS0SW 2158 #define HSM2_MOD_WNJ 2159 #define HSM2_MOD_WCISBK 2172 #define HSM2_MOD_WCLM1 2191 #define HSM2_MOD_WCLM2 2192 #define HSM2_MOD_WCLM3 2193 #define HSM2_MOD_WWFC 2201 #define HSM2_MOD_WGIDL1 2205 #define HSM2_MOD_WGIDL2 2206 #define HSM2_MOD_WGLEAK1 2208 #define HSM2_MOD_WGLEAK2 2209 #define HSM2_MOD_WGLEAK3 2210 #define HSM2_MOD_WGLEAK6 2213 #define HSM2_MOD_WGLKSD1 2215 #define HSM2_MOD_WGLKSD2 2216 #define HSM2_MOD_WGLKB1 2218 #define HSM2_MOD_WGLKB2 2219 #define HSM2_MOD_WNFTRP 2258 #define HSM2_MOD_WNFALP 2259 #define HSM2_MOD_WVDIFFJ 2254 #define HSM2_MOD_WIBPC1 2404 #define HSM2_MOD_WIBPC2 2405 /* Cross-term dependence */ #define HSM2_MOD_PVMAX 3100 #define HSM2_MOD_PBGTMP1 3101 #define HSM2_MOD_PBGTMP2 3102 #define HSM2_MOD_PEG0 3103 #define HSM2_MOD_PLOVER 3106 #define HSM2_MOD_PVFBOVER 3428 #define HSM2_MOD_PNOVER 3430 #define HSM2_MOD_PWL2 3407 #define HSM2_MOD_PVFBC 3121 #define HSM2_MOD_PNSUBC 3123 #define HSM2_MOD_PNSUBP 3181 #define HSM2_MOD_PSCP1 3184 #define HSM2_MOD_PSCP2 3185 #define HSM2_MOD_PSCP3 3186 #define HSM2_MOD_PSC1 3126 #define HSM2_MOD_PSC2 3127 #define HSM2_MOD_PSC3 3128 #define HSM2_MOD_PSC4 3270 #define HSM2_MOD_PPGD1 3187 //#define HSM2_MOD_PPGD3 3189 #define HSM2_MOD_PNDEP 3129 #define HSM2_MOD_PNINV 3130 #define HSM2_MOD_PMUECB0 3131 #define HSM2_MOD_PMUECB1 3132 #define HSM2_MOD_PMUEPH1 3133 #define HSM2_MOD_PVTMP 3141 #define HSM2_MOD_PWVTH0 3142 #define HSM2_MOD_PMUESR1 3143 #define HSM2_MOD_PMUETMP 3195 #define HSM2_MOD_PSUB1 3151 #define HSM2_MOD_PSUB2 3152 #define HSM2_MOD_PSVDS 3286 #define HSM2_MOD_PSVBS 3284 #define HSM2_MOD_PSVGS 3283 #define HSM2_MOD_PNSTI 3225 #define HSM2_MOD_PWSTI 3226 #define HSM2_MOD_PSCSTI1 3229 #define HSM2_MOD_PSCSTI2 3230 #define HSM2_MOD_PVTHSTI 3232 #define HSM2_MOD_PMUESTI1 3235 #define HSM2_MOD_PMUESTI2 3236 #define HSM2_MOD_PMUESTI3 3237 #define HSM2_MOD_PNSUBPSTI1 3238 #define HSM2_MOD_PNSUBPSTI2 3239 #define HSM2_MOD_PNSUBPSTI3 3240 #define HSM2_MOD_PNSUBCSTI1 269 #define HSM2_MOD_PNSUBCSTI2 270 #define HSM2_MOD_PNSUBCSTI3 271 #define HSM2_MOD_PCGSO 3154 #define HSM2_MOD_PCGDO 3155 #define HSM2_MOD_PJS0 3157 #define HSM2_MOD_PJS0SW 3158 #define HSM2_MOD_PNJ 3159 #define HSM2_MOD_PCISBK 3172 #define HSM2_MOD_PCLM1 3191 #define HSM2_MOD_PCLM2 3192 #define HSM2_MOD_PCLM3 3193 #define HSM2_MOD_PWFC 3201 #define HSM2_MOD_PGIDL1 3205 #define HSM2_MOD_PGIDL2 3206 #define HSM2_MOD_PGLEAK1 3208 #define HSM2_MOD_PGLEAK2 3209 #define HSM2_MOD_PGLEAK3 3210 #define HSM2_MOD_PGLEAK6 3213 #define HSM2_MOD_PGLKSD1 3215 #define HSM2_MOD_PGLKSD2 3216 #define HSM2_MOD_PGLKB1 3218 #define HSM2_MOD_PGLKB2 3219 #define HSM2_MOD_PNFTRP 3258 #define HSM2_MOD_PNFALP 3259 #define HSM2_MOD_PVDIFFJ 3254 #define HSM2_MOD_PIBPC1 3404 #define HSM2_MOD_PIBPC2 3405 /* device questions */ #define HSM2_DNODE 341 #define HSM2_GNODE 342 #define HSM2_SNODE 343 #define HSM2_BNODE 344 #define HSM2_DNODEPRIME 345 #define HSM2_SNODEPRIME 346 #define HSM2_BNODEPRIME 395 #define HSM2_DBNODE 396 #define HSM2_SBNODE 397 #define HSM2_VBD 347 #define HSM2_VBS 348 #define HSM2_VGS 349 #define HSM2_VDS 350 #define HSM2_CD 351 #define HSM2_CBS 352 #define HSM2_CBD 353 #define HSM2_GM 354 #define HSM2_GDS 355 #define HSM2_GMBS 356 #define HSM2_GBD 357 #define HSM2_GBS 358 #define HSM2_QB 359 #define HSM2_CQB 360 #define HSM2_QG 361 #define HSM2_CQG 362 #define HSM2_QD 363 #define HSM2_CQD 364 #define HSM2_CGG 365 #define HSM2_CGD 366 #define HSM2_CGS 367 #define HSM2_CBG 368 #define HSM2_CAPBD 369 #define HSM2_CQBD 370 #define HSM2_CAPBS 371 #define HSM2_CQBS 372 #define HSM2_CDG 373 #define HSM2_CDD 374 #define HSM2_CDS 375 #define HSM2_VON 376 #define HSM2_VDSAT 377 #define HSM2_QBS 378 #define HSM2_QBD 379 #define HSM2_SOURCECONDUCT 380 #define HSM2_DRAINCONDUCT 381 #define HSM2_CBDB 382 #define HSM2_CBSB 383 #define HSM2_MOD_RBPB 389 #define HSM2_MOD_RBPD 390 #define HSM2_MOD_RBPS 391 #define HSM2_MOD_RBDB 392 #define HSM2_MOD_RBSB 393 #define HSM2_MOD_GBMIN 394 #define HSM2_ISUB 410 #define HSM2_IGIDL 411 #define HSM2_IGISL 412 #define HSM2_IGD 413 #define HSM2_IGS 414 #define HSM2_IGB 415 #define HSM2_CGSO 416 #define HSM2_CGBO 417 #define HSM2_CGDO 418 #define HSM2_MOD_TCJBD 92 #define HSM2_MOD_TCJBS 93 #define HSM2_MOD_TCJBDSW 94 #define HSM2_MOD_TCJBSSW 95 #define HSM2_MOD_TCJBDSWG 96 #define HSM2_MOD_TCJBSSWG 97 #define HSM2_MOD_VGS_MAX 4001 #define HSM2_MOD_VGD_MAX 4002 #define HSM2_MOD_VGB_MAX 4003 #define HSM2_MOD_VDS_MAX 4004 #define HSM2_MOD_VBS_MAX 4005 #define HSM2_MOD_VBD_MAX 4006 #include "hsm2ext.h" /* extern void HSM2evaluate(double,double,double,HSM2instance*,HSM2model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); */ #endif /*HSM2*/ ngspice-26/src/spicelib/devices/hisim2/hsm2acld.c0000644000265600020320000005543612264261473021305 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2acld.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "hsm2def.h" int HSM2acLoad( GENmodel *inModel, register CKTcircuit *ckt) { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; double xcggb_r, xcgdb_r, xcgsb_r, xcgbb_r, xcggb_i, xcgdb_i, xcgsb_i, xcgbb_i; double xcbgb_r, xcbdb_r, xcbsb_r, xcbbb_r, xcbgb_i, xcbdb_i, xcbsb_i, xcbbb_i; double xcdgb_r, xcddb_r, xcdsb_r, xcdbb_r, xcdgb_i, xcddb_i, xcdsb_i, xcdbb_i; double xcsgb_r, xcsdb_r, xcssb_r, xcsbb_r, xcsgb_i, xcsdb_i, xcssb_i, xcsbb_i; double gdpr, gspr, gds, gbd, gbs, capbd, capbs, omega; double FwdSum, RevSum, gm, gmbs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIstotg, gIstotd, gIstots, gIstotb; double cggb_real = 0.0, cgsb_real = 0.0, cgdb_real = 0.0, cggb_imag = 0.0, cgsb_imag = 0.0, cgdb_imag = 0.0; double cdgb_real = 0.0, cdsb_real = 0.0, cddb_real = 0.0, cdgb_imag = 0.0, cdsb_imag = 0.0, cddb_imag = 0.0; double csgb_real = 0.0, cssb_real = 0.0, csdb_real = 0.0, csgb_imag = 0.0, cssb_imag = 0.0, csdb_imag = 0.0; double cbgb_real = 0.0, cbsb_real = 0.0, cbdb_real = 0.0, cbgb_imag = 0.0, cbsb_imag = 0.0, cbdb_imag = 0.0; double pyggb_r = 0.0, pygdb_r = 0.0, pygsb_r = 0.0, pygbb_r = 0.0; double pybgb_r = 0.0, pybdb_r = 0.0, pybsb_r = 0.0, pybbb_r = 0.0; double pydgb_r = 0.0, pyddb_r = 0.0, pydsb_r = 0.0, pydbb_r = 0.0; double pysgb_r = 0.0, pysdb_r = 0.0, pyssb_r = 0.0, pysbb_r = 0.0; double pyggb_i = 0.0, pygdb_i = 0.0, pygsb_i = 0.0, pygbb_i = 0.0; double pybgb_i = 0.0, pybdb_i = 0.0, pybsb_i = 0.0, pybbb_i = 0.0; double pydgb_i = 0.0, pyddb_i = 0.0, pydsb_i = 0.0, pydbb_i = 0.0; double pysgb_i = 0.0, pysdb_i = 0.0, pyssb_i = 0.0, pysbb_i = 0.0; double yggb_r, ygdb_r, ygsb_r, ygbb_r, yggb_i, ygdb_i, ygsb_i, ygbb_i; double ybgb_r, ybdb_r, ybsb_r, ybbb_r, ybgb_i, ybdb_i, ybsb_i, ybbb_i; double ydgb_r, yddb_r, ydsb_r, ydbb_r, ydgb_i, yddb_i, ydsb_i, ydbb_i; double ysgb_r, ysdb_r, yssb_r, ysbb_r, ysgb_i, ysdb_i, yssb_i, ysbb_i; double grg = 0.0, pxcbdb_i = 0.0, pxcbsb_i = 0.0; double Qi, Qi_dVgs, Qi_dVbs, Qi_dVds ; double Qb, Qb_dVgs, Qb_dVbs, Qb_dVds ; double tau ; double taub ; double Xd, Xd_dVgs, Xd_dVbs, Xd_dVds ; double T1, T2, T3, T4 ; double cdbs_real, cgbs_real, csbs_real, cbbs_real; double cdbs_imag, cgbs_imag, csbs_imag, cbbs_imag; omega = ckt->CKTomega; for ( ; model != NULL; model = model->HSM2nextModel ) { for ( here = model->HSM2instances; here!= NULL; here = here->HSM2nextInstance ) { gdpr = here->HSM2drainConductance; gspr = here->HSM2sourceConductance; gds = here->HSM2_gds; gbd = here->HSM2_gbd; gbs = here->HSM2_gbs; capbd = here->HSM2_capbd; capbs = here->HSM2_capbs; if (model->HSM2_conqs) { /* for nqs mode */ tau = here->HSM2_tau ; taub = here->HSM2_taub ; Xd = here->HSM2_Xd; Xd_dVgs = here->HSM2_Xd_dVgs ; Xd_dVds = here->HSM2_Xd_dVds ; Xd_dVbs = here->HSM2_Xd_dVbs ; Qi = here->HSM2_Qi ; Qi_dVgs = here->HSM2_Qi_dVgs ; Qi_dVds = here->HSM2_Qi_dVds ; Qi_dVbs = here->HSM2_Qi_dVbs ; Qb = here->HSM2_Qb ; Qb_dVgs = here->HSM2_Qb_dVgs ; Qb_dVds = here->HSM2_Qb_dVds ; Qb_dVbs = here->HSM2_Qb_dVbs ; T1 = 1.0 + (tau * omega) * (tau * omega); T2 = tau * omega / T1; T3 = 1.0 + (taub * omega) * (taub * omega); T4 = taub * omega / T3; cddb_real = Xd_dVds*Qi + Xd/T1*Qi_dVds; cdgb_real = Xd_dVgs*Qi + Xd/T1*Qi_dVgs; cdbs_real = Xd_dVbs*Qi + Xd/T1*Qi_dVbs; cdsb_real = - (cddb_real + cdgb_real + cdbs_real); cddb_imag = - T2*Xd*Qi_dVds; cdgb_imag = - T2*Xd*Qi_dVgs; cdbs_imag = - T2*Xd*Qi_dVbs; cdsb_imag = - (cddb_imag + cdgb_imag + cdbs_imag); csdb_real = - Xd_dVds*Qi + (1.0-Xd)/T1*Qi_dVds; csgb_real = - Xd_dVgs*Qi + (1.0-Xd)/T1*Qi_dVgs; csbs_real = - Xd_dVbs*Qi + (1.0-Xd)/T1*Qi_dVbs; cssb_real = - (csdb_real + csgb_real + csbs_real); csdb_imag = - T2*(1.0-Xd)*Qi_dVds; csgb_imag = - T2*(1.0-Xd)*Qi_dVgs; csbs_imag = - T2*(1.0-Xd)*Qi_dVbs; cssb_imag = - (csdb_imag + csgb_imag + csbs_imag); cbdb_real = Qb_dVds/T3; cbgb_real = Qb_dVgs/T3; cbbs_real = Qb_dVbs/T3; cbsb_real = - (cbdb_real + cbgb_real + cbbs_real); cbdb_imag = - T4*Qb_dVds; cbgb_imag = - T4*Qb_dVgs; cbbs_imag = - T4*Qb_dVbs; cbsb_imag = - (cbdb_imag + cbgb_imag + cbbs_imag); cgdb_real = - Qi_dVds/T1 - Qb_dVds/T3; cggb_real = - Qi_dVgs/T1 - Qb_dVgs/T3; cgbs_real = - Qi_dVbs/T1 - Qb_dVbs/T3; cgsb_real = - (cgdb_real + cggb_real + cgbs_real); cgdb_imag = T2*Qi_dVds + T4*Qb_dVds; cggb_imag = T2*Qi_dVgs + T4*Qb_dVgs; cgbs_imag = T2*Qi_dVbs + T4*Qb_dVbs; cgsb_imag = - (cgdb_imag + cggb_imag + cgbs_imag); #ifdef DEBUG_HISIM2CGG printf("Freq. %e ", omega/(2*3.14159265358979) ) ; printf("mag[Cgg] %e ", sqrt( cggb_real * cggb_real + cggb_imag * cggb_imag ) ) ; printf("qi %e ", ( sqrt(T1) / T1 ) * Qi ) ; printf("qb %e ", ( sqrt(T3) / T3 ) * Qb ) ; printf("\n") ; #endif #ifdef DEBUG_HISIM2AC printf ("#1 cssb, cggb, cgdb, cgsb, cdgb, cddb, cdsb, csgb, csdb %e %e %e %e %e %e %e %e %e %e %e %e\n", cggb_real, cgdb_real, cgsb_real, cdgb_real, cddb_real, cdsb_real, csgb_real, csdb_real, cssb_real); #endif } if ( here->HSM2_mode >= 0 ) { gm = here->HSM2_gm; gmbs = here->HSM2_gmbs; FwdSum = gm + gmbs; RevSum = 0.0; gbbdp = -here->HSM2_gbds; gbbsp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = here->HSM2_gbgs; gbdpb = here->HSM2_gbbs; gbdpdp = here->HSM2_gbds; gbdpsp = -(gbdpg + gbdpb + gbdpdp); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; } else { gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; } if (model->HSM2_conqs) { /* for nqs mode */ /* cggb_real, cgsb_real, cgdb_real cggb_imag, cgsb_imag, cgdb_imag cdgb_real, cdsb_real, cddb_real cdgb_imag, cdsb_imag, cddb_imag csgb_real, cssb_real, csdb_real csgb_imag, cssb_imag, csdb_imag cbgb_real, cbsb_real, cbdb_real cbgb_imag, cbsb_imag, cbdb_imag have already obtained. */ if (model->HSM2_coadov == 1) { /* add overlap caps to intrinsic caps */ pydgb_i = (here->HSM2_cdgo - here->HSM2_cqyg) * omega ; pyddb_i = (here->HSM2_cddo - here->HSM2_cqyd) * omega ; pydsb_i = (here->HSM2_cdso + here->HSM2_cqyg + here->HSM2_cqyd + here->HSM2_cqyb) * omega ; pydbb_i = -(pydgb_i + pyddb_i + pydsb_i) ; pysgb_i = here->HSM2_csgo * omega ; pysdb_i = here->HSM2_csdo * omega ; pyssb_i = here->HSM2_csso * omega ; pysbb_i = -(pysgb_i + pysdb_i + pyssb_i) ; pyggb_i = (-(here->HSM2_cgdo + here->HSM2_cgbo + here->HSM2_cgso) + here->HSM2_cqyg) * omega ; pygdb_i = (here->HSM2_cgdo + here->HSM2_cqyd) * omega ; pygsb_i = (here->HSM2_cgso - here->HSM2_cqyg - here->HSM2_cqyd - here->HSM2_cqyb) * omega ; pygbb_i = -(pyggb_i + pygdb_i + pygsb_i) ; } } else { /* for qs mode */ /* if coadov = 1, coverlap caps have been arleady added to intrinsic caps (QS mode)*/ cggb_real = here->HSM2_cggb; cgsb_real = here->HSM2_cgsb; cgdb_real = here->HSM2_cgdb; cggb_imag = cgsb_imag = cgdb_imag = 0.0; cbgb_real = here->HSM2_cbgb; cbsb_real = here->HSM2_cbsb; cbdb_real = here->HSM2_cbdb; cbgb_imag = cbsb_imag = cbdb_imag = 0.0; cdgb_real = here->HSM2_cdgb; cdsb_real = here->HSM2_cdsb; cddb_real = here->HSM2_cddb; cdgb_imag = cdsb_imag = cddb_imag = 0.0; csgb_real = -(cdgb_real + cggb_real + cbgb_real); cssb_real = -(cdsb_real + cgsb_real + cbsb_real); csdb_real = -(cddb_real + cgdb_real + cbdb_real); csgb_imag = cssb_imag = csdb_imag = 0.0; pyggb_i = 0.0; pygdb_i = 0.0; pygsb_i = 0.0; pygbb_i = 0.0; pybgb_i = 0.0; pybdb_i = 0.0; pybsb_i = 0.0; pybbb_i = 0.0; pydgb_i = 0.0; pyddb_i = 0.0; pydsb_i = 0.0; pydbb_i = 0.0; pysgb_i = 0.0; pysdb_i = 0.0; pyssb_i = 0.0; pysbb_i = 0.0; } } else { /* reverse mode */ gm = -here->HSM2_gm; gmbs = -here->HSM2_gmbs; FwdSum = 0.0; RevSum = -(gm + gmbs); gbbsp = -here->HSM2_gbds; gbbdp = here->HSM2_gbds + here->HSM2_gbgs + here->HSM2_gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->HSM2_gbgs; gbspsp = here->HSM2_gbds; gbspb = here->HSM2_gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->HSM2_coiigs) { gIbtotg = here->HSM2_gigbg; gIbtotd = here->HSM2_gigbd; gIbtots = here->HSM2_gigbs; gIbtotb = here->HSM2_gigbb; gIstotg = here->HSM2_gigsg; gIstotd = here->HSM2_gigsd; gIstots = here->HSM2_gigss; gIstotb = here->HSM2_gigsb; gIdtotg = here->HSM2_gigdg; gIdtotd = here->HSM2_gigdd; gIdtots = here->HSM2_gigds; gIdtotb = here->HSM2_gigdb; } else { gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->HSM2_coiigs) { gIgtotg = gIbtotg + gIstotg + gIdtotg; gIgtotd = gIbtotd + gIstotd + gIdtotd; gIgtots = gIbtots + gIstots + gIdtots; gIgtotb = gIbtotb + gIstotb + gIdtotb; } else { gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; } if (model->HSM2_conqs) { /* for nqs mode */ /* swap d with s, s with d */ /* cggb_real has already obtained. */ T1 = cgsb_real; cgsb_real = cgdb_real; cgdb_real = T1; /* cggb_imag has already obtained. */ T1 = cgsb_imag; cgsb_imag = cgdb_imag; cgdb_imag = T1; T1 = cdgb_real; cdgb_real = csgb_real; csgb_real = T1; T1 = cdsb_real; cdsb_real = csdb_real; csdb_real = T1; T1 = cddb_real; cddb_real = cssb_real; cssb_real = T1; T1 = cdgb_imag; cdgb_imag = csgb_imag; csgb_imag = T1; T1 = cdsb_imag; cdsb_imag = csdb_imag; csdb_imag = T1; T1 = cddb_imag; cddb_imag = cssb_imag; cssb_imag = T1; /* cbgb_real has already obtained. */ T1 = cbsb_real; cbsb_real = cbdb_real; cbdb_real = T1; /* cbgb_imag has already obtained. */ T1 = cbsb_imag; cbsb_imag = cbdb_imag; cbdb_imag = T1; if (model->HSM2_coadov == 1) { /* add overlap caps to intrinsic caps */ pydgb_i = here->HSM2_csgo * omega ; pyddb_i = here->HSM2_csso * omega ; pydsb_i = here->HSM2_csdo * omega ; pydbb_i = -(pydgb_i + pyddb_i + pydsb_i) ; pysgb_i = (here->HSM2_cdgo - here->HSM2_cqyg) * omega ; pysdb_i = (here->HSM2_cdso + here->HSM2_cqyg + here->HSM2_cqyd + here->HSM2_cqyb) * omega ; pyssb_i = (here->HSM2_cddo - here->HSM2_cqyd) * omega ; pysbb_i = -(pysgb_i + pysdb_i + pyssb_i) ; pyggb_i = (-(here->HSM2_cgdo + here->HSM2_cgbo + here->HSM2_cgso) + here->HSM2_cqyg) * omega ; pygdb_i = (here->HSM2_cgso - here->HSM2_cqyg - here->HSM2_cqyd - here->HSM2_cqyb) * omega ; pygsb_i = (here->HSM2_cgdo + here->HSM2_cqyd) * omega ; pygbb_i = -(pyggb_i + pygdb_i + pygsb_i) ; } } else { /* for qs mode */ /* if coadov = 1, coverlap caps have already been added to intrinsic caps (QS mode)*/ cggb_real = here->HSM2_cggb; cgsb_real = here->HSM2_cgdb; cgdb_real = here->HSM2_cgsb; cggb_imag = cgsb_imag = cgdb_imag = 0.0; cbgb_real = here->HSM2_cbgb; cbsb_real = here->HSM2_cbdb; cbdb_real = here->HSM2_cbsb; cbgb_imag = cbsb_imag = cbdb_imag = 0.0; csgb_real = here->HSM2_cdgb ; cssb_real = here->HSM2_cddb ; csdb_real = here->HSM2_cdsb ; csgb_imag = cssb_imag = csdb_imag = 0.0; cdgb_real = -(csgb_real + cggb_real + cbgb_real); cdsb_real = -(cssb_real + cgsb_real + cbsb_real); cddb_real = -(csdb_real + cgdb_real + cbdb_real); cdgb_imag = cdsb_imag = cddb_imag = 0.0; pyggb_i = 0.0; pygdb_i = 0.0; pygsb_i = 0.0; pygbb_i = 0.0; pybgb_i = 0.0; pybdb_i = 0.0; pybsb_i = 0.0; pybbb_i = 0.0; pydgb_i = 0.0; pyddb_i = 0.0; pydsb_i = 0.0; pydbb_i = 0.0; pysgb_i = 0.0; pysdb_i = 0.0; pyssb_i = 0.0; pysbb_i = 0.0; } } #ifdef DEBUG_HISIM2AC printf ("#2 cssb, cggb, cgdb, cgsb, cdgb, cddb, cdsb, csgb, csdb %e %e %e %e %e %e %e %e %e %e %e %e\n", cggb_real, cgdb_real, cgsb_real, cdgb_real, cddb_real, cdsb_real, csgb_real, csdb_real, cssb_real); #endif /* matrix elements for ac analysis (including real and imaginary parts) */ xcdgb_r = cdgb_real * omega; xcddb_r = cddb_real * omega; xcdsb_r = cdsb_real * omega; xcdbb_r = -(xcdgb_r + xcddb_r + xcdsb_r); xcsgb_r = csgb_real * omega; xcsdb_r = csdb_real * omega; xcssb_r = cssb_real * omega; xcsbb_r = -(xcsgb_r + xcsdb_r + xcssb_r); xcggb_r = cggb_real * omega; xcgdb_r = cgdb_real * omega; xcgsb_r = cgsb_real * omega; xcgbb_r = -(xcggb_r + xcgdb_r + xcgsb_r); xcbgb_r = cbgb_real * omega; xcbdb_r = cbdb_real * omega; xcbsb_r = cbsb_real * omega; xcbbb_r = -(xcbgb_r + xcbdb_r + xcbsb_r); xcdgb_i = cdgb_imag * omega; xcddb_i = cddb_imag * omega; xcdsb_i = cdsb_imag * omega; xcdbb_i = -(xcddb_i + xcdgb_i + xcdsb_i); xcsgb_i = csgb_imag * omega; xcsdb_i = csdb_imag * omega; xcssb_i = cssb_imag * omega; xcsbb_i = -(xcsdb_i + xcsgb_i + xcssb_i); xcggb_i = cggb_imag * omega; xcgdb_i = cgdb_imag * omega; xcgsb_i = cgsb_imag * omega; xcgbb_i = -(xcggb_i + xcgdb_i + xcgsb_i); xcbgb_i = cbgb_imag * omega; xcbdb_i = cbdb_imag * omega; xcbsb_i = cbsb_imag * omega; xcbbb_i = -(xcbgb_i + xcbdb_i + xcbsb_i); /* stamp intrinsic y-parameters */ yggb_r = - xcggb_i; yggb_i = xcggb_r; ygdb_r = - xcgdb_i; ygdb_i = xcgdb_r; ygsb_r = - xcgsb_i; ygsb_i = xcgsb_r; ygbb_r = - xcgbb_i; ygbb_i = xcgbb_r; ydgb_r = - xcdgb_i; ydgb_i = xcdgb_r; yddb_r = - xcddb_i; yddb_i = xcddb_r; ydsb_r = - xcdsb_i; ydsb_i = xcdsb_r; ydbb_r = - xcdbb_i; ydbb_i = xcdbb_r; ydgb_r += gm; yddb_r += gds + RevSum; ydsb_r += - gds - FwdSum; ydbb_r += gmbs; ysgb_r = - xcsgb_i; ysgb_i = xcsgb_r; ysdb_r = - xcsdb_i; ysdb_i = xcsdb_r; yssb_r = - xcssb_i; yssb_i = xcssb_r; ysbb_r = - xcsbb_i; ysbb_i = xcsbb_r; ysgb_r += - gm; ysdb_r += - gds - RevSum; yssb_r += gds + FwdSum; ysbb_r += - gmbs; ybgb_r = - xcbgb_i; ybgb_i = xcbgb_r; ybdb_r = - xcbdb_i; ybdb_i = xcbdb_r; ybsb_r = - xcbsb_i; ybsb_i = xcbsb_r; ybbb_r = - xcbbb_i; ybbb_i = xcbbb_r; /* Ibd, Ibs, Igate, Igd, Igs, Igb, Igidl, Igisl, Isub */ pydgb_r = gbdpg - gIdtotg + here->HSM2_gigidlgs ; pyddb_r = gbd + gbdpdp - gIdtotd + here->HSM2_gigidlds ; pydsb_r = gbdpsp - gIdtots - (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs); pydbb_r = gbdpb - gIdtotb + here->HSM2_gigidlbs ; if (!here->HSM2_corbnet) pydbb_r += - gbd; pysgb_r = gbspg - gIstotg + here->HSM2_gigislgd ; pysdb_r = gbspdp - gIstotd - (here->HSM2_gigislsd + here->HSM2_gigislgd + here->HSM2_gigislbd); pyssb_r = gbs + gbspsp - gIstots + here->HSM2_gigislsd ; pysbb_r =gbspb - gIstotb + here->HSM2_gigislbd ; if (!here->HSM2_corbnet) pysbb_r += - gbs; pyggb_r = gIgtotg ; if (here->HSM2_corg == 1) { grg = here->HSM2_grg; pyggb_r += grg; } pygdb_r = gIgtotd ; pygsb_r = gIgtots ; pygbb_r = gIgtotb ; pybgb_r = - here->HSM2_gbgs - gIbtotg - here->HSM2_gigidlgs - here->HSM2_gigislgd ; pybdb_r = gbbdp - gIbtotd - here->HSM2_gigidlds + (here->HSM2_gigislgd + here->HSM2_gigislsd + here->HSM2_gigislbd) ; if (!here->HSM2_corbnet) pybdb_r += - gbd ; pybsb_r = gbbsp - gIbtots + (here->HSM2_gigidlgs + here->HSM2_gigidlds + here->HSM2_gigidlbs) - here->HSM2_gigislsd ; if (!here->HSM2_corbnet) pybsb_r += - gbs ; pybbb_r = - here->HSM2_gbbs - gIbtotb - here->HSM2_gigidlbs - here->HSM2_gigislbd ; if (!here->HSM2_corbnet) pybbb_r += gbd + gbs ; pybdb_i = -(pyddb_i + pygdb_i + pysdb_i); pybgb_i = -(pydgb_i + pyggb_i + pysgb_i); pybsb_i = -(pydsb_i + pygsb_i + pyssb_i); pybbb_i = -(pydbb_i + pygbb_i + pysbb_i); /* Cbd, Cbs */ pyddb_i += capbd * omega ; pyssb_i += capbs * omega ; if (!here->HSM2_corbnet) { pydbb_i -= capbd * omega ; pysbb_i -= capbs * omega ; pybdb_i -= capbd * omega ; pybsb_i -= capbs * omega ; pybbb_i += (capbd + capbs) * omega ; } else { pxcbdb_i = - capbd * omega ; pxcbsb_i = - capbs * omega ; } #ifdef DEBUG_HISIM2AC /* for representing y-parameters */ printf("f ygg_r ygg_i %e %e %e\n",omega/(2.0*3.141592653589793),yggb_r+pyggb_r,yggb_i+pyggb_i); printf("f ygd_r ygd_i %e %e %e\n",omega/(2.0*3.141592653589793),ygdb_r+pygdb_r,ygdb_i+pygdb_i); printf("f ygs_r ygs_i %e %e %e\n",omega/(2.0*3.141592653589793),ygsb_r+pygsb_r,ygsb_i+pygsb_i); printf("f ygb_r ygb_i %e %e %e\n",omega/(2.0*3.141592653589793),ygbb_r+pygbb_r,ygbb_i+pygbb_i); printf("f ydg_r ydg_i %e %e %e\n",omega/(2.0*3.141592653589793),ydgb_r+pydgb_r,ydgb_i+pydgb_i); printf("f ydd_r ydd_i %e %e %e\n",omega/(2.0*3.141592653589793),yddb_r+pyddb_r,yddb_i+pyddb_i); printf("f yds_r yds_i %e %e %e\n",omega/(2.0*3.141592653589793),ydsb_r+pydsb_r,ydsb_i+pydsb_i); printf("f ydb_r ydb_i %e %e %e\n",omega/(2.0*3.141592653589793),ydbb_r+pydbb_r,ydbb_i+pydbb_i); printf("f ybg_r ybg_i %e %e %e\n",omega/(2.0*3.141592653589793),ybgb_r+pybgb_r,ybgb_i+pybgb_i); printf("f ybd_r ybd_i %e %e %e\n",omega/(2.0*3.141592653589793),ybdb_r+pybdb_r,ybdb_i+pybdb_i); printf("f ybs_r ybs_i %e %e %e\n",omega/(2.0*3.141592653589793),ybsb_r+pybsb_r,ybsb_i+pybsb_i); printf("f ybb_r ybb_i %e %e %e\n",omega/(2.0*3.141592653589793),ybbb_r+pybbb_r,ybbb_i+pybbb_i); printf("f ysg_r ysg_i %e %e %e\n",omega/(2.0*3.141592653589793),ysgb_r+pysgb_r,ysgb_i+pysgb_i); printf("f ysd_r ysd_i %e %e %e\n",omega/(2.0*3.141592653589793),ysdb_r+pysdb_r,ysdb_i+pysdb_i); printf("f yss_r yss_i %e %e %e\n",omega/(2.0*3.141592653589793),yssb_r+pyssb_r,yssb_i+pyssb_i); printf("f ysb_r ysb_i %e %e %e\n",omega/(2.0*3.141592653589793),ysbb_r+pysbb_r,ysbb_i+pysbb_i); printf("f y11r y11i y12r y12i y21r y21i y22r y22i %e %e %e %e %e %e %e %e %e\n",omega/(2.0*3.141592653589793),yggb_r+pyggb_r,yggb_i+pyggb_i, ygdb_r+pygdb_r,ygdb_i+pygdb_i, ydgb_r+pydgb_r,ydgb_i+pydgb_i, yddb_r+pyddb_r,yddb_i+pyddb_i); #endif if (here->HSM2_corg == 1) { *(here->HSM2GgPtr) += grg; *(here->HSM2GPgPtr) -= grg; *(here->HSM2GgpPtr) -= grg; } *(here->HSM2GPgpPtr +1) += yggb_i + pyggb_i; *(here->HSM2GPgpPtr) += yggb_r + pyggb_r; *(here->HSM2GPdpPtr +1) += ygdb_i + pygdb_i; *(here->HSM2GPdpPtr) += ygdb_r + pygdb_r; *(here->HSM2GPspPtr +1) += ygsb_i + pygsb_i; *(here->HSM2GPspPtr) += ygsb_r + pygsb_r; *(here->HSM2GPbpPtr +1) += ygbb_i + pygbb_i; *(here->HSM2GPbpPtr) += ygbb_r + pygbb_r; *(here->HSM2DPdpPtr +1) += yddb_i + pyddb_i; *(here->HSM2DPdpPtr) += yddb_r + pyddb_r + gdpr; *(here->HSM2DPdPtr) -= gdpr; *(here->HSM2DPgpPtr +1) += ydgb_i + pydgb_i; *(here->HSM2DPgpPtr) += ydgb_r + pydgb_r; *(here->HSM2DPspPtr +1) += ydsb_i + pydsb_i; *(here->HSM2DPspPtr) += ydsb_r + pydsb_r; *(here->HSM2DPbpPtr +1) += ydbb_i + pydbb_i; *(here->HSM2DPbpPtr) += ydbb_r + pydbb_r; *(here->HSM2DdpPtr) -= gdpr; *(here->HSM2DdPtr) += gdpr; *(here->HSM2SPdpPtr +1) += ysdb_i + pysdb_i; *(here->HSM2SPdpPtr) += ysdb_r + pysdb_r; *(here->HSM2SPgpPtr +1) += ysgb_i + pysgb_i; *(here->HSM2SPgpPtr) += ysgb_r + pysgb_r; *(here->HSM2SPspPtr +1) += yssb_i + pyssb_i; *(here->HSM2SPspPtr) += yssb_r + pyssb_r + gspr; *(here->HSM2SPsPtr) -= gspr ; *(here->HSM2SPbpPtr +1) += ysbb_i + pysbb_i; *(here->HSM2SPbpPtr) += ysbb_r + pysbb_r; *(here->HSM2SspPtr) -= gspr; *(here->HSM2SsPtr) += gspr; *(here->HSM2BPdpPtr +1) += ybdb_i + pybdb_i; *(here->HSM2BPdpPtr) += ybdb_r + pybdb_r; *(here->HSM2BPgpPtr +1) += ybgb_i + pybgb_i; *(here->HSM2BPgpPtr) += ybgb_r + pybgb_r; *(here->HSM2BPspPtr +1) += ybsb_i + pybsb_i; *(here->HSM2BPspPtr) += ybsb_r + pybsb_r; *(here->HSM2BPbpPtr +1) += ybbb_i + pybbb_i; *(here->HSM2BPbpPtr) += ybbb_r + pybbb_r; if (here->HSM2_corbnet == 1) { *(here->HSM2DPdbPtr +1) += pxcbdb_i; *(here->HSM2DPdbPtr) -= gbd; *(here->HSM2SPsbPtr +1) += pxcbsb_i; *(here->HSM2SPsbPtr) -= gbs; *(here->HSM2DBdpPtr +1) += pxcbdb_i; *(here->HSM2DBdpPtr) -= gbd; *(here->HSM2DBdbPtr +1) -= pxcbdb_i; *(here->HSM2DBdbPtr) += gbd + here->HSM2_grbpd + here->HSM2_grbdb; *(here->HSM2DBbpPtr) -= here->HSM2_grbpd; *(here->HSM2DBbPtr) -= here->HSM2_grbdb; *(here->HSM2BPdbPtr) -= here->HSM2_grbpd; *(here->HSM2BPbPtr) -= here->HSM2_grbpb; *(here->HSM2BPsbPtr) -= here->HSM2_grbps; *(here->HSM2BPbpPtr) += here->HSM2_grbpd + here->HSM2_grbps + here->HSM2_grbpb; *(here->HSM2SBspPtr +1) += pxcbsb_i; *(here->HSM2SBspPtr) -= gbs; *(here->HSM2SBbpPtr) -= here->HSM2_grbps; *(here->HSM2SBbPtr) -= here->HSM2_grbsb; *(here->HSM2SBsbPtr +1) -= pxcbsb_i; *(here->HSM2SBsbPtr) += gbs + here->HSM2_grbps + here->HSM2_grbsb; *(here->HSM2BdbPtr) -= here->HSM2_grbdb; *(here->HSM2BbpPtr) -= here->HSM2_grbpb; *(here->HSM2BsbPtr) -= here->HSM2_grbsb; *(here->HSM2BbPtr) += here->HSM2_grbsb + here->HSM2_grbdb + here->HSM2_grbpb; } } } return(OK); } ngspice-26/src/spicelib/devices/hisim2/Makefile.am0000644000265600020320000000121412264261473021461 0ustar andreasadmin## Process this file with automake to produce Makefile.in EXTRA_DIST = noinst_LTLIBRARIES = libhisim2.la libhisim2_la_SOURCES = hisim2.h \ hsm2.c \ hsm2acld.c \ hsm2ask.c \ hsm2cvtest.c \ hsm2def.h \ hsm2del.c \ hsm2dest.c \ hsm2eval.c \ hsm2evalenv.h \ hsm2ext.h \ hsm2getic.c \ hsm2init.c \ hsm2init.h \ hsm2itf.h \ hsm2ld.c \ hsm2mask.c \ hsm2mdel.c \ hsm2mpar.c \ hsm2noi.c \ hsm2par.c \ hsm2pzld.c \ hsm2set.c \ hsm2soachk.c \ hsm2temp.c \ hsm2trunc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/hisim2/hsm2mpar.c0000644000265600020320000015551212264261473021335 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2mpar.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "hsm2def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2mParam( int param, IFvalue *value, GENmodel *inMod) { HSM2model *mod = (HSM2model*)inMod; switch (param) { case HSM2_MOD_NMOS : if (value->iValue) { mod->HSM2_type = 1; mod->HSM2_type_Given = TRUE; } break; case HSM2_MOD_PMOS : if (value->iValue) { mod->HSM2_type = - 1; mod->HSM2_type_Given = TRUE; } break; case HSM2_MOD_LEVEL: mod->HSM2_level = value->iValue; mod->HSM2_level_Given = TRUE; break; case HSM2_MOD_INFO: mod->HSM2_info = value->iValue; mod->HSM2_info_Given = TRUE; break; case HSM2_MOD_NOISE: mod->HSM2_noise = value->iValue; mod->HSM2_noise_Given = TRUE; break; case HSM2_MOD_VERSION: mod->HSM2_version = value->iValue; mod->HSM2_version_Given = TRUE; break; case HSM2_MOD_SHOW: mod->HSM2_show = value->iValue; mod->HSM2_show_Given = TRUE; break; case HSM2_MOD_CORSRD: mod->HSM2_corsrd = value->iValue; mod->HSM2_corsrd_Given = TRUE; break; case HSM2_MOD_CORG: mod->HSM2_corg = value->iValue; mod->HSM2_corg_Given = TRUE; break; case HSM2_MOD_COIPRV: mod->HSM2_coiprv = value->iValue; mod->HSM2_coiprv_Given = TRUE; break; case HSM2_MOD_COPPRV: mod->HSM2_copprv = value->iValue; mod->HSM2_copprv_Given = TRUE; break; case HSM2_MOD_COADOV: mod->HSM2_coadov = value->iValue; mod->HSM2_coadov_Given = TRUE; break; case HSM2_MOD_COISUB: mod->HSM2_coisub = value->iValue; mod->HSM2_coisub_Given = TRUE; break; case HSM2_MOD_COIIGS: mod->HSM2_coiigs = value->iValue; mod->HSM2_coiigs_Given = TRUE; break; case HSM2_MOD_COGIDL: mod->HSM2_cogidl = value->iValue; mod->HSM2_cogidl_Given = TRUE; break; case HSM2_MOD_COOVLP: mod->HSM2_coovlp = value->iValue; mod->HSM2_coovlp_Given = TRUE; break; case HSM2_MOD_COFLICK: mod->HSM2_coflick = value->iValue; mod->HSM2_coflick_Given = TRUE; break; case HSM2_MOD_COISTI: mod->HSM2_coisti = value->iValue; mod->HSM2_coisti_Given = TRUE; break; case HSM2_MOD_CONQS: /* HiSIM2 */ mod->HSM2_conqs = value->iValue; mod->HSM2_conqs_Given = TRUE; break; case HSM2_MOD_CORBNET: mod->HSM2_corbnet = value->iValue; mod->HSM2_corbnet_Given = TRUE; break; case HSM2_MOD_COTHRML: mod->HSM2_cothrml = value->iValue; mod->HSM2_cothrml_Given = TRUE; break; case HSM2_MOD_COIGN: mod->HSM2_coign = value->iValue; mod->HSM2_coign_Given = TRUE; break; case HSM2_MOD_CODFM: mod->HSM2_codfm = value->iValue; mod->HSM2_codfm_Given = TRUE; break; case HSM2_MOD_CORECIP: mod->HSM2_corecip = value->iValue; mod->HSM2_corecip_Given = TRUE; break; case HSM2_MOD_COQY: mod->HSM2_coqy = value->iValue; mod->HSM2_coqy_Given = TRUE; break; case HSM2_MOD_COQOVSM: mod->HSM2_coqovsm = value->iValue; mod->HSM2_coqovsm_Given = TRUE; break; case HSM2_MOD_COERRREP: mod->HSM2_coerrrep = value->iValue; mod->HSM2_coerrrep_Given = TRUE; break; case HSM2_MOD_VMAX: mod->HSM2_vmax = value->rValue; mod->HSM2_vmax_Given = TRUE; break; case HSM2_MOD_BGTMP1: mod->HSM2_bgtmp1 = value->rValue; mod->HSM2_bgtmp1_Given = TRUE; break; case HSM2_MOD_BGTMP2: mod->HSM2_bgtmp2 = value->rValue; mod->HSM2_bgtmp2_Given = TRUE; break; case HSM2_MOD_EG0: mod->HSM2_eg0 = value->rValue; mod->HSM2_eg0_Given = TRUE; break; case HSM2_MOD_TOX: mod->HSM2_tox = value->rValue; mod->HSM2_tox_Given = TRUE; break; case HSM2_MOD_XLD: mod->HSM2_xld = value->rValue; mod->HSM2_xld_Given = TRUE; break; case HSM2_MOD_LOVER: mod->HSM2_lover = value->rValue; mod->HSM2_lover_Given = TRUE; break; case HSM2_MOD_DDLTMAX: /* Vdseff */ mod->HSM2_ddltmax = value->rValue; mod->HSM2_ddltmax_Given = TRUE; break; case HSM2_MOD_DDLTSLP: /* Vdseff */ mod->HSM2_ddltslp = value->rValue; mod->HSM2_ddltslp_Given = TRUE; break; case HSM2_MOD_DDLTICT: /* Vdseff */ mod->HSM2_ddltict = value->rValue; mod->HSM2_ddltict_Given = TRUE; break; case HSM2_MOD_VFBOVER: mod->HSM2_vfbover = value->rValue; mod->HSM2_vfbover_Given = TRUE; break; case HSM2_MOD_NOVER: mod->HSM2_nover = value->rValue; mod->HSM2_nover_Given = TRUE; break; case HSM2_MOD_XWD: mod->HSM2_xwd = value->rValue; mod->HSM2_xwd_Given = TRUE; break; case HSM2_MOD_XL: mod->HSM2_xl = value->rValue; mod->HSM2_xl_Given = TRUE; break; case HSM2_MOD_XW: mod->HSM2_xw = value->rValue; mod->HSM2_xw_Given = TRUE; break; case HSM2_MOD_SAREF: mod->HSM2_saref = value->rValue; mod->HSM2_saref_Given = TRUE; break; case HSM2_MOD_SBREF: mod->HSM2_sbref = value->rValue; mod->HSM2_sbref_Given = TRUE; break; case HSM2_MOD_LL: mod->HSM2_ll = value->rValue; mod->HSM2_ll_Given = TRUE; break; case HSM2_MOD_LLD: mod->HSM2_lld = value->rValue; mod->HSM2_lld_Given = TRUE; break; case HSM2_MOD_LLN: mod->HSM2_lln = value->rValue; mod->HSM2_lln_Given = TRUE; break; case HSM2_MOD_WL: mod->HSM2_wl = value->rValue; mod->HSM2_wl_Given = TRUE; break; case HSM2_MOD_WL1: mod->HSM2_wl1 = value->rValue; mod->HSM2_wl1_Given = TRUE; break; case HSM2_MOD_WL1P: mod->HSM2_wl1p = value->rValue; mod->HSM2_wl1p_Given = TRUE; break; case HSM2_MOD_WL2: mod->HSM2_wl2 = value->rValue; mod->HSM2_wl2_Given = TRUE; break; case HSM2_MOD_WL2P: mod->HSM2_wl2p = value->rValue; mod->HSM2_wl2p_Given = TRUE; break; case HSM2_MOD_WLD: mod->HSM2_wld = value->rValue; mod->HSM2_wld_Given = TRUE; break; case HSM2_MOD_WLN: mod->HSM2_wln = value->rValue; mod->HSM2_wln_Given = TRUE; break; case HSM2_MOD_XQY: mod->HSM2_xqy = value->rValue; mod->HSM2_xqy_Given = TRUE; break; case HSM2_MOD_XQY1: mod->HSM2_xqy1 = value->rValue; mod->HSM2_xqy1_Given = TRUE; break; case HSM2_MOD_XQY2: mod->HSM2_xqy2 = value->rValue; mod->HSM2_xqy2_Given = TRUE; break; case HSM2_MOD_QYRAT: mod->HSM2_qyrat = value->rValue; mod->HSM2_qyrat_Given = TRUE; break; case HSM2_MOD_RS: mod->HSM2_rs = value->rValue; mod->HSM2_rs_Given = TRUE; break; case HSM2_MOD_RD: mod->HSM2_rd = value->rValue; mod->HSM2_rd_Given = TRUE; break; case HSM2_MOD_RSH: mod->HSM2_rsh = value->rValue; mod->HSM2_rsh_Given = TRUE; break; case HSM2_MOD_RSHG: mod->HSM2_rshg = value->rValue; mod->HSM2_rshg_Given = TRUE; break; /* case HSM2_MOD_NGCON: */ /* mod->HSM2_ngcon = value->rValue; */ /* mod->HSM2_ngcon_Given = TRUE; */ /* break; */ /* case HSM2_MOD_XGW: */ /* mod->HSM2_xgw = value->rValue; */ /* mod->HSM2_xgw_Given = TRUE; */ /* break; */ /* case HSM2_MOD_XGL: */ /* mod->HSM2_xgl = value->rValue; */ /* mod->HSM2_xgl_Given = TRUE; */ /* break; */ /* case HSM2_MOD_NF: */ /* mod->HSM2_nf = value->rValue; */ /* mod->HSM2_nf_Given = TRUE; */ /* break; */ case HSM2_MOD_VFBC: mod->HSM2_vfbc = value->rValue; mod->HSM2_vfbc_Given = TRUE; break; case HSM2_MOD_VBI: mod->HSM2_vbi = value->rValue; mod->HSM2_vbi_Given = TRUE; break; case HSM2_MOD_NSUBC: mod->HSM2_nsubc = value->rValue; mod->HSM2_nsubc_Given = TRUE; break; case HSM2_MOD_VFBCL: mod->HSM2_vfbcl = value->rValue; mod->HSM2_vfbcl_Given = TRUE; break; case HSM2_MOD_VFBCLP: mod->HSM2_vfbclp = value->rValue; mod->HSM2_vfbclp_Given = TRUE; break; case HSM2_MOD_PARL2: mod->HSM2_parl2 = value->rValue; mod->HSM2_parl2_Given = TRUE; break; case HSM2_MOD_LP: mod->HSM2_lp = value->rValue; mod->HSM2_lp_Given = TRUE; break; case HSM2_MOD_NSUBP: mod->HSM2_nsubp = value->rValue; mod->HSM2_nsubp_Given = TRUE; break; case HSM2_MOD_NSUBPL: mod->HSM2_nsubpl = value->rValue; mod->HSM2_nsubpl_Given = TRUE; break; case HSM2_MOD_NSUBPFAC: mod->HSM2_nsubpfac = value->rValue; mod->HSM2_nsubpfac_Given = TRUE; break; case HSM2_MOD_NSUBPDLT: mod->HSM2_nsubpdlt = value->rValue; mod->HSM2_nsubpdlt_Given = TRUE; break; case HSM2_MOD_NSUBPW: mod->HSM2_nsubpw = value->rValue; mod->HSM2_nsubpw_Given = TRUE; break; case HSM2_MOD_NSUBPWP: mod->HSM2_nsubpwp = value->rValue; mod->HSM2_nsubpwp_Given = TRUE; break; case HSM2_MOD_SCP1: mod->HSM2_scp1 = value->rValue; mod->HSM2_scp1_Given = TRUE; break; case HSM2_MOD_SCP2: mod->HSM2_scp2 = value->rValue; mod->HSM2_scp2_Given = TRUE; break; case HSM2_MOD_SCP3: mod->HSM2_scp3 = value->rValue; mod->HSM2_scp3_Given = TRUE; break; case HSM2_MOD_SC1: mod->HSM2_sc1 = value->rValue; mod->HSM2_sc1_Given = TRUE; break; case HSM2_MOD_SC2: mod->HSM2_sc2 = value->rValue; mod->HSM2_sc2_Given = TRUE; break; case HSM2_MOD_SC3: mod->HSM2_sc3 = value->rValue; mod->HSM2_sc3_Given = TRUE; break; case HSM2_MOD_SC4: mod->HSM2_sc4 = value->rValue; mod->HSM2_sc4_Given = TRUE; break; case HSM2_MOD_PGD1: mod->HSM2_pgd1 = value->rValue; mod->HSM2_pgd1_Given = TRUE; break; case HSM2_MOD_PGD2: mod->HSM2_pgd2 = value->rValue; mod->HSM2_pgd2_Given = TRUE; break; //case HSM2_MOD_PGD3: // mod->HSM2_pgd3 = value->rValue; // mod->HSM2_pgd3_Given = TRUE; // break; case HSM2_MOD_PGD4: mod->HSM2_pgd4 = value->rValue; mod->HSM2_pgd4_Given = TRUE; break; case HSM2_MOD_NDEP: mod->HSM2_ndep = value->rValue; mod->HSM2_ndep_Given = TRUE; break; case HSM2_MOD_NDEPL: mod->HSM2_ndepl = value->rValue; mod->HSM2_ndepl_Given = TRUE; break; case HSM2_MOD_NDEPLP: mod->HSM2_ndeplp = value->rValue; mod->HSM2_ndeplp_Given = TRUE; break; case HSM2_MOD_NDEPW: mod->HSM2_ndepw = value->rValue; mod->HSM2_ndepw_Given = TRUE; break; case HSM2_MOD_NDEPWP: mod->HSM2_ndepwp = value->rValue; mod->HSM2_ndepwp_Given = TRUE; break; case HSM2_MOD_NINV: mod->HSM2_ninv = value->rValue; mod->HSM2_ninv_Given = TRUE; break; case HSM2_MOD_NINVD: mod->HSM2_ninvd = value->rValue; mod->HSM2_ninvd_Given = TRUE; break; case HSM2_MOD_MUECB0: mod->HSM2_muecb0 = value->rValue; mod->HSM2_muecb0_Given = TRUE; break; case HSM2_MOD_MUECB1: mod->HSM2_muecb1 = value->rValue; mod->HSM2_muecb1_Given = TRUE; break; case HSM2_MOD_MUEPH1: mod->HSM2_mueph1 = value->rValue; mod->HSM2_mueph1_Given = TRUE; break; case HSM2_MOD_MUEPH0: mod->HSM2_mueph0 = value->rValue; mod->HSM2_mueph0_Given = TRUE; break; case HSM2_MOD_MUEPHW: mod->HSM2_muephw = value->rValue; mod->HSM2_muephw_Given = TRUE; break; case HSM2_MOD_MUEPWP: mod->HSM2_muepwp = value->rValue; mod->HSM2_muepwp_Given = TRUE; break; case HSM2_MOD_MUEPWD: mod->HSM2_muepwd = value->rValue; mod->HSM2_muepwd_Given = TRUE; break; case HSM2_MOD_MUEPHL: mod->HSM2_muephl = value->rValue; mod->HSM2_muephl_Given = TRUE; break; case HSM2_MOD_MUEPLP: mod->HSM2_mueplp = value->rValue; mod->HSM2_mueplp_Given = TRUE; break; case HSM2_MOD_MUEPLD: mod->HSM2_muepld = value->rValue; mod->HSM2_muepld_Given = TRUE; break; case HSM2_MOD_MUEPHS: mod->HSM2_muephs = value->rValue; mod->HSM2_muephs_Given = TRUE; break; case HSM2_MOD_MUEPSP: mod->HSM2_muepsp = value->rValue; mod->HSM2_muepsp_Given = TRUE; break; case HSM2_MOD_VTMP: mod->HSM2_vtmp = value->rValue; mod->HSM2_vtmp_Given = TRUE; break; case HSM2_MOD_WVTH0: mod->HSM2_wvth0 = value->rValue; mod->HSM2_wvth0_Given = TRUE; break; case HSM2_MOD_MUESR1: mod->HSM2_muesr1 = value->rValue; mod->HSM2_muesr1_Given = TRUE; break; case HSM2_MOD_MUESR0: mod->HSM2_muesr0 = value->rValue; mod->HSM2_muesr0_Given = TRUE; break; case HSM2_MOD_MUESRL: mod->HSM2_muesrl = value->rValue; mod->HSM2_muesrl_Given = TRUE; break; case HSM2_MOD_MUESLP: mod->HSM2_mueslp = value->rValue; mod->HSM2_mueslp_Given = TRUE; break; case HSM2_MOD_MUESRW: mod->HSM2_muesrw = value->rValue; mod->HSM2_muesrw_Given = TRUE; break; case HSM2_MOD_MUESWP: mod->HSM2_mueswp = value->rValue; mod->HSM2_mueswp_Given = TRUE; break; case HSM2_MOD_BB: mod->HSM2_bb = value->rValue; mod->HSM2_bb_Given = TRUE; break; case HSM2_MOD_SUB1: mod->HSM2_sub1 = value->rValue; mod->HSM2_sub1_Given = TRUE; break; case HSM2_MOD_SUB2: mod->HSM2_sub2 = value->rValue; mod->HSM2_sub2_Given = TRUE; break; case HSM2_MOD_SVGS: mod->HSM2_svgs = value->rValue; mod->HSM2_svgs_Given = TRUE; break; case HSM2_MOD_SVBS: mod->HSM2_svbs = value->rValue; mod->HSM2_svbs_Given = TRUE; break; case HSM2_MOD_SVBSL: mod->HSM2_svbsl = value->rValue; mod->HSM2_svbsl_Given = TRUE; break; case HSM2_MOD_SVDS: mod->HSM2_svds = value->rValue; mod->HSM2_svds_Given = TRUE; break; case HSM2_MOD_SLG: mod->HSM2_slg = value->rValue; mod->HSM2_slg_Given = TRUE; break; case HSM2_MOD_SUB1L: mod->HSM2_sub1l = value->rValue; mod->HSM2_sub1l_Given = TRUE; break; case HSM2_MOD_SUB2L: mod->HSM2_sub2l = value->rValue; mod->HSM2_sub2l_Given = TRUE; break; case HSM2_MOD_SVGSL: mod->HSM2_svgsl = value->rValue; mod->HSM2_svgsl_Given = TRUE; break; case HSM2_MOD_SVGSLP: mod->HSM2_svgslp = value->rValue; mod->HSM2_svgslp_Given = TRUE; break; case HSM2_MOD_SVGSWP: mod->HSM2_svgswp = value->rValue; mod->HSM2_svgswp_Given = TRUE; break; case HSM2_MOD_SVGSW: mod->HSM2_svgsw = value->rValue; mod->HSM2_svgsw_Given = TRUE; break; case HSM2_MOD_SVBSLP: mod->HSM2_svbslp = value->rValue; mod->HSM2_svbslp_Given = TRUE; break; case HSM2_MOD_SLGL: mod->HSM2_slgl = value->rValue; mod->HSM2_slgl_Given = TRUE; break; case HSM2_MOD_SLGLP: mod->HSM2_slglp = value->rValue; mod->HSM2_slglp_Given = TRUE; break; case HSM2_MOD_SUB1LP: mod->HSM2_sub1lp = value->rValue; mod->HSM2_sub1lp_Given = TRUE; break; case HSM2_MOD_NSTI: mod->HSM2_nsti = value->rValue; mod->HSM2_nsti_Given = TRUE; break; case HSM2_MOD_WSTI: mod->HSM2_wsti = value->rValue; mod->HSM2_wsti_Given = TRUE; break; case HSM2_MOD_WSTIL: mod->HSM2_wstil = value->rValue; mod->HSM2_wstil_Given = TRUE; break; case HSM2_MOD_WSTILP: mod->HSM2_wstilp = value->rValue; mod->HSM2_wstilp_Given = TRUE; break; case HSM2_MOD_WSTIW: mod->HSM2_wstiw = value->rValue; mod->HSM2_wstiw_Given = TRUE; break; case HSM2_MOD_WSTIWP: mod->HSM2_wstiwp = value->rValue; mod->HSM2_wstiwp_Given = TRUE; break; case HSM2_MOD_SCSTI1: mod->HSM2_scsti1 = value->rValue; mod->HSM2_scsti1_Given = TRUE; break; case HSM2_MOD_SCSTI2: mod->HSM2_scsti2 = value->rValue; mod->HSM2_scsti2_Given = TRUE; break; case HSM2_MOD_VTHSTI: mod->HSM2_vthsti = value->rValue; mod->HSM2_vthsti_Given = TRUE; break; case HSM2_MOD_VDSTI: mod->HSM2_vdsti = value->rValue; mod->HSM2_vdsti_Given = TRUE; break; case HSM2_MOD_MUESTI1: mod->HSM2_muesti1 = value->rValue; mod->HSM2_muesti1_Given = TRUE; break; case HSM2_MOD_MUESTI2: mod->HSM2_muesti2 = value->rValue; mod->HSM2_muesti2_Given = TRUE; break; case HSM2_MOD_MUESTI3: mod->HSM2_muesti3 = value->rValue; mod->HSM2_muesti3_Given = TRUE; break; case HSM2_MOD_NSUBPSTI1: mod->HSM2_nsubpsti1 = value->rValue; mod->HSM2_nsubpsti1_Given = TRUE; break; case HSM2_MOD_NSUBPSTI2: mod->HSM2_nsubpsti2 = value->rValue; mod->HSM2_nsubpsti2_Given = TRUE; break; case HSM2_MOD_NSUBPSTI3: mod->HSM2_nsubpsti3 = value->rValue; mod->HSM2_nsubpsti3_Given = TRUE; break; case HSM2_MOD_NSUBCSTI1: mod->HSM2_nsubcsti1 = value->rValue; mod->HSM2_nsubcsti1_Given = TRUE; break; case HSM2_MOD_NSUBCSTI2: mod->HSM2_nsubcsti2 = value->rValue; mod->HSM2_nsubcsti2_Given = TRUE; break; case HSM2_MOD_NSUBCSTI3: mod->HSM2_nsubcsti3 = value->rValue; mod->HSM2_nsubcsti3_Given = TRUE; break; case HSM2_MOD_LPEXT: mod->HSM2_lpext = value->rValue; mod->HSM2_lpext_Given = TRUE; break; case HSM2_MOD_NPEXT: mod->HSM2_npext = value->rValue; mod->HSM2_npext_Given = TRUE; break; case HSM2_MOD_NPEXTW: mod->HSM2_npextw = value->rValue; mod->HSM2_npextw_Given = TRUE; break; case HSM2_MOD_NPEXTWP: mod->HSM2_npextwp = value->rValue; mod->HSM2_npextwp_Given = TRUE; break; case HSM2_MOD_SCP22: mod->HSM2_scp22 = value->rValue; mod->HSM2_scp22_Given = TRUE; break; case HSM2_MOD_SCP21: mod->HSM2_scp21 = value->rValue; mod->HSM2_scp21_Given = TRUE; break; case HSM2_MOD_BS1: mod->HSM2_bs1 = value->rValue; mod->HSM2_bs1_Given = TRUE; break; case HSM2_MOD_BS2: mod->HSM2_bs2 = value->rValue; mod->HSM2_bs2_Given = TRUE; break; case HSM2_MOD_CGSO: mod->HSM2_cgso = value->rValue; mod->HSM2_cgso_Given = TRUE; break; case HSM2_MOD_CGDO: mod->HSM2_cgdo = value->rValue; mod->HSM2_cgdo_Given = TRUE; break; case HSM2_MOD_CGBO: mod->HSM2_cgbo = value->rValue; mod->HSM2_cgbo_Given = TRUE; break; case HSM2_MOD_TPOLY: mod->HSM2_tpoly = value->rValue; mod->HSM2_tpoly_Given = TRUE; break; case HSM2_MOD_JS0: mod->HSM2_js0 = value->rValue; mod->HSM2_js0_Given = TRUE; break; case HSM2_MOD_JS0SW: mod->HSM2_js0sw = value->rValue; mod->HSM2_js0sw_Given = TRUE; break; case HSM2_MOD_NJ: mod->HSM2_nj = value->rValue; mod->HSM2_nj_Given = TRUE; break; case HSM2_MOD_NJSW: mod->HSM2_njsw = value->rValue; mod->HSM2_njsw_Given = TRUE; break; case HSM2_MOD_XTI: mod->HSM2_xti = value->rValue; mod->HSM2_xti_Given = TRUE; break; case HSM2_MOD_CJ: mod->HSM2_cj = value->rValue; mod->HSM2_cj_Given = TRUE; break; case HSM2_MOD_CJSW: mod->HSM2_cjsw = value->rValue; mod->HSM2_cjsw_Given = TRUE; break; case HSM2_MOD_CJSWG: mod->HSM2_cjswg = value->rValue; mod->HSM2_cjswg_Given = TRUE; break; case HSM2_MOD_MJ: mod->HSM2_mj = value->rValue; mod->HSM2_mj_Given = TRUE; break; case HSM2_MOD_MJSW: mod->HSM2_mjsw = value->rValue; mod->HSM2_mjsw_Given = TRUE; break; case HSM2_MOD_MJSWG: mod->HSM2_mjswg = value->rValue; mod->HSM2_mjswg_Given = TRUE; break; case HSM2_MOD_PB: mod->HSM2_pb = value->rValue; mod->HSM2_pb_Given = TRUE; break; case HSM2_MOD_PBSW: mod->HSM2_pbsw = value->rValue; mod->HSM2_pbsw_Given = TRUE; break; case HSM2_MOD_PBSWG: mod->HSM2_pbswg = value->rValue; mod->HSM2_pbswg_Given = TRUE; break; case HSM2_MOD_TCJBD: mod->HSM2_tcjbd = value->rValue; mod->HSM2_tcjbd_Given = TRUE; break; case HSM2_MOD_TCJBS: mod->HSM2_tcjbs = value->rValue; mod->HSM2_tcjbs_Given = TRUE; break; case HSM2_MOD_TCJBDSW: mod->HSM2_tcjbdsw = value->rValue; mod->HSM2_tcjbdsw_Given = TRUE; break; case HSM2_MOD_TCJBSSW: mod->HSM2_tcjbssw = value->rValue; mod->HSM2_tcjbssw_Given = TRUE; break; case HSM2_MOD_TCJBDSWG: mod->HSM2_tcjbdswg = value->rValue; mod->HSM2_tcjbdswg_Given = TRUE; break; case HSM2_MOD_TCJBSSWG: mod->HSM2_tcjbsswg = value->rValue; mod->HSM2_tcjbsswg_Given = TRUE; break; case HSM2_MOD_XTI2: mod->HSM2_xti2 = value->rValue; mod->HSM2_xti2_Given = TRUE; break; case HSM2_MOD_CISB: mod->HSM2_cisb = value->rValue; mod->HSM2_cisb_Given = TRUE; break; case HSM2_MOD_CVB: mod->HSM2_cvb = value->rValue; mod->HSM2_cvb_Given = TRUE; break; case HSM2_MOD_CTEMP: mod->HSM2_ctemp = value->rValue; mod->HSM2_ctemp_Given = TRUE; break; case HSM2_MOD_CISBK: mod->HSM2_cisbk = value->rValue; mod->HSM2_cisbk_Given = TRUE; break; case HSM2_MOD_CVBK: mod->HSM2_cvbk = value->rValue; mod->HSM2_cvbk_Given = TRUE; break; case HSM2_MOD_DIVX: mod->HSM2_divx = value->rValue; mod->HSM2_divx_Given = TRUE; break; case HSM2_MOD_CLM1: mod->HSM2_clm1 = value->rValue; mod->HSM2_clm1_Given = TRUE; break; case HSM2_MOD_CLM2: mod->HSM2_clm2 = value->rValue; mod->HSM2_clm2_Given = TRUE; break; case HSM2_MOD_CLM3: mod->HSM2_clm3 = value->rValue; mod->HSM2_clm3_Given = TRUE; break; case HSM2_MOD_CLM5: mod->HSM2_clm5 = value->rValue; mod->HSM2_clm5_Given = TRUE; break; case HSM2_MOD_CLM6: mod->HSM2_clm6 = value->rValue; mod->HSM2_clm6_Given = TRUE; break; case HSM2_MOD_MUETMP: mod->HSM2_muetmp = value->rValue; mod->HSM2_muetmp_Given = TRUE; break; case HSM2_MOD_VOVER: mod->HSM2_vover = value->rValue; mod->HSM2_vover_Given = TRUE; break; case HSM2_MOD_VOVERP: mod->HSM2_voverp = value->rValue; mod->HSM2_voverp_Given = TRUE; break; case HSM2_MOD_VOVERS: mod->HSM2_vovers = value->rValue; mod->HSM2_vovers_Given = TRUE; break; case HSM2_MOD_VOVERSP: mod->HSM2_voversp = value->rValue; mod->HSM2_voversp_Given = TRUE; break; case HSM2_MOD_WFC: mod->HSM2_wfc = value->rValue; mod->HSM2_wfc_Given = TRUE; break; case HSM2_MOD_NSUBCW: mod->HSM2_nsubcw = value->rValue; mod->HSM2_nsubcw_Given = TRUE; break; case HSM2_MOD_NSUBCWP: mod->HSM2_nsubcwp = value->rValue; mod->HSM2_nsubcwp_Given = TRUE; break; case HSM2_MOD_NSUBCMAX: mod->HSM2_nsubcmax = value->rValue; mod->HSM2_nsubcmax_Given = TRUE; break; case HSM2_MOD_QME1: mod->HSM2_qme1 = value->rValue; mod->HSM2_qme1_Given = TRUE; break; case HSM2_MOD_QME2: mod->HSM2_qme2 = value->rValue; mod->HSM2_qme2_Given = TRUE; break; case HSM2_MOD_QME3: mod->HSM2_qme3 = value->rValue; mod->HSM2_qme3_Given = TRUE; break; case HSM2_MOD_GIDL1: mod->HSM2_gidl1 = value->rValue; mod->HSM2_gidl1_Given = TRUE; break; case HSM2_MOD_GIDL2: mod->HSM2_gidl2 = value->rValue; mod->HSM2_gidl2_Given = TRUE; break; case HSM2_MOD_GIDL3: mod->HSM2_gidl3 = value->rValue; mod->HSM2_gidl3_Given = TRUE; break; case HSM2_MOD_GIDL4: mod->HSM2_gidl4 = value->rValue; mod->HSM2_gidl4_Given = TRUE; break; case HSM2_MOD_GIDL5: mod->HSM2_gidl5 = value->rValue; mod->HSM2_gidl5_Given = TRUE; break; case HSM2_MOD_GIDL6: mod->HSM2_gidl6 = value->rValue; mod->HSM2_gidl6_Given = TRUE; break; case HSM2_MOD_GIDL7: mod->HSM2_gidl7 = value->rValue; mod->HSM2_gidl7_Given = TRUE; break; case HSM2_MOD_GLEAK1: mod->HSM2_gleak1 = value->rValue; mod->HSM2_gleak1_Given = TRUE; break; case HSM2_MOD_GLEAK2: mod->HSM2_gleak2 = value->rValue; mod->HSM2_gleak2_Given = TRUE; break; case HSM2_MOD_GLEAK3: mod->HSM2_gleak3 = value->rValue; mod->HSM2_gleak3_Given = TRUE; break; case HSM2_MOD_GLEAK4: mod->HSM2_gleak4 = value->rValue; mod->HSM2_gleak4_Given = TRUE; break; case HSM2_MOD_GLEAK5: mod->HSM2_gleak5 = value->rValue; mod->HSM2_gleak5_Given = TRUE; break; case HSM2_MOD_GLEAK6: mod->HSM2_gleak6 = value->rValue; mod->HSM2_gleak6_Given = TRUE; break; case HSM2_MOD_GLEAK7: mod->HSM2_gleak7 = value->rValue; mod->HSM2_gleak7_Given = TRUE; break; case HSM2_MOD_GLKSD1: mod->HSM2_glksd1 = value->rValue; mod->HSM2_glksd1_Given = TRUE; break; case HSM2_MOD_GLKSD2: mod->HSM2_glksd2 = value->rValue; mod->HSM2_glksd2_Given = TRUE; break; case HSM2_MOD_GLKSD3: mod->HSM2_glksd3 = value->rValue; mod->HSM2_glksd3_Given = TRUE; break; case HSM2_MOD_GLKB1: mod->HSM2_glkb1 = value->rValue; mod->HSM2_glkb1_Given = TRUE; break; case HSM2_MOD_GLKB2: mod->HSM2_glkb2 = value->rValue; mod->HSM2_glkb2_Given = TRUE; break; case HSM2_MOD_GLKB3: mod->HSM2_glkb3 = value->rValue; mod->HSM2_glkb3_Given = TRUE; break; case HSM2_MOD_EGIG: mod->HSM2_egig = value->rValue; mod->HSM2_egig_Given = TRUE; break; case HSM2_MOD_IGTEMP2: mod->HSM2_igtemp2 = value->rValue; mod->HSM2_igtemp2_Given = TRUE; break; case HSM2_MOD_IGTEMP3: mod->HSM2_igtemp3 = value->rValue; mod->HSM2_igtemp3_Given = TRUE; break; case HSM2_MOD_VZADD0: mod->HSM2_vzadd0 = value->rValue; mod->HSM2_vzadd0_Given = TRUE; break; case HSM2_MOD_PZADD0: mod->HSM2_pzadd0 = value->rValue; mod->HSM2_pzadd0_Given = TRUE; break; case HSM2_MOD_NFTRP: mod->HSM2_nftrp = value->rValue; mod->HSM2_nftrp_Given = TRUE; break; case HSM2_MOD_NFALP: mod->HSM2_nfalp = value->rValue; mod->HSM2_nfalp_Given = TRUE; break; case HSM2_MOD_CIT: mod->HSM2_cit = value->rValue; mod->HSM2_cit_Given = TRUE; break; case HSM2_MOD_FALPH: mod->HSM2_falph = value->rValue; mod->HSM2_falph_Given = TRUE; break; case HSM2_MOD_KAPPA: mod->HSM2_kappa = value->rValue; mod->HSM2_kappa_Given = TRUE; break; case HSM2_MOD_VDIFFJ: mod->HSM2_vdiffj = value->rValue; mod->HSM2_vdiffj_Given = TRUE; break; case HSM2_MOD_DLY1: mod->HSM2_dly1 = value->rValue; mod->HSM2_dly1_Given = TRUE; break; case HSM2_MOD_DLY2: mod->HSM2_dly2 = value->rValue; mod->HSM2_dly2_Given = TRUE; break; case HSM2_MOD_DLY3: mod->HSM2_dly3 = value->rValue; mod->HSM2_dly3_Given = TRUE; break; case HSM2_MOD_TNOM: mod->HSM2_tnom = value->rValue; mod->HSM2_tnom_Given = TRUE; break; case HSM2_MOD_OVSLP: mod->HSM2_ovslp = value->rValue; mod->HSM2_ovslp_Given = TRUE; break; case HSM2_MOD_OVMAG: mod->HSM2_ovmag = value->rValue; mod->HSM2_ovmag_Given = TRUE; break; case HSM2_MOD_GBMIN: mod->HSM2_gbmin = value->rValue; mod->HSM2_gbmin_Given = TRUE; break; case HSM2_MOD_RBPB: mod->HSM2_rbpb = value->rValue; mod->HSM2_rbpb_Given = TRUE; break; case HSM2_MOD_RBPD: mod->HSM2_rbpd = value->rValue; mod->HSM2_rbpd_Given = TRUE; break; case HSM2_MOD_RBPS: mod->HSM2_rbps = value->rValue; mod->HSM2_rbps_Given = TRUE; break; case HSM2_MOD_RBDB: mod->HSM2_rbdb = value->rValue; mod->HSM2_rbdb_Given = TRUE; break; case HSM2_MOD_RBSB: mod->HSM2_rbsb = value->rValue; mod->HSM2_rbsb_Given = TRUE; break; case HSM2_MOD_IBPC1: mod->HSM2_ibpc1 = value->rValue; mod->HSM2_ibpc1_Given = TRUE; break; case HSM2_MOD_IBPC2: mod->HSM2_ibpc2 = value->rValue; mod->HSM2_ibpc2_Given = TRUE; break; case HSM2_MOD_MPHDFM: mod->HSM2_mphdfm = value->rValue; mod->HSM2_mphdfm_Given = TRUE; break; case HSM2_MOD_PTL: mod->HSM2_ptl = value->rValue; mod->HSM2_ptl_Given = TRUE; break; case HSM2_MOD_PTP: mod->HSM2_ptp = value->rValue; mod->HSM2_ptp_Given = TRUE; break; case HSM2_MOD_PT2: mod->HSM2_pt2 = value->rValue; mod->HSM2_pt2_Given = TRUE; break; case HSM2_MOD_PTLP: mod->HSM2_ptlp = value->rValue; mod->HSM2_ptlp_Given = TRUE; break; case HSM2_MOD_GDL: mod->HSM2_gdl = value->rValue; mod->HSM2_gdl_Given = TRUE; break; case HSM2_MOD_GDLP: mod->HSM2_gdlp = value->rValue; mod->HSM2_gdlp_Given = TRUE; break; case HSM2_MOD_GDLD: mod->HSM2_gdld = value->rValue; mod->HSM2_gdld_Given = TRUE; break; case HSM2_MOD_PT4: mod->HSM2_pt4 = value->rValue; mod->HSM2_pt4_Given = TRUE; break; case HSM2_MOD_PT4P: mod->HSM2_pt4p = value->rValue; mod->HSM2_pt4p_Given = TRUE; break; case HSM2_MOD_MUEPHL2: mod->HSM2_muephl2 = value->rValue; mod->HSM2_muephl2_Given = TRUE; break; case HSM2_MOD_MUEPLP2: mod->HSM2_mueplp2 = value->rValue; mod->HSM2_mueplp2_Given = TRUE; break; case HSM2_MOD_NSUBCW2: mod->HSM2_nsubcw2 = value->rValue; mod->HSM2_nsubcw2_Given = TRUE; break; case HSM2_MOD_NSUBCWP2: mod->HSM2_nsubcwp2 = value->rValue; mod->HSM2_nsubcwp2_Given = TRUE; break; case HSM2_MOD_MUEPHW2: mod->HSM2_muephw2 = value->rValue; mod->HSM2_muephw2_Given = TRUE; break; case HSM2_MOD_MUEPWP2: mod->HSM2_muepwp2 = value->rValue; mod->HSM2_muepwp2_Given = TRUE; break; /* WPE */ case HSM2_MOD_WEB: mod->HSM2_web = value->rValue; mod->HSM2_web_Given = TRUE; break; case HSM2_MOD_WEC: mod->HSM2_wec = value->rValue; mod->HSM2_wec_Given = TRUE; break; case HSM2_MOD_NSUBCWPE: mod->HSM2_nsubcwpe = value->rValue; mod->HSM2_nsubcwpe_Given = TRUE; break; case HSM2_MOD_NPEXTWPE: mod->HSM2_npextwpe = value->rValue; mod->HSM2_npextwpe_Given = TRUE; break; case HSM2_MOD_NSUBPWPE: mod->HSM2_nsubpwpe = value->rValue; mod->HSM2_nsubpwpe_Given = TRUE; break; case HSM2_MOD_VGSMIN: mod->HSM2_Vgsmin = value->rValue; mod->HSM2_Vgsmin_Given = TRUE; break; case HSM2_MOD_SC3VBS: mod->HSM2_sc3Vbs = value->rValue; mod->HSM2_sc3Vbs_Given = TRUE; break; case HSM2_MOD_BYPTOL: mod->HSM2_byptol = value->rValue; mod->HSM2_byptol_Given = TRUE; break; case HSM2_MOD_MUECB0LP: mod->HSM2_muecb0lp = value->rValue; mod->HSM2_muecb0lp_Given = TRUE; break; case HSM2_MOD_MUECB1LP: mod->HSM2_muecb1lp = value->rValue; mod->HSM2_muecb1lp_Given = TRUE; break; /* binning parameters */ case HSM2_MOD_LMIN: mod->HSM2_lmin = value->rValue; mod->HSM2_lmin_Given = TRUE; break; case HSM2_MOD_LMAX: mod->HSM2_lmax = value->rValue; mod->HSM2_lmax_Given = TRUE; break; case HSM2_MOD_WMIN: mod->HSM2_wmin = value->rValue; mod->HSM2_wmin_Given = TRUE; break; case HSM2_MOD_WMAX: mod->HSM2_wmax = value->rValue; mod->HSM2_wmax_Given = TRUE; break; case HSM2_MOD_LBINN: mod->HSM2_lbinn = value->rValue; mod->HSM2_lbinn_Given = TRUE; break; case HSM2_MOD_WBINN: mod->HSM2_wbinn = value->rValue; mod->HSM2_wbinn_Given = TRUE; break; /* Length dependence */ case HSM2_MOD_LVMAX: mod->HSM2_lvmax = value->rValue; mod->HSM2_lvmax_Given = TRUE; break; case HSM2_MOD_LBGTMP1: mod->HSM2_lbgtmp1 = value->rValue; mod->HSM2_lbgtmp1_Given = TRUE; break; case HSM2_MOD_LBGTMP2: mod->HSM2_lbgtmp2 = value->rValue; mod->HSM2_lbgtmp2_Given = TRUE; break; case HSM2_MOD_LEG0: mod->HSM2_leg0 = value->rValue; mod->HSM2_leg0_Given = TRUE; break; case HSM2_MOD_LLOVER: mod->HSM2_llover = value->rValue; mod->HSM2_llover_Given = TRUE; break; case HSM2_MOD_LVFBOVER: mod->HSM2_lvfbover = value->rValue; mod->HSM2_lvfbover_Given = TRUE; break; case HSM2_MOD_LNOVER: mod->HSM2_lnover = value->rValue; mod->HSM2_lnover_Given = TRUE; break; case HSM2_MOD_LWL2: mod->HSM2_lwl2 = value->rValue; mod->HSM2_lwl2_Given = TRUE; break; case HSM2_MOD_LVFBC: mod->HSM2_lvfbc = value->rValue; mod->HSM2_lvfbc_Given = TRUE; break; case HSM2_MOD_LNSUBC: mod->HSM2_lnsubc = value->rValue; mod->HSM2_lnsubc_Given = TRUE; break; case HSM2_MOD_LNSUBP: mod->HSM2_lnsubp = value->rValue; mod->HSM2_lnsubp_Given = TRUE; break; case HSM2_MOD_LSCP1: mod->HSM2_lscp1 = value->rValue; mod->HSM2_lscp1_Given = TRUE; break; case HSM2_MOD_LSCP2: mod->HSM2_lscp2 = value->rValue; mod->HSM2_lscp2_Given = TRUE; break; case HSM2_MOD_LSCP3: mod->HSM2_lscp3 = value->rValue; mod->HSM2_lscp3_Given = TRUE; break; case HSM2_MOD_LSC1: mod->HSM2_lsc1 = value->rValue; mod->HSM2_lsc1_Given = TRUE; break; case HSM2_MOD_LSC2: mod->HSM2_lsc2 = value->rValue; mod->HSM2_lsc2_Given = TRUE; break; case HSM2_MOD_LSC3: mod->HSM2_lsc3 = value->rValue; mod->HSM2_lsc3_Given = TRUE; break; case HSM2_MOD_LSC4: mod->HSM2_lsc4 = value->rValue; mod->HSM2_lsc4_Given = TRUE; break; case HSM2_MOD_LPGD1: mod->HSM2_lpgd1 = value->rValue; mod->HSM2_lpgd1_Given = TRUE; break; //case HSM2_MOD_LPGD3: // mod->HSM2_lpgd3 = value->rValue; // mod->HSM2_lpgd3_Given = TRUE; // break; case HSM2_MOD_LNDEP: mod->HSM2_lndep = value->rValue; mod->HSM2_lndep_Given = TRUE; break; case HSM2_MOD_LNINV: mod->HSM2_lninv = value->rValue; mod->HSM2_lninv_Given = TRUE; break; case HSM2_MOD_LMUECB0: mod->HSM2_lmuecb0 = value->rValue; mod->HSM2_lmuecb0_Given = TRUE; break; case HSM2_MOD_LMUECB1: mod->HSM2_lmuecb1 = value->rValue; mod->HSM2_lmuecb1_Given = TRUE; break; case HSM2_MOD_LMUEPH1: mod->HSM2_lmueph1 = value->rValue; mod->HSM2_lmueph1_Given = TRUE; break; case HSM2_MOD_LVTMP: mod->HSM2_lvtmp = value->rValue; mod->HSM2_lvtmp_Given = TRUE; break; case HSM2_MOD_LWVTH0: mod->HSM2_lwvth0 = value->rValue; mod->HSM2_lwvth0_Given = TRUE; break; case HSM2_MOD_LMUESR1: mod->HSM2_lmuesr1 = value->rValue; mod->HSM2_lmuesr1_Given = TRUE; break; case HSM2_MOD_LMUETMP: mod->HSM2_lmuetmp = value->rValue; mod->HSM2_lmuetmp_Given = TRUE; break; case HSM2_MOD_LSUB1: mod->HSM2_lsub1 = value->rValue; mod->HSM2_lsub1_Given = TRUE; break; case HSM2_MOD_LSUB2: mod->HSM2_lsub2 = value->rValue; mod->HSM2_lsub2_Given = TRUE; break; case HSM2_MOD_LSVDS: mod->HSM2_lsvds = value->rValue; mod->HSM2_lsvds_Given = TRUE; break; case HSM2_MOD_LSVBS: mod->HSM2_lsvbs = value->rValue; mod->HSM2_lsvbs_Given = TRUE; break; case HSM2_MOD_LSVGS: mod->HSM2_lsvgs = value->rValue; mod->HSM2_lsvgs_Given = TRUE; break; case HSM2_MOD_LNSTI: mod->HSM2_lnsti = value->rValue; mod->HSM2_lnsti_Given = TRUE; break; case HSM2_MOD_LWSTI: mod->HSM2_lwsti = value->rValue; mod->HSM2_lwsti_Given = TRUE; break; case HSM2_MOD_LSCSTI1: mod->HSM2_lscsti1 = value->rValue; mod->HSM2_lscsti1_Given = TRUE; break; case HSM2_MOD_LSCSTI2: mod->HSM2_lscsti2 = value->rValue; mod->HSM2_lscsti2_Given = TRUE; break; case HSM2_MOD_LVTHSTI: mod->HSM2_lvthsti = value->rValue; mod->HSM2_lvthsti_Given = TRUE; break; case HSM2_MOD_LMUESTI1: mod->HSM2_lmuesti1 = value->rValue; mod->HSM2_lmuesti1_Given = TRUE; break; case HSM2_MOD_LMUESTI2: mod->HSM2_lmuesti2 = value->rValue; mod->HSM2_lmuesti2_Given = TRUE; break; case HSM2_MOD_LMUESTI3: mod->HSM2_lmuesti3 = value->rValue; mod->HSM2_lmuesti3_Given = TRUE; break; case HSM2_MOD_LNSUBPSTI1: mod->HSM2_lnsubpsti1 = value->rValue; mod->HSM2_lnsubpsti1_Given = TRUE; break; case HSM2_MOD_LNSUBPSTI2: mod->HSM2_lnsubpsti2 = value->rValue; mod->HSM2_lnsubpsti2_Given = TRUE; break; case HSM2_MOD_LNSUBPSTI3: mod->HSM2_lnsubpsti3 = value->rValue; mod->HSM2_lnsubpsti3_Given = TRUE; break; case HSM2_MOD_LNSUBCSTI1: mod->HSM2_lnsubcsti1 = value->rValue; mod->HSM2_lnsubcsti1_Given = TRUE; break; case HSM2_MOD_LNSUBCSTI2: mod->HSM2_lnsubcsti2 = value->rValue; mod->HSM2_lnsubcsti2_Given = TRUE; break; case HSM2_MOD_LNSUBCSTI3: mod->HSM2_lnsubcsti3 = value->rValue; mod->HSM2_lnsubcsti3_Given = TRUE; break; case HSM2_MOD_LCGSO: mod->HSM2_lcgso = value->rValue; mod->HSM2_lcgso_Given = TRUE; break; case HSM2_MOD_LCGDO: mod->HSM2_lcgdo = value->rValue; mod->HSM2_lcgdo_Given = TRUE; break; case HSM2_MOD_LJS0: mod->HSM2_ljs0 = value->rValue; mod->HSM2_ljs0_Given = TRUE; break; case HSM2_MOD_LJS0SW: mod->HSM2_ljs0sw = value->rValue; mod->HSM2_ljs0sw_Given = TRUE; break; case HSM2_MOD_LNJ: mod->HSM2_lnj = value->rValue; mod->HSM2_lnj_Given = TRUE; break; case HSM2_MOD_LCISBK: mod->HSM2_lcisbk = value->rValue; mod->HSM2_lcisbk_Given = TRUE; break; case HSM2_MOD_LCLM1: mod->HSM2_lclm1 = value->rValue; mod->HSM2_lclm1_Given = TRUE; break; case HSM2_MOD_LCLM2: mod->HSM2_lclm2 = value->rValue; mod->HSM2_lclm2_Given = TRUE; break; case HSM2_MOD_LCLM3: mod->HSM2_lclm3 = value->rValue; mod->HSM2_lclm3_Given = TRUE; break; case HSM2_MOD_LWFC: mod->HSM2_lwfc = value->rValue; mod->HSM2_lwfc_Given = TRUE; break; case HSM2_MOD_LGIDL1: mod->HSM2_lgidl1 = value->rValue; mod->HSM2_lgidl1_Given = TRUE; break; case HSM2_MOD_LGIDL2: mod->HSM2_lgidl2 = value->rValue; mod->HSM2_lgidl2_Given = TRUE; break; case HSM2_MOD_LGLEAK1: mod->HSM2_lgleak1 = value->rValue; mod->HSM2_lgleak1_Given = TRUE; break; case HSM2_MOD_LGLEAK2: mod->HSM2_lgleak2 = value->rValue; mod->HSM2_lgleak2_Given = TRUE; break; case HSM2_MOD_LGLEAK3: mod->HSM2_lgleak3 = value->rValue; mod->HSM2_lgleak3_Given = TRUE; break; case HSM2_MOD_LGLEAK6: mod->HSM2_lgleak6 = value->rValue; mod->HSM2_lgleak6_Given = TRUE; break; case HSM2_MOD_LGLKSD1: mod->HSM2_lglksd1 = value->rValue; mod->HSM2_lglksd1_Given = TRUE; break; case HSM2_MOD_LGLKSD2: mod->HSM2_lglksd2 = value->rValue; mod->HSM2_lglksd2_Given = TRUE; break; case HSM2_MOD_LGLKB1: mod->HSM2_lglkb1 = value->rValue; mod->HSM2_lglkb1_Given = TRUE; break; case HSM2_MOD_LGLKB2: mod->HSM2_lglkb2 = value->rValue; mod->HSM2_lglkb2_Given = TRUE; break; case HSM2_MOD_LNFTRP: mod->HSM2_lnftrp = value->rValue; mod->HSM2_lnftrp_Given = TRUE; break; case HSM2_MOD_LNFALP: mod->HSM2_lnfalp = value->rValue; mod->HSM2_lnfalp_Given = TRUE; break; case HSM2_MOD_LVDIFFJ: mod->HSM2_lvdiffj = value->rValue; mod->HSM2_lvdiffj_Given = TRUE; break; case HSM2_MOD_LIBPC1: mod->HSM2_libpc1 = value->rValue; mod->HSM2_libpc1_Given = TRUE; break; case HSM2_MOD_LIBPC2: mod->HSM2_libpc2 = value->rValue; mod->HSM2_libpc2_Given = TRUE; break; /* Width dependence */ case HSM2_MOD_WVMAX: mod->HSM2_wvmax = value->rValue; mod->HSM2_wvmax_Given = TRUE; break; case HSM2_MOD_WBGTMP1: mod->HSM2_wbgtmp1 = value->rValue; mod->HSM2_wbgtmp1_Given = TRUE; break; case HSM2_MOD_WBGTMP2: mod->HSM2_wbgtmp2 = value->rValue; mod->HSM2_wbgtmp2_Given = TRUE; break; case HSM2_MOD_WEG0: mod->HSM2_weg0 = value->rValue; mod->HSM2_weg0_Given = TRUE; break; case HSM2_MOD_WLOVER: mod->HSM2_wlover = value->rValue; mod->HSM2_wlover_Given = TRUE; break; case HSM2_MOD_WVFBOVER: mod->HSM2_wvfbover = value->rValue; mod->HSM2_wvfbover_Given = TRUE; break; case HSM2_MOD_WNOVER: mod->HSM2_wnover = value->rValue; mod->HSM2_wnover_Given = TRUE; break; case HSM2_MOD_WWL2: mod->HSM2_wwl2 = value->rValue; mod->HSM2_wwl2_Given = TRUE; break; case HSM2_MOD_WVFBC: mod->HSM2_wvfbc = value->rValue; mod->HSM2_wvfbc_Given = TRUE; break; case HSM2_MOD_WNSUBC: mod->HSM2_wnsubc = value->rValue; mod->HSM2_wnsubc_Given = TRUE; break; case HSM2_MOD_WNSUBP: mod->HSM2_wnsubp = value->rValue; mod->HSM2_wnsubp_Given = TRUE; break; case HSM2_MOD_WSCP1: mod->HSM2_wscp1 = value->rValue; mod->HSM2_wscp1_Given = TRUE; break; case HSM2_MOD_WSCP2: mod->HSM2_wscp2 = value->rValue; mod->HSM2_wscp2_Given = TRUE; break; case HSM2_MOD_WSCP3: mod->HSM2_wscp3 = value->rValue; mod->HSM2_wscp3_Given = TRUE; break; case HSM2_MOD_WSC1: mod->HSM2_wsc1 = value->rValue; mod->HSM2_wsc1_Given = TRUE; break; case HSM2_MOD_WSC2: mod->HSM2_wsc2 = value->rValue; mod->HSM2_wsc2_Given = TRUE; break; case HSM2_MOD_WSC3: mod->HSM2_wsc3 = value->rValue; mod->HSM2_wsc3_Given = TRUE; break; case HSM2_MOD_WSC4: mod->HSM2_wsc4 = value->rValue; mod->HSM2_wsc4_Given = TRUE; break; case HSM2_MOD_WPGD1: mod->HSM2_wpgd1 = value->rValue; mod->HSM2_wpgd1_Given = TRUE; break; //case HSM2_MOD_WPGD3: // mod->HSM2_wpgd3 = value->rValue; // mod->HSM2_wpgd3_Given = TRUE; // break; case HSM2_MOD_WNDEP: mod->HSM2_wndep = value->rValue; mod->HSM2_wndep_Given = TRUE; break; case HSM2_MOD_WNINV: mod->HSM2_wninv = value->rValue; mod->HSM2_wninv_Given = TRUE; break; case HSM2_MOD_WMUECB0: mod->HSM2_wmuecb0 = value->rValue; mod->HSM2_wmuecb0_Given = TRUE; break; case HSM2_MOD_WMUECB1: mod->HSM2_wmuecb1 = value->rValue; mod->HSM2_wmuecb1_Given = TRUE; break; case HSM2_MOD_WMUEPH1: mod->HSM2_wmueph1 = value->rValue; mod->HSM2_wmueph1_Given = TRUE; break; case HSM2_MOD_WVTMP: mod->HSM2_wvtmp = value->rValue; mod->HSM2_wvtmp_Given = TRUE; break; case HSM2_MOD_WWVTH0: mod->HSM2_wwvth0 = value->rValue; mod->HSM2_wwvth0_Given = TRUE; break; case HSM2_MOD_WMUESR1: mod->HSM2_wmuesr1 = value->rValue; mod->HSM2_wmuesr1_Given = TRUE; break; case HSM2_MOD_WMUETMP: mod->HSM2_wmuetmp = value->rValue; mod->HSM2_wmuetmp_Given = TRUE; break; case HSM2_MOD_WSUB1: mod->HSM2_wsub1 = value->rValue; mod->HSM2_wsub1_Given = TRUE; break; case HSM2_MOD_WSUB2: mod->HSM2_wsub2 = value->rValue; mod->HSM2_wsub2_Given = TRUE; break; case HSM2_MOD_WSVDS: mod->HSM2_wsvds = value->rValue; mod->HSM2_wsvds_Given = TRUE; break; case HSM2_MOD_WSVBS: mod->HSM2_wsvbs = value->rValue; mod->HSM2_wsvbs_Given = TRUE; break; case HSM2_MOD_WSVGS: mod->HSM2_wsvgs = value->rValue; mod->HSM2_wsvgs_Given = TRUE; break; case HSM2_MOD_WNSTI: mod->HSM2_wnsti = value->rValue; mod->HSM2_wnsti_Given = TRUE; break; case HSM2_MOD_WWSTI: mod->HSM2_wwsti = value->rValue; mod->HSM2_wwsti_Given = TRUE; break; case HSM2_MOD_WSCSTI1: mod->HSM2_wscsti1 = value->rValue; mod->HSM2_wscsti1_Given = TRUE; break; case HSM2_MOD_WSCSTI2: mod->HSM2_wscsti2 = value->rValue; mod->HSM2_wscsti2_Given = TRUE; break; case HSM2_MOD_WVTHSTI: mod->HSM2_wvthsti = value->rValue; mod->HSM2_wvthsti_Given = TRUE; break; case HSM2_MOD_WMUESTI1: mod->HSM2_wmuesti1 = value->rValue; mod->HSM2_wmuesti1_Given = TRUE; break; case HSM2_MOD_WMUESTI2: mod->HSM2_wmuesti2 = value->rValue; mod->HSM2_wmuesti2_Given = TRUE; break; case HSM2_MOD_WMUESTI3: mod->HSM2_wmuesti3 = value->rValue; mod->HSM2_wmuesti3_Given = TRUE; break; case HSM2_MOD_WNSUBPSTI1: mod->HSM2_wnsubpsti1 = value->rValue; mod->HSM2_wnsubpsti1_Given = TRUE; break; case HSM2_MOD_WNSUBPSTI2: mod->HSM2_wnsubpsti2 = value->rValue; mod->HSM2_wnsubpsti2_Given = TRUE; break; case HSM2_MOD_WNSUBPSTI3: mod->HSM2_wnsubpsti3 = value->rValue; mod->HSM2_wnsubpsti3_Given = TRUE; break; case HSM2_MOD_WNSUBCSTI1: mod->HSM2_wnsubcsti1 = value->rValue; mod->HSM2_wnsubcsti1_Given = TRUE; break; case HSM2_MOD_WNSUBCSTI2: mod->HSM2_wnsubcsti2 = value->rValue; mod->HSM2_wnsubcsti2_Given = TRUE; break; case HSM2_MOD_WNSUBCSTI3: mod->HSM2_wnsubcsti3 = value->rValue; mod->HSM2_wnsubcsti3_Given = TRUE; break; case HSM2_MOD_WCGSO: mod->HSM2_wcgso = value->rValue; mod->HSM2_wcgso_Given = TRUE; break; case HSM2_MOD_WCGDO: mod->HSM2_wcgdo = value->rValue; mod->HSM2_wcgdo_Given = TRUE; break; case HSM2_MOD_WJS0: mod->HSM2_wjs0 = value->rValue; mod->HSM2_wjs0_Given = TRUE; break; case HSM2_MOD_WJS0SW: mod->HSM2_wjs0sw = value->rValue; mod->HSM2_wjs0sw_Given = TRUE; break; case HSM2_MOD_WNJ: mod->HSM2_wnj = value->rValue; mod->HSM2_wnj_Given = TRUE; break; case HSM2_MOD_WCISBK: mod->HSM2_wcisbk = value->rValue; mod->HSM2_wcisbk_Given = TRUE; break; case HSM2_MOD_WCLM1: mod->HSM2_wclm1 = value->rValue; mod->HSM2_wclm1_Given = TRUE; break; case HSM2_MOD_WCLM2: mod->HSM2_wclm2 = value->rValue; mod->HSM2_wclm2_Given = TRUE; break; case HSM2_MOD_WCLM3: mod->HSM2_wclm3 = value->rValue; mod->HSM2_wclm3_Given = TRUE; break; case HSM2_MOD_WWFC: mod->HSM2_wwfc = value->rValue; mod->HSM2_wwfc_Given = TRUE; break; case HSM2_MOD_WGIDL1: mod->HSM2_wgidl1 = value->rValue; mod->HSM2_wgidl1_Given = TRUE; break; case HSM2_MOD_WGIDL2: mod->HSM2_wgidl2 = value->rValue; mod->HSM2_wgidl2_Given = TRUE; break; case HSM2_MOD_WGLEAK1: mod->HSM2_wgleak1 = value->rValue; mod->HSM2_wgleak1_Given = TRUE; break; case HSM2_MOD_WGLEAK2: mod->HSM2_wgleak2 = value->rValue; mod->HSM2_wgleak2_Given = TRUE; break; case HSM2_MOD_WGLEAK3: mod->HSM2_wgleak3 = value->rValue; mod->HSM2_wgleak3_Given = TRUE; break; case HSM2_MOD_WGLEAK6: mod->HSM2_wgleak6 = value->rValue; mod->HSM2_wgleak6_Given = TRUE; break; case HSM2_MOD_WGLKSD1: mod->HSM2_wglksd1 = value->rValue; mod->HSM2_wglksd1_Given = TRUE; break; case HSM2_MOD_WGLKSD2: mod->HSM2_wglksd2 = value->rValue; mod->HSM2_wglksd2_Given = TRUE; break; case HSM2_MOD_WGLKB1: mod->HSM2_wglkb1 = value->rValue; mod->HSM2_wglkb1_Given = TRUE; break; case HSM2_MOD_WGLKB2: mod->HSM2_wglkb2 = value->rValue; mod->HSM2_wglkb2_Given = TRUE; break; case HSM2_MOD_WNFTRP: mod->HSM2_wnftrp = value->rValue; mod->HSM2_wnftrp_Given = TRUE; break; case HSM2_MOD_WNFALP: mod->HSM2_wnfalp = value->rValue; mod->HSM2_wnfalp_Given = TRUE; break; case HSM2_MOD_WVDIFFJ: mod->HSM2_wvdiffj = value->rValue; mod->HSM2_wvdiffj_Given = TRUE; break; case HSM2_MOD_WIBPC1: mod->HSM2_wibpc1 = value->rValue; mod->HSM2_wibpc1_Given = TRUE; break; case HSM2_MOD_WIBPC2: mod->HSM2_wibpc2 = value->rValue; mod->HSM2_wibpc2_Given = TRUE; break; /* Cross-term dependence */ case HSM2_MOD_PVMAX: mod->HSM2_pvmax = value->rValue; mod->HSM2_pvmax_Given = TRUE; break; case HSM2_MOD_PBGTMP1: mod->HSM2_pbgtmp1 = value->rValue; mod->HSM2_pbgtmp1_Given = TRUE; break; case HSM2_MOD_PBGTMP2: mod->HSM2_pbgtmp2 = value->rValue; mod->HSM2_pbgtmp2_Given = TRUE; break; case HSM2_MOD_PEG0: mod->HSM2_peg0 = value->rValue; mod->HSM2_peg0_Given = TRUE; break; case HSM2_MOD_PLOVER: mod->HSM2_plover = value->rValue; mod->HSM2_plover_Given = TRUE; break; case HSM2_MOD_PVFBOVER: mod->HSM2_pvfbover = value->rValue; mod->HSM2_pvfbover_Given = TRUE; break; case HSM2_MOD_PNOVER: mod->HSM2_pnover = value->rValue; mod->HSM2_pnover_Given = TRUE; break; case HSM2_MOD_PWL2: mod->HSM2_pwl2 = value->rValue; mod->HSM2_pwl2_Given = TRUE; break; case HSM2_MOD_PVFBC: mod->HSM2_pvfbc = value->rValue; mod->HSM2_pvfbc_Given = TRUE; break; case HSM2_MOD_PNSUBC: mod->HSM2_pnsubc = value->rValue; mod->HSM2_pnsubc_Given = TRUE; break; case HSM2_MOD_PNSUBP: mod->HSM2_pnsubp = value->rValue; mod->HSM2_pnsubp_Given = TRUE; break; case HSM2_MOD_PSCP1: mod->HSM2_pscp1 = value->rValue; mod->HSM2_pscp1_Given = TRUE; break; case HSM2_MOD_PSCP2: mod->HSM2_pscp2 = value->rValue; mod->HSM2_pscp2_Given = TRUE; break; case HSM2_MOD_PSCP3: mod->HSM2_pscp3 = value->rValue; mod->HSM2_pscp3_Given = TRUE; break; case HSM2_MOD_PSC1: mod->HSM2_psc1 = value->rValue; mod->HSM2_psc1_Given = TRUE; break; case HSM2_MOD_PSC2: mod->HSM2_psc2 = value->rValue; mod->HSM2_psc2_Given = TRUE; break; case HSM2_MOD_PSC3: mod->HSM2_psc3 = value->rValue; mod->HSM2_psc3_Given = TRUE; break; case HSM2_MOD_PSC4: mod->HSM2_psc4 = value->rValue; mod->HSM2_psc4_Given = TRUE; break; case HSM2_MOD_PPGD1: mod->HSM2_ppgd1 = value->rValue; mod->HSM2_ppgd1_Given = TRUE; break; //case HSM2_MOD_PPGD3: // mod->HSM2_ppgd3 = value->rValue; // mod->HSM2_ppgd3_Given = TRUE; // break; case HSM2_MOD_PNDEP: mod->HSM2_pndep = value->rValue; mod->HSM2_pndep_Given = TRUE; break; case HSM2_MOD_PNINV: mod->HSM2_pninv = value->rValue; mod->HSM2_pninv_Given = TRUE; break; case HSM2_MOD_PMUECB0: mod->HSM2_pmuecb0 = value->rValue; mod->HSM2_pmuecb0_Given = TRUE; break; case HSM2_MOD_PMUECB1: mod->HSM2_pmuecb1 = value->rValue; mod->HSM2_pmuecb1_Given = TRUE; break; case HSM2_MOD_PMUEPH1: mod->HSM2_pmueph1 = value->rValue; mod->HSM2_pmueph1_Given = TRUE; break; case HSM2_MOD_PVTMP: mod->HSM2_pvtmp = value->rValue; mod->HSM2_pvtmp_Given = TRUE; break; case HSM2_MOD_PWVTH0: mod->HSM2_pwvth0 = value->rValue; mod->HSM2_pwvth0_Given = TRUE; break; case HSM2_MOD_PMUESR1: mod->HSM2_pmuesr1 = value->rValue; mod->HSM2_pmuesr1_Given = TRUE; break; case HSM2_MOD_PMUETMP: mod->HSM2_pmuetmp = value->rValue; mod->HSM2_pmuetmp_Given = TRUE; break; case HSM2_MOD_PSUB1: mod->HSM2_psub1 = value->rValue; mod->HSM2_psub1_Given = TRUE; break; case HSM2_MOD_PSUB2: mod->HSM2_psub2 = value->rValue; mod->HSM2_psub2_Given = TRUE; break; case HSM2_MOD_PSVDS: mod->HSM2_psvds = value->rValue; mod->HSM2_psvds_Given = TRUE; break; case HSM2_MOD_PSVBS: mod->HSM2_psvbs = value->rValue; mod->HSM2_psvbs_Given = TRUE; break; case HSM2_MOD_PSVGS: mod->HSM2_psvgs = value->rValue; mod->HSM2_psvgs_Given = TRUE; break; case HSM2_MOD_PNSTI: mod->HSM2_pnsti = value->rValue; mod->HSM2_pnsti_Given = TRUE; break; case HSM2_MOD_PWSTI: mod->HSM2_pwsti = value->rValue; mod->HSM2_pwsti_Given = TRUE; break; case HSM2_MOD_PSCSTI1: mod->HSM2_pscsti1 = value->rValue; mod->HSM2_pscsti1_Given = TRUE; break; case HSM2_MOD_PSCSTI2: mod->HSM2_pscsti2 = value->rValue; mod->HSM2_pscsti2_Given = TRUE; break; case HSM2_MOD_PVTHSTI: mod->HSM2_pvthsti = value->rValue; mod->HSM2_pvthsti_Given = TRUE; break; case HSM2_MOD_PMUESTI1: mod->HSM2_pmuesti1 = value->rValue; mod->HSM2_pmuesti1_Given = TRUE; break; case HSM2_MOD_PMUESTI2: mod->HSM2_pmuesti2 = value->rValue; mod->HSM2_pmuesti2_Given = TRUE; break; case HSM2_MOD_PMUESTI3: mod->HSM2_pmuesti3 = value->rValue; mod->HSM2_pmuesti3_Given = TRUE; break; case HSM2_MOD_PNSUBPSTI1: mod->HSM2_pnsubpsti1 = value->rValue; mod->HSM2_pnsubpsti1_Given = TRUE; break; case HSM2_MOD_PNSUBPSTI2: mod->HSM2_pnsubpsti2 = value->rValue; mod->HSM2_pnsubpsti2_Given = TRUE; break; case HSM2_MOD_PNSUBPSTI3: mod->HSM2_pnsubpsti3 = value->rValue; mod->HSM2_pnsubpsti3_Given = TRUE; break; case HSM2_MOD_PNSUBCSTI1: mod->HSM2_pnsubcsti1 = value->rValue; mod->HSM2_pnsubcsti1_Given = TRUE; break; case HSM2_MOD_PNSUBCSTI2: mod->HSM2_pnsubcsti2 = value->rValue; mod->HSM2_pnsubcsti2_Given = TRUE; break; case HSM2_MOD_PNSUBCSTI3: mod->HSM2_pnsubcsti3 = value->rValue; mod->HSM2_pnsubcsti3_Given = TRUE; break; case HSM2_MOD_PCGSO: mod->HSM2_pcgso = value->rValue; mod->HSM2_pcgso_Given = TRUE; break; case HSM2_MOD_PCGDO: mod->HSM2_pcgdo = value->rValue; mod->HSM2_pcgdo_Given = TRUE; break; case HSM2_MOD_PJS0: mod->HSM2_pjs0 = value->rValue; mod->HSM2_pjs0_Given = TRUE; break; case HSM2_MOD_PJS0SW: mod->HSM2_pjs0sw = value->rValue; mod->HSM2_pjs0sw_Given = TRUE; break; case HSM2_MOD_PNJ: mod->HSM2_pnj = value->rValue; mod->HSM2_pnj_Given = TRUE; break; case HSM2_MOD_PCISBK: mod->HSM2_pcisbk = value->rValue; mod->HSM2_pcisbk_Given = TRUE; break; case HSM2_MOD_PCLM1: mod->HSM2_pclm1 = value->rValue; mod->HSM2_pclm1_Given = TRUE; break; case HSM2_MOD_PCLM2: mod->HSM2_pclm2 = value->rValue; mod->HSM2_pclm2_Given = TRUE; break; case HSM2_MOD_PCLM3: mod->HSM2_pclm3 = value->rValue; mod->HSM2_pclm3_Given = TRUE; break; case HSM2_MOD_PWFC: mod->HSM2_pwfc = value->rValue; mod->HSM2_pwfc_Given = TRUE; break; case HSM2_MOD_PGIDL1: mod->HSM2_pgidl1 = value->rValue; mod->HSM2_pgidl1_Given = TRUE; break; case HSM2_MOD_PGIDL2: mod->HSM2_pgidl2 = value->rValue; mod->HSM2_pgidl2_Given = TRUE; break; case HSM2_MOD_PGLEAK1: mod->HSM2_pgleak1 = value->rValue; mod->HSM2_pgleak1_Given = TRUE; break; case HSM2_MOD_PGLEAK2: mod->HSM2_pgleak2 = value->rValue; mod->HSM2_pgleak2_Given = TRUE; break; case HSM2_MOD_PGLEAK3: mod->HSM2_pgleak3 = value->rValue; mod->HSM2_pgleak3_Given = TRUE; break; case HSM2_MOD_PGLEAK6: mod->HSM2_pgleak6 = value->rValue; mod->HSM2_pgleak6_Given = TRUE; break; case HSM2_MOD_PGLKSD1: mod->HSM2_pglksd1 = value->rValue; mod->HSM2_pglksd1_Given = TRUE; break; case HSM2_MOD_PGLKSD2: mod->HSM2_pglksd2 = value->rValue; mod->HSM2_pglksd2_Given = TRUE; break; case HSM2_MOD_PGLKB1: mod->HSM2_pglkb1 = value->rValue; mod->HSM2_pglkb1_Given = TRUE; break; case HSM2_MOD_PGLKB2: mod->HSM2_pglkb2 = value->rValue; mod->HSM2_pglkb2_Given = TRUE; break; case HSM2_MOD_PNFTRP: mod->HSM2_pnftrp = value->rValue; mod->HSM2_pnftrp_Given = TRUE; break; case HSM2_MOD_PNFALP: mod->HSM2_pnfalp = value->rValue; mod->HSM2_pnfalp_Given = TRUE; break; case HSM2_MOD_PVDIFFJ: mod->HSM2_pvdiffj = value->rValue; mod->HSM2_pvdiffj_Given = TRUE; break; case HSM2_MOD_PIBPC1: mod->HSM2_pibpc1 = value->rValue; mod->HSM2_pibpc1_Given = TRUE; break; case HSM2_MOD_PIBPC2: mod->HSM2_pibpc2 = value->rValue; mod->HSM2_pibpc2_Given = TRUE; break; case HSM2_MOD_VGS_MAX: mod->HSM2vgsMax = value->rValue; mod->HSM2vgsMaxGiven = TRUE; break; case HSM2_MOD_VGD_MAX: mod->HSM2vgdMax = value->rValue; mod->HSM2vgdMaxGiven = TRUE; break; case HSM2_MOD_VGB_MAX: mod->HSM2vgbMax = value->rValue; mod->HSM2vgbMaxGiven = TRUE; break; case HSM2_MOD_VDS_MAX: mod->HSM2vdsMax = value->rValue; mod->HSM2vdsMaxGiven = TRUE; break; case HSM2_MOD_VBS_MAX: mod->HSM2vbsMax = value->rValue; mod->HSM2vbsMaxGiven = TRUE; break; case HSM2_MOD_VBD_MAX: mod->HSM2vbdMax = value->rValue; mod->HSM2vbdMaxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/hisim2/Makefile.in0000644000265600020320000004360312264261536021502 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/hisim2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libhisim2_la_LIBADD = am_libhisim2_la_OBJECTS = hsm2.lo hsm2acld.lo hsm2ask.lo hsm2cvtest.lo \ hsm2del.lo hsm2dest.lo hsm2eval.lo hsm2getic.lo hsm2init.lo \ hsm2ld.lo hsm2mask.lo hsm2mdel.lo hsm2mpar.lo hsm2noi.lo \ hsm2par.lo hsm2pzld.lo hsm2set.lo hsm2soachk.lo hsm2temp.lo \ hsm2trunc.lo libhisim2_la_OBJECTS = $(am_libhisim2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libhisim2_la_SOURCES) DIST_SOURCES = $(libhisim2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = noinst_LTLIBRARIES = libhisim2.la libhisim2_la_SOURCES = hisim2.h \ hsm2.c \ hsm2acld.c \ hsm2ask.c \ hsm2cvtest.c \ hsm2def.h \ hsm2del.c \ hsm2dest.c \ hsm2eval.c \ hsm2evalenv.h \ hsm2ext.h \ hsm2getic.c \ hsm2init.c \ hsm2init.h \ hsm2itf.h \ hsm2ld.c \ hsm2mask.c \ hsm2mdel.c \ hsm2mpar.c \ hsm2noi.c \ hsm2par.c \ hsm2pzld.c \ hsm2set.c \ hsm2soachk.c \ hsm2temp.c \ hsm2trunc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/hisim2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/hisim2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libhisim2.la: $(libhisim2_la_OBJECTS) $(libhisim2_la_DEPENDENCIES) $(EXTRA_libhisim2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libhisim2_la_OBJECTS) $(libhisim2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2soachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hsm2trunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/hisim2/hsm2temp.c0000644000265600020320000006661712264261473021352 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2temp.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "hsm2evalenv.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Nsubmin (1e15 / C_cm2m_p3) #define Nsubmin_dlt (0.01 / C_cm2m_p3) #define lpext_dlt (1e-8 / C_m2cm) #define RANGECHECK(param, min, max, pname) \ if ( model->HSM2_coerrrep && ((param) < (min) || (param) > (max)) ) { \ printf("warning: (%s = %g) range [%g , %g].\n", \ (pname), (param), (min), (max) ); \ } /*---------------------------------------------------* * smoothZero: flooring to zero. * y = 0.5 ( x + sqrt( x^2 + 4 delta^2 ) ) *-----------------*/ #define Fn_SZtemp( y , x , delta ) { \ T1 = sqrt ( ( x ) * ( x ) + 4.0 * ( delta ) * ( delta) ) ; \ y = 0.5 * ( ( x ) + T1 ) ; \ } #define Fn_SUtemp( y , x , xmax , delta ) { \ T1 = ( xmax ) - ( x ) - ( delta ) ; \ T2 = 4.0 * ( xmax ) * ( delta) ; \ T2 = T2 > 0.0 ? T2 : - ( T2 ) ; \ T2 = sqrt ( T1 * T1 + T2 ) ; \ y = ( xmax ) - 0.5 * ( T1 + T2 ) ; \ } #define Fn_SLtemp( y , x , xmin , delta ) { \ T1 = ( x ) - ( xmin ) - ( delta ) ; \ T2 = 4.0 * ( xmin ) * ( delta ) ; \ T2 = T2 > 0.0 ? T2 : - ( T2 ) ; \ T2 = sqrt ( T1 * T1 + T2 ) ; \ y = ( xmin ) + 0.5 * ( T1 + T2 ) ; \ } int HSM2temp( GENmodel *inModel, CKTcircuit *ckt) { register HSM2model *model = (HSM2model *)inModel ; register HSM2instance *here ; HSM2binningParam *pParam ; HSM2modelMKSParam *modelMKS ; HSM2hereMKSParam *hereMKS ; double mueph ; double Leff, dL , LG, Weff, dW , WG , WL , Lgate , Wgate; double Nsubpp, Nsubps, Nsub, q_Nsub, Nsubb, Npext ; double Lod_half, Lod_half_ref ; double MUEPWD = 0.0 ; double MUEPLD = 0.0 ; double GDLD = 0.0 ; double T1, T2, T3 ; /* temperature-dependent variables */ double Eg ,TTEMP, beta, Nin; double js, jssw, js2, jssw2 ; int i; /* declarations for the sc3 clamping part */ double A, beta_inv, c_eox, cnst0, cnst1, Cox, Cox_inv; double Denom, dPpg, dVth, dVthLP, dVthLP_dVb, dVthSC, dVthW; double dVth0, dVth0_dVb, fac1, limVgp_dVbs, Pb20, Ps0, Ps0_dVbs; double Ps0_min, Qb0, sc3lim, sc3Vbs, sc3Vgs, term1, term2, term3, term4; double Tox, T0, T3_dVb, T4, T5, T6, T6_dVb, T8, T8_dVb; double T9, T9_dVb, Vgp, Vgs_min, Vfb, Vthp, Vth0; for ( ;model ;model = model->HSM2nextModel ) { modelMKS = &model->modelMKS ; for ( here = model->HSM2instances; here; here = here->HSM2nextInstance ) { pParam = &here->pParam ; hereMKS = &here->hereMKS ; here->HSM2_lgate = Lgate = here->HSM2_l + model->HSM2_xl ; Wgate = here->HSM2_w / here->HSM2_nf + model->HSM2_xw ; LG = Lgate * C_m2um ; here->HSM2_wg = WG = Wgate * C_m2um ; WL = WG * LG ; MUEPWD = model->HSM2_muepwd * C_m2um ; MUEPLD = model->HSM2_muepld * C_m2um ; /* Band gap */ here->HSM2_egtnom = pParam->HSM2_eg0 - model->HSM2_ktnom * ( 90.25e-6 + model->HSM2_ktnom * 1.0e-7 ) ; /* C_EOX */ here->HSM2_cecox = C_VAC * model->HSM2_kappa ; /* Vth reduction for small Vds */ here->HSM2_msc = model->HSM2_scp22 ; /* Poly-Si Gate Depletion */ if ( pParam->HSM2_pgd1 == 0.0 ) { here->HSM2_flg_pgd = 0 ; } else { here->HSM2_flg_pgd = 1 ; } /* CLM5 & CLM6 */ here->HSM2_clmmod = 1e0 + pow( LG , model->HSM2_clm5 ) * model->HSM2_clm6 ; /* Half length of diffusion */ T1 = 1.0 / (model->HSM2_saref + 0.5 * here->HSM2_l) + 1.0 / (model->HSM2_sbref + 0.5 * here->HSM2_l); Lod_half_ref = 2.0 / T1 ; if (here->HSM2_sa > 0.0 && here->HSM2_sb > 0.0 && (here->HSM2_nf == 1.0 || (here->HSM2_nf > 1.0 && here->HSM2_sd > 0.0))) { T1 = 0.0; for (i = 0; i < here->HSM2_nf; i++) { T1 += 1.0 / (here->HSM2_sa + 0.5 * here->HSM2_l + i * (here->HSM2_sd + here->HSM2_l)) + 1.0 / (here->HSM2_sb + 0.5 * here->HSM2_l + i * (here->HSM2_sd + here->HSM2_l)); } Lod_half = 2.0 * here->HSM2_nf / T1; } else { Lod_half = 0.0; } Npext = modelMKS->HSM2_npext * ( 1.0 + model->HSM2_npextw / pow( WG, model->HSM2_npextwp ) ); /* new */ here->HSM2_mueph1 = pParam->HSM2_mueph1 ; here->HSM2_nsubp = pParam->HSM2_nsubp ; here->HSM2_nsubc = pParam->HSM2_nsubc ; /* DFM */ if ( model->HSM2_codfm == 1 && here->HSM2_nsubcdfm_Given ) { RANGECHECK(here->HSM2_nsubcdfm, 1.0e16, 1.0e19, "NSUBCDFM") ; here->HSM2_mueph1 *= here->HSM2_mphdfm * ( log(hereMKS->HSM2_nsubcdfm) - log(here->HSM2_nsubc) ) + 1.0 ; here->HSM2_nsubp += hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ; Npext += hereMKS->HSM2_nsubcdfm - here->HSM2_nsubc ; here->HSM2_nsubc = hereMKS->HSM2_nsubcdfm ; } /* WPE */ T0 = modelMKS->HSM2_nsubcwpe * ( here->HSM2_sca + model->HSM2_web * here->HSM2_scb + model->HSM2_wec * here->HSM2_scc ) ; here->HSM2_nsubc += T0 ; Fn_SLtemp( here->HSM2_nsubc , here->HSM2_nsubc , Nsubmin , Nsubmin_dlt ) ; T0 = modelMKS->HSM2_nsubpwpe * ( here->HSM2_sca + model->HSM2_web * here->HSM2_scb + model->HSM2_wec * here->HSM2_scc ) ; here->HSM2_nsubp += T0 ; Fn_SLtemp( here->HSM2_nsubp , here->HSM2_nsubp , Nsubmin , Nsubmin_dlt ) ; T0 = modelMKS->HSM2_npextwpe * ( here->HSM2_sca + model->HSM2_web * here->HSM2_scb + model->HSM2_wec * here->HSM2_scc ) ; Npext += T0 ; Fn_SLtemp( Npext , Npext , Nsubmin , Nsubmin_dlt ) ; /* WPE end */ /* Coulomb Scattering */ here->HSM2_muecb0 = pParam->HSM2_muecb0 * pow( LG, model->HSM2_muecb0lp ); here->HSM2_muecb1 = pParam->HSM2_muecb1 * pow( LG, model->HSM2_muecb1lp ); /* Phonon Scattering (temperature-independent part) */ mueph = here->HSM2_mueph1 * (1.0e0 + (model->HSM2_muephw / pow( WG + MUEPWD , model->HSM2_muepwp))) * (1.0e0 + (model->HSM2_muephl / pow( LG + MUEPLD , model->HSM2_mueplp))) * (1.0e0 + (model->HSM2_muephw2 / pow( WG, model->HSM2_muepwp2))) * (1.0e0 + (model->HSM2_muephl2 / pow( LG, model->HSM2_mueplp2))) * (1.0e0 + (model->HSM2_muephs / pow( WL, model->HSM2_muepsp))); if (Lod_half > 0.0) { T1 = 1.0e0 / (1.0e0 + pParam->HSM2_muesti2) ; T2 = pow (pParam->HSM2_muesti1 / Lod_half, pParam->HSM2_muesti3) ; T3 = pow (pParam->HSM2_muesti1 / Lod_half_ref, pParam->HSM2_muesti3) ; here->HSM2_mueph = mueph * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3); } else { here->HSM2_mueph = mueph; } /* Surface Roughness Scattering */ here->HSM2_muesr = model->HSM2_muesr0 * (1.0e0 + (model->HSM2_muesrl / pow (LG, model->HSM2_mueslp))) * (1.0e0 + (model->HSM2_muesrw / pow (WG, model->HSM2_mueswp))) ; /* Coefficients of Qbm for Eeff */ T1 = pow( LG, model->HSM2_ndeplp ) ; T2 = pow( WG, model->HSM2_ndepwp ) ; /* new */ T3 = T1 + model->HSM2_ndepl ; T4 = T2 + model->HSM2_ndepw ; if( T3 < 1e-8 ) { T3 = 1e-8; } if( T4 < 1e-8 ) { T4 = 1e-8; } here->HSM2_ndep_o_esi = ( pParam->HSM2_ndep * T1 ) / T3 * T2 / T4 / C_ESI ; here->HSM2_ninv_o_esi = pParam->HSM2_ninv / C_ESI ; /* Metallurgical channel geometry */ dL = model->HSM2_xld + (modelMKS->HSM2_ll / pow (Lgate + model->HSM2_lld, model->HSM2_lln)) ; dW = model->HSM2_xwd + (modelMKS->HSM2_wl / pow (Wgate + model->HSM2_wld, model->HSM2_wln)) ; Leff = Lgate - 2.0e0 * dL ; if ( Leff <= 1.0e-9 ) { IFuid namarr[2]; namarr[0] = model->HSM2modName; namarr[1] = here->HSM2name; (*(SPfrontEnd->IFerror)) ( ERR_FATAL, "HiSIM2: MOSFET(%s) MODEL(%s): effective channel length is smaller than 1nm", namarr ); return (E_BADPARM); } here->HSM2_leff = Leff ; /* Wg dependence for short channel devices */ here->HSM2_lgatesm = Lgate + model->HSM2_wl1 / pow( WL , model->HSM2_wl1p ) ; here->HSM2_dVthsm = pParam->HSM2_wl2 / pow( WL , model->HSM2_wl2p ) ; /* Lg dependence of wsti */ T1 = 1.0e0 + model->HSM2_wstil / pow( here->HSM2_lgatesm * C_m2um , model->HSM2_wstilp ) ; T2 = 1.0e0 + model->HSM2_wstiw / pow( WG , model->HSM2_wstiwp ) ; here->HSM2_wsti = pParam->HSM2_wsti * T1 * T2 ; here->HSM2_weff = Weff = Wgate - 2.0e0 * dW ; if ( Weff <= 0.0 ) { IFuid namarr[2]; namarr[0] = model->HSM2modName; namarr[1] = here->HSM2name; (*(SPfrontEnd->IFerror)) ( ERR_FATAL, "HiSIM2: MOSFET(%s) MODEL(%s): effective channel width is negative or 0", namarr ); return (E_BADPARM); } here->HSM2_weff_nf = Weff * here->HSM2_nf ; /* Surface impurity profile */ /* Nsubp */ if(model->HSM2_nsubpfac < 1.0) { T1 = 2.0 * ( 1.0 - model->HSM2_nsubpfac ) / model->HSM2_nsubpl * LG + 2.0 * model->HSM2_nsubpfac - 1.0 ; Fn_SUtemp( T1 , T1 , 1 , model->HSM2_nsubpdlt ) ; Fn_SLtemp( T1 , T1 , model->HSM2_nsubpfac , model->HSM2_nsubpdlt ) ; here->HSM2_nsubp *= T1 ; } /* Note: Sign Changed --> */ Nsubpp = here->HSM2_nsubp * (1.0e0 + (model->HSM2_nsubpw / pow (WG, model->HSM2_nsubpwp))) ; /* <-- Note: Sign Changed */ if (Lod_half > 0.0) { T1 = 1.0e0 / (1.0e0 + pParam->HSM2_nsubpsti2) ; T2 = pow (pParam->HSM2_nsubpsti1 / Lod_half, pParam->HSM2_nsubpsti3) ; T3 = pow (pParam->HSM2_nsubpsti1 / Lod_half_ref, pParam->HSM2_nsubpsti3) ; Nsubps = Nsubpp * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3) ; } else { Nsubps = Nsubpp ; } T2 = 1.0e0 + ( model->HSM2_nsubcw / pow ( WG, model->HSM2_nsubcwp )) ; T2 *= 1.0e0 + ( model->HSM2_nsubcw2 / pow ( WG, model->HSM2_nsubcwp2 )) ; T3 = modelMKS->HSM2_nsubcmax / here->HSM2_nsubc ; Fn_SUtemp( T1 , T2 , T3 , 0.01 ) ; here->HSM2_nsubc *= T1 ; if (Lod_half > 0.0) { T1 = 1.0e0 / (1.0e0 + pParam->HSM2_nsubcsti2) ; T2 = pow (pParam->HSM2_nsubcsti1 / Lod_half, pParam->HSM2_nsubcsti3) ; T3 = pow (pParam->HSM2_nsubcsti1 / Lod_half_ref, pParam->HSM2_nsubcsti3) ; here->HSM2_nsubc = here->HSM2_nsubc * (1.0e0 + T1 * T2) / (1.0e0 + T1 * T3) ; } if(model->HSM2_coerrrep && (here->HSM2_nsubc <= 0.0)) { fprintf ( stderr , "*** warning(HiSIM): actual NSUBC value is negative -> reset to 1E+15.\n" ) ; fprintf ( stderr , " The model parameter NSUBCW/NSUBCWP and/or NSUBCW2/NSUBCW2P might be wrong.\n" ) ; here->HSM2_nsubc = 1e15 / C_cm2m_p3 ; } if(model->HSM2_coerrrep && (Npext < here->HSM2_nsubc || Npext > here->HSM2_nsubp)) { fprintf ( stderr , "*** warning(HiSIM): actual NPEXT value is smaller than NSUBC and/or greater than NSUBP.\n" ) ; fprintf ( stderr , " ( Npext = %e , NSUBC = %e , NSUBP = %e ) \n",Npext,here->HSM2_nsubc,here->HSM2_nsubp); fprintf ( stderr , " The model parameter NPEXTW and/or NPEXTWP might be wrong.\n" ) ; } if( Lgate > model->HSM2_lp ){ Nsub = (here->HSM2_nsubc * (Lgate - model->HSM2_lp) + Nsubps * model->HSM2_lp) / Lgate ; } else { Nsub = Nsubps + (Nsubps - here->HSM2_nsubc) * (model->HSM2_lp - Lgate) / model->HSM2_lp ; } T3 = 0.5e0 * Lgate - model->HSM2_lp ; Fn_SZtemp( T3 , T3 , lpext_dlt ) ; T1 = Fn_Max(0.0e0, model->HSM2_lpext ) ; T2 = T3 * T1 / ( T3 + T1 ) ; here->HSM2_nsub = Nsub = Nsub + T2 * (Npext - here->HSM2_nsubc) / Lgate ; here->HSM2_qnsub = q_Nsub = C_QE * Nsub ; here->HSM2_qnsub_esi = q_Nsub * C_ESI ; here->HSM2_2qnsub_esi = 2.0 * here->HSM2_qnsub_esi ; /* Pocket Overlap (temperature-independent part) */ if ( Lgate <= 2.0e0 * model->HSM2_lp ) { Nsubb = 2.0e0 * Nsubps - (Nsubps - here->HSM2_nsubc) * Lgate / model->HSM2_lp - here->HSM2_nsubc ; here->HSM2_ptovr0 = log (Nsubb / here->HSM2_nsubc) ; } else { here->HSM2_ptovr0 = 0.0e0 ; } /* costi0 and costi1 for STI transistor model (temperature-independent part) */ here->HSM2_costi00 = sqrt (2.0 * C_QE * pParam->HSM2_nsti * C_ESI ) ; here->HSM2_nsti_p2 = 1.0 / ( pParam->HSM2_nsti * pParam->HSM2_nsti ) ; /* Velocity Temperature Dependence (Temperature-dependent part will be multiplied later.) */ here->HSM2_vmax0 = (1.0e0 + (model->HSM2_vover / pow (LG, model->HSM2_voverp))) * (1.0e0 + (model->HSM2_vovers / pow (WL, model->HSM2_voversp))) ; /* 2 phi_B (temperature-independent) */ /* @300K, with pocket */ here->HSM2_pb20 = 2.0e0 / C_b300 * log (Nsub / C_Nin0) ; /* @300K, w/o pocket */ here->HSM2_pb2c = 2.0e0 / C_b300 * log (here->HSM2_nsubc / C_Nin0) ; /* constant for Poly depletion */ here->HSM2_cnstpgd = pow ( 1e0 + 1e0 / LG , model->HSM2_pgd4 ) * pParam->HSM2_pgd1 ; /* Gate resistance */ if ( here->HSM2_corg == 1 ) { T1 = here->HSM2_xgw + Weff / (3.0e0 * here->HSM2_ngcon); T2 = Lgate - here->HSM2_xgl; here->HSM2_grg = model->HSM2_rshg * T1 / (here->HSM2_ngcon * T2 * here->HSM2_nf); if (here->HSM2_grg > 1.0e-3) here->HSM2_grg = here->HSM2_m / here->HSM2_grg; else { here->HSM2_grg = here->HSM2_m * 1.0e3; if(model->HSM2_coerrrep) printf("warning(HiSIM2): The gate conductance reset to 1.0e3 mho.\n"); } } /* Process source/drain series resistamce */ here->HSM2_rd = 0.0; if ( model->HSM2_rsh > 0.0 ) { here->HSM2_rd += model->HSM2_rsh * here->HSM2_nrd ; } if ( model->HSM2_rd > 0.0 ) { here->HSM2_rd += model->HSM2_rd / here->HSM2_weff_nf ; } here->HSM2_rs = 0.0; if ( model->HSM2_rsh > 0.0 ) { here->HSM2_rs += model->HSM2_rsh * here->HSM2_nrs ; } if ( model->HSM2_rs > 0.0 ) { here->HSM2_rs += model->HSM2_rs / here->HSM2_weff_nf ; } if (model->HSM2_corsrd < 0) { if ( here->HSM2_rd > 0.0 ) { here->HSM2drainConductance = here->HSM2_m / here->HSM2_rd ; } else { here->HSM2drainConductance = 0.0; } if ( here->HSM2_rs > 0.0 ) { here->HSM2sourceConductance = here->HSM2_m / here->HSM2_rs ; } else { here->HSM2sourceConductance = 0.0; } } else if (model->HSM2_corsrd > 0) { here->HSM2drainConductance = 0.0 ; here->HSM2sourceConductance = 0.0 ; if ( here->HSM2_rd > 0.0 && model->HSM2_cothrml != 0 ) { here->HSM2internalGd = here->HSM2_m / here->HSM2_rd ; } else { here->HSM2internalGd = 0.0; } if ( here->HSM2_rs > 0.0 && model->HSM2_cothrml != 0 ) { here->HSM2internalGs = here->HSM2_m / here->HSM2_rs ; } else { here->HSM2internalGs = 0.0; } } else { here->HSM2drainConductance = 0.0 ; here->HSM2sourceConductance = 0.0 ; } /* Body resistance */ if ( here->HSM2_corbnet == 1 ) { if (here->HSM2_rbdb < 1.0e-3) here->HSM2_grbdb = here->HSM2_m * 1.0e3 ; /* in mho */ else here->HSM2_grbdb = here->HSM2_m * ( model->HSM2_gbmin + 1.0 / here->HSM2_rbdb ) ; if (here->HSM2_rbpb < 1.0e-3) here->HSM2_grbpb = here->HSM2_m * 1.0e3 ; else here->HSM2_grbpb = here->HSM2_m * ( model->HSM2_gbmin + 1.0 / here->HSM2_rbpb ) ; if (here->HSM2_rbps < 1.0e-3) here->HSM2_grbps = here->HSM2_m * 1.0e3 ; else here->HSM2_grbps = here->HSM2_m * ( model->HSM2_gbmin + 1.0 / here->HSM2_rbps ) ; if (here->HSM2_rbsb < 1.0e-3) here->HSM2_grbsb = here->HSM2_m * 1.0e3 ; else here->HSM2_grbsb = here->HSM2_m * ( model->HSM2_gbmin + 1.0 / here->HSM2_rbsb ) ; if (here->HSM2_rbpd < 1.0e-3) here->HSM2_grbpd = here->HSM2_m * 1.0e3 ; else here->HSM2_grbpd = here->HSM2_m * ( model->HSM2_gbmin + 1.0 / here->HSM2_rbpd ) ; } /* Vdseff */ T1 = model->HSM2_ddltslp * LG + model->HSM2_ddltict ; here->HSM2_ddlt = T1 * model->HSM2_ddltmax / ( T1 + model->HSM2_ddltmax ) + 1.0 ; /* Isub */ T2 = pow( Weff , model->HSM2_svgswp ) ; here->HSM2_vg2const = pParam->HSM2_svgs * ( 1.0e0 + modelMKS->HSM2_svgsl / pow( here->HSM2_lgate , model->HSM2_svgslp ) ) * ( T2 / ( T2 + modelMKS->HSM2_svgsw ) ) ; here->HSM2_xvbs = pParam->HSM2_svbs * ( 1.0e0 + modelMKS->HSM2_svbsl / pow( here->HSM2_lgate , model->HSM2_svbslp ) ) ; here->HSM2_xgate = modelMKS->HSM2_slg * ( 1.0 + modelMKS->HSM2_slgl / pow( here->HSM2_lgate , model->HSM2_slglp ) ) ; here->HSM2_xsub1 = pParam->HSM2_sub1 * ( 1.0 + modelMKS->HSM2_sub1l / pow( here->HSM2_lgate , model->HSM2_sub1lp ) ) ; here->HSM2_xsub2 = pParam->HSM2_sub2 * ( 1.0 + modelMKS->HSM2_sub2l / here->HSM2_lgate ) ; /* Fringing capacitance */ here->HSM2_cfrng = C_EOX / ( C_Pi / 2.0e0 ) * here->HSM2_weff_nf * log( 1.0e0 + model->HSM2_tpoly / model->HSM2_tox ) ; /* Additional term of lateral-field-induced capacitance */ here->HSM2_cqyb0 = C_m2um * here->HSM2_weff_nf * model->HSM2_xqy1 / pow( LG , model->HSM2_xqy2 ) ; /* Parasitic component of the channel current */ GDLD = model->HSM2_gdld * C_m2um ; here->HSM2_ptl0 = model->HSM2_ptl * pow( LG , - model->HSM2_ptlp ) ; here->HSM2_pt40 = model->HSM2_pt4 * pow( LG , - model->HSM2_pt4p ) ; here->HSM2_gdl0 = model->HSM2_gdl * pow( LG + GDLD , - model->HSM2_gdlp ) ; /*-----------------------------------------------------------* * Temperature dependent constants. *-----------------*/ TTEMP = ckt->CKTtemp ; if ( here->HSM2_temp_Given ) TTEMP = here->HSM2_ktemp ; if ( here->HSM2_dtemp_Given ) { TTEMP = TTEMP + here->HSM2_dtemp ; here->HSM2_ktemp = TTEMP ; } /* Band gap */ T1 = TTEMP - model->HSM2_ktnom ; T2 = TTEMP * TTEMP - model->HSM2_ktnom * model->HSM2_ktnom ; here->HSM2_eg = Eg = here->HSM2_egtnom - pParam->HSM2_bgtmp1 * T1 - pParam->HSM2_bgtmp2 * T2 ; here->HSM2_sqrt_eg = sqrt( Eg ) ; T1 = 1.0 / TTEMP ; T2 = 1.0 / model->HSM2_ktnom ; T3 = here->HSM2_egtnom + model->HSM2_egig + model->HSM2_igtemp2 * ( T1 - T2 ) + model->HSM2_igtemp3 * ( T1 * T1 - T2 * T2 ) ; here->HSM2_egp12 = sqrt ( T3 ) ; here->HSM2_egp32 = T3 * here->HSM2_egp12 ; /* Inverse of the thermal voltage */ here->HSM2_beta = beta = C_QE / (C_KB * TTEMP) ; here->HSM2_beta_inv = 1.0 / beta ; here->HSM2_beta2 = beta * beta ; here->HSM2_betatnom = C_QE / (C_KB * model->HSM2_ktnom) ; /* Intrinsic carrier concentration */ here->HSM2_nin = Nin = C_Nin0 * pow (TTEMP / model->HSM2_ktnom, 1.5e0) * exp (- Eg / 2.0e0 * beta + here->HSM2_egtnom / 2.0e0 * here->HSM2_betatnom) ; /* Phonon Scattering (temperature-dependent part) */ T1 = pow (TTEMP / model->HSM2_ktnom, pParam->HSM2_muetmp) ; here->HSM2_mphn0 = T1 / here->HSM2_mueph ; here->HSM2_mphn1 = here->HSM2_mphn0 * model->HSM2_mueph0 ; /* Pocket Overlap (temperature-dependent part) */ here->HSM2_ptovr = here->HSM2_ptovr0 / beta ; /* Velocity Temperature Dependence */ T1 = TTEMP / model->HSM2_ktnom ; here->HSM2_vmax = here->HSM2_vmax0 * pParam->HSM2_vmax / (1.8 + 0.4 * T1 + 0.1 * T1 * T1 - pParam->HSM2_vtmp * (1.0e0 - T1)) ; /* Coefficient of the F function for bulk charge */ here->HSM2_cnst0 = sqrt ( 2.0 * C_ESI * C_QE * here->HSM2_nsub / beta ) ; here->HSM2_cnst0over = here->HSM2_cnst0 * sqrt( pParam->HSM2_nover / here->HSM2_nsub ) ; /* 2 phi_B (temperature-dependent) */ /* @temp, with pocket */ here->HSM2_pb2 = 2.0e0 / beta * log (here->HSM2_nsub / Nin) ; if ( pParam->HSM2_nover != 0.0) { here->HSM2_pb2over = 2.0 / beta * log( pParam->HSM2_nover / Nin ) ; /* (1 / cnst1 / cnstCoxi) for Ps0LD_iniB */ T1 = here->HSM2_cnst0over * model->HSM2_tox / here->HSM2_cecox ; T2 = pParam->HSM2_nover / Nin ; T1 = T2 * T2 / ( T1 * T1 ) ; here->HSM2_ps0ldinib = T1 ; /* (1 / cnst1 / cnstCoxi) */ }else { here->HSM2_pb2over = 0.0 ; here->HSM2_ps0ldinib = 0.0 ; } /* Depletion Width */ T1 = 2.0e0 * C_ESI / C_QE ; here->HSM2_wdpl = sqrt ( T1 / here->HSM2_nsub ) ; here->HSM2_wdplp = sqrt( T1 / ( here->HSM2_nsubp ) ) ; /* cnst1: n_{p0} / p_{p0} */ T1 = Nin / here->HSM2_nsub ; here->HSM2_cnst1 = T1 * T1 ; /* for substrate-source/drain junction diode. */ js = pParam->HSM2_js0 * exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta + model->HSM2_xti * log (TTEMP / model->HSM2_ktnom)) / pParam->HSM2_nj) ; jssw = pParam->HSM2_js0sw * exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta + model->HSM2_xti * log (TTEMP / model->HSM2_ktnom)) / model->HSM2_njsw) ; js2 = pParam->HSM2_js0 * exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta + model->HSM2_xti2 * log (TTEMP / model->HSM2_ktnom)) / pParam->HSM2_nj) ; jssw2 = pParam->HSM2_js0sw * exp ((here->HSM2_egtnom * here->HSM2_betatnom - Eg * beta + model->HSM2_xti2 * log (TTEMP / model->HSM2_ktnom)) / model->HSM2_njsw) ; here->HSM2_isbd = here->HSM2_ad * js + here->HSM2_pd * jssw ; here->HSM2_isbd2 = here->HSM2_ad * js2 + here->HSM2_pd * jssw2 ; here->HSM2_isbs = here->HSM2_as * js + here->HSM2_ps * jssw ; here->HSM2_isbs2 = here->HSM2_as * js2 + here->HSM2_ps * jssw2 ; here->HSM2_vbdt = pParam->HSM2_nj / beta * log (pParam->HSM2_vdiffj * (TTEMP / model->HSM2_ktnom) * (TTEMP / model->HSM2_ktnom) / (here->HSM2_isbd + 1.0e-50) + 1) ; here->HSM2_vbst = pParam->HSM2_nj / beta * log (pParam->HSM2_vdiffj * (TTEMP / model->HSM2_ktnom) * (TTEMP / model->HSM2_ktnom) / (here->HSM2_isbs + 1.0e-50) + 1) ; here->HSM2_exptemp = exp (((TTEMP / model->HSM2_ktnom) - 1) * model->HSM2_ctemp) ; here->HSM2_jd_nvtm_inv = 1.0 / ( pParam->HSM2_nj / beta ) ; here->HSM2_jd_expcd = exp (here->HSM2_vbdt * here->HSM2_jd_nvtm_inv ) ; here->HSM2_jd_expcs = exp (here->HSM2_vbst * here->HSM2_jd_nvtm_inv ) ; /* costi0 and costi1 for STI transistor model (temperature-dependent part) */ here->HSM2_costi0 = here->HSM2_costi00 * sqrt(here->HSM2_beta_inv) ; here->HSM2_costi0_p2 = here->HSM2_costi0 * here->HSM2_costi0 ; here->HSM2_costi1 = here->HSM2_nin * here->HSM2_nin * here->HSM2_nsti_p2 ; /* check if SC3 is too large */ if (pParam->HSM2_sc3 && model->HSM2_sc3Vbs < 0.0) { beta = here->HSM2_beta ; beta_inv = here->HSM2_beta_inv ; Weff = here->HSM2_weff ; Vfb = pParam->HSM2_vfbc ; Pb20 = here->HSM2_pb20 ; cnst0 = here->HSM2_cnst0 ; cnst1 = here->HSM2_cnst1 ; c_eox = here->HSM2_cecox ; Tox = model->HSM2_tox ; Cox = c_eox / Tox ; Cox_inv = 1.0 / Cox ; fac1 = cnst0 * Cox_inv ; Vgs_min = model->HSM2_type * model->HSM2_Vgsmin ; sc3Vbs = model->HSM2_sc3Vbs ; sc3Vgs = 2.0 ; Ps0_min = 2.0 * beta_inv * log(-Vgs_min/fac1) ; /* approximate solution of Poisson equation for large Vgs and negative Vbs (3 iterations!)*/ Vgp = sc3Vgs - Vfb; Denom = fac1*sqrt(cnst1); Ps0 = 2.0 * beta_inv * log(Vgp/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); Ps0_dVbs = 0.0; T1 = here->HSM2_2qnsub_esi ; Qb0 = sqrt ( T1 ) ; Vthp = Ps0 + Vfb + Qb0 * Cox_inv + here->HSM2_ptovr ; T1 = 2.0 * C_QE * here->HSM2_nsubc * C_ESI ; T2 = sqrt( T1 ) ; Vth0 = Ps0 + Vfb + T2 * Cox_inv ; T1 = C_ESI * Cox_inv ; T2 = here->HSM2_wdplp ; T4 = 1.0e0 / ( model->HSM2_lp * model->HSM2_lp ) ; T3 = 2.0 * ( model->HSM2_vbi - Pb20 ) * T2 * T4 ; T5 = T1 * T3 ; T6 = Ps0 - sc3Vbs ; T6_dVb = Ps0_dVbs - 1.0 ; dVth0 = T5 * sqrt( T6 ) ; dVth0_dVb = T5 * 0.5 / sqrt( T6 ) * T6_dVb; T1 = Vthp - Vth0 ; T9 = Ps0 - sc3Vbs ; T9_dVb = Ps0_dVbs - 1.0 ; T3 = pParam->HSM2_scp1 + pParam->HSM2_scp3 * T9 / model->HSM2_lp; T3_dVb = pParam->HSM2_scp3 * T9_dVb / model->HSM2_lp ; dVthLP = T1 * dVth0 * T3 ; dVthLP_dVb = T1 * dVth0_dVb * T3 + T1 * dVth0 * T3_dVb; T3 = here->HSM2_lgate - model->HSM2_parl2 ; T4 = 1.0e0 / ( T3 * T3 ) ; T0 = C_ESI * here->HSM2_wdpl * 2.0e0 * ( model->HSM2_vbi - Pb20 ) * T4 ; T2 = T0 * Cox_inv ; T5 = pParam->HSM2_sc3 / here->HSM2_lgate ; T6 = pParam->HSM2_sc1 + T5 * ( Ps0 - sc3Vbs ) ; T1 = T6 ; A = T2 * T1 ; T9 = Ps0 - sc3Vbs + Ps0_min ; T9_dVb = Ps0_dVbs - 1.0 ; T8 = sqrt( T9 ) ; T8_dVb = 0.5 * T9_dVb / T8 ; dVthSC = A * T8 ; T1 = 1.0 / Cox ; T3 = 1.0 / ( Cox + pParam->HSM2_wfc / Weff ) ; T5 = T1 - T3 ; dVthW = Qb0 * T5 + pParam->HSM2_wvth0 / here->HSM2_wg ; dVth = dVthSC + dVthLP + dVthW + here->HSM2_dVthsm ; dPpg = 0.0 ; Vgp = sc3Vgs - Vfb + dVth - dPpg ; /* Recalculation of Ps0, using more accurate Vgp */ Ps0 = 2.0 * beta_inv * log(Vgp/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); Ps0 = 2.0 * beta_inv * log((Vgp-Ps0)/Denom); term1 = Vgp - Ps0; term2 = sqrt(beta*(Ps0-sc3Vbs)-1.0); term3 = term1 + fac1 * term2; term4 = cnst1 * exp(beta*Ps0); limVgp_dVbs = - beta * (term3 + 0.5*fac1 * term4/term2) / (2.0*term1/fac1/fac1*term3 - term4); T2 = T0 * Cox_inv ; sc3lim = here->HSM2_lgate / T2 * (limVgp_dVbs - dVthLP_dVb - T2*pParam->HSM2_sc1*T8_dVb) / ((Ps0-sc3Vbs)*T8_dVb +(Ps0_dVbs-1.0)*T8); if (sc3lim < 1.0e-20) sc3lim = 1e-20 ; if (sc3lim < pParam->HSM2_sc3 * 0.999) { pParam->HSM2_sc3 = sc3lim; } } } /* End of instance loop */ } return(OK); } ngspice-26/src/spicelib/devices/hisim2/hsm2cvtest.c0000644000265600020320000001171712264261473021704 0ustar andreasadmin/*********************************************************************** HiSIM (Hiroshima University STARC IGFET Model) Copyright (C) 2012 Hiroshima University & STARC MODEL NAME : HiSIM ( VERSION : 2 SUBVERSION : 7 REVISION : 0 ) Beta FILE : hsm2cvtest.c Date : 2012.10.25 released by Hiroshima University & Semiconductor Technology Academic Research Center (STARC) ***********************************************************************/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "hsm2def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int HSM2convTest( GENmodel *inModel, register CKTcircuit *ckt) { register HSM2model *model = (HSM2model*)inModel; register HSM2instance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cd, cdhat, tol0, tol1, tol2, tol3, tol4, vgd, vgdo, vgs; double Ibtot, cbhat, Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; /* loop through all the HSM2 device models */ for ( ; model != NULL; model = model->HSM2nextModel ) { /* loop through all the instances of the model */ for ( here = model->HSM2instances; here != NULL ; here = here->HSM2nextInstance ) { vbs = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2bNode) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vgs = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2gNode) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vds = model->HSM2_type * (*(ckt->CKTrhsOld+here->HSM2dNodePrime) - *(ckt->CKTrhsOld+here->HSM2sNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->HSM2vgs) - *(ckt->CKTstate0 + here->HSM2vds); delvbs = vbs - *(ckt->CKTstate0 + here->HSM2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->HSM2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->HSM2vgs); delvds = vds - *(ckt->CKTstate0 + here->HSM2vds); delvgd = vgd - vgdo; cd = here->HSM2_ids - here->HSM2_ibd; if ( here->HSM2_mode >= 0 ) { cd += here->HSM2_isub + here->HSM2_igidl; cdhat = cd - here->HSM2_gbd * delvbd + (here->HSM2_gmbs + here->HSM2_gbbs + here->HSM2_gigidlbs) * delvbs + (here->HSM2_gm + here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgs + (here->HSM2_gds + here->HSM2_gbds + here->HSM2_gigidlds) * delvds; Ibtot = here->HSM2_ibs + here->HSM2_ibd - here->HSM2_isub - here->HSM2_igidl - here->HSM2_igisl; cbhat = Ibtot + here->HSM2_gbd * delvbd + (here->HSM2_gbs - here->HSM2_gbbs - here->HSM2_gigidlbs) * delvbs - (here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgs - (here->HSM2_gbds + here->HSM2_gigidlds) * delvds - here->HSM2_gigislgd * delvgd - here->HSM2_gigislbd * delvbd + here->HSM2_gigislsd * delvds; Igstot = here->HSM2_igs; cgshat = Igstot + here->HSM2_gigsg * delvgs + here->HSM2_gigsd * delvds + here->HSM2_gigsb * delvbs; Igdtot = here->HSM2_igd; cgdhat = Igdtot + here->HSM2_gigdg * delvgs + here->HSM2_gigdd * delvds + here->HSM2_gigdb * delvbs; Igbtot = here->HSM2_igb; cgbhat = Igbtot + here->HSM2_gigbg * delvgs + here->HSM2_gigbd * delvds + here->HSM2_gigbb * delvbs; } else { cd -= here->HSM2_igidl; cdhat = cd + (here->HSM2_gmbs + here->HSM2_gbd - here->HSM2_gigidlbs) * delvbd + (here->HSM2_gm - here->HSM2_gigidlgs) * delvgd + (- here->HSM2_gds + here->HSM2_gigidlds) * delvds; Ibtot = here->HSM2_ibs + here->HSM2_ibd - here->HSM2_isub - here->HSM2_igidl - here->HSM2_igisl; cbhat = Ibtot + here->HSM2_gbs * delvbs + (here->HSM2_gbd - here->HSM2_gbbs - here->HSM2_gigidlbs) * delvbd - (here->HSM2_gbgs + here->HSM2_gigidlgs) * delvgd + (here->HSM2_gbds + here->HSM2_gigidlds) * delvds - here->HSM2_gigislgd * delvgd - here->HSM2_gigislbd * delvbd + here->HSM2_gigislsd * delvds; Igbtot = here->HSM2_igb; cgbhat = Igbtot + here->HSM2_gigbg * delvgd - here->HSM2_gigbs * delvds + here->HSM2_gigbb * delvbd; Igstot = here->HSM2_igs; cgshat = Igstot + here->HSM2_gigsg * delvgd - here->HSM2_gigss * delvds + here->HSM2_gigsb * delvbd; Igdtot = here->HSM2_igd; cgdhat = Igdtot + here->HSM2_gigdg * delvgd - here->HSM2_gigds * delvds + here->HSM2_gigdb * delvbd; } /* * check convergence */ if ( here->HSM2_off == 0 || !(ckt->CKTmode & MODEINITFIX) ) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if ( (fabs(cdhat - cd) >= tol0) || (fabs(cgshat - Igstot) >= tol1) || (fabs(cgdhat - Igdtot) >= tol2) || (fabs(cgbhat - Igbtot) >= tol3) || (fabs(cbhat - Ibtot) >= tol4) ) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/cktsoachk.c0000644000265600020320000000212312264261473020350 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ /* * This is a driver program to iterate through all the various SOA check * functions provided for the circuit elements in the given circuit */ #include "ngspice/config.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "dev.h" int CKTsoaInit(void) { int i; SPICEdev **devs = devices(); for (i = 0; i < DEVmaxnum; i++) if (devs[i] && devs[i]->DEVsoaCheck) devs[i]->DEVsoaCheck (NULL, NULL); return OK; } int CKTsoaCheck(CKTcircuit *ckt) { int i, error; if (ckt->CKTmode & (MODEDC | MODEDCOP | MODEDCTRANCURVE | MODETRAN | MODETRANOP)) { SPICEdev **devs = devices(); for (i = 0; i < DEVmaxnum; i++) { if (devs[i] && devs[i]->DEVsoaCheck && ckt->CKThead[i]) { error = devs[i]->DEVsoaCheck (ckt, ckt->CKThead[i]); if (error) return error; } } } return OK; } ngspice-26/src/spicelib/devices/bsim1/0000755000265600020320000000000012264261705017245 5ustar andreasadminngspice-26/src/spicelib/devices/bsim1/b1trunc.c0000644000265600020320000000207112264261473020771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { B1model *model = (B1model*)inModel; B1instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for( ; model != NULL; model = model->B1nextModel) { for(here=model->B1instances;here!=NULL;here = here->B1nextInstance){ #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B1qb,ckt,timeStep); CKTterr(here->B1qg,ckt,timeStep); CKTterr(here->B1qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B1name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1cvtest.c0000644000265600020320000000743412264261473021156 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1convTest(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { B1model *model = (B1model*)inModel; B1instance *here; double cbd; double cbhat; double cbs; double cd; double cdhat; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double tol; double vbd; double vbs; double vds; double vgd; double vgdo; double vgs; /* loop through all the B1 device models */ for( ; model != NULL; model = model->B1nextModel ) { /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { vbs = model->B1type * ( *(ckt->CKTrhsOld+here->B1bNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vgs = model->B1type * ( *(ckt->CKTrhsOld+here->B1gNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vds = model->B1type * ( *(ckt->CKTrhsOld+here->B1dNodePrime) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->B1vgs) - *(ckt->CKTstate0 + here->B1vds); delvbs = vbs - *(ckt->CKTstate0 + here->B1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->B1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->B1vgs); delvds = vds - *(ckt->CKTstate0 + here->B1vds); delvgd = vgd-vgdo; if (here->B1mode >= 0) { cdhat= *(ckt->CKTstate0 + here->B1cd) - *(ckt->CKTstate0 + here->B1gbd) * delvbd + *(ckt->CKTstate0 + here->B1gmbs) * delvbs + *(ckt->CKTstate0 + here->B1gm) * delvgs + *(ckt->CKTstate0 + here->B1gds) * delvds ; } else { cdhat= *(ckt->CKTstate0 + here->B1cd) - ( *(ckt->CKTstate0 + here->B1gbd) - *(ckt->CKTstate0 + here->B1gmbs)) * delvbd - *(ckt->CKTstate0 + here->B1gm) * delvgd + *(ckt->CKTstate0 + here->B1gds) * delvds; } cbhat= *(ckt->CKTstate0 + here->B1cbs) + *(ckt->CKTstate0 + here->B1cbd) + *(ckt->CKTstate0 + here->B1gbd) * delvbd + *(ckt->CKTstate0 + here->B1gbs) * delvbs ; cd = *(ckt->CKTstate0 + here->B1cd); cbs = *(ckt->CKTstate0 + here->B1cbs); cbd = *(ckt->CKTstate0 + here->B1cbd); /* * check convergence */ if ( (here->B1off == 0) || (!(ckt->CKTmode & MODEINITFIX)) ){ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol; if (fabs(cdhat-cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } tol=ckt->CKTreltol*MAX(fabs(cbhat),fabs(cbs+cbd))+ ckt->CKTabstol; if (fabs(cbhat-(cbs+cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/bsim1ext.h0000644000265600020320000000260612264261473021160 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong June Park, Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int B1acLoad(GENmodel *,CKTcircuit*); extern int B1ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B1convTest(GENmodel *,CKTcircuit*); extern int B1delete(GENmodel*,IFuid,GENinstance**); extern void B1destroy(GENmodel**); extern int B1getic(GENmodel*,CKTcircuit*); extern int B1load(GENmodel*,CKTcircuit*); extern int B1mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B1mDelete(GENmodel**,IFuid,GENmodel*); extern int B1mParam(int,IFvalue*,GENmodel*); extern void B1mosCap(CKTcircuit*, double, double, double, double*, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B1noise (int, int, GENmodel *, CKTcircuit *, Ndata *, double *); extern int B1param(int,IFvalue*,GENinstance*,IFvalue*); extern int B1pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B1setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B1unsetup(GENmodel*,CKTcircuit*); extern int B1temp(GENmodel*,CKTcircuit*); extern int B1trunc(GENmodel*,CKTcircuit*,double*); extern int B1disto(int,GENmodel*,CKTcircuit*); extern int B1dSetup(GENmodel*, register CKTcircuit*); ngspice-26/src/spicelib/devices/bsim1/b1moscap.c0000644000265600020320000000432312264261473021122 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/suffix.h" /* routine to calculate equivalent conductance and total terminal * charges */ void B1mosCap( CKTcircuit *ckt, double vgd, double vgs, double vgb, double args[8], /* double GateDrainOverlapCap, double GateSourceOverlapCap, double GateBulkOverlapCap, double capbd, double capbs, double cggb, double cgdb, double cgsb, */ double cbgb, double cbdb, double cbsb, double cdgb, double cddb, double cdsb, double *gcggbPointer, double *gcgdbPointer, double *gcgsbPointer, double *gcbgbPointer, double *gcbdbPointer, double *gcbsbPointer, double *gcdgbPointer, double *gcddbPointer, double *gcdsbPointer, double *gcsgbPointer, double *gcsdbPointer, double *gcssbPointer, double *qGatePointer, double *qBulkPointer, double *qDrainPointer, double *qSourcePointer) { double qgd; double qgs; double qgb; double ag0; ag0 = ckt->CKTag[0]; /* compute equivalent conductance */ *gcdgbPointer = (cdgb - args[0]) * ag0; *gcddbPointer = (cddb + args[3] + args[0]) * ag0; *gcdsbPointer = cdsb * ag0; *gcsgbPointer = -(args[5] + cbgb + cdgb + args[1]) * ag0; *gcsdbPointer = -(args[6] + cbdb + cddb ) * ag0; *gcssbPointer = (args[4] + args[1] - (args[7] + cbsb + cdsb )) * ag0; *gcggbPointer = (args[5] + args[0] + args[1] + args[2] ) * ag0; *gcgdbPointer = (args[6] - args[0]) * ag0; *gcgsbPointer = (args[7] - args[1]) * ag0; *gcbgbPointer = (cbgb - args[2]) * ag0; *gcbdbPointer = (cbdb - args[3]) * ag0; *gcbsbPointer = (cbsb - args[4]) * ag0; /* compute total terminal charge */ qgd = args[0] * vgd; qgs = args[1] * vgs; qgb = args[2] * vgb; *qGatePointer = *qGatePointer + qgd + qgs + qgb; *qBulkPointer = *qBulkPointer - qgb; *qDrainPointer = *qDrainPointer - qgd; *qSourcePointer = -(*qGatePointer + *qBulkPointer + *qDrainPointer); } ngspice-26/src/spicelib/devices/bsim1/b1ld.c0000644000265600020320000007100212264261473020235 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B1load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { B1model *model = (B1model*)inModel; B1instance *here; double DrainSatCurrent = 0.0; double EffectiveLength = 0.0; double GateBulkOverlapCap = 0.0; double GateDrainOverlapCap = 0.0; double GateSourceOverlapCap = 0.0; double SourceSatCurrent = 0.0; double DrainArea = 0.0; double SourceArea = 0.0; double DrainPerimeter = 0.0; double SourcePerimeter = 0.0; double arg = 0.0; double capbd = 0.0; double capbs = 0.0; double cbd = 0.0; double cbhat = 0.0; double cbs = 0.0; double cd = 0.0; double cdrain = 0.0; double cdhat = 0.0; double cdreq = 0.0; double ceq = 0.0; double ceqbd = 0.0; double ceqbs = 0.0; double ceqqb = 0.0; double ceqqd = 0.0; double ceqqg = 0.0; double czbd = 0.0; double czbdsw = 0.0; double czbs = 0.0; double czbssw = 0.0; double delvbd = 0.0; double delvbs = 0.0; double delvds = 0.0; double delvgd = 0.0; double delvgs = 0.0; double evbd = 0.0; double evbs = 0.0; double gbd = 0.0; double gbs = 0.0; double gcbdb = 0.0; double gcbgb = 0.0; double gcbsb = 0.0; double gcddb = 0.0; double gcdgb = 0.0; double gcdsb = 0.0; double gcgdb = 0.0; double gcggb = 0.0; double gcgsb = 0.0; double gcsdb = 0.0; double gcsgb = 0.0; double gcssb = 0.0; double gds = 0.0; double geq = 0.0; double gm = 0.0; double gmbs = 0.0; double sarg = 0.0; double sargsw = 0.0; double vbd = 0.0; double vbs = 0.0; double vcrit = 0.0; double vds = 0.0; double vdsat = 0.0; double vgb = 0.0; double vgd = 0.0; double vgdo = 0.0; double vgs = 0.0; double von = 0.0; #ifndef PREDICTOR double xfact = 0.0; #endif double xnrm = 0.0; double xrev = 0.0; int Check = 0; double cgdb = 0.0; double cgsb = 0.0; double cbdb = 0.0; double cdgb = 0.0; double cddb = 0.0; double cdsb = 0.0; double cggb = 0.0; double cbgb = 0.0; double cbsb = 0.0; double csgb = 0.0; double cssb = 0.0; double csdb = 0.0; double PhiB = 0.0; double PhiBSW = 0.0; double MJ = 0.0; double MJSW = 0.0; double argsw = 0.0; double qgate = 0.0; double qbulk = 0.0; double qdrn = 0.0; double qsrc = 0.0; double cqgate = 0.0; double cqbulk = 0.0; double cqdrn = 0.0; double vt0 = 0.0; double args[8]; int ByPass = 0; #ifndef NOBYPASS double tempv = 0.0; #endif /*NOBYPASS*/ int error = 0; double m; /* parallel multiplier */ /* loop through all the B1 device models */ for( ; model != NULL; model = model->B1nextModel ) { /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */ DrainArea = here->B1drainArea; SourceArea = here->B1sourceArea; DrainPerimeter = here->B1drainPerimeter; SourcePerimeter = here->B1sourcePerimeter; if( (DrainSatCurrent=DrainArea*model->B1jctSatCurDensity) < 1e-15){ DrainSatCurrent = 1.0e-15; } if( (SourceSatCurrent=SourceArea*model->B1jctSatCurDensity) <1.0e-15){ SourceSatCurrent = 1.0e-15; } GateSourceOverlapCap = model->B1gateSourceOverlapCap *here->B1w; GateDrainOverlapCap = model->B1gateDrainOverlapCap * here->B1w; GateBulkOverlapCap = model->B1gateBulkOverlapCap *EffectiveLength; von = model->B1type * here->B1von; vdsat = model->B1type * here->B1vdsat; vt0 = model->B1type * here->B1vt0; Check=1; ByPass = 0; if((ckt->CKTmode & MODEINITSMSIG)) { vbs= *(ckt->CKTstate0 + here->B1vbs); vgs= *(ckt->CKTstate0 + here->B1vgs); vds= *(ckt->CKTstate0 + here->B1vds); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs= *(ckt->CKTstate1 + here->B1vbs); vgs= *(ckt->CKTstate1 + here->B1vgs); vds= *(ckt->CKTstate1 + here->B1vds); } else if((ckt->CKTmode & MODEINITJCT) && !here->B1off) { vds= model->B1type * here->B1icVDS; vgs= model->B1type * here->B1icVGS; vbs= model->B1type * here->B1icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEAC|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = vt0; vds = 0; } } else if((ckt->CKTmode & (MODEINITJCT | MODEINITFIX) ) && (here->B1off)) { vbs=vgs=vds=0; } else { #ifndef PREDICTOR if((ckt->CKTmode & MODEINITPRED)) { xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B1vbs) = *(ckt->CKTstate1 + here->B1vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->B1vbs)) -(xfact * (*(ckt->CKTstate2 + here->B1vbs))); *(ckt->CKTstate0 + here->B1vgs) = *(ckt->CKTstate1 + here->B1vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->B1vgs)) -(xfact * (*(ckt->CKTstate2 + here->B1vgs))); *(ckt->CKTstate0 + here->B1vds) = *(ckt->CKTstate1 + here->B1vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->B1vds)) -(xfact * (*(ckt->CKTstate2 + here->B1vds))); *(ckt->CKTstate0 + here->B1vbd) = *(ckt->CKTstate0 + here->B1vbs)- *(ckt->CKTstate0 + here->B1vds); *(ckt->CKTstate0 + here->B1cd) = *(ckt->CKTstate1 + here->B1cd); *(ckt->CKTstate0 + here->B1cbs) = *(ckt->CKTstate1 + here->B1cbs); *(ckt->CKTstate0 + here->B1cbd) = *(ckt->CKTstate1 + here->B1cbd); *(ckt->CKTstate0 + here->B1gm) = *(ckt->CKTstate1 + here->B1gm); *(ckt->CKTstate0 + here->B1gds) = *(ckt->CKTstate1 + here->B1gds); *(ckt->CKTstate0 + here->B1gmbs) = *(ckt->CKTstate1 + here->B1gmbs); *(ckt->CKTstate0 + here->B1gbd) = *(ckt->CKTstate1 + here->B1gbd); *(ckt->CKTstate0 + here->B1gbs) = *(ckt->CKTstate1 + here->B1gbs); *(ckt->CKTstate0 + here->B1cggb) = *(ckt->CKTstate1 + here->B1cggb); *(ckt->CKTstate0 + here->B1cbgb) = *(ckt->CKTstate1 + here->B1cbgb); *(ckt->CKTstate0 + here->B1cbsb) = *(ckt->CKTstate1 + here->B1cbsb); *(ckt->CKTstate0 + here->B1cgdb) = *(ckt->CKTstate1 + here->B1cgdb); *(ckt->CKTstate0 + here->B1cgsb) = *(ckt->CKTstate1 + here->B1cgsb); *(ckt->CKTstate0 + here->B1cbdb) = *(ckt->CKTstate1 + here->B1cbdb); *(ckt->CKTstate0 + here->B1cdgb) = *(ckt->CKTstate1 + here->B1cdgb); *(ckt->CKTstate0 + here->B1cddb) = *(ckt->CKTstate1 + here->B1cddb); *(ckt->CKTstate0 + here->B1cdsb) = *(ckt->CKTstate1 + here->B1cdsb); } else { #endif /* PREDICTOR */ vbs = model->B1type * ( *(ckt->CKTrhsOld+here->B1bNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vgs = model->B1type * ( *(ckt->CKTrhsOld+here->B1gNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vds = model->B1type * ( *(ckt->CKTrhsOld+here->B1dNodePrime) - *(ckt->CKTrhsOld+here->B1sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->B1vgs) - *(ckt->CKTstate0 + here->B1vds); delvbs = vbs - *(ckt->CKTstate0 + here->B1vbs); delvbd = vbd - *(ckt->CKTstate0 + here->B1vbd); delvgs = vgs - *(ckt->CKTstate0 + here->B1vgs); delvds = vds - *(ckt->CKTstate0 + here->B1vds); delvgd = vgd-vgdo; if (here->B1mode >= 0) { cdhat= *(ckt->CKTstate0 + here->B1cd) - *(ckt->CKTstate0 + here->B1gbd) * delvbd + *(ckt->CKTstate0 + here->B1gmbs) * delvbs + *(ckt->CKTstate0 + here->B1gm) * delvgs + *(ckt->CKTstate0 + here->B1gds) * delvds ; } else { cdhat= *(ckt->CKTstate0 + here->B1cd) - ( *(ckt->CKTstate0 + here->B1gbd) - *(ckt->CKTstate0 + here->B1gmbs)) * delvbd - *(ckt->CKTstate0 + here->B1gm) * delvgd + *(ckt->CKTstate0 + here->B1gds) * delvds; } cbhat= *(ckt->CKTstate0 + here->B1cbs) + *(ckt->CKTstate0 + here->B1cbd) + *(ckt->CKTstate0 + here->B1gbd) * delvbd + *(ckt->CKTstate0 + here->B1gbs) * delvbs ; #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ tempv = MAX(fabs(cbhat),fabs(*(ckt->CKTstate0 + here->B1cbs) + *(ckt->CKTstate0 + here->B1cbd)))+ckt->CKTabstol; if((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) ) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B1vbs)))+ ckt->CKTvoltTol)) ) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B1vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B1vgs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B1vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- *(ckt->CKTstate0 + here->B1cd)) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(*(ckt->CKTstate0 + here->B1cd))) + ckt->CKTabstol) ) if ( (fabs(cbhat-(*(ckt->CKTstate0 + here->B1cbs) + *(ckt->CKTstate0 + here->B1cbd))) < ckt->CKTreltol * tempv)) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B1vbs); vbd = *(ckt->CKTstate0 + here->B1vbd); vgs = *(ckt->CKTstate0 + here->B1vgs); vds = *(ckt->CKTstate0 + here->B1vds); vgd = vgs - vds; vgb = vgs - vbs; cd = *(ckt->CKTstate0 + here->B1cd); cbs = *(ckt->CKTstate0 + here->B1cbs); cbd = *(ckt->CKTstate0 + here->B1cbd); cdrain = here->B1mode * (cd + cbd); gm = *(ckt->CKTstate0 + here->B1gm); gds = *(ckt->CKTstate0 + here->B1gds); gmbs = *(ckt->CKTstate0 + here->B1gmbs); gbd = *(ckt->CKTstate0 + here->B1gbd); gbs = *(ckt->CKTstate0 + here->B1gbs); if((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { cggb = *(ckt->CKTstate0 + here->B1cggb); cgdb = *(ckt->CKTstate0 + here->B1cgdb); cgsb = *(ckt->CKTstate0 + here->B1cgsb); cbgb = *(ckt->CKTstate0 + here->B1cbgb); cbdb = *(ckt->CKTstate0 + here->B1cbdb); cbsb = *(ckt->CKTstate0 + here->B1cbsb); cdgb = *(ckt->CKTstate0 + here->B1cdgb); cddb = *(ckt->CKTstate0 + here->B1cddb); cdsb = *(ckt->CKTstate0 + here->B1cdsb); capbs = *(ckt->CKTstate0 + here->B1capbs); capbd = *(ckt->CKTstate0 + here->B1capbd); ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = model->B1type * here->B1von; if(*(ckt->CKTstate0 + here->B1vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->B1vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->B1vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->B1vds))); vgs = vgd + vds; } if(vds >= 0) { vcrit =CONSTvt0*log(CONSTvt0/(CONSTroot2*SourceSatCurrent)); vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->B1vbs), CONSTvt0,vcrit,&Check); /* B1 test */ vbd = vbs-vds; } else { vcrit = CONSTvt0*log(CONSTvt0/(CONSTroot2*DrainSatCurrent)); vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->B1vbd), CONSTvt0,vcrit,&Check); /* B1 test*/ vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; if(vbs <= 0.0 ) { gbs = SourceSatCurrent / CONSTvt0 + ckt->CKTgmin; cbs = gbs * vbs ; } else { evbs = exp(vbs/CONSTvt0); gbs = SourceSatCurrent*evbs/CONSTvt0 + ckt->CKTgmin; cbs = SourceSatCurrent * (evbs-1) + ckt->CKTgmin * vbs ; } if(vbd <= 0.0) { gbd = DrainSatCurrent / CONSTvt0 + ckt->CKTgmin; cbd = gbd * vbd ; } else { evbd = exp(vbd/CONSTvt0); gbd = DrainSatCurrent*evbd/CONSTvt0 +ckt->CKTgmin; cbd = DrainSatCurrent *(evbd-1)+ckt->CKTgmin*vbd; } /* line 400 */ if(vds >= 0) { /* normal mode */ here->B1mode = 1; } else { /* inverse mode */ here->B1mode = -1; } /* call B1evaluate to calculate drain current and its * derivatives and charge and capacitances related to gate * drain, and bulk */ if( vds >= 0 ) { B1evaluate(vds,vbs,vgs,here,model,&gm,&gds,&gmbs,&qgate, &qbulk,&qdrn,&cggb,&cgdb,&cgsb,&cbgb,&cbdb,&cbsb,&cdgb, &cddb,&cdsb,&cdrain,&von,&vdsat,ckt); } else { B1evaluate(-vds,vbd,vgd,here,model,&gm,&gds,&gmbs,&qgate, &qbulk,&qsrc,&cggb,&cgsb,&cgdb,&cbgb,&cbsb,&cbdb,&csgb, &cssb,&csdb,&cdrain,&von,&vdsat,ckt); } here->B1von = model->B1type * von; here->B1vdsat = model->B1type * vdsat; /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ cd=here->B1mode * cdrain - cbd; if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP ) && (ckt->CKTmode & MODEUIC))) { /* * charge storage elements * * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ czbd = model->B1unitAreaJctCap * DrainArea; czbs = model->B1unitAreaJctCap * SourceArea; czbdsw= model->B1unitLengthSidewallJctCap * DrainPerimeter; czbssw= model->B1unitLengthSidewallJctCap * SourcePerimeter; PhiB = model->B1bulkJctPotential; PhiBSW = model->B1sidewallJctPotential; MJ = model->B1bulkJctBotGradingCoeff; MJSW = model->B1bulkJctSideGradingCoeff; /* Source Bulk Junction */ if( vbs < 0 ) { arg = 1 - vbs / PhiB; argsw = 1 - vbs / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); *(ckt->CKTstate0 + here->B1qbs) = PhiB * czbs * (1-arg*sarg)/(1-MJ) + PhiBSW * czbssw * (1-argsw*sargsw)/(1-MJSW); capbs = czbs * sarg + czbssw * sargsw ; } else { *(ckt->CKTstate0+here->B1qbs) = vbs*(czbs+czbssw)+ vbs*vbs*(czbs*MJ*0.5/PhiB + czbssw * MJSW * 0.5/PhiBSW); capbs = czbs + czbssw + vbs *(czbs*MJ/PhiB+ czbssw * MJSW / PhiBSW ); } /* Drain Bulk Junction */ if( vbd < 0 ) { arg = 1 - vbd / PhiB; argsw = 1 - vbd / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); *(ckt->CKTstate0 + here->B1qbd) = PhiB * czbd * (1-arg*sarg)/(1-MJ) + PhiBSW * czbdsw * (1-argsw*sargsw)/(1-MJSW); capbd = czbd * sarg + czbdsw * sargsw ; } else { *(ckt->CKTstate0+here->B1qbd) = vbd*(czbd+czbdsw)+ vbd*vbd*(czbd*MJ*0.5/PhiB + czbdsw * MJSW * 0.5/PhiBSW); capbd = czbd + czbdsw + vbd *(czbd*MJ/PhiB+ czbdsw * MJSW / PhiBSW ); } } /* * check convergence */ if ( (here->B1off == 0) || (!(ckt->CKTmode & MODEINITFIX)) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->B1vbs) = vbs; *(ckt->CKTstate0 + here->B1vbd) = vbd; *(ckt->CKTstate0 + here->B1vgs) = vgs; *(ckt->CKTstate0 + here->B1vds) = vds; *(ckt->CKTstate0 + here->B1cd) = cd; *(ckt->CKTstate0 + here->B1cbs) = cbs; *(ckt->CKTstate0 + here->B1cbd) = cbd; *(ckt->CKTstate0 + here->B1gm) = gm; *(ckt->CKTstate0 + here->B1gds) = gds; *(ckt->CKTstate0 + here->B1gmbs) = gmbs; *(ckt->CKTstate0 + here->B1gbd) = gbd; *(ckt->CKTstate0 + here->B1gbs) = gbs; *(ckt->CKTstate0 + here->B1cggb) = cggb; *(ckt->CKTstate0 + here->B1cgdb) = cgdb; *(ckt->CKTstate0 + here->B1cgsb) = cgsb; *(ckt->CKTstate0 + here->B1cbgb) = cbgb; *(ckt->CKTstate0 + here->B1cbdb) = cbdb; *(ckt->CKTstate0 + here->B1cbsb) = cbsb; *(ckt->CKTstate0 + here->B1cdgb) = cdgb; *(ckt->CKTstate0 + here->B1cddb) = cddb; *(ckt->CKTstate0 + here->B1cdsb) = cdsb; *(ckt->CKTstate0 + here->B1capbs) = capbs; *(ckt->CKTstate0 + here->B1capbd) = capbd; /* bulk and channel charge plus overlaps */ if((!(ckt->CKTmode & (MODETRAN | MODEAC))) && ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) && (!(ckt->CKTmode & MODEINITSMSIG))) goto line850; #ifndef NOBYPASS line755: #endif if( here->B1mode > 0 ) { args[0] = GateDrainOverlapCap; args[1] = GateSourceOverlapCap; args[2] = GateBulkOverlapCap; args[3] = capbd; args[4] = capbs; args[5] = cggb; args[6] = cgdb; args[7] = cgsb; B1mosCap(ckt,vgd,vgs,vgb, args, /* GateDrainOverlapCap, GateSourceOverlapCap,GateBulkOverlapCap, capbd,capbs, cggb,cgdb,cgsb, */ cbgb,cbdb,cbsb, cdgb,cddb,cdsb, &gcggb,&gcgdb,&gcgsb, &gcbgb,&gcbdb,&gcbsb, &gcdgb,&gcddb,&gcdsb,&gcsgb,&gcsdb,&gcssb, &qgate,&qbulk, &qdrn,&qsrc); } else { args[0] = GateSourceOverlapCap; args[1] = GateDrainOverlapCap; args[2] = GateBulkOverlapCap; args[3] = capbs; args[4] = capbd; args[5] = cggb; args[6] = cgsb; args[7] = cgdb; B1mosCap(ckt,vgs,vgd,vgb, args, /* GateSourceOverlapCap, GateDrainOverlapCap,GateBulkOverlapCap, capbs,capbd, cggb,cgsb,cgdb, */ cbgb,cbsb,cbdb, csgb,cssb,csdb, &gcggb,&gcgsb,&gcgdb, &gcbgb,&gcbsb,&gcbdb, &gcsgb,&gcssb,&gcsdb,&gcdgb,&gcdsb,&gcddb, &qgate,&qbulk, &qsrc,&qdrn); } if(ByPass) goto line860; *(ckt->CKTstate0 + here->B1qg) = qgate; *(ckt->CKTstate0 + here->B1qd) = qdrn - *(ckt->CKTstate0 + here->B1qbd); *(ckt->CKTstate0 + here->B1qb) = qbulk + *(ckt->CKTstate0 + here->B1qbd) + *(ckt->CKTstate0 + here->B1qbs); /* store small signal parameters */ if((!(ckt->CKTmode & (MODEAC | MODETRAN))) && (ckt->CKTmode & MODETRANOP ) && (ckt->CKTmode & MODEUIC )) goto line850; if(ckt->CKTmode & MODEINITSMSIG ) { *(ckt->CKTstate0+here->B1cggb) = cggb; *(ckt->CKTstate0+here->B1cgdb) = cgdb; *(ckt->CKTstate0+here->B1cgsb) = cgsb; *(ckt->CKTstate0+here->B1cbgb) = cbgb; *(ckt->CKTstate0+here->B1cbdb) = cbdb; *(ckt->CKTstate0+here->B1cbsb) = cbsb; *(ckt->CKTstate0+here->B1cdgb) = cdgb; *(ckt->CKTstate0+here->B1cddb) = cddb; *(ckt->CKTstate0+here->B1cdsb) = cdsb; *(ckt->CKTstate0+here->B1capbd) = capbd; *(ckt->CKTstate0+here->B1capbs) = capbs; goto line1000; } if(ckt->CKTmode & MODEINITTRAN ) { *(ckt->CKTstate1+here->B1qb) = *(ckt->CKTstate0+here->B1qb) ; *(ckt->CKTstate1+here->B1qg) = *(ckt->CKTstate0+here->B1qg) ; *(ckt->CKTstate1+here->B1qd) = *(ckt->CKTstate0+here->B1qd) ; } error = NIintegrate(ckt,&geq,&ceq,0.0,here->B1qb); if(error) return(error); error = NIintegrate(ckt,&geq,&ceq,0.0,here->B1qg); if(error) return(error); error = NIintegrate(ckt,&geq,&ceq,0.0,here->B1qd); if(error) return(error); goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B1iqg); cqbulk = *(ckt->CKTstate0 + here->B1iqb); cqdrn = *(ckt->CKTstate0 + here->B1iqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs; if(ckt->CKTmode & MODEINITTRAN ) { *(ckt->CKTstate1 + here->B1iqb) = *(ckt->CKTstate0 + here->B1iqb); *(ckt->CKTstate1 + here->B1iqg) = *(ckt->CKTstate0 + here->B1iqg); *(ckt->CKTstate1 + here->B1iqd) = *(ckt->CKTstate0 + here->B1iqd); } /* * load current vector */ line900: m = here->B1m; ceqbs = model->B1type * (cbs-(gbs-ckt->CKTgmin)*vbs); ceqbd = model->B1type * (cbd-(gbd-ckt->CKTgmin)*vbd); ceqqg = model->B1type * ceqqg; ceqqb = model->B1type * ceqqb; ceqqd = model->B1type * ceqqd; if (here->B1mode >= 0) { xnrm=1; xrev=0; cdreq=model->B1type*(cdrain-gds*vds-gm*vgs-gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->B1type)*(cdrain+gds*vds-gm*vgd-gmbs*vbd); } *(ckt->CKTrhs + here->B1gNode) -= m * ceqqg; *(ckt->CKTrhs + here->B1bNode) -= m * (ceqbs+ceqbd+ceqqb); *(ckt->CKTrhs + here->B1dNodePrime) += m * (ceqbd-cdreq-ceqqd); *(ckt->CKTrhs + here->B1sNodePrime) += m * (cdreq+ceqbs+ceqqg+ceqqb+ceqqd); /* * load y matrix */ *(here->B1DdPtr) += m * (here->B1drainConductance); *(here->B1GgPtr) += m * (gcggb); *(here->B1SsPtr) += m * (here->B1sourceConductance); *(here->B1BbPtr) += m * (gbd+gbs-gcbgb-gcbdb-gcbsb); *(here->B1DPdpPtr) += m * (here->B1drainConductance+gds+gbd+xrev*(gm+gmbs)+gcddb); *(here->B1SPspPtr) += m * (here->B1sourceConductance+gds+gbs+xnrm*(gm+gmbs)+gcssb); *(here->B1DdpPtr) += m * (-here->B1drainConductance); *(here->B1GbPtr) += m * (-gcggb-gcgdb-gcgsb); *(here->B1GdpPtr) += m * (gcgdb); *(here->B1GspPtr) += m * (gcgsb); *(here->B1SspPtr) += m * (-here->B1sourceConductance); *(here->B1BgPtr) += m * (gcbgb); *(here->B1BdpPtr) += m * (-gbd+gcbdb); *(here->B1BspPtr) += m * (-gbs+gcbsb); *(here->B1DPdPtr) += m * (-here->B1drainConductance); *(here->B1DPgPtr) += m * ((xnrm-xrev)*gm+gcdgb); *(here->B1DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs-gcdgb-gcddb-gcdsb); *(here->B1DPspPtr) += m * (-gds-xnrm*(gm+gmbs)+gcdsb); *(here->B1SPgPtr) += m * (-(xnrm-xrev)*gm+gcsgb); *(here->B1SPsPtr) += m * (-here->B1sourceConductance); *(here->B1SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs-gcsgb-gcsdb-gcssb); *(here->B1SPdpPtr) += m * (-gds-xrev*(gm+gmbs)+gcsdb); line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1acld.c0000644000265600020320000001163112264261473020543 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1acLoad(GENmodel *inModel, CKTcircuit *ckt) { B1model *model = (B1model*)inModel; B1instance *here; int xnrm; int xrev; double gdpr; double gspr; double gm; double gds; double gmbs; double gbd; double gbs; double capbd; double capbs; double xcggb; double xcgdb; double xcgsb; double xcbgb; double xcbdb; double xcbsb; double xcddb; double xcssb; double xcdgb; double xcsgb; double xcdsb; double xcsdb; double cggb; double cgdb; double cgsb; double cbgb; double cbdb; double cbsb; double cddb; double cdgb; double cdsb; double omega; /* angular fequency of the signal */ double m; /* parallel multiplier */ omega = ckt->CKTomega; for( ; model != NULL; model = model->B1nextModel) { for(here = model->B1instances; here!= NULL; here = here->B1nextInstance) { if (here->B1mode >= 0) { xnrm=1; xrev=0; } else { xnrm=0; xrev=1; } gdpr=here->B1drainConductance; gspr=here->B1sourceConductance; gm= *(ckt->CKTstate0 + here->B1gm); gds= *(ckt->CKTstate0 + here->B1gds); gmbs= *(ckt->CKTstate0 + here->B1gmbs); gbd= *(ckt->CKTstate0 + here->B1gbd); gbs= *(ckt->CKTstate0 + here->B1gbs); capbd= *(ckt->CKTstate0 + here->B1capbd); capbs= *(ckt->CKTstate0 + here->B1capbs); /* * charge oriented model parameters */ cggb = *(ckt->CKTstate0 + here->B1cggb); cgsb = *(ckt->CKTstate0 + here->B1cgsb); cgdb = *(ckt->CKTstate0 + here->B1cgdb); cbgb = *(ckt->CKTstate0 + here->B1cbgb); cbsb = *(ckt->CKTstate0 + here->B1cbsb); cbdb = *(ckt->CKTstate0 + here->B1cbdb); cdgb = *(ckt->CKTstate0 + here->B1cdgb); cdsb = *(ckt->CKTstate0 + here->B1cdsb); cddb = *(ckt->CKTstate0 + here->B1cddb); xcdgb = (cdgb - here->B1GDoverlapCap) * omega; xcddb = (cddb + capbd + here->B1GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + here->B1GSoverlapCap ) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + here->B1GSoverlapCap - (cgsb+cbsb+cdsb)) * omega; xcggb = (cggb + here->B1GDoverlapCap + here->B1GSoverlapCap + here->B1GBoverlapCap) * omega; xcgdb = (cgdb - here->B1GDoverlapCap ) * omega; xcgsb = (cgsb - here->B1GSoverlapCap) * omega; xcbgb = (cbgb - here->B1GBoverlapCap) * omega; xcbdb = (cbdb - capbd ) * omega; xcbsb = (cbsb - capbs ) * omega; m = here->B1m; *(here->B1GgPtr +1) += m * xcggb; *(here->B1BbPtr +1) += m * (-xcbgb-xcbdb-xcbsb); *(here->B1DPdpPtr +1) += m * xcddb; *(here->B1SPspPtr +1) += m * xcssb; *(here->B1GbPtr +1) += m * (-xcggb-xcgdb-xcgsb); *(here->B1GdpPtr +1) += m * xcgdb; *(here->B1GspPtr +1) += m * xcgsb; *(here->B1BgPtr +1) += m * xcbgb; *(here->B1BdpPtr +1) += m * xcbdb; *(here->B1BspPtr +1) += m * xcbsb; *(here->B1DPgPtr +1) += m * xcdgb; *(here->B1DPbPtr +1) += m * (-xcdgb-xcddb-xcdsb); *(here->B1DPspPtr +1) += m * xcdsb; *(here->B1SPgPtr +1) += m * xcsgb; *(here->B1SPbPtr +1) += m * (-xcsgb-xcsdb-xcssb); *(here->B1SPdpPtr +1) += m * xcsdb; *(here->B1DdPtr) += m * gdpr; *(here->B1SsPtr) += m * gspr; *(here->B1BbPtr) += m * (gbd+gbs); *(here->B1DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs)); *(here->B1SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs)); *(here->B1DdpPtr) -= m * gdpr; *(here->B1SspPtr) -= m * gspr; *(here->B1BdpPtr) -= m * gbd; *(here->B1BspPtr) -= m * gbs; *(here->B1DPdPtr) -= m * gdpr; *(here->B1DPgPtr) += m * (xnrm-xrev)*gm; *(here->B1DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs); *(here->B1DPspPtr) += m * (-gds-xnrm*(gm+gmbs)); *(here->B1SPgPtr) += m * (-(xnrm-xrev)*gm); *(here->B1SPsPtr) -= m * gspr; *(here->B1SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs); *(here->B1SPdpPtr) += m * (-gds-xrev*(gm+gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1temp.c0000644000265600020320000001424412264261473020610 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int B1temp(GENmodel *inModel, CKTcircuit *ckt) /* load the B1 device structure with those pointers needed later * for fast matrix loading */ { B1model *model = (B1model*) inModel; B1instance *here; double EffChanLength; double EffChanWidth; double Cox; double CoxWoverL ; double Leff; /* effective channel length im micron */ double Weff; /* effective channel width in micron */ NG_IGNORE(ckt); /* loop through all the B1 device models */ for( ; model != NULL; model = model->B1nextModel ) { /* Default value Processing for B1 MOSFET Models */ /* Some Limiting for Model Parameters */ if( model->B1bulkJctPotential < 0.1) { model->B1bulkJctPotential = 0.1; } if( model->B1sidewallJctPotential < 0.1) { model->B1sidewallJctPotential = 0.1; } Cox = 3.453e-13/(model->B1oxideThickness * 1.0e-4);/*in F/cm**2 */ model->B1Cox = Cox; /* unit: F/cm**2 */ /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { if( (EffChanLength = here->B1l - model->B1deltaL *1e-6 )<=0) { IFuid namarray[2]; namarray[0] = model->B1modName; namarray[1] = here->B1name; SPfrontEnd->IFerror (ERR_FATAL, "B1: mosfet %s, model %s: Effective channel length <=0", namarray); return(E_BADPARM); } if( (EffChanWidth = here->B1w - model->B1deltaW *1e-6 ) <= 0 ) { IFuid namarray[2]; namarray[0] = model->B1modName; namarray[1] = here->B1name; SPfrontEnd->IFerror (ERR_FATAL, "B1: mosfet %s, model %s: Effective channel width <=0", namarray); return(E_BADPARM); } here->B1GDoverlapCap=EffChanWidth *model->B1gateDrainOverlapCap; here->B1GSoverlapCap=EffChanWidth*model->B1gateSourceOverlapCap; here->B1GBoverlapCap=here->B1l * model->B1gateBulkOverlapCap; /* process drain series resistance */ if( (here->B1drainConductance=model->B1sheetResistance * here->B1drainSquares) != 0.0 ) { here->B1drainConductance = 1. / here->B1drainConductance ; } /* process source series resistance */ if( (here->B1sourceConductance=model->B1sheetResistance * here->B1sourceSquares) != 0.0 ) { here->B1sourceConductance = 1. / here->B1sourceConductance ; } Leff = EffChanLength * 1.e6; /* convert into micron */ Weff = EffChanWidth * 1.e6; /* convert into micron */ CoxWoverL = Cox * Weff / Leff ; /* F/cm**2 */ here->B1vfb = model->B1vfb0 + model->B1vfbL / Leff + model->B1vfbW / Weff; here->B1phi = model->B1phi0 + model->B1phiL / Leff + model->B1phiW / Weff; here->B1K1 = model->B1K10 + model->B1K1L / Leff + model->B1K1W / Weff; here->B1K2 = model->B1K20 + model->B1K2L / Leff + model->B1K2W / Weff; here->B1eta = model->B1eta0 + model->B1etaL / Leff + model->B1etaW / Weff; here->B1etaB = model->B1etaB0 + model->B1etaBl / Leff + model->B1etaBw / Weff; here->B1etaD = model->B1etaD0 + model->B1etaDl / Leff + model->B1etaDw / Weff; here->B1betaZero = model->B1mobZero; here->B1betaZeroB = model->B1mobZeroB0 + model->B1mobZeroBl / Leff + model->B1mobZeroBw / Weff; here->B1ugs = model->B1ugs0 + model->B1ugsL / Leff + model->B1ugsW / Weff; here->B1ugsB = model->B1ugsB0 + model->B1ugsBL / Leff + model->B1ugsBW / Weff; here->B1uds = model->B1uds0 + model->B1udsL / Leff + model->B1udsW / Weff; here->B1udsB = model->B1udsB0 + model->B1udsBL / Leff + model->B1udsBW / Weff; here->B1udsD = model->B1udsD0 + model->B1udsDL / Leff + model->B1udsDW / Weff; here->B1betaVdd = model->B1mobVdd0 + model->B1mobVddl / Leff + model->B1mobVddw / Weff; here->B1betaVddB = model->B1mobVddB0 + model->B1mobVddBl / Leff + model->B1mobVddBw / Weff; here->B1betaVddD = model->B1mobVddD0 + model->B1mobVddDl / Leff + model->B1mobVddDw / Weff; here->B1subthSlope = model->B1subthSlope0 + model->B1subthSlopeL / Leff + model->B1subthSlopeW / Weff; here->B1subthSlopeB = model->B1subthSlopeB0 + model->B1subthSlopeBL / Leff + model->B1subthSlopeBW / Weff; here->B1subthSlopeD = model->B1subthSlopeD0 + model->B1subthSlopeDL / Leff + model->B1subthSlopeDW / Weff; if(here->B1phi < 0.1 ) here->B1phi = 0.1; if(here->B1K1 < 0.0) here->B1K1 = 0.0; if(here->B1K2 < 0.0) here->B1K2 = 0.0; here->B1vt0 = here->B1vfb + here->B1phi + here->B1K1 * sqrt(here->B1phi) - here->B1K2 * here->B1phi; here->B1von = here->B1vt0; /* added for initialization*/ /* process Beta Parameters (unit: A/V**2) */ here->B1betaZero = here->B1betaZero * CoxWoverL; here->B1betaZeroB = here->B1betaZeroB * CoxWoverL; here->B1betaVdd = here->B1betaVdd * CoxWoverL; here->B1betaVddB = here->B1betaVddB * CoxWoverL; here->B1betaVddD = MAX(here->B1betaVddD * CoxWoverL,0.0); } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1pzld.c0000644000265600020320000001370312264261473020613 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim1def.h" #include "ngspice/suffix.h" int B1pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { B1model *model = (B1model*)inModel; B1instance *here; int xnrm; int xrev; double gdpr; double gspr; double gm; double gds; double gmbs; double gbd; double gbs; double capbd; double capbs; double xcggb; double xcgdb; double xcgsb; double xcbgb; double xcbdb; double xcbsb; double xcddb; double xcssb; double xcdgb; double xcsgb; double xcdsb; double xcsdb; double cggb; double cgdb; double cgsb; double cbgb; double cbdb; double cbsb; double cddb; double cdgb; double cdsb; double m; for( ; model != NULL; model = model->B1nextModel) { for(here = model->B1instances; here!= NULL; here = here->B1nextInstance) { if (here->B1mode >= 0) { xnrm=1; xrev=0; } else { xnrm=0; xrev=1; } gdpr=here->B1drainConductance; gspr=here->B1sourceConductance; gm= *(ckt->CKTstate0 + here->B1gm); gds= *(ckt->CKTstate0 + here->B1gds); gmbs= *(ckt->CKTstate0 + here->B1gmbs); gbd= *(ckt->CKTstate0 + here->B1gbd); gbs= *(ckt->CKTstate0 + here->B1gbs); capbd= *(ckt->CKTstate0 + here->B1capbd); capbs= *(ckt->CKTstate0 + here->B1capbs); /* * charge oriented model parameters */ cggb = *(ckt->CKTstate0 + here->B1cggb); cgsb = *(ckt->CKTstate0 + here->B1cgsb); cgdb = *(ckt->CKTstate0 + here->B1cgdb); cbgb = *(ckt->CKTstate0 + here->B1cbgb); cbsb = *(ckt->CKTstate0 + here->B1cbsb); cbdb = *(ckt->CKTstate0 + here->B1cbdb); cdgb = *(ckt->CKTstate0 + here->B1cdgb); cdsb = *(ckt->CKTstate0 + here->B1cdsb); cddb = *(ckt->CKTstate0 + here->B1cddb); xcdgb = (cdgb - here->B1GDoverlapCap) ; xcddb = (cddb + capbd + here->B1GDoverlapCap) ; xcdsb = cdsb ; xcsgb = -(cggb + cbgb + cdgb + here->B1GSoverlapCap ) ; xcsdb = -(cgdb + cbdb + cddb) ; xcssb = (capbs + here->B1GSoverlapCap - (cgsb+cbsb+cdsb)) ; xcggb = (cggb + here->B1GDoverlapCap + here->B1GSoverlapCap + here->B1GBoverlapCap) ; xcgdb = (cgdb - here->B1GDoverlapCap ) ; xcgsb = (cgsb - here->B1GSoverlapCap) ; xcbgb = (cbgb - here->B1GBoverlapCap) ; xcbdb = (cbdb - capbd ) ; xcbsb = (cbsb - capbs ) ; m = here->B1m; *(here->B1GgPtr ) += m * (xcggb * s->real); *(here->B1GgPtr +1) += m * (xcggb * s->imag); *(here->B1BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->B1BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->B1DPdpPtr ) += m * (xcddb * s->real); *(here->B1DPdpPtr +1) += m * (xcddb * s->imag); *(here->B1SPspPtr ) += m * (xcssb * s->real); *(here->B1SPspPtr +1) += m * (xcssb * s->imag); *(here->B1GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->B1GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->B1GdpPtr ) += m * (xcgdb * s->real); *(here->B1GdpPtr +1) += m * (xcgdb * s->imag); *(here->B1GspPtr ) += m * (xcgsb * s->real); *(here->B1GspPtr +1) += m * (xcgsb * s->imag); *(here->B1BgPtr ) += m * (xcbgb * s->real); *(here->B1BgPtr +1) += m * (xcbgb * s->imag); *(here->B1BdpPtr ) += m * (xcbdb * s->real); *(here->B1BdpPtr +1) += m * (xcbdb * s->imag); *(here->B1BspPtr ) += m * (xcbsb * s->real); *(here->B1BspPtr +1) += m * (xcbsb * s->imag); *(here->B1DPgPtr ) += m * (xcdgb * s->real); *(here->B1DPgPtr +1) += m * (xcdgb * s->imag); *(here->B1DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->B1DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->B1DPspPtr ) += m * (xcdsb * s->real); *(here->B1DPspPtr +1) += m * (xcdsb * s->imag); *(here->B1SPgPtr ) += m * (xcsgb * s->real); *(here->B1SPgPtr +1) += m * (xcsgb * s->imag); *(here->B1SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->B1SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->B1SPdpPtr ) += m * (xcsdb * s->real); *(here->B1SPdpPtr +1) += m * (xcsdb * s->imag); *(here->B1DdPtr) += m * (gdpr); *(here->B1SsPtr) += m * (gspr); *(here->B1BbPtr) += m * (gbd+gbs); *(here->B1DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs)); *(here->B1SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs)); *(here->B1DdpPtr) -= m * (gdpr); *(here->B1SspPtr) -= m * (gspr); *(here->B1BdpPtr) -= m * (gbd); *(here->B1BspPtr) -= m * (gbs); *(here->B1DPdPtr) -= m * (gdpr); *(here->B1DPgPtr) += m * ((xnrm-xrev)*gm); *(here->B1DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs); *(here->B1DPspPtr) += m * (-gds-xnrm*(gm+gmbs)); *(here->B1SPgPtr) += m * (-(xnrm-xrev)*gm); *(here->B1SPsPtr) -= m * (gspr); *(here->B1SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs); *(here->B1SPdpPtr) += m * (-gds-xrev*(gm+gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1par.c0000644000265600020320000000533412264261473020425 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int B1param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { B1instance *here = (B1instance*)inst; NG_IGNORE(select); switch(param) { case BSIM1_W: here->B1w = value->rValue; here->B1wGiven = TRUE; break; case BSIM1_L: here->B1l = value->rValue; here->B1lGiven = TRUE; break; case BSIM1_M: here->B1m = value->rValue; here->B1mGiven = TRUE; break; case BSIM1_AS: here->B1sourceArea = value->rValue; here->B1sourceAreaGiven = TRUE; break; case BSIM1_AD: here->B1drainArea = value->rValue; here->B1drainAreaGiven = TRUE; break; case BSIM1_PS: here->B1sourcePerimeter = value->rValue; here->B1sourcePerimeterGiven = TRUE; break; case BSIM1_PD: here->B1drainPerimeter = value->rValue; here->B1drainPerimeterGiven = TRUE; break; case BSIM1_NRS: here->B1sourceSquares = value->rValue; here->B1sourceSquaresGiven = TRUE; break; case BSIM1_NRD: here->B1drainSquares = value->rValue; here->B1drainSquaresGiven = TRUE; break; case BSIM1_OFF: here->B1off = value->iValue; break; case BSIM1_IC_VBS: here->B1icVBS = value->rValue; here->B1icVBSGiven = TRUE; break; case BSIM1_IC_VDS: here->B1icVDS = value->rValue; here->B1icVDSGiven = TRUE; break; case BSIM1_IC_VGS: here->B1icVGS = value->rValue; here->B1icVGSGiven = TRUE; break; case BSIM1_IC: switch(value->v.numValue){ case 3: here->B1icVBS = *(value->v.vec.rVec+2); here->B1icVBSGiven = TRUE; case 2: here->B1icVGS = *(value->v.vec.rVec+1); here->B1icVGSGiven = TRUE; case 1: here->B1icVDS = *(value->v.vec.rVec); here->B1icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1mdel.c0000644000265600020320000000175012264261473020562 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { B1model **model = (B1model**)inModel; B1model *modfast = (B1model*)kill; B1instance *here; B1instance *prev = NULL; B1model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->B1nextModel)) { if( (*model)->B1modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B1nextModel; /* cut deleted device out of list */ for(here = (*model)->B1instances ; here ; here = here->B1nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1disto.c0000644000265600020320000012555212264261473020772 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int B1disto(int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { B1model *model = (B1model *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h1z, i1h1z; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1h2z, i1h2z; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r1hm2z, i1hm2z; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h11z, i2h11z; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double r2h1m2z, i2h1m2z; double temp, itemp; B1instance *here; if (mode == D_SETUP) return(B1dSetup((GENmodel *)model,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the B1 models */ for( ; model != NULL; model = model->B1nextModel ) { /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* from now on, in the 3-var case, x=vgs,y=vbs,z=vds */ { /* draincurrent term */ r1h1x = *(job->r1H1ptr + here->B1gNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1gNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1y = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1y = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1z = *(job->r1H1ptr + here->B1dNodePrime) - *(job->r1H1ptr + here->B1sNodePrime); i1h1z = *(job->i1H1ptr + here->B1dNodePrime) - *(job->i1H1ptr + here->B1sNodePrime); /* draincurrent is a function of vgs,vbs,and vds; * have got their linear kernels; now to call * load functions */ temp = DFn2F1(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* draincurrent term loading over */ /* loading qg term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi2F1(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = ckt->CKTomega * DFn2F1(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qg term over */ /* loading qb term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi2F1(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = ckt->CKTomega * DFn2F1(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qb term over */ /* loading qd term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi2F1(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = ckt->CKTomega * DFn2F1(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qd term over */ /* loading here->B1gbs term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); /* now r1h1x = vbs */ temp = D1n2F1(here->gbs2, r1h1x, i1h1x); itemp = D1i2F1(here->gbs2, r1h1x, i1h1x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* here->B1gbs term over */ /* loading here->B1gbd term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1dNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1dNodePrime); /* now r1h1x = vbd */ temp = D1n2F1(here->gbd2, r1h1x, i1h1x); itemp = D1i2F1(here->gbd2, r1h1x, i1h1x); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1dNodePrime) += temp; *(ckt->CKTirhs + here->B1dNodePrime) += itemp; /* here->B1gbd term over */ /* all done */ } break; case D_THRF1: /* from now on, in the 3-var case, x=vgs,y=vbs,z=vds */ { /* draincurrent term */ r1h1x = *(job->r1H1ptr + here->B1gNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1gNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1y = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1y = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1z = *(job->r1H1ptr + here->B1dNodePrime) - *(job->r1H1ptr + here->B1sNodePrime); i1h1z = *(job->i1H1ptr + here->B1dNodePrime) - *(job->i1H1ptr + here->B1sNodePrime); r2h11x = *(job->r2H11ptr + here->B1gNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11x = *(job->i2H11ptr + here->B1gNode) - *(job->i2H11ptr + here->B1sNodePrime); r2h11y = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11y = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1sNodePrime); r2h11z = *(job->r2H11ptr + here->B1dNodePrime) - *(job->r2H11ptr + here->B1sNodePrime); i2h11z = *(job->i2H11ptr + here->B1dNodePrime) - *(job->i2H11ptr + here->B1sNodePrime); /* draincurrent is a function of vgs,vbs,and vds; * have got their linear kernels; now to call * load functions */ temp = DFn3F1(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, here->DrC_x3, here->DrC_y3, here->DrC_z3, here->DrC_x2y, here->DrC_x2z, here->DrC_xy2, here->DrC_y2z, here->DrC_xz2, here->DrC_yz2, here->DrC_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, here->DrC_x3, here->DrC_y3, here->DrC_z3, here->DrC_x2y, here->DrC_x2z, here->DrC_xy2, here->DrC_y2z, here->DrC_xz2, here->DrC_yz2, here->DrC_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* draincurrent term loading over */ /* loading qg term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi3F1(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, here->qg_x3, here->qg_y3, here->qg_z3, here->qg_x2y, here->qg_x2z, here->qg_xy2, here->qg_y2z, here->qg_xz2, here->qg_yz2, here->qg_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = ckt->CKTomega * DFn3F1(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, here->qg_x3, here->qg_y3, here->qg_z3, here->qg_x2y, here->qg_x2z, here->qg_xy2, here->qg_y2z, here->qg_xz2, here->qg_yz2, here->qg_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qg term over */ /* loading qb term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi3F1(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, here->qb_x3, here->qb_y3, here->qb_z3, here->qb_x2y, here->qb_x2z, here->qb_xy2, here->qb_y2z, here->qb_xz2, here->qb_yz2, here->qb_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = ckt->CKTomega * DFn3F1(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, here->qb_x3, here->qb_y3, here->qb_z3, here->qb_x2y, here->qb_x2z, here->qb_xy2, here->qb_y2z, here->qb_xz2, here->qb_yz2, here->qb_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qb term over */ /* loading qd term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFi3F1(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, here->qd_x3, here->qd_y3, here->qd_z3, here->qd_x2y, here->qd_x2z, here->qd_xy2, here->qd_y2z, here->qd_xz2, here->qd_yz2, here->qd_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = ckt->CKTomega * DFn3F1(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, here->qd_x3, here->qd_y3, here->qd_z3, here->qd_x2y, here->qd_x2z, here->qd_xy2, here->qd_y2z, here->qd_xz2, here->qd_yz2, here->qd_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qd term over */ /* loading here->B1gbs term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r2h11x = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11x = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1sNodePrime); /* now r1h1x = vbs */ temp = D1n3F1(here->gbs2, here->gbs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = D1i3F1(here->gbs2, here->gbs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* here->B1gbs term over */ /* loading here->B1gbd term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1dNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1dNodePrime); r2h11x = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1dNodePrime); i2h11x = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1dNodePrime); /* now r1h1x = vbd */ temp = D1n3F1(here->gbd2, here->gbd3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = D1i3F1(here->gbd2, here->gbd3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1dNodePrime) += temp; *(ckt->CKTirhs + here->B1dNodePrime) += itemp; /* here->B1gbd term over */ /* all done */ } break; case D_F1PF2: /* from now on, in the 3-var case, x=vgs,y=vbs,z=vds */ { /* draincurrent term */ r1h1x = *(job->r1H1ptr + here->B1gNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1gNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1y = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1y = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1z = *(job->r1H1ptr + here->B1dNodePrime) - *(job->r1H1ptr + here->B1sNodePrime); i1h1z = *(job->i1H1ptr + here->B1dNodePrime) - *(job->i1H1ptr + here->B1sNodePrime); r1h2x = *(job->r1H2ptr + here->B1gNode) - *(job->r1H2ptr + here->B1sNodePrime); i1h2x = (*(job->i1H2ptr + here->B1gNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1h2y = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1h2y = (*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1h2z = *(job->r1H2ptr + here->B1dNodePrime) - *(job->r1H2ptr + here->B1sNodePrime); i1h2z = (*(job->i1H2ptr + here->B1dNodePrime) - *(job->i1H2ptr + here->B1sNodePrime)); /* draincurrent is a function of vgs,vbs,and vds; * have got their linear kernels; now to call * load functions */ temp = DFnF12(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* draincurrent term loading over */ /* loading qg term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = ckt->CKTomega * DFnF12(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qg term over */ /* loading qb term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qb_x2, here->qb_y2, /* XXX Bug fixed: fewer arguments passed than declared */ here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = ckt->CKTomega * DFnF12(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qb term over */ /* loading qd term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = ckt->CKTomega * DFnF12(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qd term over */ /* loading here->B1gbs term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1h2x = *(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime); /* now r1h1x = vbs */ temp = D1nF12(here->gbs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = D1iF12(here->gbs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* here->B1gbs term over */ /* loading here->B1gbd term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1dNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1dNodePrime); r1h2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1dNodePrime); i1h2x = *(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1dNodePrime); /* now r1h1x = vbd */ temp = D1nF12(here->gbd2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = D1iF12(here->gbd2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1dNodePrime) += temp; *(ckt->CKTirhs + here->B1dNodePrime) += itemp; /* here->B1gbd term over */ /* all done */ } break; case D_F1MF2: /* from now on, in the 3-var case, x=vgs,y=vbs,z=vds */ { /* draincurrent term */ r1h1x = *(job->r1H1ptr + here->B1gNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1gNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1y = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1y = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1z = *(job->r1H1ptr + here->B1dNodePrime) - *(job->r1H1ptr + here->B1sNodePrime); i1h1z = *(job->i1H1ptr + here->B1dNodePrime) - *(job->i1H1ptr + here->B1sNodePrime); r1hm2x = *(job->r1H2ptr + here->B1gNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1gNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1hm2y = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2y = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1hm2z = *(job->r1H2ptr + here->B1dNodePrime) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2z = -(*(job->i1H2ptr + here->B1dNodePrime) - *(job->i1H2ptr + here->B1sNodePrime)); /* draincurrent is a function of vgs,vbs,and vds; * have got their linear kernels; now to call * load functions */ temp = DFnF12(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12(here->DrC_x2, here->DrC_y2, here->DrC_z2, here->DrC_xy, here->DrC_yz, here->DrC_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* draincurrent term loading over */ /* loading qg term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = ckt->CKTomega * DFnF12(here->qg_x2, here->qg_y2, here->qg_z2, here->qg_xy, here->qg_yz, here->qg_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qg term over */ /* loading qb term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qb_x2, here->qb_y2, /* XXX Bug fixed: fewer arguments passed than declared */ here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = ckt->CKTomega * DFnF12(here->qb_x2, here->qb_y2, here->qb_z2, here->qb_xy, here->qb_yz, here->qb_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qb term over */ /* loading qd term */ /* kernels for vgs,vbs and vds already set up */ temp = -ckt->CKTomega * DFiF12(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = ckt->CKTomega * DFnF12(here->qd_x2, here->qd_y2, here->qd_z2, here->qd_xy, here->qd_yz, here->qd_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qd term over */ /* loading here->B1gbs term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1hm2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime)); /* now r1h1x = vbs */ temp = D1nF12(here->gbs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = D1iF12(here->gbs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* here->B1gbs term over */ /* loading here->B1gbd term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1dNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1dNodePrime); r1hm2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1dNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1dNodePrime)); /* now r1h1x = vbd */ temp = D1nF12(here->gbd2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = D1iF12(here->gbd2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1dNodePrime) += temp; *(ckt->CKTirhs + here->B1dNodePrime) += itemp; /* here->B1gbd term over */ /* all done */ } break; case D_2F1MF2: /* from now on, in the 3-var case, x=vgs,y=vbs,z=vds */ { /* draincurrent term */ r1h1x = *(job->r1H1ptr + here->B1gNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1gNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1y = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1y = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r1h1z = *(job->r1H1ptr + here->B1dNodePrime) - *(job->r1H1ptr + here->B1sNodePrime); i1h1z = *(job->i1H1ptr + here->B1dNodePrime) - *(job->i1H1ptr + here->B1sNodePrime); r1hm2x = *(job->r1H2ptr + here->B1gNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1gNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1hm2y = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2y = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime)); r1hm2z = *(job->r1H2ptr + here->B1dNodePrime) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2z = -(*(job->i1H2ptr + here->B1dNodePrime) - *(job->i1H2ptr + here->B1sNodePrime)); r2h11x = *(job->r2H11ptr + here->B1gNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11x = *(job->i2H11ptr + here->B1gNode) - *(job->i2H11ptr + here->B1sNodePrime); r2h11y = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11y = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1sNodePrime); r2h11z = *(job->r2H11ptr + here->B1dNodePrime) - *(job->r2H11ptr + here->B1sNodePrime); i2h11z = *(job->i2H11ptr + here->B1dNodePrime) - *(job->i2H11ptr + here->B1sNodePrime); r2h1m2x = *(job->r2H1m2ptr + here->B1gNode) - *(job->r2H1m2ptr + here->B1sNodePrime); i2h1m2x = *(job->i2H1m2ptr + here->B1gNode) - *(job->i2H1m2ptr + here->B1sNodePrime); r2h1m2y = *(job->r2H1m2ptr + here->B1bNode) - *(job->r2H1m2ptr + here->B1sNodePrime); i2h1m2y = *(job->i2H1m2ptr + here->B1bNode) - *(job->i2H1m2ptr + here->B1sNodePrime); r2h1m2z = *(job->r2H1m2ptr + here->B1dNodePrime) - *(job->r2H1m2ptr + here->B1sNodePrime); i2h1m2z = *(job->i2H1m2ptr + here->B1dNodePrime) - *(job->i2H1m2ptr + here->B1sNodePrime); /* draincurrent is a function of vgs,vbs,and vds; * have got their linear kernels; now to call * load functions */ pass.cxx = here->DrC_x2; pass.cyy = here->DrC_y2; pass.czz = here->DrC_z2; pass.cxy = here->DrC_xy; pass.cyz = here->DrC_yz; pass.cxz = here->DrC_xz; pass.cxxx = here->DrC_x3; pass.cyyy = here->DrC_y3; pass.czzz = here->DrC_z3; pass.cxxy = here->DrC_x2y; pass.cxxz = here->DrC_x2z; pass.cxyy = here->DrC_xy2; pass.cyyz = here->DrC_y2z; pass.cxzz = here->DrC_xz2; pass.cyzz = here->DrC_yz2; pass.cxyz = here->DrC_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* draincurrent term loading over */ /* loading qg term */ /* kernels for vgs,vbs and vds already set up */ pass.cxx = here->qg_x2; pass.cyy = here->qg_y2; pass.czz = here->qg_z2; pass.cxy = here->qg_xy; pass.cyz = here->qg_yz; pass.cxz = here->qg_xz; pass.cxxx = here->qg_x3; pass.cyyy = here->qg_y3; pass.czzz = here->qg_z3; pass.cxxy = here->qg_x2y; pass.cxxz = here->qg_x2z; pass.cxyy = here->qg_xy2; pass.cyyz = here->qg_y2z; pass.cxzz = here->qg_xz2; pass.cyzz = here->qg_yz2; pass.cxyz = here->qg_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = -ckt->CKTomega * DFi2F12(&pass); itemp = ckt->CKTomega * DFn2F12(&pass); *(ckt->CKTrhs + here->B1gNode) -= temp; *(ckt->CKTirhs + here->B1gNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qg term over */ /* loading qb term */ /* kernels for vgs,vbs and vds already set up */ pass.cxx = here->qb_x2; pass.cyy = here->qb_y2; pass.czz = here->qb_z2; pass.cxy = here->qb_xy; pass.cyz = here->qb_yz; pass.cxz = here->qb_xz; pass.cxxx = here->qb_x3; pass.cyyy = here->qb_y3; pass.czzz = here->qb_z3; pass.cxxy = here->qb_x2y; pass.cxxz = here->qb_x2z; pass.cxyy = here->qb_xy2; pass.cyyz = here->qb_y2z; pass.cxzz = here->qb_xz2; pass.cyzz = here->qb_yz2; pass.cxyz = here->qb_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = -ckt->CKTomega * DFi2F12(&pass); itemp = ckt->CKTomega * DFn2F12(&pass); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qb term over */ /* loading qd term */ /* kernels for vgs,vbs and vds already set up */ pass.cxx = here->qd_x2; pass.cyy = here->qd_y2; pass.czz = here->qd_z2; pass.cxy = here->qd_xy; pass.cyz = here->qd_yz; pass.cxz = here->qd_xz; pass.cxxx = here->qd_x3; pass.cyyy = here->qd_y3; pass.czzz = here->qd_z3; pass.cxxy = here->qd_x2y; pass.cxxz = here->qd_x2z; pass.cxyy = here->qd_xy2; pass.cyyz = here->qd_y2z; pass.cxzz = here->qd_xz2; pass.cyzz = here->qd_yz2; pass.cxyz = here->qd_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = -ckt->CKTomega * DFi2F12(&pass); itemp = ckt->CKTomega * DFn2F12(&pass); *(ckt->CKTrhs + here->B1dNodePrime) -= temp; *(ckt->CKTirhs + here->B1dNodePrime) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* qd term over */ /* loading here->B1gbs term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1sNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1sNodePrime); r2h11x = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1sNodePrime); i2h11x = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1sNodePrime); r1hm2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1sNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1sNodePrime)); r2h1m2x = *(job->r2H1m2ptr + here->B1bNode) - *(job->r2H1m2ptr + here->B1sNodePrime); i2h1m2x = *(job->i2H1m2ptr + here->B1bNode) - *(job->i2H1m2ptr + here->B1sNodePrime); /* now r1h1x = vbs */ temp = D1n2F12(here->gbs2, here->gbs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = D1i2F12(here->gbs2, here->gbs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1sNodePrime) += temp; *(ckt->CKTirhs + here->B1sNodePrime) += itemp; /* here->B1gbs term over */ /* loading here->B1gbd term */ r1h1x = *(job->r1H1ptr + here->B1bNode) - *(job->r1H1ptr + here->B1dNodePrime); i1h1x = *(job->i1H1ptr + here->B1bNode) - *(job->i1H1ptr + here->B1dNodePrime); r2h11x = *(job->r2H11ptr + here->B1bNode) - *(job->r2H11ptr + here->B1dNodePrime); i2h11x = *(job->i2H11ptr + here->B1bNode) - *(job->i2H11ptr + here->B1dNodePrime); r1hm2x = *(job->r1H2ptr + here->B1bNode) - *(job->r1H2ptr + here->B1dNodePrime); i1hm2x = -(*(job->i1H2ptr + here->B1bNode) - *(job->i1H2ptr + here->B1dNodePrime)); r2h1m2x = *(job->r2H1m2ptr + here->B1bNode) - *(job->r2H1m2ptr + here->B1dNodePrime); i2h1m2x = *(job->i2H1m2ptr + here->B1bNode) - *(job->i2H1m2ptr + here->B1dNodePrime); /* now r1h1x = vbd */ temp = D1n2F12(here->gbd2, here->gbd3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = D1i2F12(here->gbd2, here->gbd3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + here->B1bNode) -= temp; *(ckt->CKTirhs + here->B1bNode) -= itemp; *(ckt->CKTrhs + here->B1dNodePrime) += temp; *(ckt->CKTirhs + here->B1dNodePrime) += itemp; /* here->B1gbd term over */ /* all done */ } break; default: ; ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/bsim1/b1ask.c0000644000265600020320000001663412264261473020426 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Hong J. Park **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int B1ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B1instance *here = (B1instance*)inst; NG_IGNORE(select); switch(which) { case BSIM1_L: value->rValue = here->B1l; return(OK); case BSIM1_W: value->rValue = here->B1w; value->rValue *= here->B1m; return(OK); case BSIM1_M: value->rValue = here->B1m; return(OK); case BSIM1_AS: value->rValue = here->B1sourceArea; value->rValue *= here->B1m; return(OK); case BSIM1_AD: value->rValue = here->B1drainArea; value->rValue *= here->B1m; return(OK); case BSIM1_PS: value->rValue = here->B1sourcePerimeter; value->rValue *= here->B1m; return(OK); case BSIM1_PD: value->rValue = here->B1drainPerimeter; value->rValue *= here->B1m; return(OK); case BSIM1_NRS: value->rValue = here->B1sourceSquares; value->rValue *= here->B1m; return(OK); case BSIM1_NRD: value->rValue = here->B1drainSquares; value->rValue *= here->B1m; return(OK); case BSIM1_OFF: value->rValue = here->B1off; return(OK); case BSIM1_IC_VBS: value->rValue = here->B1icVBS; return(OK); case BSIM1_IC_VDS: value->rValue = here->B1icVDS; return(OK); case BSIM1_IC_VGS: value->rValue = here->B1icVGS; return(OK); case BSIM1_DNODE: value->iValue = here->B1dNode; return(OK); case BSIM1_GNODE: value->iValue = here->B1gNode; return(OK); case BSIM1_SNODE: value->iValue = here->B1sNode; return(OK); case BSIM1_BNODE: value->iValue = here->B1bNode; return(OK); case BSIM1_DNODEPRIME: value->iValue = here->B1dNodePrime; return(OK); case BSIM1_SNODEPRIME: value->iValue = here->B1sNodePrime; return(OK); case BSIM1_SOURCECONDUCT: value->rValue = here->B1sourceConductance; value->rValue *= here->B1m; return(OK); case BSIM1_DRAINCONDUCT: value->rValue = here->B1drainConductance; value->rValue *= here->B1m; return(OK); case BSIM1_VBD: value->rValue = *(ckt->CKTstate0 + here->B1vbd); return(OK); case BSIM1_VBS: value->rValue = *(ckt->CKTstate0 + here->B1vbs); return(OK); case BSIM1_VGS: value->rValue = *(ckt->CKTstate0 + here->B1vgs); return(OK); case BSIM1_VDS: value->rValue = *(ckt->CKTstate0 + here->B1vds); return(OK); case BSIM1_CD: value->rValue = *(ckt->CKTstate0 + here->B1cd); value->rValue *= here->B1m; return(OK); case BSIM1_CBS: value->rValue = *(ckt->CKTstate0 + here->B1cbs); value->rValue *= here->B1m; return(OK); case BSIM1_CBD: value->rValue = *(ckt->CKTstate0 + here->B1cbd); value->rValue *= here->B1m; return(OK); case BSIM1_GM: value->rValue = *(ckt->CKTstate0 + here->B1gm); value->rValue *= here->B1m; return(OK); case BSIM1_GDS: value->rValue = *(ckt->CKTstate0 + here->B1gds); value->rValue *= here->B1m; return(OK); case BSIM1_GMBS: value->rValue = *(ckt->CKTstate0 + here->B1gmbs); value->rValue *= here->B1m; return(OK); case BSIM1_GBD: value->rValue = *(ckt->CKTstate0 + here->B1gbd); value->rValue *= here->B1m; return(OK); case BSIM1_GBS: value->rValue = *(ckt->CKTstate0 + here->B1gbs); value->rValue *= here->B1m; return(OK); case BSIM1_QB: value->rValue = *(ckt->CKTstate0 + here->B1qb); value->rValue *= here->B1m; return(OK); case BSIM1_CQB: value->rValue = *(ckt->CKTstate0 + here->B1cqb); value->rValue *= here->B1m; return(OK); case BSIM1_QG: value->rValue = *(ckt->CKTstate0 + here->B1qg); value->rValue *= here->B1m; return(OK); case BSIM1_CQG: value->rValue = *(ckt->CKTstate0 + here->B1cqg); value->rValue *= here->B1m; return(OK); case BSIM1_QD: value->rValue = *(ckt->CKTstate0 + here->B1qd); value->rValue *= here->B1m; return(OK); case BSIM1_CQD: value->rValue = *(ckt->CKTstate0 + here->B1cqd); value->rValue *= here->B1m; return(OK); case BSIM1_CGG: value->rValue = *(ckt->CKTstate0 + here->B1cggb); value->rValue *= here->B1m; return(OK); case BSIM1_CGD: value->rValue = *(ckt->CKTstate0 + here->B1cgdb); value->rValue *= here->B1m; return(OK); case BSIM1_CGS: value->rValue = *(ckt->CKTstate0 + here->B1cgsb); value->rValue *= here->B1m; return(OK); case BSIM1_CBG: value->rValue = *(ckt->CKTstate0 + here->B1cbgb); value->rValue *= here->B1m; return(OK); case BSIM1_CAPBD: value->rValue = *(ckt->CKTstate0 + here->B1capbd); value->rValue *= here->B1m; return(OK); case BSIM1_CQBD: value->rValue = *(ckt->CKTstate0 + here->B1cqbd); value->rValue *= here->B1m; return(OK); case BSIM1_CAPBS: value->rValue = *(ckt->CKTstate0 + here->B1capbs); value->rValue *= here->B1m; return(OK); case BSIM1_CQBS: value->rValue = *(ckt->CKTstate0 + here->B1cqbs); value->rValue *= here->B1m; return(OK); case BSIM1_CDG: value->rValue = *(ckt->CKTstate0 + here->B1cdgb); value->rValue *= here->B1m; return(OK); case BSIM1_CDD: value->rValue = *(ckt->CKTstate0 + here->B1cddb); value->rValue *= here->B1m; return(OK); case BSIM1_CDS: value->rValue = *(ckt->CKTstate0 + here->B1cdsb); value->rValue *= here->B1m; return(OK); case BSIM1_VON: value->rValue = *(ckt->CKTstate0 + here->B1vono); return(OK); case BSIM1_QBS: value->rValue = *(ckt->CKTstate0 + here->B1qbs); value->rValue *= here->B1m; return(OK); case BSIM1_QBD: value->rValue = *(ckt->CKTstate0 + here->B1qbd); value->rValue *= here->B1m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim1/b1noi.c0000644000265600020320000001424112264261473020425 0ustar andreasadmin/********** Copyright 2003 ??. All rights reserved. Author: 2003 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "bsim1def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * B1noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int B1noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; B1model *firstModel = (B1model *) genmodel; B1model *model; B1instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B1NSRCS]; double lnNdens[B1NSRCS]; int i; /* define the names of the noise sources */ static char *B1nNames[B1NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in bsim1defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->B1nextModel) { for (inst=model->B1instances; inst != NULL; inst=inst->B1nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < B1NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->B1name,B1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < B1NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->B1name,B1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->B1name,B1nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[B1RDNOIZ],&lnNdens[B1RDNOIZ], ckt,THERMNOISE,inst->B1dNodePrime,inst->B1dNode, inst->B1drainConductance * inst->B1m); NevalSrc(&noizDens[B1RSNOIZ],&lnNdens[B1RSNOIZ], ckt,THERMNOISE,inst->B1sNodePrime,inst->B1sNode, inst->B1sourceConductance * inst->B1m); NevalSrc(&noizDens[B1IDNOIZ],&lnNdens[B1IDNOIZ], ckt,THERMNOISE,inst->B1dNodePrime,inst->B1sNodePrime, (2.0/3.0 * fabs(inst->B1gm * inst->B1m))); NevalSrc(&noizDens[B1FLNOIZ], NULL, ckt, N_GAIN,inst->B1dNodePrime, inst->B1sNodePrime, (double)0.0); noizDens[B1FLNOIZ] *= model->B1fNcoef * inst->B1m * exp(model->B1fNexp * log(MAX(fabs(inst->B1cd),N_MINLOG))) / (data->freq * (inst->B1w - model->B1deltaW * 1e-6) * (inst->B1l - model->B1deltaL * 1e-6) * model->B1Cox * model->B1Cox); lnNdens[B1FLNOIZ] = log(MAX(noizDens[B1FLNOIZ],N_MINLOG)); noizDens[B1TOTNOIZ] = noizDens[B1RDNOIZ] + noizDens[B1RSNOIZ] + noizDens[B1IDNOIZ] + noizDens[B1FLNOIZ]; lnNdens[B1TOTNOIZ] = log(MAX(noizDens[B1TOTNOIZ], N_MINLOG)); *OnDens += noizDens[B1TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < B1NSRCS; i++) { inst->B1nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < B1NSRCS; i++) { inst->B1nVar[OUTNOIZ][i] = 0.0; inst->B1nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < B1NSRCS; i++) { if (i != B1TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->B1nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->B1nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->B1nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->B1nVar[OUTNOIZ][i] += tempOnoise; inst->B1nVar[OUTNOIZ][B1TOTNOIZ] += tempOnoise; inst->B1nVar[INNOIZ][i] += tempInoise; inst->B1nVar[INNOIZ][B1TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < B1NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < B1NSRCS; i++) { data->outpVector[data->outNumber++] = inst->B1nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->B1nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim1/bsim1itf.h0000644000265600020320000000026312264261473021137 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_BSIM1 #define DEV_BSIM1 SPICEdev *get_bsim1_info(void); #endif ngspice-26/src/spicelib/devices/bsim1/ChangeLog0000644000265600020320000000012612264261473021020 0ustar andreasadmin22/11/1990 Modified b1mpar.c substituting iValue to rValue as discovered by Al Davis. ngspice-26/src/spicelib/devices/bsim1/b1del.c0000644000265600020320000000160612264261473020405 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B1delete(GENmodel *inModel, IFuid name, GENinstance **inInst) { B1instance **fast = (B1instance**)inInst; B1model *model = (B1model*)inModel; B1instance **prev = NULL; B1instance *here; for( ; model ; model = model->B1nextModel) { prev = &(model->B1instances); for(here = *prev; here ; here = *prev) { if(here->B1name == name || (fast && here==*fast) ) { *prev= here->B1nextInstance; FREE(here); return(OK); } prev = &(here->B1nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim1/b1mpar.c0000644000265600020320000002664712264261473020614 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim1def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1mParam(int param, IFvalue *value, GENmodel *inMod) { B1model *mod = (B1model*)inMod; switch(param) { case BSIM1_MOD_VFB0 : mod->B1vfb0 = value->rValue; mod->B1vfb0Given = TRUE; break; case BSIM1_MOD_VFBL : mod->B1vfbL = value->rValue; mod->B1vfbLGiven = TRUE; break; case BSIM1_MOD_VFBW : mod->B1vfbW = value->rValue; mod->B1vfbWGiven = TRUE; break; case BSIM1_MOD_PHI0 : mod->B1phi0 = value->rValue; mod->B1phi0Given = TRUE; break; case BSIM1_MOD_PHIL : mod->B1phiL = value->rValue; mod->B1phiLGiven = TRUE; break; case BSIM1_MOD_PHIW : mod->B1phiW = value->rValue; mod->B1phiWGiven = TRUE; break; case BSIM1_MOD_K10 : mod->B1K10 = value->rValue; mod->B1K10Given = TRUE; break; case BSIM1_MOD_K1L : mod->B1K1L = value->rValue; mod->B1K1LGiven = TRUE; break; case BSIM1_MOD_K1W : mod->B1K1W = value->rValue; mod->B1K1WGiven = TRUE; break; case BSIM1_MOD_K20 : mod->B1K20 = value->rValue; mod->B1K20Given = TRUE; break; case BSIM1_MOD_K2L : mod->B1K2L = value->rValue; mod->B1K2LGiven = TRUE; break; case BSIM1_MOD_K2W : mod->B1K2W = value->rValue; mod->B1K2WGiven = TRUE; break; case BSIM1_MOD_ETA0 : mod->B1eta0 = value->rValue; mod->B1eta0Given = TRUE; break; case BSIM1_MOD_ETAL : mod->B1etaL = value->rValue; mod->B1etaLGiven = TRUE; break; case BSIM1_MOD_ETAW : mod->B1etaW = value->rValue; mod->B1etaWGiven = TRUE; break; case BSIM1_MOD_ETAB0 : mod->B1etaB0 = value->rValue; mod->B1etaB0Given = TRUE; break; case BSIM1_MOD_ETABL : mod->B1etaBl = value->rValue; mod->B1etaBlGiven = TRUE; break; case BSIM1_MOD_ETABW : mod->B1etaBw = value->rValue; mod->B1etaBwGiven = TRUE; break; case BSIM1_MOD_ETAD0 : mod->B1etaD0 = value->rValue; mod->B1etaD0Given = TRUE; break; case BSIM1_MOD_ETADL : mod->B1etaDl = value->rValue; mod->B1etaDlGiven = TRUE; break; case BSIM1_MOD_ETADW : mod->B1etaDw = value->rValue; mod->B1etaDwGiven = TRUE; break; case BSIM1_MOD_DELTAL : mod->B1deltaL = value->rValue; mod->B1deltaLGiven = TRUE; break; case BSIM1_MOD_DELTAW : mod->B1deltaW = value->rValue; mod->B1deltaWGiven = TRUE; break; case BSIM1_MOD_MOBZERO : mod->B1mobZero = value->rValue; mod->B1mobZeroGiven = TRUE; break; case BSIM1_MOD_MOBZEROB0 : mod->B1mobZeroB0 = value->rValue; mod->B1mobZeroB0Given = TRUE; break; case BSIM1_MOD_MOBZEROBL : mod->B1mobZeroBl = value->rValue; mod->B1mobZeroBlGiven = TRUE; break; case BSIM1_MOD_MOBZEROBW : mod->B1mobZeroBw = value->rValue; mod->B1mobZeroBwGiven = TRUE; break; case BSIM1_MOD_MOBVDD0 : mod->B1mobVdd0 = value->rValue; mod->B1mobVdd0Given = TRUE; break; case BSIM1_MOD_MOBVDDL : mod->B1mobVddl = value->rValue; mod->B1mobVddlGiven = TRUE; break; case BSIM1_MOD_MOBVDDW : mod->B1mobVddw = value->rValue; mod->B1mobVddwGiven = TRUE; break; case BSIM1_MOD_MOBVDDB0 : mod->B1mobVddB0 = value->rValue; mod->B1mobVddB0Given = TRUE; break; case BSIM1_MOD_MOBVDDBL : mod->B1mobVddBl = value->rValue; mod->B1mobVddBlGiven = TRUE; break; case BSIM1_MOD_MOBVDDBW : mod->B1mobVddBw = value->rValue; mod->B1mobVddBwGiven = TRUE; break; case BSIM1_MOD_MOBVDDD0 : mod->B1mobVddD0 = value->rValue; mod->B1mobVddD0Given = TRUE; break; case BSIM1_MOD_MOBVDDDL : mod->B1mobVddDl = value->rValue; mod->B1mobVddDlGiven = TRUE; break; case BSIM1_MOD_MOBVDDDW : mod->B1mobVddDw = value->rValue; mod->B1mobVddDwGiven = TRUE; break; case BSIM1_MOD_UGS0 : mod->B1ugs0 = value->rValue; mod->B1ugs0Given = TRUE; break; case BSIM1_MOD_UGSL : mod->B1ugsL = value->rValue; mod->B1ugsLGiven = TRUE; break; case BSIM1_MOD_UGSW : mod->B1ugsW = value->rValue; mod->B1ugsWGiven = TRUE; break; case BSIM1_MOD_UGSB0 : mod->B1ugsB0 = value->rValue; mod->B1ugsB0Given = TRUE; break; case BSIM1_MOD_UGSBL : mod->B1ugsBL = value->rValue; mod->B1ugsBLGiven = TRUE; break; case BSIM1_MOD_UGSBW : mod->B1ugsBW = value->rValue; mod->B1ugsBWGiven = TRUE; break; case BSIM1_MOD_UDS0 : mod->B1uds0 = value->rValue; mod->B1uds0Given = TRUE; break; case BSIM1_MOD_UDSL : mod->B1udsL = value->rValue; mod->B1udsLGiven = TRUE; break; case BSIM1_MOD_UDSW : mod->B1udsW = value->rValue; mod->B1udsWGiven = TRUE; break; case BSIM1_MOD_UDSB0 : mod->B1udsB0 = value->rValue; mod->B1udsB0Given = TRUE; break; case BSIM1_MOD_UDSBL : mod->B1udsBL = value->rValue; mod->B1udsBLGiven = TRUE; break; case BSIM1_MOD_UDSBW : mod->B1udsBW = value->rValue; mod->B1udsBWGiven = TRUE; break; case BSIM1_MOD_UDSD0 : mod->B1udsD0 = value->rValue; mod->B1udsD0Given = TRUE; break; case BSIM1_MOD_UDSDL : mod->B1udsDL = value->rValue; mod->B1udsDLGiven = TRUE; break; case BSIM1_MOD_UDSDW : mod->B1udsDW = value->rValue; mod->B1udsDWGiven = TRUE; break; case BSIM1_MOD_N00 : mod->B1subthSlope0 = value->rValue; mod->B1subthSlope0Given = TRUE; break; case BSIM1_MOD_N0L : mod->B1subthSlopeL = value->rValue; mod->B1subthSlopeLGiven = TRUE; break; case BSIM1_MOD_N0W : mod->B1subthSlopeW = value->rValue; mod->B1subthSlopeWGiven = TRUE; break; case BSIM1_MOD_NB0 : mod->B1subthSlopeB0 = value->rValue; mod->B1subthSlopeB0Given = TRUE; break; case BSIM1_MOD_NBL : mod->B1subthSlopeBL = value->rValue; mod->B1subthSlopeBLGiven = TRUE; break; case BSIM1_MOD_NBW : mod->B1subthSlopeBW = value->rValue; mod->B1subthSlopeBWGiven = TRUE; break; case BSIM1_MOD_ND0 : mod->B1subthSlopeD0 = value->rValue; mod->B1subthSlopeD0Given = TRUE; break; case BSIM1_MOD_NDL : mod->B1subthSlopeDL = value->rValue; mod->B1subthSlopeDLGiven = TRUE; break; case BSIM1_MOD_NDW : mod->B1subthSlopeDW = value->rValue; mod->B1subthSlopeDWGiven = TRUE; break; case BSIM1_MOD_TOX : mod->B1oxideThickness = value->rValue; mod->B1oxideThicknessGiven = TRUE; break; case BSIM1_MOD_TEMP : mod->B1temp = value->rValue; mod->B1tempGiven = TRUE; break; case BSIM1_MOD_VDD : mod->B1vdd = value->rValue; mod->B1vddGiven = TRUE; break; case BSIM1_MOD_CGSO : mod->B1gateSourceOverlapCap = value->rValue; mod->B1gateSourceOverlapCapGiven = TRUE; break; case BSIM1_MOD_CGDO : mod->B1gateDrainOverlapCap = value->rValue; mod->B1gateDrainOverlapCapGiven = TRUE; break; case BSIM1_MOD_CGBO : mod->B1gateBulkOverlapCap = value->rValue; mod->B1gateBulkOverlapCapGiven = TRUE; break; case BSIM1_MOD_XPART : mod->B1channelChargePartitionFlag = value->iValue ? 1 : 0; mod->B1channelChargePartitionFlagGiven = TRUE; break; case BSIM1_MOD_RSH : mod->B1sheetResistance = value->rValue; mod->B1sheetResistanceGiven = TRUE; break; case BSIM1_MOD_JS : mod->B1jctSatCurDensity = value->rValue; mod->B1jctSatCurDensityGiven = TRUE; break; case BSIM1_MOD_PB : mod->B1bulkJctPotential = value->rValue; mod->B1bulkJctPotentialGiven = TRUE; break; case BSIM1_MOD_MJ : mod->B1bulkJctBotGradingCoeff = value->rValue; mod->B1bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM1_MOD_PBSW : mod->B1sidewallJctPotential = value->rValue; mod->B1sidewallJctPotentialGiven = TRUE; break; case BSIM1_MOD_MJSW : mod->B1bulkJctSideGradingCoeff = value->rValue; mod->B1bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM1_MOD_CJ : mod->B1unitAreaJctCap = value->rValue; mod->B1unitAreaJctCapGiven = TRUE; break; case BSIM1_MOD_CJSW : mod->B1unitLengthSidewallJctCap = value->rValue; mod->B1unitLengthSidewallJctCapGiven = TRUE; break; case BSIM1_MOD_DEFWIDTH : mod->B1defaultWidth = value->rValue; mod->B1defaultWidthGiven = TRUE; break; case BSIM1_MOD_DELLENGTH : mod->B1deltaLength = value->rValue; mod->B1deltaLengthGiven = TRUE; break; case BSIM1_MOD_AF : mod->B1fNexp = value->rValue; mod->B1fNexpGiven = TRUE; break; case BSIM1_MOD_KF : mod->B1fNcoef = value->rValue; mod->B1fNcoefGiven = TRUE; break; case BSIM1_MOD_NMOS : if(value->iValue) { mod->B1type = 1; mod->B1typeGiven = TRUE; } break; case BSIM1_MOD_PMOS : if(value->iValue) { mod->B1type = - 1; mod->B1typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1eval.c0000644000265600020320000004666112264261473020602 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/suffix.h" /* This routine evaluates the drain current, its derivatives and the * charges associated with the gate,bulk and drain terminal * using the B1 (Berkeley Short-Channel IGFET Model) Equations. */ void B1evaluate(double vds, double vbs, double vgs, B1instance *here, B1model *model, double *gmPointer, double *gdsPointer, double *gmbsPointer, double *qgPointer, double *qbPointer, double *qdPointer, double *cggbPointer, double *cgdbPointer, double *cgsbPointer, double *cbgbPointer, double *cbdbPointer, double *cbsbPointer, double *cdgbPointer, double *cddbPointer, double *cdsbPointer, double *cdrainPointer, double *vonPointer, double *vdsatPointer, CKTcircuit *ckt) { double gm; double gds; double gmbs; double qg = 0.0; double qb = 0.0; double qd = 0.0; double cggb = 0.0; double cgdb = 0.0; double cgsb = 0.0; double cbgb = 0.0; double cbdb = 0.0; double cbsb = 0.0; double cdgb = 0.0; double cddb = 0.0; double cdsb = 0.0; double Vfb; double Phi; double K1; double K2; double Vdd; double Ugs; double Uds; double dUgsdVbs; double Leff; double dUdsdVbs; double dUdsdVds; double Eta; double dEtadVds; double dEtadVbs; double Vpb; double SqrtVpb; double Von; double Vth; double dVthdVbs; double dVthdVds; double Vgs_Vth; double DrainCurrent; double G; double A; double Arg; double dGdVbs; double dAdVbs; double Beta; double Beta_Vds_0; double BetaVdd; double dBetaVdd_dVds; double Beta0; double dBeta0dVds; double dBeta0dVbs; double VddSquare; double C1; double C2; double dBetaVdd_dVbs; double dBeta_Vds_0_dVbs; double dC1dVbs; double dC2dVbs; double dBetadVgs; double dBetadVds; double dBetadVbs; double VdsSat = 0.0; double Argl1; double Argl2; double Vc; double Term1; double K; double Args1; double dVcdVgs; double dVcdVds; double dVcdVbs; double dKdVc; double dKdVgs; double dKdVds; double dKdVbs; double Args2; double Args3; double Warg1; double Vcut; double N; double N0; double NB; double ND; double Warg2; double Wds; double Wgs; double Ilimit; double Iexp; double Temp1; double Vth0; double Arg1; double Arg2; double Arg3; double Arg5; double Ent; double Vcom; double Vgb; double Vgb_Vfb; double VdsPinchoff; double EntSquare; double Vgs_VthSquare; double Argl3; double Argl4; double Argl5; double Argl6; double Argl7; double Argl8; double Argl9; double dEntdVds; double dEntdVbs; double cgbb; double cdbb; double cbbb; double WLCox; double Vtsquare; double Temp3; int ChargeComputationNeeded; double co4v15; if (ckt->CKTmode & (MODEAC | MODETRAN)) { ChargeComputationNeeded = 1; } else if (ckt->CKTmode & MODEINITSMSIG) { ChargeComputationNeeded = 1; } else if ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { ChargeComputationNeeded = 1; } else { ChargeComputationNeeded = 0; } Vfb = here->B1vfb; Phi = here->B1phi; K1 = here->B1K1; K2 = here->B1K2; Vdd = model->B1vdd; if((Ugs = here->B1ugs + here->B1ugsB * vbs) <= 0 ) { Ugs = 0; dUgsdVbs = 0.0; } else { dUgsdVbs = here->B1ugsB; } if((Uds = here->B1uds + here->B1udsB * vbs + here->B1udsD*(vds-Vdd)) <= 0 ) { Uds = 0.0; dUdsdVbs = dUdsdVds = 0.0; } else { Leff = here->B1l * 1.e6 - model->B1deltaL; /* Leff in um */ Uds = Uds / Leff; dUdsdVbs = here->B1udsB / Leff; dUdsdVds = here->B1udsD / Leff; } Eta = here->B1eta + here->B1etaB * vbs + here->B1etaD * (vds - Vdd); if( Eta <= 0 ) { Eta = 0; dEtadVds = dEtadVbs = 0.0 ; } else if ( Eta > 1 ) { Eta = 1; dEtadVds = dEtadVbs = 0; } else { dEtadVds = here->B1etaD; dEtadVbs = here->B1etaB; } if( vbs < 0 ) { Vpb = Phi - vbs; } else { Vpb = Phi; } SqrtVpb = sqrt( Vpb ); Von = Vfb + Phi + K1 * SqrtVpb - K2 * Vpb - Eta * vds; Vth = Von; dVthdVds = - Eta - dEtadVds * vds; dVthdVbs = K2 - 0.5 * K1 / SqrtVpb - dEtadVbs * vds; Vgs_Vth = vgs - Vth; G = 1. - 1./(1.744+0.8364 * Vpb); A = 1. + 0.5*G*K1/SqrtVpb; A = MAX( A, 1.0); /* Modified */ Arg = MAX(( 1 + Ugs * Vgs_Vth), 1.0); dGdVbs = -0.8364 * (1-G) * (1-G); dAdVbs = 0.25 * K1 / SqrtVpb *(2*dGdVbs + G/Vpb); if( Vgs_Vth < 0 ) { /* cutoff */ DrainCurrent = 0; gm = 0; gds = 0; gmbs = 0; goto SubthresholdComputation; } /* Quadratic Interpolation for Beta0 (Beta at vgs = 0, vds=Vds) */ Beta_Vds_0 = (here->B1betaZero + here->B1betaZeroB * vbs); BetaVdd = (here->B1betaVdd + here->B1betaVddB * vbs); dBetaVdd_dVds = MAX( here->B1betaVddD, 0.0); /* Modified */ if( vds > Vdd ) { Beta0 = BetaVdd + dBetaVdd_dVds * (vds - Vdd); dBeta0dVds = dBetaVdd_dVds; dBeta0dVbs = here->B1betaVddB; } else { VddSquare = Vdd * Vdd; C1 = ( -BetaVdd + Beta_Vds_0 + dBetaVdd_dVds * Vdd) / VddSquare; C2 = 2 * (BetaVdd - Beta_Vds_0) / Vdd - dBetaVdd_dVds; dBeta_Vds_0_dVbs = here->B1betaZeroB; dBetaVdd_dVbs = here->B1betaVddB; dC1dVbs = (dBeta_Vds_0_dVbs - dBetaVdd_dVbs) / VddSquare; dC2dVbs = dC1dVbs * (-2) * Vdd; Beta0 = (C1 * vds + C2) * vds + Beta_Vds_0; dBeta0dVds = 2*C1*vds + C2; dBeta0dVbs = dC1dVbs * vds * vds + dC2dVbs * vds + dBeta_Vds_0_dVbs; } /*Beta = Beta0 / ( 1 + Ugs * Vgs_Vth );*/ Beta = Beta0 / Arg ; dBetadVgs = - Beta * Ugs / Arg; dBetadVds = dBeta0dVds / Arg - dBetadVgs * dVthdVds ; dBetadVbs = dBeta0dVbs / Arg + Beta * Ugs * dVthdVbs / Arg - Beta * Vgs_Vth * dUgsdVbs / Arg; /*VdsSat = MAX( Vgs_Vth / ( A + Uds * Vgs_Vth ), 0.0);*/ if((Vc = Uds * Vgs_Vth / A) < 0.0 ) Vc=0.0; Term1 = sqrt( 1 + 2 * Vc ); K = 0.5 * ( 1 + Vc + Term1 ); VdsSat = MAX( Vgs_Vth / ( A * sqrt(K) ) , 0.0 ); if( vds < VdsSat ) { /* Triode Region */ /*Argl1 = 1 + Uds * vds;*/ Argl1 = MAX( (1 + Uds * vds), 1.); Argl2 = Vgs_Vth - 0.5 * A * vds; DrainCurrent = Beta * Argl2 * vds / Argl1; gm = (dBetadVgs * Argl2 * vds + Beta * vds) / Argl1; gds = (dBetadVds * Argl2 * vds + Beta * (Vgs_Vth - vds * dVthdVds - A * vds) - DrainCurrent * (vds * dUdsdVds + Uds )) / Argl1; gmbs = (dBetadVbs * Argl2 * vds + Beta * vds * (- dVthdVbs - 0.5 * vds * dAdVbs ) - DrainCurrent * vds * dUdsdVbs ) / Argl1; } else { /* Pinchoff (Saturation) Region */ Args1 = 1. + 1. / Term1; dVcdVgs = Uds / A; dVcdVds = Vgs_Vth * dUdsdVds / A - dVcdVgs * dVthdVds; dVcdVbs = ( Vgs_Vth * dUdsdVbs - Uds * (dVthdVbs + Vgs_Vth * dAdVbs / A ))/ A; dKdVc = 0.5* Args1; dKdVgs = dKdVc * dVcdVgs; dKdVds = dKdVc * dVcdVds; dKdVbs = dKdVc * dVcdVbs; Args2 = Vgs_Vth / A / K; Args3 = Args2 * Vgs_Vth; DrainCurrent = 0.5 * Beta * Args3; gm = 0.5 * Args3 * dBetadVgs + Beta * Args2 - DrainCurrent * dKdVgs / K; gds = 0.5 * Args3 * dBetadVds - Beta * Args2 * dVthdVds - DrainCurrent * dKdVds / K; gmbs = 0.5 * dBetadVbs * Args3 - Beta * Args2 *dVthdVbs - DrainCurrent * (dAdVbs / A + dKdVbs / K ); } SubthresholdComputation: N0 = here->B1subthSlope; Vcut = - 40. * N0 * CONSTvt0 ; /* The following 'if' statement has been modified so that subthreshold * * current computation is always executed unless N0 >= 200. This should * * get rid of the Ids kink seen on Ids-Vgs plots at low Vds. * * Peter M. Lee * * 6/8/90 * * Old 'if' statement: * * if( (N0 >= 200) || (Vgs_Vth < Vcut ) || (Vgs_Vth > (-0.5*Vcut))) */ if (N0 >= 200) { goto ChargeComputation; } NB = here->B1subthSlopeB; ND = here->B1subthSlopeD; N = N0 + NB * vbs + ND * vds; /* subthreshold slope */ if( N < 0.5 ) N = 0.5; Warg1 = exp( - vds / CONSTvt0 ); Wds = 1 - Warg1; Wgs = exp( Vgs_Vth / ( N * CONSTvt0 )); Vtsquare = CONSTvt0 * CONSTvt0 ; Warg2 = 6.04965 * Vtsquare * here->B1betaZero; Ilimit = 4.5 * Vtsquare * here->B1betaZero; Iexp = Warg2 * Wgs * Wds; DrainCurrent = DrainCurrent + Ilimit * Iexp / ( Ilimit + Iexp ); Temp1 = Ilimit / ( Ilimit + Iexp ); Temp1 = Temp1 * Temp1; Temp3 = Ilimit / ( Ilimit + Wgs * Warg2 ); Temp3=Temp3 * Temp3 * Warg2 * Wgs; /* if ( Temp3 > Ilimit ) Temp3=Ilimit;*/ gm = gm + Temp1 * Iexp / ( N * CONSTvt0 ); /* gds term has been modified to prevent blow up at Vds=0 */ gds = gds + Temp3 * ( -Wds / N / CONSTvt0 * (dVthdVds + Vgs_Vth * ND / N ) + Warg1 / CONSTvt0 ); gmbs = gmbs - Temp1 * Iexp * (dVthdVbs + Vgs_Vth * NB / N ) / ( N * CONSTvt0 ); ChargeComputation: /* Some Limiting of DC Parameters */ if(DrainCurrent < 0.0) DrainCurrent = 0.0; if(gm < 0.0) gm = 0.0; if(gds < 0.0) gds = 0.0; if(gmbs < 0.0) gmbs = 0.0; WLCox = model->B1Cox * (here->B1l - model->B1deltaL * 1.e-6) * (here->B1w - model->B1deltaW * 1.e-6) * 1.e4; /* F */ if( ! ChargeComputationNeeded ) { qg = 0; qd = 0; qb = 0; cggb = 0; cgsb = 0; cgdb = 0; cdgb = 0; cdsb = 0; cddb = 0; cbgb = 0; cbsb = 0; cbdb = 0; goto finished; } G = 1. - 1./(1.744+0.8364 * Vpb); A = 1. + 0.5*G*K1/SqrtVpb; A = MAX( A, 1.0); /* Modified */ /*Arg = 1 + Ugs * Vgs_Vth;*/ dGdVbs = -0.8364 * (1-G) * (1-G); dAdVbs = 0.25 * K1 / SqrtVpb *(2*dGdVbs + G/Vpb); Phi = MAX( 0.1, Phi); if( model->B1channelChargePartitionFlag ) { /*0/100 partitioning for drain/source chArges at the saturation region*/ Vth0 = Vfb + Phi + K1 * SqrtVpb; Vgs_Vth = vgs - Vth0; Arg1 = A * vds; Arg2 = Vgs_Vth - 0.5 * Arg1; Arg3 = vds - Arg1; Arg5 = Arg1 * Arg1; dVthdVbs = - 0.5 * K1 / SqrtVpb; dAdVbs = 0.5 * K1 * (0.5 * G / Vpb - 0.8364 * (1 -G) * (1 - G) ) / SqrtVpb ; Ent = MAX(Arg2,1.0e-8); dEntdVds = - 0.5 * A; dEntdVbs = - dVthdVbs - 0.5 * vds * dAdVbs; Vcom = Vgs_Vth * Vgs_Vth / 6.0 - 1.25e-1 * Arg1 * Vgs_Vth + 2.5e-2 * Arg5; VdsPinchoff = MAX( Vgs_Vth / A, 0.0); Vgb = vgs - vbs ; Vgb_Vfb = Vgb - Vfb; if( Vgb_Vfb < 0){ /* Accumulation Region */ qg = WLCox * Vgb_Vfb; qb = - qg; qd = 0. ; cggb = WLCox; cgdb = 0.; cgsb = 0.; cbgb = -WLCox; cbdb = 0.; cbsb = 0.; cdgb = 0.; cddb = 0.; cdsb = 0.; goto finished; } else if ( vgs < Vth0 ){ /* Subthreshold Region */ qg = 0.5 * WLCox * K1 * K1 * (-1 + sqrt(1 + 4 * Vgb_Vfb / (K1 * K1))); qb = -qg; qd = 0.; cggb = WLCox / sqrt(1 + 4 * Vgb_Vfb / (K1 * K1)); cgdb = cgsb = 0.; cbgb = -cggb; cbdb = cbsb = cdgb = cddb = cdsb = 0.0; goto finished; } else if( vds < VdsPinchoff ){ /* triode region */ /*Vgs_Vth2 = Vgs_Vth*Vgs_Vth;*/ EntSquare = Ent * Ent; Argl1 = 1.2e1 * EntSquare; Argl2 = 1.0 - A; Argl3 = Arg1 * vds; /*Argl4 = Vcom/Ent/EntSquare;*/ if (Ent > 1.0e-8) { Argl5 = Arg1 / Ent; /*Argl6 = Vcom/EntSquare;*/ } else { Argl5 = 2.0; Argl6 = 4.0 / 1.5e1; } Argl7 = Argl5 / 1.2e1; Argl8 = 6.0 * Ent; Argl9 = 0.125 * Argl5 * Argl5; qg = WLCox * (vgs - Vfb - Phi - 0.5 * vds + vds * Argl7); qb = WLCox * ( - Vth0 + Vfb + Phi + 0.5 * Arg3 - Arg3 * Argl7); qd = - WLCox * (0.5 * Vgs_Vth - 0.75 * Arg1 + 0.125 * Arg1 * Argl5); cggb = WLCox * (1.0 - Argl3 / Argl1); cgdb = WLCox * ( - 0.5 + Arg1 / Argl8 - Argl3 * dEntdVds / Argl1); cgbb = WLCox * (vds * vds * dAdVbs * Ent - Argl3 * dEntdVbs) / Argl1; cgsb = - (cggb + cgdb + cgbb); cbgb = WLCox * Argl3 * Argl2 / Argl1; cbdb = WLCox * Argl2 * (0.5 - Arg1 / Argl8 + Argl3 * dEntdVds / Argl1); cbbb = - WLCox * (dVthdVbs + 0.5 * vds * dAdVbs + vds * vds * ((1.0 - 2.0 * A) * dAdVbs * Ent - Argl2 * A * dEntdVbs) / Argl1); cbsb = - (cbgb + cbdb + cbbb); cdgb = - WLCox * (0.5 - Argl9); cddb = WLCox * (0.75 * A - 0.25 * A * Arg1 / Ent + Argl9 * dEntdVds); cdbb = WLCox * (0.5 * dVthdVbs + vds * dAdVbs * (0.75 - 0.25 * Argl5 ) + Argl9 * dEntdVbs); cdsb = - (cdgb + cddb + cdbb); goto finished; } else if( vds >= VdsPinchoff ) { /* saturation region */ Args1 = 1.0 / (3.0 * A); qg = WLCox * (vgs - Vfb - Phi - Vgs_Vth * Args1); qb = WLCox * (Vfb + Phi - Vth0 + (1.0 - A) * Vgs_Vth * Args1); qd = 0.0; cggb = WLCox * (1.0 - Args1); cgdb = 0.0; cgbb = WLCox * Args1 * (dVthdVbs + Vgs_Vth * dAdVbs / A); cgsb = - (cggb + cgdb + cgbb); cbgb = WLCox * (Args1 - 1.0 / 3.0); cbdb = 0.0; cbbb = - WLCox * ((2.0 / 3.0 + Args1) * dVthdVbs + Vgs_Vth * Args1 * dAdVbs / A); /* Modified */ cbsb = - (cbgb + cbdb + cbbb); cdgb = 0.0; cddb = 0.0; cdsb = 0.0; goto finished; } goto finished; } else { /* ChannelChargePartionFlag < = 0 */ /*40/60 partitioning for drain/source chArges at the saturation region*/ co4v15 = 4./15.; Vth0 = Vfb+Phi+K1*SqrtVpb; Vgs_Vth = vgs-Vth0; Arg1 = A*vds; Arg2 = Vgs_Vth-0.5*Arg1; Arg3 = vds-Arg1; Arg5 = Arg1*Arg1; dVthdVbs = -0.5*K1/SqrtVpb; dAdVbs = 0.5*K1*(0.5*G/Vpb-0.8364*(1-G)*(1-G))/SqrtVpb; Ent = MAX(Arg2,1.0e-8); dEntdVds = -0.5*A; dEntdVbs = -dVthdVbs-0.5*vds*dAdVbs; Vcom = Vgs_Vth*Vgs_Vth/6.0-1.25e-1*Arg1*Vgs_Vth+2.5e-2*Arg5; VdsPinchoff = MAX( Vgs_Vth/A, 0.0); Vgb = vgs - vbs ; Vgb_Vfb = Vgb - Vfb; if( Vgb_Vfb < 0) { /* Accumulation Region */ qg = WLCox * Vgb_Vfb; qb = - qg; qd = 0. ; cggb = WLCox; cgdb = 0.; cgsb = 0.; cbgb = -WLCox; cbdb = 0.; cbsb = 0.; cdgb = 0.; cddb = 0.; cdsb = 0.; goto finished; } else if ( vgs < Vth0 ) { /* Subthreshold Region */ qg = 0.5 * WLCox * K1 * K1 * (-1+sqrt(1+4*Vgb_Vfb/(K1*K1))); qb = -qg; qd = 0.; cggb = WLCox/sqrt(1+4*Vgb_Vfb/(K1*K1)); cgdb = cgsb = 0.; cbgb = -cggb; cbdb = cbsb = cdgb = cddb = cdsb = 0.0; goto finished; } else if ( vds < VdsPinchoff ) { /* triode region */ Vgs_VthSquare = Vgs_Vth*Vgs_Vth; EntSquare = Ent*Ent; Argl1 = 1.2e1*EntSquare; Argl2 = 1.0-A; Argl3 = Arg1*vds; Argl4 = Vcom/Ent/EntSquare; if (Ent > 1.0e-8) { Argl5 = Arg1/Ent; Argl6 = Vcom/EntSquare; } else { Argl5 = 2.0; Argl6 = 4.0/1.5e1; } Argl7 = Argl5/1.2e1; Argl8 = 6.0*Ent; qg = WLCox*(vgs-Vfb-Phi-0.5*vds+vds*Argl7); qb = WLCox*(-Vth0+Vfb+Phi+0.5*Arg3-Arg3*Argl7); qd = -WLCox*(0.5*(Vgs_Vth-Arg1)+Arg1*Argl6); cggb = WLCox*(1.0-Argl3/Argl1); cgdb = WLCox*(-0.5+Arg1/Argl8-Argl3*dEntdVds/Argl1); cgbb = WLCox*(vds*vds*dAdVbs*Ent-Argl3*dEntdVbs)/Argl1; cgsb = -(cggb+cgdb+cgbb); cbgb = WLCox*Argl3*Argl2/Argl1; cbdb = WLCox*Argl2*(0.5-Arg1/Argl8+Argl3*dEntdVds/Argl1); cbbb = -WLCox*(dVthdVbs+0.5*vds*dAdVbs+vds*vds*((1.0-2.0*A) *dAdVbs*Ent-Argl2*A*dEntdVbs)/Argl1); cbsb = -(cbgb+cbdb+cbbb); cdgb = -WLCox*(0.5+Arg1*(4.0*Vgs_Vth-1.5*Arg1)/Argl1- 2.0*Arg1*Argl4); cddb = WLCox*(0.5*A+2.0*Arg1*dEntdVds*Argl4-A*(2.0*Vgs_VthSquare -3.0*Arg1*Vgs_Vth+0.9*Arg5)/Argl1); cdbb = WLCox*(0.5*dVthdVbs+0.5*vds*dAdVbs+2.0*Arg1*dEntdVbs *Argl4-vds*(2.0*Vgs_VthSquare*dAdVbs-4.0*A*Vgs_Vth*dVthdVbs-3.0 *Arg1*Vgs_Vth*dAdVbs+1.5*A*Arg1*dVthdVbs+0.9*Arg5*dAdVbs) /Argl1); cdsb = -(cdgb+cddb+cdbb); goto finished; } else if( vds >= VdsPinchoff ) { /* saturation region */ Args1 = 1.0/(3.0*A); qg = WLCox*(vgs-Vfb-Phi-Vgs_Vth*Args1); qb = WLCox*(Vfb+Phi-Vth0+(1.0-A)*Vgs_Vth*Args1); qd = -co4v15*WLCox*Vgs_Vth; cggb = WLCox*(1.0-Args1); cgdb = 0.0; cgbb = WLCox*Args1*(dVthdVbs+Vgs_Vth*dAdVbs/A); cgsb = -(cggb+cgdb+cgbb); cbgb = WLCox*(Args1-1.0/3.0); cbdb = 0.0; cbbb = -WLCox*((2.0/3.0+Args1)*dVthdVbs+Vgs_Vth*Args1*dAdVbs/A); cbsb = -(cbgb+cbdb+cbbb); cdgb = -co4v15*WLCox; cddb = 0.0; cdbb = co4v15*WLCox*dVthdVbs; cdsb = -(cdgb+cddb+cdbb); goto finished; } } finished: /* returning Values to Calling Routine */ *gmPointer = MAX(gm,0.0); *gdsPointer = MAX( gds, 0.0); *gmbsPointer = MAX(gmbs,0.0); *qgPointer = qg; *qbPointer = qb; *qdPointer = qd; *cggbPointer = cggb; *cgdbPointer = cgdb; *cgsbPointer = cgsb; *cbgbPointer = cbgb; *cbdbPointer = cbdb; *cbsbPointer = cbsb; *cdgbPointer = cdgb; *cddbPointer = cddb; *cdsbPointer = cdsb; *cdrainPointer = MAX(DrainCurrent,0.0); *vonPointer = Von; *vdsatPointer = VdsSat; } ngspice-26/src/spicelib/devices/bsim1/Makefile.am0000644000265600020320000000105612264261473021305 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim1.la libbsim1_la_SOURCES = \ b1.c \ b1acld.c \ b1ask.c \ b1cvtest.c \ b1del.c \ b1dest.c \ b1disto.c \ b1dset.c \ b1eval.c \ b1getic.c \ b1ld.c \ b1mask.c \ b1mdel.c \ b1moscap.c \ b1mpar.c \ b1par.c \ b1noi.c \ b1pzld.c \ b1set.c \ b1temp.c \ b1trunc.c \ bsim1def.h \ bsim1ext.h \ bsim1init.c \ bsim1init.h \ bsim1itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/bsim1/b1getic.c0000644000265600020320000000242312264261473020732 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1getic(GENmodel *inModel, CKTcircuit *ckt) { B1model *model = (B1model*)inModel; B1instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->B1nextModel) { for(here = model->B1instances; here ; here = here->B1nextInstance) { if(!here->B1icVBSGiven) { here->B1icVBS = *(ckt->CKTrhs + here->B1bNode) - *(ckt->CKTrhs + here->B1sNode); } if(!here->B1icVDSGiven) { here->B1icVDS = *(ckt->CKTrhs + here->B1dNode) - *(ckt->CKTrhs + here->B1sNode); } if(!here->B1icVGSGiven) { here->B1icVGS = *(ckt->CKTrhs + here->B1gNode) - *(ckt->CKTrhs + here->B1sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim1/bsim1init.c0000644000265600020320000000402312264261473021311 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim1itf.h" #include "bsim1ext.h" #include "bsim1init.h" SPICEdev B1info = { { "BSIM1", "Berkeley Short Channel IGFET Model", &B1nSize, &B1nSize, B1names, &B1pTSize, B1pTable, &B1mPTSize, B1mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ B1param, /* DEVmodParam */ B1mParam, /* DEVload */ B1load, /* DEVsetup */ B1setup, /* DEVunsetup */ B1unsetup, /* DEVpzSetup */ B1setup, /* DEVtemperature*/ B1temp, /* DEVtrunc */ B1trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ B1acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ B1destroy, /* DEVmodDelete */ B1mDelete, /* DEVdelete */ B1delete, /* DEVsetic */ B1getic, /* DEVask */ B1ask, /* DEVmodAsk */ B1mAsk, /* DEVpzLoad */ B1pzLoad, /* DEVconvTest */ B1convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ B1disto, /* DEVnoise */ B1noise, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &B1iSize, /* DEVmodSize */ &B1mSize }; SPICEdev * get_bsim1_info(void) { return &B1info; } ngspice-26/src/spicelib/devices/bsim1/b1mask.c0000644000265600020320000002067612264261473020604 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Hong J. Park **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim1def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int B1mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B1model *model = (B1model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM1_MOD_VFB0: value->rValue = model->B1vfb0; return(OK); case BSIM1_MOD_VFBL: value->rValue = model->B1vfbL; return(OK); case BSIM1_MOD_VFBW: value->rValue = model->B1vfbW; return(OK); case BSIM1_MOD_PHI0: value->rValue = model->B1phi0; return(OK); case BSIM1_MOD_PHIL: value->rValue = model->B1phiL; return(OK); case BSIM1_MOD_PHIW: value->rValue = model->B1phiW; return(OK); case BSIM1_MOD_K10: value->rValue = model->B1K10; return(OK); case BSIM1_MOD_K1L: value->rValue = model->B1K1L; return(OK); case BSIM1_MOD_K1W: value->rValue = model->B1K1W; return(OK); case BSIM1_MOD_K20: value->rValue = model->B1K20; return(OK); case BSIM1_MOD_K2L: value->rValue = model->B1K2L; return(OK); case BSIM1_MOD_K2W: value->rValue = model->B1K2W; return(OK); case BSIM1_MOD_ETA0: value->rValue = model->B1eta0; return(OK); case BSIM1_MOD_ETAL: value->rValue = model->B1etaL; return(OK); case BSIM1_MOD_ETAW: value->rValue = model->B1etaW; return(OK); case BSIM1_MOD_ETAB0: value->rValue = model->B1etaB0; return(OK); case BSIM1_MOD_ETABL: value->rValue = model->B1etaBl; return(OK); case BSIM1_MOD_ETABW: value->rValue = model->B1etaBw; return(OK); case BSIM1_MOD_ETAD0: value->rValue = model->B1etaD0; return(OK); case BSIM1_MOD_ETADL: value->rValue = model->B1etaDl; return(OK); case BSIM1_MOD_ETADW: value->rValue = model->B1etaDw; return(OK); case BSIM1_MOD_DELTAL: value->rValue = model->B1deltaL; return(OK); case BSIM1_MOD_DELTAW: value->rValue = model->B1deltaW; return(OK); case BSIM1_MOD_MOBZERO: value->rValue = model->B1mobZero; return(OK); case BSIM1_MOD_MOBZEROB0: value->rValue = model->B1mobZeroB0; return(OK); case BSIM1_MOD_MOBZEROBL: value->rValue = model->B1mobZeroBl; return(OK); case BSIM1_MOD_MOBZEROBW: value->rValue = model->B1mobZeroBw; return(OK); case BSIM1_MOD_MOBVDD0: value->rValue = model->B1mobVdd0; return(OK); case BSIM1_MOD_MOBVDDL: value->rValue = model->B1mobVddl; return(OK); case BSIM1_MOD_MOBVDDW: value->rValue = model->B1mobVddw; return(OK); case BSIM1_MOD_MOBVDDB0: value->rValue = model->B1mobVddB0; return(OK); case BSIM1_MOD_MOBVDDBL: value->rValue = model->B1mobVddBl; return(OK); case BSIM1_MOD_MOBVDDBW: value->rValue = model->B1mobVddBw; return(OK); case BSIM1_MOD_MOBVDDD0: value->rValue = model->B1mobVddD0; return(OK); case BSIM1_MOD_MOBVDDDL: value->rValue = model->B1mobVddDl; return(OK); case BSIM1_MOD_MOBVDDDW: value->rValue = model->B1mobVddDw; return(OK); case BSIM1_MOD_UGS0: value->rValue = model->B1ugs0; return(OK); case BSIM1_MOD_UGSL: value->rValue = model->B1ugsL; return(OK); case BSIM1_MOD_UGSW: value->rValue = model->B1ugsW; return(OK); case BSIM1_MOD_UGSB0: value->rValue = model->B1ugsB0; return(OK); case BSIM1_MOD_UGSBL: value->rValue = model->B1ugsBL; return(OK); case BSIM1_MOD_UGSBW: value->rValue = model->B1ugsBW; return(OK); case BSIM1_MOD_UDS0: value->rValue = model->B1uds0; return(OK); case BSIM1_MOD_UDSL: value->rValue = model->B1udsL; return(OK); case BSIM1_MOD_UDSW: value->rValue = model->B1udsW; return(OK); case BSIM1_MOD_UDSB0: value->rValue = model->B1udsB0; return(OK); case BSIM1_MOD_UDSBL: value->rValue = model->B1udsBL; return(OK); case BSIM1_MOD_UDSBW: value->rValue = model->B1udsBW; return(OK); case BSIM1_MOD_UDSD0: value->rValue = model->B1udsD0; return(OK); case BSIM1_MOD_UDSDL: value->rValue = model->B1udsDL; return(OK); case BSIM1_MOD_UDSDW: value->rValue = model->B1udsDW; return(OK); case BSIM1_MOD_N00: value->rValue = model->B1subthSlope0; return(OK); case BSIM1_MOD_N0L: value->rValue = model->B1subthSlopeL; return(OK); case BSIM1_MOD_N0W: value->rValue = model->B1subthSlopeW; return(OK); case BSIM1_MOD_NB0: value->rValue = model->B1subthSlopeB0; return(OK); case BSIM1_MOD_NBL: value->rValue = model->B1subthSlopeBL; return(OK); case BSIM1_MOD_NBW: value->rValue = model->B1subthSlopeBW; return(OK); case BSIM1_MOD_ND0: value->rValue = model->B1subthSlopeD0; return(OK); case BSIM1_MOD_NDL: value->rValue = model->B1subthSlopeDL; return(OK); case BSIM1_MOD_NDW: value->rValue = model->B1subthSlopeDW; return(OK); case BSIM1_MOD_TOX: value->rValue = model->B1oxideThickness; return(OK); case BSIM1_MOD_TEMP: value->rValue = model->B1temp; return(OK); case BSIM1_MOD_VDD: value->rValue = model->B1vdd; return(OK); case BSIM1_MOD_CGSO: value->rValue = model->B1gateSourceOverlapCap; return(OK); case BSIM1_MOD_CGDO: value->rValue = model->B1gateDrainOverlapCap; return(OK); case BSIM1_MOD_CGBO: value->rValue = model->B1gateBulkOverlapCap; return(OK); case BSIM1_MOD_XPART: value->iValue = model->B1channelChargePartitionFlag; return(OK); case BSIM1_MOD_RSH: value->rValue = model->B1sheetResistance; return(OK); case BSIM1_MOD_JS: value->rValue = model->B1jctSatCurDensity; return(OK); case BSIM1_MOD_PB: value->rValue = model->B1bulkJctPotential; return(OK); case BSIM1_MOD_MJ: value->rValue = model->B1bulkJctBotGradingCoeff; return(OK); case BSIM1_MOD_PBSW: value->rValue = model->B1sidewallJctPotential; return(OK); case BSIM1_MOD_MJSW: value->rValue = model->B1bulkJctSideGradingCoeff; return(OK); case BSIM1_MOD_CJ: value->rValue = model->B1unitAreaJctCap; return(OK); case BSIM1_MOD_CJSW: value->rValue = model->B1unitLengthSidewallJctCap; return(OK); case BSIM1_MOD_DEFWIDTH: value->rValue = model->B1defaultWidth; return(OK); case BSIM1_MOD_DELLENGTH: value->rValue = model->B1deltaLength; return(OK); case BSIM1_MOD_AF: value->rValue = model->B1fNexp; return(OK); case BSIM1_MOD_KF: value->rValue = model->B1fNcoef; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim1/Makefile.in0000644000265600020320000004356712264261535021332 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim1_la_LIBADD = am_libbsim1_la_OBJECTS = b1.lo b1acld.lo b1ask.lo b1cvtest.lo b1del.lo \ b1dest.lo b1disto.lo b1dset.lo b1eval.lo b1getic.lo b1ld.lo \ b1mask.lo b1mdel.lo b1moscap.lo b1mpar.lo b1par.lo b1noi.lo \ b1pzld.lo b1set.lo b1temp.lo b1trunc.lo bsim1init.lo libbsim1_la_OBJECTS = $(am_libbsim1_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim1_la_SOURCES) DIST_SOURCES = $(libbsim1_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim1.la libbsim1_la_SOURCES = \ b1.c \ b1acld.c \ b1ask.c \ b1cvtest.c \ b1del.c \ b1dest.c \ b1disto.c \ b1dset.c \ b1eval.c \ b1getic.c \ b1ld.c \ b1mask.c \ b1mdel.c \ b1moscap.c \ b1mpar.c \ b1par.c \ b1noi.c \ b1pzld.c \ b1set.c \ b1temp.c \ b1trunc.c \ bsim1def.h \ bsim1ext.h \ bsim1init.c \ bsim1init.h \ bsim1itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim1.la: $(libbsim1_la_OBJECTS) $(libbsim1_la_DEPENDENCIES) $(EXTRA_libbsim1_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim1_la_OBJECTS) $(libbsim1_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1disto.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1dset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1moscap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b1trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim1init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim1/b1dest.c0000644000265600020320000000140312264261473020573 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim1def.h" #include "ngspice/suffix.h" void B1destroy(GENmodel **inModel) { B1model **model = (B1model**)inModel; B1instance *here; B1instance *prev = NULL; B1model *mod = *model; B1model *oldmod = NULL; for( ; mod ; mod = mod->B1nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->B1instances ; here ; here = here->B1nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/bsim1/bsim1def.h0000644000265600020320000005204212264261473021115 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong June Park, Thomas L. Quarles **********/ #ifndef BSIM1 #define BSIM1 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for B1 MOSFETs */ #define B1numStates 35 #define B1NDCOEFFS 82 /* information needed for each instance */ typedef struct sBSIM1instance { struct sBSIM1model *B1modPtr; /* pointer to model */ struct sBSIM1instance *B1nextInstance; /* pointer to next instance of *current model*/ IFuid B1name; /* pointer to character string naming this instance */ int B1states; /* index into state table for this device */ int B1dNode; /* number of the gate node of the mosfet */ int B1gNode; /* number of the gate node of the mosfet */ int B1sNode; /* number of the source node of the mosfet */ int B1bNode; /* number of the bulk node of the mosfet */ int B1dNodePrime; /* number of the internal drain node of the mosfet */ int B1sNodePrime; /* number of the internal source node of the mosfet */ double B1l; /* the length of the channel region */ double B1w; /* the width of the channel region */ double B1m; /* the parallel multiplier */ double B1drainArea; /* the area of the drain diffusion */ double B1sourceArea; /* the area of the source diffusion */ double B1drainSquares; /* the length of the drain in squares */ double B1sourceSquares; /* the length of the source in squares */ double B1drainPerimeter; double B1sourcePerimeter; double B1sourceConductance; /*conductance of source(or 0):set in setup*/ double B1drainConductance; /*conductance of drain(or 0):set in setup*/ double B1icVBS; /* initial condition B-S voltage */ double B1icVDS; /* initial condition D-S voltage */ double B1icVGS; /* initial condition G-S voltage */ double B1von; double B1vdsat; int B1off; /* non-zero to indicate device is off for dc analysis*/ int B1mode; /* device mode : 1 = normal, -1 = inverse */ double B1vfb; /* flat band voltage at given L and W */ double B1phi; /* surface potential at strong inversion */ double B1K1; /* bulk effect coefficient 1 */ double B1K2; /* bulk effect coefficient 2 */ double B1eta; /* drain induced barrier lowering */ double B1etaB; /* Vbs dependence of Eta */ double B1etaD; /* Vds dependence of Eta */ double B1betaZero; /* Beta at vds = 0 and vgs = Vth */ double B1betaZeroB; /* Vbs dependence of BetaZero */ double B1betaVdd; /* Beta at vds=Vdd and vgs=Vth */ double B1betaVddB; /* Vbs dependence of BVdd */ double B1betaVddD; /* Vds dependence of BVdd */ double B1ugs; /* Mobility degradation due to gate field*/ double B1ugsB; /* Vbs dependence of Ugs */ double B1uds; /* Drift Velocity Saturation due to Vds */ double B1udsB; /* Vbs dependence of Uds */ double B1udsD; /* Vds dependence of Uds */ double B1subthSlope; /* slope of subthreshold current with Vgs*/ double B1subthSlopeB; /* Vbs dependence of Subthreshold Slope */ double B1subthSlopeD; /* Vds dependence of Subthreshold Slope */ double B1GDoverlapCap;/* Gate Drain Overlap Capacitance */ double B1GSoverlapCap;/* Gate Source Overlap Capacitance */ double B1GBoverlapCap;/* Gate Bulk Overlap Capacitance */ double B1vt0; double B1vdd; /* Supply Voltage */ double B1temp; double B1oxideThickness; unsigned B1channelChargePartitionFlag :1; unsigned B1lGiven :1; unsigned B1wGiven :1; unsigned B1mGiven :1; unsigned B1drainAreaGiven :1; unsigned B1sourceAreaGiven :1; unsigned B1drainSquaresGiven :1; unsigned B1sourceSquaresGiven :1; unsigned B1drainPerimeterGiven :1; unsigned B1sourcePerimeterGiven :1; unsigned B1dNodePrimeSet :1; unsigned B1sNodePrimeSet :1; unsigned B1icVBSGiven :1; unsigned B1icVDSGiven :1; unsigned B1icVGSGiven :1; unsigned B1vonGiven :1; unsigned B1vdsatGiven :1; double *B1DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *B1GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *B1SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *B1BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *B1DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *B1SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *B1DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *B1GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *B1GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *B1GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *B1SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *B1BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *B1BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *B1DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *B1DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *B1BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *B1DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *B1SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *B1SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *B1DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *B1SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *B1SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ #ifndef NODISTO double B1dCoeffs[B1NDCOEFFS]; #else /* NODISTO */ double *B1dCoeffs; #endif /* NODISTO */ /* indices to the array of BSIM1 noise sources */ #define B1RDNOIZ 0 #define B1RSNOIZ 1 #define B1IDNOIZ 2 #define B1FLNOIZ 3 #define B1TOTNOIZ 4 #define B1NSRCS 5 /* the number of BSIM1 noise sources */ #ifndef NONOISE double B1nVar[NSTATVARS][B1NSRCS]; #else /* NONOISE */ double **B1nVar; #endif /* NONOISE */ } B1instance ; #ifndef CONFIG #define B1vbd B1states+ 0 #define B1vbs B1states+ 1 #define B1vgs B1states+ 2 #define B1vds B1states+ 3 #define B1cd B1states+ 4 #define B1id B1states+ 4 #define B1cbs B1states+ 5 #define B1ibs B1states+ 5 #define B1cbd B1states+ 6 #define B1ibd B1states+ 6 #define B1gm B1states+ 7 #define B1gds B1states+ 8 #define B1gmbs B1states+ 9 #define B1gbd B1states+ 10 #define B1gbs B1states+ 11 #define B1qb B1states+ 12 #define B1cqb B1states+ 13 #define B1iqb B1states+ 13 #define B1qg B1states+ 14 #define B1cqg B1states+ 15 #define B1iqg B1states+ 15 #define B1qd B1states+ 16 #define B1cqd B1states+ 17 #define B1iqd B1states+ 17 #define B1cggb B1states+ 18 #define B1cgdb B1states+ 19 #define B1cgsb B1states+ 20 #define B1cbgb B1states+ 21 #define B1cbdb B1states+ 22 #define B1cbsb B1states+ 23 #define B1capbd B1states+ 24 #define B1iqbd B1states+ 25 #define B1cqbd B1states+ 25 #define B1capbs B1states+ 26 #define B1iqbs B1states+ 27 #define B1cqbs B1states+ 27 #define B1cdgb B1states+ 28 #define B1cddb B1states+ 29 #define B1cdsb B1states+ 30 #define B1vono B1states+ 31 #define B1vdsato B1states+ 32 #define B1qbs B1states+ 33 #define B1qbd B1states+ 34 /* * the following naming convention is used: * x = vgs * y = vbs * z = vds * DrC is the DrCur * therefore qg_xyz stands for the coefficient of the vgs*vbs*vds * term in the multidimensional Taylor expansion for qg; and DrC_x2y * for the coeff. of the vgs*vgs*vbs term in the DrC expansion. */ #define qg_x B1dCoeffs[0] #define qg_y B1dCoeffs[1] #define qg_z B1dCoeffs[2] #define qg_x2 B1dCoeffs[3] #define qg_y2 B1dCoeffs[4] #define qg_z2 B1dCoeffs[5] #define qg_xy B1dCoeffs[6] #define qg_yz B1dCoeffs[7] #define qg_xz B1dCoeffs[8] #define qg_x3 B1dCoeffs[9] #define qg_y3 B1dCoeffs[10] #define qg_z3 B1dCoeffs[11] #define qg_x2z B1dCoeffs[12] #define qg_x2y B1dCoeffs[13] #define qg_y2z B1dCoeffs[14] #define qg_xy2 B1dCoeffs[15] #define qg_xz2 B1dCoeffs[16] #define qg_yz2 B1dCoeffs[17] #define qg_xyz B1dCoeffs[18] #define qb_x B1dCoeffs[19] #define qb_y B1dCoeffs[20] #define qb_z B1dCoeffs[21] #define qb_x2 B1dCoeffs[22] #define qb_y2 B1dCoeffs[23] #define qb_z2 B1dCoeffs[24] #define qb_xy B1dCoeffs[25] #define qb_yz B1dCoeffs[26] #define qb_xz B1dCoeffs[27] #define qb_x3 B1dCoeffs[28] #define qb_y3 B1dCoeffs[29] #define qb_z3 B1dCoeffs[30] #define qb_x2z B1dCoeffs[31] #define qb_x2y B1dCoeffs[32] #define qb_y2z B1dCoeffs[33] #define qb_xy2 B1dCoeffs[34] #define qb_xz2 B1dCoeffs[35] #define qb_yz2 B1dCoeffs[36] #define qb_xyz B1dCoeffs[37] #define qd_x B1dCoeffs[38] #define qd_y B1dCoeffs[39] #define qd_z B1dCoeffs[40] #define qd_x2 B1dCoeffs[41] #define qd_y2 B1dCoeffs[42] #define qd_z2 B1dCoeffs[43] #define qd_xy B1dCoeffs[44] #define qd_yz B1dCoeffs[45] #define qd_xz B1dCoeffs[46] #define qd_x3 B1dCoeffs[47] #define qd_y3 B1dCoeffs[48] #define qd_z3 B1dCoeffs[49] #define qd_x2z B1dCoeffs[50] #define qd_x2y B1dCoeffs[51] #define qd_y2z B1dCoeffs[52] #define qd_xy2 B1dCoeffs[53] #define qd_xz2 B1dCoeffs[54] #define qd_yz2 B1dCoeffs[55] #define qd_xyz B1dCoeffs[56] #define DrC_x B1dCoeffs[57] #define DrC_y B1dCoeffs[58] #define DrC_z B1dCoeffs[59] #define DrC_x2 B1dCoeffs[60] #define DrC_y2 B1dCoeffs[61] #define DrC_z2 B1dCoeffs[62] #define DrC_xy B1dCoeffs[63] #define DrC_yz B1dCoeffs[64] #define DrC_xz B1dCoeffs[65] #define DrC_x3 B1dCoeffs[66] #define DrC_y3 B1dCoeffs[67] #define DrC_z3 B1dCoeffs[68] #define DrC_x2z B1dCoeffs[69] #define DrC_x2y B1dCoeffs[70] #define DrC_y2z B1dCoeffs[71] #define DrC_xy2 B1dCoeffs[72] #define DrC_xz2 B1dCoeffs[73] #define DrC_yz2 B1dCoeffs[74] #define DrC_xyz B1dCoeffs[75] #define gbs1 B1dCoeffs[76] #define gbs2 B1dCoeffs[77] #define gbs3 B1dCoeffs[78] #define gbd1 B1dCoeffs[79] #define gbd2 B1dCoeffs[80] #define gbd3 B1dCoeffs[81] #endif /* per model data */ typedef struct sBSIM1model { /* model structure for a resistor */ int B1modType; /* type index of this device type */ struct sBSIM1model *B1nextModel; /* pointer to next possible model *in linked list */ B1instance * B1instances; /* pointer to list of instances * that have this model */ IFuid B1modName; /* pointer to character string naming this model */ int B1type; /* device type : 1 = nmos, -1 = pmos */ double B1vfb0; double B1vfbL; double B1vfbW; double B1phi0; double B1phiL; double B1phiW; double B1K10; double B1K1L; double B1K1W; double B1K20; double B1K2L; double B1K2W; double B1eta0; double B1etaL; double B1etaW; double B1etaB0; double B1etaBl; double B1etaBw; double B1etaD0; double B1etaDl; double B1etaDw; double B1deltaL; double B1deltaW; double B1mobZero; double B1mobZeroB0; double B1mobZeroBl; double B1mobZeroBw ; double B1mobVdd0; double B1mobVddl; double B1mobVddw; double B1mobVddB0; double B1mobVddBl; double B1mobVddBw; double B1mobVddD0; double B1mobVddDl; double B1mobVddDw; double B1ugs0; double B1ugsL; double B1ugsW; double B1ugsB0; double B1ugsBL; double B1ugsBW; double B1uds0; double B1udsL; double B1udsW; double B1udsB0; double B1udsBL; double B1udsBW; double B1udsD0; double B1udsDL; double B1udsDW; double B1subthSlope0; double B1subthSlopeL; double B1subthSlopeW; double B1subthSlopeB0; double B1subthSlopeBL; double B1subthSlopeBW; double B1subthSlopeD0; double B1subthSlopeDL; double B1subthSlopeDW; double B1oxideThickness; /* unit: micron */ double B1Cox; /* unit: F/cm**2 */ double B1temp; double B1vdd; double B1gateSourceOverlapCap; double B1gateDrainOverlapCap; double B1gateBulkOverlapCap; unsigned B1channelChargePartitionFlag :1; double B1sheetResistance; double B1jctSatCurDensity; double B1bulkJctPotential; double B1bulkJctBotGradingCoeff; double B1bulkJctSideGradingCoeff; double B1sidewallJctPotential; double B1unitAreaJctCap; double B1unitLengthSidewallJctCap; double B1defaultWidth; double B1deltaLength; double B1fNcoef; double B1fNexp; unsigned B1vfb0Given :1; unsigned B1vfbLGiven :1; unsigned B1vfbWGiven :1; unsigned B1phi0Given :1; unsigned B1phiLGiven :1; unsigned B1phiWGiven :1; unsigned B1K10Given :1; unsigned B1K1LGiven :1; unsigned B1K1WGiven :1; unsigned B1K20Given :1; unsigned B1K2LGiven :1; unsigned B1K2WGiven :1; unsigned B1eta0Given :1; unsigned B1etaLGiven :1; unsigned B1etaWGiven :1; unsigned B1etaB0Given :1; unsigned B1etaBlGiven :1; unsigned B1etaBwGiven :1; unsigned B1etaD0Given :1; unsigned B1etaDlGiven :1; unsigned B1etaDwGiven :1; unsigned B1deltaLGiven :1; unsigned B1deltaWGiven :1; unsigned B1mobZeroGiven :1; unsigned B1mobZeroB0Given :1; unsigned B1mobZeroBlGiven :1; unsigned B1mobZeroBwGiven :1; unsigned B1mobVdd0Given :1; unsigned B1mobVddlGiven :1; unsigned B1mobVddwGiven :1; unsigned B1mobVddB0Given :1; unsigned B1mobVddBlGiven :1; unsigned B1mobVddBwGiven :1; unsigned B1mobVddD0Given :1; unsigned B1mobVddDlGiven :1; unsigned B1mobVddDwGiven :1; unsigned B1ugs0Given :1; unsigned B1ugsLGiven :1; unsigned B1ugsWGiven :1; unsigned B1ugsB0Given :1; unsigned B1ugsBLGiven :1; unsigned B1ugsBWGiven :1; unsigned B1uds0Given :1; unsigned B1udsLGiven :1; unsigned B1udsWGiven :1; unsigned B1udsB0Given :1; unsigned B1udsBLGiven :1; unsigned B1udsBWGiven :1; unsigned B1udsD0Given :1; unsigned B1udsDLGiven :1; unsigned B1udsDWGiven :1; unsigned B1subthSlope0Given :1; unsigned B1subthSlopeLGiven :1; unsigned B1subthSlopeWGiven :1; unsigned B1subthSlopeB0Given :1; unsigned B1subthSlopeBLGiven :1; unsigned B1subthSlopeBWGiven :1; unsigned B1subthSlopeD0Given :1; unsigned B1subthSlopeDLGiven :1; unsigned B1subthSlopeDWGiven :1; unsigned B1oxideThicknessGiven :1; unsigned B1tempGiven :1; unsigned B1vddGiven :1; unsigned B1gateSourceOverlapCapGiven :1; unsigned B1gateDrainOverlapCapGiven :1; unsigned B1gateBulkOverlapCapGiven :1; unsigned B1channelChargePartitionFlagGiven :1; unsigned B1sheetResistanceGiven :1; unsigned B1jctSatCurDensityGiven :1; unsigned B1bulkJctPotentialGiven :1; unsigned B1bulkJctBotGradingCoeffGiven :1; unsigned B1sidewallJctPotentialGiven :1; unsigned B1bulkJctSideGradingCoeffGiven :1; unsigned B1unitAreaJctCapGiven :1; unsigned B1unitLengthSidewallJctCapGiven :1; unsigned B1defaultWidthGiven :1; unsigned B1deltaLengthGiven :1; unsigned B1fNcoefGiven :1; unsigned B1fNexpGiven :1; unsigned B1typeGiven :1; } B1model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM1_W 1 #define BSIM1_L 2 #define BSIM1_AS 3 #define BSIM1_AD 4 #define BSIM1_PS 5 #define BSIM1_PD 6 #define BSIM1_NRS 7 #define BSIM1_NRD 8 #define BSIM1_OFF 9 #define BSIM1_IC_VBS 10 #define BSIM1_IC_VDS 11 #define BSIM1_IC_VGS 12 #define BSIM1_IC 13 #define BSIM1_M 14 /* model parameters */ #define BSIM1_MOD_VFB0 101 #define BSIM1_MOD_VFBL 102 #define BSIM1_MOD_VFBW 103 #define BSIM1_MOD_PHI0 104 #define BSIM1_MOD_PHIL 105 #define BSIM1_MOD_PHIW 106 #define BSIM1_MOD_K10 107 #define BSIM1_MOD_K1L 108 #define BSIM1_MOD_K1W 109 #define BSIM1_MOD_K20 110 #define BSIM1_MOD_K2L 111 #define BSIM1_MOD_K2W 112 #define BSIM1_MOD_ETA0 113 #define BSIM1_MOD_ETAL 114 #define BSIM1_MOD_ETAW 115 #define BSIM1_MOD_ETAB0 116 #define BSIM1_MOD_ETABL 117 #define BSIM1_MOD_ETABW 118 #define BSIM1_MOD_ETAD0 119 #define BSIM1_MOD_ETADL 120 #define BSIM1_MOD_ETADW 121 #define BSIM1_MOD_DELTAL 122 #define BSIM1_MOD_DELTAW 123 #define BSIM1_MOD_MOBZERO 124 #define BSIM1_MOD_MOBZEROB0 125 #define BSIM1_MOD_MOBZEROBL 126 #define BSIM1_MOD_MOBZEROBW 127 #define BSIM1_MOD_MOBVDD0 128 #define BSIM1_MOD_MOBVDDL 129 #define BSIM1_MOD_MOBVDDW 130 #define BSIM1_MOD_MOBVDDB0 131 #define BSIM1_MOD_MOBVDDBL 132 #define BSIM1_MOD_MOBVDDBW 133 #define BSIM1_MOD_MOBVDDD0 134 #define BSIM1_MOD_MOBVDDDL 135 #define BSIM1_MOD_MOBVDDDW 136 #define BSIM1_MOD_UGS0 137 #define BSIM1_MOD_UGSL 138 #define BSIM1_MOD_UGSW 139 #define BSIM1_MOD_UGSB0 140 #define BSIM1_MOD_UGSBL 141 #define BSIM1_MOD_UGSBW 142 #define BSIM1_MOD_UDS0 143 #define BSIM1_MOD_UDSL 144 #define BSIM1_MOD_UDSW 145 #define BSIM1_MOD_UDSB0 146 #define BSIM1_MOD_UDSBL 147 #define BSIM1_MOD_UDSBW 148 #define BSIM1_MOD_UDSD0 149 #define BSIM1_MOD_UDSDL 150 #define BSIM1_MOD_UDSDW 151 #define BSIM1_MOD_N00 152 #define BSIM1_MOD_N0L 153 #define BSIM1_MOD_N0W 154 #define BSIM1_MOD_NB0 155 #define BSIM1_MOD_NBL 156 #define BSIM1_MOD_NBW 157 #define BSIM1_MOD_ND0 158 #define BSIM1_MOD_NDL 159 #define BSIM1_MOD_NDW 160 #define BSIM1_MOD_TOX 161 #define BSIM1_MOD_TEMP 162 #define BSIM1_MOD_VDD 163 #define BSIM1_MOD_CGSO 164 #define BSIM1_MOD_CGDO 165 #define BSIM1_MOD_CGBO 166 #define BSIM1_MOD_XPART 167 #define BSIM1_MOD_RSH 168 #define BSIM1_MOD_JS 169 #define BSIM1_MOD_PB 170 #define BSIM1_MOD_MJ 171 #define BSIM1_MOD_PBSW 172 #define BSIM1_MOD_MJSW 173 #define BSIM1_MOD_CJ 174 #define BSIM1_MOD_CJSW 175 #define BSIM1_MOD_DEFWIDTH 176 #define BSIM1_MOD_DELLENGTH 177 #define BSIM1_MOD_NMOS 178 #define BSIM1_MOD_PMOS 179 #define BSIM1_MOD_KF 180 #define BSIM1_MOD_AF 181 /* device questions */ #define BSIM1_DNODE 201 #define BSIM1_GNODE 202 #define BSIM1_SNODE 203 #define BSIM1_BNODE 204 #define BSIM1_DNODEPRIME 205 #define BSIM1_SNODEPRIME 206 #define BSIM1_VBD 207 #define BSIM1_VBS 208 #define BSIM1_VGS 209 #define BSIM1_VDS 210 #define BSIM1_CD 211 #define BSIM1_CBS 212 #define BSIM1_CBD 213 #define BSIM1_GM 214 #define BSIM1_GDS 215 #define BSIM1_GMBS 216 #define BSIM1_GBD 217 #define BSIM1_GBS 218 #define BSIM1_QB 219 #define BSIM1_CQB 220 #define BSIM1_QG 221 #define BSIM1_CQG 222 #define BSIM1_QD 223 #define BSIM1_CQD 224 #define BSIM1_CGG 225 #define BSIM1_CGD 226 #define BSIM1_CGS 227 #define BSIM1_CBG 228 #define BSIM1_CAPBD 231 #define BSIM1_CQBD 232 #define BSIM1_CAPBS 233 #define BSIM1_CQBS 234 #define BSIM1_CDG 235 #define BSIM1_CDD 236 #define BSIM1_CDS 237 #define BSIM1_VON 238 #define BSIM1_QBS 239 #define BSIM1_QBD 240 #define BSIM1_SOURCECONDUCT 241 #define BSIM1_DRAINCONDUCT 242 /* model questions */ #include "bsim1ext.h" extern void B1evaluate(double,double,double,B1instance*,B1model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); #endif /*B1*/ ngspice-26/src/spicelib/devices/bsim1/bsim1init.h0000644000265600020320000000035212264261473021317 0ustar andreasadmin#ifndef _BSIM1INIT_H #define _BSIM1INIT_H extern IFparm B1pTable[ ]; extern IFparm B1mPTable[ ]; extern char *B1names[ ]; extern int B1pTSize; extern int B1mPTSize; extern int B1nSize; extern int B1iSize; extern int B1mSize; #endif ngspice-26/src/spicelib/devices/bsim1/b1set.c0000644000265600020320000003176512264261473020445 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B1setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the B1 device structure with those pointers needed later * for fast matrix loading */ { B1model *model = (B1model*)inModel; B1instance *here; int error; CKTnode *tmp; /* loop through all the B1 device models */ for( ; model != NULL; model = model->B1nextModel ) { /* Default value Processing for B1 MOSFET Models */ if( ! model->B1typeGiven) { model->B1type = NMOS; /* NMOS */ } if( ! model->B1vfb0Given) { model->B1vfb0 = 0.0; } if( ! model->B1vfbLGiven) { model->B1vfbL = 0.0; } if( ! model->B1vfbWGiven) { model->B1vfbW = 0.0; } if( ! model->B1phi0Given) { model->B1phi0 = 0.0; } if( ! model->B1phiLGiven) { model->B1phiL = 0.0; } if( ! model->B1phiWGiven) { model->B1phiW = 0.0; } if( ! model->B1K10Given) { model->B1K10 = 0.0; } if( ! model->B1K1LGiven) { model->B1K1L = 0.0; } if( ! model->B1K1WGiven) { model->B1K1W = 0.0; } if( ! model->B1K20Given) { model->B1K20 = 0.0; } if( ! model->B1K2LGiven) { model->B1K2L = 0.0; } if( ! model->B1K2WGiven) { model->B1K2W = 0.0; } if( ! model->B1eta0Given) { model->B1eta0 = 0.0; } if( ! model->B1etaLGiven) { model->B1etaL = 0.0; } if( ! model->B1etaWGiven) { model->B1etaW = 0.0; } if( ! model->B1mobZeroGiven) { model->B1mobZero = 0.0; } if( ! model->B1deltaLGiven) { model->B1deltaL = 0.0; } if( ! model->B1deltaWGiven) { model->B1deltaW = 0.0; } if( ! model->B1ugs0Given) { model->B1ugs0 = 0.0; } if( ! model->B1ugsLGiven) { model->B1ugsL = 0.0; } if( ! model->B1ugsWGiven) { model->B1ugsW = 0.0; } if( ! model->B1uds0Given) { model->B1uds0 = 0.0; } if( ! model->B1udsLGiven) { model->B1udsL = 0.0; } if( ! model->B1udsWGiven) { model->B1udsW = 0.0; } if( ! model->B1mobZeroB0Given) { model->B1mobZeroB0 = 0.0; } if( ! model->B1mobZeroBlGiven) { model->B1mobZeroBl = 0.0; } if( ! model->B1mobZeroBwGiven) { model->B1mobZeroBw = 0.0; } if( ! model->B1etaB0Given) { model->B1etaB0 = 0.0; } if( ! model->B1etaBlGiven) { model->B1etaBl = 0.0; } if( ! model->B1etaBwGiven) { model->B1etaBw = 0.0; } if( ! model->B1etaD0Given) { model->B1etaD0 = 0.0; } if( ! model->B1etaDlGiven) { model->B1etaDl = 0.0; } if( ! model->B1etaDwGiven) { model->B1etaDw = 0.0; } if( ! model->B1ugsB0Given) { model->B1ugsB0 = 0.0; } if( ! model->B1ugsBLGiven) { model->B1ugsBL = 0.0; } if( ! model->B1ugsBWGiven) { model->B1ugsBW = 0.0; } if( ! model->B1udsB0Given) { model->B1udsB0 = 0.0; } if( ! model->B1udsBLGiven) { model->B1udsBL = 0.0; } if( ! model->B1udsBWGiven) { model->B1udsBW = 0.0; } if( ! model->B1mobVdd0Given) { model->B1mobVdd0 = 0.0; } if( ! model->B1mobVddlGiven) { model->B1mobVddl = 0.0; } if( ! model->B1mobVddwGiven) { model->B1mobVddw = 0.0; } if( ! model->B1mobVddB0Given) { model->B1mobVddB0 = 0.0; } if( ! model->B1mobVddBlGiven) { model->B1mobVddBl = 0.0; } if( ! model->B1mobVddBwGiven) { model->B1mobVddBw = 0.0; } if( ! model->B1mobVddD0Given) { model->B1mobVddD0 = 0.0; } if( ! model->B1mobVddDlGiven) { model->B1mobVddDl = 0.0; } if( ! model->B1mobVddDwGiven) { model->B1mobVddDw = 0.0; } if( ! model->B1udsD0Given) { model->B1udsD0 = 0.0; } if( ! model->B1udsDLGiven) { model->B1udsDL = 0.0; } if( ! model->B1udsDWGiven) { model->B1udsDW = 0.0; } if( ! model->B1oxideThicknessGiven) { model->B1oxideThickness = 0.0; /* um */ } if( ! model->B1tempGiven) { model->B1temp = 0.0; } if( ! model->B1vddGiven) { model->B1vdd = 0.0; } if( ! model->B1gateDrainOverlapCapGiven) { model->B1gateDrainOverlapCap = 0.0; } if( ! model->B1gateSourceOverlapCapGiven) { model->B1gateSourceOverlapCap = 0.0; } if( ! model->B1gateBulkOverlapCapGiven) { model->B1gateBulkOverlapCap = 0.0; } if( ! model->B1channelChargePartitionFlagGiven) { model->B1channelChargePartitionFlag = 0; } if( ! model->B1subthSlope0Given) { model->B1subthSlope0 = 0.0; } if( ! model->B1subthSlopeLGiven) { model->B1subthSlopeL = 0.0; } if( ! model->B1subthSlopeWGiven) { model->B1subthSlopeW = 0.0; } if( ! model->B1subthSlopeB0Given) { model->B1subthSlopeB0 = 0.0; } if( ! model->B1subthSlopeBLGiven) { model->B1subthSlopeBL = 0.0; } if( ! model->B1subthSlopeBWGiven) { model->B1subthSlopeBW = 0.0; } if( ! model->B1subthSlopeD0Given) { model->B1subthSlopeD0 = 0.0; } if( ! model->B1subthSlopeDLGiven) { model->B1subthSlopeDL = 0.0; } if( ! model->B1subthSlopeDWGiven) { model->B1subthSlopeDW = 0.0; } if( ! model->B1sheetResistanceGiven) { model->B1sheetResistance = 0.0; } if( ! model->B1unitAreaJctCapGiven) { model->B1unitAreaJctCap = 0.0; } if( ! model->B1unitLengthSidewallJctCapGiven) { model->B1unitLengthSidewallJctCap = 0.0; } if( ! model->B1jctSatCurDensityGiven) { model->B1jctSatCurDensity = 0.0; } if( ! model->B1bulkJctPotentialGiven) { model->B1bulkJctPotential = 0.0; } if( ! model->B1sidewallJctPotentialGiven) { model->B1sidewallJctPotential = 0.0; } if( ! model->B1bulkJctBotGradingCoeffGiven) { model->B1bulkJctBotGradingCoeff = 0.0; } if( ! model->B1bulkJctSideGradingCoeffGiven) { model->B1bulkJctSideGradingCoeff = 0.0; } if( ! model->B1defaultWidthGiven) { model->B1defaultWidth = 0.0; } if( ! model->B1deltaLengthGiven) { model->B1deltaLength = 0.0; } if( ! model->B1fNcoefGiven) { model->B1fNcoef = 0.0; } if( ! model->B1fNexpGiven) { model->B1fNexp = 1.0; } /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { CKTnode *tmpNode; IFuid tmpName; /* allocate a chunk of the state vector */ here->B1states = *states; *states += B1numStates; /* perform the parameter defaulting */ if(!here->B1drainAreaGiven) { here->B1drainArea = 0; } if(!here->B1drainPerimeterGiven) { here->B1drainPerimeter = 0; } if(!here->B1drainSquaresGiven) { here->B1drainSquares = 1; } if(!here->B1icVBSGiven) { here->B1icVBS = 0; } if(!here->B1icVDSGiven) { here->B1icVDS = 0; } if(!here->B1icVGSGiven) { here->B1icVGS = 0; } if(!here->B1lGiven) { here->B1l = 5e-6; } if(!here->B1sourceAreaGiven) { here->B1sourceArea = 0; } if(!here->B1sourcePerimeterGiven) { here->B1sourcePerimeter = 0; } if(!here->B1sourceSquaresGiven) { here->B1sourceSquares = 1; } if(!here->B1vdsatGiven) { here->B1vdsat = 0; } if(!here->B1vonGiven) { here->B1von = 0; } if(!here->B1wGiven) { here->B1w = 5e-6; } if(!here->B1mGiven) { here->B1m = 1.0; } /* process drain series resistance */ if( (model->B1sheetResistance != 0) && (here->B1drainSquares != 0.0 )) { if(here->B1dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->B1name,"drain"); if(error) return(error); here->B1dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->B1dNodePrime = here->B1dNode; } /* process source series resistance */ if( (model->B1sheetResistance != 0) && (here->B1sourceSquares != 0.0 )) { if(here->B1sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->B1name,"source"); if(error) return(error); here->B1sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->B1sNodePrime = here->B1sNode; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(B1DdPtr, B1dNode, B1dNode); TSTALLOC(B1GgPtr, B1gNode, B1gNode); TSTALLOC(B1SsPtr, B1sNode, B1sNode); TSTALLOC(B1BbPtr, B1bNode, B1bNode); TSTALLOC(B1DPdpPtr, B1dNodePrime, B1dNodePrime); TSTALLOC(B1SPspPtr, B1sNodePrime, B1sNodePrime); TSTALLOC(B1DdpPtr, B1dNode, B1dNodePrime); TSTALLOC(B1GbPtr, B1gNode, B1bNode); TSTALLOC(B1GdpPtr, B1gNode, B1dNodePrime); TSTALLOC(B1GspPtr, B1gNode, B1sNodePrime); TSTALLOC(B1SspPtr, B1sNode, B1sNodePrime); TSTALLOC(B1BdpPtr, B1bNode, B1dNodePrime); TSTALLOC(B1BspPtr, B1bNode, B1sNodePrime); TSTALLOC(B1DPspPtr, B1dNodePrime, B1sNodePrime); TSTALLOC(B1DPdPtr, B1dNodePrime, B1dNode); TSTALLOC(B1BgPtr, B1bNode, B1gNode); TSTALLOC(B1DPgPtr, B1dNodePrime, B1gNode); TSTALLOC(B1SPgPtr, B1sNodePrime, B1gNode); TSTALLOC(B1SPsPtr, B1sNodePrime, B1sNode); TSTALLOC(B1DPbPtr, B1dNodePrime, B1bNode); TSTALLOC(B1SPbPtr, B1sNodePrime, B1bNode); TSTALLOC(B1SPdpPtr, B1sNodePrime, B1dNodePrime); } } return(OK); } int B1unsetup(GENmodel *inModel, CKTcircuit *ckt) { B1model *model; B1instance *here; for (model = (B1model *)inModel; model != NULL; model = model->B1nextModel) { for (here = model->B1instances; here != NULL; here=here->B1nextInstance) { if (here->B1dNodePrime && here->B1dNodePrime != here->B1dNode) { CKTdltNNum(ckt, here->B1dNodePrime); here->B1dNodePrime = 0; } if (here->B1sNodePrime && here->B1sNodePrime != here->B1sNode) { CKTdltNNum(ckt, here->B1sNodePrime); here->B1sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim1/b1dset.c0000644000265600020320000011745712264261473020614 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim1def.h" #include "ngspice/trandefs.h" #include "ngspice/distodef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/devdefs.h" int B1dSetup(GENmodel *inModel, CKTcircuit *ckt) { B1model* model = (B1model*)inModel; B1instance *here; double DrainSatCurrent; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double SourceSatCurrent; double DrainArea; double SourceArea; double DrainPerimeter; double SourcePerimeter; double vt0; double evbs; double lgbs1, lgbs2, lgbs3; double czbd, czbs, czbdsw, czbssw; double PhiB, MJ, MJSW, PhiBSW; double arg, argsw, sarg, sargsw; double capbs1, capbs2, capbs3; double capbd1, capbd2, capbd3; double qg; double qb; double qd; double Vfb; double Phi; double K1; double K2; double Vdd; double Ugs; double Uds; double Leff; double Eta; double Vpb; double SqrtVpb; double Von; double Vth; double DrCur; double G; double A; double Arg; double Beta; double Beta_Vds_0; double BVdd; double Beta0; double VddSquare; double C1; double C2; double VdsSat; double Argl1; double Argl2; double Vc; double Term1; double K; double Args1; double Args2; double Args3; double Warg1; double Vcut; double N; double N0; double NB; double ND; double Warg2; double Wds; double Wgs; double Ilimit; double Iexp; double Vth0; double Arg1; double Arg2; double Arg3; double Arg5; double Ent; double Vcom; double Vgb; double Vgb_Vfb; double VdsPinchoff; double EntSquare; double Argl5; double Argl6; double Argl7; double WLCox; double Vtsquare; int ChargeComputationNeeded; double co4v15; double VgsVth = 0.0; double lgbd1, lgbd2, lgbd3, evbd; double vbd = 0.0; double vgd = 0.0; double vgb = 0.0; double vds = 0.0; double vgs = 0.0; double vbs = 0.0; double dBVdddVds; Dderivs d_Argl6; Dderivs d_Vgb, d_Vgb_Vfb, d_EntSquare, d_Argl5, d_Argl7; Dderivs d_Arg5, d_Ent, d_Vcom, d_VdsPinchoff; Dderivs d_qb, d_qd, d_Vth0, d_Arg1, d_Arg2, d_Arg3; Dderivs d_dummy, d_Vth, d_BVdd, d_Warg1, d_qg; Dderivs d_N, d_Wds, d_Wgs, d_Iexp; Dderivs d_Argl1, d_Argl2, d_Args1, d_Args2, d_Args3; Dderivs d_Beta, d_Vc, d_Term1, d_K, d_VdsSat; Dderivs d_Beta_Vds_0, d_C1, d_C2, d_Beta0; Dderivs d_VgsVth, d_G, d_A, d_Arg, d_DrCur; Dderivs d_Ugs, d_Uds, d_Eta, d_Vpb, d_SqrtVpb, d_Von; Dderivs d_p, d_q, d_r, d_zero; /* loop through all the B1 device models */ for( ; model != NULL; model = model->B1nextModel ) { /* loop through all the instances of the model */ for (here = model->B1instances; here != NULL ; here=here->B1nextInstance) { EffectiveLength=here->B1l - model->B1deltaL * 1.e-6;/* m */ DrainArea = here->B1m * here->B1drainArea; SourceArea = here->B1m * here->B1sourceArea; DrainPerimeter = here->B1m * here->B1drainPerimeter; SourcePerimeter = here->B1m * here->B1sourcePerimeter; if( (DrainSatCurrent=DrainArea*model->B1jctSatCurDensity) < 1e-15){ DrainSatCurrent = 1.0e-15; } if( (SourceSatCurrent=SourceArea*model->B1jctSatCurDensity) <1.0e-15){ SourceSatCurrent = 1.0e-15; } GateSourceOverlapCap = model->B1gateSourceOverlapCap * here->B1w * here->B1m; GateDrainOverlapCap = model->B1gateDrainOverlapCap * here->B1w * here-> B1m; GateBulkOverlapCap = model->B1gateBulkOverlapCap *EffectiveLength; vt0 = model->B1type * here->B1vt0; vbs = model->B1type * ( *(ckt->CKTrhsOld+here->B1bNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vgs = model->B1type * ( *(ckt->CKTrhsOld+here->B1gNode) - *(ckt->CKTrhsOld+here->B1sNodePrime)); vds = model->B1type * ( *(ckt->CKTrhsOld+here->B1dNodePrime) - *(ckt->CKTrhsOld+here->B1sNodePrime)); if(vds >= 0) { /* normal mode */ here->B1mode = 1; } else { /* inverse mode */ here->B1mode = -1; vds = -vds; vgs = vgs + vds; /* these are the local(fake) values now */ vbs = vbs + vds; } vgb = vgs - vbs; vgd = vgs - vds; vbd = vbs - vds; if(vbs <= 0.0 ) { lgbs1 = SourceSatCurrent / CONSTvt0 + ckt->CKTgmin; lgbs2 = lgbs3 = 0.0; } else { evbs = exp(vbs/CONSTvt0); lgbs1 = SourceSatCurrent*evbs/CONSTvt0 + ckt->CKTgmin; lgbs2 = (lgbs1 - ckt->CKTgmin)/(CONSTvt0*2); lgbs3 = lgbs2/(CONSTvt0*3); } if(vbd <= 0.0) { lgbd1 = DrainSatCurrent / CONSTvt0 + ckt->CKTgmin; lgbd2 = lgbd3 = 0.0; } else { evbd = exp(vbd/CONSTvt0); lgbd1 = DrainSatCurrent*evbd/CONSTvt0 + ckt->CKTgmin; lgbd2 = (lgbd1 - ckt->CKTgmin)/(CONSTvt0*2); lgbd3 = lgbd2/(CONSTvt0*3); } /* line 400 */ /* call B1evaluate to calculate drain current and its * derivatives and charge and capacitances related to gate * drain, and bulk */ /* check quadratic interpolation for beta0 ; line 360 */ /* * Copyright (c) 1985 Hong J. Park, Thomas L. Quarles * modified 1988 Jaijeet Roychowdhury */ /* This routine evaluates the drain current, its derivatives and the * charges associated with the gate,bulk and drain terminal * using the B1 (Berkeley Short-Channel IGFET Model) Equations. */ /* as usual p=vgs, q=vbs, r=vds */ { ChargeComputationNeeded = 1; Vfb = here->B1vfb; Phi = here->B1phi; K1 = here->B1K1; K2 = here->B1K2; Vdd = model->B1vdd; d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2r = 0.0; d_p.d3_p2q = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q,&d_p); EqualDeriv(&d_r,&d_p); EqualDeriv(&d_zero,&d_p); d_q.d1_p = d_r.d1_p = d_zero.d1_p = 0.0; d_q.d1_q = d_r.d1_r = 1.0; d_p.value = vgs; d_q.value = vbs; d_r.value = vds; if((Ugs = here->B1ugs + here->B1ugsB * vbs) <= 0 ) { Ugs = 0; EqualDeriv(&d_Ugs,&d_zero); } else { EqualDeriv(&d_Ugs,&d_q); d_Ugs.value = Ugs; d_Ugs.d1_q = here->B1ugsB; } if((Uds = here->B1uds + here->B1udsB * vbs + here->B1udsD*(vds-Vdd)) <= 0 ) { Uds = 0.0; EqualDeriv(&d_Uds,&d_zero); } else { Leff = here->B1l * 1.e6 - model->B1deltaL; /* Leff in um */ /*const*/ Uds = Uds / Leff; /* Uds = (here->B1uds + here->B1udsB * vbs here->B1udsD* (vds-Vdd))/Leff */ EqualDeriv(&d_Uds,&d_r); d_Uds.value = Uds; d_Uds.d1_r = here->B1udsD/Leff; d_Uds.d1_q = here->B1udsB/Leff; } Eta = here->B1eta + here->B1etaB * vbs + here->B1etaD * (vds - Vdd); EqualDeriv(&d_Eta,&d_r); d_Eta.value = Eta; d_Eta.d1_r = here->B1etaD; d_Eta.d1_q = here->B1etaB; if( Eta <= 0 ) { Eta = 0; EqualDeriv(&d_Eta,&d_zero); } else if ( Eta > 1 ) { Eta = 1; EqualDeriv(&d_Eta,&d_zero); d_Eta.value = 1.0; } if( vbs < 0 ) { Vpb = Phi - vbs; EqualDeriv(&d_Vpb,&d_q); d_Vpb.value = Vpb; d_Vpb.d1_q = -1; } else { Vpb = Phi; EqualDeriv(&d_Vpb,&d_zero); d_Vpb.value = Phi; } SqrtVpb = sqrt( Vpb ); SqrtDeriv(&d_SqrtVpb,&d_Vpb); Von = Vfb + Phi + K1 * SqrtVpb - K2 * Vpb - Eta * vds; EqualDeriv(&d_dummy,&d_r); d_dummy.value = -Eta*vds; d_dummy.d1_r = -Eta; TimesDeriv(&d_Von,&d_Vpb,-K2); PlusDeriv(&d_Von,&d_Von,&d_dummy); TimesDeriv(&d_dummy,&d_SqrtVpb,K1); PlusDeriv(&d_Von,&d_dummy,&d_Von); d_Von.value = Von; Vth = Von; EqualDeriv(&d_Vth,&d_Von); VgsVth = vgs - Vth; TimesDeriv(&d_VgsVth,&d_Vth,-1.0); d_VgsVth.value = VgsVth; d_VgsVth.d1_p += 1.0; G = 1./(1.744+0.8364 * Vpb); TimesDeriv(&d_G,&d_Vpb,0.8364); d_G.value += 1.744; InvDeriv(&d_G,&d_G); G = 1 - G; TimesDeriv(&d_G,&d_G,-1.0); d_G.value += 1.0; A = G/SqrtVpb; DivDeriv(&d_A,&d_G,&d_SqrtVpb); A = 1.0 + 0.5*K1*A; TimesDeriv(&d_A,&d_A,0.5*K1); d_A.value += 1.0; A = MAX( A, 1.0); /* Modified */ if (A <= 1.0) { EqualDeriv(&d_A,&d_zero); d_A.value = 1.0; } Arg = MAX(( 1 + Ugs * VgsVth), 1.0); MultDeriv(&d_dummy,&d_Ugs,&d_VgsVth); d_dummy.value += 1.0; if (d_dummy.value <= 1.0) { EqualDeriv(&d_Arg,&d_zero); d_Arg.value = 1.0; } else EqualDeriv(&d_Arg,&d_dummy); if( VgsVth < 0 ) { /* cutoff */ DrCur = 0; EqualDeriv(&d_DrCur,&d_zero); goto SubthresholdComputation; } /* Quadratic Interpolation for Beta0 (Beta at vgs = 0, vds=Vds) */ Beta_Vds_0 = (here->B1betaZero + here->B1betaZeroB * vbs); EqualDeriv(&d_Beta_Vds_0,&d_q); d_Beta_Vds_0.value = Beta_Vds_0; d_Beta_Vds_0.d1_q = here->B1betaZeroB; BVdd = (here->B1betaVdd + here->B1betaVddB * vbs); EqualDeriv(&d_BVdd,&d_q); d_BVdd.value = BVdd; d_BVdd.d1_q = here->B1betaVddB; dBVdddVds = MAX( here->B1betaVddD, 0.0); /* is the above wrong ?!? */ if( vds > Vdd ) { Beta0 = BVdd + dBVdddVds * (vds - Vdd); EqualDeriv(&d_Beta0,&d_r); d_Beta0.value = vds - Vdd; TimesDeriv(&d_Beta0,&d_Beta0,dBVdddVds); PlusDeriv(&d_Beta0,&d_Beta0,&d_BVdd); /* dBVdddVds = const */ /* and this stuff here? */ } else { VddSquare = Vdd * Vdd; /* const */ C1 = ( -BVdd + Beta_Vds_0 + dBVdddVds * Vdd) / VddSquare; TimesDeriv(&d_C1,&d_BVdd,-1.0); PlusDeriv(&d_C1,&d_C1,&d_Beta_Vds_0); d_C1.value += dBVdddVds * Vdd; TimesDeriv(&d_C1,&d_C1,1/VddSquare); C2 = 2 * (BVdd - Beta_Vds_0) / Vdd - dBVdddVds; TimesDeriv(&d_C2,&d_Beta_Vds_0,-1.0); PlusDeriv(&d_C2,&d_C2,&d_BVdd); TimesDeriv(&d_C2,&d_C2,2/Vdd); d_C2.value -= dBVdddVds; Beta0 = (C1 * vds + C2) * vds + Beta_Vds_0; MultDeriv(&d_Beta0,&d_r,&d_C1); PlusDeriv(&d_Beta0,&d_Beta0,&d_C2); MultDeriv(&d_Beta0,&d_Beta0,&d_dummy); PlusDeriv(&d_Beta0,&d_Beta0,&d_Beta_Vds_0); /* dBeta0dVds = 2*C1*vds + C2; dBeta0dVbs = dC1dVbs * vds * vds + dC2dVbs * vds + dBeta_Vds_0_dVbs; maybe we'll need these later */ } /*Beta = Beta0 / ( 1 + Ugs * VgsVth );*/ Beta = Beta0 / Arg ; DivDeriv(&d_Beta,&d_Beta0,&d_Arg); /*VdsSat = MAX( VgsVth / ( A + Uds * VgsVth ), 0.0);*/ Vc = Uds * VgsVth / A; DivDeriv(&d_Vc,&d_VgsVth,&d_A); MultDeriv(&d_Vc,&d_Vc,&d_Uds); if(Vc < 0.0 ) { EqualDeriv(&d_Vc,&d_zero); Vc=0.0; } Term1 = sqrt( 1 + 2 * Vc ); TimesDeriv(&d_Term1,&d_Vc,2.0); d_Term1.value += 1.0; SqrtDeriv(&d_Term1,&d_Term1); K = 0.5 * ( 1 + Vc + Term1 ); PlusDeriv(&d_K,&d_Vc,&d_Term1); d_K.value += 1.0; TimesDeriv(&d_K,&d_K,0.5); VdsSat = VgsVth / ( A * sqrt(K)); if (VdsSat < 0.0) { EqualDeriv(&d_VdsSat,&d_zero); VdsSat = 0.0; } else { SqrtDeriv(&d_VdsSat,&d_K); MultDeriv(&d_VdsSat,&d_VdsSat,&d_A); DivDeriv(&d_VdsSat,&d_VgsVth,&d_VdsSat); } if( vds < VdsSat ) { /* Triode Region */ /*Argl1 = 1 + Uds * vds;*/ Argl1 = 1 + Uds * vds; if (Argl1 < 1.0) { Argl1 = 1.0; EqualDeriv(&d_Argl1,&d_zero); d_Argl1.value = 1.0; } else { MultDeriv(&d_Argl1,&d_r,&d_Uds); d_Argl1.value += 1.0; } Argl2 = VgsVth - 0.5 * A * vds; MultDeriv(&d_Argl2,&d_r,&d_A); TimesDeriv(&d_Argl2,&d_Argl2,-0.5); PlusDeriv(&d_Argl2,&d_Argl2,&d_VgsVth); DrCur = Beta * Argl2 * vds / Argl1; DivDeriv(&d_DrCur,&d_r,&d_Argl1); MultDeriv(&d_DrCur,&d_DrCur,&d_Argl2); MultDeriv(&d_DrCur,&d_DrCur,&d_Beta); } else { /* Pinchoff (Saturation) Region */ /* history Args1 = 1.0 + 1. / Term1; InvDeriv(&d_Args1,&d_Term1); d_Args1.value += 1.0; */ /* dVcdVgs = Uds / A; dVcdVds = VgsVth * dUdsdVds / A - dVcdVgs * dVthdVds; dVcdVbs = ( VgsVth * dUdsdVbs - Uds * (dVthdVbs + VgsVth * dAdVbs / A ))/ A; dKdVc = 0.5* Args1; dKdVgs = dKdVc * dVcdVgs; dKdVds = dKdVc * dVcdVds; dKdVbs = dKdVc * dVcdVbs; */ Args2 = VgsVth / A / K; MultDeriv(&d_Args2,&d_A,&d_K); DivDeriv(&d_Args2,&d_VgsVth,&d_Args2); Args3 = Args2 * VgsVth; MultDeriv(&d_Args3,&d_Args2,&d_VgsVth); DrCur = 0.5 * Beta * Args3; MultDeriv(&d_DrCur,&d_Beta,&d_Args3); TimesDeriv(&d_DrCur,&d_DrCur,0.5); } SubthresholdComputation: N0 = here->B1subthSlope;/*const*/ Vcut = - 40. * N0 * CONSTvt0 ;/*const*/ if( (N0 >= 200) || (VgsVth < Vcut ) || (VgsVth > (-0.5*Vcut))) { goto ChargeComputation; } NB = here->B1subthSlopeB;/*const*/ ND = here->B1subthSlopeD;/*const*/ N = N0 + NB * vbs + ND * vds; /* subthreshold slope */ EqualDeriv(&d_N,&d_r); d_N.value = N; d_N.d1_q = NB; d_N.d1_r = ND; if( N < 0.5 ){ N = 0.5; d_N.value = 0.5; d_N.d1_q = d_N.d1_r = 0.0; } Warg1 = exp( - vds / CONSTvt0 ); TimesDeriv(&d_Warg1,&d_r,-1/CONSTvt0); ExpDeriv(&d_Warg1,&d_Warg1); Wds = 1 - Warg1; TimesDeriv(&d_Wds,&d_Warg1,-1.0); d_Wds.value += 1.0; Wgs = exp( VgsVth / ( N * CONSTvt0 )); DivDeriv(&d_Wgs,&d_VgsVth,&d_N); TimesDeriv(&d_Wgs,&d_Wgs,1/CONSTvt0); ExpDeriv(&d_Wgs,&d_Wgs); Vtsquare = CONSTvt0 * CONSTvt0 ;/*const*/ Warg2 = 6.04965 * Vtsquare * here->B1betaZero;/*const*/ Ilimit = 4.5 * Vtsquare * here->B1betaZero;/*const*/ Iexp = Warg2 * Wgs * Wds; MultDeriv(&d_Iexp,&d_Wgs,&d_Wds); TimesDeriv(&d_Iexp,&d_Iexp,Warg2); DrCur = DrCur + Ilimit * Iexp / ( Ilimit + Iexp ); EqualDeriv(&d_dummy,&d_Iexp); d_dummy.value += Ilimit; InvDeriv(&d_dummy,&d_dummy); MultDeriv(&d_dummy,&d_dummy,&d_Iexp); TimesDeriv(&d_dummy,&d_dummy,Ilimit); PlusDeriv(&d_DrCur,&d_DrCur,&d_dummy); /* gds term has been modified to prevent blow up at Vds=0 */ /* gds = gds + Temp3 * ( -Wds / N / CONSTvt0 * (dVthdVds + VgsVth * ND / N ) + Warg1 / CONSTvt0 ); */ ChargeComputation: /* Some Limiting of DC Parameters */ /* if(DrCur < 0.0) DrCur = 0.0; if(gm < 0.0) gm = 0.0; if(gds < 0.0) gds = 0.0; if(gmbs < 0.0) gmbs = 0.0; */ WLCox = model->B1Cox * (here->B1l - model->B1deltaL * 1.e-6) * ((here->B1w - model->B1deltaW * 1.e-6) * here->B1m) * 1.e4; /* F */ if( ! ChargeComputationNeeded ) { qg = 0; qd = 0; qb = 0; EqualDeriv(&d_qg,&d_zero); EqualDeriv(&d_qb,&d_zero); EqualDeriv(&d_qd,&d_zero); goto finished; } G = 1.0 - 1./(1.744+0.8364 * Vpb); TimesDeriv(&d_G,&d_Vpb,-0.8364); d_G.value -= 1.744; InvDeriv(&d_G,&d_G); d_G.value += 1.0; A = 1.0 + 0.5*K1*G/SqrtVpb; if (A < 1.0) { A = 1.0; EqualDeriv(&d_A,&d_zero); d_A.value = 1.0; } else { DivDeriv(&d_A,&d_G,&d_SqrtVpb); TimesDeriv(&d_A,&d_A,0.5*K1); d_A.value += 1.0; } /*Arg = 1 + Ugs * VgsVth;*/ Phi = MAX( 0.1, Phi);/*const*/ if( model->B1channelChargePartitionFlag ) { /*0/100 partitioning for drain/source chArges at the saturation region*/ Vth0 = Vfb + Phi + K1 * SqrtVpb; TimesDeriv(&d_Vth0,&d_SqrtVpb,K1); d_Vth0.value += Vfb + Phi; VgsVth = vgs - Vth0; TimesDeriv(&d_VgsVth,&d_Vth0,-1.0); PlusDeriv(&d_VgsVth,&d_VgsVth,&d_p); Arg1 = A * vds; MultDeriv(&d_Arg1,&d_A,&d_r); Arg2 = VgsVth - 0.5 * Arg1; TimesDeriv(&d_Arg2,&d_Arg1,-0.5); PlusDeriv(&d_Arg2,&d_Arg2,&d_VgsVth); Arg3 = vds - Arg1; TimesDeriv(&d_Arg3,&d_Arg1,-1.0); PlusDeriv(&d_Arg3,&d_Arg3,&d_r); Arg5 = Arg1 * Arg1; MultDeriv(&d_Arg5,&d_Arg1,&d_Arg1); Ent = MAX(Arg2,1.0e-8); if (Arg2 < 1.0e-8) { EqualDeriv(&d_Ent,&d_zero); d_Ent.value = 1.0e-8; } else { EqualDeriv(&d_Ent,&d_Arg2); } Vcom = VgsVth * VgsVth / 6.0 - 1.25e-1 * Arg1 * VgsVth + 2.5e-2 * Arg5; TimesDeriv(&d_dummy,&d_Arg1,-0.125); TimesDeriv(&d_Vcom,&d_VgsVth,1/6.0); PlusDeriv(&d_Vcom,&d_Vcom,&d_dummy); MultDeriv(&d_Vcom,&d_Vcom,&d_VgsVth); TimesDeriv(&d_dummy,&d_Arg5,2.5e-2); PlusDeriv(&d_Vcom,&d_Vcom,&d_dummy); VdsPinchoff = VgsVth / A; if (VdsPinchoff < 0.0) { VdsPinchoff = 0.0; EqualDeriv(&d_VdsPinchoff,&d_zero); } else { DivDeriv(&d_VdsPinchoff,&d_VgsVth,&d_A); } Vgb = vgs - vbs ; EqualDeriv(&d_Vgb,&d_p); d_Vgb.value = Vgb; d_Vgb.d1_q = -1.0; Vgb_Vfb = Vgb - Vfb; EqualDeriv(&d_Vgb_Vfb,&d_Vgb); d_Vgb_Vfb.value -= Vfb; if( Vgb_Vfb < 0){ /* Accumulation Region */ qg = WLCox * Vgb_Vfb; TimesDeriv(&d_qg,&d_Vgb_Vfb,WLCox); qb = - qg; TimesDeriv(&d_qb,&d_qg,-1.0); qd = 0. ; EqualDeriv(&d_qd,&d_zero); goto finished; } else if ( vgs < Vth0 ){ /* Subthreshold Region */ qg = 0.5 * WLCox * K1 * K1 * (-1 + sqrt(1 + 4 * Vgb_Vfb / (K1 * K1))); TimesDeriv(&d_qg,&d_Vgb_Vfb,4/(K1*K1)); d_qg.value += 1.0; SqrtDeriv(&d_qg,&d_qg); d_qg.value -= 1.0; TimesDeriv(&d_qg,&d_qg,0.5 * WLCox * K1 * K1); qb = -qg; TimesDeriv(&d_qb,&d_qg,-1.0); qd = 0.; EqualDeriv(&d_qd,&d_zero); goto finished; } else if( vds < VdsPinchoff ){ /* triode region */ /*VgsVth2 = VgsVth*VgsVth;*/ EntSquare = Ent * Ent; MultDeriv(&d_EntSquare,&d_Ent,&d_Ent); Argl1 = 1.2e1 * EntSquare; TimesDeriv(&d_Argl1,&d_EntSquare,12.0); Argl2 = 1.0 - A; TimesDeriv(&d_Argl2,&d_A,-1.0); d_Argl2.value += 1.0; /* Argl3 = Arg1 * vds; MultDeriv(&d_Argl3,&d_Arg1,&d_r); */ /*Argl4 = Vcom/Ent/EntSquare;*/ if (Ent > 1.0e-8) { Argl5 = Arg1 / Ent; DivDeriv(&d_Argl5,&d_Arg1,&d_Ent); /*Argl6 = Vcom/EntSquare;*/ } else { Argl5 = 2.0; EqualDeriv(&d_Argl5,&d_zero); d_Argl5.value = 2.0; Argl6 = 4.0 / 1.5e1;/*const*/ } Argl7 = Argl5 / 1.2e1; TimesDeriv(&d_Argl7,&d_Argl5,1.0/12.0); /* Argl8 = 6.0 * Ent; TimesDeriv(&d_Argl8,&d_Ent,6.0); Argl9 = 0.125 * Argl5 * Argl5; MultDeriv(&d_Argl9,&d_Argl5,&d_Argl5); TimesDeriv(&d_Argl9,&d_Argl9,0.125); */ qg = WLCox * (vgs - Vfb - Phi - 0.5 * vds + vds * Argl7); EqualDeriv(&d_qg,&d_Argl7); d_qg.value -= 0.5; MultDeriv(&d_qg,&d_qg,&d_r); d_qg.value += vgs - Vfb - Phi; d_qg.d1_p += 1.0; TimesDeriv(&d_qg,&d_qg,WLCox); qb = WLCox * ( - Vth0 + Vfb + Phi + 0.5 * Arg3 - Arg3 * Argl7); TimesDeriv(&d_qb,&d_Argl7,-1.0); d_qb.value += 0.5; MultDeriv(&d_qb,&d_qb,&d_Arg3); d_qb.value += Vfb + Phi; TimesDeriv(&d_dummy,&d_Vth0,-1.0); PlusDeriv(&d_qb,&d_qb,&d_dummy); TimesDeriv(&d_qb,&d_qb,WLCox); qd = - WLCox * (0.5 * VgsVth - 0.75 * Arg1 + 0.125 * Arg1 * Argl5); TimesDeriv(&d_qd,&d_Argl5,0.125); d_qd.value -= 0.75; MultDeriv(&d_qd,&d_qd,&d_Arg1); TimesDeriv(&d_dummy,&d_VgsVth,0.5); PlusDeriv(&d_qd,&d_qd,&d_dummy); TimesDeriv(&d_qd,&d_qd, -WLCox); goto finished; } else if( vds >= VdsPinchoff ) { /* saturation region */ Args1 = 1.0 / (3*A); TimesDeriv(&d_Args1,&d_A,3.0); InvDeriv(&d_Args1,&d_Args1); qg = WLCox * (vgs - Vfb - Phi - VgsVth * Args1); MultDeriv(&d_qg,&d_VgsVth,&d_Args1); d_qg.value += Vfb + Phi - vgs; d_qg.d1_p -= 1.0; TimesDeriv(&d_qg,&d_qg,-WLCox); qb = WLCox * (Vfb + Phi - Vth0 + (1.0 - A) * VgsVth * Args1); TimesDeriv(&d_dummy,&d_A,-1.0); d_dummy.value += 1.0; MultDeriv(&d_qb,&d_VgsVth, &d_dummy); MultDeriv(&d_qb,&d_qb,&d_Args1); d_qb.value += Vfb + Phi; TimesDeriv(&d_dummy,&d_Vth0,-1.0); PlusDeriv(&d_qb,&d_qb,&d_dummy); TimesDeriv(&d_qb,&d_qb,WLCox); qd = 0.0; EqualDeriv(&d_qd,&d_zero); goto finished; } goto finished; } else { /*0/100 partitioning for drain/source chArges at the saturation region*/ co4v15 = 1./15.; Vth0 = Vfb + Phi + K1 * SqrtVpb; TimesDeriv(&d_Vth0,&d_SqrtVpb,K1); d_Vth0.value += Vfb + Phi; VgsVth = vgs - Vth0; TimesDeriv(&d_VgsVth,&d_Vth0,-1.0); d_VgsVth.value += vgs; d_VgsVth.d1_p += 1.0; Arg1 = A * vds; MultDeriv(&d_Arg1,&d_A,&d_r); Arg2 = VgsVth - 0.5 * Arg1; TimesDeriv(&d_Arg2,&d_Arg1,-0.5); PlusDeriv(&d_Arg2,&d_Arg2,&d_VgsVth); Arg3 = vds - Arg1; TimesDeriv(&d_Arg3,&d_Arg1,-1.0); d_Arg3.value = Arg3; d_Arg3.d1_r += 1.0; Arg5 = Arg1 * Arg1; MultDeriv(&d_Arg5,&d_Arg1,&d_Arg1); Ent = MAX(Arg2,1.0e-8); if (Arg2 < 1.0e-8) { EqualDeriv(&d_Ent,&d_zero); d_Ent.value = Ent; } else { EqualDeriv(&d_Ent,&d_Arg2); } Vcom = VgsVth * VgsVth / 6.0 - 1.25e-1 * Arg1 * VgsVth + 2.5e-2 * Arg5; TimesDeriv(&d_dummy,&d_VgsVth,1/6.0); TimesDeriv(&d_Vcom,&d_Arg1,-0.125); PlusDeriv(&d_Vcom,&d_Vcom,&d_dummy); MultDeriv(&d_Vcom,&d_Vcom,&d_VgsVth); TimesDeriv(&d_dummy,&d_Arg5,2.5e-2); PlusDeriv(&d_Vcom,&d_Vcom,&d_dummy); VdsPinchoff = VgsVth / A; if (VdsPinchoff < 0.0) { VdsPinchoff = 0.0; EqualDeriv(&d_VdsPinchoff,&d_zero); } else { DivDeriv(&d_VdsPinchoff,&d_VgsVth,&d_A); } Vgb = vgs - vbs ; EqualDeriv(&d_Vgb,&d_p); d_Vgb.value = Vgb; d_Vgb.d1_q = -1.0; Vgb_Vfb = Vgb - Vfb; EqualDeriv(&d_Vgb_Vfb,&d_Vgb); d_Vgb_Vfb.value = Vgb_Vfb; if( Vgb_Vfb < 0){ /* Accumulation Region */ qg = WLCox * Vgb_Vfb; TimesDeriv(&d_qg,&d_Vgb_Vfb,WLCox); qb = - qg; TimesDeriv(&d_qb,&d_qg,-1.0); qd = 0. ; EqualDeriv(&d_qd,&d_zero); goto finished; } else if ( vgs < Vth0 ){ /* Subthreshold Region */ qg = 0.5 * WLCox * K1 * K1 * (-1 + sqrt(1 + 4 * Vgb_Vfb / (K1 * K1))); TimesDeriv(&d_qg,&d_Vgb_Vfb,4/(K1*K1)); d_qg.value += 1.0; SqrtDeriv(&d_qg,&d_qg); d_qg.value -= 1.0; TimesDeriv(&d_qg,&d_qg,0.5 * WLCox * K1 * K1); qb = -qg; TimesDeriv(&d_qb,&d_qg,-1.0); qd = 0.; EqualDeriv(&d_qd,&d_zero); goto finished; } else if( vds < VdsPinchoff ){ /* triode region */ /* VgsVthSquare = VgsVth*VgsVth; MultDeriv(&d_VgsVthSquare,&d_VgsVth,&d_VgsVth); */ EntSquare = Ent * Ent; MultDeriv(&d_EntSquare,&d_Ent,&d_Ent); Argl1 = 1.2e1 * EntSquare; TimesDeriv(&d_Argl1,&d_EntSquare,12.0); Argl2 = 1.0 - A; TimesDeriv(&d_Argl2,&d_A,-1.0); d_Argl2.value += 1.0; /* Argl3 = Arg1 * vds; MultDeriv(&d_Argl3,&d_Arg1,&d_r); Argl4 = Vcom/Ent/EntSquare; MultDeriv(&d_Argl4,&d_Ent,&d_EntSquare); DivDeriv(&d_Argl4,&d_Vcom,&d_Argl4); */ if (Ent > 1.0e-8) { Argl5 = Arg1 / Ent; DivDeriv(&d_Argl5,&d_Arg1,&d_Ent); Argl6 = Vcom/EntSquare; DivDeriv(&d_Argl6,&d_Vcom,&d_EntSquare); } else { Argl5 = 2.0; EqualDeriv(&d_Argl5,&d_zero); d_Argl5.value = Argl5; Argl6 = 4.0 / 1.5e1; EqualDeriv(&d_Argl6,&d_zero); d_Argl6.value = Argl6; } Argl7 = Argl5 / 1.2e1; TimesDeriv(&d_Argl7,&d_Argl5,1/12.0); /* Argl8 = 6.0 * Ent; TimesDeriv(&d_Argl8,&d_Ent,6.0); Argl9 = 0.125 * Argl5 * Argl5; MultDeriv(&d_Argl9,&d_Argl5,&d_Argl5); TimesDeriv(&d_Argl9,&d_Argl9,0.125); */ qg = WLCox * (vgs - Vfb - Phi - 0.5 * vds + vds * Argl7); EqualDeriv(&d_qg,&d_Argl7); d_qg.value -= 0.5; MultDeriv(&d_qg,&d_qg,&d_r); d_qg.value += vgs - Vfb - Phi; d_qg.d1_p += 1.0; TimesDeriv(&d_qg,&d_qg,WLCox); qb = WLCox * ( - Vth0 + Vfb + Phi + 0.5 * Arg3 - Arg3 * Argl7); TimesDeriv(&d_qb,&d_Argl7,-1.0); d_qb.value += 0.5; MultDeriv(&d_qb,&d_qb,&d_Arg3); d_qb.value += Vfb + Phi; TimesDeriv(&d_dummy,&d_Vth0,-1.0); PlusDeriv(&d_qb,&d_qb,&d_dummy); TimesDeriv(&d_qb,&d_qb,WLCox); qd = - WLCox * (0.5 * (VgsVth - Arg1) + Arg1 * Argl6); MultDeriv(&d_dummy,&d_Arg1,&d_Argl6); TimesDeriv(&d_qd,&d_Arg1,-1.0); PlusDeriv(&d_qd,&d_qd,&d_VgsVth); TimesDeriv(&d_qd,&d_qd,0.5); PlusDeriv(&d_qd,&d_qd,&d_dummy); TimesDeriv(&d_qd,&d_qd,-WLCox); goto finished; } else if( vds >= VdsPinchoff ) { /* saturation region */ Args1 = 1.0 / (3*A); TimesDeriv(&d_Args1,&d_A,3.0); InvDeriv(&d_Args1,&d_Args1); qg = WLCox * (vgs - Vfb - Phi - VgsVth * Args1); MultDeriv(&d_qg,&d_VgsVth,&d_Args1); d_qg.value += Vfb + Phi - vgs; d_qg.d1_p -= 1.0; TimesDeriv(&d_qg,&d_qg,-WLCox); qb = WLCox * (Vfb + Phi - Vth0 + (1.0 - A) * VgsVth * Args1); TimesDeriv(&d_dummy,&d_A,-1.0); d_dummy.value += 1.0; MultDeriv(&d_qb,&d_VgsVth, &d_dummy); MultDeriv(&d_qb,&d_qb,&d_Args1); d_qb.value += Vfb + Phi; TimesDeriv(&d_dummy,&d_Vth0,-1.0); PlusDeriv(&d_qb,&d_qb,&d_dummy); TimesDeriv(&d_qb,&d_qb,WLCox); qd = -co4v15*WLCox*VgsVth; TimesDeriv(&d_qd,&d_VgsVth,-co4v15*WLCox); goto finished; } } } finished: /* returning Values to Calling Routine */ /* * the above has set up (DrCur) and (the node q's) * and (their derivatives upto third order wrt vgs, vbs, and * vds) */ /* * */ /* * charge storage elements * * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ czbd = model->B1unitAreaJctCap * DrainArea; czbs = model->B1unitAreaJctCap * SourceArea; czbdsw= model->B1unitLengthSidewallJctCap * DrainPerimeter; czbssw= model->B1unitLengthSidewallJctCap * SourcePerimeter; PhiB = model->B1bulkJctPotential; PhiBSW = model->B1sidewallJctPotential; MJ = model->B1bulkJctBotGradingCoeff; MJSW = model->B1bulkJctSideGradingCoeff; /* Source Bulk Junction */ if( vbs < 0 ) { arg = 1 - vbs / PhiB; argsw = 1 - vbs / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); /* *(ckt->CKTstate0 + here->B1qbs) = PhiB * czbs * (1-arg*sarg)/(1-MJ) + PhiBSW * czbssw * (1-argsw*sargsw)/(1-MJSW); */ capbs1 = czbs * sarg + czbssw * sargsw ; capbs2 = (czbs * MJ * sarg / (PhiB*arg) + czbssw * MJSW * sargsw /(PhiBSW*argsw))/2.0; capbs3 = (czbs * (MJ) * (MJ + 1.) * sarg /((PhiB*arg)*(PhiB*arg)) + czbssw * MJSW * (MJSW + 1.) * sargsw / (PhiBSW*argsw*PhiBSW*argsw))/6.0; } else { /* *(ckt->CKTstate0+here->B1qbs) = vbs*(czbs+czbssw)+ vbs*vbs*(czbs*MJ*0.5/PhiB + czbssw * MJSW * 0.5/PhiBSW); */ capbs1 = czbs + czbssw + vbs *(czbs*MJ/PhiB+ czbssw * MJSW / PhiBSW ); capbs2 = (czbs*MJ/PhiB+czbssw * MJSW / PhiBSW )*0.5; capbs3 = 0.0; } /* Drain Bulk Junction */ if( vbd < 0 ) { arg = 1 - vbd / PhiB; argsw = 1 - vbd / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); /* *(ckt->CKTstate0 + here->B1qbd) = PhiB * czbd * (1-arg*sarg)/(1-MJ) + PhiBSW * czbdsw * (1-argsw*sargsw)/(1-MJSW); */ capbd1 = czbd * sarg + czbdsw * sargsw ; capbd2 = (czbd * MJ * sarg / (PhiB*arg) + czbdsw * MJSW * sargsw /(PhiBSW*argsw))*0.5; capbd3 = (czbd * (MJ) * (MJ + 1.) * sarg /((PhiB*arg)*(PhiB*arg)) + czbdsw * MJSW * (MJSW + 1.) * sargsw / (PhiBSW*argsw*PhiBSW*argsw))/6.0; } else { /* *(ckt->CKTstate0+here->B1qbd) = vbd*(czbd+czbdsw)+ vbd*vbd*(czbd*MJ*0.5/PhiB + czbdsw * MJSW * 0.5/PhiBSW); */ capbd1 = czbd + czbdsw + vbd *(czbd*MJ/PhiB+ czbdsw * MJSW / PhiBSW ); capbd2 = 0.5*(czbs*MJ/PhiB+czbssw * MJSW / PhiBSW ); capbd3 = 0.0; } #if 0 qgd = GateDrainOverlapCap * (vgs - vds); qgs = GateSourceOverlapCap * vgs; qgb = GateBulkOverlapCap * (vgs -vbs); *qGatePointer = *qGatePointer + qgd + qgs + qgb; *qBulkPointer = *qBulkPointer - qgb; *qDrainPointer = *qDrainPointer - qgd; *qSourcePointer = -(*qGatePointer + *qBulkPointer + *qDrainPointer); #endif d_qg.d1_p += GateDrainOverlapCap + GateSourceOverlapCap + GateBulkOverlapCap; d_qg.d1_q += -GateBulkOverlapCap; d_qg.d1_r += -GateDrainOverlapCap; d_qb.d1_p += -GateBulkOverlapCap; d_qb.d1_q += GateBulkOverlapCap + capbs1 + capbd1; d_qb.d1_r += -capbd1; d_qd.d1_p += - GateDrainOverlapCap; d_qd.d1_q += -capbd1; d_qd.d1_r += GateDrainOverlapCap + capbd1; /* d[23]_qg_d[vlgbds23] += 0.0; d2_qb_dvgs2 += 0.0; d3_qb_dvgs3 += 0.0 d[23]_qb_dvgs[dvbds23] += 0.0 */ d_qb.d2_q2 += 2* ( capbd2 + capbs2); d_qb.d3_q3 += 6*(capbd3 + capbs3); d_qb.d2_qr += -2*capbd2; d_qb.d3_q2r += -capbd3*6; d_qb.d3_qr2 += capbd3*6; d_qb.d2_r2 += 2*capbd2; d_qb.d3_r3 += -6*capbd3; /* d[23]_qd_dp[dvbds23] += 0.0 */ d_qd.d2_q2 -= 2*capbd2; d_qd.d3_q3 -= 6*capbd3; d_qd.d2_r2 -= 2*capbd2; d_qd.d3_r3 -= -6*capbd3; d_qd.d2_qr -= -2*capbd2; d_qd.d3_q2r -= -6*capbd3; d_qd.d3_qr2 -= 6*capbd3; /* get all the coefficients and adjust for mode and type */ if (here->B1mode == 1) { /* normal mode - no source-drain interchange */ here->qg_x = d_qg.d1_p; here->qg_y = d_qg.d1_q; here->qg_z = d_qg.d1_r; here->qg_x2 = d_qg.d2_p2; here->qg_y2 = d_qg.d2_q2; here->qg_z2 = d_qg.d2_r2; here->qg_xy = d_qg.d2_pq; here->qg_yz = d_qg.d2_qr; here->qg_xz = d_qg.d2_pr; here->qg_x3 = d_qg.d3_p3; here->qg_y3 = d_qg.d3_q3; here->qg_z3 = d_qg.d3_r3; here->qg_x2z = d_qg.d3_p2r; here->qg_x2y = d_qg.d3_p2q; here->qg_y2z = d_qg.d3_q2r; here->qg_xy2 = d_qg.d3_pq2; here->qg_xz2 = d_qg.d3_pr2; here->qg_yz2 = d_qg.d3_qr2; here->qg_xyz = d_qg.d3_pqr; here->qb_x = d_qb.d1_p; here->qb_y = d_qb.d1_q; here->qb_z = d_qb.d1_r; here->qb_x2 = d_qb.d2_p2; here->qb_y2 = d_qb.d2_q2; here->qb_z2 = d_qb.d2_r2; here->qb_xy = d_qb.d2_pq; here->qb_yz = d_qb.d2_qr; here->qb_xz = d_qb.d2_pr; here->qb_x3 = d_qb.d3_p3; here->qb_y3 = d_qb.d3_q3; here->qb_z3 = d_qb.d3_r3; here->qb_x2z = d_qb.d3_p2r; here->qb_x2y = d_qb.d3_p2q; here->qb_y2z = d_qb.d3_q2r; here->qb_xy2 = d_qb.d3_pq2; here->qb_xz2 = d_qb.d3_pr2; here->qb_yz2 = d_qb.d3_qr2; here->qb_xyz = d_qb.d3_pqr; here->qd_x = d_qd.d1_p; here->qd_y = d_qd.d1_q; here->qd_z = d_qd.d1_r; here->qd_x2 = d_qd.d2_p2; here->qd_y2 = d_qd.d2_q2; here->qd_z2 = d_qd.d2_r2; here->qd_xy = d_qd.d2_pq; here->qd_yz = d_qd.d2_qr; here->qd_xz = d_qd.d2_pr; here->qd_x3 = d_qd.d3_p3; here->qd_y3 = d_qd.d3_q3; here->qd_z3 = d_qd.d3_r3; here->qd_x2z = d_qd.d3_p2r; here->qd_x2y = d_qd.d3_p2q; here->qd_y2z = d_qd.d3_q2r; here->qd_xy2 = d_qd.d3_pq2; here->qd_xz2 = d_qd.d3_pr2; here->qd_yz2 = d_qd.d3_qr2; here->qd_xyz = d_qd.d3_pqr; here->DrC_x = d_DrCur.d1_p; here->DrC_y = d_DrCur.d1_q; here->DrC_z = d_DrCur.d1_r; here->DrC_x2 = d_DrCur.d2_p2; here->DrC_y2 = d_DrCur.d2_q2; here->DrC_z2 = d_DrCur.d2_r2; here->DrC_xy = d_DrCur.d2_pq; here->DrC_yz = d_DrCur.d2_qr; here->DrC_xz = d_DrCur.d2_pr; here->DrC_x3 = d_DrCur.d3_p3; here->DrC_y3 = d_DrCur.d3_q3; here->DrC_z3 = d_DrCur.d3_r3; here->DrC_x2z = d_DrCur.d3_p2r; here->DrC_x2y = d_DrCur.d3_p2q; here->DrC_y2z = d_DrCur.d3_q2r; here->DrC_xy2 = d_DrCur.d3_pq2; here->DrC_xz2 = d_DrCur.d3_pr2; here->DrC_yz2 = d_DrCur.d3_qr2; here->DrC_xyz = d_DrCur.d3_pqr; here->gbs1 = lgbs1; here->gbs2 = lgbs2; here->gbs3 = lgbs3; here->gbd1 = lgbd1; here->gbd2 = lgbd2; here->gbd3 = lgbd3; } else { /* * inverse mode - source and drain interchanged * inversion equations for realqg and realqb are the * same; a minus is added for the * realDrCur equation; * realqd = -(realqb + realqg + fakeqd) */ here->qg_x = -(-d_qg.d1_p); here->qg_y = -(-d_qg.d1_q); here->qg_z = -(d_qg.d1_p + d_qg.d1_q + d_qg.d1_r); here->qg_x2 = -(-d_qg.d2_p2); here->qg_y2 = -(-d_qg.d2_q2); here->qg_z2 = -(-(d_qg.d2_p2 + d_qg.d2_q2 + d_qg.d2_r2 + 2*(d_qg.d2_pq + d_qg.d2_pr + d_qg.d2_qr))); here->qg_xy = -(-d_qg.d2_pq); here->qg_yz = -(d_qg.d2_pq + d_qg.d2_q2 + d_qg.d2_qr); here->qg_xz = -(d_qg.d2_p2 + d_qg.d2_pq + d_qg.d2_pr); here->qg_x3 = -(-d_qg.d3_p3); here->qg_y3 = -(-d_qg.d3_q3); here->qg_z3 = -(d_qg.d3_p3 + d_qg.d3_q3 + d_qg.d3_r3 + 3*(d_qg.d3_p2q + d_qg.d3_p2r + d_qg.d3_pq2 + d_qg.d3_q2r + d_qg.d3_pr2 + d_qg.d3_qr2) + 6*d_qg.d3_pqr ); here->qg_x2z = -(d_qg.d3_p3 + d_qg.d3_p2q + d_qg.d3_p2r); here->qg_x2y = -(-d_qg.d3_p2q); here->qg_y2z = -(d_qg.d3_pq2 + d_qg.d3_q3 + d_qg.d3_q2r); here->qg_xy2 = -(-d_qg.d3_pq2); here->qg_xz2 = -(-(d_qg.d3_p3 + 2*(d_qg.d3_p2q + d_qg.d3_p2r + d_qg.d3_pqr) + d_qg.d3_pq2 + d_qg.d3_pr2)); here->qg_yz2 = -(-(d_qg.d3_q3 + 2*(d_qg.d3_pq2 + d_qg.d3_q2r + d_qg.d3_pqr) + d_qg.d3_p2q + d_qg.d3_qr2)); here->qg_xyz = -(d_qg.d3_p2q + d_qg.d3_pq2 + d_qg.d3_pqr); here->qb_x = -(-d_qb.d1_p); here->qb_y = -(-d_qb.d1_q); here->qb_z = -(d_qb.d1_p + d_qb.d1_q + d_qb.d1_r); here->qb_x2 = -(-d_qb.d2_p2); here->qb_y2 = -(-d_qb.d2_q2); here->qb_z2 = -(-(d_qb.d2_p2 + d_qb.d2_q2 + d_qb.d2_r2 + 2*(d_qb.d2_pq + d_qb.d2_pr + d_qb.d2_qr))); here->qb_xy = -(-d_qb.d2_pq); here->qb_yz = -(d_qb.d2_pq + d_qb.d2_q2 + d_qb.d2_qr); here->qb_xz = -(d_qb.d2_p2 + d_qb.d2_pq + d_qb.d2_pr); here->qb_x3 = -(-d_qb.d3_p3); here->qb_y3 = -(-d_qb.d3_q3); here->qb_z3 = -(d_qb.d3_p3 + d_qb.d3_q3 + d_qb.d3_r3 + 3*(d_qb.d3_p2q + d_qb.d3_p2r + d_qb.d3_pq2 + d_qb.d3_q2r + d_qb.d3_pr2 + d_qb.d3_qr2) + 6*d_qb.d3_pqr ); here->qb_x2z = -(d_qb.d3_p3 + d_qb.d3_p2q + d_qb.d3_p2r); here->qb_x2y = -(-d_qb.d3_p2q); here->qb_y2z = -(d_qb.d3_pq2 + d_qb.d3_q3 + d_qb.d3_q2r); here->qb_xy2 = -(-d_qb.d3_pq2); here->qb_xz2 = -(-(d_qb.d3_p3 + 2*(d_qb.d3_p2q + d_qb.d3_p2r + d_qb.d3_pqr) + d_qb.d3_pq2 + d_qb.d3_pr2)); here->qb_yz2 = -(-(d_qb.d3_q3 + 2*(d_qb.d3_pq2 + d_qb.d3_q2r + d_qb.d3_pqr) + d_qb.d3_p2q + d_qb.d3_qr2)); here->qb_xyz = -(d_qb.d3_p2q + d_qb.d3_pq2 + d_qb.d3_pqr); here->qd_x= -here->qg_x - here->qb_x +(-d_qd.d1_p); here->qd_y= -here->qg_y - here->qb_y +(-d_qd.d1_q); here->qd_z= -here->qg_z - here->qb_z +(d_qd.d1_p + d_qd.d1_q + d_qd.d1_r); here->qd_x2 = -here->qg_x2 - here->qb_x2 +(-d_qd.d2_p2); here->qd_y2 = -here->qg_y2 - here->qb_y2 +(-d_qd.d2_q2); here->qd_z2 = -here->qg_z2 - here->qb_z2 +(-(d_qd.d2_p2 + d_qd.d2_q2 + d_qd.d2_r2 + 2*(d_qd.d2_pq + d_qd.d2_pr + d_qd.d2_qr))); here->qd_xy = -here->qg_xy - here->qb_xy +(-d_qd.d2_pq); here->qd_yz = -here->qg_yz - here->qb_yz +(d_qd.d2_pq + d_qd.d2_q2 + d_qd.d2_qr); here->qd_xz = -here->qg_xz - here->qb_xz +(d_qd.d2_p2 + d_qd.d2_pq + d_qd.d2_pr); here->qd_x3 = -here->qg_x3 - here->qb_x3 +(-d_qd.d3_p3); here->qd_y3 = -here->qg_y3 - here->qb_y3 +(-d_qd.d3_q3); here->qd_z3 = -here->qg_z3 - here->qb_z3 +(d_qd.d3_p3 + d_qd.d3_q3 + d_qd.d3_r3 + 3*(d_qd.d3_p2q + d_qd.d3_p2r + d_qd.d3_pq2 + d_qd.d3_q2r + d_qd.d3_pr2 + d_qd.d3_qr2) + 6*d_qd.d3_pqr ); here->qd_x2z = -here->qg_x2z - here->qb_x2z +(d_qd.d3_p3 + d_qd.d3_p2q + d_qd.d3_p2r); here->qd_x2y = -here->qg_x2y - here->qb_x2y +(-d_qd.d3_p2q); here->qd_y2z = -here->qg_y2z - here->qb_y2z +(d_qd.d3_pq2 + d_qd.d3_q3 + d_qd.d3_q2r); here->qd_xy2 = -here->qg_xy2 - here->qb_xy2 +(-d_qd.d3_pq2); here->qd_xz2 = -here->qg_xz2 - here->qb_xz2 +(-(d_qd.d3_p3 + 2*(d_qd.d3_p2q + d_qd.d3_p2r + d_qd.d3_pqr) + d_qd.d3_pq2 + d_qd.d3_pr2)); here->qd_yz2 = -here->qg_yz2 - here->qb_yz2 +(-(d_qd.d3_q3 + 2*(d_qd.d3_pq2 + d_qd.d3_q2r + d_qd.d3_pqr) + d_qd.d3_p2q + d_qd.d3_qr2)); here->qd_xyz = -here->qg_xyz - here->qb_xyz +(d_qd.d3_p2q + d_qd.d3_pq2 + d_qd.d3_pqr); here->DrC_x = -d_DrCur.d1_p; here->DrC_y = -d_DrCur.d1_q; here->DrC_z = d_DrCur.d1_p + d_DrCur.d1_q + d_DrCur.d1_r; here->DrC_x2 = -d_DrCur.d2_p2; here->DrC_y2 = -d_DrCur.d2_q2; here->DrC_z2 = -(d_DrCur.d2_p2 + d_DrCur.d2_q2 + d_DrCur.d2_r2 + 2*(d_DrCur.d2_pq + d_DrCur.d2_pr + d_DrCur.d2_qr)); here->DrC_xy = -d_DrCur.d2_pq; here->DrC_yz = d_DrCur.d2_pq + d_DrCur.d2_q2 + d_DrCur.d2_qr; here->DrC_xz = d_DrCur.d2_p2 + d_DrCur.d2_pq + d_DrCur.d2_pr; here->DrC_x3 = -d_DrCur.d3_p3; here->DrC_y3 = -d_DrCur.d3_q3; here->DrC_z3 = d_DrCur.d3_p3 + d_DrCur.d3_q3 + d_DrCur.d3_r3 + 3*(d_DrCur.d3_p2q + d_DrCur.d3_p2r + d_DrCur.d3_pq2 + d_DrCur.d3_q2r + d_DrCur.d3_pr2 + d_DrCur.d3_qr2) + 6*d_DrCur.d3_pqr ; here->DrC_x2z = d_DrCur.d3_p3 + d_DrCur.d3_p2q + d_DrCur.d3_p2r; here->DrC_x2y = -d_DrCur.d3_p2q; here->DrC_y2z = d_DrCur.d3_pq2 + d_DrCur.d3_q3 + d_DrCur.d3_q2r; here->DrC_xy2 = -d_DrCur.d3_pq2; here->DrC_xz2 = -(d_DrCur.d3_p3 + 2*(d_DrCur.d3_p2q + d_DrCur.d3_p2r + d_DrCur.d3_pqr) + d_DrCur.d3_pq2 + d_DrCur.d3_pr2); here->DrC_yz2 = -(d_DrCur.d3_q3 + 2*(d_DrCur.d3_pq2 + d_DrCur.d3_q2r + d_DrCur.d3_pqr) + d_DrCur.d3_p2q + d_DrCur.d3_qr2); here->DrC_xyz = d_DrCur.d3_p2q + d_DrCur.d3_pq2 + d_DrCur.d3_pqr; here->gbs1 = lgbd1; here->gbs2 = lgbd2; here->gbs3 = lgbd3; here->gbd1 = lgbs1; here->gbd2 = lgbs2; here->gbd3 = lgbs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->qg_x2 = 0.5*model->B1type*here->qg_x2; here->qg_y2 = 0.5*model->B1type*here->qg_y2; here->qg_z2 = 0.5*model->B1type*here->qg_z2; here->qg_xy = model->B1type*here->qg_xy; here->qg_yz = model->B1type*here->qg_yz; here->qg_xz = model->B1type*here->qg_xz; here->qg_x3 = here->qg_x3/6.; here->qg_y3 = here->qg_y3/6.; here->qg_z3 = here->qg_z3/6.; here->qg_x2z = 0.5*here->qg_x2z; here->qg_x2y = 0.5*here->qg_x2y; here->qg_y2z = 0.5*here->qg_y2z; here->qg_xy2 = 0.5*here->qg_xy2; here->qg_xz2 = 0.5*here->qg_xz2; here->qg_yz2 = 0.5*here->qg_yz2; here->qb_x2 = 0.5*model->B1type*here->qb_x2; here->qb_y2 = 0.5*model->B1type*here->qb_y2; here->qb_z2 = 0.5*model->B1type*here->qb_z2; here->qb_xy = model->B1type*here->qb_xy; here->qb_yz = model->B1type*here->qb_yz; here->qb_xz = model->B1type*here->qb_xz; here->qb_x3 = here->qb_x3/6.; here->qb_y3 = here->qb_y3/6.; here->qb_z3 = here->qb_z3/6.; here->qb_x2z = 0.5*here->qb_x2z; here->qb_x2y = 0.5*here->qb_x2y; here->qb_y2z = 0.5*here->qb_y2z; here->qb_xy2 = 0.5*here->qb_xy2; here->qb_xz2 = 0.5*here->qb_xz2; here->qb_yz2 = 0.5*here->qb_yz2; here->qd_x2 = 0.5*model->B1type*here->qd_x2; here->qd_y2 = 0.5*model->B1type*here->qd_y2; here->qd_z2 = 0.5*model->B1type*here->qd_z2; here->qd_xy = model->B1type*here->qd_xy; here->qd_yz = model->B1type*here->qd_yz; here->qd_xz = model->B1type*here->qd_xz; here->qd_x3 = here->qd_x3/6.; here->qd_y3 = here->qd_y3/6.; here->qd_z3 = here->qd_z3/6.; here->qd_x2z = 0.5*here->qd_x2z; here->qd_x2y = 0.5*here->qd_x2y; here->qd_y2z = 0.5*here->qd_y2z; here->qd_xy2 = 0.5*here->qd_xy2; here->qd_xz2 = 0.5*here->qd_xz2; here->qd_yz2 = 0.5*here->qd_yz2; here->DrC_x2 = 0.5*model->B1type*here->DrC_x2; here->DrC_y2 = 0.5*model->B1type*here->DrC_y2; here->DrC_z2 = 0.5*model->B1type*here->DrC_z2; here->DrC_xy = model->B1type*here->DrC_xy; here->DrC_yz = model->B1type*here->DrC_yz; here->DrC_xz = model->B1type*here->DrC_xz; here->DrC_x3 = here->DrC_x3/6.; here->DrC_y3 = here->DrC_y3/6.; here->DrC_z3 = here->DrC_z3/6.; here->DrC_x2z = 0.5*here->DrC_x2z; here->DrC_x2y = 0.5*here->DrC_x2y; here->DrC_y2z = 0.5*here->DrC_y2z; here->DrC_xy2 = 0.5*here->DrC_xy2; here->DrC_xz2 = 0.5*here->DrC_xz2; here->DrC_yz2 = 0.5*here->DrC_yz2; here->gbs2 = model->B1type*here->gbs2; here->gbd2 = model->B1type*here->gbd2; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim1/b1.c0000644000265600020320000001756112264261473017727 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim1def.h" #include "ngspice/suffix.h" IFparm B1pTable[] = { /* parameters */ IOP( "l", BSIM1_L, IF_REAL , "Length"), IOP( "w", BSIM1_W, IF_REAL , "Width"), IOP( "m", BSIM1_M, IF_REAL , "Parallel Multiplier"), IOP( "ad", BSIM1_AD, IF_REAL , "Drain area"), IOP( "as", BSIM1_AS, IF_REAL , "Source area"), IOP( "pd", BSIM1_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM1_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM1_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM1_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM1_OFF, IF_FLAG , "Device is initially off"), IOP( "vds", BSIM1_IC_VDS, IF_REAL , "Initial D-S voltage"), IOP( "vgs", BSIM1_IC_VGS, IF_REAL , "Initial G-S voltage"), IOP( "vbs", BSIM1_IC_VBS, IF_REAL , "Initial B-S voltage"), IP( "ic", BSIM1_IC, IF_VECTOR , "Vector of DS,GS,BS initial voltages") }; IFparm B1mPTable[] = { /* model parameters */ IOP( "vfb", BSIM1_MOD_VFB0, IF_REAL,"Flat band voltage"), IOP( "lvfb", BSIM1_MOD_VFBL, IF_REAL, "Length dependence of vfb"), IOP( "wvfb", BSIM1_MOD_VFBW, IF_REAL, "Width dependence of vfb"), IOP( "phi", BSIM1_MOD_PHI0, IF_REAL, "Strong inversion surface potential "), IOP( "lphi", BSIM1_MOD_PHIL, IF_REAL, "Length dependence of phi"), IOP( "wphi", BSIM1_MOD_PHIW, IF_REAL, "Width dependence of phi"), IOP( "k1", BSIM1_MOD_K10, IF_REAL, "Bulk effect coefficient 1"), IOP( "lk1", BSIM1_MOD_K1L, IF_REAL, "Length dependence of k1"), IOP( "wk1", BSIM1_MOD_K1W, IF_REAL, "Width dependence of k1"), IOP( "k2", BSIM1_MOD_K20, IF_REAL, "Bulk effect coefficient 2"), IOP( "lk2", BSIM1_MOD_K2L, IF_REAL, "Length dependence of k2"), IOP( "wk2", BSIM1_MOD_K2W, IF_REAL, "Width dependence of k2"), IOP( "eta", BSIM1_MOD_ETA0, IF_REAL, "VDS dependence of threshold voltage"), IOP( "leta", BSIM1_MOD_ETAL, IF_REAL, "Length dependence of eta"), IOP( "weta", BSIM1_MOD_ETAW, IF_REAL, "Width dependence of eta"), IOP( "x2e", BSIM1_MOD_ETAB0, IF_REAL, "VBS dependence of eta"), IOP( "lx2e", BSIM1_MOD_ETABL, IF_REAL, "Length dependence of x2e"), IOP( "wx2e", BSIM1_MOD_ETABW, IF_REAL, "Width dependence of x2e"), IOP( "x3e", BSIM1_MOD_ETAD0, IF_REAL, "VDS dependence of eta"), IOP( "lx3e", BSIM1_MOD_ETADL, IF_REAL, "Length dependence of x3e"), IOP( "wx3e", BSIM1_MOD_ETADW, IF_REAL, "Width dependence of x3e"), IOP( "dl", BSIM1_MOD_DELTAL, IF_REAL, "Channel length reduction in um"), IOP( "dw", BSIM1_MOD_DELTAW, IF_REAL, "Channel width reduction in um"), IOP( "muz", BSIM1_MOD_MOBZERO, IF_REAL, "Zero field mobility at VDS=0 VGS=VTH"), IOP( "x2mz", BSIM1_MOD_MOBZEROB0, IF_REAL, "VBS dependence of muz"), IOP( "lx2mz", BSIM1_MOD_MOBZEROBL, IF_REAL, "Length dependence of x2mz"), IOP( "wx2mz", BSIM1_MOD_MOBZEROBW, IF_REAL, "Width dependence of x2mz"), IOP( "mus", BSIM1_MOD_MOBVDD0, IF_REAL, "Mobility at VDS=VDD VGS=VTH, channel length modulation"), IOP( "lmus", BSIM1_MOD_MOBVDDL, IF_REAL, "Length dependence of mus"), IOP( "wmus", BSIM1_MOD_MOBVDDW, IF_REAL, "Width dependence of mus"), IOP( "x2ms", BSIM1_MOD_MOBVDDB0, IF_REAL, "VBS dependence of mus"), IOP( "lx2ms", BSIM1_MOD_MOBVDDBL, IF_REAL, "Length dependence of x2ms"), IOP( "wx2ms", BSIM1_MOD_MOBVDDBW, IF_REAL, "Width dependence of x2ms"), IOP( "x3ms", BSIM1_MOD_MOBVDDD0, IF_REAL, "VDS dependence of mus"), IOP( "lx3ms", BSIM1_MOD_MOBVDDDL, IF_REAL, "Length dependence of x3ms"), IOP( "wx3ms", BSIM1_MOD_MOBVDDDW, IF_REAL, "Width dependence of x3ms"), IOP( "u0", BSIM1_MOD_UGS0, IF_REAL, "VGS dependence of mobility"), IOP( "lu0", BSIM1_MOD_UGSL, IF_REAL, "Length dependence of u0"), IOP( "wu0", BSIM1_MOD_UGSW, IF_REAL, "Width dependence of u0"), IOP( "x2u0", BSIM1_MOD_UGSB0, IF_REAL, "VBS dependence of u0"), IOP( "lx2u0", BSIM1_MOD_UGSBL, IF_REAL, "Length dependence of x2u0"), IOP( "wx2u0", BSIM1_MOD_UGSBW, IF_REAL, "Width dependence of x2u0"), IOP( "u1", BSIM1_MOD_UDS0, IF_REAL, "VDS depence of mobility, velocity saturation"), IOP( "lu1", BSIM1_MOD_UDSL, IF_REAL, "Length dependence of u1"), IOP( "wu1", BSIM1_MOD_UDSW, IF_REAL, "Width dependence of u1"), IOP( "x2u1", BSIM1_MOD_UDSB0, IF_REAL, "VBS depence of u1"), IOP( "lx2u1", BSIM1_MOD_UDSBL, IF_REAL, "Length depence of x2u1"), IOP( "wx2u1", BSIM1_MOD_UDSBW, IF_REAL, "Width depence of x2u1"), IOP( "x3u1", BSIM1_MOD_UDSD0, IF_REAL, "VDS depence of u1"), IOP( "lx3u1", BSIM1_MOD_UDSDL, IF_REAL, "Length dependence of x3u1"), IOP( "wx3u1", BSIM1_MOD_UDSDW, IF_REAL, "Width depence of x3u1"), IOP( "n0", BSIM1_MOD_N00, IF_REAL, "Subthreshold slope"), IOP( "ln0", BSIM1_MOD_N0L, IF_REAL, "Length dependence of n0"), IOP( "wn0", BSIM1_MOD_N0W, IF_REAL, "Width dependence of n0"), IOP( "nb", BSIM1_MOD_NB0, IF_REAL, "VBS dependence of subthreshold slope"), IOP( "lnb", BSIM1_MOD_NBL, IF_REAL, "Length dependence of nb"), IOP( "wnb", BSIM1_MOD_NBW, IF_REAL, "Width dependence of nb"), IOP( "nd", BSIM1_MOD_ND0, IF_REAL, "VDS dependence of subthreshold slope"), IOP( "lnd", BSIM1_MOD_NDL, IF_REAL, "Length dependence of nd"), IOP( "wnd", BSIM1_MOD_NDW, IF_REAL, "Width dependence of nd"), IOP( "tox", BSIM1_MOD_TOX, IF_REAL, "Gate oxide thickness in um"), IOP( "temp", BSIM1_MOD_TEMP, IF_REAL, "Temperature in degree Celcius"), IOP( "vdd", BSIM1_MOD_VDD, IF_REAL, "Supply voltage to specify mus"), IOPA( "cgso", BSIM1_MOD_CGSO, IF_REAL, "Gate source overlap capacitance per unit channel width(m)"), IOPA( "cgdo", BSIM1_MOD_CGDO, IF_REAL, "Gate drain overlap capacitance per unit channel width(m)"), IOPA( "cgbo", BSIM1_MOD_CGBO, IF_REAL, "Gate bulk overlap capacitance per unit channel length(m)"), IOP( "xpart", BSIM1_MOD_XPART, IF_FLAG, "Flag for channel charge partitioning"), IOP( "rsh", BSIM1_MOD_RSH, IF_REAL, "Source drain diffusion sheet resistance in ohm per square"), IOP( "js", BSIM1_MOD_JS, IF_REAL, "Source drain junction saturation current per unit area"), IOP( "pb", BSIM1_MOD_PB, IF_REAL, "Source drain junction built in potential"), IOPA( "mj", BSIM1_MOD_MJ, IF_REAL, "Source drain bottom junction capacitance grading coefficient"), IOPA( "pbsw", BSIM1_MOD_PBSW, IF_REAL, "Source drain side junction capacitance built in potential"), IOPA( "mjsw", BSIM1_MOD_MJSW, IF_REAL, "Source drain side junction capacitance grading coefficient"), IOPA( "cj", BSIM1_MOD_CJ, IF_REAL, "Source drain bottom junction capacitance per unit area"), IOPA( "cjsw", BSIM1_MOD_CJSW, IF_REAL, "Source drain side junction capacitance per unit area"), IOP( "wdf", BSIM1_MOD_DEFWIDTH, IF_REAL, "Default width of source drain diffusion in um"), IOP( "dell", BSIM1_MOD_DELLENGTH, IF_REAL, "Length reduction of source drain diffusion"), IOP("kf", BSIM1_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", BSIM1_MOD_AF, IF_REAL ,"Flicker noise exponent"), IP( "nmos", BSIM1_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM1_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B1names[] = { "Drain", "Gate", "Source", "Bulk" }; int B1nSize = NUMELEMS(B1names); int B1pTSize = NUMELEMS(B1pTable); int B1mPTSize = NUMELEMS(B1mPTable); int B1iSize = sizeof(B1instance); int B1mSize = sizeof(B1model); ngspice-26/src/spicelib/devices/bsim2/0000755000265600020320000000000012264261705017246 5ustar andreasadminngspice-26/src/spicelib/devices/bsim2/b2ask.c0000644000265600020320000001665112264261473020427 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Hong J. Park **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int B2ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B2instance *here = (B2instance*)inst; NG_IGNORE(select); switch(which) { case BSIM2_L: value->rValue = here->B2l; return(OK); case BSIM2_W: value->rValue = here->B2w; value->rValue *= here->B2m; return(OK); case BSIM2_M: value->rValue = here->B2m; return(OK); case BSIM2_AS: value->rValue = here->B2sourceArea; value->rValue *= here->B2m; return(OK); case BSIM2_AD: value->rValue = here->B2drainArea; value->rValue *= here->B2m; return(OK); case BSIM2_PS: value->rValue = here->B2sourcePerimeter; value->rValue *= here->B2m; return(OK); case BSIM2_PD: value->rValue = here->B2drainPerimeter; value->rValue *= here->B2m; return(OK); case BSIM2_NRS: value->rValue = here->B2sourceSquares; value->rValue *= here->B2m; return(OK); case BSIM2_NRD: value->rValue = here->B2drainSquares; value->rValue *= here->B2m; return(OK); case BSIM2_OFF: value->rValue = here->B2off; return(OK); case BSIM2_IC_VBS: value->rValue = here->B2icVBS; return(OK); case BSIM2_IC_VDS: value->rValue = here->B2icVDS; return(OK); case BSIM2_IC_VGS: value->rValue = here->B2icVGS; return(OK); case BSIM2_DNODE: value->iValue = here->B2dNode; return(OK); case BSIM2_GNODE: value->iValue = here->B2gNode; return(OK); case BSIM2_SNODE: value->iValue = here->B2sNode; return(OK); case BSIM2_BNODE: value->iValue = here->B2bNode; return(OK); case BSIM2_DNODEPRIME: value->iValue = here->B2dNodePrime; return(OK); case BSIM2_SNODEPRIME: value->iValue = here->B2sNodePrime; return(OK); case BSIM2_SOURCECONDUCT: value->rValue = here->B2sourceConductance; value->rValue *= here->B2m; return(OK); case BSIM2_DRAINCONDUCT: value->rValue = here->B2drainConductance; value->rValue *= here->B2m; return(OK); case BSIM2_VBD: value->rValue = *(ckt->CKTstate0 + here->B2vbd); return(OK); case BSIM2_VBS: value->rValue = *(ckt->CKTstate0 + here->B2vbs); return(OK); case BSIM2_VGS: value->rValue = *(ckt->CKTstate0 + here->B2vgs); return(OK); case BSIM2_VDS: value->rValue = *(ckt->CKTstate0 + here->B2vds); return(OK); case BSIM2_CD: value->rValue = *(ckt->CKTstate0 + here->B2cd); value->rValue *= here->B2m; return(OK); case BSIM2_CBS: value->rValue = *(ckt->CKTstate0 + here->B2cbs); value->rValue *= here->B2m; return(OK); case BSIM2_CBD: value->rValue = *(ckt->CKTstate0 + here->B2cbd); value->rValue *= here->B2m; return(OK); case BSIM2_GM: value->rValue = *(ckt->CKTstate0 + here->B2gm); value->rValue *= here->B2m; return(OK); case BSIM2_GDS: value->rValue = *(ckt->CKTstate0 + here->B2gds); value->rValue *= here->B2m; return(OK); case BSIM2_GMBS: value->rValue = *(ckt->CKTstate0 + here->B2gmbs); value->rValue *= here->B2m; return(OK); case BSIM2_GBD: value->rValue = *(ckt->CKTstate0 + here->B2gbd); value->rValue *= here->B2m; return(OK); case BSIM2_GBS: value->rValue = *(ckt->CKTstate0 + here->B2gbs); value->rValue *= here->B2m; return(OK); case BSIM2_QB: value->rValue = *(ckt->CKTstate0 + here->B2qb); value->rValue *= here->B2m; return(OK); case BSIM2_CQB: value->rValue = *(ckt->CKTstate0 + here->B2cqb); value->rValue *= here->B2m; return(OK); case BSIM2_QG: value->rValue = *(ckt->CKTstate0 + here->B2qg); value->rValue *= here->B2m; return(OK); case BSIM2_CQG: value->rValue = *(ckt->CKTstate0 + here->B2cqg); value->rValue *= here->B2m; return(OK); case BSIM2_QD: value->rValue = *(ckt->CKTstate0 + here->B2qd); value->rValue *= here->B2m; return(OK); case BSIM2_CQD: value->rValue = *(ckt->CKTstate0 + here->B2cqd); value->rValue *= here->B2m; return(OK); case BSIM2_CGG: value->rValue = *(ckt->CKTstate0 + here->B2cggb); value->rValue *= here->B2m; return(OK); case BSIM2_CGD: value->rValue = *(ckt->CKTstate0 + here->B2cgdb); value->rValue *= here->B2m; return(OK); case BSIM2_CGS: value->rValue = *(ckt->CKTstate0 + here->B2cgsb); value->rValue *= here->B2m; return(OK); case BSIM2_CBG: value->rValue = *(ckt->CKTstate0 + here->B2cbgb); value->rValue *= here->B2m; return(OK); case BSIM2_CAPBD: value->rValue = *(ckt->CKTstate0 + here->B2capbd); value->rValue *= here->B2m; return(OK); case BSIM2_CQBD: value->rValue = *(ckt->CKTstate0 + here->B2cqbd); value->rValue *= here->B2m; return(OK); case BSIM2_CAPBS: value->rValue = *(ckt->CKTstate0 + here->B2capbs); value->rValue *= here->B2m; return(OK); case BSIM2_CQBS: value->rValue = *(ckt->CKTstate0 + here->B2cqbs); value->rValue *= here->B2m; return(OK); case BSIM2_CDG: value->rValue = *(ckt->CKTstate0 + here->B2cdgb); value->rValue *= here->B2m; return(OK); case BSIM2_CDD: value->rValue = *(ckt->CKTstate0 + here->B2cddb); value->rValue *= here->B2m; return(OK); case BSIM2_CDS: value->rValue = *(ckt->CKTstate0 + here->B2cdsb); value->rValue *= here->B2m; return(OK); case BSIM2_VON: value->rValue = *(ckt->CKTstate0 + here->B2vono); return(OK); case BSIM2_QBS: value->rValue = *(ckt->CKTstate0 + here->B2qbs); value->rValue *= here->B2m; return(OK); case BSIM2_QBD: value->rValue = *(ckt->CKTstate0 + here->B2qbd); value->rValue *= here->B2m; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim2/b2del.c0000644000265600020320000000160512264261473020406 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B2delete(GENmodel *inModel, IFuid name, GENinstance **inInst) { B2instance **fast = (B2instance**)inInst; B2model *model = (B2model*)inModel; B2instance **prev = NULL; B2instance *here; for( ; model ; model = model->B2nextModel) { prev = &(model->B2instances); for(here = *prev; here ; here = *prev) { if(here->B2name == name || (fast && here==*fast) ) { *prev= here->B2nextInstance; FREE(here); return(OK); } prev = &(here->B2nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim2/bsim2init.c0000644000265600020320000000400412264261473021312 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim2itf.h" #include "bsim2ext.h" #include "bsim2init.h" SPICEdev B2info = { { "BSIM2", "Berkeley Short Channel IGFET Model", &B2nSize, &B2nSize, B2names, &B2pTSize, B2pTable, &B2mPTSize, B2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ B2param, /* DEVmodParam */ B2mParam, /* DEVload */ B2load, /* DEVsetup */ B2setup, /* DEVunsetup */ B2unsetup, /* DEVpzSetup */ B2setup, /* DEVtemperature*/ B2temp, /* DEVtrunc */ B2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ B2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ B2destroy, /* DEVmodDelete */ B2mDelete, /* DEVdelete */ B2delete, /* DEVsetic */ B2getic, /* DEVask */ B2ask, /* DEVmodAsk */ B2mAsk, /* DEVpzLoad */ B2pzLoad, /* DEVconvTest */ B2convTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ B2noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &B2iSize, /* DEVmodSize */ &B2mSize }; SPICEdev * get_bsim2_info(void) { return &B2info; } ngspice-26/src/spicelib/devices/bsim2/b2cvtest.c0000644000265600020320000000743412264261473021160 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2convTest(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { B2model *model = (B2model*)inModel; B2instance *here; double cbd; double cbhat; double cbs; double cd; double cdhat; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double tol; double vbd; double vbs; double vds; double vgd; double vgdo; double vgs; /* loop through all the B2 device models */ for( ; model != NULL; model = model->B2nextModel ) { /* loop through all the instances of the model */ for (here = model->B2instances; here != NULL ; here=here->B2nextInstance) { vbs = model->B2type * ( *(ckt->CKTrhsOld+here->B2bNode) - *(ckt->CKTrhsOld+here->B2sNodePrime)); vgs = model->B2type * ( *(ckt->CKTrhsOld+here->B2gNode) - *(ckt->CKTrhsOld+here->B2sNodePrime)); vds = model->B2type * ( *(ckt->CKTrhsOld+here->B2dNodePrime) - *(ckt->CKTrhsOld+here->B2sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->B2vgs) - *(ckt->CKTstate0 + here->B2vds); delvbs = vbs - *(ckt->CKTstate0 + here->B2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->B2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->B2vgs); delvds = vds - *(ckt->CKTstate0 + here->B2vds); delvgd = vgd-vgdo; if (here->B2mode >= 0) { cdhat= *(ckt->CKTstate0 + here->B2cd) - *(ckt->CKTstate0 + here->B2gbd) * delvbd + *(ckt->CKTstate0 + here->B2gmbs) * delvbs + *(ckt->CKTstate0 + here->B2gm) * delvgs + *(ckt->CKTstate0 + here->B2gds) * delvds ; } else { cdhat= *(ckt->CKTstate0 + here->B2cd) - ( *(ckt->CKTstate0 + here->B2gbd) - *(ckt->CKTstate0 + here->B2gmbs)) * delvbd - *(ckt->CKTstate0 + here->B2gm) * delvgd + *(ckt->CKTstate0 + here->B2gds) * delvds; } cbhat= *(ckt->CKTstate0 + here->B2cbs) + *(ckt->CKTstate0 + here->B2cbd) + *(ckt->CKTstate0 + here->B2gbd) * delvbd + *(ckt->CKTstate0 + here->B2gbs) * delvbs ; cd = *(ckt->CKTstate0 + here->B2cd); cbs = *(ckt->CKTstate0 + here->B2cbs); cbd = *(ckt->CKTstate0 + here->B2cbd); /* * check convergence */ if ( (here->B2off == 0) || (!(ckt->CKTmode & MODEINITFIX)) ){ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(cd))+ckt->CKTabstol; if (fabs(cdhat-cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } tol=ckt->CKTreltol*MAX(fabs(cbhat),fabs(cbs+cbd))+ ckt->CKTabstol; if (fabs(cbhat-(cbs+cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/bsim2def.h0000644000265600020320000005747512264261473021136 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong June Park, Thomas L. Quarles **********/ #ifndef BSIM2 #define BSIM2 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" /* declarations for B2 MOSFETs */ /* information needed for each instance */ typedef struct sBSIM2instance { struct sBSIM2model *B2modPtr; /* pointer to model */ struct sBSIM2instance *B2nextInstance; /* pointer to next instance of *current model*/ IFuid B2name; /* pointer to character string naming this instance */ int B2states; /* index into state table for this device */ int B2dNode; /* number of the gate node of the mosfet */ int B2gNode; /* number of the gate node of the mosfet */ int B2sNode; /* number of the source node of the mosfet */ int B2bNode; /* number of the bulk node of the mosfet */ int B2dNodePrime; /* number of the internal drain node of the mosfet */ int B2sNodePrime; /* number of the internal source node of the mosfet */ double B2l; /* the length of the channel region */ double B2w; /* the width of the channel region */ double B2m; /* the parallel multiplier */ double B2drainArea; /* the area of the drain diffusion */ double B2sourceArea; /* the area of the source diffusion */ double B2drainSquares; /* the length of the drain in squares */ double B2sourceSquares; /* the length of the source in squares */ double B2drainPerimeter; double B2sourcePerimeter; double B2sourceConductance; /* cond. of source (or 0): set in setup */ double B2drainConductance; /* cond. of drain (or 0): set in setup */ double B2icVBS; /* initial condition B-S voltage */ double B2icVDS; /* initial condition D-S voltage */ double B2icVGS; /* initial condition G-S voltage */ double B2von; double B2vdsat; int B2off; /* non-zero to indicate device is off for dc analysis*/ int B2mode; /* device mode : 1 = normal, -1 = inverse */ struct bsim2SizeDependParam *pParam; unsigned B2lGiven :1; unsigned B2wGiven :1; unsigned B2mGiven :1; unsigned B2drainAreaGiven :1; unsigned B2sourceAreaGiven :1; unsigned B2drainSquaresGiven :1; unsigned B2sourceSquaresGiven :1; unsigned B2drainPerimeterGiven :1; unsigned B2sourcePerimeterGiven :1; unsigned B2dNodePrimeSet :1; unsigned B2sNodePrimeSet :1; unsigned B2icVBSGiven :1; unsigned B2icVDSGiven :1; unsigned B2icVGSGiven :1; unsigned B2vonGiven :1; unsigned B2vdsatGiven :1; double *B2DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *B2GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *B2SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *B2BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *B2DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *B2SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *B2DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *B2GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *B2GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *B2GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *B2SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *B2BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *B2BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *B2DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *B2DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *B2BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *B2DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *B2SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *B2SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *B2DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *B2SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *B2SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ #define B2RDNOIZ 0 #define B2RSNOIZ 1 #define B2IDNOIZ 2 #define B2FLNOIZ 3 #define B2TOTNOIZ 4 #define B2NSRCS 5 /* the number of BSIM2 noise sources */ #ifndef NONOISE double B2nVar[NSTATVARS][B2NSRCS]; #else /* NONOISE */ double **B2nVar; #endif /* NONOISE */ #define B2vbd B2states+ 0 #define B2vbs B2states+ 1 #define B2vgs B2states+ 2 #define B2vds B2states+ 3 #define B2cd B2states+ 4 #define B2id B2states+ 4 #define B2cbs B2states+ 5 #define B2ibs B2states+ 5 #define B2cbd B2states+ 6 #define B2ibd B2states+ 6 #define B2gm B2states+ 7 #define B2gds B2states+ 8 #define B2gmbs B2states+ 9 #define B2gbd B2states+ 10 #define B2gbs B2states+ 11 #define B2qb B2states+ 12 #define B2cqb B2states+ 13 #define B2iqb B2states+ 13 #define B2qg B2states+ 14 #define B2cqg B2states+ 15 #define B2iqg B2states+ 15 #define B2qd B2states+ 16 #define B2cqd B2states+ 17 #define B2iqd B2states+ 17 #define B2cggb B2states+ 18 #define B2cgdb B2states+ 19 #define B2cgsb B2states+ 20 #define B2cbgb B2states+ 21 #define B2cbdb B2states+ 22 #define B2cbsb B2states+ 23 #define B2capbd B2states+ 24 #define B2iqbd B2states+ 25 #define B2cqbd B2states+ 25 #define B2capbs B2states+ 26 #define B2iqbs B2states+ 27 #define B2cqbs B2states+ 27 #define B2cdgb B2states+ 28 #define B2cddb B2states+ 29 #define B2cdsb B2states+ 30 #define B2vono B2states+ 31 #define B2vdsato B2states+ 32 #define B2qbs B2states+ 33 #define B2qbd B2states+ 34 #define B2numStates 35 } B2instance ; struct bsim2SizeDependParam { double Width; double Length; double B2vfb; /* flat band voltage at given L and W */ double B2phi; /* surface potential at strong inversion */ double B2k1; /* bulk effect coefficient 1 */ double B2k2; /* bulk effect coefficient 2 */ double B2eta0; /* drain induced barrier lowering */ double B2etaB; /* Vbs dependence of Eta */ double B2beta0; /* Beta at Vds = 0 and Vgs = Vth */ double B2beta0B; /* Vbs dependence of Beta0 */ double B2betas0; /* Beta at Vds=Vdd and Vgs=Vth */ double B2betasB; /* Vbs dependence of Betas */ double B2beta20; /* Vds dependence of Beta in tanh term */ double B2beta2B; /* Vbs dependence of Beta2 */ double B2beta2G; /* Vgs dependence of Beta2 */ double B2beta30; /* Vds dependence of Beta in linear term */ double B2beta3B; /* Vbs dependence of Beta3 */ double B2beta3G; /* Vgs dependence of Beta3 */ double B2beta40; /* Vds dependence of Beta in quadra term */ double B2beta4B; /* Vbs dependence of Beta4 */ double B2beta4G; /* Vgs dependence of Beta4 */ double B2ua0; /* Linear Vgs dependence of Mobility */ double B2uaB; /* Vbs dependence of Ua */ double B2ub0; /* Quadratic Vgs dependence of Mobility */ double B2ubB; /* Vbs dependence of Ub */ double B2u10; /* Drift Velocity Saturation due to Vds */ double B2u1B; /* Vbs dependence of U1 */ double B2u1D; /* Vds dependence of U1 */ double B2n0; /* Subthreshold slope at Vds=0, Vbs=0 */ double B2nB; /* Vbs dependence of n */ double B2nD; /* Vds dependence of n */ double B2vof0; /* Vth offset at Vds=0, Vbs=0 */ double B2vofB; /* Vbs dependence of Vof */ double B2vofD; /* Vds dependence of Vof */ double B2ai0; /* Pre-factor in hot-electron effects */ double B2aiB; /* Vbs dependence of Ai */ double B2bi0; /* Exp-factor in hot-electron effects */ double B2biB; /* Vbs dependence of Bi */ double B2vghigh; /* Upper bound of cubic spline function */ double B2vglow; /* Lower bound of cubic spline function */ double B2GDoverlapCap;/* Gate Drain Overlap Capacitance */ double B2GSoverlapCap;/* Gate Source Overlap Capacitance */ double B2GBoverlapCap;/* Gate Bulk Overlap Capacitance */ double SqrtPhi; double Phis3; double CoxWL; double One_Third_CoxWL; double Two_Third_CoxWL; double Arg; double B2vt0; struct bsim2SizeDependParam *pNext; }; /* per model data */ typedef struct sBSIM2model { /* model structure for a resistor */ int B2modType; /* type index of this device type */ struct sBSIM2model *B2nextModel; /* pointer to next possible model *in linked list */ B2instance * B2instances; /* pointer to list of instances * that have this model */ IFuid B2modName; /* pointer to the name of this model */ int B2type; /* device type: 1 = nmos, -1 = pmos */ int pad; double B2vfb0; double B2vfbL; double B2vfbW; double B2phi0; double B2phiL; double B2phiW; double B2k10; double B2k1L; double B2k1W; double B2k20; double B2k2L; double B2k2W; double B2eta00; double B2eta0L; double B2eta0W; double B2etaB0; double B2etaBL; double B2etaBW; double B2deltaL; double B2deltaW; double B2mob00; double B2mob0B0; double B2mob0BL; double B2mob0BW ; double B2mobs00; double B2mobs0L; double B2mobs0W; double B2mobsB0; double B2mobsBL; double B2mobsBW; double B2mob200; double B2mob20L; double B2mob20W; double B2mob2B0; double B2mob2BL; double B2mob2BW; double B2mob2G0; double B2mob2GL; double B2mob2GW; double B2mob300; double B2mob30L; double B2mob30W; double B2mob3B0; double B2mob3BL; double B2mob3BW; double B2mob3G0; double B2mob3GL; double B2mob3GW; double B2mob400; double B2mob40L; double B2mob40W; double B2mob4B0; double B2mob4BL; double B2mob4BW; double B2mob4G0; double B2mob4GL; double B2mob4GW; double B2ua00; double B2ua0L; double B2ua0W; double B2uaB0; double B2uaBL; double B2uaBW; double B2ub00; double B2ub0L; double B2ub0W; double B2ubB0; double B2ubBL; double B2ubBW; double B2u100; double B2u10L; double B2u10W; double B2u1B0; double B2u1BL; double B2u1BW; double B2u1D0; double B2u1DL; double B2u1DW; double B2n00; double B2n0L; double B2n0W; double B2nB0; double B2nBL; double B2nBW; double B2nD0; double B2nDL; double B2nDW; double B2vof00; double B2vof0L; double B2vof0W; double B2vofB0; double B2vofBL; double B2vofBW; double B2vofD0; double B2vofDL; double B2vofDW; double B2ai00; double B2ai0L; double B2ai0W; double B2aiB0; double B2aiBL; double B2aiBW; double B2bi00; double B2bi0L; double B2bi0W; double B2biB0; double B2biBL; double B2biBW; double B2vghigh0; double B2vghighL; double B2vghighW; double B2vglow0; double B2vglowL; double B2vglowW; double B2tox; /* unit: micron */ double B2Cox; /* unit: F/cm**2 */ double B2temp; double B2vdd; double B2vdd2; double B2vgg; double B2vgg2; double B2vbb; double B2vbb2; double B2gateSourceOverlapCap; double B2gateDrainOverlapCap; double B2gateBulkOverlapCap; double B2Vtm; double B2sheetResistance; double B2jctSatCurDensity; double B2bulkJctPotential; double B2bulkJctBotGradingCoeff; double B2bulkJctSideGradingCoeff; double B2sidewallJctPotential; double B2unitAreaJctCap; double B2unitLengthSidewallJctCap; double B2defaultWidth; double B2deltaLength; double B2fNcoef; double B2fNexp; int B2channelChargePartitionFlag; struct bsim2SizeDependParam *pSizeDependParamKnot; unsigned B2vfb0Given :1; unsigned B2vfbLGiven :1; unsigned B2vfbWGiven :1; unsigned B2phi0Given :1; unsigned B2phiLGiven :1; unsigned B2phiWGiven :1; unsigned B2k10Given :1; unsigned B2k1LGiven :1; unsigned B2k1WGiven :1; unsigned B2k20Given :1; unsigned B2k2LGiven :1; unsigned B2k2WGiven :1; unsigned B2eta00Given :1; unsigned B2eta0LGiven :1; unsigned B2eta0WGiven :1; unsigned B2etaB0Given :1; unsigned B2etaBLGiven :1; unsigned B2etaBWGiven :1; unsigned B2deltaLGiven :1; unsigned B2deltaWGiven :1; unsigned B2mob00Given :1; unsigned B2mob0B0Given :1; unsigned B2mob0BLGiven :1; unsigned B2mob0BWGiven :1; unsigned B2mobs00Given :1; unsigned B2mobs0LGiven :1; unsigned B2mobs0WGiven :1; unsigned B2mobsB0Given :1; unsigned B2mobsBLGiven :1; unsigned B2mobsBWGiven :1; unsigned B2mob200Given :1; unsigned B2mob20LGiven :1; unsigned B2mob20WGiven :1; unsigned B2mob2B0Given :1; unsigned B2mob2BLGiven :1; unsigned B2mob2BWGiven :1; unsigned B2mob2G0Given :1; unsigned B2mob2GLGiven :1; unsigned B2mob2GWGiven :1; unsigned B2mob300Given :1; unsigned B2mob30LGiven :1; unsigned B2mob30WGiven :1; unsigned B2mob3B0Given :1; unsigned B2mob3BLGiven :1; unsigned B2mob3BWGiven :1; unsigned B2mob3G0Given :1; unsigned B2mob3GLGiven :1; unsigned B2mob3GWGiven :1; unsigned B2mob400Given :1; unsigned B2mob40LGiven :1; unsigned B2mob40WGiven :1; unsigned B2mob4B0Given :1; unsigned B2mob4BLGiven :1; unsigned B2mob4BWGiven :1; unsigned B2mob4G0Given :1; unsigned B2mob4GLGiven :1; unsigned B2mob4GWGiven :1; unsigned B2ua00Given :1; unsigned B2ua0LGiven :1; unsigned B2ua0WGiven :1; unsigned B2uaB0Given :1; unsigned B2uaBLGiven :1; unsigned B2uaBWGiven :1; unsigned B2ub00Given :1; unsigned B2ub0LGiven :1; unsigned B2ub0WGiven :1; unsigned B2ubB0Given :1; unsigned B2ubBLGiven :1; unsigned B2ubBWGiven :1; unsigned B2u100Given :1; unsigned B2u10LGiven :1; unsigned B2u10WGiven :1; unsigned B2u1B0Given :1; unsigned B2u1BLGiven :1; unsigned B2u1BWGiven :1; unsigned B2u1D0Given :1; unsigned B2u1DLGiven :1; unsigned B2u1DWGiven :1; unsigned B2n00Given :1; unsigned B2n0LGiven :1; unsigned B2n0WGiven :1; unsigned B2nB0Given :1; unsigned B2nBLGiven :1; unsigned B2nBWGiven :1; unsigned B2nD0Given :1; unsigned B2nDLGiven :1; unsigned B2nDWGiven :1; unsigned B2vof00Given :1; unsigned B2vof0LGiven :1; unsigned B2vof0WGiven :1; unsigned B2vofB0Given :1; unsigned B2vofBLGiven :1; unsigned B2vofBWGiven :1; unsigned B2vofD0Given :1; unsigned B2vofDLGiven :1; unsigned B2vofDWGiven :1; unsigned B2ai00Given :1; unsigned B2ai0LGiven :1; unsigned B2ai0WGiven :1; unsigned B2aiB0Given :1; unsigned B2aiBLGiven :1; unsigned B2aiBWGiven :1; unsigned B2bi00Given :1; unsigned B2bi0LGiven :1; unsigned B2bi0WGiven :1; unsigned B2biB0Given :1; unsigned B2biBLGiven :1; unsigned B2biBWGiven :1; unsigned B2vghigh0Given :1; unsigned B2vghighLGiven :1; unsigned B2vghighWGiven :1; unsigned B2vglow0Given :1; unsigned B2vglowLGiven :1; unsigned B2vglowWGiven :1; unsigned B2toxGiven :1; unsigned B2tempGiven :1; unsigned B2vddGiven :1; unsigned B2vggGiven :1; unsigned B2vbbGiven :1; unsigned B2gateSourceOverlapCapGiven :1; unsigned B2gateDrainOverlapCapGiven :1; unsigned B2gateBulkOverlapCapGiven :1; unsigned B2channelChargePartitionFlagGiven :1; unsigned B2sheetResistanceGiven :1; unsigned B2jctSatCurDensityGiven :1; unsigned B2bulkJctPotentialGiven :1; unsigned B2bulkJctBotGradingCoeffGiven :1; unsigned B2sidewallJctPotentialGiven :1; unsigned B2bulkJctSideGradingCoeffGiven :1; unsigned B2unitAreaJctCapGiven :1; unsigned B2unitLengthSidewallJctCapGiven :1; unsigned B2defaultWidthGiven :1; unsigned B2deltaLengthGiven :1; unsigned B2fNcoefGiven :1; unsigned B2fNexpGiven :1; unsigned B2typeGiven :1; } B2model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define BSIM2_W 1 #define BSIM2_L 2 #define BSIM2_AS 3 #define BSIM2_AD 4 #define BSIM2_PS 5 #define BSIM2_PD 6 #define BSIM2_NRS 7 #define BSIM2_NRD 8 #define BSIM2_OFF 9 #define BSIM2_IC_VBS 10 #define BSIM2_IC_VDS 11 #define BSIM2_IC_VGS 12 #define BSIM2_IC 13 #define BSIM2_M 14 /* model parameters */ #define BSIM2_MOD_VFB0 101 #define BSIM2_MOD_VFBL 102 #define BSIM2_MOD_VFBW 103 #define BSIM2_MOD_PHI0 104 #define BSIM2_MOD_PHIL 105 #define BSIM2_MOD_PHIW 106 #define BSIM2_MOD_K10 107 #define BSIM2_MOD_K1L 108 #define BSIM2_MOD_K1W 109 #define BSIM2_MOD_K20 110 #define BSIM2_MOD_K2L 111 #define BSIM2_MOD_K2W 112 #define BSIM2_MOD_ETA00 113 #define BSIM2_MOD_ETA0L 114 #define BSIM2_MOD_ETA0W 115 #define BSIM2_MOD_ETAB0 116 #define BSIM2_MOD_ETABL 117 #define BSIM2_MOD_ETABW 118 #define BSIM2_MOD_DELTAL 119 #define BSIM2_MOD_DELTAW 120 #define BSIM2_MOD_MOB00 121 #define BSIM2_MOD_MOB0B0 122 #define BSIM2_MOD_MOB0BL 123 #define BSIM2_MOD_MOB0BW 124 #define BSIM2_MOD_MOBS00 125 #define BSIM2_MOD_MOBS0L 126 #define BSIM2_MOD_MOBS0W 127 #define BSIM2_MOD_MOBSB0 128 #define BSIM2_MOD_MOBSBL 129 #define BSIM2_MOD_MOBSBW 130 #define BSIM2_MOD_MOB200 131 #define BSIM2_MOD_MOB20L 132 #define BSIM2_MOD_MOB20W 133 #define BSIM2_MOD_MOB2B0 134 #define BSIM2_MOD_MOB2BL 135 #define BSIM2_MOD_MOB2BW 136 #define BSIM2_MOD_MOB2G0 137 #define BSIM2_MOD_MOB2GL 138 #define BSIM2_MOD_MOB2GW 139 #define BSIM2_MOD_MOB300 140 #define BSIM2_MOD_MOB30L 141 #define BSIM2_MOD_MOB30W 142 #define BSIM2_MOD_MOB3B0 143 #define BSIM2_MOD_MOB3BL 144 #define BSIM2_MOD_MOB3BW 145 #define BSIM2_MOD_MOB3G0 146 #define BSIM2_MOD_MOB3GL 147 #define BSIM2_MOD_MOB3GW 148 #define BSIM2_MOD_MOB400 149 #define BSIM2_MOD_MOB40L 150 #define BSIM2_MOD_MOB40W 151 #define BSIM2_MOD_MOB4B0 152 #define BSIM2_MOD_MOB4BL 153 #define BSIM2_MOD_MOB4BW 154 #define BSIM2_MOD_MOB4G0 155 #define BSIM2_MOD_MOB4GL 156 #define BSIM2_MOD_MOB4GW 157 #define BSIM2_MOD_UA00 158 #define BSIM2_MOD_UA0L 159 #define BSIM2_MOD_UA0W 160 #define BSIM2_MOD_UAB0 161 #define BSIM2_MOD_UABL 162 #define BSIM2_MOD_UABW 163 #define BSIM2_MOD_UB00 164 #define BSIM2_MOD_UB0L 165 #define BSIM2_MOD_UB0W 166 #define BSIM2_MOD_UBB0 167 #define BSIM2_MOD_UBBL 168 #define BSIM2_MOD_UBBW 169 #define BSIM2_MOD_U100 170 #define BSIM2_MOD_U10L 171 #define BSIM2_MOD_U10W 172 #define BSIM2_MOD_U1B0 173 #define BSIM2_MOD_U1BL 174 #define BSIM2_MOD_U1BW 175 #define BSIM2_MOD_U1D0 176 #define BSIM2_MOD_U1DL 177 #define BSIM2_MOD_U1DW 178 #define BSIM2_MOD_N00 179 #define BSIM2_MOD_N0L 180 #define BSIM2_MOD_N0W 181 #define BSIM2_MOD_NB0 182 #define BSIM2_MOD_NBL 183 #define BSIM2_MOD_NBW 184 #define BSIM2_MOD_ND0 185 #define BSIM2_MOD_NDL 186 #define BSIM2_MOD_NDW 187 #define BSIM2_MOD_VOF00 188 #define BSIM2_MOD_VOF0L 189 #define BSIM2_MOD_VOF0W 190 #define BSIM2_MOD_VOFB0 191 #define BSIM2_MOD_VOFBL 192 #define BSIM2_MOD_VOFBW 193 #define BSIM2_MOD_VOFD0 194 #define BSIM2_MOD_VOFDL 195 #define BSIM2_MOD_VOFDW 196 #define BSIM2_MOD_AI00 197 #define BSIM2_MOD_AI0L 198 #define BSIM2_MOD_AI0W 199 #define BSIM2_MOD_AIB0 200 #define BSIM2_MOD_AIBL 201 #define BSIM2_MOD_AIBW 202 #define BSIM2_MOD_BI00 203 #define BSIM2_MOD_BI0L 204 #define BSIM2_MOD_BI0W 205 #define BSIM2_MOD_BIB0 206 #define BSIM2_MOD_BIBL 207 #define BSIM2_MOD_BIBW 208 #define BSIM2_MOD_VGHIGH0 209 #define BSIM2_MOD_VGHIGHL 210 #define BSIM2_MOD_VGHIGHW 211 #define BSIM2_MOD_VGLOW0 212 #define BSIM2_MOD_VGLOWL 213 #define BSIM2_MOD_VGLOWW 214 #define BSIM2_MOD_TOX 215 #define BSIM2_MOD_TEMP 216 #define BSIM2_MOD_VDD 217 #define BSIM2_MOD_VGG 218 #define BSIM2_MOD_VBB 219 #define BSIM2_MOD_CGSO 220 #define BSIM2_MOD_CGDO 221 #define BSIM2_MOD_CGBO 222 #define BSIM2_MOD_XPART 223 #define BSIM2_MOD_RSH 224 #define BSIM2_MOD_JS 225 #define BSIM2_MOD_PB 226 #define BSIM2_MOD_MJ 227 #define BSIM2_MOD_PBSW 228 #define BSIM2_MOD_MJSW 229 #define BSIM2_MOD_CJ 230 #define BSIM2_MOD_CJSW 231 #define BSIM2_MOD_DEFWIDTH 232 #define BSIM2_MOD_DELLENGTH 233 #define BSIM2_MOD_NMOS 234 #define BSIM2_MOD_PMOS 235 #define BSIM2_MOD_KF 236 #define BSIM2_MOD_AF 237 /* device questions */ #define BSIM2_DNODE 241 #define BSIM2_GNODE 242 #define BSIM2_SNODE 243 #define BSIM2_BNODE 244 #define BSIM2_DNODEPRIME 245 #define BSIM2_SNODEPRIME 246 #define BSIM2_VBD 247 #define BSIM2_VBS 248 #define BSIM2_VGS 249 #define BSIM2_VDS 250 #define BSIM2_CD 251 #define BSIM2_CBS 252 #define BSIM2_CBD 253 #define BSIM2_GM 254 #define BSIM2_GDS 255 #define BSIM2_GMBS 256 #define BSIM2_GBD 257 #define BSIM2_GBS 258 #define BSIM2_QB 259 #define BSIM2_CQB 260 #define BSIM2_QG 261 #define BSIM2_CQG 262 #define BSIM2_QD 263 #define BSIM2_CQD 264 #define BSIM2_CGG 265 #define BSIM2_CGD 266 #define BSIM2_CGS 267 #define BSIM2_CBG 268 #define BSIM2_CAPBD 269 #define BSIM2_CQBD 270 #define BSIM2_CAPBS 271 #define BSIM2_CQBS 272 #define BSIM2_CDG 273 #define BSIM2_CDD 274 #define BSIM2_CDS 275 #define BSIM2_VON 276 #define BSIM2_QBS 277 #define BSIM2_QBD 278 #define BSIM2_SOURCECONDUCT 279 #define BSIM2_DRAINCONDUCT 280 /* model questions */ #include "bsim2ext.h" extern void B2evaluate(double,double,double,B2instance*,B2model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); #endif /*B2*/ ngspice-26/src/spicelib/devices/bsim2/b2ld.c0000644000265600020320000006775612264261473020264 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B2load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { B2model *model = (B2model*)inModel; B2instance *here; double DrainSatCurrent; double EffectiveLength; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double SourceSatCurrent; double DrainArea; double SourceArea; double DrainPerimeter; double SourcePerimeter; double arg; double capbd = 0.0; double capbs = 0.0; double cbd; double cbhat; double cbs; double cd; double cdrain; double cdhat; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqqb; double ceqqd; double ceqqg; double czbd; double czbdsw; double czbs; double czbssw; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gbd; double gbs; double gcbdb; double gcbgb; double gcbsb; double gcddb; double gcdgb; double gcdsb; double gcgdb; double gcggb; double gcgsb; double gcsdb; double gcsgb; double gcssb; double gds; double geq; double gm; double gmbs; double sarg; double sargsw; double vbd; double vbs; double vcrit; double vds; double vdsat; double vgb; double vgd; double vgdo; double vgs; double von; #ifndef PREDICTOR double xfact; #endif double xnrm; double xrev; int Check; double cgdb; double cgsb; double cbdb; double cdgb; double cddb; double cdsb; double cggb; double cbgb; double cbsb; double csgb; double cssb; double csdb; double PhiB; double PhiBSW; double MJ; double MJSW; double argsw; double qgate; double qbulk; double qdrn; double qsrc; double cqgate; double cqbulk; double cqdrn; double vt0; double args[8]; int ByPass; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; double m; /* loop through all the B2 device models */ for( ; model != NULL; model = model->B2nextModel ) { /* loop through all the instances of the model */ for (here = model->B2instances; here != NULL ; here=here->B2nextInstance) { EffectiveLength=here->B2l - model->B2deltaL * 1.e-6;/* m */ DrainArea = here->B2drainArea; SourceArea = here->B2sourceArea; DrainPerimeter = here->B2drainPerimeter; SourcePerimeter = here->B2sourcePerimeter; if( (DrainSatCurrent=DrainArea*model->B2jctSatCurDensity) < 1e-15){ DrainSatCurrent = 1.0e-15; } if( (SourceSatCurrent=SourceArea*model->B2jctSatCurDensity) <1.0e-15){ SourceSatCurrent = 1.0e-15; } GateSourceOverlapCap = model->B2gateSourceOverlapCap *here->B2w; GateDrainOverlapCap = model->B2gateDrainOverlapCap * here->B2w; GateBulkOverlapCap = model->B2gateBulkOverlapCap *EffectiveLength; von = model->B2type * here->B2von; vdsat = model->B2type * here->B2vdsat; vt0 = model->B2type * here->pParam->B2vt0; Check=1; ByPass = 0; if((ckt->CKTmode & MODEINITSMSIG)) { vbs= *(ckt->CKTstate0 + here->B2vbs); vgs= *(ckt->CKTstate0 + here->B2vgs); vds= *(ckt->CKTstate0 + here->B2vds); } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs= *(ckt->CKTstate1 + here->B2vbs); vgs= *(ckt->CKTstate1 + here->B2vgs); vds= *(ckt->CKTstate1 + here->B2vds); } else if((ckt->CKTmode & MODEINITJCT) && !here->B2off) { vds= model->B2type * here->B2icVDS; vgs= model->B2type * here->B2icVGS; vbs= model->B2type * here->B2icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEAC|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = vt0; vds = 0; } } else if((ckt->CKTmode & (MODEINITJCT | MODEINITFIX) ) && (here->B2off)) { vbs=vgs=vds=0; } else { #ifndef PREDICTOR if((ckt->CKTmode & MODEINITPRED)) { xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B2vbs) = *(ckt->CKTstate1 + here->B2vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->B2vbs)) -(xfact * (*(ckt->CKTstate2 + here->B2vbs))); *(ckt->CKTstate0 + here->B2vgs) = *(ckt->CKTstate1 + here->B2vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->B2vgs)) -(xfact * (*(ckt->CKTstate2 + here->B2vgs))); *(ckt->CKTstate0 + here->B2vds) = *(ckt->CKTstate1 + here->B2vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->B2vds)) -(xfact * (*(ckt->CKTstate2 + here->B2vds))); *(ckt->CKTstate0 + here->B2vbd) = *(ckt->CKTstate0 + here->B2vbs)- *(ckt->CKTstate0 + here->B2vds); *(ckt->CKTstate0 + here->B2cd) = *(ckt->CKTstate1 + here->B2cd); *(ckt->CKTstate0 + here->B2cbs) = *(ckt->CKTstate1 + here->B2cbs); *(ckt->CKTstate0 + here->B2cbd) = *(ckt->CKTstate1 + here->B2cbd); *(ckt->CKTstate0 + here->B2gm) = *(ckt->CKTstate1 + here->B2gm); *(ckt->CKTstate0 + here->B2gds) = *(ckt->CKTstate1 + here->B2gds); *(ckt->CKTstate0 + here->B2gmbs) = *(ckt->CKTstate1 + here->B2gmbs); *(ckt->CKTstate0 + here->B2gbd) = *(ckt->CKTstate1 + here->B2gbd); *(ckt->CKTstate0 + here->B2gbs) = *(ckt->CKTstate1 + here->B2gbs); *(ckt->CKTstate0 + here->B2cggb) = *(ckt->CKTstate1 + here->B2cggb); *(ckt->CKTstate0 + here->B2cbgb) = *(ckt->CKTstate1 + here->B2cbgb); *(ckt->CKTstate0 + here->B2cbsb) = *(ckt->CKTstate1 + here->B2cbsb); *(ckt->CKTstate0 + here->B2cgdb) = *(ckt->CKTstate1 + here->B2cgdb); *(ckt->CKTstate0 + here->B2cgsb) = *(ckt->CKTstate1 + here->B2cgsb); *(ckt->CKTstate0 + here->B2cbdb) = *(ckt->CKTstate1 + here->B2cbdb); *(ckt->CKTstate0 + here->B2cdgb) = *(ckt->CKTstate1 + here->B2cdgb); *(ckt->CKTstate0 + here->B2cddb) = *(ckt->CKTstate1 + here->B2cddb); *(ckt->CKTstate0 + here->B2cdsb) = *(ckt->CKTstate1 + here->B2cdsb); } else { #endif /* PREDICTOR */ vbs = model->B2type * ( *(ckt->CKTrhsOld+here->B2bNode) - *(ckt->CKTrhsOld+here->B2sNodePrime)); vgs = model->B2type * ( *(ckt->CKTrhsOld+here->B2gNode) - *(ckt->CKTrhsOld+here->B2sNodePrime)); vds = model->B2type * ( *(ckt->CKTrhsOld+here->B2dNodePrime) - *(ckt->CKTrhsOld+here->B2sNodePrime)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->B2vgs) - *(ckt->CKTstate0 + here->B2vds); delvbs = vbs - *(ckt->CKTstate0 + here->B2vbs); delvbd = vbd - *(ckt->CKTstate0 + here->B2vbd); delvgs = vgs - *(ckt->CKTstate0 + here->B2vgs); delvds = vds - *(ckt->CKTstate0 + here->B2vds); delvgd = vgd-vgdo; if (here->B2mode >= 0) { cdhat= *(ckt->CKTstate0 + here->B2cd) - *(ckt->CKTstate0 + here->B2gbd) * delvbd + *(ckt->CKTstate0 + here->B2gmbs) * delvbs + *(ckt->CKTstate0 + here->B2gm) * delvgs + *(ckt->CKTstate0 + here->B2gds) * delvds ; } else { cdhat= *(ckt->CKTstate0 + here->B2cd) - ( *(ckt->CKTstate0 + here->B2gbd) - *(ckt->CKTstate0 + here->B2gmbs)) * delvbd - *(ckt->CKTstate0 + here->B2gm) * delvgd + *(ckt->CKTstate0 + here->B2gds) * delvds; } cbhat= *(ckt->CKTstate0 + here->B2cbs) + *(ckt->CKTstate0 + here->B2cbd) + *(ckt->CKTstate0 + here->B2gbd) * delvbd + *(ckt->CKTstate0 + here->B2gbs) * delvbs ; #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ tempv = MAX(fabs(cbhat),fabs(*(ckt->CKTstate0 + here->B2cbs) + *(ckt->CKTstate0 + here->B2cbd)))+ckt->CKTabstol; if((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) ) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B2vbs)))+ ckt->CKTvoltTol)) ) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B2vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B2vgs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B2vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- *(ckt->CKTstate0 + here->B2cd)) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(*(ckt->CKTstate0 + here->B2cd))) + ckt->CKTabstol) ) if ( (fabs(cbhat-(*(ckt->CKTstate0 + here->B2cbs) + *(ckt->CKTstate0 + here->B2cbd))) < ckt->CKTreltol * tempv)) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B2vbs); vbd = *(ckt->CKTstate0 + here->B2vbd); vgs = *(ckt->CKTstate0 + here->B2vgs); vds = *(ckt->CKTstate0 + here->B2vds); vgd = vgs - vds; vgb = vgs - vbs; cd = *(ckt->CKTstate0 + here->B2cd); cbs = *(ckt->CKTstate0 + here->B2cbs); cbd = *(ckt->CKTstate0 + here->B2cbd); cdrain = here->B2mode * (cd + cbd); gm = *(ckt->CKTstate0 + here->B2gm); gds = *(ckt->CKTstate0 + here->B2gds); gmbs = *(ckt->CKTstate0 + here->B2gmbs); gbd = *(ckt->CKTstate0 + here->B2gbd); gbs = *(ckt->CKTstate0 + here->B2gbs); if((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { cggb = *(ckt->CKTstate0 + here->B2cggb); cgdb = *(ckt->CKTstate0 + here->B2cgdb); cgsb = *(ckt->CKTstate0 + here->B2cgsb); cbgb = *(ckt->CKTstate0 + here->B2cbgb); cbdb = *(ckt->CKTstate0 + here->B2cbdb); cbsb = *(ckt->CKTstate0 + here->B2cbsb); cdgb = *(ckt->CKTstate0 + here->B2cdgb); cddb = *(ckt->CKTstate0 + here->B2cddb); cdsb = *(ckt->CKTstate0 + here->B2cdsb); capbs = *(ckt->CKTstate0 + here->B2capbs); capbd = *(ckt->CKTstate0 + here->B2capbd); ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = model->B2type * here->B2von; if(*(ckt->CKTstate0 + here->B2vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->B2vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->B2vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->B2vds))); vgs = vgd + vds; } if(vds >= 0) { vcrit = CONSTvt0 *log(CONSTvt0/(CONSTroot2*SourceSatCurrent)); vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->B2vbs), CONSTvt0,vcrit,&Check); /* B2 test */ vbd = vbs-vds; } else { vcrit = CONSTvt0 * log(CONSTvt0/(CONSTroot2*DrainSatCurrent)); vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->B2vbd), CONSTvt0,vcrit,&Check); /* B2 test*/ vbs = vbd + vds; } } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; if(vbs <= 0.0 ) { gbs = SourceSatCurrent / CONSTvt0 + ckt->CKTgmin; cbs = gbs * vbs ; } else { evbs = exp(vbs/CONSTvt0); gbs = SourceSatCurrent*evbs/CONSTvt0 + ckt->CKTgmin; cbs = SourceSatCurrent * (evbs-1) + ckt->CKTgmin * vbs ; } if(vbd <= 0.0) { gbd = DrainSatCurrent / CONSTvt0 + ckt->CKTgmin; cbd = gbd * vbd ; } else { evbd = exp(vbd/CONSTvt0); gbd = DrainSatCurrent*evbd/CONSTvt0 +ckt->CKTgmin; cbd = DrainSatCurrent *(evbd-1)+ckt->CKTgmin*vbd; } /* line 400 */ if(vds >= 0) { /* normal mode */ here->B2mode = 1; } else { /* inverse mode */ here->B2mode = -1; } /* call B2evaluate to calculate drain current and its * derivatives and charge and capacitances related to gate * drain, and bulk */ if( vds >= 0 ) { B2evaluate(vds,vbs,vgs,here,model,&gm,&gds,&gmbs,&qgate, &qbulk,&qdrn,&cggb,&cgdb,&cgsb,&cbgb,&cbdb,&cbsb,&cdgb, &cddb,&cdsb,&cdrain,&von,&vdsat,ckt); } else { B2evaluate(-vds,vbd,vgd,here,model,&gm,&gds,&gmbs,&qgate, &qbulk,&qsrc,&cggb,&cgsb,&cgdb,&cbgb,&cbsb,&cbdb,&csgb, &cssb,&csdb,&cdrain,&von,&vdsat,ckt); } here->B2von = model->B2type * von; here->B2vdsat = model->B2type * vdsat; /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ cd=here->B2mode * cdrain - cbd; if ((ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP ) && (ckt->CKTmode & MODEUIC))) { /* * charge storage elements * * bulk-drain and bulk-source depletion capacitances * czbd : zero bias drain junction capacitance * czbs : zero bias source junction capacitance * czbdsw:zero bias drain junction sidewall capacitance * czbssw:zero bias source junction sidewall capacitance */ czbd = model->B2unitAreaJctCap * DrainArea; czbs = model->B2unitAreaJctCap * SourceArea; czbdsw= model->B2unitLengthSidewallJctCap * DrainPerimeter; czbssw= model->B2unitLengthSidewallJctCap * SourcePerimeter; PhiB = model->B2bulkJctPotential; PhiBSW = model->B2sidewallJctPotential; MJ = model->B2bulkJctBotGradingCoeff; MJSW = model->B2bulkJctSideGradingCoeff; /* Source Bulk Junction */ if( vbs < 0 ) { arg = 1 - vbs / PhiB; argsw = 1 - vbs / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); *(ckt->CKTstate0 + here->B2qbs) = PhiB * czbs * (1-arg*sarg)/(1-MJ) + PhiBSW * czbssw * (1-argsw*sargsw)/(1-MJSW); capbs = czbs * sarg + czbssw * sargsw ; } else { *(ckt->CKTstate0+here->B2qbs) = vbs*(czbs+czbssw)+ vbs*vbs*(czbs*MJ*0.5/PhiB + czbssw * MJSW * 0.5/PhiBSW); capbs = czbs + czbssw + vbs *(czbs*MJ/PhiB+ czbssw * MJSW / PhiBSW ); } /* Drain Bulk Junction */ if( vbd < 0 ) { arg = 1 - vbd / PhiB; argsw = 1 - vbd / PhiBSW; sarg = exp(-MJ*log(arg)); sargsw = exp(-MJSW*log(argsw)); *(ckt->CKTstate0 + here->B2qbd) = PhiB * czbd * (1-arg*sarg)/(1-MJ) + PhiBSW * czbdsw * (1-argsw*sargsw)/(1-MJSW); capbd = czbd * sarg + czbdsw * sargsw ; } else { *(ckt->CKTstate0+here->B2qbd) = vbd*(czbd+czbdsw)+ vbd*vbd*(czbd*MJ*0.5/PhiB + czbdsw * MJSW * 0.5/PhiBSW); capbd = czbd + czbdsw + vbd *(czbd*MJ/PhiB+ czbdsw * MJSW / PhiBSW ); } } /* * check convergence */ if ( (here->B2off == 0) || (!(ckt->CKTmode & MODEINITFIX)) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->B2vbs) = vbs; *(ckt->CKTstate0 + here->B2vbd) = vbd; *(ckt->CKTstate0 + here->B2vgs) = vgs; *(ckt->CKTstate0 + here->B2vds) = vds; *(ckt->CKTstate0 + here->B2cd) = cd; *(ckt->CKTstate0 + here->B2cbs) = cbs; *(ckt->CKTstate0 + here->B2cbd) = cbd; *(ckt->CKTstate0 + here->B2gm) = gm; *(ckt->CKTstate0 + here->B2gds) = gds; *(ckt->CKTstate0 + here->B2gmbs) = gmbs; *(ckt->CKTstate0 + here->B2gbd) = gbd; *(ckt->CKTstate0 + here->B2gbs) = gbs; *(ckt->CKTstate0 + here->B2cggb) = cggb; *(ckt->CKTstate0 + here->B2cgdb) = cgdb; *(ckt->CKTstate0 + here->B2cgsb) = cgsb; *(ckt->CKTstate0 + here->B2cbgb) = cbgb; *(ckt->CKTstate0 + here->B2cbdb) = cbdb; *(ckt->CKTstate0 + here->B2cbsb) = cbsb; *(ckt->CKTstate0 + here->B2cdgb) = cdgb; *(ckt->CKTstate0 + here->B2cddb) = cddb; *(ckt->CKTstate0 + here->B2cdsb) = cdsb; *(ckt->CKTstate0 + here->B2capbs) = capbs; *(ckt->CKTstate0 + here->B2capbd) = capbd; /* bulk and channel charge plus overlaps */ if((!(ckt->CKTmode & (MODETRAN | MODEAC))) && ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) && (!(ckt->CKTmode & MODEINITSMSIG))) goto line850; #ifndef NOBYPASS line755: #endif if( here->B2mode > 0 ) { args[0] = GateDrainOverlapCap; args[1] = GateSourceOverlapCap; args[2] = GateBulkOverlapCap; args[3] = capbd; args[4] = capbs; args[5] = cggb; args[6] = cgdb; args[7] = cgsb; B2mosCap(ckt,vgd,vgs,vgb, args, /* GateDrainOverlapCap, GateSourceOverlapCap,GateBulkOverlapCap, capbd,capbs,cggb,cgdb,cgsb, */ cbgb,cbdb,cbsb,cdgb,cddb,cdsb ,&gcggb,&gcgdb,&gcgsb,&gcbgb,&gcbdb,&gcbsb,&gcdgb ,&gcddb,&gcdsb,&gcsgb,&gcsdb,&gcssb,&qgate,&qbulk ,&qdrn,&qsrc); } else { args[0] = GateSourceOverlapCap; args[1] = GateDrainOverlapCap; args[2] = GateBulkOverlapCap; args[3] = capbs; args[4] = capbd; args[5] = cggb; args[6] = cgsb; args[7] = cgdb; B2mosCap(ckt,vgs,vgd,vgb,args, /* GateSourceOverlapCap, GateDrainOverlapCap,GateBulkOverlapCap, capbs,capbd,cggb,cgsb,cgdb, */ cbgb,cbsb,cbdb,csgb,cssb,csdb ,&gcggb,&gcgsb,&gcgdb,&gcbgb,&gcbsb,&gcbdb,&gcsgb ,&gcssb,&gcsdb,&gcdgb,&gcdsb,&gcddb,&qgate,&qbulk ,&qsrc,&qdrn); } if(ByPass) goto line860; *(ckt->CKTstate0 + here->B2qg) = qgate; *(ckt->CKTstate0 + here->B2qd) = qdrn - *(ckt->CKTstate0 + here->B2qbd); *(ckt->CKTstate0 + here->B2qb) = qbulk + *(ckt->CKTstate0 + here->B2qbd) + *(ckt->CKTstate0 + here->B2qbs); /* store small signal parameters */ if((!(ckt->CKTmode & (MODEAC | MODETRAN))) && (ckt->CKTmode & MODETRANOP ) && (ckt->CKTmode & MODEUIC )) goto line850; if(ckt->CKTmode & MODEINITSMSIG ) { *(ckt->CKTstate0+here->B2cggb) = cggb; *(ckt->CKTstate0+here->B2cgdb) = cgdb; *(ckt->CKTstate0+here->B2cgsb) = cgsb; *(ckt->CKTstate0+here->B2cbgb) = cbgb; *(ckt->CKTstate0+here->B2cbdb) = cbdb; *(ckt->CKTstate0+here->B2cbsb) = cbsb; *(ckt->CKTstate0+here->B2cdgb) = cdgb; *(ckt->CKTstate0+here->B2cddb) = cddb; *(ckt->CKTstate0+here->B2cdsb) = cdsb; *(ckt->CKTstate0+here->B2capbd) = capbd; *(ckt->CKTstate0+here->B2capbs) = capbs; goto line1000; } if(ckt->CKTmode & MODEINITTRAN ) { *(ckt->CKTstate1+here->B2qb) = *(ckt->CKTstate0+here->B2qb) ; *(ckt->CKTstate1+here->B2qg) = *(ckt->CKTstate0+here->B2qg) ; *(ckt->CKTstate1+here->B2qd) = *(ckt->CKTstate0+here->B2qd) ; } error = NIintegrate(ckt,&geq,&ceq,0.0,here->B2qb); if(error) return(error); error = NIintegrate(ckt,&geq,&ceq,0.0,here->B2qg); if(error) return(error); error = NIintegrate(ckt,&geq,&ceq,0.0,here->B2qd); if(error) return(error); goto line860; line850: /* initialize to zero charge conductance and current */ ceqqg = ceqqb = ceqqd = 0.0; gcdgb = gcddb = gcdsb = 0.0; gcsgb = gcsdb = gcssb = 0.0; gcggb = gcgdb = gcgsb = 0.0; gcbgb = gcbdb = gcbsb = 0.0; goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B2iqg); cqbulk = *(ckt->CKTstate0 + here->B2iqb); cqdrn = *(ckt->CKTstate0 + here->B2iqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqb = cqbulk - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs; if(ckt->CKTmode & MODEINITTRAN ) { *(ckt->CKTstate1 + here->B2iqb) = *(ckt->CKTstate0 + here->B2iqb); *(ckt->CKTstate1 + here->B2iqg) = *(ckt->CKTstate0 + here->B2iqg); *(ckt->CKTstate1 + here->B2iqd) = *(ckt->CKTstate0 + here->B2iqd); } /* * load current vector */ line900: m = here->B2m; ceqbs = model->B2type * (cbs-(gbs-ckt->CKTgmin)*vbs); ceqbd = model->B2type * (cbd-(gbd-ckt->CKTgmin)*vbd); ceqqg = model->B2type * ceqqg; ceqqb = model->B2type * ceqqb; ceqqd = model->B2type * ceqqd; if (here->B2mode >= 0) { xnrm=1; xrev=0; cdreq=model->B2type*(cdrain-gds*vds-gm*vgs-gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->B2type)*(cdrain+gds*vds-gm*vgd-gmbs*vbd); } *(ckt->CKTrhs + here->B2gNode) -= m * (ceqqg); *(ckt->CKTrhs + here->B2bNode) -= m * (ceqbs+ceqbd+ceqqb); *(ckt->CKTrhs + here->B2dNodePrime) += m * (ceqbd-cdreq-ceqqd); *(ckt->CKTrhs + here->B2sNodePrime) += m * (cdreq+ceqbs+ceqqg+ceqqb+ceqqd); /* * load y matrix */ *(here->B2DdPtr) += m * (here->B2drainConductance); *(here->B2GgPtr) += m * (gcggb); *(here->B2SsPtr) += m * (here->B2sourceConductance); *(here->B2BbPtr) += m * (gbd+gbs-gcbgb-gcbdb-gcbsb); *(here->B2DPdpPtr) += m * (here->B2drainConductance+gds+gbd+xrev*(gm+gmbs)+gcddb); *(here->B2SPspPtr) += m * (here->B2sourceConductance+gds+gbs+xnrm*(gm+gmbs)+gcssb); *(here->B2DdpPtr) += m * (-here->B2drainConductance); *(here->B2GbPtr) += m * (-gcggb-gcgdb-gcgsb); *(here->B2GdpPtr) += m * (gcgdb); *(here->B2GspPtr) += m * (gcgsb); *(here->B2SspPtr) += m * (-here->B2sourceConductance); *(here->B2BgPtr) += m * (gcbgb); *(here->B2BdpPtr) += m * (-gbd+gcbdb); *(here->B2BspPtr) += m * (-gbs+gcbsb); *(here->B2DPdPtr) += m * (-here->B2drainConductance); *(here->B2DPgPtr) += m * ((xnrm-xrev)*gm+gcdgb); *(here->B2DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs-gcdgb-gcddb-gcdsb); *(here->B2DPspPtr) += m * (-gds-xnrm*(gm+gmbs)+gcdsb); *(here->B2SPgPtr) += m * (-(xnrm-xrev)*gm+gcsgb); *(here->B2SPsPtr) += m * (-here->B2sourceConductance); *(here->B2SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs-gcsgb-gcsdb-gcssb); *(here->B2SPdpPtr) += m * (-gds-xrev*(gm+gmbs)+gcsdb); line1000: ; } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2getic.c0000644000265600020320000000242412264261473020735 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2getic(GENmodel *inModel, CKTcircuit *ckt) { B2model *model = (B2model*)inModel; B2instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->B2nextModel) { for(here = model->B2instances; here ; here = here->B2nextInstance) { if(!here->B2icVBSGiven) { here->B2icVBS = *(ckt->CKTrhs + here->B2bNode) - *(ckt->CKTrhs + here->B2sNode); } if(!here->B2icVDSGiven) { here->B2icVDS = *(ckt->CKTrhs + here->B2dNode) - *(ckt->CKTrhs + here->B2sNode); } if(!here->B2icVGSGiven) { here->B2icVGS = *(ckt->CKTrhs + here->B2gNode) - *(ckt->CKTrhs + here->B2sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/bsim2ext.h0000644000265600020320000000244612264261473021164 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong June Park, Thomas L. Quarles **********/ extern int B2acLoad(GENmodel *,CKTcircuit*); extern int B2ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B2convTest(GENmodel *,CKTcircuit*); extern int B2delete(GENmodel*,IFuid,GENinstance**); extern void B2destroy(GENmodel**); extern int B2getic(GENmodel*,CKTcircuit*); extern int B2load(GENmodel*,CKTcircuit*); extern int B2mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B2mDelete(GENmodel**,IFuid,GENmodel*); extern int B2mParam(int,IFvalue*,GENmodel*); extern void B2mosCap(CKTcircuit*, double, double, double, double*, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B2noise (int, int, GENmodel *, CKTcircuit *, Ndata *, double *); extern int B2param(int,IFvalue*,GENinstance*,IFvalue*); extern int B2pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B2unsetup(GENmodel*,CKTcircuit*); extern int B2temp(GENmodel*,CKTcircuit*); extern int B2trunc(GENmodel*,CKTcircuit*,double*); ngspice-26/src/spicelib/devices/bsim2/b2mpar.c0000644000265600020320000004455212264261473020611 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim2def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2mParam(int param, IFvalue *value, GENmodel *inMod) { B2model *mod = (B2model*)inMod; switch(param) { case BSIM2_MOD_VFB0 : mod->B2vfb0 = value->rValue; mod->B2vfb0Given = TRUE; break; case BSIM2_MOD_VFBL : mod->B2vfbL = value->rValue; mod->B2vfbLGiven = TRUE; break; case BSIM2_MOD_VFBW : mod->B2vfbW = value->rValue; mod->B2vfbWGiven = TRUE; break; case BSIM2_MOD_PHI0 : mod->B2phi0 = value->rValue; mod->B2phi0Given = TRUE; break; case BSIM2_MOD_PHIL : mod->B2phiL = value->rValue; mod->B2phiLGiven = TRUE; break; case BSIM2_MOD_PHIW : mod->B2phiW = value->rValue; mod->B2phiWGiven = TRUE; break; case BSIM2_MOD_K10 : mod->B2k10 = value->rValue; mod->B2k10Given = TRUE; break; case BSIM2_MOD_K1L : mod->B2k1L = value->rValue; mod->B2k1LGiven = TRUE; break; case BSIM2_MOD_K1W : mod->B2k1W = value->rValue; mod->B2k1WGiven = TRUE; break; case BSIM2_MOD_K20 : mod->B2k20 = value->rValue; mod->B2k20Given = TRUE; break; case BSIM2_MOD_K2L : mod->B2k2L = value->rValue; mod->B2k2LGiven = TRUE; break; case BSIM2_MOD_K2W : mod->B2k2W = value->rValue; mod->B2k2WGiven = TRUE; break; case BSIM2_MOD_ETA00 : mod->B2eta00 = value->rValue; mod->B2eta00Given = TRUE; break; case BSIM2_MOD_ETA0L : mod->B2eta0L = value->rValue; mod->B2eta0LGiven = TRUE; break; case BSIM2_MOD_ETA0W : mod->B2eta0W = value->rValue; mod->B2eta0WGiven = TRUE; break; case BSIM2_MOD_ETAB0 : mod->B2etaB0 = value->rValue; mod->B2etaB0Given = TRUE; break; case BSIM2_MOD_ETABL : mod->B2etaBL = value->rValue; mod->B2etaBLGiven = TRUE; break; case BSIM2_MOD_ETABW : mod->B2etaBW = value->rValue; mod->B2etaBWGiven = TRUE; break; case BSIM2_MOD_DELTAL : mod->B2deltaL = value->rValue; mod->B2deltaLGiven = TRUE; break; case BSIM2_MOD_DELTAW : mod->B2deltaW = value->rValue; mod->B2deltaWGiven = TRUE; break; case BSIM2_MOD_MOB00 : mod->B2mob00 = value->rValue; mod->B2mob00Given = TRUE; break; case BSIM2_MOD_MOB0B0 : mod->B2mob0B0 = value->rValue; mod->B2mob0B0Given = TRUE; break; case BSIM2_MOD_MOB0BL : mod->B2mob0BL = value->rValue; mod->B2mob0BLGiven = TRUE; break; case BSIM2_MOD_MOB0BW : mod->B2mob0BW = value->rValue; mod->B2mob0BWGiven = TRUE; break; case BSIM2_MOD_MOBS00 : mod->B2mobs00 = value->rValue; mod->B2mobs00Given = TRUE; break; case BSIM2_MOD_MOBS0L : mod->B2mobs0L = value->rValue; mod->B2mobs0LGiven = TRUE; break; case BSIM2_MOD_MOBS0W : mod->B2mobs0W = value->rValue; mod->B2mobs0WGiven = TRUE; break; case BSIM2_MOD_MOBSB0 : mod->B2mobsB0 = value->rValue; mod->B2mobsB0Given = TRUE; break; case BSIM2_MOD_MOBSBL : mod->B2mobsBL = value->rValue; mod->B2mobsBLGiven = TRUE; break; case BSIM2_MOD_MOBSBW : mod->B2mobsBW = value->rValue; mod->B2mobsBWGiven = TRUE; break; case BSIM2_MOD_MOB200 : mod->B2mob200 = value->rValue; mod->B2mob200Given = TRUE; break; case BSIM2_MOD_MOB20L : mod->B2mob20L = value->rValue; mod->B2mob20LGiven = TRUE; break; case BSIM2_MOD_MOB20W : mod->B2mob20W = value->rValue; mod->B2mob20WGiven = TRUE; break; case BSIM2_MOD_MOB2B0 : mod->B2mob2B0 = value->rValue; mod->B2mob2B0Given = TRUE; break; case BSIM2_MOD_MOB2BL : mod->B2mob2BL = value->rValue; mod->B2mob2BLGiven = TRUE; break; case BSIM2_MOD_MOB2BW : mod->B2mob2BW = value->rValue; mod->B2mob2BWGiven = TRUE; break; case BSIM2_MOD_MOB2G0 : mod->B2mob2G0 = value->rValue; mod->B2mob2G0Given = TRUE; break; case BSIM2_MOD_MOB2GL : mod->B2mob2GL = value->rValue; mod->B2mob2GLGiven = TRUE; break; case BSIM2_MOD_MOB2GW : mod->B2mob2GW = value->rValue; mod->B2mob2GWGiven = TRUE; break; case BSIM2_MOD_MOB300 : mod->B2mob300 = value->rValue; mod->B2mob300Given = TRUE; break; case BSIM2_MOD_MOB30L : mod->B2mob30L = value->rValue; mod->B2mob30LGiven = TRUE; break; case BSIM2_MOD_MOB30W : mod->B2mob30W = value->rValue; mod->B2mob30WGiven = TRUE; break; case BSIM2_MOD_MOB3B0 : mod->B2mob3B0 = value->rValue; mod->B2mob3B0Given = TRUE; break; case BSIM2_MOD_MOB3BL : mod->B2mob3BL = value->rValue; mod->B2mob3BLGiven = TRUE; break; case BSIM2_MOD_MOB3BW : mod->B2mob3BW = value->rValue; mod->B2mob3BWGiven = TRUE; break; case BSIM2_MOD_MOB3G0 : mod->B2mob3G0 = value->rValue; mod->B2mob3G0Given = TRUE; break; case BSIM2_MOD_MOB3GL : mod->B2mob3GL = value->rValue; mod->B2mob3GLGiven = TRUE; break; case BSIM2_MOD_MOB3GW : mod->B2mob3GW = value->rValue; mod->B2mob3GWGiven = TRUE; break; case BSIM2_MOD_MOB400 : mod->B2mob400 = value->rValue; mod->B2mob400Given = TRUE; break; case BSIM2_MOD_MOB40L : mod->B2mob40L = value->rValue; mod->B2mob40LGiven = TRUE; break; case BSIM2_MOD_MOB40W : mod->B2mob40W = value->rValue; mod->B2mob40WGiven = TRUE; break; case BSIM2_MOD_MOB4B0 : mod->B2mob4B0 = value->rValue; mod->B2mob4B0Given = TRUE; break; case BSIM2_MOD_MOB4BL : mod->B2mob4BL = value->rValue; mod->B2mob4BLGiven = TRUE; break; case BSIM2_MOD_MOB4BW : mod->B2mob4BW = value->rValue; mod->B2mob4BWGiven = TRUE; break; case BSIM2_MOD_MOB4G0 : mod->B2mob4G0 = value->rValue; mod->B2mob4G0Given = TRUE; break; case BSIM2_MOD_MOB4GL : mod->B2mob4GL = value->rValue; mod->B2mob4GLGiven = TRUE; break; case BSIM2_MOD_MOB4GW : mod->B2mob4GW = value->rValue; mod->B2mob4GWGiven = TRUE; break; case BSIM2_MOD_UA00 : mod->B2ua00 = value->rValue; mod->B2ua00Given = TRUE; break; case BSIM2_MOD_UA0L : mod->B2ua0L = value->rValue; mod->B2ua0LGiven = TRUE; break; case BSIM2_MOD_UA0W : mod->B2ua0W = value->rValue; mod->B2ua0WGiven = TRUE; break; case BSIM2_MOD_UAB0 : mod->B2uaB0 = value->rValue; mod->B2uaB0Given = TRUE; break; case BSIM2_MOD_UABL : mod->B2uaBL = value->rValue; mod->B2uaBLGiven = TRUE; break; case BSIM2_MOD_UABW : mod->B2uaBW = value->rValue; mod->B2uaBWGiven = TRUE; break; case BSIM2_MOD_UB00 : mod->B2ub00 = value->rValue; mod->B2ub00Given = TRUE; break; case BSIM2_MOD_UB0L : mod->B2ub0L = value->rValue; mod->B2ub0LGiven = TRUE; break; case BSIM2_MOD_UB0W : mod->B2ub0W = value->rValue; mod->B2ub0WGiven = TRUE; break; case BSIM2_MOD_UBB0 : mod->B2ubB0 = value->rValue; mod->B2ubB0Given = TRUE; break; case BSIM2_MOD_UBBL : mod->B2ubBL = value->rValue; mod->B2ubBLGiven = TRUE; break; case BSIM2_MOD_UBBW : mod->B2ubBW = value->rValue; mod->B2ubBWGiven = TRUE; break; case BSIM2_MOD_U100 : mod->B2u100 = value->rValue; mod->B2u100Given = TRUE; break; case BSIM2_MOD_U10L : mod->B2u10L = value->rValue; mod->B2u10LGiven = TRUE; break; case BSIM2_MOD_U10W : mod->B2u10W = value->rValue; mod->B2u10WGiven = TRUE; break; case BSIM2_MOD_U1B0 : mod->B2u1B0 = value->rValue; mod->B2u1B0Given = TRUE; break; case BSIM2_MOD_U1BL : mod->B2u1BL = value->rValue; mod->B2u1BLGiven = TRUE; break; case BSIM2_MOD_U1BW : mod->B2u1BW = value->rValue; mod->B2u1BWGiven = TRUE; break; case BSIM2_MOD_U1D0 : mod->B2u1D0 = value->rValue; mod->B2u1D0Given = TRUE; break; case BSIM2_MOD_U1DL : mod->B2u1DL = value->rValue; mod->B2u1DLGiven = TRUE; break; case BSIM2_MOD_U1DW : mod->B2u1DW = value->rValue; mod->B2u1DWGiven = TRUE; break; case BSIM2_MOD_N00 : mod->B2n00 = value->rValue; mod->B2n00Given = TRUE; break; case BSIM2_MOD_N0L : mod->B2n0L = value->rValue; mod->B2n0LGiven = TRUE; break; case BSIM2_MOD_N0W : mod->B2n0W = value->rValue; mod->B2n0WGiven = TRUE; break; case BSIM2_MOD_NB0 : mod->B2nB0 = value->rValue; mod->B2nB0Given = TRUE; break; case BSIM2_MOD_NBL : mod->B2nBL = value->rValue; mod->B2nBLGiven = TRUE; break; case BSIM2_MOD_NBW : mod->B2nBW = value->rValue; mod->B2nBWGiven = TRUE; break; case BSIM2_MOD_ND0 : mod->B2nD0 = value->rValue; mod->B2nD0Given = TRUE; break; case BSIM2_MOD_NDL : mod->B2nDL = value->rValue; mod->B2nDLGiven = TRUE; break; case BSIM2_MOD_NDW : mod->B2nDW = value->rValue; mod->B2nDWGiven = TRUE; break; case BSIM2_MOD_VOF00 : mod->B2vof00 = value->rValue; mod->B2vof00Given = TRUE; break; case BSIM2_MOD_VOF0L : mod->B2vof0L = value->rValue; mod->B2vof0LGiven = TRUE; break; case BSIM2_MOD_VOF0W : mod->B2vof0W = value->rValue; mod->B2vof0WGiven = TRUE; break; case BSIM2_MOD_VOFB0 : mod->B2vofB0 = value->rValue; mod->B2vofB0Given = TRUE; break; case BSIM2_MOD_VOFBL : mod->B2vofBL = value->rValue; mod->B2vofBLGiven = TRUE; break; case BSIM2_MOD_VOFBW : mod->B2vofBW = value->rValue; mod->B2vofBWGiven = TRUE; break; case BSIM2_MOD_VOFD0 : mod->B2vofD0 = value->rValue; mod->B2vofD0Given = TRUE; break; case BSIM2_MOD_VOFDL : mod->B2vofDL = value->rValue; mod->B2vofDLGiven = TRUE; break; case BSIM2_MOD_VOFDW : mod->B2vofDW = value->rValue; mod->B2vofDWGiven = TRUE; break; case BSIM2_MOD_AI00 : mod->B2ai00 = value->rValue; mod->B2ai00Given = TRUE; break; case BSIM2_MOD_AI0L : mod->B2ai0L = value->rValue; mod->B2ai0LGiven = TRUE; break; case BSIM2_MOD_AI0W : mod->B2ai0W = value->rValue; mod->B2ai0WGiven = TRUE; break; case BSIM2_MOD_AIB0 : mod->B2aiB0 = value->rValue; mod->B2aiB0Given = TRUE; break; case BSIM2_MOD_AIBL : mod->B2aiBL = value->rValue; mod->B2aiBLGiven = TRUE; break; case BSIM2_MOD_AIBW : mod->B2aiBW = value->rValue; mod->B2aiBWGiven = TRUE; break; case BSIM2_MOD_BI00 : mod->B2bi00 = value->rValue; mod->B2bi00Given = TRUE; break; case BSIM2_MOD_BI0L : mod->B2bi0L = value->rValue; mod->B2bi0LGiven = TRUE; break; case BSIM2_MOD_BI0W : mod->B2bi0W = value->rValue; mod->B2bi0WGiven = TRUE; break; case BSIM2_MOD_BIB0 : mod->B2biB0 = value->rValue; mod->B2biB0Given = TRUE; break; case BSIM2_MOD_BIBL : mod->B2biBL = value->rValue; mod->B2biBLGiven = TRUE; break; case BSIM2_MOD_BIBW : mod->B2biBW = value->rValue; mod->B2biBWGiven = TRUE; break; case BSIM2_MOD_VGHIGH0 : mod->B2vghigh0 = value->rValue; mod->B2vghigh0Given = TRUE; break; case BSIM2_MOD_VGHIGHL : mod->B2vghighL = value->rValue; mod->B2vghighLGiven = TRUE; break; case BSIM2_MOD_VGHIGHW : mod->B2vghighW = value->rValue; mod->B2vghighWGiven = TRUE; break; case BSIM2_MOD_VGLOW0 : mod->B2vglow0 = value->rValue; mod->B2vglow0Given = TRUE; break; case BSIM2_MOD_VGLOWL : mod->B2vglowL = value->rValue; mod->B2vglowLGiven = TRUE; break; case BSIM2_MOD_VGLOWW : mod->B2vglowW = value->rValue; mod->B2vglowWGiven = TRUE; break; case BSIM2_MOD_TOX : mod->B2tox = value->rValue; mod->B2toxGiven = TRUE; break; case BSIM2_MOD_TEMP : mod->B2temp = value->rValue; mod->B2tempGiven = TRUE; break; case BSIM2_MOD_VDD : mod->B2vdd = value->rValue; mod->B2vddGiven = TRUE; break; case BSIM2_MOD_VGG : mod->B2vgg = value->rValue; mod->B2vggGiven = TRUE; break; case BSIM2_MOD_VBB : mod->B2vbb = value->rValue; mod->B2vbbGiven = TRUE; break; case BSIM2_MOD_CGSO : mod->B2gateSourceOverlapCap = value->rValue; mod->B2gateSourceOverlapCapGiven = TRUE; break; case BSIM2_MOD_CGDO : mod->B2gateDrainOverlapCap = value->rValue; mod->B2gateDrainOverlapCapGiven = TRUE; break; case BSIM2_MOD_CGBO : mod->B2gateBulkOverlapCap = value->rValue; mod->B2gateBulkOverlapCapGiven = TRUE; break; case BSIM2_MOD_XPART : mod->B2channelChargePartitionFlag = (value->iValue != 0); mod->B2channelChargePartitionFlagGiven = TRUE; break; case BSIM2_MOD_RSH : mod->B2sheetResistance = value->rValue; mod->B2sheetResistanceGiven = TRUE; break; case BSIM2_MOD_JS : mod->B2jctSatCurDensity = value->rValue; mod->B2jctSatCurDensityGiven = TRUE; break; case BSIM2_MOD_PB : mod->B2bulkJctPotential = value->rValue; mod->B2bulkJctPotentialGiven = TRUE; break; case BSIM2_MOD_MJ : mod->B2bulkJctBotGradingCoeff = value->rValue; mod->B2bulkJctBotGradingCoeffGiven = TRUE; break; case BSIM2_MOD_PBSW : mod->B2sidewallJctPotential = value->rValue; mod->B2sidewallJctPotentialGiven = TRUE; break; case BSIM2_MOD_MJSW : mod->B2bulkJctSideGradingCoeff = value->rValue; mod->B2bulkJctSideGradingCoeffGiven = TRUE; break; case BSIM2_MOD_CJ : mod->B2unitAreaJctCap = value->rValue; mod->B2unitAreaJctCapGiven = TRUE; break; case BSIM2_MOD_CJSW : mod->B2unitLengthSidewallJctCap = value->rValue; mod->B2unitLengthSidewallJctCapGiven = TRUE; break; case BSIM2_MOD_DEFWIDTH : mod->B2defaultWidth = value->rValue; mod->B2defaultWidthGiven = TRUE; break; case BSIM2_MOD_DELLENGTH : mod->B2deltaLength = value->rValue; mod->B2deltaLengthGiven = TRUE; break; case BSIM2_MOD_AF : mod->B2fNexp = value->rValue; mod->B2fNexpGiven = TRUE; break; case BSIM2_MOD_KF : mod->B2fNcoef = value->rValue; mod->B2fNcoefGiven = TRUE; break; case BSIM2_MOD_NMOS : if(value->iValue) { mod->B2type = 1; mod->B2typeGiven = TRUE; } break; case BSIM2_MOD_PMOS : if(value->iValue) { mod->B2type = - 1; mod->B2typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim2/bsim2itf.h0000644000265600020320000000026312264261473021141 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_BSIM2 #define DEV_BSIM2 SPICEdev *get_bsim2_info(void); #endif ngspice-26/src/spicelib/devices/bsim2/b2acld.c0000644000265600020320000001202012264261473020536 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2acLoad(GENmodel *inModel, CKTcircuit *ckt) { B2model *model = (B2model*)inModel; B2instance *here; int xnrm; int xrev; double gdpr; double gspr; double gm; double gds; double gmbs; double gbd; double gbs; double capbd; double capbs; double xcggb; double xcgdb; double xcgsb; double xcbgb; double xcbdb; double xcbsb; double xcddb; double xcssb; double xcdgb; double xcsgb; double xcdsb; double xcsdb; double cggb; double cgdb; double cgsb; double cbgb; double cbdb; double cbsb; double cddb; double cdgb; double cdsb; double omega; /* angular fequency of the signal */ double m; /* parallel multiplier */ omega = ckt->CKTomega; for( ; model != NULL; model = model->B2nextModel) { for(here = model->B2instances; here!= NULL; here = here->B2nextInstance) { if (here->B2mode >= 0) { xnrm=1; xrev=0; } else { xnrm=0; xrev=1; } gdpr=here->B2drainConductance; gspr=here->B2sourceConductance; gm= *(ckt->CKTstate0 + here->B2gm); gds= *(ckt->CKTstate0 + here->B2gds); gmbs= *(ckt->CKTstate0 + here->B2gmbs); gbd= *(ckt->CKTstate0 + here->B2gbd); gbs= *(ckt->CKTstate0 + here->B2gbs); capbd= *(ckt->CKTstate0 + here->B2capbd); capbs= *(ckt->CKTstate0 + here->B2capbs); /* * charge oriented model parameters */ cggb = *(ckt->CKTstate0 + here->B2cggb); cgsb = *(ckt->CKTstate0 + here->B2cgsb); cgdb = *(ckt->CKTstate0 + here->B2cgdb); cbgb = *(ckt->CKTstate0 + here->B2cbgb); cbsb = *(ckt->CKTstate0 + here->B2cbsb); cbdb = *(ckt->CKTstate0 + here->B2cbdb); cdgb = *(ckt->CKTstate0 + here->B2cdgb); cdsb = *(ckt->CKTstate0 + here->B2cdsb); cddb = *(ckt->CKTstate0 + here->B2cddb); xcdgb = (cdgb - here->pParam->B2GDoverlapCap) * omega; xcddb = (cddb + capbd + here->pParam->B2GDoverlapCap) * omega; xcdsb = cdsb * omega; xcsgb = -(cggb + cbgb + cdgb + here->pParam->B2GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb) * omega; xcssb = (capbs + here->pParam->B2GSoverlapCap - (cgsb+cbsb+cdsb)) * omega; xcggb = (cggb + here->pParam->B2GDoverlapCap + here->pParam->B2GSoverlapCap + here->pParam->B2GBoverlapCap) * omega; xcgdb = (cgdb - here->pParam->B2GDoverlapCap ) * omega; xcgsb = (cgsb - here->pParam->B2GSoverlapCap) * omega; xcbgb = (cbgb - here->pParam->B2GBoverlapCap) * omega; xcbdb = (cbdb - capbd ) * omega; xcbsb = (cbsb - capbs ) * omega; m = here->B2m; *(here->B2GgPtr +1) += m * (xcggb); *(here->B2BbPtr +1) += m * (-xcbgb-xcbdb-xcbsb); *(here->B2DPdpPtr +1) += m * (xcddb); *(here->B2SPspPtr +1) += m * (xcssb); *(here->B2GbPtr +1) += m * (-xcggb-xcgdb-xcgsb); *(here->B2GdpPtr +1) += m * (xcgdb); *(here->B2GspPtr +1) += m * (xcgsb); *(here->B2BgPtr +1) += m * (xcbgb); *(here->B2BdpPtr +1) += m * (xcbdb); *(here->B2BspPtr +1) += m * (xcbsb); *(here->B2DPgPtr +1) += m * (xcdgb); *(here->B2DPbPtr +1) += m * (-xcdgb-xcddb-xcdsb); *(here->B2DPspPtr +1) += m * (xcdsb); *(here->B2SPgPtr +1) += m * (xcsgb); *(here->B2SPbPtr +1) += m * (-xcsgb-xcsdb-xcssb); *(here->B2SPdpPtr +1) += m * (xcsdb); *(here->B2DdPtr) += m * (gdpr); *(here->B2SsPtr) += m * (gspr); *(here->B2BbPtr) += m * (gbd+gbs); *(here->B2DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs)); *(here->B2SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs)); *(here->B2DdpPtr) -= m * (gdpr); *(here->B2SspPtr) -= m * (gspr); *(here->B2BdpPtr) -= m * (gbd); *(here->B2BspPtr) -= m * (gbs); *(here->B2DPdPtr) -= m * (gdpr); *(here->B2DPgPtr) += m * ((xnrm-xrev)*gm); *(here->B2DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs); *(here->B2DPspPtr) += m * (-gds-xnrm*(gm+gmbs)); *(here->B2SPgPtr) += m * (-(xnrm-xrev)*gm); *(here->B2SPsPtr) -= m * (gspr); *(here->B2SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs); *(here->B2SPdpPtr) += m * (-gds-xrev*(gm+gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2temp.c0000644000265600020320000002474612264261473020622 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int B2temp(GENmodel *inModel, CKTcircuit *ckt) /* load the B2 device structure with those pointers needed later * for fast matrix loading */ { B2model *model = (B2model*) inModel; B2instance *here; struct bsim2SizeDependParam *pSizeDependParamKnot, *pLastKnot; double EffectiveLength; double EffectiveWidth; double CoxWoverL, Inv_L, Inv_W, tmp; int Size_Not_Found; NG_IGNORE(ckt); /* loop through all the B2 device models */ for( ; model != NULL; model = model->B2nextModel ) { /* Default value Processing for B2 MOSFET Models */ /* Some Limiting for Model Parameters */ if( model->B2bulkJctPotential < 0.1) { model->B2bulkJctPotential = 0.1; } if( model->B2sidewallJctPotential < 0.1) { model->B2sidewallJctPotential = 0.1; } model->B2Cox = 3.453e-13/(model->B2tox * 1.0e-4);/*in F/cm**2 */ model->B2vdd2 = 2.0 * model->B2vdd; model->B2vgg2 = 2.0 * model->B2vgg; model->B2vbb2 = 2.0 * model->B2vbb; model->B2Vtm = 8.625e-5 * (model->B2temp + 273.0); model->pSizeDependParamKnot = NULL; pLastKnot = NULL; /* loop through all the instances of the model */ for (here = model->B2instances; here != NULL ; here=here->B2nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->B2l == pSizeDependParamKnot->Length) && (here->B2w == pSizeDependParamKnot->Width)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { here->pParam = TMALLOC(struct bsim2SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = here->pParam; else pLastKnot->pNext = here->pParam; here->pParam->pNext = NULL; EffectiveLength = here->B2l - model->B2deltaL * 1.0e-6; EffectiveWidth = here->B2w - model->B2deltaW * 1.0e-6; if(EffectiveLength<=0) { IFuid namarray[2]; namarray[0] = model->B2modName; namarray[1] = here->B2name; SPfrontEnd->IFerror (ERR_FATAL, "B2: mosfet %s, model %s: Effective channel length <=0", namarray); return(E_BADPARM); } if(EffectiveWidth <= 0) { IFuid namarray[2]; namarray[0] = model->B2modName; namarray[1] = here->B2name; SPfrontEnd->IFerror (ERR_FATAL, "B2: mosfet %s, model %s: Effective channel width <=0", namarray); return(E_BADPARM); } Inv_L = 1.0e-6 / EffectiveLength; Inv_W = 1.0e-6 / EffectiveWidth; here->pParam->Width = here->B2w; here->pParam->Length = here->B2l; here->pParam->B2vfb = model->B2vfb0 + model->B2vfbW * Inv_W + model->B2vfbL * Inv_L; here->pParam->B2phi = model->B2phi0 + model->B2phiW * Inv_W + model->B2phiL * Inv_L; here->pParam->B2k1 = model->B2k10 + model->B2k1W * Inv_W + model->B2k1L * Inv_L; here->pParam->B2k2 = model->B2k20 + model->B2k2W * Inv_W + model->B2k2L * Inv_L; here->pParam->B2eta0 = model->B2eta00 + model->B2eta0W * Inv_W + model->B2eta0L * Inv_L; here->pParam->B2etaB = model->B2etaB0 + model->B2etaBW * Inv_W + model->B2etaBL * Inv_L; here->pParam->B2beta0 = model->B2mob00; here->pParam->B2beta0B = model->B2mob0B0 + model->B2mob0BW * Inv_W + model->B2mob0BL * Inv_L; here->pParam->B2betas0 = model->B2mobs00 + model->B2mobs0W * Inv_W + model->B2mobs0L * Inv_L; if (here->pParam->B2betas0 < 1.01 * here->pParam->B2beta0) here->pParam->B2betas0 = 1.01 * here->pParam->B2beta0; here->pParam->B2betasB = model->B2mobsB0 + model->B2mobsBW * Inv_W + model->B2mobsBL * Inv_L; tmp = (here->pParam->B2betas0 - here->pParam->B2beta0 - here->pParam->B2beta0B * model->B2vbb); if ((-here->pParam->B2betasB * model->B2vbb) > tmp) here->pParam->B2betasB = -tmp / model->B2vbb; here->pParam->B2beta20 = model->B2mob200 + model->B2mob20W * Inv_W + model->B2mob20L * Inv_L; here->pParam->B2beta2B = model->B2mob2B0 + model->B2mob2BW * Inv_W + model->B2mob2BL * Inv_L; here->pParam->B2beta2G = model->B2mob2G0 + model->B2mob2GW * Inv_W + model->B2mob2GL * Inv_L; here->pParam->B2beta30 = model->B2mob300 + model->B2mob30W * Inv_W + model->B2mob30L * Inv_L; here->pParam->B2beta3B = model->B2mob3B0 + model->B2mob3BW * Inv_W + model->B2mob3BL * Inv_L; here->pParam->B2beta3G = model->B2mob3G0 + model->B2mob3GW * Inv_W + model->B2mob3GL * Inv_L; here->pParam->B2beta40 = model->B2mob400 + model->B2mob40W * Inv_W + model->B2mob40L * Inv_L; here->pParam->B2beta4B = model->B2mob4B0 + model->B2mob4BW * Inv_W + model->B2mob4BL * Inv_L; here->pParam->B2beta4G = model->B2mob4G0 + model->B2mob4GW * Inv_W + model->B2mob4GL * Inv_L; CoxWoverL = model->B2Cox * EffectiveWidth / EffectiveLength; here->pParam->B2beta0 *= CoxWoverL; here->pParam->B2beta0B *= CoxWoverL; here->pParam->B2betas0 *= CoxWoverL; here->pParam->B2betasB *= CoxWoverL; here->pParam->B2beta30 *= CoxWoverL; here->pParam->B2beta3B *= CoxWoverL; here->pParam->B2beta3G *= CoxWoverL; here->pParam->B2beta40 *= CoxWoverL; here->pParam->B2beta4B *= CoxWoverL; here->pParam->B2beta4G *= CoxWoverL; here->pParam->B2ua0 = model->B2ua00 + model->B2ua0W * Inv_W + model->B2ua0L * Inv_L; here->pParam->B2uaB = model->B2uaB0 + model->B2uaBW * Inv_W + model->B2uaBL * Inv_L; here->pParam->B2ub0 = model->B2ub00 + model->B2ub0W * Inv_W + model->B2ub0L * Inv_L; here->pParam->B2ubB = model->B2ubB0 + model->B2ubBW * Inv_W + model->B2ubBL * Inv_L; here->pParam->B2u10 = model->B2u100 + model->B2u10W * Inv_W + model->B2u10L * Inv_L; here->pParam->B2u1B = model->B2u1B0 + model->B2u1BW * Inv_W + model->B2u1BL * Inv_L; here->pParam->B2u1D = model->B2u1D0 + model->B2u1DW * Inv_W + model->B2u1DL * Inv_L; here->pParam->B2n0 = model->B2n00 + model->B2n0W * Inv_W + model->B2n0L * Inv_L; here->pParam->B2nB = model->B2nB0 + model->B2nBW * Inv_W + model->B2nBL * Inv_L; here->pParam->B2nD = model->B2nD0 + model->B2nDW * Inv_W + model->B2nDL * Inv_L; if (here->pParam->B2n0 < 0.0) here->pParam->B2n0 = 0.0; here->pParam->B2vof0 = model->B2vof00 + model->B2vof0W * Inv_W + model->B2vof0L * Inv_L; here->pParam->B2vofB = model->B2vofB0 + model->B2vofBW * Inv_W + model->B2vofBL * Inv_L; here->pParam->B2vofD = model->B2vofD0 + model->B2vofDW * Inv_W + model->B2vofDL * Inv_L; here->pParam->B2ai0 = model->B2ai00 + model->B2ai0W * Inv_W + model->B2ai0L * Inv_L; here->pParam->B2aiB = model->B2aiB0 + model->B2aiBW * Inv_W + model->B2aiBL * Inv_L; here->pParam->B2bi0 = model->B2bi00 + model->B2bi0W * Inv_W + model->B2bi0L * Inv_L; here->pParam->B2biB = model->B2biB0 + model->B2biBW * Inv_W + model->B2biBL * Inv_L; here->pParam->B2vghigh = model->B2vghigh0 + model->B2vghighW * Inv_W + model->B2vghighL * Inv_L; here->pParam->B2vglow = model->B2vglow0 + model->B2vglowW * Inv_W + model->B2vglowL * Inv_L; here->pParam->CoxWL = model->B2Cox * EffectiveLength * EffectiveWidth * 1.0e4; here->pParam->One_Third_CoxWL = here->pParam->CoxWL / 3.0; here->pParam->Two_Third_CoxWL = 2.0 * here->pParam->One_Third_CoxWL; here->pParam->B2GSoverlapCap = model->B2gateSourceOverlapCap * EffectiveWidth; here->pParam->B2GDoverlapCap = model->B2gateDrainOverlapCap * EffectiveWidth; here->pParam->B2GBoverlapCap = model->B2gateBulkOverlapCap * EffectiveLength; here->pParam->SqrtPhi = sqrt(here->pParam->B2phi); here->pParam->Phis3 = here->pParam->SqrtPhi * here->pParam->B2phi; here->pParam->Arg = here->pParam->B2betasB - here->pParam->B2beta0B - model->B2vdd * (here->pParam->B2beta3B - model->B2vdd * here->pParam->B2beta4B); } /* process drain series resistance */ if( (here->B2drainConductance=model->B2sheetResistance * here->B2drainSquares) != 0.0 ) { here->B2drainConductance = 1. / here->B2drainConductance ; } /* process source series resistance */ if( (here->B2sourceConductance=model->B2sheetResistance * here->B2sourceSquares) != 0.0 ) { here->B2sourceConductance = 1. / here->B2sourceConductance ; } here->pParam->B2vt0 = here->pParam->B2vfb + here->pParam->B2phi + here->pParam->B2k1 * here->pParam->SqrtPhi - here->pParam->B2k2 * here->pParam->B2phi; here->B2von = here->pParam->B2vt0; /* added for initialization*/ } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2noi.c0000644000265600020320000001424112264261473020427 0ustar andreasadmin/********** Copyright 2003 ??. All rights reserved. Author: 2003 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "bsim2def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * B2noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int B2noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; B2model *firstModel = (B2model *) genmodel; B2model *model; B2instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B2NSRCS]; double lnNdens[B2NSRCS]; int i; /* define the names of the noise sources */ static char *B2nNames[B2NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in bsim1defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->B2nextModel) { for (inst=model->B2instances; inst != NULL; inst=inst->B2nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < B2NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->B2name,B2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < B2NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->B2name,B2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->B2name,B2nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[B2RDNOIZ],&lnNdens[B2RDNOIZ], ckt,THERMNOISE,inst->B2dNodePrime,inst->B2dNode, inst->B2drainConductance * inst->B2m); NevalSrc(&noizDens[B2RSNOIZ],&lnNdens[B2RSNOIZ], ckt,THERMNOISE,inst->B2sNodePrime,inst->B2sNode, inst->B2sourceConductance * inst->B2m); NevalSrc(&noizDens[B2IDNOIZ],&lnNdens[B2IDNOIZ], ckt,THERMNOISE,inst->B2dNodePrime,inst->B2sNodePrime, (2.0/3.0 * fabs(inst->B2gm * inst->B2m))); NevalSrc(&noizDens[B2FLNOIZ], NULL, ckt, N_GAIN,inst->B2dNodePrime, inst->B2sNodePrime, (double)0.0); noizDens[B2FLNOIZ] *= model->B2fNcoef * inst->B2m * exp(model->B2fNexp * log(MAX(fabs(inst->B2cd),N_MINLOG))) / (data->freq * (inst->B2w - model->B2deltaW * 1e-6) * (inst->B2l - model->B2deltaL * 1e-6) * model->B2Cox * model->B2Cox); lnNdens[B2FLNOIZ] = log(MAX(noizDens[B2FLNOIZ],N_MINLOG)); noizDens[B2TOTNOIZ] = noizDens[B2RDNOIZ] + noizDens[B2RSNOIZ] + noizDens[B2IDNOIZ] + noizDens[B2FLNOIZ]; lnNdens[B2TOTNOIZ] = log(MAX(noizDens[B2TOTNOIZ], N_MINLOG)); *OnDens += noizDens[B2TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < B2NSRCS; i++) { inst->B2nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < B2NSRCS; i++) { inst->B2nVar[OUTNOIZ][i] = 0.0; inst->B2nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < B2NSRCS; i++) { if (i != B2TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->B2nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->B2nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->B2nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->B2nVar[OUTNOIZ][i] += tempOnoise; inst->B2nVar[OUTNOIZ][B2TOTNOIZ] += tempOnoise; inst->B2nVar[INNOIZ][i] += tempInoise; inst->B2nVar[INNOIZ][B2TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < B2NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < B2NSRCS; i++) { data->outpVector[data->outNumber++] = inst->B2nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->B2nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2.c0000644000265600020320000003012112264261473017714 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim2def.h" #include "ngspice/suffix.h" IFparm B2pTable[] = { /* parameters */ IOP( "l", BSIM2_L, IF_REAL , "Length"), IOP( "w", BSIM2_W, IF_REAL , "Width"), IOP( "m", BSIM2_M, IF_REAL , "Parallel Multiplier"), IOP( "ad", BSIM2_AD, IF_REAL , "Drain area"), IOP( "as", BSIM2_AS, IF_REAL , "Source area"), IOP( "pd", BSIM2_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM2_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM2_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM2_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM2_OFF, IF_FLAG , "Device is initially off"), IOP( "vds", BSIM2_IC_VDS, IF_REAL , "Initial D-S voltage"), IOP( "vgs", BSIM2_IC_VGS, IF_REAL , "Initial G-S voltage"), IOP( "vbs", BSIM2_IC_VBS, IF_REAL , "Initial B-S voltage"), IP( "ic", BSIM2_IC, IF_VECTOR , "Vector of DS,GS,BS initial voltages") }; IFparm B2mPTable[] = { /* model parameters */ IOP( "vfb", BSIM2_MOD_VFB0, IF_REAL,"Flat band voltage"), IOP( "lvfb", BSIM2_MOD_VFBL, IF_REAL, "Length dependence of vfb"), IOP( "wvfb", BSIM2_MOD_VFBW, IF_REAL, "Width dependence of vfb"), IOP( "phi", BSIM2_MOD_PHI0, IF_REAL, "Strong inversion surface potential "), IOP( "lphi", BSIM2_MOD_PHIL, IF_REAL, "Length dependence of phi"), IOP( "wphi", BSIM2_MOD_PHIW, IF_REAL, "Width dependence of phi"), IOP( "k1", BSIM2_MOD_K10, IF_REAL, "Bulk effect coefficient 1"), IOP( "lk1", BSIM2_MOD_K1L, IF_REAL, "Length dependence of k1"), IOP( "wk1", BSIM2_MOD_K1W, IF_REAL, "Width dependence of k1"), IOP( "k2", BSIM2_MOD_K20, IF_REAL, "Bulk effect coefficient 2"), IOP( "lk2", BSIM2_MOD_K2L, IF_REAL, "Length dependence of k2"), IOP( "wk2", BSIM2_MOD_K2W, IF_REAL, "Width dependence of k2"), IOP( "eta0", BSIM2_MOD_ETA00, IF_REAL, "VDS dependence of threshold voltage at VDD=0"), IOP( "leta0", BSIM2_MOD_ETA0L, IF_REAL, "Length dependence of eta0"), IOP( "weta0", BSIM2_MOD_ETA0W, IF_REAL, "Width dependence of eta0"), IOP( "etab", BSIM2_MOD_ETAB0, IF_REAL, "VBS dependence of eta"), IOP( "letab", BSIM2_MOD_ETABL, IF_REAL, "Length dependence of etab"), IOP( "wetab", BSIM2_MOD_ETABW, IF_REAL, "Width dependence of etab"), IOP( "dl", BSIM2_MOD_DELTAL, IF_REAL, "Channel length reduction in um"), IOP( "dw", BSIM2_MOD_DELTAW, IF_REAL, "Channel width reduction in um"), IOP( "mu0", BSIM2_MOD_MOB00, IF_REAL, "Low-field mobility, at VDS=0 VGS=VTH"), IOP( "mu0b", BSIM2_MOD_MOB0B0, IF_REAL, "VBS dependence of low-field mobility"), IOP( "lmu0b", BSIM2_MOD_MOB0BL, IF_REAL, "Length dependence of mu0b"), IOP( "wmu0b", BSIM2_MOD_MOB0BW, IF_REAL, "Width dependence of mu0b"), IOP( "mus0", BSIM2_MOD_MOBS00, IF_REAL, "Mobility at VDS=VDD VGS=VTH"), IOP( "lmus0", BSIM2_MOD_MOBS0L, IF_REAL, "Length dependence of mus0"), IOP( "wmus0", BSIM2_MOD_MOBS0W, IF_REAL, "Width dependence of mus"), IOP( "musb", BSIM2_MOD_MOBSB0, IF_REAL, "VBS dependence of mus"), IOP( "lmusb", BSIM2_MOD_MOBSBL, IF_REAL, "Length dependence of musb"), IOP( "wmusb", BSIM2_MOD_MOBSBW, IF_REAL, "Width dependence of musb"), IOP( "mu20", BSIM2_MOD_MOB200, IF_REAL, "VDS dependence of mu in tanh term"), IOP( "lmu20", BSIM2_MOD_MOB20L, IF_REAL, "Length dependence of mu20"), IOP( "wmu20", BSIM2_MOD_MOB20W, IF_REAL, "Width dependence of mu20"), IOP( "mu2b", BSIM2_MOD_MOB2B0, IF_REAL, "VBS dependence of mu2"), IOP( "lmu2b", BSIM2_MOD_MOB2BL, IF_REAL, "Length dependence of mu2b"), IOP( "wmu2b", BSIM2_MOD_MOB2BW, IF_REAL, "Width dependence of mu2b"), IOP( "mu2g", BSIM2_MOD_MOB2G0, IF_REAL, "VGS dependence of mu2"), IOP( "lmu2g", BSIM2_MOD_MOB2GL, IF_REAL, "Length dependence of mu2g"), IOP( "wmu2g", BSIM2_MOD_MOB2GW, IF_REAL, "Width dependence of mu2g"), IOP( "mu30", BSIM2_MOD_MOB300, IF_REAL, "VDS dependence of mu in linear term"), IOP( "lmu30", BSIM2_MOD_MOB30L, IF_REAL, "Length dependence of mu30"), IOP( "wmu30", BSIM2_MOD_MOB30W, IF_REAL, "Width dependence of mu30"), IOP( "mu3b", BSIM2_MOD_MOB3B0, IF_REAL, "VBS dependence of mu3"), IOP( "lmu3b", BSIM2_MOD_MOB3BL, IF_REAL, "Length dependence of mu3b"), IOP( "wmu3b", BSIM2_MOD_MOB3BW, IF_REAL, "Width dependence of mu3b"), IOP( "mu3g", BSIM2_MOD_MOB3G0, IF_REAL, "VGS dependence of mu3"), IOP( "lmu3g", BSIM2_MOD_MOB3GL, IF_REAL, "Length dependence of mu3g"), IOP( "wmu3g", BSIM2_MOD_MOB3GW, IF_REAL, "Width dependence of mu3g"), IOP( "mu40", BSIM2_MOD_MOB400, IF_REAL, "VDS dependence of mu in linear term"), IOP( "lmu40", BSIM2_MOD_MOB40L, IF_REAL, "Length dependence of mu40"), IOP( "wmu40", BSIM2_MOD_MOB40W, IF_REAL, "Width dependence of mu40"), IOP( "mu4b", BSIM2_MOD_MOB4B0, IF_REAL, "VBS dependence of mu4"), IOP( "lmu4b", BSIM2_MOD_MOB4BL, IF_REAL, "Length dependence of mu4b"), IOP( "wmu4b", BSIM2_MOD_MOB4BW, IF_REAL, "Width dependence of mu4b"), IOP( "mu4g", BSIM2_MOD_MOB4G0, IF_REAL, "VGS dependence of mu4"), IOP( "lmu4g", BSIM2_MOD_MOB4GL, IF_REAL, "Length dependence of mu4g"), IOP( "wmu4g", BSIM2_MOD_MOB4GW, IF_REAL, "Width dependence of mu4g"), IOP( "ua0", BSIM2_MOD_UA00, IF_REAL, "Linear VGS dependence of mobility"), IOP( "lua0", BSIM2_MOD_UA0L, IF_REAL, "Length dependence of ua0"), IOP( "wua0", BSIM2_MOD_UA0W, IF_REAL, "Width dependence of ua0"), IOP( "uab", BSIM2_MOD_UAB0, IF_REAL, "VBS dependence of ua"), IOP( "luab", BSIM2_MOD_UABL, IF_REAL, "Length dependence of uab"), IOP( "wuab", BSIM2_MOD_UABW, IF_REAL, "Width dependence of uab"), IOP( "ub0", BSIM2_MOD_UB00, IF_REAL, "Quadratic VGS dependence of mobility"), IOP( "lub0", BSIM2_MOD_UB0L, IF_REAL, "Length dependence of ub0"), IOP( "wub0", BSIM2_MOD_UB0W, IF_REAL, "Width dependence of ub0"), IOP( "ubb", BSIM2_MOD_UBB0, IF_REAL, "VBS dependence of ub"), IOP( "lubb", BSIM2_MOD_UBBL, IF_REAL, "Length dependence of ubb"), IOP( "wubb", BSIM2_MOD_UBBW, IF_REAL, "Width dependence of ubb"), IOP( "u10", BSIM2_MOD_U100, IF_REAL, "VDS depence of mobility"), IOP( "lu10", BSIM2_MOD_U10L, IF_REAL, "Length dependence of u10"), IOP( "wu10", BSIM2_MOD_U10W, IF_REAL, "Width dependence of u10"), IOP( "u1b", BSIM2_MOD_U1B0, IF_REAL, "VBS depence of u1"), IOP( "lu1b", BSIM2_MOD_U1BL, IF_REAL, "Length depence of u1b"), IOP( "wu1b", BSIM2_MOD_U1BW, IF_REAL, "Width depence of u1b"), IOP( "u1d", BSIM2_MOD_U1D0, IF_REAL, "VDS depence of u1"), IOP( "lu1d", BSIM2_MOD_U1DL, IF_REAL, "Length depence of u1d"), IOP( "wu1d", BSIM2_MOD_U1DW, IF_REAL, "Width depence of u1d"), IOP( "n0", BSIM2_MOD_N00, IF_REAL, "Subthreshold slope at VDS=0 VBS=0"), IOP( "ln0", BSIM2_MOD_N0L, IF_REAL, "Length dependence of n0"), IOP( "wn0", BSIM2_MOD_N0W, IF_REAL, "Width dependence of n0"), IOP( "nb", BSIM2_MOD_NB0, IF_REAL, "VBS dependence of n"), IOP( "lnb", BSIM2_MOD_NBL, IF_REAL, "Length dependence of nb"), IOP( "wnb", BSIM2_MOD_NBW, IF_REAL, "Width dependence of nb"), IOP( "nd", BSIM2_MOD_ND0, IF_REAL, "VDS dependence of n"), IOP( "lnd", BSIM2_MOD_NDL, IF_REAL, "Length dependence of nd"), IOP( "wnd", BSIM2_MOD_NDW, IF_REAL, "Width dependence of nd"), IOP( "vof0", BSIM2_MOD_VOF00, IF_REAL, "Threshold voltage offset AT VDS=0 VBS=0"), IOP( "lvof0", BSIM2_MOD_VOF0L, IF_REAL, "Length dependence of vof0"), IOP( "wvof0", BSIM2_MOD_VOF0W, IF_REAL, "Width dependence of vof0"), IOP( "vofb", BSIM2_MOD_VOFB0, IF_REAL, "VBS dependence of vof"), IOP( "lvofb", BSIM2_MOD_VOFBL, IF_REAL, "Length dependence of vofb"), IOP( "wvofb", BSIM2_MOD_VOFBW, IF_REAL, "Width dependence of vofb"), IOP( "vofd", BSIM2_MOD_VOFD0, IF_REAL, "VDS dependence of vof"), IOP( "lvofd", BSIM2_MOD_VOFDL, IF_REAL, "Length dependence of vofd"), IOP( "wvofd", BSIM2_MOD_VOFDW, IF_REAL, "Width dependence of vofd"), IOP( "ai0", BSIM2_MOD_AI00, IF_REAL, "Pre-factor of hot-electron effect."), IOP( "lai0", BSIM2_MOD_AI0L, IF_REAL, "Length dependence of ai0"), IOP( "wai0", BSIM2_MOD_AI0W, IF_REAL, "Width dependence of ai0"), IOP( "aib", BSIM2_MOD_AIB0, IF_REAL, "VBS dependence of ai"), IOP( "laib", BSIM2_MOD_AIBL, IF_REAL, "Length dependence of aib"), IOP( "waib", BSIM2_MOD_AIBW, IF_REAL, "Width dependence of aib"), IOP( "bi0", BSIM2_MOD_BI00, IF_REAL, "Exponential factor of hot-electron effect."), IOP( "lbi0", BSIM2_MOD_BI0L, IF_REAL, "Length dependence of bi0"), IOP( "wbi0", BSIM2_MOD_BI0W, IF_REAL, "Width dependence of bi0"), IOP( "bib", BSIM2_MOD_BIB0, IF_REAL, "VBS dependence of bi"), IOP( "lbib", BSIM2_MOD_BIBL, IF_REAL, "Length dependence of bib"), IOP( "wbib", BSIM2_MOD_BIBW, IF_REAL, "Width dependence of bib"), IOP( "vghigh", BSIM2_MOD_VGHIGH0, IF_REAL, "Upper bound of the cubic spline function."), IOP( "lvghigh", BSIM2_MOD_VGHIGHL, IF_REAL, "Length dependence of vghigh"), IOP( "wvghigh", BSIM2_MOD_VGHIGHW, IF_REAL, "Width dependence of vghigh"), IOP( "vglow", BSIM2_MOD_VGLOW0, IF_REAL, "Lower bound of the cubic spline function."), IOP( "lvglow", BSIM2_MOD_VGLOWL, IF_REAL, "Length dependence of vglow"), IOP( "wvglow", BSIM2_MOD_VGLOWW, IF_REAL, "Width dependence of vglow"), IOP( "tox", BSIM2_MOD_TOX, IF_REAL, "Gate oxide thickness in um"), IOP( "temp", BSIM2_MOD_TEMP, IF_REAL, "Temperature in degree Celcius"), IOP( "vdd", BSIM2_MOD_VDD, IF_REAL, "Maximum Vds "), IOP( "vgg", BSIM2_MOD_VGG, IF_REAL, "Maximum Vgs "), IOP( "vbb", BSIM2_MOD_VBB, IF_REAL, "Maximum Vbs "), IOPA( "cgso", BSIM2_MOD_CGSO, IF_REAL, "Gate source overlap capacitance per unit channel width(m)"), IOPA( "cgdo", BSIM2_MOD_CGDO, IF_REAL, "Gate drain overlap capacitance per unit channel width(m)"), IOPA( "cgbo", BSIM2_MOD_CGBO, IF_REAL, "Gate bulk overlap capacitance per unit channel length(m)"), IOP( "xpart", BSIM2_MOD_XPART, IF_REAL, "Flag for channel charge partitioning"), IOP( "rsh", BSIM2_MOD_RSH, IF_REAL, "Source drain diffusion sheet resistance in ohm per square"), IOP( "js", BSIM2_MOD_JS, IF_REAL, "Source drain junction saturation current per unit area"), IOP( "pb", BSIM2_MOD_PB, IF_REAL, "Source drain junction built in potential"), IOPA( "mj", BSIM2_MOD_MJ, IF_REAL, "Source drain bottom junction capacitance grading coefficient"), IOPA( "pbsw", BSIM2_MOD_PBSW, IF_REAL, "Source drain side junction capacitance built in potential"), IOPA( "mjsw", BSIM2_MOD_MJSW, IF_REAL, "Source drain side junction capacitance grading coefficient"), IOPA( "cj", BSIM2_MOD_CJ, IF_REAL, "Source drain bottom junction capacitance per unit area"), IOPA( "cjsw", BSIM2_MOD_CJSW, IF_REAL, "Source drain side junction capacitance per unit area"), IOP( "wdf", BSIM2_MOD_DEFWIDTH, IF_REAL, "Default width of source drain diffusion in um"), IOP( "dell", BSIM2_MOD_DELLENGTH, IF_REAL, "Length reduction of source drain diffusion"), IOP("kf", BSIM2_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", BSIM2_MOD_AF, IF_REAL ,"Flicker noise exponent"), IP( "nmos", BSIM2_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM2_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B2names[] = { "Drain", "Gate", "Source", "Bulk" }; int B2nSize = NUMELEMS(B2names); int B2pTSize = NUMELEMS(B2pTable); int B2mPTSize = NUMELEMS(B2mPTable); int B2iSize = sizeof(B2instance); int B2mSize = sizeof(B2model); ngspice-26/src/spicelib/devices/bsim2/b2set.c0000644000265600020320000004171012264261473020436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the B2 device structure with those pointers needed later * for fast matrix loading */ { B2model *model = (B2model*)inModel; B2instance *here; int error; CKTnode *tmp; /* loop through all the B2 device models */ for( ; model != NULL; model = model->B2nextModel ) { /* Default value Processing for B2 MOSFET Models */ if( ! model->B2typeGiven) { model->B2type = NMOS; /* NMOS */ } if( ! model->B2vfb0Given) { model->B2vfb0 = -1.0; } if( ! model->B2vfbLGiven) { model->B2vfbL = 0.0; } if( ! model->B2vfbWGiven) { model->B2vfbW = 0.0; } if( ! model->B2phi0Given) { model->B2phi0 = 0.75; } if( ! model->B2phiLGiven) { model->B2phiL = 0.0; } if( ! model->B2phiWGiven) { model->B2phiW = 0.0; } if( ! model->B2k10Given) { model->B2k10 = 0.8; } if( ! model->B2k1LGiven) { model->B2k1L = 0.0; } if( ! model->B2k1WGiven) { model->B2k1W = 0.0; } if( ! model->B2k20Given) { model->B2k20 = 0.0; } if( ! model->B2k2LGiven) { model->B2k2L = 0.0; } if( ! model->B2k2WGiven) { model->B2k2W = 0.0; } if( ! model->B2eta00Given) { model->B2eta00 = 0.0; } if( ! model->B2eta0LGiven) { model->B2eta0L = 0.0; } if( ! model->B2eta0WGiven) { model->B2eta0W = 0.0; } if( ! model->B2etaB0Given) { model->B2etaB0 = 0.0; } if( ! model->B2etaBLGiven) { model->B2etaBL = 0.0; } if( ! model->B2etaBWGiven) { model->B2etaBW = 0.0; } if( ! model->B2deltaLGiven) { model->B2deltaL = 0.0; } if( ! model->B2deltaWGiven) { model->B2deltaW = 0.0; } if( ! model->B2ua00Given) { model->B2ua00 = 0.2; } if( ! model->B2ua0LGiven) { model->B2ua0L = 0.0; } if( ! model->B2ua0WGiven) { model->B2ua0W = 0.0; } if( ! model->B2uaB0Given) { model->B2uaB0 = 0.0; } if( ! model->B2uaBLGiven) { model->B2uaBL = 0.0; } if( ! model->B2uaBWGiven) { model->B2uaBW = 0.0; } if( ! model->B2ub00Given) { model->B2ub00 = 0.0; } if( ! model->B2ub0LGiven) { model->B2ub0L = 0.0; } if( ! model->B2ub0WGiven) { model->B2ub0W = 0.0; } if( ! model->B2ubB0Given) { model->B2ubB0 = 0.0; } if( ! model->B2ubBLGiven) { model->B2ubBL = 0.0; } if( ! model->B2ubBWGiven) { model->B2ubBW = 0.0; } if( ! model->B2u100Given) { model->B2u100 = 0.1; } if( ! model->B2u10LGiven) { model->B2u10L = 0.0; } if( ! model->B2u10WGiven) { model->B2u10W = 0.0; } if( ! model->B2u1B0Given) { model->B2u1B0 = 0.0; } if( ! model->B2u1BLGiven) { model->B2u1BL = 0.0; } if( ! model->B2u1BWGiven) { model->B2u1BW = 0.0; } if( ! model->B2u1D0Given) { model->B2u1D0 = 0.0; } if( ! model->B2u1DLGiven) { model->B2u1DL = 0.0; } if( ! model->B2u1DWGiven) { model->B2u1DW = 0.0; } if( ! model->B2mob00Given) { model->B2mob00 = 400.0; } if( ! model->B2mob0B0Given) { model->B2mob0B0 = 0.0; } if( ! model->B2mob0BLGiven) { model->B2mob0BL = 0.0; } if( ! model->B2mob0BWGiven) { model->B2mob0BW = 0.0; } if( ! model->B2mobs00Given) { model->B2mobs00 = 500.0; } if( ! model->B2mobs0LGiven) { model->B2mobs0L = 0.0; } if( ! model->B2mobs0WGiven) { model->B2mobs0W = 0.0; } if( ! model->B2mobsB0Given) { model->B2mobsB0 = 0.0; } if( ! model->B2mobsBLGiven) { model->B2mobsBL = 0.0; } if( ! model->B2mobsBWGiven) { model->B2mobsBW = 0.0; } if( ! model->B2mob200Given) { model->B2mob200 = 1.5; } if( ! model->B2mob20LGiven) { model->B2mob20L = 0.0; } if( ! model->B2mob20WGiven) { model->B2mob20W = 0.0; } if( ! model->B2mob2B0Given) { model->B2mob2B0 = 0.0; } if( ! model->B2mob2BLGiven) { model->B2mob2BL = 0.0; } if( ! model->B2mob2BWGiven) { model->B2mob2BW = 0.0; } if( ! model->B2mob2G0Given) { model->B2mob2G0 = 0.0; } if( ! model->B2mob2GLGiven) { model->B2mob2GL = 0.0; } if( ! model->B2mob2GWGiven) { model->B2mob2GW = 0.0; } if( ! model->B2mob300Given) { model->B2mob300 = 10; } if( ! model->B2mob30LGiven) { model->B2mob30L = 0.0; } if( ! model->B2mob30WGiven) { model->B2mob30W = 0.0; } if( ! model->B2mob3B0Given) { model->B2mob3B0 = 0.0; } if( ! model->B2mob3BLGiven) { model->B2mob3BL = 0.0; } if( ! model->B2mob3BWGiven) { model->B2mob3BW = 0.0; } if( ! model->B2mob3G0Given) { model->B2mob3G0 = 0.0; } if( ! model->B2mob3GLGiven) { model->B2mob3GL = 0.0; } if( ! model->B2mob3GWGiven) { model->B2mob3GW = 0.0; } if( ! model->B2mob400Given) { model->B2mob400 = 0.0; } if( ! model->B2mob40LGiven) { model->B2mob40L = 0.0; } if( ! model->B2mob40WGiven) { model->B2mob40W = 0.0; } if( ! model->B2mob4B0Given) { model->B2mob4B0 = 0.0; } if( ! model->B2mob4BLGiven) { model->B2mob4BL = 0.0; } if( ! model->B2mob4BWGiven) { model->B2mob4BW = 0.0; } if( ! model->B2mob4G0Given) { model->B2mob4G0 = 0.0; } if( ! model->B2mob4GLGiven) { model->B2mob4GL = 0.0; } if( ! model->B2mob4GWGiven) { model->B2mob4GW = 0.0; } if( ! model->B2n00Given) { model->B2n00 = 1.4; } if( ! model->B2n0LGiven) { model->B2n0L = 0.0; } if( ! model->B2n0WGiven) { model->B2n0W = 0.0; } if( ! model->B2nB0Given) { model->B2nB0 = 0.5; } if( ! model->B2nBLGiven) { model->B2nBL = 0.0; } if( ! model->B2nBWGiven) { model->B2nBW = 0.0; } if( ! model->B2nD0Given) { model->B2nD0 = 0.0; } if( ! model->B2nDLGiven) { model->B2nDL = 0.0; } if( ! model->B2nDWGiven) { model->B2nDW = 0.0; } if( ! model->B2vof00Given) { model->B2vof00 = 1.8; } if( ! model->B2vof0LGiven) { model->B2vof0L = 0.0; } if( ! model->B2vof0WGiven) { model->B2vof0W = 0.0; } if( ! model->B2vofB0Given) { model->B2vofB0 = 0.0; } if( ! model->B2vofBLGiven) { model->B2vofBL = 0.0; } if( ! model->B2vofBWGiven) { model->B2vofBW = 0.0; } if( ! model->B2vofD0Given) { model->B2vofD0 = 0.0; } if( ! model->B2vofDLGiven) { model->B2vofDL = 0.0; } if( ! model->B2vofDWGiven) { model->B2vofDW = 0.0; } if( ! model->B2ai00Given) { model->B2ai00 = 0.0; } if( ! model->B2ai0LGiven) { model->B2ai0L = 0.0; } if( ! model->B2ai0WGiven) { model->B2ai0W = 0.0; } if( ! model->B2aiB0Given) { model->B2aiB0 = 0.0; } if( ! model->B2aiBLGiven) { model->B2aiBL = 0.0; } if( ! model->B2aiBWGiven) { model->B2aiBW = 0.0; } if( ! model->B2bi00Given) { model->B2bi00 = 0.0; } if( ! model->B2bi0LGiven) { model->B2bi0L = 0.0; } if( ! model->B2bi0WGiven) { model->B2bi0W = 0.0; } if( ! model->B2biB0Given) { model->B2biB0 = 0.0; } if( ! model->B2biBLGiven) { model->B2biBL = 0.0; } if( ! model->B2biBWGiven) { model->B2biBW = 0.0; } if( ! model->B2vghigh0Given) { model->B2vghigh0 = 0.2; } if( ! model->B2vghighLGiven) { model->B2vghighL = 0.0; } if( ! model->B2vghighWGiven) { model->B2vghighW = 0.0; } if( ! model->B2vglow0Given) { model->B2vglow0 = -0.15; } if( ! model->B2vglowLGiven) { model->B2vglowL = 0.0; } if( ! model->B2vglowWGiven) { model->B2vglowW = 0.0; } if( ! model->B2toxGiven) { model->B2tox = 0.03; /* um */ } if( ! model->B2tempGiven) { model->B2temp = 27.0; } if( ! model->B2vddGiven) { model->B2vdd = 5.0; } if( ! model->B2vggGiven) { model->B2vgg = 5.0; } if( ! model->B2vbbGiven) { model->B2vbb = 5.0; } if( ! model->B2gateDrainOverlapCapGiven) { model->B2gateDrainOverlapCap = 0.0; } if( ! model->B2gateSourceOverlapCapGiven) { model->B2gateSourceOverlapCap = 0.0; } if( ! model->B2gateBulkOverlapCapGiven) { model->B2gateBulkOverlapCap = 0.0; } if( ! model->B2channelChargePartitionFlagGiven) { model->B2channelChargePartitionFlag = 0; } if( ! model->B2sheetResistanceGiven) { model->B2sheetResistance = 0.0; } if( ! model->B2unitAreaJctCapGiven) { model->B2unitAreaJctCap = 0.0; } if( ! model->B2unitLengthSidewallJctCapGiven) { model->B2unitLengthSidewallJctCap = 0.0; } if( ! model->B2jctSatCurDensityGiven) { model->B2jctSatCurDensity = 0.0; } if( ! model->B2bulkJctPotentialGiven) { model->B2bulkJctPotential = 0.0; } if( ! model->B2sidewallJctPotentialGiven) { model->B2sidewallJctPotential = 0.0; } if( ! model->B2bulkJctBotGradingCoeffGiven) { model->B2bulkJctBotGradingCoeff = 0.0; } if( ! model->B2bulkJctSideGradingCoeffGiven) { model->B2bulkJctSideGradingCoeff = 0.0; } if( ! model->B2defaultWidthGiven) { model->B2defaultWidth = 10.0; } if( ! model->B2deltaLengthGiven) { model->B2deltaLength = 0.0; } /* loop through all the instances of the model */ for (here = model->B2instances; here != NULL ; here=here->B2nextInstance) { /* allocate a chunk of the state vector */ here->B2states = *states; *states += B2numStates; /* perform the parameter defaulting */ if(!here->B2drainAreaGiven) { here->B2drainArea = 0; } if(!here->B2drainPerimeterGiven) { here->B2drainPerimeter = 0; } if(!here->B2drainSquaresGiven) { here->B2drainSquares = 1; } if(!here->B2icVBSGiven) { here->B2icVBS = 0; } if(!here->B2icVDSGiven) { here->B2icVDS = 0; } if(!here->B2icVGSGiven) { here->B2icVGS = 0; } if(!here->B2lGiven) { here->B2l = 5e-6; } if(!here->B2sourceAreaGiven) { here->B2sourceArea = 0; } if(!here->B2sourcePerimeterGiven) { here->B2sourcePerimeter = 0; } if(!here->B2sourceSquaresGiven) { here->B2sourceSquares = 1; } if(!here->B2vdsatGiven) { here->B2vdsat = 0; } if(!here->B2vonGiven) { here->B2von = 0; } if(!here->B2wGiven) { here->B2w = 5e-6; } if(!here->B2mGiven) { here->B2m = 1.0; } /* process drain series resistance */ if( (model->B2sheetResistance != 0) && (here->B2drainSquares != 0.0 ) ) { if (here->B2dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->B2name,"drain"); if(error) return(error); here->B2dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->B2dNodePrime = here->B2dNode; } /* process source series resistance */ if( (model->B2sheetResistance != 0) && (here->B2sourceSquares != 0.0 ) ) { if(here->B2sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->B2name,"source"); if(error) return(error); here->B2sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->B2sNodePrime = here->B2sNode; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(B2DdPtr, B2dNode, B2dNode); TSTALLOC(B2GgPtr, B2gNode, B2gNode); TSTALLOC(B2SsPtr, B2sNode, B2sNode); TSTALLOC(B2BbPtr, B2bNode, B2bNode); TSTALLOC(B2DPdpPtr, B2dNodePrime, B2dNodePrime); TSTALLOC(B2SPspPtr, B2sNodePrime, B2sNodePrime); TSTALLOC(B2DdpPtr, B2dNode, B2dNodePrime); TSTALLOC(B2GbPtr, B2gNode, B2bNode); TSTALLOC(B2GdpPtr, B2gNode, B2dNodePrime); TSTALLOC(B2GspPtr, B2gNode, B2sNodePrime); TSTALLOC(B2SspPtr, B2sNode, B2sNodePrime); TSTALLOC(B2BdpPtr, B2bNode, B2dNodePrime); TSTALLOC(B2BspPtr, B2bNode, B2sNodePrime); TSTALLOC(B2DPspPtr, B2dNodePrime, B2sNodePrime); TSTALLOC(B2DPdPtr, B2dNodePrime, B2dNode); TSTALLOC(B2BgPtr, B2bNode, B2gNode); TSTALLOC(B2DPgPtr, B2dNodePrime, B2gNode); TSTALLOC(B2SPgPtr, B2sNodePrime, B2gNode); TSTALLOC(B2SPsPtr, B2sNodePrime, B2sNode); TSTALLOC(B2DPbPtr, B2dNodePrime, B2bNode); TSTALLOC(B2SPbPtr, B2sNodePrime, B2bNode); TSTALLOC(B2SPdpPtr, B2sNodePrime, B2dNodePrime); } } return(OK); } int B2unsetup( GENmodel *inModel, CKTcircuit *ckt) { B2model *model; B2instance *here; for (model = (B2model *)inModel; model != NULL; model = model->B2nextModel) { for (here = model->B2instances; here != NULL; here=here->B2nextInstance) { if (here->B2dNodePrime && here->B2dNodePrime != here->B2dNode) { CKTdltNNum(ckt, here->B2dNodePrime); here->B2dNodePrime = 0; } if (here->B2sNodePrime && here->B2sNodePrime != here->B2sNode) { CKTdltNNum(ckt, here->B2sNodePrime); here->B2sNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim2/b2mask.c0000644000265600020320000003322012264261473020573 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Hong J. Park **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int B2mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B2model *model = (B2model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM2_MOD_VFB0: value->rValue = model->B2vfb0; return(OK); case BSIM2_MOD_VFBL : value->rValue = model->B2vfbL; return(OK); case BSIM2_MOD_VFBW : value->rValue = model->B2vfbW; return(OK); case BSIM2_MOD_PHI0 : value->rValue = model->B2phi0; return(OK); case BSIM2_MOD_PHIL : value->rValue = model->B2phiL; return(OK); case BSIM2_MOD_PHIW : value->rValue = model->B2phiW; return(OK); case BSIM2_MOD_K10 : value->rValue = model->B2k10; return(OK); case BSIM2_MOD_K1L : value->rValue = model->B2k1L; return(OK); case BSIM2_MOD_K1W : value->rValue = model->B2k1W; return(OK); case BSIM2_MOD_K20 : value->rValue = model->B2k20; return(OK); case BSIM2_MOD_K2L : value->rValue = model->B2k2L; return(OK); case BSIM2_MOD_K2W : value->rValue = model->B2k2W; return(OK); case BSIM2_MOD_ETA00 : value->rValue = model->B2eta00; return(OK); case BSIM2_MOD_ETA0L : value->rValue = model->B2eta0L; return(OK); case BSIM2_MOD_ETA0W : value->rValue = model->B2eta0W; return(OK); case BSIM2_MOD_ETAB0 : value->rValue = model->B2etaB0; return(OK); case BSIM2_MOD_ETABL : value->rValue = model->B2etaBL; return(OK); case BSIM2_MOD_ETABW : value->rValue = model->B2etaBW; return(OK); case BSIM2_MOD_DELTAL : value->rValue = model->B2deltaL = value->rValue; return(OK); case BSIM2_MOD_DELTAW : value->rValue = model->B2deltaW = value->rValue; return(OK); case BSIM2_MOD_MOB00 : value->rValue = model->B2mob00; return(OK); case BSIM2_MOD_MOB0B0 : value->rValue = model->B2mob0B0; return(OK); case BSIM2_MOD_MOB0BL : value->rValue = model->B2mob0BL; return(OK); case BSIM2_MOD_MOB0BW : value->rValue = model->B2mob0BW; return(OK); case BSIM2_MOD_MOBS00 : value->rValue = model->B2mobs00; return(OK); case BSIM2_MOD_MOBS0L : value->rValue = model->B2mobs0L; return(OK); case BSIM2_MOD_MOBS0W : value->rValue = model->B2mobs0W; return(OK); case BSIM2_MOD_MOBSB0 : value->rValue = model->B2mobsB0; return(OK); case BSIM2_MOD_MOBSBL : value->rValue = model->B2mobsBL; return(OK); case BSIM2_MOD_MOBSBW : value->rValue = model->B2mobsBW; return(OK); case BSIM2_MOD_MOB200 : value->rValue = model->B2mob200; return(OK); case BSIM2_MOD_MOB20L : value->rValue = model->B2mob20L; return(OK); case BSIM2_MOD_MOB20W : value->rValue = model->B2mob20W; return(OK); case BSIM2_MOD_MOB2B0 : value->rValue = model->B2mob2B0; return(OK); case BSIM2_MOD_MOB2BL : value->rValue = model->B2mob2BL; return(OK); case BSIM2_MOD_MOB2BW : value->rValue = model->B2mob2BW; return(OK); case BSIM2_MOD_MOB2G0 : value->rValue = model->B2mob2G0; return(OK); case BSIM2_MOD_MOB2GL : value->rValue = model->B2mob2GL; return(OK); case BSIM2_MOD_MOB2GW : value->rValue = model->B2mob2GW; return(OK); case BSIM2_MOD_MOB300 : value->rValue = model->B2mob300; return(OK); case BSIM2_MOD_MOB30L : value->rValue = model->B2mob30L; return(OK); case BSIM2_MOD_MOB30W : value->rValue = model->B2mob30W; return(OK); case BSIM2_MOD_MOB3B0 : value->rValue = model->B2mob3B0; return(OK); case BSIM2_MOD_MOB3BL : value->rValue = model->B2mob3BL; return(OK); case BSIM2_MOD_MOB3BW : value->rValue = model->B2mob3BW; return(OK); case BSIM2_MOD_MOB3G0 : value->rValue = model->B2mob3G0; return(OK); case BSIM2_MOD_MOB3GL : value->rValue = model->B2mob3GL; return(OK); case BSIM2_MOD_MOB3GW : value->rValue = model->B2mob3GW; return(OK); case BSIM2_MOD_MOB400 : value->rValue = model->B2mob400; return(OK); case BSIM2_MOD_MOB40L : value->rValue = model->B2mob40L; return(OK); case BSIM2_MOD_MOB40W : value->rValue = model->B2mob40W; return(OK); case BSIM2_MOD_MOB4B0 : value->rValue = model->B2mob4B0; return(OK); case BSIM2_MOD_MOB4BL : value->rValue = model->B2mob4BL; return(OK); case BSIM2_MOD_MOB4BW : value->rValue = model->B2mob4BW; return(OK); case BSIM2_MOD_MOB4G0 : value->rValue = model->B2mob4G0; return(OK); case BSIM2_MOD_MOB4GL : value->rValue = model->B2mob4GL; return(OK); case BSIM2_MOD_MOB4GW : value->rValue = model->B2mob4GW; return(OK); case BSIM2_MOD_UA00 : value->rValue = model->B2ua00; return(OK); case BSIM2_MOD_UA0L : value->rValue = model->B2ua0L; return(OK); case BSIM2_MOD_UA0W : value->rValue = model->B2ua0W; return(OK); case BSIM2_MOD_UAB0 : value->rValue = model->B2uaB0; return(OK); case BSIM2_MOD_UABL : value->rValue = model->B2uaBL; return(OK); case BSIM2_MOD_UABW : value->rValue = model->B2uaBW; return(OK); case BSIM2_MOD_UB00 : value->rValue = model->B2ub00; return(OK); case BSIM2_MOD_UB0L : value->rValue = model->B2ub0L; return(OK); case BSIM2_MOD_UB0W : value->rValue = model->B2ub0W; return(OK); case BSIM2_MOD_UBB0 : value->rValue = model->B2ubB0; return(OK); case BSIM2_MOD_UBBL : value->rValue = model->B2ubBL; return(OK); case BSIM2_MOD_UBBW : value->rValue = model->B2ubBW; return(OK); case BSIM2_MOD_U100 : value->rValue = model->B2u100; return(OK); case BSIM2_MOD_U10L : value->rValue = model->B2u10L; return(OK); case BSIM2_MOD_U10W : value->rValue = model->B2u10W; return(OK); case BSIM2_MOD_U1B0 : value->rValue = model->B2u1B0; return(OK); case BSIM2_MOD_U1BL : value->rValue = model->B2u1BL; return(OK); case BSIM2_MOD_U1BW : value->rValue = model->B2u1BW; return(OK); case BSIM2_MOD_U1D0 : value->rValue = model->B2u1D0; return(OK); case BSIM2_MOD_U1DL : value->rValue = model->B2u1DL; return(OK); case BSIM2_MOD_U1DW : value->rValue = model->B2u1DW; return(OK); case BSIM2_MOD_N00 : value->rValue = model->B2n00; return(OK); case BSIM2_MOD_N0L : value->rValue = model->B2n0L; return(OK); case BSIM2_MOD_N0W : value->rValue = model->B2n0W; return(OK); case BSIM2_MOD_NB0 : value->rValue = model->B2nB0; return(OK); case BSIM2_MOD_NBL : value->rValue = model->B2nBL; return(OK); case BSIM2_MOD_NBW : value->rValue = model->B2nBW; return(OK); case BSIM2_MOD_ND0 : value->rValue = model->B2nD0; return(OK); case BSIM2_MOD_NDL : value->rValue = model->B2nDL; return(OK); case BSIM2_MOD_NDW : value->rValue = model->B2nDW; return(OK); case BSIM2_MOD_VOF00 : value->rValue = model->B2vof00; return(OK); case BSIM2_MOD_VOF0L : value->rValue = model->B2vof0L; return(OK); case BSIM2_MOD_VOF0W : value->rValue = model->B2vof0W; return(OK); case BSIM2_MOD_VOFB0 : value->rValue = model->B2vofB0; return(OK); case BSIM2_MOD_VOFBL : value->rValue = model->B2vofBL; return(OK); case BSIM2_MOD_VOFBW : value->rValue = model->B2vofBW; return(OK); case BSIM2_MOD_VOFD0 : value->rValue = model->B2vofD0; return(OK); case BSIM2_MOD_VOFDL : value->rValue = model->B2vofDL; return(OK); case BSIM2_MOD_VOFDW : value->rValue = model->B2vofDW; return(OK); case BSIM2_MOD_AI00 : value->rValue = model->B2ai00; return(OK); case BSIM2_MOD_AI0L : value->rValue = model->B2ai0L; return(OK); case BSIM2_MOD_AI0W : value->rValue = model->B2ai0W; return(OK); case BSIM2_MOD_AIB0 : value->rValue = model->B2aiB0; return(OK); case BSIM2_MOD_AIBL : value->rValue = model->B2aiBL; return(OK); case BSIM2_MOD_AIBW : value->rValue = model->B2aiBW; return(OK); case BSIM2_MOD_BI00 : value->rValue = model->B2bi00; return(OK); case BSIM2_MOD_BI0L : value->rValue = model->B2bi0L; return(OK); case BSIM2_MOD_BI0W : value->rValue = model->B2bi0W; return(OK); case BSIM2_MOD_BIB0 : value->rValue = model->B2biB0; return(OK); case BSIM2_MOD_BIBL : value->rValue = model->B2biBL; return(OK); case BSIM2_MOD_BIBW : value->rValue = model->B2biBW; return(OK); case BSIM2_MOD_VGHIGH0 : value->rValue = model->B2vghigh0; return(OK); case BSIM2_MOD_VGHIGHL : value->rValue = model->B2vghighL; return(OK); case BSIM2_MOD_VGHIGHW : value->rValue = model->B2vghighW; return(OK); case BSIM2_MOD_VGLOW0 : value->rValue = model->B2vglow0; return(OK); case BSIM2_MOD_VGLOWL : value->rValue = model->B2vglowL; return(OK); case BSIM2_MOD_VGLOWW : value->rValue = model->B2vglowW; return(OK); case BSIM2_MOD_TOX : value->rValue = model->B2tox; return(OK); case BSIM2_MOD_TEMP : value->rValue = model->B2temp; return(OK); case BSIM2_MOD_VDD : value->rValue = model->B2vdd; return(OK); case BSIM2_MOD_VGG : value->rValue = model->B2vgg; return(OK); case BSIM2_MOD_VBB : value->rValue = model->B2vbb; return(OK); case BSIM2_MOD_CGSO: value->rValue = model->B2gateSourceOverlapCap; return(OK); case BSIM2_MOD_CGDO: value->rValue = model->B2gateDrainOverlapCap; return(OK); case BSIM2_MOD_CGBO: value->rValue = model->B2gateBulkOverlapCap; return(OK); case BSIM2_MOD_XPART: value->iValue = model->B2channelChargePartitionFlag; return(OK); case BSIM2_MOD_RSH: value->rValue = model->B2sheetResistance; return(OK); case BSIM2_MOD_JS: value->rValue = model->B2jctSatCurDensity; return(OK); case BSIM2_MOD_PB: value->rValue = model->B2bulkJctPotential; return(OK); case BSIM2_MOD_MJ: value->rValue = model->B2bulkJctBotGradingCoeff; return(OK); case BSIM2_MOD_PBSW: value->rValue = model->B2sidewallJctPotential; return(OK); case BSIM2_MOD_MJSW: value->rValue = model->B2bulkJctSideGradingCoeff; return(OK); case BSIM2_MOD_CJ: value->rValue = model->B2unitAreaJctCap; return(OK); case BSIM2_MOD_CJSW: value->rValue = model->B2unitLengthSidewallJctCap; return(OK); case BSIM2_MOD_DEFWIDTH: value->rValue = model->B2defaultWidth; return(OK); case BSIM2_MOD_DELLENGTH: value->rValue = model->B2deltaLength; return(OK); case BSIM2_MOD_AF: value->rValue = model->B2fNexp; return(OK); case BSIM2_MOD_KF: value->rValue = model->B2fNcoef; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim2/bsim2init.h0000644000265600020320000000035212264261473021321 0ustar andreasadmin#ifndef _BSIM2INIT_H #define _BSIM2INIT_H extern IFparm B2pTable[ ]; extern IFparm B2mPTable[ ]; extern char *B2names[ ]; extern int B2pTSize; extern int B2mPTSize; extern int B2nSize; extern int B2iSize; extern int B2mSize; #endif ngspice-26/src/spicelib/devices/bsim2/b2trunc.c0000644000265600020320000000210112264261473020765 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { B2model *model = (B2model*)inModel; B2instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for( ; model != NULL; model = model->B2nextModel) { for(here=model->B2instances;here!=NULL;here = here->B2nextInstance){ #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B2qb,ckt,timeStep); CKTterr(here->B2qg,ckt,timeStep); CKTterr(here->B2qd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B2name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/Makefile.am0000644000265600020320000000102612264261473021303 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim2.la libbsim2_la_SOURCES = \ b2.c \ b2acld.c \ b2ask.c \ b2cvtest.c \ b2del.c \ b2dest.c \ b2eval.c \ b2getic.c \ b2ld.c \ b2mask.c \ b2mdel.c \ b2moscap.c \ b2mpar.c \ b2noi.c \ b2par.c \ b2pzld.c \ b2set.c \ b2temp.c \ b2trunc.c \ bsim2def.h \ bsim2ext.h \ bsim2init.c \ bsim2init.h \ bsim2itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/bsim2/b2mdel.c0000644000265600020320000000175112264261473020565 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { B2model **model = (B2model**)inModel; B2model *modfast = (B2model*)kill; B2instance *here; B2instance *prev = NULL; B2model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->B2nextModel)) { if( (*model)->B2modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B2nextModel; /* cut deleted device out of list */ for(here = (*model)->B2instances ; here ; here = here->B2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim2/Makefile.in0000644000265600020320000004326012264261535021321 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim2_la_LIBADD = am_libbsim2_la_OBJECTS = b2.lo b2acld.lo b2ask.lo b2cvtest.lo b2del.lo \ b2dest.lo b2eval.lo b2getic.lo b2ld.lo b2mask.lo b2mdel.lo \ b2moscap.lo b2mpar.lo b2noi.lo b2par.lo b2pzld.lo b2set.lo \ b2temp.lo b2trunc.lo bsim2init.lo libbsim2_la_OBJECTS = $(am_libbsim2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim2_la_SOURCES) DIST_SOURCES = $(libbsim2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim2.la libbsim2_la_SOURCES = \ b2.c \ b2acld.c \ b2ask.c \ b2cvtest.c \ b2del.c \ b2dest.c \ b2eval.c \ b2getic.c \ b2ld.c \ b2mask.c \ b2mdel.c \ b2moscap.c \ b2mpar.c \ b2noi.c \ b2par.c \ b2pzld.c \ b2set.c \ b2temp.c \ b2trunc.c \ bsim2def.h \ bsim2ext.h \ bsim2init.c \ bsim2init.h \ bsim2itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim2.la: $(libbsim2_la_OBJECTS) $(libbsim2_la_DEPENDENCIES) $(EXTRA_libbsim2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim2_la_OBJECTS) $(libbsim2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2eval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2moscap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b2trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim2init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim2/b2pzld.c0000644000265600020320000001365012264261473020616 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim2def.h" #include "ngspice/suffix.h" int B2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { B2model *model = (B2model*)inModel; B2instance *here; int xnrm; int xrev; double gdpr; double gspr; double gm; double gds; double gmbs; double gbd; double gbs; double capbd; double capbs; double xcggb; double xcgdb; double xcgsb; double xcbgb; double xcbdb; double xcbsb; double xcddb; double xcssb; double xcdgb; double xcsgb; double xcdsb; double xcsdb; double cggb; double cgdb; double cgsb; double cbgb; double cbdb; double cbsb; double cddb; double cdgb; double cdsb; double m; for( ; model != NULL; model = model->B2nextModel) { for(here = model->B2instances; here!= NULL; here = here->B2nextInstance) { if (here->B2mode >= 0) { xnrm=1; xrev=0; } else { xnrm=0; xrev=1; } gdpr=here->B2drainConductance; gspr=here->B2sourceConductance; gm= *(ckt->CKTstate0 + here->B2gm); gds= *(ckt->CKTstate0 + here->B2gds); gmbs= *(ckt->CKTstate0 + here->B2gmbs); gbd= *(ckt->CKTstate0 + here->B2gbd); gbs= *(ckt->CKTstate0 + here->B2gbs); capbd= *(ckt->CKTstate0 + here->B2capbd); capbs= *(ckt->CKTstate0 + here->B2capbs); /* * charge oriented model parameters */ cggb = *(ckt->CKTstate0 + here->B2cggb); cgsb = *(ckt->CKTstate0 + here->B2cgsb); cgdb = *(ckt->CKTstate0 + here->B2cgdb); cbgb = *(ckt->CKTstate0 + here->B2cbgb); cbsb = *(ckt->CKTstate0 + here->B2cbsb); cbdb = *(ckt->CKTstate0 + here->B2cbdb); cdgb = *(ckt->CKTstate0 + here->B2cdgb); cdsb = *(ckt->CKTstate0 + here->B2cdsb); cddb = *(ckt->CKTstate0 + here->B2cddb); xcdgb = (cdgb - here->pParam->B2GDoverlapCap) ; xcddb = (cddb + capbd + here->pParam->B2GDoverlapCap) ; xcdsb = cdsb ; xcsgb = -(cggb + cbgb + cdgb + here->pParam->B2GSoverlapCap ) ; xcsdb = -(cgdb + cbdb + cddb) ; xcssb = (capbs + here->pParam->B2GSoverlapCap - (cgsb+cbsb+cdsb)) ; xcggb = (cggb + here->pParam->B2GDoverlapCap + here->pParam->B2GSoverlapCap + here->pParam->B2GBoverlapCap) ; xcgdb = (cgdb - here->pParam->B2GDoverlapCap ) ; xcgsb = (cgsb - here->pParam->B2GSoverlapCap) ; xcbgb = (cbgb - here->pParam->B2GBoverlapCap) ; xcbdb = (cbdb - capbd ) ; xcbsb = (cbsb - capbs ) ; m = here->B2m; *(here->B2GgPtr ) += m * (xcggb * s->real); *(here->B2GgPtr +1) += m * (xcggb * s->imag); *(here->B2BbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->B2BbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->B2DPdpPtr ) += m * (xcddb * s->real); *(here->B2DPdpPtr +1) += m * (xcddb * s->imag); *(here->B2SPspPtr ) += m * (xcssb * s->real); *(here->B2SPspPtr +1) += m * (xcssb * s->imag); *(here->B2GbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->B2GbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->B2GdpPtr ) += m * (xcgdb * s->real); *(here->B2GdpPtr +1) += m * (xcgdb * s->imag); *(here->B2GspPtr ) += m * (xcgsb * s->real); *(here->B2GspPtr +1) += m * (xcgsb * s->imag); *(here->B2BgPtr ) += m * (xcbgb * s->real); *(here->B2BgPtr +1) += m * (xcbgb * s->imag); *(here->B2BdpPtr ) += m * (xcbdb * s->real); *(here->B2BdpPtr +1) += m * (xcbdb * s->imag); *(here->B2BspPtr ) += m * (xcbsb * s->real); *(here->B2BspPtr +1) += m * (xcbsb * s->imag); *(here->B2DPgPtr ) += m * (xcdgb * s->real); *(here->B2DPgPtr +1) += m * (xcdgb * s->imag); *(here->B2DPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->B2DPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->B2DPspPtr ) += m * (xcdsb * s->real); *(here->B2DPspPtr +1) += m * (xcdsb * s->imag); *(here->B2SPgPtr ) += m * (xcsgb * s->real); *(here->B2SPgPtr +1) += m * (xcsgb * s->imag); *(here->B2SPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->B2SPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->B2SPdpPtr ) += m * (xcsdb * s->real); *(here->B2SPdpPtr +1) += m * (xcsdb * s->imag); *(here->B2DdPtr) += m * (gdpr); *(here->B2SsPtr) += m * (gspr); *(here->B2BbPtr) += m * (gbd+gbs); *(here->B2DPdpPtr) += m * (gdpr+gds+gbd+xrev*(gm+gmbs)); *(here->B2SPspPtr) += m * (gspr+gds+gbs+xnrm*(gm+gmbs)); *(here->B2DdpPtr) -= m * (gdpr); *(here->B2SspPtr) -= m * (gspr); *(here->B2BdpPtr) -= m * (gbd); *(here->B2BspPtr) -= m * (gbs); *(here->B2DPdPtr) -= m * (gdpr); *(here->B2DPgPtr) += m * ((xnrm-xrev)*gm); *(here->B2DPbPtr) += m * (-gbd+(xnrm-xrev)*gmbs); *(here->B2DPspPtr) += m * (-gds-xnrm*(gm+gmbs)); *(here->B2SPgPtr) += m * (-(xnrm-xrev)*gm); *(here->B2SPsPtr) -= m * (gspr); *(here->B2SPbPtr) += m * (-gbs-(xnrm-xrev)*gmbs); *(here->B2SPdpPtr) += m * (-gds-xrev*(gm+gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2par.c0000644000265600020320000000532012264261473020422 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int B2param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { B2instance *here = (B2instance*)inst; NG_IGNORE(select); switch(param) { case BSIM2_W: here->B2w = value->rValue; here->B2wGiven = TRUE; break; case BSIM2_L: here->B2l = value->rValue; here->B2lGiven = TRUE; break; case BSIM2_M: here->B2m = value->rValue; here->B2mGiven = TRUE; break; case BSIM2_AS: here->B2sourceArea = value->rValue; here->B2sourceAreaGiven = TRUE; break; case BSIM2_AD: here->B2drainArea = value->rValue; here->B2drainAreaGiven = TRUE; break; case BSIM2_PS: here->B2sourcePerimeter = value->rValue; here->B2sourcePerimeterGiven = TRUE; break; case BSIM2_PD: here->B2drainPerimeter = value->rValue; here->B2drainPerimeterGiven = TRUE; break; case BSIM2_NRS: here->B2sourceSquares = value->rValue; here->B2sourceSquaresGiven = TRUE; break; case BSIM2_NRD: here->B2drainSquares = value->rValue; here->B2drainSquaresGiven = TRUE; break; case BSIM2_OFF: here->B2off = value->iValue; break; case BSIM2_IC_VBS: here->B2icVBS = value->rValue; here->B2icVBSGiven = TRUE; break; case BSIM2_IC_VDS: here->B2icVDS = value->rValue; here->B2icVDSGiven = TRUE; break; case BSIM2_IC_VGS: here->B2icVGS = value->rValue; here->B2icVGSGiven = TRUE; break; case BSIM2_IC: switch(value->v.numValue){ case 3: here->B2icVBS = *(value->v.vec.rVec+2); here->B2icVBSGiven = TRUE; case 2: here->B2icVGS = *(value->v.vec.rVec+1); here->B2icVGSGiven = TRUE; case 1: here->B2icVDS = *(value->v.vec.rVec); here->B2icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim2/b2moscap.c0000644000265600020320000000432312264261473021124 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/suffix.h" /* routine to calculate equivalent conductance and total terminal * charges */ void B2mosCap( CKTcircuit *ckt, double vgd, double vgs, double vgb, double args[8], /* double GateDrainOverlapCap, double GateSourceOverlapCap, double GateBulkOverlapCap, double capbd, double capbs, double cggb, double cgdb, double cgsb, */ double cbgb, double cbdb, double cbsb, double cdgb, double cddb, double cdsb, double *gcggbPointer, double *gcgdbPointer, double *gcgsbPointer, double *gcbgbPointer, double *gcbdbPointer, double *gcbsbPointer, double *gcdgbPointer, double *gcddbPointer, double *gcdsbPointer, double *gcsgbPointer, double *gcsdbPointer, double *gcssbPointer, double *qGatePointer, double *qBulkPointer, double *qDrainPointer, double *qSourcePointer) { double qgd; double qgs; double qgb; double ag0; ag0 = ckt->CKTag[0]; /* compute equivalent conductance */ *gcdgbPointer = (cdgb - args[0]) * ag0; *gcddbPointer = (cddb + args[3] + args[0]) * ag0; *gcdsbPointer = cdsb * ag0; *gcsgbPointer = -(args[5] + cbgb + cdgb + args[1]) * ag0; *gcsdbPointer = -(args[6] + cbdb + cddb ) * ag0; *gcssbPointer = (args[4] + args[1] - (args[7] + cbsb + cdsb )) * ag0; *gcggbPointer = (args[5] + args[0] + args[1] + args[2] ) * ag0; *gcgdbPointer = (args[6] - args[0]) * ag0; *gcgsbPointer = (args[7] - args[1]) * ag0; *gcbgbPointer = (cbgb - args[2]) * ag0; *gcbdbPointer = (cbdb - args[3]) * ag0; *gcbsbPointer = (cbsb - args[4]) * ag0; /* compute total terminal charge */ qgd = args[0] * vgd; qgs = args[1] * vgs; qgb = args[2] * vgb; *qGatePointer = *qGatePointer + qgd + qgs + qgb; *qBulkPointer = *qBulkPointer - qgb; *qDrainPointer = *qDrainPointer - qgd; *qSourcePointer = -(*qGatePointer + *qBulkPointer + *qDrainPointer); } ngspice-26/src/spicelib/devices/bsim2/b2eval.c0000644000265600020320000005275412264261473020604 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Min-Chie Jeng, Hong J. Park, Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim2def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/suffix.h" /* This routine evaluates the drain current, its derivatives and the * charges associated with the gate,bulk and drain terminal * using the B2 (Berkeley Short-Channel IGFET Model) Equations. */ void B2evaluate(double Vds, double Vbs, double Vgs, B2instance *here, B2model *model, double *gm, double *gds, double *gmb, double *qg, double *qb, double *qd, double *cgg,double *cgd,double *cgs, double *cbg, double *cbd, double *cbs, double *cdg, double *cdd, double *cds, double *Ids, double *von, double *vdsat, CKTcircuit *ckt) { double Vth, Vdsat = 0.0; double Phisb, T1s, Eta, Gg, Aa, Inv_Aa, U1, U1s, Vc, Kk, SqrtKk; double dPhisb_dVb, dT1s_dVb, dVth_dVb, dVth_dVd, dAa_dVb, dVc_dVd; double dVc_dVg, dVc_dVb, dKk_dVc; double dVdsat_dVd = 0.0, dVdsat_dVg = 0.0, dVdsat_dVb = 0.0; double dUvert_dVg, dUvert_dVd, dUvert_dVb, Inv_Kk; double dUtot_dVd, dUtot_dVb, dUtot_dVg, Ai, Bi, Vghigh, Vglow, Vgeff, Vof; double Vbseff, Vgst, Vgdt, Qbulk, Utot; double T0, T1, T2, T3, T4, T5, Arg1, Arg2, Exp0 = 0.0, Exp1 = 0.0; double tmp, tmp1, tmp2, tmp3, Uvert, Beta1, Beta2, Beta0, dGg_dVb; double T6, T7, T8, T9, n = 0.0, ExpArg, ExpArg1; double Beta, dQbulk_dVb, dVgdt_dVg, dVgdt_dVd; double dVbseff_dVb, Ua, Ub, dVgdt_dVb, dQbulk_dVd; double Con1, Con3, Con4, SqrVghigh, SqrVglow, CubVghigh, CubVglow; double delta, Coeffa, Coeffb, Coeffc, Coeffd, Inv_Uvert, Inv_Utot; double Inv_Vdsat, tanh, Sqrsech, dBeta1_dVb, dU1_dVd, dU1_dVg, dU1_dVb; double Betaeff, FR, dFR_dVd, dFR_dVg, dFR_dVb, Betas, Beta3, Beta4; double dBeta_dVd, dBeta_dVg, dBeta_dVb, dVgeff_dVg, dVgeff_dVd, dVgeff_dVb; double dCon3_dVd, dCon3_dVb, dCon4_dVd, dCon4_dVb, dCoeffa_dVd, dCoeffa_dVb; double dCoeffb_dVd, dCoeffb_dVb, dCoeffc_dVd, dCoeffc_dVb; double dCoeffd_dVd, dCoeffd_dVb; int ChargeComputationNeeded; int valuetypeflag; /* added 3/19/90 JSD */ if ((ckt->CKTmode & (MODEAC | MODETRAN)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG) ) { ChargeComputationNeeded = 1; } else { ChargeComputationNeeded = 0; } if (Vbs < model->B2vbb2) Vbs = model->B2vbb2; if (Vgs > model->B2vgg2) Vgs = model->B2vgg2; if (Vds > model->B2vdd2) Vds = model->B2vdd2; /* Threshold Voltage. */ if (Vbs <= 0.0) { Phisb = here->pParam->B2phi - Vbs; dPhisb_dVb = -1.0; T1s = sqrt(Phisb); dT1s_dVb = -0.5 / T1s; } else { tmp = here->pParam->B2phi / (here->pParam->B2phi + Vbs); Phisb = here->pParam->B2phi * tmp; dPhisb_dVb = -tmp * tmp; T1s = here->pParam->Phis3 / (here->pParam->B2phi + 0.5 * Vbs); dT1s_dVb = -0.5 * T1s * T1s / here->pParam->Phis3; } Eta = here->pParam->B2eta0 + here->pParam->B2etaB * Vbs; Ua = here->pParam->B2ua0 + here->pParam->B2uaB * Vbs; Ub = here->pParam->B2ub0 + here->pParam->B2ubB * Vbs; U1s = here->pParam->B2u10 + here->pParam->B2u1B * Vbs; Vth = here->pParam->B2vfb + here->pParam->B2phi + here->pParam->B2k1 * T1s - here->pParam->B2k2 * Phisb - Eta * Vds; dVth_dVd = -Eta; dVth_dVb = here->pParam->B2k1 * dT1s_dVb + here->pParam->B2k2 - here->pParam->B2etaB * Vds; Vgst = Vgs - Vth; tmp = 1.0 / (1.744 + 0.8364 * Phisb); Gg = 1.0 - tmp; dGg_dVb = 0.8364 * tmp * tmp * dPhisb_dVb; T0 = Gg / T1s; tmp1 = 0.5 * T0 * here->pParam->B2k1; Aa = 1.0 + tmp1; dAa_dVb = (Aa - 1.0) * (dGg_dVb / Gg - dT1s_dVb / T1s); Inv_Aa = 1.0 / Aa; Vghigh = here->pParam->B2vghigh; Vglow = here->pParam->B2vglow; if ((Vgst >= Vghigh) || (here->pParam->B2n0 == 0.0)) { Vgeff = Vgst; dVgeff_dVg = 1.0; dVgeff_dVd = -dVth_dVd; dVgeff_dVb = -dVth_dVb; } else { Vof = here->pParam->B2vof0 + here->pParam->B2vofB * Vbs + here->pParam->B2vofD * Vds; n = here->pParam->B2n0 + here->pParam->B2nB / T1s + here->pParam->B2nD * Vds; tmp = 0.5 / (n * model->B2Vtm); ExpArg1 = -Vds / model->B2Vtm; ExpArg1 = MAX(ExpArg1, -30.0); Exp1 = exp(ExpArg1); tmp1 = 1.0 - Exp1; tmp1 = MAX(tmp1, 1.0e-18); tmp2 = 2.0 * Aa * tmp1; if (Vgst <= Vglow) { ExpArg = Vgst * tmp; ExpArg = MAX(ExpArg, -30.0); Exp0 = exp(0.5 * Vof + ExpArg); Vgeff = sqrt(tmp2) * model->B2Vtm * Exp0; T0 = n * model->B2Vtm; dVgeff_dVg = Vgeff * tmp; dVgeff_dVd = dVgeff_dVg * (n / tmp1 * Exp1 - dVth_dVd - Vgst * here->pParam->B2nD / n + T0 * here->pParam->B2vofD); dVgeff_dVb = dVgeff_dVg * (here->pParam->B2vofB * T0 - dVth_dVb + here->pParam->B2nB * Vgst / (n * T1s * T1s) * dT1s_dVb + T0 * Inv_Aa * dAa_dVb); } else { ExpArg = Vglow * tmp; ExpArg = MAX(ExpArg, -30.0); Exp0 = exp(0.5 * Vof + ExpArg); Vgeff = sqrt(2.0 * Aa * (1.0 - Exp1)) * model->B2Vtm * Exp0; Con1 = Vghigh; Con3 = Vgeff; Con4 = Con3 * tmp; SqrVghigh = Vghigh * Vghigh; SqrVglow = Vglow * Vglow; CubVghigh = Vghigh * SqrVghigh; CubVglow = Vglow * SqrVglow; T0 = 2.0 * Vghigh; T1 = 2.0 * Vglow; T2 = 3.0 * SqrVghigh; T3 = 3.0 * SqrVglow; T4 = Vghigh - Vglow; T5 = SqrVghigh - SqrVglow; T6 = CubVghigh - CubVglow; T7 = Con1 - Con3; delta = (T1 - T0) * T6 + (T2 - T3) * T5 + (T0 * T3 - T1 * T2) * T4; delta = 1.0 / delta; Coeffb = (T1 - Con4 * T0) * T6 + (Con4 * T2 - T3) * T5 + (T0 * T3 - T1 * T2) * T7; Coeffc = (Con4 - 1.0) * T6 + (T2 - T3) * T7 + (T3 - Con4 * T2) * T4; Coeffd = (T1 - T0) * T7 + (1.0 - Con4) * T5 + (Con4 * T0 - T1) * T4; Coeffa = SqrVghigh * (Coeffc + Coeffd * T0); Vgeff = (Coeffa + Vgst * (Coeffb + Vgst * (Coeffc + Vgst * Coeffd))) * delta; dVgeff_dVg = (Coeffb + Vgst * (2.0 * Coeffc + 3.0 * Vgst * Coeffd)) * delta; T7 = Con3 * tmp; T8 = dT1s_dVb * here->pParam->B2nB / (T1s * T1s * n); T9 = n * model->B2Vtm; dCon3_dVd = T7 * (n * Exp1 / tmp1 - Vglow * here->pParam->B2nD / n + T9 * here->pParam->B2vofD); dCon3_dVb = T7 * (T9 * Inv_Aa * dAa_dVb + Vglow * T8 + T9 * here->pParam->B2vofB); dCon4_dVd = tmp * dCon3_dVd - T7 * here->pParam->B2nD / n; dCon4_dVb = tmp * dCon3_dVb + T7 * T8; dCoeffb_dVd = dCon4_dVd * (T2 * T5 - T0 * T6) + dCon3_dVd * (T1 * T2 - T0 * T3); dCoeffc_dVd = dCon4_dVd * (T6 - T2 * T4) + dCon3_dVd * (T3 - T2); dCoeffd_dVd = dCon4_dVd * (T0 * T4 - T5) + dCon3_dVd * (T0 - T1); dCoeffa_dVd = SqrVghigh * (dCoeffc_dVd + dCoeffd_dVd * T0); dVgeff_dVd = -dVgeff_dVg * dVth_dVd + (dCoeffa_dVd + Vgst * (dCoeffb_dVd + Vgst * (dCoeffc_dVd + Vgst * dCoeffd_dVd))) * delta; dCoeffb_dVb = dCon4_dVb * (T2 * T5 - T0 * T6) + dCon3_dVb * (T1 * T2 - T0 * T3); dCoeffc_dVb = dCon4_dVb * (T6 - T2 * T4) + dCon3_dVb * (T3 - T2); dCoeffd_dVb = dCon4_dVb * (T0 * T4 - T5) + dCon3_dVb * (T0 - T1); dCoeffa_dVb = SqrVghigh * (dCoeffc_dVb + dCoeffd_dVb * T0); dVgeff_dVb = -dVgeff_dVg * dVth_dVb + (dCoeffa_dVb + Vgst * (dCoeffb_dVb + Vgst * (dCoeffc_dVb + Vgst * dCoeffd_dVb))) * delta; } } if (Vgeff > 0.0) { Uvert = 1.0 + Vgeff * (Ua + Vgeff * Ub); Uvert = MAX(Uvert, 0.2); Inv_Uvert = 1.0 / Uvert; T8 = Ua + 2.0 * Ub * Vgeff; dUvert_dVg = T8 * dVgeff_dVg; dUvert_dVd = T8 * dVgeff_dVd; dUvert_dVb = T8 * dVgeff_dVb + Vgeff * (here->pParam->B2uaB + Vgeff * here->pParam->B2ubB); T8 = U1s * Inv_Aa * Inv_Uvert; Vc = T8 * Vgeff; T9 = Vc * Inv_Uvert; dVc_dVg = T8 * dVgeff_dVg - T9 * dUvert_dVg; dVc_dVd = T8 * dVgeff_dVd - T9 * dUvert_dVd; dVc_dVb = T8 * dVgeff_dVb + here->pParam->B2u1B * Vgeff * Inv_Aa * Inv_Uvert - Vc * Inv_Aa * dAa_dVb - T9 * dUvert_dVb; tmp2 = sqrt(1.0 + 2.0 * Vc); Kk = 0.5 * (1.0 + Vc + tmp2); Inv_Kk = 1.0 / Kk; dKk_dVc = 0.5 + 0.5 / tmp2; SqrtKk = sqrt(Kk); T8 = Inv_Aa / SqrtKk; Vdsat = Vgeff * T8; Vdsat = MAX(Vdsat, 1.0e-18); Inv_Vdsat = 1.0 / Vdsat; T9 = 0.5 * Vdsat * Inv_Kk * dKk_dVc; dVdsat_dVd = T8 * dVgeff_dVd - T9 * dVc_dVd; dVdsat_dVg = T8 * dVgeff_dVg - T9 * dVc_dVg; dVdsat_dVb = T8 * dVgeff_dVb - T9 * dVc_dVb - Vdsat* Inv_Aa * dAa_dVb; Beta0 = here->pParam->B2beta0 + here->pParam->B2beta0B * Vbs; Betas = here->pParam->B2betas0 + here->pParam->B2betasB * Vbs; Beta2 = here->pParam->B2beta20 + here->pParam->B2beta2B * Vbs + here->pParam->B2beta2G * Vgs; Beta3 = here->pParam->B2beta30 + here->pParam->B2beta3B * Vbs + here->pParam->B2beta3G * Vgs; Beta4 = here->pParam->B2beta40 + here->pParam->B2beta4B * Vbs + here->pParam->B2beta4G * Vgs; Beta1 = Betas - (Beta0 + model->B2vdd * (Beta3 - model->B2vdd * Beta4)); T0 = Vds * Beta2 * Inv_Vdsat; T0 = MIN(T0, 30.0); T1 = exp(T0); T2 = T1 * T1; T3 = T2 + 1.0; tanh = (T2 - 1.0) / T3; Sqrsech = 4.0 * T2 / (T3 * T3); Beta = Beta0 + Beta1 * tanh + Vds * (Beta3 - Beta4 * Vds); T4 = Beta1 * Sqrsech * Inv_Vdsat; T5 = model->B2vdd * tanh; dBeta_dVd = Beta3 - 2.0 * Beta4 * Vds + T4 * (Beta2 - T0 * dVdsat_dVd); dBeta_dVg = T4 * (here->pParam->B2beta2G * Vds - T0 * dVdsat_dVg) + here->pParam->B2beta3G * (Vds - T5) - here->pParam->B2beta4G * (Vds * Vds - model->B2vdd * T5); dBeta1_dVb = here->pParam->Arg; dBeta_dVb = here->pParam->B2beta0B + dBeta1_dVb * tanh + Vds * (here->pParam->B2beta3B - Vds * here->pParam->B2beta4B) + T4 * (here->pParam->B2beta2B * Vds - T0 * dVdsat_dVb); if (Vgst > Vglow) { if (Vds <= Vdsat) /* triode region */ { T3 = Vds * Inv_Vdsat; T4 = T3 - 1.0; T2 = 1.0 - here->pParam->B2u1D * T4 * T4; U1 = U1s * T2; Utot = Uvert + U1 * Vds; Utot = MAX(Utot, 0.5); Inv_Utot = 1.0 / Utot; T5 = 2.0 * U1s * here->pParam->B2u1D * Inv_Vdsat * T4; dU1_dVd = T5 * (T3 * dVdsat_dVd - 1.0); dU1_dVg = T5 * T3 * dVdsat_dVg; dU1_dVb = T5 * T3 * dVdsat_dVb + here->pParam->B2u1B * T2; dUtot_dVd = dUvert_dVd + U1 + Vds * dU1_dVd; dUtot_dVg = dUvert_dVg + Vds * dU1_dVg; dUtot_dVb = dUvert_dVb + Vds * dU1_dVb; tmp1 = (Vgeff - 0.5 * Aa * Vds); tmp3 = tmp1 * Vds; Betaeff = Beta * Inv_Utot; *Ids = Betaeff * tmp3; T6 = *Ids / Betaeff * Inv_Utot; *gds = T6 * (dBeta_dVd - Betaeff * dUtot_dVd) + Betaeff * (tmp1 + (dVgeff_dVd - 0.5 * Aa) * Vds); *gm = T6 * (dBeta_dVg - Betaeff * dUtot_dVg) + Betaeff * Vds * dVgeff_dVg; *gmb = T6 * (dBeta_dVb - Betaeff * dUtot_dVb) + Betaeff * Vds * (dVgeff_dVb - 0.5 * Vds * dAa_dVb); } else /* Saturation */ { tmp1 = Vgeff * Inv_Aa * Inv_Kk; tmp3 = 0.5 * Vgeff * tmp1; Betaeff = Beta * Inv_Uvert; *Ids = Betaeff * tmp3; T0 = *Ids / Betaeff * Inv_Uvert; T1 = Betaeff * Vgeff * Inv_Aa * Inv_Kk; T2 = *Ids * Inv_Kk * dKk_dVc; if (here->pParam->B2ai0 != 0.0) { Ai = here->pParam->B2ai0 + here->pParam->B2aiB * Vbs; Bi = here->pParam->B2bi0 + here->pParam->B2biB * Vbs; T5 = Bi / (Vds - Vdsat); T5 = MIN(T5, 30.0); T6 = exp(-T5); FR = 1.0 + Ai * T6; T7 = T5 / (Vds - Vdsat); T8 = (1.0 - FR) * T7; dFR_dVd = T8 * (dVdsat_dVd - 1.0); dFR_dVg = T8 * dVdsat_dVg; dFR_dVb = T8 * dVdsat_dVb + T6 * (here->pParam->B2aiB - Ai * here->pParam->B2biB / (Vds - Vdsat)); *gds = (T0 * (dBeta_dVd - Betaeff * dUvert_dVd) + T1 * dVgeff_dVd - T2 * dVc_dVd) * FR + *Ids * dFR_dVd; *gm = (T0 * (dBeta_dVg - Betaeff * dUvert_dVg) + T1 * dVgeff_dVg - T2 * dVc_dVg) * FR + *Ids * dFR_dVg; *gmb = (T0 * (dBeta_dVb - Betaeff * dUvert_dVb) + T1 * dVgeff_dVb - T2 * dVc_dVb - *Ids * Inv_Aa * dAa_dVb) * FR + *Ids * dFR_dVb; *Ids *= FR; } else { *gds = T0 * (dBeta_dVd - Betaeff * dUvert_dVd) + T1 * dVgeff_dVd - T2 * dVc_dVd; *gm = T0 * (dBeta_dVg - Betaeff * dUvert_dVg) + T1 * dVgeff_dVg - T2 * dVc_dVg; *gmb = T0 * (dBeta_dVb - Betaeff * dUvert_dVb) + T1 * dVgeff_dVb - T2 * dVc_dVb - *Ids * Inv_Aa * dAa_dVb; } } /* end of Saturation */ } else { T0 = Exp0 * Exp0; T1 = Exp1; *Ids = Beta * model->B2Vtm * model->B2Vtm * T0 * (1.0 - T1); T2 = *Ids / Beta; T4 = n * model->B2Vtm; T3 = *Ids / T4; if ((Vds > Vdsat) && here->pParam->B2ai0 != 0.0) { Ai = here->pParam->B2ai0 + here->pParam->B2aiB * Vbs; Bi = here->pParam->B2bi0 + here->pParam->B2biB * Vbs; T5 = Bi / (Vds - Vdsat); T5 = MIN(T5, 30.0); T6 = exp(-T5); FR = 1.0 + Ai * T6; T7 = T5 / (Vds - Vdsat); T8 = (1.0 - FR) * T7; dFR_dVd = T8 * (dVdsat_dVd - 1.0); dFR_dVg = T8 * dVdsat_dVg; dFR_dVb = T8 * dVdsat_dVb + T6 * (here->pParam->B2aiB - Ai * here->pParam->B2biB / (Vds - Vdsat)); } else { FR = 1.0; dFR_dVd = 0.0; dFR_dVg = 0.0; dFR_dVb = 0.0; } *gds = (T2 * dBeta_dVd + T3 * (here->pParam->B2vofD * T4 - dVth_dVd - here->pParam->B2nD * Vgst / n) + Beta * model->B2Vtm * T0 * T1) * FR + *Ids * dFR_dVd; *gm = (T2 * dBeta_dVg + T3) * FR + *Ids * dFR_dVg; *gmb = (T2 * dBeta_dVb + T3 * (here->pParam->B2vofB * T4 - dVth_dVb + here->pParam->B2nB * Vgst / (n * T1s * T1s) * dT1s_dVb)) * FR + *Ids * dFR_dVb; *Ids *= FR; } } else { *Ids = 0.0; *gm = 0.0; *gds = 0.0; *gmb = 0.0; } /* Some Limiting of DC Parameters */ *gds = MAX(*gds,1.0e-20); if ((model->B2channelChargePartitionFlag > 1) || ((!ChargeComputationNeeded) && (model->B2channelChargePartitionFlag > -5))) { *qg = 0.0; *qd = 0.0; *qb = 0.0; *cgg = 0.0; *cgs = 0.0; *cgd = 0.0; *cdg = 0.0; *cds = 0.0; *cdd = 0.0; *cbg = 0.0; *cbs = 0.0; *cbd = 0.0; goto finished; } else { if (Vbs < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = here->pParam->B2phi - Phisb; dVbseff_dVb = -dPhisb_dVb; } Arg1 = Vgs - Vbseff - here->pParam->B2vfb; Arg2 = Arg1 - Vgst; Qbulk = here->pParam->One_Third_CoxWL * Arg2; dQbulk_dVb = here->pParam->One_Third_CoxWL * (dVth_dVb - dVbseff_dVb); dQbulk_dVd = here->pParam->One_Third_CoxWL * dVth_dVd; if (Arg1 <= 0.0) { *qg = here->pParam->CoxWL * Arg1; *qb = -(*qg); *qd = 0.0; *cgg = here->pParam->CoxWL; *cgd = 0.0; *cgs = -*cgg * (1.0 - dVbseff_dVb); *cdg = 0.0; *cdd = 0.0; *cds = 0.0; *cbg = -here->pParam->CoxWL; *cbd = 0.0; *cbs = -*cgs; } else if (Vgst <= 0.0) { T2 = Arg1 / Arg2; T3 = T2 * T2 * (here->pParam->CoxWL - here->pParam->Two_Third_CoxWL * T2); *qg = here->pParam->CoxWL * Arg1 * (1.0 - T2 * (1.0 - T2 / 3.0)); *qb = -(*qg); *qd = 0.0; *cgg = here->pParam->CoxWL * (1.0 - T2 * (2.0 - T2)); tmp = T3 * dVth_dVb - (*cgg + T3) * dVbseff_dVb; *cgd = T3 * dVth_dVd; *cgs = -(*cgg + *cgd + tmp); *cdg = 0.0; *cdd = 0.0; *cds = 0.0; *cbg = -*cgg; *cbd = -*cgd; *cbs = -*cgs; } else { if (Vgst < here->pParam->B2vghigh) { Uvert = 1.0 + Vgst * (Ua + Vgst * Ub); Uvert = MAX(Uvert, 0.2); Inv_Uvert = 1.0 / Uvert; dUvert_dVg = Ua + 2.0 * Ub * Vgst; dUvert_dVd = -dUvert_dVg * dVth_dVd; dUvert_dVb = -dUvert_dVg * dVth_dVb + Vgst * (here->pParam->B2uaB + Vgst * here->pParam->B2ubB); T8 = U1s * Inv_Aa * Inv_Uvert; Vc = T8 * Vgst; T9 = Vc * Inv_Uvert; dVc_dVg = T8 - T9 * dUvert_dVg; dVc_dVd = -T8 * dVth_dVd - T9 * dUvert_dVd; dVc_dVb = -T8 * dVth_dVb + here->pParam->B2u1B * Vgst * Inv_Aa * Inv_Uvert - Vc * Inv_Aa * dAa_dVb - T9 * dUvert_dVb; tmp2 = sqrt(1.0 + 2.0 * Vc); Kk = 0.5 * (1.0 + Vc + tmp2); Inv_Kk = 1.0 / Kk; dKk_dVc = 0.5 + 0.5 / tmp2; SqrtKk = sqrt(Kk); T8 = Inv_Aa / SqrtKk; Vdsat = Vgst * T8; T9 = 0.5 * Vdsat * Inv_Kk * dKk_dVc; dVdsat_dVd = -T8 * dVth_dVd - T9 * dVc_dVd; dVdsat_dVg = T8 - T9 * dVc_dVg; dVdsat_dVb = -T8 * dVth_dVb - T9 * dVc_dVb - Vdsat* Inv_Aa * dAa_dVb; } if (Vds >= Vdsat) { /* saturation region */ *cgg = here->pParam->Two_Third_CoxWL; *cgd = -*cgg * dVth_dVd + dQbulk_dVd; tmp = -*cgg * dVth_dVb + dQbulk_dVb; *cgs = -(*cgg + *cgd + tmp); *cbg = 0.0; *cbd = -dQbulk_dVd; *cbs = dQbulk_dVd + dQbulk_dVb; *cdg = -0.4 * *cgg; tmp = -*cdg * dVth_dVb; *cdd = -*cdg * dVth_dVd; *cds = -(*cdg + *cdd + tmp); *qb = -Qbulk; *qg = here->pParam->Two_Third_CoxWL * Vgst + Qbulk; *qd = *cdg * Vgst; } else { /* linear region */ T7 = Vds / Vdsat; T8 = Vgst / Vdsat; T6 = T7 * T8; T9 = 1.0 - T7; Vgdt = Vgst * T9; T0 = Vgst / (Vgst + Vgdt); T1 = Vgdt / (Vgst + Vgdt); T5 = T0 * T1; T2 = 1.0 - T1 + T5; T3 = 1.0 - T0 + T5; dVgdt_dVg = T9 + T6 * dVdsat_dVg; dVgdt_dVd = T6 * dVdsat_dVd - T8 -T9 * dVth_dVd; dVgdt_dVb = T6 * dVdsat_dVb -T9 * dVth_dVb; *qg = here->pParam->Two_Third_CoxWL * (Vgst + Vgdt - Vgdt * T0) + Qbulk; *qb = -Qbulk; *qd = -here->pParam->One_Third_CoxWL * (0.2 * Vgdt + 0.8 * Vgst + Vgdt * T1 + 0.2 * T5 * (Vgdt - Vgst)); *cgg = here->pParam->Two_Third_CoxWL * (T2 + T3 * dVgdt_dVg); tmp = dQbulk_dVb + here->pParam->Two_Third_CoxWL * (T3 * dVgdt_dVb - T2 * dVth_dVb); *cgd = here->pParam->Two_Third_CoxWL * (T3 * dVgdt_dVd - T2 * dVth_dVd) + dQbulk_dVd; *cgs = -(*cgg + *cgd + tmp); T2 = 0.8 - 0.4 * T1 * (2.0 * T1 + T0 + T0 * (T1 - T0)); T3 = 0.2 + T1 + T0 * (1.0 - 0.4 * T0 * (T1 + 3.0 * T0)); *cdg = -here->pParam->One_Third_CoxWL * (T2 + T3 * dVgdt_dVg); tmp = here->pParam->One_Third_CoxWL * (T2 * dVth_dVb - T3 * dVgdt_dVb); *cdd = here->pParam->One_Third_CoxWL * (T2 * dVth_dVd - T3 * dVgdt_dVd); *cds = -(*cdg + tmp + *cdd); *cbg = 0.0; *cbd = -dQbulk_dVd; *cbs = dQbulk_dVd + dQbulk_dVb; } } } finished: /* returning Values to Calling Routine */ valuetypeflag = (int) model->B2channelChargePartitionFlag; switch (valuetypeflag) { case 0: *Ids = MAX(*Ids,1e-50); break; case -1: *Ids = MAX(*Ids,1e-50); break; case -2: *Ids = *gm; break; case -3: *Ids = *gds; break; case -4: *Ids = 1.0 / *gds; break; case -5: *Ids = *gmb; break; case -6: *Ids = *qg / 1.0e-12; break; case -7: *Ids = *qb / 1.0e-12; break; case -8: *Ids = *qd / 1.0e-12; break; case -9: *Ids = -(*qb + *qg + *qd) / 1.0e-12; break; case -10: *Ids = *cgg / 1.0e-12; break; case -11: *Ids = *cgd / 1.0e-12; break; case -12: *Ids = *cgs / 1.0e-12; break; case -13: *Ids = -(*cgg + *cgd + *cgs) / 1.0e-12; break; case -14: *Ids = *cbg / 1.0e-12; break; case -15: *Ids = *cbd / 1.0e-12; break; case -16: *Ids = *cbs / 1.0e-12; break; case -17: *Ids = -(*cbg + *cbd + *cbs) / 1.0e-12; break; case -18: *Ids = *cdg / 1.0e-12; break; case -19: *Ids = *cdd / 1.0e-12; break; case -20: *Ids = *cds / 1.0e-12; break; case -21: *Ids = -(*cdg + *cdd + *cds) / 1.0e-12; break; case -22: *Ids = -(*cgg + *cdg + *cbg) / 1.0e-12; break; case -23: *Ids = -(*cgd + *cdd + *cbd) / 1.0e-12; break; case -24: *Ids = -(*cgs + *cds + *cbs) / 1.0e-12; break; default: *Ids = MAX(*Ids, 1.0e-50); break; } *von = Vth; *vdsat = Vdsat; } ngspice-26/src/spicelib/devices/bsim2/b2dest.c0000644000265600020320000000140412264261473020576 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Hong J. Park, Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "bsim2def.h" #include "ngspice/suffix.h" void B2destroy(GENmodel **inModel) { B2model **model = (B2model**)inModel; B2instance *here; B2instance *prev = NULL; B2model *mod = *model; B2model *oldmod = NULL; for( ; mod ; mod = mod->B2nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->B2instances ; here ; here = here->B2nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos9/0000755000265600020320000000000012264261710017115 5ustar andreasadminngspice-26/src/spicelib/devices/mos9/mos9ext.h0000644000265600020320000000253512264261473020711 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ extern int MOS9acLoad(GENmodel*,CKTcircuit*); extern int MOS9ask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MOS9convTest(GENmodel *,CKTcircuit *); extern int MOS9delete(GENmodel*,IFuid,GENinstance**); extern void MOS9destroy(GENmodel**); extern int MOS9getic(GENmodel*,CKTcircuit*); extern int MOS9load(GENmodel*,CKTcircuit*); extern int MOS9mAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int MOS9mDelete(GENmodel**,IFuid,GENmodel*); extern int MOS9mParam(int,IFvalue*,GENmodel*); extern int MOS9param(int,IFvalue*,GENinstance*,IFvalue*); extern int MOS9pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int MOS9sAcLoad(GENmodel*,CKTcircuit*); extern int MOS9sLoad(GENmodel*,CKTcircuit*); extern void MOS9sPrint(GENmodel*,CKTcircuit*); extern int MOS9sSetup(SENstruct*,GENmodel*); extern int MOS9sUpdate(GENmodel*,CKTcircuit*); extern int MOS9setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MOS9unsetup(GENmodel*,CKTcircuit*); extern int MOS9temp(GENmodel*,CKTcircuit*); extern int MOS9trunc(GENmodel*,CKTcircuit*,double*); extern int MOS9disto(int,GENmodel*,CKTcircuit*); extern int MOS9noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int MOS9dSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/mos9/mos9dest.c0000644000265600020320000000155612264261473021045 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "mos9defs.h" #include "ngspice/suffix.h" void MOS9destroy(GENmodel **inModel) { MOS9model **model = (MOS9model **)inModel; MOS9instance *here; MOS9instance *prev = NULL; MOS9model *mod = *model; MOS9model *oldmod = NULL; for( ; mod ; mod = mod->MOS9nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MOS9instances ; here ; here = here->MOS9nextInstance) { if(prev){ if(prev->MOS9sens) FREE(prev->MOS9sens); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/mos9/mos9sld.c0000644000265600020320000006441112264261473020667 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9sLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; double SaveState[44]; int save_mode; int i; int iparmno; int error; int flag; double A0; double DELA; double Apert; double DELAinv; double gspr0; double gspr; double gdpr0; double gdpr; double cdpr0; double cspr0; double cd0; double cbd0; double cbs0; double cd; double cbd; double cbs; double DcdprDp; double DcsprDp; double DcbDp; double DcdDp; double DcbsDp; double DcbdDp; double DcdprmDp; double DcsprmDp; double qgs0; double qgd0; double qgb0; double qbd0; double qbd; double qbs0; double qbs; double DqgsDp; double DqgdDp; double DqgbDp; double DqbdDp; double DqbsDp; double Osxpgs; double Osxpgd; double Osxpgb; double Osxpbd; double Osxpbs; double tag0; double tag1; double arg; double sarg; double sargsw; int offset; double EffectiveLength; double EffectiveWidth; SENstruct *info; #ifdef SENSDEBUG printf("MOS9senload \n"); printf("CKTtime = %.5e\n",ckt->CKTtime); printf("CKTorder = %d\n",ckt->CKTorder); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } /* loop through all the models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { #ifdef SENSDEBUG printf("senload instance name %s\n",here->MOS9name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS9gNode,here->MOS9dNode,here->MOS9dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS9sNode ,here->MOS9sNodePrime, here->MOS9bNode,here->MOS9senParmNo); #endif /* SENSDEBUG */ /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++){ *(SaveState + i) = *(ckt->CKTstate0 + here->MOS9states + i); } *(SaveState + 17) = here->MOS9sourceConductance; *(SaveState + 18) = here->MOS9drainConductance; *(SaveState + 19) = here->MOS9cd; *(SaveState + 20) = here->MOS9cbs; *(SaveState + 21) = here->MOS9cbd; *(SaveState + 22) = here->MOS9gmbs; *(SaveState + 23) = here->MOS9gm; *(SaveState + 24) = here->MOS9gds; *(SaveState + 25) = here->MOS9gbd; *(SaveState + 26) = here->MOS9gbs; *(SaveState + 27) = here->MOS9capbd; *(SaveState + 28) = here->MOS9capbs; *(SaveState + 29) = here->MOS9Cbd; *(SaveState + 30) = here->MOS9Cbdsw; *(SaveState + 31) = here->MOS9Cbs; *(SaveState + 32) = here->MOS9Cbssw; *(SaveState + 33) = here->MOS9f2d; *(SaveState + 34) = here->MOS9f3d; *(SaveState + 35) = here->MOS9f4d; *(SaveState + 36) = here->MOS9f2s; *(SaveState + 37) = here->MOS9f3s; *(SaveState + 38) = here->MOS9f4s; *(SaveState + 39) = here->MOS9cgs; *(SaveState + 40) = here->MOS9cgd; *(SaveState + 41) = here->MOS9cgb; *(SaveState + 42) = here->MOS9vdsat; *(SaveState + 43) = here->MOS9von; save_mode = here->MOS9mode; if(here->MOS9senParmNo == 0) goto next1; #ifdef SENSDEBUG printf("without perturbation \n"); #endif /* SENSDEBUG */ cdpr0= here->MOS9cd; cspr0= -(here->MOS9cd + here->MOS9cbd + here->MOS9cbs); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)){ qgs0 = *(ckt->CKTstate1 + here->MOS9qgs); qgd0 = *(ckt->CKTstate1 + here->MOS9qgd); qgb0 = *(ckt->CKTstate1 + here->MOS9qgb); } else{ qgs0 = *(ckt->CKTstate0 + here->MOS9qgs); qgd0 = *(ckt->CKTstate0 + here->MOS9qgd); qgb0 = *(ckt->CKTstate0 + here->MOS9qgb); } here->MOS9senPertFlag = ON; error = MOS9load((GENmodel*)model,ckt); if(error) return(error); cd0 = here->MOS9cd ; cbd0 = here->MOS9cbd ; cbs0 = here->MOS9cbs ; gspr0= here->MOS9sourceConductance ; gdpr0= here->MOS9drainConductance ; qbs0 = *(ckt->CKTstate0 + here->MOS9qbs); qbd0 = *(ckt->CKTstate0 + here->MOS9qbd); for( flag = 0 ; flag <= 1 ; flag++){ if(here->MOS9sens_l == 0) if(flag == 0) goto next2; if(here->MOS9sens_w == 0) if(flag == 1) goto next2; if(flag == 0){ A0 = here->MOS9l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS9l = Apert; } else{ A0 = here->MOS9w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; here->MOS9w = Apert; here->MOS9drainArea *= (1 + info->SENpertfac); here->MOS9sourceArea *= (1 + info->SENpertfac); here->MOS9Cbd *= (1 + info->SENpertfac); here->MOS9Cbs *= (1 + info->SENpertfac); if(here->MOS9drainPerimiter){ here->MOS9Cbdsw += here->MOS9Cbdsw * DELA/here->MOS9drainPerimiter; } if(here->MOS9sourcePerimiter){ here->MOS9Cbssw += here->MOS9Cbssw * DELA/here->MOS9sourcePerimiter; } if(*(ckt->CKTstate0 + here->MOS9vbd) >= here->MOS9tDepCap){ arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9f2d = here->MOS9Cbd* (1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + here->MOS9Cbdsw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3d = here->MOS9Cbd * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ model->MOS9bulkJctPotential + here->MOS9Cbdsw * model->MOS9bulkJctSideGradingCoeff *sargsw/arg / model->MOS9bulkJctPotential; here->MOS9f4d = here->MOS9Cbd* model->MOS9bulkJctPotential*(1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + here->MOS9Cbdsw*model->MOS9bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3d/2* (here->MOS9tDepCap*here->MOS9tDepCap) -here->MOS9tDepCap * here->MOS9f2d; } if(*(ckt->CKTstate0 + here->MOS9vbs) >= here->MOS9tDepCap){ arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9f2s = here->MOS9Cbs* (1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + here->MOS9Cbssw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3s = here->MOS9Cbs * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ model->MOS9bulkJctPotential + here->MOS9Cbssw * model->MOS9bulkJctSideGradingCoeff * sargsw/arg/ model->MOS9bulkJctPotential; here->MOS9f4s = here->MOS9Cbs* model->MOS9bulkJctPotential*(1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + here->MOS9Cbssw*model->MOS9bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3s/2* (here->MOS9tBulkPot*here->MOS9tBulkPot) -here->MOS9tBulkPot * here->MOS9f2s; } here->MOS9drainConductance *= Apert/A0; here->MOS9sourceConductance *= Apert/A0; } #ifdef SENSDEBUG if(flag == 0) printf("perturbation of l\n"); if(flag == 1) printf("perturbation of w\n"); #endif /* SENSDEBUG */ error = MOS9load((GENmodel*)model,ckt); if(error) return(error); if(flag == 0){ here->MOS9l = A0; } else{ here->MOS9w = A0; here->MOS9drainArea /= (1 + info->SENpertfac); here->MOS9sourceArea /= (1 + info->SENpertfac); here->MOS9drainConductance *= A0/Apert; here->MOS9sourceConductance *= A0/Apert; } cd = here->MOS9cd ; cbd = here->MOS9cbd ; cbs = here->MOS9cbs ; gspr= here->MOS9sourceConductance ; gdpr= here->MOS9drainConductance ; DcdDp = (cd - cd0) * DELAinv; DcbsDp = (cbs - cbs0) * DELAinv; DcbdDp = (cbd - cbd0) * DELAinv; DcbDp = ( DcbsDp + DcbdDp ); DcdprDp = 0; DcsprDp = 0; if(here->MOS9dNode != here->MOS9dNodePrime) if(gdpr0) DcdprDp = cdpr0 * (gdpr - gdpr0)/gdpr0 * DELAinv; if(here->MOS9sNode != here->MOS9sNodePrime) if(gspr0) DcsprDp = cspr0 * (gspr - gspr0)/gspr0 * DELAinv; DcdprmDp = ( - DcdprDp + DcdDp); DcsprmDp = ( - DcbsDp - DcdDp - DcbdDp - DcsprDp); if(flag == 0){ EffectiveLength = here->MOS9l - 2*model->MOS9latDiff + model->MOS9lengthAdjust; if(EffectiveLength == 0){ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; } else{ DqgsDp = model->MOS9type * qgs0 / EffectiveLength; DqgdDp = model->MOS9type * qgd0 / EffectiveLength; DqgbDp = model->MOS9type * qgb0 / EffectiveLength; } } else{ EffectiveWidth = here->MOS9w - 2*model->MOS9widthNarrow + model->MOS9widthAdjust; DqgsDp = model->MOS9type * qgs0 / EffectiveWidth; DqgdDp = model->MOS9type * qgd0 / EffectiveWidth; DqgbDp = model->MOS9type * qgb0 / EffectiveWidth; } qbd = *(ckt->CKTstate0 + here->MOS9qbd); qbs = *(ckt->CKTstate0 + here->MOS9qbs); DqbsDp = model->MOS9type * (qbs - qbs0)*DELAinv; DqbdDp = model->MOS9type * (qbd - qbd0)*DELAinv; if(flag == 0){ *(here->MOS9dphigs_dl) = DqgsDp; *(here->MOS9dphigd_dl) = DqgdDp; *(here->MOS9dphibs_dl) = DqbsDp; *(here->MOS9dphibd_dl) = DqbdDp; *(here->MOS9dphigb_dl) = DqgbDp; } else{ *(here->MOS9dphigs_dw) = DqgsDp; *(here->MOS9dphigd_dw) = DqgdDp; *(here->MOS9dphibs_dw) = DqbsDp; *(here->MOS9dphibd_dw) = DqbdDp; *(here->MOS9dphigb_dw) = DqgbDp; } #ifdef SENSDEBUG printf("CKTag[0]=%.7e,CKTag[1]=%.7e,flag= %d\n", ckt->CKTag[0],ckt->CKTag[1],flag); printf("cd0 = %.7e ,cd = %.7e,\n",cd0,cd); printf("cbs0 = %.7e ,cbs = %.7e,\n",cbs0,cbs); printf("cbd0 = %.7e ,cbd = %.7e,\n",cbd0,cbd); printf("DcdprmDp = %.7e,\n",DcdprmDp); printf("DcsprmDp = %.7e,\n",DcsprmDp); printf("DcdprDp = %.7e,\n",DcdprDp); printf("DcsprDp = %.7e,\n",DcsprDp); printf("qgs0 = %.7e \n",qgs0); printf("qgd0 = %.7e \n",qgd0); printf("qgb0 = %.7e \n",qgb0); printf("qbs0 = %.7e ,qbs = %.7e,\n",qbs0,qbs); printf("qbd0 = %.7e ,qbd = %.7e,\n",qbd0,qbd); printf("DqgsDp = %.7e \n",DqgsDp); printf("DqgdDp = %.7e \n",DqgdDp); printf("DqgbDp = %.7e \n",DqgbDp); printf("DqbsDp = %.7e \n",DqbsDp); printf("DqbdDp = %.7e \n",DqbdDp); printf("EffectiveLength = %.7e \n",EffectiveLength); printf("tdepCap = %.7e \n",here->MOS9tDepCap); printf("\n"); #endif /* SENSDEBUG*/ if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto next2; /* * load RHS matrix */ if(flag == 0){ *(info->SEN_RHS[here->MOS9bNode] + here->MOS9senParmNo) -= model->MOS9type * DcbDp; *(info->SEN_RHS[here->MOS9dNode] + here->MOS9senParmNo) -= model->MOS9type * DcdprDp; *(info->SEN_RHS[here->MOS9dNodePrime] + here->MOS9senParmNo) -= model->MOS9type * DcdprmDp; *(info->SEN_RHS[here->MOS9sNode] + here->MOS9senParmNo) -= model->MOS9type * DcsprDp; *(info->SEN_RHS[here->MOS9sNodePrime] + here->MOS9senParmNo) -= model->MOS9type * DcsprmDp; } else{ offset = here->MOS9sens_l; *(info->SEN_RHS[here->MOS9bNode] + here->MOS9senParmNo + offset) -= model->MOS9type * DcbDp; *(info->SEN_RHS[here->MOS9dNode] + here->MOS9senParmNo + offset) -= model->MOS9type * DcdprDp; *(info->SEN_RHS[here->MOS9dNodePrime] + here->MOS9senParmNo + offset) -= model->MOS9type * DcdprmDp; *(info->SEN_RHS[here->MOS9sNode] + here->MOS9senParmNo + offset) -= model->MOS9type * DcsprDp; *(info->SEN_RHS[here->MOS9sNodePrime] + here->MOS9senParmNo + offset) -= model->MOS9type * DcsprmDp; } #ifdef SENSDEBUG printf("after loading\n"); if(flag == 0){ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS9bNode] + here->MOS9senParmNo)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNode] + here->MOS9senParmNo)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNode] + here->MOS9senParmNo)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNodePrime] + here->MOS9senParmNo)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNodePrime] + here->MOS9senParmNo)); printf("\n"); } else{ printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS9bNode] + here->MOS9senParmNo + here->MOS9sens_l)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNode] + here->MOS9senParmNo + here->MOS9sens_l)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNode] + here->MOS9senParmNo + here->MOS9sens_l)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNodePrime] + here->MOS9senParmNo + here->MOS9sens_l)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNodePrime] + here->MOS9senParmNo + here->MOS9sens_l)); } #endif /* SENSDEBUG*/ next2: ; } next1: if((info->SENmode == DCSEN) || (ckt->CKTmode&MODETRANOP) ) goto restore; if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) goto restore; for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ #ifdef SENSDEBUG printf("after conductive currents\n"); printf("iparmno = %d\n",iparmno); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS9bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNodePrime] + iparmno)); printf("\n"); #endif /* SENSDEBUG */ Osxpgs = tag0 * *(ckt->CKTstate1 + here->MOS9sensxpgs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS9sensxpgs + 10*(iparmno - 1) + 1); Osxpgd = tag0 * *(ckt->CKTstate1 + here->MOS9sensxpgd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS9sensxpgd + 10*(iparmno - 1) + 1); Osxpbs = tag0 * *(ckt->CKTstate1 + here->MOS9sensxpbs + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS9sensxpbs + 10*(iparmno - 1) + 1); Osxpbd =tag0 * *(ckt->CKTstate1 + here->MOS9sensxpbd + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS9sensxpbd + 10*(iparmno - 1) + 1); Osxpgb = tag0 * *(ckt->CKTstate1 + here->MOS9sensxpgb + 10*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->MOS9sensxpgb + 10*(iparmno - 1) + 1); #ifdef SENSDEBUG printf("iparmno=%d\n",iparmno); printf("sxpgs=%.7e,sdgs=%.7e\n", *(ckt->CKTstate1 + here->MOS9sensxpgs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS9sensxpgs + 10*(iparmno - 1) + 1)); printf("sxpgd=%.7e,sdgd=%.7e\n", *(ckt->CKTstate1 + here->MOS9sensxpgd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS9sensxpgd + 10*(iparmno - 1) + 1)); printf("sxpbs=%.7e,sdbs=%.7e\n", *(ckt->CKTstate1 + here->MOS9sensxpbs + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS9sensxpbs + 10*(iparmno - 1) + 1)); printf("sxpbd=%.7e,sdbd=%.7e\n", *(ckt->CKTstate1 + here->MOS9sensxpbd + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS9sensxpbd + 10*(iparmno - 1) + 1)); printf("sxpgb=%.7e,sdgb=%.7e\n", *(ckt->CKTstate1 + here->MOS9sensxpgb + 10*(iparmno - 1)), *(ckt->CKTstate1 + here->MOS9sensxpgb + 10*(iparmno - 1) + 1)); printf("before loading DqDp\n"); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); printf("\n"); #endif /* SENSDEBUG */ if(here->MOS9sens_l && (iparmno == here->MOS9senParmNo)){ Osxpgs -= tag0 * *(here->MOS9dphigs_dl); Osxpgd -= tag0 * *(here->MOS9dphigd_dl); Osxpbs -= tag0 * *(here->MOS9dphibs_dl); Osxpbd -= tag0 * *(here->MOS9dphibd_dl); Osxpgb -= tag0 * *(here->MOS9dphigb_dl); } if(here->MOS9sens_w && (iparmno == (here->MOS9senParmNo + here->MOS9sens_l))){ Osxpgs -= tag0 * *(here->MOS9dphigs_dw); Osxpgd -= tag0 * *(here->MOS9dphigd_dw); Osxpbs -= tag0 * *(here->MOS9dphibs_dw); Osxpbd -= tag0 * *(here->MOS9dphibd_dw); Osxpgb -= tag0 * *(here->MOS9dphigb_dw); } #ifdef SENSDEBUG printf("after loading DqDp\n"); printf("DqgsDp=%.7e",DqgsDp); printf("Osxpgs=%.7e,Osxpgd=%.7e\n",Osxpgs,Osxpgd); printf("Osxpbs=%.7e,Osxpbd=%.7e,Osxpgb=%.7e\n", Osxpbs,Osxpbd,Osxpgb); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->MOS9bNode] + iparmno) += Osxpbs + Osxpbd -Osxpgb; *(info->SEN_RHS[here->MOS9gNode] + iparmno) += Osxpgs + Osxpgd + Osxpgb; *(info->SEN_RHS[here->MOS9dNodePrime] + iparmno) -= Osxpgd + Osxpbd ; *(info->SEN_RHS[here->MOS9sNodePrime] + iparmno) -= Osxpgs + Osxpbs; #ifdef SENSDEBUG printf("after capacitive currents\n"); printf("DcbDp=%.7e\n", *(info->SEN_RHS[here->MOS9bNode] + iparmno)); printf("DcdprDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNode] + iparmno)); printf("DcdprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9dNodePrime] + iparmno)); printf("DcsprDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNode] + iparmno)); printf("DcsprmDp=%.7e\n", *(info->SEN_RHS[here->MOS9sNodePrime] + iparmno)); #endif /* SENSDEBUG */ } restore: /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS9states + i) = *(SaveState + i); here->MOS9sourceConductance = *(SaveState + 17) ; here->MOS9drainConductance = *(SaveState + 18) ; here->MOS9cd = *(SaveState + 19) ; here->MOS9cbs = *(SaveState + 20) ; here->MOS9cbd = *(SaveState + 21) ; here->MOS9gmbs = *(SaveState + 22) ; here->MOS9gm = *(SaveState + 23) ; here->MOS9gds = *(SaveState + 24) ; here->MOS9gbd = *(SaveState + 25) ; here->MOS9gbs = *(SaveState + 26) ; here->MOS9capbd = *(SaveState + 27) ; here->MOS9capbs = *(SaveState + 28) ; here->MOS9Cbd = *(SaveState + 29) ; here->MOS9Cbdsw = *(SaveState + 30) ; here->MOS9Cbs = *(SaveState + 31) ; here->MOS9Cbssw = *(SaveState + 32) ; here->MOS9f2d = *(SaveState + 33) ; here->MOS9f3d = *(SaveState + 34) ; here->MOS9f4d = *(SaveState + 35) ; here->MOS9f2s = *(SaveState + 36) ; here->MOS9f3s = *(SaveState + 37) ; here->MOS9f4s = *(SaveState + 38) ; here->MOS9cgs = *(SaveState + 39) ; here->MOS9cgd = *(SaveState + 40) ; here->MOS9cgb = *(SaveState + 41) ; here->MOS9vdsat = *(SaveState + 42) ; here->MOS9von = *(SaveState + 43) ; here->MOS9mode = save_mode ; here->MOS9senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS9senload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9par.c0000644000265600020320000000663312264261473020671 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int MOS9param(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { MOS9instance *here = (MOS9instance *)inst; NG_IGNORE(select); switch(param) { case MOS9_M: here->MOS9m = value->rValue; here->MOS9mGiven = TRUE; break; case MOS9_W: here->MOS9w = value->rValue; here->MOS9wGiven = TRUE; break; case MOS9_L: here->MOS9l = value->rValue; here->MOS9lGiven = TRUE; break; case MOS9_AS: here->MOS9sourceArea = value->rValue; here->MOS9sourceAreaGiven = TRUE; break; case MOS9_AD: here->MOS9drainArea = value->rValue; here->MOS9drainAreaGiven = TRUE; break; case MOS9_PS: here->MOS9sourcePerimiter = value->rValue; here->MOS9sourcePerimiterGiven = TRUE; break; case MOS9_PD: here->MOS9drainPerimiter = value->rValue; here->MOS9drainPerimiterGiven = TRUE; break; case MOS9_NRS: here->MOS9sourceSquares = value->rValue; here->MOS9sourceSquaresGiven = TRUE; break; case MOS9_NRD: here->MOS9drainSquares = value->rValue; here->MOS9drainSquaresGiven = TRUE; break; case MOS9_OFF: here->MOS9off = (value->iValue != 0); break; case MOS9_IC_VBS: here->MOS9icVBS = value->rValue; here->MOS9icVBSGiven = TRUE; break; case MOS9_IC_VDS: here->MOS9icVDS = value->rValue; here->MOS9icVDSGiven = TRUE; break; case MOS9_IC_VGS: here->MOS9icVGS = value->rValue; here->MOS9icVGSGiven = TRUE; break; case MOS9_TEMP: here->MOS9temp = value->rValue+CONSTCtoK; here->MOS9tempGiven = TRUE; break; case MOS9_DTEMP: here->MOS9dtemp = value->rValue; here->MOS9dtempGiven = TRUE; break; case MOS9_IC: switch(value->v.numValue){ case 3: here->MOS9icVBS = *(value->v.vec.rVec+2); here->MOS9icVBSGiven = TRUE; case 2: here->MOS9icVGS = *(value->v.vec.rVec+1); here->MOS9icVGSGiven = TRUE; case 1: here->MOS9icVDS = *(value->v.vec.rVec); here->MOS9icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; case MOS9_L_SENS: if(value->iValue) { here->MOS9senParmNo = 1; here->MOS9sens_l = 1; } break; case MOS9_W_SENS: if(value->iValue) { here->MOS9senParmNo = 1; here->MOS9sens_w = 1; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9del.c0000644000265600020320000000161012264261473020641 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9delete(GENmodel *inModel, IFuid name, GENinstance **inst) { MOS9model *model = (MOS9model *)inModel; MOS9instance **fast = (MOS9instance **)inst; MOS9instance **prev = NULL; MOS9instance *here; for( ; model ; model = model->MOS9nextModel) { prev = &(model->MOS9instances); for(here = *prev; here ; here = *prev) { if(here->MOS9name == name || (fast && here==*fast) ) { *prev= here->MOS9nextInstance; FREE(here); return(OK); } prev = &(here->MOS9nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/mos9/mos9init.h0000644000265600020320000000037012264261473021047 0ustar andreasadmin#ifndef _MOS9INIT_H #define _MOS9INIT_H extern IFparm MOS9pTable[ ]; extern IFparm MOS9mPTable[ ]; extern char *MOS9names[ ]; extern int MOS9pTSize; extern int MOS9mPTSize; extern int MOS9nSize; extern int MOS9iSize; extern int MOS9mSize; #endif ngspice-26/src/spicelib/devices/mos9/mos9pzld.c0000644000265600020320000001242112264261473021050 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; int xnrm; int xrev; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double EffectiveLength; double EffectiveWidth; for( ; model != NULL; model = model->MOS9nextModel) { for(here = model->MOS9instances; here!= NULL; here = here->MOS9nextInstance) { if (here->MOS9mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * meyer's model parameters */ EffectiveWidth=here->MOS9w-2*model->MOS9widthNarrow+ model->MOS9widthAdjust; EffectiveLength=here->MOS9l - 2*model->MOS9latDiff+ model->MOS9lengthAdjust; GateSourceOverlapCap = model->MOS9gateSourceOverlapCapFactor * here->MOS9m * EffectiveWidth; GateDrainOverlapCap = model->MOS9gateDrainOverlapCapFactor * here->MOS9m * EffectiveWidth; GateBulkOverlapCap = model->MOS9gateBulkOverlapCapFactor * here->MOS9m * EffectiveLength; capgs = ( 2* *(ckt->CKTstate0+here->MOS9capgs)+ GateSourceOverlapCap ); capgd = ( 2* *(ckt->CKTstate0+here->MOS9capgd)+ GateDrainOverlapCap ); capgb = ( 2* *(ckt->CKTstate0+here->MOS9capgb)+ GateBulkOverlapCap ); xgs = capgs; xgd = capgd; xgb = capgb; xbd = here->MOS9capbd; xbs = here->MOS9capbs; /*printf("mos2: xgs=%g, xgd=%g, xgb=%g, xbd=%g, xbs=%g\n", xgs,xgd,xgb,xbd,xbs);*/ /* * load matrix */ *(here->MOS9GgPtr ) += (xgd+xgs+xgb)*s->real; *(here->MOS9GgPtr +1) += (xgd+xgs+xgb)*s->imag; *(here->MOS9BbPtr ) += (xgb+xbd+xbs)*s->real; *(here->MOS9BbPtr +1) += (xgb+xbd+xbs)*s->imag; *(here->MOS9DPdpPtr ) += (xgd+xbd)*s->real; *(here->MOS9DPdpPtr +1) += (xgd+xbd)*s->imag; *(here->MOS9SPspPtr ) += (xgs+xbs)*s->real; *(here->MOS9SPspPtr +1) += (xgs+xbs)*s->imag; *(here->MOS9GbPtr ) -= xgb*s->real; *(here->MOS9GbPtr +1) -= xgb*s->imag; *(here->MOS9GdpPtr ) -= xgd*s->real; *(here->MOS9GdpPtr +1) -= xgd*s->imag; *(here->MOS9GspPtr ) -= xgs*s->real; *(here->MOS9GspPtr +1) -= xgs*s->imag; *(here->MOS9BgPtr ) -= xgb*s->real; *(here->MOS9BgPtr +1) -= xgb*s->imag; *(here->MOS9BdpPtr ) -= xbd*s->real; *(here->MOS9BdpPtr +1) -= xbd*s->imag; *(here->MOS9BspPtr ) -= xbs*s->real; *(here->MOS9BspPtr +1) -= xbs*s->imag; *(here->MOS9DPgPtr ) -= xgd*s->real; *(here->MOS9DPgPtr +1) -= xgd*s->imag; *(here->MOS9DPbPtr ) -= xbd*s->real; *(here->MOS9DPbPtr +1) -= xbd*s->imag; *(here->MOS9SPgPtr ) -= xgs*s->real; *(here->MOS9SPgPtr +1) -= xgs*s->imag; *(here->MOS9SPbPtr ) -= xbs*s->real; *(here->MOS9SPbPtr +1) -= xbs*s->imag; *(here->MOS9DdPtr) += here->MOS9drainConductance; *(here->MOS9SsPtr) += here->MOS9sourceConductance; *(here->MOS9BbPtr) += here->MOS9gbd+here->MOS9gbs; *(here->MOS9DPdpPtr) += here->MOS9drainConductance+ here->MOS9gds+here->MOS9gbd+ xrev*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9SPspPtr) += here->MOS9sourceConductance+ here->MOS9gds+here->MOS9gbs+ xnrm*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9DdpPtr) -= here->MOS9drainConductance; *(here->MOS9SspPtr) -= here->MOS9sourceConductance; *(here->MOS9BdpPtr) -= here->MOS9gbd; *(here->MOS9BspPtr) -= here->MOS9gbs; *(here->MOS9DPdPtr) -= here->MOS9drainConductance; *(here->MOS9DPgPtr) += (xnrm-xrev)*here->MOS9gm; *(here->MOS9DPbPtr) += -here->MOS9gbd+(xnrm-xrev)*here->MOS9gmbs; *(here->MOS9DPspPtr) -= here->MOS9gds+ xnrm*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9SPgPtr) -= (xnrm-xrev)*here->MOS9gm; *(here->MOS9SPsPtr) -= here->MOS9sourceConductance; *(here->MOS9SPbPtr) -= here->MOS9gbs+(xnrm-xrev)*here->MOS9gmbs; *(here->MOS9SPdpPtr) -= here->MOS9gds+ xrev*(here->MOS9gm+here->MOS9gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9temp.c0000644000265600020320000003561012264261473021051 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) int MOS9temp(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; double wkfngs; double wkfng; double fermig; double fermis; double vfb; double fact1,fact2; double vt,vtnom; double kt,kt1; double ratio,ratio4; double egfet,egfet1; double pbfact,pbfact1,pbo; double phio; double arg1; double capfact; double gmanew,gmaold; double ni_temp, nifact; /* loop through all the mosfet models */ for( ; model != NULL; model = model->MOS9nextModel) { if(!model->MOS9tnomGiven) { model->MOS9tnom = ckt->CKTnomTemp; } fact1 = model->MOS9tnom/REFTEMP; vtnom = model->MOS9tnom*CONSTKoverQ; kt1 = CONSTboltz * model->MOS9tnom; egfet1 = 1.16-(7.02e-4*model->MOS9tnom*model->MOS9tnom)/ (model->MOS9tnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom *(1.5*log(fact1)+CHARGE*arg1); nifact=(model->MOS9tnom/300)*sqrt(model->MOS9tnom/300); nifact*=exp(0.5*egfet1*((1/(double)300)-(1/model->MOS9tnom))/ CONSTKoverQ); ni_temp=1.45e16*nifact; if (model->MOS9phi <= 0.0) { SPfrontEnd->IFerror (ERR_FATAL, "%s: Phi is not positive.", &model->MOS9modName); return(E_BADPARM); } model->MOS9oxideCapFactor = 3.9 * 8.854214871e-12/ model->MOS9oxideThickness; if(!model->MOS9surfaceMobilityGiven) model->MOS9surfaceMobility=600; if(!model->MOS9transconductanceGiven) { model->MOS9transconductance = model->MOS9surfaceMobility * model->MOS9oxideCapFactor * 1e-4; } if(model->MOS9substrateDopingGiven) { if(model->MOS9substrateDoping*1e6 /*(cm**3/m**3)*/ >ni_temp) { if(!model->MOS9phiGiven) { model->MOS9phi = 2*vtnom* log(model->MOS9substrateDoping* 1e6/*(cm**3/m**3)*//ni_temp); model->MOS9phi = MAX(.1,model->MOS9phi); } fermis = model->MOS9type * .5 * model->MOS9phi; wkfng = 3.2; if(!model->MOS9gateTypeGiven) model->MOS9gateType=1; if(model->MOS9gateType != 0) { fermig = model->MOS9type * model->MOS9gateType*.5*egfet1; wkfng = 3.25 + .5 * egfet1 - fermig; } wkfngs = wkfng - (3.25 + .5 * egfet1 +fermis); if(!model->MOS9gammaGiven) { model->MOS9gamma = sqrt(2 * EPSSIL * CHARGE * model->MOS9substrateDoping* 1e6 /*(cm**3/m**3)*/ )/ model->MOS9oxideCapFactor; } if(!model->MOS9vt0Given) { if(!model->MOS9surfaceStateDensityGiven) model->MOS9surfaceStateDensity=0; vfb = wkfngs - model->MOS9surfaceStateDensity * 1e4 * CHARGE/model->MOS9oxideCapFactor; model->MOS9vt0 = vfb + model->MOS9type * (model->MOS9gamma * sqrt(model->MOS9phi)+ model->MOS9phi); } else { vfb = model->MOS9vt0 - model->MOS9type * (model->MOS9gamma* sqrt(model->MOS9phi)+model->MOS9phi); } model->MOS9alpha = (EPSSIL+EPSSIL)/ (CHARGE*model->MOS9substrateDoping*1e6 /*(cm**3/m**3)*/ ); model->MOS9coeffDepLayWidth = sqrt(model->MOS9alpha); } else { model->MOS9substrateDoping = 0; SPfrontEnd->IFerror (ERR_FATAL, "%s: Nsub < Ni ",&(model->MOS9modName)); return(E_BADPARM); } } /* now model parameter preprocessing */ model->MOS9narrowFactor = model->MOS9delta * 0.5 * M_PI * EPSSIL / model->MOS9oxideCapFactor ; /* loop through all instances of the model */ for(here = model->MOS9instances; here!= NULL; here = here->MOS9nextInstance) { double czbd; /* zero voltage bulk-drain capacitance */ double czbdsw; /* zero voltage bulk-drain sidewall capacitance */ double czbs; /* zero voltage bulk-source capacitance */ double czbssw; /* zero voltage bulk-source sidewall capacitance */ double arg; /* 1 - fc */ double sarg; /* (1-fc) ^^ (-mj) */ double sargsw; /* (1-fc) ^^ (-mjsw) */ /* perform the parameter defaulting */ if(!here->MOS9dtempGiven) { here->MOS9dtemp = 0.0; } if(!here->MOS9tempGiven) { here->MOS9temp = ckt->CKTtemp + here->MOS9dtemp; } vt = here->MOS9temp * CONSTKoverQ; ratio = here->MOS9temp/model->MOS9tnom; fact2 = here->MOS9temp/REFTEMP; kt = here->MOS9temp * CONSTboltz; egfet = 1.16-(7.02e-4*here->MOS9temp*here->MOS9temp)/ (here->MOS9temp+1108); arg = -egfet/(kt+kt)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2*vt *(1.5*log(fact2)+CHARGE*arg); if(!here->MOS9mGiven) { here->MOS9m = ckt->CKTdefaultMosM; } if(!here->MOS9lGiven) { here->MOS9l = ckt->CKTdefaultMosL; } if(!here->MOS9sourceAreaGiven) { here->MOS9sourceArea = ckt->CKTdefaultMosAS; } if(!here->MOS9wGiven) { here->MOS9w = ckt->CKTdefaultMosW; } if(model->MOS9drainResistanceGiven) { if(model->MOS9drainResistance != 0) { here->MOS9drainConductance = here->MOS9m / model->MOS9drainResistance; } else { here->MOS9drainConductance = 0; } } else if (model->MOS9sheetResistanceGiven) { if ((model->MOS9sheetResistance != 0) && (here->MOS9drainSquares != 0)) { here->MOS9drainConductance = here->MOS9m / (model->MOS9sheetResistance*here->MOS9drainSquares); } else { here->MOS9drainConductance = 0; } } else { here->MOS9drainConductance = 0; } if(model->MOS9sourceResistanceGiven) { if(model->MOS9sourceResistance != 0) { here->MOS9sourceConductance = here->MOS9m / model->MOS9sourceResistance; } else { here->MOS9sourceConductance = 0; } } else if (model->MOS9sheetResistanceGiven) { if ((model->MOS9sheetResistance != 0) && (here->MOS9sourceSquares != 0)) { here->MOS9sourceConductance = here->MOS9m / (model->MOS9sheetResistance*here->MOS9sourceSquares); } else { here->MOS9sourceConductance = 0; } } else { here->MOS9sourceConductance = 0; } if(here->MOS9l - 2 * model->MOS9latDiff + model->MOS9lengthAdjust <1e-6) { SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel length less than zero", &(here->MOS9name)); return(E_PARMVAL); } if(here->MOS9w - 2 * model->MOS9widthNarrow + model->MOS9widthAdjust <1e-6) { SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel width less than zero", &(here->MOS9name)); return(E_PARMVAL); } ratio4 = ratio * sqrt(ratio); here->MOS9tTransconductance = model->MOS9transconductance / ratio4; here->MOS9tSurfMob = model->MOS9surfaceMobility/ratio4; phio= (model->MOS9phi-pbfact1)/fact1; here->MOS9tPhi = fact2 * phio + pbfact; here->MOS9tVbi = model->MOS9delvt0 + model->MOS9vt0 - model->MOS9type * (model->MOS9gamma* sqrt(model->MOS9phi)) +.5*(egfet1-egfet) + model->MOS9type*.5* (here->MOS9tPhi-model->MOS9phi); here->MOS9tVto = here->MOS9tVbi + model->MOS9type * model->MOS9gamma * sqrt(here->MOS9tPhi); here->MOS9tSatCur = model->MOS9jctSatCur* exp(-egfet/vt+egfet1/vtnom); here->MOS9tSatCurDens = model->MOS9jctSatCurDensity * exp(-egfet/vt+egfet1/vtnom); pbo = (model->MOS9bulkJctPotential - pbfact1)/fact1; gmaold = (model->MOS9bulkJctPotential-pbo)/pbo; capfact = 1/(1+model->MOS9bulkJctBotGradingCoeff* (4e-4*(model->MOS9tnom-REFTEMP)-gmaold)); here->MOS9tCbd = model->MOS9capBD * capfact; here->MOS9tCbs = model->MOS9capBS * capfact; here->MOS9tCj = model->MOS9bulkCapFactor * capfact; capfact = 1/(1+model->MOS9bulkJctSideGradingCoeff* (4e-4*(model->MOS9tnom-REFTEMP)-gmaold)); here->MOS9tCjsw = model->MOS9sideWallCapFactor * capfact; here->MOS9tBulkPot = fact2 * pbo+pbfact; gmanew = (here->MOS9tBulkPot-pbo)/pbo; capfact = (1+model->MOS9bulkJctBotGradingCoeff* (4e-4*(here->MOS9temp-REFTEMP)-gmanew)); here->MOS9tCbd *= capfact; here->MOS9tCbs *= capfact; here->MOS9tCj *= capfact; capfact = (1+model->MOS9bulkJctSideGradingCoeff* (4e-4*(here->MOS9temp-REFTEMP)-gmanew)); here->MOS9tCjsw *= capfact; here->MOS9tDepCap = model->MOS9fwdCapDepCoeff * here->MOS9tBulkPot; if( (model->MOS9jctSatCurDensity == 0) || (here->MOS9drainArea == 0) || (here->MOS9sourceArea == 0) ) { here->MOS9sourceVcrit = here->MOS9drainVcrit = vt*log(vt/(CONSTroot2*here->MOS9m*here->MOS9tSatCur)); } else { here->MOS9drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS9m * here->MOS9tSatCurDens * here->MOS9drainArea)); here->MOS9sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS9m * here->MOS9tSatCurDens * here->MOS9sourceArea)); } if(model->MOS9capBDGiven) { czbd = here->MOS9tCbd * here->MOS9m; } else { if(model->MOS9bulkCapFactorGiven) { czbd=here->MOS9tCj*here->MOS9drainArea * here->MOS9m; } else { czbd=0; } } if(model->MOS9sideWallCapFactorGiven) { czbdsw= here->MOS9tCjsw * here->MOS9drainPerimiter * here->MOS9m; } else { czbdsw=0; } arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9Cbd = czbd; here->MOS9Cbdsw = czbdsw; here->MOS9f2d = czbd*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + czbdsw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3d = czbd * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ here->MOS9tBulkPot + czbdsw * model->MOS9bulkJctSideGradingCoeff * sargsw/arg / here->MOS9tBulkPot; here->MOS9f4d = czbd*here->MOS9tBulkPot*(1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + czbdsw*here->MOS9tBulkPot*(1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3d/2* (here->MOS9tDepCap*here->MOS9tDepCap) -here->MOS9tDepCap * here->MOS9f2d; if(model->MOS9capBSGiven) { czbs = here->MOS9tCbs * here->MOS9m; } else { if(model->MOS9bulkCapFactorGiven) { czbs=here->MOS9tCj*here->MOS9sourceArea * here->MOS9m; } else { czbs=0; } } if(model->MOS9sideWallCapFactorGiven) { czbssw = here->MOS9tCjsw * here->MOS9sourcePerimiter * here->MOS9m; } else { czbssw=0; } arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9Cbs = czbs; here->MOS9Cbssw = czbssw; here->MOS9f2s = czbs*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + czbssw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3s = czbs * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ here->MOS9tBulkPot + czbssw * model->MOS9bulkJctSideGradingCoeff * sargsw/arg / here->MOS9tBulkPot; here->MOS9f4s = czbs*here->MOS9tBulkPot*(1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + czbssw*here->MOS9tBulkPot*(1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3s/2* (here->MOS9tDepCap*here->MOS9tDepCap) -here->MOS9tDepCap * here->MOS9f2s; } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9ask.c0000644000265600020320000004064612264261473020667 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS9ask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MOS9instance *here = (MOS9instance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case MOS9_TEMP: value->rValue = here->MOS9temp-CONSTCtoK; return(OK); case MOS9_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS9capgs); return(OK); case MOS9_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS9capgd); return(OK); case MOS9_M: value->rValue = here->MOS9m; return(OK); case MOS9_L: value->rValue = here->MOS9l; return(OK); case MOS9_W: value->rValue = here->MOS9w; return(OK); case MOS9_AS: value->rValue = here->MOS9sourceArea; return(OK); case MOS9_AD: value->rValue = here->MOS9drainArea; return(OK); case MOS9_PS: value->rValue = here->MOS9sourcePerimiter; return(OK); case MOS9_PD: value->rValue = here->MOS9drainPerimiter; return(OK); case MOS9_NRS: value->rValue = here->MOS9sourceSquares; return(OK); case MOS9_NRD: value->rValue = here->MOS9drainSquares; return(OK); case MOS9_OFF: value->rValue = here->MOS9off; return(OK); case MOS9_IC_VBS: value->rValue = here->MOS9icVBS; return(OK); case MOS9_IC_VDS: value->rValue = here->MOS9icVDS; return(OK); case MOS9_IC_VGS: value->rValue = here->MOS9icVGS; return(OK); case MOS9_DNODE: value->iValue = here->MOS9dNode; return(OK); case MOS9_GNODE: value->iValue = here->MOS9gNode; return(OK); case MOS9_SNODE: value->iValue = here->MOS9sNode; return(OK); case MOS9_BNODE: value->iValue = here->MOS9bNode; return(OK); case MOS9_DNODEPRIME: value->iValue = here->MOS9dNodePrime; return(OK); case MOS9_SNODEPRIME: value->iValue = here->MOS9sNodePrime; return(OK); case MOS9_SOURCECONDUCT: value->rValue = here->MOS9sourceConductance; return(OK); case MOS9_DRAINCONDUCT: value->rValue = here->MOS9drainConductance; return(OK); case MOS9_SOURCERESIST: if (here->MOS9sNodePrime != here->MOS9sNode) value->rValue = 1.0 / here->MOS9sourceConductance; else value->rValue = 0.0; return(OK); case MOS9_DRAINRESIST: if (here->MOS9dNodePrime != here->MOS9dNode) value->rValue = 1.0 / here->MOS9drainConductance; else value->rValue = 0.0; return(OK); case MOS9_VON: value->rValue = here->MOS9von; return(OK); case MOS9_VDSAT: value->rValue = here->MOS9vdsat; return(OK); case MOS9_SOURCEVCRIT: value->rValue = here->MOS9sourceVcrit; return(OK); case MOS9_DRAINVCRIT: value->rValue = here->MOS9drainVcrit; return(OK); case MOS9_CD: value->rValue = here->MOS9cd; return(OK); case MOS9_CBS: value->rValue = here->MOS9cbs; return(OK); case MOS9_CBD: value->rValue = here->MOS9cbd; return(OK); case MOS9_GMBS: value->rValue = here->MOS9gmbs; return(OK); case MOS9_GM: value->rValue = here->MOS9gm; return(OK); case MOS9_GDS: value->rValue = here->MOS9gds; return(OK); case MOS9_GBD: value->rValue = here->MOS9gbd; return(OK); case MOS9_GBS: value->rValue = here->MOS9gbs; return(OK); case MOS9_CAPBD: value->rValue = here->MOS9capbd; return(OK); case MOS9_CAPBS: value->rValue = here->MOS9capbs; return(OK); case MOS9_CAPZEROBIASBD: value->rValue = here->MOS9Cbd; return(OK); case MOS9_CAPZEROBIASBDSW: value->rValue = here->MOS9Cbdsw; return(OK); case MOS9_CAPZEROBIASBS: value->rValue = here->MOS9Cbs; return(OK); case MOS9_CAPZEROBIASBSSW: value->rValue = here->MOS9Cbssw; return(OK); case MOS9_VBD: value->rValue = *(ckt->CKTstate0 + here->MOS9vbd); return(OK); case MOS9_VBS: value->rValue = *(ckt->CKTstate0 + here->MOS9vbs); return(OK); case MOS9_VGS: value->rValue = *(ckt->CKTstate0 + here->MOS9vgs); return(OK); case MOS9_VDS: value->rValue = *(ckt->CKTstate0 + here->MOS9vds); return(OK); case MOS9_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS9capgs); /* add overlap capacitance */ value->rValue += (here->MOS9modPtr->MOS9gateSourceOverlapCapFactor) * here->MOS9m * (here->MOS9w +here->MOS9modPtr->MOS9widthAdjust -2*(here->MOS9modPtr->MOS9widthNarrow)); return(OK); case MOS9_QGS: value->rValue = *(ckt->CKTstate0 + here->MOS9qgs); return(OK); case MOS9_CQGS: value->rValue = *(ckt->CKTstate0 + here->MOS9cqgs); return(OK); case MOS9_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS9capgd); /* add overlap capacitance */ value->rValue += (here->MOS9modPtr->MOS9gateDrainOverlapCapFactor) * here->MOS9m * (here->MOS9w +here->MOS9modPtr->MOS9widthAdjust -2*(here->MOS9modPtr->MOS9widthNarrow)); return(OK); case MOS9_QGD: value->rValue = *(ckt->CKTstate0 + here->MOS9qgd); return(OK); case MOS9_CQGD: value->rValue = *(ckt->CKTstate0 + here->MOS9cqgd); return(OK); case MOS9_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS9capgb); /* add overlap capacitance */ value->rValue += (here->MOS9modPtr->MOS9gateBulkOverlapCapFactor) * here->MOS9m * (here->MOS9l +here->MOS9modPtr->MOS9lengthAdjust -2*(here->MOS9modPtr->MOS9latDiff)); return(OK); case MOS9_QGB: value->rValue = *(ckt->CKTstate0 + here->MOS9qgb); return(OK); case MOS9_CQGB: value->rValue = *(ckt->CKTstate0 + here->MOS9cqgb); return(OK); case MOS9_QBD: value->rValue = *(ckt->CKTstate0 + here->MOS9qbd); return(OK); case MOS9_CQBD: value->rValue = *(ckt->CKTstate0 + here->MOS9cqbd); return(OK); case MOS9_QBS: value->rValue = *(ckt->CKTstate0 + here->MOS9qbs); return(OK); case MOS9_CQBS: value->rValue = *(ckt->CKTstate0 + here->MOS9cqbs); return(OK); case MOS9_L_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS9senParmNo); } return(OK); case MOS9_L_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo); } return(OK); case MOS9_L_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo); } return(OK); case MOS9_L_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS9_L_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS9_L_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo); } return(OK); case MOS9_W_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); } return(OK); case MOS9_W_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); } return(OK); case MOS9_W_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); } return(OK); case MOS9_W_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MOS9_W_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MOS9_W_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MOS9senParmNo + here->MOS9sens_l); } return(OK); case MOS9_CB : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS9ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = here->MOS9cbd + here->MOS9cbs - *(ckt->CKTstate0 + here->MOS9cqgb); } return(OK); case MOS9_CG : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS9ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else if (ckt->CKTcurrentAnalysis & (DOING_DCOP | DOING_TRCV)) { value->rValue = 0; } else if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && (ckt->CKTmode & MODETRANOP)) { value->rValue = 0; } else { value->rValue = *(ckt->CKTstate0 + here->MOS9cqgb) + *(ckt->CKTstate0 + here->MOS9cqgd) + *(ckt->CKTstate0 + here->MOS9cqgs); } return(OK); case MOS9_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS9ask.c"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -here->MOS9cd; value->rValue -= here->MOS9cbd + here->MOS9cbs - *(ckt->CKTstate0 + here->MOS9cqgb); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue -= *(ckt->CKTstate0 + here->MOS9cqgb) + *(ckt->CKTstate0 + here->MOS9cqgd) + *(ckt->CKTstate0 + here->MOS9cqgs); } } return(OK); case MOS9_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "MOS9ask.c"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { double temp; value->rValue = here->MOS9cd * *(ckt->CKTrhsOld + here->MOS9dNode); value->rValue += (here->MOS9cbd + here->MOS9cbs - *(ckt->CKTstate0 + here->MOS9cqgb)) * *(ckt->CKTrhsOld + here->MOS9bNode); if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { value->rValue += (*(ckt->CKTstate0 + here->MOS9cqgb) + *(ckt->CKTstate0 + here->MOS9cqgd) + *(ckt->CKTstate0 + here->MOS9cqgs)) * *(ckt->CKTrhsOld + here->MOS9gNode); } temp = -here->MOS9cd; temp -= here->MOS9cbd + here->MOS9cbs ; if ((ckt->CKTcurrentAnalysis & DOING_TRAN) && !(ckt->CKTmode & MODETRANOP)) { temp -= *(ckt->CKTstate0 + here->MOS9cqgb) + *(ckt->CKTstate0 + here->MOS9cqgd) + *(ckt->CKTstate0 + here->MOS9cqgs); } value->rValue += temp * *(ckt->CKTrhsOld + here->MOS9sNode); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos9/mos9mask.c0000644000265600020320000001215712264261473021040 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MOS9mAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { MOS9model *here = (MOS9model *)inst; NG_IGNORE(ckt); switch(which) { case MOS9_MOD_TNOM: value->rValue = here->MOS9tnom-CONSTCtoK; return(OK); case MOS9_MOD_VTO: value->rValue = here->MOS9vt0; return(OK); case MOS9_MOD_KP: value->rValue = here->MOS9transconductance; return(OK); case MOS9_MOD_GAMMA: value->rValue = here->MOS9gamma; return(OK); case MOS9_MOD_PHI: value->rValue = here->MOS9phi; return(OK); case MOS9_MOD_RD: value->rValue = here->MOS9drainResistance; return(OK); case MOS9_MOD_RS: value->rValue = here->MOS9sourceResistance; return(OK); case MOS9_MOD_CBD: value->rValue = here->MOS9capBD; return(OK); case MOS9_MOD_CBS: value->rValue = here->MOS9capBS; return(OK); case MOS9_MOD_IS: value->rValue = here->MOS9jctSatCur; return(OK); case MOS9_MOD_PB: value->rValue = here->MOS9bulkJctPotential; return(OK); case MOS9_MOD_CGSO: value->rValue = here->MOS9gateSourceOverlapCapFactor; return(OK); case MOS9_MOD_CGDO: value->rValue = here->MOS9gateDrainOverlapCapFactor; return(OK); case MOS9_MOD_CGBO: value->rValue = here->MOS9gateBulkOverlapCapFactor; return(OK); case MOS9_MOD_CJ: value->rValue = here->MOS9bulkCapFactor; return(OK); case MOS9_MOD_MJ: value->rValue = here->MOS9bulkJctBotGradingCoeff; return(OK); case MOS9_MOD_CJSW: value->rValue = here->MOS9sideWallCapFactor; return(OK); case MOS9_MOD_MJSW: value->rValue = here->MOS9bulkJctSideGradingCoeff; return(OK); case MOS9_MOD_JS: value->rValue = here->MOS9jctSatCurDensity; return(OK); case MOS9_MOD_TOX: value->rValue = here->MOS9oxideThickness; return(OK); case MOS9_MOD_LD: value->rValue = here->MOS9latDiff; return(OK); case MOS9_MOD_XL: value->rValue = here->MOS9lengthAdjust; return(OK); case MOS9_MOD_WD: value->rValue = here->MOS9widthNarrow; return(OK); case MOS9_MOD_XW: value->rValue = here->MOS9widthAdjust; return(OK); case MOS9_MOD_DELVTO: value->rValue = here->MOS9delvt0; return(OK); case MOS9_MOD_RSH: value->rValue = here->MOS9sheetResistance; return(OK); case MOS9_MOD_U0: value->rValue = here->MOS9surfaceMobility; return(OK); case MOS9_MOD_FC: value->rValue = here->MOS9fwdCapDepCoeff; return(OK); case MOS9_MOD_NSUB: value->rValue = here->MOS9substrateDoping; return(OK); case MOS9_MOD_TPG: value->iValue = here->MOS9gateType; return(OK); case MOS9_MOD_NSS: value->rValue = here->MOS9surfaceStateDensity; return(OK); case MOS9_MOD_NFS: value->rValue = here->MOS9fastSurfaceStateDensity; return(OK); case MOS9_MOD_DELTA: value->rValue = here->MOS9narrowFactor; return(OK); case MOS9_MOD_VMAX: value->rValue = here->MOS9maxDriftVel; return(OK); case MOS9_MOD_XJ: value->rValue = here->MOS9junctionDepth; return(OK); case MOS9_MOD_ETA: value->rValue = here->MOS9eta; return(OK); case MOS9_MOD_XD: value->rValue = here->MOS9coeffDepLayWidth; return(OK); case MOS9_DELTA: value->rValue = here->MOS9delta; return(OK); case MOS9_MOD_THETA: value->rValue = here->MOS9theta; return(OK); case MOS9_MOD_ALPHA: value->rValue = here->MOS9alpha; return(OK); case MOS9_MOD_KAPPA: value->rValue = here->MOS9kappa; return(OK); case MOS9_MOD_KF: value->rValue = here->MOS9fNcoef; return(OK); case MOS9_MOD_AF: value->rValue = here->MOS9fNexp; return(OK); case MOS9_MOD_TYPE: if (here->MOS9type > 0) value->sValue = "nmos"; else value->sValue = "pmos"; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/mos9/mos9trun.c0000644000265600020320000000140312264261473021065 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; for( ; model != NULL; model = model->MOS9nextModel) { for(here=model->MOS9instances;here!=NULL;here = here->MOS9nextInstance){ CKTterr(here->MOS9qgs,ckt,timeStep); CKTterr(here->MOS9qgd,ckt,timeStep); CKTterr(here->MOS9qgb,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9noi.c0000644000265600020320000001460412264261473020671 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "mos9defs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * MOS9noise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ int MOS9noise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; MOS9model *firstModel = (MOS9model *) genmodel; MOS9model *model; MOS9instance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[MOS9NSRCS]; double lnNdens[MOS9NSRCS]; int i; /* define the names of the noise sources */ static char *MOS9nNames[MOS9NSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with the index definitions */ "_rs", /* noise due to rs */ /* in MOS9defs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->MOS9nextModel) { for (inst=model->MOS9instances; inst != NULL; inst=inst->MOS9nextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < MOS9NSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->MOS9name,MOS9nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < MOS9NSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->MOS9name,MOS9nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->MOS9name,MOS9nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[MOS9RDNOIZ],&lnNdens[MOS9RDNOIZ], ckt,THERMNOISE,inst->MOS9dNodePrime,inst->MOS9dNode, inst->MOS9drainConductance); NevalSrc(&noizDens[MOS9RSNOIZ],&lnNdens[MOS9RSNOIZ], ckt,THERMNOISE,inst->MOS9sNodePrime,inst->MOS9sNode, inst->MOS9sourceConductance); NevalSrc(&noizDens[MOS9IDNOIZ],&lnNdens[MOS9IDNOIZ], ckt,THERMNOISE,inst->MOS9dNodePrime,inst->MOS9sNodePrime, (2.0/3.0 * fabs(inst->MOS9gm))); NevalSrc(&noizDens[MOS9FLNOIZ], NULL, ckt, N_GAIN,inst->MOS9dNodePrime, inst->MOS9sNodePrime, (double)0.0); noizDens[MOS9FLNOIZ] *= model->MOS9fNcoef * exp(model->MOS9fNexp * log(MAX(fabs(inst->MOS9cd),N_MINLOG))) / (data->freq * (inst->MOS9w - 2*model->MOS9widthNarrow) * inst->MOS9m * (inst->MOS9l - 2*model->MOS9latDiff) * model->MOS9oxideCapFactor * model->MOS9oxideCapFactor); lnNdens[MOS9FLNOIZ] = log(MAX(noizDens[MOS9FLNOIZ],N_MINLOG)); noizDens[MOS9TOTNOIZ] = noizDens[MOS9RDNOIZ] + noizDens[MOS9RSNOIZ] + noizDens[MOS9IDNOIZ] + noizDens[MOS9FLNOIZ]; lnNdens[MOS9TOTNOIZ] = log(MAX(noizDens[MOS9TOTNOIZ], N_MINLOG)); *OnDens += noizDens[MOS9TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < MOS9NSRCS; i++) { inst->MOS9nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < MOS9NSRCS; i++) { inst->MOS9nVar[OUTNOIZ][i] = 0.0; inst->MOS9nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < MOS9NSRCS; i++) { if (i != MOS9TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->MOS9nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->MOS9nVar[LNLSTDENS][i] + data->lnGainInv, data); inst->MOS9nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->MOS9nVar[OUTNOIZ][i] += tempOnoise; inst->MOS9nVar[OUTNOIZ][MOS9TOTNOIZ] += tempOnoise; inst->MOS9nVar[INNOIZ][i] += tempInoise; inst->MOS9nVar[INNOIZ][MOS9TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < MOS9NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < MOS9NSRCS; i++) { data->outpVector[data->outNumber++] = inst->MOS9nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->MOS9nVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9init.c0000644000265600020320000000415312264261473021045 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "mos9itf.h" #include "mos9ext.h" #include "mos9init.h" SPICEdev MOS9info = { { "Mos9", "Modified Level 3 MOSfet model", &MOS9nSize, &MOS9nSize, MOS9names, &MOS9pTSize, MOS9pTable, &MOS9mPTSize, MOS9mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ MOS9param, /* DEVmodParam */ MOS9mParam, /* DEVload */ MOS9load, /* DEVsetup */ MOS9setup, /* DEVunsetup */ MOS9unsetup, /* DEVpzSetup */ MOS9setup, /* DEVtemperature*/ MOS9temp, /* DEVtrunc */ MOS9trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ MOS9acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MOS9destroy, /* DEVmodDelete */ MOS9mDelete, /* DEVdelete */ MOS9delete, /* DEVsetic */ MOS9getic, /* DEVask */ MOS9ask, /* DEVmodAsk */ MOS9mAsk, /* DEVpzLoad */ MOS9pzLoad, /* DEVconvTest */ MOS9convTest, /* DEVsenSetup */ MOS9sSetup, /* DEVsenLoad */ MOS9sLoad, /* DEVsenUpdate */ MOS9sUpdate, /* DEVsenAcLoad */ MOS9sAcLoad, /* DEVsenPrint */ MOS9sPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ MOS9disto, /* DEVnoise */ MOS9noise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &MOS9iSize, /* DEVmodSize */ &MOS9mSize }; SPICEdev * get_mos9_info(void) { return &MOS9info; } ngspice-26/src/spicelib/devices/mos9/mos9set.c0000644000265600020320000002270712264261473020702 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* assuming silicon - make definition for epsilon of silicon */ #define EPSSIL (11.7 * 8.854214871e-12) int MOS9setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the MOS9 device structure with those pointers needed later * for fast matrix loading */ { register MOS9model *model = (MOS9model *)inModel; register MOS9instance *here; int error; CKTnode *tmp; /* loop through all the MOS9 device models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* perform model defaulting */ if(!model->MOS9typeGiven) { model->MOS9type = NMOS; } if(!model->MOS9latDiffGiven) { model->MOS9latDiff = 0; } if(!model->MOS9lengthAdjustGiven) { model->MOS9lengthAdjust = 0; } if(!model->MOS9widthNarrowGiven) { model->MOS9widthNarrow = 0; } if(!model->MOS9widthAdjustGiven) { model->MOS9widthAdjust = 0; } if(!model->MOS9delvt0Given) { model->MOS9delvt0 = 0; } if(!model->MOS9jctSatCurDensityGiven) { model->MOS9jctSatCurDensity = 0; } if(!model->MOS9jctSatCurGiven) { model->MOS9jctSatCur = 1e-14; } if(!model->MOS9drainResistanceGiven) { model->MOS9drainResistance = 0; } if(!model->MOS9sourceResistanceGiven) { model->MOS9sourceResistance = 0; } if(!model->MOS9sheetResistanceGiven) { model->MOS9sheetResistance = 0; } if(!model->MOS9transconductanceGiven) { model->MOS9transconductance = 2e-5; } if(!model->MOS9gateSourceOverlapCapFactorGiven) { model->MOS9gateSourceOverlapCapFactor = 0; } if(!model->MOS9gateDrainOverlapCapFactorGiven) { model->MOS9gateDrainOverlapCapFactor = 0; } if(!model->MOS9gateBulkOverlapCapFactorGiven) { model->MOS9gateBulkOverlapCapFactor = 0; } if(!model->MOS9vt0Given) { model->MOS9vt0 = 0; } if(!model->MOS9capBDGiven) { model->MOS9capBD = 0; } if(!model->MOS9capBSGiven) { model->MOS9capBS = 0; } if(!model->MOS9bulkCapFactorGiven) { model->MOS9bulkCapFactor = 0; } if(!model->MOS9sideWallCapFactorGiven) { model->MOS9sideWallCapFactor = 0; } if(!model->MOS9bulkJctPotentialGiven) { model->MOS9bulkJctPotential = .8; } if(!model->MOS9bulkJctBotGradingCoeffGiven) { model->MOS9bulkJctBotGradingCoeff = .5; } if(!model->MOS9bulkJctSideGradingCoeffGiven) { model->MOS9bulkJctSideGradingCoeff = .33; } if(!model->MOS9fwdCapDepCoeffGiven) { model->MOS9fwdCapDepCoeff = .5; } if(!model->MOS9phiGiven) { model->MOS9phi = .6; } if(!model->MOS9gammaGiven) { model->MOS9gamma = 0; } if(!model->MOS9deltaGiven) { model->MOS9delta = 0; } if(!model->MOS9maxDriftVelGiven) { model->MOS9maxDriftVel = 0; } if(!model->MOS9junctionDepthGiven) { model->MOS9junctionDepth = 0; } if(!model->MOS9fastSurfaceStateDensityGiven) { model->MOS9fastSurfaceStateDensity = 0; } if(!model->MOS9etaGiven) { model->MOS9eta = 0; } if(!model->MOS9thetaGiven) { model->MOS9theta = 0; } if(!model->MOS9kappaGiven) { model->MOS9kappa = .2; } if(!model->MOS9oxideThicknessGiven) { model->MOS9oxideThickness = 1e-7; } if(!model->MOS9fNcoefGiven) { model->MOS9fNcoef = 0; } if(!model->MOS9fNexpGiven) { model->MOS9fNexp = 1; } /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { CKTnode *tmpNode; IFuid tmpName; /* allocate a chunk of the state vector */ here->MOS9states = *states; *states += MOS9NUMSTATES; if(!here->MOS9drainAreaGiven) { here->MOS9drainArea = ckt->CKTdefaultMosAD; } if(!here->MOS9drainPerimiterGiven) { here->MOS9drainPerimiter = 0; } if(!here->MOS9drainSquaresGiven) { here->MOS9drainSquares = 1; } if(!here->MOS9icVBSGiven) { here->MOS9icVBS = 0; } if(!here->MOS9icVDSGiven) { here->MOS9icVDS = 0; } if(!here->MOS9icVGSGiven) { here->MOS9icVGS = 0; } if(!here->MOS9sourcePerimiterGiven) { here->MOS9sourcePerimiter = 0; } if(!here->MOS9sourceSquaresGiven) { here->MOS9sourceSquares = 1; } if(!here->MOS9vdsatGiven) { here->MOS9vdsat = 0; } if(!here->MOS9vonGiven) { here->MOS9von = 0; } if(!here->MOS9modeGiven) { here->MOS9mode = 1; } if((model->MOS9drainResistance != 0 || (model->MOS9sheetResistance != 0 && here->MOS9drainSquares != 0 ) )) { if (here->MOS9dNodePrime==0) { error = CKTmkVolt(ckt,&tmp,here->MOS9name,"internal#drain"); if(error) return(error); here->MOS9dNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS9dNodePrime = here->MOS9dNode; } if((model->MOS9sourceResistance != 0 || (model->MOS9sheetResistance != 0 && here->MOS9sourceSquares != 0 ) )) { if (here->MOS9sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->MOS9name,"internal#source"); if(error) return(error); here->MOS9sNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->MOS9sNodePrime = here->MOS9sNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MOS9DdPtr, MOS9dNode, MOS9dNode); TSTALLOC(MOS9GgPtr, MOS9gNode, MOS9gNode); TSTALLOC(MOS9SsPtr, MOS9sNode, MOS9sNode); TSTALLOC(MOS9BbPtr, MOS9bNode, MOS9bNode); TSTALLOC(MOS9DPdpPtr, MOS9dNodePrime, MOS9dNodePrime); TSTALLOC(MOS9SPspPtr, MOS9sNodePrime, MOS9sNodePrime); TSTALLOC(MOS9DdpPtr, MOS9dNode, MOS9dNodePrime); TSTALLOC(MOS9GbPtr, MOS9gNode, MOS9bNode); TSTALLOC(MOS9GdpPtr, MOS9gNode, MOS9dNodePrime); TSTALLOC(MOS9GspPtr, MOS9gNode, MOS9sNodePrime); TSTALLOC(MOS9SspPtr, MOS9sNode, MOS9sNodePrime); TSTALLOC(MOS9BdpPtr, MOS9bNode, MOS9dNodePrime); TSTALLOC(MOS9BspPtr, MOS9bNode, MOS9sNodePrime); TSTALLOC(MOS9DPspPtr, MOS9dNodePrime, MOS9sNodePrime); TSTALLOC(MOS9DPdPtr, MOS9dNodePrime, MOS9dNode); TSTALLOC(MOS9BgPtr, MOS9bNode, MOS9gNode); TSTALLOC(MOS9DPgPtr, MOS9dNodePrime, MOS9gNode); TSTALLOC(MOS9SPgPtr, MOS9sNodePrime, MOS9gNode); TSTALLOC(MOS9SPsPtr, MOS9sNodePrime, MOS9sNode); TSTALLOC(MOS9DPbPtr, MOS9dNodePrime, MOS9bNode); TSTALLOC(MOS9SPbPtr, MOS9sNodePrime, MOS9bNode); TSTALLOC(MOS9SPdpPtr, MOS9sNodePrime, MOS9dNodePrime); } } return(OK); } int MOS9unsetup(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model; MOS9instance *here; for (model = (MOS9model *)inModel; model != NULL; model = model->MOS9nextModel) { for (here = model->MOS9instances; here != NULL; here=here->MOS9nextInstance) { if (here->MOS9dNodePrime && here->MOS9dNodePrime != here->MOS9dNode) { CKTdltNNum(ckt, here->MOS9dNodePrime); here->MOS9dNodePrime= 0; } if (here->MOS9sNodePrime && here->MOS9sNodePrime != here->MOS9sNode) { CKTdltNNum(ckt, here->MOS9sNodePrime); here->MOS9sNodePrime= 0; } } } return OK; } ngspice-26/src/spicelib/devices/mos9/mos9itf.h0000644000265600020320000000026112264261473020665 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_MOS9 #define DEV_MOS9 SPICEdev *get_mos9_info(void); #endif ngspice-26/src/spicelib/devices/mos9/mos9mpar.c0000644000265600020320000001517212264261473021044 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9mParam(int param, IFvalue *value, GENmodel *inModel) { register MOS9model *model = (MOS9model *)inModel; switch(param) { case MOS9_MOD_VTO: model->MOS9vt0 = value->rValue; model->MOS9vt0Given = TRUE; break; case MOS9_MOD_KP: model->MOS9transconductance = value->rValue; model->MOS9transconductanceGiven = TRUE; break; case MOS9_MOD_GAMMA: model->MOS9gamma = value->rValue; model->MOS9gammaGiven = TRUE; break; case MOS9_MOD_PHI: model->MOS9phi = value->rValue; model->MOS9phiGiven = TRUE; break; case MOS9_MOD_RD: model->MOS9drainResistance = value->rValue; model->MOS9drainResistanceGiven = TRUE; break; case MOS9_MOD_RS: model->MOS9sourceResistance = value->rValue; model->MOS9sourceResistanceGiven = TRUE; break; case MOS9_MOD_CBD: model->MOS9capBD = value->rValue; model->MOS9capBDGiven = TRUE; break; case MOS9_MOD_CBS: model->MOS9capBS = value->rValue; model->MOS9capBSGiven = TRUE; break; case MOS9_MOD_IS: model->MOS9jctSatCur = value->rValue; model->MOS9jctSatCurGiven = TRUE; break; case MOS9_MOD_PB: model->MOS9bulkJctPotential = value->rValue; model->MOS9bulkJctPotentialGiven = TRUE; break; case MOS9_MOD_CGSO: model->MOS9gateSourceOverlapCapFactor = value->rValue; model->MOS9gateSourceOverlapCapFactorGiven = TRUE; break; case MOS9_MOD_CGDO: model->MOS9gateDrainOverlapCapFactor = value->rValue; model->MOS9gateDrainOverlapCapFactorGiven = TRUE; break; case MOS9_MOD_CGBO: model->MOS9gateBulkOverlapCapFactor = value->rValue; model->MOS9gateBulkOverlapCapFactorGiven = TRUE; break; case MOS9_MOD_RSH: model->MOS9sheetResistance = value->rValue; model->MOS9sheetResistanceGiven = TRUE; break; case MOS9_MOD_CJ: model->MOS9bulkCapFactor = value->rValue; model->MOS9bulkCapFactorGiven = TRUE; break; case MOS9_MOD_MJ: model->MOS9bulkJctBotGradingCoeff = value->rValue; model->MOS9bulkJctBotGradingCoeffGiven = TRUE; break; case MOS9_MOD_CJSW: model->MOS9sideWallCapFactor = value->rValue; model->MOS9sideWallCapFactorGiven = TRUE; break; case MOS9_MOD_MJSW: model->MOS9bulkJctSideGradingCoeff = value->rValue; model->MOS9bulkJctSideGradingCoeffGiven = TRUE; break; case MOS9_MOD_JS: model->MOS9jctSatCurDensity = value->rValue; model->MOS9jctSatCurDensityGiven = TRUE; break; case MOS9_MOD_TOX: model->MOS9oxideThickness = value->rValue; model->MOS9oxideThicknessGiven = TRUE; break; case MOS9_MOD_LD: model->MOS9latDiff = value->rValue; model->MOS9latDiffGiven = TRUE; break; case MOS9_MOD_XL: model->MOS9lengthAdjust = value->rValue; model->MOS9lengthAdjustGiven = TRUE; break; case MOS9_MOD_WD: model->MOS9widthNarrow = value->rValue; model->MOS9widthNarrowGiven = TRUE; break; case MOS9_MOD_XW: model->MOS9widthAdjust = value->rValue; model->MOS9widthAdjustGiven = TRUE; break; case MOS9_MOD_DELVTO: model->MOS9delvt0 = value->rValue; model->MOS9delvt0Given = TRUE; break; case MOS9_MOD_U0: model->MOS9surfaceMobility = value->rValue; model->MOS9surfaceMobilityGiven = TRUE; break; case MOS9_MOD_FC: model->MOS9fwdCapDepCoeff = value->rValue; model->MOS9fwdCapDepCoeffGiven = TRUE; break; case MOS9_MOD_NSUB: model->MOS9substrateDoping = value->rValue; model->MOS9substrateDopingGiven = TRUE; break; case MOS9_MOD_TPG: model->MOS9gateType = value->iValue; model->MOS9gateTypeGiven = TRUE; break; case MOS9_MOD_NSS: model->MOS9surfaceStateDensity = value->rValue; model->MOS9surfaceStateDensityGiven = TRUE; break; case MOS9_MOD_ETA: model->MOS9eta = value->rValue; model->MOS9etaGiven = TRUE; break; case MOS9_MOD_DELTA: model->MOS9delta = value->rValue; model->MOS9deltaGiven = TRUE; break; case MOS9_MOD_NFS: model->MOS9fastSurfaceStateDensity = value->rValue; model->MOS9fastSurfaceStateDensityGiven = TRUE; break; case MOS9_MOD_THETA: model->MOS9theta = value->rValue; model->MOS9thetaGiven = TRUE; break; case MOS9_MOD_VMAX: model->MOS9maxDriftVel = value->rValue; model->MOS9maxDriftVelGiven = TRUE; break; case MOS9_MOD_KAPPA: model->MOS9kappa = value->rValue; model->MOS9kappaGiven = TRUE; break; case MOS9_MOD_NMOS: if(value->iValue) { model->MOS9type = 1; model->MOS9typeGiven = TRUE; } break; case MOS9_MOD_PMOS: if(value->iValue) { model->MOS9type = -1; model->MOS9typeGiven = TRUE; } break; case MOS9_MOD_XJ: model->MOS9junctionDepth = value->rValue; model->MOS9junctionDepthGiven = TRUE; break; case MOS9_MOD_TNOM: model->MOS9tnom = value->rValue+CONSTCtoK; model->MOS9tnomGiven = TRUE; break; case MOS9_MOD_KF: model->MOS9fNcoef = value->rValue; model->MOS9fNcoefGiven = TRUE; break; case MOS9_MOD_AF: model->MOS9fNexp = value->rValue; model->MOS9fNexpGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9sset.c0000644000265600020320000000263712264261473021065 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie This function is obsolete (was used by an old sensitivity analysis) **********/ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9sSetup(SENstruct *info, GENmodel *inModel) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; /* loop through all the models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { if(here->MOS9senParmNo){ if((here->MOS9sens_l)&&(here->MOS9sens_w)){ here->MOS9senParmNo = ++(info->SENparms); ++(info->SENparms);/* MOS has two design parameters */ } else{ here->MOS9senParmNo = ++(info->SENparms); } } here->MOS9senPertFlag = OFF; if((here->MOS9sens = TMALLOC(double, 72)) == NULL) { return(E_NOMEM); } } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9mdel.c0000644000265600020320000000201712264261473021020 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MOS9model **model = (MOS9model **)inModel; MOS9model *modfast = (MOS9model *)kill; MOS9instance *here; MOS9instance *prev = NULL; MOS9model **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MOS9nextModel)) { if( (*model)->MOS9modName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MOS9nextModel; /* cut deleted device out of list */ for(here = (*model)->MOS9instances ; here ; here = here->MOS9nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9supd.c0000644000265600020320000001555612264261473021066 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9sUpdate(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; int iparmno; double sb; double sg; double sdprm; double ssprm; double sxpgs; double sxpgd; double sxpbs; double sxpbd; double sxpgb; double dummy1; double dummy2; SENstruct *info; if(ckt->CKTtime == 0) return(OK); info = ckt->CKTsenInfo; #ifdef SENSDEBUG printf("MOS9senupdate\n"); printf("CKTtime = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ sxpgs = 0; sxpgd = 0; sxpbs = 0; sxpbd = 0; sxpgb = 0; dummy1 = 0; dummy2 = 0; /* loop through all the MOS9 models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { #ifdef SENSDEBUG printf("senupdate instance name %s\n",here->MOS9name); printf("before loading\n"); printf("CKTag[0] = %.2e,CKTag[1] = %.2e\n", ckt->CKTag[0],ckt->CKTag[1]); printf("capgs = %.7e\n",here->MOS9cgs); printf("capgd = %.7e\n",here->MOS9cgd); printf("capgb = %.7e\n",here->MOS9cgb); printf("capbs = %.7e\n",here->MOS9capbs); printf("capbd = %.7e\n",here->MOS9capbd); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ sb = *(info->SEN_Sap[here->MOS9bNode] + iparmno); sg = *(info->SEN_Sap[here->MOS9gNode] + iparmno); ssprm = *(info->SEN_Sap[here->MOS9sNodePrime] + iparmno); sdprm = *(info->SEN_Sap[here->MOS9dNodePrime] + iparmno); #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sb = %.7e,sg = %.7e\n",sb,sg); printf("ssprm = %.7e,sdprm = %.7e\n",ssprm,sdprm); #endif /* SENSDEBUG */ sxpgs = (sg - ssprm) * here->MOS9cgs ; sxpgd = (sg - sdprm) * here->MOS9cgd ; sxpgb = (sg - sb) * here->MOS9cgb ; sxpbs = (sb - ssprm) * here->MOS9capbs ; sxpbd = (sb - sdprm) * here->MOS9capbd ; if(here->MOS9sens_l && (iparmno == here->MOS9senParmNo)){ sxpgs += *(here->MOS9dphigs_dl); sxpgd += *(here->MOS9dphigd_dl); sxpbs += *(here->MOS9dphibs_dl); sxpbd += *(here->MOS9dphibd_dl); sxpgb += *(here->MOS9dphigb_dl); } if(here->MOS9sens_w && (iparmno == (here->MOS9senParmNo+here->MOS9sens_l))){ sxpgs += *(here->MOS9dphigs_dw); sxpgd += *(here->MOS9dphigd_dw); sxpbs += *(here->MOS9dphibs_dw); sxpbd += *(here->MOS9dphibd_dw); sxpgb += *(here->MOS9dphigb_dw); } if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->MOS9sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate1 + here->MOS9sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate1 + here->MOS9sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate1 + here->MOS9sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate1 + here->MOS9sensxpgb + 10 * (iparmno - 1)) = sxpgb; *(ckt->CKTstate1 + here->MOS9sensxpgs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS9sensxpgd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS9sensxpbs + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS9sensxpbd + 10 * (iparmno - 1) + 1) = 0; *(ckt->CKTstate1 + here->MOS9sensxpgb + 10 * (iparmno - 1) + 1) = 0; goto next; } *(ckt->CKTstate0 + here->MOS9sensxpgs + 10 * (iparmno - 1)) = sxpgs; *(ckt->CKTstate0 + here->MOS9sensxpgd + 10 * (iparmno - 1)) = sxpgd; *(ckt->CKTstate0 + here->MOS9sensxpbs + 10 * (iparmno - 1)) = sxpbs; *(ckt->CKTstate0 + here->MOS9sensxpbd + 10 * (iparmno - 1)) = sxpbd; *(ckt->CKTstate0 + here->MOS9sensxpgb + 10 * (iparmno - 1)) = sxpgb; NIintegrate(ckt,&dummy1,&dummy2,here->MOS9cgs, here->MOS9sensxpgs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS9cgd, here->MOS9sensxpgd + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS9cgb, here->MOS9sensxpgb + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS9capbs, here->MOS9sensxpbs + 10*(iparmno -1)); NIintegrate(ckt,&dummy1,&dummy2,here->MOS9capbd, here->MOS9sensxpbd + 10*(iparmno -1)); next: ; #ifdef SENSDEBUG printf("after loading\n"); printf("sxpgs = %.7e,sdotxpgs = %.7e\n", sxpgs,*(ckt->CKTstate0 + here->MOS9sensxpgs + 10 * (iparmno - 1) + 1)); printf("sxpgd = %.7e,sdotxpgd = %.7e\n", sxpgd,*(ckt->CKTstate0 + here->MOS9sensxpgd + 10 * (iparmno - 1) + 1)); printf("sxpgb = %.7e,sdotxpgb = %.7e\n", sxpgb,*(ckt->CKTstate0 + here->MOS9sensxpgb + 10 * (iparmno - 1) + 1)); printf("sxpbs = %.7e,sdotxpbs = %.7e\n", sxpbs,*(ckt->CKTstate0 + here->MOS9sensxpbs + 10 * (iparmno - 1) + 1)); printf("sxpbd = %.7e,sdotxpbd = %.7e\n", sxpbd,*(ckt->CKTstate0 + here->MOS9sensxpbd + 10 * (iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } #ifdef SENSDEBUG printf("MOS9senupdate end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9load.c0000644000265600020320000014575312264261473021035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos9defs.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9load(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; double Beta; double DrainSatCur; double EffectiveLength; double EffectiveWidth; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cbhat; double cdhat; double cdrain; double cdreq; double ceq; double ceqbd; double ceqbs; double ceqgb; double ceqgd; double ceqgs; double delvbd; double delvbs; double delvds; double delvgd; double delvgs; double evbd; double evbs; double gcgb; double gcgd; double gcgs; double geq; double sarg; double sargsw; double vbd; double vbs; double vds; double vdsat; double vgb1; double vgb; double vgd1; double vgd; double vgdo; double vgs1; double vgs; double von; #ifndef PREDICTOR double xfact = 0.0; #endif int xnrm; int xrev; double capgs = 0.0; /* total gate-source capacitance */ double capgd = 0.0; /* total gate-drain capacitance */ double capgb = 0.0; /* total gate-bulk capacitance */ int Check; #ifndef NOBYPASS double tempv; #endif /*NOBYPASS*/ int error; #ifdef CAPBYPASS int senflag; #endif /* CAPBYPASS */ int SenCond; double vt; /* vt at instance temperature */ #ifdef CAPBYPASS senflag = 0; #endif /* CAPBYPASS */ if(ckt->CKTsenInfo){ if(ckt->CKTsenInfo->SENstatus == PERTURBATION) { if((ckt->CKTsenInfo->SENmode == ACSEN)|| (ckt->CKTsenInfo->SENmode == TRANSEN)){ #ifdef CAPBYPASS senflag = 1; #endif /* CAPBYPASS */ } goto next; } } /* loop through all the MOS9 device models */ next: for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { vt = CONSTKoverQ * here->MOS9temp; Check=1; if(ckt->CKTsenInfo){ #ifdef SENSDEBUG printf("MOS9load \n"); #endif /* SENSDEBUG */ if(ckt->CKTsenInfo->SENstatus == PERTURBATION) if(here->MOS9senPertFlag == OFF)continue; } SenCond = ckt->CKTsenInfo && here->MOS9senPertFlag; /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveWidth=here->MOS9w-2*model->MOS9widthNarrow+ model->MOS9widthAdjust; EffectiveLength=here->MOS9l - 2*model->MOS9latDiff+ model->MOS9lengthAdjust; if( (here->MOS9tSatCurDens == 0) || (here->MOS9drainArea == 0) || (here->MOS9sourceArea == 0)) { DrainSatCur = here->MOS9m * here->MOS9tSatCur; SourceSatCur = here->MOS9m * here->MOS9tSatCur; } else { DrainSatCur = here->MOS9m * here->MOS9tSatCurDens * here->MOS9drainArea; SourceSatCur = here->MOS9m * here->MOS9tSatCurDens * here->MOS9sourceArea; } GateSourceOverlapCap = model->MOS9gateSourceOverlapCapFactor * here->MOS9m * EffectiveWidth; GateDrainOverlapCap = model->MOS9gateDrainOverlapCapFactor * here->MOS9m * EffectiveWidth; GateBulkOverlapCap = model->MOS9gateBulkOverlapCapFactor * here->MOS9m * EffectiveLength; Beta = here->MOS9tTransconductance * here->MOS9m * EffectiveWidth/EffectiveLength; OxideCap = model->MOS9oxideCapFactor * EffectiveLength * here->MOS9m * EffectiveWidth; if(SenCond){ #ifdef SENSDEBUG printf("MOS9senPertFlag = ON \n"); #endif /* SENSDEBUG */ if((ckt->CKTsenInfo->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) { vgs = *(ckt->CKTstate1 + here->MOS9vgs); vds = *(ckt->CKTstate1 + here->MOS9vds); vbs = *(ckt->CKTstate1 + here->MOS9vbs); vbd = *(ckt->CKTstate1 + here->MOS9vbd); vgb = vgs - vbs; vgd = vgs - vds; } else if (ckt->CKTsenInfo->SENmode == ACSEN){ vgb = model->MOS9type * ( *(ckt->CKTrhsOp+here->MOS9gNode) - *(ckt->CKTrhsOp+here->MOS9bNode)); vbs = *(ckt->CKTstate0 + here->MOS9vbs); vbd = *(ckt->CKTstate0 + here->MOS9vbd); vgd = vgb + vbd ; vgs = vgb + vbs ; vds = vbs - vbd ; } else{ vgs = *(ckt->CKTstate0 + here->MOS9vgs); vds = *(ckt->CKTstate0 + here->MOS9vds); vbs = *(ckt->CKTstate0 + here->MOS9vbs); vbd = *(ckt->CKTstate0 + here->MOS9vbd); vgb = vgs - vbs; vgd = vgs - vds; } #ifdef SENSDEBUG printf(" vbs = %.7e ,vbd = %.7e,vgb = %.7e\n",vbs,vbd,vgb); printf(" vgs = %.7e ,vds = %.7e,vgd = %.7e\n",vgs,vds,vgd); #endif /* SENSDEBUG */ goto next1; } /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ if((ckt->CKTmode & (MODEINITFLOAT | MODEINITPRED | MODEINITSMSIG | MODEINITTRAN)) || ( (ckt->CKTmode & MODEINITFIX) && (!here->MOS9off) ) ) { #ifndef PREDICTOR if(ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { /* predictor step */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->MOS9vbs) = *(ckt->CKTstate1 + here->MOS9vbs); vbs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS9vbs)) -(xfact * (*(ckt->CKTstate2 + here->MOS9vbs))); *(ckt->CKTstate0 + here->MOS9vgs) = *(ckt->CKTstate1 + here->MOS9vgs); vgs = (1+xfact)* (*(ckt->CKTstate1 + here->MOS9vgs)) -(xfact * (*(ckt->CKTstate2 + here->MOS9vgs))); *(ckt->CKTstate0 + here->MOS9vds) = *(ckt->CKTstate1 + here->MOS9vds); vds = (1+xfact)* (*(ckt->CKTstate1 + here->MOS9vds)) -(xfact * (*(ckt->CKTstate2 + here->MOS9vds))); *(ckt->CKTstate0 + here->MOS9vbd) = *(ckt->CKTstate0 + here->MOS9vbs)- *(ckt->CKTstate0 + here->MOS9vds); } else { #endif /*PREDICTOR*/ /* general iteration */ vbs = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9bNode) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); vgs = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9gNode) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); vds = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9dNodePrime) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); #ifndef PREDICTOR } #endif /*PREDICTOR*/ /* now some common crunching for some more useful quantities */ vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS9vgs) - *(ckt->CKTstate0 + here->MOS9vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS9vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS9vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS9vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS9vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS9mode >= 0) { cdhat= here->MOS9cd- here->MOS9gbd * delvbd + here->MOS9gmbs * delvbs + here->MOS9gm * delvgs + here->MOS9gds * delvds ; } else { cdhat= here->MOS9cd - ( here->MOS9gbd - here->MOS9gmbs) * delvbd - here->MOS9gm * delvgd + here->MOS9gds * delvds ; } cbhat= here->MOS9cbs + here->MOS9cbd + here->MOS9gbd * delvbd + here->MOS9gbs * delvbs ; #ifndef NOBYPASS /* now lets see if we can bypass (ugh) */ /* the following mess should be one if statement, but * many compilers can't handle it all at once, so it * is split into several successive if statements */ tempv = MAX(fabs(cbhat),fabs(here->MOS9cbs + here->MOS9cbd))+ckt->CKTabstol; if((!(ckt->CKTmode & (MODEINITPRED|MODEINITTRAN|MODEINITSMSIG) )) && (ckt->CKTbypass) ) if ( (fabs(cbhat-(here->MOS9cbs + here->MOS9cbd)) < ckt->CKTreltol * tempv)) if( (fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS9vbs)))+ ckt->CKTvoltTol))) if ( (fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS9vbd)))+ ckt->CKTvoltTol)) ) if( (fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->MOS9vgs)))+ ckt->CKTvoltTol))) if ( (fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->MOS9vds)))+ ckt->CKTvoltTol)) ) if( (fabs(cdhat- here->MOS9cd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs( here->MOS9cd)) + ckt->CKTabstol) ) { /* bypass code * * nothing interesting has changed since last * iteration on this device, so we just * copy all the values computed last iteration out * and keep going */ vbs = *(ckt->CKTstate0 + here->MOS9vbs); vbd = *(ckt->CKTstate0 + here->MOS9vbd); vgs = *(ckt->CKTstate0 + here->MOS9vgs); vds = *(ckt->CKTstate0 + here->MOS9vds); vgd = vgs - vds; vgb = vgs - vbs; cdrain = here->MOS9mode * (here->MOS9cd + here->MOS9cbd); if(ckt->CKTmode & (MODETRAN | MODETRANOP)) { capgs = ( *(ckt->CKTstate0+here->MOS9capgs)+ *(ckt->CKTstate1+here->MOS9capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS9capgd)+ *(ckt->CKTstate1+here->MOS9capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS9capgb)+ *(ckt->CKTstate1+here->MOS9capgb) + GateBulkOverlapCap ); } goto bypass; } #endif /*NOBYPASS*/ /* ok - bypass is out, do it the hard way */ von = model->MOS9type * here->MOS9von; #ifndef NODELIMITING /* * limiting * we want to keep device voltages from changing * so fast that the exponentials churn out overflows * and similar rudeness */ if(*(ckt->CKTstate0 + here->MOS9vds) >=0) { vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->MOS9vgs) ,von); vds = vgs - vgd; vds = DEVlimvds(vds,*(ckt->CKTstate0 + here->MOS9vds)); vgd = vgs - vds; } else { vgd = DEVfetlim(vgd,vgdo,von); vds = vgs - vgd; if(!(ckt->CKTfixLimit)) { vds = -DEVlimvds(-vds,-(*(ckt->CKTstate0 + here->MOS9vds))); } vgs = vgd + vds; } if(vds >= 0) { vbs = DEVpnjlim(vbs,*(ckt->CKTstate0 + here->MOS9vbs), vt,here->MOS9sourceVcrit,&Check); vbd = vbs-vds; } else { vbd = DEVpnjlim(vbd,*(ckt->CKTstate0 + here->MOS9vbd), vt,here->MOS9drainVcrit,&Check); vbs = vbd + vds; } #endif /*NODELIMITING*/ } else { /* ok - not one of the simple cases, so we have to * look at all of the possibilities for why we were * called. We still just initialize the three voltages */ if((ckt->CKTmode & MODEINITJCT) && !here->MOS9off) { vds= model->MOS9type * here->MOS9icVDS; vgs= model->MOS9type * here->MOS9icVGS; vbs= model->MOS9type * here->MOS9icVBS; if((vds==0) && (vgs==0) && (vbs==0) && ((ckt->CKTmode & (MODETRAN|MODEDCOP|MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = -1; vgs = model->MOS9type * here->MOS9tVto; vds = 0; } } else { vbs=vgs=vds=0; } } /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) { arg=3*vt/(vbs*CONSTe); arg = arg * arg * arg; here->MOS9cbs = -SourceSatCur*(1+arg)+ckt->CKTgmin*vbs; here->MOS9gbs = SourceSatCur*3*arg/vbs+ckt->CKTgmin; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS9gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS9cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; } if(vbd <= -3*vt) { arg=3*vt/(vbd*CONSTe); arg = arg * arg * arg; here->MOS9cbd = -DrainSatCur*(1+arg)+ckt->CKTgmin*vbd; here->MOS9gbd = DrainSatCur*3*arg/vbd+ckt->CKTgmin; } else { evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS9gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS9cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS9mode = 1; } else { /* inverse mode */ here->MOS9mode = -1; } { /* * subroutine moseq3(vds,vbs,vgs,gm,gds,gmbs, * qg,qc,qb,cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets based on semi-empirical equations */ /* common /mosarg/ vto,beta,gamma,phi,phib,cox,xnsub,xnfs,xd,xj,xld, 1 xlamda,uo,uexp,vbp,utra,vmax,xneff,xl,xw,vbi,von,vdsat,qspof, 2 beta0,beta1,cdrain,xqco,xqc,fnarrw,fshort,lev common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, 1 xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, 2 iterno,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 */ /* equivalence (xlamda,alpha),(vbp,theta),(uexp,eta),(utra,xkappa)*/ double coeff0 = 0.0631353e0; double coeff1 = 0.8013292e0; double coeff2 = -0.01110777e0; double oneoverxl; /* 1/effective length */ double eta; /* eta from model after length factor */ double phibs; /* phi - vbs */ double sqphbs; /* square root of phibs */ double dsqdvb; /* */ double sqphis; /* square root of phi */ double sqphs3; /* square root of phi cubed */ double wps; double oneoverxj; /* 1/junction depth */ double xjonxl; /* junction depth/effective length */ double djonxj; double wponxj; double arga; double argb; double argc; double dwpdvb; double dadvb; double dbdvb; double gammas; double fbodys; double fbody; double onfbdy; double qbonco; double vbix; double wconxj; double dfsdvb; double dfbdvb; double dqbdvb; double vth; double dvtdvb; double csonco; double cdonco; double dxndvb = 0.0; double dvodvb = 0.0; double dvodvd = 0.0; double vgsx; double dvtdvd; double onfg; double fgate; double us; double dfgdvg; double dfgdvd; double dfgdvb; double dvsdvg; double dvsdvb; double dvsdvd; double xn = 0.0; double vdsc; double onvdsc = 0.0; double dvsdga; double vdsx; double dcodvb; double cdnorm; double cdo; double cd1; double fdrain = 0.0; double fd2; double dfddvg = 0.0; double dfddvb = 0.0; double dfddvd = 0.0; double gdsat; double cdsat; double gdoncd; double gdonfd; double gdonfg; double dgdvg; double dgdvd; double dgdvb; double emax; double emongd; double demdvg; double demdvd; double demdvb; double delxl; double dldvd; double dldem; double ddldvg; double ddldvd; double ddldvb; double dlonxl; double xlfact; double diddl; double gds0 = 0.0; double emoncd; double ondvt; double onxn; double wfact; double gms; double gmw; double fshort; /* * bypasses the computation of charges */ /* * reference cdrain equations to source and * charge equations to bulk */ vdsat = 0.0; oneoverxl = 1.0/EffectiveLength; eta = model->MOS9eta * 8.15e-22/(model->MOS9oxideCapFactor* EffectiveLength*EffectiveLength*EffectiveLength); /* *.....square root term */ if ( (here->MOS9mode==1?vbs:vbd) <= 0.0 ) { phibs = here->MOS9tPhi-(here->MOS9mode==1?vbs:vbd); sqphbs = sqrt(phibs); dsqdvb = -0.5/sqphbs; } else { sqphis = sqrt(here->MOS9tPhi); sqphs3 = here->MOS9tPhi*sqphis; sqphbs = sqphis/(1.0+(here->MOS9mode==1?vbs:vbd)/ (here->MOS9tPhi+here->MOS9tPhi)); phibs = sqphbs*sqphbs; dsqdvb = -phibs/(sqphs3+sqphs3); } /* *.....short channel effect factor */ if ( (model->MOS9junctionDepth != 0.0) && (model->MOS9coeffDepLayWidth != 0.0) ) { wps = model->MOS9coeffDepLayWidth*sqphbs; oneoverxj = 1.0/model->MOS9junctionDepth; xjonxl = model->MOS9junctionDepth*oneoverxl; djonxj = model->MOS9latDiff*oneoverxj; wponxj = wps*oneoverxj; wconxj = coeff0+coeff1*wponxj+coeff2*wponxj*wponxj; arga = wconxj+djonxj; argc = wponxj/(1.0+wponxj); argb = sqrt(1.0-argc*argc); fshort = 1.0-xjonxl*(arga*argb-djonxj); dwpdvb = model->MOS9coeffDepLayWidth*dsqdvb; dadvb = (coeff1+coeff2*(wponxj+wponxj))*dwpdvb*oneoverxj; dbdvb = -argc*argc*(1.0-argc)*dwpdvb/(argb*wps); dfsdvb = -xjonxl*(dadvb*argb+arga*dbdvb); } else { fshort = 1.0; dfsdvb = 0.0; } /* *.....body effect */ gammas = model->MOS9gamma*fshort; fbodys = 0.5*gammas/(sqphbs+sqphbs); fbody = fbodys+model->MOS9narrowFactor/EffectiveWidth; onfbdy = 1.0/(1.0+fbody); dfbdvb = -fbodys*dsqdvb/sqphbs+fbodys*dfsdvb/fshort; qbonco =gammas*sqphbs+model->MOS9narrowFactor*phibs/EffectiveWidth; dqbdvb = gammas*dsqdvb+model->MOS9gamma*dfsdvb*sqphbs- model->MOS9narrowFactor/EffectiveWidth; /* *.....static feedback effect */ vbix = here->MOS9tVbi*model->MOS9type-eta*(here->MOS9mode*vds); /* *.....threshold voltage */ vth = vbix+qbonco; dvtdvd = -eta; dvtdvb = dqbdvb; /* *.....joint weak inversion and strong inversion */ von = vth; if ( model->MOS9fastSurfaceStateDensity != 0.0 ) { csonco = CHARGE*model->MOS9fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ *EffectiveLength*EffectiveWidth * here->MOS9m/OxideCap; cdonco = qbonco/(phibs+phibs); xn = 1.0+csonco+cdonco; von = vth+vt*xn; dxndvb = dqbdvb/(phibs+phibs)-qbonco*dsqdvb/(phibs*sqphbs); dvodvd = dvtdvd; dvodvb = dvtdvb+vt*dxndvb; } else { /* *.....cutoff region */ if ( (here->MOS9mode==1?vgs:vgd) <= von ) { cdrain = 0.0; here->MOS9gm = 0.0; here->MOS9gds = 0.0; here->MOS9gmbs = 0.0; goto innerline1000; } } /* *.....device is on */ vgsx = MAX((here->MOS9mode==1?vgs:vgd),von); /* *.....mobility modulation by gate voltage */ onfg = 1.0+model->MOS9theta*(vgsx-vth); fgate = 1.0/onfg; us = here->MOS9tSurfMob * 1e-4 /*(m**2/cm**2)*/ *fgate; dfgdvg = -model->MOS9theta*fgate*fgate; dfgdvd = -dfgdvg*dvtdvd; dfgdvb = -dfgdvg*dvtdvb; /* *.....saturation voltage */ vdsat = (vgsx-vth)*onfbdy; if ( model->MOS9maxDriftVel <= 0.0 ) { dvsdvg = onfbdy; dvsdvd = -dvsdvg*dvtdvd; dvsdvb = -dvsdvg*dvtdvb-vdsat*dfbdvb*onfbdy; } else { vdsc = EffectiveLength*model->MOS9maxDriftVel/us; onvdsc = 1.0/vdsc; arga = (vgsx-vth)*onfbdy; argb = sqrt(arga*arga+vdsc*vdsc); vdsat = arga+vdsc-argb; dvsdga = (1.0-arga/argb)*onfbdy; dvsdvg = dvsdga-(1.0-vdsc/argb)*vdsc*dfgdvg*onfg; dvsdvd = -dvsdvg*dvtdvd; dvsdvb = -dvsdvg*dvtdvb-arga*dvsdga*dfbdvb; } /* *.....current factors in linear region */ vdsx = MIN((here->MOS9mode*vds),vdsat); if ( vdsx == 0.0 ) goto line900; cdo = vgsx-vth-0.5*(1.0+fbody)*vdsx; dcodvb = -dvtdvb-0.5*dfbdvb*vdsx; /* *.....normalized drain current */ cdnorm = cdo*vdsx; here->MOS9gm = vdsx; if ((here->MOS9mode*vds) > vdsat) here->MOS9gds = -dvtdvd*vdsx; else here->MOS9gds = vgsx-vth-(1.0+fbody+dvtdvd)*vdsx; here->MOS9gmbs = dcodvb*vdsx; /* *.....drain current without velocity saturation effect */ cd1 = Beta*cdnorm; Beta = Beta*fgate; cdrain = Beta*cdnorm; here->MOS9gm = Beta*here->MOS9gm+dfgdvg*cd1; here->MOS9gds = Beta*here->MOS9gds+dfgdvd*cd1; here->MOS9gmbs = Beta*here->MOS9gmbs+dfgdvb*cd1; /* *.....velocity saturation factor */ if ( model->MOS9maxDriftVel > 0.0 ) { fdrain = 1.0/(1.0+vdsx*onvdsc); fd2 = fdrain*fdrain; arga = fd2*vdsx*onvdsc*onfg; dfddvg = -dfgdvg*arga; if ((here->MOS9mode*vds) > vdsat) dfddvd = -dfgdvd*arga; else dfddvd = -dfgdvd*arga-fd2*onvdsc; dfddvb = -dfgdvb*arga; /* *.....drain current */ here->MOS9gm = fdrain*here->MOS9gm+dfddvg*cdrain; here->MOS9gds = fdrain*here->MOS9gds+dfddvd*cdrain; here->MOS9gmbs = fdrain*here->MOS9gmbs+dfddvb*cdrain; cdrain = fdrain*cdrain; Beta = Beta*fdrain; } /* *.....channel length modulation */ if ((here->MOS9mode*vds) <= vdsat) { if ( (model->MOS9maxDriftVel > 0.0) || (model->MOS9alpha == 0.0) || (ckt->CKTbadMos3) ) goto line700; else { arga = (here->MOS9mode*vds)/vdsat; delxl = sqrt(model->MOS9kappa*model->MOS9alpha*vdsat/8); dldvd = 4*delxl*arga*arga*arga/vdsat; arga *= arga; arga *= arga; delxl *= arga; ddldvg = 0.0; ddldvd = -dldvd; ddldvb = 0.0; goto line520; } } if ( model->MOS9maxDriftVel <= 0.0 ) goto line510; if (model->MOS9alpha == 0.0) goto line700; cdsat = cdrain; gdsat = cdsat*(1.0-fdrain)*onvdsc; gdsat = MAX(1.0e-12,gdsat); gdoncd = gdsat/cdsat; gdonfd = gdsat/(1.0-fdrain); gdonfg = gdsat*onfg; dgdvg = gdoncd*here->MOS9gm-gdonfd*dfddvg+gdonfg*dfgdvg; dgdvd = gdoncd*here->MOS9gds-gdonfd*dfddvd+gdonfg*dfgdvd; dgdvb = gdoncd*here->MOS9gmbs-gdonfd*dfddvb+gdonfg*dfgdvb; if (ckt->CKTbadMos3) emax = cdsat*oneoverxl/gdsat; else emax = model->MOS9kappa * cdsat*oneoverxl/gdsat; emoncd = emax/cdsat; emongd = emax/gdsat; demdvg = emoncd*here->MOS9gm-emongd*dgdvg; demdvd = emoncd*here->MOS9gds-emongd*dgdvd; demdvb = emoncd*here->MOS9gmbs-emongd*dgdvb; arga = 0.5*emax*model->MOS9alpha; argc = model->MOS9kappa*model->MOS9alpha; argb = sqrt(arga*arga+argc*((here->MOS9mode*vds)-vdsat)); delxl = argb-arga; dldvd = argc/(argb+argb); dldem = 0.5*(arga/argb-1.0)*model->MOS9alpha; ddldvg = dldem*demdvg; ddldvd = dldem*demdvd-dldvd; ddldvb = dldem*demdvb; goto line520; line510: if (ckt->CKTbadMos3) { delxl = sqrt(model->MOS9kappa*((here->MOS9mode*vds)-vdsat)* model->MOS9alpha); dldvd = 0.5*delxl/((here->MOS9mode*vds)-vdsat); } else { delxl = sqrt(model->MOS9kappa*model->MOS9alpha* ((here->MOS9mode*vds)-vdsat+(vdsat/8))); dldvd = 0.5*delxl/((here->MOS9mode*vds)-vdsat+(vdsat/8)); } ddldvg = 0.0; ddldvd = -dldvd; ddldvb = 0.0; /* *.....punch through approximation */ line520: if ( delxl > (0.5*EffectiveLength) ) { delxl = EffectiveLength-(EffectiveLength*EffectiveLength/ (4.0*delxl)); arga = 4.0*(EffectiveLength-delxl)*(EffectiveLength-delxl)/ (EffectiveLength*EffectiveLength); ddldvg = ddldvg*arga; ddldvd = ddldvd*arga; ddldvb = ddldvb*arga; dldvd = dldvd*arga; } /* *.....saturation region */ dlonxl = delxl*oneoverxl; xlfact = 1.0/(1.0-dlonxl); cd1 = cdrain; cdrain = cdrain*xlfact; diddl = cdrain/(EffectiveLength-delxl); here->MOS9gm = here->MOS9gm*xlfact+diddl*ddldvg; here->MOS9gmbs = here->MOS9gmbs*xlfact+diddl*ddldvb; gds0 = diddl*ddldvd; here->MOS9gm = here->MOS9gm+gds0*dvsdvg; here->MOS9gmbs = here->MOS9gmbs+gds0*dvsdvb; here->MOS9gds = here->MOS9gds*xlfact+diddl*dldvd+gds0*dvsdvd; /* here->MOS9gds = (here->MOS9gds*xlfact)+gds0*dvsdvd- (cd1*ddldvd/(EffectiveLength*(1-2*dlonxl+dlonxl*dlonxl)));*/ /* *.....finish strong inversion case */ line700: if ( (here->MOS9mode==1?vgs:vgd) < von ) { /* *.....weak inversion */ onxn = 1.0/xn; ondvt = onxn/vt; wfact = exp( ((here->MOS9mode==1?vgs:vgd)-von)*ondvt ); cdrain = cdrain*wfact; gms = here->MOS9gm*wfact; gmw = cdrain*ondvt; here->MOS9gm = gmw; if ((here->MOS9mode*vds) > vdsat) { here->MOS9gm = here->MOS9gm+gds0*dvsdvg*wfact; } here->MOS9gds = here->MOS9gds*wfact+(gms-gmw)*dvodvd; here->MOS9gmbs = here->MOS9gmbs*wfact+(gms-gmw)*dvodvb-gmw* ((here->MOS9mode==1?vgs:vgd)-von)*onxn*dxndvb; } /* *.....charge computation */ goto innerline1000; /* *.....special case of vds = 0.0d0 */ line900: Beta = Beta*fgate; cdrain = 0.0; here->MOS9gm = 0.0; here->MOS9gds = Beta*(vgsx-vth); here->MOS9gmbs = 0.0; if ( (model->MOS9fastSurfaceStateDensity != 0.0) && ((here->MOS9mode==1?vgs:vgd) < von) ) { here->MOS9gds *=exp(((here->MOS9mode==1?vgs:vgd)-von)/(vt*xn)); } innerline1000:; /* *.....done */ } /* now deal with n vs p polarity */ here->MOS9von = model->MOS9type * von; here->MOS9vdsat = model->MOS9type * vdsat; /* line 490 */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ here->MOS9cd=here->MOS9mode * cdrain - here->MOS9cbd; if (ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG)) { /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbs) >= ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->MOS9vbs)))+ ckt->CKTvoltTol)|| senflag ) #endif /*CAPBYPASS*/ { /* can't bypass the diode capacitance calculations */ if(here->MOS9Cbs != 0 || here->MOS9Cbssw != 0 ) { if (vbs < here->MOS9tDepCap){ arg=1-vbs/here->MOS9tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS9bulkJctBotGradingCoeff == model->MOS9bulkJctSideGradingCoeff) { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } if(model->MOS9bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS9bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS9qbs) = here->MOS9tBulkPot*(here->MOS9Cbs* (1-arg*sarg)/(1-model->MOS9bulkJctBotGradingCoeff) +here->MOS9Cbssw* (1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff)); here->MOS9capbs=here->MOS9Cbs*sarg+ here->MOS9Cbssw*sargsw; } else { *(ckt->CKTstate0 + here->MOS9qbs) = here->MOS9f4s + vbs*(here->MOS9f2s+vbs*(here->MOS9f3s/2)); here->MOS9capbs=here->MOS9f2s+here->MOS9f3s*vbs; } } else { *(ckt->CKTstate0 + here->MOS9qbs) = 0; here->MOS9capbs=0; } } #ifdef CAPBYPASS if(((ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) || fabs(delvbd) >= ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->MOS9vbd)))+ ckt->CKTvoltTol)|| senflag ) #endif /*CAPBYPASS*/ /* can't bypass the diode capacitance calculations */ { if(here->MOS9Cbd != 0 || here->MOS9Cbdsw != 0 ) { if (vbd < here->MOS9tDepCap) { arg=1-vbd/here->MOS9tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS9bulkJctBotGradingCoeff == .5 && model->MOS9bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } if(model->MOS9bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS9bulkJctSideGradingCoeff* log(arg)); } } *(ckt->CKTstate0 + here->MOS9qbd) = here->MOS9tBulkPot*(here->MOS9Cbd* (1-arg*sarg) /(1-model->MOS9bulkJctBotGradingCoeff) +here->MOS9Cbdsw* (1-arg*sargsw) /(1-model->MOS9bulkJctSideGradingCoeff)); here->MOS9capbd=here->MOS9Cbd*sarg+ here->MOS9Cbdsw*sargsw; } else { *(ckt->CKTstate0 + here->MOS9qbd) = here->MOS9f4d + vbd * (here->MOS9f2d + vbd * here->MOS9f3d/2); here->MOS9capbd=here->MOS9f2d + vbd * here->MOS9f3d; } } else { *(ckt->CKTstate0 + here->MOS9qbd) = 0; here->MOS9capbd = 0; } } if(SenCond && (ckt->CKTsenInfo->SENmode==TRANSEN)) goto next2; if ( ckt->CKTmode & MODETRAN ) { /* (above only excludes tranop, since we're only at this * point if tran or tranop ) */ /* * calculate equivalent conductances and currents for * depletion capacitors */ /* integrate the capacitors and save results */ error = NIintegrate(ckt,&geq,&ceq,here->MOS9capbd, here->MOS9qbd); if(error) return(error); here->MOS9gbd += geq; here->MOS9cbd += *(ckt->CKTstate0 + here->MOS9cqbd); here->MOS9cd -= *(ckt->CKTstate0 + here->MOS9cqbd); error = NIintegrate(ckt,&geq,&ceq,here->MOS9capbs, here->MOS9qbs); if(error) return(error); here->MOS9gbs += geq; here->MOS9cbs += *(ckt->CKTstate0 + here->MOS9cqbs); } } if(SenCond) goto next2; /* * check convergence */ if ( (here->MOS9off == 0) || (!(ckt->CKTmode & (MODEINITFIX|MODEINITSMSIG))) ){ if (Check == 1) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } /* save things away for next time */ next2: *(ckt->CKTstate0 + here->MOS9vbs) = vbs; *(ckt->CKTstate0 + here->MOS9vbd) = vbd; *(ckt->CKTstate0 + here->MOS9vgs) = vgs; *(ckt->CKTstate0 + here->MOS9vds) = vds; /* * meyer's capacitor model */ if ( ckt->CKTmode & (MODETRAN | MODETRANOP | MODEINITSMSIG) ) { /* * calculate meyer's capacitors */ /* * new cmeyer - this just evaluates at the current time, * expects you to remember values from previous time * returns 1/2 of non-constant portion of capacitance * you must add in the other half from previous time * and the constant part */ if (here->MOS9mode > 0){ DEVqmeyer (vgs,vgd,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS9capgs), (ckt->CKTstate0 + here->MOS9capgd), (ckt->CKTstate0 + here->MOS9capgb), here->MOS9tPhi,OxideCap); } else { DEVqmeyer (vgd,vgs,vgb,von,vdsat, (ckt->CKTstate0 + here->MOS9capgd), (ckt->CKTstate0 + here->MOS9capgs), (ckt->CKTstate0 + here->MOS9capgb), here->MOS9tPhi,OxideCap); } vgs1 = *(ckt->CKTstate1 + here->MOS9vgs); vgd1 = vgs1 - *(ckt->CKTstate1 + here->MOS9vds); vgb1 = vgs1 - *(ckt->CKTstate1 + here->MOS9vbs); if(ckt->CKTmode & MODETRANOP) { capgs = 2 * *(ckt->CKTstate0+here->MOS9capgs)+ GateSourceOverlapCap ; capgd = 2 * *(ckt->CKTstate0+here->MOS9capgd)+ GateDrainOverlapCap ; capgb = 2 * *(ckt->CKTstate0+here->MOS9capgb)+ GateBulkOverlapCap ; } else { capgs = ( *(ckt->CKTstate0+here->MOS9capgs)+ *(ckt->CKTstate1+here->MOS9capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS9capgd)+ *(ckt->CKTstate1+here->MOS9capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS9capgb)+ *(ckt->CKTstate1+here->MOS9capgb) + GateBulkOverlapCap ); } if(ckt->CKTsenInfo){ here->MOS9cgs = capgs; here->MOS9cgd = capgd; here->MOS9cgb = capgb; } /* * store small-signal parameters (for meyer's model) * all parameters already stored, so done... */ if(SenCond){ if(ckt->CKTsenInfo->SENmode & (DCSEN|ACSEN)) { continue; } } #ifndef PREDICTOR if (ckt->CKTmode & (MODEINITPRED | MODEINITTRAN) ) { *(ckt->CKTstate0 + here->MOS9qgs) = (1+xfact) * *(ckt->CKTstate1 + here->MOS9qgs) - xfact * *(ckt->CKTstate2 + here->MOS9qgs); *(ckt->CKTstate0 + here->MOS9qgd) = (1+xfact) * *(ckt->CKTstate1 + here->MOS9qgd) - xfact * *(ckt->CKTstate2 + here->MOS9qgd); *(ckt->CKTstate0 + here->MOS9qgb) = (1+xfact) * *(ckt->CKTstate1 + here->MOS9qgb) - xfact * *(ckt->CKTstate2 + here->MOS9qgb); } else { #endif /*PREDICTOR*/ if(ckt->CKTmode & MODETRAN) { *(ckt->CKTstate0 + here->MOS9qgs) = (vgs-vgs1)*capgs + *(ckt->CKTstate1 + here->MOS9qgs) ; *(ckt->CKTstate0 + here->MOS9qgd) = (vgd-vgd1)*capgd + *(ckt->CKTstate1 + here->MOS9qgd) ; *(ckt->CKTstate0 + here->MOS9qgb) = (vgb-vgb1)*capgb + *(ckt->CKTstate1 + here->MOS9qgb) ; } else { /* TRANOP only */ *(ckt->CKTstate0 + here->MOS9qgs) = vgs*capgs; *(ckt->CKTstate0 + here->MOS9qgd) = vgd*capgd; *(ckt->CKTstate0 + here->MOS9qgb) = vgb*capgb; } #ifndef PREDICTOR } #endif /*PREDICTOR*/ } #ifndef NOBYPASS bypass: #endif if(SenCond) continue; if ( (ckt->CKTmode & (MODEINITTRAN)) || (! (ckt->CKTmode & (MODETRAN)) ) ) { /* * initialize to zero charge conductances * and current */ gcgs=0; ceqgs=0; gcgd=0; ceqgd=0; gcgb=0; ceqgb=0; } else { if(capgs == 0) *(ckt->CKTstate0 + here->MOS9cqgs) =0; if(capgd == 0) *(ckt->CKTstate0 + here->MOS9cqgd) =0; if(capgb == 0) *(ckt->CKTstate0 + here->MOS9cqgb) =0; /* * calculate equivalent conductances and currents for * meyer"s capacitors */ error = NIintegrate(ckt,&gcgs,&ceqgs,capgs,here->MOS9qgs); if(error) return(error); error = NIintegrate(ckt,&gcgd,&ceqgd,capgd,here->MOS9qgd); if(error) return(error); error = NIintegrate(ckt,&gcgb,&ceqgb,capgb,here->MOS9qgb); if(error) return(error); ceqgs=ceqgs-gcgs*vgs+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS9qgs); ceqgd=ceqgd-gcgd*vgd+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS9qgd); ceqgb=ceqgb-gcgb*vgb+ckt->CKTag[0]* *(ckt->CKTstate0 + here->MOS9qgb); } /* * store charge storage info for meyer's cap in lx table */ /* * load current vector */ ceqbs = model->MOS9type * (here->MOS9cbs-(here->MOS9gbs)*vbs); ceqbd = model->MOS9type * (here->MOS9cbd-(here->MOS9gbd)*vbd); if (here->MOS9mode >= 0) { xnrm=1; xrev=0; cdreq=model->MOS9type*(cdrain-here->MOS9gds*vds- here->MOS9gm*vgs-here->MOS9gmbs*vbs); } else { xnrm=0; xrev=1; cdreq = -(model->MOS9type)*(cdrain-here->MOS9gds*(-vds)- here->MOS9gm*vgd-here->MOS9gmbs*vbd); } *(ckt->CKTrhs + here->MOS9gNode) -= (model->MOS9type * (ceqgs + ceqgb + ceqgd)); *(ckt->CKTrhs + here->MOS9bNode) -= (ceqbs + ceqbd - model->MOS9type * ceqgb); *(ckt->CKTrhs + here->MOS9dNodePrime) += (ceqbd - cdreq + model->MOS9type * ceqgd); *(ckt->CKTrhs + here->MOS9sNodePrime) += cdreq + ceqbs + model->MOS9type * ceqgs; /* * load y matrix */ /*printf(" loading %s at time %g\n",here->MOS9name,ckt->CKTtime);*/ /*printf("%g %g %g %g %g\n", here->MOS9drainConductance,gcgd+gcgs+gcgb, here->MOS9sourceConductance,here->MOS9gbd,here->MOS9gbs);*/ /*printf("%g %g %g %g %g\n",-gcgb,0.0,0.0,here->MOS9gds,here->MOS9gm);*/ /*printf("%g %g %g %g %g\n", here->MOS9gds,here->MOS9gmbs,gcgd,-gcgs,-gcgd);*/ /*printf("%g %g %g %g %g\n", -gcgs,-gcgd,0.0,-gcgs,0.0);*/ *(here->MOS9DdPtr) += (here->MOS9drainConductance); *(here->MOS9GgPtr) += ((gcgd+gcgs+gcgb)); *(here->MOS9SsPtr) += (here->MOS9sourceConductance); *(here->MOS9BbPtr) += (here->MOS9gbd+here->MOS9gbs+gcgb); *(here->MOS9DPdpPtr) += (here->MOS9drainConductance+here->MOS9gds+ here->MOS9gbd+xrev*(here->MOS9gm+here->MOS9gmbs)+gcgd); *(here->MOS9SPspPtr) += (here->MOS9sourceConductance+here->MOS9gds+ here->MOS9gbs+xnrm*(here->MOS9gm+here->MOS9gmbs)+gcgs); *(here->MOS9DdpPtr) += (-here->MOS9drainConductance); *(here->MOS9GbPtr) -= gcgb; *(here->MOS9GdpPtr) -= gcgd; *(here->MOS9GspPtr) -= gcgs; *(here->MOS9SspPtr) += (-here->MOS9sourceConductance); *(here->MOS9BgPtr) -= gcgb; *(here->MOS9BdpPtr) -= here->MOS9gbd; *(here->MOS9BspPtr) -= here->MOS9gbs; *(here->MOS9DPdPtr) += (-here->MOS9drainConductance); *(here->MOS9DPgPtr) += ((xnrm-xrev)*here->MOS9gm-gcgd); *(here->MOS9DPbPtr) += (-here->MOS9gbd+(xnrm-xrev)*here->MOS9gmbs); *(here->MOS9DPspPtr) += (-here->MOS9gds- xnrm*(here->MOS9gm+here->MOS9gmbs)); *(here->MOS9SPgPtr) += (-(xnrm-xrev)*here->MOS9gm-gcgs); *(here->MOS9SPsPtr) += (-here->MOS9sourceConductance); *(here->MOS9SPbPtr) += (-here->MOS9gbs-(xnrm-xrev)*here->MOS9gmbs); *(here->MOS9SPdpPtr) += (-here->MOS9gds- xrev*(here->MOS9gm+here->MOS9gmbs)); } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9conv.c0000644000265600020320000000640312264261473021047 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9convTest(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; double delvbs; double delvbd; double delvgs; double delvds; double delvgd; double cbhat; double cdhat; double vbs; double vbd; double vgs; double vds; double vgd; double vgdo; double tol; for( ; model != NULL; model = model->MOS9nextModel) { for(here = model->MOS9instances; here!= NULL; here = here->MOS9nextInstance) { vbs = model->MOS9type * ( *(ckt->CKTrhs+here->MOS9bNode) - *(ckt->CKTrhs+here->MOS9sNodePrime)); vgs = model->MOS9type * ( *(ckt->CKTrhs+here->MOS9gNode) - *(ckt->CKTrhs+here->MOS9sNodePrime)); vds = model->MOS9type * ( *(ckt->CKTrhs+here->MOS9dNodePrime) - *(ckt->CKTrhs+here->MOS9sNodePrime)); vbd=vbs-vds; vgd=vgs-vds; vgdo = *(ckt->CKTstate0 + here->MOS9vgs) - *(ckt->CKTstate0 + here->MOS9vds); delvbs = vbs - *(ckt->CKTstate0 + here->MOS9vbs); delvbd = vbd - *(ckt->CKTstate0 + here->MOS9vbd); delvgs = vgs - *(ckt->CKTstate0 + here->MOS9vgs); delvds = vds - *(ckt->CKTstate0 + here->MOS9vds); delvgd = vgd-vgdo; /* these are needed for convergence testing */ if (here->MOS9mode >= 0) { cdhat= here->MOS9cd- here->MOS9gbd * delvbd + here->MOS9gmbs * delvbs + here->MOS9gm * delvgs + here->MOS9gds * delvds ; } else { cdhat= here->MOS9cd - ( here->MOS9gbd - here->MOS9gmbs) * delvbd - here->MOS9gm * delvgd + here->MOS9gds * delvds ; } cbhat= here->MOS9cbs + here->MOS9cbd + here->MOS9gbd * delvbd + here->MOS9gbs * delvbs ; /* * check convergence */ tol=ckt->CKTreltol*MAX(fabs(cdhat),fabs(here->MOS9cd))+ ckt->CKTabstol; if (fabs(cdhat-here->MOS9cd) >= tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged */ } else { tol=ckt->CKTreltol* MAX(fabs(cbhat),fabs(here->MOS9cbs+here->MOS9cbd)) + ckt->CKTabstol; if (fabs(cbhat-(here->MOS9cbs+here->MOS9cbd)) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; return(OK); /* no reason to continue, we haven't converged*/ } } } } return(OK); } ngspice-26/src/spicelib/devices/mos9/Makefile.am0000644000265600020320000000115612264261473021162 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmos9.la libmos9_la_SOURCES = \ mos9.c \ mos9acld.c \ mos9ask.c \ mos9conv.c \ mos9defs.h \ mos9del.c \ mos9dest.c \ mos9dist.c \ mos9dset.c \ mos9ext.h \ mos9ic.c \ mos9init.c \ mos9init.h \ mos9itf.h \ mos9load.c \ mos9mask.c \ mos9mdel.c \ mos9mpar.c \ mos9noi.c \ mos9par.c \ mos9pzld.c \ mos9sacl.c \ mos9set.c \ mos9sld.c \ mos9sprt.c \ mos9sset.c \ mos9supd.c \ mos9temp.c \ mos9trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/mos9/mos9sprt.c0000644000265600020320000000401712264261473021071 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all the MOS9 * devices in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void MOS9sPrint(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; printf("LEVEL 9 MOSFETS (AG) -----------------\n"); /* loop through all the MOS9 models */ for( ; model != NULL; model = model->MOS9nextModel ) { printf("Model name:%s\n",model->MOS9modName); /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { printf(" Instance name:%s\n",here->MOS9name); printf(" Drain, Gate , Source nodes: %s, %s ,%s\n", CKTnodName(ckt,here->MOS9dNode),CKTnodName(ckt,here->MOS9gNode), CKTnodName(ckt,here->MOS9sNode)); printf(" Multiplier: %g ",here->MOS9m); printf(here->MOS9mGiven ? "(specified)\n" : "(default)\n"); printf(" Length: %g ",here->MOS9l); printf(here->MOS9lGiven ? "(specified)\n" : "(default)\n"); printf(" Width: %g ",here->MOS9w); printf(here->MOS9wGiven ? "(specified)\n" : "(default)\n"); if(here->MOS9sens_l == 1){ printf(" MOS9senParmNo:l = %d ",here->MOS9senParmNo); } else{ printf(" MOS9senParmNo:l = 0 "); } if(here->MOS9sens_w == 1){ printf(" w = %d \n",here->MOS9senParmNo + here->MOS9sens_l); } else{ printf(" w = 0 \n"); } } } } ngspice-26/src/spicelib/devices/mos9/Makefile.in0000644000265600020320000004434512264261537021203 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/mos9 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmos9_la_LIBADD = am_libmos9_la_OBJECTS = mos9.lo mos9acld.lo mos9ask.lo mos9conv.lo \ mos9del.lo mos9dest.lo mos9dist.lo mos9dset.lo mos9ic.lo \ mos9init.lo mos9load.lo mos9mask.lo mos9mdel.lo mos9mpar.lo \ mos9noi.lo mos9par.lo mos9pzld.lo mos9sacl.lo mos9set.lo \ mos9sld.lo mos9sprt.lo mos9sset.lo mos9supd.lo mos9temp.lo \ mos9trun.lo libmos9_la_OBJECTS = $(am_libmos9_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmos9_la_SOURCES) DIST_SOURCES = $(libmos9_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmos9.la libmos9_la_SOURCES = \ mos9.c \ mos9acld.c \ mos9ask.c \ mos9conv.c \ mos9defs.h \ mos9del.c \ mos9dest.c \ mos9dist.c \ mos9dset.c \ mos9ext.h \ mos9ic.c \ mos9init.c \ mos9init.h \ mos9itf.h \ mos9load.c \ mos9mask.c \ mos9mdel.c \ mos9mpar.c \ mos9noi.c \ mos9par.c \ mos9pzld.c \ mos9sacl.c \ mos9set.c \ mos9sld.c \ mos9sprt.c \ mos9sset.c \ mos9supd.c \ mos9temp.c \ mos9trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/mos9/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/mos9/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmos9.la: $(libmos9_la_OBJECTS) $(libmos9_la_DEPENDENCIES) $(EXTRA_libmos9_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmos9_la_OBJECTS) $(libmos9_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9conv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9dist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9dset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9ic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9sacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9sld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9sprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9sset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9supd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mos9trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/mos9/mos9acld.c0000644000265600020320000001112012264261473020775 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9acLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; int xnrm; int xrev; double EffectiveLength; double EffectiveWidth; double xgs; double xgd; double xgb; double xbd; double xbs; double capgs; double capgd; double capgb; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; for( ; model != NULL; model = model->MOS9nextModel) { for(here = model->MOS9instances; here!= NULL; here = here->MOS9nextInstance) { if (here->MOS9mode < 0) { xnrm=0; xrev=1; } else { xnrm=1; xrev=0; } /* * charge oriented model parameters */ EffectiveWidth=here->MOS9w-2*model->MOS9widthNarrow+ model->MOS9widthAdjust; EffectiveLength=here->MOS9l - 2*model->MOS9latDiff+ model->MOS9lengthAdjust; GateSourceOverlapCap = model->MOS9gateSourceOverlapCapFactor * here->MOS9m * EffectiveWidth; GateDrainOverlapCap = model->MOS9gateDrainOverlapCapFactor * here->MOS9m * EffectiveWidth; GateBulkOverlapCap = model->MOS9gateBulkOverlapCapFactor * here->MOS9m * EffectiveLength; /* * meyer"s model parameters */ capgs = ( *(ckt->CKTstate0+here->MOS9capgs)+ *(ckt->CKTstate0+here->MOS9capgs) + GateSourceOverlapCap ); capgd = ( *(ckt->CKTstate0+here->MOS9capgd)+ *(ckt->CKTstate0+here->MOS9capgd) + GateDrainOverlapCap ); capgb = ( *(ckt->CKTstate0+here->MOS9capgb)+ *(ckt->CKTstate0+here->MOS9capgb) + GateBulkOverlapCap ); xgs = capgs * ckt->CKTomega; xgd = capgd * ckt->CKTomega; xgb = capgb * ckt->CKTomega; xbd = here->MOS9capbd * ckt->CKTomega; xbs = here->MOS9capbs * ckt->CKTomega; /* * load matrix */ *(here->MOS9GgPtr +1) += xgd+xgs+xgb; *(here->MOS9BbPtr +1) += xgb+xbd+xbs; *(here->MOS9DPdpPtr +1) += xgd+xbd; *(here->MOS9SPspPtr +1) += xgs+xbs; *(here->MOS9GbPtr +1) -= xgb; *(here->MOS9GdpPtr +1) -= xgd; *(here->MOS9GspPtr +1) -= xgs; *(here->MOS9BgPtr +1) -= xgb; *(here->MOS9BdpPtr +1) -= xbd; *(here->MOS9BspPtr +1) -= xbs; *(here->MOS9DPgPtr +1) -= xgd; *(here->MOS9DPbPtr +1) -= xbd; *(here->MOS9SPgPtr +1) -= xgs; *(here->MOS9SPbPtr +1) -= xbs; *(here->MOS9DdPtr) += here->MOS9drainConductance; *(here->MOS9SsPtr) += here->MOS9sourceConductance; *(here->MOS9BbPtr) += here->MOS9gbd+here->MOS9gbs; *(here->MOS9DPdpPtr) += here->MOS9drainConductance+ here->MOS9gds+here->MOS9gbd+ xrev*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9SPspPtr) += here->MOS9sourceConductance+ here->MOS9gds+here->MOS9gbs+ xnrm*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9DdpPtr) -= here->MOS9drainConductance; *(here->MOS9SspPtr) -= here->MOS9sourceConductance; *(here->MOS9BdpPtr) -= here->MOS9gbd; *(here->MOS9BspPtr) -= here->MOS9gbs; *(here->MOS9DPdPtr) -= here->MOS9drainConductance; *(here->MOS9DPgPtr) += (xnrm-xrev)*here->MOS9gm; *(here->MOS9DPbPtr) += -here->MOS9gbd+(xnrm-xrev)*here->MOS9gmbs; *(here->MOS9DPspPtr) -= here->MOS9gds+ xnrm*(here->MOS9gm+here->MOS9gmbs); *(here->MOS9SPgPtr) -= (xnrm-xrev)*here->MOS9gm; *(here->MOS9SPsPtr) -= here->MOS9sourceConductance; *(here->MOS9SPbPtr) -= here->MOS9gbs+(xnrm-xrev)*here->MOS9gmbs; *(here->MOS9SPdpPtr) -= here->MOS9gds+ xrev*(here->MOS9gm+here->MOS9gmbs); } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9ic.c0000644000265600020320000000247412264261473020501 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9getic(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->MOS9nextModel) { for(here = model->MOS9instances; here ; here = here->MOS9nextInstance) { if(!here->MOS9icVBSGiven) { here->MOS9icVBS = *(ckt->CKTrhs + here->MOS9bNode) - *(ckt->CKTrhs + here->MOS9sNode); } if(!here->MOS9icVDSGiven) { here->MOS9icVDS = *(ckt->CKTrhs + here->MOS9dNode) - *(ckt->CKTrhs + here->MOS9sNode); } if(!here->MOS9icVGSGiven) { here->MOS9icVGS = *(ckt->CKTrhs + here->MOS9gNode) - *(ckt->CKTrhs + here->MOS9sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9.c0000644000265600020320000002343312264261473020163 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "mos9defs.h" #include "ngspice/suffix.h" IFparm MOS9pTable[] = { /* parameters */ IOPU("m", MOS9_M, IF_REAL , "Multiplier"), IOPU("l", MOS9_L, IF_REAL , "Length"), IOPU("w", MOS9_W, IF_REAL , "Width"), IOPU("ad", MOS9_AD, IF_REAL , "Drain area"), IOPU("as", MOS9_AS, IF_REAL , "Source area"), IOPU("pd", MOS9_PD, IF_REAL , "Drain perimeter"), IOPU("ps", MOS9_PS, IF_REAL , "Source perimeter"), OP("id", MOS9_CD, IF_REAL, "Drain current"), OPR("cd", MOS9_CD, IF_REAL, "Drain current"), OPU("ibd", MOS9_CBD, IF_REAL, "B-D junction current"), OPU("ibs", MOS9_CBS, IF_REAL, "B-S junction current"), OPU("is", MOS9_CS, IF_REAL, "Source current"), OPU("ig", MOS9_CG, IF_REAL, "Gate current"), OPU("ib", MOS9_CB, IF_REAL, "Bulk current"), OP("vgs", MOS9_VGS, IF_REAL, "Gate-Source voltage"), OP("vds", MOS9_VDS, IF_REAL, "Drain-Source voltage"), OP("vbs", MOS9_VBS, IF_REAL, "Bulk-Source voltage"), OPU("vbd", MOS9_VBD, IF_REAL, "Bulk-Drain voltage"), IOPU("nrd", MOS9_NRD, IF_REAL , "Drain squares"), IOPU("nrs", MOS9_NRS, IF_REAL , "Source squares"), IP("off", MOS9_OFF, IF_FLAG , "Device initially off"), IOPAU("icvds", MOS9_IC_VDS, IF_REAL , "Initial D-S voltage"), IOPAU("icvgs", MOS9_IC_VGS, IF_REAL , "Initial G-S voltage"), IOPAU("icvbs", MOS9_IC_VBS, IF_REAL , "Initial B-S voltage"), IOPU("ic", MOS9_IC, IF_REALVEC, "Vector of D-S, G-S, B-S voltages"), IOPU("temp", MOS9_TEMP, IF_REAL , "Instance operating temperature"), IOPU("dtemp", MOS9_DTEMP, IF_REAL , "Instance operating temperature difference"), IP("sens_l", MOS9_L_SENS, IF_FLAG, "flag to request sensitivity WRT length"), IP("sens_w", MOS9_W_SENS, IF_FLAG, "flag to request sensitivity WRT width"), OPU("dnode", MOS9_DNODE, IF_INTEGER, "Number of drain node"), OPU("gnode", MOS9_GNODE, IF_INTEGER, "Number of gate node"), OPU("snode", MOS9_SNODE, IF_INTEGER, "Number of source node"), OPU("bnode", MOS9_BNODE, IF_INTEGER, "Number of bulk node"), OPU("dnodeprime", MOS9_DNODEPRIME,IF_INTEGER,"Number of internal drain node"), OPU("snodeprime", MOS9_SNODEPRIME,IF_INTEGER,"Number of internal source node"), OP("von", MOS9_VON, IF_REAL, "Turn-on voltage"), OP("vdsat", MOS9_VDSAT, IF_REAL, "Saturation drain voltage"), OPU("sourcevcrit", MOS9_SOURCEVCRIT, IF_REAL, "Critical source voltage"), OPU("drainvcrit", MOS9_DRAINVCRIT, IF_REAL, "Critical drain voltage"), OP("rs", MOS9_SOURCERESIST, IF_REAL, "Source resistance"), OPU("sourceconductance", MOS9_SOURCECONDUCT, IF_REAL, "Source conductance"), OP("rd", MOS9_DRAINRESIST, IF_REAL, "Drain resistance"), OPU("drainconductance", MOS9_DRAINCONDUCT, IF_REAL, "Drain conductance"), OP("gm", MOS9_GM, IF_REAL, "Transconductance"), OP("gds", MOS9_GDS, IF_REAL, "Drain-Source conductance"), OP("gmb", MOS9_GMBS, IF_REAL, "Bulk-Source transconductance"), OPR("gmbs", MOS9_GMBS, IF_REAL, "Bulk-Source transconductance"), OPU("gbd", MOS9_GBD, IF_REAL, "Bulk-Drain conductance"), OPU("gbs", MOS9_GBS, IF_REAL, "Bulk-Source conductance"), OP("cbd", MOS9_CAPBD, IF_REAL, "Bulk-Drain capacitance"), OP("cbs", MOS9_CAPBS, IF_REAL, "Bulk-Source capacitance"), OP("cgs", MOS9_CAPGS, IF_REAL, "Gate-Source capacitance"), /* OPR("cgs", MOS9_CGS, IF_REAL , "Gate-Source capacitance"),*/ OP("cgd", MOS9_CAPGD, IF_REAL, "Gate-Drain capacitance"), /* OPR("cgd", MOS9_CGD, IF_REAL , "Gate-Drain capacitance"),*/ OP("cgb", MOS9_CAPGB, IF_REAL, "Gate-Bulk capacitance"), OPU("cqgs",MOS9_CQGS,IF_REAL,"Capacitance due to gate-source charge storage"), OPU("cqgd",MOS9_CQGD, IF_REAL,"Capacitance due to gate-drain charge storage"), OPU("cqgb",MOS9_CQGB, IF_REAL,"Capacitance due to gate-bulk charge storage"), OPU("cqbd",MOS9_CQBD,IF_REAL,"Capacitance due to bulk-drain charge storage"), OPU("cqbs",MOS9_CQBS,IF_REAL,"Capacitance due to bulk-source charge storage"), OPU("cbd0",MOS9_CAPZEROBIASBD,IF_REAL,"Zero-Bias B-D junction capacitance"), OPU("cbdsw0",MOS9_CAPZEROBIASBDSW,IF_REAL, "Zero-Bias B-D sidewall capacitance"), OPU("cbs0",MOS9_CAPZEROBIASBS,IF_REAL,"Zero-Bias B-S junction capacitance"), OPU("cbssw0",MOS9_CAPZEROBIASBSSW,IF_REAL, "Zero-Bias B-S sidewall capacitance"), OPU("qbs", MOS9_QBS, IF_REAL, "Bulk-Source charge storage"), OPU("qgs", MOS9_QGS, IF_REAL, "Gate-Source charge storage"), OPU("qgd", MOS9_QGD, IF_REAL, "Gate-Drain charge storage"), OPU("qgb", MOS9_QGB, IF_REAL, "Gate-Bulk charge storage"), OPU("qbd", MOS9_QBD, IF_REAL, "Bulk-Drain charge storage"), OPU("p", MOS9_POWER, IF_REAL, "Instantaneous power"), OPU("sens_l_dc", MOS9_L_SENS_DC, IF_REAL, "dc sensitivity wrt length"), OPU("sens_l_real",MOS9_L_SENS_REAL, IF_REAL, "real part of ac sensitivity wrt length"), OPU("sens_l_imag",MOS9_L_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt length"), OPU("sens_l_cplx",MOS9_L_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt length"), OPU("sens_l_mag", MOS9_L_SENS_MAG, IF_REAL, "sensitivity wrt l of ac magnitude"), OPU("sens_l_ph", MOS9_L_SENS_PH, IF_REAL, "sensitivity wrt l of ac phase"), OPU("sens_w_dc", MOS9_W_SENS_DC, IF_REAL, "dc sensitivity wrt width"), OPU("sens_w_real",MOS9_W_SENS_REAL, IF_REAL, "real part of ac sensitivity wrt width"), OPU("sens_w_imag",MOS9_W_SENS_IMAG, IF_REAL, "imag part of ac sensitivity wrt width"), OPU("sens_w_mag", MOS9_W_SENS_MAG, IF_REAL, "sensitivity wrt w of ac magnitude"), OPU("sens_w_ph", MOS9_W_SENS_PH, IF_REAL, "sensitivity wrt w of ac phase"), OPU("sens_w_cplx",MOS9_W_SENS_CPLX, IF_COMPLEX, "ac sensitivity wrt width") }; IFparm MOS9mPTable[] = { /* model parameters */ OP("type", MOS9_MOD_TYPE, IF_STRING ,"N-channel or P-channel MOS"), IP("nmos", MOS9_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS9_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), IOP("vto", MOS9_MOD_VTO, IF_REAL ,"Threshold voltage"), IOPR("vt0", MOS9_MOD_VTO, IF_REAL ,"Threshold voltage"), IOP("kp", MOS9_MOD_KP, IF_REAL ,"Transconductance parameter"), IOP("gamma", MOS9_MOD_GAMMA, IF_REAL ,"Bulk threshold parameter"), IOP("phi", MOS9_MOD_PHI, IF_REAL ,"Surface potential"), IOP("rd", MOS9_MOD_RD, IF_REAL ,"Drain ohmic resistance"), IOP("rs", MOS9_MOD_RS, IF_REAL ,"Source ohmic resistance"), IOPA("cbd", MOS9_MOD_CBD, IF_REAL ,"B-D junction capacitance"), IOPA("cbs", MOS9_MOD_CBS, IF_REAL ,"B-S junction capacitance"), IOP("is", MOS9_MOD_IS, IF_REAL ,"Bulk junction sat. current"), IOP("pb", MOS9_MOD_PB, IF_REAL ,"Bulk junction potential"), IOPA("cgso", MOS9_MOD_CGSO, IF_REAL ,"Gate-source overlap cap."), IOPA("cgdo", MOS9_MOD_CGDO, IF_REAL ,"Gate-drain overlap cap."), IOPA("cgbo", MOS9_MOD_CGBO, IF_REAL ,"Gate-bulk overlap cap."), IOP("rsh", MOS9_MOD_RSH, IF_REAL ,"Sheet resistance"), IOPA("cj", MOS9_MOD_CJ, IF_REAL ,"Bottom junction cap per area"), IOP("mj", MOS9_MOD_MJ, IF_REAL ,"Bottom grading coefficient"), IOPA("cjsw", MOS9_MOD_CJSW, IF_REAL ,"Side junction cap per area"), IOP("mjsw", MOS9_MOD_MJSW, IF_REAL ,"Side grading coefficient"), IOPU("js", MOS9_MOD_JS, IF_REAL ,"Bulk jct. sat. current density"), IOP("tox", MOS9_MOD_TOX, IF_REAL ,"Oxide thickness"), IOP("ld", MOS9_MOD_LD, IF_REAL ,"Lateral diffusion"), IOP("xl", MOS9_MOD_XL, IF_REAL ,"Length mask adjustment"), IOP("wd", MOS9_MOD_WD, IF_REAL ,"Width Narrowing (Diffusion)"), IOP("xw", MOS9_MOD_XW, IF_REAL ,"Width mask adjustment"), IOPU("delvto", MOS9_MOD_DELVTO, IF_REAL ,"Threshold voltage Adjust"), IOPR("delvt0", MOS9_MOD_DELVTO, IF_REAL ,"Threshold voltage Adjust"), IOP("u0", MOS9_MOD_U0, IF_REAL ,"Surface mobility"), IOPR("uo", MOS9_MOD_U0, IF_REAL ,"Surface mobility"), IOP("fc", MOS9_MOD_FC, IF_REAL ,"Forward bias jct. fit parm."), IOP("nsub", MOS9_MOD_NSUB, IF_REAL ,"Substrate doping"), IOP("tpg", MOS9_MOD_TPG, IF_INTEGER,"Gate type"), IOP("nss", MOS9_MOD_NSS, IF_REAL ,"Surface state density"), IOP("vmax", MOS9_MOD_VMAX, IF_REAL ,"Maximum carrier drift velocity"), IOP("xj", MOS9_MOD_XJ, IF_REAL ,"Junction depth"), IOP("nfs", MOS9_MOD_NFS, IF_REAL ,"Fast surface state density"), IOP("xd", MOS9_MOD_XD, IF_REAL ,"Depletion layer width"), IOP("alpha", MOS9_MOD_ALPHA, IF_REAL ,"Alpha"), IOP("eta", MOS9_MOD_ETA, IF_REAL ,"Vds dependence of threshold voltage"), IOP("delta", MOS9_MOD_DELTA, IF_REAL ,"Width effect on threshold"), IOPR("input_delta", MOS9_DELTA, IF_REAL ,""), IOP("theta", MOS9_MOD_THETA, IF_REAL ,"Vgs dependence on mobility"), IOP("kappa", MOS9_MOD_KAPPA, IF_REAL ,"Kappa"), IOPU("tnom", MOS9_MOD_TNOM, IF_REAL ,"Parameter measurement temperature"), IOP("kf", MOS9_MOD_KF, IF_REAL ,"Flicker noise coefficient"), IOP("af", MOS9_MOD_AF, IF_REAL ,"Flicker noise exponent") }; char *MOS9names[] = { "Drain", "Gate", "Source", "Bulk" }; int MOS9nSize = NUMELEMS(MOS9names); int MOS9pTSize = NUMELEMS(MOS9pTable); int MOS9mPTSize = NUMELEMS(MOS9mPTable); int MOS9iSize = sizeof(MOS9instance); int MOS9mSize = sizeof(MOS9model); ngspice-26/src/spicelib/devices/mos9/mos9dset.c0000644000265600020320000010062112264261473021036 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "mos9defs.h" #include "ngspice/trandefs.h" #include "ngspice/distodef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9dSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; double Beta; double DrainSatCur; double EffectiveLength; double EffectiveWidth; double GateBulkOverlapCap; double GateDrainOverlapCap; double GateSourceOverlapCap; double OxideCap; double SourceSatCur; double arg; double cdrain; double evbs; double sarg; double sargsw; double lvgs; double vbd; double vbs; double vds; double vdsat; double vgb; double vgd; double vgs; double von; double lcapgs2,lcapgs3; /* total gate-source capacitance */ double lcapgd2,lcapgd3; /* total gate-drain capacitance */ double lcapgb2,lcapgb3; /* total gate-bulk capacitance */ double lgbs, lgbs2, lgbs3; double lgbd, lgbd2, lgbd3; double gm2, gb2, gds2, gmb, gmds, gbds; double gm3, gb3, gds3, gm2ds, gm2b, gb2ds, gbds2, gmb2, gmds2, gmbds; double lcapbd, lcapbd2, lcapbd3; double lcapbs, lcapbs2, lcapbs3; double ebd; double vt; /* vt at instance temperature */ Dderivs d_cdrain; /* loop through all the MOS9 device models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { vt = CONSTKoverQ * here->MOS9temp; /* first, we compute a few useful values - these could be * pre-computed, but for historical reasons are still done * here. They may be moved at the expense of instance size */ EffectiveWidth=here->MOS9w-2*model->MOS9widthNarrow+ model->MOS9widthAdjust; EffectiveLength=here->MOS9l - 2*model->MOS9latDiff+ model->MOS9lengthAdjust; if( (here->MOS9tSatCurDens == 0) || (here->MOS9drainArea == 0) || (here->MOS9sourceArea == 0)) { DrainSatCur = here->MOS9m * here->MOS9tSatCur; SourceSatCur = here->MOS9m * here->MOS9tSatCur; } else { DrainSatCur = here->MOS9tSatCurDens * here->MOS9m * here->MOS9drainArea; SourceSatCur = here->MOS9tSatCurDens * here->MOS9m * here->MOS9sourceArea; } GateSourceOverlapCap = model->MOS9gateSourceOverlapCapFactor * here->MOS9m * EffectiveWidth; GateDrainOverlapCap = model->MOS9gateDrainOverlapCapFactor * here->MOS9m * EffectiveWidth; GateBulkOverlapCap = model->MOS9gateBulkOverlapCapFactor * here->MOS9m * EffectiveLength; Beta = here->MOS9tTransconductance * here->MOS9m * EffectiveWidth/EffectiveLength; OxideCap = model->MOS9oxideCapFactor * EffectiveLength * here->MOS9m * EffectiveWidth; /* * ok - now to do the start-up operations * * we must get values for vbs, vds, and vgs from somewhere * so we either predict them or recover them from last iteration * These are the two most common cases - either a prediction * step or the general iteration step and they * share some code, so we put them first - others later on */ /* general iteration */ vbs = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9bNode) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); vgs = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9gNode) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); vds = model->MOS9type * ( *(ckt->CKTrhsOld+here->MOS9dNodePrime) - *(ckt->CKTrhsOld+here->MOS9sNodePrime)); /* now some common crunching for some more useful quantities */ /* * now all the preliminaries are over - we can start doing the * real work */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; /* bulk-source and bulk-drain doides * here we just evaluate the ideal diode current and the * correspoinding derivative (conductance). */ /*next1:*/ if(vbs <= 0) { lgbs = SourceSatCur/vt; lgbs += ckt->CKTgmin; lgbs2 = lgbs3 = 0; } else { evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); lgbs = SourceSatCur*evbs/vt + ckt->CKTgmin; lgbs2 = model->MOS9type *0.5 * (lgbs - ckt->CKTgmin)/vt; lgbs3 = model->MOS9type *lgbs2/(vt*3); } if(vbd <= 0) { lgbd = DrainSatCur/vt; lgbd += ckt->CKTgmin; lgbd2 = lgbd3 = 0; } else { ebd = exp(MIN(MAX_EXP_ARG,vbd/vt)); lgbd = DrainSatCur*ebd/vt +ckt->CKTgmin; lgbd2 = model->MOS9type *0.5 * (lgbd - ckt->CKTgmin)/vt; lgbd3 = model->MOS9type *lgbd2/(vt*3); } /* now to determine whether the user was able to correctly * identify the source and drain of his device */ if(vds >= 0) { /* normal mode */ here->MOS9mode = 1; } else { /* inverse mode */ here->MOS9mode = -1; } { /* * subroutine moseq3(vds,vbs,vgs,gm,gds,gmbs, * qg,qc,qb,cggb,cgdb,cgsb,cbgb,cbdb,cbsb) */ /* * this routine evaluates the drain current, its derivatives and * the charges associated with the gate, channel and bulk * for mosfets based on semi-empirical equations */ /* common /mosarg/ vto,beta,gamma,phi,phib,cox,xnsub,xnfs,xd,xj,xld, 1 xlamda,uo,uexp,vbp,utra,vmax,xneff,xl,xw,vbi,von,vdsat,qspof, 2 beta0,beta1,cdrain,xqco,xqc,fnarrw,fshort,lev common /status/ omega,time,delta,delold(7),ag(7),vt,xni,egfet, 1 xmu,sfactr,mode,modedc,icalc,initf,method,iord,maxord,noncon, 2 iterno,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 */ /* equivalence (xlamda,alpha),(vbp,theta),(uexp,eta),(utra,xkappa)*/ double coeff0 = 0.0631353e0; double coeff1 = 0.8013292e0; double coeff2 = -0.01110777e0; double oneoverxl; /* 1/effective length */ double eta; /* eta from model after length factor */ double phibs; /* phi - vbs */ double sqphbs; /* square root of phibs */ double sqphis; /* square root of phi */ double wps; double oneoverxj; /* 1/junction depth */ double xjonxl; /* junction depth/effective length */ double djonxj; double wponxj; double arga; double argb; double argc; double gammas; double fbodys; double fbody; double onfbdy; double qbonco; double vbix; double wconxj; double vth; double csonco; double cdonco; double vgsx; double onfg; double fgate; double us; double xn = 0.0; double vdsc; double onvdsc = 0.0; double vdsx; double cdnorm; double cdo; double fdrain = 0.0; double gdsat; double cdsat; double emax; double delxl; double dlonxl; double xlfact; double ondvt; double onxn; double wfact; double fshort; double lvds, lvbs, lvbd; Dderivs d_onxn, d_ondvt, d_wfact, d_MOS9gds; Dderivs d_emax, d_delxl, d_dlonxl, d_xlfact; Dderivs d_cdonco, d_fdrain, d_cdsat, d_gdsat; Dderivs d_vdsx, d_cdo, d_cdnorm, d_Beta, d_dummy; Dderivs d_vdsc, d_onvdsc, d_arga, d_argb; Dderivs d_onfg, d_fgate, d_us, d_vgsx; Dderivs d_von, d_xn, d_vth, d_onfbdy, d_qbonco, d_vbix; Dderivs d_argc, d_fshort, d_gammas, d_fbodys, d_fbody; Dderivs d_wps, d_wconxj, d_wponxj; Dderivs d_phibs, d_sqphbs; Dderivs d_p, d_q, d_r, d_zero, d_vdsat; /* * bypasses the computation of charges */ if (here->MOS9mode == 1) { lvgs = vgs; lvds = vds; lvbs = vbs; lvbd = vbd; } else { lvgs = vgd; lvds = -vds; lvbs = vbd; lvbd = vbs; } /* * reference cdrain equations to source and * charge equations to bulk */ d_p.value = 0.0; d_p.d1_p = 1.0; d_p.d1_q = 0.0; d_p.d1_r = 0.0; d_p.d2_p2 = 0.0; d_p.d2_q2 = 0.0; d_p.d2_r2 = 0.0; d_p.d2_pq = 0.0; d_p.d2_qr = 0.0; d_p.d2_pr = 0.0; d_p.d3_p3 = 0.0; d_p.d3_q3 = 0.0; d_p.d3_r3 = 0.0; d_p.d3_p2r = 0.0; d_p.d3_p2q = 0.0; d_p.d3_q2r = 0.0; d_p.d3_pq2 = 0.0; d_p.d3_pr2 = 0.0; d_p.d3_qr2 = 0.0; d_p.d3_pqr = 0.0; EqualDeriv(&d_q,&d_p); EqualDeriv(&d_r,&d_p); EqualDeriv(&d_zero,&d_p); d_q.d1_p = d_r.d1_p = d_zero.d1_p = 0.0; d_q.d1_q = d_r.d1_r = 1.0; vdsat = 0.0; EqualDeriv(&d_vdsat,&d_zero); oneoverxl = 1.0/EffectiveLength;/*const*/ eta = model->MOS9eta * 8.15e-22/(model->MOS9oxideCapFactor* EffectiveLength*EffectiveLength*EffectiveLength);/*const*/ /* *.....square root term */ if ( lvbs <= 0.0 ) { phibs = here->MOS9tPhi-lvbs; EqualDeriv(&d_phibs,&d_q); d_phibs.value = lvbs; TimesDeriv(&d_phibs,&d_phibs,-1.0); d_phibs.value += here->MOS9tPhi; sqphbs = sqrt(phibs); SqrtDeriv(&d_sqphbs,&d_phibs); } else { sqphis = sqrt(here->MOS9tPhi);/*const*/ /*sqphs3 = here->MOS9tPhi*sqphis;const*/ sqphbs = sqphis/(1.0+lvbs/ (here->MOS9tPhi+here->MOS9tPhi)); EqualDeriv(&d_sqphbs,&d_q); d_sqphbs.value = lvbs; TimesDeriv(&d_sqphbs,&d_sqphbs,1/(here->MOS9tPhi+here->MOS9tPhi)); d_sqphbs.value += 1.0; InvDeriv(&d_sqphbs,&d_sqphbs); TimesDeriv(&d_sqphbs,&d_sqphbs,sqphis); phibs = sqphbs*sqphbs; MultDeriv(&d_phibs,&d_sqphbs,&d_sqphbs); } /* *.....short channel effect factor */ if ( (model->MOS9junctionDepth != 0.0) && (model->MOS9coeffDepLayWidth != 0.0) ) { wps = model->MOS9coeffDepLayWidth*sqphbs; TimesDeriv(&d_wps,&d_sqphbs,model->MOS9coeffDepLayWidth); oneoverxj = 1.0/model->MOS9junctionDepth;/*const*/ xjonxl = model->MOS9junctionDepth*oneoverxl;/*const*/ djonxj = model->MOS9latDiff*oneoverxj;/*const*/ wponxj = wps*oneoverxj; TimesDeriv(&d_wponxj,&d_wps,oneoverxj); wconxj = coeff0+coeff1*wponxj+coeff2*wponxj*wponxj; TimesDeriv(&d_wconxj,&d_wponxj,coeff2); d_wconxj.value += coeff1; MultDeriv(&d_wconxj,&d_wconxj,&d_wponxj); d_wconxj.value += coeff0; arga = wconxj + djonxj; EqualDeriv(&d_arga,&d_wconxj); d_arga.value += djonxj; argc = wponxj/(1.0+wponxj); EqualDeriv(&d_argc,&d_wponxj); d_argc.value += 1.0; InvDeriv(&d_argc,&d_argc); MultDeriv(&d_argc,&d_argc,&d_wponxj); argb = sqrt(1.0-argc*argc); MultDeriv(&d_argb,&d_argc,&d_argc); TimesDeriv(&d_argb,&d_argb,-1.0); d_argb.value += 1.0; SqrtDeriv(&d_argb,&d_argb); fshort = 1.0-xjonxl*(arga*argb-djonxj); MultDeriv(&d_fshort,&d_arga,&d_argb); d_fshort.value -= djonxj; TimesDeriv(&d_fshort,&d_fshort,-xjonxl); d_fshort.value += 1.0; } else { fshort = 1.0; EqualDeriv(&d_fshort,&d_zero); d_fshort.value = 1.0; } /* *.....body effect */ gammas = model->MOS9gamma*fshort; TimesDeriv(&d_gammas,&d_fshort,model->MOS9gamma); fbodys = 0.5*gammas/(sqphbs+sqphbs); DivDeriv(&d_fbodys,&d_gammas,&d_sqphbs); TimesDeriv(&d_fbodys,&d_fbodys,0.25); fbody = fbodys+model->MOS9narrowFactor/EffectiveWidth; EqualDeriv(&d_fbody,&d_fbodys); d_fbody.value += fbody - fbodys; onfbdy = 1.0/(1.0+fbody); EqualDeriv(&d_onfbdy,&d_fbody); d_onfbdy.value += 1.0; InvDeriv(&d_onfbdy,&d_onfbdy); qbonco =gammas*sqphbs+model->MOS9narrowFactor*phibs/EffectiveWidth; EqualDeriv(&d_dummy,&d_phibs); TimesDeriv(&d_dummy,&d_dummy,model->MOS9narrowFactor*EffectiveWidth); MultDeriv(&d_qbonco,&d_gammas,&d_sqphbs); PlusDeriv(&d_qbonco,&d_qbonco,&d_dummy); /* *.....static feedback effect */ vbix = here->MOS9tVbi*model->MOS9type-eta*(lvds); EqualDeriv(&d_vbix,&d_r); d_vbix.value = vbix; d_vbix.d1_r = -eta; /* *.....threshold voltage */ vth = vbix+qbonco; PlusDeriv(&d_vth,&d_vbix,&d_qbonco); /* *.....joint weak inversion and strong inversion */ von = vth; EqualDeriv(&d_von,&d_vth); if ( model->MOS9fastSurfaceStateDensity != 0.0 ) { csonco = CHARGE*model->MOS9fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ *EffectiveLength*EffectiveWidth * here->MOS9m/OxideCap; /*const*/ cdonco = 0.5*qbonco/phibs; DivDeriv(&d_cdonco,&d_qbonco,&d_phibs); TimesDeriv(&d_cdonco,&d_cdonco,0.5); xn = 1.0+csonco+cdonco; EqualDeriv(&d_xn,&d_cdonco); d_xn.value += 1.0 + csonco; von = vth+vt*xn; TimesDeriv(&d_von,&d_xn,vt); PlusDeriv(&d_von,&d_von,&d_vth); } else { /* *.....cutoff region */ if ( lvgs <= von ) { cdrain = 0.0; EqualDeriv(&d_cdrain,&d_zero); goto innerline1000; } } /* *.....device is on */ vgsx = MAX(lvgs,von); if (lvgs >= von) { EqualDeriv(&d_vgsx,&d_p); d_vgsx.value = lvgs; } else { EqualDeriv(&d_vgsx,&d_von); } /* *.....mobility modulation by gate voltage */ onfg = 1.0+model->MOS9theta*(vgsx-vth); TimesDeriv(&d_onfg,&d_vth,-1.0); PlusDeriv(&d_onfg,&d_onfg,&d_vgsx); TimesDeriv(&d_onfg,&d_onfg,model->MOS9theta); d_onfg.value += 1.0; fgate = 1.0/onfg; InvDeriv(&d_fgate,&d_onfg); us = here->MOS9tSurfMob * 1e-4 /*(m**2/cm**2)*/ *fgate; TimesDeriv(&d_us,&d_fgate,here->MOS9tSurfMob * 1e-4); /* *.....saturation voltage */ vdsat = (vgsx-vth)*onfbdy; TimesDeriv(&d_vdsat,&d_vth, -1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_vgsx); MultDeriv(&d_vdsat,&d_vdsat,&d_onfbdy); if ( model->MOS9maxDriftVel <= 0.0 ) { } else { vdsc = EffectiveLength*model->MOS9maxDriftVel/us; InvDeriv(&d_vdsc,&d_us); TimesDeriv(&d_vdsc,&d_vdsc,EffectiveLength*model->MOS9maxDriftVel); onvdsc = 1.0/vdsc; InvDeriv(&d_onvdsc,&d_vdsc); arga = (vgsx-vth)*onfbdy; /* note arga = vdsat at this point */ EqualDeriv(&d_arga,&d_vdsat); argb = sqrt(arga*arga+vdsc*vdsc); MultDeriv(&d_dummy,&d_arga,&d_arga); MultDeriv(&d_argb,&d_vdsc,&d_vdsc); PlusDeriv(&d_argb,&d_argb,&d_dummy); SqrtDeriv(&d_argb,&d_argb); vdsat = arga+vdsc-argb; TimesDeriv(&d_vdsat,&d_argb,-1.0); PlusDeriv(&d_vdsat,&d_vdsat,&d_vdsc); PlusDeriv(&d_vdsat,&d_vdsat,&d_arga); } /* *.....current factors in linear region */ vdsx = MIN((lvds),vdsat); if (lvds < vdsat) { EqualDeriv(&d_vdsx,&d_r); d_vdsx.value = lvds; } else { EqualDeriv(&d_vdsx,&d_vdsat); } if ( vdsx == 0.0 ) goto line900; cdo = vgsx-vth-0.5*(1.0+fbody)*vdsx; EqualDeriv(&d_cdo,&d_fbody); d_cdo.value += 1.0; MultDeriv(&d_cdo,&d_cdo,&d_vdsx); TimesDeriv(&d_cdo,&d_cdo,0.5); PlusDeriv(&d_cdo,&d_cdo,&d_vth); TimesDeriv(&d_cdo,&d_cdo,-1.0); PlusDeriv(&d_cdo,&d_cdo,&d_vgsx); /* *.....normalized drain current */ cdnorm = cdo*vdsx; MultDeriv(&d_cdnorm,&d_cdo,&d_vdsx); /* *.....drain current without velocity saturation effect */ /* Beta is a constant till now */ Beta = Beta*fgate; TimesDeriv(&d_Beta,&d_fgate,Beta); cdrain = Beta*cdnorm; MultDeriv(&d_cdrain,&d_Beta,&d_cdnorm); /* *.....velocity saturation factor */ if ( model->MOS9maxDriftVel != 0.0 ) { fdrain = 1.0/(1.0+vdsx*onvdsc); MultDeriv(&d_fdrain,&d_vdsx,&d_onvdsc); d_fdrain.value += 1.0; InvDeriv(&d_fdrain,&d_fdrain); /* *.....drain current */ cdrain = fdrain*cdrain; MultDeriv(&d_cdrain,&d_cdrain,&d_fdrain); Beta = Beta*fdrain; MultDeriv(&d_Beta,&d_Beta,&d_fdrain); } /* *.....channel length modulation */ if ( (lvds) <= vdsat ) goto line700; if ( model->MOS9maxDriftVel == 0.0 ) goto line510; if (model->MOS9alpha == 0.0) goto line700; cdsat = cdrain; EqualDeriv(&d_cdsat,&d_cdrain); gdsat = cdsat*(1.0-fdrain)*onvdsc; TimesDeriv(&d_dummy,&d_fdrain,-1.0); d_dummy.value += 1.0; MultDeriv(&d_gdsat,&d_cdsat,&d_dummy); MultDeriv(&d_gdsat,&d_gdsat,&d_onvdsc); gdsat = MAX(1.0e-12,gdsat); if (gdsat == 1.0e-12) { EqualDeriv(&d_gdsat,&d_zero); d_gdsat.value = gdsat; } emax = cdsat*oneoverxl/gdsat; DivDeriv(&d_emax,&d_cdsat,&d_gdsat); TimesDeriv(&d_emax,&d_emax,oneoverxl); arga = 0.5*emax*model->MOS9alpha; TimesDeriv(&d_arga,&d_emax,0.5*model->MOS9alpha); argc = model->MOS9kappa*model->MOS9alpha;/*const*/ argb = sqrt(arga*arga+argc*((lvds)-vdsat)); TimesDeriv(&d_dummy,&d_vdsat,-1.0); d_dummy.value += lvds; d_dummy.d1_r += 1.0; TimesDeriv(&d_argb,&d_dummy,argc); MultDeriv(&d_dummy,&d_arga,&d_arga); PlusDeriv(&d_argb,&d_argb,&d_dummy); SqrtDeriv(&d_argb,&d_argb); delxl = argb-arga; TimesDeriv(&d_delxl,&d_arga,-1.0); PlusDeriv(&d_delxl,&d_argb,&d_delxl); goto line520; line510: delxl = sqrt(model->MOS9kappa*((lvds)-vdsat)*model->MOS9alpha); TimesDeriv(&d_delxl,&d_vdsat,-1.0); d_delxl.value += lvds; d_delxl.d1_r += 1.0; TimesDeriv(&d_delxl,&d_delxl,model->MOS9kappa*model->MOS9alpha); SqrtDeriv(&d_delxl,&d_delxl); /* *.....punch through approximation */ line520: if ( delxl > (0.5*EffectiveLength) ) { delxl = EffectiveLength - (EffectiveLength*EffectiveLength/ delxl*0.25); InvDeriv(&d_delxl,&d_delxl); TimesDeriv(&d_delxl,&d_delxl,-EffectiveLength*EffectiveLength*0.25); d_delxl.value += EffectiveLength; } /* *.....saturation region */ dlonxl = delxl*oneoverxl; TimesDeriv(&d_dlonxl,&d_delxl,oneoverxl); xlfact = 1.0/(1.0-dlonxl); TimesDeriv(&d_xlfact,&d_dlonxl,-1.0); d_xlfact.value += 1.0; InvDeriv(&d_xlfact,&d_xlfact); cdrain = cdrain*xlfact; MultDeriv(&d_cdrain,&d_cdrain,&d_xlfact); /* *.....finish strong inversion case */ line700: if ( lvgs < von ) { /* *.....weak inversion */ onxn = 1.0/xn; InvDeriv(&d_onxn,&d_xn); ondvt = onxn/vt; TimesDeriv(&d_ondvt,&d_onxn,1/vt); wfact = exp( (lvgs-von)*ondvt ); TimesDeriv(&d_wfact,&d_von,-1.0); d_wfact.value += lvgs; d_wfact.d1_p += 1.0; MultDeriv(&d_wfact,&d_wfact,&d_ondvt); ExpDeriv(&d_wfact,&d_wfact); cdrain = cdrain*wfact; MultDeriv(&d_cdrain,&d_cdrain,&d_wfact); } /* *.....charge computation */ goto innerline1000; /* *.....special case of vds = 0.0d0 */ line900: Beta = Beta*fgate; /* Beta is still a constant */ TimesDeriv(&d_Beta,&d_fgate,Beta); cdrain = 0.0; EqualDeriv(&d_cdrain,&d_zero); here->MOS9gds = Beta*(vgsx-vth); TimesDeriv(&d_MOS9gds,&d_vth,-1.0); PlusDeriv(&d_MOS9gds,&d_MOS9gds,&d_vgsx); MultDeriv(&d_MOS9gds,&d_MOS9gds,&d_Beta); if ( (model->MOS9fastSurfaceStateDensity != 0.0) && (lvgs < von) ) { here->MOS9gds *=exp((lvgs-von)/(vt*xn)); TimesDeriv(&d_dummy,&d_von,-1.0); d_dummy.value += lvgs; d_dummy.d1_p += 1.0; DivDeriv(&d_dummy,&d_dummy,&d_xn); TimesDeriv(&d_dummy,&d_dummy,1/vt); ExpDeriv(&d_dummy,&d_dummy); MultDeriv(&d_MOS9gds,&d_MOS9gds,&d_dummy); } d_cdrain.d1_r = d_MOS9gds.value; d_cdrain.d2_r2 = d_MOS9gds.d1_r; d_cdrain.d3_r3 = d_MOS9gds.d2_r2; innerline1000:; /* *.....done */ } /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ /* * now we do the hard part of the bulk-drain and bulk-source * diode - we evaluate the non-linear capacitance and * charge * * the basic equations are not hard, but the implementation * is somewhat long in an attempt to avoid log/exponential * evaluations */ /* * charge storage elements * *.. bulk-drain and bulk-source depletion capacitances */ if (vbs < here->MOS9tDepCap){ arg=1-vbs/here->MOS9tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS9bulkJctBotGradingCoeff == model->MOS9bulkJctSideGradingCoeff) { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { sarg = sargsw = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } } else { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } if(model->MOS9bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS9bulkJctSideGradingCoeff* log(arg)); } } lcapbs=here->MOS9Cbs*sarg+ here->MOS9Cbssw*sargsw; lcapbs2 = model->MOS9type*0.5/here->MOS9tBulkPot*( here->MOS9Cbs*model->MOS9bulkJctBotGradingCoeff* sarg/arg + here->MOS9Cbssw* model->MOS9bulkJctSideGradingCoeff*sargsw/arg); lcapbs3 = here->MOS9Cbs*sarg* model->MOS9bulkJctBotGradingCoeff* (model->MOS9bulkJctBotGradingCoeff+1); lcapbs3 += here->MOS9Cbssw*sargsw* model->MOS9bulkJctSideGradingCoeff* (model->MOS9bulkJctSideGradingCoeff+1); lcapbs3 = lcapbs3/(6*here->MOS9tBulkPot* here->MOS9tBulkPot*arg*arg); } else { /* *(ckt->CKTstate0 + here->MOS9qbs)= here->MOS9f4s + vbs*(here->MOS9f2s+vbs*(here->MOS9f3s/2));*/ lcapbs=here->MOS9f2s+here->MOS9f3s*vbs; lcapbs2 = 0.5*here->MOS9f3s; lcapbs3 = 0; } if (vbd < here->MOS9tDepCap) { arg=1-vbd/here->MOS9tBulkPot; /* * the following block looks somewhat long and messy, * but since most users use the default grading * coefficients of .5, and sqrt is MUCH faster than an * exp(log()) we use this special case code to buy time. * (as much as 10% of total job time!) */ if(model->MOS9bulkJctBotGradingCoeff == .5 && model->MOS9bulkJctSideGradingCoeff == .5) { sarg = sargsw = 1/sqrt(arg); } else { if(model->MOS9bulkJctBotGradingCoeff == .5) { sarg = 1/sqrt(arg); } else { sarg = exp(-model->MOS9bulkJctBotGradingCoeff* log(arg)); } if(model->MOS9bulkJctSideGradingCoeff == .5) { sargsw = 1/sqrt(arg); } else { sargsw =exp(-model->MOS9bulkJctSideGradingCoeff* log(arg)); } } lcapbd=here->MOS9Cbd*sarg+ here->MOS9Cbdsw*sargsw; lcapbd2 = model->MOS9type*0.5/here->MOS9tBulkPot*( here->MOS9Cbd*model->MOS9bulkJctBotGradingCoeff* sarg/arg + here->MOS9Cbdsw* model->MOS9bulkJctSideGradingCoeff*sargsw/arg); lcapbd3 = here->MOS9Cbd*sarg* model->MOS9bulkJctBotGradingCoeff* (model->MOS9bulkJctBotGradingCoeff+1); lcapbd3 += here->MOS9Cbdsw*sargsw* model->MOS9bulkJctSideGradingCoeff* (model->MOS9bulkJctSideGradingCoeff+1); lcapbd3 = lcapbd3/(6*here->MOS9tBulkPot* here->MOS9tBulkPot*arg*arg); } else { lcapbd=here->MOS9f2d + vbd * here->MOS9f3d; lcapbd2=0.5*here->MOS9f3d; lcapbd3=0; } /* * meyer's capacitor model */ /* * the meyer capacitance equations are in DEVqmeyer * these expressions are derived from those equations. * these expressions are incorrect; they assume just one * controlling variable for each charge storage element * while actually there are several; the MOS9 small * signal ac linear model is also wrong because it * ignores controlled capacitive elements. these can be * corrected (as can the linear ss ac model) if the * expressions for the charge are available */ { double phi; double cox; double vddif; double vddif1; double vddif2; double vgst; /* von, lvgs and vdsat have already been adjusted for possible source-drain interchange */ vgst = lvgs -von; phi = here->MOS9tPhi; cox = OxideCap; if (vgst <= -phi) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= -phi/2) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else if (vgst <= 0) { lcapgb2= -cox/(4*phi); lcapgb3=lcapgs3=lcapgd2=lcapgd3=0; lcapgs2 = cox/(3*phi); } else { /* the MOS9modes are around because vds has not been adjusted */ if (vdsat <= here->MOS9mode*vds) { lcapgb2=lcapgb3=lcapgs2=lcapgs3=lcapgd2=lcapgd3=0; } else { vddif = 2.0*vdsat-here->MOS9mode*vds; vddif1 = vdsat-here->MOS9mode*vds/*-1.0e-12*/; vddif2 = vddif*vddif; lcapgd2 = -vdsat*here->MOS9mode*vds*cox/(3*vddif*vddif2); lcapgd3 = - here->MOS9mode*vds*cox*(vddif - 6*vdsat)/(9*vddif2*vddif2); lcapgs2 = -vddif1*here->MOS9mode*vds*cox/(3*vddif*vddif2); lcapgs3 = - here->MOS9mode*vds*cox*(vddif - 6*vddif1)/(9*vddif2*vddif2); lcapgb2=lcapgb3=0; } } } /* the b-s and b-d diodes need no processing ... */ here->capbs2 = lcapbs2; here->capbs3 = lcapbs3; here->capbd2 = lcapbd2; here->capbd3 = lcapbd3; here->gbs2 = lgbs2; here->gbs3 = lgbs3; here->gbd2 = lgbd2; here->gbd3 = lgbd3; here->capgb2 = model->MOS9type*lcapgb2; here->capgb3 = lcapgb3; /* * process to get Taylor coefficients, taking into * account type and mode. */ gm2 = d_cdrain.d2_p2; gb2 = d_cdrain.d2_q2; gds2 = d_cdrain.d2_r2; gmb = d_cdrain.d2_pq; gbds = d_cdrain.d2_qr; gmds = d_cdrain.d2_pr; gm3 = d_cdrain.d3_p3; gb3 = d_cdrain.d3_q3; gds3 = d_cdrain.d3_r3; gm2ds = d_cdrain.d3_p2r; gm2b = d_cdrain.d3_p2q; gb2ds = d_cdrain.d3_q2r; gmb2 = d_cdrain.d3_pq2; gmds2 = d_cdrain.d3_pr2; gbds2 = d_cdrain.d3_qr2; gmbds = d_cdrain.d3_pqr; if (here->MOS9mode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x2 = gm2; here->cdr_y2 = gb2;; here->cdr_z2 = gds2;; here->cdr_xy = gmb; here->cdr_yz = gbds; here->cdr_xz = gmds; here->cdr_x3 = gm3; here->cdr_y3 = gb3; here->cdr_z3 = gds3; here->cdr_x2z = gm2ds; here->cdr_x2y = gm2b; here->cdr_y2z = gb2ds; here->cdr_xy2 = gmb2; here->cdr_xz2 = gmds2; here->cdr_yz2 = gbds2; here->cdr_xyz = gmbds; /* the gate caps have been divided and made into Taylor coeffs., but not adjusted for type */ here->capgs2 = model->MOS9type*lcapgs2; here->capgs3 = lcapgs3; here->capgd2 = model->MOS9type*lcapgd2; here->capgd3 = lcapgd3; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x2 = -gm2; here->cdr_y2 = -gb2; here->cdr_z2 = -(gm2 + gb2 + gds2 + 2*(gmb + gmds + gbds)); here->cdr_xy = -gmb; here->cdr_yz = gmb + gb2 + gbds; here->cdr_xz = gm2 + gmb + gmds; here->cdr_x3 = -gm3; here->cdr_y3 = -gb3; here->cdr_z3 = gm3 + gb3 + gds3 + 3*(gm2b + gm2ds + gmb2 + gb2ds + gmds2 + gbds2) + 6*gmbds ; here->cdr_x2z = gm3 + gm2b + gm2ds; here->cdr_x2y = -gm2b; here->cdr_y2z = gmb2 + gb3 + gb2ds; here->cdr_xy2 = -gmb2; here->cdr_xz2 = -(gm3 + 2*(gm2b + gm2ds + gmbds) + gmb2 + gmds2); here->cdr_yz2 = -(gb3 + 2*(gmb2 + gb2ds + gmbds) + gm2b + gbds2); here->cdr_xyz = gm2b + gmb2 + gmbds; here->capgs2 = model->MOS9type*lcapgd2; here->capgs3 = lcapgd3; here->capgd2 = model->MOS9type*lcapgs2; here->capgd3 = lcapgs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->MOS9type*here->cdr_x2; here->cdr_y2 = 0.5*model->MOS9type*here->cdr_y2; here->cdr_z2 = 0.5*model->MOS9type*here->cdr_z2; here->cdr_xy = model->MOS9type*here->cdr_xy; here->cdr_yz = model->MOS9type*here->cdr_yz; here->cdr_xz = model->MOS9type*here->cdr_xz; here->cdr_x3 = here->cdr_x3/6.; here->cdr_y3 = here->cdr_y3/6.; here->cdr_z3 = here->cdr_z3/6.; here->cdr_x2z = 0.5*here->cdr_x2z; here->cdr_x2y = 0.5*here->cdr_x2y; here->cdr_y2z = 0.5*here->cdr_y2z; here->cdr_xy2 = 0.5*here->cdr_xy2; here->cdr_xz2 = 0.5*here->cdr_xz2; here->cdr_yz2 = 0.5*here->cdr_yz2; } } return(OK); } ngspice-26/src/spicelib/devices/mos9/mos9dist.c0000644000265600020320000007724312264261473021057 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: Alan Gillespie **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int MOS9disto( int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { MOS9model *model = (MOS9model *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h1z, i1h1z; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1h2z, i1h2z; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r1hm2z, i1hm2z; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h11z, i2h11z; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double r2h1m2z, i2h1m2z; double temp, itemp; register MOS9instance *here; if (mode == D_SETUP) return(MOS9dSetup(genmodel,ckt)); if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the MOS9 models */ for( ; model != NULL; model = model->MOS9nextModel ) { /* loop through all the instances of the model */ for (here = model->MOS9instances; here != NULL ; here=here->MOS9nextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); itemp = DFi2F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z); *(ckt->CKTrhs + (here->MOS9dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F1(here->gbs2, r1h1y, i1h1y); itemp = D1i2F1(here->gbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = D1i2F1(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F1(here->capgs2, r1h1x, i1h1x); itemp = ckt->CKTomega * D1n2F1(here->capgs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9bNode)) += temp; *(ckt->CKTirhs + (here->MOS9bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F1(here->capbs2, r1h1y, i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capbs2, r1h1y, i1h1y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); itemp = ckt->CKTomega * D1n2F1(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r2h11x = *(job->r2H11ptr + (here->MOS9gNode)) - *(job->r2H11ptr + (here->MOS9sNodePrime)); i2h11x = *(job->i2H11ptr + (here->MOS9gNode)) - *(job->i2H11ptr + (here->MOS9sNodePrime)); r2h11y = *(job->r2H11ptr + (here->MOS9bNode)) - *(job->r2H11ptr + (here->MOS9sNodePrime)); i2h11y = *(job->i2H11ptr + (here->MOS9bNode)) - *(job->i2H11ptr + (here->MOS9sNodePrime)); r2h11z = *(job->r2H11ptr + (here->MOS9dNodePrime)) - *(job->r2H11ptr + (here->MOS9sNodePrime)); i2h11z = *(job->i2H11ptr + (here->MOS9dNodePrime)) - *(job->i2H11ptr + (here->MOS9sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); itemp = DFi3F1(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, here->cdr_x3, here->cdr_y3, here->cdr_z3, here->cdr_x2y, here->cdr_x2z, here->cdr_xy2, here->cdr_y2z, here->cdr_xz2, here->cdr_yz2, here->cdr_xyz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r2h11x, i2h11x, r2h11y, i2h11y, r2h11z, i2h11z); *(ckt->CKTrhs + (here->MOS9dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = D1i3F1(here->gbs2, here->gbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = D1i3F1(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = ckt->CKTomega * D1n3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r2h11x - r2h11z, i2h11x - i2h11z); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9bNode)) += temp; *(ckt->CKTirhs + (here->MOS9bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capbs2, here->capbs3, r1h1y, i1h1y, r2h11y, i2h11y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); itemp = ckt->CKTomega * D1n3F1(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r2h11y - r2h11z, i2h11y - i2h11z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h2x = *(job->r1H2ptr + (here->MOS9gNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1h2x = *(job->i1H2ptr + (here->MOS9gNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime)); r1h2y = *(job->r1H2ptr + (here->MOS9bNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1h2y = *(job->i1H2ptr + (here->MOS9bNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime)); r1h2z = *(job->r1H2ptr + (here->MOS9dNodePrime)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1h2z = *(job->i1H2ptr + (here->MOS9dNodePrime)) - *(job->i1H2ptr + (here->MOS9sNodePrime)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1h2x, i1h2x, r1h2y, i1h2y, r1h2z, i1h2z); *(ckt->CKTrhs + (here->MOS9dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1h2x - r1h2z, i1h2x - i1h2z); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9bNode)) += temp; *(ckt->CKTirhs + (here->MOS9bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1h2y, i1h2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1h2y - r1h2z, i1h2y - i1h2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS9gNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS9gNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS9bNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS9bNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS9dNodePrime)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS9dNodePrime)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); itemp = DFiF12(here->cdr_x2, here->cdr_y2, here->cdr_z2, here->cdr_xy, here->cdr_yz, here->cdr_xz, r1h1x, i1h1x, r1h1y, i1h1y, r1h1z, i1h1z, r1hm2x, i1hm2x, r1hm2y, i1hm2y, r1hm2z, i1hm2z); *(ckt->CKTrhs + (here->MOS9dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1nF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = D1iF12(here->gbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1nF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = D1iF12(here->gbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1iF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capgb2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9bNode)) += temp; *(ckt->CKTirhs + (here->MOS9bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1iF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capbs2, r1h1y, i1h1y, r1hm2y, i1hm2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1iF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); itemp = ckt->CKTomega * D1nF12(here->capbd2, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capbd over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vbs z = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1h1z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i1h1z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r1hm2x = *(job->r1H2ptr + (here->MOS9gNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2x = -(*(job->i1H2ptr + (here->MOS9gNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); r1hm2y = *(job->r1H2ptr + (here->MOS9bNode)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2y = -(*(job->i1H2ptr + (here->MOS9bNode)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); r1hm2z = *(job->r1H2ptr + (here->MOS9dNodePrime)) - *(job->r1H2ptr + (here->MOS9sNodePrime)); i1hm2z = -(*(job->i1H2ptr + (here->MOS9dNodePrime)) - *(job->i1H2ptr + (here->MOS9sNodePrime))); r2h11x = *(job->r1H1ptr + (here->MOS9gNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i2h11x = *(job->i1H1ptr + (here->MOS9gNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r2h11y = *(job->r1H1ptr + (here->MOS9bNode)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i2h11y = *(job->i1H1ptr + (here->MOS9bNode)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r2h11z = *(job->r1H1ptr + (here->MOS9dNodePrime)) - *(job->r1H1ptr + (here->MOS9sNodePrime)); i2h11z = *(job->i1H1ptr + (here->MOS9dNodePrime)) - *(job->i1H1ptr + (here->MOS9sNodePrime)); r2h1m2x = *(job->r2H1m2ptr + (here->MOS9gNode)) - *(job->r2H1m2ptr + (here->MOS9sNodePrime)); i2h1m2x = *(job->i2H1m2ptr + (here->MOS9gNode)) - *(job->i2H1m2ptr + (here->MOS9sNodePrime)); r2h1m2y = *(job->r2H1m2ptr + (here->MOS9bNode)) - *(job->r2H1m2ptr + (here->MOS9sNodePrime)); i2h1m2y = *(job->i2H1m2ptr + (here->MOS9bNode)) - *(job->i2H1m2ptr + (here->MOS9sNodePrime)); r2h1m2z = *(job->r2H1m2ptr + (here->MOS9dNodePrime)) - *(job->r2H1m2ptr + (here->MOS9sNodePrime)); i2h1m2z = *(job->i2H1m2ptr + (here->MOS9dNodePrime)) - *(job->i2H1m2ptr + (here->MOS9sNodePrime)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_y2; pass.czz = here->cdr_z2; pass.cxy = here->cdr_xy; pass.cyz = here->cdr_yz; pass.cxz = here->cdr_xz; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_y3; pass.czzz = here->cdr_z3; pass.cxxy = here->cdr_x2y; pass.cxxz = here->cdr_x2z; pass.cxyy = here->cdr_xy2; pass.cyyz = here->cdr_y2z; pass.cxzz = here->cdr_xz2; pass.cyzz = here->cdr_yz2; pass.cxyz = here->cdr_xyz; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = r1h1z; pass.i1h1z = i1h1z; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = r1hm2z; pass.i1h2z = i1hm2z; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = r2h11z; pass.i2h11z = i2h11z; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = r2h1m2z; pass.ih2f1f2z = i2h1m2z; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->MOS9dNodePrime)) -= temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* cdrain term over */ /* loading gbs term */ temp = D1n2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = D1i2F12(here->gbs2, here->gbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* gbs over */ /* loading gbd term */ temp = D1n2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = D1i2F12(here->gbd2, here->gbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* gbd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = ckt->CKTomega * D1n2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capgd2, here->capgd3, r1h1x - r1h1z, i1h1x - i1h1z, r1hm2x - r1hm2z, i1hm2x - i1hm2z, r2h11x - r2h11z, i2h11x - i2h11z, r2h1m2x - r2h1m2z, i2h1m2x - i2h1m2z); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capgd over */ /* loading capgb term */ temp = -ckt->CKTomega * D1i2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capgb2, here->capgb3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->MOS9gNode)) -= temp; *(ckt->CKTirhs + (here->MOS9gNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9bNode)) += temp; *(ckt->CKTirhs + (here->MOS9bNode)) += itemp; /* capgb over */ /* loading capbs term */ temp = -ckt->CKTomega * D1i2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capbs2, here->capbs3, r1h1y, i1h1y, r1hm2y, i1hm2y, r2h11y, i2h11y, r2h1m2y, i2h1m2y); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9sNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9sNodePrime)) += itemp; /* capbs over */ /* loading capbd term */ temp = -ckt->CKTomega * D1i2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); itemp = ckt->CKTomega * D1n2F12(here->capbd2, here->capbd3, r1h1y - r1h1z, i1h1y - i1h1z, r1hm2y - r1hm2z, i1hm2y - i1hm2z, r2h11y - r2h11z, i2h11y - i2h11z, r2h1m2y - r2h1m2z, i2h1m2y - i2h1m2z); *(ckt->CKTrhs + (here->MOS9bNode)) -= temp; *(ckt->CKTirhs + (here->MOS9bNode)) -= itemp; *(ckt->CKTrhs + (here->MOS9dNodePrime)) += temp; *(ckt->CKTirhs + (here->MOS9dNodePrime)) += itemp; /* capbd over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/mos9/mos9defs.h0000644000265600020320000005120212264261473021025 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie **********/ #ifndef MOS9 #define MOS9 #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* declarations for level 9 MOSFETs */ /* information needed for each instance */ typedef struct sMOS9instance { struct sMOS9model *MOS9modPtr; /* backpointer to model */ struct sMOS9instance *MOS9nextInstance; /* pointer to next instance of *current model*/ IFuid MOS9name; /* pointer to character string naming this instance */ int MOS9states; /* index into state table for this device */ int MOS9dNode; /* number of the gate node of the mosfet */ int MOS9gNode; /* number of the gate node of the mosfet */ int MOS9sNode; /* number of the source node of the mosfet */ int MOS9bNode; /* number of the bulk node of the mosfet */ int MOS9dNodePrime; /* number of the internal drain node of the mosfet */ int MOS9sNodePrime; /* number of the internal source node of the mosfet */ double MOS9m; /* parallel device multiplier */ double MOS9l; /* the length of the channel region */ double MOS9w; /* the width of the channel region */ double MOS9drainArea; /* the area of the drain diffusion */ double MOS9sourceArea; /* the area of the source diffusion */ double MOS9drainSquares; /* the length of the drain in squares */ double MOS9sourceSquares; /* the length of the source in squares */ double MOS9drainPerimiter; double MOS9sourcePerimiter; double MOS9sourceConductance; /*conductance of source(or 0):set in setup*/ double MOS9drainConductance; /*conductance of drain(or 0):set in setup*/ double MOS9temp; /* operating temperature of this instance */ double MOS9dtemp; /* instance temperature difference */ double MOS9tTransconductance; /* temperature corrected transconductance*/ double MOS9tSurfMob; /* temperature corrected surface mobility */ double MOS9tPhi; /* temperature corrected Phi */ double MOS9tVto; /* temperature corrected Vto */ double MOS9tSatCur; /* temperature corrected saturation Cur. */ double MOS9tSatCurDens; /* temperature corrected saturation Cur. density*/ double MOS9tCbd; /* temperature corrected B-D Capacitance */ double MOS9tCbs; /* temperature corrected B-S Capacitance */ double MOS9tCj; /* temperature corrected Bulk bottom Capacitance */ double MOS9tCjsw; /* temperature corrected Bulk side Capacitance */ double MOS9tBulkPot; /* temperature corrected Bulk potential */ double MOS9tDepCap; /* temperature adjusted transition point in */ /* the cureve matching Fc * Vj */ double MOS9tVbi; /* temperature adjusted Vbi */ double MOS9icVBS; /* initial condition B-S voltage */ double MOS9icVDS; /* initial condition D-S voltage */ double MOS9icVGS; /* initial condition G-S voltage */ double MOS9von; double MOS9vdsat; double MOS9sourceVcrit; /* vcrit for pos. vds */ double MOS9drainVcrit; /* vcrit for neg. vds */ double MOS9cd; double MOS9cbs; double MOS9cbd; double MOS9gmbs; double MOS9gm; double MOS9gds; double MOS9gbd; double MOS9gbs; double MOS9capbd; double MOS9capbs; double MOS9Cbd; double MOS9Cbdsw; double MOS9Cbs; double MOS9Cbssw; double MOS9f2d; double MOS9f3d; double MOS9f4d; double MOS9f2s; double MOS9f3s; double MOS9f4s; int MOS9mode; /* device mode : 1 = normal, -1 = inverse */ unsigned MOS9off :1;/* non-zero to indicate device is off for dc analysis*/ unsigned MOS9tempGiven :1; /* instance temperature specified */ unsigned MOS9dtempGiven :1; /* instance temperature difference specified*/ unsigned MOS9mGiven :1; unsigned MOS9lGiven :1; unsigned MOS9wGiven :1; unsigned MOS9drainAreaGiven :1; unsigned MOS9sourceAreaGiven :1; unsigned MOS9drainSquaresGiven :1; unsigned MOS9sourceSquaresGiven :1; unsigned MOS9drainPerimiterGiven :1; unsigned MOS9sourcePerimiterGiven :1; unsigned MOS9dNodePrimeSet :1; unsigned MOS9sNodePrimeSet :1; unsigned MOS9icVBSGiven :1; unsigned MOS9icVDSGiven :1; unsigned MOS9icVGSGiven :1; unsigned MOS9vonGiven :1; unsigned MOS9vdsatGiven :1; unsigned MOS9modeGiven :1; double *MOS9DdPtr; /* pointer to sparse matrix element at * (Drain node,drain node) */ double *MOS9GgPtr; /* pointer to sparse matrix element at * (gate node,gate node) */ double *MOS9SsPtr; /* pointer to sparse matrix element at * (source node,source node) */ double *MOS9BbPtr; /* pointer to sparse matrix element at * (bulk node,bulk node) */ double *MOS9DPdpPtr; /* pointer to sparse matrix element at * (drain prime node,drain prime node) */ double *MOS9SPspPtr; /* pointer to sparse matrix element at * (source prime node,source prime node) */ double *MOS9DdpPtr; /* pointer to sparse matrix element at * (drain node,drain prime node) */ double *MOS9GbPtr; /* pointer to sparse matrix element at * (gate node,bulk node) */ double *MOS9GdpPtr; /* pointer to sparse matrix element at * (gate node,drain prime node) */ double *MOS9GspPtr; /* pointer to sparse matrix element at * (gate node,source prime node) */ double *MOS9SspPtr; /* pointer to sparse matrix element at * (source node,source prime node) */ double *MOS9BdpPtr; /* pointer to sparse matrix element at * (bulk node,drain prime node) */ double *MOS9BspPtr; /* pointer to sparse matrix element at * (bulk node,source prime node) */ double *MOS9DPspPtr; /* pointer to sparse matrix element at * (drain prime node,source prime node) */ double *MOS9DPdPtr; /* pointer to sparse matrix element at * (drain prime node,drain node) */ double *MOS9BgPtr; /* pointer to sparse matrix element at * (bulk node,gate node) */ double *MOS9DPgPtr; /* pointer to sparse matrix element at * (drain prime node,gate node) */ double *MOS9SPgPtr; /* pointer to sparse matrix element at * (source prime node,gate node) */ double *MOS9SPsPtr; /* pointer to sparse matrix element at * (source prime node,source node) */ double *MOS9DPbPtr; /* pointer to sparse matrix element at * (drain prime node,bulk node) */ double *MOS9SPbPtr; /* pointer to sparse matrix element at * (source prime node,bulk node) */ double *MOS9SPdpPtr; /* pointer to sparse matrix element at * (source prime node,drain prime node) */ int MOS9senParmNo; /* parameter # for sensitivity use; set equal to 0 if neither length nor width of the mosfet is a design parameter */ unsigned MOS9sens_l :1; /* field which indicates whether length of the mosfet is a design parameter or not */ unsigned MOS9sens_w :1; /* field which indicates whether width of the mosfet is a design parameter or not */ unsigned MOS9senPertFlag :1; /* indictes whether the the parameter of the particular instance is to be perturbed */ double MOS9cgs; double MOS9cgd; double MOS9cgb; double *MOS9sens; #define MOS9senGdpr MOS9sens #define MOS9senGspr MOS9sens + 1 #define MOS9senCgs MOS9sens + 2 /* contains pertured values of cgs */ #define MOS9senCgd MOS9sens + 8 /* contains perturbed values of cgd*/ #define MOS9senCgb MOS9sens + 14 /* contains perturbed values of cgb*/ #define MOS9senCbd MOS9sens + 20 /* contains perturbed values of cbd*/ #define MOS9senCbs MOS9sens + 26 /* contains perturbed values of cbs*/ #define MOS9senGds MOS9sens + 32 /* contains perturbed values of gds*/ #define MOS9senGbs MOS9sens + 38 /* contains perturbed values of gbs*/ #define MOS9senGbd MOS9sens + 44 /* contains perturbed values of gbd*/ #define MOS9senGm MOS9sens + 50 /* contains perturbed values of gm*/ #define MOS9senGmbs MOS9sens + 56 /* contains perturbed values of gmbs*/ #define MOS9dphigs_dl MOS9sens + 62 #define MOS9dphigd_dl MOS9sens + 63 #define MOS9dphigb_dl MOS9sens + 64 #define MOS9dphibs_dl MOS9sens + 65 #define MOS9dphibd_dl MOS9sens + 66 #define MOS9dphigs_dw MOS9sens + 67 #define MOS9dphigd_dw MOS9sens + 68 #define MOS9dphigb_dw MOS9sens + 69 #define MOS9dphibs_dw MOS9sens + 70 #define MOS9dphibd_dw MOS9sens + 71 /* distortion stuff */ /* * naming convention: * x = vgs * y = vbs * z = vds * cdr = cdrain */ #define MOS9NDCOEFFS 30 #ifndef NODISTO double MOS9dCoeffs[MOS9NDCOEFFS]; #else /* NODISTO */ double *MOS9dCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define capbs2 MOS9dCoeffs[0] #define capbs3 MOS9dCoeffs[1] #define capbd2 MOS9dCoeffs[2] #define capbd3 MOS9dCoeffs[3] #define gbs2 MOS9dCoeffs[4] #define gbs3 MOS9dCoeffs[5] #define gbd2 MOS9dCoeffs[6] #define gbd3 MOS9dCoeffs[7] #define capgb2 MOS9dCoeffs[8] #define capgb3 MOS9dCoeffs[9] #define cdr_x2 MOS9dCoeffs[10] #define cdr_y2 MOS9dCoeffs[11] #define cdr_z2 MOS9dCoeffs[12] #define cdr_xy MOS9dCoeffs[13] #define cdr_yz MOS9dCoeffs[14] #define cdr_xz MOS9dCoeffs[15] #define cdr_x3 MOS9dCoeffs[16] #define cdr_y3 MOS9dCoeffs[17] #define cdr_z3 MOS9dCoeffs[18] #define cdr_x2z MOS9dCoeffs[19] #define cdr_x2y MOS9dCoeffs[20] #define cdr_y2z MOS9dCoeffs[21] #define cdr_xy2 MOS9dCoeffs[22] #define cdr_xz2 MOS9dCoeffs[23] #define cdr_yz2 MOS9dCoeffs[24] #define cdr_xyz MOS9dCoeffs[25] #define capgs2 MOS9dCoeffs[26] #define capgs3 MOS9dCoeffs[27] #define capgd2 MOS9dCoeffs[28] #define capgd3 MOS9dCoeffs[29] #endif /* end distortion coeffs. */ /* indices to the array of MOSFET(3) noise sources */ #define MOS9RDNOIZ 0 #define MOS9RSNOIZ 1 #define MOS9IDNOIZ 2 #define MOS9FLNOIZ 3 #define MOS9TOTNOIZ 4 #define MOS9NSRCS 5 /* the number of MOSFET(9) noise sources */ #ifndef NONOISE double MOS9nVar[NSTATVARS][MOS9NSRCS]; #else /* NONOISE */ double **MOS9nVar; #endif /* NONOISE */ } MOS9instance ; #define MOS9vbd MOS9states+ 0 #define MOS9vbs MOS9states+ 1 #define MOS9vgs MOS9states+ 2 #define MOS9vds MOS9states+ 3 /* meyer capacitances */ #define MOS9capgs MOS9states+ 4 /* gate-source capacitor value */ #define MOS9qgs MOS9states+ 5 /* gate-source capacitor charge */ #define MOS9cqgs MOS9states+ 6 /* gate-source capacitor current */ #define MOS9capgd MOS9states+ 7 /* gate-drain capacitor value */ #define MOS9qgd MOS9states+ 8 /* gate-drain capacitor charge */ #define MOS9cqgd MOS9states+ 9 /* gate-drain capacitor current */ #define MOS9capgb MOS9states+ 10/* gate-bulk capacitor value */ #define MOS9qgb MOS9states+ 11 /* gate-bulk capacitor charge */ #define MOS9cqgb MOS9states+ 12 /* gate-bulk capacitor current */ /* diode capacitances */ #define MOS9qbd MOS9states+ 13 /* bulk-drain capacitor charge */ #define MOS9cqbd MOS9states+ 14 /* bulk-drain capacitor current */ #define MOS9qbs MOS9states+ 15 /* bulk-source capacitor charge */ #define MOS9cqbs MOS9states+ 16 /* bulk-source capacitor current */ #define MOS9NUMSTATES 17 #define MOS9sensxpgs MOS9states+17 /* charge sensitivities and their derivatives +18 for the derivatives - pointer to the beginning of the array */ #define MOS9sensxpgd MOS9states+19 #define MOS9sensxpgb MOS9states+21 #define MOS9sensxpbs MOS9states+23 #define MOS9sensxpbd MOS9states+25 #define MOS9numSenStates 10 /* per model data */ /* NOTE: parameters marked 'input - use xxxx' are paramters for * which a temperature correction is applied in MOS9temp, thus * the MOS9xxxx value in the per-instance structure should be used * instead in all calculations */ typedef struct sMOS9model { /* model structure for a resistor */ int MOS9modType; /* type index of this device type */ struct sMOS9model *MOS9nextModel; /* pointer to next possible model *in linked list */ MOS9instance * MOS9instances; /* pointer to list of instances * that have this model */ IFuid MOS9modName; /* pointer to character string naming this model */ int MOS9type; /* device type : 1 = nmos, -1 = pmos */ double MOS9tnom; /* temperature at which parameters measured */ double MOS9latDiff; double MOS9lengthAdjust; /* New parm: mask adjustment to length */ double MOS9widthNarrow; /* New parm to reduce effective width */ double MOS9widthAdjust; /* New parm: mask adjustment to width */ double MOS9delvt0; /* New parm: adjustment to calculated vtO */ double MOS9jctSatCurDensity; /* input - use tSatCurDens*/ double MOS9jctSatCur; /* input - use tSatCur instead */ double MOS9drainResistance; double MOS9sourceResistance; double MOS9sheetResistance; double MOS9transconductance; /* input - use tTransconductance */ double MOS9gateSourceOverlapCapFactor; double MOS9gateDrainOverlapCapFactor; double MOS9gateBulkOverlapCapFactor; double MOS9oxideCapFactor; double MOS9vt0; /* input - use tVto */ double MOS9capBD; /* input - use tCbs */ double MOS9capBS; /* input - use tCbd */ double MOS9bulkCapFactor; /* input - use tCj */ double MOS9sideWallCapFactor; /* input - use tCjsw */ double MOS9bulkJctPotential; /* input - use tBulkPot */ double MOS9bulkJctBotGradingCoeff; double MOS9bulkJctSideGradingCoeff; double MOS9fwdCapDepCoeff; double MOS9phi; /* input - use tPhi */ double MOS9gamma; double MOS9substrateDoping; int MOS9gateType; double MOS9surfaceStateDensity; double MOS9oxideThickness; double MOS9surfaceMobility; /* input - use tSurfMob */ double MOS9eta; double MOS9junctionDepth; double MOS9coeffDepLayWidth; /* xd */ double MOS9narrowFactor; /* delta */ double MOS9delta; /* input delta */ double MOS9fastSurfaceStateDensity; /* nfs */ double MOS9theta; /* theta */ double MOS9maxDriftVel; /* vmax */ double MOS9alpha; /* alpha */ double MOS9kappa; /* kappa */ double MOS9fNcoef; double MOS9fNexp; unsigned MOS9typeGiven :1; unsigned MOS9latDiffGiven :1; unsigned MOS9lengthAdjustGiven :1; unsigned MOS9widthNarrowGiven :1; unsigned MOS9widthAdjustGiven :1; unsigned MOS9delvt0Given :1; unsigned MOS9jctSatCurDensityGiven :1; unsigned MOS9jctSatCurGiven :1; unsigned MOS9drainResistanceGiven :1; unsigned MOS9sourceResistanceGiven :1; unsigned MOS9sheetResistanceGiven :1; unsigned MOS9transconductanceGiven :1; unsigned MOS9gateSourceOverlapCapFactorGiven :1; unsigned MOS9gateDrainOverlapCapFactorGiven :1; unsigned MOS9gateBulkOverlapCapFactorGiven :1; unsigned MOS9vt0Given :1; unsigned MOS9capBDGiven :1; unsigned MOS9capBSGiven :1; unsigned MOS9bulkCapFactorGiven :1; unsigned MOS9sideWallCapFactorGiven :1; unsigned MOS9bulkJctPotentialGiven :1; unsigned MOS9bulkJctBotGradingCoeffGiven :1; unsigned MOS9bulkJctSideGradingCoeffGiven :1; unsigned MOS9fwdCapDepCoeffGiven :1; unsigned MOS9phiGiven :1; unsigned MOS9gammaGiven :1; unsigned MOS9substrateDopingGiven :1; unsigned MOS9gateTypeGiven :1; unsigned MOS9surfaceStateDensityGiven :1; unsigned MOS9oxideThicknessGiven :1; unsigned MOS9surfaceMobilityGiven :1; unsigned MOS9etaGiven :1; unsigned MOS9junctionDepthGiven :1; unsigned MOS9deltaGiven :1; /* delta */ unsigned MOS9fastSurfaceStateDensityGiven :1; /* nfs */ unsigned MOS9thetaGiven :1; /* theta */ unsigned MOS9maxDriftVelGiven :1; /* vmax */ unsigned MOS9kappaGiven :1; /* kappa */ unsigned MOS9tnomGiven :1; /* Tnom was given? */ unsigned MOS9fNcoefGiven :1; unsigned MOS9fNexpGiven :1; } MOS9model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define MOS9_W 1 #define MOS9_L 2 #define MOS9_AS 3 #define MOS9_AD 4 #define MOS9_PS 5 #define MOS9_PD 6 #define MOS9_NRS 7 #define MOS9_NRD 8 #define MOS9_OFF 9 #define MOS9_IC 10 #define MOS9_IC_VBS 11 #define MOS9_IC_VDS 12 #define MOS9_IC_VGS 13 #define MOS9_W_SENS 14 #define MOS9_L_SENS 15 #define MOS9_CB 16 #define MOS9_CG 17 #define MOS9_CS 18 #define MOS9_POWER 19 #define MOS9_CGS 20 #define MOS9_CGD 21 #define MOS9_DNODE 22 #define MOS9_GNODE 23 #define MOS9_SNODE 24 #define MOS9_BNODE 25 #define MOS9_DNODEPRIME 26 #define MOS9_SNODEPRIME 27 #define MOS9_SOURCECONDUCT 28 #define MOS9_DRAINCONDUCT 29 #define MOS9_VON 30 #define MOS9_VDSAT 31 #define MOS9_SOURCEVCRIT 32 #define MOS9_DRAINVCRIT 33 #define MOS9_CD 34 #define MOS9_CBS 35 #define MOS9_CBD 36 #define MOS9_GMBS 37 #define MOS9_GM 38 #define MOS9_GDS 39 #define MOS9_GBD 40 #define MOS9_GBS 41 #define MOS9_CAPBD 42 #define MOS9_CAPBS 43 #define MOS9_CAPZEROBIASBD 44 #define MOS9_CAPZEROBIASBDSW 45 #define MOS9_CAPZEROBIASBS 46 #define MOS9_CAPZEROBIASBSSW 47 #define MOS9_VBD 48 #define MOS9_VBS 49 #define MOS9_VGS 50 #define MOS9_VDS 51 #define MOS9_CAPGS 52 #define MOS9_QGS 53 #define MOS9_CQGS 54 #define MOS9_CAPGD 55 #define MOS9_QGD 56 #define MOS9_CQGD 57 #define MOS9_CAPGB 58 #define MOS9_QGB 59 #define MOS9_CQGB 60 #define MOS9_QBD 61 #define MOS9_CQBD 62 #define MOS9_QBS 63 #define MOS9_CQBS 64 #define MOS9_W_SENS_REAL 65 #define MOS9_W_SENS_IMAG 66 #define MOS9_W_SENS_MAG 67 #define MOS9_W_SENS_PH 68 #define MOS9_W_SENS_CPLX 69 #define MOS9_L_SENS_REAL 70 #define MOS9_L_SENS_IMAG 71 #define MOS9_L_SENS_MAG 72 #define MOS9_L_SENS_PH 73 #define MOS9_L_SENS_CPLX 74 #define MOS9_W_SENS_DC 75 #define MOS9_L_SENS_DC 76 #define MOS9_TEMP 77 #define MOS9_SOURCERESIST 78 #define MOS9_DRAINRESIST 79 #define MOS9_M 80 #define MOS9_DTEMP 81 /* model parameters */ #define MOS9_MOD_VTO 101 #define MOS9_MOD_KP 102 #define MOS9_MOD_GAMMA 103 #define MOS9_MOD_PHI 104 #define MOS9_MOD_RD 105 #define MOS9_MOD_RS 106 #define MOS9_MOD_CBD 107 #define MOS9_MOD_CBS 108 #define MOS9_MOD_IS 109 #define MOS9_MOD_PB 110 #define MOS9_MOD_CGSO 111 #define MOS9_MOD_CGDO 112 #define MOS9_MOD_CGBO 113 #define MOS9_MOD_RSH 114 #define MOS9_MOD_CJ 115 #define MOS9_MOD_MJ 116 #define MOS9_MOD_CJSW 117 #define MOS9_MOD_MJSW 118 #define MOS9_MOD_JS 119 #define MOS9_MOD_TOX 120 #define MOS9_MOD_LD 121 #define MOS9_MOD_U0 122 #define MOS9_MOD_FC 123 #define MOS9_MOD_NSUB 124 #define MOS9_MOD_TPG 125 #define MOS9_MOD_NSS 126 #define MOS9_MOD_ETA 127 #define MOS9_MOD_DELTA 128 #define MOS9_MOD_NFS 129 #define MOS9_MOD_THETA 130 #define MOS9_MOD_VMAX 131 #define MOS9_MOD_KAPPA 132 #define MOS9_MOD_NMOS 133 #define MOS9_MOD_PMOS 134 #define MOS9_MOD_XJ 135 #define MOS9_MOD_UEXP 136 #define MOS9_MOD_NEFF 137 #define MOS9_MOD_XD 138 #define MOS9_MOD_ALPHA 139 #define MOS9_DELTA 140 #define MOS9_MOD_TNOM 141 #define MOS9_MOD_KF 142 #define MOS9_MOD_AF 143 #define MOS9_MOD_TYPE 144 #define MOS9_MOD_XL 145 #define MOS9_MOD_WD 146 #define MOS9_MOD_XW 147 #define MOS9_MOD_DELVTO 148 /* device questions */ /* model questions */ #include "mos9ext.h" #endif /*MOS9*/ ngspice-26/src/spicelib/devices/mos9/mos9sacl.c0000644000265600020320000007435512264261473021037 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Alan Gillespie This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/const.h" #include "mos9defs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int MOS9sAcLoad(GENmodel *inModel, CKTcircuit *ckt) { MOS9model *model = (MOS9model *)inModel; MOS9instance *here; int xnrm; int xrev; double A0; double Apert = 0.0; double DELA; double DELAinv; double gdpr0; double gspr0; double gds0; double gbs0; double gbd0; double gm0; double gmbs0; double gdpr; double gspr; double gds; double gbs; double gbd; double gm; double gmbs; double xcgs0; double xcgd0; double xcgb0; double xbd0; double xbs0; double xcgs; double xcgd; double xcgb; double xbd; double xbs; double vbsOp; double vbdOp; double vspr; double vdpr; double vgs; double vgd; double vgb; double vbs; double vbd; double vds; double ivspr; double ivdpr; double ivgs; double ivgd; double ivgb; double ivbs; double ivbd; double ivds; double cspr; double cdpr; double cgs; double cgd; double cgb; double cbs; double cbd; double cds; double cs0; double csprm0; double cd0; double cdprm0; double cg0; double cb0; double cs; double csprm; double cd; double cdprm; double cg; double cb; double icspr; double icdpr; double icgs; double icgd; double icgb; double icbs; double icbd; double icds; double ics0; double icsprm0; double icd0; double icdprm0; double icg0; double icb0; double ics; double icsprm; double icd; double icdprm; double icg; double icb; double DvDp = 0.0; int i; int flag; int error; int iparmno; double arg; double sarg; double sargsw; double SaveState[44]; int save_mode; SENstruct *info; #ifdef SENSDEBUG printf("MOS9senacload\n"); printf("CKTomega = %.5e\n",ckt->CKTomega); #endif /* SENSDEBUG */ info = ckt->CKTsenInfo; info->SENstatus = PERTURBATION; for( ; model != NULL; model = model->MOS9nextModel) { for(here = model->MOS9instances; here!= NULL; here = here->MOS9nextInstance) { /* save the unperturbed values in the state vector */ for(i=0; i <= 16; i++) *(SaveState + i) = *(ckt->CKTstate0 + here->MOS9states + i); *(SaveState + 17) = here->MOS9sourceConductance; *(SaveState + 18) = here->MOS9drainConductance; *(SaveState + 19) = here->MOS9cd; *(SaveState + 20) = here->MOS9cbs; *(SaveState + 21) = here->MOS9cbd; *(SaveState + 22) = here->MOS9gmbs; *(SaveState + 23) = here->MOS9gm; *(SaveState + 24) = here->MOS9gds; *(SaveState + 25) = here->MOS9gbd; *(SaveState + 26) = here->MOS9gbs; *(SaveState + 27) = here->MOS9capbd; *(SaveState + 28) = here->MOS9capbs; *(SaveState + 29) = here->MOS9Cbd; *(SaveState + 30) = here->MOS9Cbdsw; *(SaveState + 31) = here->MOS9Cbs; *(SaveState + 32) = here->MOS9Cbssw; *(SaveState + 33) = here->MOS9f2d; *(SaveState + 34) = here->MOS9f3d; *(SaveState + 35) = here->MOS9f4d; *(SaveState + 36) = here->MOS9f2s; *(SaveState + 37) = here->MOS9f3s; *(SaveState + 38) = here->MOS9f4s; *(SaveState + 39) = here->MOS9cgs; *(SaveState + 40) = here->MOS9cgd; *(SaveState + 41) = here->MOS9cgb; *(SaveState + 42) = here->MOS9vdsat; *(SaveState + 43) = here->MOS9von; save_mode = here->MOS9mode; xnrm=1; xrev=0; if (here->MOS9mode < 0) { xnrm=0; xrev=1; } vbsOp = model->MOS9type * ( *(ckt->CKTrhsOp+here->MOS9bNode) - *(ckt->CKTrhsOp+here->MOS9sNodePrime)); vbdOp = model->MOS9type * ( *(ckt->CKTrhsOp+here->MOS9bNode) - *(ckt->CKTrhsOp+here->MOS9dNodePrime)); vspr = *(ckt->CKTrhsOld + here->MOS9sNode) - *(ckt->CKTrhsOld + here->MOS9sNodePrime) ; ivspr = *(ckt->CKTirhsOld + here->MOS9sNode) - *(ckt->CKTirhsOld + here->MOS9sNodePrime) ; vdpr = *(ckt->CKTrhsOld + here->MOS9dNode) - *(ckt->CKTrhsOld + here->MOS9dNodePrime) ; ivdpr = *(ckt->CKTirhsOld + here->MOS9dNode) - *(ckt->CKTirhsOld + here->MOS9dNodePrime) ; vgb = *(ckt->CKTrhsOld + here->MOS9gNode) - *(ckt->CKTrhsOld + here->MOS9bNode) ; ivgb = *(ckt->CKTirhsOld + here->MOS9gNode) - *(ckt->CKTirhsOld + here->MOS9bNode) ; vbs = *(ckt->CKTrhsOld + here->MOS9bNode) - *(ckt->CKTrhsOld + here->MOS9sNodePrime) ; ivbs = *(ckt->CKTirhsOld + here->MOS9bNode) - *(ckt->CKTirhsOld + here->MOS9sNodePrime) ; vbd = *(ckt->CKTrhsOld + here->MOS9bNode) - *(ckt->CKTrhsOld + here->MOS9dNodePrime) ; ivbd = *(ckt->CKTirhsOld + here->MOS9bNode) - *(ckt->CKTirhsOld + here->MOS9dNodePrime) ; vds = vbs - vbd ; ivds = ivbs - ivbd ; vgs = vgb + vbs ; ivgs = ivgb + ivbs ; vgd = vgb + vbd ; ivgd = ivgb + ivbd ; #ifdef SENSDEBUG printf("senacload instance name %s\n",here->MOS9name); printf("gate = %d ,drain = %d, drainprm = %d\n", here->MOS9gNode,here->MOS9dNode,here->MOS9dNodePrime); printf("source = %d , sourceprm = %d ,body = %d, senparmno = %d\n", here->MOS9sNode ,here->MOS9sNodePrime, here->MOS9bNode,here->MOS9senParmNo); printf("\n without perturbation \n"); #endif /* SENSDEBUG */ /* without perturbation */ *(ckt->CKTstate0 + here->MOS9vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS9vbd) = vbdOp; here->MOS9senPertFlag = ON ; if(info->SENacpertflag == 1){ /* store the unperturbed values of small signal parameters */ if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs) = here->MOS9cgs; *(here->MOS9senCgd) = here->MOS9cgd; *(here->MOS9senCgb) = here->MOS9cgb; *(here->MOS9senCbd) = here->MOS9capbd; *(here->MOS9senCbs) = here->MOS9capbs; *(here->MOS9senGds) = here->MOS9gds; *(here->MOS9senGbs) = here->MOS9gbs; *(here->MOS9senGbd) = here->MOS9gbd; *(here->MOS9senGm) = here->MOS9gm; *(here->MOS9senGmbs) = here->MOS9gmbs; } xcgs0= *(here->MOS9senCgs) * ckt->CKTomega; xcgd0= *(here->MOS9senCgd) * ckt->CKTomega; xcgb0= *(here->MOS9senCgb) * ckt->CKTomega; xbd0= *(here->MOS9senCbd) * ckt->CKTomega; xbs0= *(here->MOS9senCbs) * ckt->CKTomega; gds0= *(here->MOS9senGds); gbs0= *(here->MOS9senGbs); gbd0= *(here->MOS9senGbd); gm0= *(here->MOS9senGm); gmbs0= *(here->MOS9senGmbs); gdpr0 = here->MOS9drainConductance; gspr0 = here->MOS9sourceConductance; cspr = gspr0 * vspr ; icspr = gspr0 * ivspr ; cdpr = gdpr0 * vdpr ; icdpr = gdpr0 * ivdpr ; cgs = ( - xcgs0 * ivgs ); icgs = xcgs0 * vgs ; cgd = ( - xcgd0 * ivgd ); icgd = xcgd0 * vgd ; cgb = ( - xcgb0 * ivgb ); icgb = xcgb0 * vgb ; cbs = ( gbs0 * vbs - xbs0 * ivbs ); icbs = ( xbs0 * vbs + gbs0 * ivbs ); cbd = ( gbd0 * vbd - xbd0 * ivbd ); icbd = ( xbd0 * vbd + gbd0 * ivbd ); cds = ( gds0 * vds + xnrm * (gm0 * vgs + gmbs0 * vbs) - xrev * (gm0 * vgd + gmbs0 * vbd) ); icds = ( gds0 * ivds + xnrm * (gm0 * ivgs + gmbs0 * ivbs) - xrev * (gm0 * ivgd + gmbs0 * ivbd) ); cs0 = cspr; ics0 = icspr; csprm0 = ( -cspr - cgs - cbs - cds ) ; icsprm0 = ( -icspr - icgs - icbs - icds ) ; cd0 = cdpr; icd0 = icdpr; cdprm0 = ( -cdpr - cgd - cbd + cds ) ; icdprm0 = ( -icdpr - icgd - icbd + icds ) ; cg0 = cgs + cgd + cgb ; icg0 = icgs + icgd + icgb ; cb0 = cbs + cbd - cgb ; icb0 = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("gspr0 = %.7e , gdpr0 = %.7e , gds0 = %.7e, gbs0 = %.7e\n", gspr0,gdpr0,gds0,gbs0); printf("gbd0 = %.7e , gm0 = %.7e , gmbs0 = %.7e\n",gbd0,gm0,gmbs0); printf("xcgs0 = %.7e , xcgd0 = %.7e ,", xcgs0,xcgd0); printf("xcgb0 = %.7e, xbd0 = %.7e,xbs0 = %.7e\n" ,xcgb0,xbd0,xbs0); printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs0 = %.7e , cbd0 = %.7e , cgb0 = %.7e\n",cbs,cbd,cgb); printf("cb0 = %.7e , cg0 = %.7e , cs0 = %.7e\n",cb0,cg0,cs0); printf("csprm0 = %.7e, cd0 = %.7e, cdprm0 = %.7e\n", csprm0,cd0,cdprm0); printf("icb0 = %.7e , icg0 = %.7e , ics0 = %.7e\n",icb0,icg0,ics0); printf("icsprm0 = %.7e, icd0 = %.7e, icdprm0 = %.7e\n", icsprm0,icd0,icdprm0); printf("\nPerturbation of vbs\n"); #endif /* SENSDEBUG */ /* Perturbation of vbs */ flag = 1; A0 = vbsOp; DELA = info->SENpertfac * CONSTvt0 ; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbs */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS9vbs) = Apert; *(ckt->CKTstate0 + here->MOS9vbd) = vbdOp; if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs + 1) = here->MOS9cgs; *(here->MOS9senCgd + 1) = here->MOS9cgd; *(here->MOS9senCgb + 1) = here->MOS9cgb; *(here->MOS9senCbd + 1) = here->MOS9capbd; *(here->MOS9senCbs + 1) = here->MOS9capbs; *(here->MOS9senGds + 1) = here->MOS9gds; *(here->MOS9senGbs + 1) = here->MOS9gbs; *(here->MOS9senGbd + 1) = here->MOS9gbd; *(here->MOS9senGm + 1) = here->MOS9gm; *(here->MOS9senGmbs + 1) = here->MOS9gmbs; *(ckt->CKTstate0 + here->MOS9vbs) = A0; } goto load; pertvbd: /* Perturbation of vbd */ #ifdef SENSDEBUG printf("\nPerturbation of vbd\n"); #endif /* SENSDEBUG */ flag = 2; A0 = vbdOp; DELA = info->SENpertfac * CONSTvt0 + 1e-8; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vbd */ Apert = A0 + DELA; *(ckt->CKTstate0 + here->MOS9vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS9vbd) = Apert; if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs + 2) = here->MOS9cgs; *(here->MOS9senCgd + 2) = here->MOS9cgd; *(here->MOS9senCgb + 2) = here->MOS9cgb; *(here->MOS9senCbd + 2) = here->MOS9capbd; *(here->MOS9senCbs + 2) = here->MOS9capbs; *(here->MOS9senGds + 2) = here->MOS9gds; *(here->MOS9senGbs + 2) = here->MOS9gbs; *(here->MOS9senGbd + 2) = here->MOS9gbd; *(here->MOS9senGm + 2) = here->MOS9gm; *(here->MOS9senGmbs + 2) = here->MOS9gmbs; *(ckt->CKTstate0 + here->MOS9vbd) = A0; } goto load; pertvgb: /* Perturbation of vgb */ #ifdef SENSDEBUG printf("\nPerturbation of vgb\n"); #endif /* SENSDEBUG */ flag = 3; A0 = model->MOS9type * (*(ckt->CKTrhsOp + here->MOS9gNode) - *(ckt->CKTrhsOp + here->MOS9bNode)); DELA = info->SENpertfac * A0 + 1e-8; DELAinv = model->MOS9type * 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed vgb */ *(ckt->CKTstate0 + here->MOS9vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS9vbd) = vbdOp; *(ckt->CKTrhsOp + here->MOS9bNode) -= DELA; if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs + 3) = here->MOS9cgs; *(here->MOS9senCgd + 3) = here->MOS9cgd; *(here->MOS9senCgb + 3) = here->MOS9cgb; *(here->MOS9senCbd + 3) = here->MOS9capbd; *(here->MOS9senCbs + 3) = here->MOS9capbs; *(here->MOS9senGds + 3) = here->MOS9gds; *(here->MOS9senGbs + 3) = here->MOS9gbs; *(here->MOS9senGbd + 3) = here->MOS9gbd; *(here->MOS9senGm + 3) = here->MOS9gm; *(here->MOS9senGmbs + 3) = here->MOS9gmbs; *(ckt->CKTrhsOp + here->MOS9bNode) += DELA; } goto load; pertl: /* Perturbation of length */ if(here->MOS9sens_l == 0){ goto pertw; } #ifdef SENSDEBUG printf("\nPerturbation of length\n"); #endif /* SENSDEBUG */ flag = 4; A0 = here->MOS9l; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed length */ Apert = A0 + DELA; here->MOS9l = Apert; *(ckt->CKTstate0 + here->MOS9vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS9vbd) = vbdOp; if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs + 4) = here->MOS9cgs; *(here->MOS9senCgd + 4) = here->MOS9cgd; *(here->MOS9senCgb + 4) = here->MOS9cgb; *(here->MOS9senCbd + 4) = here->MOS9capbd; *(here->MOS9senCbs + 4) = here->MOS9capbs; *(here->MOS9senGds + 4) = here->MOS9gds; *(here->MOS9senGbs + 4) = here->MOS9gbs; *(here->MOS9senGbd + 4) = here->MOS9gbd; *(here->MOS9senGm + 4) = here->MOS9gm; *(here->MOS9senGmbs + 4) = here->MOS9gmbs; here->MOS9l = A0; } goto load; pertw: /* Perturbation of width */ if(here->MOS9sens_w == 0) goto next; #ifdef SENSDEBUG printf("\nPerturbation of width\n"); #endif /* SENSDEBUG */ flag = 5; A0 = here->MOS9w; DELA = info->SENpertfac * A0; DELAinv = 1.0/DELA; Apert = A0 + DELA; if(info->SENacpertflag == 1){ /* store the values of small signal parameters * corresponding to perturbed width */ here->MOS9w = Apert; here->MOS9drainArea *= (1 + info->SENpertfac); here->MOS9sourceArea *= (1 + info->SENpertfac); here->MOS9Cbd *= (1 + info->SENpertfac); here->MOS9Cbs *= (1 + info->SENpertfac); if(here->MOS9drainPerimiter){ here->MOS9Cbdsw += here->MOS9Cbdsw * DELA/here->MOS9drainPerimiter; } if(here->MOS9sourcePerimiter){ here->MOS9Cbssw += here->MOS9Cbssw * DELA/here->MOS9sourcePerimiter; } if(vbdOp >= here->MOS9tDepCap){ arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9f2d = here->MOS9Cbd*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + here->MOS9Cbdsw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3d = here->MOS9Cbd * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ model->MOS9bulkJctPotential + here->MOS9Cbdsw * model->MOS9bulkJctSideGradingCoeff * sargsw/arg / model->MOS9bulkJctPotential; here->MOS9f4d = here->MOS9Cbd*model->MOS9bulkJctPotential* (1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + here->MOS9Cbdsw*model->MOS9bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3d/2* (here->MOS9tDepCap*here->MOS9tDepCap) -here->MOS9tDepCap * here->MOS9f2d; } if(vbsOp >= here->MOS9tDepCap){ arg = 1-model->MOS9fwdCapDepCoeff; sarg = exp( (-model->MOS9bulkJctBotGradingCoeff) * log(arg) ); sargsw = exp( (-model->MOS9bulkJctSideGradingCoeff) * log(arg) ); here->MOS9f2s = here->MOS9Cbs*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctBotGradingCoeff))* sarg/arg + here->MOS9Cbssw*(1-model->MOS9fwdCapDepCoeff* (1+model->MOS9bulkJctSideGradingCoeff))* sargsw/arg; here->MOS9f3s = here->MOS9Cbs * model->MOS9bulkJctBotGradingCoeff * sarg/arg/ model->MOS9bulkJctPotential + here->MOS9Cbssw * model->MOS9bulkJctSideGradingCoeff * sargsw/arg / model->MOS9bulkJctPotential; here->MOS9f4s = here->MOS9Cbs*model->MOS9bulkJctPotential* (1-arg*sarg)/ (1-model->MOS9bulkJctBotGradingCoeff) + here->MOS9Cbssw*model->MOS9bulkJctPotential* (1-arg*sargsw)/ (1-model->MOS9bulkJctSideGradingCoeff) -here->MOS9f3s/2* (here->MOS9tBulkPot*here->MOS9tBulkPot) -here->MOS9tBulkPot * here->MOS9f2s; } *(ckt->CKTstate0 + here->MOS9vbs) = vbsOp; *(ckt->CKTstate0 + here->MOS9vbd) = vbdOp; if((error = MOS9load((GENmodel*)model,ckt)) != 0) return(error); *(here->MOS9senCgs + 5) = here->MOS9cgs; *(here->MOS9senCgd + 5) = here->MOS9cgd; *(here->MOS9senCgb + 5) = here->MOS9cgb; *(here->MOS9senCbd + 5) = here->MOS9capbd; *(here->MOS9senCbs + 5) = here->MOS9capbs; *(here->MOS9senGds + 5) = here->MOS9gds; *(here->MOS9senGbs + 5) = here->MOS9gbs; *(here->MOS9senGbd + 5) = here->MOS9gbd; *(here->MOS9senGm + 5) = here->MOS9gm; *(here->MOS9senGmbs + 5) = here->MOS9gmbs; here->MOS9w = A0; here->MOS9drainArea /= (1 + info->SENpertfac); here->MOS9sourceArea /= (1 + info->SENpertfac); } load: gds= *(here->MOS9senGds + flag); gbs= *(here->MOS9senGbs + flag); gbd= *(here->MOS9senGbd + flag); gm= *(here->MOS9senGm + flag); gmbs= *(here->MOS9senGmbs + flag); if(flag == 5){ gdpr = here->MOS9drainConductance * Apert/A0; gspr = here->MOS9sourceConductance * Apert/A0; } else{ gdpr = here->MOS9drainConductance; gspr = here->MOS9sourceConductance; } xcgs= *(here->MOS9senCgs + flag) * ckt->CKTomega; xcgd= *(here->MOS9senCgd + flag) * ckt->CKTomega; xcgb= *(here->MOS9senCgb + flag) * ckt->CKTomega; xbd= *(here->MOS9senCbd + flag) * ckt->CKTomega; xbs= *(here->MOS9senCbs + flag) * ckt->CKTomega; #ifdef SENSDEBUG printf("flag = %d \n",flag); printf("gspr = %.7e , gdpr = %.7e , gds = %.7e, gbs = %.7e\n", gspr,gdpr,gds,gbs); printf("gbd = %.7e , gm = %.7e , gmbs = %.7e\n",gbd,gm,gmbs); printf("xcgs = %.7e , xcgd = %.7e , xcgb = %.7e,", xcgs,xcgd,xcgb); printf("xbd = %.7e,xbs = %.7e\n" ,xbd,xbs); #endif /* SENSDEBUG */ cspr = gspr * vspr ; icspr = gspr * ivspr ; cdpr = gdpr * vdpr ; icdpr = gdpr * ivdpr ; cgs = ( - xcgs * ivgs ); icgs = xcgs * vgs ; cgd = ( - xcgd * ivgd ); icgd = xcgd * vgd ; cgb = ( - xcgb * ivgb ); icgb = xcgb * vgb ; cbs = ( gbs * vbs - xbs * ivbs ); icbs = ( xbs * vbs + gbs * ivbs ); cbd = ( gbd * vbd - xbd * ivbd ); icbd = ( xbd * vbd + gbd * ivbd ); cds = ( gds * vds + xnrm * (gm * vgs + gmbs * vbs) - xrev * (gm * vgd + gmbs * vbd) ); icds = ( gds * ivds + xnrm * (gm * ivgs + gmbs * ivbs) - xrev * (gm * ivgd + gmbs * ivbd) ); cs = cspr; ics = icspr; csprm = ( -cspr - cgs - cbs - cds ) ; icsprm = ( -icspr - icgs - icbs - icds ) ; cd = cdpr; icd = icdpr; cdprm = ( -cdpr - cgd - cbd + cds ) ; icdprm = ( -icdpr - icgd - icbd + icds ) ; cg = cgs + cgd + cgb ; icg = icgs + icgd + icgb ; cb = cbs + cbd - cgb ; icb = icbs + icbd - icgb ; #ifdef SENSDEBUG printf("vbs = %.7e , vbd = %.7e , vgb = %.7e\n",vbs,vbd,vgb); printf("ivbs = %.7e , ivbd = %.7e , ivgb = %.7e\n",ivbs,ivbd,ivgb); printf("cbs = %.7e , cbd = %.7e , cgb = %.7e\n",cbs,cbd,cgb); printf("cb = %.7e , cg = %.7e , cs = %.7e\n",cb,cg,cs); printf("csprm = %.7e, cd = %.7e, cdprm = %.7e\n",csprm,cd,cdprm); printf("icb = %.7e , icg = %.7e , ics = %.7e\n",icb,icg,ics); printf("icsprm = %.7e, icd = %.7e, icdprm = %.7e\n", icsprm,icd,icdprm); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if( (flag == 4) && (iparmno != here->MOS9senParmNo) ) continue; if( (flag == 5) && (iparmno != (here->MOS9senParmNo + here->MOS9sens_l)) ) continue; switch(flag){ case 1: DvDp = model->MOS9type * (info->SEN_Sap[here->MOS9bNode][iparmno] - info->SEN_Sap[here->MOS9sNodePrime][iparmno]); break; case 2: DvDp = model->MOS9type * ( info->SEN_Sap[here->MOS9bNode][iparmno] - info->SEN_Sap[here->MOS9dNodePrime][iparmno]); break; case 3: DvDp = model->MOS9type * ( info->SEN_Sap[here->MOS9gNode][iparmno] - info->SEN_Sap[here->MOS9bNode][iparmno]); break; case 4: DvDp = 1; break; case 5: DvDp = 1; break; } *(info->SEN_RHS[here->MOS9bNode] + iparmno) -= ( cb - cb0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9bNode] + iparmno) -= ( icb - icb0) * DELAinv * DvDp; *(info->SEN_RHS[here->MOS9gNode] + iparmno) -= ( cg - cg0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9gNode] + iparmno) -= ( icg - icg0) * DELAinv * DvDp; if(here->MOS9sNode != here->MOS9sNodePrime){ *(info->SEN_RHS[here->MOS9sNode] + iparmno) -= ( cs - cs0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9sNode] + iparmno) -= ( ics - ics0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS9sNodePrime] + iparmno) -= ( csprm - csprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9sNodePrime] + iparmno) -= ( icsprm - icsprm0) * DELAinv * DvDp; if(here->MOS9dNode != here->MOS9dNodePrime){ *(info->SEN_RHS[here->MOS9dNode] + iparmno) -= ( cd - cd0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9dNode] + iparmno) -= ( icd - icd0) * DELAinv * DvDp; } *(info->SEN_RHS[here->MOS9dNodePrime] + iparmno) -= ( cdprm - cdprm0) * DELAinv * DvDp; *(info->SEN_iRHS[here->MOS9dNodePrime] + iparmno) -= ( icdprm - icdprm0) * DELAinv * DvDp; #ifdef SENSDEBUG printf("after loading\n"); printf("DvDp = %.5e , DELAinv = %.5e ,flag = %d ,", DvDp,DELAinv,flag); printf("iparmno = %d,senparmno = %d\n", iparmno,here->MOS9senParmNo); printf("A0 = %.5e , Apert = %.5e ,CONSTvt0 = %.5e \n", A0,Apert,CONSTvt0); printf("senb = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9bNode] + iparmno), *(info->SEN_iRHS[here->MOS9bNode] + iparmno)); printf("seng = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9gNode] + iparmno), *(info->SEN_iRHS[here->MOS9gNode] + iparmno)); printf("sens = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9sNode] + iparmno), *(info->SEN_iRHS[here->MOS9sNode] + iparmno)); printf("sensprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9sNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS9sNodePrime] + iparmno)); printf("send = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9dNode] + iparmno), *(info->SEN_iRHS[here->MOS9dNode] + iparmno)); printf("sendprm = %.7e + j%.7e ", *(info->SEN_RHS[here->MOS9dNodePrime] + iparmno), *(info->SEN_iRHS[here->MOS9dNodePrime] + iparmno)); #endif /* SENSDEBUG */ } switch(flag){ case 1: goto pertvbd ; case 2: goto pertvgb ; case 3: goto pertl ; case 4: goto pertw ; case 5: break; } next: ; /* put the unperturbed values back into the state vector */ for(i=0; i <= 16; i++) *(ckt->CKTstate0 + here->MOS9states + i) = *(SaveState + i); here->MOS9sourceConductance = *(SaveState + 17) ; here->MOS9drainConductance = *(SaveState + 18) ; here->MOS9cd = *(SaveState + 19) ; here->MOS9cbs = *(SaveState + 20) ; here->MOS9cbd = *(SaveState + 21) ; here->MOS9gmbs = *(SaveState + 22) ; here->MOS9gm = *(SaveState + 23) ; here->MOS9gds = *(SaveState + 24) ; here->MOS9gbd = *(SaveState + 25) ; here->MOS9gbs = *(SaveState + 26) ; here->MOS9capbd = *(SaveState + 27) ; here->MOS9capbs = *(SaveState + 28) ; here->MOS9Cbd = *(SaveState + 29) ; here->MOS9Cbdsw = *(SaveState + 30) ; here->MOS9Cbs = *(SaveState + 31) ; here->MOS9Cbssw = *(SaveState + 32) ; here->MOS9f2d = *(SaveState + 33) ; here->MOS9f3d = *(SaveState + 34) ; here->MOS9f4d = *(SaveState + 35) ; here->MOS9f2s = *(SaveState + 36) ; here->MOS9f3s = *(SaveState + 37) ; here->MOS9f4s = *(SaveState + 38) ; here->MOS9cgs = *(SaveState + 39) ; here->MOS9cgd = *(SaveState + 40) ; here->MOS9cgb = *(SaveState + 41) ; here->MOS9vdsat = *(SaveState + 42) ; here->MOS9von = *(SaveState + 43) ; here->MOS9mode = save_mode ; here->MOS9senPertFlag = OFF; } } info->SENstatus = NORMAL; #ifdef SENSDEBUG printf("MOS9senacload end\n"); #endif /* SENSDEBUG */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/0000755000265600020320000000000012264261706020434 5ustar andreasadminngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdtrunc.c0000644000265600020320000000237612264261473023216 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdtrunc.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here != NULL; here = here->B3SOIFDnextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->B3SOIFDqb,ckt,timeStep); CKTterr(here->B3SOIFDqg,ckt,timeStep); CKTterr(here->B3SOIFDqd,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->B3SOIFDname,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdinit.c0000644000265600020320000000421012264261473023013 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "b3soifditf.h" #include "b3soifdinit.h" SPICEdev B3SOIFDinfo = { { "B3SOIFD", "Berkeley SOI MOSFET (FD) model version 2.1", &B3SOIFDnSize, &B3SOIFDnSize, B3SOIFDnames, &B3SOIFDpTSize, B3SOIFDpTable, &B3SOIFDmPTSize, B3SOIFDmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ B3SOIFDparam, /* DEVmodParam */ B3SOIFDmParam, /* DEVload */ B3SOIFDload, /* DEVsetup */ B3SOIFDsetup, /* DEVunsetup */ B3SOIFDunsetup, /* DEVpzSetup */ B3SOIFDsetup, /* DEVtemperature*/ B3SOIFDtemp, /* DEVtrunc */ B3SOIFDtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ B3SOIFDacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ B3SOIFDdestroy, /* DEVmodDelete */ B3SOIFDmDelete, /* DEVdelete */ B3SOIFDdelete, /* DEVsetic */ B3SOIFDgetic, /* DEVask */ B3SOIFDask, /* DEVmodAsk */ B3SOIFDmAsk, /* DEVpzLoad */ B3SOIFDpzLoad, /* DEVconvTest */ B3SOIFDconvTest, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ B3SOIFDnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize*/ &B3SOIFDiSize, /* DEVmodSize*/ &B3SOIFDmSize }; SPICEdev * get_b3soifd_info (void) { return &B3SOIFDinfo; } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdcvtest.c0000644000265600020320000000612512264261473023367 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdcvtest.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDconvTest(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; double delvbd, delvbs, delvds, delvgd, delvgs, vbd, vbs, vds; double cbd, cbhat, cbs, cd, cdhat, tol, vgd, vgdo, vgs; /* loop through all the B3SOIFD device models */ for (; model != NULL; model = model->B3SOIFDnextModel) { /* loop through all the instances of the model */ for (here = model->B3SOIFDinstances; here != NULL ; here=here->B3SOIFDnextInstance) { vbs = model->B3SOIFDtype * (*(ckt->CKTrhsOld+here->B3SOIFDbNode) - *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime)); vgs = model->B3SOIFDtype * (*(ckt->CKTrhsOld+here->B3SOIFDgNode) - *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime)); vds = model->B3SOIFDtype * (*(ckt->CKTrhsOld+here->B3SOIFDdNodePrime) - *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime)); vbd = vbs - vds; vgd = vgs - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIFDvgs) - *(ckt->CKTstate0 + here->B3SOIFDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIFDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIFDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIFDvgs); delvds = vds - *(ckt->CKTstate0 + here->B3SOIFDvds); delvgd = vgd-vgdo; cd = here->B3SOIFDcd; if (here->B3SOIFDmode >= 0) { cdhat = cd - here->B3SOIFDgjdb * delvbd + here->B3SOIFDgmbs * delvbs + here->B3SOIFDgm * delvgs + here->B3SOIFDgds * delvds; } else { cdhat = cd - (here->B3SOIFDgjdb - here->B3SOIFDgmbs) * delvbd - here->B3SOIFDgm * delvgd + here->B3SOIFDgds * delvds; } /* * check convergence */ if ((here->B3SOIFDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol = ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol; if (fabs(cdhat - cd) >= tol) { ckt->CKTnoncon++; return(OK); } cbs = here->B3SOIFDcjs; cbd = here->B3SOIFDcjd; cbhat = cbs + cbd + here->B3SOIFDgjdb * delvbd + here->B3SOIFDgjsb * delvbs; tol = ckt->CKTreltol * MAX(fabs(cbhat), fabs(cbs + cbd)) + ckt->CKTabstol; if (fabs(cbhat - (cbs + cbd)) > tol) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdgetic.c0000644000265600020320000000310712264261473023147 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdgetic.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDgetic(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; for (; model ; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) { if(!here->B3SOIFDicVBSGiven) { here->B3SOIFDicVBS = *(ckt->CKTrhs + here->B3SOIFDbNode) - *(ckt->CKTrhs + here->B3SOIFDsNode); } if (!here->B3SOIFDicVDSGiven) { here->B3SOIFDicVDS = *(ckt->CKTrhs + here->B3SOIFDdNode) - *(ckt->CKTrhs + here->B3SOIFDsNode); } if (!here->B3SOIFDicVGSGiven) { here->B3SOIFDicVGS = *(ckt->CKTrhs + here->B3SOIFDgNode) - *(ckt->CKTrhs + here->B3SOIFDsNode); } if (!here->B3SOIFDicVESGiven) { here->B3SOIFDicVES = *(ckt->CKTrhs + here->B3SOIFDeNode) - *(ckt->CKTrhs + here->B3SOIFDsNode); } if (!here->B3SOIFDicVPSGiven) { here->B3SOIFDicVPS = *(ckt->CKTrhs + here->B3SOIFDpNode) - *(ckt->CKTrhs + here->B3SOIFDsNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdpar.c0000644000265600020320000001041212264261473022633 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdpar.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { B3SOIFDinstance *here = (B3SOIFDinstance*)inst; NG_IGNORE(select); switch(param) { case B3SOIFD_W: here->B3SOIFDw = value->rValue; here->B3SOIFDwGiven = TRUE; break; case B3SOIFD_L: here->B3SOIFDl = value->rValue; here->B3SOIFDlGiven = TRUE; break; case B3SOIFD_M: here->B3SOIFDm = value->rValue; here->B3SOIFDmGiven = TRUE; break; case B3SOIFD_AS: here->B3SOIFDsourceArea = value->rValue; here->B3SOIFDsourceAreaGiven = TRUE; break; case B3SOIFD_AD: here->B3SOIFDdrainArea = value->rValue; here->B3SOIFDdrainAreaGiven = TRUE; break; case B3SOIFD_PS: here->B3SOIFDsourcePerimeter = value->rValue; here->B3SOIFDsourcePerimeterGiven = TRUE; break; case B3SOIFD_PD: here->B3SOIFDdrainPerimeter = value->rValue; here->B3SOIFDdrainPerimeterGiven = TRUE; break; case B3SOIFD_NRS: here->B3SOIFDsourceSquares = value->rValue; here->B3SOIFDsourceSquaresGiven = TRUE; break; case B3SOIFD_NRD: here->B3SOIFDdrainSquares = value->rValue; here->B3SOIFDdrainSquaresGiven = TRUE; break; case B3SOIFD_OFF: here->B3SOIFDoff = value->iValue; break; case B3SOIFD_IC_VBS: here->B3SOIFDicVBS = value->rValue; here->B3SOIFDicVBSGiven = TRUE; break; case B3SOIFD_IC_VDS: here->B3SOIFDicVDS = value->rValue; here->B3SOIFDicVDSGiven = TRUE; break; case B3SOIFD_IC_VGS: here->B3SOIFDicVGS = value->rValue; here->B3SOIFDicVGSGiven = TRUE; break; case B3SOIFD_IC_VES: here->B3SOIFDicVES = value->rValue; here->B3SOIFDicVESGiven = TRUE; break; case B3SOIFD_IC_VPS: here->B3SOIFDicVPS = value->rValue; here->B3SOIFDicVPSGiven = TRUE; break; case B3SOIFD_BJTOFF: here->B3SOIFDbjtoff = value->iValue; here->B3SOIFDbjtoffGiven= TRUE; break; case B3SOIFD_DEBUG: here->B3SOIFDdebugMod = value->iValue; here->B3SOIFDdebugModGiven= TRUE; break; case B3SOIFD_RTH0: here->B3SOIFDrth0= value->rValue; here->B3SOIFDrth0Given = TRUE; break; case B3SOIFD_CTH0: here->B3SOIFDcth0= value->rValue; here->B3SOIFDcth0Given = TRUE; break; case B3SOIFD_NRB: here->B3SOIFDbodySquares = value->rValue; here->B3SOIFDbodySquaresGiven = TRUE; break; case B3SOIFD_IC: switch(value->v.numValue){ case 5: here->B3SOIFDicVPS = *(value->v.vec.rVec+4); here->B3SOIFDicVPSGiven = TRUE; case 4: here->B3SOIFDicVES = *(value->v.vec.rVec+3); here->B3SOIFDicVESGiven = TRUE; case 3: here->B3SOIFDicVBS = *(value->v.vec.rVec+2); here->B3SOIFDicVBSGiven = TRUE; case 2: here->B3SOIFDicVGS = *(value->v.vec.rVec+1); here->B3SOIFDicVGSGiven = TRUE; case 1: here->B3SOIFDicVDS = *(value->v.vec.rVec); here->B3SOIFDicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifddel.c0000644000265600020320000000207012264261473022616 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifddel.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int B3SOIFDdelete(GENmodel *inModel, IFuid name, GENinstance **inInst) { B3SOIFDinstance **fast = (B3SOIFDinstance**)inInst; B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance **prev = NULL; B3SOIFDinstance *here; for (; model ; model = model->B3SOIFDnextModel) { prev = &(model->B3SOIFDinstances); for (here = *prev; here ; here = *prev) { if (here->B3SOIFDname == name || (fast && here==*fast)) { *prev= here->B3SOIFDnextInstance; FREE(here); return(OK); } prev = &(here->B3SOIFDnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdmpar.c0000644000265600020320000016053712264261473023026 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soifdmpar.c 98/5/01 Modified by Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "b3soifddef.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDmParam(int param, IFvalue *value, GENmodel *inMod) { B3SOIFDmodel *mod = (B3SOIFDmodel*)inMod; switch(param) { case B3SOIFD_MOD_MOBMOD : mod->B3SOIFDmobMod = value->iValue; mod->B3SOIFDmobModGiven = TRUE; break; case B3SOIFD_MOD_BINUNIT : mod->B3SOIFDbinUnit = value->iValue; mod->B3SOIFDbinUnitGiven = TRUE; break; case B3SOIFD_MOD_PARAMCHK : mod->B3SOIFDparamChk = value->iValue; mod->B3SOIFDparamChkGiven = TRUE; break; case B3SOIFD_MOD_CAPMOD : mod->B3SOIFDcapMod = value->iValue; mod->B3SOIFDcapModGiven = TRUE; break; case B3SOIFD_MOD_SHMOD : mod->B3SOIFDshMod = value->iValue; mod->B3SOIFDshModGiven = TRUE; break; case B3SOIFD_MOD_NOIMOD : mod->B3SOIFDnoiMod = value->iValue; mod->B3SOIFDnoiModGiven = TRUE; break; case B3SOIFD_MOD_VERSION : mod->B3SOIFDversion = value->rValue; mod->B3SOIFDversionGiven = TRUE; break; case B3SOIFD_MOD_TOX : mod->B3SOIFDtox = value->rValue; mod->B3SOIFDtoxGiven = TRUE; break; case B3SOIFD_MOD_CDSC : mod->B3SOIFDcdsc = value->rValue; mod->B3SOIFDcdscGiven = TRUE; break; case B3SOIFD_MOD_CDSCB : mod->B3SOIFDcdscb = value->rValue; mod->B3SOIFDcdscbGiven = TRUE; break; case B3SOIFD_MOD_CDSCD : mod->B3SOIFDcdscd = value->rValue; mod->B3SOIFDcdscdGiven = TRUE; break; case B3SOIFD_MOD_CIT : mod->B3SOIFDcit = value->rValue; mod->B3SOIFDcitGiven = TRUE; break; case B3SOIFD_MOD_NFACTOR : mod->B3SOIFDnfactor = value->rValue; mod->B3SOIFDnfactorGiven = TRUE; break; case B3SOIFD_MOD_VSAT: mod->B3SOIFDvsat = value->rValue; mod->B3SOIFDvsatGiven = TRUE; break; case B3SOIFD_MOD_A0: mod->B3SOIFDa0 = value->rValue; mod->B3SOIFDa0Given = TRUE; break; case B3SOIFD_MOD_AGS: mod->B3SOIFDags= value->rValue; mod->B3SOIFDagsGiven = TRUE; break; case B3SOIFD_MOD_A1: mod->B3SOIFDa1 = value->rValue; mod->B3SOIFDa1Given = TRUE; break; case B3SOIFD_MOD_A2: mod->B3SOIFDa2 = value->rValue; mod->B3SOIFDa2Given = TRUE; break; case B3SOIFD_MOD_AT: mod->B3SOIFDat = value->rValue; mod->B3SOIFDatGiven = TRUE; break; case B3SOIFD_MOD_KETA: mod->B3SOIFDketa = value->rValue; mod->B3SOIFDketaGiven = TRUE; break; case B3SOIFD_MOD_NSUB: mod->B3SOIFDnsub = value->rValue; mod->B3SOIFDnsubGiven = TRUE; break; case B3SOIFD_MOD_NPEAK: mod->B3SOIFDnpeak = value->rValue; mod->B3SOIFDnpeakGiven = TRUE; if (mod->B3SOIFDnpeak > 1.0e20) mod->B3SOIFDnpeak *= 1.0e-6; break; case B3SOIFD_MOD_NGATE: mod->B3SOIFDngate = value->rValue; mod->B3SOIFDngateGiven = TRUE; if (mod->B3SOIFDngate > 1.0e23) mod->B3SOIFDngate *= 1.0e-6; break; case B3SOIFD_MOD_GAMMA1: mod->B3SOIFDgamma1 = value->rValue; mod->B3SOIFDgamma1Given = TRUE; break; case B3SOIFD_MOD_GAMMA2: mod->B3SOIFDgamma2 = value->rValue; mod->B3SOIFDgamma2Given = TRUE; break; case B3SOIFD_MOD_VBX: mod->B3SOIFDvbx = value->rValue; mod->B3SOIFDvbxGiven = TRUE; break; case B3SOIFD_MOD_VBM: mod->B3SOIFDvbm = value->rValue; mod->B3SOIFDvbmGiven = TRUE; break; case B3SOIFD_MOD_XT: mod->B3SOIFDxt = value->rValue; mod->B3SOIFDxtGiven = TRUE; break; case B3SOIFD_MOD_K1: mod->B3SOIFDk1 = value->rValue; mod->B3SOIFDk1Given = TRUE; break; case B3SOIFD_MOD_KT1: mod->B3SOIFDkt1 = value->rValue; mod->B3SOIFDkt1Given = TRUE; break; case B3SOIFD_MOD_KT1L: mod->B3SOIFDkt1l = value->rValue; mod->B3SOIFDkt1lGiven = TRUE; break; case B3SOIFD_MOD_KT2: mod->B3SOIFDkt2 = value->rValue; mod->B3SOIFDkt2Given = TRUE; break; case B3SOIFD_MOD_K2: mod->B3SOIFDk2 = value->rValue; mod->B3SOIFDk2Given = TRUE; break; case B3SOIFD_MOD_K3: mod->B3SOIFDk3 = value->rValue; mod->B3SOIFDk3Given = TRUE; break; case B3SOIFD_MOD_K3B: mod->B3SOIFDk3b = value->rValue; mod->B3SOIFDk3bGiven = TRUE; break; case B3SOIFD_MOD_NLX: mod->B3SOIFDnlx = value->rValue; mod->B3SOIFDnlxGiven = TRUE; break; case B3SOIFD_MOD_W0: mod->B3SOIFDw0 = value->rValue; mod->B3SOIFDw0Given = TRUE; break; case B3SOIFD_MOD_DVT0: mod->B3SOIFDdvt0 = value->rValue; mod->B3SOIFDdvt0Given = TRUE; break; case B3SOIFD_MOD_DVT1: mod->B3SOIFDdvt1 = value->rValue; mod->B3SOIFDdvt1Given = TRUE; break; case B3SOIFD_MOD_DVT2: mod->B3SOIFDdvt2 = value->rValue; mod->B3SOIFDdvt2Given = TRUE; break; case B3SOIFD_MOD_DVT0W: mod->B3SOIFDdvt0w = value->rValue; mod->B3SOIFDdvt0wGiven = TRUE; break; case B3SOIFD_MOD_DVT1W: mod->B3SOIFDdvt1w = value->rValue; mod->B3SOIFDdvt1wGiven = TRUE; break; case B3SOIFD_MOD_DVT2W: mod->B3SOIFDdvt2w = value->rValue; mod->B3SOIFDdvt2wGiven = TRUE; break; case B3SOIFD_MOD_DROUT: mod->B3SOIFDdrout = value->rValue; mod->B3SOIFDdroutGiven = TRUE; break; case B3SOIFD_MOD_DSUB: mod->B3SOIFDdsub = value->rValue; mod->B3SOIFDdsubGiven = TRUE; break; case B3SOIFD_MOD_VTH0: mod->B3SOIFDvth0 = value->rValue; mod->B3SOIFDvth0Given = TRUE; break; case B3SOIFD_MOD_UA: mod->B3SOIFDua = value->rValue; mod->B3SOIFDuaGiven = TRUE; break; case B3SOIFD_MOD_UA1: mod->B3SOIFDua1 = value->rValue; mod->B3SOIFDua1Given = TRUE; break; case B3SOIFD_MOD_UB: mod->B3SOIFDub = value->rValue; mod->B3SOIFDubGiven = TRUE; break; case B3SOIFD_MOD_UB1: mod->B3SOIFDub1 = value->rValue; mod->B3SOIFDub1Given = TRUE; break; case B3SOIFD_MOD_UC: mod->B3SOIFDuc = value->rValue; mod->B3SOIFDucGiven = TRUE; break; case B3SOIFD_MOD_UC1: mod->B3SOIFDuc1 = value->rValue; mod->B3SOIFDuc1Given = TRUE; break; case B3SOIFD_MOD_U0 : mod->B3SOIFDu0 = value->rValue; mod->B3SOIFDu0Given = TRUE; break; case B3SOIFD_MOD_UTE : mod->B3SOIFDute = value->rValue; mod->B3SOIFDuteGiven = TRUE; break; case B3SOIFD_MOD_VOFF: mod->B3SOIFDvoff = value->rValue; mod->B3SOIFDvoffGiven = TRUE; break; case B3SOIFD_MOD_DELTA : mod->B3SOIFDdelta = value->rValue; mod->B3SOIFDdeltaGiven = TRUE; break; case B3SOIFD_MOD_RDSW: mod->B3SOIFDrdsw = value->rValue; mod->B3SOIFDrdswGiven = TRUE; break; case B3SOIFD_MOD_PRWG: mod->B3SOIFDprwg = value->rValue; mod->B3SOIFDprwgGiven = TRUE; break; case B3SOIFD_MOD_PRWB: mod->B3SOIFDprwb = value->rValue; mod->B3SOIFDprwbGiven = TRUE; break; case B3SOIFD_MOD_PRT: mod->B3SOIFDprt = value->rValue; mod->B3SOIFDprtGiven = TRUE; break; case B3SOIFD_MOD_ETA0: mod->B3SOIFDeta0 = value->rValue; mod->B3SOIFDeta0Given = TRUE; break; case B3SOIFD_MOD_ETAB: mod->B3SOIFDetab = value->rValue; mod->B3SOIFDetabGiven = TRUE; break; case B3SOIFD_MOD_PCLM: mod->B3SOIFDpclm = value->rValue; mod->B3SOIFDpclmGiven = TRUE; break; case B3SOIFD_MOD_PDIBL1: mod->B3SOIFDpdibl1 = value->rValue; mod->B3SOIFDpdibl1Given = TRUE; break; case B3SOIFD_MOD_PDIBL2: mod->B3SOIFDpdibl2 = value->rValue; mod->B3SOIFDpdibl2Given = TRUE; break; case B3SOIFD_MOD_PDIBLB: mod->B3SOIFDpdiblb = value->rValue; mod->B3SOIFDpdiblbGiven = TRUE; break; case B3SOIFD_MOD_PVAG: mod->B3SOIFDpvag = value->rValue; mod->B3SOIFDpvagGiven = TRUE; break; case B3SOIFD_MOD_WR : mod->B3SOIFDwr = value->rValue; mod->B3SOIFDwrGiven = TRUE; break; case B3SOIFD_MOD_DWG : mod->B3SOIFDdwg = value->rValue; mod->B3SOIFDdwgGiven = TRUE; break; case B3SOIFD_MOD_DWB : mod->B3SOIFDdwb = value->rValue; mod->B3SOIFDdwbGiven = TRUE; break; case B3SOIFD_MOD_B0 : mod->B3SOIFDb0 = value->rValue; mod->B3SOIFDb0Given = TRUE; break; case B3SOIFD_MOD_B1 : mod->B3SOIFDb1 = value->rValue; mod->B3SOIFDb1Given = TRUE; break; case B3SOIFD_MOD_ALPHA0 : mod->B3SOIFDalpha0 = value->rValue; mod->B3SOIFDalpha0Given = TRUE; break; case B3SOIFD_MOD_ALPHA1 : mod->B3SOIFDalpha1 = value->rValue; mod->B3SOIFDalpha1Given = TRUE; break; case B3SOIFD_MOD_BETA0 : mod->B3SOIFDbeta0 = value->rValue; mod->B3SOIFDbeta0Given = TRUE; break; case B3SOIFD_MOD_CGSL : mod->B3SOIFDcgsl = value->rValue; mod->B3SOIFDcgslGiven = TRUE; break; case B3SOIFD_MOD_CGDL : mod->B3SOIFDcgdl = value->rValue; mod->B3SOIFDcgdlGiven = TRUE; break; case B3SOIFD_MOD_CKAPPA : mod->B3SOIFDckappa = value->rValue; mod->B3SOIFDckappaGiven = TRUE; break; case B3SOIFD_MOD_CF : mod->B3SOIFDcf = value->rValue; mod->B3SOIFDcfGiven = TRUE; break; case B3SOIFD_MOD_CLC : mod->B3SOIFDclc = value->rValue; mod->B3SOIFDclcGiven = TRUE; break; case B3SOIFD_MOD_CLE : mod->B3SOIFDcle = value->rValue; mod->B3SOIFDcleGiven = TRUE; break; case B3SOIFD_MOD_DWC : mod->B3SOIFDdwc = value->rValue; mod->B3SOIFDdwcGiven = TRUE; break; case B3SOIFD_MOD_DLC : mod->B3SOIFDdlc = value->rValue; mod->B3SOIFDdlcGiven = TRUE; break; case B3SOIFD_MOD_TBOX : mod->B3SOIFDtbox = value->rValue; mod->B3SOIFDtboxGiven = TRUE; break; case B3SOIFD_MOD_TSI : mod->B3SOIFDtsi = value->rValue; mod->B3SOIFDtsiGiven = TRUE; break; case B3SOIFD_MOD_XJ : mod->B3SOIFDxj = value->rValue; mod->B3SOIFDxjGiven = TRUE; break; case B3SOIFD_MOD_KB1 : mod->B3SOIFDkb1 = value->rValue; mod->B3SOIFDkb1Given = TRUE; break; case B3SOIFD_MOD_KB3 : mod->B3SOIFDkb3 = value->rValue; mod->B3SOIFDkb3Given = TRUE; break; case B3SOIFD_MOD_DVBD0 : mod->B3SOIFDdvbd0 = value->rValue; mod->B3SOIFDdvbd0Given = TRUE; break; case B3SOIFD_MOD_DVBD1 : mod->B3SOIFDdvbd1 = value->rValue; mod->B3SOIFDdvbd1Given = TRUE; break; case B3SOIFD_MOD_DELP : mod->B3SOIFDdelp = value->rValue; mod->B3SOIFDdelpGiven = TRUE; break; case B3SOIFD_MOD_VBSA : mod->B3SOIFDvbsa = value->rValue; mod->B3SOIFDvbsaGiven = TRUE; break; case B3SOIFD_MOD_RBODY : mod->B3SOIFDrbody = value->rValue; mod->B3SOIFDrbodyGiven = TRUE; break; case B3SOIFD_MOD_RBSH : mod->B3SOIFDrbsh = value->rValue; mod->B3SOIFDrbshGiven = TRUE; break; case B3SOIFD_MOD_ADICE0 : mod->B3SOIFDadice0 = value->rValue; mod->B3SOIFDadice0Given = TRUE; break; case B3SOIFD_MOD_ABP : mod->B3SOIFDabp = value->rValue; mod->B3SOIFDabpGiven = TRUE; break; case B3SOIFD_MOD_MXC : mod->B3SOIFDmxc = value->rValue; mod->B3SOIFDmxcGiven = TRUE; break; case B3SOIFD_MOD_RTH0 : mod->B3SOIFDrth0 = value->rValue; mod->B3SOIFDrth0Given = TRUE; break; case B3SOIFD_MOD_CTH0 : mod->B3SOIFDcth0 = value->rValue; mod->B3SOIFDcth0Given = TRUE; break; case B3SOIFD_MOD_AII : mod->B3SOIFDaii = value->rValue; mod->B3SOIFDaiiGiven = TRUE; break; case B3SOIFD_MOD_BII : mod->B3SOIFDbii = value->rValue; mod->B3SOIFDbiiGiven = TRUE; break; case B3SOIFD_MOD_CII : mod->B3SOIFDcii = value->rValue; mod->B3SOIFDciiGiven = TRUE; break; case B3SOIFD_MOD_DII : mod->B3SOIFDdii = value->rValue; mod->B3SOIFDdiiGiven = TRUE; break; case B3SOIFD_MOD_NGIDL : mod->B3SOIFDngidl = value->rValue; mod->B3SOIFDngidlGiven = TRUE; break; case B3SOIFD_MOD_AGIDL : mod->B3SOIFDagidl = value->rValue; mod->B3SOIFDagidlGiven = TRUE; break; case B3SOIFD_MOD_BGIDL : mod->B3SOIFDbgidl = value->rValue; mod->B3SOIFDbgidlGiven = TRUE; break; case B3SOIFD_MOD_NDIODE : mod->B3SOIFDndiode = value->rValue; mod->B3SOIFDndiodeGiven = TRUE; break; case B3SOIFD_MOD_NTUN : mod->B3SOIFDntun = value->rValue; mod->B3SOIFDntunGiven = TRUE; break; case B3SOIFD_MOD_ISBJT : mod->B3SOIFDisbjt = value->rValue; mod->B3SOIFDisbjtGiven = TRUE; break; case B3SOIFD_MOD_ISDIF : mod->B3SOIFDisdif = value->rValue; mod->B3SOIFDisdifGiven = TRUE; break; case B3SOIFD_MOD_ISREC : mod->B3SOIFDisrec = value->rValue; mod->B3SOIFDisrecGiven = TRUE; break; case B3SOIFD_MOD_ISTUN : mod->B3SOIFDistun = value->rValue; mod->B3SOIFDistunGiven = TRUE; break; case B3SOIFD_MOD_XBJT : mod->B3SOIFDxbjt = value->rValue; mod->B3SOIFDxbjtGiven = TRUE; break; case B3SOIFD_MOD_XREC : mod->B3SOIFDxrec = value->rValue; mod->B3SOIFDxrecGiven = TRUE; break; case B3SOIFD_MOD_XTUN : mod->B3SOIFDxtun = value->rValue; mod->B3SOIFDxtunGiven = TRUE; break; case B3SOIFD_MOD_EDL : mod->B3SOIFDedl = value->rValue; mod->B3SOIFDedlGiven = TRUE; break; case B3SOIFD_MOD_KBJT1 : mod->B3SOIFDkbjt1 = value->rValue; mod->B3SOIFDkbjt1Given = TRUE; break; case B3SOIFD_MOD_TT : mod->B3SOIFDtt = value->rValue; mod->B3SOIFDttGiven = TRUE; break; case B3SOIFD_MOD_VSDTH : mod->B3SOIFDvsdth = value->rValue; mod->B3SOIFDvsdthGiven = TRUE; break; case B3SOIFD_MOD_VSDFB : mod->B3SOIFDvsdfb = value->rValue; mod->B3SOIFDvsdfbGiven = TRUE; break; case B3SOIFD_MOD_CSDMIN : mod->B3SOIFDcsdmin = value->rValue; mod->B3SOIFDcsdminGiven = TRUE; break; case B3SOIFD_MOD_ASD : mod->B3SOIFDasd = value->rValue; mod->B3SOIFDasdGiven = TRUE; break; case B3SOIFD_MOD_TNOM : mod->B3SOIFDtnom = value->rValue + 273.15; mod->B3SOIFDtnomGiven = TRUE; break; case B3SOIFD_MOD_CGSO : mod->B3SOIFDcgso = value->rValue; mod->B3SOIFDcgsoGiven = TRUE; break; case B3SOIFD_MOD_CGDO : mod->B3SOIFDcgdo = value->rValue; mod->B3SOIFDcgdoGiven = TRUE; break; case B3SOIFD_MOD_CGEO : mod->B3SOIFDcgeo = value->rValue; mod->B3SOIFDcgeoGiven = TRUE; break; case B3SOIFD_MOD_XPART : mod->B3SOIFDxpart = value->rValue; mod->B3SOIFDxpartGiven = TRUE; break; case B3SOIFD_MOD_RSH : mod->B3SOIFDsheetResistance = value->rValue; mod->B3SOIFDsheetResistanceGiven = TRUE; break; case B3SOIFD_MOD_PBSWG : mod->B3SOIFDGatesidewallJctPotential = value->rValue; mod->B3SOIFDGatesidewallJctPotentialGiven = TRUE; break; case B3SOIFD_MOD_MJSWG : mod->B3SOIFDbodyJctGateSideGradingCoeff = value->rValue; mod->B3SOIFDbodyJctGateSideGradingCoeffGiven = TRUE; break; case B3SOIFD_MOD_CJSWG : mod->B3SOIFDunitLengthGateSidewallJctCap = value->rValue; mod->B3SOIFDunitLengthGateSidewallJctCapGiven = TRUE; break; case B3SOIFD_MOD_CSDESW : mod->B3SOIFDcsdesw = value->rValue; mod->B3SOIFDcsdeswGiven = TRUE; break; case B3SOIFD_MOD_LINT : mod->B3SOIFDLint = value->rValue; mod->B3SOIFDLintGiven = TRUE; break; case B3SOIFD_MOD_LL : mod->B3SOIFDLl = value->rValue; mod->B3SOIFDLlGiven = TRUE; break; case B3SOIFD_MOD_LLN : mod->B3SOIFDLln = value->rValue; mod->B3SOIFDLlnGiven = TRUE; break; case B3SOIFD_MOD_LW : mod->B3SOIFDLw = value->rValue; mod->B3SOIFDLwGiven = TRUE; break; case B3SOIFD_MOD_LWN : mod->B3SOIFDLwn = value->rValue; mod->B3SOIFDLwnGiven = TRUE; break; case B3SOIFD_MOD_LWL : mod->B3SOIFDLwl = value->rValue; mod->B3SOIFDLwlGiven = TRUE; break; case B3SOIFD_MOD_WINT : mod->B3SOIFDWint = value->rValue; mod->B3SOIFDWintGiven = TRUE; break; case B3SOIFD_MOD_WL : mod->B3SOIFDWl = value->rValue; mod->B3SOIFDWlGiven = TRUE; break; case B3SOIFD_MOD_WLN : mod->B3SOIFDWln = value->rValue; mod->B3SOIFDWlnGiven = TRUE; break; case B3SOIFD_MOD_WW : mod->B3SOIFDWw = value->rValue; mod->B3SOIFDWwGiven = TRUE; break; case B3SOIFD_MOD_WWN : mod->B3SOIFDWwn = value->rValue; mod->B3SOIFDWwnGiven = TRUE; break; case B3SOIFD_MOD_WWL : mod->B3SOIFDWwl = value->rValue; mod->B3SOIFDWwlGiven = TRUE; break; case B3SOIFD_MOD_NOIA : mod->B3SOIFDoxideTrapDensityA = value->rValue; mod->B3SOIFDoxideTrapDensityAGiven = TRUE; break; case B3SOIFD_MOD_NOIB : mod->B3SOIFDoxideTrapDensityB = value->rValue; mod->B3SOIFDoxideTrapDensityBGiven = TRUE; break; case B3SOIFD_MOD_NOIC : mod->B3SOIFDoxideTrapDensityC = value->rValue; mod->B3SOIFDoxideTrapDensityCGiven = TRUE; break; case B3SOIFD_MOD_NOIF : mod->B3SOIFDnoif = value->rValue; mod->B3SOIFDnoifGiven = TRUE; break; case B3SOIFD_MOD_EM : mod->B3SOIFDem = value->rValue; mod->B3SOIFDemGiven = TRUE; break; case B3SOIFD_MOD_EF : mod->B3SOIFDef = value->rValue; mod->B3SOIFDefGiven = TRUE; break; case B3SOIFD_MOD_AF : mod->B3SOIFDaf = value->rValue; mod->B3SOIFDafGiven = TRUE; break; case B3SOIFD_MOD_KF : mod->B3SOIFDkf = value->rValue; mod->B3SOIFDkfGiven = TRUE; break; /* Added for binning - START */ /* Length Dependence */ case B3SOIFD_MOD_LNPEAK: mod->B3SOIFDlnpeak = value->rValue; mod->B3SOIFDlnpeakGiven = TRUE; break; case B3SOIFD_MOD_LNSUB: mod->B3SOIFDlnsub = value->rValue; mod->B3SOIFDlnsubGiven = TRUE; break; case B3SOIFD_MOD_LNGATE: mod->B3SOIFDlngate = value->rValue; mod->B3SOIFDlngateGiven = TRUE; break; case B3SOIFD_MOD_LVTH0: mod->B3SOIFDlvth0 = value->rValue; mod->B3SOIFDlvth0Given = TRUE; break; case B3SOIFD_MOD_LK1: mod->B3SOIFDlk1 = value->rValue; mod->B3SOIFDlk1Given = TRUE; break; case B3SOIFD_MOD_LK2: mod->B3SOIFDlk2 = value->rValue; mod->B3SOIFDlk2Given = TRUE; break; case B3SOIFD_MOD_LK3: mod->B3SOIFDlk3 = value->rValue; mod->B3SOIFDlk3Given = TRUE; break; case B3SOIFD_MOD_LK3B: mod->B3SOIFDlk3b = value->rValue; mod->B3SOIFDlk3bGiven = TRUE; break; case B3SOIFD_MOD_LVBSA: mod->B3SOIFDlvbsa = value->rValue; mod->B3SOIFDlvbsaGiven = TRUE; break; case B3SOIFD_MOD_LDELP: mod->B3SOIFDldelp = value->rValue; mod->B3SOIFDldelpGiven = TRUE; break; case B3SOIFD_MOD_LKB1 : mod->B3SOIFDlkb1 = value->rValue; mod->B3SOIFDlkb1Given = TRUE; break; case B3SOIFD_MOD_LKB3 : mod->B3SOIFDlkb3 = value->rValue; mod->B3SOIFDlkb3Given = TRUE; break; case B3SOIFD_MOD_LDVBD0 : mod->B3SOIFDldvbd0 = value->rValue; mod->B3SOIFDldvbd0Given = TRUE; break; case B3SOIFD_MOD_LDVBD1 : mod->B3SOIFDldvbd1 = value->rValue; mod->B3SOIFDldvbd1Given = TRUE; break; case B3SOIFD_MOD_LW0: mod->B3SOIFDlw0 = value->rValue; mod->B3SOIFDlw0Given = TRUE; break; case B3SOIFD_MOD_LNLX: mod->B3SOIFDlnlx = value->rValue; mod->B3SOIFDlnlxGiven = TRUE; break; case B3SOIFD_MOD_LDVT0: mod->B3SOIFDldvt0 = value->rValue; mod->B3SOIFDldvt0Given = TRUE; break; case B3SOIFD_MOD_LDVT1: mod->B3SOIFDldvt1 = value->rValue; mod->B3SOIFDldvt1Given = TRUE; break; case B3SOIFD_MOD_LDVT2: mod->B3SOIFDldvt2 = value->rValue; mod->B3SOIFDldvt2Given = TRUE; break; case B3SOIFD_MOD_LDVT0W: mod->B3SOIFDldvt0w = value->rValue; mod->B3SOIFDldvt0wGiven = TRUE; break; case B3SOIFD_MOD_LDVT1W: mod->B3SOIFDldvt1w = value->rValue; mod->B3SOIFDldvt1wGiven = TRUE; break; case B3SOIFD_MOD_LDVT2W: mod->B3SOIFDldvt2w = value->rValue; mod->B3SOIFDldvt2wGiven = TRUE; break; case B3SOIFD_MOD_LU0 : mod->B3SOIFDlu0 = value->rValue; mod->B3SOIFDlu0Given = TRUE; break; case B3SOIFD_MOD_LUA: mod->B3SOIFDlua = value->rValue; mod->B3SOIFDluaGiven = TRUE; break; case B3SOIFD_MOD_LUB: mod->B3SOIFDlub = value->rValue; mod->B3SOIFDlubGiven = TRUE; break; case B3SOIFD_MOD_LUC: mod->B3SOIFDluc = value->rValue; mod->B3SOIFDlucGiven = TRUE; break; case B3SOIFD_MOD_LVSAT: mod->B3SOIFDlvsat = value->rValue; mod->B3SOIFDlvsatGiven = TRUE; break; case B3SOIFD_MOD_LA0: mod->B3SOIFDla0 = value->rValue; mod->B3SOIFDla0Given = TRUE; break; case B3SOIFD_MOD_LAGS: mod->B3SOIFDlags= value->rValue; mod->B3SOIFDlagsGiven = TRUE; break; case B3SOIFD_MOD_LB0 : mod->B3SOIFDlb0 = value->rValue; mod->B3SOIFDlb0Given = TRUE; break; case B3SOIFD_MOD_LB1 : mod->B3SOIFDlb1 = value->rValue; mod->B3SOIFDlb1Given = TRUE; break; case B3SOIFD_MOD_LKETA: mod->B3SOIFDlketa = value->rValue; mod->B3SOIFDlketaGiven = TRUE; break; case B3SOIFD_MOD_LABP: mod->B3SOIFDlabp = value->rValue; mod->B3SOIFDlabpGiven = TRUE; break; case B3SOIFD_MOD_LMXC: mod->B3SOIFDlmxc = value->rValue; mod->B3SOIFDlmxcGiven = TRUE; break; case B3SOIFD_MOD_LADICE0: mod->B3SOIFDladice0 = value->rValue; mod->B3SOIFDladice0Given = TRUE; break; case B3SOIFD_MOD_LA1: mod->B3SOIFDla1 = value->rValue; mod->B3SOIFDla1Given = TRUE; break; case B3SOIFD_MOD_LA2: mod->B3SOIFDla2 = value->rValue; mod->B3SOIFDla2Given = TRUE; break; case B3SOIFD_MOD_LRDSW: mod->B3SOIFDlrdsw = value->rValue; mod->B3SOIFDlrdswGiven = TRUE; break; case B3SOIFD_MOD_LPRWB: mod->B3SOIFDlprwb = value->rValue; mod->B3SOIFDlprwbGiven = TRUE; break; case B3SOIFD_MOD_LPRWG: mod->B3SOIFDlprwg = value->rValue; mod->B3SOIFDlprwgGiven = TRUE; break; case B3SOIFD_MOD_LWR : mod->B3SOIFDlwr = value->rValue; mod->B3SOIFDlwrGiven = TRUE; break; case B3SOIFD_MOD_LNFACTOR : mod->B3SOIFDlnfactor = value->rValue; mod->B3SOIFDlnfactorGiven = TRUE; break; case B3SOIFD_MOD_LDWG : mod->B3SOIFDldwg = value->rValue; mod->B3SOIFDldwgGiven = TRUE; break; case B3SOIFD_MOD_LDWB : mod->B3SOIFDldwb = value->rValue; mod->B3SOIFDldwbGiven = TRUE; break; case B3SOIFD_MOD_LVOFF: mod->B3SOIFDlvoff = value->rValue; mod->B3SOIFDlvoffGiven = TRUE; break; case B3SOIFD_MOD_LETA0: mod->B3SOIFDleta0 = value->rValue; mod->B3SOIFDleta0Given = TRUE; break; case B3SOIFD_MOD_LETAB: mod->B3SOIFDletab = value->rValue; mod->B3SOIFDletabGiven = TRUE; break; case B3SOIFD_MOD_LDSUB: mod->B3SOIFDldsub = value->rValue; mod->B3SOIFDldsubGiven = TRUE; break; case B3SOIFD_MOD_LCIT : mod->B3SOIFDlcit = value->rValue; mod->B3SOIFDlcitGiven = TRUE; break; case B3SOIFD_MOD_LCDSC : mod->B3SOIFDlcdsc = value->rValue; mod->B3SOIFDlcdscGiven = TRUE; break; case B3SOIFD_MOD_LCDSCB : mod->B3SOIFDlcdscb = value->rValue; mod->B3SOIFDlcdscbGiven = TRUE; break; case B3SOIFD_MOD_LCDSCD : mod->B3SOIFDlcdscd = value->rValue; mod->B3SOIFDlcdscdGiven = TRUE; break; case B3SOIFD_MOD_LPCLM: mod->B3SOIFDlpclm = value->rValue; mod->B3SOIFDlpclmGiven = TRUE; break; case B3SOIFD_MOD_LPDIBL1: mod->B3SOIFDlpdibl1 = value->rValue; mod->B3SOIFDlpdibl1Given = TRUE; break; case B3SOIFD_MOD_LPDIBL2: mod->B3SOIFDlpdibl2 = value->rValue; mod->B3SOIFDlpdibl2Given = TRUE; break; case B3SOIFD_MOD_LPDIBLB: mod->B3SOIFDlpdiblb = value->rValue; mod->B3SOIFDlpdiblbGiven = TRUE; break; case B3SOIFD_MOD_LDROUT: mod->B3SOIFDldrout = value->rValue; mod->B3SOIFDldroutGiven = TRUE; break; case B3SOIFD_MOD_LPVAG: mod->B3SOIFDlpvag = value->rValue; mod->B3SOIFDlpvagGiven = TRUE; break; case B3SOIFD_MOD_LDELTA : mod->B3SOIFDldelta = value->rValue; mod->B3SOIFDldeltaGiven = TRUE; break; case B3SOIFD_MOD_LAII : mod->B3SOIFDlaii = value->rValue; mod->B3SOIFDlaiiGiven = TRUE; break; case B3SOIFD_MOD_LBII : mod->B3SOIFDlbii = value->rValue; mod->B3SOIFDlbiiGiven = TRUE; break; case B3SOIFD_MOD_LCII : mod->B3SOIFDlcii = value->rValue; mod->B3SOIFDlciiGiven = TRUE; break; case B3SOIFD_MOD_LDII : mod->B3SOIFDldii = value->rValue; mod->B3SOIFDldiiGiven = TRUE; break; case B3SOIFD_MOD_LALPHA0 : mod->B3SOIFDlalpha0 = value->rValue; mod->B3SOIFDlalpha0Given = TRUE; break; case B3SOIFD_MOD_LALPHA1 : mod->B3SOIFDlalpha1 = value->rValue; mod->B3SOIFDlalpha1Given = TRUE; break; case B3SOIFD_MOD_LBETA0 : mod->B3SOIFDlbeta0 = value->rValue; mod->B3SOIFDlbeta0Given = TRUE; break; case B3SOIFD_MOD_LAGIDL : mod->B3SOIFDlagidl = value->rValue; mod->B3SOIFDlagidlGiven = TRUE; break; case B3SOIFD_MOD_LBGIDL : mod->B3SOIFDlbgidl = value->rValue; mod->B3SOIFDlbgidlGiven = TRUE; break; case B3SOIFD_MOD_LNGIDL : mod->B3SOIFDlngidl = value->rValue; mod->B3SOIFDlngidlGiven = TRUE; break; case B3SOIFD_MOD_LNTUN : mod->B3SOIFDlntun = value->rValue; mod->B3SOIFDlntunGiven = TRUE; break; case B3SOIFD_MOD_LNDIODE : mod->B3SOIFDlndiode = value->rValue; mod->B3SOIFDlndiodeGiven = TRUE; break; case B3SOIFD_MOD_LISBJT : mod->B3SOIFDlisbjt = value->rValue; mod->B3SOIFDlisbjtGiven = TRUE; break; case B3SOIFD_MOD_LISDIF : mod->B3SOIFDlisdif = value->rValue; mod->B3SOIFDlisdifGiven = TRUE; break; case B3SOIFD_MOD_LISREC : mod->B3SOIFDlisrec = value->rValue; mod->B3SOIFDlisrecGiven = TRUE; break; case B3SOIFD_MOD_LISTUN : mod->B3SOIFDlistun = value->rValue; mod->B3SOIFDlistunGiven = TRUE; break; case B3SOIFD_MOD_LEDL : mod->B3SOIFDledl = value->rValue; mod->B3SOIFDledlGiven = TRUE; break; case B3SOIFD_MOD_LKBJT1 : mod->B3SOIFDlkbjt1 = value->rValue; mod->B3SOIFDlkbjt1Given = TRUE; break; /* CV Model */ case B3SOIFD_MOD_LVSDFB : mod->B3SOIFDlvsdfb = value->rValue; mod->B3SOIFDlvsdfbGiven = TRUE; break; case B3SOIFD_MOD_LVSDTH : mod->B3SOIFDlvsdth = value->rValue; mod->B3SOIFDlvsdthGiven = TRUE; break; /* Width Dependence */ case B3SOIFD_MOD_WNPEAK: mod->B3SOIFDwnpeak = value->rValue; mod->B3SOIFDwnpeakGiven = TRUE; break; case B3SOIFD_MOD_WNSUB: mod->B3SOIFDwnsub = value->rValue; mod->B3SOIFDwnsubGiven = TRUE; break; case B3SOIFD_MOD_WNGATE: mod->B3SOIFDwngate = value->rValue; mod->B3SOIFDwngateGiven = TRUE; break; case B3SOIFD_MOD_WVTH0: mod->B3SOIFDwvth0 = value->rValue; mod->B3SOIFDwvth0Given = TRUE; break; case B3SOIFD_MOD_WK1: mod->B3SOIFDwk1 = value->rValue; mod->B3SOIFDwk1Given = TRUE; break; case B3SOIFD_MOD_WK2: mod->B3SOIFDwk2 = value->rValue; mod->B3SOIFDwk2Given = TRUE; break; case B3SOIFD_MOD_WK3: mod->B3SOIFDwk3 = value->rValue; mod->B3SOIFDwk3Given = TRUE; break; case B3SOIFD_MOD_WK3B: mod->B3SOIFDwk3b = value->rValue; mod->B3SOIFDwk3bGiven = TRUE; break; case B3SOIFD_MOD_WVBSA: mod->B3SOIFDwvbsa = value->rValue; mod->B3SOIFDwvbsaGiven = TRUE; break; case B3SOIFD_MOD_WDELP: mod->B3SOIFDwdelp = value->rValue; mod->B3SOIFDwdelpGiven = TRUE; break; case B3SOIFD_MOD_WKB1 : mod->B3SOIFDwkb1 = value->rValue; mod->B3SOIFDwkb1Given = TRUE; break; case B3SOIFD_MOD_WKB3 : mod->B3SOIFDwkb3 = value->rValue; mod->B3SOIFDwkb3Given = TRUE; break; case B3SOIFD_MOD_WDVBD0 : mod->B3SOIFDwdvbd0 = value->rValue; mod->B3SOIFDwdvbd0Given = TRUE; break; case B3SOIFD_MOD_WDVBD1 : mod->B3SOIFDwdvbd1 = value->rValue; mod->B3SOIFDwdvbd1Given = TRUE; break; case B3SOIFD_MOD_WW0: mod->B3SOIFDww0 = value->rValue; mod->B3SOIFDww0Given = TRUE; break; case B3SOIFD_MOD_WNLX: mod->B3SOIFDwnlx = value->rValue; mod->B3SOIFDwnlxGiven = TRUE; break; case B3SOIFD_MOD_WDVT0: mod->B3SOIFDwdvt0 = value->rValue; mod->B3SOIFDwdvt0Given = TRUE; break; case B3SOIFD_MOD_WDVT1: mod->B3SOIFDwdvt1 = value->rValue; mod->B3SOIFDwdvt1Given = TRUE; break; case B3SOIFD_MOD_WDVT2: mod->B3SOIFDwdvt2 = value->rValue; mod->B3SOIFDwdvt2Given = TRUE; break; case B3SOIFD_MOD_WDVT0W: mod->B3SOIFDwdvt0w = value->rValue; mod->B3SOIFDwdvt0wGiven = TRUE; break; case B3SOIFD_MOD_WDVT1W: mod->B3SOIFDwdvt1w = value->rValue; mod->B3SOIFDwdvt1wGiven = TRUE; break; case B3SOIFD_MOD_WDVT2W: mod->B3SOIFDwdvt2w = value->rValue; mod->B3SOIFDwdvt2wGiven = TRUE; break; case B3SOIFD_MOD_WU0 : mod->B3SOIFDwu0 = value->rValue; mod->B3SOIFDwu0Given = TRUE; break; case B3SOIFD_MOD_WUA: mod->B3SOIFDwua = value->rValue; mod->B3SOIFDwuaGiven = TRUE; break; case B3SOIFD_MOD_WUB: mod->B3SOIFDwub = value->rValue; mod->B3SOIFDwubGiven = TRUE; break; case B3SOIFD_MOD_WUC: mod->B3SOIFDwuc = value->rValue; mod->B3SOIFDwucGiven = TRUE; break; case B3SOIFD_MOD_WVSAT: mod->B3SOIFDwvsat = value->rValue; mod->B3SOIFDwvsatGiven = TRUE; break; case B3SOIFD_MOD_WA0: mod->B3SOIFDwa0 = value->rValue; mod->B3SOIFDwa0Given = TRUE; break; case B3SOIFD_MOD_WAGS: mod->B3SOIFDwags= value->rValue; mod->B3SOIFDwagsGiven = TRUE; break; case B3SOIFD_MOD_WB0 : mod->B3SOIFDwb0 = value->rValue; mod->B3SOIFDwb0Given = TRUE; break; case B3SOIFD_MOD_WB1 : mod->B3SOIFDwb1 = value->rValue; mod->B3SOIFDwb1Given = TRUE; break; case B3SOIFD_MOD_WKETA: mod->B3SOIFDwketa = value->rValue; mod->B3SOIFDwketaGiven = TRUE; break; case B3SOIFD_MOD_WABP: mod->B3SOIFDwabp = value->rValue; mod->B3SOIFDwabpGiven = TRUE; break; case B3SOIFD_MOD_WMXC: mod->B3SOIFDwmxc = value->rValue; mod->B3SOIFDwmxcGiven = TRUE; break; case B3SOIFD_MOD_WADICE0: mod->B3SOIFDwadice0 = value->rValue; mod->B3SOIFDwadice0Given = TRUE; break; case B3SOIFD_MOD_WA1: mod->B3SOIFDwa1 = value->rValue; mod->B3SOIFDwa1Given = TRUE; break; case B3SOIFD_MOD_WA2: mod->B3SOIFDwa2 = value->rValue; mod->B3SOIFDwa2Given = TRUE; break; case B3SOIFD_MOD_WRDSW: mod->B3SOIFDwrdsw = value->rValue; mod->B3SOIFDwrdswGiven = TRUE; break; case B3SOIFD_MOD_WPRWB: mod->B3SOIFDwprwb = value->rValue; mod->B3SOIFDwprwbGiven = TRUE; break; case B3SOIFD_MOD_WPRWG: mod->B3SOIFDwprwg = value->rValue; mod->B3SOIFDwprwgGiven = TRUE; break; case B3SOIFD_MOD_WWR : mod->B3SOIFDwwr = value->rValue; mod->B3SOIFDwwrGiven = TRUE; break; case B3SOIFD_MOD_WNFACTOR : mod->B3SOIFDwnfactor = value->rValue; mod->B3SOIFDwnfactorGiven = TRUE; break; case B3SOIFD_MOD_WDWG : mod->B3SOIFDwdwg = value->rValue; mod->B3SOIFDwdwgGiven = TRUE; break; case B3SOIFD_MOD_WDWB : mod->B3SOIFDwdwb = value->rValue; mod->B3SOIFDwdwbGiven = TRUE; break; case B3SOIFD_MOD_WVOFF: mod->B3SOIFDwvoff = value->rValue; mod->B3SOIFDwvoffGiven = TRUE; break; case B3SOIFD_MOD_WETA0: mod->B3SOIFDweta0 = value->rValue; mod->B3SOIFDweta0Given = TRUE; break; case B3SOIFD_MOD_WETAB: mod->B3SOIFDwetab = value->rValue; mod->B3SOIFDwetabGiven = TRUE; break; case B3SOIFD_MOD_WDSUB: mod->B3SOIFDwdsub = value->rValue; mod->B3SOIFDwdsubGiven = TRUE; break; case B3SOIFD_MOD_WCIT : mod->B3SOIFDwcit = value->rValue; mod->B3SOIFDwcitGiven = TRUE; break; case B3SOIFD_MOD_WCDSC : mod->B3SOIFDwcdsc = value->rValue; mod->B3SOIFDwcdscGiven = TRUE; break; case B3SOIFD_MOD_WCDSCB : mod->B3SOIFDwcdscb = value->rValue; mod->B3SOIFDwcdscbGiven = TRUE; break; case B3SOIFD_MOD_WCDSCD : mod->B3SOIFDwcdscd = value->rValue; mod->B3SOIFDwcdscdGiven = TRUE; break; case B3SOIFD_MOD_WPCLM: mod->B3SOIFDwpclm = value->rValue; mod->B3SOIFDwpclmGiven = TRUE; break; case B3SOIFD_MOD_WPDIBL1: mod->B3SOIFDwpdibl1 = value->rValue; mod->B3SOIFDwpdibl1Given = TRUE; break; case B3SOIFD_MOD_WPDIBL2: mod->B3SOIFDwpdibl2 = value->rValue; mod->B3SOIFDwpdibl2Given = TRUE; break; case B3SOIFD_MOD_WPDIBLB: mod->B3SOIFDwpdiblb = value->rValue; mod->B3SOIFDwpdiblbGiven = TRUE; break; case B3SOIFD_MOD_WDROUT: mod->B3SOIFDwdrout = value->rValue; mod->B3SOIFDwdroutGiven = TRUE; break; case B3SOIFD_MOD_WPVAG: mod->B3SOIFDwpvag = value->rValue; mod->B3SOIFDwpvagGiven = TRUE; break; case B3SOIFD_MOD_WDELTA : mod->B3SOIFDwdelta = value->rValue; mod->B3SOIFDwdeltaGiven = TRUE; break; case B3SOIFD_MOD_WAII : mod->B3SOIFDwaii = value->rValue; mod->B3SOIFDwaiiGiven = TRUE; break; case B3SOIFD_MOD_WBII : mod->B3SOIFDwbii = value->rValue; mod->B3SOIFDwbiiGiven = TRUE; break; case B3SOIFD_MOD_WCII : mod->B3SOIFDwcii = value->rValue; mod->B3SOIFDwciiGiven = TRUE; break; case B3SOIFD_MOD_WDII : mod->B3SOIFDwdii = value->rValue; mod->B3SOIFDwdiiGiven = TRUE; break; case B3SOIFD_MOD_WALPHA0 : mod->B3SOIFDwalpha0 = value->rValue; mod->B3SOIFDwalpha0Given = TRUE; break; case B3SOIFD_MOD_WALPHA1 : mod->B3SOIFDwalpha1 = value->rValue; mod->B3SOIFDwalpha1Given = TRUE; break; case B3SOIFD_MOD_WBETA0 : mod->B3SOIFDwbeta0 = value->rValue; mod->B3SOIFDwbeta0Given = TRUE; break; case B3SOIFD_MOD_WAGIDL : mod->B3SOIFDwagidl = value->rValue; mod->B3SOIFDwagidlGiven = TRUE; break; case B3SOIFD_MOD_WBGIDL : mod->B3SOIFDwbgidl = value->rValue; mod->B3SOIFDwbgidlGiven = TRUE; break; case B3SOIFD_MOD_WNGIDL : mod->B3SOIFDwngidl = value->rValue; mod->B3SOIFDwngidlGiven = TRUE; break; case B3SOIFD_MOD_WNTUN : mod->B3SOIFDwntun = value->rValue; mod->B3SOIFDwntunGiven = TRUE; break; case B3SOIFD_MOD_WNDIODE : mod->B3SOIFDwndiode = value->rValue; mod->B3SOIFDwndiodeGiven = TRUE; break; case B3SOIFD_MOD_WISBJT : mod->B3SOIFDwisbjt = value->rValue; mod->B3SOIFDwisbjtGiven = TRUE; break; case B3SOIFD_MOD_WISDIF : mod->B3SOIFDwisdif = value->rValue; mod->B3SOIFDwisdifGiven = TRUE; break; case B3SOIFD_MOD_WISREC : mod->B3SOIFDwisrec = value->rValue; mod->B3SOIFDwisrecGiven = TRUE; break; case B3SOIFD_MOD_WISTUN : mod->B3SOIFDwistun = value->rValue; mod->B3SOIFDwistunGiven = TRUE; break; case B3SOIFD_MOD_WEDL : mod->B3SOIFDwedl = value->rValue; mod->B3SOIFDwedlGiven = TRUE; break; case B3SOIFD_MOD_WKBJT1 : mod->B3SOIFDwkbjt1 = value->rValue; mod->B3SOIFDwkbjt1Given = TRUE; break; /* CV Model */ case B3SOIFD_MOD_WVSDFB : mod->B3SOIFDwvsdfb = value->rValue; mod->B3SOIFDwvsdfbGiven = TRUE; break; case B3SOIFD_MOD_WVSDTH : mod->B3SOIFDwvsdth = value->rValue; mod->B3SOIFDwvsdthGiven = TRUE; break; /* Cross-term Dependence */ case B3SOIFD_MOD_PNPEAK: mod->B3SOIFDpnpeak = value->rValue; mod->B3SOIFDpnpeakGiven = TRUE; break; case B3SOIFD_MOD_PNSUB: mod->B3SOIFDpnsub = value->rValue; mod->B3SOIFDpnsubGiven = TRUE; break; case B3SOIFD_MOD_PNGATE: mod->B3SOIFDpngate = value->rValue; mod->B3SOIFDpngateGiven = TRUE; break; case B3SOIFD_MOD_PVTH0: mod->B3SOIFDpvth0 = value->rValue; mod->B3SOIFDpvth0Given = TRUE; break; case B3SOIFD_MOD_PK1: mod->B3SOIFDpk1 = value->rValue; mod->B3SOIFDpk1Given = TRUE; break; case B3SOIFD_MOD_PK2: mod->B3SOIFDpk2 = value->rValue; mod->B3SOIFDpk2Given = TRUE; break; case B3SOIFD_MOD_PK3: mod->B3SOIFDpk3 = value->rValue; mod->B3SOIFDpk3Given = TRUE; break; case B3SOIFD_MOD_PK3B: mod->B3SOIFDpk3b = value->rValue; mod->B3SOIFDpk3bGiven = TRUE; break; case B3SOIFD_MOD_PVBSA: mod->B3SOIFDpvbsa = value->rValue; mod->B3SOIFDpvbsaGiven = TRUE; break; case B3SOIFD_MOD_PDELP: mod->B3SOIFDpdelp = value->rValue; mod->B3SOIFDpdelpGiven = TRUE; break; case B3SOIFD_MOD_PKB1 : mod->B3SOIFDpkb1 = value->rValue; mod->B3SOIFDpkb1Given = TRUE; break; case B3SOIFD_MOD_PKB3 : mod->B3SOIFDpkb3 = value->rValue; mod->B3SOIFDpkb3Given = TRUE; break; case B3SOIFD_MOD_PDVBD0 : mod->B3SOIFDpdvbd0 = value->rValue; mod->B3SOIFDpdvbd0Given = TRUE; break; case B3SOIFD_MOD_PDVBD1 : mod->B3SOIFDpdvbd1 = value->rValue; mod->B3SOIFDpdvbd1Given = TRUE; break; case B3SOIFD_MOD_PW0: mod->B3SOIFDpw0 = value->rValue; mod->B3SOIFDpw0Given = TRUE; break; case B3SOIFD_MOD_PNLX: mod->B3SOIFDpnlx = value->rValue; mod->B3SOIFDpnlxGiven = TRUE; break; case B3SOIFD_MOD_PDVT0: mod->B3SOIFDpdvt0 = value->rValue; mod->B3SOIFDpdvt0Given = TRUE; break; case B3SOIFD_MOD_PDVT1: mod->B3SOIFDpdvt1 = value->rValue; mod->B3SOIFDpdvt1Given = TRUE; break; case B3SOIFD_MOD_PDVT2: mod->B3SOIFDpdvt2 = value->rValue; mod->B3SOIFDpdvt2Given = TRUE; break; case B3SOIFD_MOD_PDVT0W: mod->B3SOIFDpdvt0w = value->rValue; mod->B3SOIFDpdvt0wGiven = TRUE; break; case B3SOIFD_MOD_PDVT1W: mod->B3SOIFDpdvt1w = value->rValue; mod->B3SOIFDpdvt1wGiven = TRUE; break; case B3SOIFD_MOD_PDVT2W: mod->B3SOIFDpdvt2w = value->rValue; mod->B3SOIFDpdvt2wGiven = TRUE; break; case B3SOIFD_MOD_PU0 : mod->B3SOIFDpu0 = value->rValue; mod->B3SOIFDpu0Given = TRUE; break; case B3SOIFD_MOD_PUA: mod->B3SOIFDpua = value->rValue; mod->B3SOIFDpuaGiven = TRUE; break; case B3SOIFD_MOD_PUB: mod->B3SOIFDpub = value->rValue; mod->B3SOIFDpubGiven = TRUE; break; case B3SOIFD_MOD_PUC: mod->B3SOIFDpuc = value->rValue; mod->B3SOIFDpucGiven = TRUE; break; case B3SOIFD_MOD_PVSAT: mod->B3SOIFDpvsat = value->rValue; mod->B3SOIFDpvsatGiven = TRUE; break; case B3SOIFD_MOD_PA0: mod->B3SOIFDpa0 = value->rValue; mod->B3SOIFDpa0Given = TRUE; break; case B3SOIFD_MOD_PAGS: mod->B3SOIFDpags= value->rValue; mod->B3SOIFDpagsGiven = TRUE; break; case B3SOIFD_MOD_PB0 : mod->B3SOIFDpb0 = value->rValue; mod->B3SOIFDpb0Given = TRUE; break; case B3SOIFD_MOD_PB1 : mod->B3SOIFDpb1 = value->rValue; mod->B3SOIFDpb1Given = TRUE; break; case B3SOIFD_MOD_PKETA: mod->B3SOIFDpketa = value->rValue; mod->B3SOIFDpketaGiven = TRUE; break; case B3SOIFD_MOD_PABP: mod->B3SOIFDpabp = value->rValue; mod->B3SOIFDpabpGiven = TRUE; break; case B3SOIFD_MOD_PMXC: mod->B3SOIFDpmxc = value->rValue; mod->B3SOIFDpmxcGiven = TRUE; break; case B3SOIFD_MOD_PADICE0: mod->B3SOIFDpadice0 = value->rValue; mod->B3SOIFDpadice0Given = TRUE; break; case B3SOIFD_MOD_PA1: mod->B3SOIFDpa1 = value->rValue; mod->B3SOIFDpa1Given = TRUE; break; case B3SOIFD_MOD_PA2: mod->B3SOIFDpa2 = value->rValue; mod->B3SOIFDpa2Given = TRUE; break; case B3SOIFD_MOD_PRDSW: mod->B3SOIFDprdsw = value->rValue; mod->B3SOIFDprdswGiven = TRUE; break; case B3SOIFD_MOD_PPRWB: mod->B3SOIFDpprwb = value->rValue; mod->B3SOIFDpprwbGiven = TRUE; break; case B3SOIFD_MOD_PPRWG: mod->B3SOIFDpprwg = value->rValue; mod->B3SOIFDpprwgGiven = TRUE; break; case B3SOIFD_MOD_PWR : mod->B3SOIFDpwr = value->rValue; mod->B3SOIFDpwrGiven = TRUE; break; case B3SOIFD_MOD_PNFACTOR : mod->B3SOIFDpnfactor = value->rValue; mod->B3SOIFDpnfactorGiven = TRUE; break; case B3SOIFD_MOD_PDWG : mod->B3SOIFDpdwg = value->rValue; mod->B3SOIFDpdwgGiven = TRUE; break; case B3SOIFD_MOD_PDWB : mod->B3SOIFDpdwb = value->rValue; mod->B3SOIFDpdwbGiven = TRUE; break; case B3SOIFD_MOD_PVOFF: mod->B3SOIFDpvoff = value->rValue; mod->B3SOIFDpvoffGiven = TRUE; break; case B3SOIFD_MOD_PETA0: mod->B3SOIFDpeta0 = value->rValue; mod->B3SOIFDpeta0Given = TRUE; break; case B3SOIFD_MOD_PETAB: mod->B3SOIFDpetab = value->rValue; mod->B3SOIFDpetabGiven = TRUE; break; case B3SOIFD_MOD_PDSUB: mod->B3SOIFDpdsub = value->rValue; mod->B3SOIFDpdsubGiven = TRUE; break; case B3SOIFD_MOD_PCIT : mod->B3SOIFDpcit = value->rValue; mod->B3SOIFDpcitGiven = TRUE; break; case B3SOIFD_MOD_PCDSC : mod->B3SOIFDpcdsc = value->rValue; mod->B3SOIFDpcdscGiven = TRUE; break; case B3SOIFD_MOD_PCDSCB : mod->B3SOIFDpcdscb = value->rValue; mod->B3SOIFDpcdscbGiven = TRUE; break; case B3SOIFD_MOD_PCDSCD : mod->B3SOIFDpcdscd = value->rValue; mod->B3SOIFDpcdscdGiven = TRUE; break; case B3SOIFD_MOD_PPCLM: mod->B3SOIFDppclm = value->rValue; mod->B3SOIFDppclmGiven = TRUE; break; case B3SOIFD_MOD_PPDIBL1: mod->B3SOIFDppdibl1 = value->rValue; mod->B3SOIFDppdibl1Given = TRUE; break; case B3SOIFD_MOD_PPDIBL2: mod->B3SOIFDppdibl2 = value->rValue; mod->B3SOIFDppdibl2Given = TRUE; break; case B3SOIFD_MOD_PPDIBLB: mod->B3SOIFDppdiblb = value->rValue; mod->B3SOIFDppdiblbGiven = TRUE; break; case B3SOIFD_MOD_PDROUT: mod->B3SOIFDpdrout = value->rValue; mod->B3SOIFDpdroutGiven = TRUE; break; case B3SOIFD_MOD_PPVAG: mod->B3SOIFDppvag = value->rValue; mod->B3SOIFDppvagGiven = TRUE; break; case B3SOIFD_MOD_PDELTA : mod->B3SOIFDpdelta = value->rValue; mod->B3SOIFDpdeltaGiven = TRUE; break; case B3SOIFD_MOD_PAII : mod->B3SOIFDpaii = value->rValue; mod->B3SOIFDpaiiGiven = TRUE; break; case B3SOIFD_MOD_PBII : mod->B3SOIFDpbii = value->rValue; mod->B3SOIFDpbiiGiven = TRUE; break; case B3SOIFD_MOD_PCII : mod->B3SOIFDpcii = value->rValue; mod->B3SOIFDpciiGiven = TRUE; break; case B3SOIFD_MOD_PDII : mod->B3SOIFDpdii = value->rValue; mod->B3SOIFDpdiiGiven = TRUE; break; case B3SOIFD_MOD_PALPHA0 : mod->B3SOIFDpalpha0 = value->rValue; mod->B3SOIFDpalpha0Given = TRUE; break; case B3SOIFD_MOD_PALPHA1 : mod->B3SOIFDpalpha1 = value->rValue; mod->B3SOIFDpalpha1Given = TRUE; break; case B3SOIFD_MOD_PBETA0 : mod->B3SOIFDpbeta0 = value->rValue; mod->B3SOIFDpbeta0Given = TRUE; break; case B3SOIFD_MOD_PAGIDL : mod->B3SOIFDpagidl = value->rValue; mod->B3SOIFDpagidlGiven = TRUE; break; case B3SOIFD_MOD_PBGIDL : mod->B3SOIFDpbgidl = value->rValue; mod->B3SOIFDpbgidlGiven = TRUE; break; case B3SOIFD_MOD_PNGIDL : mod->B3SOIFDpngidl = value->rValue; mod->B3SOIFDpngidlGiven = TRUE; break; case B3SOIFD_MOD_PNTUN : mod->B3SOIFDpntun = value->rValue; mod->B3SOIFDpntunGiven = TRUE; break; case B3SOIFD_MOD_PNDIODE : mod->B3SOIFDpndiode = value->rValue; mod->B3SOIFDpndiodeGiven = TRUE; break; case B3SOIFD_MOD_PISBJT : mod->B3SOIFDpisbjt = value->rValue; mod->B3SOIFDpisbjtGiven = TRUE; break; case B3SOIFD_MOD_PISDIF : mod->B3SOIFDpisdif = value->rValue; mod->B3SOIFDpisdifGiven = TRUE; break; case B3SOIFD_MOD_PISREC : mod->B3SOIFDpisrec = value->rValue; mod->B3SOIFDpisrecGiven = TRUE; break; case B3SOIFD_MOD_PISTUN : mod->B3SOIFDpistun = value->rValue; mod->B3SOIFDpistunGiven = TRUE; break; case B3SOIFD_MOD_PEDL : mod->B3SOIFDpedl = value->rValue; mod->B3SOIFDpedlGiven = TRUE; break; case B3SOIFD_MOD_PKBJT1 : mod->B3SOIFDpkbjt1 = value->rValue; mod->B3SOIFDpkbjt1Given = TRUE; break; /* CV Model */ case B3SOIFD_MOD_PVSDFB : mod->B3SOIFDpvsdfb = value->rValue; mod->B3SOIFDpvsdfbGiven = TRUE; break; case B3SOIFD_MOD_PVSDTH : mod->B3SOIFDpvsdth = value->rValue; mod->B3SOIFDpvsdthGiven = TRUE; break; /* Added for binning - END */ case B3SOIFD_MOD_NMOS : if(value->iValue) { mod->B3SOIFDtype = 1; mod->B3SOIFDtypeGiven = TRUE; } break; case B3SOIFD_MOD_PMOS : if(value->iValue) { mod->B3SOIFDtype = - 1; mod->B3SOIFDtypeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdcheck.c0000644000265600020320000004272212264261473023137 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdcheck.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int B3SOIFDcheckModel(B3SOIFDmodel *model, B3SOIFDinstance *here, CKTcircuit *ckt) { struct b3soifdSizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("b3soifdv2check.log", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "B3SOI (FD) Version 2.1 Parameter Check\n"); fprintf(fplog, "Model = %s\n", model->B3SOIFDmodName); fprintf(fplog, "W = %g, L = %g M = %g\n", here->B3SOIFDw, here->B3SOIFDl, here->B3SOIFDm); if (pParam->B3SOIFDnlx < -pParam->B3SOIFDleff) { fprintf(fplog, "Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIFDnlx); printf("Fatal: Nlx = %g is less than -Leff.\n", pParam->B3SOIFDnlx); Fatal_Flag = 1; } if (model->B3SOIFDtox <= 0.0) { fprintf(fplog, "Fatal: Tox = %g is not positive.\n", model->B3SOIFDtox); printf("Fatal: Tox = %g is not positive.\n", model->B3SOIFDtox); Fatal_Flag = 1; } if (model->B3SOIFDtbox <= 0.0) { fprintf(fplog, "Fatal: Tbox = %g is not positive.\n", model->B3SOIFDtbox); printf("Fatal: Tbox = %g is not positive.\n", model->B3SOIFDtbox); Fatal_Flag = 1; } if (pParam->B3SOIFDnpeak <= 0.0) { fprintf(fplog, "Fatal: Nch = %g is not positive.\n", pParam->B3SOIFDnpeak); printf("Fatal: Nch = %g is not positive.\n", pParam->B3SOIFDnpeak); Fatal_Flag = 1; } if (pParam->B3SOIFDngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->B3SOIFDngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->B3SOIFDngate); Fatal_Flag = 1; } if (pParam->B3SOIFDngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->B3SOIFDngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->B3SOIFDngate); Fatal_Flag = 1; } if (model->B3SOIFDdvbd1 < 0.0) { fprintf(fplog, "Fatal: Dvbd1 = %g is negative.\n", model->B3SOIFDdvbd1); printf("Fatal: Dvbd1 = %g is negative.\n", model->B3SOIFDdvbd1); Fatal_Flag = 1; } if (pParam->B3SOIFDdvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIFDdvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->B3SOIFDdvt1); Fatal_Flag = 1; } if (pParam->B3SOIFDdvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIFDdvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->B3SOIFDdvt1w); Fatal_Flag = 1; } if (pParam->B3SOIFDw0 == -pParam->B3SOIFDweff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 cauing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIFDdsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->B3SOIFDdsub); printf("Fatal: Dsub = %g is negative.\n", pParam->B3SOIFDdsub); Fatal_Flag = 1; } if (pParam->B3SOIFDb1 == -pParam->B3SOIFDweff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->B3SOIFDu0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIFDu0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->B3SOIFDu0temp); Fatal_Flag = 1; } /* Check delta parameter */ if (pParam->B3SOIFDdelta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->B3SOIFDdelta); printf("Fatal: Delta = %g is less than zero.\n", pParam->B3SOIFDdelta); Fatal_Flag = 1; } if (pParam->B3SOIFDvsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIFDvsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->B3SOIFDvsattemp); Fatal_Flag = 1; } /* Check Rout parameters */ if (pParam->B3SOIFDpclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->B3SOIFDpclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->B3SOIFDpclm); Fatal_Flag = 1; } if (pParam->B3SOIFDdrout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->B3SOIFDdrout); printf("Fatal: Drout = %g is negative.\n", pParam->B3SOIFDdrout); Fatal_Flag = 1; } if ( model->B3SOIFDunitLengthGateSidewallJctCap > 0.0) { if (here->B3SOIFDdrainPerimeter < pParam->B3SOIFDweff) { fprintf(fplog, "Warning: Pd = %g is less than W.\n", here->B3SOIFDdrainPerimeter); printf("Warning: Pd = %g is less than W.\n", here->B3SOIFDdrainPerimeter); here->B3SOIFDdrainPerimeter =pParam->B3SOIFDweff; } if (here->B3SOIFDsourcePerimeter < pParam->B3SOIFDweff) { fprintf(fplog, "Warning: Ps = %g is less than W.\n", here->B3SOIFDsourcePerimeter); printf("Warning: Ps = %g is less than W.\n", here->B3SOIFDsourcePerimeter); here->B3SOIFDsourcePerimeter =pParam->B3SOIFDweff; } } /* Check capacitance parameters */ if (pParam->B3SOIFDclc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->B3SOIFDclc); printf("Fatal: Clc = %g is negative.\n", pParam->B3SOIFDclc); Fatal_Flag = 1; } if (model->B3SOIFDparamChk ==1) { /* Check L and W parameters */ if (pParam->B3SOIFDleff <= 5.0e-8) { fprintf(fplog, "Warning: Leff = %g may be too small.\n", pParam->B3SOIFDleff); printf("Warning: Leff = %g may be too small.\n", pParam->B3SOIFDleff); } if (pParam->B3SOIFDleffCV <= 5.0e-8) { fprintf(fplog, "Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIFDleffCV); printf("Warning: Leff for CV = %g may be too small.\n", pParam->B3SOIFDleffCV); } if (pParam->B3SOIFDweff <= 1.0e-7) { fprintf(fplog, "Warning: Weff = %g may be too small.\n", pParam->B3SOIFDweff); printf("Warning: Weff = %g may be too small.\n", pParam->B3SOIFDweff); } if (pParam->B3SOIFDweffCV <= 1.0e-7) { fprintf(fplog, "Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIFDweffCV); printf("Warning: Weff for CV = %g may be too small.\n", pParam->B3SOIFDweffCV); } /* Check threshold voltage parameters */ if (pParam->B3SOIFDnlx < 0.0) { fprintf(fplog, "Warning: Nlx = %g is negative.\n", pParam->B3SOIFDnlx); printf("Warning: Nlx = %g is negative.\n", pParam->B3SOIFDnlx); } if (model->B3SOIFDtox < 1.0e-9) { fprintf(fplog, "Warning: Tox = %g is less than 10A.\n", model->B3SOIFDtox); printf("Warning: Tox = %g is less than 10A.\n", model->B3SOIFDtox); } if (pParam->B3SOIFDnpeak <= 1.0e15) { fprintf(fplog, "Warning: Nch = %g may be too small.\n", pParam->B3SOIFDnpeak); printf("Warning: Nch = %g may be too small.\n", pParam->B3SOIFDnpeak); } else if (pParam->B3SOIFDnpeak >= 1.0e21) { fprintf(fplog, "Warning: Nch = %g may be too large.\n", pParam->B3SOIFDnpeak); printf("Warning: Nch = %g may be too large.\n", pParam->B3SOIFDnpeak); } if (fabs(pParam->B3SOIFDnsub) >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->B3SOIFDnsub); printf("Warning: Nsub = %g may be too large.\n", pParam->B3SOIFDnsub); } if ((pParam->B3SOIFDngate > 0.0) && (pParam->B3SOIFDngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIFDngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->B3SOIFDngate); } if (model->B3SOIFDdvbd0 < 0.0) { fprintf(fplog, "Warning: Dvbd0 = %g is negative.\n", model->B3SOIFDdvbd0); printf("Warning: Dvbd0 = %g is negative.\n", model->B3SOIFDdvbd0); } if (pParam->B3SOIFDdvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->B3SOIFDdvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->B3SOIFDdvt0); } if (fabs(1.0e-6 / (pParam->B3SOIFDw0 + pParam->B3SOIFDweff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } /* Check subthreshold parameters */ if (pParam->B3SOIFDnfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->B3SOIFDnfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->B3SOIFDnfactor); } if (model->B3SOIFDkb3 < 0.0) { fprintf(fplog, "Warning: Kb3 = %g is negative.\n", model->B3SOIFDkb3); printf("Warning: Kb3 = %g is negative.\n", model->B3SOIFDkb3); } if (pParam->B3SOIFDcdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->B3SOIFDcdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->B3SOIFDcdsc); } if (pParam->B3SOIFDcdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->B3SOIFDcdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->B3SOIFDcdscd); } /* Check DIBL parameters */ if (pParam->B3SOIFDeta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->B3SOIFDeta0); printf("Warning: Eta0 = %g is negative.\n", pParam->B3SOIFDeta0); } /* Check Abulk parameters */ if (fabs(1.0e-6 / (pParam->B3SOIFDb1 + pParam->B3SOIFDweff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } if (model->B3SOIFDadice0 > 1.0) { fprintf(fplog, "Warning: Adice0 = %g should be smaller than 1.\n", model->B3SOIFDadice0); printf("Warning: Adice0 = %g should be smaller than 1.\n", model->B3SOIFDadice0); } if (model->B3SOIFDabp < 0.2) { fprintf(fplog, "Warning: Abp = %g is too small.\n", model->B3SOIFDabp); printf("Warning: Abp = %g is too small.\n", model->B3SOIFDabp); } if ((model->B3SOIFDmxc < -1.0) || (model->B3SOIFDmxc > 1.0)) { fprintf(fplog, "Warning: Mxc = %g should be within (-1, 1).\n", model->B3SOIFDmxc); printf("Warning: Mxc = %g should be within (-1, 1).\n", model->B3SOIFDmxc); } /* Check Saturation parameters */ if (pParam->B3SOIFDa2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIFDa2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->B3SOIFDa2); pParam->B3SOIFDa2 = 0.01; } else if (pParam->B3SOIFDa2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIFDa2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->B3SOIFDa2); pParam->B3SOIFDa2 = 1.0; pParam->B3SOIFDa1 = 0.0; } if (pParam->B3SOIFDrdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIFDrdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->B3SOIFDrdsw); pParam->B3SOIFDrdsw = 0.0; pParam->B3SOIFDrds0 = 0.0; } else if ((pParam->B3SOIFDrds0 > 0.0) && (pParam->B3SOIFDrds0 < 0.001)) { fprintf(fplog, "Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIFDrds0); printf("Warning: Rds at current temperature = %g is less than 0.001 ohm. Set to zero.\n", pParam->B3SOIFDrds0); pParam->B3SOIFDrds0 = 0.0; } if (pParam->B3SOIFDvsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIFDvsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->B3SOIFDvsattemp); } if (pParam->B3SOIFDpdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIFDpdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->B3SOIFDpdibl1); } if (pParam->B3SOIFDpdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIFDpdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->B3SOIFDpdibl2); } /* Check overlap capacitance parameters */ if (model->B3SOIFDcgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIFDcgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->B3SOIFDcgdo); model->B3SOIFDcgdo = 0.0; } if (model->B3SOIFDcgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIFDcgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->B3SOIFDcgso); model->B3SOIFDcgso = 0.0; } if (model->B3SOIFDcgeo < 0.0) { fprintf(fplog, "Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIFDcgeo); printf("Warning: cgeo = %g is negative. Set to zero.\n", model->B3SOIFDcgeo); model->B3SOIFDcgeo = 0.0; } if (model->B3SOIFDntun < 0.0) { fprintf(fplog, "Warning: Ntun = %g is negative.\n", model->B3SOIFDntun); printf("Warning: Ntun = %g is negative.\n", model->B3SOIFDntun); } if (model->B3SOIFDndiode < 0.0) { fprintf(fplog, "Warning: Ndiode = %g is negative.\n", model->B3SOIFDndiode); printf("Warning: Ndiode = %g is negative.\n", model->B3SOIFDndiode); } if (model->B3SOIFDisbjt < 0.0) { fprintf(fplog, "Warning: Isbjt = %g is negative.\n", model->B3SOIFDisbjt); printf("Warning: Isbjt = %g is negative.\n", model->B3SOIFDisbjt); } if (model->B3SOIFDisdif < 0.0) { fprintf(fplog, "Warning: Isdif = %g is negative.\n", model->B3SOIFDisdif); printf("Warning: Isdif = %g is negative.\n", model->B3SOIFDisdif); } if (model->B3SOIFDisrec < 0.0) { fprintf(fplog, "Warning: Isrec = %g is negative.\n", model->B3SOIFDisrec); printf("Warning: Isrec = %g is negative.\n", model->B3SOIFDisrec); } if (model->B3SOIFDistun < 0.0) { fprintf(fplog, "Warning: Istun = %g is negative.\n", model->B3SOIFDistun); printf("Warning: Istun = %g is negative.\n", model->B3SOIFDistun); } if (model->B3SOIFDedl < 0.0) { fprintf(fplog, "Warning: Edl = %g is negative.\n", model->B3SOIFDedl); printf("Warning: Edl = %g is negative.\n", model->B3SOIFDedl); } if (model->B3SOIFDkbjt1 < 0.0) { fprintf(fplog, "Warning: Kbjt1 = %g is negative.\n", model->B3SOIFDkbjt1); printf("Warning: kbjt1 = %g is negative.\n", model->B3SOIFDkbjt1); } if (model->B3SOIFDtt < 0.0) { fprintf(fplog, "Warning: Tt = %g is negative.\n", model->B3SOIFDtt); printf("Warning: Tt = %g is negative.\n", model->B3SOIFDtt); } if (model->B3SOIFDcsdmin < 0.0) { fprintf(fplog, "Warning: Csdmin = %g is negative.\n", model->B3SOIFDcsdmin); printf("Warning: Csdmin = %g is negative.\n", model->B3SOIFDcsdmin); } if (model->B3SOIFDcsdesw < 0.0) { fprintf(fplog, "Warning: Csdesw = %g is negative.\n", model->B3SOIFDcsdesw); printf("Warning: Csdesw = %g is negative.\n", model->B3SOIFDcsdesw); } if ((model->B3SOIFDasd < 0.0) || (model->B3SOIFDmxc > 1.0)) { fprintf(fplog, "Warning: Asd = %g should be within (0, 1).\n", model->B3SOIFDasd); printf("Warning: Asd = %g should be within (0, 1).\n", model->B3SOIFDasd); } if (model->B3SOIFDrth0 < 0.0) { fprintf(fplog, "Warning: Rth0 = %g is negative.\n", model->B3SOIFDrth0); printf("Warning: Rth0 = %g is negative.\n", model->B3SOIFDrth0); } if (model->B3SOIFDcth0 < 0.0) { fprintf(fplog, "Warning: Cth0 = %g is negative.\n", model->B3SOIFDcth0); printf("Warning: Cth0 = %g is negative.\n", model->B3SOIFDcth0); } if (model->B3SOIFDrbody < 0.0) { fprintf(fplog, "Warning: Rbody = %g is negative.\n", model->B3SOIFDrbody); printf("Warning: Rbody = %g is negative.\n", model->B3SOIFDrbody); } if (model->B3SOIFDrbsh < 0.0) { fprintf(fplog, "Warning: Rbsh = %g is negative.\n", model->B3SOIFDrbsh); printf("Warning: Rbsh = %g is negative.\n", model->B3SOIFDrbsh); } if (model->B3SOIFDxj > model->B3SOIFDtsi) { fprintf(fplog, "Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIFDxj, model->B3SOIFDtsi); printf("Warning: Xj = %g is thicker than Tsi = %g.\n", model->B3SOIFDxj, model->B3SOIFDtsi); } if (model->B3SOIFDcapMod < 2) { fprintf(fplog, "Warning: capMod < 2 is not supported by BSIM3SOI.\n"); printf("Warning: Warning: capMod < 2 is not supported by BSIM3SOI.\n"); } if (model->B3SOIFDcii > 2.0) { fprintf(fplog, "Warning: Cii = %g is larger than 2.0.\n", model->B3SOIFDcii); printf("Warning: Cii = %g is larger than 2.0.\n", model->B3SOIFDcii); } if (model->B3SOIFDdii > 1.5) { fprintf(fplog, "Warning: Dii = %g is larger than 1.5.\n", model->B3SOIFDcii); printf("Warning: Dii = %g is too larger than 1.5.\n", model->B3SOIFDcii); } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdmdel.c0000644000265600020320000000224212264261473022774 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdmdel.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { B3SOIFDmodel **model = (B3SOIFDmodel**)inModel; B3SOIFDmodel *modfast = (B3SOIFDmodel*)kill; B3SOIFDinstance *here; B3SOIFDinstance *prev = NULL; B3SOIFDmodel **oldmod; oldmod = model; for (; *model ; model = &((*model)->B3SOIFDnextModel)) { if ((*model)->B3SOIFDmodName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->B3SOIFDnextModel; /* cut deleted device out of list */ for (here = (*model)->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifddef.h0000644000265600020320000017072612264261473022633 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung Modified by Pin Su, Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 File: b3soifddef.h **********/ #ifndef B3SOIFD #define B3SOIFD #define SOICODE /* #define BULKCODE */ #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sB3SOIFDinstance { struct sB3SOIFDmodel *B3SOIFDmodPtr; struct sB3SOIFDinstance *B3SOIFDnextInstance; IFuid B3SOIFDname; int B3SOIFDstates; /* index into state table for this device */ int B3SOIFDdNode; int B3SOIFDgNode; int B3SOIFDsNode; int B3SOIFDeNode; int B3SOIFDbNode; int B3SOIFDtempNode; int B3SOIFDpNode; int B3SOIFDdNodePrime; int B3SOIFDsNodePrime; int B3SOIFDvbsNode; /* for Debug */ int B3SOIFDidsNode; int B3SOIFDicNode; int B3SOIFDibsNode; int B3SOIFDibdNode; int B3SOIFDiiiNode; int B3SOIFDigidlNode; int B3SOIFDitunNode; int B3SOIFDibpNode; int B3SOIFDabeffNode; int B3SOIFDvbs0effNode; int B3SOIFDvbseffNode; int B3SOIFDxcNode; int B3SOIFDcbbNode; int B3SOIFDcbdNode; int B3SOIFDcbeNode; int B3SOIFDcbgNode; int B3SOIFDqbNode; int B3SOIFDqbfNode; int B3SOIFDqjsNode; int B3SOIFDqjdNode; /* clean up last */ int B3SOIFDgmNode; int B3SOIFDgmbsNode; int B3SOIFDgdsNode; int B3SOIFDgmeNode; int B3SOIFDqgNode; int B3SOIFDqdNode; int B3SOIFDqeNode; int B3SOIFDiterations; int B3SOIFDvbs0teffNode; int B3SOIFDvthNode; int B3SOIFDvgsteffNode; int B3SOIFDxcsatNode; int B3SOIFDqaccNode; int B3SOIFDqsub0Node; int B3SOIFDqsubs1Node; int B3SOIFDqsubs2Node; int B3SOIFDvcscvNode; int B3SOIFDvdscvNode; int B3SOIFDdum1Node; int B3SOIFDdum2Node; int B3SOIFDdum3Node; int B3SOIFDdum4Node; int B3SOIFDdum5Node; /* end clean up last */ double B3SOIFDphi; double B3SOIFDvtm; double B3SOIFDni; double B3SOIFDueff; double B3SOIFDthetavth; double B3SOIFDvon; double B3SOIFDvbsdio; double B3SOIFDvdsat; double B3SOIFDcgdo; double B3SOIFDcgso; double B3SOIFDcgeo; double B3SOIFDids; double B3SOIFDic; double B3SOIFDibs; double B3SOIFDibd; double B3SOIFDiii; double B3SOIFDigidl; double B3SOIFDitun; double B3SOIFDibp; double B3SOIFDabeff; double B3SOIFDvbs0eff; double B3SOIFDvbseff; double B3SOIFDxc; double B3SOIFDcbg; double B3SOIFDcbb; double B3SOIFDcbd; double B3SOIFDqb; double B3SOIFDqbf; double B3SOIFDqjs; double B3SOIFDqjd; double B3SOIFDminIsub; int B3SOIFDfloat; /* clean up last */ double B3SOIFDdum1; double B3SOIFDdum2; double B3SOIFDdum3; double B3SOIFDdum4; double B3SOIFDdum5; /* end clean up last */ double B3SOIFDl; double B3SOIFDw; double B3SOIFDm; double B3SOIFDdrainArea; double B3SOIFDsourceArea; double B3SOIFDdrainSquares; double B3SOIFDsourceSquares; double B3SOIFDdrainPerimeter; double B3SOIFDsourcePerimeter; double B3SOIFDsourceConductance; double B3SOIFDdrainConductance; double B3SOIFDicVBS; double B3SOIFDicVDS; double B3SOIFDicVGS; double B3SOIFDicVES; double B3SOIFDicVPS; int B3SOIFDbjtoff; int B3SOIFDbodyMod; int B3SOIFDdebugMod; double B3SOIFDrth0; double B3SOIFDcth0; double B3SOIFDbodySquares; double B3SOIFDrbodyext; double B3SOIFDcsbox; double B3SOIFDcdbox; double B3SOIFDcsmin; double B3SOIFDcdmin; double B3SOIFDst4; double B3SOIFDdt4; int B3SOIFDoff; int B3SOIFDmode; /* OP point */ double B3SOIFDqinv; double B3SOIFDcd; double B3SOIFDcjs; double B3SOIFDcjd; double B3SOIFDcbody; double B3SOIFDcbodcon; double B3SOIFDcth; double B3SOIFDcsubstrate; double B3SOIFDgm; double B3SOIFDgme; double B3SOIFDcb; double B3SOIFDcdrain; double B3SOIFDgds; double B3SOIFDgmbs; double B3SOIFDgmT; double B3SOIFDgbbs; double B3SOIFDgbgs; double B3SOIFDgbds; double B3SOIFDgbes; double B3SOIFDgbps; double B3SOIFDgbT; double B3SOIFDgjsd; double B3SOIFDgjsb; double B3SOIFDgjsg; double B3SOIFDgjsT; double B3SOIFDgjdb; double B3SOIFDgjdd; double B3SOIFDgjdg; double B3SOIFDgjde; double B3SOIFDgjdT; double B3SOIFDgbpbs; double B3SOIFDgbpgs; double B3SOIFDgbpds; double B3SOIFDgbpes; double B3SOIFDgbpps; double B3SOIFDgbpT; double B3SOIFDgtempb; double B3SOIFDgtempg; double B3SOIFDgtempd; double B3SOIFDgtempe; double B3SOIFDgtempT; double B3SOIFDcggb; double B3SOIFDcgdb; double B3SOIFDcgsb; double B3SOIFDcgeb; double B3SOIFDcgT; double B3SOIFDcbgb; double B3SOIFDcbdb; double B3SOIFDcbsb; double B3SOIFDcbeb; double B3SOIFDcbT; double B3SOIFDcdgb; double B3SOIFDcddb; double B3SOIFDcdsb; double B3SOIFDcdeb; double B3SOIFDcdT; double B3SOIFDcegb; double B3SOIFDcedb; double B3SOIFDcesb; double B3SOIFDceeb; double B3SOIFDceT; double B3SOIFDqse; double B3SOIFDgcse; double B3SOIFDqde; double B3SOIFDgcde; struct b3soifdSizeDependParam *pParam; unsigned B3SOIFDlGiven :1; unsigned B3SOIFDwGiven :1; unsigned B3SOIFDmGiven :1; unsigned B3SOIFDdrainAreaGiven :1; unsigned B3SOIFDsourceAreaGiven :1; unsigned B3SOIFDdrainSquaresGiven :1; unsigned B3SOIFDsourceSquaresGiven :1; unsigned B3SOIFDdrainPerimeterGiven :1; unsigned B3SOIFDsourcePerimeterGiven :1; unsigned B3SOIFDdNodePrimeSet :1; unsigned B3SOIFDsNodePrimeSet :1; unsigned B3SOIFDicVBSGiven :1; unsigned B3SOIFDicVDSGiven :1; unsigned B3SOIFDicVGSGiven :1; unsigned B3SOIFDicVESGiven :1; unsigned B3SOIFDicVPSGiven :1; unsigned B3SOIFDbjtoffGiven :1; unsigned B3SOIFDdebugModGiven :1; unsigned B3SOIFDrth0Given :1; unsigned B3SOIFDcth0Given :1; unsigned B3SOIFDbodySquaresGiven :1; unsigned B3SOIFDoffGiven :1; double *B3SOIFDEePtr; double *B3SOIFDEbPtr; double *B3SOIFDBePtr; double *B3SOIFDEgPtr; double *B3SOIFDEdpPtr; double *B3SOIFDEspPtr; double *B3SOIFDTemptempPtr; double *B3SOIFDTempdpPtr; double *B3SOIFDTempspPtr; double *B3SOIFDTempgPtr; double *B3SOIFDTempbPtr; double *B3SOIFDTempePtr; double *B3SOIFDGtempPtr; double *B3SOIFDDPtempPtr; double *B3SOIFDSPtempPtr; double *B3SOIFDEtempPtr; double *B3SOIFDBtempPtr; double *B3SOIFDPtempPtr; double *B3SOIFDBpPtr; double *B3SOIFDPbPtr; double *B3SOIFDPpPtr; double *B3SOIFDPgPtr; double *B3SOIFDPdpPtr; double *B3SOIFDPspPtr; double *B3SOIFDPePtr; double *B3SOIFDDPePtr; double *B3SOIFDSPePtr; double *B3SOIFDGePtr; double *B3SOIFDDdPtr; double *B3SOIFDGgPtr; double *B3SOIFDSsPtr; double *B3SOIFDBbPtr; double *B3SOIFDDPdpPtr; double *B3SOIFDSPspPtr; double *B3SOIFDDdpPtr; double *B3SOIFDGbPtr; double *B3SOIFDGdpPtr; double *B3SOIFDGspPtr; double *B3SOIFDSspPtr; double *B3SOIFDBdpPtr; double *B3SOIFDBspPtr; double *B3SOIFDDPspPtr; double *B3SOIFDDPdPtr; double *B3SOIFDBgPtr; double *B3SOIFDDPgPtr; double *B3SOIFDSPgPtr; double *B3SOIFDSPsPtr; double *B3SOIFDDPbPtr; double *B3SOIFDSPbPtr; double *B3SOIFDSPdpPtr; double *B3SOIFDVbsPtr; /* Debug */ double *B3SOIFDIdsPtr; double *B3SOIFDIcPtr; double *B3SOIFDIbsPtr; double *B3SOIFDIbdPtr; double *B3SOIFDIiiPtr; double *B3SOIFDIgidlPtr; double *B3SOIFDItunPtr; double *B3SOIFDIbpPtr; double *B3SOIFDAbeffPtr; double *B3SOIFDVbs0effPtr; double *B3SOIFDVbseffPtr; double *B3SOIFDXcPtr; double *B3SOIFDCbbPtr; double *B3SOIFDCbdPtr; double *B3SOIFDCbgPtr; double *B3SOIFDqbPtr; double *B3SOIFDQbfPtr; double *B3SOIFDQjsPtr; double *B3SOIFDQjdPtr; /* clean up last */ double *B3SOIFDGmPtr; double *B3SOIFDGmbsPtr; double *B3SOIFDGdsPtr; double *B3SOIFDGmePtr; double *B3SOIFDVbs0teffPtr; double *B3SOIFDVthPtr; double *B3SOIFDVgsteffPtr; double *B3SOIFDXcsatPtr; double *B3SOIFDQaccPtr; double *B3SOIFDQsub0Ptr; double *B3SOIFDQsubs1Ptr; double *B3SOIFDQsubs2Ptr; double *B3SOIFDVdscvPtr; double *B3SOIFDVcscvPtr; double *B3SOIFDCbePtr; double *B3SOIFDqgPtr; double *B3SOIFDqdPtr; double *B3SOIFDqePtr; double *B3SOIFDDum1Ptr; double *B3SOIFDDum2Ptr; double *B3SOIFDDum3Ptr; double *B3SOIFDDum4Ptr; double *B3SOIFDDum5Ptr; /* End clean up last */ #define B3SOIFDvbd B3SOIFDstates+ 0 #define B3SOIFDvbs B3SOIFDstates+ 1 #define B3SOIFDvgs B3SOIFDstates+ 2 #define B3SOIFDvds B3SOIFDstates+ 3 #define B3SOIFDves B3SOIFDstates+ 4 #define B3SOIFDvps B3SOIFDstates+ 5 #define B3SOIFDvg B3SOIFDstates+ 6 #define B3SOIFDvd B3SOIFDstates+ 7 #define B3SOIFDvs B3SOIFDstates+ 8 #define B3SOIFDvp B3SOIFDstates+ 9 #define B3SOIFDve B3SOIFDstates+ 10 #define B3SOIFDdeltemp B3SOIFDstates+ 11 #define B3SOIFDqb B3SOIFDstates+ 12 #define B3SOIFDcqb B3SOIFDstates+ 13 #define B3SOIFDqg B3SOIFDstates+ 14 #define B3SOIFDcqg B3SOIFDstates+ 15 #define B3SOIFDqd B3SOIFDstates+ 16 #define B3SOIFDcqd B3SOIFDstates+ 17 #define B3SOIFDqe B3SOIFDstates+ 18 #define B3SOIFDcqe B3SOIFDstates+ 19 #define B3SOIFDqbs B3SOIFDstates+ 20 #define B3SOIFDqbd B3SOIFDstates+ 21 #define B3SOIFDqbe B3SOIFDstates+ 22 #define B3SOIFDqth B3SOIFDstates+ 23 #define B3SOIFDcqth B3SOIFDstates+ 24 #define B3SOIFDnumStates 25 /* indices to the array of B3SOIFD NOISE SOURCES */ #define B3SOIFDRDNOIZ 0 #define B3SOIFDRSNOIZ 1 #define B3SOIFDIDNOIZ 2 #define B3SOIFDFLNOIZ 3 #define B3SOIFDFBNOIZ 4 #define B3SOIFDTOTNOIZ 5 #define B3SOIFDNSRCS 6 /* the number of MOSFET(3) noise sources */ #ifndef NONOISE double B3SOIFDnVar[NSTATVARS][B3SOIFDNSRCS]; #else /* NONOISE */ double **B3SOIFDnVar; #endif /* NONOISE */ } B3SOIFDinstance ; struct b3soifdSizeDependParam { double Width; double Length; double Rth0; double Cth0; double B3SOIFDcdsc; double B3SOIFDcdscb; double B3SOIFDcdscd; double B3SOIFDcit; double B3SOIFDnfactor; double B3SOIFDvsat; double B3SOIFDat; double B3SOIFDa0; double B3SOIFDags; double B3SOIFDa1; double B3SOIFDa2; double B3SOIFDketa; double B3SOIFDnpeak; double B3SOIFDnsub; double B3SOIFDngate; double B3SOIFDgamma1; double B3SOIFDgamma2; double B3SOIFDvbx; double B3SOIFDvbi; double B3SOIFDvbm; double B3SOIFDvbsc; double B3SOIFDxt; double B3SOIFDphi; double B3SOIFDlitl; double B3SOIFDk1; double B3SOIFDkt1; double B3SOIFDkt1l; double B3SOIFDkt2; double B3SOIFDk2; double B3SOIFDk3; double B3SOIFDk3b; double B3SOIFDw0; double B3SOIFDnlx; double B3SOIFDdvt0; double B3SOIFDdvt1; double B3SOIFDdvt2; double B3SOIFDdvt0w; double B3SOIFDdvt1w; double B3SOIFDdvt2w; double B3SOIFDdrout; double B3SOIFDdsub; double B3SOIFDvth0; double B3SOIFDua; double B3SOIFDua1; double B3SOIFDub; double B3SOIFDub1; double B3SOIFDuc; double B3SOIFDuc1; double B3SOIFDu0; double B3SOIFDute; double B3SOIFDvoff; double B3SOIFDvfb; double B3SOIFDuatemp; double B3SOIFDubtemp; double B3SOIFDuctemp; double B3SOIFDrbody; double B3SOIFDrth; double B3SOIFDcth; double B3SOIFDrds0denom; double B3SOIFDvfbb; double B3SOIFDjbjt; double B3SOIFDjdif; double B3SOIFDjrec; double B3SOIFDjtun; double B3SOIFDcsesw; double B3SOIFDcdesw; /* Added */ double B3SOIFDsdt1; double B3SOIFDst2; double B3SOIFDst3; double B3SOIFDdt2; double B3SOIFDdt3; /* Added */ double B3SOIFDdelta; double B3SOIFDrdsw; double B3SOIFDrds0; double B3SOIFDprwg; double B3SOIFDprwb; double B3SOIFDprt; double B3SOIFDeta0; double B3SOIFDetab; double B3SOIFDpclm; double B3SOIFDpdibl1; double B3SOIFDpdibl2; double B3SOIFDpdiblb; double B3SOIFDpvag; double B3SOIFDwr; double B3SOIFDdwg; double B3SOIFDdwb; double B3SOIFDb0; double B3SOIFDb1; double B3SOIFDalpha0; double B3SOIFDalpha1; double B3SOIFDbeta0; /* CV model */ double B3SOIFDcgsl; double B3SOIFDcgdl; double B3SOIFDckappa; double B3SOIFDcf; double B3SOIFDclc; double B3SOIFDcle; /* Added for binning - START0 */ double B3SOIFDvbsa; double B3SOIFDdelp; double B3SOIFDkb1; double B3SOIFDkb3; double B3SOIFDdvbd0; double B3SOIFDdvbd1; double B3SOIFDabp; double B3SOIFDmxc; double B3SOIFDadice0; double B3SOIFDaii; double B3SOIFDbii; double B3SOIFDcii; double B3SOIFDdii; double B3SOIFDagidl; double B3SOIFDbgidl; double B3SOIFDngidl; double B3SOIFDntun; double B3SOIFDndiode; double B3SOIFDisbjt; double B3SOIFDisdif; double B3SOIFDisrec; double B3SOIFDistun; double B3SOIFDedl; double B3SOIFDkbjt1; double B3SOIFDvsdfb; double B3SOIFDvsdth; /* Added for binning - END0 */ /* Pre-calculated constants */ double B3SOIFDdw; double B3SOIFDdl; double B3SOIFDleff; double B3SOIFDweff; double B3SOIFDdwc; double B3SOIFDdlc; double B3SOIFDleffCV; double B3SOIFDweffCV; double B3SOIFDabulkCVfactor; double B3SOIFDcgso; double B3SOIFDcgdo; double B3SOIFDcgeo; double B3SOIFDu0temp; double B3SOIFDvsattemp; double B3SOIFDsqrtPhi; double B3SOIFDphis3; double B3SOIFDXdep0; double B3SOIFDsqrtXdep0; double B3SOIFDtheta0vb0; double B3SOIFDthetaRout; double B3SOIFDcof1; double B3SOIFDcof2; double B3SOIFDcof3; double B3SOIFDcof4; double B3SOIFDcdep0; struct b3soifdSizeDependParam *pNext; }; typedef struct sB3SOIFDmodel { int B3SOIFDmodType; struct sB3SOIFDmodel *B3SOIFDnextModel; B3SOIFDinstance *B3SOIFDinstances; IFuid B3SOIFDmodName; int B3SOIFDtype; int B3SOIFDmobMod; int B3SOIFDcapMod; int B3SOIFDnoiMod; int B3SOIFDshMod; int B3SOIFDbinUnit; int B3SOIFDparamChk; double B3SOIFDversion; double B3SOIFDtox; double B3SOIFDcdsc; double B3SOIFDcdscb; double B3SOIFDcdscd; double B3SOIFDcit; double B3SOIFDnfactor; double B3SOIFDvsat; double B3SOIFDat; double B3SOIFDa0; double B3SOIFDags; double B3SOIFDa1; double B3SOIFDa2; double B3SOIFDketa; double B3SOIFDnsub; double B3SOIFDnpeak; double B3SOIFDngate; double B3SOIFDgamma1; double B3SOIFDgamma2; double B3SOIFDvbx; double B3SOIFDvbm; double B3SOIFDxt; double B3SOIFDk1; double B3SOIFDkt1; double B3SOIFDkt1l; double B3SOIFDkt2; double B3SOIFDk2; double B3SOIFDk3; double B3SOIFDk3b; double B3SOIFDw0; double B3SOIFDnlx; double B3SOIFDdvt0; double B3SOIFDdvt1; double B3SOIFDdvt2; double B3SOIFDdvt0w; double B3SOIFDdvt1w; double B3SOIFDdvt2w; double B3SOIFDdrout; double B3SOIFDdsub; double B3SOIFDvth0; double B3SOIFDua; double B3SOIFDua1; double B3SOIFDub; double B3SOIFDub1; double B3SOIFDuc; double B3SOIFDuc1; double B3SOIFDu0; double B3SOIFDute; double B3SOIFDvoff; double B3SOIFDdelta; double B3SOIFDrdsw; double B3SOIFDprwg; double B3SOIFDprwb; double B3SOIFDprt; double B3SOIFDeta0; double B3SOIFDetab; double B3SOIFDpclm; double B3SOIFDpdibl1; double B3SOIFDpdibl2; double B3SOIFDpdiblb; double B3SOIFDpvag; double B3SOIFDwr; double B3SOIFDdwg; double B3SOIFDdwb; double B3SOIFDb0; double B3SOIFDb1; double B3SOIFDalpha0; double B3SOIFDalpha1; double B3SOIFDbeta0; double B3SOIFDtbox; double B3SOIFDtsi; double B3SOIFDxj; double B3SOIFDkb1; double B3SOIFDkb3; double B3SOIFDdvbd0; double B3SOIFDdvbd1; double B3SOIFDvbsa; double B3SOIFDdelp; double B3SOIFDrbody; double B3SOIFDrbsh; double B3SOIFDadice0; double B3SOIFDabp; double B3SOIFDmxc; double B3SOIFDrth0; double B3SOIFDcth0; double B3SOIFDaii; double B3SOIFDbii; double B3SOIFDcii; double B3SOIFDdii; double B3SOIFDngidl; double B3SOIFDagidl; double B3SOIFDbgidl; double B3SOIFDndiode; double B3SOIFDntun; double B3SOIFDisbjt; double B3SOIFDisdif; double B3SOIFDisrec; double B3SOIFDistun; double B3SOIFDxbjt; double B3SOIFDxdif; double B3SOIFDxrec; double B3SOIFDxtun; double B3SOIFDedl; double B3SOIFDkbjt1; double B3SOIFDtt; double B3SOIFDvsdfb; double B3SOIFDvsdth; double B3SOIFDcsdmin; double B3SOIFDasd; /* CV model */ double B3SOIFDcgsl; double B3SOIFDcgdl; double B3SOIFDckappa; double B3SOIFDcf; double B3SOIFDclc; double B3SOIFDcle; double B3SOIFDdwc; double B3SOIFDdlc; double B3SOIFDtnom; double B3SOIFDcgso; double B3SOIFDcgdo; double B3SOIFDcgeo; double B3SOIFDxpart; double B3SOIFDcFringOut; double B3SOIFDcFringMax; double B3SOIFDsheetResistance; double B3SOIFDbodyJctGateSideGradingCoeff; double B3SOIFDGatesidewallJctPotential; double B3SOIFDunitLengthGateSidewallJctCap; double B3SOIFDcsdesw; double B3SOIFDLint; double B3SOIFDLl; double B3SOIFDLln; double B3SOIFDLw; double B3SOIFDLwn; double B3SOIFDLwl; double B3SOIFDLmin; double B3SOIFDLmax; double B3SOIFDWint; double B3SOIFDWl; double B3SOIFDWln; double B3SOIFDWw; double B3SOIFDWwn; double B3SOIFDWwl; double B3SOIFDWmin; double B3SOIFDWmax; /* Added for binning - START1 */ /* Length Dependence */ double B3SOIFDlnpeak; double B3SOIFDlnsub; double B3SOIFDlngate; double B3SOIFDlvth0; double B3SOIFDlk1; double B3SOIFDlk2; double B3SOIFDlk3; double B3SOIFDlk3b; double B3SOIFDlvbsa; double B3SOIFDldelp; double B3SOIFDlkb1; double B3SOIFDlkb3; double B3SOIFDldvbd0; double B3SOIFDldvbd1; double B3SOIFDlw0; double B3SOIFDlnlx; double B3SOIFDldvt0; double B3SOIFDldvt1; double B3SOIFDldvt2; double B3SOIFDldvt0w; double B3SOIFDldvt1w; double B3SOIFDldvt2w; double B3SOIFDlu0; double B3SOIFDlua; double B3SOIFDlub; double B3SOIFDluc; double B3SOIFDlvsat; double B3SOIFDla0; double B3SOIFDlags; double B3SOIFDlb0; double B3SOIFDlb1; double B3SOIFDlketa; double B3SOIFDlabp; double B3SOIFDlmxc; double B3SOIFDladice0; double B3SOIFDla1; double B3SOIFDla2; double B3SOIFDlrdsw; double B3SOIFDlprwb; double B3SOIFDlprwg; double B3SOIFDlwr; double B3SOIFDlnfactor; double B3SOIFDldwg; double B3SOIFDldwb; double B3SOIFDlvoff; double B3SOIFDleta0; double B3SOIFDletab; double B3SOIFDldsub; double B3SOIFDlcit; double B3SOIFDlcdsc; double B3SOIFDlcdscb; double B3SOIFDlcdscd; double B3SOIFDlpclm; double B3SOIFDlpdibl1; double B3SOIFDlpdibl2; double B3SOIFDlpdiblb; double B3SOIFDldrout; double B3SOIFDlpvag; double B3SOIFDldelta; double B3SOIFDlaii; double B3SOIFDlbii; double B3SOIFDlcii; double B3SOIFDldii; double B3SOIFDlalpha0; double B3SOIFDlalpha1; double B3SOIFDlbeta0; double B3SOIFDlagidl; double B3SOIFDlbgidl; double B3SOIFDlngidl; double B3SOIFDlntun; double B3SOIFDlndiode; double B3SOIFDlisbjt; double B3SOIFDlisdif; double B3SOIFDlisrec; double B3SOIFDlistun; double B3SOIFDledl; double B3SOIFDlkbjt1; /* CV model */ double B3SOIFDlvsdfb; double B3SOIFDlvsdth; /* Width Dependence */ double B3SOIFDwnpeak; double B3SOIFDwnsub; double B3SOIFDwngate; double B3SOIFDwvth0; double B3SOIFDwk1; double B3SOIFDwk2; double B3SOIFDwk3; double B3SOIFDwk3b; double B3SOIFDwvbsa; double B3SOIFDwdelp; double B3SOIFDwkb1; double B3SOIFDwkb3; double B3SOIFDwdvbd0; double B3SOIFDwdvbd1; double B3SOIFDww0; double B3SOIFDwnlx; double B3SOIFDwdvt0; double B3SOIFDwdvt1; double B3SOIFDwdvt2; double B3SOIFDwdvt0w; double B3SOIFDwdvt1w; double B3SOIFDwdvt2w; double B3SOIFDwu0; double B3SOIFDwua; double B3SOIFDwub; double B3SOIFDwuc; double B3SOIFDwvsat; double B3SOIFDwa0; double B3SOIFDwags; double B3SOIFDwb0; double B3SOIFDwb1; double B3SOIFDwketa; double B3SOIFDwabp; double B3SOIFDwmxc; double B3SOIFDwadice0; double B3SOIFDwa1; double B3SOIFDwa2; double B3SOIFDwrdsw; double B3SOIFDwprwb; double B3SOIFDwprwg; double B3SOIFDwwr; double B3SOIFDwnfactor; double B3SOIFDwdwg; double B3SOIFDwdwb; double B3SOIFDwvoff; double B3SOIFDweta0; double B3SOIFDwetab; double B3SOIFDwdsub; double B3SOIFDwcit; double B3SOIFDwcdsc; double B3SOIFDwcdscb; double B3SOIFDwcdscd; double B3SOIFDwpclm; double B3SOIFDwpdibl1; double B3SOIFDwpdibl2; double B3SOIFDwpdiblb; double B3SOIFDwdrout; double B3SOIFDwpvag; double B3SOIFDwdelta; double B3SOIFDwaii; double B3SOIFDwbii; double B3SOIFDwcii; double B3SOIFDwdii; double B3SOIFDwalpha0; double B3SOIFDwalpha1; double B3SOIFDwbeta0; double B3SOIFDwagidl; double B3SOIFDwbgidl; double B3SOIFDwngidl; double B3SOIFDwntun; double B3SOIFDwndiode; double B3SOIFDwisbjt; double B3SOIFDwisdif; double B3SOIFDwisrec; double B3SOIFDwistun; double B3SOIFDwedl; double B3SOIFDwkbjt1; /* CV model */ double B3SOIFDwvsdfb; double B3SOIFDwvsdth; /* Cross-term Dependence */ double B3SOIFDpnpeak; double B3SOIFDpnsub; double B3SOIFDpngate; double B3SOIFDpvth0; double B3SOIFDpk1; double B3SOIFDpk2; double B3SOIFDpk3; double B3SOIFDpk3b; double B3SOIFDpvbsa; double B3SOIFDpdelp; double B3SOIFDpkb1; double B3SOIFDpkb3; double B3SOIFDpdvbd0; double B3SOIFDpdvbd1; double B3SOIFDpw0; double B3SOIFDpnlx; double B3SOIFDpdvt0; double B3SOIFDpdvt1; double B3SOIFDpdvt2; double B3SOIFDpdvt0w; double B3SOIFDpdvt1w; double B3SOIFDpdvt2w; double B3SOIFDpu0; double B3SOIFDpua; double B3SOIFDpub; double B3SOIFDpuc; double B3SOIFDpvsat; double B3SOIFDpa0; double B3SOIFDpags; double B3SOIFDpb0; double B3SOIFDpb1; double B3SOIFDpketa; double B3SOIFDpabp; double B3SOIFDpmxc; double B3SOIFDpadice0; double B3SOIFDpa1; double B3SOIFDpa2; double B3SOIFDprdsw; double B3SOIFDpprwb; double B3SOIFDpprwg; double B3SOIFDpwr; double B3SOIFDpnfactor; double B3SOIFDpdwg; double B3SOIFDpdwb; double B3SOIFDpvoff; double B3SOIFDpeta0; double B3SOIFDpetab; double B3SOIFDpdsub; double B3SOIFDpcit; double B3SOIFDpcdsc; double B3SOIFDpcdscb; double B3SOIFDpcdscd; double B3SOIFDppclm; double B3SOIFDppdibl1; double B3SOIFDppdibl2; double B3SOIFDppdiblb; double B3SOIFDpdrout; double B3SOIFDppvag; double B3SOIFDpdelta; double B3SOIFDpaii; double B3SOIFDpbii; double B3SOIFDpcii; double B3SOIFDpdii; double B3SOIFDpalpha0; double B3SOIFDpalpha1; double B3SOIFDpbeta0; double B3SOIFDpagidl; double B3SOIFDpbgidl; double B3SOIFDpngidl; double B3SOIFDpntun; double B3SOIFDpndiode; double B3SOIFDpisbjt; double B3SOIFDpisdif; double B3SOIFDpisrec; double B3SOIFDpistun; double B3SOIFDpedl; double B3SOIFDpkbjt1; /* CV model */ double B3SOIFDpvsdfb; double B3SOIFDpvsdth; /* Added for binning - END1 */ /* Pre-calculated constants */ double B3SOIFDcbox; double B3SOIFDcsi; double B3SOIFDcsieff; double B3SOIFDcoxt; double B3SOIFDcboxt; double B3SOIFDcsit; double B3SOIFDnfb; double B3SOIFDadice; double B3SOIFDqsi; double B3SOIFDqsieff; double B3SOIFDeg0; /* MCJ: move to size-dependent param. */ double B3SOIFDvtm; double B3SOIFDcox; double B3SOIFDcof1; double B3SOIFDcof2; double B3SOIFDcof3; double B3SOIFDcof4; double B3SOIFDvcrit; double B3SOIFDfactor1; double B3SOIFDoxideTrapDensityA; double B3SOIFDoxideTrapDensityB; double B3SOIFDoxideTrapDensityC; double B3SOIFDem; double B3SOIFDef; double B3SOIFDaf; double B3SOIFDkf; double B3SOIFDnoif; struct b3soifdSizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned B3SOIFDtboxGiven:1; unsigned B3SOIFDtsiGiven :1; unsigned B3SOIFDxjGiven :1; unsigned B3SOIFDkb1Given :1; unsigned B3SOIFDkb3Given :1; unsigned B3SOIFDdvbd0Given :1; unsigned B3SOIFDdvbd1Given :1; unsigned B3SOIFDvbsaGiven :1; unsigned B3SOIFDdelpGiven :1; unsigned B3SOIFDrbodyGiven :1; unsigned B3SOIFDrbshGiven :1; unsigned B3SOIFDadice0Given :1; unsigned B3SOIFDabpGiven :1; unsigned B3SOIFDmxcGiven :1; unsigned B3SOIFDrth0Given :1; unsigned B3SOIFDcth0Given :1; unsigned B3SOIFDaiiGiven :1; unsigned B3SOIFDbiiGiven :1; unsigned B3SOIFDciiGiven :1; unsigned B3SOIFDdiiGiven :1; unsigned B3SOIFDngidlGiven :1; unsigned B3SOIFDagidlGiven :1; unsigned B3SOIFDbgidlGiven :1; unsigned B3SOIFDndiodeGiven :1; unsigned B3SOIFDntunGiven :1; unsigned B3SOIFDisbjtGiven :1; unsigned B3SOIFDisdifGiven :1; unsigned B3SOIFDisrecGiven :1; unsigned B3SOIFDistunGiven :1; unsigned B3SOIFDxbjtGiven :1; unsigned B3SOIFDxdifGiven :1; unsigned B3SOIFDxrecGiven :1; unsigned B3SOIFDxtunGiven :1; unsigned B3SOIFDedlGiven :1; unsigned B3SOIFDkbjt1Given :1; unsigned B3SOIFDttGiven :1; unsigned B3SOIFDvsdfbGiven :1; unsigned B3SOIFDvsdthGiven :1; unsigned B3SOIFDasdGiven :1; unsigned B3SOIFDcsdminGiven :1; unsigned B3SOIFDmobModGiven :1; unsigned B3SOIFDbinUnitGiven :1; unsigned B3SOIFDcapModGiven :1; unsigned B3SOIFDparamChkGiven :1; unsigned B3SOIFDnoiModGiven :1; unsigned B3SOIFDshModGiven :1; unsigned B3SOIFDtypeGiven :1; unsigned B3SOIFDtoxGiven :1; unsigned B3SOIFDversionGiven :1; unsigned B3SOIFDcdscGiven :1; unsigned B3SOIFDcdscbGiven :1; unsigned B3SOIFDcdscdGiven :1; unsigned B3SOIFDcitGiven :1; unsigned B3SOIFDnfactorGiven :1; unsigned B3SOIFDvsatGiven :1; unsigned B3SOIFDatGiven :1; unsigned B3SOIFDa0Given :1; unsigned B3SOIFDagsGiven :1; unsigned B3SOIFDa1Given :1; unsigned B3SOIFDa2Given :1; unsigned B3SOIFDketaGiven :1; unsigned B3SOIFDnsubGiven :1; unsigned B3SOIFDnpeakGiven :1; unsigned B3SOIFDngateGiven :1; unsigned B3SOIFDgamma1Given :1; unsigned B3SOIFDgamma2Given :1; unsigned B3SOIFDvbxGiven :1; unsigned B3SOIFDvbmGiven :1; unsigned B3SOIFDxtGiven :1; unsigned B3SOIFDk1Given :1; unsigned B3SOIFDkt1Given :1; unsigned B3SOIFDkt1lGiven :1; unsigned B3SOIFDkt2Given :1; unsigned B3SOIFDk2Given :1; unsigned B3SOIFDk3Given :1; unsigned B3SOIFDk3bGiven :1; unsigned B3SOIFDw0Given :1; unsigned B3SOIFDnlxGiven :1; unsigned B3SOIFDdvt0Given :1; unsigned B3SOIFDdvt1Given :1; unsigned B3SOIFDdvt2Given :1; unsigned B3SOIFDdvt0wGiven :1; unsigned B3SOIFDdvt1wGiven :1; unsigned B3SOIFDdvt2wGiven :1; unsigned B3SOIFDdroutGiven :1; unsigned B3SOIFDdsubGiven :1; unsigned B3SOIFDvth0Given :1; unsigned B3SOIFDuaGiven :1; unsigned B3SOIFDua1Given :1; unsigned B3SOIFDubGiven :1; unsigned B3SOIFDub1Given :1; unsigned B3SOIFDucGiven :1; unsigned B3SOIFDuc1Given :1; unsigned B3SOIFDu0Given :1; unsigned B3SOIFDuteGiven :1; unsigned B3SOIFDvoffGiven :1; unsigned B3SOIFDrdswGiven :1; unsigned B3SOIFDprwgGiven :1; unsigned B3SOIFDprwbGiven :1; unsigned B3SOIFDprtGiven :1; unsigned B3SOIFDeta0Given :1; unsigned B3SOIFDetabGiven :1; unsigned B3SOIFDpclmGiven :1; unsigned B3SOIFDpdibl1Given :1; unsigned B3SOIFDpdibl2Given :1; unsigned B3SOIFDpdiblbGiven :1; unsigned B3SOIFDpvagGiven :1; unsigned B3SOIFDdeltaGiven :1; unsigned B3SOIFDwrGiven :1; unsigned B3SOIFDdwgGiven :1; unsigned B3SOIFDdwbGiven :1; unsigned B3SOIFDb0Given :1; unsigned B3SOIFDb1Given :1; unsigned B3SOIFDalpha0Given :1; unsigned B3SOIFDalpha1Given :1; unsigned B3SOIFDbeta0Given :1; /* CV model */ unsigned B3SOIFDcgslGiven :1; unsigned B3SOIFDcgdlGiven :1; unsigned B3SOIFDckappaGiven :1; unsigned B3SOIFDcfGiven :1; unsigned B3SOIFDclcGiven :1; unsigned B3SOIFDcleGiven :1; unsigned B3SOIFDdwcGiven :1; unsigned B3SOIFDdlcGiven :1; /* Added for binning - START2 */ /* Length Dependence */ unsigned B3SOIFDlnpeakGiven :1; unsigned B3SOIFDlnsubGiven :1; unsigned B3SOIFDlngateGiven :1; unsigned B3SOIFDlvth0Given :1; unsigned B3SOIFDlk1Given :1; unsigned B3SOIFDlk2Given :1; unsigned B3SOIFDlk3Given :1; unsigned B3SOIFDlk3bGiven :1; unsigned B3SOIFDlvbsaGiven :1; unsigned B3SOIFDldelpGiven :1; unsigned B3SOIFDlkb1Given :1; unsigned B3SOIFDlkb3Given :1; unsigned B3SOIFDldvbd0Given :1; unsigned B3SOIFDldvbd1Given :1; unsigned B3SOIFDlw0Given :1; unsigned B3SOIFDlnlxGiven :1; unsigned B3SOIFDldvt0Given :1; unsigned B3SOIFDldvt1Given :1; unsigned B3SOIFDldvt2Given :1; unsigned B3SOIFDldvt0wGiven :1; unsigned B3SOIFDldvt1wGiven :1; unsigned B3SOIFDldvt2wGiven :1; unsigned B3SOIFDlu0Given :1; unsigned B3SOIFDluaGiven :1; unsigned B3SOIFDlubGiven :1; unsigned B3SOIFDlucGiven :1; unsigned B3SOIFDlvsatGiven :1; unsigned B3SOIFDla0Given :1; unsigned B3SOIFDlagsGiven :1; unsigned B3SOIFDlb0Given :1; unsigned B3SOIFDlb1Given :1; unsigned B3SOIFDlketaGiven :1; unsigned B3SOIFDlabpGiven :1; unsigned B3SOIFDlmxcGiven :1; unsigned B3SOIFDladice0Given :1; unsigned B3SOIFDla1Given :1; unsigned B3SOIFDla2Given :1; unsigned B3SOIFDlrdswGiven :1; unsigned B3SOIFDlprwbGiven :1; unsigned B3SOIFDlprwgGiven :1; unsigned B3SOIFDlwrGiven :1; unsigned B3SOIFDlnfactorGiven :1; unsigned B3SOIFDldwgGiven :1; unsigned B3SOIFDldwbGiven :1; unsigned B3SOIFDlvoffGiven :1; unsigned B3SOIFDleta0Given :1; unsigned B3SOIFDletabGiven :1; unsigned B3SOIFDldsubGiven :1; unsigned B3SOIFDlcitGiven :1; unsigned B3SOIFDlcdscGiven :1; unsigned B3SOIFDlcdscbGiven :1; unsigned B3SOIFDlcdscdGiven :1; unsigned B3SOIFDlpclmGiven :1; unsigned B3SOIFDlpdibl1Given :1; unsigned B3SOIFDlpdibl2Given :1; unsigned B3SOIFDlpdiblbGiven :1; unsigned B3SOIFDldroutGiven :1; unsigned B3SOIFDlpvagGiven :1; unsigned B3SOIFDldeltaGiven :1; unsigned B3SOIFDlaiiGiven :1; unsigned B3SOIFDlbiiGiven :1; unsigned B3SOIFDlciiGiven :1; unsigned B3SOIFDldiiGiven :1; unsigned B3SOIFDlalpha0Given :1; unsigned B3SOIFDlalpha1Given :1; unsigned B3SOIFDlbeta0Given :1; unsigned B3SOIFDlagidlGiven :1; unsigned B3SOIFDlbgidlGiven :1; unsigned B3SOIFDlngidlGiven :1; unsigned B3SOIFDlntunGiven :1; unsigned B3SOIFDlndiodeGiven :1; unsigned B3SOIFDlisbjtGiven :1; unsigned B3SOIFDlisdifGiven :1; unsigned B3SOIFDlisrecGiven :1; unsigned B3SOIFDlistunGiven :1; unsigned B3SOIFDledlGiven :1; unsigned B3SOIFDlkbjt1Given :1; /* CV model */ unsigned B3SOIFDlvsdfbGiven :1; unsigned B3SOIFDlvsdthGiven :1; /* Width Dependence */ unsigned B3SOIFDwnpeakGiven :1; unsigned B3SOIFDwnsubGiven :1; unsigned B3SOIFDwngateGiven :1; unsigned B3SOIFDwvth0Given :1; unsigned B3SOIFDwk1Given :1; unsigned B3SOIFDwk2Given :1; unsigned B3SOIFDwk3Given :1; unsigned B3SOIFDwk3bGiven :1; unsigned B3SOIFDwvbsaGiven :1; unsigned B3SOIFDwdelpGiven :1; unsigned B3SOIFDwkb1Given :1; unsigned B3SOIFDwkb3Given :1; unsigned B3SOIFDwdvbd0Given :1; unsigned B3SOIFDwdvbd1Given :1; unsigned B3SOIFDww0Given :1; unsigned B3SOIFDwnlxGiven :1; unsigned B3SOIFDwdvt0Given :1; unsigned B3SOIFDwdvt1Given :1; unsigned B3SOIFDwdvt2Given :1; unsigned B3SOIFDwdvt0wGiven :1; unsigned B3SOIFDwdvt1wGiven :1; unsigned B3SOIFDwdvt2wGiven :1; unsigned B3SOIFDwu0Given :1; unsigned B3SOIFDwuaGiven :1; unsigned B3SOIFDwubGiven :1; unsigned B3SOIFDwucGiven :1; unsigned B3SOIFDwvsatGiven :1; unsigned B3SOIFDwa0Given :1; unsigned B3SOIFDwagsGiven :1; unsigned B3SOIFDwb0Given :1; unsigned B3SOIFDwb1Given :1; unsigned B3SOIFDwketaGiven :1; unsigned B3SOIFDwabpGiven :1; unsigned B3SOIFDwmxcGiven :1; unsigned B3SOIFDwadice0Given :1; unsigned B3SOIFDwa1Given :1; unsigned B3SOIFDwa2Given :1; unsigned B3SOIFDwrdswGiven :1; unsigned B3SOIFDwprwbGiven :1; unsigned B3SOIFDwprwgGiven :1; unsigned B3SOIFDwwrGiven :1; unsigned B3SOIFDwnfactorGiven :1; unsigned B3SOIFDwdwgGiven :1; unsigned B3SOIFDwdwbGiven :1; unsigned B3SOIFDwvoffGiven :1; unsigned B3SOIFDweta0Given :1; unsigned B3SOIFDwetabGiven :1; unsigned B3SOIFDwdsubGiven :1; unsigned B3SOIFDwcitGiven :1; unsigned B3SOIFDwcdscGiven :1; unsigned B3SOIFDwcdscbGiven :1; unsigned B3SOIFDwcdscdGiven :1; unsigned B3SOIFDwpclmGiven :1; unsigned B3SOIFDwpdibl1Given :1; unsigned B3SOIFDwpdibl2Given :1; unsigned B3SOIFDwpdiblbGiven :1; unsigned B3SOIFDwdroutGiven :1; unsigned B3SOIFDwpvagGiven :1; unsigned B3SOIFDwdeltaGiven :1; unsigned B3SOIFDwaiiGiven :1; unsigned B3SOIFDwbiiGiven :1; unsigned B3SOIFDwciiGiven :1; unsigned B3SOIFDwdiiGiven :1; unsigned B3SOIFDwalpha0Given :1; unsigned B3SOIFDwalpha1Given :1; unsigned B3SOIFDwbeta0Given :1; unsigned B3SOIFDwagidlGiven :1; unsigned B3SOIFDwbgidlGiven :1; unsigned B3SOIFDwngidlGiven :1; unsigned B3SOIFDwntunGiven :1; unsigned B3SOIFDwndiodeGiven :1; unsigned B3SOIFDwisbjtGiven :1; unsigned B3SOIFDwisdifGiven :1; unsigned B3SOIFDwisrecGiven :1; unsigned B3SOIFDwistunGiven :1; unsigned B3SOIFDwedlGiven :1; unsigned B3SOIFDwkbjt1Given :1; /* CV model */ unsigned B3SOIFDwvsdfbGiven :1; unsigned B3SOIFDwvsdthGiven :1; /* Cross-term Dependence */ unsigned B3SOIFDpnpeakGiven :1; unsigned B3SOIFDpnsubGiven :1; unsigned B3SOIFDpngateGiven :1; unsigned B3SOIFDpvth0Given :1; unsigned B3SOIFDpk1Given :1; unsigned B3SOIFDpk2Given :1; unsigned B3SOIFDpk3Given :1; unsigned B3SOIFDpk3bGiven :1; unsigned B3SOIFDpvbsaGiven :1; unsigned B3SOIFDpdelpGiven :1; unsigned B3SOIFDpkb1Given :1; unsigned B3SOIFDpkb3Given :1; unsigned B3SOIFDpdvbd0Given :1; unsigned B3SOIFDpdvbd1Given :1; unsigned B3SOIFDpw0Given :1; unsigned B3SOIFDpnlxGiven :1; unsigned B3SOIFDpdvt0Given :1; unsigned B3SOIFDpdvt1Given :1; unsigned B3SOIFDpdvt2Given :1; unsigned B3SOIFDpdvt0wGiven :1; unsigned B3SOIFDpdvt1wGiven :1; unsigned B3SOIFDpdvt2wGiven :1; unsigned B3SOIFDpu0Given :1; unsigned B3SOIFDpuaGiven :1; unsigned B3SOIFDpubGiven :1; unsigned B3SOIFDpucGiven :1; unsigned B3SOIFDpvsatGiven :1; unsigned B3SOIFDpa0Given :1; unsigned B3SOIFDpagsGiven :1; unsigned B3SOIFDpb0Given :1; unsigned B3SOIFDpb1Given :1; unsigned B3SOIFDpketaGiven :1; unsigned B3SOIFDpabpGiven :1; unsigned B3SOIFDpmxcGiven :1; unsigned B3SOIFDpadice0Given :1; unsigned B3SOIFDpa1Given :1; unsigned B3SOIFDpa2Given :1; unsigned B3SOIFDprdswGiven :1; unsigned B3SOIFDpprwbGiven :1; unsigned B3SOIFDpprwgGiven :1; unsigned B3SOIFDpwrGiven :1; unsigned B3SOIFDpnfactorGiven :1; unsigned B3SOIFDpdwgGiven :1; unsigned B3SOIFDpdwbGiven :1; unsigned B3SOIFDpvoffGiven :1; unsigned B3SOIFDpeta0Given :1; unsigned B3SOIFDpetabGiven :1; unsigned B3SOIFDpdsubGiven :1; unsigned B3SOIFDpcitGiven :1; unsigned B3SOIFDpcdscGiven :1; unsigned B3SOIFDpcdscbGiven :1; unsigned B3SOIFDpcdscdGiven :1; unsigned B3SOIFDppclmGiven :1; unsigned B3SOIFDppdibl1Given :1; unsigned B3SOIFDppdibl2Given :1; unsigned B3SOIFDppdiblbGiven :1; unsigned B3SOIFDpdroutGiven :1; unsigned B3SOIFDppvagGiven :1; unsigned B3SOIFDpdeltaGiven :1; unsigned B3SOIFDpaiiGiven :1; unsigned B3SOIFDpbiiGiven :1; unsigned B3SOIFDpciiGiven :1; unsigned B3SOIFDpdiiGiven :1; unsigned B3SOIFDpalpha0Given :1; unsigned B3SOIFDpalpha1Given :1; unsigned B3SOIFDpbeta0Given :1; unsigned B3SOIFDpagidlGiven :1; unsigned B3SOIFDpbgidlGiven :1; unsigned B3SOIFDpngidlGiven :1; unsigned B3SOIFDpntunGiven :1; unsigned B3SOIFDpndiodeGiven :1; unsigned B3SOIFDpisbjtGiven :1; unsigned B3SOIFDpisdifGiven :1; unsigned B3SOIFDpisrecGiven :1; unsigned B3SOIFDpistunGiven :1; unsigned B3SOIFDpedlGiven :1; unsigned B3SOIFDpkbjt1Given :1; /* CV model */ unsigned B3SOIFDpvsdfbGiven :1; unsigned B3SOIFDpvsdthGiven :1; /* Added for binning - END2 */ unsigned B3SOIFDuseFringeGiven :1; unsigned B3SOIFDtnomGiven :1; unsigned B3SOIFDcgsoGiven :1; unsigned B3SOIFDcgdoGiven :1; unsigned B3SOIFDcgeoGiven :1; unsigned B3SOIFDxpartGiven :1; unsigned B3SOIFDsheetResistanceGiven :1; unsigned B3SOIFDGatesidewallJctPotentialGiven :1; unsigned B3SOIFDbodyJctGateSideGradingCoeffGiven :1; unsigned B3SOIFDunitLengthGateSidewallJctCapGiven :1; unsigned B3SOIFDcsdeswGiven :1; unsigned B3SOIFDoxideTrapDensityAGiven :1; unsigned B3SOIFDoxideTrapDensityBGiven :1; unsigned B3SOIFDoxideTrapDensityCGiven :1; unsigned B3SOIFDemGiven :1; unsigned B3SOIFDefGiven :1; unsigned B3SOIFDafGiven :1; unsigned B3SOIFDkfGiven :1; unsigned B3SOIFDnoifGiven :1; unsigned B3SOIFDLintGiven :1; unsigned B3SOIFDLlGiven :1; unsigned B3SOIFDLlnGiven :1; unsigned B3SOIFDLwGiven :1; unsigned B3SOIFDLwnGiven :1; unsigned B3SOIFDLwlGiven :1; unsigned B3SOIFDLminGiven :1; unsigned B3SOIFDLmaxGiven :1; unsigned B3SOIFDWintGiven :1; unsigned B3SOIFDWlGiven :1; unsigned B3SOIFDWlnGiven :1; unsigned B3SOIFDWwGiven :1; unsigned B3SOIFDWwnGiven :1; unsigned B3SOIFDWwlGiven :1; unsigned B3SOIFDWminGiven :1; unsigned B3SOIFDWmaxGiven :1; } B3SOIFDmodel; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* device parameters */ #define B3SOIFD_W 1 #define B3SOIFD_L 2 #define B3SOIFD_M 22 #define B3SOIFD_AS 3 #define B3SOIFD_AD 4 #define B3SOIFD_PS 5 #define B3SOIFD_PD 6 #define B3SOIFD_NRS 7 #define B3SOIFD_NRD 8 #define B3SOIFD_OFF 9 #define B3SOIFD_IC_VBS 10 #define B3SOIFD_IC_VDS 11 #define B3SOIFD_IC_VGS 12 #define B3SOIFD_IC_VES 13 #define B3SOIFD_IC_VPS 14 #define B3SOIFD_BJTOFF 15 #define B3SOIFD_RTH0 16 #define B3SOIFD_CTH0 17 #define B3SOIFD_NRB 18 #define B3SOIFD_IC 19 #define B3SOIFD_NQSMOD 20 #define B3SOIFD_DEBUG 21 /* model parameters */ #define B3SOIFD_MOD_CAPMOD 101 #define B3SOIFD_MOD_NQSMOD 102 #define B3SOIFD_MOD_MOBMOD 103 #define B3SOIFD_MOD_NOIMOD 104 #define B3SOIFD_MOD_SHMOD 105 #define B3SOIFD_MOD_DDMOD 106 #define B3SOIFD_MOD_TOX 107 #define B3SOIFD_MOD_CDSC 108 #define B3SOIFD_MOD_CDSCB 109 #define B3SOIFD_MOD_CIT 110 #define B3SOIFD_MOD_NFACTOR 111 #define B3SOIFD_MOD_XJ 112 #define B3SOIFD_MOD_VSAT 113 #define B3SOIFD_MOD_AT 114 #define B3SOIFD_MOD_A0 115 #define B3SOIFD_MOD_A1 116 #define B3SOIFD_MOD_A2 117 #define B3SOIFD_MOD_KETA 118 #define B3SOIFD_MOD_NSUB 119 #define B3SOIFD_MOD_NPEAK 120 #define B3SOIFD_MOD_NGATE 121 #define B3SOIFD_MOD_GAMMA1 122 #define B3SOIFD_MOD_GAMMA2 123 #define B3SOIFD_MOD_VBX 124 #define B3SOIFD_MOD_BINUNIT 125 #define B3SOIFD_MOD_VBM 126 #define B3SOIFD_MOD_XT 127 #define B3SOIFD_MOD_K1 129 #define B3SOIFD_MOD_KT1 130 #define B3SOIFD_MOD_KT1L 131 #define B3SOIFD_MOD_K2 132 #define B3SOIFD_MOD_KT2 133 #define B3SOIFD_MOD_K3 134 #define B3SOIFD_MOD_K3B 135 #define B3SOIFD_MOD_W0 136 #define B3SOIFD_MOD_NLX 137 #define B3SOIFD_MOD_DVT0 138 #define B3SOIFD_MOD_DVT1 139 #define B3SOIFD_MOD_DVT2 140 #define B3SOIFD_MOD_DVT0W 141 #define B3SOIFD_MOD_DVT1W 142 #define B3SOIFD_MOD_DVT2W 143 #define B3SOIFD_MOD_DROUT 144 #define B3SOIFD_MOD_DSUB 145 #define B3SOIFD_MOD_VTH0 146 #define B3SOIFD_MOD_UA 147 #define B3SOIFD_MOD_UA1 148 #define B3SOIFD_MOD_UB 149 #define B3SOIFD_MOD_UB1 150 #define B3SOIFD_MOD_UC 151 #define B3SOIFD_MOD_UC1 152 #define B3SOIFD_MOD_U0 153 #define B3SOIFD_MOD_UTE 154 #define B3SOIFD_MOD_VOFF 155 #define B3SOIFD_MOD_DELTA 156 #define B3SOIFD_MOD_RDSW 157 #define B3SOIFD_MOD_PRT 158 #define B3SOIFD_MOD_LDD 159 #define B3SOIFD_MOD_ETA 160 #define B3SOIFD_MOD_ETA0 161 #define B3SOIFD_MOD_ETAB 162 #define B3SOIFD_MOD_PCLM 163 #define B3SOIFD_MOD_PDIBL1 164 #define B3SOIFD_MOD_PDIBL2 165 #define B3SOIFD_MOD_PSCBE1 166 #define B3SOIFD_MOD_PSCBE2 167 #define B3SOIFD_MOD_PVAG 168 #define B3SOIFD_MOD_WR 169 #define B3SOIFD_MOD_DWG 170 #define B3SOIFD_MOD_DWB 171 #define B3SOIFD_MOD_B0 172 #define B3SOIFD_MOD_B1 173 #define B3SOIFD_MOD_ALPHA0 174 #define B3SOIFD_MOD_BETA0 175 #define B3SOIFD_MOD_PDIBLB 178 #define B3SOIFD_MOD_PRWG 179 #define B3SOIFD_MOD_PRWB 180 #define B3SOIFD_MOD_CDSCD 181 #define B3SOIFD_MOD_AGS 182 #define B3SOIFD_MOD_FRINGE 184 #define B3SOIFD_MOD_CGSL 186 #define B3SOIFD_MOD_CGDL 187 #define B3SOIFD_MOD_CKAPPA 188 #define B3SOIFD_MOD_CF 189 #define B3SOIFD_MOD_CLC 190 #define B3SOIFD_MOD_CLE 191 #define B3SOIFD_MOD_PARAMCHK 192 #define B3SOIFD_MOD_VERSION 193 #define B3SOIFD_MOD_TBOX 195 #define B3SOIFD_MOD_TSI 196 #define B3SOIFD_MOD_KB1 197 #define B3SOIFD_MOD_KB3 198 #define B3SOIFD_MOD_DVBD0 199 #define B3SOIFD_MOD_DVBD1 200 #define B3SOIFD_MOD_DELP 201 #define B3SOIFD_MOD_VBSA 202 #define B3SOIFD_MOD_RBODY 204 #define B3SOIFD_MOD_ADICE0 205 #define B3SOIFD_MOD_ABP 206 #define B3SOIFD_MOD_MXC 207 #define B3SOIFD_MOD_RTH0 208 #define B3SOIFD_MOD_CTH0 209 #define B3SOIFD_MOD_AII 210 #define B3SOIFD_MOD_BII 211 #define B3SOIFD_MOD_CII 212 #define B3SOIFD_MOD_DII 213 #define B3SOIFD_MOD_ALPHA1 214 #define B3SOIFD_MOD_NGIDL 215 #define B3SOIFD_MOD_AGIDL 216 #define B3SOIFD_MOD_BGIDL 217 #define B3SOIFD_MOD_NDIODE 218 #define B3SOIFD_MOD_LDIOF 219 #define B3SOIFD_MOD_LDIOR 220 #define B3SOIFD_MOD_NTUN 221 #define B3SOIFD_MOD_ISBJT 222 #define B3SOIFD_MOD_ISDIF 223 #define B3SOIFD_MOD_ISREC 224 #define B3SOIFD_MOD_ISTUN 225 #define B3SOIFD_MOD_XBJT 226 #define B3SOIFD_MOD_XDIF 227 #define B3SOIFD_MOD_XREC 228 #define B3SOIFD_MOD_XTUN 229 #define B3SOIFD_MOD_EDL 230 #define B3SOIFD_MOD_KBJT1 231 #define B3SOIFD_MOD_TT 232 #define B3SOIFD_MOD_VSDTH 233 #define B3SOIFD_MOD_VSDFB 234 #define B3SOIFD_MOD_ASD 235 #define B3SOIFD_MOD_CSDMIN 236 #define B3SOIFD_MOD_RBSH 237 /* Added for binning - START3 */ /* Length dependence */ #define B3SOIFD_MOD_LNPEAK 301 #define B3SOIFD_MOD_LNSUB 302 #define B3SOIFD_MOD_LNGATE 303 #define B3SOIFD_MOD_LVTH0 304 #define B3SOIFD_MOD_LK1 305 #define B3SOIFD_MOD_LK2 306 #define B3SOIFD_MOD_LK3 307 #define B3SOIFD_MOD_LK3B 308 #define B3SOIFD_MOD_LVBSA 309 #define B3SOIFD_MOD_LDELP 310 #define B3SOIFD_MOD_LKB1 311 #define B3SOIFD_MOD_LKB3 312 #define B3SOIFD_MOD_LDVBD0 313 #define B3SOIFD_MOD_LDVBD1 314 #define B3SOIFD_MOD_LW0 315 #define B3SOIFD_MOD_LNLX 316 #define B3SOIFD_MOD_LDVT0 317 #define B3SOIFD_MOD_LDVT1 318 #define B3SOIFD_MOD_LDVT2 319 #define B3SOIFD_MOD_LDVT0W 320 #define B3SOIFD_MOD_LDVT1W 321 #define B3SOIFD_MOD_LDVT2W 322 #define B3SOIFD_MOD_LU0 323 #define B3SOIFD_MOD_LUA 324 #define B3SOIFD_MOD_LUB 325 #define B3SOIFD_MOD_LUC 326 #define B3SOIFD_MOD_LVSAT 327 #define B3SOIFD_MOD_LA0 328 #define B3SOIFD_MOD_LAGS 329 #define B3SOIFD_MOD_LB0 330 #define B3SOIFD_MOD_LB1 331 #define B3SOIFD_MOD_LKETA 332 #define B3SOIFD_MOD_LABP 333 #define B3SOIFD_MOD_LMXC 334 #define B3SOIFD_MOD_LADICE0 335 #define B3SOIFD_MOD_LA1 336 #define B3SOIFD_MOD_LA2 337 #define B3SOIFD_MOD_LRDSW 338 #define B3SOIFD_MOD_LPRWB 339 #define B3SOIFD_MOD_LPRWG 340 #define B3SOIFD_MOD_LWR 341 #define B3SOIFD_MOD_LNFACTOR 342 #define B3SOIFD_MOD_LDWG 343 #define B3SOIFD_MOD_LDWB 344 #define B3SOIFD_MOD_LVOFF 345 #define B3SOIFD_MOD_LETA0 346 #define B3SOIFD_MOD_LETAB 347 #define B3SOIFD_MOD_LDSUB 348 #define B3SOIFD_MOD_LCIT 349 #define B3SOIFD_MOD_LCDSC 350 #define B3SOIFD_MOD_LCDSCB 351 #define B3SOIFD_MOD_LCDSCD 352 #define B3SOIFD_MOD_LPCLM 353 #define B3SOIFD_MOD_LPDIBL1 354 #define B3SOIFD_MOD_LPDIBL2 355 #define B3SOIFD_MOD_LPDIBLB 356 #define B3SOIFD_MOD_LDROUT 357 #define B3SOIFD_MOD_LPVAG 358 #define B3SOIFD_MOD_LDELTA 359 #define B3SOIFD_MOD_LAII 360 #define B3SOIFD_MOD_LBII 361 #define B3SOIFD_MOD_LCII 362 #define B3SOIFD_MOD_LDII 363 #define B3SOIFD_MOD_LALPHA0 364 #define B3SOIFD_MOD_LALPHA1 365 #define B3SOIFD_MOD_LBETA0 366 #define B3SOIFD_MOD_LAGIDL 367 #define B3SOIFD_MOD_LBGIDL 368 #define B3SOIFD_MOD_LNGIDL 369 #define B3SOIFD_MOD_LNTUN 370 #define B3SOIFD_MOD_LNDIODE 371 #define B3SOIFD_MOD_LISBJT 372 #define B3SOIFD_MOD_LISDIF 373 #define B3SOIFD_MOD_LISREC 374 #define B3SOIFD_MOD_LISTUN 375 #define B3SOIFD_MOD_LEDL 376 #define B3SOIFD_MOD_LKBJT1 377 #define B3SOIFD_MOD_LVSDFB 378 #define B3SOIFD_MOD_LVSDTH 379 /* Width dependence */ #define B3SOIFD_MOD_WNPEAK 401 #define B3SOIFD_MOD_WNSUB 402 #define B3SOIFD_MOD_WNGATE 403 #define B3SOIFD_MOD_WVTH0 404 #define B3SOIFD_MOD_WK1 405 #define B3SOIFD_MOD_WK2 406 #define B3SOIFD_MOD_WK3 407 #define B3SOIFD_MOD_WK3B 408 #define B3SOIFD_MOD_WVBSA 409 #define B3SOIFD_MOD_WDELP 410 #define B3SOIFD_MOD_WKB1 411 #define B3SOIFD_MOD_WKB3 412 #define B3SOIFD_MOD_WDVBD0 413 #define B3SOIFD_MOD_WDVBD1 414 #define B3SOIFD_MOD_WW0 415 #define B3SOIFD_MOD_WNLX 416 #define B3SOIFD_MOD_WDVT0 417 #define B3SOIFD_MOD_WDVT1 418 #define B3SOIFD_MOD_WDVT2 419 #define B3SOIFD_MOD_WDVT0W 420 #define B3SOIFD_MOD_WDVT1W 421 #define B3SOIFD_MOD_WDVT2W 422 #define B3SOIFD_MOD_WU0 423 #define B3SOIFD_MOD_WUA 424 #define B3SOIFD_MOD_WUB 425 #define B3SOIFD_MOD_WUC 426 #define B3SOIFD_MOD_WVSAT 427 #define B3SOIFD_MOD_WA0 428 #define B3SOIFD_MOD_WAGS 429 #define B3SOIFD_MOD_WB0 430 #define B3SOIFD_MOD_WB1 431 #define B3SOIFD_MOD_WKETA 432 #define B3SOIFD_MOD_WABP 433 #define B3SOIFD_MOD_WMXC 434 #define B3SOIFD_MOD_WADICE0 435 #define B3SOIFD_MOD_WA1 436 #define B3SOIFD_MOD_WA2 437 #define B3SOIFD_MOD_WRDSW 438 #define B3SOIFD_MOD_WPRWB 439 #define B3SOIFD_MOD_WPRWG 440 #define B3SOIFD_MOD_WWR 441 #define B3SOIFD_MOD_WNFACTOR 442 #define B3SOIFD_MOD_WDWG 443 #define B3SOIFD_MOD_WDWB 444 #define B3SOIFD_MOD_WVOFF 445 #define B3SOIFD_MOD_WETA0 446 #define B3SOIFD_MOD_WETAB 447 #define B3SOIFD_MOD_WDSUB 448 #define B3SOIFD_MOD_WCIT 449 #define B3SOIFD_MOD_WCDSC 450 #define B3SOIFD_MOD_WCDSCB 451 #define B3SOIFD_MOD_WCDSCD 452 #define B3SOIFD_MOD_WPCLM 453 #define B3SOIFD_MOD_WPDIBL1 454 #define B3SOIFD_MOD_WPDIBL2 455 #define B3SOIFD_MOD_WPDIBLB 456 #define B3SOIFD_MOD_WDROUT 457 #define B3SOIFD_MOD_WPVAG 458 #define B3SOIFD_MOD_WDELTA 459 #define B3SOIFD_MOD_WAII 460 #define B3SOIFD_MOD_WBII 461 #define B3SOIFD_MOD_WCII 462 #define B3SOIFD_MOD_WDII 463 #define B3SOIFD_MOD_WALPHA0 464 #define B3SOIFD_MOD_WALPHA1 465 #define B3SOIFD_MOD_WBETA0 466 #define B3SOIFD_MOD_WAGIDL 467 #define B3SOIFD_MOD_WBGIDL 468 #define B3SOIFD_MOD_WNGIDL 469 #define B3SOIFD_MOD_WNTUN 470 #define B3SOIFD_MOD_WNDIODE 471 #define B3SOIFD_MOD_WISBJT 472 #define B3SOIFD_MOD_WISDIF 473 #define B3SOIFD_MOD_WISREC 474 #define B3SOIFD_MOD_WISTUN 475 #define B3SOIFD_MOD_WEDL 476 #define B3SOIFD_MOD_WKBJT1 477 #define B3SOIFD_MOD_WVSDFB 478 #define B3SOIFD_MOD_WVSDTH 479 /* Cross-term dependence */ #define B3SOIFD_MOD_PNPEAK 501 #define B3SOIFD_MOD_PNSUB 502 #define B3SOIFD_MOD_PNGATE 503 #define B3SOIFD_MOD_PVTH0 504 #define B3SOIFD_MOD_PK1 505 #define B3SOIFD_MOD_PK2 506 #define B3SOIFD_MOD_PK3 507 #define B3SOIFD_MOD_PK3B 508 #define B3SOIFD_MOD_PVBSA 509 #define B3SOIFD_MOD_PDELP 510 #define B3SOIFD_MOD_PKB1 511 #define B3SOIFD_MOD_PKB3 512 #define B3SOIFD_MOD_PDVBD0 513 #define B3SOIFD_MOD_PDVBD1 514 #define B3SOIFD_MOD_PW0 515 #define B3SOIFD_MOD_PNLX 516 #define B3SOIFD_MOD_PDVT0 517 #define B3SOIFD_MOD_PDVT1 518 #define B3SOIFD_MOD_PDVT2 519 #define B3SOIFD_MOD_PDVT0W 520 #define B3SOIFD_MOD_PDVT1W 521 #define B3SOIFD_MOD_PDVT2W 522 #define B3SOIFD_MOD_PU0 523 #define B3SOIFD_MOD_PUA 524 #define B3SOIFD_MOD_PUB 525 #define B3SOIFD_MOD_PUC 526 #define B3SOIFD_MOD_PVSAT 527 #define B3SOIFD_MOD_PA0 528 #define B3SOIFD_MOD_PAGS 529 #define B3SOIFD_MOD_PB0 530 #define B3SOIFD_MOD_PB1 531 #define B3SOIFD_MOD_PKETA 532 #define B3SOIFD_MOD_PABP 533 #define B3SOIFD_MOD_PMXC 534 #define B3SOIFD_MOD_PADICE0 535 #define B3SOIFD_MOD_PA1 536 #define B3SOIFD_MOD_PA2 537 #define B3SOIFD_MOD_PRDSW 538 #define B3SOIFD_MOD_PPRWB 539 #define B3SOIFD_MOD_PPRWG 540 #define B3SOIFD_MOD_PWR 541 #define B3SOIFD_MOD_PNFACTOR 542 #define B3SOIFD_MOD_PDWG 543 #define B3SOIFD_MOD_PDWB 544 #define B3SOIFD_MOD_PVOFF 545 #define B3SOIFD_MOD_PETA0 546 #define B3SOIFD_MOD_PETAB 547 #define B3SOIFD_MOD_PDSUB 548 #define B3SOIFD_MOD_PCIT 549 #define B3SOIFD_MOD_PCDSC 550 #define B3SOIFD_MOD_PCDSCB 551 #define B3SOIFD_MOD_PCDSCD 552 #define B3SOIFD_MOD_PPCLM 553 #define B3SOIFD_MOD_PPDIBL1 554 #define B3SOIFD_MOD_PPDIBL2 555 #define B3SOIFD_MOD_PPDIBLB 556 #define B3SOIFD_MOD_PDROUT 557 #define B3SOIFD_MOD_PPVAG 558 #define B3SOIFD_MOD_PDELTA 559 #define B3SOIFD_MOD_PAII 560 #define B3SOIFD_MOD_PBII 561 #define B3SOIFD_MOD_PCII 562 #define B3SOIFD_MOD_PDII 563 #define B3SOIFD_MOD_PALPHA0 564 #define B3SOIFD_MOD_PALPHA1 565 #define B3SOIFD_MOD_PBETA0 566 #define B3SOIFD_MOD_PAGIDL 567 #define B3SOIFD_MOD_PBGIDL 568 #define B3SOIFD_MOD_PNGIDL 569 #define B3SOIFD_MOD_PNTUN 570 #define B3SOIFD_MOD_PNDIODE 571 #define B3SOIFD_MOD_PISBJT 572 #define B3SOIFD_MOD_PISDIF 573 #define B3SOIFD_MOD_PISREC 574 #define B3SOIFD_MOD_PISTUN 575 #define B3SOIFD_MOD_PEDL 576 #define B3SOIFD_MOD_PKBJT1 577 #define B3SOIFD_MOD_PVSDFB 578 #define B3SOIFD_MOD_PVSDTH 579 /* Added for binning - END3 */ #define B3SOIFD_MOD_TNOM 701 #define B3SOIFD_MOD_CGSO 702 #define B3SOIFD_MOD_CGDO 703 #define B3SOIFD_MOD_CGEO 704 #define B3SOIFD_MOD_XPART 705 #define B3SOIFD_MOD_RSH 706 #define B3SOIFD_MOD_NMOS 814 #define B3SOIFD_MOD_PMOS 815 #define B3SOIFD_MOD_NOIA 816 #define B3SOIFD_MOD_NOIB 817 #define B3SOIFD_MOD_NOIC 818 #define B3SOIFD_MOD_LINT 819 #define B3SOIFD_MOD_LL 820 #define B3SOIFD_MOD_LLN 821 #define B3SOIFD_MOD_LW 822 #define B3SOIFD_MOD_LWN 823 #define B3SOIFD_MOD_LWL 824 #define B3SOIFD_MOD_WINT 827 #define B3SOIFD_MOD_WL 828 #define B3SOIFD_MOD_WLN 829 #define B3SOIFD_MOD_WW 830 #define B3SOIFD_MOD_WWN 831 #define B3SOIFD_MOD_WWL 832 #define B3SOIFD_MOD_DWC 835 #define B3SOIFD_MOD_DLC 836 #define B3SOIFD_MOD_EM 837 #define B3SOIFD_MOD_EF 838 #define B3SOIFD_MOD_AF 839 #define B3SOIFD_MOD_KF 840 #define B3SOIFD_MOD_NOIF 841 #define B3SOIFD_MOD_PBSWG 843 #define B3SOIFD_MOD_MJSWG 844 #define B3SOIFD_MOD_CJSWG 845 #define B3SOIFD_MOD_CSDESW 846 /* device questions */ #define B3SOIFD_DNODE 901 #define B3SOIFD_GNODE 902 #define B3SOIFD_SNODE 903 #define B3SOIFD_BNODE 904 #define B3SOIFD_ENODE 905 #define B3SOIFD_DNODEPRIME 906 #define B3SOIFD_SNODEPRIME 907 #define B3SOIFD_VBD 908 #define B3SOIFD_VBS 909 #define B3SOIFD_VGS 910 #define B3SOIFD_VES 911 #define B3SOIFD_VDS 912 #define B3SOIFD_CD 913 #define B3SOIFD_CBS 914 #define B3SOIFD_CBD 915 #define B3SOIFD_GM 916 #define B3SOIFD_GDS 917 #define B3SOIFD_GMBS 918 #define B3SOIFD_GBD 919 #define B3SOIFD_GBS 920 #define B3SOIFD_QB 921 #define B3SOIFD_CQB 922 #define B3SOIFD_QG 923 #define B3SOIFD_CQG 924 #define B3SOIFD_QD 925 #define B3SOIFD_CQD 926 #define B3SOIFD_CGG 927 #define B3SOIFD_CGD 928 #define B3SOIFD_CGS 929 #define B3SOIFD_CBG 930 #define B3SOIFD_CAPBD 931 #define B3SOIFD_CQBD 932 #define B3SOIFD_CAPBS 933 #define B3SOIFD_CQBS 934 #define B3SOIFD_CDG 935 #define B3SOIFD_CDD 936 #define B3SOIFD_CDS 937 #define B3SOIFD_VON 938 #define B3SOIFD_VDSAT 939 #define B3SOIFD_QBS 940 #define B3SOIFD_QBD 941 #define B3SOIFD_SOURCECONDUCT 942 #define B3SOIFD_DRAINCONDUCT 943 #define B3SOIFD_CBDB 944 #define B3SOIFD_CBSB 945 #define B3SOIFD_GMID 946 #include "b3soifdext.h" extern void B3SOIFDevaluate(double,double,double,B3SOIFDinstance*,B3SOIFDmodel*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int B3SOIFDdebug(B3SOIFDmodel*, B3SOIFDinstance*, CKTcircuit*, int); extern int B3SOIFDcheckModel(B3SOIFDmodel*, B3SOIFDinstance*, CKTcircuit*); #endif /*B3SOIFD*/ ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c0000644000265600020320000010536012264261473023025 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soifdtemp.c 98/5/01 Modified by Pin Su, Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ /* Lmin, Lmax, Wmin, Wmax */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 /* Kb / q where q = 1.60219e-19 */ #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 /* ARGSUSED */ int B3SOIFDtemp(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model = (B3SOIFDmodel*) inModel; B3SOIFDinstance *here; struct b3soifdSizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, Eg, Eg0, ni, T0, T1, T2, T3, T4, T5, T6, Ldrn, Wdrn; double Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0, Tnom; double SDphi, SDgamma; int Size_Not_Found; /* loop through all the B3SOIFD device models */ for (; model != NULL; model = model->B3SOIFDnextModel) { Temp = ckt->CKTtemp; if (model->B3SOIFDGatesidewallJctPotential < 0.1) model->B3SOIFDGatesidewallJctPotential = 0.1; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->B3SOIFDtnom; TRatio = Temp / Tnom; model->B3SOIFDvcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->B3SOIFDfactor1 = sqrt(EPSSI / EPSOX * model->B3SOIFDtox); Vtm0 = KboQ * Tnom; Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); model->B3SOIFDeg0 = Eg0; model->B3SOIFDvtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); /* ni is in cm^-3 */ ni = 1.45e10 * (Temp / 300.15) * sqrt(Temp / 300.15) * exp(21.5565981 - Eg / (2.0 * model->B3SOIFDvtm)); /* loop through all the instances of the model */ /* MCJ: Length and Width not initialized */ for (here = model->B3SOIFDinstances; here != NULL; here = here->B3SOIFDnextInstance) { here->B3SOIFDrbodyext = here->B3SOIFDbodySquares * model->B3SOIFDrbsh; pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->B3SOIFDl == pSizeDependParamKnot->Length) && (here->B3SOIFDw == pSizeDependParamKnot->Width) && (here->B3SOIFDrth0 == pSizeDependParamKnot->Rth0) && (here->B3SOIFDcth0 == pSizeDependParamKnot->Cth0)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } if (Size_Not_Found) { pParam = TMALLOC(struct b3soifdSizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; Ldrn = here->B3SOIFDl; Wdrn = here->B3SOIFDw; pParam->Length = Ldrn; pParam->Width = Wdrn; pParam->Rth0 = here->B3SOIFDrth0; pParam->Cth0 = here->B3SOIFDcth0; T0 = pow(Ldrn, model->B3SOIFDLln); T1 = pow(Wdrn, model->B3SOIFDLwn); tmp1 = model->B3SOIFDLl / T0 + model->B3SOIFDLw / T1 + model->B3SOIFDLwl / (T0 * T1); pParam->B3SOIFDdl = model->B3SOIFDLint + tmp1; pParam->B3SOIFDdlc = model->B3SOIFDdlc + tmp1; T2 = pow(Ldrn, model->B3SOIFDWln); T3 = pow(Wdrn, model->B3SOIFDWwn); tmp2 = model->B3SOIFDWl / T2 + model->B3SOIFDWw / T3 + model->B3SOIFDWwl / (T2 * T3); pParam->B3SOIFDdw = model->B3SOIFDWint + tmp2; pParam->B3SOIFDdwc = model->B3SOIFDdwc + tmp2; pParam->B3SOIFDleff = here->B3SOIFDl - 2.0 * pParam->B3SOIFDdl; if (pParam->B3SOIFDleff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIFDmodName; namarray[1] = here->B3SOIFDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIFD: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->B3SOIFDweff = here->B3SOIFDw - 2.0 * pParam->B3SOIFDdw; if (pParam->B3SOIFDweff <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIFDmodName; namarray[1] = here->B3SOIFDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIFD: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->B3SOIFDleffCV = here->B3SOIFDl - 2.0 * pParam->B3SOIFDdlc; if (pParam->B3SOIFDleffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIFDmodName; namarray[1] = here->B3SOIFDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIFD: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->B3SOIFDweffCV = here->B3SOIFDw - 2.0 * pParam->B3SOIFDdwc; if (pParam->B3SOIFDweffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->B3SOIFDmodName; namarray[1] = here->B3SOIFDname; SPfrontEnd->IFerror (ERR_FATAL, "B3SOIFD: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } /* Not binned - START */ pParam->B3SOIFDat = model->B3SOIFDat; pParam->B3SOIFDgamma1 = model->B3SOIFDgamma1; pParam->B3SOIFDgamma2 = model->B3SOIFDgamma2; pParam->B3SOIFDvbx = model->B3SOIFDvbx; pParam->B3SOIFDvbm = model->B3SOIFDvbm; pParam->B3SOIFDxt = model->B3SOIFDxt; pParam->B3SOIFDkt1 = model->B3SOIFDkt1; pParam->B3SOIFDkt1l = model->B3SOIFDkt1l; pParam->B3SOIFDkt2 = model->B3SOIFDkt2; pParam->B3SOIFDua1 = model->B3SOIFDua1; pParam->B3SOIFDub1 = model->B3SOIFDub1; pParam->B3SOIFDuc1 = model->B3SOIFDuc1; pParam->B3SOIFDute = model->B3SOIFDute; pParam->B3SOIFDprt = model->B3SOIFDprt; /* Not binned - END */ /* CV model */ pParam->B3SOIFDcgsl = model->B3SOIFDcgsl; pParam->B3SOIFDcgdl = model->B3SOIFDcgdl; pParam->B3SOIFDckappa = model->B3SOIFDckappa; pParam->B3SOIFDcf = model->B3SOIFDcf; pParam->B3SOIFDclc = model->B3SOIFDclc; pParam->B3SOIFDcle = model->B3SOIFDcle; pParam->B3SOIFDabulkCVfactor = pow(1.0+(pParam->B3SOIFDclc / pParam->B3SOIFDleff), pParam->B3SOIFDcle); /* Added for binning - START */ if (model->B3SOIFDbinUnit == 1) { Inv_L = 1.0e-6 / pParam->B3SOIFDleff; Inv_W = 1.0e-6 / pParam->B3SOIFDweff; Inv_LW = 1.0e-12 / (pParam->B3SOIFDleff * pParam->B3SOIFDweff); } else { Inv_L = 1.0 / pParam->B3SOIFDleff; Inv_W = 1.0 / pParam->B3SOIFDweff; Inv_LW = 1.0 / (pParam->B3SOIFDleff * pParam->B3SOIFDweff); } pParam->B3SOIFDnpeak = model->B3SOIFDnpeak + model->B3SOIFDlnpeak * Inv_L + model->B3SOIFDwnpeak * Inv_W + model->B3SOIFDpnpeak * Inv_LW; pParam->B3SOIFDnsub = model->B3SOIFDnsub + model->B3SOIFDlnsub * Inv_L + model->B3SOIFDwnsub * Inv_W + model->B3SOIFDpnsub * Inv_LW; pParam->B3SOIFDngate = model->B3SOIFDngate + model->B3SOIFDlngate * Inv_L + model->B3SOIFDwngate * Inv_W + model->B3SOIFDpngate * Inv_LW; pParam->B3SOIFDvth0 = model->B3SOIFDvth0 + model->B3SOIFDlvth0 * Inv_L + model->B3SOIFDwvth0 * Inv_W + model->B3SOIFDpvth0 * Inv_LW; pParam->B3SOIFDk1 = model->B3SOIFDk1 + model->B3SOIFDlk1 * Inv_L + model->B3SOIFDwk1 * Inv_W + model->B3SOIFDpk1 * Inv_LW; pParam->B3SOIFDk2 = model->B3SOIFDk2 + model->B3SOIFDlk2 * Inv_L + model->B3SOIFDwk2 * Inv_W + model->B3SOIFDpk2 * Inv_LW; pParam->B3SOIFDk3 = model->B3SOIFDk3 + model->B3SOIFDlk3 * Inv_L + model->B3SOIFDwk3 * Inv_W + model->B3SOIFDpk3 * Inv_LW; pParam->B3SOIFDk3b = model->B3SOIFDk3b + model->B3SOIFDlk3b * Inv_L + model->B3SOIFDwk3b * Inv_W + model->B3SOIFDpk3b * Inv_LW; pParam->B3SOIFDvbsa = model->B3SOIFDvbsa + model->B3SOIFDlvbsa * Inv_L + model->B3SOIFDwvbsa * Inv_W + model->B3SOIFDpvbsa * Inv_LW; pParam->B3SOIFDdelp = model->B3SOIFDdelp + model->B3SOIFDldelp * Inv_L + model->B3SOIFDwdelp * Inv_W + model->B3SOIFDpdelp * Inv_LW; pParam->B3SOIFDkb1 = model->B3SOIFDkb1 + model->B3SOIFDlkb1 * Inv_L + model->B3SOIFDwkb1 * Inv_W + model->B3SOIFDpkb1 * Inv_LW; pParam->B3SOIFDkb3 = model->B3SOIFDkb3 + model->B3SOIFDlkb3 * Inv_L + model->B3SOIFDwkb3 * Inv_W + model->B3SOIFDpkb3 * Inv_LW; pParam->B3SOIFDdvbd0 = model->B3SOIFDdvbd0 + model->B3SOIFDldvbd0 * Inv_L + model->B3SOIFDwdvbd0 * Inv_W + model->B3SOIFDpdvbd0 * Inv_LW; pParam->B3SOIFDdvbd1 = model->B3SOIFDdvbd1 + model->B3SOIFDldvbd1 * Inv_L + model->B3SOIFDwdvbd1 * Inv_W + model->B3SOIFDpdvbd1 * Inv_LW; pParam->B3SOIFDw0 = model->B3SOIFDw0 + model->B3SOIFDlw0 * Inv_L + model->B3SOIFDww0 * Inv_W + model->B3SOIFDpw0 * Inv_LW; pParam->B3SOIFDnlx = model->B3SOIFDnlx + model->B3SOIFDlnlx * Inv_L + model->B3SOIFDwnlx * Inv_W + model->B3SOIFDpnlx * Inv_LW; pParam->B3SOIFDdvt0 = model->B3SOIFDdvt0 + model->B3SOIFDldvt0 * Inv_L + model->B3SOIFDwdvt0 * Inv_W + model->B3SOIFDpdvt0 * Inv_LW; pParam->B3SOIFDdvt1 = model->B3SOIFDdvt1 + model->B3SOIFDldvt1 * Inv_L + model->B3SOIFDwdvt1 * Inv_W + model->B3SOIFDpdvt1 * Inv_LW; pParam->B3SOIFDdvt2 = model->B3SOIFDdvt2 + model->B3SOIFDldvt2 * Inv_L + model->B3SOIFDwdvt2 * Inv_W + model->B3SOIFDpdvt2 * Inv_LW; pParam->B3SOIFDdvt0w = model->B3SOIFDdvt0w + model->B3SOIFDldvt0w * Inv_L + model->B3SOIFDwdvt0w * Inv_W + model->B3SOIFDpdvt0w * Inv_LW; pParam->B3SOIFDdvt1w = model->B3SOIFDdvt1w + model->B3SOIFDldvt1w * Inv_L + model->B3SOIFDwdvt1w * Inv_W + model->B3SOIFDpdvt1w * Inv_LW; pParam->B3SOIFDdvt2w = model->B3SOIFDdvt2w + model->B3SOIFDldvt2w * Inv_L + model->B3SOIFDwdvt2w * Inv_W + model->B3SOIFDpdvt2w * Inv_LW; pParam->B3SOIFDu0 = model->B3SOIFDu0 + model->B3SOIFDlu0 * Inv_L + model->B3SOIFDwu0 * Inv_W + model->B3SOIFDpu0 * Inv_LW; pParam->B3SOIFDua = model->B3SOIFDua + model->B3SOIFDlua * Inv_L + model->B3SOIFDwua * Inv_W + model->B3SOIFDpua * Inv_LW; pParam->B3SOIFDub = model->B3SOIFDub + model->B3SOIFDlub * Inv_L + model->B3SOIFDwub * Inv_W + model->B3SOIFDpub * Inv_LW; pParam->B3SOIFDuc = model->B3SOIFDuc + model->B3SOIFDluc * Inv_L + model->B3SOIFDwuc * Inv_W + model->B3SOIFDpuc * Inv_LW; pParam->B3SOIFDvsat = model->B3SOIFDvsat + model->B3SOIFDlvsat * Inv_L + model->B3SOIFDwvsat * Inv_W + model->B3SOIFDpvsat * Inv_LW; pParam->B3SOIFDa0 = model->B3SOIFDa0 + model->B3SOIFDla0 * Inv_L + model->B3SOIFDwa0 * Inv_W + model->B3SOIFDpa0 * Inv_LW; pParam->B3SOIFDags = model->B3SOIFDags + model->B3SOIFDlags * Inv_L + model->B3SOIFDwags * Inv_W + model->B3SOIFDpags * Inv_LW; pParam->B3SOIFDb0 = model->B3SOIFDb0 + model->B3SOIFDlb0 * Inv_L + model->B3SOIFDwb0 * Inv_W + model->B3SOIFDpb0 * Inv_LW; pParam->B3SOIFDb1 = model->B3SOIFDb1 + model->B3SOIFDlb1 * Inv_L + model->B3SOIFDwb1 * Inv_W + model->B3SOIFDpb1 * Inv_LW; pParam->B3SOIFDketa = model->B3SOIFDketa + model->B3SOIFDlketa * Inv_L + model->B3SOIFDwketa * Inv_W + model->B3SOIFDpketa * Inv_LW; pParam->B3SOIFDabp = model->B3SOIFDabp + model->B3SOIFDlabp * Inv_L + model->B3SOIFDwabp * Inv_W + model->B3SOIFDpabp * Inv_LW; pParam->B3SOIFDmxc = model->B3SOIFDmxc + model->B3SOIFDlmxc * Inv_L + model->B3SOIFDwmxc * Inv_W + model->B3SOIFDpmxc * Inv_LW; pParam->B3SOIFDadice0 = model->B3SOIFDadice0 + model->B3SOIFDladice0 * Inv_L + model->B3SOIFDwadice0 * Inv_W + model->B3SOIFDpadice0 * Inv_LW; pParam->B3SOIFDa1 = model->B3SOIFDa1 + model->B3SOIFDla1 * Inv_L + model->B3SOIFDwa1 * Inv_W + model->B3SOIFDpa1 * Inv_LW; pParam->B3SOIFDa2 = model->B3SOIFDa2 + model->B3SOIFDla2 * Inv_L + model->B3SOIFDwa2 * Inv_W + model->B3SOIFDpa2 * Inv_LW; pParam->B3SOIFDrdsw = model->B3SOIFDrdsw + model->B3SOIFDlrdsw * Inv_L + model->B3SOIFDwrdsw * Inv_W + model->B3SOIFDprdsw * Inv_LW; pParam->B3SOIFDprwb = model->B3SOIFDprwb + model->B3SOIFDlprwb * Inv_L + model->B3SOIFDwprwb * Inv_W + model->B3SOIFDpprwb * Inv_LW; pParam->B3SOIFDprwg = model->B3SOIFDprwg + model->B3SOIFDlprwg * Inv_L + model->B3SOIFDwprwg * Inv_W + model->B3SOIFDpprwg * Inv_LW; pParam->B3SOIFDwr = model->B3SOIFDwr + model->B3SOIFDlwr * Inv_L + model->B3SOIFDwwr * Inv_W + model->B3SOIFDpwr * Inv_LW; pParam->B3SOIFDnfactor = model->B3SOIFDnfactor + model->B3SOIFDlnfactor * Inv_L + model->B3SOIFDwnfactor * Inv_W + model->B3SOIFDpnfactor * Inv_LW; pParam->B3SOIFDdwg = model->B3SOIFDdwg + model->B3SOIFDldwg * Inv_L + model->B3SOIFDwdwg * Inv_W + model->B3SOIFDpdwg * Inv_LW; pParam->B3SOIFDdwb = model->B3SOIFDdwb + model->B3SOIFDldwb * Inv_L + model->B3SOIFDwdwb * Inv_W + model->B3SOIFDpdwb * Inv_LW; pParam->B3SOIFDvoff = model->B3SOIFDvoff + model->B3SOIFDlvoff * Inv_L + model->B3SOIFDwvoff * Inv_W + model->B3SOIFDpvoff * Inv_LW; pParam->B3SOIFDeta0 = model->B3SOIFDeta0 + model->B3SOIFDleta0 * Inv_L + model->B3SOIFDweta0 * Inv_W + model->B3SOIFDpeta0 * Inv_LW; pParam->B3SOIFDetab = model->B3SOIFDetab + model->B3SOIFDletab * Inv_L + model->B3SOIFDwetab * Inv_W + model->B3SOIFDpetab * Inv_LW; pParam->B3SOIFDdsub = model->B3SOIFDdsub + model->B3SOIFDldsub * Inv_L + model->B3SOIFDwdsub * Inv_W + model->B3SOIFDpdsub * Inv_LW; pParam->B3SOIFDcit = model->B3SOIFDcit + model->B3SOIFDlcit * Inv_L + model->B3SOIFDwcit * Inv_W + model->B3SOIFDpcit * Inv_LW; pParam->B3SOIFDcdsc = model->B3SOIFDcdsc + model->B3SOIFDlcdsc * Inv_L + model->B3SOIFDwcdsc * Inv_W + model->B3SOIFDpcdsc * Inv_LW; pParam->B3SOIFDcdscb = model->B3SOIFDcdscb + model->B3SOIFDlcdscb * Inv_L + model->B3SOIFDwcdscb * Inv_W + model->B3SOIFDpcdscb * Inv_LW; pParam->B3SOIFDcdscd = model->B3SOIFDcdscd + model->B3SOIFDlcdscd * Inv_L + model->B3SOIFDwcdscd * Inv_W + model->B3SOIFDpcdscd * Inv_LW; pParam->B3SOIFDpclm = model->B3SOIFDpclm + model->B3SOIFDlpclm * Inv_L + model->B3SOIFDwpclm * Inv_W + model->B3SOIFDppclm * Inv_LW; pParam->B3SOIFDpdibl1 = model->B3SOIFDpdibl1 + model->B3SOIFDlpdibl1 * Inv_L + model->B3SOIFDwpdibl1 * Inv_W + model->B3SOIFDppdibl1 * Inv_LW; pParam->B3SOIFDpdibl2 = model->B3SOIFDpdibl2 + model->B3SOIFDlpdibl2 * Inv_L + model->B3SOIFDwpdibl2 * Inv_W + model->B3SOIFDppdibl2 * Inv_LW; pParam->B3SOIFDpdiblb = model->B3SOIFDpdiblb + model->B3SOIFDlpdiblb * Inv_L + model->B3SOIFDwpdiblb * Inv_W + model->B3SOIFDppdiblb * Inv_LW; pParam->B3SOIFDdrout = model->B3SOIFDdrout + model->B3SOIFDldrout * Inv_L + model->B3SOIFDwdrout * Inv_W + model->B3SOIFDpdrout * Inv_LW; pParam->B3SOIFDpvag = model->B3SOIFDpvag + model->B3SOIFDlpvag * Inv_L + model->B3SOIFDwpvag * Inv_W + model->B3SOIFDppvag * Inv_LW; pParam->B3SOIFDdelta = model->B3SOIFDdelta + model->B3SOIFDldelta * Inv_L + model->B3SOIFDwdelta * Inv_W + model->B3SOIFDpdelta * Inv_LW; pParam->B3SOIFDaii = model->B3SOIFDaii + model->B3SOIFDlaii * Inv_L + model->B3SOIFDwaii * Inv_W + model->B3SOIFDpaii * Inv_LW; pParam->B3SOIFDbii = model->B3SOIFDbii + model->B3SOIFDlbii * Inv_L + model->B3SOIFDwbii * Inv_W + model->B3SOIFDpbii * Inv_LW; pParam->B3SOIFDcii = model->B3SOIFDcii + model->B3SOIFDlcii * Inv_L + model->B3SOIFDwcii * Inv_W + model->B3SOIFDpcii * Inv_LW; pParam->B3SOIFDdii = model->B3SOIFDdii + model->B3SOIFDldii * Inv_L + model->B3SOIFDwdii * Inv_W + model->B3SOIFDpdii * Inv_LW; pParam->B3SOIFDalpha0 = model->B3SOIFDalpha0 + model->B3SOIFDlalpha0 * Inv_L + model->B3SOIFDwalpha0 * Inv_W + model->B3SOIFDpalpha0 * Inv_LW; pParam->B3SOIFDalpha1 = model->B3SOIFDalpha1 + model->B3SOIFDlalpha1 * Inv_L + model->B3SOIFDwalpha1 * Inv_W + model->B3SOIFDpalpha1 * Inv_LW; pParam->B3SOIFDbeta0 = model->B3SOIFDbeta0 + model->B3SOIFDlbeta0 * Inv_L + model->B3SOIFDwbeta0 * Inv_W + model->B3SOIFDpbeta0 * Inv_LW; pParam->B3SOIFDagidl = model->B3SOIFDagidl + model->B3SOIFDlagidl * Inv_L + model->B3SOIFDwagidl * Inv_W + model->B3SOIFDpagidl * Inv_LW; pParam->B3SOIFDbgidl = model->B3SOIFDbgidl + model->B3SOIFDlbgidl * Inv_L + model->B3SOIFDwbgidl * Inv_W + model->B3SOIFDpbgidl * Inv_LW; pParam->B3SOIFDngidl = model->B3SOIFDngidl + model->B3SOIFDlngidl * Inv_L + model->B3SOIFDwngidl * Inv_W + model->B3SOIFDpngidl * Inv_LW; pParam->B3SOIFDntun = model->B3SOIFDntun + model->B3SOIFDlntun * Inv_L + model->B3SOIFDwntun * Inv_W + model->B3SOIFDpntun * Inv_LW; pParam->B3SOIFDndiode = model->B3SOIFDndiode + model->B3SOIFDlndiode * Inv_L + model->B3SOIFDwndiode * Inv_W + model->B3SOIFDpndiode * Inv_LW; pParam->B3SOIFDisbjt = model->B3SOIFDisbjt + model->B3SOIFDlisbjt * Inv_L + model->B3SOIFDwisbjt * Inv_W + model->B3SOIFDpisbjt * Inv_LW; pParam->B3SOIFDisdif = model->B3SOIFDisdif + model->B3SOIFDlisdif * Inv_L + model->B3SOIFDwisdif * Inv_W + model->B3SOIFDpisdif * Inv_LW; pParam->B3SOIFDisrec = model->B3SOIFDisrec + model->B3SOIFDlisrec * Inv_L + model->B3SOIFDwisrec * Inv_W + model->B3SOIFDpisrec * Inv_LW; pParam->B3SOIFDistun = model->B3SOIFDistun + model->B3SOIFDlistun * Inv_L + model->B3SOIFDwistun * Inv_W + model->B3SOIFDpistun * Inv_LW; pParam->B3SOIFDedl = model->B3SOIFDedl + model->B3SOIFDledl * Inv_L + model->B3SOIFDwedl * Inv_W + model->B3SOIFDpedl * Inv_LW; pParam->B3SOIFDkbjt1 = model->B3SOIFDkbjt1 + model->B3SOIFDlkbjt1 * Inv_L + model->B3SOIFDwkbjt1 * Inv_W + model->B3SOIFDpkbjt1 * Inv_LW; /* CV model */ pParam->B3SOIFDvsdfb = model->B3SOIFDvsdfb + model->B3SOIFDlvsdfb * Inv_L + model->B3SOIFDwvsdfb * Inv_W + model->B3SOIFDpvsdfb * Inv_LW; pParam->B3SOIFDvsdth = model->B3SOIFDvsdth + model->B3SOIFDlvsdth * Inv_L + model->B3SOIFDwvsdth * Inv_W + model->B3SOIFDpvsdth * Inv_LW; /* Added for binning - END */ T0 = (TRatio - 1.0); pParam->B3SOIFDuatemp = pParam->B3SOIFDua; /* save ua, ub, and uc for b3soifdld.c */ pParam->B3SOIFDubtemp = pParam->B3SOIFDub; pParam->B3SOIFDuctemp = pParam->B3SOIFDuc; pParam->B3SOIFDrds0denom = pow(pParam->B3SOIFDweff * 1E6, pParam->B3SOIFDwr); pParam->B3SOIFDrth = here->B3SOIFDrth0 * sqrt(model->B3SOIFDtbox / model->B3SOIFDtsi) / pParam->B3SOIFDweff; pParam->B3SOIFDcth = here->B3SOIFDcth0 * model->B3SOIFDtsi; pParam->B3SOIFDrbody = model->B3SOIFDrbody * pParam->B3SOIFDweff / pParam->B3SOIFDleff; pParam->B3SOIFDua = pParam->B3SOIFDua + pParam->B3SOIFDua1 * T0; pParam->B3SOIFDub = pParam->B3SOIFDub + pParam->B3SOIFDub1 * T0; pParam->B3SOIFDuc = pParam->B3SOIFDuc + pParam->B3SOIFDuc1 * T0; if (pParam->B3SOIFDu0 > 1.0) pParam->B3SOIFDu0 = pParam->B3SOIFDu0 / 1.0e4; pParam->B3SOIFDu0temp = pParam->B3SOIFDu0 * pow(TRatio, pParam->B3SOIFDute); pParam->B3SOIFDvsattemp = pParam->B3SOIFDvsat - pParam->B3SOIFDat * T0; pParam->B3SOIFDrds0 = (pParam->B3SOIFDrdsw + pParam->B3SOIFDprt * T0) / pow(pParam->B3SOIFDweff * 1E6, pParam->B3SOIFDwr); if (B3SOIFDcheckModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->B3SOIFDmodName; namarray[1] = here->B3SOIFDname; SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during B3SOIFDV3 parameter checking for %s in model %s", namarray); return(E_BADPARM); } pParam->B3SOIFDcgdo = (model->B3SOIFDcgdo + pParam->B3SOIFDcf) * pParam->B3SOIFDweffCV; pParam->B3SOIFDcgso = (model->B3SOIFDcgso + pParam->B3SOIFDcf) * pParam->B3SOIFDweffCV; pParam->B3SOIFDcgeo = model->B3SOIFDcgeo * pParam->B3SOIFDleffCV; if (!model->B3SOIFDnpeakGiven && model->B3SOIFDgamma1Given) { T0 = pParam->B3SOIFDgamma1 * model->B3SOIFDcox; pParam->B3SOIFDnpeak = 3.021E22 * T0 * T0; } T0 = pow(TRatio, model->B3SOIFDxbjt / pParam->B3SOIFDndiode); T1 = pow(TRatio, model->B3SOIFDxdif / pParam->B3SOIFDndiode); T2 = pow(TRatio, model->B3SOIFDxrec / pParam->B3SOIFDndiode / 2); T4 = -Eg0 / pParam->B3SOIFDndiode / model->B3SOIFDvtm * (1 - TRatio); T5 = exp(T4); T6 = sqrt(T5); pParam->B3SOIFDjbjt = pParam->B3SOIFDisbjt * T0 * T5; pParam->B3SOIFDjdif = pParam->B3SOIFDisdif * T1 * T5; pParam->B3SOIFDjrec = pParam->B3SOIFDisrec * T2 * T6; T0 = pow(TRatio, model->B3SOIFDxtun / pParam->B3SOIFDntun); pParam->B3SOIFDjtun = pParam->B3SOIFDistun * T0 ; if (pParam->B3SOIFDnsub > 0) pParam->B3SOIFDvfbb = -model->B3SOIFDtype * model->B3SOIFDvtm * log(pParam->B3SOIFDnpeak/ pParam->B3SOIFDnsub); else pParam->B3SOIFDvfbb = -model->B3SOIFDtype * model->B3SOIFDvtm * log(-pParam->B3SOIFDnpeak* pParam->B3SOIFDnsub/ni/ni); if (!model->B3SOIFDvsdfbGiven) { if (pParam->B3SOIFDnsub > 0) pParam->B3SOIFDvsdfb = -model->B3SOIFDtype * (model->B3SOIFDvtm*log(1e20 * pParam->B3SOIFDnsub / ni /ni) - 0.3); else if (pParam->B3SOIFDnsub < 0) pParam->B3SOIFDvsdfb = -model->B3SOIFDtype * (model->B3SOIFDvtm*log(-1e20 / pParam->B3SOIFDnsub) + 0.3); } /* Phi & Gamma */ SDphi = 2.0*model->B3SOIFDvtm*log(fabs(pParam->B3SOIFDnsub) / ni); SDgamma = 5.753e-12 * sqrt(fabs(pParam->B3SOIFDnsub)) / model->B3SOIFDcbox; if (!model->B3SOIFDvsdthGiven) { if ( ((pParam->B3SOIFDnsub > 0) && (model->B3SOIFDtype > 0)) || ((pParam->B3SOIFDnsub < 0) && (model->B3SOIFDtype < 0)) ) pParam->B3SOIFDvsdth = pParam->B3SOIFDvsdfb + SDphi + SDgamma * sqrt(SDphi); else pParam->B3SOIFDvsdth = pParam->B3SOIFDvsdfb - SDphi - SDgamma * sqrt(SDphi); } if (!model->B3SOIFDcsdminGiven) { /* Cdmin */ tmp = sqrt(2.0 * EPSSI * SDphi / (Charge_q * fabs(pParam->B3SOIFDnsub) * 1.0e6)); tmp1 = EPSSI / tmp; model->B3SOIFDcsdmin = tmp1 * model->B3SOIFDcbox / (tmp1 + model->B3SOIFDcbox); } T0 = model->B3SOIFDcsdesw * log(1 + model->B3SOIFDtsi / model->B3SOIFDtbox); T1 = here->B3SOIFDsourcePerimeter - pParam->B3SOIFDweff; if (T1 > 0.0) pParam->B3SOIFDcsesw = T0 * T1; else pParam->B3SOIFDcsesw = 0.0; T1 = here->B3SOIFDdrainPerimeter - pParam->B3SOIFDweff; if (T1 > 0.0) pParam->B3SOIFDcdesw = T0 * T1; else pParam->B3SOIFDcdesw = 0.0; pParam->B3SOIFDphi = 2.0 * model->B3SOIFDvtm * log(pParam->B3SOIFDnpeak / ni); pParam->B3SOIFDsqrtPhi = sqrt(pParam->B3SOIFDphi); pParam->B3SOIFDphis3 = pParam->B3SOIFDsqrtPhi * pParam->B3SOIFDphi; pParam->B3SOIFDXdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIFDnpeak * 1.0e6)) * pParam->B3SOIFDsqrtPhi; pParam->B3SOIFDsqrtXdep0 = sqrt(pParam->B3SOIFDXdep0); pParam->B3SOIFDlitl = sqrt(3.0 * model->B3SOIFDxj * model->B3SOIFDtox); pParam->B3SOIFDvbi = model->B3SOIFDvtm * log(1.0e20 * pParam->B3SOIFDnpeak / (ni * ni)); pParam->B3SOIFDcdep0 = sqrt(Charge_q * EPSSI * pParam->B3SOIFDnpeak * 1.0e6 / 2.0 / pParam->B3SOIFDphi); if (model->B3SOIFDk1Given || model->B3SOIFDk2Given) { if (!model->B3SOIFDk1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->B3SOIFDk1 = 0.53; } if (!model->B3SOIFDk2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->B3SOIFDk2 = -0.0186; } if (model->B3SOIFDxtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->B3SOIFDvbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->B3SOIFDvbmGiven) fprintf(stdout, "Warning: vbm is ignored because k1 or k2 is given.\n"); if (model->B3SOIFDgamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->B3SOIFDgamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->B3SOIFDvbxGiven) pParam->B3SOIFDvbx = pParam->B3SOIFDphi - 7.7348e-4 * pParam->B3SOIFDnpeak * pParam->B3SOIFDxt * pParam->B3SOIFDxt; if (pParam->B3SOIFDvbx > 0.0) pParam->B3SOIFDvbx = -pParam->B3SOIFDvbx; if (pParam->B3SOIFDvbm > 0.0) pParam->B3SOIFDvbm = -pParam->B3SOIFDvbm; if (!model->B3SOIFDgamma1Given) pParam->B3SOIFDgamma1 = 5.753e-12 * sqrt(pParam->B3SOIFDnpeak) / model->B3SOIFDcox; if (!model->B3SOIFDgamma2Given) pParam->B3SOIFDgamma2 = 5.753e-12 * sqrt(pParam->B3SOIFDnsub) / model->B3SOIFDcox; T0 = pParam->B3SOIFDgamma1 - pParam->B3SOIFDgamma2; T1 = sqrt(pParam->B3SOIFDphi - pParam->B3SOIFDvbx) - pParam->B3SOIFDsqrtPhi; T2 = sqrt(pParam->B3SOIFDphi * (pParam->B3SOIFDphi - pParam->B3SOIFDvbm)) - pParam->B3SOIFDphi; pParam->B3SOIFDk2 = T0 * T1 / (2.0 * T2 + pParam->B3SOIFDvbm); pParam->B3SOIFDk1 = pParam->B3SOIFDgamma2 - 2.0 * pParam->B3SOIFDk2 * sqrt(pParam->B3SOIFDphi - pParam->B3SOIFDvbm); } if (pParam->B3SOIFDk2 < 0.0) { T0 = 0.5 * pParam->B3SOIFDk1 / pParam->B3SOIFDk2; pParam->B3SOIFDvbsc = 0.9 * (pParam->B3SOIFDphi - T0 * T0); if (pParam->B3SOIFDvbsc > -3.0) pParam->B3SOIFDvbsc = -3.0; else if (pParam->B3SOIFDvbsc < -30.0) pParam->B3SOIFDvbsc = -30.0; } else { pParam->B3SOIFDvbsc = -30.0; } if (pParam->B3SOIFDvbsc > pParam->B3SOIFDvbm) pParam->B3SOIFDvbsc = pParam->B3SOIFDvbm; if (model->B3SOIFDvth0Given) { pParam->B3SOIFDvfb = model->B3SOIFDtype * pParam->B3SOIFDvth0 - pParam->B3SOIFDphi - pParam->B3SOIFDk1 * pParam->B3SOIFDsqrtPhi; } else { pParam->B3SOIFDvfb = -1.0; pParam->B3SOIFDvth0 = model->B3SOIFDtype * (pParam->B3SOIFDvfb + pParam->B3SOIFDphi + pParam->B3SOIFDk1 * pParam->B3SOIFDsqrtPhi); } T1 = sqrt(EPSSI / EPSOX * model->B3SOIFDtox * pParam->B3SOIFDXdep0); T0 = exp(-0.5 * pParam->B3SOIFDdsub * pParam->B3SOIFDleff / T1); pParam->B3SOIFDtheta0vb0 = (T0 + 2.0 * T0 * T0); T0 = exp(-0.5 * pParam->B3SOIFDdrout * pParam->B3SOIFDleff / T1); T2 = (T0 + 2.0 * T0 * T0); pParam->B3SOIFDthetaRout = pParam->B3SOIFDpdibl1 * T2 + pParam->B3SOIFDpdibl2; here->B3SOIFDminIsub = 5.0e-2 * pParam->B3SOIFDweff * model->B3SOIFDtsi * MAX(pParam->B3SOIFDisdif, pParam->B3SOIFDisrec); } here->B3SOIFDcsbox = model->B3SOIFDcbox*here->B3SOIFDsourceArea; here->B3SOIFDcsmin = model->B3SOIFDcsdmin*here->B3SOIFDsourceArea; here->B3SOIFDcdbox = model->B3SOIFDcbox*here->B3SOIFDdrainArea; here->B3SOIFDcdmin = model->B3SOIFDcsdmin*here->B3SOIFDdrainArea; if ( ((pParam->B3SOIFDnsub > 0) && (model->B3SOIFDtype > 0)) || ((pParam->B3SOIFDnsub < 0) && (model->B3SOIFDtype < 0)) ) { T0 = pParam->B3SOIFDvsdth - pParam->B3SOIFDvsdfb; pParam->B3SOIFDsdt1 = pParam->B3SOIFDvsdfb + model->B3SOIFDasd * T0; T1 = here->B3SOIFDcsbox - here->B3SOIFDcsmin; T2 = T1 / T0 / T0; pParam->B3SOIFDst2 = T2 / model->B3SOIFDasd; pParam->B3SOIFDst3 = T2 /( 1 - model->B3SOIFDasd); here->B3SOIFDst4 = T0 * T1 * (1 + model->B3SOIFDasd) / 3 - here->B3SOIFDcsmin * pParam->B3SOIFDvsdfb; T1 = here->B3SOIFDcdbox - here->B3SOIFDcdmin; T2 = T1 / T0 / T0; pParam->B3SOIFDdt2 = T2 / model->B3SOIFDasd; pParam->B3SOIFDdt3 = T2 /( 1 - model->B3SOIFDasd); here->B3SOIFDdt4 = T0 * T1 * (1 + model->B3SOIFDasd) / 3 - here->B3SOIFDcdmin * pParam->B3SOIFDvsdfb; } else { T0 = pParam->B3SOIFDvsdfb - pParam->B3SOIFDvsdth; pParam->B3SOIFDsdt1 = pParam->B3SOIFDvsdth + model->B3SOIFDasd * T0; T1 = here->B3SOIFDcsmin - here->B3SOIFDcsbox; T2 = T1 / T0 / T0; pParam->B3SOIFDst2 = T2 / model->B3SOIFDasd; pParam->B3SOIFDst3 = T2 /( 1 - model->B3SOIFDasd); here->B3SOIFDst4 = T0 * T1 * (1 + model->B3SOIFDasd) / 3 - here->B3SOIFDcsbox * pParam->B3SOIFDvsdth; T1 = here->B3SOIFDcdmin - here->B3SOIFDcdbox; T2 = T1 / T0 / T0; pParam->B3SOIFDdt2 = T2 / model->B3SOIFDasd; pParam->B3SOIFDdt3 = T2 /( 1 - model->B3SOIFDasd); here->B3SOIFDdt4 = T0 * T1 * (1 + model->B3SOIFDasd) / 3 - here->B3SOIFDcdbox * pParam->B3SOIFDvsdth; } here->B3SOIFDphi = pParam->B3SOIFDphi; /* process source/drain series resistance */ here->B3SOIFDdrainConductance = model->B3SOIFDsheetResistance * here->B3SOIFDdrainSquares; if (here->B3SOIFDdrainConductance > 0.0) here->B3SOIFDdrainConductance = 1.0 / here->B3SOIFDdrainConductance; else here->B3SOIFDdrainConductance = 0.0; here->B3SOIFDsourceConductance = model->B3SOIFDsheetResistance * here->B3SOIFDsourceSquares; if (here->B3SOIFDsourceConductance > 0.0) here->B3SOIFDsourceConductance = 1.0 / here->B3SOIFDsourceConductance; else here->B3SOIFDsourceConductance = 0.0; here->B3SOIFDcgso = pParam->B3SOIFDcgso; here->B3SOIFDcgdo = pParam->B3SOIFDcgdo; } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifddest.c0000644000265600020320000000166512264261473023022 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifddest.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "b3soifddef.h" #include "ngspice/suffix.h" void B3SOIFDdestroy(GENmodel **inModel) { B3SOIFDmodel **model = (B3SOIFDmodel**)inModel; B3SOIFDinstance *here; B3SOIFDinstance *prev = NULL; B3SOIFDmodel *mod = *model; B3SOIFDmodel *oldmod = NULL; for (; mod ; mod = mod->B3SOIFDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->B3SOIFDinstances; here; here = here->B3SOIFDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdld.c0000644000265600020320000041670112264261473022463 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Pin Su, Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 File: b3soifdld.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" /* controlled_exit() */ #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define KboQ 8.617087e-5 /* Kb / q */ #define Eg300 1.115 /* energy gap at 300K */ #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define DELT_Vbs0eff 0.02 #define DELT_Vbsmos 0.005 #define DELT_Vbseff 0.005 #define DELT_Xcsat 0.2 #define DELT_Vbs0dio 1e-7 #define DELTA_VFB 0.02 #define DELTA_Vcscv 0.0004 #define DELT_Vbsdio 0.01 #define CONST_2OV3 0.6666666666 #define OFF_Vbsdio 2e-2 #define OFF_Vbs0_dio 2.02e-2 #define QEX_FACT 20 /* B3SOIFDSmartVbs(Vbs, Old, here, check) * Smart Vbs guess. */ static double B3SOIFDSmartVbs(double New, double Old, B3SOIFDinstance *here, CKTcircuit *ckt, int *check) { NG_IGNORE(Old); NG_IGNORE(check); /* only do it for floating body and DC */ if (here->B3SOIFDfloat && (ckt->CKTmode & (MODEDC | MODEDCOP))) { /* Vbs cannot be negative in DC */ if (New < 0.0) New = 0.0; } return(New); } /* B3SOIFDlimit(vnew,vold) * limits the per-iteration change of any absolute voltage value */ static double B3SOIFDlimit(double vnew, double vold, double limit, int *check) { double T0, T1; if (isnan (vnew) || isnan (vold)) { fprintf(stderr, "Alberto says: YOU TURKEY! The limiting function received NaN.\n"); fprintf(stderr, "New prediction returns to 0.0!\n"); vnew = 0.0; *check = 1; } T0 = vnew - vold; T1 = fabs(T0); if (T1 > limit) { if (T0 > 0.0) vnew = vold + limit; else vnew = vold - limit; *check = 1; } return vnew; } int B3SOIFDload(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; int selfheat; double ag0, qgd, qgs, von, cbhat, VgstNVt, ExpVgst = 0.0; double cdhat, cdreq, ceqbd, ceqbs, ceqqb, ceqqd, ceqqg, ceq, geq; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff, dVfbeff_dVd, dVfbeff_dVb, V3, V4; double gcgdb, gcggb, gcgsb, gcgeb, gcgT; double gcsdb, gcsgb, gcssb, gcseb, gcsT; double gcddb, gcdgb, gcdsb, gcdeb, gcdT; double gcbdb, gcbgb, gcbsb, gcbeb, gcbT; double gcedb, gcegb, gcesb, gceeb, gceT; double gcTt, gTtg, gTtb, gTte, gTtdp, gTtt, gTtsp; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vg, vd, vs, vp, ve, vb; double Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Vgs_eff, Vfb, dVfb_dVb, dVfb_dVd, dVfb_dT; double Phis, dPhis_dVb, sqrtPhis, dsqrtPhis_dVb, Vth = 0.0, dVth_dVb; double dVth_dVd, dVth_dT; double Vgst, dVgs_eff_dVg; double n, dn_dVb, Vtm; double ExpArg, V0; double ueff = 0.0, dueff_dVg, dueff_dVd, dueff_dVb, dueff_dT; double Esat, Vdsat = 0.0; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb, dEsatL_dT; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, dVdsat_dT, Vasat; double dVasat_dVg, dVasat_dVb, dVasat_dVd, dVasat_dT; double Va, dVa_dVd, dVa_dVg, dVa_dVb, dVa_dT; double Vbseff, dVbseff_dVb; double One_Third_CoxWL, Two_Third_CoxWL, CoxWL; double T0, dT0_dVg, dT0_dVd, dT0_dVb, dT0_dVc, dT0_dVe, dT0_dT; double T1, dT1_dVg, dT1_dVd, dT1_dVb, dT1_dVc, dT1_dVe, dT1_dT; double T2, dT2_dVg, dT2_dVd, dT2_dVb, dT2_dVc, dT2_dVe, dT2_dT; double T3, dT3_dVg, dT3_dVd, dT3_dVb, dT3_dVc, dT3_dVe, dT3_dT; double T4, dT4_dVg, dT4_dVd, dT4_dVb, dT4_dVe, dT4_dT; double T5, dT5_dVe; double T6, dT6_dVe, dT6_dT; double T7; double T8; double T9; double T10; double T11; double Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb, dVACLM_dT; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb, dVADIBL_dT; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb; double Delt_vth, dDelt_vth_dVb, dDelt_vth_dT; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double a1; double Vgsteff = 0.0, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double dVgsteff_dVe, dVgsteff_dT; double Vdseff = 0.0, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb, dVdseff_dT; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds; double dAbulk_dVg, dn_dVd ; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb, dbeta_dT; double gche, dgche_dVg, dgche_dVd, dgche_dVb, dgche_dT; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb, dfgche1_dT; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb, dfgche2_dT; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb, dIdl_dT; double Ids = 0.0, Gm, Gds = 0.0, Gmb; double CoxWovL; double Rds, dRds_dVg, dRds_dVb, dRds_dT, WVCox, WVCoxRds; double Vgst2Vtm, dVgst2Vtm_dT, VdsatCV, dVdsatCV_dVg, dVdsatCV_dVb; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qgdo, qgso, cgdo, cgso; double dxpart, sxpart; struct b3soifdSizeDependParam *pParam; int ByPass, Check, ChargeComputationNeeded = 0, error; double gbbsp, gbbdp, gbbg, gbbb, gbbe, gbbp, gbbT; double gddpsp, gddpdp, gddpg, gddpb, gddpe, gddpT; double gsspsp, gsspdp, gsspg, gsspb, gsspe, gsspT; double Gbpbs, Gbpgs, Gbpds, Gbpes, Gbpps, GbpT; double ves, ved, veb, vge = 0.0, delves, vedo, delved; double vps, vpd, Vps, delvps; double Vbd, Ves, Vesfb, sqrtXdep, DeltVthtemp, dDeltVthtemp_dT; double Vbp, dVbp_dVp, dVbp_dVb, dVbp_dVg, dVbp_dVd, dVbp_dVe, dVbp_dT; double Vpsdio, dVpsdio_dVg, dVpsdio_dVd, dVpsdio_dVe, dVpsdio_dVp, dVpsdio_dT; double DeltVthw, dDeltVthw_dVb, dDeltVthw_dT; double dVbseff_dVd, dVbseff_dVe, dVbseff_dT; double dVdsat_dVc, dVasat_dVc, dVACLM_dVc, dVADIBL_dVc, dVa_dVc; double dfgche1_dVc, dfgche2_dVc, dgche_dVc, dVdseff_dVc, dIdl_dVc; double Gm0, Gds0, Gmb0, GmT0, Gmc, Gme, GmT, dVbseff_dVg; double dDIBL_Sft_dVb; double diffVdsii ; double Idgidl = 0.0, Gdgidld, Gdgidlg, Isgidl = 0.0, Gsgidlg; double Gjsd, Gjsb, GjsT, Gjdd, Gjdb, GjdT; double Ibp = 0.0, Iii = 0.0, Giid, Giig, Giib, Giie, GiiT, Gcd, Gcb, GcT; double ceqbody, ceqbodcon = 0.0; double gppg = 0.0, gppdp = 0.0, gppb = 0.0, gppe = 0.0; double gppp = 0.0, gppsp = 0.0, gppT; double delTemp, deldelTemp, Temp; double ceqth, ceqqth; double K1; double qjs = 0.0, gcjsbs, gcjsT; double qjd = 0.0, gcjdbs, gcjdds, gcjdT; double qge; double ceqqe; double ni, Eg, Cbox, Nfb, CboxWL; double dVfbeff_dVrg, Cbe = 0.0; double qinv = 0.0, qgate = 0.0, qbody = 0.0, qdrn = 0.0, qsrc, qsub = 0.0; double cqgate, cqbody = 0.0, cqdrn = 0.0, cqsub, cqtemp; double Cgg, Cgd, Cgb, Cge; double Csg, Csd, Csb, Cse, Cbg = 0.0, Cbd = 0.0, Cbb = 0.0; double Cgg1, Cgb1, Cgd1, Csg1, Csd1, Csb1; double Vbs0t = 0.0, dVbs0t_dT ; double Vbs0 = 0.0,dVbs0_dVe, dVbs0_dT; double Vbs0eff = 0.0 ,dVbs0eff_dVg ,dVbs0eff_dVd ,dVbs0eff_dVe, dVbs0eff_dT; double Vbs0teff = 0.0, dVbs0teff_dVg, dVbs0teff_dVd; double dVbs0teff_dVe, dVbs0teff_dT; double dVbsdio_dVg, dVbsdio_dVd, dVbsdio_dVe; double dVbsdio_dVb, dVbsdio_dT; double Vthfd = 0.0,dVthfd_dVd ,dVthfd_dVe, dVthfd_dT; double Vbs0mos = 0.0 ,dVbs0mos_dVe, dVbs0mos_dT; double Vbsmos ,dVbsmos_dVg ,dVbsmos_dVb ,dVbsmos_dVd, dVbsmos_dVe, dVbsmos_dT; double Abeff ,dAbeff_dVg ,dAbeff_dVb, dAbeff_dVc; double Vcs ,dVcs_dVg ,dVcs_dVb ,dVcs_dVd ,dVcs_dVe, dVcs_dT; double Xcsat = 0.0 ,dXcsat_dVg , dXcsat_dVc; double Vdsatii ,dVdsatii_dVg ,dVdsatii_dVd, dVdsatii_dVb, dVdsatii_dT; double Vdseffii ,dVdseffii_dVg ,dVdseffii_dVd, dVdseffii_dVb, dVdseffii_dT; double VcsCV = 0.0; double VdsCV = 0.0, dVdsCV_dVg = 0.0, dVdsCV_dVb = 0.0; double dVdsCV_dVd = 0.0, dVdsCV_dVc = 0.0; double Phisd ,dPhisd_dVg ,dPhisd_dVb ,dPhisd_dVd, dPhisd_dVc; double sqrtPhisd; double Xc = 0.0; double Ic = 0.0; double Ibs = 0.0; double Ibd = 0.0; double Denomi ,dDenomi_dVg ,dDenomi_dVd ,dDenomi_dVb , dDenomi_dT; double Qbf = 0.0; double Qsubs1 = 0.0; double Qsubs2 = 0.0; double Qsub0 = 0.0 ,dQsub0_dVg ,dQsub0_dVb ,dQsub0_dVd ; double Qac0 = 0.0 ,dQac0_dVb ,dQac0_dVd; double Qdep0 ,dQdep0_dVb; double Qe1 = 0.0; double Ce1g ,Ce1b ,Ce1d ,Ce1e, Ce1T; double Ce2g ,Ce2b ,Ce2d ,Ce2e, Ce2T; double Qe2 = 0.0; double dQac0_dVrg, Vbsdio = 0.0, dQsub0_dVrg; /* for self-heating */ double vbi, vfbb, phi, sqrtPhi, Xdep0, jbjt, jdif, jrec, jtun, u0temp, vsattemp; double rds0, ua, ub, uc; double dvbi_dT, dvfbb_dT, djbjt_dT, djdif_dT, djrec_dT, djtun_dT, du0temp_dT; double dvsattemp_dT, drds0_dT, dua_dT, dub_dT, duc_dT, dni_dT, dVtm_dT; double dVfbeff_dT, dQac0_dT, dQsub0_dT, dVdsCV_dT = 0.0, dPhisd_dT; double CbT, CsT, CgT; double Qex, dQex_dVg, dQex_dVb, dQex_dVd, dQex_dVe, dQex_dT; /* clean up last */ FILE *fpdebug = NULL; /* end clean up */ int nandetect; static int nanfound = 0; char nanmessage [12]; double m; for (; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here != NULL; here = here->B3SOIFDnextInstance) { Check = 0; ByPass = 0; selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0); pParam = here->pParam; if (here->B3SOIFDdebugMod > 3) { if (model->B3SOIFDtype > 0) fpdebug = fopen("b3soifdn.log", "a"); else fpdebug = fopen("b3soifdp.log", "a"); fprintf(fpdebug, "******* Time : %.5e ******* Device: %s Iteration: %d\n", ckt->CKTtime, here->B3SOIFDname, here->B3SOIFDiterations); } if ((ckt->CKTmode & MODEINITSMSIG)) { vbs = *(ckt->CKTstate0 + here->B3SOIFDvbs); vgs = *(ckt->CKTstate0 + here->B3SOIFDvgs); ves = *(ckt->CKTstate0 + here->B3SOIFDves); vps = *(ckt->CKTstate0 + here->B3SOIFDvps); vds = *(ckt->CKTstate0 + here->B3SOIFDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIFDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIFDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIFDdNodePrime); vs = *(ckt->CKTrhsOld + here->B3SOIFDsNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIFDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIFDeNode); vb = *(ckt->CKTrhsOld + here->B3SOIFDbNode); if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "... INIT SMSIG ...\n"); } if (here->B3SOIFDdebugMod > 0) { fprintf(stderr, "DC op. point converge with %d iterations\n", here->B3SOIFDiterations); } } else if ((ckt->CKTmode & MODEINITTRAN)) { vbs = *(ckt->CKTstate1 + here->B3SOIFDvbs); vgs = *(ckt->CKTstate1 + here->B3SOIFDvgs); ves = *(ckt->CKTstate1 + here->B3SOIFDves); vps = *(ckt->CKTstate1 + here->B3SOIFDvps); vds = *(ckt->CKTstate1 + here->B3SOIFDvds); delTemp = *(ckt->CKTstate1 + here->B3SOIFDdeltemp); vg = *(ckt->CKTrhsOld + here->B3SOIFDgNode); vd = *(ckt->CKTrhsOld + here->B3SOIFDdNodePrime); vs = *(ckt->CKTrhsOld + here->B3SOIFDsNodePrime); vp = *(ckt->CKTrhsOld + here->B3SOIFDpNode); ve = *(ckt->CKTrhsOld + here->B3SOIFDeNode); vb = *(ckt->CKTrhsOld + here->B3SOIFDbNode); if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "... Init Transient ....\n"); } if (here->B3SOIFDdebugMod > 0) { fprintf(stderr, "Transient operation point converge with %d iterations\n", here->B3SOIFDiterations); } here->B3SOIFDiterations = 0; } else if ((ckt->CKTmode & MODEINITJCT) && !here->B3SOIFDoff) { vds = model->B3SOIFDtype * here->B3SOIFDicVDS; vgs = model->B3SOIFDtype * here->B3SOIFDicVGS; ves = model->B3SOIFDtype * here->B3SOIFDicVES; vbs = model->B3SOIFDtype * here->B3SOIFDicVBS; vps = model->B3SOIFDtype * here->B3SOIFDicVPS; vg = vd = vs = vp = ve = 0.0; here->B3SOIFDiterations = 0; /* initialize iteration number */ delTemp = 0.0; here->B3SOIFDphi = pParam->B3SOIFDphi; if (here->B3SOIFDdebugMod > 2) fprintf(fpdebug, "... INIT JCT ...\n"); if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vbs = 0.0; vgs = model->B3SOIFDtype*0.1 + pParam->B3SOIFDvth0; vds = 0.0; ves = 0.0; vps = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->B3SOIFDoff)) { delTemp = vps = vbs = vgs = vds = ves = 0.0; vg = vd = vs = vp = ve = 0.0; here->B3SOIFDiterations = 0; /* initialize iteration number */ } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->B3SOIFDvbs) = *(ckt->CKTstate1 + here->B3SOIFDvbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDvbs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDvbs))); *(ckt->CKTstate0 + here->B3SOIFDvgs) = *(ckt->CKTstate1 + here->B3SOIFDvgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDvgs)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDvgs))); *(ckt->CKTstate0 + here->B3SOIFDves) = *(ckt->CKTstate1 + here->B3SOIFDves); ves = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDves)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDves))); *(ckt->CKTstate0 + here->B3SOIFDvps) = *(ckt->CKTstate1 + here->B3SOIFDvps); vps = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDvps)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDvps))); *(ckt->CKTstate0 + here->B3SOIFDvds) = *(ckt->CKTstate1 + here->B3SOIFDvds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDvds)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDvds))); *(ckt->CKTstate0 + here->B3SOIFDvbd) = *(ckt->CKTstate0 + here->B3SOIFDvbs) - *(ckt->CKTstate0 + here->B3SOIFDvds); *(ckt->CKTstate0 + here->B3SOIFDvg) = *(ckt->CKTstate1 + here->B3SOIFDvg); *(ckt->CKTstate0 + here->B3SOIFDvd) = *(ckt->CKTstate1 + here->B3SOIFDvd); *(ckt->CKTstate0 + here->B3SOIFDvs) = *(ckt->CKTstate1 + here->B3SOIFDvs); *(ckt->CKTstate0 + here->B3SOIFDvp) = *(ckt->CKTstate1 + here->B3SOIFDvp); *(ckt->CKTstate0 + here->B3SOIFDve) = *(ckt->CKTstate1 + here->B3SOIFDve); /* Only predict ve */ ve = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDve)) - (xfact * (*(ckt->CKTstate2 + here->B3SOIFDve))); /* Then update vg, vs, vb, vd, vp base on ve */ vs = ve - model->B3SOIFDtype * ves; vg = model->B3SOIFDtype * vgs + vs; vd = model->B3SOIFDtype * vds + vs; vb = model->B3SOIFDtype * vbs + vs; vp = model->B3SOIFDtype * vps + vs; delTemp = (1.0 + xfact)* (*(ckt->CKTstate1 + here->B3SOIFDdeltemp))-(xfact * (*(ckt->CKTstate2 + here->B3SOIFDdeltemp))); if (selfheat) { here->B3SOIFDphi = 2.0 * here->B3SOIFDvtm * log (pParam->B3SOIFDnpeak / here->B3SOIFDni); } if (here->B3SOIFDdebugMod > 0) { fprintf(stderr, "Time = %.6e converge with %d iterations\n", ckt->CKTtime, here->B3SOIFDiterations); } if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "... PREDICTOR calculation ....\n"); } here->B3SOIFDiterations = 0; } else { #endif /* PREDICTOR */ vg = B3SOIFDlimit(*(ckt->CKTrhsOld + here->B3SOIFDgNode), *(ckt->CKTstate0 + here->B3SOIFDvg), 3.0, &Check); vd = B3SOIFDlimit(*(ckt->CKTrhsOld + here->B3SOIFDdNodePrime), *(ckt->CKTstate0 + here->B3SOIFDvd), 3.0, &Check); vs = B3SOIFDlimit(*(ckt->CKTrhsOld + here->B3SOIFDsNodePrime), *(ckt->CKTstate0 + here->B3SOIFDvs), 3.0, &Check); vp = B3SOIFDlimit(*(ckt->CKTrhsOld + here->B3SOIFDpNode), *(ckt->CKTstate0 + here->B3SOIFDvp), 3.0, &Check); ve = B3SOIFDlimit(*(ckt->CKTrhsOld + here->B3SOIFDeNode), *(ckt->CKTstate0 + here->B3SOIFDve), 3.0, &Check); delTemp = *(ckt->CKTrhsOld + here->B3SOIFDtempNode); vbs = model->B3SOIFDtype * (*(ckt->CKTrhsOld+here->B3SOIFDbNode) - *(ckt->CKTrhsOld+here->B3SOIFDsNodePrime)); vps = model->B3SOIFDtype * (vp - vs); vgs = model->B3SOIFDtype * (vg - vs); ves = model->B3SOIFDtype * (ve - vs); vds = model->B3SOIFDtype * (vd - vs); if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "... DC calculation ....\n"); fprintf(fpdebug, "Vg = %.10f; Vb = %.10f; Vs = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIFDgNode), *(ckt->CKTrhsOld + here->B3SOIFDbNode), *(ckt->CKTrhsOld + here->B3SOIFDsNode)); fprintf(fpdebug, "Vd = %.10f; Vsp = %.10f; Vdp = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIFDdNode), *(ckt->CKTrhsOld + here->B3SOIFDsNodePrime), *(ckt->CKTrhsOld + here->B3SOIFDdNodePrime)); fprintf(fpdebug, "Ve = %.10f; Vp = %.10f; delTemp = %.10f\n", *(ckt->CKTrhsOld + here->B3SOIFDeNode), *(ckt->CKTrhsOld + here->B3SOIFDpNode), *(ckt->CKTrhsOld + here->B3SOIFDtempNode)); } #ifndef PREDICTOR } #endif /* PREDICTOR */ vbd = vbs - vds; vgd = vgs - vds; ved = ves - vds; vgdo = *(ckt->CKTstate0 + here->B3SOIFDvgs) - *(ckt->CKTstate0 + here->B3SOIFDvds); vedo = *(ckt->CKTstate0 + here->B3SOIFDves) - *(ckt->CKTstate0 + here->B3SOIFDvds); delvbs = vbs - *(ckt->CKTstate0 + here->B3SOIFDvbs); delvbd = vbd - *(ckt->CKTstate0 + here->B3SOIFDvbd); delvgs = vgs - *(ckt->CKTstate0 + here->B3SOIFDvgs); delves = ves - *(ckt->CKTstate0 + here->B3SOIFDves); delvps = vps - *(ckt->CKTstate0 + here->B3SOIFDvps); deldelTemp = delTemp - *(ckt->CKTstate0 + here->B3SOIFDdeltemp); delvds = vds - *(ckt->CKTstate0 + here->B3SOIFDvds); delvgd = vgd - vgdo; delved = ved - vedo; if (here->B3SOIFDmode >= 0) { cdhat = here->B3SOIFDcd + (here->B3SOIFDgm-here->B3SOIFDgjdg) * delvgs + (here->B3SOIFDgds - here->B3SOIFDgjdd) * delvds + (here->B3SOIFDgmbs - here->B3SOIFDgjdb) * delvbs + (here->B3SOIFDgme - here->B3SOIFDgjde) * delves + (here->B3SOIFDgmT - here->B3SOIFDgjdT) * deldelTemp; } else { cdhat = here->B3SOIFDcd + (here->B3SOIFDgm-here->B3SOIFDgjdg) * delvgd - (here->B3SOIFDgds - here->B3SOIFDgjdd) * delvds + (here->B3SOIFDgmbs - here->B3SOIFDgjdb) * delvbd + (here->B3SOIFDgme - here->B3SOIFDgjde) * delved + (here->B3SOIFDgmT - here->B3SOIFDgjdT) * deldelTemp; } cbhat = here->B3SOIFDcb + here->B3SOIFDgbgs * delvgs + here->B3SOIFDgbbs * delvbs + here->B3SOIFDgbds * delvds + here->B3SOIFDgbes * delves + here->B3SOIFDgbps * delvps + here->B3SOIFDgbT * deldelTemp; #ifndef NOBYPASS /* following should be one big if connected by && all over * the place, but some C compilers can't handle that, so * we split it up here to let them digest it in stages */ if (here->B3SOIFDdebugMod > 3) { fprintf(fpdebug, "Convergent Criteria : vbs %d vds %d vgs %d ves %d vps %d temp %d\n", ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B3SOIFDvbs))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B3SOIFDvds))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B3SOIFDvgs))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B3SOIFDves))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B3SOIFDvps))) + ckt->CKTvoltTol))) ? 1 : 0, ((fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B3SOIFDdeltemp))) + ckt->CKTvoltTol*1e4))) ? 1 : 0); fprintf(fpdebug, "delCd %.4e, delCb %.4e\n", fabs(cdhat - here->B3SOIFDcd) , fabs(cbhat - here->B3SOIFDcb)); } if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass) && Check == 0) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0+here->B3SOIFDvbs))) + ckt->CKTvoltTol)) ) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0+here->B3SOIFDvbd))) + ckt->CKTvoltTol)) ) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0+here->B3SOIFDvgs))) + ckt->CKTvoltTol))) if ((fabs(delves) < (ckt->CKTreltol * MAX(fabs(ves), fabs(*(ckt->CKTstate0+here->B3SOIFDves))) + ckt->CKTvoltTol))) if ( (here->B3SOIFDbodyMod == 0) || (here->B3SOIFDbodyMod == 2) || (fabs(delvps) < (ckt->CKTreltol * MAX(fabs(vps), fabs(*(ckt->CKTstate0+here->B3SOIFDvps))) + ckt->CKTvoltTol)) ) if ( (here->B3SOIFDtempNode == 0) || (fabs(deldelTemp) < (ckt->CKTreltol * MAX(fabs(delTemp), fabs(*(ckt->CKTstate0+here->B3SOIFDdeltemp))) + ckt->CKTvoltTol*1e4))) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0+here->B3SOIFDvds))) + ckt->CKTvoltTol))) if ((fabs(cdhat - here->B3SOIFDcd) < ckt->CKTreltol * MAX(fabs(cdhat),fabs(here->B3SOIFDcd)) + ckt->CKTabstol)) if ((fabs(cbhat - here->B3SOIFDcb) < ckt->CKTreltol * MAX(fabs(cbhat),fabs(here->B3SOIFDcb)) + ckt->CKTabstol) ) { /* bypass code */ vbs = *(ckt->CKTstate0 + here->B3SOIFDvbs); vbd = *(ckt->CKTstate0 + here->B3SOIFDvbd); vgs = *(ckt->CKTstate0 + here->B3SOIFDvgs); ves = *(ckt->CKTstate0 + here->B3SOIFDves); vps = *(ckt->CKTstate0 + here->B3SOIFDvps); vds = *(ckt->CKTstate0 + here->B3SOIFDvds); delTemp = *(ckt->CKTstate0 + here->B3SOIFDdeltemp); /* calculate Vds for temperature conductance calculation in bypass (used later when filling Temp node matrix) */ Vds = here->B3SOIFDmode > 0 ? vds : -vds; vgd = vgs - vds; vgb = vgs - vbs; veb = ves - vbs; if (here->B3SOIFDdebugMod > 2) { fprintf(stderr, "Bypass for %s...\n", here->B3SOIFDname); fprintf(fpdebug, "... By pass ....\n"); fprintf(fpdebug, "vgs=%.4f, vds=%.4f, vbs=%.4f, ", vgs, vds, vbs); fprintf(fpdebug, "ves=%.4f, vps=%.4f\n", ves, vps); } if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; goto line755; } else { goto line850; } } #endif /*NOBYPASS*/ von = here->B3SOIFDvon; if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1)) { here->B3SOIFDdum1 = here->B3SOIFDdum2 = here->B3SOIFDdum3 = 0.0; here->B3SOIFDdum4 = here->B3SOIFDdum5 = 0.0; Qac0 = Qsub0 = Qsubs1 = Qsubs2 = Qbf = Qe1 = Qe2 = 0.0; qjs = qjd = Cbg = Cbb = Cbd = Cbe = Xc = qdrn = qgate = 0.0; qbody = qsub = 0.0; } if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "Limited : vgs = %.8f\n", vgs); fprintf(fpdebug, "Limited : vds = %.8f\n", vds); } if (*(ckt->CKTstate0 + here->B3SOIFDvds) >= 0.0) T0 = *(ckt->CKTstate0 + here->B3SOIFDvbs); else T0 = *(ckt->CKTstate0 + here->B3SOIFDvbd); if (here->B3SOIFDdebugMod > 2) fprintf(fpdebug, "Before lim : vbs = %.8f, after = ", T0); if (vds >= 0.0) { vbs = B3SOIFDlimit(vbs, T0, 0.2, &Check); vbs = B3SOIFDSmartVbs(vbs, T0, here, ckt, &Check); vbd = vbs - vds; vb = model->B3SOIFDtype * vbs + vs; if (here->B3SOIFDdebugMod > 2) fprintf(fpdebug, "%.8f\n", vbs); } else { vbd = B3SOIFDlimit(vbd, T0, 0.2, &Check); vbd = B3SOIFDSmartVbs(vbd, T0, here, ckt, &Check); vbs = vbd + vds; vb = model->B3SOIFDtype * vbs + vd; if (here->B3SOIFDdebugMod > 2) fprintf(fpdebug, "%.8f\n", vbd); } delTemp =B3SOIFDlimit(delTemp, *(ckt->CKTstate0 + here->B3SOIFDdeltemp),5.0,&Check); } /* Calculate temperature dependent values for self-heating effect */ Temp = delTemp + ckt->CKTtemp; /* for debugging Temp = ckt->CKTtemp; selfheat = 1; if (here->B3SOIFDname[1] == '2') { Temp += 0.01; } */ TempRatio = Temp / model->B3SOIFDtnom; if (selfheat) { Vtm = KboQ * Temp; T0 = 1108.0 + Temp; T5 = Temp * Temp; Eg = 1.16 - 7.02e-4 * T5 / T0; T1 = ((7.02e-4 * T5) - T0 * (14.04e-4 * Temp)) / T0 / T0; /* T1 = dEg / dT */ T2 = 1.9230584e-4; /* T2 = 1 / 300.15^(3/2) */ T5 = sqrt(Temp); T3 = 1.45e10 * Temp * T5 * T2; T4 = exp(21.5565981 - Eg / (2.0 * Vtm)); ni = T3 * T4; dni_dT = 2.175e10 * T2 * T5 * T4 + T3 * T4 * (-Vtm * T1 + Eg * KboQ) / (2.0 * Vtm * Vtm); T0 = log(1.0e20 * pParam->B3SOIFDnpeak / (ni * ni)); vbi = Vtm * T0; dvbi_dT = KboQ * T0 + Vtm * (-2.0 * dni_dT / ni); if (pParam->B3SOIFDnsub > 0) { T0 = log(pParam->B3SOIFDnpeak / pParam->B3SOIFDnsub); vfbb = -model->B3SOIFDtype * Vtm*T0; dvfbb_dT = -model->B3SOIFDtype * KboQ*T0; } else { T0 = log(-pParam->B3SOIFDnpeak*pParam->B3SOIFDnsub/ni/ni); vfbb = -model->B3SOIFDtype * Vtm*T0; dvfbb_dT = -model->B3SOIFDtype * (KboQ * T0 + Vtm * 2.0 * dni_dT / ni); } /* phi = 2.0 * Vtm * log(pParam->B3SOIFDnpeak / ni); */ phi = here->B3SOIFDphi; sqrtPhi = sqrt(phi); Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->B3SOIFDnpeak * 1.0e6)) * sqrtPhi; /* Save the values below for phi calculation in B3SOIFDaccept() */ here->B3SOIFDvtm = Vtm; here->B3SOIFDni = ni; /* Use dTx_dVe variables to act as dTx_dT variables */ T8 = 1 / model->B3SOIFDtnom; T7 = model->B3SOIFDxbjt / pParam->B3SOIFDndiode; T0 = pow(TempRatio, T7); dT0_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T7 = model->B3SOIFDxdif / pParam->B3SOIFDndiode; T1 = pow(TempRatio, T7); dT1_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T7 = model->B3SOIFDxrec / pParam->B3SOIFDndiode / 2.0; T2 = pow(TempRatio, T7); dT2_dVe = T7 * pow(TempRatio, T7 - 1.0) * T8; T3 = TempRatio - 1.0; T4 = Eg300 / pParam->B3SOIFDndiode / Vtm * T3; dT4_dVe = Eg300 / pParam->B3SOIFDndiode / Vtm / Vtm * (Vtm * T8 - T3 * KboQ); T5 = exp(T4); dT5_dVe = dT4_dVe * T5; T6 = sqrt(T5); dT6_dVe = 0.5 / T6 * dT5_dVe; jbjt = pParam->B3SOIFDisbjt * T0 * T5; jdif = pParam->B3SOIFDisdif * T1 * T5; jrec = pParam->B3SOIFDisrec * T2 * T6; djbjt_dT = pParam->B3SOIFDisbjt * (T0 * dT5_dVe + T5 * dT0_dVe); djdif_dT = pParam->B3SOIFDisdif * (T1 * dT5_dVe + T5 * dT1_dVe); djrec_dT = pParam->B3SOIFDisrec * (T2 * dT6_dVe + T6 * dT2_dVe); T7 = model->B3SOIFDxtun / pParam->B3SOIFDntun; T0 = pow(TempRatio, T7); jtun = pParam->B3SOIFDistun * T0; djtun_dT = pParam->B3SOIFDistun * T7 * pow(TempRatio, T7 - 1.0) * T8; u0temp = pParam->B3SOIFDu0 * pow(TempRatio, pParam->B3SOIFDute); du0temp_dT = pParam->B3SOIFDu0 * pParam->B3SOIFDute * pow(TempRatio, pParam->B3SOIFDute - 1.0) * T8; vsattemp = pParam->B3SOIFDvsat - pParam->B3SOIFDat * T3; dvsattemp_dT = -pParam->B3SOIFDat * T8; rds0 = (pParam->B3SOIFDrdsw + pParam->B3SOIFDprt * T3) / pParam->B3SOIFDrds0denom; drds0_dT = pParam->B3SOIFDprt / pParam->B3SOIFDrds0denom * T8; ua = pParam->B3SOIFDuatemp + pParam->B3SOIFDua1 * T3; ub = pParam->B3SOIFDubtemp + pParam->B3SOIFDub1 * T3; uc = pParam->B3SOIFDuctemp + pParam->B3SOIFDuc1 * T3; dua_dT = pParam->B3SOIFDua1 * T8; dub_dT = pParam->B3SOIFDub1 * T8; duc_dT = pParam->B3SOIFDuc1 * T8; } else { vbi = pParam->B3SOIFDvbi; vfbb = pParam->B3SOIFDvfbb; phi = pParam->B3SOIFDphi; sqrtPhi = pParam->B3SOIFDsqrtPhi; Xdep0 = pParam->B3SOIFDXdep0; jbjt = pParam->B3SOIFDjbjt; jdif = pParam->B3SOIFDjdif; jrec = pParam->B3SOIFDjrec; jtun = pParam->B3SOIFDjtun; u0temp = pParam->B3SOIFDu0temp; vsattemp = pParam->B3SOIFDvsattemp; rds0 = pParam->B3SOIFDrds0; ua = pParam->B3SOIFDua; ub = pParam->B3SOIFDub; uc = pParam->B3SOIFDuc; dni_dT = dvbi_dT = dvfbb_dT = djbjt_dT = djdif_dT = 0.0; djrec_dT = djtun_dT = du0temp_dT = dvsattemp_dT = 0.0; drds0_dT = dua_dT = dub_dT = duc_dT = 0.0; } /* TempRatio used for Vth and mobility */ if (selfheat) { TempRatio = Temp / model->B3SOIFDtnom - 1.0; } else { TempRatio = ckt->CKTtemp / model->B3SOIFDtnom - 1.0; } /* determine DC current and derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; ved = ves - vds; veb = ves - vbs; vge = vgs - ves; vpd = vps - vds; if (vds >= 0.0) { /* normal mode */ here->B3SOIFDmode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vbd = vbd; Ves = ves; Vps = vps; } else { /* inverse mode */ here->B3SOIFDmode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vbd = vbs; Ves = ved; Vps = vpd; } if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "Vgs=%.4f, Vds=%.4f, Vbs=%.4f, ", Vgs, Vds, Vbs); fprintf(fpdebug, "Ves=%.4f, Vps=%.4f, Temp=%.1f\n", Ves, Vps, Temp); } Vesfb = Ves - vfbb; Cbox = model->B3SOIFDcbox; K1 = pParam->B3SOIFDk1; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; if (here->B3SOIFDdebugMod == -1) ChargeComputationNeeded = 1; /* Poly Gate Si Depletion Effect */ T0 = pParam->B3SOIFDvfb + phi; if ((pParam->B3SOIFDngate > 1.e18) && (pParam->B3SOIFDngate < 1.e25) && (Vgs > T0)) /* added to avoid the problem caused by ngate */ { T1 = 1.0e6 * Charge_q * EPSSI * pParam->B3SOIFDngate / (model->B3SOIFDcox * model->B3SOIFDcox); T4 = sqrt(1.0 + 2.0 * (Vgs - T0) / T1); T2 = T1 * (T4 - 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); Vgs_eff = Vgs - T5; dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { Vgs_eff = Vgs; dVgs_eff_dVg = 1.0; } Leff = pParam->B3SOIFDleff; if (selfheat) { Vtm = KboQ * Temp; dVtm_dT = KboQ; } else { Vtm = model->B3SOIFDvtm; dVtm_dT = 0.0; } V0 = vbi - phi; /* Prepare Vbs0t */ T0 = -pParam->B3SOIFDdvbd1 * pParam->B3SOIFDleff / pParam->B3SOIFDlitl; T1 = pParam->B3SOIFDdvbd0 * (exp(0.5*T0) + 2*exp(T0)); T2 = T1 * (vbi - phi); T3 = 0.5 * model->B3SOIFDqsi / model->B3SOIFDcsi; Vbs0t = phi - T3 + pParam->B3SOIFDvbsa + T2; if (selfheat) dVbs0t_dT = T1 * dvbi_dT; else dVbs0t_dT = 0.0; /* Prepare Vbs0 */ T0 = 1 + model->B3SOIFDcsieff / Cbox; T1 = pParam->B3SOIFDkb1 / T0; T2 = T1 * (Vbs0t - Vesfb); /* T6 is Vbs0 before limiting */ T6 = Vbs0t - T2; dT6_dVe = T1; if (selfheat) dT6_dT = dVbs0t_dT - T1 * (dVbs0t_dT + dvfbb_dT); else dT6_dT = 0.0; /* limit Vbs0 to below phi */ T1 = phi - pParam->B3SOIFDdelp; T2 = T1 - T6 - DELT_Vbseff; T3 = sqrt(T2 * T2 + 4.0 * DELT_Vbseff); Vbs0 = T1 - 0.5 * (T2 + T3); T4 = 0.5 * (1 + T2/T3); dVbs0_dVe = T4 * dT6_dVe; if (selfheat) dVbs0_dT = T4 * dT6_dT; else dVbs0_dT = 0.0; T1 = Vbs0t - Vbs0 - DELT_Vbsmos; T2 = sqrt(T1 * T1 + DELT_Vbsmos * DELT_Vbsmos); T3 = 0.5 * (T1 + T2); T4 = T3 * model->B3SOIFDcsieff / model->B3SOIFDqsieff; Vbs0mos = Vbs0 - 0.5 * T3 * T4; T5 = 0.5 * T4 * (1 + T1 / T2); dVbs0mos_dVe = dVbs0_dVe * (1 + T5); if (selfheat) dVbs0mos_dT = dVbs0_dT - (dVbs0t_dT - dVbs0_dT) * T5; else dVbs0mos_dT = 0.0; /* Prepare Vthfd - treat Vbs0mos as if it were independent variable Vb */ Phis = phi - Vbs0mos; dPhis_dVb = -1; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; sqrtXdep = sqrt(Xdep); T0 = pParam->B3SOIFDdvt2 * Vbs0mos; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIFDdvt2; } else /* Added to avoid any discontinuity problems caused by dvt2*/ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIFDdvt2 * T4 * T4; } lt1 = model->B3SOIFDfactor1 * sqrtXdep * T1; dlt1_dVb = model->B3SOIFDfactor1 * (0.5 / sqrtXdep * T1 * dXdep_dVb + sqrtXdep * T2); T0 = pParam->B3SOIFDdvt2w * Vbs0mos; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIFDdvt2w; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIFDdvt2w * T4 * T4; } ltw= model->B3SOIFDfactor1 * sqrtXdep * T1; dltw_dVb = model->B3SOIFDfactor1 * (0.5 / sqrtXdep * T1 * dXdep_dVb + sqrtXdep * T2); T0 = -0.5 * pParam->B3SOIFDdvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->B3SOIFDthetavth = pParam->B3SOIFDdvt0 * Theta0; Delt_vth = here->B3SOIFDthetavth * V0; dDelt_vth_dVb = pParam->B3SOIFDdvt0 * dTheta0_dVb * V0; if (selfheat) dDelt_vth_dT = here->B3SOIFDthetavth * dvbi_dT; else dDelt_vth_dT = 0.0; T0 = -0.5*pParam->B3SOIFDdvt1w * pParam->B3SOIFDweff*Leff/ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->B3SOIFDdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B3SOIFDdvt0w * dT2_dVb * V0; if (selfheat) dDeltVthw_dT = T0 * dvbi_dT; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B3SOIFDnlx / Leff); T1 = (pParam->B3SOIFDkt1 + pParam->B3SOIFDkt1l / Leff + pParam->B3SOIFDkt2 * Vbs0mos); DeltVthtemp = pParam->B3SOIFDk1 * (T0 - 1.0) * sqrtPhi + T1 * TempRatio; if (selfheat) dDeltVthtemp_dT = T1 / model->B3SOIFDtnom; else dDeltVthtemp_dT = 0.0; tmp2 = model->B3SOIFDtox * phi / (pParam->B3SOIFDweff + pParam->B3SOIFDw0); T3 = pParam->B3SOIFDeta0 + pParam->B3SOIFDetab * Vbs0mos; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B3SOIFDetab; dT3_dVb = T4; } else { dT3_dVb = pParam->B3SOIFDetab; } DIBL_Sft = T3 * pParam->B3SOIFDtheta0vb0 * Vds; dDIBL_Sft_dVd = T3 * pParam->B3SOIFDtheta0vb0; dDIBL_Sft_dVb = pParam->B3SOIFDtheta0vb0 * Vds * dT3_dVb; Vthfd = model->B3SOIFDtype * pParam->B3SOIFDvth0 + pParam->B3SOIFDk1 * (sqrtPhis - sqrtPhi) - pParam->B3SOIFDk2 * Vbs0mos-Delt_vth-DeltVthw +(pParam->B3SOIFDk3 +pParam->B3SOIFDk3b * Vbs0mos) * tmp2 + DeltVthtemp - DIBL_Sft; T6 = pParam->B3SOIFDk3b * tmp2 - pParam->B3SOIFDk2 + pParam->B3SOIFDkt2 * TempRatio; dVthfd_dVd = -dDIBL_Sft_dVd; T7 = pParam->B3SOIFDk1 * dsqrtPhis_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb; dVthfd_dVe = T7 * dVbs0mos_dVe; if (selfheat) dVthfd_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT + T7 * dVbs0mos_dT; else dVthfd_dT = 0.0; /* Effective Vbs0 and Vbs0t for all Vgs */ T1 = Vthfd - Vgs_eff - DELT_Vbs0eff; T2 = sqrt(T1 * T1 + DELT_Vbs0eff * DELT_Vbs0eff ); Vbs0teff = Vbs0t - 0.5 * (T1 + T2); dVbs0teff_dVg = 0.5 * (1 + T1/T2) * dVgs_eff_dVg; dVbs0teff_dVd = - 0.5 * (1 + T1 / T2) * dVthfd_dVd; dVbs0teff_dVe = - 0.5 * (1 + T1 / T2) * dVthfd_dVe; if (selfheat) dVbs0teff_dT = dVbs0t_dT - 0.5 * (1 + T1 / T2) * dVthfd_dT; else dVbs0teff_dT = 0.0; /* Calculate nfb */ T3 = 1 / (K1 * K1); T4 = pParam->B3SOIFDkb3 * Cbox / model->B3SOIFDcox; T8 = sqrt(phi - Vbs0mos); T5 = sqrt(1 + 4 * T3 * (phi + K1 * T8 - Vbs0mos)); T6 = 1 + T4 * T5; Nfb = model->B3SOIFDnfb = 1 / T6; T7 = 2 * T3 * T4 * Nfb * Nfb / T5 * (0.5 * K1 / T8 + 1); Vbs0eff = Vbs0 - Nfb * 0.5 * (T1 + T2); dVbs0eff_dVg = Nfb * 0.5 * (1 + T1/T2) * dVgs_eff_dVg; dVbs0eff_dVd = - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dVd; dVbs0eff_dVe = dVbs0_dVe - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dVe - T7 * 0.5 * (T1 + T2) * dVbs0mos_dVe; if (selfheat) dVbs0eff_dT = dVbs0_dT - Nfb * 0.5 * (1 + T1 / T2) * dVthfd_dT - T7 * 0.5 * (T1 + T2) * dVbs0mos_dT; else dVbs0eff_dT = 0.0; /* Simple check of Vbs */ /* Prepare Vbsdio */ Vbs = Vbsdio = Vbs0eff; dVbsdio_dVg = dVbs0eff_dVg; dVbsdio_dVd = dVbs0eff_dVd; dVbsdio_dVe = dVbs0eff_dVe; dVbsdio_dT = dVbs0eff_dT; dVbsdio_dVb = 0.0; /* Prepare Vbseff */ T1 = Vbs0teff - Vbsdio - DELT_Vbsmos; T2 = sqrt(T1 * T1 + DELT_Vbsmos * DELT_Vbsmos); T3 = 0.5 * (T1 + T2); T5 = 0.5 * (1 + T1/T2); dT3_dVg = T5 * (dVbs0teff_dVg - dVbsdio_dVg); dT3_dVd = T5 * (dVbs0teff_dVd - dVbsdio_dVd); dT3_dVb = - T5 * dVbsdio_dVb; dT3_dVe = T5 * (dVbs0teff_dVe - dVbsdio_dVe); if (selfheat) dT3_dT = T5 * (dVbs0teff_dT - dVbsdio_dT); else dT3_dT = 0.0; T4 = T3 * model->B3SOIFDcsieff / model->B3SOIFDqsieff; Vbsmos = Vbsdio - 0.5 * T3 * T4; dVbsmos_dVg = dVbsdio_dVg - T4 * dT3_dVg; dVbsmos_dVd = dVbsdio_dVd - T4 * dT3_dVd; dVbsmos_dVb = dVbsdio_dVb - T4 * dT3_dVb; dVbsmos_dVe = dVbsdio_dVe - T4 * dT3_dVe; if (selfheat) dVbsmos_dT = dVbsdio_dT - T4 * dT3_dT; else dVbsmos_dT = 0.0; /* Prepare Vcs */ Vcs = Vbsdio - Vbs0eff; dVcs_dVb = dVbsdio_dVb; dVcs_dVg = dVbsdio_dVg - dVbs0eff_dVg; dVcs_dVd = dVbsdio_dVd - dVbs0eff_dVd; dVcs_dVe = dVbsdio_dVe - dVbs0eff_dVe; dVcs_dT = dVbsdio_dT - dVbs0eff_dT; /* Check Vps */ /* Note : if Vps is less Vbs0eff => non-physical */ T1 = Vps - Vbs0eff + DELT_Vbs0dio; T2 = sqrt(T1 * T1 + DELT_Vbs0dio * DELT_Vbs0dio); T3 = 0.5 * (1 + T1/T2); Vpsdio = Vbs0eff + 0.5 * (T1 + T2); dVpsdio_dVg = (1 - T3) * dVbs0eff_dVg; dVpsdio_dVd = (1 - T3) * dVbs0eff_dVd; dVpsdio_dVe = (1 - T3) * dVbs0eff_dVe; if (selfheat) dVpsdio_dT = (1 - T3) * dVbs0eff_dT; else dVpsdio_dT = 0.0; dVpsdio_dVp = T3; Vbp = Vbsdio - Vpsdio; dVbp_dVb = dVbsdio_dVb; dVbp_dVg = dVbsdio_dVg - dVpsdio_dVg; dVbp_dVd = dVbsdio_dVd - dVpsdio_dVd; dVbp_dVe = dVbsdio_dVe - dVpsdio_dVe; dVbp_dT = dVbsdio_dT - dVpsdio_dT; dVbp_dVp = - dVpsdio_dVp; here->B3SOIFDvbsdio = Vbsdio; here->B3SOIFDvbs0eff = Vbs0eff; T1 = phi - pParam->B3SOIFDdelp; T2 = T1 - Vbsmos - DELT_Vbseff; T3 = sqrt(T2 * T2 + 4.0 * DELT_Vbseff * T1); Vbseff = T1 - 0.5 * (T2 + T3); T4 = 0.5 * (1 + T2/T3); dVbseff_dVg = T4 * dVbsmos_dVg; dVbseff_dVd = T4 * dVbsmos_dVd; dVbseff_dVb = T4 * dVbsmos_dVb; dVbseff_dVe = T4 * dVbsmos_dVe; if (selfheat) dVbseff_dT = T4 * dVbsmos_dT; else dVbseff_dT = 0.0; here->B3SOIFDvbseff = Vbseff; Phis = phi - Vbseff; dPhis_dVb = -1; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis ; Xdep = Xdep0 * sqrtPhis / sqrtPhi; dXdep_dVb = (Xdep0 / sqrtPhi) * dsqrtPhis_dVb; /* Vth Calculation */ T3 = sqrt(Xdep); T0 = pParam->B3SOIFDdvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIFDdvt2 ; } else /* Added to avoid any discontinuity problems caused by dvt2 */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIFDdvt2 * T4 * T4 ; } lt1 = model->B3SOIFDfactor1 * T3 * T1; dlt1_dVb =model->B3SOIFDfactor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->B3SOIFDdvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->B3SOIFDdvt2w ; } else /* Added to avoid any discontinuity problems caused by dvt2w */ { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->B3SOIFDdvt2w * T4 * T4 ; } ltw= model->B3SOIFDfactor1 * T3 * T1; dltw_dVb=model->B3SOIFDfactor1*(0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = -0.5 * pParam->B3SOIFDdvt1 * Leff / lt1; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); Theta0 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / lt1 * T1 * dlt1_dVb; dTheta0_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; Theta0 = T1 * (1.0 + 2.0 * T1); dTheta0_dVb = 0.0; } here->B3SOIFDthetavth = pParam->B3SOIFDdvt0 * Theta0; Delt_vth = here->B3SOIFDthetavth * V0; dDelt_vth_dVb = pParam->B3SOIFDdvt0 * dTheta0_dVb * V0; if (selfheat) dDelt_vth_dT = here->B3SOIFDthetavth * dvbi_dT; else dDelt_vth_dT = 0.0; T0 = -0.5 * pParam->B3SOIFDdvt1w * pParam->B3SOIFDweff * Leff / ltw; if (T0 > -EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 * (1.0 + 2.0 * T1); dT1_dVb = -T0 / ltw * T1 * dltw_dVb; dT2_dVb = (1.0 + 4.0 * T1) * dT1_dVb; } else { T1 = MIN_EXP; T2 = T1 * (1.0 + 2.0 * T1); dT2_dVb = 0.0; } T0 = pParam->B3SOIFDdvt0w * T2; DeltVthw = T0 * V0; dDeltVthw_dVb = pParam->B3SOIFDdvt0w * dT2_dVb * V0; if (selfheat) dDeltVthw_dT = T0 * dvbi_dT; else dDeltVthw_dT = 0.0; T0 = sqrt(1.0 + pParam->B3SOIFDnlx / Leff); T1 = (pParam->B3SOIFDkt1 + pParam->B3SOIFDkt1l / Leff + pParam->B3SOIFDkt2 * Vbseff); DeltVthtemp = pParam->B3SOIFDk1 * (T0 - 1.0) * sqrtPhi + T1 * TempRatio; if (selfheat) dDeltVthtemp_dT = T1 / model->B3SOIFDtnom; else dDeltVthtemp_dT = 0.0; tmp2 = model->B3SOIFDtox * phi / (pParam->B3SOIFDweff + pParam->B3SOIFDw0); T3 = pParam->B3SOIFDeta0 + pParam->B3SOIFDetab * Vbseff; if (T3 < 1.0e-4) /* avoid discontinuity problems caused by etab */ { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9 * pParam->B3SOIFDetab; dT3_dVb = T4 ; } else { dT3_dVb = pParam->B3SOIFDetab ; } DIBL_Sft = T3 * pParam->B3SOIFDtheta0vb0 * Vds; dDIBL_Sft_dVd = pParam->B3SOIFDtheta0vb0 * T3; dDIBL_Sft_dVb = pParam->B3SOIFDtheta0vb0 * Vds * dT3_dVb; Vth = model->B3SOIFDtype * pParam->B3SOIFDvth0 + pParam->B3SOIFDk1 * (sqrtPhis - sqrtPhi) - pParam->B3SOIFDk2 * Vbseff- Delt_vth - DeltVthw +(pParam->B3SOIFDk3 + pParam->B3SOIFDk3b * Vbseff) * tmp2 + DeltVthtemp - DIBL_Sft; here->B3SOIFDvon = Vth; T6 = pParam->B3SOIFDk3b * tmp2 - pParam->B3SOIFDk2 + pParam->B3SOIFDkt2 * TempRatio; dVth_dVb = pParam->B3SOIFDk1 * dsqrtPhis_dVb - dDelt_vth_dVb - dDeltVthw_dVb + T6 - dDIBL_Sft_dVb; /* this is actually dVth_dVbseff */ dVth_dVd = -dDIBL_Sft_dVd; if (selfheat) dVth_dT = dDeltVthtemp_dT - dDelt_vth_dT - dDeltVthw_dT; else dVth_dT = 0.0; /* Calculate n */ T2 = pParam->B3SOIFDnfactor * EPSSI / Xdep; dT2_dVb = - T2 / Xdep * dXdep_dVb; T3 = pParam->B3SOIFDcdsc + pParam->B3SOIFDcdscb * Vbseff + pParam->B3SOIFDcdscd * Vds; dT3_dVb = pParam->B3SOIFDcdscb; dT3_dVd = pParam->B3SOIFDcdscd; T4 = (T2 + T3 * Theta0 + pParam->B3SOIFDcit) / model->B3SOIFDcox; dT4_dVb = (dT2_dVb + Theta0 * dT3_dVb + dTheta0_dVb * T3) / model->B3SOIFDcox; dT4_dVd = Theta0 * dT3_dVd / model->B3SOIFDcox; if (T4 >= -0.5) { n = 1.0 + T4; dn_dVb = dT4_dVb; dn_dVd = dT4_dVd; } else /* avoid discontinuity problems caused by T4 */ { T0 = 1.0 / (3.0 + 8.0 * T4); n = (1.0 + 3.0 * T4) * T0; T0 *= T0; dn_dVb = T0 * dT4_dVb; dn_dVd = T0 * dT4_dVd; } /* Effective Vgst (Vgsteff) Calculation */ Vgst = Vgs_eff - Vth; T10 = 2.0 * n * Vtm; VgstNVt = Vgst / T10; ExpArg = (2.0 * pParam->B3SOIFDvoff - Vgst) / T10; /* MCJ: Very small Vgst */ if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst; /* T0 is dVgsteff_dVbseff */ T0 = -dVth_dVb; dVgsteff_dVg = dVgs_eff_dVg + T0 * dVbseff_dVg; dVgsteff_dVd = -dVth_dVd + T0 * dVbseff_dVd; dVgsteff_dVb = T0 * dVbseff_dVb; dVgsteff_dVe = T0 * dVbseff_dVe; if (selfheat) dVgsteff_dT = -dVth_dT + T0 * dVbseff_dT; else dVgsteff_dT = 0.0; } else if (ExpArg > EXP_THRESHOLD) { T0 = (Vgst - pParam->B3SOIFDvoff) / (n * Vtm); ExpVgst = exp(T0); Vgsteff = Vtm * pParam->B3SOIFDcdep0 / model->B3SOIFDcox * ExpVgst; T3 = Vgsteff / (n * Vtm) ; /* T1 is dVgsteff_dVbseff */ T1 = -T3 * (dVth_dVb + T0 * Vtm * dn_dVb); dVgsteff_dVg = T3 * dVgs_eff_dVg + T1 * dVbseff_dVg; dVgsteff_dVd = -T3 * (dVth_dVd + T0 * Vtm * dn_dVd) + T1 * dVbseff_dVd; dVgsteff_dVe = T1 * dVbseff_dVe; dVgsteff_dVb = T1 * dVbseff_dVb; if (selfheat) dVgsteff_dT = -T3 * (dVth_dT + T0 * dVtm_dT * n) + Vgsteff / Temp + T1 * dVbseff_dT; else dVgsteff_dT = 0.0; } else { ExpVgst = exp(VgstNVt); T1 = T10 * log(1.0 + ExpVgst); dT1_dVg = ExpVgst / (1.0 + ExpVgst); dT1_dVb = -dT1_dVg * (dVth_dVb + Vgst / n * dn_dVb) + T1 / n * dn_dVb; dT1_dVd = -dT1_dVg * (dVth_dVd + Vgst / n * dn_dVd) + T1 / n * dn_dVd; T3 = (1.0 / Temp); if (selfheat) dT1_dT = -dT1_dVg * (dVth_dT + Vgst * T3) + T1 * T3; else dT1_dT = 0.0; dT2_dVg = -model->B3SOIFDcox / (Vtm * pParam->B3SOIFDcdep0) * exp(ExpArg); T2 = 1.0 - T10 * dT2_dVg; dT2_dVd = -dT2_dVg * (dVth_dVd - 2.0 * Vtm * ExpArg * dn_dVd) + (T2 - 1.0) / n * dn_dVd; dT2_dVb = -dT2_dVg * (dVth_dVb - 2.0 * Vtm * ExpArg * dn_dVb) + (T2 - 1.0) / n * dn_dVb; if (selfheat) dT2_dT = -dT2_dVg * (dVth_dT - ExpArg * T10 * T3); else dT2_dT = 0.0; Vgsteff = T1 / T2; T3 = T2 * T2; /* T4 is dVgsteff_dVbseff */ T4 = (T2 * dT1_dVb - T1 * dT2_dVb) / T3; dVgsteff_dVb = T4 * dVbseff_dVb; dVgsteff_dVe = T4 * dVbseff_dVe; dVgsteff_dVg = (T2 * dT1_dVg - T1 * dT2_dVg) / T3 * dVgs_eff_dVg + T4 * dVbseff_dVg; dVgsteff_dVd = (T2 * dT1_dVd - T1 * dT2_dVd) / T3 + T4 * dVbseff_dVd; if (selfheat) dVgsteff_dT = (T2 * dT1_dT - T1 * dT2_dT) / T3 + T4 * dVbseff_dT; else dVgsteff_dT = 0.0; } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (selfheat) dVgst2Vtm_dT = 2.0 * dVtm_dT; else dVgst2Vtm_dT = 0.0; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - sqrtPhi; Weff = pParam->B3SOIFDweff - 2.0 * (pParam->B3SOIFDdwg * Vgsteff + pParam->B3SOIFDdwb * T9); dWeff_dVg = -2.0 * pParam->B3SOIFDdwg; dWeff_dVb = -2.0 * pParam->B3SOIFDdwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } T0 = pParam->B3SOIFDprwg * Vgsteff + pParam->B3SOIFDprwb * T9; if (T0 >= -0.9) { Rds = rds0 * (1.0 + T0); dRds_dVg = rds0 * pParam->B3SOIFDprwg; dRds_dVb = rds0 * pParam->B3SOIFDprwb * dsqrtPhis_dVb; if (selfheat) dRds_dT = (1.0 + T0) * drds0_dT; else dRds_dT = 0.0; } else /* to avoid the discontinuity problem due to prwg and prwb*/ { T1 = 1.0 / (17.0 + 20.0 * T0); Rds = rds0 * (0.8 + T0) * T1; T1 *= T1; dRds_dVg = rds0 * pParam->B3SOIFDprwg * T1; dRds_dVb = rds0 * pParam->B3SOIFDprwb * dsqrtPhis_dVb * T1; if (selfheat) dRds_dT = (0.8 + T0) * T1 * drds0_dT; else dRds_dT = 0.0; } /* Calculate Abulk */ if (pParam->B3SOIFDa0 == 0.0) { Abulk0 = Abulk = dAbulk0_dVb = dAbulk_dVg = dAbulk_dVb = 0.0; } else { T1 = 0.5 * pParam->B3SOIFDk1 / sqrtPhi; T9 = sqrt(model->B3SOIFDxj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->B3SOIFDa0 * T5; tmp3 = pParam->B3SOIFDweff + pParam->B3SOIFDb1; tmp4 = pParam->B3SOIFDb0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 * tmp2 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = T1 * T2; dAbulk0_dVb = T1 * dT2_dVb; T8 = pParam->B3SOIFDags * pParam->B3SOIFDa0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * 3.0 * T1 * dT2_dVb / tmp2; } if (Abulk0 < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk0); Abulk0 = (0.02 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.01) { T9 = 1.0 / (3.0 - 200.0 * Abulk); Abulk = (0.02 - Abulk) * T9; dAbulk_dVb *= T9 * T9; } T2 = pParam->B3SOIFDketa * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->B3SOIFDketa * T0 * T0 ; } else /* added to avoid the problems caused by Keta */ { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->B3SOIFDketa * T1 * T1 ; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; Abulk += 1; Abulk0 += 1; /* Prepare Abeff */ T0 = pParam->B3SOIFDabp * Vgst2Vtm; T1 = 1 - Vcs / T0 - DELT_Xcsat; T2 = sqrt(T1 * T1 + DELT_Xcsat * DELT_Xcsat); T3 = 1 - 0.5 * (T1 + T2); T5 = -0.5 * (1 + T1 / T2); dT1_dVg = Vcs / Vgst2Vtm / T0; dT3_dVg = T5 * dT1_dVg; dT1_dVc = - 1 / T0; dT3_dVc = T5 * dT1_dVc; Xcsat = pParam->B3SOIFDmxc * T3 * T3 + (1 - pParam->B3SOIFDmxc)*T3; T4 = 2 * pParam->B3SOIFDmxc * T3 + (1 - pParam->B3SOIFDmxc); dXcsat_dVg = T4 * dT3_dVg; dXcsat_dVc = T4 * dT3_dVc; Abeff = Xcsat * Abulk + (1 - Xcsat) * model->B3SOIFDadice; T0 = Xcsat * dAbulk_dVg + Abulk * dXcsat_dVg; dAbeff_dVg = T0 - model->B3SOIFDadice * dXcsat_dVg; dAbeff_dVb = Xcsat * dAbulk_dVb; dAbeff_dVc = (Abulk - model->B3SOIFDadice) * dXcsat_dVc; here->B3SOIFDabeff = Abeff; /* Mobility calculation */ if (model->B3SOIFDmobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = ua + uc * Vbseff; T3 = T0 / model->B3SOIFDtox; T5 = T3 * (T2 + ub * T3); dDenomi_dVg = (T2 + 2.0 * ub * T3) / model->B3SOIFDtox; dDenomi_dVd = dDenomi_dVg * 2 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2 * dVth_dVb + uc * T3 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2 * dVth_dT + (dua_dT + Vbseff * duc_dT + dub_dT * T3 ) * T3; else dDenomi_dT = 0.0; } else if (model->B3SOIFDmobMod == 2) { T5 = Vgsteff / model->B3SOIFDtox * (ua + uc * Vbseff + ub * Vgsteff / model->B3SOIFDtox); dDenomi_dVg = (ua + uc * Vbseff + 2.0 * ub * Vgsteff / model->B3SOIFDtox) / model->B3SOIFDtox; dDenomi_dVd = 0.0; dDenomi_dVb = Vgsteff * uc / model->B3SOIFDtox ; if (selfheat) dDenomi_dT = Vgsteff / model->B3SOIFDtox * (dua_dT + Vbseff * duc_dT + dub_dT * Vgsteff / model->B3SOIFDtox); else dDenomi_dT = 0.0; } else /* mobMod == 3 */ { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + uc * Vbseff; T3 = T0 / model->B3SOIFDtox; T4 = T3 * (ua + ub * T3); T5 = T4 * T2; dDenomi_dVg = (ua + 2.0 * ub * T3) * T2 / model->B3SOIFDtox; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + uc * T4 ; if (selfheat) dDenomi_dT = dDenomi_dVg * 2.0 * dVth_dT + (dua_dT + dub_dT * T3) * T3 * T2 + T4 * Vbseff * duc_dT; else dDenomi_dT = 0.0; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else /* Added to avoid the discontinuity problem caused by ua and ub*/ { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; if (selfheat) dDenomi_dT *= T9; else dDenomi_dT = 0.0; } here->B3SOIFDueff = ueff = u0temp / Denomi; T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; if (selfheat) dueff_dT = T9 * dDenomi_dT + du0temp_dT / Denomi; else dueff_dT = 0.0; /* Saturation Drain Voltage Vdsat */ WVCox = Weff * vsattemp * model->B3SOIFDcox; WVCoxRds = WVCox * Rds; /* dWVCoxRds_dT = WVCox * dRds_dT + Weff * model->B3SOIFDcox * Rds * dvsattemp_dT; */ Esat = 2.0 * vsattemp / ueff; EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; if (selfheat) dEsatL_dT = T0 * dueff_dT + EsatL / vsattemp * dvsattemp_dT; else dEsatL_dT = 0.0; /* Sqrt() */ a1 = pParam->B3SOIFDa1; if (a1 == 0.0) { Lambda = pParam->B3SOIFDa2; dLambda_dVg = 0.0; } else if (a1 > 0.0) /* Added to avoid the discontinuity problem caused by a1 and a2 (Lambda) */ { T0 = 1.0 - pParam->B3SOIFDa2; T1 = T0 - pParam->B3SOIFDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->B3SOIFDa2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIFDa1 * (1.0 + T1 / T2); } else { T1 = pParam->B3SOIFDa2 + pParam->B3SOIFDa1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->B3SOIFDa2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->B3SOIFDa1 * (1.0 + T1 / T2); } if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abeff * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abeff * dEsatL_dVg + EsatL * dAbeff_dVg + 1.0) * T1; dT0_dVd = -(Abeff * dEsatL_dVd) * T1; dT0_dVb = -(Abeff * dEsatL_dVb + EsatL * dAbeff_dVb) * T1; dT0_dVc = 0.0; if (selfheat) dT0_dT = -(Abeff * dEsatL_dT + dVgst2Vtm_dT) * T1; else dT0_dT = 0.0; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; dVdsat_dVc = 0.0; if (selfheat) dVdsat_dT = T3 * dT0_dT + T2 * dEsatL_dT + EsatL * T0 * dVgst2Vtm_dT; else dVdsat_dT = 0.0; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abeff * WVCoxRds; T8 = Abeff * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abeff * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abeff * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbeff_dVg); /* dT0_dVb = 2.0 * (T8 * tmp3 this is equivalent to one below, but simpler + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbeff_dVg); */ dT0_dVb = 2.0 * (T8 * (2.0 / Abeff * dAbeff_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbeff_dVb); dT0_dVd = 0.0; dT0_dVc = 0.0; if (selfheat) { tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; dT0_dT = 2.0 * T8 * tmp4; } else tmp4 = dT0_dT = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abeff * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abeff * dEsatL_dVg + EsatL * dAbeff_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbeff_dVg); dT1_dVb = Abeff * dEsatL_dVb + EsatL * dAbeff_dVb + 3.0 * (T6 * dAbeff_dVb + T7 * tmp3); dT1_dVd = Abeff * dEsatL_dVd; dT1_dVc = 0.0; if (selfheat) { tmp4 += dVgst2Vtm_dT / Vgst2Vtm; dT1_dT = (2.0 / Lambda - 1.0) * dVgst2Vtm_dT + Abeff * dEsatL_dT + 3.0 * T7 * tmp4; } else dT1_dT = 0.0; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; if (selfheat) dT2_dT = Vgst2Vtm * dEsatL_dT + EsatL * dVgst2Vtm_dT + 2.0 * T6 * (dVgst2Vtm_dT + Vgst2Vtm * tmp4); else dT2_dT = 0.0; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; dVdsat_dVc = 0.0; if (selfheat) dVdsat_dT = (dT1_dT - (T1 * dT1_dT - dT0_dT * T2 - T0 * dT2_dT) / T3 - Vdsat * dT0_dT) / T0; else dVdsat_dT = 0.0; } here->B3SOIFDvdsat = Vdsat; /* Vdsatii for impact ionization */ if (pParam->B3SOIFDaii > 0.0) { if (pParam->B3SOIFDcii != 0.0) { T0 = pParam->B3SOIFDcii / sqrt(3.0) + pParam->B3SOIFDdii; /* Hard limit Vds to T0 => T4 i.e. limit T0 to 3.0 */ T1 = Vds - T0 - 0.1; T2 = sqrt(T1 * T1 + 0.4); T3 = T0 + 0.5 * (T1 + T2); dT3_dVd = 0.5 * (1.0 + T1/T2); T4 = T3 - pParam->B3SOIFDdii; T5 = pParam->B3SOIFDcii / T4; T0 = T5 * T5; dT0_dVd = - 2 * T0 / T4 * dT3_dVd; } else { T0 = dT0_dVd = 0.0; } T0 += 1.0; T3 = pParam->B3SOIFDaii + pParam->B3SOIFDbii / Leff; T4 = 1.0 / (T0 * Vgsteff + T3 * EsatL); T5 = -T4 * T4; T6 = Vgsteff * T4; T7 = EsatL * Vgsteff; Vdsatii = T7 * T4; dT4_dVg = T5 * (T0 + T3 * dEsatL_dVg); dT4_dVb = T5 * T3 * dEsatL_dVb; dT4_dVd = T5 * (Vgsteff * dT0_dVd + T3 * dEsatL_dVd); if (selfheat) dT4_dT = T5 * (T3 * dEsatL_dT); else dT4_dT = 0.0; T8 = T4 * Vgsteff; dVdsatii_dVg = T7 * dT4_dVg + T4 * (EsatL + Vgsteff * dEsatL_dVg); dVdsatii_dVb = T7 * dT4_dVb + T8 * dEsatL_dVb; dVdsatii_dVd = T7 * dT4_dVd + T8 * dEsatL_dVd; if (selfheat) dVdsatii_dT = T7 * dT4_dT + T8 * dEsatL_dT; else dVdsatii_dT = 0.0; } else { Vdsatii = Vdsat; dVdsatii_dVg = dVdsat_dVg; dVdsatii_dVb = dVdsat_dVb; dVdsatii_dVd = dVdsat_dVd; dVdsatii_dT = dVdsat_dT; } /* Effective Vds (Vdseff) Calculation */ T1 = Vdsat - Vds - pParam->B3SOIFDdelta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; dT1_dVc = dVdsat_dVc; dT1_dT = dVdsat_dT; T2 = sqrt(T1 * T1 + 4.0 * pParam->B3SOIFDdelta * Vdsat); T0 = T1 / T2; T3 = 2.0 * pParam->B3SOIFDdelta / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; dT2_dVc = 0.0; if (selfheat) dT2_dT = T0 * dT1_dT + T3 * dVdsat_dT; else dT2_dT = 0.0; Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); dVdseff_dVc = 0.0; if (selfheat) dVdseff_dT = dVdsat_dT - 0.5 * (dT1_dT + dT2_dT); else dVdseff_dT = 0.0; if (Vdseff > Vds) Vdseff = Vds; /* This code is added to fixed the problem caused by computer precision when Vds is very close to Vdseff. */ diffVds = Vds - Vdseff; /* Effective Vdsii for Iii calculation */ T1 = Vdsatii - Vds - pParam->B3SOIFDdelta; T2 = sqrt(T1 * T1 + 4.0 * pParam->B3SOIFDdelta * Vdsatii); T0 = T1 / T2; T3 = 2.0 * pParam->B3SOIFDdelta / T2; T4 = T0 + T3; dT2_dVg = T4 * dVdsatii_dVg; dT2_dVd = T4 * dVdsatii_dVd - T0; dT2_dVb = T4 * dVdsatii_dVb; if (selfheat) dT2_dT = T4*dVdsatii_dT; else dT2_dT = 0.0; Vdseffii = Vdsatii - 0.5 * (T1 + T2); dVdseffii_dVg = 0.5 * (dVdsatii_dVg - dT2_dVg); dVdseffii_dVd = 0.5 * (dVdsatii_dVd - dT2_dVd + 1.0); dVdseffii_dVb = 0.5 * (dVdsatii_dVb - dT2_dVb); if (selfheat) dVdseffii_dT = 0.5 * (dVdsatii_dT - dT2_dT); else dVdseffii_dT = 0.0; diffVdsii = Vds - Vdseffii; /* Calculate VAsat */ tmp4 = 1.0 - 0.5 * Abeff * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abeff * dVdsat_dVg - Abeff * Vdsat / Vgst2Vtm + Vdsat * dAbeff_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbeff_dVb * Vdsat + Abeff * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abeff * dVdsat_dVd; dT0_dVc = 0.0; if (selfheat) { tmp4 = dRds_dT / Rds + dvsattemp_dT / vsattemp; dT0_dT = dEsatL_dT + dVdsat_dT + T7 * tmp4 * Vgsteff - T8 * (Abeff * dVdsat_dT - Abeff * Vdsat * dVgst2Vtm_dT / Vgst2Vtm); } else dT0_dT = 0.0; T9 = WVCoxRds * Abeff; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abeff * tmp2 + dAbeff_dVg); dT1_dVb = dAbeff_dVb * WVCoxRds + T9 * tmp3; dT1_dVc = 0.0; if (selfheat) dT1_dT = T9 * tmp4; else dT1_dT = 0.0; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; dVasat_dVc = 0.0; if (selfheat) dVasat_dT = (dT0_dT - Vasat * dT1_dT) / T1; else dVasat_dT = 0.0; /* Calculate VACLM */ if ((pParam->B3SOIFDpclm > 0.0) && (diffVds > 1.0e-10)) { T0 = 1.0 / (pParam->B3SOIFDpclm * Abeff * pParam->B3SOIFDlitl); dT0_dVb = -T0 / Abeff * dAbeff_dVb; dT0_dVg = -T0 / Abeff * dAbeff_dVg; dT0_dVc = 0.0; T2 = Vgsteff / EsatL; T1 = Leff * (Abeff + T2); dT1_dVg = Leff * ((1.0 - T2 * dEsatL_dVg) / EsatL + dAbeff_dVg); dT1_dVb = Leff * (dAbeff_dVb - T2 * dEsatL_dVb / EsatL); dT1_dVd = -T2 * dEsatL_dVd / Esat; dT1_dVc = 0.0; if (selfheat) dT1_dT = -T2 * dEsatL_dT / Esat; else dT1_dT = 0.0; T9 = T0 * T1; VACLM = T9 * diffVds; dVACLM_dVg = T0 * dT1_dVg * diffVds - T9 * dVdseff_dVg + T1 * diffVds * dT0_dVg; dVACLM_dVb = (dT0_dVb * T1 + T0 * dT1_dVb) * diffVds - T9 * dVdseff_dVb; dVACLM_dVd = T0 * dT1_dVd * diffVds + T9 * (1.0 - dVdseff_dVd); dVACLM_dVc = 0.0; if (selfheat) dVACLM_dT = T0 * dT1_dT * diffVds - T9 * dVdseff_dT; else dVACLM_dT = 0.0; } else { VACLM = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = dVACLM_dVc = dVACLM_dT = 0.0; } /* Calculate VADIBL */ if (pParam->B3SOIFDthetaRout > 0.0) { T8 = Abeff * Vdsat; T0 = Vgst2Vtm * T8; T1 = Vgst2Vtm + T8; dT0_dVg = Vgst2Vtm * Abeff * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbeff_dVg; dT1_dVg = 1.0 + Abeff * dVdsat_dVg + Vdsat * dAbeff_dVg; dT1_dVb = dAbeff_dVb * Vdsat + Abeff * dVdsat_dVb; dT0_dVb = Vgst2Vtm * dT1_dVb; dT1_dVd = Abeff * dVdsat_dVd; dT0_dVd = Vgst2Vtm * dT1_dVd; dT0_dVc = dT1_dVc = 0.0; if (selfheat) { dT0_dT = dVgst2Vtm_dT * T8 + Abeff * Vgst2Vtm * dVdsat_dT; dT1_dT = dVgst2Vtm_dT + Abeff * dVdsat_dT; } else dT0_dT = dT1_dT = 0.0; T9 = T1 * T1; T2 = pParam->B3SOIFDthetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; dVADIBL_dVc = 0.0; if (selfheat) dVADIBL_dT = (dVgst2Vtm_dT - dT0_dT/T1 + T0*dT1_dT/T9) / T2; else dVADIBL_dT = 0.0; T7 = pParam->B3SOIFDpdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->B3SOIFDpdiblb) * T3; dVADIBL_dVd *= T3; dVADIBL_dVc *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; } else /* Added to avoid the discontinuity problem caused by pdiblcb */ { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->B3SOIFDpdiblb * T4 * T4; dVADIBL_dVd *= T3; dVADIBL_dVc *= T3; if (selfheat) dVADIBL_dT *= T3; else dVADIBL_dT = 0.0; VADIBL *= T3; } } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = dVADIBL_dVc = dVADIBL_dT = 0.0; } /* Calculate VA */ T8 = pParam->B3SOIFDpvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { T0 = 1.0 + T9; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dT0_dVb = -T9 * dEsatL_dVb / EsatL; dT0_dVd = -T9 * dEsatL_dVd / EsatL; if (selfheat) dT0_dT = -T9 * dEsatL_dT / EsatL; else dT0_dT = 0.0; } else /* Added to avoid the discontinuity problems caused by pvag */ { T1 = 1.0 / (17.0 + 20.0 * T9); T0 = (0.8 + T9) * T1; T1 *= T1; dT0_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T1; T9 *= T1 / EsatL; dT0_dVb = -T9 * dEsatL_dVb; dT0_dVd = -T9 * dEsatL_dVd; if (selfheat) dT0_dT = -T9 * dEsatL_dT; else dT0_dT = 0.0; } tmp1 = VACLM * VACLM; tmp2 = VADIBL * VADIBL; tmp3 = VACLM + VADIBL; T1 = VACLM * VADIBL / tmp3; tmp3 *= tmp3; dT1_dVg = (tmp1 * dVADIBL_dVg + tmp2 * dVACLM_dVg) / tmp3; dT1_dVd = (tmp1 * dVADIBL_dVd + tmp2 * dVACLM_dVd) / tmp3; dT1_dVb = (tmp1 * dVADIBL_dVb + tmp2 * dVACLM_dVb) / tmp3; dT1_dVc = 0.0; if (selfheat) dT1_dT = (tmp1 * dVADIBL_dT + tmp2 * dVACLM_dT ) / tmp3; else dT1_dT = 0.0; Va = Vasat + T0 * T1; dVa_dVg = dVasat_dVg + T1 * dT0_dVg + T0 * dT1_dVg; dVa_dVd = dVasat_dVd + T1 * dT0_dVd + T0 * dT1_dVd; dVa_dVb = dVasat_dVb + T1 * dT0_dVb + T0 * dT1_dVb; dVa_dVc = 0.0; if (selfheat) dVa_dT = dVasat_dT + T1 * dT0_dT + T0 * dT1_dT; else dVa_dT = 0.0; /* Calculate Ids */ CoxWovL = model->B3SOIFDcox * Weff / Leff; beta = ueff * CoxWovL; dbeta_dVg = CoxWovL * dueff_dVg + beta * dWeff_dVg / Weff; dbeta_dVd = CoxWovL * dueff_dVd; dbeta_dVb = CoxWovL * dueff_dVb + beta * dWeff_dVb / Weff; if (selfheat) dbeta_dT = CoxWovL * dueff_dT; else dbeta_dT = 0.0; T0 = 1.0 - 0.5 * Abeff * Vdseff / Vgst2Vtm; dT0_dVg = -0.5 * (Abeff * dVdseff_dVg - Abeff * Vdseff / Vgst2Vtm + Vdseff * dAbeff_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abeff * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abeff * dVdseff_dVb + dAbeff_dVb * Vdseff) / Vgst2Vtm; dT0_dVc = 0.0; if (selfheat) dT0_dT = -0.5 * (Abeff * dVdseff_dT - Abeff * Vdseff / Vgst2Vtm * dVgst2Vtm_dT) / Vgst2Vtm; else dT0_dT = 0.0; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; dfgche1_dVc = 0.0; if (selfheat) dfgche1_dT = Vgsteff * dT0_dT; else dfgche1_dT = 0.0; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; dfgche2_dVc = 0.0; if (selfheat) dfgche2_dT = (dVdseff_dT - T9 * dEsatL_dT) / EsatL; else dfgche2_dT = 0.0; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; dgche_dVc = 0.0; if (selfheat) dgche_dT = (beta * dfgche1_dT + fgche1 * dbeta_dT - gche * dfgche2_dT) / fgche2; else dgche_dT = 0.0; T0 = 1.0 + gche * Rds; T9 = Vdseff / T0; Idl = gche * T9; /* Whoa, these formulas for the derivatives of Idl are convoluted, but I verified them to be correct */ dIdl_dVg = (gche * dVdseff_dVg + T9 * dgche_dVg) / T0 - Idl * gche / T0 * dRds_dVg ; dIdl_dVd = (gche * dVdseff_dVd + T9 * dgche_dVd) / T0; dIdl_dVb = (gche * dVdseff_dVb + T9 * dgche_dVb - Idl * dRds_dVb * gche) / T0; dIdl_dVc = 0.0; if (selfheat) dIdl_dT = (gche * dVdseff_dT + T9 * dgche_dT - Idl * dRds_dT * gche) / T0; else dIdl_dT = 0.0; T9 = diffVds / Va; T0 = 1.0 + T9; here->B3SOIFDids = Ids = Idl * T0; Gm0 = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVa_dVg) / Va; Gds0 = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVa_dVd) / Va; Gmb0 = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVa_dVb) / Va; Gmc = 0.0; if (selfheat) GmT0 = T0 * dIdl_dT - Idl * (dVdseff_dT + T9 * dVa_dT) / Va; else GmT0 = 0.0; /* This includes all dependencies from Vgsteff, Vbseff, Vcs */ Gm = Gm0 * dVgsteff_dVg + Gmb0 * dVbseff_dVg + Gmc * dVcs_dVg; Gmb = Gm0 * dVgsteff_dVb + Gmb0 * dVbseff_dVb + Gmc * dVcs_dVb; Gds = Gm0 * dVgsteff_dVd + Gmb0 * dVbseff_dVd + Gmc * dVcs_dVd + Gds0; Gme = Gm0 * dVgsteff_dVe + Gmb0 * dVbseff_dVe + Gmc * dVcs_dVe; if (selfheat) GmT = Gm0 * dVgsteff_dT + Gmb0 * dVbseff_dT + Gmc * dVcs_dT + GmT0; else GmT = 0.0; /* calculate substrate current Iii */ Giig = Giib = Giid = Giie = GiiT = 0.0; here->B3SOIFDiii = Iii = 0.0; Idgidl = Gdgidld = Gdgidlg = 0.0; Isgidl = Gsgidlg = 0; here->B3SOIFDibs = Ibs = 0.0; here->B3SOIFDibd = Ibd = 0.0; here->B3SOIFDic = Ic = 0.0; Gjsb = Gjsd = GjsT = 0.0; Gjdb = Gjdd = GjdT = 0.0; Gcd = Gcb = GcT = 0.0; here->B3SOIFDibp = Ibp = 0.0; here->B3SOIFDgbpbs = here->B3SOIFDgbpgs = here->B3SOIFDgbpds = 0.0; here->B3SOIFDgbpes = here->B3SOIFDgbpps = here->B3SOIFDgbpT = here->B3SOIFDcbodcon = 0.0; Gbpbs = Gbpgs = Gbpds = Gbpes = Gbpps = GbpT = 0.0; /* Current going out of drainprime node into the drain of device */ /* "node" means the SPICE circuit node */ here->B3SOIFDcdrain = Ids + Ic; here->B3SOIFDcd = Ids + Ic - Ibd + Iii + Idgidl; here->B3SOIFDcb = Ibs + Ibd + Ibp - Iii - Idgidl - Isgidl; here->B3SOIFDgds = Gds + Gcd; here->B3SOIFDgm = Gm; here->B3SOIFDgmbs = Gmb + Gcb; here->B3SOIFDgme = Gme; if (selfheat) here->B3SOIFDgmT = GmT + GcT; else here->B3SOIFDgmT = 0.0; /* note that sign is switched because power flows out of device into the temperature node. Currently ommit self-heating due to bipolar current because it can cause convergence problem*/ here->B3SOIFDgtempg = -Gm * Vds; here->B3SOIFDgtempb = -Gmb * Vds; here->B3SOIFDgtempe = -Gme * Vds; here->B3SOIFDgtempT = -GmT * Vds; here->B3SOIFDgtempd = -Gds * Vds - Ids; here->B3SOIFDcth = - Ids * Vds - model->B3SOIFDtype * (here->B3SOIFDgtempg * Vgs + here->B3SOIFDgtempb * Vbs + here->B3SOIFDgtempe * Ves + here->B3SOIFDgtempd * Vds) - here->B3SOIFDgtempT * delTemp; /* Body current which flows into drainprime node from the drain of device */ here->B3SOIFDgjdb = Gjdb - Giib; here->B3SOIFDgjdd = Gjdd - (Giid + Gdgidld); here->B3SOIFDgjdg = - (Giig + Gdgidlg); here->B3SOIFDgjde = - Giie; if (selfheat) here->B3SOIFDgjdT = GjdT - GiiT; else here->B3SOIFDgjdT = 0.0; here->B3SOIFDcjd = Ibd - Iii - Idgidl - here->B3SOIFDminIsub/2 - (here->B3SOIFDgjdb * Vbs + here->B3SOIFDgjdd * Vds + here->B3SOIFDgjdg * Vgs + here->B3SOIFDgjde * Ves + here->B3SOIFDgjdT * delTemp); /* Body current which flows into sourceprime node from the source of device */ here->B3SOIFDgjsb = Gjsb; here->B3SOIFDgjsd = Gjsd; here->B3SOIFDgjsg = - Gsgidlg; if (selfheat) here->B3SOIFDgjsT = GjsT; else here->B3SOIFDgjsT = 0.0; here->B3SOIFDcjs = Ibs - Isgidl - here->B3SOIFDminIsub/2 - (here->B3SOIFDgjsb * Vbs + here->B3SOIFDgjsd * Vds + here->B3SOIFDgjsg * Vgs + here->B3SOIFDgjsT * delTemp); /* Current flowing into body node */ here->B3SOIFDgbbs = Giib - Gjsb - Gjdb - Gbpbs; here->B3SOIFDgbgs = Giig + Gdgidlg + Gsgidlg - Gbpgs; here->B3SOIFDgbds = Giid + Gdgidld - Gjsd - Gjdd - Gbpds; here->B3SOIFDgbes = Giie - Gbpes; here->B3SOIFDgbps = - Gbpps; if (selfheat) here->B3SOIFDgbT = GiiT - GjsT - GjdT - GbpT; else here->B3SOIFDgbT = 0.0; here->B3SOIFDcbody = Iii + Idgidl + Isgidl - Ibs - Ibd - Ibp + here->B3SOIFDminIsub - (here->B3SOIFDgbbs * Vbs + here->B3SOIFDgbgs * Vgs + here->B3SOIFDgbds * Vds + here->B3SOIFDgbps * Vps + here->B3SOIFDgbes * Ves + here->B3SOIFDgbT * delTemp); /* Calculate Qinv for Noise analysis */ T1 = Vgsteff * (1.0 - 0.5 * Abeff * Vdseff / Vgst2Vtm); here->B3SOIFDqinv = -model->B3SOIFDcox * pParam->B3SOIFDweff * Leff * T1; /* Begin CV (charge) model */ if ((model->B3SOIFDxpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbody = 0.0; here->B3SOIFDcggb = here->B3SOIFDcgsb = here->B3SOIFDcgdb = 0.0; here->B3SOIFDcdgb = here->B3SOIFDcdsb = here->B3SOIFDcddb = 0.0; here->B3SOIFDcbgb = here->B3SOIFDcbsb = here->B3SOIFDcbdb = 0.0; goto finished; } else { CoxWL = model->B3SOIFDcox * pParam->B3SOIFDweffCV * pParam->B3SOIFDleffCV; /* By using this Vgsteff,cv, discontinuity in moderate inversion charges can be avoid. However, in capMod=3, Vdsat from IV is used. The dVdsat_dVg is referred to the IV Vgsteff and therefore induces error in the charges derivatives. Fortunately, Vgsteff,iv and Vgsteff,cv are different only in subthreshold where Qsubs is neglectible. So the errors in derivatives is not a serious problem */ if ((VgstNVt > -EXP_THRESHOLD) && (VgstNVt < EXP_THRESHOLD)) { ExpVgst *= ExpVgst; Vgsteff = n * Vtm * log(1.0 + ExpVgst); T0 = ExpVgst / (1.0 + ExpVgst); T1 = -T0 * (dVth_dVb + Vgst / n * dn_dVb) + Vgsteff / n * dn_dVb; dVgsteff_dVd = -T0 * (dVth_dVd + Vgst / n * dn_dVd) + Vgsteff / n * dn_dVd + T1 * dVbseff_dVd; dVgsteff_dVg = T0 * dVgs_eff_dVg + T1 * dVbseff_dVg; dVgsteff_dVb = T1 * dVbseff_dVb; dVgsteff_dVe = T1 * dVbseff_dVe; if (selfheat) dVgsteff_dT = -T0 * (dVth_dT + Vgst / Temp) + Vgsteff / Temp + T1 * dVbseff_dT; else dVgsteff_dT = 0.0; } Vfb = Vth - phi - pParam->B3SOIFDk1 * sqrtPhis; dVfb_dVb = dVth_dVb - pParam->B3SOIFDk1 * dsqrtPhis_dVb; dVfb_dVd = dVth_dVd; dVfb_dT = dVth_dT; if ((model->B3SOIFDcapMod == 2) || (model->B3SOIFDcapMod == 3)) { /* Necessary because charge behaviour very strange at Vgsteff = 0 */ Vgsteff += 1e-4; /* Something common in capMod 2 and 3 */ V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) { T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); T2 = -DELTA_3 / T0; } else { T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T2 = DELTA_3 / T0; } T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVd = (1.0 - T1 - T2) * dVfb_dVd; dVfbeff_dVb = (1.0 - T1 - T2) * dVfb_dVb - T1; dVfbeff_dVrg = T1 * dVgs_eff_dVg; if (selfheat) dVfbeff_dT = (1.0 - T1 - T2) * dVfb_dT; else dVfbeff_dT = 0.0; Qac0 = -CoxWL * (Vfbeff - Vfb); dQac0_dVrg = -CoxWL * dVfbeff_dVrg; dQac0_dVd = -CoxWL * (dVfbeff_dVd - dVfb_dVd); dQac0_dVb = -CoxWL * (dVfbeff_dVb - dVfb_dVb); if (selfheat) dQac0_dT = -CoxWL * (dVfbeff_dT - dVfb_dT); else dQac0_dT = 0.0; T0 = 0.5 * K1; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->B3SOIFDk1 == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->B3SOIFDk1; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * K1 * (T0 - T1); dQsub0_dVrg = T2 * (dVfbeff_dVrg - dVgs_eff_dVg); dQsub0_dVg = T2; dQsub0_dVd = T2 * dVfbeff_dVd; dQsub0_dVb = T2 * (dVfbeff_dVb + 1); if (selfheat) dQsub0_dT = T2 * dVfbeff_dT; else dQsub0_dT = 0.0; One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->B3SOIFDabulkCVfactor; dAbulkCV_dVb = pParam->B3SOIFDabulkCVfactor * dAbulk0_dVb; /* This is actually capMod=2 calculation */ VdsatCV = Vgsteff / AbulkCV; dVdsatCV_dVg = 1.0 / AbulkCV; dVdsatCV_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; VdsatCV += 1e-5; V4 = VdsatCV - Vds - DELTA_4; T0 = sqrt(V4 * V4 + 4.0 * DELTA_4 * VdsatCV); VdseffCV = VdsatCV - 0.5 * (V4 + T0); T1 = 0.5 * (1.0 + V4 / T0); T2 = DELTA_4 / T0; T3 = (1.0 - T1 - T2) / AbulkCV; dVdseffCV_dVg = T3; dVdseffCV_dVd = T1; dVdseffCV_dVb = -T3 * VdsatCV * dAbulkCV_dVb; if (model->B3SOIFDcapMod == 2) { /* VdsCV Make it compatible with capMod 3 */ VdsCV = VdseffCV; dVdsCV_dVg = dVdseffCV_dVg; dVdsCV_dVd = dVdseffCV_dVd; dVdsCV_dVb = dVdseffCV_dVb; } else if (model->B3SOIFDcapMod == 3) { /* Front gate strong inversion depletion charge */ /* VdssatCV calculation */ T1 = Vgsteff + K1*sqrtPhis + 0.5*K1*K1; T2 = Vgsteff + K1*sqrtPhis + Phis + 0.25*K1*K1; dT1_dVb = K1*dsqrtPhis_dVb; dT2_dVb = dT1_dVb + dPhis_dVb; dT1_dVg = dT2_dVg = 1; /* Note VdsatCV is redefined in capMod = 3 */ VdsatCV = T1 - K1*sqrt(T2); dVdsatCV_dVb = dT1_dVb - K1/2/sqrt(T2)*dT2_dVb; dVdsatCV_dVg = dT1_dVg - K1/2/sqrt(T2)*dT2_dVg; T1 = VdsatCV - Vdsat; dT1_dVg = dVdsatCV_dVg - dVdsat_dVg; dT1_dVb = dVdsatCV_dVb - dVdsat_dVb; dT1_dVd = - dVdsat_dVd; dT1_dVc = - dVdsat_dVc; dT1_dT = - dVdsat_dT; if (!(T1 == 0.0)) { T3 = -0.5 * Vdsat / T1; /* Vdsmax */ T2 = T3 * Vdsat; T4 = T2 + T1 * T3 * T3; /* fmax */ if ((Vdseff > T2) && (T1 < 0)) { VdsCV = T4; T5 = -0.5 / (T1 * T1); dT3_dVg = T5 * (T1 * dVdsat_dVg - Vdsat * dT1_dVg); dT3_dVb = T5 * (T1 * dVdsat_dVb - Vdsat * dT1_dVb); dT3_dVd = T5 * (T1 * dVdsat_dVd - Vdsat * dT1_dVd); dT3_dVc=0.0; if (selfheat) dT3_dT=T5 * (T1 * dVdsat_dT - Vdsat * dT1_dT); else dT3_dT=0.0; dVdsCV_dVd = T3 * dVdsat_dVd + Vdsat * dT3_dVd + T3 * (2 * T1 * dT3_dVd + T3 * dT1_dVd); dVdsCV_dVg = T3 * dVdsat_dVg + Vdsat * dT3_dVg + T3 * (2 * T1 * dT3_dVg + T3 * dT1_dVg); dVdsCV_dVb = T3 * dVdsat_dVb + Vdsat * dT3_dVb + T3 * (2 * T1 * dT3_dVb + T3 * dT1_dVb); dVdsCV_dVc = 0.0; if (selfheat) dVdsCV_dT = T3 * dVdsat_dT + Vdsat * dT3_dT + T3 * (2 * T1 * dT3_dT + T3 * dT1_dT ); else dVdsCV_dT = 0.0; } else { T5 = Vdseff / Vdsat; T6 = T5 * T5; T7 = 2 * T1 * T5 / Vdsat; T8 = T7 / Vdsat; VdsCV = Vdseff + T1 * T6; dVdsCV_dVd = dVdseff_dVd + T8 * ( Vdsat * dVdseff_dVd - Vdseff * dVdsat_dVd) + T6 * dT1_dVd; dVdsCV_dVb = dVdseff_dVb + T8 * ( Vdsat * dVdseff_dVb - Vdseff * dVdsat_dVb) + T6 * dT1_dVb; dVdsCV_dVg = dVdseff_dVg + T8 * ( Vdsat * dVdseff_dVg - Vdseff * dVdsat_dVg) + T6 * dT1_dVg; dVdsCV_dVc = 0.0; if (selfheat) dVdsCV_dT = dVdseff_dT + T8 * ( Vdsat * dVdseff_dT - Vdseff * dVdsat_dT ) + T6 * dT1_dT ; else dVdsCV_dT = 0.0; } } else { VdsCV = Vdseff; dVdsCV_dVb = dVdseff_dVb; dVdsCV_dVd = dVdseff_dVd; dVdsCV_dVg = dVdseff_dVg; dVdsCV_dVc = dVdseff_dVc; dVdsCV_dT = dVdseff_dT; } if (VdsCV < 0.0) VdsCV = 0.0; VdsCV += 1e-4; if (VdsCV > (VdsatCV - 1e-7)) { VdsCV = VdsatCV - 1e-7; } Phisd = Phis + VdsCV; dPhisd_dVb = dPhis_dVb + dVdsCV_dVb; dPhisd_dVd = dVdsCV_dVd; dPhisd_dVg = dVdsCV_dVg; dPhisd_dVc = dVdsCV_dVc; dPhisd_dT = dVdsCV_dT; sqrtPhisd = sqrt(Phisd); /* Qdep0 - Depletion charge at Vgs=Vth */ T10 = CoxWL * K1; Qdep0 = T10 * sqrtPhis; dQdep0_dVb = T10 * dsqrtPhis_dVb; } /* End of if capMod == 3 */ /* Something common in both capMod 2 or 3 */ /* Backgate charge */ CboxWL = pParam->B3SOIFDkb3 * Cbox * pParam->B3SOIFDweffCV * pParam->B3SOIFDleffCV; Cbg = Cbb = Cbd = Cbe = CbT = 0.0; Ce2g = Ce2b = Ce2d = Ce2e = Ce2T = 0.0; Qbf = Qe2 = 0.0; T2 = - 0.5 * model->B3SOIFDcboxt * pParam->B3SOIFDweffCV * pParam->B3SOIFDleffCV; Qe1 = T2 * VdsCV - CboxWL * (Vbs0eff - Vesfb); Ce1g = T2 * (dVdsCV_dVg * dVgsteff_dVg + dVdsCV_dVb * dVbseff_dVg + dVdsCV_dVc * dVcs_dVg) - CboxWL * dVbs0eff_dVg; Ce1d = T2 * (dVdsCV_dVg * dVgsteff_dVd + dVdsCV_dVb * dVbseff_dVd + dVdsCV_dVc * dVcs_dVd + dVdsCV_dVd) - CboxWL * dVbs0eff_dVd; Ce1b = 0.0; Ce1e = T2 * (dVdsCV_dVg * dVgsteff_dVe + dVdsCV_dVb * dVbseff_dVe + dVdsCV_dVc * dVcs_dVe) - CboxWL * (dVbs0eff_dVe - 1.0); if (selfheat) Ce1T = T2 * (dVdsCV_dVg * dVgsteff_dT + dVdsCV_dVb * dVbseff_dT + dVdsCV_dVc * dVcs_dT + dVdsCV_dT) - CboxWL * (dVbs0eff_dT + dvfbb_dT); else Ce1T = 0.0; /* Total inversion charge */ T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qinv = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); /* Inversion charge partitioning into S / D */ if (model->B3SOIFDxpart > 0.5) { /* 0/100 Charge partition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd1 = CoxWL * T5 * dVdseffCV_dVd; Csb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb); } else if (model->B3SOIFDxpart < 0.5) { /* 40/60 Charge partition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg1 = T4 + T5 * dVdseffCV_dVg; Csd1 = T5 * dVdseffCV_dVd; Csb1 = T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb; } else { /* 50/50 Charge partition model */ qsrc = - 0.5 * qinv; Csg1 = - 0.5 * Cgg1; Csb1 = - 0.5 * Cgb1; Csd1 = - 0.5 * Cgd1; } Csg = Csg1 * dVgsteff_dVg + Csb1 * dVbseff_dVg; Csd = Csd1 + Csg1 * dVgsteff_dVd + Csb1 * dVbseff_dVd; Csb = Csg1 * dVgsteff_dVb + Csb1 * dVbseff_dVb; Cse = Csg1 * dVgsteff_dVe + Csb1 * dVbseff_dVe; if (selfheat) CsT = Csg1 * dVgsteff_dT + Csb1 * dVbseff_dT; else CsT = 0.0; Qex=dQex_dVg=dQex_dVb=dQex_dVd=dQex_dVe=dQex_dT=0.0; qgate = qinv - (Qbf + Qe2); qbody = (Qbf - Qe1 + Qex); qsub = Qe1 + Qe2 - Qex; qdrn = -(qinv + qsrc); Cgg = (Cgg1 * dVgsteff_dVg + Cgb1 * dVbseff_dVg) - Cbg ; Cgd = (Cgd1 + Cgg1 * dVgsteff_dVd + Cgb1 * dVbseff_dVd)-Cbd; Cgb = (Cgb1 * dVbseff_dVb + Cgg1 * dVgsteff_dVb) - Cbb; Cge = (Cgg1 * dVgsteff_dVe + Cgb1 * dVbseff_dVe) - Cbe; if (selfheat) CgT = (Cgg1 * dVgsteff_dT + Cgb1 * dVbseff_dT ) - CbT; else CgT = 0.0; here->B3SOIFDcggb = Cgg - Ce2g; here->B3SOIFDcgsb = - (Cgg + Cgd + Cgb + Cge) + (Ce2g + Ce2d + Ce2b + Ce2e); here->B3SOIFDcgdb = Cgd - Ce2d; here->B3SOIFDcgeb = Cge - Ce2e; here->B3SOIFDcgT = CgT - Ce2T; here->B3SOIFDcbgb = Cbg - Ce1g + dQex_dVg; here->B3SOIFDcbsb = -(Cbg + Cbd + Cbb + Cbe) + (Ce1g + Ce1d + Ce1b + Ce1e) - (dQex_dVg + dQex_dVd + dQex_dVb + dQex_dVe); here->B3SOIFDcbdb = Cbd - Ce1d + dQex_dVd; here->B3SOIFDcbeb = Cbe - Ce1e + dQex_dVe; here->B3SOIFDcbT = CbT - Ce1T + dQex_dT; here->B3SOIFDcegb = Ce1g + Ce2g - dQex_dVg; here->B3SOIFDcesb = -(Ce1g + Ce1d + Ce1b + Ce1e) -(Ce2g + Ce2d + Ce2b + Ce2e) +(dQex_dVg + dQex_dVd + dQex_dVb + dQex_dVe); here->B3SOIFDcedb = Ce1d + Ce2d - dQex_dVd; here->B3SOIFDceeb = Ce1e + Ce2e - dQex_dVe; here->B3SOIFDceT = Ce1T + Ce2T - dQex_dT; here->B3SOIFDcdgb = -(Cgg + Cbg + Csg); here->B3SOIFDcddb = -(Cgd + Cbd + Csd); here->B3SOIFDcdeb = -(Cge + Cbe + Cse); here->B3SOIFDcdT = -(CgT + CbT + CsT); here->B3SOIFDcdsb = (Cgg + Cgd + Cgb + Cge + Cbg + Cbd + Cbb + Cbe + Csg + Csd + Csb + Cse); } /* End of if capMod == 2 or capMod ==3 */ } finished: /* returning Values to Calling Routine */ /* * COMPUTE EQUIVALENT DRAIN CURRENT SOURCE */ if (ChargeComputationNeeded) { qjs = qjd = 0.0; gcjdds = gcjdbs = gcjdT = 0.0; gcjsbs = gcjsT = 0.0; qdrn -= qjd; qbody += (qjs + qjd); qsrc = -(qgate + qbody + qdrn + qsub); /* Update the conductance */ here->B3SOIFDcddb -= gcjdds; here->B3SOIFDcdT -= gcjdT; here->B3SOIFDcdsb += gcjdds + gcjdbs; here->B3SOIFDcbdb += (gcjdds); here->B3SOIFDcbT += (gcjdT + gcjsT); here->B3SOIFDcbsb -= (gcjdds + gcjdbs + gcjsbs); /* Extrinsic Bottom S/D to substrate charge */ T10 = -model->B3SOIFDtype * ves; /* T10 is vse without type conversion */ if ( ((pParam->B3SOIFDnsub > 0) && (model->B3SOIFDtype > 0)) || ((pParam->B3SOIFDnsub < 0) && (model->B3SOIFDtype < 0)) ) { if (T10 < pParam->B3SOIFDvsdfb) { here->B3SOIFDqse = here->B3SOIFDcsbox * (T10 - pParam->B3SOIFDvsdfb); here->B3SOIFDgcse = here->B3SOIFDcsbox; } else if (T10 < pParam->B3SOIFDsdt1) { T0 = T10 - pParam->B3SOIFDvsdfb; T1 = T0 * T0; here->B3SOIFDqse = T0 * (here->B3SOIFDcsbox - pParam->B3SOIFDst2 / 3 * T1) ; here->B3SOIFDgcse = here->B3SOIFDcsbox - pParam->B3SOIFDst2 * T1; } else if (T10 < pParam->B3SOIFDvsdth) { T0 = T10 - pParam->B3SOIFDvsdth; T1 = T0 * T0; here->B3SOIFDqse = here->B3SOIFDcsmin * T10 + here->B3SOIFDst4 + pParam->B3SOIFDst3 / 3 * T0 * T1; here->B3SOIFDgcse = here->B3SOIFDcsmin + pParam->B3SOIFDst3 * T1; } else { here->B3SOIFDqse = here->B3SOIFDcsmin * T10 + here->B3SOIFDst4; here->B3SOIFDgcse = here->B3SOIFDcsmin; } } else { if (T10 < pParam->B3SOIFDvsdth) { here->B3SOIFDqse = here->B3SOIFDcsmin * (T10 - pParam->B3SOIFDvsdth); here->B3SOIFDgcse = here->B3SOIFDcsmin; } else if (T10 < pParam->B3SOIFDsdt1) { T0 = T10 - pParam->B3SOIFDvsdth; T1 = T0 * T0; here->B3SOIFDqse = T0 * (here->B3SOIFDcsmin - pParam->B3SOIFDst2 / 3 * T1) ; here->B3SOIFDgcse = here->B3SOIFDcsmin - pParam->B3SOIFDst2 * T1; } else if (T10 < pParam->B3SOIFDvsdfb) { T0 = T10 - pParam->B3SOIFDvsdfb; T1 = T0 * T0; here->B3SOIFDqse = here->B3SOIFDcsbox * T10 + here->B3SOIFDst4 + pParam->B3SOIFDst3 / 3 * T0 * T1; here->B3SOIFDgcse = here->B3SOIFDcsbox + pParam->B3SOIFDst3 * T1; } else { here->B3SOIFDqse = here->B3SOIFDcsbox * T10 + here->B3SOIFDst4; here->B3SOIFDgcse = here->B3SOIFDcsbox; } } /* T11 is vde without type conversion */ T11 = model->B3SOIFDtype * (vds - ves); if ( ((pParam->B3SOIFDnsub > 0) && (model->B3SOIFDtype > 0)) || ((pParam->B3SOIFDnsub < 0) && (model->B3SOIFDtype < 0)) ) { if (T11 < pParam->B3SOIFDvsdfb) { here->B3SOIFDqde = here->B3SOIFDcdbox * (T11 - pParam->B3SOIFDvsdfb); here->B3SOIFDgcde = here->B3SOIFDcdbox; } else if (T11 < pParam->B3SOIFDsdt1) { T0 = T11 - pParam->B3SOIFDvsdfb; T1 = T0 * T0; here->B3SOIFDqde = T0 * (here->B3SOIFDcdbox - pParam->B3SOIFDdt2 / 3 * T1) ; here->B3SOIFDgcde = here->B3SOIFDcdbox - pParam->B3SOIFDdt2 * T1; } else if (T11 < pParam->B3SOIFDvsdth) { T0 = T11 - pParam->B3SOIFDvsdth; T1 = T0 * T0; here->B3SOIFDqde = here->B3SOIFDcdmin * T11 + here->B3SOIFDdt4 + pParam->B3SOIFDdt3 / 3 * T0 * T1; here->B3SOIFDgcde = here->B3SOIFDcdmin + pParam->B3SOIFDdt3 * T1; } else { here->B3SOIFDqde = here->B3SOIFDcdmin * T11 + here->B3SOIFDdt4; here->B3SOIFDgcde = here->B3SOIFDcdmin; } } else { if (T11 < pParam->B3SOIFDvsdth) { here->B3SOIFDqde = here->B3SOIFDcdmin * (T11 - pParam->B3SOIFDvsdth); here->B3SOIFDgcde = here->B3SOIFDcdmin; } else if (T11 < pParam->B3SOIFDsdt1) { T0 = T11 - pParam->B3SOIFDvsdth; T1 = T0 * T0; here->B3SOIFDqde = T0 * (here->B3SOIFDcdmin - pParam->B3SOIFDdt2 / 3 * T1) ; here->B3SOIFDgcde = here->B3SOIFDcdmin - pParam->B3SOIFDdt2 * T1; } else if (T11 < pParam->B3SOIFDvsdfb) { T0 = T11 - pParam->B3SOIFDvsdfb; T1 = T0 * T0; here->B3SOIFDqde = here->B3SOIFDcdbox * T11 + here->B3SOIFDdt4 + pParam->B3SOIFDdt3 / 3 * T0 * T1; here->B3SOIFDgcde = here->B3SOIFDcdbox + pParam->B3SOIFDdt3 * T1; } else { here->B3SOIFDqde = here->B3SOIFDcdbox * T11 + here->B3SOIFDdt4; here->B3SOIFDgcde = here->B3SOIFDcdbox; } } /* Extrinsic : Sidewall fringing S/D charge */ here->B3SOIFDqse += pParam->B3SOIFDcsesw * T10; here->B3SOIFDgcse += pParam->B3SOIFDcsesw; here->B3SOIFDqde += pParam->B3SOIFDcdesw * T11; here->B3SOIFDgcde += pParam->B3SOIFDcdesw; /* All charge are mutliplied with type at the end, but qse and qde have true polarity => so pre-mutliplied with type */ here->B3SOIFDqse *= model->B3SOIFDtype; here->B3SOIFDqde *= model->B3SOIFDtype; } here->B3SOIFDxc = Xc; here->B3SOIFDcbb = Cbb; here->B3SOIFDcbd = Cbd; here->B3SOIFDcbg = Cbg; here->B3SOIFDqbf = Qbf; here->B3SOIFDqjs = qjs; here->B3SOIFDqjd = qjd; if (here->B3SOIFDdebugMod == -1) ChargeComputationNeeded = 0; /* * check convergence */ if ((here->B3SOIFDoff == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; if (here->B3SOIFDdebugMod > 2) fprintf(fpdebug, "Check is on, noncon=%d\n", ckt->CKTnoncon++); } } *(ckt->CKTstate0 + here->B3SOIFDvg) = vg; *(ckt->CKTstate0 + here->B3SOIFDvd) = vd; *(ckt->CKTstate0 + here->B3SOIFDvs) = vs; *(ckt->CKTstate0 + here->B3SOIFDvp) = vp; *(ckt->CKTstate0 + here->B3SOIFDve) = ve; *(ckt->CKTstate0 + here->B3SOIFDvbs) = vbs; *(ckt->CKTstate0 + here->B3SOIFDvbd) = vbd; *(ckt->CKTstate0 + here->B3SOIFDvgs) = vgs; *(ckt->CKTstate0 + here->B3SOIFDvds) = vds; *(ckt->CKTstate0 + here->B3SOIFDves) = ves; *(ckt->CKTstate0 + here->B3SOIFDvps) = vps; *(ckt->CKTstate0 + here->B3SOIFDdeltemp) = delTemp; /* bulk and channel charge plus overlaps */ if (!ChargeComputationNeeded) goto line850; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->B3SOIFDweffCV * pParam->B3SOIFDcgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIFDckappa); cgdo = pParam->B3SOIFDcgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->B3SOIFDcgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->B3SOIFDckappa * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->B3SOIFDweffCV * pParam->B3SOIFDcgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->B3SOIFDckappa); cgso = pParam->B3SOIFDcgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->B3SOIFDcgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->B3SOIFDckappa * (T4 - 1.0)); if (here->B3SOIFDmode > 0) { gcdgb = (here->B3SOIFDcdgb - cgdo) * ag0; gcddb = (here->B3SOIFDcddb + cgdo + here->B3SOIFDgcde) * ag0; gcdsb = here->B3SOIFDcdsb * ag0; gcdeb = (here->B3SOIFDcdeb - here->B3SOIFDgcde) * ag0; gcdT = model->B3SOIFDtype * here->B3SOIFDcdT * ag0; gcsgb = -(here->B3SOIFDcggb + here->B3SOIFDcbgb + here->B3SOIFDcdgb + here->B3SOIFDcegb + cgso) * ag0; gcsdb = -(here->B3SOIFDcgdb + here->B3SOIFDcbdb + here->B3SOIFDcddb + here->B3SOIFDcedb) * ag0; gcssb = (cgso + here->B3SOIFDgcse - (here->B3SOIFDcgsb + here->B3SOIFDcbsb + here->B3SOIFDcdsb + here->B3SOIFDcesb)) * ag0; gcseb = -(here->B3SOIFDgcse + here->B3SOIFDcgeb + here->B3SOIFDcbeb + here->B3SOIFDcdeb + here->B3SOIFDceeb) * ag0; gcsT = - model->B3SOIFDtype * (here->B3SOIFDcgT + here->B3SOIFDcbT + here->B3SOIFDcdT + here->B3SOIFDceT) * ag0; gcggb = (here->B3SOIFDcggb + cgdo + cgso + pParam->B3SOIFDcgeo) * ag0; gcgdb = (here->B3SOIFDcgdb - cgdo) * ag0; gcgsb = (here->B3SOIFDcgsb - cgso) * ag0; gcgeb = (here->B3SOIFDcgeb - pParam->B3SOIFDcgeo) * ag0; gcgT = model->B3SOIFDtype * here->B3SOIFDcgT * ag0; gcbgb = here->B3SOIFDcbgb * ag0; gcbdb = here->B3SOIFDcbdb * ag0; gcbsb = here->B3SOIFDcbsb * ag0; gcbeb = here->B3SOIFDcbeb * ag0; gcbT = model->B3SOIFDtype * here->B3SOIFDcbT * ag0; gcegb = (here->B3SOIFDcegb - pParam->B3SOIFDcgeo) * ag0; gcedb = (here->B3SOIFDcedb - here->B3SOIFDgcde) * ag0; gcesb = (here->B3SOIFDcesb - here->B3SOIFDgcse) * ag0; gceeb = (here->B3SOIFDgcse + here->B3SOIFDgcde + here->B3SOIFDceeb + pParam->B3SOIFDcgeo) * ag0; gceT = model->B3SOIFDtype * here->B3SOIFDceT * ag0; gcTt = pParam->B3SOIFDcth * ag0; sxpart = 0.6; dxpart = 0.4; /* Lump the overlap capacitance and S/D parasitics */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIFDcgeo * vge; qgate += qgd + qgs + qge; qdrn += here->B3SOIFDqde - qgd; qsub -= qge + here->B3SOIFDqse + here->B3SOIFDqde; qsrc = -(qgate + qbody + qdrn + qsub); } else { gcsgb = (here->B3SOIFDcdgb - cgso) * ag0; gcssb = (here->B3SOIFDcddb + cgso + here->B3SOIFDgcse) * ag0; gcsdb = here->B3SOIFDcdsb * ag0; gcseb = (here->B3SOIFDcdeb - here->B3SOIFDgcse) * ag0; gcsT = model->B3SOIFDtype * here->B3SOIFDcdT * ag0; gcdgb = -(here->B3SOIFDcggb + here->B3SOIFDcbgb + here->B3SOIFDcdgb + here->B3SOIFDcegb + cgdo) * ag0; gcdsb = -(here->B3SOIFDcgdb + here->B3SOIFDcbdb + here->B3SOIFDcddb + here->B3SOIFDcedb) * ag0; gcddb = (cgdo + here->B3SOIFDgcde - (here->B3SOIFDcgsb + here->B3SOIFDcbsb + here->B3SOIFDcdsb + here->B3SOIFDcesb)) * ag0; gcdeb = -(here->B3SOIFDgcde + here->B3SOIFDcgeb + here->B3SOIFDcbeb + here->B3SOIFDcdeb + here->B3SOIFDceeb) * ag0; gcdT = - model->B3SOIFDtype * (here->B3SOIFDcgT + here->B3SOIFDcbT + here->B3SOIFDcdT + here->B3SOIFDceT) * ag0; gcggb = (here->B3SOIFDcggb + cgdo + cgso + pParam->B3SOIFDcgeo) * ag0; gcgsb = (here->B3SOIFDcgdb - cgso) * ag0; gcgdb = (here->B3SOIFDcgsb - cgdo) * ag0; gcgeb = (here->B3SOIFDcgeb - pParam->B3SOIFDcgeo) * ag0; gcgT = model->B3SOIFDtype * here->B3SOIFDcgT * ag0; gcbgb = here->B3SOIFDcbgb * ag0; gcbsb = here->B3SOIFDcbdb * ag0; gcbdb = here->B3SOIFDcbsb * ag0; gcbeb = here->B3SOIFDcbeb * ag0; gcbT = model->B3SOIFDtype * here->B3SOIFDcbT * ag0; gcegb = (here->B3SOIFDcegb - pParam->B3SOIFDcgeo) * ag0; gcesb = (here->B3SOIFDcedb - here->B3SOIFDgcse) * ag0; gcedb = (here->B3SOIFDcesb - here->B3SOIFDgcde) * ag0; gceeb = (here->B3SOIFDceeb + pParam->B3SOIFDcgeo + here->B3SOIFDgcse + here->B3SOIFDgcde) * ag0; gceT = model->B3SOIFDtype * here->B3SOIFDceT * ag0; gcTt = pParam->B3SOIFDcth * ag0; dxpart = 0.6; sxpart = 0.4; /* Lump the overlap capacitance */ qgd = qgdo; qgs = qgso; qge = pParam->B3SOIFDcgeo * vge; qgate += qgd + qgs + qge; qsrc = qdrn - qgs + here->B3SOIFDqse; qsub -= qge + here->B3SOIFDqse + here->B3SOIFDqde; qdrn = -(qgate + qbody + qsrc + qsub); } here->B3SOIFDcgdo = cgdo; here->B3SOIFDcgso = cgso; if (ByPass) goto line860; *(ckt->CKTstate0 + here->B3SOIFDqe) = qsub; *(ckt->CKTstate0 + here->B3SOIFDqg) = qgate; *(ckt->CKTstate0 + here->B3SOIFDqd) = qdrn; *(ckt->CKTstate0 + here->B3SOIFDqb) = qbody; if ((model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0!=0.0)) *(ckt->CKTstate0 + here->B3SOIFDqth) = pParam->B3SOIFDcth * delTemp; /* store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIFDqb) = *(ckt->CKTstate0 + here->B3SOIFDqb); *(ckt->CKTstate1 + here->B3SOIFDqg) = *(ckt->CKTstate0 + here->B3SOIFDqg); *(ckt->CKTstate1 + here->B3SOIFDqd) = *(ckt->CKTstate0 + here->B3SOIFDqd); *(ckt->CKTstate1 + here->B3SOIFDqe) = *(ckt->CKTstate0 + here->B3SOIFDqe); *(ckt->CKTstate1 + here->B3SOIFDqth) = *(ckt->CKTstate0 + here->B3SOIFDqth); } error = NIintegrate(ckt, &geq, &ceq,0.0,here->B3SOIFDqb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIFDqg); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIFDqd); if (error) return(error); error = NIintegrate(ckt,&geq, &ceq, 0.0, here->B3SOIFDqe); if (error) return(error); if ((model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0!=0.0)) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->B3SOIFDqth); if (error) return (error); } goto line860; line850: /* initialize to zero charge conductance and current */ ceqqe = ceqqg = ceqqb = ceqqd = ceqqth= 0.0; gcdgb = gcddb = gcdsb = gcdeb = gcdT = 0.0; gcsgb = gcsdb = gcssb = gcseb = gcsT = 0.0; gcggb = gcgdb = gcgsb = gcgeb = gcgT = 0.0; gcbgb = gcbdb = gcbsb = gcbeb = gcbT = 0.0; gcegb = gcedb = gceeb = gcesb = gceT = 0.0; gcTt = 0.0; sxpart = (1.0 - (dxpart = (here->B3SOIFDmode > 0) ? 0.4 : 0.6)); goto line900; line860: /* evaluate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->B3SOIFDcqg); cqbody = *(ckt->CKTstate0 + here->B3SOIFDcqb); cqdrn = *(ckt->CKTstate0 + here->B3SOIFDcqd); cqsub = *(ckt->CKTstate0 + here->B3SOIFDcqe); cqtemp = *(ckt->CKTstate0 + here->B3SOIFDcqth); here->B3SOIFDcb += cqbody; here->B3SOIFDcd += cqdrn; ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs - gcgeb * veb - gcgT * delTemp; ceqqb = cqbody - gcbgb * vgb + gcbdb * vbd + gcbsb * vbs - gcbeb * veb - gcbT * delTemp; ceqqd = cqdrn - gcdgb * vgb + gcddb * vbd + gcdsb * vbs - gcdeb * veb - gcdT * delTemp; ceqqe = cqsub - gcegb * vgb + gcedb * vbd + gcesb * vbs - gceeb * veb - gceT * delTemp;; ceqqth = cqtemp - gcTt * delTemp; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->B3SOIFDcqe) = *(ckt->CKTstate0 + here->B3SOIFDcqe); *(ckt->CKTstate1 + here->B3SOIFDcqb) = *(ckt->CKTstate0 + here->B3SOIFDcqb); *(ckt->CKTstate1 + here->B3SOIFDcqg) = *(ckt->CKTstate0 + here->B3SOIFDcqg); *(ckt->CKTstate1 + here->B3SOIFDcqd) = *(ckt->CKTstate0 + here->B3SOIFDcqd); *(ckt->CKTstate1 + here->B3SOIFDcqth) = *(ckt->CKTstate0 + here->B3SOIFDcqth); } /* * load current vector */ line900: m = here->B3SOIFDm; if (here->B3SOIFDmode >= 0) { Gm = here->B3SOIFDgm; Gmbs = here->B3SOIFDgmbs; Gme = here->B3SOIFDgme; GmT = model->B3SOIFDtype * here->B3SOIFDgmT; FwdSum = Gm + Gmbs + Gme; RevSum = 0.0; cdreq = model->B3SOIFDtype * (here->B3SOIFDcdrain - here->B3SOIFDgds * vds - Gm * vgs - Gmbs * vbs - Gme * ves - GmT * delTemp); /* ceqbs now is compatible with cdreq, ie. going in is +ve */ /* Equivalent current source from the diode */ ceqbs = here->B3SOIFDcjs; ceqbd = here->B3SOIFDcjd; /* Current going in is +ve */ ceqbody = -here->B3SOIFDcbody; ceqth = here->B3SOIFDcth; ceqbodcon = here->B3SOIFDcbodcon; gbbg = -here->B3SOIFDgbgs; gbbdp = -here->B3SOIFDgbds; gbbb = -here->B3SOIFDgbbs; gbbe = -here->B3SOIFDgbes; gbbp = -here->B3SOIFDgbps; gbbT = -model->B3SOIFDtype * here->B3SOIFDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIFDgjdg; gddpdp = -here->B3SOIFDgjdd; gddpb = -here->B3SOIFDgjdb; gddpe = -here->B3SOIFDgjde; gddpT = -model->B3SOIFDtype * here->B3SOIFDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B3SOIFDgjsg; gsspdp = -here->B3SOIFDgjsd; gsspb = -here->B3SOIFDgjsb; gsspe = 0.0; gsspT = -model->B3SOIFDtype * here->B3SOIFDgjsT; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppg = -here->B3SOIFDgbpgs; gppdp = -here->B3SOIFDgbpds; gppb = -here->B3SOIFDgbpbs; gppe = -here->B3SOIFDgbpes; gppp = -here->B3SOIFDgbpps; gppT = -model->B3SOIFDtype * here->B3SOIFDgbpT; gppsp = - (gppg + gppdp + gppb + gppe + gppp); gTtg = here->B3SOIFDgtempg; gTtb = here->B3SOIFDgtempb; gTte = here->B3SOIFDgtempe; gTtdp = here->B3SOIFDgtempd; gTtt = here->B3SOIFDgtempT; gTtsp = - (gTtg + gTtb + gTte + gTtdp); } else { Gm = -here->B3SOIFDgm; Gmbs = -here->B3SOIFDgmbs; Gme = -here->B3SOIFDgme; GmT = -model->B3SOIFDtype * here->B3SOIFDgmT; FwdSum = 0.0; RevSum = -(Gm + Gmbs + Gme); cdreq = -model->B3SOIFDtype * (here->B3SOIFDcdrain + here->B3SOIFDgds*vds + Gm * vgd + Gmbs * vbd + Gme * (ves - vds) + GmT * delTemp); ceqbs = here->B3SOIFDcjd; ceqbd = here->B3SOIFDcjs; /* Current going in is +ve */ ceqbody = -here->B3SOIFDcbody; ceqth = here->B3SOIFDcth; ceqbodcon = here->B3SOIFDcbodcon; gbbg = -here->B3SOIFDgbgs; gbbb = -here->B3SOIFDgbbs; gbbe = -here->B3SOIFDgbes; gbbp = -here->B3SOIFDgbps; gbbsp = -here->B3SOIFDgbds; gbbT = -model->B3SOIFDtype * here->B3SOIFDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIFDgjsg; gddpsp = -here->B3SOIFDgjsd; gddpb = -here->B3SOIFDgjsb; gddpe = 0.0; gddpT = -model->B3SOIFDtype * here->B3SOIFDgjsT; gddpdp = - (gddpg + gddpsp + gddpb + gddpe); gsspg = -here->B3SOIFDgjdg; gsspsp = -here->B3SOIFDgjdd; gsspb = -here->B3SOIFDgjdb; gsspe = -here->B3SOIFDgjde; gsspT = -model->B3SOIFDtype * here->B3SOIFDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe); gppg = -here->B3SOIFDgbpgs; gppsp = -here->B3SOIFDgbpds; gppb = -here->B3SOIFDgbpbs; gppe = -here->B3SOIFDgbpes; gppp = -here->B3SOIFDgbpps; gppT = -model->B3SOIFDtype * here->B3SOIFDgbpT; gppdp = - (gppg + gppsp + gppb + gppe + gppp); gTtg = here->B3SOIFDgtempg; gTtb = here->B3SOIFDgtempb; gTte = here->B3SOIFDgtempe; gTtsp = here->B3SOIFDgtempd; gTtt = here->B3SOIFDgtempT; gTtdp = - (gTtg + gTtb + gTte + gTtsp); } if (model->B3SOIFDtype > 0) { ceqqg = ceqqg; ceqqb = ceqqb; ceqqe = ceqqe; ceqqd = ceqqd; } else { ceqbodcon = -ceqbodcon; ceqbody = -ceqbody; ceqbs = -ceqbs; ceqbd = -ceqbd; ceqqg = -ceqqg; ceqqb = -ceqqb; ceqqd = -ceqqd; ceqqe = -ceqqe; } (*(ckt->CKTrhs + here->B3SOIFDgNode) -= m * ceqqg); (*(ckt->CKTrhs + here->B3SOIFDdNodePrime) += m * (ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->B3SOIFDsNodePrime) += m * (cdreq + ceqbs + ceqqg + ceqqb + ceqqd + ceqqe)); (*(ckt->CKTrhs + here->B3SOIFDeNode) -= m * ceqqe); if (here->B3SOIFDbodyMod == 1) { (*(ckt->CKTrhs + here->B3SOIFDpNode) += m * ceqbodcon); } if (selfheat) { (*(ckt->CKTrhs + here->B3SOIFDtempNode) -= m * (ceqth + ceqqth)); } if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1)) { *(ckt->CKTrhs + here->B3SOIFDvbsNode) = here->B3SOIFDvbsdio; *(ckt->CKTrhs + here->B3SOIFDidsNode) = here->B3SOIFDids; *(ckt->CKTrhs + here->B3SOIFDicNode) = here->B3SOIFDic; *(ckt->CKTrhs + here->B3SOIFDibsNode) = here->B3SOIFDibs; *(ckt->CKTrhs + here->B3SOIFDibdNode) = here->B3SOIFDibd; *(ckt->CKTrhs + here->B3SOIFDiiiNode) = here->B3SOIFDiii; *(ckt->CKTrhs + here->B3SOIFDigidlNode) = here->B3SOIFDigidl; *(ckt->CKTrhs + here->B3SOIFDitunNode) = here->B3SOIFDitun; *(ckt->CKTrhs + here->B3SOIFDibpNode) = here->B3SOIFDibp; *(ckt->CKTrhs + here->B3SOIFDabeffNode) = here->B3SOIFDabeff; *(ckt->CKTrhs + here->B3SOIFDvbs0effNode) = here->B3SOIFDvbs0eff; *(ckt->CKTrhs + here->B3SOIFDvbseffNode) = here->B3SOIFDvbseff; *(ckt->CKTrhs + here->B3SOIFDxcNode) = here->B3SOIFDxc; *(ckt->CKTrhs + here->B3SOIFDcbbNode) = here->B3SOIFDcbb; *(ckt->CKTrhs + here->B3SOIFDcbdNode) = here->B3SOIFDcbd; *(ckt->CKTrhs + here->B3SOIFDcbgNode) = here->B3SOIFDcbg; *(ckt->CKTrhs + here->B3SOIFDqbfNode) = here->B3SOIFDqbf; *(ckt->CKTrhs + here->B3SOIFDqjsNode) = here->B3SOIFDqjs; *(ckt->CKTrhs + here->B3SOIFDqjdNode) = here->B3SOIFDqjd; /* clean up last */ *(ckt->CKTrhs + here->B3SOIFDgmNode) = Gm; *(ckt->CKTrhs + here->B3SOIFDgmbsNode) = Gmbs; *(ckt->CKTrhs + here->B3SOIFDgdsNode) = Gds; *(ckt->CKTrhs + here->B3SOIFDgmeNode) = Gme; *(ckt->CKTrhs + here->B3SOIFDqdNode) = qdrn; *(ckt->CKTrhs + here->B3SOIFDcbeNode) = Cbe; *(ckt->CKTrhs + here->B3SOIFDvbs0teffNode) = Vbs0teff; *(ckt->CKTrhs + here->B3SOIFDvthNode) = here->B3SOIFDvon; *(ckt->CKTrhs + here->B3SOIFDvgsteffNode) = Vgsteff; *(ckt->CKTrhs + here->B3SOIFDxcsatNode) = Xcsat; *(ckt->CKTrhs + here->B3SOIFDqaccNode) = -Qac0; *(ckt->CKTrhs + here->B3SOIFDqsub0Node) = Qsub0; *(ckt->CKTrhs + here->B3SOIFDqsubs1Node) = Qsubs1; *(ckt->CKTrhs + here->B3SOIFDqsubs2Node) = Qsubs2; *(ckt->CKTrhs + here->B3SOIFDvdscvNode) = VdsCV; *(ckt->CKTrhs + here->B3SOIFDvcscvNode) = VcsCV; *(ckt->CKTrhs + here->B3SOIFDqgNode) = qgate; *(ckt->CKTrhs + here->B3SOIFDqbNode) = qbody; *(ckt->CKTrhs + here->B3SOIFDqeNode) = qsub; *(ckt->CKTrhs + here->B3SOIFDdum1Node) = here->B3SOIFDdum1; *(ckt->CKTrhs + here->B3SOIFDdum2Node) = here->B3SOIFDdum2; *(ckt->CKTrhs + here->B3SOIFDdum3Node) = here->B3SOIFDdum3; *(ckt->CKTrhs + here->B3SOIFDdum4Node) = here->B3SOIFDdum4; *(ckt->CKTrhs + here->B3SOIFDdum5Node) = here->B3SOIFDdum5; /* end clean up last */ } /* * load y matrix */ (*(here->B3SOIFDEgPtr) += m * gcegb); (*(here->B3SOIFDEdpPtr) += m * gcedb); (*(here->B3SOIFDEspPtr) += m * gcesb); (*(here->B3SOIFDGePtr) += m * gcgeb); (*(here->B3SOIFDDPePtr) += m * (Gme + gddpe + gcdeb)); (*(here->B3SOIFDSPePtr) += m * (gsspe - Gme + gcseb)); (*(here->B3SOIFDEePtr) += m * gceeb); (*(here->B3SOIFDGgPtr) += m * (gcggb + ckt->CKTgmin)); (*(here->B3SOIFDGdpPtr) += m * (gcgdb - ckt->CKTgmin)); (*(here->B3SOIFDGspPtr) += m * gcgsb ); (*(here->B3SOIFDDPgPtr) += m * ((Gm + gcdgb) + gddpg - ckt->CKTgmin)); (*(here->B3SOIFDDPdpPtr) += m * ((here->B3SOIFDdrainConductance + here->B3SOIFDgds + gddpdp + RevSum + gcddb) + ckt->CKTgmin)); (*(here->B3SOIFDDPspPtr) -= m * (-gddpsp + here->B3SOIFDgds + FwdSum - gcdsb)); (*(here->B3SOIFDDPdPtr) -= m * here->B3SOIFDdrainConductance); (*(here->B3SOIFDSPgPtr) += m * (gcsgb - Gm + gsspg)); (*(here->B3SOIFDSPdpPtr) -= m * (here->B3SOIFDgds - gsspdp + RevSum - gcsdb)); (*(here->B3SOIFDSPspPtr) += m * (here->B3SOIFDsourceConductance + here->B3SOIFDgds + gsspsp + FwdSum + gcssb)); (*(here->B3SOIFDSPsPtr) -= m * here->B3SOIFDsourceConductance); (*(here->B3SOIFDDdPtr) += m * here->B3SOIFDdrainConductance); (*(here->B3SOIFDDdpPtr) -= m * here->B3SOIFDdrainConductance); (*(here->B3SOIFDSsPtr) += m * here->B3SOIFDsourceConductance); (*(here->B3SOIFDSspPtr) -= m * here->B3SOIFDsourceConductance); if (here->B3SOIFDbodyMod == 1) { (*(here->B3SOIFDBpPtr) -= m * gppp); (*(here->B3SOIFDPbPtr) += m * gppb); (*(here->B3SOIFDPpPtr) += m * gppp); (*(here->B3SOIFDPgPtr) += m * gppg); (*(here->B3SOIFDPdpPtr) += m * gppdp); (*(here->B3SOIFDPspPtr) += m * gppsp); (*(here->B3SOIFDPePtr) += m * gppe); } if (selfheat) { (*(here->B3SOIFDDPtempPtr) += m * (GmT + gddpT + gcdT)); (*(here->B3SOIFDSPtempPtr) += m * (-GmT + gsspT + gcsT)); (*(here->B3SOIFDBtempPtr) += m * (gbbT + gcbT)); (*(here->B3SOIFDEtempPtr) += m * gceT); (*(here->B3SOIFDGtempPtr) += m * gcgT); if (here->B3SOIFDbodyMod == 1) { (*(here->B3SOIFDPtempPtr) += m * gppT); } (*(here->B3SOIFDTemptempPtr) += m * (gTtt + 1/pParam->B3SOIFDrth + gcTt)); (*(here->B3SOIFDTempgPtr) += m * gTtg); (*(here->B3SOIFDTempbPtr) += m * gTtb); (*(here->B3SOIFDTempePtr) += m * gTte); (*(here->B3SOIFDTempdpPtr) += m * gTtdp); (*(here->B3SOIFDTempspPtr) += m * gTtsp); } if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1)) { *(here->B3SOIFDVbsPtr) += m * 1; *(here->B3SOIFDIdsPtr) += m * 1; *(here->B3SOIFDIcPtr) += m * 1; *(here->B3SOIFDIbsPtr) += m * 1; *(here->B3SOIFDIbdPtr) += m * 1; *(here->B3SOIFDIiiPtr) += m * 1; *(here->B3SOIFDIgidlPtr) += m * 1; *(here->B3SOIFDItunPtr) += m * 1; *(here->B3SOIFDIbpPtr) += m * 1; *(here->B3SOIFDAbeffPtr) += m * 1; *(here->B3SOIFDVbs0effPtr) += m * 1; *(here->B3SOIFDVbseffPtr) += m * 1; *(here->B3SOIFDXcPtr) += m * 1; *(here->B3SOIFDCbgPtr) += m * 1; *(here->B3SOIFDCbbPtr) += m * 1; *(here->B3SOIFDCbdPtr) += m * 1; *(here->B3SOIFDqbPtr) += m * 1; *(here->B3SOIFDQbfPtr) += m * 1; *(here->B3SOIFDQjsPtr) += m * 1; *(here->B3SOIFDQjdPtr) += m * 1; /* clean up last */ *(here->B3SOIFDGmPtr) += m * 1; *(here->B3SOIFDGmbsPtr) += m * 1; *(here->B3SOIFDGdsPtr) += m * 1; *(here->B3SOIFDGmePtr) += m * 1; *(here->B3SOIFDVbs0teffPtr) += m * 1; *(here->B3SOIFDVgsteffPtr) += m * 1; *(here->B3SOIFDCbePtr) += m * 1; *(here->B3SOIFDVthPtr) += m * 1; *(here->B3SOIFDXcsatPtr) += m * 1; *(here->B3SOIFDVdscvPtr) += m * 1; *(here->B3SOIFDVcscvPtr) += m * 1; *(here->B3SOIFDQaccPtr) += m * 1; *(here->B3SOIFDQsub0Ptr) += m * 1; *(here->B3SOIFDQsubs1Ptr) += m * 1; *(here->B3SOIFDQsubs2Ptr) += m * 1; *(here->B3SOIFDqgPtr) += m * 1; *(here->B3SOIFDqdPtr) += m * 1; *(here->B3SOIFDqePtr) += m * 1; *(here->B3SOIFDDum1Ptr) += m * 1; *(here->B3SOIFDDum2Ptr) += m * 1; *(here->B3SOIFDDum3Ptr) += m * 1; *(here->B3SOIFDDum4Ptr) += m * 1; *(here->B3SOIFDDum5Ptr) += m * 1; /* end clean up last */ } line1000: ; /* Here NaN will be detected in any conductance or equivalent current. Note that nandetect is initialized within the "if" statements */ if ((nandetect = isnan (*(here->B3SOIFDGgPtr))) != 0) { strcpy (nanmessage, "GgPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDGdpPtr))) != 0) { strcpy (nanmessage, "GdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDGspPtr))) != 0) { strcpy (nanmessage, "GspPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDDPgPtr))) != 0) { strcpy (nanmessage, "DPgPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDDPdpPtr))) != 0) { strcpy (nanmessage, "DPdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDDPspPtr))) != 0) { strcpy (nanmessage, "DPspPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDSPgPtr))) != 0) { strcpy (nanmessage, "SPgPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDSPdpPtr))) != 0) { strcpy (nanmessage, "SPdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDSPspPtr))) != 0) { strcpy (nanmessage, "SPspPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDEePtr))) != 0) { strcpy (nanmessage, "EePtr"); } /* At this point, nandetect = 0 if none of the conductances checked so far are NaN */ if (nandetect == 0) { if ((nandetect = isnan (*(here->B3SOIFDEgPtr))) != 0) { strcpy (nanmessage, "EgPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDEdpPtr))) != 0) { strcpy (nanmessage, "EdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDEspPtr))) != 0) { strcpy (nanmessage, "EspPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDGePtr))) != 0) { strcpy (nanmessage, "GePtr"); } else if ((nandetect = isnan (*(here->B3SOIFDDPePtr))) != 0) { strcpy (nanmessage, "DPePtr"); } else if ((nandetect = isnan (*(here->B3SOIFDSPePtr))) != 0) { strcpy (nanmessage, "SPePtr"); } } /* Now check if self-heating caused NaN if nothing else has so far (check tempnode current also) */ if (selfheat && nandetect == 0) { if ((nandetect = isnan (*(here->B3SOIFDTemptempPtr))) != 0) { strcpy (nanmessage, "TemptempPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDTempgPtr))) != 0) { strcpy (nanmessage, "TempgPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDTempbPtr))) != 0) { strcpy (nanmessage, "TempbPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDTempePtr))) != 0) { strcpy (nanmessage, "TempePtr"); } else if ((nandetect = isnan (*(here->B3SOIFDTempdpPtr))) != 0) { strcpy (nanmessage, "TempdpPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDTempspPtr))) != 0) { strcpy (nanmessage, "TempspPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDGtempPtr))) != 0) { strcpy (nanmessage, "GtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDDPtempPtr))) != 0) { strcpy (nanmessage, "DPtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDSPtempPtr))) != 0) { strcpy (nanmessage, "SPtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDEtempPtr))) != 0) { strcpy (nanmessage, "EtempPtr"); } else if ((nandetect = isnan (*(here->B3SOIFDBtempPtr))) != 0) { strcpy (nanmessage, "BtempPtr"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDtempNode))) != 0) { strcpy (nanmessage, "tempNode"); } } /* Lastly, check all equivalent currents (tempnode is checked above */ if (nandetect == 0) { if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDgNode))) != 0) { strcpy (nanmessage, "gNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDbNode))) != 0) { strcpy (nanmessage, "bNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDdNodePrime))) != 0) { strcpy (nanmessage, "dpNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDsNodePrime))) != 0) { strcpy (nanmessage, "spNode"); } else if ((nandetect = isnan (*(ckt->CKTrhs + here->B3SOIFDeNode))) != 0) { strcpy (nanmessage, "eNode"); } } /* Now print error message if NaN detected. Note that error will only be printed once (the first time it is encountered) each time SPICE is run since nanfound is static variable */ if (nanfound == 0 && nandetect) { fprintf(stderr, "Alberto says: YOU TURKEY! %s is NaN for instance %s at time %g!\n", nanmessage, here->B3SOIFDname, ckt->CKTtime); nanfound = nandetect; fprintf(stderr, " The program exit!\n"); controlled_exit(EXIT_FAILURE); } if (here->B3SOIFDdebugMod > 2) { fprintf(fpdebug, "Ids = %.4e, Ic = %.4e, cqdrn = %.4e, gmin=%.3e\n", Ids, Ic, cqdrn, ckt->CKTgmin); fprintf(fpdebug, "Iii = %.4e, Idgidl = %.4e, Ibs = %.14e\n", Iii, Idgidl, Ibs); fprintf(fpdebug, "Ibd = %.4e, Ibp = %.4e\n", Ibd, Ibp); fprintf(fpdebug, "qbody = %.5e, qbf = %.5e, qbe = %.5e\n", qbody, Qbf, -(Qe1+Qe2)); fprintf(fpdebug, "qbs = %.5e, qbd = %.5e\n", qjs, qjd); fprintf(fpdebug, "qdrn = %.5e, qinv = %.5e\n", qdrn, qinv); /* I am trying to debug the convergence problems here by printing out the entire Jacobian and equivalent current matrix */ if (here->B3SOIFDdebugMod > 4) { fprintf(fpdebug, "Ibtot = %.6e;\t Cbtot = %.6e;\n", Ibs+Ibp+Ibd-Iii-Idgidl-Isgidl, cqbody); fprintf(fpdebug, "ceqg = %.6e;\t ceqb = %.6e;\t ceqdp = %.6e;\t ceqsp = %.6e;\n", *(ckt->CKTrhs + here->B3SOIFDgNode), *(ckt->CKTrhs + here->B3SOIFDbNode), *(ckt->CKTrhs + here->B3SOIFDdNodePrime), *(ckt->CKTrhs + here->B3SOIFDsNodePrime)); fprintf(fpdebug, "ceqe = %.6e;\t ceqp = %.6e;\t ceqth = %.6e;\n", *(ckt->CKTrhs + here->B3SOIFDeNode), *(ckt->CKTrhs + here->B3SOIFDpNode), *(ckt->CKTrhs + here->B3SOIFDtempNode)); fprintf(fpdebug, "Eg = %.5e;\t Edp = %.5e;\t Esp = %.5e;\t Eb = %.5e;\n", *(here->B3SOIFDEgPtr), *(here->B3SOIFDEdpPtr), *(here->B3SOIFDEspPtr), *(here->B3SOIFDEbPtr)); fprintf(fpdebug, "Ee = %.5e;\t Gg = %.5e;\t Gdp = %.5e;\t Gsp = %.5e;\n", *(here->B3SOIFDEePtr), *(here->B3SOIFDGgPtr), *(here->B3SOIFDGdpPtr), *(here->B3SOIFDGspPtr)); fprintf(fpdebug, "Gb = %.5e;\t Ge = %.5e;\t DPg = %.5e;\t DPdp = %.5e;\n", *(here->B3SOIFDGbPtr), *(here->B3SOIFDGePtr), *(here->B3SOIFDDPgPtr), *(here->B3SOIFDDPdpPtr)); fprintf(fpdebug, "DPsp = %.5e;\t DPb = %.5e;\t DPe = %.5e;\t\n", *(here->B3SOIFDDPspPtr), *(here->B3SOIFDDPbPtr), *(here->B3SOIFDDPePtr)); fprintf(fpdebug, "DPd = %.5e;\t SPg = %.5e;\t SPdp = %.5e;\t SPsp = %.5e;\n", *(here->B3SOIFDDPdPtr), *(here->B3SOIFDSPgPtr), *(here->B3SOIFDSPdpPtr), *(here->B3SOIFDSPspPtr)); fprintf(fpdebug, "SPb = %.5e;\t SPe = %.5e;\t SPs = %.5e;\n", *(here->B3SOIFDSPbPtr), *(here->B3SOIFDSPePtr), *(here->B3SOIFDSPsPtr)); fprintf(fpdebug, "Dd = %.5e;\t Ddp = %.5e;\t Ss = %.5e;\t Ssp = %.5e;\n", *(here->B3SOIFDDdPtr), *(here->B3SOIFDDdpPtr), *(here->B3SOIFDSsPtr), *(here->B3SOIFDSspPtr)); fprintf(fpdebug, "Bg = %.5e;\t Bdp = %.5e;\t Bsp = %.5e;\t Bb = %.5e;\n", *(here->B3SOIFDBgPtr), *(here->B3SOIFDBdpPtr), *(here->B3SOIFDBspPtr), *(here->B3SOIFDBbPtr)); fprintf(fpdebug, "Be = %.5e;\t Btot = %.5e;\t DPtot = %.5e;\n", *(here->B3SOIFDBePtr), *(here->B3SOIFDBgPtr) + *(here->B3SOIFDBdpPtr) + *(here->B3SOIFDBspPtr) + *(here->B3SOIFDBbPtr) + *(here->B3SOIFDBePtr), *(here->B3SOIFDDPePtr) + *(here->B3SOIFDDPgPtr) + *(here->B3SOIFDDPdpPtr) + *(here->B3SOIFDDPspPtr) + *(here->B3SOIFDDPbPtr)); if (selfheat) { fprintf (fpdebug, "DPtemp = %.5e;\t SPtemp = %.5e;\t Btemp = %.5e;\n", *(here->B3SOIFDDPtempPtr), *(here->B3SOIFDSPtempPtr), *(here->B3SOIFDBtempPtr)); fprintf (fpdebug, "Gtemp = %.5e;\t Etemp = %.5e;\n", *(here->B3SOIFDGtempPtr), *(here->B3SOIFDEtempPtr)); fprintf (fpdebug, "Tempg = %.5e;\t Tempdp = %.5e;\t Tempsp = %.5e;\t Tempb = %.5e;\n", *(here->B3SOIFDTempgPtr), *(here->B3SOIFDTempdpPtr), *(here->B3SOIFDTempspPtr), *(here->B3SOIFDTempbPtr)); fprintf (fpdebug, "Tempe = %.5e;\t TempT = %.5e;\t Temptot = %.5e;\n", *(here->B3SOIFDTempePtr), *(here->B3SOIFDTemptempPtr), *(here->B3SOIFDTempgPtr) + *(here->B3SOIFDTempdpPtr) + *(here->B3SOIFDTempspPtr)+ *(here->B3SOIFDTempbPtr) + *(here->B3SOIFDTempePtr)); } if (here->B3SOIFDbodyMod == 1) { fprintf(fpdebug, "ceqbodcon=%.5e;\t", ceqbodcon); fprintf(fpdebug, "Bp = %.5e;\t Pb = %.5e;\t Pp = %.5e;\n", -gppp, gppb, gppp); fprintf(fpdebug, "Pg=%.5e;\t Pdp=%.5e;\t Psp=%.5e;\t Pe=%.5e;\n", gppg, gppdp, gppsp, gppe); } } if (here->B3SOIFDdebugMod > 3) { fprintf(fpdebug, "Vth = %.4f, Vbs0eff = %.8f, Vdsat = %.4f\n", Vth, Vbs0eff, Vdsat); fprintf(fpdebug, "ueff = %g, Vgsteff = %.4f, Vdseff = %.4f\n", ueff, Vgsteff, Vdseff); fprintf(fpdebug, "Vthfd = %.4f, Vbs0mos = %.4f, Vbs0 = %.4f\n", Vthfd, Vbs0mos, Vbs0); fprintf(fpdebug, "Vbs0t = %.4f, Vbsdio = %.8f\n", Vbs0t, Vbsdio); } fclose(fpdebug); } here->B3SOIFDiterations++; /* increment the iteration counter */ } /* End of Mosfet Instance */ } /* End of Model Instance */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifd.c0000644000265600020320000007667512264261473022157 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 File: b3soifd.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "b3soifddef.h" #include "ngspice/suffix.h" IFparm B3SOIFDpTable[] = { /* parameters */ IOP( "l", B3SOIFD_L, IF_REAL , "Length"), IOP( "w", B3SOIFD_W, IF_REAL , "Width"), IOP( "m", B3SOIFD_M, IF_REAL , "Parallel Multiplier"), IOP( "ad", B3SOIFD_AD, IF_REAL , "Drain area"), IOP( "as", B3SOIFD_AS, IF_REAL , "Source area"), IOP( "pd", B3SOIFD_PD, IF_REAL , "Drain perimeter"), IOP( "ps", B3SOIFD_PS, IF_REAL , "Source perimeter"), IOP( "nrd", B3SOIFD_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", B3SOIFD_NRS, IF_REAL , "Number of squares in source"), IOP( "off", B3SOIFD_OFF, IF_FLAG , "Device is initially off"), IP( "ic", B3SOIFD_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", B3SOIFD_GMBS, IF_REAL, "Gmb"), OP( "gm", B3SOIFD_GM, IF_REAL, "Gm"), OP( "gm/ids", B3SOIFD_GMID, IF_REAL, "Gm/Ids"), OP( "gds", B3SOIFD_GDS, IF_REAL, "Gds"), OP( "vdsat", B3SOIFD_VDSAT, IF_REAL, "Vdsat"), OP( "vth", B3SOIFD_VON, IF_REAL, "Vth"), OP( "ids", B3SOIFD_CD, IF_REAL, "Ids"), OP( "vbs", B3SOIFD_VBS, IF_REAL, "Vbs"), OP( "vgs", B3SOIFD_VGS, IF_REAL, "Vgs"), OP( "vds", B3SOIFD_VDS, IF_REAL, "Vds"), OP( "ves", B3SOIFD_VES, IF_REAL, "Ves"), IOP( "bjtoff", B3SOIFD_BJTOFF, IF_INTEGER, "BJT on/off flag"), IOP( "debug", B3SOIFD_DEBUG, IF_INTEGER, "BJT on/off flag"), IOP( "rth0", B3SOIFD_RTH0, IF_REAL, "Instance Thermal Resistance"), IOP( "cth0", B3SOIFD_CTH0, IF_REAL, "Instance Thermal Capacitance"), IOP( "nrb", B3SOIFD_NRB, IF_REAL, "Number of squares in body"), }; IFparm B3SOIFDmPTable[] = { /* model parameters */ IOP( "capmod", B3SOIFD_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "mobmod", B3SOIFD_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "noimod", B3SOIFD_MOD_NOIMOD, IF_INTEGER, "Noise model selector"), IOP( "paramchk", B3SOIFD_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", B3SOIFD_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", B3SOIFD_MOD_VERSION, IF_REAL, " parameter for model version"), IOP( "tox", B3SOIFD_MOD_TOX, IF_REAL, "Gate oxide thickness in meters"), IOP( "cdsc", B3SOIFD_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", B3SOIFD_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", B3SOIFD_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", B3SOIFD_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", B3SOIFD_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "vsat", B3SOIFD_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", B3SOIFD_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", B3SOIFD_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", B3SOIFD_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", B3SOIFD_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", B3SOIFD_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", B3SOIFD_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", B3SOIFD_MOD_NSUB, IF_REAL, "Substrate doping concentration with polarity"), IOP( "nch", B3SOIFD_MOD_NPEAK, IF_REAL, "Channel doping concentration"), IOP( "ngate", B3SOIFD_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", B3SOIFD_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", B3SOIFD_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", B3SOIFD_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", B3SOIFD_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", B3SOIFD_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", B3SOIFD_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", B3SOIFD_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", B3SOIFD_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", B3SOIFD_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", B3SOIFD_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", B3SOIFD_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", B3SOIFD_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", B3SOIFD_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "nlx", B3SOIFD_MOD_NLX, IF_REAL, "Lateral non-uniform doping effect"), IOP( "dvt0", B3SOIFD_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", B3SOIFD_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", B3SOIFD_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", B3SOIFD_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", B3SOIFD_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", B3SOIFD_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", B3SOIFD_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", B3SOIFD_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", B3SOIFD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", B3SOIFD_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", B3SOIFD_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", B3SOIFD_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", B3SOIFD_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", B3SOIFD_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", B3SOIFD_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", B3SOIFD_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", B3SOIFD_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "ute", B3SOIFD_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", B3SOIFD_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "tnom", B3SOIFD_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", B3SOIFD_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", B3SOIFD_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgeo", B3SOIFD_MOD_CGEO, IF_REAL, "Gate-substrate overlap capacitance"), IOP( "xpart", B3SOIFD_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", B3SOIFD_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", B3SOIFD_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", B3SOIFD_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "prwg", B3SOIFD_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", B3SOIFD_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", B3SOIFD_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", B3SOIFD_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", B3SOIFD_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", B3SOIFD_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", B3SOIFD_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", B3SOIFD_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", B3SOIFD_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "pvag", B3SOIFD_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "shmod", B3SOIFD_MOD_SHMOD, IF_INTEGER, "Self heating mode selector"), IOP( "tbox", B3SOIFD_MOD_TBOX, IF_REAL, "Back gate oxide thickness in meters"), IOP( "tsi", B3SOIFD_MOD_TSI, IF_REAL, "Silicon-on-insulator thickness in meters"), IOP( "xj", B3SOIFD_MOD_XJ, IF_REAL, "Junction Depth"), IOP( "kb1", B3SOIFD_MOD_KB1, IF_REAL, "Backgate coupling coefficient at strong inversion"), IOP( "kb3", B3SOIFD_MOD_KB3, IF_REAL, "Backgate coupling coefficient at subthreshold"), IOP( "dvbd0", B3SOIFD_MOD_DVBD0, IF_REAL, "First coefficient of short-channel effect on Vbs0t"), IOP( "dvbd1", B3SOIFD_MOD_DVBD1, IF_REAL, "Second coefficient of short-channel effect on Vbs0t"), IOP( "vbsa", B3SOIFD_MOD_VBSA, IF_REAL, "Vbs0t offset voltage"), IOP( "delp", B3SOIFD_MOD_DELP, IF_REAL, "Offset constant for limiting Vbseff to Phis"), IOP( "rbody", B3SOIFD_MOD_RBODY, IF_REAL, "Intrinsic body contact sheet resistance"), IOP( "rbsh", B3SOIFD_MOD_RBSH, IF_REAL, "Extrinsic body contact sheet resistance"), IOP( "adice0", B3SOIFD_MOD_ADICE0, IF_REAL, "DICE constant for bulk charge effect"), IOP( "abp", B3SOIFD_MOD_ABP, IF_REAL, "Gate bias coefficient for Xcsat calculation"), IOP( "mxc", B3SOIFD_MOD_MXC, IF_REAL, "A smoothing parameter for Xcsat calculation"), IOP( "rth0", B3SOIFD_MOD_RTH0, IF_REAL, "Self-heating thermal resistance"), IOP( "cth0", B3SOIFD_MOD_CTH0, IF_REAL, "Self-heating thermal capacitance"), IOP( "aii", B3SOIFD_MOD_AII, IF_REAL, "1st Vdsatii parameter"), IOP( "bii", B3SOIFD_MOD_BII, IF_REAL, "2nd Vdsatii parameter"), IOP( "cii", B3SOIFD_MOD_CII, IF_REAL, "3rd Vdsatii parameter"), IOP( "dii", B3SOIFD_MOD_DII, IF_REAL, "4th Vdsatii parameter"), IOP( "ngidl", B3SOIFD_MOD_NGIDL, IF_REAL, "GIDL first parameter"), IOP( "agidl", B3SOIFD_MOD_AGIDL, IF_REAL, "GIDL second parameter"), IOP( "bgidl", B3SOIFD_MOD_BGIDL, IF_REAL, "GIDL third parameter"), IOP( "ndiode", B3SOIFD_MOD_NDIODE, IF_REAL, "Diode non-ideality factor"), IOP( "ntun", B3SOIFD_MOD_NTUN, IF_REAL, "Reverse tunneling non-ideality factor"), IOP( "isbjt", B3SOIFD_MOD_ISBJT, IF_REAL, "BJT emitter injection constant"), IOP( "isdif", B3SOIFD_MOD_ISDIF, IF_REAL, "Body to S/D injection constant"), IOP( "isrec", B3SOIFD_MOD_ISREC, IF_REAL, "Recombination in depletion constant"), IOP( "istun", B3SOIFD_MOD_ISTUN, IF_REAL, "Tunneling diode constant"), IOP( "xbjt", B3SOIFD_MOD_XBJT, IF_REAL, "Temperature coefficient for Isbjt"), IOP( "xdif", B3SOIFD_MOD_XBJT, IF_REAL, "Temperature coefficient for Isdif"), IOP( "xrec", B3SOIFD_MOD_XREC, IF_REAL, "Temperature coefficient for Isrec"), IOP( "xtun", B3SOIFD_MOD_XTUN, IF_REAL, "Temperature coefficient for Istun"), IOP( "edl", B3SOIFD_MOD_EDL, IF_REAL, "Electron diffusion length"), IOP( "kbjt1", B3SOIFD_MOD_KBJT1, IF_REAL, "Vds dependency on BJT base width"), IOP( "tt", B3SOIFD_MOD_TT, IF_REAL, "Diffusion capacitance transit time coefficient"), IOP( "vsdth", B3SOIFD_MOD_VSDTH, IF_REAL, "Source/Drain diffusion threshold voltage"), IOP( "vsdfb", B3SOIFD_MOD_VSDFB, IF_REAL, "Source/Drain diffusion flatband voltage"), IOP( "csdmin", B3SOIFD_MOD_CSDMIN, IF_REAL, "Source/Drain diffusion bottom minimum capacitance"), IOP( "asd", B3SOIFD_MOD_ASD, IF_REAL, "Source/Drain diffusion smoothing parameter"), IOP( "pbswg", B3SOIFD_MOD_PBSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswg", B3SOIFD_MOD_MJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjswg", B3SOIFD_MOD_CJSWG, IF_REAL, "Source/drain (gate side) sidewall junction capacitance per unit width"), IOP( "csdesw", B3SOIFD_MOD_CSDESW, IF_REAL, "Source/drain sidewall fringing constant"), IOP( "lint", B3SOIFD_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", B3SOIFD_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "lln", B3SOIFD_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", B3SOIFD_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwn", B3SOIFD_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", B3SOIFD_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "wr", B3SOIFD_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", B3SOIFD_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", B3SOIFD_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", B3SOIFD_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", B3SOIFD_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wln", B3SOIFD_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", B3SOIFD_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwn", B3SOIFD_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", B3SOIFD_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "b0", B3SOIFD_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", B3SOIFD_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", B3SOIFD_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", B3SOIFD_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappa", B3SOIFD_MOD_CKAPPA, IF_REAL, "New C-V model parameter"), IOP( "cf", B3SOIFD_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", B3SOIFD_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", B3SOIFD_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", B3SOIFD_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", B3SOIFD_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "alpha0", B3SOIFD_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", B3SOIFD_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", B3SOIFD_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "noia", B3SOIFD_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", B3SOIFD_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", B3SOIFD_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "em", B3SOIFD_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", B3SOIFD_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", B3SOIFD_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", B3SOIFD_MOD_KF, IF_REAL, "Flicker noise coefficient"), IOP( "noif", B3SOIFD_MOD_NOIF, IF_REAL, "Floating body excess noise ideality factor"), /* Added for binning - START */ /* Length Dependence */ IOP( "lnch", B3SOIFD_MOD_LNPEAK, IF_REAL, "Length dependence of nch"), IOP( "lnsub", B3SOIFD_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lngate", B3SOIFD_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lvth0", B3SOIFD_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lk1", B3SOIFD_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lk2", B3SOIFD_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", B3SOIFD_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", B3SOIFD_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lvbsa", B3SOIFD_MOD_LVBSA, IF_REAL, "Length dependence of vbsa"), IOP( "ldelp", B3SOIFD_MOD_LDELP, IF_REAL, "Length dependence of delp"), IOP( "lkb1", B3SOIFD_MOD_LKB1, IF_REAL, "Length dependence of kb1"), IOP( "lkb3", B3SOIFD_MOD_LKB3, IF_REAL, "Length dependence of kb3"), IOP( "ldvbd0", B3SOIFD_MOD_LDVBD0, IF_REAL, "Length dependence of dvbd0"), IOP( "ldvbd1", B3SOIFD_MOD_LDVBD1, IF_REAL, "Length dependence of dvbd1"), IOP( "lw0", B3SOIFD_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "lnlx", B3SOIFD_MOD_LNLX, IF_REAL, "Length dependence of nlx"), IOP( "ldvt0", B3SOIFD_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", B3SOIFD_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", B3SOIFD_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", B3SOIFD_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", B3SOIFD_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", B3SOIFD_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "lu0", B3SOIFD_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lua", B3SOIFD_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lub", B3SOIFD_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "luc", B3SOIFD_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "lvsat", B3SOIFD_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "la0", B3SOIFD_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", B3SOIFD_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "lb0", B3SOIFD_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", B3SOIFD_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lketa", B3SOIFD_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "labp", B3SOIFD_MOD_LABP, IF_REAL, "Length dependence of abp"), IOP( "lmxc", B3SOIFD_MOD_LMXC, IF_REAL, "Length dependence of mxc"), IOP( "ladice0", B3SOIFD_MOD_LADICE0, IF_REAL, "Length dependence of adice0"), IOP( "la1", B3SOIFD_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", B3SOIFD_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lrdsw", B3SOIFD_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lprwb", B3SOIFD_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprwg", B3SOIFD_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lwr", B3SOIFD_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "lnfactor", B3SOIFD_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "ldwg", B3SOIFD_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", B3SOIFD_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lvoff", B3SOIFD_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "leta0", B3SOIFD_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", B3SOIFD_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "ldsub", B3SOIFD_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lcit", B3SOIFD_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lcdsc", B3SOIFD_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", B3SOIFD_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", B3SOIFD_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lpclm", B3SOIFD_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", B3SOIFD_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", B3SOIFD_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", B3SOIFD_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "ldrout", B3SOIFD_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "lpvag", B3SOIFD_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "ldelta", B3SOIFD_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "laii", B3SOIFD_MOD_LAII, IF_REAL, "Length dependence of aii"), IOP( "lbii", B3SOIFD_MOD_LBII, IF_REAL, "Length dependence of bii"), IOP( "lcii", B3SOIFD_MOD_LCII, IF_REAL, "Length dependence of cii"), IOP( "ldii", B3SOIFD_MOD_LDII, IF_REAL, "Length dependence of dii"), IOP( "lalpha0", B3SOIFD_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", B3SOIFD_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", B3SOIFD_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", B3SOIFD_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", B3SOIFD_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lngidl", B3SOIFD_MOD_LNGIDL, IF_REAL, "Length dependence of ngidl"), IOP( "lntun", B3SOIFD_MOD_LNTUN, IF_REAL, "Length dependence of ntun"), IOP( "lndiode", B3SOIFD_MOD_LNDIODE, IF_REAL, "Length dependence of ndiode"), IOP( "lisbjt", B3SOIFD_MOD_LISBJT, IF_REAL, "Length dependence of isbjt"), IOP( "lisdif", B3SOIFD_MOD_LISDIF, IF_REAL, "Length dependence of isdif"), IOP( "lisrec", B3SOIFD_MOD_LISREC, IF_REAL, "Length dependence of isrec"), IOP( "listun", B3SOIFD_MOD_LISTUN, IF_REAL, "Length dependence of istun"), IOP( "ledl", B3SOIFD_MOD_LEDL, IF_REAL, "Length dependence of edl"), IOP( "lkbjt1", B3SOIFD_MOD_LKBJT1, IF_REAL, "Length dependence of kbjt1"), IOP( "lvsdfb", B3SOIFD_MOD_LVSDFB, IF_REAL, "Length dependence of vsdfb"), IOP( "lvsdth", B3SOIFD_MOD_LVSDTH, IF_REAL, "Length dependence of vsdth"), /* Width Dependence */ IOP( "wnch", B3SOIFD_MOD_WNPEAK, IF_REAL, "Width dependence of nch"), IOP( "wnsub", B3SOIFD_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wngate", B3SOIFD_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wvth0", B3SOIFD_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wk1", B3SOIFD_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wk2", B3SOIFD_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", B3SOIFD_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", B3SOIFD_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "wvbsa", B3SOIFD_MOD_WVBSA, IF_REAL, "Width dependence of vbsa"), IOP( "wdelp", B3SOIFD_MOD_WDELP, IF_REAL, "Width dependence of delp"), IOP( "wkb1", B3SOIFD_MOD_WKB1, IF_REAL, "Width dependence of kb1"), IOP( "wkb3", B3SOIFD_MOD_WKB3, IF_REAL, "Width dependence of kb3"), IOP( "wdvbd0", B3SOIFD_MOD_WDVBD0, IF_REAL, "Width dependence of dvbd0"), IOP( "wdvbd1", B3SOIFD_MOD_WDVBD1, IF_REAL, "Width dependence of dvbd1"), IOP( "ww0", B3SOIFD_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wnlx", B3SOIFD_MOD_WNLX, IF_REAL, "Width dependence of nlx"), IOP( "wdvt0", B3SOIFD_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", B3SOIFD_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", B3SOIFD_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", B3SOIFD_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", B3SOIFD_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", B3SOIFD_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wu0", B3SOIFD_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wua", B3SOIFD_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wub", B3SOIFD_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wuc", B3SOIFD_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wvsat", B3SOIFD_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wa0", B3SOIFD_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", B3SOIFD_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wb0", B3SOIFD_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", B3SOIFD_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wketa", B3SOIFD_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wabp", B3SOIFD_MOD_WABP, IF_REAL, "Width dependence of abp"), IOP( "wmxc", B3SOIFD_MOD_WMXC, IF_REAL, "Width dependence of mxc"), IOP( "wadice0", B3SOIFD_MOD_WADICE0, IF_REAL, "Width dependence of adice0"), IOP( "wa1", B3SOIFD_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", B3SOIFD_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wrdsw", B3SOIFD_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wprwb", B3SOIFD_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprwg", B3SOIFD_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wwr", B3SOIFD_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wnfactor", B3SOIFD_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wdwg", B3SOIFD_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", B3SOIFD_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wvoff", B3SOIFD_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "weta0", B3SOIFD_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", B3SOIFD_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wdsub", B3SOIFD_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wcit", B3SOIFD_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wcdsc", B3SOIFD_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", B3SOIFD_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", B3SOIFD_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wpclm", B3SOIFD_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", B3SOIFD_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", B3SOIFD_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", B3SOIFD_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wdrout", B3SOIFD_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wpvag", B3SOIFD_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wdelta", B3SOIFD_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "waii", B3SOIFD_MOD_WAII, IF_REAL, "Width dependence of aii"), IOP( "wbii", B3SOIFD_MOD_WBII, IF_REAL, "Width dependence of bii"), IOP( "wcii", B3SOIFD_MOD_WCII, IF_REAL, "Width dependence of cii"), IOP( "wdii", B3SOIFD_MOD_WDII, IF_REAL, "Width dependence of dii"), IOP( "walpha0", B3SOIFD_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", B3SOIFD_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", B3SOIFD_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", B3SOIFD_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", B3SOIFD_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wngidl", B3SOIFD_MOD_WNGIDL, IF_REAL, "Width dependence of ngidl"), IOP( "wntun", B3SOIFD_MOD_WNTUN, IF_REAL, "Width dependence of ntun"), IOP( "wndiode", B3SOIFD_MOD_WNDIODE, IF_REAL, "Width dependence of ndiode"), IOP( "wisbjt", B3SOIFD_MOD_WISBJT, IF_REAL, "Width dependence of isbjt"), IOP( "wisdif", B3SOIFD_MOD_WISDIF, IF_REAL, "Width dependence of isdif"), IOP( "wisrec", B3SOIFD_MOD_WISREC, IF_REAL, "Width dependence of isrec"), IOP( "wistun", B3SOIFD_MOD_WISTUN, IF_REAL, "Width dependence of istun"), IOP( "wedl", B3SOIFD_MOD_WEDL, IF_REAL, "Width dependence of edl"), IOP( "wkbjt1", B3SOIFD_MOD_WKBJT1, IF_REAL, "Width dependence of kbjt1"), IOP( "wvsdfb", B3SOIFD_MOD_WVSDFB, IF_REAL, "Width dependence of vsdfb"), IOP( "wvsdth", B3SOIFD_MOD_WVSDTH, IF_REAL, "Width dependence of vsdth"), /* Cross-term Dependence */ IOP( "pnch", B3SOIFD_MOD_PNPEAK, IF_REAL, "Cross-term dependence of nch"), IOP( "pnsub", B3SOIFD_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pngate", B3SOIFD_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pvth0", B3SOIFD_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pk1", B3SOIFD_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pk2", B3SOIFD_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", B3SOIFD_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", B3SOIFD_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pvbsa", B3SOIFD_MOD_PVBSA, IF_REAL, "Cross-term dependence of vbsa"), IOP( "pdelp", B3SOIFD_MOD_PDELP, IF_REAL, "Cross-term dependence of delp"), IOP( "pkb1", B3SOIFD_MOD_PKB1, IF_REAL, "Cross-term dependence of kb1"), IOP( "pkb3", B3SOIFD_MOD_PKB3, IF_REAL, "Cross-term dependence of kb3"), IOP( "pdvbd0", B3SOIFD_MOD_PDVBD0, IF_REAL, "Cross-term dependence of dvbd0"), IOP( "pdvbd1", B3SOIFD_MOD_PDVBD1, IF_REAL, "Cross-term dependence of dvbd1"), IOP( "pw0", B3SOIFD_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pnlx", B3SOIFD_MOD_PNLX, IF_REAL, "Cross-term dependence of nlx"), IOP( "pdvt0", B3SOIFD_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", B3SOIFD_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", B3SOIFD_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", B3SOIFD_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", B3SOIFD_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", B3SOIFD_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pu0", B3SOIFD_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pua", B3SOIFD_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pub", B3SOIFD_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "puc", B3SOIFD_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "pvsat", B3SOIFD_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pa0", B3SOIFD_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", B3SOIFD_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pb0", B3SOIFD_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", B3SOIFD_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pketa", B3SOIFD_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pabp", B3SOIFD_MOD_PABP, IF_REAL, "Cross-term dependence of abp"), IOP( "pmxc", B3SOIFD_MOD_PMXC, IF_REAL, "Cross-term dependence of mxc"), IOP( "padice0", B3SOIFD_MOD_PADICE0, IF_REAL, "Cross-term dependence of adice0"), IOP( "pa1", B3SOIFD_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", B3SOIFD_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "prdsw", B3SOIFD_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "pprwb", B3SOIFD_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprwg", B3SOIFD_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pwr", B3SOIFD_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pnfactor", B3SOIFD_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pdwg", B3SOIFD_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", B3SOIFD_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pvoff", B3SOIFD_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "peta0", B3SOIFD_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", B3SOIFD_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "pdsub", B3SOIFD_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pcit", B3SOIFD_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pcdsc", B3SOIFD_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", B3SOIFD_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", B3SOIFD_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "ppclm", B3SOIFD_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", B3SOIFD_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", B3SOIFD_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", B3SOIFD_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pdrout", B3SOIFD_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "ppvag", B3SOIFD_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pdelta", B3SOIFD_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "paii", B3SOIFD_MOD_PAII, IF_REAL, "Cross-term dependence of aii"), IOP( "pbii", B3SOIFD_MOD_PBII, IF_REAL, "Cross-term dependence of bii"), IOP( "pcii", B3SOIFD_MOD_PCII, IF_REAL, "Cross-term dependence of cii"), IOP( "pdii", B3SOIFD_MOD_PDII, IF_REAL, "Cross-term dependence of dii"), IOP( "palpha0", B3SOIFD_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", B3SOIFD_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", B3SOIFD_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", B3SOIFD_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", B3SOIFD_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pngidl", B3SOIFD_MOD_PNGIDL, IF_REAL, "Cross-term dependence of ngidl"), IOP( "pntun", B3SOIFD_MOD_PNTUN, IF_REAL, "Cross-term dependence of ntun"), IOP( "pndiode", B3SOIFD_MOD_PNDIODE, IF_REAL, "Cross-term dependence of ndiode"), IOP( "pisbjt", B3SOIFD_MOD_PISBJT, IF_REAL, "Cross-term dependence of isbjt"), IOP( "pisdif", B3SOIFD_MOD_PISDIF, IF_REAL, "Cross-term dependence of isdif"), IOP( "pisrec", B3SOIFD_MOD_PISREC, IF_REAL, "Cross-term dependence of isrec"), IOP( "pistun", B3SOIFD_MOD_PISTUN, IF_REAL, "Cross-term dependence of istun"), IOP( "pedl", B3SOIFD_MOD_PEDL, IF_REAL, "Cross-term dependence of edl"), IOP( "pkbjt1", B3SOIFD_MOD_PKBJT1, IF_REAL, "Cross-term dependence of kbjt1"), IOP( "pvsdfb", B3SOIFD_MOD_PVSDFB, IF_REAL, "Cross-term dependence of vsdfb"), IOP( "pvsdth", B3SOIFD_MOD_PVSDTH, IF_REAL, "Cross-term dependence of vsdth"), /* Added for binning - END */ IP( "nmos", B3SOIFD_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", B3SOIFD_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *B3SOIFDnames[] = { "Drain", "Gate", "Source", "Backgate", "", "Body", "Temp", "Charge", }; int B3SOIFDnSize = NUMELEMS(B3SOIFDnames); int B3SOIFDpTSize = NUMELEMS(B3SOIFDpTable); int B3SOIFDmPTSize = NUMELEMS(B3SOIFDmPTable); int B3SOIFDiSize = sizeof(B3SOIFDinstance); int B3SOIFDmSize = sizeof(B3SOIFDmodel); ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifditf.h0000644000265600020320000000040012264261473022634 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung File: b3soifditf.h **********/ #ifndef DEV_B3SOIFD #define DEV_B3SOIFD #include "b3soifdext.h" SPICEdev *get_b3soifd_info (void); #endif ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdinit.h0000644000265600020320000000042312264261473023022 0ustar andreasadmin#ifndef _B3SOIFDINIT_H #define _B3SOIFDINIT_H extern IFparm B3SOIFDpTable[]; extern IFparm B3SOIFDmPTable[]; extern char *B3SOIFDnames[]; extern int B3SOIFDpTSize; extern int B3SOIFDmPTSize; extern int B3SOIFDnSize; extern int B3SOIFDiSize; extern int B3SOIFDmSize; #endif ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c0000644000265600020320000003217612264261473022651 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soifdnoi.c 98/5/01 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "b3soifddef.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" #include "ngspice/const.h" /* jwan */ /* * B3SOIFDnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with MOSFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the MOSFET's is summed with the variable "OnDens". */ /* Channel thermal and flicker noises are calculated based on the value of model->B3SOIFDnoiMod. If model->B3SOIFDnoiMod = 1, Channel thermal noise = SPICE2 model Flicker noise = SPICE2 model If model->B3SOIFDnoiMod = 2, Channel thermal noise = B3SOIFD model Flicker noise = B3SOIFD model If model->B3SOIFDnoiMod = 3, Channel thermal noise = SPICE2 model Flicker noise = B3SOIFD model If model->B3SOIFDnoiMod = 4, Channel thermal noise = B3SOIFD model Flicker noise = SPICE2 model */ static double B3SOIFDStrongInversionNoiseEval(double vgs, double vds, B3SOIFDmodel *model, B3SOIFDinstance *here, double freq, double temp) { struct b3soifdSizeDependParam *pParam; double cd, esat, DelClm, EffFreq, N0, Nl, Vgst; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->B3SOIFDcd) * here->B3SOIFDm; if (vds > here->B3SOIFDvdsat) { esat = 2.0 * pParam->B3SOIFDvsattemp / here->B3SOIFDueff; T0 = ((((vds - here->B3SOIFDvdsat) / pParam->B3SOIFDlitl) + model->B3SOIFDem) / esat); DelClm = pParam->B3SOIFDlitl * log (MAX(T0, N_MINLOG)); } else DelClm = 0.0; EffFreq = pow(freq, model->B3SOIFDef); T1 = CHARGE * CHARGE * 8.62e-5 * cd * temp * here->B3SOIFDueff; T2 = 1.0e8 * EffFreq * model->B3SOIFDcox * pParam->B3SOIFDleff * pParam->B3SOIFDleff; Vgst = vgs - here->B3SOIFDvon; N0 = model->B3SOIFDcox * Vgst / CHARGE; if (N0 < 0.0) N0 = 0.0; Nl = model->B3SOIFDcox * (Vgst - MIN(vds, here->B3SOIFDvdsat)) / CHARGE; if (Nl < 0.0) Nl = 0.0; T3 = model->B3SOIFDoxideTrapDensityA * log(MAX(((N0 + 2.0e14) / (Nl + 2.0e14)), N_MINLOG)); T4 = model->B3SOIFDoxideTrapDensityB * (N0 - Nl); T5 = model->B3SOIFDoxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = 8.62e-5 * temp * cd * cd; T7 = 1.0e8 * EffFreq * pParam->B3SOIFDleff * pParam->B3SOIFDleff * pParam->B3SOIFDweff * here->B3SOIFDm; T8 = model->B3SOIFDoxideTrapDensityA + model->B3SOIFDoxideTrapDensityB * Nl + model->B3SOIFDoxideTrapDensityC * Nl * Nl; T9 = (Nl + 2.0e14) * (Nl + 2.0e14); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int B3SOIFDnoise (int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; B3SOIFDmodel *model = (B3SOIFDmodel *)inModel; B3SOIFDinstance *here; struct b3soifdSizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[B3SOIFDNSRCS]; double lnNdens[B3SOIFDNSRCS]; double vgs, vds, Slimit; double T1, T10, T11; double Ssi, Swi; int i; /* define the names of the noise sources */ static char *B3SOIFDnNames[B3SOIFDNSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ /* consistent with the index definitions */ ".rs", /* noise due to rs */ /* in B3SOIFDdefs.h */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".fb", /* noise due to floating body */ "" /* total transistor noise */ }; for (; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here != NULL; here = here->B3SOIFDnextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < B3SOIFDNSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->B3SOIFDname, B3SOIFDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < B3SOIFDNSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->B3SOIFDname, B3SOIFDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->B3SOIFDname, B3SOIFDnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[B3SOIFDRDNOIZ], &lnNdens[B3SOIFDRDNOIZ], ckt, THERMNOISE, here->B3SOIFDdNodePrime, here->B3SOIFDdNode, here->B3SOIFDdrainConductance * here->B3SOIFDm); NevalSrc(&noizDens[B3SOIFDRSNOIZ], &lnNdens[B3SOIFDRSNOIZ], ckt, THERMNOISE, here->B3SOIFDsNodePrime, here->B3SOIFDsNode, here->B3SOIFDsourceConductance * here->B3SOIFDm); switch( model->B3SOIFDnoiMod ) { case 1: case 3: NevalSrc(&noizDens[B3SOIFDIDNOIZ], &lnNdens[B3SOIFDIDNOIZ], ckt, THERMNOISE, here->B3SOIFDdNodePrime, here->B3SOIFDsNodePrime, (2.0 / 3.0 * fabs(here->B3SOIFDm * (here->B3SOIFDgm + here->B3SOIFDgds + here->B3SOIFDgmbs)))); break; case 2: case 4: NevalSrc(&noizDens[B3SOIFDIDNOIZ], &lnNdens[B3SOIFDIDNOIZ], ckt, THERMNOISE, here->B3SOIFDdNodePrime, here->B3SOIFDsNodePrime, (here->B3SOIFDueff * fabs((here->B3SOIFDqinv * here->B3SOIFDm) / (pParam->B3SOIFDleff * pParam->B3SOIFDleff)))); break; } NevalSrc(&noizDens[B3SOIFDFLNOIZ], NULL, ckt, N_GAIN, here->B3SOIFDdNodePrime, here->B3SOIFDsNodePrime, (double) 0.0); switch( model->B3SOIFDnoiMod ) { case 1: case 4: noizDens[B3SOIFDFLNOIZ] *= model->B3SOIFDkf * exp(model->B3SOIFDaf * log(MAX(fabs(here->B3SOIFDcd * here->B3SOIFDm), N_MINLOG))) / (pow(data->freq, model->B3SOIFDef) * pParam->B3SOIFDleff * pParam->B3SOIFDleff * model->B3SOIFDcox); break; case 2: case 3: vgs = *(ckt->CKTstates[0] + here->B3SOIFDvgs); vds = *(ckt->CKTstates[0] + here->B3SOIFDvds); if (vds < 0.0) { vds = -vds; vgs = vgs + vds; } if (vgs >= here->B3SOIFDvon + 0.1) { Ssi = B3SOIFDStrongInversionNoiseEval(vgs, vds, model, here, data->freq, ckt->CKTtemp); noizDens[B3SOIFDFLNOIZ] *= Ssi; } else { pParam = here->pParam; T10 = model->B3SOIFDoxideTrapDensityA * 8.62e-5 * ckt->CKTtemp; T11 = pParam->B3SOIFDweff * here->B3SOIFDm * pParam->B3SOIFDleff * pow(data->freq, model->B3SOIFDef) * 4.0e36; Swi = T10 / T11 * here->B3SOIFDcd * here->B3SOIFDm * here->B3SOIFDcd * here->B3SOIFDm; Slimit = B3SOIFDStrongInversionNoiseEval( here->B3SOIFDvon + 0.1, vds, model, here, data->freq, ckt->CKTtemp); T1 = Swi + Slimit; if (T1 > 0.0) noizDens[B3SOIFDFLNOIZ] *= (Slimit * Swi) / T1; else noizDens[B3SOIFDFLNOIZ] *= 0.0; } break; } lnNdens[B3SOIFDFLNOIZ] = log(MAX(noizDens[B3SOIFDFLNOIZ], N_MINLOG)); /* Low frequency excess noise due to FBE */ noizDens[B3SOIFDFBNOIZ] = 0.0; noizDens[B3SOIFDTOTNOIZ] = noizDens[B3SOIFDRDNOIZ] + noizDens[B3SOIFDRSNOIZ] + noizDens[B3SOIFDIDNOIZ] + noizDens[B3SOIFDFLNOIZ] + noizDens[B3SOIFDFBNOIZ]; lnNdens[B3SOIFDTOTNOIZ] = log(MAX(noizDens[B3SOIFDTOTNOIZ], N_MINLOG)); *OnDens += noizDens[B3SOIFDTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < B3SOIFDNSRCS; i++) { here->B3SOIFDnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < B3SOIFDNSRCS; i++) { here->B3SOIFDnVar[OUTNOIZ][i] = 0.0; here->B3SOIFDnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < B3SOIFDNSRCS; i++) { if (i != B3SOIFDTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->B3SOIFDnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->B3SOIFDnVar[LNLSTDENS][i] + data->lnGainInv, data); here->B3SOIFDnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->B3SOIFDnVar[OUTNOIZ][i] += tempOnoise; here->B3SOIFDnVar[OUTNOIZ][B3SOIFDTOTNOIZ] += tempOnoise; here->B3SOIFDnVar[INNOIZ][i] += tempInoise; here->B3SOIFDnVar[INNOIZ][B3SOIFDTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < B3SOIFDNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < B3SOIFDNSRCS; i++) { data->outpVector[data->outNumber++] = here->B3SOIFDnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->B3SOIFDnVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/BsimTerms_use0000644000265600020320000000247312264261473023147 0ustar andreasadminThe terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdset.c0000644000265600020320000015303712264261473022657 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soifdset.c 98/5/01 Modified by Pin Su, Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define SMOOTHFACTOR 0.1 #define EPSOX 3.453133e-11 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 #define Meter2Micron 1.0e6 int B3SOIFDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; int error; CKTnode *tmp; double tmp1, tmp2; double nfb0, Cboxt; CKTnode *tmpNode; IFuid tmpName; /* loop through all the B3SOIFD device models */ for( ; model != NULL; model = model->B3SOIFDnextModel ) { /* Default value Processing for B3SOIFD MOSFET Models */ if (!model->B3SOIFDtypeGiven) model->B3SOIFDtype = NMOS; if (!model->B3SOIFDmobModGiven) model->B3SOIFDmobMod = 1; if (!model->B3SOIFDbinUnitGiven) model->B3SOIFDbinUnit = 1; if (!model->B3SOIFDparamChkGiven) model->B3SOIFDparamChk = 0; if (!model->B3SOIFDcapModGiven) model->B3SOIFDcapMod = 2; if (!model->B3SOIFDnoiModGiven) model->B3SOIFDnoiMod = 1; if (!model->B3SOIFDshModGiven) model->B3SOIFDshMod = 0; if (!model->B3SOIFDversionGiven) model->B3SOIFDversion = 2.0; if (!model->B3SOIFDtoxGiven) model->B3SOIFDtox = 100.0e-10; model->B3SOIFDcox = 3.453133e-11 / model->B3SOIFDtox; if (!model->B3SOIFDcdscGiven) model->B3SOIFDcdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->B3SOIFDcdscbGiven) model->B3SOIFDcdscb = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIFDcdscdGiven) model->B3SOIFDcdscd = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIFDcitGiven) model->B3SOIFDcit = 0.0; /* unit Q/V/m^2 */ if (!model->B3SOIFDnfactorGiven) model->B3SOIFDnfactor = 1; if (!model->B3SOIFDvsatGiven) model->B3SOIFDvsat = 8.0e4; /* unit m/s */ if (!model->B3SOIFDatGiven) model->B3SOIFDat = 3.3e4; /* unit m/s */ if (!model->B3SOIFDa0Given) model->B3SOIFDa0 = 1.0; if (!model->B3SOIFDagsGiven) model->B3SOIFDags = 0.0; if (!model->B3SOIFDa1Given) model->B3SOIFDa1 = 0.0; if (!model->B3SOIFDa2Given) model->B3SOIFDa2 = 1.0; if (!model->B3SOIFDketaGiven) model->B3SOIFDketa = -0.6; /* unit / V */ if (!model->B3SOIFDnsubGiven) model->B3SOIFDnsub = 6.0e16; /* unit 1/cm3 */ if (!model->B3SOIFDnpeakGiven) model->B3SOIFDnpeak = 1.7e17; /* unit 1/cm3 */ if (!model->B3SOIFDngateGiven) model->B3SOIFDngate = 0; /* unit 1/cm3 */ if (!model->B3SOIFDvbmGiven) model->B3SOIFDvbm = -3.0; if (!model->B3SOIFDxtGiven) model->B3SOIFDxt = 1.55e-7; if (!model->B3SOIFDkt1Given) model->B3SOIFDkt1 = -0.11; /* unit V */ if (!model->B3SOIFDkt1lGiven) model->B3SOIFDkt1l = 0.0; /* unit V*m */ if (!model->B3SOIFDkt2Given) model->B3SOIFDkt2 = 0.022; /* No unit */ if (!model->B3SOIFDk3Given) model->B3SOIFDk3 = 0.0; if (!model->B3SOIFDk3bGiven) model->B3SOIFDk3b = 0.0; if (!model->B3SOIFDw0Given) model->B3SOIFDw0 = 2.5e-6; if (!model->B3SOIFDnlxGiven) model->B3SOIFDnlx = 1.74e-7; if (!model->B3SOIFDdvt0Given) model->B3SOIFDdvt0 = 2.2; if (!model->B3SOIFDdvt1Given) model->B3SOIFDdvt1 = 0.53; if (!model->B3SOIFDdvt2Given) model->B3SOIFDdvt2 = -0.032; /* unit 1 / V */ if (!model->B3SOIFDdvt0wGiven) model->B3SOIFDdvt0w = 0.0; if (!model->B3SOIFDdvt1wGiven) model->B3SOIFDdvt1w = 5.3e6; if (!model->B3SOIFDdvt2wGiven) model->B3SOIFDdvt2w = -0.032; if (!model->B3SOIFDdroutGiven) model->B3SOIFDdrout = 0.56; if (!model->B3SOIFDdsubGiven) model->B3SOIFDdsub = model->B3SOIFDdrout; if (!model->B3SOIFDvth0Given) model->B3SOIFDvth0 = (model->B3SOIFDtype == NMOS) ? 0.7 : -0.7; if (!model->B3SOIFDuaGiven) model->B3SOIFDua = 2.25e-9; /* unit m/V */ if (!model->B3SOIFDua1Given) model->B3SOIFDua1 = 4.31e-9; /* unit m/V */ if (!model->B3SOIFDubGiven) model->B3SOIFDub = 5.87e-19; /* unit (m/V)**2 */ if (!model->B3SOIFDub1Given) model->B3SOIFDub1 = -7.61e-18; /* unit (m/V)**2 */ if (!model->B3SOIFDucGiven) model->B3SOIFDuc = (model->B3SOIFDmobMod == 3) ? -0.0465 : -0.0465e-9; if (!model->B3SOIFDuc1Given) model->B3SOIFDuc1 = (model->B3SOIFDmobMod == 3) ? -0.056 : -0.056e-9; if (!model->B3SOIFDu0Given) model->B3SOIFDu0 = (model->B3SOIFDtype == NMOS) ? 0.067 : 0.025; if (!model->B3SOIFDuteGiven) model->B3SOIFDute = -1.5; if (!model->B3SOIFDvoffGiven) model->B3SOIFDvoff = -0.08; if (!model->B3SOIFDdeltaGiven) model->B3SOIFDdelta = 0.01; if (!model->B3SOIFDrdswGiven) model->B3SOIFDrdsw = 100; if (!model->B3SOIFDprwgGiven) model->B3SOIFDprwg = 0.0; /* unit 1/V */ if (!model->B3SOIFDprwbGiven) model->B3SOIFDprwb = 0.0; if (!model->B3SOIFDprtGiven) if (!model->B3SOIFDprtGiven) model->B3SOIFDprt = 0.0; if (!model->B3SOIFDeta0Given) model->B3SOIFDeta0 = 0.08; /* no unit */ if (!model->B3SOIFDetabGiven) model->B3SOIFDetab = -0.07; /* unit 1/V */ if (!model->B3SOIFDpclmGiven) model->B3SOIFDpclm = 1.3; /* no unit */ if (!model->B3SOIFDpdibl1Given) model->B3SOIFDpdibl1 = .39; /* no unit */ if (!model->B3SOIFDpdibl2Given) model->B3SOIFDpdibl2 = 0.0086; /* no unit */ if (!model->B3SOIFDpdiblbGiven) model->B3SOIFDpdiblb = 0.0; /* 1/V */ if (!model->B3SOIFDpvagGiven) model->B3SOIFDpvag = 0.0; if (!model->B3SOIFDwrGiven) model->B3SOIFDwr = 1.0; if (!model->B3SOIFDdwgGiven) model->B3SOIFDdwg = 0.0; if (!model->B3SOIFDdwbGiven) model->B3SOIFDdwb = 0.0; if (!model->B3SOIFDb0Given) model->B3SOIFDb0 = 0.0; if (!model->B3SOIFDb1Given) model->B3SOIFDb1 = 0.0; if (!model->B3SOIFDalpha0Given) model->B3SOIFDalpha0 = 0.0; if (!model->B3SOIFDalpha1Given) model->B3SOIFDalpha1 = 1.0; if (!model->B3SOIFDbeta0Given) model->B3SOIFDbeta0 = 30.0; if (!model->B3SOIFDcgslGiven) model->B3SOIFDcgsl = 0.0; if (!model->B3SOIFDcgdlGiven) model->B3SOIFDcgdl = 0.0; if (!model->B3SOIFDckappaGiven) model->B3SOIFDckappa = 0.6; if (!model->B3SOIFDclcGiven) model->B3SOIFDclc = 0.1e-7; if (!model->B3SOIFDcleGiven) model->B3SOIFDcle = 0.0; if (!model->B3SOIFDtboxGiven) model->B3SOIFDtbox = 3e-7; if (!model->B3SOIFDtsiGiven) model->B3SOIFDtsi = 1e-7; if (!model->B3SOIFDxjGiven) model->B3SOIFDxj = model->B3SOIFDtsi; if (!model->B3SOIFDkb1Given) model->B3SOIFDkb1 = 1; if (!model->B3SOIFDkb3Given) model->B3SOIFDkb3 = 1; if (!model->B3SOIFDdvbd0Given) model->B3SOIFDdvbd0 = 0.0; if (!model->B3SOIFDdvbd1Given) model->B3SOIFDdvbd1 = 0.0; if (!model->B3SOIFDvbsaGiven) model->B3SOIFDvbsa = 0.0; if (!model->B3SOIFDdelpGiven) model->B3SOIFDdelp = 0.02; if (!model->B3SOIFDrbodyGiven) model->B3SOIFDrbody = 0.0; if (!model->B3SOIFDrbshGiven) model->B3SOIFDrbsh = 0.0; if (!model->B3SOIFDadice0Given) model->B3SOIFDadice0 = 1; if (!model->B3SOIFDabpGiven) model->B3SOIFDabp = 1; if (!model->B3SOIFDmxcGiven) model->B3SOIFDmxc = -0.9; if (!model->B3SOIFDrth0Given) model->B3SOIFDrth0 = 0; if (!model->B3SOIFDcth0Given) model->B3SOIFDcth0 =0; if (!model->B3SOIFDaiiGiven) model->B3SOIFDaii = 0.0; if (!model->B3SOIFDbiiGiven) model->B3SOIFDbii = 0.0; if (!model->B3SOIFDciiGiven) model->B3SOIFDcii = 0.0; if (!model->B3SOIFDdiiGiven) model->B3SOIFDdii = -1.0; if (!model->B3SOIFDagidlGiven) model->B3SOIFDagidl = 0.0; if (!model->B3SOIFDbgidlGiven) model->B3SOIFDbgidl = 0.0; if (!model->B3SOIFDngidlGiven) model->B3SOIFDngidl = 1.2; if (!model->B3SOIFDndiodeGiven) model->B3SOIFDndiode = 1.0; if (!model->B3SOIFDntunGiven) model->B3SOIFDntun = 10.0; if (!model->B3SOIFDisbjtGiven) model->B3SOIFDisbjt = 1e-6; if (!model->B3SOIFDisdifGiven) model->B3SOIFDisdif = 0.0; if (!model->B3SOIFDisrecGiven) model->B3SOIFDisrec = 1e-5; if (!model->B3SOIFDistunGiven) model->B3SOIFDistun = 0.0; if (!model->B3SOIFDxbjtGiven) model->B3SOIFDxbjt = 2; if (!model->B3SOIFDxdifGiven) model->B3SOIFDxdif = 2; if (!model->B3SOIFDxrecGiven) model->B3SOIFDxrec = 20; if (!model->B3SOIFDxtunGiven) model->B3SOIFDxtun = 0; if (!model->B3SOIFDedlGiven) model->B3SOIFDedl = 2e-6; if (!model->B3SOIFDkbjt1Given) model->B3SOIFDkbjt1 = 0; if (!model->B3SOIFDttGiven) model->B3SOIFDtt = 1e-12; if (!model->B3SOIFDasdGiven) model->B3SOIFDasd = 0.3; /* unit degree celcius */ if (!model->B3SOIFDtnomGiven) model->B3SOIFDtnom = ckt->CKTnomTemp; if (!model->B3SOIFDLintGiven) model->B3SOIFDLint = 0.0; if (!model->B3SOIFDLlGiven) model->B3SOIFDLl = 0.0; if (!model->B3SOIFDLlnGiven) model->B3SOIFDLln = 1.0; if (!model->B3SOIFDLwGiven) model->B3SOIFDLw = 0.0; if (!model->B3SOIFDLwnGiven) model->B3SOIFDLwn = 1.0; if (!model->B3SOIFDLwlGiven) model->B3SOIFDLwl = 0.0; if (!model->B3SOIFDLminGiven) model->B3SOIFDLmin = 0.0; if (!model->B3SOIFDLmaxGiven) model->B3SOIFDLmax = 1.0; if (!model->B3SOIFDWintGiven) model->B3SOIFDWint = 0.0; if (!model->B3SOIFDWlGiven) model->B3SOIFDWl = 0.0; if (!model->B3SOIFDWlnGiven) model->B3SOIFDWln = 1.0; if (!model->B3SOIFDWwGiven) model->B3SOIFDWw = 0.0; if (!model->B3SOIFDWwnGiven) model->B3SOIFDWwn = 1.0; if (!model->B3SOIFDWwlGiven) model->B3SOIFDWwl = 0.0; if (!model->B3SOIFDWminGiven) model->B3SOIFDWmin = 0.0; if (!model->B3SOIFDWmaxGiven) model->B3SOIFDWmax = 1.0; if (!model->B3SOIFDdwcGiven) model->B3SOIFDdwc = model->B3SOIFDWint; if (!model->B3SOIFDdlcGiven) model->B3SOIFDdlc = model->B3SOIFDLint; /* Added for binning - START */ /* Length dependence */ if (!model->B3SOIFDlnpeakGiven) model->B3SOIFDlnpeak = 0.0; if (!model->B3SOIFDlnsubGiven) model->B3SOIFDlnsub = 0.0; if (!model->B3SOIFDlngateGiven) model->B3SOIFDlngate = 0.0; if (!model->B3SOIFDlvth0Given) model->B3SOIFDlvth0 = 0.0; if (!model->B3SOIFDlk1Given) model->B3SOIFDlk1 = 0.0; if (!model->B3SOIFDlk2Given) model->B3SOIFDlk2 = 0.0; if (!model->B3SOIFDlk3Given) model->B3SOIFDlk3 = 0.0; if (!model->B3SOIFDlk3bGiven) model->B3SOIFDlk3b = 0.0; if (!model->B3SOIFDlvbsaGiven) model->B3SOIFDlvbsa = 0.0; if (!model->B3SOIFDldelpGiven) model->B3SOIFDldelp = 0.0; if (!model->B3SOIFDlkb1Given) model->B3SOIFDlkb1 = 0.0; if (!model->B3SOIFDlkb3Given) model->B3SOIFDlkb3 = 1.0; if (!model->B3SOIFDldvbd0Given) model->B3SOIFDldvbd0 = 1.0; if (!model->B3SOIFDldvbd1Given) model->B3SOIFDldvbd1 = 1.0; if (!model->B3SOIFDlw0Given) model->B3SOIFDlw0 = 0.0; if (!model->B3SOIFDlnlxGiven) model->B3SOIFDlnlx = 0.0; if (!model->B3SOIFDldvt0Given) model->B3SOIFDldvt0 = 0.0; if (!model->B3SOIFDldvt1Given) model->B3SOIFDldvt1 = 0.0; if (!model->B3SOIFDldvt2Given) model->B3SOIFDldvt2 = 0.0; if (!model->B3SOIFDldvt0wGiven) model->B3SOIFDldvt0w = 0.0; if (!model->B3SOIFDldvt1wGiven) model->B3SOIFDldvt1w = 0.0; if (!model->B3SOIFDldvt2wGiven) model->B3SOIFDldvt2w = 0.0; if (!model->B3SOIFDlu0Given) model->B3SOIFDlu0 = 0.0; if (!model->B3SOIFDluaGiven) model->B3SOIFDlua = 0.0; if (!model->B3SOIFDlubGiven) model->B3SOIFDlub = 0.0; if (!model->B3SOIFDlucGiven) model->B3SOIFDluc = 0.0; if (!model->B3SOIFDlvsatGiven) model->B3SOIFDlvsat = 0.0; if (!model->B3SOIFDla0Given) model->B3SOIFDla0 = 0.0; if (!model->B3SOIFDlagsGiven) model->B3SOIFDlags = 0.0; if (!model->B3SOIFDlb0Given) model->B3SOIFDlb0 = 0.0; if (!model->B3SOIFDlb1Given) model->B3SOIFDlb1 = 0.0; if (!model->B3SOIFDlketaGiven) model->B3SOIFDlketa = 0.0; if (!model->B3SOIFDlabpGiven) model->B3SOIFDlabp = 0.0; if (!model->B3SOIFDlmxcGiven) model->B3SOIFDlmxc = 0.0; if (!model->B3SOIFDladice0Given) model->B3SOIFDladice0 = 0.0; if (!model->B3SOIFDla1Given) model->B3SOIFDla1 = 0.0; if (!model->B3SOIFDla2Given) model->B3SOIFDla2 = 0.0; if (!model->B3SOIFDlrdswGiven) model->B3SOIFDlrdsw = 0.0; if (!model->B3SOIFDlprwbGiven) model->B3SOIFDlprwb = 0.0; if (!model->B3SOIFDlprwgGiven) model->B3SOIFDlprwg = 0.0; if (!model->B3SOIFDlwrGiven) model->B3SOIFDlwr = 0.0; if (!model->B3SOIFDlnfactorGiven) model->B3SOIFDlnfactor = 0.0; if (!model->B3SOIFDldwgGiven) model->B3SOIFDldwg = 0.0; if (!model->B3SOIFDldwbGiven) model->B3SOIFDldwb = 0.0; if (!model->B3SOIFDlvoffGiven) model->B3SOIFDlvoff = 0.0; if (!model->B3SOIFDleta0Given) model->B3SOIFDleta0 = 0.0; if (!model->B3SOIFDletabGiven) model->B3SOIFDletab = 0.0; if (!model->B3SOIFDldsubGiven) model->B3SOIFDldsub = 0.0; if (!model->B3SOIFDlcitGiven) model->B3SOIFDlcit = 0.0; if (!model->B3SOIFDlcdscGiven) model->B3SOIFDlcdsc = 0.0; if (!model->B3SOIFDlcdscbGiven) model->B3SOIFDlcdscb = 0.0; if (!model->B3SOIFDlcdscdGiven) model->B3SOIFDlcdscd = 0.0; if (!model->B3SOIFDlpclmGiven) model->B3SOIFDlpclm = 0.0; if (!model->B3SOIFDlpdibl1Given) model->B3SOIFDlpdibl1 = 0.0; if (!model->B3SOIFDlpdibl2Given) model->B3SOIFDlpdibl2 = 0.0; if (!model->B3SOIFDlpdiblbGiven) model->B3SOIFDlpdiblb = 0.0; if (!model->B3SOIFDldroutGiven) model->B3SOIFDldrout = 0.0; if (!model->B3SOIFDlpvagGiven) model->B3SOIFDlpvag = 0.0; if (!model->B3SOIFDldeltaGiven) model->B3SOIFDldelta = 0.0; if (!model->B3SOIFDlaiiGiven) model->B3SOIFDlaii = 0.0; if (!model->B3SOIFDlbiiGiven) model->B3SOIFDlbii = 0.0; if (!model->B3SOIFDlciiGiven) model->B3SOIFDlcii = 0.0; if (!model->B3SOIFDldiiGiven) model->B3SOIFDldii = 0.0; if (!model->B3SOIFDlalpha0Given) model->B3SOIFDlalpha0 = 0.0; if (!model->B3SOIFDlalpha1Given) model->B3SOIFDlalpha1 = 0.0; if (!model->B3SOIFDlbeta0Given) model->B3SOIFDlbeta0 = 0.0; if (!model->B3SOIFDlagidlGiven) model->B3SOIFDlagidl = 0.0; if (!model->B3SOIFDlbgidlGiven) model->B3SOIFDlbgidl = 0.0; if (!model->B3SOIFDlngidlGiven) model->B3SOIFDlngidl = 0.0; if (!model->B3SOIFDlntunGiven) model->B3SOIFDlntun = 0.0; if (!model->B3SOIFDlndiodeGiven) model->B3SOIFDlndiode = 0.0; if (!model->B3SOIFDlisbjtGiven) model->B3SOIFDlisbjt = 0.0; if (!model->B3SOIFDlisdifGiven) model->B3SOIFDlisdif = 0.0; if (!model->B3SOIFDlisrecGiven) model->B3SOIFDlisrec = 0.0; if (!model->B3SOIFDlistunGiven) model->B3SOIFDlistun = 0.0; if (!model->B3SOIFDledlGiven) model->B3SOIFDledl = 0.0; if (!model->B3SOIFDlkbjt1Given) model->B3SOIFDlkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIFDlvsdfbGiven) model->B3SOIFDlvsdfb = 0.0; if (!model->B3SOIFDlvsdthGiven) model->B3SOIFDlvsdth = 0.0; /* Width dependence */ if (!model->B3SOIFDwnpeakGiven) model->B3SOIFDwnpeak = 0.0; if (!model->B3SOIFDwnsubGiven) model->B3SOIFDwnsub = 0.0; if (!model->B3SOIFDwngateGiven) model->B3SOIFDwngate = 0.0; if (!model->B3SOIFDwvth0Given) model->B3SOIFDwvth0 = 0.0; if (!model->B3SOIFDwk1Given) model->B3SOIFDwk1 = 0.0; if (!model->B3SOIFDwk2Given) model->B3SOIFDwk2 = 0.0; if (!model->B3SOIFDwk3Given) model->B3SOIFDwk3 = 0.0; if (!model->B3SOIFDwk3bGiven) model->B3SOIFDwk3b = 0.0; if (!model->B3SOIFDwvbsaGiven) model->B3SOIFDwvbsa = 0.0; if (!model->B3SOIFDwdelpGiven) model->B3SOIFDwdelp = 0.0; if (!model->B3SOIFDwkb1Given) model->B3SOIFDwkb1 = 0.0; if (!model->B3SOIFDwkb3Given) model->B3SOIFDwkb3 = 1.0; if (!model->B3SOIFDwdvbd0Given) model->B3SOIFDwdvbd0 = 1.0; if (!model->B3SOIFDwdvbd1Given) model->B3SOIFDwdvbd1 = 1.0; if (!model->B3SOIFDww0Given) model->B3SOIFDww0 = 0.0; if (!model->B3SOIFDwnlxGiven) model->B3SOIFDwnlx = 0.0; if (!model->B3SOIFDwdvt0Given) model->B3SOIFDwdvt0 = 0.0; if (!model->B3SOIFDwdvt1Given) model->B3SOIFDwdvt1 = 0.0; if (!model->B3SOIFDwdvt2Given) model->B3SOIFDwdvt2 = 0.0; if (!model->B3SOIFDwdvt0wGiven) model->B3SOIFDwdvt0w = 0.0; if (!model->B3SOIFDwdvt1wGiven) model->B3SOIFDwdvt1w = 0.0; if (!model->B3SOIFDwdvt2wGiven) model->B3SOIFDwdvt2w = 0.0; if (!model->B3SOIFDwu0Given) model->B3SOIFDwu0 = 0.0; if (!model->B3SOIFDwuaGiven) model->B3SOIFDwua = 0.0; if (!model->B3SOIFDwubGiven) model->B3SOIFDwub = 0.0; if (!model->B3SOIFDwucGiven) model->B3SOIFDwuc = 0.0; if (!model->B3SOIFDwvsatGiven) model->B3SOIFDwvsat = 0.0; if (!model->B3SOIFDwa0Given) model->B3SOIFDwa0 = 0.0; if (!model->B3SOIFDwagsGiven) model->B3SOIFDwags = 0.0; if (!model->B3SOIFDwb0Given) model->B3SOIFDwb0 = 0.0; if (!model->B3SOIFDwb1Given) model->B3SOIFDwb1 = 0.0; if (!model->B3SOIFDwketaGiven) model->B3SOIFDwketa = 0.0; if (!model->B3SOIFDwabpGiven) model->B3SOIFDwabp = 0.0; if (!model->B3SOIFDwmxcGiven) model->B3SOIFDwmxc = 0.0; if (!model->B3SOIFDwadice0Given) model->B3SOIFDwadice0 = 0.0; if (!model->B3SOIFDwa1Given) model->B3SOIFDwa1 = 0.0; if (!model->B3SOIFDwa2Given) model->B3SOIFDwa2 = 0.0; if (!model->B3SOIFDwrdswGiven) model->B3SOIFDwrdsw = 0.0; if (!model->B3SOIFDwprwbGiven) model->B3SOIFDwprwb = 0.0; if (!model->B3SOIFDwprwgGiven) model->B3SOIFDwprwg = 0.0; if (!model->B3SOIFDwwrGiven) model->B3SOIFDwwr = 0.0; if (!model->B3SOIFDwnfactorGiven) model->B3SOIFDwnfactor = 0.0; if (!model->B3SOIFDwdwgGiven) model->B3SOIFDwdwg = 0.0; if (!model->B3SOIFDwdwbGiven) model->B3SOIFDwdwb = 0.0; if (!model->B3SOIFDwvoffGiven) model->B3SOIFDwvoff = 0.0; if (!model->B3SOIFDweta0Given) model->B3SOIFDweta0 = 0.0; if (!model->B3SOIFDwetabGiven) model->B3SOIFDwetab = 0.0; if (!model->B3SOIFDwdsubGiven) model->B3SOIFDwdsub = 0.0; if (!model->B3SOIFDwcitGiven) model->B3SOIFDwcit = 0.0; if (!model->B3SOIFDwcdscGiven) model->B3SOIFDwcdsc = 0.0; if (!model->B3SOIFDwcdscbGiven) model->B3SOIFDwcdscb = 0.0; if (!model->B3SOIFDwcdscdGiven) model->B3SOIFDwcdscd = 0.0; if (!model->B3SOIFDwpclmGiven) model->B3SOIFDwpclm = 0.0; if (!model->B3SOIFDwpdibl1Given) model->B3SOIFDwpdibl1 = 0.0; if (!model->B3SOIFDwpdibl2Given) model->B3SOIFDwpdibl2 = 0.0; if (!model->B3SOIFDwpdiblbGiven) model->B3SOIFDwpdiblb = 0.0; if (!model->B3SOIFDwdroutGiven) model->B3SOIFDwdrout = 0.0; if (!model->B3SOIFDwpvagGiven) model->B3SOIFDwpvag = 0.0; if (!model->B3SOIFDwdeltaGiven) model->B3SOIFDwdelta = 0.0; if (!model->B3SOIFDwaiiGiven) model->B3SOIFDwaii = 0.0; if (!model->B3SOIFDwbiiGiven) model->B3SOIFDwbii = 0.0; if (!model->B3SOIFDwciiGiven) model->B3SOIFDwcii = 0.0; if (!model->B3SOIFDwdiiGiven) model->B3SOIFDwdii = 0.0; if (!model->B3SOIFDwalpha0Given) model->B3SOIFDwalpha0 = 0.0; if (!model->B3SOIFDwalpha1Given) model->B3SOIFDwalpha1 = 0.0; if (!model->B3SOIFDwbeta0Given) model->B3SOIFDwbeta0 = 0.0; if (!model->B3SOIFDwagidlGiven) model->B3SOIFDwagidl = 0.0; if (!model->B3SOIFDwbgidlGiven) model->B3SOIFDwbgidl = 0.0; if (!model->B3SOIFDwngidlGiven) model->B3SOIFDwngidl = 0.0; if (!model->B3SOIFDwntunGiven) model->B3SOIFDwntun = 0.0; if (!model->B3SOIFDwndiodeGiven) model->B3SOIFDwndiode = 0.0; if (!model->B3SOIFDwisbjtGiven) model->B3SOIFDwisbjt = 0.0; if (!model->B3SOIFDwisdifGiven) model->B3SOIFDwisdif = 0.0; if (!model->B3SOIFDwisrecGiven) model->B3SOIFDwisrec = 0.0; if (!model->B3SOIFDwistunGiven) model->B3SOIFDwistun = 0.0; if (!model->B3SOIFDwedlGiven) model->B3SOIFDwedl = 0.0; if (!model->B3SOIFDwkbjt1Given) model->B3SOIFDwkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIFDwvsdfbGiven) model->B3SOIFDwvsdfb = 0.0; if (!model->B3SOIFDwvsdthGiven) model->B3SOIFDwvsdth = 0.0; /* Cross-term dependence */ if (!model->B3SOIFDpnpeakGiven) model->B3SOIFDpnpeak = 0.0; if (!model->B3SOIFDpnsubGiven) model->B3SOIFDpnsub = 0.0; if (!model->B3SOIFDpngateGiven) model->B3SOIFDpngate = 0.0; if (!model->B3SOIFDpvth0Given) model->B3SOIFDpvth0 = 0.0; if (!model->B3SOIFDpk1Given) model->B3SOIFDpk1 = 0.0; if (!model->B3SOIFDpk2Given) model->B3SOIFDpk2 = 0.0; if (!model->B3SOIFDpk3Given) model->B3SOIFDpk3 = 0.0; if (!model->B3SOIFDpk3bGiven) model->B3SOIFDpk3b = 0.0; if (!model->B3SOIFDpvbsaGiven) model->B3SOIFDpvbsa = 0.0; if (!model->B3SOIFDpdelpGiven) model->B3SOIFDpdelp = 0.0; if (!model->B3SOIFDpkb1Given) model->B3SOIFDpkb1 = 0.0; if (!model->B3SOIFDpkb3Given) model->B3SOIFDpkb3 = 1.0; if (!model->B3SOIFDpdvbd0Given) model->B3SOIFDpdvbd0 = 1.0; if (!model->B3SOIFDpdvbd1Given) model->B3SOIFDpdvbd1 = 1.0; if (!model->B3SOIFDpw0Given) model->B3SOIFDpw0 = 0.0; if (!model->B3SOIFDpnlxGiven) model->B3SOIFDpnlx = 0.0; if (!model->B3SOIFDpdvt0Given) model->B3SOIFDpdvt0 = 0.0; if (!model->B3SOIFDpdvt1Given) model->B3SOIFDpdvt1 = 0.0; if (!model->B3SOIFDpdvt2Given) model->B3SOIFDpdvt2 = 0.0; if (!model->B3SOIFDpdvt0wGiven) model->B3SOIFDpdvt0w = 0.0; if (!model->B3SOIFDpdvt1wGiven) model->B3SOIFDpdvt1w = 0.0; if (!model->B3SOIFDpdvt2wGiven) model->B3SOIFDpdvt2w = 0.0; if (!model->B3SOIFDpu0Given) model->B3SOIFDpu0 = 0.0; if (!model->B3SOIFDpuaGiven) model->B3SOIFDpua = 0.0; if (!model->B3SOIFDpubGiven) model->B3SOIFDpub = 0.0; if (!model->B3SOIFDpucGiven) model->B3SOIFDpuc = 0.0; if (!model->B3SOIFDpvsatGiven) model->B3SOIFDpvsat = 0.0; if (!model->B3SOIFDpa0Given) model->B3SOIFDpa0 = 0.0; if (!model->B3SOIFDpagsGiven) model->B3SOIFDpags = 0.0; if (!model->B3SOIFDpb0Given) model->B3SOIFDpb0 = 0.0; if (!model->B3SOIFDpb1Given) model->B3SOIFDpb1 = 0.0; if (!model->B3SOIFDpketaGiven) model->B3SOIFDpketa = 0.0; if (!model->B3SOIFDpabpGiven) model->B3SOIFDpabp = 0.0; if (!model->B3SOIFDpmxcGiven) model->B3SOIFDpmxc = 0.0; if (!model->B3SOIFDpadice0Given) model->B3SOIFDpadice0 = 0.0; if (!model->B3SOIFDpa1Given) model->B3SOIFDpa1 = 0.0; if (!model->B3SOIFDpa2Given) model->B3SOIFDpa2 = 0.0; if (!model->B3SOIFDprdswGiven) model->B3SOIFDprdsw = 0.0; if (!model->B3SOIFDpprwbGiven) model->B3SOIFDpprwb = 0.0; if (!model->B3SOIFDpprwgGiven) model->B3SOIFDpprwg = 0.0; if (!model->B3SOIFDpwrGiven) model->B3SOIFDpwr = 0.0; if (!model->B3SOIFDpnfactorGiven) model->B3SOIFDpnfactor = 0.0; if (!model->B3SOIFDpdwgGiven) model->B3SOIFDpdwg = 0.0; if (!model->B3SOIFDpdwbGiven) model->B3SOIFDpdwb = 0.0; if (!model->B3SOIFDpvoffGiven) model->B3SOIFDpvoff = 0.0; if (!model->B3SOIFDpeta0Given) model->B3SOIFDpeta0 = 0.0; if (!model->B3SOIFDpetabGiven) model->B3SOIFDpetab = 0.0; if (!model->B3SOIFDpdsubGiven) model->B3SOIFDpdsub = 0.0; if (!model->B3SOIFDpcitGiven) model->B3SOIFDpcit = 0.0; if (!model->B3SOIFDpcdscGiven) model->B3SOIFDpcdsc = 0.0; if (!model->B3SOIFDpcdscbGiven) model->B3SOIFDpcdscb = 0.0; if (!model->B3SOIFDpcdscdGiven) model->B3SOIFDpcdscd = 0.0; if (!model->B3SOIFDppclmGiven) model->B3SOIFDppclm = 0.0; if (!model->B3SOIFDppdibl1Given) model->B3SOIFDppdibl1 = 0.0; if (!model->B3SOIFDppdibl2Given) model->B3SOIFDppdibl2 = 0.0; if (!model->B3SOIFDppdiblbGiven) model->B3SOIFDppdiblb = 0.0; if (!model->B3SOIFDpdroutGiven) model->B3SOIFDpdrout = 0.0; if (!model->B3SOIFDppvagGiven) model->B3SOIFDppvag = 0.0; if (!model->B3SOIFDpdeltaGiven) model->B3SOIFDpdelta = 0.0; if (!model->B3SOIFDpaiiGiven) model->B3SOIFDpaii = 0.0; if (!model->B3SOIFDpbiiGiven) model->B3SOIFDpbii = 0.0; if (!model->B3SOIFDpciiGiven) model->B3SOIFDpcii = 0.0; if (!model->B3SOIFDpdiiGiven) model->B3SOIFDpdii = 0.0; if (!model->B3SOIFDpalpha0Given) model->B3SOIFDpalpha0 = 0.0; if (!model->B3SOIFDpalpha1Given) model->B3SOIFDpalpha1 = 0.0; if (!model->B3SOIFDpbeta0Given) model->B3SOIFDpbeta0 = 0.0; if (!model->B3SOIFDpagidlGiven) model->B3SOIFDpagidl = 0.0; if (!model->B3SOIFDpbgidlGiven) model->B3SOIFDpbgidl = 0.0; if (!model->B3SOIFDpngidlGiven) model->B3SOIFDpngidl = 0.0; if (!model->B3SOIFDpntunGiven) model->B3SOIFDpntun = 0.0; if (!model->B3SOIFDpndiodeGiven) model->B3SOIFDpndiode = 0.0; if (!model->B3SOIFDpisbjtGiven) model->B3SOIFDpisbjt = 0.0; if (!model->B3SOIFDpisdifGiven) model->B3SOIFDpisdif = 0.0; if (!model->B3SOIFDpisrecGiven) model->B3SOIFDpisrec = 0.0; if (!model->B3SOIFDpistunGiven) model->B3SOIFDpistun = 0.0; if (!model->B3SOIFDpedlGiven) model->B3SOIFDpedl = 0.0; if (!model->B3SOIFDpkbjt1Given) model->B3SOIFDpkbjt1 = 0.0; /* CV Model */ if (!model->B3SOIFDpvsdfbGiven) model->B3SOIFDpvsdfb = 0.0; if (!model->B3SOIFDpvsdthGiven) model->B3SOIFDpvsdth = 0.0; /* Added for binning - END */ if (!model->B3SOIFDcfGiven) model->B3SOIFDcf = 2.0 * EPSOX / PI * log(1.0 + 0.4e-6 / model->B3SOIFDtox); if (!model->B3SOIFDcgdoGiven) { if (model->B3SOIFDdlcGiven && (model->B3SOIFDdlc > 0.0)) { model->B3SOIFDcgdo = model->B3SOIFDdlc * model->B3SOIFDcox - model->B3SOIFDcgdl ; } else model->B3SOIFDcgdo = 0.6 * model->B3SOIFDxj * model->B3SOIFDcox; } if (!model->B3SOIFDcgsoGiven) { if (model->B3SOIFDdlcGiven && (model->B3SOIFDdlc > 0.0)) { model->B3SOIFDcgso = model->B3SOIFDdlc * model->B3SOIFDcox - model->B3SOIFDcgsl ; } else model->B3SOIFDcgso = 0.6 * model->B3SOIFDxj * model->B3SOIFDcox; } if (!model->B3SOIFDcgeoGiven) { model->B3SOIFDcgeo = 0.0; } if (!model->B3SOIFDxpartGiven) model->B3SOIFDxpart = 0.0; if (!model->B3SOIFDsheetResistanceGiven) model->B3SOIFDsheetResistance = 0.0; if (!model->B3SOIFDcsdeswGiven) model->B3SOIFDcsdesw = 0.0; if (!model->B3SOIFDunitLengthGateSidewallJctCapGiven) model->B3SOIFDunitLengthGateSidewallJctCap = 1e-10; if (!model->B3SOIFDGatesidewallJctPotentialGiven) model->B3SOIFDGatesidewallJctPotential = 0.7; if (!model->B3SOIFDbodyJctGateSideGradingCoeffGiven) model->B3SOIFDbodyJctGateSideGradingCoeff = 0.5; if (!model->B3SOIFDoxideTrapDensityAGiven) { if (model->B3SOIFDtype == NMOS) model->B3SOIFDoxideTrapDensityA = 1e20; else model->B3SOIFDoxideTrapDensityA=9.9e18; } if (!model->B3SOIFDoxideTrapDensityBGiven) { if (model->B3SOIFDtype == NMOS) model->B3SOIFDoxideTrapDensityB = 5e4; else model->B3SOIFDoxideTrapDensityB = 2.4e3; } if (!model->B3SOIFDoxideTrapDensityCGiven) { if (model->B3SOIFDtype == NMOS) model->B3SOIFDoxideTrapDensityC = -1.4e-12; else model->B3SOIFDoxideTrapDensityC = 1.4e-12; } if (!model->B3SOIFDemGiven) model->B3SOIFDem = 4.1e7; /* V/m */ if (!model->B3SOIFDefGiven) model->B3SOIFDef = 1.0; if (!model->B3SOIFDafGiven) model->B3SOIFDaf = 1.0; if (!model->B3SOIFDkfGiven) model->B3SOIFDkf = 0.0; if (!model->B3SOIFDnoifGiven) model->B3SOIFDnoif = 1.0; /* loop through all the instances of the model */ for (here = model->B3SOIFDinstances; here != NULL ; here=here->B3SOIFDnextInstance) { /* allocate a chunk of the state vector */ here->B3SOIFDstates = *states; *states += B3SOIFDnumStates; /* perform the parameter defaulting */ if (!here->B3SOIFDdrainAreaGiven) here->B3SOIFDdrainArea = 0.0; if (!here->B3SOIFDdrainPerimeterGiven) here->B3SOIFDdrainPerimeter = 0.0; if (!here->B3SOIFDdrainSquaresGiven) here->B3SOIFDdrainSquares = 1.0; if (!here->B3SOIFDicVBSGiven) here->B3SOIFDicVBS = 0; if (!here->B3SOIFDicVDSGiven) here->B3SOIFDicVDS = 0; if (!here->B3SOIFDicVGSGiven) here->B3SOIFDicVGS = 0; if (!here->B3SOIFDicVESGiven) here->B3SOIFDicVES = 0; if (!here->B3SOIFDicVPSGiven) here->B3SOIFDicVPS = 0; if (!here->B3SOIFDbjtoffGiven) here->B3SOIFDbjtoff = 0; if (!here->B3SOIFDdebugModGiven) here->B3SOIFDdebugMod = 0; if (!here->B3SOIFDrth0Given) here->B3SOIFDrth0 = model->B3SOIFDrth0; if (!here->B3SOIFDcth0Given) here->B3SOIFDcth0 = model->B3SOIFDcth0; if (!here->B3SOIFDbodySquaresGiven) here->B3SOIFDbodySquares = 1.0; if (!here->B3SOIFDlGiven) here->B3SOIFDl = 5e-6; if (!here->B3SOIFDsourceAreaGiven) here->B3SOIFDsourceArea = 0; if (!here->B3SOIFDsourcePerimeterGiven) here->B3SOIFDsourcePerimeter = 0; if (!here->B3SOIFDsourceSquaresGiven) here->B3SOIFDsourceSquares = 1; if (!here->B3SOIFDwGiven) here->B3SOIFDw = 5e-6; if (!here->B3SOIFDmGiven) here->B3SOIFDm = 1; if (!here->B3SOIFDoffGiven) here->B3SOIFDoff = 0; /* process drain series resistance */ if ((model->B3SOIFDsheetResistance > 0.0) && (here->B3SOIFDdrainSquares > 0.0 ) && (here->B3SOIFDdNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIFDname,"drain"); if(error) return(error); here->B3SOIFDdNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIFDdNodePrime = here->B3SOIFDdNode; } /* process source series resistance */ if ((model->B3SOIFDsheetResistance > 0.0) && (here->B3SOIFDsourceSquares > 0.0 ) && (here->B3SOIFDsNodePrime == 0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIFDname,"source"); if(error) return(error); here->B3SOIFDsNodePrime = tmp->number; if (ckt->CKTcopyNodesets) { if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } else { here->B3SOIFDsNodePrime = here->B3SOIFDsNode; } /* process effective silicon film thickness */ model->B3SOIFDcbox = 3.453133e-11 / model->B3SOIFDtbox; model->B3SOIFDcsi = 1.03594e-10 / model->B3SOIFDtsi; Cboxt = model->B3SOIFDcbox * model->B3SOIFDcsi / (model->B3SOIFDcbox + model->B3SOIFDcsi); model->B3SOIFDqsi = Charge_q*model->B3SOIFDnpeak*1e6*model->B3SOIFDtsi; /* Tsieff */ tmp1 = 2.0 * EPSSI * model->B3SOIFDvbsa / Charge_q / (1e6*model->B3SOIFDnpeak); tmp2 = model->B3SOIFDtsi * model->B3SOIFDtsi; if (tmp2 < tmp1) { fprintf(stderr, "vbsa = %.3f is too large for this tsi = %.3e and is automatically set to zero\n", model->B3SOIFDvbsa, model->B3SOIFDtsi); model->B3SOIFDcsieff = model->B3SOIFDcsi; model->B3SOIFDqsieff = model->B3SOIFDqsi; } else { tmp1 = sqrt(model->B3SOIFDtsi * model->B3SOIFDtsi - 2.0 * EPSSI * model->B3SOIFDvbsa / Charge_q / (1e6*model->B3SOIFDnpeak)); model->B3SOIFDcsieff = 1.03594e-10 / tmp1; model->B3SOIFDqsieff = Charge_q*model->B3SOIFDnpeak*1e6*tmp1; } model->B3SOIFDcsit = 1/(1/model->B3SOIFDcox + 1/model->B3SOIFDcsieff); model->B3SOIFDcboxt = 1/(1/model->B3SOIFDcbox + 1/model->B3SOIFDcsieff); nfb0 = 1/(1 + model->B3SOIFDcbox / model->B3SOIFDcsit); model->B3SOIFDnfb = model->B3SOIFDkb3 * nfb0; model->B3SOIFDadice = model->B3SOIFDadice0 / ( 1 + Cboxt / model->B3SOIFDcox); here->B3SOIFDfloat = 0; if (here->B3SOIFDbNode == -1) /* no internal body node is needed for SPICE iteration */ { here->B3SOIFDbNode = here->B3SOIFDpNode = 0; here->B3SOIFDbodyMod = 0; } else /* body tied */ { if ((model->B3SOIFDrbody == 0.0) && (model->B3SOIFDrbsh == 0.0)) { /* ideal body tie */ here->B3SOIFDbodyMod = 2; /* pNode is not used in this case */ } else { error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Body"); if(error) return(error); here->B3SOIFDbodyMod = 1; here->B3SOIFDpNode = here->B3SOIFDbNode; here->B3SOIFDbNode = tmp->number; } } if ((model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0!=0)) { error = CKTmkVolt(ckt,&tmp,here->B3SOIFDname,"Temp"); if(error) return(error); here->B3SOIFDtempNode = tmp->number; } else { here->B3SOIFDtempNode = 0; } /* here for debugging purpose only */ if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1)) { /* The real Vbs value */ error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vbs"); if(error) return(error); here->B3SOIFDvbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Ids"); if(error) return(error); here->B3SOIFDidsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Ic"); if(error) return(error); here->B3SOIFDicNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Ibs"); if(error) return(error); here->B3SOIFDibsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Ibd"); if(error) return(error); here->B3SOIFDibdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Iii"); if(error) return(error); here->B3SOIFDiiiNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Igidl"); if(error) return(error); here->B3SOIFDigidlNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Itun"); if(error) return(error); here->B3SOIFDitunNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Ibp"); if(error) return(error); here->B3SOIFDibpNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Abeff"); if(error) return(error); here->B3SOIFDabeffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vbs0eff"); if(error) return(error); here->B3SOIFDvbs0effNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vbseff"); if(error) return(error); here->B3SOIFDvbseffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Xc"); if(error) return(error); here->B3SOIFDxcNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Cbb"); if(error) return(error); here->B3SOIFDcbbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Cbd"); if(error) return(error); here->B3SOIFDcbdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Cbg"); if(error) return(error); here->B3SOIFDcbgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qbody"); if(error) return(error); here->B3SOIFDqbNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qbf"); if(error) return(error); here->B3SOIFDqbfNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qjs"); if(error) return(error); here->B3SOIFDqjsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qjd"); if(error) return(error); here->B3SOIFDqjdNode = tmp->number; /* clean up last */ error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Gm"); if(error) return(error); here->B3SOIFDgmNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Gmbs"); if(error) return(error); here->B3SOIFDgmbsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Gds"); if(error) return(error); here->B3SOIFDgdsNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Gme"); if(error) return(error); here->B3SOIFDgmeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vbs0teff"); if(error) return(error); here->B3SOIFDvbs0teffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vth"); if(error) return(error); here->B3SOIFDvthNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vgsteff"); if(error) return(error); here->B3SOIFDvgsteffNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Xcsat"); if(error) return(error); here->B3SOIFDxcsatNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qac0"); if(error) return(error); here->B3SOIFDqaccNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qsub0"); if(error) return(error); here->B3SOIFDqsub0Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qsubs1"); if(error) return(error); here->B3SOIFDqsubs1Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qsubs2"); if(error) return(error); here->B3SOIFDqsubs2Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qsub"); if(error) return(error); here->B3SOIFDqeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qdrn"); if(error) return(error); here->B3SOIFDqdNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Qgate"); if(error) return(error); here->B3SOIFDqgNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vdscv"); if(error) return(error); here->B3SOIFDvdscvNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Vcscv"); if(error) return(error); here->B3SOIFDvcscvNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Cbe"); if(error) return(error); here->B3SOIFDcbeNode = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Dum1"); if(error) return(error); here->B3SOIFDdum1Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Dum2"); if(error) return(error); here->B3SOIFDdum2Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Dum3"); if(error) return(error); here->B3SOIFDdum3Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Dum4"); if(error) return(error); here->B3SOIFDdum4Node = tmp->number; error = CKTmkVolt(ckt, &tmp, here->B3SOIFDname, "Dum5"); if(error) return(error); here->B3SOIFDdum5Node = tmp->number; } /* set Sparse Matrix Pointers */ /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) if ((model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0!=0.0)) { TSTALLOC(B3SOIFDTemptempPtr, B3SOIFDtempNode, B3SOIFDtempNode); TSTALLOC(B3SOIFDTempdpPtr, B3SOIFDtempNode, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDTempspPtr, B3SOIFDtempNode, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDTempgPtr, B3SOIFDtempNode, B3SOIFDgNode); TSTALLOC(B3SOIFDTempbPtr, B3SOIFDtempNode, B3SOIFDbNode); TSTALLOC(B3SOIFDTempePtr, B3SOIFDtempNode, B3SOIFDeNode); TSTALLOC(B3SOIFDGtempPtr, B3SOIFDgNode, B3SOIFDtempNode); TSTALLOC(B3SOIFDDPtempPtr, B3SOIFDdNodePrime, B3SOIFDtempNode); TSTALLOC(B3SOIFDSPtempPtr, B3SOIFDsNodePrime, B3SOIFDtempNode); TSTALLOC(B3SOIFDEtempPtr, B3SOIFDeNode, B3SOIFDtempNode); TSTALLOC(B3SOIFDBtempPtr, B3SOIFDbNode, B3SOIFDtempNode); if (here->B3SOIFDbodyMod == 1) { TSTALLOC(B3SOIFDPtempPtr, B3SOIFDpNode, B3SOIFDtempNode); } } if (here->B3SOIFDbodyMod == 2) { /* Don't create any Jacobian entry for pNode */ } else if (here->B3SOIFDbodyMod == 1) { TSTALLOC(B3SOIFDBpPtr, B3SOIFDbNode, B3SOIFDpNode); TSTALLOC(B3SOIFDPbPtr, B3SOIFDpNode, B3SOIFDbNode); TSTALLOC(B3SOIFDPpPtr, B3SOIFDpNode, B3SOIFDpNode); TSTALLOC(B3SOIFDPgPtr, B3SOIFDpNode, B3SOIFDgNode); TSTALLOC(B3SOIFDPdpPtr, B3SOIFDpNode, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDPspPtr, B3SOIFDpNode, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDPePtr, B3SOIFDpNode, B3SOIFDeNode); } TSTALLOC(B3SOIFDEgPtr, B3SOIFDeNode, B3SOIFDgNode); TSTALLOC(B3SOIFDEdpPtr, B3SOIFDeNode, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDEspPtr, B3SOIFDeNode, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDGePtr, B3SOIFDgNode, B3SOIFDeNode); TSTALLOC(B3SOIFDDPePtr, B3SOIFDdNodePrime, B3SOIFDeNode); TSTALLOC(B3SOIFDSPePtr, B3SOIFDsNodePrime, B3SOIFDeNode); TSTALLOC(B3SOIFDEbPtr, B3SOIFDeNode, B3SOIFDbNode); TSTALLOC(B3SOIFDEePtr, B3SOIFDeNode, B3SOIFDeNode); TSTALLOC(B3SOIFDGgPtr, B3SOIFDgNode, B3SOIFDgNode); TSTALLOC(B3SOIFDGdpPtr, B3SOIFDgNode, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDGspPtr, B3SOIFDgNode, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDDPgPtr, B3SOIFDdNodePrime, B3SOIFDgNode); TSTALLOC(B3SOIFDDPdpPtr, B3SOIFDdNodePrime, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDDPspPtr, B3SOIFDdNodePrime, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDDPdPtr, B3SOIFDdNodePrime, B3SOIFDdNode); TSTALLOC(B3SOIFDSPgPtr, B3SOIFDsNodePrime, B3SOIFDgNode); TSTALLOC(B3SOIFDSPdpPtr, B3SOIFDsNodePrime, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDSPspPtr, B3SOIFDsNodePrime, B3SOIFDsNodePrime); TSTALLOC(B3SOIFDSPsPtr, B3SOIFDsNodePrime, B3SOIFDsNode); TSTALLOC(B3SOIFDDdPtr, B3SOIFDdNode, B3SOIFDdNode); TSTALLOC(B3SOIFDDdpPtr, B3SOIFDdNode, B3SOIFDdNodePrime); TSTALLOC(B3SOIFDSsPtr, B3SOIFDsNode, B3SOIFDsNode); TSTALLOC(B3SOIFDSspPtr, B3SOIFDsNode, B3SOIFDsNodePrime); /* here for debugging purpose only */ if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1)) { TSTALLOC(B3SOIFDVbsPtr, B3SOIFDvbsNode, B3SOIFDvbsNode) ; TSTALLOC(B3SOIFDIdsPtr, B3SOIFDidsNode, B3SOIFDidsNode); TSTALLOC(B3SOIFDIcPtr, B3SOIFDicNode, B3SOIFDicNode); TSTALLOC(B3SOIFDIbsPtr, B3SOIFDibsNode, B3SOIFDibsNode); TSTALLOC(B3SOIFDIbdPtr, B3SOIFDibdNode, B3SOIFDibdNode); TSTALLOC(B3SOIFDIiiPtr, B3SOIFDiiiNode, B3SOIFDiiiNode); TSTALLOC(B3SOIFDIgidlPtr, B3SOIFDigidlNode, B3SOIFDigidlNode); TSTALLOC(B3SOIFDItunPtr, B3SOIFDitunNode, B3SOIFDitunNode); TSTALLOC(B3SOIFDIbpPtr, B3SOIFDibpNode, B3SOIFDibpNode); TSTALLOC(B3SOIFDAbeffPtr, B3SOIFDabeffNode, B3SOIFDabeffNode); TSTALLOC(B3SOIFDVbs0effPtr, B3SOIFDvbs0effNode, B3SOIFDvbs0effNode); TSTALLOC(B3SOIFDVbseffPtr, B3SOIFDvbseffNode, B3SOIFDvbseffNode); TSTALLOC(B3SOIFDXcPtr, B3SOIFDxcNode, B3SOIFDxcNode); TSTALLOC(B3SOIFDCbbPtr, B3SOIFDcbbNode, B3SOIFDcbbNode); TSTALLOC(B3SOIFDCbdPtr, B3SOIFDcbdNode, B3SOIFDcbdNode); TSTALLOC(B3SOIFDCbgPtr, B3SOIFDcbgNode, B3SOIFDcbgNode); TSTALLOC(B3SOIFDqbPtr, B3SOIFDqbNode, B3SOIFDqbNode); TSTALLOC(B3SOIFDQbfPtr, B3SOIFDqbfNode, B3SOIFDqbfNode); TSTALLOC(B3SOIFDQjsPtr, B3SOIFDqjsNode, B3SOIFDqjsNode); TSTALLOC(B3SOIFDQjdPtr, B3SOIFDqjdNode, B3SOIFDqjdNode); /* clean up last */ TSTALLOC(B3SOIFDGmPtr, B3SOIFDgmNode, B3SOIFDgmNode); TSTALLOC(B3SOIFDGmbsPtr, B3SOIFDgmbsNode, B3SOIFDgmbsNode); TSTALLOC(B3SOIFDGdsPtr, B3SOIFDgdsNode, B3SOIFDgdsNode); TSTALLOC(B3SOIFDGmePtr, B3SOIFDgmeNode, B3SOIFDgmeNode); TSTALLOC(B3SOIFDVbs0teffPtr, B3SOIFDvbs0teffNode, B3SOIFDvbs0teffNode); TSTALLOC(B3SOIFDVthPtr, B3SOIFDvthNode, B3SOIFDvthNode); TSTALLOC(B3SOIFDVgsteffPtr, B3SOIFDvgsteffNode, B3SOIFDvgsteffNode); TSTALLOC(B3SOIFDXcsatPtr, B3SOIFDxcsatNode, B3SOIFDxcsatNode); TSTALLOC(B3SOIFDVcscvPtr, B3SOIFDvcscvNode, B3SOIFDvcscvNode); TSTALLOC(B3SOIFDVdscvPtr, B3SOIFDvdscvNode, B3SOIFDvdscvNode); TSTALLOC(B3SOIFDCbePtr, B3SOIFDcbeNode, B3SOIFDcbeNode); TSTALLOC(B3SOIFDDum1Ptr, B3SOIFDdum1Node, B3SOIFDdum1Node); TSTALLOC(B3SOIFDDum2Ptr, B3SOIFDdum2Node, B3SOIFDdum2Node); TSTALLOC(B3SOIFDDum3Ptr, B3SOIFDdum3Node, B3SOIFDdum3Node); TSTALLOC(B3SOIFDDum4Ptr, B3SOIFDdum4Node, B3SOIFDdum4Node); TSTALLOC(B3SOIFDDum5Ptr, B3SOIFDdum5Node, B3SOIFDdum5Node); TSTALLOC(B3SOIFDQaccPtr, B3SOIFDqaccNode, B3SOIFDqaccNode); TSTALLOC(B3SOIFDQsub0Ptr, B3SOIFDqsub0Node, B3SOIFDqsub0Node); TSTALLOC(B3SOIFDQsubs1Ptr, B3SOIFDqsubs1Node, B3SOIFDqsubs1Node); TSTALLOC(B3SOIFDQsubs2Ptr, B3SOIFDqsubs2Node, B3SOIFDqsubs2Node); TSTALLOC(B3SOIFDqePtr, B3SOIFDqeNode, B3SOIFDqeNode); TSTALLOC(B3SOIFDqdPtr, B3SOIFDqdNode, B3SOIFDqdNode); TSTALLOC(B3SOIFDqgPtr, B3SOIFDqgNode, B3SOIFDqgNode); } } } return(OK); } int B3SOIFDunsetup(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model; B3SOIFDinstance *here; for (model = (B3SOIFDmodel *)inModel; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here != NULL; here=here->B3SOIFDnextInstance) { if (here->B3SOIFDdNodePrime && here->B3SOIFDdNodePrime != here->B3SOIFDdNode) { CKTdltNNum(ckt, here->B3SOIFDdNodePrime); here->B3SOIFDdNodePrime = 0; } if (here->B3SOIFDsNodePrime && here->B3SOIFDsNodePrime != here->B3SOIFDsNode) { CKTdltNNum(ckt, here->B3SOIFDsNodePrime); here->B3SOIFDsNodePrime = 0; } } } return OK; } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdext.h0000644000265600020320000000271012264261473022660 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung Modified by Paolo Nenzi 2002 File: b3soifdext.h **********/ extern int B3SOIFDacLoad(GENmodel *,CKTcircuit*); extern int B3SOIFDask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int B3SOIFDconvTest(GENmodel *,CKTcircuit*); extern int B3SOIFDdelete(GENmodel*,IFuid,GENinstance**); extern void B3SOIFDdestroy(GENmodel**); extern int B3SOIFDgetic(GENmodel*,CKTcircuit*); extern int B3SOIFDload(GENmodel*,CKTcircuit*); extern int B3SOIFDmAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int B3SOIFDmDelete(GENmodel**,IFuid,GENmodel*); extern int B3SOIFDmParam(int,IFvalue*,GENmodel*); extern void B3SOIFDmosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int B3SOIFDparam(int,IFvalue*,GENinstance*,IFvalue*); extern int B3SOIFDpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int B3SOIFDsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int B3SOIFDtemp(GENmodel*,CKTcircuit*); extern int B3SOIFDtrunc(GENmodel*,CKTcircuit*,double*); extern int B3SOIFDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int B3SOIFDunsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdpzld.c0000644000265600020320000001424512264261473023032 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdpzld.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "b3soifddef.h" #include "ngspice/suffix.h" int B3SOIFDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; double xcggb, xcgdb, xcgsb, xcbgb, xcbdb, xcbsb, xcddb, xcssb, xcdgb; double gdpr, gspr, gds, gbd, gbs, capbd = 0.0, capbs = 0.0; double xcsgb, xcdsb, xcsdb; double cggb, cgdb, cgsb, cbgb, cbdb, cbsb, cddb, cdgb, cdsb; double GSoverlapCap, GDoverlapCap, GBoverlapCap = 0.0; double FwdSum, RevSum, Gm, Gmbs; double m; NG_IGNORE(ckt); for (; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here!= NULL; here = here->B3SOIFDnextInstance) { if (here->B3SOIFDmode >= 0) { Gm = here->B3SOIFDgm; Gmbs = here->B3SOIFDgmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; cggb = here->B3SOIFDcggb; cgsb = here->B3SOIFDcgsb; cgdb = here->B3SOIFDcgdb; cbgb = here->B3SOIFDcbgb; cbsb = here->B3SOIFDcbsb; cbdb = here->B3SOIFDcbdb; cdgb = here->B3SOIFDcdgb; cdsb = here->B3SOIFDcdsb; cddb = here->B3SOIFDcddb; } else { Gm = -here->B3SOIFDgm; Gmbs = -here->B3SOIFDgmbs; FwdSum = 0.0; RevSum = -Gm - Gmbs; cggb = here->B3SOIFDcggb; cgsb = here->B3SOIFDcgdb; cgdb = here->B3SOIFDcgsb; cbgb = here->B3SOIFDcbgb; cbsb = here->B3SOIFDcbdb; cbdb = here->B3SOIFDcbsb; cdgb = -(here->B3SOIFDcdgb + cggb + cbgb); cdsb = -(here->B3SOIFDcddb + cgsb + cbsb); cddb = -(here->B3SOIFDcdsb + cgdb + cbdb); } gdpr=here->B3SOIFDdrainConductance; gspr=here->B3SOIFDsourceConductance; gds= here->B3SOIFDgds; gbd= here->B3SOIFDgjdb; gbs= here->B3SOIFDgjsb; #ifdef BULKCODE capbd= here->B3SOIFDcapbd; capbs= here->B3SOIFDcapbs; #endif GSoverlapCap = here->B3SOIFDcgso; GDoverlapCap = here->B3SOIFDcgdo; #ifdef BULKCODE GBoverlapCap = here->pParam->B3SOIFDcgbo; #endif xcdgb = (cdgb - GDoverlapCap); xcddb = (cddb + capbd + GDoverlapCap); xcdsb = cdsb; xcsgb = -(cggb + cbgb + cdgb + GSoverlapCap); xcsdb = -(cgdb + cbdb + cddb); xcssb = (capbs + GSoverlapCap - (cgsb+cbsb+cdsb)); xcggb = (cggb + GDoverlapCap + GSoverlapCap + GBoverlapCap); xcgdb = (cgdb - GDoverlapCap); xcgsb = (cgsb - GSoverlapCap); xcbgb = (cbgb - GBoverlapCap); xcbdb = (cbdb - capbd); xcbsb = (cbsb - capbs); m = here->B3SOIFDm; *(here->B3SOIFDGgPtr ) += m * (xcggb * s->real); *(here->B3SOIFDGgPtr +1) += m * (xcggb * s->imag); *(here->B3SOIFDBbPtr ) += m * ((-xcbgb-xcbdb-xcbsb) * s->real); *(here->B3SOIFDBbPtr +1) += m * ((-xcbgb-xcbdb-xcbsb) * s->imag); *(here->B3SOIFDDPdpPtr ) += m * (xcddb * s->real); *(here->B3SOIFDDPdpPtr +1) += m * (xcddb * s->imag); *(here->B3SOIFDSPspPtr ) += m * (xcssb * s->real); *(here->B3SOIFDSPspPtr +1) += m * (xcssb * s->imag); *(here->B3SOIFDGbPtr ) += m * ((-xcggb-xcgdb-xcgsb) * s->real); *(here->B3SOIFDGbPtr +1) += m * ((-xcggb-xcgdb-xcgsb) * s->imag); *(here->B3SOIFDGdpPtr ) += m * (xcgdb * s->real); *(here->B3SOIFDGdpPtr +1) += m * (xcgdb * s->imag); *(here->B3SOIFDGspPtr ) += m * (xcgsb * s->real); *(here->B3SOIFDGspPtr +1) += m * (xcgsb * s->imag); *(here->B3SOIFDBgPtr ) += m * (xcbgb * s->real); *(here->B3SOIFDBgPtr +1) += m * (xcbgb * s->imag); *(here->B3SOIFDBdpPtr ) += m * (xcbdb * s->real); *(here->B3SOIFDBdpPtr +1) += m * (xcbdb * s->imag); *(here->B3SOIFDBspPtr ) += m * (xcbsb * s->real); *(here->B3SOIFDBspPtr +1) += m * (xcbsb * s->imag); *(here->B3SOIFDDPgPtr ) += m * (xcdgb * s->real); *(here->B3SOIFDDPgPtr +1) += m * (xcdgb * s->imag); *(here->B3SOIFDDPbPtr ) += m * ((-xcdgb-xcddb-xcdsb) * s->real); *(here->B3SOIFDDPbPtr +1) += m * ((-xcdgb-xcddb-xcdsb) * s->imag); *(here->B3SOIFDDPspPtr ) += m * (xcdsb * s->real); *(here->B3SOIFDDPspPtr +1) += m * (xcdsb * s->imag); *(here->B3SOIFDSPgPtr ) += m * (xcsgb * s->real); *(here->B3SOIFDSPgPtr +1) += m * (xcsgb * s->imag); *(here->B3SOIFDSPbPtr ) += m * ((-xcsgb-xcsdb-xcssb) * s->real); *(here->B3SOIFDSPbPtr +1) += m * ((-xcsgb-xcsdb-xcssb) * s->imag); *(here->B3SOIFDSPdpPtr ) += m * (xcsdb * s->real); *(here->B3SOIFDSPdpPtr +1) += m * (xcsdb * s->imag); *(here->B3SOIFDDdPtr) += m * gdpr; *(here->B3SOIFDSsPtr) += m * gspr; *(here->B3SOIFDBbPtr) += m * (gbd + gbs); *(here->B3SOIFDDPdpPtr) += m * (gdpr + gds + gbd + RevSum); *(here->B3SOIFDSPspPtr) += m * (gspr + gds + gbs + FwdSum); *(here->B3SOIFDDdpPtr) -= m * gdpr; *(here->B3SOIFDSspPtr) -= m * gspr; *(here->B3SOIFDBdpPtr) -= m * gbd; *(here->B3SOIFDBspPtr) -= m * gbs; *(here->B3SOIFDDPdPtr) -= m * gdpr; *(here->B3SOIFDDPgPtr) += m * Gm; *(here->B3SOIFDDPbPtr) -= m * (gbd - Gmbs); *(here->B3SOIFDDPspPtr) -= m * (gds + FwdSum); *(here->B3SOIFDSPgPtr) -= m * Gm; *(here->B3SOIFDSPsPtr) -= m * gspr; *(here->B3SOIFDSPbPtr) -= m * (gbs + Gmbs); *(here->B3SOIFDSPdpPtr) -= m * (gds + RevSum); } } return(OK); } ngspice-26/src/spicelib/devices/bsim3soi_fd/Makefile.am0000644000265600020320000000121412264261473022467 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim3soifd.la libbsim3soifd_la_SOURCES = \ b3soifd.c \ b3soifdacld.c \ b3soifdask.c \ b3soifdcheck.c \ b3soifdcvtest.c \ b3soifddel.c \ b3soifddest.c \ b3soifdgetic.c \ b3soifdld.c \ b3soifdmask.c \ b3soifdmdel.c \ b3soifdmpar.c \ b3soifdnoi.c \ b3soifdpar.c \ b3soifdpzld.c \ b3soifdset.c \ b3soifdtemp.c \ b3soifdtrunc.c \ b3soifddef.h \ b3soifdext.h \ b3soifdinit.c \ b3soifdinit.h \ b3soifditf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use ngspice-26/src/spicelib/devices/bsim3soi_fd/Makefile.in0000644000265600020320000004373312264261535022513 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim3soi_fd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim3soifd_la_LIBADD = am_libbsim3soifd_la_OBJECTS = b3soifd.lo b3soifdacld.lo b3soifdask.lo \ b3soifdcheck.lo b3soifdcvtest.lo b3soifddel.lo b3soifddest.lo \ b3soifdgetic.lo b3soifdld.lo b3soifdmask.lo b3soifdmdel.lo \ b3soifdmpar.lo b3soifdnoi.lo b3soifdpar.lo b3soifdpzld.lo \ b3soifdset.lo b3soifdtemp.lo b3soifdtrunc.lo b3soifdinit.lo libbsim3soifd_la_OBJECTS = $(am_libbsim3soifd_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim3soifd_la_SOURCES) DIST_SOURCES = $(libbsim3soifd_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim3soifd.la libbsim3soifd_la_SOURCES = \ b3soifd.c \ b3soifdacld.c \ b3soifdask.c \ b3soifdcheck.c \ b3soifdcvtest.c \ b3soifddel.c \ b3soifddest.c \ b3soifdgetic.c \ b3soifdld.c \ b3soifdmask.c \ b3soifdmdel.c \ b3soifdmpar.c \ b3soifdnoi.c \ b3soifdpar.c \ b3soifdpzld.c \ b3soifdset.c \ b3soifdtemp.c \ b3soifdtrunc.c \ b3soifddef.h \ b3soifdext.h \ b3soifdinit.c \ b3soifdinit.h \ b3soifditf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = BsimTerms_use all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_fd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim3soi_fd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim3soifd.la: $(libbsim3soifd_la_OBJECTS) $(libbsim3soifd_la_DEPENDENCIES) $(EXTRA_libbsim3soifd_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim3soifd_la_OBJECTS) $(libbsim3soifd_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdcheck.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdcvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifddel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifddest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdgetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdnoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b3soifdtrunc.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdmask.c0000644000265600020320000012105412264261473023011 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang File: b3soifdmask.c 98/5/01 Modified by Wei Jin 99/9/27 Modified by Paolo Nenzi 2002 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { B3SOIFDmodel *model = (B3SOIFDmodel *)inst; NG_IGNORE(ckt); switch(which) { case B3SOIFD_MOD_MOBMOD: value->iValue = model->B3SOIFDmobMod; return(OK); case B3SOIFD_MOD_PARAMCHK: value->iValue = model->B3SOIFDparamChk; return(OK); case B3SOIFD_MOD_BINUNIT: value->iValue = model->B3SOIFDbinUnit; return(OK); case B3SOIFD_MOD_CAPMOD: value->iValue = model->B3SOIFDcapMod; return(OK); case B3SOIFD_MOD_SHMOD: value->iValue = model->B3SOIFDshMod; return(OK); case B3SOIFD_MOD_NOIMOD: value->iValue = model->B3SOIFDnoiMod; return(OK); case B3SOIFD_MOD_VERSION : value->rValue = model->B3SOIFDversion; return(OK); case B3SOIFD_MOD_TOX : value->rValue = model->B3SOIFDtox; return(OK); case B3SOIFD_MOD_CDSC : value->rValue = model->B3SOIFDcdsc; return(OK); case B3SOIFD_MOD_CDSCB : value->rValue = model->B3SOIFDcdscb; return(OK); case B3SOIFD_MOD_CDSCD : value->rValue = model->B3SOIFDcdscd; return(OK); case B3SOIFD_MOD_CIT : value->rValue = model->B3SOIFDcit; return(OK); case B3SOIFD_MOD_NFACTOR : value->rValue = model->B3SOIFDnfactor; return(OK); case B3SOIFD_MOD_VSAT: value->rValue = model->B3SOIFDvsat; return(OK); case B3SOIFD_MOD_AT: value->rValue = model->B3SOIFDat; return(OK); case B3SOIFD_MOD_A0: value->rValue = model->B3SOIFDa0; return(OK); case B3SOIFD_MOD_AGS: value->rValue = model->B3SOIFDags; return(OK); case B3SOIFD_MOD_A1: value->rValue = model->B3SOIFDa1; return(OK); case B3SOIFD_MOD_A2: value->rValue = model->B3SOIFDa2; return(OK); case B3SOIFD_MOD_KETA: value->rValue = model->B3SOIFDketa; return(OK); case B3SOIFD_MOD_NSUB: value->rValue = model->B3SOIFDnsub; return(OK); case B3SOIFD_MOD_NPEAK: value->rValue = model->B3SOIFDnpeak; return(OK); case B3SOIFD_MOD_NGATE: value->rValue = model->B3SOIFDngate; return(OK); case B3SOIFD_MOD_GAMMA1: value->rValue = model->B3SOIFDgamma1; return(OK); case B3SOIFD_MOD_GAMMA2: value->rValue = model->B3SOIFDgamma2; return(OK); case B3SOIFD_MOD_VBX: value->rValue = model->B3SOIFDvbx; return(OK); case B3SOIFD_MOD_VBM: value->rValue = model->B3SOIFDvbm; return(OK); case B3SOIFD_MOD_XT: value->rValue = model->B3SOIFDxt; return(OK); case B3SOIFD_MOD_K1: value->rValue = model->B3SOIFDk1; return(OK); case B3SOIFD_MOD_KT1: value->rValue = model->B3SOIFDkt1; return(OK); case B3SOIFD_MOD_KT1L: value->rValue = model->B3SOIFDkt1l; return(OK); case B3SOIFD_MOD_KT2 : value->rValue = model->B3SOIFDkt2; return(OK); case B3SOIFD_MOD_K2 : value->rValue = model->B3SOIFDk2; return(OK); case B3SOIFD_MOD_K3: value->rValue = model->B3SOIFDk3; return(OK); case B3SOIFD_MOD_K3B: value->rValue = model->B3SOIFDk3b; return(OK); case B3SOIFD_MOD_W0: value->rValue = model->B3SOIFDw0; return(OK); case B3SOIFD_MOD_NLX: value->rValue = model->B3SOIFDnlx; return(OK); case B3SOIFD_MOD_DVT0 : value->rValue = model->B3SOIFDdvt0; return(OK); case B3SOIFD_MOD_DVT1 : value->rValue = model->B3SOIFDdvt1; return(OK); case B3SOIFD_MOD_DVT2 : value->rValue = model->B3SOIFDdvt2; return(OK); case B3SOIFD_MOD_DVT0W : value->rValue = model->B3SOIFDdvt0w; return(OK); case B3SOIFD_MOD_DVT1W : value->rValue = model->B3SOIFDdvt1w; return(OK); case B3SOIFD_MOD_DVT2W : value->rValue = model->B3SOIFDdvt2w; return(OK); case B3SOIFD_MOD_DROUT : value->rValue = model->B3SOIFDdrout; return(OK); case B3SOIFD_MOD_DSUB : value->rValue = model->B3SOIFDdsub; return(OK); case B3SOIFD_MOD_VTH0: value->rValue = model->B3SOIFDvth0; return(OK); case B3SOIFD_MOD_UA: value->rValue = model->B3SOIFDua; return(OK); case B3SOIFD_MOD_UA1: value->rValue = model->B3SOIFDua1; return(OK); case B3SOIFD_MOD_UB: value->rValue = model->B3SOIFDub; return(OK); case B3SOIFD_MOD_UB1: value->rValue = model->B3SOIFDub1; return(OK); case B3SOIFD_MOD_UC: value->rValue = model->B3SOIFDuc; return(OK); case B3SOIFD_MOD_UC1: value->rValue = model->B3SOIFDuc1; return(OK); case B3SOIFD_MOD_U0: value->rValue = model->B3SOIFDu0; return(OK); case B3SOIFD_MOD_UTE: value->rValue = model->B3SOIFDute; return(OK); case B3SOIFD_MOD_VOFF: value->rValue = model->B3SOIFDvoff; return(OK); case B3SOIFD_MOD_DELTA: value->rValue = model->B3SOIFDdelta; return(OK); case B3SOIFD_MOD_RDSW: value->rValue = model->B3SOIFDrdsw; return(OK); case B3SOIFD_MOD_PRWG: value->rValue = model->B3SOIFDprwg; return(OK); case B3SOIFD_MOD_PRWB: value->rValue = model->B3SOIFDprwb; return(OK); case B3SOIFD_MOD_PRT: value->rValue = model->B3SOIFDprt; return(OK); case B3SOIFD_MOD_ETA0: value->rValue = model->B3SOIFDeta0; return(OK); case B3SOIFD_MOD_ETAB: value->rValue = model->B3SOIFDetab; return(OK); case B3SOIFD_MOD_PCLM: value->rValue = model->B3SOIFDpclm; return(OK); case B3SOIFD_MOD_PDIBL1: value->rValue = model->B3SOIFDpdibl1; return(OK); case B3SOIFD_MOD_PDIBL2: value->rValue = model->B3SOIFDpdibl2; return(OK); case B3SOIFD_MOD_PDIBLB: value->rValue = model->B3SOIFDpdiblb; return(OK); case B3SOIFD_MOD_PVAG: value->rValue = model->B3SOIFDpvag; return(OK); case B3SOIFD_MOD_WR: value->rValue = model->B3SOIFDwr; return(OK); case B3SOIFD_MOD_DWG: value->rValue = model->B3SOIFDdwg; return(OK); case B3SOIFD_MOD_DWB: value->rValue = model->B3SOIFDdwb; return(OK); case B3SOIFD_MOD_B0: value->rValue = model->B3SOIFDb0; return(OK); case B3SOIFD_MOD_B1: value->rValue = model->B3SOIFDb1; return(OK); case B3SOIFD_MOD_ALPHA0: value->rValue = model->B3SOIFDalpha0; return(OK); case B3SOIFD_MOD_ALPHA1: value->rValue = model->B3SOIFDalpha1; return(OK); case B3SOIFD_MOD_BETA0: value->rValue = model->B3SOIFDbeta0; return(OK); case B3SOIFD_MOD_CGSL: value->rValue = model->B3SOIFDcgsl; return(OK); case B3SOIFD_MOD_CGDL: value->rValue = model->B3SOIFDcgdl; return(OK); case B3SOIFD_MOD_CKAPPA: value->rValue = model->B3SOIFDckappa; return(OK); case B3SOIFD_MOD_CF: value->rValue = model->B3SOIFDcf; return(OK); case B3SOIFD_MOD_CLC: value->rValue = model->B3SOIFDclc; return(OK); case B3SOIFD_MOD_CLE: value->rValue = model->B3SOIFDcle; return(OK); case B3SOIFD_MOD_DWC: value->rValue = model->B3SOIFDdwc; return(OK); case B3SOIFD_MOD_DLC: value->rValue = model->B3SOIFDdlc; return(OK); case B3SOIFD_MOD_TBOX: value->rValue = model->B3SOIFDtbox; return(OK); case B3SOIFD_MOD_TSI: value->rValue = model->B3SOIFDtsi; return(OK); case B3SOIFD_MOD_KB1: value->rValue = model->B3SOIFDkb1; return(OK); case B3SOIFD_MOD_KB3: value->rValue = model->B3SOIFDkb3; return(OK); case B3SOIFD_MOD_DVBD0: value->rValue = model->B3SOIFDdvbd0; return(OK); case B3SOIFD_MOD_DVBD1: value->rValue = model->B3SOIFDdvbd1; return(OK); case B3SOIFD_MOD_DELP: value->rValue = model->B3SOIFDdelp; return(OK); case B3SOIFD_MOD_VBSA: value->rValue = model->B3SOIFDvbsa; return(OK); case B3SOIFD_MOD_RBODY: value->rValue = model->B3SOIFDrbody; return(OK); case B3SOIFD_MOD_RBSH: value->rValue = model->B3SOIFDrbsh; return(OK); case B3SOIFD_MOD_ADICE0: value->rValue = model->B3SOIFDadice0; return(OK); case B3SOIFD_MOD_ABP: value->rValue = model->B3SOIFDabp; return(OK); case B3SOIFD_MOD_MXC: value->rValue = model->B3SOIFDmxc; return(OK); case B3SOIFD_MOD_RTH0: value->rValue = model->B3SOIFDrth0; return(OK); case B3SOIFD_MOD_CTH0: value->rValue = model->B3SOIFDcth0; return(OK); case B3SOIFD_MOD_AII: value->rValue = model->B3SOIFDaii; return(OK); case B3SOIFD_MOD_BII: value->rValue = model->B3SOIFDbii; return(OK); case B3SOIFD_MOD_CII: value->rValue = model->B3SOIFDcii; return(OK); case B3SOIFD_MOD_DII: value->rValue = model->B3SOIFDdii; return(OK); case B3SOIFD_MOD_NDIODE: value->rValue = model->B3SOIFDndiode; return(OK); case B3SOIFD_MOD_NTUN: value->rValue = model->B3SOIFDntun; return(OK); case B3SOIFD_MOD_ISBJT: value->rValue = model->B3SOIFDisbjt; return(OK); case B3SOIFD_MOD_ISDIF: value->rValue = model->B3SOIFDisdif; return(OK); case B3SOIFD_MOD_ISREC: value->rValue = model->B3SOIFDisrec; return(OK); case B3SOIFD_MOD_ISTUN: value->rValue = model->B3SOIFDistun; return(OK); case B3SOIFD_MOD_XBJT: value->rValue = model->B3SOIFDxbjt; return(OK); case B3SOIFD_MOD_XREC: value->rValue = model->B3SOIFDxrec; return(OK); case B3SOIFD_MOD_XTUN: value->rValue = model->B3SOIFDxtun; return(OK); case B3SOIFD_MOD_EDL: value->rValue = model->B3SOIFDedl; return(OK); case B3SOIFD_MOD_KBJT1: value->rValue = model->B3SOIFDkbjt1; return(OK); case B3SOIFD_MOD_TT: value->rValue = model->B3SOIFDtt; return(OK); case B3SOIFD_MOD_VSDTH: value->rValue = model->B3SOIFDvsdth; return(OK); case B3SOIFD_MOD_VSDFB: value->rValue = model->B3SOIFDvsdfb; return(OK); case B3SOIFD_MOD_CSDMIN: value->rValue = model->B3SOIFDcsdmin; return(OK); case B3SOIFD_MOD_ASD: value->rValue = model->B3SOIFDasd; return(OK); case B3SOIFD_MOD_TNOM : value->rValue = model->B3SOIFDtnom; return(OK); case B3SOIFD_MOD_CGSO: value->rValue = model->B3SOIFDcgso; return(OK); case B3SOIFD_MOD_CGDO: value->rValue = model->B3SOIFDcgdo; return(OK); case B3SOIFD_MOD_CGEO: value->rValue = model->B3SOIFDcgeo; return(OK); case B3SOIFD_MOD_XPART: value->rValue = model->B3SOIFDxpart; return(OK); case B3SOIFD_MOD_RSH: value->rValue = model->B3SOIFDsheetResistance; return(OK); case B3SOIFD_MOD_PBSWG: value->rValue = model->B3SOIFDGatesidewallJctPotential; return(OK); case B3SOIFD_MOD_MJSWG: value->rValue = model->B3SOIFDbodyJctGateSideGradingCoeff; return(OK); case B3SOIFD_MOD_CJSWG: value->rValue = model->B3SOIFDunitLengthGateSidewallJctCap; return(OK); case B3SOIFD_MOD_CSDESW: value->rValue = model->B3SOIFDcsdesw; return(OK); case B3SOIFD_MOD_LINT: value->rValue = model->B3SOIFDLint; return(OK); case B3SOIFD_MOD_LL: value->rValue = model->B3SOIFDLl; return(OK); case B3SOIFD_MOD_LLN: value->rValue = model->B3SOIFDLln; return(OK); case B3SOIFD_MOD_LW: value->rValue = model->B3SOIFDLw; return(OK); case B3SOIFD_MOD_LWN: value->rValue = model->B3SOIFDLwn; return(OK); case B3SOIFD_MOD_LWL: value->rValue = model->B3SOIFDLwl; return(OK); case B3SOIFD_MOD_WINT: value->rValue = model->B3SOIFDWint; return(OK); case B3SOIFD_MOD_WL: value->rValue = model->B3SOIFDWl; return(OK); case B3SOIFD_MOD_WLN: value->rValue = model->B3SOIFDWln; return(OK); case B3SOIFD_MOD_WW: value->rValue = model->B3SOIFDWw; return(OK); case B3SOIFD_MOD_WWN: value->rValue = model->B3SOIFDWwn; return(OK); case B3SOIFD_MOD_WWL: value->rValue = model->B3SOIFDWwl; return(OK); case B3SOIFD_MOD_NOIA: value->rValue = model->B3SOIFDoxideTrapDensityA; return(OK); case B3SOIFD_MOD_NOIB: value->rValue = model->B3SOIFDoxideTrapDensityB; return(OK); case B3SOIFD_MOD_NOIC: value->rValue = model->B3SOIFDoxideTrapDensityC; return(OK); case B3SOIFD_MOD_NOIF: value->rValue = model->B3SOIFDnoif; return(OK); case B3SOIFD_MOD_EM: value->rValue = model->B3SOIFDem; return(OK); case B3SOIFD_MOD_EF: value->rValue = model->B3SOIFDef; return(OK); case B3SOIFD_MOD_AF: value->rValue = model->B3SOIFDaf; return(OK); case B3SOIFD_MOD_KF: value->rValue = model->B3SOIFDkf; return(OK); /* Added for binning - START */ /* Length Dependence */ case B3SOIFD_MOD_LNPEAK: value->rValue = model->B3SOIFDlnpeak; return(OK); case B3SOIFD_MOD_LNSUB: value->rValue = model->B3SOIFDlnsub; return(OK); case B3SOIFD_MOD_LNGATE: value->rValue = model->B3SOIFDlngate; return(OK); case B3SOIFD_MOD_LVTH0: value->rValue = model->B3SOIFDlvth0; return(OK); case B3SOIFD_MOD_LK1: value->rValue = model->B3SOIFDlk1; return(OK); case B3SOIFD_MOD_LK2: value->rValue = model->B3SOIFDlk2; return(OK); case B3SOIFD_MOD_LK3: value->rValue = model->B3SOIFDlk3; return(OK); case B3SOIFD_MOD_LK3B: value->rValue = model->B3SOIFDlk3b; return(OK); case B3SOIFD_MOD_LVBSA: value->rValue = model->B3SOIFDlvbsa; return(OK); case B3SOIFD_MOD_LDELP: value->rValue = model->B3SOIFDldelp; return(OK); case B3SOIFD_MOD_LKB1: value->rValue = model->B3SOIFDlkb1; return(OK); case B3SOIFD_MOD_LKB3: value->rValue = model->B3SOIFDlkb3; return(OK); case B3SOIFD_MOD_LDVBD0: value->rValue = model->B3SOIFDdvbd0; return(OK); case B3SOIFD_MOD_LDVBD1: value->rValue = model->B3SOIFDdvbd1; return(OK); case B3SOIFD_MOD_LW0: value->rValue = model->B3SOIFDlw0; return(OK); case B3SOIFD_MOD_LNLX: value->rValue = model->B3SOIFDlnlx; return(OK); case B3SOIFD_MOD_LDVT0 : value->rValue = model->B3SOIFDldvt0; return(OK); case B3SOIFD_MOD_LDVT1 : value->rValue = model->B3SOIFDldvt1; return(OK); case B3SOIFD_MOD_LDVT2 : value->rValue = model->B3SOIFDldvt2; return(OK); case B3SOIFD_MOD_LDVT0W : value->rValue = model->B3SOIFDldvt0w; return(OK); case B3SOIFD_MOD_LDVT1W : value->rValue = model->B3SOIFDldvt1w; return(OK); case B3SOIFD_MOD_LDVT2W : value->rValue = model->B3SOIFDldvt2w; return(OK); case B3SOIFD_MOD_LU0: value->rValue = model->B3SOIFDlu0; return(OK); case B3SOIFD_MOD_LUA: value->rValue = model->B3SOIFDlua; return(OK); case B3SOIFD_MOD_LUB: value->rValue = model->B3SOIFDlub; return(OK); case B3SOIFD_MOD_LUC: value->rValue = model->B3SOIFDluc; return(OK); case B3SOIFD_MOD_LVSAT: value->rValue = model->B3SOIFDlvsat; return(OK); case B3SOIFD_MOD_LA0: value->rValue = model->B3SOIFDla0; return(OK); case B3SOIFD_MOD_LAGS: value->rValue = model->B3SOIFDlags; return(OK); case B3SOIFD_MOD_LB0: value->rValue = model->B3SOIFDlb0; return(OK); case B3SOIFD_MOD_LB1: value->rValue = model->B3SOIFDlb1; return(OK); case B3SOIFD_MOD_LKETA: value->rValue = model->B3SOIFDlketa; return(OK); case B3SOIFD_MOD_LABP: value->rValue = model->B3SOIFDlabp; return(OK); case B3SOIFD_MOD_LMXC: value->rValue = model->B3SOIFDlmxc; return(OK); case B3SOIFD_MOD_LADICE0: value->rValue = model->B3SOIFDladice0; return(OK); case B3SOIFD_MOD_LA1: value->rValue = model->B3SOIFDla1; return(OK); case B3SOIFD_MOD_LA2: value->rValue = model->B3SOIFDla2; return(OK); case B3SOIFD_MOD_LRDSW: value->rValue = model->B3SOIFDlrdsw; return(OK); case B3SOIFD_MOD_LPRWB: value->rValue = model->B3SOIFDlprwb; return(OK); case B3SOIFD_MOD_LPRWG: value->rValue = model->B3SOIFDlprwg; return(OK); case B3SOIFD_MOD_LWR: value->rValue = model->B3SOIFDlwr; return(OK); case B3SOIFD_MOD_LNFACTOR : value->rValue = model->B3SOIFDlnfactor; return(OK); case B3SOIFD_MOD_LDWG: value->rValue = model->B3SOIFDldwg; return(OK); case B3SOIFD_MOD_LDWB: value->rValue = model->B3SOIFDldwb; return(OK); case B3SOIFD_MOD_LVOFF: value->rValue = model->B3SOIFDlvoff; return(OK); case B3SOIFD_MOD_LETA0: value->rValue = model->B3SOIFDleta0; return(OK); case B3SOIFD_MOD_LETAB: value->rValue = model->B3SOIFDletab; return(OK); case B3SOIFD_MOD_LDSUB : value->rValue = model->B3SOIFDldsub; return(OK); case B3SOIFD_MOD_LCIT : value->rValue = model->B3SOIFDlcit; return(OK); case B3SOIFD_MOD_LCDSC : value->rValue = model->B3SOIFDlcdsc; return(OK); case B3SOIFD_MOD_LCDSCB : value->rValue = model->B3SOIFDlcdscb; return(OK); case B3SOIFD_MOD_LCDSCD : value->rValue = model->B3SOIFDlcdscd; return(OK); case B3SOIFD_MOD_LPCLM: value->rValue = model->B3SOIFDlpclm; return(OK); case B3SOIFD_MOD_LPDIBL1: value->rValue = model->B3SOIFDlpdibl1; return(OK); case B3SOIFD_MOD_LPDIBL2: value->rValue = model->B3SOIFDlpdibl2; return(OK); case B3SOIFD_MOD_LPDIBLB: value->rValue = model->B3SOIFDlpdiblb; return(OK); case B3SOIFD_MOD_LDROUT : value->rValue = model->B3SOIFDldrout; return(OK); case B3SOIFD_MOD_LPVAG: value->rValue = model->B3SOIFDlpvag; return(OK); case B3SOIFD_MOD_LDELTA: value->rValue = model->B3SOIFDldelta; return(OK); case B3SOIFD_MOD_LAII: value->rValue = model->B3SOIFDlaii; return(OK); case B3SOIFD_MOD_LBII: value->rValue = model->B3SOIFDlbii; return(OK); case B3SOIFD_MOD_LCII: value->rValue = model->B3SOIFDlcii; return(OK); case B3SOIFD_MOD_LDII: value->rValue = model->B3SOIFDldii; return(OK); case B3SOIFD_MOD_LALPHA0: value->rValue = model->B3SOIFDlalpha0; return(OK); case B3SOIFD_MOD_LALPHA1: value->rValue = model->B3SOIFDlalpha1; return(OK); case B3SOIFD_MOD_LBETA0: value->rValue = model->B3SOIFDlbeta0; return(OK); case B3SOIFD_MOD_LAGIDL: value->rValue = model->B3SOIFDlagidl; return(OK); case B3SOIFD_MOD_LBGIDL: value->rValue = model->B3SOIFDlbgidl; return(OK); case B3SOIFD_MOD_LNGIDL: value->rValue = model->B3SOIFDlngidl; return(OK); case B3SOIFD_MOD_LNTUN: value->rValue = model->B3SOIFDlntun; return(OK); case B3SOIFD_MOD_LNDIODE: value->rValue = model->B3SOIFDlndiode; return(OK); case B3SOIFD_MOD_LISBJT: value->rValue = model->B3SOIFDlisbjt; return(OK); case B3SOIFD_MOD_LISDIF: value->rValue = model->B3SOIFDlisdif; return(OK); case B3SOIFD_MOD_LISREC: value->rValue = model->B3SOIFDlisrec; return(OK); case B3SOIFD_MOD_LISTUN: value->rValue = model->B3SOIFDlistun; return(OK); case B3SOIFD_MOD_LEDL: value->rValue = model->B3SOIFDledl; return(OK); case B3SOIFD_MOD_LKBJT1: value->rValue = model->B3SOIFDlkbjt1; return(OK); /* CV Model */ case B3SOIFD_MOD_LVSDFB: value->rValue = model->B3SOIFDlvsdfb; return(OK); case B3SOIFD_MOD_LVSDTH: value->rValue = model->B3SOIFDlvsdth; return(OK); /* Width Dependence */ case B3SOIFD_MOD_WNPEAK: value->rValue = model->B3SOIFDwnpeak; return(OK); case B3SOIFD_MOD_WNSUB: value->rValue = model->B3SOIFDwnsub; return(OK); case B3SOIFD_MOD_WNGATE: value->rValue = model->B3SOIFDwngate; return(OK); case B3SOIFD_MOD_WVTH0: value->rValue = model->B3SOIFDwvth0; return(OK); case B3SOIFD_MOD_WK1: value->rValue = model->B3SOIFDwk1; return(OK); case B3SOIFD_MOD_WK2: value->rValue = model->B3SOIFDwk2; return(OK); case B3SOIFD_MOD_WK3: value->rValue = model->B3SOIFDwk3; return(OK); case B3SOIFD_MOD_WK3B: value->rValue = model->B3SOIFDwk3b; return(OK); case B3SOIFD_MOD_WVBSA: value->rValue = model->B3SOIFDwvbsa; return(OK); case B3SOIFD_MOD_WDELP: value->rValue = model->B3SOIFDwdelp; return(OK); case B3SOIFD_MOD_WKB1: value->rValue = model->B3SOIFDwkb1; return(OK); case B3SOIFD_MOD_WKB3: value->rValue = model->B3SOIFDwkb3; return(OK); case B3SOIFD_MOD_WDVBD0: value->rValue = model->B3SOIFDdvbd0; return(OK); case B3SOIFD_MOD_WDVBD1: value->rValue = model->B3SOIFDdvbd1; return(OK); case B3SOIFD_MOD_WW0: value->rValue = model->B3SOIFDww0; return(OK); case B3SOIFD_MOD_WNLX: value->rValue = model->B3SOIFDwnlx; return(OK); case B3SOIFD_MOD_WDVT0 : value->rValue = model->B3SOIFDwdvt0; return(OK); case B3SOIFD_MOD_WDVT1 : value->rValue = model->B3SOIFDwdvt1; return(OK); case B3SOIFD_MOD_WDVT2 : value->rValue = model->B3SOIFDwdvt2; return(OK); case B3SOIFD_MOD_WDVT0W : value->rValue = model->B3SOIFDwdvt0w; return(OK); case B3SOIFD_MOD_WDVT1W : value->rValue = model->B3SOIFDwdvt1w; return(OK); case B3SOIFD_MOD_WDVT2W : value->rValue = model->B3SOIFDwdvt2w; return(OK); case B3SOIFD_MOD_WU0: value->rValue = model->B3SOIFDwu0; return(OK); case B3SOIFD_MOD_WUA: value->rValue = model->B3SOIFDwua; return(OK); case B3SOIFD_MOD_WUB: value->rValue = model->B3SOIFDwub; return(OK); case B3SOIFD_MOD_WUC: value->rValue = model->B3SOIFDwuc; return(OK); case B3SOIFD_MOD_WVSAT: value->rValue = model->B3SOIFDwvsat; return(OK); case B3SOIFD_MOD_WA0: value->rValue = model->B3SOIFDwa0; return(OK); case B3SOIFD_MOD_WAGS: value->rValue = model->B3SOIFDwags; return(OK); case B3SOIFD_MOD_WB0: value->rValue = model->B3SOIFDwb0; return(OK); case B3SOIFD_MOD_WB1: value->rValue = model->B3SOIFDwb1; return(OK); case B3SOIFD_MOD_WKETA: value->rValue = model->B3SOIFDwketa; return(OK); case B3SOIFD_MOD_WABP: value->rValue = model->B3SOIFDwabp; return(OK); case B3SOIFD_MOD_WMXC: value->rValue = model->B3SOIFDwmxc; return(OK); case B3SOIFD_MOD_WADICE0: value->rValue = model->B3SOIFDwadice0; return(OK); case B3SOIFD_MOD_WA1: value->rValue = model->B3SOIFDwa1; return(OK); case B3SOIFD_MOD_WA2: value->rValue = model->B3SOIFDwa2; return(OK); case B3SOIFD_MOD_WRDSW: value->rValue = model->B3SOIFDwrdsw; return(OK); case B3SOIFD_MOD_WPRWB: value->rValue = model->B3SOIFDwprwb; return(OK); case B3SOIFD_MOD_WPRWG: value->rValue = model->B3SOIFDwprwg; return(OK); case B3SOIFD_MOD_WWR: value->rValue = model->B3SOIFDwwr; return(OK); case B3SOIFD_MOD_WNFACTOR : value->rValue = model->B3SOIFDwnfactor; return(OK); case B3SOIFD_MOD_WDWG: value->rValue = model->B3SOIFDwdwg; return(OK); case B3SOIFD_MOD_WDWB: value->rValue = model->B3SOIFDwdwb; return(OK); case B3SOIFD_MOD_WVOFF: value->rValue = model->B3SOIFDwvoff; return(OK); case B3SOIFD_MOD_WETA0: value->rValue = model->B3SOIFDweta0; return(OK); case B3SOIFD_MOD_WETAB: value->rValue = model->B3SOIFDwetab; return(OK); case B3SOIFD_MOD_WDSUB : value->rValue = model->B3SOIFDwdsub; return(OK); case B3SOIFD_MOD_WCIT : value->rValue = model->B3SOIFDwcit; return(OK); case B3SOIFD_MOD_WCDSC : value->rValue = model->B3SOIFDwcdsc; return(OK); case B3SOIFD_MOD_WCDSCB : value->rValue = model->B3SOIFDwcdscb; return(OK); case B3SOIFD_MOD_WCDSCD : value->rValue = model->B3SOIFDwcdscd; return(OK); case B3SOIFD_MOD_WPCLM: value->rValue = model->B3SOIFDwpclm; return(OK); case B3SOIFD_MOD_WPDIBL1: value->rValue = model->B3SOIFDwpdibl1; return(OK); case B3SOIFD_MOD_WPDIBL2: value->rValue = model->B3SOIFDwpdibl2; return(OK); case B3SOIFD_MOD_WPDIBLB: value->rValue = model->B3SOIFDwpdiblb; return(OK); case B3SOIFD_MOD_WDROUT : value->rValue = model->B3SOIFDwdrout; return(OK); case B3SOIFD_MOD_WPVAG: value->rValue = model->B3SOIFDwpvag; return(OK); case B3SOIFD_MOD_WDELTA: value->rValue = model->B3SOIFDwdelta; return(OK); case B3SOIFD_MOD_WAII: value->rValue = model->B3SOIFDwaii; return(OK); case B3SOIFD_MOD_WBII: value->rValue = model->B3SOIFDwbii; return(OK); case B3SOIFD_MOD_WCII: value->rValue = model->B3SOIFDwcii; return(OK); case B3SOIFD_MOD_WDII: value->rValue = model->B3SOIFDwdii; return(OK); case B3SOIFD_MOD_WALPHA0: value->rValue = model->B3SOIFDwalpha0; return(OK); case B3SOIFD_MOD_WALPHA1: value->rValue = model->B3SOIFDwalpha1; return(OK); case B3SOIFD_MOD_WBETA0: value->rValue = model->B3SOIFDwbeta0; return(OK); case B3SOIFD_MOD_WAGIDL: value->rValue = model->B3SOIFDwagidl; return(OK); case B3SOIFD_MOD_WBGIDL: value->rValue = model->B3SOIFDwbgidl; return(OK); case B3SOIFD_MOD_WNGIDL: value->rValue = model->B3SOIFDwngidl; return(OK); case B3SOIFD_MOD_WNTUN: value->rValue = model->B3SOIFDwntun; return(OK); case B3SOIFD_MOD_WNDIODE: value->rValue = model->B3SOIFDwndiode; return(OK); case B3SOIFD_MOD_WISBJT: value->rValue = model->B3SOIFDwisbjt; return(OK); case B3SOIFD_MOD_WISDIF: value->rValue = model->B3SOIFDwisdif; return(OK); case B3SOIFD_MOD_WISREC: value->rValue = model->B3SOIFDwisrec; return(OK); case B3SOIFD_MOD_WISTUN: value->rValue = model->B3SOIFDwistun; return(OK); case B3SOIFD_MOD_WEDL: value->rValue = model->B3SOIFDwedl; return(OK); case B3SOIFD_MOD_WKBJT1: value->rValue = model->B3SOIFDwkbjt1; return(OK); /* CV Model */ case B3SOIFD_MOD_WVSDFB: value->rValue = model->B3SOIFDwvsdfb; return(OK); case B3SOIFD_MOD_WVSDTH: value->rValue = model->B3SOIFDwvsdth; return(OK); /* Cross-term Dependence */ case B3SOIFD_MOD_PNPEAK: value->rValue = model->B3SOIFDpnpeak; return(OK); case B3SOIFD_MOD_PNSUB: value->rValue = model->B3SOIFDpnsub; return(OK); case B3SOIFD_MOD_PNGATE: value->rValue = model->B3SOIFDpngate; return(OK); case B3SOIFD_MOD_PVTH0: value->rValue = model->B3SOIFDpvth0; return(OK); case B3SOIFD_MOD_PK1: value->rValue = model->B3SOIFDpk1; return(OK); case B3SOIFD_MOD_PK2: value->rValue = model->B3SOIFDpk2; return(OK); case B3SOIFD_MOD_PK3: value->rValue = model->B3SOIFDpk3; return(OK); case B3SOIFD_MOD_PK3B: value->rValue = model->B3SOIFDpk3b; return(OK); case B3SOIFD_MOD_PVBSA: value->rValue = model->B3SOIFDpvbsa; return(OK); case B3SOIFD_MOD_PDELP: value->rValue = model->B3SOIFDpdelp; return(OK); case B3SOIFD_MOD_PKB1: value->rValue = model->B3SOIFDpkb1; return(OK); case B3SOIFD_MOD_PKB3: value->rValue = model->B3SOIFDpkb3; return(OK); case B3SOIFD_MOD_PDVBD0: value->rValue = model->B3SOIFDdvbd0; return(OK); case B3SOIFD_MOD_PDVBD1: value->rValue = model->B3SOIFDdvbd1; return(OK); case B3SOIFD_MOD_PW0: value->rValue = model->B3SOIFDpw0; return(OK); case B3SOIFD_MOD_PNLX: value->rValue = model->B3SOIFDpnlx; return(OK); case B3SOIFD_MOD_PDVT0 : value->rValue = model->B3SOIFDpdvt0; return(OK); case B3SOIFD_MOD_PDVT1 : value->rValue = model->B3SOIFDpdvt1; return(OK); case B3SOIFD_MOD_PDVT2 : value->rValue = model->B3SOIFDpdvt2; return(OK); case B3SOIFD_MOD_PDVT0W : value->rValue = model->B3SOIFDpdvt0w; return(OK); case B3SOIFD_MOD_PDVT1W : value->rValue = model->B3SOIFDpdvt1w; return(OK); case B3SOIFD_MOD_PDVT2W : value->rValue = model->B3SOIFDpdvt2w; return(OK); case B3SOIFD_MOD_PU0: value->rValue = model->B3SOIFDpu0; return(OK); case B3SOIFD_MOD_PUA: value->rValue = model->B3SOIFDpua; return(OK); case B3SOIFD_MOD_PUB: value->rValue = model->B3SOIFDpub; return(OK); case B3SOIFD_MOD_PUC: value->rValue = model->B3SOIFDpuc; return(OK); case B3SOIFD_MOD_PVSAT: value->rValue = model->B3SOIFDpvsat; return(OK); case B3SOIFD_MOD_PA0: value->rValue = model->B3SOIFDpa0; return(OK); case B3SOIFD_MOD_PAGS: value->rValue = model->B3SOIFDpags; return(OK); case B3SOIFD_MOD_PB0: value->rValue = model->B3SOIFDpb0; return(OK); case B3SOIFD_MOD_PB1: value->rValue = model->B3SOIFDpb1; return(OK); case B3SOIFD_MOD_PKETA: value->rValue = model->B3SOIFDpketa; return(OK); case B3SOIFD_MOD_PABP: value->rValue = model->B3SOIFDpabp; return(OK); case B3SOIFD_MOD_PMXC: value->rValue = model->B3SOIFDpmxc; return(OK); case B3SOIFD_MOD_PADICE0: value->rValue = model->B3SOIFDpadice0; return(OK); case B3SOIFD_MOD_PA1: value->rValue = model->B3SOIFDpa1; return(OK); case B3SOIFD_MOD_PA2: value->rValue = model->B3SOIFDpa2; return(OK); case B3SOIFD_MOD_PRDSW: value->rValue = model->B3SOIFDprdsw; return(OK); case B3SOIFD_MOD_PPRWB: value->rValue = model->B3SOIFDpprwb; return(OK); case B3SOIFD_MOD_PPRWG: value->rValue = model->B3SOIFDpprwg; return(OK); case B3SOIFD_MOD_PWR: value->rValue = model->B3SOIFDpwr; return(OK); case B3SOIFD_MOD_PNFACTOR : value->rValue = model->B3SOIFDpnfactor; return(OK); case B3SOIFD_MOD_PDWG: value->rValue = model->B3SOIFDpdwg; return(OK); case B3SOIFD_MOD_PDWB: value->rValue = model->B3SOIFDpdwb; return(OK); case B3SOIFD_MOD_PVOFF: value->rValue = model->B3SOIFDpvoff; return(OK); case B3SOIFD_MOD_PETA0: value->rValue = model->B3SOIFDpeta0; return(OK); case B3SOIFD_MOD_PETAB: value->rValue = model->B3SOIFDpetab; return(OK); case B3SOIFD_MOD_PDSUB : value->rValue = model->B3SOIFDpdsub; return(OK); case B3SOIFD_MOD_PCIT : value->rValue = model->B3SOIFDpcit; return(OK); case B3SOIFD_MOD_PCDSC : value->rValue = model->B3SOIFDpcdsc; return(OK); case B3SOIFD_MOD_PCDSCB : value->rValue = model->B3SOIFDpcdscb; return(OK); case B3SOIFD_MOD_PCDSCD : value->rValue = model->B3SOIFDpcdscd; return(OK); case B3SOIFD_MOD_PPCLM: value->rValue = model->B3SOIFDppclm; return(OK); case B3SOIFD_MOD_PPDIBL1: value->rValue = model->B3SOIFDppdibl1; return(OK); case B3SOIFD_MOD_PPDIBL2: value->rValue = model->B3SOIFDppdibl2; return(OK); case B3SOIFD_MOD_PPDIBLB: value->rValue = model->B3SOIFDppdiblb; return(OK); case B3SOIFD_MOD_PDROUT : value->rValue = model->B3SOIFDpdrout; return(OK); case B3SOIFD_MOD_PPVAG: value->rValue = model->B3SOIFDppvag; return(OK); case B3SOIFD_MOD_PDELTA: value->rValue = model->B3SOIFDpdelta; return(OK); case B3SOIFD_MOD_PAII: value->rValue = model->B3SOIFDpaii; return(OK); case B3SOIFD_MOD_PBII: value->rValue = model->B3SOIFDpbii; return(OK); case B3SOIFD_MOD_PCII: value->rValue = model->B3SOIFDpcii; return(OK); case B3SOIFD_MOD_PDII: value->rValue = model->B3SOIFDpdii; return(OK); case B3SOIFD_MOD_PALPHA0: value->rValue = model->B3SOIFDpalpha0; return(OK); case B3SOIFD_MOD_PALPHA1: value->rValue = model->B3SOIFDpalpha1; return(OK); case B3SOIFD_MOD_PBETA0: value->rValue = model->B3SOIFDpbeta0; return(OK); case B3SOIFD_MOD_PAGIDL: value->rValue = model->B3SOIFDpagidl; return(OK); case B3SOIFD_MOD_PBGIDL: value->rValue = model->B3SOIFDpbgidl; return(OK); case B3SOIFD_MOD_PNGIDL: value->rValue = model->B3SOIFDpngidl; return(OK); case B3SOIFD_MOD_PNTUN: value->rValue = model->B3SOIFDpntun; return(OK); case B3SOIFD_MOD_PNDIODE: value->rValue = model->B3SOIFDpndiode; return(OK); case B3SOIFD_MOD_PISBJT: value->rValue = model->B3SOIFDpisbjt; return(OK); case B3SOIFD_MOD_PISDIF: value->rValue = model->B3SOIFDpisdif; return(OK); case B3SOIFD_MOD_PISREC: value->rValue = model->B3SOIFDpisrec; return(OK); case B3SOIFD_MOD_PISTUN: value->rValue = model->B3SOIFDpistun; return(OK); case B3SOIFD_MOD_PEDL: value->rValue = model->B3SOIFDpedl; return(OK); case B3SOIFD_MOD_PKBJT1: value->rValue = model->B3SOIFDpkbjt1; return(OK); /* CV Model */ case B3SOIFD_MOD_PVSDFB: value->rValue = model->B3SOIFDpvsdfb; return(OK); case B3SOIFD_MOD_PVSDTH: value->rValue = model->B3SOIFDpvsdth; return(OK); /* Added for binning - END */ default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdask.c0000644000265600020320000002001212264261473022624 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Paolo Nenzi 2002 File: b3soifdask.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { B3SOIFDinstance *here = (B3SOIFDinstance*)inst; NG_IGNORE(select); switch(which) { case B3SOIFD_L: value->rValue = here->B3SOIFDl; return(OK); case B3SOIFD_W: value->rValue = here->B3SOIFDw; return(OK); case B3SOIFD_M: value->rValue = here->B3SOIFDm; return(OK); case B3SOIFD_AS: value->rValue = here->B3SOIFDsourceArea; return(OK); case B3SOIFD_AD: value->rValue = here->B3SOIFDdrainArea; return(OK); case B3SOIFD_PS: value->rValue = here->B3SOIFDsourcePerimeter; return(OK); case B3SOIFD_PD: value->rValue = here->B3SOIFDdrainPerimeter; return(OK); case B3SOIFD_NRS: value->rValue = here->B3SOIFDsourceSquares; return(OK); case B3SOIFD_NRD: value->rValue = here->B3SOIFDdrainSquares; return(OK); case B3SOIFD_OFF: value->rValue = here->B3SOIFDoff; return(OK); case B3SOIFD_BJTOFF: value->iValue = here->B3SOIFDbjtoff; return(OK); case B3SOIFD_RTH0: value->rValue = here->B3SOIFDrth0; value->rValue /= here->B3SOIFDm; return(OK); case B3SOIFD_CTH0: value->rValue = here->B3SOIFDcth0; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_NRB: value->rValue = here->B3SOIFDbodySquares; return(OK); case B3SOIFD_IC_VBS: value->rValue = here->B3SOIFDicVBS; return(OK); case B3SOIFD_IC_VDS: value->rValue = here->B3SOIFDicVDS; return(OK); case B3SOIFD_IC_VGS: value->rValue = here->B3SOIFDicVGS; return(OK); case B3SOIFD_IC_VES: value->rValue = here->B3SOIFDicVES; return(OK); case B3SOIFD_IC_VPS: value->rValue = here->B3SOIFDicVPS; return(OK); case B3SOIFD_DNODE: value->iValue = here->B3SOIFDdNode; return(OK); case B3SOIFD_GNODE: value->iValue = here->B3SOIFDgNode; return(OK); case B3SOIFD_SNODE: value->iValue = here->B3SOIFDsNode; return(OK); case B3SOIFD_BNODE: value->iValue = here->B3SOIFDbNode; return(OK); case B3SOIFD_ENODE: value->iValue = here->B3SOIFDeNode; return(OK); case B3SOIFD_DNODEPRIME: value->iValue = here->B3SOIFDdNodePrime; return(OK); case B3SOIFD_SNODEPRIME: value->iValue = here->B3SOIFDsNodePrime; return(OK); case B3SOIFD_SOURCECONDUCT: value->rValue = here->B3SOIFDsourceConductance; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_DRAINCONDUCT: value->rValue = here->B3SOIFDdrainConductance; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_VBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvbd); return(OK); case B3SOIFD_VBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvbs); return(OK); case B3SOIFD_VGS: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvgs); return(OK); case B3SOIFD_VES: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDves); return(OK); case B3SOIFD_VDS: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDvds); return(OK); case B3SOIFD_CD: value->rValue = here->B3SOIFDcd; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CBS: value->rValue = here->B3SOIFDcjs; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CBD: value->rValue = here->B3SOIFDcjd; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_GM: value->rValue = here->B3SOIFDgm; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_GMID: value->rValue = here->B3SOIFDgm/here->B3SOIFDcd; return(OK); case B3SOIFD_GDS: value->rValue = here->B3SOIFDgds; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_GMBS: value->rValue = here->B3SOIFDgmbs; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_GBD: value->rValue = here->B3SOIFDgjdb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_GBS: value->rValue = here->B3SOIFDgjsb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_QB: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqb); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CQB: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqb); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_QG: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqg); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CQG: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqg); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_QD: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqd); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CQD: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDcqd); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CGG: value->rValue = here->B3SOIFDcggb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CGD: value->rValue = here->B3SOIFDcgdb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CGS: value->rValue = here->B3SOIFDcgsb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CDG: value->rValue = here->B3SOIFDcdgb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CDD: value->rValue = here->B3SOIFDcddb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CDS: value->rValue = here->B3SOIFDcdsb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CBG: value->rValue = here->B3SOIFDcbgb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CBDB: value->rValue = here->B3SOIFDcbdb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_CBSB: value->rValue = here->B3SOIFDcbsb; value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_VON: value->rValue = here->B3SOIFDvon; return(OK); case B3SOIFD_VDSAT: value->rValue = here->B3SOIFDvdsat; return(OK); case B3SOIFD_QBS: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqbs); value->rValue *= here->B3SOIFDm; return(OK); case B3SOIFD_QBD: value->rValue = *(ckt->CKTstate0 + here->B3SOIFDqbd); value->rValue *= here->B3SOIFDm; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim3soi_fd/b3soifdacld.c0000644000265600020320000004344712264261473022772 0ustar andreasadmin/********** Copyright 1999 Regents of the University of California. All rights reserved. Author: Weidong Liu and Pin Su Feb 1999 Author: 1998 Samuel Fung, Dennis Sinitsky and Stephen Tang Modified by Pin Su 99/9/27 Modified by Paolo Nenzi 2002 File: b3soifdacld.c 98/5/01 **********/ /* * Revision 2.1 99/9/27 Pin Su * BSIMFD2.1 release */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "b3soifddef.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int B3SOIFDacLoad(GENmodel *inModel, CKTcircuit *ckt) { B3SOIFDmodel *model = (B3SOIFDmodel*)inModel; B3SOIFDinstance *here; int selfheat; double xcggb, xcgdb, xcgsb, xcgeb, xcgT; double xcdgb, xcddb, xcdsb, xcdeb, xcdT; double xcsgb, xcsdb, xcssb, xcseb, xcsT; double xcbgb, xcbdb, xcbsb, xcbeb, xcbT; double xcegb, xcedb, xcesb, xceeb, xceT; double gdpr, gspr, gds; double cggb, cgdb, cgsb, cgeb, cgT; double cdgb, cddb, cdsb, cdeb, cdT; double cbgb, cbdb, cbsb, cbeb, cbT; double cegb, cedb, cesb, ceeb, ceT; double GSoverlapCap, GDoverlapCap, GEoverlapCap, FwdSum, RevSum, Gm, Gmbs, Gme, GmT; double omega; double dxpart, sxpart; double gbbg, gbbdp, gbbb, gbbe, gbbp, gbbsp, gbbT; double gddpg, gddpdp, gddpsp, gddpb, gddpe, gddpT; double gsspg, gsspdp, gsspsp, gsspb, gsspe, gsspT; double gppg, gppdp, gppb, gppe, gppp, gppsp, gppT; double xcTt, cTt, gTtt, gTtg, gTtb, gTte, gTtdp, gTtsp; FILE *fpdebug = NULL; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->B3SOIFDnextModel) { for (here = model->B3SOIFDinstances; here!= NULL; here = here->B3SOIFDnextInstance) { selfheat = (model->B3SOIFDshMod == 1) && (here->B3SOIFDrth0 != 0.0); if (here->B3SOIFDdebugMod > 2) { fpdebug = fopen("b3soifdac.log", "a"); fprintf(fpdebug, ".......omega=%.5e\n", omega); } if (here->B3SOIFDmode >= 0) { Gm = here->B3SOIFDgm; Gmbs = here->B3SOIFDgmbs; Gme = here->B3SOIFDgme; GmT = model->B3SOIFDtype * here->B3SOIFDgmT; FwdSum = Gm + Gmbs + Gme; RevSum = 0.0; cbgb = here->B3SOIFDcbgb; cbsb = here->B3SOIFDcbsb; cbdb = here->B3SOIFDcbdb; cbeb = here->B3SOIFDcbeb; cbT = model->B3SOIFDtype * here->B3SOIFDcbT; cegb = here->B3SOIFDcegb; cesb = here->B3SOIFDcesb; cedb = here->B3SOIFDcedb; ceeb = here->B3SOIFDceeb; ceT = model->B3SOIFDtype * here->B3SOIFDceT; cggb = here->B3SOIFDcggb; cgsb = here->B3SOIFDcgsb; cgdb = here->B3SOIFDcgdb; cgeb = here->B3SOIFDcgeb; cgT = model->B3SOIFDtype * here->B3SOIFDcgT; cdgb = here->B3SOIFDcdgb; cdsb = here->B3SOIFDcdsb; cddb = here->B3SOIFDcddb; cdeb = here->B3SOIFDcdeb; cdT = model->B3SOIFDtype * here->B3SOIFDcdT; cTt = here->pParam->B3SOIFDcth; gbbg = -here->B3SOIFDgbgs; gbbdp = -here->B3SOIFDgbds; gbbb = -here->B3SOIFDgbbs; gbbe = -here->B3SOIFDgbes; gbbp = -here->B3SOIFDgbps; gbbT = -model->B3SOIFDtype * here->B3SOIFDgbT; gbbsp = - ( gbbg + gbbdp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIFDgjdg; gddpdp = -here->B3SOIFDgjdd; gddpb = -here->B3SOIFDgjdb; gddpe = -here->B3SOIFDgjde; gddpT = -model->B3SOIFDtype * here->B3SOIFDgjdT; gddpsp = - ( gddpg + gddpdp + gddpb + gddpe); gsspg = -here->B3SOIFDgjsg; gsspdp = -here->B3SOIFDgjsd; gsspb = -here->B3SOIFDgjsb; gsspe = 0.0; gsspT = -model->B3SOIFDtype * here->B3SOIFDgjsT; gsspsp = - (gsspg + gsspdp + gsspb + gsspe); gppg = -here->B3SOIFDgbpgs; gppdp = -here->B3SOIFDgbpds; gppb = -here->B3SOIFDgbpbs; gppe = -here->B3SOIFDgbpes; gppp = -here->B3SOIFDgbpps; gppT = -model->B3SOIFDtype * here->B3SOIFDgbpT; gppsp = - (gppg + gppdp + gppb + gppe + gppp); gTtg = here->B3SOIFDgtempg; gTtb = here->B3SOIFDgtempb; gTte = here->B3SOIFDgtempe; gTtdp = here->B3SOIFDgtempd; gTtt = here->B3SOIFDgtempT; gTtsp = - (gTtg + gTtb + gTte + gTtdp); sxpart = 0.6; dxpart = 0.4; } else { Gm = -here->B3SOIFDgm; Gmbs = -here->B3SOIFDgmbs; Gme = -here->B3SOIFDgme; GmT = -model->B3SOIFDtype * here->B3SOIFDgmT; FwdSum = 0.0; RevSum = -Gm - Gmbs - Gme; cdgb = - (here->B3SOIFDcdgb + here->B3SOIFDcggb + here->B3SOIFDcbgb + here->B3SOIFDcegb); cdsb = - (here->B3SOIFDcddb + here->B3SOIFDcgdb + here->B3SOIFDcbdb + here->B3SOIFDcedb); cddb = - (here->B3SOIFDcdsb + here->B3SOIFDcgsb + here->B3SOIFDcbsb + here->B3SOIFDcesb); cdeb = - (here->B3SOIFDcdeb + here->B3SOIFDcgeb + here->B3SOIFDcbeb + here->B3SOIFDceeb); cdT = - model->B3SOIFDtype * (here->B3SOIFDcgT + here->B3SOIFDcbT + here->B3SOIFDcdT + here->B3SOIFDceT); cegb = here->B3SOIFDcegb; cesb = here->B3SOIFDcedb; cedb = here->B3SOIFDcesb; ceeb = here->B3SOIFDceeb; ceT = model->B3SOIFDtype * here->B3SOIFDceT; cggb = here->B3SOIFDcggb; cgsb = here->B3SOIFDcgdb; cgdb = here->B3SOIFDcgsb; cgeb = here->B3SOIFDcgeb; cgT = model->B3SOIFDtype * here->B3SOIFDcgT; cbgb = here->B3SOIFDcbgb; cbsb = here->B3SOIFDcbdb; cbdb = here->B3SOIFDcbsb; cbeb = here->B3SOIFDcbeb; cbT = model->B3SOIFDtype * here->B3SOIFDcbT; cTt = here->pParam->B3SOIFDcth; gbbg = -here->B3SOIFDgbgs; gbbb = -here->B3SOIFDgbbs; gbbe = -here->B3SOIFDgbes; gbbp = -here->B3SOIFDgbps; gbbsp = -here->B3SOIFDgbds; gbbT = -model->B3SOIFDtype * here->B3SOIFDgbT; gbbdp = - ( gbbg + gbbsp + gbbb + gbbe + gbbp); gddpg = -here->B3SOIFDgjsg; gddpsp = -here->B3SOIFDgjsd; gddpb = -here->B3SOIFDgjsb; gddpe = 0.0; gddpT = -model->B3SOIFDtype * here->B3SOIFDgjsT; gddpdp = - (gddpg + gddpsp + gddpb + gddpe); gsspg = -here->B3SOIFDgjdg; gsspsp = -here->B3SOIFDgjdd; gsspb = -here->B3SOIFDgjdb; gsspe = -here->B3SOIFDgjde; gsspT = -model->B3SOIFDtype * here->B3SOIFDgjdT; gsspdp = - ( gsspg + gsspsp + gsspb + gsspe); gppg = -here->B3SOIFDgbpgs; gppsp = -here->B3SOIFDgbpds; gppb = -here->B3SOIFDgbpbs; gppe = -here->B3SOIFDgbpes; gppp = -here->B3SOIFDgbpps; gppT = -model->B3SOIFDtype * here->B3SOIFDgbpT; gppdp = - (gppg + gppsp + gppb + gppe + gppp); gTtt = here->B3SOIFDgtempT; gTtg = here->B3SOIFDgtempg; gTtb = here->B3SOIFDgtempb; gTte = here->B3SOIFDgtempe; gTtdp = here->B3SOIFDgtempd; gTtsp = - (gTtt + gTtg + gTtb + gTte + gTtdp); gTtg = here->B3SOIFDgtempg; gTtb = here->B3SOIFDgtempb; gTte = here->B3SOIFDgtempe; gTtsp = here->B3SOIFDgtempd; gTtt = here->B3SOIFDgtempT; gTtdp = - (gTtg + gTtb + gTte + gTtsp); sxpart = 0.6; sxpart = 0.4; dxpart = 0.6; } gdpr=here->B3SOIFDdrainConductance; gspr=here->B3SOIFDsourceConductance; gds= here->B3SOIFDgds; GSoverlapCap = here->B3SOIFDcgso; GDoverlapCap = here->B3SOIFDcgdo; GEoverlapCap = here->pParam->B3SOIFDcgeo; xcegb = (cegb - GEoverlapCap) * omega; xcedb = cedb * omega; xcesb = cesb * omega; xceeb = (ceeb + GEoverlapCap) * omega; xceT = ceT * omega; xcggb = (cggb + GDoverlapCap + GSoverlapCap + GEoverlapCap) * omega; xcgdb = (cgdb - GDoverlapCap ) * omega; xcgsb = (cgsb - GSoverlapCap) * omega; xcgeb = (cgeb - GEoverlapCap) * omega; xcgT = cgT * omega; xcdgb = (cdgb - GDoverlapCap) * omega; xcddb = (cddb + GDoverlapCap) * omega; xcdsb = cdsb * omega; xcdeb = cdeb * omega; xcdT = cdT * omega; xcsgb = -(cggb + cbgb + cdgb + cegb + GSoverlapCap) * omega; xcsdb = -(cgdb + cbdb + cddb + cedb) * omega; xcssb = (GSoverlapCap - (cgsb + cbsb + cdsb + cesb)) * omega; xcseb = -(cgeb + cbeb + cdeb + ceeb) * omega; xcsT = -(cgT + cbT + cdT + ceT) * omega; xcbgb = cbgb * omega; xcbdb = cbdb * omega; xcbsb = cbsb * omega; xcbeb = cbeb * omega; xcbT = cbT * omega; xcTt = cTt * omega; m = here->B3SOIFDm; *(here->B3SOIFDEgPtr +1) += m * xcegb; *(here->B3SOIFDEdpPtr +1) += m * xcedb; *(here->B3SOIFDEspPtr +1) += m * xcesb; *(here->B3SOIFDGePtr +1) += m * xcgeb; *(here->B3SOIFDDPePtr +1) += m * xcdeb; *(here->B3SOIFDSPePtr +1) += m * xcseb; *(here->B3SOIFDEePtr +1) += m * xceeb; *(here->B3SOIFDGgPtr +1) += m * xcggb; *(here->B3SOIFDGdpPtr +1) += m * xcgdb; *(here->B3SOIFDGspPtr +1) += m * xcgsb; *(here->B3SOIFDDPgPtr +1) += m * xcdgb; *(here->B3SOIFDDPdpPtr +1) += m * xcddb; *(here->B3SOIFDDPspPtr +1) += m * xcdsb; *(here->B3SOIFDSPgPtr +1) += m * xcsgb; *(here->B3SOIFDSPdpPtr +1) += m * xcsdb; *(here->B3SOIFDSPspPtr +1) += m * xcssb; if (selfheat) { *(here->B3SOIFDTemptempPtr + 1) += m * xcTt; *(here->B3SOIFDDPtempPtr + 1) += m * xcdT; *(here->B3SOIFDSPtempPtr + 1) += m * xcsT; *(here->B3SOIFDBtempPtr + 1) += m * xcbT; *(here->B3SOIFDEtempPtr + 1) += m * xceT; *(here->B3SOIFDGtempPtr + 1) += m * xcgT; } if (here->B3SOIFDdebugMod > 3) { fprintf(fpdebug, "Cbg+Cbs+Cbe = %.5e; Cbd = %.5e;\n", (xcbgb+xcbsb+xcbeb)/omega, xcbdb/omega); fprintf(fpdebug, "gbs = %.5e; gbd = %.5e\n", gbbsp, gbbdp); fprintf(fpdebug, "AC condunctance...\n"); fprintf(fpdebug, "Eg=%.5e; Edp=%.5e; Esp=%.5e;\nEb=%.5e; Ee=%.5e\n", xcegb, xcedb, xcesb, -(xcegb+xcedb+xcesb+xceeb), xceeb); fprintf(fpdebug, "Gg=%.5e; Gdp=%.5e; Gsp=%.5e;\nGb=%.5e; Ge=%.5e\n", xcggb, xcgdb, xcgsb, -(xcggb+xcgdb+xcgsb+xcgeb), xcgeb); fprintf(fpdebug, "Bg=%.5e; Bdp=%.5e; Bsp=%.5e;\nBb=%.5e; Be=%.5e\n", xcbgb, xcbdb, xcbsb, -(xcbgb+xcbdb+xcbsb+xcbeb), xcbeb); fprintf(fpdebug, "DPg=%.5e; DPdp=%.5e; DPsp=%.5e;\nDPb=%.5e; DPe=%.5e\n", xcdgb, xcddb, xcdsb, -(xcdgb+xcddb+xcdsb+xcdeb), xcdeb); fprintf(fpdebug, "SPg=%.5e; SPdp=%.5e; SPsp=%.5e;\nSPb=%.5e; SPe=%.5e\n", xcsgb, xcsdb, xcssb, -(xcsgb+xcsdb+xcssb+xcseb), xcseb); } *(here->B3SOIFDEgPtr) += 0.0; *(here->B3SOIFDEdpPtr) += 0.0; *(here->B3SOIFDEspPtr) += 0.0; *(here->B3SOIFDGePtr) -= 0.0; *(here->B3SOIFDDPePtr) += m * (Gme + gddpe); *(here->B3SOIFDSPePtr) += m * (gsspe - Gme); *(here->B3SOIFDEePtr) += 0.0; *(here->B3SOIFDDPgPtr) += m * (Gm + gddpg); *(here->B3SOIFDDPdpPtr) += m * (gdpr + gds + gddpdp + RevSum); *(here->B3SOIFDDPspPtr) -= m * (gds + FwdSum - gddpsp); *(here->B3SOIFDDPdPtr) -= m * gdpr; *(here->B3SOIFDSPgPtr) -= m * (Gm - gsspg); *(here->B3SOIFDSPdpPtr) -= m * (gds + RevSum - gsspdp); *(here->B3SOIFDSPspPtr) += m * (gspr + gds + FwdSum + gsspsp); *(here->B3SOIFDSPsPtr) -= m * gspr; if (selfheat) { *(here->B3SOIFDDPtempPtr) += m * (GmT + gddpT); *(here->B3SOIFDSPtempPtr) += m * (-GmT + gsspT); *(here->B3SOIFDBtempPtr) += m * gbbT; if (here->B3SOIFDbodyMod == 1) { (*(here->B3SOIFDPtempPtr) += m * gppT); } *(here->B3SOIFDTemptempPtr) += m * (gTtt + 1/here->pParam->B3SOIFDrth); *(here->B3SOIFDTempgPtr) += m * gTtg; *(here->B3SOIFDTempbPtr) += m * gTtb; *(here->B3SOIFDTempePtr) += m * gTte; *(here->B3SOIFDTempdpPtr) += m * gTtdp; *(here->B3SOIFDTempspPtr) += m * gTtsp; } if (here->B3SOIFDdebugMod > 3) { fprintf(fpdebug, "Static condunctance...\n"); fprintf(fpdebug, "Gg=%.5e; Gdp=%.5e; Gsp=%.5e;\nGb=%.5e; Ge=%.5e\n", *(here->B3SOIFDGgPtr), *(here->B3SOIFDGdpPtr), *(here->B3SOIFDGspPtr), *(here->B3SOIFDGbPtr), *(here->B3SOIFDGePtr)); fprintf(fpdebug, "DPg=%.5e; DPdp=%.5e; DPsp=%.5e;\nDPb=%.5e; DPe=%.5e\n", *(here->B3SOIFDDPgPtr), *(here->B3SOIFDDPdpPtr), *(here->B3SOIFDDPspPtr), *(here->B3SOIFDDPbPtr), *(here->B3SOIFDDPePtr)); fprintf(fpdebug, "SPg=%.5e; SPdp=%.5e; SPsp=%.5e;\nSPb=%.5e; SPe=%.5e\n", *(here->B3SOIFDSPgPtr), *(here->B3SOIFDSPdpPtr), *(here->B3SOIFDSPspPtr), *(here->B3SOIFDSPbPtr), *(here->B3SOIFDSPePtr)); fprintf(fpdebug, "Bg=%.5e; Bdp=%.5e; Bsp=%.5e;\nBb=%.5e; Be=%.5e\n", gbbg, gbbdp, gbbsp, gbbb, gbbe); } *(here->B3SOIFDDdPtr) += m * gdpr; *(here->B3SOIFDDdpPtr) -= m * gdpr; *(here->B3SOIFDSsPtr) += m * gspr; *(here->B3SOIFDSspPtr) -= m * gspr; if (here->B3SOIFDbodyMod == 1) { (*(here->B3SOIFDBpPtr) -= m * gppp); (*(here->B3SOIFDPbPtr) += m * gppb); (*(here->B3SOIFDPpPtr) += m * gppp); (*(here->B3SOIFDPgPtr) += m * gppg); (*(here->B3SOIFDPdpPtr) += m * gppdp); (*(here->B3SOIFDPspPtr) += m * gppsp); (*(here->B3SOIFDPePtr) += m * gppe); } if (here->B3SOIFDdebugMod > 1) { *(here->B3SOIFDVbsPtr) += m * 1; *(here->B3SOIFDIdsPtr) += m * 1; *(here->B3SOIFDIcPtr) += m * 1; *(here->B3SOIFDIbsPtr) += m * 1; *(here->B3SOIFDIbdPtr) += m * 1; *(here->B3SOIFDIiiPtr) += m * 1; *(here->B3SOIFDIgidlPtr) += m * 1; *(here->B3SOIFDItunPtr) += m * 1; *(here->B3SOIFDIbpPtr) += m * 1; *(here->B3SOIFDAbeffPtr) += m * 1; *(here->B3SOIFDVbs0effPtr) += m * 1; *(here->B3SOIFDVbseffPtr) += m * 1; *(here->B3SOIFDXcPtr) += m * 1; *(here->B3SOIFDCbgPtr) += m * 1; *(here->B3SOIFDCbbPtr) += m * 1; *(here->B3SOIFDCbdPtr) += m * 1; *(here->B3SOIFDqbPtr) += m * 1; *(here->B3SOIFDQbfPtr) += m * 1; *(here->B3SOIFDQjsPtr) += m * 1; *(here->B3SOIFDQjdPtr) += m * 1; /* clean up last */ *(here->B3SOIFDGmPtr) += m * 1; *(here->B3SOIFDGmbsPtr) += m * 1; *(here->B3SOIFDGdsPtr) += m * 1; *(here->B3SOIFDGmePtr) += m * 1; *(here->B3SOIFDVbs0teffPtr) += m * 1; *(here->B3SOIFDVgsteffPtr) += m * 1; *(here->B3SOIFDCbePtr) += m * 1; *(here->B3SOIFDVthPtr) += m * 1; *(here->B3SOIFDXcsatPtr) += m * 1; *(here->B3SOIFDVdscvPtr) += m * 1; *(here->B3SOIFDVcscvPtr) += m * 1; *(here->B3SOIFDQaccPtr) += m * 1; *(here->B3SOIFDQsub0Ptr) += m * 1; *(here->B3SOIFDQsubs1Ptr) += m * 1; *(here->B3SOIFDQsubs2Ptr) += m * 1; *(here->B3SOIFDqgPtr) += m * 1; *(here->B3SOIFDqdPtr) += m * 1; *(here->B3SOIFDqePtr) += m * 1; *(here->B3SOIFDDum1Ptr) += m * 1; *(here->B3SOIFDDum2Ptr) += m * 1; *(here->B3SOIFDDum3Ptr) += m * 1; *(here->B3SOIFDDum4Ptr) += m * 1; *(here->B3SOIFDDum5Ptr) += m * 1; } if (here->B3SOIFDdebugMod > 2) fclose(fpdebug); } } return(OK); } ngspice-26/src/spicelib/devices/isrc/0000755000265600020320000000000012264261707017174 5ustar andreasadminngspice-26/src/spicelib/devices/isrc/isrcdefs.h0000644000265600020320000001033712264261473021153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ISRC #define ISRC #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* * structures to describe independent current sources */ /* information needed for each instance */ typedef struct sISRCinstance { struct sISRCmodel *ISRCmodPtr; /* backpointer to model */ struct sISRCinstance *ISRCnextInstance; /* pointer to next instance of *current model */ IFuid ISRCname; /* pointer to character string naming this instance */ int ISRCstate; /* not used */ int ISRCnegNode; /* number of negative node of source */ int ISRCposNode; /* number of positive node of source */ int ISRCfunctionType; /* code number of function type for source */ int ISRCfunctionOrder; /* order of the function for the source */ double *ISRCcoeffs; /* pointer to array of coefficients */ double ISRCdcValue; /* DC and TRANSIENT value of source */ double ISRCmValue; /* Parallel multiplier */ double ISRCacPhase; /* AC phase angle */ double ISRCacMag; /* AC magnitude */ double ISRCacReal; /* AC real component */ double ISRCacImag; /* AC imaginary component */ double ISRCdF1mag; /* distortion f1 magnitude */ double ISRCdF2mag; /* distortion f2 magnitude */ double ISRCdF1phase; /* distortion f1 phase */ double ISRCdF2phase; /* distortion f2 phase */ struct trnoise_state *ISRCtrnoise_state; /* transient noise */ struct trrandom_state *ISRCtrrandom_state; /* transient random source */ /* gtri - begin - add member to hold current source value */ #ifdef XSPICE /* needed for outputting results */ double ISRCcurrent; /* current value */ #endif /* gtri - end - add member to hold current source value */ unsigned ISRCdcGiven :1 ; /* flag to indicate dc value given */ unsigned ISRCmGiven :1 ; /* flag to indicate multiplier given */ unsigned ISRCacGiven :1 ; /* flag to indicate ac keyword given */ unsigned ISRCacMGiven :1 ; /* flag to indicate ac magnitude given */ unsigned ISRCacPGiven :1 ; /* flag to indicate ac phase given */ unsigned ISRCfuncTGiven :1 ; /* flag to indicate function type given */ unsigned ISRCcoeffsGiven :1 ; /* flag to indicate function coeffs given */ unsigned ISRCdGiven :1 ; /* flag to indicate source is a distortion input */ unsigned ISRCdF1given :1 ; /* flag to indicate source is an f1 distortion input */ unsigned ISRCdF2given :1 ; /* flag to indicate source is an f2 distortion input */ } ISRCinstance ; /* per model data */ typedef struct sISRCmodel { int ISRCmodType; /* type index of this device type */ struct sISRCmodel *ISRCnextModel; /* pointer to next possible model *in linked list */ ISRCinstance * ISRCinstances; /* pointer to list of instances * that have this model */ IFuid ISRCmodName; /* pointer to character string naming this model */ } ISRCmodel; /* source types */ #ifndef PULSE #define PULSE 1 #define SINE 2 #define EXP 3 #define SFFM 4 #define PWL 5 #define AM 6 #define TRNOISE 7 #define TRRANDOM 8 #define EXTERNAL 9 #endif /*PULSE*/ /* device parameters */ #define ISRC_DC 1 #define ISRC_M 2 #define ISRC_AC_MAG 3 #define ISRC_AC_PHASE 4 #define ISRC_AC 5 #define ISRC_PULSE 6 #define ISRC_SINE 7 #define ISRC_EXP 8 #define ISRC_PWL 9 #define ISRC_SFFM 10 #define ISRC_NEG_NODE 11 #define ISRC_POS_NODE 12 #define ISRC_AC_REAL 13 #define ISRC_AC_IMAG 14 #define ISRC_FCN_TYPE 15 #define ISRC_FCN_ORDER 16 #define ISRC_FCN_COEFFS 17 #define ISRC_POWER 18 #define ISRC_D_F1 19 #define ISRC_D_F2 20 #define ISRC_VOLTS 21 #define ISRC_AM 22 /* gtri - begin - add define for current source value */ #ifdef XSPICE /* needed for outputting results */ #define ISRC_CURRENT 23 #endif /* gtri - end - add define for current source value */ #define ISRC_TRNOISE 25 #define ISRC_TRRANDOM 26 #define ISRC_EXTERNAL 27 /* model parameters */ /* device questions */ /* model questions */ #include "isrcext.h" #endif /*ISRC*/ ngspice-26/src/spicelib/devices/isrc/isrctemp.c0000644000265600020320000000353012264261473021167 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int ISRCtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-process voltage source parameters */ { ISRCmodel *model = (ISRCmodel *) inModel; ISRCinstance *here; double radians; NG_IGNORE(ckt); /* loop through all the voltage source models */ for( ; model != NULL; model = model->ISRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ISRCinstances; here != NULL ; here=here->ISRCnextInstance) { if(here->ISRCacGiven && !here->ISRCacMGiven) { here->ISRCacMag = 1; } if(here->ISRCacGiven && !here->ISRCacPGiven) { here->ISRCacPhase = 0; } if(!here->ISRCdcGiven) { /* no DC value - either have a transient value, or none */ if(here->ISRCfuncTGiven) { SPfrontEnd->IFerror (ERR_WARNING, "%s: no DC value, transient time 0 value used", &(here->ISRCname)); } else { SPfrontEnd->IFerror (ERR_WARNING, "%s: has no value, DC 0 assumed", &(here->ISRCname)); } } if(!here->ISRCmGiven) here->ISRCmValue = 1; radians = here->ISRCacPhase * M_PI / 180.0; here->ISRCacReal = here->ISRCacMag * cos(radians); here->ISRCacImag = here->ISRCacMag * sin(radians); } } return(OK); } ngspice-26/src/spicelib/devices/isrc/isrcacld.c0000644000265600020320000000205212264261473021123 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ISRCacLoad(GENmodel *inModel, CKTcircuit *ckt) { ISRCmodel *model = (ISRCmodel *) inModel; ISRCinstance *here; double m; for( ; model != NULL; model = model->ISRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ISRCinstances; here != NULL ; here=here->ISRCnextInstance) { m = here->ISRCmValue; *(ckt->CKTrhs + (here->ISRCposNode)) += m * here->ISRCacReal; *(ckt->CKTrhs + (here->ISRCnegNode)) -= m * here->ISRCacReal; *(ckt->CKTirhs + (here->ISRCposNode)) += m * here->ISRCacImag; *(ckt->CKTirhs + (here->ISRCnegNode)) -= m * here->ISRCacImag; } } return(OK); } ngspice-26/src/spicelib/devices/isrc/isrcext.h0000644000265600020320000000120012264261473021017 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int ISRCaccept(CKTcircuit*,GENmodel*); extern int ISRCacLoad(GENmodel*,CKTcircuit*); extern int ISRCask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int ISRCdelete(GENmodel*,IFuid,GENinstance**); extern void ISRCdestroy(GENmodel**); extern int ISRCload(GENmodel*,CKTcircuit*); extern int ISRCmDelete(GENmodel**,IFuid,GENmodel*); extern int ISRCparam(int,IFvalue*,GENinstance*,IFvalue*); extern int ISRCpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int ISRCtemp(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/isrc/isrcmdel.c0000644000265600020320000000176712264261473021155 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ISRCmDelete(GENmodel **inModel, IFuid modname, GENmodel *fast) { ISRCmodel **model = (ISRCmodel **) inModel; ISRCmodel *modfast = (ISRCmodel *) fast; ISRCinstance *here; ISRCinstance *prev = NULL; ISRCmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->ISRCnextModel)) { if( (*model)->ISRCmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->ISRCnextModel; /* cut deleted device out of list */ for(here = (*model)->ISRCinstances ; here ; here = here->ISRCnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/isrc/isrcload.c0000644000265600020320000003725712264261473021156 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 Alansfixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "isrcdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/1-f-code.h" #ifdef XSPICE_EXP /* gtri - begin - wbk - modify for supply ramping option */ #include "ngspice/cmproto.h" /* gtri - end - wbk - modify for supply ramping option */ #endif #ifdef SHARED_MODULE extern double getisrcval(double, char*); #endif int ISRCload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current value into the * sparse matrix previously provided */ { ISRCmodel *model = (ISRCmodel *) inModel; ISRCinstance *here; double value; double time; double m; /* loop through all the source models */ for( ; model != NULL; model = model->ISRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ISRCinstances; here != NULL ; here=here->ISRCnextInstance) { m = here->ISRCmValue; if( (ckt->CKTmode & (MODEDCOP | MODEDCTRANCURVE)) && here->ISRCdcGiven ) { /* load using DC value */ #ifdef XSPICE_EXP /* gtri - begin - wbk - modify to process srcFact, etc. for all sources */ value = here->ISRCdcValue; #else value = here->ISRCdcValue * ckt->CKTsrcFact; #endif } else { if(ckt->CKTmode & (MODEDC)) { time = 0; } else { time = ckt->CKTtime; } /* use the transient functions */ switch(here->ISRCfunctionType) { default: #ifdef XSPICE_EXP value = here->ISRCdcValue; #else value = here->ISRCdcValue * ckt->CKTsrcFact; #endif break; case PULSE: { double V1, V2, TD, TR, TF, PW, PER; double basetime = 0; #ifdef XSPICE double PHASE; double phase; double deltat; #endif V1 = here->ISRCcoeffs[0]; V2 = here->ISRCcoeffs[1]; TD = here->ISRCfunctionOrder > 2 ? here->ISRCcoeffs[2] : 0.0; TR = here->ISRCfunctionOrder > 3 && here->ISRCcoeffs[3] != 0.0 ? here->ISRCcoeffs[3] : ckt->CKTstep; TF = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] != 0.0 ? here->ISRCcoeffs[4] : ckt->CKTstep; PW = here->ISRCfunctionOrder > 5 && here->ISRCcoeffs[5] != 0.0 ? here->ISRCcoeffs[5] : ckt->CKTfinalTime; PER = here->ISRCfunctionOrder > 6 && here->ISRCcoeffs[6] != 0.0 ? here->ISRCcoeffs[6] : ckt->CKTfinalTime; /* shift time by delay time TD */ time -= TD; #ifdef XSPICE /* gtri - begin - wbk - add PHASE parameter */ PHASE = here->ISRCfunctionOrder > 7 ? here->ISRCcoeffs[7] : 0.0; /* normalize phase to cycles */ phase = PHASE / 360.0; phase = fmod(phase, 1.0); deltat = phase * PER; while (deltat > 0) deltat -= PER; /* shift time by pase (neg. for pos. phase value) */ time += deltat; /* gtri - end - wbk - add PHASE parameter */ #endif if(time > PER) { /* repeating signal - figure out where we are */ /* in period */ basetime = PER * floor(time/PER); time -= basetime; } if (time <= 0 || time >= TR + PW + TF) { value = V1; } else if (time >= TR && time <= TR + PW) { value = V2; } else if (time > 0 && time < TR) { value = V1 + (V2 - V1) * (time) / TR; } else { /* time > TR + PW && < TR + PW + TF */ value = V2 + (V1 - V2) * (time - (TR + PW)) / TF; } } break; case SINE: { double VO, VA, FREQ, TD, THETA; /* gtri - begin - wbk - add PHASE parameter */ #ifdef XSPICE double PHASE; double phase; PHASE = here->ISRCfunctionOrder > 5 ? here->ISRCcoeffs[5] : 0.0; /* compute phase in radians */ phase = PHASE * M_PI / 180.0; #endif VO = here->ISRCcoeffs[0]; VA = here->ISRCcoeffs[1]; FREQ = here->ISRCfunctionOrder > 2 && here->ISRCcoeffs[2] != 0.0 ? here->ISRCcoeffs[2] : (1/ckt->CKTfinalTime); TD = here->ISRCfunctionOrder > 3 ? here->ISRCcoeffs[3] : 0.0; THETA = here->ISRCfunctionOrder > 4 ? here->ISRCcoeffs[4] : 0.0; time -= TD; if (time <= 0) { #ifdef XSPICE value = VO + VA * sin(phase); } else { value = VO + VA * sin(FREQ*time * 2.0 * M_PI + phase) * exp(-time*THETA); #else value = VO; } else { value = VO + VA * sin(FREQ * time * 2.0 * M_PI) * exp(-time*THETA); #endif /* gtri - end - wbk - add PHASE parameter */ } } break; case EXP: { double V1, V2, TD1, TD2, TAU1, TAU2; V1 = here->ISRCcoeffs[0]; V2 = here->ISRCcoeffs[1]; TD1 = here->ISRCfunctionOrder > 2 && here->ISRCcoeffs[2] != 0.0 ? here->ISRCcoeffs[2] : ckt->CKTstep; TAU1 = here->ISRCfunctionOrder > 3 && here->ISRCcoeffs[3] != 0.0 ? here->ISRCcoeffs[3] : ckt->CKTstep; TD2 = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] != 0.0 ? here->ISRCcoeffs[4] : TD1 + ckt->CKTstep; TAU2 = here->ISRCfunctionOrder > 5 && here->ISRCcoeffs[5] ? here->ISRCcoeffs[5] : ckt->CKTstep; if(time <= TD1) { value = V1; } else if (time <= TD2) { value = V1 + (V2-V1)*(1-exp(-(time-TD1)/TAU1)); } else { value = V1 + (V2-V1)*(1-exp(-(time-TD1)/TAU1)) + (V1-V2)*(1-exp(-(time-TD2)/TAU2)) ; } } break; case SFFM: { double VO, VA, FC, MDI, FS; /* gtri - begin - wbk - add PHASE parameters */ #ifdef XSPICE double PHASEC, PHASES; double phasec; double phases; PHASEC = here->ISRCfunctionOrder > 5 ? here->ISRCcoeffs[5] : 0.0; PHASES = here->ISRCfunctionOrder > 6 ? here->ISRCcoeffs[6] : 0.0; /* compute phases in radians */ phasec = PHASEC * M_PI / 180.0; phases = PHASES * M_PI / 180.0; #endif VO = here->ISRCcoeffs[0]; VA = here->ISRCcoeffs[1]; FC = here->ISRCfunctionOrder > 2 && here->ISRCcoeffs[2] ? here->ISRCcoeffs[2] : (1/ckt->CKTfinalTime); MDI = here->ISRCfunctionOrder > 3 ? here->ISRCcoeffs[3] : 0.0; FS = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] ? here->ISRCcoeffs[4] : (1/ckt->CKTfinalTime); #ifdef XSPICE /* compute waveform value */ value = VO + VA * sin((2.0 * M_PI * FC * time + phasec) + MDI * sin(2.0 * M_PI * FS * time + phases)); #else value = VO + VA * sin((2.0 * M_PI * FC * time) + MDI * sin(2.0 * M_PI * FS * time)); #endif /* gtri - end - wbk - add PHASE parameters */ } break; case AM: { double VA, FC, MF, VO, TD; /* gtri - begin - wbk - add PHASE parameters */ #ifdef XSPICE double PHASEC, PHASES; double phasec; double phases; PHASEC = here->ISRCfunctionOrder > 5 ? here->ISRCcoeffs[5] : 0.0; PHASES = here->ISRCfunctionOrder > 6 ? here->ISRCcoeffs[6] : 0.0; /* compute phases in radians */ phasec = PHASEC * M_PI / 180.0; phases = PHASES * M_PI / 180.0; #endif VA = here->ISRCcoeffs[0]; VO = here->ISRCcoeffs[1]; MF = here->ISRCfunctionOrder > 2 && here->ISRCcoeffs[2] ? here->ISRCcoeffs[2] : (1/ckt->CKTfinalTime); FC = here->ISRCfunctionOrder > 3 ? here->ISRCcoeffs[3] : 0.0; TD = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] ? here->ISRCcoeffs[4] : 0.0; time -= TD; if (time <= 0) { value = 0; } else { #ifdef XSPICE /* compute waveform value */ value = VA * (VO + sin(2.0 * M_PI * MF * time + phases )) * sin(2.0 * M_PI * FC * time + phases); #else value = VA * (VO + sin(2.0 * M_PI * MF * time)) * sin(2.0 * M_PI * FC * time); #endif } /* gtri - end - wbk - add PHASE parameters */ } break; case PWL: { int i; if(time < *(here->ISRCcoeffs)) { value = *(here->ISRCcoeffs + 1) ; break; } for(i=0; i < (here->ISRCfunctionOrder / 2) - 1; i++) { if((*(here->ISRCcoeffs+2*i)==time)) { value = *(here->ISRCcoeffs+2*i+1); goto loadDone; } if((*(here->ISRCcoeffs+2*i)ISRCcoeffs+2*(i+1)) >time)) { value = *(here->ISRCcoeffs+2*i+1) + (((time-*(here->ISRCcoeffs+2*i))/ (*(here->ISRCcoeffs+2*(i+1)) - *(here->ISRCcoeffs+2*i))) * (*(here->ISRCcoeffs+2*i+3) - *(here->ISRCcoeffs+2*i+1))); goto loadDone; } } value = *(here->ISRCcoeffs+ here->ISRCfunctionOrder-1) ; break; } /**** tansient noise routines: INoi2 2 0 DC 0 TRNOISE(10n 0.5n 0 0n) : generate gaussian distributed noise rms value, time step, 0 0 INoi1 1 0 DC 0 TRNOISE(0n 0.5n 1 10n) : generate 1/f noise 0, time step, exponent < 2, rms value */ case TRNOISE: { struct trnoise_state *state = here -> ISRCtrnoise_state; double TS = state -> TS; double RTSAM = state->RTSAM; /* reset top (hack for repeated tran commands) */ if (time == 0) state->top = 0; /* no noise */ if(TS == 0.0) { value = 0.0; } else { /* 1/f and white noise */ size_t n1 = (size_t) floor(time / TS); double V1 = trnoise_state_get(state, ckt, n1); double V2 = trnoise_state_get(state, ckt, n1+1); value = V1 + (V2 - V1) * (time / TS - (double)n1); } /* RTS noise */ if (RTSAM > 0) { double RTScapTime = state->RTScapTime; if (time >= RTScapTime) value += RTSAM; } /* DC value */ if(here -> ISRCdcGiven) value += here->ISRCdcValue; } break; case TRRANDOM: { struct trrandom_state *state = here -> ISRCtrrandom_state; value = state -> value; /* DC value */ if(here -> ISRCdcGiven) value += here->ISRCdcValue; } break; #ifdef SHARED_MODULE case EXTERNAL: { value = getisrcval(time, here->ISRCname); if(here -> ISRCdcGiven) value += here->ISRCdcValue; } break; #endif } // switch } // else (line 48) loadDone: /* gtri - begin - wbk - modify for supply ramping option */ #ifdef XSPICE_EXP value *= ckt->CKTsrcFact; value *= cm_analog_ramp_factor(); #else if (ckt->CKTmode & MODETRANOP) value *= ckt->CKTsrcFact; #endif /* gtri - end - wbk - modify for supply ramping option */ *(ckt->CKTrhs + (here->ISRCposNode)) += m * value; *(ckt->CKTrhs + (here->ISRCnegNode)) -= m * value; /* gtri - end - wbk - modify to process srcFact, etc. for all sources */ #ifdef XSPICE /* gtri - begin - wbk - record value so it can be output if requested */ here->ISRCcurrent = m * value; /* gtri - end - wbk - record value so it can be output if requested */ #endif } // for loop instances } // for loop models return(OK); } ngspice-26/src/spicelib/devices/isrc/isrcacct.c0000644000265600020320000003134712264261473021143 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "isrcdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/missing_math.h" #include "ngspice/1-f-code.h" #ifndef HAVE_LIBFFTW3 extern void fftFree(void); #endif extern bool ft_ngdebug; /* some additional debug info printed */ #define SAMETIME(a,b) (fabs((a)-(b))<= TIMETOL * PW) #define TIMETOL 1e-7 int ISRCaccept(CKTcircuit *ckt, GENmodel *inModel) /* set up the breakpoint table. */ { ISRCmodel *model = (ISRCmodel *) inModel; ISRCinstance *here; int error; /* loop through all the voltage source models */ for( ; model != NULL; model = model->ISRCnextModel ) { /* loop through all the instances of the model */ for (here = model->ISRCinstances; here != NULL ; here=here->ISRCnextInstance) { if(!(ckt->CKTmode & (MODETRAN | MODETRANOP))) { /* not transient, so shouldn't be here */ return(OK); } else { /* use the transient functions */ switch(here->ISRCfunctionType) { default: { /* no function specified:DC no breakpoints */ break; } case PULSE: { double TD, TR, TF, PW, PER; double tshift; double time = 0.; double basetime = 0; /* gtri - begin - wbk - add PHASE parameter */ #ifdef XSPICE double PHASE; double phase; double deltat; #endif TD = here->ISRCfunctionOrder > 2 ? here->ISRCcoeffs[2] : 0.0; TR = here->ISRCfunctionOrder > 3 && here->ISRCcoeffs[3] != 0.0 ? here->ISRCcoeffs[3] : ckt->CKTstep; TF = here->ISRCfunctionOrder > 4 && here->ISRCcoeffs[4] != 0.0 ? here->ISRCcoeffs[4] : ckt->CKTstep; PW = here->ISRCfunctionOrder > 5 && here->ISRCcoeffs[5] != 0.0 ? here->ISRCcoeffs[5] : ckt->CKTfinalTime; PER = here->ISRCfunctionOrder > 6 && here->ISRCcoeffs[6] != 0.0 ? here->ISRCcoeffs[6] : ckt->CKTfinalTime; #ifdef XSPICE PHASE = here->ISRCfunctionOrder > 7 ? here->ISRCcoeffs[7] : 0.0; #endif /* offset time by delay */ time = ckt->CKTtime - TD; tshift = TD; #ifdef XSPICE /* normalize phase to 0 - 360° */ /* normalize phase to cycles */ phase = PHASE / 360.0; phase = fmod(phase, 1.0); deltat = phase * PER; while (deltat > 0) deltat -= PER; time += deltat; tshift = TD - deltat; #endif /* gtri - end - wbk - add PHASE parameter */ if(time >= PER) { /* repeating signal - figure out where we are */ /* in period */ basetime = PER * floor(time/PER); time -= basetime; } if( time <= 0.0 || time >= TR + PW + TF) { if(ckt->CKTbreak && SAMETIME(time,0.0)) { error = CKTsetBreak(ckt,basetime + TR + tshift); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(TR+PW+TF,time) ) { error = CKTsetBreak(ckt,basetime + PER + tshift); if(error) return(error); } else if (ckt->CKTbreak && (time == -tshift) ) { error = CKTsetBreak(ckt,basetime + tshift); if(error) return(error); } else if (ckt->CKTbreak && SAMETIME(PER,time) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PER); if(error) return(error); } } else if ( time >= TR && time <= TR + PW) { if(ckt->CKTbreak && SAMETIME(time,TR) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(TR+PW,time) ) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW + TF); if(error) return(error); } } else if (time > 0 && time < TR) { if(ckt->CKTbreak && SAMETIME(time,0) ) { error = CKTsetBreak(ckt,basetime + tshift + TR); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(time,TR)) { error = CKTsetBreak(ckt,basetime + tshift + TR + PW); if(error) return(error); } } else { /* time > TR + PW && < TR + PW + TF */ if(ckt->CKTbreak && SAMETIME(time,TR+PW) ) { error = CKTsetBreak(ckt,basetime + tshift+TR + PW +TF); if(error) return(error); } else if(ckt->CKTbreak && SAMETIME(time,TR+PW+TF) ) { error = CKTsetBreak(ckt,basetime + tshift + PER); if(error) return(error); } } } break; case SINE: { /* no breakpoints (yet) */ } break; case EXP: { /* no breakpoints (yet) */ } break; case SFFM:{ /* no breakpoints (yet) */ } break; case AM:{ /* no breakpoints (yet) */ } break; case PWL: { int i; if(ckt->CKTtime < *(here->ISRCcoeffs)) { if(ckt->CKTbreak) { error = CKTsetBreak(ckt,*(here->ISRCcoeffs)); break; } } for(i=0;i<(here->ISRCfunctionOrder/2)-1;i++) { if ( ckt->CKTbreak && AlmostEqualUlps(*(here->ISRCcoeffs+2*i), ckt->CKTtime, 3 ) ) { error = CKTsetBreak(ckt, *(here->ISRCcoeffs+2*i+2)); if(error) return(error); goto bkptset; } } break; } /**** tansient noise routines: INoi2 2 0 DC 0 TRNOISE(10n 0.5n 0 0n) : generate gaussian distributed noise rms value, time step, 0 0 INoi1 1 0 DC 0 TRNOISE(0n 0.5n 1 10n) : generate 1/f noise 0, time step, exponent < 2, rms value */ case TRNOISE: { struct trnoise_state *state = here -> ISRCtrnoise_state; double TS = state -> TS; double RTSAM = state ->RTSAM; if ((TS == 0.0) && (RTSAM == 0.0)) // no further breakpoint if value not given break; #ifndef HAVE_LIBFFTW3 /* FIXME, dont' want this here, over to aof_get or somesuch */ if (ckt->CKTtime == 0.0) { if (ft_ngdebug) printf("VSRC: free fft tables\n"); fftFree(); } #endif if(ckt->CKTbreak) { int n = (int) floor(ckt->CKTtime / TS + 0.5); volatile double nearest = n * TS; if(AlmostEqualUlps(nearest, ckt->CKTtime, 3)) { /* carefull calculate `next' * make sure it is really identical * with the next calculated `nearest' value */ volatile double next = (n+1) * TS; error = CKTsetBreak(ckt, next); if(error) return(error); } } if (RTSAM > 0) { double RTScapTime = state->RTScapTime; double RTSemTime = state->RTSemTime; double RTSCAPT = state->RTSCAPT; double RTSEMT = state->RTSEMT; if (ckt->CKTtime == 0) { /* initialzing here again needed for repeated calls to tran command */ state->RTScapTime = RTScapTime = exprand(RTSCAPT); state->RTSemTime = RTSemTime = RTScapTime + exprand(RTSEMT); if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTScapTime); if(error) return(error); } } if(AlmostEqualUlps(RTScapTime, ckt->CKTtime, 3)) { if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTSemTime); if(error) return(error); } } if(AlmostEqualUlps(RTSemTime, ckt->CKTtime, 3)) { /* new values */ RTScapTime = here -> ISRCtrnoise_state ->RTScapTime = ckt->CKTtime + exprand(RTSCAPT); here -> ISRCtrnoise_state ->RTSemTime = RTScapTime + exprand(RTSEMT); if (ckt->CKTbreak) { error = CKTsetBreak(ckt, RTScapTime); if(error) return(error); } } } } break; case TRRANDOM: { struct trrandom_state *state = here -> ISRCtrrandom_state; double TS = state -> TS; double TD = state -> TD; double time = ckt->CKTtime - TD; if (time < 0) break; if(ckt->CKTbreak) { int n = (int) floor(time / TS + 0.5); volatile double nearest = n * TS; if(AlmostEqualUlps(nearest, time, 3)) { /* carefully calculate `next' * make sure it is really identical * with the next calculated `nearest' value */ volatile double next = (n+1) * TS + TD; error = CKTsetBreak(ckt, next); if(error) return(error); state->value = trrandom_state_get(state); } } } break; #ifdef SHARED_MODULE case EXTERNAL: { /* no breakpoints (yet) */ } break; #endif } // switch } // if ... else bkptset: ; } // for } // for return(OK); } ngspice-26/src/spicelib/devices/isrc/isrc.c0000644000265600020320000000537112264261473020306 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "isrcdefs.h" #include "ngspice/suffix.h" IFparm ISRCpTable[] = { /* parameters */ IOPP("dc", ISRC_DC, IF_REAL ,"DC value of source"), IOP ( "m", ISRC_M, IF_REAL ,"Parallel multiplier"), IOPPA("acmag", ISRC_AC_MAG, IF_REAL ,"AC Magnitude"), IOPAAU("acphase", ISRC_AC_PHASE, IF_REAL ,"AC Phase"), /* Modified to allow print @Iin[sin] A.Roldan */ IOP ("pulse", ISRC_PULSE, IF_REALVEC,"Pulse description"), IOP ("sine", ISRC_SINE, IF_REALVEC,"Sinusoidal source description"), IOP ("sin", ISRC_SINE, IF_REALVEC,"Sinusoidal source description"), IOP ("exp", ISRC_EXP, IF_REALVEC,"Exponential source description"), IOP ("pwl", ISRC_PWL, IF_REALVEC,"Piecewise linear description"), IOP ("sffm", ISRC_SFFM, IF_REALVEC,"Single freq. FM description"), IOP ("am", ISRC_AM, IF_REALVEC,"Amplitude modulation description"), IOP ("trnoise", ISRC_TRNOISE, IF_REALVEC,"Transient noise description"), IOP ("trrandom", ISRC_TRRANDOM, IF_REALVEC,"random source description"), #ifdef SHARED_MODULE IOP ("external", ISRC_EXTERNAL, IF_REALVEC,"external source description"), #endif OPU ("pos_node",ISRC_POS_NODE, IF_INTEGER,"Positive node of source"), OPU ("neg_node",ISRC_NEG_NODE, IF_INTEGER,"Negative node of source"), OPU ("function",ISRC_FCN_TYPE, IF_INTEGER,"Function of the source"), OPU ("order", ISRC_FCN_ORDER, IF_INTEGER,"Order of the source function"), OPU ("coeffs", ISRC_FCN_COEFFS,IF_REALVEC,"Coefficients for the function"), OPU ("acreal", ISRC_AC_REAL, IF_REAL, "AC real part"), OPU ("acimag", ISRC_AC_IMAG, IF_REAL, "AC imaginary part"), IP ("ac", ISRC_AC, IF_REALVEC,"AC magnitude, phase vector"), OP ("v", ISRC_VOLTS, IF_REAL, "Voltage across the supply"), OP ("p", ISRC_POWER, IF_REAL, "Power supplied by the source"), IP ("c", ISRC_DC, IF_REAL, "Current through current source"), /* gtri - begin - add parameter for current source value */ #ifdef XSPICE OP ("current", ISRC_CURRENT, IF_REAL, "Current in DC or Transient mode"), #endif /* gtri - end - add parameter for current source value */ IP ("distof1", ISRC_D_F1, IF_REALVEC,"f1 input for distortion"), IP ("distof2", ISRC_D_F2, IF_REALVEC,"f2 input for distortion") }; char *ISRCnames[] = { "I+", "I-" }; int ISRCnSize = NUMELEMS(ISRCnames); int ISRCpTSize = NUMELEMS(ISRCpTable); int ISRCmPTSize = 0; int ISRCiSize = sizeof(ISRCinstance); int ISRCmSize = sizeof(ISRCmodel); ngspice-26/src/spicelib/devices/isrc/isrcdel.c0000644000265600020320000000156112264261473020770 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int ISRCdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { ISRCmodel *model = (ISRCmodel *) inModel; ISRCinstance **fast = (ISRCinstance **) inst; ISRCinstance **prev = NULL; ISRCinstance *here; for( ; model ; model = model->ISRCnextModel) { prev = &(model->ISRCinstances); for(here = *prev; here ; here = *prev) { if(here->ISRCname == name || (fast && here==*fast) ) { *prev= here->ISRCnextInstance; FREE(here); return(OK); } prev = &(here->ISRCnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/isrc/isrcdest.c0000644000265600020320000000152112264261473021157 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "isrcdefs.h" #include "ngspice/suffix.h" void ISRCdestroy(GENmodel **inModel) { ISRCmodel **model = (ISRCmodel**)inModel; ISRCinstance *here; ISRCinstance *prev = NULL; ISRCmodel *mod = *model; ISRCmodel *oldmod = NULL; for( ; mod ; mod = mod->ISRCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->ISRCinstances ; here ; here = here->ISRCnextInstance) { if(prev) { tfree(prev->ISRCcoeffs); FREE(prev); } prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/isrc/isrcask.c0000644000265600020320000000615012264261473021001 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameters * of independent current SouRCe */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int ISRCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { ISRCinstance *here = (ISRCinstance*)inst; static char *msg = "Current and power not available in ac analysis"; int temp; double *v, *w; NG_IGNORE(select); switch(which) { case ISRC_DC: value->rValue = here->ISRCdcValue; return (OK); case ISRC_M: value->rValue = here->ISRCmValue; return (OK); case ISRC_AC_MAG: value->rValue = here->ISRCacMag; return (OK); case ISRC_AC_PHASE: value->rValue = here->ISRCacPhase; return (OK); case ISRC_PULSE: case ISRC_SINE: case ISRC_EXP: case ISRC_PWL: case ISRC_SFFM: case ISRC_AM: case ISRC_TRNOISE: case ISRC_TRRANDOM: case ISRC_FCN_COEFFS: temp = value->v.numValue = here->ISRCfunctionOrder; v = value->v.vec.rVec = TMALLOC(double, here->ISRCfunctionOrder); w = here->ISRCcoeffs; while (temp--) *v++ = *w++; return (OK); case ISRC_NEG_NODE: value->iValue = here->ISRCnegNode; return (OK); case ISRC_POS_NODE: value->iValue = here->ISRCposNode; return (OK); case ISRC_FCN_TYPE: value->iValue = here->ISRCfunctionType; return (OK); case ISRC_AC_REAL: value->rValue = here->ISRCacReal; return (OK); case ISRC_AC_IMAG: value->rValue = here->ISRCacImag; return (OK); case ISRC_FCN_ORDER: value->rValue = here->ISRCfunctionOrder; return (OK); case ISRC_VOLTS: value->rValue = (*(ckt->CKTrhsOld + here->ISRCposNode) - *(ckt->CKTrhsOld + here->ISRCnegNode)); return(OK); case ISRC_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "ISRCask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = -here->ISRCdcValue * (*(ckt->CKTrhsOld + here->ISRCposNode) - *(ckt->CKTrhsOld + here->ISRCnegNode)); } return(OK); /* gtri - begin - add current value information */ #ifdef XSPICE case ISRC_CURRENT: value->rValue = here->ISRCcurrent; return (OK); #endif /* gtri - end - add current value information */ default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/isrc/Makefile.am0000644000265600020320000000065712264261473021240 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libisrc.la libisrc_la_SOURCES = \ isrc.c \ isrcacct.c \ isrcacld.c \ isrcask.c \ isrcdefs.h \ isrcdel.c \ isrcdest.c \ isrcext.h \ isrcinit.c \ isrcinit.h \ isrcitf.h \ isrcload.c \ isrcmdel.c \ isrcpar.c \ isrctemp.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/isrc/Makefile.in0000644000265600020320000004160112264261537021244 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/isrc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libisrc_la_LIBADD = am_libisrc_la_OBJECTS = isrc.lo isrcacct.lo isrcacld.lo isrcask.lo \ isrcdel.lo isrcdest.lo isrcinit.lo isrcload.lo isrcmdel.lo \ isrcpar.lo isrctemp.lo libisrc_la_OBJECTS = $(am_libisrc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libisrc_la_SOURCES) DIST_SOURCES = $(libisrc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libisrc.la libisrc_la_SOURCES = \ isrc.c \ isrcacct.c \ isrcacld.c \ isrcask.c \ isrcdefs.h \ isrcdel.c \ isrcdest.c \ isrcext.h \ isrcinit.c \ isrcinit.h \ isrcitf.h \ isrcload.c \ isrcmdel.c \ isrcpar.c \ isrctemp.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/isrc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/isrc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libisrc.la: $(libisrc_la_OBJECTS) $(libisrc_la_DEPENDENCIES) $(EXTRA_libisrc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libisrc_la_OBJECTS) $(libisrc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcacct.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrcpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isrctemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/isrc/isrcinit.c0000644000265600020320000000403412264261473021165 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "isrcitf.h" #include "isrcext.h" #include "isrcinit.h" SPICEdev ISRCinfo = { { "Isource", "Independent current source", &ISRCnSize, &ISRCnSize, ISRCnames, &ISRCpTSize, ISRCpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ ISRCparam, /* DEVmodParam */ NULL, /* DEVload */ ISRCload, /* DEVsetup */ NULL, /* DEVunsetup */ NULL, /* DEVpzSetup */ NULL, /* DEVtemperature*/ ISRCtemp, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ ISRCacLoad, /* DEVaccept */ ISRCaccept, /* DEVdestroy */ ISRCdestroy, /* DEVmodDelete */ ISRCmDelete, /* DEVdelete */ ISRCdelete, /* DEVsetic */ NULL, /* DEVask */ ISRCask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &ISRCiSize, /* DEVmodSize */ &ISRCmSize }; SPICEdev * get_isrc_info(void) { return &ISRCinfo; } ngspice-26/src/spicelib/devices/isrc/isrcpar.c0000644000265600020320000001660512264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "isrcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/1-f-code.h" static void copy_coeffs(ISRCinstance *here, IFvalue *value) { int n = value->v.numValue; if(here->ISRCcoeffs) tfree(here->ISRCcoeffs); here->ISRCcoeffs = TMALLOC(double, n); here->ISRCfunctionOrder = n; here->ISRCcoeffsGiven = TRUE; memcpy(here->ISRCcoeffs, value->v.vec.rVec, (size_t) n * sizeof(double)); } /* ARGSUSED */ int ISRCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { int i; ISRCinstance *here = (ISRCinstance *) inst; NG_IGNORE(select); switch(param) { case ISRC_DC: here->ISRCdcValue = value->rValue; here->ISRCdcGiven = TRUE; break; case ISRC_M: here->ISRCmValue = value->rValue; here->ISRCmGiven = TRUE; break; case ISRC_AC_MAG: here->ISRCacMag = value->rValue; here->ISRCacMGiven = TRUE; here->ISRCacGiven = TRUE; break; case ISRC_AC_PHASE: here->ISRCacPhase = value->rValue; here->ISRCacPGiven = TRUE; here->ISRCacGiven = TRUE; break; case ISRC_AC: switch(value->v.numValue) { case 2: here->ISRCacPhase = *(value->v.vec.rVec+1); here->ISRCacPGiven = TRUE; case 1: here->ISRCacMag = *(value->v.vec.rVec); here->ISRCacMGiven = TRUE; case 0: here->ISRCacGiven = TRUE; break; default: return(E_BADPARM); } break; case ISRC_PULSE: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = PULSE; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case ISRC_SINE: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = SINE; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case ISRC_EXP: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = EXP; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case ISRC_PWL: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = PWL; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); for (i=0; i<(here->ISRCfunctionOrder/2)-1; i++) { if (*(here->ISRCcoeffs+2*(i+1))<=*(here->ISRCcoeffs+2*i)) { fprintf(stderr, "Warning : current source %s", here->ISRCname); fprintf(stderr, " has non-increasing PWL time points.\n"); } } break; case ISRC_SFFM: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = SFFM; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case ISRC_AM: if(value->v.numValue < 2) return(E_BADPARM); here->ISRCfunctionType = AM; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); break; case ISRC_D_F1: here->ISRCdF1given = TRUE; here->ISRCdGiven = TRUE; switch(value->v.numValue) { case 2: here->ISRCdF1phase = *(value->v.vec.rVec+1); here->ISRCdF1mag = *(value->v.vec.rVec); break; case 1: here->ISRCdF1mag = *(value->v.vec.rVec); here->ISRCdF1phase = 0.0; break; case 0: here->ISRCdF1mag = 1.0; here->ISRCdF1phase = 0.0; break; default: return(E_BADPARM); } break; case ISRC_D_F2: here->ISRCdF2given = TRUE; here->ISRCdGiven = TRUE; switch(value->v.numValue) { case 2: here->ISRCdF2phase = *(value->v.vec.rVec+1); here->ISRCdF2mag = *(value->v.vec.rVec); break; case 1: here->ISRCdF2mag = *(value->v.vec.rVec); here->ISRCdF2phase = 0.0; break; case 0: here->ISRCdF2mag = 1.0; here->ISRCdF2phase = 0.0; break; default: return(E_BADPARM); } break; case ISRC_TRNOISE: { double NA, TS; double NALPHA = 0.0; double NAMP = 0.0; double RTSAM = 0.0; double RTSCAPT = 0.0; double RTSEMT = 0.0; here->ISRCfunctionType = TRNOISE; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); NA = here->ISRCcoeffs[0]; // input is rms value TS = here->ISRCcoeffs[1]; // time step if (here->ISRCfunctionOrder > 2) NALPHA = here->ISRCcoeffs[2]; // 1/f exponent if (here->ISRCfunctionOrder > 3 && NALPHA != 0.0) NAMP = here->ISRCcoeffs[3]; // 1/f amplitude if (here->ISRCfunctionOrder > 4) RTSAM = here->ISRCcoeffs[4]; // RTS amplitude if (here->ISRCfunctionOrder > 5 && RTSAM != 0.0) RTSCAPT = here->ISRCcoeffs[5]; // RTS trap capture time if (here->ISRCfunctionOrder > 6 && RTSAM != 0.0) RTSEMT = here->ISRCcoeffs[6]; // RTS trap emission time here->ISRCtrnoise_state = trnoise_state_init(NA, TS, NALPHA, NAMP, RTSAM, RTSCAPT, RTSEMT); } break; case ISRC_TRRANDOM: { double TD = 0.0, TS; int rndtype = 1; double PARAM1 = 1.0; double PARAM2 = 0.0; here->ISRCfunctionType = TRRANDOM; here->ISRCfuncTGiven = TRUE; copy_coeffs(here, value); rndtype = (int)here->ISRCcoeffs[0]; // type of random function TS = here->ISRCcoeffs[1]; // time step if (here->ISRCfunctionOrder > 2) TD = here->ISRCcoeffs[2]; // delay if (here->ISRCfunctionOrder > 3) PARAM1 = here->ISRCcoeffs[3]; // first parameter if (here->ISRCfunctionOrder > 4) PARAM2 = here->ISRCcoeffs[4]; // second parameter here->ISRCtrrandom_state = trrandom_state_init(rndtype, TS, TD, PARAM1, PARAM2); } break; #ifdef SHARED_MODULE case ISRC_EXTERNAL: { here->ISRCfunctionType = EXTERNAL; here->ISRCfuncTGiven = TRUE; /* no coefficients copy_coeffs(here, value); */ } break; #endif default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/isrc/isrcinit.h0000644000265600020320000000030212264261473021164 0ustar andreasadmin#ifndef _ISRCINIT_H #define _ISRCINIT_H extern IFparm ISRCpTable[ ]; extern char *ISRCnames[ ]; extern int ISRCpTSize; extern int ISRCnSize; extern int ISRCiSize; extern int ISRCmSize; #endif ngspice-26/src/spicelib/devices/isrc/isrcitf.h0000644000265600020320000000026712264261473021015 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_ISRC #define DEV_ISRC extern SPICEdev *get_isrc_info(void); #endif ngspice-26/src/spicelib/devices/ind/0000755000265600020320000000000012264261707017006 5ustar andreasadminngspice-26/src/spicelib/devices/ind/mutacld.c0000644000265600020320000000141612264261473020605 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL int MUTacLoad(GENmodel *inModel, CKTcircuit *ckt) { MUTmodel *model = (MUTmodel*)inModel; double val; MUTinstance *here; for( ; model != NULL; model = model->MUTnextModel) { for( here = model->MUTinstances;here != NULL; here = here->MUTnextInstance) { val = ckt->CKTomega * here->MUTfactor; *(here->MUTbr1br2 +1) -= val; *(here->MUTbr2br1 +1) -= val; } } return(OK); } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indload.c0000644000265600020320000001014112264261473020561 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* actually load the current inductance value into the * sparse matrix previously provided */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDload(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; double veq; double req; double m; int error; #ifdef MUTUAL MUTinstance *muthere; MUTmodel *mutmodel; int ktype; int itype; #endif /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { m = (here->INDm); if(!(ckt->CKTmode & (MODEDC|MODEINITPRED))) { if(ckt->CKTmode & MODEUIC && ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + here->INDflux) = here->INDinduct / m * here->INDinitCond; } else { *(ckt->CKTstate0 + here->INDflux) = here->INDinduct / m * *(ckt->CKTrhsOld + here->INDbrEq); } } #ifdef MUTUAL } } ktype = CKTtypelook("mutual"); mutmodel = (MUTmodel *)(ckt->CKThead[ktype]); /* loop through all the mutual inductor models */ for( ; mutmodel != NULL; mutmodel = mutmodel->MUTnextModel ) { /* loop through all the instances of the model */ for (muthere = mutmodel->MUTinstances; muthere != NULL ; muthere=muthere->MUTnextInstance) { if(!(ckt->CKTmode& (MODEDC|MODEINITPRED))) { *(ckt->CKTstate0 + muthere->MUTind1->INDflux) += muthere->MUTfactor * *(ckt->CKTrhsOld + muthere->MUTind2->INDbrEq); *(ckt->CKTstate0 + muthere->MUTind2->INDflux) += muthere->MUTfactor * *(ckt->CKTrhsOld + muthere->MUTind1->INDbrEq); } *(muthere->MUTbr1br2) -= muthere->MUTfactor*ckt->CKTag[0]; *(muthere->MUTbr2br1) -= muthere->MUTfactor*ckt->CKTag[0]; } } itype = CKTtypelook("Inductor"); model = (INDmodel *)(ckt->CKThead[itype]); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #endif /*MUTUAL*/ if(ckt->CKTmode & MODEDC) { req = 0.0; veq = 0.0; } else { double newmind; #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + here->INDflux) = *(ckt->CKTstate1 + here->INDflux); } else { #endif /*PREDICTOR*/ if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->INDflux) = *(ckt->CKTstate0 + here->INDflux); } #ifndef PREDICTOR } #endif /*PREDICTOR*/ m = (here->INDm); newmind = here->INDinduct/m; error=NIintegrate(ckt,&req,&veq,newmind,here->INDflux); if(error) return(error); } *(ckt->CKTrhs+here->INDbrEq) += veq; if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1+here->INDvolt) = *(ckt->CKTstate0+here->INDvolt); } *(here->INDposIbrptr) += 1; *(here->INDnegIbrptr) -= 1; *(here->INDibrPosptr) += 1; *(here->INDibrNegptr) -= 1; *(here->INDibrIbrptr) -= req; } } return(OK); } ngspice-26/src/spicelib/devices/ind/indsset.c0000644000265600020320000000173612264261473020632 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDsSetup(SENstruct *info, GENmodel *inModel) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { if(here->INDsenParmNo){ here->INDsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/ind/inditf.h0000644000265600020320000000031312264261473020431 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_IND #define DEV_IND SPICEdev *get_ind_info(void); SPICEdev *get_mut_info(void); #endif ngspice-26/src/spicelib/devices/ind/indmpar.c0000644000265600020320000000263312264261473020610 0ustar andreasadmin/********** Copyright 2003 Paolo Nenzi Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDmParam(int param, IFvalue *value, GENmodel *inModel) { INDmodel *mod = (INDmodel*)inModel; switch(param) { case IND_MOD_IND: mod->INDmInd = value->rValue; mod->INDmIndGiven = TRUE; break; case IND_MOD_TNOM: mod->INDtnom = value->rValue+CONSTCtoK; mod->INDtnomGiven = TRUE; break; case IND_MOD_TC1: mod->INDtempCoeff1 = value->rValue; mod->INDtc1Given = TRUE; break; case IND_MOD_TC2: mod->INDtempCoeff2 = value->rValue; mod->INDtc2Given = TRUE; break; case IND_MOD_CSECT: mod->INDcsect = value->rValue; mod->INDcsectGiven = TRUE; break; case IND_MOD_LENGTH : mod->INDlength = value->rValue; mod->INDlengthGiven = TRUE; break; case IND_MOD_NT : mod->INDmodNt = value->rValue; mod->INDmodNtGiven = TRUE; break; case IND_MOD_MU: mod->INDmu = value->rValue; mod->INDmuGiven = TRUE; break; case IND_MOD_L: /* just being reassured by the user that we are an inductor */ /* no-op */ break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/ind/indtrunc.c0000644000265600020320000000122112264261473020774 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; for( ; model!= NULL; model = model->INDnextModel) { for(here = model->INDinstances ; here != NULL ; here = here->INDnextInstance) { CKTterr(here->INDflux,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/ind/indparam.c0000644000265600020320000000314112264261473020744 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int INDparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { INDinstance *here = (INDinstance*)inst; NG_IGNORE(select); switch(param) { case IND_IND: here->INDinduct = value->rValue; if (!here->INDmGiven) here->INDm =1.0; here->INDindGiven = TRUE; break; case IND_TEMP: here->INDtemp = value->rValue + CONSTCtoK; here->INDtempGiven = TRUE; break; case IND_DTEMP: here->INDdtemp = value->rValue; here->INDdtempGiven = TRUE; break; case IND_M: here->INDm = value->rValue; here->INDmGiven = TRUE; break; case IND_TC1: here->INDtc1 = value->rValue; here->INDtc1Given = TRUE; break; case IND_TC2: here->INDtc2 = value->rValue; here->INDtc2Given = TRUE; break; case IND_SCALE: here->INDscale = value->rValue; here->INDscaleGiven = TRUE; break; case IND_NT: here->INDnt = value->rValue; here->INDntGiven = TRUE; break; case IND_IC: here->INDinitCond = value->rValue; here->INDicGiven = TRUE; break; case IND_IND_SENS: here->INDsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/ind/mutask.c0000644000265600020320000000647312264261473020470 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL /*ARGSUSED*/ int MUTask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { MUTinstance *here = (MUTinstance*)inst; double vr; double vi; double sr; double si; double vm; switch(which) { case MUT_COEFF: value->rValue = here->MUTfactor; return(OK); case MUT_IND1: value->uValue = here->MUTindName1; return(OK); case MUT_IND2: value->uValue = here->MUTindName2; return(OK); case MUT_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->MUTsenParmNo); } return(OK); case MUT_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MUTsenParmNo); } return(OK); case MUT_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MUTsenParmNo); } return(OK); case MUT_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MUTsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MUTsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case MUT_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MUTsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MUTsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case MUT_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->MUTsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->MUTsenParmNo); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indsprt.c0000644000265600020320000000262712264261473020644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all * the inductors in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" void INDsPrint(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; printf("INDUCTORS----------\n"); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { printf("Model name:%s\n",model->INDmodName); /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { printf(" Instance name:%s\n",here->INDname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->INDposNode),CKTnodName(ckt,here->INDnegNode)); printf(" Branch Equation: %s\n",CKTnodName(ckt,here->INDbrEq)); printf(" Inductance: %g ",here->INDinduct); printf(here->INDindGiven ? "(specified)\n" : "(default)\n"); printf(" INDsenParmNo:%d\n",here->INDsenParmNo); } } } ngspice-26/src/spicelib/devices/ind/indacld.c0000644000265600020320000000164112264261473020552 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDacLoad(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; double val; double m; INDinstance *here; for( ; model != NULL; model = model->INDnextModel) { for( here = model->INDinstances;here != NULL; here = here->INDnextInstance) { m = (here->INDm); val = ckt->CKTomega * here->INDinduct / m; *(here->INDposIbrptr) += 1; *(here->INDnegIbrptr) -= 1; *(here->INDibrPosptr) += 1; *(here->INDibrNegptr) -= 1; *(here->INDibrIbrptr +1) -= val; } } return(OK); } ngspice-26/src/spicelib/devices/ind/indext.h0000644000265600020320000000323412264261473020454 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef _INDEXT_H #define _INDEXT_H extern int INDacLoad(GENmodel*,CKTcircuit*); extern int INDask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int INDmAsk(CKTcircuit*, GENmodel*, int, IFvalue*); extern int INDdelete(GENmodel*,IFuid,GENinstance**); extern void INDdestroy(GENmodel**); extern int INDload(GENmodel*,CKTcircuit*); extern int INDmDelete(GENmodel**,IFuid,GENmodel*); extern int INDmParam(int, IFvalue*, GENmodel*); extern int INDparam(int,IFvalue*,GENinstance*,IFvalue*); extern int INDpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int INDsAcLoad(GENmodel*,CKTcircuit*); extern int INDsLoad(GENmodel*,CKTcircuit*); extern void INDsPrint(GENmodel*,CKTcircuit*); extern int INDsSetup(SENstruct*,GENmodel*); extern int INDsUpdate(GENmodel*,CKTcircuit*); extern int INDsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int INDunsetup(GENmodel*,CKTcircuit*); extern int INDtemp(GENmodel*, CKTcircuit*); extern int INDtrunc(GENmodel*,CKTcircuit*,double*); extern int MUTacLoad(GENmodel*,CKTcircuit*); extern int MUTask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int MUTdelete(GENmodel*,IFuid,GENinstance**); extern void MUTdestroy(GENmodel**); extern int MUTmDelete(GENmodel**,IFuid,GENmodel*); extern int MUTparam(int,IFvalue*,GENinstance*,IFvalue*); extern int MUTpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern void MUTsPrint(GENmodel*,CKTcircuit*); extern int MUTsSetup(SENstruct*,GENmodel*); extern int MUTsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int MUTtemp(GENmodel *inModel, CKTcircuit *ckt); #endif ngspice-26/src/spicelib/devices/ind/mutparam.c0000644000265600020320000000167712264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL /* ARGSUSED */ int MUTparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { MUTinstance *here = (MUTinstance*)inst; NG_IGNORE(select); switch(param) { case MUT_COEFF: here->MUTcoupling = value->rValue; here->MUTindGiven = TRUE; break; case MUT_IND1: here->MUTindName1 = value->uValue; break; case MUT_IND2: here->MUTindName2 = value->uValue; break; case MUT_COEFF_SENS: here->MUTsenParmNo = value->iValue; break; default: return(E_BADPARM); } return(OK); } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indask.c0000644000265600020320000001154712264261473020433 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int INDask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { INDinstance *here = (INDinstance*)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case IND_FLUX: value->rValue = *(ckt->CKTstate0+here->INDflux); return(OK); case IND_VOLT: value->rValue = *(ckt->CKTstate0+here->INDvolt); return(OK); case IND_IND: value->rValue = here->INDinduct; return(OK); case IND_IC: value->rValue = here->INDinitCond; return(OK); case IND_TEMP: value->rValue = here->INDtemp - CONSTCtoK; return(OK); case IND_DTEMP: value->rValue = here->INDdtemp; return(OK); case IND_M: value->rValue = here->INDm; return(OK); case IND_TC1: value->rValue = here->INDtc1; return(OK); case IND_TC2: value->rValue = here->INDtc2; return(OK); case IND_SCALE: value->rValue = here->INDscale; return(OK); case IND_NT: value->rValue = here->INDnt; return(OK); case IND_CURRENT : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "INDask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = *(ckt->CKTrhsOld + here->INDbrEq); } return(OK); case IND_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "INDask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTrhsOld + here->INDbrEq) * *(ckt->CKTstate0+here->INDvolt); } return(OK); case IND_QUEST_SENS_DC: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1]+ here->INDsenParmNo); } return(OK); case IND_QUEST_SENS_REAL: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->INDsenParmNo); } return(OK); case IND_QUEST_SENS_IMAG: if(ckt->CKTsenInfo){ value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->INDsenParmNo); } return(OK); case IND_QUEST_SENS_MAG: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->INDsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->INDsenParmNo); value->rValue = (vr * sr + vi * si)/vm; } return(OK); case IND_QUEST_SENS_PH: if(ckt->CKTsenInfo){ vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if(vm == 0){ value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->INDsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->INDsenParmNo); value->rValue = (vr * si - vi * sr)/vm; } return(OK); case IND_QUEST_SENS_CPLX: if(ckt->CKTsenInfo){ value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1]+ here->INDsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1]+ here->INDsenParmNo); } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/ind/indinit.c0000644000265600020320000000765612264261473020626 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "inditf.h" #include "indext.h" #include "indinit.h" SPICEdev INDinfo = { { "Inductor", "Fixed inductor", &INDnSize, &INDnSize, INDnames, &INDpTSize, INDpTable, &INDmPTSize, INDmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ INDparam, /* DEVmodParam */ INDmParam, /* DEVload */ INDload, /* DEVsetup */ INDsetup, /* DEVunsetup */ INDunsetup, /* DEVpzSetup */ INDsetup, /* DEVtemperature*/ INDtemp, /* DEVtrunc */ INDtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ INDacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ INDdestroy, /* DEVmodDelete */ INDmDelete, /* DEVdelete */ INDdelete, /* DEVsetic */ NULL, /* DEVask */ INDask, /* DEVmodAsk */ INDmAsk, /* DEVpzLoad */ INDpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ INDsSetup, /* DEVsenLoad */ INDsLoad, /* DEVsenUpdate */ INDsUpdate, /* DEVsenAcLoad */ INDsAcLoad, /* DEVsenPrint */ INDsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &INDiSize, /* DEVmodSize */ &INDmSize }; SPICEdev MUTinfo = { { "mutual", "Mutual inductors", 0, /* term count */ 0, /* term count */ NULL, &MUTpTSize, MUTpTable, 0, NULL, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ MUTparam, /* DEVmodParam */ NULL, /* DEVload */ NULL,/* load handled by INDload */ /* DEVsetup */ MUTsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ MUTsetup, /* DEVtemperature*/ MUTtemp, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ MUTacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ MUTdestroy, /* DEVmodDelete */ MUTmDelete, /* DEVdelete */ MUTdelete, /* DEVsetic */ NULL, /* DEVask */ MUTask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ MUTpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ MUTsSetup, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ MUTsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif &MUTiSize, &MUTmSize }; SPICEdev * get_ind_info(void) { return &INDinfo; } SPICEdev * get_mut_info(void) { return &MUTinfo; } ngspice-26/src/spicelib/devices/ind/indsetup.c0000644000265600020320000000674412264261473021020 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the inductor structure with those pointers needed later * for fast matrix loading */ { INDmodel *model = (INDmodel*)inModel; INDinstance *here; int error; CKTnode *tmp; /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* Default Value Processing for Model Parameters */ if (!model->INDmIndGiven) { model->INDmInd = 0.0; } if (!model->INDtnomGiven) { model->INDtnom = ckt->CKTnomTemp; } if (!model->INDtc1Given) { model->INDtempCoeff1 = 0.0; } if (!model->INDtc2Given) { model->INDtempCoeff2 = 0.0; } if (!model->INDcsectGiven){ model->INDcsect = 0.0; } if (!model->INDlengthGiven) { model->INDlength = 0.0; } if (!model->INDmodNtGiven) { model->INDmodNt = 0.0; } if (!model->INDmuGiven) { model->INDmu = 0.0; } /* precompute specific inductance (one turn) */ if((model->INDlengthGiven) && (model->INDlength > 0.0)) { if (model->INDmuGiven) model->INDspecInd = (model->INDmu * CONSTmuZero * model->INDcsect * model->INDcsect) / model->INDlength; else model->INDspecInd = (CONSTmuZero * model->INDcsect * model->INDcsect ) / model->INDlength; } else { model->INDspecInd = 0.0; } if (!model->INDmIndGiven) model->INDmInd = model->INDmodNt * model->INDmodNt * model->INDspecInd; /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { here->INDflux = *states; *states += 2 ; if(ckt->CKTsenInfo && (ckt->CKTsenInfo->SENmode & TRANSEN) ){ *states += 2 * (ckt->CKTsenInfo->SENparms); } if(here->INDbrEq == 0) { error = CKTmkCur(ckt,&tmp,here->INDname,"branch"); if(error) return(error); here->INDbrEq = tmp->number; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(INDposIbrptr,INDposNode,INDbrEq); TSTALLOC(INDnegIbrptr,INDnegNode,INDbrEq); TSTALLOC(INDibrNegptr,INDbrEq,INDnegNode); TSTALLOC(INDibrPosptr,INDbrEq,INDposNode); TSTALLOC(INDibrIbrptr,INDbrEq,INDbrEq); } } return(OK); } int INDunsetup(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model; INDinstance *here; for (model = (INDmodel *)inModel; model != NULL; model = model->INDnextModel) { for (here = model->INDinstances; here != NULL; here=here->INDnextInstance) { if (here->INDbrEq) { CKTdltNNum(ckt, here->INDbrEq); here->INDbrEq = 0; } } } return OK; } ngspice-26/src/spicelib/devices/ind/indinit.h0000644000265600020320000000051412264261473020615 0ustar andreasadmin#ifndef _INDINIT_H #define _INDINIT_H extern IFparm INDpTable[ ]; extern IFparm INDmPTable[ ]; extern char *INDnames[ ]; extern int INDpTSize; extern int INDmPTSize; extern int INDnSize; extern int INDiSize; extern int INDmSize; extern IFparm MUTpTable[ ]; extern int MUTpTSize; extern int MUTiSize; extern int MUTmSize; #endif ngspice-26/src/spicelib/devices/ind/mutdest.c0000644000265600020320000000143712264261473020644 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/suffix.h" #ifdef MUTUAL void MUTdestroy(GENmodel **inModel) { MUTmodel **model = (MUTmodel**)inModel; MUTinstance *here; MUTinstance *prev = NULL; MUTmodel *mod = *model; MUTmodel *oldmod = NULL; for( ; mod ; mod = mod->MUTnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->MUTinstances ; here ; here = here->MUTnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indpzld.c0000644000265600020320000000175712264261473020630 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "inddefs.h" #include "ngspice/suffix.h" /* ARGSUSED */ int INDpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { INDmodel *model = (INDmodel*)inModel; double val; INDinstance *here; NG_IGNORE(ckt); for( ; model != NULL; model = model->INDnextModel) { for( here = model->INDinstances;here != NULL; here = here->INDnextInstance) { val = here->INDinduct; *(here->INDposIbrptr) += 1; *(here->INDnegIbrptr) -= 1; *(here->INDibrPosptr) += 1; *(here->INDibrNegptr) -= 1; *(here->INDibrIbrptr ) -= val * s->real; *(here->INDibrIbrptr +1) -= val * s->imag; } } return(OK); } ngspice-26/src/spicelib/devices/ind/muttemp.c0000644000265600020320000000170612264261473020651 0ustar andreasadmin/********** Copyright 2003 Paolo Nenzi Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int MUTtemp(GENmodel *inModel, CKTcircuit *ckt) { MUTmodel *model = (MUTmodel*)inModel; MUTinstance *here; double ind1, ind2; NG_IGNORE(ckt); /* loop through all the inductor models */ for( ; model != NULL; model = model->MUTnextModel ) { /* loop through all the instances of the model */ for (here = model->MUTinstances; here != NULL ; here=here->MUTnextInstance) { /* Value Processing for mutual inductors */ ind1 = here->MUTind1->INDinduct; ind2 = here->MUTind2->INDinduct; /* _______ * M = k * \/l1 * l2 */ here->MUTfactor = here->MUTcoupling * sqrt(ind1 * ind2); } } return(OK); } ngspice-26/src/spicelib/devices/ind/indsload.c0000644000265600020320000001146112264261473020752 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDsLoad(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; int iparmno; double cind; double Osxp; double tag0; double tag1; SENstruct *info; #ifdef MUTUAL MUTinstance *muthere; MUTmodel *mutmodel; double cind1; double cind2; double rootl1; double rootl2; int ktype; int itype; int IND1_brEq; int IND2_brEq; #endif info = ckt->CKTsenInfo; if((info->SENmode == DCSEN)||(ckt->CKTmode&MODETRANOP)) return( OK ); if((info->SENmode == TRANSEN) && (ckt->CKTmode & MODEINITTRAN)) return(OK); #ifdef SENSDEBUG fprintf(stdout,"INDsenLoad\n"); fprintf(stdout,"time = %.5e\n",ckt->CKTtime); #endif /* SENSDEBUG */ tag0 = ckt->CKTag[0]; tag1 = ckt->CKTag[1]; if(ckt->CKTorder == 1){ tag1 = 0; } /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #ifdef MUTUAL } } ktype = CKTtypelook("mutual"); mutmodel = (MUTmodel *)(ckt->CKThead[ktype]); /* loop through all the mutual inductor models */ for( ; mutmodel != NULL; mutmodel = mutmodel->MUTnextModel ) { /* loop through all the instances of the model */ for (muthere = mutmodel->MUTinstances; muthere != NULL ; muthere=muthere->MUTnextInstance) { if(muthere->MUTsenParmNo || muthere->MUTind1->INDsenParmNo || muthere->MUTind2->INDsenParmNo){ IND1_brEq = muthere->MUTind1->INDbrEq; IND2_brEq = muthere->MUTind2->INDbrEq; cind1 = *(ckt->CKTrhsOld + IND1_brEq); cind2 = *(ckt->CKTrhsOld + IND2_brEq); rootl1 = sqrt( muthere->MUTind1->INDinduct ); rootl2 = sqrt( muthere->MUTind2->INDinduct ); if(muthere->MUTsenParmNo){ *(info->SEN_RHS[IND1_brEq] + muthere->MUTsenParmNo) += tag0*cind2*rootl2*rootl1; *(info->SEN_RHS[IND2_brEq] + muthere->MUTsenParmNo) += tag0*cind1*rootl2*rootl1; } if(muthere->MUTind1->INDsenParmNo){ *(info->SEN_RHS[IND1_brEq] + muthere->MUTind1->INDsenParmNo) += tag0*cind2*muthere->MUTcoupling*rootl2 / (2*rootl1); *(info->SEN_RHS[IND2_brEq] + muthere->MUTind1->INDsenParmNo) += tag0*cind1*muthere->MUTcoupling*rootl2 / (2*rootl1); } if(muthere->MUTind2->INDsenParmNo){ *(info->SEN_RHS[IND1_brEq] + muthere->MUTind2->INDsenParmNo) += tag0*cind2*muthere->MUTcoupling*rootl1 / (2*rootl2); *(info->SEN_RHS[IND2_brEq] + muthere->MUTind2->INDsenParmNo) += tag0*cind1*muthere->MUTcoupling*rootl1 / (2*rootl2); } } #ifdef SENSDEBUG fprintf(stdout,"cind1 = %.5e,cind2 = %.5e\n",cind1,cind2); #endif /* SENSDEBUG */ } } itype = CKTtypelook("Inductor"); model = (INDmodel *)(ckt->CKThead[itype]); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #endif /* MUTUAL */ cind = *(ckt->CKTrhsOld + here->INDbrEq); #ifdef SENSDEBUG fprintf(stdout,"\n cind=%.5e\n",cind); fprintf(stdout,"\n tag0=%.5e,tag1=%.5e\n",tag0,tag1); #endif /* SENSDEBUG */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ Osxp = tag0 * *(ckt->CKTstate1 + here->INDsensxp + 2*(iparmno - 1)) + tag1 * *(ckt->CKTstate1 + here->INDsensxp + 2*(iparmno - 1) + 1); if(iparmno == here->INDsenParmNo) Osxp = Osxp - tag0 * cind; #ifdef SENSDEBUG fprintf(stdout,"\n Osxp=%.5e\n",Osxp); #endif /* SENSDEBUG */ *(info->SEN_RHS[here->INDbrEq] + iparmno) -= Osxp; } } } return(OK); } ngspice-26/src/spicelib/devices/ind/indmask.c0000644000265600020320000000230612264261473020601 0ustar andreasadmin/********** Copyright 2003 Paolo Nenzi Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/ifsim.h" #include "ngspice/suffix.h" /* ARGSUSED */ int INDmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { INDmodel *here = (INDmodel*)inst; NG_IGNORE(ckt); switch(which) { case IND_MOD_IND: value->rValue = here->INDmInd; return(OK); case IND_MOD_TNOM: value->rValue = here->INDtnom-CONSTCtoK; return(OK); case IND_MOD_TC1: value->rValue = here->INDtempCoeff1; return(OK); case IND_MOD_TC2: value->rValue = here->INDtempCoeff2; return(OK); case IND_MOD_CSECT: value->rValue = here->INDcsect; return(OK); case IND_MOD_LENGTH: value->rValue = here->INDlength; return(OK); case IND_MOD_NT: value->rValue = here->INDmodNt; return(OK); case IND_MOD_MU: value->rValue = here->INDmu; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/ind/mutmdel.c0000644000265600020320000000201012264261473020612 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL int MUTmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { MUTmodel **model = (MUTmodel**)inModel; MUTmodel *modfast = (MUTmodel*)kill; MUTinstance *here; MUTinstance *prev = NULL; MUTmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->MUTnextModel)) { if( (*model)->MUTmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->MUTnextModel; /* cut deleted device out of list */ for(here = (*model)->MUTinstances ; here ; here = here->MUTnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indtemp.c0000644000265600020320000000444712264261473020623 0ustar andreasadmin/********** Copyright 2003 Paolo Nenzi Author: 2003 Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int INDtemp(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; double difference; double factor; double tc1, tc2; /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { /* Default Value Processing for Inductor Instance */ if(!here->INDtempGiven) { here->INDtemp = ckt->CKTtemp; if(!here->INDdtempGiven) here->INDdtemp = 0.0; } else { /* INDtempGiven */ here->INDdtemp = 0.0; if (here->INDdtempGiven) printf("%s: Instance temperature specified, dtemp ignored\n", here->INDname); } if (!here->INDscaleGiven) here->INDscale = 1.0; if (!here->INDmGiven) here->INDm = 1.0; if (!here->INDntGiven) here->INDnt = 0.0; if (!here->INDindGiven) { /* No instance inductance given */ if (here->INDntGiven) here->INDinduct = model->INDspecInd * here->INDnt * here->INDnt; else here->INDinduct = model->INDmInd; } difference = (here->INDtemp + here->INDdtemp) - model->INDtnom; /* instance parameters tc1 and tc2 will override model parameters tc1 and tc2 */ if (here->INDtc1Given) tc1 = here->INDtc1; /* instance */ else tc1 = model->INDtempCoeff1; /* model */ if (here->INDtc2Given) tc2 = here->INDtc2; else tc2 = model->INDtempCoeff2; factor = 1.0 + tc1*difference + tc2*difference*difference; here->INDinduct = here->INDinduct * factor * here->INDscale; here->INDinduct = here->INDinduct / here->INDm; } } return(OK); } ngspice-26/src/spicelib/devices/ind/mutdel.c0000644000265600020320000000160012264261473020441 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL int MUTdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { MUTmodel *model = (MUTmodel*)inModel; MUTinstance **fast = (MUTinstance**)kill; MUTinstance **prev = NULL; MUTinstance *here; for( ; model ; model = model->MUTnextModel) { prev = &(model->MUTinstances); for(here = *prev; here ; here = *prev) { if(here->MUTname == name || (fast && here==*fast) ) { *prev= here->MUTnextInstance; FREE(here); return(OK); } prev = &(here->MUTnextInstance); } } return(E_NODEV); } #endif /*MUTUAL*/ ngspice-26/src/spicelib/devices/ind/mutpzld.c0000644000265600020320000000170412264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "inddefs.h" #include "ngspice/suffix.h" #ifdef MUTUAL /* ARGSUSED */ int MUTpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { MUTmodel *model = (MUTmodel*)inModel; double val; MUTinstance *here; NG_IGNORE(ckt); for( ; model != NULL; model = model->MUTnextModel) { for( here = model->MUTinstances;here != NULL; here = here->MUTnextInstance) { val = here->MUTfactor; *(here->MUTbr1br2 ) -= val * s->real; *(here->MUTbr1br2 +1) -= val * s->imag; *(here->MUTbr2br1 ) -= val * s->real; *(here->MUTbr2br1 +1) -= val * s->imag; } } return(OK); } #endif /*MUTUAL*/ ngspice-26/src/spicelib/devices/ind/inddel.c0000644000265600020320000000154012264261473020411 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDdelete(GENmodel *inModel, IFuid name, GENinstance **kill) { INDmodel *model = (INDmodel*)inModel; INDinstance **fast = (INDinstance**)kill; INDinstance **prev = NULL; INDinstance *here; for( ; model ; model = model->INDnextModel) { prev = &(model->INDinstances); for(here = *prev; here ; here = *prev) { if(here->INDname == name || (fast && here==*fast) ) { *prev= here->INDnextInstance; FREE(here); return(OK); } prev = &(here->INDnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/ind/mutsetup.c0000644000265600020320000000470012264261473021041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* load the inductor structure with those pointers needed later * for fast matrix loading */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL /*ARGSUSED*/ int MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { MUTmodel *model = (MUTmodel*)inModel; MUTinstance *here; int ktype; NG_IGNORE(states); /* loop through all the inductor models */ for( ; model != NULL; model = model->MUTnextModel ) { /* loop through all the instances of the model */ for (here = model->MUTinstances; here != NULL ; here=here->MUTnextInstance) { ktype = CKTtypelook("Inductor"); if(ktype <= 0) { SPfrontEnd->IFerror (ERR_PANIC, "mutual inductor, but inductors not available!", NULL); return(E_INTERN); } if (!here->MUTind1) here->MUTind1 = (INDinstance *) CKTfndDev(ckt, here->MUTindName1); if (!here->MUTind1) { IFuid namarray[2]; namarray[0]=here->MUTname; namarray[1]=here->MUTindName1; SPfrontEnd->IFerror (ERR_WARNING, "%s: coupling to non-existant inductor %s.", namarray); } if (!here->MUTind2) here->MUTind2 = (INDinstance *) CKTfndDev(ckt, here->MUTindName2); if (!here->MUTind2) { IFuid namarray[2]; namarray[0]=here->MUTname; namarray[1]=here->MUTindName2; SPfrontEnd->IFerror (ERR_WARNING, "%s: coupling to non-existant inductor %s.", namarray); } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(MUTbr1br2,MUTind1->INDbrEq,MUTind2->INDbrEq); TSTALLOC(MUTbr2br1,MUTind2->INDbrEq,MUTind1->INDbrEq); } } return(OK); } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indsacl.c0000644000265600020320000001426112264261473020573 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* actually load the current ac sensitivity * information into the array previously provided */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDsAcLoad(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; double cind,icind,val,ival; #ifdef MUTUAL MUTinstance *muthere; MUTmodel *mutmodel; double cind1; double icind1; double cind2; double icind2; double val11; double ival11; double val12; double ival12; double val13; double ival13; double val21; double ival21; double val22; double ival22; double val23; double ival23; double rootl1; double rootl2; double w; double k1; double k2; int ktype; int itype; #endif SENstruct *info; info = ckt->CKTsenInfo; /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #ifdef MUTUAL } } ktype = CKTtypelook("mutual"); mutmodel = (MUTmodel *)(ckt->CKThead[ktype]); /* loop through all the mutual inductor models */ for( ; mutmodel != NULL; mutmodel = mutmodel->MUTnextModel ) { /* loop through all the instances of the model */ for (muthere = mutmodel->MUTinstances; muthere != NULL ; muthere=muthere->MUTnextInstance) { if(muthere->MUTsenParmNo || muthere->MUTind1->INDsenParmNo || muthere->MUTind2->INDsenParmNo){ cind1 = *(ckt->CKTrhsOld + muthere->MUTind1->INDbrEq); icind1 = *(ckt->CKTirhsOld + muthere->MUTind1->INDbrEq); cind2 = *(ckt->CKTrhsOld + muthere->MUTind2->INDbrEq); icind2 = *(ckt->CKTirhsOld + muthere->MUTind2->INDbrEq); rootl1 = sqrt(muthere->MUTind1->INDinduct) ; rootl2 = sqrt(muthere->MUTind2->INDinduct) ; k1 = 0.5 * muthere->MUTcoupling * rootl2 / rootl1 ; k2 = 0.5 * muthere->MUTcoupling * rootl1 / rootl2 ; w = ckt->CKTomega ; /* load the RHS matrix */ if(muthere->MUTind1->INDsenParmNo){ val11 = - (w * (k1 * icind2)); ival11 = w * (k1 * cind2); val21 = - ( w * k1 * icind1) ; ival21 = w * k1 * cind1 ; *(info->SEN_RHS[muthere->MUTind1->INDbrEq] + muthere->MUTind1->INDsenParmNo) += val11; *(info->SEN_iRHS[muthere->MUTind1->INDbrEq] + muthere->MUTind1->INDsenParmNo) += ival11; *(info->SEN_RHS[muthere->MUTind2->INDbrEq] + muthere->MUTind1->INDsenParmNo) += val21; *(info->SEN_iRHS[muthere->MUTind2->INDbrEq] + muthere->MUTind1->INDsenParmNo) += ival21; } if(muthere->MUTind2->INDsenParmNo){ val12 = -( w * k2 * icind2) ; ival12 = w * k2 * cind2 ; val22 = - (w * ( k2 * icind1)); ival22 = w * ( k2 * cind1); *(info->SEN_RHS[muthere->MUTind1->INDbrEq] + muthere->MUTind2->INDsenParmNo) += val12; *(info->SEN_iRHS[muthere->MUTind1->INDbrEq] + muthere->MUTind2->INDsenParmNo) += ival12; *(info->SEN_RHS[muthere->MUTind2->INDbrEq] + muthere->MUTind2->INDsenParmNo) += val22; *(info->SEN_iRHS[muthere->MUTind2->INDbrEq] + muthere->MUTind2->INDsenParmNo) += ival22; } if(muthere->MUTsenParmNo){ val13 = - w * rootl1 * rootl2 * icind2; ival13 = w * rootl1 * rootl2 * cind2; val23 = - (w * rootl1 * rootl2 * icind1); ival23 = w * rootl1 * rootl2 * cind1; *(info->SEN_RHS[muthere->MUTind1->INDbrEq] + muthere->MUTsenParmNo) += val13; *(info->SEN_iRHS[muthere->MUTind1->INDbrEq] + muthere->MUTsenParmNo) += ival13; *(info->SEN_RHS[muthere->MUTind2->INDbrEq] + muthere->MUTsenParmNo) += val23; *(info->SEN_iRHS[muthere->MUTind2->INDbrEq] + muthere->MUTsenParmNo) += ival23; } } } } itype = CKTtypelook("Inductor"); model = (INDmodel *)(ckt->CKThead[itype]); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #endif /* MUTUAL */ if(here->INDsenParmNo){ cind = *(ckt->CKTrhsOld + here->INDbrEq); icind = *(ckt->CKTirhsOld + here->INDbrEq); val = icind * ckt->CKTomega ; ival = cind * ckt->CKTomega ; #ifdef SENSDEBUG fprintf(stdout,"cind = %.5e,icind = %.5e\n",cind,icind); fprintf(stdout,"val = %.5e,ival = %.5e\n",val,ival); fprintf(stdout,"brEq = %.5e,senparmno = %.5e\n", here->INDbrEq,here->INDsenParmNo); #endif /* SENSDEBUG */ /* load the RHS matrix */ *(info->SEN_RHS[here->INDbrEq] + here->INDsenParmNo) -= val; *(info->SEN_iRHS[here->INDbrEq] + here->INDsenParmNo) += ival; } } } return(OK); } ngspice-26/src/spicelib/devices/ind/Makefile.am0000644000265600020320000000124712264261473021046 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libind.la libind_la_SOURCES = \ ind.c \ indacld.c \ indask.c \ inddefs.h \ inddel.c \ inddest.c \ indext.h \ indinit.c \ indinit.h \ inditf.h \ indload.c \ indmask.c \ indmdel.c \ indmpar.c \ indparam.c \ indpzld.c \ indsacl.c \ indsetup.c \ indsload.c \ indsprt.c \ indsset.c \ indsupd.c \ indtemp.c \ indtrunc.c \ mutacld.c \ mutask.c \ mutdel.c \ mutdest.c \ mutmdel.c \ mutparam.c \ mutpzld.c \ mutsetup.c \ mutsprt.c \ mutsset.c \ muttemp.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/ind/Makefile.in0000644000265600020320000004534612264261537021070 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/ind DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libind_la_LIBADD = am_libind_la_OBJECTS = ind.lo indacld.lo indask.lo inddel.lo \ inddest.lo indinit.lo indload.lo indmask.lo indmdel.lo \ indmpar.lo indparam.lo indpzld.lo indsacl.lo indsetup.lo \ indsload.lo indsprt.lo indsset.lo indsupd.lo indtemp.lo \ indtrunc.lo mutacld.lo mutask.lo mutdel.lo mutdest.lo \ mutmdel.lo mutparam.lo mutpzld.lo mutsetup.lo mutsprt.lo \ mutsset.lo muttemp.lo libind_la_OBJECTS = $(am_libind_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libind_la_SOURCES) DIST_SOURCES = $(libind_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libind.la libind_la_SOURCES = \ ind.c \ indacld.c \ indask.c \ inddefs.h \ inddel.c \ inddest.c \ indext.h \ indinit.c \ indinit.h \ inditf.h \ indload.c \ indmask.c \ indmdel.c \ indmpar.c \ indparam.c \ indpzld.c \ indsacl.c \ indsetup.c \ indsload.c \ indsprt.c \ indsset.c \ indsupd.c \ indtemp.c \ indtrunc.c \ mutacld.c \ mutask.c \ mutdel.c \ mutdest.c \ mutmdel.c \ mutparam.c \ mutpzld.c \ mutsetup.c \ mutsprt.c \ mutsset.c \ muttemp.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/ind/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/ind/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libind.la: $(libind_la_OBJECTS) $(libind_la_DEPENDENCIES) $(EXTRA_libind_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libind_la_OBJECTS) $(libind_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ind.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inddel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inddest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indsupd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indtemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/indtrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutsprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mutsset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/muttemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/ind/indmdel.c0000644000265600020320000000174612264261473020576 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { INDmodel **model = (INDmodel**)inModel; INDmodel *modfast = (INDmodel*)kill; INDinstance *here; INDinstance *prev = NULL; INDmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->INDnextModel)) { if( (*model)->INDmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->INDnextModel; /* cut deleted device out of list */ for(here = (*model)->INDinstances ; here ; here = here->INDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/ind/mutsprt.c0000644000265600020320000000275512264261473020701 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all * the mutual inductors in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL /* ARGSUSED */ void MUTsPrint(GENmodel *inModel, CKTcircuit* ckt) { MUTmodel *model = (MUTmodel*)inModel; MUTinstance *here; NG_IGNORE(ckt); printf("MUTUAL INDUCTORS-----------------\n"); /* loop through all the inductor models */ for( ; model != NULL; model = model->MUTnextModel ) { printf("Model name:%s\n",model->MUTmodName); /* loop through all the instances of the model */ for (here = model->MUTinstances; here != NULL ; here=here->MUTnextInstance) { printf(" Instance name:%s\n",here->MUTname); printf(" Mutual Inductance: %g ",here->MUTcoupling); printf(here->MUTindGiven ? "(specified)\n" : "(default)\n"); printf(" coupling factor: %g \n",here->MUTfactor); printf(" inductor 1 name: %s \n",here->MUTindName1); printf(" inductor 2 name: %s \n",here->MUTindName2); printf(" MUTsenParmNo:%d\n",here->MUTsenParmNo); } } } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/ind/indsupd.c0000644000265600020320000001166112264261473020625 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* update the charge sensitivities and their derivatives */ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int INDsUpdate(GENmodel *inModel, CKTcircuit *ckt) { INDmodel *model = (INDmodel*)inModel; INDinstance *here; double cind; double sxp; double s1; double s2; double s; int iparmno; double dummy1; double dummy2; SENstruct *info; #ifdef MUTUAL MUTinstance *muthere; MUTmodel *mutmodel; double sxp1; double sxp2; double cind1,cind2; double rootl1,rootl2; int ktype; int itype; #endif info = ckt->CKTsenInfo; if(ckt->CKTmode & MODEINITTRAN) return(OK); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ cind = *(ckt->CKTrhsOld + here->INDbrEq); s = *(info->SEN_Sap[here->INDbrEq] + iparmno); sxp = here->INDinduct * s; #ifdef SENSDEBUG printf("iparmno = %d,s=%.5e,cind = %.5e\n",iparmno,s,cind); printf("sxp(before mut) = %.5e\n",sxp); #endif /* SENSDEBUG */ if(iparmno == here->INDsenParmNo) sxp += cind; *(ckt->CKTstate0 + here->INDsensxp + 2 * (iparmno - 1)) = sxp; } #ifdef MUTUAL } } ktype = CKTtypelook("mutual"); mutmodel = (MUTmodel *)(ckt->CKThead[ktype]); /* loop through all the mutual inductor models */ for( ; mutmodel != NULL; mutmodel = mutmodel->MUTnextModel ) { /* loop through all the instances of the model */ for (muthere = mutmodel->MUTinstances; muthere != NULL ; muthere=muthere->MUTnextInstance) { cind1 = *(ckt->CKTrhsOld + muthere->MUTind1->INDbrEq); cind2 = *(ckt->CKTrhsOld + muthere->MUTind2->INDbrEq); rootl1 = sqrt( muthere->MUTind1->INDinduct ); rootl2 = sqrt( muthere->MUTind2->INDinduct ); for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ s1 = *(info->SEN_Sap[muthere->MUTind1->INDbrEq] + iparmno); s2 = *(info->SEN_Sap[muthere->MUTind2->INDbrEq] + iparmno); sxp2 = muthere->MUTcoupling*rootl1*rootl2 * s1; sxp1 = muthere->MUTcoupling*rootl1*rootl2 * s2; if(iparmno == muthere->MUTsenParmNo){ sxp1 += cind2 * rootl1 * rootl2; sxp2 += cind1 * rootl1 * rootl2; } if(iparmno == muthere->MUTind1->INDsenParmNo){ sxp1 += cind2 * muthere->MUTcoupling * rootl2 /(2 * rootl1); sxp2 += cind1 * muthere->MUTcoupling * rootl2 /(2 * rootl1); } if(iparmno == muthere->MUTind2->INDsenParmNo){ sxp1 += cind2 * muthere->MUTcoupling * rootl1 /(2 * rootl2); sxp2 += cind1 * muthere->MUTcoupling * rootl1 /(2 * rootl2); } *(ckt->CKTstate0 + muthere->MUTind1->INDsensxp + 2 * (iparmno - 1)) += sxp1; *(ckt->CKTstate0 + muthere->MUTind2->INDsensxp + 2 * (iparmno - 1)) += sxp2; #ifdef SENSDEBUG printf("iparmno = %d\n",iparmno); printf("sxp1 = %.5e,sxp2 = %.5e\n",sxp1,sxp2); #endif /* SENSDEBUG */ } } } itype = CKTtypelook("Inductor"); model = (INDmodel *)(ckt->CKThead[itype]); /* loop through all the inductor models */ for( ; model != NULL; model = model->INDnextModel ) { /* loop through all the instances of the model */ for (here = model->INDinstances; here != NULL ; here=here->INDnextInstance) { #endif /* MUTUAL */ for(iparmno = 1;iparmno<=info->SENparms;iparmno++){ if(ckt->CKTmode&MODETRANOP){ *(ckt->CKTstate0 + here->INDsensxp + 2 * (iparmno - 1) + 1) = 0; } else{ NIintegrate(ckt,&dummy1,&dummy2,here->INDinduct, (here->INDsensxp + 2*(iparmno - 1))); } #ifdef SENSDEBUG printf("sxp = %.5e,sdotxp = %.5e\n", *(ckt->CKTstate0 + here->INDsensxp + 2 * (iparmno - 1)), *(ckt->CKTstate0 + here->INDsensxp + 2 * (iparmno - 1) + 1)); #endif /* SENSDEBUG */ } } } return(OK); } ngspice-26/src/spicelib/devices/ind/inddest.c0000644000265600020320000000137512264261473020612 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "inddefs.h" #include "ngspice/suffix.h" void INDdestroy(GENmodel **inModel) { INDmodel **model = (INDmodel**)inModel; INDinstance *here; INDinstance *prev = NULL; INDmodel *mod = *model; INDmodel *oldmod = NULL; for( ; mod ; mod = mod->INDnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->INDinstances ; here ; here = here->INDnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/ind/inddefs.h0000644000265600020320000001712212264261473020576 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef IND #define IND /* turn on mutual inductor code */ #define MUTUAL #include "ngspice/ifsim.h" #include "ngspice/complex.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" /* structures used to descrive inductors */ /* information needed for each instance */ typedef struct sINDinstance { struct sINDmodel *INDmodPtr; /* backpointer to model */ struct sINDinstance *INDnextInstance; /* pointer to next instance of * current model*/ IFuid INDname; /* pointer to character string naming this instance */ int INDstate; /* pointer to beginning of state vector for inductor */ int INDposNode; /* number of positive node of inductor */ int INDnegNode; /* number of negative node of inductor */ int INDbrEq; /* number of the branch equation added for current */ double INDinduct; /* inductance */ double INDm; /* Parallel multiplier */ double INDtc1; /* first temperature coefficient of resistors */ double INDtc2; /* second temperature coefficient of resistors */ double INDtemp; /* Instance operating temperature */ double INDdtemp; /* Delta temp. of instance */ double INDscale; /* Scale factor */ double INDnt; /* Number of turns */ double INDinitCond; /* initial inductor voltage if specified */ double *INDposIbrptr; /* pointer to sparse matrix diagonal at * (positive,branch eq) */ double *INDnegIbrptr; /* pointer to sparse matrix diagonal at * (negative,branch eq) */ double *INDibrNegptr; /* pointer to sparse matrix offdiagonal at * (branch eq,negative) */ double *INDibrPosptr; /* pointer to sparse matrix offdiagonal at * (branch eq,positive) */ double *INDibrIbrptr; /* pointer to sparse matrix offdiagonal at * (branch eq,branch eq) */ unsigned INDindGiven : 1; /* flag to indicate inductance was specified */ unsigned INDicGiven : 1; /* flag to indicate init. cond. was specified */ unsigned INDmGiven : 1; /* flag to indicate multiplier given */ unsigned INDtc1Given : 1; /* indicates tc1 parameter specified */ unsigned INDtc2Given : 1; /* indicates tc2 parameter specified */ unsigned INDtempGiven : 1; /* flag to indicate operating temp. given */ unsigned INDdtempGiven : 1; /* flag to indicate delta temp. given */ unsigned INDscaleGiven : 1; /* flag to indicate scale factor given */ unsigned INDntGiven : 1; /* flag to indicate number of turns given */ int INDsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } INDinstance ; #define INDflux INDstate /* flux in the inductor */ #define INDvolt INDstate+1 /* voltage - save an entry in table */ #define INDsensxp INDstate+2 /* charge sensitivities and their derivatives. +3 for the derivatives - pointer to the beginning of the array */ /* per model data */ typedef struct sINDmodel { /* model structure for an inductor */ int INDmodType; /* type index of this device type */ struct sINDmodel *INDnextModel; /* pointer to next possible model in * linked list */ INDinstance * INDinstances; /* pointer to list of instances that have this * model */ IFuid INDmodName; /* pointer to character string naming this model */ double INDmInd; /* Model inductance */ double INDtnom; /* temperature at which inductance measured */ double INDtempCoeff1; /* first temperature coefficient */ double INDtempCoeff2; /* second temperature coefficient */ double INDcsect; /* Cross section of inductor */ double INDlength; /* Mean length of magnetic path */ double INDmodNt; /* Model number of turns */ double INDmu; /* Relative magnetic permeability */ unsigned INDtnomGiven : 1; /* flag to indicate nominal temp was given */ unsigned INDtc1Given : 1; /* flag to indicate tc1 was specified */ unsigned INDtc2Given : 1; /* flag to indicate tc2 was specified */ unsigned INDcsectGiven : 1; /* flag to indicate cross section given */ unsigned INDlengthGiven: 1; /* flag to indicate length given */ unsigned INDmodNtGiven : 1; /* flag to indicate mod. n. of turns given */ unsigned INDmuGiven : 1; /* flag to indicate mu_r given */ unsigned INDmIndGiven : 1; /* flag to indicate model inductance given */ double INDspecInd; /* Specific (one turn) inductance */ } INDmodel; #ifdef MUTUAL /* structures used to describe mutual inductors */ /* information needed for each instance */ typedef struct sMUTinstance { struct sMUTmodel *MUTmodPtr; /* backpointer to model */ struct sMUTinstance *MUTnextInstance; /* pointer to next instance of * current model*/ IFuid MUTname; /* pointer to character string naming this instance */ double MUTcoupling; /* mutual inductance input by user */ double MUTfactor; /* mutual inductance scaled for internal use */ IFuid MUTindName1; /* name of coupled inductor 1 */ IFuid MUTindName2; /* name of coupled inductor 2 */ INDinstance *MUTind1; /* pointer to coupled inductor 1 */ INDinstance *MUTind2; /* pointer to coupled inductor 2 */ double *MUTbr1br2; /* pointers to off-diagonal intersections of */ double *MUTbr2br1; /* current branch equations in matrix */ unsigned MUTindGiven : 1; /* flag to indicate inductance was specified */ int MUTsenParmNo; /* parameter # for sensitivity use; set equal to 0 if not a design parameter*/ } MUTinstance ; /* per model data */ typedef struct sMUTmodel { /* model structure for a mutual inductor */ int MUTmodType; /* type index of this device type */ struct sMUTmodel *MUTnextModel; /* pointer to next possible model in * linked list */ MUTinstance * MUTinstances; /* pointer to list of instances that have this * model */ IFuid MUTmodName; /* pointer to character string naming this model */ } MUTmodel; #endif /*MUTUAL*/ /* device parameters */ #define IND_IND 1 #define IND_IC 2 #define IND_FLUX 3 #define IND_VOLT 4 #define IND_IND_SENS 5 #define IND_CURRENT 6 #define IND_POWER 7 #define IND_M 8 #define IND_TEMP 9 #define IND_DTEMP 10 #define IND_SCALE 11 #define IND_NT 12 #define IND_TC1 13 #define IND_TC2 14 /* model parameters */ #define IND_MOD_IND 100 #define IND_MOD_TC1 101 #define IND_MOD_TC2 102 #define IND_MOD_TNOM 103 #define IND_MOD_CSECT 104 #define IND_MOD_LENGTH 105 #define IND_MOD_NT 106 #define IND_MOD_MU 107 #define IND_MOD_L 108 /* device questions */ #define IND_QUEST_SENS_REAL 201 #define IND_QUEST_SENS_IMAG 202 #define IND_QUEST_SENS_MAG 203 #define IND_QUEST_SENS_PH 204 #define IND_QUEST_SENS_CPLX 205 #define IND_QUEST_SENS_DC 206 #ifdef MUTUAL /* device parameters */ #define MUT_COEFF 401 #define MUT_IND1 402 #define MUT_IND2 403 #define MUT_COEFF_SENS 404 /* model parameters */ /* device questions */ #define MUT_QUEST_SENS_REAL 601 #define MUT_QUEST_SENS_IMAG 602 #define MUT_QUEST_SENS_MAG 603 #define MUT_QUEST_SENS_PH 604 #define MUT_QUEST_SENS_CPLX 605 #define MUT_QUEST_SENS_DC 606 #endif /*MUTUAL*/ #include "indext.h" #endif /*IND*/ ngspice-26/src/spicelib/devices/ind/ind.c0000644000265600020320000001004612264261473017725 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "inddefs.h" #include "ngspice/suffix.h" IFparm INDpTable[] = { /* parameters */ IOPAP("inductance",IND_IND, IF_REAL, "Inductance of inductor"), IOPAU("ic", IND_IC, IF_REAL, "Initial current through inductor"), IP( "sens_ind", IND_IND_SENS, IF_FLAG, "flag to request sensitivity WRT inductance"), IOPZU("temp", IND_TEMP, IF_REAL, "Instance operating temperature"), IOPZ( "dtemp", IND_DTEMP, IF_REAL, "Instance temperature difference with the rest of the circuit"), IOPU( "m", IND_M, IF_REAL, "Multiplication Factor"), IOPU( "tc1", IND_TC1, IF_REAL, "First order temp. coefficient"), IOPU( "tc2", IND_TC2, IF_REAL, "Second order temp. coefficient"), IOPU( "scale", IND_SCALE, IF_REAL, "Scale factor"), IOP( "nt", IND_NT, IF_REAL, "Number of turns"), OP( "flux", IND_FLUX, IF_REAL, "Flux through inductor"), OP( "v", IND_VOLT, IF_REAL, "Terminal voltage of inductor"), OPR( "volt", IND_VOLT, IF_REAL, ""), OP( "i", IND_CURRENT, IF_REAL, "Current through the inductor"), OPR( "current", IND_CURRENT, IF_REAL, ""), OP( "p", IND_POWER, IF_REAL, "instantaneous power dissipated by the inductor"), OPU( "sens_dc", IND_QUEST_SENS_DC, IF_REAL, "dc sensitivity sensitivity"), OPU( "sens_real", IND_QUEST_SENS_REAL, IF_REAL, "real part of ac sensitivity"), OPU( "sens_imag", IND_QUEST_SENS_IMAG, IF_REAL, "dc sensitivity and imag part of ac sensitivty"), OPU( "sens_mag", IND_QUEST_SENS_MAG, IF_REAL, "sensitivity of AC magnitude"), OPU( "sens_ph", IND_QUEST_SENS_PH, IF_REAL, "sensitivity of AC phase"), OPU( "sens_cplx", IND_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; IFparm INDmPTable[] = { /* model parameters */ IOPA( "ind", IND_MOD_IND, IF_REAL,"Model inductance"), IOPA( "tc1", IND_MOD_TC1, IF_REAL,"First order temp. coefficient"), IOPA( "tc2", IND_MOD_TC2, IF_REAL,"Second order temp. coefficient"), IOPXU( "tnom", IND_MOD_TNOM, IF_REAL,"Parameter measurement temperature"), IOPA( "csect", IND_MOD_CSECT, IF_REAL,"Inductor cross section"), IOPA( "length", IND_MOD_LENGTH, IF_REAL,"Inductor length"), IOPA( "nt", IND_MOD_NT, IF_REAL,"Model number of turns"), IOPA( "mu", IND_MOD_MU, IF_REAL,"Relative magnetic permeability"), IP( "l", IND_MOD_L, IF_FLAG,"Inductor model") }; char *INDnames[] = { "L+", "L-" }; int INDnSize = NUMELEMS(INDnames); int INDpTSize = NUMELEMS(INDpTable); int INDmPTSize = NUMELEMS(INDmPTable); int INDiSize = sizeof(INDinstance); int INDmSize = sizeof(INDmodel); #ifdef MUTUAL IFparm MUTpTable[] = { /* parameters */ IOPAP( "k", MUT_COEFF, IF_REAL , "Mutual inductance"), IOPR( "coefficient", MUT_COEFF, IF_REAL , ""), IOP( "inductor1", MUT_IND1, IF_INSTANCE, "First coupled inductor"), IOP( "inductor2", MUT_IND2, IF_INSTANCE, "Second coupled inductor"), IP( "sens_coeff", MUT_COEFF_SENS, IF_FLAG, "flag to request sensitivity WRT coupling factor"), OPU( "sens_dc", MUT_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU( "sens_real", MUT_QUEST_SENS_REAL, IF_REAL, "real part of ac sensitivity"), OPU( "sens_imag", MUT_QUEST_SENS_IMAG, IF_REAL, "dc sensitivity and imag part of ac sensitivty"), OPU( "sens_mag", MUT_QUEST_SENS_MAG, IF_REAL, "sensitivity of AC magnitude"), OPU( "sens_ph", MUT_QUEST_SENS_PH, IF_REAL, "sensitivity of AC phase"), OPU( "sens_cplx", MUT_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; int MUTnSize = NUMELEMS(INDnames); int MUTpTSize = NUMELEMS(MUTpTable); int MUTmPTSize = 0; int MUTiSize = sizeof(INDinstance); int MUTmSize = sizeof(INDmodel); #endif /*MUTUAL*/ ngspice-26/src/spicelib/devices/ind/mutsset.c0000644000265600020320000000204512264261473020657 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles This function is obsolete (was used by an old sensitivity analysis) **********/ /* loop through all the devices and * allocate parameter #s to design parameters */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "inddefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #ifdef MUTUAL /*ARGSUSED*/ int MUTsSetup(SENstruct *info, GENmodel *inModel) { MUTmodel *model = (MUTmodel*)inModel; MUTinstance *here; /* loop through all the inductor models */ for( ; model != NULL; model = model->MUTnextModel ) { /* loop through all the instances of the model */ for (here = model->MUTinstances; here != NULL ; here=here->MUTnextInstance) { if(here->MUTsenParmNo){ here->MUTsenParmNo = ++(info->SENparms); } } } return(OK); } #endif /* MUTUAL */ ngspice-26/src/spicelib/devices/urc/0000755000265600020320000000000012264261711017020 5ustar andreasadminngspice-26/src/spicelib/devices/urc/urcsetup.c0000644000265600020320000002754012264261473021053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "urcdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state) /* create the resistors/capacitors used to model the URC */ { URCmodel *model = (URCmodel *)inModel; URCinstance *here; int rtype; int ctype; int dtype; CKTnode * lowl; CKTnode * lowr; CKTnode * hil; CKTnode * hir; char *nameelt; char *namehi; CKTnode *nodehi; CKTnode *nodelo; char *namelo; double r; double c; IFvalue ptemp; double p; double r0; double c0; double i0; double r1; double c1; double i1; double rd; double wnorm; double prop; int i; GENinstance *fast; GENmodel *modfast; /* capacitor or diode model */ GENmodel *rmodfast; /* resistor model */ int error; IFuid dioUid; IFuid resUid; IFuid capUid; IFuid eltUid; NG_IGNORE(state); NG_IGNORE(matrix); rtype = CKTtypelook("Resistor"); ctype = CKTtypelook("Capacitor"); dtype = CKTtypelook("Diode"); /* loop through all the URC models */ for( ; model != NULL; model = model->URCnextModel ) { if(!model->URCkGiven) model->URCk = 1.5; if(!model->URCfmaxGiven) model->URCfmax = 1e9; if(!model->URCrPerLGiven) model->URCrPerL = 1000; if(!model->URCcPerLGiven) model->URCcPerL = 1e-12; /* may need to put in limits: k>=1.1, freq <=1e9, rperl >=.1 */ /* loop through all the instances of the model */ for (here = model->URCinstances; here != NULL ; here=here->URCnextInstance) { p = model->URCk; r0 = here->URClength * model->URCrPerL; c0 = here->URClength * model->URCcPerL; i0 = here->URClength * model->URCisPerL; if(!here->URClumpsGiven) { wnorm = model->URCfmax * r0 * c0 * 2.0 * M_PI; here->URClumps=(int)MAX(3.0,log(wnorm*(((p-1)/p)*((p-1)/p)))/log(p)); if(wnorm <35) here->URClumps=3; /* may want to limit lumps to <= 100 or something like that */ } r1 = (r0*(p-1))/((2*(pow(p,(double)here->URClumps)))-2); c1 = (c0 * (p-1))/((pow(p,(double)(here->URClumps-1)))*(p+1)-2); i1 = (i0 * (p-1))/((pow(p,(double)(here->URClumps-1)))*(p+1)-2); rd = here->URClength * here->URClumps * model->URCrsPerL; /* may want to check that c1 > 0 */ prop=1; if(model->URCisPerLGiven) { error = SPfrontEnd->IFnewUid (ckt, &dioUid, here->URCname, "diodemod", UID_MODEL, NULL); if(error) return(error); modfast = NULL; error = CKTmodCrt(ckt,dtype,&modfast, dioUid); if(error) return(error); ptemp.rValue = c1; error= CKTpModName("cjo",&ptemp,ckt,dtype,dioUid,&modfast); if(error) return(error); ptemp.rValue = rd; error = CKTpModName("rs",&ptemp,ckt,dtype,dioUid,&modfast); if(error) return(error); ptemp.rValue = i1; error = CKTpModName("is",&ptemp,ckt,dtype,dioUid,&modfast); if(error) return(error); } else { error = SPfrontEnd->IFnewUid (ckt, &capUid, here->URCname, "capmod", UID_MODEL, NULL); if(error) return(error); modfast = NULL; error = CKTmodCrt(ckt,ctype,&modfast, capUid); if(error) return(error); } error = SPfrontEnd->IFnewUid (ckt, &resUid, here->URCname, "resmod", UID_MODEL, NULL); if(error) return(error); rmodfast = NULL; error = CKTmodCrt(ckt,rtype,&rmodfast,resUid); if(error) return(error); lowl = CKTnum2nod(ckt,here->URCposNode); hir = CKTnum2nod(ckt,here->URCnegNode); for(i=1;i<=here->URClumps;i++) { namehi = TMALLOC(char, 10); (void)sprintf(namehi,"hi%d",i); error = CKTmkVolt(ckt, &nodehi, here->URCname, namehi); if(error) return(error); hil = nodehi; if(i==here->URClumps) { lowr = hil; } else { namelo = TMALLOC(char, 10); (void)sprintf(namelo,"lo%d",i); error = CKTmkVolt(ckt, &nodelo, here->URCname, namelo); if(error) return(error); lowr = nodelo; } r = prop*r1; c = prop*c1; nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"rlo%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname, nameelt, UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,rmodfast, &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,lowl); if(error) return(error); error = CKTbindNode(ckt,fast,2,lowr); if(error) return(error); ptemp.rValue = r; error = CKTpName("resistance",&ptemp,ckt,rtype,nameelt,&fast); if(error) return(error); nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"rhi%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname, nameelt, UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,rmodfast, &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,hil); if(error) return(error); error = CKTbindNode(ckt,fast,2,hir); if(error) return(error); ptemp.rValue = r; error = CKTpName("resistance",&ptemp,ckt,rtype,nameelt,&fast); if(error) return(error); if(model->URCisPerLGiven) { /* use diode */ nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"dlo%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname,nameelt,UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,modfast, &fast, eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,lowr); if(error) return(error); error = CKTbindNode(ckt,fast,2, CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = prop; error = CKTpName("area",&ptemp,ckt,dtype,nameelt,&fast); if(error) return(error); } else { /* use simple capacitor */ nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"clo%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname ,nameelt, UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,modfast, &fast, eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,lowr); if(error) return(error); error = CKTbindNode(ckt,fast,2, CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = c; error = CKTpName("capacitance",&ptemp,ckt,ctype,nameelt, &fast); if(error) return(error); } if(i!=here->URClumps){ if(model->URCisPerLGiven) { /* use diode */ nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"dhi%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname,nameelt,UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,modfast, &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,hil); if(error) return(error); error = CKTbindNode(ckt,fast,2, CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = prop; error=CKTpName("area",&ptemp,ckt,dtype,nameelt,&fast); if(error) return(error); } else { /* use simple capacitor */ nameelt = TMALLOC(char, 10); (void)sprintf(nameelt,"chi%d",i); error = SPfrontEnd->IFnewUid (ckt, &eltUid, here->URCname,nameelt,UID_INSTANCE, NULL); if(error) return(error); error = CKTcrtElt(ckt,modfast, &fast,eltUid); if(error) return(error); error = CKTbindNode(ckt,fast,1,hil); if(error) return(error); error = CKTbindNode(ckt,fast,2, CKTnum2nod(ckt, here->URCgndNode)); if(error) return(error); ptemp.rValue = c; error =CKTpName("capacitance",&ptemp,ckt,ctype,nameelt, &fast); if(error) return(error); } } prop *= p; lowl = lowr; hir = hil; } } } return(OK); } int URCunsetup(GENmodel *inModel, CKTcircuit *ckt) { IFuid varUid; int error; URCinstance *here; URCmodel *model = (URCmodel *) inModel; GENinstance *in; GENmodel *modfast; /* Delete models, devices, and intermediate nodes; */ for ( ; model; model = model->URCnextModel) { for (here = model->URCinstances; here; here = here->URCnextInstance) { if(model->URCisPerLGiven) { /* Diodes */ error = SPfrontEnd->IFnewUid (ckt, &varUid, here->URCname, "diodemod", UID_MODEL, NULL); } else { /* Capacitors */ error = SPfrontEnd->IFnewUid (ckt, &varUid, here->URCname, "capmod", UID_MODEL, NULL); } if (error && error != E_EXISTS) return error; modfast = CKTfndMod(ckt, varUid); if (!modfast) return E_NOMOD; for (in = modfast->GENinstances; in; in = in->GENnextInstance) CKTdltNNum(ckt, in->GENnode1); CKTdltMod(ckt, modfast); /* Does the elements too */ /* Resistors */ error = SPfrontEnd->IFnewUid (ckt, &varUid, here->URCname, "resmod", UID_MODEL, NULL); if (error && error != E_EXISTS) return error; modfast = CKTfndMod(ckt, varUid); if (!modfast) return E_NOMOD; CKTdltMod(ckt, modfast); } } return OK; } ngspice-26/src/spicelib/devices/urc/urc.c0000644000265600020320000000257012264261473017766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "urcdefs.h" #include "ngspice/suffix.h" IFparm URCpTable[] = { /* parameters */ IOPU( "l", URC_LEN, IF_REAL, "Length of transmission line"), IOPU( "n", URC_LUMPS, IF_INTEGER, "Number of lumps"), OPU( "pos_node",URC_POS_NODE,IF_INTEGER,"Positive node of URC"), OPU( "neg_node",URC_NEG_NODE,IF_INTEGER,"Negative node of URC"), OPU( "gnd", URC_GND_NODE,IF_INTEGER,"Ground node of URC") }; IFparm URCmPTable[] = { /* model parameters */ IOP( "k", URC_MOD_K, IF_REAL, "Propagation constant"), IOPA( "fmax", URC_MOD_FMAX, IF_REAL, "Maximum frequency of interest"), IOP( "rperl", URC_MOD_RPERL, IF_REAL, "Resistance per unit length"), IOPA( "cperl", URC_MOD_CPERL, IF_REAL, "Capacitance per unit length"), IOP( "isperl", URC_MOD_ISPERL, IF_REAL, "Saturation current per length"), IOP( "rsperl", URC_MOD_RSPERL, IF_REAL, "Diode resistance per length"), IP( "urc", URC_MOD_URC, IF_FLAG, "Uniform R.C. line model") }; char *URCnames[] = { "P1", "P2", "Ref" }; int URCnSize = NUMELEMS(URCnames); int URCpTSize = NUMELEMS(URCpTable); int URCmPTSize = NUMELEMS(URCmPTable); int URCiSize = sizeof(URCinstance); int URCmSize = sizeof(URCmodel); ngspice-26/src/spicelib/devices/urc/urcmpar.c0000644000265600020320000000262312264261473020645 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "urcdefs.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int URCmParam(int param, IFvalue *value, GENmodel *inModel) { URCmodel *model = (URCmodel *)inModel; switch(param) { case URC_MOD_K: model->URCk = value->rValue; model->URCkGiven = TRUE; break; case URC_MOD_FMAX: model->URCfmax = value->rValue; model->URCfmaxGiven = TRUE; break; case URC_MOD_RPERL: model->URCrPerL = value->rValue; model->URCrPerLGiven = TRUE; break; case URC_MOD_CPERL: model->URCcPerL = value->rValue; model->URCcPerLGiven = TRUE; break; case URC_MOD_ISPERL: model->URCisPerL = value->rValue; model->URCisPerLGiven = TRUE; break; case URC_MOD_RSPERL: model->URCrsPerL = value->rValue; model->URCrsPerLGiven = TRUE; break; case URC_MOD_URC: /* no operation - already know we are a URC, but this makes*/ /* spice-2 like parsers happy */ break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/urc/urcdefs.h0000644000265600020320000000552412264261473020637 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef URC #define URC #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" /* * structures used to describe uniform RC lines */ /* information needed for each instance */ typedef struct sURCinstance { struct sURCmodel *URCmodPtr; /* backpointer to model */ struct sURCinstance *URCnextInstance; /* pointer to next instance of * current model*/ IFuid URCname; /* pointer to character string naming this instance */ int URCstate; /* not used */ int URCposNode; /* number of positive node of URC */ int URCnegNode; /* number of negative node of URC */ int URCgndNode; /* number of the "ground" node of the URC */ double URClength; /* length of line */ int URClumps; /* number of lumps in line */ unsigned URClenGiven : 1; /* flag to indicate length was specified */ unsigned URClumpsGiven : 1; /* flag to indicate lumps was specified */ } URCinstance ; /* per model data */ typedef struct sURCmodel { /* model structure for a resistor */ int URCmodType; /* type index of this device type */ struct sURCmodel *URCnextModel; /* pointer to next possible model * in linked list */ URCinstance * URCinstances; /* pointer to list of instances that have this * model */ IFuid URCmodName; /* pointer to character string naming this model */ double URCk; /* propagation constant for URC */ double URCfmax; /* max frequence of interest */ double URCrPerL; /* resistance per unit length */ double URCcPerL; /* capacitance per unit length */ double URCisPerL; /* diode saturation current per unit length */ double URCrsPerL; /* diode resistance per unit length */ unsigned URCkGiven : 1; /* flag to indicate k was specified */ unsigned URCfmaxGiven : 1; /* flag to indicate fmax was specified */ unsigned URCrPerLGiven : 1; /* flag to indicate rPerL was specified */ unsigned URCcPerLGiven : 1; /* flag to indicate cPerL was specified */ unsigned URCisPerLGiven : 1; /* flag to indicate isPerL was specified */ unsigned URCrsPerLGiven : 1; /* flag to indicate rsPerL was specified */ } URCmodel; /* device parameters */ #define URC_LEN 1 #define URC_LUMPS 2 #define URC_POS_NODE 3 #define URC_NEG_NODE 4 #define URC_GND_NODE 5 /* model parameters */ #define URC_MOD_K 101 #define URC_MOD_FMAX 102 #define URC_MOD_RPERL 103 #define URC_MOD_CPERL 104 #define URC_MOD_ISPERL 105 #define URC_MOD_RSPERL 106 #define URC_MOD_URC 107 /* device questions */ /* model questions */ #include "urcext.h" #endif /*URC*/ ngspice-26/src/spicelib/devices/urc/urcmask.c0000644000265600020320000000236012264261473020637 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal model parameters * of Uniform distributed RC lines */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "urcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int URCmAsk(CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { URCmodel *here = (URCmodel *)inst; NG_IGNORE(ckt); switch(which) { case URC_MOD_K: value->rValue = here->URCk; return (OK); case URC_MOD_FMAX: value->rValue = here->URCfmax; return (OK); case URC_MOD_RPERL: value->rValue = here->URCrPerL; return (OK); case URC_MOD_CPERL: value->rValue = here->URCcPerL; return (OK); case URC_MOD_ISPERL: value->rValue = here->URCisPerL; return (OK); case URC_MOD_RSPERL: value->rValue = here->URCrsPerL; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/urc/urcparam.c0000644000265600020320000000141712264261473021006 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "urcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int URCparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { URCinstance *here = (URCinstance *)inst; NG_IGNORE(select); switch(param) { case URC_LEN: here->URClength = value->rValue; here->URClenGiven = TRUE; break; case URC_LUMPS: here->URClumps = value->iValue; here->URClumpsGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/urc/urcinit.c0000644000265600020320000000407212264261473020651 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "urcitf.h" #include "urcext.h" #include "urcinit.h" SPICEdev URCinfo = { { "URC", /* MUST precede both resistors and capacitors */ "Uniform R.C. line", &URCnSize, &URCnSize, URCnames, &URCpTSize, URCpTable, &URCmPTSize, URCmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ URCparam, /* DEVmodParam */ URCmParam, /* DEVload */ NULL, /* DEVsetup */ URCsetup, /* DEVunsetup */ URCunsetup, /* DEVpzSetup */ URCsetup, /* DEVtemperature*/ NULL, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ NULL, /* DEVaccept */ NULL, /* DEVdestroy */ URCdestroy, /* DEVmodDelete */ URCmDelete, /* DEVdelete */ URCdelete, /* DEVsetic */ NULL, /* DEVask */ URCask, /* DEVmodAsk */ URCmAsk, /* DEVpzLoad */ NULL, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DISTO */ /* DEVnoise */ NULL, /* NOISE */ /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &URCiSize, /* DEVmodSize */ &URCmSize }; SPICEdev * get_urc_info(void) { return &URCinfo; } ngspice-26/src/spicelib/devices/urc/urcitf.h0000644000265600020320000000026412264261473020474 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_URC #define DEV_URC extern SPICEdev *get_urc_info(void); #endif ngspice-26/src/spicelib/devices/urc/urcask.c0000644000265600020320000000230112264261473020455 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ /* * This routine gives access to the internal device parameters * of Uniform distributed RC lines */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "urcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int URCask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { URCinstance *here = (URCinstance *)inst; NG_IGNORE(select); NG_IGNORE(ckt); switch(which) { case URC_POS_NODE: value->iValue = here->URCposNode; return (OK); case URC_NEG_NODE: value->iValue = here->URCnegNode; return (OK); case URC_GND_NODE: value->iValue = here->URCgndNode; return (OK); case URC_LEN: value->rValue = here->URClength; return (OK); case URC_LUMPS: value->iValue = here->URClumps; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/urc/urcdest.c0000644000265600020320000000137712264261473020652 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "urcdefs.h" #include "ngspice/suffix.h" void URCdestroy(GENmodel **inModel) { URCmodel **model = (URCmodel **)inModel; URCinstance *here; URCinstance *prev = NULL; URCmodel *mod = *model; URCmodel *oldmod = NULL; for( ; mod ; mod = mod->URCnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->URCinstances ; here ; here = here->URCnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/urc/urcinit.h0000644000265600020320000000035612264261473020657 0ustar andreasadmin#ifndef _URCINIT_H #define _URCINIT_H extern IFparm URCpTable[ ]; extern IFparm URCmPTable[ ]; extern char *URCnames[ ]; extern int URCpTSize; extern int URCmPTSize; extern int URCnSize; extern int URCiSize; extern int URCmSize; #endif ngspice-26/src/spicelib/devices/urc/urcmdel.c0000644000265600020320000000174712264261473020635 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "urcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int URCmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { URCmodel **model = (URCmodel**)inModel; URCmodel *modfast = (URCmodel *)kill; URCinstance *here; URCinstance *prev = NULL; URCmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->URCnextModel)) { if( (*model)->URCmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->URCnextModel; /* cut deleted device out of list */ for(here = (*model)->URCinstances ; here ; here = here->URCnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/urc/Makefile.am0000644000265600020320000000062412264261473021063 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = liburc.la liburc_la_SOURCES = \ urc.c \ urcask.c \ urcdefs.h \ urcdel.c \ urcdest.c \ urcext.h \ urcinit.c \ urcinit.h \ urcitf.h \ urcmask.c \ urcmdel.c \ urcmpar.c \ urcparam.c \ urcsetup.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/urc/Makefile.in0000644000265600020320000004136412264261540021075 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/urc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) liburc_la_LIBADD = am_liburc_la_OBJECTS = urc.lo urcask.lo urcdel.lo urcdest.lo \ urcinit.lo urcmask.lo urcmdel.lo urcmpar.lo urcparam.lo \ urcsetup.lo liburc_la_OBJECTS = $(am_liburc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(liburc_la_SOURCES) DIST_SOURCES = $(liburc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = liburc.la liburc_la_SOURCES = \ urc.c \ urcask.c \ urcdefs.h \ urcdel.c \ urcdest.c \ urcext.h \ urcinit.c \ urcinit.h \ urcitf.h \ urcmask.c \ urcmdel.c \ urcmpar.c \ urcparam.c \ urcsetup.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/urc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/urc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done liburc.la: $(liburc_la_OBJECTS) $(liburc_la_DEPENDENCIES) $(EXTRA_liburc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(liburc_la_OBJECTS) $(liburc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/urcsetup.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/urc/urcdel.c0000644000265600020320000000154112264261473020450 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "urcdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int URCdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { URCmodel *model = (URCmodel *)inModel; URCinstance **fast = (URCinstance**)inst; URCinstance **prev = NULL; URCinstance *here; for( ; model ; model = model->URCnextModel) { prev = &(model->URCinstances); for(here = *prev; here ; here = *prev) { if(here->URCname == name || (fast && here==*fast) ) { *prev= here->URCnextInstance; FREE(here); return(OK); } prev = &(here->URCnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/urc/urcext.h0000644000265600020320000000121212264261473020504 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef _URCEXT_H #define _URCEXT_H extern int URCask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int URCdelete(GENmodel*,IFuid,GENinstance**); extern void URCdestroy(GENmodel**); extern int URCmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int URCmDelete(GENmodel**,IFuid,GENmodel*); extern int URCmParam(int,IFvalue*,GENmodel*); extern int URCparam(int,IFvalue*,GENinstance*,IFvalue*); extern int URCsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int URCunsetup(GENmodel*,CKTcircuit*); #endif ngspice-26/src/spicelib/devices/bsim4v4/0000755000265600020320000000000012264261706017523 5ustar andreasadminngspice-26/src/spicelib/devices/bsim4v4/b4v4pzld.c0000644000265600020320000010416512264261473021350 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4pzld.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "bsim4v4def.h" #include "ngspice/suffix.h" int BSIM4v4pzLoad( GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcggb, xcgdb, xcgsb, xcgbb, xcbgb, xcbdb, xcbsb, xcbbb; double xcdgb, xcddb, xcdsb, xcdbb, xcsgb, xcsdb, xcssb, xcsbb; double gds, capbd, capbs, FwdSum, RevSum, Gm, Gmbs; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double xcdbdb=0.0, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb=0.0, xcsgmb=0.0; double xcgmbb=0.0, xcbgmb=0.0; double dxpart, sxpart, xgtg, xgtd, xgts, xgtb, xcqgb=0.0, xcqdb=0.0, xcqsb=0.0, xcqbb=0.0; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double T0=0.0, T1, CoxWL, qcheq, Cdg, Cdd, Cds, Csg, Csd, Css; double ScalingFactor = 1.0e-9; struct bsim4SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here!= NULL; here = here->BSIM4v4nextInstance) { pParam = here->pParam; capbd = here->BSIM4v4capbd; capbs = here->BSIM4v4capbs; cgso = here->BSIM4v4cgso; cgdo = here->BSIM4v4cgdo; cgbo = pParam->BSIM4v4cgbo; if (here->BSIM4v4mode >= 0) { Gm = here->BSIM4v4gm; Gmbs = here->BSIM4v4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; gbbdp = -(here->BSIM4v4gbds); gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = here->BSIM4v4gbgs; gbdpdp = here->BSIM4v4gbds; gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; gIstotd = here->BSIM4v4gIgcsd; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; gIstotb = here->BSIM4v4gIgcsb; gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; gIdtots = here->BSIM4v4gIgcds; gIdtotb = here->BSIM4v4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbd; gIbtots = here->BSIM4v4gIgbs; gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); else if (here->BSIM4v4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgd * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgs * T0; gcrgb = here->BSIM4v4gcrgb * T0; gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v4acnqsMod == 0) { if (here->BSIM4v4rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v4cggb; xcgdb = here->BSIM4v4cgdb; xcgsb = here->BSIM4v4cgsb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v4cdgb; xcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb); xcbgb = here->BSIM4v4cbgb; } else { xcggb = here->BSIM4v4cggb + cgdo + cgso + pParam->BSIM4v4cgbo; xcgdb = here->BSIM4v4cgdb - cgdo; xcgsb = here->BSIM4v4cgsb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = here->BSIM4v4cdgb - cgdo; xcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb + cgso); xcbgb = here->BSIM4v4cbgb - pParam->BSIM4v4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v4cddb + here->BSIM4v4capbd + cgdo; xcdsb = here->BSIM4v4cdsb; xcsdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + here->BSIM4v4cddb); xcssb = here->BSIM4v4capbs + cgso - (here->BSIM4v4cgsb + here->BSIM4v4cbsb + here->BSIM4v4cdsb); if (!here->BSIM4v4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v4cbdb - here->BSIM4v4capbd; xcbsb = here->BSIM4v4cbsb - here->BSIM4v4capbs; xcdbdb = 0.0; } else { xcdbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + here->BSIM4v4cdsb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb) + here->BSIM4v4capbs; xcbdb = here->BSIM4v4cbdb; xcbsb = here->BSIM4v4cbsb; xcdbdb = -here->BSIM4v4capbd; xcsbsb = -here->BSIM4v4capbs; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v4gtg; xgtd = here->BSIM4v4gtd; xgts = here->BSIM4v4gts; xgtb = here->BSIM4v4gtb; xcqgb = here->BSIM4v4cqgb; xcqdb = here->BSIM4v4cqdb; xcqsb = here->BSIM4v4cqsb; xcqbb = here->BSIM4v4cqbb; CoxWL = model->BSIM4v4coxe * here->pParam->BSIM4v4weffCV * here->BSIM4v4nf * here->pParam->BSIM4v4leffCV; qcheq = -(here->BSIM4v4qgate + here->BSIM4v4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v4xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v4xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = here->BSIM4v4qdrn / qcheq; Cdd = here->BSIM4v4cddb; Csd = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + here->BSIM4v4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v4cdgb; Csg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + here->BSIM4v4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v4cdsb; Css = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + here->BSIM4v4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } } else { Gm = -here->BSIM4v4gm; Gmbs = -here->BSIM4v4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); gbbsp = -(here->BSIM4v4gbds); gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v4gbgs; gbspsp = here->BSIM4v4gbds; gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; gIstotd = here->BSIM4v4gIgcds; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; gIstotb = here->BSIM4v4gIgcdb; gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; gIdtots = here->BSIM4v4gIgcsd; gIdtotb = here->BSIM4v4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbs; gIbtots = here->BSIM4v4gIgbd; gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); else if (here->BSIM4v4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgs * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgd * T0; gcrgb = here->BSIM4v4gcrgb * T0; gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v4acnqsMod == 0) { if (here->BSIM4v4rgateMod == 3) { xcgmgmb = cgdo + cgso + pParam->BSIM4v4cgbo; xcgmdb = -cgdo; xcgmsb = -cgso; xcgmbb = -pParam->BSIM4v4cgbo; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggb = here->BSIM4v4cggb; xcgdb = here->BSIM4v4cgsb; xcgsb = here->BSIM4v4cgdb; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb); xcsgb = here->BSIM4v4cdgb; xcbgb = here->BSIM4v4cbgb; } else { xcggb = here->BSIM4v4cggb + cgdo + cgso + pParam->BSIM4v4cgbo; xcgdb = here->BSIM4v4cgsb - cgdo; xcgsb = here->BSIM4v4cgdb - cgso; xcgbb = -(xcggb + xcgdb + xcgsb); xcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb + cgdo); xcsgb = here->BSIM4v4cdgb - cgso; xcbgb = here->BSIM4v4cbgb - pParam->BSIM4v4cgbo; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddb = here->BSIM4v4capbd + cgdo - (here->BSIM4v4cgsb + here->BSIM4v4cbsb + here->BSIM4v4cdsb); xcdsb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + here->BSIM4v4cddb); xcsdb = here->BSIM4v4cdsb; xcssb = here->BSIM4v4cddb + here->BSIM4v4capbs + cgso; if (!here->BSIM4v4rbodyMod) { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb); xcsbb = -(xcsgb + xcsdb + xcssb + xcsgmb); xcbdb = here->BSIM4v4cbsb - here->BSIM4v4capbd; xcbsb = here->BSIM4v4cbdb - here->BSIM4v4capbs; xcdbdb = 0.0; } else { xcdbb = -(xcdgb + xcddb + xcdsb + xcdgmb) + here->BSIM4v4capbd; xcsbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + here->BSIM4v4cdsb); xcbdb = here->BSIM4v4cbsb; xcbsb = here->BSIM4v4cbdb; xcdbdb = -here->BSIM4v4capbd; xcsbsb = -here->BSIM4v4capbs; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xgtg = xgtd = xgts = xgtb = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { xcggb = xcgdb = xcgsb = xcgbb = 0.0; xcbgb = xcbdb = xcbsb = xcbbb = 0.0; xcdgb = xcddb = xcdsb = xcdbb = 0.0; xcsgb = xcsdb = xcssb = xcsbb = 0.0; xgtg = here->BSIM4v4gtg; xgtd = here->BSIM4v4gts; xgts = here->BSIM4v4gtd; xgtb = here->BSIM4v4gtb; xcqgb = here->BSIM4v4cqgb; xcqdb = here->BSIM4v4cqsb; xcqsb = here->BSIM4v4cqdb; xcqbb = here->BSIM4v4cqbb; CoxWL = model->BSIM4v4coxe * here->pParam->BSIM4v4weffCV * here->BSIM4v4nf * here->pParam->BSIM4v4leffCV; qcheq = -(here->BSIM4v4qgate + here->BSIM4v4qbulk); if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v4xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v4xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = here->BSIM4v4qdrn / qcheq; Css = here->BSIM4v4cddb; Cds = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + here->BSIM4v4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v4cdgb; Cdg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + here->BSIM4v4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v4cdsb; Cdd = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + here->BSIM4v4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } } if (model->BSIM4v4rdsMod == 1) { gstot = here->BSIM4v4gstot; gstotd = here->BSIM4v4gstotd; gstotg = here->BSIM4v4gstotg; gstots = here->BSIM4v4gstots - gstot; gstotb = here->BSIM4v4gstotb; gdtot = here->BSIM4v4gdtot; gdtotd = here->BSIM4v4gdtotd - gdtot; gdtotg = here->BSIM4v4gdtotg; gdtots = here->BSIM4v4gdtots; gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } T1 = *(ckt->CKTstate0 + here->BSIM4v4qdef) * here->BSIM4v4gtau; gds = here->BSIM4v4gds; /* * Loading PZ matrix */ m = here->BSIM4v4m; if (!model->BSIM4v4rdsMod) { gdpr = here->BSIM4v4drainConductance; gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v4rbodyMod) { gjbd = here->BSIM4v4gbd; gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v4grgeltd; if (here->BSIM4v4rgateMod == 1) { *(here->BSIM4v4GEgePtr) += m * geltd; *(here->BSIM4v4GPgePtr) -= m * geltd; *(here->BSIM4v4GEgpPtr) -= m * geltd; *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v4GPgpPtr) += m * (geltd - xgtg + gIgtotg); *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v4GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v4GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v4GPbpPtr) -= m * (xgtb - gIgtotb); } else if (here->BSIM4v4rgateMod == 2) { *(here->BSIM4v4GEgePtr) += m * gcrg; *(here->BSIM4v4GEgpPtr) += m * gcrgg; *(here->BSIM4v4GEdpPtr) += m * gcrgd; *(here->BSIM4v4GEspPtr) += m * gcrgs; *(here->BSIM4v4GEbpPtr) += m * gcrgb; *(here->BSIM4v4GPgePtr) -= m * gcrg; *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v4GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); } else if (here->BSIM4v4rgateMod == 3) { *(here->BSIM4v4GEgePtr) += m * geltd; *(here->BSIM4v4GEgmPtr) -= m * geltd; *(here->BSIM4v4GMgePtr) -= m * geltd; *(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v4GMgmPtr ) += m * xcgmgmb * s->real; *(here->BSIM4v4GMgmPtr +1) += m * xcgmgmb * s->imag; *(here->BSIM4v4GMdpPtr) += m * gcrgd; *(here->BSIM4v4GMdpPtr ) += m * xcgmdb * s->real; *(here->BSIM4v4GMdpPtr +1) += m * xcgmdb * s->imag; *(here->BSIM4v4GMgpPtr) += m * gcrgg; *(here->BSIM4v4GMspPtr) += m * gcrgs; *(here->BSIM4v4GMspPtr ) += m * xcgmsb * s->real; *(here->BSIM4v4GMspPtr +1) += m * xcgmsb * s->imag; *(here->BSIM4v4GMbpPtr) += m * gcrgb; *(here->BSIM4v4GMbpPtr ) += m * xcgmbb * s->real; *(here->BSIM4v4GMbpPtr +1) += m * xcgmbb * s->imag; *(here->BSIM4v4DPgmPtr ) += m * xcdgmb * s->real; *(here->BSIM4v4DPgmPtr +1) += m * xcdgmb * s->imag; *(here->BSIM4v4GPgmPtr) -= m * gcrg; *(here->BSIM4v4SPgmPtr ) += m * xcsgmb * s->real; *(here->BSIM4v4SPgmPtr +1) += m * xcsgmb * s->imag; *(here->BSIM4v4BPgmPtr ) += m * xcbgmb * s->real; *(here->BSIM4v4BPgmPtr +1) += m * xcbgmb * s->imag; *(here->BSIM4v4GPgpPtr) -= m * (gcrgg + xgtg - gIgtotg); *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v4GPdpPtr) -= m * (gcrgd + xgtd - gIgtotd); *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v4GPspPtr) -= m * (gcrgs + xgts - gIgtots); *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v4GPbpPtr) -= m * (gcrgb + xgtb - gIgtotb); *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; } else { *(here->BSIM4v4GPdpPtr ) += m * xcgdb * s->real; *(here->BSIM4v4GPdpPtr +1) += m * xcgdb * s->imag; *(here->BSIM4v4GPdpPtr) -= m * (xgtd - gIgtotd); *(here->BSIM4v4GPgpPtr ) += m * xcggb * s->real; *(here->BSIM4v4GPgpPtr +1) += m * xcggb * s->imag; *(here->BSIM4v4GPgpPtr) -= m * (xgtg - gIgtotg); *(here->BSIM4v4GPspPtr ) += m * xcgsb * s->real; *(here->BSIM4v4GPspPtr +1) += m * xcgsb * s->imag; *(here->BSIM4v4GPspPtr) -= m * (xgts - gIgtots); *(here->BSIM4v4GPbpPtr ) += m * xcgbb * s->real; *(here->BSIM4v4GPbpPtr +1) += m * xcgbb * s->imag; *(here->BSIM4v4GPbpPtr) -= m * (xgtb - gIgtotb); } if (model->BSIM4v4rdsMod) { (*(here->BSIM4v4DgpPtr) += m * gdtotg); (*(here->BSIM4v4DspPtr) += m * gdtots); (*(here->BSIM4v4DbpPtr) += m * gdtotb); (*(here->BSIM4v4SdpPtr) += m * gstotd); (*(here->BSIM4v4SgpPtr) += m * gstotg); (*(here->BSIM4v4SbpPtr) += m * gstotb); } *(here->BSIM4v4DPdpPtr ) += m * xcddb * s->real; *(here->BSIM4v4DPdpPtr +1) += m * xcddb * s->imag; *(here->BSIM4v4DPdpPtr) += m * (gdpr + gds + here->BSIM4v4gbd - gdtotd + RevSum + gbdpdp - gIdtotd + dxpart * xgtd + T1 * ddxpart_dVd); *(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v4DPgpPtr ) += m * xcdgb * s->real; *(here->BSIM4v4DPgpPtr +1) += m * xcdgb * s->imag; *(here->BSIM4v4DPgpPtr) += m * (Gm - gdtotg + gbdpg - gIdtotg + T1 * ddxpart_dVg + dxpart * xgtg); *(here->BSIM4v4DPspPtr ) += m * xcdsb * s->real; *(here->BSIM4v4DPspPtr +1) += m * xcdsb * s->imag; *(here->BSIM4v4DPspPtr) -= m * (gds + FwdSum + gdtots - gbdpsp + gIdtots - T1 * ddxpart_dVs - dxpart * xgts); *(here->BSIM4v4DPbpPtr ) += m * xcdbb * s->real; *(here->BSIM4v4DPbpPtr +1) += m * xcdbb * s->imag; *(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * xgtb); *(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v4DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v4SPdpPtr ) += m * xcsdb * s->real; *(here->BSIM4v4SPdpPtr +1) += m * xcsdb * s->imag; *(here->BSIM4v4SPdpPtr) -= m * (gds + gstotd + RevSum - gbspdp + gIstotd - T1 * dsxpart_dVd - sxpart * xgtd); *(here->BSIM4v4SPgpPtr ) += m * xcsgb * s->real; *(here->BSIM4v4SPgpPtr +1) += m * xcsgb * s->imag; *(here->BSIM4v4SPgpPtr) -= m * (Gm + gstotg - gbspg + gIstotg - T1 * dsxpart_dVg - sxpart * xgtg); *(here->BSIM4v4SPspPtr ) += m * xcssb * s->real; *(here->BSIM4v4SPspPtr +1) += m * xcssb * s->imag; *(here->BSIM4v4SPspPtr) += m * (gspr + gds + here->BSIM4v4gbs - gIstots - gstots + FwdSum + gbspsp + sxpart * xgts + T1 * dsxpart_dVs); *(here->BSIM4v4SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v4SPbpPtr ) += m * xcsbb * s->real; *(here->BSIM4v4SPbpPtr +1) += m * xcsbb * s->imag; *(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gbspb + gIstotb - T1 * dsxpart_dVb - sxpart * xgtb); *(here->BSIM4v4SspPtr) -= m * (gspr - gstots); *(here->BSIM4v4SsPtr) += m * (gspr + gstot); *(here->BSIM4v4BPdpPtr ) += m * xcbdb * s->real; *(here->BSIM4v4BPdpPtr +1) += m * xcbdb * s->imag; *(here->BSIM4v4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v4BPgpPtr ) += m * xcbgb * s->real; *(here->BSIM4v4BPgpPtr +1) += m * xcbgb * s->imag; *(here->BSIM4v4BPgpPtr) -= m * (here->BSIM4v4gbgs + gIbtotg); *(here->BSIM4v4BPspPtr ) += m * xcbsb * s->real; *(here->BSIM4v4BPspPtr +1) += m * xcbsb * s->imag; *(here->BSIM4v4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v4BPbpPtr ) += m * xcbbb * s->real; *(here->BSIM4v4BPbpPtr +1) += m * xcbbb * s->imag; *(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v4gbbs - gIbtotb); ggidld = here->BSIM4v4ggidld; ggidlg = here->BSIM4v4ggidlg; ggidlb = here->BSIM4v4ggidlb; ggislg = here->BSIM4v4ggislg; ggisls = here->BSIM4v4ggisls; ggislb = here->BSIM4v4ggislb; /* stamp gidl */ (*(here->BSIM4v4DPdpPtr) += m * ggidld); (*(here->BSIM4v4DPgpPtr) += m * ggidlg); (*(here->BSIM4v4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v4DPbpPtr) += m * ggidlb); (*(here->BSIM4v4BPdpPtr) -= m * ggidld); (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); (*(here->BSIM4v4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v4SPgpPtr) += m * ggislg); (*(here->BSIM4v4SPspPtr) += m * ggisls); (*(here->BSIM4v4SPbpPtr) += m * ggislb); (*(here->BSIM4v4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v4BPgpPtr) -= m * ggislg); (*(here->BSIM4v4BPspPtr) -= m * ggisls); (*(here->BSIM4v4BPbpPtr) -= m * ggislb); if (here->BSIM4v4rbodyMod) { (*(here->BSIM4v4DPdbPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v4DPdbPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v4DPdbPtr) -= m * here->BSIM4v4gbd); (*(here->BSIM4v4SPsbPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v4SPsbPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v4SPsbPtr) -= m * here->BSIM4v4gbs); (*(here->BSIM4v4DBdpPtr ) += m * xcdbdb * s->real); (*(here->BSIM4v4DBdpPtr +1) += m * xcdbdb * s->imag); (*(here->BSIM4v4DBdpPtr) -= m * here->BSIM4v4gbd); (*(here->BSIM4v4DBdbPtr ) -= m * xcdbdb * s->real); (*(here->BSIM4v4DBdbPtr +1) -= m * xcdbdb * s->imag); (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd + here->BSIM4v4grbpd + here->BSIM4v4grbdb)); (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + here->BSIM4v4grbpb)); /* WDL: (-here->BSIM4v4gbbs) already added to BPbpPtr */ (*(here->BSIM4v4SBspPtr ) += m * xcsbsb * s->real); (*(here->BSIM4v4SBspPtr +1) += m * xcsbsb * s->imag); (*(here->BSIM4v4SBspPtr) -= m * here->BSIM4v4gbs); (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4SBsbPtr ) -= m * xcsbsb * s->real); (*(here->BSIM4v4SBsbPtr +1) -= m * xcsbsb * s->imag); (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs + here->BSIM4v4grbps + here->BSIM4v4grbsb)); (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + here->BSIM4v4grbpb)); } if (here->BSIM4v4acnqsMod) { *(here->BSIM4v4QqPtr ) += m * s->real * ScalingFactor; *(here->BSIM4v4QqPtr +1) += m * s->imag * ScalingFactor; *(here->BSIM4v4QgpPtr ) -= m * xcqgb * s->real; *(here->BSIM4v4QgpPtr +1) -= m * xcqgb * s->imag; *(here->BSIM4v4QdpPtr ) -= m * xcqdb * s->real; *(here->BSIM4v4QdpPtr +1) -= m * xcqdb * s->imag; *(here->BSIM4v4QbpPtr ) -= m * xcqbb * s->real; *(here->BSIM4v4QbpPtr +1) -= m * xcqbb * s->imag; *(here->BSIM4v4QspPtr ) -= m * xcqsb * s->real; *(here->BSIM4v4QspPtr +1) -= m * xcqsb * s->imag; *(here->BSIM4v4GPqPtr) -= m * here->BSIM4v4gtau; *(here->BSIM4v4DPqPtr) += m * dxpart * here->BSIM4v4gtau; *(here->BSIM4v4SPqPtr) += m * sxpart * here->BSIM4v4gtau; *(here->BSIM4v4QqPtr) += m * here->BSIM4v4gtau; *(here->BSIM4v4QgpPtr) += m * xgtg; *(here->BSIM4v4QdpPtr) += m * xgtd; *(here->BSIM4v4QbpPtr) += m * xgtb; *(here->BSIM4v4QspPtr) += m * xgts; } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4noi.c0000644000265600020320000007130412264261473021162 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4noi.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/const.h" /* * WDL: 1/f noise model has been smoothed out and enhanced with * bulk charge effect as well as physical N* equ. and necessary * conversion into the SI unit system. */ static double BSIM4v4Eval1ovFNoise( double Vds, BSIM4v4model *model, BSIM4v4instance *here, double freq, double temp) { struct bsim4SizeDependParam *pParam; double cd, esat=0.0, DelClm, EffFreq, N0, Nl, Leff, Leffsq=0.0; double T0, T1, T2=0.0, T3, T4, T5, T6, T7=0.0, T8, T9, Ssi; pParam = here->pParam; cd = fabs(here->BSIM4v4cd); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: Leff = pParam->BSIM4v4leff - 2.0 * model->BSIM4v4lintnoi; Leffsq = Leff * Leff; break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: esat = 2.0 * pParam->BSIM4v4vsattemp / here->BSIM4v4ueff; break; case BSIM4v30: case BSIM4v40: esat = 2.0 * here->BSIM4v4vsattemp / here->BSIM4v4ueff; break; default: break; } if(model->BSIM4v4em<=0.0) DelClm = 0.0; /* flicker noise modified -JX */ else { T0 = ((((Vds - here->BSIM4v4Vdseff) / pParam->BSIM4v4litl) + model->BSIM4v4em) / esat); DelClm = pParam->BSIM4v4litl * log (MAX(T0, N_MINLOG)); } EffFreq = pow(freq, model->BSIM4v4ef); T1 = CHARGE * CHARGE * CONSTboltz * cd * temp * here->BSIM4v4ueff; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: T2 = 1.0e10 * EffFreq * here->BSIM4v4Abulk * model->BSIM4v4coxe * pParam->BSIM4v4leff * pParam->BSIM4v4leff; break; case BSIM4v40: T2 = 1.0e10 * EffFreq * here->BSIM4v4Abulk * model->BSIM4v4coxe * Leffsq; break; default: break; } N0 = model->BSIM4v4coxe * here->BSIM4v4Vgsteff / CHARGE; Nl = model->BSIM4v4coxe * here->BSIM4v4Vgsteff * (1.0 - here->BSIM4v4AbovVgst2Vtm * here->BSIM4v4Vdseff) / CHARGE; T3 = model->BSIM4v4oxideTrapDensityA * log(MAX(((N0 + here->BSIM4v4nstar) / (Nl + here->BSIM4v4nstar)), N_MINLOG)); T4 = model->BSIM4v4oxideTrapDensityB * (N0 - Nl); T5 = model->BSIM4v4oxideTrapDensityC * 0.5 * (N0 * N0 - Nl * Nl); T6 = CONSTboltz * temp * cd * cd; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: T7 = 1.0e10 * EffFreq * pParam->BSIM4v4leff * pParam->BSIM4v4leff * pParam->BSIM4v4weff; break; case BSIM4v40: T7 = 1.0e10 * EffFreq * Leffsq * pParam->BSIM4v4weff; break; default: break; } T8 = model->BSIM4v4oxideTrapDensityA + model->BSIM4v4oxideTrapDensityB * Nl + model->BSIM4v4oxideTrapDensityC * Nl * Nl; T9 = (Nl + here->BSIM4v4nstar) * (Nl + here->BSIM4v4nstar); Ssi = T1 / T2 * (T3 + T4 + T5) + T6 / T7 * DelClm * T8 / T9; return Ssi; } int BSIM4v4noise ( int mode, int operation, GENmodel *inModel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; BSIM4v4model *model = (BSIM4v4model *)inModel; BSIM4v4instance *here; struct bsim4SizeDependParam *pParam; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[BSIM4v4NSRCS]; double lnNdens[BSIM4v4NSRCS]; double T0, T1, T2, T5, T10, T11; double Vds, Ssi, Swi; double tmp=0.0, gdpr, gspr, npart_theta=0.0, npart_beta=0.0, igsquare; double m; int i; /* define the names of the noise sources */ static char *BSIM4v4nNames[BSIM4v4NSRCS] = { /* Note that we have to keep the order */ ".rd", /* noise due to rd */ ".rs", /* noise due to rs */ ".rg", /* noise due to rgeltd */ ".rbps", /* noise due to rbps */ ".rbpd", /* noise due to rbpd */ ".rbpb", /* noise due to rbpb */ ".rbsb", /* noise due to rbsb */ ".rbdb", /* noise due to rbdb */ ".id", /* noise due to id */ ".1overf", /* flicker (1/f) noise */ ".igs", /* shot noise due to IGS */ ".igd", /* shot noise due to IGD */ ".igb", /* shot noise due to IGB */ "" /* total transistor noise */ }; for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here != NULL; here = here->BSIM4v4nextInstance) { pParam = here->pParam; switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i = 0; i < BSIM4v4NSRCS; i++) { (void) sprintf(name, "onoise.%s%s", here->BSIM4v4name, BSIM4v4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i = 0; i < BSIM4v4NSRCS; i++) { (void) sprintf(name, "onoise_total.%s%s", here->BSIM4v4name, BSIM4v4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void) sprintf(name, "inoise_total.%s%s", here->BSIM4v4name, BSIM4v4nNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: m = here->BSIM4v4m; switch (mode) { case N_DENS: if (model->BSIM4v4tnoiMod == 0) { if (model->BSIM4v4rdsMod == 0) { gspr = here->BSIM4v4sourceConductance; gdpr = here->BSIM4v4drainConductance; if (here->BSIM4v4grdsw > 0.0) tmp = 1.0 / here->BSIM4v4grdsw; /* tmp used below */ else tmp = 0.0; } else { gspr = here->BSIM4v4gstot; gdpr = here->BSIM4v4gdtot; tmp = 0.0; } } else { T5 = here->BSIM4v4Vgsteff / here->BSIM4v4EsatL; T5 *= T5; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: npart_beta = 0.577 * (1.0 + T5 * model->BSIM4v4tnoia * pParam->BSIM4v4leff); npart_theta = 0.37 * (1.0 + T5 * model->BSIM4v4tnoib * pParam->BSIM4v4leff); break; case BSIM4v30: case BSIM4v40: npart_beta = model->BSIM4v4rnoia * (1.0 + T5 * model->BSIM4v4tnoia * pParam->BSIM4v4leff); npart_theta = model->BSIM4v4rnoib * (1.0 + T5 * model->BSIM4v4tnoib * pParam->BSIM4v4leff); break; default: break; } if (model->BSIM4v4rdsMod == 0) { gspr = here->BSIM4v4sourceConductance; gdpr = here->BSIM4v4drainConductance; } else { gspr = here->BSIM4v4gstot; gdpr = here->BSIM4v4gdtot; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: if ((*(ckt->CKTstates[0] + here->BSIM4v4vds)) >= 0.0) gspr = gspr * (1.0 + npart_theta * npart_theta * gspr / here->BSIM4v4IdovVds); else gdpr = gdpr * (1.0 + npart_theta * npart_theta * gdpr / here->BSIM4v4IdovVds); break; case BSIM4v30: case BSIM4v40: if ((*(ckt->CKTstates[0] + here->BSIM4v4vds)) >= 0.0) gspr = gspr / (1.0 + npart_theta * npart_theta * gspr / here->BSIM4v4IdovVds); /* bugfix */ else gdpr = gdpr / (1.0 + npart_theta * npart_theta * gdpr / here->BSIM4v4IdovVds); break; default: break; } } NevalSrc(&noizDens[BSIM4v4RDNOIZ], &lnNdens[BSIM4v4RDNOIZ], ckt, THERMNOISE, here->BSIM4v4dNodePrime, here->BSIM4v4dNode, gdpr * m); NevalSrc(&noizDens[BSIM4v4RSNOIZ], &lnNdens[BSIM4v4RSNOIZ], ckt, THERMNOISE, here->BSIM4v4sNodePrime, here->BSIM4v4sNode, gspr * m); if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) { NevalSrc(&noizDens[BSIM4v4RGNOIZ], &lnNdens[BSIM4v4RGNOIZ], ckt, THERMNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4gNodeExt, here->BSIM4v4grgeltd * m); } else if (here->BSIM4v4rgateMod == 3) { NevalSrc(&noizDens[BSIM4v4RGNOIZ], &lnNdens[BSIM4v4RGNOIZ], ckt, THERMNOISE, here->BSIM4v4gNodeMid, here->BSIM4v4gNodeExt, here->BSIM4v4grgeltd * m); } else { noizDens[BSIM4v4RGNOIZ] = 0.0; lnNdens[BSIM4v4RGNOIZ] = log(MAX(noizDens[BSIM4v4RGNOIZ], N_MINLOG)); } if (here->BSIM4v4rbodyMod) { NevalSrc(&noizDens[BSIM4v4RBPSNOIZ], &lnNdens[BSIM4v4RBPSNOIZ], ckt, THERMNOISE, here->BSIM4v4bNodePrime, here->BSIM4v4sbNode, here->BSIM4v4grbps * m); NevalSrc(&noizDens[BSIM4v4RBPDNOIZ], &lnNdens[BSIM4v4RBPDNOIZ], ckt, THERMNOISE, here->BSIM4v4bNodePrime, here->BSIM4v4dbNode, here->BSIM4v4grbpd * m); NevalSrc(&noizDens[BSIM4v4RBPBNOIZ], &lnNdens[BSIM4v4RBPBNOIZ], ckt, THERMNOISE, here->BSIM4v4bNodePrime, here->BSIM4v4bNode, here->BSIM4v4grbpb * m); NevalSrc(&noizDens[BSIM4v4RBSBNOIZ], &lnNdens[BSIM4v4RBSBNOIZ], ckt, THERMNOISE, here->BSIM4v4bNode, here->BSIM4v4sbNode, here->BSIM4v4grbsb * m); NevalSrc(&noizDens[BSIM4v4RBDBNOIZ], &lnNdens[BSIM4v4RBDBNOIZ], ckt, THERMNOISE, here->BSIM4v4bNode, here->BSIM4v4dbNode, here->BSIM4v4grbdb * m); } else { noizDens[BSIM4v4RBPSNOIZ] = noizDens[BSIM4v4RBPDNOIZ] = 0.0; noizDens[BSIM4v4RBPBNOIZ] = 0.0; noizDens[BSIM4v4RBSBNOIZ] = noizDens[BSIM4v4RBDBNOIZ] = 0.0; lnNdens[BSIM4v4RBPSNOIZ] = log(MAX(noizDens[BSIM4v4RBPSNOIZ], N_MINLOG)); lnNdens[BSIM4v4RBPDNOIZ] = log(MAX(noizDens[BSIM4v4RBPDNOIZ], N_MINLOG)); lnNdens[BSIM4v4RBPBNOIZ] = log(MAX(noizDens[BSIM4v4RBPBNOIZ], N_MINLOG)); lnNdens[BSIM4v4RBSBNOIZ] = log(MAX(noizDens[BSIM4v4RBSBNOIZ], N_MINLOG)); lnNdens[BSIM4v4RBDBNOIZ] = log(MAX(noizDens[BSIM4v4RBDBNOIZ], N_MINLOG)); } switch(model->BSIM4v4tnoiMod) { case 0: T0 = here->BSIM4v4ueff * fabs(here->BSIM4v4qinv); T1 = T0 * tmp + pParam->BSIM4v4leff * pParam->BSIM4v4leff; NevalSrc(&noizDens[BSIM4v4IDNOIZ], &lnNdens[BSIM4v4IDNOIZ], ckt, THERMNOISE, here->BSIM4v4dNodePrime, here->BSIM4v4sNodePrime, m * (T0 / T1) * model->BSIM4v4ntnoi); break; case 1: T0 = here->BSIM4v4gm + here->BSIM4v4gmbs + here->BSIM4v4gds; T0 *= T0; igsquare = npart_theta * npart_theta * T0 / here->BSIM4v4IdovVds; T1 = npart_beta * (here->BSIM4v4gm + here->BSIM4v4gmbs) + here->BSIM4v4gds; T2 = T1 * T1 / here->BSIM4v4IdovVds; NevalSrc(&noizDens[BSIM4v4IDNOIZ], &lnNdens[BSIM4v4IDNOIZ], ckt, THERMNOISE, here->BSIM4v4dNodePrime, here->BSIM4v4sNodePrime, m * (T2 - igsquare)); break; } NevalSrc(&noizDens[BSIM4v4FLNOIZ], NULL, ckt, N_GAIN, here->BSIM4v4dNodePrime, here->BSIM4v4sNodePrime, (double) 0.0); switch(model->BSIM4v4fnoiMod) { case 0: noizDens[BSIM4v4FLNOIZ] *= m * model->BSIM4v4kf * exp(model->BSIM4v4af * log(MAX(fabs(here->BSIM4v4cd), N_MINLOG))) / (pow(data->freq, model->BSIM4v4ef) * pParam->BSIM4v4leff * pParam->BSIM4v4leff * model->BSIM4v4coxe); break; case 1: Vds = *(ckt->CKTstates[0] + here->BSIM4v4vds); if (Vds < 0.0) Vds = -Vds; Ssi = BSIM4v4Eval1ovFNoise(Vds, model, here, data->freq, ckt->CKTtemp); T10 = model->BSIM4v4oxideTrapDensityA * CONSTboltz * ckt->CKTtemp; T11 = pParam->BSIM4v4weff * pParam->BSIM4v4leff * pow(data->freq, model->BSIM4v4ef) * 1.0e10 * here->BSIM4v4nstar * here->BSIM4v4nstar; Swi = T10 / T11 * here->BSIM4v4cd * here->BSIM4v4cd; T1 = Swi + Ssi; if (T1 > 0.0) noizDens[BSIM4v4FLNOIZ] *= m * (Ssi * Swi) / T1; else noizDens[BSIM4v4FLNOIZ] *= 0.0; break; } lnNdens[BSIM4v4FLNOIZ] = log(MAX(noizDens[BSIM4v4FLNOIZ], N_MINLOG)); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: NevalSrc(&noizDens[BSIM4v4IGSNOIZ], &lnNdens[BSIM4v4IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4sNodePrime, m * (here->BSIM4v4Igs + here->BSIM4v4Igcs)); NevalSrc(&noizDens[BSIM4v4IGDNOIZ], &lnNdens[BSIM4v4IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4dNodePrime, m * (here->BSIM4v4Igd + here->BSIM4v4Igcd)); break; case BSIM4v30: case BSIM4v40: if(here->BSIM4v4mode >= 0) { /* bugfix */ NevalSrc(&noizDens[BSIM4v4IGSNOIZ], &lnNdens[BSIM4v4IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4sNodePrime, m * (here->BSIM4v4Igs + here->BSIM4v4Igcs)); NevalSrc(&noizDens[BSIM4v4IGDNOIZ], &lnNdens[BSIM4v4IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4dNodePrime, m * (here->BSIM4v4Igd + here->BSIM4v4Igcd)); } else { NevalSrc(&noizDens[BSIM4v4IGSNOIZ], &lnNdens[BSIM4v4IGSNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4sNodePrime, m * (here->BSIM4v4Igs + here->BSIM4v4Igcd)); NevalSrc(&noizDens[BSIM4v4IGDNOIZ], &lnNdens[BSIM4v4IGDNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4dNodePrime, m * (here->BSIM4v4Igd + here->BSIM4v4Igcs)); } break; default: break; } NevalSrc(&noizDens[BSIM4v4IGBNOIZ], &lnNdens[BSIM4v4IGBNOIZ], ckt, SHOTNOISE, here->BSIM4v4gNodePrime, here->BSIM4v4bNodePrime, m * here->BSIM4v4Igb); noizDens[BSIM4v4TOTNOIZ] = noizDens[BSIM4v4RDNOIZ] + noizDens[BSIM4v4RSNOIZ] + noizDens[BSIM4v4RGNOIZ] + noizDens[BSIM4v4RBPSNOIZ] + noizDens[BSIM4v4RBPDNOIZ] + noizDens[BSIM4v4RBPBNOIZ] + noizDens[BSIM4v4RBSBNOIZ] + noizDens[BSIM4v4RBDBNOIZ] + noizDens[BSIM4v4IDNOIZ] + noizDens[BSIM4v4FLNOIZ] + noizDens[BSIM4v4IGSNOIZ] + noizDens[BSIM4v4IGDNOIZ] + noizDens[BSIM4v4IGBNOIZ]; lnNdens[BSIM4v4TOTNOIZ] = log(MAX(noizDens[BSIM4v4TOTNOIZ], N_MINLOG)); *OnDens += noizDens[BSIM4v4TOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to initialize our "history" variables. */ for (i = 0; i < BSIM4v4NSRCS; i++) { here->BSIM4v4nVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i = 0; i < BSIM4v4NSRCS; i++) { here->BSIM4v4nVar[OUTNOIZ][i] = 0.0; here->BSIM4v4nVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0, we have to integrate. */ for (i = 0; i < BSIM4v4NSRCS; i++) { if (i != BSIM4v4TOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], here->BSIM4v4nVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv, lnNdens[i] + data->lnGainInv, here->BSIM4v4nVar[LNLSTDENS][i] + data->lnGainInv, data); here->BSIM4v4nVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { here->BSIM4v4nVar[OUTNOIZ][i] += tempOnoise; here->BSIM4v4nVar[OUTNOIZ][BSIM4v4TOTNOIZ] += tempOnoise; here->BSIM4v4nVar[INNOIZ][i] += tempInoise; here->BSIM4v4nVar[INNOIZ][BSIM4v4TOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i = 0; i < BSIM4v4NSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i = 0; i < BSIM4v4NSRCS; i++) { data->outpVector[data->outNumber++] = here->BSIM4v4nVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = here->BSIM4v4nVar[INNOIZ][i]; } } break; } break; case N_CLOSE: /* do nothing, the main calling routine will close */ return (OK); break; /* the plots */ } /* switch (operation) */ } /* for here */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4geo.c0000644000265600020320000003061112264261473021143 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei(Jane) Xi 03/04/2004 ****/ /********** * Copyright 2003 Regents of the University of California. All rights reserved. * File: b4geo.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" /* * WDLiu: * This subrutine is a special module to process the geometry dependent * parasitics for BSIM4v4, which calculates Ps, Pd, As, Ad, and Rs and Rd * for multi-fingers and varous GEO and RGEO options. */ int BSIM4v4RdsEndIso(double, double, double, double, double, double, int, int, double *); int BSIM4v4RdsEndSha(double, double, double, double, double, double, int, int, double *); static int BSIM4v4NumFingerDiff( double nf, int minSD, double *nuIntD, double *nuEndD, double *nuIntS, double *nuEndS) { int NF; NF = (int)nf; if ((NF%2) != 0) { *nuEndD = *nuEndS = 1.0; *nuIntD = *nuIntS = 2.0 * MAX((nf - 1.0) / 2.0, 0.0); } else { if (minSD == 1) /* minimize # of source */ { *nuEndD = 2.0; *nuIntD = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); *nuEndS = 0.0; *nuIntS = nf; } else { *nuEndD = 0.0; *nuIntD = nf; *nuEndS = 2.0; *nuIntS = 2.0 * MAX((nf / 2.0 - 1.0), 0.0); } } return 0; } int BSIM4v4PAeffGeo( double nf, int geo, int minSD, double Weffcj, double DMCG, double DMCI, double DMDG, double *Ps, double *Pd, double *As, double *Ad) { double T0, T1, T2; double ADiso, ADsha, ADmer, ASiso, ASsha, ASmer; double PDiso, PDsha, PDmer, PSiso, PSsha, PSmer; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* For geo = 9 and 10, the numbers of S/D diffusions already known */ BSIM4v4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); T0 = DMCG + DMCI; T1 = DMCG + DMCG; T2 = DMDG + DMDG; PSiso = PDiso = T0 + T0 + Weffcj; PSsha = PDsha = T1; PSmer = PDmer = T2; ASiso = ADiso = T0 * Weffcj; ASsha = ADsha = DMCG * Weffcj; ASmer = ADmer = DMDG * Weffcj; switch(geo) { case 0: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 1: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 2: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 3: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 4: *Ps = nuEndS * PSiso + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASiso + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 5: *Ps = (nuEndS + nuIntS) * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = (nuEndS + nuIntS) * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 6: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDiso + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADiso + nuIntD * ADsha; break; case 7: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = (nuEndD + nuIntD) * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = (nuEndD + nuIntD) * ADsha; break; case 8: *Ps = nuEndS * PSmer + nuIntS * PSsha; *Pd = nuEndD * PDmer + nuIntD * PDsha; *As = nuEndS * ASmer + nuIntS * ASsha; *Ad = nuEndD * ADmer + nuIntD * ADsha; break; case 9: /* geo = 9 and 10 happen only when nf = even */ *Ps = PSiso + (nf - 1.0) * PSsha; *Pd = nf * PDsha; *As = ASiso + (nf - 1.0) * ASsha; *Ad = nf * ADsha; break; case 10: *Ps = nf * PSsha; *Pd = PDiso + (nf - 1.0) * PDsha; *As = nf * ASsha; *Ad = ADiso + (nf - 1.0) * ADsha; break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } return 0; } int BSIM4v4RdseffGeo( double nf, int geo, int rgeo, int minSD, double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, int Type, double *Rtot) { double Rint=0.0, Rend = 0.0; double nuIntD = 0.0, nuEndD = 0.0, nuIntS = 0.0, nuEndS = 0.0; if (geo < 9) /* since geo = 9 and 10 only happen when nf = even */ { BSIM4v4NumFingerDiff(nf, minSD, &nuIntD, &nuEndD, &nuIntS, &nuEndS); /* Internal S/D resistance -- assume shared S or D and all wide contacts */ if (Type == 1) { if (nuIntS == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntS); } else { if (nuIntD == 0.0) Rint = 0.0; else Rint = Rsh * DMCG / ( Weffcj * nuIntD); } } /* End S/D resistance -- geo dependent */ switch(geo) { case 0: if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 1: if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 2: if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 3: if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 4: if (Type == 1) BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / Weffcj; break; case 5: if (Type == 1) BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndS, rgeo, 1, &Rend); else Rend = Rsh * DMDG / (Weffcj * nuEndD); break; case 6: if (Type == 1) Rend = Rsh * DMDG / Weffcj; else BSIM4v4RdsEndIso(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 7: if (Type == 1) Rend = Rsh * DMDG / (Weffcj * nuEndS); else BSIM4v4RdsEndSha(Weffcj, Rsh, DMCG, DMCI, DMDG, nuEndD, rgeo, 0, &Rend); break; case 8: Rend = Rsh * DMDG / Weffcj; break; case 9: /* all wide contacts assumed for geo = 9 and 10 */ if (Type == 1) { Rend = 0.5 * Rsh * DMCG / Weffcj; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } else { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } break; case 10: if (Type == 1) { Rend = 0.0; Rint = Rsh * DMCG / (Weffcj * nf); } else { Rend = 0.5 * Rsh * DMCG / Weffcj;; if (nf == 2.0) Rint = 0.0; else Rint = Rsh * DMCG / (Weffcj * (nf - 2.0)); } break; default: printf("Warning: Specified GEO = %d not matched\n", geo); } if (Rint <= 0.0) *Rtot = Rend; else if (Rend <= 0.0) *Rtot = Rint; else *Rtot = Rint * Rend / (Rint + Rend); if(*Rtot==0.0) printf("Warning: Zero resistance returned from RdseffGeo\n"); return 0; } int BSIM4v4RdsEndIso( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if ((DMCG + DMCI) == 0.0) printf("(DMCG + DMCI) can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (3.0 * nuEnd * (DMCG + DMCI)); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } int BSIM4v4RdsEndSha( double Weffcj, double Rsh, double DMCG, double DMCI, double DMDG, double nuEnd, int rgeo, int Type, double *Rend) { NG_IGNORE(DMCI); NG_IGNORE(DMDG); if (Type == 1) { switch(rgeo) { case 1: case 2: case 5: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 3: case 4: case 6: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } else { switch(rgeo) { case 1: case 3: case 7: if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * DMCG / (Weffcj * nuEnd); break; case 2: case 4: case 8: if (DMCG == 0.0) printf("DMCG can not be equal to zero\n"); if (nuEnd == 0.0) *Rend = 0.0; else *Rend = Rsh * Weffcj / (6.0 * nuEnd * DMCG); break; default: printf("Warning: Specified RGEO = %d not matched\n", rgeo); } } return 0; } ngspice-26/src/spicelib/devices/bsim4v4/bsim4v4def.h0000644000265600020320000027016612264261473021660 0ustar andreasadmin/* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Modified by Xuemei Xi, 11/15/2002. Modified by Xuemei Xi, 05/09/2003. Modified by Xuemei Xi, 03/04/2004. File: bsim4v4def.h **********/ #ifndef BSIM4V4 #define BSIM4V4 #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" typedef struct sBSIM4v4instance { struct sBSIM4v4model *BSIM4v4modPtr; struct sBSIM4v4instance *BSIM4v4nextInstance; IFuid BSIM4v4name; int BSIM4v4states; /* index into state table for this device */ int BSIM4v4dNode; int BSIM4v4gNodeExt; int BSIM4v4sNode; int BSIM4v4bNode; int BSIM4v4dNodePrime; int BSIM4v4gNodePrime; int BSIM4v4gNodeMid; int BSIM4v4sNodePrime; int BSIM4v4bNodePrime; int BSIM4v4dbNode; int BSIM4v4sbNode; int BSIM4v4qNode; double BSIM4v4ueff; double BSIM4v4thetavth; double BSIM4v4von; double BSIM4v4vdsat; double BSIM4v4cgdo; double BSIM4v4qgdo; double BSIM4v4cgso; double BSIM4v4qgso; double BSIM4v4grbsb; double BSIM4v4grbdb; double BSIM4v4grbpb; double BSIM4v4grbps; double BSIM4v4grbpd; double BSIM4v4vjsmFwd; double BSIM4v4vjsmRev; double BSIM4v4vjdmFwd; double BSIM4v4vjdmRev; double BSIM4v4XExpBVS; double BSIM4v4XExpBVD; double BSIM4v4SslpFwd; double BSIM4v4SslpRev; double BSIM4v4DslpFwd; double BSIM4v4DslpRev; double BSIM4v4IVjsmFwd; double BSIM4v4IVjsmRev; double BSIM4v4IVjdmFwd; double BSIM4v4IVjdmRev; double BSIM4v4grgeltd; double BSIM4v4Pseff; double BSIM4v4Pdeff; double BSIM4v4Aseff; double BSIM4v4Adeff; double BSIM4v4l; double BSIM4v4w; double BSIM4v4drainArea; double BSIM4v4sourceArea; double BSIM4v4drainSquares; double BSIM4v4sourceSquares; double BSIM4v4drainPerimeter; double BSIM4v4sourcePerimeter; double BSIM4v4sourceConductance; double BSIM4v4drainConductance; /* stress effect instance param */ double BSIM4v4sa; double BSIM4v4sb; double BSIM4v4sd; double BSIM4v4rbdb; double BSIM4v4rbsb; double BSIM4v4rbpb; double BSIM4v4rbps; double BSIM4v4rbpd; /* added here to account stress effect instance dependence */ double BSIM4v4u0temp; double BSIM4v4vsattemp; double BSIM4v4vth0; double BSIM4v4vfb; double BSIM4v4vfbzb; double BSIM4v4vtfbphi1; double BSIM4v4vtfbphi2; double BSIM4v4k2; double BSIM4v4vbsc; double BSIM4v4k2ox; double BSIM4v4eta0; double BSIM4v4icVDS; double BSIM4v4icVGS; double BSIM4v4icVBS; double BSIM4v4nf; double BSIM4v4m; int BSIM4v4off; int BSIM4v4mode; int BSIM4v4trnqsMod; int BSIM4v4acnqsMod; int BSIM4v4rbodyMod; int BSIM4v4rgateMod; int BSIM4v4geoMod; int BSIM4v4rgeoMod; int BSIM4v4min; /* OP point */ double BSIM4v4Vgsteff; double BSIM4v4vgs_eff; double BSIM4v4vgd_eff; double BSIM4v4dvgs_eff_dvg; double BSIM4v4dvgd_eff_dvg; double BSIM4v4Vdseff; double BSIM4v4nstar; double BSIM4v4Abulk; double BSIM4v4EsatL; double BSIM4v4AbovVgst2Vtm; double BSIM4v4qinv; double BSIM4v4cd; double BSIM4v4cbs; double BSIM4v4cbd; double BSIM4v4csub; double BSIM4v4Igidl; double BSIM4v4Igisl; double BSIM4v4gm; double BSIM4v4gds; double BSIM4v4gmbs; double BSIM4v4gbd; double BSIM4v4gbs; double BSIM4v4gbbs; double BSIM4v4gbgs; double BSIM4v4gbds; double BSIM4v4ggidld; double BSIM4v4ggidlg; double BSIM4v4ggidls; double BSIM4v4ggidlb; double BSIM4v4ggisld; double BSIM4v4ggislg; double BSIM4v4ggisls; double BSIM4v4ggislb; double BSIM4v4Igcs; double BSIM4v4gIgcsg; double BSIM4v4gIgcsd; double BSIM4v4gIgcss; double BSIM4v4gIgcsb; double BSIM4v4Igcd; double BSIM4v4gIgcdg; double BSIM4v4gIgcdd; double BSIM4v4gIgcds; double BSIM4v4gIgcdb; double BSIM4v4Igs; double BSIM4v4gIgsg; double BSIM4v4gIgss; double BSIM4v4Igd; double BSIM4v4gIgdg; double BSIM4v4gIgdd; double BSIM4v4Igb; double BSIM4v4gIgbg; double BSIM4v4gIgbd; double BSIM4v4gIgbs; double BSIM4v4gIgbb; double BSIM4v4grdsw; double BSIM4v4IdovVds; double BSIM4v4gcrg; double BSIM4v4gcrgd; double BSIM4v4gcrgg; double BSIM4v4gcrgs; double BSIM4v4gcrgb; double BSIM4v4gstot; double BSIM4v4gstotd; double BSIM4v4gstotg; double BSIM4v4gstots; double BSIM4v4gstotb; double BSIM4v4gdtot; double BSIM4v4gdtotd; double BSIM4v4gdtotg; double BSIM4v4gdtots; double BSIM4v4gdtotb; double BSIM4v4cggb; double BSIM4v4cgdb; double BSIM4v4cgsb; double BSIM4v4cbgb; double BSIM4v4cbdb; double BSIM4v4cbsb; double BSIM4v4cdgb; double BSIM4v4cddb; double BSIM4v4cdsb; double BSIM4v4csgb; double BSIM4v4csdb; double BSIM4v4cssb; double BSIM4v4cgbb; double BSIM4v4cdbb; double BSIM4v4csbb; double BSIM4v4cbbb; double BSIM4v4capbd; double BSIM4v4capbs; double BSIM4v4cqgb; double BSIM4v4cqdb; double BSIM4v4cqsb; double BSIM4v4cqbb; double BSIM4v4qgate; double BSIM4v4qbulk; double BSIM4v4qdrn; double BSIM4v4qsrc; double BSIM4v4qchqs; double BSIM4v4taunet; double BSIM4v4gtau; double BSIM4v4gtg; double BSIM4v4gtd; double BSIM4v4gts; double BSIM4v4gtb; double BSIM4v4SjctTempRevSatCur; double BSIM4v4DjctTempRevSatCur; double BSIM4v4SswTempRevSatCur; double BSIM4v4DswTempRevSatCur; double BSIM4v4SswgTempRevSatCur; double BSIM4v4DswgTempRevSatCur; struct bsim4SizeDependParam *pParam; unsigned BSIM4v4lGiven :1; unsigned BSIM4v4wGiven :1; unsigned BSIM4v4mGiven :1; unsigned BSIM4v4nfGiven :1; unsigned BSIM4v4minGiven :1; unsigned BSIM4v4drainAreaGiven :1; unsigned BSIM4v4sourceAreaGiven :1; unsigned BSIM4v4drainSquaresGiven :1; unsigned BSIM4v4sourceSquaresGiven :1; unsigned BSIM4v4drainPerimeterGiven :1; unsigned BSIM4v4sourcePerimeterGiven :1; unsigned BSIM4v4saGiven :1; unsigned BSIM4v4sbGiven :1; unsigned BSIM4v4sdGiven :1; unsigned BSIM4v4rbdbGiven :1; unsigned BSIM4v4rbsbGiven :1; unsigned BSIM4v4rbpbGiven :1; unsigned BSIM4v4rbpdGiven :1; unsigned BSIM4v4rbpsGiven :1; unsigned BSIM4v4icVDSGiven :1; unsigned BSIM4v4icVGSGiven :1; unsigned BSIM4v4icVBSGiven :1; unsigned BSIM4v4trnqsModGiven :1; unsigned BSIM4v4acnqsModGiven :1; unsigned BSIM4v4rbodyModGiven :1; unsigned BSIM4v4rgateModGiven :1; unsigned BSIM4v4geoModGiven :1; unsigned BSIM4v4rgeoModGiven :1; double *BSIM4v4DPdPtr; double *BSIM4v4DPdpPtr; double *BSIM4v4DPgpPtr; double *BSIM4v4DPgmPtr; double *BSIM4v4DPspPtr; double *BSIM4v4DPbpPtr; double *BSIM4v4DPdbPtr; double *BSIM4v4DdPtr; double *BSIM4v4DdpPtr; double *BSIM4v4GPdpPtr; double *BSIM4v4GPgpPtr; double *BSIM4v4GPgmPtr; double *BSIM4v4GPgePtr; double *BSIM4v4GPspPtr; double *BSIM4v4GPbpPtr; double *BSIM4v4GMdpPtr; double *BSIM4v4GMgpPtr; double *BSIM4v4GMgmPtr; double *BSIM4v4GMgePtr; double *BSIM4v4GMspPtr; double *BSIM4v4GMbpPtr; double *BSIM4v4GEdpPtr; double *BSIM4v4GEgpPtr; double *BSIM4v4GEgmPtr; double *BSIM4v4GEgePtr; double *BSIM4v4GEspPtr; double *BSIM4v4GEbpPtr; double *BSIM4v4SPdpPtr; double *BSIM4v4SPgpPtr; double *BSIM4v4SPgmPtr; double *BSIM4v4SPsPtr; double *BSIM4v4SPspPtr; double *BSIM4v4SPbpPtr; double *BSIM4v4SPsbPtr; double *BSIM4v4SspPtr; double *BSIM4v4SsPtr; double *BSIM4v4BPdpPtr; double *BSIM4v4BPgpPtr; double *BSIM4v4BPgmPtr; double *BSIM4v4BPspPtr; double *BSIM4v4BPdbPtr; double *BSIM4v4BPbPtr; double *BSIM4v4BPsbPtr; double *BSIM4v4BPbpPtr; double *BSIM4v4DBdpPtr; double *BSIM4v4DBdbPtr; double *BSIM4v4DBbpPtr; double *BSIM4v4DBbPtr; double *BSIM4v4SBspPtr; double *BSIM4v4SBbpPtr; double *BSIM4v4SBbPtr; double *BSIM4v4SBsbPtr; double *BSIM4v4BdbPtr; double *BSIM4v4BbpPtr; double *BSIM4v4BsbPtr; double *BSIM4v4BbPtr; double *BSIM4v4DgpPtr; double *BSIM4v4DspPtr; double *BSIM4v4DbpPtr; double *BSIM4v4SdpPtr; double *BSIM4v4SgpPtr; double *BSIM4v4SbpPtr; double *BSIM4v4QdpPtr; double *BSIM4v4QgpPtr; double *BSIM4v4QspPtr; double *BSIM4v4QbpPtr; double *BSIM4v4QqPtr; double *BSIM4v4DPqPtr; double *BSIM4v4GPqPtr; double *BSIM4v4SPqPtr; #define BSIM4v4vbd BSIM4v4states+ 0 #define BSIM4v4vbs BSIM4v4states+ 1 #define BSIM4v4vgs BSIM4v4states+ 2 #define BSIM4v4vds BSIM4v4states+ 3 #define BSIM4v4vdbs BSIM4v4states+ 4 #define BSIM4v4vdbd BSIM4v4states+ 5 #define BSIM4v4vsbs BSIM4v4states+ 6 #define BSIM4v4vges BSIM4v4states+ 7 #define BSIM4v4vgms BSIM4v4states+ 8 #define BSIM4v4vses BSIM4v4states+ 9 #define BSIM4v4vdes BSIM4v4states+ 10 #define BSIM4v4qb BSIM4v4states+ 11 #define BSIM4v4cqb BSIM4v4states+ 12 #define BSIM4v4qg BSIM4v4states+ 13 #define BSIM4v4cqg BSIM4v4states+ 14 #define BSIM4v4qd BSIM4v4states+ 15 #define BSIM4v4cqd BSIM4v4states+ 16 #define BSIM4v4qgmid BSIM4v4states+ 17 #define BSIM4v4cqgmid BSIM4v4states+ 18 #define BSIM4v4qbs BSIM4v4states+ 19 #define BSIM4v4cqbs BSIM4v4states+ 20 #define BSIM4v4qbd BSIM4v4states+ 21 #define BSIM4v4cqbd BSIM4v4states+ 22 #define BSIM4v4qcheq BSIM4v4states+ 23 #define BSIM4v4cqcheq BSIM4v4states+ 24 #define BSIM4v4qcdump BSIM4v4states+ 25 #define BSIM4v4cqcdump BSIM4v4states+ 26 #define BSIM4v4qdef BSIM4v4states+ 27 #define BSIM4v4qs BSIM4v4states+ 28 #define BSIM4v4numStates 29 /* indices to the array of BSIM4v4 NOISE SOURCES */ #define BSIM4v4RDNOIZ 0 #define BSIM4v4RSNOIZ 1 #define BSIM4v4RGNOIZ 2 #define BSIM4v4RBPSNOIZ 3 #define BSIM4v4RBPDNOIZ 4 #define BSIM4v4RBPBNOIZ 5 #define BSIM4v4RBSBNOIZ 6 #define BSIM4v4RBDBNOIZ 7 #define BSIM4v4IDNOIZ 8 #define BSIM4v4FLNOIZ 9 #define BSIM4v4IGSNOIZ 10 #define BSIM4v4IGDNOIZ 11 #define BSIM4v4IGBNOIZ 12 #define BSIM4v4TOTNOIZ 13 #define BSIM4v4NSRCS 14 /* Number of BSIM4v4 noise sources */ #ifndef NONOISE double BSIM4v4nVar[NSTATVARS][BSIM4v4NSRCS]; #else /* NONOISE */ double **BSIM4v4nVar; #endif /* NONOISE */ } BSIM4v4instance ; struct bsim4SizeDependParam { double Width; double Length; double NFinger; double BSIM4v4cdsc; double BSIM4v4cdscb; double BSIM4v4cdscd; double BSIM4v4cit; double BSIM4v4nfactor; double BSIM4v4xj; double BSIM4v4vsat; double BSIM4v4at; double BSIM4v4a0; double BSIM4v4ags; double BSIM4v4a1; double BSIM4v4a2; double BSIM4v4keta; double BSIM4v4nsub; double BSIM4v4ndep; double BSIM4v4nsd; double BSIM4v4phin; double BSIM4v4ngate; double BSIM4v4gamma1; double BSIM4v4gamma2; double BSIM4v4vbx; double BSIM4v4vbi; double BSIM4v4vbm; double BSIM4v4vbsc; double BSIM4v4xt; double BSIM4v4phi; double BSIM4v4litl; double BSIM4v4k1; double BSIM4v4kt1; double BSIM4v4kt1l; double BSIM4v4kt2; double BSIM4v4k2; double BSIM4v4k3; double BSIM4v4k3b; double BSIM4v4w0; double BSIM4v4dvtp0; double BSIM4v4dvtp1; double BSIM4v4lpe0; double BSIM4v4lpeb; double BSIM4v4dvt0; double BSIM4v4dvt1; double BSIM4v4dvt2; double BSIM4v4dvt0w; double BSIM4v4dvt1w; double BSIM4v4dvt2w; double BSIM4v4drout; double BSIM4v4dsub; double BSIM4v4vth0; double BSIM4v4ua; double BSIM4v4ua1; double BSIM4v4ub; double BSIM4v4ub1; double BSIM4v4uc; double BSIM4v4uc1; double BSIM4v4u0; double BSIM4v4eu; double BSIM4v4ute; double BSIM4v4voff; double BSIM4v4minv; double BSIM4v4vfb; double BSIM4v4delta; double BSIM4v4rdsw; double BSIM4v4rds0; double BSIM4v4rs0; double BSIM4v4rd0; double BSIM4v4rsw; double BSIM4v4rdw; double BSIM4v4prwg; double BSIM4v4prwb; double BSIM4v4prt; double BSIM4v4eta0; double BSIM4v4etab; double BSIM4v4pclm; double BSIM4v4pdibl1; double BSIM4v4pdibl2; double BSIM4v4pdiblb; double BSIM4v4fprout; double BSIM4v4pdits; double BSIM4v4pditsd; double BSIM4v4pscbe1; double BSIM4v4pscbe2; double BSIM4v4pvag; double BSIM4v4wr; double BSIM4v4dwg; double BSIM4v4dwb; double BSIM4v4b0; double BSIM4v4b1; double BSIM4v4alpha0; double BSIM4v4alpha1; double BSIM4v4beta0; double BSIM4v4agidl; double BSIM4v4bgidl; double BSIM4v4cgidl; double BSIM4v4egidl; double BSIM4v4aigc; double BSIM4v4bigc; double BSIM4v4cigc; double BSIM4v4aigsd; double BSIM4v4bigsd; double BSIM4v4cigsd; double BSIM4v4aigbacc; double BSIM4v4bigbacc; double BSIM4v4cigbacc; double BSIM4v4aigbinv; double BSIM4v4bigbinv; double BSIM4v4cigbinv; double BSIM4v4nigc; double BSIM4v4nigbacc; double BSIM4v4nigbinv; double BSIM4v4ntox; double BSIM4v4eigbinv; double BSIM4v4pigcd; double BSIM4v4poxedge; double BSIM4v4xrcrg1; double BSIM4v4xrcrg2; double BSIM4v4lambda; /* overshoot */ double BSIM4v4vtl; /* thermal velocity limit */ double BSIM4v4xn; /* back scattering parameter */ double BSIM4v4lc; /* back scattering parameter */ double BSIM4v4tfactor; /* ballistic transportation factor */ double BSIM4v4vfbsdoff; /* S/D flatband offset voltage */ /* added for stress effect */ double BSIM4v4ku0; double BSIM4v4kvth0; double BSIM4v4ku0temp; double BSIM4v4rho_ref; double BSIM4v4inv_od_ref; /* CV model */ double BSIM4v4cgsl; double BSIM4v4cgdl; double BSIM4v4ckappas; double BSIM4v4ckappad; double BSIM4v4cf; double BSIM4v4clc; double BSIM4v4cle; double BSIM4v4vfbcv; double BSIM4v4noff; double BSIM4v4voffcv; double BSIM4v4acde; double BSIM4v4moin; /* Pre-calculated constants */ double BSIM4v4dw; double BSIM4v4dl; double BSIM4v4leff; double BSIM4v4weff; double BSIM4v4dwc; double BSIM4v4dlc; double BSIM4v4dlcig; double BSIM4v4dwj; double BSIM4v4leffCV; double BSIM4v4weffCV; double BSIM4v4weffCJ; double BSIM4v4abulkCVfactor; double BSIM4v4cgso; double BSIM4v4cgdo; double BSIM4v4cgbo; double BSIM4v4u0temp; double BSIM4v4vsattemp; double BSIM4v4sqrtPhi; double BSIM4v4phis3; double BSIM4v4Xdep0; double BSIM4v4sqrtXdep0; double BSIM4v4theta0vb0; double BSIM4v4thetaRout; double BSIM4v4mstar; double BSIM4v4voffcbn; double BSIM4v4rdswmin; double BSIM4v4rdwmin; double BSIM4v4rswmin; double BSIM4v4vfbsd; double BSIM4v4cof1; double BSIM4v4cof2; double BSIM4v4cof3; double BSIM4v4cof4; double BSIM4v4cdep0; double BSIM4v4vfbzb; double BSIM4v4vtfbphi1; double BSIM4v4vtfbphi2; double BSIM4v4ToxRatio; double BSIM4v4Aechvb; double BSIM4v4Bechvb; double BSIM4v4ToxRatioEdge; double BSIM4v4AechvbEdge; double BSIM4v4BechvbEdge; double BSIM4v4ldeb; double BSIM4v4k1ox; double BSIM4v4k2ox; struct bsim4SizeDependParam *pNext; }; typedef struct sBSIM4v4model { int BSIM4v4modType; struct sBSIM4v4model *BSIM4v4nextModel; BSIM4v4instance *BSIM4v4instances; IFuid BSIM4v4modName; int BSIM4v4type; int BSIM4v4mobMod; int BSIM4v4capMod; int BSIM4v4dioMod; int BSIM4v4trnqsMod; int BSIM4v4acnqsMod; int BSIM4v4fnoiMod; int BSIM4v4tnoiMod; int BSIM4v4rdsMod; int BSIM4v4rbodyMod; int BSIM4v4rgateMod; int BSIM4v4perMod; int BSIM4v4geoMod; int BSIM4v4igcMod; int BSIM4v4igbMod; int BSIM4v4tempMod; int BSIM4v4binUnit; int BSIM4v4paramChk; char *BSIM4v4version; /* The following field is an integer coding * of BSIM4 Versions. */ int BSIM4v4intVersion; #define BSIM4v40 440 /* BSIM4.4.0 */ #define BSIM4v30 430 /* BSIM4.3.0 */ #define BSIM4v21 421 /* BSIM4.2.1 */ #define BSIM4vOLD 420 /* < BSIM4.2.1 */ double BSIM4v4toxe; double BSIM4v4toxp; double BSIM4v4toxm; double BSIM4v4dtox; double BSIM4v4epsrox; double BSIM4v4cdsc; double BSIM4v4cdscb; double BSIM4v4cdscd; double BSIM4v4cit; double BSIM4v4nfactor; double BSIM4v4xj; double BSIM4v4vsat; double BSIM4v4at; double BSIM4v4a0; double BSIM4v4ags; double BSIM4v4a1; double BSIM4v4a2; double BSIM4v4keta; double BSIM4v4nsub; double BSIM4v4ndep; double BSIM4v4nsd; double BSIM4v4phin; double BSIM4v4ngate; double BSIM4v4gamma1; double BSIM4v4gamma2; double BSIM4v4vbx; double BSIM4v4vbm; double BSIM4v4xt; double BSIM4v4k1; double BSIM4v4kt1; double BSIM4v4kt1l; double BSIM4v4kt2; double BSIM4v4k2; double BSIM4v4k3; double BSIM4v4k3b; double BSIM4v4w0; double BSIM4v4dvtp0; double BSIM4v4dvtp1; double BSIM4v4lpe0; double BSIM4v4lpeb; double BSIM4v4dvt0; double BSIM4v4dvt1; double BSIM4v4dvt2; double BSIM4v4dvt0w; double BSIM4v4dvt1w; double BSIM4v4dvt2w; double BSIM4v4drout; double BSIM4v4dsub; double BSIM4v4vth0; double BSIM4v4eu; double BSIM4v4ua; double BSIM4v4ua1; double BSIM4v4ub; double BSIM4v4ub1; double BSIM4v4uc; double BSIM4v4uc1; double BSIM4v4u0; double BSIM4v4ute; double BSIM4v4voff; double BSIM4v4minv; double BSIM4v4voffl; double BSIM4v4delta; double BSIM4v4rdsw; double BSIM4v4rdswmin; double BSIM4v4rdwmin; double BSIM4v4rswmin; double BSIM4v4rsw; double BSIM4v4rdw; double BSIM4v4prwg; double BSIM4v4prwb; double BSIM4v4prt; double BSIM4v4eta0; double BSIM4v4etab; double BSIM4v4pclm; double BSIM4v4pdibl1; double BSIM4v4pdibl2; double BSIM4v4pdiblb; double BSIM4v4fprout; double BSIM4v4pdits; double BSIM4v4pditsd; double BSIM4v4pditsl; double BSIM4v4pscbe1; double BSIM4v4pscbe2; double BSIM4v4pvag; double BSIM4v4wr; double BSIM4v4dwg; double BSIM4v4dwb; double BSIM4v4b0; double BSIM4v4b1; double BSIM4v4alpha0; double BSIM4v4alpha1; double BSIM4v4beta0; double BSIM4v4agidl; double BSIM4v4bgidl; double BSIM4v4cgidl; double BSIM4v4egidl; double BSIM4v4aigc; double BSIM4v4bigc; double BSIM4v4cigc; double BSIM4v4aigsd; double BSIM4v4bigsd; double BSIM4v4cigsd; double BSIM4v4aigbacc; double BSIM4v4bigbacc; double BSIM4v4cigbacc; double BSIM4v4aigbinv; double BSIM4v4bigbinv; double BSIM4v4cigbinv; double BSIM4v4nigc; double BSIM4v4nigbacc; double BSIM4v4nigbinv; double BSIM4v4ntox; double BSIM4v4eigbinv; double BSIM4v4pigcd; double BSIM4v4poxedge; double BSIM4v4toxref; double BSIM4v4ijthdfwd; double BSIM4v4ijthsfwd; double BSIM4v4ijthdrev; double BSIM4v4ijthsrev; double BSIM4v4xjbvd; double BSIM4v4xjbvs; double BSIM4v4bvd; double BSIM4v4bvs; double BSIM4v4jtss; double BSIM4v4jtsd; double BSIM4v4jtssws; double BSIM4v4jtsswd; double BSIM4v4jtsswgs; double BSIM4v4jtsswgd; double BSIM4v4njts; double BSIM4v4njtssw; double BSIM4v4njtsswg; double BSIM4v4xtss; double BSIM4v4xtsd; double BSIM4v4xtssws; double BSIM4v4xtsswd; double BSIM4v4xtsswgs; double BSIM4v4xtsswgd; double BSIM4v4tnjts; double BSIM4v4tnjtssw; double BSIM4v4tnjtsswg; double BSIM4v4vtss; double BSIM4v4vtsd; double BSIM4v4vtssws; double BSIM4v4vtsswd; double BSIM4v4vtsswgs; double BSIM4v4vtsswgd; double BSIM4v4xrcrg1; double BSIM4v4xrcrg2; double BSIM4v4lambda; double BSIM4v4vtl; double BSIM4v4lc; double BSIM4v4xn; double BSIM4v4vfbsdoff; /* S/D flatband offset voltage */ double BSIM4v4lintnoi; /* lint offset for noise calculation */ double BSIM4v4vfb; double BSIM4v4gbmin; double BSIM4v4rbdb; double BSIM4v4rbsb; double BSIM4v4rbpb; double BSIM4v4rbps; double BSIM4v4rbpd; double BSIM4v4tnoia; double BSIM4v4tnoib; double BSIM4v4rnoia; double BSIM4v4rnoib; double BSIM4v4ntnoi; /* CV model and Parasitics */ double BSIM4v4cgsl; double BSIM4v4cgdl; double BSIM4v4ckappas; double BSIM4v4ckappad; double BSIM4v4cf; double BSIM4v4vfbcv; double BSIM4v4clc; double BSIM4v4cle; double BSIM4v4dwc; double BSIM4v4dlc; double BSIM4v4xw; double BSIM4v4xl; double BSIM4v4dlcig; double BSIM4v4dwj; double BSIM4v4noff; double BSIM4v4voffcv; double BSIM4v4acde; double BSIM4v4moin; double BSIM4v4tcj; double BSIM4v4tcjsw; double BSIM4v4tcjswg; double BSIM4v4tpb; double BSIM4v4tpbsw; double BSIM4v4tpbswg; double BSIM4v4dmcg; double BSIM4v4dmci; double BSIM4v4dmdg; double BSIM4v4dmcgt; double BSIM4v4xgw; double BSIM4v4xgl; double BSIM4v4rshg; double BSIM4v4ngcon; /* Length Dependence */ double BSIM4v4lcdsc; double BSIM4v4lcdscb; double BSIM4v4lcdscd; double BSIM4v4lcit; double BSIM4v4lnfactor; double BSIM4v4lxj; double BSIM4v4lvsat; double BSIM4v4lat; double BSIM4v4la0; double BSIM4v4lags; double BSIM4v4la1; double BSIM4v4la2; double BSIM4v4lketa; double BSIM4v4lnsub; double BSIM4v4lndep; double BSIM4v4lnsd; double BSIM4v4lphin; double BSIM4v4lngate; double BSIM4v4lgamma1; double BSIM4v4lgamma2; double BSIM4v4lvbx; double BSIM4v4lvbm; double BSIM4v4lxt; double BSIM4v4lk1; double BSIM4v4lkt1; double BSIM4v4lkt1l; double BSIM4v4lkt2; double BSIM4v4lk2; double BSIM4v4lk3; double BSIM4v4lk3b; double BSIM4v4lw0; double BSIM4v4ldvtp0; double BSIM4v4ldvtp1; double BSIM4v4llpe0; double BSIM4v4llpeb; double BSIM4v4ldvt0; double BSIM4v4ldvt1; double BSIM4v4ldvt2; double BSIM4v4ldvt0w; double BSIM4v4ldvt1w; double BSIM4v4ldvt2w; double BSIM4v4ldrout; double BSIM4v4ldsub; double BSIM4v4lvth0; double BSIM4v4lua; double BSIM4v4lua1; double BSIM4v4lub; double BSIM4v4lub1; double BSIM4v4luc; double BSIM4v4luc1; double BSIM4v4lu0; double BSIM4v4leu; double BSIM4v4lute; double BSIM4v4lvoff; double BSIM4v4lminv; double BSIM4v4ldelta; double BSIM4v4lrdsw; double BSIM4v4lrsw; double BSIM4v4lrdw; double BSIM4v4lprwg; double BSIM4v4lprwb; double BSIM4v4lprt; double BSIM4v4leta0; double BSIM4v4letab; double BSIM4v4lpclm; double BSIM4v4lpdibl1; double BSIM4v4lpdibl2; double BSIM4v4lpdiblb; double BSIM4v4lfprout; double BSIM4v4lpdits; double BSIM4v4lpditsd; double BSIM4v4lpscbe1; double BSIM4v4lpscbe2; double BSIM4v4lpvag; double BSIM4v4lwr; double BSIM4v4ldwg; double BSIM4v4ldwb; double BSIM4v4lb0; double BSIM4v4lb1; double BSIM4v4lalpha0; double BSIM4v4lalpha1; double BSIM4v4lbeta0; double BSIM4v4lvfb; double BSIM4v4lagidl; double BSIM4v4lbgidl; double BSIM4v4lcgidl; double BSIM4v4legidl; double BSIM4v4laigc; double BSIM4v4lbigc; double BSIM4v4lcigc; double BSIM4v4laigsd; double BSIM4v4lbigsd; double BSIM4v4lcigsd; double BSIM4v4laigbacc; double BSIM4v4lbigbacc; double BSIM4v4lcigbacc; double BSIM4v4laigbinv; double BSIM4v4lbigbinv; double BSIM4v4lcigbinv; double BSIM4v4lnigc; double BSIM4v4lnigbacc; double BSIM4v4lnigbinv; double BSIM4v4lntox; double BSIM4v4leigbinv; double BSIM4v4lpigcd; double BSIM4v4lpoxedge; double BSIM4v4lxrcrg1; double BSIM4v4lxrcrg2; double BSIM4v4llambda; double BSIM4v4lvtl; double BSIM4v4lxn; double BSIM4v4lvfbsdoff; /* CV model */ double BSIM4v4lcgsl; double BSIM4v4lcgdl; double BSIM4v4lckappas; double BSIM4v4lckappad; double BSIM4v4lcf; double BSIM4v4lclc; double BSIM4v4lcle; double BSIM4v4lvfbcv; double BSIM4v4lnoff; double BSIM4v4lvoffcv; double BSIM4v4lacde; double BSIM4v4lmoin; /* Width Dependence */ double BSIM4v4wcdsc; double BSIM4v4wcdscb; double BSIM4v4wcdscd; double BSIM4v4wcit; double BSIM4v4wnfactor; double BSIM4v4wxj; double BSIM4v4wvsat; double BSIM4v4wat; double BSIM4v4wa0; double BSIM4v4wags; double BSIM4v4wa1; double BSIM4v4wa2; double BSIM4v4wketa; double BSIM4v4wnsub; double BSIM4v4wndep; double BSIM4v4wnsd; double BSIM4v4wphin; double BSIM4v4wngate; double BSIM4v4wgamma1; double BSIM4v4wgamma2; double BSIM4v4wvbx; double BSIM4v4wvbm; double BSIM4v4wxt; double BSIM4v4wk1; double BSIM4v4wkt1; double BSIM4v4wkt1l; double BSIM4v4wkt2; double BSIM4v4wk2; double BSIM4v4wk3; double BSIM4v4wk3b; double BSIM4v4ww0; double BSIM4v4wdvtp0; double BSIM4v4wdvtp1; double BSIM4v4wlpe0; double BSIM4v4wlpeb; double BSIM4v4wdvt0; double BSIM4v4wdvt1; double BSIM4v4wdvt2; double BSIM4v4wdvt0w; double BSIM4v4wdvt1w; double BSIM4v4wdvt2w; double BSIM4v4wdrout; double BSIM4v4wdsub; double BSIM4v4wvth0; double BSIM4v4wua; double BSIM4v4wua1; double BSIM4v4wub; double BSIM4v4wub1; double BSIM4v4wuc; double BSIM4v4wuc1; double BSIM4v4wu0; double BSIM4v4weu; double BSIM4v4wute; double BSIM4v4wvoff; double BSIM4v4wminv; double BSIM4v4wdelta; double BSIM4v4wrdsw; double BSIM4v4wrsw; double BSIM4v4wrdw; double BSIM4v4wprwg; double BSIM4v4wprwb; double BSIM4v4wprt; double BSIM4v4weta0; double BSIM4v4wetab; double BSIM4v4wpclm; double BSIM4v4wpdibl1; double BSIM4v4wpdibl2; double BSIM4v4wpdiblb; double BSIM4v4wfprout; double BSIM4v4wpdits; double BSIM4v4wpditsd; double BSIM4v4wpscbe1; double BSIM4v4wpscbe2; double BSIM4v4wpvag; double BSIM4v4wwr; double BSIM4v4wdwg; double BSIM4v4wdwb; double BSIM4v4wb0; double BSIM4v4wb1; double BSIM4v4walpha0; double BSIM4v4walpha1; double BSIM4v4wbeta0; double BSIM4v4wvfb; double BSIM4v4wagidl; double BSIM4v4wbgidl; double BSIM4v4wcgidl; double BSIM4v4wegidl; double BSIM4v4waigc; double BSIM4v4wbigc; double BSIM4v4wcigc; double BSIM4v4waigsd; double BSIM4v4wbigsd; double BSIM4v4wcigsd; double BSIM4v4waigbacc; double BSIM4v4wbigbacc; double BSIM4v4wcigbacc; double BSIM4v4waigbinv; double BSIM4v4wbigbinv; double BSIM4v4wcigbinv; double BSIM4v4wnigc; double BSIM4v4wnigbacc; double BSIM4v4wnigbinv; double BSIM4v4wntox; double BSIM4v4weigbinv; double BSIM4v4wpigcd; double BSIM4v4wpoxedge; double BSIM4v4wxrcrg1; double BSIM4v4wxrcrg2; double BSIM4v4wlambda; double BSIM4v4wvtl; double BSIM4v4wxn; double BSIM4v4wvfbsdoff; /* CV model */ double BSIM4v4wcgsl; double BSIM4v4wcgdl; double BSIM4v4wckappas; double BSIM4v4wckappad; double BSIM4v4wcf; double BSIM4v4wclc; double BSIM4v4wcle; double BSIM4v4wvfbcv; double BSIM4v4wnoff; double BSIM4v4wvoffcv; double BSIM4v4wacde; double BSIM4v4wmoin; /* Cross-term Dependence */ double BSIM4v4pcdsc; double BSIM4v4pcdscb; double BSIM4v4pcdscd; double BSIM4v4pcit; double BSIM4v4pnfactor; double BSIM4v4pxj; double BSIM4v4pvsat; double BSIM4v4pat; double BSIM4v4pa0; double BSIM4v4pags; double BSIM4v4pa1; double BSIM4v4pa2; double BSIM4v4pketa; double BSIM4v4pnsub; double BSIM4v4pndep; double BSIM4v4pnsd; double BSIM4v4pphin; double BSIM4v4pngate; double BSIM4v4pgamma1; double BSIM4v4pgamma2; double BSIM4v4pvbx; double BSIM4v4pvbm; double BSIM4v4pxt; double BSIM4v4pk1; double BSIM4v4pkt1; double BSIM4v4pkt1l; double BSIM4v4pkt2; double BSIM4v4pk2; double BSIM4v4pk3; double BSIM4v4pk3b; double BSIM4v4pw0; double BSIM4v4pdvtp0; double BSIM4v4pdvtp1; double BSIM4v4plpe0; double BSIM4v4plpeb; double BSIM4v4pdvt0; double BSIM4v4pdvt1; double BSIM4v4pdvt2; double BSIM4v4pdvt0w; double BSIM4v4pdvt1w; double BSIM4v4pdvt2w; double BSIM4v4pdrout; double BSIM4v4pdsub; double BSIM4v4pvth0; double BSIM4v4pua; double BSIM4v4pua1; double BSIM4v4pub; double BSIM4v4pub1; double BSIM4v4puc; double BSIM4v4puc1; double BSIM4v4pu0; double BSIM4v4peu; double BSIM4v4pute; double BSIM4v4pvoff; double BSIM4v4pminv; double BSIM4v4pdelta; double BSIM4v4prdsw; double BSIM4v4prsw; double BSIM4v4prdw; double BSIM4v4pprwg; double BSIM4v4pprwb; double BSIM4v4pprt; double BSIM4v4peta0; double BSIM4v4petab; double BSIM4v4ppclm; double BSIM4v4ppdibl1; double BSIM4v4ppdibl2; double BSIM4v4ppdiblb; double BSIM4v4pfprout; double BSIM4v4ppdits; double BSIM4v4ppditsd; double BSIM4v4ppscbe1; double BSIM4v4ppscbe2; double BSIM4v4ppvag; double BSIM4v4pwr; double BSIM4v4pdwg; double BSIM4v4pdwb; double BSIM4v4pb0; double BSIM4v4pb1; double BSIM4v4palpha0; double BSIM4v4palpha1; double BSIM4v4pbeta0; double BSIM4v4pvfb; double BSIM4v4pagidl; double BSIM4v4pbgidl; double BSIM4v4pcgidl; double BSIM4v4pegidl; double BSIM4v4paigc; double BSIM4v4pbigc; double BSIM4v4pcigc; double BSIM4v4paigsd; double BSIM4v4pbigsd; double BSIM4v4pcigsd; double BSIM4v4paigbacc; double BSIM4v4pbigbacc; double BSIM4v4pcigbacc; double BSIM4v4paigbinv; double BSIM4v4pbigbinv; double BSIM4v4pcigbinv; double BSIM4v4pnigc; double BSIM4v4pnigbacc; double BSIM4v4pnigbinv; double BSIM4v4pntox; double BSIM4v4peigbinv; double BSIM4v4ppigcd; double BSIM4v4ppoxedge; double BSIM4v4pxrcrg1; double BSIM4v4pxrcrg2; double BSIM4v4plambda; double BSIM4v4pvtl; double BSIM4v4pxn; double BSIM4v4pvfbsdoff; /* CV model */ double BSIM4v4pcgsl; double BSIM4v4pcgdl; double BSIM4v4pckappas; double BSIM4v4pckappad; double BSIM4v4pcf; double BSIM4v4pclc; double BSIM4v4pcle; double BSIM4v4pvfbcv; double BSIM4v4pnoff; double BSIM4v4pvoffcv; double BSIM4v4pacde; double BSIM4v4pmoin; double BSIM4v4tnom; double BSIM4v4cgso; double BSIM4v4cgdo; double BSIM4v4cgbo; double BSIM4v4xpart; double BSIM4v4cFringOut; double BSIM4v4cFringMax; double BSIM4v4sheetResistance; double BSIM4v4SjctSatCurDensity; double BSIM4v4DjctSatCurDensity; double BSIM4v4SjctSidewallSatCurDensity; double BSIM4v4DjctSidewallSatCurDensity; double BSIM4v4SjctGateSidewallSatCurDensity; double BSIM4v4DjctGateSidewallSatCurDensity; double BSIM4v4SbulkJctPotential; double BSIM4v4DbulkJctPotential; double BSIM4v4SbulkJctBotGradingCoeff; double BSIM4v4DbulkJctBotGradingCoeff; double BSIM4v4SbulkJctSideGradingCoeff; double BSIM4v4DbulkJctSideGradingCoeff; double BSIM4v4SbulkJctGateSideGradingCoeff; double BSIM4v4DbulkJctGateSideGradingCoeff; double BSIM4v4SsidewallJctPotential; double BSIM4v4DsidewallJctPotential; double BSIM4v4SGatesidewallJctPotential; double BSIM4v4DGatesidewallJctPotential; double BSIM4v4SunitAreaJctCap; double BSIM4v4DunitAreaJctCap; double BSIM4v4SunitLengthSidewallJctCap; double BSIM4v4DunitLengthSidewallJctCap; double BSIM4v4SunitLengthGateSidewallJctCap; double BSIM4v4DunitLengthGateSidewallJctCap; double BSIM4v4SjctEmissionCoeff; double BSIM4v4DjctEmissionCoeff; double BSIM4v4SjctTempExponent; double BSIM4v4DjctTempExponent; double BSIM4v4njtstemp; double BSIM4v4njtsswtemp; double BSIM4v4njtsswgtemp; double BSIM4v4Lint; double BSIM4v4Ll; double BSIM4v4Llc; double BSIM4v4Lln; double BSIM4v4Lw; double BSIM4v4Lwc; double BSIM4v4Lwn; double BSIM4v4Lwl; double BSIM4v4Lwlc; double BSIM4v4Lmin; double BSIM4v4Lmax; double BSIM4v4Wint; double BSIM4v4Wl; double BSIM4v4Wlc; double BSIM4v4Wln; double BSIM4v4Ww; double BSIM4v4Wwc; double BSIM4v4Wwn; double BSIM4v4Wwl; double BSIM4v4Wwlc; double BSIM4v4Wmin; double BSIM4v4Wmax; /* added for stress effect */ double BSIM4v4saref; double BSIM4v4sbref; double BSIM4v4wlod; double BSIM4v4ku0; double BSIM4v4kvsat; double BSIM4v4kvth0; double BSIM4v4tku0; double BSIM4v4llodku0; double BSIM4v4wlodku0; double BSIM4v4llodvth; double BSIM4v4wlodvth; double BSIM4v4lku0; double BSIM4v4wku0; double BSIM4v4pku0; double BSIM4v4lkvth0; double BSIM4v4wkvth0; double BSIM4v4pkvth0; double BSIM4v4stk2; double BSIM4v4lodk2; double BSIM4v4steta0; double BSIM4v4lodeta0; /* Pre-calculated constants * move to size-dependent param */ double BSIM4v4vtm; double BSIM4v4vtm0; double BSIM4v4coxe; double BSIM4v4coxp; double BSIM4v4cof1; double BSIM4v4cof2; double BSIM4v4cof3; double BSIM4v4cof4; double BSIM4v4vcrit; double BSIM4v4factor1; double BSIM4v4PhiBS; double BSIM4v4PhiBSWS; double BSIM4v4PhiBSWGS; double BSIM4v4SjctTempSatCurDensity; double BSIM4v4SjctSidewallTempSatCurDensity; double BSIM4v4SjctGateSidewallTempSatCurDensity; double BSIM4v4PhiBD; double BSIM4v4PhiBSWD; double BSIM4v4PhiBSWGD; double BSIM4v4DjctTempSatCurDensity; double BSIM4v4DjctSidewallTempSatCurDensity; double BSIM4v4DjctGateSidewallTempSatCurDensity; double BSIM4v4SunitAreaTempJctCap; double BSIM4v4DunitAreaTempJctCap; double BSIM4v4SunitLengthSidewallTempJctCap; double BSIM4v4DunitLengthSidewallTempJctCap; double BSIM4v4SunitLengthGateSidewallTempJctCap; double BSIM4v4DunitLengthGateSidewallTempJctCap; double BSIM4v4oxideTrapDensityA; double BSIM4v4oxideTrapDensityB; double BSIM4v4oxideTrapDensityC; double BSIM4v4em; double BSIM4v4ef; double BSIM4v4af; double BSIM4v4kf; struct bsim4SizeDependParam *pSizeDependParamKnot; /* Flags */ unsigned BSIM4v4mobModGiven :1; unsigned BSIM4v4binUnitGiven :1; unsigned BSIM4v4capModGiven :1; unsigned BSIM4v4dioModGiven :1; unsigned BSIM4v4rdsModGiven :1; unsigned BSIM4v4rbodyModGiven :1; unsigned BSIM4v4rgateModGiven :1; unsigned BSIM4v4perModGiven :1; unsigned BSIM4v4geoModGiven :1; unsigned BSIM4v4paramChkGiven :1; unsigned BSIM4v4trnqsModGiven :1; unsigned BSIM4v4acnqsModGiven :1; unsigned BSIM4v4fnoiModGiven :1; unsigned BSIM4v4tnoiModGiven :1; unsigned BSIM4v4igcModGiven :1; unsigned BSIM4v4igbModGiven :1; unsigned BSIM4v4tempModGiven :1; unsigned BSIM4v4typeGiven :1; unsigned BSIM4v4toxrefGiven :1; unsigned BSIM4v4toxeGiven :1; unsigned BSIM4v4toxpGiven :1; unsigned BSIM4v4toxmGiven :1; unsigned BSIM4v4dtoxGiven :1; unsigned BSIM4v4epsroxGiven :1; unsigned BSIM4v4versionGiven :1; unsigned BSIM4v4cdscGiven :1; unsigned BSIM4v4cdscbGiven :1; unsigned BSIM4v4cdscdGiven :1; unsigned BSIM4v4citGiven :1; unsigned BSIM4v4nfactorGiven :1; unsigned BSIM4v4xjGiven :1; unsigned BSIM4v4vsatGiven :1; unsigned BSIM4v4atGiven :1; unsigned BSIM4v4a0Given :1; unsigned BSIM4v4agsGiven :1; unsigned BSIM4v4a1Given :1; unsigned BSIM4v4a2Given :1; unsigned BSIM4v4ketaGiven :1; unsigned BSIM4v4nsubGiven :1; unsigned BSIM4v4ndepGiven :1; unsigned BSIM4v4nsdGiven :1; unsigned BSIM4v4phinGiven :1; unsigned BSIM4v4ngateGiven :1; unsigned BSIM4v4gamma1Given :1; unsigned BSIM4v4gamma2Given :1; unsigned BSIM4v4vbxGiven :1; unsigned BSIM4v4vbmGiven :1; unsigned BSIM4v4xtGiven :1; unsigned BSIM4v4k1Given :1; unsigned BSIM4v4kt1Given :1; unsigned BSIM4v4kt1lGiven :1; unsigned BSIM4v4kt2Given :1; unsigned BSIM4v4k2Given :1; unsigned BSIM4v4k3Given :1; unsigned BSIM4v4k3bGiven :1; unsigned BSIM4v4w0Given :1; unsigned BSIM4v4dvtp0Given :1; unsigned BSIM4v4dvtp1Given :1; unsigned BSIM4v4lpe0Given :1; unsigned BSIM4v4lpebGiven :1; unsigned BSIM4v4dvt0Given :1; unsigned BSIM4v4dvt1Given :1; unsigned BSIM4v4dvt2Given :1; unsigned BSIM4v4dvt0wGiven :1; unsigned BSIM4v4dvt1wGiven :1; unsigned BSIM4v4dvt2wGiven :1; unsigned BSIM4v4droutGiven :1; unsigned BSIM4v4dsubGiven :1; unsigned BSIM4v4vth0Given :1; unsigned BSIM4v4euGiven :1; unsigned BSIM4v4uaGiven :1; unsigned BSIM4v4ua1Given :1; unsigned BSIM4v4ubGiven :1; unsigned BSIM4v4ub1Given :1; unsigned BSIM4v4ucGiven :1; unsigned BSIM4v4uc1Given :1; unsigned BSIM4v4u0Given :1; unsigned BSIM4v4uteGiven :1; unsigned BSIM4v4voffGiven :1; unsigned BSIM4v4vofflGiven :1; unsigned BSIM4v4minvGiven :1; unsigned BSIM4v4rdswGiven :1; unsigned BSIM4v4rdswminGiven :1; unsigned BSIM4v4rdwminGiven :1; unsigned BSIM4v4rswminGiven :1; unsigned BSIM4v4rswGiven :1; unsigned BSIM4v4rdwGiven :1; unsigned BSIM4v4prwgGiven :1; unsigned BSIM4v4prwbGiven :1; unsigned BSIM4v4prtGiven :1; unsigned BSIM4v4eta0Given :1; unsigned BSIM4v4etabGiven :1; unsigned BSIM4v4pclmGiven :1; unsigned BSIM4v4pdibl1Given :1; unsigned BSIM4v4pdibl2Given :1; unsigned BSIM4v4pdiblbGiven :1; unsigned BSIM4v4fproutGiven :1; unsigned BSIM4v4pditsGiven :1; unsigned BSIM4v4pditsdGiven :1; unsigned BSIM4v4pditslGiven :1; unsigned BSIM4v4pscbe1Given :1; unsigned BSIM4v4pscbe2Given :1; unsigned BSIM4v4pvagGiven :1; unsigned BSIM4v4deltaGiven :1; unsigned BSIM4v4wrGiven :1; unsigned BSIM4v4dwgGiven :1; unsigned BSIM4v4dwbGiven :1; unsigned BSIM4v4b0Given :1; unsigned BSIM4v4b1Given :1; unsigned BSIM4v4alpha0Given :1; unsigned BSIM4v4alpha1Given :1; unsigned BSIM4v4beta0Given :1; unsigned BSIM4v4agidlGiven :1; unsigned BSIM4v4bgidlGiven :1; unsigned BSIM4v4cgidlGiven :1; unsigned BSIM4v4egidlGiven :1; unsigned BSIM4v4aigcGiven :1; unsigned BSIM4v4bigcGiven :1; unsigned BSIM4v4cigcGiven :1; unsigned BSIM4v4aigsdGiven :1; unsigned BSIM4v4bigsdGiven :1; unsigned BSIM4v4cigsdGiven :1; unsigned BSIM4v4aigbaccGiven :1; unsigned BSIM4v4bigbaccGiven :1; unsigned BSIM4v4cigbaccGiven :1; unsigned BSIM4v4aigbinvGiven :1; unsigned BSIM4v4bigbinvGiven :1; unsigned BSIM4v4cigbinvGiven :1; unsigned BSIM4v4nigcGiven :1; unsigned BSIM4v4nigbinvGiven :1; unsigned BSIM4v4nigbaccGiven :1; unsigned BSIM4v4ntoxGiven :1; unsigned BSIM4v4eigbinvGiven :1; unsigned BSIM4v4pigcdGiven :1; unsigned BSIM4v4poxedgeGiven :1; unsigned BSIM4v4ijthdfwdGiven :1; unsigned BSIM4v4ijthsfwdGiven :1; unsigned BSIM4v4ijthdrevGiven :1; unsigned BSIM4v4ijthsrevGiven :1; unsigned BSIM4v4xjbvdGiven :1; unsigned BSIM4v4xjbvsGiven :1; unsigned BSIM4v4bvdGiven :1; unsigned BSIM4v4bvsGiven :1; unsigned BSIM4v4jtssGiven :1; unsigned BSIM4v4jtsdGiven :1; unsigned BSIM4v4jtsswsGiven :1; unsigned BSIM4v4jtsswdGiven :1; unsigned BSIM4v4jtsswgsGiven :1; unsigned BSIM4v4jtsswgdGiven :1; unsigned BSIM4v4njtsGiven :1; unsigned BSIM4v4njtsswGiven :1; unsigned BSIM4v4njtsswgGiven :1; unsigned BSIM4v4xtssGiven :1; unsigned BSIM4v4xtsdGiven :1; unsigned BSIM4v4xtsswsGiven :1; unsigned BSIM4v4xtsswdGiven :1; unsigned BSIM4v4xtsswgsGiven :1; unsigned BSIM4v4xtsswgdGiven :1; unsigned BSIM4v4tnjtsGiven :1; unsigned BSIM4v4tnjtsswGiven :1; unsigned BSIM4v4tnjtsswgGiven :1; unsigned BSIM4v4vtssGiven :1; unsigned BSIM4v4vtsdGiven :1; unsigned BSIM4v4vtsswsGiven :1; unsigned BSIM4v4vtsswdGiven :1; unsigned BSIM4v4vtsswgsGiven :1; unsigned BSIM4v4vtsswgdGiven :1; unsigned BSIM4v4vfbGiven :1; unsigned BSIM4v4gbminGiven :1; unsigned BSIM4v4rbdbGiven :1; unsigned BSIM4v4rbsbGiven :1; unsigned BSIM4v4rbpsGiven :1; unsigned BSIM4v4rbpdGiven :1; unsigned BSIM4v4rbpbGiven :1; unsigned BSIM4v4xrcrg1Given :1; unsigned BSIM4v4xrcrg2Given :1; unsigned BSIM4v4tnoiaGiven :1; unsigned BSIM4v4tnoibGiven :1; unsigned BSIM4v4rnoiaGiven :1; unsigned BSIM4v4rnoibGiven :1; unsigned BSIM4v4ntnoiGiven :1; unsigned BSIM4v4lambdaGiven :1; unsigned BSIM4v4vtlGiven :1; unsigned BSIM4v4lcGiven :1; unsigned BSIM4v4xnGiven :1; unsigned BSIM4v4vfbsdoffGiven :1; unsigned BSIM4v4lintnoiGiven :1; /* CV model and parasitics */ unsigned BSIM4v4cgslGiven :1; unsigned BSIM4v4cgdlGiven :1; unsigned BSIM4v4ckappasGiven :1; unsigned BSIM4v4ckappadGiven :1; unsigned BSIM4v4cfGiven :1; unsigned BSIM4v4vfbcvGiven :1; unsigned BSIM4v4clcGiven :1; unsigned BSIM4v4cleGiven :1; unsigned BSIM4v4dwcGiven :1; unsigned BSIM4v4dlcGiven :1; unsigned BSIM4v4xwGiven :1; unsigned BSIM4v4xlGiven :1; unsigned BSIM4v4dlcigGiven :1; unsigned BSIM4v4dwjGiven :1; unsigned BSIM4v4noffGiven :1; unsigned BSIM4v4voffcvGiven :1; unsigned BSIM4v4acdeGiven :1; unsigned BSIM4v4moinGiven :1; unsigned BSIM4v4tcjGiven :1; unsigned BSIM4v4tcjswGiven :1; unsigned BSIM4v4tcjswgGiven :1; unsigned BSIM4v4tpbGiven :1; unsigned BSIM4v4tpbswGiven :1; unsigned BSIM4v4tpbswgGiven :1; unsigned BSIM4v4dmcgGiven :1; unsigned BSIM4v4dmciGiven :1; unsigned BSIM4v4dmdgGiven :1; unsigned BSIM4v4dmcgtGiven :1; unsigned BSIM4v4xgwGiven :1; unsigned BSIM4v4xglGiven :1; unsigned BSIM4v4rshgGiven :1; unsigned BSIM4v4ngconGiven :1; /* Length dependence */ unsigned BSIM4v4lcdscGiven :1; unsigned BSIM4v4lcdscbGiven :1; unsigned BSIM4v4lcdscdGiven :1; unsigned BSIM4v4lcitGiven :1; unsigned BSIM4v4lnfactorGiven :1; unsigned BSIM4v4lxjGiven :1; unsigned BSIM4v4lvsatGiven :1; unsigned BSIM4v4latGiven :1; unsigned BSIM4v4la0Given :1; unsigned BSIM4v4lagsGiven :1; unsigned BSIM4v4la1Given :1; unsigned BSIM4v4la2Given :1; unsigned BSIM4v4lketaGiven :1; unsigned BSIM4v4lnsubGiven :1; unsigned BSIM4v4lndepGiven :1; unsigned BSIM4v4lnsdGiven :1; unsigned BSIM4v4lphinGiven :1; unsigned BSIM4v4lngateGiven :1; unsigned BSIM4v4lgamma1Given :1; unsigned BSIM4v4lgamma2Given :1; unsigned BSIM4v4lvbxGiven :1; unsigned BSIM4v4lvbmGiven :1; unsigned BSIM4v4lxtGiven :1; unsigned BSIM4v4lk1Given :1; unsigned BSIM4v4lkt1Given :1; unsigned BSIM4v4lkt1lGiven :1; unsigned BSIM4v4lkt2Given :1; unsigned BSIM4v4lk2Given :1; unsigned BSIM4v4lk3Given :1; unsigned BSIM4v4lk3bGiven :1; unsigned BSIM4v4lw0Given :1; unsigned BSIM4v4ldvtp0Given :1; unsigned BSIM4v4ldvtp1Given :1; unsigned BSIM4v4llpe0Given :1; unsigned BSIM4v4llpebGiven :1; unsigned BSIM4v4ldvt0Given :1; unsigned BSIM4v4ldvt1Given :1; unsigned BSIM4v4ldvt2Given :1; unsigned BSIM4v4ldvt0wGiven :1; unsigned BSIM4v4ldvt1wGiven :1; unsigned BSIM4v4ldvt2wGiven :1; unsigned BSIM4v4ldroutGiven :1; unsigned BSIM4v4ldsubGiven :1; unsigned BSIM4v4lvth0Given :1; unsigned BSIM4v4luaGiven :1; unsigned BSIM4v4lua1Given :1; unsigned BSIM4v4lubGiven :1; unsigned BSIM4v4lub1Given :1; unsigned BSIM4v4lucGiven :1; unsigned BSIM4v4luc1Given :1; unsigned BSIM4v4lu0Given :1; unsigned BSIM4v4leuGiven :1; unsigned BSIM4v4luteGiven :1; unsigned BSIM4v4lvoffGiven :1; unsigned BSIM4v4lminvGiven :1; unsigned BSIM4v4lrdswGiven :1; unsigned BSIM4v4lrswGiven :1; unsigned BSIM4v4lrdwGiven :1; unsigned BSIM4v4lprwgGiven :1; unsigned BSIM4v4lprwbGiven :1; unsigned BSIM4v4lprtGiven :1; unsigned BSIM4v4leta0Given :1; unsigned BSIM4v4letabGiven :1; unsigned BSIM4v4lpclmGiven :1; unsigned BSIM4v4lpdibl1Given :1; unsigned BSIM4v4lpdibl2Given :1; unsigned BSIM4v4lpdiblbGiven :1; unsigned BSIM4v4lfproutGiven :1; unsigned BSIM4v4lpditsGiven :1; unsigned BSIM4v4lpditsdGiven :1; unsigned BSIM4v4lpscbe1Given :1; unsigned BSIM4v4lpscbe2Given :1; unsigned BSIM4v4lpvagGiven :1; unsigned BSIM4v4ldeltaGiven :1; unsigned BSIM4v4lwrGiven :1; unsigned BSIM4v4ldwgGiven :1; unsigned BSIM4v4ldwbGiven :1; unsigned BSIM4v4lb0Given :1; unsigned BSIM4v4lb1Given :1; unsigned BSIM4v4lalpha0Given :1; unsigned BSIM4v4lalpha1Given :1; unsigned BSIM4v4lbeta0Given :1; unsigned BSIM4v4lvfbGiven :1; unsigned BSIM4v4lagidlGiven :1; unsigned BSIM4v4lbgidlGiven :1; unsigned BSIM4v4lcgidlGiven :1; unsigned BSIM4v4legidlGiven :1; unsigned BSIM4v4laigcGiven :1; unsigned BSIM4v4lbigcGiven :1; unsigned BSIM4v4lcigcGiven :1; unsigned BSIM4v4laigsdGiven :1; unsigned BSIM4v4lbigsdGiven :1; unsigned BSIM4v4lcigsdGiven :1; unsigned BSIM4v4laigbaccGiven :1; unsigned BSIM4v4lbigbaccGiven :1; unsigned BSIM4v4lcigbaccGiven :1; unsigned BSIM4v4laigbinvGiven :1; unsigned BSIM4v4lbigbinvGiven :1; unsigned BSIM4v4lcigbinvGiven :1; unsigned BSIM4v4lnigcGiven :1; unsigned BSIM4v4lnigbinvGiven :1; unsigned BSIM4v4lnigbaccGiven :1; unsigned BSIM4v4lntoxGiven :1; unsigned BSIM4v4leigbinvGiven :1; unsigned BSIM4v4lpigcdGiven :1; unsigned BSIM4v4lpoxedgeGiven :1; unsigned BSIM4v4lxrcrg1Given :1; unsigned BSIM4v4lxrcrg2Given :1; unsigned BSIM4v4llambdaGiven :1; unsigned BSIM4v4lvtlGiven :1; unsigned BSIM4v4lxnGiven :1; unsigned BSIM4v4lvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v4lcgslGiven :1; unsigned BSIM4v4lcgdlGiven :1; unsigned BSIM4v4lckappasGiven :1; unsigned BSIM4v4lckappadGiven :1; unsigned BSIM4v4lcfGiven :1; unsigned BSIM4v4lclcGiven :1; unsigned BSIM4v4lcleGiven :1; unsigned BSIM4v4lvfbcvGiven :1; unsigned BSIM4v4lnoffGiven :1; unsigned BSIM4v4lvoffcvGiven :1; unsigned BSIM4v4lacdeGiven :1; unsigned BSIM4v4lmoinGiven :1; /* Width dependence */ unsigned BSIM4v4wcdscGiven :1; unsigned BSIM4v4wcdscbGiven :1; unsigned BSIM4v4wcdscdGiven :1; unsigned BSIM4v4wcitGiven :1; unsigned BSIM4v4wnfactorGiven :1; unsigned BSIM4v4wxjGiven :1; unsigned BSIM4v4wvsatGiven :1; unsigned BSIM4v4watGiven :1; unsigned BSIM4v4wa0Given :1; unsigned BSIM4v4wagsGiven :1; unsigned BSIM4v4wa1Given :1; unsigned BSIM4v4wa2Given :1; unsigned BSIM4v4wketaGiven :1; unsigned BSIM4v4wnsubGiven :1; unsigned BSIM4v4wndepGiven :1; unsigned BSIM4v4wnsdGiven :1; unsigned BSIM4v4wphinGiven :1; unsigned BSIM4v4wngateGiven :1; unsigned BSIM4v4wgamma1Given :1; unsigned BSIM4v4wgamma2Given :1; unsigned BSIM4v4wvbxGiven :1; unsigned BSIM4v4wvbmGiven :1; unsigned BSIM4v4wxtGiven :1; unsigned BSIM4v4wk1Given :1; unsigned BSIM4v4wkt1Given :1; unsigned BSIM4v4wkt1lGiven :1; unsigned BSIM4v4wkt2Given :1; unsigned BSIM4v4wk2Given :1; unsigned BSIM4v4wk3Given :1; unsigned BSIM4v4wk3bGiven :1; unsigned BSIM4v4ww0Given :1; unsigned BSIM4v4wdvtp0Given :1; unsigned BSIM4v4wdvtp1Given :1; unsigned BSIM4v4wlpe0Given :1; unsigned BSIM4v4wlpebGiven :1; unsigned BSIM4v4wdvt0Given :1; unsigned BSIM4v4wdvt1Given :1; unsigned BSIM4v4wdvt2Given :1; unsigned BSIM4v4wdvt0wGiven :1; unsigned BSIM4v4wdvt1wGiven :1; unsigned BSIM4v4wdvt2wGiven :1; unsigned BSIM4v4wdroutGiven :1; unsigned BSIM4v4wdsubGiven :1; unsigned BSIM4v4wvth0Given :1; unsigned BSIM4v4wuaGiven :1; unsigned BSIM4v4wua1Given :1; unsigned BSIM4v4wubGiven :1; unsigned BSIM4v4wub1Given :1; unsigned BSIM4v4wucGiven :1; unsigned BSIM4v4wuc1Given :1; unsigned BSIM4v4wu0Given :1; unsigned BSIM4v4weuGiven :1; unsigned BSIM4v4wuteGiven :1; unsigned BSIM4v4wvoffGiven :1; unsigned BSIM4v4wminvGiven :1; unsigned BSIM4v4wrdswGiven :1; unsigned BSIM4v4wrswGiven :1; unsigned BSIM4v4wrdwGiven :1; unsigned BSIM4v4wprwgGiven :1; unsigned BSIM4v4wprwbGiven :1; unsigned BSIM4v4wprtGiven :1; unsigned BSIM4v4weta0Given :1; unsigned BSIM4v4wetabGiven :1; unsigned BSIM4v4wpclmGiven :1; unsigned BSIM4v4wpdibl1Given :1; unsigned BSIM4v4wpdibl2Given :1; unsigned BSIM4v4wpdiblbGiven :1; unsigned BSIM4v4wfproutGiven :1; unsigned BSIM4v4wpditsGiven :1; unsigned BSIM4v4wpditsdGiven :1; unsigned BSIM4v4wpscbe1Given :1; unsigned BSIM4v4wpscbe2Given :1; unsigned BSIM4v4wpvagGiven :1; unsigned BSIM4v4wdeltaGiven :1; unsigned BSIM4v4wwrGiven :1; unsigned BSIM4v4wdwgGiven :1; unsigned BSIM4v4wdwbGiven :1; unsigned BSIM4v4wb0Given :1; unsigned BSIM4v4wb1Given :1; unsigned BSIM4v4walpha0Given :1; unsigned BSIM4v4walpha1Given :1; unsigned BSIM4v4wbeta0Given :1; unsigned BSIM4v4wvfbGiven :1; unsigned BSIM4v4wagidlGiven :1; unsigned BSIM4v4wbgidlGiven :1; unsigned BSIM4v4wcgidlGiven :1; unsigned BSIM4v4wegidlGiven :1; unsigned BSIM4v4waigcGiven :1; unsigned BSIM4v4wbigcGiven :1; unsigned BSIM4v4wcigcGiven :1; unsigned BSIM4v4waigsdGiven :1; unsigned BSIM4v4wbigsdGiven :1; unsigned BSIM4v4wcigsdGiven :1; unsigned BSIM4v4waigbaccGiven :1; unsigned BSIM4v4wbigbaccGiven :1; unsigned BSIM4v4wcigbaccGiven :1; unsigned BSIM4v4waigbinvGiven :1; unsigned BSIM4v4wbigbinvGiven :1; unsigned BSIM4v4wcigbinvGiven :1; unsigned BSIM4v4wnigcGiven :1; unsigned BSIM4v4wnigbinvGiven :1; unsigned BSIM4v4wnigbaccGiven :1; unsigned BSIM4v4wntoxGiven :1; unsigned BSIM4v4weigbinvGiven :1; unsigned BSIM4v4wpigcdGiven :1; unsigned BSIM4v4wpoxedgeGiven :1; unsigned BSIM4v4wxrcrg1Given :1; unsigned BSIM4v4wxrcrg2Given :1; unsigned BSIM4v4wlambdaGiven :1; unsigned BSIM4v4wvtlGiven :1; unsigned BSIM4v4wxnGiven :1; unsigned BSIM4v4wvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v4wcgslGiven :1; unsigned BSIM4v4wcgdlGiven :1; unsigned BSIM4v4wckappasGiven :1; unsigned BSIM4v4wckappadGiven :1; unsigned BSIM4v4wcfGiven :1; unsigned BSIM4v4wclcGiven :1; unsigned BSIM4v4wcleGiven :1; unsigned BSIM4v4wvfbcvGiven :1; unsigned BSIM4v4wnoffGiven :1; unsigned BSIM4v4wvoffcvGiven :1; unsigned BSIM4v4wacdeGiven :1; unsigned BSIM4v4wmoinGiven :1; /* Cross-term dependence */ unsigned BSIM4v4pcdscGiven :1; unsigned BSIM4v4pcdscbGiven :1; unsigned BSIM4v4pcdscdGiven :1; unsigned BSIM4v4pcitGiven :1; unsigned BSIM4v4pnfactorGiven :1; unsigned BSIM4v4pxjGiven :1; unsigned BSIM4v4pvsatGiven :1; unsigned BSIM4v4patGiven :1; unsigned BSIM4v4pa0Given :1; unsigned BSIM4v4pagsGiven :1; unsigned BSIM4v4pa1Given :1; unsigned BSIM4v4pa2Given :1; unsigned BSIM4v4pketaGiven :1; unsigned BSIM4v4pnsubGiven :1; unsigned BSIM4v4pndepGiven :1; unsigned BSIM4v4pnsdGiven :1; unsigned BSIM4v4pphinGiven :1; unsigned BSIM4v4pngateGiven :1; unsigned BSIM4v4pgamma1Given :1; unsigned BSIM4v4pgamma2Given :1; unsigned BSIM4v4pvbxGiven :1; unsigned BSIM4v4pvbmGiven :1; unsigned BSIM4v4pxtGiven :1; unsigned BSIM4v4pk1Given :1; unsigned BSIM4v4pkt1Given :1; unsigned BSIM4v4pkt1lGiven :1; unsigned BSIM4v4pkt2Given :1; unsigned BSIM4v4pk2Given :1; unsigned BSIM4v4pk3Given :1; unsigned BSIM4v4pk3bGiven :1; unsigned BSIM4v4pw0Given :1; unsigned BSIM4v4pdvtp0Given :1; unsigned BSIM4v4pdvtp1Given :1; unsigned BSIM4v4plpe0Given :1; unsigned BSIM4v4plpebGiven :1; unsigned BSIM4v4pdvt0Given :1; unsigned BSIM4v4pdvt1Given :1; unsigned BSIM4v4pdvt2Given :1; unsigned BSIM4v4pdvt0wGiven :1; unsigned BSIM4v4pdvt1wGiven :1; unsigned BSIM4v4pdvt2wGiven :1; unsigned BSIM4v4pdroutGiven :1; unsigned BSIM4v4pdsubGiven :1; unsigned BSIM4v4pvth0Given :1; unsigned BSIM4v4puaGiven :1; unsigned BSIM4v4pua1Given :1; unsigned BSIM4v4pubGiven :1; unsigned BSIM4v4pub1Given :1; unsigned BSIM4v4pucGiven :1; unsigned BSIM4v4puc1Given :1; unsigned BSIM4v4pu0Given :1; unsigned BSIM4v4peuGiven :1; unsigned BSIM4v4puteGiven :1; unsigned BSIM4v4pvoffGiven :1; unsigned BSIM4v4pminvGiven :1; unsigned BSIM4v4prdswGiven :1; unsigned BSIM4v4prswGiven :1; unsigned BSIM4v4prdwGiven :1; unsigned BSIM4v4pprwgGiven :1; unsigned BSIM4v4pprwbGiven :1; unsigned BSIM4v4pprtGiven :1; unsigned BSIM4v4peta0Given :1; unsigned BSIM4v4petabGiven :1; unsigned BSIM4v4ppclmGiven :1; unsigned BSIM4v4ppdibl1Given :1; unsigned BSIM4v4ppdibl2Given :1; unsigned BSIM4v4ppdiblbGiven :1; unsigned BSIM4v4pfproutGiven :1; unsigned BSIM4v4ppditsGiven :1; unsigned BSIM4v4ppditsdGiven :1; unsigned BSIM4v4ppscbe1Given :1; unsigned BSIM4v4ppscbe2Given :1; unsigned BSIM4v4ppvagGiven :1; unsigned BSIM4v4pdeltaGiven :1; unsigned BSIM4v4pwrGiven :1; unsigned BSIM4v4pdwgGiven :1; unsigned BSIM4v4pdwbGiven :1; unsigned BSIM4v4pb0Given :1; unsigned BSIM4v4pb1Given :1; unsigned BSIM4v4palpha0Given :1; unsigned BSIM4v4palpha1Given :1; unsigned BSIM4v4pbeta0Given :1; unsigned BSIM4v4pvfbGiven :1; unsigned BSIM4v4pagidlGiven :1; unsigned BSIM4v4pbgidlGiven :1; unsigned BSIM4v4pcgidlGiven :1; unsigned BSIM4v4pegidlGiven :1; unsigned BSIM4v4paigcGiven :1; unsigned BSIM4v4pbigcGiven :1; unsigned BSIM4v4pcigcGiven :1; unsigned BSIM4v4paigsdGiven :1; unsigned BSIM4v4pbigsdGiven :1; unsigned BSIM4v4pcigsdGiven :1; unsigned BSIM4v4paigbaccGiven :1; unsigned BSIM4v4pbigbaccGiven :1; unsigned BSIM4v4pcigbaccGiven :1; unsigned BSIM4v4paigbinvGiven :1; unsigned BSIM4v4pbigbinvGiven :1; unsigned BSIM4v4pcigbinvGiven :1; unsigned BSIM4v4pnigcGiven :1; unsigned BSIM4v4pnigbinvGiven :1; unsigned BSIM4v4pnigbaccGiven :1; unsigned BSIM4v4pntoxGiven :1; unsigned BSIM4v4peigbinvGiven :1; unsigned BSIM4v4ppigcdGiven :1; unsigned BSIM4v4ppoxedgeGiven :1; unsigned BSIM4v4pxrcrg1Given :1; unsigned BSIM4v4pxrcrg2Given :1; unsigned BSIM4v4plambdaGiven :1; unsigned BSIM4v4pvtlGiven :1; unsigned BSIM4v4pxnGiven :1; unsigned BSIM4v4pvfbsdoffGiven :1; /* CV model */ unsigned BSIM4v4pcgslGiven :1; unsigned BSIM4v4pcgdlGiven :1; unsigned BSIM4v4pckappasGiven :1; unsigned BSIM4v4pckappadGiven :1; unsigned BSIM4v4pcfGiven :1; unsigned BSIM4v4pclcGiven :1; unsigned BSIM4v4pcleGiven :1; unsigned BSIM4v4pvfbcvGiven :1; unsigned BSIM4v4pnoffGiven :1; unsigned BSIM4v4pvoffcvGiven :1; unsigned BSIM4v4pacdeGiven :1; unsigned BSIM4v4pmoinGiven :1; unsigned BSIM4v4useFringeGiven :1; unsigned BSIM4v4tnomGiven :1; unsigned BSIM4v4cgsoGiven :1; unsigned BSIM4v4cgdoGiven :1; unsigned BSIM4v4cgboGiven :1; unsigned BSIM4v4xpartGiven :1; unsigned BSIM4v4sheetResistanceGiven :1; unsigned BSIM4v4SjctSatCurDensityGiven :1; unsigned BSIM4v4SjctSidewallSatCurDensityGiven :1; unsigned BSIM4v4SjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v4SbulkJctPotentialGiven :1; unsigned BSIM4v4SbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v4SsidewallJctPotentialGiven :1; unsigned BSIM4v4SGatesidewallJctPotentialGiven :1; unsigned BSIM4v4SbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v4SunitAreaJctCapGiven :1; unsigned BSIM4v4SunitLengthSidewallJctCapGiven :1; unsigned BSIM4v4SbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v4SunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v4SjctEmissionCoeffGiven :1; unsigned BSIM4v4SjctTempExponentGiven :1; unsigned BSIM4v4DjctSatCurDensityGiven :1; unsigned BSIM4v4DjctSidewallSatCurDensityGiven :1; unsigned BSIM4v4DjctGateSidewallSatCurDensityGiven :1; unsigned BSIM4v4DbulkJctPotentialGiven :1; unsigned BSIM4v4DbulkJctBotGradingCoeffGiven :1; unsigned BSIM4v4DsidewallJctPotentialGiven :1; unsigned BSIM4v4DGatesidewallJctPotentialGiven :1; unsigned BSIM4v4DbulkJctSideGradingCoeffGiven :1; unsigned BSIM4v4DunitAreaJctCapGiven :1; unsigned BSIM4v4DunitLengthSidewallJctCapGiven :1; unsigned BSIM4v4DbulkJctGateSideGradingCoeffGiven :1; unsigned BSIM4v4DunitLengthGateSidewallJctCapGiven :1; unsigned BSIM4v4DjctEmissionCoeffGiven :1; unsigned BSIM4v4DjctTempExponentGiven :1; unsigned BSIM4v4oxideTrapDensityAGiven :1; unsigned BSIM4v4oxideTrapDensityBGiven :1; unsigned BSIM4v4oxideTrapDensityCGiven :1; unsigned BSIM4v4emGiven :1; unsigned BSIM4v4efGiven :1; unsigned BSIM4v4afGiven :1; unsigned BSIM4v4kfGiven :1; unsigned BSIM4v4LintGiven :1; unsigned BSIM4v4LlGiven :1; unsigned BSIM4v4LlcGiven :1; unsigned BSIM4v4LlnGiven :1; unsigned BSIM4v4LwGiven :1; unsigned BSIM4v4LwcGiven :1; unsigned BSIM4v4LwnGiven :1; unsigned BSIM4v4LwlGiven :1; unsigned BSIM4v4LwlcGiven :1; unsigned BSIM4v4LminGiven :1; unsigned BSIM4v4LmaxGiven :1; unsigned BSIM4v4WintGiven :1; unsigned BSIM4v4WlGiven :1; unsigned BSIM4v4WlcGiven :1; unsigned BSIM4v4WlnGiven :1; unsigned BSIM4v4WwGiven :1; unsigned BSIM4v4WwcGiven :1; unsigned BSIM4v4WwnGiven :1; unsigned BSIM4v4WwlGiven :1; unsigned BSIM4v4WwlcGiven :1; unsigned BSIM4v4WminGiven :1; unsigned BSIM4v4WmaxGiven :1; /* added for stress effect */ unsigned BSIM4v4sarefGiven :1; unsigned BSIM4v4sbrefGiven :1; unsigned BSIM4v4wlodGiven :1; unsigned BSIM4v4ku0Given :1; unsigned BSIM4v4kvsatGiven :1; unsigned BSIM4v4kvth0Given :1; unsigned BSIM4v4tku0Given :1; unsigned BSIM4v4llodku0Given :1; unsigned BSIM4v4wlodku0Given :1; unsigned BSIM4v4llodvthGiven :1; unsigned BSIM4v4wlodvthGiven :1; unsigned BSIM4v4lku0Given :1; unsigned BSIM4v4wku0Given :1; unsigned BSIM4v4pku0Given :1; unsigned BSIM4v4lkvth0Given :1; unsigned BSIM4v4wkvth0Given :1; unsigned BSIM4v4pkvth0Given :1; unsigned BSIM4v4stk2Given :1; unsigned BSIM4v4lodk2Given :1; unsigned BSIM4v4steta0Given :1; unsigned BSIM4v4lodeta0Given :1; } BSIM4v4model; #ifndef NMOS #define NMOS 1 #define PMOS -1 #endif /*NMOS*/ /* Instance parameters */ #define BSIM4v4_W 1 #define BSIM4v4_L 2 #define BSIM4v4_AS 3 #define BSIM4v4_AD 4 #define BSIM4v4_PS 5 #define BSIM4v4_PD 6 #define BSIM4v4_NRS 7 #define BSIM4v4_NRD 8 #define BSIM4v4_OFF 9 #define BSIM4v4_IC 10 #define BSIM4v4_IC_VDS 11 #define BSIM4v4_IC_VGS 12 #define BSIM4v4_IC_VBS 13 #define BSIM4v4_TRNQSMOD 14 #define BSIM4v4_RBODYMOD 15 #define BSIM4v4_RGATEMOD 16 #define BSIM4v4_GEOMOD 17 #define BSIM4v4_RGEOMOD 18 #define BSIM4v4_NF 19 #define BSIM4v4_MIN 20 #define BSIM4v4_ACNQSMOD 22 #define BSIM4v4_RBDB 23 #define BSIM4v4_RBSB 24 #define BSIM4v4_RBPB 25 #define BSIM4v4_RBPS 26 #define BSIM4v4_RBPD 27 #define BSIM4v4_SA 28 #define BSIM4v4_SB 29 #define BSIM4v4_SD 30 #define BSIM4v4_M 31 /* Global parameters */ #define BSIM4v4_MOD_TEMPMOD 89 #define BSIM4v4_MOD_IGCMOD 90 #define BSIM4v4_MOD_IGBMOD 91 #define BSIM4v4_MOD_ACNQSMOD 92 #define BSIM4v4_MOD_FNOIMOD 93 #define BSIM4v4_MOD_RDSMOD 94 #define BSIM4v4_MOD_DIOMOD 96 #define BSIM4v4_MOD_PERMOD 97 #define BSIM4v4_MOD_GEOMOD 98 #define BSIM4v4_MOD_RGATEMOD 99 #define BSIM4v4_MOD_RBODYMOD 100 #define BSIM4v4_MOD_CAPMOD 101 #define BSIM4v4_MOD_TRNQSMOD 102 #define BSIM4v4_MOD_MOBMOD 103 #define BSIM4v4_MOD_TNOIMOD 104 #define BSIM4v4_MOD_TOXE 105 #define BSIM4v4_MOD_CDSC 106 #define BSIM4v4_MOD_CDSCB 107 #define BSIM4v4_MOD_CIT 108 #define BSIM4v4_MOD_NFACTOR 109 #define BSIM4v4_MOD_XJ 110 #define BSIM4v4_MOD_VSAT 111 #define BSIM4v4_MOD_AT 112 #define BSIM4v4_MOD_A0 113 #define BSIM4v4_MOD_A1 114 #define BSIM4v4_MOD_A2 115 #define BSIM4v4_MOD_KETA 116 #define BSIM4v4_MOD_NSUB 117 #define BSIM4v4_MOD_NDEP 118 #define BSIM4v4_MOD_NGATE 120 #define BSIM4v4_MOD_GAMMA1 121 #define BSIM4v4_MOD_GAMMA2 122 #define BSIM4v4_MOD_VBX 123 #define BSIM4v4_MOD_BINUNIT 124 #define BSIM4v4_MOD_VBM 125 #define BSIM4v4_MOD_XT 126 #define BSIM4v4_MOD_K1 129 #define BSIM4v4_MOD_KT1 130 #define BSIM4v4_MOD_KT1L 131 #define BSIM4v4_MOD_K2 132 #define BSIM4v4_MOD_KT2 133 #define BSIM4v4_MOD_K3 134 #define BSIM4v4_MOD_K3B 135 #define BSIM4v4_MOD_W0 136 #define BSIM4v4_MOD_LPE0 137 #define BSIM4v4_MOD_DVT0 138 #define BSIM4v4_MOD_DVT1 139 #define BSIM4v4_MOD_DVT2 140 #define BSIM4v4_MOD_DVT0W 141 #define BSIM4v4_MOD_DVT1W 142 #define BSIM4v4_MOD_DVT2W 143 #define BSIM4v4_MOD_DROUT 144 #define BSIM4v4_MOD_DSUB 145 #define BSIM4v4_MOD_VTH0 146 #define BSIM4v4_MOD_UA 147 #define BSIM4v4_MOD_UA1 148 #define BSIM4v4_MOD_UB 149 #define BSIM4v4_MOD_UB1 150 #define BSIM4v4_MOD_UC 151 #define BSIM4v4_MOD_UC1 152 #define BSIM4v4_MOD_U0 153 #define BSIM4v4_MOD_UTE 154 #define BSIM4v4_MOD_VOFF 155 #define BSIM4v4_MOD_DELTA 156 #define BSIM4v4_MOD_RDSW 157 #define BSIM4v4_MOD_PRT 158 #define BSIM4v4_MOD_LDD 159 #define BSIM4v4_MOD_ETA 160 #define BSIM4v4_MOD_ETA0 161 #define BSIM4v4_MOD_ETAB 162 #define BSIM4v4_MOD_PCLM 163 #define BSIM4v4_MOD_PDIBL1 164 #define BSIM4v4_MOD_PDIBL2 165 #define BSIM4v4_MOD_PSCBE1 166 #define BSIM4v4_MOD_PSCBE2 167 #define BSIM4v4_MOD_PVAG 168 #define BSIM4v4_MOD_WR 169 #define BSIM4v4_MOD_DWG 170 #define BSIM4v4_MOD_DWB 171 #define BSIM4v4_MOD_B0 172 #define BSIM4v4_MOD_B1 173 #define BSIM4v4_MOD_ALPHA0 174 #define BSIM4v4_MOD_BETA0 175 #define BSIM4v4_MOD_PDIBLB 178 #define BSIM4v4_MOD_PRWG 179 #define BSIM4v4_MOD_PRWB 180 #define BSIM4v4_MOD_CDSCD 181 #define BSIM4v4_MOD_AGS 182 #define BSIM4v4_MOD_FRINGE 184 #define BSIM4v4_MOD_CGSL 186 #define BSIM4v4_MOD_CGDL 187 #define BSIM4v4_MOD_CKAPPAS 188 #define BSIM4v4_MOD_CF 189 #define BSIM4v4_MOD_CLC 190 #define BSIM4v4_MOD_CLE 191 #define BSIM4v4_MOD_PARAMCHK 192 #define BSIM4v4_MOD_VERSION 193 #define BSIM4v4_MOD_VFBCV 194 #define BSIM4v4_MOD_ACDE 195 #define BSIM4v4_MOD_MOIN 196 #define BSIM4v4_MOD_NOFF 197 #define BSIM4v4_MOD_IJTHDFWD 198 #define BSIM4v4_MOD_ALPHA1 199 #define BSIM4v4_MOD_VFB 200 #define BSIM4v4_MOD_TOXM 201 #define BSIM4v4_MOD_TCJ 202 #define BSIM4v4_MOD_TCJSW 203 #define BSIM4v4_MOD_TCJSWG 204 #define BSIM4v4_MOD_TPB 205 #define BSIM4v4_MOD_TPBSW 206 #define BSIM4v4_MOD_TPBSWG 207 #define BSIM4v4_MOD_VOFFCV 208 #define BSIM4v4_MOD_GBMIN 209 #define BSIM4v4_MOD_RBDB 210 #define BSIM4v4_MOD_RBSB 211 #define BSIM4v4_MOD_RBPB 212 #define BSIM4v4_MOD_RBPS 213 #define BSIM4v4_MOD_RBPD 214 #define BSIM4v4_MOD_DMCG 215 #define BSIM4v4_MOD_DMCI 216 #define BSIM4v4_MOD_DMDG 217 #define BSIM4v4_MOD_XGW 218 #define BSIM4v4_MOD_XGL 219 #define BSIM4v4_MOD_RSHG 220 #define BSIM4v4_MOD_NGCON 221 #define BSIM4v4_MOD_AGIDL 222 #define BSIM4v4_MOD_BGIDL 223 #define BSIM4v4_MOD_EGIDL 224 #define BSIM4v4_MOD_IJTHSFWD 225 #define BSIM4v4_MOD_XJBVD 226 #define BSIM4v4_MOD_XJBVS 227 #define BSIM4v4_MOD_BVD 228 #define BSIM4v4_MOD_BVS 229 #define BSIM4v4_MOD_TOXP 230 #define BSIM4v4_MOD_DTOX 231 #define BSIM4v4_MOD_XRCRG1 232 #define BSIM4v4_MOD_XRCRG2 233 #define BSIM4v4_MOD_EU 234 #define BSIM4v4_MOD_IJTHSREV 235 #define BSIM4v4_MOD_IJTHDREV 236 #define BSIM4v4_MOD_MINV 237 #define BSIM4v4_MOD_VOFFL 238 #define BSIM4v4_MOD_PDITS 239 #define BSIM4v4_MOD_PDITSD 240 #define BSIM4v4_MOD_PDITSL 241 #define BSIM4v4_MOD_TNOIA 242 #define BSIM4v4_MOD_TNOIB 243 #define BSIM4v4_MOD_NTNOI 244 #define BSIM4v4_MOD_FPROUT 245 #define BSIM4v4_MOD_LPEB 246 #define BSIM4v4_MOD_DVTP0 247 #define BSIM4v4_MOD_DVTP1 248 #define BSIM4v4_MOD_CGIDL 249 #define BSIM4v4_MOD_PHIN 250 #define BSIM4v4_MOD_RDSWMIN 251 #define BSIM4v4_MOD_RSW 252 #define BSIM4v4_MOD_RDW 253 #define BSIM4v4_MOD_RDWMIN 254 #define BSIM4v4_MOD_RSWMIN 255 #define BSIM4v4_MOD_NSD 256 #define BSIM4v4_MOD_CKAPPAD 257 #define BSIM4v4_MOD_DMCGT 258 #define BSIM4v4_MOD_AIGC 259 #define BSIM4v4_MOD_BIGC 260 #define BSIM4v4_MOD_CIGC 261 #define BSIM4v4_MOD_AIGBACC 262 #define BSIM4v4_MOD_BIGBACC 263 #define BSIM4v4_MOD_CIGBACC 264 #define BSIM4v4_MOD_AIGBINV 265 #define BSIM4v4_MOD_BIGBINV 266 #define BSIM4v4_MOD_CIGBINV 267 #define BSIM4v4_MOD_NIGC 268 #define BSIM4v4_MOD_NIGBACC 269 #define BSIM4v4_MOD_NIGBINV 270 #define BSIM4v4_MOD_NTOX 271 #define BSIM4v4_MOD_TOXREF 272 #define BSIM4v4_MOD_EIGBINV 273 #define BSIM4v4_MOD_PIGCD 274 #define BSIM4v4_MOD_POXEDGE 275 #define BSIM4v4_MOD_EPSROX 276 #define BSIM4v4_MOD_AIGSD 277 #define BSIM4v4_MOD_BIGSD 278 #define BSIM4v4_MOD_CIGSD 279 #define BSIM4v4_MOD_JSWGS 280 #define BSIM4v4_MOD_JSWGD 281 #define BSIM4v4_MOD_LAMBDA 282 #define BSIM4v4_MOD_VTL 283 #define BSIM4v4_MOD_LC 284 #define BSIM4v4_MOD_XN 285 #define BSIM4v4_MOD_RNOIA 286 #define BSIM4v4_MOD_RNOIB 287 #define BSIM4v4_MOD_VFBSDOFF 288 #define BSIM4v4_MOD_LINTNOI 289 /* Length dependence */ #define BSIM4v4_MOD_LCDSC 301 #define BSIM4v4_MOD_LCDSCB 302 #define BSIM4v4_MOD_LCIT 303 #define BSIM4v4_MOD_LNFACTOR 304 #define BSIM4v4_MOD_LXJ 305 #define BSIM4v4_MOD_LVSAT 306 #define BSIM4v4_MOD_LAT 307 #define BSIM4v4_MOD_LA0 308 #define BSIM4v4_MOD_LA1 309 #define BSIM4v4_MOD_LA2 310 #define BSIM4v4_MOD_LKETA 311 #define BSIM4v4_MOD_LNSUB 312 #define BSIM4v4_MOD_LNDEP 313 #define BSIM4v4_MOD_LNGATE 315 #define BSIM4v4_MOD_LGAMMA1 316 #define BSIM4v4_MOD_LGAMMA2 317 #define BSIM4v4_MOD_LVBX 318 #define BSIM4v4_MOD_LVBM 320 #define BSIM4v4_MOD_LXT 322 #define BSIM4v4_MOD_LK1 325 #define BSIM4v4_MOD_LKT1 326 #define BSIM4v4_MOD_LKT1L 327 #define BSIM4v4_MOD_LK2 328 #define BSIM4v4_MOD_LKT2 329 #define BSIM4v4_MOD_LK3 330 #define BSIM4v4_MOD_LK3B 331 #define BSIM4v4_MOD_LW0 332 #define BSIM4v4_MOD_LLPE0 333 #define BSIM4v4_MOD_LDVT0 334 #define BSIM4v4_MOD_LDVT1 335 #define BSIM4v4_MOD_LDVT2 336 #define BSIM4v4_MOD_LDVT0W 337 #define BSIM4v4_MOD_LDVT1W 338 #define BSIM4v4_MOD_LDVT2W 339 #define BSIM4v4_MOD_LDROUT 340 #define BSIM4v4_MOD_LDSUB 341 #define BSIM4v4_MOD_LVTH0 342 #define BSIM4v4_MOD_LUA 343 #define BSIM4v4_MOD_LUA1 344 #define BSIM4v4_MOD_LUB 345 #define BSIM4v4_MOD_LUB1 346 #define BSIM4v4_MOD_LUC 347 #define BSIM4v4_MOD_LUC1 348 #define BSIM4v4_MOD_LU0 349 #define BSIM4v4_MOD_LUTE 350 #define BSIM4v4_MOD_LVOFF 351 #define BSIM4v4_MOD_LDELTA 352 #define BSIM4v4_MOD_LRDSW 353 #define BSIM4v4_MOD_LPRT 354 #define BSIM4v4_MOD_LLDD 355 #define BSIM4v4_MOD_LETA 356 #define BSIM4v4_MOD_LETA0 357 #define BSIM4v4_MOD_LETAB 358 #define BSIM4v4_MOD_LPCLM 359 #define BSIM4v4_MOD_LPDIBL1 360 #define BSIM4v4_MOD_LPDIBL2 361 #define BSIM4v4_MOD_LPSCBE1 362 #define BSIM4v4_MOD_LPSCBE2 363 #define BSIM4v4_MOD_LPVAG 364 #define BSIM4v4_MOD_LWR 365 #define BSIM4v4_MOD_LDWG 366 #define BSIM4v4_MOD_LDWB 367 #define BSIM4v4_MOD_LB0 368 #define BSIM4v4_MOD_LB1 369 #define BSIM4v4_MOD_LALPHA0 370 #define BSIM4v4_MOD_LBETA0 371 #define BSIM4v4_MOD_LPDIBLB 374 #define BSIM4v4_MOD_LPRWG 375 #define BSIM4v4_MOD_LPRWB 376 #define BSIM4v4_MOD_LCDSCD 377 #define BSIM4v4_MOD_LAGS 378 #define BSIM4v4_MOD_LFRINGE 381 #define BSIM4v4_MOD_LCGSL 383 #define BSIM4v4_MOD_LCGDL 384 #define BSIM4v4_MOD_LCKAPPAS 385 #define BSIM4v4_MOD_LCF 386 #define BSIM4v4_MOD_LCLC 387 #define BSIM4v4_MOD_LCLE 388 #define BSIM4v4_MOD_LVFBCV 389 #define BSIM4v4_MOD_LACDE 390 #define BSIM4v4_MOD_LMOIN 391 #define BSIM4v4_MOD_LNOFF 392 #define BSIM4v4_MOD_LALPHA1 394 #define BSIM4v4_MOD_LVFB 395 #define BSIM4v4_MOD_LVOFFCV 396 #define BSIM4v4_MOD_LAGIDL 397 #define BSIM4v4_MOD_LBGIDL 398 #define BSIM4v4_MOD_LEGIDL 399 #define BSIM4v4_MOD_LXRCRG1 400 #define BSIM4v4_MOD_LXRCRG2 401 #define BSIM4v4_MOD_LEU 402 #define BSIM4v4_MOD_LMINV 403 #define BSIM4v4_MOD_LPDITS 404 #define BSIM4v4_MOD_LPDITSD 405 #define BSIM4v4_MOD_LFPROUT 406 #define BSIM4v4_MOD_LLPEB 407 #define BSIM4v4_MOD_LDVTP0 408 #define BSIM4v4_MOD_LDVTP1 409 #define BSIM4v4_MOD_LCGIDL 410 #define BSIM4v4_MOD_LPHIN 411 #define BSIM4v4_MOD_LRSW 412 #define BSIM4v4_MOD_LRDW 413 #define BSIM4v4_MOD_LNSD 414 #define BSIM4v4_MOD_LCKAPPAD 415 #define BSIM4v4_MOD_LAIGC 416 #define BSIM4v4_MOD_LBIGC 417 #define BSIM4v4_MOD_LCIGC 418 #define BSIM4v4_MOD_LAIGBACC 419 #define BSIM4v4_MOD_LBIGBACC 420 #define BSIM4v4_MOD_LCIGBACC 421 #define BSIM4v4_MOD_LAIGBINV 422 #define BSIM4v4_MOD_LBIGBINV 423 #define BSIM4v4_MOD_LCIGBINV 424 #define BSIM4v4_MOD_LNIGC 425 #define BSIM4v4_MOD_LNIGBACC 426 #define BSIM4v4_MOD_LNIGBINV 427 #define BSIM4v4_MOD_LNTOX 428 #define BSIM4v4_MOD_LEIGBINV 429 #define BSIM4v4_MOD_LPIGCD 430 #define BSIM4v4_MOD_LPOXEDGE 431 #define BSIM4v4_MOD_LAIGSD 432 #define BSIM4v4_MOD_LBIGSD 433 #define BSIM4v4_MOD_LCIGSD 434 #define BSIM4v4_MOD_LLAMBDA 435 #define BSIM4v4_MOD_LVTL 436 #define BSIM4v4_MOD_LXN 437 #define BSIM4v4_MOD_LVFBSDOFF 438 /* Width dependence */ #define BSIM4v4_MOD_WCDSC 481 #define BSIM4v4_MOD_WCDSCB 482 #define BSIM4v4_MOD_WCIT 483 #define BSIM4v4_MOD_WNFACTOR 484 #define BSIM4v4_MOD_WXJ 485 #define BSIM4v4_MOD_WVSAT 486 #define BSIM4v4_MOD_WAT 487 #define BSIM4v4_MOD_WA0 488 #define BSIM4v4_MOD_WA1 489 #define BSIM4v4_MOD_WA2 490 #define BSIM4v4_MOD_WKETA 491 #define BSIM4v4_MOD_WNSUB 492 #define BSIM4v4_MOD_WNDEP 493 #define BSIM4v4_MOD_WNGATE 495 #define BSIM4v4_MOD_WGAMMA1 496 #define BSIM4v4_MOD_WGAMMA2 497 #define BSIM4v4_MOD_WVBX 498 #define BSIM4v4_MOD_WVBM 500 #define BSIM4v4_MOD_WXT 502 #define BSIM4v4_MOD_WK1 505 #define BSIM4v4_MOD_WKT1 506 #define BSIM4v4_MOD_WKT1L 507 #define BSIM4v4_MOD_WK2 508 #define BSIM4v4_MOD_WKT2 509 #define BSIM4v4_MOD_WK3 510 #define BSIM4v4_MOD_WK3B 511 #define BSIM4v4_MOD_WW0 512 #define BSIM4v4_MOD_WLPE0 513 #define BSIM4v4_MOD_WDVT0 514 #define BSIM4v4_MOD_WDVT1 515 #define BSIM4v4_MOD_WDVT2 516 #define BSIM4v4_MOD_WDVT0W 517 #define BSIM4v4_MOD_WDVT1W 518 #define BSIM4v4_MOD_WDVT2W 519 #define BSIM4v4_MOD_WDROUT 520 #define BSIM4v4_MOD_WDSUB 521 #define BSIM4v4_MOD_WVTH0 522 #define BSIM4v4_MOD_WUA 523 #define BSIM4v4_MOD_WUA1 524 #define BSIM4v4_MOD_WUB 525 #define BSIM4v4_MOD_WUB1 526 #define BSIM4v4_MOD_WUC 527 #define BSIM4v4_MOD_WUC1 528 #define BSIM4v4_MOD_WU0 529 #define BSIM4v4_MOD_WUTE 530 #define BSIM4v4_MOD_WVOFF 531 #define BSIM4v4_MOD_WDELTA 532 #define BSIM4v4_MOD_WRDSW 533 #define BSIM4v4_MOD_WPRT 534 #define BSIM4v4_MOD_WLDD 535 #define BSIM4v4_MOD_WETA 536 #define BSIM4v4_MOD_WETA0 537 #define BSIM4v4_MOD_WETAB 538 #define BSIM4v4_MOD_WPCLM 539 #define BSIM4v4_MOD_WPDIBL1 540 #define BSIM4v4_MOD_WPDIBL2 541 #define BSIM4v4_MOD_WPSCBE1 542 #define BSIM4v4_MOD_WPSCBE2 543 #define BSIM4v4_MOD_WPVAG 544 #define BSIM4v4_MOD_WWR 545 #define BSIM4v4_MOD_WDWG 546 #define BSIM4v4_MOD_WDWB 547 #define BSIM4v4_MOD_WB0 548 #define BSIM4v4_MOD_WB1 549 #define BSIM4v4_MOD_WALPHA0 550 #define BSIM4v4_MOD_WBETA0 551 #define BSIM4v4_MOD_WPDIBLB 554 #define BSIM4v4_MOD_WPRWG 555 #define BSIM4v4_MOD_WPRWB 556 #define BSIM4v4_MOD_WCDSCD 557 #define BSIM4v4_MOD_WAGS 558 #define BSIM4v4_MOD_WFRINGE 561 #define BSIM4v4_MOD_WCGSL 563 #define BSIM4v4_MOD_WCGDL 564 #define BSIM4v4_MOD_WCKAPPAS 565 #define BSIM4v4_MOD_WCF 566 #define BSIM4v4_MOD_WCLC 567 #define BSIM4v4_MOD_WCLE 568 #define BSIM4v4_MOD_WVFBCV 569 #define BSIM4v4_MOD_WACDE 570 #define BSIM4v4_MOD_WMOIN 571 #define BSIM4v4_MOD_WNOFF 572 #define BSIM4v4_MOD_WALPHA1 574 #define BSIM4v4_MOD_WVFB 575 #define BSIM4v4_MOD_WVOFFCV 576 #define BSIM4v4_MOD_WAGIDL 577 #define BSIM4v4_MOD_WBGIDL 578 #define BSIM4v4_MOD_WEGIDL 579 #define BSIM4v4_MOD_WXRCRG1 580 #define BSIM4v4_MOD_WXRCRG2 581 #define BSIM4v4_MOD_WEU 582 #define BSIM4v4_MOD_WMINV 583 #define BSIM4v4_MOD_WPDITS 584 #define BSIM4v4_MOD_WPDITSD 585 #define BSIM4v4_MOD_WFPROUT 586 #define BSIM4v4_MOD_WLPEB 587 #define BSIM4v4_MOD_WDVTP0 588 #define BSIM4v4_MOD_WDVTP1 589 #define BSIM4v4_MOD_WCGIDL 590 #define BSIM4v4_MOD_WPHIN 591 #define BSIM4v4_MOD_WRSW 592 #define BSIM4v4_MOD_WRDW 593 #define BSIM4v4_MOD_WNSD 594 #define BSIM4v4_MOD_WCKAPPAD 595 #define BSIM4v4_MOD_WAIGC 596 #define BSIM4v4_MOD_WBIGC 597 #define BSIM4v4_MOD_WCIGC 598 #define BSIM4v4_MOD_WAIGBACC 599 #define BSIM4v4_MOD_WBIGBACC 600 #define BSIM4v4_MOD_WCIGBACC 601 #define BSIM4v4_MOD_WAIGBINV 602 #define BSIM4v4_MOD_WBIGBINV 603 #define BSIM4v4_MOD_WCIGBINV 604 #define BSIM4v4_MOD_WNIGC 605 #define BSIM4v4_MOD_WNIGBACC 606 #define BSIM4v4_MOD_WNIGBINV 607 #define BSIM4v4_MOD_WNTOX 608 #define BSIM4v4_MOD_WEIGBINV 609 #define BSIM4v4_MOD_WPIGCD 610 #define BSIM4v4_MOD_WPOXEDGE 611 #define BSIM4v4_MOD_WAIGSD 612 #define BSIM4v4_MOD_WBIGSD 613 #define BSIM4v4_MOD_WCIGSD 614 #define BSIM4v4_MOD_WLAMBDA 615 #define BSIM4v4_MOD_WVTL 616 #define BSIM4v4_MOD_WXN 617 #define BSIM4v4_MOD_WVFBSDOFF 618 /* Cross-term dependence */ #define BSIM4v4_MOD_PCDSC 661 #define BSIM4v4_MOD_PCDSCB 662 #define BSIM4v4_MOD_PCIT 663 #define BSIM4v4_MOD_PNFACTOR 664 #define BSIM4v4_MOD_PXJ 665 #define BSIM4v4_MOD_PVSAT 666 #define BSIM4v4_MOD_PAT 667 #define BSIM4v4_MOD_PA0 668 #define BSIM4v4_MOD_PA1 669 #define BSIM4v4_MOD_PA2 670 #define BSIM4v4_MOD_PKETA 671 #define BSIM4v4_MOD_PNSUB 672 #define BSIM4v4_MOD_PNDEP 673 #define BSIM4v4_MOD_PNGATE 675 #define BSIM4v4_MOD_PGAMMA1 676 #define BSIM4v4_MOD_PGAMMA2 677 #define BSIM4v4_MOD_PVBX 678 #define BSIM4v4_MOD_PVBM 680 #define BSIM4v4_MOD_PXT 682 #define BSIM4v4_MOD_PK1 685 #define BSIM4v4_MOD_PKT1 686 #define BSIM4v4_MOD_PKT1L 687 #define BSIM4v4_MOD_PK2 688 #define BSIM4v4_MOD_PKT2 689 #define BSIM4v4_MOD_PK3 690 #define BSIM4v4_MOD_PK3B 691 #define BSIM4v4_MOD_PW0 692 #define BSIM4v4_MOD_PLPE0 693 #define BSIM4v4_MOD_PDVT0 694 #define BSIM4v4_MOD_PDVT1 695 #define BSIM4v4_MOD_PDVT2 696 #define BSIM4v4_MOD_PDVT0W 697 #define BSIM4v4_MOD_PDVT1W 698 #define BSIM4v4_MOD_PDVT2W 699 #define BSIM4v4_MOD_PDROUT 700 #define BSIM4v4_MOD_PDSUB 701 #define BSIM4v4_MOD_PVTH0 702 #define BSIM4v4_MOD_PUA 703 #define BSIM4v4_MOD_PUA1 704 #define BSIM4v4_MOD_PUB 705 #define BSIM4v4_MOD_PUB1 706 #define BSIM4v4_MOD_PUC 707 #define BSIM4v4_MOD_PUC1 708 #define BSIM4v4_MOD_PU0 709 #define BSIM4v4_MOD_PUTE 710 #define BSIM4v4_MOD_PVOFF 711 #define BSIM4v4_MOD_PDELTA 712 #define BSIM4v4_MOD_PRDSW 713 #define BSIM4v4_MOD_PPRT 714 #define BSIM4v4_MOD_PLDD 715 #define BSIM4v4_MOD_PETA 716 #define BSIM4v4_MOD_PETA0 717 #define BSIM4v4_MOD_PETAB 718 #define BSIM4v4_MOD_PPCLM 719 #define BSIM4v4_MOD_PPDIBL1 720 #define BSIM4v4_MOD_PPDIBL2 721 #define BSIM4v4_MOD_PPSCBE1 722 #define BSIM4v4_MOD_PPSCBE2 723 #define BSIM4v4_MOD_PPVAG 724 #define BSIM4v4_MOD_PWR 725 #define BSIM4v4_MOD_PDWG 726 #define BSIM4v4_MOD_PDWB 727 #define BSIM4v4_MOD_PB0 728 #define BSIM4v4_MOD_PB1 729 #define BSIM4v4_MOD_PALPHA0 730 #define BSIM4v4_MOD_PBETA0 731 #define BSIM4v4_MOD_PPDIBLB 734 #define BSIM4v4_MOD_PPRWG 735 #define BSIM4v4_MOD_PPRWB 736 #define BSIM4v4_MOD_PCDSCD 737 #define BSIM4v4_MOD_PAGS 738 #define BSIM4v4_MOD_PFRINGE 741 #define BSIM4v4_MOD_PCGSL 743 #define BSIM4v4_MOD_PCGDL 744 #define BSIM4v4_MOD_PCKAPPAS 745 #define BSIM4v4_MOD_PCF 746 #define BSIM4v4_MOD_PCLC 747 #define BSIM4v4_MOD_PCLE 748 #define BSIM4v4_MOD_PVFBCV 749 #define BSIM4v4_MOD_PACDE 750 #define BSIM4v4_MOD_PMOIN 751 #define BSIM4v4_MOD_PNOFF 752 #define BSIM4v4_MOD_PALPHA1 754 #define BSIM4v4_MOD_PVFB 755 #define BSIM4v4_MOD_PVOFFCV 756 #define BSIM4v4_MOD_PAGIDL 757 #define BSIM4v4_MOD_PBGIDL 758 #define BSIM4v4_MOD_PEGIDL 759 #define BSIM4v4_MOD_PXRCRG1 760 #define BSIM4v4_MOD_PXRCRG2 761 #define BSIM4v4_MOD_PEU 762 #define BSIM4v4_MOD_PMINV 763 #define BSIM4v4_MOD_PPDITS 764 #define BSIM4v4_MOD_PPDITSD 765 #define BSIM4v4_MOD_PFPROUT 766 #define BSIM4v4_MOD_PLPEB 767 #define BSIM4v4_MOD_PDVTP0 768 #define BSIM4v4_MOD_PDVTP1 769 #define BSIM4v4_MOD_PCGIDL 770 #define BSIM4v4_MOD_PPHIN 771 #define BSIM4v4_MOD_PRSW 772 #define BSIM4v4_MOD_PRDW 773 #define BSIM4v4_MOD_PNSD 774 #define BSIM4v4_MOD_PCKAPPAD 775 #define BSIM4v4_MOD_PAIGC 776 #define BSIM4v4_MOD_PBIGC 777 #define BSIM4v4_MOD_PCIGC 778 #define BSIM4v4_MOD_PAIGBACC 779 #define BSIM4v4_MOD_PBIGBACC 780 #define BSIM4v4_MOD_PCIGBACC 781 #define BSIM4v4_MOD_PAIGBINV 782 #define BSIM4v4_MOD_PBIGBINV 783 #define BSIM4v4_MOD_PCIGBINV 784 #define BSIM4v4_MOD_PNIGC 785 #define BSIM4v4_MOD_PNIGBACC 786 #define BSIM4v4_MOD_PNIGBINV 787 #define BSIM4v4_MOD_PNTOX 788 #define BSIM4v4_MOD_PEIGBINV 789 #define BSIM4v4_MOD_PPIGCD 790 #define BSIM4v4_MOD_PPOXEDGE 791 #define BSIM4v4_MOD_PAIGSD 792 #define BSIM4v4_MOD_PBIGSD 793 #define BSIM4v4_MOD_PCIGSD 794 #define BSIM4v4_MOD_SAREF 795 #define BSIM4v4_MOD_SBREF 796 #define BSIM4v4_MOD_KU0 797 #define BSIM4v4_MOD_KVSAT 798 #define BSIM4v4_MOD_TKU0 799 #define BSIM4v4_MOD_LLODKU0 800 #define BSIM4v4_MOD_WLODKU0 801 #define BSIM4v4_MOD_LLODVTH 802 #define BSIM4v4_MOD_WLODVTH 803 #define BSIM4v4_MOD_LKU0 804 #define BSIM4v4_MOD_WKU0 805 #define BSIM4v4_MOD_PKU0 806 #define BSIM4v4_MOD_KVTH0 807 #define BSIM4v4_MOD_LKVTH0 808 #define BSIM4v4_MOD_WKVTH0 809 #define BSIM4v4_MOD_PKVTH0 810 #define BSIM4v4_MOD_WLOD 811 #define BSIM4v4_MOD_STK2 812 #define BSIM4v4_MOD_LODK2 813 #define BSIM4v4_MOD_STETA0 814 #define BSIM4v4_MOD_LODETA0 815 #define BSIM4v4_MOD_PLAMBDA 825 #define BSIM4v4_MOD_PVTL 826 #define BSIM4v4_MOD_PXN 827 #define BSIM4v4_MOD_PVFBSDOFF 828 #define BSIM4v4_MOD_TNOM 831 #define BSIM4v4_MOD_CGSO 832 #define BSIM4v4_MOD_CGDO 833 #define BSIM4v4_MOD_CGBO 834 #define BSIM4v4_MOD_XPART 835 #define BSIM4v4_MOD_RSH 836 #define BSIM4v4_MOD_JSS 837 #define BSIM4v4_MOD_PBS 838 #define BSIM4v4_MOD_MJS 839 #define BSIM4v4_MOD_PBSWS 840 #define BSIM4v4_MOD_MJSWS 841 #define BSIM4v4_MOD_CJS 842 #define BSIM4v4_MOD_CJSWS 843 #define BSIM4v4_MOD_NMOS 844 #define BSIM4v4_MOD_PMOS 845 #define BSIM4v4_MOD_NOIA 846 #define BSIM4v4_MOD_NOIB 847 #define BSIM4v4_MOD_NOIC 848 #define BSIM4v4_MOD_LINT 849 #define BSIM4v4_MOD_LL 850 #define BSIM4v4_MOD_LLN 851 #define BSIM4v4_MOD_LW 852 #define BSIM4v4_MOD_LWN 853 #define BSIM4v4_MOD_LWL 854 #define BSIM4v4_MOD_LMIN 855 #define BSIM4v4_MOD_LMAX 856 #define BSIM4v4_MOD_WINT 857 #define BSIM4v4_MOD_WL 858 #define BSIM4v4_MOD_WLN 859 #define BSIM4v4_MOD_WW 860 #define BSIM4v4_MOD_WWN 861 #define BSIM4v4_MOD_WWL 862 #define BSIM4v4_MOD_WMIN 863 #define BSIM4v4_MOD_WMAX 864 #define BSIM4v4_MOD_DWC 865 #define BSIM4v4_MOD_DLC 866 #define BSIM4v4_MOD_XL 867 #define BSIM4v4_MOD_XW 868 #define BSIM4v4_MOD_EM 869 #define BSIM4v4_MOD_EF 870 #define BSIM4v4_MOD_AF 871 #define BSIM4v4_MOD_KF 872 #define BSIM4v4_MOD_NJS 873 #define BSIM4v4_MOD_XTIS 874 #define BSIM4v4_MOD_PBSWGS 875 #define BSIM4v4_MOD_MJSWGS 876 #define BSIM4v4_MOD_CJSWGS 877 #define BSIM4v4_MOD_JSWS 878 #define BSIM4v4_MOD_LLC 879 #define BSIM4v4_MOD_LWC 880 #define BSIM4v4_MOD_LWLC 881 #define BSIM4v4_MOD_WLC 882 #define BSIM4v4_MOD_WWC 883 #define BSIM4v4_MOD_WWLC 884 #define BSIM4v4_MOD_DWJ 885 #define BSIM4v4_MOD_JSD 886 #define BSIM4v4_MOD_PBD 887 #define BSIM4v4_MOD_MJD 888 #define BSIM4v4_MOD_PBSWD 889 #define BSIM4v4_MOD_MJSWD 890 #define BSIM4v4_MOD_CJD 891 #define BSIM4v4_MOD_CJSWD 892 #define BSIM4v4_MOD_NJD 893 #define BSIM4v4_MOD_XTID 894 #define BSIM4v4_MOD_PBSWGD 895 #define BSIM4v4_MOD_MJSWGD 896 #define BSIM4v4_MOD_CJSWGD 897 #define BSIM4v4_MOD_JSWD 898 #define BSIM4v4_MOD_DLCIG 899 /* trap-assisted tunneling */ #define BSIM4v4_MOD_JTSS 900 #define BSIM4v4_MOD_JTSD 901 #define BSIM4v4_MOD_JTSSWS 902 #define BSIM4v4_MOD_JTSSWD 903 #define BSIM4v4_MOD_JTSSWGS 904 #define BSIM4v4_MOD_JTSSWGD 905 #define BSIM4v4_MOD_NJTS 906 #define BSIM4v4_MOD_NJTSSW 907 #define BSIM4v4_MOD_NJTSSWG 908 #define BSIM4v4_MOD_XTSS 909 #define BSIM4v4_MOD_XTSD 910 #define BSIM4v4_MOD_XTSSWS 911 #define BSIM4v4_MOD_XTSSWD 912 #define BSIM4v4_MOD_XTSSWGS 913 #define BSIM4v4_MOD_XTSSWGD 914 #define BSIM4v4_MOD_TNJTS 915 #define BSIM4v4_MOD_TNJTSSW 916 #define BSIM4v4_MOD_TNJTSSWG 917 #define BSIM4v4_MOD_VTSS 918 #define BSIM4v4_MOD_VTSD 919 #define BSIM4v4_MOD_VTSSWS 920 #define BSIM4v4_MOD_VTSSWD 921 #define BSIM4v4_MOD_VTSSWGS 922 #define BSIM4v4_MOD_VTSSWGD 923 /* device questions */ #define BSIM4v4_DNODE 945 #define BSIM4v4_GNODEEXT 946 #define BSIM4v4_SNODE 947 #define BSIM4v4_BNODE 948 #define BSIM4v4_DNODEPRIME 949 #define BSIM4v4_GNODEPRIME 950 #define BSIM4v4_GNODEMIDE 951 #define BSIM4v4_GNODEMID 952 #define BSIM4v4_SNODEPRIME 953 #define BSIM4v4_BNODEPRIME 954 #define BSIM4v4_DBNODE 955 #define BSIM4v4_SBNODE 956 #define BSIM4v4_VBD 957 #define BSIM4v4_VBS 958 #define BSIM4v4_VGS 959 #define BSIM4v4_VDS 960 #define BSIM4v4_CD 961 #define BSIM4v4_CBS 962 #define BSIM4v4_CBD 963 #define BSIM4v4_GM 964 #define BSIM4v4_GDS 965 #define BSIM4v4_GMBS 966 #define BSIM4v4_GBD 967 #define BSIM4v4_GBS 968 #define BSIM4v4_QB 969 #define BSIM4v4_CQB 970 #define BSIM4v4_QG 971 #define BSIM4v4_CQG 972 #define BSIM4v4_QD 973 #define BSIM4v4_CQD 974 #define BSIM4v4_CGGB 975 #define BSIM4v4_CGDB 976 #define BSIM4v4_CGSB 977 #define BSIM4v4_CBGB 978 #define BSIM4v4_CAPBD 979 #define BSIM4v4_CQBD 980 #define BSIM4v4_CAPBS 981 #define BSIM4v4_CQBS 982 #define BSIM4v4_CDGB 983 #define BSIM4v4_CDDB 984 #define BSIM4v4_CDSB 985 #define BSIM4v4_VON 986 #define BSIM4v4_VDSAT 987 #define BSIM4v4_QBS 988 #define BSIM4v4_QBD 989 #define BSIM4v4_SOURCECONDUCT 990 #define BSIM4v4_DRAINCONDUCT 991 #define BSIM4v4_CBDB 992 #define BSIM4v4_CBSB 993 #define BSIM4v4_CSUB 994 #define BSIM4v4_QINV 995 #define BSIM4v4_IGIDL 996 #define BSIM4v4_CSGB 997 #define BSIM4v4_CSDB 998 #define BSIM4v4_CSSB 999 #define BSIM4v4_CGBB 1000 #define BSIM4v4_CDBB 1001 #define BSIM4v4_CSBB 1002 #define BSIM4v4_CBBB 1003 #define BSIM4v4_QS 1004 #define BSIM4v4_IGISL 1005 #define BSIM4v4_IGS 1006 #define BSIM4v4_IGD 1007 #define BSIM4v4_IGB 1008 #define BSIM4v4_IGCS 1009 #define BSIM4v4_IGCD 1010 #include "bsim4v4ext.h" extern void BSIM4v4evaluate(double,double,double,BSIM4v4instance*,BSIM4v4model*, double*,double*,double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, CKTcircuit*); extern int BSIM4v4debug(BSIM4v4model*, BSIM4v4instance*, CKTcircuit*, int); extern int BSIM4v4checkModel(BSIM4v4model*, BSIM4v4instance*, CKTcircuit*); extern int BSIM4v4PAeffGeo(double, int, int, double, double, double, double, double *, double *, double *, double *); extern int BSIM4v4RdseffGeo(double, int, int, int, double, double, double, double, double, int, double *); #endif /*BSIM4v4*/ ngspice-26/src/spicelib/devices/bsim4v4/b4v4trunc.c0000644000265600020320000000323712264261473021530 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4trunc.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4trunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; #ifdef STEPDEBUG double debugtemp; #endif /* STEPDEBUG */ for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here != NULL; here = here->BSIM4v4nextInstance) { #ifdef STEPDEBUG debugtemp = *timeStep; #endif /* STEPDEBUG */ CKTterr(here->BSIM4v4qb,ckt,timeStep); CKTterr(here->BSIM4v4qg,ckt,timeStep); CKTterr(here->BSIM4v4qd,ckt,timeStep); if (here->BSIM4v4trnqsMod) CKTterr(here->BSIM4v4qcdump,ckt,timeStep); if (here->BSIM4v4rbodyMod) { CKTterr(here->BSIM4v4qbs,ckt,timeStep); CKTterr(here->BSIM4v4qbd,ckt,timeStep); } if (here->BSIM4v4rgateMod == 3) CKTterr(here->BSIM4v4qgmid,ckt,timeStep); #ifdef STEPDEBUG if(debugtemp != *timeStep) { printf("device %s reduces step from %g to %g\n", here->BSIM4v4name,debugtemp,*timeStep); } #endif /* STEPDEBUG */ } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/bsim4v4init.h0000644000265600020320000000042612264261473022053 0ustar andreasadmin#ifndef _BSIM4V4INIT_H #define _BSIM4V4INIT_H extern IFparm BSIM4v4pTable[ ]; extern IFparm BSIM4v4mPTable[ ]; extern char *BSIM4v4names[ ]; extern int BSIM4v4pTSize; extern int BSIM4v4mPTSize; extern int BSIM4v4nSize; extern int BSIM4v4iSize; extern int BSIM4v4mSize; #endif ngspice-26/src/spicelib/devices/bsim4v4/b4v4mpar.c0000644000265600020320000030473512264261473021343 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4mpar.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" #include "ngspice/ifsim.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/const.h" int BSIM4v4mParam( int param, IFvalue *value, GENmodel *inMod) { BSIM4v4model *mod = (BSIM4v4model*)inMod; switch(param) { case BSIM4v4_MOD_MOBMOD : mod->BSIM4v4mobMod = value->iValue; mod->BSIM4v4mobModGiven = TRUE; break; case BSIM4v4_MOD_BINUNIT : mod->BSIM4v4binUnit = value->iValue; mod->BSIM4v4binUnitGiven = TRUE; break; case BSIM4v4_MOD_PARAMCHK : mod->BSIM4v4paramChk = value->iValue; mod->BSIM4v4paramChkGiven = TRUE; break; case BSIM4v4_MOD_CAPMOD : mod->BSIM4v4capMod = value->iValue; mod->BSIM4v4capModGiven = TRUE; break; case BSIM4v4_MOD_DIOMOD : mod->BSIM4v4dioMod = value->iValue; mod->BSIM4v4dioModGiven = TRUE; break; case BSIM4v4_MOD_RDSMOD : mod->BSIM4v4rdsMod = value->iValue; mod->BSIM4v4rdsModGiven = TRUE; break; case BSIM4v4_MOD_TRNQSMOD : mod->BSIM4v4trnqsMod = value->iValue; mod->BSIM4v4trnqsModGiven = TRUE; break; case BSIM4v4_MOD_ACNQSMOD : mod->BSIM4v4acnqsMod = value->iValue; mod->BSIM4v4acnqsModGiven = TRUE; break; case BSIM4v4_MOD_RBODYMOD : mod->BSIM4v4rbodyMod = value->iValue; mod->BSIM4v4rbodyModGiven = TRUE; break; case BSIM4v4_MOD_RGATEMOD : mod->BSIM4v4rgateMod = value->iValue; mod->BSIM4v4rgateModGiven = TRUE; break; case BSIM4v4_MOD_PERMOD : mod->BSIM4v4perMod = value->iValue; mod->BSIM4v4perModGiven = TRUE; break; case BSIM4v4_MOD_GEOMOD : mod->BSIM4v4geoMod = value->iValue; mod->BSIM4v4geoModGiven = TRUE; break; case BSIM4v4_MOD_FNOIMOD : mod->BSIM4v4fnoiMod = value->iValue; mod->BSIM4v4fnoiModGiven = TRUE; break; case BSIM4v4_MOD_TNOIMOD : mod->BSIM4v4tnoiMod = value->iValue; mod->BSIM4v4tnoiModGiven = TRUE; break; case BSIM4v4_MOD_IGCMOD : mod->BSIM4v4igcMod = value->iValue; mod->BSIM4v4igcModGiven = TRUE; break; case BSIM4v4_MOD_IGBMOD : mod->BSIM4v4igbMod = value->iValue; mod->BSIM4v4igbModGiven = TRUE; break; case BSIM4v4_MOD_TEMPMOD : mod->BSIM4v4tempMod = value->iValue; mod->BSIM4v4tempModGiven = TRUE; break; case BSIM4v4_MOD_VERSION : mod->BSIM4v4version = value->sValue; mod->BSIM4v4versionGiven = TRUE; break; case BSIM4v4_MOD_TOXREF : mod->BSIM4v4toxref = value->rValue; mod->BSIM4v4toxrefGiven = TRUE; break; case BSIM4v4_MOD_TOXE : mod->BSIM4v4toxe = value->rValue; mod->BSIM4v4toxeGiven = TRUE; break; case BSIM4v4_MOD_TOXP : mod->BSIM4v4toxp = value->rValue; mod->BSIM4v4toxpGiven = TRUE; break; case BSIM4v4_MOD_TOXM : mod->BSIM4v4toxm = value->rValue; mod->BSIM4v4toxmGiven = TRUE; break; case BSIM4v4_MOD_DTOX : mod->BSIM4v4dtox = value->rValue; mod->BSIM4v4dtoxGiven = TRUE; break; case BSIM4v4_MOD_EPSROX : mod->BSIM4v4epsrox = value->rValue; mod->BSIM4v4epsroxGiven = TRUE; break; case BSIM4v4_MOD_CDSC : mod->BSIM4v4cdsc = value->rValue; mod->BSIM4v4cdscGiven = TRUE; break; case BSIM4v4_MOD_CDSCB : mod->BSIM4v4cdscb = value->rValue; mod->BSIM4v4cdscbGiven = TRUE; break; case BSIM4v4_MOD_CDSCD : mod->BSIM4v4cdscd = value->rValue; mod->BSIM4v4cdscdGiven = TRUE; break; case BSIM4v4_MOD_CIT : mod->BSIM4v4cit = value->rValue; mod->BSIM4v4citGiven = TRUE; break; case BSIM4v4_MOD_NFACTOR : mod->BSIM4v4nfactor = value->rValue; mod->BSIM4v4nfactorGiven = TRUE; break; case BSIM4v4_MOD_XJ: mod->BSIM4v4xj = value->rValue; mod->BSIM4v4xjGiven = TRUE; break; case BSIM4v4_MOD_VSAT: mod->BSIM4v4vsat = value->rValue; mod->BSIM4v4vsatGiven = TRUE; break; case BSIM4v4_MOD_A0: mod->BSIM4v4a0 = value->rValue; mod->BSIM4v4a0Given = TRUE; break; case BSIM4v4_MOD_AGS: mod->BSIM4v4ags= value->rValue; mod->BSIM4v4agsGiven = TRUE; break; case BSIM4v4_MOD_A1: mod->BSIM4v4a1 = value->rValue; mod->BSIM4v4a1Given = TRUE; break; case BSIM4v4_MOD_A2: mod->BSIM4v4a2 = value->rValue; mod->BSIM4v4a2Given = TRUE; break; case BSIM4v4_MOD_AT: mod->BSIM4v4at = value->rValue; mod->BSIM4v4atGiven = TRUE; break; case BSIM4v4_MOD_KETA: mod->BSIM4v4keta = value->rValue; mod->BSIM4v4ketaGiven = TRUE; break; case BSIM4v4_MOD_NSUB: mod->BSIM4v4nsub = value->rValue; mod->BSIM4v4nsubGiven = TRUE; break; case BSIM4v4_MOD_NDEP: mod->BSIM4v4ndep = value->rValue; mod->BSIM4v4ndepGiven = TRUE; if (mod->BSIM4v4ndep > 1.0e20) mod->BSIM4v4ndep *= 1.0e-6; break; case BSIM4v4_MOD_NSD: mod->BSIM4v4nsd = value->rValue; mod->BSIM4v4nsdGiven = TRUE; if (mod->BSIM4v4nsd > 1.0e23) mod->BSIM4v4nsd *= 1.0e-6; break; case BSIM4v4_MOD_NGATE: mod->BSIM4v4ngate = value->rValue; mod->BSIM4v4ngateGiven = TRUE; if (mod->BSIM4v4ngate > 1.0e23) mod->BSIM4v4ngate *= 1.0e-6; break; case BSIM4v4_MOD_GAMMA1: mod->BSIM4v4gamma1 = value->rValue; mod->BSIM4v4gamma1Given = TRUE; break; case BSIM4v4_MOD_GAMMA2: mod->BSIM4v4gamma2 = value->rValue; mod->BSIM4v4gamma2Given = TRUE; break; case BSIM4v4_MOD_VBX: mod->BSIM4v4vbx = value->rValue; mod->BSIM4v4vbxGiven = TRUE; break; case BSIM4v4_MOD_VBM: mod->BSIM4v4vbm = value->rValue; mod->BSIM4v4vbmGiven = TRUE; break; case BSIM4v4_MOD_XT: mod->BSIM4v4xt = value->rValue; mod->BSIM4v4xtGiven = TRUE; break; case BSIM4v4_MOD_K1: mod->BSIM4v4k1 = value->rValue; mod->BSIM4v4k1Given = TRUE; break; case BSIM4v4_MOD_KT1: mod->BSIM4v4kt1 = value->rValue; mod->BSIM4v4kt1Given = TRUE; break; case BSIM4v4_MOD_KT1L: mod->BSIM4v4kt1l = value->rValue; mod->BSIM4v4kt1lGiven = TRUE; break; case BSIM4v4_MOD_KT2: mod->BSIM4v4kt2 = value->rValue; mod->BSIM4v4kt2Given = TRUE; break; case BSIM4v4_MOD_K2: mod->BSIM4v4k2 = value->rValue; mod->BSIM4v4k2Given = TRUE; break; case BSIM4v4_MOD_K3: mod->BSIM4v4k3 = value->rValue; mod->BSIM4v4k3Given = TRUE; break; case BSIM4v4_MOD_K3B: mod->BSIM4v4k3b = value->rValue; mod->BSIM4v4k3bGiven = TRUE; break; case BSIM4v4_MOD_LPE0: mod->BSIM4v4lpe0 = value->rValue; mod->BSIM4v4lpe0Given = TRUE; break; case BSIM4v4_MOD_LPEB: mod->BSIM4v4lpeb = value->rValue; mod->BSIM4v4lpebGiven = TRUE; break; case BSIM4v4_MOD_DVTP0: mod->BSIM4v4dvtp0 = value->rValue; mod->BSIM4v4dvtp0Given = TRUE; break; case BSIM4v4_MOD_DVTP1: mod->BSIM4v4dvtp1 = value->rValue; mod->BSIM4v4dvtp1Given = TRUE; break; case BSIM4v4_MOD_W0: mod->BSIM4v4w0 = value->rValue; mod->BSIM4v4w0Given = TRUE; break; case BSIM4v4_MOD_DVT0: mod->BSIM4v4dvt0 = value->rValue; mod->BSIM4v4dvt0Given = TRUE; break; case BSIM4v4_MOD_DVT1: mod->BSIM4v4dvt1 = value->rValue; mod->BSIM4v4dvt1Given = TRUE; break; case BSIM4v4_MOD_DVT2: mod->BSIM4v4dvt2 = value->rValue; mod->BSIM4v4dvt2Given = TRUE; break; case BSIM4v4_MOD_DVT0W: mod->BSIM4v4dvt0w = value->rValue; mod->BSIM4v4dvt0wGiven = TRUE; break; case BSIM4v4_MOD_DVT1W: mod->BSIM4v4dvt1w = value->rValue; mod->BSIM4v4dvt1wGiven = TRUE; break; case BSIM4v4_MOD_DVT2W: mod->BSIM4v4dvt2w = value->rValue; mod->BSIM4v4dvt2wGiven = TRUE; break; case BSIM4v4_MOD_DROUT: mod->BSIM4v4drout = value->rValue; mod->BSIM4v4droutGiven = TRUE; break; case BSIM4v4_MOD_DSUB: mod->BSIM4v4dsub = value->rValue; mod->BSIM4v4dsubGiven = TRUE; break; case BSIM4v4_MOD_VTH0: mod->BSIM4v4vth0 = value->rValue; mod->BSIM4v4vth0Given = TRUE; break; case BSIM4v4_MOD_EU: mod->BSIM4v4eu = value->rValue; mod->BSIM4v4euGiven = TRUE; break; case BSIM4v4_MOD_UA: mod->BSIM4v4ua = value->rValue; mod->BSIM4v4uaGiven = TRUE; break; case BSIM4v4_MOD_UA1: mod->BSIM4v4ua1 = value->rValue; mod->BSIM4v4ua1Given = TRUE; break; case BSIM4v4_MOD_UB: mod->BSIM4v4ub = value->rValue; mod->BSIM4v4ubGiven = TRUE; break; case BSIM4v4_MOD_UB1: mod->BSIM4v4ub1 = value->rValue; mod->BSIM4v4ub1Given = TRUE; break; case BSIM4v4_MOD_UC: mod->BSIM4v4uc = value->rValue; mod->BSIM4v4ucGiven = TRUE; break; case BSIM4v4_MOD_UC1: mod->BSIM4v4uc1 = value->rValue; mod->BSIM4v4uc1Given = TRUE; break; case BSIM4v4_MOD_U0 : mod->BSIM4v4u0 = value->rValue; mod->BSIM4v4u0Given = TRUE; break; case BSIM4v4_MOD_UTE : mod->BSIM4v4ute = value->rValue; mod->BSIM4v4uteGiven = TRUE; break; case BSIM4v4_MOD_VOFF: mod->BSIM4v4voff = value->rValue; mod->BSIM4v4voffGiven = TRUE; break; case BSIM4v4_MOD_VOFFL: mod->BSIM4v4voffl = value->rValue; mod->BSIM4v4vofflGiven = TRUE; break; case BSIM4v4_MOD_MINV: mod->BSIM4v4minv = value->rValue; mod->BSIM4v4minvGiven = TRUE; break; case BSIM4v4_MOD_FPROUT: mod->BSIM4v4fprout = value->rValue; mod->BSIM4v4fproutGiven = TRUE; break; case BSIM4v4_MOD_PDITS: mod->BSIM4v4pdits = value->rValue; mod->BSIM4v4pditsGiven = TRUE; break; case BSIM4v4_MOD_PDITSD: mod->BSIM4v4pditsd = value->rValue; mod->BSIM4v4pditsdGiven = TRUE; break; case BSIM4v4_MOD_PDITSL: mod->BSIM4v4pditsl = value->rValue; mod->BSIM4v4pditslGiven = TRUE; break; case BSIM4v4_MOD_DELTA : mod->BSIM4v4delta = value->rValue; mod->BSIM4v4deltaGiven = TRUE; break; case BSIM4v4_MOD_RDSW: mod->BSIM4v4rdsw = value->rValue; mod->BSIM4v4rdswGiven = TRUE; break; case BSIM4v4_MOD_RDSWMIN: mod->BSIM4v4rdswmin = value->rValue; mod->BSIM4v4rdswminGiven = TRUE; break; case BSIM4v4_MOD_RDWMIN: mod->BSIM4v4rdwmin = value->rValue; mod->BSIM4v4rdwminGiven = TRUE; break; case BSIM4v4_MOD_RSWMIN: mod->BSIM4v4rswmin = value->rValue; mod->BSIM4v4rswminGiven = TRUE; break; case BSIM4v4_MOD_RDW: mod->BSIM4v4rdw = value->rValue; mod->BSIM4v4rdwGiven = TRUE; break; case BSIM4v4_MOD_RSW: mod->BSIM4v4rsw = value->rValue; mod->BSIM4v4rswGiven = TRUE; break; case BSIM4v4_MOD_PRWG: mod->BSIM4v4prwg = value->rValue; mod->BSIM4v4prwgGiven = TRUE; break; case BSIM4v4_MOD_PRWB: mod->BSIM4v4prwb = value->rValue; mod->BSIM4v4prwbGiven = TRUE; break; case BSIM4v4_MOD_PRT: mod->BSIM4v4prt = value->rValue; mod->BSIM4v4prtGiven = TRUE; break; case BSIM4v4_MOD_ETA0: mod->BSIM4v4eta0 = value->rValue; mod->BSIM4v4eta0Given = TRUE; break; case BSIM4v4_MOD_ETAB: mod->BSIM4v4etab = value->rValue; mod->BSIM4v4etabGiven = TRUE; break; case BSIM4v4_MOD_PCLM: mod->BSIM4v4pclm = value->rValue; mod->BSIM4v4pclmGiven = TRUE; break; case BSIM4v4_MOD_PDIBL1: mod->BSIM4v4pdibl1 = value->rValue; mod->BSIM4v4pdibl1Given = TRUE; break; case BSIM4v4_MOD_PDIBL2: mod->BSIM4v4pdibl2 = value->rValue; mod->BSIM4v4pdibl2Given = TRUE; break; case BSIM4v4_MOD_PDIBLB: mod->BSIM4v4pdiblb = value->rValue; mod->BSIM4v4pdiblbGiven = TRUE; break; case BSIM4v4_MOD_PSCBE1: mod->BSIM4v4pscbe1 = value->rValue; mod->BSIM4v4pscbe1Given = TRUE; break; case BSIM4v4_MOD_PSCBE2: mod->BSIM4v4pscbe2 = value->rValue; mod->BSIM4v4pscbe2Given = TRUE; break; case BSIM4v4_MOD_PVAG: mod->BSIM4v4pvag = value->rValue; mod->BSIM4v4pvagGiven = TRUE; break; case BSIM4v4_MOD_WR : mod->BSIM4v4wr = value->rValue; mod->BSIM4v4wrGiven = TRUE; break; case BSIM4v4_MOD_DWG : mod->BSIM4v4dwg = value->rValue; mod->BSIM4v4dwgGiven = TRUE; break; case BSIM4v4_MOD_DWB : mod->BSIM4v4dwb = value->rValue; mod->BSIM4v4dwbGiven = TRUE; break; case BSIM4v4_MOD_B0 : mod->BSIM4v4b0 = value->rValue; mod->BSIM4v4b0Given = TRUE; break; case BSIM4v4_MOD_B1 : mod->BSIM4v4b1 = value->rValue; mod->BSIM4v4b1Given = TRUE; break; case BSIM4v4_MOD_ALPHA0 : mod->BSIM4v4alpha0 = value->rValue; mod->BSIM4v4alpha0Given = TRUE; break; case BSIM4v4_MOD_ALPHA1 : mod->BSIM4v4alpha1 = value->rValue; mod->BSIM4v4alpha1Given = TRUE; break; case BSIM4v4_MOD_AGIDL : mod->BSIM4v4agidl = value->rValue; mod->BSIM4v4agidlGiven = TRUE; break; case BSIM4v4_MOD_BGIDL : mod->BSIM4v4bgidl = value->rValue; mod->BSIM4v4bgidlGiven = TRUE; break; case BSIM4v4_MOD_CGIDL : mod->BSIM4v4cgidl = value->rValue; mod->BSIM4v4cgidlGiven = TRUE; break; case BSIM4v4_MOD_PHIN : mod->BSIM4v4phin = value->rValue; mod->BSIM4v4phinGiven = TRUE; break; case BSIM4v4_MOD_EGIDL : mod->BSIM4v4egidl = value->rValue; mod->BSIM4v4egidlGiven = TRUE; break; case BSIM4v4_MOD_AIGC : mod->BSIM4v4aigc = value->rValue; mod->BSIM4v4aigcGiven = TRUE; break; case BSIM4v4_MOD_BIGC : mod->BSIM4v4bigc = value->rValue; mod->BSIM4v4bigcGiven = TRUE; break; case BSIM4v4_MOD_CIGC : mod->BSIM4v4cigc = value->rValue; mod->BSIM4v4cigcGiven = TRUE; break; case BSIM4v4_MOD_AIGSD : mod->BSIM4v4aigsd = value->rValue; mod->BSIM4v4aigsdGiven = TRUE; break; case BSIM4v4_MOD_BIGSD : mod->BSIM4v4bigsd = value->rValue; mod->BSIM4v4bigsdGiven = TRUE; break; case BSIM4v4_MOD_CIGSD : mod->BSIM4v4cigsd = value->rValue; mod->BSIM4v4cigsdGiven = TRUE; break; case BSIM4v4_MOD_AIGBACC : mod->BSIM4v4aigbacc = value->rValue; mod->BSIM4v4aigbaccGiven = TRUE; break; case BSIM4v4_MOD_BIGBACC : mod->BSIM4v4bigbacc = value->rValue; mod->BSIM4v4bigbaccGiven = TRUE; break; case BSIM4v4_MOD_CIGBACC : mod->BSIM4v4cigbacc = value->rValue; mod->BSIM4v4cigbaccGiven = TRUE; break; case BSIM4v4_MOD_AIGBINV : mod->BSIM4v4aigbinv = value->rValue; mod->BSIM4v4aigbinvGiven = TRUE; break; case BSIM4v4_MOD_BIGBINV : mod->BSIM4v4bigbinv = value->rValue; mod->BSIM4v4bigbinvGiven = TRUE; break; case BSIM4v4_MOD_CIGBINV : mod->BSIM4v4cigbinv = value->rValue; mod->BSIM4v4cigbinvGiven = TRUE; break; case BSIM4v4_MOD_NIGC : mod->BSIM4v4nigc = value->rValue; mod->BSIM4v4nigcGiven = TRUE; break; case BSIM4v4_MOD_NIGBINV : mod->BSIM4v4nigbinv = value->rValue; mod->BSIM4v4nigbinvGiven = TRUE; break; case BSIM4v4_MOD_NIGBACC : mod->BSIM4v4nigbacc = value->rValue; mod->BSIM4v4nigbaccGiven = TRUE; break; case BSIM4v4_MOD_NTOX : mod->BSIM4v4ntox = value->rValue; mod->BSIM4v4ntoxGiven = TRUE; break; case BSIM4v4_MOD_EIGBINV : mod->BSIM4v4eigbinv = value->rValue; mod->BSIM4v4eigbinvGiven = TRUE; break; case BSIM4v4_MOD_PIGCD : mod->BSIM4v4pigcd = value->rValue; mod->BSIM4v4pigcdGiven = TRUE; break; case BSIM4v4_MOD_POXEDGE : mod->BSIM4v4poxedge = value->rValue; mod->BSIM4v4poxedgeGiven = TRUE; break; case BSIM4v4_MOD_XRCRG1 : mod->BSIM4v4xrcrg1 = value->rValue; mod->BSIM4v4xrcrg1Given = TRUE; break; case BSIM4v4_MOD_XRCRG2 : mod->BSIM4v4xrcrg2 = value->rValue; mod->BSIM4v4xrcrg2Given = TRUE; break; case BSIM4v4_MOD_LAMBDA : mod->BSIM4v4lambda = value->rValue; mod->BSIM4v4lambdaGiven = TRUE; break; case BSIM4v4_MOD_VTL : mod->BSIM4v4vtl = value->rValue; mod->BSIM4v4vtlGiven = TRUE; break; case BSIM4v4_MOD_XN: mod->BSIM4v4xn = value->rValue; mod->BSIM4v4xnGiven = TRUE; break; case BSIM4v4_MOD_LC: mod->BSIM4v4lc = value->rValue; mod->BSIM4v4lcGiven = TRUE; break; case BSIM4v4_MOD_TNOIA : mod->BSIM4v4tnoia = value->rValue; mod->BSIM4v4tnoiaGiven = TRUE; break; case BSIM4v4_MOD_TNOIB : mod->BSIM4v4tnoib = value->rValue; mod->BSIM4v4tnoibGiven = TRUE; break; case BSIM4v4_MOD_RNOIA : mod->BSIM4v4rnoia = value->rValue; mod->BSIM4v4rnoiaGiven = TRUE; break; case BSIM4v4_MOD_RNOIB : mod->BSIM4v4rnoib = value->rValue; mod->BSIM4v4rnoibGiven = TRUE; break; case BSIM4v4_MOD_NTNOI : mod->BSIM4v4ntnoi = value->rValue; mod->BSIM4v4ntnoiGiven = TRUE; break; case BSIM4v4_MOD_VFBSDOFF: mod->BSIM4v4vfbsdoff = value->rValue; mod->BSIM4v4vfbsdoffGiven = TRUE; break; case BSIM4v4_MOD_LINTNOI: mod->BSIM4v4lintnoi = value->rValue; mod->BSIM4v4lintnoiGiven = TRUE; break; /* stress effect */ case BSIM4v4_MOD_SAREF : mod->BSIM4v4saref = value->rValue; mod->BSIM4v4sarefGiven = TRUE; break; case BSIM4v4_MOD_SBREF : mod->BSIM4v4sbref = value->rValue; mod->BSIM4v4sbrefGiven = TRUE; break; case BSIM4v4_MOD_WLOD : mod->BSIM4v4wlod = value->rValue; mod->BSIM4v4wlodGiven = TRUE; break; case BSIM4v4_MOD_KU0 : mod->BSIM4v4ku0 = value->rValue; mod->BSIM4v4ku0Given = TRUE; break; case BSIM4v4_MOD_KVSAT : mod->BSIM4v4kvsat = value->rValue; mod->BSIM4v4kvsatGiven = TRUE; break; case BSIM4v4_MOD_KVTH0 : mod->BSIM4v4kvth0 = value->rValue; mod->BSIM4v4kvth0Given = TRUE; break; case BSIM4v4_MOD_TKU0 : mod->BSIM4v4tku0 = value->rValue; mod->BSIM4v4tku0Given = TRUE; break; case BSIM4v4_MOD_LLODKU0 : mod->BSIM4v4llodku0 = value->rValue; mod->BSIM4v4llodku0Given = TRUE; break; case BSIM4v4_MOD_WLODKU0 : mod->BSIM4v4wlodku0 = value->rValue; mod->BSIM4v4wlodku0Given = TRUE; break; case BSIM4v4_MOD_LLODVTH : mod->BSIM4v4llodvth = value->rValue; mod->BSIM4v4llodvthGiven = TRUE; break; case BSIM4v4_MOD_WLODVTH : mod->BSIM4v4wlodvth = value->rValue; mod->BSIM4v4wlodvthGiven = TRUE; break; case BSIM4v4_MOD_LKU0 : mod->BSIM4v4lku0 = value->rValue; mod->BSIM4v4lku0Given = TRUE; break; case BSIM4v4_MOD_WKU0 : mod->BSIM4v4wku0 = value->rValue; mod->BSIM4v4wku0Given = TRUE; break; case BSIM4v4_MOD_PKU0 : mod->BSIM4v4pku0 = value->rValue; mod->BSIM4v4pku0Given = TRUE; break; case BSIM4v4_MOD_LKVTH0 : mod->BSIM4v4lkvth0 = value->rValue; mod->BSIM4v4lkvth0Given = TRUE; break; case BSIM4v4_MOD_WKVTH0 : mod->BSIM4v4wkvth0 = value->rValue; mod->BSIM4v4wkvth0Given = TRUE; break; case BSIM4v4_MOD_PKVTH0 : mod->BSIM4v4pkvth0 = value->rValue; mod->BSIM4v4pkvth0Given = TRUE; break; case BSIM4v4_MOD_STK2 : mod->BSIM4v4stk2 = value->rValue; mod->BSIM4v4stk2Given = TRUE; break; case BSIM4v4_MOD_LODK2 : mod->BSIM4v4lodk2 = value->rValue; mod->BSIM4v4lodk2Given = TRUE; break; case BSIM4v4_MOD_STETA0 : mod->BSIM4v4steta0 = value->rValue; mod->BSIM4v4steta0Given = TRUE; break; case BSIM4v4_MOD_LODETA0 : mod->BSIM4v4lodeta0 = value->rValue; mod->BSIM4v4lodeta0Given = TRUE; break; case BSIM4v4_MOD_BETA0 : mod->BSIM4v4beta0 = value->rValue; mod->BSIM4v4beta0Given = TRUE; break; case BSIM4v4_MOD_IJTHDFWD : mod->BSIM4v4ijthdfwd = value->rValue; mod->BSIM4v4ijthdfwdGiven = TRUE; break; case BSIM4v4_MOD_IJTHSFWD : mod->BSIM4v4ijthsfwd = value->rValue; mod->BSIM4v4ijthsfwdGiven = TRUE; break; case BSIM4v4_MOD_IJTHDREV : mod->BSIM4v4ijthdrev = value->rValue; mod->BSIM4v4ijthdrevGiven = TRUE; break; case BSIM4v4_MOD_IJTHSREV : mod->BSIM4v4ijthsrev = value->rValue; mod->BSIM4v4ijthsrevGiven = TRUE; break; case BSIM4v4_MOD_XJBVD : mod->BSIM4v4xjbvd = value->rValue; mod->BSIM4v4xjbvdGiven = TRUE; break; case BSIM4v4_MOD_XJBVS : mod->BSIM4v4xjbvs = value->rValue; mod->BSIM4v4xjbvsGiven = TRUE; break; case BSIM4v4_MOD_BVD : mod->BSIM4v4bvd = value->rValue; mod->BSIM4v4bvdGiven = TRUE; break; case BSIM4v4_MOD_BVS : mod->BSIM4v4bvs = value->rValue; mod->BSIM4v4bvsGiven = TRUE; break; /* reverse diode */ case BSIM4v4_MOD_JTSS : mod->BSIM4v4jtss = value->rValue; mod->BSIM4v4jtssGiven = TRUE; break; case BSIM4v4_MOD_JTSD : mod->BSIM4v4jtsd = value->rValue; mod->BSIM4v4jtsdGiven = TRUE; break; case BSIM4v4_MOD_JTSSWS : mod->BSIM4v4jtssws = value->rValue; mod->BSIM4v4jtsswsGiven = TRUE; break; case BSIM4v4_MOD_JTSSWD : mod->BSIM4v4jtsswd = value->rValue; mod->BSIM4v4jtsswdGiven = TRUE; break; case BSIM4v4_MOD_JTSSWGS : mod->BSIM4v4jtsswgs = value->rValue; mod->BSIM4v4jtsswgsGiven = TRUE; break; case BSIM4v4_MOD_JTSSWGD : mod->BSIM4v4jtsswgd = value->rValue; mod->BSIM4v4jtsswgdGiven = TRUE; break; case BSIM4v4_MOD_NJTS : mod->BSIM4v4njts = value->rValue; mod->BSIM4v4njtsGiven = TRUE; break; case BSIM4v4_MOD_NJTSSW : mod->BSIM4v4njtssw = value->rValue; mod->BSIM4v4njtsswGiven = TRUE; break; case BSIM4v4_MOD_NJTSSWG : mod->BSIM4v4njtsswg = value->rValue; mod->BSIM4v4njtsswgGiven = TRUE; break; case BSIM4v4_MOD_XTSS : mod->BSIM4v4xtss = value->rValue; mod->BSIM4v4xtssGiven = TRUE; break; case BSIM4v4_MOD_XTSD : mod->BSIM4v4xtsd = value->rValue; mod->BSIM4v4xtsdGiven = TRUE; break; case BSIM4v4_MOD_XTSSWS : mod->BSIM4v4xtssws = value->rValue; mod->BSIM4v4xtsswsGiven = TRUE; break; case BSIM4v4_MOD_XTSSWD : mod->BSIM4v4xtsswd = value->rValue; mod->BSIM4v4xtsswdGiven = TRUE; break; case BSIM4v4_MOD_XTSSWGS : mod->BSIM4v4xtsswgs = value->rValue; mod->BSIM4v4xtsswgsGiven = TRUE; break; case BSIM4v4_MOD_XTSSWGD : mod->BSIM4v4xtsswgd = value->rValue; mod->BSIM4v4xtsswgdGiven = TRUE; break; case BSIM4v4_MOD_TNJTS : mod->BSIM4v4tnjts = value->rValue; mod->BSIM4v4tnjtsGiven = TRUE; break; case BSIM4v4_MOD_TNJTSSW : mod->BSIM4v4tnjtssw = value->rValue; mod->BSIM4v4tnjtsswGiven = TRUE; break; case BSIM4v4_MOD_TNJTSSWG : mod->BSIM4v4tnjtsswg = value->rValue; mod->BSIM4v4tnjtsswgGiven = TRUE; break; case BSIM4v4_MOD_VTSS : mod->BSIM4v4vtss = value->rValue; mod->BSIM4v4vtssGiven = TRUE; break; case BSIM4v4_MOD_VTSD : mod->BSIM4v4vtsd = value->rValue; mod->BSIM4v4vtsdGiven = TRUE; break; case BSIM4v4_MOD_VTSSWS : mod->BSIM4v4vtssws = value->rValue; mod->BSIM4v4vtsswsGiven = TRUE; break; case BSIM4v4_MOD_VTSSWD : mod->BSIM4v4vtsswd = value->rValue; mod->BSIM4v4vtsswdGiven = TRUE; break; case BSIM4v4_MOD_VTSSWGS : mod->BSIM4v4vtsswgs = value->rValue; mod->BSIM4v4vtsswgsGiven = TRUE; break; case BSIM4v4_MOD_VTSSWGD : mod->BSIM4v4vtsswgd = value->rValue; mod->BSIM4v4vtsswgdGiven = TRUE; break; case BSIM4v4_MOD_VFB : mod->BSIM4v4vfb = value->rValue; mod->BSIM4v4vfbGiven = TRUE; break; case BSIM4v4_MOD_GBMIN : mod->BSIM4v4gbmin = value->rValue; mod->BSIM4v4gbminGiven = TRUE; break; case BSIM4v4_MOD_RBDB : mod->BSIM4v4rbdb = value->rValue; mod->BSIM4v4rbdbGiven = TRUE; break; case BSIM4v4_MOD_RBPB : mod->BSIM4v4rbpb = value->rValue; mod->BSIM4v4rbpbGiven = TRUE; break; case BSIM4v4_MOD_RBSB : mod->BSIM4v4rbsb = value->rValue; mod->BSIM4v4rbsbGiven = TRUE; break; case BSIM4v4_MOD_RBPS : mod->BSIM4v4rbps = value->rValue; mod->BSIM4v4rbpsGiven = TRUE; break; case BSIM4v4_MOD_RBPD : mod->BSIM4v4rbpd = value->rValue; mod->BSIM4v4rbpdGiven = TRUE; break; case BSIM4v4_MOD_CGSL : mod->BSIM4v4cgsl = value->rValue; mod->BSIM4v4cgslGiven = TRUE; break; case BSIM4v4_MOD_CGDL : mod->BSIM4v4cgdl = value->rValue; mod->BSIM4v4cgdlGiven = TRUE; break; case BSIM4v4_MOD_CKAPPAS : mod->BSIM4v4ckappas = value->rValue; mod->BSIM4v4ckappasGiven = TRUE; break; case BSIM4v4_MOD_CKAPPAD : mod->BSIM4v4ckappad = value->rValue; mod->BSIM4v4ckappadGiven = TRUE; break; case BSIM4v4_MOD_CF : mod->BSIM4v4cf = value->rValue; mod->BSIM4v4cfGiven = TRUE; break; case BSIM4v4_MOD_CLC : mod->BSIM4v4clc = value->rValue; mod->BSIM4v4clcGiven = TRUE; break; case BSIM4v4_MOD_CLE : mod->BSIM4v4cle = value->rValue; mod->BSIM4v4cleGiven = TRUE; break; case BSIM4v4_MOD_DWC : mod->BSIM4v4dwc = value->rValue; mod->BSIM4v4dwcGiven = TRUE; break; case BSIM4v4_MOD_DLC : mod->BSIM4v4dlc = value->rValue; mod->BSIM4v4dlcGiven = TRUE; break; case BSIM4v4_MOD_XW : mod->BSIM4v4xw = value->rValue; mod->BSIM4v4xwGiven = TRUE; break; case BSIM4v4_MOD_XL : mod->BSIM4v4xl = value->rValue; mod->BSIM4v4xlGiven = TRUE; break; case BSIM4v4_MOD_DLCIG : mod->BSIM4v4dlcig = value->rValue; mod->BSIM4v4dlcigGiven = TRUE; break; case BSIM4v4_MOD_DWJ : mod->BSIM4v4dwj = value->rValue; mod->BSIM4v4dwjGiven = TRUE; break; case BSIM4v4_MOD_VFBCV : mod->BSIM4v4vfbcv = value->rValue; mod->BSIM4v4vfbcvGiven = TRUE; break; case BSIM4v4_MOD_ACDE : mod->BSIM4v4acde = value->rValue; mod->BSIM4v4acdeGiven = TRUE; break; case BSIM4v4_MOD_MOIN : mod->BSIM4v4moin = value->rValue; mod->BSIM4v4moinGiven = TRUE; break; case BSIM4v4_MOD_NOFF : mod->BSIM4v4noff = value->rValue; mod->BSIM4v4noffGiven = TRUE; break; case BSIM4v4_MOD_VOFFCV : mod->BSIM4v4voffcv = value->rValue; mod->BSIM4v4voffcvGiven = TRUE; break; case BSIM4v4_MOD_DMCG : mod->BSIM4v4dmcg = value->rValue; mod->BSIM4v4dmcgGiven = TRUE; break; case BSIM4v4_MOD_DMCI : mod->BSIM4v4dmci = value->rValue; mod->BSIM4v4dmciGiven = TRUE; break; case BSIM4v4_MOD_DMDG : mod->BSIM4v4dmdg = value->rValue; mod->BSIM4v4dmdgGiven = TRUE; break; case BSIM4v4_MOD_DMCGT : mod->BSIM4v4dmcgt = value->rValue; mod->BSIM4v4dmcgtGiven = TRUE; break; case BSIM4v4_MOD_XGW : mod->BSIM4v4xgw = value->rValue; mod->BSIM4v4xgwGiven = TRUE; break; case BSIM4v4_MOD_XGL : mod->BSIM4v4xgl = value->rValue; mod->BSIM4v4xglGiven = TRUE; break; case BSIM4v4_MOD_RSHG : mod->BSIM4v4rshg = value->rValue; mod->BSIM4v4rshgGiven = TRUE; break; case BSIM4v4_MOD_NGCON : mod->BSIM4v4ngcon = value->rValue; mod->BSIM4v4ngconGiven = TRUE; break; case BSIM4v4_MOD_TCJ : mod->BSIM4v4tcj = value->rValue; mod->BSIM4v4tcjGiven = TRUE; break; case BSIM4v4_MOD_TPB : mod->BSIM4v4tpb = value->rValue; mod->BSIM4v4tpbGiven = TRUE; break; case BSIM4v4_MOD_TCJSW : mod->BSIM4v4tcjsw = value->rValue; mod->BSIM4v4tcjswGiven = TRUE; break; case BSIM4v4_MOD_TPBSW : mod->BSIM4v4tpbsw = value->rValue; mod->BSIM4v4tpbswGiven = TRUE; break; case BSIM4v4_MOD_TCJSWG : mod->BSIM4v4tcjswg = value->rValue; mod->BSIM4v4tcjswgGiven = TRUE; break; case BSIM4v4_MOD_TPBSWG : mod->BSIM4v4tpbswg = value->rValue; mod->BSIM4v4tpbswgGiven = TRUE; break; /* Length dependence */ case BSIM4v4_MOD_LCDSC : mod->BSIM4v4lcdsc = value->rValue; mod->BSIM4v4lcdscGiven = TRUE; break; case BSIM4v4_MOD_LCDSCB : mod->BSIM4v4lcdscb = value->rValue; mod->BSIM4v4lcdscbGiven = TRUE; break; case BSIM4v4_MOD_LCDSCD : mod->BSIM4v4lcdscd = value->rValue; mod->BSIM4v4lcdscdGiven = TRUE; break; case BSIM4v4_MOD_LCIT : mod->BSIM4v4lcit = value->rValue; mod->BSIM4v4lcitGiven = TRUE; break; case BSIM4v4_MOD_LNFACTOR : mod->BSIM4v4lnfactor = value->rValue; mod->BSIM4v4lnfactorGiven = TRUE; break; case BSIM4v4_MOD_LXJ: mod->BSIM4v4lxj = value->rValue; mod->BSIM4v4lxjGiven = TRUE; break; case BSIM4v4_MOD_LVSAT: mod->BSIM4v4lvsat = value->rValue; mod->BSIM4v4lvsatGiven = TRUE; break; case BSIM4v4_MOD_LA0: mod->BSIM4v4la0 = value->rValue; mod->BSIM4v4la0Given = TRUE; break; case BSIM4v4_MOD_LAGS: mod->BSIM4v4lags = value->rValue; mod->BSIM4v4lagsGiven = TRUE; break; case BSIM4v4_MOD_LA1: mod->BSIM4v4la1 = value->rValue; mod->BSIM4v4la1Given = TRUE; break; case BSIM4v4_MOD_LA2: mod->BSIM4v4la2 = value->rValue; mod->BSIM4v4la2Given = TRUE; break; case BSIM4v4_MOD_LAT: mod->BSIM4v4lat = value->rValue; mod->BSIM4v4latGiven = TRUE; break; case BSIM4v4_MOD_LKETA: mod->BSIM4v4lketa = value->rValue; mod->BSIM4v4lketaGiven = TRUE; break; case BSIM4v4_MOD_LNSUB: mod->BSIM4v4lnsub = value->rValue; mod->BSIM4v4lnsubGiven = TRUE; break; case BSIM4v4_MOD_LNDEP: mod->BSIM4v4lndep = value->rValue; mod->BSIM4v4lndepGiven = TRUE; if (mod->BSIM4v4lndep > 1.0e20) mod->BSIM4v4lndep *= 1.0e-6; break; case BSIM4v4_MOD_LNSD: mod->BSIM4v4lnsd = value->rValue; mod->BSIM4v4lnsdGiven = TRUE; if (mod->BSIM4v4lnsd > 1.0e23) mod->BSIM4v4lnsd *= 1.0e-6; break; case BSIM4v4_MOD_LNGATE: mod->BSIM4v4lngate = value->rValue; mod->BSIM4v4lngateGiven = TRUE; if (mod->BSIM4v4lngate > 1.0e23) mod->BSIM4v4lngate *= 1.0e-6; break; case BSIM4v4_MOD_LGAMMA1: mod->BSIM4v4lgamma1 = value->rValue; mod->BSIM4v4lgamma1Given = TRUE; break; case BSIM4v4_MOD_LGAMMA2: mod->BSIM4v4lgamma2 = value->rValue; mod->BSIM4v4lgamma2Given = TRUE; break; case BSIM4v4_MOD_LVBX: mod->BSIM4v4lvbx = value->rValue; mod->BSIM4v4lvbxGiven = TRUE; break; case BSIM4v4_MOD_LVBM: mod->BSIM4v4lvbm = value->rValue; mod->BSIM4v4lvbmGiven = TRUE; break; case BSIM4v4_MOD_LXT: mod->BSIM4v4lxt = value->rValue; mod->BSIM4v4lxtGiven = TRUE; break; case BSIM4v4_MOD_LK1: mod->BSIM4v4lk1 = value->rValue; mod->BSIM4v4lk1Given = TRUE; break; case BSIM4v4_MOD_LKT1: mod->BSIM4v4lkt1 = value->rValue; mod->BSIM4v4lkt1Given = TRUE; break; case BSIM4v4_MOD_LKT1L: mod->BSIM4v4lkt1l = value->rValue; mod->BSIM4v4lkt1lGiven = TRUE; break; case BSIM4v4_MOD_LKT2: mod->BSIM4v4lkt2 = value->rValue; mod->BSIM4v4lkt2Given = TRUE; break; case BSIM4v4_MOD_LK2: mod->BSIM4v4lk2 = value->rValue; mod->BSIM4v4lk2Given = TRUE; break; case BSIM4v4_MOD_LK3: mod->BSIM4v4lk3 = value->rValue; mod->BSIM4v4lk3Given = TRUE; break; case BSIM4v4_MOD_LK3B: mod->BSIM4v4lk3b = value->rValue; mod->BSIM4v4lk3bGiven = TRUE; break; case BSIM4v4_MOD_LLPE0: mod->BSIM4v4llpe0 = value->rValue; mod->BSIM4v4llpe0Given = TRUE; break; case BSIM4v4_MOD_LLPEB: mod->BSIM4v4llpeb = value->rValue; mod->BSIM4v4llpebGiven = TRUE; break; case BSIM4v4_MOD_LDVTP0: mod->BSIM4v4ldvtp0 = value->rValue; mod->BSIM4v4ldvtp0Given = TRUE; break; case BSIM4v4_MOD_LDVTP1: mod->BSIM4v4ldvtp1 = value->rValue; mod->BSIM4v4ldvtp1Given = TRUE; break; case BSIM4v4_MOD_LW0: mod->BSIM4v4lw0 = value->rValue; mod->BSIM4v4lw0Given = TRUE; break; case BSIM4v4_MOD_LDVT0: mod->BSIM4v4ldvt0 = value->rValue; mod->BSIM4v4ldvt0Given = TRUE; break; case BSIM4v4_MOD_LDVT1: mod->BSIM4v4ldvt1 = value->rValue; mod->BSIM4v4ldvt1Given = TRUE; break; case BSIM4v4_MOD_LDVT2: mod->BSIM4v4ldvt2 = value->rValue; mod->BSIM4v4ldvt2Given = TRUE; break; case BSIM4v4_MOD_LDVT0W: mod->BSIM4v4ldvt0w = value->rValue; mod->BSIM4v4ldvt0wGiven = TRUE; break; case BSIM4v4_MOD_LDVT1W: mod->BSIM4v4ldvt1w = value->rValue; mod->BSIM4v4ldvt1wGiven = TRUE; break; case BSIM4v4_MOD_LDVT2W: mod->BSIM4v4ldvt2w = value->rValue; mod->BSIM4v4ldvt2wGiven = TRUE; break; case BSIM4v4_MOD_LDROUT: mod->BSIM4v4ldrout = value->rValue; mod->BSIM4v4ldroutGiven = TRUE; break; case BSIM4v4_MOD_LDSUB: mod->BSIM4v4ldsub = value->rValue; mod->BSIM4v4ldsubGiven = TRUE; break; case BSIM4v4_MOD_LVTH0: mod->BSIM4v4lvth0 = value->rValue; mod->BSIM4v4lvth0Given = TRUE; break; case BSIM4v4_MOD_LUA: mod->BSIM4v4lua = value->rValue; mod->BSIM4v4luaGiven = TRUE; break; case BSIM4v4_MOD_LUA1: mod->BSIM4v4lua1 = value->rValue; mod->BSIM4v4lua1Given = TRUE; break; case BSIM4v4_MOD_LUB: mod->BSIM4v4lub = value->rValue; mod->BSIM4v4lubGiven = TRUE; break; case BSIM4v4_MOD_LUB1: mod->BSIM4v4lub1 = value->rValue; mod->BSIM4v4lub1Given = TRUE; break; case BSIM4v4_MOD_LUC: mod->BSIM4v4luc = value->rValue; mod->BSIM4v4lucGiven = TRUE; break; case BSIM4v4_MOD_LUC1: mod->BSIM4v4luc1 = value->rValue; mod->BSIM4v4luc1Given = TRUE; break; case BSIM4v4_MOD_LU0 : mod->BSIM4v4lu0 = value->rValue; mod->BSIM4v4lu0Given = TRUE; break; case BSIM4v4_MOD_LUTE : mod->BSIM4v4lute = value->rValue; mod->BSIM4v4luteGiven = TRUE; break; case BSIM4v4_MOD_LVOFF: mod->BSIM4v4lvoff = value->rValue; mod->BSIM4v4lvoffGiven = TRUE; break; case BSIM4v4_MOD_LMINV: mod->BSIM4v4lminv = value->rValue; mod->BSIM4v4lminvGiven = TRUE; break; case BSIM4v4_MOD_LFPROUT: mod->BSIM4v4lfprout = value->rValue; mod->BSIM4v4lfproutGiven = TRUE; break; case BSIM4v4_MOD_LPDITS: mod->BSIM4v4lpdits = value->rValue; mod->BSIM4v4lpditsGiven = TRUE; break; case BSIM4v4_MOD_LPDITSD: mod->BSIM4v4lpditsd = value->rValue; mod->BSIM4v4lpditsdGiven = TRUE; break; case BSIM4v4_MOD_LDELTA : mod->BSIM4v4ldelta = value->rValue; mod->BSIM4v4ldeltaGiven = TRUE; break; case BSIM4v4_MOD_LRDSW: mod->BSIM4v4lrdsw = value->rValue; mod->BSIM4v4lrdswGiven = TRUE; break; case BSIM4v4_MOD_LRDW: mod->BSIM4v4lrdw = value->rValue; mod->BSIM4v4lrdwGiven = TRUE; break; case BSIM4v4_MOD_LRSW: mod->BSIM4v4lrsw = value->rValue; mod->BSIM4v4lrswGiven = TRUE; break; case BSIM4v4_MOD_LPRWB: mod->BSIM4v4lprwb = value->rValue; mod->BSIM4v4lprwbGiven = TRUE; break; case BSIM4v4_MOD_LPRWG: mod->BSIM4v4lprwg = value->rValue; mod->BSIM4v4lprwgGiven = TRUE; break; case BSIM4v4_MOD_LPRT: mod->BSIM4v4lprt = value->rValue; mod->BSIM4v4lprtGiven = TRUE; break; case BSIM4v4_MOD_LETA0: mod->BSIM4v4leta0 = value->rValue; mod->BSIM4v4leta0Given = TRUE; break; case BSIM4v4_MOD_LETAB: mod->BSIM4v4letab = value->rValue; mod->BSIM4v4letabGiven = TRUE; break; case BSIM4v4_MOD_LPCLM: mod->BSIM4v4lpclm = value->rValue; mod->BSIM4v4lpclmGiven = TRUE; break; case BSIM4v4_MOD_LPDIBL1: mod->BSIM4v4lpdibl1 = value->rValue; mod->BSIM4v4lpdibl1Given = TRUE; break; case BSIM4v4_MOD_LPDIBL2: mod->BSIM4v4lpdibl2 = value->rValue; mod->BSIM4v4lpdibl2Given = TRUE; break; case BSIM4v4_MOD_LPDIBLB: mod->BSIM4v4lpdiblb = value->rValue; mod->BSIM4v4lpdiblbGiven = TRUE; break; case BSIM4v4_MOD_LPSCBE1: mod->BSIM4v4lpscbe1 = value->rValue; mod->BSIM4v4lpscbe1Given = TRUE; break; case BSIM4v4_MOD_LPSCBE2: mod->BSIM4v4lpscbe2 = value->rValue; mod->BSIM4v4lpscbe2Given = TRUE; break; case BSIM4v4_MOD_LPVAG: mod->BSIM4v4lpvag = value->rValue; mod->BSIM4v4lpvagGiven = TRUE; break; case BSIM4v4_MOD_LWR : mod->BSIM4v4lwr = value->rValue; mod->BSIM4v4lwrGiven = TRUE; break; case BSIM4v4_MOD_LDWG : mod->BSIM4v4ldwg = value->rValue; mod->BSIM4v4ldwgGiven = TRUE; break; case BSIM4v4_MOD_LDWB : mod->BSIM4v4ldwb = value->rValue; mod->BSIM4v4ldwbGiven = TRUE; break; case BSIM4v4_MOD_LB0 : mod->BSIM4v4lb0 = value->rValue; mod->BSIM4v4lb0Given = TRUE; break; case BSIM4v4_MOD_LB1 : mod->BSIM4v4lb1 = value->rValue; mod->BSIM4v4lb1Given = TRUE; break; case BSIM4v4_MOD_LALPHA0 : mod->BSIM4v4lalpha0 = value->rValue; mod->BSIM4v4lalpha0Given = TRUE; break; case BSIM4v4_MOD_LALPHA1 : mod->BSIM4v4lalpha1 = value->rValue; mod->BSIM4v4lalpha1Given = TRUE; break; case BSIM4v4_MOD_LBETA0 : mod->BSIM4v4lbeta0 = value->rValue; mod->BSIM4v4lbeta0Given = TRUE; break; case BSIM4v4_MOD_LAGIDL : mod->BSIM4v4lagidl = value->rValue; mod->BSIM4v4lagidlGiven = TRUE; break; case BSIM4v4_MOD_LBGIDL : mod->BSIM4v4lbgidl = value->rValue; mod->BSIM4v4lbgidlGiven = TRUE; break; case BSIM4v4_MOD_LCGIDL : mod->BSIM4v4lcgidl = value->rValue; mod->BSIM4v4lcgidlGiven = TRUE; break; case BSIM4v4_MOD_LPHIN : mod->BSIM4v4lphin = value->rValue; mod->BSIM4v4lphinGiven = TRUE; break; case BSIM4v4_MOD_LEGIDL : mod->BSIM4v4legidl = value->rValue; mod->BSIM4v4legidlGiven = TRUE; break; case BSIM4v4_MOD_LAIGC : mod->BSIM4v4laigc = value->rValue; mod->BSIM4v4laigcGiven = TRUE; break; case BSIM4v4_MOD_LBIGC : mod->BSIM4v4lbigc = value->rValue; mod->BSIM4v4lbigcGiven = TRUE; break; case BSIM4v4_MOD_LCIGC : mod->BSIM4v4lcigc = value->rValue; mod->BSIM4v4lcigcGiven = TRUE; break; case BSIM4v4_MOD_LAIGSD : mod->BSIM4v4laigsd = value->rValue; mod->BSIM4v4laigsdGiven = TRUE; break; case BSIM4v4_MOD_LBIGSD : mod->BSIM4v4lbigsd = value->rValue; mod->BSIM4v4lbigsdGiven = TRUE; break; case BSIM4v4_MOD_LCIGSD : mod->BSIM4v4lcigsd = value->rValue; mod->BSIM4v4lcigsdGiven = TRUE; break; case BSIM4v4_MOD_LAIGBACC : mod->BSIM4v4laigbacc = value->rValue; mod->BSIM4v4laigbaccGiven = TRUE; break; case BSIM4v4_MOD_LBIGBACC : mod->BSIM4v4lbigbacc = value->rValue; mod->BSIM4v4lbigbaccGiven = TRUE; break; case BSIM4v4_MOD_LCIGBACC : mod->BSIM4v4lcigbacc = value->rValue; mod->BSIM4v4lcigbaccGiven = TRUE; break; case BSIM4v4_MOD_LAIGBINV : mod->BSIM4v4laigbinv = value->rValue; mod->BSIM4v4laigbinvGiven = TRUE; break; case BSIM4v4_MOD_LBIGBINV : mod->BSIM4v4lbigbinv = value->rValue; mod->BSIM4v4lbigbinvGiven = TRUE; break; case BSIM4v4_MOD_LCIGBINV : mod->BSIM4v4lcigbinv = value->rValue; mod->BSIM4v4lcigbinvGiven = TRUE; break; case BSIM4v4_MOD_LNIGC : mod->BSIM4v4lnigc = value->rValue; mod->BSIM4v4lnigcGiven = TRUE; break; case BSIM4v4_MOD_LNIGBINV : mod->BSIM4v4lnigbinv = value->rValue; mod->BSIM4v4lnigbinvGiven = TRUE; break; case BSIM4v4_MOD_LNIGBACC : mod->BSIM4v4lnigbacc = value->rValue; mod->BSIM4v4lnigbaccGiven = TRUE; break; case BSIM4v4_MOD_LNTOX : mod->BSIM4v4lntox = value->rValue; mod->BSIM4v4lntoxGiven = TRUE; break; case BSIM4v4_MOD_LEIGBINV : mod->BSIM4v4leigbinv = value->rValue; mod->BSIM4v4leigbinvGiven = TRUE; break; case BSIM4v4_MOD_LPIGCD : mod->BSIM4v4lpigcd = value->rValue; mod->BSIM4v4lpigcdGiven = TRUE; break; case BSIM4v4_MOD_LPOXEDGE : mod->BSIM4v4lpoxedge = value->rValue; mod->BSIM4v4lpoxedgeGiven = TRUE; break; case BSIM4v4_MOD_LXRCRG1 : mod->BSIM4v4lxrcrg1 = value->rValue; mod->BSIM4v4lxrcrg1Given = TRUE; break; case BSIM4v4_MOD_LXRCRG2 : mod->BSIM4v4lxrcrg2 = value->rValue; mod->BSIM4v4lxrcrg2Given = TRUE; break; case BSIM4v4_MOD_LLAMBDA : mod->BSIM4v4llambda = value->rValue; mod->BSIM4v4llambdaGiven = TRUE; break; case BSIM4v4_MOD_LVTL : mod->BSIM4v4lvtl = value->rValue; mod->BSIM4v4lvtlGiven = TRUE; break; case BSIM4v4_MOD_LXN: mod->BSIM4v4lxn = value->rValue; mod->BSIM4v4lxnGiven = TRUE; break; case BSIM4v4_MOD_LVFBSDOFF: mod->BSIM4v4lvfbsdoff = value->rValue; mod->BSIM4v4lvfbsdoffGiven = TRUE; break; case BSIM4v4_MOD_LEU : mod->BSIM4v4leu = value->rValue; mod->BSIM4v4leuGiven = TRUE; break; case BSIM4v4_MOD_LVFB : mod->BSIM4v4lvfb = value->rValue; mod->BSIM4v4lvfbGiven = TRUE; break; case BSIM4v4_MOD_LCGSL : mod->BSIM4v4lcgsl = value->rValue; mod->BSIM4v4lcgslGiven = TRUE; break; case BSIM4v4_MOD_LCGDL : mod->BSIM4v4lcgdl = value->rValue; mod->BSIM4v4lcgdlGiven = TRUE; break; case BSIM4v4_MOD_LCKAPPAS : mod->BSIM4v4lckappas = value->rValue; mod->BSIM4v4lckappasGiven = TRUE; break; case BSIM4v4_MOD_LCKAPPAD : mod->BSIM4v4lckappad = value->rValue; mod->BSIM4v4lckappadGiven = TRUE; break; case BSIM4v4_MOD_LCF : mod->BSIM4v4lcf = value->rValue; mod->BSIM4v4lcfGiven = TRUE; break; case BSIM4v4_MOD_LCLC : mod->BSIM4v4lclc = value->rValue; mod->BSIM4v4lclcGiven = TRUE; break; case BSIM4v4_MOD_LCLE : mod->BSIM4v4lcle = value->rValue; mod->BSIM4v4lcleGiven = TRUE; break; case BSIM4v4_MOD_LVFBCV : mod->BSIM4v4lvfbcv = value->rValue; mod->BSIM4v4lvfbcvGiven = TRUE; break; case BSIM4v4_MOD_LACDE : mod->BSIM4v4lacde = value->rValue; mod->BSIM4v4lacdeGiven = TRUE; break; case BSIM4v4_MOD_LMOIN : mod->BSIM4v4lmoin = value->rValue; mod->BSIM4v4lmoinGiven = TRUE; break; case BSIM4v4_MOD_LNOFF : mod->BSIM4v4lnoff = value->rValue; mod->BSIM4v4lnoffGiven = TRUE; break; case BSIM4v4_MOD_LVOFFCV : mod->BSIM4v4lvoffcv = value->rValue; mod->BSIM4v4lvoffcvGiven = TRUE; break; /* Width dependence */ case BSIM4v4_MOD_WCDSC : mod->BSIM4v4wcdsc = value->rValue; mod->BSIM4v4wcdscGiven = TRUE; break; case BSIM4v4_MOD_WCDSCB : mod->BSIM4v4wcdscb = value->rValue; mod->BSIM4v4wcdscbGiven = TRUE; break; case BSIM4v4_MOD_WCDSCD : mod->BSIM4v4wcdscd = value->rValue; mod->BSIM4v4wcdscdGiven = TRUE; break; case BSIM4v4_MOD_WCIT : mod->BSIM4v4wcit = value->rValue; mod->BSIM4v4wcitGiven = TRUE; break; case BSIM4v4_MOD_WNFACTOR : mod->BSIM4v4wnfactor = value->rValue; mod->BSIM4v4wnfactorGiven = TRUE; break; case BSIM4v4_MOD_WXJ: mod->BSIM4v4wxj = value->rValue; mod->BSIM4v4wxjGiven = TRUE; break; case BSIM4v4_MOD_WVSAT: mod->BSIM4v4wvsat = value->rValue; mod->BSIM4v4wvsatGiven = TRUE; break; case BSIM4v4_MOD_WA0: mod->BSIM4v4wa0 = value->rValue; mod->BSIM4v4wa0Given = TRUE; break; case BSIM4v4_MOD_WAGS: mod->BSIM4v4wags = value->rValue; mod->BSIM4v4wagsGiven = TRUE; break; case BSIM4v4_MOD_WA1: mod->BSIM4v4wa1 = value->rValue; mod->BSIM4v4wa1Given = TRUE; break; case BSIM4v4_MOD_WA2: mod->BSIM4v4wa2 = value->rValue; mod->BSIM4v4wa2Given = TRUE; break; case BSIM4v4_MOD_WAT: mod->BSIM4v4wat = value->rValue; mod->BSIM4v4watGiven = TRUE; break; case BSIM4v4_MOD_WKETA: mod->BSIM4v4wketa = value->rValue; mod->BSIM4v4wketaGiven = TRUE; break; case BSIM4v4_MOD_WNSUB: mod->BSIM4v4wnsub = value->rValue; mod->BSIM4v4wnsubGiven = TRUE; break; case BSIM4v4_MOD_WNDEP: mod->BSIM4v4wndep = value->rValue; mod->BSIM4v4wndepGiven = TRUE; if (mod->BSIM4v4wndep > 1.0e20) mod->BSIM4v4wndep *= 1.0e-6; break; case BSIM4v4_MOD_WNSD: mod->BSIM4v4wnsd = value->rValue; mod->BSIM4v4wnsdGiven = TRUE; if (mod->BSIM4v4wnsd > 1.0e23) mod->BSIM4v4wnsd *= 1.0e-6; break; case BSIM4v4_MOD_WNGATE: mod->BSIM4v4wngate = value->rValue; mod->BSIM4v4wngateGiven = TRUE; if (mod->BSIM4v4wngate > 1.0e23) mod->BSIM4v4wngate *= 1.0e-6; break; case BSIM4v4_MOD_WGAMMA1: mod->BSIM4v4wgamma1 = value->rValue; mod->BSIM4v4wgamma1Given = TRUE; break; case BSIM4v4_MOD_WGAMMA2: mod->BSIM4v4wgamma2 = value->rValue; mod->BSIM4v4wgamma2Given = TRUE; break; case BSIM4v4_MOD_WVBX: mod->BSIM4v4wvbx = value->rValue; mod->BSIM4v4wvbxGiven = TRUE; break; case BSIM4v4_MOD_WVBM: mod->BSIM4v4wvbm = value->rValue; mod->BSIM4v4wvbmGiven = TRUE; break; case BSIM4v4_MOD_WXT: mod->BSIM4v4wxt = value->rValue; mod->BSIM4v4wxtGiven = TRUE; break; case BSIM4v4_MOD_WK1: mod->BSIM4v4wk1 = value->rValue; mod->BSIM4v4wk1Given = TRUE; break; case BSIM4v4_MOD_WKT1: mod->BSIM4v4wkt1 = value->rValue; mod->BSIM4v4wkt1Given = TRUE; break; case BSIM4v4_MOD_WKT1L: mod->BSIM4v4wkt1l = value->rValue; mod->BSIM4v4wkt1lGiven = TRUE; break; case BSIM4v4_MOD_WKT2: mod->BSIM4v4wkt2 = value->rValue; mod->BSIM4v4wkt2Given = TRUE; break; case BSIM4v4_MOD_WK2: mod->BSIM4v4wk2 = value->rValue; mod->BSIM4v4wk2Given = TRUE; break; case BSIM4v4_MOD_WK3: mod->BSIM4v4wk3 = value->rValue; mod->BSIM4v4wk3Given = TRUE; break; case BSIM4v4_MOD_WK3B: mod->BSIM4v4wk3b = value->rValue; mod->BSIM4v4wk3bGiven = TRUE; break; case BSIM4v4_MOD_WLPE0: mod->BSIM4v4wlpe0 = value->rValue; mod->BSIM4v4wlpe0Given = TRUE; break; case BSIM4v4_MOD_WLPEB: mod->BSIM4v4wlpeb = value->rValue; mod->BSIM4v4wlpebGiven = TRUE; break; case BSIM4v4_MOD_WDVTP0: mod->BSIM4v4wdvtp0 = value->rValue; mod->BSIM4v4wdvtp0Given = TRUE; break; case BSIM4v4_MOD_WDVTP1: mod->BSIM4v4wdvtp1 = value->rValue; mod->BSIM4v4wdvtp1Given = TRUE; break; case BSIM4v4_MOD_WW0: mod->BSIM4v4ww0 = value->rValue; mod->BSIM4v4ww0Given = TRUE; break; case BSIM4v4_MOD_WDVT0: mod->BSIM4v4wdvt0 = value->rValue; mod->BSIM4v4wdvt0Given = TRUE; break; case BSIM4v4_MOD_WDVT1: mod->BSIM4v4wdvt1 = value->rValue; mod->BSIM4v4wdvt1Given = TRUE; break; case BSIM4v4_MOD_WDVT2: mod->BSIM4v4wdvt2 = value->rValue; mod->BSIM4v4wdvt2Given = TRUE; break; case BSIM4v4_MOD_WDVT0W: mod->BSIM4v4wdvt0w = value->rValue; mod->BSIM4v4wdvt0wGiven = TRUE; break; case BSIM4v4_MOD_WDVT1W: mod->BSIM4v4wdvt1w = value->rValue; mod->BSIM4v4wdvt1wGiven = TRUE; break; case BSIM4v4_MOD_WDVT2W: mod->BSIM4v4wdvt2w = value->rValue; mod->BSIM4v4wdvt2wGiven = TRUE; break; case BSIM4v4_MOD_WDROUT: mod->BSIM4v4wdrout = value->rValue; mod->BSIM4v4wdroutGiven = TRUE; break; case BSIM4v4_MOD_WDSUB: mod->BSIM4v4wdsub = value->rValue; mod->BSIM4v4wdsubGiven = TRUE; break; case BSIM4v4_MOD_WVTH0: mod->BSIM4v4wvth0 = value->rValue; mod->BSIM4v4wvth0Given = TRUE; break; case BSIM4v4_MOD_WUA: mod->BSIM4v4wua = value->rValue; mod->BSIM4v4wuaGiven = TRUE; break; case BSIM4v4_MOD_WUA1: mod->BSIM4v4wua1 = value->rValue; mod->BSIM4v4wua1Given = TRUE; break; case BSIM4v4_MOD_WUB: mod->BSIM4v4wub = value->rValue; mod->BSIM4v4wubGiven = TRUE; break; case BSIM4v4_MOD_WUB1: mod->BSIM4v4wub1 = value->rValue; mod->BSIM4v4wub1Given = TRUE; break; case BSIM4v4_MOD_WUC: mod->BSIM4v4wuc = value->rValue; mod->BSIM4v4wucGiven = TRUE; break; case BSIM4v4_MOD_WUC1: mod->BSIM4v4wuc1 = value->rValue; mod->BSIM4v4wuc1Given = TRUE; break; case BSIM4v4_MOD_WU0 : mod->BSIM4v4wu0 = value->rValue; mod->BSIM4v4wu0Given = TRUE; break; case BSIM4v4_MOD_WUTE : mod->BSIM4v4wute = value->rValue; mod->BSIM4v4wuteGiven = TRUE; break; case BSIM4v4_MOD_WVOFF: mod->BSIM4v4wvoff = value->rValue; mod->BSIM4v4wvoffGiven = TRUE; break; case BSIM4v4_MOD_WMINV: mod->BSIM4v4wminv = value->rValue; mod->BSIM4v4wminvGiven = TRUE; break; case BSIM4v4_MOD_WFPROUT: mod->BSIM4v4wfprout = value->rValue; mod->BSIM4v4wfproutGiven = TRUE; break; case BSIM4v4_MOD_WPDITS: mod->BSIM4v4wpdits = value->rValue; mod->BSIM4v4wpditsGiven = TRUE; break; case BSIM4v4_MOD_WPDITSD: mod->BSIM4v4wpditsd = value->rValue; mod->BSIM4v4wpditsdGiven = TRUE; break; case BSIM4v4_MOD_WDELTA : mod->BSIM4v4wdelta = value->rValue; mod->BSIM4v4wdeltaGiven = TRUE; break; case BSIM4v4_MOD_WRDSW: mod->BSIM4v4wrdsw = value->rValue; mod->BSIM4v4wrdswGiven = TRUE; break; case BSIM4v4_MOD_WRDW: mod->BSIM4v4wrdw = value->rValue; mod->BSIM4v4wrdwGiven = TRUE; break; case BSIM4v4_MOD_WRSW: mod->BSIM4v4wrsw = value->rValue; mod->BSIM4v4wrswGiven = TRUE; break; case BSIM4v4_MOD_WPRWB: mod->BSIM4v4wprwb = value->rValue; mod->BSIM4v4wprwbGiven = TRUE; break; case BSIM4v4_MOD_WPRWG: mod->BSIM4v4wprwg = value->rValue; mod->BSIM4v4wprwgGiven = TRUE; break; case BSIM4v4_MOD_WPRT: mod->BSIM4v4wprt = value->rValue; mod->BSIM4v4wprtGiven = TRUE; break; case BSIM4v4_MOD_WETA0: mod->BSIM4v4weta0 = value->rValue; mod->BSIM4v4weta0Given = TRUE; break; case BSIM4v4_MOD_WETAB: mod->BSIM4v4wetab = value->rValue; mod->BSIM4v4wetabGiven = TRUE; break; case BSIM4v4_MOD_WPCLM: mod->BSIM4v4wpclm = value->rValue; mod->BSIM4v4wpclmGiven = TRUE; break; case BSIM4v4_MOD_WPDIBL1: mod->BSIM4v4wpdibl1 = value->rValue; mod->BSIM4v4wpdibl1Given = TRUE; break; case BSIM4v4_MOD_WPDIBL2: mod->BSIM4v4wpdibl2 = value->rValue; mod->BSIM4v4wpdibl2Given = TRUE; break; case BSIM4v4_MOD_WPDIBLB: mod->BSIM4v4wpdiblb = value->rValue; mod->BSIM4v4wpdiblbGiven = TRUE; break; case BSIM4v4_MOD_WPSCBE1: mod->BSIM4v4wpscbe1 = value->rValue; mod->BSIM4v4wpscbe1Given = TRUE; break; case BSIM4v4_MOD_WPSCBE2: mod->BSIM4v4wpscbe2 = value->rValue; mod->BSIM4v4wpscbe2Given = TRUE; break; case BSIM4v4_MOD_WPVAG: mod->BSIM4v4wpvag = value->rValue; mod->BSIM4v4wpvagGiven = TRUE; break; case BSIM4v4_MOD_WWR : mod->BSIM4v4wwr = value->rValue; mod->BSIM4v4wwrGiven = TRUE; break; case BSIM4v4_MOD_WDWG : mod->BSIM4v4wdwg = value->rValue; mod->BSIM4v4wdwgGiven = TRUE; break; case BSIM4v4_MOD_WDWB : mod->BSIM4v4wdwb = value->rValue; mod->BSIM4v4wdwbGiven = TRUE; break; case BSIM4v4_MOD_WB0 : mod->BSIM4v4wb0 = value->rValue; mod->BSIM4v4wb0Given = TRUE; break; case BSIM4v4_MOD_WB1 : mod->BSIM4v4wb1 = value->rValue; mod->BSIM4v4wb1Given = TRUE; break; case BSIM4v4_MOD_WALPHA0 : mod->BSIM4v4walpha0 = value->rValue; mod->BSIM4v4walpha0Given = TRUE; break; case BSIM4v4_MOD_WALPHA1 : mod->BSIM4v4walpha1 = value->rValue; mod->BSIM4v4walpha1Given = TRUE; break; case BSIM4v4_MOD_WBETA0 : mod->BSIM4v4wbeta0 = value->rValue; mod->BSIM4v4wbeta0Given = TRUE; break; case BSIM4v4_MOD_WAGIDL : mod->BSIM4v4wagidl = value->rValue; mod->BSIM4v4wagidlGiven = TRUE; break; case BSIM4v4_MOD_WBGIDL : mod->BSIM4v4wbgidl = value->rValue; mod->BSIM4v4wbgidlGiven = TRUE; break; case BSIM4v4_MOD_WCGIDL : mod->BSIM4v4wcgidl = value->rValue; mod->BSIM4v4wcgidlGiven = TRUE; break; case BSIM4v4_MOD_WPHIN : mod->BSIM4v4wphin = value->rValue; mod->BSIM4v4wphinGiven = TRUE; break; case BSIM4v4_MOD_WEGIDL : mod->BSIM4v4wegidl = value->rValue; mod->BSIM4v4wegidlGiven = TRUE; break; case BSIM4v4_MOD_WAIGC : mod->BSIM4v4waigc = value->rValue; mod->BSIM4v4waigcGiven = TRUE; break; case BSIM4v4_MOD_WBIGC : mod->BSIM4v4wbigc = value->rValue; mod->BSIM4v4wbigcGiven = TRUE; break; case BSIM4v4_MOD_WCIGC : mod->BSIM4v4wcigc = value->rValue; mod->BSIM4v4wcigcGiven = TRUE; break; case BSIM4v4_MOD_WAIGSD : mod->BSIM4v4waigsd = value->rValue; mod->BSIM4v4waigsdGiven = TRUE; break; case BSIM4v4_MOD_WBIGSD : mod->BSIM4v4wbigsd = value->rValue; mod->BSIM4v4wbigsdGiven = TRUE; break; case BSIM4v4_MOD_WCIGSD : mod->BSIM4v4wcigsd = value->rValue; mod->BSIM4v4wcigsdGiven = TRUE; break; case BSIM4v4_MOD_WAIGBACC : mod->BSIM4v4waigbacc = value->rValue; mod->BSIM4v4waigbaccGiven = TRUE; break; case BSIM4v4_MOD_WBIGBACC : mod->BSIM4v4wbigbacc = value->rValue; mod->BSIM4v4wbigbaccGiven = TRUE; break; case BSIM4v4_MOD_WCIGBACC : mod->BSIM4v4wcigbacc = value->rValue; mod->BSIM4v4wcigbaccGiven = TRUE; break; case BSIM4v4_MOD_WAIGBINV : mod->BSIM4v4waigbinv = value->rValue; mod->BSIM4v4waigbinvGiven = TRUE; break; case BSIM4v4_MOD_WBIGBINV : mod->BSIM4v4wbigbinv = value->rValue; mod->BSIM4v4wbigbinvGiven = TRUE; break; case BSIM4v4_MOD_WCIGBINV : mod->BSIM4v4wcigbinv = value->rValue; mod->BSIM4v4wcigbinvGiven = TRUE; break; case BSIM4v4_MOD_WNIGC : mod->BSIM4v4wnigc = value->rValue; mod->BSIM4v4wnigcGiven = TRUE; break; case BSIM4v4_MOD_WNIGBINV : mod->BSIM4v4wnigbinv = value->rValue; mod->BSIM4v4wnigbinvGiven = TRUE; break; case BSIM4v4_MOD_WNIGBACC : mod->BSIM4v4wnigbacc = value->rValue; mod->BSIM4v4wnigbaccGiven = TRUE; break; case BSIM4v4_MOD_WNTOX : mod->BSIM4v4wntox = value->rValue; mod->BSIM4v4wntoxGiven = TRUE; break; case BSIM4v4_MOD_WEIGBINV : mod->BSIM4v4weigbinv = value->rValue; mod->BSIM4v4weigbinvGiven = TRUE; break; case BSIM4v4_MOD_WPIGCD : mod->BSIM4v4wpigcd = value->rValue; mod->BSIM4v4wpigcdGiven = TRUE; break; case BSIM4v4_MOD_WPOXEDGE : mod->BSIM4v4wpoxedge = value->rValue; mod->BSIM4v4wpoxedgeGiven = TRUE; break; case BSIM4v4_MOD_WXRCRG1 : mod->BSIM4v4wxrcrg1 = value->rValue; mod->BSIM4v4wxrcrg1Given = TRUE; break; case BSIM4v4_MOD_WXRCRG2 : mod->BSIM4v4wxrcrg2 = value->rValue; mod->BSIM4v4wxrcrg2Given = TRUE; break; case BSIM4v4_MOD_WLAMBDA : mod->BSIM4v4wlambda = value->rValue; mod->BSIM4v4wlambdaGiven = TRUE; break; case BSIM4v4_MOD_WVTL : mod->BSIM4v4wvtl = value->rValue; mod->BSIM4v4wvtlGiven = TRUE; break; case BSIM4v4_MOD_WXN: mod->BSIM4v4wxn = value->rValue; mod->BSIM4v4wxnGiven = TRUE; break; case BSIM4v4_MOD_WVFBSDOFF: mod->BSIM4v4wvfbsdoff = value->rValue; mod->BSIM4v4wvfbsdoffGiven = TRUE; break; case BSIM4v4_MOD_WEU : mod->BSIM4v4weu = value->rValue; mod->BSIM4v4weuGiven = TRUE; break; case BSIM4v4_MOD_WVFB : mod->BSIM4v4wvfb = value->rValue; mod->BSIM4v4wvfbGiven = TRUE; break; case BSIM4v4_MOD_WCGSL : mod->BSIM4v4wcgsl = value->rValue; mod->BSIM4v4wcgslGiven = TRUE; break; case BSIM4v4_MOD_WCGDL : mod->BSIM4v4wcgdl = value->rValue; mod->BSIM4v4wcgdlGiven = TRUE; break; case BSIM4v4_MOD_WCKAPPAS : mod->BSIM4v4wckappas = value->rValue; mod->BSIM4v4wckappasGiven = TRUE; break; case BSIM4v4_MOD_WCKAPPAD : mod->BSIM4v4wckappad = value->rValue; mod->BSIM4v4wckappadGiven = TRUE; break; case BSIM4v4_MOD_WCF : mod->BSIM4v4wcf = value->rValue; mod->BSIM4v4wcfGiven = TRUE; break; case BSIM4v4_MOD_WCLC : mod->BSIM4v4wclc = value->rValue; mod->BSIM4v4wclcGiven = TRUE; break; case BSIM4v4_MOD_WCLE : mod->BSIM4v4wcle = value->rValue; mod->BSIM4v4wcleGiven = TRUE; break; case BSIM4v4_MOD_WVFBCV : mod->BSIM4v4wvfbcv = value->rValue; mod->BSIM4v4wvfbcvGiven = TRUE; break; case BSIM4v4_MOD_WACDE : mod->BSIM4v4wacde = value->rValue; mod->BSIM4v4wacdeGiven = TRUE; break; case BSIM4v4_MOD_WMOIN : mod->BSIM4v4wmoin = value->rValue; mod->BSIM4v4wmoinGiven = TRUE; break; case BSIM4v4_MOD_WNOFF : mod->BSIM4v4wnoff = value->rValue; mod->BSIM4v4wnoffGiven = TRUE; break; case BSIM4v4_MOD_WVOFFCV : mod->BSIM4v4wvoffcv = value->rValue; mod->BSIM4v4wvoffcvGiven = TRUE; break; /* Cross-term dependence */ case BSIM4v4_MOD_PCDSC : mod->BSIM4v4pcdsc = value->rValue; mod->BSIM4v4pcdscGiven = TRUE; break; case BSIM4v4_MOD_PCDSCB : mod->BSIM4v4pcdscb = value->rValue; mod->BSIM4v4pcdscbGiven = TRUE; break; case BSIM4v4_MOD_PCDSCD : mod->BSIM4v4pcdscd = value->rValue; mod->BSIM4v4pcdscdGiven = TRUE; break; case BSIM4v4_MOD_PCIT : mod->BSIM4v4pcit = value->rValue; mod->BSIM4v4pcitGiven = TRUE; break; case BSIM4v4_MOD_PNFACTOR : mod->BSIM4v4pnfactor = value->rValue; mod->BSIM4v4pnfactorGiven = TRUE; break; case BSIM4v4_MOD_PXJ: mod->BSIM4v4pxj = value->rValue; mod->BSIM4v4pxjGiven = TRUE; break; case BSIM4v4_MOD_PVSAT: mod->BSIM4v4pvsat = value->rValue; mod->BSIM4v4pvsatGiven = TRUE; break; case BSIM4v4_MOD_PA0: mod->BSIM4v4pa0 = value->rValue; mod->BSIM4v4pa0Given = TRUE; break; case BSIM4v4_MOD_PAGS: mod->BSIM4v4pags = value->rValue; mod->BSIM4v4pagsGiven = TRUE; break; case BSIM4v4_MOD_PA1: mod->BSIM4v4pa1 = value->rValue; mod->BSIM4v4pa1Given = TRUE; break; case BSIM4v4_MOD_PA2: mod->BSIM4v4pa2 = value->rValue; mod->BSIM4v4pa2Given = TRUE; break; case BSIM4v4_MOD_PAT: mod->BSIM4v4pat = value->rValue; mod->BSIM4v4patGiven = TRUE; break; case BSIM4v4_MOD_PKETA: mod->BSIM4v4pketa = value->rValue; mod->BSIM4v4pketaGiven = TRUE; break; case BSIM4v4_MOD_PNSUB: mod->BSIM4v4pnsub = value->rValue; mod->BSIM4v4pnsubGiven = TRUE; break; case BSIM4v4_MOD_PNDEP: mod->BSIM4v4pndep = value->rValue; mod->BSIM4v4pndepGiven = TRUE; if (mod->BSIM4v4pndep > 1.0e20) mod->BSIM4v4pndep *= 1.0e-6; break; case BSIM4v4_MOD_PNSD: mod->BSIM4v4pnsd = value->rValue; mod->BSIM4v4pnsdGiven = TRUE; if (mod->BSIM4v4pnsd > 1.0e23) mod->BSIM4v4pnsd *= 1.0e-6; break; case BSIM4v4_MOD_PNGATE: mod->BSIM4v4pngate = value->rValue; mod->BSIM4v4pngateGiven = TRUE; if (mod->BSIM4v4pngate > 1.0e23) mod->BSIM4v4pngate *= 1.0e-6; break; case BSIM4v4_MOD_PGAMMA1: mod->BSIM4v4pgamma1 = value->rValue; mod->BSIM4v4pgamma1Given = TRUE; break; case BSIM4v4_MOD_PGAMMA2: mod->BSIM4v4pgamma2 = value->rValue; mod->BSIM4v4pgamma2Given = TRUE; break; case BSIM4v4_MOD_PVBX: mod->BSIM4v4pvbx = value->rValue; mod->BSIM4v4pvbxGiven = TRUE; break; case BSIM4v4_MOD_PVBM: mod->BSIM4v4pvbm = value->rValue; mod->BSIM4v4pvbmGiven = TRUE; break; case BSIM4v4_MOD_PXT: mod->BSIM4v4pxt = value->rValue; mod->BSIM4v4pxtGiven = TRUE; break; case BSIM4v4_MOD_PK1: mod->BSIM4v4pk1 = value->rValue; mod->BSIM4v4pk1Given = TRUE; break; case BSIM4v4_MOD_PKT1: mod->BSIM4v4pkt1 = value->rValue; mod->BSIM4v4pkt1Given = TRUE; break; case BSIM4v4_MOD_PKT1L: mod->BSIM4v4pkt1l = value->rValue; mod->BSIM4v4pkt1lGiven = TRUE; break; case BSIM4v4_MOD_PKT2: mod->BSIM4v4pkt2 = value->rValue; mod->BSIM4v4pkt2Given = TRUE; break; case BSIM4v4_MOD_PK2: mod->BSIM4v4pk2 = value->rValue; mod->BSIM4v4pk2Given = TRUE; break; case BSIM4v4_MOD_PK3: mod->BSIM4v4pk3 = value->rValue; mod->BSIM4v4pk3Given = TRUE; break; case BSIM4v4_MOD_PK3B: mod->BSIM4v4pk3b = value->rValue; mod->BSIM4v4pk3bGiven = TRUE; break; case BSIM4v4_MOD_PLPE0: mod->BSIM4v4plpe0 = value->rValue; mod->BSIM4v4plpe0Given = TRUE; break; case BSIM4v4_MOD_PLPEB: mod->BSIM4v4plpeb = value->rValue; mod->BSIM4v4plpebGiven = TRUE; break; case BSIM4v4_MOD_PDVTP0: mod->BSIM4v4pdvtp0 = value->rValue; mod->BSIM4v4pdvtp0Given = TRUE; break; case BSIM4v4_MOD_PDVTP1: mod->BSIM4v4pdvtp1 = value->rValue; mod->BSIM4v4pdvtp1Given = TRUE; break; case BSIM4v4_MOD_PW0: mod->BSIM4v4pw0 = value->rValue; mod->BSIM4v4pw0Given = TRUE; break; case BSIM4v4_MOD_PDVT0: mod->BSIM4v4pdvt0 = value->rValue; mod->BSIM4v4pdvt0Given = TRUE; break; case BSIM4v4_MOD_PDVT1: mod->BSIM4v4pdvt1 = value->rValue; mod->BSIM4v4pdvt1Given = TRUE; break; case BSIM4v4_MOD_PDVT2: mod->BSIM4v4pdvt2 = value->rValue; mod->BSIM4v4pdvt2Given = TRUE; break; case BSIM4v4_MOD_PDVT0W: mod->BSIM4v4pdvt0w = value->rValue; mod->BSIM4v4pdvt0wGiven = TRUE; break; case BSIM4v4_MOD_PDVT1W: mod->BSIM4v4pdvt1w = value->rValue; mod->BSIM4v4pdvt1wGiven = TRUE; break; case BSIM4v4_MOD_PDVT2W: mod->BSIM4v4pdvt2w = value->rValue; mod->BSIM4v4pdvt2wGiven = TRUE; break; case BSIM4v4_MOD_PDROUT: mod->BSIM4v4pdrout = value->rValue; mod->BSIM4v4pdroutGiven = TRUE; break; case BSIM4v4_MOD_PDSUB: mod->BSIM4v4pdsub = value->rValue; mod->BSIM4v4pdsubGiven = TRUE; break; case BSIM4v4_MOD_PVTH0: mod->BSIM4v4pvth0 = value->rValue; mod->BSIM4v4pvth0Given = TRUE; break; case BSIM4v4_MOD_PUA: mod->BSIM4v4pua = value->rValue; mod->BSIM4v4puaGiven = TRUE; break; case BSIM4v4_MOD_PUA1: mod->BSIM4v4pua1 = value->rValue; mod->BSIM4v4pua1Given = TRUE; break; case BSIM4v4_MOD_PUB: mod->BSIM4v4pub = value->rValue; mod->BSIM4v4pubGiven = TRUE; break; case BSIM4v4_MOD_PUB1: mod->BSIM4v4pub1 = value->rValue; mod->BSIM4v4pub1Given = TRUE; break; case BSIM4v4_MOD_PUC: mod->BSIM4v4puc = value->rValue; mod->BSIM4v4pucGiven = TRUE; break; case BSIM4v4_MOD_PUC1: mod->BSIM4v4puc1 = value->rValue; mod->BSIM4v4puc1Given = TRUE; break; case BSIM4v4_MOD_PU0 : mod->BSIM4v4pu0 = value->rValue; mod->BSIM4v4pu0Given = TRUE; break; case BSIM4v4_MOD_PUTE : mod->BSIM4v4pute = value->rValue; mod->BSIM4v4puteGiven = TRUE; break; case BSIM4v4_MOD_PVOFF: mod->BSIM4v4pvoff = value->rValue; mod->BSIM4v4pvoffGiven = TRUE; break; case BSIM4v4_MOD_PMINV: mod->BSIM4v4pminv = value->rValue; mod->BSIM4v4pminvGiven = TRUE; break; case BSIM4v4_MOD_PFPROUT: mod->BSIM4v4pfprout = value->rValue; mod->BSIM4v4pfproutGiven = TRUE; break; case BSIM4v4_MOD_PPDITS: mod->BSIM4v4ppdits = value->rValue; mod->BSIM4v4ppditsGiven = TRUE; break; case BSIM4v4_MOD_PPDITSD: mod->BSIM4v4ppditsd = value->rValue; mod->BSIM4v4ppditsdGiven = TRUE; break; case BSIM4v4_MOD_PDELTA : mod->BSIM4v4pdelta = value->rValue; mod->BSIM4v4pdeltaGiven = TRUE; break; case BSIM4v4_MOD_PRDSW: mod->BSIM4v4prdsw = value->rValue; mod->BSIM4v4prdswGiven = TRUE; break; case BSIM4v4_MOD_PRDW: mod->BSIM4v4prdw = value->rValue; mod->BSIM4v4prdwGiven = TRUE; break; case BSIM4v4_MOD_PRSW: mod->BSIM4v4prsw = value->rValue; mod->BSIM4v4prswGiven = TRUE; break; case BSIM4v4_MOD_PPRWB: mod->BSIM4v4pprwb = value->rValue; mod->BSIM4v4pprwbGiven = TRUE; break; case BSIM4v4_MOD_PPRWG: mod->BSIM4v4pprwg = value->rValue; mod->BSIM4v4pprwgGiven = TRUE; break; case BSIM4v4_MOD_PPRT: mod->BSIM4v4pprt = value->rValue; mod->BSIM4v4pprtGiven = TRUE; break; case BSIM4v4_MOD_PETA0: mod->BSIM4v4peta0 = value->rValue; mod->BSIM4v4peta0Given = TRUE; break; case BSIM4v4_MOD_PETAB: mod->BSIM4v4petab = value->rValue; mod->BSIM4v4petabGiven = TRUE; break; case BSIM4v4_MOD_PPCLM: mod->BSIM4v4ppclm = value->rValue; mod->BSIM4v4ppclmGiven = TRUE; break; case BSIM4v4_MOD_PPDIBL1: mod->BSIM4v4ppdibl1 = value->rValue; mod->BSIM4v4ppdibl1Given = TRUE; break; case BSIM4v4_MOD_PPDIBL2: mod->BSIM4v4ppdibl2 = value->rValue; mod->BSIM4v4ppdibl2Given = TRUE; break; case BSIM4v4_MOD_PPDIBLB: mod->BSIM4v4ppdiblb = value->rValue; mod->BSIM4v4ppdiblbGiven = TRUE; break; case BSIM4v4_MOD_PPSCBE1: mod->BSIM4v4ppscbe1 = value->rValue; mod->BSIM4v4ppscbe1Given = TRUE; break; case BSIM4v4_MOD_PPSCBE2: mod->BSIM4v4ppscbe2 = value->rValue; mod->BSIM4v4ppscbe2Given = TRUE; break; case BSIM4v4_MOD_PPVAG: mod->BSIM4v4ppvag = value->rValue; mod->BSIM4v4ppvagGiven = TRUE; break; case BSIM4v4_MOD_PWR : mod->BSIM4v4pwr = value->rValue; mod->BSIM4v4pwrGiven = TRUE; break; case BSIM4v4_MOD_PDWG : mod->BSIM4v4pdwg = value->rValue; mod->BSIM4v4pdwgGiven = TRUE; break; case BSIM4v4_MOD_PDWB : mod->BSIM4v4pdwb = value->rValue; mod->BSIM4v4pdwbGiven = TRUE; break; case BSIM4v4_MOD_PB0 : mod->BSIM4v4pb0 = value->rValue; mod->BSIM4v4pb0Given = TRUE; break; case BSIM4v4_MOD_PB1 : mod->BSIM4v4pb1 = value->rValue; mod->BSIM4v4pb1Given = TRUE; break; case BSIM4v4_MOD_PALPHA0 : mod->BSIM4v4palpha0 = value->rValue; mod->BSIM4v4palpha0Given = TRUE; break; case BSIM4v4_MOD_PALPHA1 : mod->BSIM4v4palpha1 = value->rValue; mod->BSIM4v4palpha1Given = TRUE; break; case BSIM4v4_MOD_PBETA0 : mod->BSIM4v4pbeta0 = value->rValue; mod->BSIM4v4pbeta0Given = TRUE; break; case BSIM4v4_MOD_PAGIDL : mod->BSIM4v4pagidl = value->rValue; mod->BSIM4v4pagidlGiven = TRUE; break; case BSIM4v4_MOD_PBGIDL : mod->BSIM4v4pbgidl = value->rValue; mod->BSIM4v4pbgidlGiven = TRUE; break; case BSIM4v4_MOD_PCGIDL : mod->BSIM4v4pcgidl = value->rValue; mod->BSIM4v4pcgidlGiven = TRUE; break; case BSIM4v4_MOD_PPHIN : mod->BSIM4v4pphin = value->rValue; mod->BSIM4v4pphinGiven = TRUE; break; case BSIM4v4_MOD_PEGIDL : mod->BSIM4v4pegidl = value->rValue; mod->BSIM4v4pegidlGiven = TRUE; break; case BSIM4v4_MOD_PAIGC : mod->BSIM4v4paigc = value->rValue; mod->BSIM4v4paigcGiven = TRUE; break; case BSIM4v4_MOD_PBIGC : mod->BSIM4v4pbigc = value->rValue; mod->BSIM4v4pbigcGiven = TRUE; break; case BSIM4v4_MOD_PCIGC : mod->BSIM4v4pcigc = value->rValue; mod->BSIM4v4pcigcGiven = TRUE; break; case BSIM4v4_MOD_PAIGSD : mod->BSIM4v4paigsd = value->rValue; mod->BSIM4v4paigsdGiven = TRUE; break; case BSIM4v4_MOD_PBIGSD : mod->BSIM4v4pbigsd = value->rValue; mod->BSIM4v4pbigsdGiven = TRUE; break; case BSIM4v4_MOD_PCIGSD : mod->BSIM4v4pcigsd = value->rValue; mod->BSIM4v4pcigsdGiven = TRUE; break; case BSIM4v4_MOD_PAIGBACC : mod->BSIM4v4paigbacc = value->rValue; mod->BSIM4v4paigbaccGiven = TRUE; break; case BSIM4v4_MOD_PBIGBACC : mod->BSIM4v4pbigbacc = value->rValue; mod->BSIM4v4pbigbaccGiven = TRUE; break; case BSIM4v4_MOD_PCIGBACC : mod->BSIM4v4pcigbacc = value->rValue; mod->BSIM4v4pcigbaccGiven = TRUE; break; case BSIM4v4_MOD_PAIGBINV : mod->BSIM4v4paigbinv = value->rValue; mod->BSIM4v4paigbinvGiven = TRUE; break; case BSIM4v4_MOD_PBIGBINV : mod->BSIM4v4pbigbinv = value->rValue; mod->BSIM4v4pbigbinvGiven = TRUE; break; case BSIM4v4_MOD_PCIGBINV : mod->BSIM4v4pcigbinv = value->rValue; mod->BSIM4v4pcigbinvGiven = TRUE; break; case BSIM4v4_MOD_PNIGC : mod->BSIM4v4pnigc = value->rValue; mod->BSIM4v4pnigcGiven = TRUE; break; case BSIM4v4_MOD_PNIGBINV : mod->BSIM4v4pnigbinv = value->rValue; mod->BSIM4v4pnigbinvGiven = TRUE; break; case BSIM4v4_MOD_PNIGBACC : mod->BSIM4v4pnigbacc = value->rValue; mod->BSIM4v4pnigbaccGiven = TRUE; break; case BSIM4v4_MOD_PNTOX : mod->BSIM4v4pntox = value->rValue; mod->BSIM4v4pntoxGiven = TRUE; break; case BSIM4v4_MOD_PEIGBINV : mod->BSIM4v4peigbinv = value->rValue; mod->BSIM4v4peigbinvGiven = TRUE; break; case BSIM4v4_MOD_PPIGCD : mod->BSIM4v4ppigcd = value->rValue; mod->BSIM4v4ppigcdGiven = TRUE; break; case BSIM4v4_MOD_PPOXEDGE : mod->BSIM4v4ppoxedge = value->rValue; mod->BSIM4v4ppoxedgeGiven = TRUE; break; case BSIM4v4_MOD_PXRCRG1 : mod->BSIM4v4pxrcrg1 = value->rValue; mod->BSIM4v4pxrcrg1Given = TRUE; break; case BSIM4v4_MOD_PXRCRG2 : mod->BSIM4v4pxrcrg2 = value->rValue; mod->BSIM4v4pxrcrg2Given = TRUE; break; case BSIM4v4_MOD_PLAMBDA : mod->BSIM4v4plambda = value->rValue; mod->BSIM4v4plambdaGiven = TRUE; break; case BSIM4v4_MOD_PVTL : mod->BSIM4v4pvtl = value->rValue; mod->BSIM4v4pvtlGiven = TRUE; break; case BSIM4v4_MOD_PXN: mod->BSIM4v4pxn = value->rValue; mod->BSIM4v4pxnGiven = TRUE; break; case BSIM4v4_MOD_PVFBSDOFF: mod->BSIM4v4pvfbsdoff = value->rValue; mod->BSIM4v4pvfbsdoffGiven = TRUE; break; case BSIM4v4_MOD_PEU : mod->BSIM4v4peu = value->rValue; mod->BSIM4v4peuGiven = TRUE; break; case BSIM4v4_MOD_PVFB : mod->BSIM4v4pvfb = value->rValue; mod->BSIM4v4pvfbGiven = TRUE; break; case BSIM4v4_MOD_PCGSL : mod->BSIM4v4pcgsl = value->rValue; mod->BSIM4v4pcgslGiven = TRUE; break; case BSIM4v4_MOD_PCGDL : mod->BSIM4v4pcgdl = value->rValue; mod->BSIM4v4pcgdlGiven = TRUE; break; case BSIM4v4_MOD_PCKAPPAS : mod->BSIM4v4pckappas = value->rValue; mod->BSIM4v4pckappasGiven = TRUE; break; case BSIM4v4_MOD_PCKAPPAD : mod->BSIM4v4pckappad = value->rValue; mod->BSIM4v4pckappadGiven = TRUE; break; case BSIM4v4_MOD_PCF : mod->BSIM4v4pcf = value->rValue; mod->BSIM4v4pcfGiven = TRUE; break; case BSIM4v4_MOD_PCLC : mod->BSIM4v4pclc = value->rValue; mod->BSIM4v4pclcGiven = TRUE; break; case BSIM4v4_MOD_PCLE : mod->BSIM4v4pcle = value->rValue; mod->BSIM4v4pcleGiven = TRUE; break; case BSIM4v4_MOD_PVFBCV : mod->BSIM4v4pvfbcv = value->rValue; mod->BSIM4v4pvfbcvGiven = TRUE; break; case BSIM4v4_MOD_PACDE : mod->BSIM4v4pacde = value->rValue; mod->BSIM4v4pacdeGiven = TRUE; break; case BSIM4v4_MOD_PMOIN : mod->BSIM4v4pmoin = value->rValue; mod->BSIM4v4pmoinGiven = TRUE; break; case BSIM4v4_MOD_PNOFF : mod->BSIM4v4pnoff = value->rValue; mod->BSIM4v4pnoffGiven = TRUE; break; case BSIM4v4_MOD_PVOFFCV : mod->BSIM4v4pvoffcv = value->rValue; mod->BSIM4v4pvoffcvGiven = TRUE; break; case BSIM4v4_MOD_TNOM : mod->BSIM4v4tnom = value->rValue + CONSTCtoK; mod->BSIM4v4tnomGiven = TRUE; break; case BSIM4v4_MOD_CGSO : mod->BSIM4v4cgso = value->rValue; mod->BSIM4v4cgsoGiven = TRUE; break; case BSIM4v4_MOD_CGDO : mod->BSIM4v4cgdo = value->rValue; mod->BSIM4v4cgdoGiven = TRUE; break; case BSIM4v4_MOD_CGBO : mod->BSIM4v4cgbo = value->rValue; mod->BSIM4v4cgboGiven = TRUE; break; case BSIM4v4_MOD_XPART : mod->BSIM4v4xpart = value->rValue; mod->BSIM4v4xpartGiven = TRUE; break; case BSIM4v4_MOD_RSH : mod->BSIM4v4sheetResistance = value->rValue; mod->BSIM4v4sheetResistanceGiven = TRUE; break; case BSIM4v4_MOD_JSS : mod->BSIM4v4SjctSatCurDensity = value->rValue; mod->BSIM4v4SjctSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_JSWS : mod->BSIM4v4SjctSidewallSatCurDensity = value->rValue; mod->BSIM4v4SjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_JSWGS : mod->BSIM4v4SjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v4SjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_PBS : mod->BSIM4v4SbulkJctPotential = value->rValue; mod->BSIM4v4SbulkJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJS : mod->BSIM4v4SbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v4SbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_PBSWS : mod->BSIM4v4SsidewallJctPotential = value->rValue; mod->BSIM4v4SsidewallJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJSWS : mod->BSIM4v4SbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v4SbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_CJS : mod->BSIM4v4SunitAreaJctCap = value->rValue; mod->BSIM4v4SunitAreaJctCapGiven = TRUE; break; case BSIM4v4_MOD_CJSWS : mod->BSIM4v4SunitLengthSidewallJctCap = value->rValue; mod->BSIM4v4SunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v4_MOD_NJS : mod->BSIM4v4SjctEmissionCoeff = value->rValue; mod->BSIM4v4SjctEmissionCoeffGiven = TRUE; break; case BSIM4v4_MOD_PBSWGS : mod->BSIM4v4SGatesidewallJctPotential = value->rValue; mod->BSIM4v4SGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJSWGS : mod->BSIM4v4SbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v4SbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_CJSWGS : mod->BSIM4v4SunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v4SunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v4_MOD_XTIS : mod->BSIM4v4SjctTempExponent = value->rValue; mod->BSIM4v4SjctTempExponentGiven = TRUE; break; case BSIM4v4_MOD_JSD : mod->BSIM4v4DjctSatCurDensity = value->rValue; mod->BSIM4v4DjctSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_JSWD : mod->BSIM4v4DjctSidewallSatCurDensity = value->rValue; mod->BSIM4v4DjctSidewallSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_JSWGD : mod->BSIM4v4DjctGateSidewallSatCurDensity = value->rValue; mod->BSIM4v4DjctGateSidewallSatCurDensityGiven = TRUE; break; case BSIM4v4_MOD_PBD : mod->BSIM4v4DbulkJctPotential = value->rValue; mod->BSIM4v4DbulkJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJD : mod->BSIM4v4DbulkJctBotGradingCoeff = value->rValue; mod->BSIM4v4DbulkJctBotGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_PBSWD : mod->BSIM4v4DsidewallJctPotential = value->rValue; mod->BSIM4v4DsidewallJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJSWD : mod->BSIM4v4DbulkJctSideGradingCoeff = value->rValue; mod->BSIM4v4DbulkJctSideGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_CJD : mod->BSIM4v4DunitAreaJctCap = value->rValue; mod->BSIM4v4DunitAreaJctCapGiven = TRUE; break; case BSIM4v4_MOD_CJSWD : mod->BSIM4v4DunitLengthSidewallJctCap = value->rValue; mod->BSIM4v4DunitLengthSidewallJctCapGiven = TRUE; break; case BSIM4v4_MOD_NJD : mod->BSIM4v4DjctEmissionCoeff = value->rValue; mod->BSIM4v4DjctEmissionCoeffGiven = TRUE; break; case BSIM4v4_MOD_PBSWGD : mod->BSIM4v4DGatesidewallJctPotential = value->rValue; mod->BSIM4v4DGatesidewallJctPotentialGiven = TRUE; break; case BSIM4v4_MOD_MJSWGD : mod->BSIM4v4DbulkJctGateSideGradingCoeff = value->rValue; mod->BSIM4v4DbulkJctGateSideGradingCoeffGiven = TRUE; break; case BSIM4v4_MOD_CJSWGD : mod->BSIM4v4DunitLengthGateSidewallJctCap = value->rValue; mod->BSIM4v4DunitLengthGateSidewallJctCapGiven = TRUE; break; case BSIM4v4_MOD_XTID : mod->BSIM4v4DjctTempExponent = value->rValue; mod->BSIM4v4DjctTempExponentGiven = TRUE; break; case BSIM4v4_MOD_LINT : mod->BSIM4v4Lint = value->rValue; mod->BSIM4v4LintGiven = TRUE; break; case BSIM4v4_MOD_LL : mod->BSIM4v4Ll = value->rValue; mod->BSIM4v4LlGiven = TRUE; break; case BSIM4v4_MOD_LLC : mod->BSIM4v4Llc = value->rValue; mod->BSIM4v4LlcGiven = TRUE; break; case BSIM4v4_MOD_LLN : mod->BSIM4v4Lln = value->rValue; mod->BSIM4v4LlnGiven = TRUE; break; case BSIM4v4_MOD_LW : mod->BSIM4v4Lw = value->rValue; mod->BSIM4v4LwGiven = TRUE; break; case BSIM4v4_MOD_LWC : mod->BSIM4v4Lwc = value->rValue; mod->BSIM4v4LwcGiven = TRUE; break; case BSIM4v4_MOD_LWN : mod->BSIM4v4Lwn = value->rValue; mod->BSIM4v4LwnGiven = TRUE; break; case BSIM4v4_MOD_LWL : mod->BSIM4v4Lwl = value->rValue; mod->BSIM4v4LwlGiven = TRUE; break; case BSIM4v4_MOD_LWLC : mod->BSIM4v4Lwlc = value->rValue; mod->BSIM4v4LwlcGiven = TRUE; break; case BSIM4v4_MOD_LMIN : mod->BSIM4v4Lmin = value->rValue; mod->BSIM4v4LminGiven = TRUE; break; case BSIM4v4_MOD_LMAX : mod->BSIM4v4Lmax = value->rValue; mod->BSIM4v4LmaxGiven = TRUE; break; case BSIM4v4_MOD_WINT : mod->BSIM4v4Wint = value->rValue; mod->BSIM4v4WintGiven = TRUE; break; case BSIM4v4_MOD_WL : mod->BSIM4v4Wl = value->rValue; mod->BSIM4v4WlGiven = TRUE; break; case BSIM4v4_MOD_WLC : mod->BSIM4v4Wlc = value->rValue; mod->BSIM4v4WlcGiven = TRUE; break; case BSIM4v4_MOD_WLN : mod->BSIM4v4Wln = value->rValue; mod->BSIM4v4WlnGiven = TRUE; break; case BSIM4v4_MOD_WW : mod->BSIM4v4Ww = value->rValue; mod->BSIM4v4WwGiven = TRUE; break; case BSIM4v4_MOD_WWC : mod->BSIM4v4Wwc = value->rValue; mod->BSIM4v4WwcGiven = TRUE; break; case BSIM4v4_MOD_WWN : mod->BSIM4v4Wwn = value->rValue; mod->BSIM4v4WwnGiven = TRUE; break; case BSIM4v4_MOD_WWL : mod->BSIM4v4Wwl = value->rValue; mod->BSIM4v4WwlGiven = TRUE; break; case BSIM4v4_MOD_WWLC : mod->BSIM4v4Wwlc = value->rValue; mod->BSIM4v4WwlcGiven = TRUE; break; case BSIM4v4_MOD_WMIN : mod->BSIM4v4Wmin = value->rValue; mod->BSIM4v4WminGiven = TRUE; break; case BSIM4v4_MOD_WMAX : mod->BSIM4v4Wmax = value->rValue; mod->BSIM4v4WmaxGiven = TRUE; break; case BSIM4v4_MOD_NOIA : mod->BSIM4v4oxideTrapDensityA = value->rValue; mod->BSIM4v4oxideTrapDensityAGiven = TRUE; break; case BSIM4v4_MOD_NOIB : mod->BSIM4v4oxideTrapDensityB = value->rValue; mod->BSIM4v4oxideTrapDensityBGiven = TRUE; break; case BSIM4v4_MOD_NOIC : mod->BSIM4v4oxideTrapDensityC = value->rValue; mod->BSIM4v4oxideTrapDensityCGiven = TRUE; break; case BSIM4v4_MOD_EM : mod->BSIM4v4em = value->rValue; mod->BSIM4v4emGiven = TRUE; break; case BSIM4v4_MOD_EF : mod->BSIM4v4ef = value->rValue; mod->BSIM4v4efGiven = TRUE; break; case BSIM4v4_MOD_AF : mod->BSIM4v4af = value->rValue; mod->BSIM4v4afGiven = TRUE; break; case BSIM4v4_MOD_KF : mod->BSIM4v4kf = value->rValue; mod->BSIM4v4kfGiven = TRUE; break; case BSIM4v4_MOD_NMOS : if(value->iValue) { mod->BSIM4v4type = 1; mod->BSIM4v4typeGiven = TRUE; } break; case BSIM4v4_MOD_PMOS : if(value->iValue) { mod->BSIM4v4type = - 1; mod->BSIM4v4typeGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4getic.c0000644000265600020320000000265512264261473021473 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4getic.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4getic( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; for (; model ; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if (!here->BSIM4v4icVDSGiven) { here->BSIM4v4icVDS = *(ckt->CKTrhs + here->BSIM4v4dNode) - *(ckt->CKTrhs + here->BSIM4v4sNode); } if (!here->BSIM4v4icVGSGiven) { here->BSIM4v4icVGS = *(ckt->CKTrhs + here->BSIM4v4gNodeExt) - *(ckt->CKTrhs + here->BSIM4v4sNode); } if(!here->BSIM4v4icVBSGiven) { here->BSIM4v4icVBS = *(ckt->CKTrhs + here->BSIM4v4bNode) - *(ckt->CKTrhs + here->BSIM4v4sNode); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4.c0000644000265600020320000016254212264261473020461 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "bsim4v4def.h" #include "ngspice/suffix.h" IFparm BSIM4v4pTable[] = { /* parameters */ IOP( "l", BSIM4v4_L, IF_REAL , "Length"), IOP( "w", BSIM4v4_W, IF_REAL , "Width"), IOP( "m", BSIM4v4_M, IF_REAL , "Separate Parallel multiplier"), IOP( "nf", BSIM4v4_NF, IF_REAL , "Number of fingers"), IOP( "sa", BSIM4v4_SA, IF_REAL , "distance between OD edge to poly of one side "), IOP( "sb", BSIM4v4_SB, IF_REAL , "distance between OD edge to poly of the other side"), IOP( "sd", BSIM4v4_SD, IF_REAL , "distance between neighbour fingers"), IOP( "min", BSIM4v4_MIN, IF_INTEGER , "Minimize either D or S"), IOP( "ad", BSIM4v4_AD, IF_REAL , "Drain area"), IOP( "as", BSIM4v4_AS, IF_REAL , "Source area"), IOP( "pd", BSIM4v4_PD, IF_REAL , "Drain perimeter"), IOP( "ps", BSIM4v4_PS, IF_REAL , "Source perimeter"), IOP( "nrd", BSIM4v4_NRD, IF_REAL , "Number of squares in drain"), IOP( "nrs", BSIM4v4_NRS, IF_REAL , "Number of squares in source"), IOP( "off", BSIM4v4_OFF, IF_FLAG , "Device is initially off"), IOP( "rbdb", BSIM4v4_RBDB, IF_REAL , "Body resistance"), IOP( "rbsb", BSIM4v4_RBSB, IF_REAL , "Body resistance"), IOP( "rbpb", BSIM4v4_RBPB, IF_REAL , "Body resistance"), IOP( "rbps", BSIM4v4_RBPS, IF_REAL , "Body resistance"), IOP( "rbpd", BSIM4v4_RBPD, IF_REAL , "Body resistance"), IOP( "trnqsmod", BSIM4v4_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v4_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "rbodymod", BSIM4v4_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v4_RGATEMOD, IF_INTEGER, "Gate resistance model selector"), IOP( "geomod", BSIM4v4_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "rgeomod", BSIM4v4_RGEOMOD, IF_INTEGER, "S/D resistance and contact model selector"), IP( "ic", BSIM4v4_IC, IF_REALVEC , "Vector of DS,GS,BS initial voltages"), OP( "gmbs", BSIM4v4_GMBS, IF_REAL, "Gmb"), OP( "gm", BSIM4v4_GM, IF_REAL, "Gm"), OP( "gds", BSIM4v4_GDS, IF_REAL, "Gds"), OP( "vdsat", BSIM4v4_VDSAT, IF_REAL, "Vdsat"), OP( "vth", BSIM4v4_VON, IF_REAL, "Vth"), OP( "id", BSIM4v4_CD, IF_REAL, "Ids"), OP( "ibd", BSIM4v4_CBD, IF_REAL, "Ibd"), OP( "ibs", BSIM4v4_CBS, IF_REAL, "Ibs"), OP( "gbd", BSIM4v4_GBD, IF_REAL, "gbd"), OP( "gbs", BSIM4v4_GBS, IF_REAL, "gbs"), OP( "isub", BSIM4v4_CSUB, IF_REAL, "Isub"), OP( "igidl", BSIM4v4_IGIDL, IF_REAL, "Igidl"), OP( "igisl", BSIM4v4_IGISL, IF_REAL, "Igisl"), OP( "igs", BSIM4v4_IGS, IF_REAL, "Igs"), OP( "igd", BSIM4v4_IGD, IF_REAL, "Igd"), OP( "igb", BSIM4v4_IGB, IF_REAL, "Igb"), OP( "igcs", BSIM4v4_IGCS, IF_REAL, "Igcs"), OP( "igcd", BSIM4v4_IGCD, IF_REAL, "Igcd"), OP( "vbs", BSIM4v4_VBS, IF_REAL, "Vbs"), OP( "vgs", BSIM4v4_VGS, IF_REAL, "Vgs"), OP( "vds", BSIM4v4_VDS, IF_REAL, "Vds"), OP( "cgg", BSIM4v4_CGGB, IF_REAL, "Cggb"), OP( "cgs", BSIM4v4_CGSB, IF_REAL, "Cgsb"), OP( "cgd", BSIM4v4_CGDB, IF_REAL, "Cgdb"), OP( "cbg", BSIM4v4_CBGB, IF_REAL, "Cbgb"), OP( "cbd", BSIM4v4_CBDB, IF_REAL, "Cbdb"), OP( "cbs", BSIM4v4_CBSB, IF_REAL, "Cbsb"), OP( "cdg", BSIM4v4_CDGB, IF_REAL, "Cdgb"), OP( "cdd", BSIM4v4_CDDB, IF_REAL, "Cddb"), OP( "cds", BSIM4v4_CDSB, IF_REAL, "Cdsb"), OP( "csg", BSIM4v4_CSGB, IF_REAL, "Csgb"), OP( "csd", BSIM4v4_CSDB, IF_REAL, "Csdb"), OP( "css", BSIM4v4_CSSB, IF_REAL, "Cssb"), OP( "cgb", BSIM4v4_CGBB, IF_REAL, "Cgbb"), OP( "cdb", BSIM4v4_CDBB, IF_REAL, "Cdbb"), OP( "csb", BSIM4v4_CSBB, IF_REAL, "Csbb"), OP( "cbb", BSIM4v4_CBBB, IF_REAL, "Cbbb"), OP( "capbd", BSIM4v4_CAPBD, IF_REAL, "Capbd"), OP( "capbs", BSIM4v4_CAPBS, IF_REAL, "Capbs"), OP( "qg", BSIM4v4_QG, IF_REAL, "Qgate"), OP( "qb", BSIM4v4_QB, IF_REAL, "Qbulk"), OP( "qd", BSIM4v4_QD, IF_REAL, "Qdrain"), OP( "qs", BSIM4v4_QS, IF_REAL, "Qsource"), OP( "qinv", BSIM4v4_QINV, IF_REAL, "Qinversion"), }; IFparm BSIM4v4mPTable[] = { /* model parameters */ IOP( "capmod", BSIM4v4_MOD_CAPMOD, IF_INTEGER, "Capacitance model selector"), IOP( "diomod", BSIM4v4_MOD_DIOMOD, IF_INTEGER, "Diode IV model selector"), IOP( "rdsmod", BSIM4v4_MOD_RDSMOD, IF_INTEGER, "Bias-dependent S/D resistance model selector"), IOP( "trnqsmod", BSIM4v4_MOD_TRNQSMOD, IF_INTEGER, "Transient NQS model selector"), IOP( "acnqsmod", BSIM4v4_MOD_ACNQSMOD, IF_INTEGER, "AC NQS model selector"), IOP( "mobmod", BSIM4v4_MOD_MOBMOD, IF_INTEGER, "Mobility model selector"), IOP( "rbodymod", BSIM4v4_MOD_RBODYMOD, IF_INTEGER, "Distributed body R model selector"), IOP( "rgatemod", BSIM4v4_MOD_RGATEMOD, IF_INTEGER, "Gate R model selector"), IOP( "permod", BSIM4v4_MOD_PERMOD, IF_INTEGER, "Pd and Ps model selector"), IOP( "geomod", BSIM4v4_MOD_GEOMOD, IF_INTEGER, "Geometry dependent parasitics model selector"), IOP( "fnoimod", BSIM4v4_MOD_FNOIMOD, IF_INTEGER, "Flicker noise model selector"), IOP( "tnoimod", BSIM4v4_MOD_TNOIMOD, IF_INTEGER, "Thermal noise model selector"), IOP( "igcmod", BSIM4v4_MOD_IGCMOD, IF_INTEGER, "Gate-to-channel Ig model selector"), IOP( "igbmod", BSIM4v4_MOD_IGBMOD, IF_INTEGER, "Gate-to-body Ig model selector"), IOP( "tempmod", BSIM4v4_MOD_TEMPMOD, IF_INTEGER, "Temperature model selector"), IOP( "paramchk", BSIM4v4_MOD_PARAMCHK, IF_INTEGER, "Model parameter checking selector"), IOP( "binunit", BSIM4v4_MOD_BINUNIT, IF_INTEGER, "Bin unit selector"), IOP( "version", BSIM4v4_MOD_VERSION, IF_STRING, "parameter for model version"), IOP( "toxe", BSIM4v4_MOD_TOXE, IF_REAL, "Electrical gate oxide thickness in meters"), IOP( "toxp", BSIM4v4_MOD_TOXP, IF_REAL, "Physical gate oxide thickness in meters"), IOP( "toxm", BSIM4v4_MOD_TOXM, IF_REAL, "Gate oxide thickness at which parameters are extracted"), IOP( "toxref", BSIM4v4_MOD_TOXREF, IF_REAL, "Target tox value"), IOP( "dtox", BSIM4v4_MOD_DTOX, IF_REAL, "Defined as (toxe - toxp) "), IOP( "epsrox", BSIM4v4_MOD_EPSROX, IF_REAL, "Dielectric constant of the gate oxide relative to vacuum"), IOP( "cdsc", BSIM4v4_MOD_CDSC, IF_REAL, "Drain/Source and channel coupling capacitance"), IOP( "cdscb", BSIM4v4_MOD_CDSCB, IF_REAL, "Body-bias dependence of cdsc"), IOP( "cdscd", BSIM4v4_MOD_CDSCD, IF_REAL, "Drain-bias dependence of cdsc"), IOP( "cit", BSIM4v4_MOD_CIT, IF_REAL, "Interface state capacitance"), IOP( "nfactor", BSIM4v4_MOD_NFACTOR, IF_REAL, "Subthreshold swing Coefficient"), IOP( "xj", BSIM4v4_MOD_XJ, IF_REAL, "Junction depth in meters"), IOP( "vsat", BSIM4v4_MOD_VSAT, IF_REAL, "Saturation velocity at tnom"), IOP( "at", BSIM4v4_MOD_AT, IF_REAL, "Temperature coefficient of vsat"), IOP( "a0", BSIM4v4_MOD_A0, IF_REAL, "Non-uniform depletion width effect coefficient."), IOP( "ags", BSIM4v4_MOD_AGS, IF_REAL, "Gate bias coefficient of Abulk."), IOP( "a1", BSIM4v4_MOD_A1, IF_REAL, "Non-saturation effect coefficient"), IOP( "a2", BSIM4v4_MOD_A2, IF_REAL, "Non-saturation effect coefficient"), IOP( "keta", BSIM4v4_MOD_KETA, IF_REAL, "Body-bias coefficient of non-uniform depletion width effect."), IOP( "nsub", BSIM4v4_MOD_NSUB, IF_REAL, "Substrate doping concentration"), IOP( "ndep", BSIM4v4_MOD_NDEP, IF_REAL, "Channel doping concentration at the depletion edge"), IOP( "nsd", BSIM4v4_MOD_NSD, IF_REAL, "S/D doping concentration"), IOP( "phin", BSIM4v4_MOD_PHIN, IF_REAL, "Adjusting parameter for surface potential due to non-uniform vertical doping"), IOP( "ngate", BSIM4v4_MOD_NGATE, IF_REAL, "Poly-gate doping concentration"), IOP( "gamma1", BSIM4v4_MOD_GAMMA1, IF_REAL, "Vth body coefficient"), IOP( "gamma2", BSIM4v4_MOD_GAMMA2, IF_REAL, "Vth body coefficient"), IOP( "vbx", BSIM4v4_MOD_VBX, IF_REAL, "Vth transition body Voltage"), IOP( "vbm", BSIM4v4_MOD_VBM, IF_REAL, "Maximum body voltage"), IOP( "xt", BSIM4v4_MOD_XT, IF_REAL, "Doping depth"), IOP( "k1", BSIM4v4_MOD_K1, IF_REAL, "Bulk effect coefficient 1"), IOP( "kt1", BSIM4v4_MOD_KT1, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt1l", BSIM4v4_MOD_KT1L, IF_REAL, "Temperature coefficient of Vth"), IOP( "kt2", BSIM4v4_MOD_KT2, IF_REAL, "Body-coefficient of kt1"), IOP( "k2", BSIM4v4_MOD_K2, IF_REAL, "Bulk effect coefficient 2"), IOP( "k3", BSIM4v4_MOD_K3, IF_REAL, "Narrow width effect coefficient"), IOP( "k3b", BSIM4v4_MOD_K3B, IF_REAL, "Body effect coefficient of k3"), IOP( "w0", BSIM4v4_MOD_W0, IF_REAL, "Narrow width effect parameter"), IOP( "dvtp0", BSIM4v4_MOD_DVTP0, IF_REAL, "First parameter for Vth shift due to pocket"), IOP( "dvtp1", BSIM4v4_MOD_DVTP1, IF_REAL, "Second parameter for Vth shift due to pocket"), IOP( "lpe0", BSIM4v4_MOD_LPE0, IF_REAL, "Equivalent length of pocket region at zero bias"), IOP( "lpeb", BSIM4v4_MOD_LPEB, IF_REAL, "Equivalent length of pocket region accounting for body bias"), IOP( "dvt0", BSIM4v4_MOD_DVT0, IF_REAL, "Short channel effect coeff. 0"), IOP( "dvt1", BSIM4v4_MOD_DVT1, IF_REAL, "Short channel effect coeff. 1"), IOP( "dvt2", BSIM4v4_MOD_DVT2, IF_REAL, "Short channel effect coeff. 2"), IOP( "dvt0w", BSIM4v4_MOD_DVT0W, IF_REAL, "Narrow Width coeff. 0"), IOP( "dvt1w", BSIM4v4_MOD_DVT1W, IF_REAL, "Narrow Width effect coeff. 1"), IOP( "dvt2w", BSIM4v4_MOD_DVT2W, IF_REAL, "Narrow Width effect coeff. 2"), IOP( "drout", BSIM4v4_MOD_DROUT, IF_REAL, "DIBL coefficient of output resistance"), IOP( "dsub", BSIM4v4_MOD_DSUB, IF_REAL, "DIBL coefficient in the subthreshold region"), IOP( "vth0", BSIM4v4_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "vtho", BSIM4v4_MOD_VTH0, IF_REAL,"Threshold voltage"), IOP( "ua", BSIM4v4_MOD_UA, IF_REAL, "Linear gate dependence of mobility"), IOP( "ua1", BSIM4v4_MOD_UA1, IF_REAL, "Temperature coefficient of ua"), IOP( "ub", BSIM4v4_MOD_UB, IF_REAL, "Quadratic gate dependence of mobility"), IOP( "ub1", BSIM4v4_MOD_UB1, IF_REAL, "Temperature coefficient of ub"), IOP( "uc", BSIM4v4_MOD_UC, IF_REAL, "Body-bias dependence of mobility"), IOP( "uc1", BSIM4v4_MOD_UC1, IF_REAL, "Temperature coefficient of uc"), IOP( "u0", BSIM4v4_MOD_U0, IF_REAL, "Low-field mobility at Tnom"), IOP( "eu", BSIM4v4_MOD_EU, IF_REAL, "Mobility exponent"), IOP( "ute", BSIM4v4_MOD_UTE, IF_REAL, "Temperature coefficient of mobility"), IOP( "voff", BSIM4v4_MOD_VOFF, IF_REAL, "Threshold voltage offset"), IOP( "minv", BSIM4v4_MOD_MINV, IF_REAL, "Fitting parameter for moderate invversion in Vgsteff"), IOP( "voffl", BSIM4v4_MOD_VOFFL, IF_REAL, "Length dependence parameter for Vth offset"), IOP( "tnom", BSIM4v4_MOD_TNOM, IF_REAL, "Parameter measurement temperature"), IOP( "cgso", BSIM4v4_MOD_CGSO, IF_REAL, "Gate-source overlap capacitance per width"), IOP( "cgdo", BSIM4v4_MOD_CGDO, IF_REAL, "Gate-drain overlap capacitance per width"), IOP( "cgbo", BSIM4v4_MOD_CGBO, IF_REAL, "Gate-bulk overlap capacitance per length"), IOP( "xpart", BSIM4v4_MOD_XPART, IF_REAL, "Channel charge partitioning"), IOP( "delta", BSIM4v4_MOD_DELTA, IF_REAL, "Effective Vds parameter"), IOP( "rsh", BSIM4v4_MOD_RSH, IF_REAL, "Source-drain sheet resistance"), IOP( "rdsw", BSIM4v4_MOD_RDSW, IF_REAL, "Source-drain resistance per width"), IOP( "rdswmin", BSIM4v4_MOD_RDSWMIN, IF_REAL, "Source-drain resistance per width at high Vg"), IOP( "rsw", BSIM4v4_MOD_RSW, IF_REAL, "Source resistance per width"), IOP( "rdw", BSIM4v4_MOD_RDW, IF_REAL, "Drain resistance per width"), IOP( "rdwmin", BSIM4v4_MOD_RDWMIN, IF_REAL, "Drain resistance per width at high Vg"), IOP( "rswmin", BSIM4v4_MOD_RSWMIN, IF_REAL, "Source resistance per width at high Vg"), IOP( "prwg", BSIM4v4_MOD_PRWG, IF_REAL, "Gate-bias effect on parasitic resistance "), IOP( "prwb", BSIM4v4_MOD_PRWB, IF_REAL, "Body-effect on parasitic resistance "), IOP( "prt", BSIM4v4_MOD_PRT, IF_REAL, "Temperature coefficient of parasitic resistance "), IOP( "eta0", BSIM4v4_MOD_ETA0, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "etab", BSIM4v4_MOD_ETAB, IF_REAL, "Subthreshold region DIBL coefficient"), IOP( "pclm", BSIM4v4_MOD_PCLM, IF_REAL, "Channel length modulation Coefficient"), IOP( "pdiblc1", BSIM4v4_MOD_PDIBL1, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblc2", BSIM4v4_MOD_PDIBL2, IF_REAL, "Drain-induced barrier lowering coefficient"), IOP( "pdiblcb", BSIM4v4_MOD_PDIBLB, IF_REAL, "Body-effect on drain-induced barrier lowering"), IOP( "fprout", BSIM4v4_MOD_FPROUT, IF_REAL, "Rout degradation coefficient for pocket devices"), IOP( "pdits", BSIM4v4_MOD_PDITS, IF_REAL, "Coefficient for drain-induced Vth shifts"), IOP( "pditsl", BSIM4v4_MOD_PDITSL, IF_REAL, "Length dependence of drain-induced Vth shifts"), IOP( "pditsd", BSIM4v4_MOD_PDITSD, IF_REAL, "Vds dependence of drain-induced Vth shifts"), IOP( "pscbe1", BSIM4v4_MOD_PSCBE1, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pscbe2", BSIM4v4_MOD_PSCBE2, IF_REAL, "Substrate current body-effect coefficient"), IOP( "pvag", BSIM4v4_MOD_PVAG, IF_REAL, "Gate dependence of output resistance parameter"), IOP( "jss", BSIM4v4_MOD_JSS, IF_REAL, "Bottom source junction reverse saturation current density"), IOP( "jsws", BSIM4v4_MOD_JSWS, IF_REAL, "Isolation edge sidewall source junction reverse saturation current density"), IOP( "jswgs", BSIM4v4_MOD_JSWGS, IF_REAL, "Gate edge source junction reverse saturation current density"), IOP( "pbs", BSIM4v4_MOD_PBS, IF_REAL, "Source junction built-in potential"), IOP( "njs", BSIM4v4_MOD_NJS, IF_REAL, "Source junction emission coefficient"), IOP( "xtis", BSIM4v4_MOD_XTIS, IF_REAL, "Source junction current temperature exponent"), IOP( "mjs", BSIM4v4_MOD_MJS, IF_REAL, "Source bottom junction capacitance grading coefficient"), IOP( "pbsws", BSIM4v4_MOD_PBSWS, IF_REAL, "Source sidewall junction capacitance built in potential"), IOP( "mjsws", BSIM4v4_MOD_MJSWS, IF_REAL, "Source sidewall junction capacitance grading coefficient"), IOP( "pbswgs", BSIM4v4_MOD_PBSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgs", BSIM4v4_MOD_MJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjs", BSIM4v4_MOD_CJS, IF_REAL, "Source bottom junction capacitance per unit area"), IOP( "cjsws", BSIM4v4_MOD_CJSWS, IF_REAL, "Source sidewall junction capacitance per unit periphery"), IOP( "cjswgs", BSIM4v4_MOD_CJSWGS, IF_REAL, "Source (gate side) sidewall junction capacitance per unit width"), IOP( "jsd", BSIM4v4_MOD_JSD, IF_REAL, "Bottom drain junction reverse saturation current density"), IOP( "jswd", BSIM4v4_MOD_JSWD, IF_REAL, "Isolation edge sidewall drain junction reverse saturation current density"), IOP( "jswgd", BSIM4v4_MOD_JSWGD, IF_REAL, "Gate edge drain junction reverse saturation current density"), IOP( "pbd", BSIM4v4_MOD_PBD, IF_REAL, "Drain junction built-in potential"), IOP( "njd", BSIM4v4_MOD_NJD, IF_REAL, "Drain junction emission coefficient"), IOP( "xtid", BSIM4v4_MOD_XTID, IF_REAL, "Drainjunction current temperature exponent"), IOP( "mjd", BSIM4v4_MOD_MJD, IF_REAL, "Drain bottom junction capacitance grading coefficient"), IOP( "pbswd", BSIM4v4_MOD_PBSWD, IF_REAL, "Drain sidewall junction capacitance built in potential"), IOP( "mjswd", BSIM4v4_MOD_MJSWD, IF_REAL, "Drain sidewall junction capacitance grading coefficient"), IOP( "pbswgd", BSIM4v4_MOD_PBSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance built in potential"), IOP( "mjswgd", BSIM4v4_MOD_MJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance grading coefficient"), IOP( "cjd", BSIM4v4_MOD_CJD, IF_REAL, "Drain bottom junction capacitance per unit area"), IOP( "cjswd", BSIM4v4_MOD_CJSWD, IF_REAL, "Drain sidewall junction capacitance per unit periphery"), IOP( "cjswgd", BSIM4v4_MOD_CJSWGD, IF_REAL, "Drain (gate side) sidewall junction capacitance per unit width"), IOP( "vfbcv", BSIM4v4_MOD_VFBCV, IF_REAL, "Flat Band Voltage parameter for capmod=0 only"), IOP( "vfb", BSIM4v4_MOD_VFB, IF_REAL, "Flat Band Voltage"), IOP( "tpb", BSIM4v4_MOD_TPB, IF_REAL, "Temperature coefficient of pb"), IOP( "tcj", BSIM4v4_MOD_TCJ, IF_REAL, "Temperature coefficient of cj"), IOP( "tpbsw", BSIM4v4_MOD_TPBSW, IF_REAL, "Temperature coefficient of pbsw"), IOP( "tcjsw", BSIM4v4_MOD_TCJSW, IF_REAL, "Temperature coefficient of cjsw"), IOP( "tpbswg", BSIM4v4_MOD_TPBSWG, IF_REAL, "Temperature coefficient of pbswg"), IOP( "tcjswg", BSIM4v4_MOD_TCJSWG, IF_REAL, "Temperature coefficient of cjswg"), IOP( "acde", BSIM4v4_MOD_ACDE, IF_REAL, "Exponential coefficient for finite charge thickness"), IOP( "moin", BSIM4v4_MOD_MOIN, IF_REAL, "Coefficient for gate-bias dependent surface potential"), IOP( "noff", BSIM4v4_MOD_NOFF, IF_REAL, "C-V turn-on/off parameter"), IOP( "voffcv", BSIM4v4_MOD_VOFFCV, IF_REAL, "C-V lateral-shift parameter"), IOP( "dmcg", BSIM4v4_MOD_DMCG, IF_REAL, "Distance of Mid-Contact to Gate edge"), IOP( "dmci", BSIM4v4_MOD_DMCI, IF_REAL, "Distance of Mid-Contact to Isolation"), IOP( "dmdg", BSIM4v4_MOD_DMDG, IF_REAL, "Distance of Mid-Diffusion to Gate edge"), IOP( "dmcgt", BSIM4v4_MOD_DMCGT, IF_REAL, "Distance of Mid-Contact to Gate edge in Test structures"), IOP( "xgw", BSIM4v4_MOD_XGW, IF_REAL, "Distance from gate contact center to device edge"), IOP( "xgl", BSIM4v4_MOD_XGL, IF_REAL, "Variation in Ldrawn"), IOP( "rshg", BSIM4v4_MOD_RSHG, IF_REAL, "Gate sheet resistance"), IOP( "ngcon", BSIM4v4_MOD_NGCON, IF_REAL, "Number of gate contacts"), IOP( "xrcrg1", BSIM4v4_MOD_XRCRG1, IF_REAL, "First fitting parameter the bias-dependent Rg"), IOP( "xrcrg2", BSIM4v4_MOD_XRCRG2, IF_REAL, "Second fitting parameter the bias-dependent Rg"), IOP( "lambda", BSIM4v4_MOD_LAMBDA, IF_REAL, " Velocity overshoot parameter"), IOP( "vtl", BSIM4v4_MOD_VTL, IF_REAL, " thermal velocity"), IOP( "lc", BSIM4v4_MOD_LC, IF_REAL, " back scattering parameter"), IOP( "xn", BSIM4v4_MOD_XN, IF_REAL, " back scattering parameter"), IOP( "vfbsdoff", BSIM4v4_MOD_VFBSDOFF, IF_REAL, "S/D flatband voltage offset"), IOP( "lintnoi", BSIM4v4_MOD_LINTNOI, IF_REAL, "lint offset for noise calculation"), IOP( "lint", BSIM4v4_MOD_LINT, IF_REAL, "Length reduction parameter"), IOP( "ll", BSIM4v4_MOD_LL, IF_REAL, "Length reduction parameter"), IOP( "llc", BSIM4v4_MOD_LLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lln", BSIM4v4_MOD_LLN, IF_REAL, "Length reduction parameter"), IOP( "lw", BSIM4v4_MOD_LW, IF_REAL, "Length reduction parameter"), IOP( "lwc", BSIM4v4_MOD_LWC, IF_REAL, "Length reduction parameter for CV"), IOP( "lwn", BSIM4v4_MOD_LWN, IF_REAL, "Length reduction parameter"), IOP( "lwl", BSIM4v4_MOD_LWL, IF_REAL, "Length reduction parameter"), IOP( "lwlc", BSIM4v4_MOD_LWLC, IF_REAL, "Length reduction parameter for CV"), IOP( "lmin", BSIM4v4_MOD_LMIN, IF_REAL, "Minimum length for the model"), IOP( "lmax", BSIM4v4_MOD_LMAX, IF_REAL, "Maximum length for the model"), IOP( "wr", BSIM4v4_MOD_WR, IF_REAL, "Width dependence of rds"), IOP( "wint", BSIM4v4_MOD_WINT, IF_REAL, "Width reduction parameter"), IOP( "dwg", BSIM4v4_MOD_DWG, IF_REAL, "Width reduction parameter"), IOP( "dwb", BSIM4v4_MOD_DWB, IF_REAL, "Width reduction parameter"), IOP( "wl", BSIM4v4_MOD_WL, IF_REAL, "Width reduction parameter"), IOP( "wlc", BSIM4v4_MOD_WLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wln", BSIM4v4_MOD_WLN, IF_REAL, "Width reduction parameter"), IOP( "ww", BSIM4v4_MOD_WW, IF_REAL, "Width reduction parameter"), IOP( "wwc", BSIM4v4_MOD_WWC, IF_REAL, "Width reduction parameter for CV"), IOP( "wwn", BSIM4v4_MOD_WWN, IF_REAL, "Width reduction parameter"), IOP( "wwl", BSIM4v4_MOD_WWL, IF_REAL, "Width reduction parameter"), IOP( "wwlc", BSIM4v4_MOD_WWLC, IF_REAL, "Width reduction parameter for CV"), IOP( "wmin", BSIM4v4_MOD_WMIN, IF_REAL, "Minimum width for the model"), IOP( "wmax", BSIM4v4_MOD_WMAX, IF_REAL, "Maximum width for the model"), IOP( "b0", BSIM4v4_MOD_B0, IF_REAL, "Abulk narrow width parameter"), IOP( "b1", BSIM4v4_MOD_B1, IF_REAL, "Abulk narrow width parameter"), IOP( "cgsl", BSIM4v4_MOD_CGSL, IF_REAL, "New C-V model parameter"), IOP( "cgdl", BSIM4v4_MOD_CGDL, IF_REAL, "New C-V model parameter"), IOP( "ckappas", BSIM4v4_MOD_CKAPPAS, IF_REAL, "S/G overlap C-V parameter "), IOP( "ckappad", BSIM4v4_MOD_CKAPPAD, IF_REAL, "D/G overlap C-V parameter"), IOP( "cf", BSIM4v4_MOD_CF, IF_REAL, "Fringe capacitance parameter"), IOP( "clc", BSIM4v4_MOD_CLC, IF_REAL, "Vdsat parameter for C-V model"), IOP( "cle", BSIM4v4_MOD_CLE, IF_REAL, "Vdsat parameter for C-V model"), IOP( "dwc", BSIM4v4_MOD_DWC, IF_REAL, "Delta W for C-V model"), IOP( "dlc", BSIM4v4_MOD_DLC, IF_REAL, "Delta L for C-V model"), IOP( "xw", BSIM4v4_MOD_XW, IF_REAL, "W offset for channel width due to mask/etch effect"), IOP( "xl", BSIM4v4_MOD_XL, IF_REAL, "L offset for channel length due to mask/etch effect"), IOP( "dlcig", BSIM4v4_MOD_DLCIG, IF_REAL, "Delta L for Ig model"), IOP( "dwj", BSIM4v4_MOD_DWJ, IF_REAL, "Delta W for S/D junctions"), IOP( "alpha0", BSIM4v4_MOD_ALPHA0, IF_REAL, "substrate current model parameter"), IOP( "alpha1", BSIM4v4_MOD_ALPHA1, IF_REAL, "substrate current model parameter"), IOP( "beta0", BSIM4v4_MOD_BETA0, IF_REAL, "substrate current model parameter"), IOP( "agidl", BSIM4v4_MOD_AGIDL, IF_REAL, "Pre-exponential constant for GIDL"), IOP( "bgidl", BSIM4v4_MOD_BGIDL, IF_REAL, "Exponential constant for GIDL"), IOP( "cgidl", BSIM4v4_MOD_CGIDL, IF_REAL, "Parameter for body-bias dependence of GIDL"), IOP( "egidl", BSIM4v4_MOD_EGIDL, IF_REAL, "Fitting parameter for Bandbending"), IOP( "aigc", BSIM4v4_MOD_AIGC, IF_REAL, "Parameter for Igc"), IOP( "bigc", BSIM4v4_MOD_BIGC, IF_REAL, "Parameter for Igc"), IOP( "cigc", BSIM4v4_MOD_CIGC, IF_REAL, "Parameter for Igc"), IOP( "aigsd", BSIM4v4_MOD_AIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "bigsd", BSIM4v4_MOD_BIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "cigsd", BSIM4v4_MOD_CIGSD, IF_REAL, "Parameter for Igs,d"), IOP( "aigbacc", BSIM4v4_MOD_AIGBACC, IF_REAL, "Parameter for Igb"), IOP( "bigbacc", BSIM4v4_MOD_BIGBACC, IF_REAL, "Parameter for Igb"), IOP( "cigbacc", BSIM4v4_MOD_CIGBACC, IF_REAL, "Parameter for Igb"), IOP( "aigbinv", BSIM4v4_MOD_AIGBINV, IF_REAL, "Parameter for Igb"), IOP( "bigbinv", BSIM4v4_MOD_BIGBINV, IF_REAL, "Parameter for Igb"), IOP( "cigbinv", BSIM4v4_MOD_CIGBINV, IF_REAL, "Parameter for Igb"), IOP( "nigc", BSIM4v4_MOD_NIGC, IF_REAL, "Parameter for Igc slope"), IOP( "nigbinv", BSIM4v4_MOD_NIGBINV, IF_REAL, "Parameter for Igbinv slope"), IOP( "nigbacc", BSIM4v4_MOD_NIGBACC, IF_REAL, "Parameter for Igbacc slope"), IOP( "ntox", BSIM4v4_MOD_NTOX, IF_REAL, "Exponent for Tox ratio"), IOP( "eigbinv", BSIM4v4_MOD_EIGBINV, IF_REAL, "Parameter for the Si bandgap for Igbinv"), IOP( "pigcd", BSIM4v4_MOD_PIGCD, IF_REAL, "Parameter for Igc partition"), IOP( "poxedge", BSIM4v4_MOD_POXEDGE, IF_REAL, "Factor for the gate edge Tox"), IOP( "ijthdfwd", BSIM4v4_MOD_IJTHDFWD, IF_REAL, "Forward drain diode forward limiting current"), IOP( "ijthsfwd", BSIM4v4_MOD_IJTHSFWD, IF_REAL, "Forward source diode forward limiting current"), IOP( "ijthdrev", BSIM4v4_MOD_IJTHDREV, IF_REAL, "Reverse drain diode forward limiting current"), IOP( "ijthsrev", BSIM4v4_MOD_IJTHSREV, IF_REAL, "Reverse source diode forward limiting current"), IOP( "xjbvd", BSIM4v4_MOD_XJBVD, IF_REAL, "Fitting parameter for drain diode breakdown current"), IOP( "xjbvs", BSIM4v4_MOD_XJBVS, IF_REAL, "Fitting parameter for source diode breakdown current"), IOP( "bvd", BSIM4v4_MOD_BVD, IF_REAL, "Drain diode breakdown voltage"), IOP( "bvs", BSIM4v4_MOD_BVS, IF_REAL, "Source diode breakdown voltage"), IOP( "jtss", BSIM4v4_MOD_JTSS, IF_REAL, "Source bottom trap-assisted saturation current density"), IOP( "jtsd", BSIM4v4_MOD_JTSD, IF_REAL, "Drain bottom trap-assisted saturation current density"), IOP( "jtssws", BSIM4v4_MOD_JTSSWS, IF_REAL, "Source STI sidewall trap-assisted saturation current density"), IOP( "jtsswd", BSIM4v4_MOD_JTSSWD, IF_REAL, "Drain STI sidewall trap-assisted saturation current density"), IOP( "jtsswgs", BSIM4v4_MOD_JTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted saturation current density"), IOP( "jtsswgd", BSIM4v4_MOD_JTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted saturation current density"), IOP( "njts", BSIM4v4_MOD_NJTS, IF_REAL, "Non-ideality factor for bottom junction"), IOP( "njtssw", BSIM4v4_MOD_NJTSSW, IF_REAL, "Non-ideality factor for STI sidewall junction"), IOP( "njtsswg", BSIM4v4_MOD_NJTSSWG, IF_REAL, "Non-ideality factor for gate-edge sidewall junction"), IOP( "xtss", BSIM4v4_MOD_XTSS, IF_REAL, "Power dependence of JTSS on temperature"), IOP( "xtsd", BSIM4v4_MOD_XTSD, IF_REAL, "Power dependence of JTSD on temperature"), IOP( "xtssws", BSIM4v4_MOD_XTSSWS, IF_REAL, "Power dependence of JTSSWS on temperature"), IOP( "xtsswd", BSIM4v4_MOD_XTSSWD, IF_REAL, "Power dependence of JTSSWD on temperature"), IOP( "xtsswgs", BSIM4v4_MOD_XTSSWGS, IF_REAL, "Power dependence of JTSSWGS on temperature"), IOP( "xtsswgd", BSIM4v4_MOD_XTSSWGD, IF_REAL, "Power dependence of JTSSWGD on temperature"), IOP( "tnjts", BSIM4v4_MOD_TNJTS, IF_REAL, "Temperature coefficient for NJTS"), IOP( "tnjtssw", BSIM4v4_MOD_TNJTSSW, IF_REAL, "Temperature coefficient for NJTSSW"), IOP( "tnjtsswg", BSIM4v4_MOD_TNJTSSWG, IF_REAL, "Temperature coefficient for NJTSSWG"), IOP( "vtss", BSIM4v4_MOD_VTSS, IF_REAL, "Source bottom trap-assisted voltage dependent parameter"), IOP( "vtsd", BSIM4v4_MOD_VTSD, IF_REAL, "Drain bottom trap-assisted voltage dependent parameter"), IOP( "vtssws", BSIM4v4_MOD_VTSSWS, IF_REAL, "Source STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswd", BSIM4v4_MOD_VTSSWD, IF_REAL, "Drain STI sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgs", BSIM4v4_MOD_VTSSWGS, IF_REAL, "Source gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "vtsswgd", BSIM4v4_MOD_VTSSWGD, IF_REAL, "Drain gate-edge sidewall trap-assisted voltage dependent parameter"), IOP( "gbmin", BSIM4v4_MOD_GBMIN, IF_REAL, "Minimum body conductance"), IOP( "rbdb", BSIM4v4_MOD_RBDB, IF_REAL, "Resistance between bNode and dbNode"), IOP( "rbpb", BSIM4v4_MOD_RBPB, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "rbsb", BSIM4v4_MOD_RBSB, IF_REAL, "Resistance between bNode and sbNode"), IOP( "rbps", BSIM4v4_MOD_RBPS, IF_REAL, "Resistance between bNodePrime and sbNode"), IOP( "rbpd", BSIM4v4_MOD_RBPD, IF_REAL, "Resistance between bNodePrime and bNode"), IOP( "lcdsc", BSIM4v4_MOD_LCDSC, IF_REAL, "Length dependence of cdsc"), IOP( "lcdscb", BSIM4v4_MOD_LCDSCB, IF_REAL, "Length dependence of cdscb"), IOP( "lcdscd", BSIM4v4_MOD_LCDSCD, IF_REAL, "Length dependence of cdscd"), IOP( "lcit", BSIM4v4_MOD_LCIT, IF_REAL, "Length dependence of cit"), IOP( "lnfactor", BSIM4v4_MOD_LNFACTOR, IF_REAL, "Length dependence of nfactor"), IOP( "lxj", BSIM4v4_MOD_LXJ, IF_REAL, "Length dependence of xj"), IOP( "lvsat", BSIM4v4_MOD_LVSAT, IF_REAL, "Length dependence of vsat"), IOP( "lat", BSIM4v4_MOD_LAT, IF_REAL, "Length dependence of at"), IOP( "la0", BSIM4v4_MOD_LA0, IF_REAL, "Length dependence of a0"), IOP( "lags", BSIM4v4_MOD_LAGS, IF_REAL, "Length dependence of ags"), IOP( "la1", BSIM4v4_MOD_LA1, IF_REAL, "Length dependence of a1"), IOP( "la2", BSIM4v4_MOD_LA2, IF_REAL, "Length dependence of a2"), IOP( "lketa", BSIM4v4_MOD_LKETA, IF_REAL, "Length dependence of keta"), IOP( "lnsub", BSIM4v4_MOD_LNSUB, IF_REAL, "Length dependence of nsub"), IOP( "lndep", BSIM4v4_MOD_LNDEP, IF_REAL, "Length dependence of ndep"), IOP( "lnsd", BSIM4v4_MOD_LNSD, IF_REAL, "Length dependence of nsd"), IOP( "lphin", BSIM4v4_MOD_LPHIN, IF_REAL, "Length dependence of phin"), IOP( "lngate", BSIM4v4_MOD_LNGATE, IF_REAL, "Length dependence of ngate"), IOP( "lgamma1", BSIM4v4_MOD_LGAMMA1, IF_REAL, "Length dependence of gamma1"), IOP( "lgamma2", BSIM4v4_MOD_LGAMMA2, IF_REAL, "Length dependence of gamma2"), IOP( "lvbx", BSIM4v4_MOD_LVBX, IF_REAL, "Length dependence of vbx"), IOP( "lvbm", BSIM4v4_MOD_LVBM, IF_REAL, "Length dependence of vbm"), IOP( "lxt", BSIM4v4_MOD_LXT, IF_REAL, "Length dependence of xt"), IOP( "lk1", BSIM4v4_MOD_LK1, IF_REAL, "Length dependence of k1"), IOP( "lkt1", BSIM4v4_MOD_LKT1, IF_REAL, "Length dependence of kt1"), IOP( "lkt1l", BSIM4v4_MOD_LKT1L, IF_REAL, "Length dependence of kt1l"), IOP( "lkt2", BSIM4v4_MOD_LKT2, IF_REAL, "Length dependence of kt2"), IOP( "lk2", BSIM4v4_MOD_LK2, IF_REAL, "Length dependence of k2"), IOP( "lk3", BSIM4v4_MOD_LK3, IF_REAL, "Length dependence of k3"), IOP( "lk3b", BSIM4v4_MOD_LK3B, IF_REAL, "Length dependence of k3b"), IOP( "lw0", BSIM4v4_MOD_LW0, IF_REAL, "Length dependence of w0"), IOP( "ldvtp0", BSIM4v4_MOD_LDVTP0, IF_REAL, "Length dependence of dvtp0"), IOP( "ldvtp1", BSIM4v4_MOD_LDVTP1, IF_REAL, "Length dependence of dvtp1"), IOP( "llpe0", BSIM4v4_MOD_LLPE0, IF_REAL, "Length dependence of lpe0"), IOP( "llpeb", BSIM4v4_MOD_LLPEB, IF_REAL, "Length dependence of lpeb"), IOP( "ldvt0", BSIM4v4_MOD_LDVT0, IF_REAL, "Length dependence of dvt0"), IOP( "ldvt1", BSIM4v4_MOD_LDVT1, IF_REAL, "Length dependence of dvt1"), IOP( "ldvt2", BSIM4v4_MOD_LDVT2, IF_REAL, "Length dependence of dvt2"), IOP( "ldvt0w", BSIM4v4_MOD_LDVT0W, IF_REAL, "Length dependence of dvt0w"), IOP( "ldvt1w", BSIM4v4_MOD_LDVT1W, IF_REAL, "Length dependence of dvt1w"), IOP( "ldvt2w", BSIM4v4_MOD_LDVT2W, IF_REAL, "Length dependence of dvt2w"), IOP( "ldrout", BSIM4v4_MOD_LDROUT, IF_REAL, "Length dependence of drout"), IOP( "ldsub", BSIM4v4_MOD_LDSUB, IF_REAL, "Length dependence of dsub"), IOP( "lvth0", BSIM4v4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lvtho", BSIM4v4_MOD_LVTH0, IF_REAL,"Length dependence of vto"), IOP( "lua", BSIM4v4_MOD_LUA, IF_REAL, "Length dependence of ua"), IOP( "lua1", BSIM4v4_MOD_LUA1, IF_REAL, "Length dependence of ua1"), IOP( "lub", BSIM4v4_MOD_LUB, IF_REAL, "Length dependence of ub"), IOP( "lub1", BSIM4v4_MOD_LUB1, IF_REAL, "Length dependence of ub1"), IOP( "luc", BSIM4v4_MOD_LUC, IF_REAL, "Length dependence of uc"), IOP( "luc1", BSIM4v4_MOD_LUC1, IF_REAL, "Length dependence of uc1"), IOP( "lu0", BSIM4v4_MOD_LU0, IF_REAL, "Length dependence of u0"), IOP( "lute", BSIM4v4_MOD_LUTE, IF_REAL, "Length dependence of ute"), IOP( "lvoff", BSIM4v4_MOD_LVOFF, IF_REAL, "Length dependence of voff"), IOP( "lminv", BSIM4v4_MOD_LMINV, IF_REAL, "Length dependence of minv"), IOP( "ldelta", BSIM4v4_MOD_LDELTA, IF_REAL, "Length dependence of delta"), IOP( "lrdsw", BSIM4v4_MOD_LRDSW, IF_REAL, "Length dependence of rdsw "), IOP( "lrsw", BSIM4v4_MOD_LRSW, IF_REAL, "Length dependence of rsw"), IOP( "lrdw", BSIM4v4_MOD_LRDW, IF_REAL, "Length dependence of rdw"), IOP( "lprwg", BSIM4v4_MOD_LPRWG, IF_REAL, "Length dependence of prwg "), IOP( "lprwb", BSIM4v4_MOD_LPRWB, IF_REAL, "Length dependence of prwb "), IOP( "lprt", BSIM4v4_MOD_LPRT, IF_REAL, "Length dependence of prt "), IOP( "leta0", BSIM4v4_MOD_LETA0, IF_REAL, "Length dependence of eta0"), IOP( "letab", BSIM4v4_MOD_LETAB, IF_REAL, "Length dependence of etab"), IOP( "lpclm", BSIM4v4_MOD_LPCLM, IF_REAL, "Length dependence of pclm"), IOP( "lpdiblc1", BSIM4v4_MOD_LPDIBL1, IF_REAL, "Length dependence of pdiblc1"), IOP( "lpdiblc2", BSIM4v4_MOD_LPDIBL2, IF_REAL, "Length dependence of pdiblc2"), IOP( "lpdiblcb", BSIM4v4_MOD_LPDIBLB, IF_REAL, "Length dependence of pdiblcb"), IOP( "lfprout", BSIM4v4_MOD_LFPROUT, IF_REAL, "Length dependence of pdiblcb"), IOP( "lpdits", BSIM4v4_MOD_LPDITS, IF_REAL, "Length dependence of pdits"), IOP( "lpditsd", BSIM4v4_MOD_LPDITSD, IF_REAL, "Length dependence of pditsd"), IOP( "lpscbe1", BSIM4v4_MOD_LPSCBE1, IF_REAL, "Length dependence of pscbe1"), IOP( "lpscbe2", BSIM4v4_MOD_LPSCBE2, IF_REAL, "Length dependence of pscbe2"), IOP( "lpvag", BSIM4v4_MOD_LPVAG, IF_REAL, "Length dependence of pvag"), IOP( "lwr", BSIM4v4_MOD_LWR, IF_REAL, "Length dependence of wr"), IOP( "ldwg", BSIM4v4_MOD_LDWG, IF_REAL, "Length dependence of dwg"), IOP( "ldwb", BSIM4v4_MOD_LDWB, IF_REAL, "Length dependence of dwb"), IOP( "lb0", BSIM4v4_MOD_LB0, IF_REAL, "Length dependence of b0"), IOP( "lb1", BSIM4v4_MOD_LB1, IF_REAL, "Length dependence of b1"), IOP( "lcgsl", BSIM4v4_MOD_LCGSL, IF_REAL, "Length dependence of cgsl"), IOP( "lcgdl", BSIM4v4_MOD_LCGDL, IF_REAL, "Length dependence of cgdl"), IOP( "lckappas", BSIM4v4_MOD_LCKAPPAS, IF_REAL, "Length dependence of ckappas"), IOP( "lckappad", BSIM4v4_MOD_LCKAPPAD, IF_REAL, "Length dependence of ckappad"), IOP( "lcf", BSIM4v4_MOD_LCF, IF_REAL, "Length dependence of cf"), IOP( "lclc", BSIM4v4_MOD_LCLC, IF_REAL, "Length dependence of clc"), IOP( "lcle", BSIM4v4_MOD_LCLE, IF_REAL, "Length dependence of cle"), IOP( "lalpha0", BSIM4v4_MOD_LALPHA0, IF_REAL, "Length dependence of alpha0"), IOP( "lalpha1", BSIM4v4_MOD_LALPHA1, IF_REAL, "Length dependence of alpha1"), IOP( "lbeta0", BSIM4v4_MOD_LBETA0, IF_REAL, "Length dependence of beta0"), IOP( "lagidl", BSIM4v4_MOD_LAGIDL, IF_REAL, "Length dependence of agidl"), IOP( "lbgidl", BSIM4v4_MOD_LBGIDL, IF_REAL, "Length dependence of bgidl"), IOP( "lcgidl", BSIM4v4_MOD_LCGIDL, IF_REAL, "Length dependence of cgidl"), IOP( "legidl", BSIM4v4_MOD_LEGIDL, IF_REAL, "Length dependence of egidl"), IOP( "laigc", BSIM4v4_MOD_LAIGC, IF_REAL, "Length dependence of aigc"), IOP( "lbigc", BSIM4v4_MOD_LBIGC, IF_REAL, "Length dependence of bigc"), IOP( "lcigc", BSIM4v4_MOD_LCIGC, IF_REAL, "Length dependence of cigc"), IOP( "laigsd", BSIM4v4_MOD_LAIGSD, IF_REAL, "Length dependence of aigsd"), IOP( "lbigsd", BSIM4v4_MOD_LBIGSD, IF_REAL, "Length dependence of bigsd"), IOP( "lcigsd", BSIM4v4_MOD_LCIGSD, IF_REAL, "Length dependence of cigsd"), IOP( "laigbacc", BSIM4v4_MOD_LAIGBACC, IF_REAL, "Length dependence of aigbacc"), IOP( "lbigbacc", BSIM4v4_MOD_LBIGBACC, IF_REAL, "Length dependence of bigbacc"), IOP( "lcigbacc", BSIM4v4_MOD_LCIGBACC, IF_REAL, "Length dependence of cigbacc"), IOP( "laigbinv", BSIM4v4_MOD_LAIGBINV, IF_REAL, "Length dependence of aigbinv"), IOP( "lbigbinv", BSIM4v4_MOD_LBIGBINV, IF_REAL, "Length dependence of bigbinv"), IOP( "lcigbinv", BSIM4v4_MOD_LCIGBINV, IF_REAL, "Length dependence of cigbinv"), IOP( "lnigc", BSIM4v4_MOD_LNIGC, IF_REAL, "Length dependence of nigc"), IOP( "lnigbinv", BSIM4v4_MOD_LNIGBINV, IF_REAL, "Length dependence of nigbinv"), IOP( "lnigbacc", BSIM4v4_MOD_LNIGBACC, IF_REAL, "Length dependence of nigbacc"), IOP( "lntox", BSIM4v4_MOD_LNTOX, IF_REAL, "Length dependence of ntox"), IOP( "leigbinv", BSIM4v4_MOD_LEIGBINV, IF_REAL, "Length dependence for eigbinv"), IOP( "lpigcd", BSIM4v4_MOD_LPIGCD, IF_REAL, "Length dependence for pigcd"), IOP( "lpoxedge", BSIM4v4_MOD_LPOXEDGE, IF_REAL, "Length dependence for poxedge"), IOP( "lvfbcv", BSIM4v4_MOD_LVFBCV, IF_REAL, "Length dependence of vfbcv"), IOP( "lvfb", BSIM4v4_MOD_LVFB, IF_REAL, "Length dependence of vfb"), IOP( "lacde", BSIM4v4_MOD_LACDE, IF_REAL, "Length dependence of acde"), IOP( "lmoin", BSIM4v4_MOD_LMOIN, IF_REAL, "Length dependence of moin"), IOP( "lnoff", BSIM4v4_MOD_LNOFF, IF_REAL, "Length dependence of noff"), IOP( "lvoffcv", BSIM4v4_MOD_LVOFFCV, IF_REAL, "Length dependence of voffcv"), IOP( "lxrcrg1", BSIM4v4_MOD_LXRCRG1, IF_REAL, "Length dependence of xrcrg1"), IOP( "lxrcrg2", BSIM4v4_MOD_LXRCRG2, IF_REAL, "Length dependence of xrcrg2"), IOP( "llambda", BSIM4v4_MOD_LLAMBDA, IF_REAL, "Length dependence of lambda"), IOP( "lvtl", BSIM4v4_MOD_LVTL, IF_REAL, " Length dependence of vtl"), IOP( "lxn", BSIM4v4_MOD_LXN, IF_REAL, " Length dependence of xn"), IOP( "leu", BSIM4v4_MOD_LEU, IF_REAL, " Length dependence of eu"), IOP( "lvfbsdoff", BSIM4v4_MOD_LVFBSDOFF, IF_REAL, "Length dependence of vfbsdoff"), IOP( "wcdsc", BSIM4v4_MOD_WCDSC, IF_REAL, "Width dependence of cdsc"), IOP( "wcdscb", BSIM4v4_MOD_WCDSCB, IF_REAL, "Width dependence of cdscb"), IOP( "wcdscd", BSIM4v4_MOD_WCDSCD, IF_REAL, "Width dependence of cdscd"), IOP( "wcit", BSIM4v4_MOD_WCIT, IF_REAL, "Width dependence of cit"), IOP( "wnfactor", BSIM4v4_MOD_WNFACTOR, IF_REAL, "Width dependence of nfactor"), IOP( "wxj", BSIM4v4_MOD_WXJ, IF_REAL, "Width dependence of xj"), IOP( "wvsat", BSIM4v4_MOD_WVSAT, IF_REAL, "Width dependence of vsat"), IOP( "wat", BSIM4v4_MOD_WAT, IF_REAL, "Width dependence of at"), IOP( "wa0", BSIM4v4_MOD_WA0, IF_REAL, "Width dependence of a0"), IOP( "wags", BSIM4v4_MOD_WAGS, IF_REAL, "Width dependence of ags"), IOP( "wa1", BSIM4v4_MOD_WA1, IF_REAL, "Width dependence of a1"), IOP( "wa2", BSIM4v4_MOD_WA2, IF_REAL, "Width dependence of a2"), IOP( "wketa", BSIM4v4_MOD_WKETA, IF_REAL, "Width dependence of keta"), IOP( "wnsub", BSIM4v4_MOD_WNSUB, IF_REAL, "Width dependence of nsub"), IOP( "wndep", BSIM4v4_MOD_WNDEP, IF_REAL, "Width dependence of ndep"), IOP( "wnsd", BSIM4v4_MOD_WNSD, IF_REAL, "Width dependence of nsd"), IOP( "wphin", BSIM4v4_MOD_WPHIN, IF_REAL, "Width dependence of phin"), IOP( "wngate", BSIM4v4_MOD_WNGATE, IF_REAL, "Width dependence of ngate"), IOP( "wgamma1", BSIM4v4_MOD_WGAMMA1, IF_REAL, "Width dependence of gamma1"), IOP( "wgamma2", BSIM4v4_MOD_WGAMMA2, IF_REAL, "Width dependence of gamma2"), IOP( "wvbx", BSIM4v4_MOD_WVBX, IF_REAL, "Width dependence of vbx"), IOP( "wvbm", BSIM4v4_MOD_WVBM, IF_REAL, "Width dependence of vbm"), IOP( "wxt", BSIM4v4_MOD_WXT, IF_REAL, "Width dependence of xt"), IOP( "wk1", BSIM4v4_MOD_WK1, IF_REAL, "Width dependence of k1"), IOP( "wkt1", BSIM4v4_MOD_WKT1, IF_REAL, "Width dependence of kt1"), IOP( "wkt1l", BSIM4v4_MOD_WKT1L, IF_REAL, "Width dependence of kt1l"), IOP( "wkt2", BSIM4v4_MOD_WKT2, IF_REAL, "Width dependence of kt2"), IOP( "wk2", BSIM4v4_MOD_WK2, IF_REAL, "Width dependence of k2"), IOP( "wk3", BSIM4v4_MOD_WK3, IF_REAL, "Width dependence of k3"), IOP( "wk3b", BSIM4v4_MOD_WK3B, IF_REAL, "Width dependence of k3b"), IOP( "ww0", BSIM4v4_MOD_WW0, IF_REAL, "Width dependence of w0"), IOP( "wdvtp0", BSIM4v4_MOD_WDVTP0, IF_REAL, "Width dependence of dvtp0"), IOP( "wdvtp1", BSIM4v4_MOD_WDVTP1, IF_REAL, "Width dependence of dvtp1"), IOP( "wlpe0", BSIM4v4_MOD_WLPE0, IF_REAL, "Width dependence of lpe0"), IOP( "wlpeb", BSIM4v4_MOD_WLPEB, IF_REAL, "Width dependence of lpeb"), IOP( "wdvt0", BSIM4v4_MOD_WDVT0, IF_REAL, "Width dependence of dvt0"), IOP( "wdvt1", BSIM4v4_MOD_WDVT1, IF_REAL, "Width dependence of dvt1"), IOP( "wdvt2", BSIM4v4_MOD_WDVT2, IF_REAL, "Width dependence of dvt2"), IOP( "wdvt0w", BSIM4v4_MOD_WDVT0W, IF_REAL, "Width dependence of dvt0w"), IOP( "wdvt1w", BSIM4v4_MOD_WDVT1W, IF_REAL, "Width dependence of dvt1w"), IOP( "wdvt2w", BSIM4v4_MOD_WDVT2W, IF_REAL, "Width dependence of dvt2w"), IOP( "wdrout", BSIM4v4_MOD_WDROUT, IF_REAL, "Width dependence of drout"), IOP( "wdsub", BSIM4v4_MOD_WDSUB, IF_REAL, "Width dependence of dsub"), IOP( "wvth0", BSIM4v4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wvtho", BSIM4v4_MOD_WVTH0, IF_REAL,"Width dependence of vto"), IOP( "wua", BSIM4v4_MOD_WUA, IF_REAL, "Width dependence of ua"), IOP( "wua1", BSIM4v4_MOD_WUA1, IF_REAL, "Width dependence of ua1"), IOP( "wub", BSIM4v4_MOD_WUB, IF_REAL, "Width dependence of ub"), IOP( "wub1", BSIM4v4_MOD_WUB1, IF_REAL, "Width dependence of ub1"), IOP( "wuc", BSIM4v4_MOD_WUC, IF_REAL, "Width dependence of uc"), IOP( "wuc1", BSIM4v4_MOD_WUC1, IF_REAL, "Width dependence of uc1"), IOP( "wu0", BSIM4v4_MOD_WU0, IF_REAL, "Width dependence of u0"), IOP( "wute", BSIM4v4_MOD_WUTE, IF_REAL, "Width dependence of ute"), IOP( "wvoff", BSIM4v4_MOD_WVOFF, IF_REAL, "Width dependence of voff"), IOP( "wminv", BSIM4v4_MOD_WMINV, IF_REAL, "Width dependence of minv"), IOP( "wdelta", BSIM4v4_MOD_WDELTA, IF_REAL, "Width dependence of delta"), IOP( "wrdsw", BSIM4v4_MOD_WRDSW, IF_REAL, "Width dependence of rdsw "), IOP( "wrsw", BSIM4v4_MOD_WRSW, IF_REAL, "Width dependence of rsw"), IOP( "wrdw", BSIM4v4_MOD_WRDW, IF_REAL, "Width dependence of rdw"), IOP( "wprwg", BSIM4v4_MOD_WPRWG, IF_REAL, "Width dependence of prwg "), IOP( "wprwb", BSIM4v4_MOD_WPRWB, IF_REAL, "Width dependence of prwb "), IOP( "wprt", BSIM4v4_MOD_WPRT, IF_REAL, "Width dependence of prt"), IOP( "weta0", BSIM4v4_MOD_WETA0, IF_REAL, "Width dependence of eta0"), IOP( "wetab", BSIM4v4_MOD_WETAB, IF_REAL, "Width dependence of etab"), IOP( "wpclm", BSIM4v4_MOD_WPCLM, IF_REAL, "Width dependence of pclm"), IOP( "wpdiblc1", BSIM4v4_MOD_WPDIBL1, IF_REAL, "Width dependence of pdiblc1"), IOP( "wpdiblc2", BSIM4v4_MOD_WPDIBL2, IF_REAL, "Width dependence of pdiblc2"), IOP( "wpdiblcb", BSIM4v4_MOD_WPDIBLB, IF_REAL, "Width dependence of pdiblcb"), IOP( "wfprout", BSIM4v4_MOD_WFPROUT, IF_REAL, "Width dependence of pdiblcb"), IOP( "wpdits", BSIM4v4_MOD_WPDITS, IF_REAL, "Width dependence of pdits"), IOP( "wpditsd", BSIM4v4_MOD_WPDITSD, IF_REAL, "Width dependence of pditsd"), IOP( "wpscbe1", BSIM4v4_MOD_WPSCBE1, IF_REAL, "Width dependence of pscbe1"), IOP( "wpscbe2", BSIM4v4_MOD_WPSCBE2, IF_REAL, "Width dependence of pscbe2"), IOP( "wpvag", BSIM4v4_MOD_WPVAG, IF_REAL, "Width dependence of pvag"), IOP( "wwr", BSIM4v4_MOD_WWR, IF_REAL, "Width dependence of wr"), IOP( "wdwg", BSIM4v4_MOD_WDWG, IF_REAL, "Width dependence of dwg"), IOP( "wdwb", BSIM4v4_MOD_WDWB, IF_REAL, "Width dependence of dwb"), IOP( "wb0", BSIM4v4_MOD_WB0, IF_REAL, "Width dependence of b0"), IOP( "wb1", BSIM4v4_MOD_WB1, IF_REAL, "Width dependence of b1"), IOP( "wcgsl", BSIM4v4_MOD_WCGSL, IF_REAL, "Width dependence of cgsl"), IOP( "wcgdl", BSIM4v4_MOD_WCGDL, IF_REAL, "Width dependence of cgdl"), IOP( "wckappas", BSIM4v4_MOD_WCKAPPAS, IF_REAL, "Width dependence of ckappas"), IOP( "wckappad", BSIM4v4_MOD_WCKAPPAD, IF_REAL, "Width dependence of ckappad"), IOP( "wcf", BSIM4v4_MOD_WCF, IF_REAL, "Width dependence of cf"), IOP( "wclc", BSIM4v4_MOD_WCLC, IF_REAL, "Width dependence of clc"), IOP( "wcle", BSIM4v4_MOD_WCLE, IF_REAL, "Width dependence of cle"), IOP( "walpha0", BSIM4v4_MOD_WALPHA0, IF_REAL, "Width dependence of alpha0"), IOP( "walpha1", BSIM4v4_MOD_WALPHA1, IF_REAL, "Width dependence of alpha1"), IOP( "wbeta0", BSIM4v4_MOD_WBETA0, IF_REAL, "Width dependence of beta0"), IOP( "wagidl", BSIM4v4_MOD_WAGIDL, IF_REAL, "Width dependence of agidl"), IOP( "wbgidl", BSIM4v4_MOD_WBGIDL, IF_REAL, "Width dependence of bgidl"), IOP( "wcgidl", BSIM4v4_MOD_WCGIDL, IF_REAL, "Width dependence of cgidl"), IOP( "wegidl", BSIM4v4_MOD_WEGIDL, IF_REAL, "Width dependence of egidl"), IOP( "waigc", BSIM4v4_MOD_WAIGC, IF_REAL, "Width dependence of aigc"), IOP( "wbigc", BSIM4v4_MOD_WBIGC, IF_REAL, "Width dependence of bigc"), IOP( "wcigc", BSIM4v4_MOD_WCIGC, IF_REAL, "Width dependence of cigc"), IOP( "waigsd", BSIM4v4_MOD_WAIGSD, IF_REAL, "Width dependence of aigsd"), IOP( "wbigsd", BSIM4v4_MOD_WBIGSD, IF_REAL, "Width dependence of bigsd"), IOP( "wcigsd", BSIM4v4_MOD_WCIGSD, IF_REAL, "Width dependence of cigsd"), IOP( "waigbacc", BSIM4v4_MOD_WAIGBACC, IF_REAL, "Width dependence of aigbacc"), IOP( "wbigbacc", BSIM4v4_MOD_WBIGBACC, IF_REAL, "Width dependence of bigbacc"), IOP( "wcigbacc", BSIM4v4_MOD_WCIGBACC, IF_REAL, "Width dependence of cigbacc"), IOP( "waigbinv", BSIM4v4_MOD_WAIGBINV, IF_REAL, "Width dependence of aigbinv"), IOP( "wbigbinv", BSIM4v4_MOD_WBIGBINV, IF_REAL, "Width dependence of bigbinv"), IOP( "wcigbinv", BSIM4v4_MOD_WCIGBINV, IF_REAL, "Width dependence of cigbinv"), IOP( "wnigc", BSIM4v4_MOD_WNIGC, IF_REAL, "Width dependence of nigc"), IOP( "wnigbinv", BSIM4v4_MOD_WNIGBINV, IF_REAL, "Width dependence of nigbinv"), IOP( "wnigbacc", BSIM4v4_MOD_WNIGBACC, IF_REAL, "Width dependence of nigbacc"), IOP( "wntox", BSIM4v4_MOD_WNTOX, IF_REAL, "Width dependence of ntox"), IOP( "weigbinv", BSIM4v4_MOD_WEIGBINV, IF_REAL, "Width dependence for eigbinv"), IOP( "wpigcd", BSIM4v4_MOD_WPIGCD, IF_REAL, "Width dependence for pigcd"), IOP( "wpoxedge", BSIM4v4_MOD_WPOXEDGE, IF_REAL, "Width dependence for poxedge"), IOP( "wvfbcv", BSIM4v4_MOD_WVFBCV, IF_REAL, "Width dependence of vfbcv"), IOP( "wvfb", BSIM4v4_MOD_WVFB, IF_REAL, "Width dependence of vfb"), IOP( "wacde", BSIM4v4_MOD_WACDE, IF_REAL, "Width dependence of acde"), IOP( "wmoin", BSIM4v4_MOD_WMOIN, IF_REAL, "Width dependence of moin"), IOP( "wnoff", BSIM4v4_MOD_WNOFF, IF_REAL, "Width dependence of noff"), IOP( "wvoffcv", BSIM4v4_MOD_WVOFFCV, IF_REAL, "Width dependence of voffcv"), IOP( "wxrcrg1", BSIM4v4_MOD_WXRCRG1, IF_REAL, "Width dependence of xrcrg1"), IOP( "wxrcrg2", BSIM4v4_MOD_WXRCRG2, IF_REAL, "Width dependence of xrcrg2"), IOP( "wlambda", BSIM4v4_MOD_WLAMBDA, IF_REAL, "Width dependence of lambda"), IOP( "wvtl", BSIM4v4_MOD_WVTL, IF_REAL, "Width dependence of vtl"), IOP( "wxn", BSIM4v4_MOD_WXN, IF_REAL, "Width dependence of xn"), IOP( "weu", BSIM4v4_MOD_WEU, IF_REAL, "Width dependence of eu"), IOP( "wvfbsdoff", BSIM4v4_MOD_WVFBSDOFF, IF_REAL, "Width dependence of vfbsdoff"), IOP( "pcdsc", BSIM4v4_MOD_PCDSC, IF_REAL, "Cross-term dependence of cdsc"), IOP( "pcdscb", BSIM4v4_MOD_PCDSCB, IF_REAL, "Cross-term dependence of cdscb"), IOP( "pcdscd", BSIM4v4_MOD_PCDSCD, IF_REAL, "Cross-term dependence of cdscd"), IOP( "pcit", BSIM4v4_MOD_PCIT, IF_REAL, "Cross-term dependence of cit"), IOP( "pnfactor", BSIM4v4_MOD_PNFACTOR, IF_REAL, "Cross-term dependence of nfactor"), IOP( "pxj", BSIM4v4_MOD_PXJ, IF_REAL, "Cross-term dependence of xj"), IOP( "pvsat", BSIM4v4_MOD_PVSAT, IF_REAL, "Cross-term dependence of vsat"), IOP( "pat", BSIM4v4_MOD_PAT, IF_REAL, "Cross-term dependence of at"), IOP( "pa0", BSIM4v4_MOD_PA0, IF_REAL, "Cross-term dependence of a0"), IOP( "pags", BSIM4v4_MOD_PAGS, IF_REAL, "Cross-term dependence of ags"), IOP( "pa1", BSIM4v4_MOD_PA1, IF_REAL, "Cross-term dependence of a1"), IOP( "pa2", BSIM4v4_MOD_PA2, IF_REAL, "Cross-term dependence of a2"), IOP( "pketa", BSIM4v4_MOD_PKETA, IF_REAL, "Cross-term dependence of keta"), IOP( "pnsub", BSIM4v4_MOD_PNSUB, IF_REAL, "Cross-term dependence of nsub"), IOP( "pndep", BSIM4v4_MOD_PNDEP, IF_REAL, "Cross-term dependence of ndep"), IOP( "pnsd", BSIM4v4_MOD_PNSD, IF_REAL, "Cross-term dependence of nsd"), IOP( "pphin", BSIM4v4_MOD_PPHIN, IF_REAL, "Cross-term dependence of phin"), IOP( "pngate", BSIM4v4_MOD_PNGATE, IF_REAL, "Cross-term dependence of ngate"), IOP( "pgamma1", BSIM4v4_MOD_PGAMMA1, IF_REAL, "Cross-term dependence of gamma1"), IOP( "pgamma2", BSIM4v4_MOD_PGAMMA2, IF_REAL, "Cross-term dependence of gamma2"), IOP( "pvbx", BSIM4v4_MOD_PVBX, IF_REAL, "Cross-term dependence of vbx"), IOP( "pvbm", BSIM4v4_MOD_PVBM, IF_REAL, "Cross-term dependence of vbm"), IOP( "pxt", BSIM4v4_MOD_PXT, IF_REAL, "Cross-term dependence of xt"), IOP( "pk1", BSIM4v4_MOD_PK1, IF_REAL, "Cross-term dependence of k1"), IOP( "pkt1", BSIM4v4_MOD_PKT1, IF_REAL, "Cross-term dependence of kt1"), IOP( "pkt1l", BSIM4v4_MOD_PKT1L, IF_REAL, "Cross-term dependence of kt1l"), IOP( "pkt2", BSIM4v4_MOD_PKT2, IF_REAL, "Cross-term dependence of kt2"), IOP( "pk2", BSIM4v4_MOD_PK2, IF_REAL, "Cross-term dependence of k2"), IOP( "pk3", BSIM4v4_MOD_PK3, IF_REAL, "Cross-term dependence of k3"), IOP( "pk3b", BSIM4v4_MOD_PK3B, IF_REAL, "Cross-term dependence of k3b"), IOP( "pw0", BSIM4v4_MOD_PW0, IF_REAL, "Cross-term dependence of w0"), IOP( "pdvtp0", BSIM4v4_MOD_PDVTP0, IF_REAL, "Cross-term dependence of dvtp0"), IOP( "pdvtp1", BSIM4v4_MOD_PDVTP1, IF_REAL, "Cross-term dependence of dvtp1"), IOP( "plpe0", BSIM4v4_MOD_PLPE0, IF_REAL, "Cross-term dependence of lpe0"), IOP( "plpeb", BSIM4v4_MOD_PLPEB, IF_REAL, "Cross-term dependence of lpeb"), IOP( "pdvt0", BSIM4v4_MOD_PDVT0, IF_REAL, "Cross-term dependence of dvt0"), IOP( "pdvt1", BSIM4v4_MOD_PDVT1, IF_REAL, "Cross-term dependence of dvt1"), IOP( "pdvt2", BSIM4v4_MOD_PDVT2, IF_REAL, "Cross-term dependence of dvt2"), IOP( "pdvt0w", BSIM4v4_MOD_PDVT0W, IF_REAL, "Cross-term dependence of dvt0w"), IOP( "pdvt1w", BSIM4v4_MOD_PDVT1W, IF_REAL, "Cross-term dependence of dvt1w"), IOP( "pdvt2w", BSIM4v4_MOD_PDVT2W, IF_REAL, "Cross-term dependence of dvt2w"), IOP( "pdrout", BSIM4v4_MOD_PDROUT, IF_REAL, "Cross-term dependence of drout"), IOP( "pdsub", BSIM4v4_MOD_PDSUB, IF_REAL, "Cross-term dependence of dsub"), IOP( "pvth0", BSIM4v4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pvtho", BSIM4v4_MOD_PVTH0, IF_REAL,"Cross-term dependence of vto"), IOP( "pua", BSIM4v4_MOD_PUA, IF_REAL, "Cross-term dependence of ua"), IOP( "pua1", BSIM4v4_MOD_PUA1, IF_REAL, "Cross-term dependence of ua1"), IOP( "pub", BSIM4v4_MOD_PUB, IF_REAL, "Cross-term dependence of ub"), IOP( "pub1", BSIM4v4_MOD_PUB1, IF_REAL, "Cross-term dependence of ub1"), IOP( "puc", BSIM4v4_MOD_PUC, IF_REAL, "Cross-term dependence of uc"), IOP( "puc1", BSIM4v4_MOD_PUC1, IF_REAL, "Cross-term dependence of uc1"), IOP( "pu0", BSIM4v4_MOD_PU0, IF_REAL, "Cross-term dependence of u0"), IOP( "pute", BSIM4v4_MOD_PUTE, IF_REAL, "Cross-term dependence of ute"), IOP( "pvoff", BSIM4v4_MOD_PVOFF, IF_REAL, "Cross-term dependence of voff"), IOP( "pminv", BSIM4v4_MOD_PMINV, IF_REAL, "Cross-term dependence of minv"), IOP( "pdelta", BSIM4v4_MOD_PDELTA, IF_REAL, "Cross-term dependence of delta"), IOP( "prdsw", BSIM4v4_MOD_PRDSW, IF_REAL, "Cross-term dependence of rdsw "), IOP( "prsw", BSIM4v4_MOD_PRSW, IF_REAL, "Cross-term dependence of rsw"), IOP( "prdw", BSIM4v4_MOD_PRDW, IF_REAL, "Cross-term dependence of rdw"), IOP( "pprwg", BSIM4v4_MOD_PPRWG, IF_REAL, "Cross-term dependence of prwg "), IOP( "pprwb", BSIM4v4_MOD_PPRWB, IF_REAL, "Cross-term dependence of prwb "), IOP( "pprt", BSIM4v4_MOD_PPRT, IF_REAL, "Cross-term dependence of prt "), IOP( "peta0", BSIM4v4_MOD_PETA0, IF_REAL, "Cross-term dependence of eta0"), IOP( "petab", BSIM4v4_MOD_PETAB, IF_REAL, "Cross-term dependence of etab"), IOP( "ppclm", BSIM4v4_MOD_PPCLM, IF_REAL, "Cross-term dependence of pclm"), IOP( "ppdiblc1", BSIM4v4_MOD_PPDIBL1, IF_REAL, "Cross-term dependence of pdiblc1"), IOP( "ppdiblc2", BSIM4v4_MOD_PPDIBL2, IF_REAL, "Cross-term dependence of pdiblc2"), IOP( "ppdiblcb", BSIM4v4_MOD_PPDIBLB, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "pfprout", BSIM4v4_MOD_PFPROUT, IF_REAL, "Cross-term dependence of pdiblcb"), IOP( "ppdits", BSIM4v4_MOD_PPDITS, IF_REAL, "Cross-term dependence of pdits"), IOP( "ppditsd", BSIM4v4_MOD_PPDITSD, IF_REAL, "Cross-term dependence of pditsd"), IOP( "ppscbe1", BSIM4v4_MOD_PPSCBE1, IF_REAL, "Cross-term dependence of pscbe1"), IOP( "ppscbe2", BSIM4v4_MOD_PPSCBE2, IF_REAL, "Cross-term dependence of pscbe2"), IOP( "ppvag", BSIM4v4_MOD_PPVAG, IF_REAL, "Cross-term dependence of pvag"), IOP( "pwr", BSIM4v4_MOD_PWR, IF_REAL, "Cross-term dependence of wr"), IOP( "pdwg", BSIM4v4_MOD_PDWG, IF_REAL, "Cross-term dependence of dwg"), IOP( "pdwb", BSIM4v4_MOD_PDWB, IF_REAL, "Cross-term dependence of dwb"), IOP( "pb0", BSIM4v4_MOD_PB0, IF_REAL, "Cross-term dependence of b0"), IOP( "pb1", BSIM4v4_MOD_PB1, IF_REAL, "Cross-term dependence of b1"), IOP( "pcgsl", BSIM4v4_MOD_PCGSL, IF_REAL, "Cross-term dependence of cgsl"), IOP( "pcgdl", BSIM4v4_MOD_PCGDL, IF_REAL, "Cross-term dependence of cgdl"), IOP( "pckappas", BSIM4v4_MOD_PCKAPPAS, IF_REAL, "Cross-term dependence of ckappas"), IOP( "pckappad", BSIM4v4_MOD_PCKAPPAD, IF_REAL, "Cross-term dependence of ckappad"), IOP( "pcf", BSIM4v4_MOD_PCF, IF_REAL, "Cross-term dependence of cf"), IOP( "pclc", BSIM4v4_MOD_PCLC, IF_REAL, "Cross-term dependence of clc"), IOP( "pcle", BSIM4v4_MOD_PCLE, IF_REAL, "Cross-term dependence of cle"), IOP( "palpha0", BSIM4v4_MOD_PALPHA0, IF_REAL, "Cross-term dependence of alpha0"), IOP( "palpha1", BSIM4v4_MOD_PALPHA1, IF_REAL, "Cross-term dependence of alpha1"), IOP( "pbeta0", BSIM4v4_MOD_PBETA0, IF_REAL, "Cross-term dependence of beta0"), IOP( "pagidl", BSIM4v4_MOD_PAGIDL, IF_REAL, "Cross-term dependence of agidl"), IOP( "pbgidl", BSIM4v4_MOD_PBGIDL, IF_REAL, "Cross-term dependence of bgidl"), IOP( "pcgidl", BSIM4v4_MOD_PCGIDL, IF_REAL, "Cross-term dependence of cgidl"), IOP( "pegidl", BSIM4v4_MOD_PEGIDL, IF_REAL, "Cross-term dependence of egidl"), IOP( "paigc", BSIM4v4_MOD_PAIGC, IF_REAL, "Cross-term dependence of aigc"), IOP( "pbigc", BSIM4v4_MOD_PBIGC, IF_REAL, "Cross-term dependence of bigc"), IOP( "pcigc", BSIM4v4_MOD_PCIGC, IF_REAL, "Cross-term dependence of cigc"), IOP( "paigsd", BSIM4v4_MOD_PAIGSD, IF_REAL, "Cross-term dependence of aigsd"), IOP( "pbigsd", BSIM4v4_MOD_PBIGSD, IF_REAL, "Cross-term dependence of bigsd"), IOP( "pcigsd", BSIM4v4_MOD_PCIGSD, IF_REAL, "Cross-term dependence of cigsd"), IOP( "paigbacc", BSIM4v4_MOD_PAIGBACC, IF_REAL, "Cross-term dependence of aigbacc"), IOP( "pbigbacc", BSIM4v4_MOD_PBIGBACC, IF_REAL, "Cross-term dependence of bigbacc"), IOP( "pcigbacc", BSIM4v4_MOD_PCIGBACC, IF_REAL, "Cross-term dependence of cigbacc"), IOP( "paigbinv", BSIM4v4_MOD_PAIGBINV, IF_REAL, "Cross-term dependence of aigbinv"), IOP( "pbigbinv", BSIM4v4_MOD_PBIGBINV, IF_REAL, "Cross-term dependence of bigbinv"), IOP( "pcigbinv", BSIM4v4_MOD_PCIGBINV, IF_REAL, "Cross-term dependence of cigbinv"), IOP( "pnigc", BSIM4v4_MOD_PNIGC, IF_REAL, "Cross-term dependence of nigc"), IOP( "pnigbinv", BSIM4v4_MOD_PNIGBINV, IF_REAL, "Cross-term dependence of nigbinv"), IOP( "pnigbacc", BSIM4v4_MOD_PNIGBACC, IF_REAL, "Cross-term dependence of nigbacc"), IOP( "pntox", BSIM4v4_MOD_PNTOX, IF_REAL, "Cross-term dependence of ntox"), IOP( "peigbinv", BSIM4v4_MOD_PEIGBINV, IF_REAL, "Cross-term dependence for eigbinv"), IOP( "ppigcd", BSIM4v4_MOD_PPIGCD, IF_REAL, "Cross-term dependence for pigcd"), IOP( "ppoxedge", BSIM4v4_MOD_PPOXEDGE, IF_REAL, "Cross-term dependence for poxedge"), IOP( "pvfbcv", BSIM4v4_MOD_PVFBCV, IF_REAL, "Cross-term dependence of vfbcv"), IOP( "pvfb", BSIM4v4_MOD_PVFB, IF_REAL, "Cross-term dependence of vfb"), IOP( "pacde", BSIM4v4_MOD_PACDE, IF_REAL, "Cross-term dependence of acde"), IOP( "pmoin", BSIM4v4_MOD_PMOIN, IF_REAL, "Cross-term dependence of moin"), IOP( "pnoff", BSIM4v4_MOD_PNOFF, IF_REAL, "Cross-term dependence of noff"), IOP( "pvoffcv", BSIM4v4_MOD_PVOFFCV, IF_REAL, "Cross-term dependence of voffcv"), IOP( "pxrcrg1", BSIM4v4_MOD_PXRCRG1, IF_REAL, "Cross-term dependence of xrcrg1"), IOP( "pxrcrg2", BSIM4v4_MOD_PXRCRG2, IF_REAL, "Cross-term dependence of xrcrg2"), IOP( "plambda", BSIM4v4_MOD_PLAMBDA, IF_REAL, "Cross-term dependence of lambda"), IOP( "pvtl", BSIM4v4_MOD_PVTL, IF_REAL, "Cross-term dependence of vtl"), IOP( "pxn", BSIM4v4_MOD_PXN, IF_REAL, "Cross-term dependence of xn"), IOP( "peu", BSIM4v4_MOD_PEU, IF_REAL, "Cross-term dependence of eu"), IOP( "pvfbsdoff", BSIM4v4_MOD_PVFBSDOFF, IF_REAL, "Cross-term dependence of vfbsdoff"), /* stress effect*/ IOP( "saref", BSIM4v4_MOD_SAREF, IF_REAL, "Reference distance between OD edge to poly of one side"), IOP( "sbref", BSIM4v4_MOD_SBREF, IF_REAL, "Reference distance between OD edge to poly of the other side"), IOP( "wlod", BSIM4v4_MOD_WLOD, IF_REAL, "Width parameter for stress effect"), IOP( "ku0", BSIM4v4_MOD_KU0, IF_REAL, "Mobility degradation/enhancement coefficient for LOD"), IOP( "kvsat", BSIM4v4_MOD_KVSAT, IF_REAL, "Saturation velocity degradation/enhancement parameter for LOD"), IOP( "kvth0", BSIM4v4_MOD_KVTH0, IF_REAL, "Threshold degradation/enhancement parameter for LOD"), IOP( "tku0", BSIM4v4_MOD_TKU0, IF_REAL, "Temperature coefficient of KU0"), IOP( "llodku0", BSIM4v4_MOD_LLODKU0, IF_REAL, "Length parameter for u0 LOD effect"), IOP( "wlodku0", BSIM4v4_MOD_WLODKU0, IF_REAL, "Width parameter for u0 LOD effect"), IOP( "llodvth", BSIM4v4_MOD_LLODVTH, IF_REAL, "Length parameter for vth LOD effect"), IOP( "wlodvth", BSIM4v4_MOD_WLODVTH, IF_REAL, "Width parameter for vth LOD effect"), IOP( "lku0", BSIM4v4_MOD_LKU0, IF_REAL, "Length dependence of ku0"), IOP( "wku0", BSIM4v4_MOD_WKU0, IF_REAL, "Width dependence of ku0"), IOP( "pku0", BSIM4v4_MOD_PKU0, IF_REAL, "Cross-term dependence of ku0"), IOP( "lkvth0", BSIM4v4_MOD_LKVTH0, IF_REAL, "Length dependence of kvth0"), IOP( "wkvth0", BSIM4v4_MOD_WKVTH0, IF_REAL, "Width dependence of kvth0"), IOP( "pkvth0", BSIM4v4_MOD_PKVTH0, IF_REAL, "Cross-term dependence of kvth0"), IOP( "stk2", BSIM4v4_MOD_STK2, IF_REAL, "K2 shift factor related to stress effect on vth"), IOP( "lodk2", BSIM4v4_MOD_LODK2, IF_REAL, "K2 shift modification factor for stress effect"), IOP( "steta0", BSIM4v4_MOD_STETA0, IF_REAL, "eta0 shift factor related to stress effect on vth"), IOP( "lodeta0", BSIM4v4_MOD_LODETA0, IF_REAL, "eta0 shift modification factor for stress effect"), IOP( "noia", BSIM4v4_MOD_NOIA, IF_REAL, "Flicker noise parameter"), IOP( "noib", BSIM4v4_MOD_NOIB, IF_REAL, "Flicker noise parameter"), IOP( "noic", BSIM4v4_MOD_NOIC, IF_REAL, "Flicker noise parameter"), IOP( "tnoia", BSIM4v4_MOD_TNOIA, IF_REAL, "Thermal noise parameter"), IOP( "tnoib", BSIM4v4_MOD_TNOIB, IF_REAL, "Thermal noise parameter"), IOP( "rnoia", BSIM4v4_MOD_RNOIA, IF_REAL, "Thermal noise coefficient"), IOP( "rnoib", BSIM4v4_MOD_RNOIB, IF_REAL, "Thermal noise coefficient"), IOP( "ntnoi", BSIM4v4_MOD_NTNOI, IF_REAL, "Thermal noise parameter"), IOP( "em", BSIM4v4_MOD_EM, IF_REAL, "Flicker noise parameter"), IOP( "ef", BSIM4v4_MOD_EF, IF_REAL, "Flicker noise frequency exponent"), IOP( "af", BSIM4v4_MOD_AF, IF_REAL, "Flicker noise exponent"), IOP( "kf", BSIM4v4_MOD_KF, IF_REAL, "Flicker noise coefficient"), IP( "nmos", BSIM4v4_MOD_NMOS, IF_FLAG, "Flag to indicate NMOS"), IP( "pmos", BSIM4v4_MOD_PMOS, IF_FLAG, "Flag to indicate PMOS"), }; char *BSIM4v4names[] = { "Drain", "Gate", "Source", "Bulk", "Charge" }; int BSIM4v4nSize = NUMELEMS(BSIM4v4names); int BSIM4v4pTSize = NUMELEMS(BSIM4v4pTable); int BSIM4v4mPTSize = NUMELEMS(BSIM4v4mPTable); int BSIM4v4iSize = sizeof(BSIM4v4instance); int BSIM4v4mSize = sizeof(BSIM4v4model); ngspice-26/src/spicelib/devices/bsim4v4/b4v4mask.c0000644000265600020320000020765612264261473021343 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4mask.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4mAsk( CKTcircuit *ckt, GENmodel *inst, int which, IFvalue *value) { BSIM4v4model *model = (BSIM4v4model *)inst; NG_IGNORE(ckt); switch(which) { case BSIM4v4_MOD_MOBMOD : value->iValue = model->BSIM4v4mobMod; return(OK); case BSIM4v4_MOD_PARAMCHK : value->iValue = model->BSIM4v4paramChk; return(OK); case BSIM4v4_MOD_BINUNIT : value->iValue = model->BSIM4v4binUnit; return(OK); case BSIM4v4_MOD_CAPMOD : value->iValue = model->BSIM4v4capMod; return(OK); case BSIM4v4_MOD_DIOMOD : value->iValue = model->BSIM4v4dioMod; return(OK); case BSIM4v4_MOD_TRNQSMOD : value->iValue = model->BSIM4v4trnqsMod; return(OK); case BSIM4v4_MOD_ACNQSMOD : value->iValue = model->BSIM4v4acnqsMod; return(OK); case BSIM4v4_MOD_FNOIMOD : value->iValue = model->BSIM4v4fnoiMod; return(OK); case BSIM4v4_MOD_TNOIMOD : value->iValue = model->BSIM4v4tnoiMod; return(OK); case BSIM4v4_MOD_RDSMOD : value->iValue = model->BSIM4v4rdsMod; return(OK); case BSIM4v4_MOD_RBODYMOD : value->iValue = model->BSIM4v4rbodyMod; return(OK); case BSIM4v4_MOD_RGATEMOD : value->iValue = model->BSIM4v4rgateMod; return(OK); case BSIM4v4_MOD_PERMOD : value->iValue = model->BSIM4v4perMod; return(OK); case BSIM4v4_MOD_GEOMOD : value->iValue = model->BSIM4v4geoMod; return(OK); case BSIM4v4_MOD_IGCMOD : value->iValue = model->BSIM4v4igcMod; return(OK); case BSIM4v4_MOD_IGBMOD : value->iValue = model->BSIM4v4igbMod; return(OK); case BSIM4v4_MOD_TEMPMOD : value->iValue = model->BSIM4v4tempMod; return(OK); case BSIM4v4_MOD_VERSION : value->sValue = model->BSIM4v4version; return(OK); case BSIM4v4_MOD_TOXREF : value->rValue = model->BSIM4v4toxref; return(OK); case BSIM4v4_MOD_TOXE : value->rValue = model->BSIM4v4toxe; return(OK); case BSIM4v4_MOD_TOXP : value->rValue = model->BSIM4v4toxp; return(OK); case BSIM4v4_MOD_TOXM : value->rValue = model->BSIM4v4toxm; return(OK); case BSIM4v4_MOD_DTOX : value->rValue = model->BSIM4v4dtox; return(OK); case BSIM4v4_MOD_EPSROX : value->rValue = model->BSIM4v4epsrox; return(OK); case BSIM4v4_MOD_CDSC : value->rValue = model->BSIM4v4cdsc; return(OK); case BSIM4v4_MOD_CDSCB : value->rValue = model->BSIM4v4cdscb; return(OK); case BSIM4v4_MOD_CDSCD : value->rValue = model->BSIM4v4cdscd; return(OK); case BSIM4v4_MOD_CIT : value->rValue = model->BSIM4v4cit; return(OK); case BSIM4v4_MOD_NFACTOR : value->rValue = model->BSIM4v4nfactor; return(OK); case BSIM4v4_MOD_XJ: value->rValue = model->BSIM4v4xj; return(OK); case BSIM4v4_MOD_VSAT: value->rValue = model->BSIM4v4vsat; return(OK); case BSIM4v4_MOD_VTL: value->rValue = model->BSIM4v4vtl; return(OK); case BSIM4v4_MOD_XN: value->rValue = model->BSIM4v4xn; return(OK); case BSIM4v4_MOD_LC: value->rValue = model->BSIM4v4lc; return(OK); case BSIM4v4_MOD_LAMBDA: value->rValue = model->BSIM4v4lambda; return(OK); case BSIM4v4_MOD_AT: value->rValue = model->BSIM4v4at; return(OK); case BSIM4v4_MOD_A0: value->rValue = model->BSIM4v4a0; return(OK); case BSIM4v4_MOD_AGS: value->rValue = model->BSIM4v4ags; return(OK); case BSIM4v4_MOD_A1: value->rValue = model->BSIM4v4a1; return(OK); case BSIM4v4_MOD_A2: value->rValue = model->BSIM4v4a2; return(OK); case BSIM4v4_MOD_KETA: value->rValue = model->BSIM4v4keta; return(OK); case BSIM4v4_MOD_NSUB: value->rValue = model->BSIM4v4nsub; return(OK); case BSIM4v4_MOD_NDEP: value->rValue = model->BSIM4v4ndep; return(OK); case BSIM4v4_MOD_NSD: value->rValue = model->BSIM4v4nsd; return(OK); case BSIM4v4_MOD_NGATE: value->rValue = model->BSIM4v4ngate; return(OK); case BSIM4v4_MOD_GAMMA1: value->rValue = model->BSIM4v4gamma1; return(OK); case BSIM4v4_MOD_GAMMA2: value->rValue = model->BSIM4v4gamma2; return(OK); case BSIM4v4_MOD_VBX: value->rValue = model->BSIM4v4vbx; return(OK); case BSIM4v4_MOD_VBM: value->rValue = model->BSIM4v4vbm; return(OK); case BSIM4v4_MOD_XT: value->rValue = model->BSIM4v4xt; return(OK); case BSIM4v4_MOD_K1: value->rValue = model->BSIM4v4k1; return(OK); case BSIM4v4_MOD_KT1: value->rValue = model->BSIM4v4kt1; return(OK); case BSIM4v4_MOD_KT1L: value->rValue = model->BSIM4v4kt1l; return(OK); case BSIM4v4_MOD_KT2 : value->rValue = model->BSIM4v4kt2; return(OK); case BSIM4v4_MOD_K2 : value->rValue = model->BSIM4v4k2; return(OK); case BSIM4v4_MOD_K3: value->rValue = model->BSIM4v4k3; return(OK); case BSIM4v4_MOD_K3B: value->rValue = model->BSIM4v4k3b; return(OK); case BSIM4v4_MOD_W0: value->rValue = model->BSIM4v4w0; return(OK); case BSIM4v4_MOD_LPE0: value->rValue = model->BSIM4v4lpe0; return(OK); case BSIM4v4_MOD_LPEB: value->rValue = model->BSIM4v4lpeb; return(OK); case BSIM4v4_MOD_DVTP0: value->rValue = model->BSIM4v4dvtp0; return(OK); case BSIM4v4_MOD_DVTP1: value->rValue = model->BSIM4v4dvtp1; return(OK); case BSIM4v4_MOD_DVT0 : value->rValue = model->BSIM4v4dvt0; return(OK); case BSIM4v4_MOD_DVT1 : value->rValue = model->BSIM4v4dvt1; return(OK); case BSIM4v4_MOD_DVT2 : value->rValue = model->BSIM4v4dvt2; return(OK); case BSIM4v4_MOD_DVT0W : value->rValue = model->BSIM4v4dvt0w; return(OK); case BSIM4v4_MOD_DVT1W : value->rValue = model->BSIM4v4dvt1w; return(OK); case BSIM4v4_MOD_DVT2W : value->rValue = model->BSIM4v4dvt2w; return(OK); case BSIM4v4_MOD_DROUT : value->rValue = model->BSIM4v4drout; return(OK); case BSIM4v4_MOD_DSUB : value->rValue = model->BSIM4v4dsub; return(OK); case BSIM4v4_MOD_VTH0: value->rValue = model->BSIM4v4vth0; return(OK); case BSIM4v4_MOD_EU: value->rValue = model->BSIM4v4eu; return(OK); case BSIM4v4_MOD_UA: value->rValue = model->BSIM4v4ua; return(OK); case BSIM4v4_MOD_UA1: value->rValue = model->BSIM4v4ua1; return(OK); case BSIM4v4_MOD_UB: value->rValue = model->BSIM4v4ub; return(OK); case BSIM4v4_MOD_UB1: value->rValue = model->BSIM4v4ub1; return(OK); case BSIM4v4_MOD_UC: value->rValue = model->BSIM4v4uc; return(OK); case BSIM4v4_MOD_UC1: value->rValue = model->BSIM4v4uc1; return(OK); case BSIM4v4_MOD_U0: value->rValue = model->BSIM4v4u0; return(OK); case BSIM4v4_MOD_UTE: value->rValue = model->BSIM4v4ute; return(OK); case BSIM4v4_MOD_VOFF: value->rValue = model->BSIM4v4voff; return(OK); case BSIM4v4_MOD_VOFFL: value->rValue = model->BSIM4v4voffl; return(OK); case BSIM4v4_MOD_MINV: value->rValue = model->BSIM4v4minv; return(OK); case BSIM4v4_MOD_FPROUT: value->rValue = model->BSIM4v4fprout; return(OK); case BSIM4v4_MOD_PDITS: value->rValue = model->BSIM4v4pdits; return(OK); case BSIM4v4_MOD_PDITSD: value->rValue = model->BSIM4v4pditsd; return(OK); case BSIM4v4_MOD_PDITSL: value->rValue = model->BSIM4v4pditsl; return(OK); case BSIM4v4_MOD_DELTA: value->rValue = model->BSIM4v4delta; return(OK); case BSIM4v4_MOD_RDSW: value->rValue = model->BSIM4v4rdsw; return(OK); case BSIM4v4_MOD_RDSWMIN: value->rValue = model->BSIM4v4rdswmin; return(OK); case BSIM4v4_MOD_RDWMIN: value->rValue = model->BSIM4v4rdwmin; return(OK); case BSIM4v4_MOD_RSWMIN: value->rValue = model->BSIM4v4rswmin; return(OK); case BSIM4v4_MOD_RDW: value->rValue = model->BSIM4v4rdw; return(OK); case BSIM4v4_MOD_RSW: value->rValue = model->BSIM4v4rsw; return(OK); case BSIM4v4_MOD_PRWG: value->rValue = model->BSIM4v4prwg; return(OK); case BSIM4v4_MOD_PRWB: value->rValue = model->BSIM4v4prwb; return(OK); case BSIM4v4_MOD_PRT: value->rValue = model->BSIM4v4prt; return(OK); case BSIM4v4_MOD_ETA0: value->rValue = model->BSIM4v4eta0; return(OK); case BSIM4v4_MOD_ETAB: value->rValue = model->BSIM4v4etab; return(OK); case BSIM4v4_MOD_PCLM: value->rValue = model->BSIM4v4pclm; return(OK); case BSIM4v4_MOD_PDIBL1: value->rValue = model->BSIM4v4pdibl1; return(OK); case BSIM4v4_MOD_PDIBL2: value->rValue = model->BSIM4v4pdibl2; return(OK); case BSIM4v4_MOD_PDIBLB: value->rValue = model->BSIM4v4pdiblb; return(OK); case BSIM4v4_MOD_PSCBE1: value->rValue = model->BSIM4v4pscbe1; return(OK); case BSIM4v4_MOD_PSCBE2: value->rValue = model->BSIM4v4pscbe2; return(OK); case BSIM4v4_MOD_PVAG: value->rValue = model->BSIM4v4pvag; return(OK); case BSIM4v4_MOD_WR: value->rValue = model->BSIM4v4wr; return(OK); case BSIM4v4_MOD_DWG: value->rValue = model->BSIM4v4dwg; return(OK); case BSIM4v4_MOD_DWB: value->rValue = model->BSIM4v4dwb; return(OK); case BSIM4v4_MOD_B0: value->rValue = model->BSIM4v4b0; return(OK); case BSIM4v4_MOD_B1: value->rValue = model->BSIM4v4b1; return(OK); case BSIM4v4_MOD_ALPHA0: value->rValue = model->BSIM4v4alpha0; return(OK); case BSIM4v4_MOD_ALPHA1: value->rValue = model->BSIM4v4alpha1; return(OK); case BSIM4v4_MOD_BETA0: value->rValue = model->BSIM4v4beta0; return(OK); case BSIM4v4_MOD_AGIDL: value->rValue = model->BSIM4v4agidl; return(OK); case BSIM4v4_MOD_BGIDL: value->rValue = model->BSIM4v4bgidl; return(OK); case BSIM4v4_MOD_CGIDL: value->rValue = model->BSIM4v4cgidl; return(OK); case BSIM4v4_MOD_EGIDL: value->rValue = model->BSIM4v4egidl; return(OK); case BSIM4v4_MOD_AIGC: value->rValue = model->BSIM4v4aigc; return(OK); case BSIM4v4_MOD_BIGC: value->rValue = model->BSIM4v4bigc; return(OK); case BSIM4v4_MOD_CIGC: value->rValue = model->BSIM4v4cigc; return(OK); case BSIM4v4_MOD_AIGSD: value->rValue = model->BSIM4v4aigsd; return(OK); case BSIM4v4_MOD_BIGSD: value->rValue = model->BSIM4v4bigsd; return(OK); case BSIM4v4_MOD_CIGSD: value->rValue = model->BSIM4v4cigsd; return(OK); case BSIM4v4_MOD_AIGBACC: value->rValue = model->BSIM4v4aigbacc; return(OK); case BSIM4v4_MOD_BIGBACC: value->rValue = model->BSIM4v4bigbacc; return(OK); case BSIM4v4_MOD_CIGBACC: value->rValue = model->BSIM4v4cigbacc; return(OK); case BSIM4v4_MOD_AIGBINV: value->rValue = model->BSIM4v4aigbinv; return(OK); case BSIM4v4_MOD_BIGBINV: value->rValue = model->BSIM4v4bigbinv; return(OK); case BSIM4v4_MOD_CIGBINV: value->rValue = model->BSIM4v4cigbinv; return(OK); case BSIM4v4_MOD_NIGC: value->rValue = model->BSIM4v4nigc; return(OK); case BSIM4v4_MOD_NIGBACC: value->rValue = model->BSIM4v4nigbacc; return(OK); case BSIM4v4_MOD_NIGBINV: value->rValue = model->BSIM4v4nigbinv; return(OK); case BSIM4v4_MOD_NTOX: value->rValue = model->BSIM4v4ntox; return(OK); case BSIM4v4_MOD_EIGBINV: value->rValue = model->BSIM4v4eigbinv; return(OK); case BSIM4v4_MOD_PIGCD: value->rValue = model->BSIM4v4pigcd; return(OK); case BSIM4v4_MOD_POXEDGE: value->rValue = model->BSIM4v4poxedge; return(OK); case BSIM4v4_MOD_PHIN: value->rValue = model->BSIM4v4phin; return(OK); case BSIM4v4_MOD_XRCRG1: value->rValue = model->BSIM4v4xrcrg1; return(OK); case BSIM4v4_MOD_XRCRG2: value->rValue = model->BSIM4v4xrcrg2; return(OK); case BSIM4v4_MOD_TNOIA: value->rValue = model->BSIM4v4tnoia; return(OK); case BSIM4v4_MOD_TNOIB: value->rValue = model->BSIM4v4tnoib; return(OK); case BSIM4v4_MOD_RNOIA: value->rValue = model->BSIM4v4rnoia; return(OK); case BSIM4v4_MOD_RNOIB: value->rValue = model->BSIM4v4rnoib; return(OK); case BSIM4v4_MOD_NTNOI: value->rValue = model->BSIM4v4ntnoi; return(OK); case BSIM4v4_MOD_IJTHDFWD: value->rValue = model->BSIM4v4ijthdfwd; return(OK); case BSIM4v4_MOD_IJTHSFWD: value->rValue = model->BSIM4v4ijthsfwd; return(OK); case BSIM4v4_MOD_IJTHDREV: value->rValue = model->BSIM4v4ijthdrev; return(OK); case BSIM4v4_MOD_IJTHSREV: value->rValue = model->BSIM4v4ijthsrev; return(OK); case BSIM4v4_MOD_XJBVD: value->rValue = model->BSIM4v4xjbvd; return(OK); case BSIM4v4_MOD_XJBVS: value->rValue = model->BSIM4v4xjbvs; return(OK); case BSIM4v4_MOD_BVD: value->rValue = model->BSIM4v4bvd; return(OK); case BSIM4v4_MOD_BVS: value->rValue = model->BSIM4v4bvs; return(OK); case BSIM4v4_MOD_VFB: value->rValue = model->BSIM4v4vfb; return(OK); case BSIM4v4_MOD_GBMIN: value->rValue = model->BSIM4v4gbmin; return(OK); case BSIM4v4_MOD_RBDB: value->rValue = model->BSIM4v4rbdb; return(OK); case BSIM4v4_MOD_RBPB: value->rValue = model->BSIM4v4rbpb; return(OK); case BSIM4v4_MOD_RBSB: value->rValue = model->BSIM4v4rbsb; return(OK); case BSIM4v4_MOD_RBPS: value->rValue = model->BSIM4v4rbps; return(OK); case BSIM4v4_MOD_RBPD: value->rValue = model->BSIM4v4rbpd; return(OK); case BSIM4v4_MOD_CGSL: value->rValue = model->BSIM4v4cgsl; return(OK); case BSIM4v4_MOD_CGDL: value->rValue = model->BSIM4v4cgdl; return(OK); case BSIM4v4_MOD_CKAPPAS: value->rValue = model->BSIM4v4ckappas; return(OK); case BSIM4v4_MOD_CKAPPAD: value->rValue = model->BSIM4v4ckappad; return(OK); case BSIM4v4_MOD_CF: value->rValue = model->BSIM4v4cf; return(OK); case BSIM4v4_MOD_CLC: value->rValue = model->BSIM4v4clc; return(OK); case BSIM4v4_MOD_CLE: value->rValue = model->BSIM4v4cle; return(OK); case BSIM4v4_MOD_DWC: value->rValue = model->BSIM4v4dwc; return(OK); case BSIM4v4_MOD_DLC: value->rValue = model->BSIM4v4dlc; return(OK); case BSIM4v4_MOD_XW: value->rValue = model->BSIM4v4xw; return(OK); case BSIM4v4_MOD_XL: value->rValue = model->BSIM4v4xl; return(OK); case BSIM4v4_MOD_DLCIG: value->rValue = model->BSIM4v4dlcig; return(OK); case BSIM4v4_MOD_DWJ: value->rValue = model->BSIM4v4dwj; return(OK); case BSIM4v4_MOD_VFBCV: value->rValue = model->BSIM4v4vfbcv; return(OK); case BSIM4v4_MOD_ACDE: value->rValue = model->BSIM4v4acde; return(OK); case BSIM4v4_MOD_MOIN: value->rValue = model->BSIM4v4moin; return(OK); case BSIM4v4_MOD_NOFF: value->rValue = model->BSIM4v4noff; return(OK); case BSIM4v4_MOD_VOFFCV: value->rValue = model->BSIM4v4voffcv; return(OK); case BSIM4v4_MOD_DMCG: value->rValue = model->BSIM4v4dmcg; return(OK); case BSIM4v4_MOD_DMCI: value->rValue = model->BSIM4v4dmci; return(OK); case BSIM4v4_MOD_DMDG: value->rValue = model->BSIM4v4dmdg; return(OK); case BSIM4v4_MOD_DMCGT: value->rValue = model->BSIM4v4dmcgt; return(OK); case BSIM4v4_MOD_XGW: value->rValue = model->BSIM4v4xgw; return(OK); case BSIM4v4_MOD_XGL: value->rValue = model->BSIM4v4xgl; return(OK); case BSIM4v4_MOD_RSHG: value->rValue = model->BSIM4v4rshg; return(OK); case BSIM4v4_MOD_NGCON: value->rValue = model->BSIM4v4ngcon; return(OK); case BSIM4v4_MOD_TCJ: value->rValue = model->BSIM4v4tcj; return(OK); case BSIM4v4_MOD_TPB: value->rValue = model->BSIM4v4tpb; return(OK); case BSIM4v4_MOD_TCJSW: value->rValue = model->BSIM4v4tcjsw; return(OK); case BSIM4v4_MOD_TPBSW: value->rValue = model->BSIM4v4tpbsw; return(OK); case BSIM4v4_MOD_TCJSWG: value->rValue = model->BSIM4v4tcjswg; return(OK); case BSIM4v4_MOD_TPBSWG: value->rValue = model->BSIM4v4tpbswg; return(OK); /* Length dependence */ case BSIM4v4_MOD_LCDSC : value->rValue = model->BSIM4v4lcdsc; return(OK); case BSIM4v4_MOD_LCDSCB : value->rValue = model->BSIM4v4lcdscb; return(OK); case BSIM4v4_MOD_LCDSCD : value->rValue = model->BSIM4v4lcdscd; return(OK); case BSIM4v4_MOD_LCIT : value->rValue = model->BSIM4v4lcit; return(OK); case BSIM4v4_MOD_LNFACTOR : value->rValue = model->BSIM4v4lnfactor; return(OK); case BSIM4v4_MOD_LXJ: value->rValue = model->BSIM4v4lxj; return(OK); case BSIM4v4_MOD_LVSAT: value->rValue = model->BSIM4v4lvsat; return(OK); case BSIM4v4_MOD_LAT: value->rValue = model->BSIM4v4lat; return(OK); case BSIM4v4_MOD_LA0: value->rValue = model->BSIM4v4la0; return(OK); case BSIM4v4_MOD_LAGS: value->rValue = model->BSIM4v4lags; return(OK); case BSIM4v4_MOD_LA1: value->rValue = model->BSIM4v4la1; return(OK); case BSIM4v4_MOD_LA2: value->rValue = model->BSIM4v4la2; return(OK); case BSIM4v4_MOD_LKETA: value->rValue = model->BSIM4v4lketa; return(OK); case BSIM4v4_MOD_LNSUB: value->rValue = model->BSIM4v4lnsub; return(OK); case BSIM4v4_MOD_LNDEP: value->rValue = model->BSIM4v4lndep; return(OK); case BSIM4v4_MOD_LNSD: value->rValue = model->BSIM4v4lnsd; return(OK); case BSIM4v4_MOD_LNGATE: value->rValue = model->BSIM4v4lngate; return(OK); case BSIM4v4_MOD_LGAMMA1: value->rValue = model->BSIM4v4lgamma1; return(OK); case BSIM4v4_MOD_LGAMMA2: value->rValue = model->BSIM4v4lgamma2; return(OK); case BSIM4v4_MOD_LVBX: value->rValue = model->BSIM4v4lvbx; return(OK); case BSIM4v4_MOD_LVBM: value->rValue = model->BSIM4v4lvbm; return(OK); case BSIM4v4_MOD_LXT: value->rValue = model->BSIM4v4lxt; return(OK); case BSIM4v4_MOD_LK1: value->rValue = model->BSIM4v4lk1; return(OK); case BSIM4v4_MOD_LKT1: value->rValue = model->BSIM4v4lkt1; return(OK); case BSIM4v4_MOD_LKT1L: value->rValue = model->BSIM4v4lkt1l; return(OK); case BSIM4v4_MOD_LKT2 : value->rValue = model->BSIM4v4lkt2; return(OK); case BSIM4v4_MOD_LK2 : value->rValue = model->BSIM4v4lk2; return(OK); case BSIM4v4_MOD_LK3: value->rValue = model->BSIM4v4lk3; return(OK); case BSIM4v4_MOD_LK3B: value->rValue = model->BSIM4v4lk3b; return(OK); case BSIM4v4_MOD_LW0: value->rValue = model->BSIM4v4lw0; return(OK); case BSIM4v4_MOD_LLPE0: value->rValue = model->BSIM4v4llpe0; return(OK); case BSIM4v4_MOD_LLPEB: value->rValue = model->BSIM4v4llpeb; return(OK); case BSIM4v4_MOD_LDVTP0: value->rValue = model->BSIM4v4ldvtp0; return(OK); case BSIM4v4_MOD_LDVTP1: value->rValue = model->BSIM4v4ldvtp1; return(OK); case BSIM4v4_MOD_LDVT0: value->rValue = model->BSIM4v4ldvt0; return(OK); case BSIM4v4_MOD_LDVT1 : value->rValue = model->BSIM4v4ldvt1; return(OK); case BSIM4v4_MOD_LDVT2 : value->rValue = model->BSIM4v4ldvt2; return(OK); case BSIM4v4_MOD_LDVT0W : value->rValue = model->BSIM4v4ldvt0w; return(OK); case BSIM4v4_MOD_LDVT1W : value->rValue = model->BSIM4v4ldvt1w; return(OK); case BSIM4v4_MOD_LDVT2W : value->rValue = model->BSIM4v4ldvt2w; return(OK); case BSIM4v4_MOD_LDROUT : value->rValue = model->BSIM4v4ldrout; return(OK); case BSIM4v4_MOD_LDSUB : value->rValue = model->BSIM4v4ldsub; return(OK); case BSIM4v4_MOD_LVTH0: value->rValue = model->BSIM4v4lvth0; return(OK); case BSIM4v4_MOD_LUA: value->rValue = model->BSIM4v4lua; return(OK); case BSIM4v4_MOD_LUA1: value->rValue = model->BSIM4v4lua1; return(OK); case BSIM4v4_MOD_LUB: value->rValue = model->BSIM4v4lub; return(OK); case BSIM4v4_MOD_LUB1: value->rValue = model->BSIM4v4lub1; return(OK); case BSIM4v4_MOD_LUC: value->rValue = model->BSIM4v4luc; return(OK); case BSIM4v4_MOD_LUC1: value->rValue = model->BSIM4v4luc1; return(OK); case BSIM4v4_MOD_LU0: value->rValue = model->BSIM4v4lu0; return(OK); case BSIM4v4_MOD_LUTE: value->rValue = model->BSIM4v4lute; return(OK); case BSIM4v4_MOD_LVOFF: value->rValue = model->BSIM4v4lvoff; return(OK); case BSIM4v4_MOD_LMINV: value->rValue = model->BSIM4v4lminv; return(OK); case BSIM4v4_MOD_LFPROUT: value->rValue = model->BSIM4v4lfprout; return(OK); case BSIM4v4_MOD_LPDITS: value->rValue = model->BSIM4v4lpdits; return(OK); case BSIM4v4_MOD_LPDITSD: value->rValue = model->BSIM4v4lpditsd; return(OK); case BSIM4v4_MOD_LDELTA: value->rValue = model->BSIM4v4ldelta; return(OK); case BSIM4v4_MOD_LRDSW: value->rValue = model->BSIM4v4lrdsw; return(OK); case BSIM4v4_MOD_LRDW: value->rValue = model->BSIM4v4lrdw; return(OK); case BSIM4v4_MOD_LRSW: value->rValue = model->BSIM4v4lrsw; return(OK); case BSIM4v4_MOD_LPRWB: value->rValue = model->BSIM4v4lprwb; return(OK); case BSIM4v4_MOD_LPRWG: value->rValue = model->BSIM4v4lprwg; return(OK); case BSIM4v4_MOD_LPRT: value->rValue = model->BSIM4v4lprt; return(OK); case BSIM4v4_MOD_LETA0: value->rValue = model->BSIM4v4leta0; return(OK); case BSIM4v4_MOD_LETAB: value->rValue = model->BSIM4v4letab; return(OK); case BSIM4v4_MOD_LPCLM: value->rValue = model->BSIM4v4lpclm; return(OK); case BSIM4v4_MOD_LPDIBL1: value->rValue = model->BSIM4v4lpdibl1; return(OK); case BSIM4v4_MOD_LPDIBL2: value->rValue = model->BSIM4v4lpdibl2; return(OK); case BSIM4v4_MOD_LPDIBLB: value->rValue = model->BSIM4v4lpdiblb; return(OK); case BSIM4v4_MOD_LPSCBE1: value->rValue = model->BSIM4v4lpscbe1; return(OK); case BSIM4v4_MOD_LPSCBE2: value->rValue = model->BSIM4v4lpscbe2; return(OK); case BSIM4v4_MOD_LPVAG: value->rValue = model->BSIM4v4lpvag; return(OK); case BSIM4v4_MOD_LWR: value->rValue = model->BSIM4v4lwr; return(OK); case BSIM4v4_MOD_LDWG: value->rValue = model->BSIM4v4ldwg; return(OK); case BSIM4v4_MOD_LDWB: value->rValue = model->BSIM4v4ldwb; return(OK); case BSIM4v4_MOD_LB0: value->rValue = model->BSIM4v4lb0; return(OK); case BSIM4v4_MOD_LB1: value->rValue = model->BSIM4v4lb1; return(OK); case BSIM4v4_MOD_LALPHA0: value->rValue = model->BSIM4v4lalpha0; return(OK); case BSIM4v4_MOD_LALPHA1: value->rValue = model->BSIM4v4lalpha1; return(OK); case BSIM4v4_MOD_LBETA0: value->rValue = model->BSIM4v4lbeta0; return(OK); case BSIM4v4_MOD_LAGIDL: value->rValue = model->BSIM4v4lagidl; return(OK); case BSIM4v4_MOD_LBGIDL: value->rValue = model->BSIM4v4lbgidl; return(OK); case BSIM4v4_MOD_LCGIDL: value->rValue = model->BSIM4v4lcgidl; return(OK); case BSIM4v4_MOD_LEGIDL: value->rValue = model->BSIM4v4legidl; return(OK); case BSIM4v4_MOD_LAIGC: value->rValue = model->BSIM4v4laigc; return(OK); case BSIM4v4_MOD_LBIGC: value->rValue = model->BSIM4v4lbigc; return(OK); case BSIM4v4_MOD_LCIGC: value->rValue = model->BSIM4v4lcigc; return(OK); case BSIM4v4_MOD_LAIGSD: value->rValue = model->BSIM4v4laigsd; return(OK); case BSIM4v4_MOD_LBIGSD: value->rValue = model->BSIM4v4lbigsd; return(OK); case BSIM4v4_MOD_LCIGSD: value->rValue = model->BSIM4v4lcigsd; return(OK); case BSIM4v4_MOD_LAIGBACC: value->rValue = model->BSIM4v4laigbacc; return(OK); case BSIM4v4_MOD_LBIGBACC: value->rValue = model->BSIM4v4lbigbacc; return(OK); case BSIM4v4_MOD_LCIGBACC: value->rValue = model->BSIM4v4lcigbacc; return(OK); case BSIM4v4_MOD_LAIGBINV: value->rValue = model->BSIM4v4laigbinv; return(OK); case BSIM4v4_MOD_LBIGBINV: value->rValue = model->BSIM4v4lbigbinv; return(OK); case BSIM4v4_MOD_LCIGBINV: value->rValue = model->BSIM4v4lcigbinv; return(OK); case BSIM4v4_MOD_LNIGC: value->rValue = model->BSIM4v4lnigc; return(OK); case BSIM4v4_MOD_LNIGBACC: value->rValue = model->BSIM4v4lnigbacc; return(OK); case BSIM4v4_MOD_LNIGBINV: value->rValue = model->BSIM4v4lnigbinv; return(OK); case BSIM4v4_MOD_LNTOX: value->rValue = model->BSIM4v4lntox; return(OK); case BSIM4v4_MOD_LEIGBINV: value->rValue = model->BSIM4v4leigbinv; return(OK); case BSIM4v4_MOD_LPIGCD: value->rValue = model->BSIM4v4lpigcd; return(OK); case BSIM4v4_MOD_LPOXEDGE: value->rValue = model->BSIM4v4lpoxedge; return(OK); case BSIM4v4_MOD_LPHIN: value->rValue = model->BSIM4v4lphin; return(OK); case BSIM4v4_MOD_LXRCRG1: value->rValue = model->BSIM4v4lxrcrg1; return(OK); case BSIM4v4_MOD_LXRCRG2: value->rValue = model->BSIM4v4lxrcrg2; return(OK); case BSIM4v4_MOD_LEU: value->rValue = model->BSIM4v4leu; return(OK); case BSIM4v4_MOD_LVFB: value->rValue = model->BSIM4v4lvfb; return(OK); case BSIM4v4_MOD_LCGSL: value->rValue = model->BSIM4v4lcgsl; return(OK); case BSIM4v4_MOD_LCGDL: value->rValue = model->BSIM4v4lcgdl; return(OK); case BSIM4v4_MOD_LCKAPPAS: value->rValue = model->BSIM4v4lckappas; return(OK); case BSIM4v4_MOD_LCKAPPAD: value->rValue = model->BSIM4v4lckappad; return(OK); case BSIM4v4_MOD_LCF: value->rValue = model->BSIM4v4lcf; return(OK); case BSIM4v4_MOD_LCLC: value->rValue = model->BSIM4v4lclc; return(OK); case BSIM4v4_MOD_LCLE: value->rValue = model->BSIM4v4lcle; return(OK); case BSIM4v4_MOD_LVFBCV: value->rValue = model->BSIM4v4lvfbcv; return(OK); case BSIM4v4_MOD_LACDE: value->rValue = model->BSIM4v4lacde; return(OK); case BSIM4v4_MOD_LMOIN: value->rValue = model->BSIM4v4lmoin; return(OK); case BSIM4v4_MOD_LNOFF: value->rValue = model->BSIM4v4lnoff; return(OK); case BSIM4v4_MOD_LVOFFCV: value->rValue = model->BSIM4v4lvoffcv; return(OK); /* Width dependence */ case BSIM4v4_MOD_WCDSC : value->rValue = model->BSIM4v4wcdsc; return(OK); case BSIM4v4_MOD_WCDSCB : value->rValue = model->BSIM4v4wcdscb; return(OK); case BSIM4v4_MOD_WCDSCD : value->rValue = model->BSIM4v4wcdscd; return(OK); case BSIM4v4_MOD_WCIT : value->rValue = model->BSIM4v4wcit; return(OK); case BSIM4v4_MOD_WNFACTOR : value->rValue = model->BSIM4v4wnfactor; return(OK); case BSIM4v4_MOD_WXJ: value->rValue = model->BSIM4v4wxj; return(OK); case BSIM4v4_MOD_WVSAT: value->rValue = model->BSIM4v4wvsat; return(OK); case BSIM4v4_MOD_WAT: value->rValue = model->BSIM4v4wat; return(OK); case BSIM4v4_MOD_WA0: value->rValue = model->BSIM4v4wa0; return(OK); case BSIM4v4_MOD_WAGS: value->rValue = model->BSIM4v4wags; return(OK); case BSIM4v4_MOD_WA1: value->rValue = model->BSIM4v4wa1; return(OK); case BSIM4v4_MOD_WA2: value->rValue = model->BSIM4v4wa2; return(OK); case BSIM4v4_MOD_WKETA: value->rValue = model->BSIM4v4wketa; return(OK); case BSIM4v4_MOD_WNSUB: value->rValue = model->BSIM4v4wnsub; return(OK); case BSIM4v4_MOD_WNDEP: value->rValue = model->BSIM4v4wndep; return(OK); case BSIM4v4_MOD_WNSD: value->rValue = model->BSIM4v4wnsd; return(OK); case BSIM4v4_MOD_WNGATE: value->rValue = model->BSIM4v4wngate; return(OK); case BSIM4v4_MOD_WGAMMA1: value->rValue = model->BSIM4v4wgamma1; return(OK); case BSIM4v4_MOD_WGAMMA2: value->rValue = model->BSIM4v4wgamma2; return(OK); case BSIM4v4_MOD_WVBX: value->rValue = model->BSIM4v4wvbx; return(OK); case BSIM4v4_MOD_WVBM: value->rValue = model->BSIM4v4wvbm; return(OK); case BSIM4v4_MOD_WXT: value->rValue = model->BSIM4v4wxt; return(OK); case BSIM4v4_MOD_WK1: value->rValue = model->BSIM4v4wk1; return(OK); case BSIM4v4_MOD_WKT1: value->rValue = model->BSIM4v4wkt1; return(OK); case BSIM4v4_MOD_WKT1L: value->rValue = model->BSIM4v4wkt1l; return(OK); case BSIM4v4_MOD_WKT2 : value->rValue = model->BSIM4v4wkt2; return(OK); case BSIM4v4_MOD_WK2 : value->rValue = model->BSIM4v4wk2; return(OK); case BSIM4v4_MOD_WK3: value->rValue = model->BSIM4v4wk3; return(OK); case BSIM4v4_MOD_WK3B: value->rValue = model->BSIM4v4wk3b; return(OK); case BSIM4v4_MOD_WW0: value->rValue = model->BSIM4v4ww0; return(OK); case BSIM4v4_MOD_WLPE0: value->rValue = model->BSIM4v4wlpe0; return(OK); case BSIM4v4_MOD_WDVTP0: value->rValue = model->BSIM4v4wdvtp0; return(OK); case BSIM4v4_MOD_WDVTP1: value->rValue = model->BSIM4v4wdvtp1; return(OK); case BSIM4v4_MOD_WLPEB: value->rValue = model->BSIM4v4wlpeb; return(OK); case BSIM4v4_MOD_WDVT0: value->rValue = model->BSIM4v4wdvt0; return(OK); case BSIM4v4_MOD_WDVT1 : value->rValue = model->BSIM4v4wdvt1; return(OK); case BSIM4v4_MOD_WDVT2 : value->rValue = model->BSIM4v4wdvt2; return(OK); case BSIM4v4_MOD_WDVT0W : value->rValue = model->BSIM4v4wdvt0w; return(OK); case BSIM4v4_MOD_WDVT1W : value->rValue = model->BSIM4v4wdvt1w; return(OK); case BSIM4v4_MOD_WDVT2W : value->rValue = model->BSIM4v4wdvt2w; return(OK); case BSIM4v4_MOD_WDROUT : value->rValue = model->BSIM4v4wdrout; return(OK); case BSIM4v4_MOD_WDSUB : value->rValue = model->BSIM4v4wdsub; return(OK); case BSIM4v4_MOD_WVTH0: value->rValue = model->BSIM4v4wvth0; return(OK); case BSIM4v4_MOD_WUA: value->rValue = model->BSIM4v4wua; return(OK); case BSIM4v4_MOD_WUA1: value->rValue = model->BSIM4v4wua1; return(OK); case BSIM4v4_MOD_WUB: value->rValue = model->BSIM4v4wub; return(OK); case BSIM4v4_MOD_WUB1: value->rValue = model->BSIM4v4wub1; return(OK); case BSIM4v4_MOD_WUC: value->rValue = model->BSIM4v4wuc; return(OK); case BSIM4v4_MOD_WUC1: value->rValue = model->BSIM4v4wuc1; return(OK); case BSIM4v4_MOD_WU0: value->rValue = model->BSIM4v4wu0; return(OK); case BSIM4v4_MOD_WUTE: value->rValue = model->BSIM4v4wute; return(OK); case BSIM4v4_MOD_WVOFF: value->rValue = model->BSIM4v4wvoff; return(OK); case BSIM4v4_MOD_WMINV: value->rValue = model->BSIM4v4wminv; return(OK); case BSIM4v4_MOD_WFPROUT: value->rValue = model->BSIM4v4wfprout; return(OK); case BSIM4v4_MOD_WPDITS: value->rValue = model->BSIM4v4wpdits; return(OK); case BSIM4v4_MOD_WPDITSD: value->rValue = model->BSIM4v4wpditsd; return(OK); case BSIM4v4_MOD_WDELTA: value->rValue = model->BSIM4v4wdelta; return(OK); case BSIM4v4_MOD_WRDSW: value->rValue = model->BSIM4v4wrdsw; return(OK); case BSIM4v4_MOD_WRDW: value->rValue = model->BSIM4v4wrdw; return(OK); case BSIM4v4_MOD_WRSW: value->rValue = model->BSIM4v4wrsw; return(OK); case BSIM4v4_MOD_WPRWB: value->rValue = model->BSIM4v4wprwb; return(OK); case BSIM4v4_MOD_WPRWG: value->rValue = model->BSIM4v4wprwg; return(OK); case BSIM4v4_MOD_WPRT: value->rValue = model->BSIM4v4wprt; return(OK); case BSIM4v4_MOD_WETA0: value->rValue = model->BSIM4v4weta0; return(OK); case BSIM4v4_MOD_WETAB: value->rValue = model->BSIM4v4wetab; return(OK); case BSIM4v4_MOD_WPCLM: value->rValue = model->BSIM4v4wpclm; return(OK); case BSIM4v4_MOD_WPDIBL1: value->rValue = model->BSIM4v4wpdibl1; return(OK); case BSIM4v4_MOD_WPDIBL2: value->rValue = model->BSIM4v4wpdibl2; return(OK); case BSIM4v4_MOD_WPDIBLB: value->rValue = model->BSIM4v4wpdiblb; return(OK); case BSIM4v4_MOD_WPSCBE1: value->rValue = model->BSIM4v4wpscbe1; return(OK); case BSIM4v4_MOD_WPSCBE2: value->rValue = model->BSIM4v4wpscbe2; return(OK); case BSIM4v4_MOD_WPVAG: value->rValue = model->BSIM4v4wpvag; return(OK); case BSIM4v4_MOD_WWR: value->rValue = model->BSIM4v4wwr; return(OK); case BSIM4v4_MOD_WDWG: value->rValue = model->BSIM4v4wdwg; return(OK); case BSIM4v4_MOD_WDWB: value->rValue = model->BSIM4v4wdwb; return(OK); case BSIM4v4_MOD_WB0: value->rValue = model->BSIM4v4wb0; return(OK); case BSIM4v4_MOD_WB1: value->rValue = model->BSIM4v4wb1; return(OK); case BSIM4v4_MOD_WALPHA0: value->rValue = model->BSIM4v4walpha0; return(OK); case BSIM4v4_MOD_WALPHA1: value->rValue = model->BSIM4v4walpha1; return(OK); case BSIM4v4_MOD_WBETA0: value->rValue = model->BSIM4v4wbeta0; return(OK); case BSIM4v4_MOD_WAGIDL: value->rValue = model->BSIM4v4wagidl; return(OK); case BSIM4v4_MOD_WBGIDL: value->rValue = model->BSIM4v4wbgidl; return(OK); case BSIM4v4_MOD_WCGIDL: value->rValue = model->BSIM4v4wcgidl; return(OK); case BSIM4v4_MOD_WEGIDL: value->rValue = model->BSIM4v4wegidl; return(OK); case BSIM4v4_MOD_WAIGC: value->rValue = model->BSIM4v4waigc; return(OK); case BSIM4v4_MOD_WBIGC: value->rValue = model->BSIM4v4wbigc; return(OK); case BSIM4v4_MOD_WCIGC: value->rValue = model->BSIM4v4wcigc; return(OK); case BSIM4v4_MOD_WAIGSD: value->rValue = model->BSIM4v4waigsd; return(OK); case BSIM4v4_MOD_WBIGSD: value->rValue = model->BSIM4v4wbigsd; return(OK); case BSIM4v4_MOD_WCIGSD: value->rValue = model->BSIM4v4wcigsd; return(OK); case BSIM4v4_MOD_WAIGBACC: value->rValue = model->BSIM4v4waigbacc; return(OK); case BSIM4v4_MOD_WBIGBACC: value->rValue = model->BSIM4v4wbigbacc; return(OK); case BSIM4v4_MOD_WCIGBACC: value->rValue = model->BSIM4v4wcigbacc; return(OK); case BSIM4v4_MOD_WAIGBINV: value->rValue = model->BSIM4v4waigbinv; return(OK); case BSIM4v4_MOD_WBIGBINV: value->rValue = model->BSIM4v4wbigbinv; return(OK); case BSIM4v4_MOD_WCIGBINV: value->rValue = model->BSIM4v4wcigbinv; return(OK); case BSIM4v4_MOD_WNIGC: value->rValue = model->BSIM4v4wnigc; return(OK); case BSIM4v4_MOD_WNIGBACC: value->rValue = model->BSIM4v4wnigbacc; return(OK); case BSIM4v4_MOD_WNIGBINV: value->rValue = model->BSIM4v4wnigbinv; return(OK); case BSIM4v4_MOD_WNTOX: value->rValue = model->BSIM4v4wntox; return(OK); case BSIM4v4_MOD_WEIGBINV: value->rValue = model->BSIM4v4weigbinv; return(OK); case BSIM4v4_MOD_WPIGCD: value->rValue = model->BSIM4v4wpigcd; return(OK); case BSIM4v4_MOD_WPOXEDGE: value->rValue = model->BSIM4v4wpoxedge; return(OK); case BSIM4v4_MOD_WPHIN: value->rValue = model->BSIM4v4wphin; return(OK); case BSIM4v4_MOD_WXRCRG1: value->rValue = model->BSIM4v4wxrcrg1; return(OK); case BSIM4v4_MOD_WXRCRG2: value->rValue = model->BSIM4v4wxrcrg2; return(OK); case BSIM4v4_MOD_WEU: value->rValue = model->BSIM4v4weu; return(OK); case BSIM4v4_MOD_WVFB: value->rValue = model->BSIM4v4wvfb; return(OK); case BSIM4v4_MOD_WCGSL: value->rValue = model->BSIM4v4wcgsl; return(OK); case BSIM4v4_MOD_WCGDL: value->rValue = model->BSIM4v4wcgdl; return(OK); case BSIM4v4_MOD_WCKAPPAS: value->rValue = model->BSIM4v4wckappas; return(OK); case BSIM4v4_MOD_WCKAPPAD: value->rValue = model->BSIM4v4wckappad; return(OK); case BSIM4v4_MOD_WCF: value->rValue = model->BSIM4v4wcf; return(OK); case BSIM4v4_MOD_WCLC: value->rValue = model->BSIM4v4wclc; return(OK); case BSIM4v4_MOD_WCLE: value->rValue = model->BSIM4v4wcle; return(OK); case BSIM4v4_MOD_WVFBCV: value->rValue = model->BSIM4v4wvfbcv; return(OK); case BSIM4v4_MOD_WACDE: value->rValue = model->BSIM4v4wacde; return(OK); case BSIM4v4_MOD_WMOIN: value->rValue = model->BSIM4v4wmoin; return(OK); case BSIM4v4_MOD_WNOFF: value->rValue = model->BSIM4v4wnoff; return(OK); case BSIM4v4_MOD_WVOFFCV: value->rValue = model->BSIM4v4wvoffcv; return(OK); /* Cross-term dependence */ case BSIM4v4_MOD_PCDSC : value->rValue = model->BSIM4v4pcdsc; return(OK); case BSIM4v4_MOD_PCDSCB : value->rValue = model->BSIM4v4pcdscb; return(OK); case BSIM4v4_MOD_PCDSCD : value->rValue = model->BSIM4v4pcdscd; return(OK); case BSIM4v4_MOD_PCIT : value->rValue = model->BSIM4v4pcit; return(OK); case BSIM4v4_MOD_PNFACTOR : value->rValue = model->BSIM4v4pnfactor; return(OK); case BSIM4v4_MOD_PXJ: value->rValue = model->BSIM4v4pxj; return(OK); case BSIM4v4_MOD_PVSAT: value->rValue = model->BSIM4v4pvsat; return(OK); case BSIM4v4_MOD_PAT: value->rValue = model->BSIM4v4pat; return(OK); case BSIM4v4_MOD_PA0: value->rValue = model->BSIM4v4pa0; return(OK); case BSIM4v4_MOD_PAGS: value->rValue = model->BSIM4v4pags; return(OK); case BSIM4v4_MOD_PA1: value->rValue = model->BSIM4v4pa1; return(OK); case BSIM4v4_MOD_PA2: value->rValue = model->BSIM4v4pa2; return(OK); case BSIM4v4_MOD_PKETA: value->rValue = model->BSIM4v4pketa; return(OK); case BSIM4v4_MOD_PNSUB: value->rValue = model->BSIM4v4pnsub; return(OK); case BSIM4v4_MOD_PNDEP: value->rValue = model->BSIM4v4pndep; return(OK); case BSIM4v4_MOD_PNSD: value->rValue = model->BSIM4v4pnsd; return(OK); case BSIM4v4_MOD_PNGATE: value->rValue = model->BSIM4v4pngate; return(OK); case BSIM4v4_MOD_PGAMMA1: value->rValue = model->BSIM4v4pgamma1; return(OK); case BSIM4v4_MOD_PGAMMA2: value->rValue = model->BSIM4v4pgamma2; return(OK); case BSIM4v4_MOD_PVBX: value->rValue = model->BSIM4v4pvbx; return(OK); case BSIM4v4_MOD_PVBM: value->rValue = model->BSIM4v4pvbm; return(OK); case BSIM4v4_MOD_PXT: value->rValue = model->BSIM4v4pxt; return(OK); case BSIM4v4_MOD_PK1: value->rValue = model->BSIM4v4pk1; return(OK); case BSIM4v4_MOD_PKT1: value->rValue = model->BSIM4v4pkt1; return(OK); case BSIM4v4_MOD_PKT1L: value->rValue = model->BSIM4v4pkt1l; return(OK); case BSIM4v4_MOD_PKT2 : value->rValue = model->BSIM4v4pkt2; return(OK); case BSIM4v4_MOD_PK2 : value->rValue = model->BSIM4v4pk2; return(OK); case BSIM4v4_MOD_PK3: value->rValue = model->BSIM4v4pk3; return(OK); case BSIM4v4_MOD_PK3B: value->rValue = model->BSIM4v4pk3b; return(OK); case BSIM4v4_MOD_PW0: value->rValue = model->BSIM4v4pw0; return(OK); case BSIM4v4_MOD_PLPE0: value->rValue = model->BSIM4v4plpe0; return(OK); case BSIM4v4_MOD_PLPEB: value->rValue = model->BSIM4v4plpeb; return(OK); case BSIM4v4_MOD_PDVTP0: value->rValue = model->BSIM4v4pdvtp0; return(OK); case BSIM4v4_MOD_PDVTP1: value->rValue = model->BSIM4v4pdvtp1; return(OK); case BSIM4v4_MOD_PDVT0 : value->rValue = model->BSIM4v4pdvt0; return(OK); case BSIM4v4_MOD_PDVT1 : value->rValue = model->BSIM4v4pdvt1; return(OK); case BSIM4v4_MOD_PDVT2 : value->rValue = model->BSIM4v4pdvt2; return(OK); case BSIM4v4_MOD_PDVT0W : value->rValue = model->BSIM4v4pdvt0w; return(OK); case BSIM4v4_MOD_PDVT1W : value->rValue = model->BSIM4v4pdvt1w; return(OK); case BSIM4v4_MOD_PDVT2W : value->rValue = model->BSIM4v4pdvt2w; return(OK); case BSIM4v4_MOD_PDROUT : value->rValue = model->BSIM4v4pdrout; return(OK); case BSIM4v4_MOD_PDSUB : value->rValue = model->BSIM4v4pdsub; return(OK); case BSIM4v4_MOD_PVTH0: value->rValue = model->BSIM4v4pvth0; return(OK); case BSIM4v4_MOD_PUA: value->rValue = model->BSIM4v4pua; return(OK); case BSIM4v4_MOD_PUA1: value->rValue = model->BSIM4v4pua1; return(OK); case BSIM4v4_MOD_PUB: value->rValue = model->BSIM4v4pub; return(OK); case BSIM4v4_MOD_PUB1: value->rValue = model->BSIM4v4pub1; return(OK); case BSIM4v4_MOD_PUC: value->rValue = model->BSIM4v4puc; return(OK); case BSIM4v4_MOD_PUC1: value->rValue = model->BSIM4v4puc1; return(OK); case BSIM4v4_MOD_PU0: value->rValue = model->BSIM4v4pu0; return(OK); case BSIM4v4_MOD_PUTE: value->rValue = model->BSIM4v4pute; return(OK); case BSIM4v4_MOD_PVOFF: value->rValue = model->BSIM4v4pvoff; return(OK); case BSIM4v4_MOD_PMINV: value->rValue = model->BSIM4v4pminv; return(OK); case BSIM4v4_MOD_PFPROUT: value->rValue = model->BSIM4v4pfprout; return(OK); case BSIM4v4_MOD_PPDITS: value->rValue = model->BSIM4v4ppdits; return(OK); case BSIM4v4_MOD_PPDITSD: value->rValue = model->BSIM4v4ppditsd; return(OK); case BSIM4v4_MOD_PDELTA: value->rValue = model->BSIM4v4pdelta; return(OK); case BSIM4v4_MOD_PRDSW: value->rValue = model->BSIM4v4prdsw; return(OK); case BSIM4v4_MOD_PRDW: value->rValue = model->BSIM4v4prdw; return(OK); case BSIM4v4_MOD_PRSW: value->rValue = model->BSIM4v4prsw; return(OK); case BSIM4v4_MOD_PPRWB: value->rValue = model->BSIM4v4pprwb; return(OK); case BSIM4v4_MOD_PPRWG: value->rValue = model->BSIM4v4pprwg; return(OK); case BSIM4v4_MOD_PPRT: value->rValue = model->BSIM4v4pprt; return(OK); case BSIM4v4_MOD_PETA0: value->rValue = model->BSIM4v4peta0; return(OK); case BSIM4v4_MOD_PETAB: value->rValue = model->BSIM4v4petab; return(OK); case BSIM4v4_MOD_PPCLM: value->rValue = model->BSIM4v4ppclm; return(OK); case BSIM4v4_MOD_PPDIBL1: value->rValue = model->BSIM4v4ppdibl1; return(OK); case BSIM4v4_MOD_PPDIBL2: value->rValue = model->BSIM4v4ppdibl2; return(OK); case BSIM4v4_MOD_PPDIBLB: value->rValue = model->BSIM4v4ppdiblb; return(OK); case BSIM4v4_MOD_PPSCBE1: value->rValue = model->BSIM4v4ppscbe1; return(OK); case BSIM4v4_MOD_PPSCBE2: value->rValue = model->BSIM4v4ppscbe2; return(OK); case BSIM4v4_MOD_PPVAG: value->rValue = model->BSIM4v4ppvag; return(OK); case BSIM4v4_MOD_PWR: value->rValue = model->BSIM4v4pwr; return(OK); case BSIM4v4_MOD_PDWG: value->rValue = model->BSIM4v4pdwg; return(OK); case BSIM4v4_MOD_PDWB: value->rValue = model->BSIM4v4pdwb; return(OK); case BSIM4v4_MOD_PB0: value->rValue = model->BSIM4v4pb0; return(OK); case BSIM4v4_MOD_PB1: value->rValue = model->BSIM4v4pb1; return(OK); case BSIM4v4_MOD_PALPHA0: value->rValue = model->BSIM4v4palpha0; return(OK); case BSIM4v4_MOD_PALPHA1: value->rValue = model->BSIM4v4palpha1; return(OK); case BSIM4v4_MOD_PBETA0: value->rValue = model->BSIM4v4pbeta0; return(OK); case BSIM4v4_MOD_PAGIDL: value->rValue = model->BSIM4v4pagidl; return(OK); case BSIM4v4_MOD_PBGIDL: value->rValue = model->BSIM4v4pbgidl; return(OK); case BSIM4v4_MOD_PCGIDL: value->rValue = model->BSIM4v4pcgidl; return(OK); case BSIM4v4_MOD_PEGIDL: value->rValue = model->BSIM4v4pegidl; return(OK); case BSIM4v4_MOD_PAIGC: value->rValue = model->BSIM4v4paigc; return(OK); case BSIM4v4_MOD_PBIGC: value->rValue = model->BSIM4v4pbigc; return(OK); case BSIM4v4_MOD_PCIGC: value->rValue = model->BSIM4v4pcigc; return(OK); case BSIM4v4_MOD_PAIGSD: value->rValue = model->BSIM4v4paigsd; return(OK); case BSIM4v4_MOD_PBIGSD: value->rValue = model->BSIM4v4pbigsd; return(OK); case BSIM4v4_MOD_PCIGSD: value->rValue = model->BSIM4v4pcigsd; return(OK); case BSIM4v4_MOD_PAIGBACC: value->rValue = model->BSIM4v4paigbacc; return(OK); case BSIM4v4_MOD_PBIGBACC: value->rValue = model->BSIM4v4pbigbacc; return(OK); case BSIM4v4_MOD_PCIGBACC: value->rValue = model->BSIM4v4pcigbacc; return(OK); case BSIM4v4_MOD_PAIGBINV: value->rValue = model->BSIM4v4paigbinv; return(OK); case BSIM4v4_MOD_PBIGBINV: value->rValue = model->BSIM4v4pbigbinv; return(OK); case BSIM4v4_MOD_PCIGBINV: value->rValue = model->BSIM4v4pcigbinv; return(OK); case BSIM4v4_MOD_PNIGC: value->rValue = model->BSIM4v4pnigc; return(OK); case BSIM4v4_MOD_PNIGBACC: value->rValue = model->BSIM4v4pnigbacc; return(OK); case BSIM4v4_MOD_PNIGBINV: value->rValue = model->BSIM4v4pnigbinv; return(OK); case BSIM4v4_MOD_PNTOX: value->rValue = model->BSIM4v4pntox; return(OK); case BSIM4v4_MOD_PEIGBINV: value->rValue = model->BSIM4v4peigbinv; return(OK); case BSIM4v4_MOD_PPIGCD: value->rValue = model->BSIM4v4ppigcd; return(OK); case BSIM4v4_MOD_PPOXEDGE: value->rValue = model->BSIM4v4ppoxedge; return(OK); case BSIM4v4_MOD_PPHIN: value->rValue = model->BSIM4v4pphin; return(OK); case BSIM4v4_MOD_PXRCRG1: value->rValue = model->BSIM4v4pxrcrg1; return(OK); case BSIM4v4_MOD_PXRCRG2: value->rValue = model->BSIM4v4pxrcrg2; return(OK); case BSIM4v4_MOD_PEU: value->rValue = model->BSIM4v4peu; return(OK); case BSIM4v4_MOD_PVFB: value->rValue = model->BSIM4v4pvfb; return(OK); case BSIM4v4_MOD_PCGSL: value->rValue = model->BSIM4v4pcgsl; return(OK); case BSIM4v4_MOD_PCGDL: value->rValue = model->BSIM4v4pcgdl; return(OK); case BSIM4v4_MOD_PCKAPPAS: value->rValue = model->BSIM4v4pckappas; return(OK); case BSIM4v4_MOD_PCKAPPAD: value->rValue = model->BSIM4v4pckappad; return(OK); case BSIM4v4_MOD_PCF: value->rValue = model->BSIM4v4pcf; return(OK); case BSIM4v4_MOD_PCLC: value->rValue = model->BSIM4v4pclc; return(OK); case BSIM4v4_MOD_PCLE: value->rValue = model->BSIM4v4pcle; return(OK); case BSIM4v4_MOD_PVFBCV: value->rValue = model->BSIM4v4pvfbcv; return(OK); case BSIM4v4_MOD_PACDE: value->rValue = model->BSIM4v4pacde; return(OK); case BSIM4v4_MOD_PMOIN: value->rValue = model->BSIM4v4pmoin; return(OK); case BSIM4v4_MOD_PNOFF: value->rValue = model->BSIM4v4pnoff; return(OK); case BSIM4v4_MOD_PVOFFCV: value->rValue = model->BSIM4v4pvoffcv; return(OK); case BSIM4v4_MOD_TNOM : value->rValue = model->BSIM4v4tnom; return(OK); case BSIM4v4_MOD_CGSO: value->rValue = model->BSIM4v4cgso; return(OK); case BSIM4v4_MOD_CGDO: value->rValue = model->BSIM4v4cgdo; return(OK); case BSIM4v4_MOD_CGBO: value->rValue = model->BSIM4v4cgbo; return(OK); case BSIM4v4_MOD_XPART: value->rValue = model->BSIM4v4xpart; return(OK); case BSIM4v4_MOD_RSH: value->rValue = model->BSIM4v4sheetResistance; return(OK); case BSIM4v4_MOD_JSS: value->rValue = model->BSIM4v4SjctSatCurDensity; return(OK); case BSIM4v4_MOD_JSWS: value->rValue = model->BSIM4v4SjctSidewallSatCurDensity; return(OK); case BSIM4v4_MOD_JSWGS: value->rValue = model->BSIM4v4SjctGateSidewallSatCurDensity; return(OK); case BSIM4v4_MOD_PBS: value->rValue = model->BSIM4v4SbulkJctPotential; return(OK); case BSIM4v4_MOD_MJS: value->rValue = model->BSIM4v4SbulkJctBotGradingCoeff; return(OK); case BSIM4v4_MOD_PBSWS: value->rValue = model->BSIM4v4SsidewallJctPotential; return(OK); case BSIM4v4_MOD_MJSWS: value->rValue = model->BSIM4v4SbulkJctSideGradingCoeff; return(OK); case BSIM4v4_MOD_CJS: value->rValue = model->BSIM4v4SunitAreaJctCap; return(OK); case BSIM4v4_MOD_CJSWS: value->rValue = model->BSIM4v4SunitLengthSidewallJctCap; return(OK); case BSIM4v4_MOD_PBSWGS: value->rValue = model->BSIM4v4SGatesidewallJctPotential; return(OK); case BSIM4v4_MOD_MJSWGS: value->rValue = model->BSIM4v4SbulkJctGateSideGradingCoeff; return(OK); case BSIM4v4_MOD_CJSWGS: value->rValue = model->BSIM4v4SunitLengthGateSidewallJctCap; return(OK); case BSIM4v4_MOD_NJS: value->rValue = model->BSIM4v4SjctEmissionCoeff; return(OK); case BSIM4v4_MOD_XTIS: value->rValue = model->BSIM4v4SjctTempExponent; return(OK); case BSIM4v4_MOD_JSD: value->rValue = model->BSIM4v4DjctSatCurDensity; return(OK); case BSIM4v4_MOD_JSWD: value->rValue = model->BSIM4v4DjctSidewallSatCurDensity; return(OK); case BSIM4v4_MOD_JSWGD: value->rValue = model->BSIM4v4DjctGateSidewallSatCurDensity; return(OK); case BSIM4v4_MOD_PBD: value->rValue = model->BSIM4v4DbulkJctPotential; return(OK); case BSIM4v4_MOD_MJD: value->rValue = model->BSIM4v4DbulkJctBotGradingCoeff; return(OK); case BSIM4v4_MOD_PBSWD: value->rValue = model->BSIM4v4DsidewallJctPotential; return(OK); case BSIM4v4_MOD_MJSWD: value->rValue = model->BSIM4v4DbulkJctSideGradingCoeff; return(OK); case BSIM4v4_MOD_CJD: value->rValue = model->BSIM4v4DunitAreaJctCap; return(OK); case BSIM4v4_MOD_CJSWD: value->rValue = model->BSIM4v4DunitLengthSidewallJctCap; return(OK); case BSIM4v4_MOD_PBSWGD: value->rValue = model->BSIM4v4DGatesidewallJctPotential; return(OK); case BSIM4v4_MOD_MJSWGD: value->rValue = model->BSIM4v4DbulkJctGateSideGradingCoeff; return(OK); case BSIM4v4_MOD_CJSWGD: value->rValue = model->BSIM4v4DunitLengthGateSidewallJctCap; return(OK); case BSIM4v4_MOD_NJD: value->rValue = model->BSIM4v4DjctEmissionCoeff; return(OK); case BSIM4v4_MOD_XTID: value->rValue = model->BSIM4v4DjctTempExponent; return(OK); case BSIM4v4_MOD_LINT: value->rValue = model->BSIM4v4Lint; return(OK); case BSIM4v4_MOD_LL: value->rValue = model->BSIM4v4Ll; return(OK); case BSIM4v4_MOD_LLC: value->rValue = model->BSIM4v4Llc; return(OK); case BSIM4v4_MOD_LLN: value->rValue = model->BSIM4v4Lln; return(OK); case BSIM4v4_MOD_LW: value->rValue = model->BSIM4v4Lw; return(OK); case BSIM4v4_MOD_LWC: value->rValue = model->BSIM4v4Lwc; return(OK); case BSIM4v4_MOD_LWN: value->rValue = model->BSIM4v4Lwn; return(OK); case BSIM4v4_MOD_LWL: value->rValue = model->BSIM4v4Lwl; return(OK); case BSIM4v4_MOD_LWLC: value->rValue = model->BSIM4v4Lwlc; return(OK); case BSIM4v4_MOD_LMIN: value->rValue = model->BSIM4v4Lmin; return(OK); case BSIM4v4_MOD_LMAX: value->rValue = model->BSIM4v4Lmax; return(OK); case BSIM4v4_MOD_WINT: value->rValue = model->BSIM4v4Wint; return(OK); case BSIM4v4_MOD_WL: value->rValue = model->BSIM4v4Wl; return(OK); case BSIM4v4_MOD_WLC: value->rValue = model->BSIM4v4Wlc; return(OK); case BSIM4v4_MOD_WLN: value->rValue = model->BSIM4v4Wln; return(OK); case BSIM4v4_MOD_WW: value->rValue = model->BSIM4v4Ww; return(OK); case BSIM4v4_MOD_WWC: value->rValue = model->BSIM4v4Wwc; return(OK); case BSIM4v4_MOD_WWN: value->rValue = model->BSIM4v4Wwn; return(OK); case BSIM4v4_MOD_WWL: value->rValue = model->BSIM4v4Wwl; return(OK); case BSIM4v4_MOD_WWLC: value->rValue = model->BSIM4v4Wwlc; return(OK); case BSIM4v4_MOD_WMIN: value->rValue = model->BSIM4v4Wmin; return(OK); case BSIM4v4_MOD_WMAX: value->rValue = model->BSIM4v4Wmax; return(OK); /* stress effect */ case BSIM4v4_MOD_SAREF: value->rValue = model->BSIM4v4saref; return(OK); case BSIM4v4_MOD_SBREF: value->rValue = model->BSIM4v4sbref; return(OK); case BSIM4v4_MOD_WLOD: value->rValue = model->BSIM4v4wlod; return(OK); case BSIM4v4_MOD_KU0: value->rValue = model->BSIM4v4ku0; return(OK); case BSIM4v4_MOD_KVSAT: value->rValue = model->BSIM4v4kvsat; return(OK); case BSIM4v4_MOD_KVTH0: value->rValue = model->BSIM4v4kvth0; return(OK); case BSIM4v4_MOD_TKU0: value->rValue = model->BSIM4v4tku0; return(OK); case BSIM4v4_MOD_LLODKU0: value->rValue = model->BSIM4v4llodku0; return(OK); case BSIM4v4_MOD_WLODKU0: value->rValue = model->BSIM4v4wlodku0; return(OK); case BSIM4v4_MOD_LLODVTH: value->rValue = model->BSIM4v4llodvth; return(OK); case BSIM4v4_MOD_WLODVTH: value->rValue = model->BSIM4v4wlodvth; return(OK); case BSIM4v4_MOD_LKU0: value->rValue = model->BSIM4v4lku0; return(OK); case BSIM4v4_MOD_WKU0: value->rValue = model->BSIM4v4wku0; return(OK); case BSIM4v4_MOD_PKU0: value->rValue = model->BSIM4v4pku0; return(OK); case BSIM4v4_MOD_LKVTH0: value->rValue = model->BSIM4v4lkvth0; return(OK); case BSIM4v4_MOD_WKVTH0: value->rValue = model->BSIM4v4wkvth0; return(OK); case BSIM4v4_MOD_PKVTH0: value->rValue = model->BSIM4v4pkvth0; return(OK); case BSIM4v4_MOD_STK2: value->rValue = model->BSIM4v4stk2; return(OK); case BSIM4v4_MOD_LODK2: value->rValue = model->BSIM4v4lodk2; return(OK); case BSIM4v4_MOD_STETA0: value->rValue = model->BSIM4v4steta0; return(OK); case BSIM4v4_MOD_LODETA0: value->rValue = model->BSIM4v4lodeta0; return(OK); case BSIM4v4_MOD_NOIA: value->rValue = model->BSIM4v4oxideTrapDensityA; return(OK); case BSIM4v4_MOD_NOIB: value->rValue = model->BSIM4v4oxideTrapDensityB; return(OK); case BSIM4v4_MOD_NOIC: value->rValue = model->BSIM4v4oxideTrapDensityC; return(OK); case BSIM4v4_MOD_EM: value->rValue = model->BSIM4v4em; return(OK); case BSIM4v4_MOD_EF: value->rValue = model->BSIM4v4ef; return(OK); case BSIM4v4_MOD_AF: value->rValue = model->BSIM4v4af; return(OK); case BSIM4v4_MOD_KF: value->rValue = model->BSIM4v4kf; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v4/b4v4cvtest.c0000644000265600020320000002203512264261473021702 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4cvtest.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4convTest( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; double delvbd, delvbs, delvds, delvgd, delvgs; double delvdbd, delvsbs; double delvbd_jct, delvbs_jct; double vds, vgs, vgd, vgdo, vbs, vbd; double vdbd, vdbs, vsbs; double cbhat, cdhat, Idtot, Ibtot; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double tol0, tol1, tol2, tol3, tol4, tol5, tol6; for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here != NULL ; here=here->BSIM4v4nextInstance) { vds = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vgs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vdbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dbNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vsbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4sbNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vses = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4sNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vdes = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vgdo = *(ckt->CKTstate0 + here->BSIM4v4vgs) - *(ckt->CKTstate0 + here->BSIM4v4vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v4vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v4vdbd); delvgd = vgd - vgdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v4vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v4vgs); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v4vbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v4vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v4vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v4vdes) - *(ckt->CKTstate0 + here->BSIM4v4vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v4vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v4rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v4rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v4mode >= 0) { Idtot = here->BSIM4v4cd + here->BSIM4v4csub - here->BSIM4v4cbd + here->BSIM4v4Igidl; cdhat = Idtot - here->BSIM4v4gbd * delvbd_jct + (here->BSIM4v4gmbs + here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs + (here->BSIM4v4gm + here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + (here->BSIM4v4gds + here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds; Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcs; cgshat = Igstot + (here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg) * delvgs + here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbs; Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcd; cgdhat = Igdtot + here->BSIM4v4gIgdg * delvgd + here->BSIM4v4gIgcdg * delvgs + here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbs; Igbtot = here->BSIM4v4Igb; cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgs + here->BSIM4v4gIgbd * delvds + here->BSIM4v4gIgbb * delvbs; } else { Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gmbs * delvbd + here->BSIM4v4gm * delvgd - (here->BSIM4v4gds + here->BSIM4v4ggidls) * delvds - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcd; cgshat = Igstot + here->BSIM4v4gIgsg * delvgs + here->BSIM4v4gIgcdg * delvgd - here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbd; Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcs; cgdhat = Igdtot + (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * delvgd - here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbd; Igbtot = here->BSIM4v4Igb; cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgd - here->BSIM4v4gIgbd * delvds + here->BSIM4v4gIgbb * delvbd; } Isestot = here->BSIM4v4gstot * (*(ckt->CKTstate0 + here->BSIM4v4vses)); cseshat = Isestot + here->BSIM4v4gstot * delvses + here->BSIM4v4gstotd * delvds + here->BSIM4v4gstotg * delvgs + here->BSIM4v4gstotb * delvbs; Idedtot = here->BSIM4v4gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v4gdtot * delvded + here->BSIM4v4gdtotd * delvds + here->BSIM4v4gdtotg * delvgs + here->BSIM4v4gdtotb * delvbs; /* * Check convergence */ if ((here->BSIM4v4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; return(OK); } if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; return(OK); } Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; if (here->BSIM4v4mode >= 0) { cbhat = Ibtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gbs * delvbs_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs - (here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds - here->BSIM4v4ggislg * delvgd - here->BSIM4v4ggislb* delvbd + here->BSIM4v4ggisls * delvds ; } else { cbhat = Ibtot + here->BSIM4v4gbs * delvbs_jct + here->BSIM4v4gbd * delvbd_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * delvbd - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * delvgd + (here->BSIM4v4gbds + here->BSIM4v4ggisld - here->BSIM4v4ggidls) * delvds - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; return(OK); } } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4temp.c0000644000265600020320000030526112264261473021344 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4temp.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #define Kb 1.3806226e-23 #define KboQ 8.617087e-5 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define Charge_q 1.60219e-19 #define DELTA 1.0E-9 #define DEXP(A,B) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ } else { \ B = exp(A); \ } \ } static int BSIM4v4DioIjthVjmEval( double Nvtm, double Ijth, double Isb, double XExpBV, double *Vjm) { double Tb, Tc, EVjmovNv; Tc = XExpBV; Tb = 1.0 + Ijth / Isb - Tc; EVjmovNv = 0.5 * (Tb + sqrt(Tb * Tb + 4.0 * Tc)); *Vjm = Nvtm * log(EVjmovNv); return 0; } int BSIM4v4temp( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v4model *model = (BSIM4v4model*) inModel; BSIM4v4instance *here; struct bsim4SizeDependParam *pSizeDependParamKnot, *pLastKnot, *pParam=NULL; double tmp, tmp1, tmp2, tmp3, Eg, Eg0, ni; double T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, Lnew=0.0, Wnew; double delTemp, Temp, TRatio, Inv_L, Inv_W, Inv_LW, Vtm0=0.0, Tnom; double dumPs, dumPd, dumAs, dumAd, PowWeffWr; double DMCGeff, DMCIeff, DMDGeff; double Nvtms, Nvtmd, SourceSatCurrent, DrainSatCurrent; double T10; double Inv_saref, Inv_sbref, Inv_sa, Inv_sb, rho, Ldrn, dvth0_lod; double W_tmp, Inv_ODeff, OD_offset, dk2_lod, deta0_lod; int Size_Not_Found, i; /* loop through all the BSIM4v4 device models */ for (; model != NULL; model = model->BSIM4v4nextModel) { Temp = ckt->CKTtemp; if (model->BSIM4v4SbulkJctPotential < 0.1) { model->BSIM4v4SbulkJctPotential = 0.1; fprintf(stderr, "Given pbs is less than 0.1. Pbs is set to 0.1.\n"); } if (model->BSIM4v4SsidewallJctPotential < 0.1) { model->BSIM4v4SsidewallJctPotential = 0.1; fprintf(stderr, "Given pbsws is less than 0.1. Pbsws is set to 0.1.\n"); } if (model->BSIM4v4SGatesidewallJctPotential < 0.1) { model->BSIM4v4SGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgs is less than 0.1. Pbswgs is set to 0.1.\n"); } if (model->BSIM4v4DbulkJctPotential < 0.1) { model->BSIM4v4DbulkJctPotential = 0.1; fprintf(stderr, "Given pbd is less than 0.1. Pbd is set to 0.1.\n"); } if (model->BSIM4v4DsidewallJctPotential < 0.1) { model->BSIM4v4DsidewallJctPotential = 0.1; fprintf(stderr, "Given pbswd is less than 0.1. Pbswd is set to 0.1.\n"); } if (model->BSIM4v4DGatesidewallJctPotential < 0.1) { model->BSIM4v4DGatesidewallJctPotential = 0.1; fprintf(stderr, "Given pbswgd is less than 0.1. Pbswgd is set to 0.1.\n"); } if ((model->BSIM4v4toxeGiven) && (model->BSIM4v4toxpGiven) && (model->BSIM4v4dtoxGiven) && (model->BSIM4v4toxe != (model->BSIM4v4toxp + model->BSIM4v4dtox))) printf("Warning: toxe, toxp and dtox all given and toxe != toxp + dtox; dtox ignored.\n"); else if ((model->BSIM4v4toxeGiven) && (!model->BSIM4v4toxpGiven)) model->BSIM4v4toxp = model->BSIM4v4toxe - model->BSIM4v4dtox; else if ((!model->BSIM4v4toxeGiven) && (model->BSIM4v4toxpGiven)) model->BSIM4v4toxe = model->BSIM4v4toxp + model->BSIM4v4dtox; model->BSIM4v4coxe = model->BSIM4v4epsrox * EPS0 / model->BSIM4v4toxe; model->BSIM4v4coxp = model->BSIM4v4epsrox * EPS0 / model->BSIM4v4toxp; if (!model->BSIM4v4cgdoGiven) { if (model->BSIM4v4dlcGiven && (model->BSIM4v4dlc > 0.0)) model->BSIM4v4cgdo = model->BSIM4v4dlc * model->BSIM4v4coxe - model->BSIM4v4cgdl ; else model->BSIM4v4cgdo = 0.6 * model->BSIM4v4xj * model->BSIM4v4coxe; } if (!model->BSIM4v4cgsoGiven) { if (model->BSIM4v4dlcGiven && (model->BSIM4v4dlc > 0.0)) model->BSIM4v4cgso = model->BSIM4v4dlc * model->BSIM4v4coxe - model->BSIM4v4cgsl ; else model->BSIM4v4cgso = 0.6 * model->BSIM4v4xj * model->BSIM4v4coxe; } if (!model->BSIM4v4cgboGiven) model->BSIM4v4cgbo = 2.0 * model->BSIM4v4dwc * model->BSIM4v4coxe; model->pSizeDependParamKnot = NULL; pLastKnot = NULL; Tnom = model->BSIM4v4tnom; TRatio = Temp / Tnom; model->BSIM4v4vcrit = CONSTvt0 * log(CONSTvt0 / (CONSTroot2 * 1.0e-14)); model->BSIM4v4factor1 = sqrt(EPSSI / (model->BSIM4v4epsrox * EPS0) * model->BSIM4v4toxe); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: Vtm0 = KboQ * Tnom; break; case BSIM4v40: Vtm0 = model->BSIM4v4vtm0 = KboQ * Tnom; break; default: break; } Eg0 = 1.16 - 7.02e-4 * Tnom * Tnom / (Tnom + 1108.0); ni = 1.45e10 * (Tnom / 300.15) * sqrt(Tnom / 300.15) * exp(21.5565981 - Eg0 / (2.0 * Vtm0)); model->BSIM4v4vtm = KboQ * Temp; Eg = 1.16 - 7.02e-4 * Temp * Temp / (Temp + 1108.0); if (Temp != Tnom) { T0 = Eg0 / Vtm0 - Eg / model->BSIM4v4vtm; T1 = log(Temp / Tnom); T2 = T0 + model->BSIM4v4SjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v4SjctEmissionCoeff); model->BSIM4v4SjctTempSatCurDensity = model->BSIM4v4SjctSatCurDensity * T3; model->BSIM4v4SjctSidewallTempSatCurDensity = model->BSIM4v4SjctSidewallSatCurDensity * T3; model->BSIM4v4SjctGateSidewallTempSatCurDensity = model->BSIM4v4SjctGateSidewallSatCurDensity * T3; T2 = T0 + model->BSIM4v4DjctTempExponent * T1; T3 = exp(T2 / model->BSIM4v4DjctEmissionCoeff); model->BSIM4v4DjctTempSatCurDensity = model->BSIM4v4DjctSatCurDensity * T3; model->BSIM4v4DjctSidewallTempSatCurDensity = model->BSIM4v4DjctSidewallSatCurDensity * T3; model->BSIM4v4DjctGateSidewallTempSatCurDensity = model->BSIM4v4DjctGateSidewallSatCurDensity * T3; } else { model->BSIM4v4SjctTempSatCurDensity = model->BSIM4v4SjctSatCurDensity; model->BSIM4v4SjctSidewallTempSatCurDensity = model->BSIM4v4SjctSidewallSatCurDensity; model->BSIM4v4SjctGateSidewallTempSatCurDensity = model->BSIM4v4SjctGateSidewallSatCurDensity; model->BSIM4v4DjctTempSatCurDensity = model->BSIM4v4DjctSatCurDensity; model->BSIM4v4DjctSidewallTempSatCurDensity = model->BSIM4v4DjctSidewallSatCurDensity; model->BSIM4v4DjctGateSidewallTempSatCurDensity = model->BSIM4v4DjctGateSidewallSatCurDensity; } if (model->BSIM4v4SjctTempSatCurDensity < 0.0) model->BSIM4v4SjctTempSatCurDensity = 0.0; if (model->BSIM4v4SjctSidewallTempSatCurDensity < 0.0) model->BSIM4v4SjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v4SjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v4SjctGateSidewallTempSatCurDensity = 0.0; if (model->BSIM4v4DjctTempSatCurDensity < 0.0) model->BSIM4v4DjctTempSatCurDensity = 0.0; if (model->BSIM4v4DjctSidewallTempSatCurDensity < 0.0) model->BSIM4v4DjctSidewallTempSatCurDensity = 0.0; if (model->BSIM4v4DjctGateSidewallTempSatCurDensity < 0.0) model->BSIM4v4DjctGateSidewallTempSatCurDensity = 0.0; /* Temperature dependence of D/B and S/B diode capacitance begins */ delTemp = ckt->CKTtemp - model->BSIM4v4tnom; T0 = model->BSIM4v4tcj * delTemp; if (T0 >= -1.0) { model->BSIM4v4SunitAreaTempJctCap = model->BSIM4v4SunitAreaJctCap *(1.0 + T0); /*bug_fix -JX */ model->BSIM4v4DunitAreaTempJctCap = model->BSIM4v4DunitAreaJctCap *(1.0 + T0); } else { if (model->BSIM4v4SunitAreaJctCap > 0.0) { model->BSIM4v4SunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjs to be negative. Cjs is clamped to zero.\n"); } if (model->BSIM4v4DunitAreaJctCap > 0.0) { model->BSIM4v4DunitAreaTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjd to be negative. Cjd is clamped to zero.\n"); } } T0 = model->BSIM4v4tcjsw * delTemp; if (T0 >= -1.0) { model->BSIM4v4SunitLengthSidewallTempJctCap = model->BSIM4v4SunitLengthSidewallJctCap *(1.0 + T0); model->BSIM4v4DunitLengthSidewallTempJctCap = model->BSIM4v4DunitLengthSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v4SunitLengthSidewallJctCap > 0.0) { model->BSIM4v4SunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjsws to be negative. Cjsws is clamped to zero.\n"); } if (model->BSIM4v4DunitLengthSidewallJctCap > 0.0) { model->BSIM4v4DunitLengthSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswd to be negative. Cjswd is clamped to zero.\n"); } } T0 = model->BSIM4v4tcjswg * delTemp; if (T0 >= -1.0) { model->BSIM4v4SunitLengthGateSidewallTempJctCap = model->BSIM4v4SunitLengthGateSidewallJctCap *(1.0 + T0); model->BSIM4v4DunitLengthGateSidewallTempJctCap = model->BSIM4v4DunitLengthGateSidewallJctCap *(1.0 + T0); } else { if (model->BSIM4v4SunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v4SunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgs to be negative. Cjswgs is clamped to zero.\n"); } if (model->BSIM4v4DunitLengthGateSidewallJctCap > 0.0) { model->BSIM4v4DunitLengthGateSidewallTempJctCap = 0.0; fprintf(stderr, "Temperature effect has caused cjswgd to be negative. Cjswgd is clamped to zero.\n"); } } model->BSIM4v4PhiBS = model->BSIM4v4SbulkJctPotential - model->BSIM4v4tpb * delTemp; if (model->BSIM4v4PhiBS < 0.01) { model->BSIM4v4PhiBS = 0.01; fprintf(stderr, "Temperature effect has caused pbs to be less than 0.01. Pbs is clamped to 0.01.\n"); } model->BSIM4v4PhiBD = model->BSIM4v4DbulkJctPotential - model->BSIM4v4tpb * delTemp; if (model->BSIM4v4PhiBD < 0.01) { model->BSIM4v4PhiBD = 0.01; fprintf(stderr, "Temperature effect has caused pbd to be less than 0.01. Pbd is clamped to 0.01.\n"); } model->BSIM4v4PhiBSWS = model->BSIM4v4SsidewallJctPotential - model->BSIM4v4tpbsw * delTemp; if (model->BSIM4v4PhiBSWS <= 0.01) { model->BSIM4v4PhiBSWS = 0.01; fprintf(stderr, "Temperature effect has caused pbsws to be less than 0.01. Pbsws is clamped to 0.01.\n"); } model->BSIM4v4PhiBSWD = model->BSIM4v4DsidewallJctPotential - model->BSIM4v4tpbsw * delTemp; if (model->BSIM4v4PhiBSWD <= 0.01) { model->BSIM4v4PhiBSWD = 0.01; fprintf(stderr, "Temperature effect has caused pbswd to be less than 0.01. Pbswd is clamped to 0.01.\n"); } model->BSIM4v4PhiBSWGS = model->BSIM4v4SGatesidewallJctPotential - model->BSIM4v4tpbswg * delTemp; if (model->BSIM4v4PhiBSWGS <= 0.01) { model->BSIM4v4PhiBSWGS = 0.01; fprintf(stderr, "Temperature effect has caused pbswgs to be less than 0.01. Pbswgs is clamped to 0.01.\n"); } model->BSIM4v4PhiBSWGD = model->BSIM4v4DGatesidewallJctPotential - model->BSIM4v4tpbswg * delTemp; if (model->BSIM4v4PhiBSWGD <= 0.01) { model->BSIM4v4PhiBSWGD = 0.01; fprintf(stderr, "Temperature effect has caused pbswgd to be less than 0.01. Pbswgd is clamped to 0.01.\n"); } /* End of junction capacitance */ if (model->BSIM4v4ijthdfwd <= 0.0) { model->BSIM4v4ijthdfwd = 0.1; fprintf(stderr, "Ijthdfwd reset to %g.\n", model->BSIM4v4ijthdfwd); } if (model->BSIM4v4ijthsfwd <= 0.0) { model->BSIM4v4ijthsfwd = 0.1; fprintf(stderr, "Ijthsfwd reset to %g.\n", model->BSIM4v4ijthsfwd); } if (model->BSIM4v4ijthdrev <= 0.0) { model->BSIM4v4ijthdrev = 0.1; fprintf(stderr, "Ijthdrev reset to %g.\n", model->BSIM4v4ijthdrev); } if (model->BSIM4v4ijthsrev <= 0.0) { model->BSIM4v4ijthsrev = 0.1; fprintf(stderr, "Ijthsrev reset to %g.\n", model->BSIM4v4ijthsrev); } if ((model->BSIM4v4xjbvd <= 0.0) && (model->BSIM4v4dioMod == 2)) { model->BSIM4v4xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v4xjbvd); } else if ((model->BSIM4v4xjbvd < 0.0) && (model->BSIM4v4dioMod == 0)) { model->BSIM4v4xjbvd = 1.0; fprintf(stderr, "Xjbvd reset to %g.\n", model->BSIM4v4xjbvd); } if (model->BSIM4v4bvd <= 0.0) { model->BSIM4v4bvd = 10.0; fprintf(stderr, "BVD reset to %g.\n", model->BSIM4v4bvd); } if ((model->BSIM4v4xjbvs <= 0.0) && (model->BSIM4v4dioMod == 2)) { model->BSIM4v4xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v4xjbvs); } else if ((model->BSIM4v4xjbvs < 0.0) && (model->BSIM4v4dioMod == 0)) { model->BSIM4v4xjbvs = 1.0; fprintf(stderr, "Xjbvs reset to %g.\n", model->BSIM4v4xjbvs); } if (model->BSIM4v4bvs <= 0.0) { model->BSIM4v4bvs = 10.0; fprintf(stderr, "BVS reset to %g.\n", model->BSIM4v4bvs); } /* loop through all the instances of the model */ for (here = model->BSIM4v4instances; here != NULL; here = here->BSIM4v4nextInstance) { pSizeDependParamKnot = model->pSizeDependParamKnot; Size_Not_Found = 1; while ((pSizeDependParamKnot != NULL) && Size_Not_Found) { if ((here->BSIM4v4l == pSizeDependParamKnot->Length) && (here->BSIM4v4w == pSizeDependParamKnot->Width) && (here->BSIM4v4nf == pSizeDependParamKnot->NFinger)) { Size_Not_Found = 0; here->pParam = pSizeDependParamKnot; pParam = here->pParam; /*bug-fix */ } else { pLastKnot = pSizeDependParamKnot; pSizeDependParamKnot = pSizeDependParamKnot->pNext; } } /* stress effect */ Ldrn = here->BSIM4v4l; if (Size_Not_Found) { pParam = TMALLOC(struct bsim4SizeDependParam, 1); if (pLastKnot == NULL) model->pSizeDependParamKnot = pParam; else pLastKnot->pNext = pParam; pParam->pNext = NULL; here->pParam = pParam; pParam->Length = here->BSIM4v4l; pParam->Width = here->BSIM4v4w; pParam->NFinger = here->BSIM4v4nf; Lnew = here->BSIM4v4l + model->BSIM4v4xl ; Wnew = here->BSIM4v4w / here->BSIM4v4nf + model->BSIM4v4xw; T0 = pow(Lnew, model->BSIM4v4Lln); T1 = pow(Wnew, model->BSIM4v4Lwn); tmp1 = model->BSIM4v4Ll / T0 + model->BSIM4v4Lw / T1 + model->BSIM4v4Lwl / (T0 * T1); pParam->BSIM4v4dl = model->BSIM4v4Lint + tmp1; tmp2 = model->BSIM4v4Llc / T0 + model->BSIM4v4Lwc / T1 + model->BSIM4v4Lwlc / (T0 * T1); pParam->BSIM4v4dlc = model->BSIM4v4dlc + tmp2; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: pParam->BSIM4v4dlcig = model->BSIM4v4dlcig + tmp2; break; case BSIM4v40: pParam->BSIM4v4dlcig = model->BSIM4v4dlcig; break; default: break; } T2 = pow(Lnew, model->BSIM4v4Wln); T3 = pow(Wnew, model->BSIM4v4Wwn); tmp1 = model->BSIM4v4Wl / T2 + model->BSIM4v4Ww / T3 + model->BSIM4v4Wwl / (T2 * T3); pParam->BSIM4v4dw = model->BSIM4v4Wint + tmp1; tmp2 = model->BSIM4v4Wlc / T2 + model->BSIM4v4Wwc / T3 + model->BSIM4v4Wwlc / (T2 * T3); pParam->BSIM4v4dwc = model->BSIM4v4dwc + tmp2; pParam->BSIM4v4dwj = model->BSIM4v4dwj + tmp2; pParam->BSIM4v4leff = Lnew - 2.0 * pParam->BSIM4v4dl; if (pParam->BSIM4v4leff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v4: mosfet %s, model %s: Effective channel length <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v4weff = Wnew - 2.0 * pParam->BSIM4v4dw; if (pParam->BSIM4v4weff <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v4: mosfet %s, model %s: Effective channel width <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v4leffCV = Lnew - 2.0 * pParam->BSIM4v4dlc; if (pParam->BSIM4v4leffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v4: mosfet %s, model %s: Effective channel length for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v4weffCV = Wnew - 2.0 * pParam->BSIM4v4dwc; if (pParam->BSIM4v4weffCV <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v4: mosfet %s, model %s: Effective channel width for C-V <= 0", namarray); return(E_BADPARM); } pParam->BSIM4v4weffCJ = Wnew - 2.0 * pParam->BSIM4v4dwj; if (pParam->BSIM4v4weffCJ <= 0.0) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; SPfrontEnd->IFerror (ERR_FATAL, "BSIM4v4: mosfet %s, model %s: Effective channel width for S/D junctions <= 0", namarray); return(E_BADPARM); } if (model->BSIM4v4binUnit == 1) { Inv_L = 1.0e-6 / pParam->BSIM4v4leff; Inv_W = 1.0e-6 / pParam->BSIM4v4weff; Inv_LW = 1.0e-12 / (pParam->BSIM4v4leff * pParam->BSIM4v4weff); } else { Inv_L = 1.0 / pParam->BSIM4v4leff; Inv_W = 1.0 / pParam->BSIM4v4weff; Inv_LW = 1.0 / (pParam->BSIM4v4leff * pParam->BSIM4v4weff); } pParam->BSIM4v4cdsc = model->BSIM4v4cdsc + model->BSIM4v4lcdsc * Inv_L + model->BSIM4v4wcdsc * Inv_W + model->BSIM4v4pcdsc * Inv_LW; pParam->BSIM4v4cdscb = model->BSIM4v4cdscb + model->BSIM4v4lcdscb * Inv_L + model->BSIM4v4wcdscb * Inv_W + model->BSIM4v4pcdscb * Inv_LW; pParam->BSIM4v4cdscd = model->BSIM4v4cdscd + model->BSIM4v4lcdscd * Inv_L + model->BSIM4v4wcdscd * Inv_W + model->BSIM4v4pcdscd * Inv_LW; pParam->BSIM4v4cit = model->BSIM4v4cit + model->BSIM4v4lcit * Inv_L + model->BSIM4v4wcit * Inv_W + model->BSIM4v4pcit * Inv_LW; pParam->BSIM4v4nfactor = model->BSIM4v4nfactor + model->BSIM4v4lnfactor * Inv_L + model->BSIM4v4wnfactor * Inv_W + model->BSIM4v4pnfactor * Inv_LW; pParam->BSIM4v4xj = model->BSIM4v4xj + model->BSIM4v4lxj * Inv_L + model->BSIM4v4wxj * Inv_W + model->BSIM4v4pxj * Inv_LW; pParam->BSIM4v4vsat = model->BSIM4v4vsat + model->BSIM4v4lvsat * Inv_L + model->BSIM4v4wvsat * Inv_W + model->BSIM4v4pvsat * Inv_LW; pParam->BSIM4v4at = model->BSIM4v4at + model->BSIM4v4lat * Inv_L + model->BSIM4v4wat * Inv_W + model->BSIM4v4pat * Inv_LW; pParam->BSIM4v4a0 = model->BSIM4v4a0 + model->BSIM4v4la0 * Inv_L + model->BSIM4v4wa0 * Inv_W + model->BSIM4v4pa0 * Inv_LW; pParam->BSIM4v4ags = model->BSIM4v4ags + model->BSIM4v4lags * Inv_L + model->BSIM4v4wags * Inv_W + model->BSIM4v4pags * Inv_LW; pParam->BSIM4v4a1 = model->BSIM4v4a1 + model->BSIM4v4la1 * Inv_L + model->BSIM4v4wa1 * Inv_W + model->BSIM4v4pa1 * Inv_LW; pParam->BSIM4v4a2 = model->BSIM4v4a2 + model->BSIM4v4la2 * Inv_L + model->BSIM4v4wa2 * Inv_W + model->BSIM4v4pa2 * Inv_LW; pParam->BSIM4v4keta = model->BSIM4v4keta + model->BSIM4v4lketa * Inv_L + model->BSIM4v4wketa * Inv_W + model->BSIM4v4pketa * Inv_LW; pParam->BSIM4v4nsub = model->BSIM4v4nsub + model->BSIM4v4lnsub * Inv_L + model->BSIM4v4wnsub * Inv_W + model->BSIM4v4pnsub * Inv_LW; pParam->BSIM4v4ndep = model->BSIM4v4ndep + model->BSIM4v4lndep * Inv_L + model->BSIM4v4wndep * Inv_W + model->BSIM4v4pndep * Inv_LW; pParam->BSIM4v4nsd = model->BSIM4v4nsd + model->BSIM4v4lnsd * Inv_L + model->BSIM4v4wnsd * Inv_W + model->BSIM4v4pnsd * Inv_LW; pParam->BSIM4v4phin = model->BSIM4v4phin + model->BSIM4v4lphin * Inv_L + model->BSIM4v4wphin * Inv_W + model->BSIM4v4pphin * Inv_LW; pParam->BSIM4v4ngate = model->BSIM4v4ngate + model->BSIM4v4lngate * Inv_L + model->BSIM4v4wngate * Inv_W + model->BSIM4v4pngate * Inv_LW; pParam->BSIM4v4gamma1 = model->BSIM4v4gamma1 + model->BSIM4v4lgamma1 * Inv_L + model->BSIM4v4wgamma1 * Inv_W + model->BSIM4v4pgamma1 * Inv_LW; pParam->BSIM4v4gamma2 = model->BSIM4v4gamma2 + model->BSIM4v4lgamma2 * Inv_L + model->BSIM4v4wgamma2 * Inv_W + model->BSIM4v4pgamma2 * Inv_LW; pParam->BSIM4v4vbx = model->BSIM4v4vbx + model->BSIM4v4lvbx * Inv_L + model->BSIM4v4wvbx * Inv_W + model->BSIM4v4pvbx * Inv_LW; pParam->BSIM4v4vbm = model->BSIM4v4vbm + model->BSIM4v4lvbm * Inv_L + model->BSIM4v4wvbm * Inv_W + model->BSIM4v4pvbm * Inv_LW; pParam->BSIM4v4xt = model->BSIM4v4xt + model->BSIM4v4lxt * Inv_L + model->BSIM4v4wxt * Inv_W + model->BSIM4v4pxt * Inv_LW; pParam->BSIM4v4vfb = model->BSIM4v4vfb + model->BSIM4v4lvfb * Inv_L + model->BSIM4v4wvfb * Inv_W + model->BSIM4v4pvfb * Inv_LW; pParam->BSIM4v4k1 = model->BSIM4v4k1 + model->BSIM4v4lk1 * Inv_L + model->BSIM4v4wk1 * Inv_W + model->BSIM4v4pk1 * Inv_LW; pParam->BSIM4v4kt1 = model->BSIM4v4kt1 + model->BSIM4v4lkt1 * Inv_L + model->BSIM4v4wkt1 * Inv_W + model->BSIM4v4pkt1 * Inv_LW; pParam->BSIM4v4kt1l = model->BSIM4v4kt1l + model->BSIM4v4lkt1l * Inv_L + model->BSIM4v4wkt1l * Inv_W + model->BSIM4v4pkt1l * Inv_LW; pParam->BSIM4v4k2 = model->BSIM4v4k2 + model->BSIM4v4lk2 * Inv_L + model->BSIM4v4wk2 * Inv_W + model->BSIM4v4pk2 * Inv_LW; pParam->BSIM4v4kt2 = model->BSIM4v4kt2 + model->BSIM4v4lkt2 * Inv_L + model->BSIM4v4wkt2 * Inv_W + model->BSIM4v4pkt2 * Inv_LW; pParam->BSIM4v4k3 = model->BSIM4v4k3 + model->BSIM4v4lk3 * Inv_L + model->BSIM4v4wk3 * Inv_W + model->BSIM4v4pk3 * Inv_LW; pParam->BSIM4v4k3b = model->BSIM4v4k3b + model->BSIM4v4lk3b * Inv_L + model->BSIM4v4wk3b * Inv_W + model->BSIM4v4pk3b * Inv_LW; pParam->BSIM4v4w0 = model->BSIM4v4w0 + model->BSIM4v4lw0 * Inv_L + model->BSIM4v4ww0 * Inv_W + model->BSIM4v4pw0 * Inv_LW; pParam->BSIM4v4lpe0 = model->BSIM4v4lpe0 + model->BSIM4v4llpe0 * Inv_L + model->BSIM4v4wlpe0 * Inv_W + model->BSIM4v4plpe0 * Inv_LW; pParam->BSIM4v4lpeb = model->BSIM4v4lpeb + model->BSIM4v4llpeb * Inv_L + model->BSIM4v4wlpeb * Inv_W + model->BSIM4v4plpeb * Inv_LW; pParam->BSIM4v4dvtp0 = model->BSIM4v4dvtp0 + model->BSIM4v4ldvtp0 * Inv_L + model->BSIM4v4wdvtp0 * Inv_W + model->BSIM4v4pdvtp0 * Inv_LW; pParam->BSIM4v4dvtp1 = model->BSIM4v4dvtp1 + model->BSIM4v4ldvtp1 * Inv_L + model->BSIM4v4wdvtp1 * Inv_W + model->BSIM4v4pdvtp1 * Inv_LW; pParam->BSIM4v4dvt0 = model->BSIM4v4dvt0 + model->BSIM4v4ldvt0 * Inv_L + model->BSIM4v4wdvt0 * Inv_W + model->BSIM4v4pdvt0 * Inv_LW; pParam->BSIM4v4dvt1 = model->BSIM4v4dvt1 + model->BSIM4v4ldvt1 * Inv_L + model->BSIM4v4wdvt1 * Inv_W + model->BSIM4v4pdvt1 * Inv_LW; pParam->BSIM4v4dvt2 = model->BSIM4v4dvt2 + model->BSIM4v4ldvt2 * Inv_L + model->BSIM4v4wdvt2 * Inv_W + model->BSIM4v4pdvt2 * Inv_LW; pParam->BSIM4v4dvt0w = model->BSIM4v4dvt0w + model->BSIM4v4ldvt0w * Inv_L + model->BSIM4v4wdvt0w * Inv_W + model->BSIM4v4pdvt0w * Inv_LW; pParam->BSIM4v4dvt1w = model->BSIM4v4dvt1w + model->BSIM4v4ldvt1w * Inv_L + model->BSIM4v4wdvt1w * Inv_W + model->BSIM4v4pdvt1w * Inv_LW; pParam->BSIM4v4dvt2w = model->BSIM4v4dvt2w + model->BSIM4v4ldvt2w * Inv_L + model->BSIM4v4wdvt2w * Inv_W + model->BSIM4v4pdvt2w * Inv_LW; pParam->BSIM4v4drout = model->BSIM4v4drout + model->BSIM4v4ldrout * Inv_L + model->BSIM4v4wdrout * Inv_W + model->BSIM4v4pdrout * Inv_LW; pParam->BSIM4v4dsub = model->BSIM4v4dsub + model->BSIM4v4ldsub * Inv_L + model->BSIM4v4wdsub * Inv_W + model->BSIM4v4pdsub * Inv_LW; pParam->BSIM4v4vth0 = model->BSIM4v4vth0 + model->BSIM4v4lvth0 * Inv_L + model->BSIM4v4wvth0 * Inv_W + model->BSIM4v4pvth0 * Inv_LW; pParam->BSIM4v4ua = model->BSIM4v4ua + model->BSIM4v4lua * Inv_L + model->BSIM4v4wua * Inv_W + model->BSIM4v4pua * Inv_LW; pParam->BSIM4v4ua1 = model->BSIM4v4ua1 + model->BSIM4v4lua1 * Inv_L + model->BSIM4v4wua1 * Inv_W + model->BSIM4v4pua1 * Inv_LW; pParam->BSIM4v4ub = model->BSIM4v4ub + model->BSIM4v4lub * Inv_L + model->BSIM4v4wub * Inv_W + model->BSIM4v4pub * Inv_LW; pParam->BSIM4v4ub1 = model->BSIM4v4ub1 + model->BSIM4v4lub1 * Inv_L + model->BSIM4v4wub1 * Inv_W + model->BSIM4v4pub1 * Inv_LW; pParam->BSIM4v4uc = model->BSIM4v4uc + model->BSIM4v4luc * Inv_L + model->BSIM4v4wuc * Inv_W + model->BSIM4v4puc * Inv_LW; pParam->BSIM4v4uc1 = model->BSIM4v4uc1 + model->BSIM4v4luc1 * Inv_L + model->BSIM4v4wuc1 * Inv_W + model->BSIM4v4puc1 * Inv_LW; pParam->BSIM4v4eu = model->BSIM4v4eu + model->BSIM4v4leu * Inv_L + model->BSIM4v4weu * Inv_W + model->BSIM4v4peu * Inv_LW; pParam->BSIM4v4u0 = model->BSIM4v4u0 + model->BSIM4v4lu0 * Inv_L + model->BSIM4v4wu0 * Inv_W + model->BSIM4v4pu0 * Inv_LW; pParam->BSIM4v4ute = model->BSIM4v4ute + model->BSIM4v4lute * Inv_L + model->BSIM4v4wute * Inv_W + model->BSIM4v4pute * Inv_LW; pParam->BSIM4v4voff = model->BSIM4v4voff + model->BSIM4v4lvoff * Inv_L + model->BSIM4v4wvoff * Inv_W + model->BSIM4v4pvoff * Inv_LW; pParam->BSIM4v4minv = model->BSIM4v4minv + model->BSIM4v4lminv * Inv_L + model->BSIM4v4wminv * Inv_W + model->BSIM4v4pminv * Inv_LW; pParam->BSIM4v4fprout = model->BSIM4v4fprout + model->BSIM4v4lfprout * Inv_L + model->BSIM4v4wfprout * Inv_W + model->BSIM4v4pfprout * Inv_LW; pParam->BSIM4v4pdits = model->BSIM4v4pdits + model->BSIM4v4lpdits * Inv_L + model->BSIM4v4wpdits * Inv_W + model->BSIM4v4ppdits * Inv_LW; pParam->BSIM4v4pditsd = model->BSIM4v4pditsd + model->BSIM4v4lpditsd * Inv_L + model->BSIM4v4wpditsd * Inv_W + model->BSIM4v4ppditsd * Inv_LW; pParam->BSIM4v4delta = model->BSIM4v4delta + model->BSIM4v4ldelta * Inv_L + model->BSIM4v4wdelta * Inv_W + model->BSIM4v4pdelta * Inv_LW; pParam->BSIM4v4rdsw = model->BSIM4v4rdsw + model->BSIM4v4lrdsw * Inv_L + model->BSIM4v4wrdsw * Inv_W + model->BSIM4v4prdsw * Inv_LW; pParam->BSIM4v4rdw = model->BSIM4v4rdw + model->BSIM4v4lrdw * Inv_L + model->BSIM4v4wrdw * Inv_W + model->BSIM4v4prdw * Inv_LW; pParam->BSIM4v4rsw = model->BSIM4v4rsw + model->BSIM4v4lrsw * Inv_L + model->BSIM4v4wrsw * Inv_W + model->BSIM4v4prsw * Inv_LW; pParam->BSIM4v4prwg = model->BSIM4v4prwg + model->BSIM4v4lprwg * Inv_L + model->BSIM4v4wprwg * Inv_W + model->BSIM4v4pprwg * Inv_LW; pParam->BSIM4v4prwb = model->BSIM4v4prwb + model->BSIM4v4lprwb * Inv_L + model->BSIM4v4wprwb * Inv_W + model->BSIM4v4pprwb * Inv_LW; pParam->BSIM4v4prt = model->BSIM4v4prt + model->BSIM4v4lprt * Inv_L + model->BSIM4v4wprt * Inv_W + model->BSIM4v4pprt * Inv_LW; pParam->BSIM4v4eta0 = model->BSIM4v4eta0 + model->BSIM4v4leta0 * Inv_L + model->BSIM4v4weta0 * Inv_W + model->BSIM4v4peta0 * Inv_LW; pParam->BSIM4v4etab = model->BSIM4v4etab + model->BSIM4v4letab * Inv_L + model->BSIM4v4wetab * Inv_W + model->BSIM4v4petab * Inv_LW; pParam->BSIM4v4pclm = model->BSIM4v4pclm + model->BSIM4v4lpclm * Inv_L + model->BSIM4v4wpclm * Inv_W + model->BSIM4v4ppclm * Inv_LW; pParam->BSIM4v4pdibl1 = model->BSIM4v4pdibl1 + model->BSIM4v4lpdibl1 * Inv_L + model->BSIM4v4wpdibl1 * Inv_W + model->BSIM4v4ppdibl1 * Inv_LW; pParam->BSIM4v4pdibl2 = model->BSIM4v4pdibl2 + model->BSIM4v4lpdibl2 * Inv_L + model->BSIM4v4wpdibl2 * Inv_W + model->BSIM4v4ppdibl2 * Inv_LW; pParam->BSIM4v4pdiblb = model->BSIM4v4pdiblb + model->BSIM4v4lpdiblb * Inv_L + model->BSIM4v4wpdiblb * Inv_W + model->BSIM4v4ppdiblb * Inv_LW; pParam->BSIM4v4pscbe1 = model->BSIM4v4pscbe1 + model->BSIM4v4lpscbe1 * Inv_L + model->BSIM4v4wpscbe1 * Inv_W + model->BSIM4v4ppscbe1 * Inv_LW; pParam->BSIM4v4pscbe2 = model->BSIM4v4pscbe2 + model->BSIM4v4lpscbe2 * Inv_L + model->BSIM4v4wpscbe2 * Inv_W + model->BSIM4v4ppscbe2 * Inv_LW; pParam->BSIM4v4pvag = model->BSIM4v4pvag + model->BSIM4v4lpvag * Inv_L + model->BSIM4v4wpvag * Inv_W + model->BSIM4v4ppvag * Inv_LW; pParam->BSIM4v4wr = model->BSIM4v4wr + model->BSIM4v4lwr * Inv_L + model->BSIM4v4wwr * Inv_W + model->BSIM4v4pwr * Inv_LW; pParam->BSIM4v4dwg = model->BSIM4v4dwg + model->BSIM4v4ldwg * Inv_L + model->BSIM4v4wdwg * Inv_W + model->BSIM4v4pdwg * Inv_LW; pParam->BSIM4v4dwb = model->BSIM4v4dwb + model->BSIM4v4ldwb * Inv_L + model->BSIM4v4wdwb * Inv_W + model->BSIM4v4pdwb * Inv_LW; pParam->BSIM4v4b0 = model->BSIM4v4b0 + model->BSIM4v4lb0 * Inv_L + model->BSIM4v4wb0 * Inv_W + model->BSIM4v4pb0 * Inv_LW; pParam->BSIM4v4b1 = model->BSIM4v4b1 + model->BSIM4v4lb1 * Inv_L + model->BSIM4v4wb1 * Inv_W + model->BSIM4v4pb1 * Inv_LW; pParam->BSIM4v4alpha0 = model->BSIM4v4alpha0 + model->BSIM4v4lalpha0 * Inv_L + model->BSIM4v4walpha0 * Inv_W + model->BSIM4v4palpha0 * Inv_LW; pParam->BSIM4v4alpha1 = model->BSIM4v4alpha1 + model->BSIM4v4lalpha1 * Inv_L + model->BSIM4v4walpha1 * Inv_W + model->BSIM4v4palpha1 * Inv_LW; pParam->BSIM4v4beta0 = model->BSIM4v4beta0 + model->BSIM4v4lbeta0 * Inv_L + model->BSIM4v4wbeta0 * Inv_W + model->BSIM4v4pbeta0 * Inv_LW; pParam->BSIM4v4agidl = model->BSIM4v4agidl + model->BSIM4v4lagidl * Inv_L + model->BSIM4v4wagidl * Inv_W + model->BSIM4v4pagidl * Inv_LW; pParam->BSIM4v4bgidl = model->BSIM4v4bgidl + model->BSIM4v4lbgidl * Inv_L + model->BSIM4v4wbgidl * Inv_W + model->BSIM4v4pbgidl * Inv_LW; pParam->BSIM4v4cgidl = model->BSIM4v4cgidl + model->BSIM4v4lcgidl * Inv_L + model->BSIM4v4wcgidl * Inv_W + model->BSIM4v4pcgidl * Inv_LW; pParam->BSIM4v4egidl = model->BSIM4v4egidl + model->BSIM4v4legidl * Inv_L + model->BSIM4v4wegidl * Inv_W + model->BSIM4v4pegidl * Inv_LW; pParam->BSIM4v4aigc = model->BSIM4v4aigc + model->BSIM4v4laigc * Inv_L + model->BSIM4v4waigc * Inv_W + model->BSIM4v4paigc * Inv_LW; pParam->BSIM4v4bigc = model->BSIM4v4bigc + model->BSIM4v4lbigc * Inv_L + model->BSIM4v4wbigc * Inv_W + model->BSIM4v4pbigc * Inv_LW; pParam->BSIM4v4cigc = model->BSIM4v4cigc + model->BSIM4v4lcigc * Inv_L + model->BSIM4v4wcigc * Inv_W + model->BSIM4v4pcigc * Inv_LW; pParam->BSIM4v4aigsd = model->BSIM4v4aigsd + model->BSIM4v4laigsd * Inv_L + model->BSIM4v4waigsd * Inv_W + model->BSIM4v4paigsd * Inv_LW; pParam->BSIM4v4bigsd = model->BSIM4v4bigsd + model->BSIM4v4lbigsd * Inv_L + model->BSIM4v4wbigsd * Inv_W + model->BSIM4v4pbigsd * Inv_LW; pParam->BSIM4v4cigsd = model->BSIM4v4cigsd + model->BSIM4v4lcigsd * Inv_L + model->BSIM4v4wcigsd * Inv_W + model->BSIM4v4pcigsd * Inv_LW; pParam->BSIM4v4aigbacc = model->BSIM4v4aigbacc + model->BSIM4v4laigbacc * Inv_L + model->BSIM4v4waigbacc * Inv_W + model->BSIM4v4paigbacc * Inv_LW; pParam->BSIM4v4bigbacc = model->BSIM4v4bigbacc + model->BSIM4v4lbigbacc * Inv_L + model->BSIM4v4wbigbacc * Inv_W + model->BSIM4v4pbigbacc * Inv_LW; pParam->BSIM4v4cigbacc = model->BSIM4v4cigbacc + model->BSIM4v4lcigbacc * Inv_L + model->BSIM4v4wcigbacc * Inv_W + model->BSIM4v4pcigbacc * Inv_LW; pParam->BSIM4v4aigbinv = model->BSIM4v4aigbinv + model->BSIM4v4laigbinv * Inv_L + model->BSIM4v4waigbinv * Inv_W + model->BSIM4v4paigbinv * Inv_LW; pParam->BSIM4v4bigbinv = model->BSIM4v4bigbinv + model->BSIM4v4lbigbinv * Inv_L + model->BSIM4v4wbigbinv * Inv_W + model->BSIM4v4pbigbinv * Inv_LW; pParam->BSIM4v4cigbinv = model->BSIM4v4cigbinv + model->BSIM4v4lcigbinv * Inv_L + model->BSIM4v4wcigbinv * Inv_W + model->BSIM4v4pcigbinv * Inv_LW; pParam->BSIM4v4nigc = model->BSIM4v4nigc + model->BSIM4v4lnigc * Inv_L + model->BSIM4v4wnigc * Inv_W + model->BSIM4v4pnigc * Inv_LW; pParam->BSIM4v4nigbacc = model->BSIM4v4nigbacc + model->BSIM4v4lnigbacc * Inv_L + model->BSIM4v4wnigbacc * Inv_W + model->BSIM4v4pnigbacc * Inv_LW; pParam->BSIM4v4nigbinv = model->BSIM4v4nigbinv + model->BSIM4v4lnigbinv * Inv_L + model->BSIM4v4wnigbinv * Inv_W + model->BSIM4v4pnigbinv * Inv_LW; pParam->BSIM4v4ntox = model->BSIM4v4ntox + model->BSIM4v4lntox * Inv_L + model->BSIM4v4wntox * Inv_W + model->BSIM4v4pntox * Inv_LW; pParam->BSIM4v4eigbinv = model->BSIM4v4eigbinv + model->BSIM4v4leigbinv * Inv_L + model->BSIM4v4weigbinv * Inv_W + model->BSIM4v4peigbinv * Inv_LW; pParam->BSIM4v4pigcd = model->BSIM4v4pigcd + model->BSIM4v4lpigcd * Inv_L + model->BSIM4v4wpigcd * Inv_W + model->BSIM4v4ppigcd * Inv_LW; pParam->BSIM4v4poxedge = model->BSIM4v4poxedge + model->BSIM4v4lpoxedge * Inv_L + model->BSIM4v4wpoxedge * Inv_W + model->BSIM4v4ppoxedge * Inv_LW; pParam->BSIM4v4xrcrg1 = model->BSIM4v4xrcrg1 + model->BSIM4v4lxrcrg1 * Inv_L + model->BSIM4v4wxrcrg1 * Inv_W + model->BSIM4v4pxrcrg1 * Inv_LW; pParam->BSIM4v4xrcrg2 = model->BSIM4v4xrcrg2 + model->BSIM4v4lxrcrg2 * Inv_L + model->BSIM4v4wxrcrg2 * Inv_W + model->BSIM4v4pxrcrg2 * Inv_LW; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: pParam->BSIM4v4lambda = model->BSIM4v4lambda + model->BSIM4v4llambda * Inv_L + model->BSIM4v4wlambda * Inv_W + model->BSIM4v4plambda * Inv_LW; pParam->BSIM4v4vtl = model->BSIM4v4vtl + model->BSIM4v4lvtl * Inv_L + model->BSIM4v4wvtl * Inv_W + model->BSIM4v4pvtl * Inv_LW; pParam->BSIM4v4xn = model->BSIM4v4xn + model->BSIM4v4lxn * Inv_L + model->BSIM4v4wxn * Inv_W + model->BSIM4v4pxn * Inv_LW; break; case BSIM4v40: pParam->BSIM4v4lambda = model->BSIM4v4lambda + model->BSIM4v4llambda * Inv_L + model->BSIM4v4wlambda * Inv_W + model->BSIM4v4plambda * Inv_LW; pParam->BSIM4v4vtl = model->BSIM4v4vtl + model->BSIM4v4lvtl * Inv_L + model->BSIM4v4wvtl * Inv_W + model->BSIM4v4pvtl * Inv_LW; pParam->BSIM4v4xn = model->BSIM4v4xn + model->BSIM4v4lxn * Inv_L + model->BSIM4v4wxn * Inv_W + model->BSIM4v4pxn * Inv_LW; pParam->BSIM4v4vfbsdoff = model->BSIM4v4vfbsdoff + model->BSIM4v4lvfbsdoff * Inv_L + model->BSIM4v4wvfbsdoff * Inv_W + model->BSIM4v4pvfbsdoff * Inv_LW; break; default: break; } pParam->BSIM4v4cgsl = model->BSIM4v4cgsl + model->BSIM4v4lcgsl * Inv_L + model->BSIM4v4wcgsl * Inv_W + model->BSIM4v4pcgsl * Inv_LW; pParam->BSIM4v4cgdl = model->BSIM4v4cgdl + model->BSIM4v4lcgdl * Inv_L + model->BSIM4v4wcgdl * Inv_W + model->BSIM4v4pcgdl * Inv_LW; pParam->BSIM4v4ckappas = model->BSIM4v4ckappas + model->BSIM4v4lckappas * Inv_L + model->BSIM4v4wckappas * Inv_W + model->BSIM4v4pckappas * Inv_LW; pParam->BSIM4v4ckappad = model->BSIM4v4ckappad + model->BSIM4v4lckappad * Inv_L + model->BSIM4v4wckappad * Inv_W + model->BSIM4v4pckappad * Inv_LW; pParam->BSIM4v4cf = model->BSIM4v4cf + model->BSIM4v4lcf * Inv_L + model->BSIM4v4wcf * Inv_W + model->BSIM4v4pcf * Inv_LW; pParam->BSIM4v4clc = model->BSIM4v4clc + model->BSIM4v4lclc * Inv_L + model->BSIM4v4wclc * Inv_W + model->BSIM4v4pclc * Inv_LW; pParam->BSIM4v4cle = model->BSIM4v4cle + model->BSIM4v4lcle * Inv_L + model->BSIM4v4wcle * Inv_W + model->BSIM4v4pcle * Inv_LW; pParam->BSIM4v4vfbcv = model->BSIM4v4vfbcv + model->BSIM4v4lvfbcv * Inv_L + model->BSIM4v4wvfbcv * Inv_W + model->BSIM4v4pvfbcv * Inv_LW; pParam->BSIM4v4acde = model->BSIM4v4acde + model->BSIM4v4lacde * Inv_L + model->BSIM4v4wacde * Inv_W + model->BSIM4v4pacde * Inv_LW; pParam->BSIM4v4moin = model->BSIM4v4moin + model->BSIM4v4lmoin * Inv_L + model->BSIM4v4wmoin * Inv_W + model->BSIM4v4pmoin * Inv_LW; pParam->BSIM4v4noff = model->BSIM4v4noff + model->BSIM4v4lnoff * Inv_L + model->BSIM4v4wnoff * Inv_W + model->BSIM4v4pnoff * Inv_LW; pParam->BSIM4v4voffcv = model->BSIM4v4voffcv + model->BSIM4v4lvoffcv * Inv_L + model->BSIM4v4wvoffcv * Inv_W + model->BSIM4v4pvoffcv * Inv_LW; pParam->BSIM4v4abulkCVfactor = 1.0 + pow((pParam->BSIM4v4clc / pParam->BSIM4v4leffCV), pParam->BSIM4v4cle); T0 = (TRatio - 1.0); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: pParam->BSIM4v4ua = pParam->BSIM4v4ua + pParam->BSIM4v4ua1 * T0; pParam->BSIM4v4ub = pParam->BSIM4v4ub + pParam->BSIM4v4ub1 * T0; pParam->BSIM4v4uc = pParam->BSIM4v4uc + pParam->BSIM4v4uc1 * T0; if (pParam->BSIM4v4u0 > 1.0) pParam->BSIM4v4u0 = pParam->BSIM4v4u0 / 1.0e4; pParam->BSIM4v4u0temp = pParam->BSIM4v4u0 * pow(TRatio, pParam->BSIM4v4ute); pParam->BSIM4v4vsattemp = pParam->BSIM4v4vsat - pParam->BSIM4v4at * T0; if (pParam->BSIM4v4eu < 0.0) { pParam->BSIM4v4eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } PowWeffWr = pow(pParam->BSIM4v4weffCJ * 1.0e6, pParam->BSIM4v4wr) * here->BSIM4v4nf; /* External Rd(V) */ T1 = pParam->BSIM4v4rdw + pParam->BSIM4v4prt * T0; if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } T2 = model->BSIM4v4rdwmin + pParam->BSIM4v4prt * T0; if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v4rd0 = T1 / PowWeffWr; pParam->BSIM4v4rdwmin = T2 / PowWeffWr; /* External Rs(V) */ T1 = pParam->BSIM4v4rsw + pParam->BSIM4v4prt * T0; if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } T2 = model->BSIM4v4rswmin + pParam->BSIM4v4prt * T0; if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v4rs0 = T1 / PowWeffWr; pParam->BSIM4v4rswmin = T2 / PowWeffWr; /* Internal Rds(V) in IV */ pParam->BSIM4v4rds0 = (pParam->BSIM4v4rdsw + pParam->BSIM4v4prt * T0) * here->BSIM4v4nf / PowWeffWr; pParam->BSIM4v4rdswmin = (model->BSIM4v4rdswmin + pParam->BSIM4v4prt * T0) * here->BSIM4v4nf / PowWeffWr; break; case BSIM4v30: case BSIM4v40: PowWeffWr = pow(pParam->BSIM4v4weffCJ * 1.0e6, pParam->BSIM4v4wr) * here->BSIM4v4nf; T1 = T2 = T3 = T4 = 0.0; if(model->BSIM4v4tempMod == 0) { pParam->BSIM4v4ua = pParam->BSIM4v4ua + pParam->BSIM4v4ua1 * T0; pParam->BSIM4v4ub = pParam->BSIM4v4ub + pParam->BSIM4v4ub1 * T0; pParam->BSIM4v4uc = pParam->BSIM4v4uc + pParam->BSIM4v4uc1 * T0; pParam->BSIM4v4vsattemp = pParam->BSIM4v4vsat - pParam->BSIM4v4at * T0; T10 = pParam->BSIM4v4prt * T0; if(model->BSIM4v4rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v4rdw + T10; T2 = model->BSIM4v4rdwmin + T10; /* External Rs(V) */ T3 = pParam->BSIM4v4rsw + T10; T4 = model->BSIM4v4rswmin + T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v4rds0 = (pParam->BSIM4v4rdsw + T10) * here->BSIM4v4nf / PowWeffWr; pParam->BSIM4v4rdswmin = (model->BSIM4v4rdswmin + T10) * here->BSIM4v4nf / PowWeffWr; } else { /* tempMod = 1 */ pParam->BSIM4v4ua = pParam->BSIM4v4ua * (1.0 + pParam->BSIM4v4ua1 * delTemp) ; pParam->BSIM4v4ub = pParam->BSIM4v4ub * (1.0 + pParam->BSIM4v4ub1 * delTemp); pParam->BSIM4v4uc = pParam->BSIM4v4uc * (1.0 + pParam->BSIM4v4uc1 * delTemp); pParam->BSIM4v4vsattemp = pParam->BSIM4v4vsat * (1.0 - pParam->BSIM4v4at * delTemp); T10 = 1.0 + pParam->BSIM4v4prt * delTemp; if(model->BSIM4v4rdsMod) { /* External Rd(V) */ T1 = pParam->BSIM4v4rdw * T10; T2 = model->BSIM4v4rdwmin * T10; /* External Rs(V) */ T3 = pParam->BSIM4v4rsw * T10; T4 = model->BSIM4v4rswmin * T10; } /* Internal Rds(V) in IV */ pParam->BSIM4v4rds0 = pParam->BSIM4v4rdsw * T10 * here->BSIM4v4nf / PowWeffWr; pParam->BSIM4v4rdswmin = model->BSIM4v4rdswmin * T10 * here->BSIM4v4nf / PowWeffWr; } if (T1 < 0.0) { T1 = 0.0; printf("Warning: Rdw at current temperature is negative; set to 0.\n"); } if (T2 < 0.0) { T2 = 0.0; printf("Warning: Rdwmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v4rd0 = T1 / PowWeffWr; pParam->BSIM4v4rdwmin = T2 / PowWeffWr; if (T3 < 0.0) { T3 = 0.0; printf("Warning: Rsw at current temperature is negative; set to 0.\n"); } if (T4 < 0.0) { T4 = 0.0; printf("Warning: Rswmin at current temperature is negative; set to 0.\n"); } pParam->BSIM4v4rs0 = T3 / PowWeffWr; pParam->BSIM4v4rswmin = T4 / PowWeffWr; if (pParam->BSIM4v4u0 > 1.0) pParam->BSIM4v4u0 = pParam->BSIM4v4u0 / 1.0e4; pParam->BSIM4v4u0temp = pParam->BSIM4v4u0 * pow(TRatio, pParam->BSIM4v4ute); if (pParam->BSIM4v4eu < 0.0) { pParam->BSIM4v4eu = 0.0; printf("Warning: eu has been negative; reset to 0.0.\n"); } /* Source End Velocity Limit */ if((model->BSIM4v4vtlGiven) && (model->BSIM4v4vtl > 0.0) ) { if(model->BSIM4v4lc < 0.0) pParam->BSIM4v4lc = 0.0; else pParam->BSIM4v4lc = model->BSIM4v4lc ; T0 = pParam->BSIM4v4leff / (pParam->BSIM4v4xn * pParam->BSIM4v4leff + pParam->BSIM4v4lc); pParam->BSIM4v4tfactor = (1.0 - T0) / (1.0 + T0 ); } break; default: break; } pParam->BSIM4v4cgdo = (model->BSIM4v4cgdo + pParam->BSIM4v4cf) * pParam->BSIM4v4weffCV; pParam->BSIM4v4cgso = (model->BSIM4v4cgso + pParam->BSIM4v4cf) * pParam->BSIM4v4weffCV; pParam->BSIM4v4cgbo = model->BSIM4v4cgbo * pParam->BSIM4v4leffCV * here->BSIM4v4nf; if (!model->BSIM4v4ndepGiven && model->BSIM4v4gamma1Given) { T0 = pParam->BSIM4v4gamma1 * model->BSIM4v4coxe; pParam->BSIM4v4ndep = 3.01248e22 * T0 * T0; } pParam->BSIM4v4phi = Vtm0 * log(pParam->BSIM4v4ndep / ni) + pParam->BSIM4v4phin + 0.4; pParam->BSIM4v4sqrtPhi = sqrt(pParam->BSIM4v4phi); pParam->BSIM4v4phis3 = pParam->BSIM4v4sqrtPhi * pParam->BSIM4v4phi; pParam->BSIM4v4Xdep0 = sqrt(2.0 * EPSSI / (Charge_q * pParam->BSIM4v4ndep * 1.0e6)) * pParam->BSIM4v4sqrtPhi; pParam->BSIM4v4sqrtXdep0 = sqrt(pParam->BSIM4v4Xdep0); pParam->BSIM4v4litl = sqrt(3.0 * pParam->BSIM4v4xj * model->BSIM4v4toxe); pParam->BSIM4v4vbi = Vtm0 * log(pParam->BSIM4v4nsd * pParam->BSIM4v4ndep / (ni * ni)); if (pParam->BSIM4v4ngate > 0.0) { pParam->BSIM4v4vfbsd = Vtm0 * log(pParam->BSIM4v4ngate / pParam->BSIM4v4nsd); } else pParam->BSIM4v4vfbsd = 0.0; pParam->BSIM4v4cdep0 = sqrt(Charge_q * EPSSI * pParam->BSIM4v4ndep * 1.0e6 / 2.0 / pParam->BSIM4v4phi); pParam->BSIM4v4ToxRatio = exp(pParam->BSIM4v4ntox * log(model->BSIM4v4toxref / model->BSIM4v4toxe)) / model->BSIM4v4toxe / model->BSIM4v4toxe; pParam->BSIM4v4ToxRatioEdge = exp(pParam->BSIM4v4ntox * log(model->BSIM4v4toxref / (model->BSIM4v4toxe * pParam->BSIM4v4poxedge))) / model->BSIM4v4toxe / model->BSIM4v4toxe / pParam->BSIM4v4poxedge / pParam->BSIM4v4poxedge; pParam->BSIM4v4Aechvb = (model->BSIM4v4type == NMOS) ? 4.97232e-7 : 3.42537e-7; pParam->BSIM4v4Bechvb = (model->BSIM4v4type == NMOS) ? 7.45669e11 : 1.16645e12; pParam->BSIM4v4AechvbEdge = pParam->BSIM4v4Aechvb * pParam->BSIM4v4weff * pParam->BSIM4v4dlcig * pParam->BSIM4v4ToxRatioEdge; pParam->BSIM4v4BechvbEdge = -pParam->BSIM4v4Bechvb * model->BSIM4v4toxe * pParam->BSIM4v4poxedge; pParam->BSIM4v4Aechvb *= pParam->BSIM4v4weff * pParam->BSIM4v4leff * pParam->BSIM4v4ToxRatio; pParam->BSIM4v4Bechvb *= -model->BSIM4v4toxe; pParam->BSIM4v4mstar = 0.5 + atan(pParam->BSIM4v4minv) / PI; pParam->BSIM4v4voffcbn = pParam->BSIM4v4voff + model->BSIM4v4voffl / pParam->BSIM4v4leff; pParam->BSIM4v4ldeb = sqrt(EPSSI * Vtm0 / (Charge_q * pParam->BSIM4v4ndep * 1.0e6)) / 3.0; pParam->BSIM4v4acde *= pow((pParam->BSIM4v4ndep / 2.0e16), -0.25); if (model->BSIM4v4k1Given || model->BSIM4v4k2Given) { if (!model->BSIM4v4k1Given) { fprintf(stdout, "Warning: k1 should be specified with k2.\n"); pParam->BSIM4v4k1 = 0.53; } if (!model->BSIM4v4k2Given) { fprintf(stdout, "Warning: k2 should be specified with k1.\n"); pParam->BSIM4v4k2 = -0.0186; } if (model->BSIM4v4nsubGiven) fprintf(stdout, "Warning: nsub is ignored because k1 or k2 is given.\n"); if (model->BSIM4v4xtGiven) fprintf(stdout, "Warning: xt is ignored because k1 or k2 is given.\n"); if (model->BSIM4v4vbxGiven) fprintf(stdout, "Warning: vbx is ignored because k1 or k2 is given.\n"); if (model->BSIM4v4gamma1Given) fprintf(stdout, "Warning: gamma1 is ignored because k1 or k2 is given.\n"); if (model->BSIM4v4gamma2Given) fprintf(stdout, "Warning: gamma2 is ignored because k1 or k2 is given.\n"); } else { if (!model->BSIM4v4vbxGiven) pParam->BSIM4v4vbx = pParam->BSIM4v4phi - 7.7348e-4 * pParam->BSIM4v4ndep * pParam->BSIM4v4xt * pParam->BSIM4v4xt; if (pParam->BSIM4v4vbx > 0.0) pParam->BSIM4v4vbx = -pParam->BSIM4v4vbx; if (pParam->BSIM4v4vbm > 0.0) pParam->BSIM4v4vbm = -pParam->BSIM4v4vbm; if (!model->BSIM4v4gamma1Given) pParam->BSIM4v4gamma1 = 5.753e-12 * sqrt(pParam->BSIM4v4ndep) / model->BSIM4v4coxe; if (!model->BSIM4v4gamma2Given) pParam->BSIM4v4gamma2 = 5.753e-12 * sqrt(pParam->BSIM4v4nsub) / model->BSIM4v4coxe; T0 = pParam->BSIM4v4gamma1 - pParam->BSIM4v4gamma2; T1 = sqrt(pParam->BSIM4v4phi - pParam->BSIM4v4vbx) - pParam->BSIM4v4sqrtPhi; T2 = sqrt(pParam->BSIM4v4phi * (pParam->BSIM4v4phi - pParam->BSIM4v4vbm)) - pParam->BSIM4v4phi; pParam->BSIM4v4k2 = T0 * T1 / (2.0 * T2 + pParam->BSIM4v4vbm); pParam->BSIM4v4k1 = pParam->BSIM4v4gamma2 - 2.0 * pParam->BSIM4v4k2 * sqrt(pParam->BSIM4v4phi - pParam->BSIM4v4vbm); } if (pParam->BSIM4v4k2 < 0.0) { T0 = 0.5 * pParam->BSIM4v4k1 / pParam->BSIM4v4k2; pParam->BSIM4v4vbsc = 0.9 * (pParam->BSIM4v4phi - T0 * T0); if (pParam->BSIM4v4vbsc > -3.0) pParam->BSIM4v4vbsc = -3.0; else if (pParam->BSIM4v4vbsc < -30.0) pParam->BSIM4v4vbsc = -30.0; } else { pParam->BSIM4v4vbsc = -30.0; } if (pParam->BSIM4v4vbsc > pParam->BSIM4v4vbm) pParam->BSIM4v4vbsc = pParam->BSIM4v4vbm; if (!model->BSIM4v4vfbGiven) { if (model->BSIM4v4vth0Given) { pParam->BSIM4v4vfb = model->BSIM4v4type * pParam->BSIM4v4vth0 - pParam->BSIM4v4phi - pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi; } else { pParam->BSIM4v4vfb = -1.0; } } if (!model->BSIM4v4vth0Given) { pParam->BSIM4v4vth0 = model->BSIM4v4type * (pParam->BSIM4v4vfb + pParam->BSIM4v4phi + pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi); } pParam->BSIM4v4k1ox = pParam->BSIM4v4k1 * model->BSIM4v4toxe / model->BSIM4v4toxm; pParam->BSIM4v4k2ox = pParam->BSIM4v4k2 * model->BSIM4v4toxe / model->BSIM4v4toxm; T3 = model->BSIM4v4type * pParam->BSIM4v4vth0 - pParam->BSIM4v4vfb - pParam->BSIM4v4phi; T4 = T3 + T3; T5 = 2.5 * T3; pParam->BSIM4v4vtfbphi1 = (model->BSIM4v4type == NMOS) ? T4 : T5; if (pParam->BSIM4v4vtfbphi1 < 0.0) pParam->BSIM4v4vtfbphi1 = 0.0; pParam->BSIM4v4vtfbphi2 = 4.0 * T3; if (pParam->BSIM4v4vtfbphi2 < 0.0) pParam->BSIM4v4vtfbphi2 = 0.0; tmp = sqrt(EPSSI / (model->BSIM4v4epsrox * EPS0) * model->BSIM4v4toxe * pParam->BSIM4v4Xdep0); T0 = pParam->BSIM4v4dsub * pParam->BSIM4v4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; pParam->BSIM4v4theta0vb0 = T1 / T4; } else pParam->BSIM4v4theta0vb0 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v4drout * pParam->BSIM4v4leff / tmp; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; } else T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ pParam->BSIM4v4thetaRout = pParam->BSIM4v4pdibl1 * T5 + pParam->BSIM4v4pdibl2; tmp = sqrt(pParam->BSIM4v4Xdep0); tmp1 = pParam->BSIM4v4vbi - pParam->BSIM4v4phi; tmp2 = model->BSIM4v4factor1 * tmp; T0 = pParam->BSIM4v4dvt1w * pParam->BSIM4v4weff * pParam->BSIM4v4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T8 = T1 / T4; } else T8 = 1.0 / (MAX_EXP - 2.0); T0 = pParam->BSIM4v4dvt0w * T8; T8 = T0 * tmp1; T0 = pParam->BSIM4v4dvt1 * pParam->BSIM4v4leff / tmp2; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T9 = T1 / T4; } else T9 = 1.0 / (MAX_EXP - 2.0); T9 = pParam->BSIM4v4dvt0 * T9 * tmp1; T4 = model->BSIM4v4toxe * pParam->BSIM4v4phi / (pParam->BSIM4v4weff + pParam->BSIM4v4w0); T0 = sqrt(1.0 + pParam->BSIM4v4lpe0 / pParam->BSIM4v4leff); T5 = pParam->BSIM4v4k1ox * (T0 - 1.0) * pParam->BSIM4v4sqrtPhi + (pParam->BSIM4v4kt1 + pParam->BSIM4v4kt1l / pParam->BSIM4v4leff) * (TRatio - 1.0); tmp3 = model->BSIM4v4type * pParam->BSIM4v4vth0 - T8 - T9 + pParam->BSIM4v4k3 * T4 + T5; pParam->BSIM4v4vfbzb = tmp3 - pParam->BSIM4v4phi - pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi; /* End of vfbzb */ /* stress effect */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: T0 = pow(Lnew, model->BSIM4v4llodku0); W_tmp = Wnew + model->BSIM4v4wlod; T1 = pow(W_tmp, model->BSIM4v4wlodku0); tmp1 = model->BSIM4v4lku0 / T0 + model->BSIM4v4wku0 / T1 + model->BSIM4v4pku0 / (T0 * T1); pParam->BSIM4v4ku0 = 1.0 + tmp1; T0 = pow(Lnew, model->BSIM4v4llodvth); T1 = pow(W_tmp, model->BSIM4v4wlodvth); tmp1 = model->BSIM4v4lkvth0 / T0 + model->BSIM4v4wkvth0 / T1 + model->BSIM4v4pkvth0 / (T0 * T1); pParam->BSIM4v4kvth0 = 1.0 + tmp1; pParam->BSIM4v4kvth0 = sqrt(pParam->BSIM4v4kvth0*pParam->BSIM4v4kvth0 + DELTA); T0 = (TRatio - 1.0); pParam->BSIM4v4ku0temp = pParam->BSIM4v4ku0 * (1.0 + model->BSIM4v4tku0 *T0) + DELTA; Inv_saref = 1.0/(model->BSIM4v4saref + 0.5*Ldrn); Inv_sbref = 1.0/(model->BSIM4v4sbref + 0.5*Ldrn); pParam->BSIM4v4inv_od_ref = Inv_saref + Inv_sbref; pParam->BSIM4v4rho_ref = model->BSIM4v4ku0 / pParam->BSIM4v4ku0temp * pParam->BSIM4v4inv_od_ref; break; default: break; } } /* End of SizeNotFound */ /* stress effect */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if( (here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) { Inv_sa = 0; Inv_sb = 0; if (model->BSIM4v4wlod < 0.0) { fprintf(stderr, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4v4wlod); model->BSIM4v4wlod = 0.0; } if (model->BSIM4v4kvsat < -1.0 ) { fprintf(stderr, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4v4kvsat); model->BSIM4v4kvsat = -1.0; } if (model->BSIM4v4kvsat > 1.0) { fprintf(stderr, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v4kvsat); model->BSIM4v4kvsat = 1.0; } for(i = 0; i < here->BSIM4v4nf; i++){ T0 = 1.0 / here->BSIM4v4nf / (here->BSIM4v4sa + 0.5*Ldrn + i * (here->BSIM4v4sd +Ldrn)); T1 = 1.0 / here->BSIM4v4nf / (here->BSIM4v4sb + 0.5*Ldrn + i * (here->BSIM4v4sd +Ldrn)); Inv_sa += T0; Inv_sb += T1; } Inv_ODeff = Inv_sa + Inv_sb; rho = model->BSIM4v4ku0 / pParam->BSIM4v4ku0temp * Inv_ODeff; T0 = (1.0 + rho)/(1.0 + pParam->BSIM4v4rho_ref); here->BSIM4v4u0temp = pParam->BSIM4v4u0temp * T0; T1 = (1.0 + model->BSIM4v4kvsat * rho)/(1.0 + model->BSIM4v4kvsat * pParam->BSIM4v4rho_ref); here->BSIM4v4vsattemp = pParam->BSIM4v4vsattemp * T1; OD_offset = Inv_ODeff - pParam->BSIM4v4inv_od_ref; dvth0_lod = model->BSIM4v4kvth0 / pParam->BSIM4v4kvth0 * OD_offset; dk2_lod = model->BSIM4v4stk2 / pow(pParam->BSIM4v4kvth0, model->BSIM4v4lodk2) * OD_offset; deta0_lod = model->BSIM4v4steta0 / pow(pParam->BSIM4v4kvth0, model->BSIM4v4lodeta0) * OD_offset; here->BSIM4v4vth0 = pParam->BSIM4v4vth0 + dvth0_lod; if (!model->BSIM4v4vfbGiven && !model->BSIM4v4vth0Given) here->BSIM4v4vfb = -1.0; else here->BSIM4v4vfb = pParam->BSIM4v4vfb + model->BSIM4v4type * dvth0_lod; here->BSIM4v4vfbzb = pParam->BSIM4v4vfbzb + model->BSIM4v4type * dvth0_lod; T3 = model->BSIM4v4type * here->BSIM4v4vth0 - here->BSIM4v4vfb - pParam->BSIM4v4phi; T4 = T3 + T3; T5 = 2.5 * T3; here->BSIM4v4vtfbphi1 = (model->BSIM4v4type == NMOS) ? T4 : T5; if (here->BSIM4v4vtfbphi1 < 0.0) here->BSIM4v4vtfbphi1 = 0.0; here->BSIM4v4vtfbphi2 = 4.0 * T3; if (here->BSIM4v4vtfbphi2 < 0.0) here->BSIM4v4vtfbphi2 = 0.0; here->BSIM4v4k2 = pParam->BSIM4v4k2 + dk2_lod; if (here->BSIM4v4k2 < 0.0) { T0 = 0.5 * pParam->BSIM4v4k1 / here->BSIM4v4k2; here->BSIM4v4vbsc = 0.9 * (pParam->BSIM4v4phi - T0 * T0); if (here->BSIM4v4vbsc > -3.0) here->BSIM4v4vbsc = -3.0; else if (here->BSIM4v4vbsc < -30.0) here->BSIM4v4vbsc = -30.0; } else here->BSIM4v4vbsc = -30.0; if (here->BSIM4v4vbsc > pParam->BSIM4v4vbm) here->BSIM4v4vbsc = pParam->BSIM4v4vbm; here->BSIM4v4k2ox = here->BSIM4v4k2 * model->BSIM4v4toxe / model->BSIM4v4toxm; here->BSIM4v4eta0 = pParam->BSIM4v4eta0 + deta0_lod; } else { here->BSIM4v4u0temp = pParam->BSIM4v4u0temp; here->BSIM4v4vth0 = pParam->BSIM4v4vth0; here->BSIM4v4vsattemp = pParam->BSIM4v4vsattemp; here->BSIM4v4vfb = pParam->BSIM4v4vfb; here->BSIM4v4vfbzb = pParam->BSIM4v4vfbzb; here->BSIM4v4vtfbphi1 = pParam->BSIM4v4vtfbphi1; here->BSIM4v4vtfbphi2 = pParam->BSIM4v4vtfbphi2; here->BSIM4v4k2 = pParam->BSIM4v4k2; here->BSIM4v4vbsc = pParam->BSIM4v4vbsc; here->BSIM4v4k2ox = pParam->BSIM4v4k2ox; here->BSIM4v4eta0 = pParam->BSIM4v4eta0; } break; default: break; } here->BSIM4v4cgso = pParam->BSIM4v4cgso; here->BSIM4v4cgdo = pParam->BSIM4v4cgdo; if (here->BSIM4v4rbodyMod) { if (here->BSIM4v4rbdb < 1.0e-3) here->BSIM4v4grbdb = 1.0e3; /* in mho */ else here->BSIM4v4grbdb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbdb; if (here->BSIM4v4rbpb < 1.0e-3) here->BSIM4v4grbpb = 1.0e3; else here->BSIM4v4grbpb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbpb; if (here->BSIM4v4rbps < 1.0e-3) here->BSIM4v4grbps = 1.0e3; else here->BSIM4v4grbps = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbps; if (here->BSIM4v4rbsb < 1.0e-3) here->BSIM4v4grbsb = 1.0e3; else here->BSIM4v4grbsb = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbsb; if (here->BSIM4v4rbpd < 1.0e-3) here->BSIM4v4grbpd = 1.0e3; else here->BSIM4v4grbpd = model->BSIM4v4gbmin + 1.0 / here->BSIM4v4rbpd; } /* * Process geomertry dependent parasitics */ here->BSIM4v4grgeltd = model->BSIM4v4rshg * (model->BSIM4v4xgw + pParam->BSIM4v4weffCJ / 3.0 / model->BSIM4v4ngcon) / (model->BSIM4v4ngcon * here->BSIM4v4nf * (Lnew - model->BSIM4v4xgl)); if (here->BSIM4v4grgeltd > 0.0) here->BSIM4v4grgeltd = 1.0 / here->BSIM4v4grgeltd; else { here->BSIM4v4grgeltd = 1.0e3; /* mho */ if (here->BSIM4v4rgateMod != 0) printf("Warning: The gate conductance reset to 1.0e3 mho.\n"); } DMCGeff = model->BSIM4v4dmcg - model->BSIM4v4dmcgt; DMCIeff = model->BSIM4v4dmci; DMDGeff = model->BSIM4v4dmdg - model->BSIM4v4dmcgt; if (here->BSIM4v4sourcePerimeterGiven) { if (model->BSIM4v4perMod == 0) here->BSIM4v4Pseff = here->BSIM4v4sourcePerimeter; else here->BSIM4v4Pseff = here->BSIM4v4sourcePerimeter - pParam->BSIM4v4weffCJ * here->BSIM4v4nf; } else BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, &(here->BSIM4v4Pseff), &dumPd, &dumAs, &dumAd); if (here->BSIM4v4drainPerimeterGiven) { if (model->BSIM4v4perMod == 0) here->BSIM4v4Pdeff = here->BSIM4v4drainPerimeter; else here->BSIM4v4Pdeff = here->BSIM4v4drainPerimeter - pParam->BSIM4v4weffCJ * here->BSIM4v4nf; } else BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &(here->BSIM4v4Pdeff), &dumAs, &dumAd); if (here->BSIM4v4sourceAreaGiven) here->BSIM4v4Aseff = here->BSIM4v4sourceArea; else BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &(here->BSIM4v4Aseff), &dumAd); if (here->BSIM4v4drainAreaGiven) here->BSIM4v4Adeff = here->BSIM4v4drainArea; else BSIM4v4PAeffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, DMCGeff, DMCIeff, DMDGeff, &dumPs, &dumPd, &dumAs, &(here->BSIM4v4Adeff)); /* Processing S/D resistance and conductance below */ if(here->BSIM4v4sNodePrime != here->BSIM4v4sNode) { here->BSIM4v4sourceConductance = 0.0; if(here->BSIM4v4sourceSquaresGiven) { here->BSIM4v4sourceConductance = model->BSIM4v4sheetResistance * here->BSIM4v4sourceSquares; } else if (here->BSIM4v4rgeoMod > 0) { BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4rgeoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &(here->BSIM4v4sourceConductance)); } else { here->BSIM4v4sourceConductance = 0.0; } if (here->BSIM4v4sourceConductance > 0.0) here->BSIM4v4sourceConductance = 1.0 / here->BSIM4v4sourceConductance; else { here->BSIM4v4sourceConductance = 1.0e3; /* mho */ printf ("Warning: Source conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v4sourceConductance = 0.0; } if(here->BSIM4v4dNodePrime != here->BSIM4v4dNode) { here->BSIM4v4drainConductance = 0.0; if(here->BSIM4v4drainSquaresGiven) { here->BSIM4v4drainConductance = model->BSIM4v4sheetResistance * here->BSIM4v4drainSquares; } else if (here->BSIM4v4rgeoMod > 0) { BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4rgeoMod, here->BSIM4v4min, pParam->BSIM4v4weffCJ, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &(here->BSIM4v4drainConductance)); } else { here->BSIM4v4drainConductance = 0.0; } if (here->BSIM4v4drainConductance > 0.0) here->BSIM4v4drainConductance = 1.0 / here->BSIM4v4drainConductance; else { here->BSIM4v4drainConductance = 1.0e3; /* mho */ printf ("Warning: Drain conductance reset to 1.0e3 mho.\n"); } } else { here->BSIM4v4drainConductance = 0.0; } /* End of Rsd processing */ Nvtms = model->BSIM4v4vtm * model->BSIM4v4SjctEmissionCoeff; if ((here->BSIM4v4Aseff <= 0.0) && (here->BSIM4v4Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM4v4Aseff * model->BSIM4v4SjctTempSatCurDensity + here->BSIM4v4Pseff * model->BSIM4v4SjctSidewallTempSatCurDensity + pParam->BSIM4v4weffCJ * here->BSIM4v4nf * model->BSIM4v4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent > 0.0) { switch(model->BSIM4v4dioMod) { case 0: if ((model->BSIM4v4bvs / Nvtms) > EXP_THRESHOLD) here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * MIN_EXP; else here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * exp(-model->BSIM4v4bvs / Nvtms); break; case 1: BSIM4v4DioIjthVjmEval(Nvtms, model->BSIM4v4ijthsfwd, SourceSatCurrent, 0.0, &(here->BSIM4v4vjsmFwd)); here->BSIM4v4IVjsmFwd = SourceSatCurrent * exp(here->BSIM4v4vjsmFwd / Nvtms); break; case 2: if ((model->BSIM4v4bvs / Nvtms) > EXP_THRESHOLD) { here->BSIM4v4XExpBVS = model->BSIM4v4xjbvs * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v4XExpBVS = exp(-model->BSIM4v4bvs / Nvtms); tmp = here->BSIM4v4XExpBVS; here->BSIM4v4XExpBVS *= model->BSIM4v4xjbvs; } BSIM4v4DioIjthVjmEval(Nvtms, model->BSIM4v4ijthsfwd, SourceSatCurrent, here->BSIM4v4XExpBVS, &(here->BSIM4v4vjsmFwd)); T0 = exp(here->BSIM4v4vjsmFwd / Nvtms); here->BSIM4v4IVjsmFwd = SourceSatCurrent * (T0 - here->BSIM4v4XExpBVS / T0 + here->BSIM4v4XExpBVS - 1.0); here->BSIM4v4SslpFwd = SourceSatCurrent * (T0 + here->BSIM4v4XExpBVS / T0) / Nvtms; T2 = model->BSIM4v4ijthsrev / SourceSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthsrev too small and set to 10 times IsbSat.\n"); } here->BSIM4v4vjsmRev = -model->BSIM4v4bvs - Nvtms * log((T2 - 1.0) / model->BSIM4v4xjbvs); T1 = model->BSIM4v4xjbvs * exp(-(model->BSIM4v4bvs + here->BSIM4v4vjsmRev) / Nvtms); here->BSIM4v4IVjsmRev = SourceSatCurrent * (1.0 + T1); here->BSIM4v4SslpRev = -SourceSatCurrent * T1 / Nvtms; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v4dioMod); } } Nvtmd = model->BSIM4v4vtm * model->BSIM4v4DjctEmissionCoeff; if ((here->BSIM4v4Adeff <= 0.0) && (here->BSIM4v4Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM4v4Adeff * model->BSIM4v4DjctTempSatCurDensity + here->BSIM4v4Pdeff * model->BSIM4v4DjctSidewallTempSatCurDensity + pParam->BSIM4v4weffCJ * here->BSIM4v4nf * model->BSIM4v4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent > 0.0) { switch(model->BSIM4v4dioMod) { case 0: if ((model->BSIM4v4bvd / Nvtmd) > EXP_THRESHOLD) here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * MIN_EXP; else here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * exp(-model->BSIM4v4bvd / Nvtmd); break; case 1: BSIM4v4DioIjthVjmEval(Nvtmd, model->BSIM4v4ijthdfwd, DrainSatCurrent, 0.0, &(here->BSIM4v4vjdmFwd)); here->BSIM4v4IVjdmFwd = DrainSatCurrent * exp(here->BSIM4v4vjdmFwd / Nvtmd); break; case 2: if ((model->BSIM4v4bvd / Nvtmd) > EXP_THRESHOLD) { here->BSIM4v4XExpBVD = model->BSIM4v4xjbvd * MIN_EXP; tmp = MIN_EXP; } else { here->BSIM4v4XExpBVD = exp(-model->BSIM4v4bvd / Nvtmd); tmp = here->BSIM4v4XExpBVD; here->BSIM4v4XExpBVD *= model->BSIM4v4xjbvd; } BSIM4v4DioIjthVjmEval(Nvtmd, model->BSIM4v4ijthdfwd, DrainSatCurrent, here->BSIM4v4XExpBVD, &(here->BSIM4v4vjdmFwd)); T0 = exp(here->BSIM4v4vjdmFwd / Nvtmd); here->BSIM4v4IVjdmFwd = DrainSatCurrent * (T0 - here->BSIM4v4XExpBVD / T0 + here->BSIM4v4XExpBVD - 1.0); here->BSIM4v4DslpFwd = DrainSatCurrent * (T0 + here->BSIM4v4XExpBVD / T0) / Nvtmd; T2 = model->BSIM4v4ijthdrev / DrainSatCurrent; if (T2 < 1.0) { T2 = 10.0; fprintf(stderr, "Warning: ijthdrev too small and set to 10 times IdbSat.\n"); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: here->BSIM4v4vjdmRev = -model->BSIM4v4bvd - Nvtms * log((T2 - 1.0) / model->BSIM4v4xjbvd); break; case BSIM4v30: case BSIM4v40: here->BSIM4v4vjdmRev = -model->BSIM4v4bvd - Nvtmd * log((T2 - 1.0) / model->BSIM4v4xjbvd); /* bugfix */ break; default: break; } T1 = model->BSIM4v4xjbvd * exp(-(model->BSIM4v4bvd + here->BSIM4v4vjdmRev) / Nvtmd); here->BSIM4v4IVjdmRev = DrainSatCurrent * (1.0 + T1); here->BSIM4v4DslpRev = -DrainSatCurrent * T1 / Nvtmd; break; default: printf("Specified dioMod = %d not matched\n", model->BSIM4v4dioMod); } } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: /* GEDL current reverse bias */ T0 = (TRatio - 1.0); model->BSIM4v4njtstemp = model->BSIM4v4njts * (1.0 + model->BSIM4v4tnjts * T0); model->BSIM4v4njtsswtemp = model->BSIM4v4njtssw * (1.0 + model->BSIM4v4tnjtssw * T0); model->BSIM4v4njtsswgtemp = model->BSIM4v4njtsswg * (1.0 + model->BSIM4v4tnjtsswg * T0); T7 = Eg0 / model->BSIM4v4vtm * T0; T9 = model->BSIM4v4xtss * T7; DEXP(T9, T1); T9 = model->BSIM4v4xtsd * T7; DEXP(T9, T2); T9 = model->BSIM4v4xtssws * T7; DEXP(T9, T3); T9 = model->BSIM4v4xtsswd * T7; DEXP(T9, T4); T9 = model->BSIM4v4xtsswgs * T7; DEXP(T9, T5); T9 = model->BSIM4v4xtsswgd * T7; DEXP(T9, T6); T10 = pParam->BSIM4v4weffCJ * here->BSIM4v4nf; here->BSIM4v4SjctTempRevSatCur = T1 * here->BSIM4v4Aseff * model->BSIM4v4jtss; here->BSIM4v4DjctTempRevSatCur = T2 * here->BSIM4v4Adeff * model->BSIM4v4jtsd; here->BSIM4v4SswTempRevSatCur = T3 * here->BSIM4v4Pseff * model->BSIM4v4jtssws; here->BSIM4v4DswTempRevSatCur = T4 * here->BSIM4v4Pdeff * model->BSIM4v4jtsswd; here->BSIM4v4SswgTempRevSatCur = T5 * T10 * model->BSIM4v4jtsswgs; here->BSIM4v4DswgTempRevSatCur = T6 * T10 * model->BSIM4v4jtsswgd; break; default: break; } if (BSIM4v4checkModel(model, here, ckt)) { IFuid namarray[2]; namarray[0] = model->BSIM4v4modName; namarray[1] = here->BSIM4v4name; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM4v4.2.1 parameter checking for %s in model %s", namarray); break; case BSIM4v30: SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM4v4.3.0 parameter checking for %s in model %s", namarray); break; case BSIM4v40: SPfrontEnd->IFerror (ERR_FATAL, "Fatal error(s) detected during BSIM4v4.4.0 parameter checking for %s in model %s", namarray); break; default: break; } return(E_BADPARM); } } /* End instance */ } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4del.c0000644000265600020320000000221012264261473021127 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4del.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/suffix.h" int BSIM4v4delete( GENmodel *inModel, IFuid name, GENinstance **inInst) { BSIM4v4instance **fast = (BSIM4v4instance**)inInst; BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance **prev = NULL; BSIM4v4instance *here; for (; model ; model = model->BSIM4v4nextModel) { prev = &(model->BSIM4v4instances); for (here = *prev; here ; here = *prev) { if (here->BSIM4v4name == name || (fast && here==*fast)) { *prev= here->BSIM4v4nextInstance; FREE(here); return(OK); } prev = &(here->BSIM4v4nextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4check.c0000644000265600020320000013236112264261473021453 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4check.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" int BSIM4v4checkModel( BSIM4v4model *model, BSIM4v4instance *here, CKTcircuit *ckt) { struct bsim4SizeDependParam *pParam; int Fatal_Flag = 0; FILE *fplog; NG_IGNORE(ckt); if ((fplog = fopen("bsim4v4.out", "w")) != NULL) { pParam = here->pParam; fprintf(fplog, "BSIM4: Berkeley Short Channel IGFET Model-4\n"); fprintf(fplog, "Developed by Xuemei (Jane) Xi, Jin He, Mohan Dunga, Prof. Ali Niknejad and Prof. Chenming Hu in 2003.\n"); fprintf(fplog, "\n"); fprintf(fplog, "++++++++++ BSIM4v4 PARAMETER CHECKING BELOW ++++++++++\n"); if ((strcmp(model->BSIM4v4version, "4.4.0")) && (strcmp(model->BSIM4v4version, "4.40")) && (strcmp(model->BSIM4v4version, "4.4")) && (strcmp(model->BSIM4v4version, "4.3.0")) && (strcmp(model->BSIM4v4version, "4.30")) && (strcmp(model->BSIM4v4version, "4.3")) && (strcmp(model->BSIM4v4version, "4.2.1")) && (strcmp(model->BSIM4v4version, "4.21"))) { fprintf(fplog, "Warning: This model supports BSIM4.2.1, 4.3.0 and 4.4.0; you specified a wrong version number.\n"); printf("Warning: This model supports BSIM4.2.1, 4.3.0 and 4.4.0; you specified a wrong version number.\n"); } fprintf(fplog, "Model = %s\n", model->BSIM4v4modName); if ((here->BSIM4v4rgateMod == 2) || (here->BSIM4v4rgateMod == 3)) { if ((here->BSIM4v4trnqsMod == 1) || (here->BSIM4v4acnqsMod == 1)) { fprintf(fplog, "Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); printf("Warning: You've selected both Rg and charge deficit NQS; select one only.\n"); } } if (model->BSIM4v4toxe <= 0.0) { fprintf(fplog, "Fatal: Toxe = %g is not positive.\n", model->BSIM4v4toxe); printf("Fatal: Toxe = %g is not positive.\n", model->BSIM4v4toxe); Fatal_Flag = 1; } if (model->BSIM4v4toxp <= 0.0) { fprintf(fplog, "Fatal: Toxp = %g is not positive.\n", model->BSIM4v4toxp); printf("Fatal: Toxp = %g is not positive.\n", model->BSIM4v4toxp); Fatal_Flag = 1; } if (model->BSIM4v4toxm <= 0.0) { fprintf(fplog, "Fatal: Toxm = %g is not positive.\n", model->BSIM4v4toxm); printf("Fatal: Toxm = %g is not positive.\n", model->BSIM4v4toxm); Fatal_Flag = 1; } if (model->BSIM4v4toxref <= 0.0) { fprintf(fplog, "Fatal: Toxref = %g is not positive.\n", model->BSIM4v4toxref); printf("Fatal: Toxref = %g is not positive.\n", model->BSIM4v4toxref); Fatal_Flag = 1; } if (pParam->BSIM4v4lpe0 < -pParam->BSIM4v4leff) { fprintf(fplog, "Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v4lpe0); printf("Fatal: Lpe0 = %g is less than -Leff.\n", pParam->BSIM4v4lpe0); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4phin < -0.4) { fprintf(fplog, "Fatal: Phin = %g is less than -0.4.\n", pParam->BSIM4v4phin); printf("Fatal: Phin = %g is less than -0.4.\n", pParam->BSIM4v4phin); Fatal_Flag = 1; } break; case BSIM4v40: if (model->BSIM4v4lintnoi > pParam->BSIM4v4leff/2) { fprintf(fplog, "Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v4lintnoi); printf("Fatal: Lintnoi = %g is too large - Leff for noise is negative.\n", model->BSIM4v4lintnoi); Fatal_Flag = 1; } if (pParam->BSIM4v4phi <= 0.0) { fprintf(fplog, "Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v4phi); fprintf(fplog, " Phin = %g Ndep = %g \n", pParam->BSIM4v4phin, pParam->BSIM4v4ndep); printf("Fatal: Phi = %g is not positive. Please check Phin and Ndep\n", pParam->BSIM4v4phi); printf(" Phin = %g Ndep = %g \n", pParam->BSIM4v4phin, pParam->BSIM4v4ndep); Fatal_Flag = 1; } break; default: break; } if (pParam->BSIM4v4lpeb < -pParam->BSIM4v4leff) { fprintf(fplog, "Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v4lpeb); printf("Fatal: Lpeb = %g is less than -Leff.\n", pParam->BSIM4v4lpeb); Fatal_Flag = 1; } if (pParam->BSIM4v4ndep <= 0.0) { fprintf(fplog, "Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v4ndep); printf("Fatal: Ndep = %g is not positive.\n", pParam->BSIM4v4ndep); Fatal_Flag = 1; } if (pParam->BSIM4v4nsub <= 0.0) { fprintf(fplog, "Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v4nsub); printf("Fatal: Nsub = %g is not positive.\n", pParam->BSIM4v4nsub); Fatal_Flag = 1; } if (pParam->BSIM4v4ngate < 0.0) { fprintf(fplog, "Fatal: Ngate = %g is not positive.\n", pParam->BSIM4v4ngate); printf("Fatal: Ngate = %g Ngate is not positive.\n", pParam->BSIM4v4ngate); Fatal_Flag = 1; } if (pParam->BSIM4v4ngate > 1.e25) { fprintf(fplog, "Fatal: Ngate = %g is too high.\n", pParam->BSIM4v4ngate); printf("Fatal: Ngate = %g Ngate is too high\n", pParam->BSIM4v4ngate); Fatal_Flag = 1; } if (pParam->BSIM4v4xj <= 0.0) { fprintf(fplog, "Fatal: Xj = %g is not positive.\n", pParam->BSIM4v4xj); printf("Fatal: Xj = %g is not positive.\n", pParam->BSIM4v4xj); Fatal_Flag = 1; } if (pParam->BSIM4v4dvt1 < 0.0) { fprintf(fplog, "Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v4dvt1); printf("Fatal: Dvt1 = %g is negative.\n", pParam->BSIM4v4dvt1); Fatal_Flag = 1; } if (pParam->BSIM4v4dvt1w < 0.0) { fprintf(fplog, "Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v4dvt1w); printf("Fatal: Dvt1w = %g is negative.\n", pParam->BSIM4v4dvt1w); Fatal_Flag = 1; } if (pParam->BSIM4v4w0 == -pParam->BSIM4v4weff) { fprintf(fplog, "Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (W0 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } if (pParam->BSIM4v4dsub < 0.0) { fprintf(fplog, "Fatal: Dsub = %g is negative.\n", pParam->BSIM4v4dsub); printf("Fatal: Dsub = %g is negative.\n", pParam->BSIM4v4dsub); Fatal_Flag = 1; } if (pParam->BSIM4v4b1 == -pParam->BSIM4v4weff) { fprintf(fplog, "Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); printf("Fatal: (B1 + Weff) = 0 causing divided-by-zero.\n"); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: if (pParam->BSIM4v4u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v4u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", pParam->BSIM4v4u0temp); Fatal_Flag = 1; } if (pParam->BSIM4v4vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v4vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", pParam->BSIM4v4vsattemp); Fatal_Flag = 1; } break; case BSIM4v30: case BSIM4v40: if (here->BSIM4v4u0temp <= 0.0) { fprintf(fplog, "Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v4u0temp); printf("Fatal: u0 at current temperature = %g is not positive.\n", here->BSIM4v4u0temp); Fatal_Flag = 1; } if (here->BSIM4v4vsattemp <= 0.0) { fprintf(fplog, "Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v4vsattemp); printf("Fatal: Vsat at current temperature = %g is not positive.\n", here->BSIM4v4vsattemp); Fatal_Flag = 1; } break; default: break; } if (pParam->BSIM4v4delta < 0.0) { fprintf(fplog, "Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v4delta); printf("Fatal: Delta = %g is less than zero.\n", pParam->BSIM4v4delta); Fatal_Flag = 1; } if (pParam->BSIM4v4pclm <= 0.0) { fprintf(fplog, "Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v4pclm); printf("Fatal: Pclm = %g is not positive.\n", pParam->BSIM4v4pclm); Fatal_Flag = 1; } if (pParam->BSIM4v4drout < 0.0) { fprintf(fplog, "Fatal: Drout = %g is negative.\n", pParam->BSIM4v4drout); printf("Fatal: Drout = %g is negative.\n", pParam->BSIM4v4drout); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v4pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v4pscbe2); } break; case BSIM4v40: break; default: break; } if (here->BSIM4v4nf < 1.0) { fprintf(fplog, "Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v4nf); printf("Fatal: Number of finger = %g is smaller than one.\n", here->BSIM4v4nf); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v40: if((here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) { if (model->BSIM4v4saref <= 0.0) { fprintf(fplog, "Fatal: SAref = %g is not positive.\n",model->BSIM4v4saref); printf("Fatal: SAref = %g is not positive.\n",model->BSIM4v4saref); Fatal_Flag = 1; } if (model->BSIM4v4sbref <= 0.0) { fprintf(fplog, "Fatal: SBref = %g is not positive.\n",model->BSIM4v4sbref); printf("Fatal: SBref = %g is not positive.\n",model->BSIM4v4sbref); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (model->BSIM4v4wlod < 0.0) { fprintf(fplog, "Warning: WLOD = %g is less than 0. Set to 0.0\n",model->BSIM4v4wlod); printf("Warning: WLOD = %g is less than 0.\n",model->BSIM4v4wlod); model->BSIM4v4wlod = 0.0; } if (model->BSIM4v4kvsat < -1.0 ) { fprintf(fplog, "Warning: KVSAT = %g is too small; Reset to -1.0.\n",model->BSIM4v4kvsat); printf("Warning: KVSAT = %g is is too small; Reset to -1.0.\n",model->BSIM4v4kvsat); model->BSIM4v4kvsat = -1.0; } if (model->BSIM4v4kvsat > 1.0) { fprintf(fplog, "Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v4kvsat); printf("Warning: KVSAT = %g is too big; Reset to 1.0.\n",model->BSIM4v4kvsat); model->BSIM4v4kvsat = 1.0; } if (model->BSIM4v4lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); } if (model->BSIM4v4lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); } break; case BSIM4v40: break; default: break; } } break; default: break; } if ((here->BSIM4v4l + model->BSIM4v4xl) <= model->BSIM4v4xgl) { fprintf(fplog, "Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); printf("Fatal: The parameter xgl must be smaller than Ldrawn+XL.\n"); Fatal_Flag = 1; } if (model->BSIM4v4ngcon < 1.0) { fprintf(fplog, "Fatal: The parameter ngcon cannot be smaller than one.\n"); printf("Fatal: The parameter ngcon cannot be smaller than one.\n"); Fatal_Flag = 1; } if ((model->BSIM4v4ngcon != 1.0) && (model->BSIM4v4ngcon != 2.0)) { model->BSIM4v4ngcon = 1.0; fprintf(fplog, "Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); printf("Warning: Ngcon must be equal to one or two; reset to 1.0.\n"); } if (model->BSIM4v4gbmin < 1.0e-20) { fprintf(fplog, "Warning: Gbmin = %g is too small.\n", model->BSIM4v4gbmin); printf("Warning: Gbmin = %g is too small.\n", model->BSIM4v4gbmin); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4v4noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v4noff); } if (pParam->BSIM4v4voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4v4voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v4voffcv); } break; case BSIM4v40: /* Check saturation parameters */ if (pParam->BSIM4v4fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->BSIM4v4fprout); printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v4fprout); Fatal_Flag = 1; } if (pParam->BSIM4v4pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->BSIM4v4pdits); printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v4pdits); Fatal_Flag = 1; } if (model->BSIM4v4pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->BSIM4v4pditsl); printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v4pditsl); Fatal_Flag = 1; } /* Check gate current parameters */ if (model->BSIM4v4igbMod) { if (pParam->BSIM4v4nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v4nigbinv); printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v4nigbinv); Fatal_Flag = 1; } if (pParam->BSIM4v4nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v4nigbacc); printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v4nigbacc); Fatal_Flag = 1; } } if (model->BSIM4v4igcMod) { if (pParam->BSIM4v4nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v4nigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v4nigc); Fatal_Flag = 1; } if (pParam->BSIM4v4poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v4poxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v4poxedge); Fatal_Flag = 1; } if (pParam->BSIM4v4pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v4pigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v4pigcd); Fatal_Flag = 1; } } break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: if (pParam->BSIM4v4noff > 4.0) { fprintf(fplog, "Warning: Noff = %g is too large.\n", pParam->BSIM4v4noff); printf("Warning: Noff = %g is too large.\n", pParam->BSIM4v4noff); } if (pParam->BSIM4v4voffcv > 0.5) { fprintf(fplog, "Warning: Voffcv = %g is too large.\n", pParam->BSIM4v4voffcv); printf("Warning: Voffcv = %g is too large.\n", pParam->BSIM4v4voffcv); } break; case BSIM4v40: break; default: break; } /* Check capacitance parameters */ if (pParam->BSIM4v4clc < 0.0) { fprintf(fplog, "Fatal: Clc = %g is negative.\n", pParam->BSIM4v4clc); printf("Fatal: Clc = %g is negative.\n", pParam->BSIM4v4clc); Fatal_Flag = 1; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4v4moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v4moin); } if (pParam->BSIM4v4moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4v4moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v4moin); } if(model->BSIM4v4capMod ==2) { if (pParam->BSIM4v4acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4v4acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v4acde); } if (pParam->BSIM4v4acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4v4acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v4acde); } } break; case BSIM4v40: break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v40: /* Check overlap capacitance parameters */ if (pParam->BSIM4v4ckappas < 0.02) { fprintf(fplog, "Warning: ckappas = %g is too small. Set to 0.02\n", pParam->BSIM4v4ckappas); printf("Warning: ckappas = %g is too small.\n", pParam->BSIM4v4ckappas); pParam->BSIM4v4ckappas = 0.02; } if (pParam->BSIM4v4ckappad < 0.02) { fprintf(fplog, "Warning: ckappad = %g is too small. Set to 0.02\n", pParam->BSIM4v4ckappad); printf("Warning: ckappad = %g is too small.\n", pParam->BSIM4v4ckappad); pParam->BSIM4v4ckappad = 0.02; } break; default: break; } if (model->BSIM4v4paramChk ==1) { /* Check L and W parameters */ if (pParam->BSIM4v4leff <= 1.0e-9) { fprintf(fplog, "Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v4leff); printf("Warning: Leff = %g <= 1.0e-9. Recommended Leff >= 1e-8 \n", pParam->BSIM4v4leff); } if (pParam->BSIM4v4leffCV <= 1.0e-9) { fprintf(fplog, "Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v4leffCV); printf("Warning: Leff for CV = %g <= 1.0e-9. Recommended LeffCV >=1e-8 \n", pParam->BSIM4v4leffCV); } if (pParam->BSIM4v4weff <= 1.0e-9) { fprintf(fplog, "Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v4weff); printf("Warning: Weff = %g <= 1.0e-9. Recommended Weff >=1e-7 \n", pParam->BSIM4v4weff); } if (pParam->BSIM4v4weffCV <= 1.0e-9) { fprintf(fplog, "Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v4weffCV); printf("Warning: Weff for CV = %g <= 1.0e-9. Recommended WeffCV >= 1e-7 \n", pParam->BSIM4v4weffCV); } /* Check threshold voltage parameters */ if (model->BSIM4v4toxe < 1.0e-10) { fprintf(fplog, "Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v4toxe); printf("Warning: Toxe = %g is less than 1A. Recommended Toxe >= 5A\n", model->BSIM4v4toxe); } if (model->BSIM4v4toxp < 1.0e-10) { fprintf(fplog, "Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v4toxp); printf("Warning: Toxp = %g is less than 1A. Recommended Toxp >= 5A\n", model->BSIM4v4toxp); } if (model->BSIM4v4toxm < 1.0e-10) { fprintf(fplog, "Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v4toxm); printf("Warning: Toxm = %g is less than 1A. Recommended Toxm >= 5A\n", model->BSIM4v4toxm); } if (pParam->BSIM4v4ndep <= 1.0e12) { fprintf(fplog, "Warning: Ndep = %g may be too small.\n", pParam->BSIM4v4ndep); printf("Warning: Ndep = %g may be too small.\n", pParam->BSIM4v4ndep); } else if (pParam->BSIM4v4ndep >= 1.0e21) { fprintf(fplog, "Warning: Ndep = %g may be too large.\n", pParam->BSIM4v4ndep); printf("Warning: Ndep = %g may be too large.\n", pParam->BSIM4v4ndep); } if (pParam->BSIM4v4nsub <= 1.0e14) { fprintf(fplog, "Warning: Nsub = %g may be too small.\n", pParam->BSIM4v4nsub); printf("Warning: Nsub = %g may be too small.\n", pParam->BSIM4v4nsub); } else if (pParam->BSIM4v4nsub >= 1.0e21) { fprintf(fplog, "Warning: Nsub = %g may be too large.\n", pParam->BSIM4v4nsub); printf("Warning: Nsub = %g may be too large.\n", pParam->BSIM4v4nsub); } if ((pParam->BSIM4v4ngate > 0.0) && (pParam->BSIM4v4ngate <= 1.e18)) { fprintf(fplog, "Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v4ngate); printf("Warning: Ngate = %g is less than 1.E18cm^-3.\n", pParam->BSIM4v4ngate); } if (pParam->BSIM4v4dvt0 < 0.0) { fprintf(fplog, "Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v4dvt0); printf("Warning: Dvt0 = %g is negative.\n", pParam->BSIM4v4dvt0); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (fabs(1.0e-6 / (pParam->BSIM4v4w0 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } break; case BSIM4v40: if (fabs(1.0e-8 / (pParam->BSIM4v4w0 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (W0 + Weff) may be too small.\n"); printf("Warning: (W0 + Weff) may be too small.\n"); } break; default: break; } /* Check subthreshold parameters */ if (pParam->BSIM4v4nfactor < 0.0) { fprintf(fplog, "Warning: Nfactor = %g is negative.\n", pParam->BSIM4v4nfactor); printf("Warning: Nfactor = %g is negative.\n", pParam->BSIM4v4nfactor); } if (pParam->BSIM4v4cdsc < 0.0) { fprintf(fplog, "Warning: Cdsc = %g is negative.\n", pParam->BSIM4v4cdsc); printf("Warning: Cdsc = %g is negative.\n", pParam->BSIM4v4cdsc); } if (pParam->BSIM4v4cdscd < 0.0) { fprintf(fplog, "Warning: Cdscd = %g is negative.\n", pParam->BSIM4v4cdscd); printf("Warning: Cdscd = %g is negative.\n", pParam->BSIM4v4cdscd); } /* Check DIBL parameters */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: if (pParam->BSIM4v4eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", pParam->BSIM4v4eta0); printf("Warning: Eta0 = %g is negative.\n", pParam->BSIM4v4eta0); } break; case BSIM4v40: if (here->BSIM4v4eta0 < 0.0) { fprintf(fplog, "Warning: Eta0 = %g is negative.\n", here->BSIM4v4eta0); printf("Warning: Eta0 = %g is negative.\n", here->BSIM4v4eta0); } break; default: break; } /* Check Abulk parameters */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (fabs(1.0e-6 / (pParam->BSIM4v4b1 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } break; case BSIM4v40: if (fabs(1.0e-8 / (pParam->BSIM4v4b1 + pParam->BSIM4v4weff)) > 10.0) { fprintf(fplog, "Warning: (B1 + Weff) may be too small.\n"); printf("Warning: (B1 + Weff) may be too small.\n"); } break; default: break; } /* Check Saturation parameters */ if (pParam->BSIM4v4a2 < 0.01) { fprintf(fplog, "Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v4a2); printf("Warning: A2 = %g is too small. Set to 0.01.\n", pParam->BSIM4v4a2); pParam->BSIM4v4a2 = 0.01; } else if (pParam->BSIM4v4a2 > 1.0) { fprintf(fplog, "Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v4a2); printf("Warning: A2 = %g is larger than 1. A2 is set to 1 and A1 is set to 0.\n", pParam->BSIM4v4a2); pParam->BSIM4v4a2 = 1.0; pParam->BSIM4v4a1 = 0.0; } if (pParam->BSIM4v4prwg < 0.0) { fprintf(fplog, "Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v4prwg); printf("Warning: Prwg = %g is negative. Set to zero.\n", pParam->BSIM4v4prwg); pParam->BSIM4v4prwg = 0.0; } if (pParam->BSIM4v4rdsw < 0.0) { fprintf(fplog, "Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v4rdsw); printf("Warning: Rdsw = %g is negative. Set to zero.\n", pParam->BSIM4v4rdsw); pParam->BSIM4v4rdsw = 0.0; pParam->BSIM4v4rds0 = 0.0; } if (pParam->BSIM4v4rds0 < 0.0) { fprintf(fplog, "Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v4rds0); printf("Warning: Rds at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v4rds0); pParam->BSIM4v4rds0 = 0.0; } if (pParam->BSIM4v4rdswmin < 0.0) { fprintf(fplog, "Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v4rdswmin); printf("Warning: Rdswmin at current temperature = %g is negative. Set to zero.\n", pParam->BSIM4v4rdswmin); pParam->BSIM4v4rdswmin = 0.0; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (pParam->BSIM4v4pscbe2 <= 0.0) { fprintf(fplog, "Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v4pscbe2); printf("Warning: Pscbe2 = %g is not positive.\n", pParam->BSIM4v4pscbe2); } break; default: break; } if (pParam->BSIM4v4vsattemp < 1.0e3) { fprintf(fplog, "Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v4vsattemp); printf("Warning: Vsat at current temperature = %g may be too small.\n", pParam->BSIM4v4vsattemp); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if((model->BSIM4v4lambdaGiven) && (pParam->BSIM4v4lambda > 0.0) ) { if (pParam->BSIM4v4lambda > 1.0e-9) { fprintf(fplog, "Warning: Lambda = %g may be too large.\n", pParam->BSIM4v4lambda); printf("Warning: Lambda = %g may be too large.\n", pParam->BSIM4v4lambda); } } if((model->BSIM4v4vtlGiven) && (pParam->BSIM4v4vtl > 0.0) ) { if (pParam->BSIM4v4vtl < 6.0e4) { fprintf(fplog, "Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v4vtl); printf("Warning: Thermal velocity vtl = %g may be too small.\n", pParam->BSIM4v4vtl); } if (pParam->BSIM4v4xn < 3.0) { fprintf(fplog, "Warning: back scattering coeff xn = %g is too small.\n", pParam->BSIM4v4xn); printf("Warning: back scattering coeff xn = %g is too small. Reset to 3.0 \n", pParam->BSIM4v4xn); pParam->BSIM4v4xn = 3.0; } if (model->BSIM4v4lc < 0.0) { fprintf(fplog, "Warning: back scattering coeff lc = %g is too small.\n", model->BSIM4v4lc); printf("Warning: back scattering coeff lc = %g is too small. Reset to 0.0\n", model->BSIM4v4lc); pParam->BSIM4v4lc = 0.0; } } break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4fprout < 0.0) { fprintf(fplog, "Fatal: fprout = %g is negative.\n", pParam->BSIM4v4fprout); printf("Fatal: fprout = %g is negative.\n", pParam->BSIM4v4fprout); Fatal_Flag = 1; } if (pParam->BSIM4v4pdits < 0.0) { fprintf(fplog, "Fatal: pdits = %g is negative.\n", pParam->BSIM4v4pdits); printf("Fatal: pdits = %g is negative.\n", pParam->BSIM4v4pdits); Fatal_Flag = 1; } if (model->BSIM4v4pditsl < 0.0) { fprintf(fplog, "Fatal: pditsl = %g is negative.\n", model->BSIM4v4pditsl); printf("Fatal: pditsl = %g is negative.\n", model->BSIM4v4pditsl); Fatal_Flag = 1; } break; case BSIM4v40: break; default: break; } if (pParam->BSIM4v4pdibl1 < 0.0) { fprintf(fplog, "Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v4pdibl1); printf("Warning: Pdibl1 = %g is negative.\n", pParam->BSIM4v4pdibl1); } if (pParam->BSIM4v4pdibl2 < 0.0) { fprintf(fplog, "Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v4pdibl2); printf("Warning: Pdibl2 = %g is negative.\n", pParam->BSIM4v4pdibl2); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (pParam->BSIM4v4nigbinv <= 0.0) { fprintf(fplog, "Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v4nigbinv); printf("Fatal: nigbinv = %g is non-positive.\n", pParam->BSIM4v4nigbinv); Fatal_Flag = 1; } if (pParam->BSIM4v4nigbacc <= 0.0) { fprintf(fplog, "Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v4nigbacc); printf("Fatal: nigbacc = %g is non-positive.\n", pParam->BSIM4v4nigbacc); Fatal_Flag = 1; } if (pParam->BSIM4v4nigc <= 0.0) { fprintf(fplog, "Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v4nigc); printf("Fatal: nigc = %g is non-positive.\n", pParam->BSIM4v4nigc); Fatal_Flag = 1; } if (pParam->BSIM4v4poxedge <= 0.0) { fprintf(fplog, "Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v4poxedge); printf("Fatal: poxedge = %g is non-positive.\n", pParam->BSIM4v4poxedge); Fatal_Flag = 1; } if (pParam->BSIM4v4pigcd <= 0.0) { fprintf(fplog, "Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v4pigcd); printf("Fatal: pigcd = %g is non-positive.\n", pParam->BSIM4v4pigcd); Fatal_Flag = 1; } break; case BSIM4v40: /* Check stress effect parameters */ if((here->BSIM4v4sa > 0.0) && (here->BSIM4v4sb > 0.0) && ((here->BSIM4v4nf == 1.0) || ((here->BSIM4v4nf > 1.0) && (here->BSIM4v4sd > 0.0))) ) { if (model->BSIM4v4lodk2 <= 0.0) { fprintf(fplog, "Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); printf("Warning: LODK2 = %g is not positive.\n",model->BSIM4v4lodk2); } if (model->BSIM4v4lodeta0 <= 0.0) { fprintf(fplog, "Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); printf("Warning: LODETA0 = %g is not positive.\n",model->BSIM4v4lodeta0); } } break; default: break; } /* Check gate resistance parameters */ if (here->BSIM4v4rgateMod == 1) { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 1.\n"); } else if (here->BSIM4v4rgateMod == 2) { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg <= 0.0 for rgateMod = 2.\n"); else if (pParam->BSIM4v4xrcrg1 <= 0.0) printf("Warning: xrcrg1 <= 0.0 for rgateMod = 2.\n"); } if (here->BSIM4v4rgateMod == 3) { if (model->BSIM4v4rshg <= 0.0) printf("Warning: rshg should be positive for rgateMod = 3.\n"); else if (pParam->BSIM4v4xrcrg1 <= 0.0) printf("Warning: xrcrg1 should be positive for rgateMod = 3.\n"); } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: /* Check capacitance parameters */ if (pParam->BSIM4v4noff < 0.1) { fprintf(fplog, "Warning: Noff = %g is too small.\n", pParam->BSIM4v4noff); printf("Warning: Noff = %g is too small.\n", pParam->BSIM4v4noff); } if (pParam->BSIM4v4voffcv < -0.5) { fprintf(fplog, "Warning: Voffcv = %g is too small.\n", pParam->BSIM4v4voffcv); printf("Warning: Voffcv = %g is too small.\n", pParam->BSIM4v4voffcv); } if (pParam->BSIM4v4moin < 5.0) { fprintf(fplog, "Warning: Moin = %g is too small.\n", pParam->BSIM4v4moin); printf("Warning: Moin = %g is too small.\n", pParam->BSIM4v4moin); } if (pParam->BSIM4v4moin > 25.0) { fprintf(fplog, "Warning: Moin = %g is too large.\n", pParam->BSIM4v4moin); printf("Warning: Moin = %g is too large.\n", pParam->BSIM4v4moin); } if(model->BSIM4v4capMod ==2) { if (pParam->BSIM4v4acde < 0.1) { fprintf(fplog, "Warning: Acde = %g is too small.\n", pParam->BSIM4v4acde); printf("Warning: Acde = %g is too small.\n", pParam->BSIM4v4acde); } if (pParam->BSIM4v4acde > 1.6) { fprintf(fplog, "Warning: Acde = %g is too large.\n", pParam->BSIM4v4acde); printf("Warning: Acde = %g is too large.\n", pParam->BSIM4v4acde); } } break; default: break; } /* Check overlap capacitance parameters */ if (model->BSIM4v4cgdo < 0.0) { fprintf(fplog, "Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v4cgdo); printf("Warning: cgdo = %g is negative. Set to zero.\n", model->BSIM4v4cgdo); model->BSIM4v4cgdo = 0.0; } if (model->BSIM4v4cgso < 0.0) { fprintf(fplog, "Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v4cgso); printf("Warning: cgso = %g is negative. Set to zero.\n", model->BSIM4v4cgso); model->BSIM4v4cgso = 0.0; } if (model->BSIM4v4tnoiMod == 1) { if (model->BSIM4v4tnoia < 0.0) { fprintf(fplog, "Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v4tnoia); printf("Warning: tnoia = %g is negative. Set to zero.\n", model->BSIM4v4tnoia); model->BSIM4v4tnoia = 0.0; } if (model->BSIM4v4tnoib < 0.0) { fprintf(fplog, "Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v4tnoib); printf("Warning: tnoib = %g is negative. Set to zero.\n", model->BSIM4v4tnoib); model->BSIM4v4tnoib = 0.0; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (model->BSIM4v4rnoia < 0.0) { fprintf(fplog, "Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v4rnoia); printf("Warning: rnoia = %g is negative. Set to zero.\n", model->BSIM4v4rnoia); model->BSIM4v4rnoia = 0.0; } if (model->BSIM4v4rnoib < 0.0) { fprintf(fplog, "Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v4rnoib); printf("Warning: rnoib = %g is negative. Set to zero.\n", model->BSIM4v4rnoib); model->BSIM4v4rnoib = 0.0; } break; default: break; } } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (model->BSIM4v4SjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njs = %g is negative.\n", model->BSIM4v4SjctEmissionCoeff); printf("Warning: Njs = %g is negative.\n", model->BSIM4v4SjctEmissionCoeff); } if (model->BSIM4v4DjctEmissionCoeff < 0.0) { fprintf(fplog, "Warning: Njd = %g is negative.\n", model->BSIM4v4DjctEmissionCoeff); printf("Warning: Njd = %g is negative.\n", model->BSIM4v4DjctEmissionCoeff); } if (model->BSIM4v4njtstemp < 0.0) { fprintf(fplog, "Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v4njtstemp, ckt->CKTtemp); printf("Warning: Njts = %g is negative at temperature = %g.\n", model->BSIM4v4njtstemp, ckt->CKTtemp); } if (model->BSIM4v4njtsswtemp < 0.0) { fprintf(fplog, "Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v4njtsswtemp, ckt->CKTtemp); printf("Warning: Njtssw = %g is negative at temperature = %g.\n", model->BSIM4v4njtsswtemp, ckt->CKTtemp); } if (model->BSIM4v4njtsswgtemp < 0.0) { fprintf(fplog, "Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v4njtsswgtemp, ckt->CKTtemp); printf("Warning: Njtsswg = %g is negative at temperature = %g.\n", model->BSIM4v4njtsswgtemp, ckt->CKTtemp); } if (model->BSIM4v4vtss < 0.0) { fprintf(fplog, "Warning: Vtss = %g is negative.\n", model->BSIM4v4vtss); printf("Warning: Vtss = %g is negative.\n", model->BSIM4v4vtss); } if (model->BSIM4v4vtsd < 0.0) { fprintf(fplog, "Warning: Vtsd = %g is negative.\n", model->BSIM4v4vtsd); printf("Warning: Vtsd = %g is negative.\n", model->BSIM4v4vtsd); } if (model->BSIM4v4vtssws < 0.0) { fprintf(fplog, "Warning: Vtssws = %g is negative.\n", model->BSIM4v4vtssws); printf("Warning: Vtssws = %g is negative.\n", model->BSIM4v4vtssws); } if (model->BSIM4v4vtsswd < 0.0) { fprintf(fplog, "Warning: Vtsswd = %g is negative.\n", model->BSIM4v4vtsswd); printf("Warning: Vtsswd = %g is negative.\n", model->BSIM4v4vtsswd); } if (model->BSIM4v4vtsswgs < 0.0) { fprintf(fplog, "Warning: Vtsswgs = %g is negative.\n", model->BSIM4v4vtsswgs); printf("Warning: Vtsswgs = %g is negative.\n", model->BSIM4v4vtsswgs); } if (model->BSIM4v4vtsswgd < 0.0) { fprintf(fplog, "Warning: Vtsswgd = %g is negative.\n", model->BSIM4v4vtsswgd); printf("Warning: Vtsswgd = %g is negative.\n", model->BSIM4v4vtsswgd); } break; default: break; } if (model->BSIM4v4ntnoi < 0.0) { fprintf(fplog, "Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v4ntnoi); printf("Warning: ntnoi = %g is negative. Set to zero.\n", model->BSIM4v4ntnoi); model->BSIM4v4ntnoi = 0.0; } }/* loop for the parameter check for warning messages */ fclose(fplog); } else { fprintf(stderr, "Warning: Can't open log file. Parameter checking skipped.\n"); } return(Fatal_Flag); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4par.c0000644000265600020320000001304412264261473021154 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4par.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/fteext.h" int BSIM4v4param( int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; BSIM4v4instance *here = (BSIM4v4instance*)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case BSIM4v4_W: here->BSIM4v4w = value->rValue*scale; here->BSIM4v4wGiven = TRUE; break; case BSIM4v4_L: here->BSIM4v4l = value->rValue*scale; here->BSIM4v4lGiven = TRUE; break; case BSIM4v4_M: here->BSIM4v4m = value->rValue; here->BSIM4v4mGiven = TRUE; break; case BSIM4v4_NF: here->BSIM4v4nf = value->rValue; here->BSIM4v4nfGiven = TRUE; break; case BSIM4v4_MIN: here->BSIM4v4min = value->iValue; here->BSIM4v4minGiven = TRUE; break; case BSIM4v4_AS: here->BSIM4v4sourceArea = value->rValue*scale*scale; here->BSIM4v4sourceAreaGiven = TRUE; break; case BSIM4v4_AD: here->BSIM4v4drainArea = value->rValue*scale*scale; here->BSIM4v4drainAreaGiven = TRUE; break; case BSIM4v4_PS: here->BSIM4v4sourcePerimeter = value->rValue*scale; here->BSIM4v4sourcePerimeterGiven = TRUE; break; case BSIM4v4_PD: here->BSIM4v4drainPerimeter = value->rValue*scale; here->BSIM4v4drainPerimeterGiven = TRUE; break; case BSIM4v4_NRS: here->BSIM4v4sourceSquares = value->rValue; here->BSIM4v4sourceSquaresGiven = TRUE; break; case BSIM4v4_NRD: here->BSIM4v4drainSquares = value->rValue; here->BSIM4v4drainSquaresGiven = TRUE; break; case BSIM4v4_OFF: here->BSIM4v4off = value->iValue; break; case BSIM4v4_SA: here->BSIM4v4sa = value->rValue*scale; here->BSIM4v4saGiven = TRUE; break; case BSIM4v4_SB: here->BSIM4v4sb = value->rValue*scale; here->BSIM4v4sbGiven = TRUE; break; case BSIM4v4_SD: here->BSIM4v4sd = value->rValue*scale; here->BSIM4v4sdGiven = TRUE; break; case BSIM4v4_RBSB: here->BSIM4v4rbsb = value->rValue; here->BSIM4v4rbsbGiven = TRUE; break; case BSIM4v4_RBDB: here->BSIM4v4rbdb = value->rValue; here->BSIM4v4rbdbGiven = TRUE; break; case BSIM4v4_RBPB: here->BSIM4v4rbpb = value->rValue; here->BSIM4v4rbpbGiven = TRUE; break; case BSIM4v4_RBPS: here->BSIM4v4rbps = value->rValue; here->BSIM4v4rbpsGiven = TRUE; break; case BSIM4v4_RBPD: here->BSIM4v4rbpd = value->rValue; here->BSIM4v4rbpdGiven = TRUE; break; case BSIM4v4_TRNQSMOD: here->BSIM4v4trnqsMod = value->iValue; here->BSIM4v4trnqsModGiven = TRUE; break; case BSIM4v4_ACNQSMOD: here->BSIM4v4acnqsMod = value->iValue; here->BSIM4v4acnqsModGiven = TRUE; break; case BSIM4v4_RBODYMOD: here->BSIM4v4rbodyMod = value->iValue; here->BSIM4v4rbodyModGiven = TRUE; break; case BSIM4v4_RGATEMOD: here->BSIM4v4rgateMod = value->iValue; here->BSIM4v4rgateModGiven = TRUE; break; case BSIM4v4_GEOMOD: here->BSIM4v4geoMod = value->iValue; here->BSIM4v4geoModGiven = TRUE; break; case BSIM4v4_RGEOMOD: here->BSIM4v4rgeoMod = value->iValue; here->BSIM4v4rgeoModGiven = TRUE; break; case BSIM4v4_IC_VDS: here->BSIM4v4icVDS = value->rValue; here->BSIM4v4icVDSGiven = TRUE; break; case BSIM4v4_IC_VGS: here->BSIM4v4icVGS = value->rValue; here->BSIM4v4icVGSGiven = TRUE; break; case BSIM4v4_IC_VBS: here->BSIM4v4icVBS = value->rValue; here->BSIM4v4icVBSGiven = TRUE; break; case BSIM4v4_IC: switch(value->v.numValue) { case 3: here->BSIM4v4icVBS = *(value->v.vec.rVec+2); here->BSIM4v4icVBSGiven = TRUE; case 2: here->BSIM4v4icVGS = *(value->v.vec.rVec+1); here->BSIM4v4icVGSGiven = TRUE; case 1: here->BSIM4v4icVDS = *(value->v.vec.rVec); here->BSIM4v4icVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4acld.c0000644000265600020320000007064312264261473021305 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4acld.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 10/05/2001. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4acLoad( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; double gjbd, gjbs, geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb; double xcbgb, xcbdb, xcbsb, xcbbb; double xcggbr, xcgdbr, xcgsbr, xcgbbr, xcggbi, xcgdbi, xcgsbi, xcgbbi; double Cggr, Cgdr, Cgsr, Cgbr, Cggi, Cgdi, Cgsi, Cgbi; double xcddbr, xcdgbr, xcdsbr, xcdbbr, xcsdbr, xcsgbr, xcssbr, xcsbbr; double xcddbi, xcdgbi, xcdsbi, xcdbbi, xcsdbi, xcsgbi, xcssbi, xcsbbi; double xcdbdb, xcsbsb=0.0, xcgmgmb=0.0, xcgmdb=0.0, xcgmsb=0.0, xcdgmb, xcsgmb; double xcgmbb=0.0, xcbgmb; double capbd, capbs, omega; double gstot, gstotd, gstotg, gstots, gstotb, gspr; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double gIstotg, gIstotd, gIstots, gIstotb; double gIdtotg, gIdtotd, gIdtots, gIdtotb; double gIbtotg, gIbtotd, gIbtots, gIbtotb; double gIgtotg, gIgtotd, gIgtots, gIgtotb; double cgso, cgdo, cgbo; double gbspsp, gbbdp, gbbsp, gbspg, gbspb; double gbspdp, gbdpdp, gbdpg, gbdpb, gbdpsp; double T0=0.0, T1, T2, T3; double Csg, Csd, Css; double Cdgr, Cddr, Cdsr, Cdbr, Csgr, Csdr, Cssr, Csbr; double Cdgi, Cddi, Cdsi, Cdbi, Csgi, Csdi, Cssi, Csbi; double gmr, gmi, gmbsr, gmbsi, gdsr, gdsi; double FwdSumr, RevSumr, Gmr, Gmbsr; double FwdSumi, RevSumi, Gmi, Gmbsi; struct bsim4SizeDependParam *pParam; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double m; omega = ckt->CKTomega; for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here!= NULL; here = here->BSIM4v4nextInstance) { pParam = here->pParam; capbd = here->BSIM4v4capbd; capbs = here->BSIM4v4capbs; cgso = here->BSIM4v4cgso; cgdo = here->BSIM4v4cgdo; cgbo = pParam->BSIM4v4cgbo; Csd = -(here->BSIM4v4cddb + here->BSIM4v4cgdb + here->BSIM4v4cbdb); Csg = -(here->BSIM4v4cdgb + here->BSIM4v4cggb + here->BSIM4v4cbgb); Css = -(here->BSIM4v4cdsb + here->BSIM4v4cgsb + here->BSIM4v4cbsb); if (here->BSIM4v4acnqsMod) { T0 = omega * here->BSIM4v4taunet; T1 = T0 * T0; T2 = 1.0 / (1.0 + T1); T3 = T0 * T2; gmr = here->BSIM4v4gm * T2; gmbsr = here->BSIM4v4gmbs * T2; gdsr = here->BSIM4v4gds * T2; gmi = -here->BSIM4v4gm * T3; gmbsi = -here->BSIM4v4gmbs * T3; gdsi = -here->BSIM4v4gds * T3; Cddr = here->BSIM4v4cddb * T2; Cdgr = here->BSIM4v4cdgb * T2; Cdsr = here->BSIM4v4cdsb * T2; Cdbr = -(Cddr + Cdgr + Cdsr); /* WDLiu: Cxyi mulitplied by jomega below, and actually to be of conductance */ Cddi = here->BSIM4v4cddb * T3 * omega; Cdgi = here->BSIM4v4cdgb * T3 * omega; Cdsi = here->BSIM4v4cdsb * T3 * omega; Cdbi = -(Cddi + Cdgi + Cdsi); Csdr = Csd * T2; Csgr = Csg * T2; Cssr = Css * T2; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csd * T3 * omega; Csgi = Csg * T3 * omega; Cssi = Css * T3 * omega; Csbi = -(Csdi + Csgi + Cssi); Cgdr = -(Cddr + Csdr + here->BSIM4v4cbdb); Cggr = -(Cdgr + Csgr + here->BSIM4v4cbgb); Cgsr = -(Cdsr + Cssr + here->BSIM4v4cbsb); Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = -(Cddi + Csdi); Cggi = -(Cdgi + Csgi); Cgsi = -(Cdsi + Cssi); Cgbi = -(Cgdi + Cggi + Cgsi); } else /* QS */ { gmr = here->BSIM4v4gm; gmbsr = here->BSIM4v4gmbs; gdsr = here->BSIM4v4gds; gmi = gmbsi = gdsi = 0.0; Cddr = here->BSIM4v4cddb; Cdgr = here->BSIM4v4cdgb; Cdsr = here->BSIM4v4cdsb; Cdbr = -(Cddr + Cdgr + Cdsr); Cddi = Cdgi = Cdsi = Cdbi = 0.0; Csdr = Csd; Csgr = Csg; Cssr = Css; Csbr = -(Csdr + Csgr + Cssr); Csdi = Csgi = Cssi = Csbi = 0.0; Cgdr = here->BSIM4v4cgdb; Cggr = here->BSIM4v4cggb; Cgsr = here->BSIM4v4cgsb; Cgbr = -(Cgdr + Cggr + Cgsr); Cgdi = Cggi = Cgsi = Cgbi = 0.0; } if (here->BSIM4v4mode >= 0) { Gmr = gmr; Gmbsr = gmbsr; FwdSumr = Gmr + Gmbsr; RevSumr = 0.0; Gmi = gmi; Gmbsi = gmbsi; FwdSumi = Gmi + Gmbsi; RevSumi = 0.0; gbbdp = -(here->BSIM4v4gbds); gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = here->BSIM4v4gbgs; gbdpdp = here->BSIM4v4gbds; gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspdp = 0.0; gbspg = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; gIstotd = here->BSIM4v4gIgcsd; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; gIstotb = here->BSIM4v4gIgcsb; gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; gIdtots = here->BSIM4v4gIgcds; gIdtotb = here->BSIM4v4gIgcdb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbd; gIbtots = here->BSIM4v4gIgbs; gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); else if (here->BSIM4v4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgd * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgs * T0; gcrgb = here->BSIM4v4gcrgb * T0; gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v4rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgdr * omega; xcgsbr = Cgsr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Cdgr * omega; xcsgbr = Csgr * omega; xcbgb = here->BSIM4v4cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v4cgbo ) * omega; xcgdbr = (Cgdr - cgdo) * omega; xcgsbr = (Cgsr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Cdgr - cgdo) * omega; xcsgbr = (Csgr - cgso) * omega; xcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (Cddr + here->BSIM4v4capbd + cgdo) * omega; xcdsbr = Cdsr * omega; xcsdbr = Csdr * omega; xcssbr = (here->BSIM4v4capbs + cgso + Cssr) * omega; if (!here->BSIM4v4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v4cbdb - here->BSIM4v4capbd) * omega; xcbsb = (here->BSIM4v4cbsb - here->BSIM4v4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = Cdbr * omega; xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb) + here->BSIM4v4capbs * omega; xcbdb = here->BSIM4v4cbdb * omega; xcbsb = here->BSIM4v4cbsb * omega; xcdbdb = -here->BSIM4v4capbd * omega; xcsbsb = -here->BSIM4v4capbs * omega; } xcbbb = -(xcbdb + xcbgb + xcbsb + xcbgmb); xcdgbi = Cdgi; xcsgbi = Csgi; xcddbi = Cddi; xcdsbi = Cdsi; xcsdbi = Csdi; xcssbi = Cssi; xcdbbi = Cdbi; xcsbbi = Csbi; xcggbi = Cggi; xcgdbi = Cgdi; xcgsbi = Cgsi; xcgbbi = Cgbi; } else /* Reverse mode */ { Gmr = -gmr; Gmbsr = -gmbsr; FwdSumr = 0.0; RevSumr = -(Gmr + Gmbsr); Gmi = -gmi; Gmbsi = -gmbsi; FwdSumi = 0.0; RevSumi = -(Gmi + Gmbsi); gbbsp = -(here->BSIM4v4gbds); gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v4gbgs; gbspsp = here->BSIM4v4gbds; gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; gIstotd = here->BSIM4v4gIgcds; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; gIstotb = here->BSIM4v4gIgcdb; gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; gIdtots = here->BSIM4v4gIgcsd; gIdtotb = here->BSIM4v4gIgcsb; } else { gIstotg = gIstotd = gIstots = gIstotb = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbs; gIbtots = here->BSIM4v4gIgbd; gIbtotb = here->BSIM4v4gIgbb; } else gIbtotg = gIbtotd = gIbtots = gIbtotb = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vges) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); else if (here->BSIM4v4rgateMod == 3) T0 = *(ckt->CKTstates[0] + here->BSIM4v4vgms) - *(ckt->CKTstates[0] + here->BSIM4v4vgs); if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgs * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgd * T0; gcrgb = here->BSIM4v4gcrgb * T0; gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; if (here->BSIM4v4rgateMod == 3) { xcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * omega; xcgmdb = -cgdo * omega; xcgmsb = -cgso * omega; xcgmbb = -pParam->BSIM4v4cgbo * omega; xcdgmb = xcgmdb; xcsgmb = xcgmsb; xcbgmb = xcgmbb; xcggbr = Cggr * omega; xcgdbr = Cgsr * omega; xcgsbr = Cgdr * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = Csgr * omega; xcsgbr = Cdgr * omega; xcbgb = here->BSIM4v4cbgb * omega; } else { xcggbr = (Cggr + cgdo + cgso + pParam->BSIM4v4cgbo ) * omega; xcgdbr = (Cgsr - cgdo) * omega; xcgsbr = (Cgdr - cgso) * omega; xcgbbr = -(xcggbr + xcgdbr + xcgsbr); xcdgbr = (Csgr - cgdo) * omega; xcsgbr = (Cdgr - cgso) * omega; xcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * omega; xcdgmb = xcsgmb = xcbgmb = 0.0; } xcddbr = (here->BSIM4v4capbd + cgdo + Cssr) * omega; xcdsbr = Csdr * omega; xcsdbr = Cdsr * omega; xcssbr = (Cddr + here->BSIM4v4capbs + cgso) * omega; if (!here->BSIM4v4rbodyMod) { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb); xcsbbr = -(xcsgbr + xcsdbr + xcssbr + xcsgmb); xcbdb = (here->BSIM4v4cbsb - here->BSIM4v4capbd) * omega; xcbsb = (here->BSIM4v4cbdb - here->BSIM4v4capbs) * omega; xcdbdb = 0.0; } else { xcdbbr = -(xcdgbr + xcddbr + xcdsbr + xcdgmb) + here->BSIM4v4capbd * omega; xcsbbr = Cdbr * omega; xcbdb = here->BSIM4v4cbsb * omega; xcbsb = here->BSIM4v4cbdb * omega; xcdbdb = -here->BSIM4v4capbd * omega; xcsbsb = -here->BSIM4v4capbs * omega; } xcbbb = -(xcbgb + xcbdb + xcbsb + xcbgmb); xcdgbi = Csgi; xcsgbi = Cdgi; xcddbi = Cssi; xcdsbi = Csdi; xcsdbi = Cdsi; xcssbi = Cddi; xcdbbi = Csbi; xcsbbi = Cdbi; xcggbi = Cggi; xcgdbi = Cgsi; xcgsbi = Cgdi; xcgbbi = Cgbi; } if (model->BSIM4v4rdsMod == 1) { gstot = here->BSIM4v4gstot; gstotd = here->BSIM4v4gstotd; gstotg = here->BSIM4v4gstotg; gstots = here->BSIM4v4gstots - gstot; gstotb = here->BSIM4v4gstotb; gdtot = here->BSIM4v4gdtot; gdtotd = here->BSIM4v4gdtotd - gdtot; gdtotg = here->BSIM4v4gdtotg; gdtots = here->BSIM4v4gdtots; gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = 0.0; } /* * Loading AC matrix */ m = here->BSIM4v4m; if (!model->BSIM4v4rdsMod) { gdpr = here->BSIM4v4drainConductance; gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; if (!here->BSIM4v4rbodyMod) { gjbd = here->BSIM4v4gbd; gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; geltd = here->BSIM4v4grgeltd; if (here->BSIM4v4rgateMod == 1) { *(here->BSIM4v4GEgePtr) += m * geltd; *(here->BSIM4v4GPgePtr) -= m * geltd; *(here->BSIM4v4GEgpPtr) -= m * geltd; *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; *(here->BSIM4v4GPgpPtr) += m * (geltd + xcggbi + gIgtotg); *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v4GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; *(here->BSIM4v4GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v4GPbpPtr) += m * (xcgbbi + gIgtotb); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v4rgateMod == 2) { *(here->BSIM4v4GEgePtr) += m * gcrg; *(here->BSIM4v4GEgpPtr) += m * gcrgg; *(here->BSIM4v4GEdpPtr) += m * gcrgd; *(here->BSIM4v4GEspPtr) += m * gcrgs; *(here->BSIM4v4GEbpPtr) += m * gcrgb; *(here->BSIM4v4GPgePtr) -= m * gcrg; *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; *(here->BSIM4v4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; *(here->BSIM4v4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); } else if (here->BSIM4v4rgateMod == 3) { *(here->BSIM4v4GEgePtr) += m * geltd; *(here->BSIM4v4GEgmPtr) -= m * geltd; *(here->BSIM4v4GMgePtr) -= m * geltd; *(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg); *(here->BSIM4v4GMgmPtr +1) += m * xcgmgmb; *(here->BSIM4v4GMdpPtr) += m * gcrgd; *(here->BSIM4v4GMdpPtr +1) += m * xcgmdb; *(here->BSIM4v4GMgpPtr) += m * gcrgg; *(here->BSIM4v4GMspPtr) += m * gcrgs; *(here->BSIM4v4GMspPtr +1) += m * xcgmsb; *(here->BSIM4v4GMbpPtr) += m * gcrgb; *(here->BSIM4v4GMbpPtr +1) += m * xcgmbb; *(here->BSIM4v4DPgmPtr +1) += m * xcdgmb; *(here->BSIM4v4GPgmPtr) -= m * gcrg; *(here->BSIM4v4SPgmPtr +1) += m * xcsgmb; *(here->BSIM4v4BPgmPtr +1) += m * xcbgmb; *(here->BSIM4v4GPgpPtr) -= m * (gcrgg - xcggbi - gIgtotg); *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; *(here->BSIM4v4GPdpPtr) -= m * (gcrgd - xcgdbi - gIgtotd); *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v4GPspPtr) -= m * (gcrgs - xcgsbi - gIgtots); *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; *(here->BSIM4v4GPbpPtr) -= m * (gcrgb - xcgbbi - gIgtotb); *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; } else { *(here->BSIM4v4GPgpPtr +1) += m * xcggbr; *(here->BSIM4v4GPgpPtr) += m * (xcggbi + gIgtotg); *(here->BSIM4v4GPdpPtr +1) += m * xcgdbr; *(here->BSIM4v4GPdpPtr) += m * (xcgdbi + gIgtotd); *(here->BSIM4v4GPspPtr +1) += m * xcgsbr; *(here->BSIM4v4GPspPtr) += m * (xcgsbi + gIgtots); *(here->BSIM4v4GPbpPtr +1) += m * xcgbbr; *(here->BSIM4v4GPbpPtr) += m * (xcgbbi + gIgtotb); } if (model->BSIM4v4rdsMod) { (*(here->BSIM4v4DgpPtr) += m * gdtotg); (*(here->BSIM4v4DspPtr) += m * gdtots); (*(here->BSIM4v4DbpPtr) += m * gdtotb); (*(here->BSIM4v4SdpPtr) += m * gstotd); (*(here->BSIM4v4SgpPtr) += m * gstotg); (*(here->BSIM4v4SbpPtr) += m * gstotb); } *(here->BSIM4v4DPdpPtr +1) += m * (xcddbr + gdsi + RevSumi); *(here->BSIM4v4DPdpPtr) += m * (gdpr + xcddbi + gdsr + here->BSIM4v4gbd - gdtotd + RevSumr + gbdpdp - gIdtotd); *(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot); *(here->BSIM4v4DPgpPtr +1) += m * (xcdgbr + Gmi); *(here->BSIM4v4DPgpPtr) += m * (Gmr + xcdgbi - gdtotg + gbdpg - gIdtotg); *(here->BSIM4v4DPspPtr +1) += m * (xcdsbr - gdsi - FwdSumi); *(here->BSIM4v4DPspPtr) -= m * (gdsr - xcdsbi + FwdSumr + gdtots - gbdpsp + gIdtots); *(here->BSIM4v4DPbpPtr +1) += m * (xcdbbr + Gmbsi); *(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - xcdbbi - Gmbsr - gbdpb + gIdtotb); *(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd); *(here->BSIM4v4DdPtr) += m * (gdpr + gdtot); *(here->BSIM4v4SPdpPtr +1) += m * (xcsdbr - gdsi - RevSumi); *(here->BSIM4v4SPdpPtr) -= m * (gdsr - xcsdbi + gstotd + RevSumr - gbspdp + gIstotd); *(here->BSIM4v4SPgpPtr +1) += m * (xcsgbr - Gmi); *(here->BSIM4v4SPgpPtr) -= m * (Gmr - xcsgbi + gstotg - gbspg + gIstotg); *(here->BSIM4v4SPspPtr +1) += m * (xcssbr + gdsi + FwdSumi); *(here->BSIM4v4SPspPtr) += m * (gspr + xcssbi + gdsr + here->BSIM4v4gbs - gstots + FwdSumr + gbspsp - gIstots); *(here->BSIM4v4SPsPtr) -= m * (gspr + gstot); *(here->BSIM4v4SPbpPtr +1) += m * (xcsbbr - Gmbsi); *(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb - xcsbbi + Gmbsr - gbspb + gIstotb); *(here->BSIM4v4SspPtr) -= m * (gspr - gstots); *(here->BSIM4v4SsPtr) += m * (gspr + gstot); *(here->BSIM4v4BPdpPtr +1) += m * xcbdb; *(here->BSIM4v4BPdpPtr) -= m * (gjbd - gbbdp + gIbtotd); *(here->BSIM4v4BPgpPtr +1) += m * xcbgb; *(here->BSIM4v4BPgpPtr) -= m * (here->BSIM4v4gbgs + gIbtotg); *(here->BSIM4v4BPspPtr +1) += m * xcbsb; *(here->BSIM4v4BPspPtr) -= m * (gjbs - gbbsp + gIbtots); *(here->BSIM4v4BPbpPtr +1) += m * xcbbb; *(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs - here->BSIM4v4gbbs - gIbtotb); ggidld = here->BSIM4v4ggidld; ggidlg = here->BSIM4v4ggidlg; ggidlb = here->BSIM4v4ggidlb; ggislg = here->BSIM4v4ggislg; ggisls = here->BSIM4v4ggisls; ggislb = here->BSIM4v4ggislb; /* stamp gidl */ (*(here->BSIM4v4DPdpPtr) += m * ggidld); (*(here->BSIM4v4DPgpPtr) += m * ggidlg); (*(here->BSIM4v4DPspPtr) -= m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v4DPbpPtr) += m * ggidlb); (*(here->BSIM4v4BPdpPtr) -= m * ggidld); (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); (*(here->BSIM4v4BPspPtr) += m * ((ggidlg + ggidld) + ggidlb)); (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v4SPdpPtr) -= m * ((ggisls + ggislg) + ggislb)); (*(here->BSIM4v4SPgpPtr) += m * ggislg); (*(here->BSIM4v4SPspPtr) += m * ggisls); (*(here->BSIM4v4SPbpPtr) += m * ggislb); (*(here->BSIM4v4BPdpPtr) += m * ((ggislg + ggisls) + ggislb)); (*(here->BSIM4v4BPgpPtr) -= m * ggislg); (*(here->BSIM4v4BPspPtr) -= m * ggisls); (*(here->BSIM4v4BPbpPtr) -= m * ggislb); if (here->BSIM4v4rbodyMod) { (*(here->BSIM4v4DPdbPtr +1) += m * xcdbdb); (*(here->BSIM4v4DPdbPtr) -= m * here->BSIM4v4gbd); (*(here->BSIM4v4SPsbPtr +1) += m * xcsbsb); (*(here->BSIM4v4SPsbPtr) -= m * here->BSIM4v4gbs); (*(here->BSIM4v4DBdpPtr +1) += m * xcdbdb); (*(here->BSIM4v4DBdpPtr) -= m * here->BSIM4v4gbd); (*(here->BSIM4v4DBdbPtr +1) -= m * xcdbdb); (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd + here->BSIM4v4grbpd + here->BSIM4v4grbdb)); (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + here->BSIM4v4grbpb)); /* WDLiu: (-here->BSIM4v4gbbs) already added to BPbpPtr */ (*(here->BSIM4v4SBspPtr +1) += m * xcsbsb); (*(here->BSIM4v4SBspPtr) -= m * here->BSIM4v4gbs); (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4SBsbPtr +1) -= m * xcsbsb); (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs + here->BSIM4v4grbps + here->BSIM4v4grbsb)); (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + here->BSIM4v4grbpb)); } /* * WDLiu: The internal charge node generated for transient NQS is not needed for * AC NQS. The following is not doing a real job, but we have to keep it; * otherwise a singular AC NQS matrix may occur if the transient NQS is on. * The charge node is isolated from the instance. */ if (here->BSIM4v4trnqsMod) { (*(here->BSIM4v4QqPtr) += m * 1.0); (*(here->BSIM4v4QgpPtr) += 0.0); (*(here->BSIM4v4QdpPtr) += 0.0); (*(here->BSIM4v4QspPtr) += 0.0); (*(here->BSIM4v4QbpPtr) += 0.0); (*(here->BSIM4v4DPqPtr) += 0.0); (*(here->BSIM4v4SPqPtr) += 0.0); (*(here->BSIM4v4GPqPtr) += 0.0); } } } return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4dest.c0000644000265600020320000000200412264261473021323 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4dest.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" #include "ngspice/suffix.h" void BSIM4v4destroy( GENmodel **inModel) { BSIM4v4model **model = (BSIM4v4model**)inModel; BSIM4v4instance *here; BSIM4v4instance *prev = NULL; BSIM4v4model *mod = *model; BSIM4v4model *oldmod = NULL; for (; mod ; mod = mod->BSIM4v4nextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for (here = mod->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; return; } ngspice-26/src/spicelib/devices/bsim4v4/b4v4set.c0000644000265600020320000024001512264261473021165 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4set.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "ngspice/jobdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPS0 8.85418e-12 #define EPSSI 1.03594e-10 #define PI 3.141592654 #define Charge_q 1.60219e-19 int BSIM4v4setup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; int error; CKTnode *tmp; int noiseAnalGiven = 0, createNode; /* Criteria for new node creation */ double Rtot, DMCGeff, DMCIeff, DMDGeff; JOB *job; /* Search for a noise analysis request */ for (job = ft_curckt->ci_curTask->jobs; job; job = job->JOBnextJob) { if(strcmp(job->JOBname,"Noise Analysis")==0) { noiseAnalGiven = 1; break; } } /* loop through all the BSIM4v4 device models */ for( ; model != NULL; model = model->BSIM4v4nextModel ) { /* process defaults of model parameters */ if (!model->BSIM4v4typeGiven) model->BSIM4v4type = NMOS; if (!model->BSIM4v4mobModGiven) model->BSIM4v4mobMod = 0; else if ((model->BSIM4v4mobMod != 0) && (model->BSIM4v4mobMod != 1) && (model->BSIM4v4mobMod != 2)) { model->BSIM4v4mobMod = 0; printf("Warning: mobMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4binUnitGiven) model->BSIM4v4binUnit = 1; if (!model->BSIM4v4paramChkGiven) model->BSIM4v4paramChk = 1; if (!model->BSIM4v4dioModGiven) model->BSIM4v4dioMod = 1; else if ((model->BSIM4v4dioMod != 0) && (model->BSIM4v4dioMod != 1) && (model->BSIM4v4dioMod != 2)) { model->BSIM4v4dioMod = 1; printf("Warning: dioMod has been set to its default value: 1.\n"); } if (!model->BSIM4v4capModGiven) model->BSIM4v4capMod = 2; else if ((model->BSIM4v4capMod != 0) && (model->BSIM4v4capMod != 1) && (model->BSIM4v4capMod != 2)) { model->BSIM4v4capMod = 2; printf("Warning: capMod has been set to its default value: 2.\n"); } if (!model->BSIM4v4rdsModGiven) model->BSIM4v4rdsMod = 0; else if ((model->BSIM4v4rdsMod != 0) && (model->BSIM4v4rdsMod != 1)) { model->BSIM4v4rdsMod = 0; printf("Warning: rdsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4rbodyModGiven) model->BSIM4v4rbodyMod = 0; else if ((model->BSIM4v4rbodyMod != 0) && (model->BSIM4v4rbodyMod != 1)) { model->BSIM4v4rbodyMod = 0; printf("Warning: rbodyMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4rgateModGiven) model->BSIM4v4rgateMod = 0; else if ((model->BSIM4v4rgateMod != 0) && (model->BSIM4v4rgateMod != 1) && (model->BSIM4v4rgateMod != 2) && (model->BSIM4v4rgateMod != 3)) { model->BSIM4v4rgateMod = 0; printf("Warning: rgateMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4perModGiven) model->BSIM4v4perMod = 1; else if ((model->BSIM4v4perMod != 0) && (model->BSIM4v4perMod != 1)) { model->BSIM4v4perMod = 1; printf("Warning: perMod has been set to its default value: 1.\n"); } if (!model->BSIM4v4geoModGiven) model->BSIM4v4geoMod = 0; if (!model->BSIM4v4fnoiModGiven) model->BSIM4v4fnoiMod = 1; else if ((model->BSIM4v4fnoiMod != 0) && (model->BSIM4v4fnoiMod != 1)) { model->BSIM4v4fnoiMod = 1; printf("Warning: fnoiMod has been set to its default value: 1.\n"); } if (!model->BSIM4v4tnoiModGiven) model->BSIM4v4tnoiMod = 0; /* WDLiu: tnoiMod=1 needs to set internal S/D nodes */ else if ((model->BSIM4v4tnoiMod != 0) && (model->BSIM4v4tnoiMod != 1)) { model->BSIM4v4tnoiMod = 0; printf("Warning: tnoiMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4trnqsModGiven) model->BSIM4v4trnqsMod = 0; else if ((model->BSIM4v4trnqsMod != 0) && (model->BSIM4v4trnqsMod != 1)) { model->BSIM4v4trnqsMod = 0; printf("Warning: trnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4acnqsModGiven) model->BSIM4v4acnqsMod = 0; else if ((model->BSIM4v4acnqsMod != 0) && (model->BSIM4v4acnqsMod != 1)) { model->BSIM4v4acnqsMod = 0; printf("Warning: acnqsMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4igcModGiven) model->BSIM4v4igcMod = 0; else if ((model->BSIM4v4igcMod != 0) && (model->BSIM4v4igcMod != 1)) { model->BSIM4v4igcMod = 0; printf("Warning: igcMod has been set to its default value: 0.\n"); } if (!model->BSIM4v4igbModGiven) model->BSIM4v4igbMod = 0; else if ((model->BSIM4v4igbMod != 0) && (model->BSIM4v4igbMod != 1)) { model->BSIM4v4igbMod = 0; printf("Warning: igbMod has been set to its default value: 0.\n"); } /* If the user does not provide the model revision, * we always choose the most recent for this code. */ if (!model->BSIM4v4versionGiven) model->BSIM4v4version = "4.4.0"; if ((!strcmp(model->BSIM4v4version, "4.2.1"))||(!strcmp(model->BSIM4v4version, "4.21"))) model->BSIM4v4intVersion = BSIM4v21; else if ((!strcmp(model->BSIM4v4version, "4.3.0"))||(!strcmp(model->BSIM4v4version, "4.30"))||(!strcmp(model->BSIM4v4version, "4.3"))) model->BSIM4v4intVersion = BSIM4v30; else if ((!strcmp(model->BSIM4v4version, "4.4.0"))||(!strcmp(model->BSIM4v4version, "4.40"))||(!strcmp(model->BSIM4v4version, "4.4"))) model->BSIM4v4intVersion = BSIM4v40; else model->BSIM4v4intVersion = BSIM4vOLD; /* BSIM4vOLD is a placeholder for pre 2.1 revision * This model should not be used for pre 2.1 models. */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (!model->BSIM4v4tempModGiven) model->BSIM4v4tempMod = 0; else if ((model->BSIM4v4tempMod != 0) && (model->BSIM4v4tempMod != 1)) { model->BSIM4v4tempMod = 0; printf("Warning: tempMod has been set to its default value: 0.\n"); } break; default: break; } if (!model->BSIM4v4toxrefGiven) model->BSIM4v4toxref = 30.0e-10; if (!model->BSIM4v4toxeGiven) model->BSIM4v4toxe = 30.0e-10; if (!model->BSIM4v4toxpGiven) model->BSIM4v4toxp = model->BSIM4v4toxe; if (!model->BSIM4v4toxmGiven) model->BSIM4v4toxm = model->BSIM4v4toxe; if (!model->BSIM4v4dtoxGiven) model->BSIM4v4dtox = 0.0; if (!model->BSIM4v4epsroxGiven) model->BSIM4v4epsrox = 3.9; if (!model->BSIM4v4cdscGiven) model->BSIM4v4cdsc = 2.4e-4; /* unit Q/V/m^2 */ if (!model->BSIM4v4cdscbGiven) model->BSIM4v4cdscb = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v4cdscdGiven) model->BSIM4v4cdscd = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v4citGiven) model->BSIM4v4cit = 0.0; /* unit Q/V/m^2 */ if (!model->BSIM4v4nfactorGiven) model->BSIM4v4nfactor = 1.0; if (!model->BSIM4v4xjGiven) model->BSIM4v4xj = .15e-6; if (!model->BSIM4v4vsatGiven) model->BSIM4v4vsat = 8.0e4; /* unit m/s */ if (!model->BSIM4v4atGiven) model->BSIM4v4at = 3.3e4; /* unit m/s */ if (!model->BSIM4v4a0Given) model->BSIM4v4a0 = 1.0; if (!model->BSIM4v4agsGiven) model->BSIM4v4ags = 0.0; if (!model->BSIM4v4a1Given) model->BSIM4v4a1 = 0.0; if (!model->BSIM4v4a2Given) model->BSIM4v4a2 = 1.0; if (!model->BSIM4v4ketaGiven) model->BSIM4v4keta = -0.047; /* unit / V */ if (!model->BSIM4v4nsubGiven) model->BSIM4v4nsub = 6.0e16; /* unit 1/cm3 */ if (!model->BSIM4v4ndepGiven) model->BSIM4v4ndep = 1.7e17; /* unit 1/cm3 */ if (!model->BSIM4v4nsdGiven) model->BSIM4v4nsd = 1.0e20; /* unit 1/cm3 */ if (!model->BSIM4v4phinGiven) model->BSIM4v4phin = 0.0; /* unit V */ if (!model->BSIM4v4ngateGiven) model->BSIM4v4ngate = 0; /* unit 1/cm3 */ if (!model->BSIM4v4vbmGiven) model->BSIM4v4vbm = -3.0; if (!model->BSIM4v4xtGiven) model->BSIM4v4xt = 1.55e-7; if (!model->BSIM4v4kt1Given) model->BSIM4v4kt1 = -0.11; /* unit V */ if (!model->BSIM4v4kt1lGiven) model->BSIM4v4kt1l = 0.0; /* unit V*m */ if (!model->BSIM4v4kt2Given) model->BSIM4v4kt2 = 0.022; /* No unit */ if (!model->BSIM4v4k3Given) model->BSIM4v4k3 = 80.0; if (!model->BSIM4v4k3bGiven) model->BSIM4v4k3b = 0.0; if (!model->BSIM4v4w0Given) model->BSIM4v4w0 = 2.5e-6; if (!model->BSIM4v4lpe0Given) model->BSIM4v4lpe0 = 1.74e-7; if (!model->BSIM4v4lpebGiven) model->BSIM4v4lpeb = 0.0; if (!model->BSIM4v4dvtp0Given) model->BSIM4v4dvtp0 = 0.0; if (!model->BSIM4v4dvtp1Given) model->BSIM4v4dvtp1 = 0.0; if (!model->BSIM4v4dvt0Given) model->BSIM4v4dvt0 = 2.2; if (!model->BSIM4v4dvt1Given) model->BSIM4v4dvt1 = 0.53; if (!model->BSIM4v4dvt2Given) model->BSIM4v4dvt2 = -0.032; /* unit 1 / V */ if (!model->BSIM4v4dvt0wGiven) model->BSIM4v4dvt0w = 0.0; if (!model->BSIM4v4dvt1wGiven) model->BSIM4v4dvt1w = 5.3e6; if (!model->BSIM4v4dvt2wGiven) model->BSIM4v4dvt2w = -0.032; if (!model->BSIM4v4droutGiven) model->BSIM4v4drout = 0.56; if (!model->BSIM4v4dsubGiven) model->BSIM4v4dsub = model->BSIM4v4drout; if (!model->BSIM4v4vth0Given) model->BSIM4v4vth0 = (model->BSIM4v4type == NMOS) ? 0.7 : -0.7; if (!model->BSIM4v4euGiven) model->BSIM4v4eu = (model->BSIM4v4type == NMOS) ? 1.67 : 1.0;; if (!model->BSIM4v4uaGiven) model->BSIM4v4ua = (model->BSIM4v4mobMod == 2) ? 1.0e-15 : 1.0e-9; /* unit m/V */ if (!model->BSIM4v4ua1Given) model->BSIM4v4ua1 = 1.0e-9; /* unit m/V */ if (!model->BSIM4v4ubGiven) model->BSIM4v4ub = 1.0e-19; /* unit (m/V)**2 */ if (!model->BSIM4v4ub1Given) model->BSIM4v4ub1 = -1.0e-18; /* unit (m/V)**2 */ if (!model->BSIM4v4ucGiven) model->BSIM4v4uc = (model->BSIM4v4mobMod == 1) ? -0.0465 : -0.0465e-9; if (!model->BSIM4v4uc1Given) model->BSIM4v4uc1 = (model->BSIM4v4mobMod == 1) ? -0.056 : -0.056e-9; if (!model->BSIM4v4u0Given) model->BSIM4v4u0 = (model->BSIM4v4type == NMOS) ? 0.067 : 0.025; if (!model->BSIM4v4uteGiven) model->BSIM4v4ute = -1.5; if (!model->BSIM4v4voffGiven) model->BSIM4v4voff = -0.08; if (!model->BSIM4v4vofflGiven) model->BSIM4v4voffl = 0.0; if (!model->BSIM4v4minvGiven) model->BSIM4v4minv = 0.0; if (!model->BSIM4v4fproutGiven) model->BSIM4v4fprout = 0.0; if (!model->BSIM4v4pditsGiven) model->BSIM4v4pdits = 0.0; if (!model->BSIM4v4pditsdGiven) model->BSIM4v4pditsd = 0.0; if (!model->BSIM4v4pditslGiven) model->BSIM4v4pditsl = 0.0; if (!model->BSIM4v4deltaGiven) model->BSIM4v4delta = 0.01; if (!model->BSIM4v4rdswminGiven) model->BSIM4v4rdswmin = 0.0; if (!model->BSIM4v4rdwminGiven) model->BSIM4v4rdwmin = 0.0; if (!model->BSIM4v4rswminGiven) model->BSIM4v4rswmin = 0.0; if (!model->BSIM4v4rdswGiven) model->BSIM4v4rdsw = 200.0; /* in ohm*um */ if (!model->BSIM4v4rdwGiven) model->BSIM4v4rdw = 100.0; if (!model->BSIM4v4rswGiven) model->BSIM4v4rsw = 100.0; if (!model->BSIM4v4prwgGiven) model->BSIM4v4prwg = 1.0; /* in 1/V */ if (!model->BSIM4v4prwbGiven) model->BSIM4v4prwb = 0.0; if (!model->BSIM4v4prtGiven) if (!model->BSIM4v4prtGiven) model->BSIM4v4prt = 0.0; if (!model->BSIM4v4eta0Given) model->BSIM4v4eta0 = 0.08; /* no unit */ if (!model->BSIM4v4etabGiven) model->BSIM4v4etab = -0.07; /* unit 1/V */ if (!model->BSIM4v4pclmGiven) model->BSIM4v4pclm = 1.3; /* no unit */ if (!model->BSIM4v4pdibl1Given) model->BSIM4v4pdibl1 = 0.39; /* no unit */ if (!model->BSIM4v4pdibl2Given) model->BSIM4v4pdibl2 = 0.0086; /* no unit */ if (!model->BSIM4v4pdiblbGiven) model->BSIM4v4pdiblb = 0.0; /* 1/V */ if (!model->BSIM4v4pscbe1Given) model->BSIM4v4pscbe1 = 4.24e8; if (!model->BSIM4v4pscbe2Given) model->BSIM4v4pscbe2 = 1.0e-5; if (!model->BSIM4v4pvagGiven) model->BSIM4v4pvag = 0.0; if (!model->BSIM4v4wrGiven) model->BSIM4v4wr = 1.0; if (!model->BSIM4v4dwgGiven) model->BSIM4v4dwg = 0.0; if (!model->BSIM4v4dwbGiven) model->BSIM4v4dwb = 0.0; if (!model->BSIM4v4b0Given) model->BSIM4v4b0 = 0.0; if (!model->BSIM4v4b1Given) model->BSIM4v4b1 = 0.0; if (!model->BSIM4v4alpha0Given) model->BSIM4v4alpha0 = 0.0; if (!model->BSIM4v4alpha1Given) model->BSIM4v4alpha1 = 0.0; if (!model->BSIM4v4beta0Given) model->BSIM4v4beta0 = 30.0; if (!model->BSIM4v4agidlGiven) model->BSIM4v4agidl = 0.0; if (!model->BSIM4v4bgidlGiven) model->BSIM4v4bgidl = 2.3e9; /* V/m */ if (!model->BSIM4v4cgidlGiven) model->BSIM4v4cgidl = 0.5; /* V^3 */ if (!model->BSIM4v4egidlGiven) model->BSIM4v4egidl = 0.8; /* V */ if (!model->BSIM4v4aigcGiven) model->BSIM4v4aigc = (model->BSIM4v4type == NMOS) ? 0.43 : 0.31; if (!model->BSIM4v4bigcGiven) model->BSIM4v4bigc = (model->BSIM4v4type == NMOS) ? 0.054 : 0.024; if (!model->BSIM4v4cigcGiven) model->BSIM4v4cigc = (model->BSIM4v4type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v4aigsdGiven) model->BSIM4v4aigsd = (model->BSIM4v4type == NMOS) ? 0.43 : 0.31; if (!model->BSIM4v4bigsdGiven) model->BSIM4v4bigsd = (model->BSIM4v4type == NMOS) ? 0.054 : 0.024; if (!model->BSIM4v4cigsdGiven) model->BSIM4v4cigsd = (model->BSIM4v4type == NMOS) ? 0.075 : 0.03; if (!model->BSIM4v4aigbaccGiven) model->BSIM4v4aigbacc = 0.43; if (!model->BSIM4v4bigbaccGiven) model->BSIM4v4bigbacc = 0.054; if (!model->BSIM4v4cigbaccGiven) model->BSIM4v4cigbacc = 0.075; if (!model->BSIM4v4aigbinvGiven) model->BSIM4v4aigbinv = 0.35; if (!model->BSIM4v4bigbinvGiven) model->BSIM4v4bigbinv = 0.03; if (!model->BSIM4v4cigbinvGiven) model->BSIM4v4cigbinv = 0.006; if (!model->BSIM4v4nigcGiven) model->BSIM4v4nigc = 1.0; if (!model->BSIM4v4nigbinvGiven) model->BSIM4v4nigbinv = 3.0; if (!model->BSIM4v4nigbaccGiven) model->BSIM4v4nigbacc = 1.0; if (!model->BSIM4v4ntoxGiven) model->BSIM4v4ntox = 1.0; if (!model->BSIM4v4eigbinvGiven) model->BSIM4v4eigbinv = 1.1; if (!model->BSIM4v4pigcdGiven) model->BSIM4v4pigcd = 1.0; if (!model->BSIM4v4poxedgeGiven) model->BSIM4v4poxedge = 1.0; if (!model->BSIM4v4xrcrg1Given) model->BSIM4v4xrcrg1 = 12.0; if (!model->BSIM4v4xrcrg2Given) model->BSIM4v4xrcrg2 = 1.0; if (!model->BSIM4v4ijthsfwdGiven) model->BSIM4v4ijthsfwd = 0.1; /* unit A */ if (!model->BSIM4v4ijthdfwdGiven) model->BSIM4v4ijthdfwd = model->BSIM4v4ijthsfwd; if (!model->BSIM4v4ijthsrevGiven) model->BSIM4v4ijthsrev = 0.1; /* unit A */ if (!model->BSIM4v4ijthdrevGiven) model->BSIM4v4ijthdrev = model->BSIM4v4ijthsrev; if (!model->BSIM4v4tnoiaGiven) model->BSIM4v4tnoia = 1.5; if (!model->BSIM4v4tnoibGiven) model->BSIM4v4tnoib = 3.5; if (!model->BSIM4v4ntnoiGiven) model->BSIM4v4ntnoi = 1.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: if (!model->BSIM4v4rnoibGiven) model->BSIM4v4rnoib = 0.37; break; case BSIM4v40: if (!model->BSIM4v4rnoibGiven) model->BSIM4v4rnoib = 0.5164; break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (!model->BSIM4v4rnoiaGiven) model->BSIM4v4rnoia = 0.577; if (!model->BSIM4v4lambdaGiven) model->BSIM4v4lambda = 0.0; if (!model->BSIM4v4vtlGiven) model->BSIM4v4vtl = 2.0e5; /* unit m/s */ if (!model->BSIM4v4xnGiven) model->BSIM4v4xn = 3.0; if (!model->BSIM4v4lcGiven) model->BSIM4v4lc = 5.0e-9; break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (!model->BSIM4v4vfbsdoffGiven) model->BSIM4v4vfbsdoff = 0.0; /* unit v */ if (!model->BSIM4v4lintnoiGiven) model->BSIM4v4lintnoi = 0.0; /* unit m */ break; default: break; } if (!model->BSIM4v4xjbvsGiven) model->BSIM4v4xjbvs = 1.0; /* no unit */ if (!model->BSIM4v4xjbvdGiven) model->BSIM4v4xjbvd = model->BSIM4v4xjbvs; if (!model->BSIM4v4bvsGiven) model->BSIM4v4bvs = 10.0; /* V */ if (!model->BSIM4v4bvdGiven) model->BSIM4v4bvd = model->BSIM4v4bvs; if (!model->BSIM4v4gbminGiven) model->BSIM4v4gbmin = 1.0e-12; /* in mho */ if (!model->BSIM4v4rbdbGiven) model->BSIM4v4rbdb = 50.0; /* in ohm */ if (!model->BSIM4v4rbpbGiven) model->BSIM4v4rbpb = 50.0; if (!model->BSIM4v4rbsbGiven) model->BSIM4v4rbsb = 50.0; if (!model->BSIM4v4rbpsGiven) model->BSIM4v4rbps = 50.0; if (!model->BSIM4v4rbpdGiven) model->BSIM4v4rbpd = 50.0; if (!model->BSIM4v4cgslGiven) model->BSIM4v4cgsl = 0.0; if (!model->BSIM4v4cgdlGiven) model->BSIM4v4cgdl = 0.0; if (!model->BSIM4v4ckappasGiven) model->BSIM4v4ckappas = 0.6; if (!model->BSIM4v4ckappadGiven) model->BSIM4v4ckappad = model->BSIM4v4ckappas; if (!model->BSIM4v4clcGiven) model->BSIM4v4clc = 0.1e-6; if (!model->BSIM4v4cleGiven) model->BSIM4v4cle = 0.6; if (!model->BSIM4v4vfbcvGiven) model->BSIM4v4vfbcv = -1.0; if (!model->BSIM4v4acdeGiven) model->BSIM4v4acde = 1.0; if (!model->BSIM4v4moinGiven) model->BSIM4v4moin = 15.0; if (!model->BSIM4v4noffGiven) model->BSIM4v4noff = 1.0; if (!model->BSIM4v4voffcvGiven) model->BSIM4v4voffcv = 0.0; if (!model->BSIM4v4dmcgGiven) model->BSIM4v4dmcg = 0.0; if (!model->BSIM4v4dmciGiven) model->BSIM4v4dmci = model->BSIM4v4dmcg; if (!model->BSIM4v4dmdgGiven) model->BSIM4v4dmdg = 0.0; if (!model->BSIM4v4dmcgtGiven) model->BSIM4v4dmcgt = 0.0; if (!model->BSIM4v4xgwGiven) model->BSIM4v4xgw = 0.0; if (!model->BSIM4v4xglGiven) model->BSIM4v4xgl = 0.0; if (!model->BSIM4v4rshgGiven) model->BSIM4v4rshg = 0.1; if (!model->BSIM4v4ngconGiven) model->BSIM4v4ngcon = 1.0; if (!model->BSIM4v4tcjGiven) model->BSIM4v4tcj = 0.0; if (!model->BSIM4v4tpbGiven) model->BSIM4v4tpb = 0.0; if (!model->BSIM4v4tcjswGiven) model->BSIM4v4tcjsw = 0.0; if (!model->BSIM4v4tpbswGiven) model->BSIM4v4tpbsw = 0.0; if (!model->BSIM4v4tcjswgGiven) model->BSIM4v4tcjswg = 0.0; if (!model->BSIM4v4tpbswgGiven) model->BSIM4v4tpbswg = 0.0; /* Length dependence */ if (!model->BSIM4v4lcdscGiven) model->BSIM4v4lcdsc = 0.0; if (!model->BSIM4v4lcdscbGiven) model->BSIM4v4lcdscb = 0.0; if (!model->BSIM4v4lcdscdGiven) model->BSIM4v4lcdscd = 0.0; if (!model->BSIM4v4lcitGiven) model->BSIM4v4lcit = 0.0; if (!model->BSIM4v4lnfactorGiven) model->BSIM4v4lnfactor = 0.0; if (!model->BSIM4v4lxjGiven) model->BSIM4v4lxj = 0.0; if (!model->BSIM4v4lvsatGiven) model->BSIM4v4lvsat = 0.0; if (!model->BSIM4v4latGiven) model->BSIM4v4lat = 0.0; if (!model->BSIM4v4la0Given) model->BSIM4v4la0 = 0.0; if (!model->BSIM4v4lagsGiven) model->BSIM4v4lags = 0.0; if (!model->BSIM4v4la1Given) model->BSIM4v4la1 = 0.0; if (!model->BSIM4v4la2Given) model->BSIM4v4la2 = 0.0; if (!model->BSIM4v4lketaGiven) model->BSIM4v4lketa = 0.0; if (!model->BSIM4v4lnsubGiven) model->BSIM4v4lnsub = 0.0; if (!model->BSIM4v4lndepGiven) model->BSIM4v4lndep = 0.0; if (!model->BSIM4v4lnsdGiven) model->BSIM4v4lnsd = 0.0; if (!model->BSIM4v4lphinGiven) model->BSIM4v4lphin = 0.0; if (!model->BSIM4v4lngateGiven) model->BSIM4v4lngate = 0.0; if (!model->BSIM4v4lvbmGiven) model->BSIM4v4lvbm = 0.0; if (!model->BSIM4v4lxtGiven) model->BSIM4v4lxt = 0.0; if (!model->BSIM4v4lkt1Given) model->BSIM4v4lkt1 = 0.0; if (!model->BSIM4v4lkt1lGiven) model->BSIM4v4lkt1l = 0.0; if (!model->BSIM4v4lkt2Given) model->BSIM4v4lkt2 = 0.0; if (!model->BSIM4v4lk3Given) model->BSIM4v4lk3 = 0.0; if (!model->BSIM4v4lk3bGiven) model->BSIM4v4lk3b = 0.0; if (!model->BSIM4v4lw0Given) model->BSIM4v4lw0 = 0.0; if (!model->BSIM4v4llpe0Given) model->BSIM4v4llpe0 = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (!model->BSIM4v4llpebGiven) model->BSIM4v4llpeb = model->BSIM4v4llpe0; break; case BSIM4v40: if (!model->BSIM4v4llpebGiven) model->BSIM4v4llpeb = 0.0; break; default: break; } if (!model->BSIM4v4ldvtp0Given) model->BSIM4v4ldvtp0 = 0.0; if (!model->BSIM4v4ldvtp1Given) model->BSIM4v4ldvtp1 = 0.0; if (!model->BSIM4v4ldvt0Given) model->BSIM4v4ldvt0 = 0.0; if (!model->BSIM4v4ldvt1Given) model->BSIM4v4ldvt1 = 0.0; if (!model->BSIM4v4ldvt2Given) model->BSIM4v4ldvt2 = 0.0; if (!model->BSIM4v4ldvt0wGiven) model->BSIM4v4ldvt0w = 0.0; if (!model->BSIM4v4ldvt1wGiven) model->BSIM4v4ldvt1w = 0.0; if (!model->BSIM4v4ldvt2wGiven) model->BSIM4v4ldvt2w = 0.0; if (!model->BSIM4v4ldroutGiven) model->BSIM4v4ldrout = 0.0; if (!model->BSIM4v4ldsubGiven) model->BSIM4v4ldsub = 0.0; if (!model->BSIM4v4lvth0Given) model->BSIM4v4lvth0 = 0.0; if (!model->BSIM4v4luaGiven) model->BSIM4v4lua = 0.0; if (!model->BSIM4v4lua1Given) model->BSIM4v4lua1 = 0.0; if (!model->BSIM4v4lubGiven) model->BSIM4v4lub = 0.0; if (!model->BSIM4v4lub1Given) model->BSIM4v4lub1 = 0.0; if (!model->BSIM4v4lucGiven) model->BSIM4v4luc = 0.0; if (!model->BSIM4v4luc1Given) model->BSIM4v4luc1 = 0.0; if (!model->BSIM4v4lu0Given) model->BSIM4v4lu0 = 0.0; if (!model->BSIM4v4luteGiven) model->BSIM4v4lute = 0.0; if (!model->BSIM4v4lvoffGiven) model->BSIM4v4lvoff = 0.0; if (!model->BSIM4v4lminvGiven) model->BSIM4v4lminv = 0.0; if (!model->BSIM4v4lfproutGiven) model->BSIM4v4lfprout = 0.0; if (!model->BSIM4v4lpditsGiven) model->BSIM4v4lpdits = 0.0; if (!model->BSIM4v4lpditsdGiven) model->BSIM4v4lpditsd = 0.0; if (!model->BSIM4v4ldeltaGiven) model->BSIM4v4ldelta = 0.0; if (!model->BSIM4v4lrdswGiven) model->BSIM4v4lrdsw = 0.0; if (!model->BSIM4v4lrdwGiven) model->BSIM4v4lrdw = 0.0; if (!model->BSIM4v4lrswGiven) model->BSIM4v4lrsw = 0.0; if (!model->BSIM4v4lprwbGiven) model->BSIM4v4lprwb = 0.0; if (!model->BSIM4v4lprwgGiven) model->BSIM4v4lprwg = 0.0; if (!model->BSIM4v4lprtGiven) model->BSIM4v4lprt = 0.0; if (!model->BSIM4v4leta0Given) model->BSIM4v4leta0 = 0.0; if (!model->BSIM4v4letabGiven) model->BSIM4v4letab = -0.0; if (!model->BSIM4v4lpclmGiven) model->BSIM4v4lpclm = 0.0; if (!model->BSIM4v4lpdibl1Given) model->BSIM4v4lpdibl1 = 0.0; if (!model->BSIM4v4lpdibl2Given) model->BSIM4v4lpdibl2 = 0.0; if (!model->BSIM4v4lpdiblbGiven) model->BSIM4v4lpdiblb = 0.0; if (!model->BSIM4v4lpscbe1Given) model->BSIM4v4lpscbe1 = 0.0; if (!model->BSIM4v4lpscbe2Given) model->BSIM4v4lpscbe2 = 0.0; if (!model->BSIM4v4lpvagGiven) model->BSIM4v4lpvag = 0.0; if (!model->BSIM4v4lwrGiven) model->BSIM4v4lwr = 0.0; if (!model->BSIM4v4ldwgGiven) model->BSIM4v4ldwg = 0.0; if (!model->BSIM4v4ldwbGiven) model->BSIM4v4ldwb = 0.0; if (!model->BSIM4v4lb0Given) model->BSIM4v4lb0 = 0.0; if (!model->BSIM4v4lb1Given) model->BSIM4v4lb1 = 0.0; if (!model->BSIM4v4lalpha0Given) model->BSIM4v4lalpha0 = 0.0; if (!model->BSIM4v4lalpha1Given) model->BSIM4v4lalpha1 = 0.0; if (!model->BSIM4v4lbeta0Given) model->BSIM4v4lbeta0 = 0.0; if (!model->BSIM4v4lagidlGiven) model->BSIM4v4lagidl = 0.0; if (!model->BSIM4v4lbgidlGiven) model->BSIM4v4lbgidl = 0.0; if (!model->BSIM4v4lcgidlGiven) model->BSIM4v4lcgidl = 0.0; if (!model->BSIM4v4legidlGiven) model->BSIM4v4legidl = 0.0; if (!model->BSIM4v4laigcGiven) model->BSIM4v4laigc = 0.0; if (!model->BSIM4v4lbigcGiven) model->BSIM4v4lbigc = 0.0; if (!model->BSIM4v4lcigcGiven) model->BSIM4v4lcigc = 0.0; if (!model->BSIM4v4laigsdGiven) model->BSIM4v4laigsd = 0.0; if (!model->BSIM4v4lbigsdGiven) model->BSIM4v4lbigsd = 0.0; if (!model->BSIM4v4lcigsdGiven) model->BSIM4v4lcigsd = 0.0; if (!model->BSIM4v4laigbaccGiven) model->BSIM4v4laigbacc = 0.0; if (!model->BSIM4v4lbigbaccGiven) model->BSIM4v4lbigbacc = 0.0; if (!model->BSIM4v4lcigbaccGiven) model->BSIM4v4lcigbacc = 0.0; if (!model->BSIM4v4laigbinvGiven) model->BSIM4v4laigbinv = 0.0; if (!model->BSIM4v4lbigbinvGiven) model->BSIM4v4lbigbinv = 0.0; if (!model->BSIM4v4lcigbinvGiven) model->BSIM4v4lcigbinv = 0.0; if (!model->BSIM4v4lnigcGiven) model->BSIM4v4lnigc = 0.0; if (!model->BSIM4v4lnigbinvGiven) model->BSIM4v4lnigbinv = 0.0; if (!model->BSIM4v4lnigbaccGiven) model->BSIM4v4lnigbacc = 0.0; if (!model->BSIM4v4lntoxGiven) model->BSIM4v4lntox = 0.0; if (!model->BSIM4v4leigbinvGiven) model->BSIM4v4leigbinv = 0.0; if (!model->BSIM4v4lpigcdGiven) model->BSIM4v4lpigcd = 0.0; if (!model->BSIM4v4lpoxedgeGiven) model->BSIM4v4lpoxedge = 0.0; if (!model->BSIM4v4lxrcrg1Given) model->BSIM4v4lxrcrg1 = 0.0; if (!model->BSIM4v4lxrcrg2Given) model->BSIM4v4lxrcrg2 = 0.0; if (!model->BSIM4v4leuGiven) model->BSIM4v4leu = 0.0; if (!model->BSIM4v4lvfbGiven) model->BSIM4v4lvfb = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (!model->BSIM4v4llambdaGiven) model->BSIM4v4llambda = 0.0; if (!model->BSIM4v4lvtlGiven) model->BSIM4v4lvtl = 0.0; if (!model->BSIM4v4lxnGiven) model->BSIM4v4lxn = 0.0; break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (!model->BSIM4v4lvfbsdoffGiven) model->BSIM4v4lvfbsdoff = 0.0; break; default: break; } if (!model->BSIM4v4lcgslGiven) model->BSIM4v4lcgsl = 0.0; if (!model->BSIM4v4lcgdlGiven) model->BSIM4v4lcgdl = 0.0; if (!model->BSIM4v4lckappasGiven) model->BSIM4v4lckappas = 0.0; if (!model->BSIM4v4lckappadGiven) model->BSIM4v4lckappad = 0.0; if (!model->BSIM4v4lclcGiven) model->BSIM4v4lclc = 0.0; if (!model->BSIM4v4lcleGiven) model->BSIM4v4lcle = 0.0; if (!model->BSIM4v4lcfGiven) model->BSIM4v4lcf = 0.0; if (!model->BSIM4v4lvfbcvGiven) model->BSIM4v4lvfbcv = 0.0; if (!model->BSIM4v4lacdeGiven) model->BSIM4v4lacde = 0.0; if (!model->BSIM4v4lmoinGiven) model->BSIM4v4lmoin = 0.0; if (!model->BSIM4v4lnoffGiven) model->BSIM4v4lnoff = 0.0; if (!model->BSIM4v4lvoffcvGiven) model->BSIM4v4lvoffcv = 0.0; /* Width dependence */ if (!model->BSIM4v4wcdscGiven) model->BSIM4v4wcdsc = 0.0; if (!model->BSIM4v4wcdscbGiven) model->BSIM4v4wcdscb = 0.0; if (!model->BSIM4v4wcdscdGiven) model->BSIM4v4wcdscd = 0.0; if (!model->BSIM4v4wcitGiven) model->BSIM4v4wcit = 0.0; if (!model->BSIM4v4wnfactorGiven) model->BSIM4v4wnfactor = 0.0; if (!model->BSIM4v4wxjGiven) model->BSIM4v4wxj = 0.0; if (!model->BSIM4v4wvsatGiven) model->BSIM4v4wvsat = 0.0; if (!model->BSIM4v4watGiven) model->BSIM4v4wat = 0.0; if (!model->BSIM4v4wa0Given) model->BSIM4v4wa0 = 0.0; if (!model->BSIM4v4wagsGiven) model->BSIM4v4wags = 0.0; if (!model->BSIM4v4wa1Given) model->BSIM4v4wa1 = 0.0; if (!model->BSIM4v4wa2Given) model->BSIM4v4wa2 = 0.0; if (!model->BSIM4v4wketaGiven) model->BSIM4v4wketa = 0.0; if (!model->BSIM4v4wnsubGiven) model->BSIM4v4wnsub = 0.0; if (!model->BSIM4v4wndepGiven) model->BSIM4v4wndep = 0.0; if (!model->BSIM4v4wnsdGiven) model->BSIM4v4wnsd = 0.0; if (!model->BSIM4v4wphinGiven) model->BSIM4v4wphin = 0.0; if (!model->BSIM4v4wngateGiven) model->BSIM4v4wngate = 0.0; if (!model->BSIM4v4wvbmGiven) model->BSIM4v4wvbm = 0.0; if (!model->BSIM4v4wxtGiven) model->BSIM4v4wxt = 0.0; if (!model->BSIM4v4wkt1Given) model->BSIM4v4wkt1 = 0.0; if (!model->BSIM4v4wkt1lGiven) model->BSIM4v4wkt1l = 0.0; if (!model->BSIM4v4wkt2Given) model->BSIM4v4wkt2 = 0.0; if (!model->BSIM4v4wk3Given) model->BSIM4v4wk3 = 0.0; if (!model->BSIM4v4wk3bGiven) model->BSIM4v4wk3b = 0.0; if (!model->BSIM4v4ww0Given) model->BSIM4v4ww0 = 0.0; if (!model->BSIM4v4wlpe0Given) model->BSIM4v4wlpe0 = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (!model->BSIM4v4wlpebGiven) model->BSIM4v4wlpeb = model->BSIM4v4wlpe0; break; case BSIM4v40: if (!model->BSIM4v4wlpebGiven) model->BSIM4v4wlpeb = 0.0; break; default: break; } if (!model->BSIM4v4wdvtp0Given) model->BSIM4v4wdvtp0 = 0.0; if (!model->BSIM4v4wdvtp1Given) model->BSIM4v4wdvtp1 = 0.0; if (!model->BSIM4v4wdvt0Given) model->BSIM4v4wdvt0 = 0.0; if (!model->BSIM4v4wdvt1Given) model->BSIM4v4wdvt1 = 0.0; if (!model->BSIM4v4wdvt2Given) model->BSIM4v4wdvt2 = 0.0; if (!model->BSIM4v4wdvt0wGiven) model->BSIM4v4wdvt0w = 0.0; if (!model->BSIM4v4wdvt1wGiven) model->BSIM4v4wdvt1w = 0.0; if (!model->BSIM4v4wdvt2wGiven) model->BSIM4v4wdvt2w = 0.0; if (!model->BSIM4v4wdroutGiven) model->BSIM4v4wdrout = 0.0; if (!model->BSIM4v4wdsubGiven) model->BSIM4v4wdsub = 0.0; if (!model->BSIM4v4wvth0Given) model->BSIM4v4wvth0 = 0.0; if (!model->BSIM4v4wuaGiven) model->BSIM4v4wua = 0.0; if (!model->BSIM4v4wua1Given) model->BSIM4v4wua1 = 0.0; if (!model->BSIM4v4wubGiven) model->BSIM4v4wub = 0.0; if (!model->BSIM4v4wub1Given) model->BSIM4v4wub1 = 0.0; if (!model->BSIM4v4wucGiven) model->BSIM4v4wuc = 0.0; if (!model->BSIM4v4wuc1Given) model->BSIM4v4wuc1 = 0.0; if (!model->BSIM4v4wu0Given) model->BSIM4v4wu0 = 0.0; if (!model->BSIM4v4wuteGiven) model->BSIM4v4wute = 0.0; if (!model->BSIM4v4wvoffGiven) model->BSIM4v4wvoff = 0.0; if (!model->BSIM4v4wminvGiven) model->BSIM4v4wminv = 0.0; if (!model->BSIM4v4wfproutGiven) model->BSIM4v4wfprout = 0.0; if (!model->BSIM4v4wpditsGiven) model->BSIM4v4wpdits = 0.0; if (!model->BSIM4v4wpditsdGiven) model->BSIM4v4wpditsd = 0.0; if (!model->BSIM4v4wdeltaGiven) model->BSIM4v4wdelta = 0.0; if (!model->BSIM4v4wrdswGiven) model->BSIM4v4wrdsw = 0.0; if (!model->BSIM4v4wrdwGiven) model->BSIM4v4wrdw = 0.0; if (!model->BSIM4v4wrswGiven) model->BSIM4v4wrsw = 0.0; if (!model->BSIM4v4wprwbGiven) model->BSIM4v4wprwb = 0.0; if (!model->BSIM4v4wprwgGiven) model->BSIM4v4wprwg = 0.0; if (!model->BSIM4v4wprtGiven) model->BSIM4v4wprt = 0.0; if (!model->BSIM4v4weta0Given) model->BSIM4v4weta0 = 0.0; if (!model->BSIM4v4wetabGiven) model->BSIM4v4wetab = 0.0; if (!model->BSIM4v4wpclmGiven) model->BSIM4v4wpclm = 0.0; if (!model->BSIM4v4wpdibl1Given) model->BSIM4v4wpdibl1 = 0.0; if (!model->BSIM4v4wpdibl2Given) model->BSIM4v4wpdibl2 = 0.0; if (!model->BSIM4v4wpdiblbGiven) model->BSIM4v4wpdiblb = 0.0; if (!model->BSIM4v4wpscbe1Given) model->BSIM4v4wpscbe1 = 0.0; if (!model->BSIM4v4wpscbe2Given) model->BSIM4v4wpscbe2 = 0.0; if (!model->BSIM4v4wpvagGiven) model->BSIM4v4wpvag = 0.0; if (!model->BSIM4v4wwrGiven) model->BSIM4v4wwr = 0.0; if (!model->BSIM4v4wdwgGiven) model->BSIM4v4wdwg = 0.0; if (!model->BSIM4v4wdwbGiven) model->BSIM4v4wdwb = 0.0; if (!model->BSIM4v4wb0Given) model->BSIM4v4wb0 = 0.0; if (!model->BSIM4v4wb1Given) model->BSIM4v4wb1 = 0.0; if (!model->BSIM4v4walpha0Given) model->BSIM4v4walpha0 = 0.0; if (!model->BSIM4v4walpha1Given) model->BSIM4v4walpha1 = 0.0; if (!model->BSIM4v4wbeta0Given) model->BSIM4v4wbeta0 = 0.0; if (!model->BSIM4v4wagidlGiven) model->BSIM4v4wagidl = 0.0; if (!model->BSIM4v4wbgidlGiven) model->BSIM4v4wbgidl = 0.0; if (!model->BSIM4v4wcgidlGiven) model->BSIM4v4wcgidl = 0.0; if (!model->BSIM4v4wegidlGiven) model->BSIM4v4wegidl = 0.0; if (!model->BSIM4v4waigcGiven) model->BSIM4v4waigc = 0.0; if (!model->BSIM4v4wbigcGiven) model->BSIM4v4wbigc = 0.0; if (!model->BSIM4v4wcigcGiven) model->BSIM4v4wcigc = 0.0; if (!model->BSIM4v4waigsdGiven) model->BSIM4v4waigsd = 0.0; if (!model->BSIM4v4wbigsdGiven) model->BSIM4v4wbigsd = 0.0; if (!model->BSIM4v4wcigsdGiven) model->BSIM4v4wcigsd = 0.0; if (!model->BSIM4v4waigbaccGiven) model->BSIM4v4waigbacc = 0.0; if (!model->BSIM4v4wbigbaccGiven) model->BSIM4v4wbigbacc = 0.0; if (!model->BSIM4v4wcigbaccGiven) model->BSIM4v4wcigbacc = 0.0; if (!model->BSIM4v4waigbinvGiven) model->BSIM4v4waigbinv = 0.0; if (!model->BSIM4v4wbigbinvGiven) model->BSIM4v4wbigbinv = 0.0; if (!model->BSIM4v4wcigbinvGiven) model->BSIM4v4wcigbinv = 0.0; if (!model->BSIM4v4wnigcGiven) model->BSIM4v4wnigc = 0.0; if (!model->BSIM4v4wnigbinvGiven) model->BSIM4v4wnigbinv = 0.0; if (!model->BSIM4v4wnigbaccGiven) model->BSIM4v4wnigbacc = 0.0; if (!model->BSIM4v4wntoxGiven) model->BSIM4v4wntox = 0.0; if (!model->BSIM4v4weigbinvGiven) model->BSIM4v4weigbinv = 0.0; if (!model->BSIM4v4wpigcdGiven) model->BSIM4v4wpigcd = 0.0; if (!model->BSIM4v4wpoxedgeGiven) model->BSIM4v4wpoxedge = 0.0; if (!model->BSIM4v4wxrcrg1Given) model->BSIM4v4wxrcrg1 = 0.0; if (!model->BSIM4v4wxrcrg2Given) model->BSIM4v4wxrcrg2 = 0.0; if (!model->BSIM4v4weuGiven) model->BSIM4v4weu = 0.0; if (!model->BSIM4v4wvfbGiven) model->BSIM4v4wvfb = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v40: if (!model->BSIM4v4wlambdaGiven) model->BSIM4v4wlambda = 0.0; if (!model->BSIM4v4wvtlGiven) model->BSIM4v4wvtl = 0.0; if (!model->BSIM4v4wxnGiven) model->BSIM4v4wxn = 0.0; if (!model->BSIM4v4wvfbsdoffGiven) model->BSIM4v4wvfbsdoff = 0.0; break; default: break; } if (!model->BSIM4v4wcgslGiven) model->BSIM4v4wcgsl = 0.0; if (!model->BSIM4v4wcgdlGiven) model->BSIM4v4wcgdl = 0.0; if (!model->BSIM4v4wckappasGiven) model->BSIM4v4wckappas = 0.0; if (!model->BSIM4v4wckappadGiven) model->BSIM4v4wckappad = 0.0; if (!model->BSIM4v4wcfGiven) model->BSIM4v4wcf = 0.0; if (!model->BSIM4v4wclcGiven) model->BSIM4v4wclc = 0.0; if (!model->BSIM4v4wcleGiven) model->BSIM4v4wcle = 0.0; if (!model->BSIM4v4wvfbcvGiven) model->BSIM4v4wvfbcv = 0.0; if (!model->BSIM4v4wacdeGiven) model->BSIM4v4wacde = 0.0; if (!model->BSIM4v4wmoinGiven) model->BSIM4v4wmoin = 0.0; if (!model->BSIM4v4wnoffGiven) model->BSIM4v4wnoff = 0.0; if (!model->BSIM4v4wvoffcvGiven) model->BSIM4v4wvoffcv = 0.0; /* Cross-term dependence */ if (!model->BSIM4v4pcdscGiven) model->BSIM4v4pcdsc = 0.0; if (!model->BSIM4v4pcdscbGiven) model->BSIM4v4pcdscb = 0.0; if (!model->BSIM4v4pcdscdGiven) model->BSIM4v4pcdscd = 0.0; if (!model->BSIM4v4pcitGiven) model->BSIM4v4pcit = 0.0; if (!model->BSIM4v4pnfactorGiven) model->BSIM4v4pnfactor = 0.0; if (!model->BSIM4v4pxjGiven) model->BSIM4v4pxj = 0.0; if (!model->BSIM4v4pvsatGiven) model->BSIM4v4pvsat = 0.0; if (!model->BSIM4v4patGiven) model->BSIM4v4pat = 0.0; if (!model->BSIM4v4pa0Given) model->BSIM4v4pa0 = 0.0; if (!model->BSIM4v4pagsGiven) model->BSIM4v4pags = 0.0; if (!model->BSIM4v4pa1Given) model->BSIM4v4pa1 = 0.0; if (!model->BSIM4v4pa2Given) model->BSIM4v4pa2 = 0.0; if (!model->BSIM4v4pketaGiven) model->BSIM4v4pketa = 0.0; if (!model->BSIM4v4pnsubGiven) model->BSIM4v4pnsub = 0.0; if (!model->BSIM4v4pndepGiven) model->BSIM4v4pndep = 0.0; if (!model->BSIM4v4pnsdGiven) model->BSIM4v4pnsd = 0.0; if (!model->BSIM4v4pphinGiven) model->BSIM4v4pphin = 0.0; if (!model->BSIM4v4pngateGiven) model->BSIM4v4pngate = 0.0; if (!model->BSIM4v4pvbmGiven) model->BSIM4v4pvbm = 0.0; if (!model->BSIM4v4pxtGiven) model->BSIM4v4pxt = 0.0; if (!model->BSIM4v4pkt1Given) model->BSIM4v4pkt1 = 0.0; if (!model->BSIM4v4pkt1lGiven) model->BSIM4v4pkt1l = 0.0; if (!model->BSIM4v4pkt2Given) model->BSIM4v4pkt2 = 0.0; if (!model->BSIM4v4pk3Given) model->BSIM4v4pk3 = 0.0; if (!model->BSIM4v4pk3bGiven) model->BSIM4v4pk3b = 0.0; if (!model->BSIM4v4pw0Given) model->BSIM4v4pw0 = 0.0; if (!model->BSIM4v4plpe0Given) model->BSIM4v4plpe0 = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (!model->BSIM4v4plpebGiven) model->BSIM4v4plpeb = model->BSIM4v4plpe0; break; case BSIM4v40: if (!model->BSIM4v4llpebGiven) model->BSIM4v4plpeb = 0.0; break; default: break; } if (!model->BSIM4v4pdvtp0Given) model->BSIM4v4pdvtp0 = 0.0; if (!model->BSIM4v4pdvtp1Given) model->BSIM4v4pdvtp1 = 0.0; if (!model->BSIM4v4pdvt0Given) model->BSIM4v4pdvt0 = 0.0; if (!model->BSIM4v4pdvt1Given) model->BSIM4v4pdvt1 = 0.0; if (!model->BSIM4v4pdvt2Given) model->BSIM4v4pdvt2 = 0.0; if (!model->BSIM4v4pdvt0wGiven) model->BSIM4v4pdvt0w = 0.0; if (!model->BSIM4v4pdvt1wGiven) model->BSIM4v4pdvt1w = 0.0; if (!model->BSIM4v4pdvt2wGiven) model->BSIM4v4pdvt2w = 0.0; if (!model->BSIM4v4pdroutGiven) model->BSIM4v4pdrout = 0.0; if (!model->BSIM4v4pdsubGiven) model->BSIM4v4pdsub = 0.0; if (!model->BSIM4v4pvth0Given) model->BSIM4v4pvth0 = 0.0; if (!model->BSIM4v4puaGiven) model->BSIM4v4pua = 0.0; if (!model->BSIM4v4pua1Given) model->BSIM4v4pua1 = 0.0; if (!model->BSIM4v4pubGiven) model->BSIM4v4pub = 0.0; if (!model->BSIM4v4pub1Given) model->BSIM4v4pub1 = 0.0; if (!model->BSIM4v4pucGiven) model->BSIM4v4puc = 0.0; if (!model->BSIM4v4puc1Given) model->BSIM4v4puc1 = 0.0; if (!model->BSIM4v4pu0Given) model->BSIM4v4pu0 = 0.0; if (!model->BSIM4v4puteGiven) model->BSIM4v4pute = 0.0; if (!model->BSIM4v4pvoffGiven) model->BSIM4v4pvoff = 0.0; if (!model->BSIM4v4pminvGiven) model->BSIM4v4pminv = 0.0; if (!model->BSIM4v4pfproutGiven) model->BSIM4v4pfprout = 0.0; if (!model->BSIM4v4ppditsGiven) model->BSIM4v4ppdits = 0.0; if (!model->BSIM4v4ppditsdGiven) model->BSIM4v4ppditsd = 0.0; if (!model->BSIM4v4pdeltaGiven) model->BSIM4v4pdelta = 0.0; if (!model->BSIM4v4prdswGiven) model->BSIM4v4prdsw = 0.0; if (!model->BSIM4v4prdwGiven) model->BSIM4v4prdw = 0.0; if (!model->BSIM4v4prswGiven) model->BSIM4v4prsw = 0.0; if (!model->BSIM4v4pprwbGiven) model->BSIM4v4pprwb = 0.0; if (!model->BSIM4v4pprwgGiven) model->BSIM4v4pprwg = 0.0; if (!model->BSIM4v4pprtGiven) model->BSIM4v4pprt = 0.0; if (!model->BSIM4v4peta0Given) model->BSIM4v4peta0 = 0.0; if (!model->BSIM4v4petabGiven) model->BSIM4v4petab = 0.0; if (!model->BSIM4v4ppclmGiven) model->BSIM4v4ppclm = 0.0; if (!model->BSIM4v4ppdibl1Given) model->BSIM4v4ppdibl1 = 0.0; if (!model->BSIM4v4ppdibl2Given) model->BSIM4v4ppdibl2 = 0.0; if (!model->BSIM4v4ppdiblbGiven) model->BSIM4v4ppdiblb = 0.0; if (!model->BSIM4v4ppscbe1Given) model->BSIM4v4ppscbe1 = 0.0; if (!model->BSIM4v4ppscbe2Given) model->BSIM4v4ppscbe2 = 0.0; if (!model->BSIM4v4ppvagGiven) model->BSIM4v4ppvag = 0.0; if (!model->BSIM4v4pwrGiven) model->BSIM4v4pwr = 0.0; if (!model->BSIM4v4pdwgGiven) model->BSIM4v4pdwg = 0.0; if (!model->BSIM4v4pdwbGiven) model->BSIM4v4pdwb = 0.0; if (!model->BSIM4v4pb0Given) model->BSIM4v4pb0 = 0.0; if (!model->BSIM4v4pb1Given) model->BSIM4v4pb1 = 0.0; if (!model->BSIM4v4palpha0Given) model->BSIM4v4palpha0 = 0.0; if (!model->BSIM4v4palpha1Given) model->BSIM4v4palpha1 = 0.0; if (!model->BSIM4v4pbeta0Given) model->BSIM4v4pbeta0 = 0.0; if (!model->BSIM4v4pagidlGiven) model->BSIM4v4pagidl = 0.0; if (!model->BSIM4v4pbgidlGiven) model->BSIM4v4pbgidl = 0.0; if (!model->BSIM4v4pcgidlGiven) model->BSIM4v4pcgidl = 0.0; if (!model->BSIM4v4pegidlGiven) model->BSIM4v4pegidl = 0.0; if (!model->BSIM4v4paigcGiven) model->BSIM4v4paigc = 0.0; if (!model->BSIM4v4pbigcGiven) model->BSIM4v4pbigc = 0.0; if (!model->BSIM4v4pcigcGiven) model->BSIM4v4pcigc = 0.0; if (!model->BSIM4v4paigsdGiven) model->BSIM4v4paigsd = 0.0; if (!model->BSIM4v4pbigsdGiven) model->BSIM4v4pbigsd = 0.0; if (!model->BSIM4v4pcigsdGiven) model->BSIM4v4pcigsd = 0.0; if (!model->BSIM4v4paigbaccGiven) model->BSIM4v4paigbacc = 0.0; if (!model->BSIM4v4pbigbaccGiven) model->BSIM4v4pbigbacc = 0.0; if (!model->BSIM4v4pcigbaccGiven) model->BSIM4v4pcigbacc = 0.0; if (!model->BSIM4v4paigbinvGiven) model->BSIM4v4paigbinv = 0.0; if (!model->BSIM4v4pbigbinvGiven) model->BSIM4v4pbigbinv = 0.0; if (!model->BSIM4v4pcigbinvGiven) model->BSIM4v4pcigbinv = 0.0; if (!model->BSIM4v4pnigcGiven) model->BSIM4v4pnigc = 0.0; if (!model->BSIM4v4pnigbinvGiven) model->BSIM4v4pnigbinv = 0.0; if (!model->BSIM4v4pnigbaccGiven) model->BSIM4v4pnigbacc = 0.0; if (!model->BSIM4v4pntoxGiven) model->BSIM4v4pntox = 0.0; if (!model->BSIM4v4peigbinvGiven) model->BSIM4v4peigbinv = 0.0; if (!model->BSIM4v4ppigcdGiven) model->BSIM4v4ppigcd = 0.0; if (!model->BSIM4v4ppoxedgeGiven) model->BSIM4v4ppoxedge = 0.0; if (!model->BSIM4v4pxrcrg1Given) model->BSIM4v4pxrcrg1 = 0.0; if (!model->BSIM4v4pxrcrg2Given) model->BSIM4v4pxrcrg2 = 0.0; if (!model->BSIM4v4peuGiven) model->BSIM4v4peu = 0.0; if (!model->BSIM4v4pvfbGiven) model->BSIM4v4pvfb = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (!model->BSIM4v4plambdaGiven) model->BSIM4v4plambda = 0.0; if (!model->BSIM4v4pvtlGiven) model->BSIM4v4pvtl = 0.0; if (!model->BSIM4v4pxnGiven) model->BSIM4v4pxn = 0.0; break; default: break; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (!model->BSIM4v4pvfbsdoffGiven) model->BSIM4v4pvfbsdoff = 0.0; break; default: break; } if (!model->BSIM4v4pcgslGiven) model->BSIM4v4pcgsl = 0.0; if (!model->BSIM4v4pcgdlGiven) model->BSIM4v4pcgdl = 0.0; if (!model->BSIM4v4pckappasGiven) model->BSIM4v4pckappas = 0.0; if (!model->BSIM4v4pckappadGiven) model->BSIM4v4pckappad = 0.0; if (!model->BSIM4v4pcfGiven) model->BSIM4v4pcf = 0.0; if (!model->BSIM4v4pclcGiven) model->BSIM4v4pclc = 0.0; if (!model->BSIM4v4pcleGiven) model->BSIM4v4pcle = 0.0; if (!model->BSIM4v4pvfbcvGiven) model->BSIM4v4pvfbcv = 0.0; if (!model->BSIM4v4pacdeGiven) model->BSIM4v4pacde = 0.0; if (!model->BSIM4v4pmoinGiven) model->BSIM4v4pmoin = 0.0; if (!model->BSIM4v4pnoffGiven) model->BSIM4v4pnoff = 0.0; if (!model->BSIM4v4pvoffcvGiven) model->BSIM4v4pvoffcv = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (!model->BSIM4v4gamma1Given) model->BSIM4v4gamma1 = 0.0; if (!model->BSIM4v4lgamma1Given) model->BSIM4v4lgamma1 = 0.0; if (!model->BSIM4v4wgamma1Given) model->BSIM4v4wgamma1 = 0.0; if (!model->BSIM4v4pgamma1Given) model->BSIM4v4pgamma1 = 0.0; if (!model->BSIM4v4gamma2Given) model->BSIM4v4gamma2 = 0.0; if (!model->BSIM4v4lgamma2Given) model->BSIM4v4lgamma2 = 0.0; if (!model->BSIM4v4wgamma2Given) model->BSIM4v4wgamma2 = 0.0; if (!model->BSIM4v4pgamma2Given) model->BSIM4v4pgamma2 = 0.0; if (!model->BSIM4v4vbxGiven) model->BSIM4v4vbx = 0.0; if (!model->BSIM4v4lvbxGiven) model->BSIM4v4lvbx = 0.0; if (!model->BSIM4v4wvbxGiven) model->BSIM4v4wvbx = 0.0; if (!model->BSIM4v4pvbxGiven) model->BSIM4v4pvbx = 0.0; break; default: break; } /* unit degree celcius */ if (!model->BSIM4v4tnomGiven) model->BSIM4v4tnom = ckt->CKTnomTemp; if (!model->BSIM4v4LintGiven) model->BSIM4v4Lint = 0.0; if (!model->BSIM4v4LlGiven) model->BSIM4v4Ll = 0.0; if (!model->BSIM4v4LlcGiven) model->BSIM4v4Llc = model->BSIM4v4Ll; if (!model->BSIM4v4LlnGiven) model->BSIM4v4Lln = 1.0; if (!model->BSIM4v4LwGiven) model->BSIM4v4Lw = 0.0; if (!model->BSIM4v4LwcGiven) model->BSIM4v4Lwc = model->BSIM4v4Lw; if (!model->BSIM4v4LwnGiven) model->BSIM4v4Lwn = 1.0; if (!model->BSIM4v4LwlGiven) model->BSIM4v4Lwl = 0.0; if (!model->BSIM4v4LwlcGiven) model->BSIM4v4Lwlc = model->BSIM4v4Lwl; if (!model->BSIM4v4LminGiven) model->BSIM4v4Lmin = 0.0; if (!model->BSIM4v4LmaxGiven) model->BSIM4v4Lmax = 1.0; if (!model->BSIM4v4WintGiven) model->BSIM4v4Wint = 0.0; if (!model->BSIM4v4WlGiven) model->BSIM4v4Wl = 0.0; if (!model->BSIM4v4WlcGiven) model->BSIM4v4Wlc = model->BSIM4v4Wl; if (!model->BSIM4v4WlnGiven) model->BSIM4v4Wln = 1.0; if (!model->BSIM4v4WwGiven) model->BSIM4v4Ww = 0.0; if (!model->BSIM4v4WwcGiven) model->BSIM4v4Wwc = model->BSIM4v4Ww; if (!model->BSIM4v4WwnGiven) model->BSIM4v4Wwn = 1.0; if (!model->BSIM4v4WwlGiven) model->BSIM4v4Wwl = 0.0; if (!model->BSIM4v4WwlcGiven) model->BSIM4v4Wwlc = model->BSIM4v4Wwl; if (!model->BSIM4v4WminGiven) model->BSIM4v4Wmin = 0.0; if (!model->BSIM4v4WmaxGiven) model->BSIM4v4Wmax = 1.0; if (!model->BSIM4v4dwcGiven) model->BSIM4v4dwc = model->BSIM4v4Wint; if (!model->BSIM4v4dlcGiven) model->BSIM4v4dlc = model->BSIM4v4Lint; if (!model->BSIM4v4xlGiven) model->BSIM4v4xl = 0.0; if (!model->BSIM4v4xwGiven) model->BSIM4v4xw = 0.0; if (!model->BSIM4v4dlcigGiven) model->BSIM4v4dlcig = model->BSIM4v4Lint; if (!model->BSIM4v4dwjGiven) model->BSIM4v4dwj = model->BSIM4v4dwc; if (!model->BSIM4v4cfGiven) model->BSIM4v4cf = 2.0 * model->BSIM4v4epsrox * EPS0 / PI * log(1.0 + 0.4e-6 / model->BSIM4v4toxe); if (!model->BSIM4v4xpartGiven) model->BSIM4v4xpart = 0.0; if (!model->BSIM4v4sheetResistanceGiven) model->BSIM4v4sheetResistance = 0.0; if (!model->BSIM4v4SunitAreaJctCapGiven) model->BSIM4v4SunitAreaJctCap = 5.0E-4; if (!model->BSIM4v4DunitAreaJctCapGiven) model->BSIM4v4DunitAreaJctCap = model->BSIM4v4SunitAreaJctCap; if (!model->BSIM4v4SunitLengthSidewallJctCapGiven) model->BSIM4v4SunitLengthSidewallJctCap = 5.0E-10; if (!model->BSIM4v4DunitLengthSidewallJctCapGiven) model->BSIM4v4DunitLengthSidewallJctCap = model->BSIM4v4SunitLengthSidewallJctCap; if (!model->BSIM4v4SunitLengthGateSidewallJctCapGiven) model->BSIM4v4SunitLengthGateSidewallJctCap = model->BSIM4v4SunitLengthSidewallJctCap ; if (!model->BSIM4v4DunitLengthGateSidewallJctCapGiven) model->BSIM4v4DunitLengthGateSidewallJctCap = model->BSIM4v4SunitLengthGateSidewallJctCap; if (!model->BSIM4v4SjctSatCurDensityGiven) model->BSIM4v4SjctSatCurDensity = 1.0E-4; if (!model->BSIM4v4DjctSatCurDensityGiven) model->BSIM4v4DjctSatCurDensity = model->BSIM4v4SjctSatCurDensity; if (!model->BSIM4v4SjctSidewallSatCurDensityGiven) model->BSIM4v4SjctSidewallSatCurDensity = 0.0; if (!model->BSIM4v4DjctSidewallSatCurDensityGiven) model->BSIM4v4DjctSidewallSatCurDensity = model->BSIM4v4SjctSidewallSatCurDensity; if (!model->BSIM4v4SjctGateSidewallSatCurDensityGiven) model->BSIM4v4SjctGateSidewallSatCurDensity = 0.0; if (!model->BSIM4v4DjctGateSidewallSatCurDensityGiven) model->BSIM4v4DjctGateSidewallSatCurDensity = model->BSIM4v4SjctGateSidewallSatCurDensity; if (!model->BSIM4v4SbulkJctPotentialGiven) model->BSIM4v4SbulkJctPotential = 1.0; if (!model->BSIM4v4DbulkJctPotentialGiven) model->BSIM4v4DbulkJctPotential = model->BSIM4v4SbulkJctPotential; if (!model->BSIM4v4SsidewallJctPotentialGiven) model->BSIM4v4SsidewallJctPotential = 1.0; if (!model->BSIM4v4DsidewallJctPotentialGiven) model->BSIM4v4DsidewallJctPotential = model->BSIM4v4SsidewallJctPotential; if (!model->BSIM4v4SGatesidewallJctPotentialGiven) model->BSIM4v4SGatesidewallJctPotential = model->BSIM4v4SsidewallJctPotential; if (!model->BSIM4v4DGatesidewallJctPotentialGiven) model->BSIM4v4DGatesidewallJctPotential = model->BSIM4v4SGatesidewallJctPotential; if (!model->BSIM4v4SbulkJctBotGradingCoeffGiven) model->BSIM4v4SbulkJctBotGradingCoeff = 0.5; if (!model->BSIM4v4DbulkJctBotGradingCoeffGiven) model->BSIM4v4DbulkJctBotGradingCoeff = model->BSIM4v4SbulkJctBotGradingCoeff; if (!model->BSIM4v4SbulkJctSideGradingCoeffGiven) model->BSIM4v4SbulkJctSideGradingCoeff = 0.33; if (!model->BSIM4v4DbulkJctSideGradingCoeffGiven) model->BSIM4v4DbulkJctSideGradingCoeff = model->BSIM4v4SbulkJctSideGradingCoeff; if (!model->BSIM4v4SbulkJctGateSideGradingCoeffGiven) model->BSIM4v4SbulkJctGateSideGradingCoeff = model->BSIM4v4SbulkJctSideGradingCoeff; if (!model->BSIM4v4DbulkJctGateSideGradingCoeffGiven) model->BSIM4v4DbulkJctGateSideGradingCoeff = model->BSIM4v4SbulkJctGateSideGradingCoeff; if (!model->BSIM4v4SjctEmissionCoeffGiven) model->BSIM4v4SjctEmissionCoeff = 1.0; if (!model->BSIM4v4DjctEmissionCoeffGiven) model->BSIM4v4DjctEmissionCoeff = model->BSIM4v4SjctEmissionCoeff; if (!model->BSIM4v4SjctTempExponentGiven) model->BSIM4v4SjctTempExponent = 3.0; if (!model->BSIM4v4DjctTempExponentGiven) model->BSIM4v4DjctTempExponent = model->BSIM4v4SjctTempExponent; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if (!model->BSIM4v4jtssGiven) model->BSIM4v4jtss = 0.0; if (!model->BSIM4v4jtsdGiven) model->BSIM4v4jtsd = model->BSIM4v4jtss; if (!model->BSIM4v4jtsswsGiven) model->BSIM4v4jtssws = 0.0; if (!model->BSIM4v4jtsswdGiven) model->BSIM4v4jtsswd = model->BSIM4v4jtssws; if (!model->BSIM4v4jtsswgsGiven) model->BSIM4v4jtsswgs = 0.0; if (!model->BSIM4v4jtsswgdGiven) model->BSIM4v4jtsswgd = model->BSIM4v4jtsswgs; if (!model->BSIM4v4njtsGiven) model->BSIM4v4njts = 20.0; if (!model->BSIM4v4njtsswGiven) model->BSIM4v4njtssw = 20.0; if (!model->BSIM4v4njtsswgGiven) model->BSIM4v4njtsswg = 20.0; if (!model->BSIM4v4xtssGiven) model->BSIM4v4xtss = 0.02; if (!model->BSIM4v4xtsdGiven) model->BSIM4v4xtsd = model->BSIM4v4xtss; if (!model->BSIM4v4xtsswsGiven) model->BSIM4v4xtssws = 0.02; if (!model->BSIM4v4jtsswdGiven) model->BSIM4v4xtsswd = model->BSIM4v4xtssws; if (!model->BSIM4v4xtsswgsGiven) model->BSIM4v4xtsswgs = 0.02; if (!model->BSIM4v4xtsswgdGiven) model->BSIM4v4xtsswgd = model->BSIM4v4xtsswgs; if (!model->BSIM4v4tnjtsGiven) model->BSIM4v4tnjts = 0.0; if (!model->BSIM4v4tnjtsswGiven) model->BSIM4v4tnjtssw = 0.0; if (!model->BSIM4v4tnjtsswgGiven) model->BSIM4v4tnjtsswg = 0.0; if (!model->BSIM4v4vtssGiven) model->BSIM4v4vtss = 10.0; if (!model->BSIM4v4vtsdGiven) model->BSIM4v4vtsd = model->BSIM4v4vtss; if (!model->BSIM4v4vtsswsGiven) model->BSIM4v4vtssws = 10.0; if (!model->BSIM4v4vtsswdGiven) model->BSIM4v4vtsswd = model->BSIM4v4vtssws; if (!model->BSIM4v4vtsswgsGiven) model->BSIM4v4vtsswgs = 10.0; if (!model->BSIM4v4vtsswgdGiven) model->BSIM4v4vtsswgd = model->BSIM4v4vtsswgs; break; default: break; } if (!model->BSIM4v4oxideTrapDensityAGiven) { if (model->BSIM4v4type == NMOS) model->BSIM4v4oxideTrapDensityA = 6.25e41; else model->BSIM4v4oxideTrapDensityA= 6.188e40; } if (!model->BSIM4v4oxideTrapDensityBGiven) { if (model->BSIM4v4type == NMOS) model->BSIM4v4oxideTrapDensityB = 3.125e26; else model->BSIM4v4oxideTrapDensityB = 1.5e25; } if (!model->BSIM4v4oxideTrapDensityCGiven) model->BSIM4v4oxideTrapDensityC = 8.75e9; if (!model->BSIM4v4emGiven) model->BSIM4v4em = 4.1e7; /* V/m */ if (!model->BSIM4v4efGiven) model->BSIM4v4ef = 1.0; if (!model->BSIM4v4afGiven) model->BSIM4v4af = 1.0; if (!model->BSIM4v4kfGiven) model->BSIM4v4kf = 0.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: /* stress effect */ if (!model->BSIM4v4sarefGiven) model->BSIM4v4saref = 1e-6; /* m */ if (!model->BSIM4v4sbrefGiven) model->BSIM4v4sbref = 1e-6; /* m */ if (!model->BSIM4v4wlodGiven) model->BSIM4v4wlod = 0; /* m */ if (!model->BSIM4v4ku0Given) model->BSIM4v4ku0 = 0; /* 1/m */ if (!model->BSIM4v4kvsatGiven) model->BSIM4v4kvsat = 0; if (!model->BSIM4v4kvth0Given) /* m */ model->BSIM4v4kvth0 = 0; if (!model->BSIM4v4tku0Given) model->BSIM4v4tku0 = 0; if (!model->BSIM4v4llodku0Given) model->BSIM4v4llodku0 = 0; if (!model->BSIM4v4wlodku0Given) model->BSIM4v4wlodku0 = 0; if (!model->BSIM4v4llodvthGiven) model->BSIM4v4llodvth = 0; if (!model->BSIM4v4wlodvthGiven) model->BSIM4v4wlodvth = 0; if (!model->BSIM4v4lku0Given) model->BSIM4v4lku0 = 0; if (!model->BSIM4v4wku0Given) model->BSIM4v4wku0 = 0; if (!model->BSIM4v4pku0Given) model->BSIM4v4pku0 = 0; if (!model->BSIM4v4lkvth0Given) model->BSIM4v4lkvth0 = 0; if (!model->BSIM4v4wkvth0Given) model->BSIM4v4wkvth0 = 0; if (!model->BSIM4v4pkvth0Given) model->BSIM4v4pkvth0 = 0; if (!model->BSIM4v4stk2Given) model->BSIM4v4stk2 = 0; if (!model->BSIM4v4lodk2Given) model->BSIM4v4lodk2 = 1.0; if (!model->BSIM4v4steta0Given) model->BSIM4v4steta0 = 0; if (!model->BSIM4v4lodeta0Given) model->BSIM4v4lodeta0 = 1.0; break; default: break; } DMCGeff = model->BSIM4v4dmcg - model->BSIM4v4dmcgt; DMCIeff = model->BSIM4v4dmci; DMDGeff = model->BSIM4v4dmdg - model->BSIM4v4dmcgt; /* * End processing models and begin to loop * through all the instances of the model */ for (here = model->BSIM4v4instances; here != NULL ; here=here->BSIM4v4nextInstance) { /* allocate a chunk of the state vector */ here->BSIM4v4states = *states; *states += BSIM4v4numStates; /* perform the parameter defaulting */ if (!here->BSIM4v4lGiven) here->BSIM4v4l = 5.0e-6; if (!here->BSIM4v4wGiven) here->BSIM4v4w = 5.0e-6; if (!here->BSIM4v4mGiven) here->BSIM4v4m = 1.0; if (!here->BSIM4v4nfGiven) here->BSIM4v4nf = 1.0; if (!here->BSIM4v4minGiven) here->BSIM4v4min = 0; /* integer */ if (!here->BSIM4v4icVDSGiven) here->BSIM4v4icVDS = 0.0; if (!here->BSIM4v4icVGSGiven) here->BSIM4v4icVGS = 0.0; if (!here->BSIM4v4icVBSGiven) here->BSIM4v4icVBS = 0.0; if (!here->BSIM4v4drainAreaGiven) here->BSIM4v4drainArea = 0.0; if (!here->BSIM4v4drainPerimeterGiven) here->BSIM4v4drainPerimeter = 0.0; if (!here->BSIM4v4drainSquaresGiven) here->BSIM4v4drainSquares = 1.0; if (!here->BSIM4v4sourceAreaGiven) here->BSIM4v4sourceArea = 0.0; if (!here->BSIM4v4sourcePerimeterGiven) here->BSIM4v4sourcePerimeter = 0.0; if (!here->BSIM4v4sourceSquaresGiven) here->BSIM4v4sourceSquares = 1.0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: if (!here->BSIM4v4saGiven) here->BSIM4v4sa = 0.0; if (!here->BSIM4v4sbGiven) here->BSIM4v4sb = 0.0; if (!here->BSIM4v4sdGiven) here->BSIM4v4sd = 0.0; break; default: break; } if (!here->BSIM4v4rbdbGiven) here->BSIM4v4rbdb = model->BSIM4v4rbdb; /* in ohm */ if (!here->BSIM4v4rbsbGiven) here->BSIM4v4rbsb = model->BSIM4v4rbsb; if (!here->BSIM4v4rbpbGiven) here->BSIM4v4rbpb = model->BSIM4v4rbpb; if (!here->BSIM4v4rbpsGiven) here->BSIM4v4rbps = model->BSIM4v4rbps; if (!here->BSIM4v4rbpdGiven) here->BSIM4v4rbpd = model->BSIM4v4rbpd; /* Process instance model selectors, some * may override their global counterparts */ if (!here->BSIM4v4rbodyModGiven) here->BSIM4v4rbodyMod = model->BSIM4v4rbodyMod; else if ((here->BSIM4v4rbodyMod != 0) && (here->BSIM4v4rbodyMod != 1)) { here->BSIM4v4rbodyMod = model->BSIM4v4rbodyMod; printf("Warning: rbodyMod has been set to its global value %d.\n", model->BSIM4v4rbodyMod); } if (!here->BSIM4v4rgateModGiven) here->BSIM4v4rgateMod = model->BSIM4v4rgateMod; else if ((here->BSIM4v4rgateMod != 0) && (here->BSIM4v4rgateMod != 1) && (here->BSIM4v4rgateMod != 2) && (here->BSIM4v4rgateMod != 3)) { here->BSIM4v4rgateMod = model->BSIM4v4rgateMod; printf("Warning: rgateMod has been set to its global value %d.\n", model->BSIM4v4rgateMod); } if (!here->BSIM4v4geoModGiven) here->BSIM4v4geoMod = model->BSIM4v4geoMod; if (!here->BSIM4v4rgeoModGiven) here->BSIM4v4rgeoMod = 0; if (!here->BSIM4v4trnqsModGiven) here->BSIM4v4trnqsMod = model->BSIM4v4trnqsMod; else if ((here->BSIM4v4trnqsMod != 0) && (here->BSIM4v4trnqsMod != 1)) { here->BSIM4v4trnqsMod = model->BSIM4v4trnqsMod; printf("Warning: trnqsMod has been set to its global value %d.\n", model->BSIM4v4trnqsMod); } if (!here->BSIM4v4acnqsModGiven) here->BSIM4v4acnqsMod = model->BSIM4v4acnqsMod; else if ((here->BSIM4v4acnqsMod != 0) && (here->BSIM4v4acnqsMod != 1)) { here->BSIM4v4acnqsMod = model->BSIM4v4acnqsMod; printf("Warning: acnqsMod has been set to its global value %d.\n", model->BSIM4v4acnqsMod); } /* process drain series resistance */ createNode = 0; if ( (model->BSIM4v4rdsMod != 0) || (model->BSIM4v4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v4sheetResistance > 0) { if (here->BSIM4v4drainSquaresGiven && here->BSIM4v4drainSquares > 0) { createNode = 1; } else if (!here->BSIM4v4drainSquaresGiven && (here->BSIM4v4rgeoMod != 0)) { BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4rgeoMod, here->BSIM4v4min, here->BSIM4v4w, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 0, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v4dNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"drain"); if(error) return(error); here->BSIM4v4dNodePrime = tmp->number; } } else { here->BSIM4v4dNodePrime = here->BSIM4v4dNode; } /* process source series resistance */ createNode = 0; if ( (model->BSIM4v4rdsMod != 0) || (model->BSIM4v4tnoiMod != 0 && noiseAnalGiven)) { createNode = 1; } else if (model->BSIM4v4sheetResistance > 0) { if (here->BSIM4v4sourceSquaresGiven && here->BSIM4v4sourceSquares > 0) { createNode = 1; } else if (!here->BSIM4v4sourceSquaresGiven && (here->BSIM4v4rgeoMod != 0)) { BSIM4v4RdseffGeo(here->BSIM4v4nf, here->BSIM4v4geoMod, here->BSIM4v4rgeoMod, here->BSIM4v4min, here->BSIM4v4w, model->BSIM4v4sheetResistance, DMCGeff, DMCIeff, DMDGeff, 1, &Rtot); if(Rtot > 0) createNode = 1; } } if ( createNode != 0 ) { if (here->BSIM4v4sNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"source"); if(error) return(error); here->BSIM4v4sNodePrime = tmp->number; } } else here->BSIM4v4sNodePrime = here->BSIM4v4sNode; if (here->BSIM4v4rgateMod > 0) { if (here->BSIM4v4gNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"gate"); if(error) return(error); here->BSIM4v4gNodePrime = tmp->number; } } else here->BSIM4v4gNodePrime = here->BSIM4v4gNodeExt; if (here->BSIM4v4rgateMod == 3) { if (here->BSIM4v4gNodeMid == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"midgate"); if(error) return(error); here->BSIM4v4gNodeMid = tmp->number; } } else here->BSIM4v4gNodeMid = here->BSIM4v4gNodeExt; /* internal body nodes for body resistance model */ if (here->BSIM4v4rbodyMod) { if (here->BSIM4v4dbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"dbody"); if(error) return(error); here->BSIM4v4dbNode = tmp->number; } if (here->BSIM4v4bNodePrime == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"body"); if(error) return(error); here->BSIM4v4bNodePrime = tmp->number; } if (here->BSIM4v4sbNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"sbody"); if(error) return(error); here->BSIM4v4sbNode = tmp->number; } } else here->BSIM4v4dbNode = here->BSIM4v4bNodePrime = here->BSIM4v4sbNode = here->BSIM4v4bNode; /* NQS node */ if (here->BSIM4v4trnqsMod) { if (here->BSIM4v4qNode == 0) { error = CKTmkVolt(ckt,&tmp,here->BSIM4v4name,"charge"); if(error) return(error); here->BSIM4v4qNode = tmp->number; } } else here->BSIM4v4qNode = 0; /* set Sparse Matrix Pointers * macro to make elements with built-in out-of-memory test */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(BSIM4v4DPbpPtr, BSIM4v4dNodePrime, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4GPbpPtr, BSIM4v4gNodePrime, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4SPbpPtr, BSIM4v4sNodePrime, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4BPdpPtr, BSIM4v4bNodePrime, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4BPgpPtr, BSIM4v4bNodePrime, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4BPspPtr, BSIM4v4bNodePrime, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4BPbpPtr, BSIM4v4bNodePrime, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4DdPtr, BSIM4v4dNode, BSIM4v4dNode); TSTALLOC(BSIM4v4GPgpPtr, BSIM4v4gNodePrime, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4SsPtr, BSIM4v4sNode, BSIM4v4sNode); TSTALLOC(BSIM4v4DPdpPtr, BSIM4v4dNodePrime, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4SPspPtr, BSIM4v4sNodePrime, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4DdpPtr, BSIM4v4dNode, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4GPdpPtr, BSIM4v4gNodePrime, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4GPspPtr, BSIM4v4gNodePrime, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4SspPtr, BSIM4v4sNode, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4DPspPtr, BSIM4v4dNodePrime, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4DPdPtr, BSIM4v4dNodePrime, BSIM4v4dNode); TSTALLOC(BSIM4v4DPgpPtr, BSIM4v4dNodePrime, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4SPgpPtr, BSIM4v4sNodePrime, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4SPsPtr, BSIM4v4sNodePrime, BSIM4v4sNode); TSTALLOC(BSIM4v4SPdpPtr, BSIM4v4sNodePrime, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4QqPtr, BSIM4v4qNode, BSIM4v4qNode); TSTALLOC(BSIM4v4QbpPtr, BSIM4v4qNode, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4QdpPtr, BSIM4v4qNode, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4QspPtr, BSIM4v4qNode, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4QgpPtr, BSIM4v4qNode, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4DPqPtr, BSIM4v4dNodePrime, BSIM4v4qNode); TSTALLOC(BSIM4v4SPqPtr, BSIM4v4sNodePrime, BSIM4v4qNode); TSTALLOC(BSIM4v4GPqPtr, BSIM4v4gNodePrime, BSIM4v4qNode); if (here->BSIM4v4rgateMod != 0) { TSTALLOC(BSIM4v4GEgePtr, BSIM4v4gNodeExt, BSIM4v4gNodeExt); TSTALLOC(BSIM4v4GEgpPtr, BSIM4v4gNodeExt, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4GPgePtr, BSIM4v4gNodePrime, BSIM4v4gNodeExt); TSTALLOC(BSIM4v4GEdpPtr, BSIM4v4gNodeExt, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4GEspPtr, BSIM4v4gNodeExt, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4GEbpPtr, BSIM4v4gNodeExt, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4GMdpPtr, BSIM4v4gNodeMid, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4GMgpPtr, BSIM4v4gNodeMid, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4GMgmPtr, BSIM4v4gNodeMid, BSIM4v4gNodeMid); TSTALLOC(BSIM4v4GMgePtr, BSIM4v4gNodeMid, BSIM4v4gNodeExt); TSTALLOC(BSIM4v4GMspPtr, BSIM4v4gNodeMid, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4GMbpPtr, BSIM4v4gNodeMid, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4DPgmPtr, BSIM4v4dNodePrime, BSIM4v4gNodeMid); TSTALLOC(BSIM4v4GPgmPtr, BSIM4v4gNodePrime, BSIM4v4gNodeMid); TSTALLOC(BSIM4v4GEgmPtr, BSIM4v4gNodeExt, BSIM4v4gNodeMid); TSTALLOC(BSIM4v4SPgmPtr, BSIM4v4sNodePrime, BSIM4v4gNodeMid); TSTALLOC(BSIM4v4BPgmPtr, BSIM4v4bNodePrime, BSIM4v4gNodeMid); } if (here->BSIM4v4rbodyMod) { TSTALLOC(BSIM4v4DPdbPtr, BSIM4v4dNodePrime, BSIM4v4dbNode); TSTALLOC(BSIM4v4SPsbPtr, BSIM4v4sNodePrime, BSIM4v4sbNode); TSTALLOC(BSIM4v4DBdpPtr, BSIM4v4dbNode, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4DBdbPtr, BSIM4v4dbNode, BSIM4v4dbNode); TSTALLOC(BSIM4v4DBbpPtr, BSIM4v4dbNode, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4DBbPtr, BSIM4v4dbNode, BSIM4v4bNode); TSTALLOC(BSIM4v4BPdbPtr, BSIM4v4bNodePrime, BSIM4v4dbNode); TSTALLOC(BSIM4v4BPbPtr, BSIM4v4bNodePrime, BSIM4v4bNode); TSTALLOC(BSIM4v4BPsbPtr, BSIM4v4bNodePrime, BSIM4v4sbNode); TSTALLOC(BSIM4v4SBspPtr, BSIM4v4sbNode, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4SBbpPtr, BSIM4v4sbNode, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4SBbPtr, BSIM4v4sbNode, BSIM4v4bNode); TSTALLOC(BSIM4v4SBsbPtr, BSIM4v4sbNode, BSIM4v4sbNode); TSTALLOC(BSIM4v4BdbPtr, BSIM4v4bNode, BSIM4v4dbNode); TSTALLOC(BSIM4v4BbpPtr, BSIM4v4bNode, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4BsbPtr, BSIM4v4bNode, BSIM4v4sbNode); TSTALLOC(BSIM4v4BbPtr, BSIM4v4bNode, BSIM4v4bNode); } if (model->BSIM4v4rdsMod) { TSTALLOC(BSIM4v4DgpPtr, BSIM4v4dNode, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4DspPtr, BSIM4v4dNode, BSIM4v4sNodePrime); TSTALLOC(BSIM4v4DbpPtr, BSIM4v4dNode, BSIM4v4bNodePrime); TSTALLOC(BSIM4v4SdpPtr, BSIM4v4sNode, BSIM4v4dNodePrime); TSTALLOC(BSIM4v4SgpPtr, BSIM4v4sNode, BSIM4v4gNodePrime); TSTALLOC(BSIM4v4SbpPtr, BSIM4v4sNode, BSIM4v4bNodePrime); } } } return(OK); } int BSIM4v4unsetup( GENmodel *inModel, CKTcircuit *ckt) { #ifndef HAS_BATCHSIM BSIM4v4model *model; BSIM4v4instance *here; for (model = (BSIM4v4model *)inModel; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here != NULL; here=here->BSIM4v4nextInstance) { if (here->BSIM4v4dNodePrime && here->BSIM4v4dNodePrime != here->BSIM4v4dNode) { CKTdltNNum(ckt, here->BSIM4v4dNodePrime); here->BSIM4v4dNodePrime = 0; } if (here->BSIM4v4sNodePrime && here->BSIM4v4sNodePrime != here->BSIM4v4sNode) { CKTdltNNum(ckt, here->BSIM4v4sNodePrime); here->BSIM4v4sNodePrime = 0; } } } #endif return OK; } ngspice-26/src/spicelib/devices/bsim4v4/b4v4ld.c0000644000265600020320000070064512264261473021003 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /* ngspice multirevision code extension covering 4.2.1 & 4.3.0 & 4.4.0 */ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4ld.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 11/15/2002. * Modified by Xuemei Xi, 05/09/2003. * Modified by Xuemei Xi, 03/04/2004. **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "bsim4v4def.h" #include "ngspice/trandefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #define MAX_EXP 5.834617425e14 #define MIN_EXP 1.713908431e-15 #define EXP_THRESHOLD 34.0 #define EPSSI 1.03594e-10 #define Charge_q 1.60219e-19 #define DELTA_1 0.02 #define DELTA_2 0.02 #define DELTA_3 0.02 #define DELTA_4 0.02 #define MM 3 /* smooth coeff */ #define DEXP(A,B,C) { \ if (A > EXP_THRESHOLD) { \ B = MAX_EXP*(1.0+(A)-EXP_THRESHOLD); \ C = MAX_EXP; \ } else if (A < -EXP_THRESHOLD) { \ B = MIN_EXP; \ C = 0; \ } else { \ B = exp(A); \ C = B; \ } \ } int BSIM4v4polyDepletion(double phi, double ngate,double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg); int BSIM4v4load( GENmodel *inModel, CKTcircuit *ckt) { BSIM4v4model *model = (BSIM4v4model*)inModel; BSIM4v4instance *here; double ceqgstot, dgstot_dvd, dgstot_dvg, dgstot_dvs, dgstot_dvb; double ceqgdtot, dgdtot_dvd, dgdtot_dvg, dgdtot_dvs, dgdtot_dvb; double gstot, gstotd, gstotg, gstots, gstotb, gspr, Rs, Rd; double gdtot, gdtotd, gdtotg, gdtots, gdtotb, gdpr; double vgs_eff, vgd_eff, dvgs_eff_dvg, dvgd_eff_dvg; double dRs_dvg, dRd_dvg, dRs_dvb, dRd_dvb; double dT0_dvg, dT1_dvb, dT3_dvg, dT3_dvb; double vses, vdes, vdedo, delvses, delvded, delvdes; double Isestot, cseshat, Idedtot, cdedhat; #ifndef NEWCONV double tol0, tol1, tol2, tol3, tol4, tol5, tol6; #endif double geltd, gcrg, gcrgg, gcrgd, gcrgs, gcrgb, ceqgcrg; double vges, vgms, vgedo, vgmdo, vged, vgmd, delvged, delvgmd; double delvges, delvgms, vgmb; double gcgmgmb=0.0, gcgmdb=0.0, gcgmsb=0.0, gcdgmb, gcsgmb; double gcgmbb=0.0, gcbgmb, qgmb, qgmid=0.0, ceqqgmid; double vbd, vbs, vds, vgb, vgd, vgs, vgdo; #ifndef PREDICTOR double xfact; #endif double vdbs, vdbd, vsbs, vsbdo, vsbd; double delvdbs, delvdbd, delvsbs; double delvbd_jct, delvbs_jct, vbs_jct, vbd_jct; double SourceSatCurrent, DrainSatCurrent; double ag0, qgb, von, cbhat=0.0, VgstNVt, ExpVgst; double ceqqb, ceqqd, ceqqg, ceqqjd=0.0, ceqqjs=0.0, ceq, geq; double cdrain, cdhat=0.0, ceqdrn, ceqbd, ceqbs, ceqjd, ceqjs, gjbd, gjbs; double czbd, czbdsw, czbdswg, czbs, czbssw, czbsswg, evbd, evbs, arg, sarg; double delvbd, delvbs, delvds, delvgd, delvgs; double Vfbeff=0.0, dVfbeff_dVg=0.0, dVfbeff_dVb=0.0, V3, V4; double gcbdb, gcbgb, gcbsb, gcddb, gcdgb, gcdsb, gcgdb, gcggb, gcgsb, gcsdb; double gcgbb, gcdbb, gcsbb, gcbbb; double gcdbdb=0.0, gcsbsb=0.0; double gcsgb, gcssb, MJD, MJSWD, MJSWGD, MJS, MJSWS, MJSWGS; double qgate=0.0, qbulk=0.0, qdrn=0.0, qsrc, cqgate, cqbody, cqdrn; double Vdb, Vds, Vgs, Vbs, Gmbs, FwdSum, RevSum; double Igidl, Ggidld, Ggidlg, Ggidlb; double Voxacc=0.0, dVoxacc_dVg=0.0, dVoxacc_dVb=0.0; double Voxdepinv=0.0, dVoxdepinv_dVg=0.0, dVoxdepinv_dVd=0.0, dVoxdepinv_dVb=0.0; double VxNVt=0.0, ExpVxNVt, Vaux=0.0, dVaux_dVg, dVaux_dVd, dVaux_dVb; double Igc, dIgc_dVg, dIgc_dVd, dIgc_dVb; double Igcs, dIgcs_dVg, dIgcs_dVd, dIgcs_dVb; double Igcd, dIgcd_dVg, dIgcd_dVd, dIgcd_dVb; double Igs, dIgs_dVg, dIgs_dVs, Igd, dIgd_dVg, dIgd_dVd; double Igbacc, dIgbacc_dVg, dIgbacc_dVb; double Igbinv, dIgbinv_dVg, dIgbinv_dVd, dIgbinv_dVb; double Pigcd, dPigcd_dVg, dPigcd_dVd, dPigcd_dVb; double Istoteq, gIstotg, gIstotd, gIstots, gIstotb; double Idtoteq, gIdtotg, gIdtotd, gIdtots, gIdtotb; double Ibtoteq, gIbtotg, gIbtotd, gIbtots, gIbtotb; double Igtoteq, gIgtotg, gIgtotd, gIgtots, gIgtotb; double Igstot, cgshat, Igdtot, cgdhat, Igbtot, cgbhat; double Vgs_eff, Vfb=0.0, Vth_NarrowW; double Phis=0.0, dPhis_dVb=0.0, sqrtPhis=0.0, dsqrtPhis_dVb=0.0, Vth=0.0, dVth_dVb=0.0, dVth_dVd=0.0; double Vgst, dVgst_dVg, dVgst_dVb, dVgs_eff_dVg, Nvtms, Nvtmd; double Vtm; double n, dn_dVb, dn_dVd, voffcv, noff, dnoff_dVd, dnoff_dVb; double V0, CoxWLcen, QovCox, LINK; double DeltaPhi, dDeltaPhi_dVg; double Cox=0.0, Tox=100e-09, Tcen, dTcen_dVg, dTcen_dVd, dTcen_dVb; double Ccen, Coxeff, dCoxeff_dVd, dCoxeff_dVg, dCoxeff_dVb; double Denomi, dDenomi_dVg, dDenomi_dVd, dDenomi_dVb; double ueff=0.0, dueff_dVg, dueff_dVd, dueff_dVb; double Esat=0.0, Vdsat; double EsatL, dEsatL_dVg, dEsatL_dVd, dEsatL_dVb; double dVdsat_dVg, dVdsat_dVb, dVdsat_dVd, Vasat, dAlphaz_dVg, dAlphaz_dVb; double dVasat_dVg, dVasat_dVb, dVasat_dVd, Va, dVa_dVd, dVa_dVg, dVa_dVb; double Vbseff=0.0, dVbseff_dVb=0.0, VbseffCV, dVbseffCV_dVb; double Arg1, One_Third_CoxWL, Two_Third_CoxWL, Alphaz, CoxWL; double T0=0.0, dT0_dVg, dT0_dVd, dT0_dVb; double T1, dT1_dVg, dT1_dVd, dT1_dVb; double T2, dT2_dVg, dT2_dVd, dT2_dVb; double T3, dT3_dVg, dT3_dVd, dT3_dVb; double T4, dT4_dVd, dT4_dVb; double T5, dT5_dVg, dT5_dVd, dT5_dVb; double T6=0.0, dT6_dVg, dT6_dVd, dT6_dVb; double T7, dT7_dVg=0.0, dT7_dVd=0.0, dT7_dVb=0.0; double T8, dT8_dVg, dT8_dVd, dT8_dVb; double T9, dT9_dVg, dT9_dVd, dT9_dVb; double T10, dT10_dVg, dT10_dVb, dT10_dVd; double T11, T12, T13, T14; double tmp, Abulk, dAbulk_dVb, Abulk0, dAbulk0_dVb; double Cclm, dCclm_dVg, dCclm_dVd, dCclm_dVb; double FP, dFP_dVg, PvagTerm, dPvagTerm_dVg, dPvagTerm_dVd, dPvagTerm_dVb; double VADITS, dVADITS_dVg, dVADITS_dVd; double Lpe_Vb, dDITS_Sft_dVb, dDITS_Sft_dVd; double VACLM, dVACLM_dVg, dVACLM_dVd, dVACLM_dVb; double VADIBL, dVADIBL_dVg, dVADIBL_dVd, dVADIBL_dVb; double Xdep, dXdep_dVb, lt1, dlt1_dVb, ltw, dltw_dVb, Delt_vth, dDelt_vth_dVb; double Theta0, dTheta0_dVb; double TempRatio, tmp1, tmp2, tmp3, tmp4; double DIBL_Sft, dDIBL_Sft_dVd, Lambda, dLambda_dVg; double Idtot=0.0, Ibtot=0.0, a1, ScalingFactor; double Vgsteff, dVgsteff_dVg, dVgsteff_dVd, dVgsteff_dVb; double Vdseff, dVdseff_dVg, dVdseff_dVd, dVdseff_dVb; double VdseffCV, dVdseffCV_dVg, dVdseffCV_dVd, dVdseffCV_dVb; double diffVds, dAbulk_dVg; double beta, dbeta_dVg, dbeta_dVd, dbeta_dVb; double gche, dgche_dVg, dgche_dVd, dgche_dVb; double fgche1, dfgche1_dVg, dfgche1_dVd, dfgche1_dVb; double fgche2, dfgche2_dVg, dfgche2_dVd, dfgche2_dVb; double Idl, dIdl_dVg, dIdl_dVd, dIdl_dVb; double Idsa, dIdsa_dVg, dIdsa_dVd, dIdsa_dVb; double Ids, Gm, Gds, Gmb, devbs_dvb, devbd_dvb; double Isub, Gbd, Gbg, Gbb; double VASCBE, dVASCBE_dVg, dVASCBE_dVd, dVASCBE_dVb; double CoxeffWovL; double Rds, dRds_dVg, dRds_dVb, WVCox=0.0, WVCoxRds; double Vgst2Vtm, VdsatCV; double Leff, Weff, dWeff_dVg, dWeff_dVb; double AbulkCV, dAbulkCV_dVb; double qcheq, qdef, gqdef=0.0, cqdef=0.0, cqcheq=0.0; double gcqdb=0.0, gcqsb=0.0, gcqgb=0.0, gcqbb=0.0; double dxpart, sxpart, ggtg, ggtd, ggts, ggtb; double ddxpart_dVd, ddxpart_dVg, ddxpart_dVb, ddxpart_dVs; double dsxpart_dVd, dsxpart_dVg, dsxpart_dVb, dsxpart_dVs; double gbspsp, gbbdp, gbbsp, gbspg, gbspb, gbspdp; double gbdpdp, gbdpg, gbdpb, gbdpsp; double qgdo=0.0, qgso=0.0, cgdo=0.0, cgso=0.0; double Cgg, Cgd, Cgb, Cdg, Cdd, Cds; double Csg, Csd, Css, Csb, Cbg, Cbd, Cbb; double Cgg1, Cgb1, Cgd1, Cbg1, Cbb1, Cbd1, Qac0=0.0, Qsub0; double dQac0_dVg, dQac0_dVb, dQsub0_dVg, dQsub0_dVd, dQsub0_dVb; double ggidld, ggidlg, ggidlb, ggislg, ggislb, ggisls; double Igisl, Ggislg, Ggislb, Ggisls; double Nvtmrs, Nvtmrssw, Nvtmrsswg; double vs, Fsevl, dvs_dVg, dvs_dVd, dvs_dVb, dFsevl_dVg, dFsevl_dVd, dFsevl_dVb; double vgdx, vgsx; struct bsim4SizeDependParam *pParam; int ByPass, ChargeComputationNeeded, error, Check, Check1, Check2; double m, min_exp_tmp=0.0; ScalingFactor = 1.0e-9; ChargeComputationNeeded = ((ckt->CKTmode & (MODEAC | MODETRAN | MODEINITSMSIG)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) ? 1 : 0; for (; model != NULL; model = model->BSIM4v4nextModel) { for (here = model->BSIM4v4instances; here != NULL; here = here->BSIM4v4nextInstance) { Check = Check1 = Check2 = 1; ByPass = 0; pParam = here->pParam; if ((ckt->CKTmode & MODEINITSMSIG)) { vds = *(ckt->CKTstate0 + here->BSIM4v4vds); vgs = *(ckt->CKTstate0 + here->BSIM4v4vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v4vbs); vges = *(ckt->CKTstate0 + here->BSIM4v4vges); vgms = *(ckt->CKTstate0 + here->BSIM4v4vgms); vdbs = *(ckt->CKTstate0 + here->BSIM4v4vdbs); vsbs = *(ckt->CKTstate0 + here->BSIM4v4vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v4vses); vdes = *(ckt->CKTstate0 + here->BSIM4v4vdes); qdef = *(ckt->CKTstate0 + here->BSIM4v4qdef); } else if ((ckt->CKTmode & MODEINITTRAN)) { vds = *(ckt->CKTstate1 + here->BSIM4v4vds); vgs = *(ckt->CKTstate1 + here->BSIM4v4vgs); vbs = *(ckt->CKTstate1 + here->BSIM4v4vbs); vges = *(ckt->CKTstate1 + here->BSIM4v4vges); vgms = *(ckt->CKTstate1 + here->BSIM4v4vgms); vdbs = *(ckt->CKTstate1 + here->BSIM4v4vdbs); vsbs = *(ckt->CKTstate1 + here->BSIM4v4vsbs); vses = *(ckt->CKTstate1 + here->BSIM4v4vses); vdes = *(ckt->CKTstate1 + here->BSIM4v4vdes); qdef = *(ckt->CKTstate1 + here->BSIM4v4qdef); } else if ((ckt->CKTmode & MODEINITJCT) && !here->BSIM4v4off) { vds = model->BSIM4v4type * here->BSIM4v4icVDS; vgs = vges = vgms = model->BSIM4v4type * here->BSIM4v4icVGS; vbs = vdbs = vsbs = model->BSIM4v4type * here->BSIM4v4icVBS; if (vds > 0.0) { vdes = vds + 0.01; vses = -0.01; } else if (vds < 0.0) { vdes = vds - 0.01; vses = 0.01; } else vdes = vses = 0.0; qdef = 0.0; if ((vds == 0.0) && (vgs == 0.0) && (vbs == 0.0) && ((ckt->CKTmode & (MODETRAN | MODEAC|MODEDCOP | MODEDCTRANCURVE)) || (!(ckt->CKTmode & MODEUIC)))) { vds = 0.1; vdes = 0.11; vses = -0.01; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: vgs = vges = vgms = model->BSIM4v4type * pParam->BSIM4v4vth0 + 0.1; break; case BSIM4v30: case BSIM4v40: vgs = vges = vgms = model->BSIM4v4type * here->BSIM4v4vth0 + 0.1; break; default: break; } vbs = vdbs = vsbs = 0.0; } } else if ((ckt->CKTmode & (MODEINITJCT | MODEINITFIX)) && (here->BSIM4v4off)) { vds = vgs = vbs = vges = vgms = 0.0; vdbs = vsbs = vdes = vses = qdef = 0.0; } else { #ifndef PREDICTOR if ((ckt->CKTmode & MODEINITPRED)) { xfact = ckt->CKTdelta / ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->BSIM4v4vds) = *(ckt->CKTstate1 + here->BSIM4v4vds); vds = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vds)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vds))); *(ckt->CKTstate0 + here->BSIM4v4vgs) = *(ckt->CKTstate1 + here->BSIM4v4vgs); vgs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vgs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vgs))); *(ckt->CKTstate0 + here->BSIM4v4vges) = *(ckt->CKTstate1 + here->BSIM4v4vges); vges = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vges)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vges))); *(ckt->CKTstate0 + here->BSIM4v4vgms) = *(ckt->CKTstate1 + here->BSIM4v4vgms); vgms = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vgms)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vgms))); *(ckt->CKTstate0 + here->BSIM4v4vbs) = *(ckt->CKTstate1 + here->BSIM4v4vbs); vbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vbs))); *(ckt->CKTstate0 + here->BSIM4v4vbd) = *(ckt->CKTstate0 + here->BSIM4v4vbs) - *(ckt->CKTstate0 + here->BSIM4v4vds); *(ckt->CKTstate0 + here->BSIM4v4vdbs) = *(ckt->CKTstate1 + here->BSIM4v4vdbs); vdbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vdbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vdbs))); *(ckt->CKTstate0 + here->BSIM4v4vdbd) = *(ckt->CKTstate0 + here->BSIM4v4vdbs) - *(ckt->CKTstate0 + here->BSIM4v4vds); *(ckt->CKTstate0 + here->BSIM4v4vsbs) = *(ckt->CKTstate1 + here->BSIM4v4vsbs); vsbs = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vsbs)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vsbs))); *(ckt->CKTstate0 + here->BSIM4v4vses) = *(ckt->CKTstate1 + here->BSIM4v4vses); vses = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vses)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vses))); *(ckt->CKTstate0 + here->BSIM4v4vdes) = *(ckt->CKTstate1 + here->BSIM4v4vdes); vdes = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4vdes)) - (xfact * (*(ckt->CKTstate2 + here->BSIM4v4vdes))); *(ckt->CKTstate0 + here->BSIM4v4qdef) = *(ckt->CKTstate1 + here->BSIM4v4qdef); qdef = (1.0 + xfact)* (*(ckt->CKTstate1 + here->BSIM4v4qdef)) -(xfact * (*(ckt->CKTstate2 + here->BSIM4v4qdef))); } else { #endif /* PREDICTOR */ vds = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vgs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4gNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4bNodePrime) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vges = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4gNodeExt) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vgms = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4gNodeMid) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vdbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dbNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vsbs = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4sbNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vses = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4sNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); vdes = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4dNode) - *(ckt->CKTrhsOld + here->BSIM4v4sNodePrime)); qdef = model->BSIM4v4type * (*(ckt->CKTrhsOld + here->BSIM4v4qNode)); #ifndef PREDICTOR } #endif /* PREDICTOR */ vgdo = *(ckt->CKTstate0 + here->BSIM4v4vgs) - *(ckt->CKTstate0 + here->BSIM4v4vds); vgedo = *(ckt->CKTstate0 + here->BSIM4v4vges) - *(ckt->CKTstate0 + here->BSIM4v4vds); vgmdo = *(ckt->CKTstate0 + here->BSIM4v4vgms) - *(ckt->CKTstate0 + here->BSIM4v4vds); vbd = vbs - vds; vdbd = vdbs - vds; vgd = vgs - vds; vged = vges - vds; vgmd = vgms - vds; delvbd = vbd - *(ckt->CKTstate0 + here->BSIM4v4vbd); delvdbd = vdbd - *(ckt->CKTstate0 + here->BSIM4v4vdbd); delvgd = vgd - vgdo; delvged = vged - vgedo; delvgmd = vgmd - vgmdo; delvds = vds - *(ckt->CKTstate0 + here->BSIM4v4vds); delvgs = vgs - *(ckt->CKTstate0 + here->BSIM4v4vgs); delvges = vges - *(ckt->CKTstate0 + here->BSIM4v4vges); delvgms = vgms - *(ckt->CKTstate0 + here->BSIM4v4vgms); delvbs = vbs - *(ckt->CKTstate0 + here->BSIM4v4vbs); delvdbs = vdbs - *(ckt->CKTstate0 + here->BSIM4v4vdbs); delvsbs = vsbs - *(ckt->CKTstate0 + here->BSIM4v4vsbs); delvses = vses - (*(ckt->CKTstate0 + here->BSIM4v4vses)); vdedo = *(ckt->CKTstate0 + here->BSIM4v4vdes) - *(ckt->CKTstate0 + here->BSIM4v4vds); delvdes = vdes - *(ckt->CKTstate0 + here->BSIM4v4vdes); delvded = vdes - vds - vdedo; delvbd_jct = (!here->BSIM4v4rbodyMod) ? delvbd : delvdbd; delvbs_jct = (!here->BSIM4v4rbodyMod) ? delvbs : delvsbs; if (here->BSIM4v4mode >= 0) { Idtot = here->BSIM4v4cd + here->BSIM4v4csub - here->BSIM4v4cbd + here->BSIM4v4Igidl; cdhat = Idtot - here->BSIM4v4gbd * delvbd_jct + (here->BSIM4v4gmbs + here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs + (here->BSIM4v4gm + here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs + (here->BSIM4v4gds + here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds; Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: cbhat = Ibtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gbs * delvbs_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs - (here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds - here->BSIM4v4ggislg * delvgd - here->BSIM4v4ggislb* delvbd + here->BSIM4v4ggisls * delvds ; break; case BSIM4v30: case BSIM4v40: cbhat = Ibtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gbs * delvbs_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbs - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgs - (here->BSIM4v4gbds + here->BSIM4v4ggidld - here->BSIM4v4ggisls) * delvds - here->BSIM4v4ggislg * delvgd - here->BSIM4v4ggislb* delvbd; break; default: break; } Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcs; cgshat = Igstot + (here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg) * delvgs + here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbs; Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcd; cgdhat = Igdtot + here->BSIM4v4gIgdg * delvgd + here->BSIM4v4gIgcdg * delvgs + here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbs; Igbtot = here->BSIM4v4Igb; cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgs + here->BSIM4v4gIgbd * delvds + here->BSIM4v4gIgbb * delvbs; } else { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igisl; cdhat = Idtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gmbs * delvbd + here->BSIM4v4gm * delvgd - here->BSIM4v4gds * delvds - here->BSIM4v4ggislg * vgd - here->BSIM4v4ggislb * vbd + here->BSIM4v4ggisls * vds; Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; cbhat = Ibtot + here->BSIM4v4gbs * delvbs_jct + here->BSIM4v4gbd * delvbd_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * delvbd - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * delvgd + (here->BSIM4v4gbds + here->BSIM4v4ggidld) * delvds - here->BSIM4v4ggislg * delvgs - here->BSIM4v4ggislb * delvbs + here->BSIM4v4ggisls * delvds; break; case BSIM4v30: case BSIM4v40: Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ cdhat = Idtot + here->BSIM4v4gbd * delvbd_jct + here->BSIM4v4gmbs * delvbd + here->BSIM4v4gm * delvgd - (here->BSIM4v4gds + here->BSIM4v4ggidls) * delvds - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; cbhat = Ibtot + here->BSIM4v4gbs * delvbs_jct + here->BSIM4v4gbd * delvbd_jct - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * delvbd - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * delvgd + (here->BSIM4v4gbds + here->BSIM4v4ggisld - here->BSIM4v4ggidls) * delvds - here->BSIM4v4ggidlg * delvgs - here->BSIM4v4ggidlb * delvbs; break; default: break; } Igstot = here->BSIM4v4Igs + here->BSIM4v4Igcd; cgshat = Igstot + here->BSIM4v4gIgsg * delvgs + here->BSIM4v4gIgcdg * delvgd - here->BSIM4v4gIgcdd * delvds + here->BSIM4v4gIgcdb * delvbd; Igdtot = here->BSIM4v4Igd + here->BSIM4v4Igcs; cgdhat = Igdtot + (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * delvgd - here->BSIM4v4gIgcsd * delvds + here->BSIM4v4gIgcsb * delvbd; Igbtot = here->BSIM4v4Igb; cgbhat = here->BSIM4v4Igb + here->BSIM4v4gIgbg * delvgd - here->BSIM4v4gIgbd * delvds + here->BSIM4v4gIgbb * delvbd; } Isestot = here->BSIM4v4gstot * (*(ckt->CKTstate0 + here->BSIM4v4vses)); cseshat = Isestot + here->BSIM4v4gstot * delvses + here->BSIM4v4gstotd * delvds + here->BSIM4v4gstotg * delvgs + here->BSIM4v4gstotb * delvbs; Idedtot = here->BSIM4v4gdtot * vdedo; cdedhat = Idedtot + here->BSIM4v4gdtot * delvded + here->BSIM4v4gdtotd * delvds + here->BSIM4v4gdtotg * delvgs + here->BSIM4v4gdtotb * delvbs; #ifndef NOBYPASS /* Following should be one IF statement, but some C compilers * can't handle that all at once, so we split it into several * successive IF's */ if ((!(ckt->CKTmode & MODEINITPRED)) && (ckt->CKTbypass)) if ((fabs(delvds) < (ckt->CKTreltol * MAX(fabs(vds), fabs(*(ckt->CKTstate0 + here->BSIM4v4vds))) + ckt->CKTvoltTol))) if ((fabs(delvgs) < (ckt->CKTreltol * MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vgs))) + ckt->CKTvoltTol))) if ((fabs(delvbs) < (ckt->CKTreltol * MAX(fabs(vbs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vbs))) + ckt->CKTvoltTol))) if ((fabs(delvbd) < (ckt->CKTreltol * MAX(fabs(vbd), fabs(*(ckt->CKTstate0 + here->BSIM4v4vbd))) + ckt->CKTvoltTol))) if ((here->BSIM4v4rgateMod == 0) || (here->BSIM4v4rgateMod == 1) || (fabs(delvges) < (ckt->CKTreltol * MAX(fabs(vges), fabs(*(ckt->CKTstate0 + here->BSIM4v4vges))) + ckt->CKTvoltTol))) if ((here->BSIM4v4rgateMod != 3) || (fabs(delvgms) < (ckt->CKTreltol * MAX(fabs(vgms), fabs(*(ckt->CKTstate0 + here->BSIM4v4vgms))) + ckt->CKTvoltTol))) if ((!here->BSIM4v4rbodyMod) || (fabs(delvdbs) < (ckt->CKTreltol * MAX(fabs(vdbs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdbs))) + ckt->CKTvoltTol))) if ((!here->BSIM4v4rbodyMod) || (fabs(delvdbd) < (ckt->CKTreltol * MAX(fabs(vdbd), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdbd))) + ckt->CKTvoltTol))) if ((!here->BSIM4v4rbodyMod) || (fabs(delvsbs) < (ckt->CKTreltol * MAX(fabs(vsbs), fabs(*(ckt->CKTstate0 + here->BSIM4v4vsbs))) + ckt->CKTvoltTol))) if ((!model->BSIM4v4rdsMod) || (fabs(delvses) < (ckt->CKTreltol * MAX(fabs(vses), fabs(*(ckt->CKTstate0 + here->BSIM4v4vses))) + ckt->CKTvoltTol))) if ((!model->BSIM4v4rdsMod) || (fabs(delvdes) < (ckt->CKTreltol * MAX(fabs(vdes), fabs(*(ckt->CKTstate0 + here->BSIM4v4vdes))) + ckt->CKTvoltTol))) if ((fabs(cdhat - Idtot) < ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol)) if ((fabs(cbhat - Ibtot) < ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol)) if ((!model->BSIM4v4igcMod) || ((fabs(cgshat - Igstot) < ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol))) if ((!model->BSIM4v4igcMod) || ((fabs(cgdhat - Igdtot) < ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol))) if ((!model->BSIM4v4igbMod) || ((fabs(cgbhat - Igbtot) < ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol))) if ((!model->BSIM4v4rdsMod) || ((fabs(cseshat - Isestot) < ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol))) if ((!model->BSIM4v4rdsMod) || ((fabs(cdedhat - Idedtot) < ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol))) { vds = *(ckt->CKTstate0 + here->BSIM4v4vds); vgs = *(ckt->CKTstate0 + here->BSIM4v4vgs); vbs = *(ckt->CKTstate0 + here->BSIM4v4vbs); vges = *(ckt->CKTstate0 + here->BSIM4v4vges); vgms = *(ckt->CKTstate0 + here->BSIM4v4vgms); vbd = *(ckt->CKTstate0 + here->BSIM4v4vbd); vdbs = *(ckt->CKTstate0 + here->BSIM4v4vdbs); vdbd = *(ckt->CKTstate0 + here->BSIM4v4vdbd); vsbs = *(ckt->CKTstate0 + here->BSIM4v4vsbs); vses = *(ckt->CKTstate0 + here->BSIM4v4vses); vdes = *(ckt->CKTstate0 + here->BSIM4v4vdes); vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vbs_jct = (!here->BSIM4v4rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v4rbodyMod) ? vbd : vdbd; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: qdef = *(ckt->CKTstate0 + here->BSIM4v4qdef); break; case BSIM4v30: case BSIM4v40: /*** qdef should not be kept fixed even if vgs, vds & vbs has converged **** qdef = *(ckt->CKTstate0 + here->BSIM4v4qdef); ***/ break; default: break; } cdrain = here->BSIM4v4cd; if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC))) { ByPass = 1; qgate = here->BSIM4v4qgate; qbulk = here->BSIM4v4qbulk; qdrn = here->BSIM4v4qdrn; cgdo = here->BSIM4v4cgdo; qgdo = here->BSIM4v4qgdo; cgso = here->BSIM4v4cgso; qgso = here->BSIM4v4qgso; goto line755; } else goto line850; } #endif /*NOBYPASS*/ von = here->BSIM4v4von; if (*(ckt->CKTstate0 + here->BSIM4v4vds) >= 0.0) { vgs = DEVfetlim(vgs, *(ckt->CKTstate0 + here->BSIM4v4vgs), von); vds = vgs - vgd; vds = DEVlimvds(vds, *(ckt->CKTstate0 + here->BSIM4v4vds)); vgd = vgs - vds; if (here->BSIM4v4rgateMod == 3) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v4vges), von); vgms = DEVfetlim(vgms, *(ckt->CKTstate0 + here->BSIM4v4vgms), von); vged = vges - vds; vgmd = vgms - vds; } else if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) { vges = DEVfetlim(vges, *(ckt->CKTstate0 + here->BSIM4v4vges), von); vged = vges - vds; } if (model->BSIM4v4rdsMod) { vdes = DEVlimvds(vdes, *(ckt->CKTstate0 + here->BSIM4v4vdes)); vses = -DEVlimvds(-vses, -(*(ckt->CKTstate0 + here->BSIM4v4vses))); } } else { vgd = DEVfetlim(vgd, vgdo, von); vds = vgs - vgd; vds = -DEVlimvds(-vds, -(*(ckt->CKTstate0 + here->BSIM4v4vds))); vgs = vgd + vds; if (here->BSIM4v4rgateMod == 3) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; vgmd = DEVfetlim(vgmd, vgmdo, von); vgms = vgmd + vds; } if ((here->BSIM4v4rgateMod == 1) || (here->BSIM4v4rgateMod == 2)) { vged = DEVfetlim(vged, vgedo, von); vges = vged + vds; } if (model->BSIM4v4rdsMod) { vdes = -DEVlimvds(-vdes, -(*(ckt->CKTstate0 + here->BSIM4v4vdes))); vses = DEVlimvds(vses, *(ckt->CKTstate0 + here->BSIM4v4vses)); } } if (vds >= 0.0) { vbs = DEVpnjlim(vbs, *(ckt->CKTstate0 + here->BSIM4v4vbs), CONSTvt0, model->BSIM4v4vcrit, &Check); vbd = vbs - vds; if (here->BSIM4v4rbodyMod) { vdbs = DEVpnjlim(vdbs, *(ckt->CKTstate0 + here->BSIM4v4vdbs), CONSTvt0, model->BSIM4v4vcrit, &Check1); vdbd = vdbs - vds; vsbs = DEVpnjlim(vsbs, *(ckt->CKTstate0 + here->BSIM4v4vsbs), CONSTvt0, model->BSIM4v4vcrit, &Check2); if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } else { vbd = DEVpnjlim(vbd, *(ckt->CKTstate0 + here->BSIM4v4vbd), CONSTvt0, model->BSIM4v4vcrit, &Check); vbs = vbd + vds; if (here->BSIM4v4rbodyMod) { vdbd = DEVpnjlim(vdbd, *(ckt->CKTstate0 + here->BSIM4v4vdbd), CONSTvt0, model->BSIM4v4vcrit, &Check1); vdbs = vdbd + vds; vsbdo = *(ckt->CKTstate0 + here->BSIM4v4vsbs) - *(ckt->CKTstate0 + here->BSIM4v4vds); vsbd = vsbs - vds; vsbd = DEVpnjlim(vsbd, vsbdo, CONSTvt0, model->BSIM4v4vcrit, &Check2); vsbs = vsbd + vds; if ((Check1 == 0) && (Check2 == 0)) Check = 0; else Check = 1; } } } /* Calculate DC currents and their derivatives */ vbd = vbs - vds; vgd = vgs - vds; vgb = vgs - vbs; vged = vges - vds; vgmd = vgms - vds; vgmb = vgms - vbs; vdbd = vdbs - vds; vbs_jct = (!here->BSIM4v4rbodyMod) ? vbs : vsbs; vbd_jct = (!here->BSIM4v4rbodyMod) ? vbd : vdbd; /* Source/drain junction diode DC model begins */ Nvtms = model->BSIM4v4vtm * model->BSIM4v4SjctEmissionCoeff; if ((here->BSIM4v4Aseff <= 0.0) && (here->BSIM4v4Pseff <= 0.0)) { SourceSatCurrent = 1.0e-14; } else { SourceSatCurrent = here->BSIM4v4Aseff * model->BSIM4v4SjctTempSatCurDensity + here->BSIM4v4Pseff * model->BSIM4v4SjctSidewallTempSatCurDensity + pParam->BSIM4v4weffCJ * here->BSIM4v4nf * model->BSIM4v4SjctGateSidewallTempSatCurDensity; } if (SourceSatCurrent <= 0.0) { here->BSIM4v4gbs = ckt->CKTgmin; here->BSIM4v4cbs = here->BSIM4v4gbs * vbs_jct; } else { switch(model->BSIM4v4dioMod) { case 0: evbs = exp(vbs_jct / Nvtms); T1 = model->BSIM4v4xjbvs * exp(-(model->BSIM4v4bvs + vbs_jct) / Nvtms); /* WDLiu: Magic T1 in this form; different from BSIM4v4 beta. */ here->BSIM4v4gbs = SourceSatCurrent * (evbs + T1) / Nvtms + ckt->CKTgmin; here->BSIM4v4cbs = SourceSatCurrent * (evbs + here->BSIM4v4XExpBVS - T1 - 1.0) + ckt->CKTgmin * vbs_jct; break; case 1: T2 = vbs_jct / Nvtms; if (T2 < -EXP_THRESHOLD) { here->BSIM4v4gbs = ckt->CKTgmin; here->BSIM4v4cbs = SourceSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v4vjsmFwd) { evbs = exp(T2); here->BSIM4v4gbs = SourceSatCurrent * evbs / Nvtms + ckt->CKTgmin; here->BSIM4v4cbs = SourceSatCurrent * (evbs - 1.0) + ckt->CKTgmin * vbs_jct; } else { T0 = here->BSIM4v4IVjsmFwd / Nvtms; here->BSIM4v4gbs = T0 + ckt->CKTgmin; here->BSIM4v4cbs = here->BSIM4v4IVjsmFwd - SourceSatCurrent + T0 * (vbs_jct - here->BSIM4v4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; case 2: if (vbs_jct < here->BSIM4v4vjsmRev) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = evbs - 1.0; T2 = here->BSIM4v4IVjsmRev + here->BSIM4v4SslpRev * (vbs_jct - here->BSIM4v4vjsmRev); here->BSIM4v4gbs = devbs_dvb * T2 + T1 * here->BSIM4v4SslpRev + ckt->CKTgmin; here->BSIM4v4cbs = T1 * T2 + ckt->CKTgmin * vbs_jct; } else if (vbs_jct <= here->BSIM4v4vjsmFwd) { T0 = vbs_jct / Nvtms; if (T0 < -EXP_THRESHOLD) { evbs = MIN_EXP; devbs_dvb = 0.0; } else { evbs = exp(T0); devbs_dvb = evbs / Nvtms; } T1 = (model->BSIM4v4bvs + vbs_jct) / Nvtms; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtms; } here->BSIM4v4gbs = SourceSatCurrent * (devbs_dvb - model->BSIM4v4xjbvs * T3) + ckt->CKTgmin; here->BSIM4v4cbs = SourceSatCurrent * (evbs + here->BSIM4v4XExpBVS - 1.0 - model->BSIM4v4xjbvs * T2) + ckt->CKTgmin * vbs_jct; } else { here->BSIM4v4gbs = here->BSIM4v4SslpFwd + ckt->CKTgmin; here->BSIM4v4cbs = here->BSIM4v4IVjsmFwd + here->BSIM4v4SslpFwd * (vbs_jct - here->BSIM4v4vjsmFwd) + ckt->CKTgmin * vbs_jct; } break; default: break; } } Nvtmd = model->BSIM4v4vtm * model->BSIM4v4DjctEmissionCoeff; if ((here->BSIM4v4Adeff <= 0.0) && (here->BSIM4v4Pdeff <= 0.0)) { DrainSatCurrent = 1.0e-14; } else { DrainSatCurrent = here->BSIM4v4Adeff * model->BSIM4v4DjctTempSatCurDensity + here->BSIM4v4Pdeff * model->BSIM4v4DjctSidewallTempSatCurDensity + pParam->BSIM4v4weffCJ * here->BSIM4v4nf * model->BSIM4v4DjctGateSidewallTempSatCurDensity; } if (DrainSatCurrent <= 0.0) { here->BSIM4v4gbd = ckt->CKTgmin; here->BSIM4v4cbd = here->BSIM4v4gbd * vbd_jct; } else { switch(model->BSIM4v4dioMod) { case 0: evbd = exp(vbd_jct / Nvtmd); T1 = model->BSIM4v4xjbvd * exp(-(model->BSIM4v4bvd + vbd_jct) / Nvtmd); /* WDLiu: Magic T1 in this form; different from BSIM4v4 beta. */ here->BSIM4v4gbd = DrainSatCurrent * (evbd + T1) / Nvtmd + ckt->CKTgmin; here->BSIM4v4cbd = DrainSatCurrent * (evbd + here->BSIM4v4XExpBVD - T1 - 1.0) + ckt->CKTgmin * vbd_jct; break; case 1: T2 = vbd_jct / Nvtmd; if (T2 < -EXP_THRESHOLD) { here->BSIM4v4gbd = ckt->CKTgmin; here->BSIM4v4cbd = DrainSatCurrent * (MIN_EXP - 1.0) + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v4vjdmFwd) { evbd = exp(T2); here->BSIM4v4gbd = DrainSatCurrent * evbd / Nvtmd + ckt->CKTgmin; here->BSIM4v4cbd = DrainSatCurrent * (evbd - 1.0) + ckt->CKTgmin * vbd_jct; } else { T0 = here->BSIM4v4IVjdmFwd / Nvtmd; here->BSIM4v4gbd = T0 + ckt->CKTgmin; here->BSIM4v4cbd = here->BSIM4v4IVjdmFwd - DrainSatCurrent + T0 * (vbd_jct - here->BSIM4v4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; case 2: if (vbd_jct < here->BSIM4v4vjdmRev) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = evbd - 1.0; T2 = here->BSIM4v4IVjdmRev + here->BSIM4v4DslpRev * (vbd_jct - here->BSIM4v4vjdmRev); here->BSIM4v4gbd = devbd_dvb * T2 + T1 * here->BSIM4v4DslpRev + ckt->CKTgmin; here->BSIM4v4cbd = T1 * T2 + ckt->CKTgmin * vbd_jct; } else if (vbd_jct <= here->BSIM4v4vjdmFwd) { T0 = vbd_jct / Nvtmd; if (T0 < -EXP_THRESHOLD) { evbd = MIN_EXP; devbd_dvb = 0.0; } else { evbd = exp(T0); devbd_dvb = evbd / Nvtmd; } T1 = (model->BSIM4v4bvd + vbd_jct) / Nvtmd; if (T1 > EXP_THRESHOLD) { T2 = MIN_EXP; T3 = 0.0; } else { T2 = exp(-T1); T3 = -T2 /Nvtmd; } here->BSIM4v4gbd = DrainSatCurrent * (devbd_dvb - model->BSIM4v4xjbvd * T3) + ckt->CKTgmin; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: here->BSIM4v4cbd = DrainSatCurrent * (evbd + here->BSIM4v4XExpBVS - 1.0 - model->BSIM4v4xjbvd * T2) + ckt->CKTgmin * vbd_jct; break; case BSIM4v40: here->BSIM4v4cbd = DrainSatCurrent * (evbd + here->BSIM4v4XExpBVD - 1.0 - model->BSIM4v4xjbvd * T2) + ckt->CKTgmin * vbd_jct; break; default: break; } } else { here->BSIM4v4gbd = here->BSIM4v4DslpFwd + ckt->CKTgmin; here->BSIM4v4cbd = here->BSIM4v4IVjdmFwd + here->BSIM4v4DslpFwd * (vbd_jct - here->BSIM4v4vjdmFwd) + ckt->CKTgmin * vbd_jct; } break; default: break; } } /* End of diode DC model */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: /* trap-assisted tunneling and recombination current for reverse bias */ Nvtmrssw = model->BSIM4v4vtm0 * model->BSIM4v4njtsswtemp; Nvtmrsswg = model->BSIM4v4vtm0 * model->BSIM4v4njtsswgtemp; Nvtmrs = model->BSIM4v4vtm0 * model->BSIM4v4njtstemp; if ((model->BSIM4v4vtss - vbs) < 1e-3) { T9 = 1.0e3; T0 = - vbs / Nvtmrs * T9; DEXP(T0, T1, T10); dT1_dVb = T10 / Nvtmrs * T9; } else { T9 = 1.0 / (model->BSIM4v4vtss - vbs); T0 = -vbs / Nvtmrs * model->BSIM4v4vtss * T9; dT0_dVb = model->BSIM4v4vtss / Nvtmrs * (T9 + vbs * T9 * T9) ; DEXP(T0, T1, T10); dT1_dVb = T10 * dT0_dVb; } if ((model->BSIM4v4vtsd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrs * T9; DEXP(T0, T2, T10); dT2_dVb = T10 / Nvtmrs * T9; } else { T9 = 1.0 / (model->BSIM4v4vtsd - vbd); T0 = -vbd / Nvtmrs * model->BSIM4v4vtsd * T9; dT0_dVb = model->BSIM4v4vtsd / Nvtmrs * (T9 + vbd * T9 * T9) ; DEXP(T0, T2, T10); dT2_dVb = T10 * dT0_dVb; } if ((model->BSIM4v4vtssws - vbs) < 1e-3) { T9 = 1.0e3; T0 = -vbs / Nvtmrssw * T9; DEXP(T0, T3, T10); dT3_dVb = T10 / Nvtmrssw * T9; } else { T9 = 1.0 / (model->BSIM4v4vtssws - vbs); T0 = -vbs / Nvtmrssw * model->BSIM4v4vtssws * T9; dT0_dVb = model->BSIM4v4vtssws / Nvtmrssw * (T9 + vbs * T9 * T9) ; DEXP(T0, T3, T10); dT3_dVb = T10 * dT0_dVb; } if ((model->BSIM4v4vtsswd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrssw * T9; DEXP(T0, T4, T10); dT4_dVb = T10 / Nvtmrssw * T9; } else { T9 = 1.0 / (model->BSIM4v4vtsswd - vbd); T0 = -vbd / Nvtmrssw * model->BSIM4v4vtsswd * T9; dT0_dVb = model->BSIM4v4vtsswd / Nvtmrssw * (T9 + vbd * T9 * T9) ; DEXP(T0, T4, T10); dT4_dVb = T10 * dT0_dVb; } if ((model->BSIM4v4vtsswgs - vbs) < 1e-3) { T9 = 1.0e3; T0 = -vbs / Nvtmrsswg * T9; DEXP(T0, T5, T10); dT5_dVb = T10 / Nvtmrsswg * T9; } else { T9 = 1.0 / (model->BSIM4v4vtsswgs - vbs); T0 = -vbs / Nvtmrsswg * model->BSIM4v4vtsswgs * T9; dT0_dVb = model->BSIM4v4vtsswgs / Nvtmrsswg * (T9 + vbs * T9 * T9) ; DEXP(T0, T5, T10); dT5_dVb = T10 * dT0_dVb; } if ((model->BSIM4v4vtsswgd - vbd) < 1e-3) { T9 = 1.0e3; T0 = -vbd / Nvtmrsswg * T9; DEXP(T0, T4, T10); dT6_dVb = T10 / Nvtmrsswg * T9; } else { T9 = 1.0 / (model->BSIM4v4vtsswgd - vbd); T0 = -vbd / Nvtmrsswg * model->BSIM4v4vtsswgd * T9; dT0_dVb = model->BSIM4v4vtsswgd / Nvtmrsswg * (T9 + vbd * T9 * T9) ; DEXP(T0, T6, T10); dT6_dVb = T10 * dT0_dVb; } here->BSIM4v4gbs += here->BSIM4v4SjctTempRevSatCur * dT1_dVb + here->BSIM4v4SswTempRevSatCur * dT3_dVb + here->BSIM4v4SswgTempRevSatCur * dT5_dVb; here->BSIM4v4cbs -= here->BSIM4v4SjctTempRevSatCur * (T1 - 1.0) + here->BSIM4v4SswTempRevSatCur * (T3 - 1.0) + here->BSIM4v4SswgTempRevSatCur * (T5 - 1.0); here->BSIM4v4gbd += here->BSIM4v4DjctTempRevSatCur * dT2_dVb + here->BSIM4v4DswTempRevSatCur * dT4_dVb + here->BSIM4v4DswgTempRevSatCur * dT6_dVb; here->BSIM4v4cbd -= here->BSIM4v4DjctTempRevSatCur * (T2 - 1.0) + here->BSIM4v4DswTempRevSatCur * (T4 - 1.0) + here->BSIM4v4DswgTempRevSatCur * (T6 - 1.0); /* End of diode DC model */ break; default: break; } if (vds >= 0.0) { here->BSIM4v4mode = 1; Vds = vds; Vgs = vgs; Vbs = vbs; Vdb = vds - vbs; /* WDLiu: for GIDL */ } else { here->BSIM4v4mode = -1; Vds = -vds; Vgs = vgd; Vbs = vbd; Vdb = -vbs; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T0 = Vbs - pParam->BSIM4v4vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * pParam->BSIM4v4vbsc); if (T0 >= 0.0) { Vbseff = pParam->BSIM4v4vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); Vbseff = pParam->BSIM4v4vbsc * (1.0 + T2); dVbseff_dVb = T2 * pParam->BSIM4v4vbsc / T1; } if (Vbseff < Vbs) { Vbseff = Vbs; } if (Vbseff > 0.0) { T0 = pParam->BSIM4v4phi / (pParam->BSIM4v4phi + Vbseff); Phis = pParam->BSIM4v4phi * T0; dPhis_dVb = -T0 * T0; sqrtPhis = pParam->BSIM4v4phis3 / (pParam->BSIM4v4phi + 0.5 * Vbseff); dsqrtPhis_dVb = -0.5 * sqrtPhis * sqrtPhis / pParam->BSIM4v4phis3; } else { Phis = pParam->BSIM4v4phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; } break; case BSIM4v30: case BSIM4v40: T0 = Vbs - here->BSIM4v4vbsc - 0.001; T1 = sqrt(T0 * T0 - 0.004 * here->BSIM4v4vbsc); if (T0 >= 0.0) { Vbseff = here->BSIM4v4vbsc + 0.5 * (T0 + T1); dVbseff_dVb = 0.5 * (1.0 + T0 / T1); } else { T2 = -0.002 / (T1 - T0); Vbseff = here->BSIM4v4vbsc * (1.0 + T2); dVbseff_dVb = T2 * here->BSIM4v4vbsc / T1; } /* JX: Correction to forward body bias */ T9 = 0.95 * pParam->BSIM4v4phi; T0 = T9 - Vbseff - 0.001; T1 = sqrt(T0 * T0 + 0.004 * T9); Vbseff = T9 - 0.5 * (T0 + T1); dVbseff_dVb *= 0.5 * (1.0 + T0 / T1); Phis = pParam->BSIM4v4phi - Vbseff; dPhis_dVb = -1.0; sqrtPhis = sqrt(Phis); dsqrtPhis_dVb = -0.5 / sqrtPhis; break; default: break; } Xdep = pParam->BSIM4v4Xdep0 * sqrtPhis / pParam->BSIM4v4sqrtPhi; dXdep_dVb = (pParam->BSIM4v4Xdep0 / pParam->BSIM4v4sqrtPhi) * dsqrtPhis_dVb; Leff = pParam->BSIM4v4leff; Vtm = model->BSIM4v4vtm; /* Vth Calculation */ T3 = sqrt(Xdep); V0 = pParam->BSIM4v4vbi - pParam->BSIM4v4phi; T0 = pParam->BSIM4v4dvt2 * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v4dvt2; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v4dvt2 * T4 * T4; } lt1 = model->BSIM4v4factor1 * T3 * T1; dlt1_dVb = model->BSIM4v4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v4dvt2w * Vbseff; if (T0 >= - 0.5) { T1 = 1.0 + T0; T2 = pParam->BSIM4v4dvt2w; } else { T4 = 1.0 / (3.0 + 8.0 * T0); T1 = (1.0 + 3.0 * T0) * T4; T2 = pParam->BSIM4v4dvt2w * T4 * T4; } ltw = model->BSIM4v4factor1 * T3 * T1; dltw_dVb = model->BSIM4v4factor1 * (0.5 / T3 * T1 * dXdep_dVb + T3 * T2); T0 = pParam->BSIM4v4dvt1 * Leff / lt1; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; Theta0 = T1 / T4; dT1_dVb = -T0 * T1 * dlt1_dVb / lt1; dTheta0_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { Theta0 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dTheta0_dVb = 0.0; } here->BSIM4v4thetavth = pParam->BSIM4v4dvt0 * Theta0; Delt_vth = here->BSIM4v4thetavth * V0; dDelt_vth_dVb = pParam->BSIM4v4dvt0 * dTheta0_dVb * V0; T0 = pParam->BSIM4v4dvt1w * pParam->BSIM4v4weff * Leff / ltw; if (T0 < EXP_THRESHOLD) { T1 = exp(T0); T2 = T1 - 1.0; T3 = T2 * T2; T4 = T3 + 2.0 * T1 * MIN_EXP; T5 = T1 / T4; dT1_dVb = -T0 * T1 * dltw_dVb / ltw; dT5_dVb = dT1_dVb * (T4 - 2.0 * T1 * (T2 + MIN_EXP)) / T4 / T4; } else { T5 = 1.0 / (MAX_EXP - 2.0); /* 3.0 * MIN_EXP omitted */ dT5_dVb = 0.0; } T0 = pParam->BSIM4v4dvt0w * T5; T2 = T0 * V0; dT2_dVb = pParam->BSIM4v4dvt0w * dT5_dVb * V0; TempRatio = ckt->CKTtemp / model->BSIM4v4tnom - 1.0; T0 = sqrt(1.0 + pParam->BSIM4v4lpe0 / Leff); T1 = pParam->BSIM4v4k1ox * (T0 - 1.0) * pParam->BSIM4v4sqrtPhi + (pParam->BSIM4v4kt1 + pParam->BSIM4v4kt1l / Leff + pParam->BSIM4v4kt2 * Vbseff) * TempRatio; Vth_NarrowW = model->BSIM4v4toxe * pParam->BSIM4v4phi / (pParam->BSIM4v4weff + pParam->BSIM4v4w0); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T3 = pParam->BSIM4v4eta0 + pParam->BSIM4v4etab * Vbseff; break; case BSIM4v30: case BSIM4v40: T3 = here->BSIM4v4eta0 + pParam->BSIM4v4etab * Vbseff; break; default: break; } if (T3 < 1.0e-4) { T9 = 1.0 / (3.0 - 2.0e4 * T3); T3 = (2.0e-4 - T3) * T9; T4 = T9 * T9; } else { T4 = 1.0; } dDIBL_Sft_dVd = T3 * pParam->BSIM4v4theta0vb0; DIBL_Sft = dDIBL_Sft_dVd * Vds; Lpe_Vb = sqrt(1.0 + pParam->BSIM4v4lpeb / Leff); switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Vth = model->BSIM4v4type * pParam->BSIM4v4vth0 + (pParam->BSIM4v4k1ox * sqrtPhis - pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi) * Lpe_Vb - pParam->BSIM4v4k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4v4k3 + pParam->BSIM4v4k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; dVth_dVb = Lpe_Vb * pParam->BSIM4v4k1ox * dsqrtPhis_dVb - pParam->BSIM4v4k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4v4k3b * Vth_NarrowW - pParam->BSIM4v4etab * Vds * pParam->BSIM4v4theta0vb0 * T4 + pParam->BSIM4v4kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; break; case BSIM4v30: case BSIM4v40: Vth = model->BSIM4v4type * here->BSIM4v4vth0 + (pParam->BSIM4v4k1ox * sqrtPhis - pParam->BSIM4v4k1 * pParam->BSIM4v4sqrtPhi) * Lpe_Vb - here->BSIM4v4k2ox * Vbseff - Delt_vth - T2 + (pParam->BSIM4v4k3 + pParam->BSIM4v4k3b * Vbseff) * Vth_NarrowW + T1 - DIBL_Sft; dVth_dVb = Lpe_Vb * pParam->BSIM4v4k1ox * dsqrtPhis_dVb - here->BSIM4v4k2ox - dDelt_vth_dVb - dT2_dVb + pParam->BSIM4v4k3b * Vth_NarrowW - pParam->BSIM4v4etab * Vds * pParam->BSIM4v4theta0vb0 * T4 + pParam->BSIM4v4kt2 * TempRatio; dVth_dVd = -dDIBL_Sft_dVd; break; default: break; } /* Calculate n */ tmp1 = EPSSI / Xdep; here->BSIM4v4nstar = model->BSIM4v4vtm / Charge_q * (model->BSIM4v4coxe + tmp1 + pParam->BSIM4v4cit); tmp2 = pParam->BSIM4v4nfactor * tmp1; tmp3 = pParam->BSIM4v4cdsc + pParam->BSIM4v4cdscb * Vbseff + pParam->BSIM4v4cdscd * Vds; tmp4 = (tmp2 + tmp3 * Theta0 + pParam->BSIM4v4cit) / model->BSIM4v4coxe; if (tmp4 >= -0.5) { n = 1.0 + tmp4; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v4cdscb * Theta0) / model->BSIM4v4coxe; dn_dVd = pParam->BSIM4v4cdscd * Theta0 / model->BSIM4v4coxe; } else { T0 = 1.0 / (3.0 + 8.0 * tmp4); n = (1.0 + 3.0 * tmp4) * T0; T0 *= T0; dn_dVb = (-tmp2 / Xdep * dXdep_dVb + tmp3 * dTheta0_dVb + pParam->BSIM4v4cdscb * Theta0) / model->BSIM4v4coxe * T0; dn_dVd = pParam->BSIM4v4cdscd * Theta0 / model->BSIM4v4coxe * T0; } /* Vth correction for Pocket implant */ if (pParam->BSIM4v4dvtp0 > 0.0) { T0 = -pParam->BSIM4v4dvtp1 * Vds; if (T0 < -EXP_THRESHOLD) { T2 = MIN_EXP; dT2_dVd = 0.0; } else { T2 = exp(T0); dT2_dVd = -pParam->BSIM4v4dvtp1 * T2; } T3 = Leff + pParam->BSIM4v4dvtp0 * (1.0 + T2); dT3_dVd = pParam->BSIM4v4dvtp0 * dT2_dVd; T4 = Vtm * log(Leff / T3); dT4_dVd = -Vtm * dT3_dVd / T3; dDITS_Sft_dVd = dn_dVd * T4 + n * dT4_dVd; dDITS_Sft_dVb = T4 * dn_dVb; Vth -= n * T4; dVth_dVd -= dDITS_Sft_dVd; dVth_dVb -= dDITS_Sft_dVb; } here->BSIM4v4von = Vth; /* Poly Gate Si Depletion Effect */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T0 = pParam->BSIM4v4vfb + pParam->BSIM4v4phi; break; case BSIM4v30: case BSIM4v40: T0 = here->BSIM4v4vfb + pParam->BSIM4v4phi; break; default: break; } BSIM4v4polyDepletion(T0, pParam->BSIM4v4ngate, model->BSIM4v4coxe, vgs, &vgs_eff, &dvgs_eff_dvg); BSIM4v4polyDepletion(T0, pParam->BSIM4v4ngate, model->BSIM4v4coxe, vgd, &vgd_eff, &dvgd_eff_dvg); if(here->BSIM4v4mode>0) { Vgs_eff = vgs_eff; dVgs_eff_dVg = dvgs_eff_dvg; } else { Vgs_eff = vgd_eff; dVgs_eff_dVg = dvgd_eff_dvg; } here->BSIM4v4vgs_eff = vgs_eff; here->BSIM4v4vgd_eff = vgd_eff; here->BSIM4v4dvgs_eff_dvg = dvgs_eff_dvg; here->BSIM4v4dvgd_eff_dvg = dvgd_eff_dvg; Vgst = Vgs_eff - Vth; /* Calculate Vgsteff */ T0 = n * Vtm; T1 = pParam->BSIM4v4mstar * Vgst; T2 = T1 / T0; if (T2 > EXP_THRESHOLD) { T10 = T1; dT10_dVg = pParam->BSIM4v4mstar * dVgs_eff_dVg; dT10_dVd = -dVth_dVd * pParam->BSIM4v4mstar; dT10_dVb = -dVth_dVb * pParam->BSIM4v4mstar; } else if (T2 < -EXP_THRESHOLD) { T10 = Vtm * log(1.0 + MIN_EXP); dT10_dVg = 0.0; dT10_dVd = T10 * dn_dVd; dT10_dVb = T10 * dn_dVb; T10 *= n; } else { ExpVgst = exp(T2); T3 = Vtm * log(1.0 + ExpVgst); T10 = n * T3; dT10_dVg = pParam->BSIM4v4mstar * ExpVgst / (1.0 + ExpVgst); dT10_dVb = T3 * dn_dVb - dT10_dVg * (dVth_dVb + Vgst * dn_dVb / n); dT10_dVd = T3 * dn_dVd - dT10_dVg * (dVth_dVd + Vgst * dn_dVd / n); dT10_dVg *= dVgs_eff_dVg; } T1 = pParam->BSIM4v4voffcbn - (1.0 - pParam->BSIM4v4mstar) * Vgst; T2 = T1 / T0; if (T2 < -EXP_THRESHOLD) { T3 = model->BSIM4v4coxe * MIN_EXP / pParam->BSIM4v4cdep0; T9 = pParam->BSIM4v4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else if (T2 > EXP_THRESHOLD) { T3 = model->BSIM4v4coxe * MAX_EXP / pParam->BSIM4v4cdep0; T9 = pParam->BSIM4v4mstar + T3 * n; dT9_dVg = 0.0; dT9_dVd = dn_dVd * T3; dT9_dVb = dn_dVb * T3; } else { ExpVgst = exp(T2); T3 = model->BSIM4v4coxe / pParam->BSIM4v4cdep0; T4 = T3 * ExpVgst; T5 = T1 * T4 / T0; T9 = pParam->BSIM4v4mstar + n * T4; dT9_dVg = T3 * (pParam->BSIM4v4mstar - 1.0) * ExpVgst / Vtm; dT9_dVb = T4 * dn_dVb - dT9_dVg * dVth_dVb - T5 * dn_dVb; dT9_dVd = T4 * dn_dVd - dT9_dVg * dVth_dVd - T5 * dn_dVd; dT9_dVg *= dVgs_eff_dVg; } here->BSIM4v4Vgsteff = Vgsteff = T10 / T9; T11 = T9 * T9; dVgsteff_dVg = (T9 * dT10_dVg - T10 * dT9_dVg) / T11; dVgsteff_dVd = (T9 * dT10_dVd - T10 * dT9_dVd) / T11; dVgsteff_dVb = (T9 * dT10_dVb - T10 * dT9_dVb) / T11; /* Calculate Effective Channel Geometry */ T9 = sqrtPhis - pParam->BSIM4v4sqrtPhi; Weff = pParam->BSIM4v4weff - 2.0 * (pParam->BSIM4v4dwg * Vgsteff + pParam->BSIM4v4dwb * T9); dWeff_dVg = -2.0 * pParam->BSIM4v4dwg; dWeff_dVb = -2.0 * pParam->BSIM4v4dwb * dsqrtPhis_dVb; if (Weff < 2.0e-8) /* to avoid the discontinuity problem due to Weff*/ { T0 = 1.0 / (6.0e-8 - 2.0 * Weff); Weff = 2.0e-8 * (4.0e-8 - Weff) * T0; T0 *= T0 * 4.0e-16; dWeff_dVg *= T0; dWeff_dVb *= T0; } if (model->BSIM4v4rdsMod == 1) Rds = dRds_dVg = dRds_dVb = 0.0; else { T0 = 1.0 + pParam->BSIM4v4prwg * Vgsteff; dT0_dVg = -pParam->BSIM4v4prwg / T0 / T0; T1 = pParam->BSIM4v4prwb * T9; dT1_dVb = pParam->BSIM4v4prwb * dsqrtPhis_dVb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); /* 0.01 = 4.0 * 0.05 * 0.05 */ dT3_dVg = 1.0 + T2 / (T3 - T2); dT3_dVb = dT3_dVg * dT1_dVb; dT3_dVg *= dT0_dVg; T4 = pParam->BSIM4v4rds0 * 0.5; Rds = pParam->BSIM4v4rdswmin + T3 * T4; dRds_dVg = T4 * dT3_dVg; dRds_dVb = T4 * dT3_dVb; if (Rds > 0.0) switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v40: here->BSIM4v4grdsw = 1.0 / Rds; break; case BSIM4v30: here->BSIM4v4grdsw = 1.0 / Rds * here->BSIM4v4nf; /* bugfix */ break; default: break; } else here->BSIM4v4grdsw = 0.0; } /* Calculate Abulk */ T9 = 0.5 * pParam->BSIM4v4k1ox * Lpe_Vb / sqrtPhis; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T1 = T9 + pParam->BSIM4v4k2ox - pParam->BSIM4v4k3b * Vth_NarrowW; break; case BSIM4v30: case BSIM4v40: T1 = T9 + here->BSIM4v4k2ox - pParam->BSIM4v4k3b * Vth_NarrowW; break; default: break; } dT1_dVb = -T9 / sqrtPhis * dsqrtPhis_dVb; T9 = sqrt(pParam->BSIM4v4xj * Xdep); tmp1 = Leff + 2.0 * T9; T5 = Leff / tmp1; tmp2 = pParam->BSIM4v4a0 * T5; tmp3 = pParam->BSIM4v4weff + pParam->BSIM4v4b1; tmp4 = pParam->BSIM4v4b0 / tmp3; T2 = tmp2 + tmp4; dT2_dVb = -T9 / tmp1 / Xdep * dXdep_dVb; T6 = T5 * T5; T7 = T5 * T6; Abulk0 = 1.0 + T1 * T2; dAbulk0_dVb = T1 * tmp2 * dT2_dVb + T2 * dT1_dVb; T8 = pParam->BSIM4v4ags * pParam->BSIM4v4a0 * T7; dAbulk_dVg = -T1 * T8; Abulk = Abulk0 + dAbulk_dVg * Vgsteff; dAbulk_dVb = dAbulk0_dVb - T8 * Vgsteff * (dT1_dVb + 3.0 * T1 * dT2_dVb); if (Abulk0 < 0.1) /* added to avoid the problems caused by Abulk0 */ { T9 = 1.0 / (3.0 - 20.0 * Abulk0); Abulk0 = (0.2 - Abulk0) * T9; dAbulk0_dVb *= T9 * T9; } if (Abulk < 0.1) { T9 = 1.0 / (3.0 - 20.0 * Abulk); Abulk = (0.2 - Abulk) * T9; T10 = T9 * T9; dAbulk_dVb *= T10; dAbulk_dVg *= T10; } here->BSIM4v4Abulk = Abulk; T2 = pParam->BSIM4v4keta * Vbseff; if (T2 >= -0.9) { T0 = 1.0 / (1.0 + T2); dT0_dVb = -pParam->BSIM4v4keta * T0 * T0; } else { T1 = 1.0 / (0.8 + T2); T0 = (17.0 + 20.0 * T2) * T1; dT0_dVb = -pParam->BSIM4v4keta * T1 * T1; } dAbulk_dVg *= T0; dAbulk_dVb = dAbulk_dVb * T0 + Abulk * dT0_dVb; dAbulk0_dVb = dAbulk0_dVb * T0 + Abulk0 * dT0_dVb; Abulk *= T0; Abulk0 *= T0; /* Mobility calculation */ if (model->BSIM4v4mobMod == 0) { T0 = Vgsteff + Vth + Vth; T2 = pParam->BSIM4v4ua + pParam->BSIM4v4uc * Vbseff; T3 = T0 / model->BSIM4v4toxe; T5 = T3 * (T2 + pParam->BSIM4v4ub * T3); dDenomi_dVg = (T2 + 2.0 * pParam->BSIM4v4ub * T3) / model->BSIM4v4toxe; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v4uc * T3; } else if (model->BSIM4v4mobMod == 1) { T0 = Vgsteff + Vth + Vth; T2 = 1.0 + pParam->BSIM4v4uc * Vbseff; T3 = T0 / model->BSIM4v4toxe; T4 = T3 * (pParam->BSIM4v4ua + pParam->BSIM4v4ub * T3); T5 = T4 * T2; dDenomi_dVg = (pParam->BSIM4v4ua + 2.0 * pParam->BSIM4v4ub * T3) * T2 / model->BSIM4v4toxe; dDenomi_dVd = dDenomi_dVg * 2.0 * dVth_dVd; dDenomi_dVb = dDenomi_dVg * 2.0 * dVth_dVb + pParam->BSIM4v4uc * T4; } else { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T0 = (Vgsteff + pParam->BSIM4v4vtfbphi1) / model->BSIM4v4toxe; break; case BSIM4v30: case BSIM4v40: T0 = (Vgsteff + here->BSIM4v4vtfbphi1) / model->BSIM4v4toxe; break; default: break; } T1 = exp(pParam->BSIM4v4eu * log(T0)); dT1_dVg = T1 * pParam->BSIM4v4eu / T0 / model->BSIM4v4toxe; T2 = pParam->BSIM4v4ua + pParam->BSIM4v4uc * Vbseff; T5 = T1 * T2; dDenomi_dVg = T2 * dT1_dVg; dDenomi_dVd = 0.0; dDenomi_dVb = T1 * pParam->BSIM4v4uc; } if (T5 >= -0.8) { Denomi = 1.0 + T5; } else { T9 = 1.0 / (7.0 + 10.0 * T5); Denomi = (0.6 + T5) * T9; T9 *= T9; dDenomi_dVg *= T9; dDenomi_dVd *= T9; dDenomi_dVb *= T9; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: here->BSIM4v4ueff = ueff = pParam->BSIM4v4u0temp / Denomi; break; case BSIM4v30: case BSIM4v40: here->BSIM4v4ueff = ueff = here->BSIM4v4u0temp / Denomi; break; default: break; } T9 = -ueff / Denomi; dueff_dVg = T9 * dDenomi_dVg; dueff_dVd = T9 * dDenomi_dVd; dueff_dVb = T9 * dDenomi_dVb; /* Saturation Drain Voltage Vdsat */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: WVCox = Weff * pParam->BSIM4v4vsattemp * model->BSIM4v4coxe; break; case BSIM4v30: case BSIM4v40: WVCox = Weff * here->BSIM4v4vsattemp * model->BSIM4v4coxe; break; default: break; } WVCoxRds = WVCox * Rds; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Esat = 2.0 * pParam->BSIM4v4vsattemp / ueff; break; case BSIM4v30: case BSIM4v40: Esat = 2.0 * here->BSIM4v4vsattemp / ueff; break; default: break; } here->BSIM4v4EsatL = EsatL = Esat * Leff; T0 = -EsatL /ueff; dEsatL_dVg = T0 * dueff_dVg; dEsatL_dVd = T0 * dueff_dVd; dEsatL_dVb = T0 * dueff_dVb; /* Sqrt() */ a1 = pParam->BSIM4v4a1; if (a1 == 0.0) { Lambda = pParam->BSIM4v4a2; dLambda_dVg = 0.0; } else if (a1 > 0.0) { T0 = 1.0 - pParam->BSIM4v4a2; T1 = T0 - pParam->BSIM4v4a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * T0); Lambda = pParam->BSIM4v4a2 + T0 - 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v4a1 * (1.0 + T1 / T2); } else { T1 = pParam->BSIM4v4a2 + pParam->BSIM4v4a1 * Vgsteff - 0.0001; T2 = sqrt(T1 * T1 + 0.0004 * pParam->BSIM4v4a2); Lambda = 0.5 * (T1 + T2); dLambda_dVg = 0.5 * pParam->BSIM4v4a1 * (1.0 + T1 / T2); } Vgst2Vtm = Vgsteff + 2.0 * Vtm; if (Rds > 0) { tmp2 = dRds_dVg / Rds + dWeff_dVg / Weff; tmp3 = dRds_dVb / Rds + dWeff_dVb / Weff; } else { tmp2 = dWeff_dVg / Weff; tmp3 = dWeff_dVb / Weff; } if ((Rds == 0.0) && (Lambda == 1.0)) { T0 = 1.0 / (Abulk * EsatL + Vgst2Vtm); tmp1 = 0.0; T1 = T0 * T0; T2 = Vgst2Vtm * T0; T3 = EsatL * Vgst2Vtm; Vdsat = T3 * T0; dT0_dVg = -(Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 1.0) * T1; dT0_dVd = -(Abulk * dEsatL_dVd) * T1; dT0_dVb = -(Abulk * dEsatL_dVb + dAbulk_dVb * EsatL) * T1; dVdsat_dVg = T3 * dT0_dVg + T2 * dEsatL_dVg + EsatL * T0; dVdsat_dVd = T3 * dT0_dVd + T2 * dEsatL_dVd; dVdsat_dVb = T3 * dT0_dVb + T2 * dEsatL_dVb; } else { tmp1 = dLambda_dVg / (Lambda * Lambda); T9 = Abulk * WVCoxRds; T8 = Abulk * T9; T7 = Vgst2Vtm * T9; T6 = Vgst2Vtm * WVCoxRds; T0 = 2.0 * Abulk * (T9 - 1.0 + 1.0 / Lambda); dT0_dVg = 2.0 * (T8 * tmp2 - Abulk * tmp1 + (2.0 * T9 + 1.0 / Lambda - 1.0) * dAbulk_dVg); dT0_dVb = 2.0 * (T8 * (2.0 / Abulk * dAbulk_dVb + tmp3) + (1.0 / Lambda - 1.0) * dAbulk_dVb); dT0_dVd = 0.0; T1 = Vgst2Vtm * (2.0 / Lambda - 1.0) + Abulk * EsatL + 3.0 * T7; dT1_dVg = (2.0 / Lambda - 1.0) - 2.0 * Vgst2Vtm * tmp1 + Abulk * dEsatL_dVg + EsatL * dAbulk_dVg + 3.0 * (T9 + T7 * tmp2 + T6 * dAbulk_dVg); dT1_dVb = Abulk * dEsatL_dVb + EsatL * dAbulk_dVb + 3.0 * (T6 * dAbulk_dVb + T7 * tmp3); dT1_dVd = Abulk * dEsatL_dVd; T2 = Vgst2Vtm * (EsatL + 2.0 * T6); dT2_dVg = EsatL + Vgst2Vtm * dEsatL_dVg + T6 * (4.0 + 2.0 * Vgst2Vtm * tmp2); dT2_dVb = Vgst2Vtm * (dEsatL_dVb + 2.0 * T6 * tmp3); dT2_dVd = Vgst2Vtm * dEsatL_dVd; T3 = sqrt(T1 * T1 - 2.0 * T0 * T2); Vdsat = (T1 - T3) / T0; dT3_dVg = (T1 * dT1_dVg - 2.0 * (T0 * dT2_dVg + T2 * dT0_dVg)) / T3; dT3_dVd = (T1 * dT1_dVd - 2.0 * (T0 * dT2_dVd + T2 * dT0_dVd)) / T3; dT3_dVb = (T1 * dT1_dVb - 2.0 * (T0 * dT2_dVb + T2 * dT0_dVb)) / T3; dVdsat_dVg = (dT1_dVg - (T1 * dT1_dVg - dT0_dVg * T2 - T0 * dT2_dVg) / T3 - Vdsat * dT0_dVg) / T0; dVdsat_dVb = (dT1_dVb - (T1 * dT1_dVb - dT0_dVb * T2 - T0 * dT2_dVb) / T3 - Vdsat * dT0_dVb) / T0; dVdsat_dVd = (dT1_dVd - (T1 * dT1_dVd - T0 * dT2_dVd) / T3) / T0; } here->BSIM4v4vdsat = Vdsat; /* Calculate Vdseff */ T1 = Vdsat - Vds - pParam->BSIM4v4delta; dT1_dVg = dVdsat_dVg; dT1_dVd = dVdsat_dVd - 1.0; dT1_dVb = dVdsat_dVb; T2 = sqrt(T1 * T1 + 4.0 * pParam->BSIM4v4delta * Vdsat); T0 = T1 / T2; T9 = 2.0 * pParam->BSIM4v4delta; T3 = T9 / T2; dT2_dVg = T0 * dT1_dVg + T3 * dVdsat_dVg; dT2_dVd = T0 * dT1_dVd + T3 * dVdsat_dVd; dT2_dVb = T0 * dT1_dVb + T3 * dVdsat_dVb; if (T1 >= 0.0) { Vdseff = Vdsat - 0.5 * (T1 + T2); dVdseff_dVg = dVdsat_dVg - 0.5 * (dT1_dVg + dT2_dVg); dVdseff_dVd = dVdsat_dVd - 0.5 * (dT1_dVd + dT2_dVd); dVdseff_dVb = dVdsat_dVb - 0.5 * (dT1_dVb + dT2_dVb); } else { T4 = T9 / (T2 - T1); T5 = 1.0 - T4; T6 = Vdsat * T4 / (T2 - T1); Vdseff = Vdsat * T5; dVdseff_dVg = dVdsat_dVg * T5 + T6 * (dT2_dVg - dT1_dVg); dVdseff_dVd = dVdsat_dVd * T5 + T6 * (dT2_dVd - dT1_dVd); dVdseff_dVb = dVdsat_dVb * T5 + T6 * (dT2_dVb - dT1_dVb); } if (Vds == 0.0) { Vdseff = 0.0; dVdseff_dVg = 0.0; dVdseff_dVb = 0.0; } if (Vdseff > Vds) Vdseff = Vds; diffVds = Vds - Vdseff; here->BSIM4v4Vdseff = Vdseff; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: case BSIM4v40: /* Velocity Overshoot */ if((model->BSIM4v4lambdaGiven) && (model->BSIM4v4lambda > 0.0) ) { T1 = Leff * ueff; T2 = pParam->BSIM4v4lambda / T1; T3 = -T2 / T1 * Leff; dT2_dVd = T3 * dueff_dVd; dT2_dVg = T3 * dueff_dVg; dT2_dVb = T3 * dueff_dVb; T5 = 1.0 / (Esat * pParam->BSIM4v4litl); T4 = -T5 / EsatL; dT5_dVg = dEsatL_dVg * T4; dT5_dVd = dEsatL_dVd * T4; dT5_dVb = dEsatL_dVb * T4; T6 = 1.0 + diffVds * T5; dT6_dVg = dT5_dVg * diffVds - dVdseff_dVg * T5; dT6_dVd = dT5_dVd * diffVds + (1.0 - dVdseff_dVd) * T5; dT6_dVb = dT5_dVb * diffVds - dVdseff_dVb * T5; T7 = 2.0 / (T6 * T6 + 1.0); T8 = 1.0 - T7; T9 = T6 * T7 * T7; dT8_dVg = T9 * dT6_dVg; dT8_dVd = T9 * dT6_dVd; dT8_dVb = T9 * dT6_dVb; T10 = 1.0 + T2 * T8; dT10_dVg = dT2_dVg * T8 + T2 * dT8_dVg; dT10_dVd = dT2_dVd * T8 + T2 * dT8_dVd; dT10_dVb = dT2_dVb * T8 + T2 * dT8_dVb; if(T10 == 1.0) dT10_dVg = dT10_dVd = dT10_dVb = 0.0; dEsatL_dVg *= T10; dEsatL_dVg += EsatL * dT10_dVg; dEsatL_dVd *= T10; dEsatL_dVd += EsatL * dT10_dVd; dEsatL_dVb *= T10; dEsatL_dVb += EsatL * dT10_dVb; EsatL *= T10; here->BSIM4v4EsatL = EsatL; } break; default: break; } /* Calculate Vasat */ tmp4 = 1.0 - 0.5 * Abulk * Vdsat / Vgst2Vtm; T9 = WVCoxRds * Vgsteff; T8 = T9 / Vgst2Vtm; T0 = EsatL + Vdsat + 2.0 * T9 * tmp4; T7 = 2.0 * WVCoxRds * tmp4; dT0_dVg = dEsatL_dVg + dVdsat_dVg + T7 * (1.0 + tmp2 * Vgsteff) - T8 * (Abulk * dVdsat_dVg - Abulk * Vdsat / Vgst2Vtm + Vdsat * dAbulk_dVg); dT0_dVb = dEsatL_dVb + dVdsat_dVb + T7 * tmp3 * Vgsteff - T8 * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = dEsatL_dVd + dVdsat_dVd - T8 * Abulk * dVdsat_dVd; T9 = WVCoxRds * Abulk; T1 = 2.0 / Lambda - 1.0 + T9; dT1_dVg = -2.0 * tmp1 + WVCoxRds * (Abulk * tmp2 + dAbulk_dVg); dT1_dVb = dAbulk_dVb * WVCoxRds + T9 * tmp3; Vasat = T0 / T1; dVasat_dVg = (dT0_dVg - Vasat * dT1_dVg) / T1; dVasat_dVb = (dT0_dVb - Vasat * dT1_dVb) / T1; dVasat_dVd = dT0_dVd / T1; /* Calculate Idl first */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: tmp1 = pParam->BSIM4v4vtfbphi2; break; case BSIM4v30: case BSIM4v40: tmp1 = here->BSIM4v4vtfbphi2; break; default: break; } tmp2 = 2.0e8 * model->BSIM4v4toxp; dT0_dVg = 1.0 / tmp2; T0 = (Vgsteff + tmp1) * dT0_dVg; tmp3 = exp(0.7 * log(T0)); T1 = 1.0 + tmp3; T2 = 0.7 * tmp3 / T0; Tcen = 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 * dT0_dVg / T1; Coxeff = EPSSI * model->BSIM4v4coxp / (EPSSI + model->BSIM4v4coxp * Tcen); dCoxeff_dVg = -Coxeff * Coxeff * dTcen_dVg / EPSSI; CoxeffWovL = Coxeff * Weff / Leff; beta = ueff * CoxeffWovL; T3 = ueff / Leff; dbeta_dVg = CoxeffWovL * dueff_dVg + T3 * (Weff * dCoxeff_dVg + Coxeff * dWeff_dVg); dbeta_dVd = CoxeffWovL * dueff_dVd; dbeta_dVb = CoxeffWovL * dueff_dVb + T3 * Coxeff * dWeff_dVb; here->BSIM4v4AbovVgst2Vtm = Abulk / Vgst2Vtm; T0 = 1.0 - 0.5 * Vdseff * here->BSIM4v4AbovVgst2Vtm; dT0_dVg = -0.5 * (Abulk * dVdseff_dVg - Abulk * Vdseff / Vgst2Vtm + Vdseff * dAbulk_dVg) / Vgst2Vtm; dT0_dVd = -0.5 * Abulk * dVdseff_dVd / Vgst2Vtm; dT0_dVb = -0.5 * (Abulk * dVdseff_dVb + dAbulk_dVb * Vdseff) / Vgst2Vtm; fgche1 = Vgsteff * T0; dfgche1_dVg = Vgsteff * dT0_dVg + T0; dfgche1_dVd = Vgsteff * dT0_dVd; dfgche1_dVb = Vgsteff * dT0_dVb; T9 = Vdseff / EsatL; fgche2 = 1.0 + T9; dfgche2_dVg = (dVdseff_dVg - T9 * dEsatL_dVg) / EsatL; dfgche2_dVd = (dVdseff_dVd - T9 * dEsatL_dVd) / EsatL; dfgche2_dVb = (dVdseff_dVb - T9 * dEsatL_dVb) / EsatL; gche = beta * fgche1 / fgche2; dgche_dVg = (beta * dfgche1_dVg + fgche1 * dbeta_dVg - gche * dfgche2_dVg) / fgche2; dgche_dVd = (beta * dfgche1_dVd + fgche1 * dbeta_dVd - gche * dfgche2_dVd) / fgche2; dgche_dVb = (beta * dfgche1_dVb + fgche1 * dbeta_dVb - gche * dfgche2_dVb) / fgche2; T0 = 1.0 + gche * Rds; Idl = gche / T0; T1 = (1.0 - Idl * Rds) / T0; T2 = Idl * Idl; dIdl_dVg = T1 * dgche_dVg - T2 * dRds_dVg; dIdl_dVd = T1 * dgche_dVd; dIdl_dVb = T1 * dgche_dVb - T2 * dRds_dVb; /* Calculate degradation factor due to pocket implant */ if (pParam->BSIM4v4fprout <= 0.0) { FP = 1.0; dFP_dVg = 0.0; } else { T9 = pParam->BSIM4v4fprout * sqrt(Leff) / Vgst2Vtm; FP = 1.0 / (1.0 + T9); dFP_dVg = FP * FP * T9 / Vgst2Vtm; } /* Calculate VACLM */ T8 = pParam->BSIM4v4pvag / EsatL; T9 = T8 * Vgsteff; if (T9 > -0.9) { PvagTerm = 1.0 + T9; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL); dPvagTerm_dVb = -T9 * dEsatL_dVb / EsatL; dPvagTerm_dVd = -T9 * dEsatL_dVd / EsatL; } else { T4 = 1.0 / (17.0 + 20.0 * T9); PvagTerm = (0.8 + T9) * T4; T4 *= T4; dPvagTerm_dVg = T8 * (1.0 - Vgsteff * dEsatL_dVg / EsatL) * T4; T9 *= T4 / EsatL; dPvagTerm_dVb = -T9 * dEsatL_dVb; dPvagTerm_dVd = -T9 * dEsatL_dVd; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: min_exp_tmp = 0.0; break; case BSIM4v30: case BSIM4v40: min_exp_tmp = MIN_EXP; break; default: break; } if ((pParam->BSIM4v4pclm > min_exp_tmp) && (diffVds > 1.0e-10)) { T0 = 1.0 + Rds * Idl; dT0_dVg = dRds_dVg * Idl + Rds * dIdl_dVg; dT0_dVd = Rds * dIdl_dVd; dT0_dVb = dRds_dVb * Idl + Rds * dIdl_dVb; T2 = Vdsat / Esat; T1 = Leff + T2; dT1_dVg = (dVdsat_dVg - T2 * dEsatL_dVg / Leff) / Esat; dT1_dVd = (dVdsat_dVd - T2 * dEsatL_dVd / Leff) / Esat; dT1_dVb = (dVdsat_dVb - T2 * dEsatL_dVb / Leff) / Esat; Cclm = FP * PvagTerm * T0 * T1 / (pParam->BSIM4v4pclm * pParam->BSIM4v4litl); dCclm_dVg = Cclm * (dFP_dVg / FP + dPvagTerm_dVg / PvagTerm + dT0_dVg / T0 + dT1_dVg / T1); dCclm_dVb = Cclm * (dPvagTerm_dVb / PvagTerm + dT0_dVb / T0 + dT1_dVb / T1); dCclm_dVd = Cclm * (dPvagTerm_dVd / PvagTerm + dT0_dVd / T0 + dT1_dVd / T1); VACLM = Cclm * diffVds; dVACLM_dVg = dCclm_dVg * diffVds - dVdseff_dVg * Cclm; dVACLM_dVb = dCclm_dVb * diffVds - dVdseff_dVb * Cclm; dVACLM_dVd = dCclm_dVd * diffVds + (1.0 - dVdseff_dVd) * Cclm; } else { VACLM = Cclm = MAX_EXP; dVACLM_dVd = dVACLM_dVg = dVACLM_dVb = 0.0; dCclm_dVd = dCclm_dVg = dCclm_dVb = 0.0; } /* Calculate VADIBL */ if (pParam->BSIM4v4thetaRout > min_exp_tmp) { T8 = Abulk * Vdsat; T0 = Vgst2Vtm * T8; dT0_dVg = Vgst2Vtm * Abulk * dVdsat_dVg + T8 + Vgst2Vtm * Vdsat * dAbulk_dVg; dT0_dVb = Vgst2Vtm * (dAbulk_dVb * Vdsat + Abulk * dVdsat_dVb); dT0_dVd = Vgst2Vtm * Abulk * dVdsat_dVd; T1 = Vgst2Vtm + T8; dT1_dVg = 1.0 + Abulk * dVdsat_dVg + Vdsat * dAbulk_dVg; dT1_dVb = Abulk * dVdsat_dVb + dAbulk_dVb * Vdsat; dT1_dVd = Abulk * dVdsat_dVd; T9 = T1 * T1; T2 = pParam->BSIM4v4thetaRout; VADIBL = (Vgst2Vtm - T0 / T1) / T2; dVADIBL_dVg = (1.0 - dT0_dVg / T1 + T0 * dT1_dVg / T9) / T2; dVADIBL_dVb = (-dT0_dVb / T1 + T0 * dT1_dVb / T9) / T2; dVADIBL_dVd = (-dT0_dVd / T1 + T0 * dT1_dVd / T9) / T2; T7 = pParam->BSIM4v4pdiblb * Vbseff; if (T7 >= -0.9) { T3 = 1.0 / (1.0 + T7); VADIBL *= T3; dVADIBL_dVg *= T3; dVADIBL_dVb = (dVADIBL_dVb - VADIBL * pParam->BSIM4v4pdiblb) * T3; dVADIBL_dVd *= T3; } else { T4 = 1.0 / (0.8 + T7); T3 = (17.0 + 20.0 * T7) * T4; dVADIBL_dVg *= T3; dVADIBL_dVb = dVADIBL_dVb * T3 - VADIBL * pParam->BSIM4v4pdiblb * T4 * T4; dVADIBL_dVd *= T3; VADIBL *= T3; } dVADIBL_dVg = dVADIBL_dVg * PvagTerm + VADIBL * dPvagTerm_dVg; dVADIBL_dVb = dVADIBL_dVb * PvagTerm + VADIBL * dPvagTerm_dVb; dVADIBL_dVd = dVADIBL_dVd * PvagTerm + VADIBL * dPvagTerm_dVd; VADIBL *= PvagTerm; } else { VADIBL = MAX_EXP; dVADIBL_dVd = dVADIBL_dVg = dVADIBL_dVb = 0.0; } /* Calculate Va */ Va = Vasat + VACLM; dVa_dVg = dVasat_dVg + dVACLM_dVg; dVa_dVb = dVasat_dVb + dVACLM_dVb; dVa_dVd = dVasat_dVd + dVACLM_dVd; /* Calculate VADITS */ T0 = pParam->BSIM4v4pditsd * Vds; if (T0 > EXP_THRESHOLD) { T1 = MAX_EXP; dT1_dVd = 0; } else { T1 = exp(T0); dT1_dVd = T1 * pParam->BSIM4v4pditsd; } if (pParam->BSIM4v4pdits > min_exp_tmp) { T2 = 1.0 + model->BSIM4v4pditsl * Leff; VADITS = (1.0 + T2 * T1) / pParam->BSIM4v4pdits; dVADITS_dVg = VADITS * dFP_dVg; dVADITS_dVd = FP * T2 * dT1_dVd / pParam->BSIM4v4pdits; VADITS *= FP; } else { VADITS = MAX_EXP; dVADITS_dVg = dVADITS_dVd = 0; } /* Calculate VASCBE */ if (pParam->BSIM4v4pscbe2 > 0.0) { if (diffVds > pParam->BSIM4v4pscbe1 * pParam->BSIM4v4litl / EXP_THRESHOLD) { T0 = pParam->BSIM4v4pscbe1 * pParam->BSIM4v4litl / diffVds; VASCBE = Leff * exp(T0) / pParam->BSIM4v4pscbe2; T1 = T0 * VASCBE / diffVds; dVASCBE_dVg = T1 * dVdseff_dVg; dVASCBE_dVd = -T1 * (1.0 - dVdseff_dVd); dVASCBE_dVb = T1 * dVdseff_dVb; } else { VASCBE = MAX_EXP * Leff/pParam->BSIM4v4pscbe2; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } } else { VASCBE = MAX_EXP; dVASCBE_dVg = dVASCBE_dVd = dVASCBE_dVb = 0.0; } /* Add DIBL to Ids */ T9 = diffVds / VADIBL; T0 = 1.0 + T9; Idsa = Idl * T0; dIdsa_dVg = T0 * dIdl_dVg - Idl * (dVdseff_dVg + T9 * dVADIBL_dVg) / VADIBL; dIdsa_dVd = T0 * dIdl_dVd + Idl * (1.0 - dVdseff_dVd - T9 * dVADIBL_dVd) / VADIBL; dIdsa_dVb = T0 * dIdl_dVb - Idl * (dVdseff_dVb + T9 * dVADIBL_dVb) / VADIBL; /* Add DITS to Ids */ T9 = diffVds / VADITS; T0 = 1.0 + T9; dIdsa_dVg = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVADITS_dVg) / VADITS; dIdsa_dVd = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVADITS_dVd) / VADITS; dIdsa_dVb = T0 * dIdsa_dVb - Idsa * dVdseff_dVb / VADITS; Idsa *= T0; /* Add CLM to Ids */ T0 = log(Va / Vasat); dT0_dVg = dVa_dVg / Va - dVasat_dVg / Vasat; dT0_dVb = dVa_dVb / Va - dVasat_dVb / Vasat; dT0_dVd = dVa_dVd / Va - dVasat_dVd / Vasat; T1 = T0 / Cclm; T9 = 1.0 + T1; dT9_dVg = (dT0_dVg - T1 * dCclm_dVg) / Cclm; dT9_dVb = (dT0_dVb - T1 * dCclm_dVb) / Cclm; dT9_dVd = (dT0_dVd - T1 * dCclm_dVd) / Cclm; dIdsa_dVg = dIdsa_dVg * T9 + Idsa * dT9_dVg; dIdsa_dVb = dIdsa_dVb * T9 + Idsa * dT9_dVb; dIdsa_dVd = dIdsa_dVd * T9 + Idsa * dT9_dVd; Idsa *= T9; /* Substrate current begins */ tmp = pParam->BSIM4v4alpha0 + pParam->BSIM4v4alpha1 * Leff; if ((tmp <= 0.0) || (pParam->BSIM4v4beta0 <= 0.0)) { Isub = Gbd = Gbb = Gbg = 0.0; } else { T2 = tmp / Leff; if (diffVds > pParam->BSIM4v4beta0 / EXP_THRESHOLD) { T0 = -pParam->BSIM4v4beta0 / diffVds; T1 = T2 * diffVds * exp(T0); T3 = T1 / diffVds * (T0 - 1.0); dT1_dVg = T3 * dVdseff_dVg; dT1_dVd = T3 * (dVdseff_dVd - 1.0); dT1_dVb = T3 * dVdseff_dVb; } else { T3 = T2 * MIN_EXP; T1 = T3 * diffVds; dT1_dVg = -T3 * dVdseff_dVg; dT1_dVd = T3 * (1.0 - dVdseff_dVd); dT1_dVb = -T3 * dVdseff_dVb; } T4 = Idsa * Vdseff; Isub = T1 * T4; Gbg = T1 * (dIdsa_dVg * Vdseff + Idsa * dVdseff_dVg) + T4 * dT1_dVg; Gbd = T1 * (dIdsa_dVd * Vdseff + Idsa * dVdseff_dVd) + T4 * dT1_dVd; Gbb = T1 * (dIdsa_dVb * Vdseff + Idsa * dVdseff_dVb) + T4 * dT1_dVb; Gbd += Gbg * dVgsteff_dVd; Gbb += Gbg * dVgsteff_dVb; Gbg *= dVgsteff_dVg; Gbb *= dVbseff_dVb; } here->BSIM4v4csub = Isub; here->BSIM4v4gbbs = Gbb; here->BSIM4v4gbgs = Gbg; here->BSIM4v4gbds = Gbd; /* Add SCBE to Ids */ T9 = diffVds / VASCBE; T0 = 1.0 + T9; Ids = Idsa * T0; Gm = T0 * dIdsa_dVg - Idsa * (dVdseff_dVg + T9 * dVASCBE_dVg) / VASCBE; Gds = T0 * dIdsa_dVd + Idsa * (1.0 - dVdseff_dVd - T9 * dVASCBE_dVd) / VASCBE; Gmb = T0 * dIdsa_dVb - Idsa * (dVdseff_dVb + T9 * dVASCBE_dVb) / VASCBE; tmp1 = Gds + Gm * dVgsteff_dVd; tmp2 = Gmb + Gm * dVgsteff_dVb; tmp3 = Gm; Gm = (Ids * dVdseff_dVg + Vdseff * tmp3) * dVgsteff_dVg; Gds = Ids * (dVdseff_dVd + dVdseff_dVg * dVgsteff_dVd) + Vdseff * tmp1; Gmb = (Ids * (dVdseff_dVb + dVdseff_dVg * dVgsteff_dVb) + Vdseff * tmp2) * dVbseff_dVb; cdrain = Ids * Vdseff; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: break; case BSIM4v30: /* Source End Velocity Limit */ if((model->BSIM4v4vtlGiven) && (model->BSIM4v4vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; vs = cdrain * T11; /* vs */ dvs_dVg = Gm * T11 + cdrain * T10 * dVgsteff_dVg; dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; T1 = vs / (pParam->BSIM4v4vtl * pParam->BSIM4v4tfactor); T2 = 1.0 + exp(T0 * log(T1)); if(vs == 0.0) T3 = 0.0; else T3 = (T2 - 1.0) * T0 / vs; dT2_dVg = T3 * dvs_dVg; dT2_dVd = T3 * dvs_dVd; dT2_dVb = T3 * dvs_dVb; Fsevl = 1.0 / exp(log(T2)/ T0); T4 = -1.0 / T0 * Fsevl / T2; dFsevl_dVg = T4 * dT2_dVg; dFsevl_dVd = T4 * dT2_dVd; dFsevl_dVb = T4 * dT2_dVb; Gm *=Fsevl; Gm += cdrain * dFsevl_dVg; Gmb *=Fsevl; Gmb += cdrain * dFsevl_dVb; Gds *=Fsevl; Gds += cdrain * dFsevl_dVd; cdrain *= Fsevl; } break; case BSIM4v40: /* Source End Velocity Limit */ if((model->BSIM4v4vtlGiven) && (model->BSIM4v4vtl > 0.0) ) { T12 = 1.0 / Leff / CoxeffWovL; T11 = T12 / Vgsteff; T10 = -T11 / Vgsteff; vs = cdrain * T11; /* vs */ dvs_dVg = Gm * T11 + cdrain * T10 * dVgsteff_dVg; dvs_dVd = Gds * T11 + cdrain * T10 * dVgsteff_dVd; dvs_dVb = Gmb * T11 + cdrain * T10 * dVgsteff_dVb; T0 = 2 * MM; T1 = vs / (pParam->BSIM4v4vtl * pParam->BSIM4v4tfactor); if(T1 > 0.0) { T2 = 1.0 + exp(T0 * log(T1)); T3 = (T2 - 1.0) * T0 / vs; Fsevl = 1.0 / exp(log(T2)/ T0); dT2_dVg = T3 * dvs_dVg; dT2_dVd = T3 * dvs_dVd; dT2_dVb = T3 * dvs_dVb; T4 = -1.0 / T0 * Fsevl / T2; dFsevl_dVg = T4 * dT2_dVg; dFsevl_dVd = T4 * dT2_dVd; dFsevl_dVb = T4 * dT2_dVb; } else { Fsevl = 1.0; dFsevl_dVg = 0.0; dFsevl_dVd = 0.0; dFsevl_dVb = 0.0; } Gm *=Fsevl; Gm += cdrain * dFsevl_dVg; Gmb *=Fsevl; Gmb += cdrain * dFsevl_dVb; Gds *=Fsevl; Gds += cdrain * dFsevl_dVd; cdrain *= Fsevl; } break; default: break; } here->BSIM4v4gds = Gds; here->BSIM4v4gm = Gm; here->BSIM4v4gmbs = Gmb; here->BSIM4v4IdovVds = Ids; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: break; case BSIM4v40: if( here->BSIM4v4IdovVds <= 1.0e-9) here->BSIM4v4IdovVds = 1.0e-9; break; default: break; } /* Calculate Rg */ if ((here->BSIM4v4rgateMod > 1) || (here->BSIM4v4trnqsMod != 0) || (here->BSIM4v4acnqsMod != 0)) { T9 = pParam->BSIM4v4xrcrg2 * model->BSIM4v4vtm; T0 = T9 * beta; dT0_dVd = (dbeta_dVd + dbeta_dVg * dVgsteff_dVd) * T9; dT0_dVb = (dbeta_dVb + dbeta_dVg * dVgsteff_dVb) * T9; dT0_dVg = dbeta_dVg * T9; here->BSIM4v4gcrg = pParam->BSIM4v4xrcrg1 * ( T0 + Ids); here->BSIM4v4gcrgd = pParam->BSIM4v4xrcrg1 * (dT0_dVd + tmp1); here->BSIM4v4gcrgb = pParam->BSIM4v4xrcrg1 * (dT0_dVb + tmp2) * dVbseff_dVb; here->BSIM4v4gcrgg = pParam->BSIM4v4xrcrg1 * (dT0_dVg + tmp3) * dVgsteff_dVg; if (here->BSIM4v4nf != 1.0) { here->BSIM4v4gcrg *= here->BSIM4v4nf; here->BSIM4v4gcrgg *= here->BSIM4v4nf; here->BSIM4v4gcrgd *= here->BSIM4v4nf; here->BSIM4v4gcrgb *= here->BSIM4v4nf; } if (here->BSIM4v4rgateMod == 2) { T10 = here->BSIM4v4grgeltd * here->BSIM4v4grgeltd; T11 = here->BSIM4v4grgeltd + here->BSIM4v4gcrg; here->BSIM4v4gcrg = here->BSIM4v4grgeltd * here->BSIM4v4gcrg / T11; T12 = T10 / T11 / T11; here->BSIM4v4gcrgg *= T12; here->BSIM4v4gcrgd *= T12; here->BSIM4v4gcrgb *= T12; } here->BSIM4v4gcrgs = -(here->BSIM4v4gcrgg + here->BSIM4v4gcrgd + here->BSIM4v4gcrgb); } /* Calculate bias-dependent external S/D resistance */ if (model->BSIM4v4rdsMod) { /* Rs(V) */ T0 = vgs - pParam->BSIM4v4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgs_eff = 0.5 * (T0 + T1); dvgs_eff_dvg = vgs_eff / T1; T0 = 1.0 + pParam->BSIM4v4prwg * vgs_eff; dT0_dvg = -pParam->BSIM4v4prwg / T0 / T0 * dvgs_eff_dvg; T1 = -pParam->BSIM4v4prwb * vbs; dT1_dvb = -pParam->BSIM4v4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v4rs0 * 0.5; Rs = pParam->BSIM4v4rswmin + T3 * T4; dRs_dvg = T4 * dT3_dvg; dRs_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v4sourceConductance * Rs; here->BSIM4v4gstot = here->BSIM4v4sourceConductance / T0; T0 = -here->BSIM4v4gstot * here->BSIM4v4gstot; dgstot_dvd = 0.0; /* place holder */ dgstot_dvg = T0 * dRs_dvg; dgstot_dvb = T0 * dRs_dvb; dgstot_dvs = -(dgstot_dvg + dgstot_dvb + dgstot_dvd); /* Rd(V) */ T0 = vgd - pParam->BSIM4v4vfbsd; T1 = sqrt(T0 * T0 + 1.0e-4); vgd_eff = 0.5 * (T0 + T1); dvgd_eff_dvg = vgd_eff / T1; T0 = 1.0 + pParam->BSIM4v4prwg * vgd_eff; dT0_dvg = -pParam->BSIM4v4prwg / T0 / T0 * dvgd_eff_dvg; T1 = -pParam->BSIM4v4prwb * vbd; dT1_dvb = -pParam->BSIM4v4prwb; T2 = 1.0 / T0 + T1; T3 = T2 + sqrt(T2 * T2 + 0.01); dT3_dvg = T3 / (T3 - T2); dT3_dvb = dT3_dvg * dT1_dvb; dT3_dvg *= dT0_dvg; T4 = pParam->BSIM4v4rd0 * 0.5; Rd = pParam->BSIM4v4rdwmin + T3 * T4; dRd_dvg = T4 * dT3_dvg; dRd_dvb = T4 * dT3_dvb; T0 = 1.0 + here->BSIM4v4drainConductance * Rd; here->BSIM4v4gdtot = here->BSIM4v4drainConductance / T0; T0 = -here->BSIM4v4gdtot * here->BSIM4v4gdtot; dgdtot_dvs = 0.0; dgdtot_dvg = T0 * dRd_dvg; dgdtot_dvb = T0 * dRd_dvb; dgdtot_dvd = -(dgdtot_dvg + dgdtot_dvb + dgdtot_dvs); here->BSIM4v4gstotd = vses * dgstot_dvd; here->BSIM4v4gstotg = vses * dgstot_dvg; here->BSIM4v4gstots = vses * dgstot_dvs; here->BSIM4v4gstotb = vses * dgstot_dvb; T2 = vdes - vds; here->BSIM4v4gdtotd = T2 * dgdtot_dvd; here->BSIM4v4gdtotg = T2 * dgdtot_dvg; here->BSIM4v4gdtots = T2 * dgdtot_dvs; here->BSIM4v4gdtotb = T2 * dgdtot_dvb; } else /* WDLiu: for bypass */ { here->BSIM4v4gstot = here->BSIM4v4gstotd = here->BSIM4v4gstotg = 0.0; here->BSIM4v4gstots = here->BSIM4v4gstotb = 0.0; here->BSIM4v4gdtot = here->BSIM4v4gdtotd = here->BSIM4v4gdtotg = 0.0; here->BSIM4v4gdtots = here->BSIM4v4gdtotb = 0.0; } /* Calculate GIDL current */ vgs_eff = here->BSIM4v4vgs_eff; dvgs_eff_dvg = here->BSIM4v4dvgs_eff_dvg; T0 = 3.0 * model->BSIM4v4toxe; T1 = (vds - vgs_eff - pParam->BSIM4v4egidl ) / T0; if ((pParam->BSIM4v4agidl <= 0.0) || (pParam->BSIM4v4bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v4cgidl <= 0.0) || (vbd > 0.0)) Igidl = Ggidld = Ggidlg = Ggidlb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgs_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v4bgidl / T1; if (T2 < 100.0) { Igidl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * T1 * exp(-T2); T3 = Igidl * (1.0 + T2) / T1; Ggidld = T3 * dT1_dVd; Ggidlg = T3 * dT1_dVg; } else { Igidl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * 3.720075976e-44; Ggidld = Igidl * dT1_dVd; Ggidlg = Igidl * dT1_dVg; Igidl *= T1; } T4 = vbd * vbd; T5 = -vbd * T4; T6 = pParam->BSIM4v4cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v4cgidl * T4 / T6 / T6; Ggidld = Ggidld * T7 + Igidl * T8; Ggidlg = Ggidlg * T7; Ggidlb = -Igidl * T8; Igidl *= T7; } here->BSIM4v4Igidl = Igidl; here->BSIM4v4ggidld = Ggidld; here->BSIM4v4ggidlg = Ggidlg; here->BSIM4v4ggidlb = Ggidlb; /* Calculate GISL current */ vgd_eff = here->BSIM4v4vgd_eff; dvgd_eff_dvg = here->BSIM4v4dvgd_eff_dvg; T1 = (-vds - vgd_eff - pParam->BSIM4v4egidl ) / T0; if ((pParam->BSIM4v4agidl <= 0.0) || (pParam->BSIM4v4bgidl <= 0.0) || (T1 <= 0.0) || (pParam->BSIM4v4cgidl <= 0.0) || (vbs > 0.0)) Igisl = Ggisls = Ggislg = Ggislb = 0.0; else { dT1_dVd = 1.0 / T0; dT1_dVg = -dvgd_eff_dvg * dT1_dVd; T2 = pParam->BSIM4v4bgidl / T1; if (T2 < 100.0) { Igisl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * T1 * exp(-T2); T3 = Igisl * (1.0 + T2) / T1; Ggisls = T3 * dT1_dVd; Ggislg = T3 * dT1_dVg; } else { Igisl = pParam->BSIM4v4agidl * pParam->BSIM4v4weffCJ * 3.720075976e-44; Ggisls = Igisl * dT1_dVd; Ggislg = Igisl * dT1_dVg; Igisl *= T1; } T4 = vbs * vbs; T5 = -vbs * T4; T6 = pParam->BSIM4v4cgidl + T5; T7 = T5 / T6; T8 = 3.0 * pParam->BSIM4v4cgidl * T4 / T6 / T6; Ggisls = Ggisls * T7 + Igisl * T8; Ggislg = Ggislg * T7; Ggislb = -Igisl * T8; Igisl *= T7; } here->BSIM4v4Igisl = Igisl; here->BSIM4v4ggisls = Ggisls; here->BSIM4v4ggislg = Ggislg; here->BSIM4v4ggislb = Ggislb; /* Calculate gate tunneling current */ if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Vfb = pParam->BSIM4v4vfbzb; break; case BSIM4v40: Vfb = here->BSIM4v4vfbzb; break; default: break; } V3 = Vfb - Vgs_eff + Vbseff - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1; /* WDLiu: -No surprise? No. -Good! */ Voxacc = Vfb - Vfbeff; dVoxacc_dVg = -dVfbeff_dVg; dVoxacc_dVb = -dVfbeff_dVb; if (Voxacc < 0.0) /* WDLiu: Avoiding numerical instability. */ Voxacc = dVoxacc_dVg = dVoxacc_dVb = 0.0; T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - Vbseff - Vgsteff; if (pParam->BSIM4v4k1ox == 0.0) Voxdepinv = dVoxdepinv_dVg = dVoxdepinv_dVd = dVoxdepinv_dVb = 0.0; else if (T3 < 0.0) { Voxdepinv = -T3; dVoxdepinv_dVg = -dVgs_eff_dVg + dVfbeff_dVg + dVgsteff_dVg; dVoxdepinv_dVd = dVgsteff_dVd; dVoxdepinv_dVb = dVfbeff_dVb + 1.0 + dVgsteff_dVb; } else { T1 = sqrt(T0 * T0 + T3); T2 = T0 / T1; Voxdepinv = pParam->BSIM4v4k1ox * (T1 - T0); dVoxdepinv_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dVoxdepinv_dVd = -T2 * dVgsteff_dVd; dVoxdepinv_dVb = -T2 * (dVfbeff_dVb + 1.0 + dVgsteff_dVb); } Voxdepinv += Vgsteff; dVoxdepinv_dVg += dVgsteff_dVg; dVoxdepinv_dVd += dVgsteff_dVd; dVoxdepinv_dVb += dVgsteff_dVb; } if (model->BSIM4v4igcMod) { T0 = Vtm * pParam->BSIM4v4nigc; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: VxNVt = (Vgs_eff - model->BSIM4v4type * pParam->BSIM4v4vth0) / T0; break; case BSIM4v30: case BSIM4v40: VxNVt = (Vgs_eff - model->BSIM4v4type * here->BSIM4v4vth0) / T0; break; default: break; } if (VxNVt > EXP_THRESHOLD) { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Vaux = Vgs_eff - model->BSIM4v4type * pParam->BSIM4v4vth0; break; case BSIM4v30: case BSIM4v40: Vaux = Vgs_eff - model->BSIM4v4type * here->BSIM4v4vth0; break; default: break; } dVaux_dVg = dVgs_eff_dVg; dVaux_dVd = 0.0; dVaux_dVb = 0.0; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = 0.0; dVaux_dVb = 0.0; dVaux_dVg *= dVgs_eff_dVg; } T2 = Vgs_eff * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + Vgs_eff * dVaux_dVg; dT2_dVd = Vgs_eff * dVaux_dVd; dT2_dVb = Vgs_eff * dVaux_dVb; T11 = pParam->BSIM4v4Aechvb; T12 = pParam->BSIM4v4Bechvb; T3 = pParam->BSIM4v4aigc * pParam->BSIM4v4cigc - pParam->BSIM4v4bigc; T4 = pParam->BSIM4v4bigc * pParam->BSIM4v4cigc; T5 = T12 * (pParam->BSIM4v4aigc + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igc = T11 * T2 * T6; dIgc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgc_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); if (model->BSIM4v4pigcdGiven) { Pigcd = pParam->BSIM4v4pigcd; dPigcd_dVg = dPigcd_dVd = dPigcd_dVb = 0.0; } else { T11 = pParam->BSIM4v4Bechvb * model->BSIM4v4toxe; T12 = Vgsteff + 1.0e-20; T13 = T11 / T12 / T12; T14 = -T13 / T12; Pigcd = T13 * (1.0 - 0.5 * Vdseff / T12); dPigcd_dVg = T14 * (2.0 + 0.5 * (dVdseff_dVg * Vgsteff - 3.0 * Vdseff) / T12); dPigcd_dVd = 0.5 * T14 * dVdseff_dVd + dPigcd_dVg * dVgsteff_dVd; dPigcd_dVb = 0.5 * T14 * dVdseff_dVb + dPigcd_dVg * dVgsteff_dVb; dPigcd_dVg *= dVgsteff_dVg; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T7 = -Pigcd * Vds; dT7_dVg = -Vds * dPigcd_dVg; dT7_dVd = -Pigcd - Vds * dPigcd_dVd; dT7_dVb = -Vds * dPigcd_dVb; break; case BSIM4v30: case BSIM4v40: T7 = -Pigcd * Vdseff; /* bugfix */ dT7_dVg = -Vdseff * dPigcd_dVg - Pigcd * dVdseff_dVg; dT7_dVd = -Vdseff * dPigcd_dVd - Pigcd * dVdseff_dVd + dT7_dVg * dVgsteff_dVd; dT7_dVb = -Vdseff * dPigcd_dVb - Pigcd * dVdseff_dVb + dT7_dVg * dVgsteff_dVb; dT7_dVg *= dVgsteff_dVg; dT7_dVb *= dVbseff_dVb; break; default: break; } T8 = T7 * T7 + 2.0e-4; dT8_dVg = 2.0 * T7; dT8_dVd = dT8_dVg * dT7_dVd; dT8_dVb = dT8_dVg * dT7_dVb; dT8_dVg *= dT7_dVg; if (T7 > EXP_THRESHOLD) { T9 = MAX_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else if (T7 < -EXP_THRESHOLD) { T9 = MIN_EXP; dT9_dVg = dT9_dVd = dT9_dVb = 0.0; } else { T9 = exp(T7); dT9_dVg = T9 * dT7_dVg; dT9_dVd = T9 * dT7_dVd; dT9_dVb = T9 * dT7_dVb; } T0 = T8 * T8; T1 = T9 - 1.0 + 1.0e-4; T10 = (T1 - T7) / T8; dT10_dVg = (dT9_dVg - dT7_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT9_dVd - dT7_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT9_dVb - dT7_dVb - T10 * dT8_dVb) / T8; Igcs = Igc * T10; dIgcs_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcs_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcs_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; T1 = T9 - 1.0 - 1.0e-4; T10 = (T7 * T9 - T1) / T8; dT10_dVg = (dT7_dVg * T9 + (T7 - 1.0) * dT9_dVg - T10 * dT8_dVg) / T8; dT10_dVd = (dT7_dVd * T9 + (T7 - 1.0) * dT9_dVd - T10 * dT8_dVd) / T8; dT10_dVb = (dT7_dVb * T9 + (T7 - 1.0) * dT9_dVb - T10 * dT8_dVb) / T8; Igcd = Igc * T10; dIgcd_dVg = dIgc_dVg * T10 + Igc * dT10_dVg; dIgcd_dVd = dIgc_dVd * T10 + Igc * dT10_dVd; dIgcd_dVb = dIgc_dVb * T10 + Igc * dT10_dVb; here->BSIM4v4Igcs = Igcs; here->BSIM4v4gIgcsg = dIgcs_dVg; here->BSIM4v4gIgcsd = dIgcs_dVd; here->BSIM4v4gIgcsb = dIgcs_dVb * dVbseff_dVb; here->BSIM4v4Igcd = Igcd; here->BSIM4v4gIgcdg = dIgcd_dVg; here->BSIM4v4gIgcdd = dIgcd_dVd; here->BSIM4v4gIgcdb = dIgcd_dVb * dVbseff_dVb; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: T0 = vgs - pParam->BSIM4v4vfbsd; break; case BSIM4v40: T0 = vgs - (pParam->BSIM4v4vfbsd + pParam->BSIM4v4vfbsdoff); break; default: break; } vgs_eff = sqrt(T0 * T0 + 1.0e-4); dvgs_eff_dvg = T0 / vgs_eff; T2 = vgs * vgs_eff; dT2_dVg = vgs * dvgs_eff_dvg + vgs_eff; T11 = pParam->BSIM4v4AechvbEdge; T12 = pParam->BSIM4v4BechvbEdge; T3 = pParam->BSIM4v4aigsd * pParam->BSIM4v4cigsd - pParam->BSIM4v4bigsd; T4 = pParam->BSIM4v4bigsd * pParam->BSIM4v4cigsd; T5 = T12 * (pParam->BSIM4v4aigsd + T3 * vgs_eff - T4 * vgs_eff * vgs_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgs_eff) * dvgs_eff_dvg; } Igs = T11 * T2 * T6; dIgs_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgs_dVs = -dIgs_dVg; T0 = vgd - pParam->BSIM4v4vfbsd; vgd_eff = sqrt(T0 * T0 + 1.0e-4); dvgd_eff_dvg = T0 / vgd_eff; T2 = vgd * vgd_eff; dT2_dVg = vgd * dvgd_eff_dvg + vgd_eff; T5 = T12 * (pParam->BSIM4v4aigsd + T3 * vgd_eff - T4 * vgd_eff * vgd_eff); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * vgd_eff) * dvgd_eff_dvg; } Igd = T11 * T2 * T6; dIgd_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgd_dVd = -dIgd_dVg; here->BSIM4v4Igs = Igs; here->BSIM4v4gIgsg = dIgs_dVg; here->BSIM4v4gIgss = dIgs_dVs; here->BSIM4v4Igd = Igd; here->BSIM4v4gIgdg = dIgd_dVg; here->BSIM4v4gIgdd = dIgd_dVd; } else { here->BSIM4v4Igcs = here->BSIM4v4gIgcsg = here->BSIM4v4gIgcsd = here->BSIM4v4gIgcsb = 0.0; here->BSIM4v4Igcd = here->BSIM4v4gIgcdg = here->BSIM4v4gIgcdd = here->BSIM4v4gIgcdb = 0.0; here->BSIM4v4Igs = here->BSIM4v4gIgsg = here->BSIM4v4gIgss = 0.0; here->BSIM4v4Igd = here->BSIM4v4gIgdg = here->BSIM4v4gIgdd = 0.0; } if (model->BSIM4v4igbMod) { T0 = Vtm * pParam->BSIM4v4nigbacc; T1 = -Vgs_eff + Vbseff + Vfb; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = -dVgs_eff_dVg; dVaux_dVb = 1.0; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVb = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVg = -dVaux_dVb * dVgs_eff_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 = 4.97232e-7 * pParam->BSIM4v4weff * pParam->BSIM4v4leff * pParam->BSIM4v4ToxRatio; T12 = -7.45669e11 * model->BSIM4v4toxe; T3 = pParam->BSIM4v4aigbacc * pParam->BSIM4v4cigbacc - pParam->BSIM4v4bigbacc; T4 = pParam->BSIM4v4bigbacc * pParam->BSIM4v4cigbacc; T5 = T12 * (pParam->BSIM4v4aigbacc + T3 * Voxacc - T4 * Voxacc * Voxacc); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxacc); dT6_dVb = dT6_dVg * dVoxacc_dVb; dT6_dVg *= dVoxacc_dVg; } Igbacc = T11 * T2 * T6; dIgbacc_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbacc_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); T0 = Vtm * pParam->BSIM4v4nigbinv; T1 = Voxdepinv - pParam->BSIM4v4eigbinv; VxNVt = T1 / T0; if (VxNVt > EXP_THRESHOLD) { Vaux = T1; dVaux_dVg = dVoxdepinv_dVg; dVaux_dVd = dVoxdepinv_dVd; dVaux_dVb = dVoxdepinv_dVb; } else if (VxNVt < -EXP_THRESHOLD) { Vaux = T0 * log(1.0 + MIN_EXP); dVaux_dVg = dVaux_dVd = dVaux_dVb = 0.0; } else { ExpVxNVt = exp(VxNVt); Vaux = T0 * log(1.0 + ExpVxNVt); dVaux_dVg = ExpVxNVt / (1.0 + ExpVxNVt); dVaux_dVd = dVaux_dVg * dVoxdepinv_dVd; dVaux_dVb = dVaux_dVg * dVoxdepinv_dVb; dVaux_dVg *= dVoxdepinv_dVg; } T2 = (Vgs_eff - Vbseff) * Vaux; dT2_dVg = dVgs_eff_dVg * Vaux + (Vgs_eff - Vbseff) * dVaux_dVg; dT2_dVd = (Vgs_eff - Vbseff) * dVaux_dVd; dT2_dVb = -Vaux + (Vgs_eff - Vbseff) * dVaux_dVb; T11 *= 0.75610; T12 *= 1.31724; T3 = pParam->BSIM4v4aigbinv * pParam->BSIM4v4cigbinv - pParam->BSIM4v4bigbinv; T4 = pParam->BSIM4v4bigbinv * pParam->BSIM4v4cigbinv; T5 = T12 * (pParam->BSIM4v4aigbinv + T3 * Voxdepinv - T4 * Voxdepinv * Voxdepinv); if (T5 > EXP_THRESHOLD) { T6 = MAX_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else if (T5 < -EXP_THRESHOLD) { T6 = MIN_EXP; dT6_dVg = dT6_dVd = dT6_dVb = 0.0; } else { T6 = exp(T5); dT6_dVg = T6 * T12 * (T3 - 2.0 * T4 * Voxdepinv); dT6_dVd = dT6_dVg * dVoxdepinv_dVd; dT6_dVb = dT6_dVg * dVoxdepinv_dVb; dT6_dVg *= dVoxdepinv_dVg; } Igbinv = T11 * T2 * T6; dIgbinv_dVg = T11 * (T2 * dT6_dVg + T6 * dT2_dVg); dIgbinv_dVd = T11 * (T2 * dT6_dVd + T6 * dT2_dVd); dIgbinv_dVb = T11 * (T2 * dT6_dVb + T6 * dT2_dVb); here->BSIM4v4Igb = Igbinv + Igbacc; here->BSIM4v4gIgbg = dIgbinv_dVg + dIgbacc_dVg; here->BSIM4v4gIgbd = dIgbinv_dVd; here->BSIM4v4gIgbb = (dIgbinv_dVb + dIgbacc_dVb) * dVbseff_dVb; } else { here->BSIM4v4Igb = here->BSIM4v4gIgbg = here->BSIM4v4gIgbd = here->BSIM4v4gIgbs = here->BSIM4v4gIgbb = 0.0; } /* End of Gate current */ if (here->BSIM4v4nf != 1.0) { cdrain *= here->BSIM4v4nf; here->BSIM4v4gds *= here->BSIM4v4nf; here->BSIM4v4gm *= here->BSIM4v4nf; here->BSIM4v4gmbs *= here->BSIM4v4nf; here->BSIM4v4IdovVds *= here->BSIM4v4nf; here->BSIM4v4gbbs *= here->BSIM4v4nf; here->BSIM4v4gbgs *= here->BSIM4v4nf; here->BSIM4v4gbds *= here->BSIM4v4nf; here->BSIM4v4csub *= here->BSIM4v4nf; here->BSIM4v4Igidl *= here->BSIM4v4nf; here->BSIM4v4ggidld *= here->BSIM4v4nf; here->BSIM4v4ggidlg *= here->BSIM4v4nf; here->BSIM4v4ggidlb *= here->BSIM4v4nf; here->BSIM4v4Igisl *= here->BSIM4v4nf; here->BSIM4v4ggisls *= here->BSIM4v4nf; here->BSIM4v4ggislg *= here->BSIM4v4nf; here->BSIM4v4ggislb *= here->BSIM4v4nf; here->BSIM4v4Igcs *= here->BSIM4v4nf; here->BSIM4v4gIgcsg *= here->BSIM4v4nf; here->BSIM4v4gIgcsd *= here->BSIM4v4nf; here->BSIM4v4gIgcsb *= here->BSIM4v4nf; here->BSIM4v4Igcd *= here->BSIM4v4nf; here->BSIM4v4gIgcdg *= here->BSIM4v4nf; here->BSIM4v4gIgcdd *= here->BSIM4v4nf; here->BSIM4v4gIgcdb *= here->BSIM4v4nf; here->BSIM4v4Igs *= here->BSIM4v4nf; here->BSIM4v4gIgsg *= here->BSIM4v4nf; here->BSIM4v4gIgss *= here->BSIM4v4nf; here->BSIM4v4Igd *= here->BSIM4v4nf; here->BSIM4v4gIgdg *= here->BSIM4v4nf; here->BSIM4v4gIgdd *= here->BSIM4v4nf; here->BSIM4v4Igb *= here->BSIM4v4nf; here->BSIM4v4gIgbg *= here->BSIM4v4nf; here->BSIM4v4gIgbd *= here->BSIM4v4nf; here->BSIM4v4gIgbb *= here->BSIM4v4nf; } here->BSIM4v4ggidls = -(here->BSIM4v4ggidld + here->BSIM4v4ggidlg + here->BSIM4v4ggidlb); here->BSIM4v4ggisld = -(here->BSIM4v4ggisls + here->BSIM4v4ggislg + here->BSIM4v4ggislb); here->BSIM4v4gIgbs = -(here->BSIM4v4gIgbg + here->BSIM4v4gIgbd + here->BSIM4v4gIgbb); here->BSIM4v4gIgcss = -(here->BSIM4v4gIgcsg + here->BSIM4v4gIgcsd + here->BSIM4v4gIgcsb); here->BSIM4v4gIgcds = -(here->BSIM4v4gIgcdg + here->BSIM4v4gIgcdd + here->BSIM4v4gIgcdb); here->BSIM4v4cd = cdrain; if (model->BSIM4v4tnoiMod == 0) { Abulk = Abulk0 * pParam->BSIM4v4abulkCVfactor; Vdsat = Vgsteff / Abulk; T0 = Vdsat - Vds - DELTA_4; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * Vdsat); if (T0 >= 0.0) Vdseff = Vdsat - 0.5 * (T0 + T1); else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = Vdsat * T3 / (T1 - T0); Vdseff = Vdsat * T4; } if (Vds == 0.0) Vdseff = 0.0; T0 = Abulk * Vdseff; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = Vdseff / T1; T3 = T0 * T2; here->BSIM4v4qinv = Coxeff * pParam->BSIM4v4weffCV * here->BSIM4v4nf * pParam->BSIM4v4leffCV * (Vgsteff - 0.5 * T0 + Abulk * T3); } /* * BSIM4v4 C-V begins */ if ((model->BSIM4v4xpart < 0) || (!ChargeComputationNeeded)) { qgate = qdrn = qsrc = qbulk = 0.0; here->BSIM4v4cggb = here->BSIM4v4cgsb = here->BSIM4v4cgdb = 0.0; here->BSIM4v4cdgb = here->BSIM4v4cdsb = here->BSIM4v4cddb = 0.0; here->BSIM4v4cbgb = here->BSIM4v4cbsb = here->BSIM4v4cbdb = 0.0; here->BSIM4v4csgb = here->BSIM4v4cssb = here->BSIM4v4csdb = 0.0; here->BSIM4v4cgbb = here->BSIM4v4csbb = here->BSIM4v4cdbb = here->BSIM4v4cbbb = 0.0; here->BSIM4v4cqdb = here->BSIM4v4cqsb = here->BSIM4v4cqgb = here->BSIM4v4cqbb = 0.0; here->BSIM4v4gtau = 0.0; goto finished; } else if (model->BSIM4v4capMod == 0) { if (Vbseff < 0.0) { Vbseff = Vbs; dVbseff_dVb = 1.0; } else { Vbseff = pParam->BSIM4v4phi - Phis; dVbseff_dVb = -dPhis_dVb; } Vfb = pParam->BSIM4v4vfbcv; Vth = Vfb + pParam->BSIM4v4phi + pParam->BSIM4v4k1ox * sqrtPhis; Vgst = Vgs_eff - Vth; dVth_dVb = pParam->BSIM4v4k1ox * dsqrtPhis_dVb; dVgst_dVb = -dVth_dVb; dVgst_dVg = dVgs_eff_dVg; CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * pParam->BSIM4v4leffCV * here->BSIM4v4nf; Arg1 = Vgs_eff - Vbseff - Vfb; if (Arg1 <= 0.0) { qgate = CoxWL * Arg1; qbulk = -qgate; qdrn = 0.0; here->BSIM4v4cggb = CoxWL * dVgs_eff_dVg; here->BSIM4v4cgdb = 0.0; here->BSIM4v4cgsb = CoxWL * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM4v4cdgb = 0.0; here->BSIM4v4cddb = 0.0; here->BSIM4v4cdsb = 0.0; here->BSIM4v4cbgb = -CoxWL * dVgs_eff_dVg; here->BSIM4v4cbdb = 0.0; here->BSIM4v4cbsb = -here->BSIM4v4cgsb; } /* Arg1 <= 0.0, end of accumulation */ else if (Vgst <= 0.0) { T1 = 0.5 * pParam->BSIM4v4k1ox; T2 = sqrt(T1 * T1 + Arg1); qgate = CoxWL * pParam->BSIM4v4k1ox * (T2 - T1); qbulk = -qgate; qdrn = 0.0; T0 = CoxWL * T1 / T2; here->BSIM4v4cggb = T0 * dVgs_eff_dVg; here->BSIM4v4cgdb = 0.0; here->BSIM4v4cgsb = T0 * (dVbseff_dVb - dVgs_eff_dVg); here->BSIM4v4cdgb = 0.0; here->BSIM4v4cddb = 0.0; here->BSIM4v4cdsb = 0.0; here->BSIM4v4cbgb = -here->BSIM4v4cggb; here->BSIM4v4cbdb = 0.0; here->BSIM4v4cbsb = -here->BSIM4v4cgsb; } /* Vgst <= 0.0, end of depletion */ else { One_Third_CoxWL = CoxWL / 3.0; Two_Third_CoxWL = 2.0 * One_Third_CoxWL; AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; Vdsat = Vgst / AbulkCV; dVdsat_dVg = dVgs_eff_dVg / AbulkCV; dVdsat_dVb = - (Vdsat * dAbulkCV_dVb + dVth_dVb)/ AbulkCV; if (model->BSIM4v4xpart > 0.5) { /* 0/100 Charge partition model */ if (Vdsat <= Vds) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.0; here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); here->BSIM4v4cgdb = 0.0; here->BSIM4v4cdgb = 0.0; here->BSIM4v4cddb = 0.0; here->BSIM4v4cdsb = 0.0; here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); here->BSIM4v4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; T7 = 2.0 * Vds - T1 - 3.0 * T3; T8 = T3 - T1 - 2.0 * Vds; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T10 = T4 * T8; qdrn = T4 * T7; qbulk = -(qgate + qdrn + T10); T5 = T3 / T1; here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T11 + here->BSIM4v4cgdb); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T9 * T7; T8 = T9 * T8; T9 = 2.0 * T4 * (1.0 - 3.0 * T5); here->BSIM4v4cdgb = (T7 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T12 = T7 * dAlphaz_dVb - T9 * dVdsat_dVb; here->BSIM4v4cddb = T4 * (3.0 - 6.0 * T2 - 3.0 * T5); here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + T12 + here->BSIM4v4cddb); T9 = 2.0 * T4 * (1.0 + T5); T10 = (T8 * dAlphaz_dVg - T9 * dVdsat_dVg) * dVgs_eff_dVg; T11 = T8 * dAlphaz_dVb - T9 * dVdsat_dVb; T12 = T4 * (2.0 * T2 + T5 - 1.0); T0 = -(T10 + T11 + T12); here->BSIM4v4cbgb = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + T10); here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + T12); here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + T0); } } else if (model->BSIM4v4xpart < 0.5) { /* 40/60 Charge partition model */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.4 * T2; here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); here->BSIM4v4cgdb = 0.0; T3 = 0.4 * Two_Third_CoxWL; here->BSIM4v4cdgb = -T3 * dVgs_eff_dVg; here->BSIM4v4cddb = 0.0; T4 = T3 * dVth_dVb; here->BSIM4v4cdsb = -(T4 + here->BSIM4v4cdgb); here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); here->BSIM4v4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v4cgsb = -(here->BSIM4v4cggb + here->BSIM4v4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T6 = 8.0 * Vdsat * Vdsat - 6.0 * Vdsat * Vds + 1.2 * Vds * Vds; T8 = T2 / T1; T7 = Vds - T1 - T8 * T6; qdrn = T4 * T7; T7 *= T9; tmp = T8 / T1; tmp1 = T4 * (2.0 - 4.0 * tmp * T6 + T8 * (16.0 * Vdsat - 6.0 * Vds)); here->BSIM4v4cdgb = (T7 * dAlphaz_dVg - tmp1 * dVdsat_dVg) * dVgs_eff_dVg; T10 = T7 * dAlphaz_dVb - tmp1 * dVdsat_dVb; here->BSIM4v4cddb = T4 * (2.0 - (1.0 / (3.0 * T1 * T1) + 2.0 * tmp) * T6 + T8 * (6.0 * Vdsat - 2.4 * Vds)); here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + T10 + here->BSIM4v4cddb); T7 = 2.0 * (T1 + T3); qbulk = -(qgate - T4 * T7); T7 *= T9; T0 = 4.0 * T4 * (1.0 - T5); T12 = (-T7 * dAlphaz_dVg - here->BSIM4v4cdgb - T0 * dVdsat_dVg) * dVgs_eff_dVg; T11 = -T7 * dAlphaz_dVb - T10 - T0 * dVdsat_dVb; T10 = -4.0 * T4 * (T2 - 0.5 + 0.5 * T5) - here->BSIM4v4cddb; tmp = -(T10 + T11 + T12); here->BSIM4v4cbgb = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + T12); here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + T10); here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + tmp); } } else { /* 50/50 partitioning */ if (Vds >= Vdsat) { /* saturation region */ T1 = Vdsat / 3.0; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - T1); T2 = -Two_Third_CoxWL * Vgst; qbulk = -(qgate + T2); qdrn = 0.5 * T2; here->BSIM4v4cggb = One_Third_CoxWL * (3.0 - dVdsat_dVg) * dVgs_eff_dVg; T2 = -One_Third_CoxWL * dVdsat_dVb; here->BSIM4v4cgsb = -(here->BSIM4v4cggb + T2); here->BSIM4v4cgdb = 0.0; here->BSIM4v4cdgb = -One_Third_CoxWL * dVgs_eff_dVg; here->BSIM4v4cddb = 0.0; T4 = One_Third_CoxWL * dVth_dVb; here->BSIM4v4cdsb = -(T4 + here->BSIM4v4cdgb); here->BSIM4v4cbgb = -(here->BSIM4v4cggb - Two_Third_CoxWL * dVgs_eff_dVg); T3 = -(T2 + Two_Third_CoxWL * dVth_dVb); here->BSIM4v4cbsb = -(here->BSIM4v4cbgb + T3); here->BSIM4v4cbdb = 0.0; } else { /* linear region */ Alphaz = Vgst / Vdsat; T1 = 2.0 * Vdsat - Vds; T2 = Vds / (3.0 * T1); T3 = T2 * Vds; T9 = 0.25 * CoxWL; T4 = T9 * Alphaz; qgate = CoxWL * (Vgs_eff - Vfb - pParam->BSIM4v4phi - 0.5 * (Vds - T3)); T5 = T3 / T1; here->BSIM4v4cggb = CoxWL * (1.0 - T5 * dVdsat_dVg) * dVgs_eff_dVg; tmp = -CoxWL * T5 * dVdsat_dVb; here->BSIM4v4cgdb = CoxWL * (T2 - 0.5 + 0.5 * T5); here->BSIM4v4cgsb = -(here->BSIM4v4cggb + here->BSIM4v4cgdb + tmp); T6 = 1.0 / Vdsat; dAlphaz_dVg = T6 * (1.0 - Alphaz * dVdsat_dVg); dAlphaz_dVb = -T6 * (dVth_dVb + Alphaz * dVdsat_dVb); T7 = T1 + T3; qdrn = -T4 * T7; qbulk = - (qgate + qdrn + qdrn); T7 *= T9; T0 = T4 * (2.0 * T5 - 2.0); here->BSIM4v4cdgb = (T0 * dVdsat_dVg - T7 * dAlphaz_dVg) * dVgs_eff_dVg; T12 = T0 * dVdsat_dVb - T7 * dAlphaz_dVb; here->BSIM4v4cddb = T4 * (1.0 - 2.0 * T2 - T5); here->BSIM4v4cdsb = -(here->BSIM4v4cdgb + T12 + here->BSIM4v4cddb); here->BSIM4v4cbgb = -(here->BSIM4v4cggb + 2.0 * here->BSIM4v4cdgb); here->BSIM4v4cbdb = -(here->BSIM4v4cgdb + 2.0 * here->BSIM4v4cddb); here->BSIM4v4cbsb = -(here->BSIM4v4cgsb + 2.0 * here->BSIM4v4cdsb); } /* end of linear region */ } /* end of 50/50 partition */ } /* end of inversion */ } /* end of capMod=0 */ else { if (Vbseff < 0.0) { VbseffCV = Vbseff; dVbseffCV_dVb = 1.0; } else { VbseffCV = pParam->BSIM4v4phi - Phis; dVbseffCV_dVb = -dPhis_dVb; } CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * pParam->BSIM4v4leffCV * here->BSIM4v4nf; /* Seperate VgsteffCV with noff and voffcv */ noff = n * pParam->BSIM4v4noff; dnoff_dVd = pParam->BSIM4v4noff * dn_dVd; dnoff_dVb = pParam->BSIM4v4noff * dn_dVb; T0 = Vtm * noff; voffcv = pParam->BSIM4v4voffcv; VgstNVt = (Vgst - voffcv) / T0; if (VgstNVt > EXP_THRESHOLD) { Vgsteff = Vgst - voffcv; dVgsteff_dVg = dVgs_eff_dVg; dVgsteff_dVd = -dVth_dVd; dVgsteff_dVb = -dVth_dVb; } else if (VgstNVt < -EXP_THRESHOLD) { Vgsteff = T0 * log(1.0 + MIN_EXP); dVgsteff_dVg = 0.0; dVgsteff_dVd = Vgsteff / noff; dVgsteff_dVb = dVgsteff_dVd * dnoff_dVb; dVgsteff_dVd *= dnoff_dVd; } else { ExpVgst = exp(VgstNVt); Vgsteff = T0 * log(1.0 + ExpVgst); dVgsteff_dVg = ExpVgst / (1.0 + ExpVgst); dVgsteff_dVd = -dVgsteff_dVg * (dVth_dVd + (Vgst - voffcv) / noff * dnoff_dVd) + Vgsteff / noff * dnoff_dVd; dVgsteff_dVb = -dVgsteff_dVg * (dVth_dVb + (Vgst - voffcv) / noff * dnoff_dVb) + Vgsteff / noff * dnoff_dVb; dVgsteff_dVg *= dVgs_eff_dVg; } /* End of VgsteffCV */ if (model->BSIM4v4capMod == 1) { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Vfb = pParam->BSIM4v4vfbzb; break; case BSIM4v30: case BSIM4v40: Vfb = here->BSIM4v4vfbzb; break; default: break; } V3 = Vfb - Vgs_eff + VbseffCV - DELTA_3; if (Vfb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * Vfb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * Vfb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = Vfb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Qac0 = CoxWL * (Vfbeff - Vfb); dQac0_dVg = CoxWL * dVfbeff_dVg; dQac0_dVb = CoxWL * dVfbeff_dVb; T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v4k1ox; T2 = CoxWL; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWL * T0 / T1; } Qsub0 = CoxWL * pParam->BSIM4v4k1ox * (T1 - T0); dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg); dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb); AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; VdsatCV = Vgsteff / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = 1.0 / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (1.0 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); break; case BSIM4v30: T0 = AbulkCV * VdseffCV; /* bugfix */ T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = T0 / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2); T7 = T2 * (2.0 + 6.0 * T2) - 0.5; T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; qgate = CoxWL * (Vgsteff - 0.5 * T0 + T3); break; case BSIM4v40: T0 = AbulkCV * VdseffCV; T1 = 12.0 * (Vgsteff - 0.5 * T0 + 1.0e-20); T2 = VdseffCV / T1; T3 = T0 * T2; T4 = (1.0 - 12.0 * T2 * T2 * AbulkCV); T5 = (6.0 * T0 * (4.0 * Vgsteff - T0) / (T1 * T1) - 0.5); T6 = 12.0 * T2 * T2 * Vgsteff; qgate = CoxWL * (Vgsteff - 0.5 * VdseffCV + T3); break; default: break; } Cgg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cgd1 = CoxWL * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd; Cgb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb; Cgg1 *= dVgsteff_dVg; T7 = 1.0 - AbulkCV; qbulk = CoxWL * T7 * (0.5 * VdseffCV - T3); T4 = -T7 * (T4 - 1.0); T5 = -T7 * T5; T6 = -(T7 * T6 + (0.5 * VdseffCV - T3)); Cbg1 = CoxWL * (T4 + T5 * dVdseffCV_dVg); Cbd1 = CoxWL * T5 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd; Cbb1 = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb; Cbg1 *= dVgsteff_dVg; if (model->BSIM4v4xpart > 0.5) { /* 0/100 Charge petition model */ T1 = T1 + T1; qsrc = -CoxWL * (0.5 * Vgsteff + 0.25 * T0 - T0 * T0 / T1); T7 = (4.0 * Vgsteff - T0) / (T1 * T1); T4 = -(0.5 + 24.0 * T0 * T0 / (T1 * T1)); T5 = -(0.25 * AbulkCV - 12.0 * AbulkCV * T0 * T7); T6 = -(0.25 * VdseffCV - 12.0 * T0 * VdseffCV * T7); Csg = CoxWL * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWL * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = CoxWL * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else if (model->BSIM4v4xpart < 0.5) { /* 40/60 Charge petition model */ T1 = T1 / 12.0; T2 = 0.5 * CoxWL / (T1 * T1); T3 = Vgsteff * (2.0 * T0 * T0 / 3.0 + Vgsteff * (Vgsteff - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T2 * T3; T7 = 4.0 / 3.0 * Vgsteff * (Vgsteff - T0) + 0.4 * T0 * T0; T4 = -2.0 * qsrc / T1 - T2 * (Vgsteff * (3.0 * Vgsteff - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T5 = (qsrc / T1 + T2 * T7) * AbulkCV; T6 = (qsrc / T1 * VdseffCV + T2 * T7 * VdseffCV); Csg = (T4 + T5 * dVdseffCV_dVg); Csd = T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd; Csb = (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb; Csg *= dVgsteff_dVg; } else { /* 50/50 Charge petition model */ qsrc = -0.5 * (qgate + qbulk); Csg = -0.5 * (Cgg1 + Cbg1); Csb = -0.5 * (Cgb1 + Cbb1); Csd = -0.5 * (Cgd1 + Cbd1); } qgate += Qac0 + Qsub0; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cgg = dQac0_dVg + dQsub0_dVg + Cgg1; Cgd = dQsub0_dVd + Cgd1; Cgb = dQac0_dVb + dQsub0_dVb + Cgb1; Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v4cggb = Cgg; here->BSIM4v4cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v4cgdb = Cgd; here->BSIM4v4cdgb = -(Cgg + Cbg + Csg); here->BSIM4v4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v4cddb = -(Cgd + Cbd + Csd); here->BSIM4v4cbgb = Cbg; here->BSIM4v4cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v4cbdb = Cbd; } /* Charge-Thickness capMod (CTM) begins */ else if (model->BSIM4v4capMod == 2) { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: V3 = pParam->BSIM4v4vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (pParam->BSIM4v4vfbzb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * pParam->BSIM4v4vfbzb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * pParam->BSIM4v4vfbzb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = pParam->BSIM4v4vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM4v4coxp; Tox = 1.0e8 * model->BSIM4v4toxp; T0 = (Vgs_eff - VbseffCV - pParam->BSIM4v4vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; break; case BSIM4v30: case BSIM4v40: V3 = here->BSIM4v4vfbzb - Vgs_eff + VbseffCV - DELTA_3; if (here->BSIM4v4vfbzb <= 0.0) T0 = sqrt(V3 * V3 - 4.0 * DELTA_3 * here->BSIM4v4vfbzb); else T0 = sqrt(V3 * V3 + 4.0 * DELTA_3 * here->BSIM4v4vfbzb); T1 = 0.5 * (1.0 + V3 / T0); Vfbeff = here->BSIM4v4vfbzb - 0.5 * (V3 + T0); dVfbeff_dVg = T1 * dVgs_eff_dVg; dVfbeff_dVb = -T1 * dVbseffCV_dVb; Cox = model->BSIM4v4coxp; Tox = 1.0e8 * model->BSIM4v4toxp; T0 = (Vgs_eff - VbseffCV - here->BSIM4v4vfbzb) / Tox; dT0_dVg = dVgs_eff_dVg / Tox; dT0_dVb = -dVbseffCV_dVb / Tox; break; default: break; } tmp = T0 * pParam->BSIM4v4acde; if ((-EXP_THRESHOLD < tmp) && (tmp < EXP_THRESHOLD)) { Tcen = pParam->BSIM4v4ldeb * exp(tmp); dTcen_dVg = pParam->BSIM4v4acde * Tcen; dTcen_dVb = dTcen_dVg * dT0_dVb; dTcen_dVg *= dT0_dVg; } else if (tmp <= -EXP_THRESHOLD) { Tcen = pParam->BSIM4v4ldeb * MIN_EXP; dTcen_dVg = dTcen_dVb = 0.0; } else { Tcen = pParam->BSIM4v4ldeb * MAX_EXP; dTcen_dVg = dTcen_dVb = 0.0; } LINK = 1.0e-3 * model->BSIM4v4toxp; V3 = pParam->BSIM4v4ldeb - Tcen - LINK; V4 = sqrt(V3 * V3 + 4.0 * LINK * pParam->BSIM4v4ldeb); Tcen = pParam->BSIM4v4ldeb - 0.5 * (V3 + V4); T1 = 0.5 * (1.0 + V3 / V4); dTcen_dVg *= T1; dTcen_dVb *= T1; Ccen = EPSSI / Tcen; T2 = Cox / (Cox + Ccen); Coxeff = T2 * Ccen; T3 = -Ccen / Tcen; dCoxeff_dVg = T2 * T2 * T3; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v4coxe; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Qac0 = CoxWLcen * (Vfbeff - pParam->BSIM4v4vfbzb); break; case BSIM4v30: case BSIM4v40: Qac0 = CoxWLcen * (Vfbeff - here->BSIM4v4vfbzb); break; default: break; } QovCox = Qac0 / Coxeff; dQac0_dVg = CoxWLcen * dVfbeff_dVg + QovCox * dCoxeff_dVg; dQac0_dVb = CoxWLcen * dVfbeff_dVb + QovCox * dCoxeff_dVb; T0 = 0.5 * pParam->BSIM4v4k1ox; T3 = Vgs_eff - Vfbeff - VbseffCV - Vgsteff; if (pParam->BSIM4v4k1ox == 0.0) { T1 = 0.0; T2 = 0.0; } else if (T3 < 0.0) { T1 = T0 + T3 / pParam->BSIM4v4k1ox; T2 = CoxWLcen; } else { T1 = sqrt(T0 * T0 + T3); T2 = CoxWLcen * T0 / T1; } Qsub0 = CoxWLcen * pParam->BSIM4v4k1ox * (T1 - T0); QovCox = Qsub0 / Coxeff; dQsub0_dVg = T2 * (dVgs_eff_dVg - dVfbeff_dVg - dVgsteff_dVg) + QovCox * dCoxeff_dVg; dQsub0_dVd = -T2 * dVgsteff_dVd; dQsub0_dVb = -T2 * (dVfbeff_dVb + dVbseffCV_dVb + dVgsteff_dVb) + QovCox * dCoxeff_dVb; /* Gate-bias dependent delta Phis begins */ if (pParam->BSIM4v4k1ox <= 0.0) { Denomi = 0.25 * pParam->BSIM4v4moin * Vtm; T0 = 0.5 * pParam->BSIM4v4sqrtPhi; } else { Denomi = pParam->BSIM4v4moin * Vtm * pParam->BSIM4v4k1ox * pParam->BSIM4v4k1ox; T0 = pParam->BSIM4v4k1ox * pParam->BSIM4v4sqrtPhi; } T1 = 2.0 * T0 + Vgsteff; DeltaPhi = Vtm * log(1.0 + T1 * Vgsteff / Denomi); dDeltaPhi_dVg = 2.0 * Vtm * (T1 -T0) / (Denomi + T1 * Vgsteff); /* End of delta Phis */ Tox += Tox; /* WDLiu: Tcen reevaluated below due to different Vgsteff */ switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: T0 = (Vgsteff + pParam->BSIM4v4vtfbphi2) / Tox; break; case BSIM4v30: case BSIM4v40: T0 = (Vgsteff + here->BSIM4v4vtfbphi2) / Tox; break; default: break; } tmp = exp(0.7 * log(T0)); T1 = 1.0 + tmp; T2 = 0.7 * tmp / (T0 * Tox); Tcen = 1.9e-9 / T1; dTcen_dVg = -Tcen * T2 / T1; dTcen_dVd = dTcen_dVg * dVgsteff_dVd; dTcen_dVb = dTcen_dVg * dVgsteff_dVb; dTcen_dVg *= dVgsteff_dVg; Ccen = EPSSI / Tcen; T0 = Cox / (Cox + Ccen); Coxeff = T0 * Ccen; T1 = -Ccen / Tcen; dCoxeff_dVg = T0 * T0 * T1; dCoxeff_dVd = dCoxeff_dVg * dTcen_dVd; dCoxeff_dVb = dCoxeff_dVg * dTcen_dVb; dCoxeff_dVg *= dTcen_dVg; CoxWLcen = CoxWL * Coxeff / model->BSIM4v4coxe; AbulkCV = Abulk0 * pParam->BSIM4v4abulkCVfactor; dAbulkCV_dVb = pParam->BSIM4v4abulkCVfactor * dAbulk0_dVb; VdsatCV = (Vgsteff - DeltaPhi) / AbulkCV; T0 = VdsatCV - Vds - DELTA_4; dT0_dVg = (1.0 - dDeltaPhi_dVg) / AbulkCV; dT0_dVb = -VdsatCV * dAbulkCV_dVb / AbulkCV; T1 = sqrt(T0 * T0 + 4.0 * DELTA_4 * VdsatCV); dT1_dVg = (T0 + DELTA_4 + DELTA_4) / T1; dT1_dVd = -T0 / T1; dT1_dVb = dT1_dVg * dT0_dVb; dT1_dVg *= dT0_dVg; if (T0 >= 0.0) { VdseffCV = VdsatCV - 0.5 * (T0 + T1); dVdseffCV_dVg = 0.5 * (dT0_dVg - dT1_dVg); dVdseffCV_dVd = 0.5 * (1.0 - dT1_dVd); dVdseffCV_dVb = 0.5 * (dT0_dVb - dT1_dVb); } else { T3 = (DELTA_4 + DELTA_4) / (T1 - T0); T4 = 1.0 - T3; T5 = VdsatCV * T3 / (T1 - T0); VdseffCV = VdsatCV * T4; dVdseffCV_dVg = dT0_dVg * T4 + T5 * (dT1_dVg - dT0_dVg); dVdseffCV_dVd = T5 * (dT1_dVd + 1.0); dVdseffCV_dVb = dT0_dVb * (1.0 - T5) + T5 * dT1_dVb; } if (Vds == 0.0) { VdseffCV = 0.0; dVdseffCV_dVg = 0.0; dVdseffCV_dVb = 0.0; } T0 = AbulkCV * VdseffCV; T1 = Vgsteff - DeltaPhi; T2 = 12.0 * (T1 - 0.5 * T0 + 1.0e-20); T3 = T0 / T2; T4 = 1.0 - 12.0 * T3 * T3; T5 = AbulkCV * (6.0 * T0 * (4.0 * T1 - T0) / (T2 * T2) - 0.5); T6 = T5 * VdseffCV / AbulkCV; qgate = CoxWLcen * (T1 - T0 * (0.5 - T3)); QovCox = qgate / Coxeff; Cgg1 = CoxWLcen * (T4 * (1.0 - dDeltaPhi_dVg) + T5 * dVdseffCV_dVg); Cgd1 = CoxWLcen * T5 * dVdseffCV_dVd + Cgg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cgb1 = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Cgg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cgg1 = Cgg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; T7 = 1.0 - AbulkCV; T8 = T2 * T2; T9 = 12.0 * T7 * T0 * T0 / (T8 * AbulkCV); T10 = T9 * (1.0 - dDeltaPhi_dVg); T11 = -T7 * T5 / AbulkCV; T12 = -(T9 * T1 / AbulkCV + VdseffCV * (0.5 - T0 / T2)); qbulk = CoxWLcen * T7 * (0.5 * VdseffCV - T0 * VdseffCV / T2); QovCox = qbulk / Coxeff; Cbg1 = CoxWLcen * (T10 + T11 * dVdseffCV_dVg); Cbd1 = CoxWLcen * T11 * dVdseffCV_dVd + Cbg1 * dVgsteff_dVd + QovCox * dCoxeff_dVd; Cbb1 = CoxWLcen * (T11 * dVdseffCV_dVb + T12 * dAbulkCV_dVb) + Cbg1 * dVgsteff_dVb + QovCox * dCoxeff_dVb; Cbg1 = Cbg1 * dVgsteff_dVg + QovCox * dCoxeff_dVg; if (model->BSIM4v4xpart > 0.5) { /* 0/100 partition */ qsrc = -CoxWLcen * (T1 / 2.0 + T0 / 4.0 - 0.5 * T0 * T0 / T2); QovCox = qsrc / Coxeff; T2 += T2; T3 = T2 * T2; T7 = -(0.25 - 12.0 * T0 * (4.0 * T1 - T0) / T3); T4 = -(0.5 + 24.0 * T0 * T0 / T3) * (1.0 - dDeltaPhi_dVg); T5 = T7 * AbulkCV; T6 = T7 * VdseffCV; Csg = CoxWLcen * (T4 + T5 * dVdseffCV_dVg); Csd = CoxWLcen * T5 * dVdseffCV_dVd + Csg * dVgsteff_dVd + QovCox * dCoxeff_dVd; Csb = CoxWLcen * (T5 * dVdseffCV_dVb + T6 * dAbulkCV_dVb) + Csg * dVgsteff_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else if (model->BSIM4v4xpart < 0.5) { /* 40/60 partition */ T2 = T2 / 12.0; T3 = 0.5 * CoxWLcen / (T2 * T2); T4 = T1 * (2.0 * T0 * T0 / 3.0 + T1 * (T1 - 4.0 * T0 / 3.0)) - 2.0 * T0 * T0 * T0 / 15.0; qsrc = -T3 * T4; QovCox = qsrc / Coxeff; T8 = 4.0 / 3.0 * T1 * (T1 - T0) + 0.4 * T0 * T0; T5 = -2.0 * qsrc / T2 - T3 * (T1 * (3.0 * T1 - 8.0 * T0 / 3.0) + 2.0 * T0 * T0 / 3.0); T6 = AbulkCV * (qsrc / T2 + T3 * T8); T7 = T6 * VdseffCV / AbulkCV; Csg = T5 * (1.0 - dDeltaPhi_dVg) + T6 * dVdseffCV_dVg; Csd = Csg * dVgsteff_dVd + T6 * dVdseffCV_dVd + QovCox * dCoxeff_dVd; Csb = Csg * dVgsteff_dVb + T6 * dVdseffCV_dVb + T7 * dAbulkCV_dVb + QovCox * dCoxeff_dVb; Csg = Csg * dVgsteff_dVg + QovCox * dCoxeff_dVg; } else { /* 50/50 partition */ qsrc = -0.5 * qgate; Csg = -0.5 * Cgg1; Csd = -0.5 * Cgd1; Csb = -0.5 * Cgb1; } qgate += Qac0 + Qsub0 - qbulk; qbulk -= (Qac0 + Qsub0); qdrn = -(qgate + qbulk + qsrc); Cbg = Cbg1 - dQac0_dVg - dQsub0_dVg; Cbd = Cbd1 - dQsub0_dVd; Cbb = Cbb1 - dQac0_dVb - dQsub0_dVb; Cgg = Cgg1 - Cbg; Cgd = Cgd1 - Cbd; Cgb = Cgb1 - Cbb; Cgb *= dVbseff_dVb; Cbb *= dVbseff_dVb; Csb *= dVbseff_dVb; here->BSIM4v4cggb = Cgg; here->BSIM4v4cgsb = -(Cgg + Cgd + Cgb); here->BSIM4v4cgdb = Cgd; here->BSIM4v4cdgb = -(Cgg + Cbg + Csg); here->BSIM4v4cdsb = (Cgg + Cgd + Cgb + Cbg + Cbd + Cbb + Csg + Csd + Csb); here->BSIM4v4cddb = -(Cgd + Cbd + Csd); here->BSIM4v4cbgb = Cbg; here->BSIM4v4cbsb = -(Cbg + Cbd + Cbb); here->BSIM4v4cbdb = Cbd; } /* End of CTM */ } here->BSIM4v4csgb = - here->BSIM4v4cggb - here->BSIM4v4cdgb - here->BSIM4v4cbgb; here->BSIM4v4csdb = - here->BSIM4v4cgdb - here->BSIM4v4cddb - here->BSIM4v4cbdb; here->BSIM4v4cssb = - here->BSIM4v4cgsb - here->BSIM4v4cdsb - here->BSIM4v4cbsb; here->BSIM4v4cgbb = - here->BSIM4v4cgdb - here->BSIM4v4cggb - here->BSIM4v4cgsb; here->BSIM4v4cdbb = - here->BSIM4v4cddb - here->BSIM4v4cdgb - here->BSIM4v4cdsb; here->BSIM4v4cbbb = - here->BSIM4v4cbgb - here->BSIM4v4cbdb - here->BSIM4v4cbsb; here->BSIM4v4csbb = - here->BSIM4v4cgbb - here->BSIM4v4cdbb - here->BSIM4v4cbbb; here->BSIM4v4qgate = qgate; here->BSIM4v4qbulk = qbulk; here->BSIM4v4qdrn = qdrn; here->BSIM4v4qsrc = -(qgate + qbulk + qdrn); /* NQS begins */ if ((here->BSIM4v4trnqsMod) || (here->BSIM4v4acnqsMod)) { here->BSIM4v4qchqs = qcheq = -(qbulk + qgate); here->BSIM4v4cqgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb); here->BSIM4v4cqdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb); here->BSIM4v4cqsb = -(here->BSIM4v4cgsb + here->BSIM4v4cbsb); here->BSIM4v4cqbb = -(here->BSIM4v4cqgb + here->BSIM4v4cqdb + here->BSIM4v4cqsb); CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf * pParam->BSIM4v4leffCV; T1 = here->BSIM4v4gcrg / CoxWL; /* 1 / tau */ here->BSIM4v4gtau = T1 * ScalingFactor; if (here->BSIM4v4acnqsMod) here->BSIM4v4taunet = 1.0 / T1; *(ckt->CKTstate0 + here->BSIM4v4qcheq) = qcheq; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v4qcheq) = *(ckt->CKTstate0 + here->BSIM4v4qcheq); if (here->BSIM4v4trnqsMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qcheq); if (error) return(error); } } finished: /* Calculate junction C-V */ if (ChargeComputationNeeded) { czbd = model->BSIM4v4DunitAreaTempJctCap * here->BSIM4v4Adeff; /* bug fix */ czbs = model->BSIM4v4SunitAreaTempJctCap * here->BSIM4v4Aseff; czbdsw = model->BSIM4v4DunitLengthSidewallTempJctCap * here->BSIM4v4Pdeff; czbdswg = model->BSIM4v4DunitLengthGateSidewallTempJctCap * pParam->BSIM4v4weffCJ * here->BSIM4v4nf; czbssw = model->BSIM4v4SunitLengthSidewallTempJctCap * here->BSIM4v4Pseff; czbsswg = model->BSIM4v4SunitLengthGateSidewallTempJctCap * pParam->BSIM4v4weffCJ * here->BSIM4v4nf; MJS = model->BSIM4v4SbulkJctBotGradingCoeff; MJSWS = model->BSIM4v4SbulkJctSideGradingCoeff; MJSWGS = model->BSIM4v4SbulkJctGateSideGradingCoeff; MJD = model->BSIM4v4DbulkJctBotGradingCoeff; MJSWD = model->BSIM4v4DbulkJctSideGradingCoeff; MJSWGD = model->BSIM4v4DbulkJctGateSideGradingCoeff; /* Source Bulk Junction */ if (vbs_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v4qbs) = 0.0; here->BSIM4v4capbs = czbs + czbssw + czbsswg; } else if (vbs_jct < 0.0) { if (czbs > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBS; if (MJS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbs) = model->BSIM4v4PhiBS * czbs * (1.0 - arg * sarg) / (1.0 - MJS); here->BSIM4v4capbs = czbs * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v4qbs) = 0.0; here->BSIM4v4capbs = 0.0; } if (czbssw > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBSWS; if (MJSWS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbs) += model->BSIM4v4PhiBSWS * czbssw * (1.0 - arg * sarg) / (1.0 - MJSWS); here->BSIM4v4capbs += czbssw * sarg; } if (czbsswg > 0.0) { arg = 1.0 - vbs_jct / model->BSIM4v4PhiBSWGS; if (MJSWGS == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGS * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbs) += model->BSIM4v4PhiBSWGS * czbsswg * (1.0 - arg * sarg) / (1.0 - MJSWGS); here->BSIM4v4capbs += czbsswg * sarg; } } else { T0 = czbs + czbssw + czbsswg; T1 = vbs_jct * (czbs * MJS / model->BSIM4v4PhiBS + czbssw * MJSWS / model->BSIM4v4PhiBSWS + czbsswg * MJSWGS / model->BSIM4v4PhiBSWGS); *(ckt->CKTstate0 + here->BSIM4v4qbs) = vbs_jct * (T0 + 0.5 * T1); here->BSIM4v4capbs = T0 + T1; } /* Drain Bulk Junction */ if (vbd_jct == 0.0) { *(ckt->CKTstate0 + here->BSIM4v4qbd) = 0.0; here->BSIM4v4capbd = czbd + czbdsw + czbdswg; } else if (vbd_jct < 0.0) { if (czbd > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBD; if (MJD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbd) = model->BSIM4v4PhiBD* czbd * (1.0 - arg * sarg) / (1.0 - MJD); here->BSIM4v4capbd = czbd * sarg; } else { *(ckt->CKTstate0 + here->BSIM4v4qbd) = 0.0; here->BSIM4v4capbd = 0.0; } if (czbdsw > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBSWD; if (MJSWD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbd) += model->BSIM4v4PhiBSWD * czbdsw * (1.0 - arg * sarg) / (1.0 - MJSWD); here->BSIM4v4capbd += czbdsw * sarg; } if (czbdswg > 0.0) { arg = 1.0 - vbd_jct / model->BSIM4v4PhiBSWGD; if (MJSWGD == 0.5) sarg = 1.0 / sqrt(arg); else sarg = exp(-MJSWGD * log(arg)); *(ckt->CKTstate0 + here->BSIM4v4qbd) += model->BSIM4v4PhiBSWGD * czbdswg * (1.0 - arg * sarg) / (1.0 - MJSWGD); here->BSIM4v4capbd += czbdswg * sarg; } } else { T0 = czbd + czbdsw + czbdswg; T1 = vbd_jct * (czbd * MJD / model->BSIM4v4PhiBD + czbdsw * MJSWD / model->BSIM4v4PhiBSWD + czbdswg * MJSWGD / model->BSIM4v4PhiBSWGD); *(ckt->CKTstate0 + here->BSIM4v4qbd) = vbd_jct * (T0 + 0.5 * T1); here->BSIM4v4capbd = T0 + T1; } } /* * check convergence */ if ((here->BSIM4v4off == 0) || (!(ckt->CKTmode & MODEINITFIX))) { if (Check == 1) { ckt->CKTnoncon++; #ifndef NEWCONV } else { if (here->BSIM4v4mode >= 0) { Idtot = here->BSIM4v4cd + here->BSIM4v4csub + here->BSIM4v4Igidl - here->BSIM4v4cbd; } else { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Idtot = here->BSIM4v4cd + here->BSIM4v4cbd; break; case BSIM4v30: case BSIM4v40: Idtot = here->BSIM4v4cd + here->BSIM4v4cbd - here->BSIM4v4Igidl; /* bugfix */ break; default: break; } } tol0 = ckt->CKTreltol * MAX(fabs(cdhat), fabs(Idtot)) + ckt->CKTabstol; tol1 = ckt->CKTreltol * MAX(fabs(cseshat), fabs(Isestot)) + ckt->CKTabstol; tol2 = ckt->CKTreltol * MAX(fabs(cdedhat), fabs(Idedtot)) + ckt->CKTabstol; tol3 = ckt->CKTreltol * MAX(fabs(cgshat), fabs(Igstot)) + ckt->CKTabstol; tol4 = ckt->CKTreltol * MAX(fabs(cgdhat), fabs(Igdtot)) + ckt->CKTabstol; tol5 = ckt->CKTreltol * MAX(fabs(cgbhat), fabs(Igbtot)) + ckt->CKTabstol; if ((fabs(cdhat - Idtot) >= tol0) || (fabs(cseshat - Isestot) >= tol1) || (fabs(cdedhat - Idedtot) >= tol2)) { ckt->CKTnoncon++; } else if ((fabs(cgshat - Igstot) >= tol3) || (fabs(cgdhat - Igdtot) >= tol4) || (fabs(cgbhat - Igbtot) >= tol5)) { ckt->CKTnoncon++; } else { switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4csub; break; case BSIM4v30: case BSIM4v40: Ibtot = here->BSIM4v4cbs + here->BSIM4v4cbd - here->BSIM4v4Igidl - here->BSIM4v4Igisl - here->BSIM4v4csub; break; default: break; } tol6 = ckt->CKTreltol * MAX(fabs(cbhat), fabs(Ibtot)) + ckt->CKTabstol; if (fabs(cbhat - Ibtot) > tol6) { ckt->CKTnoncon++; } } #endif /* NEWCONV */ } } *(ckt->CKTstate0 + here->BSIM4v4vds) = vds; *(ckt->CKTstate0 + here->BSIM4v4vgs) = vgs; *(ckt->CKTstate0 + here->BSIM4v4vbs) = vbs; *(ckt->CKTstate0 + here->BSIM4v4vbd) = vbd; *(ckt->CKTstate0 + here->BSIM4v4vges) = vges; *(ckt->CKTstate0 + here->BSIM4v4vgms) = vgms; *(ckt->CKTstate0 + here->BSIM4v4vdbs) = vdbs; *(ckt->CKTstate0 + here->BSIM4v4vdbd) = vdbd; *(ckt->CKTstate0 + here->BSIM4v4vsbs) = vsbs; *(ckt->CKTstate0 + here->BSIM4v4vses) = vses; *(ckt->CKTstate0 + here->BSIM4v4vdes) = vdes; *(ckt->CKTstate0 + here->BSIM4v4qdef) = qdef; if (!ChargeComputationNeeded) goto line850; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: if (model->BSIM4v4capMod == 0) /* code merge -JX */ { cgdo = pParam->BSIM4v4cgdo; qgdo = pParam->BSIM4v4cgdo * vgd; cgso = pParam->BSIM4v4cgso; qgso = pParam->BSIM4v4cgso * vgs; } else /* For both capMod == 1 and 2 */ { T0 = vgd + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappad); cgdo = pParam->BSIM4v4cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM4v4cgdo + T3) * vgd - T3 * (T2 + 0.5 * pParam->BSIM4v4ckappad * (T4 - 1.0)); T0 = vgs + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappas); cgso = pParam->BSIM4v4cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM4v4cgso + T3) * vgs - T3 * (T2 + 0.5 * pParam->BSIM4v4ckappas * (T4 - 1.0)); } break; case BSIM4v40: if (here->BSIM4v4rgateMod == 3) { vgdx = vgmd; vgsx = vgms; } else /* For rgateMod == 0, 1 and 2 */ { vgdx = vgd; vgsx = vgs; } if (model->BSIM4v4capMod == 0) { cgdo = pParam->BSIM4v4cgdo; qgdo = pParam->BSIM4v4cgdo * vgdx; cgso = pParam->BSIM4v4cgso; qgso = pParam->BSIM4v4cgso * vgsx; } else /* For both capMod == 1 and 2 */ { T0 = vgdx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgdl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappad); cgdo = pParam->BSIM4v4cgdo + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgdo = (pParam->BSIM4v4cgdo + T3) * vgdx - T3 * (T2 + 0.5 * pParam->BSIM4v4ckappad * (T4 - 1.0)); T0 = vgsx + DELTA_1; T1 = sqrt(T0 * T0 + 4.0 * DELTA_1); T2 = 0.5 * (T0 - T1); T3 = pParam->BSIM4v4weffCV * pParam->BSIM4v4cgsl; T4 = sqrt(1.0 - 4.0 * T2 / pParam->BSIM4v4ckappas); cgso = pParam->BSIM4v4cgso + T3 - T3 * (1.0 - 1.0 / T4) * (0.5 - 0.5 * T0 / T1); qgso = (pParam->BSIM4v4cgso + T3) * vgsx - T3 * (T2 + 0.5 * pParam->BSIM4v4ckappas * (T4 - 1.0)); } break; default: break; } if (here->BSIM4v4nf != 1.0) { cgdo *= here->BSIM4v4nf; cgso *= here->BSIM4v4nf; qgdo *= here->BSIM4v4nf; qgso *= here->BSIM4v4nf; } here->BSIM4v4cgdo = cgdo; here->BSIM4v4qgdo = qgdo; here->BSIM4v4cgso = cgso; here->BSIM4v4qgso = qgso; #ifndef NOBYPASS line755: #endif ag0 = ckt->CKTag[0]; if (here->BSIM4v4mode > 0) { if (here->BSIM4v4trnqsMod == 0) { qdrn -= qgdo; if (here->BSIM4v4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v4cggb * ag0; gcgdb = here->BSIM4v4cgdb * ag0; gcgsb = here->BSIM4v4cgsb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = here->BSIM4v4cdgb * ag0; gcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb) * ag0; gcbgb = here->BSIM4v4cbgb * ag0; qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qsrc = -(qgate + qgmid + qbulk + qdrn); } else { gcggb = (here->BSIM4v4cggb + cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = (here->BSIM4v4cgdb - cgdo) * ag0; gcgsb = (here->BSIM4v4cgsb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = (here->BSIM4v4cdgb - cgdo) * ag0; gcsgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb + cgso) * ag0; gcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v4cddb + here->BSIM4v4capbd + cgdo) * ag0; gcdsb = here->BSIM4v4cdsb * ag0; gcsdb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + here->BSIM4v4cddb) * ag0; gcssb = (here->BSIM4v4capbs + cgso - (here->BSIM4v4cgsb + here->BSIM4v4cbsb + here->BSIM4v4cdsb)) * ag0; if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v4cbdb - here->BSIM4v4capbd) * ag0; gcbsb = (here->BSIM4v4cbsb - here->BSIM4v4capbs) * ag0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: gcdbdb = 0.0; break; case BSIM4v40: gcdbdb = 0.0; gcsbsb = 0.0; break; default: break; } } else { gcdbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + here->BSIM4v4cdsb) * ag0; gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb) + here->BSIM4v4capbs * ag0; gcbdb = here->BSIM4v4cbdb * ag0; gcbsb = here->BSIM4v4cbsb * ag0; gcdbdb = -here->BSIM4v4capbd * ag0; gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.6; dxpart = 0.4; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v4qchqs; CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf * pParam->BSIM4v4leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v4gtg = T0 * here->BSIM4v4gcrgg; ggtd = here->BSIM4v4gtd = T0 * here->BSIM4v4gcrgd; ggts = here->BSIM4v4gts = T0 * here->BSIM4v4gcrgs; ggtb = here->BSIM4v4gtb = T0 * here->BSIM4v4gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v4cqgb * ag0; gcqdb = here->BSIM4v4cqdb * ag0; gcqsb = here->BSIM4v4cqsb * ag0; gcqbb = here->BSIM4v4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v4xpart < 0.5) { dxpart = 0.4; } else if (model->BSIM4v4xpart > 0.5) { dxpart = 0.0; } else { dxpart = 0.5; } ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; } else { dxpart = qdrn / qcheq; Cdd = here->BSIM4v4cddb; Csd = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + here->BSIM4v4cbdb); ddxpart_dVd = (Cdd - dxpart * (Cdd + Csd)) / qcheq; Cdg = here->BSIM4v4cdgb; Csg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + here->BSIM4v4cbgb); ddxpart_dVg = (Cdg - dxpart * (Cdg + Csg)) / qcheq; Cds = here->BSIM4v4cdsb; Css = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + here->BSIM4v4cbsb); ddxpart_dVs = (Cds - dxpart * (Cds + Css)) / qcheq; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); } sxpart = 1.0 - dxpart; dsxpart_dVd = -ddxpart_dVd; dsxpart_dVg = -ddxpart_dVg; dsxpart_dVs = -ddxpart_dVs; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); if (here->BSIM4v4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -(qgmid + qbulk + qdrn); } else { gcggb = (cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -(qgate + qbulk + qdrn); } gcddb = (here->BSIM4v4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v4capbs + cgso) * ag0; if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v4capbd * ag0; gcbsb = -here->BSIM4v4capbs * ag0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: gcdbdb = 0.0; break; case BSIM4v40: gcdbdb = 0.0; gcsbsb = 0.0; break; default: break; } } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v4capbd * ag0; gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } else { if (here->BSIM4v4trnqsMod == 0) { qsrc = qdrn - qgso; if (here->BSIM4v4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcggb = here->BSIM4v4cggb * ag0; gcgdb = here->BSIM4v4cgsb * ag0; gcgsb = here->BSIM4v4cgdb * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb) * ag0; gcsgb = here->BSIM4v4cdgb * ag0; gcbgb = here->BSIM4v4cbgb * ag0; qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qbulk -= qgmb; qdrn = -(qgate + qgmid + qbulk + qsrc); } else { gcggb = (here->BSIM4v4cggb + cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = (here->BSIM4v4cgsb - cgdo) * ag0; gcgsb = (here->BSIM4v4cgdb - cgso) * ag0; gcgbb = -(gcggb + gcgdb + gcgsb); gcdgb = -(here->BSIM4v4cggb + here->BSIM4v4cbgb + here->BSIM4v4cdgb + cgdo) * ag0; gcsgb = (here->BSIM4v4cdgb - cgso) * ag0; gcbgb = (here->BSIM4v4cbgb - pParam->BSIM4v4cgbo) * ag0; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v4cgbo * vgb; qgate += qgdo + qgso + qgb; qbulk -= qgb; qdrn = -(qgate + qbulk + qsrc); } gcddb = (here->BSIM4v4capbd + cgdo - (here->BSIM4v4cgsb + here->BSIM4v4cbsb + here->BSIM4v4cdsb)) * ag0; gcdsb = -(here->BSIM4v4cgdb + here->BSIM4v4cbdb + here->BSIM4v4cddb) * ag0; gcsdb = here->BSIM4v4cdsb * ag0; gcssb = (here->BSIM4v4cddb + here->BSIM4v4capbs + cgso) * ag0; if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb); gcsbb = -(gcsgb + gcsdb + gcssb + gcsgmb); gcbdb = (here->BSIM4v4cbsb - here->BSIM4v4capbd) * ag0; gcbsb = (here->BSIM4v4cbdb - here->BSIM4v4capbs) * ag0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: gcdbdb = 0.0; break; case BSIM4v40: gcdbdb = 0.0; gcsbsb = 0.0; break; default: break; } } else { gcdbb = -(gcdgb + gcddb + gcdsb + gcdgmb) + here->BSIM4v4capbd * ag0; gcsbb = -(here->BSIM4v4cddb + here->BSIM4v4cdgb + here->BSIM4v4cdsb) * ag0; gcbdb = here->BSIM4v4cbsb * ag0; gcbsb = here->BSIM4v4cbdb * ag0; gcdbdb = -here->BSIM4v4capbd * ag0; gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbgb + gcbdb + gcbsb + gcbgmb); ggtg = ggtd = ggtb = ggts = 0.0; sxpart = 0.4; dxpart = 0.6; ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { qcheq = here->BSIM4v4qchqs; CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf * pParam->BSIM4v4leffCV; T0 = qdef * ScalingFactor / CoxWL; ggtg = here->BSIM4v4gtg = T0 * here->BSIM4v4gcrgg; ggts = here->BSIM4v4gtd = T0 * here->BSIM4v4gcrgs; ggtd = here->BSIM4v4gts = T0 * here->BSIM4v4gcrgd; ggtb = here->BSIM4v4gtb = T0 * here->BSIM4v4gcrgb; gqdef = ScalingFactor * ag0; gcqgb = here->BSIM4v4cqgb * ag0; gcqdb = here->BSIM4v4cqsb * ag0; gcqsb = here->BSIM4v4cqdb * ag0; gcqbb = here->BSIM4v4cqbb * ag0; if (fabs(qcheq) <= 1.0e-5 * CoxWL) { if (model->BSIM4v4xpart < 0.5) { sxpart = 0.4; } else if (model->BSIM4v4xpart > 0.5) { sxpart = 0.0; } else { sxpart = 0.5; } dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; } else { sxpart = qdrn / qcheq; Css = here->BSIM4v4cddb; Cds = -(here->BSIM4v4cgdb + here->BSIM4v4cddb + here->BSIM4v4cbdb); dsxpart_dVs = (Css - sxpart * (Css + Cds)) / qcheq; Csg = here->BSIM4v4cdgb; Cdg = -(here->BSIM4v4cggb + here->BSIM4v4cdgb + here->BSIM4v4cbgb); dsxpart_dVg = (Csg - sxpart * (Csg + Cdg)) / qcheq; Csd = here->BSIM4v4cdsb; Cdd = -(here->BSIM4v4cgsb + here->BSIM4v4cdsb + here->BSIM4v4cbsb); dsxpart_dVd = (Csd - sxpart * (Csd + Cdd)) / qcheq; dsxpart_dVb = -(dsxpart_dVd + dsxpart_dVg + dsxpart_dVs); } dxpart = 1.0 - sxpart; ddxpart_dVd = -dsxpart_dVd; ddxpart_dVg = -dsxpart_dVg; ddxpart_dVs = -dsxpart_dVs; ddxpart_dVb = -(ddxpart_dVd + ddxpart_dVg + ddxpart_dVs); if (here->BSIM4v4rgateMod == 3) { gcgmgmb = (cgdo + cgso + pParam->BSIM4v4cgbo) * ag0; gcgmdb = -cgdo * ag0; gcgmsb = -cgso * ag0; gcgmbb = -pParam->BSIM4v4cgbo * ag0; gcdgmb = gcgmdb; gcsgmb = gcgmsb; gcbgmb = gcgmbb; gcdgb = gcsgb = gcbgb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; qgmb = pParam->BSIM4v4cgbo * vgmb; qgmid = qgdo + qgso + qgmb; qgate = 0.0; qbulk = -qgmb; qdrn = -qgdo; qsrc = -qgso; } else { gcggb = (cgdo + cgso + pParam->BSIM4v4cgbo ) * ag0; gcgdb = -cgdo * ag0; gcgsb = -cgso * ag0; gcgbb = -pParam->BSIM4v4cgbo * ag0; gcdgb = gcgdb; gcsgb = gcgsb; gcbgb = gcgbb; gcdgmb = gcsgmb = gcbgmb = 0.0; qgb = pParam->BSIM4v4cgbo * vgb; qgate = qgdo + qgso + qgb; qbulk = -qgb; qdrn = -qgdo; qsrc = -qgso; } gcddb = (here->BSIM4v4capbd + cgdo) * ag0; gcdsb = gcsdb = 0.0; gcssb = (here->BSIM4v4capbs + cgso) * ag0; if (!here->BSIM4v4rbodyMod) { gcdbb = -(gcdgb + gcddb + gcdgmb); gcsbb = -(gcsgb + gcssb + gcsgmb); gcbdb = -here->BSIM4v4capbd * ag0; gcbsb = -here->BSIM4v4capbs * ag0; switch (model->BSIM4v4intVersion) { case BSIM4vOLD: case BSIM4v21: case BSIM4v30: gcdbdb = 0.0; break; case BSIM4v40: gcdbdb = 0.0; gcsbsb = 0.0; break; default: break; } } else { gcdbb = gcsbb = gcbdb = gcbsb = 0.0; gcdbdb = -here->BSIM4v4capbd * ag0; gcsbsb = -here->BSIM4v4capbs * ag0; } gcbbb = -(gcbdb + gcbgb + gcbsb + gcbgmb); } } if (here->BSIM4v4trnqsMod) { *(ckt->CKTstate0 + here->BSIM4v4qcdump) = qdef * ScalingFactor; if (ckt->CKTmode & MODEINITTRAN) *(ckt->CKTstate1 + here->BSIM4v4qcdump) = *(ckt->CKTstate0 + here->BSIM4v4qcdump); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qcdump); if (error) return(error); } if (ByPass) goto line860; *(ckt->CKTstate0 + here->BSIM4v4qg) = qgate; *(ckt->CKTstate0 + here->BSIM4v4qd) = qdrn - *(ckt->CKTstate0 + here->BSIM4v4qbd); *(ckt->CKTstate0 + here->BSIM4v4qs) = qsrc - *(ckt->CKTstate0 + here->BSIM4v4qbs); if (here->BSIM4v4rgateMod == 3) *(ckt->CKTstate0 + here->BSIM4v4qgmid) = qgmid; if (!here->BSIM4v4rbodyMod) { *(ckt->CKTstate0 + here->BSIM4v4qb) = qbulk + *(ckt->CKTstate0 + here->BSIM4v4qbd) + *(ckt->CKTstate0 + here->BSIM4v4qbs); } else *(ckt->CKTstate0 + here->BSIM4v4qb) = qbulk; /* Store small signal parameters */ if (ckt->CKTmode & MODEINITSMSIG) { goto line1000; } if (!ChargeComputationNeeded) goto line850; if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v4qb) = *(ckt->CKTstate0 + here->BSIM4v4qb); *(ckt->CKTstate1 + here->BSIM4v4qg) = *(ckt->CKTstate0 + here->BSIM4v4qg); *(ckt->CKTstate1 + here->BSIM4v4qd) = *(ckt->CKTstate0 + here->BSIM4v4qd); if (here->BSIM4v4rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v4qgmid) = *(ckt->CKTstate0 + here->BSIM4v4qgmid); if (here->BSIM4v4rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v4qbs) = *(ckt->CKTstate0 + here->BSIM4v4qbs); *(ckt->CKTstate1 + here->BSIM4v4qbd) = *(ckt->CKTstate0 + here->BSIM4v4qbd); } } error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qb); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qg); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qd); if (error) return(error); if (here->BSIM4v4rgateMod == 3) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qgmid); if (error) return(error); } if (here->BSIM4v4rbodyMod) { error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qbs); if (error) return(error); error = NIintegrate(ckt, &geq, &ceq, 0.0, here->BSIM4v4qbd); if (error) return(error); } goto line860; line850: /* Zero gcap and ceqcap if (!ChargeComputationNeeded) */ ceqqg = ceqqb = ceqqd = 0.0; ceqqjd = ceqqjs = 0.0; cqcheq = cqdef = 0.0; gcdgb = gcddb = gcdsb = gcdbb = 0.0; gcsgb = gcsdb = gcssb = gcsbb = 0.0; gcggb = gcgdb = gcgsb = gcgbb = 0.0; gcbdb = gcbgb = gcbsb = gcbbb = 0.0; gcgmgmb = gcgmdb = gcgmsb = gcgmbb = 0.0; gcdgmb = gcsgmb = gcbgmb = ceqqgmid = 0.0; gcdbdb = gcsbsb = 0.0; gqdef = gcqgb = gcqdb = gcqsb = gcqbb = 0.0; ggtg = ggtd = ggtb = ggts = 0.0; sxpart = (1.0 - (dxpart = (here->BSIM4v4mode > 0) ? 0.4 : 0.6)); ddxpart_dVd = ddxpart_dVg = ddxpart_dVb = ddxpart_dVs = 0.0; dsxpart_dVd = dsxpart_dVg = dsxpart_dVb = dsxpart_dVs = 0.0; if (here->BSIM4v4trnqsMod) { CoxWL = model->BSIM4v4coxe * pParam->BSIM4v4weffCV * here->BSIM4v4nf * pParam->BSIM4v4leffCV; T1 = here->BSIM4v4gcrg / CoxWL; here->BSIM4v4gtau = T1 * ScalingFactor; } else here->BSIM4v4gtau = 0.0; goto line900; line860: /* Calculate equivalent charge current */ cqgate = *(ckt->CKTstate0 + here->BSIM4v4cqg); cqbody = *(ckt->CKTstate0 + here->BSIM4v4cqb); cqdrn = *(ckt->CKTstate0 + here->BSIM4v4cqd); ceqqg = cqgate - gcggb * vgb + gcgdb * vbd + gcgsb * vbs; ceqqd = cqdrn - gcdgb * vgb - gcdgmb * vgmb + (gcddb + gcdbdb) * vbd - gcdbdb * vbd_jct + gcdsb * vbs; ceqqb = cqbody - gcbgb * vgb - gcbgmb * vgmb + gcbdb * vbd + gcbsb * vbs; if (here->BSIM4v4rgateMod == 3) ceqqgmid = *(ckt->CKTstate0 + here->BSIM4v4cqgmid) + gcgmdb * vbd + gcgmsb * vbs - gcgmgmb * vgmb; else ceqqgmid = 0.0; if (here->BSIM4v4rbodyMod) { ceqqjs = *(ckt->CKTstate0 + here->BSIM4v4cqbs) + gcsbsb * vbs_jct; ceqqjd = *(ckt->CKTstate0 + here->BSIM4v4cqbd) + gcdbdb * vbd_jct; } if (here->BSIM4v4trnqsMod) { T0 = ggtg * vgb - ggtd * vbd - ggts * vbs; ceqqg += T0; T1 = qdef * here->BSIM4v4gtau; ceqqd -= dxpart * T0 + T1 * (ddxpart_dVg * vgb - ddxpart_dVd * vbd - ddxpart_dVs * vbs); cqdef = *(ckt->CKTstate0 + here->BSIM4v4cqcdump) - gqdef * qdef; cqcheq = *(ckt->CKTstate0 + here->BSIM4v4cqcheq) - (gcqgb * vgb - gcqdb * vbd - gcqsb * vbs) + T0; } if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->BSIM4v4cqb) = *(ckt->CKTstate0 + here->BSIM4v4cqb); *(ckt->CKTstate1 + here->BSIM4v4cqg) = *(ckt->CKTstate0 + here->BSIM4v4cqg); *(ckt->CKTstate1 + here->BSIM4v4cqd) = *(ckt->CKTstate0 + here->BSIM4v4cqd); if (here->BSIM4v4rgateMod == 3) *(ckt->CKTstate1 + here->BSIM4v4cqgmid) = *(ckt->CKTstate0 + here->BSIM4v4cqgmid); if (here->BSIM4v4rbodyMod) { *(ckt->CKTstate1 + here->BSIM4v4cqbs) = *(ckt->CKTstate0 + here->BSIM4v4cqbs); *(ckt->CKTstate1 + here->BSIM4v4cqbd) = *(ckt->CKTstate0 + here->BSIM4v4cqbd); } } /* * Load current vector */ line900: if (here->BSIM4v4mode >= 0) { Gm = here->BSIM4v4gm; Gmbs = here->BSIM4v4gmbs; FwdSum = Gm + Gmbs; RevSum = 0.0; ceqdrn = model->BSIM4v4type * (cdrain - here->BSIM4v4gds * vds - Gm * vgs - Gmbs * vbs); ceqbd = model->BSIM4v4type * (here->BSIM4v4csub + here->BSIM4v4Igidl - (here->BSIM4v4gbds + here->BSIM4v4ggidld) * vds - (here->BSIM4v4gbgs + here->BSIM4v4ggidlg) * vgs - (here->BSIM4v4gbbs + here->BSIM4v4ggidlb) * vbs); ceqbs = model->BSIM4v4type * (here->BSIM4v4Igisl + here->BSIM4v4ggisls * vds - here->BSIM4v4ggislg * vgd - here->BSIM4v4ggislb * vbd); gbbdp = -(here->BSIM4v4gbds); gbbsp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = here->BSIM4v4gbgs; gbdpdp = here->BSIM4v4gbds; gbdpb = here->BSIM4v4gbbs; gbdpsp = -(gbdpg + gbdpdp + gbdpb); gbspg = 0.0; gbspdp = 0.0; gbspb = 0.0; gbspsp = 0.0; if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcsg; gIstotd = here->BSIM4v4gIgcsd; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcss; gIstotb = here->BSIM4v4gIgcsb; Istoteq = model->BSIM4v4type * (here->BSIM4v4Igs + here->BSIM4v4Igcs - gIstotg * vgs - here->BSIM4v4gIgcsd * vds - here->BSIM4v4gIgcsb * vbs); gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcdg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcdd; gIdtots = here->BSIM4v4gIgcds; gIdtotb = here->BSIM4v4gIgcdb; Idtoteq = model->BSIM4v4type * (here->BSIM4v4Igd + here->BSIM4v4Igcd - here->BSIM4v4gIgdg * vgd - here->BSIM4v4gIgcdg * vgs - here->BSIM4v4gIgcdd * vds - here->BSIM4v4gIgcdb * vbs); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbd; gIbtots = here->BSIM4v4gIgbs; gIbtotb = here->BSIM4v4gIgbb; Ibtoteq = model->BSIM4v4type * (here->BSIM4v4Igb - here->BSIM4v4gIgbg * vgs - here->BSIM4v4gIgbd * vds - here->BSIM4v4gIgbb * vbs); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v4rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgd * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgs * T0; gcrgb = here->BSIM4v4gcrgb * T0; ceqgcrg = -(gcrgd * vds + gcrgg * vgs + gcrgb * vbs); gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } else { Gm = -here->BSIM4v4gm; Gmbs = -here->BSIM4v4gmbs; FwdSum = 0.0; RevSum = -(Gm + Gmbs); ceqdrn = -model->BSIM4v4type * (cdrain + here->BSIM4v4gds * vds + Gm * vgd + Gmbs * vbd); ceqbs = model->BSIM4v4type * (here->BSIM4v4csub + here->BSIM4v4Igisl + (here->BSIM4v4gbds + here->BSIM4v4ggisls) * vds - (here->BSIM4v4gbgs + here->BSIM4v4ggislg) * vgd - (here->BSIM4v4gbbs + here->BSIM4v4ggislb) * vbd); ceqbd = model->BSIM4v4type * (here->BSIM4v4Igidl - here->BSIM4v4ggidld * vds - here->BSIM4v4ggidlg * vgs - here->BSIM4v4ggidlb * vbs); gbbsp = -(here->BSIM4v4gbds); gbbdp = here->BSIM4v4gbds + here->BSIM4v4gbgs + here->BSIM4v4gbbs; gbdpg = 0.0; gbdpsp = 0.0; gbdpb = 0.0; gbdpdp = 0.0; gbspg = here->BSIM4v4gbgs; gbspsp = here->BSIM4v4gbds; gbspb = here->BSIM4v4gbbs; gbspdp = -(gbspg + gbspsp + gbspb); if (model->BSIM4v4igcMod) { gIstotg = here->BSIM4v4gIgsg + here->BSIM4v4gIgcdg; gIstotd = here->BSIM4v4gIgcds; gIstots = here->BSIM4v4gIgss + here->BSIM4v4gIgcdd; gIstotb = here->BSIM4v4gIgcdb; Istoteq = model->BSIM4v4type * (here->BSIM4v4Igs + here->BSIM4v4Igcd - here->BSIM4v4gIgsg * vgs - here->BSIM4v4gIgcdg * vgd + here->BSIM4v4gIgcdd * vds - here->BSIM4v4gIgcdb * vbd); gIdtotg = here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg; gIdtotd = here->BSIM4v4gIgdd + here->BSIM4v4gIgcss; gIdtots = here->BSIM4v4gIgcsd; gIdtotb = here->BSIM4v4gIgcsb; Idtoteq = model->BSIM4v4type * (here->BSIM4v4Igd + here->BSIM4v4Igcs - (here->BSIM4v4gIgdg + here->BSIM4v4gIgcsg) * vgd + here->BSIM4v4gIgcsd * vds - here->BSIM4v4gIgcsb * vbd); } else { gIstotg = gIstotd = gIstots = gIstotb = Istoteq = 0.0; gIdtotg = gIdtotd = gIdtots = gIdtotb = Idtoteq = 0.0; } if (model->BSIM4v4igbMod) { gIbtotg = here->BSIM4v4gIgbg; gIbtotd = here->BSIM4v4gIgbs; gIbtots = here->BSIM4v4gIgbd; gIbtotb = here->BSIM4v4gIgbb; Ibtoteq = model->BSIM4v4type * (here->BSIM4v4Igb - here->BSIM4v4gIgbg * vgd + here->BSIM4v4gIgbd * vds - here->BSIM4v4gIgbb * vbd); } else gIbtotg = gIbtotd = gIbtots = gIbtotb = Ibtoteq = 0.0; if ((model->BSIM4v4igcMod != 0) || (model->BSIM4v4igbMod != 0)) { gIgtotg = gIstotg + gIdtotg + gIbtotg; gIgtotd = gIstotd + gIdtotd + gIbtotd ; gIgtots = gIstots + gIdtots + gIbtots; gIgtotb = gIstotb + gIdtotb + gIbtotb; Igtoteq = Istoteq + Idtoteq + Ibtoteq; } else gIgtotg = gIgtotd = gIgtots = gIgtotb = Igtoteq = 0.0; if (here->BSIM4v4rgateMod == 2) T0 = vges - vgs; else if (here->BSIM4v4rgateMod == 3) T0 = vgms - vgs; if (here->BSIM4v4rgateMod > 1) { gcrgd = here->BSIM4v4gcrgs * T0; gcrgg = here->BSIM4v4gcrgg * T0; gcrgs = here->BSIM4v4gcrgd * T0; gcrgb = here->BSIM4v4gcrgb * T0; ceqgcrg = -(gcrgg * vgd - gcrgs * vds + gcrgb * vbd); gcrgg -= here->BSIM4v4gcrg; gcrg = here->BSIM4v4gcrg; } else ceqgcrg = gcrg = gcrgd = gcrgg = gcrgs = gcrgb = 0.0; } if (model->BSIM4v4rdsMod == 1) { ceqgstot = model->BSIM4v4type * (here->BSIM4v4gstotd * vds + here->BSIM4v4gstotg * vgs + here->BSIM4v4gstotb * vbs); /* WDLiu: ceqgstot flowing away from sNodePrime */ gstot = here->BSIM4v4gstot; gstotd = here->BSIM4v4gstotd; gstotg = here->BSIM4v4gstotg; gstots = here->BSIM4v4gstots - gstot; gstotb = here->BSIM4v4gstotb; ceqgdtot = -model->BSIM4v4type * (here->BSIM4v4gdtotd * vds + here->BSIM4v4gdtotg * vgs + here->BSIM4v4gdtotb * vbs); /* WDLiu: ceqgdtot defined as flowing into dNodePrime */ gdtot = here->BSIM4v4gdtot; gdtotd = here->BSIM4v4gdtotd - gdtot; gdtotg = here->BSIM4v4gdtotg; gdtots = here->BSIM4v4gdtots; gdtotb = here->BSIM4v4gdtotb; } else { gstot = gstotd = gstotg = gstots = gstotb = ceqgstot = 0.0; gdtot = gdtotd = gdtotg = gdtots = gdtotb = ceqgdtot = 0.0; } if (model->BSIM4v4type > 0) { ceqjs = (here->BSIM4v4cbs - here->BSIM4v4gbs * vbs_jct); ceqjd = (here->BSIM4v4cbd - here->BSIM4v4gbd * vbd_jct); } else { ceqjs = -(here->BSIM4v4cbs - here->BSIM4v4gbs * vbs_jct); ceqjd = -(here->BSIM4v4cbd - here->BSIM4v4gbd * vbd_jct); ceqqg = -ceqqg; ceqqd = -ceqqd; ceqqb = -ceqqb; ceqgcrg = -ceqgcrg; if (here->BSIM4v4trnqsMod) { cqdef = -cqdef; cqcheq = -cqcheq; } if (here->BSIM4v4rbodyMod) { ceqqjs = -ceqqjs; ceqqjd = -ceqqjd; } if (here->BSIM4v4rgateMod == 3) ceqqgmid = -ceqqgmid; } /* * Loading RHS */ m = here->BSIM4v4m; (*(ckt->CKTrhs + here->BSIM4v4dNodePrime) += m * (ceqjd - ceqbd + ceqgdtot - ceqdrn - ceqqd + Idtoteq)); (*(ckt->CKTrhs + here->BSIM4v4gNodePrime) -= m * (ceqqg - ceqgcrg + Igtoteq)); if (here->BSIM4v4rgateMod == 2) (*(ckt->CKTrhs + here->BSIM4v4gNodeExt) -= m * ceqgcrg); else if (here->BSIM4v4rgateMod == 3) (*(ckt->CKTrhs + here->BSIM4v4gNodeMid) -= m * (ceqqgmid + ceqgcrg)); if (!here->BSIM4v4rbodyMod) { (*(ckt->CKTrhs + here->BSIM4v4bNodePrime) += m * (ceqbd + ceqbs - ceqjd - ceqjs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqg + ceqqb + ceqqd + ceqqgmid - ceqgstot + Istoteq)); } else { (*(ckt->CKTrhs + here->BSIM4v4dbNode) -= m * (ceqjd + ceqqjd)); (*(ckt->CKTrhs + here->BSIM4v4bNodePrime) += m * (ceqbd + ceqbs - ceqqb + Ibtoteq)); (*(ckt->CKTrhs + here->BSIM4v4sbNode) -= m * (ceqjs + ceqqjs)); (*(ckt->CKTrhs + here->BSIM4v4sNodePrime) += m * (ceqdrn - ceqbs + ceqjs + ceqqd + ceqqg + ceqqb + ceqqjd + ceqqjs + ceqqgmid - ceqgstot + Istoteq)); } if (model->BSIM4v4rdsMod) { (*(ckt->CKTrhs + here->BSIM4v4dNode) -= m * ceqgdtot); (*(ckt->CKTrhs + here->BSIM4v4sNode) += m * ceqgstot); } if (here->BSIM4v4trnqsMod) *(ckt->CKTrhs + here->BSIM4v4qNode) += m * (cqcheq - cqdef); /* * Loading matrix */ if (!here->BSIM4v4rbodyMod) { gjbd = here->BSIM4v4gbd; gjbs = here->BSIM4v4gbs; } else gjbd = gjbs = 0.0; if (!model->BSIM4v4rdsMod) { gdpr = here->BSIM4v4drainConductance; gspr = here->BSIM4v4sourceConductance; } else gdpr = gspr = 0.0; geltd = here->BSIM4v4grgeltd; T1 = qdef * here->BSIM4v4gtau; if (here->BSIM4v4rgateMod == 1) { (*(here->BSIM4v4GEgePtr) += m * geltd); (*(here->BSIM4v4GPgePtr) -= m * geltd); (*(here->BSIM4v4GEgpPtr) -= m * geltd); (*(here->BSIM4v4GPgpPtr) += m * (gcggb + geltd - ggtg + gIgtotg)); (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v4GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } /* WDLiu: gcrg already subtracted from all gcrgg below */ else if (here->BSIM4v4rgateMod == 2) { (*(here->BSIM4v4GEgePtr) += m * gcrg); (*(here->BSIM4v4GEgpPtr) += m * gcrgg); (*(here->BSIM4v4GEdpPtr) += m * gcrgd); (*(here->BSIM4v4GEspPtr) += m * gcrgs); (*(here->BSIM4v4GEbpPtr) += m * gcrgb); (*(here->BSIM4v4GPgePtr) -= m * gcrg); (*(here->BSIM4v4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else if (here->BSIM4v4rgateMod == 3) { (*(here->BSIM4v4GEgePtr) += m * geltd); (*(here->BSIM4v4GEgmPtr) -= m * geltd); (*(here->BSIM4v4GMgePtr) -= m * geltd); (*(here->BSIM4v4GMgmPtr) += m * (geltd + gcrg + gcgmgmb)); (*(here->BSIM4v4GMdpPtr) += m * (gcrgd + gcgmdb)); (*(here->BSIM4v4GMgpPtr) += m * gcrgg); (*(here->BSIM4v4GMspPtr) += m * (gcrgs + gcgmsb)); (*(here->BSIM4v4GMbpPtr) += m * (gcrgb + gcgmbb)); (*(here->BSIM4v4DPgmPtr) += m * gcdgmb); (*(here->BSIM4v4GPgmPtr) -= m * gcrg); (*(here->BSIM4v4SPgmPtr) += m * gcsgmb); (*(here->BSIM4v4BPgmPtr) += m * gcbgmb); (*(here->BSIM4v4GPgpPtr) += m * (gcggb - gcrgg - ggtg + gIgtotg)); (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - gcrgd - ggtd + gIgtotd)); (*(here->BSIM4v4GPspPtr) += m * (gcgsb - gcrgs - ggts + gIgtots)); (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - gcrgb - ggtb + gIgtotb)); } else { (*(here->BSIM4v4GPgpPtr) += m * (gcggb - ggtg + gIgtotg)); (*(here->BSIM4v4GPdpPtr) += m * (gcgdb - ggtd + gIgtotd)); (*(here->BSIM4v4GPspPtr) += m * (gcgsb - ggts + gIgtots)); (*(here->BSIM4v4GPbpPtr) += m * (gcgbb - ggtb + gIgtotb)); } if (model->BSIM4v4rdsMod) { (*(here->BSIM4v4DgpPtr) += m * gdtotg); (*(here->BSIM4v4DspPtr) += m * gdtots); (*(here->BSIM4v4DbpPtr) += m * gdtotb); (*(here->BSIM4v4SdpPtr) += m * gstotd); (*(here->BSIM4v4SgpPtr) += m * gstotg); (*(here->BSIM4v4SbpPtr) += m * gstotb); } (*(here->BSIM4v4DPdpPtr) += m * (gdpr + here->BSIM4v4gds + here->BSIM4v4gbd + T1 * ddxpart_dVd - gdtotd + RevSum + gcddb + gbdpdp + dxpart * ggtd - gIdtotd)); (*(here->BSIM4v4DPdPtr) -= m * (gdpr + gdtot)); (*(here->BSIM4v4DPgpPtr) += m * (Gm + gcdgb - gdtotg + gbdpg - gIdtotg + dxpart * ggtg + T1 * ddxpart_dVg)); (*(here->BSIM4v4DPspPtr) -= m * (here->BSIM4v4gds + gdtots - dxpart * ggts + gIdtots - T1 * ddxpart_dVs + FwdSum - gcdsb - gbdpsp)); (*(here->BSIM4v4DPbpPtr) -= m * (gjbd + gdtotb - Gmbs - gcdbb - gbdpb + gIdtotb - T1 * ddxpart_dVb - dxpart * ggtb)); (*(here->BSIM4v4DdpPtr) -= m * (gdpr - gdtotd)); (*(here->BSIM4v4DdPtr) += m * (gdpr + gdtot)); (*(here->BSIM4v4SPdpPtr) -= m * (here->BSIM4v4gds + gstotd + RevSum - gcsdb - gbspdp - T1 * dsxpart_dVd - sxpart * ggtd + gIstotd)); (*(here->BSIM4v4SPgpPtr) += m * (gcsgb - Gm - gstotg + gbspg + sxpart * ggtg + T1 * dsxpart_dVg - gIstotg)); (*(here->BSIM4v4SPspPtr) += m * (gspr + here->BSIM4v4gds + here->BSIM4v4gbs + T1 * dsxpart_dVs - gstots + FwdSum + gcssb + gbspsp + sxpart * ggts - gIstots)); (*(here->BSIM4v4SPsPtr) -= m * (gspr + gstot)); (*(here->BSIM4v4SPbpPtr) -= m * (gjbs + gstotb + Gmbs - gcsbb - gbspb - sxpart * ggtb - T1 * dsxpart_dVb + gIstotb)); (*(here->BSIM4v4SspPtr) -= m * (gspr - gstots)); (*(here->BSIM4v4SsPtr) += m * (gspr + gstot)); (*(here->BSIM4v4BPdpPtr) += m * (gcbdb - gjbd + gbbdp - gIbtotd)); (*(here->BSIM4v4BPgpPtr) += m * (gcbgb - here->BSIM4v4gbgs - gIbtotg)); (*(here->BSIM4v4BPspPtr) += m * (gcbsb - gjbs + gbbsp - gIbtots)); (*(here->BSIM4v4BPbpPtr) += m * (gjbd + gjbs + gcbbb - here->BSIM4v4gbbs - gIbtotb)); ggidld = here->BSIM4v4ggidld; ggidlg = here->BSIM4v4ggidlg; ggidlb = here->BSIM4v4ggidlb; ggislg = here->BSIM4v4ggislg; ggisls = here->BSIM4v4ggisls; ggislb = here->BSIM4v4ggislb; /* stamp gidl */ (*(here->BSIM4v4DPdpPtr) += m * ggidld); (*(here->BSIM4v4DPgpPtr) += m * ggidlg); (*(here->BSIM4v4DPspPtr) -= m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v4DPbpPtr) += m * ggidlb); (*(here->BSIM4v4BPdpPtr) -= m * ggidld); (*(here->BSIM4v4BPgpPtr) -= m * ggidlg); (*(here->BSIM4v4BPspPtr) += m * (ggidlg + ggidld + ggidlb)); (*(here->BSIM4v4BPbpPtr) -= m * ggidlb); /* stamp gisl */ (*(here->BSIM4v4SPdpPtr) -= m * (ggisls + ggislg + ggislb)); (*(here->BSIM4v4SPgpPtr) += m * ggislg); (*(here->BSIM4v4SPspPtr) += m * ggisls); (*(here->BSIM4v4SPbpPtr) += m * ggislb); (*(here->BSIM4v4BPdpPtr) += m * (ggislg + ggisls + ggislb)); (*(here->BSIM4v4BPgpPtr) -= m * ggislg); (*(here->BSIM4v4BPspPtr) -= m * ggisls); (*(here->BSIM4v4BPbpPtr) -= m * ggislb); if (here->BSIM4v4rbodyMod) { (*(here->BSIM4v4DPdbPtr) += m * (gcdbdb - here->BSIM4v4gbd)); (*(here->BSIM4v4SPsbPtr) -= m * (here->BSIM4v4gbs - gcsbsb)); (*(here->BSIM4v4DBdpPtr) += m * (gcdbdb - here->BSIM4v4gbd)); (*(here->BSIM4v4DBdbPtr) += m * (here->BSIM4v4gbd - gcdbdb + here->BSIM4v4grbpd + here->BSIM4v4grbdb)); (*(here->BSIM4v4DBbpPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4DBbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BPdbPtr) -= m * here->BSIM4v4grbpd); (*(here->BSIM4v4BPbPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BPsbPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4BPbpPtr) += m * (here->BSIM4v4grbpd + here->BSIM4v4grbps + here->BSIM4v4grbpb)); /* WDLiu: (gcbbb - here->BSIM4v4gbbs) already added to BPbpPtr */ (*(here->BSIM4v4SBspPtr) += m * (gcsbsb - here->BSIM4v4gbs)); (*(here->BSIM4v4SBbpPtr) -= m * here->BSIM4v4grbps); (*(here->BSIM4v4SBbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4SBsbPtr) += m * (here->BSIM4v4gbs - gcsbsb + here->BSIM4v4grbps + here->BSIM4v4grbsb)); (*(here->BSIM4v4BdbPtr) -= m * here->BSIM4v4grbdb); (*(here->BSIM4v4BbpPtr) -= m * here->BSIM4v4grbpb); (*(here->BSIM4v4BsbPtr) -= m * here->BSIM4v4grbsb); (*(here->BSIM4v4BbPtr) += m * (here->BSIM4v4grbsb + here->BSIM4v4grbdb + here->BSIM4v4grbpb)); } if (here->BSIM4v4trnqsMod) { (*(here->BSIM4v4QqPtr) += m * (gqdef + here->BSIM4v4gtau)); (*(here->BSIM4v4QgpPtr) += m * (ggtg - gcqgb)); (*(here->BSIM4v4QdpPtr) += m * (ggtd - gcqdb)); (*(here->BSIM4v4QspPtr) += m * (ggts - gcqsb)); (*(here->BSIM4v4QbpPtr) += m * (ggtb - gcqbb)); (*(here->BSIM4v4DPqPtr) += m * dxpart * here->BSIM4v4gtau); (*(here->BSIM4v4SPqPtr) += m * sxpart * here->BSIM4v4gtau); (*(here->BSIM4v4GPqPtr) -= m * here->BSIM4v4gtau); } line1000: ; } /* End of MOSFET Instance */ } /* End of Model Instance */ return(OK); } /* function to compute poly depletion effect */ int BSIM4v4polyDepletion( double phi, double ngate, double coxe, double Vgs, double *Vgs_eff, double *dVgs_eff_dVg) { double T1, T2, T3, T4, T5, T6, T7, T8; /* Poly Gate Si Depletion Effect */ if ((ngate > 1.0e18) && (ngate < 1.0e25) && (Vgs > phi)) { T1 = 1.0e6 * CHARGE * EPSSI * ngate / (coxe * coxe); T8 = Vgs - phi; T4 = sqrt(1.0 + 2.0 * T8 / T1); T2 = 2.0 * T8 / (T4 + 1.0); T3 = 0.5 * T2 * T2 / T1; /* T3 = Vpoly */ T7 = 1.12 - T3 - 0.05; T6 = sqrt(T7 * T7 + 0.224); T5 = 1.12 - 0.5 * (T7 + T6); *Vgs_eff = Vgs - T5; *dVgs_eff_dVg = 1.0 - (0.5 - 0.5 / T4) * (1.0 + T7 / T6); } else { *Vgs_eff = Vgs; *dVgs_eff_dVg = 1.0; } return(0); } ngspice-26/src/spicelib/devices/bsim4v4/b4v4ask.c0000644000265600020320000003054212264261473021152 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4ask.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. * Modified by Xuemei Xi, 04/06/2001. * Modified by Xuemei Xi, 10/05/2001. * Modified by Xuemei Xi, 05/09/2003. **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4ask( CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { BSIM4v4instance *here = (BSIM4v4instance*)inst; NG_IGNORE(select); switch(which) { case BSIM4v4_L: value->rValue = here->BSIM4v4l; return(OK); case BSIM4v4_W: value->rValue = here->BSIM4v4w; return(OK); case BSIM4v4_M: value->rValue = here->BSIM4v4m; return(OK); case BSIM4v4_NF: value->rValue = here->BSIM4v4nf; return(OK); case BSIM4v4_MIN: value->iValue = here->BSIM4v4min; return(OK); case BSIM4v4_AS: value->rValue = here->BSIM4v4sourceArea; return(OK); case BSIM4v4_AD: value->rValue = here->BSIM4v4drainArea; return(OK); case BSIM4v4_PS: value->rValue = here->BSIM4v4sourcePerimeter; return(OK); case BSIM4v4_PD: value->rValue = here->BSIM4v4drainPerimeter; return(OK); case BSIM4v4_NRS: value->rValue = here->BSIM4v4sourceSquares; return(OK); case BSIM4v4_NRD: value->rValue = here->BSIM4v4drainSquares; return(OK); case BSIM4v4_OFF: value->rValue = here->BSIM4v4off; return(OK); case BSIM4v4_SA: value->rValue = here->BSIM4v4sa ; return(OK); case BSIM4v4_SB: value->rValue = here->BSIM4v4sb ; return(OK); case BSIM4v4_SD: value->rValue = here->BSIM4v4sd ; return(OK); case BSIM4v4_RBSB: value->rValue = here->BSIM4v4rbsb; return(OK); case BSIM4v4_RBDB: value->rValue = here->BSIM4v4rbdb; return(OK); case BSIM4v4_RBPB: value->rValue = here->BSIM4v4rbpb; return(OK); case BSIM4v4_RBPS: value->rValue = here->BSIM4v4rbps; return(OK); case BSIM4v4_RBPD: value->rValue = here->BSIM4v4rbpd; return(OK); case BSIM4v4_TRNQSMOD: value->iValue = here->BSIM4v4trnqsMod; return(OK); case BSIM4v4_ACNQSMOD: value->iValue = here->BSIM4v4acnqsMod; return(OK); case BSIM4v4_RBODYMOD: value->iValue = here->BSIM4v4rbodyMod; return(OK); case BSIM4v4_RGATEMOD: value->iValue = here->BSIM4v4rgateMod; return(OK); case BSIM4v4_GEOMOD: value->iValue = here->BSIM4v4geoMod; return(OK); case BSIM4v4_RGEOMOD: value->iValue = here->BSIM4v4rgeoMod; return(OK); case BSIM4v4_IC_VDS: value->rValue = here->BSIM4v4icVDS; return(OK); case BSIM4v4_IC_VGS: value->rValue = here->BSIM4v4icVGS; return(OK); case BSIM4v4_IC_VBS: value->rValue = here->BSIM4v4icVBS; return(OK); case BSIM4v4_DNODE: value->iValue = here->BSIM4v4dNode; return(OK); case BSIM4v4_GNODEEXT: value->iValue = here->BSIM4v4gNodeExt; return(OK); case BSIM4v4_SNODE: value->iValue = here->BSIM4v4sNode; return(OK); case BSIM4v4_BNODE: value->iValue = here->BSIM4v4bNode; return(OK); case BSIM4v4_DNODEPRIME: value->iValue = here->BSIM4v4dNodePrime; return(OK); case BSIM4v4_GNODEPRIME: value->iValue = here->BSIM4v4gNodePrime; return(OK); case BSIM4v4_GNODEMID: value->iValue = here->BSIM4v4gNodeMid; return(OK); case BSIM4v4_SNODEPRIME: value->iValue = here->BSIM4v4sNodePrime; return(OK); case BSIM4v4_DBNODE: value->iValue = here->BSIM4v4dbNode; return(OK); case BSIM4v4_BNODEPRIME: value->iValue = here->BSIM4v4bNodePrime; return(OK); case BSIM4v4_SBNODE: value->iValue = here->BSIM4v4sbNode; return(OK); case BSIM4v4_SOURCECONDUCT: value->rValue = here->BSIM4v4sourceConductance; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_DRAINCONDUCT: value->rValue = here->BSIM4v4drainConductance; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_VBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vbd); return(OK); case BSIM4v4_VBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vbs); return(OK); case BSIM4v4_VGS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vgs); return(OK); case BSIM4v4_VDS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4vds); return(OK); case BSIM4v4_CD: value->rValue = here->BSIM4v4cd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBS: value->rValue = here->BSIM4v4cbs; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBD: value->rValue = here->BSIM4v4cbd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CSUB: value->rValue = here->BSIM4v4csub; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_QINV: value->rValue = here-> BSIM4v4qinv; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGIDL: value->rValue = here->BSIM4v4Igidl; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGISL: value->rValue = here->BSIM4v4Igisl; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGS: value->rValue = here->BSIM4v4Igs; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGD: value->rValue = here->BSIM4v4Igd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGB: value->rValue = here->BSIM4v4Igb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGCS: value->rValue = here->BSIM4v4Igcs; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_IGCD: value->rValue = here->BSIM4v4Igcd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_GM: value->rValue = here->BSIM4v4gm; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_GDS: value->rValue = here->BSIM4v4gds; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_GMBS: value->rValue = here->BSIM4v4gmbs; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_GBD: value->rValue = here->BSIM4v4gbd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_GBS: value->rValue = here->BSIM4v4gbs; value->rValue *= here->BSIM4v4m; return(OK); /* case BSIM4v4_QB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qb); return(OK); */ case BSIM4v4_CQB: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqb); return(OK); /* case BSIM4v4_QG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qg); return(OK); */ case BSIM4v4_CQG: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqg); return(OK); /* case BSIM4v4_QD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qd); return(OK); */ case BSIM4v4_CQD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4cqd); return(OK); /* case BSIM4v4_QS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qs); return(OK); */ case BSIM4v4_QB: value->rValue = here->BSIM4v4qbulk; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_QG: value->rValue = here->BSIM4v4qgate; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_QS: value->rValue = here->BSIM4v4qsrc; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_QD: value->rValue = here->BSIM4v4qdrn; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CGGB: value->rValue = here->BSIM4v4cggb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CGDB: value->rValue = here->BSIM4v4cgdb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CGSB: value->rValue = here->BSIM4v4cgsb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CDGB: value->rValue = here->BSIM4v4cdgb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CDDB: value->rValue = here->BSIM4v4cddb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CDSB: value->rValue = here->BSIM4v4cdsb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBGB: value->rValue = here->BSIM4v4cbgb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBDB: value->rValue = here->BSIM4v4cbdb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBSB: value->rValue = here->BSIM4v4cbsb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CSGB: value->rValue = here->BSIM4v4csgb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CSDB: value->rValue = here->BSIM4v4csdb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CSSB: value->rValue = here->BSIM4v4cssb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CGBB: value->rValue = here->BSIM4v4cgbb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CDBB: value->rValue = here->BSIM4v4cdbb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CSBB: value->rValue = here->BSIM4v4csbb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CBBB: value->rValue = here->BSIM4v4cbbb; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CAPBD: value->rValue = here->BSIM4v4capbd; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_CAPBS: value->rValue = here->BSIM4v4capbs; value->rValue *= here->BSIM4v4m; return(OK); case BSIM4v4_VON: value->rValue = here->BSIM4v4von; return(OK); case BSIM4v4_VDSAT: value->rValue = here->BSIM4v4vdsat; return(OK); case BSIM4v4_QBS: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qbs); return(OK); case BSIM4v4_QBD: value->rValue = *(ckt->CKTstate0 + here->BSIM4v4qbd); return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/bsim4v4/Makefile.am0000644000265600020320000000113712264261473021562 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libbsim4v4.la libbsim4v4_la_SOURCES = \ b4v4.c \ b4v4acld.c \ b4v4ask.c \ b4v4check.c \ b4v4cvtest.c \ b4v4del.c \ b4v4dest.c \ b4v4geo.c \ b4v4getic.c \ b4v4ld.c \ b4v4mask.c \ b4v4mdel.c \ b4v4mpar.c \ b4v4noi.c \ b4v4par.c \ b4v4pzld.c \ b4v4set.c \ b4v4temp.c \ b4v4trunc.c \ bsim4v4def.h \ bsim4v4ext.h \ bsim4v4init.c \ bsim4v4init.h \ bsim4v4itf.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE ngspice-26/src/spicelib/devices/bsim4v4/bsim4v4init.c0000644000265600020320000000470112264261473022046 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "bsim4v4itf.h" #include "bsim4v4ext.h" #include "bsim4v4init.h" SPICEdev BSIM4v4info = { { "BSIM4v4", "Berkeley Short Channel IGFET Model-4", &BSIM4v4nSize, &BSIM4v4nSize, BSIM4v4names, &BSIM4v4pTSize, BSIM4v4pTable, &BSIM4v4mPTSize, BSIM4v4mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, BSIM4v4param, /* DEVparam */ BSIM4v4mParam, /* DEVmodParam */ BSIM4v4load, /* DEVload */ BSIM4v4setup, /* DEVsetup */ BSIM4v4unsetup, /* DEVunsetup */ BSIM4v4setup, /* DEVpzSetup */ BSIM4v4temp, /* DEVtemperature */ BSIM4v4trunc, /* DEVtrunc */ NULL, /* DEVfindBranch */ BSIM4v4acLoad, /* DEVacLoad */ NULL, /* DEVaccept */ BSIM4v4destroy, /* DEVdestroy */ BSIM4v4mDelete, /* DEVmodDelete */ BSIM4v4delete, /* DEVdelete */ BSIM4v4getic, /* DEVsetic */ BSIM4v4ask, /* DEVask */ BSIM4v4mAsk, /* DEVmodAsk */ BSIM4v4pzLoad, /* DEVpzLoad */ BSIM4v4convTest, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ BSIM4v4noise, /* DEVnoise */ NULL, /* DEVsoaCheck */ #ifdef CIDER NULL, /* DEVdump */ NULL, /* DEVacct */ #endif &BSIM4v4iSize, /* DEVinstSize */ &BSIM4v4mSize /* DEVmodSize */ }; SPICEdev * get_bsim4v4_info(void) { return &BSIM4v4info; } ngspice-26/src/spicelib/devices/bsim4v4/Makefile.in0000644000265600020320000004354512264261536021604 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/bsim4v4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libbsim4v4_la_LIBADD = am_libbsim4v4_la_OBJECTS = b4v4.lo b4v4acld.lo b4v4ask.lo b4v4check.lo \ b4v4cvtest.lo b4v4del.lo b4v4dest.lo b4v4geo.lo b4v4getic.lo \ b4v4ld.lo b4v4mask.lo b4v4mdel.lo b4v4mpar.lo b4v4noi.lo \ b4v4par.lo b4v4pzld.lo b4v4set.lo b4v4temp.lo b4v4trunc.lo \ bsim4v4init.lo libbsim4v4_la_OBJECTS = $(am_libbsim4v4_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libbsim4v4_la_SOURCES) DIST_SOURCES = $(libbsim4v4_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libbsim4v4.la libbsim4v4_la_SOURCES = \ b4v4.c \ b4v4acld.c \ b4v4ask.c \ b4v4check.c \ b4v4cvtest.c \ b4v4del.c \ b4v4dest.c \ b4v4geo.c \ b4v4getic.c \ b4v4ld.c \ b4v4mask.c \ b4v4mdel.c \ b4v4mpar.c \ b4v4noi.c \ b4v4par.c \ b4v4pzld.c \ b4v4set.c \ b4v4temp.c \ b4v4trunc.c \ bsim4v4def.h \ bsim4v4ext.h \ bsim4v4init.c \ bsim4v4init.h \ bsim4v4itf.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in EXTRA_DIST = B4TERMS_OF_USE all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/bsim4v4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libbsim4v4.la: $(libbsim4v4_la_OBJECTS) $(libbsim4v4_la_DEPENDENCIES) $(EXTRA_libbsim4v4_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libbsim4v4_la_OBJECTS) $(libbsim4v4_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4check.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4cvtest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4geo.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4getic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4ld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4mask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4noi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4par.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/b4v4trunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bsim4v4init.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/bsim4v4/b4v4mdel.c0000644000265600020320000000236112264261473021313 0ustar andreasadmin/**** BSIM4.4.0 Released by Xuemei (Jane) Xi 03/04/2004 ****/ /********** * Copyright 2004 Regents of the University of California. All rights reserved. * File: b4mdel.c of BSIM4.4.0. * Author: 2000 Weidong Liu * Authors: 2001- Xuemei Xi, Jin He, Kanyu Cao, Mohan Dunga, Mansun Chan, Ali Niknejad, Chenming Hu. * Project Director: Prof. Chenming Hu. **********/ #include "ngspice/ngspice.h" #include "bsim4v4def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int BSIM4v4mDelete( GENmodel **inModel, IFuid modname, GENmodel *kill) { BSIM4v4model **model = (BSIM4v4model**)inModel; BSIM4v4model *modfast = (BSIM4v4model*)kill; BSIM4v4instance *here; BSIM4v4instance *prev = NULL; BSIM4v4model **oldmod; oldmod = model; for (; *model ; model = &((*model)->BSIM4v4nextModel)) { if ((*model)->BSIM4v4modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->BSIM4v4nextModel; /* cut deleted device out of list */ for (here = (*model)->BSIM4v4instances; here; here = here->BSIM4v4nextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/bsim4v4/bsim4v4itf.h0000644000265600020320000000037512264261473021675 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu. Author: 2001- Xuemei Xi File: bsim4itf.h **********/ #ifndef DEV_BSIM4V4 #define DEV_BSIM4V4 SPICEdev *get_bsim4v4_info(void); #endif ngspice-26/src/spicelib/devices/bsim4v4/B4TERMS_OF_USE0000644000265600020320000000255212264261473021633 0ustar andreasadmin The terms under which the software is provided are as the following. Software is distributed as is, completely without warranty or service support. The University of California and its employees are not liable for the condition or performance of the software. The University owns the copyright but shall not be liable for any infringement of copyright or other proprietary rights brought by third parties against the users of the software. The University of California hereby disclaims all implied warranties. The University of California grants the users the right to modify, copy, and redistribute the software and documentation, both within the user's organization and externally, subject to the following restrictions: 1. The users agree not to charge for the University of California code itself but may charge for additions, extensions, or support. 2. In any product based on the software, the users agree to acknowledge the UC Berkeley BSIM Research Group that developed the software. This acknowledgment shall appear in the product documentation. 3. The users agree to obey all U.S. Government restrictions governing redistribution or export of the software. 4. The users agree to reproduce any copyright notice which appears on the software on any copy or modification of such made available to others. Chenming Hu, and Jane Xuemei Xi April. 2003 ngspice-26/src/spicelib/devices/bsim4v4/bsim4v4ext.h0000644000265600020320000000270312264261473021710 0ustar andreasadmin/********** Copyright 2004 Regents of the University of California. All rights reserved. Author: 2000 Weidong Liu Author: 2001- Xuemei Xi File: bsim4ext.h **********/ extern int BSIM4v4acLoad(GENmodel *,CKTcircuit*); extern int BSIM4v4ask(CKTcircuit *,GENinstance*,int,IFvalue*,IFvalue*); extern int BSIM4v4convTest(GENmodel *,CKTcircuit*); extern int BSIM4v4delete(GENmodel*,IFuid,GENinstance**); extern void BSIM4v4destroy(GENmodel**); extern int BSIM4v4getic(GENmodel*,CKTcircuit*); extern int BSIM4v4load(GENmodel*,CKTcircuit*); extern int BSIM4v4mAsk(CKTcircuit*,GENmodel *,int, IFvalue*); extern int BSIM4v4mDelete(GENmodel**,IFuid,GENmodel*); extern int BSIM4v4mParam(int,IFvalue*,GENmodel*); extern void BSIM4v4mosCap(CKTcircuit*, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*, double*); extern int BSIM4v4param(int,IFvalue*,GENinstance*,IFvalue*); extern int BSIM4v4pzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int BSIM4v4setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int BSIM4v4temp(GENmodel*,CKTcircuit*); extern int BSIM4v4trunc(GENmodel*,CKTcircuit*,double*); extern int BSIM4v4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int BSIM4v4unsetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/dev.h0000644000265600020320000000050312264261473017161 0ustar andreasadmin#ifndef _DEV_H #define _DEV_H void spice_init_devices(void); void spice_destroy_devices(void); int num_devices(void); IFdevice **devices_ptr(void); SPICEdev **devices(void); #ifdef XSPICE int load_opus(char *); int DEVflag(int type); #endif #ifdef DEVLIB void load_alldevs(void); int load_dev(char *name); #endif #endif ngspice-26/src/spicelib/devices/dev.c0000644000265600020320000003233012264261473017157 0ustar andreasadmin/* NG-SPICE -- An electrical circuit simulator * * Copyright (c) 1990 University of California * Copyright (c) 2000 Arno W. Peters * * Permission to use, copy, modify, and distribute this software and * its documentation without fee, and without a written agreement is * hereby granted, provided that the above copyright notice, this * paragraph and the following three paragraphs appear in all copies. * * This software program and documentation are copyrighted by their * authors. The software program and documentation are supplied "as * is", without any accompanying services from the authors. The * authors do not warrant that the operation of the program will be * uninterrupted or error-free. The end-user understands that the * program was developed for research purposes and is advised not to * rely exclusively on the program for any reason. * * IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR DIRECT, * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING * LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS * DOCUMENTATION, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. THE AUTHORS SPECIFICALLY DISCLAIMS ANY * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE * SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE AUTHORS * HAVE NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, * ENHANCEMENTS, OR MODIFICATIONS. */ #include "ngspice/ngspice.h" #include "assert.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "dev.h" #include "ngspice/memory.h" /* to alloc, realloc devices*/ #ifdef XSPICE /*saj headers for xspice*/ #include /* for strcpy, strcat*/ #if (!defined HAS_WINGUI) && (!defined __MINGW32__) && (!defined _MSC_VER) #include /* to load libraries*/ typedef void * funptr_t; #else /* ifdef HAS_WINGUI */ #undef BOOLEAN #include typedef FARPROC funptr_t; void *dlopen (const char *, int); funptr_t dlsym (void *, const char *); int dlclose (void *); char *dlerror (void); #define RTLD_LAZY 1 /* lazy function call binding */ #define RTLD_NOW 2 /* immediate function call binding */ #define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible to other dlopen'ed objs */ static char errstr[128]; #endif /* ifndef HAS_WINGUI */ #include "ngspice/dllitf.h" /* the coreInfo Structure*/ #include "ngspice/evtudn.h" /*Use defined nodes */ Evt_Udn_Info_t **g_evt_udn_info = NULL; int g_evt_num_udn_types = 0; /*The digital node type */ extern Evt_Udn_Info_t idn_digital_info; int add_device(int n, SPICEdev **devs, int flag); int add_udn(int,Evt_Udn_Info_t **); /*saj*/ #endif #include "asrc/asrcitf.h" #include "bjt/bjtitf.h" #include "bsim1/bsim1itf.h" #include "bsim2/bsim2itf.h" #include "bsim3/bsim3itf.h" #include "bsim3v0/bsim3v0itf.h" #include "bsim3v1/bsim3v1itf.h" #include "bsim3v32/bsim3v32itf.h" #include "bsim4/bsim4itf.h" #include "bsim4v4/bsim4v4itf.h" #include "bsim4v5/bsim4v5itf.h" #include "bsim4v6/bsim4v6itf.h" #include "bsim3soi_pd/b3soipditf.h" #include "bsim3soi_fd/b3soifditf.h" #include "bsim3soi_dd/b3soidditf.h" #include "bsimsoi/b4soiitf.h" #include "cap/capitf.h" #include "cccs/cccsitf.h" #include "ccvs/ccvsitf.h" #include "csw/cswitf.h" #include "dio/dioitf.h" #include "hfet1/hfetitf.h" #include "hfet2/hfet2itf.h" #include "hisim2/hsm2itf.h" #include "hisimhv1/hsmhvitf.h" #include "ind/inditf.h" #include "isrc/isrcitf.h" #include "jfet/jfetitf.h" #include "jfet2/jfet2itf.h" #include "ltra/ltraitf.h" #include "mes/mesitf.h" #include "mesa/mesaitf.h" #include "mos1/mos1itf.h" #include "mos2/mos2itf.h" #include "mos3/mos3itf.h" #include "mos6/mos6itf.h" #include "mos9/mos9itf.h" #include "cpl/cplitf.h" #include "res/resitf.h" #include "soi3/soi3itf.h" #include "sw/switf.h" #include "tra/traitf.h" #include "txl/txlitf.h" #include "urc/urcitf.h" #include "vbic/vbicitf.h" #include "vccs/vccsitf.h" #include "vcvs/vcvsitf.h" #include "vsrc/vsrcitf.h" #ifdef ADMS #include "adms/hicum0/hicum0itf.h" #include "adms/hicum2/hicum2itf.h" #include "adms/mextram/bjt504titf.h" #include "adms/ekv/ekvitf.h" #include "adms/psp102/psp102itf.h" #endif #ifdef CIDER /* Numerical devices (Cider integration) */ #include "nbjt/nbjtitf.h" #include "nbjt2/nbjt2itf.h" #include "numd/numditf.h" #include "numd2/numd2itf.h" #include "numos/numositf.h" #endif #ifdef NDEV #include "ndev/ndevitf.h" #endif /*saj in xspice the DEVices size can be varied so DEVNUM is an int*/ #if defined XSPICE static int DEVNUM = 63; #else #define DEVNUM 63 #endif /*Make this dynamic for later attempt to make all devices dynamic*/ SPICEdev **DEVices=NULL; /*Flag to indicate that device type it is, *0 = normal spice device *1 = xspice device */ #ifdef XSPICE int *DEVicesfl=NULL; int DEVflag(int type){ if(type < DEVNUM && type >= 0) return DEVicesfl[type]; else return -1; } #endif void spice_destroy_devices(void) { #ifdef XSPICE tfree(g_evt_udn_info); tfree(DEVicesfl); #endif tfree(DEVices); } void spice_init_devices(void) { #ifdef XSPICE /*Initilise the structs and add digital node type */ g_evt_udn_info = TMALLOC(Evt_Udn_Info_t *, 1); g_evt_num_udn_types = 1; g_evt_udn_info[0] = &idn_digital_info; DEVicesfl = TMALLOC(int, DEVNUM); /* tmalloc should automatically zero the array! */ #endif DEVices = TMALLOC(SPICEdev *, DEVNUM); /* URC device MUST precede both resistors and capacitors */ DEVices[ 0] = get_urc_info(); DEVices[ 1] = get_asrc_info(); DEVices[ 2] = get_bjt_info(); DEVices[ 3] = get_bsim1_info(); DEVices[ 4] = get_bsim2_info(); DEVices[ 5] = get_bsim3_info(); DEVices[ 6] = get_bsim3v0_info(); DEVices[ 7] = get_bsim3v1_info(); DEVices[ 8] = get_bsim3v32_info(); DEVices[ 9] = get_b4soi_info(); DEVices[10] = get_bsim4_info(); DEVices[11] = get_bsim4v4_info(); DEVices[12] = get_bsim4v5_info(); DEVices[13] = get_bsim4v6_info(); DEVices[14] = get_b3soipd_info(); DEVices[15] = get_b3soifd_info(); DEVices[16] = get_b3soidd_info(); DEVices[17] = get_cap_info(); DEVices[18] = get_cccs_info(); DEVices[19] = get_ccvs_info(); DEVices[20] = get_cpl_info(); DEVices[21] = get_csw_info(); DEVices[22] = get_dio_info(); DEVices[23] = get_hfeta_info(); DEVices[24] = get_hfet2_info(); DEVices[25] = get_hsm2_info(); DEVices[26] = get_hsmhv_info(); DEVices[27] = get_ind_info(); DEVices[28] = get_mut_info(); DEVices[29] = get_isrc_info(); DEVices[30] = get_jfet_info(); DEVices[31] = get_jfet2_info(); DEVices[32] = get_ltra_info(); DEVices[33] = get_mes_info(); DEVices[34] = get_mesa_info(); DEVices[35] = get_mos1_info(); DEVices[36] = get_mos2_info(); DEVices[37] = get_mos3_info(); DEVices[38] = get_mos6_info(); DEVices[39] = get_mos9_info(); DEVices[40] = get_res_info(); DEVices[41] = get_soi3_info(); DEVices[42] = get_sw_info(); DEVices[43] = get_tra_info(); DEVices[44] = get_txl_info(); DEVices[45] = get_vbic_info(); DEVices[46] = get_vccs_info(); DEVices[47] = get_vcvs_info(); DEVices[48] = get_vsrc_info(); #ifdef CIDER DEVices[49] = get_nbjt_info(); DEVices[50] = get_nbjt2_info(); DEVices[51] = get_numd_info(); DEVices[52] = get_numd2_info(); DEVices[53] = get_numos_info(); #else DEVices[49] = NULL; DEVices[50] = NULL; DEVices[51] = NULL; DEVices[52] = NULL; DEVices[53] = NULL; #endif #ifdef ADMS DEVices[54] = (SPICEdev*)get_hicum0_info(); DEVices[55] = (SPICEdev*)get_hicum2_info(); DEVices[56] = (SPICEdev*)get_bjt504t_info(); DEVices[57] = (SPICEdev*)get_ekv_info(); DEVices[58] = (SPICEdev*)get_psp102_info(); #else DEVices[54] = NULL; DEVices[55] = NULL; DEVices[56] = NULL; DEVices[57] = NULL; DEVices[58] = NULL; #endif #ifdef NDEV /* NDEV */ DEVices[59] = get_ndev_info(); #else DEVices[59] = NULL; #endif DEVices[60] = NULL; DEVices[61] = NULL; return; } int num_devices(void) { return DEVNUM; } IFdevice ** devices_ptr(void) { return (IFdevice **) DEVices; } SPICEdev ** devices(void) { return DEVices; } #ifdef DEVLIB /*not yet usable*/ #ifdef ADMS #define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v4", "bsim4v5", "bsim4v6", \ "bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", \ "cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", "mos2", "mos3", \ "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc", "hicum0", "hicum2", "bjt504t", "ekv", "psp102"} #else #define DEVICES_USED {"asrc", "bjt", "vbic", "bsim1", "bsim2", "bsim3", "bsim3v32", "bsim3v2", "bsim3v1", "bsim4", "bsim4v4", "bsim4v5", "bsim4v6", \ "bsim4soi", "bsim3soipd", "bsim3soifd", "bsim3soidd", "hisim2", "hisimhv1", \ "cap", "cccs", "ccvs", "csw", "dio", "hfet", "hfet2", "ind", "isrc", "jfet", "ltra", "mes", "mesa" ,"mos1", "mos2", "mos3", \ "mos6", "mos9", "res", "soi3", "sw", "tra", "urc", "vccs", "vcvs", "vsrc"} #endif int load_dev(char *name) { char *msg; char libname[50]; void *lib; funptr_t fetch; SPICEdev *device; strcpy(libname, "lib"); strcat(libname,name); strcat(libname,".so"); lib = dlopen(libname,RTLD_NOW); if(!lib){ msg = dlerror(); printf("%s\n", msg); return 1; } strcpy(libname, "get_"); strcat(libname,name); strcat(libname,"_info"); fetch = dlsym(lib,libname); if(!fetch){ msg = dlerror(); printf("%s\n", msg); return 1; } device = ((SPICEdev * (*)(void)) fetch) (); add_device(1,&device,0); return 0; } void load_alldevs(void){ char *devs[] = DEVICES_USED; int num = NUMELEMS(devs); int i; for(i=0; i< num;i++) load_dev(devs[i]); return; } #endif /*-------------------- XSPICE additions below ----------------------*/ #ifdef XSPICE #include "ngspice/mif.h" #include "ngspice/cm.h" #include "ngspice/cpextern.h" #include "ngspice/fteext.h" /* for ft_sim */ #include "ngspice/cktdefs.h" /* for DEVmaxnum */ static void relink(void) { /* * This replacement done by SDB on 6.11.2003 * * ft_sim->numDevices = num_devices(); * DEVmaxnum = num_devices(); */ ft_sim->numDevices = DEVNUM; DEVmaxnum = DEVNUM; ft_sim->devices = devices_ptr(); return; } int add_device(int n, SPICEdev **devs, int flag){ int i; DEVices = TREALLOC(SPICEdev *, DEVices, DEVNUM + n); DEVicesfl = TREALLOC(int, DEVicesfl, DEVNUM + n); for(i = 0; i < n;i++){ #ifdef TRACE printf("Added device: %s\n",devs[i]->DEVpublic.name); #endif DEVices[DEVNUM+i] = devs[i]; /* added by SDB on 6.20.2003 */ DEVices[DEVNUM+i]->DEVinstSize = &MIFiSize; DEVicesfl[DEVNUM+i] = flag; } DEVNUM += n; relink(); return 0; } int add_udn(int n,Evt_Udn_Info_t **udns){ int i; g_evt_udn_info = TREALLOC(Evt_Udn_Info_t *, g_evt_udn_info, g_evt_num_udn_types + n); for(i = 0; i < n;i++){ #ifdef TRACE printf("Added udn: %s\n",udns[i]->name); #endif g_evt_udn_info[g_evt_num_udn_types+i] = udns[i]; } g_evt_num_udn_types += n; return 0; } extern struct coreInfo_t coreInfo; int load_opus(char *name){ void *lib; const char *msg; int *num=NULL; struct coreInfo_t **core; SPICEdev **devs; Evt_Udn_Info_t **udns; funptr_t fetch; lib = dlopen(name,RTLD_NOW); if(!lib){ msg = dlerror(); printf("%s\n", msg); return 1; } fetch = dlsym(lib,"CMdevNum"); if(fetch){ num = ((int * (*)(void)) fetch) (); #ifdef TRACE printf("Got %u devices.\n",*num); #endif }else{ msg = dlerror(); printf("%s\n", msg); return 1; } fetch = dlsym(lib,"CMdevs"); if(fetch){ devs = ((SPICEdev ** (*)(void)) fetch) (); }else{ msg = dlerror(); printf("%s\n", msg); return 1; } fetch = dlsym(lib,"CMgetCoreItfPtr"); if(fetch){ core = ((struct coreInfo_t ** (*)(void)) fetch) (); *core = &coreInfo; }else{ msg = dlerror(); printf("%s\n", msg); return 1; } add_device(*num,devs,1); fetch = dlsym(lib,"CMudnNum"); if(fetch){ num = ((int * (*)(void)) fetch) (); #ifdef TRACE printf("Got %u udns.\n",*num); #endif }else{ msg = dlerror(); printf("%s\n", msg); return 1; } fetch = dlsym(lib,"CMudns"); if(fetch){ udns = ((Evt_Udn_Info_t ** (*)(void)) fetch) (); }else{ msg = dlerror(); printf("%s\n", msg); return 1; } add_udn(*num,udns); return 0; } #if defined(__MINGW32__) || defined(HAS_WINGUI) || defined(_MSC_VER) void *dlopen(const char *name,int type) { NG_IGNORE(type); return LoadLibrary(name); } funptr_t dlsym(void *hDll, const char *funcname) { return GetProcAddress(hDll, funcname); } char *dlerror(void) { LPVOID lpMsgBuf; FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS, NULL, GetLastError(), MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPTSTR) &lpMsgBuf, 0, NULL ); strcpy(errstr,lpMsgBuf); LocalFree(lpMsgBuf); return errstr; } #endif #endif /*-------------------- end of XSPICE additions ----------------------*/ ngspice-26/src/spicelib/devices/jfet/0000755000265600020320000000000012264261707017164 5ustar andreasadminngspice-26/src/spicelib/devices/jfet/jfetdefs.h0000644000265600020320000002425012264261473021132 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ #ifndef JFET #define JFET #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* structures used to describe Junction Field Effect Transistors */ /* information used to describe a single instance */ typedef struct sJFETinstance { struct sJFETmodel *JFETmodPtr; /* backpointer to model */ struct sJFETinstance *JFETnextInstance; /* pointer to next instance of * current model*/ IFuid JFETname; /* pointer to character string naming this instance */ int JFETstate; /* pointer to start of state vector for jfet */ int JFETdrainNode; /* number of drain node of jfet */ int JFETgateNode; /* number of gate node of jfet */ int JFETsourceNode; /* number of source node of jfet */ int JFETdrainPrimeNode; /* number of internal drain node of jfet */ int JFETsourcePrimeNode; /* number of internal source node of jfet */ double *JFETdrainDrainPrimePtr; /* pointer to sparse matrix at * (drain,drain prime) */ double *JFETgateDrainPrimePtr; /* pointer to sparse matrix at * (gate,drain prime) */ double *JFETgateSourcePrimePtr; /* pointer to sparse matrix at * (gate,source prime) */ double *JFETsourceSourcePrimePtr; /* pointer to sparse matrix at * (source,source prime) */ double *JFETdrainPrimeDrainPtr; /* pointer to sparse matrix at * (drain prime,drain) */ double *JFETdrainPrimeGatePtr; /* pointer to sparse matrix at * (drain prime,gate) */ double *JFETdrainPrimeSourcePrimePtr; /* pointer to sparse matrix * (drain prime,source prime) */ double *JFETsourcePrimeGatePtr; /* pointer to sparse matrix at * (source prime,gate) */ double *JFETsourcePrimeSourcePtr; /* pointer to sparse matrix at * (source prime,source) */ double *JFETsourcePrimeDrainPrimePtr; /* pointer to sparse matrix * (source prime,drain prime) */ double *JFETdrainDrainPtr; /* pointer to sparse matrix at * (drain,drain) */ double *JFETgateGatePtr; /* pointer to sparse matrix at * (gate,gate) */ double *JFETsourceSourcePtr; /* pointer to sparse matrix at * (source,source) */ double *JFETdrainPrimeDrainPrimePtr; /* pointer to sparse matrix * (drain prime,drain prime) */ double *JFETsourcePrimeSourcePrimePtr; /* pointer to sparse matrix * (source prime,source prime) */ int JFETmode; /* distortion analysis Taylor coeffs. */ /* * naming convention: * x = vgs * y = vds * cdr = cdrain */ #define JFETNDCOEFFS 21 #ifndef NODISTO double JFETdCoeffs[JFETNDCOEFFS]; #else /* NODISTO */ double *JFETdCoeffs; #endif /* NODISTO */ #ifndef CONFIG #define cdr_x JFETdCoeffs[0] #define cdr_y JFETdCoeffs[1] #define cdr_x2 JFETdCoeffs[2] #define cdr_y2 JFETdCoeffs[3] #define cdr_xy JFETdCoeffs[4] #define cdr_x3 JFETdCoeffs[5] #define cdr_y3 JFETdCoeffs[6] #define cdr_x2y JFETdCoeffs[7] #define cdr_xy2 JFETdCoeffs[8] #define ggs1 JFETdCoeffs[9] #define ggd1 JFETdCoeffs[10] #define ggs2 JFETdCoeffs[11] #define ggd2 JFETdCoeffs[12] #define ggs3 JFETdCoeffs[13] #define ggd3 JFETdCoeffs[14] #define capgs1 JFETdCoeffs[15] #define capgd1 JFETdCoeffs[16] #define capgs2 JFETdCoeffs[17] #define capgd2 JFETdCoeffs[18] #define capgs3 JFETdCoeffs[19] #define capgd3 JFETdCoeffs[20] #endif /* indices to an array of JFET noise sources */ #define JFETRDNOIZ 0 #define JFETRSNOIZ 1 #define JFETIDNOIZ 2 #define JFETFLNOIZ 3 #define JFETTOTNOIZ 4 #define JFETNSRCS 5 #ifndef NONOISE double JFETnVar[NSTATVARS][JFETNSRCS]; #else /* NONOISE */ double **JFETnVar; #endif /* NONOISE */ unsigned JFEToff :1; /* 'off' flag for jfet */ unsigned JFETareaGiven : 1; /* flag to indicate area was specified */ unsigned JFETmGiven : 1; /* flag to indicate parallel multiplier given */ unsigned JFETicVDSGiven : 1; /* initial condition given flag for V D-S*/ unsigned JFETicVGSGiven : 1; /* initial condition given flag for V G-S*/ unsigned JFETtempGiven : 1; /* flag to indicate instance temp given */ unsigned JFETdtempGiven : 1; /* flag to indicate instance dtemp given */ double JFETarea; /* area factor for the jfet */ double JFETm; /* Parallel multiplier */ double JFETicVDS; /* initial condition voltage D-S*/ double JFETicVGS; /* initial condition voltage G-S*/ double JFETtemp; /* operating temperature */ double JFETdtemp; /* instance temperature difference */ double JFETtSatCur; /* temperature adjusted saturation current */ double JFETtGatePot; /* temperature adjusted gate potential */ double JFETtCGS; /* temperature corrected G-S capacitance */ double JFETtCGD; /* temperature corrected G-D capacitance */ double JFETcorDepCap; /* joining point of the fwd bias dep. cap eq.s */ double JFETvcrit; /* critical voltage for the instance */ double JFETf1; /* coefficient of capacitance polynomial exp */ double JFETtThreshold; /* temperature adjusted threshold voltage */ double JFETtBeta; /* temperature adjusted beta */ } JFETinstance ; #define JFETvgs JFETstate #define JFETvgd JFETstate+1 #define JFETcg JFETstate+2 #define JFETcd JFETstate+3 #define JFETcgd JFETstate+4 #define JFETgm JFETstate+5 #define JFETgds JFETstate+6 #define JFETggs JFETstate+7 #define JFETggd JFETstate+8 #define JFETqgs JFETstate+9 #define JFETcqgs JFETstate+10 #define JFETqgd JFETstate+11 #define JFETcqgd JFETstate+12 /* per model data */ typedef struct sJFETmodel { /* model structure for a jfet */ int JFETmodType; /* type index of this device type */ struct sJFETmodel *JFETnextModel; /* pointer to next possible model in * linked list */ JFETinstance * JFETinstances; /* pointer to list of instances * that have this model */ IFuid JFETmodName; /* pointer to character string naming this model */ int JFETtype; double JFETthreshold; double JFETbeta; double JFETlModulation; double JFETdrainResist; double JFETsourceResist; double JFETcapGS; double JFETcapGD; double JFETgatePotential; double JFETgateSatCurrent; double JFETdepletionCapCoeff; double JFETfNcoef; double JFETfNexp; int JFETnlev; double JFETgdsnoi; double JFETdrainConduct; double JFETsourceConduct; double JFETf2; double JFETf3; /* Modification for Sydney University JFET model */ double JFETb; /* doping profile parameter */ double JFETbFac; /* internal derived doping profile parameter */ /* end Sydney University mod */ double JFETtnom; /* temperature at which parameters were measured */ double JFETtcv; double JFETbex; unsigned JFETthresholdGiven : 1; unsigned JFETbetaGiven : 1; unsigned JFETlModulationGiven : 1; unsigned JFETdrainResistGiven : 1; unsigned JFETsourceResistGiven : 1; unsigned JFETcapGSGiven : 1; unsigned JFETcapGDGiven : 1; unsigned JFETgatePotentialGiven : 1; unsigned JFETgateSatCurrentGiven : 1; unsigned JFETdepletionCapCoeffGiven : 1; /* Modification for Sydney University JFET model */ unsigned JFETbGiven : 1; /* end Sydney University mod */ unsigned JFETtnomGiven : 1; /* user specified Tnom for model */ unsigned JFETfNcoefGiven : 1; unsigned JFETfNexpGiven : 1; unsigned JFETnlevGiven : 1; unsigned JFETgdsnoiGiven : 1; unsigned JFETtcvGiven : 1; unsigned JFETbexGiven : 1; } JFETmodel; #ifndef NJF #define NJF 1 #define PJF -1 #endif /*NJF*/ /* device parameters */ #define JFET_AREA 1 #define JFET_IC_VDS 2 #define JFET_IC_VGS 3 #define JFET_IC 4 #define JFET_OFF 5 #define JFET_TEMP 6 #define JFET_DTEMP 7 #define JFET_M 8 /* model parameters */ #define JFET_MOD_VTO 101 #define JFET_MOD_BETA 102 #define JFET_MOD_LAMBDA 103 #define JFET_MOD_RD 104 #define JFET_MOD_RS 105 #define JFET_MOD_CGS 106 #define JFET_MOD_CGD 107 #define JFET_MOD_PB 108 #define JFET_MOD_IS 109 #define JFET_MOD_FC 110 #define JFET_MOD_NJF 111 #define JFET_MOD_PJF 112 #define JFET_MOD_TNOM 113 #define JFET_MOD_KF 114 #define JFET_MOD_AF 115 /* Modification for Sydney University JFET model */ #define JFET_MOD_B 116 /* end Sydney University mod */ #define JFET_MOD_TCV 117 #define JFET_MOD_BEX 118 #define JFET_MOD_NLEV 119 #define JFET_MOD_GDSNOI 120 /* device questions */ #define JFET_DRAINNODE 301 #define JFET_GATENODE 302 #define JFET_SOURCENODE 303 #define JFET_DRAINPRIMENODE 304 #define JFET_SOURCEPRIMENODE 305 #define JFET_VGS 306 #define JFET_VGD 307 #define JFET_CG 308 #define JFET_CD 309 #define JFET_CGD 310 #define JFET_GM 311 #define JFET_GDS 312 #define JFET_GGS 313 #define JFET_GGD 314 #define JFET_QGS 315 #define JFET_CQGS 316 #define JFET_QGD 317 #define JFET_CQGD 318 #define JFET_CS 319 #define JFET_POWER 320 /* model questions */ #define JFET_MOD_DRAINCONDUCT 301 #define JFET_MOD_SOURCECONDUCT 302 #define JFET_MOD_DEPLETIONCAP 303 #define JFET_MOD_VCRIT 304 #define JFET_MOD_TYPE 305 /* function definitions */ #include "jfetext.h" #endif /*JFET*/ ngspice-26/src/spicelib/devices/jfet/jfetdest.c0000644000265600020320000000141012264261473021134 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "jfetdefs.h" #include "ngspice/suffix.h" void JFETdestroy(GENmodel **inModel) { JFETmodel **model = (JFETmodel**)inModel; JFETinstance *here; JFETinstance *prev = NULL; JFETmodel *mod = *model; JFETmodel *oldmod = NULL; for( ; mod ; mod = mod->JFETnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->JFETinstances ; here ; here = here->JFETnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/jfet/jfetacld.c0000644000265600020320000000537112264261473021112 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETacLoad(GENmodel *inModel, CKTcircuit *ckt) { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->JFETnextModel ) { for( here = model->JFETinstances; here != NULL; here = here->JFETnextInstance) { gdpr=model->JFETdrainConduct * here->JFETarea; gspr=model->JFETsourceConduct * here->JFETarea; gm= *(ckt->CKTstate0 + here->JFETgm) ; gds= *(ckt->CKTstate0 + here->JFETgds) ; ggs= *(ckt->CKTstate0 + here->JFETggs) ; xgs= *(ckt->CKTstate0 + here->JFETqgs) * ckt->CKTomega ; ggd= *(ckt->CKTstate0 + here->JFETggd) ; xgd= *(ckt->CKTstate0 + here->JFETqgd) * ckt->CKTomega ; m = here->JFETm; *(here->JFETdrainDrainPtr ) += m * (gdpr); *(here->JFETgateGatePtr ) += m * (ggd+ggs); *(here->JFETgateGatePtr +1) += m * (xgd+xgs); *(here->JFETsourceSourcePtr ) += m * (gspr); *(here->JFETdrainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->JFETdrainPrimeDrainPrimePtr +1) += m * (xgd); *(here->JFETsourcePrimeSourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->JFETsourcePrimeSourcePrimePtr +1) += m * (xgs); *(here->JFETdrainDrainPrimePtr ) -= m * (gdpr); *(here->JFETgateDrainPrimePtr ) -= m * (ggd); *(here->JFETgateDrainPrimePtr +1) -= m * (xgd); *(here->JFETgateSourcePrimePtr ) -= m * (ggs); *(here->JFETgateSourcePrimePtr +1) -= m * (xgs); *(here->JFETsourceSourcePrimePtr ) -= m * (gspr); *(here->JFETdrainPrimeDrainPtr ) -= m * (gdpr); *(here->JFETdrainPrimeGatePtr ) += m * (-ggd+gm); *(here->JFETdrainPrimeGatePtr +1) -= m * (xgd); *(here->JFETdrainPrimeSourcePrimePtr ) += m * (-gds-gm); *(here->JFETsourcePrimeGatePtr ) += m * (-ggs-gm); *(here->JFETsourcePrimeGatePtr +1) -= m * (xgs); *(here->JFETsourcePrimeSourcePtr ) -= m * (gspr); *(here->JFETsourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetload.c0000644000265600020320000005240712264261473021130 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int JFETload(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; double beta; double betap; double capgd; double capgs; double cd; double cdhat = 0.0; double cdrain; double cdreq; double ceq; double ceqgd; double ceqgs; double cg; double cgd; double cghat = 0.0; double csat; double czgd; double czgdf2; double czgs; double czgsf2; double delvds; double delvgd; double delvgs; double evgd; double evgs; double fcpb2; double gdpr; double gds; double geq; double ggd; double ggs; double gm; double gspr; double sarg; double twop; double vds; double vgd; double vgdt; double vgs; double vgst; #ifndef PREDICTOR double xfact; #endif /* Modification for Sydney University JFET model */ double vto; double apart,cpart; double Bfac; /* end Sydney University mod. */ int icheck; int ichk1; int error; double arg, vt_temp; double m; /* loop through all the models */ for( ; model != NULL; model = model->JFETnextModel ) { /* loop through all the instances of the model */ for (here = model->JFETinstances; here != NULL ; here=here->JFETnextInstance) { /* * dc model parameters */ beta = here->JFETtBeta * here->JFETarea; gdpr=model->JFETdrainConduct*here->JFETarea; gspr=model->JFETsourceConduct*here->JFETarea; csat=here->JFETtSatCur*here->JFETarea; /* * initialization */ icheck=1; if( ckt->CKTmode & MODEINITSMSIG) { vgs= *(ckt->CKTstate0 + here->JFETvgs); vgd= *(ckt->CKTstate0 + here->JFETvgd); } else if (ckt->CKTmode & MODEINITTRAN) { vgs= *(ckt->CKTstate1 + here->JFETvgs); vgd= *(ckt->CKTstate1 + here->JFETvgd); } else if ( (ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC) ) { vds=model->JFETtype*here->JFETicVDS; vgs=model->JFETtype*here->JFETicVGS; vgd=vgs-vds; } else if ( (ckt->CKTmode & MODEINITJCT) && (here->JFEToff == 0) ) { vgs = -1; vgd = -1; } else if( (ckt->CKTmode & MODEINITJCT) || ((ckt->CKTmode & MODEINITFIX) && (here->JFEToff))) { vgs = 0; vgd = 0; } else { #ifndef PREDICTOR if(ckt->CKTmode & MODEINITPRED) { xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; *(ckt->CKTstate0 + here->JFETvgs)= *(ckt->CKTstate1 + here->JFETvgs); vgs=(1+xfact)* *(ckt->CKTstate1 + here->JFETvgs)-xfact* *(ckt->CKTstate2 + here->JFETvgs); *(ckt->CKTstate0 + here->JFETvgd)= *(ckt->CKTstate1 + here->JFETvgd); vgd=(1+xfact)* *(ckt->CKTstate1 + here->JFETvgd)-xfact* *(ckt->CKTstate2 + here->JFETvgd); *(ckt->CKTstate0 + here->JFETcg)= *(ckt->CKTstate1 + here->JFETcg); *(ckt->CKTstate0 + here->JFETcd)= *(ckt->CKTstate1 + here->JFETcd); *(ckt->CKTstate0 + here->JFETcgd)= *(ckt->CKTstate1 + here->JFETcgd); *(ckt->CKTstate0 + here->JFETgm)= *(ckt->CKTstate1 + here->JFETgm); *(ckt->CKTstate0 + here->JFETgds)= *(ckt->CKTstate1 + here->JFETgds); *(ckt->CKTstate0 + here->JFETggs)= *(ckt->CKTstate1 + here->JFETggs); *(ckt->CKTstate0 + here->JFETggd)= *(ckt->CKTstate1 + here->JFETggd); } else { #endif /*PREDICTOR*/ /* * compute new nonlinear branch voltages */ vgs=model->JFETtype* (*(ckt->CKTrhsOld+ here->JFETgateNode)- *(ckt->CKTrhsOld+ here->JFETsourcePrimeNode)); vgd=model->JFETtype* (*(ckt->CKTrhsOld+here->JFETgateNode)- *(ckt->CKTrhsOld+ here->JFETdrainPrimeNode)); #ifndef PREDICTOR } #endif /*PREDICTOR*/ delvgs=vgs- *(ckt->CKTstate0 + here->JFETvgs); delvgd=vgd- *(ckt->CKTstate0 + here->JFETvgd); delvds=delvgs-delvgd; cghat= *(ckt->CKTstate0 + here->JFETcg)+ *(ckt->CKTstate0 + here->JFETggd)*delvgd+ *(ckt->CKTstate0 + here->JFETggs)*delvgs; cdhat= *(ckt->CKTstate0 + here->JFETcd)+ *(ckt->CKTstate0 + here->JFETgm)*delvgs+ *(ckt->CKTstate0 + here->JFETgds)*delvds- *(ckt->CKTstate0 + here->JFETggd)*delvgd; /* * bypass if solution has not changed */ if((ckt->CKTbypass) && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delvgs) < ckt->CKTreltol*MAX(fabs(vgs), fabs(*(ckt->CKTstate0 + here->JFETvgs)))+ ckt->CKTvoltTol) ) if ( (fabs(delvgd) < ckt->CKTreltol*MAX(fabs(vgd), fabs(*(ckt->CKTstate0 + here->JFETvgd)))+ ckt->CKTvoltTol)) if ( (fabs(cghat-*(ckt->CKTstate0 + here->JFETcg)) < ckt->CKTreltol*MAX(fabs(cghat), fabs(*(ckt->CKTstate0 + here->JFETcg)))+ ckt->CKTabstol) ) if ( /* hack - expression too big */ (fabs(cdhat-*(ckt->CKTstate0 + here->JFETcd)) < ckt->CKTreltol*MAX(fabs(cdhat), fabs(*(ckt->CKTstate0 + here->JFETcd)))+ ckt->CKTabstol) ) { /* we can do a bypass */ vgs= *(ckt->CKTstate0 + here->JFETvgs); vgd= *(ckt->CKTstate0 + here->JFETvgd); vds= vgs-vgd; cg= *(ckt->CKTstate0 + here->JFETcg); cd= *(ckt->CKTstate0 + here->JFETcd); cgd= *(ckt->CKTstate0 + here->JFETcgd); gm= *(ckt->CKTstate0 + here->JFETgm); gds= *(ckt->CKTstate0 + here->JFETgds); ggs= *(ckt->CKTstate0 + here->JFETggs); ggd= *(ckt->CKTstate0 + here->JFETggd); goto load; } /* * limit nonlinear branch voltages */ ichk1=1; vgs = DEVpnjlim(vgs,*(ckt->CKTstate0 + here->JFETvgs), (here->JFETtemp*CONSTKoverQ), here->JFETvcrit, &icheck); vgd = DEVpnjlim(vgd,*(ckt->CKTstate0 + here->JFETvgd), (here->JFETtemp*CONSTKoverQ), here->JFETvcrit,&ichk1); if (ichk1 == 1) { icheck=1; } vgs = DEVfetlim(vgs,*(ckt->CKTstate0 + here->JFETvgs), here->JFETtThreshold); vgd = DEVfetlim(vgd,*(ckt->CKTstate0 + here->JFETvgd), here->JFETtThreshold); } /* * determine dc current and derivatives */ vds=vgs-vgd; vt_temp=here->JFETtemp*CONSTKoverQ; if (vgs < -3*vt_temp) { arg=3*vt_temp/(vgs*CONSTe); arg = arg * arg * arg; cg = -csat*(1+arg)+ckt->CKTgmin*vgs; ggs = csat*3*arg/vgs+ckt->CKTgmin; } else { evgs = exp(vgs/vt_temp); ggs = csat*evgs/vt_temp+ckt->CKTgmin; cg = csat*(evgs-1)+ckt->CKTgmin*vgs; } if (vgd < -3*vt_temp) { arg=3*vt_temp/(vgd*CONSTe); arg = arg * arg * arg; cgd = -csat*(1+arg)+ckt->CKTgmin*vgd; ggd = csat*3*arg/vgd+ckt->CKTgmin; } else { evgd = exp(vgd/vt_temp); ggd = csat*evgd/vt_temp+ckt->CKTgmin; cgd = csat*(evgd-1)+ckt->CKTgmin*vgd; } cg = cg+cgd; /* Modification for Sydney University JFET model */ vto = here->JFETtThreshold; if (vds >= 0) { vgst = vgs - vto; /* * compute drain current and derivatives for normal mode */ if (vgst <= 0) { /* * normal mode, cutoff region */ cdrain = 0; gm = 0; gds = 0; } else { betap = beta*(1 + model->JFETlModulation*vds); Bfac = model->JFETbFac; if (vgst >= vds) { /* * normal mode, linear region */ apart = 2*model->JFETb + 3*Bfac*(vgst - vds); cpart = vds*(vds*(Bfac*vds - model->JFETb)+vgst*apart); cdrain = betap*cpart; gm = betap*vds*(apart + 3*Bfac*vgst); gds = betap*(vgst - vds)*apart + beta*model->JFETlModulation*cpart; } else { Bfac = vgst*Bfac; gm = betap*vgst*(2*model->JFETb+3*Bfac); /* * normal mode, saturation region */ cpart=vgst*vgst*(model->JFETb+Bfac); cdrain = betap*cpart; gds = model->JFETlModulation*beta*cpart; } } } else { vgdt = vgd - vto; /* * compute drain current and derivatives for inverse mode */ if (vgdt <= 0) { /* * inverse mode, cutoff region */ cdrain = 0; gm = 0; gds = 0; } else { betap = beta*(1 - model->JFETlModulation*vds); Bfac = model->JFETbFac; if (vgdt + vds >= 0) { /* * inverse mode, linear region */ apart = 2*model->JFETb + 3*Bfac*(vgdt + vds); cpart = vds*(-vds*(-Bfac*vds-model->JFETb)+vgdt*apart); cdrain = betap*cpart; gm = betap*vds*(apart + 3*Bfac*vgdt); gds = betap*(vgdt + vds)*apart - beta*model->JFETlModulation*cpart - gm; } else { Bfac = vgdt*Bfac; gm = -betap*vgdt*(2*model->JFETb+3*Bfac); /* * inverse mode, saturation region */ cpart=vgdt*vgdt*(model->JFETb+Bfac); cdrain = - betap*cpart; gds = model->JFETlModulation*beta*cpart-gm; } } } #ifdef notdef /* The original section is now commented out */ /* end Sydney University mod */ /* * compute drain current and derivitives for normal mode */ if (vds >= 0) { vgst=vgs-here->JFETtThreshold; /* * normal mode, cutoff region */ if (vgst <= 0) { cdrain=0; gm=0; gds=0; } else { betap=beta*(1+model->JFETlModulation*vds); twob=betap+betap; if (vgst <= vds) { /* * normal mode, saturation region */ cdrain=betap*vgst*vgst; gm=twob*vgst; gds=model->JFETlModulation*beta*vgst*vgst; } else { /* * normal mode, linear region */ cdrain=betap*vds*(vgst+vgst-vds); gm=twob*vds; gds=twob*(vgst-vds)+model->JFETlModulation*beta* vds*(vgst+vgst-vds); } } } else { /* * compute drain current and derivitives for inverse mode */ vgdt=vgd-here->JFETtThreshold; if (vgdt <= 0) { /* * inverse mode, cutoff region */ cdrain=0; gm=0; gds=0; } else { /* * inverse mode, saturation region */ betap=beta*(1-model->JFETlModulation*vds); twob=betap+betap; if (vgdt <= -vds) { cdrain = -betap*vgdt*vgdt; gm = -twob*vgdt; gds = model->JFETlModulation*beta*vgdt*vgdt-gm; } else { /* * inverse mode, linear region */ cdrain=betap*vds*(vgdt+vgdt+vds); gm=twob*vds; gds=twob*vgdt-model->JFETlModulation*beta*vds* (vgdt+vgdt+vds); } } } /* end of original section, now deleted (replaced w/SU mod */ #endif /* * compute equivalent drain current source */ cd=cdrain-cgd; if ( (ckt->CKTmode & (MODETRAN | MODEAC | MODEINITSMSIG) ) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) ){ /* * charge storage elements */ czgs=here->JFETtCGS*here->JFETarea; czgd=here->JFETtCGD*here->JFETarea; twop=here->JFETtGatePot+here->JFETtGatePot; fcpb2=here->JFETcorDepCap*here->JFETcorDepCap; czgsf2=czgs/model->JFETf2; czgdf2=czgd/model->JFETf2; if (vgs < here->JFETcorDepCap) { sarg=sqrt(1-vgs/here->JFETtGatePot); *(ckt->CKTstate0 + here->JFETqgs) = twop*czgs*(1-sarg); capgs=czgs/sarg; } else { *(ckt->CKTstate0 + here->JFETqgs) = czgs*here->JFETf1 + czgsf2*(model->JFETf3 *(vgs- here->JFETcorDepCap)+(vgs*vgs-fcpb2)/ (twop+twop)); capgs=czgsf2*(model->JFETf3+vgs/twop); } if (vgd < here->JFETcorDepCap) { sarg=sqrt(1-vgd/here->JFETtGatePot); *(ckt->CKTstate0 + here->JFETqgd) = twop*czgd*(1-sarg); capgd=czgd/sarg; } else { *(ckt->CKTstate0 + here->JFETqgd) = czgd*here->JFETf1+ czgdf2*(model->JFETf3* (vgd- here->JFETcorDepCap)+(vgd*vgd-fcpb2)/ (twop+twop)); capgd=czgdf2*(model->JFETf3+vgd/twop); } /* * store small-signal parameters */ if( (!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC)) ) { if(ckt->CKTmode & MODEINITSMSIG) { *(ckt->CKTstate0 + here->JFETqgs) = capgs; *(ckt->CKTstate0 + here->JFETqgd) = capgd; continue; /*go to 1000*/ } /* * transient analysis */ if(ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->JFETqgs) = *(ckt->CKTstate0 + here->JFETqgs); *(ckt->CKTstate1 + here->JFETqgd) = *(ckt->CKTstate0 + here->JFETqgd); } error = NIintegrate(ckt,&geq,&ceq,capgs,here->JFETqgs); if(error) return(error); ggs = ggs + geq; cg = cg + *(ckt->CKTstate0 + here->JFETcqgs); error = NIintegrate(ckt,&geq,&ceq,capgd,here->JFETqgd); if(error) return(error); ggd = ggd + geq; cg = cg + *(ckt->CKTstate0 + here->JFETcqgd); cd = cd - *(ckt->CKTstate0 + here->JFETcqgd); cgd = cgd + *(ckt->CKTstate0 + here->JFETcqgd); if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate1 + here->JFETcqgs) = *(ckt->CKTstate0 + here->JFETcqgs); *(ckt->CKTstate1 + here->JFETcqgd) = *(ckt->CKTstate0 + here->JFETcqgd); } } } /* * check convergence */ if( (!(ckt->CKTmode & MODEINITFIX)) | (!(ckt->CKTmode & MODEUIC))) { if((icheck == 1) || (fabs(cghat-cg) >= ckt->CKTreltol * MAX(fabs(cghat), fabs(cg)) + ckt->CKTabstol) || (fabs(cdhat-cd) > ckt->CKTreltol * MAX(fabs(cdhat), fabs(cd)) + ckt->CKTabstol)) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) here; } } *(ckt->CKTstate0 + here->JFETvgs) = vgs; *(ckt->CKTstate0 + here->JFETvgd) = vgd; *(ckt->CKTstate0 + here->JFETcg) = cg; *(ckt->CKTstate0 + here->JFETcd) = cd; *(ckt->CKTstate0 + here->JFETcgd) = cgd; *(ckt->CKTstate0 + here->JFETgm) = gm; *(ckt->CKTstate0 + here->JFETgds) = gds; *(ckt->CKTstate0 + here->JFETggs) = ggs; *(ckt->CKTstate0 + here->JFETggd) = ggd; /* * load current vector */ load: m = here->JFETm; ceqgd=model->JFETtype*(cgd-ggd*vgd); ceqgs=model->JFETtype*((cg-cgd)-ggs*vgs); cdreq=model->JFETtype*((cd+cgd)-gds*vds-gm*vgs); *(ckt->CKTrhs + here->JFETgateNode) += m * (-ceqgs-ceqgd); *(ckt->CKTrhs + here->JFETdrainPrimeNode) += m * (-cdreq+ceqgd); *(ckt->CKTrhs + here->JFETsourcePrimeNode) += m * (cdreq+ceqgs); /* * load y matrix */ *(here->JFETdrainDrainPrimePtr) += m * (-gdpr); *(here->JFETgateDrainPrimePtr) += m * (-ggd); *(here->JFETgateSourcePrimePtr) += m * (-ggs); *(here->JFETsourceSourcePrimePtr) += m * (-gspr); *(here->JFETdrainPrimeDrainPtr) += m * (-gdpr); *(here->JFETdrainPrimeGatePtr) += m * (gm-ggd); *(here->JFETdrainPrimeSourcePrimePtr) += m * (-gds-gm); *(here->JFETsourcePrimeGatePtr) += m * (-ggs-gm); *(here->JFETsourcePrimeSourcePtr) += m * (-gspr); *(here->JFETsourcePrimeDrainPrimePtr) += m * (-gds); *(here->JFETdrainDrainPtr) += m * (gdpr); *(here->JFETgateGatePtr) += m * (ggd+ggs); *(here->JFETsourceSourcePtr) += m * (gspr); *(here->JFETdrainPrimeDrainPrimePtr) += m * (gdpr+gds+ggd); *(here->JFETsourcePrimeSourcePrimePtr) += m * (gspr+gds+gm+ggs); } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetpzld.c0000644000265600020320000000654612264261473021165 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "jfetdefs.h" #include "ngspice/suffix.h" int JFETpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; double gdpr; double gspr; double gm; double gds; double ggs; double xgs; double ggd; double xgd; double m; for( ; model != NULL; model = model->JFETnextModel ) { for( here = model->JFETinstances; here != NULL; here = here->JFETnextInstance) { m = here->JFETm; gdpr=model->JFETdrainConduct * here->JFETarea; gspr=model->JFETsourceConduct * here->JFETarea; gm= *(ckt->CKTstate0 + here->JFETgm) ; gds= *(ckt->CKTstate0 + here->JFETgds) ; ggs= *(ckt->CKTstate0 + here->JFETggs) ; xgs= *(ckt->CKTstate0 + here->JFETqgs) ; ggd= *(ckt->CKTstate0 + here->JFETggd) ; xgd= *(ckt->CKTstate0 + here->JFETqgd) ; *(here->JFETdrainDrainPtr ) += m * gdpr; *(here->JFETgateGatePtr ) += m * (ggd+ggs); *(here->JFETgateGatePtr ) += m * ((xgd+xgs) * s->real); *(here->JFETgateGatePtr +1) += m * ((xgd+xgs) * s->imag); *(here->JFETsourceSourcePtr ) += m * (gspr); *(here->JFETdrainPrimeDrainPrimePtr ) += m * (gdpr+gds+ggd); *(here->JFETdrainPrimeDrainPrimePtr ) += m * (xgd * s->real); *(here->JFETdrainPrimeDrainPrimePtr +1) += m * (xgd * s->imag); *(here->JFETsourcePrimeSourcePrimePtr ) += m * (gspr+gds+gm+ggs); *(here->JFETsourcePrimeSourcePrimePtr ) += m * (xgs * s->real); *(here->JFETsourcePrimeSourcePrimePtr +1) += m * (xgs * s->imag); *(here->JFETdrainDrainPrimePtr ) -= m * (gdpr); *(here->JFETgateDrainPrimePtr ) -= m * (ggd); *(here->JFETgateDrainPrimePtr ) -= m * (xgd * s->real); *(here->JFETgateDrainPrimePtr +1) -= m * (xgd * s->imag); *(here->JFETgateSourcePrimePtr ) -= m * (ggs); *(here->JFETgateSourcePrimePtr ) -= m * (xgs * s->real); *(here->JFETgateSourcePrimePtr +1) -= m * (xgs * s->imag); *(here->JFETsourceSourcePrimePtr ) -= m * (gspr); *(here->JFETdrainPrimeDrainPtr ) -= m * (gdpr); *(here->JFETdrainPrimeGatePtr ) += m * (-ggd+gm); *(here->JFETdrainPrimeGatePtr ) -= m * (xgd * s->real); *(here->JFETdrainPrimeGatePtr +1) -= m * (xgd * s->imag); *(here->JFETdrainPrimeSourcePrimePtr ) += m * (-gds-gm); *(here->JFETsourcePrimeGatePtr ) += m * (-ggs-gm); *(here->JFETsourcePrimeGatePtr ) -= m * (xgs * s->real); *(here->JFETsourcePrimeGatePtr +1) -= m * (xgs * s->imag); *(here->JFETsourcePrimeSourcePtr ) -= m * (gspr); *(here->JFETsourcePrimeDrainPrimePtr ) -= m * (gds); } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetmdel.c0000644000265600020320000000176412264261473021132 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { JFETmodel **model = (JFETmodel**)inModel; JFETmodel *modfast = (JFETmodel*)kill; JFETinstance *here; JFETinstance *prev = NULL; JFETmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->JFETnextModel)) { if( (*model)->JFETmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->JFETnextModel; /* cut deleted device out of list */ for(here = (*model)->JFETinstances ; here ; here = here->JFETnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetmask.c0000644000265600020320000000612312264261473021136 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int JFETmAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { JFETmodel *model = (JFETmodel*)inModel; NG_IGNORE(ckt); switch(which) { case JFET_MOD_TNOM: value->rValue = model->JFETtnom-CONSTCtoK; return(OK); case JFET_MOD_VTO: value->rValue = model->JFETthreshold; return(OK); case JFET_MOD_BETA: value->rValue = model->JFETbeta; return(OK); case JFET_MOD_LAMBDA: value->rValue = model->JFETlModulation; return(OK); /* Modification for Sydney University JFET model */ case JFET_MOD_B: value->rValue = model->JFETb; return(OK); /* end Sydney University mod */ case JFET_MOD_RD: value->rValue = model->JFETdrainResist; return(OK); case JFET_MOD_RS: value->rValue = model->JFETsourceResist; return(OK); case JFET_MOD_CGS: value->rValue = model->JFETcapGS; return(OK); case JFET_MOD_CGD: value->rValue = model->JFETcapGD; return(OK); case JFET_MOD_PB: value->rValue = model->JFETgatePotential; return(OK); case JFET_MOD_IS: value->rValue = model->JFETgateSatCurrent; return(OK); case JFET_MOD_FC: value->rValue = model->JFETdepletionCapCoeff; return(OK); case JFET_MOD_DRAINCONDUCT: value->rValue = model->JFETdrainConduct; return(OK); case JFET_MOD_SOURCECONDUCT: value->rValue = model->JFETsourceConduct; return(OK); case JFET_MOD_KF: value->rValue = model->JFETfNcoef; return(OK); case JFET_MOD_AF: value->rValue = model->JFETfNexp; return(OK); case JFET_MOD_TCV: value->rValue = model->JFETtcv; return(OK); case JFET_MOD_BEX: value->rValue = model->JFETbex; return(OK); case JFET_MOD_TYPE: if (model->JFETtype == NJF) value->sValue = "njf"; else value->sValue = "pjf"; return(OK); case JFET_MOD_NLEV: value->iValue = model->JFETnlev; return(OK); case JFET_MOD_GDSNOI: value->rValue = model->JFETgdsnoi; return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/jfet/jfetask.c0000644000265600020320000001202412264261473020756 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Mathew Lew and Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /*ARGSUSED*/ int JFETask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { JFETinstance *here = (JFETinstance*)inst; static char *msg = "Current and power not available for ac analysis"; NG_IGNORE(select); switch(which) { case JFET_TEMP: value->rValue = here->JFETtemp-CONSTCtoK; return(OK); case JFET_DTEMP: value->rValue = here->JFETdtemp; return(OK); case JFET_AREA: value->rValue = here->JFETarea; value->rValue *= here->JFETm; return(OK); case JFET_M: value->rValue = here->JFETm; return(OK); case JFET_IC_VDS: value->rValue = here->JFETicVDS; return(OK); case JFET_IC_VGS: value->rValue = here->JFETicVGS; return(OK); case JFET_OFF: value->iValue = here->JFEToff; return(OK); case JFET_DRAINNODE: value->iValue = here->JFETdrainNode; return(OK); case JFET_GATENODE: value->iValue = here->JFETgateNode; return(OK); case JFET_SOURCENODE: value->iValue = here->JFETsourceNode; return(OK); case JFET_DRAINPRIMENODE: value->iValue = here->JFETdrainPrimeNode; return(OK); case JFET_SOURCEPRIMENODE: value->iValue = here->JFETsourcePrimeNode; return(OK); case JFET_VGS: value->rValue = *(ckt->CKTstate0 + here->JFETvgs); return(OK); case JFET_VGD: value->rValue = *(ckt->CKTstate0 + here->JFETvgd); return(OK); case JFET_CG: value->rValue = *(ckt->CKTstate0 + here->JFETcg); value->rValue *= here->JFETm; return(OK); case JFET_CD: value->rValue = *(ckt->CKTstate0 + here->JFETcd); value->rValue *= here->JFETm; return(OK); case JFET_CGD: value->rValue = *(ckt->CKTstate0 + here->JFETcgd); value->rValue *= here->JFETm; return(OK); case JFET_GM: value->rValue = *(ckt->CKTstate0 + here->JFETgm); value->rValue *= here->JFETm; return(OK); case JFET_GDS: value->rValue = *(ckt->CKTstate0 + here->JFETgds); value->rValue *= here->JFETm; return(OK); case JFET_GGS: value->rValue = *(ckt->CKTstate0 + here->JFETggs); value->rValue *= here->JFETm; return(OK); case JFET_GGD: value->rValue = *(ckt->CKTstate0 + here->JFETggd); value->rValue *= here->JFETm; return(OK); case JFET_QGS: value->rValue = *(ckt->CKTstate0 + here->JFETqgs); value->rValue *= here->JFETm; return(OK); case JFET_CQGS: value->rValue = *(ckt->CKTstate0 + here->JFETcqgs); value->rValue *= here->JFETm; return(OK); case JFET_QGD: value->rValue = *(ckt->CKTstate0 + here->JFETqgd); value->rValue *= here->JFETm; return(OK); case JFET_CQGD: value->rValue = *(ckt->CKTstate0 + here->JFETcqgd); value->rValue *= here->JFETm; return(OK); case JFET_CS : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "JFETask"; strcpy(errMsg,msg); return(E_ASKCURRENT); } else { value->rValue = -*(ckt->CKTstate0 + here->JFETcd); value->rValue -= *(ckt->CKTstate0 + here->JFETcg); value->rValue *= here->JFETm; } return(OK); case JFET_POWER : if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "JFETask"; strcpy(errMsg,msg); return(E_ASKPOWER); } else { value->rValue = *(ckt->CKTstate0 + here->JFETcd) * *(ckt->CKTrhsOld + here->JFETdrainNode); value->rValue += *(ckt->CKTstate0 + here->JFETcg) * *(ckt->CKTrhsOld + here->JFETgateNode); value->rValue -= (*(ckt->CKTstate0 + here->JFETcd) + *(ckt->CKTstate0 + here->JFETcg)) * *(ckt->CKTrhsOld + here->JFETsourceNode); value->rValue *= here->JFETm; } return(OK); default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/jfet/jfetdist.c0000644000265600020320000005274012264261473021154 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" int JFETdisto(int mode, GENmodel *genmodel, CKTcircuit *ckt) /* assuming here that ckt->CKTomega has been initialised to * the correct value */ { JFETmodel *model = (JFETmodel *) genmodel; DISTOAN* job = (DISTOAN*) ckt->CKTcurJob; DpassStr pass; double r1h1x,i1h1x; double r1h1y,i1h1y; double r1h2x, i1h2x; double r1h2y, i1h2y; double r1hm2x,i1hm2x; double r1hm2y,i1hm2y; double r2h11x,i2h11x; double r2h11y,i2h11y; double r2h1m2x,i2h1m2x; double r2h1m2y,i2h1m2y; double temp, itemp; JFETinstance *here; if (mode == D_SETUP) return(JFETdSetup(genmodel,ckt)); /* another hack from similar structures */ if ((mode == D_TWOF1) || (mode == D_THRF1) || (mode == D_F1PF2) || (mode == D_F1MF2) || (mode == D_2F1MF2)) { /* loop through all the JFET models */ for( ; model != NULL; model = model->JFETnextModel ) { /* loop through all the instances of the model */ for (here = model->JFETinstances; here != NULL ; here=here->JFETnextInstance) { /* loading starts here */ switch (mode) { case D_TWOF1: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->JFETgateNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->JFETgateNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->JFETdrainPrimeNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->JFETdrainPrimeNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFn2F1(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); itemp = DFi2F1(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0); *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n2F1(here->ggs2, r1h1x, i1h1x); itemp = D1i2F1(here->ggs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n2F1(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = D1i2F1(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* ggd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F1(here->capgs2, r1h1x, i1h1x); itemp = ckt->CKTomega * D1n2F1(here->capgs2, r1h1x, i1h1x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F1(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y); itemp = ckt->CKTomega * D1n2F1(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* capgd over */ /* all done */ break; case D_THRF1: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->JFETgateNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->JFETgateNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->JFETdrainPrimeNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->JFETdrainPrimeNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r2h11x = *(job->r2H11ptr + (here->JFETgateNode)) - *(job->r2H11ptr + (here->JFETsourcePrimeNode)); i2h11x = *(job->i2H11ptr + (here->JFETgateNode)) - *(job->i2H11ptr + (here->JFETsourcePrimeNode)); r2h11y = *(job->r2H11ptr + (here->JFETdrainPrimeNode)) - *(job->r2H11ptr + (here->JFETsourcePrimeNode)); i2h11y = *(job->i2H11ptr + (here->JFETdrainPrimeNode)) - *(job->i2H11ptr + (here->JFETsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFn3F1(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, here->cdr_x3, here->cdr_y3, 0.0, here->cdr_x2y, 0.0, here->cdr_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); itemp = DFi3F1(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, here->cdr_x3, here->cdr_y3, 0.0, here->cdr_x2y, 0.0, here->cdr_xy2, 0.0, 0.0, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r2h11x, i2h11x, r2h11y, i2h11y, 0.0, 0.0); *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n3F1(here->ggs2, here->ggs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = D1i3F1(here->ggs2, here->ggs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n3F1(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = D1i3F1(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* ggd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); itemp = ckt->CKTomega * D1n3F1(here->capgs2, here->capgs3, r1h1x, i1h1x, r2h11x, i2h11x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i3F1(here->capgd2, here->capgd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); itemp = ckt->CKTomega * D1n3F1(here->capgd2, here->capgd3, r1h1x - r1h1y, i1h1x - i1h1y, r2h11x - r2h11y, i2h11x - i2h11y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* capgd over */ /* all done */ break; case D_F1PF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->JFETgateNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->JFETgateNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->JFETdrainPrimeNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->JFETdrainPrimeNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h2x = *(job->r1H2ptr + (here->JFETgateNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1h2x = *(job->i1H2ptr + (here->JFETgateNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode)); r1h2y = *(job->r1H2ptr + (here->JFETdrainPrimeNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1h2y = *(job->i1H2ptr + (here->JFETdrainPrimeNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); itemp = DFiF12(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1h2x, i1h2x, r1h2y, i1h2y, 0.0, 0.0); *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1nF12(here->ggs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = D1iF12(here->ggs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1nF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = D1iF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* ggd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1h2x, i1h2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y, r1h2x - r1h2y, i1h2x - i1h2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* capgd over */ /* all done */ break; case D_F1MF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->JFETgateNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->JFETgateNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->JFETdrainPrimeNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->JFETdrainPrimeNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1hm2x = *(job->r1H2ptr + (here->JFETgateNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1hm2x = -(*(job->i1H2ptr + (here->JFETgateNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode))); r1hm2y = *(job->r1H2ptr + (here->JFETdrainPrimeNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1hm2y = -(*(job->i1H2ptr + (here->JFETdrainPrimeNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode))); /* loading starts here */ /* loading cdrain term */ temp = DFnF12(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); itemp = DFiF12(here->cdr_x2, here->cdr_y2, 0.0, here->cdr_xy, 0.0, 0.0, r1h1x, i1h1x, r1h1y, i1h1y, 0.0, 0.0, r1hm2x, i1hm2x, r1hm2y, i1hm2y, 0.0, 0.0); *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1nF12(here->ggs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = D1iF12(here->ggs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1nF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = D1iF12(here->ggd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* ggd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1iF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); itemp = ckt->CKTomega * D1nF12(here->capgs2, r1h1x, i1h1x, r1hm2x, i1hm2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1iF12(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); itemp = ckt->CKTomega * D1nF12(here->capgd2, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* capgd over */ /* all done */ break; case D_2F1MF2: /* x = vgs, y = vds */ /* getting first order (linear) Volterra kernel */ r1h1x = *(job->r1H1ptr + (here->JFETgateNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1x = *(job->i1H1ptr + (here->JFETgateNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r1h1y = *(job->r1H1ptr + (here->JFETdrainPrimeNode)) - *(job->r1H1ptr + (here->JFETsourcePrimeNode)); i1h1y = *(job->i1H1ptr + (here->JFETdrainPrimeNode)) - *(job->i1H1ptr + (here->JFETsourcePrimeNode)); r2h11x = *(job->r2H11ptr + (here->JFETgateNode)) - *(job->r2H11ptr + (here->JFETsourcePrimeNode)); i2h11x = *(job->i2H11ptr + (here->JFETgateNode)) - *(job->i2H11ptr + (here->JFETsourcePrimeNode)); r2h11y = *(job->r2H11ptr + (here->JFETdrainPrimeNode)) - *(job->r2H11ptr + (here->JFETsourcePrimeNode)); i2h11y = *(job->i2H11ptr + (here->JFETdrainPrimeNode)) - *(job->i2H11ptr + (here->JFETsourcePrimeNode)); r1hm2x = *(job->r1H2ptr + (here->JFETgateNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1hm2x = -(*(job->i1H2ptr + (here->JFETgateNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode))); r1hm2y = *(job->r1H2ptr + (here->JFETdrainPrimeNode)) - *(job->r1H2ptr + (here->JFETsourcePrimeNode)); i1hm2y = -(*(job->i1H2ptr + (here->JFETdrainPrimeNode)) - *(job->i1H2ptr + (here->JFETsourcePrimeNode))); r2h1m2x = *(job->r2H1m2ptr + (here->JFETgateNode)) - *(job->r2H1m2ptr + (here->JFETsourcePrimeNode)); i2h1m2x = *(job->i2H1m2ptr + (here->JFETgateNode)) - *(job->i2H1m2ptr + (here->JFETsourcePrimeNode)); r2h1m2y = *(job->r2H1m2ptr + (here->JFETdrainPrimeNode)) - *(job->r2H1m2ptr + (here->JFETsourcePrimeNode)); i2h1m2y = *(job->i2H1m2ptr + (here->JFETdrainPrimeNode)) - *(job->i2H1m2ptr + (here->JFETsourcePrimeNode)); /* loading starts here */ /* loading cdrain term */ pass.cxx = here->cdr_x2; pass.cyy = here->cdr_y2; pass.czz = 0.0; pass.cxy = here->cdr_xy; pass.cyz = 0.0; pass.cxz = 0.0; pass.cxxx = here->cdr_x3; pass.cyyy = here->cdr_y3; pass.czzz = 0.0; pass.cxxy = here->cdr_x2y; pass.cxxz = 0.0; pass.cxyy = here->cdr_xy2; pass.cyyz = 0.0; pass.cxzz = 0.0; pass.cyzz = 0.0; pass.cxyz = 0.0; pass.r1h1x = r1h1x; pass.i1h1x = i1h1x; pass.r1h1y = r1h1y; pass.i1h1y = i1h1y; pass.r1h1z = 0.0; pass.i1h1z = 0.0; pass.r1h2x = r1hm2x; pass.i1h2x = i1hm2x; pass.r1h2y = r1hm2y; pass.i1h2y = i1hm2y; pass.r1h2z = 0.0; pass.i1h2z = 0.0; pass.r2h11x = r2h11x; pass.i2h11x = i2h11x; pass.r2h11y = r2h11y; pass.i2h11y = i2h11y; pass.r2h11z = 0.0; pass.i2h11z = 0.0; pass.h2f1f2x = r2h1m2x; pass.ih2f1f2x = i2h1m2x; pass.h2f1f2y = r2h1m2y; pass.ih2f1f2y = i2h1m2y; pass.h2f1f2z = 0.0; pass.ih2f1f2z = 0.0; temp = DFn2F12(&pass); itemp = DFi2F12(&pass); *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) -= temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* cdrain term over */ /* loading ggs term */ temp = D1n2F12(here->ggs2, here->ggs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = D1i2F12(here->ggs2, here->ggs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* ggs over */ /* loading ggd term */ temp = D1n2F12(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = D1i2F12(here->ggd2, here->ggd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* ggd over */ /* loading capgs term */ temp = -ckt->CKTomega * D1i2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); itemp = ckt->CKTomega * D1n2F12(here->capgs2, here->capgs3, r1h1x, i1h1x, r1hm2x, i1hm2x, r2h11x, i2h11x, r2h1m2x, i2h1m2x); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETsourcePrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETsourcePrimeNode)) += itemp; /* capgs over */ /* loading capgd term */ temp = -ckt->CKTomega * D1i2F12(here->capgd2, here->capgd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); itemp = ckt->CKTomega * D1n2F12(here->capgd2, here->capgd3, r1h1x - r1h1y, i1h1x - i1h1y, r1hm2x - r1hm2y, i1hm2x - i1hm2y, r2h11x - r2h11y, i2h11x - i2h11y, r2h1m2x - r2h1m2y, i2h1m2x - i2h1m2y); *(ckt->CKTrhs + (here->JFETgateNode)) -= temp; *(ckt->CKTirhs + (here->JFETgateNode)) -= itemp; *(ckt->CKTrhs + (here->JFETdrainPrimeNode)) += temp; *(ckt->CKTirhs + (here->JFETdrainPrimeNode)) += itemp; /* capgd over */ /* all done */ break; default: ; } } } return(OK); } else return(E_BADPARM); } ngspice-26/src/spicelib/devices/jfet/jfetdset.c0000644000265600020320000002071412264261473021144 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/const.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" #include "ngspice/suffix.h" int JFETdSetup(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance value into the * sparse matrix previously provided */ { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; double beta; double betap; double lcapgd1; double lcapgd2; double lcapgd3; double lcapgs2; double lcapgs3; double lcapgs1; double cd; double cdrain; double temp; double cg; double cgd; double csat; double czgd; double czgdf2; double czgs; double czgsf2; double evgd; double evgs; double fcpb2; double gdpr; double gds1; double gds2; double gds3; double lggd1; double lggd2; double lggd3; double lggs1; double lggs2; double lggs3; double gm1; double gm2; double gm3; double gmds; double gm2ds; double gmds2; double gspr; double sarg; double twob; double twop; double vds; double vgd; double vgs; double vgst; /* loop through all the models */ for( ; model != NULL; model = model->JFETnextModel ) { /* loop through all the instances of the model */ for (here = model->JFETinstances; here != NULL ; here=here->JFETnextInstance) { /* * dc model parameters */ beta = here->JFETtBeta * here->JFETarea * here->JFETm; gdpr=model->JFETdrainConduct*here->JFETarea * here->JFETm; gspr=model->JFETsourceConduct*here->JFETarea * here-> JFETm; csat=here->JFETtSatCur*here->JFETarea * here-> JFETm; /* * initialization */ vgs= model->JFETtype*(*(ckt->CKTrhsOld + here->JFETgateNode) - *(ckt->CKTrhsOld + here->JFETsourcePrimeNode)); vgd= model->JFETtype*(*(ckt->CKTrhsOld + here->JFETgateNode) - *(ckt->CKTrhsOld + here->JFETdrainPrimeNode)); /* * determine dc current and derivatives */ vds=vgs-vgd; if (vds < 0.0) { vds = -vds; temp = vgs; vgs = vgd; vgd = temp; /* so now these have become the local variables */ here->JFETmode = -1; } else { here->JFETmode = 1; } if (vgs <= -5*here->JFETtemp*CONSTKoverQ) { lggs1 = -csat/vgs+ckt->CKTgmin; lggs2=lggs3=0; cg = lggs1*vgs; } else { evgs = exp(vgs/(here->JFETtemp*CONSTKoverQ)); lggs1 = csat*evgs/(here->JFETtemp*CONSTKoverQ)+ckt->CKTgmin; lggs2 = (lggs1-ckt->CKTgmin)/((here->JFETtemp*CONSTKoverQ)*2); lggs3 = lggs2/(3*(here->JFETtemp*CONSTKoverQ)); cg = csat*(evgs-1)+ckt->CKTgmin*vgs; } if (vgd <= -5*(here->JFETtemp*CONSTKoverQ)) { lggd1 = -csat/vgd+ckt->CKTgmin; lggd2=lggd3=0; cgd = lggd1*vgd; } else { evgd = exp(vgd/(here->JFETtemp*CONSTKoverQ)); lggd1 = csat*evgd/(here->JFETtemp*CONSTKoverQ)+ckt->CKTgmin; lggd2 = (lggd1-ckt->CKTgmin)/((here->JFETtemp*CONSTKoverQ)*2); lggd3 = lggd2/(3*(here->JFETtemp*CONSTKoverQ)); cgd = csat*(evgd-1)+ckt->CKTgmin*vgd; } cg = cg+cgd; /* * compute drain current and derivatives */ vgst=vgs-here->JFETtThreshold; /* * cutoff region */ if (vgst <= 0) { cdrain=0; gm1=gm2=gm3=0; gds1=gds2=gds3=0; gmds=gm2ds=gmds2=0; } else { betap=beta*(1+model->JFETlModulation*vds); twob=betap+betap; if (vgst <= vds) { /* * normal mode, saturation region */ /* note - for cdrain, all the g's refer to the * derivatives which have not been divided to * become Taylor coeffs. A notational * inconsistency but simplifies processing later. */ cdrain=betap*vgst*vgst; gm1=twob*vgst; gm2=twob; gm3=0; gds1=model->JFETlModulation*beta*vgst*vgst; gds2=gds3=gmds2=0; gm2ds=2*model->JFETlModulation*beta; gmds=gm2ds*vgst; } else { /* * normal mode, linear region */ cdrain=betap*vds*(vgst+vgst-vds); gm1=twob*vds; gm2=0; gm3=0; gmds=(beta+beta)*(1+2*model->JFETlModulation*vds); gm2ds=0; gds2=2*beta*(2*model->JFETlModulation*vgst - 1 - 3*model->JFETlModulation*vds); gds1=beta*(2*(vgst-vds) + 4*vgst*vds* model->JFETlModulation - 3*model->JFETlModulation*vds*vds); gmds2=4*beta*model->JFETlModulation; gds3= -6*beta*model->JFETlModulation; } } /* * compute equivalent drain current source */ cd=cdrain-cgd; /* * charge storage elements */ czgs=here->JFETtCGS*here->JFETarea * here->JFETm; czgd=here->JFETtCGD*here->JFETarea * here->JFETm; twop=here->JFETtGatePot+here->JFETtGatePot; fcpb2=here->JFETcorDepCap*here->JFETcorDepCap; czgsf2=czgs/model->JFETf2; czgdf2=czgd/model->JFETf2; if (vgs < here->JFETcorDepCap) { sarg=sqrt(1-vgs/here->JFETtGatePot); lcapgs1=czgs/sarg; lcapgs2=lcapgs1/(here->JFETtGatePot*4*sarg*sarg); lcapgs3=lcapgs2/(here->JFETtGatePot*2*sarg*sarg); } else { lcapgs1=czgsf2*(model->JFETf3+vgs/twop); lcapgs2=czgsf2/twop*0.5; lcapgs3=0; } if (vgd < here->JFETcorDepCap) { sarg=sqrt(1-vgd/here->JFETtGatePot); lcapgd1=czgd/sarg; lcapgd2=lcapgd1/(here->JFETtGatePot*4*sarg*sarg); lcapgd3=lcapgd2/(here->JFETtGatePot*2*sarg*sarg); } else { lcapgd1=czgdf2*(model->JFETf3+vgd/twop); lcapgd2=czgdf2/twop*0.5; lcapgd3=0; } /* * process to get Taylor coefficients, taking into * account type and mode. */ if (here->JFETmode == 1) { /* normal mode - no source-drain interchange */ here->cdr_x = gm1; here->cdr_y = gds1; here->cdr_x2 = gm2; here->cdr_y2 = gds2; here->cdr_xy = gmds; here->cdr_x3 = gm3; here->cdr_y3 = gds3; here->cdr_x2y = gm2ds; here->cdr_xy2 = gmds2; here->ggs1 = lggs1; here->ggd1 = lggd1; here->ggs2 = lggs2; here->ggd2 = lggd2; here->ggs3 = lggs3; here->ggd3 = lggd3; here->capgs1 = lcapgs1; here->capgd1 = lcapgd1; here->capgs2 = lcapgs2; here->capgd2 = lcapgd2; here->capgs3 = lcapgs3; here->capgd3 = lcapgd3; } else { /* * inverse mode - source and drain interchanged */ here->cdr_x = -gm1; here->cdr_y = gm1 + gds1; here->cdr_x2 = -gm2; here->cdr_y2 = -(gm2 + gds2 + 2*gmds); here->cdr_xy = gm2 + gmds; here->cdr_x3 = -gm3; here->cdr_y3 = gm3 + gds3 + 3*(gm2ds + gmds2 ) ; here->cdr_x2y = gm3 + gm2ds; here->cdr_xy2 = -(gm3 + 2*gm2ds + gmds2); here->ggs1 = lggd1; here->ggd1 = lggs1; here->ggs2 = lggd2; here->ggd2 = lggs2; here->ggs3 = lggd3; here->ggd3 = lggs3; here->capgs1 = lcapgd1; here->capgd1 = lcapgs1; here->capgs2 = lcapgd2; here->capgd2 = lcapgs2; here->capgs3 = lcapgd3; here->capgd3 = lcapgs3; } /* now to adjust for type and multiply by factors to convert to Taylor coeffs. */ here->cdr_x2 = 0.5*model->JFETtype*here->cdr_x2; here->cdr_y2 = 0.5*model->JFETtype*here->cdr_y2; here->cdr_xy = model->JFETtype*here->cdr_xy; here->cdr_x3 = here->cdr_x3/6.; here->cdr_y3 = here->cdr_y3/6.; here->cdr_x2y = 0.5*here->cdr_x2y; here->cdr_xy2 = 0.5*here->cdr_xy2; here->ggs2 = model->JFETtype*lggs2; here->ggd2 = model->JFETtype*lggd2; here->capgs2 = model->JFETtype*lcapgs2; here->capgd2 = model->JFETtype*lcapgd2; } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetic.c0000644000265600020320000000214412264261473020575 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETgetic(GENmodel *inModel, CKTcircuit *ckt) { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; /* * grab initial conditions out of rhs array. User specified, so use * external nodes to get values */ for( ; model ; model = model->JFETnextModel) { for(here = model->JFETinstances; here ; here = here->JFETnextInstance) { if(!here->JFETicVDSGiven) { here->JFETicVDS = *(ckt->CKTrhs + here->JFETdrainNode) - *(ckt->CKTrhs + here->JFETsourceNode); } if(!here->JFETicVGSGiven) { here->JFETicVGS = *(ckt->CKTrhs + here->JFETgateNode) - *(ckt->CKTrhs + here->JFETsourceNode); } } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetinit.h0000644000265600020320000000037012264261473021151 0ustar andreasadmin#ifndef _JFETINIT_H #define _JFETINIT_H extern IFparm JFETpTable[ ]; extern IFparm JFETmPTable[ ]; extern char *JFETnames[ ]; extern int JFETpTSize; extern int JFETmPTSize; extern int JFETnSize; extern int JFETiSize; extern int JFETmSize; #endif ngspice-26/src/spicelib/devices/jfet/jfetext.h0000644000265600020320000000210512264261473021004 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ extern int JFETacLoad(GENmodel*,CKTcircuit*); extern int JFETask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int JFETdelete(GENmodel*,IFuid,GENinstance**); extern void JFETdestroy(GENmodel**); extern int JFETgetic(GENmodel*,CKTcircuit*); extern int JFETload(GENmodel*,CKTcircuit*); extern int JFETmAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int JFETmDelete(GENmodel**,IFuid,GENmodel*); extern int JFETmParam(int,IFvalue*,GENmodel*); extern int JFETparam(int,IFvalue*,GENinstance*,IFvalue*); extern int JFETpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int JFETsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int JFETunsetup(GENmodel*,CKTcircuit*); extern int JFETtemp(GENmodel*,CKTcircuit*); extern int JFETtrunc(GENmodel*,CKTcircuit*,double*); extern int JFETdisto(int,GENmodel*,CKTcircuit*); extern int JFETnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int JFETdSetup(GENmodel*,CKTcircuit*); ngspice-26/src/spicelib/devices/jfet/jfetinit.c0000644000265600020320000000410712264261473021146 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "jfetitf.h" #include "jfetext.h" #include "jfetinit.h" SPICEdev JFETinfo = { { "JFET", "Junction Field effect transistor", &JFETnSize, &JFETnSize, JFETnames, &JFETpTSize, JFETpTable, &JFETmPTSize, JFETmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ JFETparam, /* DEVmodParam */ JFETmParam, /* DEVload */ JFETload, /* DEVsetup */ JFETsetup, /* DEVunsetup */ JFETunsetup, /* DEVpzSetup */ JFETsetup, /* DEVtemperature*/ JFETtemp, /* DEVtrunc */ JFETtrunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ JFETacLoad, /* DEVaccept */ NULL, /* DEVdestroy */ JFETdestroy, /* DEVmodDelete */ JFETmDelete, /* DEVdelete */ JFETdelete, /* DEVsetic */ JFETgetic, /* DEVask */ JFETask, /* DEVmodAsk */ JFETmAsk, /* DEVpzLoad */ JFETpzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ JFETdisto, /* DEVnoise */ JFETnoise, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &JFETiSize, /* DEVmodSize */ &JFETmSize }; SPICEdev * get_jfet_info(void) { return &JFETinfo; } ngspice-26/src/spicelib/devices/jfet/jfetitf.h0000644000265600020320000000026012264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_JFET #define DEV_JFET SPICEdev *get_jfet_info(void); #endif ngspice-26/src/spicelib/devices/jfet/jfettrun.c0000644000265600020320000000126312264261473021173 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETtrunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; for( ; model != NULL; model = model->JFETnextModel) { for(here=model->JFETinstances;here!=NULL;here = here->JFETnextInstance){ CKTterr(here->JFETqgs,ckt,timeStep); CKTterr(here->JFETqgd,ckt,timeStep); } } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetnoi.c0000644000265600020320000002415212264261473020772 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "jfetdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* * JFETnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with JFET's. It starts with the model *firstModel and * traverses all of its insts. It then proceeds to any other models * on the linked list. The total output noise density generated by * all of the JFET's is summed with the variable "OnDens". */ int JFETnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; JFETmodel *firstModel = (JFETmodel *) genmodel; JFETmodel *model; JFETinstance *inst; char name[N_MXVLNTH]; double tempOnoise; double tempInoise; double noizDens[JFETNSRCS]; double lnNdens[JFETNSRCS]; int i; double vgs, vds, vgst, alpha, beta; /* define the names of the noise sources */ static char *JFETnNames[JFETNSRCS] = { /* Note that we have to keep the order */ "_rd", /* noise due to rd */ /* consistent with thestrchr definitions */ "_rs", /* noise due to rs */ /* in JFETdefs.h */ "_id", /* noise due to id */ "_1overf", /* flicker (1/f) noise */ "" /* total transistor noise */ }; for (model=firstModel; model != NULL; model=model->JFETnextModel) { for (inst=model->JFETinstances; inst != NULL; inst=inst->JFETnextInstance) { switch (operation) { case N_OPEN: /* see if we have to to produce a summary report */ /* if so, name all the noise generators */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < JFETNSRCS; i++) { (void)sprintf(name,"onoise_%s%s",inst->JFETname,JFETnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < JFETNSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s",inst->JFETname,JFETnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s",inst->JFETname,JFETnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrc(&noizDens[JFETRDNOIZ],&lnNdens[JFETRDNOIZ], ckt,THERMNOISE,inst->JFETdrainPrimeNode,inst->JFETdrainNode, model->JFETdrainConduct * inst->JFETarea * inst->JFETm); NevalSrc(&noizDens[JFETRSNOIZ],&lnNdens[JFETRSNOIZ], ckt,THERMNOISE,inst->JFETsourcePrimeNode, inst->JFETsourceNode,model->JFETsourceConduct * inst->JFETarea * inst->JFETm); if (model->JFETnlev < 3) { NevalSrc(&noizDens[JFETIDNOIZ],&lnNdens[JFETIDNOIZ], ckt,THERMNOISE,inst->JFETdrainPrimeNode, inst->JFETsourcePrimeNode, (2.0/3.0 * inst->JFETm * fabs(*(ckt->CKTstate0 + inst->JFETgm)))); } else { vgs = *(ckt->CKTstate0 + inst->JFETvgs); vds = vgs - *(ckt->CKTstate0 + inst->JFETvgd); vgst = vgs - inst->JFETtThreshold; if (vgst >= vds) alpha = 1 - vds/vgst; /* linear region */ else alpha = 0; /* saturation region */ beta = inst->JFETtBeta * inst->JFETarea * inst->JFETm; NevalSrc(&noizDens[JFETIDNOIZ],&lnNdens[JFETIDNOIZ], ckt,THERMNOISE,inst->JFETdrainPrimeNode, inst->JFETsourcePrimeNode, (2.0/3.0 * beta*vgst*(1+alpha+alpha*alpha)/(1+alpha)*model->JFETgdsnoi)); } NevalSrc(&noizDens[JFETFLNOIZ], NULL, ckt, N_GAIN,inst->JFETdrainPrimeNode, inst->JFETsourcePrimeNode, (double)0.0); noizDens[JFETFLNOIZ] *= inst->JFETm * model->JFETfNcoef * exp(model->JFETfNexp * log(MAX(fabs(*(ckt->CKTstate0 + inst->JFETcd)),N_MINLOG))) / data->freq; lnNdens[JFETFLNOIZ] = log(MAX(noizDens[JFETFLNOIZ],N_MINLOG)); noizDens[JFETTOTNOIZ] = noizDens[JFETRDNOIZ] + noizDens[JFETRSNOIZ] + noizDens[JFETIDNOIZ] + noizDens[JFETFLNOIZ]; lnNdens[JFETTOTNOIZ] = log(MAX(noizDens[JFETTOTNOIZ], N_MINLOG)); *OnDens += noizDens[JFETTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < JFETNSRCS; i++) { inst->JFETnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variables if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < JFETNSRCS; i++) { inst->JFETnVar[OUTNOIZ][i] = 0.0; inst->JFETnVar[INNOIZ][i] = 0.0; } } } else { /* data->delFreq != 0.0 (we have to integrate) */ for (i=0; i < JFETNSRCS; i++) { if (i != JFETTOTNOIZ) { tempOnoise = Nintegrate(noizDens[i], lnNdens[i], inst->JFETnVar[LNLSTDENS][i], data); tempInoise = Nintegrate(noizDens[i] * data->GainSqInv , lnNdens[i] + data->lnGainInv, inst->JFETnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->JFETnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOnoise; data->inNoise += tempInoise; if (job->NStpsSm != 0) { inst->JFETnVar[OUTNOIZ][i] += tempOnoise; inst->JFETnVar[OUTNOIZ][JFETTOTNOIZ] += tempOnoise; inst->JFETnVar[INNOIZ][i] += tempInoise; inst->JFETnVar[INNOIZ][JFETTOTNOIZ] += tempInoise; } } } } if (data->prtSummary) { for (i=0; i < JFETNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < JFETNSRCS; i++) { data->outpVector[data->outNumber++] = inst->JFETnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->JFETnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetmpar.c0000644000265600020320000000646512264261473021153 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETmParam(int param, IFvalue *value, GENmodel *inModels) { JFETmodel *model = (JFETmodel*)inModels; switch(param) { case JFET_MOD_TNOM: model->JFETtnomGiven = TRUE; model->JFETtnom = value->rValue+CONSTCtoK; break; case JFET_MOD_VTO: model->JFETthresholdGiven = TRUE; model->JFETthreshold = value->rValue; break; case JFET_MOD_BETA: model->JFETbetaGiven = TRUE; model->JFETbeta = value->rValue; break; case JFET_MOD_LAMBDA: model->JFETlModulationGiven = TRUE; model->JFETlModulation = value->rValue; break; case JFET_MOD_RD: model->JFETdrainResistGiven = TRUE; model->JFETdrainResist = value->rValue; break; case JFET_MOD_RS: model->JFETsourceResistGiven = TRUE; model->JFETsourceResist = value->rValue; break; case JFET_MOD_CGS: model->JFETcapGSGiven = TRUE; model->JFETcapGS = value->rValue; break; case JFET_MOD_CGD: model->JFETcapGDGiven = TRUE; model->JFETcapGD = value->rValue; break; case JFET_MOD_PB: model->JFETgatePotentialGiven = TRUE; model->JFETgatePotential = value->rValue; break; case JFET_MOD_IS: model->JFETgateSatCurrentGiven = TRUE; model->JFETgateSatCurrent = value->rValue; break; case JFET_MOD_FC: model->JFETdepletionCapCoeffGiven = TRUE; model->JFETdepletionCapCoeff = value->rValue; break; case JFET_MOD_NJF: if(value->iValue) { model->JFETtype = NJF; } break; case JFET_MOD_PJF: if(value->iValue) { model->JFETtype = PJF; } break; case JFET_MOD_KF: model->JFETfNcoefGiven = TRUE; model->JFETfNcoef = value->rValue; break; case JFET_MOD_AF: model->JFETfNexpGiven = TRUE; model->JFETfNexp = value->rValue; break; /* Modification for Sydney University JFET model */ case JFET_MOD_B: model->JFETbGiven = TRUE; model->JFETb = value->rValue; return(OK); /* end Sydney University mod */ case JFET_MOD_TCV: model->JFETtcvGiven = TRUE; model->JFETtcv = value->rValue; break; case JFET_MOD_BEX: model->JFETbexGiven = TRUE; model->JFETbex = value->rValue; break; case JFET_MOD_NLEV: model->JFETnlevGiven = TRUE; model->JFETnlev = value->iValue; break; case JFET_MOD_GDSNOI: model->JFETgdsnoiGiven = TRUE; model->JFETgdsnoi = value->rValue; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetpar.c0000644000265600020320000000353212264261473020766 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* ARGSUSED */ int JFETparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { JFETinstance *here = (JFETinstance *)inst; NG_IGNORE(select); switch(param) { case JFET_TEMP: here->JFETtemp = value->rValue+CONSTCtoK; here->JFETtempGiven = TRUE; break; case JFET_DTEMP: here->JFETdtemp = value->rValue; here->JFETdtempGiven = TRUE; break; case JFET_AREA: here->JFETarea = value->rValue; here->JFETareaGiven = TRUE; break; case JFET_M: here->JFETm = value->rValue; here->JFETmGiven = TRUE; break; case JFET_IC_VDS: here->JFETicVDS = value->rValue; here->JFETicVDSGiven = TRUE; break; case JFET_IC_VGS: here->JFETicVGS = value->rValue; here->JFETicVGSGiven = TRUE; break; case JFET_OFF: here->JFEToff = (value->iValue != 0); break; case JFET_IC: switch(value->v.numValue) { case 2: here->JFETicVGS = *(value->v.vec.rVec+1); here->JFETicVGSGiven = TRUE; case 1: here->JFETicVDS = *(value->v.vec.rVec); here->JFETicVDSGiven = TRUE; break; default: return(E_BADPARM); } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/jfet/jfetset.c0000644000265600020320000001643312264261473021003 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* load the diode structure with those pointers needed later * for fast matrix loading */ { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; int error; CKTnode *tmp; /* loop through all the diode models */ for( ; model != NULL; model = model->JFETnextModel ) { if( (model->JFETtype != NJF) && (model->JFETtype != PJF) ) { model->JFETtype = NJF; } if(!model->JFETthresholdGiven) { model->JFETthreshold = -2; } if(!model->JFETbetaGiven) { model->JFETbeta = 1e-4; } if(!model->JFETlModulationGiven) { model->JFETlModulation = 0; } if(!model->JFETdrainResistGiven) { model->JFETdrainResist = 0; } if(!model->JFETsourceResistGiven) { model->JFETsourceResist = 0; } if(!model->JFETcapGSGiven) { model->JFETcapGS = 0; } if(!model->JFETcapGDGiven) { model->JFETcapGD = 0; } if(!model->JFETgatePotentialGiven) { model->JFETgatePotential = 1; } if(!model->JFETgateSatCurrentGiven) { model->JFETgateSatCurrent = 1e-14; } if(!model->JFETdepletionCapCoeffGiven) { model->JFETdepletionCapCoeff = .5; } if(!model->JFETfNcoefGiven) { model->JFETfNcoef = 0; } if(!model->JFETfNexpGiven) { model->JFETfNexp = 1; } /* Modification for Sydney University JFET model */ if(!model->JFETbGiven) { model->JFETb = 1.0; } /* end Sydney University mod */ if(!model->JFETtcvGiven) { model->JFETtcv = 0.0; } if(!model->JFETbexGiven) { model->JFETbex = 0.0; } if(!model->JFETnlevGiven) { model->JFETnlev = 2; } if(!model->JFETgdsnoiGiven) { model->JFETgdsnoi = 1.0; } if(model->JFETdrainResist != 0) { model->JFETdrainConduct = 1/model->JFETdrainResist; } else { model->JFETdrainConduct = 0; } if(model->JFETsourceResist != 0) { model->JFETsourceConduct = 1/model->JFETsourceResist; } else { model->JFETsourceConduct = 0; } /* loop through all the instances of the model */ for (here = model->JFETinstances; here != NULL ; here=here->JFETnextInstance) { if(!here->JFETareaGiven) { here->JFETarea = 1; } if(!here->JFETmGiven) { here->JFETm = 1; } here->JFETstate = *states; *states += 13; if(model->JFETsourceResist != 0) { if(here->JFETsourcePrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->JFETname,"source"); if(error) return(error); here->JFETsourcePrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,3,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->JFETsourcePrimeNode = here->JFETsourceNode; } if(model->JFETdrainResist != 0) { if(here->JFETdrainPrimeNode == 0) { error = CKTmkVolt(ckt,&tmp,here->JFETname,"drain"); if(error) return(error); here->JFETdrainPrimeNode = tmp->number; if (ckt->CKTcopyNodesets) { CKTnode *tmpNode; IFuid tmpName; if (CKTinst2Node(ckt,here,1,&tmpNode,&tmpName)==OK) { if (tmpNode->nsGiven) { tmp->nodeset=tmpNode->nodeset; tmp->nsGiven=tmpNode->nsGiven; } } } } } else { here->JFETdrainPrimeNode = here->JFETdrainNode; } /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(JFETdrainDrainPrimePtr,JFETdrainNode,JFETdrainPrimeNode); TSTALLOC(JFETgateDrainPrimePtr,JFETgateNode,JFETdrainPrimeNode); TSTALLOC(JFETgateSourcePrimePtr,JFETgateNode,JFETsourcePrimeNode); TSTALLOC(JFETsourceSourcePrimePtr,JFETsourceNode,JFETsourcePrimeNode); TSTALLOC(JFETdrainPrimeDrainPtr,JFETdrainPrimeNode,JFETdrainNode); TSTALLOC(JFETdrainPrimeGatePtr,JFETdrainPrimeNode,JFETgateNode); TSTALLOC(JFETdrainPrimeSourcePrimePtr,JFETdrainPrimeNode,JFETsourcePrimeNode); TSTALLOC(JFETsourcePrimeGatePtr,JFETsourcePrimeNode,JFETgateNode); TSTALLOC(JFETsourcePrimeSourcePtr,JFETsourcePrimeNode,JFETsourceNode); TSTALLOC(JFETsourcePrimeDrainPrimePtr,JFETsourcePrimeNode,JFETdrainPrimeNode); TSTALLOC(JFETdrainDrainPtr,JFETdrainNode,JFETdrainNode); TSTALLOC(JFETgateGatePtr,JFETgateNode,JFETgateNode); TSTALLOC(JFETsourceSourcePtr,JFETsourceNode,JFETsourceNode); TSTALLOC(JFETdrainPrimeDrainPrimePtr,JFETdrainPrimeNode,JFETdrainPrimeNode); TSTALLOC(JFETsourcePrimeSourcePrimePtr,JFETsourcePrimeNode,JFETsourcePrimeNode); } } return(OK); } int JFETunsetup(GENmodel *inModel, CKTcircuit *ckt) { JFETmodel *model; JFETinstance *here; for (model = (JFETmodel *)inModel; model != NULL; model = model->JFETnextModel) { for (here = model->JFETinstances; here != NULL; here=here->JFETnextInstance) { if (here->JFETsourcePrimeNode && here->JFETsourcePrimeNode != here->JFETsourceNode) { CKTdltNNum(ckt, here->JFETsourcePrimeNode); here->JFETsourcePrimeNode = 0; } if (here->JFETdrainPrimeNode && here->JFETdrainPrimeNode != here->JFETdrainNode) { CKTdltNNum(ckt, here->JFETdrainPrimeNode); here->JFETdrainPrimeNode = 0; } } } return OK; } ngspice-26/src/spicelib/devices/jfet/jfet.c0000644000265600020320000001111612264261473020260 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "jfetdefs.h" #include "ngspice/suffix.h" IFparm JFETpTable[] = { /* device parameters */ IOPU("off", JFET_OFF, IF_FLAG, "Device initially off"), IOPAU("ic", JFET_IC, IF_REALVEC,"Initial VDS,VGS vector"), IOPU("area", JFET_AREA, IF_REAL, "Area factor"), IOPU("m", JFET_M, IF_REAL, "Parallel multiplier"), IOPAU("ic-vds", JFET_IC_VDS, IF_REAL, "Initial D-S voltage"), IOPAU("ic-vgs", JFET_IC_VGS, IF_REAL, "Initial G-S volrage"), IOPU("temp", JFET_TEMP, IF_REAL, "Instance temperature"), IOPU("dtemp", JFET_DTEMP, IF_REAL, "Instance temperature difference"), OPU("drain-node", JFET_DRAINNODE, IF_INTEGER,"Number of drain node"), OPU("gate-node", JFET_GATENODE, IF_INTEGER,"Number of gate node"), OPU("source-node", JFET_SOURCENODE, IF_INTEGER,"Number of source node"), OPU("drain-prime-node", JFET_DRAINPRIMENODE, IF_INTEGER,"Internal drain node"), OPU("source-prime-node",JFET_SOURCEPRIMENODE,IF_INTEGER, "Internal source node"), OP("vgs", JFET_VGS, IF_REAL, "Voltage G-S"), OP("vgd", JFET_VGD, IF_REAL, "Voltage G-D"), OP("ig", JFET_CG, IF_REAL, "Current at gate node"), OP("id", JFET_CD, IF_REAL, "Current at drain node"), OP("is", JFET_CS, IF_REAL, "Source current"), OP("igd", JFET_CGD, IF_REAL, "Current G-D"), OP("gm", JFET_GM, IF_REAL, "Transconductance"), OP("gds", JFET_GDS, IF_REAL, "Conductance D-S"), OP("ggs", JFET_GGS, IF_REAL, "Conductance G-S"), OP("ggd", JFET_GGD, IF_REAL, "Conductance G-D"), OPU("qgs", JFET_QGS, IF_REAL,"Charge storage G-S junction"), OPU("qgd", JFET_QGD, IF_REAL,"Charge storage G-D junction"), OPU("cqgs",JFET_CQGS, IF_REAL, "Capacitance due to charge storage G-S junction"), OPU("cqgd",JFET_CQGD, IF_REAL, "Capacitance due to charge storage G-D junction"), OPU("p", JFET_POWER,IF_REAL,"Power dissipated by the JFET"), }; IFparm JFETmPTable[] = { /* model parameters */ OP("type", JFET_MOD_TYPE, IF_STRING, "N-type or P-type JFET model"), IP("njf", JFET_MOD_NJF, IF_FLAG,"N type JFET model"), IP("pjf", JFET_MOD_PJF, IF_FLAG,"P type JFET model"), IOP("vt0", JFET_MOD_VTO, IF_REAL,"Threshold voltage"), IOPR("vto", JFET_MOD_VTO, IF_REAL,"Threshold voltage"), IOP("beta", JFET_MOD_BETA, IF_REAL,"Transconductance parameter"), IOP("lambda", JFET_MOD_LAMBDA, IF_REAL,"Channel length modulation param."), IOP("rd", JFET_MOD_RD, IF_REAL,"Drain ohmic resistance"), OPU("gd", JFET_MOD_DRAINCONDUCT, IF_REAL,"Drain conductance"), IOP("rs", JFET_MOD_RS, IF_REAL,"Source ohmic resistance"), OPU("gs",JFET_MOD_SOURCECONDUCT,IF_REAL,"Source conductance"), IOPA("cgs", JFET_MOD_CGS, IF_REAL,"G-S junction capactance"), IOPA("cgd", JFET_MOD_CGD, IF_REAL,"G-D junction cap"), IOP("pb", JFET_MOD_PB, IF_REAL,"Gate junction potential"), IOP("is", JFET_MOD_IS, IF_REAL,"Gate junction saturation current"), IOP("fc", JFET_MOD_FC, IF_REAL,"Forward bias junction fit parm."), /* Modification for Sydney University JFET model */ IOP("b", JFET_MOD_B, IF_REAL,"Doping tail parameter"), /* end Sydney University mod. */ IOPU("tnom", JFET_MOD_TNOM, IF_REAL,"parameter measurement temperature"), IOP("kf", JFET_MOD_KF, IF_REAL, "Flicker Noise Coefficient"), IOP("af", JFET_MOD_AF, IF_REAL, "Flicker Noise Exponent"), IOP("tcv", JFET_MOD_TCV, IF_REAL, "Threshold voltage temperature coefficient"), IOP("bex", JFET_MOD_BEX, IF_REAL, "Mobility temperature exponent"), IOP("nlev",JFET_MOD_NLEV, IF_INTEGER, "Noise equation selector"), IOP("gdsnoi", JFET_MOD_GDSNOI, IF_REAL, "Channel noise coefficient") }; char *JFETnames[] = { "Drain", "Gate", "Source" }; int JFETnSize = NUMELEMS(JFETnames); int JFETpTSize = NUMELEMS(JFETpTable); int JFETmPTSize = NUMELEMS(JFETmPTable); int JFETiSize = sizeof(JFETinstance); int JFETmSize = sizeof(JFETmodel); ngspice-26/src/spicelib/devices/jfet/Makefile.am0000644000265600020320000000103312264261473021215 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libjfet.la libjfet_la_SOURCES = \ jfet.c \ jfetacld.c \ jfetask.c \ jfetdefs.h \ jfetdel.c \ jfetdest.c \ jfetdist.c \ jfetdset.c \ jfetext.h \ jfetic.c \ jfetinit.c \ jfetinit.h \ jfetitf.h \ jfetload.c \ jfetmask.c \ jfetmdel.c \ jfetmpar.c \ jfetnoi.c \ jfetpar.c \ jfetpzld.c \ jfetset.c \ jfettemp.c \ jfettrun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/jfet/jfetdel.c0000644000265600020320000000155512264261473020753 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include "jfetdefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { JFETmodel *model = (JFETmodel*)inModel; JFETinstance **fast = (JFETinstance**)inst; JFETinstance **prev = NULL; JFETinstance *here; for( ; model ; model = model->JFETnextModel) { prev = &(model->JFETinstances); for(here = *prev; here ; here = *prev) { if(here->JFETname == name || (fast && here==*fast) ) { *prev= here->JFETnextInstance; FREE(here); return(OK); } prev = &(here->JFETnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/jfet/Makefile.in0000644000265600020320000004322012264261537021233 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/jfet DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libjfet_la_LIBADD = am_libjfet_la_OBJECTS = jfet.lo jfetacld.lo jfetask.lo jfetdel.lo \ jfetdest.lo jfetdist.lo jfetdset.lo jfetic.lo jfetinit.lo \ jfetload.lo jfetmask.lo jfetmdel.lo jfetmpar.lo jfetnoi.lo \ jfetpar.lo jfetpzld.lo jfetset.lo jfettemp.lo jfettrun.lo libjfet_la_OBJECTS = $(am_libjfet_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libjfet_la_SOURCES) DIST_SOURCES = $(libjfet_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libjfet.la libjfet_la_SOURCES = \ jfet.c \ jfetacld.c \ jfetask.c \ jfetdefs.h \ jfetdel.c \ jfetdest.c \ jfetdist.c \ jfetdset.c \ jfetext.h \ jfetic.c \ jfetinit.c \ jfetinit.h \ jfetitf.h \ jfetload.c \ jfetmask.c \ jfetmdel.c \ jfetmpar.c \ jfetnoi.c \ jfetpar.c \ jfetpzld.c \ jfetset.c \ jfettemp.c \ jfettrun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/jfet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/jfet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libjfet.la: $(libjfet_la_OBJECTS) $(libjfet_la_DEPENDENCIES) $(EXTRA_libjfet_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libjfet_la_OBJECTS) $(libjfet_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetacld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetdist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetdset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetic.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetnoi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetpzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfetset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfettemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jfettrun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/jfet/jfettemp.c0000644000265600020320000001063412264261473021152 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Sydney University mods Copyright(c) 1989 Anthony E. Parker, David J. Skellern Laboratory for Communication Science Engineering Sydney University Department of Electrical Engineering, Australia **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "jfetdefs.h" #include "ngspice/const.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int JFETtemp(GENmodel *inModel, CKTcircuit *ckt) /* Pre-process the model parameters after a possible change */ { JFETmodel *model = (JFETmodel*)inModel; JFETinstance *here; double xfc; double vt; double vtnom; double kt,kt1; double arg,arg1; double fact1,fact2; double egfet,egfet1; double pbfact,pbfact1; double gmanew,gmaold; double ratio1; double pbo; double cjfact,cjfact1; /* loop through all the diode models */ for( ; model != NULL; model = model->JFETnextModel ) { if(!(model->JFETtnomGiven)) { model->JFETtnom = ckt->CKTnomTemp; } vtnom = CONSTKoverQ * model->JFETtnom; fact1 = model->JFETtnom/REFTEMP; kt1 = CONSTboltz * model->JFETtnom; egfet1 = 1.16-(7.02e-4*model->JFETtnom*model->JFETtnom)/ (model->JFETtnom+1108); arg1 = -egfet1/(kt1+kt1)+1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact1 = -2*vtnom * (1.5*log(fact1)+CHARGE*arg1); pbo = (model->JFETgatePotential-pbfact1)/fact1; gmaold = (model->JFETgatePotential-pbo)/pbo; cjfact = 1/(1+.5*(4e-4*(model->JFETtnom-REFTEMP)-gmaold)); if(model->JFETdrainResist != 0) { model->JFETdrainConduct = 1/model->JFETdrainResist; } else { model->JFETdrainConduct = 0; } if(model->JFETsourceResist != 0) { model->JFETsourceConduct = 1/model->JFETsourceResist; } else { model->JFETsourceConduct = 0; } if(model->JFETdepletionCapCoeff >.95) { SPfrontEnd->IFerror (ERR_WARNING, "%s: Depletion cap. coefficient too large, limited to .95", &(model->JFETmodName)); model->JFETdepletionCapCoeff = .95; } xfc = log(1 - model->JFETdepletionCapCoeff); model->JFETf2 = exp((1+.5)*xfc); model->JFETf3 = 1 - model->JFETdepletionCapCoeff * (1 + .5); /* Modification for Sydney University JFET model */ model->JFETbFac = (1 - model->JFETb) / (model->JFETgatePotential - model->JFETthreshold); /* end Sydney University mod */ /* loop through all the instances of the model */ for (here = model->JFETinstances; here != NULL ; here=here->JFETnextInstance) { if(!(here->JFETdtempGiven)) { here->JFETdtemp = 0.0; } if(!(here->JFETtempGiven)) { here->JFETtemp = ckt->CKTtemp + here->JFETdtemp; } vt = here->JFETtemp * CONSTKoverQ; fact2 = here->JFETtemp/REFTEMP; ratio1 = here->JFETtemp/model->JFETtnom -1; here->JFETtSatCur = model->JFETgateSatCurrent * exp(ratio1*1.11/vt); here->JFETtCGS = model->JFETcapGS * cjfact; here->JFETtCGD = model->JFETcapGD * cjfact; kt = CONSTboltz*here->JFETtemp; egfet = 1.16-(7.02e-4*here->JFETtemp*here->JFETtemp)/ (here->JFETtemp+1108); arg = -egfet/(kt+kt) + 1.1150877/(CONSTboltz*(REFTEMP+REFTEMP)); pbfact = -2 * vt * (1.5*log(fact2)+CHARGE*arg); here->JFETtGatePot = fact2 * pbo + pbfact; gmanew = (here->JFETtGatePot-pbo)/pbo; cjfact1 = 1+.5*(4e-4*(here->JFETtemp-REFTEMP)-gmanew); here->JFETtCGS *= cjfact1; here->JFETtCGD *= cjfact1; here->JFETcorDepCap = model->JFETdepletionCapCoeff * here->JFETtGatePot; here->JFETf1 = here->JFETtGatePot * (1 - exp((1-.5)*xfc))/(1-.5); here->JFETvcrit = vt * log(vt/(CONSTroot2 * here->JFETtSatCur)); here->JFETtThreshold = model->JFETthreshold - model->JFETtcv*(here->JFETtemp-model->JFETtnom); here->JFETtBeta = model->JFETbeta * pow(here->JFETtemp/model->JFETtnom,model->JFETbex); } } return(OK); } ngspice-26/src/spicelib/devices/cktfinddev.c0000644000265600020320000000057012264261473020523 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/config.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "string.h" GENinstance * CKTfndDev(CKTcircuit *ckt, IFuid name) { return nghash_find(ckt->DEVnameHash, name); } ngspice-26/src/spicelib/devices/res/0000755000265600020320000000000012264261710017017 5ustar andreasadminngspice-26/src/spicelib/devices/res/resdest.c0000644000265600020320000000140312264261473020640 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "resdefs.h" void RESdestroy(GENmodel **inModel) { RESmodel **model = (RESmodel **)inModel; RESinstance *here; RESinstance *prev = NULL; RESmodel *mod = *model; RESmodel *oldmod = NULL; for( ; mod ; mod = mod->RESnextModel) { if(oldmod) FREE(oldmod); oldmod = mod; prev = NULL; for(here = mod->RESinstances ; here ; here = here->RESnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); } if(oldmod) FREE(oldmod); *model = NULL; } ngspice-26/src/spicelib/devices/res/resmdel.c0000644000265600020320000000174612264261473020634 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESmDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { RESmodel **model = (RESmodel **)inModel; RESmodel *modfast = (RESmodel *)kill; RESinstance *here; RESinstance *prev = NULL; RESmodel **oldmod; oldmod = model; for( ; *model ; model = &((*model)->RESnextModel)) { if( (*model)->RESmodName == modname || (modfast && *model == modfast) ) goto delgot; oldmod = model; } return(E_NOMOD); delgot: *oldmod = (*model)->RESnextModel; /* cut deleted device out of list */ for(here = (*model)->RESinstances ; here ; here = here->RESnextInstance) { if(prev) FREE(prev); prev = here; } if(prev) FREE(prev); FREE(*model); return(OK); } ngspice-26/src/spicelib/devices/res/resmpar.c0000644000265600020320000000372712264261473020653 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESmParam(int param, IFvalue *value, GENmodel *inModel) { RESmodel *model = (RESmodel *)inModel; switch(param) { case RES_MOD_TNOM: model->REStnom = value->rValue+CONSTCtoK; model->REStnomGiven = TRUE; break; case RES_MOD_TC1: model->REStempCoeff1 = value->rValue; model->REStc1Given = TRUE; break; case RES_MOD_TC2: model->REStempCoeff2 = value->rValue; model->REStc2Given = TRUE; break; case RES_MOD_RSH: model->RESsheetRes = value->rValue; model->RESsheetResGiven = TRUE; break; case RES_MOD_DEFWIDTH: model->RESdefWidth = value->rValue; model->RESdefWidthGiven = TRUE; break; case RES_MOD_DEFLENGTH: model->RESdefLength = value->rValue; model->RESdefLengthGiven = TRUE; break; case RES_MOD_NARROW: model->RESnarrow = value->rValue; model->RESnarrowGiven = TRUE; break; case RES_MOD_SHORT: model->RESshort = value->rValue; model->RESshortGiven = TRUE; break; case RES_MOD_KF: model->RESfNcoef = value->rValue; model->RESfNcoefGiven = TRUE; break; case RES_MOD_AF: model->RESfNexp = value->rValue; model->RESfNexpGiven = TRUE; break; case RES_MOD_BV_MAX: model->RESbv_max = value->rValue; model->RESbv_maxGiven = TRUE; break; case RES_MOD_R: if ( value->rValue > 1e-03 ) { model->RESres = value->rValue; model->RESresGiven = TRUE; } break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/res/resitf.h0000644000265600020320000000025512264261473020474 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_RES #define DEV_RES SPICEdev *get_res_info(void); #endif ngspice-26/src/spicelib/devices/res/resdel.c0000644000265600020320000000154712264261473020456 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ /* */ #include "ngspice/ngspice.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESdelete(GENmodel *inModel, IFuid name, GENinstance **inst) { RESmodel *model = (RESmodel *)inModel; RESinstance **fast = (RESinstance **)inst; RESinstance **prev = NULL; RESinstance *here; for( ; model ; model = model->RESnextModel) { prev = &(model->RESinstances); for(here = *prev; here ; here = *prev) { if(here->RESname == name || (fast && here==*fast) ) { *prev= here->RESnextInstance; FREE(here); return(OK); } prev = &(here->RESnextInstance); } } return(E_NODEV); } ngspice-26/src/spicelib/devices/res/resmask.c0000644000265600020320000000370712264261473020645 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "resdefs.h" #include "ngspice/sperror.h" #include "ngspice/devdefs.h" int RESmodAsk(CKTcircuit *ckt, GENmodel *inModel, int which, IFvalue *value) { RESmodel *model = (RESmodel *)inModel; NG_IGNORE(ckt); switch(which) { case RES_MOD_TNOM: value->rValue = model->REStnom-CONSTCtoK; return(OK); case RES_MOD_TC1: value->rValue = model->REStempCoeff1; return(OK); case RES_MOD_TC2: value->rValue = model->REStempCoeff2; return(OK); case RES_MOD_RSH: value->rValue = model->RESsheetRes; return(OK); case RES_MOD_DEFWIDTH: value->rValue = model->RESdefWidth; return(OK); case RES_MOD_DEFLENGTH: value->rValue = model->RESdefLength; return(OK); case RES_MOD_NARROW: value->rValue = model->RESnarrow; return(OK); case RES_MOD_SHORT: value->rValue = model->RESshort; return(OK); case RES_MOD_KF: if (model->RESfNcoefGiven) value->rValue = model->RESfNcoef; else value->rValue = 0.0; return(OK); case RES_MOD_AF: if (model->RESfNexpGiven) value->rValue = model->RESfNexp; else value->rValue = 0.0; return(OK); case RES_MOD_BV_MAX: value->rValue = model->RESbv_max; return(OK); case RES_MOD_R: value->rValue = model->RESres; return(OK); default: return(E_BADPARM); } } ngspice-26/src/spicelib/devices/res/resinit.c0000644000265600020320000000416712264261473020656 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "resitf.h" #include "resext.h" #include "resinit.h" SPICEdev RESinfo = { { "Resistor", "Simple linear resistor", &RESnSize, &RESnSize, RESnames, &RESpTSize, RESpTable, &RESmPTSize, RESmPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif 0 }, /* DEVparam */ RESparam, /* DEVmodParam */ RESmParam, /* DEVload */ RESload, /* DEVsetup */ RESsetup, /* DEVunsetup */ NULL, /* DEVpzSetup */ RESsetup, /* DEVtemperature*/ REStemp, /* DEVtrunc */ NULL, /* DEVfindBranch */ NULL, /* DEVacLoad */ RESacload, /* ac load and normal load are identical */ /* DEVaccept */ NULL, /* DEVdestroy */ RESdestroy, /* DEVmodDelete */ RESmDelete, /* DEVdelete */ RESdelete, /* DEVsetic */ NULL, /* DEVask */ RESask, /* DEVmodAsk */ RESmodAsk, /* DEVpzLoad */ RESpzLoad, /* DEVconvTest */ NULL, /* RESconvTest, XXXX experimental */ /* DEVsenSetup */ RESsSetup, /* DEVsenLoad */ RESsLoad, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ RESsAcLoad, /* DEVsenPrint */ RESsPrint, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ RESnoise, /* DEVsoaCheck */ RESsoaCheck, #ifdef CIDER /* DEVdump */ NULL, /* DEVacct */ NULL, #endif /* DEVinstSize */ &RESiSize, /* DEVmodSize */ &RESmSize }; SPICEdev * get_res_info(void) { return &RESinfo; } ngspice-26/src/spicelib/devices/res/res.c0000644000265600020320000000733612264261473017773 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include "resdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" IFparm RESpTable[] = { /* parameters */ IOPP( "resistance", RES_RESIST, IF_REAL, "Resistance"), IOPAA( "ac", RES_ACRESIST, IF_REAL, "AC resistance value"), IOPZU( "temp", RES_TEMP, IF_REAL, "Instance operating temperature"), IOPZ( "dtemp", RES_DTEMP, IF_REAL, "Instance temperature difference with the rest of the circuit"), IOPQU( "l", RES_LENGTH, IF_REAL, "Length"), IOPZU( "w", RES_WIDTH, IF_REAL, "Width"), IOPU( "m", RES_M, IF_REAL, "Multiplication factor"), IOPU( "tc", RES_TC1, IF_REAL, "First order temp. coefficient"), IOPU( "tc1", RES_TC1, IF_REAL, "First order temp. coefficient"), IOPU( "tc2", RES_TC2, IF_REAL, "Second order temp. coefficient"), IOP( "bv_max", RES_BV_MAX, IF_REAL, "maximum voltage over resistor"), IOPU( "scale", RES_SCALE, IF_REAL, "Scale factor"), IOP( "noisy", RES_NOISY, IF_INTEGER, "Resistor generate noise"), IP( "sens_resist", RES_RESIST_SENS, IF_FLAG, "flag to request sensitivity WRT resistance"), OP( "i", RES_CURRENT, IF_REAL, "Current"), OP( "p", RES_POWER, IF_REAL, "Power"), OPU( "sens_dc", RES_QUEST_SENS_DC, IF_REAL, "dc sensitivity "), OPU( "sens_real", RES_QUEST_SENS_REAL, IF_REAL, "dc sensitivity and real part of ac sensitivity"), OPU( "sens_imag", RES_QUEST_SENS_IMAG, IF_REAL, "dc sensitivity and imag part of ac sensitivity"), OPU( "sens_mag", RES_QUEST_SENS_MAG, IF_REAL, "ac sensitivity of magnitude"), OPU( "sens_ph", RES_QUEST_SENS_PH, IF_REAL, "ac sensitivity of phase"), OPU( "sens_cplx", RES_QUEST_SENS_CPLX, IF_COMPLEX, "ac sensitivity") }; IFparm RESmPTable[] = { /* model parameters */ IOPQ( "rsh", RES_MOD_RSH, IF_REAL,"Sheet resistance"), IOPZ( "narrow", RES_MOD_NARROW, IF_REAL,"Narrowing of resistor"), IOPR( "dw", RES_MOD_NARROW, IF_REAL,"Narrowing of resistor"), IOPZ( "short", RES_MOD_SHORT, IF_REAL,"Shortening of resistor"), IOPR( "dlr", RES_MOD_SHORT, IF_REAL,"Shortening of resistor"), IOPQ( "tc1", RES_MOD_TC1, IF_REAL,"First order temp. coefficient"), IOPR( "tc1r", RES_MOD_TC1, IF_REAL,"First order temp. coefficient"), IOPQO( "tc2", RES_MOD_TC2, IF_REAL,"Second order temp. coefficient"), IOPR( "tc2r", RES_MOD_TC2, IF_REAL,"Second order temp. coefficient"), IOPX( "defw", RES_MOD_DEFWIDTH, IF_REAL,"Default device width"), IOPR( "w", RES_MOD_DEFWIDTH, IF_REAL,"Default device width"), IOPX( "l", RES_MOD_DEFLENGTH,IF_REAL,"Default device length"), IOPQ( "kf", RES_MOD_KF, IF_REAL,"Flicker noise coefficient"), IOPQ( "af", RES_MOD_AF, IF_REAL,"Flicker noise exponent"), IOPXU( "tnom", RES_MOD_TNOM, IF_REAL,"Parameter measurement temperature"), IOP( "r", RES_MOD_R, IF_REAL,"Resistor model default value"), IOPR( "res", RES_MOD_R, IF_REAL,"Resistor model default value"), IOP( "bv_max", RES_MOD_BV_MAX, IF_REAL,"maximum voltage over resistor") }; char *RESnames[] = { "R+", "R-" }; int RESnSize = NUMELEMS(RESnames); int RESpTSize = NUMELEMS(RESpTable); int RESmPTSize = NUMELEMS(RESmPTable); int RESiSize = sizeof(RESinstance); int RESmSize = sizeof(RESmodel); ngspice-26/src/spicelib/devices/res/restemp.c0000644000265600020320000001020012264261473020641 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified Apr 2000 - Paolo Nenzi Modified: 2000 AlanSfixes **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" int REStemp(GENmodel *inModel, CKTcircuit *ckt) /* perform the temperature update to the resistors * calculate the conductance as a function of the * given nominal and current temperatures - the * resistance given in the struct is the nominal * temperature resistance */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; double factor; double difference; double tc1, tc2; /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { /* Default Value Processing for Resistor Models */ if(!model->REStnomGiven) model->REStnom = ckt->CKTnomTemp; if(!model->RESsheetResGiven) model->RESsheetRes = 0.0; if(!model->RESdefWidthGiven) model->RESdefWidth = 10e-6; /*M*/ if(!model->RESdefLengthGiven) model->RESdefLength = 10e-6; if(!model->REStc1Given) model->REStempCoeff1 = 0.0; if(!model->REStc2Given) model->REStempCoeff2 = 0.0; if(!model->RESnarrowGiven) model->RESnarrow = 0.0; if(!model->RESshortGiven) model->RESshort = 0.0; if(!model->RESfNcoefGiven) model->RESfNcoef = 0.0; if(!model->RESfNexpGiven) model->RESfNexp = 1.0; /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { /* Default Value Processing for Resistor Instance */ if(!here->REStempGiven) { here->REStemp = ckt->CKTtemp; if(!here->RESdtempGiven) here->RESdtemp = 0.0; } else { /* REStempGiven */ here->RESdtemp = 0.0; if (here->RESdtempGiven) printf("%s: Instance temperature specified, dtemp ignored\n", here->RESname); } if(!here->RESwidthGiven) here->RESwidth = model->RESdefWidth; if(!here->RESlengthGiven) here->RESlength = model->RESdefLength; if(!here->RESscaleGiven) here->RESscale = 1.0; if(!here->RESmGiven) here->RESm = 1.0; if(!here->RESnoisyGiven) here->RESnoisy = 1; if(!here->RESresGiven) { if(here->RESlength * here->RESwidth * model->RESsheetRes > 0.0) { here->RESresist = model->RESsheetRes * (here->RESlength - model->RESshort) / (here->RESwidth - model->RESnarrow); } else { if(model->RESresGiven) { here->RESresist = model->RESres; } else { SPfrontEnd->IFerror (ERR_WARNING, "%s: resistance to low, set to 1 mOhm", &(here->RESname)); here->RESresist = 1e-03; } } } difference = (here->REStemp + here->RESdtemp) - model->REStnom; /* instance parameters tc1 and tc2 will override model parameters tc1 and tc2 */ if (here->REStc1Given) tc1 = here->REStc1; /* instance */ else tc1 = model->REStempCoeff1; /* model */ if (here->REStc2Given) tc2 = here->REStc2; else tc2 = model->REStempCoeff2; factor = 1.0 + tc1*difference + tc2*difference*difference; here -> RESconduct = (1.0/(here->RESresist * factor * here->RESscale)); /* Paolo Nenzi: AC value */ if(here->RESacresGiven) here->RESacConduct = (1.0/(here->RESacResist * factor * here->RESscale)); else { here -> RESacConduct = here -> RESconduct; here -> RESacResist = here -> RESresist; } } } return(OK); } ngspice-26/src/spicelib/devices/res/respzld.c0000644000265600020320000000223512264261473020656 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "ngspice/sperror.h" #include "resdefs.h" int RESpzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) /* actually load the current resistance value into the * sparse matrix previously provided */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; double m; NG_IGNORE(s); NG_IGNORE(ckt); /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { m = here->RESm; *(here->RESposPosptr) += m * here->RESconduct; *(here->RESnegNegptr) += m * here->RESconduct; *(here->RESposNegptr) -= m * here->RESconduct; *(here->RESnegPosptr) -= m * here->RESconduct; } } return(OK); } ngspice-26/src/spicelib/devices/res/resinit.h0000644000265600020320000000035612264261473020657 0ustar andreasadmin#ifndef _RESINIT_H #define _RESINIT_H extern IFparm RESpTable[ ]; extern IFparm RESmPTable[ ]; extern char *RESnames[ ]; extern int RESpTSize; extern int RESmPTSize; extern int RESnSize; extern int RESiSize; extern int RESmSize; #endif ngspice-26/src/spicelib/devices/res/resload.c0000644000265600020320000000455012264261473020626 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" /* actually load the current resistance value into the sparse matrix * previously provided */ int RESload(GENmodel *inModel, CKTcircuit *ckt) { RESmodel *model = (RESmodel *)inModel; double m; /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { RESinstance *here; /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here = here->RESnextInstance) { here->REScurrent = (*(ckt->CKTrhsOld+here->RESposNode) - *(ckt->CKTrhsOld+here->RESnegNode)) * here->RESconduct; m = (here->RESm); *(here->RESposPosptr) += m * here->RESconduct; *(here->RESnegNegptr) += m * here->RESconduct; *(here->RESposNegptr) -= m * here->RESconduct; *(here->RESnegPosptr) -= m * here->RESconduct; } } return(OK); } /* actually load the current resistance value into the sparse matrix * previously provided */ int RESacload(GENmodel *inModel, CKTcircuit *ckt) { RESmodel *model = (RESmodel *)inModel; double m; NG_IGNORE(ckt); /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { RESinstance *here; /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here = here->RESnextInstance) { m = (here->RESm); if(here->RESacresGiven) { *(here->RESposPosptr) += m * here->RESacConduct; *(here->RESnegNegptr) += m * here->RESacConduct; *(here->RESposNegptr) -= m * here->RESacConduct; *(here->RESnegPosptr) -= m * here->RESacConduct; } else { *(here->RESposPosptr) += m * here->RESconduct; *(here->RESnegNegptr) += m * here->RESconduct; *(here->RESposNegptr) -= m * here->RESconduct; *(here->RESnegPosptr) -= m * here->RESconduct; } } } return(OK); } ngspice-26/src/spicelib/devices/res/resdefs.h0000644000265600020320000001637212264261473020642 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #ifndef RES #define RES #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/complex.h" #include "ngspice/noisedef.h" /* definitions used to describe resistors */ /* information used to describe a single instance */ typedef struct sRESinstance { struct sRESmodel *RESmodPtr; /* backpointer to model */ struct sRESinstance *RESnextInstance; /* pointer to next instance of * current model*/ IFuid RESname; /* pointer to character string naming this instance */ int RESstate; /* not used but needed for sructure consistency */ int RESposNode; /* number of positive node of resistor */ int RESnegNode; /* number of negative node of resistor */ double REStemp; /* temperature at which this resistor operates */ double RESdtemp; /* delta-temperature of a particular instance */ double RESconduct; /* conductance at current analysis temperature */ double RESresist; /* resistance at temperature Tnom */ double REScurrent; /* The dc current in the resistor */ /* serban */ double RESacResist; /* AC resistance, useful for fancy .ac analyses */ double RESacConduct; /* AC conductance */ double RESwidth; /* width of the resistor */ double RESlength; /* length of the resistor */ double RESscale; /* Scale factor */ double RESm; /* Multiplicity factor for this instance */ double REStc1; /* first temperature coefficient of resistors */ double REStc2; /* second temperature coefficient of resistors */ double RESbv_max; /* Maximum resistor voltage */ int RESnoisy; /* Set if the resistor generates noise */ double *RESposPosptr; /* pointer to sparse matrix diagonal at * (positive,positive) */ double *RESnegNegptr; /* pointer to sparse matrix diagonal at * (negative,negative) */ double *RESposNegptr; /* pointer to sparse matrix offdiagonal at * (positive,negative) */ double *RESnegPosptr; /* pointer to sparse matrix offdiagonal at * (negative,positive) */ unsigned RESresGiven : 1; /* flag to indicate resistance was specified */ unsigned RESwidthGiven : 1; /* flag to indicate width given */ unsigned RESlengthGiven : 1; /* flag to indicate length given */ unsigned RESscaleGiven : 1; /* flag to indicate scale given */ unsigned REStempGiven : 1; /* indicates temperature specified */ unsigned RESdtempGiven : 1; /* indicates delta-temp specified */ /* serban */ unsigned RESacresGiven : 1; /* indicates AC value specified */ unsigned RESmGiven : 1; /* indicates M parameter specified */ unsigned REStc1Given : 1; /* indicates tc1 parameter specified */ unsigned REStc2Given : 1; /* indicates tc2 parameter specified */ unsigned RESnoisyGiven : 1; /* indicates if noisy is specified */ unsigned RESbv_maxGiven : 1; /* flags indicates maximum voltage is given */ int RESsenParmNo; /* parameter # for sensitivity use; * set equal to 0 if not a design parameter*/ /* indices to array of RES noise sources */ #define RESTHNOIZ 0 /* Thermal noise source */ #define RESFLNOIZ 1 /* Flicker noise source */ #define RESTOTNOIZ 2 /* Total noise */ #define RESNSRCS 3 /* the number of RES noise sources */ #ifndef NONOISE double RESnVar[NSTATVARS][RESNSRCS]; #else /* NONOISE */ double **RESnVar; #endif /* NONOISE */ } RESinstance ; /* per model data */ typedef struct sRESmodel { /* model structure for a resistor */ int RESmodType; /* type index of this device type */ struct sRESmodel *RESnextModel; /* pointer to next possible model in * linked list */ RESinstance * RESinstances; /* pointer to list of instances that have this * model */ IFuid RESmodName; /* pointer to character string naming this model */ double REStnom; /* temperature at which resistance measured */ double REStempCoeff1; /* first temperature coefficient of resistors */ double REStempCoeff2; /* second temperature coefficient of resistors */ double RESsheetRes; /* sheet resistance of devices in ohms/square */ double RESdefWidth; /* default width of a resistor */ double RESdefLength; /* default length of a resistor */ double RESnarrow; /* amount by which device is narrower than drawn */ double RESshort; /* amount by which device is shorter than drawn */ double RESfNcoef; /* Flicker noise coefficient */ double RESfNexp; /* Flicker noise exponent */ double RESres; /* Default model resistance */ double RESbv_max; /* Maximum resistor voltage */ unsigned REStnomGiven :1; /* flag to indicate nominal temp. was given */ unsigned REStc1Given :1; /* flag to indicate tc1 was specified */ unsigned REStc2Given :1; /* flag to indicate tc2 was specified */ unsigned RESsheetResGiven :1; /* flag to indicate sheet resistance given*/ unsigned RESdefWidthGiven :1; /* flag to indicate default width given */ unsigned RESdefLengthGiven :1; /* flag to indicate default length given */ unsigned RESnarrowGiven :1; /* flag to indicate narrow effect given */ unsigned RESshortGiven :1; /* flag to indicate short effect given */ unsigned RESfNcoefGiven :1; /* flag to indicate kf given */ unsigned RESfNexpGiven :1; /* flag to indicate af given */ unsigned RESresGiven :1; /* flag to indicate model resistance given */ unsigned RESbv_maxGiven :1; /* flags indicates maximum voltage is given */ } RESmodel; /* device parameters */ #define RES_RESIST 1 #define RES_WIDTH 2 #define RES_LENGTH 3 #define RES_CONDUCT 4 #define RES_RESIST_SENS 5 #define RES_CURRENT 6 #define RES_POWER 7 #define RES_TEMP 8 /* serban */ #define RES_ACRESIST 10 #define RES_ACCONDUCT 11 #define RES_M 12 /* pn */ #define RES_SCALE 13 /* pn */ #define RES_DTEMP 14 /* pn */ #define RES_NOISY 15 /* pn */ /* tanaka */ #define RES_TC1 16 #define RES_TC2 17 #define RES_BV_MAX 18 /* model parameters */ #define RES_MOD_TC1 101 #define RES_MOD_TC2 102 #define RES_MOD_RSH 103 #define RES_MOD_DEFWIDTH 104 #define RES_MOD_DEFLENGTH 105 #define RES_MOD_NARROW 106 #define RES_MOD_R 107 #define RES_MOD_TNOM 108 #define RES_MOD_SHORT 109 #define RES_MOD_KF 110 #define RES_MOD_AF 111 #define RES_MOD_BV_MAX 112 /* device questions */ #define RES_QUEST_SENS_REAL 201 #define RES_QUEST_SENS_IMAG 202 #define RES_QUEST_SENS_MAG 203 #define RES_QUEST_SENS_PH 204 #define RES_QUEST_SENS_CPLX 205 #define RES_QUEST_SENS_DC 206 /* model questions */ #include "resext.h" #endif /*RES*/ ngspice-26/src/spicelib/devices/res/ressacl.c0000644000265600020320000000370612264261473020633 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESsAcLoad(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current ac sensitivity info into the * array previously provided */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; double vres; double ivres; double value; double ivalue; /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { if(here->RESsenParmNo){ vres = *(ckt->CKTrhsOld+here->RESposNode) - *(ckt->CKTrhsOld+here->RESnegNode); ivres = *(ckt->CKTirhsOld+here->RESposNode) - *(ckt->CKTirhsOld+here->RESnegNode); value = vres * here->RESacConduct * here->RESacConduct; value = value * here->RESm * here->RESm; ivalue = ivres * here->RESacConduct * here->RESacConduct; ivalue = ivalue * here->RESm * here->RESm; /* load the RHS matrix */ *(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] + here->RESsenParmNo) += value; *(ckt->CKTsenInfo->SEN_iRHS[here->RESposNode] + here->RESsenParmNo) += ivalue; *(ckt->CKTsenInfo->SEN_RHS[here->RESnegNode] + here->RESsenParmNo) -= value; *(ckt->CKTsenInfo->SEN_iRHS[here->RESnegNode] + here->RESsenParmNo) -= ivalue; } } } return(OK); } ngspice-26/src/spicelib/devices/res/ressetup.c0000644000265600020320000000305012264261473021041 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state) /* load the resistor structure with those pointers needed later * for fast matrix loading */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; NG_IGNORE(state); NG_IGNORE(ckt); /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { if(!model->RESbv_maxGiven) model->RESbv_max = 1e99; /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { if(!here->RESmGiven) here->RESm = 1.0; if(!here->RESbv_maxGiven) here->RESbv_max = model->RESbv_max; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if((here->ptr = SMPmakeElt(matrix, here->first, here->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(RESposPosptr, RESposNode, RESposNode); TSTALLOC(RESnegNegptr, RESnegNode, RESnegNode); TSTALLOC(RESposNegptr, RESposNode, RESnegNode); TSTALLOC(RESnegPosptr, RESnegNode, RESposNode); } } return(OK); } ngspice-26/src/spicelib/devices/res/resparam.c0000644000265600020320000000441612264261473021010 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "resdefs.h" #include "ngspice/sperror.h" #include "ngspice/missing_math.h" #include "ngspice/fteext.h" int RESparam(int param, IFvalue *value, GENinstance *inst, IFvalue *select) { double scale; RESinstance *here = (RESinstance *)inst; NG_IGNORE(select); if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; switch(param) { case RES_TEMP: here->REStemp = value->rValue + CONSTCtoK; here->REStempGiven = TRUE; break; case RES_DTEMP: here->RESdtemp = value->rValue; here->RESdtempGiven = TRUE; break; case RES_RESIST: /* 0 valued resistor causes ngspice to hang -- can't solve for initial voltage */ if ( AlmostEqualUlps( value->rValue, 0, 3 ) ) value->rValue = 0.001; /* 0.001 should be sufficiently small */ here->RESresist = value->rValue; here->RESresGiven = TRUE; break; case RES_ACRESIST: here->RESacResist = value->rValue; here->RESacresGiven = TRUE; break; case RES_WIDTH: here->RESwidth = value->rValue * scale; here->RESwidthGiven = TRUE; break; case RES_LENGTH: here->RESlength = value->rValue * scale; here->RESlengthGiven = TRUE; break; case RES_SCALE: here->RESscale = value->rValue; here->RESscaleGiven = TRUE; break; case RES_RESIST_SENS: here->RESsenParmNo = value->iValue; break; case RES_M: here->RESm = value->rValue; here->RESmGiven = TRUE; break; case RES_TC1: here->REStc1 = value->rValue; here->REStc1Given = TRUE; break; case RES_TC2: here->REStc2 = value->rValue; here->REStc2Given = TRUE; break; case RES_NOISY: here->RESnoisy = value->iValue; here->RESnoisyGiven = TRUE; break; case RES_BV_MAX: here->RESbv_max = value->rValue; here->RESbv_maxGiven = TRUE; break; default: return(E_BADPARM); } return(OK); } ngspice-26/src/spicelib/devices/res/ressset.c0000644000265600020320000000176112264261473020666 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" int RESsSetup(SENstruct *info, GENmodel *inModel) /* loop through all the devices and * assign parameter #s to design parameters */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { if(here->RESsenParmNo){ here->RESsenParmNo = ++(info->SENparms); } } } return(OK); } ngspice-26/src/spicelib/devices/res/ressoachk.c0000644000265600020320000000227512264261473021161 0ustar andreasadmin/********** Copyright 2013 Dietmar Warning. All rights reserved. Author: 2013 Dietmar Warning **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" #include "ngspice/cpdefs.h" int RESsoaCheck(CKTcircuit *ckt, GENmodel *inModel) { RESmodel *model = (RESmodel *) inModel; RESinstance *here; double vr; /* current resistor voltage */ int maxwarns; static int warns_bv = 0; if (!ckt) { warns_bv = 0; return OK; } maxwarns = ckt->CKTsoaMaxWarns; for (; model; model = model->RESnextModel) { for (here = model->RESinstances; here; here = here->RESnextInstance) { vr = fabs(ckt->CKTrhsOld [here->RESposNode] - ckt->CKTrhsOld [here->RESnegNode]); if (vr > here->RESbv_max) if (warns_bv < maxwarns) { soa_printf(ckt, (GENinstance*) here, "|Vr|=%g has exceeded Bv_max=%g\n", vr, here->RESbv_max); warns_bv++; } } } return OK; } ngspice-26/src/spicelib/devices/res/resext.h0000644000265600020320000000202612264261473020510 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ extern int RESask(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); extern int RESdelete(GENmodel*,IFuid,GENinstance**); extern void RESdestroy(GENmodel**); extern int RESload(GENmodel*,CKTcircuit*); extern int RESacload(GENmodel*,CKTcircuit*); extern int RESmodAsk(CKTcircuit*,GENmodel*,int,IFvalue*); extern int RESmDelete(GENmodel**,IFuid,GENmodel*); extern int RESmParam(int,IFvalue*,GENmodel*); extern int RESparam(int,IFvalue*,GENinstance*,IFvalue*); extern int RESpzLoad(GENmodel*,CKTcircuit*,SPcomplex*); extern int RESsAcLoad(GENmodel*,CKTcircuit*); extern int RESsLoad(GENmodel*,CKTcircuit*); extern int RESsSetup(SENstruct*,GENmodel*); extern void RESsPrint(GENmodel*,CKTcircuit*); extern int RESsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*); extern int REStemp(GENmodel*,CKTcircuit*); extern int RESnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*); extern int RESsoaCheck(CKTcircuit *, GENmodel *); ngspice-26/src/spicelib/devices/res/Makefile.am0000644000265600020320000000101512264261473021056 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libres.la libres_la_SOURCES = \ res.c \ resask.c \ resdefs.h \ resdel.c \ resdest.c \ resext.h \ resinit.c \ resinit.h \ resitf.h \ resload.c \ resmask.c \ resmdel.c \ resmpar.c \ resnoise.c \ resparam.c \ respzld.c \ ressacl.c \ ressetup.c \ ressoachk.c \ ressload.c \ ressprt.c \ ressset.c \ restemp.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/res/ressprt.c0000644000265600020320000000270412264261473020676 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2002 - Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ /* Pretty print the sensitivity info for all * the resistors in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" void RESsPrint(GENmodel *inModel, CKTcircuit *ckt) { RESmodel *model = (RESmodel *)inModel; RESinstance *here; printf("RESISTORS-----------------\n"); /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { printf("Model name:%s\n",model->RESmodName); /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { printf(" Instance name:%s\n",here->RESname); printf(" Positive, negative nodes: %s, %s\n", CKTnodName(ckt,here->RESposNode),CKTnodName(ckt,here->RESnegNode)); printf(" Multiplier: %g ",here->RESm); printf(here->RESmGiven ? "(specified)\n" : "(default)\n"); printf(" Resistance: %f ",here->RESresist); printf(here->RESresGiven ? "(specified)\n" : "(default)\n"); printf(" RESsenParmNo:%d\n",here->RESsenParmNo); } } } ngspice-26/src/spicelib/devices/res/resask.c0000644000265600020320000001400512264261473020461 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "resdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" /* TODO : there are "double" value compared with 0 (eg: vm == 0) * Need to substitute this check with a suitable eps. * PN 2003 */ int RESask(CKTcircuit *ckt, GENinstance *inst, int which, IFvalue *value, IFvalue *select) { RESinstance *fast = (RESinstance *)inst; double vr; double vi; double sr; double si; double vm; static char *msg = "Current and power not available for ac analysis"; switch(which) { case RES_TEMP: value->rValue = fast->REStemp - CONSTCtoK; return(OK); case RES_DTEMP: value->rValue = fast->RESdtemp; return(OK); case RES_CONDUCT: value->rValue = fast->RESconduct; value->rValue *= fast->RESm; return(OK); case RES_RESIST: value->rValue = fast->RESresist; value->rValue /= fast->RESm; return(OK); case RES_ACCONDUCT: value->rValue = fast->RESacConduct; value->rValue *= fast->RESm; return (OK); case RES_ACRESIST: value->rValue = fast->RESacResist; value->rValue /= fast->RESm; return(OK); case RES_LENGTH: value->rValue = fast->RESlength; return(OK); case RES_WIDTH: value->rValue = fast->RESwidth; return(OK); case RES_SCALE: value->rValue = fast->RESscale; return(OK); case RES_M: value->rValue = fast->RESm; return(OK); case RES_TC1: value->rValue = fast->REStc1; return(OK); case RES_TC2: value->rValue = fast->REStc2; return(OK); case RES_BV_MAX: value->rValue = fast->RESbv_max; return(OK); case RES_NOISY: value->iValue = fast->RESnoisy; return(OK); case RES_QUEST_SENS_DC: if (ckt->CKTsenInfo) { value->rValue = *(ckt->CKTsenInfo->SEN_Sap[select->iValue + 1] + fast->RESsenParmNo); } return(OK); case RES_QUEST_SENS_REAL: if (ckt->CKTsenInfo) { value->rValue = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1] + fast->RESsenParmNo); } return(OK); case RES_QUEST_SENS_IMAG: if (ckt->CKTsenInfo) { value->rValue = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1] + fast->RESsenParmNo); } return(OK); case RES_QUEST_SENS_MAG: if (ckt->CKTsenInfo) { vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = sqrt(vr*vr + vi*vi); if (vm == 0) { value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1] + fast->RESsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1] + fast->RESsenParmNo); value->rValue = (vr * sr + vi * si) / vm; } return(OK); case RES_QUEST_SENS_PH: if (ckt->CKTsenInfo) { vr = *(ckt->CKTrhsOld + select->iValue + 1); vi = *(ckt->CKTirhsOld + select->iValue + 1); vm = vr*vr + vi*vi; if (vm == 0) { value->rValue = 0; return(OK); } sr = *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1] + fast->RESsenParmNo); si = *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1] + fast->RESsenParmNo); value->rValue = (vr * si - vi * sr) / vm; } return(OK); case RES_QUEST_SENS_CPLX: if (ckt->CKTsenInfo) { value->cValue.real= *(ckt->CKTsenInfo->SEN_RHS[select->iValue + 1] + fast->RESsenParmNo); value->cValue.imag= *(ckt->CKTsenInfo->SEN_iRHS[select->iValue + 1] + fast->RESsenParmNo); } return(OK); case RES_CURRENT: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "RESask"; strcpy(errMsg, msg); return(E_ASKCURRENT); } else if (ckt->CKTrhsOld) { value->rValue = (*(ckt->CKTrhsOld + fast->RESposNode) - *(ckt->CKTrhsOld + fast->RESnegNode)) *fast->RESconduct; value->rValue *= fast->RESm; return(OK); } else { char msgloc[BSIZE_SP]; sprintf(msgloc, "No current values available for %s", fast->RESname); errMsg = TMALLOC(char, strlen(msgloc) + 1); errRtn = "RESask"; strcpy(errMsg, msgloc); return(E_ASKCURRENT); } case RES_POWER: if (ckt->CKTcurrentAnalysis & DOING_AC) { errMsg = TMALLOC(char, strlen(msg) + 1); errRtn = "RESask"; strcpy(errMsg, msg); return(E_ASKPOWER); } else if (ckt->CKTrhsOld) { value->rValue = (*(ckt->CKTrhsOld + fast->RESposNode) - *(ckt->CKTrhsOld + fast->RESnegNode)) * fast->RESconduct * (*(ckt->CKTrhsOld + fast->RESposNode) - *(ckt->CKTrhsOld + fast->RESnegNode)); value->rValue *= fast->RESm; return(OK); } else { char msgloc[BSIZE_SP]; sprintf(msgloc, "No power values available for %s", fast->RESname); errMsg = TMALLOC(char, strlen(msgloc) + 1); errRtn = "RESask"; strcpy(errMsg, msgloc); return(E_ASKCURRENT); } default: return(E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/res/Makefile.in0000644000265600020320000004314312264261540021072 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/res DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libres_la_LIBADD = am_libres_la_OBJECTS = res.lo resask.lo resdel.lo resdest.lo \ resinit.lo resload.lo resmask.lo resmdel.lo resmpar.lo \ resnoise.lo resparam.lo respzld.lo ressacl.lo ressetup.lo \ ressoachk.lo ressload.lo ressprt.lo ressset.lo restemp.lo libres_la_OBJECTS = $(am_libres_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libres_la_SOURCES) DIST_SOURCES = $(libres_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libres.la libres_la_SOURCES = \ res.c \ resask.c \ resdefs.h \ resdel.c \ resdest.c \ resext.h \ resinit.c \ resinit.h \ resitf.h \ resload.c \ resmask.c \ resmdel.c \ resmpar.c \ resnoise.c \ resparam.c \ respzld.c \ ressacl.c \ ressetup.c \ ressoachk.c \ ressload.c \ ressprt.c \ ressset.c \ restemp.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/res/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/res/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libres.la: $(libres_la_OBJECTS) $(libres_la_DEPENDENCIES) $(EXTRA_libres_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libres_la_OBJECTS) $(libres_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/res.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resdest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resmdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resmpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resnoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resparam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/respzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressacl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressoachk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressprt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ressset.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/restemp.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/res/resnoise.c0000644000265600020320000002174412264261473021030 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng Modified: Apr 2000 - Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "resdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/noisedef.h" /* * RESnoise (mode, operation, firstModel, ckt, data, OnDens) * This routine names and evaluates all of the noise sources * associated with resistors. It starts with the model *firstModel * and traverses all of its instances. It then proceeds to any other * models on the linked list. The total output noise density * generated by all the resistors is summed in the variable "OnDens". * * Paolo Nenzi 2003: * Added flicker noise (Kf-Af) calculation to simulate * carbon resistors. * * Added "noisy" switch to simulate noiseless resistors. */ int RESnoise (int mode, int operation, GENmodel *genmodel, CKTcircuit *ckt, Ndata *data, double *OnDens) { NOISEAN *job = (NOISEAN *) ckt->CKTcurJob; RESmodel *firstModel = (RESmodel *) genmodel; RESmodel *model; RESinstance *inst; char name[N_MXVLNTH]; double tempOutNoise; double tempInNoise; double noizDens[RESNSRCS]; double lnNdens[RESNSRCS]; int i; /* define the names of the noise sources */ static char *RESnNames[RESNSRCS] = { /* Note that we have to keep the order consistent with the * strchr definitions in RESdefs.h */ "_thermal", /* Thermal noise */ "_1overf", /* flicker (1/f) noise */ "" /* total resistor noise */ }; for (model = firstModel; model != NULL; model = model->RESnextModel) { for (inst = model->RESinstances; inst != NULL; inst = inst->RESnextInstance) { if(!inst->RESnoisy) continue; /* Quiet resistors are skipped */ switch (operation) { case N_OPEN: /* * See if we have to to produce a summary report * if so, name the noise generator */ if (job->NStpsSm != 0) { switch (mode) { case N_DENS: for (i=0; i < RESNSRCS; i++) { (void)sprintf(name,"onoise_%s%s", inst->RESname, RESnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; case INT_NOIZ: for (i=0; i < RESNSRCS; i++) { (void)sprintf(name,"onoise_total_%s%s", inst->RESname, RESnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ (void)sprintf(name,"inoise_total_%s%s", inst->RESname,RESnNames[i]); data->namelist = TREALLOC(IFuid, data->namelist, data->numPlots + 1); if (!data->namelist) return(E_NOMEM); SPfrontEnd->IFnewUid (ckt, &(data->namelist[data->numPlots++]), NULL, name, UID_OTHER, NULL); /* we've added one more plot */ } break; } } break; case N_CALC: switch (mode) { case N_DENS: NevalSrcInstanceTemp(&noizDens[RESTHNOIZ],&lnNdens[RESTHNOIZ], ckt,THERMNOISE, inst->RESposNode,inst->RESnegNode, inst->RESconduct * inst->RESm, inst->RESdtemp); NevalSrcInstanceTemp(&noizDens[RESFLNOIZ], NULL, ckt, N_GAIN,inst->RESposNode, inst->RESnegNode, (double)0.0, (double)0.0); #if 0 printf("DC current in resistor %s: %e\n",inst->RESname, inst->REScurrent); #endif noizDens[RESFLNOIZ] *= inst->RESm * model->RESfNcoef * exp(model->RESfNexp * log(MAX(fabs(inst->REScurrent), N_MINLOG))) / data->freq; lnNdens[RESFLNOIZ] = log(MAX(noizDens[RESFLNOIZ],N_MINLOG)); noizDens[RESTOTNOIZ] = noizDens[RESTHNOIZ] + noizDens[RESFLNOIZ]; lnNdens[RESTOTNOIZ] = log(noizDens[RESTOTNOIZ]); *OnDens += noizDens[RESTOTNOIZ]; if (data->delFreq == 0.0) { /* if we haven't done any previous integration, we need to */ /* initialize our "history" variables */ for (i=0; i < RESNSRCS; i++) { inst->RESnVar[LNLSTDENS][i] = lnNdens[i]; } /* clear out our integration variable if it's the first pass */ if (data->freq == job->NstartFreq) { for (i=0; i < RESNSRCS; i++) { inst->RESnVar[OUTNOIZ][i] = 0.0; /* Clear output noise */ inst->RESnVar[INNOIZ][i] = 0.0; /* Clear input noise */ } } } else { /* data->delFreq != 0.0 (we have to integrate) */ /* In order to get the best curve fit, we have to integrate each component separately */ for (i = 0; i < RESNSRCS; i++) { if (i != RESTOTNOIZ) { tempOutNoise = Nintegrate(noizDens[i], lnNdens[i], inst->RESnVar[LNLSTDENS][i], data); tempInNoise = Nintegrate(noizDens[i] * data->GainSqInv ,lnNdens[i] + data->lnGainInv, inst->RESnVar[LNLSTDENS][i] + data->lnGainInv, data); inst->RESnVar[LNLSTDENS][i] = lnNdens[i]; data->outNoiz += tempOutNoise; data->inNoise += tempInNoise; if (job->NStpsSm != 0) { inst->RESnVar[OUTNOIZ][i] += tempOutNoise; inst->RESnVar[OUTNOIZ][RESTOTNOIZ] += tempOutNoise; inst->RESnVar[INNOIZ][i] += tempInNoise; inst->RESnVar[INNOIZ][RESTOTNOIZ] += tempInNoise; } } } } if (data->prtSummary) { for (i=0; i < RESNSRCS; i++) { /* print a summary report */ data->outpVector[data->outNumber++] = noizDens[i]; } } break; case INT_NOIZ: /* already calculated, just output */ if (job->NStpsSm != 0) { for (i=0; i < RESNSRCS; i++) { data->outpVector[data->outNumber++] = inst->RESnVar[OUTNOIZ][i]; data->outpVector[data->outNumber++] = inst->RESnVar[INNOIZ][i]; } } /* if */ break; } /* switch (mode) */ break; case N_CLOSE: return (OK); /* do nothing, the main calling routine will close */ break; /* the plots */ } /* switch (operation) */ } /* for inst */ } /* for model */ return(OK); } ngspice-26/src/spicelib/devices/res/ressload.c0000644000265600020320000000271612264261473021013 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: Apr 2000 - Paolo Nenzi This function is obsolete (was used by an old sensitivity analysis) **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "resdefs.h" #include "ngspice/sperror.h" int RESsLoad(GENmodel *inModel, CKTcircuit *ckt) /* actually load the current resistance sensitivity value into * the array previously provided. */ { RESmodel *model = (RESmodel *)inModel; RESinstance *here; double vres; double value; /* loop through all the resistor models */ for( ; model != NULL; model = model->RESnextModel ) { /* loop through all the instances of the model */ for (here = model->RESinstances; here != NULL ; here=here->RESnextInstance) { if(here->RESsenParmNo){ vres = *(ckt->CKTrhsOld+here->RESposNode) - *(ckt->CKTrhsOld+here->RESnegNode); value = vres * here->RESconduct * here->RESconduct; value = value * here->RESm * here->RESm; /* load the RHS matrix */ *(ckt->CKTsenInfo->SEN_RHS[here->RESposNode] + here->RESsenParmNo) += value; *(ckt->CKTsenInfo->SEN_RHS[here->RESnegNode] + here->RESsenParmNo) -= value; } } } return(OK); } ngspice-26/src/spicelib/devices/nbjt2/0000755000265600020320000000000012264261711017246 5ustar andreasadminngspice-26/src/spicelib/devices/nbjt2/nbt2init.c0000644000265600020320000000413312264261473021151 0ustar andreasadmin#include "ngspice/config.h" #include "ngspice/devdefs.h" #include "nbjt2itf.h" #include "nbjt2ext.h" #include "nbt2init.h" SPICEdev NBJT2info = { { "NBJT2", "2D Numerical Bipolar Junction Transistor model", &NBJT2nSize, &NBJT2nSize, NBJT2names, &NBJT2pTSize, NBJT2pTable, &NBJT2mPTSize, NBJT2mPTable, #ifdef XSPICE /*---- Fixed by SDB 5.2.2003 to enable XSPICE/tclspice integration -----*/ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ 0, /* This is a SPICE device, it has no MIF info data */ NULL, /* This is a SPICE device, it has no MIF info data */ /*--------------------------- End of SDB fix -------------------------*/ #endif DEV_DEFAULT }, /* DEVparam */ NBJT2param, /* DEVmodParam */ NBJT2mParam, /* DEVload */ NBJT2load, /* DEVsetup */ NBJT2setup, /* DEVunsetup */ NULL, /* DEVpzSetup */ NBJT2setup, /* DEVtemperature*/ NBJT2temp, /* DEVtrunc */ NBJT2trunc, /* DEVfindBranch */ NULL, /* DEVacLoad */ NBJT2acLoad, /* DEVaccept */ NULL, /* DEVdestroy */ NBJT2destroy, /* DEVmodDelete */ NBJT2mDelete, /* DEVdelete */ NBJT2delete, /* DEVsetic */ NULL, /* DEVask */ NBJT2ask, /* DEVmodAsk */ NULL, /* DEVpzLoad */ NBJT2pzLoad, /* DEVconvTest */ NULL, /* DEVsenSetup */ NULL, /* DEVsenLoad */ NULL, /* DEVsenUpdate */ NULL, /* DEVsenAcLoad */ NULL, /* DEVsenPrint */ NULL, /* DEVsenTrunc */ NULL, /* DEVdisto */ NULL, /* DEVnoise */ NULL, /* DEVsoaCheck */ NULL, #ifdef CIDER /* DEVdump */ NBJT2dump, /* DEVacct */ NBJT2acct, #endif /* DEVinstSize */ &NBJT2iSize, /* DEVmodSize */ &NBJT2mSize }; SPICEdev * get_nbjt2_info(void) { return &NBJT2info; } ngspice-26/src/spicelib/devices/nbjt2/nbt2parm.c0000644000265600020320000000230312264261473021142 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets instance parameters for NBJT2s in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJT2param(int param, IFvalue *value, GENinstance *inInst, IFvalue *select) { register NBJT2instance *inst = (NBJT2instance *) inInst; NG_IGNORE(select); switch (param) { case NBJT2_WIDTH: inst->NBJT2width = value->rValue; inst->NBJT2widthGiven = TRUE; break; case NBJT2_AREA: inst->NBJT2area = value->rValue; inst->NBJT2areaGiven = TRUE; break; case NBJT2_OFF: inst->NBJT2off = TRUE; break; case NBJT2_IC_FILE: inst->NBJT2icFile = value->sValue; inst->NBJT2icFileGiven = TRUE; break; case NBJT2_PRINT: inst->NBJT2print = value->iValue; inst->NBJT2printGiven = TRUE; break; case NBJT2_TEMP: inst->NBJT2temp = value->rValue + CONSTCtoK; inst->NBJT2tempGiven = TRUE; break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbjt2def.h0000644000265600020320000001400712264261473021124 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef NBJT2_H #define NBJT2_H /* structures to describe 2d Numerical Bipolar Junction Transistors */ /* circuit level includes */ #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" /* device level includes */ #include "ngspice/twomesh.h" #include "ngspice/twodev.h" #include "ngspice/profile.h" #include "ngspice/numglobs.h" #include "ngspice/carddefs.h" /* information needed per instance */ typedef struct sNBJT2instance { struct sNBJT2model *NBJT2modPtr; /* back pointer to model */ struct sNBJT2instance *NBJT2nextInstance; /* pointer to next instance * of current model */ IFuid NBJT2name; /* pointer to character string naming this * instance */ int NBJT2state; /* pointer to start of state vector for bjt */ /* entries in the state vector for bjt: */ #define NBJT2vbe NBJT2state #define NBJT2vce NBJT2state+1 #define NBJT2ic NBJT2state+2 #define NBJT2ie NBJT2state+3 #define NBJT2dIeDVce NBJT2state+4 #define NBJT2dIeDVbe NBJT2state+5 #define NBJT2dIcDVce NBJT2state+6 #define NBJT2dIcDVbe NBJT2state+7 #define NBJT2numStates 8 int NBJT2colNode; /* number of collector node of bjt */ int NBJT2baseNode; /* number of base node of bjt */ int NBJT2emitNode; /* number of emitter node of bjt */ double NBJT2width; /* width factor for the bjt */ double NBJT2area; /* area factor for the bjt */ TWOdevice *NBJT2pDevice; GLOBvalues NBJT2globals; /* Temp.-Dep. Global Parameters */ int NBJT2type; double NBJT2temp; /* Instance Temperature */ double NBJT2c11; /* small-signal capacitance */ double NBJT2y11r; /* small-signal admittance, real part */ double NBJT2y11i; /* small-signal admittance, imag part */ double NBJT2c12; /* small-signal capacitance */ double NBJT2y12r; /* small-signal admittance, real part */ double NBJT2y12i; /* small-signal admittance, imag part */ double NBJT2c21; /* small-signal capacitance */ double NBJT2y21r; /* small-signal admittance, real part */ double NBJT2y21i; /* small-signal admittance, imag part */ double NBJT2c22; /* small-signal capacitance */ double NBJT2y22r; /* small-signal admittance, real part */ double NBJT2y22i; /* small-signal admittance, imag part */ int NBJT2print; char *NBJT2icFile; /* Name of initial condition file */ double *NBJT2colColPtr; /* pointer to sparse matrix at * (collector,collector) */ double *NBJT2baseBasePtr; /* pointer to sparse matrix at (base,base) */ double *NBJT2emitEmitPtr; /* pointer to sparse matrix at * (emitter,emitter) */ double *NBJT2colBasePtr; /* pointer to sparse matrix at * (collector,base) */ double *NBJT2colEmitPtr; /* pointer to sparse matrix at * (collector,emitter) */ double *NBJT2baseColPtr; /* pointer to sparse matrix at * (base,collector) */ double *NBJT2baseEmitPtr; /* pointer to sparse matrix at (base,emitter) */ double *NBJT2emitColPtr; /* pointer to sparse matrix at * (emitter,collector) */ double *NBJT2emitBasePtr; /* pointer to sparse matrix at (emitter,base) */ int NBJT2off; /* 'off' flag for bjt */ unsigned NBJT2smSigAvail:1; /* flag to indicate small-signal done */ unsigned NBJT2widthGiven:1; /* flag to indicate width was specified */ unsigned NBJT2areaGiven:1; /* flag to indicate area was specified */ unsigned NBJT2icFileGiven:1; /* flag to indicate init. cond. file given */ unsigned NBJT2printGiven:1; /* flag to indicate print given */ unsigned NBJT2tempGiven:1; /* flag to indicate temp given */ } NBJT2instance; /* per model data */ typedef struct sNBJT2model { /* model structure for a bjt */ int NBJT2modType; /* type index of this device type */ struct sNBJT2model *NBJT2nextModel; /* pointer to next possible model in * linked list */ NBJT2instance *NBJT2instances;/* pointer to list of instances that have * this model */ IFuid NBJT2modName; /* pointer to character string naming this * model */ /* Everything below here is numerical-device-specific */ MESHcard *NBJT2xMeshes; /* list of xmesh cards */ MESHcard *NBJT2yMeshes; /* list of ymesh cards */ DOMNcard *NBJT2domains; /* list of domain cards */ BDRYcard *NBJT2boundaries; /* list of boundary cards */ DOPcard *NBJT2dopings; /* list of doping cards */ ELCTcard *NBJT2electrodes; /* list of electrode cards */ CONTcard *NBJT2contacts; /* list of contact cards */ MODLcard *NBJT2models; /* list of model cards */ MATLcard *NBJT2materials; /* list of material cards */ MOBcard *NBJT2mobility; /* list of mobility cards */ METHcard *NBJT2methods; /* list of method cards */ OPTNcard *NBJT2options; /* list of option cards */ OUTPcard *NBJT2outputs; /* list of output cards */ TWOtranInfo *NBJT2pInfo; /* transient analysis information */ DOPprofile *NBJT2profiles; /* expanded list of doping profiles */ DOPtable *NBJT2dopTables; /* list of tables used by profiles */ TWOmaterial *NBJT2matlInfo; /* list of material info structures */ } NBJT2model; /* type of 2D BJT */ #define NPN 1 #define PNP -1 /* device parameters */ #define NBJT2_WIDTH 1 #define NBJT2_AREA 2 #define NBJT2_OFF 3 #define NBJT2_IC_FILE 4 #define NBJT2_PRINT 7 #define NBJT2_TEMP 8 #define NBJT2_G11 9 #define NBJT2_C11 10 #define NBJT2_Y11 11 #define NBJT2_G12 12 #define NBJT2_C12 13 #define NBJT2_Y12 14 #define NBJT2_G13 15 #define NBJT2_C13 16 #define NBJT2_Y13 17 #define NBJT2_G21 18 #define NBJT2_C21 19 #define NBJT2_Y21 20 #define NBJT2_G22 21 #define NBJT2_C22 22 #define NBJT2_Y22 23 #define NBJT2_G23 24 #define NBJT2_C23 25 #define NBJT2_Y23 26 #define NBJT2_G31 27 #define NBJT2_C31 28 #define NBJT2_Y31 29 #define NBJT2_G32 30 #define NBJT2_C32 31 #define NBJT2_Y32 32 #define NBJT2_G33 33 #define NBJT2_C33 34 #define NBJT2_Y33 35 /* model parameters */ /* NOTE: all true model parameters have been moved to IFcardInfo structures */ #define NBJT2_MOD_NBJT 1 /* device questions */ /* model questions */ #include "nbjt2ext.h" #endif /* NBJT2_H */ ngspice-26/src/spicelib/devices/nbjt2/nbt2acld.c0000644000265600020320000000746212264261473021121 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * Function to load the COMPLEX circuit matrix using the small signal * parameters saved during a previous DC operating point analysis. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/complex.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NBJT2acLoad(GENmodel *inModel, CKTcircuit *ckt) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double startTime; for (; model != NULL; model = model->NBJT2nextModel) { FieldDepMobility = model->NBJT2models->MODLfieldDepMobility; TransDepMobility = model->NBJT2models->MODLtransDepMobility; SurfaceMobility = model->NBJT2models->MODLsurfaceMobility; Srh = model->NBJT2models->MODLsrh; Auger = model->NBJT2models->MODLauger; AvalancheGen = model->NBJT2models->MODLavalancheGen; OneCarrier = model->NBJT2methods->METHoneCarrier; AcAnalysisMethod = model->NBJT2methods->METHacAnalysisMethod; MobDeriv = model->NBJT2methods->METHmobDeriv; TWOacDebug = model->NBJT2outputs->OUTPacDebug; for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJT2globals)); model->NBJT2methods->METHacAnalysisMethod = NBJT2admittance(inst->NBJT2pDevice, ckt->CKTomega, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); *(inst->NBJT2colColPtr) += yIcVce.real; *(inst->NBJT2colColPtr + 1) += yIcVce.imag; *(inst->NBJT2colBasePtr) += yIcVbe.real; *(inst->NBJT2colBasePtr + 1) += yIcVbe.imag; *(inst->NBJT2colEmitPtr) -= yIcVbe.real + yIcVce.real; *(inst->NBJT2colEmitPtr + 1) -= yIcVbe.imag + yIcVce.imag; *(inst->NBJT2baseColPtr) -= yIcVce.real + yIeVce.real; *(inst->NBJT2baseColPtr + 1) -= yIcVce.imag + yIeVce.imag; *(inst->NBJT2baseBasePtr) -= yIcVbe.real + yIeVbe.real; *(inst->NBJT2baseBasePtr + 1) -= yIcVbe.imag + yIeVbe.imag; *(inst->NBJT2baseEmitPtr) += yIcVbe.real + yIcVce.real + yIeVbe.real + yIeVce.real; *(inst->NBJT2baseEmitPtr + 1) += yIcVbe.imag + yIcVce.imag + yIeVbe.imag + yIeVce.imag; *(inst->NBJT2emitColPtr) += yIeVce.real; *(inst->NBJT2emitColPtr + 1) += yIeVce.imag; *(inst->NBJT2emitBasePtr) += yIeVbe.real; *(inst->NBJT2emitBasePtr + 1) += yIeVbe.imag; *(inst->NBJT2emitEmitPtr) -= yIeVbe.real + yIeVce.real; *(inst->NBJT2emitEmitPtr + 1) -= yIeVbe.imag + yIeVce.imag; if (ckt->CKTomega != 0.0) { inst->NBJT2c11 = yIcVce.imag / ckt->CKTomega; inst->NBJT2c12 = yIcVbe.imag / ckt->CKTomega; inst->NBJT2c21 = (yIeVce.imag - yIcVce.imag) / ckt->CKTomega; inst->NBJT2c22 = (yIeVbe.imag - yIcVbe.imag) / ckt->CKTomega; } else { inst->NBJT2c11 = 0.0; /* XXX What else can be done?! */ inst->NBJT2c12 = 0.0; /* XXX What else can be done?! */ inst->NBJT2c21 = 0.0; /* XXX What else can be done?! */ inst->NBJT2c22 = 0.0; /* XXX What else can be done?! */ } inst->NBJT2y11r = yIcVce.real; inst->NBJT2y11i = yIcVce.imag; inst->NBJT2y12r = yIcVbe.real; inst->NBJT2y12i = yIcVbe.imag; inst->NBJT2y21r = yIeVce.real - yIcVce.real; inst->NBJT2y21i = yIeVce.imag - yIcVce.imag; inst->NBJT2y22r = yIeVbe.real - yIcVbe.real; inst->NBJT2y22i = yIeVbe.imag - yIcVbe.imag; inst->NBJT2smSigAvail = TRUE; inst->NBJT2pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2dump.c0000644000265600020320000001163612264261473021161 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* * This is a simple routine to dump the internal device states. It produces * states for .OP, .DC, & .TRAN simulations. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjt2def.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* Forward Declarations */ static void NBJT2putHeader(FILE *, CKTcircuit *, NBJT2instance *); /* State Counter */ static int state_numOP = 0; static int state_numDC = 0; static int state_numTR = 0; void NBJT2dump(GENmodel *inModel, CKTcircuit *ckt) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; OUTPcard *output; FILE *fpState; char fileName[BSIZE_SP]; char description[BSIZE_SP]; char *prefix; int *state_num; int anyOutput = 0; if (ckt->CKTmode & MODEDCOP) { prefix = "OP"; state_num = &state_numOP; sprintf(description, "..."); } else if (ckt->CKTmode & MODEDCTRANCURVE) { prefix = "DC"; state_num = &state_numDC; sprintf(description, "sweep = % e", ckt->CKTtime); } else if (ckt->CKTmode & MODETRAN) { prefix = "TR"; state_num = &state_numTR; sprintf(description, "time = % e", ckt->CKTtime); } else { /* Not a recognized CKT mode. */ return; } for (; model != NULL; model = model->NBJT2nextModel) { output = model->NBJT2outputs; for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { if (inst->NBJT2printGiven) { if ((ckt->CKTmode & MODETRAN) && ((ckt->CKTstat->STATaccepted - 1) % inst->NBJT2print != 0)) { continue; } anyOutput = 1; sprintf(fileName, "%s%s.%d.%s", output->OUTProotFile, prefix, *state_num, inst->NBJT2name); if ((fpState = fopen(fileName, "wb")) == NULL) { perror(fileName); } else { NBJT2putHeader(fpState, ckt, inst); TWOprnSolution(fpState, inst->NBJT2pDevice, model->NBJT2outputs); fclose(fpState); LOGmakeEntry(fileName, description); } } } } if (anyOutput) { (*state_num)++; } } #define NBJT2numOutputs 9 static void NBJT2putHeader(FILE *file, CKTcircuit *ckt, NBJT2instance *inst) { char *reference; double refVal = 0.0; int numVars = NBJT2numOutputs; if (ckt->CKTmode & MODEDCOP) { reference = NULL; } else if (ckt->CKTmode & MODEDCTRANCURVE) { reference = "sweep"; refVal = ckt->CKTtime; numVars++; } else if (ckt->CKTmode & MODETRAN) { reference = "time"; refVal = ckt->CKTtime; numVars++; } else { reference = NULL; } fprintf(file, "Title: Device %s external state\n", inst->NBJT2name); fprintf(file, "Plotname: Device Operating Point\n"); fprintf(file, "Command: deftype v conductance S\n"); fprintf(file, "Flags: real\n"); fprintf(file, "No. Variables: %d\n", numVars); fprintf(file, "No. Points: 1\n"); numVars = 0; fprintf(file, "Variables:\n"); if (reference) { fprintf(file, "\t%d %s unknown\n", numVars++, reference); } fprintf(file, "\t%d v13 voltage\n", numVars++); fprintf(file, "\t%d v23 voltage\n", numVars++); fprintf(file, "\t%d i1 current\n", numVars++); fprintf(file, "\t%d i2 current\n", numVars++); fprintf(file, "\t%d i3 current\n", numVars++); fprintf(file, "\t%d g22 conductance\n", numVars++); fprintf(file, "\t%d g21 conductance\n", numVars++); fprintf(file, "\t%d g12 conductance\n", numVars++); fprintf(file, "\t%d g11 conductance\n", numVars++); fprintf(file, "Values:\n0"); if (reference) { fprintf(file, "\t% e\n", refVal); } fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2vce)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2vbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2ic)); fprintf(file, "\t% e\n", - *(ckt->CKTstate0 + inst->NBJT2ie) - *(ckt->CKTstate0 + inst->NBJT2ic)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2ie)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2dIeDVbe) - *(ckt->CKTstate0 + inst->NBJT2dIcDVbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2dIeDVce) - *(ckt->CKTstate0 + inst->NBJT2dIcDVce)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2dIcDVbe)); fprintf(file, "\t% e\n", *(ckt->CKTstate0 + inst->NBJT2dIcDVce)); } void NBJT2acct(GENmodel *inModel, CKTcircuit *ckt, FILE *file) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; OUTPcard *output; NG_IGNORE(ckt); for (; model != NULL; model = model->NBJT2nextModel) { output = model->NBJT2outputs; for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { if (output->OUTPstats) { TWOmemStats(file, inst->NBJT2pDevice); TWOcpuStats(file, inst->NBJT2pDevice); } } } } ngspice-26/src/spicelib/devices/nbjt2/nbt2trun.c0000644000265600020320000000272512264261473021203 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine performs truncation error calculations for NBJT2s in the * circuit. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NBJT2trunc(GENmodel *inModel, CKTcircuit *ckt, double *timeStep) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; double deltaNew; double deltaNorm[7]; double startTime; int i; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } for (; model != NULL; model = model->NBJT2nextModel) { OneCarrier = model->NBJT2methods->METHoneCarrier; model->NBJT2pInfo->order = ckt->CKTorder; model->NBJT2pInfo->delta = deltaNorm; model->NBJT2pInfo->lteCoeff = computeLTECoeff(model->NBJT2pInfo); for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { startTime = SPfrontEnd->IFseconds(); deltaNew = TWOtrunc(inst->NBJT2pDevice, model->NBJT2pInfo, ckt->CKTdelta); *timeStep = MIN(*timeStep, deltaNew); inst->NBJT2pDevice->pStats->totalTime[STAT_TRAN] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2mpar.c0000644000265600020320000000133712264261473021150 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine sets model parameters for NBJT2s in the circuit. */ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJT2mParam(int param, IFvalue *value, GENmodel *inModel) { NG_IGNORE(value); NG_IGNORE(inModel); switch (param) { case NBJT2_MOD_NBJT: /* no action - already know it is a 2d-numerical bjt, but this */ /* makes life easier for spice-2 like parsers */ break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2load.c0000644000265600020320000004053712264261473021135 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This is the function called each iteration to evaluate the 2d numerical * BJTs in the circuit and load them into the matrix as appropriate */ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "ngspice/cktdefs.h" #include "nbjt2def.h" #include "ngspice/trandefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" /* External Declarations */ /* Check out this one */ extern int NBJT2initSmSig(NBJT2instance *); int NBJT2load(GENmodel *inModel, CKTcircuit *ckt) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; register TWOdevice *pDevice; double startTime, startTime2, totalTime, totalTime2; double tol; double ic, ie; double iceq, ieeq; double ichat = 0.0, iehat = 0.0; double delVce, delVbe; double vce, vbe; double dIeDVce, dIeDVbe; double dIcDVce, dIcDVbe; double xfact; int icheck; int icheck1; int i; double deltaNorm[7]; int devConverged = 0; int numDevNonCon; int deviceType; int doInitSolve; int doVoltPred; char *initStateName; /* loop through all the models */ for (; model != NULL; model = model->NBJT2nextModel) { FieldDepMobility = model->NBJT2models->MODLfieldDepMobility; TransDepMobility = model->NBJT2models->MODLtransDepMobility; SurfaceMobility = model->NBJT2models->MODLsurfaceMobility; Srh = model->NBJT2models->MODLsrh; Auger = model->NBJT2models->MODLauger; AvalancheGen = model->NBJT2models->MODLavalancheGen; OneCarrier = model->NBJT2methods->METHoneCarrier; MobDeriv = model->NBJT2methods->METHmobDeriv; MaxIterations = model->NBJT2methods->METHitLim; TWOdcDebug = model->NBJT2outputs->OUTPdcDebug; TWOtranDebug = model->NBJT2outputs->OUTPtranDebug; TWOacDebug = model->NBJT2outputs->OUTPacDebug; deviceType = model->NBJT2options->OPTNdeviceType; doVoltPred = model->NBJT2methods->METHvoltPred; if (ckt->CKTmode & MODEINITPRED) { /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { model->NBJT2pInfo->order = ckt->CKTorder; model->NBJT2pInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJT2pInfo->intCoeff, deltaNorm); computePredCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJT2pInfo->predCoeff, deltaNorm); } } else if (ckt->CKTmode & MODEINITTRAN) { model->NBJT2pInfo->order = ckt->CKTorder; model->NBJT2pInfo->method = ckt->CKTintegrateMethod; for (i = 0; i <= ckt->CKTmaxOrder; i++) { deltaNorm[i] = ckt->CKTdeltaOld[i] / TNorm; } computeIntegCoeff(ckt->CKTintegrateMethod, ckt->CKTorder, model->NBJT2pInfo->intCoeff, deltaNorm); } /* loop through all the instances of the model */ for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { pDevice = inst->NBJT2pDevice; totalTime = 0.0; startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJT2globals)); /* * initialization */ pDevice->devStates = ckt->CKTstates; icheck = 1; doInitSolve = FALSE; initStateName = NULL; if (ckt->CKTmode & MODEINITSMSIG) { vbe = *(ckt->CKTstate0 + inst->NBJT2vbe); vce = *(ckt->CKTstate0 + inst->NBJT2vce); delVbe = 0.0; delVce = 0.0; NBJT2setBCs(pDevice, vce, vbe); } else if (ckt->CKTmode & MODEINITTRAN) { *(ckt->CKTstate0 + inst->NBJT2vbe) = *(ckt->CKTstate1 + inst->NBJT2vbe); *(ckt->CKTstate0 + inst->NBJT2vce) = *(ckt->CKTstate1 + inst->NBJT2vce); vbe = *(ckt->CKTstate1 + inst->NBJT2vbe); vce = *(ckt->CKTstate1 + inst->NBJT2vce); TWOsaveState(pDevice); delVbe = 0.0; delVce = 0.0; } else if ((ckt->CKTmode & MODEINITJCT) && (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { doInitSolve = TRUE; initStateName = inst->NBJT2icFile; vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else if ((ckt->CKTmode & MODEINITJCT) && (inst->NBJT2off == 0)) { doInitSolve = TRUE; initStateName = inst->NBJT2icFile; if (deviceType == OPTN_JFET) { vbe = 0.0; vce = inst->NBJT2type * 0.5; } else { vbe = inst->NBJT2type * 0.6; vce = inst->NBJT2type * 1.0; } delVbe = vbe; delVce = vce; } else if (ckt->CKTmode & MODEINITJCT) { doInitSolve = TRUE; vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else if ((ckt->CKTmode & MODEINITFIX) && inst->NBJT2off) { vbe = 0.0; vce = 0.0; delVbe = vbe; delVce = vce; } else { if (ckt->CKTmode & MODEINITPRED) { *(ckt->CKTstate0 + inst->NBJT2vbe) = *(ckt->CKTstate1 + inst->NBJT2vbe); *(ckt->CKTstate0 + inst->NBJT2vce) = *(ckt->CKTstate1 + inst->NBJT2vce); *(ckt->CKTstate0 + inst->NBJT2ic) = *(ckt->CKTstate1 + inst->NBJT2ic); *(ckt->CKTstate0 + inst->NBJT2ie) = *(ckt->CKTstate1 + inst->NBJT2ie); *(ckt->CKTstate0 + inst->NBJT2dIeDVce) = *(ckt->CKTstate1 + inst->NBJT2dIeDVce); *(ckt->CKTstate0 + inst->NBJT2dIeDVbe) = *(ckt->CKTstate1 + inst->NBJT2dIeDVbe); *(ckt->CKTstate0 + inst->NBJT2dIcDVce) = *(ckt->CKTstate1 + inst->NBJT2dIcDVce); *(ckt->CKTstate0 + inst->NBJT2dIcDVbe) = *(ckt->CKTstate1 + inst->NBJT2dIcDVbe); /* compute normalized deltas and predictor coeff */ if (!(ckt->CKTmode & MODEDCTRANCURVE)) { /* no linear prediction on device voltages */ vbe = *(ckt->CKTstate1 + inst->NBJT2vbe); vce = *(ckt->CKTstate1 + inst->NBJT2vce); TWOpredict(pDevice, model->NBJT2pInfo); } else { if (doVoltPred) { /* linear prediction */ xfact=ckt->CKTdelta/ckt->CKTdeltaOld[1]; vbe = (1+xfact) * (*(ckt->CKTstate1 + inst->NBJT2vbe)) - (xfact) * (*(ckt->CKTstate2 + inst->NBJT2vbe)); vce = (1+xfact) * (*(ckt->CKTstate1 + inst->NBJT2vce)) - (xfact) * (*(ckt->CKTstate2 + inst->NBJT2vce)); } else { vbe = *(ckt->CKTstate1 + inst->NBJT2vbe); vce = *(ckt->CKTstate1 + inst->NBJT2vce); } } } else { /* * compute new nonlinear branch voltages */ vbe = *(ckt->CKTrhsOld + inst->NBJT2baseNode) - *(ckt->CKTrhsOld + inst->NBJT2emitNode); vce = *(ckt->CKTrhsOld + inst->NBJT2colNode) - *(ckt->CKTrhsOld + inst->NBJT2emitNode); } delVbe = vbe - *(ckt->CKTstate0 + inst->NBJT2vbe); delVce = vce - *(ckt->CKTstate0 + inst->NBJT2vce); ichat = *(ckt->CKTstate0 + inst->NBJT2ic) + *(ckt->CKTstate0 + inst->NBJT2dIcDVbe) * delVbe + *(ckt->CKTstate0 + inst->NBJT2dIcDVce) * delVce; iehat = *(ckt->CKTstate0 + inst->NBJT2ie) + *(ckt->CKTstate0 + inst->NBJT2dIeDVbe) * delVbe + *(ckt->CKTstate0 + inst->NBJT2dIeDVce) * delVce; #ifndef NOBYPASS /* * bypass if solution has not changed */ /* * the following collections of if's would be just one if the average * compiler could handle it, but many find the expression too * complicated, thus the split. */ if ((ckt->CKTbypass) && pDevice->converged && (!(ckt->CKTmode & MODEINITPRED)) && (fabs(delVbe) < (ckt->CKTreltol * MAX(fabs(vbe), fabs(*(ckt->CKTstate0 + inst->NBJT2vbe))) + ckt->CKTvoltTol))) if ((fabs(delVce) < ckt->CKTreltol * MAX(fabs(vce), fabs(*(ckt->CKTstate0 + inst->NBJT2vce))) + ckt->CKTvoltTol)) if ((fabs(ichat - *(ckt->CKTstate0 + inst->NBJT2ic)) < ckt->CKTreltol * MAX(fabs(ichat), fabs(*(ckt->CKTstate0 + inst->NBJT2ic))) + ckt->CKTabstol)) if ((fabs(iehat - *(ckt->CKTstate0 + inst->NBJT2ie)) < ckt->CKTreltol * MAX(fabs(iehat), fabs(*(ckt->CKTstate0 + inst->NBJT2ie))) + ckt->CKTabstol)) { /* * bypassing.... */ vbe = *(ckt->CKTstate0 + inst->NBJT2vbe); vce = *(ckt->CKTstate0 + inst->NBJT2vce); ic = *(ckt->CKTstate0 + inst->NBJT2ic); ie = *(ckt->CKTstate0 + inst->NBJT2ie); dIeDVce = *(ckt->CKTstate0 + inst->NBJT2dIeDVce); dIeDVbe = *(ckt->CKTstate0 + inst->NBJT2dIeDVbe); dIcDVce = *(ckt->CKTstate0 + inst->NBJT2dIcDVce); dIcDVbe = *(ckt->CKTstate0 + inst->NBJT2dIcDVbe); goto load; } #endif /* NOBYPASS */ /* * limit nonlinear branch voltages */ icheck1 = 1; if (deviceType == OPTN_JFET) { double vbc, vbc0; vbe = inst->NBJT2type * limitJunctionVoltage(inst->NBJT2type * vbe, inst->NBJT2type * *(ckt->CKTstate0 + inst->NBJT2vbe), &icheck); vbc = vbe - vce; vbc0 = *(ckt->CKTstate0 + inst->NBJT2vbe) - *(ckt->CKTstate0 + inst->NBJT2vce); vbc = inst->NBJT2type * limitJunctionVoltage(inst->NBJT2type * vbc, inst->NBJT2type * vbc0, &icheck); if (icheck1 == 1) icheck = 1; vce = vbe - vbc; } else { vbe = inst->NBJT2type * limitJunctionVoltage(inst->NBJT2type * vbe, inst->NBJT2type * *(ckt->CKTstate0 + inst->NBJT2vbe), &icheck); vce = inst->NBJT2type * limitVce(inst->NBJT2type * vce, inst->NBJT2type * *(ckt->CKTstate0 + inst->NBJT2vce), &icheck1); if (icheck1 == 1) icheck = 1; } delVbe = vbe - *(ckt->CKTstate0 + inst->NBJT2vbe); delVce = vce - *(ckt->CKTstate0 + inst->NBJT2vce); NBJT2setBCs(pDevice, vce - delVce, vbe - delVbe); } if (doInitSolve) { if (TWOdcDebug) { printVoltages(stdout, model->NBJT2modName, inst->NBJT2name, deviceType, 2, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0); } startTime2 = SPfrontEnd->IFseconds(); TWOequilSolve(pDevice); totalTime2 = SPfrontEnd->IFseconds() - startTime2; pDevice->pStats->totalTime[STAT_SETUP] += totalTime2; pDevice->pStats->totalTime[STAT_DC] -= totalTime2; TWObiasSolve(pDevice, MaxIterations, FALSE, NULL); *(ckt->CKTstate0 + inst->NBJT2vbe) = 0.0; *(ckt->CKTstate0 + inst->NBJT2vce) = 0.0; if (initStateName != NULL) { if (TWOreadState(pDevice, initStateName, 2, &vce, &vbe, NULL ) < 0) { fprintf(stderr, "NBJT2load: trouble reading state-file %s\n", initStateName); } else { NBJT2setBCs(pDevice, vce, vbe); delVce = delVbe = 0.0; } } } /* * determine dc current and derivatives using the numerical routines */ if (ckt->CKTmode & (MODEDCOP | MODETRANOP | MODEDCTRANCURVE | MODEINITSMSIG)) { numDevNonCon = 0; inst->NBJT2c11 = inst->NBJT2y11r = inst->NBJT2y11i = 0.0; inst->NBJT2c12 = inst->NBJT2y12r = inst->NBJT2y12i = 0.0; inst->NBJT2c21 = inst->NBJT2y21r = inst->NBJT2y21i = 0.0; inst->NBJT2c22 = inst->NBJT2y22r = inst->NBJT2y22i = 0.0; inst->NBJT2smSigAvail = FALSE; devNonCon: NBJT2project(pDevice, delVce, delVbe); if (TWOdcDebug) { printVoltages(stdout, model->NBJT2modName, inst->NBJT2name, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); } TWObiasSolve(pDevice, MaxIterations, FALSE, model->NBJT2pInfo); devConverged = pDevice->converged; if (devConverged && finite(pDevice->rhsNorm)) { /* compute the currents */ NBJT2current(pDevice, FALSE, NULL, &ie, &ic); NBJT2conductance(pDevice, FALSE, NULL, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); } else { /* reduce the voltage step until converged */ /* restore boundary nodes to previous potential */ NBJT2setBCs(pDevice, vce - delVce, vbe - delVbe); TWOstoreInitialGuess(pDevice); TWOresetJacobian(pDevice); delVbe *= 0.5; delVce *= 0.5; vbe = delVbe + *(ckt->CKTstate0 + inst->NBJT2vbe); vce = delVce + *(ckt->CKTstate0 + inst->NBJT2vce); numDevNonCon++; icheck = 1; if (numDevNonCon > 10) { printVoltages(stderr, model->NBJT2modName, inst->NBJT2name, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); fprintf(stderr, "*** Non-convergence during load ***\n"); totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } else { goto devNonCon; } } } if ((ckt->CKTmode & (MODETRAN | MODEAC)) || ((ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) || (ckt->CKTmode & MODEINITSMSIG)) { /* * store small-signal parameters */ if ((!(ckt->CKTmode & MODETRANOP)) || (!(ckt->CKTmode & MODEUIC))) { if (ckt->CKTmode & MODEINITSMSIG) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_DC] += totalTime; startTime2 = SPfrontEnd->IFseconds(); NBJT2initSmSig(inst); pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime2; continue; } else { inst->NBJT2smSigAvail = FALSE; } /* * transient analysis */ if (ckt->CKTmode & MODEINITPRED) { NBJT2setBCs(pDevice, vce, vbe); TWOstoreInitialGuess(pDevice); } else { NBJT2update(pDevice, delVce, delVbe, TRUE); } if (TWOtranDebug) { printVoltages(stdout, model->NBJT2modName, inst->NBJT2name, deviceType, 2, vce, delVce, vbe, delVbe, 0.0, 0.0); } TWObiasSolve(pDevice, 0, TRUE, model->NBJT2pInfo); if (!finite(pDevice->rhsNorm)) { totalTime += SPfrontEnd->IFseconds() - startTime; pDevice->pStats->totalTime[STAT_TRAN] += totalTime; ckt->CKTtroubleElt = (GENinstance *) inst; return (E_BADMATRIX); } devConverged = TWOdeviceConverged(pDevice); pDevice->converged = devConverged; /* compute the currents */ NBJT2current(pDevice, TRUE, model->NBJT2pInfo->intCoeff, &ie, &ic); NBJT2conductance(pDevice, TRUE, model->NBJT2pInfo->intCoeff, &dIeDVce, &dIcDVce, &dIeDVbe, &dIcDVbe); } } /* * check convergence */ if ((!(ckt->CKTmode & MODEINITFIX)) || (!(inst->NBJT2off))) { if (icheck == 1 || !devConverged) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(ichat), fabs(ic)) + ckt->CKTabstol; if (fabs(ichat - ic) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } else { tol = ckt->CKTreltol * MAX(fabs(iehat), fabs(ie)) + ckt->CKTabstol; if (fabs(iehat - ie) > tol) { ckt->CKTnoncon++; ckt->CKTtroubleElt = (GENinstance *) inst; } } } } *(ckt->CKTstate0 + inst->NBJT2vbe) = vbe; *(ckt->CKTstate0 + inst->NBJT2vce) = vce; *(ckt->CKTstate0 + inst->NBJT2ic) = ic; *(ckt->CKTstate0 + inst->NBJT2ie) = ie; *(ckt->CKTstate0 + inst->NBJT2dIeDVce) = dIeDVce; *(ckt->CKTstate0 + inst->NBJT2dIeDVbe) = dIeDVbe; *(ckt->CKTstate0 + inst->NBJT2dIcDVce) = dIcDVce; *(ckt->CKTstate0 + inst->NBJT2dIcDVbe) = dIcDVbe; load: /* * load current excitation vector */ iceq = ic - dIcDVce * vce - dIcDVbe * vbe; ieeq = ie - dIeDVce * vce - dIeDVbe * vbe; *(ckt->CKTrhs + inst->NBJT2colNode) -= iceq; *(ckt->CKTrhs + inst->NBJT2baseNode) += ieeq + iceq; *(ckt->CKTrhs + inst->NBJT2emitNode) -= ieeq; /* * load y matrix */ *(inst->NBJT2colColPtr) += dIcDVce; *(inst->NBJT2colBasePtr) += dIcDVbe; *(inst->NBJT2colEmitPtr) -= dIcDVbe + dIcDVce; *(inst->NBJT2baseColPtr) -= dIcDVce + dIeDVce; *(inst->NBJT2baseBasePtr) -= dIcDVbe + dIeDVbe; *(inst->NBJT2baseEmitPtr) += dIcDVbe + dIcDVce + dIeDVbe + dIeDVce; *(inst->NBJT2emitColPtr) += dIeDVce; *(inst->NBJT2emitBasePtr) += dIeDVbe; *(inst->NBJT2emitEmitPtr) -= dIeDVbe + dIeDVce; totalTime += SPfrontEnd->IFseconds() - startTime; if (ckt->CKTmode & MODETRAN) { pDevice->pStats->totalTime[STAT_TRAN] += totalTime; } else { pDevice->pStats->totalTime[STAT_DC] += totalTime; } } } return (OK); } int NBJT2initSmSig(NBJT2instance *inst) { SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double omega = inst->NBJT2modPtr->NBJT2methods->METHomega; AcAnalysisMethod = SOR_ONLY; (void) NBJT2admittance(inst->NBJT2pDevice, omega, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); inst->NBJT2c11 = yIcVce.imag / omega; inst->NBJT2c12 = yIcVbe.imag / omega; inst->NBJT2c21 = (yIeVce.imag - yIcVce.imag) / omega; inst->NBJT2c22 = (yIeVbe.imag - yIcVbe.imag) / omega; inst->NBJT2y11r = yIcVce.real; inst->NBJT2y11i = yIcVce.imag; inst->NBJT2y12r = yIcVbe.real; inst->NBJT2y12i = yIcVbe.imag; inst->NBJT2y21r = yIeVce.real - yIcVce.real; inst->NBJT2y21i = yIeVce.imag - yIcVce.imag; inst->NBJT2y22r = yIeVbe.real - yIcVbe.real; inst->NBJT2y22i = yIeVbe.imag - yIcVbe.imag; inst->NBJT2smSigAvail = TRUE; return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2set.c0000644000265600020320000002162612264261473021007 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "nbjt2def.h" #include "ngspice/numconst.h" #include "ngspice/numenum.h" #include "ngspice/meshext.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/ciderinp.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" #define TSCALLOC(var, size, type)\ if (size && (var = (type *)calloc(1, (unsigned)(size)*sizeof(type))) == NULL) {\ return(E_NOMEM);\ } int NBJT2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states) /* * load the structure with those pointers needed later for fast matrix * loading */ { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; char *icFileName = NULL; size_t nameLen; int error, xIndex; int xMeshSize, yMeshSize; TWOdevice *pDevice; TWOcoord *xCoordList = NULL; TWOcoord *yCoordList = NULL; TWOdomain *domainList = NULL; TWOelectrode *electrodeList = NULL; TWOmaterial *pM, *pMaterial = NULL, *materialList = NULL; DOPprofile *profileList = NULL; DOPtable *dopTableList = NULL; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NBJT2nextModel) { if (!model->NBJT2pInfo) { TSCALLOC(model->NBJT2pInfo, 1, TWOtranInfo); } methods = model->NBJT2methods; if (!methods) { TSCALLOC(methods, 1, METHcard); model->NBJT2methods = methods; } models = model->NBJT2models; if (!models) { TSCALLOC(models, 1, MODLcard); model->NBJT2models = models; } options = model->NBJT2options; if (!options) { TSCALLOC(options, 1, OPTNcard); model->NBJT2options = options; } outputs = model->NBJT2outputs; if (!outputs) { TSCALLOC(outputs, 1, OUTPcard); model->NBJT2outputs = outputs; } if (!methods->METHvoltPredGiven) { methods->METHvoltPred = FALSE; } if (!methods->METHmobDerivGiven) { methods->METHmobDeriv = TRUE; } if (!methods->METHoneCarrierGiven) { methods->METHoneCarrier = FALSE; } if (!methods->METHacAnalysisMethodGiven) { methods->METHacAnalysisMethod = SOR; } if (!methods->METHdabstolGiven) { methods->METHdabstol = DABSTOL2D; } if (!methods->METHdreltolGiven) { methods->METHdreltol = ckt->CKTreltol; } if (!methods->METHitLimGiven) { methods->METHitLim = 50; } if (!methods->METHomegaGiven || methods->METHomega <= 0.0) { methods->METHomega = 2.0 * M_PI /* radians/sec */ ; } if (!options->OPTNdefaGiven || options->OPTNdefa <= 0.0) { options->OPTNdefa = 1.0e4 /* cm^2 */ ; } if (!options->OPTNdeflGiven || options->OPTNdefl <= 0.0) { options->OPTNdefl = 1.0e2 /* cm */ ; } if (!options->OPTNdefwGiven && options->OPTNdefaGiven) { options->OPTNdefw = options->OPTNdefa / options->OPTNdefl; } else if (!options->OPTNdefwGiven || options->OPTNdefw <= 0.0) { options->OPTNdefw = 1.0e2 /* cm */ ; } if (!options->OPTNdeviceTypeGiven) { options->OPTNdeviceType = OPTN_BIPOLAR; } if (!options->OPTNicFileGiven) { options->OPTNicFile = NULL; options->OPTNunique = FALSE; /* Can't form a unique name. */ } if (!options->OPTNuniqueGiven) { options->OPTNunique = FALSE; } OneCarrier = methods->METHoneCarrier; /* Set up the rest of the card lists */ if ((error = MODLsetup(model->NBJT2models)) != 0) return (error); BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; if ((error = OUTPsetup(model->NBJT2outputs)) != 0) return (error); if ((error = MATLsetup(model->NBJT2materials, &materialList)) != 0) return (error); if ((error = MOBsetup(model->NBJT2mobility, materialList)) != 0) return (error); if ((error = MESHsetup('x', model->NBJT2xMeshes, &xCoordList, &xMeshSize)) != 0) return (error); if ((error = MESHsetup('y', model->NBJT2yMeshes, &yCoordList, &yMeshSize)) != 0) return (error); if ((error = DOMNsetup(model->NBJT2domains, &domainList, xCoordList, yCoordList, materialList)) != 0) return (error); if ((error = BDRYsetup(model->NBJT2boundaries, xCoordList, yCoordList, domainList)) != 0) return (error); if ((error = ELCTsetup(model->NBJT2electrodes, &electrodeList, xCoordList, yCoordList)) != 0) return (error); /* Make sure electrodes are OK. */ checkElectrodes(electrodeList, 3); /* NBJT2 has 3 electrodes */ if ((error = CONTsetup(model->NBJT2contacts, electrodeList)) != 0) return (error); if ((error = DOPsetup(model->NBJT2dopings, &profileList, &dopTableList, xCoordList, yCoordList)) != 0) return (error); model->NBJT2matlInfo = materialList; model->NBJT2profiles = profileList; model->NBJT2dopTables = dopTableList; /* loop through all the instances of the model */ for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NBJT2printGiven) { inst->NBJT2print = 0; } else if (inst->NBJT2print <= 0) { inst->NBJT2print = 1; } if (!inst->NBJT2icFileGiven) { if (options->OPTNunique) { nameLen = strlen(options->OPTNicFile) + strlen(inst->NBJT2name) + 1; TSCALLOC(icFileName, nameLen+1, char); sprintf(icFileName, "%s.%s", options->OPTNicFile, inst->NBJT2name); icFileName[nameLen] = '\0'; inst->NBJT2icFile = icFileName; } else if (options->OPTNicFile != NULL) { nameLen = strlen(options->OPTNicFile); TSCALLOC(icFileName, nameLen+1, char); icFileName = strcpy(icFileName, options->OPTNicFile); inst->NBJT2icFile = icFileName; } else { inst->NBJT2icFile = NULL; } } inst->NBJT2state = *states; *states += NBJT2numStates; if (!inst->NBJT2pDevice) { /* Assign the mesh and profile info to each instance. */ TSCALLOC(pDevice, 1, TWOdevice); TSCALLOC(pDevice->pStats, 1, TWOstats); pDevice->name = inst->NBJT2name; pDevice->solverType = SLV_NONE; pDevice->numXNodes = xMeshSize; pDevice->numYNodes = yMeshSize; pDevice->xScale = MESHmkArray(xCoordList, xMeshSize); pDevice->yScale = MESHmkArray(yCoordList, yMeshSize); pDevice->abstol = methods->METHdabstol; pDevice->reltol = methods->METHdreltol; pDevice->rhsImag = NULL; TSCALLOC(pDevice->elemArray, pDevice->numXNodes, TWOelem **); for (xIndex = 1; xIndex < pDevice->numXNodes; xIndex++) { TSCALLOC(pDevice->elemArray[xIndex], pDevice->numYNodes, TWOelem *); } /* Create a copy of material data that can change with temperature. */ pDevice->pMaterials = NULL; for (pM = materialList; pM != NULL; pM = pM->next) { if (pDevice->pMaterials == NULL) { TSCALLOC(pMaterial, 1, TWOmaterial); pDevice->pMaterials = pMaterial; } else { TSCALLOC(pMaterial->next, 1, TWOmaterial); pMaterial = pMaterial->next; } /* Copy everything, then fix the incorrect pointer. */ bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = NULL; } /* Generate the mesh structure for the device. */ TWObuildMesh(pDevice, domainList, electrodeList, pDevice->pMaterials); /* Store the device info in the instance. */ inst->NBJT2pDevice = pDevice; } /* Now update the state pointers. */ TWOgetStatePointers(inst->NBJT2pDevice, states); /* Wipe out statistics from previous runs (if any). */ bzero(inst->NBJT2pDevice->pStats, sizeof(TWOstats)); inst->NBJT2pDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; /* macro to make elements with built in test for out of memory */ #define TSTALLOC(ptr,first,second) \ do { if ((inst->ptr = SMPmakeElt(matrix, inst->first, inst->second)) == NULL){\ return(E_NOMEM);\ } } while(0) TSTALLOC(NBJT2colColPtr, NBJT2colNode, NBJT2colNode); TSTALLOC(NBJT2colBasePtr, NBJT2colNode, NBJT2baseNode); TSTALLOC(NBJT2colEmitPtr, NBJT2colNode, NBJT2emitNode); TSTALLOC(NBJT2baseColPtr, NBJT2baseNode, NBJT2colNode); TSTALLOC(NBJT2baseBasePtr, NBJT2baseNode, NBJT2baseNode); TSTALLOC(NBJT2baseEmitPtr, NBJT2baseNode, NBJT2emitNode); TSTALLOC(NBJT2emitColPtr, NBJT2emitNode, NBJT2colNode); TSTALLOC(NBJT2emitBasePtr, NBJT2emitNode, NBJT2baseNode); TSTALLOC(NBJT2emitEmitPtr, NBJT2emitNode, NBJT2emitNode); } /* Clean up lists */ killCoordInfo(xCoordList); killCoordInfo(yCoordList); killDomainInfo(domainList); killElectrodeInfo(electrodeList); } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2ask.c0000644000265600020320000001401312264261473020762 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/const.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" /* Check out this one */ extern int NBJT2initSmSig(NBJT2instance *); /* ARGSUSED */ int NBJT2ask(CKTcircuit *ckt, GENinstance *inInst, int which, IFvalue *value, IFvalue *select) { NBJT2instance *inst = (NBJT2instance *) inInst; NG_IGNORE(select); switch (which) { case NBJT2_WIDTH: value->rValue = inst->NBJT2width; return (OK); case NBJT2_AREA: value->rValue = inst->NBJT2area; return (OK); case NBJT2_TEMP: value->rValue = inst->NBJT2temp - CONSTCtoK; return (OK); case NBJT2_G11: value->rValue = *(ckt->CKTstate0 + inst->NBJT2dIcDVce); return (OK); case NBJT2_G12: value->rValue = *(ckt->CKTstate0 + inst->NBJT2dIcDVbe); return (OK); case NBJT2_G13: value->rValue = -*(ckt->CKTstate0 + inst->NBJT2dIcDVce) - *(ckt->CKTstate0 + inst->NBJT2dIcDVbe); return (OK); case NBJT2_G21: value->rValue = *(ckt->CKTstate0 + inst->NBJT2dIeDVce) - *(ckt->CKTstate0 + inst->NBJT2dIcDVce); return (OK); case NBJT2_G22: value->rValue = *(ckt->CKTstate0 + inst->NBJT2dIeDVbe) - *(ckt->CKTstate0 + inst->NBJT2dIcDVbe); return (OK); case NBJT2_G23: value->rValue = -*(ckt->CKTstate0 + inst->NBJT2dIeDVce) + *(ckt->CKTstate0 + inst->NBJT2dIcDVce) -*(ckt->CKTstate0 + inst->NBJT2dIeDVbe) + *(ckt->CKTstate0 + inst->NBJT2dIcDVbe); return (OK); case NBJT2_G31: value->rValue = -*(ckt->CKTstate0 + inst->NBJT2dIeDVce); return (OK); case NBJT2_G32: value->rValue = -*(ckt->CKTstate0 + inst->NBJT2dIeDVbe); return (OK); case NBJT2_G33: value->rValue = *(ckt->CKTstate0 + inst->NBJT2dIeDVce) + *(ckt->CKTstate0 + inst->NBJT2dIeDVbe); return (OK); case NBJT2_C11: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = inst->NBJT2c11; return (OK); case NBJT2_C12: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = inst->NBJT2c12; return (OK); case NBJT2_C13: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = -inst->NBJT2c11 - inst->NBJT2c12; return (OK); case NBJT2_C21: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = inst->NBJT2c21; return (OK); case NBJT2_C22: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = inst->NBJT2c22; return (OK); case NBJT2_C23: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = -inst->NBJT2c21 - inst->NBJT2c22; return (OK); case NBJT2_C31: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = -inst->NBJT2c11 - inst->NBJT2c21; return (OK); case NBJT2_C32: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = -inst->NBJT2c12 - inst->NBJT2c22; return (OK); case NBJT2_C33: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->rValue = inst->NBJT2c11 + inst->NBJT2c21 + inst->NBJT2c12 + inst->NBJT2c22; return (OK); case NBJT2_Y11: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = inst->NBJT2y11r; value->cValue.imag = inst->NBJT2y11i; return (OK); case NBJT2_Y12: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = inst->NBJT2y12r; value->cValue.imag = inst->NBJT2y12i; return (OK); case NBJT2_Y13: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = -inst->NBJT2y11r - inst->NBJT2y12r; value->cValue.imag = -inst->NBJT2y11i - inst->NBJT2y12i; return (OK); case NBJT2_Y21: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = inst->NBJT2y21r; value->cValue.imag = inst->NBJT2y21i; return (OK); case NBJT2_Y22: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = inst->NBJT2y22r; value->cValue.imag = inst->NBJT2y22i; return (OK); case NBJT2_Y23: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = -inst->NBJT2y21r - inst->NBJT2y22r; value->cValue.imag = -inst->NBJT2y21i - inst->NBJT2y22i; return (OK); case NBJT2_Y31: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = -inst->NBJT2y11r - inst->NBJT2y21r; value->cValue.imag = -inst->NBJT2y11i - inst->NBJT2y21i; return (OK); case NBJT2_Y32: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = -inst->NBJT2y12r - inst->NBJT2y22r; value->cValue.imag = -inst->NBJT2y12i - inst->NBJT2y22i; return (OK); case NBJT2_Y33: if (!inst->NBJT2smSigAvail && ckt->CKTcurrentAnalysis != DOING_TRAN) { NBJT2initSmSig(inst); } value->cValue.real = inst->NBJT2y11r + inst->NBJT2y21r + inst->NBJT2y12r + inst->NBJT2y22r; value->cValue.imag = inst->NBJT2y11i + inst->NBJT2y21i + inst->NBJT2y12i + inst->NBJT2y22i; return (OK); default: return (E_BADPARM); } /* NOTREACHED */ } ngspice-26/src/spicelib/devices/nbjt2/nbjt2ext.h0000644000265600020320000000202012264261473021156 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Karti Mayaram **********/ #ifndef NBJT2EXT_H #define NBJT2EXT_H extern int NBJT2acLoad(GENmodel *, CKTcircuit *); extern int NBJT2ask(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); extern int NBJT2delete(GENmodel *, IFuid, GENinstance **); extern void NBJT2destroy(GENmodel **); extern int NBJT2getic(GENmodel *, CKTcircuit *); extern int NBJT2load(GENmodel *, CKTcircuit *); extern int NBJT2mDelete(GENmodel **, IFuid, GENmodel *); extern int NBJT2mParam(int, IFvalue *, GENmodel *); extern int NBJT2param(int, IFvalue *, GENinstance *, IFvalue *); extern int NBJT2pzLoad(GENmodel *, CKTcircuit *, SPcomplex *); extern int NBJT2setup(SMPmatrix *, GENmodel *, CKTcircuit *, int *); extern int NBJT2temp(GENmodel *, CKTcircuit *); extern int NBJT2trunc(GENmodel *, CKTcircuit *, double *); extern void NBJT2dump(GENmodel *, CKTcircuit *); extern void NBJT2acct(GENmodel *, CKTcircuit *, FILE *); #endif /* NBJT2EXT_H */ ngspice-26/src/spicelib/devices/nbjt2/Makefile.am0000644000265600020320000000075412264261473021315 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libnbjt2.la libnbjt2_la_SOURCES = \ nbt2.c \ nbt2acld.c \ nbt2ask.c \ nbjt2def.h \ nbt2del.c \ nbt2dest.c \ nbt2dump.c \ nbjt2ext.h \ nbt2init.c \ nbt2init.h \ nbjt2itf.h \ nbt2load.c \ nbt2mdel.c \ nbt2mpar.c \ nbt2parm.c \ nbt2pzld.c \ nbt2set.c \ nbt2temp.c \ nbt2trun.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/devices/nbjt2/nbt2del.c0000644000265600020320000000164412264261473020756 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NBJT2 instance from the circuit and frees the * storage it was using. */ #include "ngspice/ngspice.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJT2delete(GENmodel *inModel, IFuid name, GENinstance **kill) { NBJT2model *model = (NBJT2model *) inModel; NBJT2instance **fast = (NBJT2instance **) kill; NBJT2instance **prev = NULL; NBJT2instance *inst; for (; model; model = model->NBJT2nextModel) { prev = &(model->NBJT2instances); for (inst = *prev; inst; inst = *prev) { if (inst->NBJT2name == name || (fast && inst == *fast)) { *prev = inst->NBJT2nextInstance; FREE(inst); return (OK); } prev = &(inst->NBJT2nextInstance); } } return (E_NODEV); } ngspice-26/src/spicelib/devices/nbjt2/nbt2dest.c0000644000265600020320000000163512264261473021151 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes all NBJT2s from the circuit and frees all storage * they were using. The current implementation has memory leaks. */ #include "ngspice/ngspice.h" #include "nbjt2def.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/suffix.h" void NBJT2destroy(GENmodel **inModel) { NBJT2model **model = (NBJT2model **) inModel; NBJT2model *mod, *nextMod; NBJT2instance *inst, *nextInst; for (mod = *model; mod;) { for (inst = mod->NBJT2instances; inst;) { TWOdestroy(inst->NBJT2pDevice); nextInst = inst->NBJT2nextInstance; FREE(inst); inst = nextInst; } nextMod = mod->NBJT2nextModel; FREE(mod); mod = nextMod; } *model = NULL; } ngspice-26/src/spicelib/devices/nbjt2/Makefile.in0000644000265600020320000004244312264261537021330 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/devices/nbjt2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libnbjt2_la_LIBADD = am_libnbjt2_la_OBJECTS = nbt2.lo nbt2acld.lo nbt2ask.lo nbt2del.lo \ nbt2dest.lo nbt2dump.lo nbt2init.lo nbt2load.lo nbt2mdel.lo \ nbt2mpar.lo nbt2parm.lo nbt2pzld.lo nbt2set.lo nbt2temp.lo \ nbt2trun.lo libnbjt2_la_OBJECTS = $(am_libnbjt2_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libnbjt2_la_SOURCES) DIST_SOURCES = $(libnbjt2_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libnbjt2.la libnbjt2_la_SOURCES = \ nbt2.c \ nbt2acld.c \ nbt2ask.c \ nbjt2def.h \ nbt2del.c \ nbt2dest.c \ nbt2dump.c \ nbjt2ext.h \ nbt2init.c \ nbt2init.h \ nbjt2itf.h \ nbt2load.c \ nbt2mdel.c \ nbt2mpar.c \ nbt2parm.c \ nbt2pzld.c \ nbt2set.c \ nbt2temp.c \ nbt2trun.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/devices/nbjt2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/devices/nbjt2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libnbjt2.la: $(libnbjt2_la_OBJECTS) $(libnbjt2_la_DEPENDENCIES) $(EXTRA_libnbjt2_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libnbjt2_la_OBJECTS) $(libnbjt2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2acld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2ask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2del.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2dest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2dump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2load.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2mdel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2mpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2parm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2pzld.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2set.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2temp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nbt2trun.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/devices/nbjt2/nbjt2itf.h0000644000265600020320000000027312264261473021150 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #ifndef DEV_NBJT2 #define DEV_NBJT2 extern SPICEdev *get_nbjt2_info(void); #endif ngspice-26/src/spicelib/devices/nbjt2/nbt2pzld.c0000644000265600020320000000540512264261473021162 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/complex.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NBJT2pzLoad(GENmodel *inModel, CKTcircuit *ckt, SPcomplex *s) { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; SPcomplex yIeVce, yIeVbe; SPcomplex yIcVce, yIcVbe; double startTime; NG_IGNORE(ckt); for (; model != NULL; model = model->NBJT2nextModel) { FieldDepMobility = model->NBJT2models->MODLfieldDepMobility; TransDepMobility = model->NBJT2models->MODLtransDepMobility; SurfaceMobility = model->NBJT2models->MODLsurfaceMobility; Srh = model->NBJT2models->MODLsrh; Auger = model->NBJT2models->MODLauger; AvalancheGen = model->NBJT2models->MODLavalancheGen; OneCarrier = model->NBJT2methods->METHoneCarrier; AcAnalysisMethod = model->NBJT2methods->METHacAnalysisMethod; MobDeriv = model->NBJT2methods->METHmobDeriv; TWOacDebug = model->NBJT2outputs->OUTPacDebug; for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { startTime = SPfrontEnd->IFseconds(); /* Get Temp.-Dep. Global Parameters */ GLOBgetGlobals(&(inst->NBJT2globals)); NBJT2ys(inst->NBJT2pDevice, s, &yIeVce, &yIcVce, &yIeVbe, &yIcVbe); *(inst->NBJT2colColPtr) += yIcVce.real; *(inst->NBJT2colColPtr + 1) += yIcVce.imag; *(inst->NBJT2colBasePtr) += yIcVbe.real; *(inst->NBJT2colBasePtr + 1) += yIcVbe.imag; *(inst->NBJT2colEmitPtr) -= yIcVbe.real + yIcVce.real; *(inst->NBJT2colEmitPtr + 1) -= yIcVbe.imag + yIcVce.imag; *(inst->NBJT2baseColPtr) -= yIcVce.real + yIeVce.real; *(inst->NBJT2baseColPtr + 1) -= yIcVce.imag + yIeVce.imag; *(inst->NBJT2baseBasePtr) -= yIcVbe.real + yIeVbe.real; *(inst->NBJT2baseBasePtr + 1) -= yIcVbe.imag + yIeVbe.imag; *(inst->NBJT2baseEmitPtr) += yIcVbe.real + yIcVce.real + yIeVbe.real + yIeVce.real; *(inst->NBJT2baseEmitPtr + 1) += yIcVbe.imag + yIcVce.imag + yIeVbe.imag + yIeVce.imag; *(inst->NBJT2emitColPtr) += yIeVce.real; *(inst->NBJT2emitColPtr + 1) += yIeVce.imag; *(inst->NBJT2emitBasePtr) += yIeVbe.real; *(inst->NBJT2emitBasePtr + 1) += yIeVbe.imag; *(inst->NBJT2emitEmitPtr) -= yIeVbe.real + yIeVce.real; *(inst->NBJT2emitEmitPtr + 1) -= yIeVbe.imag + yIeVce.imag; inst->NBJT2pDevice->pStats->totalTime[STAT_AC] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2temp.c0000644000265600020320000000705512264261473021161 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Author: 1992 David A. Gates, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "nbjt2def.h" #include "ngspice/numenum.h" #include "ngspice/carddefs.h" #include "ngspice/sperror.h" #include "../../../ciderlib/twod/twoddefs.h" #include "../../../ciderlib/twod/twodext.h" #include "ngspice/cidersupt.h" #include "ngspice/suffix.h" int NBJT2temp(GENmodel *inModel, CKTcircuit *ckt) /* * perform the temperature update */ { register NBJT2model *model = (NBJT2model *) inModel; register NBJT2instance *inst; METHcard *methods; MODLcard *models; OPTNcard *options; OUTPcard *outputs; TWOmaterial *pM, *pMaterial, *pNextMaterial; double startTime; /* loop through all the models */ for (; model != NULL; model = model->NBJT2nextModel) { methods = model->NBJT2methods; models = model->NBJT2models; options = model->NBJT2options; outputs = model->NBJT2outputs; if (!options->OPTNtnomGiven) { options->OPTNtnom = ckt->CKTnomTemp; } for (pM = model->NBJT2matlInfo; pM != NULL; pM = pM->next) { pM->tnom = options->OPTNtnom; } BandGapNarrowing = models->MODLbandGapNarrowing; ConcDepLifetime = models->MODLconcDepLifetime; TempDepMobility = models->MODLtempDepMobility; ConcDepMobility = models->MODLconcDepMobility; SurfaceMobility = models->MODLsurfaceMobility; MatchingMobility = models->MODLmatchingMobility; OneCarrier = methods->METHoneCarrier; for (inst = model->NBJT2instances; inst != NULL; inst = inst->NBJT2nextInstance) { startTime = SPfrontEnd->IFseconds(); if (!inst->NBJT2tempGiven) { inst->NBJT2temp = ckt->CKTtemp; } if (!inst->NBJT2areaGiven || inst->NBJT2area <= 0.0) { inst->NBJT2area = 1.0; } if (!inst->NBJT2widthGiven || inst->NBJT2width <= 0.0) { inst->NBJT2width = 1.0; } inst->NBJT2pDevice->width = inst->NBJT2area * inst->NBJT2width * options->OPTNdefw; /* Compute and save globals for this instance. */ GLOBcomputeGlobals(&(inst->NBJT2globals), inst->NBJT2temp); /* Calculate new sets of material parameters. */ pM = model->NBJT2matlInfo; pMaterial = inst->NBJT2pDevice->pMaterials; for (; pM != NULL; pM = pM->next, pMaterial = pMaterial->next) { /* Copy everything, then fix the incorrect pointer. */ pNextMaterial = pMaterial->next; bcopy(pM, pMaterial, sizeof(TWOmaterial)); pMaterial->next = pNextMaterial; /* Now do the temperature dependence. */ MATLtempDep(pMaterial, pMaterial->tnom); if (outputs->OUTPmaterial) { printMaterialInfo(pMaterial); } } /* Assign doping to the mesh. */ TWOsetDoping(inst->NBJT2pDevice, model->NBJT2profiles, model->NBJT2dopTables); /* Assign physical parameters to the mesh. */ TWOsetup(inst->NBJT2pDevice); /* Assign boundary condition parameters. */ TWOsetBCparams(inst->NBJT2pDevice, model->NBJT2boundaries); /* Normalize everything. */ TWOnormalize(inst->NBJT2pDevice); /* Find the device's type. */ if (inst->NBJT2pDevice->pFirstContact->pNodes[0]->netConc < 0.0) { inst->NBJT2type = PNP; if (OneCarrier) { methods->METHoneCarrier = P_TYPE; } } else { inst->NBJT2type = NPN; if (OneCarrier) { methods->METHoneCarrier = N_TYPE; } } inst->NBJT2pDevice->pStats->totalTime[STAT_SETUP] += SPfrontEnd->IFseconds() - startTime; } } return (OK); } ngspice-26/src/spicelib/devices/nbjt2/nbt2.c0000644000265600020320000000520612264261473020267 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/devdefs.h" #include "nbjt2def.h" #include "ngspice/suffix.h" /* * This file defines the 2d Numerical BJT data structures that are available * to the next level(s) up the calling hierarchy */ IFparm NBJT2pTable[] = { /* parameters */ IP("off", NBJT2_OFF, IF_FLAG, "Device initially off"), IP("ic.file", NBJT2_IC_FILE, IF_STRING, "Initial condition file"), IOP("w", NBJT2_WIDTH, IF_REAL, "Width factor"), IOP("area", NBJT2_AREA, IF_REAL, "Area factor"), IP("save", NBJT2_PRINT, IF_INTEGER, "Save solutions"), IP("print", NBJT2_PRINT, IF_INTEGER, "Print solutions"), OP("g11", NBJT2_G11, IF_REAL, "Conductance"), OP("c11", NBJT2_C11, IF_REAL, "Capacitance"), OP("y11", NBJT2_Y11, IF_COMPLEX, "Admittance"), OP("g12", NBJT2_G12, IF_REAL, "Conductance"), OP("c12", NBJT2_C12, IF_REAL, "Capacitance"), OP("y12", NBJT2_Y12, IF_COMPLEX, "Admittance"), OPU("g13", NBJT2_G13, IF_REAL, "Conductance"), OPU("c13", NBJT2_C13, IF_REAL, "Capacitance"), OPU("y13", NBJT2_Y13, IF_COMPLEX, "Admittance"), OP("g21", NBJT2_G21, IF_REAL, "Conductance"), OP("c21", NBJT2_C21, IF_REAL, "Capacitance"), OP("y21", NBJT2_Y21, IF_COMPLEX, "Admittance"), OP("g22", NBJT2_G22, IF_REAL, "Conductance"), OP("c22", NBJT2_C22, IF_REAL, "Capacitance"), OP("y22", NBJT2_Y22, IF_COMPLEX, "Admittance"), OPU("g23", NBJT2_G23, IF_REAL, "Conductance"), OPU("c23", NBJT2_C23, IF_REAL, "Capacitance"), OPU("y23", NBJT2_Y23, IF_COMPLEX, "Admittance"), OPU("g31", NBJT2_G31, IF_REAL, "Conductance"), OPU("c31", NBJT2_C31, IF_REAL, "Capacitance"), OPU("y31", NBJT2_Y31, IF_COMPLEX, "Admittance"), OPU("g32", NBJT2_G32, IF_REAL, "Conductance"), OPU("c32", NBJT2_C32, IF_REAL, "Capacitance"), OPU("y32", NBJT2_Y32, IF_COMPLEX, "Admittance"), OPU("g33", NBJT2_G33, IF_REAL, "Conductance"), OPU("c33", NBJT2_C33, IF_REAL, "Capacitance"), OPU("y33", NBJT2_Y33, IF_COMPLEX, "Admittance"), IOP("temp", NBJT2_TEMP, IF_REAL, "Instance Temperature") }; IFparm NBJT2mPTable[] = { /* model parameters */ /* numerical-device models no longer have parameters */ /* one is left behind to keep the table from being empty */ IP("nbjt", NBJT2_MOD_NBJT, IF_FLAG, "Numerical BJT Model") }; char *NBJT2names[] = { "Collector", "Base", "Emitter", "Substrate" }; int NBJT2nSize = NUMELEMS(NBJT2names); int NBJT2pTSize = NUMELEMS(NBJT2pTable); int NBJT2mPTSize = NUMELEMS(NBJT2mPTable); int NBJT2iSize = sizeof(NBJT2instance); int NBJT2mSize = sizeof(NBJT2model); ngspice-26/src/spicelib/devices/nbjt2/nbt2init.h0000644000265600020320000000040212264261473021151 0ustar andreasadmin#ifndef _NBJT2INIT_H #define _NBJT2INIT_H extern IFparm NBJT2pTable[ ]; extern IFparm NBJT2mPTable[ ]; extern char *NBJT2names[ ]; extern int NBJT2pTSize; extern int NBJT2mPTSize; extern int NBJT2nSize; extern int NBJT2iSize; extern int NBJT2mSize; #endif ngspice-26/src/spicelib/devices/nbjt2/nbt2mdel.c0000644000265600020320000000174012264261473021130 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ /* * This routine deletes a NBJT2 model from the circuit and frees the storage * it was using. returns an error if the model has instances */ #include "ngspice/ngspice.h" #include "nbjt2def.h" #include "ngspice/sperror.h" #include "ngspice/suffix.h" int NBJT2mDelete(GENmodel **inModel, IFuid modname, GENmodel *kill) { NBJT2model **model = (NBJT2model **) inModel; NBJT2model *modfast = (NBJT2model *) kill; NBJT2model **oldmod; oldmod = model; for (; *model; model = &((*model)->NBJT2nextModel)) { if ((*model)->NBJT2modName == modname || (modfast && *model == modfast)) goto delgot; oldmod = model; } return (E_NOMOD); delgot: if ((*model)->NBJT2instances) return (E_NOTEMPTY); *oldmod = (*model)->NBJT2nextModel; /* cut deleted device out of list */ FREE(*model); return (OK); } ngspice-26/src/spicelib/parser/0000755000265600020320000000000012264261705016104 5ustar andreasadminngspice-26/src/spicelib/parser/inppas2.c0000644000265600020320000001403212264261473017626 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpmacs.h" #include "inppas2.h" #include "inpxx.h" #ifdef XSPICE /* gtri - add - wbk - 11/9/90 - include function prototypes */ #include "ngspice/mifproto.h" /* gtri - end - wbk - 11/9/90 */ #endif /* uncomment to trace in this file */ /*#define TRACE*/ /* pass 2 - Scan through the lines. ".model" cards have processed in * pass1 and are ignored here. */ void INPpas2(CKTcircuit *ckt, card * data, INPtables * tab, TSKtask *task) { card *current; char c; char *groundname = "0"; char *gname; CKTnode *gnode; int error; /* used by the macros defined above */ #ifdef HAS_PROGREP int linecount = 0, actcount = 0; #endif #ifdef TRACE /* SDB debug statement */ printf("Entered INPpas2 . . . .\n"); #endif #ifdef XSPICE if (!ckt->CKTadevFlag) ckt->CKTadevFlag = 0; #endif error = INPgetTok(&groundname, &gname, 1); if (error) data->error = INPerrCat(data->error, INPmkTemp ("can't read internal ground node name!\n")); error = INPgndInsert(ckt, &gname, tab, &gnode); if (error && error != E_EXISTS) data->error = INPerrCat(data->error, INPmkTemp ("can't insert internal ground node in symbol table!\n")); #ifdef TRACE printf("Examining this deck:\n"); for (current = data; current != NULL; current = current->nextcard) { printf("%s\n", current->line); } printf("\n"); #endif #ifdef HAS_PROGREP for (current = data; current != NULL; current = current->nextcard) linecount++; #endif for (current = data; current != NULL; current = current->nextcard) { #ifdef TRACE /* SDB debug statement */ printf("In INPpas2, examining card %s . . .\n", current->line); #endif #ifdef HAS_PROGREP if (linecount > 0) { SetAnalyse( "Circuit2", (int) (1000.*actcount/linecount)); actcount++; } #endif c = *(current->line); if(islower(c)) c = (char) toupper(c); switch (c) { case ' ': /* blank line (space leading) */ case '\t': /* blank line (tab leading) */ break; #ifdef XSPICE /* gtri - add - wbk - 10/23/90 - add case for 'A' devices */ case 'A': /* Aname */ MIF_INP2A(ckt, tab, current); ckt->CKTadevFlag = 1; /* an 'A' device is requested */ break; /* gtri - end - wbk - 10/23/90 */ #endif case 'R': /* Rname [][][w=][l=] */ INP2R(ckt, tab, current); break; case 'C': /* Cname [IC=] */ INP2C(ckt, tab, current); break; case 'L': /* Lname [IC=] */ INP2L(ckt, tab, current); break; case 'G': /* Gname */ INP2G(ckt, tab, current); break; case 'E': /* Ename */ INP2E(ckt, tab, current); break; case 'F': /* Fname */ INP2F(ckt, tab, current); break; case 'H': /* Hname */ INP2H(ckt, tab, current); break; case 'D': /* Dname [] [OFF] [IC=] */ INP2D(ckt, tab, current); break; case 'J': /* Jname [] [OFF] [IC=,] */ INP2J(ckt, tab, current); break; case 'Z': /* Zname [] [OFF] [IC=,] */ INP2Z(ckt, tab, current); break; case 'M': /* Mname [L=] [W=] [AD=] [AS=] [PD=] [PS=] [NRD=] [NRS=] [OFF] [IC=,,] */ INP2M(ckt, tab, current); break; #ifdef NDEV case 'N': /* Nname [...] [] */ INP2N(ckt, tab, current); break; #endif case 'O': /* Oname [IC=,,,] */ INP2O(ckt, tab, current); break; case 'V': /* Vname [ [DC] ] [AC [ [ ] ] ] [] */ INP2V(ckt, tab, current); break; case 'I': /* Iname [ [DC] ] [AC [ [ ] ] ] [] */ INP2I(ckt, tab, current); break; case 'Q': /* Qname [] [] [OFF] [IC=,] */ INP2Q(ckt, tab, current, gnode); break; case 'T': /* Tname [TD=] [F= [NL=]][IC=,,,] */ INP2T(ckt, tab, current); break; case 'S': /* Sname [] [IC] */ INP2S(ckt, tab, current); break; case 'W': /* Wname [] [IC] */ /* CURRENT CONTROLLED SWITCH */ INP2W(ckt, tab, current); break; case 'U': /* Uname [l=] [n=] */ INP2U(ckt, tab, current); break; /* Kspice addition - saj */ case 'P': /* Pname ... ... [] */ /* R= L= G= C= len= */ INP2P(ckt, tab, current); break; case 'Y': /* Yname R= L= G= C= len= */ INP2Y(ckt, tab, current); break; /* end Kspice */ case 'K': /* Kname Lname Lname */ INP2K(ckt, tab, current); break; case '*': case '$': /* * - a comment - ignore */ break; case 'B': /* Bname [V=expr] [I=expr] */ /* Arbitrary source. */ INP2B(ckt, tab, current); break; case '.': /* . Many possibilities */ if (INP2dot(ckt,tab,current,task,gnode)) return; break; case 0: break; default: /* the un-implemented device */ LITERR(" unknown device type - error \n"); break; } } return; } ngspice-26/src/spicelib/parser/inp2n.c0000644000265600020320000000703012264261473017300 0ustar andreasadmin/********** Permit to use it as your wish. Author: 2007 Gong Ding, gdiso@ustc.edu University of Science and Technology of China **********/ #include "ngspice/ngspice.h" #ifdef NDEV #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "../devices/ndev/ndevdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2N(CKTcircuit *ckt, INPtables * tab, card * current) { /* parse a numerical device card */ /* Nname [ ...] [] */ /* The NUMD should have a private .model card */ int mytype; /* the type we determine NDEV are */ int type = 0; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *saveline; /* ... just in case we need to go back... */ char *name; /* the NDEV's name */ char *model; /* the name of the NDEV's model */ int term; /* the number of node */ char *nnamex; /* serve as a temporary name */ char *nname[7]; /* the array of CKT node's name */ char *bname[7]; /* the array of NDEV electrode's name */ CKTnode *node[7]; /* the array of CKT node's node pointer */ int error; /* error code temporary */ int i; INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast = NULL; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ NDEVinstance *pinst; int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ mytype = INPtypelook("NDEV"); if (mytype < 0) { LITERR("Device type NDEV not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); /* get the node number here */ saveline=line; term = 0; do { INPgetNetTok(&line, &nnamex, 1); term++; }while(*nnamex); line=saveline; term=(term-2)/2; if (term > 7) { LITERR("Numerical device has too much nodes, the limitation is 7\n"); return; } for(i=0;ierror = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } } else { LITERR("Numerical device should always have a model card\n"); return; } IFC(newInstance, (ckt, mdfast, &fast, name)); } else { LITERR("Numerical device should always have a model card\n"); return; } for(i=0;iterm = term; for(i=0;ibname[i]=bname[i]; pinst->node[i]=node[i]; } PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { LITERR("The numerical device was lead berfor.\n"); return; } return; } #else int Dummy1; #endif ngspice-26/src/spicelib/parser/inpdomod.c0000644000265600020320000004205012264261473020064 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "inpxx.h" /*-------------------------------------------------------------- * This fcn takes the model card & examines it. Depending upon * model type, it parses the model line, and then calls * INPmakeMod to stick the model name into the model list. * Note that multi-line models are handled in the calling fcn * (INPpas1). *-------------------------------------------------------------*/ char *INPdomodel(CKTcircuit *ckt, card * image, INPtables * tab) { char *modname; int type = -1; int lev, error1=0; char ver[100]; char *type_name; char *err = NULL; char *line; char *val; double rval=0, lval=0; NG_IGNORE(ckt); line = image->line; #ifdef TRACE printf("In INPdomodel, examining line %s . . . \n", line); #endif INPgetTok(&line, &modname, 1); /* throw away '.model' */ tfree(modname); INPgetTok(&line, &modname, 1); /* get model name */ INPinsert(&modname, tab); /* stick model name into table */ INPgetTok(&line, &type_name, 1); /* get model type */ /* ----- Check if model is a BJT --------- */ if (strcmp(type_name, "npn") == 0 || strcmp(type_name, "pnp") == 0) { err = INPfindLev(line,&lev); switch(lev) { case 0: case 1: case 2: type = INPtypelook("BJT"); if (type < 0) { err = INPmkTemp( "Device type BJT not available in this binary\n"); } break; case 4: case 9: type = INPtypelook("VBIC"); if(type < 0) { err = INPmkTemp( "Device type VBIC not available in this binary\n"); } break; #ifdef ADMS case 6: type = INPtypelook("bjt504t"); if(type < 0) { err = INPmkTemp( "Device type MEXTRAM not available in this binary\n"); } break; case 7: type = INPtypelook("hicum0"); if(type < 0) { err = INPmkTemp( "Device type HICUM0 not available in this binary\n"); } break; case 8: type = INPtypelook("hicum2"); if(type < 0) { err = INPmkTemp( "Device type HICUM2 not available in this binary\n"); } break; #endif default: /* placeholder; use level 4 for the next model */ #ifdef ADMS err = INPmkTemp( "Only BJT levels 1-2, 4,6-9 are supported in this binary\n"); #else err = INPmkTemp( "Only BJT levels 1-2, 4, 9 are supported in this binary\n"); #endif break; } INPmakeMod(modname, type, image); } /* end if ((strcmp(typename, "npn") == 0) || (strcmp(typename, "pnp") == 0)) */ /* -------- Check if model is a diode --------- */ else if (strcmp(type_name, "d") == 0) { type = INPtypelook("Diode"); if (type < 0) { err = INPmkTemp ("Device type Diode not available in this binary\n"); } INPmakeMod(modname, type, image); } /* else if (strcmp(typename, "d") == 0) { */ /* -------- Check if model is a jfet --------- */ else if (strcmp(type_name, "njf") == 0 || strcmp(type_name, "pjf") == 0) { err = INPfindLev(line, &lev); switch (lev) { case 0: case 1: type = INPtypelook("JFET"); if (type < 0) { err = INPmkTemp ("Device type JFET not available in this binary\n"); } break; case 2: type = INPtypelook("JFET2"); if (type < 0) { err = INPmkTemp ("Device type JFET2 not available in this binary\n"); } break; default: /* placeholder; use level 3 for the next model */ err = INPmkTemp ("Only JFET device levels 1-2 are supported in this binary\n"); break; } INPmakeMod(modname, type, image); } /* end else if ((strcmp(typename, "njf") == 0) */ /* -------- Check if model is a MES or an HFET --------- */ else if (strcmp(type_name, "nmf") == 0 || strcmp(type_name, "pmf") == 0 || strcmp(type_name, "nhfet") == 0 || strcmp(type_name, "phfet") == 0) { err = INPfindLev( line, &lev ); switch ( lev ) { case 0: case 1: type = INPtypelook("MES"); if (type < 0) { err = INPmkTemp("Device type MES not available\n"); } break; case 2: type = INPtypelook("MESA"); if (type < 0) { err = INPmkTemp("Device type MESA not availabe\n"); } break; case 3: type = INPtypelook("MESA"); if (type < 0) { err = INPmkTemp("Device type MESA not availabe\n"); } break; case 4: type = INPtypelook("MESA"); if ( type < 0) { err = INPmkTemp(" Device type MESA not available\n"); } break; case 5: type = INPtypelook("HFET1"); if ( type < 0) { err = INPmkTemp(" Device type HFET1 not available\n"); } break; case 6: type = INPtypelook("HFET2"); if ( type < 0) { err = INPmkTemp(" Device type HFET2 not available in this binary\n"); } break; default: err = INPmkTemp("only mesfet device level 1-4 and hfet level 5-6 supported\n"); break; } INPmakeMod(modname, type, image); } /* -------- Check if model is a Uniform Distrib. RC line --------- */ else if (strcmp(type_name, "urc") == 0) { type = INPtypelook("URC"); if (type < 0) { err = INPmkTemp ("Device type URC not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a MOSFET --------- */ else if ((strcmp(type_name, "nmos") == 0) || (strcmp(type_name, "pmos") == 0) || (strcmp(type_name, "nsoi") == 0) || (strcmp(type_name, "psoi") == 0)) { err = INPfindLev(line, &lev); switch (lev) { case 0: case 1: type = INPtypelook("Mos1"); if (type < 0) { err = INPmkTemp ("Device type MOS1 not available in this binary\n"); } break; case 2: type = INPtypelook("Mos2"); if (type < 0) { err = INPmkTemp ("Device type MOS2 not available in this binary\n"); } break; case 3: type = INPtypelook("Mos3"); if (type < 0) { err = INPmkTemp ("Device type MOS3 not available in this binary\n"); } break; case 4: type = INPtypelook("BSIM1"); if (type < 0) { err = INPmkTemp ("Device type BSIM1 not available in this binary\n"); } break; case 5: type = INPtypelook("BSIM2"); if (type < 0) { err = INPmkTemp ("Device type BSIM2 not available in this binary\n"); } break; case 6: type = INPtypelook("Mos6"); if (type < 0) { err = INPmkTemp ("Device type MOS6 not available in this binary\n"); } break; case 7: type = INPtypelook("MOS7"); if (type < 0) { err = INPmkTemp ("Device type MOS7 not available in this binary\n"); } break; case 8: case 49: err = INPfindVer(line, ver); if ( strcmp(ver, "3.0") == 0 ) { type = INPtypelook("BSIM3v0"); } if ( strcmp(ver, "3.1") == 0 ) { type = INPtypelook("BSIM3v1"); } if ( prefix("3.2", ver)) { /* version string ver has to start with 3.2 */ type = INPtypelook("BSIM3v32"); } if ( (strstr(ver, "default")) || (prefix("3.3", ver)) ) { type = INPtypelook("BSIM3"); } if (type < 0) { err = TMALLOC(char, 60 + strlen(ver)); sprintf(err,"Device type BSIM3 version %s not available in this binary\n",ver); } break; case 9: type = INPtypelook("Mos9"); if(type < 0) { err = INPmkTemp ("Device type MOS9 not available in this binary\n"); } break; case 14: case 54: err = INPfindVer(line, ver); /* mapping of minor versions >= 4.2.1 are included */ if ((prefix("4.0", ver)) || (prefix("4.1", ver)) || (prefix("4.2", ver)) || (prefix("4.3", ver)) || (prefix("4.4", ver))) { type = INPtypelook("BSIM4v4"); } if (prefix("4.5", ver)) { type = INPtypelook("BSIM4v5"); } if (prefix("4.6", ver)) { type = INPtypelook("BSIM4v6"); } if ( (strstr(ver, "default")) || (prefix("4.7", ver)) ) { type = INPtypelook("BSIM4"); } if (type < 0) { err = TMALLOC(char, 60 + strlen(ver)); sprintf(err,"Device type BSIM4 version %s not available in this binary\n",ver); } break; case 15: type = INPtypelook("BSIM5"); if (type < 0) { err = INPmkTemp ("Device type BSIM5 not available in this binary\n"); } break; case 16: type = INPtypelook("BSIM6"); if (type < 0) { err = INPmkTemp ("Device type BSIM6 not available in this binary\n");} break; #ifdef ADMS case 44: type = INPtypelook("ekv"); if (type < 0) { err = INPmkTemp ("Device type EKV not available in this binary\n"); } break; case 45: type = INPtypelook("psp102"); if (type < 0) { err = INPmkTemp ("Device type PSP102 not available in this binary\n"); } break; #endif case 55: type = INPtypelook("B3SOIFD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIFD not available in this binary\n"); } break; case 56: type = INPtypelook("B3SOIDD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIDD not available in this binary\n"); } break; case 57: type = INPtypelook("B3SOIPD"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type B3SOIPD not available in this binary\n"); } break; case 10: case 58: type = INPtypelook("B4SOI"); if (type < 0) { err = INPmkTemp ("Device type B4SOI V4.0 not available in this binary\n"); } break; case 60: type = INPtypelook("SOI3"); if (type < 0) { err = INPmkTemp ("Device type SOI3 not available in this binary (STAG release)\n"); } break; case 61: case 68: type = INPtypelook("HiSIM2"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type HiSIM2 not available in this binary\n"); } break; case 62: case 73: type = INPtypelook("HiSIMHV"); if (type < 0) { err = INPmkTemp ("Placeholder: Device type HiSIMHV not available in this binary\n"); } break; default: /* placeholder; use level xxx for the next model */ #ifdef ADMS err = INPmkTemp ("Only MOS device levels 1-6,8-10,14,44,45,49,54-58,60-62 are supported in this binary\n"); #else err = INPmkTemp ("Only MOS device levels 1-6,8-10,14,49,54-58,60-62 are supported in this binary\n"); #endif break; } INPmakeMod(modname, type, image); } #ifdef NDEV /* -------- Check if model is a numerical device --------- */ else if (strcmp(type_name, "ndev") == 0) { type = INPtypelook("NDEV"); if (type < 0) { err = INPmkTemp ("Device type NDEV not available in this binary\n"); } INPmakeMod(modname, type, image); } #endif /* -------- Check if model is a resistor --------- */ else if (strcmp(type_name, "r") == 0) { type = INPtypelook("Resistor"); if (type < 0) { err = INPmkTemp ("Device type Resistor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a transmission line of some sort --------- */ else if(strcmp(type_name,"txl") == 0) { INPgetTok(&line,&val,1); while (*line != '\0') { if (*val == 'R' || *val == 'r') { INPgetTok(&line,&val,1); rval = INPevaluate(&val, &error1, 1); } if ((strcmp(val,"L") == 0) || (strcmp(val,"l") == 0)) { INPgetTok(&line,&val,1); lval = INPevaluate(&val, &error1, 1); } INPgetTok(&line,&val,1); } if(lval) rval = rval/lval; if (rval > 1.6e10) { type = INPtypelook("TransLine"); INPmakeMod(modname,type,image); } if (rval > 1.6e9) { type = INPtypelook("CplLines"); INPmakeMod(modname,type,image); } else { type = INPtypelook("TransLine"); INPmakeMod(modname,type,image); } if(type < 0) { err = INPmkTemp( "Device type TransLine not available in this binary\n"); } } /* -------- Check if model is a coupled transmission line --------- */ else if(strcmp(type_name,"cpl") == 0) { type = INPtypelook("CplLines"); if(type < 0) { err = INPmkTemp( "Device type CplLines not available in this binary\n"); } INPmakeMod(modname,type,image); } /* -------- Check if model is a cap --------- */ else if (strcmp(type_name, "c") == 0) { type = INPtypelook("Capacitor"); if (type < 0) { err = INPmkTemp ("Device type Capacitor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is an ind --------- */ else if (strcmp(type_name, "l") == 0) { type = INPtypelook("Inductor"); if (type < 0) { err = INPmkTemp ("Device type Inductor not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a switch --------- */ else if (strcmp(type_name, "sw") == 0) { type = INPtypelook("Switch"); if (type < 0) { err = INPmkTemp ("Device type Switch not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a Current Controlled Switch --------- */ else if (strcmp(type_name, "csw") == 0) { type = INPtypelook("CSwitch"); if (type < 0) { err = INPmkTemp ("Device type CSwitch not available in this binary\n"); } INPmakeMod(modname, type, image); } /* -------- Check if model is a Lossy TransLine --------- */ else if (strcmp(type_name, "ltra") == 0) { type = INPtypelook("LTRA"); if (type < 0) { err = INPmkTemp ("Device type LTRA not available in this binary\n"); } INPmakeMod(modname, type, image); } #ifdef CIDER else if(strcmp(type_name,"numd") == 0) { err = INPfindLev(line,&lev); switch( lev ) { case 1: default: type = INPtypelook("NUMD"); if(type < 0) { err = INPmkTemp ("Device type NUMD not available in this binary\n"); } break; case 2: type = INPtypelook("NUMD2"); if(type < 0) { err = INPmkTemp ("Device type NUMD2 not available in this binary\n"); } break; } INPmakeMod(modname,type,image); } else if(strcmp(type_name,"nbjt") == 0) { err = INPfindLev(line,&lev); switch( lev ) { case 1: default: type = INPtypelook("NBJT"); if(type < 0) { err = INPmkTemp ("Device type NBJT not available in this binary\n"); } break; case 2: type = INPtypelook("NBJT2"); if(type < 0) { err = INPmkTemp ("Device type NBJT2 not available in this binary\n"); } break; } INPmakeMod(modname,type,image); } else if(strcmp(type_name,"numos") == 0) { type = INPtypelook("NUMOS"); if(type < 0) { err = INPmkTemp ("Device type NUMOS not available in this binary\n"); } INPmakeMod(modname,type,image); } #endif /* CIDER */ /* type poly added by SDB . . . */ #ifdef XSPICE /* -------- Check if model is a poly (specific to xspice) --------- */ else if ( strcmp(type_name, "poly") == 0 || strcmp(type_name, "POLY") == 0 ) { type = INPtypelook("POLY"); if (type < 0) { err = INPmkTemp ("Device type POLY not available in this binary\n"); } INPmakeMod(modname, type, image); } #endif /* -------- Default action --------- */ else { #ifndef XSPICE type = -1; err = TMALLOC(char, 35 + strlen(type_name)); (void) sprintf(err, "unknown model type %s - ignored\n", type_name); #else /* gtri - modify - wbk - 10/23/90 - modify to look for code models */ #ifdef TRACE printf("In INPdomodel, found unknown model type, typename = %s . . .\n", type_name); #endif /* look for this model type and put it in the table of models */ type = INPtypelook(type_name); if(type < 0) { err = TMALLOC(char, 35 + strlen(type_name)); sprintf(err,"Unknown model type %s - ignored\n",type_name); #ifdef TRACE printf("In INPdomodel, ignoring unknown model typ typename = %s . . .\n", type_name); #endif } else { #ifdef TRACE printf("In INPdomodel, adding unknown model typename = %s to model list. . .\n", type_name); #endif INPmakeMod(modname,type,image); } /* gtri - end - wbk - 10/23/90 */ #endif } tfree(type_name); return (err); } ngspice-26/src/spicelib/parser/inpgstr.c0000644000265600020320000000342112264261473017740 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * Get string input token from 'line', and return a pointer to it in 'token' */ #include "ngspice/ngspice.h" #include #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "inpxx.h" int INPgetStr(char **line, char **token, int gobble) /* eat non-whitespace trash AFTER token? */ { char *point; char separator = '\0'; /* Scan along throwing away garbage characters. */ for (point = *line; *point != '\0'; point++) { if ((*point == ' ') || (*point == '\t') || (*point == '=') || (*point == '(') || (*point == ')') || (*point == ',')) continue; break; } if (*point == '"') { separator = '"'; point++; } else if (*point == '\'') { separator = '\''; point++; } /* mark beginning of token */ *line = point; /* now find all good characters */ for (point = *line; *point != '\0'; point++) { if ((*point == ' ') || (*point == '\t') || (*point == '=') || (*point == '(') || (*point == ')') || (*point == ',') || (*point == separator)) break; } /* Create token */ *token = TMALLOC(char, 1 + point - *line); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, (size_t) (point - *line)); *(*token + (point - *line)) = '\0'; *line = point; /* Gobble garbage to next token. */ if (separator && **line == separator) { (*line)++; /* Skip one closing separator */ } for (; **line != '\0'; (*line)++) { if (**line == ' ') continue; if (**line == '\t') continue; if ((**line == '=') && gobble) continue; if ((**line == ',') && gobble) continue; break; } return (OK); } ngspice-26/src/spicelib/parser/inp2d.c0000644000265600020320000000573412264261473017277 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles Modified: 2001 Paolo Nenzi (Cider Integration) **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2D(CKTcircuit *ckt, INPtables * tab, card * current) { /* Dname [] [OFF] [IC=] */ int mytype; /* the type we looked up */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ mytype = INPtypelook("Diode"); if (mytype < 0) { LITERR("Device type Diode not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetTok(&line, &model, 1); INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if ((mytype != thismodel->INPmodType) #ifdef CIDER && (thismodel->INPmodType != INPtypelook("NUMD")) && (thismodel->INPmodType != INPtypelook("NUMD2")) #endif ){ LITERR("incorrect model type"); return; } type = thismodel->INPmodType; /*HT 050903*/ mdfast = (thismodel->INPmodfast); } else { type = mytype; if (!tab->defDmod) { /* create default D model */ IFnewUid(ckt, &uid, NULL, "D", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defDmod), uid)); } mdfast = tab->defDmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { #ifdef CIDER if( type == INPtypelook("NUMD2") ) { LITERR(" error: no unlabelled parameter permitted on NUMD2\n"); } else { #endif ptemp.rValue = leadval; GCA(INPpName, ("area", &ptemp, ckt, type, fast)); } #ifdef CIDER } #endif } ngspice-26/src/spicelib/parser/inp2i.c0000644000265600020320000000411412264261473017273 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2I(CKTcircuit *ckt, INPtables * tab, card * current) { /* Iname [ [DC] ] [AC [ [ ] ] ] * [] */ static int type = -1; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ if (type < 0) { if ((type = INPtypelook("Isource")) < 0) { LITERR("Device type Isource not supported by this binary\n"); return; } } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defImod) { /* create default I model */ IFnewUid(ckt, &uid, NULL, "I", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defImod), uid)); } IFC(newInstance, (ckt, tab->defImod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("dc", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inpgtok.c0000644000265600020320000002620612264261473017733 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* get input token from 'line', * and return a pointer to it in 'token' */ /* INPgetTok: node names INPgetUTok: numbers and other elements in expressions (called from INPevaluate) */ #include "ngspice/ngspice.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "inpxx.h" /*------------------------------------------------------------------- * INPgetTok -- this fcn extracts a generic input token from * 'line' and returns a pointer to it in 'token'. *------------------------------------------------------------------*/ int INPgetTok(char **line, char **token, int gobble) /* eat non-whitespace trash AFTER token? */ { char *point; int signstate; int diffpoints; /* scan along throwing away garbage characters until end of line or a separation char is found */ for (point = *line; *point != '\0'; point++) { if (*point == ' ') continue; if (*point == '\t') continue; if (*point == '\r') continue; if (*point == '=') continue; if (*point == '(') continue; if (*point == ')') continue; if (*point == ',') continue; break; } /* mark beginning of token */ *line = point; /* now find all good characters up to next occurance of a separation character. */ signstate = 0; for (point = *line; *point != '\0'; point++) { if (*point == ' ') break; if (*point == '\t') break; if (*point == '\r') break; if (*point == '=') break; if (*point == '(') break; if (*point == ')') break; if (*point == ',') break; /* This is not complex enough to catch all errors, but it will get the "good" parses */ if ((*point == '+') || (*point == '-')){ /* Treat '+' signs same as '-' signs */ if (signstate == 1 || signstate == 3) break; signstate += 1; continue; } if (*point == '*') break; if (*point == '/') break; if (*point == '^') break; if (isdigit(*point) || *point == '.') { if (signstate > 1) signstate = 3; else signstate = 1; } else if (tolower(*point) == 'e' && signstate == 1) signstate = 2; else signstate = 3; } diffpoints = (int)(point - *line); if ((diffpoints < 1) && *point) diffpoints = 1; /* Weird items, 1 char */ *token = TMALLOC(char, 1 + diffpoints); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, (size_t) diffpoints); *(*token + diffpoints) = '\0'; *line = point; /* if (point == *line && *point) point++; *token = TMALLOC(char, 1 + point - *line); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, point - *line); *(*token + (point - *line)) = '\0'; *line = point; */ /* gobble garbage to next token */ for (; **line != '\0'; (*line)++) { if (**line == ' ') continue; if (**line == '\t') continue; if (**line == '\r') continue; if ((**line == '=') && gobble) continue; if ((**line == ',') && gobble) continue; break; } #ifdef TRACE /* SDB debug statement */ /* printf("found generic token (%s) and rest of line (%s)\n", *token, *line); */ #endif return (OK); } /*------------------------------------------------------------------- * INPgetNetTok -- this fcn extracts an input netname token from * 'line' and returns a pointer to it in 'token'. * This fcn cloned from INPgetTok by SDB to enable * complex netnames (e.g. netnames like '+VCC' and 'IN-'). * mailto:sdb@cloud9.net -- 4.7.2003 *------------------------------------------------------------------*/ int INPgetNetTok(char **line, char **token, int gobble) /* eat non-whitespace trash AFTER token? */ { char *point; int diffpoints; /* scan along throwing away garbage characters until end of line or a separation char is found */ for (point = *line; *point != '\0'; point++) { if (*point == ' ') continue; if (*point == '\t') continue; if (*point == '=') continue; if (*point == '(') continue; if (*point == ')') continue; if (*point == ',') continue; break; } /* mark beginning of token */ *line = point; /* now find all good characters up to next occurance of a separation character. INPgetNetTok is very liberal about what it accepts. */ for (point = *line; *point != '\0'; point++) { if (*point == ' ') break; if (*point == '\t') break; if (*point == '\r') break; if (*point == '=') break; if (*point == ',') break; if (*point == ')') break; } /* now copy found token into *token */ diffpoints = (int)(point - *line); if ((diffpoints < 1) && *point) diffpoints = 1; /* Weird items, 1 char */ *token = TMALLOC(char, 1 + diffpoints); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, (size_t) diffpoints); *(*token + diffpoints) = '\0'; *line = point; /* if (point == *line && *point) point++; *token = TMALLOC(char, 1 + point - *line); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, point - *line); *(*token + (point - *line)) = '\0'; *line = point; */ /* gobble garbage to next token */ for (; **line != '\0'; (*line)++) { if (**line == ' ') continue; if (**line == '\t') continue; if (**line == '\r') continue; if ((**line == '=') && gobble) continue; if ((**line == ',') && gobble) continue; break; } #ifdef TRACE /* SDB debug statement */ /* printf("found netname token (%s) and rest of line (%s)\n", *token, *line); */ #endif return (OK); } /*------------------------------------------------------------------- * INPgetUTok -- this fcn extracts an input refdes token from * 'line' and returns a pointer to it in 'token'. *------------------------------------------------------------------*/ int INPgetUTok(char **line, char **token, int gobble) /* eat non-whitespace trash AFTER token? */ { char *point, separator; int signstate; /* scan along throwing away garbage characters */ for (point = *line; *point != '\0'; point++) { if (*point == ' ') continue; if (*point == '\t') continue; if (*point == '=') continue; if (*point == '(') continue; if (*point == ')') continue; if (*point == ',') continue; break; } if (*point == '"') { separator = '"'; point++; } else if (*point == '\'') { separator = '\''; point++; } else separator = 0; /* mark beginning of token */ *line = point; /* now find all good characters */ signstate = 0; for (point = *line; *point != '\0'; point++) { if (separator) { if (*point == separator) break; else continue; } if (*point == ' ') break; if (*point == '\t') break; if (*point == '=') break; if (*point == '(') break; if (*point == ')') break; if (*point == ',') break; /* This is not complex enough to catch all errors, but it will get the "good" parses */ if (*point == '+' && (signstate == 1 || signstate == 3)) break; if (*point == '-') { if (signstate == 1 || signstate == 3) break; signstate += 1; continue; } if (*point == '*') break; if (*point == '/') break; if (*point == '^') break; if (isdigit(*point) || *point == '.') { if (signstate > 1) signstate = 3; else signstate = 1; } else if (tolower(*point) == 'e' && signstate == 1) signstate = 2; else signstate = 3; } if (separator && *point == separator) point--; if (point == *line && *point) /* Weird items, 1 char */ point++; *token = TMALLOC(char, 1 + point - *line); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, (size_t) (point - *line)); *(*token + (point - *line)) = '\0'; /* gobble garbage to next token */ for (; *point != '\0'; point++) { if (*point == separator) continue; if (*point == ' ') continue; if (*point == '\t') continue; if ((*point == '=') && gobble) continue; if ((*point == ',') && gobble) continue; break; } *line = point; #ifdef TRACE /* SDB debug statement */ /* printf("found refdes token (%s) and rest of line (%s)\n",*token,*line); */ #endif return (OK); } /*------------------------------------------------------------------- * INPgetUTok plus points < > ? :, called from INPevaluate called * from INPevaluate with gobble == 2 * fcn added to avoid unforeseeable side effects during other calls * to INPevaluate. *------------------------------------------------------------------*/ int INPgetU2Tok(char **line, char **token, int gobble) /* eat non-whitespace trash AFTER token? */ { char *point, separator; int signstate; /* scan along throwing away garbage characters */ for (point = *line; *point != '\0'; point++) { if (*point == ' ') continue; if (*point == '\t') continue; if (*point == '=') continue; if (*point == '(') continue; if (*point == ')') continue; if (*point == ',') continue; break; } if (*point == '"') { separator = '"'; point++; } else if (*point == '\'') { separator = '\''; point++; } else separator = 0; /* mark beginning of token */ *line = point; /* now find all good characters */ signstate = 0; for (point = *line; *point != '\0'; point++) { if (separator) { if (*point == separator) break; else continue; } if (*point == ' ') break; if (*point == '\t') break; if (*point == '=') break; if (*point == '(') break; if (*point == ')') break; if (*point == ',') break; /* This is not complex enough to catch all errors, but it will get the "good" parses */ if (*point == '+' && (signstate == 1 || signstate == 3)) break; if (*point == '-') { if (signstate == 1 || signstate == 3) break; signstate += 1; continue; } if (*point == '*') break; if (*point == '/') break; if (*point == '^') break; if (*point == '<') break; if (*point == '>') break; if (*point == '?') break; if (*point == ':') break; if (isdigit(*point) || *point == '.') { if (signstate > 1) signstate = 3; else signstate = 1; } else if (tolower(*point) == 'e' && signstate == 1) signstate = 2; else signstate = 3; } if (separator && *point == separator) point--; if (point == *line && *point) /* Weird items, 1 char */ point++; *token = TMALLOC(char, 1 + point - *line); if (!*token) return (E_NOMEM); (void) strncpy(*token, *line, (size_t) (point - *line)); *(*token + (point - *line)) = '\0'; /* gobble garbage to next token */ for (; *point != '\0'; point++) { if (*point == separator) continue; if (*point == ' ') continue; if (*point == '\t') continue; if ((*point == '=') && gobble) continue; if ((*point == ',') && gobble) continue; break; } *line = point; #ifdef TRACE /* SDB debug statement */ /* printf("found refdes token (%s) and rest of line (%s)\n",*token,*line); */ #endif return (OK); } ngspice-26/src/spicelib/parser/inpapnam.c0000644000265600020320000000132312264261473020054 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "inpxx.h" int INPapName(CKTcircuit *ckt, int type, JOB *analPtr, char *parmname, IFvalue * value) { IFparm *if_parm; if (!parmname) return (E_BADPARM); if (!ft_sim->analyses[type]) return (E_BADPARM); if_parm = ft_find_analysis_parm(type, parmname); if (!if_parm) return (E_BADPARM); return ft_sim->setAnalysisParm (ckt, analPtr, if_parm->id, value, NULL); } ngspice-26/src/spicelib/parser/inpmktmp.c0000644000265600020320000000066712264261473020122 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "inpxx.h" char *INPmkTemp(char *string) { size_t len; char *temp; len = strlen(string); temp = TMALLOC(char, len + 1); if (temp != NULL) (void) strcpy(temp, string); return (temp); } ngspice-26/src/spicelib/parser/ifnewuid.c0000644000265600020320000000466112264261473020073 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include "ngspice/inpdefs.h" #include #include "ngspice/cpdefs.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/fteext.h" #include "inpxx.h" /* va: we should use tmalloc, whith also makes failure test */ int IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type, CKTnode **nodedata) { char *newname; int error; if (olduid) { #ifdef HAVE_ASPRINTF asprintf(&newname, "%s#%s", olduid, suffix); #else /* ~ HAVE_ASPRINTF */ newname = TMALLOC(char, strlen(olduid) + strlen(suffix) + 2); /* 2 = strlen("#\0") */ sprintf(newname, "%s#%s", olduid, suffix); #endif /* HAVE_ASPRINTF */ } else { #ifdef HAVE_ASPRINTF asprintf(&newname, "%s", suffix); #else /* ~ HAVE_ASPRINTF */ newname = TMALLOC(char, strlen(suffix) + 1); sprintf(newname, "%s", suffix); #endif /* HAVE_ASPRINTF */ } switch (type) { case UID_ANALYSIS: case UID_TASK: case UID_INSTANCE: case UID_OTHER: case UID_MODEL: error = INPinsert(&newname, ft_curckt->ci_symtab); if (error && error != E_EXISTS) return (error); *newuid = newname; break; case UID_SIGNAL: error = INPmkTerm(ckt, &newname, ft_curckt->ci_symtab, nodedata); if (error && error != E_EXISTS) return (error); *newuid = newname; break; default: return (E_BADPARM); } return (OK); } int IFdelUid(CKTcircuit *ckt, IFuid uid, int type) { int error; NG_IGNORE(ckt); switch (type) { case UID_ANALYSIS: case UID_TASK: case UID_INSTANCE: case UID_OTHER: case UID_MODEL: error = INPremove(uid, ft_curckt->ci_symtab); if (error && error != E_EXISTS) return (error); break; case UID_SIGNAL: error = INPremTerm(uid, ft_curckt->ci_symtab); if (error && error != E_EXISTS) return (error); break; default: return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/parser/inp2l.c0000644000265600020320000001042412264261473017277 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2L(CKTcircuit *ckt, INPtables * tab, card * current) { /* parse an inductor card */ /* Lname [] [] [IC=] */ int mytype = -1; /* the type we determine inductors are */ int type = 0; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *saveline; /* ... just in case we need to go back... */ char *name; /* the resistor's name */ char *model; /* the name of the inductor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held inductance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast = NULL; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package inductance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default cap model */ #ifdef TRACE printf("In INP2L, Current line: %s\n", current->line); #endif if (mytype < 0) { if ((mytype = INPtypelook("Inductor")) < 0) { LITERR("Device type Inductor not supported by this binary\n"); return; } } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); val = INPevaluate(&line, &error1, 1); saveline = line; INPgetTok(&line, &model, 1); if (*model && (strcmp(model, "l") != 0)) { /* token isn't null */ if (INPlookMod(model)) { /* If this is a valid model connect it */ INPinsert(&model, tab); thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } } else { tfree(model); /* It is not a model */ line = saveline; /* go back */ type = mytype; if (!tab->defLmod) { /* create default L model */ IFnewUid(ckt, &uid, NULL, "L", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defLmod), uid)); } mdfast = tab->defLmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); } else { tfree(model); /* The token is null or we have l=val - a default model will be created */ type = mytype; if (!tab->defLmod) { /* create default L model */ IFnewUid(ckt, &uid, NULL, "L", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defLmod), uid)); } IFC(newInstance, (ckt, tab->defLmod, &fast, name)); if (error1 == 1) { /* was a l=val construction */ val = INPevaluate(&line, &error1, 1); /* [] */ #ifdef TRACE printf ("In INP2L, L=val construction: val=%g\n", val); #endif } } if (error1 == 0) { /* Looks like a number */ ptemp.rValue = val; GCA(INPpName, ("inductance", &ptemp, ckt, type, fast)); } IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("inductance", &ptemp, ckt, type, fast)); } return; } ngspice-26/src/spicelib/parser/inp2r.c0000644000265600020320000001571512264261473017315 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles Modified: Paolo Nenzi 2000 Remarks: This code is based on a version written by Serban Popescu which accepted an optional parameter ac. I have adapted his code to conform to INP standard. (PN) **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" /* undefine to add tracing to this file */ /* #define TRACE */ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current) { /* parse a resistor card */ /* Rname [][][w=][l=][ac=] */ static int mytype = -1; /* the type we determine resistors are */ int type = 0; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *saveline; /* ... just in case we need to go back... */ char *name; /* the resistor's name */ char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held resistance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast = NULL; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ char *s; /* Temporary buffer and pointer for translation */ #ifdef TRACE printf("In INP2R, Current line: %s\n", current->line); #endif if (mytype < 0) { if ((mytype = INPtypelook("Resistor")) < 0) { LITERR("Device type Resistor not supported by this binary\n"); return; } } line = current->line; INPgetTok(&line, &name, 1); /* Rname */ INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); /* */ INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); /* */ INPtermInsert(ckt, &nname2, tab, &node2); val = INPevaluate(&line, &error1, 1); /* [] */ /* either not a number -> model, or * follows a number, so must be a model name * -> MUST be a model name (or null) */ #ifdef TRACE printf("Begining tc=xxx yyyy search and translation in '%s'\n", line); #endif /* TRACE */ /* This routine translates "tc=xxx yyy" to "tc=xxx tc2=yyy". This is a re-write of the routine originally proposed by Hitoshi Tanaka. In my version we simply look for the first occurence of 'tc' followed by '=' followed by two numbers. If we find it then we splice in "tc2=". sjb - 2005-05-09 */ for(s = line; NULL != (s = strstr(s, "tc")); ) { char *p; size_t left_length; s += 2; /* skip any white space */ while(isspace(*s)) s++; /* reject if not '=' */ if(*s != '=') continue; s++; /* skip any white space */ while(isspace(*s)) s++; /* if we now have +, - or a decimal digit then assume we have a number, otherwise reject */ if((*s != '+') && (*s != '-') && !isdigit(*s)) continue; /* look for next white space or null */ while(*s && !isspace(*s)) s++; left_length = (size_t) (s - current->line); /* skip any additional white space */ while(isspace(*s)) s++; /* if we now have +, - or a decimal digit then assume we have the second number, otherwise reject */ if((*s != '+') && (*s != '-') && !isdigit(*s)) continue; /* if we get this far we have met all are criterea, so now we splice in a "tc2=" at the location remembered above. */ p = TMALLOC(char, left_length + 5 + strlen(s) + 1); /* failed to allocate memory so we recover rather crudely by rejecting the translation */ if(!p) break; strncpy(p, current->line, left_length); strcpy(p + left_length, " tc2="); strcpy(p + left_length + 5, s); line = p + (line - current->line); s = p + (s - current->line); /* replace old line with new */ tfree(current->line); current->line = p; } #ifdef TRACE printf("(Translated) Resistor line: %s\n", current->line); #endif saveline = line; /* save then old pointer */ INPgetTok(&line, &model, 1); if (*model && (strcmp(model, "r") != 0)) { /* token isn't null */ if (INPlookMod(model)) { /* If this is a valid model connect it */ #ifdef TRACE printf("In INP2R, Valid R Model: %s\n", model); #endif INPinsert(&model, tab); thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type for resistor"); return; } mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } } else { tfree(model); /* It is not a model */ line = saveline; /* go back */ type = mytype; if (!tab->defRmod) { /* create default R model */ IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defRmod), uid)); } mdfast = tab->defRmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); } else { tfree(model); /* The token is null or we have r=val - a default model will be created */ type = mytype; if (!tab->defRmod) { /* create default R model */ IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defRmod), uid)); } IFC(newInstance, (ckt, tab->defRmod, &fast, name)); if (error1 == 1) { /* was a r=val construction */ val = INPevaluate(&line, &error1, 1); /* [] */ #ifdef TRACE printf ("In INP2R, R=val construction: val=%g\n", val); #endif } } if (error1 == 0) { /* got a resistance above */ ptemp.rValue = val; GCA(INPpName, ("resistance", &ptemp, ckt, type, fast)); } IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("resistance", &ptemp, ckt, type, fast)); } return; } ngspice-26/src/spicelib/parser/inp2u.c0000644000265600020320000000513212264261473017310 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2U(CKTcircuit *ckt, INPtables * tab, card * current) { /* Uname [l=] [n=] */ int mytype; /* the type my lookup says URC is */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* name of the model */ INPmodel *thismodel; /* pointer to our model descriptor */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ mytype = INPtypelook("URC"); if (mytype < 0) { LITERR("Device type URC not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } type = mytype; mdfast = (thismodel->INPmodfast); } else { type = mytype; if (!tab->defUmod) { /* create deafult U model */ IFnewUid(ckt, &uid, NULL, "U", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defUmod), uid)); } mdfast = tab->defUmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); } ngspice-26/src/spicelib/parser/inp2w.c0000644000265600020320000000543312264261473017316 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2W(CKTcircuit *ckt, INPtables * tab, card * current) { /* Wname [] [IC] */ /* CURRENT CONTROLLED SWITCH */ int mytype; /* the type we determine resistors are */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions to return */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ mytype = INPtypelook("CSwitch"); if (mytype < 0) { LITERR("Device type CSwitch not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); parm = INPgetValue(ckt, &line, IF_INSTANCE, tab); ptemp.uValue = parm->uValue; INPgetTok(&line, &model, 1); INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } type = mytype; mdfast = (thismodel->INPmodfast); } else { type = mytype; if (!tab->defWmod) { /* create deafult W model */ IFnewUid(ckt, &uid, NULL, "W", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defWmod), uid)); } mdfast = tab->defWmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); GCA(INPpName, ("control", &ptemp, ckt, type, fast)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { /* ignore a number */ } } ngspice-26/src/spicelib/parser/inplist.c0000644000265600020320000000256112264261473017740 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* INPlist(file,deck,type) * provide an input listing on the specified file of the given * card deck. The listing should be of either PHYSICAL or LOGICAL * lines as specified by the type parameter. */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "inpxx.h" extern void INPlist(FILE *file, card *deck, int type); /* nowhere used function */ void INPlist(FILE * file, card * deck, int type) { card *here; card *there; if (type == LOGICAL) { for (here = deck; here != NULL; here = here->nextcard) { fprintf(file, "%6d : %s\n", here->linenum, here->line); if (here->error != NULL) { fprintf(file, "%s", here->error); } } } else if (type == PHYSICAL) { for (here = deck; here != NULL; here = here->nextcard) { if (here->actualLine == NULL) { fprintf(file, "%6d : %s\n", here->linenum, here->line); if (here->error != NULL) { fprintf(file, "%s", here->error); } } else { for (there = here->actualLine; there != NULL; there = there->nextcard) { fprintf(file, "%6d : %s\n", there->linenum, there->line); if (there->error != NULL) { fprintf(file, "%s", there->error); } } } } } } ngspice-26/src/spicelib/parser/inpgval.c0000644000265600020320000000443712264261473017722 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpptree.h" #include "inpxx.h" IFvalue *INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables * tab) { double *list; int *ilist; double tmp; char *word; int error; static IFvalue temp; INPparseTree *pt; /* make sure we get rid of extra bits in type */ type &= IF_VARTYPES; if (type == IF_INTEGER) { tmp = INPevaluate(line, &error, 1); temp.iValue = (int) floor(0.5 + tmp); /*printf(" returning integer value %d\n",temp.iValue); */ } else if (type == IF_REAL) { temp.rValue = INPevaluate(line, &error, 1); /*printf(" returning real value %e\n",temp.rValue); */ } else if (type == IF_REALVEC) { temp.v.numValue = 0; list = TMALLOC(double, 1); tmp = INPevaluate(line, &error, 1); while (error == 0) { /*printf(" returning vector value %g\n",tmp); */ temp.v.numValue++; list = TREALLOC(double, list, temp.v.numValue); list[temp.v.numValue - 1] = tmp; tmp = INPevaluate(line, &error, 1); } temp.v.vec.rVec = list; } else if (type == IF_INTVEC) { temp.v.numValue = 0; ilist = TMALLOC(int, 1); tmp = INPevaluate(line, &error, 1); while (error == 0) { /*printf(" returning vector value %g\n",tmp); */ temp.v.numValue++; ilist = TREALLOC(int, ilist, temp.v.numValue); ilist[temp.v.numValue - 1] = (int) floor(0.5 + tmp); tmp = INPevaluate(line, &error, 1); } temp.v.vec.iVec = ilist; } else if (type == IF_FLAG) { temp.iValue = 1; } else if (type == IF_NODE) { INPgetTok(line, &word, 1); INPtermInsert(ckt, &word, tab, &(temp.nValue)); } else if (type == IF_INSTANCE) { INPgetTok(line, &word, 1); INPinsert(&word, tab); temp.uValue = word; } else if (type == IF_STRING) { INPgetStr(line, &word, 1); temp.sValue = word; } else if (type == IF_PARSETREE) { INPgetTree(line, &pt, ckt, tab); if (!pt) return (NULL); temp.tValue = (IFparseTree *) pt; /*INPptPrint("Parse tree is: ", temp.tValue); */ } else { /* don't know what type of parameter caller is talking about! */ return (NULL); } return (&temp); } ngspice-26/src/spicelib/parser/inperrc.c0000644000265600020320000000327112264261473017717 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* Concatenate two strings, which have to be defined on the heap. If either is NULL, the other is returned. If both are defined, a new string is malloced, they are combined, both input strings are freed, and the new string is returned. */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "inpxx.h" char *INPerrCat(char *a, char *b) { if (a != NULL) { if (b == NULL) { /* a valid, b null, return a */ return (a); } else { /* both valid - hard work... */ register char *errtmp; errtmp = TMALLOC(char, strlen(a) + strlen(b) + 2); (void) strcpy(errtmp, a); (void) strcat(errtmp, "\n"); (void) strcat(errtmp, b); FREE(a); FREE(b); return (errtmp); } } else /* a null, so return b */ return (b); } char *INPstrCat(char *a, char *b, char *c) { if (a != NULL) { if (b == NULL) { /* a valid, b null, return a */ return (a); } else { /* both valid - hard work... */ register char *strtmp; strtmp = TMALLOC(char, strlen(a) + strlen(b) + 2); (void) strcpy(strtmp, a); (void) strcat(strtmp, c); /* single character only! */ (void) strcat(strtmp, b); FREE(a); FREE(b); return (strtmp); } } else /* a null, so return b */ return (b); } ngspice-26/src/spicelib/parser/inp2q.c0000644000265600020320000001577412264261473017321 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles Modified: 2001 Paolo Nenzi (Cider Integration) **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, CKTnode *gnode) { /* Qname [] [] [OFF] * [IC=,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ #ifdef ADMS char *nname5; /* the fifth node's name */ #endif CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ #ifdef ADMS CKTnode *node5; /* the fifth node's node pointer */ #endif int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 nodes */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ #ifdef TRACE printf("INP2Q: Parsing '%s'\n", current->line); #endif nodeflag = 0; /* initially specify a 4 terminal device */ line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); thismodel = NULL; /* See if 4th token after device specification is a model name */ if (INPlookMod(model)) { /* 3-terminal device - substrate to ground */ node4 = gnode; INPinsert(&model, tab); #ifdef TRACE printf("INP2Q: 3-terminal device - substrate to ground\n"); #endif current->error = INPgetMod(ckt, model, &thismodel, tab); } else { nname4 = model; INPtermInsert(ckt, &nname4, tab, &node4); INPgetTok(&line, &model, 1); /* See if 5th token after device specification is a model name */ #ifdef TRACE printf("INP2Q: checking for 4 node device\n"); #endif if (INPlookMod(model)) { /* 4-terminal device - special case with tnodeout flag not handled */ INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); #ifdef ADMS if (thismodel == NULL) { fprintf(stderr, "%s\nPlease check model, level or number of terminals!\n", current->error); controlled_exit(EXIT_BAD); } else if ((thismodel->INPmodType == INPtypelook("hicum0")) || (thismodel->INPmodType == INPtypelook("hicum2")) || (thismodel->INPmodType == INPtypelook("bjt504t"))) { node5 = gnode; /* 4-terminal adms device - thermal node to ground */ nname5 = copy("0"); INPtermInsert(ckt, &nname5, tab, &node5); nodeflag = 1; /* now specify a 5 node device */ } } else { /* 5-terminal device */ #ifdef TRACE printf("INP2Q: checking for 5 node device\n"); #endif nodeflag = 1; /* now specify a 5 node device */ nname5 = model; INPtermInsert(ckt, &nname5, tab, &node5); INPgetTok(&line, &model, 1); INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); #endif } } #ifdef TRACE printf("INP2Q: Looking up model\n"); #endif if (thismodel != NULL) { if ((thismodel->INPmodType != INPtypelook("BJT")) #ifdef CIDER && (thismodel->INPmodType != INPtypelook("NBJT")) && (thismodel->INPmodType != INPtypelook("NBJT2")) #endif #ifdef ADMS && (thismodel->INPmodType != INPtypelook("hicum0")) && (thismodel->INPmodType != INPtypelook("hicum2")) && (thismodel->INPmodType != INPtypelook("bjt504t")) #endif && (thismodel->INPmodType != INPtypelook("VBIC"))) { LITERR("incorrect model type"); return; } #ifdef ADMS if ((nodeflag && (thismodel->INPmodType != INPtypelook("hicum0"))) && (nodeflag && (thismodel->INPmodType != INPtypelook("hicum2"))) && (nodeflag && (thismodel->INPmodType != INPtypelook("bjt504t")))) { LITERR("Too much nodes for this model type"); return; } #endif type = (thismodel->INPmodType); mdfast = (thismodel->INPmodfast); } else { /* no model found */ type = INPtypelook("BJT"); if (type < 0) { LITERR("Device type BJT not supported by this binary\n"); return; } if (!tab->defQmod) { /* create default Q model */ char *err; IFnewUid(ckt, &uid, NULL, "Q", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defQmod), uid)); err = TMALLOC(char, 70 + strlen(model)); (void) sprintf(err, "Unable to find definition of model %s\n", model); LITERR(err); tfree(err); } mdfast = tab->defQmod; } #ifdef TRACE printf("INP2Q: Type: %d nodeflag: %d instancename: %s\n", type, nodeflag, name); #endif IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); #ifdef ADMS if (nodeflag) { /* 5-node device */ IFC(bindNode, (ckt, fast, 5, node5)); } #endif PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { #ifdef CIDER if( type == INPtypelook("NBJT2") ) { LITERR(" error: no unlabeled parameter permitted on NBJT2\n"); } else { #endif ptemp.rValue = leadval; GCA(INPpName, ("area", &ptemp, ckt, type, fast)); } #ifdef CIDER } #endif } ngspice-26/src/spicelib/parser/inpgtitl.c0000644000265600020320000000120512264261473020102 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* INPgetTitle(ckt,data) * get the title card from the specified data deck and pass * it through to SPICE-3. */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/cpstd.h" #include "ngspice/fteext.h" #include "inpxx.h" int INPgetTitle(CKTcircuit **ckt, card ** data) { int error; error = ft_sim->newCircuit (ckt); if (error) return (error); *data = (*data)->nextcard; return (OK); } ngspice-26/src/spicelib/parser/inp2dot.c0000644000265600020320000006104112264261473017633 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" #include "ngspice/cpdefs.h" #include "ngspice/tskdefs.h" static int dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int which; /* which analysis we are performing */ int error; /* error code temporary */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ char *steptype; /* ac analysis, type of stepping function */ int found; char *point; /* .noise V(OUTPUT,REF) SRC {DEC OCT LIN} NP FSTART FSTOP */ which = ft_find_analysis("NOISE"); if (which == -1) { LITERR("Noise analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Noise Analysis", &foo, task)); INPgetTok(&line, &name, 1); /* Make sure the ".noise" command is followed by V(xxxx). If it is, extract 'xxxx'. If not, report an error. */ if (name != NULL) { if ((*name == 'V' || *name == 'v') && !name[1]) { INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "output", &ptemp)); if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); ptemp.nValue = node2; } else { ptemp.nValue = gnode; } GCA(INPapName, (ckt, which, foo, "outputref", &ptemp)); INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "input", &ptemp)); INPgetTok(&line, &steptype, 1); ptemp.iValue = 1; error = INPapName(ckt, which, foo, steptype, &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); error = INPapName(ckt, which, foo, "numsteps", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); error = INPapName(ckt, which, foo, "start", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); parm = INPgetValue(ckt, &line, IF_REAL, tab); error = INPapName(ckt, which, foo, "stop", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); /* now see if "ptspersum" has been specified by the user */ for (found = 0, point = line; (!found) && (*point != '\0'); found = ((*point != ' ') && (*(point++) != '\t'))) ; if (found) { parm = INPgetValue(ckt, &line, IF_INTEGER, tab); error = INPapName(ckt, which, foo, "ptspersum", parm); if (error) current->error = INPerrCat(current->error, INPerror(error)); } else { ptemp.iValue = 0; error = INPapName(ckt, which, foo, "ptspersum", &ptemp); if (error) current->error = INPerrCat(current->error, INPerror(error)); } } else LITERR("bad syntax " "[.noise v(OUT) SRC {DEC OCT LIN} " "NP FSTART FSTOP ]\n"); } else { LITERR("bad syntax " "[.noise v(OUT) SRC {DEC OCT LIN} " "NP FSTART FSTOP ]\n"); } return 0; } static int dot_op(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int which; /* which analysis we are performing */ int error; /* error code temporary */ NG_IGNORE(line); NG_IGNORE(tab); NG_IGNORE(gnode); /* .op */ which = ft_find_analysis("OP"); if (which == -1) { LITERR("DC operating point analysis unsupported\n"); return (0); } IFC(newAnalysis, (ckt, which, "Operating Point", &foo, task)); return (0); } static int dot_disto(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int which; /* which analysis we are performing */ int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ char *steptype; /* ac analysis, type of stepping function */ NG_IGNORE(gnode); /* .disto {DEC OCT LIN} NP FSTART FSTOP */ which = ft_find_analysis("DISTO"); if (which == -1) { LITERR("Small signal distortion analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Distortion Analysis", &foo, task)); INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */ ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, steptype, &ptemp)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* number of points */ GCA(INPapName, (ckt, which, foo, "numsteps", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */ GCA(INPapName, (ckt, which, foo, "start", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */ GCA(INPapName, (ckt, which, foo, "stop", parm)); if (*line) { parm = INPgetValue(ckt, &line, IF_REAL, tab); /* f1phase */ GCA(INPapName, (ckt, which, foo, "f2overf1", parm)); } return (0); } static int dot_ac(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ char *steptype; /* ac analysis, type of stepping function */ NG_IGNORE(gnode); /* .ac {DEC OCT LIN} NP FSTART FSTOP */ which = ft_find_analysis("AC"); if (which == -1) { LITERR("AC small signal analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "AC Analysis", &foo, task)); INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */ ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, steptype, &ptemp)); tfree(steptype); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* number of points */ GCA(INPapName, (ckt, which, foo, "numsteps", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */ GCA(INPapName, (ckt, which, foo, "start", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */ GCA(INPapName, (ckt, which, foo, "stop", parm)); return (0); } static int dot_pz(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ char *steptype; /* ac analysis, type of stepping function */ NG_IGNORE(gnode); /* .pz nodeI nodeG nodeJ nodeK {V I} {POL ZER PZ} */ which = ft_find_analysis("PZ"); if (which == -1) { LITERR("Pole-zero analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Pole-Zero Analysis", &foo, task)); parm = INPgetValue(ckt, &line, IF_NODE, tab); GCA(INPapName, (ckt, which, foo, "nodei", parm)); parm = INPgetValue(ckt, &line, IF_NODE, tab); GCA(INPapName, (ckt, which, foo, "nodeg", parm)); parm = INPgetValue(ckt, &line, IF_NODE, tab); GCA(INPapName, (ckt, which, foo, "nodej", parm)); parm = INPgetValue(ckt, &line, IF_NODE, tab); GCA(INPapName, (ckt, which, foo, "nodek", parm)); INPgetTok(&line, &steptype, 1); /* get V or I */ ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, steptype, &ptemp)); INPgetTok(&line, &steptype, 1); /* get POL, ZER, or PZ */ ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, steptype, &ptemp)); return (0); } static int dot_dc(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { char *name; /* the resistor's name */ int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ NG_IGNORE(gnode); /* .dc SRC1NAME Vstart1 Vstop1 Vinc1 [SRC2NAME Vstart2 */ /* Vstop2 Vinc2 */ which = ft_find_analysis("DC"); if (which == -1) { LITERR("DC transfer curve analysis unsupported\n"); return (0); } IFC(newAnalysis, (ckt, which, "DC transfer characteristic", &foo, task)); INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "name1", &ptemp)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart1 */ GCA(INPapName, (ckt, which, foo, "start1", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop1 */ GCA(INPapName, (ckt, which, foo, "stop1", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc1 */ GCA(INPapName, (ckt, which, foo, "step1", parm)); if (*line) { INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "name2", &ptemp)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstart2 */ GCA(INPapName, (ckt, which, foo, "start2", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vstop2 */ GCA(INPapName, (ckt, which, foo, "stop2", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* vinc2 */ GCA(INPapName, (ckt, which, foo, "step2", parm)); } return 0; } static int dot_tf(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { char *name; /* the resistor's name */ int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ int which; /* which analysis we are performing */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ /* .tf v( node1, node2 ) src */ /* .tf vsrc2 src */ which = ft_find_analysis("TF"); if (which == -1) { LITERR("Transfer Function analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Transfer Function", &foo, task)); INPgetTok(&line, &name, 0); /* name is now either V or I or a serious error */ if (*name == 'v' && strlen(name) == 1) { if (*line != '(' ) { /* error, bad input format */ } INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "outpos", &ptemp)); if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); ptemp.nValue = node2; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = TMALLOC(char, 5 + strlen(nname1) + strlen(nname2)); (void) sprintf(ptemp.sValue, "V(%s,%s)", nname1, nname2); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } else { ptemp.nValue = gnode; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = TMALLOC(char, 4 + strlen(nname1)); (void) sprintf(ptemp.sValue, "V(%s)", nname1); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } } else if (*name == 'i' && strlen(name) == 1) { INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "outsrc", &ptemp)); } else { LITERR("Syntax error: voltage or current expected.\n"); return 0; } INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "insrc", &ptemp)); return (0); } static int dot_tran(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ double dtemp; /* random double precision temporary */ char *word; /* something to stick a word of input into */ NG_IGNORE(gnode); /* .tran Tstep Tstop > */ which = ft_find_analysis("TRAN"); if (which == -1) { LITERR("Transient analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Transient Analysis", &foo, task)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstep */ GCA(INPapName, (ckt, which, foo, "tstep", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Tstop */ GCA(INPapName, (ckt, which, foo, "tstop", parm)); if (*line) { dtemp = INPevaluate(&line, &error, 1); /* tstart? */ if (error == 0) { ptemp.rValue = dtemp; GCA(INPapName, (ckt, which, foo, "tstart", &ptemp)); dtemp = INPevaluate(&line, &error, 1); /* tmax? */ if (error == 0) { ptemp.rValue = dtemp; GCA(INPapName, (ckt, which, foo, "tmax", &ptemp)); } } } if (*line) { INPgetTok(&line, &word, 1); /* uic? */ if (strcmp(word, "uic") == 0) { ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, "uic", &ptemp)); } else { LITERR(" Error: unknown parameter on .tran - ignored\n"); } } return (0); } static int dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { char *name; /* the resistor's name */ int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ char *steptype; /* ac analysis, type of stepping function */ which = ft_find_analysis("SENS"); if (which == -1) { LITERR("Sensitivity unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Sensitivity Analysis", &foo, task)); /* Format is: * .sens * + [ac [dec|lin|oct] | dc ] */ /* Get the output voltage or current */ INPgetTok(&line, &name, 0); /* name is now either V or I or a serious error */ if (*name == 'v' && strlen(name) == 1) { if (*line != '(') { LITERR("Syntax error: '(' expected after 'v'\n"); return 0; } INPgetNetTok(&line, &nname1, 0); INPtermInsert(ckt, &nname1, tab, &node1); ptemp.nValue = node1; GCA(INPapName, (ckt, which, foo, "outpos", &ptemp)); if (*line != ')') { INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); ptemp.nValue = node2; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = TMALLOC(char, 5 + strlen(nname1) + strlen(nname2)); (void) sprintf(ptemp.sValue, "V(%s,%s)", nname1, nname2); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } else { ptemp.nValue = gnode; GCA(INPapName, (ckt, which, foo, "outneg", &ptemp)); ptemp.sValue = TMALLOC(char, 4 + strlen(nname1)); (void) sprintf(ptemp.sValue, "V(%s)", nname1); GCA(INPapName, (ckt, which, foo, "outname", &ptemp)); } } else if (*name == 'i' && strlen(name) == 1) { INPgetTok(&line, &name, 1); INPinsert(&name, tab); ptemp.uValue = name; GCA(INPapName, (ckt, which, foo, "outsrc", &ptemp)); } else { LITERR("Syntax error: voltage or current expected.\n"); return 0; } INPgetTok(&line, &name, 1); if (name && !strcmp(name, "pct")) { ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, "pct", &ptemp)); INPgetTok(&line, &name, 1); } if (name && !strcmp(name, "ac")) { INPgetTok(&line, &steptype, 1); /* get DEC, OCT, or LIN */ ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, steptype, &ptemp)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* number of points */ GCA(INPapName, (ckt, which, foo, "numsteps", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstart */ GCA(INPapName, (ckt, which, foo, "start", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* fstop */ GCA(INPapName, (ckt, which, foo, "stop", parm)); return (0); } else if (name && *name && strcmp(name, "dc")) { /* Bad flag */ LITERR("Syntax error: 'ac' or 'dc' expected.\n"); return 0; } return (0); } #ifdef WANT_SENSE2 static int dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ int which; /* which analysis we are performing */ char *token; /* a token from the line */ NG_IGNORE(gnode); /* .sens {AC} {DC} {TRAN} [dev=nnn parm=nnn]* */ which = ft_find_analysis("SENS2"); if (which == -1) { LITERR("Sensitivity-2 analysis unsupported\n"); return (0); } IFC(newAnalysis, (ckt, which, "Sensitivity-2 Analysis", &foo, task)); while (*line) { IFparm *if_parm; /* read the entire line */ INPgetTok(&line, &token, 1); if_parm = ft_find_analysis_parm(which, token); if (!if_parm) { /* didn't find it! */ LITERR(" Error: unknown parameter on .sens-ignored \n"); continue; } /* found it, analysis which, parameter i */ if (if_parm->dataType & IF_FLAG) { /* one of the keywords! */ ptemp.iValue = 1; error = ft_sim->setAnalysisParm (ckt, foo, if_parm->id, &ptemp, NULL); if (error) current->error = INPerrCat(current->error, INPerror(error)); } else { parm = INPgetValue(ckt, &line, if_parm->dataType, tab); error = ft_sim->setAnalysisParm (ckt, foo, if_parm->id, parm, NULL); if (error) current->error = INPerrCat(current->error, INPerror(error)); } } return (0); } #endif #ifdef WITH_PSS /*SP: Steady State Analyis */ static int dot_pss(char *line, void *ckt, INPtables *tab, card *current, void *task, void *gnode, JOB *foo) { int error; /* error code temporary */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* a pointer to a value struct for function returns */ char *nname; /* the oscNode name */ CKTnode *nnode; /* the oscNode node */ int which; /* which analysis we are performing */ char *word; /* something to stick a word of input into */ NG_IGNORE(gnode); /* .pss Fguess StabTime OscNode */ which = ft_find_analysis("PSS"); if (which == -1) { LITERR("Periodic steady state analysis unsupported.\n"); return (0); } IFC(newAnalysis, (ckt, which, "Periodic Steady State Analysis", &foo, task)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Fguess */ GCA(INPapName, (ckt, which, foo, "fguess", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* StabTime */ GCA(INPapName, (ckt, which, foo, "stabtime", parm)); INPgetNetTok(&line, &nname, 0); INPtermInsert(ckt, &nname, tab, &nnode); ptemp.nValue = nnode; GCA(INPapName, (ckt, which, foo, "oscnode", &ptemp)); /* OscNode given as string */ parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS points */ GCA(INPapName, (ckt, which, foo, "points", parm)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* PSS harmonics */ GCA(INPapName, (ckt, which, foo, "harmonics", parm)); parm = INPgetValue(ckt, &line, IF_INTEGER, tab); /* SC iterations */ GCA(INPapName, (ckt, which, foo, "sc_iter", parm)); parm = INPgetValue(ckt, &line, IF_REAL, tab); /* Steady coefficient */ GCA(INPapName, (ckt, which, foo, "steady_coeff", parm)); if (*line) { INPgetTok(&line, &word, 1); /* uic? */ if (strcmp(word, "uic") == 0) { ptemp.iValue = 1; GCA(INPapName, (ckt, which, foo, "uic", &ptemp)); } else { fprintf(stderr,"Error: unknown parameter %s on .pss - ignored\n", word); } } return (0); } /* SP */ #endif static int dot_options(char *line, CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode, JOB *foo) { NG_IGNORE(line); NG_IGNORE(gnode); NG_IGNORE(foo); /* .option - specify program options - rather complicated */ /* use a subroutine to handle all of them to keep this */ /* subroutine managable. */ INPdoOpts(ckt, &(task->taskOptions), current, tab); return (0); } int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, TSKtask *task, CKTnode *gnode) { /* . Many possibilities */ char *token; /* a token from the line, tmalloc'ed */ JOB *foo = NULL; /* pointer to analysis */ /* the part of the current line left to parse */ char *line = current->line; int rtn = 0; INPgetTok(&line, &token, 1); if (strcmp(token, ".model") == 0) { /* don't have to do anything, since models were all done in * pass 1 */ goto quit; } else if ((strcmp(token, ".width") == 0) || strcmp(token, ".print") == 0 || strcmp(token, ".plot") == 0) { /* obsolete - ignore */ LITERR(" Warning: obsolete control card - ignored \n"); goto quit; } else if ((strcmp(token, ".temp") == 0)) { /* .temp temp1 temp2 temp3 temp4 ..... */ /* not yet implemented - warn & ignore */ /* LITERR(" Warning: .TEMP card obsolete - use .options TEMP and TNOM\n"); */ goto quit; } else if ((strcmp(token, ".op") == 0)) { rtn = dot_op(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".nodeset") == 0)) { goto quit; } else if ((strcmp(token, ".disto") == 0)) { rtn = dot_disto(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".noise") == 0)) { rtn = dot_noise(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".four") == 0) || (strcmp(token, ".fourier") == 0)) { /* .four */ /* not implemented - warn & ignore */ LITERR("Use fourier command to obtain fourier analysis\n"); goto quit; } else if ((strcmp(token, ".ic") == 0)) { goto quit; } else if ((strcmp(token, ".ac") == 0)) { rtn = dot_ac(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".pz") == 0)) { rtn = dot_pz(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".dc") == 0)) { rtn = dot_dc(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".tf") == 0)) { rtn = dot_tf(line, ckt, tab, current, task, gnode, foo); goto quit; } else if ((strcmp(token, ".tran") == 0)) { rtn = dot_tran(line, ckt, tab, current, task, gnode, foo); goto quit; #ifdef WITH_PSS /* SP: Steady State Analysis */ } else if ((strcmp(token, ".pss") == 0)) { rtn = dot_pss(line, ckt, tab, current, task, gnode, foo); goto quit; /* SP */ #endif } else if ((strcmp(token, ".subckt") == 0) || (strcmp(token, ".ends") == 0)) { /* not yet implemented - warn & ignore */ LITERR(" Warning: Subcircuits not yet implemented - ignored \n"); goto quit; } else if ((strcmp(token, ".end") == 0)) { /* .end - end of input */ /* not allowed to pay attention to additional input - return */ rtn = 1; goto quit; } else if (strcmp(token, ".sens") == 0) { rtn = dot_sens(line, ckt, tab, current, task, gnode, foo); goto quit; } #ifdef WANT_SENSE2 else if ((strcmp(token, ".sens2") == 0)) { rtn = dot_sens2(line, ckt, tab, current, task, gnode, foo); goto quit; } #endif else if ((strcmp(token, ".probe") == 0)) { /* Maybe generate a "probe" format file in the future. */ goto quit; } else if ((strcmp(token, ".options") == 0)|| (strcmp(token,".option")==0) || (strcmp(token,".opt")==0)) { rtn = dot_options(line, ckt, tab, current, task, gnode, foo); goto quit; } /* Added by H.Tanaka to find .global option */ else if (strcmp(token, ".global") == 0) { rtn = 0; LITERR(" Warning: .global not yet implemented - ignored \n"); goto quit; } /* ignore .meas statements -- these will be handled after analysis */ /* also ignore .param statements */ /* ignore .prot, .unprot */ else if (strcmp(token, ".meas") == 0 || strcmp(token, ".param") == 0 || strcmp(token, ".measure") == 0 || strcmp(token, ".prot") == 0 || strcmp(token, ".unprot") == 0) { rtn = 0; goto quit; } LITERR(" unimplemented control card - error \n"); quit: tfree(token); return rtn; } ngspice-26/src/spicelib/parser/inppname.c0000644000265600020320000000237612264261473020071 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * INPpName() * * Take a parameter by Name and set it on the specified device */ #include "ngspice/ngspice.h" #include #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "inpxx.h" int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, GENinstance *fast) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this device is a member of */ /* the device type code to the device being parsed */ /* direct pointer to device being parsed */ { int error; /* int to store evaluate error return codes in */ int i; for (i = 0; i < *(ft_sim->devices[dev]->numInstanceParms); i++) { if (strcmp(parm, ft_sim->devices[dev]->instanceParms[i].keyword) == 0) { error = ft_sim->setInstanceParm (ckt, fast, ft_sim->devices[dev]->instanceParms[i].id, val, NULL); if (error) return (error); break; } } if (i == *(ft_sim->devices[dev]->numInstanceParms)) { return (E_BADPARM); } return (OK); } ngspice-26/src/spicelib/parser/inp2j.c0000644000265600020320000000551612264261473017303 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2J(CKTcircuit *ckt, INPtables * tab, card * current) { /* Jname [] [OFF] [IC=,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid of default model */ line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); INPinsert(&model, tab); thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (thismodel->INPmodType != INPtypelook("JFET") && thismodel->INPmodType != INPtypelook("JFET2") ) { LITERR("incorrect model type"); return; } type = thismodel->INPmodType; mdfast = (thismodel->INPmodfast); } else { type = INPtypelook("JFET"); if (type < 0) { LITERR("Device type JFET not supported by this binary\n"); return; } if (!tab->defJmod) { /* create default J model */ IFnewUid(ckt, &uid, NULL, "J", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defJmod), uid)); } mdfast = tab->defJmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("area", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inp2c.c0000644000265600020320000001040712264261473017267 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2C(CKTcircuit *ckt, INPtables * tab, card * current) { /* parse a capacitor card */ /* Cname [] [] [IC=] */ static int mytype = -1; /* the type we determine capacitors are */ int type = 0; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *saveline; /* ... just in case we need to go back... */ char *name; /* the resistor's name */ char *model; /* the name of the capacitor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ double val; /* temp to held resistance */ int error; /* error code temporary */ int error1; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast = NULL; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default cap model */ #ifdef TRACE printf("In INP2C, Current line: %s\n", current->line); #endif if (mytype < 0) { if ((mytype = INPtypelook("Capacitor")) < 0) { LITERR("Device type Capacitor not supported by this binary\n"); return; } } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); val = INPevaluate(&line, &error1, 1); saveline = line; INPgetTok(&line, &model, 1); if (*model && (strcmp(model, "c") != 0)) { /* token isn't null */ if (INPlookMod(model)) { /* If this is a valid model connect it */ INPinsert(&model, tab); thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } } else { tfree(model); /* It is not a model */ line = saveline; /* go back */ type = mytype; if (!tab->defCmod) { /* create default C model */ IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defCmod), uid)); } mdfast = tab->defCmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); } else { tfree(model); /* The token is null and a default model will be created */ type = mytype; if (!tab->defCmod) { /* create default C model */ IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defCmod), uid)); } IFC(newInstance, (ckt, tab->defCmod, &fast, name)); if (error1 == 1) { /* was a c=val construction */ val = INPevaluate(&line, &error1, 1); /* [] */ #ifdef TRACE printf ("In INP2C, C=val construction: val=%g\n", val); #endif } } if (error1 == 0) { /* Looks like a number */ ptemp.rValue = val; GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast)); } IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("capacitance", &ptemp, ckt, type, fast)); } return; } ngspice-26/src/spicelib/parser/inppas3.h0000644000265600020320000000015512264261473017635 0ustar andreasadmin/* AlansFixes */ #ifndef ngspice_INPPAS3_H #define ngspice_INPPAS3_H #include "ngspice/inpdefs.h" #endif ngspice-26/src/spicelib/parser/inp2p.c0000644000265600020320000001021012264261473017274 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2P( CKTcircuit *ckt, INPtables *tab, card *current) { int mytype; /* the type we determine cpls are */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name, *tempname; /* the cpl's name */ char *model; /* the name of the cpl's model */ char **nname1; /* the first node's name */ char **nname2; /* the second node's name */ char *ground; CKTnode **node1; /* the first node's node pointer */ CKTnode **node2; /* the second node's node pointer */ CKTnode *groundnode; int error; /* error code temporary */ int error1=0; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package cpl into */ IFuid uid; /* uid for default model */ double lenval = 0; int lenvalgiven = 0; int num, i; mytype = INPtypelook("CplLines"); if(mytype < 0 ) { LITERR("Device type CplLines not supported by this binary\n"); return; } line = current->line; INPgetTok(&line,&name,1); INPinsert(&name,tab); /* num = (int) INPevaluate(&line,&error1,1); */ num = 0; /* first pass to determine the dimension */ while (*line != '\0') { INPgetTok(&line, &tempname,1); if ((strcmp(tempname, "length") == 0) || (strcmp(tempname, "len") == 0)) break; num ++; } num = (num - 2) / 2; line = current->line; INPgetTok(&line,&name,1); nname1 = TMALLOC(char *, num); nname2 = TMALLOC(char *, num); node1 = TMALLOC(CKTnode *, num); node2 = TMALLOC(CKTnode *, num); for (i = 0; i < num; i++) { INPgetNetTok(&line,&(nname1[i]),1); INPtermInsert(ckt,&(nname1[i]),tab,&(node1[i])); } INPgetTok(&line,&ground,1); INPtermInsert(ckt,&ground,tab,&groundnode); for (i = 0; i < num; i++) { INPgetNetTok(&line,&(nname2[i]),1); INPtermInsert(ckt,&(nname2[i]),tab,&(node2[i])); } INPgetTok(&line,&ground,1); INPtermInsert(ckt,&ground,tab,&groundnode); INPgetTok(&line,&model,1); if(*model) { /* token isn't null */ INPinsert(&model,tab); thismodel = NULL; current->error = INPgetMod(ckt,model,&thismodel,tab); if(thismodel != NULL) { if(mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } else { type = mytype; if(!tab->defPmod) { /* create default P model */ IFnewUid(ckt, &uid, NULL, "P", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defPmod),uid)); } mdfast = tab->defPmod; } IFC(newInstance,(ckt,mdfast,&fast,name)); INPgetTok(&line,&model,1); if ((strcmp(model, "length") == 0) || (strcmp(model, "len") == 0)) { lenval = INPevaluate(&line,&error1,1); lenvalgiven = 1; } } else { LITERR("model name is not found"); return; } /* IFC(bindNode,(ckt,fast,1,fakename)); */ ptemp.iValue = num; GCA(INPpName,("dimension", &ptemp,ckt,type,fast)); ptemp.v.vec.sVec = nname1; GCA(INPpName,("pos_nodes", &ptemp,ckt,type,fast)); ptemp.v.vec.sVec = nname2; GCA(INPpName,("neg_nodes", &ptemp,ckt,type,fast)); if (error1 == 0 && lenvalgiven) { ptemp.rValue = lenval; GCA(INPpName,("length",&ptemp,ckt,type,fast)); } return; } ngspice-26/src/spicelib/parser/inp2f.c0000644000265600020320000000471412264261473017276 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2F(CKTcircuit *ckt, INPtables * tab, card * current) { /* Fname */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions which return one */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid of default model to be created */ type = INPtypelook("CCCS"); if (type < 0) { LITERR("Device type CCCS not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defFmod) { /* create default F model */ IFnewUid(ckt, &uid, NULL, "F", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defFmod), uid)); } /* call newInstance with macro IFC */ IFC(newInstance, (ckt, tab->defFmod, &fast, name)); /* call bindNode with macro IFC */ IFC(bindNode, (ckt, fast, 1, node1)); /* call bindNode with macro IFC */ IFC(bindNode, (ckt, fast, 2, node2)); parm = INPgetValue(ckt, &line, IF_INSTANCE, tab); /* call INPpName with macro GCA */ GCA(INPpName, ("control", parm, ckt, type, fast)); /* call INPdevParse with macro PARSECALL */ PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; /* call INPpName with macro GCA */ GCA(INPpName, ("gain", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inp2e.c0000644000265600020320000000464512264261473017300 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2E(CKTcircuit *ckt, INPtables * tab, card * current) { /* Ename */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ type = INPtypelook("VCVS"); if (type < 0) { LITERR("Device type VCVS not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetNetTok(&line, &nname4, 1); INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defEmod) { /* create default E model */ IFnewUid(ckt, &uid, NULL, "E", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defEmod), uid)); } IFC(newInstance, (ckt, tab->defEmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("gain", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inp2t.c0000644000265600020320000000451212264261473017310 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2T(CKTcircuit *ckt, INPtables * tab, card * current) { /* Tname [TD=] * [F= [NL=]][IC=,,,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ type = INPtypelook("Tranline"); if (type < 0) { LITERR("Device type Tranline not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetNetTok(&line, &nname4, 1); INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defTmod) { /* create deafult T model */ IFnewUid(ckt, &uid, NULL, "T", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defTmod), uid)); } IFC(newInstance, (ckt, tab->defTmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); } ngspice-26/src/spicelib/parser/inp2b.c0000644000265600020320000000407012264261473017265 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" #include "ngspice/cktdefs.h" void INP2B(CKTcircuit *ckt, INPtables * tab, card * current) { /* Bname [V=expr] [I=expr] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model name */ /* Arbitrary source. */ type = INPtypelook("ASRC"); if (type < 0) { LITERR("Device type Asource not supported by this binary\n"); return; } /* if we find 'hertz' variable, set flag to actual circuit */ if(strstr(current->line, "hertz")) ckt->CKTvarHertz = 1; line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); error = INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); error = INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defBmod) { /* create default B model */ IFnewUid(ckt, &uid, NULL, "B", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defBmod), uid)); } IFC(newInstance, (ckt, tab->defBmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); } ngspice-26/src/spicelib/parser/inp2y.c0000644000265600020320000002676312264261473017331 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Author: 1992 Charles Hough **********/ #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2Y( CKTcircuit *ckt, INPtables *tab, card *current) { /* parse a txl card */ /* Yxxxx node1 gnode node2 gnode name */ int mytype; /* the type to determine txl */ int mytype2; /* the type to determine cpl */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *buf; /* temporary buffer for parsing */ char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *rname1, *rname2, *rname3; char *cname1, *cname2, *cname3, *cname4; char *internal1, *internal2; char *ground1, *ground2; CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *gnode1, *gnode2, *inode1, *inode2; int error; /* error code temporary */ int error1=0; /* secondary error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ GENmodel *mdfast2, *mdfast3, *mdfast4, *mdfast5, *mdfast6; GENinstance *fast2, *fast3, *fast4, *fast5, *fast6; IFuid uid; /* uid for default model */ GENinstance *txl; IFvalue ptemp; /* a value structure to package into */ double lval=0, rval=0, cval=0, lenval=0; int lenvalgiven = 0; mytype = INPtypelook("TransLine"); mytype2 = INPtypelook("CplLines"); if(mytype < 0 ) { LITERR("Device type TransLine not supported by this binary\n"); return; } line = current->line; INPgetTok(&line,&name,1); INPinsert(&name,tab); INPgetNetTok(&line,&nname1,1); INPtermInsert(ckt,&nname1,tab,&node1); INPgetNetTok(&line,&ground1,1); INPtermInsert(ckt,&ground1,tab,&gnode1); INPgetNetTok(&line,&nname2,1); INPtermInsert(ckt,&nname2,tab,&node2); INPgetNetTok(&line,&ground2,1); INPtermInsert(ckt,&ground2,tab,&gnode2); INPgetTok(&line,&model,1); if(*model) { /* token isn't null */ INPinsert(&model,tab); thismodel = NULL; current->error = INPgetMod(ckt,model,&thismodel,tab); INPgetTok(&line,&model,1); if (strcmp(model, "len") == 0) { lenval = INPevaluate(&line,&error1,1); lenvalgiven = 1; } if(thismodel != NULL) { if (thismodel->INPmodType == mytype2) { INP2P(ckt,tab,current); return; } else if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } line = thismodel->INPmodLine->line; INPgetTok(&line,&buf,1); /* throw out .model */ INPgetTok(&line,&buf,1); /* throw out model name */ INPgetTok(&line,&buf,1); /* throw out txl */ INPgetTok(&line,&buf,1); while (*line != '\0') { if (*buf == 'R' || *buf == 'r') { INPgetTok(&line,&buf,1); rval = INPevaluate(&buf, &error1, 1); } if ((strcmp(buf,"L") == 0) || (strcmp(buf,"l") == 0)) { INPgetTok(&line,&buf,1); lval = INPevaluate(&buf, &error1, 1); } if ((strcmp(buf,"C") == 0) || (strcmp(buf,"c") == 0)) { INPgetTok(&line,&buf,1); cval = INPevaluate(&buf, &error1, 1); } if (lenvalgiven == 0) { if (strcmp(buf,"length")== 0) { INPgetTok(&line,&buf,1); lenval = INPevaluate(&buf, &error1, 1); } } INPgetTok(&line,&buf,1); } if (lenval && rval && lval && rval/lval > 1.6e10) { /* use 3-pi model for high resistance as fall back */ rval = 3.0 / (rval * lenval); cval = cval * lenval / 6.0; type = INPtypelook("Resistor"); /* resistor between node1 and internal1 */ internal1 = TMALLOC(char, 10 + strlen(name)); strcpy(internal1, "txlnd1"); strcat(internal1, name); INPtermInsert(ckt, &internal1, tab, &inode1); if(!tab->defRmod) { /* create default R model */ IFnewUid(ckt, &uid, NULL, "R", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defRmod),uid)); } mdfast = tab->defRmod; rname1 = TMALLOC(char, 10 + strlen(name)); strcpy(rname1, "txlres1"); strcat(rname1, name); INPinsert(&rname1, tab); IFC(newInstance,(ckt,mdfast,&fast,rname1)); IFC(bindNode,(ckt,fast,1,node1)); IFC(bindNode,(ckt,fast,2,inode1)); ptemp.rValue = rval; GCA(INPpName,("resistance",&ptemp,ckt,type,fast)); /* resistor between internal1 and internal2 */ internal2 = TMALLOC(char, 10 + strlen(name)); strcpy(internal2, "txlnd2"); strcat(internal2, name); INPtermInsert(ckt, &internal2, tab, &inode2); rname2 = TMALLOC(char, 10 + strlen(name)); strcpy(rname2, "txlres2"); strcat(rname2, name); INPinsert(&rname2, tab); mdfast2 = tab->defRmod; IFC(newInstance,(ckt,mdfast2,&fast2,rname2)); IFC(bindNode,(ckt,fast2,1,inode1)); IFC(bindNode,(ckt,fast2,2,inode2)); ptemp.rValue = rval; GCA(INPpName,("resistance",&ptemp,ckt,type,fast2)); /* resistor between internal2 and node2 */ rname3 = TMALLOC(char, 10 + strlen(name)); strcpy(rname3, "txlres3"); strcat(rname3, name); INPinsert(&rname3, tab); mdfast3 = tab->defRmod; IFC(newInstance,(ckt,mdfast3,&fast3,rname3)); IFC(bindNode,(ckt,fast3,1,inode2)); IFC(bindNode,(ckt,fast3,2,node2)); ptemp.rValue = rval; GCA(INPpName,("resistance",&ptemp,ckt,type,fast3)); /* capacitor on node1 */ type = INPtypelook("Capacitor"); if(!tab->defCmod) { IFnewUid(ckt, &uid, NULL, "C", UID_MODEL, NULL); IFC(newModel,(ckt,type,&(tab->defCmod),uid)); } mdfast4 = tab->defCmod; cname1 = TMALLOC(char, 10 + strlen(name)); strcpy(cname1, "txlcap1"); strcat(cname1, name); INPinsert(&cname1, tab); IFC(newInstance,(ckt,mdfast4,&fast4,cname1)); IFC(bindNode,(ckt,fast4,1,node1)); IFC(bindNode,(ckt,fast4,2,gnode1)); ptemp.rValue = cval; GCA(INPpName,("capacitance",&ptemp,ckt,type,fast4)); /* capacitor on internal1 */ cname2 = TMALLOC(char, 10 + strlen(name)); strcpy(cname2, "txlcap2"); strcat(cname2, name); INPinsert(&cname2, tab); mdfast4 = tab->defCmod; IFC(newInstance,(ckt,mdfast4,&fast4,cname2)); IFC(bindNode,(ckt,fast4,1,inode1)); IFC(bindNode,(ckt,fast4,2,gnode1)); ptemp.rValue = cval * 2; GCA(INPpName,("capacitance",&ptemp,ckt,type,fast4)); /* capacitor on internal2 */ cname3 = TMALLOC(char, 10 + strlen(name)); strcpy(cname3, "txlcap3"); strcat(cname3, name); INPinsert(&cname3, tab); mdfast5 = tab->defCmod; IFC(newInstance,(ckt,mdfast5,&fast5,cname3)); IFC(bindNode,(ckt,fast5,1,inode2)); IFC(bindNode,(ckt,fast5,2,gnode1)); ptemp.rValue = cval * 2; GCA(INPpName,("capacitance",&ptemp,ckt,type,fast5)); /* capacitor on node2 */ cname4 = TMALLOC(char, 10 + strlen(name)); strcpy(cname4, "txlcap4"); strcat(cname4, name); INPinsert(&cname4, tab); mdfast6 = tab->defCmod; IFC(newInstance,(ckt,mdfast6,&fast6,cname4)); IFC(bindNode,(ckt,fast6,1,node2)); IFC(bindNode,(ckt,fast6,2,gnode1)); ptemp.rValue = cval; GCA(INPpName,("capacitance",&ptemp,ckt,type,fast6)); return; } /* use regular txl model */ mdfast = thismodel->INPmodfast; type = thismodel->INPmodType; } else { type = mytype; if(!tab->defYmod) { /* create default Y model */ IFnewUid(ckt, &uid, NULL, "Y", UID_MODEL, NULL); IFC(newModel, (ckt,type,&(tab->defYmod),uid)); } mdfast = tab->defYmod; } IFC(newInstance,(ckt,mdfast,&fast,name)); } else { LITERR("model name is not found"); return; } if (error1 == 0 && lenvalgiven) { ptemp.rValue = lenval; GCA(INPpName,("length",&ptemp,ckt,type,fast)); } IFC(bindNode,(ckt,fast,1,node1)); IFC(bindNode,(ckt,fast,2,node2)); txl = /*fixme*/ fast; return; } ngspice-26/src/spicelib/parser/inpcfix.c0000644000265600020320000000064212264261473017714 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include #include "ngspice/fteext.h" #include "ngspice/inpdefs.h" #include "inpxx.h" void INPcaseFix(register char *string) { while (*string) { if (isupper(*string)) { *string = (char) tolower(*string); } string++; } } ngspice-26/src/spicelib/parser/inp2v.c0000644000265600020320000000411412264261473017310 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2V(CKTcircuit *ckt, INPtables * tab, card * current) { /* Vname [ [DC] ] [AC [ [ ] ] ] * [] */ static int type = -1; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ if (type < 0) { if ((type = INPtypelook("Vsource")) < 0) { LITERR("Device type Vsource not supported by this binary\n"); return; } } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defVmod) { /* create default V model */ IFnewUid(ckt, &uid, NULL, "V", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defVmod), uid)); } IFC(newInstance, (ckt, tab->defVmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("dc", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inp2o.c0000644000265600020320000000575012264261473017310 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2O(CKTcircuit *ckt, INPtables * tab, card * current) { /* Oname [IC=,,,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ type = INPtypelook("LTRA"); if (type < 0) { LITERR("Device type LossyXmissionLine not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetNetTok(&line, &nname4, 1); INPtermInsert(ckt, &nname4, tab, &node4); INPgetTok(&line, &model, 1); if (INPlookMod(model)) { /* do nothing for now */ /* no action required */ } else { /* nname4 = model; INPtermInsert(ckt,&nname4,tab,&node4); INPgetTok(&line,&model,1); */ } INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (type != thismodel->INPmodType) { LITERR("incorrect model type"); return; } mdfast = (thismodel->INPmodfast); } else { if (!tab->defOmod) { /* create default O model */ IFnewUid(ckt, &uid, NULL, "O", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defOmod), uid)); } mdfast = tab->defOmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); } ngspice-26/src/spicelib/parser/inppas1.c0000644000265600020320000000226712264261473017634 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "inppas1.h" /* * The first pass of the circuit parser just looks for '.model' lines */ void INPpas1(CKTcircuit *ckt, card * deck, INPtables * tab) { card *current; char *temp, *thisline; for (current = deck; current != NULL; current = current->nextcard) { /* SPICE-2 keys off of the first character of the line */ thisline = current->line; while (*thisline && ((*thisline == ' ') || (*thisline == '\t'))) thisline++; if (*thisline == '.') { if (strncmp(thisline, ".model", 6) == 0) { /* First check to see if model is multi-line. If so, read in all lines & stick them into tab. */ #ifdef TRACE /* SDB debug statement */ printf("In INPpas1, handling line = %s \n", thisline); #endif /* Now invoke INPdomodel to stick model into model table. */ temp = INPdomodel(ckt, current, tab); current->error = INPerrCat(current->error, temp); } } /* for now, we do nothing with the other cards - just * keep them in the list for pass 2 */ } } ngspice-26/src/spicelib/parser/inpkmods.c0000644000265600020320000000107712264261473020103 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "ngspice/ftedefs.h" #include "inpxx.h" extern INPmodel *modtab; void INPkillMods(void) { INPmodel *modtmp; INPmodel *prev = NULL; for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) { if (prev) FREE(prev); prev = modtmp; } if (prev) FREE(prev); modtab = NULL; ft_curckt->ci_modtab = NULL; } ngspice-26/src/spicelib/parser/inpfindv.c0000644000265600020320000000200012264261473020057 0ustar andreasadmin/* INPfindVer(line,version) * find the 'version' parameter on the given line and return its * return 'default' as version if not found * */ #include "ngspice/ngspice.h" #include #include #include "ngspice/inpdefs.h" #include "inpxx.h" char *INPfindVer(char *line, char *version) { char *where; where = strstr(line, "version"); if (where != NULL) { /* found a version keyword on the line */ where += 7; /* skip the version keyword */ while ((*where == ' ') || (*where == '\t') || (*where == '=') || (*where == ',') || (*where == '(') || (*where == ')') || (*where == '+')) { /* legal white space - ignore */ where++; } /* now the magic string */ sscanf(where, "%s", version); /* We get the version number */ return (NULL); } else { /* no level on the line => default */ sprintf( version, "default" ); printf("Warning -- Version not specified on line \"%s\"\nSetting version to 'default'.\n", line); return (NULL); } } ngspice-26/src/spicelib/parser/inpmkmod.c0000644000265600020320000000314012264261473020066 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "ngspice/iferrmsg.h" #include "inpxx.h" /* global input model table. */ INPmodel *modtab = NULL; /*-------------------------------------------------------------- * This fcn takes the model name and looks to see if it is already * in the model table. If it is, then just return. Otherwise, * stick the model into the model table. * Note that the model table INPmodel *--------------------------------------------------------------*/ int INPmakeMod(char *token, int type, card * line) { register INPmodel **i; /* First cycle through model table and see if model name already exists in there. If it does, just return. */ for (i = &modtab; *i != NULL; i = &((*i)->INPnextModel)) { if (strcmp((*i)->INPmodName, token) == 0) { return (OK); } } /* Model name was not already in model table. Therefore stick it in the model table. Then return. */ #ifdef TRACE /* debug statement */ printf("In INPmakeMod, about to insert new model name = %s . . .\n", token); #endif *i = TMALLOC(INPmodel, 1); if (*i == NULL) return (E_NOMEM); (*i)->INPmodName = token; /* model name */ (*i)->INPmodType = type; /* model type */ (*i)->INPnextModel = NULL; /* pointer to next model (end of list) */ (*i)->INPmodLine = line; /* model line */ (*i)->INPmodfast = NULL; return (OK); } ngspice-26/src/spicelib/parser/inp2k.c0000644000265600020320000000346612264261473017306 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2K(CKTcircuit *ckt, INPtables * tab, card * current) { /* Kname Lname Lname */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* ptr to a value structure for function return values */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model */ line = current->line; type = INPtypelook("mutual"); if (type < 0) { LITERR("Device type mutual not supported by this binary\n"); return; } INPgetTok(&line, &name, 1); INPinsert(&name, tab); if (!tab->defKmod) { /* create deafult K model */ IFnewUid(ckt, &uid, NULL, "K", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defKmod), uid)); } IFC(newInstance, (ckt, tab->defKmod, &fast, name)); parm = INPgetValue(ckt, &line, IF_INSTANCE, tab); GCA(INPpName, ("inductor1", parm, ckt, type, fast)); parm = INPgetValue(ckt, &line, IF_INSTANCE, tab); GCA(INPpName, ("inductor2", parm, ckt, type, fast)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("coefficient", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/ChangeLog0000644000265600020320000001051512264261473017662 0ustar andreasadmin2003.4.10 Stuart Brorson * Cloned INPgetNetTok from INPgetTok in inpgtok.c * Modified inpg2*.c to use INPgetNetTok for all netnames. * Added explanatory comments to many files. 2000-10-12 Arno W. Peters * inpeval.c: Bugfix for subcircuits contributed by Michael Widlok. 2000-09-09 Arno W. Peters * inp2dot.c: Removed unused static functions dot_ic and dot_nodeset. * inppas2.c: Added back parsing for dotlines. 2000-09-02 Paolo Nenzi * Patched with code sent by Alan Gillespie. See more on top level ChangeLog. 2000-07-07 Arno W. Peters * circuit/inp2b.c, circuit/inp2c.c, circuit/inp2d.c, circuit/inp2dot.c, circuit/inp2e.c, circuit/inp2f.c, circuit/inp2g.c, circuit/inp2h.c, circuit/inp2i.c, circuit/inp2j.c, circuit/inp2k.c, circuit/inp2l.c, circuit/inp2m.c, circuit/inp2o.c, circuit/inp2q.c, circuit/inp2r.c, circuit/inp2s.c, circuit/inp2t.c, circuit/inp2u.c, circuit/inp2v.c, circuit/inp2w.c, circuit/inp2z.c: Added ; after macros. 2000-05-22 Paolo Nenzi * inp2dot.c: Applied Widlok patch. * inpdoopt.c: Applied Widolok patch:commented the entire function, seems obsolete. * inpptree.c, ptfuncs.c: Applied Widlok patch. Now there is a new step function called u2. 2000-04-04 Paolo Nenzi * inpfindl.c: Modified the file for BSIM4 and future extensions to BSIM5 and BSIM6. I have merged the inpfindl.c coming with the BSIM4 distribution. * inp2r.c: Added acval=val to initialize the acval parameter to a significative value. Hope does not brak anything. * inp2m.c: Added BSIM4 support. * inpdomod.c: Added support for BSIM4 device model. 2000-03-28 Paolo Nenzi * ptfuncs.c: I have applied a couple of patches by GLAO Dezay. He noted that PTln, PTlog and PTsqrt returned non consistent values if the argument was out of domain. If arg <0 they returned f(-arg). The patch is masked by #ifdef EXPERIMENTAL_CODE. You have to remove these lines or #define it to compile Dezai's patched code. 2000-03-11 Paolo Nenzi * inp2dot.c: Applied Glao Dezai patch, adding which = -1 in the .sens code. 2000-01-17 Paolo Nenzi * inp2m.c, inpdomod.c: Inserted code to dupport BSIM3V1 model as level 49. 2000-01-16 Paolo Nenzi * inp2r.c: Modified resistor code. Added instance parameter ac , from Serban Popescu contributed sources. 2000-01-15 Paolo Nenzi * inp2m.c, inpdomod.c: Inserted code to support BSIM3V2 model as level 50. 1999-12-20 Paolo Nenzi * inpgtok.c, inpptree.c: Bug Fix Bug: Scale factors (eg. m, k, meg, etc.) for constants in arbitrary source (b devices) are not recognized. Fix: Changes to inpgtok.c and inpptree.c, as supplied by Berkeley. NOTE: These changes were orignally supplied to me as a patch to 3e2 by Beorn Johnson who was maintaining Spice a while back. They were supposed to have been incorporated in Spice 3f2 at that time, but are missing from the 3f5 version that I recently got from Berkeley. I don't know if they were removed in ignorance or because of a conflict with some other requirement, but they appear to work in 3f5. ALSO, the fix for 3e2 had many more changes, all of which remain in 3f5, so don't try these alone on 3e2. 1999-09-07 Arno * inpsymt.c: removed unused function prototype for local_remove(). * sperror.c: removed unused variable `notempty' 1999-09-05 Emmanuel Rouat * inpptree.c (PTdifferentiate): removed superfluous argument to 2 occurences of function mkf * *.c: put all function prototypes in inp.h 1999-08-28 Emmanuel Rouat * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-24 Paolo Nenzi * inpdomod.c: added level check for ps model, jfet level 2 * inp2j.c: added code for ps model, jfet level 2 1999-08-08 Emmanuel Rouat * inp2dot.c (INP2dot):changed HAS_SENSE2 in WANT_SENSE2 1999-08-03 Emmanuel Rouat * ptfuncs.c: changed HAS_ATRIGH to HAVE_ACOSH,HAVE_ASINH and HAVE_ATANH provided in config.h ngspice-26/src/spicelib/parser/inperror.c0000644000265600020320000000277512264261473020125 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * provide the error message appropriate for the given error code */ #include "ngspice/ngspice.h" #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/sperror.h" #include "inpxx.h" char *INPerror(int type) { char *val; char *ebuf; /*CDHW Lots of things set errMsg but it is never used so let's hack it in CDHW*/ if ( errMsg ) { val = errMsg; errMsg = NULL; } else /*CDHW end of hack CDHW*/ val = copy(SPerror(type)); if (!val) return NULL; #ifdef HAVE_ASPRINTF if (errRtn) asprintf(&ebuf, "%s detected in routine \"%s\"\n", val, errRtn); else asprintf(&ebuf, "%s\n", val); #else /* ~ HAVE_ASPRINTF */ if (errRtn) { ebuf = TMALLOC(char, strlen(val) + strlen(errRtn) + 25); sprintf(ebuf, "%s detected in routine \"%s\"\n", val, errRtn); } else { ebuf = TMALLOC(char, strlen(val) + 2); sprintf(ebuf, "%s\n", val); } #endif /* HAVE_ASPRINTF */ tfree(val); return ebuf; } ngspice-26/src/spicelib/parser/inpptree-parser.h0000644000265600020320000000514612264261705021403 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_NUM = 258, TOK_STR = 259, TOK_pnode = 260, TOK_LE = 261, TOK_LT = 262, TOK_GE = 263, TOK_GT = 264, TOK_EQ = 265, TOK_NE = 266, TOK_OR = 267, TOK_AND = 268, NEG = 269 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2068 of yacc.c */ #line 53 "./inpptree-parser.y" double num; const char *str; struct INPparseNode *pnode; /* Line 2068 of yacc.c */ #line 72 "inpptree-parser.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif ngspice-26/src/spicelib/parser/inp2m.c0000644000265600020320000003164412264261473017307 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles Modified: 2001 Paolo Nenzi (Cider Integration) **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2M (CKTcircuit *ckt, INPtables * tab, card * current) { /* Mname [L=] * [W=] [AD=] [AS=] [PD=] * [PS=] [NRD=] [NRS=] [OFF] * [IC=,,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ char *nname5; /* the fifth node's name */ char *nname6; /* the sixt node's name */ char *nname7; /* the seventh node's name */ char *save; /* saj - used to save the posn of the start of the parameters if the model is a mosfet*/ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ CKTnode *node5; /* the fifth node's node pointer */ CKTnode *node6; /* the sixth node's node pointer */ CKTnode *node7; /* the seventh node's node pointer */ int error; /* error code temporary */ int nodeflag; /* flag indicating 4 or 5 (or 6 or 7) nodes */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ char* err_msg; #ifdef TRACE printf("INP2M: Parsing '%s'\n",current->line); #endif nodeflag = 0; /* initially specify a 4 terminal device */ line = current->line; INPgetTok (&line, &name, 1); INPinsert (&name, tab); INPgetNetTok (&line, &nname1, 1); INPtermInsert (ckt, &nname1, tab, &node1); INPgetNetTok (&line, &nname2, 1); INPtermInsert (ckt, &nname2, tab, &node2); INPgetNetTok (&line, &nname3, 1); INPtermInsert (ckt, &nname3, tab, &node3); INPgetNetTok (&line, &nname4, 1); INPtermInsert (ckt, &nname4, tab, &node4); node5 = NULL; node6 = NULL; node7 = NULL; /* See if 5th token after device specification is a model name */ INPgetNetTok (&line, &nname5, 1); /* get 5th token */ save = line; /* saj - save the posn for later if the default mosfet model is used */ thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 4 node device\n"); #endif err_msg = INPgetMod (ckt, nname5, &thismodel, tab); tfree(err_msg); /* check if using model binning -- pass in line since need 'l' and 'w' */ if ( thismodel == NULL ) { INPgetModBin( ckt, nname5, &thismodel, tab, line ); } if (thismodel == NULL) { /* 5th token is not a model in the table */ nodeflag = 1; /* now specify a 5 node device */ INPgetNetTok (&line, &nname6, 1); /* get next token */ thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 5 node device\n"); #endif err_msg = INPgetMod (ckt, nname6, &thismodel, tab); tfree(err_msg); if (thismodel == NULL) { /* 6th token is not a model in the table */ nodeflag = 2; /* now specify a 6 node device */ INPgetNetTok (&line, &nname7, 1); /* get next token */ thismodel = NULL; #ifdef TRACE printf("INP2M: checking for 6 node device\n"); #endif err_msg = INPgetMod (ckt, nname7, &thismodel, tab); tfree(err_msg); if (thismodel == NULL) { /* 7th token is not a model in the table */ nodeflag = 3; /* now specify a 7 node device */ INPgetTok (&line, &model, 1); /* get model name */ #ifdef TRACE printf("INP2M: checking for 7 node device\n"); #endif err_msg = INPgetMod (ckt, model, &thismodel, tab); /* get pointer to the model */ tfree(err_msg); if (thismodel != NULL) { if ((thismodel->INPmodType != INPtypelook ("B4SOI")) && (thismodel->INPmodType != INPtypelook ("B3SOIPD")) && (thismodel->INPmodType != INPtypelook ("B3SOIFD")) && (thismodel->INPmodType != INPtypelook ("B3SOIDD")) ) { /* if model is not variable node B3SOIPD/FD/DD model, error! */ LITERR ("only level 55-58: B3SOI(PD|FD|DD) and B4SOI can have 7 nodes"); return; } else { /* if looking at B3SOIPD/FD/DD or B4SOI model, allocate the 7th node */ INPtermInsert (ckt, &nname5, tab, &node5); INPtermInsert (ckt, &nname6, tab, &node6); INPtermInsert (ckt, &nname7, tab, &node7); } } /* saj - unbreak the default model creation*/ else { #ifdef TRACE printf("INP2M: couldn't workout number of nodes, assuming 4\n"); #endif nodeflag = 0; /* now reset to a 4 node device */ model = nname5;/* mosfet*/ line = save; /* reset the posn to what it sould be */ } /*saj*/ } else { /* 7th token is a model - only have 6 terminal device */ if ((thismodel->INPmodType != INPtypelook ("B4SOI")) && (thismodel->INPmodType != INPtypelook ("B3SOIPD")) && (thismodel->INPmodType != INPtypelook ("B3SOIFD")) && (thismodel->INPmodType != INPtypelook ("B3SOIDD")) && (thismodel->INPmodType != INPtypelook ("HiSIMHV")) && (thismodel->INPmodType != INPtypelook ("SOI3")) ) { /* if model is not variable node B3SOIPD/FD/DD or STAG model, error! */ LITERR ("only level 55-58,61,62: B3SOI(PD|FD|DD), B4SOI, STAG (SOI3) and HiSIMHV can have 6 nodes"); return; } else { /* if looking at B3SOIPD/FD/DD, B4SOI, STAG (SOI3) or HiSIMHV model, allocate the 6th node */ INPtermInsert (ckt, &nname5, tab, &node5); INPtermInsert (ckt, &nname6, tab, &node6); model = nname7; } } } else { /* 6th token is a model - only have 5 terminal device */ if ((thismodel->INPmodType != INPtypelook ("B4SOI")) && (thismodel->INPmodType != INPtypelook ("B3SOIPD")) && (thismodel->INPmodType != INPtypelook ("B3SOIFD")) && (thismodel->INPmodType != INPtypelook ("B3SOIDD")) && (thismodel->INPmodType != INPtypelook ("HiSIMHV")) && (thismodel->INPmodType != INPtypelook ("SOI3")) ) { /* if model is not variable node B3SOIPD/FD/DD model, error! */ LITERR ("only level 55-58,61,62: B3SOI(PD|FD|DD), B4SOI, STAG (SOI3) and HiSIMHV can have 5 nodes"); return; } else { /* if looking at B3SOIPD/FD/DD, B4SOI, STAG (SOI3) or HiSIMHV model, allocate the 5th node */ INPtermInsert (ckt, &nname5, tab, &node5); model = nname6; /* make model point to the correct token */ } } } else { /* 5th token is a model - only have 4 terminal device */ model = nname5; /* make model point to the correct token */ } INPinsert (&model, tab); thismodel = NULL; #ifdef TRACE printf("INP2M: Looking up model\n"); #endif err_msg = INPgetMod (ckt, model, &thismodel, tab); if ( thismodel == NULL ) { INPgetModBin( ckt, model, &thismodel, tab, save ); if ( thismodel == NULL ) current->error = err_msg; else tfree(err_msg); } else tfree(err_msg); if (thismodel != NULL) { if (thismodel->INPmodType != INPtypelook ("Mos1") && thismodel->INPmodType != INPtypelook ("Mos2") && thismodel->INPmodType != INPtypelook ("Mos3") && thismodel->INPmodType != INPtypelook ("Mos5") && thismodel->INPmodType != INPtypelook ("Mos6") && thismodel->INPmodType != INPtypelook ("Mos8") && thismodel->INPmodType != INPtypelook ("Mos9") && thismodel->INPmodType != INPtypelook ("BSIM1") && thismodel->INPmodType != INPtypelook ("BSIM2") && thismodel->INPmodType != INPtypelook ("BSIM3") && thismodel->INPmodType != INPtypelook ("BSIM3v32") && thismodel->INPmodType != INPtypelook ("B4SOI") && thismodel->INPmodType != INPtypelook ("B3SOIPD") && thismodel->INPmodType != INPtypelook ("B3SOIFD") && thismodel->INPmodType != INPtypelook ("B3SOIDD") && thismodel->INPmodType != INPtypelook ("BSIM4") && thismodel->INPmodType != INPtypelook ("BSIM4v4") && thismodel->INPmodType != INPtypelook ("BSIM4v5") && thismodel->INPmodType != INPtypelook ("BSIM4v6") && thismodel->INPmodType != INPtypelook ("BSIM3v0") && thismodel->INPmodType != INPtypelook ("BSIM3v1") && thismodel->INPmodType != INPtypelook ("SOI3") #ifdef CIDER && thismodel->INPmodType != INPtypelook ("NUMOS") #endif #ifdef ADMS && thismodel->INPmodType != INPtypelook ("ekv") && thismodel->INPmodType != INPtypelook ("psp102") #endif && thismodel->INPmodType != INPtypelook ("HiSIM2") && thismodel->INPmodType != INPtypelook ("HiSIMHV") ) { LITERR ("incorrect model type"); return; } type = thismodel->INPmodType; mdfast = (thismodel->INPmodfast); } else { type = INPtypelook ("Mos1"); if (type < 0) { LITERR ("Device type MOS1 not supported by this binary\n"); return; } if (!tab->defMmod) { /* create default M model */ IFnewUid (ckt, &uid, NULL, "M", UID_MODEL, NULL); IFC (newModel, (ckt, type, &(tab->defMmod), uid)); } mdfast = tab->defMmod; } IFC (newInstance, (ckt, mdfast, &fast, name)); IFC (bindNode, (ckt, fast, 1, node1)); IFC (bindNode, (ckt, fast, 2, node2)); IFC (bindNode, (ckt, fast, 3, node3)); IFC (bindNode, (ckt, fast, 4, node4)); /* use type - not thismodel->INPmodType as it might not exist! */ if ((type == INPtypelook ("B4SOI")) || (type == INPtypelook ("B3SOIPD")) || (type == INPtypelook ("B3SOIFD")) || (type == INPtypelook ("B3SOIDD")) || (type == INPtypelook ("HiSIMHV")) || (type == INPtypelook ("SOI3"))) { switch (nodeflag) { case 0: fast->GENnode5 = -1; fast->GENnode6 = -1; fast->GENnode7 = -1; break; case 1: IFC (bindNode, (ckt, fast, 5, node5)); fast->GENnode6 = -1; fast->GENnode7 = -1; break; case 2: IFC (bindNode, (ckt, fast, 5, node5)); IFC (bindNode, (ckt, fast, 6, node6)); fast->GENnode7 = -1; break; case 3: IFC (bindNode, (ckt, fast, 5, node5)); IFC (bindNode, (ckt, fast, 6, node6)); IFC (bindNode, (ckt, fast, 7, node7)); break; default: break; } } PARSECALL ((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { LITERR (" error: no unlabeled parameter permitted on mosfet\n"); } } ngspice-26/src/spicelib/parser/ifeval.c0000644000265600020320000001145112264261473017522 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpptree.h" #include "inpxx.h" #include "ngspice/cktdefs.h" /* Uncomment to allow tracing */ /*#define TRACE*/ extern double PTfudge_factor; static int PTeval(INPparseNode * tree, double gmin, double *res, double *vals); int IFeval(IFparseTree * tree, double gmin, double *result, double *vals, double *derivs) { int i, err; INPparseTree *myTree = (INPparseTree *) tree; #ifdef TRACE INPptPrint("calling PTeval, tree = ", tree); printf("values:"); for (i = 0; i < myTree->p.numVars; i++) printf("\tvar%d = %lg\n", i, vals[i]); #endif if ((err = PTeval(myTree->tree, gmin, result, vals)) != OK) { if (ft_ngdebug) { INPptPrint("calling PTeval, tree = ", tree); printf("values:"); for (i = 0; i < myTree->p.numVars; i++) printf("\tvar%d = %lg\n", i, vals[i]); } if (ft_stricterror) controlled_exit(EXIT_BAD); else return (err); } for (i = 0; i < myTree->p.numVars; i++) if ((err = PTeval(myTree->derivs[i], gmin, &derivs[i], vals)) != OK) { if (ft_ngdebug) { INPptPrint("calling PTeval, tree = ", tree); printf("results: function = %lg\n", *result); for (i = 0; i < myTree->p.numVars; i++) printf("\td / d var%d = %lg\n", i, derivs[i]); } if (ft_stricterror) controlled_exit(EXIT_BAD); else return (err); } #ifdef TRACE printf("results: function = %lg\n", *result); for (i = 0; i < myTree->p.numVars; i++) printf("\td / d var%d = %lg\n", i, derivs[i]); #endif return (OK); } static int PTeval(INPparseNode * tree, double gmin, double *res, double *vals) { double r1, r2; int err; PTfudge_factor = gmin * 1.0e-20; /* defaults to 1e-32, should be small enough */ switch (tree->type) { case PT_CONSTANT: *res = tree->constant; break; case PT_VAR: *res = vals[tree->valueIndex]; break; case PT_FUNCTION: switch(tree->funcnum) { case PTF_POW: case PTF_PWR: case PTF_MIN: case PTF_MAX: err = PTeval(tree->left->left, gmin, &r1, vals); if (err != OK) return (err); err = PTeval(tree->left->right, gmin, &r2, vals); if (err != OK) return (err); *res = PTbinary(tree -> function) (r1, r2); if (*res == HUGE) { fprintf(stderr, "Error: %g, %g out of range for %s\n", r1, r2, tree->funcname); return (E_PARMVAL); } break; /* fcns with single argument */ default: err = PTeval(tree->left, gmin, &r1, vals); if (err != OK) return (err); if(tree->data == NULL) *res = PTunary(tree -> function) (r1); else *res = PTunary_with_private(tree -> function) (r1, tree->data); if (*res == HUGE) { fprintf(stderr, "Error: %g out of range for %s\n", r1, tree->funcname); return (E_PARMVAL); } break; } break; case PT_TERN: { INPparseNode *arg1 = tree->left; INPparseNode *arg2 = tree->right->left; INPparseNode *arg3 = tree->right->right; err = PTeval(arg1, gmin, &r1, vals); if (err != OK) return (err); /*FIXME > 0.0, >= 0.5, != 0.0 or what ? */ err = PTeval((r1 != 0.0) ? arg2 : arg3, gmin, &r2, vals); if (err != OK) return (err); *res = r2; break; } case PT_PLUS: case PT_MINUS: case PT_TIMES: case PT_DIVIDE: case PT_POWER: err = PTeval(tree->left, gmin, &r1, vals); if (err != OK) return (err); err = PTeval(tree->right, gmin, &r2, vals); if (err != OK) return (err); *res = PTbinary(tree -> function) (r1, r2); if (*res == HUGE) { fprintf(stderr, "Error: %g, %g out of range for %s\n", r1, r2, tree->funcname); return (E_PARMVAL); } break; case PT_TIME: *res = ((CKTcircuit*) tree->data) -> CKTtime; break; case PT_TEMPERATURE: *res = ((CKTcircuit*) tree->data) -> CKTtemp - CONSTCtoK; break; case PT_FREQUENCY: *res = (((CKTcircuit*) tree->data) -> CKTomega)/2./M_PI; break; default: fprintf(stderr, "Internal Error: bad node type %d\n", tree->type); return (E_PANIC); } return (OK); } ngspice-26/src/spicelib/parser/inpxx.h0000644000265600020320000000543512264261473017434 0ustar andreasadmin/************* * Header file for inpxx.c * 1999 E. Rouat ************/ #ifndef ngspice_INPXX_H #define ngspice_INPXX_H /* inp2xx.c */ void INP2B(CKTcircuit *ckt, INPtables *tab, card *current); void INP2C(CKTcircuit *ckt, INPtables *tab, card *current); void INP2D(CKTcircuit *ckt, INPtables *tab, card *current); void INP2E(CKTcircuit *ckt, INPtables *tab, card *current); void INP2F(CKTcircuit *ckt, INPtables *tab, card *current); void INP2G(CKTcircuit *ckt, INPtables *tab, card *current); void INP2H(CKTcircuit *ckt, INPtables *tab, card *current); void INP2I(CKTcircuit *ckt, INPtables *tab, card *current); void INP2J(CKTcircuit *ckt, INPtables *tab, card *current); void INP2K(CKTcircuit *ckt, INPtables *tab, card *current); void INP2L(CKTcircuit *ckt, INPtables *tab, card *current); void INP2M(CKTcircuit *ckt, INPtables *tab, card *current); void INP2N(CKTcircuit *ckt, INPtables *tab, card *current); void INP2O(CKTcircuit *ckt, INPtables *tab, card *current); void INP2P(CKTcircuit *ckt, INPtables *tab, card *current); void INP2Q(CKTcircuit *ckt, INPtables *tab, card *current, CKTnode *gnode); void INP2R(CKTcircuit *ckt, INPtables *tab, card *current); void INP2S(CKTcircuit *ckt, INPtables *tab, card *current); void INP2T(CKTcircuit *ckt, INPtables *tab, card *current); void INP2U(CKTcircuit *ckt, INPtables *tab, card *current); void INP2V(CKTcircuit *ckt, INPtables *tab, card *current); void INP2W(CKTcircuit *ckt, INPtables *tab, card *current); void INP2Y(CKTcircuit *ckt, INPtables *tab, card *current); void INP2Z(CKTcircuit *ckt, INPtables *tab, card *current); /* ptfuncs.c */ double PTabs(double arg); double PTsgn(double arg); double PTplus(double arg1, double arg2); double PTminus(double arg1, double arg2); double PTtimes(double arg1, double arg2); double PTdivide(double arg1, double arg2); double PTpower(double arg1, double arg2); double PTpwr(double arg1, double arg2); double PTacos(double arg); double PTacosh(double arg); double PTasin(double arg); double PTasinh(double arg); double PTatan(double arg); double PTatanh(double arg); double PTustep(double arg); double PTuramp(double arg); double PTcos(double arg); double PTcosh(double arg); double PTexp(double arg); double PTln(double arg); double PTlog(double arg); double PTsin(double arg); double PTsinh(double arg); double PTsqrt(double arg); double PTtan(double arg); double PTtanh(double arg); double PTuminus(double arg); double PTustep2(double arg); double PTpwl(double arg, void *data); double PTpwl_derivative(double arg, void *data); double PTmin(double arg1, double arg2); double PTmax(double arg1, double arg2); double PTeq0(double arg); double PTne0(double arg); double PTgt0(double arg); double PTlt0(double arg); double PTge0(double arg); double PTle0(double arg); double PTceil(double arg); double PTfloor(double arg); #endif ngspice-26/src/spicelib/parser/inplkmod.c0000644000265600020320000000125212264261473020067 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/inpdefs.h" #include extern INPmodel *modtab; /*----------------------------------------------------------------- * This fcn accepts a pointer to the model name, and returns * the INPmodel * if it exist in the model table. *----------------------------------------------------------------*/ INPmodel * INPlookMod(const char *name) { INPmodel *i; for (i = modtab; i; i = i->INPnextModel) if (strcmp(i->INPmodName, name) == 0) return i; return NULL; } ngspice-26/src/spicelib/parser/inppas3.c0000644000265600020320000001147412264261473017636 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: AlansFixes **********/ #include "ngspice/ngspice.h" #include "ngspice/iferrmsg.h" #include "ngspice/ifsim.h" #include "ngspice/inpmacs.h" #include "ngspice/cktdefs.h" #include "inppas3.h" extern IFsimulator *ft_sim; /* pass 3 - Read all nodeset and IC lines. All circuit nodes will have * been created by now, (except for internal device nodes), so any * nodeset or IC nodes which have to be created are flagged with a * warning. */ void INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, TSKtask *task, IFparm *nodeParms, int numNodeParms) { card *current; int error; /* used by the macros defined above */ char *line; /* the part of the current line left to parse */ char *name; /* the node's name */ char *token=NULL; /* a token from the line */ IFparm *prm; /* pointer to parameter to search through array */ IFvalue ptemp; /* a value structure to package resistance into */ int which; /* which analysis we are performing */ CKTnode *node1; /* the first node's node pointer */ NG_IGNORE(task); #ifdef TRACE /* SDB debug statement */ printf("In INPpas3 . . . \n"); #endif for(current = data; current != NULL; current = current->nextcard) { line = current->line; FREE(token); INPgetTok(&line,&token,1); if (strcmp(token,".nodeset")==0) { which = -1; for(prm = nodeParms; prm < nodeParms + numNodeParms; prm++) { if(strcmp(prm->keyword,"nodeset")==0) { which = prm->id; break; } } if(which == -1) { LITERR("nodeset unknown to simulator. \n"); goto quit; } for(;;) { /* loop until we run out of data */ INPgetTok(&line,&name,1); if( *name == 0) break; /* end of line */ /* If we have 'all = value' , then set all voltage nodes to 'value', except for ground node at node->number 0 */ if ( cieq(name, "all")) { ptemp.rValue = INPevaluate(&line,&error,1); for (node1 = ckt->CKTnodes; node1 != NULL; node1 = node1->next) { if ((node1->type == SP_VOLTAGE) && (node1->number > 0)) IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL)); } break; } /* check to see if in the form V(xxx) and grab the xxx */ if( (*name == 'V' || *name == 'v') && !name[1] ) { /* looks like V - must be V(xx) - get xx now*/ INPgetTok(&line,&name,1); if (INPtermInsert(ckt,&name,tab,&node1)!=E_EXISTS) fprintf(stderr, "Warning : Nodeset on non-existant node - %s\n", name); ptemp.rValue = INPevaluate(&line,&error,1); IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL)); continue; } LITERR(" Error: .nodeset syntax error.\n"); break; } } else if ((strcmp(token,".ic") == 0)) { /* .ic */ which = -1; for(prm = nodeParms; prm < nodeParms + numNodeParms; prm++) { if(strcmp(prm->keyword,"ic")==0) { which = prm->id; break; } } if(which==-1) { LITERR("ic unknown to simulator. \n"); goto quit; } for(;;) { /* loop until we run out of data */ INPgetTok(&line,&name,1); /* check to see if in the form V(xxx) and grab the xxx */ if( *name == 0) { FREE(name); break; /* end of line */ } if( (*name == 'V' || *name == 'v') && !name[1] ) { /* looks like V - must be V(xx) - get xx now*/ INPgetTok(&line,&name,1); if (INPtermInsert(ckt,&name,tab,&node1)!=E_EXISTS) fprintf(stderr, "Warning : IC on non-existant node - %s\n", name); ptemp.rValue = INPevaluate(&line,&error,1); IFC(setNodeParm, (ckt, node1, which, &ptemp, NULL)); continue; } LITERR(" Error: .ic syntax error.\n"); break; } } } quit: FREE(token); return; } ngspice-26/src/spicelib/parser/Makefile.am0000644000265600020320000000250312264261473020142 0ustar andreasadmin## Process this file with automake to produce Makefile.in EXTRA_DIST = inpptree-parser.y ## For Windows with Visual Studio EXTRA_DIST += inpptree-parser.c inpptree-parser.h noinst_LTLIBRARIES = libinp.la libinp_la_SOURCES = \ ifeval.c \ ifnewuid.c \ inp2b.c \ inp2c.c \ inp2d.c \ inp2dot.c \ inp2e.c \ inp2f.c \ inp2g.c \ inp2h.c \ inp2i.c \ inp2j.c \ inp2k.c \ inp2l.c \ inp2m.c \ inp2n.c \ inp2o.c \ inp2p.c \ inp2q.c \ inp2r.c \ inp2s.c \ inp2t.c \ inp2u.c \ inp2v.c \ inp2w.c \ inp2y.c \ inp2z.c \ inpaname.c \ inpapnam.c \ inpcfix.c \ inpdomod.c \ inpdoopt.c \ inpdpar.c \ inperrc.c \ inperror.c \ inpeval.c \ inpfindl.c \ inpfindv.c \ inpgmod.c \ inpgstr.c \ inpgtitl.c \ inpgtok.c \ inpgval.c \ inpkmods.c \ inplist.c \ inplkmod.c \ inpmkmod.c \ inpmktmp.c \ inppas1.c \ inppas1.h \ inppas2.c \ inppas2.h \ inppas3.c \ inppas3.h \ inppname.c \ inpptree.c \ inpsymt.c \ inptyplk.c \ ptfuncs.c \ sperror.c \ inpxx.h $(srcdir)/inpptree.c : inpptree-parser.c inpptree-parser.c inpptree-parser.h : inpptree-parser.y bison $(srcdir)/inpptree-parser.y AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/spicelib/parser/inpdpar.c0000644000265600020320000000477212264261473017721 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * INPdevParse() * * parse a given input according to the standard rules - look * for the parameters given in the parmlists, In addition, * an optional leading numeric parameter is handled. */ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/iferrmsg.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "inpxx.h" char *INPdevParse(char **line, CKTcircuit *ckt, int dev, GENinstance *fast, double *leading, int *waslead, INPtables * tab) /* the line to parse */ /* the circuit this device is a member of */ /* the device type code to the device being parsed */ /* direct pointer to device being parsed */ /* the optional leading numeric parameter */ /* flag - 1 if leading double given, 0 otherwise */ { int error; /* int to store evaluate error return codes in */ char *parm=NULL; char *errbuf; int i; IFvalue *val; char *rtn=NULL; /* check for leading value */ *waslead = 0; *leading = INPevaluate(line, &error, 1); if (error == 0) { /* found a good leading number */ *waslead = 1; } else *leading = 0.0; while (**line != '\0') { error = INPgetTok(line, &parm, 1); if (!*parm) { FREE(parm); continue; } if (error) { rtn = INPerror(error); goto quit; } for (i = 0; i < *(ft_sim->devices[dev]->numInstanceParms); i++) { if (strcmp(parm, ft_sim->devices[dev]->instanceParms[i].keyword) == 0) { int type; val = INPgetValue(ckt, line, ft_sim->devices[dev]->instanceParms[i].dataType, tab); if (!val) { rtn = INPerror(E_PARMVAL); goto quit; } error = ft_sim->setInstanceParm (ckt, fast, ft_sim->devices[dev]->instanceParms[i].id, val, NULL); if (error) { rtn = INPerror(error); goto quit; } /* delete the union val */ type = ft_sim->devices[dev]->instanceParms[i].dataType; type &= IF_VARTYPES; if (type == IF_REALVEC) tfree(val->v.vec.rVec); else if (type == IF_INTVEC) tfree(val->v.vec.iVec); break; } } if (i == *(ft_sim->devices[dev]->numInstanceParms)) { errbuf = TMALLOC(char, strlen(parm) + 25); (void) sprintf(errbuf, " unknown parameter (%s) \n", parm); rtn = errbuf; goto quit; } FREE(parm); } quit: FREE(parm); return rtn; } ngspice-26/src/spicelib/parser/inpeval.c0000644000265600020320000001413012264261473017707 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include #include "ngspice/inpdefs.h" #include "inpxx.h" double INPevaluate(char **line, int *error, int gobble) /* non-zero to gobble rest of token, zero to leave it alone */ { char *token; char *here; double mantis; int expo1; int expo2; int sign; int expsgn; char *tmpline; /* setup */ tmpline = *line; if (gobble == 1) { /* MW. INPgetUTok should be called with gobble=0 or it make * errors in v(1,2) exp */ *error = INPgetUTok(line, &token, 0); if (*error) return (0.0); } else if (gobble == 2) { *error = INPgetU2Tok(line, &token, 0); if (*error) return (0.0); } else { token = *line; *error = 0; } mantis = 0; expo1 = 0; expo2 = 0; sign = 1; expsgn = 1; /* loop through all of the input token */ here = token; if (*here == '+') here++; /* plus, so do nothing except skip it */ if (*here == '-') { /* minus, so skip it, and change sign */ here++; sign = -1; } if ((*here == 0) || ((!(isdigit(*here))) && (*here != '.'))) { /* number looks like just a sign! */ *error = 1; /* back out the 'gettok' operation */ *line = tmpline; if (gobble) { FREE(token); } else { *line = here; } return (0); } while (isdigit(*here)) { /* digit, so accumulate it. */ mantis = 10 * mantis + *here - '0'; here++; } if (*here == 0) { /* reached the end of token - done. */ if (gobble) { FREE(token); } else { *line = here; } return ((double) mantis * sign); } if (*here == ':') { /* ':' is no longer used for subcircuit node numbering but is part of ternary function a?b:c FIXME : subcircuit models still use ':' for model numbering Will this hurt somewhere? */ if (gobble) { FREE(token); } else { *line = here; } return ((double) mantis * sign); } /* after decimal point! */ if (*here == '.') { /* found a decimal point! */ here++; /* skip to next character */ if (*here == 0) { /* number ends in the decimal point */ if (gobble) { FREE(token); } else { *line = here; } return ((double) mantis * sign); } while (isdigit(*here)) { /* digit, so accumulate it. */ mantis = 10 * mantis + *here - '0'; expo1 = expo1 - 1; if (*here == 0) { /* reached the end of token - done. */ if (gobble) { FREE(token); } else { *line = here; } return (mantis * sign * pow(10., (double) expo1)); } here++; } } /* now look for "E","e",etc to indicate an exponent */ if ((*here == 'E') || (*here == 'e') || (*here == 'D') || (*here == 'd')) { /* have an exponent, so skip the e */ here++; /* now look for exponent sign */ if (*here == '+') here++; /* just skip + */ if (*here == '-') { here++; /* skip over minus sign */ expsgn = -1; /* and make a negative exponent */ /* now look for the digits of the exponent */ } while (isdigit(*here)) { expo2 = 10 * expo2 + *here - '0'; here++; } } /* now we have all of the numeric part of the number, time to * look for the scale factor (alphabetic) */ switch (*here) { case 't': case 'T': expo1 = expo1 + 12; break; case 'g': case 'G': expo1 = expo1 + 9; break; case 'k': case 'K': expo1 = expo1 + 3; break; case 'u': case 'U': expo1 = expo1 - 6; break; case 'n': case 'N': expo1 = expo1 - 9; break; case 'p': case 'P': expo1 = expo1 - 12; break; case 'f': case 'F': expo1 = expo1 - 15; break; case 'm': case 'M': { /* special case for m - may be m or mil or meg */ if (here[1] != 0 && here[2] != 0) { /* at least 2 characters, so check them. */ if ((here[1] == 'E') || (here[1] == 'e')) { if ((here[2] == 'G') || (here[2] == 'g')) { expo1 = expo1 + 6; if (gobble) { FREE(token); } else { *line = here; } return (sign * mantis * pow(10.0, (double) (expo1 + expsgn * expo2))); } } else if ((here[1] == 'I') || (here[1] == 'i')) { if ((here[2] == 'L') || (here[2] == 'l')) { expo1 = expo1 - 6; mantis = mantis * 25.4; if (gobble) { FREE(token); } else { *line = here; } return (sign * mantis * pow(10.0, (double) (expo1 + expsgn * expo2))); } } } /* not either special case, so just m => 1e-3 */ expo1 = expo1 - 3; } break; default: break; } if (gobble) { FREE(token); } else { *line = here; } return (sign * mantis * pow(10.0, (double) (expo1 + expsgn * expo2))); } ngspice-26/src/spicelib/parser/inp2g.c0000644000265600020320000000466212264261473017301 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2G(CKTcircuit *ckt, INPtables * tab, card * current) { /* Gname */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid of default model to be created */ type = INPtypelook("VCCS"); if (type < 0) { LITERR("Device type VCCS not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetNetTok(&line, &nname4, 1); INPtermInsert(ckt, &nname4, tab, &node4); if (!tab->defGmod) { /* create default G model */ IFnewUid(ckt, &uid, NULL, "G", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defGmod), uid)); } IFC(newInstance, (ckt, tab->defGmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("gain", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inpfindl.c0000644000265600020320000000410112264261473020051 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 1999 Paolo Nenzi - Now we can use a two digits level code - **********/ /* INPfindLev(line,level) * find the 'level' parameter on the given line and return its * value (1,2,..,99 for now, 1 default) * */ #include "ngspice/ngspice.h" #include "ngspice/inpdefs.h" #include "inpxx.h" char *INPfindLev(char *line, int *level) { char *where; int error1; /* *where = line; */ where = strstr(line, "level"); if (where != NULL) { /* found a level keyword on the line */ where += 5; /* skip the level keyword */ while ((*where == ' ') || (*where == '\t') || (*where == '=') || (*where == ',') || (*where == '(') || (*where == ')') || (*where == '+')) { /* legal white space - ignore */ where++; } /* now the magic number, allow scientific notation of level, e.g. 4.900e1, offers only limited error checking. */ *level = (int)(INPevaluate(&where, &error1, 0) + 0.5); if (*level < 0) { *level = 1; fprintf(stderr,"Illegal value for level.\n"); fprintf(stderr,"Level must be >0 (Setting level to 1)\n"); return (INPmkTemp (" illegal (negative) argument to level parameter - level=1 assumed")); } if (*level > 99) { /* Limit to change in the future */ *level = 1; fprintf(stderr,"Illegal value for level.\n"); fprintf(stderr,"Level must be < 99 (Setting Level to 1)\n"); return (INPmkTemp (" illegal (too high) argument to level parameter - level=1 assumed")); } return (NULL); } else { /* no level on the line => default */ *level = 1; #ifdef TRACE /* this is annoying for bjt's */ fprintf(stderr,"Warning -- Level not specified on line \"%s\"\nUsing level 1.\n", line); #endif return (NULL); } } ngspice-26/src/spicelib/parser/inpgmod.c0000644000265600020320000004272312264261473017717 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles, 1991 David A. Gates Modified: 2001 Paolo Nenzi (Cider Integration) **********/ #include "ngspice/ngspice.h" #include "ngspice/inpdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cpstd.h" #include "ngspice/fteext.h" #include "inpxx.h" #include #ifdef CIDER /* begin Cider Integration */ #include "ngspice/numcards.h" #include "ngspice/carddefs.h" #include "ngspice/numgen.h" #include "ngspice/suffix.h" extern IFcardInfo *INPcardTab[]; extern int INPnumCards; #define E_MISSING -1 #define E_AMBIGUOUS -2 static int INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMessage ); static int INPfindCard( char *name, IFcardInfo *table[], int numCards ); static int INPfindParm( char *name, IFparm *table, int numParms ); /* end Cider Integration */ #endif /* CIDER */ extern INPmodel *modtab; /* code moved from INPgetMod */ static int create_model( CKTcircuit* ckt, INPmodel* modtmp, INPtables* tab ) { IFvalue* val; char* err = NULL; char* line; char* parm; char* temp; int error = 0; int j; char *endptr; double dval; /* not already defined, so create & give parameters */ error = ft_sim->newModel (ckt, modtmp->INPmodType, &(modtmp->INPmodfast), modtmp->INPmodName); if (error) return error; /* parameter isolation, identification, binding */ #ifdef CIDER /* begin cider integration */ /* Handle Numerical Models Differently */ if ( modtmp->INPmodType == INPtypelook("NUMD") || modtmp->INPmodType == INPtypelook("NBJT") || modtmp->INPmodType == INPtypelook("NUMD2") || modtmp->INPmodType == INPtypelook("NBJT2") || modtmp->INPmodType == INPtypelook("NUMOS") ) { error = INPparseNumMod( ckt, modtmp, tab, &err ); if (error) return error; } else { /* It's an analytical model */ #endif /* CIDER */ line = modtmp->INPmodLine->line; #ifdef TRACE /* SDB debug statement */ printf("In INPgetMod, inserting new model into table. line = %s . . . \n", line); #endif INPgetTok(&line, &parm, 1); /* throw away '.model' */ tfree(parm); INPgetTok(&line, &parm, 1); /* throw away 'modname' */ tfree(parm); while (*line != 0) { INPgetTok(&line, &parm, 1); if (!*parm) continue; for (j = 0; j < *(ft_sim->devices[modtmp->INPmodType]->numModelParms); j++) { if (strcmp(parm, "txl") == 0) { if (strcmp("cpl", ft_sim->devices[modtmp->INPmodType]->modelParms[j].keyword) == 0) { strcpy(parm, "cpl"); } } if (strcmp(parm, ft_sim->devices[modtmp->INPmodType]->modelParms[j].keyword) == 0) { val = INPgetValue(ckt, &line, ft_sim->devices[modtmp->INPmodType]->modelParms[j].dataType, tab); error = ft_sim->setModelParm (ckt, modtmp->INPmodfast, ft_sim->devices[modtmp->INPmodType]->modelParms[j].id, val, NULL); if (error) return error; break; } } /* end for(j = 0 . . .*/ if (strcmp(parm, "level") == 0) { /* just grab the level number and throw away */ /* since we already have that info from pass1 */ val = INPgetValue(ckt, &line, IF_REAL, tab); } else if (j >= *(ft_sim->devices[modtmp->INPmodType]->numModelParms)) { /* want only the parameter names in output - not the values */ errno = 0; /* To distinguish success/failure after call */ dval = strtod(parm, &endptr); /* Check for various possible errors */ if ((errno == ERANGE && dval == HUGE_VAL) || errno != 0) { perror("strtod"); controlled_exit(EXIT_FAILURE); } if (endptr == parm) { /* it was no number - it is really a string */ temp = TMALLOC(char, 40 + strlen(parm)); (void) sprintf(temp, "unrecognized parameter (%s) - ignored", parm); err = INPerrCat(err, temp); } } FREE(parm); } #ifdef CIDER } /* analytical vs. numerical model parsing */ #endif modtmp->INPmodLine->error = err; return 0; } static bool parse_line( char* line, char* tokens[], int num_tokens, double values[], bool found[] ) { char* token = NULL; int get_index = -1; int i; bool flag = TRUE; int error; for ( i = 0; i < num_tokens; i++ ) found[i] = FALSE; while( *line != '\0' ) { if ( get_index != -1 ) { values[get_index] = INPevaluate( &line, &error, 1 ); found[get_index] = TRUE; get_index = -1; continue; } INPgetNetTok( &line, &token, 1 ); for ( i = 0; i < num_tokens; i++ ) if ( strcmp( tokens[i], token ) == 0 ) get_index = i; txfree(token); } for ( i = 0; i < num_tokens; i++ ) if ( found[i] == FALSE ) { flag = FALSE; break; } return flag; } static bool is_equal( double result, double expectedResult ) { if (fabs(result - expectedResult) < 1e-15) return TRUE; else return FALSE; } static bool in_range( double value, double min, double max ) { if ( (is_equal( value, min ) == TRUE) || /* the standard binning rule is: min <= value < max */ (min < value && value < max) ) return TRUE; else return FALSE; } char* INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, char* line ) { INPmodel* modtmp; double l, w, lmin, lmax, wmin, wmax; double parse_values[4]; bool parse_found[4]; static char* instance_tokens[] = { "l", "w" }; static char* model_tokens[] = { "lmin", "lmax", "wmin", "wmax" }; int error; double scale; char *err = NULL; if (!cp_getvar("scale", CP_REAL, &scale)) scale = 1; *model = NULL; if ( parse_line( line, instance_tokens, 2, parse_values, parse_found ) != TRUE ) return NULL; l = parse_values[0]*scale; w = parse_values[1]*scale; for ( modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel ) { if ( /* This is the list of binable models */ modtmp->INPmodType != INPtypelook ("BSIM3") && modtmp->INPmodType != INPtypelook ("BSIM3v32") && modtmp->INPmodType != INPtypelook ("BSIM3v0") && modtmp->INPmodType != INPtypelook ("BSIM3v1") && modtmp->INPmodType != INPtypelook ("BSIM4") && modtmp->INPmodType != INPtypelook ("BSIM4v4") && modtmp->INPmodType != INPtypelook ("BSIM4v5") && modtmp->INPmodType != INPtypelook ("BSIM4v6") && modtmp->INPmodType != INPtypelook ("HiSIM2") && modtmp->INPmodType != INPtypelook ("HiSIMHV") ) continue; /* We left the loop if the model is not in the list */ if (modtmp->INPmodType < 0) { /* First check for illegal model type */ /* illegal device type, so can't handle */ *model = NULL; err = TMALLOC(char, 35 + strlen(name)); (void) sprintf(err,"Unknown device type for model %s \n", name); return (err); } /* end of checking for illegal model */ if ( parse_line( modtmp->INPmodLine->line, model_tokens, 4, parse_values, parse_found ) != TRUE ) continue; lmin = parse_values[0]; lmax = parse_values[1]; wmin = parse_values[2]; wmax = parse_values[3]; if ( strncmp( modtmp->INPmodName, name, strlen( name ) ) == 0 && in_range( l, lmin, lmax ) && in_range( w, wmin, wmax ) ) { if ( !modtmp->INPmodfast ) { error = create_model( ckt, modtmp, tab ); if ( error ) return NULL; } *model = modtmp; return NULL; } } return NULL; } char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab) { INPmodel *modtmp; char *err = NULL; int error; #ifdef TRACE /* SDB debug statement */ printf("In INPgetMod, examining model %s . . . \n", name); #endif for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) { #ifdef TRACE /* SDB debug statement */ printf("In INPgetMod, comparing %s against stored model %s . . . \n", name, modtmp->INPmodName); #endif if (strcmp(modtmp->INPmodName, name) == 0) { /* found the model in question - now instantiate if necessary */ /* and return an appropriate pointer to it */ if (modtmp->INPmodType < 0) { /* First check for illegal model type */ /* illegal device type, so can't handle */ *model = NULL; err = TMALLOC(char, 35 + strlen(name)); (void) sprintf(err,"Unknown device type for model %s \n", name); #ifdef TRACE /* SDB debug statement */ printf("In INPgetMod, illegal device type for model %s . . . \n", name); #endif return (err); } /* end of checking for illegal model */ if (! modtmp->INPmodfast) { /* Check if model is already defined */ error = create_model( ckt, modtmp, tab ); if ( error ) return INPerror(error); } *model = modtmp; return (NULL); } } /* didn't find model - ERROR - return model */ *model = NULL; err = TMALLOC(char, 60 + strlen(name)); (void) sprintf(err, "Unable to find definition of model %s - default assumed \n", name); #ifdef TRACE /* SDB debug statement */ printf("In INPgetMod, didn't find model for %s, using default . . . \n", name); #endif return (err); } #ifdef CIDER /* * Parse a numerical model by running through the list of original * input cards which make up the model * Given: * 1. First card looks like: .model modname modtype * 2. Other cards look like: +? where ? tells us what * to do with the next card: * '#$*' = comment card * '+' = continue previous card * other = new card */ static int INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMessage ) { card *txtCard; /* Text description of a card */ GENcard *tmpCard; /* Processed description of a card */ IFcardInfo *info; /* Info about the type of card located */ char *line; char *cardName = NULL; /* name of a card */ char *parm; /* name of a parameter */ int cardType; /* type/index for the current card */ int cardNum = 0; /* number of this card in the overall line */ int lastType = E_MISSING; /* type of previous card */ char *err = NULL, *tmp; /* Strings for error messages */ IFvalue *value; int error, idx, invert; /* Chase down to the top of the list of actual cards */ txtCard = model->INPmodLine->actualLine; /* Skip the first card if it exists since there's nothing interesting */ /* txtCard will be empty if the numerical model is empty */ if (txtCard) txtCard = txtCard->nextcard; /* Now parse each remaining card */ while (txtCard) { line = txtCard->line; cardType = E_MISSING; cardNum++; /* Skip the initial '+' and any whitespace. */ line++; while (*line == ' ' || *line == '\t') line++; switch (*line) { case '*': case '$': case '#': case '\0': case '\n': /* comment or empty cards */ lastType = E_MISSING; break; case '+': /* continuation card */ if (lastType >= 0) { cardType = lastType; while (*line == '+') line++; /* Skip leading '+'s */ } else { tmp = TMALLOC(char, 55); (void) sprintf(tmp, "Error on card %d : illegal continuation \'+\' - ignored", cardNum); err = INPerrCat(err,tmp); lastType = E_MISSING; break; } /* FALL THRU when continuing a card */ default: if (cardType == E_MISSING) { /* new command card */ if (cardName) FREE(cardName); /* get rid of old card name */ INPgetTok(&line,&cardName,1); /* get new card name */ if (*cardName) { /* Found a name? */ cardType = INPfindCard(cardName,INPcardTab,INPnumCards); if (cardType >= 0) { /* Add card structure to model */ info = INPcardTab[cardType]; error = info->newCard (&tmpCard, model->INPmodfast ); if (error) return(error); /* Handle parameter-less cards */ } else if (cinprefix( cardName, "title", 3 ) ) { /* Do nothing */ } else if (cinprefix( cardName, "comment", 3 ) ) { /* Do nothing */ } else if (cinprefix( cardName, "end", 3 ) ) { /* Terminate parsing */ txtCard = ((card *) 0); cardType = E_MISSING; } else { /* Error */ tmp = TMALLOC(char, 55 + strlen(cardName)); (void) sprintf(tmp, "Error on card %d : unrecognized name (%s) - ignored", cardNum, cardName ); err = INPerrCat(err,tmp); } } } if (cardType >= 0) { /* parse the rest of this line */ while (*line) { /* Strip leading carat from booleans */ if (*line == '^') { invert = TRUE; line++; /* Skip the '^' */ } else { invert = FALSE; } INPgetTok(&line,&parm,1); if (!*parm) break; idx = INPfindParm(parm, info->cardParms, info->numParms); if (idx == E_MISSING) { /* parm not found */ tmp = TMALLOC(char, 60 + strlen(parm)); (void)sprintf(tmp, "Error on card %d : unrecognized parameter (%s) - ignored", cardNum, parm); err = INPerrCat(err, tmp); } else if (idx == E_AMBIGUOUS) { /* parm ambiguous */ tmp = TMALLOC(char, 58 + strlen(parm)); (void)sprintf(tmp, "Error on card %d : ambiguous parameter (%s) - ignored", cardNum, parm); err = INPerrCat(err, tmp); } else { value = INPgetValue( ckt, &line, info->cardParms[idx].dataType, tab ); if (invert) { /* invert if it's a boolean entry */ if ((info->cardParms[idx].dataType & IF_VARTYPES) == IF_FLAG) { value->iValue = 0; } else { tmp = TMALLOC(char, 63 + strlen(parm)); (void)sprintf(tmp, "Error on card %d : non-boolean parameter (%s) - \'^\' ignored", cardNum, parm); err = INPerrCat(err, tmp); } } error = info->setCardParm ( info->cardParms[idx].id, value, tmpCard ); if (error) return(error); } FREE(parm); } } lastType = cardType; break; } if (txtCard) txtCard = txtCard->nextcard; } *errMessage = err; return( 0 ); } /* * Locate the best match to a card name in an IFcardInfo table */ static int INPfindCard( char *name, IFcardInfo *table[], int numCards ) { int test; int match, bestMatch; int best; int length; length = (int) strlen(name); /* compare all the names in the card table to this name */ best = E_MISSING; bestMatch = 0; for ( test = 0; test < numCards; test++ ) { match = cimatch( name, table[test]->name ); if ((match == bestMatch ) && (match > 0)){ best = E_AMBIGUOUS; } else if ((match > bestMatch) && (match == length)) { best = test; bestMatch = match; } } return(best); } /* * Locate the best match to a parameter name in an IFparm table */ static int INPfindParm( char *name, IFparm *table, int numParms ) { int test, best; int match, bestMatch; int id, bestId; int length; length = (int) strlen(name); /* compare all the names in the parameter table to this name */ best = E_MISSING; bestId = -1; bestMatch = 0; for ( test = 0; test < numParms; test++ ) { match = cimatch( name, table[test].keyword ); if ( (match == length) && (match == (int) strlen(table[test].keyword)) ) { /* exact match */ best = test; /* all done */ break; } id = table[test].id; if ((match == bestMatch) && (match > 0) && (id != bestId)) { best = E_AMBIGUOUS; } else if ((match > bestMatch) && (match == length)) { bestMatch = match; bestId = id; best = test; } } return(best); } #endif /* CIDER */ ngspice-26/src/spicelib/parser/Makefile.in0000644000265600020320000005261112264261540020153 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/spicelib/parser DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libinp_la_LIBADD = am_libinp_la_OBJECTS = ifeval.lo ifnewuid.lo inp2b.lo inp2c.lo \ inp2d.lo inp2dot.lo inp2e.lo inp2f.lo inp2g.lo inp2h.lo \ inp2i.lo inp2j.lo inp2k.lo inp2l.lo inp2m.lo inp2n.lo inp2o.lo \ inp2p.lo inp2q.lo inp2r.lo inp2s.lo inp2t.lo inp2u.lo inp2v.lo \ inp2w.lo inp2y.lo inp2z.lo inpaname.lo inpapnam.lo inpcfix.lo \ inpdomod.lo inpdoopt.lo inpdpar.lo inperrc.lo inperror.lo \ inpeval.lo inpfindl.lo inpfindv.lo inpgmod.lo inpgstr.lo \ inpgtitl.lo inpgtok.lo inpgval.lo inpkmods.lo inplist.lo \ inplkmod.lo inpmkmod.lo inpmktmp.lo inppas1.lo inppas2.lo \ inppas3.lo inppname.lo inpptree.lo inpsymt.lo inptyplk.lo \ ptfuncs.lo sperror.lo libinp_la_OBJECTS = $(am_libinp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libinp_la_SOURCES) DIST_SOURCES = $(libinp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/frontend AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = inpptree-parser.y inpptree-parser.c inpptree-parser.h noinst_LTLIBRARIES = libinp.la libinp_la_SOURCES = \ ifeval.c \ ifnewuid.c \ inp2b.c \ inp2c.c \ inp2d.c \ inp2dot.c \ inp2e.c \ inp2f.c \ inp2g.c \ inp2h.c \ inp2i.c \ inp2j.c \ inp2k.c \ inp2l.c \ inp2m.c \ inp2n.c \ inp2o.c \ inp2p.c \ inp2q.c \ inp2r.c \ inp2s.c \ inp2t.c \ inp2u.c \ inp2v.c \ inp2w.c \ inp2y.c \ inp2z.c \ inpaname.c \ inpapnam.c \ inpcfix.c \ inpdomod.c \ inpdoopt.c \ inpdpar.c \ inperrc.c \ inperror.c \ inpeval.c \ inpfindl.c \ inpfindv.c \ inpgmod.c \ inpgstr.c \ inpgtitl.c \ inpgtok.c \ inpgval.c \ inpkmods.c \ inplist.c \ inplkmod.c \ inpmkmod.c \ inpmktmp.c \ inppas1.c \ inppas1.h \ inppas2.c \ inppas2.h \ inppas3.c \ inppas3.h \ inppname.c \ inpptree.c \ inpsymt.c \ inptyplk.c \ ptfuncs.c \ sperror.c \ inpxx.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/spicelib/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/spicelib/parser/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libinp.la: $(libinp_la_OBJECTS) $(libinp_la_DEPENDENCIES) $(EXTRA_libinp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libinp_la_OBJECTS) $(libinp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifeval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifnewuid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2b.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2c.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2d.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2dot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2e.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2f.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2g.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2h.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2i.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2j.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2k.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2l.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2m.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2n.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2o.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2p.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2q.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2s.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2t.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2u.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2v.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2w.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2y.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inp2z.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpaname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpapnam.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpcfix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpdomod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpdoopt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpdpar.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inperrc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inperror.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpeval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpfindl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpfindv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpgmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpgstr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpgtitl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpgtok.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpgval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpkmods.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inplist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inplkmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpmkmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpmktmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inppas1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inppas2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inppas3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inppname.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpptree.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inpsymt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/inptyplk.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ptfuncs.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sperror.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am $(srcdir)/inpptree.c : inpptree-parser.c inpptree-parser.c inpptree-parser.h : inpptree-parser.y bison $(srcdir)/inpptree-parser.y # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/spicelib/parser/inpsymt.c0000644000265600020320000001545712264261473017771 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Stuff for the terminal and node symbol tables. * Defined: INPtabInit, INPinsert, INPtermInsert, INPtabEnd */ /* MW. Special INPinsertNofree for routines from spiceif.c and outif.c */ #include "ngspice/ngspice.h" #include /* Take this out soon. */ #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "ngspice/cpstd.h" #include "ngspice/fteext.h" #include "inpxx.h" static int hash(char *name, int tsize); /* Initialize the symbol tables. */ INPtables *INPtabInit(int numlines) { INPtables *tab; tab = TMALLOC(INPtables, 1); tab->INPsymtab = TMALLOC(struct INPtab *, numlines / 4 + 1); ZERO(tab->INPsymtab, (numlines / 4 + 1) * sizeof(struct INPtab *)); tab->INPtermsymtab = TMALLOC(struct INPnTab *, numlines); ZERO(tab->INPtermsymtab, numlines * sizeof(struct INPnTab *)); tab->INPsize = numlines / 4 + 1; tab->INPtermsize = numlines; return (tab); } /* insert 'token' into the terminal symbol table */ /* create a NEW NODE and return a pointer to it in *node */ int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; int error; struct INPnTab *t; key = hash(*token, tab->INPtermsize); for (t = tab->INPtermsymtab[key]; t; t = t->t_next) { if (!strcmp(*token, t->t_ent)) { FREE(*token); *token = t->t_ent; if (node) *node = t->t_node; return (E_EXISTS); } } t = TMALLOC(struct INPnTab, 1); if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); error = ft_sim->newNode (ckt, &(t->t_node), *token); if (error) return (error); if (node) *node = t->t_node; t->t_ent = *token; t->t_next = tab->INPtermsymtab[key]; tab->INPtermsymtab[key] = t; return (OK); } /* insert 'token' into the terminal symbol table */ /* USE node as the node pointer */ int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; struct INPnTab *t; NG_IGNORE(ckt); key = hash(*token, tab->INPtermsize); for (t = tab->INPtermsymtab[key]; t; t = t->t_next) { if (!strcmp(*token, t->t_ent)) { FREE(*token); *token = t->t_ent; if (node) *node = t->t_node; return (E_EXISTS); } } t = TMALLOC(struct INPnTab, 1); if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); t->t_node = *node; t->t_ent = *token; t->t_next = tab->INPtermsymtab[key]; tab->INPtermsymtab[key] = t; return (OK); } /* insert 'token' into the terminal symbol table as a name for ground*/ int INPgndInsert(CKTcircuit *ckt, char **token, INPtables * tab, CKTnode **node) { int key; int error; struct INPnTab *t; key = hash(*token, tab->INPtermsize); for (t = tab->INPtermsymtab[key]; t; t = t->t_next) { if (!strcmp(*token, t->t_ent)) { FREE(*token); *token = t->t_ent; if (node) *node = t->t_node; return (E_EXISTS); } } t = TMALLOC(struct INPnTab, 1); if (t == NULL) return (E_NOMEM); ZERO(t, struct INPnTab); error = ft_sim->groundNode (ckt, &(t->t_node), *token); if (error) return (error); if (node) *node = t->t_node; t->t_ent = *token; t->t_next = tab->INPtermsymtab[key]; tab->INPtermsymtab[key] = t; return (OK); } /* retrieve 'token' from the symbol table */ int INPretrieve(char **token, INPtables * tab) { struct INPtab *t; int key; key = hash(*token, tab->INPsize); for (t = tab->INPsymtab[key]; t; t = t->t_next) if (!strcmp(*token, t->t_ent)) { *token = t->t_ent; return (OK); } return (E_BADPARM); } /* insert 'token' into the symbol table */ int INPinsert(char **token, INPtables * tab) { struct INPtab *t; int key; key = hash(*token, tab->INPsize); for (t = tab->INPsymtab[key]; t; t = t->t_next) if (!strcmp(*token, t->t_ent)) { FREE(*token); *token = t->t_ent; return (E_EXISTS); } t = TMALLOC(struct INPtab, 1); if (t == NULL) return (E_NOMEM); ZERO(t, struct INPtab); t->t_ent = *token; t->t_next = tab->INPsymtab[key]; tab->INPsymtab[key] = t; return (OK); } /* MW. insert 'token' into the symbol table but no free() token pointer. * Calling routine should take care for this */ int INPinsertNofree(char **token, INPtables * tab) { struct INPtab *t; int key; key = hash(*token, tab->INPsize); for (t = tab->INPsymtab[key]; t; t = t->t_next) if (!strcmp(*token, t->t_ent)) { /* MW. We can't touch memory pointed by token now */ *token = t->t_ent; return (E_EXISTS); } t = TMALLOC(struct INPtab, 1); if (t == NULL) return (E_NOMEM); ZERO(t, struct INPtab); t->t_ent = *token; t->t_next = tab->INPsymtab[key]; tab->INPsymtab[key] = t; return (OK); } /* remove 'token' from the symbol table */ int INPremove(char *token, INPtables * tab) { struct INPtab *t, **prevp; int key; key = hash(token, tab->INPsize); prevp = &tab->INPsymtab[key]; for (t = *prevp; t && token != t->t_ent; t = t->t_next) prevp = &t->t_next; if (!t) return OK; *prevp = t->t_next; tfree(t->t_ent); tfree(t); return OK; } /* remove 'token' from the symbol table */ int INPremTerm(char *token, INPtables * tab) { struct INPnTab *t, **prevp; int key; key = hash(token, tab->INPtermsize); prevp = &tab->INPtermsymtab[key]; for (t = *prevp; t && token != t->t_ent; t = t->t_next) prevp = &t->t_next; if (!t) return OK; *prevp = t->t_next; tfree(t->t_ent); tfree(t); return OK; } /* Free the space used by the symbol tables. */ void INPtabEnd(INPtables * tab) { struct INPtab *t, *lt; struct INPnTab *n, *ln; int i; for (i = 0; i < tab->INPsize; i++) for (t = tab->INPsymtab[i]; t; t = lt) { lt = t->t_next; FREE(t->t_ent); FREE(t); } FREE(tab->INPsymtab); for (i = 0; i < tab->INPtermsize; i++) for (n = tab->INPtermsymtab[i]; n; n = ln) { ln = n->t_next; FREE(n->t_ent); FREE(n); /* But not t_node ! */ } FREE(tab->INPtermsymtab); FREE(tab); return; } static int hash(char *name, int tsize) { unsigned int hash = 5381; char c; while ((c = *name++) != '\0') hash = (hash * 33) ^ (unsigned) c; return (int) (hash % (unsigned) tsize); } ngspice-26/src/spicelib/parser/sperror.c0000644000265600020320000000451712264261473017755 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * provide the error message appropriate for the given error code */ #include "ngspice/ngspice.h" #include #include "ngspice/fteext.h" #include "ngspice/sperror.h" #include "ngspice/cktdefs.h" #include "ngspice/ifsim.h" #include "inpxx.h" const char *SPerror(int type) { char *msg; switch (type) { case E_PAUSE: msg = "pause requested"; break; case E_INTERN: msg = "impossible error - can't occur"; break; case E_EXISTS: msg = "device already exists, existing one being used"; break; case E_NODEV: msg = "no such device"; break; case E_NOMOD: msg = "no such model"; break; case E_NOTERM: msg = "no such terminal on this device"; break; case E_BADPARM: msg = "no such parameter on this device"; break; case E_NOMEM: msg = "out of memory"; break; case E_NODECON: msg = "node already connected; connection replaced"; break; case E_UNSUPP: msg = "operation not supported"; break; case E_PARMVAL: msg = "parameter value out of range or the wrong type"; break; case E_BADMATRIX: msg = "matrix can't be decomposed as is"; break; case E_SINGULAR: msg = "matrix is singular"; break; case E_ITERLIM: msg = "iteration limit reached"; break; case E_ORDER: msg = "unsupported integration order"; break; case E_METHOD: msg = "unsupported integration method"; break; case E_TIMESTEP: msg = "timestep too small"; break; case E_XMISSIONLINE: msg = "transmission lines not supported by pole-zero"; break; case E_MAGEXCEEDED: msg = "magnitude overflow"; break; case E_SHORT: msg = "input or output shorted"; break; case E_INISOUT: msg = "transfer function is 1"; break; case E_NODISTO: msg = "distortion analysis not present"; break; case E_NONOISE: msg = "noise analysis not present"; break; case E_NOANAL: msg = "no such analysis type"; break; case E_NOCHANGE: msg = "unsupported action; no change made"; break; case E_NOTFOUND: msg = "not found"; break; case E_NOACINPUT: msg = "ac input not found"; break; case E_NOF2SRC: msg = "no F2 source for IM disto analysis"; break; case OK: return (NULL); default: msg = "Unknown error code"; } return msg; } ngspice-26/src/spicelib/parser/inp2h.c0000644000265600020320000000424412264261473017276 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2H(CKTcircuit *ckt, INPtables * tab, card * current) { /* Hname */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ IFvalue *parm; /* pointer to a value structure for functions which return one */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid for default model to be created */ type = INPtypelook("CCVS"); if (type < 0) { LITERR("Device type CCVS not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); if (!tab->defHmod) { /* create default H model */ IFnewUid(ckt, &uid, NULL, "H", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defHmod), uid)); } IFC(newInstance, (ckt, tab->defHmod, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); parm = INPgetValue(ckt, &line, IF_INSTANCE, tab); GCA(INPpName, ("control", parm, ckt, type, fast)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { ptemp.rValue = leadval; GCA(INPpName, ("gain", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inp2z.c0000644000265600020320000000657012264261473017324 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ /* Added code from macspice3f4 HFET1&2 and MESA model Original note: Added device calls for Mesfet models and HFET models provided by Trond Ytterdal as of Nov 98 */ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current) { /* Zname [] [OFF] [IC=,] */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ int error; /* error code temporary */ GENinstance *fast; /* pointer to the actual instance */ IFvalue ptemp; /* a value structure to package resistance into */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ char *model; /* the name of the model */ INPmodel *thismodel; /* pointer to model description for user's model */ GENmodel *mdfast; /* pointer to the actual model */ IFuid uid; /* uid for default model */ line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetTok(&line, &model, 1); INPinsert(&model, tab); thismodel = NULL; current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if ( thismodel->INPmodType != INPtypelook("MES") && thismodel->INPmodType != INPtypelook("MESA") && thismodel->INPmodType != INPtypelook("HFET1") && thismodel->INPmodType != INPtypelook("HFET2")) { LITERR("incorrect model type"); return; } type = thismodel->INPmodType; mdfast = (thismodel->INPmodfast); } else { type = INPtypelook("MES"); if (type < 0 ) { LITERR("Device type MES not supported by this binary\n"); return; } if (!tab->defZmod) { /* create default Z model */ IFnewUid(ckt, &uid, NULL, "Z", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defZmod), uid)); } mdfast = tab->defZmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); /* use type - not thismodel->INPmodType as it might not exist! */ /* FIXME: Why do we need checking for type here? */ if ( (waslead) && ( type /*thismodel->INPmodType*/ != INPtypelook("MES") ) ) { ptemp.rValue = leadval; GCA(INPpName, ("area", &ptemp, ckt, type, fast)); } } ngspice-26/src/spicelib/parser/inpdoopt.c0000644000265600020320000000423512264261473020112 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* INPdoOpts(ckt,option card) * parse the options off of the given option card and add them to * the given circuit */ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" void INPdoOpts( CKTcircuit *ckt, JOB *anal, card *optCard, INPtables *tab) { char *line; char *token; char *errmsg; IFvalue *val; int error; int which; which = ft_find_analysis("options"); if(which == -1) { optCard->error = INPerrCat(optCard->error,INPmkTemp( "error: analysis options table not found\n")); return; } line = optCard->line; INPgetTok(&line,&token,1); /* throw away '.option' */ while (*line) { IFparm *if_parm; INPgetTok(&line,&token,1); if_parm = ft_find_analysis_parm(which, token); if(if_parm && !(if_parm->dataType & IF_UNIMP_MASK)) { errmsg = TMALLOC(char, 45 + strlen(token)); (void) sprintf(errmsg, " Warning: %s not yet implemented - ignored \n",token); optCard->error = INPerrCat(optCard->error,errmsg); val = INPgetValue(ckt,&line, if_parm->dataType, tab); continue; } if(if_parm && (if_parm->dataType & IF_SET)) { val = INPgetValue(ckt,&line, if_parm->dataType&IF_VARTYPES, tab); error = ft_sim->setAnalysisParm (ckt, anal, if_parm->id, val, NULL); if(error) { errmsg = TMALLOC(char, 35 + strlen(token)); (void) sprintf(errmsg, "Warning: can't set option %s\n", token); optCard->error = INPerrCat(optCard->error, errmsg); } continue; } errmsg = TMALLOC(char, 100); (void) strcpy(errmsg," Error: unknown option - ignored\n"); optCard->error = INPerrCat(optCard->error,errmsg); fprintf(stderr, "%s\n", optCard->error); } } ngspice-26/src/spicelib/parser/inppas2.h0000644000265600020320000000013412264261473017631 0ustar andreasadmin#ifndef ngspice_INPPAS2_H #define ngspice_INPPAS2_H #include "ngspice/inpdefs.h" #endif ngspice-26/src/spicelib/parser/inpptree.c0000644000265600020320000012705612264261473020113 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ //#define TRACE #include "ngspice/ngspice.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "ngspice/inpdefs.h" #include "ngspice/inpptree.h" #include "inpxx.h" extern void controlled_exit(int status); static INPparseNode *mkcon(double value); static INPparseNode *mkb(int type, INPparseNode * left, INPparseNode * right); static INPparseNode *mkf(int type, INPparseNode * arg); static int PTcheck(INPparseNode * p); static INPparseNode *mkbnode(const char *opstr, INPparseNode * arg1, INPparseNode * arg2); static INPparseNode *mkfnode(const char *fname, INPparseNode * arg); static INPparseNode *mkvnode(char *name); static INPparseNode *mkinode(char *name); static INPparseNode *mknnode(double number); static INPparseNode *mksnode(const char *string, void *ckt); static INPparseNode *PTdifferentiate(INPparseNode * p, int varnum); static void free_tree(INPparseNode *); static void printTree(INPparseNode *); /* * LAW for INPparseNode* generator and consumer functions: * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * Newly allocated structs shall be initialized with `usecnt' = 0 * When filling INPparseNode * slots of newly initialized structs * their `usecnt' shall be incremented * Generators pass the responsibility `to free' return values * on to their invokers. * Functions generally process args with exactly one of: * - inc_usage(arg) if they insert an argument into a struct * - release_tree(arg) if they don't make any use of it * - pass it on to another function() * Functions use the the result of a function invocations with one of: * - inc_usage(result) if they insert the result into a struct * - release_tree(result) if they don't make any use of it * - pass it on to another function() * - simply return the result * * mkfirst(first, second) * is used to safely release its second argument, * and return its first * */ static inline INPparseNode * inc_usage(INPparseNode *p) { if(p) p->usecnt ++; return p; } static void dec_usage(INPparseNode *p) { if(p && --p->usecnt <= 0) free_tree(p); } static void release_tree(INPparseNode *p) { if(p && p->usecnt <= 0) free_tree(p); } static INPparseNode * mkfirst(INPparseNode *fst, INPparseNode *snd) { if(fst) { fst->usecnt ++; release_tree(snd); fst->usecnt --; } else { release_tree(snd); } return fst; } #include "inpptree-parser.c" static IFvalue *values = NULL; static int *types; static int numvalues; static CKTcircuit *circuit; static INPtables *tables; #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif extern IFsimulator *ft_sim; /* XXX */ /* Some tables that the parser uses. */ static struct op { int number; char *name; void (*funcptr)(void); } ops[] = { { PT_COMMA, ",", NULL}, { PT_PLUS, "+", (void(*)(void)) PTplus}, { PT_MINUS, "-", (void(*)(void)) PTminus}, { PT_TIMES, "*", (void(*)(void)) PTtimes}, { PT_DIVIDE, "/", (void(*)(void)) PTdivide}, { PT_POWER, "^", (void(*)(void)) PTpower} }; #define NUM_OPS (int)NUMELEMS(ops) static struct func { char *name; int number; void (*funcptr)(void); } funcs[] = { { "abs", PTF_ABS, (void(*)(void)) PTabs } , { "acos", PTF_ACOS, (void(*)(void)) PTacos } , { "acosh", PTF_ACOSH, (void(*)(void)) PTacosh } , { "asin", PTF_ASIN, (void(*)(void)) PTasin } , { "asinh", PTF_ASINH, (void(*)(void)) PTasinh } , { "atan", PTF_ATAN, (void(*)(void)) PTatan } , { "atanh", PTF_ATANH, (void(*)(void)) PTatanh } , { "cos", PTF_COS, (void(*)(void)) PTcos } , { "cosh", PTF_COSH, (void(*)(void)) PTcosh } , { "exp", PTF_EXP, (void(*)(void)) PTexp } , { "ln", PTF_LN, (void(*)(void)) PTln } , { "log", PTF_LOG, (void(*)(void)) PTlog } , { "sgn", PTF_SGN, (void(*)(void)) PTsgn } , { "sin", PTF_SIN, (void(*)(void)) PTsin } , { "sinh", PTF_SINH, (void(*)(void)) PTsinh } , { "sqrt", PTF_SQRT, (void(*)(void)) PTsqrt } , { "tan", PTF_TAN, (void(*)(void)) PTtan } , { "tanh", PTF_TANH, (void(*)(void)) PTtanh } , { "u", PTF_USTEP, (void(*)(void)) PTustep } , { "uramp", PTF_URAMP, (void(*)(void)) PTuramp } , { "ceil", PTF_CEIL, (void(*)(void)) PTceil } , { "floor", PTF_FLOOR, (void(*)(void)) PTfloor } , { "-", PTF_UMINUS, (void(*)(void)) PTuminus }, /* MW. cif function added */ { "u2", PTF_USTEP2, (void(*)(void)) PTustep2}, { "pwl", PTF_PWL, (void(*)(void)) PTpwl}, { "pwl_derivative", PTF_PWL_DERIVATIVE, (void(*)(void)) PTpwl_derivative}, { "eq0", PTF_EQ0, (void(*)(void)) PTeq0}, { "ne0", PTF_NE0, (void(*)(void)) PTne0}, { "gt0", PTF_GT0, (void(*)(void)) PTgt0}, { "lt0", PTF_LT0, (void(*)(void)) PTlt0}, { "ge0", PTF_GE0, (void(*)(void)) PTge0}, { "le0", PTF_LE0, (void(*)(void)) PTle0}, { "pow", PTF_POW, (void(*)(void)) PTpower}, { "pwr", PTF_PWR, (void(*)(void)) PTpwr}, { "min", PTF_MIN, (void(*)(void)) PTmin}, { "max", PTF_MAX, (void(*)(void)) PTmax}, } ; #define NUM_FUNCS (int)NUMELEMS(funcs) /* These are all the constants any sane person needs. */ static struct constant { char *name; double value; } constants[] = { { "e", M_E}, { "pi", M_PI} }; #define NUM_CONSTANTS (int)NUMELEMS(constants) /* Parse the expression in *line as far as possible, and return the parse * tree obtained. If there is an error, *pt will be set to NULL and an error * message will be printed. */ void INPgetTree(char **line, INPparseTree ** pt, CKTcircuit *ckt, INPtables * tab) { INPparseNode *p; int i, rv; values = NULL; types = NULL; numvalues = 0; circuit = ckt; tables = tab; #ifdef TRACE fprintf(stderr,"%s, line = \"%s\"\n", __func__, *line); #endif rv = PTparse(line, &p, ckt); if (rv || !p || !PTcheck(p)) { *pt = NULL; release_tree(p); } else { (*pt) = TMALLOC(INPparseTree, 1); (*pt)->p.numVars = numvalues; (*pt)->p.varTypes = types; (*pt)->p.vars = values; (*pt)->p.IFeval = IFeval; (*pt)->tree = inc_usage(p); (*pt)->derivs = TMALLOC(INPparseNode *, numvalues); for (i = 0; i < numvalues; i++) (*pt)->derivs[i] = inc_usage(PTdifferentiate(p, i)); } values = NULL; types = NULL; numvalues = 0; circuit = NULL; tables = NULL; } /* This routine takes the partial derivative of the parse tree with respect to * the i'th variable. We try to do optimizations like getting rid of 0-valued * terms. * *** Note that in the interests of simplicity we share some subtrees between *** the function and its derivatives. This means that you can't free the *** trees. */ static INPparseNode *PTdifferentiate(INPparseNode * p, int varnum) { INPparseNode *arg1 = NULL, *arg2 = NULL, *newp = NULL; switch (p->type) { case PT_TIME: case PT_TEMPERATURE: case PT_FREQUENCY: case PT_CONSTANT: newp = mkcon(0.0); break; case PT_VAR: /* Is this the variable we're differentiating wrt? */ if (p->valueIndex == varnum) newp = mkcon(1.0); else newp = mkcon(0.0); break; case PT_PLUS: case PT_MINUS: arg1 = PTdifferentiate(p->left, varnum); arg2 = PTdifferentiate(p->right, varnum); newp = mkb(p->type, arg1, arg2); break; case PT_TIMES: /* d(a * b) = d(a) * b + d(b) * a */ arg1 = PTdifferentiate(p->left, varnum); arg2 = PTdifferentiate(p->right, varnum); newp = mkb(PT_PLUS, mkb(PT_TIMES, arg1, p->right), mkb(PT_TIMES, p->left, arg2)); break; case PT_DIVIDE: /* d(a / b) = (d(a) * b - d(b) * a) / b^2 */ arg1 = PTdifferentiate(p->left, varnum); arg2 = PTdifferentiate(p->right, varnum); newp = mkb(PT_DIVIDE, mkb(PT_MINUS, mkb(PT_TIMES, arg1, p->right), mkb(PT_TIMES, p->left, arg2)), mkb(PT_POWER, p->right, mkcon(2.0))); break; case PT_POWER: if (p->right->type == PT_CONSTANT) { /* * D(f^C) = C * f^(C-1) * D(f) */ arg1 = PTdifferentiate(p->left, varnum); newp = mkb(PT_TIMES, mkb(PT_TIMES, mkcon(p->right->constant), mkb(PT_POWER, p->left, mkcon(p->right->constant - 1))), arg1); } else { /* * D(f^g) = D(exp(g*ln(f))) * = exp(g*ln(f)) * D(g*ln(f)) * = exp(g*ln(f)) * (D(g)*ln(f) + g*D(f)/f) */ arg1 = PTdifferentiate(p->left, varnum); arg2 = PTdifferentiate(p->right, varnum); newp = mkb(PT_TIMES, mkf(PTF_EXP, mkb(PT_TIMES, p->right, mkf(PTF_LN, p->left))), mkb(PT_PLUS, mkb(PT_TIMES, p->right, mkb(PT_DIVIDE, arg1, p->left)), mkb(PT_TIMES, arg2, mkf(PTF_LN, p->left)))); } break; case PT_TERN: /* ternary_fcn(cond,exp1,exp2) */ // naive: // d/d ternary_fcn(cond,exp1,exp2) --> ternary_fcn(cond, d/d exp1, d/d exp2) { INPparseNode *arg1 = p->left; INPparseNode *arg2 = p->right->left; INPparseNode *arg3 = p->right->right; // extern void printTree(INPparseNode *); // // printf("debug: %s, PT_TERN: ", __func__); // printTree(p); // printf("\n"); newp = mkb(PT_TERN, arg1, mkb(PT_COMMA, PTdifferentiate(arg2, varnum), PTdifferentiate(arg3, varnum))); // printf("debug, %s, returns; ", __func__); // printTree(newp); // printf("\n"); return mkfirst(newp, p); } case PT_FUNCTION: /* Many cases. Set arg1 to the derivative of the function, * and arg2 to the derivative of the argument. */ switch (p->funcnum) { case PTF_ABS: /* sgn(u) */ arg1 = mkf(PTF_SGN, p->left); break; case PTF_SGN: arg1 = mkcon(0.0); break; case PTF_ACOS: /* - 1 / sqrt(1 - u^2) */ arg1 = mkb(PT_DIVIDE, mkcon(-1.0), mkf(PTF_SQRT, mkb(PT_MINUS, mkcon(1.0), mkb(PT_POWER, p->left, mkcon(2.0))))); break; case PTF_ACOSH: /* 1 / sqrt(u^2 - 1) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkf(PTF_SQRT, mkb(PT_MINUS, mkb(PT_POWER, p->left, mkcon(2.0)), mkcon(1.0)))); break; case PTF_ASIN: /* 1 / sqrt(1 - u^2) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkf(PTF_SQRT, mkb(PT_MINUS, mkcon(1.0), mkb(PT_POWER, p->left, mkcon(2.0))))); break; case PTF_ASINH: /* 1 / sqrt(u^2 + 1) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkf(PTF_SQRT, mkb(PT_PLUS, mkb(PT_POWER, p->left, mkcon(2.0)), mkcon(1.0)))); break; case PTF_ATAN: /* 1 / (1 + u^2) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkb(PT_PLUS, mkb(PT_POWER, p->left, mkcon(2.0)), mkcon(1.0))); break; case PTF_ATANH: /* 1 / (1 - u^2) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkb(PT_MINUS, mkcon(1.0), mkb(PT_POWER, p->left, mkcon(2.0)))); break; case PTF_COS: /* - sin(u) */ arg1 = mkf(PTF_UMINUS, mkf(PTF_SIN, p->left)); break; case PTF_COSH: /* sinh(u) */ arg1 = mkf(PTF_SINH, p->left); break; case PTF_EXP: /* exp(u) */ arg1 = mkf(PTF_EXP, p->left); break; case PTF_LN: /* 1 / u */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), p->left); break; case PTF_LOG: /* log(e) / u */ arg1 = mkb(PT_DIVIDE, mkcon(M_LOG10E), p->left); break; case PTF_SIN: /* cos(u) */ arg1 = mkf(PTF_COS, p->left); break; case PTF_SINH: /* cosh(u) */ arg1 = mkf(PTF_COSH, p->left); break; case PTF_SQRT: /* 1 / (2 * sqrt(u)) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkb(PT_TIMES, mkcon(2.0), mkf(PTF_SQRT, p->left))); break; case PTF_TAN: /* 1 / (cos(u) ^ 2) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkb(PT_POWER, mkf(PTF_COS, p->left), mkcon(2.0))); break; case PTF_TANH: /* 1 / (cosh(u) ^ 2) */ arg1 = mkb(PT_DIVIDE, mkcon(1.0), mkb(PT_POWER, mkf(PTF_COSH, p->left), mkcon(2.0))); break; case PTF_USTEP: case PTF_EQ0: case PTF_NE0: case PTF_GT0: case PTF_LT0: case PTF_GE0: case PTF_LE0: arg1 = mkcon(0.0); break; case PTF_URAMP: arg1 = mkf(PTF_USTEP, p->left); break; case PTF_FLOOR: /* naive: D(floor(u)) = 0 */ arg1 = mkcon(0.0); break; case PTF_CEIL: /* naive: D(ceil(u)) = 0 */ arg1 = mkcon(0.0); break; /* MW. PTF_CIF for new cif function */ case PTF_USTEP2: /* ustep2=uramp(x)-uramp(x-1) ustep2'=ustep(x)-ustep(x-1) */ arg1 = mkb(PT_MINUS, mkf(PTF_USTEP, p->left), mkf(PTF_USTEP, mkb(PT_MINUS, p->left, mkcon(1.0)))); break; case PTF_UMINUS: /* - 1 ; like a constant (was 0 !) */ arg1 = mkcon(-1.0); break; case PTF_PWL: /* PWL(var, x1, y1, x2, y2, ... a const list) */ arg1 = mkf(PTF_PWL_DERIVATIVE, p->left); arg1->data = p->data; break; case PTF_PWL_DERIVATIVE: /* d/dvar PWL(var, ...) */ arg1 = mkcon(0.0); break; case PTF_MIN: case PTF_MAX: /* min(a,b) --> (a ((a-b) < 0) ? a : b */ { INPparseNode *a = p->left->left; INPparseNode *b = p->left->right; int comparison = (p->funcnum == PTF_MIN) ? PTF_LT0 : PTF_GT0; #ifdef TRACE printf("debug: %s, PTF_MIN: ", __func__); printTree(p); printf("\n"); printf("debug: %s, PTF_MIN, a: ", __func__); printTree(a); printf("\n"); printf("debug: %s, PTF_MIN, b: ", __func__); printTree(b); printf("\n"); #endif newp = mkb(PT_TERN, mkf(comparison, mkb(PT_MINUS, a, b)), mkb(PT_COMMA, PTdifferentiate(a, varnum), PTdifferentiate(b, varnum))); #ifdef TRACE printf("debug, %s, returns; ", __func__); printTree(newp); printf("\n"); #endif return mkfirst(newp, p); } break; case PTF_POW: { /* pow(a,b) p->left: ',' p->left->left: a p->left->right: b */ if (p->left->right->type == PT_CONSTANT) { /* * D(f^C) = C * f^(C-1) * D(f) */ arg1 = PTdifferentiate(p->left->left, varnum); newp = mkb(PT_TIMES, mkb(PT_TIMES, mkcon(p->left->right->constant), mkb(PT_POWER, p->left->left, mkcon(p->left->right->constant - 1))), arg1); #ifdef TRACE printf("pow, %s, returns; ", __func__); printTree(newp); printf("\n"); #endif } else { /* * D(f^g) = D(exp(g*ln(f))) * = exp(g*ln(f)) * D(g*ln(f)) * = exp(g*ln(f)) * (D(g)*ln(f) + g*D(f)/f) */ arg1 = PTdifferentiate(p->left->left, varnum); arg2 = PTdifferentiate(p->left->right, varnum); newp = mkb(PT_TIMES, mkf(PTF_EXP, mkb(PT_TIMES, p->left->right, mkf(PTF_LN, p->left->left))), mkb(PT_PLUS, mkb(PT_TIMES, p->left->right, mkb(PT_DIVIDE, arg1, p->left->left)), mkb(PT_TIMES, arg2, mkf(PTF_LN, p->left->left)))); } return mkfirst(newp, p); } break; case PTF_PWR: { /* pwr(a,b) p->left: ',' p->left->left: a p->left->right: b */ #define a p->left->left #define b p->left->right if (b->type == PT_CONSTANT) { /* b is a constant * * f(a,b) = signum(a) * abs(a)^b * = signum(a) * exp(b*ln(abs(a))) * D(f) = signum(a) * D(exp(b*ln(abs(a)))) * = signum(a) * exp(b*ln(abs(a))) * D(b*ln(abs(a))) * = signum(a) * abs(a)^b * D(b*ln(abs(a))) * = signum(a) * abs(a)^b * b * 1/abs(a) * D(abs(a)) * = signum(a) * abs(a)^(b-1) * b * D(abs(a)) * = signum(a) * abs(a)^(b-1) * b * signum(a) * D(a) * = abs(a)^(b-1) * b * D(a) */ arg1 = PTdifferentiate(a, varnum); newp = mkb(PT_TIMES, mkb(PT_TIMES, mkcon(b->constant), mkb(PT_POWER, mkf(PTF_ABS, a), mkcon(b->constant - 1.0))), arg1); #ifdef TRACE printf("pwr, %s, returns; ", __func__); printTree(newp); printf("\n"); #endif } else { /* b is a function * * f(a,b) = signum(a) * abs(a)^b * = signum(a) * exp(b*ln(abs(a))) * D(f) = signum(a) * D(exp(b*ln(abs(a)))) * = signum(a) * exp(b*ln(abs(a))) * D(b*ln(abs(a))) * = signum(a) * exp(b*ln(abs(a))) * (D(b) * ln(abs(a)) + b * D(ln(abs(a)))) * = signum(a) * exp(b*ln(abs(a))) * (D(b) * ln(abs(a)) + b * 1/abs(a) * D(abs(a))) * = signum(a) * exp(b*ln(abs(a))) * (D(b) * ln(abs(a)) + b * 1/abs(a) * signum(a)*D(a)) * = signum(a) * exp(b*ln(abs(a))) * (D(b) * ln(abs(a)) + b/a*D(a)) * = signum(a) * exp(b*ln(abs(a))) * D(b) * ln(abs(a) + signum(a) * exp(b*ln(abs(a))) / a * b * D(a) * = signum(a) * exp(b*ln(abs(a))) * D(b) * ln(abs(a) + abs(a)^(b-1) * b * D(a) */ arg1 = PTdifferentiate(a, varnum); arg2 = PTdifferentiate(b, varnum); newp = mkb(PT_PLUS, mkb(PT_TIMES, mkf(PTF_SGN, a), mkb(PT_TIMES, mkb(PT_POWER, mkf(PTF_ABS, a), b), mkb(PT_TIMES, arg2, mkf(PTF_LN, mkf(PTF_ABS, a))))), mkb(PT_TIMES, mkb(PT_TIMES, mkb(PT_POWER, mkf(PTF_ABS, a), mkb(PT_MINUS, b, mkcon(1.0))), b), arg1)); } return mkfirst(newp, p); #undef b #undef a } default: fprintf(stderr, "Internal Error: bad function # %d\n", p->funcnum); return mkfirst(NULL, p); } arg2 = PTdifferentiate(p->left, varnum); newp = mkb(PT_TIMES, arg1, arg2); break; default: fprintf(stderr, "Internal error: bad node type %d\n", p->type); newp = NULL; break; } return mkfirst(newp, p); } static INPparseNode *mkcon(double value) { INPparseNode *p = TMALLOC(INPparseNode, 1); p->type = PT_CONSTANT; p->constant = value; p->usecnt = 0; return (p); } static INPparseNode *mkb(int type, INPparseNode * left, INPparseNode * right) { INPparseNode *p; int i; if ((right->type == PT_CONSTANT) && (left->type == PT_CONSTANT)) { double value; switch (type) { case PT_TIMES: value = left->constant * right->constant; return mkfirst(mkcon(value), mkfirst(left, right)); case PT_DIVIDE: value = left->constant / right->constant; return mkfirst(mkcon(value), mkfirst(left, right)); case PT_PLUS: value = left->constant + right->constant; return mkfirst(mkcon(value), mkfirst(left, right)); case PT_MINUS: value = left->constant - right->constant; return mkfirst(mkcon(value), mkfirst(left, right)); case PT_POWER: value = pow(left->constant, right->constant); return mkfirst(mkcon(value), mkfirst(left, right)); } } switch (type) { case PT_TIMES: if ((left->type == PT_CONSTANT) && (left->constant == 0)) return mkfirst(left, right); else if ((right->type == PT_CONSTANT) && (right->constant == 0)) return mkfirst(right, left); else if ((left->type == PT_CONSTANT) && (left->constant == 1)) return mkfirst(right, left); else if ((right->type == PT_CONSTANT) && (right->constant == 1)) return mkfirst(left, right); break; case PT_DIVIDE: if ((left->type == PT_CONSTANT) && (left->constant == 0)) return mkfirst(left, right); else if ((right->type == PT_CONSTANT) && (right->constant == 1)) return mkfirst(left, right); break; case PT_PLUS: if ((left->type == PT_CONSTANT) && (left->constant == 0)) return mkfirst(right, left); else if ((right->type == PT_CONSTANT) && (right->constant == 0)) return mkfirst(left, right); break; case PT_MINUS: if ((right->type == PT_CONSTANT) && (right->constant == 0)) return mkfirst(left, right); else if ((left->type == PT_CONSTANT) && (left->constant == 0)) return mkfirst(mkf(PTF_UMINUS, right), left); break; case PT_POWER: if (right->type == PT_CONSTANT) { if (right->constant == 0) return mkfirst(mkcon(1.0), mkfirst(left, right)); else if (right->constant == 1) return mkfirst(left, right); } break; case PT_TERN: if (left->type == PT_CONSTANT) { /*FIXME > 0.0, >= 0.5, != 0.0 or what ? */ p = (left->constant != 0.0) ? right->left : right->right; return mkfirst(p, mkfirst(right, left)); } if((right->left->type == PT_CONSTANT) && (right->right->type == PT_CONSTANT) && (right->left->constant == right->right->constant)) return mkfirst(right->left, mkfirst(right, left)); break; } p = TMALLOC(INPparseNode, 1); p->type = type; p->usecnt = 0; p->left = inc_usage(left); p->right = inc_usage(right); if(type == PT_TERN) { p->function = NULL; p->funcname = NULL; return (p); } for (i = 0; i < NUM_OPS; i++) if (ops[i].number == type) break; if (i == NUM_OPS) { fprintf(stderr, "Internal Error: bad type %d\n", type); return (NULL); } p->function = ops[i].funcptr; p->funcname = ops[i].name; return (p); } static INPparseNode *mkf(int type, INPparseNode * arg) { INPparseNode *p; int i; for (i = 0; i < NUM_FUNCS; i++) if (funcs[i].number == type) break; if (i == NUM_FUNCS) { fprintf(stderr, "Internal Error: bad type %d\n", type); return (NULL); } if (arg->type == PT_CONSTANT) { double constval = PTunary(funcs[i].funcptr) (arg->constant); return mkfirst(mkcon(constval), arg); } p = TMALLOC(INPparseNode, 1); p->type = PT_FUNCTION; p->usecnt = 0; p->left = inc_usage(arg); p->funcnum = i; p->function = funcs[i].funcptr; p->funcname = funcs[i].name; p->data = NULL; return (p); } /* Check for remaining PT_PLACEHOLDERs in the parse tree. Returns 1 if ok. */ static int PTcheck(INPparseNode * p) { switch (p->type) { case PT_PLACEHOLDER: return (0); case PT_TIME: case PT_TEMPERATURE: case PT_FREQUENCY: case PT_CONSTANT: case PT_VAR: return (1); case PT_FUNCTION: return (PTcheck(p->left)); case PT_PLUS: case PT_MINUS: case PT_TIMES: case PT_DIVIDE: case PT_POWER: case PT_COMMA: return (PTcheck(p->left) && PTcheck(p->right)); case PT_TERN: return (PTcheck(p->left) && PTcheck(p->right->left) && PTcheck(p->right->right)); default: fprintf(stderr, "Internal error: bad node type %d\n", p->type); return (0); } } /* Binop node. */ static INPparseNode *mkbnode(const char *opstr, INPparseNode * arg1, INPparseNode * arg2) { INPparseNode *p; int i; for (i = 0; i < NUM_OPS; i++) if (!strcmp(ops[i].name, opstr)) break; if (i == NUM_OPS) { fprintf(stderr, "Internal Error: no such op num %s\n", opstr); return mkfirst(NULL, mkfirst(arg1, arg2)); } p = TMALLOC(INPparseNode, 1); p->type = ops[i].number; p->usecnt = 0; p->funcname = ops[i].name; p->function = ops[i].funcptr; p->left = inc_usage(arg1); p->right = inc_usage(arg2); return (p); } /* * prepare_PTF_PWL() * for the PWL(expr, points...) function * collect the given points, which are expected to be given * literal constant * strip them from the INPparseNode * and pass them as an opaque struct alongside the * INPparseNode for the PWL(expr) function call * * Note: * the functionINPgetTree() is missing a recursive decending simplifier * as a consequence we can meet a PTF_UMINUS->PTF_CONSTANT * instead of a plain PTF_CONSTANT here * of course this can get arbitrarily more complex * for example PTF_TIMES -> PTF_CONSTANT, PTF_CONSTANT * etc. * currently we support only PFT_CONST and PTF_UMINUS->PTF_CONST */ #define Breakpoint do { __asm__ __volatile__ ("int $03"); } while(0) static INPparseNode *prepare_PTF_PWL(INPparseNode *p) { INPparseNode *w; struct pwldata { int n; double *vals; } *data; int i; if (p->funcnum != PTF_PWL) { fprintf(stderr, "PWL-INFO: %s, very unexpected\n", __func__); controlled_exit(1); } #ifdef TRACE fprintf(stderr, "PWL-INFO: %s building a PTF_PWL\n", __func__); #endif i = 0; for(w = p->left; w->type == PT_COMMA; w = w->left) i++; if (i<2 || (i%1)) { fprintf(stderr, "Error: PWL(expr, points...) needs an even and >=2 number of constant args\n"); return mkfirst(NULL, p); } data = TMALLOC(struct pwldata, 1); data->vals = TMALLOC(double, i); data->n = i; p->data = (void *) data; for (w = p->left ; --i >= 0 ; w = w->left) if (w->right->type == PT_CONSTANT) { data->vals[i] = w->right->constant; } else if (w->right->type == PT_FUNCTION && w->right->funcnum == PTF_UMINUS && w->right->left->type == PT_CONSTANT) { data->vals[i] = - w->right->left->constant; } else { fprintf(stderr, "PWL-ERROR: %s, not a constant\n", __func__); fprintf(stderr, " type = %d\n", w->right->type); //Breakpoint; fprintf(stderr, "Error: PWL(expr, points...) only *literal* points are supported\n"); return mkfirst(NULL, p); } #ifdef TRACE for (i = 0 ; i < data->n ; i += 2) fprintf(stderr, " (%lf %lf)\n", data->vals[i], data->vals[i+1]); #endif for (i = 2 ; i < data->n ; i += 2) if(data->vals[i-2] >= data->vals[i]) { fprintf(stderr, "Error: PWL(expr, points...) the abscissa of points must be ascending\n"); return mkfirst(NULL, p); } /* strip all but the first arg, * and attach the rest as opaque data to the INPparseNode */ w = inc_usage(w); dec_usage(p->left); p->left = w; return (p); } static INPparseNode *mkfnode(const char *fname, INPparseNode * arg) { int i; INPparseNode *p; char buf[128]; /* Make sure the case is ok. */ (void) strcpy(buf, fname); strtolower(buf); if(!strcmp("ternary_fcn", buf)) { if(arg->type == PT_COMMA && arg->left->type == PT_COMMA) { INPparseNode *arg1 = arg->left->left; INPparseNode *arg2 = arg->left->right; INPparseNode *arg3 = arg->right; p = TMALLOC(INPparseNode, 1); p->type = PT_TERN; p->usecnt = 0; p->left = inc_usage(arg1); p->right = inc_usage(mkb(PT_COMMA, arg2, arg3)); return mkfirst(p, arg); } fprintf(stderr, "Error: bogus ternary_fcn form\n"); return mkfirst(NULL, arg); } for (i = 0; i < NUM_FUNCS; i++) if (!strcmp(funcs[i].name, buf)) break; if (i == NUM_FUNCS) { fprintf(stderr, "Error: no such function '%s'\n", buf); return mkfirst(NULL, arg); } p = TMALLOC(INPparseNode, 1); p->type = PT_FUNCTION; p->usecnt = 0; p->left = inc_usage(arg); p->funcname = funcs[i].name; p->funcnum = funcs[i].number; p->function = funcs[i].funcptr; p->data = NULL; if(p->funcnum == PTF_PWL) p = prepare_PTF_PWL(p); return (p); } static INPparseNode *mkvnode(char *name) { INPparseNode *p = TMALLOC(INPparseNode, 1); int i; CKTnode *temp; INPtermInsert(circuit, &name, tables, &temp); for (i = 0; i < numvalues; i++) if ((types[i] == IF_NODE) && (values[i].nValue == temp)) break; if (i == numvalues) { if (numvalues) { values = TREALLOC(IFvalue, values, numvalues + 1); types = TREALLOC(int, types, numvalues + 1); } else { values = TMALLOC(IFvalue, 1); types = TMALLOC(int, 1); } values[i].nValue = temp; types[i] = IF_NODE; numvalues++; } p->valueIndex = i; p->type = PT_VAR; p->usecnt = 0; return (p); } static INPparseNode *mkinode(char *name) { INPparseNode *p = TMALLOC(INPparseNode, 1); int i; INPinsert(&name, tables); for (i = 0; i < numvalues; i++) if ((types[i] == IF_INSTANCE) && (values[i].uValue == name)) break; if (i == numvalues) { if (numvalues) { values = TREALLOC(IFvalue, values, numvalues + 1); types = TREALLOC(int, types, numvalues + 1); } else { values = TMALLOC(IFvalue, 1); types = TMALLOC(int, 1); } values[i].uValue = name; types[i] = IF_INSTANCE; numvalues++; } p->valueIndex = i; p->type = PT_VAR; p->usecnt = 0; return (p); } /* Number node. */ static INPparseNode *mknnode(double number) { struct INPparseNode *p; p = TMALLOC(INPparseNode, 1); p->type = PT_CONSTANT; p->usecnt = 0; p->constant = number; return (p); } /* String node. */ static INPparseNode *mksnode(const char *string, void *ckt) { int i, j; char buf[128]; INPparseNode *p; /* Make sure the case is ok. */ (void) strcpy(buf, string); strtolower(buf); p = TMALLOC(INPparseNode, 1); p->usecnt = 0; if(!strcmp("time", buf)) { p->type = PT_TIME; p->data = ckt; return p; } if(!strcmp("temper", buf)) { p->type = PT_TEMPERATURE; p->data = ckt; return p; } if(!strcmp("hertz", buf)) { p->type = PT_FREQUENCY; p->data = ckt; return p; } /* First see if it's something special. */ for (i = 0; i < ft_sim->numSpecSigs; i++) if (!strcmp(ft_sim->specSigs[i], buf)) break; if (i < ft_sim->numSpecSigs) { for (j = 0; j < numvalues; j++) if ((types[j] == IF_STRING) && !strcmp(buf, values[i].sValue)) break; if (j == numvalues) { if (numvalues) { values = TREALLOC(IFvalue, values, numvalues + 1); types = TREALLOC(int, types, numvalues + 1); } else { values = TMALLOC(IFvalue, 1); types = TMALLOC(int, 1); } values[i].sValue = TMALLOC(char, strlen(buf) + 1); strcpy(values[i].sValue, buf); types[i] = IF_STRING; numvalues++; } p->valueIndex = i; p->type = PT_VAR; return (p); } for (i = 0; i < NUM_CONSTANTS; i++) if (!strcmp(constants[i].name, buf)) break; if (i == NUM_CONSTANTS) { /* We'd better save this in case it's part of i(something). */ p->type = PT_PLACEHOLDER; p->funcname = copy(string); } else { p->type = PT_CONSTANT; p->constant = constants[i].value; } return (p); } /* The lexical analysis routine. */ int PTlex (YYSTYPE *lvalp, struct PTltype *llocp, char **line) { double td; int err; static char *specials = " \t()^+-*/,"; char *sbuf, *s; int token; sbuf = *line; #ifdef TRACE // printf("entering lexer, sbuf = '%s', lastoken = %d, lasttype = %d\n", // sbuf, lasttoken, lasttype); #endif while ((*sbuf == ' ') || (*sbuf == '\t')) sbuf++; llocp->start = sbuf; switch (*sbuf) { case '\0': token = 0; break; case '?': case ':': case ',': case '-': case '+': case '/': case '^': case '(': case ')': token = *sbuf++; break; case '*': if(sbuf[1] == '*') { sbuf += 2; token = '^'; /* `**' is exponentiation */ break; } else { token = *sbuf++; break; } case '&': if(sbuf[1] == '&') { sbuf += 2; token = TOK_AND; break; } else { token = *sbuf++; break; } case '|': if(sbuf[1] == '|') { sbuf += 2; token = TOK_OR; break; } else { token = *sbuf++; break; } case '=': if(sbuf[1] == '=') { sbuf += 2; token = TOK_EQ; break; } else { token = *sbuf++; break; } case '!': if(sbuf[1] == '=') { sbuf += 2; token = TOK_NE; break; } else { token = *sbuf++; break; } case '>': if(sbuf[1] == '=') { sbuf += 2; token = TOK_GE; break; } else { sbuf += 1; token = TOK_GT; break; } case '<': if(sbuf[1] == '>') { sbuf += 2; token = TOK_NE; break; } else if(sbuf[1] == '=') { sbuf += 2; token = TOK_LE; break; } else { sbuf += 1; token = TOK_LT; break; } default: { int n1 = -1; int n2 = -1; int n3 = -1; int n4 = -1; int n = -1; sscanf(sbuf, "%*1[vV] ( %n%*[^ \t,()]%n , %n%*[^ \t,()]%n )%n", &n1, &n2, &n3, &n4, &n); if(n != -1) { token = TOK_pnode; lvalp->pnode = mkb(PT_MINUS, mkvnode(copy_substring(sbuf+n1, sbuf+n2)), mkvnode(copy_substring(sbuf+n3, sbuf+n4))); sbuf += n; break; } } { int n1 = -1; int n2 = -1; int n = -1; sscanf(sbuf, "%*1[vV] ( %n%*[^ \t,()]%n )%n", &n1, &n2, &n); if(n != -1) { token = TOK_pnode; lvalp->pnode = mkvnode(copy_substring(sbuf+n1, sbuf+n2)); sbuf += n; break; } } { int n1 = -1; int n2 = -1; int n = -1; sscanf(sbuf, "%*1[iI] ( %n%*[^ \t,()]%n )%n", &n1, &n2, &n); if(n != -1) { token = TOK_pnode; lvalp->pnode = mkinode(copy_substring(sbuf+n1, sbuf+n2)); sbuf += n; break; } } td = INPevaluate(&sbuf, &err, 1); if (err == OK) { token = TOK_NUM; lvalp->num = td; } else { char *tmp; token = TOK_STR; for (s = sbuf; *s; s++) if (strchr(specials, *s)) break; tmp = TMALLOC(char, s - sbuf + 1); strncpy(tmp, sbuf, (size_t) (s - sbuf)); tmp[s - sbuf] = '\0'; lvalp->str = tmp; sbuf = s; } } *line = sbuf; #ifdef TRACE // printf("PTlexer: token = %d, type = %d, left = '%s'\n", // el.token, el.type, sbuf); */ #endif llocp->stop = sbuf; return (token); } void INPfreeTree(IFparseTree *ptree) { INPparseTree *pt = (INPparseTree *) ptree; int i; for (i = 0; i < pt->p.numVars; i++) dec_usage(pt->derivs[i]); dec_usage(pt->tree); txfree(pt->derivs); txfree(pt->p.varTypes); txfree(pt->p.vars); txfree(pt); } void free_tree(INPparseNode *pt) { if(!pt) return; if(pt->usecnt) { fprintf(stderr, "ERROR: fatal internal error, %s\n", __func__); controlled_exit(1); } switch (pt->type) { case PT_TIME: case PT_TEMPERATURE: case PT_FREQUENCY: case PT_CONSTANT: case PT_VAR: break; case PT_PLUS: case PT_MINUS: case PT_TIMES: case PT_DIVIDE: case PT_POWER: case PT_COMMA: case PT_TERN: dec_usage(pt->right); case PT_FUNCTION: dec_usage(pt->left); break; default: printf("oops"); break; } if(pt->type == PT_FUNCTION && pt->funcnum == PTF_PWL) { struct pwldata { int n; double *vals; } *data = (struct pwldata*)(pt->data); if(data) { txfree(data->vals); txfree(data); } } txfree(pt); } /* Debugging stuff. */ void INPptPrint(char *str, IFparseTree * ptree) { int i; printf("%s\n\t", str); printTree(((INPparseTree *) ptree)->tree); printf("\n"); for (i = 0; i < ptree->numVars; i++) { printf("d / d v%d : ", i); printTree(((INPparseTree *) ptree)->derivs[i]); printf("\n"); } return; } void printTree(INPparseNode * pt) { switch (pt->type) { case PT_TIME: printf("time(ckt = %p)", pt->data); break; case PT_TEMPERATURE: printf("temperature(ckt = %p)", pt->data); break; case PT_FREQUENCY: printf("frequency(ckt = %p)", pt->data); break; case PT_CONSTANT: printf("%g", pt->constant); break; case PT_VAR: printf("v%d", pt->valueIndex); break; case PT_PLUS: printf("("); printTree(pt->left); printf(") + ("); printTree(pt->right); printf(")"); break; case PT_MINUS: printf("("); printTree(pt->left); printf(") - ("); printTree(pt->right); printf(")"); break; case PT_TIMES: printf("("); printTree(pt->left); printf(") * ("); printTree(pt->right); printf(")"); break; case PT_DIVIDE: printf("("); printTree(pt->left); printf(") / ("); printTree(pt->right); printf(")"); break; case PT_POWER: printf("("); printTree(pt->left); printf(") ^ ("); printTree(pt->right); printf(")"); break; case PT_COMMA: printf("("); printTree(pt->left); printf(") , ("); printTree(pt->right); printf(")"); break; case PT_FUNCTION: printf("%s (", pt->funcname); printTree(pt->left); printf(")"); break; case PT_TERN: printf("ternary_fcn ("); printTree(pt->left); printf(") , ("); printTree(pt->right); printf(")"); break; default: printf("oops"); break; } return; } ngspice-26/src/spicelib/parser/inp2s.c0000644000265600020320000000570312264261473017312 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "inpxx.h" void INP2S(CKTcircuit *ckt, INPtables * tab, card * current) { /* Sname [] [IC] */ /* VOLTAGE CONTROLLED SWITCH */ int mytype; /* the type we determine resistors are */ int type; /* the type the model says it is */ char *line; /* the part of the current line left to parse */ char *name; /* the resistor's name */ char *model; /* the name of the resistor's model */ char *nname1; /* the first node's name */ char *nname2; /* the second node's name */ char *nname3; /* the third node's name */ char *nname4; /* the fourth node's name */ CKTnode *node1; /* the first node's node pointer */ CKTnode *node2; /* the second node's node pointer */ CKTnode *node3; /* the third node's node pointer */ CKTnode *node4; /* the fourth node's node pointer */ int error; /* error code temporary */ INPmodel *thismodel; /* pointer to model structure describing our model */ GENmodel *mdfast; /* pointer to the actual model */ GENinstance *fast; /* pointer to the actual instance */ int waslead; /* flag to indicate that funny unlabeled number was found */ double leadval; /* actual value of unlabeled number */ IFuid uid; /* uid of default model */ mytype = INPtypelook("Switch"); if (mytype < 0) { LITERR("Device type Switch not supported by this binary\n"); return; } line = current->line; INPgetTok(&line, &name, 1); INPinsert(&name, tab); INPgetNetTok(&line, &nname1, 1); INPtermInsert(ckt, &nname1, tab, &node1); INPgetNetTok(&line, &nname2, 1); INPtermInsert(ckt, &nname2, tab, &node2); INPgetNetTok(&line, &nname3, 1); INPtermInsert(ckt, &nname3, tab, &node3); INPgetNetTok(&line, &nname4, 1); INPtermInsert(ckt, &nname4, tab, &node4); INPgetTok(&line, &model, 1); INPinsert(&model, tab); current->error = INPgetMod(ckt, model, &thismodel, tab); if (thismodel != NULL) { if (mytype != thismodel->INPmodType) { LITERR("incorrect model type"); return; } type = mytype; mdfast = (thismodel->INPmodfast); } else { type = mytype; if (!tab->defSmod) { /* create deafult S model */ IFnewUid(ckt, &uid, NULL, "S", UID_MODEL, NULL); IFC(newModel, (ckt, type, &(tab->defSmod), uid)); } mdfast = tab->defSmod; } IFC(newInstance, (ckt, mdfast, &fast, name)); IFC(bindNode, (ckt, fast, 1, node1)); IFC(bindNode, (ckt, fast, 2, node2)); IFC(bindNode, (ckt, fast, 3, node3)); IFC(bindNode, (ckt, fast, 4, node4)); PARSECALL((&line, ckt, type, fast, &leadval, &waslead, tab)); if (waslead) { /* ignore a number */ } } ngspice-26/src/spicelib/parser/inppas1.h0000644000265600020320000000013312264261473017627 0ustar andreasadmin#ifndef ngspice_INPPAS1_H #define ngspice_INPPAS1_H #include "ngspice/inpdefs.h" #endif ngspice-26/src/spicelib/parser/inpaname.c0000644000265600020320000000462212264261473020046 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * INPaName() * * Take a parameter by Name and ask for the specified value * *dev is -1 if type unknown, otherwise, device type * **fast is a device, and will be set if possible. */ #include "ngspice/ngspice.h" #include #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/iferrmsg.h" #include "inpxx.h" int INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam, GENinstance **fast, IFsimulator * sim, int *dataType, IFvalue * selector) /* the name of the parameter to set */ /* the parameter union containing the value to set */ /* the circuit this device is a member of */ /* the device type code to the device being parsed */ /* the name of the device */ /* direct pointer to device being parsed */ /* the simulator data structure */ /* the datatype of the returned value structure */ /* data sub-selector for questions */ { int error; /* int to store evaluate error return codes in */ int i; /* find the instance - don't know about model, so use null there, * otherwise pass on as much info as we have about the device * (name, type, direct pointer) - the type and direct pointer * WILL be set on return unless error is not OK */ if (*fast == NULL) *fast = sim->findInstance (ckt, devnam); if (*fast == NULL) return (E_NODEV); *dev = (*fast)->GENmodPtr->GENmodType; /* now find the parameter - hunt through the parameter tables for * this device type and look for a name match of an 'ask'able * parameter. */ for (i = 0; i < *(sim->devices[*dev]->numInstanceParms); i++) { if (strcmp(parm, sim->devices[*dev]->instanceParms[i].keyword) == 0 && (sim->devices[*dev]->instanceParms[i].dataType & IF_ASK)) { /* found it, so we ask the question using the device info we got * above and put the results in the IFvalue structure our caller * gave us originally */ error = sim->askInstanceQuest (ckt, *fast, sim->devices[*dev]->instanceParms[i].id, val, selector); if (dataType) *dataType = sim->devices[*dev]->instanceParms[i].dataType; return (error); } } return (E_BADPARM); } ngspice-26/src/spicelib/parser/inptyplk.c0000644000265600020320000000255512264261473020133 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* look up the 'type' in the device description struct and return the * appropriate strchr for the device found, or -1 for not found */ #include "ngspice/ngspice.h" #include "ngspice/inpdefs.h" #include "ngspice/cpdefs.h" #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "inpxx.h" int INPtypelook(char *type) { int i; #ifdef TRACE /* SDB debug statement */ printf("In INPtypelook, examining model type = %s . . .\n", type); #endif for (i = 0; i < ft_sim->numDevices; i++) { #ifdef TRACE /* SDB debug statement */ if ((ft_sim->devices[i]) == NULL) printf("In INPtypelook, checking model type = %s against existing model = %s, . . .\n", type, "NULL"); else printf("In INPtypelook, checking model type = %s against existing model = %s, . . .\n", type, ft_sim->devices[i]->name); #endif if (ft_sim->devices[i] && strcmp(type, ft_sim->devices[i]->name) == 0) { /* found the device - return it */ #ifdef TRACE /* SDB debug statement */ printf("In INPtypelook, found the device -- returning it!!!\n"); #endif return i; } } #ifdef TRACE /* SDB debug statement */ printf("In INPtypelook, device not found!\n"); #endif return -1; } ngspice-26/src/spicelib/parser/inpptree-parser.c0000644000265600020320000016236112264261705021401 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 1 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 1 /* Substitute the variable and function names. */ #define yyparse PTparse #define yylex PTlex #define yyerror PTerror #define yylval PTlval #define yychar PTchar #define yydebug PTdebug #define yynerrs PTnerrs #define yylloc PTlloc /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "./inpptree-parser.y" /* * (compile (concat "bison " (file-relative-name buffer-file-name))) */ #include #include struct PTltype { char *start, *stop; }; # define YYLTYPE struct PTltype # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) { \ (Current).start = YYRHSLOC(Rhs, 1).start; \ (Current).stop = YYRHSLOC(Rhs, N).stop; \ } else { \ (Current).start = (Current).stop = YYRHSLOC(Rhs, 0).stop; \ } \ while (0) #include "inpptree-parser.h" extern int PTlex (YYSTYPE *lvalp, struct PTltype *llocp, char **line); extern int PTdebug; static void PTerror (YYLTYPE *locp, char **line, struct INPparseNode **retval, void *ckt, char const *); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif /* Line 268 of yacc.c */ #line 119 "inpptree-parser.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_NUM = 258, TOK_STR = 259, TOK_pnode = 260, TOK_LE = 261, TOK_LT = 262, TOK_GE = 263, TOK_GT = 264, TOK_EQ = 265, TOK_NE = 266, TOK_OR = 267, TOK_AND = 268, NEG = 269 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 53 "./inpptree-parser.y" double num; const char *str; struct INPparseNode *pnode; /* Line 293 of yacc.c */ #line 177 "inpptree-parser.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif #if ! defined YYLTYPE && ! defined YYLTYPE_IS_DECLARED typedef struct YYLTYPE { int first_line; int first_column; int last_line; int last_column; } YYLTYPE; # define yyltype YYLTYPE /* obsolescent; will be withdrawn */ # define YYLTYPE_IS_DECLARED 1 # define YYLTYPE_IS_TRIVIAL 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 202 "inpptree-parser.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL \ && defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; YYLTYPE yyls_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ + 2 * YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 13 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 144 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 26 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 4 /* YYNRULES -- Number of rules. */ #define YYNRULES 25 /* YYNRULES -- Number of states. */ #define YYNSTATES 50 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 269 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 21, 2, 2, 2, 2, 2, 2, 24, 25, 19, 18, 12, 17, 2, 20, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 14, 2, 2, 2, 2, 13, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 23, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 15, 16, 22 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 7, 9, 13, 17, 21, 25, 29, 33, 36, 41, 43, 49, 53, 57, 61, 65, 69, 73, 77, 81, 84, 86 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 27, 0, -1, 28, -1, 3, -1, 4, -1, 28, 18, 28, -1, 28, 17, 28, -1, 28, 19, 28, -1, 28, 20, 28, -1, 28, 23, 28, -1, 24, 28, 25, -1, 17, 28, -1, 4, 24, 29, 25, -1, 5, -1, 28, 13, 28, 14, 28, -1, 28, 10, 28, -1, 28, 11, 28, -1, 28, 9, 28, -1, 28, 7, 28, -1, 28, 8, 28, -1, 28, 6, 28, -1, 28, 15, 28, -1, 28, 16, 28, -1, 21, 28, -1, 28, -1, 29, 12, 28, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 87, 87, 96, 97, 99, 100, 101, 102, 103, 105, 107, 109, 111, 113, 118, 119, 120, 121, 122, 123, 125, 129, 133, 138, 139 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "TOK_NUM", "TOK_STR", "TOK_pnode", "TOK_LE", "TOK_LT", "TOK_GE", "TOK_GT", "TOK_EQ", "TOK_NE", "','", "'?'", "':'", "TOK_OR", "TOK_AND", "'-'", "'+'", "'*'", "'/'", "'!'", "NEG", "'^'", "'('", "')'", "$accept", "expression", "exp", "nonempty_arglist", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 44, 63, 58, 267, 268, 45, 43, 42, 47, 33, 269, 94, 40, 41 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 26, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 29, 29 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 1, 1, 3, 3, 3, 3, 3, 3, 2, 4, 1, 5, 3, 3, 3, 3, 3, 3, 3, 3, 2, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 3, 4, 13, 0, 0, 0, 0, 2, 0, 11, 23, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 0, 10, 20, 18, 19, 17, 15, 16, 0, 21, 22, 6, 5, 7, 8, 9, 0, 12, 0, 25, 14 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 7, 8, 29 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -19 static const yytype_int8 yypact[] = { 21, -19, -18, -19, 21, 21, 21, 8, 78, 21, -14, -14, 40, -19, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 78, 15, -19, 11, 11, 11, 11, 121, 121, 60, 96, 114, -16, -16, -14, -14, -19, 21, -19, 21, 78, 78 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -19, -19, -4, -19 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 10, 11, 12, 25, 26, 28, 9, 27, 13, 27, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 1, 2, 3, 45, 23, 24, 25, 26, 0, 0, 27, 0, 0, 0, 4, 0, 46, 48, 5, 49, 0, 6, 14, 15, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 26, 0, 0, 27, 0, 30, 14, 15, 16, 17, 18, 19, 0, 20, 47, 21, 22, 23, 24, 25, 26, 0, 0, 27, 14, 15, 16, 17, 18, 19, 0, 20, 0, 21, 22, 23, 24, 25, 26, 0, 0, 27, 14, 15, 16, 17, 18, 19, 0, 0, 0, 0, 22, 23, 24, 25, 26, 0, 0, 27, 14, 15, 16, 17, 18, 19, 0, 14, 15, 16, 17, 23, 24, 25, 26, 0, 0, 27, 23, 24, 25, 26, 0, 0, 27 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-19)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 4, 5, 6, 19, 20, 9, 24, 23, 0, 23, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 3, 4, 5, 12, 17, 18, 19, 20, -1, -1, 23, -1, -1, -1, 17, -1, 25, 45, 21, 47, -1, 24, 6, 7, 8, 9, 10, 11, -1, 13, -1, 15, 16, 17, 18, 19, 20, -1, -1, 23, -1, 25, 6, 7, 8, 9, 10, 11, -1, 13, 14, 15, 16, 17, 18, 19, 20, -1, -1, 23, 6, 7, 8, 9, 10, 11, -1, 13, -1, 15, 16, 17, 18, 19, 20, -1, -1, 23, 6, 7, 8, 9, 10, 11, -1, -1, -1, -1, 16, 17, 18, 19, 20, -1, -1, 23, 6, 7, 8, 9, 10, 11, -1, 6, 7, 8, 9, 17, 18, 19, 20, -1, -1, 23, 17, 18, 19, 20, -1, -1, 23 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 4, 5, 17, 21, 24, 27, 28, 24, 28, 28, 28, 0, 6, 7, 8, 9, 10, 11, 13, 15, 16, 17, 18, 19, 20, 23, 28, 29, 25, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 12, 25, 14, 28, 28 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (&yylloc, line, retval, ckt, YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* YY_LOCATION_PRINT -- Print the location on the stream. This macro was not mandated originally: define only if we know we won't break user code: when these are the locations we know. */ #ifndef YY_LOCATION_PRINT # if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL # define YY_LOCATION_PRINT(File, Loc) \ fprintf (File, "%d.%d-%d.%d", \ (Loc).first_line, (Loc).first_column, \ (Loc).last_line, (Loc).last_column) # else # define YY_LOCATION_PRINT(File, Loc) ((void) 0) # endif #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) #else # define YYLEX yylex (&yylval, &yylloc, line) #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value, Location, line, retval, ckt); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **line, struct INPparseNode **retval, void *ckt) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval, ckt) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; char **line; struct INPparseNode **retval; void *ckt; #endif { if (!yyvaluep) return; YYUSE (yylocationp); YYUSE (line); YYUSE (retval); YYUSE (ckt); # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep, YYLTYPE const * const yylocationp, char **line, struct INPparseNode **retval, void *ckt) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval, ckt) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; YYLTYPE const * const yylocationp; char **line; struct INPparseNode **retval; void *ckt; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); YY_LOCATION_PRINT (yyoutput, *yylocationp); YYFPRINTF (yyoutput, ": "); yy_symbol_value_print (yyoutput, yytype, yyvaluep, yylocationp, line, retval, ckt); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, YYLTYPE *yylsp, int yyrule, char **line, struct INPparseNode **retval, void *ckt) #else static void yy_reduce_print (yyvsp, yylsp, yyrule, line, retval, ckt) YYSTYPE *yyvsp; YYLTYPE *yylsp; int yyrule; char **line; struct INPparseNode **retval; void *ckt; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) , &(yylsp[(yyi + 1) - (yynrhs)]) , line, retval, ckt); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, yylsp, Rule, line, retval, ckt); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep, YYLTYPE *yylocationp, char **line, struct INPparseNode **retval, void *ckt) #else static void yydestruct (yymsg, yytype, yyvaluep, yylocationp, line, retval, ckt) const char *yymsg; int yytype; YYSTYPE *yyvaluep; YYLTYPE *yylocationp; char **line; struct INPparseNode **retval; void *ckt; #endif { YYUSE (yyvaluep); YYUSE (yylocationp); YYUSE (line); YYUSE (retval); YYUSE (ckt); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (char **line, struct INPparseNode **retval, void *ckt); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (char **line, struct INPparseNode **retval, void *ckt) #else int yyparse (line, retval, ckt) char **line; struct INPparseNode **retval; void *ckt; #endif #endif { /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Location data for the lookahead symbol. */ YYLTYPE yylloc; /* Number of syntax errors so far. */ int yynerrs; int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. `yyls': related to locations. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; /* The location stack. */ YYLTYPE yylsa[YYINITDEPTH]; YYLTYPE *yyls; YYLTYPE *yylsp; /* The locations where the error started and ended. */ YYLTYPE yyerror_range[3]; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; YYLTYPE yyloc; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N), yylsp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yyls = yylsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; yylsp = yyls; #if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL /* Initialize the default location before parsing starts. */ yylloc.first_line = yylloc.last_line = 1; yylloc.first_column = yylloc.last_column = 1; #endif /* User initialization code. */ /* Line 1590 of yacc.c */ #line 80 "./inpptree-parser.y" { yylval.num = 0.0; yylloc.start = yylloc.stop = NULL; } /* Line 1590 of yacc.c */ #line 1362 "inpptree-parser.c" yyvsp[0] = yylval; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; YYLTYPE *yyls1 = yyls; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yyls1, yysize * sizeof (*yylsp), &yystacksize); yyls = yyls1; yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); YYSTACK_RELOCATE (yyls_alloc, yyls); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; yylsp = yyls + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; *++yylsp = yylloc; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; /* Default location. */ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1806 of yacc.c */ #line 88 "./inpptree-parser.y" { *retval = (yyvsp[(1) - (1)].pnode); *line = (yylsp[(1) - (1)]).stop; YYACCEPT; } break; case 3: /* Line 1806 of yacc.c */ #line 96 "./inpptree-parser.y" { (yyval.pnode) = mknnode((yyvsp[(1) - (1)].num)); } break; case 4: /* Line 1806 of yacc.c */ #line 97 "./inpptree-parser.y" { (yyval.pnode) = mksnode((yyvsp[(1) - (1)].str), ckt); txfree((void*)(yyvsp[(1) - (1)].str)); } break; case 5: /* Line 1806 of yacc.c */ #line 99 "./inpptree-parser.y" { (yyval.pnode) = mkbnode("+", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 6: /* Line 1806 of yacc.c */ #line 100 "./inpptree-parser.y" { (yyval.pnode) = mkbnode("-", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 7: /* Line 1806 of yacc.c */ #line 101 "./inpptree-parser.y" { (yyval.pnode) = mkbnode("*", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 8: /* Line 1806 of yacc.c */ #line 102 "./inpptree-parser.y" { (yyval.pnode) = mkbnode("/", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 9: /* Line 1806 of yacc.c */ #line 103 "./inpptree-parser.y" { (yyval.pnode) = mkbnode("^", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; case 10: /* Line 1806 of yacc.c */ #line 105 "./inpptree-parser.y" { (yyval.pnode) = (yyvsp[(2) - (3)].pnode); } break; case 11: /* Line 1806 of yacc.c */ #line 107 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("-",(yyvsp[(2) - (2)].pnode)); } break; case 12: /* Line 1806 of yacc.c */ #line 109 "./inpptree-parser.y" { (yyval.pnode) = mkfnode((yyvsp[(1) - (4)].str), (yyvsp[(3) - (4)].pnode)); txfree((void*)(yyvsp[(1) - (4)].str)); } break; case 14: /* Line 1806 of yacc.c */ #line 113 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("ternary_fcn", mkbnode(",", mkbnode(",", (yyvsp[(1) - (5)].pnode), (yyvsp[(3) - (5)].pnode)), (yyvsp[(5) - (5)].pnode))); } break; case 15: /* Line 1806 of yacc.c */ #line 118 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("eq0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 16: /* Line 1806 of yacc.c */ #line 119 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("ne0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 17: /* Line 1806 of yacc.c */ #line 120 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("gt0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 18: /* Line 1806 of yacc.c */ #line 121 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("lt0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 19: /* Line 1806 of yacc.c */ #line 122 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("ge0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 20: /* Line 1806 of yacc.c */ #line 123 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("le0", mkbnode("-",(yyvsp[(1) - (3)].pnode),(yyvsp[(3) - (3)].pnode))); } break; case 21: /* Line 1806 of yacc.c */ #line 125 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("ne0", mkbnode("+", mkfnode("ne0", (yyvsp[(1) - (3)].pnode)), mkfnode("ne0", (yyvsp[(3) - (3)].pnode)))); } break; case 22: /* Line 1806 of yacc.c */ #line 129 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("eq0", mkbnode("+", mkfnode("eq0", (yyvsp[(1) - (3)].pnode)), mkfnode("eq0", (yyvsp[(3) - (3)].pnode)))); } break; case 23: /* Line 1806 of yacc.c */ #line 133 "./inpptree-parser.y" { (yyval.pnode) = mkfnode("eq0", (yyvsp[(2) - (2)].pnode)); } break; case 25: /* Line 1806 of yacc.c */ #line 139 "./inpptree-parser.y" { (yyval.pnode) = mkbnode(",", (yyvsp[(1) - (3)].pnode), (yyvsp[(3) - (3)].pnode)); } break; /* Line 1806 of yacc.c */ #line 1717 "inpptree-parser.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; *++yylsp = yyloc; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (&yylloc, line, retval, ckt, YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (&yylloc, line, retval, ckt, yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } yyerror_range[1] = yylloc; if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval, &yylloc, line, retval, ckt); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; yyerror_range[1] = yylsp[1-yylen]; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yyerror_range[1] = *yylsp; yydestruct ("Error: popping", yystos[yystate], yyvsp, yylsp, line, retval, ckt); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; yyerror_range[2] = yylloc; /* Using YYLLOC is tempting, but would change the location of the lookahead. YYLOC is available though. */ YYLLOC_DEFAULT (yyloc, yyerror_range, 2); *++yylsp = yyloc; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (&yylloc, line, retval, ckt, YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval, &yylloc, line, retval, ckt); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp, yylsp, line, retval, ckt); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 141 "./inpptree-parser.y" /* Called by yyparse on error. */ static void PTerror (YYLTYPE *locp, char **line, struct INPparseNode **retval, void *ckt, char const *s) { NG_IGNORE(locp); NG_IGNORE(line); NG_IGNORE(retval); NG_IGNORE(ckt); fprintf (stderr, "%s: %s\n", __func__, s); } ngspice-26/src/spicelib/parser/ptfuncs.c0000644000265600020320000001112612264261473017735 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * All the functions used in the parse tree. These functions return HUGE * if their argument is out of range. */ #include "ngspice/ngspice.h" #include #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/inpptree.h" #include "inpxx.h" /* XXX These should be in math.h */ double PTfudge_factor; #define MODULUS(NUM,LIMIT) ((NUM) - ((int) ((NUM) / (LIMIT))) * (LIMIT)) double PTabs(double arg) { return arg >= 0.0 ? arg : -arg; } double PTsgn(double arg) { return arg > 0.0 ? 1.0 : arg < 0.0 ? -1.0 : 0.0; } double PTplus(double arg1, double arg2) { return (arg1 + arg2); } double PTminus(double arg1, double arg2) { return (arg1 - arg2); } double PTtimes(double arg1, double arg2) { return (arg1 * arg2); } double PTdivide(double arg1, double arg2) { if (arg2 >= 0.0) arg2 += PTfudge_factor; else arg2 -= PTfudge_factor; if (arg2 == 0.0) return (HUGE); return (arg1 / arg2); } double PTpower(double arg1, double arg2) { if (arg1 < 0.0) { if (fabs(arg2 - ((int) arg2)) / (arg2 + 0.001) < 0.000001) { arg2 = (int) arg2; } else { arg1 = -arg1; } } return (pow(arg1, arg2)); } double PTpwr(double arg1, double arg2) { if (arg1 < 0.0) return (-pow(-arg1, arg2)); else return (pow(arg1, arg2)); } double PTmin(double arg1, double arg2) { return arg1 > arg2 ? arg2 : arg1; } double PTmax(double arg1, double arg2) { return arg1 > arg2 ? arg1 : arg2; } double PTacos(double arg) { return (acos(arg)); } double PTacosh(double arg) { return (acosh(arg)); } double PTasin(double arg) { return (asin(arg)); } double PTasinh(double arg) { return (asinh(arg)); } double PTatan(double arg) { return (atan(arg)); } double PTatanh(double arg) { return (atanh(arg)); } double PTustep(double arg) { if (arg < 0.0) return 0.0; else if (arg > 0.0) return 1.0; else return 0.5; /* Ick! */ } /* MW. PTcif is like "C" if - 0 for (arg<=0), 1 elsewhere */ double PTustep2(double arg) { if (arg <= 0.0) return 0.0; else if (arg <= 1.0) return arg; else /* if (arg > 1.0) */ return 1.0; } double PTeq0(double arg) { return (arg == 0.0) ? 1.0 : 0.0; } double PTne0(double arg) { return (arg != 0.0) ? 1.0 : 0.0; } double PTgt0(double arg) { return (arg > 0.0) ? 1.0 : 0.0; } double PTlt0(double arg) { return (arg < 0.0) ? 1.0 : 0.0; } double PTge0(double arg) { return (arg >= 0.0) ? 1.0 : 0.0; } double PTle0(double arg) { return (arg <= 0.0) ? 1.0 : 0.0; } double PTuramp(double arg) { if (arg < 0.0) return 0.0; else return arg; } double PTcos(double arg) { return (cos(MODULUS(arg, 2 * M_PI))); } double PTcosh(double arg) { return (cosh(arg)); } double PTexp(double arg) { return (exp(arg)); } double PTln(double arg) { if (arg < 0.0) return (HUGE); return (log(arg)); } double PTlog(double arg) { if (arg < 0.0) return (HUGE); return (log10(arg)); } double PTsin(double arg) { return (sin(MODULUS(arg, 2 * M_PI))); } double PTsinh(double arg) { return (sinh(arg)); } double PTsqrt(double arg) { if (arg < 0.0) return (HUGE); return (sqrt(arg)); } double PTtan(double arg) { return (tan(MODULUS(arg, M_PI))); } double PTtanh(double arg) { return (tanh(arg)); } double PTuminus(double arg) { return (- arg); } double PTpwl(double arg, void *data) { struct pwldata { int n; double *vals; } *thing = (struct pwldata *) data; double y; int k0 = 0; int k1 = thing->n/2 - 1; while(k1-k0 > 1) { int k = (k0+k1)/2; if(thing->vals[2*k] > arg) k1 = k; else k0 = k; } y = thing->vals[2*k0+1] + (thing->vals[2*k1+1] - thing->vals[2*k0+1]) * (arg - thing->vals[2*k0]) / (thing->vals[2*k1] - thing->vals[2*k0]); return y; } double PTpwl_derivative(double arg, void *data) { struct pwldata { int n; double *vals; } *thing = (struct pwldata *) data; double y; int k0 = 0; int k1 = thing->n/2 - 1; while(k1-k0 > 1) { int k = (k0+k1)/2; if(thing->vals[2*k] > arg) k1 = k; else k0 = k; } y = (thing->vals[2*k1+1] - thing->vals[2*k0+1]) / (thing->vals[2*k1] - thing->vals[2*k0]); return y; } double PTceil(double arg1) { return (ceil(arg1)); } double PTfloor(double arg1) { return (floor(arg1)); } ngspice-26/src/spicelib/parser/inpptree-parser.y0000644000265600020320000001065212264261473021424 0ustar andreasadmin%{ /* * (compile (concat "bison " (file-relative-name buffer-file-name))) */ #include #include struct PTltype { char *start, *stop; }; # define YYLTYPE struct PTltype # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (N) { \ (Current).start = YYRHSLOC(Rhs, 1).start; \ (Current).stop = YYRHSLOC(Rhs, N).stop; \ } else { \ (Current).start = (Current).stop = YYRHSLOC(Rhs, 0).stop; \ } \ while (0) #include "inpptree-parser.h" extern int PTlex (YYSTYPE *lvalp, struct PTltype *llocp, char **line); extern int PTdebug; static void PTerror (YYLTYPE *locp, char **line, struct INPparseNode **retval, void *ckt, char const *); #if defined (_MSC_VER) # define __func__ __FUNCTION__ /* __func__ is C99, but MSC can't */ #endif %} %name-prefix="PT" %output="inpptree-parser.c" %defines %pure-parser %parse-param {char **line} %lex-param {char **line} %parse-param {struct INPparseNode **retval} %parse-param {void *ckt} %union { double num; const char *str; struct INPparseNode *pnode; } %token TOK_NUM %token TOK_STR %token TOK_pnode %token TOK_LE TOK_LT TOK_GE TOK_GT TOK_EQ TOK_NE %type exp nonempty_arglist // Operator Precedence %left ',' %right '?' ':' %left TOK_OR %left TOK_AND %left TOK_EQ TOK_NE %left TOK_LE TOK_LT TOK_GE TOK_GT %left '-' '+' %left '*' '/' %left NEG '!' /* negation--unary minus, and boolean not */ %left '^' /* exponentiation */ %initial-action /* initialize yylval */ { $$.num = 0.0; yylloc.start = yylloc.stop = NULL; }; %% expression: exp { *retval = $1; *line = @1.stop; YYACCEPT; } exp: TOK_NUM { $$ = mknnode($1); } | TOK_STR { $$ = mksnode($1, ckt); txfree((void*)$1); } | exp '+' exp { $$ = mkbnode("+", $1, $3); } | exp '-' exp { $$ = mkbnode("-", $1, $3); } | exp '*' exp { $$ = mkbnode("*", $1, $3); } | exp '/' exp { $$ = mkbnode("/", $1, $3); } | exp '^' exp { $$ = mkbnode("^", $1, $3); } | '(' exp ')' { $$ = $2; } | '-' exp %prec NEG { $$ = mkfnode("-",$2); } | TOK_STR '(' nonempty_arglist ')' { $$ = mkfnode($1, $3); txfree((void*)$1); } | TOK_pnode | exp '?' exp ':' exp { $$ = mkfnode("ternary_fcn", mkbnode(",", mkbnode(",", $1, $3), $5)); } | exp TOK_EQ exp { $$ = mkfnode("eq0", mkbnode("-",$1,$3)); } | exp TOK_NE exp { $$ = mkfnode("ne0", mkbnode("-",$1,$3)); } | exp TOK_GT exp { $$ = mkfnode("gt0", mkbnode("-",$1,$3)); } | exp TOK_LT exp { $$ = mkfnode("lt0", mkbnode("-",$1,$3)); } | exp TOK_GE exp { $$ = mkfnode("ge0", mkbnode("-",$1,$3)); } | exp TOK_LE exp { $$ = mkfnode("le0", mkbnode("-",$1,$3)); } | exp TOK_OR exp { $$ = mkfnode("ne0", mkbnode("+", mkfnode("ne0", $1), mkfnode("ne0", $3))); } | exp TOK_AND exp { $$ = mkfnode("eq0", mkbnode("+", mkfnode("eq0", $1), mkfnode("eq0", $3))); } | '!' exp { $$ = mkfnode("eq0", $2); } ; nonempty_arglist: exp | nonempty_arglist ',' exp { $$ = mkbnode(",", $1, $3); } %% /* Called by yyparse on error. */ static void PTerror (YYLTYPE *locp, char **line, struct INPparseNode **retval, void *ckt, char const *s) { NG_IGNORE(locp); NG_IGNORE(line); NG_IGNORE(retval); NG_IGNORE(ckt); fprintf (stderr, "%s: %s\n", __func__, s); } ngspice-26/src/ngproc2mod.c0000644000265600020320000003213512264261473015242 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* convert .process file to set of .model cards */ #include "ngspice/ngspice.h" #include #include #include "ngspice/inpdefs.h" #include "ngspice/suffix.h" void getdata(double*,int,int); typedef struct snmod { struct snmod *nnext; char *nname; double nparms[69]; } nmod; typedef struct spmod { struct spmod *pnext; char *pname; double pparms[69]; } pmod; typedef struct sdmod { struct sdmod *dnext; char *dname; double dparms[10]; } dmod; typedef struct symod { struct symod *ynext; char *yname; double yparms[10]; } ymod; typedef struct smmod { struct smmod *mnext; char *mname; double mparms[10]; } mmod; FILE *m = NULL; FILE *p = NULL; char *dataline; int main(void) { char *typeline; char *prname; nmod *nlist=NULL,*ncur; pmod *plist=NULL,*pcur; dmod *dlist=NULL,*dcur; ymod *ylist=NULL,*ycur; mmod *mlist=NULL,*mcur; char *filename; filename = TMALLOC(char, 1024); typeline = TMALLOC(char, 1024); dataline = TMALLOC(char, 1024); while(p == NULL) { printf("name of process file (input): "); if(scanf("%s",filename)!=1) { printf("error reading process file name\n"); exit(1); } p = fopen(filename,"r"); if(p==NULL) { printf("can't open %s:",filename); perror(""); } } while(m == NULL) { printf("name of .model file (output): "); if(scanf("%s",filename)!=1) { printf("error reading model file name\n"); exit(1); } m = fopen(filename,"w"); if(m==NULL) { printf("can't open %s:",filename); perror(""); } } printf("process name : "); if(scanf("%s",filename)!=1) { printf("error reading process name\n"); exit(1); } prname = filename; if(fgets(typeline,1023,p)==NULL) { printf("error reading input description line\n"); exit(1); } INPcaseFix(typeline); for (;;) { while(*typeline == ' ' || *typeline == '\t' || *typeline == ',' || *typeline == '\n' ) { typeline ++; } if(*typeline == 0) break; if(strncmp("nm",typeline,2) == 0) { ncur = TMALLOC(nmod, 1); ncur->nnext = NULL; ncur->nname = typeline; typeline[3] = '\0'; typeline += 4; getdata(ncur->nparms,69,3); ncur->nnext = nlist; nlist = ncur; } else if(strncmp("pm",typeline,2) == 0) { pcur = TMALLOC(pmod, 1); pcur->pnext = NULL; pcur->pname = typeline; typeline[3] = '\0'; typeline += 4; getdata(pcur->pparms,69,3); pcur->pnext = plist; plist = pcur; } else if(strncmp("py",typeline,2) == 0) { ycur = TMALLOC(ymod, 1); ycur->ynext = NULL; ycur->yname = typeline; typeline[3] = '\0'; typeline += 4; getdata(ycur->yparms,10,5); ycur->ynext = ylist; ylist = ycur; } else if(strncmp("du",typeline,2) == 0) { dcur = TMALLOC(dmod, 1); dcur->dnext = NULL; dcur->dname = typeline; typeline[3] = '\0'; typeline += 4; getdata(dcur->dparms,10,5); dcur->dnext = dlist; dlist = dcur; } else if(strncmp("ml",typeline,2) == 0) { mcur = TMALLOC(mmod, 1); mcur->mnext = NULL; mcur->mname = typeline; typeline[3] = '\0'; typeline += 4; getdata(mcur->mparms,10,5); mcur->mnext = mlist; mlist = mcur; } else { printf(" illegal header line in process file: run terminated\n"); printf(" error occurred while parsing %s\n",typeline); exit(1); } } for(dcur=dlist;dcur;dcur=dcur->dnext) { fprintf(m,".model %s_%s r rsh = %g defw = %g narrow = %g\n", prname,dcur->dname,dcur->dparms[0],dcur->dparms[8],dcur->dparms[9]); fprintf(m,".model %s_%s c cj = %g cjsw = %g defw = %g narrow = %g\n", prname,dcur->dname,dcur->dparms[1],dcur->dparms[2],dcur->dparms[8], dcur->dparms[9]); } for(ycur=ylist;ycur;ycur=ycur->ynext) { fprintf(m,".model %s_%s r rsh = %g defw = %g narrow = %g\n", prname,ycur->yname,ycur->yparms[0],ycur->yparms[8],ycur->yparms[9]); fprintf(m,".model %s_%s c cj = %g cjsw = %g defw = %g narrow = %g\n", prname,ycur->yname,ycur->yparms[1],ycur->yparms[2],ycur->yparms[8], ycur->yparms[9]); } for(mcur=mlist;mcur;mcur=mcur->mnext) { fprintf(m,".model %s_%s r rsh = %g defw = %g narrow = %g\n", prname,mcur->mname,mcur->mparms[0],mcur->mparms[8],mcur->mparms[9]); fprintf(m,".model %s_%s c cj = %g cjsw = %g defw = %g narrow = %g\n", prname,mcur->mname,mcur->mparms[1],mcur->mparms[2],mcur->mparms[8], mcur->mparms[9]); } for(pcur=plist;pcur;pcur=pcur->pnext) { for(dcur=dlist;dcur;dcur=dcur->dnext) { fprintf(m,".model %s_%s_%s pmos level=4\n",prname,pcur->pname, dcur->dname); fprintf(m,"+ vfb = %g lvfb = %g wvfb = %g\n", pcur->pparms[0],pcur->pparms[1],pcur->pparms[2]); fprintf(m,"+ phi = %g lphi = %g wphi = %g\n", pcur->pparms[3],pcur->pparms[4],pcur->pparms[5]); fprintf(m,"+ k1 = %g lk1 = %g wk1 = %g\n", pcur->pparms[6],pcur->pparms[7],pcur->pparms[8]); fprintf(m,"+ k2 = %g lk2 = %g wk2 = %g\n", pcur->pparms[9],pcur->pparms[10],pcur->pparms[11]); fprintf(m,"+ eta = %g leta = %g weta = %g\n", pcur->pparms[12],pcur->pparms[13],pcur->pparms[14]); fprintf(m,"+ muz = %g dl = %g dw = %g\n", pcur->pparms[15],pcur->pparms[16],pcur->pparms[17]); fprintf(m,"+ u0 = %g lu0 = %g wu0 = %g\n", pcur->pparms[18],pcur->pparms[19],pcur->pparms[20]); fprintf(m,"+ u1 = %g lu1 = %g wu1 = %g\n", pcur->pparms[21],pcur->pparms[22],pcur->pparms[23]); fprintf(m,"+ x2mz = %g lx2mz = %g wx2mz = %g\n", pcur->pparms[24],pcur->pparms[25],pcur->pparms[26]); fprintf(m,"+ x2e = %g lx2e = %g wx2e = %g\n", pcur->pparms[27],pcur->pparms[28],pcur->pparms[29]); fprintf(m,"+ x3e = %g lx3e = %g wx3e = %g\n", pcur->pparms[30],pcur->pparms[31],pcur->pparms[32]); fprintf(m,"+ x2u0 = %g lx2u0 = %g wx2u0 = %g\n", pcur->pparms[33],pcur->pparms[34],pcur->pparms[35]); fprintf(m,"+ x2u1 = %g lx2u1 = %g wx2u1 = %g\n", pcur->pparms[36],pcur->pparms[37],pcur->pparms[38]); fprintf(m,"+ mus = %g lmus = %g wmus = %g\n", pcur->pparms[39],pcur->pparms[40],pcur->pparms[41]); fprintf(m,"+ x2ms = %g lx2ms = %g wx2ms = %g\n", pcur->pparms[42],pcur->pparms[43],pcur->pparms[44]); fprintf(m,"+ x3ms = %g lx3ms = %g wx3ms = %g\n", pcur->pparms[45],pcur->pparms[46],pcur->pparms[47]); fprintf(m,"+ x3u1 = %g lx3u1 = %g wx3u1 = %g\n", pcur->pparms[48],pcur->pparms[49],pcur->pparms[50]); fprintf(m,"+ tox = %g temp = %g vdd = %g\n", pcur->pparms[51],pcur->pparms[52],pcur->pparms[53]); fprintf(m,"+ cgdo = %g cgso = %g cgbo = %g\n", pcur->pparms[54],pcur->pparms[55],pcur->pparms[56]); fprintf(m,"+ xpart = %g \n", pcur->pparms[57]); fprintf(m,"+ n0 = %g ln0 = %g wn0 = %g\n", pcur->pparms[60],pcur->pparms[61],pcur->pparms[62]); fprintf(m,"+ nb = %g lnb = %g wnb = %g\n", pcur->pparms[63],pcur->pparms[64],pcur->pparms[65]); fprintf(m,"+ nd = %g lnd = %g wnd = %g\n", pcur->pparms[66],pcur->pparms[67],pcur->pparms[68]); fprintf(m,"+ rsh = %g cj = %g cjsw = %g\n", dcur->dparms[0], dcur->dparms[1], dcur->dparms[2]); fprintf(m,"+ js = %g pb = %g pbsw = %g\n", dcur->dparms[3], dcur->dparms[4], dcur->dparms[5]); fprintf(m,"+ mj = %g mjsw = %g wdf = %g\n", dcur->dparms[6], dcur->dparms[7], dcur->dparms[8]); fprintf(m,"+ dell = %g\n", dcur->dparms[9]); } } for(ncur=nlist;ncur;ncur=ncur->nnext) { for(dcur=dlist;dcur;dcur=dcur->dnext) { fprintf(m,".model %s_%s_%s nmos level=4\n",prname,ncur->nname, dcur->dname); fprintf(m,"+ vfb = %g lvfb = %g wvfb = %g\n", ncur->nparms[0],ncur->nparms[1],ncur->nparms[2]); fprintf(m,"+ phi = %g lphi = %g wphi = %g\n", ncur->nparms[3],ncur->nparms[4],ncur->nparms[5]); fprintf(m,"+ k1 = %g lk1 = %g wk1 = %g\n", ncur->nparms[6],ncur->nparms[7],ncur->nparms[8]); fprintf(m,"+ k2 = %g lk2 = %g wk2 = %g\n", ncur->nparms[9],ncur->nparms[10],ncur->nparms[11]); fprintf(m,"+ eta = %g leta = %g weta = %g\n", ncur->nparms[12],ncur->nparms[13],ncur->nparms[14]); fprintf(m,"+ muz = %g dl = %g dw = %g\n", ncur->nparms[15],ncur->nparms[16],ncur->nparms[17]); fprintf(m,"+ u0 = %g lu0 = %g wu0 = %g\n", ncur->nparms[18],ncur->nparms[19],ncur->nparms[20]); fprintf(m,"+ u1 = %g lu1 = %g wu1 = %g\n", ncur->nparms[21],ncur->nparms[22],ncur->nparms[23]); fprintf(m,"+ x2mz = %g lx2mz = %g wx2mz = %g\n", ncur->nparms[24],ncur->nparms[25],ncur->nparms[26]); fprintf(m,"+ x2e = %g lx2e = %g wx2e = %g\n", ncur->nparms[27],ncur->nparms[28],ncur->nparms[29]); fprintf(m,"+ x3e = %g lx3e = %g wx3e = %g\n", ncur->nparms[30],ncur->nparms[31],ncur->nparms[32]); fprintf(m,"+ x2u0 = %g lx2u0 = %g wx2u0 = %g\n", ncur->nparms[33],ncur->nparms[34],ncur->nparms[35]); fprintf(m,"+ x2u1 = %g lx2u1 = %g wx2u1 = %g\n", ncur->nparms[36],ncur->nparms[37],ncur->nparms[38]); fprintf(m,"+ mus = %g lmus = %g wmus = %g\n", ncur->nparms[39],ncur->nparms[40],ncur->nparms[41]); fprintf(m,"+ x2ms = %g lx2ms = %g wx2ms = %g\n", ncur->nparms[42],ncur->nparms[43],ncur->nparms[44]); fprintf(m,"+ x3ms = %g lx3ms = %g wx3ms = %g\n", ncur->nparms[45],ncur->nparms[46],ncur->nparms[47]); fprintf(m,"+ x3u1 = %g lx3u1 = %g wx3u1 = %g\n", ncur->nparms[48],ncur->nparms[49],ncur->nparms[50]); fprintf(m,"+ tox = %g temp = %g vdd = %g\n", ncur->nparms[51],ncur->nparms[52],ncur->nparms[53]); fprintf(m,"+ cgdo = %g cgso = %g cgbo = %g\n", ncur->nparms[54],ncur->nparms[55],ncur->nparms[56]); fprintf(m,"+ xpart = %g \n", ncur->nparms[57]); fprintf(m,"+ n0 = %g ln0 = %g wn0 = %g\n", ncur->nparms[60],ncur->nparms[61],ncur->nparms[62]); fprintf(m,"+ nb = %g lnb = %g wnb = %g\n", ncur->nparms[63],ncur->nparms[64],ncur->nparms[65]); fprintf(m,"+ nd = %g lnd = %g wnd = %g\n", ncur->nparms[66],ncur->nparms[67],ncur->nparms[68]); fprintf(m,"+ rsh = %g cj = %g cjsw = %g\n", dcur->dparms[0], dcur->dparms[1], dcur->dparms[2]); fprintf(m,"+ js = %g pb = %g pbsw = %g\n", dcur->dparms[3], dcur->dparms[4], dcur->dparms[5]); fprintf(m,"+ mj = %g mjsw = %g wdf = %g\n", dcur->dparms[6], dcur->dparms[7], dcur->dparms[8]); fprintf(m,"+ dell = %g\n", dcur->dparms[9]); } } return EXIT_NORMAL; } void getdata(double *vals, int count, int width) /* width: maximum number of values to accept per line */ { int i; int error; int start; char *c; do { if(fgets(dataline,1023,p)==NULL) { printf("premature end of file getting input data line\n"); exit(1); } start=0; } while (*dataline == '*') ; c = dataline; for(i=0;iwidth)) { /* end of line, so read another one */ do { if(fgets(dataline,1023,p)==NULL) { printf("premature end of file reading input data line \n"); exit(1); } start=0; } while (*dataline == '*') ; c = dataline; goto retry; } } } ngspice-26/src/sharedspice.c0000644000265600020320000014474112264261473015471 0ustar andreasadmin/* Copyright 2013 Holger Vogt * * Modified BSD license */ /* For comments and explanations see sharedspice.h */ /*******************/ /* Defines */ /*******************/ #ifdef _MSC_VER #define SHAREDSPICE_version "25.1" #define STDIN_FILENO 0 #define STDOUT_FILENO 1 #define STDERR_FILENO 2 #endif /* If a calling function has high latency times during printing, causing memory access errors, you may undef the following line. Printing messages are assembled in a wordlist, and sent to the caller via a new thread. Delays may occur. */ #define low_latency /**********************************************************************/ /* Header files for C functions */ /**********************************************************************/ #include #include /* workaround since fputs, putc are replaced by sh_fputs, sh_putc, through redefinition in ngspice.h */ int myputs(const char* inp, FILE* f); int myputc(int inp, FILE* f); int myfputc(int inp, FILE* f); int myputs(const char* inp, FILE* f) { return fputs(inp, f); } int myputc(int inp, FILE* f) { return putc(inp, f); } int myfputc(int inp, FILE* f) { return fputc(inp, f); } #if defined(__MINGW32__) || defined(_MSC_VER) #include #endif #include "ngspice/ngspice.h" #include "misc/misc_time.h" /*Use Windows threads if on W32 without pthreads*/ #ifndef HAVE_LIBPTHREAD #if defined(__MINGW32__) || defined(_MSC_VER) //#if defined(_MSC_VER) #ifdef SRW #define mutex_lock(a) AcquireSRWLockExclusive(a) #define mutex_unlock(a) ReleaseSRWLockExclusive(a) typedef SRWLOCK mutexType; #else #define mutex_lock(a) EnterCriticalSection(a) #define mutex_unlock(a) LeaveCriticalSection(a) typedef CRITICAL_SECTION mutexType; #endif #define thread_self() GetCurrentThread() #define threadid_self() GetThreadId(GetCurrentThread()) typedef HANDLE threadId_t; #define WIN_THREADS #define THREADS #endif #else #include #define mutex_lock(a) pthread_mutex_lock(a) #define mutex_unlock(a) pthread_mutex_unlock(a) #define thread_self() pthread_self() #define threadid_self() 0 //FIXME t.b.d. typedef pthread_mutex_t mutexType; typedef pthread_t threadId_t; #define THREADS #endif /* Copied from main.c in ngspice*/ #if defined(__MINGW32__) #include /* remove type incompatibility with winnt.h*/ #undef BOOLEAN #include #include /* Sleep */ #elif defined(_MSC_VER) #include /* remove type incompatibility with winnt.h*/ #undef BOOLEAN #include /* Sleep */ #include /* _getpid */ #define dup _dup #define dup2 _dup2 #define open _open #define close _close #else #include /* usleep */ #endif /* __MINGW32__ */ #include "ngspice/iferrmsg.h" #include "ngspice/ftedefs.h" #include "ngspice/devdefs.h" #include #include #include #include #include #ifdef _MSC_VER #include #define snprintf _snprintf #endif #include #include "ngspice/memory.h" #include #include #ifdef HAVE_FTIME #include #endif /* To interupt a spice run */ #include typedef void (*sighandler)(int); #include #include "frontend/signal_handler.h" /*Included for the module to access data*/ #include "ngspice/dvec.h" #include "ngspice/plot.h" #ifdef __CYGWIN__ #undef WIN32 #endif #include "ngspice/sim.h" /*For get_output*/ #include #include #ifdef _MSC_VER #define S_IRWXU _S_IWRITE #endif #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif extern IFfrontEnd nutmeginfo; extern struct comm spcp_coms[ ]; extern void DevInit(void); extern int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator); extern wordlist *cp_varwl(struct variable *var); extern void create_circbyline(char *line); extern void initw(void); /*The current run (to get variable names, etc)*/ static runDesc *cur_run; void sh_stdflush(FILE *f); int sh_vfprintf(FILE *f, const char *fmt, va_list args); int sh_fputsll(const char *input, FILE* outf); int sh_ExecutePerLoop(void); double getvsrcval(double, char*); int sh_vecinit(runDesc *run); void shared_exit(int status); void sighandler_sharedspice(int num); void wl_delete_first(wordlist **wlstart, wordlist **wlend); int add_bkpt(void); int sharedsync(double*, double*, double, double, double, int, int*, int); #if !defined(low_latency) static char* outstorage(char*, bool); static void printsend(void); #endif #include "ngspice/sharedspice.h" static SendChar* pfcn; static void* userptr; static SendStat* statfcn; static ControlledExit* ngexit; static SendData* datfcn; static SendInitData* datinitfcn; static BGThreadRunning* bgtr; static GetVSRCData* getvdat; static GetISRCData* getidat; static GetSyncData* getsync; static pvector_info myvec = NULL; char **allvecs = NULL; char **allplots = NULL; static bool noprintfwanted = FALSE; static bool nostatuswanted = FALSE; static bool nodatawanted = FALSE; static bool nodatainitwanted = FALSE; static bool nobgtrwanted = FALSE; static bool wantvdat = FALSE; static bool wantidat = FALSE; static bool wantsync = FALSE; static bool immediate = FALSE; static bool coquit = FALSE; static jmp_buf errbufm, errbufc; static int intermj = 1; // thread IDs unsigned int main_id, ng_id, command_id; #ifdef THREADS mutexType triggerMutex; mutexType allocMutex; mutexType fputsMutex; #endif /* initialization status */ static bool is_initialized = FALSE; static char* no_init = "Error: ngspice is not initialized!\n Run ngSpice_Init first"; /* identifier for this ngspice invocation */ int ng_ident = 0; static struct plot * get_plot_byname(char* plotname) { struct plot *pl; pl = plot_list; while (pl) { if(cieq(pl->pl_typename, plotname)) break; pl = pl->pl_next; } return pl; } /******************************************************************/ /* Main spice command executions and thread control */ /*****************************************************************/ #ifdef THREADS #ifdef __MINGW32__ static threadId_t tid, printtid, bgtid; #else static threadId_t tid, printtid, bgtid = (threadId_t) 0; #endif static bool fl_running = FALSE; static bool fl_exited = TRUE; static bool printstopp = FALSE; static bool ps_exited = TRUE; #if defined(__MINGW32__) || defined(_MSC_VER) #define EXPORT_FLAVOR WINAPI #else #define EXPORT_FLAVOR #endif /* starts a background thread, e.g. from command bg_run */ static void * EXPORT_FLAVOR _thread_run(void *string) { ng_id = threadid_self(); fl_exited = FALSE; /* notify caller that thread is running */ if (!nobgtrwanted) bgtr(fl_exited, ng_ident, userptr); bgtid = thread_self(); cp_evloop((char *)string); FREE(string); #ifdef __MINGW32__nn bgtid.p = NULL; bgtid.x = 0; #else bgtid = (threadId_t)0; #endif fl_exited = TRUE; /* notify caller that thread has exited */ if (!nobgtrwanted) bgtr(fl_exited, ng_ident, userptr); return NULL; } /* Stops a running background thread, hopefully */ static int EXPORT_FLAVOR _thread_stop(void) { int timeout = 0; if (fl_running) { while (!fl_exited && timeout < 100) { /* ft_intrpt is the flag to stop simulation, if set TRUE ! E.g. SPfrontEnd->IFpauseTest() in dctran.c points to OUTstopnow(void), which returns 1, which leads dctran to return with -1 and thus terminates the simulation*/ ft_intrpt = TRUE; timeout++; #if defined(__MINGW32__) || defined(_MSC_VER) Sleep(100); // va: windows native #else usleep(10000); #endif } if (!fl_exited) { fprintf(stderr, "Error: Couldn't stop ngspice\n"); return EXIT_BAD; } else fprintf(stdout, "Background thread stopped with timeout = %d\n", timeout); #ifdef HAVE_LIBPTHREAD pthread_join(tid, NULL); #endif fl_running = FALSE; ft_intrpt = FALSE; return EXIT_NORMAL; } else { fprintf(stderr, "Spice not running\n"); } return EXIT_NORMAL; } void sighandler_sharedspice(int num) { NG_IGNORE(num); if (fl_running) _thread_stop(); return; } #endif /*THREADS*/ /* run a ngspice command */ static int runc(char* command) { char buf[1024] = ""; sighandler oldHandler; #ifdef THREADS #ifndef low_latency int timeout = 0; #endif char *string; bool fl_bg = FALSE; command_id = threadid_self(); /* run task in background if command is preceeded by "bg_" */ if (!cieq("bg_halt", command) && !cieq("bg_pstop", command) && ciprefix("bg_", command)) { strncpy(buf, command+3, 1024); fl_bg = TRUE; } #ifndef low_latency /* stop the printf thread 'printsend()' */ else if (cieq("bg_pstop", command)) { while (!ps_exited && timeout < 100) { printstopp = TRUE; #if defined __MINGW32__ || defined _MSC_VER Sleep(100); // va: windows native #else usleep(10000); #endif timeout++; } if (!ps_exited) { fprintf(stderr, "Error: Couldn't stop printsend thread\n"); return EXIT_BAD; } else fprintf(stdout, "Printsend thread stopped with timeout = %d\n", timeout); printstopp = FALSE; return 2; } #endif else strncpy(buf, command, 1024); #else strncpy(buf, command, 1024); #endif /* Catch Ctrl-C to break simulations */ #if 1 //!defined(_MSC_VER) /*&& !defined(__MINGW32__) */ oldHandler = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (SETJMP(jbuf, 1) != 0) { ft_sigintr_cleanup(); signal(SIGINT, oldHandler); return 0; } #else oldHandler = SIG_IGN; #endif #ifdef THREADS /* run in the background */ if (fl_bg && fl_exited) { if (fl_running) _thread_stop(); fl_running = TRUE; string = copy(buf); /*as buf gets freed fairly quickly*/ #ifdef HAVE_LIBPTHREAD pthread_create(&tid, NULL, (void * (*)(void *))_thread_run, (void *)string); #elif defined _MSC_VER || defined __MINGW32__ tid = (HANDLE)_beginthreadex(NULL, 0, (unsigned int (__stdcall *)(void *))_thread_run, (void*)string, 0, NULL); #else tid = CreateThread(NULL, 0, (PTHREAD_START_ROUTINE)_thread_run, (void*)string, 0, NULL); #endif } else /* bg_halt (pause) a bg run */ if (!strcmp(buf, "bg_halt")) { signal(SIGINT, oldHandler); return _thread_stop(); } else /* cannot do anything if ngspice is running in the bg*/ if (fl_running) { if (fl_exited) { _thread_stop(); cp_evloop(buf); } else { fprintf(stderr, "Warning: cannot execute \"%s\", type \"bg_halt\" first\n", buf); } } else { /*do the command*/ cp_evloop(buf); } #else cp_evloop(buf); #endif /*THREADS*/ signal(SIGINT, oldHandler); return 0; } /**********************************************************/ /* The functions exported explicitely from shared ngspice */ /**********************************************************/ #ifdef THREADS /* Checks if ngspice is running in the background */ IMPEXP bool ngSpice_running (void) { return (fl_running && !fl_exited); } #endif /* Initialise external voltage source and synchronization */ IMPEXP int ngSpice_Init_Sync(GetVSRCData *vsrcdat, GetISRCData *isrcdat, GetSyncData *syncdat, int *ident, void *userData) { getvdat = vsrcdat; getidat = isrcdat; getsync = syncdat; /* set userdata, but don't overwrite with NULL */ if (userData) userptr = userData; /* set ngspice shared lib identification number */ if (ident) ng_ident = *ident; /* if caller sends NULL, don't try to retrieve voltage */ if (getvdat) { wantvdat = TRUE; } /* if caller sends NULL, don't try to retrieve current */ if (getidat) { wantidat = TRUE; } /* if caller sends NULL, don't synchronize */ if (getsync) { wantsync = TRUE; } return 0; } /* Initialise ngspice and setup native methods */ IMPEXP int ngSpice_Init(SendChar* printfcn, SendStat* statusfcn, ControlledExit* ngspiceexit, SendData* sdata, SendInitData* sinitdata, BGThreadRunning* bgtrun, void* userData) { sighandler old_sigint; pfcn = printfcn; /* if caller sends NULL, don't send printf strings */ if (!pfcn) noprintfwanted = TRUE; userptr = userData; statfcn = statusfcn; /* if caller sends NULL, don't send status data */ if (!statfcn) nostatuswanted = TRUE; ngexit = ngspiceexit; datfcn = sdata; /* if caller sends NULL, don't send data */ if (!datfcn) nodatawanted = TRUE; /* if caller sends NULL, don't initialize and send data */ datinitfcn = sinitdata; if (!datinitfcn) nodatawanted = nodatainitwanted = TRUE; bgtr = bgtrun; if (!bgtr) nobgtrwanted = TRUE; immediate = FALSE; #ifdef THREADS /* init the mutexes */ #ifdef HAVE_LIBPTHREAD pthread_mutex_init(&triggerMutex, NULL); pthread_mutex_init(&allocMutex, NULL); pthread_mutex_init(&fputsMutex, NULL); #else #ifdef SRW InitializeSRWLock(&triggerMutex); InitializeSRWLock(&allocMutex); InitializeSRWLock(&fputsMutex); #else InitializeCriticalSection(&triggerMutex); InitializeCriticalSection(&allocMutex); InitializeCriticalSection(&fputsMutex); #endif #endif // Id of primary thread main_id = threadid_self(); signal(SIGINT, sighandler_sharedspice); #endif ft_rawfile = NULL; ivars(NULL); cp_in = stdin; cp_out = stdout; cp_err = stderr; /*timer*/ init_time(); /*IFsimulator struct initilised*/ SIMinit(&nutmeginfo, &ft_sim); /* program name*/ cp_program = ft_sim->simulator; srand((unsigned int) getpid()); TausSeed(); /*parameter fetcher, used in show, alter, altermod */ if_getparam = spif_getparam_special; /* Get startup system limits */ init_rlimits(); /*Command prompt stuff */ ft_cpinit(); /* Read the user config files */ /* To catch interrupts during .spiceinit... */ old_sigint = signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); if (SETJMP(jbuf, 1) == 1) { ft_sigintr_cleanup(); fprintf(cp_err, "Warning: error executing .spiceinit.\n"); goto bot; } #ifdef HAVE_PWD_H /* Try to source either .spiceinit or ~/.spiceinit. */ if (access(".spiceinit", 0) == 0) { inp_source(".spiceinit"); } else { char *s; struct passwd *pw; pw = getpwuid(getuid()); s = TMALLOC(char, 1 + strlen(pw->pw_dir) + strlen(INITSTR)); sprintf(s, "%s%s", pw->pw_dir, INITSTR); if (access(s, 0) == 0) inp_source(s); } #else /* ~ HAVE_PWD_H */ { FILE *fp; /* Try to source the file ".spiceinit" in the current directory. */ if ((fp = fopen(".spiceinit", "r")) != NULL) { (void) fclose(fp); inp_source(".spiceinit"); } } #endif /* ~ HAVE_PWD_H */ bot: signal(SIGINT, old_sigint); /* initilise display to 'no display at all'*/ DevInit(); #ifdef FastRand // initialization and seed for FastNorm Gaussian random generator { unsigned int rseed = 66; initnorm (0, 0); if (!cp_getvar("rndseed", CP_NUM, &rseed)) { time_t acttime = time(NULL); rseed = (unsigned int) acttime; } initnorm (rseed, 2); fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed); } #elif defined (WaGauss) { unsigned int rseed = 66; if (!cp_getvar("rndseed", CP_NUM, &rseed)) { time_t acttime = time(NULL); rseed = (unsigned int) acttime; } srand(rseed); initw(); } #endif // com_version(NULL); fprintf(cp_out, "******\n" "** %s-%s shared library\n", ft_sim->simulator, ft_sim->version); if (Spice_Build_Date != NULL && *Spice_Build_Date != 0) fprintf(cp_out, "** Creation Date: %s\n", Spice_Build_Date); fprintf(cp_out, "******\n"); is_initialized = TRUE; if(!myvec) myvec = TMALLOC(vector_info, sizeof(vector_info)); #if !defined(low_latency) /* If caller has sent valid address for pfcn */ if (!noprintfwanted) #ifdef HAVE_LIBPTHREAD pthread_create(&printtid, NULL, (void * (*)(void *))printsend, (void *)NULL); #elif defined _MSC_VER || defined __MINGW32__ printtid = (HANDLE)_beginthreadex(NULL, 0, (unsigned int (__stdcall *)(void *))printsend, (void*) NULL, 0, NULL); #else printtid = CreateThread(NULL, 0, (PTHREAD_START_ROUTINE) printsend, NULL, 0, NULL); #endif #endif return 0; } /* retrieve a ngspice command from caller and run it immediately */ IMPEXP int ngSpice_Command(char* comexec) { if ( ! setjmp(errbufc) ) { immediate = FALSE; intermj = 1; if (!is_initialized) { fprintf(stderr, no_init); return 1; } runc(comexec); /* main thread prepares immediate detaching of dll */ immediate = TRUE; return 0; } return 1; }; /* Return information about a vector to the caller */ IMPEXP pvector_info ngGet_Vec_Info(char* vecname) { struct dvec* newvec; if (!is_initialized) { fprintf(stderr, no_init); return NULL; } newvec = vec_get(vecname); if (newvec == NULL) { fprintf(stderr, "Error: vector %s not found!\n", vecname); return NULL; } if (newvec->v_numdims > 1) { fprintf(stderr, "Error: vector %s is multidimensional!\n This is not yet handled\n!", vecname); return NULL; } myvec->v_name = newvec->v_name; myvec->v_type = newvec->v_type; myvec->v_flags = newvec->v_flags; myvec->v_realdata = newvec->v_realdata; myvec->v_compdata = newvec->v_compdata; myvec->v_length = newvec->v_length; return myvec; }; /* Receive a circuit from the caller as a pointer to an array of char* . Last entry in array has to be NULL */ IMPEXP int ngSpice_Circ(char** circa){ int entries = 0, i; char* newline; if ( ! setjmp(errbufm) ) { intermj = 0; immediate = FALSE; /* count the entries */ while (circa[entries]) { entries++; } /* create a local copy (to be freed in inpcom.c) */ for (i = 0; i < entries; i++) { newline = copy(circa[i]); create_circbyline(newline); } return 0; } /* upon error */ return 1; } /* return to the caller a pointer to the name of the current plot */ IMPEXP char* ngSpice_CurPlot(void) { struct plot *pl = plot_cur; return pl->pl_typename; } /* return to the caller a pointer to an array of all plots created by ngspice. Last entry in the array is NULL. */ IMPEXP char** ngSpice_AllPlots(void) { int len = 0, i = 0; struct plot *pl = plot_list; if (allplots) tfree(allplots); while (pl) { len++; pl = pl->pl_next; } allplots = TMALLOC(char*, len+1); pl = plot_list; for (i = 0; i < len; i++) { allplots[i] = pl->pl_typename; pl = pl->pl_next; } allplots[len] = '\0'; return allplots; } /* return to the caller a pointer to an array of vector names in the plot named by plotname. Last entry in the array is NULL. */ IMPEXP char** ngSpice_AllVecs(char* plotname) { struct dvec *d; int len = 0, i = 0; struct plot *pl; if (allvecs) tfree(allvecs); /* get the plot plotname */ pl = get_plot_byname(plotname); if (pl) for (d = pl->pl_dvecs; d; d = d->v_next) len++; if (len == 0) { fprintf(cp_err, "Error: There are no vectors currently active.\n"); return NULL; } allvecs = TMALLOC(char*, len + 1); for (d = pl->pl_dvecs, i = 0; d; d = d->v_next, i++) allvecs[i] = d->v_name; allvecs[len] = NULL; return allvecs; } static double *bkpttmp = NULL; static int bkpttmpsize = 0; /* set a breakpoint in ngspice */ IMPEXP bool ngSpice_SetBkpt(double time) { int error; CKTcircuit *ckt = NULL; if (!ft_curckt || !ft_curckt->ci_ckt) { fprintf(cp_err, "Error: no circuit loaded.\n"); return(FALSE); } ckt = ft_curckt->ci_ckt; if (ckt->CKTbreakSize == 0) { /* breakpoints have not yet been set up, so store here preliminary and add with fcn add_bkpt() called from DCTran() */ if (bkpttmp == NULL) { bkpttmp = TMALLOC(double, bkpttmpsize + 1); if(bkpttmp == NULL) return(FALSE); bkpttmpsize++; } else { bkpttmp = TREALLOC(double, bkpttmp, bkpttmpsize + 1); bkpttmpsize++; } bkpttmp[bkpttmpsize-1] = time; error = 0; } else error = CKTsetBreak(ckt, time); if(error) return(FALSE); return(TRUE); } /* add the preliminary breakpoints to the list. called from dctran.c */ int add_bkpt(void) { int i; int error = 0; CKTcircuit *ckt = ft_curckt->ci_ckt; if(bkpttmp && (bkpttmpsize > 0)) { for (i = 0; i < bkpttmpsize; i++) error = CKTsetBreak(ckt, bkpttmp[i]); FREE(bkpttmp); bkpttmpsize = 0; } if(error) return(error); return(OK); } /*------------------------------------------------------*/ /* Redefine the vfprintf() functions for callback */ /*------------------------------------------------------*/ /* handling of escape characters (extra \ added) only, if 'set addescape' is given in .spiceinit */ int sh_vfprintf(FILE *f, const char *fmt, va_list args) { char buf[1024]; char *p/*, *s*/; int nchars, /*escapes,*/ result; size_t size; if ((fileno(f) != STDOUT_FILENO && fileno(f) != STDERR_FILENO && f != stderr && f != stdout) #ifdef THREADS // || (fl_running && bgtid == thread_self()) #endif ) return vfprintf(f, fmt, args); p = buf; // size: how much ist left for chars and terminating '\0' size = sizeof(buf); // assert(size > 0); for (;;) { nchars = vsnprintf(p, size, fmt, args); if(nchars == -1) { // compatibility to old implementations size *= 2; nchars = vsnprintf(p, size, fmt, args); } else if (size < (size_t)nchars + 1) { size = (size_t)nchars + 1; } else { break; } if(p == buf) p = TMALLOC(char, size); else p = TREALLOC(char, p, size); } /* add / to escape characters, if 'set addescape' is called in .spiceinit */ if (cp_getvar("addescape", CP_BOOL, NULL)) { size_t escapes; const char * const escape_chars = "$[]\"\\"; char *s = p; for (escapes = 0; ; escapes++) { s = strpbrk(s, escape_chars); if (!s) break; s++; } if (escapes) { size_t new_size = (size_t)nchars + escapes + 1; char *src, *dst; if (p != buf) { p = TREALLOC(char, p, new_size); } else if (new_size > sizeof(buf)) { p = TMALLOC(char, new_size); strcpy(p, buf); } src = p + nchars; dst = src + escapes; while (dst > src) { char c = *--src; *--dst = c; if (strchr(escape_chars, c)) *--dst = '\\'; } } } /* use sharedspice.c implementation of fputs (sh_fputs) to assess callback function derived from address printfcn received via Spice_Init() from caller of ngspice.dll */ result = sh_fputs(p, f); if (p != buf) tfree(p); return nchars; } /*---------------------------------------------------------------------- Reimplement fprintf() as a call to callback function pfcn via sh_vfprintf, sh_fputs, and sh_fputsll ----------------------------------------------------------------------*/ int sh_fprintf(FILE *f, const char *format, ...) { va_list args; int rtn; va_start (args, format); rtn = sh_vfprintf(f, format, args); va_end(args); return rtn; } /*---------------------------------------------------------------------- Reimplement printf() as a call to callback function pfcn via sh_vfprintf, sh_fputs, and sh_fputsll ----------------------------------------------------------------------*/ int sh_printf(const char *format, ...) { va_list args; int rtn; va_start (args, format); rtn = sh_vfprintf(stdout, format, args); va_end(args); return rtn; } int sh_putc(int inp, FILE* f) { char inpconv[2]; if ((fileno(f) != STDOUT_FILENO && fileno(f) != STDERR_FILENO && f != stderr && f != stdout)) return myfputc(inp, f); sprintf(inpconv, "%c", inp); fputs(inpconv, f); return inp; } int sh_fputc(int inp, FILE* f) { char inpconv[2]; if ((fileno(f) != STDOUT_FILENO && fileno(f) != STDERR_FILENO && f != stderr && f != stdout)) return myfputc(inp, f); sprintf(inpconv, "%c", inp); fputs(inpconv, f); return inp; } /*----------------------------------------------------------------------*/ /* Reimplement fputs() as a call to callback function pfcn */ /*----------------------------------------------------------------------*/ /* Collect and cat strings. If \n is detected, send string to caller via pfcn() */ static char* outstringerr = NULL; static char* outstringout = NULL; #if defined low_latency || !defined THREADS /* The strings issued by printf etc. are sent directly to the caller. The callback has to be fast enough (low latency). */ int sh_fputsll(const char *input, FILE* outf) { int result = 0; size_t len; char *delstring, *newstring, *prstring; size_t inputlen = strlen(input); /* If caller has sent NULL address for pfcn */ if (noprintfwanted) return -1; if (outf == stderr) { if (!outstringerr) delstring = outstringerr = copy(input); else { len = strlen(outstringerr); delstring = outstringerr = TREALLOC(char, outstringerr, len + inputlen + 2); strcat(outstringerr, input); } if (strchr(input, '\n')) { while (outstringerr) { newstring = gettok_char(&outstringerr, '\n', FALSE, FALSE); if(!newstring) break; prstring = TMALLOC(char, 7 + strlen(newstring) + 1); strcat(prstring, "stderr "); strcat(prstring, newstring); result = pfcn(prstring, ng_ident, userptr); tfree(newstring); tfree(prstring); } /* copy the rest following \n, but without trailing \n to new address */ if (outstringerr && *outstringerr != '\0') outstringerr = copy(outstringerr); else outstringerr = NULL; tfree(delstring); return result; } else if (strchr(input, '\r')) { result = pfcn(outstringerr, ng_ident, userptr); tfree(outstringerr); return result; } } else if (outf == stdout) { if (!outstringout) delstring = outstringout = copy(input); else { len = strlen(outstringout); delstring = outstringout = TREALLOC(char, outstringout, len + inputlen + 1); strcat(outstringout, input); } if (strchr(input, '\n')) { while (outstringout) { newstring = gettok_char(&outstringout, '\n', FALSE, FALSE); if(!newstring) break; prstring = TMALLOC(char, 7 + strlen(newstring) + 1); strcat(prstring, "stdout "); strcat(prstring, newstring); result = pfcn(prstring, ng_ident, userptr); tfree(newstring); tfree(prstring); } /* copy the rest following \n, but without trailing \n to new address */ if (outstringout && *outstringout != '\0') outstringout = copy(outstringout); else outstringout = NULL; tfree(delstring); return result; } else if (strchr(input, '\r')) { result = pfcn(outstringout, ng_ident, userptr); tfree(outstringout); return result; } } else myputs(input, outf); return 0; } /* provide a lock around printing function. May become critical if latency of callback is too high. */ int sh_fputs(const char *input, FILE* outf) { mutex_lock(&fputsMutex); sh_fputsll(input, outf); mutex_unlock(&fputsMutex); return 0; } #else /* FIFO storage for strings created by fputs and all other printing commands. A string will be appended to the FIFO by fcn outstorage() by the main thread or the background (bg_) thread. Each string is read from top of the FIFO by independent thread using again fcn outstoraghe(), top entry is deleted and string is sent to caller in an endless loop by fcn printsend() */ static wordlist *wlstart = NULL, *wlend = NULL; //static bool printstopp = FALSE; int sh_fputs(const char *input, FILE* outf) { int result = 0; size_t len; char *delstring, *newstring, *prstring; size_t inputlen = strlen(input); /* If caller has sent NULL address for pfcn */ if (noprintfwanted) return -1; if (outf == stderr) { if (!outstringerr) delstring = outstringerr = copy(input); else { len = strlen(outstringerr); delstring = outstringerr = TREALLOC(char, outstringerr, len + inputlen + 2); strcat(outstringerr, input); } if (strchr(input, '\n')) { while (outstringerr) { newstring = gettok_char(&outstringerr, '\n', FALSE, FALSE); if(!newstring) break; prstring = TMALLOC(char, 7 + strlen(newstring) + 1); strcat(prstring, "stderr "); strcat(prstring, newstring); mutex_lock(&fputsMutex); outstorage(prstring, TRUE); mutex_unlock(&fputsMutex); tfree(newstring); prstring = NULL; /* keep prstring here, address is in use */ } /* copy the rest following \n, but without trailing \n to new address */ if (outstringerr && *outstringerr != '\0') outstringerr = copy(outstringerr); else outstringerr = NULL; tfree(delstring); return result; } else if (strchr(input, '\r')) { mutex_lock(&fputsMutex); outstorage(outstringerr, TRUE); mutex_unlock(&fputsMutex); outstringerr = NULL; return 0; } } if (outf == stdout) { if (!outstringout) delstring = outstringout = copy(input); else { len = strlen(outstringout); delstring = outstringout = TREALLOC(char, outstringout, len + inputlen + 1); strcat(outstringout, input); } if (strchr(input, '\n')) { while (outstringout) { newstring = gettok_char(&outstringout, '\n', FALSE, FALSE); if(!newstring) break; prstring = TMALLOC(char, 7 + strlen(newstring) + 1); strcat(prstring, "stdout "); strcat(prstring, newstring); mutex_lock(&fputsMutex); outstorage(prstring, TRUE); mutex_unlock(&fputsMutex); tfree(newstring); prstring = NULL; } /* copy the rest following \n, but without trailing \n to new address */ if (outstringout && *outstringout != '\0') outstringout = copy(outstringout); else outstringout = NULL; tfree(delstring); return result; } else if (strchr(input, '\r')) { mutex_lock(&fputsMutex); outstorage(outstringout, TRUE); mutex_unlock(&fputsMutex); outstringout = NULL; return result; } } else myputs(input, outf); return 0; } static char *outsend = NULL; /* Endless loop in its own thread for reading data from FIFO and sending to caller */ static void printsend(void) { ps_exited = FALSE; printstopp = FALSE; for (;;) { #if defined(__MINGW32__) || defined(_MSC_VER) Sleep(50); // loop delay #else usleep(50000); #endif if (printstopp) { // issued by shared_exit() // catch the final error message mutex_lock(&fputsMutex); outsend = outstorage(NULL, FALSE); mutex_unlock(&fputsMutex); break; } mutex_lock(&fputsMutex); outsend = outstorage(NULL, FALSE); mutex_unlock(&fputsMutex); if (outsend) { /* requires outsend to be copied by the caller, because it is freed immediately */ pfcn(outsend, userptr); tfree(outsend); } } ps_exited = TRUE; } /* remove the first entry of a wordlist, but keep wl->wl_word */ void wl_delete_first(wordlist **wlstart, wordlist **wlend) { wordlist *wl_temp; if (!(*wlstart)) return; if ((*wlstart) && !((*wlstart)->wl_next)) { tfree(*wlstart); /* keep wlstart->wl_word */ (*wlstart) = NULL; (*wlend) = NULL; return; } wl_temp = (*wlstart)->wl_next; wl_temp->wl_prev = NULL; tfree(*wlstart); /* keep wlstart->wl_word */ (*wlstart) = wl_temp; } /* create a wordlist FIFO using global static variables wlstart and wlend. wordin has to be malloced on the heap */ char* outstorage(char* wordin, bool write) { char *wordout = NULL; if(write) wl_append_word(&wlstart, &wlend, wordin); else if (wlstart) { wordout = wlstart->wl_word; wl_delete_first(&wlstart, &wlend); } return wordout; } #endif /* New progress report to statfcn(). An update occurs only every DELTATIME milliseconds. */ #define DELTATIME 150 void SetAnalyse( char * Analyse, /*in: analysis type */ int DecaPercent /*in: 10 times the progress [%]*/ /*HWND hwAnalyse, in: global handle to analysis window */ ) { #ifdef HAVE_FTIME static int OldPercent = -2; /* Previous progress value */ static char OldAn[128]; /* Previous analysis type */ char* s; /* outputs to callback function */ static struct timeb timebefore; /* previous time stamp */ struct timeb timenow; /* actual time stamp */ int diffsec, diffmillisec; /* differences actual minus prev. time stamp */ int result; /* return value from callback function */ CKTcircuit *ckt = NULL; if (ft_curckt) ckt = ft_curckt->ci_ckt; /* If caller has sent NULL address for statfcn */ if (nostatuswanted) return; if ((DecaPercent == OldPercent) && !strcmp(OldAn, Analyse)) return; /* get actual time */ ftime(&timenow); timediff(&timenow, &timebefore, &diffsec, &diffmillisec); s = TMALLOC(char, 128); if (!strcmp(Analyse, "tran")) { if (ckt && (ckt->CKTtime > ckt->CKTfinalTime - ckt->CKTmaxStep)) { sprintf(s, "--ready--"); result = statfcn(s, ng_ident, userptr); tfree(s); return; } } if (DecaPercent >= 1000){ /* Because CKTmaxStep may be smaller than 0.1%, we print only when CKTtime is large enough. */ if (!strcmp(Analyse, "tran") && ckt && (ckt->CKTtime < ckt->CKTfinalTime - ckt->CKTmaxStep)) return; sprintf( s, "--ready--"); result = statfcn(s, ng_ident, userptr); tfree(s); return; } /* info every one percent of progress: actual time, progress, to catch linearity of progress of simulation */ if (ft_ngdebug && !strcmp(Analyse, "tran")) if ((int)((double)DecaPercent/10.) > (int)((double)OldPercent/10.)) { printf("%3.1f%% percent progress after %4.2f seconds.\n", (double)DecaPercent/10., seconds()); } OldPercent = DecaPercent; /* output only into hwAnalyse window and if time elapsed is larger than DELTATIME given value, or if analysis has changed, else return */ if ((diffsec > 0) || (diffmillisec > DELTATIME) || strcmp(OldAn, Analyse)) { if (DecaPercent < 0) { sprintf( s, "--ready--"); } else if (DecaPercent == 0) { sprintf( s, "%s", Analyse); } else if (!strcmp(Analyse, "shooting")) { sprintf( s, "%s: %d", Analyse, DecaPercent); } else { sprintf( s, "%s: %3.1f%%", Analyse, (double)DecaPercent/10.); } timebefore.dstflag = timenow.dstflag; timebefore.millitm = timenow.millitm; timebefore.time = timenow.time; timebefore.timezone = timenow.timezone; /* info when previous analysis period has finished */ if (strcmp(OldAn, Analyse)) { if (ft_ngdebug && (strcmp(OldAn, ""))) printf("%s finished after %4.2f seconds.\n", OldAn, seconds()); strncpy(OldAn, Analyse, 127); } result = statfcn(s, ng_ident, userptr); } tfree(s); #else char* s; int result; static bool havesent = FALSE; if (!havesent) { s = copy("No usage info available"); result = statfcn(s, ng_ident, userptr); tfree(s); havesent = TRUE; } #endif } /* a dll or shared library should never exit, if loaded dynamically, but ask for graceful shutdown (e.g. being detached) via a callback function */ void shared_exit(int status) { /* alert caller to detach dll (if we are in the main thread), or detach after a short sleep, if immediate is true, and we are in a worker thread */ if (immediate) #if defined(__MINGW32__) || defined(_MSC_VER) Sleep(100); // va: windows native #else usleep(10000); #endif /* status >= 1000 tells us that we react on command 'quit' hand this information over to caller */ if (status >= 1000) { coquit = TRUE; fprintf(stdout, "\nNote: 'quit' asks for detaching ngspice.dll.\n"); status -= 1000; } else { coquit = FALSE; fprintf(stderr, "Error: ngspice.dll cannot recover and awaits to be detached\n"); } #ifndef low_latency // set flag to stop the printsend thread printstopp = TRUE; // leave this thread for 100ms to stop the printsend thread #if defined __MINGW32__ || defined _MSC_VER Sleep(100); #else usleep(100000); #endif // send the final error message already caught in printsend() if (outsend) { /* requires outsend to be copied by the caller, because it is freed immediately */ pfcn(outsend, ng_ident, userptr); tfree(outsend); } #endif // if we are in a worker thread, we exit it here // detaching then has to be done explicitely by the caller if (fl_running && !fl_exited) { fl_exited = TRUE; bgtr(fl_exited, ng_ident, userptr); // set a flag that ngspice wants to be detached ngexit(status, FALSE, coquit, ng_ident, userptr); // finish and exit the worker thread #ifdef HAVE_LIBPTHREAD pthread_exit(1); #elif defined _MSC_VER || defined __MINGW32__ _endthreadex(1); #endif } // set a flag in caller to detach ngspice.dll ngexit(status, immediate, coquit, ng_ident, userptr); // jump back to finish the calling function if (!intermj) longjmp(errbufm,1); /* jump back to ngSpice_Circ() */ else longjmp(errbufc,1); /* jump back to ngSpice_Command() */ } static int len = 0; static pvecvaluesall curvecvalsall; #ifdef olld static pvecvalues* curvecvals; static char type_name[128]; int sh_ExecutePerLoop_old(void) { struct dvec *d; int i, veclen; struct plot *pl = plot_cur; /* return immediately if callback not wanted */ if (nodatawanted) return 2; /* reset data structure if there is a change in plot type */ if (strcmp(type_name, pl->pl_typename)) { if (curvecvals) { for (i = 0; i < len; i++) tfree(curvecvals[i]); tfree(curvecvals); } len = 0; bzero(type_name, 128); } /* initialize new for every new plot, e.g. if changed from op1 to ac1 or from tran1 to tran2 */ if ((pl) && (len == 0)) { strcpy(type_name, pl->pl_typename); for (d = pl->pl_dvecs; d; d = d->v_next) len++; if (len == 0) { fprintf(cp_err, "Error: There are no vectors currently active.\n"); return 1; } /* allocate memory for the number of vectors */ curvecvals = TMALLOC(pvecvalues, len); /* allocate memory for each entry and add vector names once */ for (d = pl->pl_dvecs, i = 0; d; d = d->v_next, i++) { curvecvals[i] = TMALLOC(vecvalues, 1); curvecvals[i]->name = copy(d->v_name); } } /* get the data of the last entry to the plot vector */ veclen = pl->pl_dvecs->v_length - 1; for (d = pl->pl_dvecs, i = 0; d; d = d->v_next, i++) { /* test if real */ if (d->v_flags & VF_REAL) { curvecvals[i]->is_complex = FALSE; curvecvals[i]->creal = d->v_realdata[veclen]; curvecvals[i]->cimag = 0.; } else { curvecvals[i]->is_complex = TRUE; curvecvals[i]->creal = d->v_compdata[veclen].cx_real; curvecvals[i]->cimag = d->v_compdata[veclen].cx_imag; } } /* now call the callback function to return the data to the caller */ if (!nodatawanted) // datfcn(curvecvals, len, ng_ident, userptr); return 0; } #endif /* called each time a new data set is written to the output vectors */ int sh_ExecutePerLoop(void) { struct dvec *d; int i, veclen; // double testval; struct plot *pl = plot_cur; /* return immediately if callback not wanted */ if (nodatawanted) return 2; /* get the data of the last entry to the plot vector */ veclen = pl->pl_dvecs->v_length - 1; curvecvalsall->vecindex = veclen; for (d = pl->pl_dvecs, i = 0; d; d = d->v_next, i++) { /* test if real */ if (d->v_flags & VF_REAL) { curvecvalsall->vecsa[i]->is_complex = FALSE; // testval = d->v_realdata[veclen]; curvecvalsall->vecsa[i]->creal = d->v_realdata[veclen]; curvecvalsall->vecsa[i]->cimag = 0.; } else { curvecvalsall->vecsa[i]->is_complex = TRUE; curvecvalsall->vecsa[i]->creal = d->v_compdata[veclen].cx_real; curvecvalsall->vecsa[i]->cimag = d->v_compdata[veclen].cx_imag; } } /* now call the callback function to return the data to the caller */ datfcn(curvecvalsall, len, ng_ident, userptr); return 0; } /* called once for a new plot from beginPlot() in outitf.c, after the vectors in ngspice for this plot have been set. Transfers vector information to the caller via callback datinitfcn() and sets transfer structure for use in sh_ExecutePerLoop() */ int sh_vecinit(runDesc *run) { struct dvec *d, *ds; int veccount, i; static pvecinfoall pvca = NULL; pvecinfo *pvc; /* return immediately if callback not wanted */ if (nodatainitwanted) return 2; cur_run = run; len = veccount = cur_run->numData; if (veccount == 0) { fprintf(cp_err, "Error: There are no vectors currently active.\n"); return 1; } /* delete the structs from the previous plot */ if (pvca) { for (i = 0; i < pvca->veccount; i++) tfree(pvca->vecs[i]); tfree(pvca->vecs); tfree(pvca); pvca = NULL; } pvc = TMALLOC(pvecinfo, veccount); ds = cur_run->runPlot->pl_scale; for (i = 0, d = cur_run->runPlot->pl_dvecs; i < veccount; i++, d = d->v_next) { pvc[i] = TMALLOC(vecinfo, 1); pvc[i]->number = i; pvc[i]->pdvec = (void*)d; pvc[i]->pdvecscale = (void*)ds; pvc[i]->vecname = d->v_name; pvc[i]->is_real = (d->v_flags & VF_REAL); } pvca = TMALLOC(vecinfoall, 1); // the plot pvca->title = cur_run->runPlot->pl_title; pvca->date = cur_run->runPlot->pl_date; pvca->name = cur_run->runPlot->pl_name; pvca->type = cur_run->runPlot->pl_typename; pvca->veccount = veccount; // the data pvca->vecs = pvc; /* now call the callback function to return the data to the caller */ datinitfcn(pvca, ng_ident, userptr); /* generate the data tranfer structure, data will be sent from sh_ExecutePerLoop() via datfcn() */ if (!curvecvalsall) { curvecvalsall = TMALLOC(vecvaluesall, 1); } else { for (i = 0; i < curvecvalsall->veccount; i++) tfree(curvecvalsall->vecsa[i]); tfree(curvecvalsall->vecsa); } curvecvalsall->veccount = veccount; curvecvalsall->vecsa = TMALLOC(pvecvalues, veccount); for (i = 0, d = cur_run->runPlot->pl_dvecs; i < veccount; i++, d = d->v_next) { curvecvalsall->vecsa[i] = TMALLOC(vecvalues,1); curvecvalsall->vecsa[i]->name = d->v_name; if (cieq(d->v_plot->pl_scale->v_name, d->v_name)) curvecvalsall->vecsa[i]->is_scale = TRUE; else curvecvalsall->vecsa[i]->is_scale = FALSE; } return 0; } /* issue callback to request external voltage data for source vname */ double getvsrcval(double time, char *vname) { double vval; if (!wantvdat) { fprintf(stderr, "Error: No callback supplied for source %s\n", vname); shared_exit(EXIT_BAD); return(EXIT_BAD); } else { /* callback fcn */ getvdat(&vval, time, vname, ng_ident, userptr); return vval; } } /* issue callback to request external current data for source iname*/ double getisrcval(double time, char *iname) { double ival; if (!wantidat) { fprintf(stderr, "Error: No callback supplied for source %s\n", iname); shared_exit(EXIT_BAD); return(EXIT_BAD); } else { /* callback fcn */ getidat(&ival, time, iname, ng_ident, userptr); return ival; } } /* return value 1: continue with new time step, ckt->CKTtime + ckt->CKTdelta will be done next automatically. For time synchronization we may choose our own ckt->CKTdelta, being smaller than the one suggested by ngspice. return value 0: will redo the most recent time step. We may subtract olddelta and continue with new ckt-CKTdelta. This is necessary if non-convergence has been detected (redostep = 1). The newly suggested ckt-CKTdelta has already been divided by 8. This is also enforced if the truncation error is too large. The newly suggested ckt-CKTdelta may be accompanied by an increase of integration order. For time synchronization, if the actual, converged ckt-CKTtime is beyond the optimum common time, we subtract olddelta and then choose our own ckt->CKTdelta, being smaller than olddelta. Whereas redostep is set by ngspice, the user may decide via the callback function, to redo the most recent step because of other reasons. This is accomplished by returning a 1 with the callback function. */ /* ckttime pointer to ckt->CKTtime, which already has been used trying to achieve convergence, after olddelta had been added in the previous step. cktdelta pointer to newly defined ckt->CKTdelta, e.g. by recognizing truncation errors olddelta old ckt->CKTdelta, has already been added in the previous step. finalt final time CKTfinaltime delmin minimum delta CKTdelmin redostep if 0, converged, if 1, either no convergence, need to redo with new ckt->CKTdelta or ckt->CKTdelta has been reduced by tuncation errors too large. rejected pointer to ckt->CKTstat->STATrejected, counts rejected time points. loc location of function call in dctran.c: 0: after breakpoint handling, 1: at end of for loop */ int sharedsync(double *pckttime, double *pcktdelta, double olddelta, double finalt, double delmin, int redostep, int *rejected, int loc) { /* standard procedure, cktdelta has been provided by ngspice */ if (!wantsync) { if (redostep) { *pckttime -= olddelta; (*rejected)++; return 1; } else return 0; /* synchronization required, to be done by changing cktdelta */ } else { if (redostep) { *pckttime -= olddelta; (*rejected)++; /* use cktdelta as suggested by ngspice or acquire new cktdelta via pointer pcktdelta in user supplied callback */ getsync(*pckttime, pcktdelta, olddelta, redostep, ng_ident, loc, userptr); /* never move beyond final time */ if (*pckttime + *pcktdelta > finalt) *pcktdelta = finalt - *pckttime - 1.1 * delmin; return 1; } else { /* Use cktdelta as suggested by ngspice or acquire new cktdelta via pointer pcktdelta in user supplied callback. Redo the previous step if return value from getsync is 1. */ int retval = getsync(*pckttime, pcktdelta, olddelta, redostep, ng_ident, loc, userptr); /* never move beyond final time */ if (*pckttime + *pcktdelta > finalt) *pcktdelta = finalt - *pckttime - 1.1 * delmin; /* user has decided to redo the step, ignoring redostep being set to 0 by ngspice. */ if (retval) { *pckttime -= olddelta; (*rejected)++; } return retval; } } } ngspice-26/src/spice.def0000644000265600020320000000007212264261473014602 0ustar andreasadminLIBRARY spice DESCRIPTION "tclspice" EXPORTS _Spice_Init ngspice-26/src/ngmultidec.c0000644000265600020320000002455412264261473015331 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1990 Jaijeet Roychowdury **********/ #include "ngspice/ngspice.h" #include #include #include "ngspice/spmatrix.h" #define THRSH 0.01 #define ABS_THRSH 0 #define DIAG_PIVOTING 1 #undef DEBUG_LEVEL1 /* `-u' option showing the usage help is changed to `-h'. -- ro */ extern void usage(char **argv); extern void comments(double r,double l,double g,double c,double ctot,double cm,double lm,double k,char *name,int num, double len); extern double phi(int i, double arg); extern void spErrorMessage(MatrixPtr, FILE*, char*); int main (int argc, char **argv) { int ch; int errflg=0,i,j; double l,c,ctot,r=0.0,g=0.0,k=0.0,lm=0.0,cm=0.0,len; unsigned gotl=0,gotc=0,gotr=0,gotg=0,gotk=0,gotcm=0,gotlen=0; unsigned gotname=0, gotnum=0; char *name = ""; double **matrix, **inverse; double *tpeigenvalues, *gammaj; char *options; int num, node; char **pname, *s; int use_opt; char *optarg; pname = argv; argv++; argc--; ch = 0; while (argc > 0) { s = *argv++; argc--; while ((ch = *s++) != '\0') { if (*s) optarg = s; else if (argc) optarg = *argv; else optarg = NULL; use_opt = 0; switch (ch) { case 'o': name = TMALLOC(char, strlen(optarg)); (void) strcpy(name,optarg); gotname=1; use_opt = 1; break; case 'l': sscanf(optarg,"%lf",&l); gotl=1; use_opt = 1; break; case 'c': sscanf(optarg,"%lf",&c); gotc=1; use_opt = 1; break; case 'r': sscanf(optarg,"%lf",&r); use_opt = 1; gotr=1; break; case 'g': sscanf(optarg,"%lf",&g); use_opt = 1; gotg=1; break; case 'k': sscanf(optarg,"%lf",&k); use_opt = 1; gotk=1; break; case 'x': sscanf(optarg,"%lf",&cm); use_opt = 1; gotcm=1; break; case 'L': sscanf(optarg,"%lf",&len); use_opt = 1; gotlen=1; break; case 'n': sscanf(optarg,"%d",&num); use_opt = 1; gotnum=1; break; case 'h': usage(pname); exit(1); break; case '-': break; default: usage(pname); exit(2); break; } if (use_opt) { if (optarg == s) s += strlen(s); else if (optarg) { argc--; argv++; } } } } if (errflg) { usage(argv); exit (2); } if (gotl + gotc + gotname + gotnum + gotlen < 5) { fprintf(stderr,"l, c, model_name, number_of_conductors and length must be specified.\n"); fprintf(stderr,"%s -u for details.\n",pname[0]); fflush(stdout); exit(1); } if ( (k<0.0?-k:k) >=1.0 ) { fprintf(stderr,"Error: |k| must be less than 1.0\n"); fflush(stderr); exit(1); } if (num == 1) { fprintf(stdout,"* single conductor line\n"); fflush(stdout); exit(1); } lm = l*k; switch(num) { case 1: ctot = c; break; case 2: ctot = c + cm; break; default: ctot = c + 2*cm; break; } comments(r,l,g,c,ctot,cm,lm,k,name,num,len); matrix = TMALLOC(double *, num + 1); inverse = TMALLOC(double *, num + 1); tpeigenvalues = TMALLOC(double, num + 1); for (i=1;i<=num;i++) { matrix[i] = TMALLOC(double, num + 1); inverse[i] = TMALLOC(double, num + 1); } for (i=1;i<=num;i++) { tpeigenvalues[i] = -2.0 * cos(M_PI*i/(num+1)); } for (i=1;i<=num;i++) { for (j=1;j<=num;j++) { matrix[i][j] = phi(i-1,tpeigenvalues[j]); } } gammaj = TMALLOC(double, num + 1); for (j=1;j<=num;j++) { gammaj[j] = 0.0; for (i=1;i<=num;i++) { gammaj[j] += matrix[i][j] * matrix[i][j]; } gammaj[j] = sqrt(gammaj[j]); } for (j=1;j<=num;j++) { for (i=1;i<=num; i++) { matrix[i][j] /= gammaj[j]; } } tfree(gammaj); /* matrix = M set up */ { MatrixPtr othermatrix; double *rhs, *solution; double *irhs, *isolution; int errflg, err, singular_row, singular_col; double *elptr; rhs = TMALLOC(double, num + 1); irhs = TMALLOC(double, num + 1); solution = TMALLOC(double, num + 1); isolution = TMALLOC(double, num + 1); othermatrix = spCreate(num,0,&errflg); for (i=1;i<=num;i++) { for (j=1; j<=num; j++) { elptr = spGetElement(othermatrix,i,j); *elptr = matrix[i][j]; } } #ifdef DEBUG_LEVEL1 (void) spPrint(othermatrix,0,1,0); #endif for (i=1;i<=num;i++) rhs[i] = 0.0; rhs[1]=1.0; err = spOrderAndFactor(othermatrix,rhs,THRSH,ABS_THRSH,DIAG_PIVOTING); spErrorMessage(othermatrix,stderr,NULL); switch(err) { case spNO_MEMORY: fprintf(stderr,"No memory in spOrderAndFactor\n"); fflush(stderr); exit(1); case spSINGULAR: (void) spWhereSingular(othermatrix,&singular_row,&singular_col); fprintf(stderr,"Singular matrix: problem in row %d and col %d\n", singular_row, singular_col); fflush(stderr); exit(1); default: break; } for (i=1;i<=num;i++) { for (j=1;j<=num;j++) { rhs[j] = (j==i?1.0:0.0); irhs[j] = 0.0; } (void) spSolveTransposed(othermatrix,rhs,solution, irhs, isolution); for (j=1;j<=num;j++) { inverse[i][j] = solution[j]; } } tfree(rhs); tfree(solution); } /* inverse = M^{-1} set up */ fprintf(stdout,"\n"); fprintf(stdout,"* Lossy line models\n"); options = TMALLOC(char, 256); (void) strcpy(options,"rel=1.2 nocontrol"); for (i=1;i<=num;i++) { fprintf(stdout,".model mod%d_%s ltra %s r=%0.12g l=%0.12g g=%0.12g c=%0.12g len=%0.12g\n", i,name,options,r,l+tpeigenvalues[i]*lm,g,ctot-tpeigenvalues[i]*cm,len); /*i,name,options,r,l+tpeigenvalues[i]*lm,g,ctot+tpeigenvalues[i]*cm,len);*/ } fprintf(stdout,"\n"); fprintf(stdout,"* subcircuit m_%s - modal transformation network for %s\n",name,name); fprintf(stdout,".subckt m_%s", name); for (i=1;i<= 2*num; i++) { fprintf(stdout," %d",i); } fprintf(stdout,"\n"); for (j=1;j<=num;j++) fprintf(stdout,"v%d %d 0 0v\n",j,j+2*num); for (j=1;j<=num;j++) { for (i=1; i<=num; i++) { fprintf(stdout,"f%d 0 %d v%d %0.12g\n", (j-1)*num+i,num+j,i,inverse[j][i]); } } node = 3*num+1; for (j=1;j<=num;j++) { fprintf(stdout,"e%d %d %d %d 0 %0.12g\n", (j-1)*num+1, node, 2*num+j, num+1, matrix[j][1]); node++; for (i=2; i -c\n",argv[0]); fprintf(stderr," -r -g \n"); fprintf(stderr," -k \n"); fprintf(stderr," -x -o \n"); fprintf(stderr," -n -L -h\n"); fprintf(stderr,"Example: %s -n4 -l9e-9 -c20e-12 -r5.3 -x5e-12 -k0.7 -otest -L5.4\n\n",argv[0]); fprintf(stderr,"See \"Efficient Transient Simulation of Lossy Interconnect\",\n"); fprintf(stderr,"J.S. Roychowdhury and D.O. Pederson, Proc. DAC 91 for details\n"); fprintf(stderr,"\n"); fflush(stderr); } void comments(double r,double l,double g,double c,double ctot,double cm,double lm,double k,char *name,int num, double len) { fprintf(stdout,"* Subcircuit %s\n",name); fprintf(stdout,"* %s is a subcircuit that models a %d-conductor transmission line with\n",name,num); fprintf(stdout,"* the following parameters: l=%g, c=%g, r=%g, g=%g,\n",l,c,r,g); fprintf(stdout,"* inductive_coeff_of_coupling k=%g, inter-line capacitance cm=%g,\n",k,cm); fprintf(stdout,"* length=%g. Derived parameters are: lm=%g, ctot=%g.\n",len,lm,ctot); fprintf(stdout,"* \n"); fprintf(stdout,"* It is important to note that the model is a simplified one - the\n"); fprintf(stdout,"* following assumptions are made: 1. The self-inductance l, the\n"); fprintf(stdout,"* self-capacitance ctot (note: not c), the series resistance r and the\n"); fprintf(stdout,"* parallel capacitance g are the same for all lines, and 2. Each line\n"); fprintf(stdout,"* is coupled only to the two lines adjacent to it, with the same\n"); fprintf(stdout,"* coupling parameters cm and lm. The first assumption implies that edge\n"); fprintf(stdout,"* effects have to be neglected. The utility of these assumptions is\n"); fprintf(stdout,"* that they make the sL+R and sC+G matrices symmetric, tridiagonal and\n"); fprintf(stdout,"* Toeplitz, with useful consequences (see \"Efficient Transient\n"); fprintf(stdout,"* Simulation of Lossy Interconnect\", by J.S. Roychowdhury and\n"); fprintf(stdout,"* D.O Pederson, Proc. DAC 91).\n\n"); fprintf(stdout,"* It may be noted that a symmetric two-conductor line is\n"); fprintf(stdout,"* represented accurately by this model.\n\n"); fprintf(stdout,"* Subckt node convention:\n"); fprintf(stdout,"* \n"); fprintf(stdout,"* |--------------------------|\n"); fprintf(stdout,"* 1-----| |-----n+1\n"); fprintf(stdout,"* 2-----| |-----n+2\n"); fprintf(stdout,"* : | n-wire multiconductor | :\n"); fprintf(stdout,"* : | line | :\n"); fprintf(stdout,"* n-1-----|(node 0=common gnd plane) |-----2n-1\n"); fprintf(stdout,"* n-----| |-----2n\n"); fprintf(stdout,"* |--------------------------|\n\n"); fflush(stdout); } double phi(int i, double arg) { double rval; switch (i) { case 0: rval = 1.0; break; case 1: rval = arg; break; default: rval = arg*phi(i-1,arg) - phi(i-2,arg); } return rval; } ngspice-26/src/winmain.h0000644000265600020320000000574312264261473014644 0ustar andreasadmin/* Forwards and external function declarations for winmain.c */ /* Forward definition of main() */ int xmain( int argc, char * argv[]); /* forward of Update function */ #ifdef __CYGWIN__ static char* rlead(char*); #endif void winmessage(char*); static void HistoryInit(void); static void HistoryScroll(void); static void HistoryEnter( char * newLine); static char * HistoryGetPrev(void); static char * HistoryGetNext(void); void WaitForIdle(void); static void WaitForMessage(void); static void ClearInput(void); void SetSource( char * Name); void SetAnalyse(char *, int ); static void AdjustScroller(void); static void _DeleteFirstLine(void); static void AppendChar( char c); static void AppendString( const char * Line); static void DisplayText( void); static int w_getch(void); static int w_putch( int c); static void Main_OnSize(HWND hwnd, UINT state, int cx, int cy); static void PostSpiceCommand( const char * const cmd); static LRESULT CALLBACK MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK StringWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static LRESULT CALLBACK TextWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static void Element_OnPaint(HWND hwnd); static LRESULT CALLBACK ElementWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam); static int MakeArgcArgv(char *cmdline,int *argc,char ***argv); int f_c_l_o_s_e( FILE * __stream); int f_f_l_u_s_h( FILE * __stream); int fg_e_t_c( FILE * __stream); int f_g_e_t_p_o_s( FILE * __stream, fpos_t * __pos); char * fg_e_t_s(char * __s, int __n, FILE * __stream); int fp_r_i_n_t_f(FILE * __stream, const char * __format, ...); int fp_u_t_c(int __c, FILE * __stream); int fp_u_t_s(const char * __s, FILE * __stream); size_t f_r_e_a_d(void * __ptr, size_t __size, size_t __n, FILE * __stream); FILE * f_r_e_o_p_e_n(const char * __path, const char * __mode, FILE * __stream); int fs_c_a_n_f(FILE * __stream, const char * __format, ...); int f_s_e_e_k(FILE * __stream, long __offset, int __whence); int f_s_e_t_p_o_s(FILE * __stream, const fpos_t*__pos); long f_t_e_l_l(FILE * __stream); size_t f_w_r_i_t_e(const void * __ptr, size_t __size, size_t __n, FILE * __stream); char * g_e_t_s(char * __s); void p_e_r_r_o_r(const char * __s); int p_r_i_n_t_f(const char * __format, ...); int p_u_t_s(const char * __s); int s_c_a_n_f(const char * __format, ...); int ung_e_t_c(int __c, FILE * __stream); int vfp_r_i_n_t_f(FILE * __stream, const char * __format, void * __arglist); /*int vfs_c_a_n_f(FILE * __stream, const char * __format, void * __arglist);*/ int vp_r_i_n_t_f(const char * __format, void * __arglist); /*int vs_c_a_n_f(const char * __format, void * __arglist); */ int r_e_a_d(int fd, char * __buf, int __n); int g_e_t_c(FILE * __fp); int g_e_t_char(void); int p_u_t_char(const int __c); int p_u_t_c(const int __c, FILE * __fp); int f_e_o_f(FILE * __fp); int f_e_r_r_o_r(FILE * __fp); int fg_e_t_char(void); int fp_u_t_char(int __c); ngspice-26/src/ngspice.c0000644000265600020320000000570212264261473014620 0ustar andreasadmin/* Configuration file for ngspice */ /********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #define CONFIG #include "ngspice/devdefs.h" #include "ngspice/noisedef.h" #include "ngspice/suffix.h" /* XXX Should be -1 ? There is always an extra null element at the end ? */ static char *specSigList[] = { "time" }; static IFparm nodeParms[] = { IP("nodeset", PARM_NS , IF_REAL, "suggested initial voltage"), IP("ic", PARM_IC , IF_REAL, "initial voltage"), IP("type", PARM_NODETYPE , IF_INTEGER, "output type of equation") }; IFsimulator SIMinfo = { "ngspice", /* my name */ "Circuit level simulation program", /* more about me */ Spice_Version, /* my version */ CKTinit, /* newCircuit function */ CKTdestroy, /* deleteCircuit function */ CKTnewNode, /* newNode function */ CKTground, /* groundNode function */ CKTbindNode, /* bindNode function */ CKTfndNode, /* findNode function */ (int(*)(CKTcircuit *,void *,int,void **,IFuid *)) /* va, type cast for CKTinst2Node */ CKTinst2Node, /* instToNode function */ CKTsetNodPm, /* setNodeParm function */ CKTaskNodQst, /* askNodeQuest function */ CKTdltNod, /* deleteNode function */ CKTcrtElt, /* newInstance function */ CKTparam, /* setInstanceParm function */ CKTask, /* askInstanceQuest function */ CKTfndDev, /* findInstance funciton */ CKTdltInst, /* deleteInstance function */ CKTmodCrt, /* newModel function */ CKTmodParam, /* setModelParm function */ CKTmodAsk, /* askModelQuest function */ CKTfndMod, /* findModel function */ CKTdltMod, /* deleteModel function */ CKTnewTask, /* newTask function */ CKTnewAnal, /* newAnalysis function */ CKTsetAnalPm, /* setAnalysisParm function */ CKTaskAnalQ, /* askAnalysisQuest function */ CKTfndAnal, /* findAnalysis function */ CKTfndTask, /* findTask function */ CKTdelTask, /* deleteTask function */ CKTdoJob, /* doAnalyses function */ CKTtrouble, /* non-convergence message function */ 0, /* Initialized in SIMinit() */ NULL, /* Initialized in SIMinit() */ 0, /* Initialized in SIMinit() */ NULL, /* Initialized in SIMinit() */ NUMELEMS(nodeParms), nodeParms, NUMELEMS(specSigList), specSigList, }; ngspice-26/src/pkgIndex.tcl.in0000644000265600020320000000765012264261473015712 0ustar andreasadmin proc Loadspice { version dir } { package require BLT set suffix [info sharedlibextension] set library spice${suffix} global tcl_platform if { $tcl_platform(platform) == "unix" } { set library [file join $dir lib${library}] } load $library spice blt::vector create ::spice::X_Data blt::vector create ::spice::Y_Data namespace eval spice { namespace export ac help save alias sens alter altermod iplot setcirc asciiplot jobs setplot aspice setscale bg let settype linearize shell bug listing shift show cdump maxstep showmod compose newhelp noise spec cross oldhelp spice dc op spice_data define spice_header deftype plot state delete plot_datapoints status delta plot_date step plot_get_value stop diff plot_name strcmp display plot_nvars tf disto plot_title dowhile plot_variables tran dump print transpose echo pz tutorial edit quit unalias else rehash undefine end repeat unlet reset fourier reshape version spicetoblt resume where get_output rspice get_param run write goto running xgraph hardcopy rusage steps_completed blt_vnum codemodel halt loadsnap savesnap getplot } # Callback functions for the plot command # Warning: if any of these functions return an error then # spice will probably segfault as tcl/tk will overflow somewhere # Note: color is actually spelt COLOUR, which looks much better # Note: they don't work in namespace so have to make global proc spice_gr_NewViewport { } { set width 1000 set height 400 set fontwidth 12 set fontheight 24 canvas .c -width $width -height $height -background white pack .c return "$width $height $fontwidth $fontheight" } proc spice_gr_Close { } { } proc spice_gr_Clear { } { } proc spice_gr_DrawLine { x1 y1 x2 y2 } { puts "draw" .c create line [expr $x1 + 25] [expr 375 - $y1] [expr $x2 + 25] [expr 375 - $y2] } proc spice_gr_Arc { x0 y0 radius theta delta_theta } { .c create arc [expr $x0 - $radius + 25] [expr 375 - $y0 - $radius] \ [expr $x1 + $radius + 25 ] [expr 375 - $y1 + $radius] \ -start $theta -extent [expr $theta + $delta_theta] } proc spice_gr_Text {text x y} { .c create text [expr $x + 25] [expr 375 - $y] -text $text } proc spice_gr_SetLinestyle {linestyleid} { puts "SetLinestyle $linestyleid" } proc spice_gr_SetColor {colorid } { puts "SetColor $colorid $color" } proc spice_gr_Update { } { } # These seem to never be called /* proc spice_gr_DefineColor {colorid red green blue} { puts "DefineColor $colorid $red $green $blue" } proc spice_gr_DefineLinestyle {linestyleid mask} { puts "DefineLinestyle $linestyleid $mask" } proc spice_init_gui { fileName {gui 0} {batchMode 0} {rawFileName ""}} { # source tclcode if {[info procs spicewish::plot] == ""} { source [file join $::spice_library "spice/spicewish.tcl"] } if {!$batchMode} { spice::version } if {$fileName != ""} { switch [file extension $fileName] { ".tcl" { source $fileName } ".raw" { spice::load $fileName } default { spice::source $fileName if {$batchMode} { spice::run if {$rawFileName != ""} { spice::set filetype=binary spice::write $rawFileName } exit } } } } if {$gui == 1} { spicewish::gui } wm withdraw . } set ::spice_version $version set ::spice_library $dir } proc q { } { exit } set version "%VERSION%" set libdir "%LIB_DIR%" package ifneeded spice $version [list Loadspice $version $libdir] ngspice-26/src/xspice/0000755000265600020320000000000012264261712014307 5ustar andreasadminngspice-26/src/xspice/idn/0000755000265600020320000000000012264261712015061 5ustar andreasadminngspice-26/src/xspice/idn/idndig.c0000644000265600020320000002053312264261473016472 0ustar andreasadmin/*============================================================================ FILE IDNdig.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of the 'digital' node type used by 12-state digital models in the code model library. These functions are called exclusively through function pointers in an Evt_Udn_Info_t data structure. INTERFACES Evt_Udn_Info_t idn_digital_info REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cm.h" #include "ngspice/evtudn.h" /* ************************************************************************ */ static void idn_digital_create(void **evt_struct) { /* Malloc space for a digital struct */ *evt_struct = TMALLOC(Digital_t, 1); } /* ************************************************************************ */ static void idn_digital_dismantle(void *evt_struct) { NG_IGNORE(evt_struct); /* Do nothing. There are no internally malloc'ed things to dismantle */ } /* ************************************************************************ */ static void idn_digital_initialize(void *evt_struct) { Digital_t *dig_struct = (Digital_t *) evt_struct; /* Initialize to unknown state and strength */ dig_struct->state = ZERO; dig_struct->strength = UNDETERMINED; } /* ************************************************************************ */ static void idn_digital_invert(void *evt_struct) { Digital_t *dig_struct = (Digital_t *) evt_struct; /* Invert the state */ switch(dig_struct->state) { case ZERO: dig_struct->state = ONE; return; case ONE: dig_struct->state = ZERO; return; default: return; } } /* ************************************************************************ */ static void idn_digital_copy(void *evt_from_struct, void *evt_to_struct) { Digital_t *dig_from_struct = (Digital_t *) evt_from_struct; Digital_t *dig_to_struct = (Digital_t *) evt_to_struct; /* Copy the structure */ dig_to_struct->state = dig_from_struct->state; dig_to_struct->strength = dig_from_struct->strength; } /* ************************************************************************ */ static void idn_digital_resolve(int num_struct, void **evt_struct_array, void *evt_struct) { Digital_t **dig_struct_array; Digital_t *dig_struct; static int map[12][12] = { { 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 2, 2}, { 2, 1, 2, 1, 1, 1, 1, 1, 1, 2, 1, 1}, { 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2}, { 0, 1, 2, 3, 5, 5, 3, 3, 3, 9, 11, 11}, { 0, 1, 2, 5, 4, 5, 4, 4, 4, 11, 10, 11}, { 0, 1, 2, 5, 5, 5, 5, 5, 5, 10, 11, 11}, { 0, 1, 2, 3, 4, 5, 6, 8, 8, 9, 11, 11}, { 0, 1, 2, 3, 4, 5, 8, 7, 8, 11, 10, 11}, { 0, 1, 2, 3, 4, 5, 8, 8, 8, 11, 11, 11}, { 0, 2, 2, 9, 11, 11, 9, 11, 11, 9, 11, 11}, { 2, 1, 2, 11, 10, 11, 11, 10, 11, 11, 10, 11}, { 2, 1, 2, 11, 11, 11, 11, 11, 11, 11, 11, 11} }; int i; int index1; int index2; /* Cast the input void pointers to pointers of the digital type */ dig_struct = (Digital_t *) evt_struct; dig_struct_array = (Digital_t **)evt_struct_array; /* Copy the first member of the array directly to the output */ dig_struct->state = dig_struct_array[0]->state; dig_struct->strength = dig_struct_array[0]->strength; /* Convert struct to index into map */ index1 = (int) (dig_struct->state + dig_struct->strength * 3); /* For the remaining members, perform the resolution algorithm */ for(i = 1; i < num_struct; i++) { /* Convert struct to index into map */ index2 = (int)(dig_struct_array[i]->state + dig_struct_array[i]->strength * 3); /* Compute the result */ index1 = map[index1][index2]; } /* Convert result back to state and strength */ dig_struct->state = (Digital_State_t) (index1 % 3); dig_struct->strength = (Digital_Strength_t) (index1 / 3); } /* ************************************************************************ */ static void idn_digital_compare(void *evt_struct1, void *evt_struct2, Boolean_t *equal) { Digital_t *dig_struct1 = (Digital_t *) evt_struct1; Digital_t *dig_struct2 = (Digital_t *) evt_struct2; /* Compare the structures in order of most likely differences */ if(dig_struct1->state != dig_struct2->state) *equal = FALSE; else if(dig_struct1->strength != dig_struct2->strength) *equal = FALSE; else *equal = TRUE; } /* ************************************************************************ */ static void idn_digital_plot_val(void *evt_struct, char *member, double *val) { Digital_t *dig_struct = (Digital_t *) evt_struct; /* Output a value for the requested member of the digital struct */ if(strcmp(member,"strength") == 0) { /* Choose values that will not make plots lie on state plots */ switch(dig_struct->strength) { case STRONG: *val = 0.1; return; case RESISTIVE: *val = 0.6; return; case HI_IMPEDANCE: *val = 1.1; return; case UNDETERMINED: *val = -0.4; return; } } else { /* member = "state" or anything else */ /* Pick reasonable values */ switch(dig_struct->state) { case ZERO: *val = 0.0; return; case ONE: *val = 1.0; return; case UNKNOWN: *val = 0.5; return; } } } /* ************************************************************************ */ static void idn_digital_print_val(void *evt_struct, char *member, char **val) { Digital_t *dig_struct = (Digital_t *) evt_struct; int index; static char *map[] = { "0s", "1s", "Us", "0r", "1r", "Ur", "0z", "1z", "Uz", "0u", "1u", "Uu" }; /* Output a value for the requested member of the digital struct */ if(strcmp(member,"state") == 0) { /* Pick reasonable values */ switch(dig_struct->state) { case ZERO: *val = "0"; return; case ONE: *val = "1"; return; case UNKNOWN: *val = "U"; return; default: *val = "?"; return; } } else if(strcmp(member,"strength") == 0) { /* Choose values that will not make plots lie on state plots */ switch(dig_struct->strength) { case STRONG: *val = "s"; return; case RESISTIVE: *val = "r"; return; case HI_IMPEDANCE: *val = "z"; return; case UNDETERMINED: *val = "u"; return; default: *val = "?"; return; } } else { index = (int)(dig_struct->state + dig_struct->strength * 3); if((index < 0) || (index > 11)) *val = "??"; else *val = map[index]; return; } } /* ************************************************************************ */ static void idn_digital_ipc_val(void *evt_struct, void **ipc_val, int *ipc_val_size) { /* Return the digital data structure and its size */ *ipc_val = evt_struct; *ipc_val_size = sizeof(Digital_t); } Evt_Udn_Info_t idn_digital_info = { "d", "12 state digital data", idn_digital_create, idn_digital_dismantle, idn_digital_initialize, idn_digital_invert, idn_digital_copy, idn_digital_resolve, idn_digital_compare, idn_digital_plot_val, idn_digital_print_val, idn_digital_ipc_val }; ngspice-26/src/xspice/idn/Makefile.am0000644000265600020320000000045712264261473017127 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libidnxsp.la libidnxsp_la_SOURCES = \ idndig.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/idn/Makefile.in0000644000265600020320000003765412264261541017145 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/idn DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libidnxsp_la_LIBADD = am_libidnxsp_la_OBJECTS = idndig.lo libidnxsp_la_OBJECTS = $(am_libidnxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libidnxsp_la_SOURCES) DIST_SOURCES = $(libidnxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libidnxsp.la libidnxsp_la_SOURCES = \ idndig.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/idn/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/idn/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libidnxsp.la: $(libidnxsp_la_OBJECTS) $(libidnxsp_la_DEPENDENCIES) $(EXTRA_libidnxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libidnxsp_la_OBJECTS) $(libidnxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idndig.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/examples/0000755000265600020320000000000012264261473016131 5ustar andreasadminngspice-26/src/xspice/examples/analog_models1_swept_dc.deck0000644000265600020320000000220212264261473023532 0ustar andreasadminCode Model Test - Swept DC: gain, summer, mult, divide, pwl * * *** analysis type *** .dc v1 .1 10 .1 * *** input sources *** v1 1 0 DC 2 * v2 2 0 DC 2 * *** gain block *** a1 1 10 gain1 .model gain1 gain (in_offset=0.0 gain=2.0 out_offset=0.0) * * *** summer block *** a2 [1 2] 20 summer1 .model summer1 summer (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** mult block *** a3 [1 1] 30 mult1 .model mult1 mult (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=0.1 out_offset=0.0) * * *** divider block *** a4 2 1 40 divide1 .model divide1 divide (num_offset=0.0 num_gain=1.0 den_offset=0.0 den_gain=1.0 + den_lower_limit=1.0e-10 den_domain=1.0e-16 + fraction=false out_gain=1.0 out_offset=0.0) * * *** pwl block *** a5 1 50 pwl1 .model pwl1 pwl (x_array=[-1.0 0.0 1.0 2.0 3.0 4.0 5.0] + y_array=[ 0.0 0.0 1.0 4.0 4.5 5.0 5.0] + input_domain=0.01 fraction=TRUE) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k r3 3 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/digital_models.deck0000644000265600020320000000067012264261473021744 0ustar andreasadminDigital models * * This circuit contains a nand gate oscillator enabled by * a pulse input after 20nS. Node 1 is an analog node. * Nodes 2 and 3 are digital nodes. * .tran 1e-8 1e-7 * v1 1 0 0.0 pulse(0 1 2e-8 1e-9 1e-9) * r1 1 0 1k * a1 [1] [2] atod1 .model atod1 adc_bridge (in_low=0.25 in_high=0.75 + rise_delay=1e-9 fall_delay=1e-9) * a2 [2 3] 3 nand .model nand d_nand (rise_delay=1e-9 fall_delay=1e-9) * .end ngspice-26/src/xspice/examples/initial_conditions.deck0000644000265600020320000000065612264261473022652 0ustar andreasadminCapacitor and inductor with natural initial conditions * * This circuit contains a capacitor and an inductor with * initial conditions on them. Each of the components * has a parallel resistor so that an exponential decay * of the initial condition occurs with a time constant of * 1 second. * .tran 0.1 5 * a1 1 0 cap .model cap capacitor (c=1000uf ic=1) r1 1 0 1k * a2 2 0 ind .model ind inductor (l=1H ic=1) r2 2 0 1.0 * .end ngspice-26/src/xspice/examples/analog_models3_swept_dc.deck0000644000265600020320000000265312264261473023546 0ustar andreasadminCode Model Test - DC: hyst, limit, ilimit, climit, cmeter, lmeter * * *** analysis type *** .dc v1 .1 15 .5 * *** input sources *** v1 1 0 DC 1.0 * v2 2 0 DC 10.0 * v3 3 0 DC -10.0 * * * *** hyst block *** a1 1 10 hyst1 .model hyst1 hyst (in_low=0.0 in_high=1.0 hyst=0.1 out_lower_limit=0.0 + out_upper_limit=1.0 input_domain=0.01 fraction=TRUE) * * *** limit block *** a2 1 20 limit1 .model limit1 limit (in_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 fraction=FALSE) * * *** ilimit block *** a3 1 2 3 30 ilimit1 .model ilimit1 ilimit (in_offset=0.0 gain=1.0 r_out_source=1.0 + r_out_sink=1.0 i_limit_source=1.0 + i_limit_sink=1.0 v_pwr_range=1.0e-3 + i_source_range=1.0e-6 i_sink_range=1.0e-6 + r_out_domain=1.0e-6) * * *** climit block *** a4 1 2 3 40 climit1 .model climit1 climit (in_offset=0.0 gain=1.0 upper_delta=0.0 + lower_delta=0.0 limit_range=1.0e-6 + fraction=FALSE) * * *** cmeter block *** c5 51 0 1.0e-6 a5 51 50 cmeter1 .model cmeter1 cmeter (gain=1.0) * * * *** lmeter block *** l6 61 0 1.0e-6 a6 61 60 lmeter1 .model lmeter1 lmeter (gain=1.0) * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r51 51 0 10k r60 60 0 10k r61 61 0 10k * * .end ngspice-26/src/xspice/examples/parsing.deck0000644000265600020320000000041012264261473020417 0ustar andreasadminParsing * * This circuit contains a simple gain block to demonstrate * that the simulator parses the syntax used to reference * code models. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block .model gain_block gain (gain=10) r2 2 0 1k * .end ngspice-26/src/xspice/examples/spice3.deck0000644000265600020320000000075312264261473020154 0ustar andreasadminA Berkeley SPICE3 compatible circuit * * This circuit contains only Berkeley SPICE3 components. * * The circuit is an AC coupled transistor amplifier with * a sinewave input at node "1", a gain of approximately -3.9, * and output on node "coll". * .tran 1e-5 2e-3 * vcc vcc 0 12.0 vin 1 0 0.0 ac 1.0 sin(0 1 1k) * ccouple 1 base 10uF * rbias1 vcc base 100k rbias2 base 0 24k * q1 coll base emit generic .model generic npn * rcollector vcc coll 3.9k remitter emit 0 1k * .end ngspice-26/src/xspice/examples/analog_models1_dc.deck0000644000265600020320000000215712264261473022321 0ustar andreasadminCode Model Test - DC: gain, summer, mult, divide, pwl * * *** analysis type *** .op * *** input sources *** v1 1 0 DC 2 * v2 2 0 DC 2 * *** gain block *** a1 1 10 gain1 .model gain1 gain (in_offset=0.0 gain=2.0 out_offset=0.0) * * *** summer block *** a2 [1 2] 20 summer1 .model summer1 summer (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** mult block *** a3 [1 1] 30 mult1 .model mult1 mult (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=0.1 out_offset=0.0) * * *** divider block *** a4 2 1 40 divide1 .model divide1 divide (num_offset=0.0 num_gain=1.0 den_offset=0.0 den_gain=1.0 + den_lower_limit=1.0e-10 den_domain=1.0e-16 + fraction=false out_gain=1.0 out_offset=0.0) * * *** pwl block *** a5 1 50 pwl1 .model pwl1 pwl (x_array=[-1.0 0.0 1.0 2.0 3.0 4.0 5.0] + y_array=[ 0.0 0.0 1.0 4.0 4.5 5.0 5.0] + input_domain=0.01 fraction=TRUE) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k r3 3 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/analog_models2_swept_dc.deck0000644000265600020320000000251612264261473023543 0ustar andreasadminCode Model Test - Swept DC: int, d_dt, s_xfer, core, lcouple * * *** analysis type *** .dc v1 .1 10 .5 * *** input sources *** v1 1 0 DC 2 * * *** integrator block *** a1 1 10 int1 .model int1 int (in_offset=0.0 gain=2.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 out_ic=0.0) * * *** differentiator block *** a2 1 20 d_dt1 .model d_dt1 d_dt (out_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6) * * *** s_xfer block *** a3 1 30 filter1 .model filter1 s_xfer (in_offset=0.0 gain=1.0 num_coeff=[1.0] + den_coeff=[1.0 1.414214 1.0] int_ic=[0.0 0.0] + denormalized_freq=1.0) * * * *** magnetic core & inductive coupling *** v40 45 46 0.0 a4 40 45 core1 .model core1 core (H_array=[-2.0 -1.0 1.0 2.0] + B_array=[-2.0 -1.0 1.0 2.0] + area=1.0 length=1.0 input_domain=1.0e-6 + fraction=TRUE mode=1 + in_low=-1.0 in_high=1.0 hyst=0.5 + out_lower_limit=-1.0 out_upper_limit=1.0) * * r5 1 50 100.0 a5 (50 0) (40 46) inductor1 .model inductor1 lcouple (num_turns=10) * * *** resistors to ground *** r1 1 0 1k * r10 10 0 1e12 r20 20 0 1e12 r30 30 0 1e12 r40 40 0 1e12 r45 45 0 1e12 r50 50 0 1e12 * * .end ngspice-26/src/xspice/examples/analog_models2_ac.deck0000644000265600020320000000254012264261473022313 0ustar andreasadminCode Model Test - Swept DC: int, d_dt, s_xfer, core, lcouple * * *** analysis type *** .ac dec 10 10 1000 * * *** input sources *** * v1 1 0 1.0 AC 1.0 0.0 * * *** integrator block *** a1 1 10 int1 .model int1 int (in_offset=0.0 gain=2.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 out_ic=0.0) * * *** differentiator block *** a2 1 20 d_dt1 .model d_dt1 d_dt (out_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6) * * *** s_xfer block *** a3 1 30 filter1 .model filter1 s_xfer (in_offset=0.0 gain=1.0 num_coeff=[1.0] + den_coeff=[1.0 1.414214 1.0] int_ic=[0.0 0.0] + denormalized_freq=628.0) * * * *** magnetic core & inductive coupling *** v40 45 46 0.0 a4 40 45 core1 .model core1 core (H_array=[-2.0 -1.0 1.0 2.0] + B_array=[-2.0 -1.0 1.0 2.0] + area=1.0 length=1.0 input_domain=1.0e-6 + fraction=TRUE mode=1 + in_low=-1.0 in_high=1.0 hyst=0.5 + out_lower_limit=-1.0 out_upper_limit=1.0) * * r5 1 50 100.0 a5 (50 0) (40 46) inductor1 .model inductor1 lcouple (num_turns=10) * * *** resistors to ground *** r1 1 0 1k * r10 10 0 1e12 r20 20 0 1e12 r30 30 0 1e12 r40 40 0 1e12 r45 45 0 1e12 r50 50 0 1e12 * * .end ngspice-26/src/xspice/examples/bad_param_type.deck0000644000265600020320000000043512264261473021732 0ustar andreasadminInvalid parameter type * * This circuit contains a simple gain block to demonstrate * that the simulator reports an error if the parameter value * is invalid. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block .model gain_block gain (gain=false) r2 2 0 1k * .end ngspice-26/src/xspice/examples/mosmem.in0000644000265600020320000000135612264261473017763 0ustar andreasadminmosmem - mos memory cell .width in=72 .opt abstol=1u .opt acct list node .tran 20ns 2us vdd 9 0 dc 5 vs 7 0 pulse(2 0 520ns 20ns 20ns 500ns 2000ns) vw 1 0 pulse(0 2 20ns 20ns 500ns 200ns) vwb 2 0 pulse(2 0 20ns 20ns 20ns 2000ns 2000ns) m1 3 1 0 0 mod w=250u l=5u m2 4 2 0 0 mod w=250u l=5u m3 9 9 3 0 mod w=5u l=5u m4 9 9 4 0 mod w=5u l=5u m5 5 7 3 0 mod w=50u l=5u m6 6 7 4 0 mod w=50u l=5u m7 5 6 0 0 mod w=250u l=5u m8 6 5 0 0 mod w=250u l=5u m9 9 9 5 0 mod w=5u l=5u m10 9 9 6 0 mod w=5u l=5u m11 8 4 0 0 mod w=250u l=5u m12 9 9 8 0 mod w=5u l=5u .model mod nmos(vto=0.5 phi=0.7 kp=1.0e-6 gamma=1.83 lambda=0.115 + level=1 cgso=1u cgdo=1u cbd=50p cbs=50p) .print dc v(5) v(6) .plot dc v(6) .plot tran v(6) v(5) v(7) v(1) v(2) .end ngspice-26/src/xspice/examples/polarity.deck0000644000265600020320000000060012264261473020620 0ustar andreasadminPolarity of voltages and currents * * This circuit contains a set of gain blocks to evaluate * the polarity of voltages and currents on code models * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) * r1 1 0 1k * * a1 %v 1 %v 10 times10 r10 10 0 1k * r1_2 1 2 1k a2 %i 2 %v 11 times10 r11 11 0 1k * a3 1 %i 12 times10 r12 12 0 1k * * .model times10 gain (gain=10) * .end ngspice-26/src/xspice/examples/real_to_v/0000755000265600020320000000000012264261473020103 5ustar andreasadminngspice-26/src/xspice/examples/real_to_v/cfunc.mod0000644000265600020320000000272712264261473021712 0ustar andreasadmin #define TS 0 #define VS 1 void ucm_real_to_v (ARGS) { double *t, *v; double *in; double out; in = INPUT(in); if(INIT) { cm_event_alloc(TS, 2 * sizeof(double)); cm_event_alloc(VS, 2 * sizeof(double)); t = (void *) cm_event_get_ptr(TS, 0); v = (void *) cm_event_get_ptr(VS, 0); t[0] = -2.0; t[1] = -1.0; v[0] = *in; v[1] = *in; } else { t = (void *) cm_event_get_ptr(TS, 0); v = (void *) cm_event_get_ptr(VS, 0); } switch(CALL_TYPE) { case ANALOG: if(TIME == 0.0) { OUTPUT(out) = *in; v[0] = *in; v[1] = *in; } else { if(TIME <= t[0]) OUTPUT(out) = v[0]; else if(TIME >= t[1]) OUTPUT(out) = v[1]; else { OUTPUT(out) = v[0] + (v[1] - v[0]) * (TIME - t[0]) / (t[1] - t[0]); } } break; case EVENT: if(TIME == 0.0) return; if(TIME >= t[1]) { v[0] = v[1]; v[1] = *in; t[0] = TIME; t[1] = TIME + PARAM(transition_time); } else { v[0] = v[0] + (v[1] - v[0]) * (TIME - t[0]) / (t[1] - t[0]); v[1] = *in; t[0] = TIME; t[1] = TIME + PARAM(transition_time); } break; } } ngspice-26/src/xspice/examples/real_to_v/ifspec.ifs0000644000265600020320000000165212264261473022063 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_to_v C_Function_Name: ucm_real_to_v Description: "Node bridge from real to analog voltage" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: real v Allowed_Types: [real] [v, vd, i, id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: gain transition_time Description: "gain" "output transition time" Data_Type: real real Default_Value: 1.0 1e-9 Limits: - [1e-15 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/examples/real_to_v/Makefile0000644000265600020320000000160112264261473021541 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/digital_models3.deck0000644000265600020320000000520112264261473022022 0ustar andreasadminCode Model Test: d latch, set-reset latch, frequency divider * * *** analysis type *** .tran .01s 8s * *** input sources *** * vdata1 100 0 DC PWL( (0 0.0) (2 0.0) (2.0000000001 1.0) (3 1.0) ) * * vdata2 200 0 DC PWL( (0 0.0) (1.0 0.0) (1.0000000001 1.0) (2 1.0) + (2.0000000001 0.0) (3 0.0) (3.0000000001 1.0) (4 1.0) ) * * vclk 300 0 DC PWL( (0 0.0) (0.5 0.0) (0.50000000001 1.0) + (1.0 1.0) (1.00000000001 0.0) + (1.5 0.0) (1.50000000001 1.0) + (2.0 1.0) (2.00000000001 0.0) + (2.5 0.0) (2.50000000001 1.0) + (3.0 1.0) (3.00000000001 0.0) + (3.5 0.0) (3.50000000001 1.0) + (4.0 1.0) (4.00000000001 0.0) + (4.5 0.0) (4.50000000001 1.0) + (5.0 1.0) (5.00000000001 0.0) + (5.5 0.0) (5.50000000001 1.0) + (6.0 1.0) (6.00000000001 0.0) + (6.5 0.0) (6.50000000001 1.0) + (7.0 1.0) (7.00000000001 0.0) + (7.5 0.0) (7.50000000001 1.0) (4.0 1.0) ) * * vset 400 0 DC 0.0 * * vreset 500 0 DC PWL( (0 0.0) (3.8 0.0) (3.80000000001 1.0) (4 1.0) ) * * *** adc_bridge block *** aconverter [100 200 300 400 500] [1 2 3 4 5] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.1 in_high=0.9 + rise_delay=1.0e-12 fall_delay=1.0e-12) * * * *** d latch block *** a1 1 3 4 5 10 11 d_dlatch1 .model d_dlatch1 d_dlatch (data_delay=1.0e-6 enable_delay=2.0e-6 + set_delay=3.0e-6 reset_delay=4.0e-6 + ic=0 + rise_delay=5.0e-6 fall_delay=6.0e-6 + data_load=1.0e-12 enable_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * *** set-reset latch block *** a2 1 2 3 4 5 20 21 d_srlatch1 .model d_srlatch1 d_srlatch (sr_delay=1.0e-6 enable_delay=2.0e-6 + set_delay=3.0e-6 reset_delay=4.0e-6 + ic=0 + rise_delay=5.0e-6 fall_delay=6.0e-6 + sr_load=1.0e-12 enable_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * *** frequency divider block *** a3 3 30 d_fdiv1 .model d_fdiv1 d_fdiv (div_factor=3 high_cycles=2 + i_count=0 rise_delay=1.0e-6 fall_delay=2.0e-6 + freq_in_load=1.0e-12) * * * * * * *** resistors to ground *** r1 100 0 1k r2 200 0 1k r3 300 0 1k r4 400 0 1k r5 500 0 1k * * * .end ngspice-26/src/xspice/examples/digital_models2.deck0000644000265600020320000000473612264261473022035 0ustar andreasadminCode Model Test: d flip-flop, jk flip-flop, toggle ff, set-reset ff * * *** analysis type *** .tran .01s 4s * *** input sources *** * vdata1 100 0 DC PWL( (0 0.0) (2 0.0) (2.0000000001 1.0) (3 1.0) ) * * vdata2 200 0 DC PWL( (0 0.0) (1.0 0.0) (1.0000000001 1.0) (2 1.0) + (2.0000000001 0.0) (3 0.0) (3.0000000001 1.0) (4 1.0) ) * * vclk 300 0 DC PWL( (0 0.0) (0.5 0.0) (0.50000000001 1.0) + (1.0 1.0) (1.00000000001 0.0) + (1.5 0.0) (1.50000000001 1.0) + (2.0 1.0) (2.00000000001 0.0) + (2.5 0.0) (2.50000000001 1.0) + (3.0 1.0) (3.00000000001 0.0) + (3.5 0.0) (3.50000000001 1.0) (4.0 1.0) ) * * vset 400 0 DC 0.0 * * vreset 500 0 DC PWL( (0 0.0) (3.8 0.0) (3.80000000001 1.0) (4 1.0) ) * * *** adc_bridge blocks *** aconverter [100 200 300 400 500] [1 2 3 4 5] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.1 in_high=0.9 + rise_delay=1.0e-12 fall_delay=1.0e-12) * * * *** d flip-flop block *** a1 1 3 4 5 10 11 d_dff1 .model d_dff1 d_dff (clk_delay=1.0e-6 set_delay=2.0e-6 + reset_delay=3.0e-6 ic=0 + rise_delay=4.0e-6 fall_delay=5.0e-6 + data_load=1.0e-12 clk_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * *** jk flip-flop block *** a2 1 2 3 4 5 20 21 d_jkff1 .model d_jkff1 d_jkff (clk_delay=1.0e-6 set_delay=2.0e-6 + reset_delay=3.0e-6 ic=0 + rise_delay=4.0e-6 fall_delay=5.0e-6 + jk_load=1.0e-12 clk_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * *** toggle flip-flop block *** a3 1 3 4 5 30 31 d_tff1 .model d_tff1 d_tff (clk_delay=1.0e-6 set_delay=2.0e-6 + reset_delay=3.0e-6 ic=0 + rise_delay=4.0e-6 fall_delay=5.0e-6 + t_load=1.0e-12 clk_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * *** set-reset flip-flop block *** a4 1 2 3 4 5 40 41 d_srff1 .model d_srff1 d_srff (clk_delay=1.0e-6 set_delay=2.0e-6 + reset_delay=3.0e-6 ic=0 + rise_delay=4.0e-6 fall_delay=5.0e-6 + sr_load=1.0e-12 clk_load=1.0e-12 + set_load=1.0e-12 reset_load=1.0e-12) * * * * *** resistors to ground *** r1 100 0 1k r2 200 0 1k r3 300 0 1k r4 400 0 1k r5 500 0 1k * * * .end ngspice-26/src/xspice/examples/mixed_case.deck0000644000265600020320000000037712264261473021071 0ustar andreasadminMiXeD CaSe * * This circuit contains a simple gain block to demonstrate * that the simulator deck parsing code is case-insensitive. * .TrAn 1E-5 1e-3 * V1 1 0 0.0 sIn(0 1 1k) r1 1 0 1k * A1 1 2 GaIn_BlOcK .MODel gAiN_bLoCk GAin (gaIN=10) r2 2 0 1K * .eNd ngspice-26/src/xspice/examples/mosamp2.in0000644000265600020320000000253312264261473020042 0ustar andreasadminmosamp2 - mos amplifier - transient .options acct abstol=10n vntol=10n .tran 0.1us 10us m1 15 15 1 32 m w=88.9u l=25.4u m2 1 1 2 32 m w=12.7u l=266.7u m3 2 2 30 32 m w=88.9u l=25.4u m4 15 5 4 32 m w=12.7u l=106.7u m5 4 4 30 32 m w=88.9u l=12.7u m6 15 15 5 32 m w=44.5u l=25.4u m7 5 20 8 32 m w=482.6u l=12.7u m8 8 2 30 32 m w=88.9u l=25.4u m9 15 15 6 32 m w=44.5u l=25.4u m10 6 21 8 32 m w=482.6u l=12.7u m11 15 6 7 32 m w=12.7u l=106.7u m12 7 4 30 32 m w=88.9u l=12.7u m13 15 10 9 32 m w=139.7u l=12.7u m14 9 11 30 32 m w=139.7u l=12.7u m15 15 15 12 32 m w=12.7u l=207.8u m16 12 12 11 32 m w=54.1u l=12.7u m17 11 11 30 32 m w=54.1u l=12.7u m18 15 15 10 32 m w=12.7u l=45.2u m19 10 12 13 32 m w=270.5u l=12.7u m20 13 7 30 32 m w=270.5u l=12.7u m21 15 10 14 32 m w=254u l=12.7u m22 14 11 30 32 m w=241.3u l=12.7u m23 15 20 16 32 m w=19u l=38.1u m24 16 14 30 32 m w=406.4u l=12.7u m25 15 15 20 32 m w=38.1u l=42.7u m26 20 16 30 32 m w=381u l=25.4u m27 20 15 66 32 m w=22.9u l=7.6u cc 7 9 40pf cl 66 0 70pf vin 21 0 pulse(0 5 1ns 1ns 1ns 5us 10us) vccp 15 0 dc +15 vddn 30 0 dc -15 vb 32 0 dc -20 .model m nmos(nsub=2.2e15 uo=575 ucrit=49k uexp=0.1 tox=0.11u xj=2.95u + level=2 cgso=1.5n cgdo=1.5n cbd=4.5f cbs=4.5f ld=2.4485u nss=3.2e10 + kp=2e-5 phi=0.6 ) .print tran v(20) v(66) .plot tran v(20) v(66) .end ngspice-26/src/xspice/examples/dot_model_ref.deck0000644000265600020320000000041612264261473021564 0ustar andreasadminModel card reference * * This circuit contains simple gain blocks that share a * single .model card. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block r2 2 0 1k * a2 1 3 gain_block r3 3 0 1k * .model gain_block gain (in_offset = 1 gain=10) * .end ngspice-26/src/xspice/examples/long_names.deck0000644000265600020320000000100012264261473021072 0ustar andreasadminLong names * * This circuit contains a sine wave source followed by a * gain block code model with a gain of 10. Long names * are used for instances, models, and nodes. * .tran 1e-5 1e-3 * v1_123456789_123456789_1234 1 0 0.0 sin(0 1 2k) * r1_123456789_123456789_1234 1 0 1k * a1_123456789_123456789_1234 1 out_123456789_123456789_1234 + gain_block_123456789_123456789_1234 * .model gain_block_123456789_123456789_1234 gain (gain=10) r2_123456789_123456789_1234 out_123456789_123456789_1234 0 1k * .end ngspice-26/src/xspice/examples/user_defined_nodes.deck0000644000265600020320000000120112264261473022577 0ustar andreasadminUser defined nodes * * This circuit contains a mix of node types including * two 'real' type user-defined nodes and associated * node bridges. * .tran 1e-6 1e-4 * v1 1 0 0.0 pulse(0 1 2e-5) r1 1 0 1k * abridge1 [1] [enable] node_bridge1 .model node_bridge1 adc_bridge * aclk [enable clk] clk nand .model nand d_nand (rise_delay=1e-5 fall_delay=1e-5) * abridge2 clk enable real_node1 node_bridge2 .model node_bridge2 d_to_real (zero=-1 one=1) * again real_node1 real_node2 times10 .model times10 real_gain (gain=10) * abridge3 real_node2 analog_node node_bridge3 .model node_bridge3 real_to_v * rout analog_node 0 1k * * .end ngspice-26/src/xspice/examples/hybrid_models1_dc.deck0000644000265600020320000000155512264261473022342 0ustar andreasadminCode Model Test - DC: d_osc, dac_bridge, adc_bridge * * *** analysis type *** .op * *** input sources *** v1 1 0 DC 2 * v2 2 0 DC 2 * *** d_osc block *** a1 1 10 d_osc1 .model d_osc1 d_osc (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[100 100 1000 1000] + duty_cycle=0.5 init_phase=0.0 + rise_delay=1.0e-6 fall_delay=2.0e-6) * *** dac_bridge block *** a2 [10] [20] dac_bridge1 .model dac_bridge1 dac_bridge (out_low=0.5 out_high=4.5 out_undef=1.8 + input_load=1.0e-12 + t_rise=1.0e-6 t_fall=2.0e-6) * * *** adc_bridge block *** a3 [2] [30] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.7 in_high=2.4 + rise_delay=1.0e-12 fall_delay=2.0e-12) * * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k * r20 20 0 1k * * .end ngspice-26/src/xspice/examples/io_ordering.deck0000644000265600020320000000056412264261473021266 0ustar andreasadminIO ordering * * This circuit contains a simple gain block. The order of * the nodes listed on the instance line follows the order * of the connections defined in the 'ifspec.ifs' file for * the model. Refer to /atesse-su/src/cml/gain/ifspec.ifs . * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block .model gain_block gain (gain=10) r2 2 0 1k * .end ngspice-26/src/xspice/examples/schmitt.in0000644000265600020320000000104012264261473020127 0ustar andreasadminschmitt ckt - ecl compatible schmitt trigger .width in=72 .opt acct list node lvlcod=2 .tran 10ns 1000ns vin 1 0 pulse(-1.6 -1.2 10ns 400ns 400ns 100ns 10000ns) vee 8 0 -5 rin 1 2 50 rc1 0 3 50 r1 3 5 185 r2 5 8 760 rc2 0 6 100 re 4 8 260 rth1 7 8 125 rth2 7 0 85 cload 7 0 5pf q1 3 2 4 qstd off q2 6 5 4 qstd q3 0 6 7 qstd q4 0 6 7 qstd .model qstd npn(is=1.0e-16 bf=50 br=0.1 rb=50 rc=10 tf=0.12ns tr=5ns + cje=0.4pf pe=0.8 me=0.4 cjc=0.5pf pc=0.8 mc=0.333 ccs=1pf va=50) .print tran v(1) v(3) v(5) v(6) .plot tran v(3) v(5) v(6) v(1) .end ngspice-26/src/xspice/examples/digital_models1.deck0000644000265600020320000000332412264261473022024 0ustar andreasadminCode Model Test: buffer, inverter, and, nand, or, nor, xor, xnor * * *** analysis type *** .tran .01s 4s * *** input sources *** * v2 200 0 DC PWL( (0 0.0) (2 0.0) (2.0000000001 1.0) (3 1.0) ) * v1 100 0 DC PWL( (0 0.0) (1.0 0.0) (1.0000000001 1.0) (2 1.0) + (2.0000000001 0.0) (3 0.0) (3.0000000001 1.0) (4 1.0) ) * * *** adc_bridge blocks *** aconverter [200 100] [2 1] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.1 in_high=0.9 + rise_delay=1.0e-12 fall_delay=1.0e-12) * * * *** buffer block *** a1 1 10 d_buffer1 .model d_buffer1 d_buffer (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** inverter block *** a2 1 20 d_inv1 .model d_inv1 d_inverter (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** and block *** a3 [1 2] 30 d_and1 .model d_and1 d_and (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** nand block *** a4 [1 2] 40 d_nand1 .model d_nand1 d_nand (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** or block *** a5 [1 2] 50 d_or1 .model d_or1 d_or (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** nor block *** a6 [1 2] 60 d_nor1 .model d_nor1 d_nor (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** xor block *** a7 [1 2] 70 d_xor1 .model d_xor1 d_xor (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * *** xnor block *** a8 [1 2] 80 d_xnor1 .model d_xnor1 d_xnor (rise_delay=1.0e-6 fall_delay=2.0e-6 + input_load=1.0e-12) * * * *** resistors to ground *** r1 100 0 1k r2 200 0 1k * * * .end ngspice-26/src/xspice/examples/suffixes.deck0000644000265600020320000000101112264261473020606 0ustar andreasadminEngineering suffixes * * This circuit contains a code model which accepts several * parameters of various types and prints them. The values * specified on the .model card use engineering suffixes on * the numeric parameters. * .op * r1 1 0 1k r2 2 0 1k r3 1 2 1k * a1 [1 2] mod .model mod print_param_types + integer=2k + real=3.0u + complex=< 4.0f 5.0mil > + string=six + integer_array=[7meg 8] + real_array=[9.0n 10.0p] + complex_array=[< 11.0t 12.0g > < 13.0m 14.0 >] + string_array=[fifteen sixteen] * .end ngspice-26/src/xspice/examples/analog_models3_ac.deck0000644000265600020320000000267112264261473022321 0ustar andreasadminCode Model Test - AC: hyst, limit, ilimit, climit, cmeter, lmeter * * *** analysis type *** .ac dec 10 10 1000 * * *** input sources *** * v1 1 0 1.0 AC 1.0 0.0 * v2 2 0 DC 10.0 * v3 3 0 DC -10.0 * * * *** hyst block *** a1 1 10 hyst1 .model hyst1 hyst (in_low=0.0 in_high=1.0 hyst=0.1 out_lower_limit=0.0 + out_upper_limit=1.0 input_domain=0.01 fraction=TRUE) * * *** limit block *** a2 1 20 limit1 .model limit1 limit (in_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 fraction=FALSE) * * *** ilimit block *** a3 1 2 3 30 ilimit1 .model ilimit1 ilimit (in_offset=0.0 gain=1.0 r_out_source=1.0 + r_out_sink=1.0 i_limit_source=1.0 + i_limit_sink=1.0 v_pwr_range=1.0e-3 + i_source_range=1.0e-6 i_sink_range=1.0e-6 + r_out_domain=1.0e-6) * * *** climit block *** a4 1 2 3 40 climit1 .model climit1 climit (in_offset=0.0 gain=1.0 upper_delta=0.0 + lower_delta=0.0 limit_range=1.0e-6 + fraction=FALSE) * * *** cmeter block *** c5 51 0 1.0e-6 a5 51 50 cmeter1 .model cmeter1 cmeter (gain=1.0) * * * *** lmeter block *** l6 61 0 1.0e-6 a6 61 60 lmeter1 .model lmeter1 lmeter (gain=1.0) * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r51 51 0 10k r60 60 0 10k r61 61 0 10k * * .end ngspice-26/src/xspice/examples/hybrid_models1_transient.deck0000644000265600020320000000165412264261473023763 0ustar andreasadminCode Model Test - Transient: d_osc, dac_bridge, adc_bridge * * *** analysis type *** .tran .01s 1s * *** input sources *** * v1 1 0 DC PWL( (0 0.0) (1 1.0) ) * v2 2 0 DC PWL( (0 0.0) (1 5.0) ) * * *** d_osc block *** a1 1 10 d_osc1 .model d_osc1 d_osc (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 8.0 8.0] + duty_cycle=0.5 init_phase=0.0 + rise_delay=1.0e-6 fall_delay=2.0e-6) * *** dac_bridge block *** a2 [10] [20] dac_bridge1 .model dac_bridge1 dac_bridge (out_low=0.5 out_high=4.5 out_undef=1.8 + input_load=1.0e-12 + t_rise=1.0e-6 t_fall=2.0e-6) * * *** adc_bridge block *** a3 [2] [30] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.7 in_high=2.4 + rise_delay=1.0e-12 fall_delay=2.0e-12) * * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k * r20 20 0 1k * * .end ngspice-26/src/xspice/examples/real_delay/0000755000265600020320000000000012264261473020232 5ustar andreasadminngspice-26/src/xspice/examples/real_delay/cfunc.mod0000644000265600020320000000166712264261473022043 0ustar andreasadmin #define CLK_STATE 0 void ucm_real_delay (ARGS) { double *in; double *out; Digital_State_t *state; Digital_State_t *old_state; if(INIT) { cm_event_alloc(CLK_STATE, sizeof(Digital_State_t)); state = (void *) cm_event_get_ptr(CLK_STATE, 0); old_state = state; *state = INPUT_STATE(clk); } else { state = (void *) cm_event_get_ptr(CLK_STATE, 0); old_state = (void *) cm_event_get_ptr(CLK_STATE, 1); } if(ANALYSIS != TRANSIENT) OUTPUT_CHANGED(out) = FALSE; else { *state = INPUT_STATE(clk); if(*state == *old_state) OUTPUT_CHANGED(out) = FALSE; else if(*state != ONE) OUTPUT_CHANGED(out) = FALSE; else { in = INPUT(in); out = OUTPUT(out); *out = *in; OUTPUT_DELAY(out) = PARAM(delay); } } } ngspice-26/src/xspice/examples/real_delay/ifspec.ifs0000644000265600020320000000162112264261473022206 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_delay C_Function_Name: ucm_real_delay Description: "A Z ** -1 block working on real data" PORT_TABLE: Port_Name: in clk out Description: "input" "clock" "output" Direction: in in out Default_Type: real d real Allowed_Types: [real] [d] [real] Vector: no no no Vector_Bounds: - - - Null_Allowed: no no no PARAMETER_TABLE: Parameter_Name: delay Description: "delay from clk to out" Data_Type: real Default_Value: 1e-9 Limits: [1e-15 -] Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/examples/real_delay/Makefile0000644000265600020320000000160112264261473021670 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/analog_models1_transient.deck0000644000265600020320000000221312264261473023733 0ustar andreasadminCode Model Test - Transient: gain, summer, mult, divide, pwl * * *** analysis type *** .tran .1s 10s * *** input sources *** * v1 1 0 DC PWL(0 0 10 10) * v2 2 0 DC 2 * *** gain block *** a1 1 10 gain1 .model gain1 gain (in_offset=0.0 gain=2.0 out_offset=0.0) * * *** summer block *** a2 [1 2] 20 summer1 .model summer1 summer (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** mult block *** a3 [1 1] 30 mult1 .model mult1 mult (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=0.1 out_offset=0.0) * * *** divider block *** a4 2 1 40 divide1 .model divide1 divide (num_offset=0.0 num_gain=1.0 den_offset=0.0 den_gain=1.0 + den_lower_limit=0.1 den_domain=1.0e-16 + fraction=false out_gain=1.0 out_offset=0.0) * * *** pwl block *** a5 1 50 pwl1 .model pwl1 pwl (x_array=[-1.0 0.0 1.0 2.0 3.0 4.0 5.0] + y_array=[ 0.0 0.0 1.0 4.0 4.5 5.0 5.0] + input_domain=0.01 fraction=TRUE) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k r3 3 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/nco/0000755000265600020320000000000012264261473016710 5ustar andreasadminngspice-26/src/xspice/examples/nco/cfunc.mod0000644000265600020320000000421212264261473020506 0ustar andreasadmin void *malloc(unsigned); #define OUT_STATE 0 #define NXT_TIME 1 #define NUM_NOTES 128 /* A numerically controlled oscillator. Output frequencies */ /* are determined according to the MIDI note number at input */ void ucm_nco (ARGS) { double *freq; int *output_state; double *next_time; int i; int index; int scale_factor; double half_period; if(INIT) { /* Setup storage for the toggled output state */ cm_event_alloc(OUT_STATE, sizeof(int)); cm_event_alloc(NXT_TIME, sizeof(double)); output_state = (int *) cm_event_get_ptr(OUT_STATE, 0); next_time = (double *) cm_event_get_ptr(NXT_TIME, 0); /* Allocate storage for frequencies */ STATIC_VAR(freq) = malloc(NUM_NOTES * sizeof(double)); freq = STATIC_VAR(freq); /* Initialize the frequency array */ for(i = 0; i < NUM_NOTES; i++) { if(i == 0) freq[0] = 8.17578 * PARAM(mult_factor); else freq[i] = freq[i-1] * 1.059463094; } } else { /* Get old output state */ output_state = (int *) cm_event_get_ptr(OUT_STATE, 0); next_time = (double *) cm_event_get_ptr(NXT_TIME, 0); } /* Convert the input bits to an integer */ index = 0; scale_factor = 64; for(i = 0; i < 7; i++) { if(INPUT_STATE(in[i]) == ONE) index += scale_factor; scale_factor /= 2; } /* Look up the frequency and compute half its period */ freq = STATIC_VAR(freq); half_period = 1.0 / freq[index]; /* Queue up events and output the new state */ if(TIME == 0.0) { *next_time = half_period; cm_event_queue(*next_time); OUTPUT_STATE(out) = *output_state; } else { if(TIME == *next_time) { *next_time = TIME + half_period; cm_event_queue(*next_time); *output_state = 1 - *output_state; OUTPUT_STATE(out) = *output_state; OUTPUT_DELAY(out) = PARAM(delay); } else OUTPUT_CHANGED(out) = FALSE; } } ngspice-26/src/xspice/examples/nco/ifspec.ifs0000644000265600020320000000202312264261473020661 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: nco C_Function_Name: ucm_nco Description: "A simple MIDI numerically controlled oscillator" PORT_TABLE: Port_Name: in out Description: "program input" "oscillator output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: yes no Vector_Bounds: [7 7] - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: delay mult_factor Description: "output delay" "freq multiplier" Data_Type: real real Default_Value: 1e-9 1 Limits: [1e-15 -] [1e-9 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes STATIC_VAR_TABLE: Static_Var_Name: freq Data_Type: pointer Description: "frequencies of notes" ngspice-26/src/xspice/examples/nco/Makefile0000644000265600020320000000160112264261473020346 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/digital_invert.deck0000644000265600020320000000050312264261473021763 0ustar andreasadminDigital inversions * .tran 1e-8 1e-6 * v1 1 0 0.0 pulse(0 1 0 1e-8 1e-8 0.25e-6 0.5e-6) r1 1 0 1k * a1 [1] [2] adc .model adc adc_bridge * a2 2 3 inv a3 2 ~4 inv a4 ~2 5 inv a5 ~2 ~6 inv .model inv d_inverter * a6 [2 ~4] 7 nand .model nand d_nand * a8 [2 3 4 5 6 7] [12 13 14 15 16 17] dac .model dac dac_bridge * .end ngspice-26/src/xspice/examples/rtlinv.in0000644000265600020320000000064212264261473020001 0ustar andreasadminrtlinv ckt - cascaded rtl inverters .width in=72 .opt acct list node lvlcod=2 .dc vin 0.0 2.5 0.025 .tran 2ns 200ns vcc 6 0 5 vin 1 0 pulse(0 5 2ns 2ns 2ns 80ns) rb1 1 2 10k rc1 6 3 1k q1 3 2 0 qnd rb2 3 4 10k q2 5 4 0 qnd rc2 6 5 1k .model qnd npn(bf=50 rb=70 rc=40 ccs=2pf tf=0.1ns tr=10ns cje=0.9pf + cjc=1.5pf pc=0.85 va=50) .print dc v(3) v(5) .plot dc v(3) .print tran v(3) v(5) .plot tran v(3) v(5) v(1) .end ngspice-26/src/xspice/examples/mixed_ref.deck0000644000265600020320000000122112264261473020717 0ustar andreasadminMixed references * * This circuit demonstrates the use of single-ended and * differential inputs and outputs. * * Note that digital models reference a single node for * their inputs and output (i.e. they are single-ended) * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 5k) v2 2 0 0.0 sin(0 1 1k) * r1 1 0 1k r2 2 0 1k * * a1 %v 1 %i 10 times10 r10 10 0 1k * * a2 %vd (1 2) %id(11 12) times10 r11 11 0 1k r12 12 0 1k r11_12 11 12 1.0 * * r3 2 3 1k a3 %i 3 %v 13 times10 r13 13 0 1k * a4 [1] [digital_node1] adc .model adc adc_bridge * a5 digital_node1 digital_node2 inv .model inv d_inverter * * .model times10 gain (gain=10) * .end ngspice-26/src/xspice/examples/analog_models4_transient.deck0000644000265600020320000000357412264261473023751 0ustar andreasadminCode Model Test - Transient: sine, triangle, aswitch, zener, oneshot * * *** analysis type *** .tran .01ms 2ms * *** input sources *** * v1 1 0 DC 0.0 PWL(0 0 2e-3 2) * v2 2 0 DC 0.0 PWL(0 0 2e-3 10) * v3 3 0 DC 0.0 PWL(0 0.0 0.9e-3 0.0 1e-3 1.0 1.9e-3 1.0 2e-3 0.0 2.9e-3 0.0) * v4 4 0 DC 1.0 * * *** sine block *** a1 2 10 sine1 .model sine1 sine (cntl_array=[-1.0 0.0 10.0 20.0] + freq_array=[500 500 2000 2000] + out_low=-1.0 out_high=1.0) * * *** triangle block *** a2 1 20 triangle1 .model triangle1 triangle (cntl_array=[-1.0 0.0 10.0 20.0] + freq_array=[500 500 10000 10000] + out_low=-1.0 out_high=1.0 duty_cycle=0.5) * * *** aswitch block *** a3 1 (4 30) aswitch1 .model aswitch1 aswitch (cntl_off=0.0 cntl_on=1.0 log=TRUE + r_off=1.0e12 r_on=10.0) * * *** zener diode *** rzener 2 40 100 a4 (0 40) zener1 .model zener1 zener (v_breakdown=9.0 i_breakdown=2.0e-2 + r_breakdown=1.0 i_rev=1.0e-6 i_sat=1.0e-12 + n_forward=1.0 limit_switch=FALSE) * * *** oneshot block *** a5 3 1 0 50 oneshot1 .model oneshot1 oneshot (cntl_array=[-1.0 0.0 1.0 2.0] + pw_array=[2.0e-3 2.0e-3 0.1e-3 0.1e-3] clk_trig=0.5 + pos_edge_trig=TRUE out_low=0.0 out_high=1.0 + rise_time=1.0e-6 rise_delay=1.0e-9 + fall_delay=1.0e-9 fall_time=1.0e-6 + retrig=FALSE) * * *** square block *** a6 2 60 square1 .model square1 square (cntl_array=[-1.0 0.0 10.0 20.0] + freq_array=[500 500 7000 7000] + out_low=-0.8 out_high=1.2 duty_cycle=0.5 + rise_time=1e-6 fall_time=2e-6) * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k r4 4 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r60 60 0 10k * * .end ngspice-26/src/xspice/examples/mixed_mode.deck0000644000265600020320000000421412264261473021074 0ustar andreasadminMixed IO types * * This circuit contains a mixture of IO types, including * analog, digital, user-defined (real), and 'null'. * * The circuit demonstrates the use of the digital and * user-defined node capability to model system-level designs * such as sampled-data filters. The simulated circuit * contains a digital oscillator enabled after 100us. The * square wave oscillator output is divided by 8 with a * ripple counter. The result is passed through a digital * filter to convert it to a sine wave. * .tran 1e-5 1e-3 * v1 1 0 0.0 pulse(0 1 1e-4 1e-6) r1 1 0 1k * abridge1 [1] [enable] atod .model atod adc_bridge * aclk [enable clk] clk nand .model nand d_nand (rise_delay=1e-5 fall_delay=1e-5) * adiv2 div2_out clk NULL NULL NULL div2_out dff adiv4 div4_out div2_out NULL NULL NULL div4_out dff adiv8 div8_out div4_out NULL NULL NULL div8_out dff .model dff d_dff * abridge2 div8_out enable filt_in node_bridge2 .model node_bridge2 d_to_real (zero=-1 one=1) * xfilter filt_in clk filt_out dig_filter * abridge3 filt_out a_out node_bridge3 .model node_bridge3 real_to_v * rlpf1 a_out oa_minus 10k * xlpf 0 oa_minus lpf_out opamp * rlpf2 oa_minus lpf_out 10k clpf lpf_out oa_minus 0.01uF * * .subckt dig_filter filt_in clk filt_out * .model n0 real_gain (gain=1.0) .model n1 real_gain (gain=2.0) .model n2 real_gain (gain=1.0) .model g1 real_gain (gain=0.125) .model zm1 real_delay .model d0a real_gain (gain=-0.75) .model d1a real_gain (gain=0.5625) .model d0b real_gain (gain=-0.3438) .model d1b real_gain (gain=1.0) * an0a filt_in x0a n0 an1a filt_in x1a n1 an2a filt_in x2a n2 * az0a x0a clk x1a zm1 az1a x1a clk x2a zm1 * ad0a x2a x0a d0a ad1a x2a x1a d1a * az2a x2a filt1_out g1 az3a filt1_out clk filt2_in zm1 * an0b filt2_in x0b n0 an1b filt2_in x1b n1 an2b filt2_in x2b n2 * az0b x0b clk x1b zm1 az1b x1b clk x2b zm1 * ad0 x2b x0b d0b ad1 x2b x1b d1b * az2b x2b clk filt_out zm1 * .ends dig_filter * * .subckt opamp plus minus out * r1 plus minus 300k a1 %vd (plus minus) outint lim .model lim limit (out_lower_limit = -12 out_upper_limit = 12 + fraction = true limit_range = 0.2 gain=300e3) r3 outint out 50.0 r2 out 0 1e12 * .ends opamp * * .end ngspice-26/src/xspice/examples/analog_models3_dc.deck0000644000265600020320000000263612264261473022325 0ustar andreasadminCode Model Test - DC: hyst, limit, ilimit, climit, cmeter, lmeter * * *** analysis type *** .op * *** input sources *** v1 1 0 DC 1.0 * v2 2 0 DC 10.0 * v3 3 0 DC -10.0 * * * *** hyst block *** a1 1 10 hyst1 .model hyst1 hyst (in_low=0.0 in_high=1.0 hyst=0.1 out_lower_limit=0.0 + out_upper_limit=1.0 input_domain=0.01 fraction=TRUE) * * *** limit block *** a2 1 20 limit1 .model limit1 limit (in_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 fraction=FALSE) * * *** ilimit block *** a3 1 2 3 30 ilimit1 .model ilimit1 ilimit (in_offset=0.0 gain=1.0 r_out_source=1.0 + r_out_sink=1.0 i_limit_source=1.0 + i_limit_sink=1.0 v_pwr_range=1.0e-3 + i_source_range=1.0e-3 i_sink_range=1.0e-3 + r_out_domain=1.0e-3) * * *** climit block *** a4 1 2 3 40 climit1 .model climit1 climit (in_offset=0.0 gain=1.0 upper_delta=0.0 + lower_delta=0.0 limit_range=1.0e-6 + fraction=FALSE) * * *** cmeter block *** c5 51 0 1.0e-6 a5 51 50 cmeter1 .model cmeter1 cmeter (gain=1.0) * * * *** lmeter block *** l6 61 0 1.0e-6 a6 61 60 lmeter1 .model lmeter1 lmeter (gain=1.0) * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r51 51 0 10k r60 60 0 10k r61 61 0 10k * * .end ngspice-26/src/xspice/examples/analog_models1_ac.deck0000644000265600020320000000230512264261473022311 0ustar andreasadminCode Model Test - AC: gain, summer, mult, divide, pwl * * *** analysis type *** .ac dec 10 10 1000 * *** input sources *** * v1 1 0 1.0 AC 1.0 0.0 * v2 2 0 1.0 AC 1.0 0.0 * v3 3 0 DC 2.0 * v4 4 0 0.5 AC 0.5 0.0 * *** gain block *** a1 1 10 gain1 .model gain1 gain (in_offset=0.0 gain=2.0 out_offset=0.0) * * *** summer block *** a2 [1 2] 20 summer1 .model summer1 summer (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** mult block *** a3 [1 3] 30 mult1 .model mult1 mult (in_offset=[0.0 0.0] in_gain=[1.0 1.0] + out_gain=1.0 out_offset=0.0) * * *** divider block *** a4 1 3 40 divide1 .model divide1 divide (num_offset=0.0 num_gain=1.0 den_offset=0.0 den_gain=1.0 + den_lower_limit=1.0e-10 den_domain=1.0e-16 + fraction=false out_gain=1.0 out_offset=0.0) * * *** pwl block *** a5 4 50 pwl1 .model pwl1 pwl (x_array=[-1.0 0.0 1.0 2.0 3.0 4.0 5.0] + y_array=[-1.0 0.0 1.0 4.0 4.5 5.0 5.0] + input_domain=0.01 fraction=TRUE) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k r3 3 0 1k r4 4 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/real_gain/0000755000265600020320000000000012264261473020052 5ustar andreasadminngspice-26/src/xspice/examples/real_gain/cfunc.mod0000644000265600020320000000132612264261473021653 0ustar andreasadmin void ucm_real_gain (ARGS) { double *in; double *out; double in_offset; double gain; double out_offset; double delay; double ic; /* Get the input and output pointers */ in = INPUT(in); out = OUTPUT(out); /* Get the parameters */ in_offset = PARAM(in_offset); gain = PARAM(gain); out_offset = PARAM(out_offset); delay = PARAM(delay); ic = PARAM(ic); /* Assign the output and delay */ if(ANALYSIS == DC) { *out = ic; if(INIT) cm_event_queue(delay); } else { *out = gain * (*in + in_offset) + out_offset; OUTPUT_DELAY(out) = delay; } } ngspice-26/src/xspice/examples/real_gain/ifspec.ifs0000644000265600020320000000261512264261473022032 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_gain C_Function_Name: ucm_real_gain Description: "A gain block for event-driven real data" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: real real Allowed_Types: [real] [real] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain out_offset Description: "input offset" "gain" "output offset" Data_Type: real real real Default_Value: 0.0 1.0 0.0 Limits: - - - Vector: no no no Vector_Bounds: - - - Null_Allowed: yes yes yes PARAMETER_TABLE: Parameter_Name: delay ic Description: "delay" "initial condition" Data_Type: real real Default_Value: 1.0e-9 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/examples/real_gain/Makefile0000644000265600020320000000160112264261473021510 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/xspice.deck0000644000265600020320000000057312264261473020261 0ustar andreasadminA simple XSPICE amplifier circuit * * This uses an XSPICE "gain" code model to substitute for * the transistor amplifier circuit in spice3.deck. * .tran 1e-5 2e-3 * vin 1 0 0.0 ac 1.0 sin(0 1 1k) * ccouple 1 in 10uF * * rzin in 0 19.35k * aamp in coll gain_block .model gain_block gain (gain = -3.9 out_offset = 7.003) * rzout out coll 3.9k rbig coll 0 1e12 * * .end ngspice-26/src/xspice/examples/diffpair.in0000644000265600020320000000101112264261473020236 0ustar andreasadmindifpair ckt - simple differential pair *.width in=72 .opt acct list node lvlcod=2 *.tf v(5) vin *.dc vin -0.25 0.25 0.005 *.ac dec 10 1 10ghz .tran 5ns 500ns vin 1 0 sin(0 0.1 5meg) ac 1 vcc 8 0 12 vee 9 0 -12 q1 4 2 6 qnl q2 5 3 6 qnl rs1 1 2 1k rs2 3 0 1k rc1 4 8 10k rc2 5 8 10k q3 6 7 9 qnl q4 7 7 9 qnl rbias 7 8 20k .model qnl npn(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf + va=50) .print dc v(4) v(5) .plot dc v(5) .print ac vm(5) vp(5) .plot ac vm(5) vp(5) .print tran v(4) v(5) .plot tran v(5) .end ngspice-26/src/xspice/examples/io_types.deck0000644000265600020320000000132612264261473020616 0ustar andreasadminIO types * * This circuit contains a mix of input output types including * voltages, currents, digital signals, and user defined * signals. * .tran 1e-6 1e-4 * v1 1 0 0.0 pulse(0 1 2e-5) r1 1 0 1k * abridge1 [1] [enable] node_bridge1 .model node_bridge1 adc_bridge * aclk [enable clk] clk nand .model nand d_nand (rise_delay=1e-5 fall_delay=1e-5) * abridge2 clk enable real_node1 node_bridge2 .model node_bridge2 d_to_real (zero=-1 one=1) * again real_node1 real_node2 times10 .model times10 real_gain (gain=10) * abridge3 real_node2 analog_node node_bridge3 .model node_bridge3 real_to_v * rout analog_node 0 1k * again %vnam v1 %i i_out gain_block .model gain_block gain (gain=10) ri_out i_out 0 1k * * .end ngspice-26/src/xspice/examples/analog_models4_swept_dc.deck0000644000265600020320000000276212264261473023550 0ustar andreasadminCode Model Test - Swept DC: sine, triangle, aswitch, zener, oneshot * * *** analysis type *** .dc v1 .1 15 .5 * *** input sources *** v1 1 0 DC 1.0 * v2 2 0 DC 1.0 * v3 3 0 DC 1.0 * * *** sine block *** a1 1 10 sine1 .model sine1 sine (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0) * * *** triangle block *** a2 1 20 triangle1 .model triangle1 triangle (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0 duty_cycle=0.8) * * *** aswitch block *** a3 1 (2 30) aswitch1 .model aswitch1 aswitch (cntl_off=0.0 cntl_on=1.0 log=TRUE + r_off=1.0e12 r_on=10.0) * * *** zener diode *** r4 1 40 100 a4 (0 40) zener1 .model zener1 zener (v_breakdown=8.0 i_breakdown=2.0e-2 + r_breakdown=1.0 i_rev=1.0e-6 i_sat=1.0e-12 + n_forward=1.0 limit_switch=FALSE) * * *** oneshot block *** a5 3 1 2 50 oneshot1 .model oneshot1 oneshot (cntl_array=[-1.0 0.0 1.0 2.0] + pw_array=[1.0 1.0 0.1 0.1] clk_trig=0.5 + pos_edge_trig=TRUE out_low=0.0 out_high=1.0 + rise_time=1.0e-6 rise_delay=1.0e-9 + fall_delay=1.0e-9 fall_time=1.0e-6 + retrig=FALSE) * * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r60 60 0 10k * * .end ngspice-26/src/xspice/examples/bad_io.deck0000644000265600020320000000052012264261473020173 0ustar andreasadminInvalid number of inputs/outputs * * This circuit contains a simple gain block to demonstrate * that the simulator reports an error if the number of * connections on the code model is incorrect. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 3 gain_block a2 1 gain_block .model gain_block gain (gain=10) r2 2 0 1k * .end ngspice-26/src/xspice/examples/print_param_types/0000755000265600020320000000000012264261473021671 5ustar andreasadminngspice-26/src/xspice/examples/print_param_types/cfunc.mod0000644000265600020320000000202712264261473023471 0ustar andreasadmin void ucm_print_param_types (ARGS) { int i; if(INIT) { /* Print scalar parameters */ printf("\nScalar parameters\n\n"); printf("integer = %d\n", PARAM(integer)); printf("real = %e\n", PARAM(real)); printf("complex = <%e %e>\n", PARAM(complex).real, PARAM(complex).imag); printf("string = %s\n", PARAM(string)); /* Print vector parameters */ printf("\nVector parameters\n\n"); for(i = 0; i < PARAM_SIZE(integer_array); i++) printf("integer = %d\n", PARAM(integer_array[i])); for(i = 0; i < PARAM_SIZE(real_array); i++) printf("real = %e\n", PARAM(real_array[i])); for(i = 0; i < PARAM_SIZE(complex_array); i++) printf("complex = <%e %e>\n", PARAM(complex_array[i]).real, PARAM(complex_array[i]).imag); for(i = 0; i < PARAM_SIZE(string_array); i++) printf("string = %s\n", PARAM(string_array[i])); } } ngspice-26/src/xspice/examples/print_param_types/ifspec.ifs0000644000265600020320000000501112264261473023642 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: print_param_types C_Function_Name: ucm_print_param_types Description: "ignores its input, but prints its parameters" PORT_TABLE: Port_Name: in Description: "input" Direction: in Default_Type: v Allowed_Types: [v,vd,i,id,vnam] Vector: yes Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: integer Description: "integer parameter" Data_Type: int Default_Value: 1 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: real Description: "real parameter" Data_Type: real Default_Value: 1 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: complex Description: "complex parameter" Data_Type: complex Default_Value: <1.0, 1.0> Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: string Description: "string parameter" Data_Type: string Default_Value: "one" Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: integer_array Description: "integer array parameter" Data_Type: int Default_Value: 1 Limits: - Vector: yes Vector_Bounds: in Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: real_array Description: "real array parameter" Data_Type: real Default_Value: 1 Limits: - Vector: yes Vector_Bounds: in Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: complex_array Description: "complex array parameter" Data_Type: complex Default_Value: <1.0 1.0> Limits: - Vector: yes Vector_Bounds: in Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: string_array Description: "string array parameter" Data_Type: string Default_Value: "one" Limits: - Vector: yes Vector_Bounds: in Null_Allowed: yes ngspice-26/src/xspice/examples/print_param_types/Makefile0000644000265600020320000000160112264261473023327 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/rca3040.in0000644000265600020320000000177712264261473017551 0ustar andreasadminrca3040 ckt - rca 3040 wideband amplifier .ac dec 10 1 10ghz .dc vin -0.25 0.25 0.005 .tran 2.0ns 200ns vin 1 0 sin(0 0.1 50meg 0.5ns) ac 1 vcc 2 0 15.0 vee 3 0 -15.0 rs1 30 1 1k rs2 31 0 1k r1 5 3 4.8k r2 6 3 4.8k r3 9 3 811 r4 8 3 2.17k r5 8 0 820 r6 2 14 1.32k r7 2 12 4.5k r8 2 15 1.32k r9 16 0 5.25k r10 17 0 5.25k q1 2 30 5 qnl q2 2 31 6 qnl q3 10 5 7 qnl q4 11 6 7 qnl q5 14 12 10 qnl q6 15 12 11 qnl q7 12 12 13 qnl q8 13 13 0 qnl q9 7 8 9 qnl q10 2 15 16 qnl q11 2 14 17 qnl .model qnl npn bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf + cjc=2pf va 50 .end ngspice-26/src/xspice/examples/analog_models4_dc.deck0000644000265600020320000000273712264261473022330 0ustar andreasadminCode Model Test - DC: sine triangle aswitch zener oneshot * * *** analysis type *** .op * *** input sources *** v1 1 0 DC 1.0 * v2 2 0 DC 1.0 * v3 3 0 DC 1.0 * * *** sine block *** a1 1 10 sine1 .model sine1 sine (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0) * * *** triangle block *** a2 1 20 triangle1 .model triangle1 triangle (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0 duty_cycle=0.8) * * *** aswitch block *** a3 1 (2 30) aswitch1 .model aswitch1 aswitch (cntl_off=0.0 cntl_on=1.0 log=TRUE + r_off=1.0e12 r_on=10.0) * * *** zener diode *** r4 1 40 10K a4 (40 0) zener1 .model zener1 zener (v_breakdown=10.0 i_breakdown=2.0e-2 + r_breakdown=1.0 i_rev=1.0e-6 i_sat=1.0e-12 + n_forward=1.0 limit_switch=FALSE) * * *** oneshot block *** a5 3 1 2 50 oneshot1 .model oneshot1 oneshot (cntl_array=[-1.0 0.0 1.0 2.0] + pw_array=[1.0 1.0 0.1 0.1] clk_trig=0.5 + pos_edge_trig=TRUE out_low=0.0 out_high=1.0 + rise_time=1.0e-6 rise_delay=1.0e-9 + fall_delay=1.0e-9 fall_time=1.0e-6 + retrig=FALSE) * * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r60 60 0 10k * * .end ngspice-26/src/xspice/examples/arbitrary_phase.deck0000644000265600020320000000054612264261473022145 0ustar andreasadminArbitrary Phase SIN and PULSE Sources * * This circuit generates two cycles of sine and square waves * beginning at +45 degrees. * * Phase shift is specified after Berkeley defined parameters * on the independent source cards. * .tran 2e-5 2e-3 * v1 1 0 0.0 sin(0 1 1k 0 0 45.0) r1 1 0 1k * v2 2 0 0.0 pulse(-1 1 0 1e-5 1e-5 5e-4 1e-3 45.0) r2 2 0 1k * .end ngspice-26/src/xspice/examples/param_defaults.deck0000644000265600020320000000036212264261473021751 0ustar andreasadminParameter defaults * * This circuit contains a code model with * parameters of various types, which are all defaulted, * and prints the default values. * .op * r1 1 0 1k r2 2 0 1k r3 1 2 1k * a1 [1 2] mod .model mod print_param_types * .end ngspice-26/src/xspice/examples/analog_models3_transient.deck0000644000265600020320000000267512264261473023751 0ustar andreasadminCode Model Test - Transient: hyst, limit, ilimit, climit, cmeter, lmeter * * *** analysis type *** .tran .1s 15s * *** input sources *** * v1 1 0 DC PWL(0 0 15 15) * v2 2 0 DC 10.0 * v3 3 0 DC -10.0 * * * *** hyst block *** a1 1 10 hyst1 .model hyst1 hyst (in_low=0.0 in_high=1.0 hyst=0.1 out_lower_limit=0.0 + out_upper_limit=1.0 input_domain=0.01 fraction=TRUE) * * *** limit block *** a2 1 20 limit1 .model limit1 limit (in_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 fraction=FALSE) * * *** ilimit block *** a3 1 2 3 30 ilimit1 .model ilimit1 ilimit (in_offset=0.0 gain=1.0 r_out_source=1.0 + r_out_sink=1.0 i_limit_source=1.0 + i_limit_sink=1.0 v_pwr_range=1.0e-3 + i_source_range=1.0e-6 i_sink_range=1.0e-6 + r_out_domain=1.0e-6) * * *** climit block *** a4 1 2 3 40 climit1 .model climit1 climit (in_offset=0.0 gain=1.0 upper_delta=0.0 + lower_delta=0.0 limit_range=1.0e-6 + fraction=FALSE) * * *** cmeter block *** c5 51 0 1.0e-6 a5 51 50 cmeter1 .model cmeter1 cmeter (gain=1.0) * * * *** lmeter block *** l6 61 0 1.0e-6 a6 61 60 lmeter1 .model lmeter1 lmeter (gain=1.0) * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r51 51 0 10k r60 60 0 10k r61 61 0 10k * * .end ngspice-26/src/xspice/examples/analog_models4_ac.deck0000644000265600020320000000300212264261473022307 0ustar andreasadminCode Model Test - DC: sine, triangle, aswitch, zener, oneshot * * *** analysis type *** .ac dec 10 10 1000 * * *** input sources *** * v1 1 0 1.0 AC 1.0 0.0 * v2 2 0 DC 1.0 * v3 3 0 DC 1.0 * * * * *** sine block *** a1 1 10 sine1 .model sine1 sine (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0) * * *** triangle block *** a2 1 20 triangle1 .model triangle1 triangle (cntl_array=[-1.0 0.0 1.0 2.0] + freq_array=[1.0 1.0 100.0 100.0] + out_low=-1.0 out_high=1.0 duty_cycle=0.8) * * *** aswitch block *** a3 1 (2 30) aswitch1 .model aswitch1 aswitch (cntl_off=0.0 cntl_on=1.0 log=TRUE + r_off=1.0e12 r_on=10.0) * * *** zener diode *** r4 1 40 10K a4 (40 0) zener1 .model zener1 zener (v_breakdown=10.0 i_breakdown=2.0e-2 + r_breakdown=1.0 i_rev=1.0e-6 i_sat=1.0e-12 + n_forward=1.0 limit_switch=FALSE) * * *** oneshot block *** a5 3 1 2 50 oneshot1 .model oneshot1 oneshot (cntl_array=[-1.0 0.0 1.0 2.0] + pw_array=[1.0 1.0 0.1 0.1] clk_trig=0.5 + pos_edge_trig=TRUE out_low=0.0 out_high=1.0 + rise_time=1.0e-6 rise_delay=1.0e-9 + fall_delay=1.0e-9 fall_time=1.0e-6 + retrig=FALSE) * * * * *** resistors to ground *** r1 1 0 10k r2 2 0 10k r3 3 0 10k * r10 10 0 10k r20 20 0 10k r30 30 0 10k r40 40 0 10k r50 50 0 10k r60 60 0 10k * * .end ngspice-26/src/xspice/examples/bad_name.deck0000644000265600020320000000046012264261473020507 0ustar andreasadminUnknown code model name * * This circuit contains a simple gain block to demonstrate * that the simulator reports an error if the code model name * is incorrect. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block .model gain_block this_model_doesnt_exist (gain=10) r2 2 0 1k * .end ngspice-26/src/xspice/examples/d_to_real/0000755000265600020320000000000012264261473020061 5ustar andreasadminngspice-26/src/xspice/examples/d_to_real/cfunc.mod0000644000265600020320000000124412264261473021661 0ustar andreasadmin void ucm_d_to_real (ARGS) { Digital_State_t in; double *out; double delay; double zero; double one; double ena; in = INPUT_STATE(in); if(PORT_NULL(enable)) ena = 1.0; else if(INPUT_STATE(enable) == ONE) ena = 1.0; else ena = 0.0; out = OUTPUT(out); zero = PARAM(zero); one = PARAM(one); delay = PARAM(delay); if(in == ZERO) *out = zero * ena; else if(in == UNKNOWN) *out = (zero + one) / 2.0 * ena; else *out = one * ena; if(TIME > 0.0) OUTPUT_DELAY(out) = delay; } ngspice-26/src/xspice/examples/d_to_real/ifspec.ifs0000644000265600020320000000230612264261473022036 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: d_to_real C_Function_Name: ucm_d_to_real Description: "Node bridge from digital to real with enable" PORT_TABLE: Port_Name: in enable out Description: "input" "enable" "output" Direction: in in out Default_Type: d d real Allowed_Types: [d] [d] [real] Vector: no no no Vector_Bounds: - - - Null_Allowed: no yes no PARAMETER_TABLE: Parameter_Name: zero one delay Description: "value for 0" "value for 1" "delay" Data_Type: real real real Default_Value: 0.0 1.0 1e-9 Limits: - - [1e-15 -] Vector: no no no Vector_Bounds: - - - Null_Allowed: yes yes yes ngspice-26/src/xspice/examples/d_to_real/Makefile0000644000265600020320000000160112264261473021517 0ustar andreasadmin# # Makefile for Code Model directories # # Include global XSPICE selections for CC and other macros include /usr/local/xspice-1-0/include/make.include INCLUDE = -I. -I$(ROOT)/include/sim CFLAGS = -g #----------------------------------------------------------------------------- # Edit the following definition to specify the object files that comprise # your code model. If your code model is completely specified in the # cfunc.mod file, there is no need to edit this definition. # DO NOT include the ifspec.o file. CODE_MODEL_OBJECTS = cfunc.o #----------------------------------------------------------------------------- # DO NOT MODIFY THE FOLLOWING DEFINITIONS: .SUFFIXES: $(SUFFIXES) .mod .ifs .mod.c: $(BINDIR)/cmpp -mod $< .ifs.c: $(BINDIR)/cmpp -ifs .c.o: $*.c ${CC} ${CFLAGS} ${INCLUDE} -c $*.c all : ifspec.o $(CODE_MODEL_OBJECTS) cfunc.o : cfunc.c ifspec.o : ifspec.c ngspice-26/src/xspice/examples/bad_param.deck0000644000265600020320000000053012264261473020665 0ustar andreasadminUnknown code model parameter * * This circuit contains a simple gain block to demonstrate * that the simulator reports an error if the .model card * references a parameter that doesn't exist * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * a1 1 2 gain_block .model gain_block gain (this_parameter_doesnt_exist=2 gain=10) r2 2 0 1k * .end ngspice-26/src/xspice/examples/param_types.deck0000644000265600020320000000062312264261473021306 0ustar andreasadminParameter types * * This circuit contains a code model which accepts several * parameters of various types and prints them. * .op * r1 1 0 1k r2 2 0 1k r3 1 2 1k * a1 [1 2] mod .model mod print_param_types + integer=2 + real=3.0 + complex=<4.0 5.0> + string=six + integer_array=[7 8] + real_array=[9.0 10.0] + complex_array=[< 11.0 12.0 > < 13.0 14.0 >] + string_array=[fifteen sixteen] * .end ngspice-26/src/xspice/examples/mixed_io_size.deck0000644000265600020320000000112512264261473021607 0ustar andreasadminMixed IO sizes * * This circuit contains a collection of digital and analog * models with saclar and vector inputs of varying sizes. * .tran 1e-5 1e-3 * v1 1 0 0.0 pulse(0 1 1e-4) r1 1 0 1k * v2 2 0 0.0 sin(0 1 2k) r2 2 0 1k * abridge1 [1] [enable] atod .model atod adc_bridge * aosc [enable clk] clk nand .model nand d_nand (rise_delay=1e-4 fall_delay=1e-4) * ainv clk clk_bar inv .model inv d_inverter (rise_delay=1e-5 fall_delay=1e-5) * adac [clk clk_bar] [3 4] dac .model dac dac_bridge (t_rise=1e-5 t_fall=1e-5) * asum [1 2 3 4] 5 sum .model sum summer * r3 3 0 1k r4 4 0 1k r5 5 0 1k * .end ngspice-26/src/xspice/examples/bad_io_type.deck0000644000265600020320000000101612264261473021235 0ustar andreasadminInvalid input/output type * * This circuit contains a simple gain block to demonstrate * that the simulator reports an error if an invalid type * is used with the code model connections. * .tran 1e-5 1e-3 * v1 1 0 0.0 sin(0 1 1k) r1 1 0 1k * * Both connections on the gain block must be analog, but * the second is specified as digital * a1 1 %d 2 gain_block .model gain_block gain (gain=10) r2 2 0 1k * * Node 1 below should be a digital node, but is an analog node * a2 [1] [3] dac .model dac dac_bridge r3 3 0 1k * .end ngspice-26/src/xspice/examples/analog_models2_transient.deck0000644000265600020320000000257712264261473023751 0ustar andreasadminCode Model Test - Transient: int, d_dt, s_xfer, core, lcouple * * *** analysis type *** .tran .1s 10s * *** input sources *** * v1 1 0 DC PWL(0 0 10 10) * v2 2 0 DC PWL(0 0 0.1 0.1 0.2 0.9 0.3 1.0 10 1.0) * * * *** integrator block *** a1 1 10 int1 .model int1 int (in_offset=0.0 gain=2.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 out_ic=0.0) * * *** differentiator block *** a2 1 20 d_dt1 .model d_dt1 d_dt (out_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6) * * *** s_xfer block *** a3 2 30 filter1 .model filter1 s_xfer (in_offset=0.0 gain=1.0 num_coeff=[1.0] + den_coeff=[1.0 1.414214 1.0] int_ic=[0.0 0.0] + denormalized_freq=1.0) * * * *** magnetic core & inductive coupling *** a4 40 45 core1 .model core1 core (H_array=[-2.0 -1.0 1.0 2.0] + B_array=[-2.0 -1.0 1.0 2.0] + area=1.0 length=1.0 input_domain=1.0e-6 + fraction=TRUE mode=1 + in_low=-1.0 in_high=1.0 hyst=0.5 + out_lower_limit=-1.0 out_upper_limit=1.0) * * r5 1 50 100.0 a5 (50 0) (40 45) inductor1 .model inductor1 lcouple (num_turns=10) * * *** resistors to ground *** r1 1 0 1k r2 2 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/supply_ramping.deck0000644000265600020320000000075612264261473022042 0ustar andreasadminSupply ramping option * * This circuit demonstrates the use of the option * "ramptime" which ramps independent sources and the * capacitor and inductor initial conditions from * zero to their final value during the time period * specified. * * .tran 0.1 5 .option ramptime=0.2 * a1 1 0 cap .model cap capacitor (c=1000uf ic=1) r1 1 0 1k * a2 2 0 ind .model ind inductor (l=1H ic=1) r2 2 0 1.0 * v1 3 0 1.0 r3 3 0 1k * i1 4 0 1e-3 r4 4 0 1k * v2 5 0 0.0 sin(0 1 0.3 0 0 45.0) r5 5 0 1k * .end ngspice-26/src/xspice/examples/analog_models2_dc.deck0000644000265600020320000000240012264261473022311 0ustar andreasadminCode Model Test - DC: int, d_dt, s_xfer, core, lcouple * * *** analysis type *** .op * *** input sources *** v1 1 0 DC 1.0 * * * * *** integrator block *** a1 1 10 int1 .model int1 int (in_offset=0.0 gain=2.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6 out_ic=0.0) * * *** differentiator block *** a2 1 20 d_dt1 .model d_dt1 d_dt (out_offset=0.0 gain=1.0 out_lower_limit=-1.0e6 + out_upper_limit=1.0e6 limit_range=1.0e-6) * * *** s_xfer block *** a3 1 30 filter1 .model filter1 s_xfer (in_offset=0.0 gain=1.0 num_coeff=[1.0] + den_coeff=[1.0 1.425625 1.516203] int_ic=[0.0 0.0] + denormalized_freq=6283.2) * * *** magnetic core & inductive coupling *** a4 40 45 core1 .model core1 core (H_array=[-2.0 -1.0 1.0 2.0] + B_array=[-2.0 -1.0 1.0 2.0] + area=1.0 length=1.0 input_domain=1.0e-6 + fraction=TRUE mode=1 + in_low=-1.0 in_high=1.0 hyst=0.5 + out_lower_limit=-1.0 out_upper_limit=1.0) * * r5 1 50 100.0 a5 (50 0) (40 45) inductor1 .model inductor1 lcouple (num_turns=10) * * *** resistors to ground *** r1 1 0 1k * r10 10 0 1k r20 20 0 1k r30 30 0 1k r40 40 0 1k r50 50 0 1k * * .end ngspice-26/src/xspice/examples/digital_models4.deck0000644000265600020320000000466712264261473022042 0ustar andreasadminCode Model Test: State Machine, RAM * * *** analysis type *** .tran .01s 8s * *** input sources *** * vdata1 100 0 DC PWL( (0 0.0) (2 0.0) (2.0000000001 1.0) (3 1.0) + (3.5000000001 0.0) (4 0.0) ) * * vdata2 200 0 DC PWL( (0 0.0) (1.0 0.0) (1.0000000001 1.0) (2 1.0) + (2.0000000001 0.0) (3 0.0) (3.0000000001 1.0) (4 1.0) ) * * vclk 300 0 DC PWL( (0 0.0) (0.5 0.0) (0.50000000001 1.0) + (1.0 1.0) (1.00000000001 0.0) + (1.5 0.0) (1.50000000001 1.0) + (2.0 1.0) (2.00000000001 0.0) + (2.5 0.0) (2.50000000001 1.0) + (3.0 1.0) (3.00000000001 0.0) + (3.5 0.0) (3.50000000001 1.0) + (4.0 1.0) (4.00000000001 0.0) + (4.5 0.0) (4.50000000001 1.0) + (5.0 1.0) (5.00000000001 0.0) + (5.5 0.0) (5.50000000001 1.0) + (6.0 1.0) (6.00000000001 0.0) + (6.5 0.0) (6.50000000001 1.0) + (7.0 1.0) (7.00000000001 0.0) + (7.5 0.0) (7.50000000001 1.0) (4.0 1.0) ) * vaddr1 400 0 DC 0 * * vaddr2 500 0 DC PWL( (0 0.0) (0.6 0.0) (0.60000000001 1.0) + (0.9 1.0) (0.90000000001 0.0) + (2.6 0.0) (2.60000000001 1.0) + (2.9 1.0) (2.90000000001 0.0) (3.0 0.0) ) * * * vselect 600 0 DC PWL( (0 0.0) (1.0 0.0) (2.0000000001 1.0) (2 1.0) ) * * * * * *** adc_bridge block *** aconverter [100 200 300 400 500 600] [1 2 3 4 5 6] adc_bridge1 .model adc_bridge1 adc_bridge (in_low=0.1 in_high=0.9 + rise_delay=1.0e-12 fall_delay=1.0e-12) * * * *** state machine block *** a1 [1 2] 3 4 [10 11] d_state1 .model d_state1 d_state (clk_delay=1.0e-6 reset_delay=2.0e-6 + state_file=state.txt reset_state=0 + input_load=1.0e-12 clk_load=1.0e-12 + reset_load=1.0e-12) * * *** RAM block *** a2 [1 2] [20 21] [3 4] 5 [6] d_ram1 .model d_ram1 d_ram (select_value=1 ic=0 + read_delay=1.0e-6 data_load=1.0e-12 + address_load=1.0e-12 select_load=1.0e-12 + enable_load=1.0e-12) * * * * * *** resistors to ground *** r1 100 0 10k r2 200 0 10k r3 300 0 10k r4 400 0 10k r5 500 0 10k r6 600 0 10k * * * .end ngspice-26/src/xspice/enh/0000755000265600020320000000000012264261712015061 5ustar andreasadminngspice-26/src/xspice/enh/enh.c0000644000265600020320000000374412264261473016013 0ustar andreasadmin/*============================================================================ FILE ENH.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains routines used for general enhancements made to the Berkeley SPICE3 core. INTERFACES ENHreport_conv_prob() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /*=== INCLUDE FILES ===*/ #include #include "ngspice/enh.h" /* ENHreport_conv_prob() Report convergence problem messages from nodes, branch currents, or instances. This function is setup to allow providing the SI with information identifying the type of convergence problem. For now, it simply writes to stdout. */ void ENHreport_conv_prob( Enh_Conv_Source_t type, /* node, branch, or instance */ char *name, /* the name of the node/branch/instance */ char *msg) /* an optional message */ { char *type_str; char *msg_str; /* Convert the type enum to a string for printing */ switch(type) { case ENH_ANALOG_NODE: case ENH_EVENT_NODE: type_str = "node"; break; case ENH_ANALOG_BRANCH: type_str = "branch current"; break; case ENH_ANALOG_INSTANCE: case ENH_EVENT_INSTANCE: case ENH_HYBRID_INSTANCE: type_str = "instance"; break; default: printf("\nERROR: Internal error in ENHreport_conv_prob - impossible type\n"); return; } /* Check for msg == NULL and turn into null string */ if(msg) msg_str = msg; else msg_str = ""; /* Print the convergence problem report */ printf("\nWARNING: Convergence problems at %s (%s). %s\n", type_str, name, msg_str); } /* ENHreport_conv_prob */ ngspice-26/src/xspice/enh/enhtrans.c0000644000265600020320000003560212264261473017061 0ustar andreasadmin/* =========================================================================== FILE ENHtranslate_poly.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS 7/24/2012 Holger Vogt Update to error messages SUMMARY This file contains functions used by the simulator in calling the internal "poly" code model to substitute for SPICE 2G6 style poly sources found in the input deck. INTERFACES ENHtranslate_poly() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ /*=== FUNCTION PROTOTYPES ===*/ //void free(void *); //ka removed compiler error /* int atoi(char *); */ /*=== INCLUDE FILES ===*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" //#include "misc.h" #include "ngspice/fteinp.h" #include "ngspice/enh.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/mifproto.h" /* #include "suffix.h" */ /*=== FUNCTION PROTOTYPES ===*/ static int needs_translating(char *card); static int count_tokens(char *card); static char *two2three_translate(char *orig_card, char **inst_card, char **mod_card); static int get_poly_dimension(char *card); /* ENHtranslate_poly() Translate all 2G6 style polynomial controlled sources in the deck to new polynomial controlled source code model syntax. */ /*---------------------------------------------------------------------*/ /* ENHtranslate_poly takes (a pointer to) the SPICE deck as argument. */ /* It loops through the deck, and translates all POLY statements */ /* in dependent sources into a .model conformant with the needs of */ /* XSPICE. It splices the new statements in the deck, and comments */ /* out the old dependent source. */ /* It returns (a pointer to) the processed deck. */ /*---------------------------------------------------------------------*/ struct line * ENHtranslate_poly( struct line *deck) { /* Linked list of lines in input deck */ struct line *d; struct line *l1; struct line *l2; char *card; /* Iterate through each card in the deck and translate as needed */ for(d = deck; d; d = d->li_next) { #ifdef TRACE /* SDB debug statement */ printf("In ENHtranslate_poly, now examining card %s . . . \n", d->li_line); #endif /* If doesn't need to be translated, continue to next card */ if(! needs_translating(d->li_line)) { #ifdef TRACE /* SDB debug statement */ /* printf("Card doesn't need translating. Continuing . . . .\n"); */ #endif continue; } #ifdef TRACE /* SDB debug statement */ printf("Found a card to translate . . . .\n"); #endif /* Create two new line structs and splice into deck */ l1 = alloc(struct line); l2 = alloc(struct line); l2->li_next = d->li_next; l1->li_next = l2; d->li_next = l1; /* PN 2004: Add original linenumber to ease the debug process * for malfromned netlist */ l1->li_linenum = d->li_linenum; l2->li_linenum = d->li_linenum; /* Create the translated cards */ d->li_error = two2three_translate(d->li_line, &(l1->li_line), &(l2->li_line)); /* Comment out the original line */ card = TMALLOC(char, strlen(d->li_line) + 2); strcpy(card,"*"); strcat(card, d->li_line); d->li_line = card; #ifdef TRACE /* SDB debug statement */ printf("In ENHtranslate_poly, translated card = %s . . . \n", card); #endif /* Advance deck pointer to last line added */ d = l2; } /* Return head of deck */ return(deck); } /* ENHtranslate_poly */ /*---------------------------------------------------------------------*/ /* needs_translating() Test to see if card needs translating. Return true if card defines an e,f,g, or h controlled source, has too many tokens to be a simple linear dependent source and contains the 'poly' token. Otherwise return false. */ static int needs_translating( char *card) /* the card text to check */ { #ifdef TRACE /* SDB debug statement */ /* printf("In needs_translating, examining card %s . . . \n", card); */ #endif switch(*card) { case 'e': case 'E': case 'g': case 'G': if(count_tokens(card) > 6) return(1); else return(0); case 'f': case 'F': case 'h': case 'H': if(count_tokens(card) > 5) return(1); else return(0); default: return(0); } } /* needs_translating */ /*---------------------------------------------------------------------*/ /* count_tokens() Count and return the number of tokens on the card. */ static int count_tokens( char *card) /* the card text on which to count tokens */ { int i; bool has_poly = FALSE; /* Get and count tokens until end of line reached and find the "poly" token */ for(i = 0; *card != '\0'; i++) { char *newtoken; newtoken = MIFgettok(&card); if ((i == 3) && ciprefix(newtoken, "poly")) has_poly = TRUE; txfree(newtoken); } /* no translation, if 'poly' not in the line */ if (!has_poly) i=0; return(i); } /* count_tokens */ /********************************************************************/ /*==================================================================== two2three_translate() Do the syntax translation of the 2G6 source to the new code model syntax. The translation proceeds according to the template below. -------------------------------------------- VCVS: ename N+ N- POLY(dim) NC+ NC- P0 P1 P2 . . . N+ N- = outputs NC+ NC- = inputs aname %vd[NC+ NC-] %vd[N+ N-] pname .model pname spice2poly(coef=P0 P1 P2 . . . ) %vd[NC+ NC-] = inputs %vd[N+ N-] = outputs -------------------------------------------- CCCS fname N+ N- POLY(dim) Vname P0 P1 P2 . . . N+ N- = outputs Vname = input voltage source (measures current) aname %vnam[Vname] %id[N+ N-] pname .model pname spice2poly(coef=P0 P1 P2 . . . ) %vnam[Vname] = input %id[N+ N-] = output -------------------------------------------- VCCS gname N+ N- POLY(dim) NC+ NC- P0 P1 P2 , , , N+ N- = outputs NC+ NC- = inputs aname %vd[NC+ NC-] %id[N+ N-] pname .model pname spice2poly(coef=P0 P1 P2 . . . ) %vd[NC+ NC-] = inputs %id[N+ N-] = outputs -------------------------------------------- CCVS hname N+ N- POLY(dim) Vname P0 P1 P2 . . . N+ N- = outputs Vname = input voltage source (measures current) aname %vnam[Vname] %vd[N+ N-] pname .model pname spice2poly(coef=P0 P1 P2 . . . ) %vnam[Vname] = input %vd[N+ N-] = output ====================================================================*/ /********************************************************************/ static char *two2three_translate( char *orig_card, /* the original untranslated card */ char **inst_card, /* the instance card created by the translation */ char **mod_card) /* the model card created by the translation */ { int dim; int num_tokens; int num_conns; int num_coefs; size_t inst_card_len; size_t mod_card_len; int i; char type; char *tok; char *name; char **out_conn; char **in_conn; char **coef; char *card; #ifdef TRACE /* SDB debug statement */ printf("In two2three_translate, card to translate = %s . . .\n", orig_card); #endif /* Put the first character into local storage for checking type */ type = *orig_card; /* Count the number of tokens for use in parsing */ num_tokens = count_tokens(orig_card); /* Determine the dimension of the poly source */ /* Note that get_poly_dimension returns 0 for "no poly", -1 for invalid dimensiion, otherwise returns numeric value of POLY */ dim = get_poly_dimension(orig_card); if(dim == -1) { char *errmsg; printf("ERROR in two2three_translate -- Argument to poly() is not an integer\n"); printf("ERROR while parsing: %s\n", orig_card); errmsg = copy("ERROR in two2three_translate -- Argument to poly() is not an integer\n"); *inst_card = copy(" * ERROR Argument to poly() is not an integer"); *mod_card = copy(" * ERROR Argument to poly() is not an integer"); return errmsg; } /* Compute number of output connections based on type and dimension */ switch(type) { case 'E': case 'e': case 'G': case 'g': num_conns = 2 * dim; break; default: num_conns = dim; } /* Compute number of coefficients. Return error if less than one. */ if(dim == 0) num_coefs = num_tokens - num_conns - 3; /* no POLY token */ else num_coefs = num_tokens - num_conns - 5; /* POLY token present */ #ifdef TRACE /* SDB debug statement */ printf("In two2three_translate, num_tokens=%d, num_conns=%d, num_coefs=%d . . .\n", num_tokens, num_conns, num_coefs); #endif if(num_coefs < 1) { char *errmsg; printf("ERROR - Number of connections differs from poly dimension\n"); printf("ERROR while parsing: %s\n", orig_card); errmsg = copy("ERROR in two2three_translate -- Argument to poly() is not an integer\n"); *inst_card = copy("* ERROR - Number of connections differs from poly dimension\n"); *mod_card = copy(" * ERROR - Number of connections differs from poly dimension\n"); return(errmsg); } /* Split card into name, output connections, input connections, */ /* and coefficients */ card = orig_card; name = MIFgettok(&card); /* Get output connections (2 netnames) */ out_conn = TMALLOC(char *, 2); for(i = 0; i < 2; i++) out_conn[i] = MIFgettok(&card); /* check for POLY, and ignore it if present */ if (dim > 0) { #ifdef TRACE /* SDB debug statement */ printf("In two2three_translate, found poly!!! dim = %d \n", dim); #endif tok = MIFgettok(&card); /* read and discard POLY */ tok = MIFgettok(&card); /* read and discard dimension */ } /* Get input connections (2 netnames per dimension) */ in_conn = TMALLOC(char *, num_conns); for(i = 0; i < num_conns; i++) in_conn[i] = MIFgettok(&card); /* The remainder of the line are the poly coeffs. */ coef = TMALLOC(char *, num_coefs); for(i = 0; i < num_coefs; i++) coef[i] = MIFgettok(&card); /* Compute the size needed for the new cards to be created */ /* Allow a fair amount of extra space for connection types, etc. */ /* to be safe... */ inst_card_len = 70; inst_card_len += 2 * (strlen(name) + 1); for(i = 0; i < 2; i++) inst_card_len += strlen(out_conn[i]) + 1; for(i = 0; i < num_conns; i++) inst_card_len += strlen(in_conn[i]) + 1; mod_card_len = 70; mod_card_len += strlen(name) + 1; for(i = 0; i < num_coefs; i++) mod_card_len += strlen(coef[i]) + 1; /* Allocate space for the cards and write them into the strings */ *inst_card = TMALLOC(char, inst_card_len); *mod_card = TMALLOC(char, mod_card_len); strcpy(*inst_card, "a$poly$"); sprintf(*inst_card + strlen(*inst_card), "%s ", name); /* Write input nets/sources */ if((type == 'e') || (type == 'g') || (type == 'E') || (type == 'G')) { /* These input port types are vector & need a [. */ if (dim > 1) { sprintf(*inst_card + strlen(*inst_card), "%%vd [ "); } else { sprintf(*inst_card + strlen(*inst_card), "%%vd [ "); /* need something different? */ } } else /* This input port type is scalar */ sprintf(*inst_card + strlen(*inst_card), "%%vnam [ "); for(i = 0; i < num_conns; i++) sprintf(*inst_card + strlen(*inst_card), "%s ", in_conn[i]); if (dim > 1) { sprintf(*inst_card + strlen(*inst_card), "] "); } else { sprintf(*inst_card + strlen(*inst_card), "] "); /* need something different? */ } /* Write output nets */ if((type == 'e') || (type == 'h') || (type == 'E') || (type == 'H')) sprintf(*inst_card + strlen(*inst_card), "%%vd ( "); else sprintf(*inst_card + strlen(*inst_card), "%%id ( "); for(i = 0; i < 2; i++) sprintf(*inst_card + strlen(*inst_card), "%s ", out_conn[i]); sprintf(*inst_card + strlen(*inst_card), ") "); /* Write model name */ sprintf(*inst_card + strlen(*inst_card), "a$poly$%s", name); /* Now create model card */ sprintf(*mod_card, ".model a$poly$%s spice2poly coef = [ ", name); for(i = 0; i < num_coefs; i++) sprintf(*mod_card + strlen(*mod_card), "%s ", coef[i]); sprintf(*mod_card + strlen(*mod_card), "]"); #ifdef TRACE /* SDB debug statement */ printf("In two2three_translate, translated statements:\n%s \n%s \n", *inst_card, *mod_card); #endif /* Free the temporary space */ FREE(name); name = NULL; for(i = 0; i < 2; i++) { FREE(out_conn[i]); out_conn[i] = NULL; } FREE(out_conn); out_conn = NULL; for(i = 0; i < num_conns; i++) { FREE(in_conn[i]); in_conn[i] = NULL; } FREE(in_conn); in_conn = NULL; for(i = 0; i < num_coefs; i++) { FREE(coef[i]); coef[i] = NULL; } FREE(coef); coef = NULL; /* Return NULL to indicate no error */ return(NULL); } /* two2three_translate */ /*--------------------------------------------------------------------*/ /* get_poly_dimension() Get the poly source dimension from the token immediately following the 'poly' if any. Return values changed by SDB on 5.23.2003 to be: If "poly" is not present, return 0. If the dimension token following "poly" is invalid, return -1. Otherwise, return the integer dimension. */ static int get_poly_dimension( char *card) /* the card text */ { int i; int dim; char *local_tok; /* Skip over name and output connections */ for(i = 0; i < 3; i++) txfree(MIFgettok(&card)); /* Check the next token to see if it is "poly" */ /* If not, return 0 */ local_tok = MIFgettok(&card); if( strcmp(local_tok, "poly") && strcmp(local_tok, "POLY") ) { /* check that local_tok is *not* poly */ FREE(local_tok); local_tok = NULL; return(0); } FREE(local_tok); /* Must have been "poly", so next line must be a number */ /* Try to convert it. If successful, return the number */ /* else, return -1 to indicate an error... */ local_tok = MIFgettok(&card); dim = atoi(local_tok); FREE(local_tok); if (dim > 0) { return(dim); } else { return(-1); } } /* get_poly_dimension */ ngspice-26/src/xspice/enh/Makefile.am0000644000265600020320000000047312264261473017125 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libenhxsp.la libenhxsp_la_SOURCES = \ enh.c \ enhtrans.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/enh/Makefile.in0000644000265600020320000004000712264261540017126 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/enh DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libenhxsp_la_LIBADD = am_libenhxsp_la_OBJECTS = enh.lo enhtrans.lo libenhxsp_la_OBJECTS = $(am_libenhxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libenhxsp_la_SOURCES) DIST_SOURCES = $(libenhxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libenhxsp.la libenhxsp_la_SOURCES = \ enh.c \ enhtrans.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/enh/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/enh/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libenhxsp.la: $(libenhxsp_la_OBJECTS) $(libenhxsp_la_DEPENDENCIES) $(EXTRA_libenhxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libenhxsp_la_OBJECTS) $(libenhxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/enhtrans.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/.gitignore0000644000265600020320000000010212264261473016274 0ustar andreasadmin/cmpp/cmpp /icm/GNUmakefile /icm/makedefs !/examples/*/Makefile ngspice-26/src/xspice/icm/0000755000265600020320000000000012264261712015057 5ustar andreasadminngspice-26/src/xspice/icm/digital/0000755000265600020320000000000012264261473016500 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_and/0000755000265600020320000000000012264261473017545 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_and/cfunc.mod0000644000265600020320000001345712264261473021356 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_and/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 14 June 1991 Jeffrey P. Murray MODIFICATIONS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_and code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_and() AUTHORS 14 Jun 1991 Jeffrey P. Murray MODIFICATIONS 27 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_and code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_AND ROUTINE ===*/ /************************************************ * The following is the model for the * * digital AND gate for the * * ATESSE Version 2.0 system. * * * * Created 6/14/91 J.P.Murray * ************************************************/ void cm_d_and(ARGS) { int i, /* generic loop counter index */ size; /* number of input & output ports */ Digital_State_t *out, /* temporary output for buffers */ *out_old, /* previous output for buffers */ input; /* temp storage for input bits */ /** Retrieve size value... **/ size = PORT_SIZE(in); /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); /* set loading for inputs */ for (i=0; i code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_inverter() AUTHORS 14 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_inverter code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_INVERTER ROUTINE ===*/ /************************************************ * The following is the model for the * * digital inverter gate for the * * ATESSE Version 2.0 system. * * * * Created 6/14/91 J.P.Murray * ************************************************/ void cm_d_inverter(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *out, /* temporary output for inverter */ *out_old; /* previous output for inverter */ /** Setup required state variables **/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); /* define load value on inputs */ LOAD(in) = PARAM(input_load); /* retrieve storage for the outputs */ out = out_old = (Digital_State_t *) cm_event_get_ptr(0,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ out = (Digital_State_t *) cm_event_get_ptr(0,0); out_old = (Digital_State_t *) cm_event_get_ptr(0,1); } /** Check on analysis type **/ if (ANALYSIS == DC) { /* DC analysis...output w/o delays */ switch ( INPUT_STATE(in) ) { case ZERO: OUTPUT_STATE(out) = *out = *out_old = ONE; break; case ONE: OUTPUT_STATE(out) = *out = *out_old = ZERO; break; default: OUTPUT_STATE(out) = *out = *out_old = UNKNOWN; break; } } else { /* Transient Analysis */ switch ( INPUT_STATE(in) ) { /* fall to zero value */ case 1: OUTPUT_STATE(out) = *out = ZERO; OUTPUT_DELAY(out) = PARAM(fall_delay); break; /* rise to one value */ case 0: OUTPUT_STATE(out) = *out = ONE; OUTPUT_DELAY(out) = PARAM(rise_delay); break; /* unknown output */ default: OUTPUT_STATE(out) = *out = UNKNOWN; /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ OUTPUT_DELAY(out) = PARAM(rise_delay); } else { /* add falling delay */ OUTPUT_DELAY(out) = PARAM(fall_delay); } break; } } OUTPUT_STRENGTH(out) = STRONG; } ngspice-26/src/xspice/icm/digital/d_inverter/ifspec.ifs0000644000265600020320000000355712264261473022627 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_inverter code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_inverter Spice_Model_Name: d_inverter Description: "digital one-bit-wide inverter" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: input_load Description: "input load value (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/digital/d_dff/0000755000265600020320000000000012264261473017542 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_dff/cfunc.mod0000644000265600020320000005230212264261473021343 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_dff/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 19 June 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 27 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_dff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_d_dff() AUTHORS 19 June 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 27 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_dff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_DFF ROUTINE ===*/ /************************************************ * The following is the model for the * * digital d-type flip flop for the * * ATESSE Version 2.0 system. * * * * Created 6/19/91 J.P.Murray * ************************************************/ void cm_d_dff(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *clk, /* current clk value */ *clk_old, /* previous clk value */ *set, /* current set value for dff */ *set_old, /* previous set value for dff */ *reset, /* current reset value for dff */ *reset_old, /* previous reset value for dff */ *out, /* current output for dff */ *out_old, /* previous output for dff */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); /* declare load values */ LOAD(data) = PARAM(data_load); LOAD(clk) = PARAM(clk_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ clk = clk_old = (Digital_State_t *) cm_event_get_ptr(0,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(1,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(2,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(3,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ clk = (Digital_State_t *) cm_event_get_ptr(0,0); clk_old = (Digital_State_t *) cm_event_get_ptr(0,1); set = (Digital_State_t *) cm_event_get_ptr(1,0); set_old = (Digital_State_t *) cm_event_get_ptr(1,1); reset = (Digital_State_t *) cm_event_get_ptr(2,0); reset_old = (Digital_State_t *) cm_event_get_ptr(2,1); out = (Digital_State_t *) cm_event_get_ptr(3,0); out_old = (Digital_State_t *) cm_event_get_ptr(3,1); } /******** load current input values if set or reset are not connected, set to zero... ********/ *clk = INPUT_STATE(clk); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** Initial conditions...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *reset) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *reset ) { /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *set) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *set ) { /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test clk value for change ****/ if ( (*clk != *clk_old) && (*reset != ONE) && (*set != ONE) ) { /* clock or clock release */ switch ( *clk ) { case ONE: /* active edge...save current data value */ temp = INPUT_STATE(data); if (*out_old != temp) { /* clk will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(clk_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(clk_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* data value must have changed... return previous output value. */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_dff/ifspec.ifs0000644000265600020320000000762512264261473021530 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_ff code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_dff Spice_Model_Name: d_dff Description: "digital d-type flip flop" PORT_TABLE: Port_Name: data clk Description: "input data" "clock" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: clk_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: data_load clk_load Description: "data load value (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_buffer/0000755000265600020320000000000012264261473020254 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_buffer/cfunc.mod0000644000265600020320000001071512264261473022057 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_buffer/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 14 June 1991 Jeffrey P. Murray MODIFICATIONS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_buffer code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_buffer() AUTHORS 14 Jun 1991 Jeffrey P. Murray MODIFICATIONS 27 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_buffer code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_BUFFER ROUTINE ===*/ /************************************************ * The following is the model for the * * digital buffer for the * * ATESSE Version 2.0 system. * * * * Created 6/14/91 J.P,Murray * ************************************************/ void cm_d_buffer(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *out, /* temporary output for buffers */ *out_old; /* previous output for buffers */ /** Setup required state variables **/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); /* define input loading... */ LOAD(in) = PARAM(input_load); /* retrieve storage for the outputs */ out = out_old = (Digital_State_t *) cm_event_get_ptr(0,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ out = (Digital_State_t *) cm_event_get_ptr(0,0); out_old = (Digital_State_t *) cm_event_get_ptr(0,1); } /** Check on analysis type **/ if (ANALYSIS == DC) { /* DC analysis...output w/o delays */ OUTPUT_STATE(out) = *out = INPUT_STATE(in); } else { /* Transient Analysis */ switch ( INPUT_STATE(in) ) { /* fall to zero value */ case 0: OUTPUT_STATE(out) = *out = ZERO; OUTPUT_DELAY(out) = PARAM(fall_delay); break; /* rise to one value */ case 1: OUTPUT_STATE(out) = *out = ONE; OUTPUT_DELAY(out) = PARAM(rise_delay); break; /* unknown output */ default: OUTPUT_STATE(out) = *out = UNKNOWN; /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ OUTPUT_DELAY(out) = PARAM(rise_delay); } else { /* add falling delay */ OUTPUT_DELAY(out) = PARAM(fall_delay); } break; } } OUTPUT_STRENGTH(out) = STRONG; } ngspice-26/src/xspice/icm/digital/d_buffer/ifspec.ifs0000644000265600020320000000354512264261473022237 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_buffer code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: d_buffer C_Function_Name: cm_d_buffer Description: "digital one-bit-wide buffer" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: input_load Description: "input load value (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/digital/d_dlatch/0000755000265600020320000000000012264261473020242 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_dlatch/cfunc.mod0000644000265600020320000006163312264261473022052 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_dlatch/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 25 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_latch code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 30 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_dlatch() AUTHORS 25 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_dlatch code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_DLATCH ROUTINE ===*/ /************************************************ * The following is the model for the * * digital d-type latch for the * * ATESSE Version 2.0 system. * * * * Created 6/25/91 J.P.Murray * ************************************************/ void cm_d_dlatch(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *data, /* current data value */ *data_old, /* previous data value */ *enable, /* current enable value */ *enable_old, /* previous enable value */ *set, /* current set value for dlatch */ *set_old, /* previous set value for dlatch */ *reset, /* current reset value for dlatch */ *reset_old, /* previous reset value for dlatch */ *out, /* current output for dlatch */ *out_old, /* previous output for dlatch */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); cm_event_alloc(4,sizeof(Digital_State_t)); /* declare load values */ LOAD(data) = PARAM(data_load); LOAD(enable) = PARAM(enable_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ data = data_old = (Digital_State_t *) cm_event_get_ptr(0,0); enable = enable_old = (Digital_State_t *) cm_event_get_ptr(1,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(2,0); reset = reset_old =(Digital_State_t *) cm_event_get_ptr(3,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(4,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ data = (Digital_State_t *) cm_event_get_ptr(0,0); data_old = (Digital_State_t *) cm_event_get_ptr(0,1); enable = (Digital_State_t *) cm_event_get_ptr(1,0); enable_old = (Digital_State_t *) cm_event_get_ptr(1,1); set = (Digital_State_t *) cm_event_get_ptr(2,0); set_old = (Digital_State_t *) cm_event_get_ptr(2,1); reset = (Digital_State_t *) cm_event_get_ptr(3,0); reset_old = (Digital_State_t *) cm_event_get_ptr(3,1); out = (Digital_State_t *) cm_event_get_ptr(4,0); out_old = (Digital_State_t *) cm_event_get_ptr(4,1); } /******* load current input values if set or reset are not connected, set to zero... *******/ *data = INPUT_STATE(data); *enable = INPUT_STATE(enable); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if (*enable==ONE) temp = *data; if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: case UNKNOWN: if ( ONE != *reset) { if ( ONE == *enable ) { /* active level...save & output current data value */ temp = *data; if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(set_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: case UNKNOWN: if ( ONE != *set) { if ( ONE == *enable ) { /* active level...save & output current data value */ temp = *data; if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(reset_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; } } else { /**** Test for enable change... ****/ if ( (*enable != *enable_old) && (*reset != ONE) && (*set != ONE) ) { /* enable or enable release */ switch ( *enable ) { case ONE: /* active edge...save & output current data value */ temp = *data; if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(enable_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(enable_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* test data value for change... */ if ( (*data != *data_old) && (*reset != ONE) && (*set != ONE) ) { /* data value has changed... test enable, and if active, update the output...else return w/o change. */ switch ( *enable ) { case ONE: /* active level...save & output current data value */ temp = *data; if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(data_delay); } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(data_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive level...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* nothing has changed!!! This shouldn't happen! */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_dlatch/ifspec.ifs0000644000265600020320000001044212264261473022217 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_latch code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_dlatch Spice_Model_Name: d_dlatch Description: "digital d-type latch" PORT_TABLE: Port_Name: data enable Description: "input data" "enable" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: data_delay Description: "delay from data" Data_Type: real Default_Value: 1.0e-9 Limits: [1e-12 -] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: enable_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: data_load enable_load Description: "data load value (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/.gitignore0000644000265600020320000000014712264261473020472 0ustar andreasadmin/digital.cm /cmextrn.h /cminfo.h /dlmain.c /objects.inc /udnextrn.h /udninfo.h /*/*.c !/*/udnfunc.c ngspice-26/src/xspice/icm/digital/modpath.lst0000644000265600020320000000032112264261473020654 0ustar andreasadminadc_bridge dac_bridge d_and d_buffer d_dff d_dlatch d_fdiv d_inverter d_jkff d_nand d_nor d_open_c d_open_e d_or d_osc d_pulldown d_pullup d_ram d_source d_srff d_srlatch d_state d_tff d_tristate d_xnor d_xor ngspice-26/src/xspice/icm/digital/d_jkff/0000755000265600020320000000000012264261473017723 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_jkff/cfunc.mod0000644000265600020320000005650212264261473021532 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_jkff/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 21 Jun 1991 Jeffrey P. Murray MODIFICATIONS 12 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_jkff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_eval_jk_result AUTHORS 30 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Evaluates the J and K input states, plus the last state of the flip flop, and returns the expected output value. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); RETURNED VALUE A Digital_State_t. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_EVAL_JK_RESULT ROUTINE ===*/ static Digital_State_t cm_eval_jk_result(Digital_State_t j_input, Digital_State_t k_input, Digital_State_t old_output) { Digital_State_t output; /* returned output value */ switch (j_input) { case ZERO: switch (k_input) { case ZERO: output = old_output; break; case ONE: output = ZERO; break; case UNKNOWN: output = UNKNOWN; break; } break; case ONE: switch (k_input) { case ZERO: output = ONE; break; case ONE: output = old_output; cm_toggle_bit(&output); break; case UNKNOWN: output = UNKNOWN; break; } break; case UNKNOWN: output = UNKNOWN; break; } return output; } /*============================================================================== FUNCTION cm_d_jkff() AUTHORS 21 Jun 1991 Jeffrey P. Murray MODIFICATIONS 12 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_jkff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_JKFF ROUTINE ===*/ /************************************************ * The following is the model for the * * digital jk-type flip flop for the * * ATESSE Version 2.0 system. * * * * Created 6/21/91 J.P.Murray * ************************************************/ void cm_d_jkff(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *clk, /* current clk value */ *clk_old, /* previous clk value */ *set, /* current set value for dff */ *set_old, /* previous set value for dff */ *reset, /* current reset value for dff */ *reset_old, /* previous reset value for dff */ *out, /* current output for dff */ *out_old, /* previous output for dff */ j_input, /* current j input value */ k_input, /* current k input value */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); /* declare load values */ LOAD(j) = PARAM(jk_load); LOAD(k) = PARAM(jk_load); LOAD(clk) = PARAM(clk_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ clk = clk_old = (Digital_State_t *) cm_event_get_ptr(0,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(1,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(2,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(3,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ clk = (Digital_State_t *) cm_event_get_ptr(0,0); clk_old = (Digital_State_t *) cm_event_get_ptr(0,1); set = (Digital_State_t *) cm_event_get_ptr(1,0); set_old = (Digital_State_t *) cm_event_get_ptr(1,1); reset = (Digital_State_t *) cm_event_get_ptr(2,0); reset_old = (Digital_State_t *) cm_event_get_ptr(2,1); out = (Digital_State_t *) cm_event_get_ptr(3,0); out_old = (Digital_State_t *) cm_event_get_ptr(3,1); } /******** load current input values if set or reset are not connected, set to zero... ********/ *clk = INPUT_STATE(clk); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *reset) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *reset ) { /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *set) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *set ) { /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test clk value for change ****/ if ( (*clk != *clk_old) && (*reset != ONE) && (*set != ONE) ) { /* clock or clock release */ switch ( *clk ) { case ONE: /* active edge...calculate new data output */ j_input = INPUT_STATE(j); k_input = INPUT_STATE(k); temp = cm_eval_jk_result(j_input,k_input,*out_old); if (*out_old != temp) { /* clk will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(clk_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(clk_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* data value must have changed... return previous output value. */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_jkff/ifspec.ifs0000644000265600020320000001016012264261473021675 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_jkff code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_jkff Spice_Model_Name: d_jkff Description: "digital jk-type flip flop" PORT_TABLE: Port_Name: j k Description: "j input" "k input" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: clk Description: "clock" Direction: in Default_Type: d Allowed_Types: [d] Vector: no Vector_Bounds: - Null_Allowed: no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: clk_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: jk_load clk_load Description: "j,k load values (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/dac_bridge/0000755000265600020320000000000012264261473020543 5ustar andreasadminngspice-26/src/xspice/icm/digital/dac_bridge/cfunc.mod0000644000265600020320000003472612264261473022356 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE dac_bridge/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 3 Jun 1991 Jeffrey P. Murray MODIFICATIONS 16 Aug 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the dac_bridge code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_perm_bkpt() CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_dac_bridge() AUTHORS 3 Jun 1991 Jeffrey P. Murray MODIFICATIONS 16 Aug 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the dac_bridge code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_perm_bkpt() CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_DAC_BRIDGE ROUTINE ===*/ /************************************************ * The following is the model for the * * digital-to-analog nodebridge for the * * ATESSE Version 2.0 system. * * * * Created 6/3/91 J.P.Murray * ************************************************/ void cm_dac_bridge(ARGS) { double out_low, /* analog output value corresponding to '0' digital input */ out_high, /* analog output value corresponding to '1' digital input */ out_undef, /* analog output value corresponding to 'U' digital input */ t_rise, /* rise time...used to produce d(out)/d(time) values for gradual change in analog output. */ t_fall, /* fall time...used to produce d(out)/d(time) values for gradual change in analog output. */ *out, /* array holding all output values */ *out_old, /* array holding previous output values */ fraction, /* fraction of total rise or fall time to add to current time value for breakpoint calculation */ level_inc, /* incremental level value out_high - out_low */ rise_slope, /* level_inc divided by t_rise */ fall_slope, /* level_inc divided by t_fall */ time_inc, /* time increment since last analog call */ test, /* testing variable */ *breakpoint; /* holding variable to prevent infinite posting of the same breakpoint */ int i, /* generic loop counter index */ size; /* number of input & output ports */ Digital_State_t *in, /* base address of array holding all input values */ *in_old; /* array holding previous input values */ /* determine "width" of the node bridge... */ size = PORT_SIZE(in); /** Read in remaining model parameters **/ out_low = PARAM(out_low); out_high = PARAM(out_high); t_rise = PARAM(t_rise); t_fall = PARAM(t_fall); /* Test to see if out_low and out_high were specified, but */ /* out_undef was not... */ /* if so, take out_undef as mean of out_high and out_low. */ if (!PARAM_NULL(out_low) && !PARAM_NULL(out_high) && PARAM_NULL(out_undef) ) { out_undef = out_low + (out_high - out_low) / 2.0; } else { out_undef = PARAM(out_undef); } if (INIT) { /*** Test for INIT == TRUE. If so, allocate storage, etc. ***/ /* Allocate storage for inputs */ cm_event_alloc(0, size * (int) sizeof(Digital_State_t)); /* Allocate storage for outputs */ /* retrieve previously-allocated discrete input and */ /* allocate storage for analog output values. */ /* allocate output space and obtain adresses */ cm_analog_alloc(0, size * (int) sizeof(double)); cm_analog_alloc(1, sizeof(double)); /* assign discrete addresses */ in = in_old = (Digital_State_t *) cm_event_get_ptr(0,0); /* assign analog addresses */ out = out_old = (double *) cm_analog_get_ptr(0,0); breakpoint = (double *) cm_analog_get_ptr(1,0); /* read current input values */ for (i=0; i out_low) { /* output still dropping */ out[i] = out_old[i] - fall_slope*time_inc; if ( out_low > out[i]) out[i]=out_low; } else { /* output at out_low */ out[i] = out_low; } break; case ONE: if (out_old[i] < out_high) { /* output still rising */ out[i] = out_old[i] + rise_slope*time_inc; if ( out_high < out[i]) out[i]=out_high; } else { /* output at out_high */ out[i] = out_high; } break; case UNKNOWN: if (out_old[i] < out_undef) { /* output still rising */ out[i] = out_old[i] + (rise_slope * time_inc); if ( out_undef < out[i]) out[i]=out_undef; } else { if (out_old[i] > out_undef) { /* output still falling */ out[i] = out_old[i] - fall_slope*time_inc; if ( out_undef > out[i]) out[i]=out_undef; } else { /* output at out_undef */ out[i] = out_undef; } } break; } } else { /* There HAS been a change in this digital input since the last analog access...need to use the old value of input to complete the breakpoint slope before changing directions... */ switch (in_old[i]) { case ZERO: if (out_old[i] > out_low) { /* output still dropping */ out[i] = out_old[i] - fall_slope*time_inc; if ( out_low > out[i]) out[i]=out_low; } else { /* output at out_low */ out[i] = out_low; } break; case ONE: if (out_old[i] < out_high) { /* output still rising */ out[i] = out_old[i] + rise_slope*time_inc; if ( out_high < out[i]) out[i]=out_high; } else { /* output at out_high */ out[i] = out_high; } break; case UNKNOWN: if (out_old[i] < out_undef) { /* output still rising */ out[i] = out_old[i] + (rise_slope * time_inc); if ( out_undef < out[i]) out[i]=out_undef; } else { if (out_old[i] > out_undef) { /* output still falling */ out[i] = out_old[i] - fall_slope*time_inc; if ( out_undef > out[i]) out[i]=out_undef; } else { /* output at out_undef */ out[i] = out_undef; } } break; } /* determine required new breakpoint for the end of the output analog transition & post */ switch (in[i]) { case ONE: /* rising for all outputs */ fraction = (out_high - out[i]) / (out_high - out_low); test = TIME + (fraction * t_rise); cm_analog_set_perm_bkpt(test); break; case UNKNOWN: /* may be rising or falling */ if ( out_undef > out[i] ) { /* rising to U */ fraction = (out_undef - out[i]) / (out_high - out_low); test = TIME + (fraction * t_rise); cm_analog_set_perm_bkpt(test); } else { /* falling to U */ fraction = (out[i] - out_undef) / (out_high - out_low); test = TIME + (fraction * t_fall); cm_analog_set_perm_bkpt(test); } break; case ZERO: /* falling for all outputs */ fraction = (out[i] - out_low) / (out_high - out_low); test = TIME + (fraction * t_fall); cm_analog_set_perm_bkpt(test); break; } } } /* Output values... */ for (i=0; i 1" "fall time 1 -> 0" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_state/0000755000265600020320000000000012264261473020123 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_state/cfunc.mod0000644000265600020320000017256112264261473021736 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_state/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include #include /*=== CONSTANTS ========================*/ #define MAX_STRING_SIZE 200 #define HEADER 1 #define CONTINUATION 2 #define OK 0 #define FAIL 1 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef struct { int current_state, /* current state of the machine (similar to current state of the union, current state of the economy, etc. etc. 8-) */ index0, /* actual word number (0 to depth-1) in which the first line of the current_state definition may be found. */ indexN, /* word number (0 to depth-1) of the final curren_state definition line...if a state is defined in only one line, index0 and indexN will be equal. */ num_outputs, /* width of bits[] table...equal to size of out port */ num_inputs, /* width of inputs[] table...equal to size of in port */ depth, /* depth of table...equal to size of current_state & next_state arrays, and to the total number of vectors retrieved from the state.in file. */ *state, /* integer array holding the state index values...note that each state will have at least one and as many as 2^N "words" assigned to it, where N = number of input lines to the state machine. */ *next_state; /* integer array holding the next state to jump to given the input values held by the inputs[] array...note that each state will have at least one and as many as 2^N "words" assigned to it, where N = number of input lines to the state machine. */ short *bits, /* the storage array for the output bit representations... this will have size equal to (width * depth)/4, since one short will hold four 12-state bit descriptions. */ *inputs; /* the storage array for the input bit representations... this will have size equal to (width * depth)/8, since one short will hold eight 3-state bit descriptions. */ } State_Table_t; /* Type definition for each possible token returned. */ typedef enum token_type_s {CNV_NO_TOK,CNV_STRING_TOK} Cnv_Token_Type_t; typedef char line_t[82]; /* A SPICE size line. <= 80 characters plus '\n\0' */ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION *CNVgettok() AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function obtains the next token from an input stream. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a string value representing the next token. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNVgettok ROUTINE ================*/ /* Get the next token from the input string. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. */ static char *CNVgettok(char **s) { char *buf; /* temporary storage to copy token into */ /*char *temp;*/ /* temporary storage to copy token into */ char *ret_str; /* storage for returned string */ int i; /* allocate space big enough for the whole string */ buf = (char *) malloc(strlen(*s) + 1); /* skip over any white space */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* isolate the next token */ switch(**s) { case '\0': /* End of string found */ if(buf) free(buf); return(NULL); default: /* Otherwise, we are dealing with a */ /* string representation of a number */ /* or a mess o' characters. */ i = 0; while( (**s != '\0') && (! ( isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',') ) ) ) { buf[i] = **s; i++; (*s)++; } buf[i] = '\0'; break; } /* skip over white space up to next token */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* make a copy using only the space needed by the string length */ ret_str = (char *) malloc(strlen(buf) + 1); ret_str = strcpy(ret_str,buf); if(buf) free(buf); return(ret_str); } /*============================================================================== FUNCTION *CNVget_token() AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function obtains the next token from an input stream. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a string value representing the next token. Uses *CNVget_tok. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNVget_token ROUTINE =============*/ /* Get the next token from the input string together with its type. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. */ static char *CNVget_token(char **s, Cnv_Token_Type_t *type) { char *ret_str; /* storage for returned string */ /* get the token from the input line */ ret_str = CNVgettok(s); /* if no next token, return */ if(ret_str == NULL) { *type = CNV_NO_TOK; return(NULL); } /* else, determine and return token type */ switch(*ret_str) { default: *type = CNV_STRING_TOK; break; } return(ret_str); } /*============================================================================== FUNCTION cnv_get_spice_value() AUTHORS ??? Bill Kuhn MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function takes as input a string token from a SPICE deck and returns a floating point equivalent value. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns the floating point value in pointer *p_value. Also returns an integer representing successful completion. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNV_get_spice_value ROUTINE =============*/ /* Function takes as input a string token from a SPICE deck and returns a floating point equivalent value. */ static int cnv_get_spice_value( char *str, /* IN - The value text e.g. 1.2K */ double *p_value ) /* OUT - The numerical value */ { /* the following were "int4" devices - jpm */ size_t len; size_t i; int n_matched; line_t val_str; /*char *suffix;*/ char c = ' '; char c1; double scale_factor; double value; /* Scan the input string looking for an alpha character that is not */ /* 'e' or 'E'. Such a character is assumed to be an engineering */ /* suffix as defined in the Spice 2G.6 user's manual. */ len = strlen(str); if( len > (sizeof(val_str) - 1)) len = sizeof(val_str) - 1; for(i = 0; i < len; i++) { c = str[i]; if( isalpha(c) && (c != 'E') && (c != 'e') ) break; else if( isspace(c) ) break; else val_str[i] = c; } val_str[i] = '\0'; /* Determine the scale factor */ if( (i >= len) || (! isalpha(c)) ) scale_factor = 1.0; else { if(islower(c)) c = (char) tolower(c); switch(c) { case 't': scale_factor = 1.0e12; break; case 'g': scale_factor = 1.0e9; break; case 'k': scale_factor = 1.0e3; break; case 'u': scale_factor = 1.0e-6; break; case 'n': scale_factor = 1.0e-9; break; case 'p': scale_factor = 1.0e-12; break; case 'f': scale_factor = 1.0e-15; break; case 'm': i++; if(i >= len) { scale_factor = 1.0e-3; break; } c1 = str[i]; if(! isalpha(c1)) { scale_factor = 1.0e-3; break; } if(islower(c1)) c1 = (char) toupper(c1); if(c1 == 'E') scale_factor = 1.0e6; else if(c1 == 'I') scale_factor = 25.4e-6; else scale_factor = 1.0e-3; break; default: scale_factor = 1.0; } } /* Convert the numeric portion to a float and multiply by the */ /* scale factor. */ n_matched = sscanf(val_str,"%le",&value); if(n_matched < 1) { *p_value = 0.0; return(FAIL); } *p_value = value * scale_factor; return(OK); } /*============================================================================== FUNCTION cm_inputs_mask_and_retrieve() AUTHORS 23 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY Masks off and retrieves a two-bit value from a short integer word passed to the function, using an offset value. This effectively handles retrieval of eight two-bit values from a single short integer space in order to conserve memory. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a Digital_t value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_INPUTS_MASK_AND_RETRIEVE ROUTINE ===*/ /************************************************** * The following routine masks and retrieves * * the value passed to it by the out value * * by masking the appropriate bits in the * * base integer. The particular bit affected * * is determined by the bit_offset value. * * * * Created 7/23/91 J.P.Murray * **************************************************/ static Digital_State_t cm_inputs_mask_and_retrieve(short base, int bit_offset) { int value; /* the hexadecimal value of the masked bit */ value = 0x0003 & (base >> (bit_offset * 2)); switch (value) { case 0: return ZERO; case 1: return ONE; default: return UNKNOWN; } } /*============================================================================== FUNCTION cm_set_indices() AUTHORS 23 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine retrieves the current_state value from the *states structure. It then searches the entire state[] array to determine the index0 and indexN values corresponding to the first and last entries in the state[] array for the current state. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a status int value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_SET_INDICES ROUTINE ===*/ /************************************************ * The following routine retrieves the * * current_state value from the *states * * structure. It then searches the entire * * state[] array to determine the index0 and * * indexN values corresponding to the first * * and last entries in the state[] array for * * the current state. * * * * Created 7/23/91 J.P. Murray * ************************************************/ static int cm_set_indices(State_Table_t *states) { int i, /* indexing variable */ index0_set, /* flag for index0 */ indexN_set; /* flag for index1 */ states->index0 = 0; states->indexN = 0; index0_set = 0; indexN_set = 0; for (i=0; i< states->depth; i++) { /* loop through all states */ if ( states->state[i] == states->current_state ) { /* states match... */ /* if not already set, set index0... */ if ( 0 == index0_set ) { states->index0 = i; states->indexN = i; index0_set = 1; } if ( 1 < (i - states->indexN) ) { /* ERROR!! This means that a state match was found in a nonn-contiguous portion of the state.in file...this is not allowed! */ return TRUE; } else { /* update indexN. */ states->indexN = i; } } } return FALSE; } /*============================================================================== FUNCTION cm_compare_to_inputs() AUTHORS 23 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine retrieves the the inputs[] bit value pointed to by the word_num and bit_num integers, compares this value with the "in" state value, and returns a "0" if they match, and a "1" if they do not match. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a status int value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_COMPARE_TO_INPUTS ROUTINE ===*/ /************************************************ * The following routine retrieves the * * the inputs[] bit value pointed to by * * the word_num and bit_num integers, compares * * this value with the "in" state value, and * * returns a "0" if they match, and a "1" if * * they do not match. * * * * Created 7/23/91 J.P.Murray * ************************************************/ static int cm_compare_to_inputs(State_Table_t *states,int index,int bit_number, Digital_State_t in) { int int1, /* temp storage variable */ bit_index, /* bits base address at which word bits will be found */ bit_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ Digital_State_t out; /* output variable for state retrieved */ /* obtain offset value from index, word_width & bit_number */ int1 = index * states->num_inputs + bit_number; bit_index = int1 >> 3; bit_offset = int1 & 7; /* retrieve entire base_address bits integer... */ base = states->inputs[bit_index]; /* for each offset, mask off the bits and determine values */ out = cm_inputs_mask_and_retrieve(base, bit_offset); if ( out == in ) { /* bit matches */ return 0; } else if ( out == UNKNOWN ) { /* bit compared to is a "don't care" */ return 0; } else { /* no match */ return 1; } } /*============================================================================== FUNCTION cm_inputs_mask_and_store() AUTHORS 22 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine masks and stores the value passed to it by the out value by masking the appropriate bits in the base integer. The particular bit affected is determined by the bit_offset value. This routine stores to the inputs[] array. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a status int value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_INPUTS_MASK_AND_STORE ROUTINE ===*/ /************************************************ * The following routine masks and stores * * the value passed to it by the out value * * by masking the appropriate bits in the * * base integer. The particular bit affected * * is determined by the bit_offset value. * * This routine stores to the inputs[] array. * * * * Created 7/22/91 * * Last Modified 7/22/91 J.P.Murray * ************************************************/ static void cm_inputs_mask_and_store(short *base,int bit_offset,int bit_value) { *base &= (short) ~ (0x0003 << (bit_offset * 2)); *base |= (short) (bit_value << (bit_offset * 2)); } /*============================================================================== FUNCTION cm_store_inputs_value() AUTHORS 23 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine retrieves four-bit data from short integer array "bits". The integers are assumed to be at least two bytes each, so each will hold four four- bit values. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE NONE GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_STORE_INPUTS_VALUE ROUTINE ===*/ /************************************************ * The following routine retrieves four-bit * * data from short integer array "bits". The * * integers are assumed to be at least two * * bytes each, so each will hold four four- * * bit values. * * * * Created 7/23/91 J.P.Murray * ************************************************/ static void cm_store_inputs_value(State_Table_t *states,int index, int bit_number, int in_val) { int /*err,*/ /* error index value */ int1, /* temp storage variable */ bit_index, /* bits base address at which word bits will be found */ bit_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /* obtain offset value from word_number, word_width & bit_number */ int1 = index * states->num_inputs + bit_number; bit_index = int1 >> 3; bit_offset = int1 & 7; /* retrieve entire base_address bits integer... */ base = states->inputs[bit_index]; /* for each offset, mask off the bits and store values */ cm_inputs_mask_and_store(&base,bit_offset,in_val); /* store modified base value */ states->inputs[bit_index] = base; } /*============================================================================== FUNCTION cm_bits_mask_and_store() AUTHORS 22 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine masks and stores the value passed to it by the out value by masking the appropriate bits in the base integer. The particular bit affected is determined by the bit_offset value. This routine stores to the bits[] array. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a status integer. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_BITS_MASK_AND_STORE ROUTINE ===*/ /************************************************ * The following routine masks and stores * * the value passed to it by the out value * * by masking the appropriate bits in the * * base integer. The particular bit affected * * is determined by the bit_offset value. * * This routine stores to the bits[] array. * * * * Created 7/22/91 * * Last Modified 7/22/91 J.P.Murray * ************************************************/ static void cm_bits_mask_and_store(short *base,int bit_offset,int bit_value) { *base &= (short) ~ (0x000f << (bit_offset * 4)); *base |= (short) (bit_value << (bit_offset * 4)); } /*============================================================================== FUNCTION cm_bits_mask_and_retrieve() AUTHORS 22 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine masks and retrieves the value passed to it by the out value by masking the appropriate bits in the base integer. The particular bit affected is determined by the bit_offset value. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE NONE GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_BITS_MASK_AND_RETRIEVE ROUTINE ===*/ /************************************************** * The following routine masks and retrieves * * the value passed to it by the out value * * by masking the appropriate bits in the * * base integer. The particular bit affected * * is determined by the ram_offset value. * * * * Created 7/22/91 * * Last Modified 7/22/91 J.P.Murray * **************************************************/ static void cm_bits_mask_and_retrieve(short base,int bit_offset,Digital_t *out) { int value; /* the hexadecimal value of the masked bit */ value = 0x000f & (base >> (bit_offset * 4)); switch (value) { case 0: out->state = ZERO; out->strength = STRONG; break; case 1: out->state = ONE; out->strength = STRONG; break; case 2: out->state = UNKNOWN; out->strength = STRONG; break; case 3: out->state = ZERO; out->strength = RESISTIVE; break; case 4: out->state = ONE; out->strength = RESISTIVE; break; case 5: out->state = UNKNOWN; out->strength = RESISTIVE; break; case 6: out->state = ZERO; out->strength = HI_IMPEDANCE; break; case 7: out->state = ONE; out->strength = HI_IMPEDANCE; break; case 8: out->state = UNKNOWN; out->strength = HI_IMPEDANCE; break; case 9: out->state = ZERO; out->strength = UNDETERMINED; break; case 10: out->state = ONE; out->strength = UNDETERMINED; break; case 11: out->state = UNKNOWN; out->strength = UNDETERMINED; break; } } /*============================================================================== FUNCTION cm_get_bits_value() AUTHORS 22 Jul 1991 Jeffrey P. Murray MODIFICATIONS 23 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine retrieves four-bit data from short integer array "bits". The integers are assumed to be at least two bytes each, so each will hold four four- bit values. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE NONE GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_GET_BITS_VALUE ROUTINE ===*/ /************************************************ * The following routine retrieves four-bit * * data from short integer array "bits". The * * integers are assumed to be at least two * * bytes each, so each will hold four four- * * bit values. * * * * Created 7/22/91 * * Last Modified 7/23/91 J.P.Murray * ************************************************/ static void cm_get_bits_value(State_Table_t *states,int index, int bit_number, Digital_t *out) { int /*err,*/ /* error index value */ int1, /* temp storage variable */ bit_index, /* bits base address at which word bits will be found */ bit_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /* obtain offset value from index, word_width & bit_number */ int1 = index * states->num_outputs + bit_number; bit_index = int1 >> 2; bit_offset = int1 & 3; /* retrieve entire base_address bits integer... */ base = states->bits[bit_index]; /* for each offset, mask off the bits and determine values */ cm_bits_mask_and_retrieve(base,bit_offset,out); } /*============================================================================== FUNCTION cm_store_bits_value() AUTHORS 23 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine retrieves four-bit data from short integer array "bits". The integers are assumed to be at least two bytes each, so each will hold four four- bit values. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE NONE GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_STORE_BITS_VALUE ROUTINE ===*/ /************************************************ * The following routine retrieves four-bit * * data from short integer array "bits". The * * integers are assumed to be at least two * * bytes each, so each will hold four four- * * bit values. * * * * Created 7/23/91 * * Last Modified 7/23/91 J.P.Murray * ************************************************/ static void cm_store_bits_value(State_Table_t *states,int index, int bit_number, int in_val) { int /*err,*/ /* error index value */ int1, /* temp storage variable */ bit_index, /* bits base address at which word bits will be found */ bit_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /* obtain offset value from word_number, word_width & bit_number */ int1 = index * states->num_outputs + bit_number; bit_index = int1 >> 2; bit_offset = int1 & 3; /* retrieve entire base_address bits integer... */ base = states->bits[bit_index]; /* for each offset, mask off the bits and store values */ cm_bits_mask_and_store(&base,bit_offset,in_val); /* store modified base value */ states->bits[bit_index] = base; } /*============================================================================== FUNCTION cm_read_state_file() AUTHORS 15 Jul 1991 Jeffrey P. Murray MODIFICATIONS 23 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY The following routine reads the file *state_file, parses the file, and stores the values found there into the *state, *bits, *inputs and *next_state arrays. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a status integer value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_READ_STATE_FILE ROUTINE ===*/ /************************************************** * The following routine reads the file * * *state_file, parses the file, and stores * * the values found there into the *state, * * *bits, *inputs and *next_state arrays. * * * * Created 7/15/91 * * Last Modified 7/23/91 J.P.Murray * **************************************************/ static int cm_read_state_file(FILE *state_file,State_Table_t *states) { int i, /* indexing variable */ j, /* indexing variable */ num_tokens, /* number of tokens in a given string */ /*bit_index,*/ /* index to which bits[] integer we are accessing */ /*bit_offset,*/ /* index to which bit within the current bits[] integer we are accessing */ string_type; /* integer holding value corresponding to the type of input string obtained: 1 = HEADER => State Header string 2 = CONTINUATION => a continuation line... values of state and bits must be retreived from the previous string. */ /*int1;*/ /* temporary holding variable */ Cnv_Token_Type_t type; /* variable for testing token type returned. */ char temp[MAX_STRING_SIZE], /* holding string variable for testing input from state.in */ *s, /* main string variable */ *base_address, /* storage location for base address of string. */ *token; /* a particular token from the string */ double number; /* holding variable for timepoint values */ short bit_value=0; /* holding variable for value read from state.in file which needs to be stored */ /*base;*/ /* holding variable for existing non-masked bits[] integer */ if (!state_file) { return 1; } i = 0; s = temp; while ( fgets(s,MAX_STRING_SIZE,state_file) != NULL) { /* Test this string to see if it is whitespace... */ base_address = s; while(isspace(*s) || (*s == '*')) (s)++; if ( *s != '\0' ) { /* This is not a blank line, so process... */ s = base_address; if ( '*' != s[0] ) { /* Count up total number of tokens including \0... */ j = 0; type = CNV_STRING_TOK; while ( type != CNV_NO_TOK ) { token = CNVget_token(&s, &type); j++; } num_tokens = (j-1); /* Test the type of entry this number of tokens represents. Valid types are: a. State Header with state, bits, inputs and next_state entries...total tokens equals num_inputs + num_outputs + 3 (e.g. "5 0s 0s 0s 0 0 -> 6"). b. State continuation line with inputs and next_state only...total tokens equals num_inputs + 2. (e.g. " 0 1 -> 7"). */ if ( (3 + states->num_inputs + states->num_outputs) == num_tokens) { string_type = HEADER; } else { if ( (2 + states->num_inputs) == num_tokens) { string_type = CONTINUATION; } else { /* Number of tokens is incorrect */ return 1; } } /* reset s to beginning... */ s = base_address; /** Retrieve each token, analyze, and **/ /** store the state, bits, inputs & **/ /** next_state information. **/ if ( HEADER == string_type ) { /**** header type loop ****/ for (j=0; j<(states->num_inputs + states->num_outputs + 3); j++) { token = CNVget_token(&s, &type); if ( 0 == j ) { /* obtain state value... */ /* convert to a floating point number... */ cnv_get_spice_value(token,&number); states->state[i] = number; } else { /* obtain each bit value & set bits entry */ if ( states->num_outputs >= j ) { /* preset this bit location */ bit_value = 12; if (0 == strcmp(token,"0s")) bit_value = 0; if (0 == strcmp(token,"1s")) bit_value = 1; if (0 == strcmp(token,"Us")) bit_value = 2; if (0 == strcmp(token,"0r")) bit_value = 3; if (0 == strcmp(token,"1r")) bit_value = 4; if (0 == strcmp(token,"Ur")) bit_value = 5; if (0 == strcmp(token,"0z")) bit_value = 6; if (0 == strcmp(token,"1z")) bit_value = 7; if (0 == strcmp(token,"Uz")) bit_value = 8; if (0 == strcmp(token,"0u")) bit_value = 9; if (0 == strcmp(token,"1u")) bit_value = 10; if (0 == strcmp(token,"Uu")) bit_value = 11; /* if this bit was not recognized, return with an error */ if (12 == bit_value) { return 1; } else { /* need to store this value in the bits[] array */ cm_store_bits_value(states,i,(j-1),bit_value); } } else { /* obtain inputs info... */ if ( (states->num_outputs + states->num_inputs) >= j ) { /* preset this bit location */ bit_value = 3; if (0 == strcmp(token,"0")) bit_value = 0; if (0 == strcmp(token,"1")) bit_value = 1; if (0 == strcmp(token,"x")) bit_value = 2; if (0 == strcmp(token,"X")) bit_value = 2; /* if this bit was not recognized, return with an error */ if (3 == bit_value) { return 1; } else { /* need to store this value in the inputs[] array */ cm_store_inputs_value(states,i,(j-1-states->num_outputs),bit_value); } } else { /* obtain next_state value */ if ( (1 + states->num_outputs + states->num_inputs) == j ) { /* skip the "->" token */ } else { /* convert to a floating point number... */ cnv_get_spice_value(token,&number); states->next_state[i] = number; } } } } } } else { /**** continuation type loop ****/ /* set state value to previous state value */ states->state[i] = states->state[i-1]; /* set bits values to previous bits values */ for (j=0; jnum_outputs; j++) { /*** Retrieve the previous bit value ***? cm_get_bits_value(*states,i,j,&out); switch (out.state) { case ZERO: switch (out.strength) { case STRONG: bit_value = 0; break; case RESISTIVE: bit_value = 3; break; case HI_IMPEDANCE: bit_value = 6; break; case UNDETERMINED: bit_value = 9; break; } break; case ONE: switch (out.strength) { case STRONG: bit_value = 1; break; case RESISTIVE: bit_value = 4; break; case HI_IMPEDANCE: bit_value = 7; break; case UNDETERMINED: bit_value = 10; break; } break; case UNKNOWN: switch (out.strength) { case STRONG: bit_value = 2; break; case RESISTIVE: bit_value = 5; break; case HI_IMPEDANCE: bit_value = 8; break; case UNDETERMINED: bit_value = 11; break; } break; } */ /*** Store this bit value ***/ cm_store_bits_value(states,i,j,bit_value); } for (j=0; j<(2 + states->num_inputs); j++) { token = CNVget_token(&s, &type); if ( j < states->num_inputs ) { /* preset this bit location */ bit_value = 3; if (0 == strcmp(token,"0")) bit_value = 0; if (0 == strcmp(token,"1")) bit_value = 1; if (0 == strcmp(token,"x")) bit_value = 2; if (0 == strcmp(token,"X")) bit_value = 2; /* if this bit was not recognized, return with an error */ if (3 == bit_value) { return 1; } else { /* need to store this value in the inputs[] array */ cm_store_inputs_value(states,i,j,bit_value); } } else { /* obtain next_state value */ if ( states->num_inputs == j ) { /* skip the "->" token */ } else { /* convert to a floating point number... */ cnv_get_spice_value(token,&number); states->next_state[i] = number; } } } } i++; } s = temp; } } return 0; } /*============================================================================== FUNCTION cm_d_state() AUTHORS 17 Jun 1991 Jeffrey P. Murray MODIFICATIONS 20 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_state code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_STATE ROUTINE ==============*/ /************************************************ * The following is the model for the * * digital state machine for the * * ATESSE Version 2.0 system. * * * * Created 7/17/91 * * Last Modified 8/20/91 J.P.Murray * ************************************************/ void cm_d_state(ARGS) { int i, /* generic loop counter index */ j, /* generic loop counter index */ err=0, /* integer for storage of error status */ test; /* testing integer */ State_Table_t *states, /* pointer to base address structure for all state arrays. *states contains the pointers to state[], bits[], input[] and next_state[] arrays. These arrays are allocated using calloc, so they do not take up rotational storage space...only the *states structure does this. */ *states_old; FILE *state_file; /* pointer to the state.in input vector file */ Digital_t in, /* storage for each input bit */ out; /* storage for each output bit */ Digital_State_t *clk, /* storage for clock value */ *clk_old, /* previous clock value */ *reset, /* current reset value */ *reset_old; /* previous reset value */ char temp[MAX_STRING_SIZE], /* holding string variable for testing input from state.in */ *s; /* main string variable */ /* char *open_error = "\n***ERROR***\nD_STATE: failed to open state file.\n";*/ char *loading_error = "\n***ERROR***\nD_STATE: state file was not read successfully. \nThe most common cause of this problem is a\ntrailing blank line in the state.in file \n"; char *index_error = "\n***ERROR***\nD_STATE: An error exists in the ordering of states values\n in the states->state[] array. This is usually caused \nby non-contiguous state definitions in the state.in file \n"; /* char buf[100];*/ /****** Setup required state variables ******/ if(INIT) { /* initial pass */ /*** open file and count the number of vectors in it ***/ state_file = fopen_with_path( PARAM(state_file), "r"); /* increment counter if not a comment until EOF reached... */ i = 0; s = temp; if (state_file!=NULL) while ( fgets(s,MAX_STRING_SIZE,state_file) != NULL) { if ( '*' != s[0] ) { while(isspace(*s) || (*s == '*')) (s)++; if ( *s != '\0' ) i++; } s = temp; } /*** allocate storage for *states... ***/ cm_event_alloc(0,sizeof(State_Table_t)); states = states_old = (State_Table_t *) cm_event_get_ptr(0,0); /* Store depth value */ states->depth = i; /* Retrieve widths for bits[] and inputs[] */ states->num_inputs = PORT_SIZE(in); states->num_outputs = PORT_SIZE(out); /* assign storage for arrays to pointers in states table */ states->state = (int *) calloc((size_t) (states->depth + 1), sizeof(int)); states->bits = (short *) calloc((size_t) (states->num_outputs * states->depth / 4 + 1), sizeof(short)); states->inputs = (short *) calloc((size_t) (states->num_inputs * states->depth / 8 + 1), sizeof(short)); states->next_state = (int *) calloc((size_t) (states->depth + 1), sizeof(int)); /* Initialize *state, *bits, *inputs & *next_state to zero */ for (i=0; idepth; i++) { states->state[i] = 0; states->next_state[i] = 0; } for (i=0; i<(test=(states->num_outputs * states->depth)/4); i++) states->bits[i] = 0; for (i=0; i<(test=(states->num_inputs * states->depth)/8); i++) states->inputs[i] = 0; /*** allocate storage for *clk, *clk_old, *reset & *reset_old... ***/ cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); /* fetch states again, it might have moved per realloc */ states = states_old = (State_Table_t *) cm_event_get_ptr(0,0); clk = clk_old = (Digital_State_t *) cm_event_get_ptr(1,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(2,0); /*** Send file pointer and the four storage pointers ***/ /*** to "cm_read_state_file()". This will return after ***/ /*** reading the contents of state.in, and if no ***/ /*** errors have occurred, the "*state" and "*bits" ***/ /*** "*inputs", and "*next_state" vectors will be loaded ***/ /*** and the num_inputs, num_outputs and depth ***/ /*** values supplied. ***/ if (state_file) { rewind(state_file); err = cm_read_state_file(state_file,states); } else { err = 1; } if (err) { /* problem occurred in load...send error msg. */ cm_message_send(loading_error); /* Reset arrays to zero */ for (i=0; idepth; i++) { states->state[i] = 0; states->next_state[i] = 0; } for (i=0; i<(test=(states->num_outputs * states->depth)/4); i++) states->bits[i] = 0; for (i=0; i<(test=(states->num_inputs * states->depth)/8); i++) states->inputs[i] = 0; return; } /* close state_file */ if (state_file) fclose(state_file); /* declare load values */ // for (i=0; inum_outputs; i++) { for (i=0; inum_inputs; i++) { LOAD(in[i]) = PARAM(input_load); } LOAD(clk) = PARAM(clk_load); LOAD(reset) = PARAM(reset_load); } else { /**** Retrieve previous values ****/ states = (State_Table_t *) cm_event_get_ptr(0,0); states_old = (State_Table_t *) cm_event_get_ptr(0,1); // Copy storage *states = *states_old; clk = (Digital_State_t *) cm_event_get_ptr(1,0); clk_old = (Digital_State_t *) cm_event_get_ptr(1,1); reset = (Digital_State_t *) cm_event_get_ptr(2,0); reset_old = (Digital_State_t *) cm_event_get_ptr(2,1); } /******* Determine analysis type and output appropriate values *******/ if ( 0.0 == TIME ) { /****** DC analysis...output w/o delays ******/ /* set current state to default */ states->current_state = PARAM(reset_state); /* set indices for this state */ err = cm_set_indices(states); if ( err == TRUE ) { cm_message_send(index_error); return; } /* Output new values... */ for (i=0; inum_outputs; i++) { /* retrieve output value */ cm_get_bits_value(states,states->index0,i,&out); OUTPUT_STATE(out[i]) = out.state; OUTPUT_STRENGTH(out[i]) = out.strength; } } else { /****** Transient Analysis ******/ /*** load current input values if reset is not connected, set to zero... ***/ *clk = INPUT_STATE(clk); if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /***** Find input that has changed... *****/ /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: states->current_state = PARAM(reset_state); /* set indices for this state */ err = cm_set_indices(states); if ( err == TRUE ) { cm_message_send(index_error); return; } /* Output new values... */ for (i=0; inum_outputs; i++) { /* retrieve output value */ cm_get_bits_value(states,states->index0,i,&out); OUTPUT_STATE(out[i]) = out.state; OUTPUT_STRENGTH(out[i]) = out.strength; OUTPUT_DELAY(out[i]) = PARAM(reset_delay); } break; case ZERO: case UNKNOWN: /* output remains at current value */ for (i=0; inum_outputs; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } break; } } else { if ( ONE != *reset ) { /**** model is not held to reset value ****/ /**** Test clk value for change ****/ if (*clk != *clk_old) { /* clock or clock release */ switch ( *clk ) { case ONE: /** active edge...need to find out if a match **/ /** exists between the current inputs and **/ /** any of the inputs which drive the state **/ /** machine to the next state...if so, we **/ /** will need to retrieve that state value, **/ /** and set the new index boundaries... **/ /* for each of the entries for the current_state... */ for (i=states->index0; i<=states->indexN; i++) { /* first set err to zero... */ err = 0; /* for each bit of the inputs value for this entry...*/ for (j=0; jnum_inputs; j++) { /* retrieve the current input bit... */ in.state = INPUT_STATE(in[j]); /* ...& compare to the corresponding inputs[i] value. */ err = cm_compare_to_inputs(states,i,j,in.state); /* break if comparison was no-good... */ if ( 0 != err ) break; } /* if the comparison of the entire input word was good, break out of this loop too... */ if ( 0 == err ) break; } /* if err == 0, then a match was found...otherwise, we will not change states... */ if ( 0 == err ) { /* use "i" to retrieve the next state value: store this into current_state... */ states->current_state = states->next_state[i]; /* set indices for this new state */ err = cm_set_indices(states); if ( err == TRUE ) { cm_message_send(index_error); return; } /* Output new values... */ for (i=0; inum_outputs; i++) { /* retrieve output value */ cm_get_bits_value(states,states->index0,i,&out); OUTPUT_STATE(out[i]) = out.state; OUTPUT_STRENGTH(out[i]) = out.strength; OUTPUT_DELAY(out[i]) = PARAM(clk_delay); } } else { /* no change in state or in output */ for (i=0; inum_outputs; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } } break; case ZERO: case UNKNOWN: /* no change in state or in output */ for (i=0; inum_outputs; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } break; } } else { /* input value must have changed... return previous output value. */ for (i=0; inum_outputs; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } } } else { /* Reset is active... return previous output values. */ for (i=0; inum_outputs; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } } } } } ngspice-26/src/xspice/icm/digital/d_state/ifspec.ifs0000644000265600020320000000725312264261473022106 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_state (state machine) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_state Spice_Model_Name: d_state Description: "digital state machine" PORT_TABLE: Port_Name: in clk Description: "input" "clock" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: yes no Vector_Bounds: - - Null_Allowed: yes no PORT_TABLE: Port_Name: reset out Description: "reset" "output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: no yes Vector_Bounds: - [1 -] Null_Allowed: yes no PARAMETER_TABLE: Parameter_Name: clk_delay reset_delay Description: "delay from CLK" "delay from reset" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: state_file Description: "state transition specification file name" Data_Type: string Default_Value: "state.txt" Limits: - Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: reset_state Description: "default state on RESET & at DC" Data_Type: int Default_Value: 0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: input_load Description: "input loading capacitance (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: clk_load Description: "clock loading capacitance (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: reset_load Description: "reset loading capacitance (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: no ngspice-26/src/xspice/icm/digital/d_state/d_state.h0000644000265600020320000000250212264261473021716 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_state/d_state.h Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 20 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This file contains the header information for the d_state model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES N/A NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ #define OK 0 #define FAIL 1 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef char line_t[82]; /* A SPICE size line. <= 80 characters plus '\n\0' */ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ ngspice-26/src/xspice/icm/digital/adc_bridge/0000755000265600020320000000000012264261473020543 5ustar andreasadminngspice-26/src/xspice/icm/digital/adc_bridge/cfunc.mod0000644000265600020320000002431112264261473022343 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE adc_bridge/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the adc_bridge code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() int cm_event_queue() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_adc_bridge() AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This function implements the adc_bridge code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() int cm_event_queue() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_ADC_BRIDGE ROUTINE ===*/ /************************************************ * The following is the model for the * * analog-to-digital nodebridge for the * * ATESSE Version 2.0 system. * * * * Created 6/6/91 * * Last Modified 7/26/91 J.P.Murray * ************************************************/ void cm_adc_bridge(ARGS) { double in_low, /* analog output value corresponding to '0' digital input */ in_high, /* analog output value corresponding to '1' digital input */ current_time, /* the current time value */ *in, /* base address of array holding all digital output values plus their previous values */ *in_old; /* base address of array holding previous output values */ int i, /* generic loop counter index */ size; /* number of input & output ports */ Digital_State_t *out, /* base address of array holding all input values plus their previous values */ *out_old, /* base address of array holding previous input values */ test; /* temp holding variable for digital states */ /* determine "width" of the node bridge... */ size = PORT_SIZE(in); in_high = PARAM(in_high); in_low = PARAM(in_low); if (INIT) { /*** Test for INIT == TRUE. If so, allocate storage, etc. ***/ /* Allocate storage for inputs */ cm_analog_alloc(0, size * (int) sizeof(double)); /* Allocate storage for outputs */ cm_event_alloc(1, size * (int) sizeof(Digital_State_t)); /* Get analog addresses */ in = in_old = (double *) cm_analog_get_ptr(0,0); /* Get discrete addresses */ out = out_old = (Digital_State_t *) cm_event_get_ptr(1,0); } else { /*** This is not an initialization pass...retrieve storage addresses and calculate new outputs, if required. ***/ /** Retrieve previous values... **/ /* assign discrete addresses */ in = (double *) cm_analog_get_ptr(0,0); in_old = (double *) cm_analog_get_ptr(0,1); /* assign analog addresses */ out = (Digital_State_t *) cm_event_get_ptr(1,0); out_old = (Digital_State_t *) cm_event_get_ptr(1,1); } /* read current input values */ for (i=0; i= in_high) { /* high output required */ test = ONE; if ( test != out_old[i] ) { /* call for event breakpoint... */ current_time = TIME; cm_event_queue(current_time); } else { /* no change since last time */ } } else { /* unknown output required */ if ( UNKNOWN != out_old[i] ) { /* call for event breakpoint... */ current_time = TIME; cm_event_queue(current_time); } else { /* no change since last time */ } } } } break; case EVENT: /** discrete call...lots to do **/ /* loop through all inputs... */ for (i=0; i= in_high) { /* high output required */ out[i] = ONE; if ( out[i] != out_old[i] ) { /* post changed value */ OUTPUT_STATE(out[i]) = ONE; OUTPUT_DELAY(out[i]) = PARAM(rise_delay); } else { /* no change since last time */ OUTPUT_CHANGED(out[i]) = FALSE; } } else { /* unknown output required */ out[i] = UNKNOWN; if ( UNKNOWN != out_old[i] ) { /* post changed value */ OUTPUT_STATE(out[i]) = UNKNOWN; switch (out_old[i]) { case ONE: OUTPUT_DELAY(out[i]) = PARAM(fall_delay); break; case ZERO: OUTPUT_DELAY(out[i]) = PARAM(rise_delay); break; case UNKNOWN: /* should never get here! */ break; } } else { /* no change since last time */ OUTPUT_CHANGED(out[i]) = FALSE; } } } /* regardless, output the strength */ OUTPUT_STRENGTH(out[i]) = STRONG; } break; } } else { /*** TIME == 0.0 => set outputs to input value... ***/ /* loop through all inputs... */ for (i=0; i= in_high) { /* high output required */ OUTPUT_STATE(out[i]) = out[i] = ONE; } else { OUTPUT_STATE(out[i]) = out[i] = UNKNOWN; } OUTPUT_STRENGTH(out[i]) = STRONG; } } } ngspice-26/src/xspice/icm/digital/adc_bridge/ifspec.ifs0000644000265600020320000000435412264261473022525 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the hybrid adc_bridge code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: adc_bridge C_Function_Name: cm_adc_bridge Description: "analog-to-digital converter node bridge" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v d Allowed_Types: [v,vd,i,id,vnam] [d] Vector: yes yes Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_low Description: "maximum 0-valued analog input" Data_Type: real Default_Value: 0.1 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: in_high Description: "minimum 1-valued analog input" Data_Type: real Default_Value: 0.9 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_srff/0000755000265600020320000000000012264261473017743 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_srff/cfunc.mod0000644000265600020320000005575412264261473021562 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_srff/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 24 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the d_srff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_eval_sr_result AUTHORS 30 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Evaluates the S and R input states, plus the last state of the flip flop, and returns the expected output value. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); RETURNED VALUE A Digital_State_t. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_EVAL_SR_RESULT ROUTINE ===*/ static Digital_State_t cm_eval_sr_result(Digital_State_t s_input, Digital_State_t r_input, Digital_State_t old_output) { Digital_State_t output = ZERO; switch (s_input) { case ZERO: switch (r_input) { case ZERO: output = old_output; break; case ONE: output = ZERO; break; case UNKNOWN: output = UNKNOWN; break; } break; case ONE: switch (r_input) { case ZERO: output = ONE; break; case ONE: output = UNKNOWN; break; case UNKNOWN: output = UNKNOWN; break; } break; case UNKNOWN: output = UNKNOWN; break; } return output; } /*============================================================================== FUNCTION cm_d_srff() AUTHORS 24 Jun 1991 Jeffrey P. Murray MODIFICATIONS 24 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_srff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_SRFF ROUTINE ===*/ /************************************************ * The following is the model for the * * digital sr-type flip flop for the * * ATESSE Version 2.0 system. * * * * Created 6/24/91 J.P.Murray * ************************************************/ void cm_d_srff(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *clk, /* current clk value */ *clk_old, /* previous clk value */ *set, /* current set value for dff */ *set_old, /* previous set value for dff */ *reset, /* current reset value for dff */ *reset_old, /* previous reset value for dff */ *out, /* current output for dff */ *out_old, /* previous output for dff */ s_input, /* current j input value */ r_input, /* current k input value */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); /* declare load values */ LOAD(s) = PARAM(sr_load); LOAD(r) = PARAM(sr_load); LOAD(clk) = PARAM(clk_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ clk = clk_old = (Digital_State_t *) cm_event_get_ptr(0,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(1,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(2,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(3,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ clk = (Digital_State_t *) cm_event_get_ptr(0,0); clk_old = (Digital_State_t *) cm_event_get_ptr(0,1); set = (Digital_State_t *) cm_event_get_ptr(1,0); set_old = (Digital_State_t *) cm_event_get_ptr(1,1); reset = (Digital_State_t *) cm_event_get_ptr(2,0); reset_old = (Digital_State_t *) cm_event_get_ptr(2,1); out = (Digital_State_t *) cm_event_get_ptr(3,0); out_old = (Digital_State_t *) cm_event_get_ptr(3,1); } /******** load current input values if set or reset are not connected, set to zero... ********/ *clk = INPUT_STATE(clk); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *reset) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *reset ) { /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *set) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *set ) { /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test clk value for change ****/ if ( (*clk != *clk_old) && (*reset != ONE) && (*set != ONE) ) { /* clock or clock release */ switch ( *clk ) { case ONE: /* active edge...calculate new data output */ s_input = INPUT_STATE(s); r_input = INPUT_STATE(r); temp = cm_eval_sr_result(s_input,r_input,*out_old); if (*out_old != temp) { /* clk will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(clk_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(clk_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* data value must have changed... return previous output value. */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_srff/ifspec.ifs0000644000265600020320000001016212264261473021717 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_srff code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_srff Spice_Model_Name: d_srff Description: "digital set-reset flip flop" PORT_TABLE: Port_Name: s r Description: "s input" "r input" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: clk Description: "clock" Direction: in Default_Type: d Allowed_Types: [d] Vector: no Vector_Bounds: - Null_Allowed: no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: clk_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: sr_load clk_load Description: "s,r load values (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_open_c/0000755000265600020320000000000012264261473020246 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_open_c/cfunc.mod0000644000265600020320000001154212264261473022050 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_open_c/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 19 Nov 1991 Jeffrey P. Murray MODIFICATIONS 19 Nov 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_open_c code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_open_c() AUTHORS 19 Nov 1991 Jeffrey P. Murray MODIFICATIONS 19 Nov 1991 Jeffrey P. Murray SUMMARY This function implements the d_open_c code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_OPEN_C ROUTINE ===*/ /************************************************ * The following is the model for the * * digital open collector buffer for the * * ATESSE Version 2.0 system. * * * * Created 11/19/91 J.P,Murray * ************************************************/ void cm_d_open_c(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *out, /* temporary output for buffers */ *out_old; /* previous output for buffers */ /** Setup required state variables **/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); /* define input loading... */ LOAD(in) = PARAM(input_load); /* retrieve storage for the outputs */ out = out_old = (Digital_State_t *) cm_event_get_ptr(0,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ out = (Digital_State_t *) cm_event_get_ptr(0,0); out_old = (Digital_State_t *) cm_event_get_ptr(0,1); } /** Check on analysis type **/ if (ANALYSIS == DC) { /* DC analysis...output w/o delays */ OUTPUT_STATE(out) = *out = INPUT_STATE(in); if ( ONE == *out ) { OUTPUT_STRENGTH(out) = HI_IMPEDANCE; } else if ( ZERO == *out ) { OUTPUT_STRENGTH(out) = STRONG; } else { OUTPUT_STRENGTH(out) = UNDETERMINED; } } else { /* Transient Analysis */ switch ( INPUT_STATE(in) ) { /* fall to zero value */ case 0: OUTPUT_STATE(out) = *out = ZERO; OUTPUT_STRENGTH(out) = STRONG; OUTPUT_DELAY(out) = PARAM(fall_delay); break; /* rise to one value */ case 1: OUTPUT_STATE(out) = *out = ONE; OUTPUT_STRENGTH(out) = HI_IMPEDANCE; OUTPUT_DELAY(out) = PARAM(open_delay); break; /* unknown output */ default: OUTPUT_STATE(out) = *out = UNKNOWN; OUTPUT_STRENGTH(out) = UNDETERMINED; /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ OUTPUT_DELAY(out) = PARAM(open_delay); } else { /* add falling delay */ OUTPUT_DELAY(out) = PARAM(fall_delay); } break; } } } ngspice-26/src/xspice/icm/digital/d_open_c/ifspec.ifs0000644000265600020320000000360412264261473022225 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 19 Nov 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_open_c (open collector) code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: d_open_c C_Function_Name: cm_d_open_c Description: "digital one-bit-wide open-collector buffer" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: open_delay fall_delay Description: "open delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: input_load Description: "input load value (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/digital/d_tff/0000755000265600020320000000000012264261473017562 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_tff/cfunc.mod0000644000265600020320000005360612264261473021373 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_tff/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 24 June 1991 Jeffrey P. Murray MODIFICATIONS 12 Aug 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the d_tff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*=============================================================================*/ /*=== CM ROUTINE ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_d_tff() AUTHORS 24 Jun 1991 Jeffrey P. Murray MODIFICATIONS 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_tff code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_D_TFF ROUTINE ===*/ /************************************************ * The following is the model for the * * digital t-type flip flop for the * * ATESSE Version 2.0 system. * * * * Created 6/24/91 J.P.Murray * ************************************************/ void cm_d_tff(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *clk, /* current clk value */ *clk_old, /* previous clk value */ *set, /* current set value for dff */ *set_old, /* previous set value for dff */ *reset, /* current reset value for dff */ *reset_old, /* previous reset value for dff */ *out, /* current output for dff */ *out_old, /* previous output for dff */ toggle_input, /* current toggle input value */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); /* declare load values */ LOAD(t) = PARAM(t_load); LOAD(clk) = PARAM(clk_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ clk = clk_old = (Digital_State_t *) cm_event_get_ptr(0,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(1,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(2,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(3,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ clk = (Digital_State_t *) cm_event_get_ptr(0,0); clk_old = (Digital_State_t *) cm_event_get_ptr(0,1); set = (Digital_State_t *) cm_event_get_ptr(1,0); set_old = (Digital_State_t *) cm_event_get_ptr(1,1); reset = (Digital_State_t *) cm_event_get_ptr(2,0); reset_old = (Digital_State_t *) cm_event_get_ptr(2,1); out = (Digital_State_t *) cm_event_get_ptr(3,0); out_old = (Digital_State_t *) cm_event_get_ptr(3,1); } /******** load current input values if set or reset are not connected, set to zero... ********/ *clk = INPUT_STATE(clk); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *reset) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *reset ) { /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: if ( ONE != *set) { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case UNKNOWN: if ( ONE == *set ) { /* output goes to ONE */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; } } else { /**** Test clk value for change ****/ if ( (*clk != *clk_old) && (*reset != ONE) && (*set != ONE) ) { /* clock or clock release */ switch ( *clk ) { case ONE: /* active edge...calculate new data output */ toggle_input = INPUT_STATE(t); switch (toggle_input) { case ONE: temp = *out_old; cm_toggle_bit(&temp); break; case ZERO: temp = *out_old; break; case UNKNOWN: temp = UNKNOWN; break; } if (*out_old != temp) { /* clk will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(clk_delay); } cm_toggle_bit(&temp); if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(clk_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* data value must have changed... return previous output value. */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_tff/ifspec.ifs0000644000265600020320000000766512264261473021554 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_tff code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_tff Spice_Model_Name: d_tff Description: "digital toggle flip flop" PORT_TABLE: Port_Name: t clk Description: "toggle input" "clock" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: clk_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: t_load clk_load Description: "toggle load value (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_ram/0000755000265600020320000000000012264261473017562 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_ram/cfunc.mod0000644000265600020320000006733412264261473021376 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_ram/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 23 Aug 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the d_ram code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_address_to_decimal() AUTHORS 27 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY Calculates a decimal value from binary values passed. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE A pointer containing the total (*total). GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_ADDRESS_TO_DECIMAL ROUTINE ===*/ /************************************************ * The following routine calculates a * * decimal value equivalent to the binary * * value passed to it on address[i] bits. * * The determined value is written to the * * integer *total. * * * * Created 6/27/91 J.P.Murray * ************************************************/ static int cm_address_to_decimal(Digital_State_t *address,int address_size,int *total) { int i, /* indexing variable */ multiplier, /* binary multiplier value */ err; /* error value: 1 => output is unknown 0 => output is valid */ err = 0; *total = 0; multiplier = 1; for (i=0; i> (ram_offset * 2)); switch (value) { case 0: return ZERO; case 1: return ONE; default: return UNKNOWN; } } /*============================================================================== FUNCTION cm_initialize_ram() AUTHORS 9 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function stores digital data into specific short integer array locations. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns updated ram[] value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_INITIALIZE_RAM ROUTINE ===*/ /************************************************ * The following routine stores two-bit * * data into short integer array "ram". The * * integers are assumed to be at least two * * bytes each, so each will hold eight two- * * bit values. * * * * Created 7/9/91 J.P.Murray * ************************************************/ static void cm_initialize_ram(Digital_State_t out,int word_width,int bit_number, int word_number,short *ram) { int /*err,*/ /* error index value */ int1, /* temp storage variable */ /*int2,*/ /* temp storage variable */ ram_index, /* ram base address at which word bits will be found */ ram_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /* obtain offset value from word_number, word_width & bit_number */ int1 = word_number * word_width + bit_number; ram_index = int1 >> 3; ram_offset = int1 & 7; /* retrieve entire base_address ram integer... */ base = ram[ram_index]; /* for each offset, mask off the bits and store values */ cm_mask_and_store(&base,ram_offset,out); /* store modified base value */ ram[ram_index] = base; } /*============================================================================== FUNCTION cm_store_ram_value() AUTHORS 27 Jun 1991 Jeffrey P. Murray MODIFICATIONS 9 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function stores digital data into specific short integer array locations, after decoding address bits passed to it (using cm_address_to_decimal routine). INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns updated ram[] value via *ram pointer. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_STORE_RAM_VALUE ROUTINE ===*/ /************************************************ * The following routine stores two-bit * * data into short integer array "ram". The * * integers are assumed to be at least two * * bytes each, so each will hold eight two- * * bit values. A sister routine, cm_get_ * * ram_value is used to retrieve the two- * * bit values from the "ram" array. * * * * Created 6/27/91 J.P.Murray * ************************************************/ static void cm_store_ram_value(Digital_State_t out,int word_width,int bit_number, Digital_State_t *address,int address_size, short *ram) { int err, /* error index value */ int1, /* temp storage variable */ word_number, /* particular word of interest...this value is derived from the passed address bits */ ram_index, /* ram base address at which word bits will be found */ ram_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /** first obtain word_number from *address values **/ err = cm_address_to_decimal(address,address_size,&word_number); if ( FALSE == err ) { /** valid data was returned...store value **/ /* obtain offset value from word_number, word_width & bit_number */ int1 = word_number * word_width + bit_number; ram_index = int1 >> 3; ram_offset = int1 & 7; /* retrieve entire base_address ram integer... */ base = ram[ram_index]; /* for each offset, mask off the bits and store values */ cm_mask_and_store(&base,ram_offset,out); /* store modified base value */ ram[ram_index] = base; } } /*============================================================================== FUNCTION cm_get_ram_value() AUTHORS 27 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function retrieves digital data from specific short integer array locations, after decoding address bits passed to it (using cm_address_to_decimal routine). This is a sister routine to cm_store_ram_value. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns output value via *out pointer. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_GET_RAM_VALUE ROUTINE ===*/ /************************************************ * The following routine retrieves two-bit * * data from short integer array "ram". The * * integers are assumed to be at least two * * bytes each, so each will hold eight two- * * bit values. A sister routine, cm_store_ * * ram_value is used to store the two-bit * * values into the "ram" array. * * * * Created 6/27/91 J.P.Murray * ************************************************/ static Digital_State_t cm_get_ram_value(int word_width,int bit_number,Digital_State_t *address, int address_size,short *ram) { int err, /* error index value */ int1, /* temp storage variable */ word_number, /* particular word of interest...this value is derived from the passed address bits */ ram_index, /* ram base address at which word bits will be found */ ram_offset; /* offset from ram base address at which bit[0] of the required word can be found */ short base; /* variable to hold current base integer for comparison purposes. */ /** first obtain word_number from *address values **/ err = cm_address_to_decimal(address,address_size,&word_number); if ( FALSE == err ) { /** valid data was returned **/ /* obtain offset value from word_number, word_width & bit_number */ int1 = word_number * word_width + bit_number; ram_index = int1 >> 3; ram_offset = int1 & 7; /* retrieve entire base_address ram integer... */ base = ram[ram_index]; /* for each offset, mask off the bits and determine values */ return cm_mask_and_retrieve(base,ram_offset); } else { /** incorrect data returned...return UNKNOWN values **/ return UNKNOWN; } } /*============================================================================== FUNCTION cm_d_ram() AUTHORS 26 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_ram code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_RAM ROUTINE ===*/ /************************************************ * The following is the model for the * * digital M x N random access memory for the * * ATESSE Version 2.0 system. * * * * Created 6/26/91 J.P.Murray * ************************************************/ void cm_d_ram(ARGS) { int i, /* generic loop counter index */ j, /* generic loop counter index */ ram_size, /* total number of words in ram */ num_of_ram_ints, /* actual number of "short" integer values necessary to store all of the ram_size integers */ address_size, /* total number of address lines */ select_size, /* total number of address lines */ select_value, /* decimal value compared with select inputs to confirm that the ram has indeed been activated */ word_width, /* width of each word in bits */ int_test, /* integer test variable */ address_changed, /* TRUE if address is different from that on the previous call...FALSE otherwise */ address_unknown; /* TRUE if currently-read address has at least one line which is an unknown value. */ short int *ram, /* storage words...note that the total ram data will be stored in the two-bytes-per-Digital_State_t...since we require 2 bits per ram bit (for ZERO, ONE & UNKNOWN), we will store 8 ram bits per Digital_State_t location */ *ram_old; /* previous values of storage words */ Digital_State_t *address, /* address line values */ *address_old, /* previous address line values */ *write_en, /* write_en value */ *write_en_old, /* previous write_en value */ *select, /* current selected state of ram... note that this is derived from all of the select lines into the ram */ *select_old, /* previous selected state of ram */ d_test, /* digital debugging variable */ out; /* current output bit */ /** retrieve device size values...& other parameters **/ address_size = PORT_SIZE(address); /* calculate ram word size from address size */ ram_size = 1; for (i=0; i>1; } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ /** initialize ram to ic value **/ out = (Digital_State_t) PARAM(ic); for (i=0; i #include #include #include /*=== CONSTANTS ========================*/ #define OK 0 #define FAIL 1 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef char line_t[82]; /* A SPICE size line. <= 80 characters plus '\n\0' */ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*=============================================================================*/ ngspice-26/src/xspice/icm/digital/d_source/cfunc.mod0000644000265600020320000007341012264261473022107 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_source/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 30 Sept 1991 Jeffrey P. Murray 19 Aug 2012 Holger Vogt SUMMARY This file contains the model-specific routines used to functionally describe the code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() int cm_event_queue() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include "d_source.h" /* ...contains macros & type defns. for this model. 6/13/90 - JPM */ #include #include #include #include /*=== CONSTANTS ========================*/ #define MAX_STRING_SIZE 200 /*=== MACROS ===========================*/ #if defined(__MINGW32__) || defined(_MSC_VER) #define DIR_PATHSEP "\\" #else #define DIR_PATHSEP "/" #endif #ifdef _MSC_VER #define snprintf _snprintf #endif /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef struct { int width, /* width of table...equal to size of out port */ depth; /* depth of table...equal to size of "timepoints" array, and to the total number of vectors retrieved from the source.in file. */ double *all_timepoints; /* the storage array for the timepoints, as read from file. This will have size equal to "depth" */ char **all_data; /* the storage array for the output bit representations; as read from file. This will have size equal to width*depth, one short will hold a 12-state bit description. */ } Local_Data_t; /* Type definition for each possible token returned. */ typedef enum token_type_s {CNV_NO_TOK,CNV_STRING_TOK} Cnv_Token_Type_t; /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION *CNVgettok() AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function obtains the next token from an input stream. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a string value representing the next token. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNVgettok ROUTINE ================*/ /* Get the next token from the input string. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. */ #include static char *CNVgettok(char **s) { char *buf; /* temporary storage to copy token into */ /*char *temp;*/ /* temporary storage to copy token into */ char *ret_str; /* storage for returned string */ int i; /* allocate space big enough for the whole string */ buf = (char *) malloc(strlen(*s) + 1); /* skip over any white space */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* isolate the next token */ switch(**s) { case '\0': /* End of string found */ if(buf) free(buf); return(NULL); default: /* Otherwise, we are dealing with a */ /* string representation of a number */ /* or a mess o' characters. */ i = 0; while( (**s != '\0') && (! ( isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',') ) ) ) { buf[i] = **s; i++; (*s)++; } buf[i] = '\0'; break; } /* skip over white space up to next token */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* make a copy using only the space needed by the string length */ ret_str = (char *) malloc(strlen(buf) + 1); ret_str = strcpy(ret_str,buf); if(buf) free(buf); return(ret_str); } /*============================================================================== FUNCTION *CNVget_token() AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function obtains the next token from an input stream. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a string value representing the next token. Uses *CNVget_tok. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNVget_token ROUTINE =============*/ /* Get the next token from the input string together with its type. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. */ static char *CNVget_token(char **s, Cnv_Token_Type_t *type) { char *ret_str; /* storage for returned string */ /* get the token from the input line */ ret_str = CNVgettok(s); /* if no next token, return */ if(ret_str == NULL) { *type = CNV_NO_TOK; return(NULL); } /* else, determine and return token type */ switch(*ret_str) { default: *type = CNV_STRING_TOK; break; } return(ret_str); } /*============================================================================== FUNCTION cnv_get_spice_value() AUTHORS ??? Bill Kuhn MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function takes as input a string token from a SPICE deck and returns a floating point equivalent value. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns the floating point value in pointer *p_value. Also returns an integer representing successful completion. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CNV_get_spice_value ROUTINE =============*/ /* Function takes as input a string token from a SPICE deck and returns a floating point equivalent value. */ static int cnv_get_spice_value( char *str, /* IN - The value text e.g. 1.2K */ double *p_value ) /* OUT - The numerical value */ { /* the following were "int4" devices - jpm */ size_t len; size_t i; int n_matched; line_t val_str; /*char *suffix;*/ char c = ' '; char c1; double scale_factor; double value; /* Scan the input string looking for an alpha character that is not */ /* 'e' or 'E'. Such a character is assumed to be an engineering */ /* suffix as defined in the Spice 2G.6 user's manual. */ len = strlen(str); if( len > (sizeof(val_str) - 1)) len = sizeof(val_str) - 1; for(i = 0; i < len; i++) { c = str[i]; if( isalpha(c) && (c != 'E') && (c != 'e') ) break; else if( isspace(c) ) break; else val_str[i] = c; } val_str[i] = '\0'; /* Determine the scale factor */ if( (i >= len) || (! isalpha(c)) ) scale_factor = 1.0; else { if(isupper(c)) c = (char) tolower(c); switch(c) { case 't': scale_factor = 1.0e12; break; case 'g': scale_factor = 1.0e9; break; case 'k': scale_factor = 1.0e3; break; case 'u': scale_factor = 1.0e-6; break; case 'n': scale_factor = 1.0e-9; break; case 'p': scale_factor = 1.0e-12; break; case 'f': scale_factor = 1.0e-15; break; case 'm': i++; if(i >= len) { scale_factor = 1.0e-3; break; } c1 = str[i]; if(! isalpha(c1)) { scale_factor = 1.0e-3; break; } if(islower(c1)) c1 = (char) toupper(c1); if(c1 == 'E') scale_factor = 1.0e6; else if(c1 == 'I') scale_factor = 25.4e-6; else scale_factor = 1.0e-3; break; default: scale_factor = 1.0; } } /* Convert the numeric portion to a float and multiply by the */ /* scale factor. */ n_matched = sscanf(val_str,"%le",&value); if(n_matched < 1) { *p_value = 0.0; return(FAIL); } *p_value = value * scale_factor; return(OK); } /*============================================================================== FUNCTION cm_source_retrieve() AUTHORS 15 Jul 1991 Jeffrey P. Murray MODIFICATIONS 16 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 19 Aug 2012 H. Vogt SUMMARY Retrieves a bit value from a char character INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns a Digital_t value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_SOURCE_RETRIEVE ROUTINE ===*/ /************************************************** * The following routine retrieves * * the value passed to it by the out value. * * * * Created 7/15/91 J.P.Murray * **************************************************/ static void cm_source_retrieve(char val, Digital_t *out) { int value = (int)val; switch (value) { case 0: out->state = ZERO; out->strength = STRONG; break; case 1: out->state = ONE; out->strength = STRONG; break; case 2: out->state = UNKNOWN; out->strength = STRONG; break; case 3: out->state = ZERO; out->strength = RESISTIVE; break; case 4: out->state = ONE; out->strength = RESISTIVE; break; case 5: out->state = UNKNOWN; out->strength = RESISTIVE; break; case 6: out->state = ZERO; out->strength = HI_IMPEDANCE; break; case 7: out->state = ONE; out->strength = HI_IMPEDANCE; break; case 8: out->state = UNKNOWN; out->strength = HI_IMPEDANCE; break; case 9: out->state = ZERO; out->strength = UNDETERMINED; break; case 10: out->state = ONE; out->strength = UNDETERMINED; break; case 11: out->state = UNKNOWN; out->strength = UNDETERMINED; break; } } /*============================================================================== FUNCTION cm_get_source_value() AUTHORS 15 Jul 1991 Jeffrey P. Murray MODIFICATIONS 16 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 19 Aug 2012 H. Vogt SUMMARY Retrieves a char per bit value from the array "all_data". INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns data via *out pointer. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_GET_SOURCE_VALUE ROUTINE ===*/ /************************************************ * The following routine retrieves a bit * * from all_data and stores them in out * * * * Created 8/19/12 H. Vogt * ************************************************/ static void cm_get_source_value(int row, int bit_number, char **all_data, Digital_t *out) { char val; val = all_data[row][bit_number]; cm_source_retrieve(val,out); } /*============================================================================== FUNCTION cm_read_source() AUTHORS 15 Jul 1991 Jeffrey P. Murray MODIFICATIONS 19 Jul 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 19 Aug 2012 H. Vogt SUMMARY This function reads the source file and stores the results for later output by the model. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns output bits stored in "all_data" array, time values in "all_timepoints" array, return != 0 code if error. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== Static CM_READ_SOURCE ROUTINE ===*/ /************************************************** * The following routine reads the file * * *source, parses the file, and stores * * the values found there into the *bits & * * *timepoints arrays. * * * * Created 7/15/91 J.P.Murray * **************************************************/ static int cm_read_source(FILE *source, Local_Data_t *loc) { size_t n; /* loop index */ int i, /* indexing variable */ j, /* indexing variable */ num_tokens; /* number of tokens in a given string */ Cnv_Token_Type_t type; /* variable for testing token type returned. */ char temp[MAX_STRING_SIZE], /* holding string variable for testing input from source.in */ *s, /* main string variable */ *base_address, /* storage location for base address of string. */ *token; /* a particular token from the string */ double number; /* holding variable for timepoint values */ char bit_value; /* holding variable for value read from source file which needs to be stored */ i = 0; s = temp; while ( fgets(s,MAX_STRING_SIZE,source) != NULL) { /* Test this string to see if it is whitespace... */ base_address = s; while(isspace(*s) || (*s == '*')) (s)++; if ( *s != '\0' ) { /* This is not a blank line, so process... */ s = base_address; if ( '*' != s[0] ) { /* Count up total number of tokens including \0... */ j = 0; type = CNV_STRING_TOK; while ( type != CNV_NO_TOK ) { token = CNVget_token(&s, &type); if (token) free(token); j++; } num_tokens = j; /* If this number is incorrect, return with an error */ if ( (loc->width + 2) != num_tokens) { return 2; } /* reset s to beginning... */ s = base_address; /* set storage space for bits in a row and set them to 0*/ loc->all_data[i] = (char*)malloc(sizeof(char) * loc->width); for (n = 0; n < (unsigned int)loc->width; n++) loc->all_data[i][n] = 0; /** Retrieve each token, analyze, and **/ /** store the timepoint and bit information **/ for (j=0; j<(loc->width + 1); j++) { token = CNVget_token(&s, &type); if ( 0 == j ) { /* obtain timepoint value... */ /* convert to a floating point number... */ cnv_get_spice_value(token,&number); loc->all_timepoints[i] = number; /* provided this is not the first timepoint to be written... */ if ( 0 != i ) { /* if current timepoint value is not greater than the previous value, then return with an error message... */ if ( loc->all_timepoints[i] <= loc->all_timepoints[i-1] ) { return 3; } } } else { /* obtain each bit value & set bits entry */ /* preset this bit location */ bit_value = 12; if (0 == strcmp(token,"0s")) bit_value = 0; if (0 == strcmp(token,"1s")) bit_value = 1; if (0 == strcmp(token,"Us")) bit_value = 2; if (0 == strcmp(token,"0r")) bit_value = 3; if (0 == strcmp(token,"1r")) bit_value = 4; if (0 == strcmp(token,"Ur")) bit_value = 5; if (0 == strcmp(token,"0z")) bit_value = 6; if (0 == strcmp(token,"1z")) bit_value = 7; if (0 == strcmp(token,"Uz")) bit_value = 8; if (0 == strcmp(token,"0u")) bit_value = 9; if (0 == strcmp(token,"1u")) bit_value = 10; if (0 == strcmp(token,"Uu")) bit_value = 11; /* if this bit was not recognized, return with an error */ if (12 == bit_value) { return 4; } else { /* need to store this value in the all_data[] array */ loc->all_data[i][j-1] = bit_value; } } if (token) free(token); } i++; } s = temp; } } return 0; } /*============================================================================== FUNCTION cm_d_source() AUTHORS 13 Jun 1991 Jeffrey P. Murray MODIFICATIONS 8 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 19 Aug 2012 H. Vogt SUMMARY This function implements the d_source code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() int cm_event_queue() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_SOURCE ROUTINE ==============*/ /************************************************ * The following is the new model for * * the digital source * * * * Created 8/19/12 H. Vogt * ************************************************/ void cm_d_source(ARGS) { int i, /* generic loop counter index */ err; /* integer for storage of error status */ /**** the state variables, memory allocation with cm_event_alloc *****/ char *bits, /* the storage array for the output bit representations... this will have size equal to width, since one short will hold a 12-state bit description. */ *bits_old; /* the storage array for old bit values */ int *row_index, /* current index into source tables */ *row_index_old; /* previous index into source tables */ double *timepoint, /* the storage array for the timepoints, a single point */ *timepoint_old; /* the storage for the old timepoint */ /*********************************************************************/ volatile double /* enforce 64 bit precision, (equality comparison) */ test_double; /* test variable for doubles */ FILE *source; /* pointer to the source.in input vector file */ Digital_t out; /* storage for each output bit */ char temp[MAX_STRING_SIZE], /* holding string variable for testing input from source.in */ *s; /* main string variable */ char *loading_error = "\nERROR **\n D_SOURCE: source.in file was not read successfully. \n"; Local_Data_t *loc; /* Pointer to local static data, not to be included in the state vector (save memory!) */ /**** Setup required local and state variables ****/ /* local data will be setup once during INIT and never change again */ if(INIT) { /* initial pass */ /*** open file and count the number of vectors in it ***/ char* filename = PARAM(input_file); source = fopen_with_path( filename, "r"); if (!source) { char *lbuffer, *p; lbuffer = getenv("NGSPICE_INPUT_DIR"); if (lbuffer && *lbuffer) { p = (char*) malloc(strlen(lbuffer) + strlen(DIR_PATHSEP) + strlen(PARAM(input_file)) + 1); sprintf(p, "%s%s%s", lbuffer, DIR_PATHSEP, PARAM(input_file)); source = fopen(p, "r"); free(p); } if (!source) { char msg[512]; snprintf(msg, sizeof(msg), "cannot open file %s", PARAM(input_file)); cm_message_send(msg); } } /* increment counter if not a comment until EOF reached... */ i = 0; if (source) { s = temp; while ( fgets(s,MAX_STRING_SIZE,source) != NULL) { if ( '*' != s[0] ) { while(isspace(*s) || (*s == '*')) (s)++; if ( *s != '\0' ) i++; } s = temp; } } /*** allocate static storage for *loc ***/ STATIC_VAR (locdata) = calloc (1 , sizeof ( Local_Data_t )); loc = STATIC_VAR (locdata); /*** allocate storage for *index, *bits & *timepoint ***/ cm_event_alloc(0, sizeof(int)); cm_event_alloc(1, PORT_SIZE(out) * (int) sizeof(char)); cm_event_alloc(2, (int) sizeof(double)); /**** Get all pointers again (to avoid realloc problems) ****/ row_index = row_index_old = (int *) cm_event_get_ptr(0,0); bits = bits_old = (char *) cm_event_get_ptr(1,0); timepoint = timepoint_old = (double *) cm_event_get_ptr(2,0); /* Initialize info values... */ *row_index = 0; loc->depth = i; /* Retrieve width of the source */ loc->width = PORT_SIZE(out); /*** allocate storage for **all_data, & *all_timepoints ***/ loc->all_timepoints = (double*)calloc(i, sizeof(double)); loc->all_data = (char**)calloc(i, sizeof(char*)); /* Send file pointer and the two array storage pointers */ /* to "cm_read_source()". This will return after */ /* reading the contents of source.in, and if no */ /* errors have occurred, the "*all_data" and "*all_timepoints" */ /* vectors will be loaded and the width and depth */ /* values supplied. */ if (source) { rewind(source); err = cm_read_source(source, loc); } else { err=1; } if (err) { /* problem occurred in load...send error msg. */ cm_message_send(loading_error); switch (err) { case 2: cm_message_send(" d_source word length and number of columns in file differ.\n" ); break; case 3: cm_message_send(" Time values in first column have to increase monotonically.\n"); break; case 4: cm_message_send(" Unknown bit value.\n"); break; default: break; } } /* close source file */ if (source) fclose(source); } else { /*** Retrieve previous values ***/ /** Retrieve info... **/ row_index = (int *) cm_event_get_ptr(0,0); row_index_old = (int *) cm_event_get_ptr(0,1); loc = STATIC_VAR (locdata); /* Set old values to new... */ *row_index = *row_index_old; /** Retrieve bits... **/ bits = (char *) cm_event_get_ptr(1,0); bits_old = (char *) cm_event_get_ptr(1,1); for (i=0; iall_timepoints[*row_index]; if ( 0.0 == test_double && loc->depth > 0 ) { /* Set DC value */ /* reset current breakpoint */ test_double = loc->all_timepoints[*row_index]; cm_event_queue( test_double ); /* Output new values... */ for (i=0; iwidth; i++) { /* retrieve output value */ cm_get_source_value(*row_index, i, loc->all_data, &out); OUTPUT_STATE(out[i]) = out.state; OUTPUT_STRENGTH(out[i]) = out.strength; } /* increment breakpoint */ (*row_index)++; /* set next breakpoint as long as depth has not been exceeded */ if ( *row_index < loc->depth ) { test_double = loc->all_timepoints[*row_index] - 1.0e-10; cm_event_queue( test_double ); } } else { /* Set breakpoint for first time index */ /* set next breakpoint as long as depth has not been exceeded */ if ( *row_index < loc->depth ) { test_double = loc->all_timepoints[*row_index] - 1.0e-10; cm_event_queue( test_double ); } for(i=0; iwidth; i++) { OUTPUT_STATE(out[i]) = UNKNOWN; OUTPUT_STRENGTH(out[i]) = UNDETERMINED; } } } else { /*** Retrieve last index value and branch to appropriate *** *** routine based on the last breakpoint's relationship *** *** to the current time value. ***/ test_double = loc->all_timepoints[*row_index] - 1.0e-10; if ( TIME < test_double ) { /* Breakpoint has not occurred */ /** Output hasn't changed...do nothing this time. **/ for (i=0; iwidth; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } if ( *row_index < loc->depth ) { test_double = loc->all_timepoints[*row_index] - 1.0e-10; cm_event_queue( test_double ); } } else /* Breakpoint has been reached or exceeded */ if ( TIME == test_double ) { /* Breakpoint reached */ /* reset current breakpoint */ test_double = loc->all_timepoints[*row_index] - 1.0e-10; cm_event_queue( test_double ); /* Output new values... */ for (i=0; iwidth; i++) { /* retrieve output value */ cm_get_source_value(*row_index, i , loc->all_data, &out); OUTPUT_STATE(out[i]) = out.state; OUTPUT_DELAY(out[i]) = 1.0e-10; OUTPUT_STRENGTH(out[i]) = out.strength; } /* increment breakpoint */ (*row_index)++; /* set next breakpoint as long as depth has not been exceeded */ if ( *row_index < loc->depth ) { test_double = loc->all_timepoints[*row_index] - 1.0e-10; cm_event_queue( test_double ); } } else { /* Last source file breakpoint has been exceeded... do not change the value of the output */ for (i=0; iwidth; i++) { OUTPUT_CHANGED(out[i]) = FALSE; } } } } ngspice-26/src/xspice/icm/digital/d_source/ifspec.ifs0000644000265600020320000000337212264261473022264 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray 19 Aug 2012 H. Vogt SUMMARY This file contains the interface specification file for the digital d_source code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_source Spice_Model_Name: d_source Description: "digital signal source" PORT_TABLE: Port_Name: out Description: "output" Direction: out Default_Type: d Allowed_Types: [d] Vector: yes Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: input_file Description: "digital input vector filename" Data_Type: string Default_Value: "source.txt" Limits: - Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: input_load Description: "input loading capacitance (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: no STATIC_VAR_TABLE: Static_Var_Name: locdata Description: "local static data" Data_Type: pointer ngspice-26/src/xspice/icm/digital/d_pulldown/0000755000265600020320000000000012264261473020647 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_pulldown/cfunc.mod0000644000265600020320000000471312264261473022453 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_pulldown/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 19 Nov 1991 Jeffrey P. Murray MODIFICATIONS 19 Nov 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_pulldown code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_pulldown() AUTHORS 19 Nov 1991 Jeffrey P. Murray MODIFICATIONS 19 Nov 1991 Jeffrey P. Murray SUMMARY This function implements the d_pulldown code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_PULLDOWN ROUTINE ===*/ /************************************************ * The following is the model for the * * digital pulldown resistor for the * * ATESSE Version 2.0 system. * * * * Created 11/19/91 J.P,Murray * ************************************************/ void cm_d_pulldown(ARGS) { LOAD(out) = PARAM(load); OUTPUT_STATE(out) = ZERO; OUTPUT_STRENGTH(out) = RESISTIVE; } ngspice-26/src/xspice/icm/digital/d_pulldown/ifspec.ifs0000644000265600020320000000240712264261473022626 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 19 Nov 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_pulldown code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: d_pulldown C_Function_Name: cm_d_pulldown Description: "digital pulldown resistor" PORT_TABLE: Port_Name: out Description: "output" Direction: out Default_Type: d Allowed_Types: [d] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: load Description: "load value (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/digital/d_osc/0000755000265600020320000000000012264261473017567 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_osc/cfunc.mod0000644000265600020320000003273012264261473021373 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_osc/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 24 Jul 1991 Jeffrey P. Murray MODIFICATIONS 23 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the d_osc code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() CMevt.c void cm_event_queue() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include "d_osc.h" /* ...contains macros & type defns. for this model. 7/24/91 - JPM */ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_osc() AUTHORS 24 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_osc code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() CMevt.c void cm_event_queue() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_OSC ROUTINE ===*/ /************************************************************* * The following is the model for the controlled digital * * oscillator for the ATESSE Version 2.0 system. * * * * Created 7/24/91 J.P.Murray * *************************************************************/ /************************************************************* * * * * * <-----duty_cycle-----> * * I * * I t2 t3 * * I \______________/_____ * * I | | * * I | | | | * * I | | * * I | | | | * * I | | * * I | | | | * * I-----------------*-----* - - - - - - - - - -*--------- * * t1 t4 * * * * * * t2 = t1 + rise_delay * * t4 = t3 + fall_delay * * * * Note that for the digital model, unlike for the * * analog "square" model, t1 and t3 are stored and * * adjusted values, but t2 & t4 are implied by the * * rise and fall delays of the model, but are otherwise * * not stored values. JPM * * * *************************************************************/ #include void cm_d_osc(ARGS) { double *x, /* analog input value control array */ *y, /* frequency array */ cntl_input, /* control input value */ *phase, /* instantaneous phase of the model */ *phase_old, /* previous phase of the model */ *t1, /* pointer to t1 value */ *t3, /* pointer to t3 value */ /*time1,*/ /* variable for calculating new time1 value */ /*time3,*/ /* variable for calculating new time3 value */ freq = 0.0, /* instantaneous frequency value */ dphase, /* fractional part into cycle */ duty_cycle, /* duty_cycle value */ test_double, /* testing variable */ slope; /* slope value...used to extrapolate freq values past endpoints. */ int i, /* generic loop counter index */ cntl_size, /* control array size */ freq_size, /* frequency array size */ int_cycle; /* integer number of cycles */ /**** Retrieve frequently used parameters... ****/ cntl_size = PARAM_SIZE(cntl_array); freq_size = PARAM_SIZE(freq_array); duty_cycle = PARAM(duty_cycle); /* check and make sure that the control array is the same size as the frequency array */ if(cntl_size != freq_size){ cm_message_send(d_osc_array_error); return; } if (INIT) { /*** Test for INIT == TRUE. If so, allocate storage, etc. ***/ /* Allocate storage for internal variables */ cm_analog_alloc(0, sizeof(double)); cm_analog_alloc(1, sizeof(double)); cm_analog_alloc(2, sizeof(double)); /* assign internal variables */ phase = phase_old = (double *) cm_analog_get_ptr(0,0); t1 = (double *) cm_analog_get_ptr(1,0); t3 = (double *) cm_analog_get_ptr(2,0); } else { /*** This is not an initialization pass...retrieve storage addresses and calculate new outputs, if required. ***/ /** Retrieve previous values... **/ /* assign internal variables */ phase = (double *) cm_analog_get_ptr(0,0); phase_old = (double *) cm_analog_get_ptr(0,1); t1 = (double *) cm_analog_get_ptr(1,0); t3 = (double *) cm_analog_get_ptr(2,0); } switch (CALL_TYPE) { case ANALOG: /** analog call **/ test_double = TIME; if ( AC == ANALYSIS ) { /* this model does not function in AC analysis mode. */ return; } else { if ( 0.0 == TIME ) { /* DC analysis */ /* retrieve & normalize phase value */ *phase = PARAM(init_phase); if ( 0 > *phase ) { *phase = *phase + 360.0; } *phase = *phase / 360.0; /* set phase value to init_phase */ *phase_old = *phase; /* preset time values to harmless values... */ *t1 = -1; *t3 = -1; } /* Allocate storage for breakpoint domain & freq. range values */ x = (double *) calloc((size_t) cntl_size, sizeof(double)); if (!x) { cm_message_send(d_osc_allocation_error); return; } y = (double *) calloc((size_t) freq_size, sizeof(double)); if (!y) { cm_message_send(d_osc_allocation_error); return; } /* Retrieve x and y values. */ for (i=0; i= x[cntl_size-1]) { slope = (y[cntl_size-1] - y[cntl_size-2]) / (x[cntl_size-1] - x[cntl_size-2]); freq = y[cntl_size-1] + (cntl_input - x[cntl_size-1]) * slope; } else { /*** cntl_input within bounds of end midpoints... must determine position progressively & then calculate required output. ***/ for (i=0; i= x[i]) ) { /* Interpolate to the correct frequency value */ freq = ( (cntl_input - x[i]) / (x[i+1] - x[i]) ) * ( y[i+1]-y[i] ) + y[i]; } } } /*** If freq < 0.0, clamp to 1e-16 & issue a warning ***/ if ( 0.0 > freq ) { freq = 1.0e-16; cm_message_send(d_osc_negative_freq_error); } /* calculate the instantaneous phase */ *phase = *phase_old + freq * (TIME - T(1)); /* convert the phase to an integer */ int_cycle = *phase_old; /* dphase is the percent into the cycle for the period */ dphase = *phase_old - int_cycle; /* Calculate the time variables and the output value for this iteration */ if((*t1 <= TIME) && (TIME <= *t3)) { /* output high */ *t3 = T(1) + (1 - dphase)/freq; if(TIME < *t3) { cm_event_queue(*t3); } } else if((*t3 <= TIME) && (TIME <= *t1)) { /* output low */ if(dphase > (1.0 - duty_cycle) ) { dphase = dphase - 1.0; } *t1 = T(1) + ( (1.0 - duty_cycle) - dphase)/freq; if(TIME < *t1) { cm_event_queue(*t1); } } else { if(dphase > (1.0 - duty_cycle) ) { dphase = dphase - 1.0; } *t1 = T(1) + ( (1.0 - duty_cycle) - dphase )/freq; if((TIME < *t1) || (T(1) == 0)) { cm_event_queue(*t1); } *t3 = T(1) + (1 - dphase)/freq; } if(x) free(x); if(y) free(y); } break; case EVENT: /** discrete call...lots to do **/ test_double = TIME; if ( 0.0 == TIME ) { /* DC analysis...preset values, as appropriate.... */ /* retrieve & normalize phase value */ *phase = PARAM(init_phase); if ( 0 > *phase ) { *phase = *phase + 360.0; } *phase = *phase / 360.0; /* set phase value to init_phase */ *phase_old = *phase; /* preset time values to harmless values... */ *t1 = -1; *t3 = -1; } /* Calculate the time variables and the output value for this iteration */ /* Output is always set to STRONG */ OUTPUT_STRENGTH(out) = STRONG; if( *t1 == TIME ) { /* rising edge */ OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(rise_delay); } else { if ( *t3 == TIME ) { /* falling edge */ OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(fall_delay); } else { /* no change in output */ if ( TIME != 0.0 ) { OUTPUT_CHANGED(out) = FALSE; } if ( (*t1 < TIME) && (TIME < *t3) ) { OUTPUT_STATE(out) = ONE; } else { OUTPUT_STATE(out) = ZERO; } } } break; } } ngspice-26/src/xspice/icm/digital/d_osc/ifspec.ifs0000644000265600020320000000444612264261473021553 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the hybrid d_osc code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: d_osc C_Function_Name: cm_d_osc Description: "controlled digital oscillator" PORT_TABLE: Port_Name: cntl_in out Description: "control input" "output" Direction: in out Default_Type: v d Allowed_Types: [v,vd,i,id] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: cntl_array freq_array Description: "control array" "frequency array" Data_Type: real real Default_Value: 0.0 1.0e6 Limits: - [0 -] Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: duty_cycle init_phase Description: "output duty cycle" "initial phase of output" Data_Type: real real Default_Value: 0.5 0 Limits: [1e-6 0.999999] [-180.0 +360.0] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1e-9 1e-9 Limits: [0 -] [0 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_osc/d_osc.h0000644000265600020320000000422212264261473021027 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_osc/d_osc.h Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 25 Jul 1991 Jeffrey P. Murray MODIFICATIONS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the header information for the d_osc code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES N/A NON-STANDARD FEATURES NONE ===============================================================================*/ /* Structures, etc. for d_osc oscillator model. 7/25/90 Last Modified 7/25/91 J.P.Murray */ /*=======================================================================*/ /*=== INCLUDE FILES =====================================================*/ #include #include #include #include /*=== CONSTANTS =========================================================*/ /**** Error Messages ****/ char *d_osc_allocation_error = "\n**** Error ****\nD_OSC: Error allocating VCO block storage \n"; char *d_osc_array_error = "\n**** Error ****\nD_OSC: Size of control array different than frequency array \n"; char *d_osc_negative_freq_error = "\n**** Error ****\nD_OSC: The extrapolated value for frequency\nhas been found to be negative... \n Lower frequency level has been clamped to 0.0 Hz \n"; /*=== MACROS ============================================================*/ /*=== LOCAL VARIABLES & TYPEDEFS ========================================*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ====================================*/ /*=======================================================================*/ ngspice-26/src/xspice/icm/digital/d_or/0000755000265600020320000000000012264261473017423 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_or/cfunc.mod0000644000265600020320000001324412264261473021226 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_or/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 18 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the d_or code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_or() AUTHORS 18 Jun 1991 Jeffrey P. Murray MODIFICATIONS 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_or code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_OR ROUTINE ===*/ /************************************************ * The following is the model for the * * digital OR gate for the * * ATESSE Version 2.0 system. * * * * Created 6/18/91 J.P.Murray * ************************************************/ void cm_d_or(ARGS) { int i, /* generic loop counter index */ size; /* number of input & output ports */ Digital_State_t *out, /* temporary output for buffers */ *out_old, /* previous output for buffers */ input; /* temp storage for input bits */ /** Retrieve size value... **/ size = PORT_SIZE(in); /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); for (i=0; i #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_d_fdiv() AUTHORS 10 Jul 1991 Jeffrey P. Murray MODIFICATIONS 22 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the d_fdiv code model. INTERFACES FILE ROUTINE CALLED CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_FDIV ROUTINE ===*/ /************************************************ * The following is the model for the * * digital frequency divider for the * * ATESSE Version 2.0 system. * * * * Created 7/10/91 J.P.Murray * ************************************************/ void cm_d_fdiv(ARGS) { int div_factor; /* division factor */ Digital_State_t *freq_in, /* freq_in clock value */ *freq_in_old, /* previous freq_in value */ *freq_out, /* current output for fdiv */ *freq_out_old; /* previous output for fdiv */ int *count, /* counter value */ *count_old; /* previous counter value */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(int)); /* declare load values */ LOAD(freq_in) = PARAM(freq_in_load); /* retrieve storage for the outputs */ freq_in = freq_in_old = (Digital_State_t *) cm_event_get_ptr(0,0); freq_out = freq_out_old = (Digital_State_t *) cm_event_get_ptr(1,0); count = count_old = (int *) cm_event_get_ptr(2,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ freq_in = (Digital_State_t *) cm_event_get_ptr(0,0); freq_in_old = (Digital_State_t *) cm_event_get_ptr(0,1); freq_out = (Digital_State_t *) cm_event_get_ptr(1,0); freq_out_old = (Digital_State_t *) cm_event_get_ptr(1,1); count = (int *) cm_event_get_ptr(2,0); count_old = (int *) cm_event_get_ptr(2,1); } /*** Output the strength of freq_out (always strong)... ***/ OUTPUT_STRENGTH(freq_out) = STRONG; /** Retrieve parameters */ div_factor = PARAM(div_factor); /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ /* read initial count value, normalize, and if it is out of bounds, set to "zero" equivalent */ *count = PARAM(i_count); if ( (div_factor <= *count) || (0 > *count) ) { *count = 0; OUTPUT_STATE(freq_out) = *freq_out = *freq_out_old = ZERO; } if ( (0 < *count) && (*count <= PARAM(high_cycles)) ) { OUTPUT_STATE(freq_out) = *freq_out = *freq_out_old = ONE; } } else { /****** Transient Analysis ******/ /*** load current input value... ***/ *freq_in = INPUT_STATE(freq_in); /**** Test to see if the input has provided an edge... ****/ if ( (*freq_in != *freq_in_old)&&(*freq_in == 1) ) { /** An edge has been provided...revise count value **/ *count = *count_old + 1; /* If new count value is equal to the div_factor+1 value, need to normalize count to "1", and raise output */ if ( ((div_factor+1) == *count)||(1 == *count) ) { *count = 1; OUTPUT_STATE(freq_out) = *freq_out = ONE; OUTPUT_DELAY(freq_out) = PARAM(rise_delay); } else { /* If new count value is equal to the high_cycles+1 value, drop the output to ZERO */ if ( ( PARAM(high_cycles)+1) == *count ) { OUTPUT_STATE(freq_out) = *freq_out = ZERO; OUTPUT_DELAY(freq_out) = PARAM(fall_delay); } else { OUTPUT_CHANGED(freq_out) = FALSE; } } } else { /** Output does not change!! **/ OUTPUT_CHANGED(freq_out) = FALSE; } } } ngspice-26/src/xspice/icm/digital/d_fdiv/ifspec.ifs0000644000265600020320000000466312264261473021720 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_fdiv (frequency divider) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_fdiv Spice_Model_Name: d_fdiv Description: "digital frequency divider" PORT_TABLE: Port_Name: freq_in freq_out Description: "frequency input" "frequency output" Direction: in out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: div_factor high_cycles Description: "divide factor" "number of high clock cycles" Data_Type: int int Default_Value: 2 1 Limits: [1 -] [1 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: i_count Description: "output initial count value" Data_Type: int Default_Value: 0 Limits: [0 -] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: freq_in_load Description: "freq_in load value (F)" Data_Type: real Default_Value: 1.0e-12 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/digital/d_srlatch/0000755000265600020320000000000012264261473020443 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_srlatch/cfunc.mod0000644000265600020320000006624012264261473022252 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE /cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 25 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_eval_sr_result AUTHORS 30 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Evaluates the S and R input states, plus the last state of the latch, and returns the expected output value. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); RETURNED VALUE A Digital_State_t. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_EVAL_SR_RESULT ROUTINE ===*/ static Digital_State_t cm_eval_sr_result(Digital_State_t s_input, Digital_State_t r_input, Digital_State_t old_output) { Digital_State_t output = ZERO; switch (s_input) { case ZERO: switch (r_input) { case ZERO: output = old_output; break; case ONE: output = ZERO; break; case UNKNOWN: output = UNKNOWN; break; } break; case ONE: switch (r_input) { case ZERO: output = ONE; break; case ONE: output = UNKNOWN; break; case UNKNOWN: output = UNKNOWN; break; } break; case UNKNOWN: output = UNKNOWN; break; } return output; } /*============================================================================== FUNCTION cm_d_srlatch() AUTHORS 25 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Aug 1991 Jeffrey P. Murray 30 Sep 1991 Jeffrey P. Murray 29 Jan 1992 Jeffrey P. Murray SUMMARY This function implements the d_srlatch code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_D_SRLATCH ROUTINE ===*/ /************************************************ * The following is the model for the * * digital sr-type latch for the * * ATESSE Version 2.0 system. * * * * Created 6/25/91 J.P.Murray * ************************************************/ void cm_d_srlatch(ARGS) { /*int i;*/ /* generic loop counter index */ Digital_State_t *s, /* current s-input value */ *s_old, /* previous s-input value */ *r, /* current r-input value */ *r_old, /* previous r-input value */ *enable, /* current enable value */ *enable_old, /* previous enable value */ *set, /* current set value for srlatch */ *set_old, /* previous set value for srlatch */ *reset, /* current reset value for srlatch */ *reset_old, /* previous reset value for srlatch */ *out, /* current output for srlatch */ *out_old, /* previous output for srlatch */ temp; /* temp storage for state values */ /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage */ cm_event_alloc(0,sizeof(Digital_State_t)); cm_event_alloc(1,sizeof(Digital_State_t)); cm_event_alloc(2,sizeof(Digital_State_t)); cm_event_alloc(3,sizeof(Digital_State_t)); cm_event_alloc(4,sizeof(Digital_State_t)); cm_event_alloc(5,sizeof(Digital_State_t)); /* declare load values */ LOAD(s) = PARAM(sr_load); LOAD(r) = PARAM(sr_load); LOAD(enable) = PARAM(enable_load); if ( !PORT_NULL(set) ) { LOAD(set) = PARAM(set_load); } if ( !PORT_NULL(reset) ) { LOAD(reset) = PARAM(reset_load); } /* retrieve storage for the outputs */ s = s_old = (Digital_State_t *) cm_event_get_ptr(0,0); r = r_old = (Digital_State_t *) cm_event_get_ptr(1,0); enable = enable_old = (Digital_State_t *) cm_event_get_ptr(2,0); set = set_old = (Digital_State_t *) cm_event_get_ptr(3,0); reset = reset_old = (Digital_State_t *) cm_event_get_ptr(4,0); out = out_old = (Digital_State_t *) cm_event_get_ptr(5,0); } else { /* Retrieve previous values */ /* retrieve storage for the outputs */ s = (Digital_State_t *) cm_event_get_ptr(0,0); s_old = (Digital_State_t *) cm_event_get_ptr(0,1); r = (Digital_State_t *) cm_event_get_ptr(1,0); r_old = (Digital_State_t *) cm_event_get_ptr(1,1); enable = (Digital_State_t *) cm_event_get_ptr(2,0); enable_old = (Digital_State_t *) cm_event_get_ptr(2,1); set = (Digital_State_t *) cm_event_get_ptr(3,0); set_old = (Digital_State_t *) cm_event_get_ptr(3,1); reset = (Digital_State_t *) cm_event_get_ptr(4,0); reset_old = (Digital_State_t *) cm_event_get_ptr(4,1); out = (Digital_State_t *) cm_event_get_ptr(5,0); out_old = (Digital_State_t *) cm_event_get_ptr(5,1); } /******* load current input values if set or reset are not connected, set to zero... *******/ *s = INPUT_STATE(s); *r = INPUT_STATE(r); *enable = INPUT_STATE(enable); if ( PORT_NULL(set) ) { *set = *set_old = ZERO; } else { *set = INPUT_STATE(set); } if ( PORT_NULL(reset) ) { *reset = *reset_old = ZERO; } else { *reset = INPUT_STATE(reset); } /******* Determine analysis type and output appropriate values *******/ if (0.0 == TIME) { /****** DC analysis...output w/o delays ******/ temp = (Digital_State_t) PARAM(ic); /** Modify output if set or reset lines are active **/ if ( (*enable==ONE) && (*s==ONE) && (*r==ZERO) ) temp = ONE; if ( (*enable==ONE) && (*s==ZERO) && (*r==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ZERO) ) temp = ONE; if ( (*set==ZERO) && (*reset==ONE) ) temp = ZERO; if ( (*set==ONE) && (*reset==ONE) ) temp = UNKNOWN; *out = *out_old = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; } } else { /****** Transient Analysis ******/ /***** Find input that has changed... *****/ /**** Test set value for change ****/ if ( *set != *set_old ) { /* either set or set release */ switch ( *set ) { case ONE: if ( ONE != *reset) { if (*out_old != ONE) { /* set will change output */ *out = ONE; /* output goes to ONE */ if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already set */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* set will change output */ *out = UNKNOWN; /* output goes to UNKNOWN */ if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: case UNKNOWN: if ( ONE != *reset) { if ( ONE == *enable ) { /* active level...save & output current value */ temp = cm_eval_sr_result(*s,*r,*out_old); if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != ZERO) { /* set will change output */ /* output returns to reset condition */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(set_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(set_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; } } else { /**** Test reset value for change ****/ if ( *reset != *reset_old ) { /* either reset or reset release */ switch ( *reset ) { case ONE: if ( ONE != *set) { if (*out_old != ZERO) { /* reset will change output */ /* output goes to ZERO */ *out = ZERO; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ZERO; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ONE; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != UNKNOWN) { /* reset will change output */ /* output goes to UNKNOWN */ *out = UNKNOWN; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = UNKNOWN; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = UNKNOWN; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already unknown */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; case ZERO: case UNKNOWN: if ( ONE != *set) { if ( ONE == *enable ) { /* active level...save & output current value */ temp = cm_eval_sr_result(*s,*r,*out_old); if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { /* output remains at current value */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } else { if (*out_old != ONE) { /* reset will change output */ /* output returns to set condition */ *out = ONE; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = ONE; OUTPUT_DELAY(out) = PARAM(reset_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_STATE(Nout) = ZERO; OUTPUT_DELAY(Nout) = PARAM(reset_delay); } } else { *out = *out_old; /* output already reset */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } break; } } else { /**** Test for enable change... ****/ if ( (*enable != *enable_old) && (*reset != ONE) && (*set != ONE) ) { /* enable or enable release */ switch ( *enable ) { case ONE: /* active edge...save & output current data value */ temp = cm_eval_sr_result(*s,*r,*out_old); if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(enable_delay); } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(enable_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive edge...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* test data value for change... */ if ( ((*s != *s_old) || (*r != *r_old)) && (*reset != ONE) && (*set != ONE) ) { /* input values have changed... test enable, and if active, update the output...else return w/o change. */ switch ( *enable ) { case ONE: /* active level...save & output current data value */ temp = cm_eval_sr_result(*s,*r,*out_old); if (*out_old != temp) { /* enable will change output */ *out = temp; if ( !PORT_NULL(out) ) { OUTPUT_STATE(out) = temp; OUTPUT_DELAY(out) = PARAM(sr_delay); } if ( !PORT_NULL(Nout) ) { cm_toggle_bit(&temp); OUTPUT_STATE(Nout) = temp; OUTPUT_DELAY(Nout) = PARAM(sr_delay); } } else { *out = *out_old; /* output same as before */ if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } break; case ZERO: case UNKNOWN: /* inactive level...return previous values */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } break; } } else { /* nothing has changed!!! This shouldn't happen! */ *out = *out_old; if ( !PORT_NULL(out) ) { OUTPUT_CHANGED(out) = FALSE; } if ( !PORT_NULL(Nout) ) { OUTPUT_CHANGED(Nout) = FALSE; } } } } } /***** Add additional rise or fall delays, if appropriate *****/ if ( *out != *out_old ) { /*** output value is changing ***/ switch ( *out ) { /** fall to zero value **/ case 0: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } break; /** rise to one value **/ case 1: if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } break; /** unknown output **/ default: /* based on old value, add rise or fall delay */ if (0 == *out_old) { /* add rising delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(rise_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(fall_delay); } } else { /* add falling delay */ if ( !PORT_NULL(out) ) { OUTPUT_DELAY(out) += PARAM(fall_delay); } if ( !PORT_NULL(Nout) ) { OUTPUT_DELAY(Nout) += PARAM(rise_delay); } } break; } } } /*** output strength values ***/ if ( !PORT_NULL(out) ) { OUTPUT_STRENGTH(out) = STRONG; } if ( !PORT_NULL(Nout) ) { OUTPUT_STRENGTH(Nout) = STRONG; } } ngspice-26/src/xspice/icm/digital/d_srlatch/ifspec.ifs0000644000265600020320000001103112264261473022413 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the digital d_srlatch code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_srlatch Spice_Model_Name: d_srlatch Description: "digital sr-type latch" PORT_TABLE: Port_Name: s r Description: "s input" "r input" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: enable Description: "enable" Direction: in Default_Type: d Allowed_Types: [d] Vector: no Vector_Bounds: - Null_Allowed: no PORT_TABLE: Port_Name: set reset Description: "asynch. set" "asynch. reset" Direction: in in Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PORT_TABLE: Port_Name: out Nout Description: "data output" "inverted data output" Direction: out out Default_Type: d d Allowed_Types: [d] [d] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: sr_delay Description: "delay from s or r input change" Data_Type: real Default_Value: 1.0e-9 Limits: [1e-12 -] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: enable_delay set_delay Description: "delay from clk" "delay from set" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: reset_delay ic Description: "delay from reset" "output initial state" Data_Type: real int Default_Value: 1.0e-9 0 Limits: [1e-12 -] [0 2] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "rise delay" "fall delay" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: sr_load enable_load Description: "s & r load values (F)" "clk load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: set_load reset_load Description: "set load value (F)" "reset load value (F)" Data_Type: real real Default_Value: 1.0e-12 1.0e-12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/digital/d_xor/0000755000265600020320000000000012264261473017613 5ustar andreasadminngspice-26/src/xspice/icm/digital/d_xor/cfunc.mod0000644000265600020320000001543612264261473021423 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE d_xor/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 18 Jun 1991 Jeffrey P. Murray MODIFICATIONS 7 Aug 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the d_xor code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ================================================================================ FUNCTION cm_toggle_bit() AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Alters the state of a passed digital variable to its complement. Thus, a ONE changes to a ZERO. A ZERO changes to a ONE, and an UNKNOWN remains unchanged. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE No returned value. Passed pointer to variable is used to redefine the variable value. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_TOGGLE_BIT ROUTINE ===*/ static void cm_toggle_bit(Digital_State_t *bit) { /* Toggle bit from ONE to ZERO or vice versa, unless the bit value is UNKNOWN. In the latter case, return without changing the bit value. */ if ( UNKNOWN != *bit ) { if ( ONE == *bit ) { *bit = ZERO; } else { *bit = ONE; } } } /*============================================================================== FUNCTION cm_d_xor() AUTHORS 18 Jun 1991 Jeffrey P. Murray MODIFICATIONS 7 Aug 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the d_xor code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_toggle_bit(); CMevt.c void *cm_event_alloc() void *cm_event_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== CM_D_XOR ROUTINE ===*/ /************************************************ * The following is the model for the * * digital XOR gate for the * * ATESSE Version 2.0 system. * * * * Created 6/18/91 J.P.Murray * ************************************************/ void cm_d_xor(ARGS) { int i, /* generic loop counter index */ size; /* number of input & output ports */ Digital_State_t *out, /* temporary output for buffers */ *out_old, /* previous output for buffers */ input; /* temp storage for input bits */ /** Retrieve size value... **/ size = PORT_SIZE(in); /*** Setup required state variables ***/ if(INIT) { /* initial pass */ /* allocate storage for the outputs */ cm_event_alloc(0,sizeof(Digital_State_t)); for (i=0; i= 4 #define CM_EXPORT __attribute__ ((visibility ("default"))) #define CM_EXPORT_LOCAL __attribute__ ((visibility ("hidden"))) #else #define CM_EXPORT #define CM_EXPORT_LOCAL #endif #endif extern CM_EXPORT void *CMdevs(void); extern CM_EXPORT void *CMdevNum(void); extern CM_EXPORT void *CMudns(void); extern CM_EXPORT void *CMudnNum(void); extern CM_EXPORT void *CMgetCoreItfPtr(void); extern void *tmalloc(size_t num); extern void *trealloc(void *str, size_t num); extern void txfree(void *ptr); // This one returns the device table CM_EXPORT void *CMdevs(void) { return (void *)cmDEVices; } // This one returns the device count CM_EXPORT void *CMdevNum(void) { return (void *)&cmDEVicesCNT; } // This one returns the UDN table CM_EXPORT void *CMudns(void) { return (void *)cmEVTudns; } // This one returns the UDN count CM_EXPORT void *CMudnNum(void) { return (void *)&cmEVTudnCNT; } // This one returns the pointer to the pointer to the core interface structure CM_EXPORT void *CMgetCoreItfPtr(void) { return (void *)(&coreitf); } ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// // These functions call the real core functions of SPICE OPUS using the // pointers in coreitf structure. ////////////////////////////////////////////////////////////////////////////// void MIF_INP2A( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current /* the card we are to parse */ ) { (coreitf->dllitf_MIF_INP2A)(ckt,tab,current); } char * MIFgetMod( CKTcircuit *ckt, char *name, INPmodel **model, INPtables *tab ) { return (coreitf->dllitf_MIFgetMod)(ckt,name,model,tab); } IFvalue * MIFgetValue( CKTcircuit *ckt, char **line, int type, INPtables *tab, char **err ) { return (coreitf->dllitf_MIFgetValue)(ckt,line,type,tab,err); } int MIFsetup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state ) { return (coreitf->dllitf_MIFsetup)(matrix,inModel,ckt,state); } int MIFunsetup( GENmodel *inModel, CKTcircuit *ckt ) { return (coreitf->dllitf_MIFunsetup)(inModel,ckt); } int MIFload( GENmodel *inModel, CKTcircuit *ckt ) { return (coreitf->dllitf_MIFload)(inModel,ckt); } int MIFmParam( int param_index, IFvalue *value, GENmodel *inModel ) { return (coreitf->dllitf_MIFmParam)(param_index,value,inModel); } int MIFask( CKTcircuit *ckt, GENinstance *inst, int param_index, IFvalue *value, IFvalue *select ) { return (coreitf->dllitf_MIFask)(ckt,inst,param_index,value,select); } int MIFmAsk( CKTcircuit *ckt, GENmodel *inModel, int param_index, IFvalue *value ) { return (coreitf->dllitf_MIFmAsk)(ckt,inModel,param_index,value); } int MIFtrunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep ) { return (coreitf->dllitf_MIFtrunc)(inModel,ckt,timeStep); } int MIFconvTest( GENmodel *inModel, CKTcircuit *ckt ) { return (coreitf->dllitf_MIFconvTest)(inModel,ckt); } int MIFdelete( GENmodel *inModel, IFuid name, GENinstance **inst ) { return (coreitf->dllitf_MIFdelete)(inModel,name,inst); } int MIFmDelete( GENmodel **inModel, IFuid modname, GENmodel *model ) { return (coreitf->dllitf_MIFmDelete)(inModel,modname,model); } void MIFdestroy( GENmodel **inModel ) { (coreitf->dllitf_MIFdestroy)(inModel); } char *MIFgettok( char **s ) { return (coreitf->dllitf_MIFgettok)(s); } char *MIFget_token( char **s, Mif_Token_Type_t *type ) { return (coreitf->dllitf_MIFget_token)(s,type); } Mif_Cntl_Src_Type_t MIFget_cntl_src_type( Mif_Port_Type_t in_port_type, Mif_Port_Type_t out_port_type ) { return (coreitf->dllitf_MIFget_cntl_src_type)(in_port_type,out_port_type); } char *MIFcopy(char *c) { return (coreitf->dllitf_MIFcopy)(c); } void cm_climit_fcn(double in, double in_offset, double cntl_upper, double cntl_lower, double lower_delta, double upper_delta, double limit_range, double gain, int percent, double *out_final, double *pout_pin_final, double *pout_pcntl_lower_final, double *pout_pcntl_upper_final) { (coreitf->dllitf_cm_climit_fcn)(in,in_offset,cntl_upper,cntl_lower,lower_delta, upper_delta,limit_range,gain,percent,out_final, pout_pin_final,pout_pcntl_lower_final, pout_pcntl_upper_final); } void cm_smooth_corner(double x_input, double x_center, double y_center, double domain, double lower_slope, double upper_slope, double *y_output, double *dy_dx) { (coreitf->dllitf_cm_smooth_corner)(x_input,x_center,y_center,domain,lower_slope, upper_slope,y_output,dy_dx); } void cm_smooth_discontinuity(double x_input, double x_lower, double y_lower, double x_upper, double y_upper, double *y_output, double *dy_dx) { (coreitf->dllitf_cm_smooth_discontinuity)(x_input,x_lower,y_lower,x_upper,y_upper, y_output,dy_dx); } double cm_smooth_pwl(double x_input, double *x, double *y, int size, double input_domain, double *dout_din) { return (coreitf->dllitf_cm_smooth_pwl)(x_input,x,y,size,input_domain,dout_din); } double cm_analog_ramp_factor(void) { return (coreitf->dllitf_cm_analog_ramp_factor)(); } void cm_analog_alloc(int tag, int bytes) { (coreitf->dllitf_cm_analog_alloc)(tag,bytes); } void *cm_analog_get_ptr(int tag, int timepoint) { return (coreitf->dllitf_cm_analog_get_ptr)(tag,timepoint); } int cm_analog_integrate(double integrand, double *integral, double *partial) { return (coreitf->dllitf_cm_analog_integrate)(integrand,integral,partial); } int cm_analog_converge(double *state) { return (coreitf->dllitf_cm_analog_converge)(state); } int cm_analog_set_temp_bkpt(double time) { return (coreitf->dllitf_cm_analog_set_temp_bkpt)(time); } int cm_analog_set_perm_bkpt(double time) { return (coreitf->dllitf_cm_analog_set_perm_bkpt)(time); } void cm_analog_not_converged(void) { (coreitf->dllitf_cm_analog_not_converged)(); } void cm_analog_auto_partial(void) { (coreitf->dllitf_cm_analog_auto_partial)(); } void cm_event_alloc(int tag, int bytes){ (coreitf->dllitf_cm_event_alloc)(tag,bytes); } void *cm_event_get_ptr(int tag, int timepoint) { return (coreitf->dllitf_cm_event_get_ptr)(tag,timepoint); } int cm_event_queue(double time) { return (coreitf->dllitf_cm_event_queue)(time); } char *cm_message_get_errmsg(void) { return (coreitf->dllitf_cm_message_get_errmsg)(); } int cm_message_send(char *msg) { return (coreitf->dllitf_cm_message_send)(msg); } double cm_netlist_get_c(void) { return (coreitf->dllitf_cm_netlist_get_c)(); } double cm_netlist_get_l(void) { return (coreitf->dllitf_cm_netlist_get_l)(); } Complex_t cm_complex_set(double real, double imag) { return (coreitf->dllitf_cm_complex_set)(real,imag); } Complex_t cm_complex_add(Complex_t x, Complex_t y) { return (coreitf->dllitf_cm_complex_add)(x,y); } Complex_t cm_complex_subtract(Complex_t x, Complex_t y) { return (coreitf->dllitf_cm_complex_subtract)(x,y); } Complex_t cm_complex_multiply(Complex_t x, Complex_t y) { return (coreitf->dllitf_cm_complex_multiply)(x,y); } Complex_t cm_complex_divide(Complex_t x, Complex_t y) { return (coreitf->dllitf_cm_complex_divide)(x,y); } FILE * cm_stream_out(void) { return (coreitf->dllitf_cm_stream_out)(); } FILE * cm_stream_in(void) { return (coreitf->dllitf_cm_stream_in)(); } FILE * cm_stream_err(void) { return (coreitf->dllitf_cm_stream_err)(); } void * malloc_pj(size_t s) { return (coreitf->dllitf_malloc_pj)(s); } void * calloc_pj(size_t s1, size_t s2) { return (coreitf->dllitf_calloc_pj)(s1,s2); } void * realloc_pj(void *ptr, size_t s) { return (coreitf->dllitf_realloc_pj)(ptr,s); } void free_pj(void *ptr) { (coreitf->dllitf_free_pj)(ptr); } void * tmalloc(size_t s) { return (coreitf->dllitf_tmalloc)(s); } void * trealloc(void *ptr, size_t s) { return (coreitf->dllitf_trealloc)(ptr,s); } void txfree(void *ptr) { (coreitf->dllitf_txfree)(ptr); } #include #include #define MAX_PATH_LEN 1024 FILE *fopen_with_path(const char *path, const char *mode) { char buf[MAX_PATH_LEN+1]; if(path[0] != '/') { const char *x = getenv("ngspice_vpath"); if(x) { char *a; strcpy(buf, x); a = strrchr(buf, '/'); if(a && a[1] == '\0') a[0] = '\0'; strcat(buf, "/"); strcat(buf, path); path = buf; } } return fopen(path, mode); } ngspice-26/src/xspice/icm/xtraevt/0000755000265600020320000000000012264261473016560 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/real_to_v/0000755000265600020320000000000012264261473020532 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/real_to_v/cfunc.mod0000644000265600020320000000275612264261473022343 0ustar andreasadmin #define TS 0 #define VS 1 void ucm_real_to_v (ARGS) { double *t, *v; double *in; /*double out;*/ in = (double *) INPUT(in); if(INIT) { cm_event_alloc(TS, 2 * sizeof(double)); cm_event_alloc(VS, 2 * sizeof(double)); t = (double *) cm_event_get_ptr(TS, 0); v = (double *) cm_event_get_ptr(VS, 0); t[0] = -2.0; t[1] = -1.0; v[0] = *in; v[1] = *in; } else { t = (double *) cm_event_get_ptr(TS, 0); v = (double *) cm_event_get_ptr(VS, 0); } switch(CALL_TYPE) { case ANALOG: if(TIME == 0.0) { OUTPUT(out) = *in; v[0] = *in; v[1] = *in; } else { if(TIME <= t[0]) OUTPUT(out) = v[0]; else if(TIME >= t[1]) OUTPUT(out) = v[1]; else { OUTPUT(out) = v[0] + (v[1] - v[0]) * (TIME - t[0]) / (t[1] - t[0]); } } break; case EVENT: if(TIME == 0.0) return; if(TIME >= t[1]) { v[0] = v[1]; v[1] = *in; t[0] = TIME; t[1] = TIME + PARAM(transition_time); } else { v[0] = v[0] + (v[1] - v[0]) * (TIME - t[0]) / (t[1] - t[0]); v[1] = *in; t[0] = TIME; t[1] = TIME + PARAM(transition_time); } break; } } ngspice-26/src/xspice/icm/xtraevt/real_to_v/ifspec.ifs0000644000265600020320000000165212264261473022512 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_to_v C_Function_Name: ucm_real_to_v Description: "Node bridge from real to analog voltage" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: real v Allowed_Types: [real] [v, vd, i, id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: gain transition_time Description: "gain" "output transition time" Data_Type: real real Default_Value: 1.0 1e-9 Limits: - [1e-15 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/xtraevt/.gitignore0000644000265600020320000000014712264261473020552 0ustar andreasadmin/xtraevt.cm /cmextrn.h /cminfo.h /dlmain.c /objects.inc /udnextrn.h /udninfo.h /*/*.c !/*/udnfunc.c ngspice-26/src/xspice/icm/xtraevt/modpath.lst0000644000265600020320000000005112264261473020734 0ustar andreasadmind_to_real real_delay real_gain real_to_v ngspice-26/src/xspice/icm/xtraevt/real/0000755000265600020320000000000012264261473017503 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/real/udnfunc.c0000644000265600020320000001036512264261473021316 0ustar andreasadmin/*============================================================================ FILE real/udnfunc.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of the 'real' node type used by event-driven models that simulate with real type data. These functions are called exclusively through function pointers in an Evt_Udn_Info_t data structure. INTERFACES Evt_Udn_Info_t udn_real_info REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include "ngspice/cm.h" #include "ngspice/evtudn.h" void *tmalloc(size_t); #define TMALLOC(t,n) (t*) tmalloc(sizeof(t) * (size_t)(n)) /* macro to ignore unused variables and parameters */ #define NG_IGNORE(x) (void)x /* ************************************************************************ */ static void udn_real_create(CREATE_ARGS) { /* Malloc space for a real struct */ MALLOCED_PTR = TMALLOC(double, 1); } /* ************************************************************************ */ static void udn_real_dismantle(DISMANTLE_ARGS) { NG_IGNORE(STRUCT_PTR); /* Do nothing. There are no internally malloc'ed things to dismantle */ } /* ************************************************************************ */ static void udn_real_initialize(INITIALIZE_ARGS) { double *real_struct = (double *) STRUCT_PTR; /* Initialize to zero */ *real_struct = 0.0; } /* ************************************************************************ */ static void udn_real_invert(INVERT_ARGS) { double *real_struct = (double *) STRUCT_PTR; /* Invert the state */ *real_struct = -(*real_struct); } /* ************************************************************************ */ static void udn_real_resolve(RESOLVE_ARGS) { double **array = (double**)INPUT_STRUCT_PTR_ARRAY; double *out = (double *) OUTPUT_STRUCT_PTR; int num_struct = INPUT_STRUCT_PTR_ARRAY_SIZE; double sum; int i; /* Sum the values */ for(i = 0, sum = 0.0; i < num_struct; i++) sum += *(array[i]); /* Assign the result */ *out = sum; } /* ************************************************************************ */ static void udn_real_copy(COPY_ARGS) { double *real_from_struct = (double *) INPUT_STRUCT_PTR; double *real_to_struct = (double *) OUTPUT_STRUCT_PTR; /* Copy the structure */ *real_to_struct = *real_from_struct; } /* ************************************************************************ */ static void udn_real_compare(COMPARE_ARGS) { double *real_struct1 = (double *) STRUCT_PTR_1; double *real_struct2 = (double *) STRUCT_PTR_2; /* Compare the structures */ if((*real_struct1) == (*real_struct2)) EQUAL = TRUE; else EQUAL = FALSE; } /* ************************************************************************ */ static void udn_real_plot_val(PLOT_VAL_ARGS) { double *real_struct = (double *) STRUCT_PTR; NG_IGNORE(STRUCT_MEMBER_ID); /* Output a value for the real struct */ PLOT_VAL = *real_struct; } /* ************************************************************************ */ static void udn_real_print_val(PRINT_VAL_ARGS) { double *real_struct = (double *) STRUCT_PTR; NG_IGNORE(STRUCT_MEMBER_ID); /* Allocate space for the printed value */ PRINT_VAL = TMALLOC(char, 30); /* Print the value into the string */ sprintf(PRINT_VAL, "%15.6e", *real_struct); } /* ************************************************************************ */ static void udn_real_ipc_val(IPC_VAL_ARGS) { /* Simply return the structure and its size */ IPC_VAL = STRUCT_PTR; IPC_VAL_SIZE = sizeof(double); } Evt_Udn_Info_t udn_real_info = { "real", "real valued data", udn_real_create, udn_real_dismantle, udn_real_initialize, udn_real_invert, udn_real_copy, udn_real_resolve, udn_real_compare, udn_real_plot_val, udn_real_print_val, udn_real_ipc_val }; ngspice-26/src/xspice/icm/xtraevt/real_delay/0000755000265600020320000000000012264261473020661 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/real_delay/cfunc.mod0000644000265600020320000000175612264261473022471 0ustar andreasadmin #define CLK_STATE 0 void ucm_real_delay (ARGS) { double *in; double *out; Digital_State_t *state; Digital_State_t *old_state; if(INIT) { cm_event_alloc(CLK_STATE, sizeof(Digital_State_t)); state = (Digital_State_t *) cm_event_get_ptr(CLK_STATE, 0); old_state = state; *state = INPUT_STATE(clk); } else { state = (Digital_State_t *) cm_event_get_ptr(CLK_STATE, 0); old_state = (Digital_State_t *) cm_event_get_ptr(CLK_STATE, 1); } if(ANALYSIS != TRANSIENT) OUTPUT_CHANGED(out) = FALSE; else { *state = INPUT_STATE(clk); if(*state == *old_state) OUTPUT_CHANGED(out) = FALSE; else if(*state != ONE) OUTPUT_CHANGED(out) = FALSE; else { in = (double *) INPUT(in); out = (double *) OUTPUT(out); *out = *in; OUTPUT_DELAY(out) = PARAM(delay); } } } ngspice-26/src/xspice/icm/xtraevt/real_delay/ifspec.ifs0000644000265600020320000000162112264261473022635 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_delay C_Function_Name: ucm_real_delay Description: "A Z ** -1 block working on real data" PORT_TABLE: Port_Name: in clk out Description: "input" "clock" "output" Direction: in in out Default_Type: real d real Allowed_Types: [real] [d] [real] Vector: no no no Vector_Bounds: - - - Null_Allowed: no no no PARAMETER_TABLE: Parameter_Name: delay Description: "delay from clk to out" Data_Type: real Default_Value: 1e-9 Limits: [1e-15 -] Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/xtraevt/real_gain/0000755000265600020320000000000012264261473020501 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/real_gain/cfunc.mod0000644000265600020320000000135612264261473022305 0ustar andreasadmin void ucm_real_gain (ARGS) { double *in; double *out; double in_offset; double gain; double out_offset; double delay; double ic; /* Get the input and output pointers */ in = (double *) INPUT(in); out = (double *) OUTPUT(out); /* Get the parameters */ in_offset = PARAM(in_offset); gain = PARAM(gain); out_offset = PARAM(out_offset); delay = PARAM(delay); ic = PARAM(ic); /* Assign the output and delay */ if(ANALYSIS == DC) { *out = ic; if(INIT) cm_event_queue(delay); } else { *out = gain * (*in + in_offset) + out_offset; OUTPUT_DELAY(out) = delay; } } ngspice-26/src/xspice/icm/xtraevt/real_gain/ifspec.ifs0000644000265600020320000000261512264261473022461 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: real_gain C_Function_Name: ucm_real_gain Description: "A gain block for event-driven real data" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: real real Allowed_Types: [real] [real] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain out_offset Description: "input offset" "gain" "output offset" Data_Type: real real real Default_Value: 0.0 1.0 0.0 Limits: - - - Vector: no no no Vector_Bounds: - - - Null_Allowed: yes yes yes PARAMETER_TABLE: Parameter_Name: delay ic Description: "delay" "initial condition" Data_Type: real real Default_Value: 1.0e-9 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/xtraevt/d_to_real/0000755000265600020320000000000012264261473020510 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/d_to_real/cfunc.mod0000644000265600020320000000126312264261473022311 0ustar andreasadmin void ucm_d_to_real (ARGS) { Digital_State_t in; double *out; double delay; double zero; double one; double ena; in = INPUT_STATE(in); if(PORT_NULL(enable)) ena = 1.0; else if(INPUT_STATE(enable) == ONE) ena = 1.0; else ena = 0.0; out = (double *) OUTPUT(out); zero = PARAM(zero); one = PARAM(one); delay = PARAM(delay); if(in == ZERO) *out = zero * ena; else if(in == UNKNOWN) *out = (zero + one) / 2.0 * ena; else *out = one * ena; if(TIME > 0.0) OUTPUT_DELAY(out) = delay; } ngspice-26/src/xspice/icm/xtraevt/d_to_real/ifspec.ifs0000644000265600020320000000230612264261473022465 0ustar andreasadmin NAME_TABLE: Spice_Model_Name: d_to_real C_Function_Name: ucm_d_to_real Description: "Node bridge from digital to real with enable" PORT_TABLE: Port_Name: in enable out Description: "input" "enable" "output" Direction: in in out Default_Type: d d real Allowed_Types: [d] [d] [real] Vector: no no no Vector_Bounds: - - - Null_Allowed: no yes no PARAMETER_TABLE: Parameter_Name: zero one delay Description: "value for 0" "value for 1" "delay" Data_Type: real real real Default_Value: 0.0 1.0 1e-9 Limits: - - [1e-15 -] Vector: no no no Vector_Bounds: - - - Null_Allowed: yes yes yes ngspice-26/src/xspice/icm/xtraevt/int/0000755000265600020320000000000012264261473017352 5ustar andreasadminngspice-26/src/xspice/icm/xtraevt/int/udnfunc.c0000644000265600020320000001017312264261473021162 0ustar andreasadmin/*============================================================================ FILE int/udnfunc.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of the 'int' node type used by event-driven models that simulate with integer type data. These functions are called exclusively through function pointers in an Evt_Udn_Info_t data structure. INTERFACES Evt_Udn_Info_t udn_int_info REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include "ngspice/cm.h" #include "ngspice/evtudn.h" void *tmalloc(size_t); #define TMALLOC(t,n) (t*) tmalloc(sizeof(t) * (size_t)(n)) /* macro to ignore unused variables and parameters */ #define NG_IGNORE(x) (void)x /* ************************************************************************ */ static void udn_int_create(CREATE_ARGS) { /* Malloc space for an int */ MALLOCED_PTR = TMALLOC(int, 1); } /* ************************************************************************ */ static void udn_int_dismantle(DISMANTLE_ARGS) { NG_IGNORE(STRUCT_PTR); /* Do nothing. There are no internally malloc'ed things to dismantle */ } /* ************************************************************************ */ static void udn_int_initialize(INITIALIZE_ARGS) { int *int_struct = (int *) STRUCT_PTR; /* Initialize to zero */ *int_struct = 0; } /* ************************************************************************ */ static void udn_int_invert(INVERT_ARGS) { int *int_struct = (int *) STRUCT_PTR; /* Invert the state */ *int_struct = -(*int_struct); } /* ************************************************************************ */ static void udn_int_copy(COPY_ARGS) { int *int_from_struct = (int *) INPUT_STRUCT_PTR; int *int_to_struct = (int *) OUTPUT_STRUCT_PTR; /* Copy the structure */ *int_to_struct = *int_from_struct; } /* ************************************************************************ */ static void udn_int_resolve(RESOLVE_ARGS) { int **array = (int**)INPUT_STRUCT_PTR_ARRAY; int *out = (int *) OUTPUT_STRUCT_PTR; int num_struct = INPUT_STRUCT_PTR_ARRAY_SIZE; int sum; int i; /* Sum the values */ for(i = 0, sum = 0; i < num_struct; i++) sum += *(array[i]); /* Assign the result */ *out = sum; } /* ************************************************************************ */ static void udn_int_compare(COMPARE_ARGS) { int *int_struct1 = (int *) STRUCT_PTR_1; int *int_struct2 = (int *) STRUCT_PTR_2; /* Compare the structures */ if((*int_struct1) == (*int_struct2)) EQUAL = TRUE; else EQUAL = FALSE; } /* ************************************************************************ */ static void udn_int_plot_val(PLOT_VAL_ARGS) { int *int_struct = (int *) STRUCT_PTR; NG_IGNORE(STRUCT_MEMBER_ID); /* Output a value for the int struct */ PLOT_VAL = *int_struct; } /* ************************************************************************ */ static void udn_int_print_val(PRINT_VAL_ARGS) { int *int_struct = (int *) STRUCT_PTR; NG_IGNORE(STRUCT_MEMBER_ID); /* Allocate space for the printed value */ PRINT_VAL = TMALLOC(char, 30); /* Print the value into the string */ sprintf(PRINT_VAL, "%8d", *int_struct); } /* ************************************************************************ */ static void udn_int_ipc_val(IPC_VAL_ARGS) { /* Simply return the structure and its size */ IPC_VAL = STRUCT_PTR; IPC_VAL_SIZE = sizeof(int); } Evt_Udn_Info_t udn_int_info = { "int", "integer valued data", udn_int_create, udn_int_dismantle, udn_int_initialize, udn_int_invert, udn_int_copy, udn_int_resolve, udn_int_compare, udn_int_plot_val, udn_int_print_val, udn_int_ipc_val }; ngspice-26/src/xspice/icm/xtraevt/udnpath.lst0000644000265600020320000000001112264261473020737 0ustar andreasadminint real ngspice-26/src/xspice/icm/spice2poly/0000755000265600020320000000000012264261473017154 5ustar andreasadminngspice-26/src/xspice/icm/spice2poly/.gitignore0000644000265600020320000000015212264261473021142 0ustar andreasadmin/spice2poly.cm /cmextrn.h /cminfo.h /dlmain.c /objects.inc /udnextrn.h /udninfo.h /*/*.c !/*/udnfunc.c ngspice-26/src/xspice/icm/spice2poly/modpath.lst0000644000265600020320000000001712264261473021332 0ustar andreasadminicm_spice2poly ngspice-26/src/xspice/icm/spice2poly/icm_spice2poly/0000755000265600020320000000000012264261473022075 5ustar andreasadminngspice-26/src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod0000644000265600020320000002030312264261473023672 0ustar andreasadmin/* =========================================================================== FILE cfunc.mod MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of a code model polynomial controlled source compatible with SPICE 2G6 poly sources. INTERFACES spice2poly() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ /* This code model implements the non-linear polynomial controlled sources available in SPICE 2G6. An automatic translator added into the simulator front end is used to map 2G6 syntax into a call to this model in the required syntax. This model may also be called directly as follows: a1 [ ] xxx .model xxx spice2poly ( coef = [ ] ) Refer to the 2G6 User Guide for an explanation of the coefficients. This model is patterned after the FORTRAN code used in the 2G6 simulator. Function cm_poly() below performs the functions of subroutines NLCSRC and EVPOLY. Function evterm() performs the function of subroutine EVTERM, and function nxtpwr() performs the function of subroutine NXTPWR. */ #include /* SPICE 2G6 type utility functions */ static double evterm(double x, int n); static void nxtpwr(int *pwrseq, int pdim); void spice2poly (ARGS) { int num_inputs; /* Number of inputs to model */ int num_coefs; /* Number of coefficients */ int *exp; /* List of exponents in products */ /* One for each input */ int i; /* Counter */ int j; /* Counter */ int k; /* Counter */ double *in; /* Values of inputs to model */ double *coef; /* Values of coefficients */ double sum; /* Temporary for accumulating sum of terms */ double product; /* Temporary for accumulating product */ /* Get number of input values */ num_inputs = PORT_SIZE(in); /* If this is the first call to the model, allocate the static variable */ /* array */ if(INIT) { Mif_Inst_Var_Data_t *p = STATIC_VAR_INST(acgains); p -> size = num_inputs; p -> element = (Mif_Value_t *) malloc((size_t) num_inputs * sizeof(Mif_Value_t)); for(i = 0; i < num_inputs; i++) STATIC_VAR(acgains[i]) = 0.0; } /* If analysis type is AC, use the previously computed DC partials */ /* for the AC gains */ if(ANALYSIS == MIF_AC) { for(i = 0; i < num_inputs; i++) { AC_GAIN(out,in[i]).real = STATIC_VAR(acgains[i]); AC_GAIN(out,in[i]).imag = 0.0; } return; } /* Get input values and coefficients to local storage for faster access */ in = (double *) malloc((size_t) num_inputs * sizeof(double)); for(i = 0; i < num_inputs; i++) in[i] = INPUT(in[i]); num_coefs = PARAM_SIZE(coef); coef = (double *) malloc((size_t) num_coefs * sizeof(double)); for(i = 0; i < num_coefs; i++) coef[i] = PARAM(coef[i]); /* Allocate the array of exponents used in computing the poly terms */ exp = (int *) malloc((size_t) num_inputs * sizeof(int)); /* Initialize the exponents to zeros */ for(i = 0; i < num_inputs; i++) exp[i] = 0; /* Compute the output of the source by summing the required products */ for(i = 1, sum = coef[0]; i < num_coefs; i++) { /* Get the list of powers for the product terms in this term of the sum */ nxtpwr(exp, num_inputs); /* Form the product of the inputs taken to the required powers */ for(j = 0, product = 1.0; j < num_inputs; j++) product *= evterm(in[j], exp[j]); /* Add the product times the appropriate coefficient into the sum */ sum += coef[i] * product; } OUTPUT(out) = sum; /* Compute and output the partials for each input */ for(i = 0; i < num_inputs; i++) { /* Reinitialize the exponent list to zeros */ for(j = 0; j < num_inputs; j++) exp[j] = 0; /* Compute the partials by summing the required products */ for(j = 1, sum = 0.0; j < num_coefs; j++) { /* Get the list of powers for the product terms in this term of the sum */ nxtpwr(exp, num_inputs); /* If power for input for which partial is being evaluated */ /* is zero, the term is a constant, so the partial is zero */ if(exp[i] == 0) continue; /* Form the product of the inputs taken to the required powers */ for(k = 0, product = 1.0; k < num_inputs; k++) { /* If input is not the one for which the partial is being taken */ /* take the term to the specified exponent */ if(k != i) product *= evterm(in[k], exp[k]); /* else, take the derivative of this term as n*x**(n-1) */ else product *= exp[k] * evterm(in[k], exp[k] - 1); } /* Add the product times the appropriate coefficient into the sum */ sum += coef[j] * product; } PARTIAL(out,in[i]) = sum; /* If this is DC analysis, save the partial for use as AC gain */ /* value in an AC analysis */ if(ANALYSIS == MIF_DC) STATIC_VAR(acgains[i]) = sum; } /* Free the allocated items and return */ free(in); free(coef); free(exp); return; } /* Function evterm computes the value of x**n */ static double evterm( double x, int n) { double product; /* Temporary accumlator for forming the product */ product = 1.0; while(n > 0) { product *= x; n--; } return(product); } /* This function is a literal translation of subroutine NXTPWR in SPICE 2G6. This was done to guarantee compatibility with the ordering of coefficients used by 2G6. The 2G6 User Guide does not completely define the algorithm used and the GOTO loaded FORTRAN code is difficult to unravel. Therefore, a one-to-one translation was deemed the safest approach. No attempt is made to document the function statements since no documentaton is available in the 2G6 code. However, it can be noted that the code appears to generate the exponents of the product terms in the sum-of-products produced by the following expansion for two and three dimensional polynomials: 2D (a + b) ** n 3D (a + (b + c)) ** n where n begins at 1 and increments as needed for as many terms as there are coefficients on the polynomial source SPICE deck card, and where terms that are identical under the laws of associativity are dropped. Thus, for example, the exponents for the following sums are produced: 2D a + b + a**2 + ab + b**2 + c**3 + ... 3D a + b + c + a**2 + a*b + a*c + b**2 + bc + c**2 + a**3 + ... */ /* Define a macro to tranlate between FORTRAN-style array references */ /* and C-style array references */ #define PWRSEQ(x) pwrseq[x - 1] static void nxtpwr( int *pwrseq, /* Array of exponents */ int pdim) { int i; int k; int km1; int psum; if(pdim == 1) goto stmt80; k = pdim; stmt10: if(PWRSEQ(k) != 0) goto stmt20; k = k - 1; if(k != 0) goto stmt10; goto stmt80; stmt20: if(k == pdim) goto stmt30; PWRSEQ(k) = PWRSEQ(k) - 1; PWRSEQ(k+1) = PWRSEQ(k+1) + 1; goto stmt100; stmt30: km1 = k - 1; for(i = 1; i <= km1; i++) if(PWRSEQ(i) != 0) goto stmt50; /*stmt40:*/ PWRSEQ(1) = PWRSEQ(pdim) + 1; PWRSEQ(pdim) = 0; goto stmt100; stmt50: psum = 1; k = pdim; stmt60: if(PWRSEQ(k-1) >= 1) goto stmt70; psum = psum + PWRSEQ(k); PWRSEQ(k) = 0; k = k - 1; goto stmt60; stmt70: PWRSEQ(k) = PWRSEQ(k) + psum; PWRSEQ(k-1) = PWRSEQ(k-1) - 1; goto stmt100; stmt80: PWRSEQ(1) = PWRSEQ(1) + 1; stmt100: return; } ngspice-26/src/xspice/icm/spice2poly/icm_spice2poly/README0000644000265600020320000000364512264261473022765 0ustar andreasadminThis directory holds a codemodel which enables ngspice to handle SPICE 2 POLY attributes on controlled sources. In short, when a SPICE 2 netlist is read in, any controlled sources with POLY attributes are translated into codemodel devices with an associated .model which invokes spice2poly to evaluate the polynomial. To use this model, you need to do the following: 1. Compile the rest of ngspice/tclspice in the usual way from the base directory. 2. Download and install SPICE Opus (available from http://www.fe.uni-lj.si/ ). From this you need the program cmpp, as well as some of the include files. 3. Edit the Makefile in this directory and make the variable CMPPDIR point to the base location of your Opus installation. 4. Edit the Makefile in the directory above (..) and make the variable CMPDIR point to the base location of your Opus installation. 5. Do "make" in the directory above (..). The makefiles are set up to do all the necessary stuff to turn the spice2poly sources into a shared object named spice2poly.cm which you can load into ngspice. (Alternatively, you can do "make codemodels" from $(top_srcdir); I have included codemodels as a target which cd's into the directory below and does "make".) 6. Read the codemodel into ngspice in the following way: ngspice 1 -> codemodel /usr/local/src/tclspice-0.2.10/src/xspice/icm/spice2poly.cm (Of course, you should point to the location where *you* built spice2poly.cm!) You might want to put this invocation into your spinit file (which usually lives in $(top_srcdir)/src/). 7. Then read in your SPICE netlist. SPICE 2 POLY attributes in controlled sources will be translated into .models invoking the spice2poly codemodel. You should be able to run ngspice and simulate in the usual way! ---------------------------------------------------------------------- Please send any comments/questions/bug reports to: Stuart Brorson sdb@cloud9.net -- SDB 6.19.2003 ngspice-26/src/xspice/icm/spice2poly/icm_spice2poly/ifspec.ifs0000644000265600020320000000312512264261473024052 0ustar andreasadmin/* =========================================================================== FILE ifspec.ifs MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of a code model polynomial controlled source compatible with SPICE 2G6 poly sources. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ NAME_TABLE: Spice_Model_Name: spice2poly C_Function_Name: spice2poly Description: "2G6 compatible polynomial controlled source" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: vd vd Allowed_Types: [vd,id,vnam] [vd,id] Vector: yes no Vector_Bounds: [1 -] - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: coef Description: "2G6 compatible spice card coefficient list" Data_Type: real Default_Value: - Limits: - Vector: yes Vector_Bounds: [2 -] Null_Allowed: no STATIC_VAR_TABLE: Static_Var_Name: acgains Data_Type: real Description: "Partial derivatives from DC analysis used for AC gains" Vector: yes ngspice-26/src/xspice/icm/spice2poly/udnpath.lst0000644000265600020320000000000012264261473021331 0ustar andreasadminngspice-26/src/xspice/icm/README0000644000265600020320000000376312264261473015754 0ustar andreasadminThis directory holds a codemodel which enables ngspice to handle SPICE 2 POLY attributes on controlled sources. In short, when a SPICE 2 netlist is read in, any controlled sources with POLY attributes are translated into codemodel devices with an associated .model which invokes spice2poly to evaluate the polynomial. To use this model, you need to do the following: 1. Compile the rest of ngspice/tclspice in the usual way from the base directory. Make sure you do configure --enable-xspice when configuring. 2. Download and install SPICE Opus (available from http://www.fe.uni-lj.si/). From this you need the program cmpp, as well as some of the include files. 3. Edit the Makefile in this directory and make the variable CMPPDIR point to the base location of your Opus installation. (Hint: I place it in /usr/local/opus.) 4. Edit the Makefile in the directory below (icm_spice2poly/) and make the variable CMPDIR point to the base location of your Opus installation. 5. Do "make" in this directory. The makefiles are set up to do all the necessary stuff to turn the spice2poly sources into a shared object named spice2poly.cm which you can load into ngspice. (Alternatively, you can do "make codemodels" from $(top_srcdir); I have included codemodels as a target which cd's into this directory and does "make".) 6. Read the codemodel into ngspice in the following way: ngspice 1 -> codemodel /usr/local/lib/spice/spice2poly.cm (Of course, you should point to the location where *you* built spice2poly.cm!) You might want to put this invocation into your spinit file (which usually lives in $(top_srcdir)/src/). 7. Then read in your SPICE netlist. SPICE 2 POLY attributes in controlled sources will be translated into .models invoking the spice2poly codemodel. You should be able to run ngspice and simulate in the usual way! ---------------------------------------------------------------------- Please send any comments/questions/bug reports to: Stuart Brorson sdb@cloud9.net -- SDB 6.19.2003 ngspice-26/src/xspice/icm/xtradev/0000755000265600020320000000000012264261473016540 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/zener/0000755000265600020320000000000012264261473017663 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/zener/cfunc.mod0000644000265600020320000002346712264261473021476 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE zener/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 2 May 1991 Jeffrey P. Murray MODIFICATIONS 18 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the zener code model. INTERFACES FILE ROUTINE CALLED CM.c void cm_analog_not_converged() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_zener() AUTHORS 2 May 1991 Jeffrey P. Murray MODIFICATIONS 18 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the zener code model. INTERFACES FILE ROUTINE CALLED CM.c void cm_analog_not_converged() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ #include /*=== CM_ZENER ROUTINE ===*/ void cm_zener(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double v_breakdown, /* breakdown voltage parameter */ i_breakdown, /* breakdown current parameter */ r_breakdown, /* breakdown resistance parameter */ i_rev, /* reverse current parameter */ i_sat, /* saturation current parameter... a.k.a. Io in the forward diode characteristic equation...see below. */ n_forward, /* forward emission coefficient parameter... a.k.a. "n" in the forward diode characteristic equation...see below. */ vt, /* volt-equivalent of temperature, Vt, used in conjunction with n = n_forward value to describe the forward-voltage diode behavior described as: I = Io * (e^(V/n*Vt) - 1.0) */ v_1_2, /* Boundary value voltage between region 1 (forward diode characteristic) and region 2 (linear region) */ k, /* intermediate value used to find v_2_3 */ v_2_3, /* Boundary value voltage between region 2 (linear region) and region 3 (reverse breakdown region) */ slope1, /* Slope of endpoint for a two segment model */ slope2, /* Slope of endpoint for a two segment model */ temp, /* temporary variable used to calulate the derivatives */ v_zener, /* input voltage across zener */ i_zener, /* current which is allowed to flow through zener, for a given voltage */ i0, v0, a, /* coefficient used to calculate "c" */ b, /* coefficient used to calculate "c" */ c, /* A constant to match ordinates at region 2/3 boundary */ deriv, /* partial derivative of the output current w.r.t. the input voltage */ diff, /* difference between slope1 and slope2 */ ord_1_2, /* Compute ordinate at boundary of regions 1 & 2 */ *previous_voltage, /* Previous voltage value (used for limiting) */ increment, /* Increment value calculated from the previous_input for v_zener input limiting */ g; /* conductance value equal to i_rev / v_breakdown. This value is used to simulate a reverse-leakage conductance in parallel with the zener characteristic. */ Mif_Complex_t ac_gain; /* AC gain */ if (INIT==1) { /* First pass...allocate storage for previous value... */ /* Allocate storage for frequencies */ STATIC_VAR(previous_voltage) = (double *) malloc(sizeof(double)); previous_voltage = (double *) STATIC_VAR(previous_voltage); /* Set previous_voltage value to zero... */ *previous_voltage = 0.0; } else { previous_voltage = (double *) STATIC_VAR(previous_voltage); } /* Retrieve frequently used parameters & inputs... */ v_breakdown = PARAM(v_breakdown); i_breakdown = PARAM(i_breakdown); r_breakdown = PARAM(r_breakdown); i_rev = PARAM(i_rev); i_sat = PARAM(i_sat); n_forward = PARAM(n_forward); v_zener = INPUT(z); /** If the limit_switch parameter is set, test the **/ /** current input against previous value for limiting **/ if ( MIF_TRUE == PARAM(limit_switch) ) { /* Check magnitude of v_zener */ if ( fabs(*previous_voltage) >= 1.0 ) { increment = 0.1 * *previous_voltage; } else { if (v_zener < 0.0) { increment = -0.1; } else { increment = 0.1; } } /* Test v_zener for reasonable change in value since last call.. */ if ( fabs(v_zener) > ( fabs(*previous_voltage + increment) ) ) { /* Apply limiting... */ *previous_voltage = v_zener = *previous_voltage + increment; cm_analog_not_converged(); } else { *previous_voltage = v_zener; } } /* Compute voltage at boundary of regions 1 & 2 */ vt = 0.026; v_1_2 = n_forward * vt * log(n_forward * vt / 10.0); /* Compute voltage at boundary of regions 2 & 3 */ k = 1.0 / i_breakdown / r_breakdown; v_2_3 = -v_breakdown + log(10.0/i_sat/r_breakdown)/k; /* Compare v_1_2 and v_2_3 to determine if a 3 segment model is possible */ if (v_2_3 < v_1_2) { /* Use a 3 segment model */ /* Compute v0 for region 3... */ i0 = 1.e-6; v0 = -v_breakdown + 1.0/k*log(i_breakdown/i0); /* Compute ordinate at boundary of regions 1 & 2 */ ord_1_2 = i_sat * (exp(v_1_2/n_forward/vt) - 1.0); /* Compute a & b coefficients for linear section in region 2 */ a = i_sat / 10.0; b = ord_1_2 - a * v_1_2; /* Compute constant to match ordinates at region 2/3 boundary */ c = a*v_2_3 + b + i0*exp(-k * (v_2_3 - v0)); /* Compute zener current */ if (v_zener >= v_1_2) { temp = exp(v_zener / n_forward / vt); i_zener = i_sat * (temp - 1.0); deriv = i_sat / n_forward / vt * temp; } else { if (v_zener >= v_2_3) { i_zener = a * v_zener + b; deriv = i_sat / 10.0; } else { temp = exp(-k * (v_zener - v0)); i_zener = -i0 * temp + c; deriv = k * i0 * temp; } } } else { /* Must use a 2 segment model */ /* Determine i0 for reverse region */ i0 = i_breakdown / (exp(k * v_breakdown) - 1.0); /* Determine the slopes at the region endpoints */ slope1 = i_sat / n_forward / vt; slope2 = i0 * k; /* Determine zener current & first partial... */ /* Use a linear conductance in one region to match */ /* slopes at the boundary. */ if (v_zener >= 0.0) { temp = exp(v_zener / n_forward / vt); i_zener = i_sat * (temp - 1.0); deriv = i_sat / n_forward / vt * temp; diff = slope2 - slope1; if (diff > 0.0) { i_zener = i_zener + diff * v_zener; deriv = deriv + diff; } } else { temp = exp(-k * v_zener); i_zener = -i0 * (temp - 1.0); deriv = k * i0 * temp; diff = slope1 - slope2; if (diff > 0.0) { i_zener = i_zener + diff * v_zener; deriv = deriv + diff; } } } /* Add resistor in parallel to simulate reverse leakage */ g = i_rev / v_breakdown; i_zener = i_zener + g * v_zener; deriv = deriv + g; if(ANALYSIS != MIF_AC) { /* Output DC & Transient Values */ OUTPUT(z) = i_zener; PARTIAL(z,z) = deriv; } else { /* Output AC Gain */ ac_gain.real = deriv; ac_gain.imag= 0.0; AC_GAIN(z,z) = ac_gain; } } ngspice-26/src/xspice/icm/xtradev/zener/ifspec.ifs0000644000265600020320000000526412264261473021646 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 May 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog zener code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_zener Spice_Model_Name: zener Description: "zener diode" PORT_TABLE: Port_Name: z Description: "zener" Direction: inout Default_Type: gd Allowed_Types: [gd] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: v_breakdown i_breakdown Description: "breakdown voltage" "breakdown current" Data_Type: real real Default_Value: - 2e-2 Limits: [1e-6 1e6] [1e-9 -] Vector: no no Vector_Bounds: - - Null_Allowed: no yes PARAMETER_TABLE: Parameter_Name: r_breakdown i_rev Description: "breakdown resistance" "reverse current" Data_Type: real real Default_Value: 1.0 1e-6 Limits: [1e-12 -] [1e-9 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: i_sat n_forward Description: "saturation current" "forward emission co" Data_Type: real real Default_Value: 1e-12 1.0 Limits: [1e-15 -] [.1 10] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: limit_switch Description: "switch for on-board limiting (convergence aid)" Data_Type: boolean Default_Value: FALSE Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: previous_voltage Data_Type: pointer Description: "iteration holding variable for limiting" ngspice-26/src/xspice/icm/xtradev/capacitor/0000755000265600020320000000000012264261473020505 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/capacitor/cfunc.mod0000644000265600020320000000352012264261473022304 0ustar andreasadmin/* =========================================================================== FILE cfunc.mod MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of a capacitor code model with voltage type initial conditions. INTERFACES cm_capacitor() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #define VC 0 void cm_capacitor (ARGS) { Complex_t ac_gain; double partial; double ramp_factor; double *vc; /* Get the ramp factor from the .option ramptime */ ramp_factor = cm_analog_ramp_factor(); /* Initialize/access instance specific storage for capacitor voltage */ if(INIT) { cm_analog_alloc(VC, sizeof(double)); vc = (double *) cm_analog_get_ptr(VC, 0); *vc = PARAM(ic) * cm_analog_ramp_factor(); } else { vc = (double *) cm_analog_get_ptr(VC, 0); } /* Compute the output */ if(ANALYSIS == DC) { OUTPUT(cap) = PARAM(ic) * ramp_factor; PARTIAL(cap, cap) = 0.0; } else if(ANALYSIS == AC) { ac_gain.real = 0.0; ac_gain.imag = -1.0 / RAD_FREQ / PARAM(c); AC_GAIN(cap, cap) = ac_gain; } else if(ANALYSIS == TRANSIENT) { if(ramp_factor < 1.0) { *vc = PARAM(ic) * ramp_factor; OUTPUT(cap) = *vc; PARTIAL(cap, cap) = 0.0; } else { cm_analog_integrate(INPUT(cap) / PARAM(c), vc, &partial); partial /= PARAM(c); OUTPUT(cap) = *vc; PARTIAL(cap, cap) = partial; } } } ngspice-26/src/xspice/icm/xtradev/capacitor/ifspec.ifs0000644000265600020320000000260012264261473022457 0ustar andreasadmin/* =========================================================================== FILE ifspec.ifs MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of a capacitor code model with voltage type initial conditions. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ NAME_TABLE: Spice_Model_Name: capacitor C_Function_Name: cm_capacitor Description: "Capacitor with voltage initial condition" PORT_TABLE: Port_Name: cap Description: "capacitor terminals" Direction: inout Default_Type: hd Allowed_Types: [hd] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: c ic Description: "capacitance" "voltage initial condition" Data_Type: real real Default_Value: - 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: no no ngspice-26/src/xspice/icm/xtradev/.gitignore0000644000265600020320000000014712264261473020532 0ustar andreasadmin/xtradev.cm /cmextrn.h /cminfo.h /dlmain.c /objects.inc /udnextrn.h /udninfo.h /*/*.c !/*/udnfunc.c ngspice-26/src/xspice/icm/xtradev/modpath.lst0000644000265600020320000000012412264261473020715 0ustar andreasadminaswitch capacitor cmeter core inductor lcouple lmeter potentiometer zener memristor ngspice-26/src/xspice/icm/xtradev/lcouple/0000755000265600020320000000000012264261473020203 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/lcouple/cfunc.mod0000644000265600020320000001642612264261473022013 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE lcouple/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the lcouple code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_lcouple() AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 13 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the lcouple code model. INTERFACES FILE ROUTINE CALLED CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_LCOUPLE ROUTINE ===*/ /*********************************************** * Note that this model incorporates a fake * * integration in order to link in truncation * * error checking...this may be removed at a * * future date. JPM 9/13/91 * ***********************************************/ void cm_lcouple(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double input_current, /* input current from electrical-side windings */ output_voltage, /* output voltage reflected to electricaL-side */ *output_voltage_fake, /* fake output voltage for use with truncation error checking. */ /*input_flux,*/ /* input flux value from core side (represented as a current. */ output_mmf, /* output driving amp-turns to core side. */ num_turns, /* number of turns on inductor */ pout_pin_fake, /* fake partial derivative of output w.r.t. input (for use with integration */ *in_flux, /* current input flux value from core side (represented as a current). */ *in_flux_old, /* previous timestep flux value */ *in_flux_fake, /* fake input flux value for use with truncation error checking. */ delta; /* time delta from previous timepoint to current value */ Mif_Complex_t ac_gain; /* AC gain */ /** Retrieve frequently used parameters... **/ num_turns = PARAM(num_turns); if (ANALYSIS != MIF_AC) { /**** DC & Transient Analyses ****/ /** Test for INIT; if so, allocate storage, otherwise, retrieve previous timepoint input value... **/ if (INIT==1) { /* First pass...allocate storage for previous state. */ /* Also, calculate roughly where the current output */ /* will be and use this value to define current state. */ cm_analog_alloc(1,sizeof(double)); cm_analog_alloc(2,sizeof(double)); cm_analog_alloc(3,sizeof(double)); } /* Allocation not necessary...retrieve previous values */ in_flux = (double *) cm_analog_get_ptr(1,0); /* Set out pointer to current time storage */ in_flux_old = (double *) cm_analog_get_ptr(1,1); /* Set old-output-state pointer to previous time storage */ /* retrieve fake input and output values for truncation error checking */ in_flux_fake = (double *) cm_analog_get_ptr(2,0); output_voltage_fake = (double *) cm_analog_get_ptr(3,0); /** Retrieve inputs... **/ input_current = INPUT(l); /* input from electrical side is a current */ *in_flux = -INPUT(mmf_out); /* input from core side is a flux represented as a current...note that a negative is introduced, because current INTO the positive node would normally result in a NEGATIVE output_voltage... the minus sign corrects this. */ /** Calculate output value for mmf... **/ output_mmf = num_turns * input_current; OUTPUT(mmf_out) = output_mmf; PARTIAL(mmf_out,l) = num_turns; /** Calculate output value for output_voltage... **/ if ( 0.0 == TIME ) { /*** Test to see if this is the first ***/ /*** timepoint calculation...if ***/ *in_flux_old = *in_flux; /*** so, return a zero d/dt value. ***/ output_voltage = *output_voltage_fake = 0.0; OUTPUT(l) = output_voltage; PARTIAL(l,mmf_out) = 0.0; } else { /*** Calculate value of d_dt.... ***/ delta = TIME - T(1); output_voltage = *output_voltage_fake = num_turns * (*in_flux - *in_flux_old) / delta; OUTPUT(l) = output_voltage; PARTIAL(l,mmf_out) = -num_turns / delta; /* add fake cm_analog_integrate for truncation error checks */ /* not initialized, not used */ /*cm_analog_integrate(*output_voltage_fake,in_flux_fake,&pout_pin_fake); */ } } else { /**** AC Analysis...****/ ac_gain.real = 0.0; ac_gain.imag= num_turns * RAD_FREQ; AC_GAIN(l,mmf_out) = ac_gain; ac_gain.real= num_turns; ac_gain.imag= 0.0; AC_GAIN(mmf_out,l) = ac_gain; } } ngspice-26/src/xspice/icm/xtradev/lcouple/ifspec.ifs0000644000265600020320000000246112264261473022162 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog lcouple code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_lcouple Spice_Model_Name: lcouple Description: "inductive coupling (for use with 'core' model)" PORT_TABLE: Port_Name: l mmf_out Description: "inductor" "mmf output (in Ampere-turns)" Direction: inout inout Default_Type: hd hd Allowed_Types: [h,hd] [hd] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: num_turns Description: "number of inductor turns" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/xtradev/core/0000755000265600020320000000000012264261473017470 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/core/cfunc.mod0000644000265600020320000004674312264261473021305 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE core/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 24 Apr 1991 Jeffrey P. Murray MODIFICATIONS 24 Apr 1991 Jeffrey P. Murray 26 Sep 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the core code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMutil.c void cm_smooth_corner(); REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ #define HYST 1 #define X_RISING TRUE #define X_FALLING FALSE #define PWL 1 #define HYSTERESIS 2 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_core() AUTHORS 24 Apr 1991 Jeffrey P. Murray MODIFICATIONS 24 Apr 1991 Jeffrey P. Murray 26 Sep 1991 Jeffrey P. Murray SUMMARY This function implements the core code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CMutil.c void cm_smooth_corner(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_CORE ROUTINE ===*/ /*******************************************************************/ /* */ /* CORE Model: */ /* */ /* The core model is designed to operate in one of two modes. */ /* The first of these, and the one most likely to be used by */ /* the engineer, is a modified version of the pwl model. This */ /* behavior occurs when the model is in pwl mode (the default). */ /* If the model is set to hyst mode, its behavior mimics that of */ /* the hysteresis block. The following provides additional */ /* detail: */ /* */ /* PWL Mode */ /* */ /* In pwl mode, the core model is a modified version of the */ /* PWL model... */ /* it has a single two-terminal input/output, and accepts as */ /* input the mmf value, represented by a voltage. Its output is */ /* a flux value, which is represented as a current. Additional */ /* inputs include the cross-sectional area of the physical */ /* core, and the median length of the core, seen from the */ /* perspective of the flux that traverses it. */ /* */ /* The core model in pwl mode DOES NOT include hysteresis... */ /* current thinking is that such provides */ /* little benefit to the designer, aside from the ability to */ /* calculate eddy losses in a modeled device...the nonlinear */ /* B vs. H behavior, however, is of great importance. */ /* */ /* Note that the user must input a piece-wise-linear */ /* description, in the form of a series of coordinate B vs. H */ /* values, in order to model a particular core material type. */ /* Such curves may be found in textbooks, or from manufacturer's */ /* databooks. In this model, the "x" values are assumed to */ /* represent the magnetic field (H), and the "y" values are */ /* assumed to represent the flux density (B). */ /* */ /* Hyst Mode */ /* */ /* In hyst mode, the core model is a modified version of the */ /* HYST code model... */ /* it has a single two-terminal input/output, and accepts as */ /* input the mmf value, represented by a voltage. Its output is */ /* a flux value, which is represented as a current. Additional */ /* inputs include the input high and low values for the */ /* hysteretic behavior, and the output high and low values. */ /* Also, a value of hysteresis must be included, as must an */ /* input_domain value, and a fraction value, which tell the model */ /* whether to interpret the input_domain as an absolute value */ /* or as a relative figure. */ /* */ /* When the hyst mode is invoked on the core model, the user is */ /* in the position of having to define reasonable values for the */ /* upper and lower output limiting values. These can be very */ /* difficule to nail down accurately. Current thinking is tha */ /* the hysteresis capability will be of only nominal benefit to */ /* the engineer, as it will not typically allow for as accurate */ /* tailoring of the response as is possible in the pwl mode. */ /* */ /* 4/24/91 J.P.Murray */ /* Last modified: 10/24/91 */ /*******************************************************************/ void cm_core(ARGS) { /*** The following declarations pertain to PWL mode ***/ int i; /* generic loop counter index */ int size; /* size of the x_array */ int mode; /* mode parameter which determines whether pwl or hyst will be used in analysis. */ double input_domain; /* smoothing range */ Mif_Value_t *H; /* pointer to the H-field array */ Mif_Value_t *B; /* pointer to the B-field array */ double lower_seg; /* x segment below which input resides */ double upper_seg; /* x segment above which the input resides */ double lower_slope; /* slope of the lower segment */ double upper_slope; /* slope of the upper segment */ double mmf_input; /* input mmf value */ double H_input; /* calculated input H value */ double B_out; /* output B value */ double flux_out; /* calculated output flux */ double dout_din; /* partial derivative of the output wrt input */ double threshold_lower; /* value below which the output begins smoothing */ double threshold_upper; /* value above which the output begins smoothing */ double area; /* cross-sectional area of the core (in meters)*/ double length; /* length of core (in meters) */ Mif_Complex_t ac_gain; char *limit_error="\n***ERROR***\nCORE: Violation of 50% rule in breakpoints!\n"; /*** The following declarations pertain to HYSTERESIS mode... ***/ double in, /* input to hysteresis block */ out, /* output from hysteresis block */ in_low, /* lower input value for hyst=0 at which the transfer curve changes from constant to linear */ in_high, /* upper input value for hyst=0 at which the transfer curve changes from constant to linear */ hyst, /* the hysteresis value (see above diagram) */ out_lower_limit, /* the minimum output value from the block */ out_upper_limit, /* the maximum output value from the block */ slope, /* calculated rise and fall slope for the block */ pout_pin, /* partial derivative of output w.r.t. input */ x_rise_linear, /* = in_low + hyst */ x_rise_zero, /* = in_high + hyst */ x_fall_linear, /* = in_high - hyst */ x_fall_zero; /* = in_low - hyst */ Boolean_t *hyst_state, /* TRUE => input is on lower leg of hysteresis curve, between -infinity and in_high + hyst. FALSE => input is on upper leg of hysteresis curve, between in_low - hyst and +infinity */ *old_hyst_state; /* previous value of *hyst_state */ /* Retrieve mode parameter... */ mode = PARAM(mode); /** Based on mode value, switch to the appropriate model code... **/ if (HYSTERESIS != mode) { /******** pwl mode *****************/ /* Retrieve frequently used parameters... */ input_domain = PARAM(input_domain); area = PARAM(area); length = PARAM(length); size = PARAM_SIZE(H_array); H = (Mif_Value_t*) &PARAM(H_array[0]); B = (Mif_Value_t*) &PARAM(B_array[0]); /* See if input_domain is absolute...if so, test against */ /* breakpoint segments for violation of 50% rule... */ if (PARAM(fraction) == MIF_FALSE) for (i = 0; i < size - 1; i++) if ((H[i+1].rvalue - H[i].rvalue) < 2.0 * input_domain) { cm_message_send(limit_error); return; } /* Retrieve mmf_input value. */ mmf_input = INPUT(mc); /* Calculate H_input value from mmf_input... */ H_input = mmf_input / length; /* Determine segment boundaries within which H_input resides */ if (H_input <= (H[1].rvalue + H[0].rvalue) / 2.0) {/*** H_input below lowest midpoint ***/ dout_din = (B[1].rvalue - B[0].rvalue) / (H[1].rvalue - H[0].rvalue); B_out = B[0].rvalue + (H_input - H[0].rvalue) * dout_din; } else if (H_input >= (H[size-2].rvalue + H[size-1].rvalue) / 2.0) { /*** H_input above highest midpoint ***/ dout_din = (B[size-1].rvalue - B[size-2].rvalue) / (H[size-1].rvalue - H[size-2].rvalue); B_out = B[size-1].rvalue + (H_input - H[size-1].rvalue) * dout_din; } else { /*** H_input within bounds of end midpoints... ***/ /*** must determine position progressively & then ***/ /*** calculate required output. ***/ dout_din = 0.0 / 0.0; B_out = 0.0 / 0.0; for (i = 1; i < size; i++) if (H_input < (H[i].rvalue + H[i+1].rvalue) / 2.0) { /* approximate position known... */ lower_seg = (H[i].rvalue - H[i-1].rvalue); upper_seg = (H[i+1].rvalue - H[i].rvalue); /* Calculate input_domain about this region's breakpoint.*/ if (PARAM(fraction) == MIF_TRUE) { /* Translate input_domain */ /* into an absolute.... */ if (lower_seg <= upper_seg) /* Use lower */ /* segment */ /* for % calc.*/ input_domain = input_domain * lower_seg; else /* Use upper */ /* segment */ /* for % calc.*/ input_domain = input_domain * upper_seg; } /* Set up threshold values about breakpoint... */ threshold_lower = H[i].rvalue - input_domain; threshold_upper = H[i].rvalue + input_domain; /* Determine where H_input is within region & determine */ /* output and partial values.... */ if (H_input < threshold_lower) { /* Lower linear region */ dout_din = (B[i].rvalue - B[i-1].rvalue) / lower_seg; B_out = B[i].rvalue + (H_input - H[i].rvalue) * dout_din; } else if (H_input < threshold_upper) { /* Parabolic region */ lower_slope = (B[i].rvalue - B[i-1].rvalue) / lower_seg; upper_slope = (B[i+1].rvalue - B[i].rvalue) / upper_seg; cm_smooth_corner(H_input, H[i].rvalue, B[i].rvalue, input_domain, lower_slope, upper_slope, &B_out, &dout_din); } else { /* Upper linear region */ dout_din = (B[i+1].rvalue - B[i].rvalue) / upper_seg; B_out = B[i].rvalue + (H_input - H[i].rvalue) * dout_din; } break; /* Break search loop...H_input has been found, */ /* and B_out and dout_din have been assigned. */ } } /* Calculate value of flux_out... */ flux_out = B_out * area; /* Adjust dout_din value to reflect area and length multipliers... */ dout_din = dout_din * area / length; if (ANALYSIS != MIF_AC) { /* Output DC & Transient Values */ OUTPUT(mc) = flux_out; PARTIAL(mc, mc) = dout_din; } else { /* Output AC Gain */ ac_gain.real = dout_din; ac_gain.imag = 0.0; AC_GAIN(mc, mc) = ac_gain; } } else { /******** hysteresis mode ******************/ /** Retrieve frequently used parameters... **/ in_low = PARAM(in_low); in_high = PARAM(in_high); hyst = PARAM(hyst); out_lower_limit = PARAM(out_lower_limit); out_upper_limit = PARAM(out_upper_limit); input_domain = PARAM(input_domain); /** Calculate Hysteresis Linear Region Slopes & Derived Values **/ /* Define slope of rise and fall lines when not being smoothed */ slope = (out_upper_limit - out_lower_limit) / (in_high - in_low); x_rise_linear = in_low + hyst; /* Breakpoint - x rising to linear region */ x_rise_zero = in_high + hyst; /* Breakpoint - x rising to zero-slope (out_upper_limit) */ x_fall_linear = in_high - hyst; /* Breakpoint - x falling to linear region */ x_fall_zero = in_low - hyst; /* Breakpoint - x falling to zero-slope (out_lower_limit) */ /* Set range to absolute value */ if (PARAM(fraction) == MIF_TRUE) input_domain = input_domain * (in_high - in_low); /** Retrieve frequently used inputs... **/ in = INPUT(mc); /** Test for INIT; if so, allocate storage, otherwise, retrieve previous timepoint value for output... **/ /* First pass...allocate storage for previous state. */ /* Also, calculate roughly where the current output */ /* will be and use this value to define current state. */ if (INIT == 1) { cm_analog_alloc(TRUE, sizeof(Boolean_t)); hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE, 0); old_hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE, 1); if (in < x_rise_zero + input_domain) /* Set state to X_RISING */ *old_hyst_state = X_RISING; else *old_hyst_state = X_FALLING; } else { /* Allocation not necessary...retrieve previous values */ hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE, 0); /* Set out pointer to current time storage */ old_hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE, 1); /* Set old-output-state pointer to previous time storage */ } /** Set *hyst_out = *old_hyst_out, unless changed below... we don't need the last iteration value of *hyst_state. **/ *hyst_state = *old_hyst_state; /*** Calculate value of hyst_state, pout_pin.... ***/ if (*old_hyst_state == X_RISING) { /* Assume calculations on lower */ /* hysteresis section (x rising) */ if (in <= x_rise_linear - input_domain) { /* Output @ lower limit */ out = out_lower_limit; pout_pin = 0.0; } else if (in <= x_rise_linear + input_domain) { /* lower smoothing region */ cm_smooth_corner(in, x_rise_linear, out_lower_limit, input_domain, 0.0, slope, &out, &pout_pin); } else if (in <= x_rise_zero - input_domain) { /* Rising linear region */ out = (in - x_rise_linear)*slope + out_lower_limit; pout_pin = slope; } else if (in <= x_rise_zero + input_domain) { /* Upper smoothing region */ cm_smooth_corner(in, x_rise_zero, out_upper_limit, input_domain, slope, 0.0, &out, &pout_pin); } else { /* input has transitioned to X_FALLING region... */ out = out_upper_limit; pout_pin = 0.0; *hyst_state = X_FALLING; } } else { /* Assume calculations on upper hysteresis section (x falling) */ if ( in >= x_fall_linear + input_domain ) { /* Output @ upper limit */ out = out_upper_limit; pout_pin = 0.0; } else if ( in >= x_fall_linear - input_domain ) { /* Upper smoothing region */ cm_smooth_corner(in, x_fall_linear, out_upper_limit, input_domain, slope, 0.0, &out, &pout_pin); } else if (in >= x_fall_zero + input_domain) { /* Falling linear region */ out = (in - x_fall_zero)*slope + out_lower_limit; pout_pin = slope; } else if (in >= x_fall_zero - input_domain) { /* Lower smoothing region */ cm_smooth_corner(in, x_fall_zero, out_lower_limit, input_domain, 0.0, slope, &out, &pout_pin); } else { /* input has transitioned to X_RISING region... */ out = out_lower_limit; pout_pin = 0.0; *hyst_state = X_RISING; } } if (ANALYSIS != MIF_AC) { /* DC & Transient Analyses */ OUTPUT(mc) = out; PARTIAL(mc, mc) = pout_pin; } else { /* AC Analysis */ ac_gain.real = pout_pin; ac_gain.imag = 0.0; AC_GAIN(mc, mc) = ac_gain; } } } ngspice-26/src/xspice/icm/xtradev/core/ifspec.ifs0000644000265600020320000000674512264261473021460 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog core code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_core Spice_Model_Name: core Description: "magnetic core" PORT_TABLE: Port_Name: mc Description: "magnetic core" Direction: inout Default_Type: gd Allowed_Types: [g,gd] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: h_array b_array Description: "magnetic field array" "flux density array" Data_Type: real real Default_Value: - - Limits: - - Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: area length Description: "cross-sectional area" "core length" Data_Type: real real Default_Value: - - Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: input_domain Description: "input sm. domain" Data_Type: real Default_Value: 0.01 Limits: [1e-12 0.5] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: fraction Description: "smoothing fractional/abs switch" Data_Type: boolean Default_Value: TRUE Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: mode Description: "mode switch (1 = pwl, 2 = hyst)" Data_Type: int Default_Value: 1 Limits: [1 2] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: in_low in_high Description: "input low value" "input high value" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: hyst out_lower_limit Description: "hysteresis" "output lower limit" Data_Type: real real Default_Value: 0.1 0.0 Limits: [0 -] - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: out_upper_limit Description: "output upper limit" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/xtradev/lmeter/0000755000265600020320000000000012264261473020030 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/lmeter/cfunc.mod0000644000265600020320000000422012264261473021625 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE lmeter/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 30 Jul 1991 Bill Kuhn MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the lmeter code model. INTERFACES FILE ROUTINE CALLED CMmeters.c double cm_netlist_get_l() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_lmeter() AUTHORS 30 Jul 1991 Bill Kuhn MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the lmeter code model. INTERFACES FILE ROUTINE CALLED CMmeters.c double cm_netlist_get_l() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_LMETER ROUTINE ===*/ void cm_lmeter (ARGS) { double leq; if(INIT) { leq = cm_netlist_get_l(); STATIC_VAR(l) = leq; } else leq = STATIC_VAR(l); OUTPUT(out) = PARAM(gain) * leq; } ngspice-26/src/xspice/icm/xtradev/lmeter/ifspec.ifs0000644000265600020320000000261412264261473022007 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 302 Jul 1991 Bill Kuhn SUMMARY This file contains the interface specification file for the analog lmeter code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: lmeter C_Function_Name: cm_lmeter Description: "ATESSE 1 compatible inductance meter" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v, vd] [v, vd, i, id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: gain Description: "L to voltage conversion factor" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: l Data_Type: real Description: "inductance connected to input node" ngspice-26/src/xspice/icm/xtradev/memristor/0000755000265600020320000000000012264261473020561 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/memristor/cfunc.mod0000644000265600020320000000512312264261473022361 0ustar andreasadmin/* =========================================================================== FILE cfunc.mod MEMBER OF process XSPICE Copyright 2012 Holger Vogt Mülheim, Germany All Rights Reserved AUTHORS 6/08/2012 Holger Vogt MODIFICATIONS SUMMARY This file contains the definition of a memristor code model with threshold according to Y. V. Pershin, M. Di Ventra: "SPICE model of memristive devices with threshold", arXiv:1204.2600v1 [physics.comp-ph] 12 Apr 2012, http://arxiv.org/pdf/1204.2600.pdf. ** Experimental, still to be tested in circuits !! ** dc and ac simulation just return rinit. INTERFACES cm_memristor() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ /*=== INCLUDE FILES ====================*/ #include #define RV 0 /* model parameters */ double alpha, beta, vt; /* forward of window function */ double f1(double y); void cm_memristor (ARGS) { Complex_t ac_gain; double partial; double int_value; double *rval; double inpdiff; /* get the parameters */ alpha = PARAM(alpha); beta = PARAM(beta); vt = PARAM(vt); /* Initialize/access instance specific storage for resistance value */ if(INIT) { cm_analog_alloc(RV, sizeof(double)); rval = (double *) cm_analog_get_ptr(RV, 0); *rval = PARAM(rinit); } else { rval = (double *) cm_analog_get_ptr(RV, 0); } /* Compute the output */ if(ANALYSIS == TRANSIENT) { /* input the voltage across the terminals */ inpdiff = f1(INPUT(memris)); if ((inpdiff > 0) && (*rval < PARAM(rmax))) int_value = inpdiff; else if ((inpdiff < 0) && (*rval > PARAM(rmin))) int_value = inpdiff; else int_value = 0.0; /* integrate the new resistance */ cm_analog_integrate(int_value, rval, &partial); /* output the current */ OUTPUT(memris) = INPUT(memris) / *rval; /* This does work, but is questionable */ PARTIAL(memris, memris) = partial; /* This may be a (safe?) replacement, but in fact is not so good at high voltage (at strong non-linearity) cm_analog_auto_partial();*/ } else if(ANALYSIS == AC) { ac_gain.real = 1/ *rval; ac_gain.imag = 0.0; AC_GAIN(memris, memris) = ac_gain; } else OUTPUT(memris) = INPUT(memris) / *rval; } /* the window function */ double f1(double y) { return (beta*y+0.5*(alpha-beta)*(fabs(y+vt)-fabs(y-vt))); } ngspice-26/src/xspice/icm/xtradev/memristor/ifspec.ifs0000644000265600020320000000463412264261473022544 0ustar andreasadmin/* =========================================================================== FILE ifspec.ifs MEMBER OF process XSPICE Copyright 2012 Holger Vogt Mülheim, Germany All Rights Reserved AUTHORS 06/08/2012 Holger Vogt MODIFICATIONS SUMMARY This file contains the definition of a memristor code model with threshold according to Y. V. Pershin, M. Di Ventra: "SPICE model of memristive devices with threshold", arXiv:1204.2600v1 [physics.comp-ph] 12 Apr 2012, http://arxiv.org/pdf/1204.2600.pdf. ** Experimental, still to be tested in circuits !! ** INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ NAME_TABLE: Spice_Model_Name: memristor C_Function_Name: cm_memristor Description: "Memristor interface" PORT_TABLE: Port_Name: memris Description: "memristor terminals" Direction: inout Default_Type: gd Allowed_Types: [gd] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: rmin rmax rinit Description: "minimum resistance" "maximum resistance" "initial resistance" Data_Type: real real real Default_Value: 10.0 10000.0 7000.0 Limits: - - - Vector: no no no Vector_Bounds: - - - Null_Allowed: no no no PARAMETER_TABLE: Parameter_Name: alpha beta vt Description: "model parameter 1" "model parameter 2" "threshold" Data_Type: real real real Default_Value: 0.0 1.0 0.0 Limits: - - - Vector: no no no Vector_Bounds: - - - Null_Allowed: no no no ngspice-26/src/xspice/icm/xtradev/cmeter/0000755000265600020320000000000012264261473020017 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/cmeter/cfunc.mod0000644000265600020320000000416512264261473021624 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE cmeter/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 30 July 1991 Bill Kuhn MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the cmeter code model. INTERFACES FILE ROUTINE CALLED CMmeters.c double cm_netlist_get_c() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_cmeter() AUTHORS 30 July 1991 Bill Kuhn MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This function implements the cmeter code model. INTERFACES FILE ROUTINE CALLED CMmeters.c double cm_netlist_get_c() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_CMETER ROUTINE ===*/ void cm_cmeter (ARGS) { double ceq; /* holding variable for read capacitance value */ if(INIT) { ceq = cm_netlist_get_c(); STATIC_VAR(c) = ceq; } else ceq = STATIC_VAR(c); OUTPUT(out) = PARAM(gain) * ceq; } ngspice-26/src/xspice/icm/xtradev/cmeter/ifspec.ifs0000644000265600020320000000266012264261473021777 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 July 1991 Bill Kuhn SUMMARY This file contains the interface specification file for the analog cmeter code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: cmeter C_Function_Name: cm_cmeter Description: "ATESSE 1 compatible capacitance meter" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v, vd] [v, vd, i, id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: gain Description: "C to voltage conversion factor" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: c Data_Type: real Description: "capacitance connected to input node" ngspice-26/src/xspice/icm/xtradev/potentiometer/0000755000265600020320000000000012264261473021436 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/potentiometer/cfunc.mod0000644000265600020320000001100312264261473023230 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE potentiometer/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 19 June 1992 Jeffrey P. Murray MODIFICATIONS 19 June 1992 Jeffrey P. Murray SUMMARY This file contains the functional description of the potentiometer code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_potentiometer() AUTHORS 19 June 1992 Jeffrey P. Murray MODIFICATIONS 19 June 1992 Jeffrey P. Murray SUMMARY This function implements the potentiometer code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_POTENTIOMETER ROUTINE ===*/ void cm_potentiometer (ARGS) { double position; /* position of wiper contact */ double resistance; /* total resistance */ double r_lower; /* resistance from r0 to wiper */ double r_upper; /* resistance from wiper to r1 */ double vr0; /* voltage at r0 */ double vr1; /* voltage at r1 */ double vwiper; /* voltage at wiper */ Mif_Complex_t ac_gain; /* Retrieve frequently used parameters... */ position = PARAM(position); resistance = PARAM(r); /* Retrieve input voltages... */ vr0 = INPUT(r0); vwiper = INPUT(wiper); vr1 = INPUT(r1); if ( PARAM(log) == FALSE ) { /* Linear Variation in resistance w.r.t. position */ r_lower = position * resistance; r_upper = resistance - r_lower; } else { /* Logarithmic Variation in resistance w.r.t. position */ r_lower = resistance / pow(10.0,(position * PARAM(log_multiplier))); r_upper = resistance - r_lower; } /* Output DC & Transient Values */ if(ANALYSIS != MIF_AC) { OUTPUT(r0) = (vr0 - vwiper) / r_lower; OUTPUT(r1) = (vr1 - vwiper) / r_upper; OUTPUT(wiper) = ((vwiper - vr0)/r_lower) + ((vwiper - vr1)/r_upper); PARTIAL(r0,r0) = 1.0 / r_lower; PARTIAL(r0,r1) = 0.0; PARTIAL(r0,wiper) = -1.0 / r_lower; PARTIAL(r1,r0) = 0.0; PARTIAL(r1,r1) = 1.0 / r_upper; PARTIAL(r1,wiper) = -1.0 / r_upper; PARTIAL(wiper,r0) = -1.0 / r_lower; PARTIAL(wiper,r1) = -1.0 / r_upper; PARTIAL(wiper,wiper) = (1.0/r_lower) + (1.0/r_upper); } else { /* Output AC Gain Values */ ac_gain.imag= 0.0; ac_gain.real = -1.0 / r_lower; AC_GAIN(r0,r0) = ac_gain; ac_gain.real = 0.0; AC_GAIN(r0,r1) = ac_gain; ac_gain.real = 1.0 / r_lower; AC_GAIN(r0,wiper) = ac_gain; ac_gain.real = 0.0; AC_GAIN(r1,r0) = ac_gain; ac_gain.real = -1.0 / r_upper; AC_GAIN(r1,r1) = ac_gain; ac_gain.real = 1.0 / r_upper; AC_GAIN(r1,wiper) = ac_gain; ac_gain.real = 1.0 / r_lower; AC_GAIN(wiper,r0) = ac_gain; ac_gain.real = 1.0 / r_upper; AC_GAIN(wiper,r1) = ac_gain; ac_gain.real = -(1.0/r_lower) - (1.0/r_upper); AC_GAIN(wiper,wiper) = ac_gain; } } ngspice-26/src/xspice/icm/xtradev/potentiometer/ifspec.ifs0000644000265600020320000000442112264261473023413 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 19 June 1992 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog potentiometer code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: potentiometer C_Function_Name: cm_potentiometer Description: "potentiometer" PORT_TABLE: Port_Name: r0 wiper Description: "pot connection 0" "wiper contact" Direction: inout inout Default_Type: g g Allowed_Types: [g] [g] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: r1 Description: "pot connection 1" Direction: inout Default_Type: g Allowed_Types: [g] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: position Description: "position of wiper connection (0.0 to 1.0)" Data_Type: real Default_Value: 0.5 Limits: [0.0 1.0] Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: log r Description: "log-linear switch" "total resistance" Data_Type: boolean real Default_Value: FALSE 1.0e5 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: log_multiplier Description: "multiplier constant for log resistance" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: Data_Type: Description: ngspice-26/src/xspice/icm/xtradev/aswitch/0000755000265600020320000000000012264261473020202 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/aswitch/cfunc.mod0000644000265600020320000001140212264261473021777 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE aswitch/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the aswitch code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_aswitch() AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This function implements the aswitch code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_ASWITCH ROUTINE ===*/ void cm_aswitch(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double cntl_on; /* voltage above which switch come on */ double cntl_off; /* voltage below the switch has resistance roff */ double r_on; /* on resistance */ double r_off; /* off resistance */ double intermediate; /* intermediate value used to calculate the resistance of the switch when the controlling voltage is between cntl_on and cntl_of */ double r; /* value of the resistance of the switch */ double pi_pvout; /* partial of the output wrt input */ double pi_pcntl; /* partial of the output wrt control input */ Mif_Complex_t ac_gain; char *cntl_error = "\n*****ERROR*****\nASWITCH: CONTROL voltage delta less than 1.0e-12\n"; /* Retrieve frequently used parameters... */ cntl_on = PARAM(cntl_on); cntl_off = PARAM(cntl_off); r_on = PARAM(r_on); r_off = PARAM(r_off); if( r_on < 1.0e-3 ) r_on = 1.0e-3; /* Set minimum 'ON' resistance */ if( (fabs(cntl_on - cntl_off) < 1.0e-12) ) { cm_message_send(cntl_error); return; } if ( PARAM(log) == MIF_TRUE ) { /* Logarithmic Variation in 'R' */ intermediate = log(r_off / r_on) / (cntl_on - cntl_off); r = r_on * exp(intermediate * (cntl_on - INPUT(cntl_in))); if(r<=1.0e-9) r=1.0e-9;/* minimum resistance limiter */ pi_pvout = 1.0 / r; pi_pcntl = intermediate * INPUT(out) / r; } else { /* Linear Variation in 'R' */ intermediate = (r_on - r_off) / (cntl_on - cntl_off); r = INPUT(cntl_in) * intermediate + ((r_off*cntl_on - r_on*cntl_off) / (cntl_on - cntl_off)); if(r<=1.0e-9) r=1.0e-9;/* minimum resistance limiter */ pi_pvout = 1.0 / r; pi_pcntl = -intermediate * INPUT(out) / (r*r); } /*pi_pvout = 1.0 / r;*/ if(ANALYSIS != MIF_AC) { /* Output DC & Transient Values */ OUTPUT(out) = INPUT(out) / r; /* Note that the minus */ PARTIAL(out,out) = pi_pvout; /* Signs are required */ PARTIAL(out,cntl_in) = pi_pcntl; /* because current is */ /* positive flowing INTO */ /* rather than OUT OF a */ /* component node. */ } else { /* Output AC Gain Values */ ac_gain.real = -pi_pvout; /* See comment on minus */ ac_gain.imag= 0.0; /* signs above.... */ AC_GAIN(out,out) = ac_gain; ac_gain.real = -pi_pcntl; ac_gain.imag= 0.0; AC_GAIN(out,cntl_in) = ac_gain; } } ngspice-26/src/xspice/icm/xtradev/aswitch/ifspec.ifs0000644000265600020320000000410012264261473022151 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog aswitch code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_aswitch Spice_Model_Name: aswitch Description: "analog switch" PORT_TABLE: Port_Name: cntl_in out Description: "input" "resistive output" Direction: in inout Default_Type: v gd Allowed_Types: [v,vd,i,id,vnam] [gd] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: cntl_off cntl_on Description: "control 'off' val" "control 'on' val" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: log r_off Description: "Log-linear switch" "off resistance" Data_Type: boolean real Default_Value: TRUE 1.0e12 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: r_on Description: "on resistance" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/xtradev/inductor/0000755000265600020320000000000012264261473020367 5ustar andreasadminngspice-26/src/xspice/icm/xtradev/inductor/cfunc.mod0000644000265600020320000000347312264261473022175 0ustar andreasadmin/* =========================================================================== FILE cfunc.mod MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of an inductor code model with current initial conditions. INTERFACES cm_inductor() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #define LI 0 void cm_inductor (ARGS) { Complex_t ac_gain; double partial; double ramp_factor; double *li; /* Get the ramp factor from the .option ramptime */ ramp_factor = cm_analog_ramp_factor(); /* Initialize/access instance specific storage for capacitor voltage */ if(INIT) { cm_analog_alloc(LI, sizeof(double)); li = (double *) cm_analog_get_ptr(LI, 0); *li = PARAM(ic) * ramp_factor; } else { li = (double *) cm_analog_get_ptr(LI, 0); } /* Compute the output */ if(ANALYSIS == DC) { OUTPUT(ind) = PARAM(ic) * ramp_factor; PARTIAL(ind, ind) = 0.0; } else if(ANALYSIS == AC) { ac_gain.real = 0.0; ac_gain.imag = 1.0 * RAD_FREQ * PARAM(l); AC_GAIN(ind, ind) = ac_gain; } else if(ANALYSIS == TRANSIENT) { if(ramp_factor < 1.0) { *li = PARAM(ic) * ramp_factor; OUTPUT(ind) = *li; PARTIAL(ind, ind) = 0.0; } else { cm_analog_integrate(INPUT(ind) / PARAM(l), li, &partial); partial /= PARAM(l); OUTPUT(ind) = *li; PARTIAL(ind, ind) = partial; } } } ngspice-26/src/xspice/icm/xtradev/inductor/ifspec.ifs0000644000265600020320000000256612264261473022354 0ustar andreasadmin/* =========================================================================== FILE ifspec.ifs MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of an inductor code model with current initial conditions. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ NAME_TABLE: Spice_Model_Name: inductor C_Function_Name: cm_inductor Description: "Inductor with current initial condition" PORT_TABLE: Port_Name: ind Description: "inductor terminals" Direction: inout Default_Type: gd Allowed_Types: [gd] Vector: no Vector_Bounds: - Null_Allowed: no PARAMETER_TABLE: Parameter_Name: l ic Description: "inductance" "current initial condition" Data_Type: real real Default_Value: - 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: no no ngspice-26/src/xspice/icm/xtradev/udnpath.lst0000644000265600020320000000000012264261473020715 0ustar andreasadminngspice-26/src/xspice/icm/GNUmakefile.in0000644000265600020320000000701512264261473017545 0ustar andreasadmin# The master makefile to make spiceopus (TM) like codemodels # Under the GPLV2 or later license # 2003 - Stefan Jones include makedefs # The codemodels to make CMDIRS = spice2poly digital analog xtradev xtraevt all: for cm in $(CMDIRS) ; do \ $(MAKE) cm=$$cm $$cm/$$cm.cm \ || exit 1; \ done install: all $(MKDIR_P) "$(DESTDIR)$(pkglibdir)" $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)" for cm in $(CMDIRS) ; do \ $(INSTALL_PROGRAM) $$cm/$$cm.cm "$(DESTDIR)$(pkglibdir)" \ || exit 1; \ done $(INSTALL_DATA) $(srcdir)/dlmain.c "$(DESTDIR)$(pkgdatadir)" || exit $$?; uninstall: for cm in $(CMDIRS) ; do \ rm -f "$(DESTDIR)$(pkglibdir)/$$cm.cm"; \ done clean: for cm in $(CMDIRS) ; do \ $(MAKE) cm=$$cm cm-clean \ || exit 1; \ done #----------------------------------------------------------------------------- ifdef cm modlst := $(shell cat $(srcdir)/$(cm)/modpath.lst) udnlst := $(shell cat $(srcdir)/$(cm)/udnpath.lst) cm-dirs := $(cm) $(udnlst:%=$(cm)/%) $(modlst:%=$(cm)/%) cm-dep-dirs := $(cm-dirs:%=%/.deps) cm-gens := \ $(modlst:%=$(cm)/%/cfunc.c) \ $(modlst:%=$(cm)/%/ifspec.c) cm-objs := \ $(cm)/dlmain.o \ $(modlst:%=$(cm)/%/cfunc.o) \ $(modlst:%=$(cm)/%/ifspec.o) \ $(udnlst:%=$(cm)/%/udnfunc.o) cm-deps := \ $(cm)/.deps/dlmain.P \ $(modlst:%=$(cm)/%/.deps/cfunc.P) \ $(modlst:%=$(cm)/%/.deps/ifspec.P) \ $(udnlst:%=$(cm)/%/.deps/udnfunc.P) cm-descr := \ $(cm)/cmextrn.h \ $(cm)/cminfo.h \ $(cm)/udnextrn.h \ $(cm)/udninfo.h \ $(cm)/objects.inc -include $(cm-deps) .SECONDARY : $(cm-gens) cm-clean : rm -f $(cm)/$(cm).cm rm -f $(cm-descr) $(cm-objs) $(cm-gens) rm -f $(cm-deps) #----- $(cm)/$(cm).cm : $(cm-objs) $(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@ # "order-only" prerequisites # (info "(make) Prerequisite Types") $(cm-gens) $(cm-objs) $(cm-descr) : | cm-dirs cm-dirs : $(cm-dirs) $(cm-dep-dirs) $(cm-dirs) $(cm-dep-dirs) : $(MKDIR_P) $(cm-dirs) $(cm-dep-dirs) #----- # cancel builtin rules %.o : %.c %.o : %.mod # multiple targets in a pattern group ... # (info "(make) Pattern Intro") %/cmextrn.h %/cminfo.h %/udnextrn.h %/udninfo.h %/objects.inc : $(srcdir)/%/modpath.lst $(srcdir)/%/udnpath.lst CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -lst %/ifspec.c : $(srcdir)/%/ifspec.ifs CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -ifs %/cfunc.c : $(srcdir)/%/cfunc.mod CMPP_IDIR=$(srcdir)/$(@D) CMPP_ODIR=$(@D) $(CMPP) -mod gen_pp = $(DEPFLAGS) $(@D)/.deps/$(basename $(> $$x.P; \ rm $$x.pp endef COMPILE = $(CC) $(INCLUDES) -I$(cm) -I$(srcdir)/$(cm) $(CFLAGS) $(EXTRA_CFLAGS) $(cm)/dlmain.o : $(srcdir)/dlmain.c $(cm-descr) $(COMPILE) $(gen_pp) -o $@ -c $< $(do-deps) $(cm)/%/cfunc.o : $(cm)/%/cfunc.c $(COMPILE) $(gen_pp) -I$(srcdir)/$( (out_upper_limit + limit_range)) { /* At upper limit */ out = out_upper_limit; pout_pin = 0.0; } else { if (out > (out_upper_limit - limit_range)) { /* Upper smoothing region */ cm_smooth_corner(out,out_upper_limit,out_upper_limit,limit_range, 1.0,0.0,&out,&pout_gain); pout_pin = pout_pin * pout_gain; } } } } /** Output values for DC & Transient **/ OUTPUT(out) = out; PARTIAL(out,in) = pout_pin; /* this cm_analog_integrate call is required in order to force truncation error to be evaluated */ cm_analog_integrate(out,&dum,&dumpout_pin); } else { /**** AC Analysis...output (0.0,s*gain) ****/ ac_gain.real = 0.0; ac_gain.imag= gain * RAD_FREQ; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/d_dt/ifspec.ifs0000644000265600020320000000452512264261473021220 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 30 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog d_dt (differentiator) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_d_dt Spice_Model_Name: d_dt Description: "differentiator block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: out_offset gain Description: "output offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: out_lower_limit out_upper_limit Description: "output lower limit" "output upper limit" Data_Type: real real Default_Value: - - Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: limit_range Description: "upper & lower sm. range" Data_Type: real Default_Value: 1.0e-6 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/analog/square/0000755000265600020320000000000012264261473017624 5ustar andreasadminngspice-26/src/xspice/icm/analog/square/cfunc.mod0000644000265600020320000003006612264261473021430 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE square/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 12 Apr 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the square (controlled squarewave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ char *square_allocation_error = "\n**** Error ****\nSQUARE: Error allocating square block storage \n"; char *square_limit_error = "\n**** Error ****\nSQUARE: Smoothing domain value too large \n"; char *square_freq_clamp = "\n**** WARNING ****\nSQUARE: Frequency extrapolation limited to 1e-16 \n"; char *square_array_error = "\n**** Error ****\nSQUARE: Size of control array different than frequency array \n"; #define INT1 1 #define T1 2 #define T2 3 #define T3 4 #define T4 5 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef struct { Boolean_t tran_init; /* for initialization of phase1) */ } Local_Data_t; /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_square() AUTHORS 12 Apr 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the square (controlled squarewave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_SQUARE ROUTINE ===*/ /*********************************************************** * * * I <-dutycycle-> * * I * * I out_high * * I t2 | t3 * * I \____v_____/ * * I / \ * * I * * I / \ * * I * * I / \ * * I * * I-----------------I I--------------- * * ^ t1 t4 * * | * * out_low * * t2 = t1 + t_rise * * t4 = t3 + t_fall * * * ***********************************************************/ void cm_square(ARGS) { int i; /* generic loop counter index */ int cntl_size; /* control array size */ int freq_size; /* frequency array size */ int int_cycle; /* integer number of cycles */ Mif_Value_t *x; /* pointer to the control array values */ Mif_Value_t *y; /* pointer to the frequency array values */ double cntl_input; /* control input */ double dout_din; /* slope of the frequency array wrt the control array. Used to extrapolate a frequency above and below the control input high and low level */ double output_low; /* output low */ double output_hi; /* output high */ double dphase; /* fractional part into cycle */ double *phase; /* pointer to the phase value */ double *phase1; /* pointer to the old phase value */ double freq = 0.0; /* frequency of the wave */ double d_cycle; /* duty cycle */ double *t1; /* pointer containing the value of time1 */ double *t2; /* pointer containing the value of time2 */ double *t3; /* pointer containing the value of time3 */ double *t4; /* pointer containing the value of time4 */ double time1; /* time1 = duty_cycle * period of the wave */ double time2; /* time2 = time1 + risetime */ double time3; /* time3 = current time+time to end of period*/ double time4; /* time4 = time3 + falltime */ double t_rise; /* risetime */ double t_fall; /* falltime */ Mif_Complex_t ac_gain; /**** Retrieve frequently used parameters... ****/ cntl_size = PARAM_SIZE(cntl_array); freq_size = PARAM_SIZE(freq_array); output_low = PARAM(out_low); output_hi = PARAM(out_high); d_cycle = PARAM(duty_cycle); t_rise = PARAM(rise_time); t_fall = PARAM(fall_time); /* check and make sure that the control array is the same size as the frequency array */ if (cntl_size != freq_size) { cm_message_send(square_array_error); return; } /* First time throught allocate memory */ if (INIT == 1) { cm_analog_alloc(INT1, sizeof(double)); cm_analog_alloc(T1, sizeof(double)); cm_analog_alloc(T2, sizeof(double)); cm_analog_alloc(T3, sizeof(double)); cm_analog_alloc(T4, sizeof(double)); STATIC_VAR(tran_init) = MIF_FALSE; } x = (Mif_Value_t*) &PARAM(cntl_array[0]); y = (Mif_Value_t*) &PARAM(freq_array[0]); if (ANALYSIS == MIF_DC) { /* initialize time values */ t1 = (double *) cm_analog_get_ptr(T1, 0); t2 = (double *) cm_analog_get_ptr(T2, 0); t3 = (double *) cm_analog_get_ptr(T3, 0); t4 = (double *) cm_analog_get_ptr(T4, 0); *t1 = -1; *t2 = -1; *t3 = -1; *t4 = -1; OUTPUT(out) = output_low; PARTIAL(out, cntl_in) = 0; } else if (ANALYSIS == MIF_TRAN) { /* Retrieve previous values */ phase = (double *) cm_analog_get_ptr(INT1, 0); phase1 = (double *) cm_analog_get_ptr(INT1, 1); t1 = (double *) cm_analog_get_ptr(T1, 1); t2 = (double *) cm_analog_get_ptr(T2, 1); t3 = (double *) cm_analog_get_ptr(T3, 1); t4 = (double *) cm_analog_get_ptr(T4, 1); time1 = *t1; time2 = *t2; time3 = *t3; time4 = *t4; if (STATIC_VAR(tran_init) == MIF_FALSE) { *phase1 = 0.0; STATIC_VAR(tran_init) = MIF_TRUE; } /* Retrieve cntl_input value. */ cntl_input = INPUT(cntl_in); /* Determine segment boundaries within which cntl_input resides */ /*** cntl_input below lowest cntl_voltage ***/ if (cntl_input <= x[0].rvalue) { dout_din = (y[1].rvalue - y[0].rvalue) / (x[1].rvalue - x[0].rvalue); freq = y[0].rvalue + (cntl_input - x[0].rvalue) * dout_din; if (freq <= 0) { cm_message_send(square_freq_clamp); freq = 1e-16; } } else if (cntl_input >= x[cntl_size-1].rvalue) { /*** cntl_input above highest cntl_voltage ***/ dout_din = (y[cntl_size-1].rvalue - y[cntl_size-2].rvalue) / (x[cntl_size-1].rvalue - x[cntl_size-2].rvalue); freq = y[cntl_size-1].rvalue + (cntl_input - x[cntl_size-1].rvalue) * dout_din; } else { /*** cntl_input within bounds of end midpoints... must determine position progressively & then calculate required output. ***/ for (i = 0; i < cntl_size - 1; i++) { if ((cntl_input < x[i+1].rvalue) && (cntl_input >= x[i].rvalue)) { /* Interpolate to the correct frequency value */ freq = ((cntl_input - x[i].rvalue)/(x[i+1].rvalue - x[i].rvalue)) * (y[i+1].rvalue-y[i].rvalue) + y[i].rvalue; } } } /* calculate the instantaneous phase */ *phase = *phase1 + freq*(TIME - T(1)); /* convert the phase to an integer */ int_cycle = (int) *phase1; /* dphase is the percent into the cycle for the period */ dphase = *phase1 - int_cycle; /* Calculate the time variables and the output value for this iteration */ if ((time1 <= TIME) && (TIME <= time2)) { time3 = T(1) + (1 - dphase) / freq; time4 = time3 + t_fall; if (TIME < time2) cm_analog_set_temp_bkpt(time2); cm_analog_set_temp_bkpt(time3); cm_analog_set_temp_bkpt(time4); OUTPUT(out) = output_low + ((TIME - time1) / (time2 - time1)) * (output_hi - output_low); } else if ((time2 <= TIME) && (TIME <= time3)) { time3 = T(1) + (1.0 - dphase) / freq; time4 = time3 + t_fall; if (TIME < time3) cm_analog_set_temp_bkpt(time3); cm_analog_set_temp_bkpt(time4); OUTPUT(out) = output_hi; } else if ((time3 <= TIME) && (TIME <= time4)) { if (dphase > 1 - d_cycle) dphase = dphase - 1.0; /* subtract d_cycle from 1 because my initial definition of duty cyle was that part of the cycle which the output is low. The more standard definition is the part of the cycle where the output is high. */ time1 = T(1) + ((1-d_cycle) - dphase) / freq; time2 = time1 + t_rise; if (TIME < time4) cm_analog_set_temp_bkpt(time4); cm_analog_set_temp_bkpt(time1); cm_analog_set_temp_bkpt(time2); OUTPUT(out) = output_hi + ((TIME - time3) / (time4 - time3)) * (output_low - output_hi); } else { if (dphase > 1 - d_cycle) dphase = dphase - 1.0; /* subtract d_cycle from 1 because my initial definition of duty cyle was that part of the cycle which the output is low. The more standard definition is the part of the cycle where the output is high. */ time1 = T(1) + ((1-d_cycle) - dphase) / freq; time2 = time1 + t_rise; if ((TIME < time1) || (T(1) == 0)) cm_analog_set_temp_bkpt(time1); cm_analog_set_temp_bkpt(time2); OUTPUT(out) = output_low; } PARTIAL(out, cntl_in) = 0.0; /* set the time values for storage */ t1 = (double *) cm_analog_get_ptr(T1, 0); t2 = (double *) cm_analog_get_ptr(T2, 0); t3 = (double *) cm_analog_get_ptr(T3, 0); t4 = (double *) cm_analog_get_ptr(T4, 0); *t1 = time1; *t2 = time2; *t3 = time3; *t4 = time4; } else { /* Output AC Gain */ /* This model has no AC capabilities */ ac_gain.real = 0.0; ac_gain.imag = 0.0; AC_GAIN(out, cntl_in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/square/ifspec.ifs0000644000265600020320000000512612264261473021604 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 12 Apr 1991 Harry Li SUMMARY This file contains the interface specification file for the analog square (controlled squarewave oscillator) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_square Spice_Model_Name: square Description: "controlled square wave oscillator" PORT_TABLE: Port_Name: cntl_in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: cntl_array freq_array Description: "control in array" "frequency array" Data_Type: real real Default_Value: 0.0 1.0e3 Limits: - [0 -] Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: out_low out_high Description: "output low value" "output high value" Data_Type: real real Default_Value: -1.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: duty_cycle rise_time Description: "duty cycle" "rise time" Data_Type: real real Default_Value: 0.5 1.0e-9 Limits: [1e-6 .999999] - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: fall_time Description: "fall time" Data_Type: real Default_Value: 1.0e-9 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: tran_init Description: "tran initialisation" Data_Type: boolean ngspice-26/src/xspice/icm/analog/mult/0000755000265600020320000000000012264261473017305 5ustar andreasadminngspice-26/src/xspice/icm/analog/mult/cfunc.mod0000644000265600020320000001042712264261473021110 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE mult/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 20 Mar 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the mult code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_mult() AUTHORS 20 Mar 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the mult code model. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_MULT ROUTINE ===*/ void cm_mult(ARGS) { int i; /* generic loop counter index */ int size; /* number of input ports */ double accumulate_gain; /* product of all the gains */ double accumulate_in; /* product of all (inputs + offsets) */ double final_gain; /* output gain */ Mif_Complex_t ac_gain; size = PORT_SIZE(in); /* Note that port size */ final_gain = PARAM(out_gain); /* and out_gain are read only */ /* once...saves access time. */ /* Calculate multiplication of inputs and gains for */ /* all types of analyes.... */ accumulate_gain = 1.0; accumulate_in = 1.0; for (i=0; i= 0){ out_slew = *out_old + slope_rise*delta; if(*ins < (*out_old - slope_fall*delta)){ /* If the input had a negative slope (and the output was slewing) and then changed direction to a positive slope and the "slewed" response hasn't caught up to the input yet (input < slewed output), then continue negative slewing until the slewed output meets the positive sloping input */ *outs = *out_old - slope_fall*delta; pout_pin = 0; }else /* Two conditions for slewing, if the slope is greater than the positive slew rate, or if the input slope is less than the positive slew rate and the slewed output is less than the input. This second condition occurs if the input levels off and the slewed output hasn't caught up to the input yet */ if((slope > slope_rise) || ((slope < slope_rise) && (out_slew <= *ins))){ /* SLEWING ! */ *outs = out_slew; pout_pin = 0; }else{ /* No slewing, output=input */ *outs = *ins; pout_pin = 1; } }else{ /* this ends the positive slope stuff */ out_slew = *out_old - slope_fall*delta; if(*ins > (*out_old + slope_rise*delta)){ /* If the input had a positive slope (and the output was slewing) and then changed direction to a negative slope and the "slewed" response hasn't caught up to the input yet (input > slewed output), then continue positive slewing until the slewed output meets the negative sloping input */ *outs = *out_old + slope_rise*delta; pout_pin = 0; }else /* Two conditions for slewing, if the negative slope is greater than the neg. slew rate, or if the neg. input slope is less than the negative slew rate and the slewed output is greater than the input. This second condition occurs if the input levels off and the slewed output hasn't caught up to the input yet */ if((-slope > slope_fall) || ((-slope < slope_fall) && (out_slew > *ins))){ /* SLEWING ! */ *outs = out_slew; pout_pin = 0; }else{ *outs = *ins; pout_pin = 1; } } } /** Output values for DC & Transient **/ OUTPUT(out) = *outs; PARTIAL(out,in) = pout_pin; }else{ /**** AC Analysis...output (0.0,s*gain) ****/ ac_gain.real = 1.0; ac_gain.imag= 0; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/slew/slew.h0000644000265600020320000000225012264261473020420 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE slew/slew.h Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 15 Apr 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains additional header information for the slew code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ #define INT1 1 #define INT2 2 #define INT3 3 #define INT4 4 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ ngspice-26/src/xspice/icm/analog/slew/ifspec.ifs0000644000265600020320000000303512264261473021253 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 15 Apr 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog slew (slew rate) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_slew Spice_Model_Name: slew Description: "a simple slew rate follower block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: rise_slope fall_slope Description: "rising slew limit" "falling slew limit" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/limit/0000755000265600020320000000000012264261473017442 5ustar andreasadminngspice-26/src/xspice/icm/analog/limit/cfunc.mod0000644000265600020320000001135212264261473021243 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE limit/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the limit code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_limit() AUTHORS 2 Oct 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY This function implements the limit code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_LIMIT ROUTINE ===*/ void cm_limit(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double out_lower_limit; /* output lower limit */ double out_upper_limit; /* output upper limit */ double limit_range; /* upper and lower limit smoothing range */ double gain; /* gain */ double threshold_upper; /* value above which smoothing takes place */ double threshold_lower; /* value below which smoothing takes place */ double out; /* output */ double limited_out; /* limited output value */ double out_partial; /* partial of the output wrt input */ Mif_Complex_t ac_gain; /* Retrieve frequently used parameters... */ out_lower_limit = PARAM(out_lower_limit); out_upper_limit = PARAM(out_upper_limit); limit_range = PARAM(limit_range); gain = PARAM(gain); if (PARAM(fraction) == MIF_TRUE) /* Set range to absolute value */ limit_range = limit_range * (out_upper_limit - out_lower_limit); threshold_upper = out_upper_limit - /* Set Upper Threshold */ limit_range; threshold_lower = out_lower_limit + /* Set Lower Threshold */ limit_range; /* Compute Un-Limited Output */ out = gain * (PARAM(in_offset) + INPUT(in)); if (out < threshold_lower) { /* Limit Out @ Lower Bound */ if (out > (out_lower_limit - limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_lower_limit,out_lower_limit, limit_range,0.0,1.0,&limited_out, &out_partial); out_partial = gain * out_partial; } else { /* Hard-Limited Region */ limited_out = out_lower_limit; out_partial = 0.0; } } else { if (out > threshold_upper) { /* Limit Out @ Upper Bound */ if (out < (out_upper_limit + limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_upper_limit,out_upper_limit, limit_range,1.0,0.0,&limited_out, &out_partial); out_partial = gain * out_partial; } else { /* Hard-Limited Region */ limited_out = out_upper_limit; out_partial = 0.0; } } else { /* No Limiting Needed */ limited_out = out; out_partial = gain; } } if (ANALYSIS != MIF_AC) { /* DC & Transient Analyses */ OUTPUT(out) = limited_out; PARTIAL(out,in) = out_partial; } else { /* AC Analysis */ ac_gain.real = out_partial; ac_gain.imag= 0.0; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/limit/ifspec.ifs0000644000265600020320000000467612264261473021433 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog limit code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_limit Spice_Model_Name: limit Description: "limit block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain Description: "input offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: out_lower_limit out_upper_limit Description: "output lower limit" "output upper limit" Data_Type: real real Default_Value: - - Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: limit_range fraction Description: "upper & lower sm. range" "smoothing percent/abs switch" Data_Type: real boolean Default_Value: 1.0e-6 FALSE Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/oneshot/0000755000265600020320000000000012264261473020003 5ustar andreasadminngspice-26/src/xspice/icm/analog/oneshot/oneshot.h0000644000265600020320000000174412264261473021641 0ustar andreasadmin/************************************************/ /****** Structures, etc. for pwl model. ******/ /****** 10/10/90 JPM ******/ /************************************************/ /**** Error Messages ****/ char *oneshot_allocation_error = "\n**** Error ****\nONESHOT: Error allocating oneshot block storage \n"; char *oneshot_array_error = "\n**** Error ****\nONESHOT: Size of control array different than pulse-width array \n"; char *oneshot_pw_clamp = "\n**** Warning ****\nONESHOT: Extrapolated Pulse-Width Limited to zero \n"; #define T1 1 #define T2 2 #define T3 3 #define T4 4 #define SET 5 #define STATE 6 #define CLOCK 7 #define OUTPUT_OLD 8 #define LOCKED 9 /***** Define Error Messages **************************************/ /***** Structure Definitions *************************************/ /***** Function Definitions ***************************************/ ngspice-26/src/xspice/icm/analog/oneshot/cfunc.mod0000644000265600020320000004331412264261473021607 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE oneshot/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 20 Mar 1991 Harry Li MODIFICATIONS 17 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray 9 Sep 2012 Holger Vogt SUMMARY This file contains the model-specific routines used to functionally describe the oneshot code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include "oneshot.h" /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ typedef struct { double *control; /* the storage array for the control vector (cntl_array) */ double *pw; /* the storage array for the pulse width array (pw_array) */ int tran_init; /* for initialization of old_clock) */ } Local_Data_t; /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_oneshot() AUTHORS 20 Mar 1991 Harry Li MODIFICATIONS 17 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray 9 Sep 2012 Holger Vogt SUMMARY This function implements the oneshot code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_ONESHOT ROUTINE ===*/ /*************************************************************************************** * * This model describes a totally analog oneshot. * After a rising edge is detected, the model will * output a pulse width specified by the controling * voltage. * HWL 20Mar91 * * * * ___________________________________ * /<---pulse width ---> :\ * / : : : \ * <---rise_delay--> / : :<-fall_delay->: \ * ___|________________/ : : : \____________ * ^ <-->: : :<--> * Trigger Risetime Falltime * * ****************************************************************************************/ #include void cm_oneshot(ARGS) /* structure holding parms, inputs, outputs, etc. */ { int i; /* generic loop counter index */ int *locked; /* pointer used to store the locked1 variable */ int locked1; /* flag which allows the time points to be reset. value determined by retrig parameter */ int cntl_size; /* size of the control array */ int pw_size; /* size of the pulse-width array */ int *state; /* pointer used to store state1 variable */ int state1; /* if state1 = 1, then oneshot has been triggered. if state1 = 0, no change */ int *set; /* pointer used to store the state of set1 */ int set1; /* flag used to set/reset the oneshot */ int trig_pos_edge; /* flag used to define positive or negative edge triggering. 1=positive, 0=negative */ double *x; /* pointer used to store the control array */ double *y; /* pointer used to store the pulse-width array */ double cntl_input; /* the actual value of the control input */ /*double out;*/ /* value of the output */ double dout_din; /* slope of the pw wrt the control voltage */ double output_low; /* output low value */ double output_hi; /* output high value */ double pw=0.0; /* actual value of the pulse-width */ /* double del_out; value of the delay time between triggering and a change in the output */ double del_rise; /* value of the delay time between triggering and a change in the output */ double del_fall; /* value of the delay time between the end of the pw and a change in the output */ double *t1; /* pointer used to store time1 */ double *t2; /* pointer used to store time2 */ double *t3; /* pointer used to store time3 */ double *t4; /* pointer used to store time4 */ double time1; /* time at which the output first begins to change (trigger + delay) */ double time2; /* time2 = time1 + risetime */ double time3; /* time3 = time2 + pw */ double time4; /* time4 = time3 + falltime */ double t_rise; /* risetime */ double t_fall; /* falltime */ double *output_old;/* pointer which stores the previous output */ double *clock; /* pointer which stores the clock */ double *old_clock; /* pointer which stores the previous clock */ double trig_clk; /* value at which the clock triggers the oneshot */ Mif_Complex_t ac_gain; Local_Data_t *loc; /* Pointer to local static data, not to be included in the state vector */ /**** Retrieve frequently used parameters... ****/ cntl_size = PARAM_SIZE(cntl_array); pw_size = PARAM_SIZE(pw_array); trig_clk = PARAM(clk_trig); trig_pos_edge = PARAM(pos_edge_trig); output_low = PARAM(out_low); output_hi = PARAM(out_high); /*del_out = PARAM(delay);*/ del_rise = PARAM(rise_delay); del_fall = PARAM(fall_delay); t_rise = PARAM(rise_time); t_fall = PARAM(fall_time); /* set minimum rise and fall_times */ if(t_rise < 1e-12) { t_rise = 1e-12; } if(t_fall < 1e-12) { t_fall = 1e-12; } /* the control array must be the same size as the pulse-width array */ if(cntl_size != pw_size) { cm_message_send(oneshot_array_error); return; } if(INIT == 1) { /* first time through, allocate memory */ cm_analog_alloc(T1,sizeof(double)); cm_analog_alloc(T2,sizeof(double)); cm_analog_alloc(T3,sizeof(double)); cm_analog_alloc(T4,sizeof(double)); cm_analog_alloc(SET,sizeof(int)); cm_analog_alloc(STATE,sizeof(int)); cm_analog_alloc(CLOCK,sizeof(double)); cm_analog_alloc(LOCKED,sizeof(int)); cm_analog_alloc(OUTPUT_OLD,sizeof(double)); /*** allocate static storage for *loc ***/ STATIC_VAR (locdata) = calloc (1 , sizeof ( Local_Data_t )); loc = STATIC_VAR (locdata); /* Allocate storage for breakpoint domain & pulse width values */ x = loc->control = (double *) calloc((size_t) cntl_size, sizeof(double)); if (!x) { cm_message_send(oneshot_allocation_error); return; } y = loc->pw = (double *) calloc((size_t) pw_size, sizeof(double)); if (!y) { cm_message_send(oneshot_allocation_error); return; } loc->tran_init = FALSE; } if(ANALYSIS == MIF_DC) { /* for DC, initialize values and set the output = output_low */ t1 = (double *) cm_analog_get_ptr(T1,0); t2 = (double *) cm_analog_get_ptr(T2,0); t3 = (double *) cm_analog_get_ptr(T3,0); t4 = (double *) cm_analog_get_ptr(T4,0); set = (int *) cm_analog_get_ptr(SET,0); state = (int *) cm_analog_get_ptr(STATE,0); locked = (int *) cm_analog_get_ptr(LOCKED,0); output_old = (double *) cm_analog_get_ptr(OUTPUT_OLD,0); /* initialize time and state values */ *t1 = -1; *t2 = -1; *t3 = -1; *t4 = -1; *set = 0; *locked = 0; *state = 0; *output_old = output_low; OUTPUT(out) = output_low; if(PORT_NULL(cntl_in) != 1) { PARTIAL(out,cntl_in) = 0; } if(PORT_NULL(clear) != 1) { PARTIAL(out,clear) = 0; } PARTIAL(out,clk) = 0; } else if(ANALYSIS == MIF_TRAN) { /* retrieve previous values, set them equal to the variables Note that these pointer values are immediately dumped into other variables because the previous values can't change- can't rewrite the old values */ t1 = (double *) cm_analog_get_ptr(T1,1); t2 = (double *) cm_analog_get_ptr(T2,1); t3 = (double *) cm_analog_get_ptr(T3,1); t4 = (double *) cm_analog_get_ptr(T4,1); set = (int*) cm_analog_get_ptr(SET,1); state = (int *) cm_analog_get_ptr(STATE,1); locked = (int *) cm_analog_get_ptr(LOCKED,1); clock = (double *) cm_analog_get_ptr(CLOCK,0); old_clock = (double *) cm_analog_get_ptr(CLOCK,1); output_old = (double *) cm_analog_get_ptr(OUTPUT_OLD,1); time1 = *t1; time2 = *t2; time3 = *t3; time4 = *t4; set1 = *set; state1 = *state; locked1 = *locked; if((PORT_NULL(clear) != 1) && (INPUT(clear) > trig_clk)) { time1 = -1; time2 = -1; time3 = -1; time4 = -1; set1 = 0; locked1 = 0; state1 = 0; OUTPUT(out) = output_low; } else { loc = STATIC_VAR (locdata); x = loc->control; y = loc->pw; if (!loc->tran_init) { *old_clock = 0.0; loc->tran_init = TRUE; } /* Retrieve control and pulse-width values. */ for (i=0; i= x[cntl_size-1]) { dout_din = (y[cntl_size-1] - y[cntl_size-2]) / (x[cntl_size-1] - x[cntl_size-2]); pw = y[cntl_size-1] + (cntl_input - x[cntl_size-1]) * dout_din; } else { /*** cntl_input within bounds of end midpoints... must determine position progressively & then calculate required output. ***/ for (i=0; i= x[i])) { /* Interpolate to get the correct pulse width value */ pw = ((cntl_input - x[i])/(x[i+1] - x[i]))* (y[i+1]-y[i]) + y[i]; } } } if(trig_pos_edge) { /* for a positive edge trigger */ if(!set1) { /* if set1=0, then look for 1. a rising edge trigger 2. the clock to be higher than the trigger value */ if((*clock > *old_clock) && (*clock > trig_clk)) { state1 = 1; set1 = 1; } } else /* look for a neg edge before resetting the trigger */ if((*clock < *old_clock) && (*clock < trig_clk)) { set1 = 0; } } else { /* This stuff belongs to the case where a negative edge is needed */ if(!set1) { if((*clock < *old_clock) && (*clock < trig_clk)) { state1 = 1; set1 = 1; } } else /* look for a pos edge before resetting the trigger */ if((*clock > *old_clock) && (*clock > trig_clk)) { set1 = 0; } } /* I can only set the breakpoints if the state1 is high and the output is low, and locked = 0 */ if((state1) && (*output_old - output_low < 1e-20) && (!locked1)) { /* if state1 is 1, and the output is low, then set the time points and the temporary breakpoints */ time1 = TIME + del_rise; time2 = time1 + t_rise; time3 = time2 + pw + del_fall; time4 = time3 + t_fall; if(PARAM(retrig) == MIF_FALSE) { locked1 = 1; } if((TIME < time1) || (T(1) == 0)) { cm_analog_set_perm_bkpt(time1); } cm_analog_set_perm_bkpt(time2); cm_analog_set_perm_bkpt(time3); cm_analog_set_perm_bkpt(time4); /* reset the state value */ state1 = 0; OUTPUT(out) = output_low; } else /* state1 = 1, and the output is high, then just set time3 and time4. Temporary breakpoints don't do for now, so use permanent breakpoints. This implies that the oneshot was retriggered */ if((state1) && (*output_old - output_hi < 1e-20) && (!locked1)) { time3 = TIME + pw + del_rise + del_fall + t_rise; time4 = time3 + t_fall; cm_analog_set_perm_bkpt(time3); cm_analog_set_perm_bkpt(time4); OUTPUT(out) = output_hi; state1 = 0; } /* reset the state if it's 1 and the locked flag is 1. This means that the clock tried to retrigger the oneshot, but the retrig flag prevented it from doing so */ if((state1) && (locked1)) { state1 = 0; } /* set the value for the output depending on the current time, and the values of time1, time2, time3, and time4 */ if(TIME < time1) { OUTPUT(out) = output_low; } else if((time1 <= TIME) && (TIME < time2)) { OUTPUT(out) = output_low + ((TIME - time1)/(time2 - time1))* (output_hi - output_low); } else if((time2 <= TIME) && (TIME < time3)) { OUTPUT(out) = output_hi; } else if((time3 <= TIME) && (TIME < time4)) { OUTPUT(out) = output_hi + ((TIME - time3)/(time4 - time3))* (output_low - output_hi); } else { OUTPUT(out) = output_low; /* oneshot can now be retriggered, set locked to 0 */ if(PARAM(retrig) == MIF_FALSE) { locked1 = 0; } } } /* set the variables which need to be stored for the next iteration */ t1 = (double *) cm_analog_get_ptr(T1,0); t2 = (double *) cm_analog_get_ptr(T2,0); t3 = (double *) cm_analog_get_ptr(T3,0); t4 = (double *) cm_analog_get_ptr(T4,0); set = (int *) cm_analog_get_ptr(SET,0); locked = (int *) cm_analog_get_ptr(LOCKED,0); state = (int *) cm_analog_get_ptr(STATE,0); output_old = (double *) cm_analog_get_ptr(OUTPUT_OLD,0); *t1 = time1; *t2 = time2; *t3 = time3; *t4 = time4; *set = set1; *state = state1; *output_old = OUTPUT(out); *locked = locked1; if(PORT_NULL(cntl_in) != 1) { PARTIAL(out,cntl_in) = 0; } if(PORT_NULL(clear) != 1) { PARTIAL(out,clear) = 0; } PARTIAL(out,clk) = 0 ; } else { /* Output AC Gain */ /* This model has no AC capability */ ac_gain.real = 0.0; ac_gain.imag= 0.0; AC_GAIN(out,clk) = ac_gain; } } ngspice-26/src/xspice/icm/analog/oneshot/ifspec.ifs0000644000265600020320000001010512264261473021754 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 20 Mar 1991 Harry Li SUMMARY This file contains the interface specification file for the analog oneshot code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_oneshot Spice_Model_Name: oneshot Description: "one-shot" PORT_TABLE: Port_Name: clk cntl_in Description: "clock input" "input" Direction: in in Default_Type: v v Allowed_Types: [v,vd,vnam,i,id] [v,vnam,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no yes PORT_TABLE: Port_Name: clear out Description: "clear signal" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,vnam,i,id] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: yes no PARAMETER_TABLE: Parameter_Name: cntl_array pw_array Description: "control in array" "pulse width array" Data_Type: real real Default_Value: 0.0 1.0e-6 Limits: - [0 -] Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: clk_trig pos_edge_trig Description: "clock trigger value" "pos/neg edge trigger switch" Data_Type: real boolean Default_Value: 0.5 TRUE Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: out_low out_high Description: "output low value" "output high value" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: rise_time Description: "output rise time" Data_Type: real Default_Value: 1.0e-9 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: rise_delay fall_delay Description: "output delay from trigger" "output delay from pw" Data_Type: real real Default_Value: 1.0e-9 1.0e-9 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: fall_time retrig Description: "output rise time" "retrigger switch" Data_Type: real boolean Default_Value: 1.0e-9 FALSE Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes STATIC_VAR_TABLE: Static_Var_Name: locdata Description: "local static data" Data_Type: pointer ngspice-26/src/xspice/icm/analog/s_xfer/0000755000265600020320000000000012264261473017612 5ustar andreasadminngspice-26/src/xspice/icm/analog/s_xfer/cfunc.mod0000644000265600020320000005105412264261473021416 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE s_xfer/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 17 Mar 1991 Jeffrey P. Murray MODIFICATIONS 18 Apr 1991 Harry Li 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the s-domain transfer function (s_xfer) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================= FUNCTION cm_complex_div AUTHORS 27 Sept 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY Performs a complex division. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE A Mif_Complex_t value representing the result of the complex division. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ #include /*=== Static CM_COMPLEX_DIV ROUTINE ===*/ /**** Cm_complex_div Function - FAKE ***********/ /* */ /* Function will not be used in finished */ /* system...provides a stub for performing */ /* a simple complex division. */ /* 12/3/90 JPM */ /* */ /***********************************************/ static Mif_Complex_t cm_complex_div(Mif_Complex_t x, Mif_Complex_t y) { double mag_x, phase_x, mag_y, phase_y; Mif_Complex_t out; mag_x = sqrt( (x.real * x.real) + (x.imag * x.imag) ); phase_x = atan2(x.imag, x.real); mag_y = sqrt( (y.real * y.real) + (y.imag * y.imag) ); phase_y = atan2(y.imag, y.real); mag_x = mag_x/mag_y; phase_x = phase_x - phase_y; out.real = mag_x * cos(phase_x); out.imag = mag_x * sin(phase_x); return out; } /*============================================================================== FUNCTION cm_s_xfer() AUTHORS 17 Mar 1991 Jeffrey P. Murray MODIFICATIONS 18 Apr 1991 Harry Li 27 Sept 1991 Jeffrey P. Murray SUMMARY This function implements the s_xfer code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_S_XFER ROUTINE ===*/ /**************************************** * S-Domain Transfer Function - * * Code Body * * * * Last Modified - 9/27/91 JPM * ****************************************/ void cm_s_xfer(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double *out; /* pointer to the output */ double *in; /* pointer to the input */ double in_offset; /* input offset */ double *gain; /* pointer to the gain */ double **den_coefficient; /* dynamic array that holds the denominator coefficients */ double **old_den_coefficient;/* dynamic array that holds the old denonminator coefficients */ double **num_coefficient; /* dynamic array that holds the numerator coefficients */ double **old_num_coefficient;/* dynamic array that holds the old numerator coefficients */ double factor; /* gain factor in case the highest denominator coefficient is not 1 */ double **integrator; /* outputs of the integrators */ double **old_integrator; /* previous integrator outputs */ double null; /* dummy pointer for use with the integrate function */ double pout_pin; /* partial out wrt in */ /*double total_gain;*/ /* not used, currently-used with ITP stuff */ double temp; /* temporary variable used with the correct type of AC value */ double frac; /* holds fractional part of a divide */ double divide_integer; /* integer part of a modf used in AC */ double denormalized_freq; /* denormalization constant...the nominal corner or center frequencies specified by the model coefficients will be denormalized by this amount. Thus, if coefficients were obtained which specified a 1 rad/sec cornere frequency, specifying a value of 1000.0 for denormalized_freq will cause the model to shift the corner freq. to 2.0 * pi * 1000.0 */ double *old_gain; /* pointer to the gain if the highest order denominator coefficient is not factored out */ Mif_Complex_t ac_gain, acc_num, acc_den; int i; /* generic loop counter index */ int den_size; /* size of the denominator coefficient array */ int num_size; /* size of the numerator coefficient array */ char *num_size_error="\n***ERROR***\nS_XFER: Numerator coefficient array size greater than\ndenominator coefficiant array size.\n"; /** Retrieve frequently used parameters (used by all analyses)... **/ in_offset = PARAM(in_offset); num_size = PARAM_SIZE(num_coeff); den_size = PARAM_SIZE(den_coeff); if ( PARAM_NULL(denormalized_freq) ) { denormalized_freq = 1.0; } else { denormalized_freq = PARAM(denormalized_freq); } if ( num_size > den_size ) { cm_message_send(num_size_error); return; } /** Test for INIT; if so, allocate storage, otherwise, retrieve previous **/ /** timepoint input values as necessary in subsequent analysis sections... **/ if (INIT==1) { /* First pass...allocate storage for previous values... */ /* Allocate rotational storage for integrator outputs, in & out */ /***** The following two lines may be unnecessary in the final version *****/ /* We have to allocate memory and use cm_analog_alloc, because the ITP variables are not functional */ integrator = (double **) calloc((size_t) den_size, sizeof(double *)); old_integrator = (double **) calloc((size_t) den_size, sizeof(double *)); /* Allocate storage for coefficient values */ den_coefficient = (double **) calloc((size_t) den_size, sizeof(double *)); old_den_coefficient = (double **) calloc((size_t) den_size, sizeof(double *)); num_coefficient = (double **) calloc((size_t) num_size, sizeof(double *)); old_num_coefficient = (double **) calloc((size_t) num_size, sizeof(double *)); for (i=0; i < (2*den_size + num_size + 3); i++) cm_analog_alloc(i,sizeof(double)); /* ITP_VAR_SIZE(den) = den_size; */ /* gain = (double *) calloc(1,sizeof(double)); ITP_VAR(total_gain) = gain; ITP_VAR_SIZE(total_gain) = 1.0; */ // Retrieve pointers for (i=0; i0; i--) { cm_analog_integrate(*(integrator[i]),(integrator[i-1]),&null); } /* Calculate the output based on the new integrator values... */ *out = 0.0; for (i=0; i 0.0 ) { /* Negative coefficient */ /* values for this iteration. */ if (frac > 0.0 ) { /** Odd Powers of "s" **/ acc_num.imag = acc_num.imag - *(num_coefficient[i]) * pow(RAD_FREQ,i) * (*gain); } else { /** Even Powers of "s" **/ acc_num.real = acc_num.real - *(num_coefficient[i]) * pow(RAD_FREQ,i) * (*gain); } } else { /* Positive coefficient values for this iteration */ if (frac> 0.0 ) { /** Odd Powers of "s" **/ acc_num.imag = acc_num.imag + *(num_coefficient[i]) * pow(RAD_FREQ,i) * (*gain); } else { /** Even Powers of "s" **/ acc_num.real = acc_num.real + *(num_coefficient[i]) * pow(RAD_FREQ,i) * (*gain); } } } /*** Calculate Denominator Real & Imaginary Components... ***/ acc_den.real = 0.0; acc_den.imag = 0.0; for (i=0; i 0.0 ) { /* Negative coefficient */ /* values for this iteration. */ if (frac > 0.0 ) { /** Odd Powers of "s" **/ acc_den.imag = acc_den.imag - *(den_coefficient[i]) * pow(RAD_FREQ,i); } else { /** Even Powers of "s" **/ acc_den.real = acc_den.real - *(den_coefficient[i]) * pow(RAD_FREQ,i); } } else { /* Positive coefficient values for this iteration */ if (frac > 0.0 ) { /** Odd Powers of "s" **/ acc_den.imag = acc_den.imag + *(den_coefficient[i]) * pow(RAD_FREQ,i); } else { /** Even Powers of "s" **/ acc_den.real = acc_den.real + *(den_coefficient[i]) * pow(RAD_FREQ,i); } } } /* divide numerator values by denominator values */ ac_gain = cm_complex_div(acc_num, acc_den); AC_GAIN(out,in) = ac_gain; } /* free all allocated memory */ if(integrator) free(integrator); if(old_integrator) free(old_integrator); if(den_coefficient) free(den_coefficient); if(old_den_coefficient) free(old_den_coefficient); if(num_coefficient) free(num_coefficient); if(old_num_coefficient) free(old_num_coefficient); } ngspice-26/src/xspice/icm/analog/s_xfer/ifspec.ifs0000644000265600020320000000515312264261473021572 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 27 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog s-domain transfer function (s_xfer) code model. ===============================================================================*/ NAME_TABLE: Spice_Model_Name: s_xfer C_Function_Name: cm_s_xfer Description: "s-domain transfer function block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain Description: "input offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: num_coeff den_coeff Description: "numerator poly coef" "denominator poly coef" Data_Type: real real Default_Value: - - Limits: - - Vector: yes yes Vector_Bounds: [1 -] [1 -] Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: int_ic Description: "int stage init. cond" Data_Type: real Default_Value: 0.0 Limits: - Vector: yes Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: denormalized_freq Description: "frequency (radians/second) at which to denormalize coefficients" Data_Type: real Default_Value: 1.0 Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/analog/s_xfer/s_xfer.h0000644000265600020320000000107612264261473021255 0ustar andreasadmin /***************************************************/ /****** Structures, etc. for int model. ******/ /****** 11/6/90 JPM ******/ /***************************************************/ /***** Value Definitions ******************************************/ #define INT1 1 #define INT2 2 /***** Define Macros **************************************/ /***** Structure Definitions *************************************/ /***** Function Prototype Definitions ***************************************/ ngspice-26/src/xspice/icm/analog/climit/0000755000265600020320000000000012264261473017605 5ustar andreasadminngspice-26/src/xspice/icm/analog/climit/cfunc.mod0000644000265600020320000001673112264261473021414 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE climit/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This file contains the functional description of the adc_bridge code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); void cm_smooth_discontinuity(); CMmacros.h cm_message_send(); REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION cm_climit() AUTHORS 6 June 1991 Jeffrey P. Murray MODIFICATIONS 26 Sept 1991 Jeffrey P. Murray SUMMARY This function implements the climit code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); void cm_smooth_discontinuity(); CMmacros.h cm_message_send(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_CLIMIT ROUTINE ===*/ void cm_climit(ARGS) /* structure holding parms, inputs, outputs, etc. */ { /* Define error message string constants */ char *climit_range_error = "\n**** ERROR ****\n* CLIMIT function linear range less than zero. *\n"; double lower_delta, /* lower delta value parameter */ upper_delta, /* upper delta value parameter */ limit_range, /* range of output below (out_upper_limit - upper_delta) or above (out_lower_limit + lower_delta) within which smoothing will be applied */ gain, /* gain parameter */ threshold_upper, /* = out_upper_limit - upper_delta */ threshold_lower, /* = out_lower_limit + lower_delta */ linear_range, /* = threshold_upper - threshold_lower */ out_lower_limit, /* output lower limit parameter */ out_upper_limit, /* output upper limit parameter */ out, /* originally-calculated output value */ limited_out, /* output value after limiting */ pout_pin, /* partial derivative of output w.r.t.input */ pout_pcntl_upper, /* partial derivative of output w.r.t. cntl_upper input */ pout_pcntl_lower, /* partial derivative of output w.r.t. cntl_lower input */ junk; /* dummy variable */ Mif_Complex_t ac_gain; /* AC gain */ /* Retrieve frequently used parameters... */ lower_delta = PARAM(lower_delta); upper_delta = PARAM(upper_delta); limit_range = PARAM(limit_range); gain = PARAM(gain); /* Find Upper & Lower Limits */ out_lower_limit = INPUT(cntl_lower) + lower_delta; out_upper_limit = INPUT(cntl_upper) - upper_delta; if (PARAM(fraction) == MIF_TRUE) /* Set range to absolute value */ limit_range = limit_range * (out_upper_limit - out_lower_limit); threshold_upper = out_upper_limit - /* Set Upper Threshold */ limit_range; threshold_lower = out_lower_limit + /* Set Lower Threshold */ limit_range; linear_range = threshold_upper - threshold_lower; /* Test the linear region & make sure there IS one... */ if (linear_range < 0.0) { /* This INIT test keeps the models from outputting an error message the first time through when all the inputs are initialized to zero */ if( (INIT != 1) && (0.0 != TIME) ){ cm_message_send(climit_range_error); } limited_out = 0.0; pout_pin = 0.0; pout_pcntl_lower = 0.0; pout_pcntl_upper = 0.0; return; } /* Compute Un-Limited Output */ out = gain * (PARAM(in_offset) + INPUT(in)); if (out < threshold_lower) { /* Limit Out @ Lower Bound */ pout_pcntl_upper= 0.0; if (out > (out_lower_limit - limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_lower_limit,out_lower_limit, limit_range,0.0,1.0,&limited_out, &pout_pin); pout_pin = gain * pout_pin; cm_smooth_discontinuity(out,out_lower_limit,1.0,threshold_lower, 0.0,&pout_pcntl_lower,&junk); } else { /* Hard-Limited Region */ limited_out = out_lower_limit; pout_pin = 0.0; pout_pcntl_lower = 1.0; } } else { if (out > threshold_upper) { /* Limit Out @ Upper Bound */ pout_pcntl_lower= 0.0; if (out < (out_upper_limit+limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_upper_limit,out_upper_limit, limit_range,1.0,0.0,&limited_out, &pout_pin); pout_pin = gain * pout_pin; cm_smooth_discontinuity(out,threshold_upper,0.0,out_upper_limit, 1.0,&pout_pcntl_upper,&junk); } else { /* Hard-Limited Region */ limited_out = out_upper_limit; pout_pin = 0.0; pout_pcntl_upper = 1.0; } } else { /* No Limiting Needed */ limited_out = out; pout_pin = gain; pout_pcntl_lower = 0.0; pout_pcntl_upper = 0.0; } } if (ANALYSIS != MIF_AC) { /* DC & Transient Analyses */ OUTPUT(out) = limited_out; PARTIAL(out,in) = pout_pin; PARTIAL(out,cntl_lower) = pout_pcntl_lower; PARTIAL(out,cntl_upper) = pout_pcntl_upper; } else { /* AC Analysis */ ac_gain.real = pout_pin; ac_gain.imag= 0.0; AC_GAIN(out,in) = ac_gain; ac_gain.real = pout_pcntl_lower; ac_gain.imag= 0.0; AC_GAIN(out,cntl_lower) = ac_gain; ac_gain.real = pout_pcntl_upper; ac_gain.imag= 0.0; AC_GAIN(out,cntl_upper) = ac_gain; } } ngspice-26/src/xspice/icm/analog/climit/ifspec.ifs0000644000265600020320000000502212264261473021560 0ustar andreasadmin /* INTERFACE TABLE FOR CODE MODEL CLIMIT */ NAME_TABLE: C_Function_Name: cm_climit Spice_Model_Name: climit Description: "controlled limiter block" PORT_TABLE: Port_Name: in cntl_upper Description: "input" "upper lim. control input" Direction: in in Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id,vnam] Vector: no no Vector_Bounds: - - Null_Allowed: no no PORT_TABLE: Port_Name: cntl_lower out Description: "lower limit control input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain Description: "input offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: upper_delta lower_delta Description: "output upper delta" "output lower delta" Data_Type: real real Default_Value: 0.0 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: limit_range fraction Description: "upper & lower sm. range" "smoothing %/abs switch" Data_Type: real boolean Default_Value: 1.0e-6 FALSE Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/multi_input_pwl/0000755000265600020320000000000012264261473021557 5ustar andreasadminngspice-26/src/xspice/icm/analog/multi_input_pwl/cfunc.mod0000644000265600020320000001013412264261473023355 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE multi_input_pwl/cfunc.mod Copyright 2005 Intrinsity, Inc. Austin, TX 78738 All Rights Reserved AUTHORS 20 Oct 2005 Phil Barker MODIFICATIONS 20 Oct 2005 Phil Barker SUMMARY This file contains the model-specific routines used to functionally describe the multi-input gate pwl. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_multi_input_pwl() AUTHORS 20 Oct 2005 Phil Barker MODIFICATIONS 20 Oct 2005 Phil Barker SUMMARY This function implements the multi-input gate pwl code model. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_MULTI_INPUT_PWL ROUTINE ===*/ #include #include #include static double get_smallest_input( ARGS ) { double smallest = INPUT(in[0]); int size = PORT_SIZE(in); int i; for ( i = 1; i < size; i++ ) if ( INPUT(in[i]) < smallest ) smallest = INPUT(in[i]); return smallest; } static double get_largest_input( ARGS ) { double largest = INPUT(in[0]); int size = PORT_SIZE(in); int i; for ( i = 1; i < size; i++ ) if ( INPUT(in[i]) > largest ) largest = INPUT(in[i]); return largest; } static double get_slope( ARGS, int i ) { return ( PARAM(y[i]) - PARAM(y[i-1]) )/( PARAM(x[i]) - PARAM(x[i-1]) ); } static double y_intercept( ARGS, int i, double slope ) { return ( PARAM(y[i]) - slope*PARAM(x[i]) ); } static double get_output( ARGS, double x ) { int size = PARAM_SIZE(x); double result = 0; double slope = 0; int i; /* check if x beyond specified limits */ if ( x <= PARAM(x[0]) ) return PARAM(y[0]); if ( x >= PARAM(x[size-1]) ) return PARAM(y[size-1]); for ( i = 1; i < size; i++ ) if ( x > PARAM(x[i-1]) && x <= PARAM(x[i]) ) { slope = get_slope( mif_private, i ); result = slope*x + y_intercept( mif_private, i, slope ); break; } return result; } void cm_multi_input_pwl(ARGS) { const char* model = ( PARAM_NULL(model) == 1 ) ? "and" : PARAM(model); double output; if ( ANALYSIS == TRANSIENT || ANALYSIS == DC ) { if ( strcmp( model, "and" ) != 0 && strcmp( model, "or" ) != 0 && strcmp( model, "nand" ) != 0 && strcmp( model, "nor" ) != 0 ) { fprintf( stderr, "ERROR(cm_multi_input_pwl): unknown gate model type '%s'; expecting 'and|or|nand|nor'.\n", model ); exit(-1); } if ( PARAM_SIZE(x) != PARAM_SIZE(y) ) { fprintf( stderr, "ERROR(cm_multi_input_pwl): 'x' and 'y' input vectors are not the same size!\n" ); exit(-1); } /* Iterate through each input and find output value and/nand: controlling input is chosen on the basis of the smallest value or/nor: controlling input is chosen on the basis of the largest value */ if (strstr(model, "and")) output = get_output(mif_private, get_smallest_input(mif_private)); else output = get_output(mif_private, get_largest_input(mif_private)); OUTPUT(out) = output; } } ngspice-26/src/xspice/icm/analog/multi_input_pwl/ifspec.ifs0000644000265600020320000000302212264261473023530 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 2005 Intrinsity, Inc. Austin, TX 78738 All Rights Reserved AUTHORS 20 Oct 2005 Phil Barker SUMMARY This file contains the interface specification file for the analog multi-input gate pwl code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_multi_input_pwl Spice_Model_Name: multi_input_pwl Description: "multi_input_pwl block" PORT_TABLE: Port_Name: in out Description: "input array" "output" Direction: in out Default_Type: vd vd Allowed_Types: [vd,id] [vd,id] Vector: yes no Vector_Bounds: [2 -] - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: x y model Description: "x array" "y array" "model type" Data_Type: real real string Default_Value: 0.0 0.0 "and" Limits: - - - Vector: yes yes no Vector_Bounds: [2 -] [2 -] - Null_Allowed: no no yes ngspice-26/src/xspice/icm/analog/ilimit/0000755000265600020320000000000012264261473017613 5ustar andreasadminngspice-26/src/xspice/icm/analog/ilimit/cfunc.mod0000644000265600020320000003277712264261473021432 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE ilimit/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the ilimit code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); void cm_smooth_discontinuity(); void cm_climit_fcn() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_ilimit() AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the ilimit code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); void cm_smooth_discontinuity(); void cm_climit_fcn() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_ILIMIT ROUTINE ===*/ void cm_ilimit(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double in_offset,gain,r_out_source,r_out_sink,i_limit_source, i_limit_sink,v_pwr_range,i_source_range,i_sink_range, r_out_domain,/*out_lower_limit,out_upper_limit,*/veq,pveq_pvin, pveq_pvpos,pveq_pvneg,r_out,pr_out_px,i_out,i_threshold_lower, i_threshold_upper,i_pos_pwr,pi_out_pvin,pi_pos_pvneg, pi_pos_pvpos,pi_pos_pvout,i_neg_pwr,pi_neg_pvin,pi_neg_pvneg, pi_neg_pvpos,pi_neg_pvout,vout,pi_out_plimit,pi_out_pvout, pi_out_ppos_pwr,pi_out_pneg_pwr,pi_pos_pvin,pi_neg_plimit, pi_pos_plimit,pos_pwr_in,neg_pwr_in; Mif_Complex_t ac_gain; /* Retrieve frequently used parameters... */ in_offset = PARAM(in_offset); gain = PARAM(gain); r_out_source = PARAM(r_out_source); r_out_sink = PARAM(r_out_sink); i_limit_source = PARAM(i_limit_source); i_limit_sink = PARAM(i_limit_sink); v_pwr_range = PARAM(v_pwr_range); i_source_range = PARAM(i_source_range); i_sink_range = PARAM(i_sink_range); r_out_domain = PARAM(r_out_domain); /* Retrieve frequently used inputs... */ vout = INPUT(out); /* Test to see if pos_pwr or neg_pwr are connected... */ /* if not, assign large voltage values to the variables */ /* pos_pwr andneg_pwr... */ if ( PORT_NULL(pos_pwr) ) { pos_pwr_in = 1.0e6; } else { pos_pwr_in = INPUT(pos_pwr); } if ( PORT_NULL(neg_pwr) ) { neg_pwr_in = -1.0e6; } else { neg_pwr_in = INPUT(neg_pwr); } /* Compute Veq plus derivatives using climit_fcn */ if(INIT != 1){ /* If reasonable power and voltage values exist (i.e., not INIT)... */ /* then calculate expected equivalent voltage values and derivs. */ cm_climit_fcn(INPUT(in), in_offset, pos_pwr_in, neg_pwr_in, 0.0, 0.0, v_pwr_range, gain, MIF_FALSE, &veq, &pveq_pvin, &pveq_pvneg, &pveq_pvpos); } else { /* Initialization pass...set nominal values */ veq = (pos_pwr_in - neg_pwr_in) / 2.0; pveq_pvin = 0.0; pveq_pvpos = 0.0; pveq_pvneg = 0.0; } /* Calculate Rout */ if (r_out_source == r_out_sink) { /* r_out constant => no calculation necessary */ r_out = r_out_source; pr_out_px = 0.0; } else { /* Interpolate smoothly between sourcing & sinking values */ cm_smooth_discontinuity(veq - vout, -r_out_domain, r_out_sink, r_out_domain, r_out_source, &r_out, &pr_out_px); } /* Calculate i_out & derivatives */ i_threshold_lower = -i_limit_sink + i_sink_range; i_threshold_upper = i_limit_source - i_source_range; i_out = (veq - vout) / r_out; pi_out_pvin = (pveq_pvin/r_out - veq*pr_out_px*pveq_pvin/ (r_out*r_out)); pi_out_pvout = (-1.0/r_out - vout*pr_out_px/(r_out*r_out)); pi_out_ppos_pwr = (pveq_pvpos/r_out - veq*pr_out_px*pveq_pvpos/ (r_out*r_out)); pi_out_pneg_pwr = (pveq_pvneg/r_out - veq*pr_out_px*pveq_pvneg/ (r_out*r_out)); /* Preset i_pos_pwr & i_neg_pwr & partials to 0.0 */ i_pos_pwr = 0.0; pi_pos_pvin = 0.0; pi_pos_pvneg = 0.0; pi_pos_pvpos = 0.0; pi_pos_pvout = 0.0; i_neg_pwr = 0.0; pi_neg_pvin = 0.0; pi_neg_pvneg = 0.0; pi_neg_pvpos = 0.0; pi_neg_pvout = 0.0; /* Determine operating point of i_out for limiting */ if (i_out < 0.0) { /* i_out sinking */ if (i_out < i_threshold_lower) { if (i_out < (-i_limit_sink-i_sink_range)) { /* i_out lower-limited */ i_out = -i_limit_sink; i_neg_pwr = -i_out; pi_out_pvin = 0.0; pi_out_pvout = 0.0; pi_out_ppos_pwr = 0.0; pi_out_pneg_pwr = 0.0; } else { /* i_out in lower smoothing region */ cm_smooth_corner(i_out,-i_limit_sink,-i_limit_sink,i_sink_range, 0.0,1.0,&i_out,&pi_out_plimit); pi_out_pvin = pi_out_pvin * pi_out_plimit; pi_out_pvout = pi_out_pvout * pi_out_plimit; pi_out_ppos_pwr = pi_out_ppos_pwr * pi_out_plimit; pi_out_pneg_pwr = pi_out_pneg_pwr * pi_out_plimit; i_neg_pwr = -i_out; pi_neg_pvin = -pi_out_pvin; pi_neg_pvneg = -pi_out_pneg_pwr; pi_neg_pvpos = -pi_out_ppos_pwr; pi_neg_pvout = -pi_out_pvout; } } else { /* i_out in lower linear region...calculate i_neg_pwr */ if (i_out > -2.0*i_sink_range) { /* i_out near 0.0...smooth i_neg_pwr */ cm_smooth_corner(i_out,-i_sink_range,0.0,i_sink_range,1.0,0.0, &i_neg_pwr,&pi_neg_plimit); i_neg_pwr = -i_neg_pwr; pi_neg_pvin = -pi_out_pvin * pi_neg_plimit; pi_neg_pvneg = -pi_out_pneg_pwr * pi_neg_plimit; pi_neg_pvpos = -pi_out_ppos_pwr * pi_neg_plimit; pi_neg_pvout = -pi_out_pvout * pi_neg_plimit; } else { i_neg_pwr = -i_out; /* Not near i_out=0.0 => i_neg_pwr=-i_out */ pi_neg_pvin = -pi_out_pvin; pi_neg_pvneg = -pi_out_pneg_pwr; pi_neg_pvpos = -pi_out_ppos_pwr; pi_neg_pvout = -pi_out_pvout; } } } else { /* i_out sourcing */ if (i_out > i_threshold_upper) { if (i_out > (i_limit_source + i_source_range)) { /* i_out upper-limited */ i_out = i_limit_source; i_pos_pwr = -i_out; pi_out_pvin = 0.0; pi_out_pvout = 0.0; pi_out_ppos_pwr = 0.0; pi_out_pneg_pwr = 0.0; } else { /* i_out in upper smoothing region */ cm_smooth_corner(i_out,i_limit_source,i_limit_source,i_sink_range, 1.0,0.0,&i_out,&pi_out_plimit); pi_out_pvin = pi_out_pvin * pi_out_plimit; pi_out_pvout = pi_out_pvout * pi_out_plimit; pi_out_ppos_pwr = pi_out_ppos_pwr * pi_out_plimit; pi_out_pneg_pwr = pi_out_pneg_pwr * pi_out_plimit; i_pos_pwr = -i_out; pi_pos_pvin = -pi_out_pvin; pi_pos_pvneg = -pi_out_pneg_pwr; pi_pos_pvpos = -pi_out_ppos_pwr; pi_pos_pvout = -pi_out_pvout; } } else { /* i_out in upper linear region...calculate i_pos_pwr */ if (i_out < 2.0*i_source_range) { /* i_out near 0.0...smooth i_pos_pwr */ cm_smooth_corner(i_out,i_source_range,0.0,i_source_range,0.0,1.0, &i_pos_pwr,&pi_pos_plimit); i_pos_pwr = -i_pos_pwr; pi_pos_pvin = -pi_out_pvin * pi_pos_plimit; pi_pos_pvneg = -pi_out_pneg_pwr * pi_pos_plimit; pi_pos_pvpos = -pi_out_ppos_pwr * pi_pos_plimit; pi_pos_pvout = -pi_out_pvout * pi_pos_plimit; } else { /* Not near i_out=0.0 => i_pos_pwr=-i_out */ i_pos_pwr = -i_out; pi_pos_pvin = -pi_out_pvin; pi_pos_pvneg = -pi_out_pneg_pwr; pi_pos_pvpos = -pi_out_ppos_pwr; pi_pos_pvout = -pi_out_pvout; } } } if (ANALYSIS != MIF_AC) { /* DC & Transient Analyses */ /* Debug line...REMOVE FOR FINAL VERSION!!! */ /*OUTPUT(t1) = veq; OUTPUT(t2) = r_out; OUTPUT(t3) = pveq_pvin; OUTPUT(t4) = pveq_pvpos; OUTPUT(t5) = pveq_pvneg;*/ OUTPUT(out) = -i_out; /* Remember...current polarity must be */ PARTIAL(out,in) = -pi_out_pvin; /* reversed for SPICE...all previous code */ PARTIAL(out,out) = -pi_out_pvout; /* assumes i_out positive when EXITING */ /* the model and negative when entering. */ /* SPICE assumes the opposite, so a */ /* minus sign is added to all currents */ /* and current partials to compensate for */ /* this fact.... JPM */ if ( !PORT_NULL(neg_pwr) ) { OUTPUT(neg_pwr) = -i_neg_pwr; PARTIAL(neg_pwr,in) = -pi_neg_pvin; PARTIAL(neg_pwr,out) = -pi_neg_pvout; if(!PORT_NULL(pos_pwr)){ PARTIAL(neg_pwr,pos_pwr) = -pi_neg_pvpos; } PARTIAL(neg_pwr,neg_pwr) = -pi_neg_pvneg; PARTIAL(out,neg_pwr) = -pi_out_pneg_pwr; } if ( !PORT_NULL(pos_pwr) ) { OUTPUT(pos_pwr) = -i_pos_pwr; PARTIAL(pos_pwr,in) = -pi_pos_pvin; PARTIAL(pos_pwr,out) = -pi_pos_pvout; PARTIAL(pos_pwr,pos_pwr) = -pi_pos_pvpos; if ( !PORT_NULL(neg_pwr) ) { PARTIAL(pos_pwr,neg_pwr) = -pi_pos_pvneg; } PARTIAL(out,pos_pwr) = -pi_out_ppos_pwr; } } else { /* AC Analysis */ ac_gain.real = -pi_out_pvin; ac_gain.imag= 0.0; AC_GAIN(out,in) = ac_gain; ac_gain.real = -pi_out_pvout; ac_gain.imag= 0.0; AC_GAIN(out,out) = ac_gain; if ( !PORT_NULL(neg_pwr) ) { ac_gain.real = -pi_neg_pvin; ac_gain.imag= 0.0; AC_GAIN(neg_pwr,in) = ac_gain; ac_gain.real = -pi_out_pneg_pwr; ac_gain.imag= 0.0; AC_GAIN(out,neg_pwr) = ac_gain; ac_gain.real = -pi_neg_pvout; ac_gain.imag= 0.0; AC_GAIN(neg_pwr,out) = ac_gain; ac_gain.real = -pi_neg_pvpos; ac_gain.imag= 0.0; AC_GAIN(neg_pwr,pos_pwr) = ac_gain; ac_gain.real = -pi_neg_pvneg; ac_gain.imag= 0.0; AC_GAIN(neg_pwr,neg_pwr) = ac_gain; } if ( !PORT_NULL(pos_pwr) ) { ac_gain.real = -pi_pos_pvin; ac_gain.imag= 0.0; AC_GAIN(pos_pwr,in) = ac_gain; ac_gain.real = -pi_out_ppos_pwr; ac_gain.imag= 0.0; AC_GAIN(out,pos_pwr) = ac_gain; ac_gain.real = -pi_pos_pvout; ac_gain.imag= 0.0; AC_GAIN(pos_pwr,out) = ac_gain; ac_gain.real = -pi_pos_pvpos; ac_gain.imag= 0.0; AC_GAIN(pos_pwr,pos_pwr) = ac_gain; ac_gain.real = -pi_pos_pvneg; ac_gain.imag= 0.0; AC_GAIN(pos_pwr,neg_pwr) = ac_gain; } } } ngspice-26/src/xspice/icm/analog/ilimit/ifspec.ifs0000644000265600020320000000754012264261473021575 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog ilimit code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_ilimit Spice_Model_Name: ilimit Description: "current limiter block" PORT_TABLE: Port_Name: in pos_pwr Description: "input" "positive power supply" Direction: in inout Default_Type: v g Allowed_Types: [v,vd,i,id,vnam] [g,gd] Vector: no no Vector_Bounds: - - Null_Allowed: no yes PORT_TABLE: Port_Name: neg_pwr out Description: "negative power supply" "output" Direction: inout inout Default_Type: g g Allowed_Types: [g,gd] [g,gd] Vector: no no Vector_Bounds: - - Null_Allowed: yes no PARAMETER_TABLE: Parameter_Name: in_offset gain Description: "input offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: r_out_source r_out_sink Description: "sourcing resistance" "sinking resistance" Data_Type: real real Default_Value: 1.0 1.0 Limits: [1e-9 1e9] [1e-9 1e9] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: i_limit_source i_limit_sink Description: "current sourcing limit" "current sinking limit" Data_Type: real real Default_Value: 10.0e-3 10.0e-3 Limits: [1e-12 -] [1e-12 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: v_pwr_range i_source_range Description: "pwr. smoothing range" "sourcing cur sm. rng" Data_Type: real real Default_Value: 1e-6 1e-9 Limits: [1e-15 -] [1e-15 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: i_sink_range r_out_domain Description: "sinking cur sm. rng" "output resistance sm. domain" Data_Type: real real Default_Value: 1e-9 1e-9 Limits: [1e-15 -] [1e-15 -] Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/sine/0000755000265600020320000000000012264261473017262 5ustar andreasadminngspice-26/src/xspice/icm/analog/sine/cfunc.mod0000644000265600020320000001445512264261473021072 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE sine/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 20 Mar 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray 7 Sep 2012 Holger Vogt SUMMARY This file contains the model-specific routines used to functionally describe the sine (controlled sine-wave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include /*=== CONSTANTS ========================*/ #define PI 3.14159265358979323846 #define INT1 1 char *allocation_error = "\n**** Error ****\nSINE: Error allocating sine block storage \n"; char *limit_error = "\n**** Error ****\nSINE: Smoothing domain value too large \n"; char *sine_freq_clamp = "\n**** Warning ****\nSINE: Extrapolated frequency limited to 1e-16 Hz \n"; char *array_error = "\n**** Error ****\nSINE: Size of control array different than frequency array \n"; /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_sine() AUTHORS 20 Mar 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray 7 Sep 2012 Holger Vogt SUMMARY This function implements the sine (controlled sinewave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_SINE ROUTINE ===*/ void cm_sine(ARGS) { int i; /* generic loop counter index */ int cntl_size; /* control array size */ int freq_size; /* frequency array size */ Mif_Value_t *x; /* pointer to the control array values */ Mif_Value_t *y; /* pointer to the frequency array values */ double cntl_input; /* control input */ double dout_din; /* partial derivative of output wrt control in */ double output_low; /* output low value */ double output_hi; /* output high value */ double *phase; /* pointer to the instantaneous phase value */ double *phase1; /* pointer to the previous value for the phase */ double freq=0.0; /* frequency of the sine wave */ double center; /* dc offset for the sine wave */ double peak; /* peak voltage value for the wave */ double radian; /* phase value in radians */ Mif_Complex_t ac_gain; /**** Retrieve frequently used parameters... ****/ cntl_size = PARAM_SIZE(cntl_array); freq_size = PARAM_SIZE(freq_array); output_low = PARAM(out_low); output_hi = PARAM(out_high); if (cntl_size != freq_size) { cm_message_send(array_error); return; } if (INIT == 1) { cm_analog_alloc(INT1, sizeof(double)); } x = (Mif_Value_t*) &PARAM(cntl_array[0]); y = (Mif_Value_t*) &PARAM(freq_array[0]); if (ANALYSIS == MIF_DC) { OUTPUT(out) = (output_hi + output_low) / 2; PARTIAL(out, cntl_in) = 0; phase = (double *) cm_analog_get_ptr(INT1, 0); *phase = 0; } else if (ANALYSIS == MIF_TRAN) { phase = (double *) cm_analog_get_ptr(INT1, 0); phase1 = (double *) cm_analog_get_ptr(INT1, 1); /* Retrieve cntl_input value. */ cntl_input = INPUT(cntl_in); /* Determine segment boundaries within which cntl_input resides */ if (cntl_input <= x[0].rvalue) { /*** cntl_input below lowest cntl_voltage ***/ dout_din = (y[1].rvalue - y[0].rvalue) / (x[1].rvalue - x[0].rvalue); freq = y[0].rvalue + (cntl_input - x[0].rvalue) * dout_din; if (freq <= 0) { cm_message_send(sine_freq_clamp); freq = 1e-16; } } else if (cntl_input >= x[cntl_size-1].rvalue) { /*** cntl_input above highest cntl_voltage ***/ dout_din = (y[cntl_size-1].rvalue - y[cntl_size-2].rvalue) / (x[cntl_size-1].rvalue - x[cntl_size-2].rvalue); freq = y[cntl_size-1].rvalue + (cntl_input - x[cntl_size-1].rvalue) * dout_din; } else { /*** cntl_input within bounds of end midpoints... must determine position progressively & then calculate required output. ***/ for (i = 0; i < cntl_size - 1; i++) if ((cntl_input < x[i+1].rvalue) && (cntl_input >= x[i].rvalue)) { /* Interpolate to the correct frequency value */ freq = ((cntl_input - x[i].rvalue) / (x[i+1].rvalue - x[i].rvalue)) * (y[i+1].rvalue - y[i].rvalue) + y[i].rvalue; } } /* calculate the peak value of the wave, the center of the wave, the instantaneous phase and the radian value of the phase */ peak = (output_hi - output_low) / 2; center = (output_hi + output_low) / 2; *phase = *phase1 + freq*(TIME - T(1)); radian = *phase * 2.0 * PI; OUTPUT(out) = peak * sin(radian) + center; PARTIAL(out, cntl_in) = 0; } else { /* Output AC Gain */ ac_gain.real = 0.0; ac_gain.imag = 0.0; AC_GAIN(out, cntl_in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/sine/ifspec.ifs0000644000265600020320000000353012264261473021237 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 20 Mar 1991 Harry Li SUMMARY This file contains the interface specification file for the analog sine (controlled sinewave oscillator) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_sine Spice_Model_Name: sine Description: "controlled sine wave oscillator" PORT_TABLE: Port_Name: cntl_in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: cntl_array freq_array Description: "control in array" "frequency array" Data_Type: real real Default_Value: 0.0 1.0e3 Limits: - [0 -] Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: out_low out_high Description: "output low value" "output high value" Data_Type: real real Default_Value: -1.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/file_source/0000755000265600020320000000000012264261473020623 5ustar andreasadminngspice-26/src/xspice/icm/analog/file_source/cfunc.mod0000644000265600020320000001577712264261473022443 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE filesource/cfunc.mod Copyright 2011 Thomas Sailer AUTHORS 20 May 2011 Thomas Sailer 03 Sep 2012 Holger Vogt MODIFICATIONS SUMMARY This file contains the model-specific routines used to functionally describe the file source code model used to read an array of analog values per time step from a file. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include #include #include #include /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ #if defined(__MINGW32__) || defined(_MSC_VER) #define DIR_PATHSEP "\\" #else #define DIR_PATHSEP "/" #endif #if defined(_MSC_VER) #define strdup _strdup #define snprintf _snprintf #endif /*=== LOCAL VARIABLES & TYPEDEFS =======*/ struct filesource_state { FILE *fp; long pos; unsigned char atend; }; typedef struct { double *amplinterval; /* the storage array for the amplitude offsets */ double *timeinterval; /* the storage array for the time offset */ struct filesource_state *state; /* the storage array for the filesource status. */ } Local_Data_t; /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_filesource() AUTHORS 20 May 2011 Thomas Sailer MODIFICATIONS 07 Sept 2012 Holger Vogt SUMMARY This function implements the filesource code model. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_FILESOURCE ROUTINE ===*/ void cm_filesource(ARGS) /* structure holding parms, inputs, outputs, etc. */ { int size; int amplscalesize; int amploffssize; Local_Data_t *loc; /* Pointer to local static data, not to be included in the state vector */ if(ANALYSIS == MIF_AC) { return; } size = PORT_SIZE(out); if (INIT == 1) { int i; /*** allocate static storage for *loc ***/ STATIC_VAR (locdata) = calloc (1 , sizeof ( Local_Data_t )); loc = STATIC_VAR (locdata); /* Allocate storage for internal state */ loc->timeinterval = (double*)calloc(2, sizeof(double)); loc->amplinterval = (double*)calloc(2 * size, sizeof(double)); loc->state = (struct filesource_state*)malloc(sizeof(struct filesource_state)); loc->timeinterval[0] = loc->timeinterval[1] = PARAM_NULL(timeoffset) ? 0.0 : PARAM(timeoffset); for (i = 0; i < size; ++i) loc->amplinterval[2 * i] = loc->amplinterval[2 * i + 1] = PARAM_NULL(amploffset) ? 0.0 : PARAM(amploffset[i]); loc->state->fp = fopen(PARAM(file), "r"); loc->state->pos = 0; loc->state->atend = 0; if (!loc->state->fp) { char *lbuffer, *p; lbuffer = getenv("NGSPICE_INPUT_DIR"); if (lbuffer && *lbuffer) { p = (char*) malloc(strlen(lbuffer) + strlen(DIR_PATHSEP) + strlen(PARAM(file)) + 1); sprintf(p, "%s%s%s", lbuffer, DIR_PATHSEP, PARAM(file)); loc->state->fp = fopen(p, "r"); free(p); } if (!loc->state->fp) { char msg[512]; snprintf(msg, sizeof(msg), "cannot open file %s", PARAM(file)); cm_message_send(msg); loc->state->atend = 1; } } } amplscalesize = PARAM_NULL(amplscale) ? 0 : PARAM_SIZE(amplscale); amploffssize = PARAM_NULL(amploffset) ? 0 : PARAM_SIZE(amploffset); loc = STATIC_VAR (locdata); while (TIME >= loc->timeinterval[1] && !loc->state->atend) { char line[512]; char *cp, *cpdel; char *cp2; double t; int i; if (ftell(loc->state->fp) != loc->state->pos) { clearerr(loc->state->fp); fseek(loc->state->fp, loc->state->pos, SEEK_SET); } if (!fgets(line, sizeof(line), loc->state->fp)) { loc->state->atend = 1; break; } loc->state->pos = ftell(loc->state->fp); cpdel = cp = strdup(line); while (*cp && isspace(*cp)) ++cp; if (*cp == '#' || *cp == ';') { free(cpdel); continue; } t = strtod(cp, &cp2); if (cp2 == cp) { free(cpdel); continue; } cp = cp2; if (!PARAM_NULL(timescale)) t *= PARAM(timescale); if (!PARAM_NULL(timerelative) && PARAM(timerelative) == MIF_TRUE) t += loc->timeinterval[1]; else if (!PARAM_NULL(timeoffset)) t += PARAM(timeoffset); loc->timeinterval[0] = loc->timeinterval[1]; loc->timeinterval[1] = t; for (i = 0; i < size; ++i) loc->amplinterval[2 * i] = loc->amplinterval[2 * i + 1]; for (i = 0; i < size; ++i) { while (*cp && (isspace(*cp) || *cp == ',')) ++cp; t = strtod(cp, &cp2); if (cp2 == cp) break; cp = cp2; if (i < amplscalesize) t *= PARAM(amplscale[i]); if (i < amploffssize) t += PARAM(amploffset[i]); loc->amplinterval[2 * i + 1] = t; } free(cpdel); } if (TIME < loc->timeinterval[1] && loc->timeinterval[0] < loc->timeinterval[1] && 0.0 <= loc->timeinterval[0]) { if (!PARAM_NULL(amplstep) && PARAM(amplstep) == MIF_TRUE) { int i; for (i = 0; i < size; ++i) OUTPUT(out[i]) = loc->amplinterval[2 * i]; } else { double mul0 = (loc->timeinterval[1] - TIME) / (loc->timeinterval[1] - loc->timeinterval[0]); double mul1 = 1.0 - mul0; int i; for (i = 0; i < size; ++i) OUTPUT(out[i]) = mul0 * loc->amplinterval[2 * i] + mul1 * loc->amplinterval[2 * i + 1]; } } else { int i; for (i = 0; i < size; ++i) OUTPUT(out[i]) = loc->amplinterval[2 * i + 1]; } } ngspice-26/src/xspice/icm/analog/file_source/ifspec.ifs0000644000265600020320000000425512264261473022605 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 2011 Thomas Sailer AUTHORS 19 May 2011 Thomas Sailer SUMMARY This file contains the interface specification file for the filesource code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_filesource Spice_Model_Name: filesource Description: "File Source" PORT_TABLE: Port_Name: out Description: "output" Direction: out Default_Type: v Allowed_Types: [v,vd,i,id] Vector: yes Vector_Bounds: [1 -] Null_Allowed: no PARAMETER_TABLE: Parameter_Name: timeoffset timescale Description: "time offset" "timescale" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: timerelative amplstep Description: "relative time" "step amplitude" Data_Type: boolean boolean Default_Value: FALSE FALSE Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: amploffset amplscale Description: "ampl offset" "amplscale" Data_Type: real real Default_Value: - - Limits: - - Vector: yes yes Vector_Bounds: [1 -] [1 -] Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: file Description: "file name" Data_Type: string Default_Value: "filesource.txt" Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: locdata Description: "local static data" Data_Type: pointer ngspice-26/src/xspice/icm/analog/gain/0000755000265600020320000000000012264261473017242 5ustar andreasadminngspice-26/src/xspice/icm/analog/gain/cfunc.mod0000644000265600020320000000442212264261473021043 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE gain/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the gain code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_gain() AUTHORS 2 Oct 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY This function implements the gain code model. INTERFACES FILE ROUTINE CALLED N/A N/A RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_GAIN ROUTINE ===*/ void cm_gain(ARGS) /* structure holding parms, inputs, outputs, etc. */ { Mif_Complex_t ac_gain; if(ANALYSIS != MIF_AC) { OUTPUT(out) = PARAM(out_offset) + PARAM(gain) * ( INPUT(in) + PARAM(in_offset)); PARTIAL(out,in) = PARAM(gain); } else { ac_gain.real = PARAM(gain); ac_gain.imag= 0.0; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/gain/ifspec.ifs0000644000265600020320000000274512264261473021226 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog gain code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_gain Spice_Model_Name: gain Description: "A simple gain block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain out_offset Description: "input offset" "gain" "output offset" Data_Type: real real real Default_Value: 0.0 1.0 0.0 Limits: - - - Vector: no no no Vector_Bounds: - - - Null_Allowed: yes yes yes ngspice-26/src/xspice/icm/analog/int/0000755000265600020320000000000012264261473017116 5ustar andreasadminngspice-26/src/xspice/icm/analog/int/int.h0000644000265600020320000000226312264261473020064 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE int/int.h Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Nov 1990 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains additional header information for the int code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES NONE NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ #define INT1 1 #define INT2 2 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ ngspice-26/src/xspice/icm/analog/int/cfunc.mod0000644000265600020320000001510612264261473020720 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE int/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Nov 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the int code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include "int.h" /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_int() AUTHORS 2 Oct 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY This function implements the int code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_integrate() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_INT ROUTINE ===*/ void cm_int(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double *out, /* current output */ *in, /* input */ in_offset, /* input offset */ gain, /* gain parameter */ out_lower_limit, /* output lower limit */ out_upper_limit, /* output upper limit */ limit_range, /* range of output below out_upper_limit and above out_lower_limit within which smoothing will take place */ out_ic, /* output initial condition - initial output value */ pout_pin, /* partial derivative of output w.r.t. input */ pout_gain; /* temporary storage variable for partial value returned by smoothing function (subsequently multiplied by pout_pin) */ Mif_Complex_t ac_gain; /* AC gain */ /** Retrieve frequently used parameters (used by all analyses)... **/ gain = PARAM(gain); if (ANALYSIS != MIF_AC) { /**** DC & Transient Analyses ****/ /** Retrieve frequently used parameters... **/ in_offset = PARAM(in_offset); out_lower_limit = PARAM(out_lower_limit); out_upper_limit = PARAM(out_upper_limit); limit_range = PARAM(limit_range); out_ic = PARAM(out_ic); /** Test for INIT; if so, allocate storage, otherwise, retrieve previous timepoint input value... **/ if (INIT==1) { /* First pass...allocate storage for previous value. */ cm_analog_alloc(INT1,sizeof(double)); cm_analog_alloc(INT2,sizeof(double)); } /* retrieve previous value */ in = (double *) cm_analog_get_ptr(INT1,0); /* Set out pointer to input storage location */ out = (double *) cm_analog_get_ptr(INT2,0); /* Set out pointer to output storage location */ /*** Read input value for current time, and calculate pseudo-input ***/ /*** which includes input offset and gain.... ***/ *in = gain*(INPUT(in)+in_offset); /*** Test to see if this is the first timepoint calculation... ***/ /*** this would imply that TIME equals zero. ***/ if ( 0.0 == TIME ) { /*** Test to see if this is the first ***/ /*** timepoint calculation...if ***/ *out = out_ic; /*** so, return out_ic. ***/ pout_pin = 0.0; } else { /*** Calculate value of integral.... ***/ cm_analog_integrate(*in,out,&pout_pin); } /*** Smooth output if it is within limit_range of out_lower_limit or out_upper_limit. ***/ if (*out < (out_lower_limit - limit_range)) { /* At lower limit. */ *out = out_lower_limit; pout_pin = 0.0; } else { if (*out < (out_lower_limit + limit_range)) { /* Lower smoothing range */ cm_smooth_corner(*out,out_lower_limit,out_lower_limit,limit_range, 0.0,1.0,out,&pout_gain); pout_pin = pout_pin * pout_gain; } else { if (*out > (out_upper_limit + limit_range)) { /* At upper limit */ *out = out_upper_limit; pout_pin = 0.0; } else { if (*out > (out_upper_limit - limit_range)) { /* Upper smoothing region */ cm_smooth_corner(*out,out_upper_limit,out_upper_limit,limit_range, 1.0,0.0,out,&pout_gain); pout_pin = pout_pin * pout_gain; } } } } /** Output values for DC & Transient **/ OUTPUT(out) = *out; PARTIAL(out,in) = pout_pin; } else { /**** AC Analysis...output (0.0,gain/s) ****/ ac_gain.real = 0.0; ac_gain.imag = -gain / RAD_FREQ; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/int/ifspec.ifs0000644000265600020320000000463112264261473021076 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 6 Nov 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog int code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_int Spice_Model_Name: int Description: "integrator block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_offset gain Description: "input offset" "gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: out_lower_limit out_upper_limit Description: "output lower limit" "output upper limit" Data_Type: real real Default_Value: - - Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: limit_range out_ic Description: "upper & lower sm. range" "output initial condition" Data_Type: real real Default_Value: 1.0e-6 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/hyst/0000755000265600020320000000000012264261473017313 5ustar andreasadminngspice-26/src/xspice/icm/analog/hyst/cfunc.mod0000644000265600020320000003107112264261473021114 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE hyst/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 6 Jun 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the hyst code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include "cm_hyst.h" /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void hyst() AUTHORS 2 Oct 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY This function implements the hyst code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_HYST ROUTINE ===*/ /************************************************************************* * BEHAVIOR OF HYSTERESIS: * * out hyst hyst * * ^ ____/\_____ ____/\_____ * * | / \/ \ * * | x_fall_linear x_rise_zero * * out_upper_limit- - *----<-------------<------*-------> * * | /| /| /| * * | / /in_high / * * | / | / | / | * * | / / __/ * * | |/_ | / | /| | * * | / / / * * | / | / | / | * * <------O----/------------/------------/-----------------------> in * * | | / | / | / * * | / / / * * <--------*------->----|---->-------* - - - - out_lower_limit * * x_fall_zero in_low x_rise_linear * * V * * * * input_domain defines "in" increment below & above the "*" points * * shown, within which smoothing of the d(out)/d(in) values * * occurs...this prevents abrupt changes in d(out)/d(in) which * * could prevent the simulator from reaching convergence during * * a transient or DC analysis. * * * **************************************************************************/ /**************************************************************************/ /* Usage of cm_smooth_corner: */ /* */ /* void cm_smooth_corner(double x_input, double x_center, double y_center, */ /* double domain, double lower_slope, */ /* double upper_slope,double *y_output, double *dy_dx) */ /* */ /**************************************************************************/ void cm_hyst(ARGS) /* structure holding parms, inputs, outputs, etc. */ { double in, /* input to hysteresis block */ out, /* output from hysteresis block */ in_low, /* lower input value for hyst=0 at which the transfer curve changes from constant to linear */ in_high, /* upper input value for hyst=0 at which the transfer curve changes from constant to linear */ hyst, /* the hysteresis value (see above diagram) */ out_lower_limit, /* the minimum output value from the block */ out_upper_limit, /* the maximum output value from the block */ input_domain, /* the delta value of the input above and below in_low and in_high within which smoothing will be applied to the output in order to maintain continuous first partial derivatives. */ slope, /* calculated rise and fall slope for the block */ pout_pin, /* partial derivative of output w.r.t. input */ x_rise_linear, /* = in_low + hyst */ x_rise_zero, /* = in_high + hyst */ x_fall_linear, /* = in_high - hyst */ x_fall_zero; /* = in_low - hyst */ Boolean_t *hyst_state, /* TRUE => input is on lower leg of hysteresis curve, between -infinity and in_high + hyst. FALSE => input is on upper leg of hysteresis curve, between in_low - hyst and +infinity */ *old_hyst_state; /* previous value of *hyst_state */ Mif_Complex_t ac_gain; /* AC gain */ /** Retrieve frequently used parameters... **/ in_low = PARAM(in_low); in_high = PARAM(in_high); hyst = PARAM(hyst); out_lower_limit = PARAM(out_lower_limit); out_upper_limit = PARAM(out_upper_limit); input_domain = PARAM(input_domain); /** Calculate Hysteresis Linear Region Slopes & Derived Values **/ /* Define slope of rise and fall lines when not being smoothed */ slope = (out_upper_limit - out_lower_limit)/(in_high - in_low); x_rise_linear = in_low + hyst; /* Breakpoint - x rising to linear region */ x_rise_zero = in_high + hyst; /* Breakpoint - x rising to zero-slope (out_upper_limit) */ x_fall_linear = in_high - hyst; /* Breakpoint - x falling to linear region */ x_fall_zero = in_low - hyst; /* Breakpoint - x falling to zero-slope (out_lower_limit) */ if (PARAM(fraction) == MIF_TRUE) /* Set range to absolute value */ input_domain = input_domain * (in_high - in_low); /** Retrieve frequently used inputs... **/ in = INPUT(in); /** Test for INIT; if so, allocate storage, otherwise, retrieve previous timepoint value for output... **/ if (INIT==1) { /* First pass...allocate storage for previous state. */ /* Also, calculate roughly where the current output */ /* will be and use this value to define current state. */ cm_analog_alloc(TRUE,sizeof(Boolean_t)); hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE,0); old_hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE,1); if (in < x_rise_zero + input_domain) { /* Set state to X_RISING */ *old_hyst_state = X_RISING; } else { *old_hyst_state = X_FALLING; } } else { /* Allocation not necessary...retrieve previous values */ hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE,0); /* Set out pointer to current time storage */ old_hyst_state = (Boolean_t *) cm_analog_get_ptr(TRUE,1); /* Set old-output-state pointer to previous time storage */ } /** Set *hyst_out = *old_hyst_out, unless changed below... we don't need the last iteration value of *hyst_state. **/ *hyst_state = *old_hyst_state; /*** Calculate value of hyst_state, pout_pin.... ***/ if (*old_hyst_state == X_RISING) { /* Assume calculations on lower */ /* hysteresis section (x rising) */ if ( in <= x_rise_linear - input_domain ) { /* Output @ lower limit */ out = out_lower_limit; pout_pin = 0.0; } else { if ( in <= x_rise_linear + input_domain ) { /* lower smoothing region */ cm_smooth_corner(in,x_rise_linear,out_lower_limit,input_domain, 0.0,slope,&out,&pout_pin); } else { if (in <= x_rise_zero - input_domain) { /* Rising linear region */ out = (in - x_rise_linear)*slope + out_lower_limit; pout_pin = slope; } else { if (in <= x_rise_zero + input_domain) { /* Upper smoothing region */ cm_smooth_corner(in,x_rise_zero,out_upper_limit,input_domain, slope,0.0,&out,&pout_pin); } else { /* input has transitioned to X_FALLING region... */ out = out_upper_limit; pout_pin = 0.0; *hyst_state = X_FALLING; } } } } } else { /* Assume calculations on upper hysteresis section (x falling) */ if ( in >= x_fall_linear + input_domain ) { /* Output @ upper limit */ out = out_upper_limit; pout_pin = 0.0; } else { if ( in >= x_fall_linear - input_domain ) { /* Upper smoothing region */ cm_smooth_corner(in,x_fall_linear,out_upper_limit,input_domain, slope,0.0,&out,&pout_pin); } else { if (in >= x_fall_zero + input_domain) { /* Falling linear region */ out = (in - x_fall_zero)*slope + out_lower_limit; pout_pin = slope; } else { if (in >= x_fall_zero - input_domain) { /* Lower smoothing region */ cm_smooth_corner(in,x_fall_zero,out_lower_limit,input_domain, 0.0,slope,&out,&pout_pin); } else { /* input has transitioned to X_RISING region... */ out = out_lower_limit; pout_pin = 0.0; *hyst_state = X_RISING; } } } } } if (ANALYSIS != MIF_AC) { /* DC & Transient Analyses */ OUTPUT(out) = out; PARTIAL(out,in) = pout_pin; } else { /* AC Analysis */ ac_gain.real = pout_pin; ac_gain.imag= 0.0; AC_GAIN(out,in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/hyst/cm_hyst.h0000644000265600020320000000227712264261473021142 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE hyst/cm_hyst.h Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 23 Oct 1990 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains additional header information for the hyst code model. INTERFACES FILE ROUTINE CALLED N/A N/A REFERENCED FILES N/A NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ /*=== CONSTANTS ========================*/ #define HYST 1 #define X_RISING TRUE #define X_FALLING FALSE /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ ngspice-26/src/xspice/icm/analog/hyst/ifspec.ifs0000644000265600020320000000524612264261473021276 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog hyst code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_hyst Spice_Model_Name: hyst Description: "hysteresis block" PORT_TABLE: Port_Name: in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: in_low in_high Description: "input low value" "input high value" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: hyst out_lower_limit Description: "hysteresis" "output lower limit" Data_Type: real real Default_Value: 0.1 0.0 Limits: [0 -] - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: out_upper_limit input_domain Description: "output upper limit" "input smoothing domain" Data_Type: real real Default_Value: 1.0 0.01 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: fraction Description: "smoothing percent/abs switch" Data_Type: boolean Default_Value: TRUE Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes ngspice-26/src/xspice/icm/analog/pwl/0000755000265600020320000000000012264261473017126 5ustar andreasadminngspice-26/src/xspice/icm/analog/pwl/cfunc.mod0000644000265600020320000004023612264261473020732 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE pwl/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 19 Apr 1991 Jeffrey P. Murray MODIFICATIONS 25 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the model-specific routines used to functionally describe the pwl (piece-wise linear) code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CMmacros.h cm_message_send(); CM.c void cm_analog_not_converged() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ #define FRACTION 0.30 #define EPSILON 1.0e-9 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION double limit_x_value() AUTHORS 25 Sep 1991 Jeffrey P. Murray MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray SUMMARY Limits a passed input value to some fraction of the segment length defined by (x_upper - x_lower). The fractional value in question is passed as a value to the routine (fraction). INTERFACES FILE ROUTINE CALLED CM.c void cm_analog_not_converged() RETURNED VALUE Returns a double. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ #include /*=== Static LIMIT_X_VALUE ROUTINE ================*/ /** limit_x_value ******************************************/ /** **/ /** Limits a passed input value to some fraction **/ /** of the segment length defined by **/ /** (x_upper - x_lower). The fractional value in **/ /** question is passed as a value to the routine **/ /** (fraction). **/ /** **/ /** 9/25/91 JPM **/ /***********************************************************/ static double limit_x_value(double x_lower,double x_upper, double x_input,double fraction, double *last_x_value) { double max_x_delta, /* maximum delta value permissible for this segment domain. */ hold; /* Holding variable for previous x_input value */ /** Limit effective change of input to fraction of value of lowest **/ /** x-segment length... **/ /* calculate maximum delta value for this region */ max_x_delta = fraction * (x_upper - x_lower); /* Test new input */ if ( max_x_delta < fabs(x_input - *last_x_value) ) { hold = x_input; /* Assign new x_input based of direction of movement */ /* since last iteration call */ if ( 0.0 <= (x_input - *last_x_value) ) { x_input = *last_x_value = *last_x_value + max_x_delta; } else { x_input = *last_x_value = *last_x_value - max_x_delta; } /* Alert the simulator to non-convergence */ cm_analog_not_converged(); /*** Debugging printf statement ***/ /* printf("Assigning new x_input...\nPrevious value=%e, New value=%e\n\n", hold,x_input); */ } else { /* No limiting of x_input required */ *last_x_value = x_input; } return x_input; } /*============================================================================== FUNCTION void cm_pwl(> AUTHORS 19 Apr 1991 Jeffrey P. Murray MODIFICATIONS 25 Sep 1991 Jeffrey P. Murray 2 Oct 1991 Jeffrey P. Murray SUMMARY This function implements the pwl code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); CMmacros.h cm_message_send(); CM.c void cm_analog_not_converged() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_PWL ROUTINE ================*/ void cm_pwl(ARGS) /* structure holding parms, inputs, outputs, etc. */ { int i; /* generic loop counter index */ int size; /* size of the x_array */ double input_domain; /* smoothing range */ double *x; /* pointer to the x-coordinate array */ double *y; /* pointer to the y-coordinate array */ double lower_seg; /* x segment below which input resides */ double upper_seg; /* x segment above which the input resides */ double lower_slope; /* slope of the lower segment */ double upper_slope; /* slope of the upper segment */ double x_input; /* input */ double out; /* output */ double dout_din; /* partial derivative of the output wrt input */ double threshold_lower; /* value below which the output begins smoothing */ double threshold_upper; /* value above which the output begins smoothing */ double test1; /* debug testing value */ double test2; /* debug testing value */ double *last_x_value; /* static variable for limiting */ double test; /* temp storage variable for limit testing */ Mif_Complex_t ac_gain; char *allocation_error="\n***ERROR***\nPWL: Allocation calloc failed!\n"; char *limit_error="\n***ERROR***\nPWL: Violation of 50% rule in breakpoints!\n"; /* Retrieve frequently used parameters... */ input_domain = PARAM(input_domain); size = PARAM_SIZE(x_array); if (INIT==1) { /* First pass...allocate storage for previous value... */ /* Allocate storage for last_x_value */ STATIC_VAR(last_x_value) = (double *) malloc(sizeof(double)); last_x_value = (double *) STATIC_VAR(last_x_value); /* Allocate storage for breakpoint domain & range values */ STATIC_VAR(x) = (double *) calloc((size_t) size, sizeof(double)); x = (double *) STATIC_VAR(x); if (!x) { cm_message_send(allocation_error); } STATIC_VAR(y) = (double *) calloc((size_t) size, sizeof(double)); y = (double *) STATIC_VAR(y); if (!y) { cm_message_send(allocation_error); } /* Retrieve x and y values. */ for (i=0; i (x[1] - x[0]) ) { test = limit_x_value(x_input,x[0],x_input,FRACTION,last_x_value); } else { test = limit_x_value(x[0],x[1],x_input,FRACTION,last_x_value); } /* If the test value is greater than x[0], force to x[0] */ if ( test >= x[0] ) { x_input = *last_x_value = x[0]; /* Alert the simulator to non-convergence */ cm_analog_not_converged(); } else { x_input = *last_x_value = test; } } else if ( *last_x_value >= x[size-1] ) { /** Non-Limited input greater than x[size-1] **/ /* Obtain the test value of the input, if it has changed excessively */ if ( (x_input - x[size-1]) > (x[size-1] - x[size-2]) ) { test = limit_x_value(x[size-1],x_input,x_input,FRACTION,last_x_value); } else { test = limit_x_value(x[size-2],x[size-1],x_input,FRACTION,last_x_value); } /* If the test value is less than x[size-1], force to x[size-1] */ /* minus some epsilon value. */ if ( test < x[size-1] ) { x_input = *last_x_value = x[size-1] - EPSILON; /* Alert the simulator to non-convergence */ cm_analog_not_converged(); } else { x_input = *last_x_value = test; } } else { for (i=1; i x[i] ) { x_input = *last_x_value = x[i]; /* Alert the simulator to non-convergence */ cm_analog_not_converged(); break; } else /* If the test value is less than x[i-1], force to x[i-1] */ /* minus some epsilon value... */ if ( test < x[i-1] ) { x_input = *last_x_value = x[i-1] - EPSILON; /* Alert the simulator to non-convergence */ cm_analog_not_converged(); break; } else { /* Use returned value for next input */ x_input = *last_x_value = test; break; } } } } /* Assign new limited value back to the input for */ /* use in the matrix calculations.... */ INPUT(in) = x_input; /*** Add debugging printf statement ***/ /* printf("Limited x_input=%e\n\n", x_input); */ /**** End internal limiting ****/ /* Determine segment boundaries within which x_input resides */ if (x_input <= (x[0] + x[1])/2.0) {/*** x_input below lowest midpoint ***/ dout_din = (y[1] - y[0])/(x[1] - x[0]); /* Compute new output */ out = y[0] + (x_input - x[0]) * dout_din; } else { if (x_input >= (x[size-2] + x[size-1])/2.0) { /*** x_input above highest midpoint ***/ dout_din = (y[size-1] - y[size-2]) / (x[size-1] - x[size-2]); out = y[size-1] + (x_input - x[size-1]) * dout_din; } else { /*** x_input within bounds of end midpoints... ***/ /*** must determine position progressively & then ***/ /*** calculate required output. ***/ for (i=1; i /*=== CONSTANTS ========================*/ /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_divide() AUTHORS 2 Oct 1991 Jeffrey P. Murray MODIFICATIONS NONE SUMMARY This function implements the divide code model. INTERFACES FILE ROUTINE CALLED CMutil.c void cm_smooth_corner(); RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_DIVIDE ROUTINE ===*/ void cm_divide(ARGS) { double den_lower_limit; /* denominator lower limit */ double den_domain; /* smoothing range for the lower limit */ double threshold_upper; /* value above which smoothing occurs */ double threshold_lower; /* value below which smoothing occurs */ double numerator; /* numerator input */ double denominator; /* denominator input */ double limited_den; /* denominator value if limiting is needed */ double den_partial; /* partial of the output wrt denominator */ double out_gain; /* output gain */ double num_gain; /* numerator gain */ double den_gain; /* denominator gain */ Mif_Complex_t ac_gain; /* Retrieve frequently used parameters... */ den_lower_limit = PARAM(den_lower_limit); den_domain = PARAM(den_domain); out_gain = PARAM(out_gain); num_gain = PARAM(num_gain); den_gain = PARAM(den_gain); if (PARAM(fraction) == MIF_TRUE) /* Set domain to absolute value */ den_domain = den_domain * den_lower_limit; threshold_upper = den_lower_limit + /* Set Upper Threshold */ den_domain; threshold_lower = den_lower_limit - /* Set Lower Threshold */ den_domain; numerator = (INPUT(num) + PARAM(num_offset)) * num_gain; denominator = (INPUT(den) + PARAM(den_offset)) * den_gain; if ((denominator < threshold_upper) && (denominator >= 0)) { /* Need to limit den...*/ if (denominator > threshold_lower) /* Parabolic Region */ cm_smooth_corner(denominator,den_lower_limit, den_lower_limit,den_domain,0.0,1.0, &limited_den,&den_partial); else { /* Hard-Limited Region */ limited_den = den_lower_limit; den_partial = 0.0; } } else if ((denominator > -threshold_upper) && (denominator < 0)) { /* Need to limit den...*/ if (denominator < -threshold_lower) /* Parabolic Region */ cm_smooth_corner(denominator,-den_lower_limit, -den_lower_limit,den_domain,0.0,1.0, &limited_den,&den_partial); else { /* Hard-Limited Region */ limited_den = -den_lower_limit; den_partial = 0.0; } } else { /* No limiting needed */ limited_den = denominator; den_partial = 1.0; } if (ANALYSIS != MIF_AC) { OUTPUT(out) = PARAM(out_offset) + out_gain * ( numerator/limited_den ); PARTIAL(out,num) = out_gain * num_gain / limited_den; PARTIAL(out,den) = -out_gain * numerator * den_gain * den_partial / (limited_den * limited_den); } else { ac_gain.real = out_gain * num_gain / limited_den; ac_gain.imag= 0.0; AC_GAIN(out,num) = ac_gain; ac_gain.real = -out_gain * numerator * den_gain * den_partial / (limited_den * limited_den); ac_gain.imag= 0.0; AC_GAIN(out,den) = ac_gain; } } ngspice-26/src/xspice/icm/analog/divide/ifspec.ifs0000644000265600020320000000631512264261473021551 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 2 Oct 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog divide code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_divide Spice_Model_Name: divide Description: "divider block" PORT_TABLE: Port_Name: num den out Description: "numerator" "denominator" "output" Direction: in in out Default_Type: v v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no no Vector_Bounds: - - - Null_Allowed: no no no PARAMETER_TABLE: Parameter_Name: num_offset num_gain Description: "numerator offset" "numerator gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: den_offset den_gain Description: "denominator offset" "denominator gain" Data_Type: real real Default_Value: 0.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: den_lower_limit den_domain Description: "denominator lower limit" "denominator smoothing domain" Data_Type: real real Default_Value: 1.0e-10 1.0e-16 Limits: [1.0e-10 -] - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: fraction Description: "smoothing fraction/absolute value switch" Data_Type: boolean Default_Value: false Limits: - Vector: no Vector_Bounds: - Null_Allowed: yes PARAMETER_TABLE: Parameter_Name: out_gain out_offset Description: "output gain" "output offset" Data_Type: real real Default_Value: 1.0 0.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes ngspice-26/src/xspice/icm/analog/triangle/0000755000265600020320000000000012264261473020131 5ustar andreasadminngspice-26/src/xspice/icm/analog/triangle/cfunc.mod0000644000265600020320000002460412264261473021736 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ FILE triangle/cfunc.mod Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved PROJECT A-8503-405 AUTHORS 12 Apr 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray 9 Sep 2012 Holger Vogt SUMMARY This file contains the model-specific routines used to functionally describe the triangle (controlled trianglewave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() REFERENCED FILES Inputs from and outputs to ARGS structure. NON-STANDARD FEATURES NONE ===============================================================================*/ /*=== INCLUDE FILES ====================*/ #include /*=== CONSTANTS ========================*/ char *triangle_allocation_error = "\n**** Error ****\nTRIANGLE: Error allocating triangle block storage \n"; char *triangle_freq_clamp = "\n**** Warning ****\nTRIANGLE: Extrapolated Minimum Frequency Set to 1e-16 Hz \n"; char *triangle_array_error = "\n**** Error ****\nTRIANGLE: Size of control array different than frequency array \n"; #define INT1 1 #define T1 2 #define T2 3 #define T3 4 /*=== MACROS ===========================*/ /*=== LOCAL VARIABLES & TYPEDEFS =======*/ /*=== FUNCTION PROTOTYPE DEFINITIONS ===*/ /*============================================================================== FUNCTION void cm_triangle() AUTHORS 12 Apr 1991 Harry Li MODIFICATIONS 2 Oct 1991 Jeffrey P. Murray 9 Sep 2012 Holger Vogt SUMMARY This function implements the triangle (controlled trianglewave oscillator) code model. INTERFACES FILE ROUTINE CALLED CMmacros.h cm_message_send(); CM.c void *cm_analog_alloc() void *cm_analog_get_ptr() int cm_analog_set_temp_bkpt() RETURNED VALUE Returns inputs and outputs via ARGS structure. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE ==============================================================================*/ /*=== CM_TRIANGLE ROUTINE ===*/ /***************************************************** * * * I /\ <- output_high * * I / \ * * I / \ * * I / \ * * I / \ * * I / \ * * I / \ * * I / \ * * I / \ * * I/------------------------------------------ * * \ / * * \ / * * \ / * * \ / * * \ / * * \ / * * \ / * * \/ <- output_low * * * *****************************************************/ void cm_triangle(ARGS) { int i; /* generic loop counter index */ int cntl_size; /* size of the control array */ int freq_size; /* size of the frequency array */ int int_cycle; /* the number of cycles rounded to the nearest int */ Mif_Value_t *x; /* pointer holds the values of the control array */ Mif_Value_t *y; /* pointer holds the values of the freq array */ double cntl_input; /* control input */ double dout_din; /* partial out wrt to control input */ double output_low; /* lowest point of the wave */ double output_hi; /* highest point of the wave */ double dphase; /* percent into the current phase of the cycle */ double *phase; /* instantaneous phase value */ double *phase1; /* pointer to the previous phase value */ double freq = 0.0; /* actual frequency of the wave */ double d_cycle; /* duty cycle */ double *t1; /* pointer which stores time1 */ double *t2; /* pointer which stores time2 */ double *t_end; /* pointer which stores t_start */ double time1; /* time of high peak */ double time2; /* time of low peak */ double t_start; /* time of the beginning of each cycle */ Mif_Complex_t ac_gain; /**** Retrieve frequently used parameters... ****/ cntl_size = PARAM_SIZE(cntl_array); freq_size = PARAM_SIZE(freq_array); output_low = PARAM(out_low); output_hi = PARAM(out_high); d_cycle = PARAM(duty_cycle); if(cntl_size != freq_size) { cm_message_send(triangle_array_error); return; } /* Allocate memory */ if (INIT == 1) { cm_analog_alloc(INT1, sizeof(double)); cm_analog_alloc(T1, sizeof(double)); cm_analog_alloc(T2, sizeof(double)); cm_analog_alloc(T3, sizeof(double)); STATIC_VAR(tran_init) = MIF_FALSE; } x = (Mif_Value_t*) &PARAM(cntl_array[0]); y = (Mif_Value_t*) &PARAM(freq_array[0]); if (ANALYSIS == MIF_DC) { /* initialize time values */ t1 = (double *) cm_analog_get_ptr(T1, 0); t2 = (double *) cm_analog_get_ptr(T2, 0); t_end = (double *) cm_analog_get_ptr(T3, 0); *t1 = -1; *t2 = -1; *t_end = 0; OUTPUT(out) = output_low; PARTIAL(out, cntl_in) = 0; } else if (ANALYSIS == MIF_TRAN) { /* Retrieve previous values and set equal to corresponding variables */ phase = (double *) cm_analog_get_ptr(INT1, 0); phase1 = (double *) cm_analog_get_ptr(INT1, 1); t1 = (double *) cm_analog_get_ptr(T1, 1); t2 = (double *) cm_analog_get_ptr(T2, 1); t_end = (double *) cm_analog_get_ptr(T3, 1); time1 = *t1; time2 = *t2; t_start = *t_end; if (STATIC_VAR(tran_init) == MIF_FALSE) { *phase1 = 0.0; STATIC_VAR(tran_init) = MIF_TRUE; } /* Retrieve cntl_input value. */ cntl_input = INPUT(cntl_in); /* Determine segment boundaries within which cntl_input resides */ /*** cntl_input below lowest cntl_voltage ***/ if (cntl_input <= x[0].rvalue) { dout_din = (y[1].rvalue - y[0].rvalue) / (x[1].rvalue - x[0].rvalue); freq = y[0].rvalue + (cntl_input - x[0].rvalue) * dout_din; if (freq <= 0) { cm_message_send(triangle_freq_clamp); freq = 1e-16; } } else if (cntl_input >= x[cntl_size-1].rvalue) { /*** cntl_input above highest cntl_voltage ***/ dout_din = (y[cntl_size-1].rvalue - y[cntl_size-2].rvalue) / (x[cntl_size-1].rvalue - x[cntl_size-2].rvalue); freq = y[cntl_size-1].rvalue + (cntl_input - x[cntl_size-1].rvalue) * dout_din; /* freq = y[cntl_size-1].rvalue; */ } else { /*** cntl_input within bounds of end midpoints... must determine position progressively & then calculate required output. ***/ for (i = 0; i < cntl_size - 1; i++) { if ((cntl_input < x[i+1].rvalue) && (cntl_input >= x[i].rvalue)) { /* Interpolate to the correct frequency value */ freq = ((cntl_input - x[i].rvalue) / (x[i+1].rvalue - x[i].rvalue)) * (y[i+1].rvalue - y[i].rvalue) + y[i].rvalue; } } } /* Instantaneous phase is the old phase + frequency/(delta time) int_cycle is the integer value for the number cycles. */ *phase = *phase1 + freq * (TIME - T(1)); int_cycle = (int) *phase1; dphase = *phase1 - int_cycle; /* if the current time is greater than time1, but less than time2, calculate time2 and set the temporary breakpoint. */ if ((time1 <= TIME) && (TIME <= time2)) { time2 = T(1) + (1 - dphase) / freq; if (TIME < time2) cm_analog_set_temp_bkpt(time2); /* store the time that the next cycle is scheduled to begin */ t_start = time2; /* set output value */ OUTPUT(out) = output_hi - ((TIME - time1) / (time2 - time1)) * (output_hi - output_low); } else { /* otherwise, calculate time1 and time2 and set their respective breakpoints */ if (dphase > d_cycle) dphase = dphase - 1.0; time1 = T(1) + (d_cycle - dphase) / freq; time2 = T(1) + (1 - dphase) / freq; if ((TIME < time1) || (T(1) == 0)) cm_analog_set_temp_bkpt(time1); cm_analog_set_temp_bkpt(time2); /* set output value */ OUTPUT(out) = output_low + ((TIME - t_start) / (time1 - t_start)) * (output_hi - output_low); } PARTIAL(out, cntl_in) = 0.0; /* set the time values for storage */ t1 = (double *) cm_analog_get_ptr(T1, 0); t2 = (double *) cm_analog_get_ptr(T2, 0); t_end = (double *) cm_analog_get_ptr(T3, 0); *t1 = time1; *t2 = time2; *t_end = t_start; } else { /* Output AC Gain */ /* This model has no AC capabilities */ ac_gain.real = 0.0; ac_gain.imag = 0.0; AC_GAIN(out, cntl_in) = ac_gain; } } ngspice-26/src/xspice/icm/analog/triangle/ifspec.ifs0000644000265600020320000000434512264261473022113 0ustar andreasadmin/*.......1.........2.........3.........4.........5.........6.........7.........8 ================================================================================ Copyright 1991 Georgia Tech Research Corporation, Atlanta, Ga. 30332 All Rights Reserved AUTHORS 12 Apr 1991 Jeffrey P. Murray SUMMARY This file contains the interface specification file for the analog triangle (controlled trianglewave oscillator) code model. ===============================================================================*/ NAME_TABLE: C_Function_Name: cm_triangle Spice_Model_Name: triangle Description: "controlled triangle wave oscillator" PORT_TABLE: Port_Name: cntl_in out Description: "input" "output" Direction: in out Default_Type: v v Allowed_Types: [v,vd,i,id,vnam] [v,vd,i,id] Vector: no no Vector_Bounds: - - Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: cntl_array freq_array Description: "control in array" "frequency array" Data_Type: real real Default_Value: 0.0 1.0e3 Limits: - [0 -] Vector: yes yes Vector_Bounds: [2 -] [2 -] Null_Allowed: no no PARAMETER_TABLE: Parameter_Name: out_low out_high Description: "output low value" "output high value" Data_Type: real real Default_Value: -1.0 1.0 Limits: - - Vector: no no Vector_Bounds: - - Null_Allowed: yes yes PARAMETER_TABLE: Parameter_Name: duty_cycle Description: "rise time duty cycle" Data_Type: real Default_Value: 0.5 Limits: [1e-6 .999999] Vector: no Vector_Bounds: - Null_Allowed: yes STATIC_VAR_TABLE: Static_Var_Name: tran_init Description: "tran initialisation" Data_Type: boolean ngspice-26/src/xspice/icm/analog/udnpath.lst0000644000265600020320000000000012264261473020501 0ustar andreasadminngspice-26/src/xspice/cmpp/0000755000265600020320000000000012264261712015246 5ustar andreasadminngspice-26/src/xspice/cmpp/ifs_lex.c0000644000265600020320000022376212264261712017057 0ustar andreasadmin#line 2 "ifs_lex.c" #line 4 "ifs_lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer ifs_yy_create_buffer #define yy_delete_buffer ifs_yy_delete_buffer #define yy_flex_debug ifs_yy_flex_debug #define yy_init_buffer ifs_yy_init_buffer #define yy_flush_buffer ifs_yy_flush_buffer #define yy_load_buffer_state ifs_yy_load_buffer_state #define yy_switch_to_buffer ifs_yy_switch_to_buffer #define yyin ifs_yyin #define yyleng ifs_yyleng #define yylex ifs_yylex #define yylineno ifs_yylineno #define yyout ifs_yyout #define yyrestart ifs_yyrestart #define yytext ifs_yytext #define yywrap ifs_yywrap #define yyalloc ifs_yyalloc #define yyrealloc ifs_yyrealloc #define yyfree ifs_yyfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE ifs_yyrestart(ifs_yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int ifs_yyleng; extern FILE *ifs_yyin, *ifs_yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break * existing scanners that call yyless() from OUTSIDE ifs_yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-ifs_yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. */ #define YY_LESS_LINENO(n) \ do { \ int yyl;\ for ( yyl = n; yyl < ifs_yyleng; ++yyl )\ if ( ifs_yytext[yyl] == '\n' )\ --ifs_yylineno;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up ifs_yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up ifs_yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via ifs_yyrestart()), so that the user can continue scanning by * just pointing ifs_yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when ifs_yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int ifs_yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow ifs_yywrap()'s to do buffer switches * instead of setting up a fresh ifs_yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void ifs_yyrestart (FILE *input_file ); void ifs_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE ifs_yy_create_buffer (FILE *file,int size ); void ifs_yy_delete_buffer (YY_BUFFER_STATE b ); void ifs_yy_flush_buffer (YY_BUFFER_STATE b ); void ifs_yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void ifs_yypop_buffer_state (void ); static void ifs_yyensure_buffer_stack (void ); static void ifs_yy_load_buffer_state (void ); static void ifs_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER ifs_yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE ifs_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE ifs_yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE ifs_yy_scan_bytes (yyconst char *bytes,int len ); void *ifs_yyalloc (yy_size_t ); void *ifs_yyrealloc (void *,yy_size_t ); void ifs_yyfree (void * ); #define yy_new_buffer ifs_yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ ifs_yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ ifs_yy_create_buffer(ifs_yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ ifs_yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ ifs_yy_create_buffer(ifs_yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define ifs_yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *ifs_yyin = (FILE *) 0, *ifs_yyout = (FILE *) 0; typedef int yy_state_type; extern int ifs_yylineno; int ifs_yylineno = 1; extern char *ifs_yytext; #define yytext_ptr ifs_yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up ifs_yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ ifs_yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 64 #define YY_END_OF_BUFFER 65 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[344] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 7, 7, 65, 62, 63, 6, 62, 55, 56, 62, 62, 58, 51, 52, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 53, 54, 57, 57, 41, 37, 39, 35, 32, 57, 57, 57, 57, 57, 57, 57, 57, 2, 4, 3, 7, 8, 0, 58, 60, 1, 59, 0, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 29, 57, 38, 40, 36, 33, 57, 42, 57, 57, 57, 57, 57, 57, 57, 2, 3, 3, 5, 7, 0, 59, 0, 0, 61, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 28, 57, 57, 43, 57, 57, 46, 57, 57, 57, 0, 60, 0, 0, 59, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 30, 57, 34, 57, 57, 57, 57, 45, 57, 0, 59, 57, 57, 57, 57, 57, 57, 31, 57, 57, 57, 57, 57, 57, 57, 57, 44, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 49, 57, 57, 57, 57, 57, 57, 0, 22, 57, 57, 57, 57, 57, 57, 57, 0, 10, 57, 47, 48, 50, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 57, 0, 15, 57, 57, 57, 0, 19, 57, 57, 57, 0, 13, 57, 57, 57, 57, 57, 57, 57, 57, 57, 0, 23, 57, 57, 57, 0, 14, 57, 57, 57, 57, 57, 57, 57, 0, 18, 57, 57, 57, 57, 57, 57, 57, 57, 57, 0, 16, 57, 0, 24, 57, 57, 57, 57, 57, 57, 0, 9, 57, 0, 17, 57, 57, 57, 57, 57, 0, 11, 57, 0, 25, 57, 57, 57, 57, 0, 12, 0, 26, 57, 0, 20, 57, 0, 27, 0, 21, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 1, 1, 1, 1, 1, 1, 1, 5, 6, 7, 8, 9, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 1, 13, 1, 14, 1, 1, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 24, 25, 26, 27, 28, 29, 24, 30, 31, 32, 33, 34, 35, 36, 37, 24, 38, 1, 39, 1, 40, 1, 41, 42, 43, 44, 45, 46, 47, 48, 49, 24, 24, 50, 51, 52, 53, 54, 24, 55, 56, 57, 58, 59, 60, 61, 62, 24, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[63] = { 0, 1, 1, 2, 3, 4, 1, 1, 1, 1, 1, 5, 1, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 1, 1, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5 } ; static yyconst flex_int16_t yy_base[351] = { 0, 0, 0, 36, 37, 82, 124, 42, 43, 168, 209, 64, 72, 796, 773, 764, 1047, 1047, 1047, 67, 1047, 70, 751, 742, 74, 1047, 1047, 57, 683, 61, 91, 79, 86, 122, 97, 132, 104, 133, 1047, 1047, 154, 143, 226, 69, 149, 159, 202, 163, 142, 128, 190, 181, 216, 183, 224, 0, 1047, 112, 0, 1047, 681, 251, 223, 1047, 255, 198, 0, 675, 248, 265, 250, 266, 225, 268, 273, 276, 278, 261, 279, 100, 290, 277, 297, 551, 295, 550, 545, 505, 454, 302, 293, 304, 309, 312, 318, 319, 330, 337, 0, 209, 334, 1047, 0, 347, 314, 358, 395, 394, 345, 321, 361, 366, 369, 346, 359, 371, 374, 372, 373, 376, 378, 385, 390, 392, 349, 399, 393, 336, 388, 389, 308, 400, 405, 417, 284, 283, 423, 281, 272, 116, 412, 117, 421, 426, 430, 425, 435, 434, 437, 442, 446, 450, 448, 239, 447, 237, 451, 461, 465, 452, 205, 467, 194, 185, 477, 474, 471, 476, 487, 488, 168, 493, 491, 496, 494, 503, 449, 501, 510, 155, 516, 514, 523, 530, 532, 521, 527, 535, 518, 547, 571, 560, 541, 552, 570, 575, 543, 568, 595, 576, 569, 582, 137, 577, 591, 584, 589, 588, 593, 620, 1047, 599, 608, 607, 613, 620, 614, 616, 641, 1047, 638, 113, 110, 107, 636, 623, 637, 649, 646, 644, 648, 650, 654, 655, 652, 661, 674, 659, 677, 680, 708, 679, 686, 693, 722, 707, 688, 702, 726, 711, 724, 706, 720, 729, 733, 747, 1047, 734, 740, 743, 764, 1047, 769, 749, 764, 790, 1047, 795, 774, 744, 776, 763, 778, 790, 746, 808, 810, 1047, 807, 812, 818, 829, 1047, 775, 815, 825, 806, 823, 837, 833, 843, 1047, 854, 847, 852, 843, 860, 865, 866, 879, 863, 881, 1047, 897, 884, 1047, 891, 892, 877, 893, 896, 913, 918, 1047, 894, 925, 1047, 929, 915, 922, 924, 934, 944, 1047, 950, 952, 1047, 955, 952, 974, 959, 977, 1047, 979, 1047, 990, 993, 1047, 996, 1007, 1047, 1009, 1047, 1047, 1021, 1026, 81, 1031, 1036, 1041, 79 } ; static yyconst flex_int16_t yy_def[351] = { 0, 343, 1, 1, 1, 1, 1, 1, 1, 1, 1, 344, 344, 345, 345, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 347, 343, 348, 349, 343, 343, 343, 343, 343, 343, 343, 350, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 347, 348, 348, 343, 349, 343, 343, 343, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 343, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 343, 343, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 346, 346, 346, 346, 346, 346, 346, 346, 343, 343, 346, 343, 343, 346, 346, 346, 346, 346, 346, 343, 343, 346, 343, 343, 346, 346, 346, 346, 346, 343, 343, 346, 343, 343, 346, 346, 346, 346, 343, 343, 343, 343, 346, 343, 343, 346, 343, 343, 343, 343, 0, 343, 343, 343, 343, 343, 343, 343 } ; static yyconst flex_int16_t yy_nxt[1110] = { 0, 16, 16, 17, 18, 16, 19, 20, 21, 22, 23, 24, 16, 25, 26, 27, 28, 29, 30, 28, 31, 28, 28, 28, 28, 32, 28, 33, 28, 34, 28, 35, 36, 28, 37, 28, 28, 28, 38, 39, 28, 27, 28, 29, 30, 28, 31, 28, 28, 28, 32, 28, 33, 28, 34, 28, 35, 36, 28, 37, 28, 28, 28, 40, 40, 47, 47, 56, 66, 57, 48, 48, 66, 41, 41, 56, 60, 57, 61, 60, 66, 61, 68, 64, 66, 61, 67, 85, 40, 40, 66, 47, 47, 65, 73, 48, 48, 66, 41, 41, 42, 69, 66, 43, 44, 45, 70, 68, 66, 74, 71, 66, 77, 85, 72, 66, 46, 100, 66, 65, 73, 66, 101, 120, 66, 78, 42, 66, 66, 43, 44, 45, 70, 66, 81, 74, 71, 75, 77, 66, 72, 46, 42, 66, 66, 43, 44, 45, 66, 120, 78, 164, 82, 66, 66, 76, 92, 166, 46, 81, 66, 79, 84, 75, 80, 66, 66, 86, 42, 75, 66, 43, 44, 45, 66, 91, 164, 87, 82, 66, 76, 92, 83, 46, 49, 50, 79, 76, 84, 80, 90, 51, 66, 86, 66, 75, 163, 52, 53, 54, 91, 66, 96, 87, 106, 163, 106, 83, 94, 107, 49, 50, 76, 66, 343, 90, 66, 51, 93, 343, 88, 82, 52, 53, 54, 49, 50, 66, 96, 89, 69, 77, 51, 94, 62, 66, 66, 66, 52, 53, 54, 70, 103, 93, 95, 71, 88, 82, 66, 72, 66, 49, 50, 79, 89, 113, 97, 77, 51, 66, 64, 66, 61, 52, 53, 54, 104, 70, 103, 95, 65, 71, 66, 108, 105, 72, 66, 66, 79, 66, 113, 97, 110, 138, 66, 109, 111, 66, 66, 66, 66, 118, 138, 114, 135, 135, 65, 112, 108, 115, 105, 66, 116, 117, 66, 121, 66, 110, 66, 119, 122, 109, 111, 66, 123, 66, 118, 125, 114, 66, 66, 126, 112, 66, 115, 104, 124, 116, 117, 66, 66, 121, 66, 136, 119, 122, 127, 128, 129, 100, 123, 66, 131, 125, 101, 132, 126, 66, 66, 119, 130, 124, 121, 134, 140, 134, 66, 66, 135, 136, 66, 127, 128, 129, 137, 144, 137, 133, 131, 138, 66, 132, 66, 139, 119, 130, 141, 66, 121, 140, 66, 142, 66, 66, 66, 66, 143, 66, 149, 66, 145, 144, 133, 147, 146, 151, 66, 148, 139, 66, 66, 66, 141, 66, 66, 107, 107, 142, 150, 153, 66, 66, 143, 157, 149, 145, 66, 152, 158, 147, 146, 151, 148, 66, 154, 155, 156, 159, 66, 162, 160, 162, 66, 150, 163, 153, 66, 66, 157, 165, 161, 66, 152, 158, 170, 66, 66, 169, 66, 154, 155, 156, 159, 66, 167, 160, 168, 66, 66, 66, 66, 66, 66, 66, 165, 66, 161, 171, 174, 176, 170, 177, 66, 169, 172, 178, 66, 173, 66, 167, 180, 168, 66, 179, 182, 66, 175, 66, 66, 196, 181, 185, 171, 174, 183, 176, 184, 177, 66, 66, 178, 187, 66, 186, 66, 66, 180, 66, 179, 182, 188, 192, 66, 193, 66, 181, 66, 185, 197, 183, 189, 66, 184, 191, 190, 66, 187, 66, 186, 66, 194, 199, 66, 200, 66, 195, 188, 192, 66, 193, 198, 66, 201, 66, 197, 189, 66, 207, 191, 190, 203, 202, 66, 204, 66, 194, 66, 199, 66, 200, 195, 66, 66, 66, 205, 198, 212, 206, 201, 216, 208, 66, 207, 209, 209, 211, 203, 202, 204, 66, 66, 66, 66, 210, 213, 214, 66, 66, 66, 205, 215, 212, 206, 66, 216, 66, 208, 218, 218, 66, 66, 211, 66, 221, 66, 222, 66, 219, 217, 213, 66, 214, 223, 226, 225, 230, 215, 224, 66, 66, 228, 229, 209, 209, 66, 66, 232, 66, 221, 227, 222, 66, 210, 231, 66, 220, 234, 223, 226, 233, 225, 230, 235, 218, 218, 228, 229, 66, 66, 66, 236, 239, 232, 219, 237, 66, 240, 66, 231, 66, 66, 66, 234, 66, 233, 66, 66, 235, 238, 243, 66, 244, 66, 245, 248, 236, 239, 249, 246, 250, 237, 241, 240, 242, 247, 66, 66, 252, 66, 251, 66, 66, 62, 238, 66, 243, 244, 66, 245, 66, 248, 258, 249, 246, 66, 250, 241, 254, 242, 247, 255, 255, 252, 66, 253, 251, 257, 66, 66, 66, 256, 259, 66, 263, 260, 260, 262, 258, 265, 265, 267, 66, 254, 66, 261, 66, 269, 66, 266, 253, 66, 257, 264, 268, 66, 66, 259, 63, 263, 255, 255, 66, 262, 270, 66, 66, 267, 66, 271, 256, 66, 269, 62, 273, 343, 274, 260, 260, 278, 268, 275, 276, 276, 272, 66, 66, 261, 59, 270, 289, 66, 277, 286, 271, 284, 66, 66, 66, 273, 66, 274, 279, 265, 265, 278, 275, 280, 281, 281, 283, 59, 66, 266, 285, 289, 287, 66, 282, 286, 288, 290, 290, 276, 276, 343, 295, 279, 66, 66, 66, 291, 280, 277, 66, 283, 292, 66, 293, 285, 66, 287, 281, 281, 294, 66, 288, 66, 299, 300, 301, 301, 282, 296, 298, 66, 290, 290, 297, 66, 302, 343, 292, 303, 293, 66, 291, 304, 304, 66, 294, 343, 343, 299, 66, 300, 66, 305, 296, 307, 298, 308, 66, 297, 306, 66, 309, 66, 66, 303, 343, 310, 312, 312, 301, 301, 343, 304, 304, 66, 314, 66, 313, 319, 302, 307, 308, 305, 311, 306, 315, 315, 309, 66, 66, 66, 66, 310, 66, 66, 316, 317, 343, 321, 324, 314, 322, 322, 318, 319, 320, 312, 312, 311, 343, 66, 323, 66, 315, 315, 343, 313, 325, 325, 66, 327, 66, 317, 316, 321, 324, 66, 326, 318, 329, 320, 66, 322, 322, 328, 343, 343, 343, 331, 331, 325, 325, 323, 333, 333, 330, 327, 66, 332, 66, 326, 343, 66, 334, 343, 329, 66, 335, 343, 328, 343, 343, 336, 336, 338, 331, 331, 333, 333, 343, 330, 66, 337, 343, 343, 332, 343, 334, 339, 339, 343, 336, 336, 335, 341, 341, 343, 66, 340, 343, 338, 337, 343, 66, 342, 339, 339, 341, 341, 343, 343, 343, 343, 343, 343, 340, 343, 342, 55, 55, 55, 55, 55, 58, 58, 58, 58, 58, 98, 343, 98, 343, 98, 99, 343, 99, 99, 99, 102, 102, 343, 102, 102, 15, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343 } ; static yyconst flex_int16_t yy_chk[1110] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 4, 7, 8, 11, 27, 11, 7, 8, 29, 3, 4, 12, 19, 12, 19, 21, 43, 21, 27, 24, 350, 24, 346, 43, 3, 4, 31, 7, 8, 24, 31, 7, 8, 32, 3, 4, 5, 29, 30, 5, 5, 5, 30, 27, 34, 32, 30, 79, 34, 43, 30, 36, 5, 57, 223, 24, 31, 222, 57, 79, 221, 34, 5, 139, 141, 5, 5, 5, 30, 33, 36, 32, 30, 33, 34, 49, 30, 5, 6, 35, 37, 6, 6, 6, 202, 79, 34, 139, 37, 48, 41, 33, 49, 141, 6, 36, 44, 35, 41, 33, 35, 40, 179, 44, 6, 40, 45, 6, 6, 6, 47, 48, 139, 45, 37, 170, 33, 49, 40, 6, 9, 9, 35, 40, 41, 35, 47, 9, 51, 44, 53, 40, 163, 9, 9, 9, 48, 50, 53, 45, 65, 162, 65, 40, 51, 65, 9, 9, 40, 46, 99, 47, 160, 9, 50, 99, 46, 46, 9, 9, 9, 10, 10, 52, 53, 46, 50, 52, 10, 51, 62, 54, 72, 42, 10, 10, 10, 42, 62, 50, 52, 42, 46, 46, 155, 42, 153, 10, 10, 54, 46, 72, 54, 52, 10, 68, 61, 70, 61, 10, 10, 10, 64, 42, 62, 52, 61, 42, 77, 68, 64, 42, 69, 71, 54, 73, 72, 54, 70, 138, 74, 69, 71, 75, 81, 76, 78, 77, 137, 73, 135, 134, 61, 71, 68, 74, 64, 80, 75, 76, 90, 80, 84, 70, 82, 78, 81, 69, 71, 89, 82, 91, 77, 89, 73, 130, 92, 90, 71, 93, 74, 104, 84, 75, 76, 94, 95, 80, 109, 104, 78, 81, 91, 92, 93, 100, 82, 96, 95, 89, 100, 96, 90, 127, 97, 95, 94, 84, 97, 103, 109, 103, 108, 113, 103, 104, 124, 91, 92, 93, 105, 113, 105, 97, 95, 105, 114, 96, 110, 108, 95, 94, 110, 111, 97, 109, 112, 111, 115, 117, 118, 116, 112, 119, 118, 120, 114, 113, 97, 116, 115, 120, 121, 117, 108, 128, 129, 122, 110, 123, 126, 107, 106, 111, 119, 122, 125, 131, 112, 128, 118, 114, 132, 121, 129, 116, 115, 120, 117, 140, 123, 125, 126, 131, 133, 136, 132, 136, 142, 119, 136, 122, 145, 143, 128, 140, 133, 144, 121, 129, 145, 147, 146, 144, 148, 123, 125, 126, 131, 149, 142, 132, 143, 150, 154, 152, 176, 151, 156, 159, 140, 88, 133, 146, 149, 151, 145, 152, 157, 144, 147, 154, 158, 148, 161, 142, 157, 143, 166, 156, 159, 165, 150, 167, 164, 176, 158, 165, 146, 149, 161, 151, 164, 152, 168, 169, 154, 167, 172, 166, 171, 174, 157, 173, 156, 159, 168, 173, 177, 174, 175, 158, 87, 165, 177, 161, 169, 178, 164, 172, 171, 181, 167, 180, 166, 188, 175, 180, 185, 181, 182, 175, 168, 173, 186, 174, 178, 183, 182, 184, 177, 169, 187, 188, 172, 171, 184, 183, 192, 185, 196, 175, 86, 180, 189, 181, 175, 85, 83, 193, 186, 178, 192, 187, 182, 196, 189, 191, 188, 190, 190, 191, 184, 183, 185, 197, 200, 194, 190, 190, 193, 194, 195, 199, 203, 186, 195, 192, 187, 201, 196, 205, 189, 198, 198, 207, 206, 191, 204, 199, 208, 200, 198, 198, 197, 193, 211, 194, 201, 205, 204, 211, 195, 203, 213, 212, 207, 208, 209, 209, 214, 216, 213, 217, 199, 206, 200, 215, 209, 212, 225, 198, 215, 201, 205, 214, 204, 211, 216, 218, 218, 207, 208, 224, 226, 220, 217, 225, 213, 218, 220, 229, 226, 228, 212, 230, 227, 231, 215, 234, 214, 232, 233, 216, 224, 228, 237, 229, 235, 230, 233, 217, 225, 234, 231, 235, 220, 227, 226, 227, 232, 236, 67, 237, 238, 236, 241, 239, 60, 224, 28, 228, 229, 242, 230, 246, 233, 242, 234, 231, 243, 235, 227, 239, 227, 232, 240, 240, 237, 247, 238, 236, 241, 251, 245, 240, 240, 243, 249, 246, 244, 244, 245, 242, 248, 248, 249, 252, 239, 244, 244, 250, 251, 248, 248, 238, 253, 241, 247, 250, 254, 257, 243, 23, 246, 255, 255, 258, 245, 252, 259, 269, 249, 274, 253, 255, 263, 251, 22, 257, 15, 258, 260, 260, 263, 250, 259, 262, 262, 254, 271, 264, 260, 14, 252, 274, 262, 262, 271, 253, 269, 268, 283, 270, 257, 272, 258, 264, 265, 265, 263, 259, 264, 267, 267, 268, 13, 273, 265, 270, 274, 272, 267, 267, 271, 273, 275, 275, 276, 276, 0, 283, 264, 286, 278, 275, 275, 264, 276, 279, 268, 278, 284, 279, 270, 280, 272, 281, 281, 280, 287, 273, 285, 286, 287, 288, 288, 281, 284, 285, 289, 290, 290, 284, 288, 288, 0, 278, 289, 279, 295, 290, 292, 292, 293, 280, 0, 0, 286, 294, 287, 292, 292, 284, 294, 285, 295, 296, 284, 293, 300, 296, 297, 298, 289, 0, 297, 299, 299, 301, 301, 0, 304, 304, 308, 300, 299, 299, 308, 301, 294, 295, 304, 298, 293, 303, 303, 296, 306, 307, 309, 314, 297, 310, 303, 303, 306, 0, 310, 314, 300, 311, 311, 307, 308, 309, 312, 312, 298, 0, 311, 311, 318, 315, 315, 0, 312, 317, 317, 319, 318, 320, 306, 315, 310, 314, 317, 317, 307, 320, 309, 321, 322, 322, 319, 0, 0, 0, 324, 324, 325, 325, 322, 327, 327, 321, 318, 324, 324, 328, 325, 0, 327, 327, 0, 320, 330, 328, 0, 319, 0, 0, 329, 329, 330, 331, 331, 333, 333, 0, 321, 329, 329, 0, 0, 331, 0, 333, 335, 335, 0, 336, 336, 328, 338, 338, 0, 335, 335, 0, 330, 336, 0, 338, 338, 339, 339, 341, 341, 0, 0, 0, 0, 0, 0, 339, 0, 341, 344, 344, 344, 344, 344, 345, 345, 345, 345, 345, 347, 0, 347, 0, 347, 348, 0, 348, 348, 348, 349, 349, 0, 349, 349, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343, 343 } ; /* Table of booleans, true if rule could match eol. */ static yyconst flex_int32_t yy_rule_can_match_eol[65] = { 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int ifs_yy_flex_debug; int ifs_yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *ifs_yytext; #line 1 "ifs_lex.l" #line 6 "ifs_lex.l" /*============================================================================ FILE ifs_lex.l MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 12/31/91 Bill Kuhn Change "array" to "vector" and "array_bounds" to "vector_bounds". SUMMARY This file defines tokens applicable to parsing the ifspec.ifs file, and actions to be taken on encountering those tokens. INTERFACES None. REFERENCED FILES ifs_yacc.y NON-STANDARD FEATURES None. ============================================================================*/ #include #include "ifs_yacc_y.h" #include "ifs_yacc.h" int yyival; double yydval; /* * IFS specs are case insensitive: */ /* saj - use -i flex command line option #undef input #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(ifs_yyin))==10?(ifs_yylineno++,yytchar):yytchar)==EOF?0:isupper(yytchar)?tolower(yytchar):yytchar) */ /*---------------------------------------------------------------------------*/ #line 924 "ifs_lex.c" #define INITIAL 0 #define BOOL 1 #define CTYPE 2 #define DIR 3 #define DTYPE 4 #define comment 5 #define stringl 6 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int ifs_yylex_destroy (void ); int ifs_yyget_debug (void ); void ifs_yyset_debug (int debug_flag ); YY_EXTRA_TYPE ifs_yyget_extra (void ); void ifs_yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *ifs_yyget_in (void ); void ifs_yyset_in (FILE * in_str ); FILE *ifs_yyget_out (void ); void ifs_yyset_out (FILE * out_str ); int ifs_yyget_leng (void ); char *ifs_yyget_text (void ); int ifs_yyget_lineno (void ); void ifs_yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int ifs_yywrap (void ); #else extern int ifs_yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( ifs_yytext, ifs_yyleng, 1, ifs_yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( ifs_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( ifs_yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, ifs_yyin))==0 && ferror(ifs_yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(ifs_yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int ifs_yylex (void); #define YY_DECL int ifs_yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after ifs_yytext and ifs_yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 81 "ifs_lex.l" #line 1120 "ifs_lex.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! ifs_yyin ) ifs_yyin = stdin; if ( ! ifs_yyout ) ifs_yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { ifs_yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = ifs_yy_create_buffer(ifs_yyin,YY_BUF_SIZE ); } ifs_yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of ifs_yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 344 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 1047 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; for ( yyl = 0; yyl < ifs_yyleng; ++yyl ) if ( ifs_yytext[yyl] == '\n' ) ifs_yylineno++; ; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 83 "ifs_lex.l" { BEGIN(comment); } YY_BREAK case 2: YY_RULE_SETUP #line 85 "ifs_lex.l" /* eat anything that's not a '*' */ YY_BREAK case 3: YY_RULE_SETUP #line 87 "ifs_lex.l" /* eat up '*'s not followed by '/'s */ YY_BREAK case 4: /* rule 4 can match eol */ YY_RULE_SETUP #line 89 "ifs_lex.l" /* new line */ YY_BREAK case YY_STATE_EOF(comment): #line 91 "ifs_lex.l" {ifs_yyerror ("Unterminated comment"); BEGIN(INITIAL); yyterminate(); } YY_BREAK case 5: YY_RULE_SETUP #line 95 "ifs_lex.l" { BEGIN(INITIAL); } YY_BREAK case 6: YY_RULE_SETUP #line 97 "ifs_lex.l" { BEGIN(stringl); } YY_BREAK case 7: /* rule 7 can match eol */ YY_RULE_SETUP #line 99 "ifs_lex.l" { return TOK_STRING_LITERAL; } YY_BREAK case 8: YY_RULE_SETUP #line 101 "ifs_lex.l" { BEGIN(INITIAL); } YY_BREAK case YY_STATE_EOF(stringl): #line 103 "ifs_lex.l" {ifs_yyerror ("Unterminated string literal"); BEGIN(INITIAL); yyterminate(); } YY_BREAK case 9: /* rule 9 can match eol */ YY_RULE_SETUP #line 107 "ifs_lex.l" {BEGIN CTYPE; return TOK_ALLOWED_TYPES;} YY_BREAK case 10: /* rule 10 can match eol */ YY_RULE_SETUP #line 108 "ifs_lex.l" {BEGIN BOOL; return TOK_ARRAY;} YY_BREAK case 11: /* rule 11 can match eol */ YY_RULE_SETUP #line 109 "ifs_lex.l" {return TOK_ARRAY_BOUNDS;} YY_BREAK case 12: /* rule 12 can match eol */ YY_RULE_SETUP #line 110 "ifs_lex.l" {return TOK_C_FUNCTION_NAME;} YY_BREAK case 13: /* rule 13 can match eol */ YY_RULE_SETUP #line 111 "ifs_lex.l" {return TOK_PORT_NAME;} YY_BREAK case 14: /* rule 14 can match eol */ YY_RULE_SETUP #line 112 "ifs_lex.l" {return TOK_PORT_TABLE;} YY_BREAK case 15: /* rule 15 can match eol */ YY_RULE_SETUP #line 113 "ifs_lex.l" {BEGIN DTYPE; return TOK_DATA_TYPE;} YY_BREAK case 16: /* rule 16 can match eol */ YY_RULE_SETUP #line 114 "ifs_lex.l" {BEGIN CTYPE; return TOK_DEFAULT_TYPE;} YY_BREAK case 17: /* rule 17 can match eol */ YY_RULE_SETUP #line 115 "ifs_lex.l" {return TOK_DEFAULT_VALUE;} YY_BREAK case 18: /* rule 18 can match eol */ YY_RULE_SETUP #line 116 "ifs_lex.l" {return TOK_DESCRIPTION;} YY_BREAK case 19: /* rule 19 can match eol */ YY_RULE_SETUP #line 117 "ifs_lex.l" {BEGIN DIR; return TOK_DIRECTION;} YY_BREAK case 20: /* rule 20 can match eol */ YY_RULE_SETUP #line 118 "ifs_lex.l" {return TOK_STATIC_VAR_NAME;} YY_BREAK case 21: /* rule 21 can match eol */ YY_RULE_SETUP #line 119 "ifs_lex.l" {return TOK_STATIC_VAR_TABLE;} YY_BREAK case 22: /* rule 22 can match eol */ YY_RULE_SETUP #line 120 "ifs_lex.l" {return TOK_LIMITS;} YY_BREAK case 23: /* rule 23 can match eol */ YY_RULE_SETUP #line 121 "ifs_lex.l" {return TOK_NAME_TABLE;} YY_BREAK case 24: /* rule 24 can match eol */ YY_RULE_SETUP #line 122 "ifs_lex.l" {BEGIN BOOL; return TOK_NULL_ALLOWED;} YY_BREAK case 25: /* rule 25 can match eol */ YY_RULE_SETUP #line 123 "ifs_lex.l" {return TOK_PARAMETER_NAME;} YY_BREAK case 26: /* rule 26 can match eol */ YY_RULE_SETUP #line 124 "ifs_lex.l" {return TOK_PARAMETER_TABLE;} YY_BREAK case 27: /* rule 27 can match eol */ YY_RULE_SETUP #line 125 "ifs_lex.l" {return TOK_SPICE_MODEL_NAME;} YY_BREAK case 28: YY_RULE_SETUP #line 127 "ifs_lex.l" {return TOK_BOOL_YES;} YY_BREAK case 29: YY_RULE_SETUP #line 128 "ifs_lex.l" {return TOK_BOOL_NO;} YY_BREAK case 30: YY_RULE_SETUP #line 129 "ifs_lex.l" {return TOK_BOOL_YES;} YY_BREAK case 31: YY_RULE_SETUP #line 130 "ifs_lex.l" {return TOK_BOOL_NO;} YY_BREAK case 32: YY_RULE_SETUP #line 132 "ifs_lex.l" {return TOK_CTYPE_V;} YY_BREAK case 33: YY_RULE_SETUP #line 133 "ifs_lex.l" {return TOK_CTYPE_VD;} YY_BREAK case 34: YY_RULE_SETUP #line 134 "ifs_lex.l" {return TOK_CTYPE_VNAM;} YY_BREAK case 35: YY_RULE_SETUP #line 135 "ifs_lex.l" {return TOK_CTYPE_I;} YY_BREAK case 36: YY_RULE_SETUP #line 136 "ifs_lex.l" {return TOK_CTYPE_ID;} YY_BREAK case 37: YY_RULE_SETUP #line 137 "ifs_lex.l" {return TOK_CTYPE_G;} YY_BREAK case 38: YY_RULE_SETUP #line 138 "ifs_lex.l" {return TOK_CTYPE_GD;} YY_BREAK case 39: YY_RULE_SETUP #line 139 "ifs_lex.l" {return TOK_CTYPE_H;} YY_BREAK case 40: YY_RULE_SETUP #line 140 "ifs_lex.l" {return TOK_CTYPE_HD;} YY_BREAK case 41: YY_RULE_SETUP #line 141 "ifs_lex.l" {return TOK_CTYPE_D;} YY_BREAK case 42: YY_RULE_SETUP #line 143 "ifs_lex.l" {return TOK_DIR_IN;} YY_BREAK case 43: YY_RULE_SETUP #line 144 "ifs_lex.l" {return TOK_DIR_OUT;} YY_BREAK case 44: YY_RULE_SETUP #line 145 "ifs_lex.l" {return TOK_DIR_INOUT;} YY_BREAK case 45: YY_RULE_SETUP #line 147 "ifs_lex.l" {return TOK_DTYPE_REAL;} YY_BREAK case 46: YY_RULE_SETUP #line 148 "ifs_lex.l" {return TOK_DTYPE_INT;} YY_BREAK case 47: YY_RULE_SETUP #line 149 "ifs_lex.l" {return TOK_DTYPE_BOOLEAN;} YY_BREAK case 48: YY_RULE_SETUP #line 150 "ifs_lex.l" {return TOK_DTYPE_COMPLEX;} YY_BREAK case 49: YY_RULE_SETUP #line 151 "ifs_lex.l" {return TOK_DTYPE_STRING;} YY_BREAK case 50: YY_RULE_SETUP #line 152 "ifs_lex.l" {return TOK_DTYPE_POINTER;} YY_BREAK case 51: YY_RULE_SETUP #line 154 "ifs_lex.l" {return TOK_LANGLE;} YY_BREAK case 52: YY_RULE_SETUP #line 155 "ifs_lex.l" {return TOK_RANGLE;} YY_BREAK case 53: YY_RULE_SETUP #line 156 "ifs_lex.l" {return TOK_LBRACKET;} YY_BREAK case 54: YY_RULE_SETUP #line 157 "ifs_lex.l" {return TOK_RBRACKET;} YY_BREAK case 55: YY_RULE_SETUP #line 158 "ifs_lex.l" {return TOK_COMMA;} YY_BREAK case 56: YY_RULE_SETUP #line 159 "ifs_lex.l" {return TOK_DASH;} YY_BREAK case 57: YY_RULE_SETUP #line 162 "ifs_lex.l" {return TOK_IDENTIFIER;} YY_BREAK case 58: YY_RULE_SETUP #line 164 "ifs_lex.l" {yyival = atoi (ifs_yytext); return TOK_INT_LITERAL;} YY_BREAK case 59: #line 168 "ifs_lex.l" case 60: #line 169 "ifs_lex.l" case 61: YY_RULE_SETUP #line 169 "ifs_lex.l" {yydval = atof (ifs_yytext); return TOK_REAL_LITERAL;} YY_BREAK case 62: YY_RULE_SETUP #line 172 "ifs_lex.l" ; /* ignore anything else */ YY_BREAK case 63: /* rule 63 can match eol */ YY_RULE_SETUP #line 173 "ifs_lex.l" ; /* ignore anything else */ YY_BREAK case 64: YY_RULE_SETUP #line 175 "ifs_lex.l" ECHO; YY_BREAK #line 1563 "ifs_lex.c" case YY_STATE_EOF(INITIAL): case YY_STATE_EOF(BOOL): case YY_STATE_EOF(CTYPE): case YY_STATE_EOF(DIR): case YY_STATE_EOF(DTYPE): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed ifs_yyin at a new source and called * ifs_yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = ifs_yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( ifs_yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * ifs_yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of ifs_yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ ifs_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; ifs_yyrestart(ifs_yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) ifs_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 344 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 344 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 343); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up ifs_yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ){ --ifs_yylineno; } (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ ifs_yyrestart(ifs_yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( ifs_yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve ifs_yytext */ (yy_hold_char) = *++(yy_c_buf_p); if ( c == '\n' ) ifs_yylineno++; ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void ifs_yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ ifs_yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = ifs_yy_create_buffer(ifs_yyin,YY_BUF_SIZE ); } ifs_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); ifs_yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void ifs_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * ifs_yypop_buffer_state(); * ifs_yypush_buffer_state(new_buffer); */ ifs_yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; ifs_yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (ifs_yywrap()) processing, but the only time this flag * is looked at is after ifs_yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void ifs_yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; ifs_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE ifs_yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) ifs_yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) ifs_yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yy_create_buffer()" ); b->yy_is_our_buffer = 1; ifs_yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with ifs_yy_create_buffer() * */ void ifs_yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) ifs_yyfree((void *) b->yy_ch_buf ); ifs_yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a ifs_yyrestart() or at EOF. */ static void ifs_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; ifs_yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then ifs_yy_init_buffer was _probably_ * called from ifs_yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void ifs_yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) ifs_yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void ifs_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; ifs_yyensure_buffer_stack(); /* This block is copied from ifs_yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from ifs_yy_switch_to_buffer. */ ifs_yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void ifs_yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; ifs_yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { ifs_yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void ifs_yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)ifs_yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)ifs_yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE ifs_yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) ifs_yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; ifs_yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to ifs_yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * ifs_yy_scan_bytes() instead. */ YY_BUFFER_STATE ifs_yy_scan_string (yyconst char * yystr ) { return ifs_yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to ifs_yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE ifs_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) ifs_yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in ifs_yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = ifs_yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in ifs_yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up ifs_yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ ifs_yytext[ifs_yyleng] = (yy_hold_char); \ (yy_c_buf_p) = ifs_yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ ifs_yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int ifs_yyget_lineno (void) { return ifs_yylineno; } /** Get the input stream. * */ FILE *ifs_yyget_in (void) { return ifs_yyin; } /** Get the output stream. * */ FILE *ifs_yyget_out (void) { return ifs_yyout; } /** Get the length of the current token. * */ int ifs_yyget_leng (void) { return ifs_yyleng; } /** Get the current token. * */ char *ifs_yyget_text (void) { return ifs_yytext; } /** Set the current line number. * @param line_number * */ void ifs_yyset_lineno (int line_number ) { ifs_yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see ifs_yy_switch_to_buffer */ void ifs_yyset_in (FILE * in_str ) { ifs_yyin = in_str ; } void ifs_yyset_out (FILE * out_str ) { ifs_yyout = out_str ; } int ifs_yyget_debug (void) { return ifs_yy_flex_debug; } void ifs_yyset_debug (int bdebug ) { ifs_yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from ifs_yylex_destroy(), so don't allocate here. */ /* We do not touch ifs_yylineno unless the option is enabled. */ ifs_yylineno = 1; (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT ifs_yyin = stdin; ifs_yyout = stdout; #else ifs_yyin = (FILE *) 0; ifs_yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * ifs_yylex_init() */ return 0; } /* ifs_yylex_destroy is for both reentrant and non-reentrant scanners. */ int ifs_yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ ifs_yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; ifs_yypop_buffer_state(); } /* Destroy the stack itself. */ ifs_yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * ifs_yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *ifs_yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *ifs_yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void ifs_yyfree (void * ptr ) { free( (char *) ptr ); /* see ifs_yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 175 "ifs_lex.l" /*--------------------------------------------------------------------------*/ #if 0 void reset_lex_context (void) { BEGIN 0; } #endif ngspice-26/src/xspice/cmpp/mod_yacc_y.h0000644000265600020320000000155312264261473017535 0ustar andreasadmin/*============================================================================ FILE mod_yacc.h MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY Typedefs needed by the YYSTYPE union (%union operator) in the yacc file. These are only used in the yacc file, but must be defined here since the generated token.h file includes a definition of the union YYSTYPE. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "cmpp.h" typedef struct { char *id; Boolean_t has_subscript; char *subscript; } Sub_Id_t; extern void mod_yyerror(char*); ngspice-26/src/xspice/cmpp/mod_lex.l0000644000265600020320000000575112264261473017066 0ustar andreasadmin%option prefix="mod_yy" %option yylineno %option noyywrap %{ /*============================================================================ FILE mod_lex.l MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY This file defines tokens applicable to parsing the cfunc.mod file, and actions to be taken on encountering those tokens. INTERFACES None. REFERENCED FILES mod_yacc.y NON-STANDARD FEATURES None. ============================================================================*/ #include "mod_yacc_y.h" #include "mod_yacc.h" %} I [A-Za-z_] Z [0-9A-Za-z_] %% "/*" {int ch, last_ch; ECHO; /* a comment - repeat it */ ch = '\0'; do { last_ch = ch; #ifdef __cplusplus ch = yyinput(); #else ch = input(); #endif if(ch == EOF) { mod_yyerror ("Unterminated comment"); break; } fputc(ch,mod_yyout); } while (!((last_ch == '*') && (ch == '/'))); } "//" {int ch; ECHO; /* a comment - repeat it */ do { #ifdef __cplusplus ch = yyinput(); #else ch = input(); #endif if(ch == EOF) { mod_yyerror ("Unterminated comment"); break; } fputc(ch, mod_yyout); } while (ch != '\n'); } ARGS {return TOK_ARGS;} INIT {return TOK_INIT;} ANALYSIS {return TOK_ANALYSIS;} NEW_TIMEPOINT {return TOK_NEW_TIMEPOINT;} CALL_TYPE {return TOK_CALL_TYPE;} TIME {return TOK_TIME;} RAD_FREQ {return TOK_RAD_FREQ;} TEMPERATURE {return TOK_TEMPERATURE;} T {return TOK_T;} LOAD {return TOK_LOAD;} TOTAL_LOAD {return TOK_TOTAL_LOAD;} MESSAGE {return TOK_MESSAGE;} PARAM {return TOK_PARAM;} PARAM_SIZE {return TOK_PARAM_SIZE;} PARAM_NULL {return TOK_PARAM_NULL;} PORT_SIZE {return TOK_PORT_SIZE;} PORT_NULL {return TOK_PORT_NULL;} PARTIAL {return TOK_PARTIAL;} AC_GAIN {return TOK_AC_GAIN;} OUTPUT_DELAY {return TOK_OUTPUT_DELAY;} STATIC_VAR {return TOK_STATIC_VAR;} STATIC_VAR_SIZE {return TOK_STATIC_VAR_SIZE;} STATIC_VAR_INST {return TOK_STATIC_VAR_INST;} INPUT {return TOK_INPUT;} INPUT_STATE {return TOK_INPUT_STATE;} INPUT_TYPE {return TOK_INPUT_TYPE;} INPUT_STRENGTH {return TOK_INPUT_STRENGTH;} OUTPUT {return TOK_OUTPUT;} OUTPUT_STATE {return TOK_OUTPUT_STATE;} OUTPUT_STRENGTH {return TOK_OUTPUT_STRENGTH;} OUTPUT_TYPE {return TOK_OUTPUT_TYPE;} OUTPUT_CHANGED {return TOK_OUTPUT_CHANGED;} "(" {return TOK_LPAREN;} ")" {return TOK_RPAREN;} "[" {return TOK_LBRACKET;} "]" {return TOK_RBRACKET;} "," {return TOK_COMMA;} {I}+{Z}* {return TOK_IDENTIFIER;} [ \t] ECHO; /* just eat non-newline whitespace */ \n ECHO; /* echo newlines */ . {return TOK_MISC_C;} %% ngspice-26/src/xspice/cmpp/util.c0000644000265600020320000000376612264261473016407 0ustar andreasadmin/*============================================================================ FILE util.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn and Steve Tynor MODIFICATIONS SUMMARY This file contains miscellaneous utility functions used in cmpp. INTERFACES init_error() print_error() str_to_lower() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "cmpp.h" #include #include #include #include #include /* *********************************************************************** */ char *prog_name; /* Initialize print_error() with the name of the program */ void init_error (char *program_name) { prog_name = program_name; } /* Print an error message to stderr */ void print_error(const char *fmt, ...) { va_list ap; va_start(ap, fmt); fprintf(stderr, "%s: ", prog_name); vfprintf(stderr, fmt, ap); fprintf(stderr, "\n"); va_end(ap); } /* Convert a string to all lower case */ void str_to_lower(char *s) { int i; char c; for(i = 0; (c = s[i]) != '\0'; i++) if(isalpha(c)) if(isupper(c)) s[i] = (char) tolower(c); } FILE *fopen_cmpp(const char **path_p, const char *mode) { const char *path = *path_p; char buf[MAX_PATH_LEN+1]; if(path[0] != '/') { const char *e = getenv((*mode == 'w') ? "CMPP_ODIR" : "CMPP_IDIR"); if(e) { if(strlen(e) + 1 + strlen(path) < sizeof(buf)) { strcpy(buf, e); strcat(buf, "/"); strcat(buf, path); path = buf; } else { path = NULL; } } } *path_p = strdup(path); return fopen(path, mode); } ngspice-26/src/xspice/cmpp/cmpp.h0000644000265600020320000001772012264261473016371 0ustar andreasadmin/*============================================================================ FILE cmpp.h MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains shared constants, type definitions, and function prototypes used in the cmpp process. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #define IFSPEC_FILENAME "ifspec.ifs" #define UDNFUNC_FILENAME "udnfunc.c" #define MODPATH_FILENAME "modpath.lst" #define UDNPATH_FILENAME "udnpath.lst" /* *********************************************************************** */ typedef enum { OK, /* Returned with no error */ ERROR, /* Returned with error */ } Status_t; #define GET_IFS_TABLE 0 /* Read the entire ifs table */ #define GET_IFS_NAME 1 /* Get the C function name out of the table only */ #define MAX_PATH_LEN 1024 /* Maximum pathname length */ #define MAX_NAME_LEN 1024 /* Maximum SPICE name length */ #define MAX_FN_LEN 31 /* Maximum filename length */ /* ******************************************************************** */ /* Structures used by parser to check for valid connections/parameters */ /* ******************************************************************** */ /* * The boolean type */ typedef enum { FALSE, TRUE, } Boolean_t; /* * The direction of a connector */ typedef enum { IN, OUT, INOUT, } Dir_t; /* * The type of a port */ typedef enum { VOLTAGE, /* v - Single-ended voltage */ DIFF_VOLTAGE, /* vd - Differential voltage */ CURRENT, /* i - Single-ended current */ DIFF_CURRENT, /* id - Differential current */ VSOURCE_CURRENT, /* vnam - Vsource name for input current */ CONDUCTANCE, /* g - Single-ended VCIS */ DIFF_CONDUCTANCE, /* gd - Differential VCIS */ RESISTANCE, /* h - Single-ended ICVS */ DIFF_RESISTANCE, /* hd - Differential ICVS */ DIGITAL, /* d - Digital */ USER_DEFINED, /* - Any user defined type */ } Port_Type_t; /* * The type of a parameter or Static_Var */ typedef enum { BOOLEAN, INTEGER, REAL, COMPLEX, STRING, POINTER, /* NOTE: POINTER should not be used for Parameters - only * Static_Vars - this is enforced by the cmpp. */ } Data_Type_t; /* * The complex type */ typedef struct { double real; double imag; } Complex_t; /* * Values of different types. * * Note that a struct is used instead of a union for conformity * with the use of the Mif_Value_t type in the simulator where * the type must be statically initialized. ANSI C does not * support useful initialization of unions. * */ typedef struct { Boolean_t bvalue; /* For BOOLEAN parameters */ int ivalue; /* For INTEGER parameters */ double rvalue; /* For REAL parameters */ Complex_t cvalue; /* For COMPLEX parameters */ char *svalue; /* For STRING parameters */ } Value_t; /* * Information about the model as a whole */ typedef struct { char *c_fcn_name; /* Name used in the C function */ char *model_name; /* Name used in a spice deck */ char *description; /* Description of the model */ } Name_Info_t; /* * Information about a connection */ typedef struct { char *name; /* Name of this connection */ char *description; /* Description of this connection */ Dir_t direction; /* IN, OUT, or INOUT */ Port_Type_t default_port_type; /* The default port type */ char *default_type; /* The default type in string form */ int num_allowed_types; /* The size of the allowed type arrays */ Port_Type_t *allowed_port_type; /* Array of allowed types */ char **allowed_type; /* Array of allowed types in string form */ Boolean_t is_array; /* True if connection is an array */ Boolean_t has_conn_ref; /* True if there is associated with an array conn */ int conn_ref; /* Subscript of the associated array conn */ Boolean_t has_lower_bound; /* True if there is an array size lower bound */ int lower_bound; /* Array size lower bound */ Boolean_t has_upper_bound; /* True if there is an array size upper bound */ int upper_bound; /* Array size upper bound */ Boolean_t null_allowed; /* True if null is allowed for this connection */ } Conn_Info_t; /* * Information about a parameter */ typedef struct { char *name; /* Name of this parameter */ char *description; /* Description of this parameter */ Data_Type_t type; /* Data type, e.g. REAL, INTEGER, ... */ Boolean_t has_default; /* True if there is a default value */ Value_t default_value; /* The default value */ Boolean_t has_lower_limit; /* True if there is a lower limit */ Value_t lower_limit; /* The lower limit for this parameter */ Boolean_t has_upper_limit; /* True if there is a upper limit */ Value_t upper_limit; /* The upper limit for this parameter */ Boolean_t is_array; /* True if parameter is an array */ Boolean_t has_conn_ref; /* True if there is associated with an array conn */ int conn_ref; /* Subscript of the associated array conn */ Boolean_t has_lower_bound; /* True if there is an array size lower bound */ int lower_bound; /* Array size lower bound */ Boolean_t has_upper_bound; /* True if there is an array size upper bound */ int upper_bound; /* Array size upper bound */ Boolean_t null_allowed; /* True if null is allowed for this parameter */ } Param_Info_t; /* * Information about an instance variable */ typedef struct { char *name; /* Name of this parameter */ char *description; /* Description of this parameter */ Data_Type_t type; /* Data type, e.g. REAL, INTEGER, ... */ Boolean_t is_array; /* True if parameter is an array */ } Inst_Var_Info_t; /* * The all encompassing structure for the ifs table information */ typedef struct { Name_Info_t name; /* The name table entries */ int num_conn; /* Number of entries in the connection table(s) */ Conn_Info_t *conn; /* Array of connection info structs */ int num_param; /* Number of entries in the parameter table(s) */ Param_Info_t *param; /* Array of parameter info structs */ int num_inst_var; /* Number of entries in the instance var table(s) */ Inst_Var_Info_t *inst_var; /* Array of instance variable info structs */ } Ifs_Table_t; /* *********************************************************************** */ void preprocess_ifs_file(void); void preprocess_lst_files(void); void preprocess_mod_file(char *filename); void init_error (char *program_name); #ifdef __GNUC__ void print_error(const char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); #else void print_error(const char *fmt, ...); #endif void str_to_lower(char *s); Status_t read_ifs_file(const char *filename, int mode, Ifs_Table_t *ifs_table); Status_t write_ifs_c_file(const char *filename, Ifs_Table_t *ifs_table); FILE *fopen_cmpp(const char **path_p, const char *mode); ngspice-26/src/xspice/cmpp/.gitignore0000644000265600020320000000010712264261473017240 0ustar andreasadmin/mod_yacc.c /mod_yacc.h /mod_lex.c /ifs_yacc.c /ifs_yacc.h /ifs_lex.c ngspice-26/src/xspice/cmpp/pp_ifs.c0000644000265600020320000000332012264261473016674 0ustar andreasadmin/*============================================================================ FILE pp_ifs.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the main function for processing an Interface Spec File (ifspec.ifs). INTERFACES preprocess_ifs_file() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include "cmpp.h" /* *********************************************************************** */ /* preprocess_ifs_file Function preprocess_ifs_file is the top-level driver function for preprocessing an Interface Specification file (ifspec.ifs). This function calls read_ifs_file() requesting it to read and parse the Interface Specification file and place the information contained in it into an internal data structure. Then write_ifs_c_file() is called to write the information out in a C file that will be compiled and linked with the simulator. */ void preprocess_ifs_file(void) { Ifs_Table_t ifs_table; /* Repository for info read from ifspec.ifs file */ Status_t status; /* Return status */ /* Read the entire ifspec.ifs file and load the data into ifs_table */ status = read_ifs_file(IFSPEC_FILENAME,GET_IFS_TABLE,&ifs_table); if(status != OK) { exit(1); } /* Write the ifspec.c file required by the spice simulator */ status = write_ifs_c_file("ifspec.c",&ifs_table); if(status != OK) { exit(1); } } ngspice-26/src/xspice/cmpp/ifs_lex.l0000644000265600020320000001036412264261473017064 0ustar andreasadmin%option case-insensitive %option prefix="ifs_yy" %option yylineno %option noyywrap %{ /*============================================================================ FILE ifs_lex.l MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 12/31/91 Bill Kuhn Change "array" to "vector" and "array_bounds" to "vector_bounds". SUMMARY This file defines tokens applicable to parsing the ifspec.ifs file, and actions to be taken on encountering those tokens. INTERFACES None. REFERENCED FILES ifs_yacc.y NON-STANDARD FEATURES None. ============================================================================*/ #include #include "ifs_yacc_y.h" #include "ifs_yacc.h" int yyival; double yydval; /* * IFS specs are case insensitive: */ /* saj - use -i flex command line option #undef input #define input() (((yytchar=yysptr>yysbuf?U(*--yysptr):getc(yyin))==10?(yylineno++,yytchar):yytchar)==EOF?0:isupper(yytchar)?tolower(yytchar):yytchar) */ /*---------------------------------------------------------------------------*/ %} %start BOOL CTYPE DIR DTYPE %x comment stringl %p 5000 W [ \t\n] A [_a-z] D [0-9] I [a-z_] Z [0-9a-z_] E [eE][+-]?{D}+ %% "/*" { BEGIN(comment); } [^*\n]* /* eat anything that's not a '*' */ "*"+[^*/\n]* /* eat up '*'s not followed by '/'s */ \n /* new line */ <> {ifs_yyerror ("Unterminated comment"); BEGIN(INITIAL); yyterminate(); } "*"+"/" { BEGIN(INITIAL); } "\"" { BEGIN(stringl); } [^\"]* { return TOK_STRING_LITERAL; } "\"" { BEGIN(INITIAL); } <> {ifs_yyerror ("Unterminated string literal"); BEGIN(INITIAL); yyterminate(); } allowed_types{W}*: {BEGIN CTYPE; return TOK_ALLOWED_TYPES;} vector{W}*: {BEGIN BOOL; return TOK_ARRAY;} vector_bounds{W}*: {return TOK_ARRAY_BOUNDS;} c_function_name{W}*: {return TOK_C_FUNCTION_NAME;} port_name{W}*: {return TOK_PORT_NAME;} port_table{W}*: {return TOK_PORT_TABLE;} data_type{W}*: {BEGIN DTYPE; return TOK_DATA_TYPE;} default_type{W}*: {BEGIN CTYPE; return TOK_DEFAULT_TYPE;} default_value{W}*: {return TOK_DEFAULT_VALUE;} description{W}*: {return TOK_DESCRIPTION;} direction{W}*: {BEGIN DIR; return TOK_DIRECTION;} static_var_name{W}*: {return TOK_STATIC_VAR_NAME;} static_var_table{W}*: {return TOK_STATIC_VAR_TABLE;} limits{W}*: {return TOK_LIMITS;} name_table{W}*: {return TOK_NAME_TABLE;} null_allowed{W}*: {BEGIN BOOL; return TOK_NULL_ALLOWED;} parameter_name{W}*: {return TOK_PARAMETER_NAME;} parameter_table{W}*: {return TOK_PARAMETER_TABLE;} spice_model_name{W}*: {return TOK_SPICE_MODEL_NAME;} yes {return TOK_BOOL_YES;} no {return TOK_BOOL_NO;} true {return TOK_BOOL_YES;} false {return TOK_BOOL_NO;} v {return TOK_CTYPE_V;} vd {return TOK_CTYPE_VD;} vnam {return TOK_CTYPE_VNAM;} i {return TOK_CTYPE_I;} id {return TOK_CTYPE_ID;} g {return TOK_CTYPE_G;} gd {return TOK_CTYPE_GD;} h {return TOK_CTYPE_H;} hd {return TOK_CTYPE_HD;} d {return TOK_CTYPE_D;} in {return TOK_DIR_IN;} out {return TOK_DIR_OUT;} inout {return TOK_DIR_INOUT;} real {return TOK_DTYPE_REAL;} int {return TOK_DTYPE_INT;} boolean {return TOK_DTYPE_BOOLEAN;} complex {return TOK_DTYPE_COMPLEX;} string {return TOK_DTYPE_STRING;} pointer {return TOK_DTYPE_POINTER;} "<" {return TOK_LANGLE;} ">" {return TOK_RANGLE;} "[" {return TOK_LBRACKET;} "]" {return TOK_RBRACKET;} "," {return TOK_COMMA;} "-" {return TOK_DASH;} {I}+{Z}* {return TOK_IDENTIFIER;} [+-]?{D}+ {yyival = atoi (yytext); return TOK_INT_LITERAL;} [+-]?{D}+"."{D}*({E})? | [+-]?{D}*"."{D}+({E})? | [+-]?{D}+({E})? {yydval = atof (yytext); return TOK_REAL_LITERAL;} . ; /* ignore anything else */ \n ; /* ignore anything else */ %% /*--------------------------------------------------------------------------*/ #if 0 void reset_lex_context (void) { BEGIN 0; } #endif ngspice-26/src/xspice/cmpp/pp_mod.c0000644000265600020320000001101512264261473016672 0ustar andreasadmin/*============================================================================ FILE pp_mod.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY This file contains the top-level driver function for preprocessing the "cfunc.mod" file. First, the "ifspec.ifs" file is opened and parsed to get the data that will be needed in the .mod to .c translation (See read_ifs.c). Then the .mod file is translated. Most of the work of the translation is handled by the UNIX 'lex' and 'yacc' utilities. This translation is begun at the call to mod_yyparse() below. See also files: mod_lex.l mod_yacc.y Note that to allow lex/yacc to be used twice (once for the ifspec.ifs file, and then again for the cfunc.mod file), the functions created by lex/yacc for the latter are translated using the UNIX text editor 'sed' under the direction of the Makefile and the following 'sed scripts': mod_lex.sed mod_yacc.sed Hence the call to 'mod_yyparse()' rather than 'yyparse()' below. INTERFACES preprocess_mod_file() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include #include #include "mod_yacc_y.h" extern int mod_yyparse(void); extern void mod_yyrestart (FILE*); extern FILE *mod_yyin; extern FILE *mod_yyout; extern int mod_yylineno; extern char *mod_yytext; extern int mod_num_errors; extern Ifs_Table_t *mod_ifs_table; extern const char *current_filename; extern char *prog_name; /*---------------------------------------------------------------------------*/ static char *change_extension (char *filename, char *ext) { char *p = strrchr(filename, '.'); size_t prefix_len = p ? (size_t) (p-filename+1) : strlen(filename); char *new_filename = malloc(prefix_len + strlen(ext) + 1); strncpy(new_filename, filename, prefix_len); strcpy(new_filename+prefix_len, ext); return new_filename; } /*---------------------------------------------------------------------------*/ /* preprocess_mod_file Function preprocess_mod_file is the top-level driver function for preprocessing a code model file (cfunc.mod). This function calls read_ifs_file() requesting it to read and parse the Interface Specification file (ifspec.ifs) and place the information contained in it into an internal data structure. It then calls mod_yyparse() to read the cfunc.mod file and translate it according to the Interface Specification information. Function mod_yyparse() is automatically generated by UNIX lex/yacc utilities. */ void preprocess_mod_file ( char *filename) /* The file to read */ { Ifs_Table_t ifs_table; /* info read from ifspec.ifs file */ Status_t status; /* Return status */ const char *output_filename; /* * Read the entire ifspec.ifs file and load the data into ifs_table */ status = read_ifs_file (IFSPEC_FILENAME, GET_IFS_TABLE, &ifs_table); if (status != OK) { exit(1); } current_filename = filename; mod_yyin = fopen_cmpp (¤t_filename, "r"); if (mod_yyin == NULL) { print_error("ERROR - Could not open input .mod file: %s", current_filename); exit(1); } output_filename = change_extension (filename, "c"); mod_yyout = fopen_cmpp (&output_filename, "w"); if (mod_yyout == NULL) { print_error("ERROR - Could not open output .c file: %s", output_filename); exit(1); } mod_ifs_table = &ifs_table; mod_num_errors = 0; fprintf (mod_yyout, "#line 1 \"%s\"\n", current_filename); fprintf (mod_yyout, "#include \"ngspice/cm.h\"\n"); fprintf (mod_yyout, "extern void %s(Mif_Private_t *);\n", ifs_table.name.c_fcn_name); fprintf (mod_yyout, "#line 1 \"%s\"\n", current_filename); mod_yylineno = 1; if (mod_yyparse() || (mod_num_errors > 0)) { print_error("Error parsing .mod file: \"%s\"", current_filename); unlink (output_filename); exit (1); } fclose (mod_yyout); mod_yyrestart(NULL); } /*---------------------------------------------------------------------------*/ void mod_yyerror (char *str) { fprintf (stderr, "%s: Error: \"%s\": line %d (near \'%s\'):\n\t%s.\n", prog_name, current_filename, mod_yylineno, mod_yytext, str); } ngspice-26/src/xspice/cmpp/writ_ifs.c0000644000265600020320000010436512264261473017255 0ustar andreasadmin/*============================================================================ FILE writ_ifs.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions used to write out the file "ifspec.c" based on information read from "ifspec.ifs", which is now held in structure 'ifs_table' passed to write_ifs_c_file(). INTERFACES write_ifs_c_file() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include #include "cmpp.h" /* Local function prototypes */ static void write_comment(FILE *fp, Ifs_Table_t *ifs_table); static void write_includes(FILE *fp); static void write_mPTable(FILE *fp, Ifs_Table_t *ifs_table); static void write_pTable(FILE *fp, Ifs_Table_t *ifs_table); static void write_conn_info(FILE *fp, Ifs_Table_t *ifs_table); static void write_param_info(FILE *fp, Ifs_Table_t *ifs_table); static void write_inst_var_info(FILE *fp, Ifs_Table_t *ifs_table); static void write_SPICEdev(FILE *fp, Ifs_Table_t *ifs_table); static char *data_type_to_str(Data_Type_t type); static char *port_type_to_str(Port_Type_t port); static char *dir_to_str(Dir_t dir); static char *value_to_str(Data_Type_t type, Value_t value); static char *no_value_to_str(void); static char *boolean_to_str(Boolean_t value); static char *integer_to_str(int value); static char *gen_port_type_str(Port_Type_t port); /* *********************************************************************** */ /* write_ifs_c_file Function write_ifs_c_file is a top-level driver function for creating a C file (ifspec.c) that defines the model Interface Specification in a form usable by the simulator. The ifspec.c output file is opened for writing, and then each of the following functions is called in order to write the necessary statements and data structures into the file: write_comment write_includes write_mPTable write_conn_info write_param_info write_inst_var_info write_SPICEdev The output file is then closed. */ Status_t write_ifs_c_file( const char *filename, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { FILE *fp; /* File pointer */ int int_status; /* returned status from fclose */ /* Open the ifspec.c file for write access */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Can't create file: %s", filename); return(ERROR); } /* Write out a comment section at the top of the file */ write_comment(fp, ifs_table); /* Put in the # includes */ write_includes(fp); /* Write the SPICE3 required XXXmPTable structure */ write_mPTable(fp, ifs_table); /* Write the SPICE3 required XXXpTable structure */ write_pTable(fp, ifs_table); /* Write out the connector table required for the code model element parser */ write_conn_info(fp, ifs_table); /* Write out the parameter table required for the code model element parser */ write_param_info(fp, ifs_table); /* Write out the instance variable table required for the code model element parser */ write_inst_var_info(fp, ifs_table); /* Write out the externally visible structure for this model */ write_SPICEdev(fp, ifs_table); /* Close the ifspec.c file and return */ int_status = fclose(fp); if(int_status == 0) return(OK); else return(ERROR); } /* *********************************************************************** */ /* write_comment Function write_comment places a comment at the top of the ifspec.c file warning the user that this file is automatically generated and should not be edited. */ static void write_comment( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { fprintf(fp, "\n"); fprintf(fp, "/*\n"); fprintf(fp, " * Structures for model: %s\n", ifs_table->name.model_name); fprintf(fp, " *\n"); fprintf(fp, " * Automatically generated by cmpp preprocessor\n"); fprintf(fp, " *\n"); fprintf(fp, " * !!! DO NOT EDIT !!!\n"); fprintf(fp, " *\n"); fprintf(fp, " */\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_includes Function write_includes writes the C header files required in ifspec.c. */ static void write_includes( FILE *fp) /* File to write to */ { fprintf(fp, "\n"); fprintf(fp, "#include \"ngspice/ngspice.h\"\n"); /* fprintf(fp, "#include \"ngspice/prefix.h\"\n");*/ fprintf(fp, "#include \n"); fprintf(fp, "#include \"ngspice/devdefs.h\"\n"); fprintf(fp, "#include \"ngspice/ifsim.h\"\n"); fprintf(fp, "#include \"ngspice/mifdefs.h\"\n"); fprintf(fp, "#include \"ngspice/mifproto.h\"\n"); fprintf(fp, "#include \"ngspice/mifparse.h\"\n"); /* fprintf(fp, "#include \"ngspice/suffix.h\"\n");*/ fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_pTable Function write_pTable writes the instance parameter information using SPICE's IFparm structure type. This table defines the parameters as output only variables using SPICE's ``OP'' macro. These instance parameters are derived from the Interface Specification file's STATIC_VAR table and define the parameters that can be queried using the SPICE 3C1 .save feature. */ static void write_pTable( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { int i; char str[80]; Boolean_t is_array; Data_Type_t type; /* Only write the pTable if there is something to put in it. */ /* Otherwise, we will put NULL in the SPICEdev structure in its slot */ if(ifs_table->num_inst_var == 0) return; /* Write the structure beginning */ fprintf(fp, "\n"); fprintf(fp, "static IFparm MIFpTable[] = {\n"); /* Write out an entry for each instance variable in the table */ /* Use the index of the element in the instance variable info array */ /* ADDED TO the number of parameters as the SPICE3 integer tag. */ for(i = 0; i < ifs_table->num_inst_var; i++) { /* Use the SPICE3 OP macro since instance vars are output-only */ fprintf(fp, " OP("); /* Put in the name of the parameter and the integer tag */ fprintf(fp, "\"%s\", ", ifs_table->inst_var[i].name); fprintf(fp, "%d, ", i + ifs_table->num_param); /* Format SPICE3 type according to parameter type field */ type = ifs_table->inst_var[i].type; is_array = ifs_table->inst_var[i].is_array; strcpy(str,""); if(is_array == TRUE) { strcat(str,"("); } if(type == BOOLEAN) { strcat(str,"IF_FLAG"); /* There is no BOOLEAN in SPICE3 */ } else if(type == INTEGER) { strcat(str,"IF_INTEGER"); } else if(type == REAL) { strcat(str,"IF_REAL"); } else if(type == COMPLEX) { strcat(str,"IF_COMPLEX"); } else if(type == STRING) { strcat(str,"IF_STRING"); } else if(type == POINTER) { strcat(str,"IF_STRING"); } else { print_error("INTERNAL ERROR - write_pTable() - Impossible data type."); } if(is_array == TRUE) { strcat(str,"|IF_VECTOR)"); } fprintf(fp, "%s, ", str); /* Put in the description string and finish this line off */ fprintf(fp, "\"%s\"", ifs_table->inst_var[i].description); fprintf(fp, "),\n"); } /* Finish off the structure */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_mPTable Function write_mPTable writes the model parameter information using SPICE's IFparm structure type. This table defines the parameters to be input/output variables using SPICE's ``IOP'' macro so that these variables can be set or queried from SPICE. These model parameters are derived from the Interface Specification's PARAMETER table. */ static void write_mPTable( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { int i; char str[80]; Boolean_t is_array; Data_Type_t type; /* Only write the mPTable if there is something to put in it. */ /* Otherwise, we will put NULL in the SPICEdev structure in its slot */ if(ifs_table->num_param == 0) return; /* Write the structure beginning */ fprintf(fp, "\n"); fprintf(fp, "static IFparm MIFmPTable[] = {\n"); /* Write out an entry for each parameter in the table */ /* Use the index of the element in the parameter info array */ /* as the SPICE3 integer tag. */ for(i = 0; i < ifs_table->num_param; i++) { /* Use the SPICE3 IOP macro since model parameters are input/output */ fprintf(fp, " IOP("); /* Put in the name of the parameter and the integer tag */ fprintf(fp, "\"%s\", ", ifs_table->param[i].name); fprintf(fp, "%d, ", i); /* Format SPICE3 type according to parameter type field */ type = ifs_table->param[i].type; is_array = ifs_table->param[i].is_array; strcpy(str,""); if(is_array == TRUE) { strcat(str,"("); } if(type == BOOLEAN) { strcat(str,"IF_FLAG"); /* There is no BOOLEAN in SPICE3 */ } else if(type == INTEGER) { strcat(str,"IF_INTEGER"); } else if(type == REAL) { strcat(str,"IF_REAL"); } else if(type == COMPLEX) { strcat(str,"IF_COMPLEX"); } else if(type == STRING) { strcat(str,"IF_STRING"); } else { print_error("INTERNAL ERROR - write_mPTable() - Impossible data type."); } if(is_array == TRUE) { strcat(str,"|IF_VECTOR)"); } fprintf(fp, "%s, ", str); /* Put in the description string and finish this line off */ fprintf(fp, "\"%s\"", ifs_table->param[i].description); fprintf(fp, "),\n"); } /* Finish off the structure */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_conn_info Function write_conn_info writes information used by the Simulator's new MIF package to interpret and error check a model's connection list in a SPICE deck. This information is derived from the Interface Specification file's PORT table. */ static void write_conn_info( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { int i; int j; char *str; /* Only write the connTable if there is something to put in it. */ /* Otherwise, we will put NULL in the SPICEdev structure in its slot */ if(ifs_table->num_conn == 0) /* An unlikely condition for sure ... */ return; /* First, we must define arrays of port types */ /* Note that there should be always at least one allowed port type */ /* so we don't have to worry about arrays with no elements */ for(i = 0; i < ifs_table->num_conn; i++) { fprintf(fp, "\n"); fprintf(fp, "static Mif_Port_Type_t MIFportEnum%d[] = {\n", i); if(ifs_table->conn[i].num_allowed_types < 1) print_error("ERROR - write_conn_info() - Number of allowed types cannot be zero"); for(j = 0; j < ifs_table->conn[i].num_allowed_types; j++) { str = port_type_to_str(ifs_table->conn[i].allowed_port_type[j]); fprintf(fp, "\t%s,\n", str); } /* for number of allowed types */ fprintf(fp, "};\n"); fprintf(fp, "\n"); fprintf(fp, "\n"); fprintf(fp, "static char *MIFportStr%d[] = {\n", i); for(j = 0; j < ifs_table->conn[i].num_allowed_types; j++) { if(ifs_table->conn[i].allowed_port_type[j] == USER_DEFINED) fprintf(fp, "\t\"%s\",\n", ifs_table->conn[i].allowed_type[j]); else { str = gen_port_type_str(ifs_table->conn[i].allowed_port_type[j]); fprintf(fp, "\t\"%s\",\n", str); } } /* for number of allowed types */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* for number of connections */ /* Now write the structure */ fprintf(fp, "\n"); fprintf(fp, "static Mif_Conn_Info_t MIFconnTable[] = {\n"); /* Write out an entry for each parameter in the table */ for(i = 0; i < ifs_table->num_conn; i++) { fprintf(fp, " {\n"); fprintf(fp, " \"%s\",\n",ifs_table->conn[i].name); fprintf(fp, " \"%s\",\n",ifs_table->conn[i].description); str = dir_to_str(ifs_table->conn[i].direction); fprintf(fp, " %s,\n", str); str = port_type_to_str(ifs_table->conn[i].default_port_type); fprintf(fp, " %s,\n", str); fprintf(fp, " \"%s\",\n", (ifs_table->conn[i].default_port_type == USER_DEFINED) ? ifs_table->conn[i].default_type : gen_port_type_str (ifs_table->conn[i].default_port_type)); fprintf(fp," %d,\n",ifs_table->conn[i].num_allowed_types); fprintf(fp, " MIFportEnum%d,\n", i); fprintf(fp, " MIFportStr%d,\n", i); str = boolean_to_str(ifs_table->conn[i].is_array); fprintf(fp, " %s,\n", str); if(ifs_table->conn[i].is_array == FALSE) { str = boolean_to_str(FALSE); /* has_lower_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* lower_bound */ fprintf(fp, " %s,\n", str); str = boolean_to_str(FALSE); /* has_upper_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* upper_bound */ fprintf(fp, " %s,\n", str); } else { /* is_array == TRUE */ str = boolean_to_str(ifs_table->conn[i].has_lower_bound); fprintf(fp, " %s,\n", str); if(ifs_table->conn[i].has_lower_bound == TRUE) str = integer_to_str(ifs_table->conn[i].lower_bound); else str = integer_to_str(0); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->conn[i].has_upper_bound); fprintf(fp, " %s,\n", str); if(ifs_table->conn[i].has_upper_bound == TRUE) str = integer_to_str(ifs_table->conn[i].upper_bound); else str = integer_to_str(0); fprintf(fp, " %s,\n", str); } /* if is_array */ str = boolean_to_str(ifs_table->conn[i].null_allowed); fprintf(fp, " %s,\n", str); fprintf(fp, " },\n"); } /* for number of parameters */ /* Finish off the structure */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_param_info Function write_param_info writes information used by the Simulator's new MIF package to interpret and error check a model's parameter list in an XSPICE deck. This information is derived from the Interface Specification file's PARAMETER table. It is essentially a superset of the IFparm information written by write_mPTable(). The IFparm information written by write_mPTable() is required to work with SPICE's device set and query functions. The information written by write_param_info is more extensive and is required to parse and error check the XSPICE input deck. */ static void write_param_info( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { int i; char *str; /* Only write the paramTable if there is something to put in it. */ /* Otherwise, we will put NULL in the SPICEdev structure in its slot */ if(ifs_table->num_param == 0) return; /* Write the structure beginning */ fprintf(fp, "\n"); fprintf(fp, "static Mif_Param_Info_t MIFparamTable[] = {\n"); /* Write out an entry for each parameter in the table */ for(i = 0; i < ifs_table->num_param; i++) { fprintf(fp, " {\n"); fprintf(fp, " \"%s\",\n",ifs_table->param[i].name); fprintf(fp, " \"%s\",\n",ifs_table->param[i].description); str = data_type_to_str(ifs_table->param[i].type); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].has_default); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_default == TRUE) str = value_to_str(ifs_table->param[i].type, ifs_table->param[i].default_value); else str = no_value_to_str(); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].has_lower_limit); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_lower_limit == TRUE) str = value_to_str(ifs_table->param[i].type, ifs_table->param[i].lower_limit); else str = no_value_to_str(); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].has_upper_limit); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_upper_limit == TRUE) str = value_to_str(ifs_table->param[i].type, ifs_table->param[i].upper_limit); else str = no_value_to_str(); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].is_array); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].is_array == FALSE) { str = boolean_to_str(FALSE); /* has_conn_ref */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* conn_ref */ fprintf(fp, " %s,\n", str); str = boolean_to_str(FALSE); /* has_lower_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* lower_bound */ fprintf(fp, " %s,\n", str); str = boolean_to_str(FALSE); /* has_upper_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* upper_bound */ fprintf(fp, " %s,\n", str); } else { /* is_array == TRUE */ str = boolean_to_str(ifs_table->param[i].has_conn_ref); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_conn_ref == TRUE) { str = integer_to_str(ifs_table->param[i].conn_ref); fprintf(fp, " %s,\n", str); str = boolean_to_str(FALSE); /* has_lower_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* lower_bound */ fprintf(fp, " %s,\n", str); str = boolean_to_str(FALSE); /* has_upper_bound */ fprintf(fp, " %s,\n", str); str = integer_to_str(0); /* upper_bound */ fprintf(fp, " %s,\n", str); } else { /* has_conn_ref == FALSE */ str = integer_to_str(0); /* conn_ref */ fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].has_lower_bound); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_lower_bound == TRUE) str = integer_to_str(ifs_table->param[i].lower_bound); else str = integer_to_str(0); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->param[i].has_upper_bound); fprintf(fp, " %s,\n", str); if(ifs_table->param[i].has_upper_bound == TRUE) str = integer_to_str(ifs_table->param[i].upper_bound); else str = integer_to_str(0); fprintf(fp, " %s,\n", str); } /* if has_conn_ref */ } /* if is_array */ str = boolean_to_str(ifs_table->param[i].null_allowed); fprintf(fp, " %s,\n", str); fprintf(fp, " },\n"); } /* for number of parameters */ /* Finish off the structure */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_inst_var_info Function write_inst_var_info writes information used by the Simulator's new MIF package to allocate space for and to output (using SPICE's .save feature) variables defined in the Interface Specification file's STATIC_VAR table. It is essentially a superset of the IFparm information written by write_mPTable(). The IFparm information written by write_pTable() is required to work with SPICE's device query functions. The information written by write_inst_var_info is more extensive. */ static void write_inst_var_info( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { int i; char *str; /* Only write the inst_varTable if there is something to put in it. */ /* Otherwise, we will put NULL in the SPICEdev structure in its slot */ if(ifs_table->num_inst_var == 0) return; /* Write the structure beginning */ fprintf(fp, "\n"); fprintf(fp, "static Mif_Inst_Var_Info_t MIFinst_varTable[] = {\n"); /* Write out an entry for each parameter in the table */ for(i = 0; i < ifs_table->num_inst_var; i++) { fprintf(fp, " {\n"); fprintf(fp, " \"%s\",\n",ifs_table->inst_var[i].name); fprintf(fp, " \"%s\",\n",ifs_table->inst_var[i].description); str = data_type_to_str(ifs_table->inst_var[i].type); fprintf(fp, " %s,\n", str); str = boolean_to_str(ifs_table->inst_var[i].is_array); fprintf(fp, " %s,\n", str); fprintf(fp, " },\n"); } /* for number of parameters */ /* Finish off the structure */ fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* write_SPICEdev Function write_SPICEdev writes the global XXX_info structure used by SPICE to define a model. Here ``XXX'' is the name of the code model. This structure contains the name of the model, a pointer to the C function that implements the model, and pointers to all of the above data structures. */ static void write_SPICEdev( FILE *fp, /* File to write to */ Ifs_Table_t *ifs_table) /* Table of Interface Specification data */ { /* Extern the code model function name */ fprintf(fp, "\n"); fprintf(fp, "extern void %s(Mif_Private_t *);\n", ifs_table->name.c_fcn_name); /* SPICE now needs these static integers */ fprintf(fp, "\n"); fprintf(fp, "static int val_terms = 0;\n"); fprintf(fp, "static int val_numNames = 0;\n"); fprintf(fp, "static int val_numInstanceParms = %d;\n",ifs_table->num_inst_var); fprintf(fp, "static int val_numModelParms = %d;\n",ifs_table->num_param); fprintf(fp, "static int val_sizeofMIFinstance = sizeof(MIFinstance);\n"); fprintf(fp, "static int val_sizeofMIFmodel = sizeof(MIFmodel);\n"); /* Write out the structure beginning */ /* Use the c function external identifier appended with _info as the */ /* external identifier for the structure. */ fprintf(fp, "\n"); fprintf(fp, "SPICEdev %s_info = {\n", ifs_table->name.c_fcn_name); /* Write the IFdevice structure */ fprintf(fp, " { \"%s\",\n", ifs_table->name.model_name); fprintf(fp, " \"%s\",\n", ifs_table->name.description); fprintf(fp, " &val_terms,\n"); fprintf(fp, " &val_numNames,\n"); fprintf(fp, " NULL,\n"); fprintf(fp, " &val_numInstanceParms,\n"); if(ifs_table->num_inst_var > 0) fprintf(fp, " MIFpTable,\n"); else fprintf(fp, " NULL,\n"); fprintf(fp, " &val_numModelParms,\n"); if(ifs_table->num_param > 0) fprintf(fp, " MIFmPTable,\n"); else fprintf(fp, " NULL,\n"); fprintf(fp, " %s,\n", ifs_table->name.c_fcn_name); fprintf(fp, " %d,\n", ifs_table->num_conn); if(ifs_table->num_conn > 0) fprintf(fp, " MIFconnTable,\n"); else fprintf(fp, " NULL,\n"); fprintf(fp, " %d,\n", ifs_table->num_param); if(ifs_table->num_param > 0) fprintf(fp, " MIFparamTable,\n"); else fprintf(fp, " NULL,\n"); fprintf(fp, " %d,\n", ifs_table->num_inst_var); if(ifs_table->num_inst_var > 0) fprintf(fp, " MIFinst_varTable,\n"); else fprintf(fp, " NULL,\n"); fprintf(fp, " 0, /* flags */\n"); fprintf(fp, " },\n"); /* Write the names of the generic code model functions */ fprintf(fp, "NULL, \n"); /* DEVparam */ fprintf(fp, "MIFmParam, \n"); /* DEVmodParam */ fprintf(fp, "MIFload, \n"); /* DEVload */ fprintf(fp, "MIFsetup, \n"); /* DEVsetup */ fprintf(fp, "MIFunsetup, \n"); /* DEVunsetup */ fprintf(fp, "NULL, \n"); /* DEVpzSetup */ fprintf(fp, "NULL, \n"); /* DEVtemperature */ fprintf(fp, "MIFtrunc, \n"); /* DEVtrunc */ fprintf(fp, "NULL, \n"); /* DEVfindBranch */ fprintf(fp, "MIFload, \n"); /* DEVacLoad */ fprintf(fp, "NULL, \n"); /* DEVaccept */ fprintf(fp, "MIFdestroy, \n"); /* DEVdestroy */ fprintf(fp, "MIFmDelete, \n"); /* DEVmodDelete */ fprintf(fp, "MIFdelete, \n"); /* DEVdelete */ fprintf(fp, "NULL, \n"); /* DEVsetic */ fprintf(fp, "MIFask, \n"); /* DEVask */ fprintf(fp, "MIFmAsk, \n"); /* DEVmodAsk */ fprintf(fp, "NULL, \n"); /* DEVpzLoad */ fprintf(fp, "MIFconvTest, \n"); /* DEVconvTest */ fprintf(fp, "NULL, \n"); /* DEVsenSetup */ fprintf(fp, "NULL, \n"); /* DEVsenLoad */ fprintf(fp, "NULL, \n"); /* DEVSenUpdate */ fprintf(fp, "NULL, \n"); /* DEVsenAcLoad */ fprintf(fp, "NULL, \n"); /* DEVsenPrint */ fprintf(fp, "NULL, \n"); /* DEVsenTrunc */ fprintf(fp, "NULL, \n"); /* DEVdisto */ fprintf(fp, "NULL, \n"); /* DEVnoise */ fprintf(fp, "NULL, \n"); /* DEVsoaCheck */ fprintf(fp, "#ifdef CIDER \n"); /* CIDER enhancements */ fprintf(fp, "NULL, \n"); /* DEVdump */ fprintf(fp, "NULL, \n"); /* DEVacct */ fprintf(fp, "#endif \n"); /* CIDER enhancements */ /* Write the sizeof stuff used in dynamic allocation of inst/model structs */ fprintf(fp, "&val_sizeofMIFinstance,\n"); fprintf(fp, "&val_sizeofMIFmodel,\n"); fprintf(fp, "\n"); fprintf(fp, "};\n"); fprintf(fp, "\n"); } /* *********************************************************************** */ /* The following functions are utility routines used to convert internal enums and data to ASCII form for placing into the .c file being created. */ #define BASE_STR_LEN 80 static char *data_type_to_str(Data_Type_t type) { static char *str = NULL; if(str == NULL) str = (char *) malloc(BASE_STR_LEN+1); switch(type) { case BOOLEAN: strcpy(str,"MIF_BOOLEAN"); break; case INTEGER: strcpy(str,"MIF_INTEGER"); break; case REAL: strcpy(str,"MIF_REAL"); break; case COMPLEX: strcpy(str,"MIF_COMPLEX"); break; case STRING: strcpy(str,"MIF_STRING"); break; case POINTER: strcpy(str,"MIF_STRING"); break; default: print_error("INTERNAL ERROR - data_type_to_str() - Impossible data type."); } return(str); } /* *********************************************************************** */ static char *port_type_to_str(Port_Type_t port) { static char *str = NULL; if(str == NULL) str = (char *) malloc(BASE_STR_LEN+1); switch(port) { case VOLTAGE: strcpy(str,"MIF_VOLTAGE"); break; case DIFF_VOLTAGE: strcpy(str,"MIF_DIFF_VOLTAGE"); break; case CURRENT: strcpy(str,"MIF_CURRENT"); break; case DIFF_CURRENT: strcpy(str,"MIF_DIFF_CURRENT"); break; case VSOURCE_CURRENT: strcpy(str,"MIF_VSOURCE_CURRENT"); break; case CONDUCTANCE: strcpy(str,"MIF_CONDUCTANCE"); break; case DIFF_CONDUCTANCE: strcpy(str,"MIF_DIFF_CONDUCTANCE"); break; case RESISTANCE: strcpy(str,"MIF_RESISTANCE"); break; case DIFF_RESISTANCE: strcpy(str,"MIF_DIFF_RESISTANCE"); break; case DIGITAL: strcpy(str,"MIF_DIGITAL"); break; case USER_DEFINED: strcpy(str,"MIF_USER_DEFINED"); break; default: print_error("INTERNAL ERROR - port_type_to_str() - Impossible port type."); } return(str); } /* *********************************************************************** */ static char *gen_port_type_str(Port_Type_t port) { static char *str = NULL; if(str == NULL) str = (char *) malloc(BASE_STR_LEN+1); switch(port) { case VOLTAGE: strcpy(str,"v"); break; case DIFF_VOLTAGE: strcpy(str,"vd"); break; case CURRENT: strcpy(str,"i"); break; case DIFF_CURRENT: strcpy(str,"id"); break; case VSOURCE_CURRENT: strcpy(str,"vnam"); break; case CONDUCTANCE: strcpy(str,"g"); break; case DIFF_CONDUCTANCE: strcpy(str,"gd"); break; case RESISTANCE: strcpy(str,"h"); break; case DIFF_RESISTANCE: strcpy(str,"hd"); break; case DIGITAL: strcpy(str,"d"); break; case USER_DEFINED: strcpy(str,""); break; default: print_error("INTERNAL ERROR - gen_port_type_str() - Impossible port type."); } return(str); } /* *********************************************************************** */ static char *dir_to_str(Dir_t dir) { static char *str = NULL; if(str == NULL) str = (char *) malloc(BASE_STR_LEN+1); switch(dir) { case IN: strcpy(str,"MIF_IN"); break; case OUT: strcpy(str,"MIF_OUT"); break; case INOUT: strcpy(str,"MIF_INOUT"); break; default: print_error("INTERNAL ERROR - dir_to_str() - Impossible direction type."); } return(str); } /* *********************************************************************** */ static char *value_to_str(Data_Type_t type, Value_t value) { static char *str = NULL; static int max_len = 0; char *bool_str; int str_len; if(str == NULL) { str = (char *) malloc(2 * BASE_STR_LEN + 1); max_len = 2 * BASE_STR_LEN; } switch(type) { case BOOLEAN: bool_str = boolean_to_str(value.bvalue); sprintf(str, "{%s, 0, 0.0, {0.0, 0.0}, NULL}", bool_str); break; case INTEGER: sprintf(str, "{MIF_FALSE, %d, 0.0, {0.0, 0.0}, NULL}", value.ivalue); break; case REAL: sprintf(str, "{MIF_FALSE, 0, %e, {0.0, 0.0}, NULL}", value.rvalue); break; case COMPLEX: sprintf(str, "{MIF_FALSE, 0, 0.0, {%e, %e}, NULL}", value.cvalue.real, value.cvalue.imag); break; case STRING: /* be careful, the string could conceivably be very long... */ str_len = (int) strlen(value.svalue); if((str_len + BASE_STR_LEN) > max_len) { str = (char *) realloc(str, (size_t) (max_len + str_len + 1)); max_len += str_len; } sprintf(str, "{MIF_FALSE, 0, 0.0, {0.0, 0.0}, \"%s\"}", value.svalue); break; default: print_error("INTERNAL ERROR - value_to_str() - Impossible data type."); } return(str); } /* *********************************************************************** */ static char *boolean_to_str(Boolean_t value) { static char *str = NULL; if(str == NULL) str = (char *) malloc(BASE_STR_LEN+1); switch(value) { case TRUE: strcpy(str,"MIF_TRUE"); break; case FALSE: strcpy(str,"MIF_FALSE"); break; default: print_error("INTERNAL ERROR - boolean_to_str() - Impossible boolean value."); { char *p = 0; *p = 0; } } return(str); } /* *********************************************************************** */ static char *integer_to_str(int value) { static char *str = NULL; if(str == NULL) { str = (char *) malloc(BASE_STR_LEN + 1); } sprintf(str, "%d", value); return(str); } /* *********************************************************************** */ static char *no_value_to_str(void) { static char *str = NULL; if(str == NULL) { str = (char *) malloc(BASE_STR_LEN + 1); } sprintf(str, "{MIF_FALSE, 0, 0.0, {0.0, 0.0}, NULL}"); return(str); } ngspice-26/src/xspice/cmpp/mod_yacc.y0000644000265600020320000004162712264261473017234 0ustar andreasadmin%{ /*============================================================================ FILE mod_yacc.y MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 20050420 Steven Borley Renamed strcmpi() to local_strcmpi() to avoid clash with strcmpi() in a windows header file. SUMMARY This file contains a BNF specification of the translation of cfunc.mod files to cfunc.c files, together with various support functions. INTERFACES mod_yyparse() - Function 'yyparse()' is generated automatically by UNIX 'yacc' utility and then converted to 'mod_yyparse()' by UNIX 'sed' utility under direction of Makefile. REFERENCED FILES mod_lex.l NON-STANDARD FEATURES Names of functions generated by 'yacc' are translated by 'sed' under direction of the Makefile to prevent collisions with functions generated from ifs_yacc.y. ============================================================================*/ #include #include #include #include "mod_yacc_y.h" extern int mod_yylex(void); #define yymaxdepth mod_yymaxdepth #define yyparse mod_yyparse #define yylex mod_yylex #define yyerror mod_yyerror #define yylval mod_yylval #define yychar mod_yychar #define yydebug mod_yydebug #define yypact mod_yypact #define yyr1 mod_yyr1 #define yyr2 mod_yyr2 #define yydef mod_yydef #define yychk mod_yychk #define yypgo mod_yypgo #define yyact mod_yyact #define yyexca mod_yyexca #define yyerrflag mod_yyerrflag #define yynerrs mod_yynerrs #define yyps mod_yyps #define yypv mod_yypv #define yys mod_yys #define yy_yys mod_yyyys #define yystate mod_yystate #define yytmp mod_yytmp #define yyv mod_yyv #define yy_yyv mod_yyyyv #define yyval mod_yyval #define yylloc mod_yylloc #define yyreds mod_yyreds #define yytoks mod_yytoks #define yylhs mod_yyyylhs #define yylen mod_yyyylen #define yydefred mod_yyyydefred #define yydgoto mod_yyyydgoto #define yysindex mod_yyyysindex #define yyrindex mod_yyyyrindex #define yygindex mod_yyyygindex #define yytable mod_yyyytable #define yycheck mod_yyyycheck #define yyname mod_yyyyname #define yyrule mod_yyyyrule Ifs_Table_t *mod_ifs_table; extern char *mod_yytext; extern FILE* mod_yyout; #include #include int mod_num_errors; #define BUFFER_SIZE 3000 static char buffer [BUFFER_SIZE]; static int buf_len; typedef enum {CONN, PARAM, STATIC_VAR} Id_Kind_t; /*--------------------------------------------------------------------------*/ static char *subscript (Sub_Id_t sub_id) { if (sub_id.has_subscript) { return sub_id.subscript; } else { return "0"; } } /*--------------------------------------------------------------------------*/ static int local_strcmpi(char *s, char *t) /* string compare - case insensitive */ { for (; *s && t && tolower(*s) == tolower(*t); s++, t++) ; if (*s && !*t) { return 1; } if (!*s && *t) { return -1; } if (! (*s || *t)) { return 0; } return (tolower(*s) - tolower(*t)); } /*---------------------------------------------------------------------------*/ static void put_type (FILE *fp, Data_Type_t type) { char ch = ' '; switch (type) { case INTEGER: ch = 'i'; break; case REAL: ch = 'r'; break; case COMPLEX: ch = 'c'; break; case BOOLEAN: ch = 'b'; break; case STRING: ch = 's'; break; case POINTER: ch = 'p'; break; } fprintf (fp, ".%cvalue", ch); } /*---------------------------------------------------------------------------*/ static void put_conn_type (FILE *fp, Port_Type_t type) { char ch; switch (type) { case USER_DEFINED: ch = 'p'; break; case DIGITAL: ch = 'p'; break; default: ch = 'r'; break; } fprintf (fp, ".%cvalue", ch); } /*---------------------------------------------------------------------------*/ static void check_dir (int conn_number, Dir_t dir, char *context) { Dir_t conn_dir; if (conn_number >= 0) { /* * If negative, this is an invalid port ID and we've already issued * an error. */ conn_dir = mod_ifs_table->conn[conn_number].direction; if ((conn_dir != dir) && (conn_dir != INOUT)) { char error_str[200]; sprintf (error_str, "Direction of port `%s' in %s() is not %s or INOUT", mod_ifs_table->conn[conn_number].name, context, (dir == IN) ? "IN" : "OUT"); yyerror (error_str); mod_num_errors++; } } } /*---------------------------------------------------------------------------*/ static void check_subscript (Boolean_t formal, Boolean_t actual, Boolean_t missing_actual_ok, char *context, char *id) { char error_str[200]; if ((formal && !actual) && !missing_actual_ok) { sprintf (error_str, "%s `%s' is an array - subscript required", context, id); yyerror (error_str); mod_num_errors++; return; } else if (!formal && actual) { sprintf (error_str, "%s `%s' is not an array - subscript prohibited", context, id); yyerror (error_str); mod_num_errors++; return; } } /*---------------------------------------------------------------------------*/ static int check_id (Sub_Id_t sub_id, Id_Kind_t kind, Boolean_t do_subscript) { int i; char error_str[200]; switch (kind) { case CONN: for (i = 0; i < mod_ifs_table->num_conn; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->conn[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->conn[i].is_array, sub_id.has_subscript, FALSE, "Port", sub_id.id); } return i; } } break; case PARAM: for (i = 0; i < mod_ifs_table->num_param; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->param[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->param[i].is_array, sub_id.has_subscript, FALSE, "Parameter", sub_id.id); } return i; } } break; case STATIC_VAR: for (i = 0; i < mod_ifs_table->num_inst_var; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->inst_var[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->inst_var[i].is_array, sub_id.has_subscript, TRUE, "Static Variable", sub_id.id); } return i; } } break; } sprintf (error_str, "No %s named '%s'", ((kind==CONN) ? "port" : ((kind==PARAM) ? "parameter" :"static variable")), sub_id.id); yyerror (error_str); mod_num_errors++; return -1; } /*---------------------------------------------------------------------------*/ static int valid_id (Sub_Id_t sub_id, Id_Kind_t kind) { return check_id (sub_id, kind, FALSE); } /*---------------------------------------------------------------------------*/ static int valid_subid (Sub_Id_t sub_id, Id_Kind_t kind) { return check_id (sub_id, kind, TRUE); } /*---------------------------------------------------------------------------*/ static void init_buffer (void) { buf_len = 0; buffer[0] = '\0'; } /*---------------------------------------------------------------------------*/ static void append (char *str) { int len = (int) strlen (str); if (len + buf_len > BUFFER_SIZE) { yyerror ("Buffer overflow - try reducing the complexity of CM-macro array subscripts"); exit (1); } (void)strcat (buffer,str); } %} %union { char *str; Sub_Id_t sub_id; } %type buffered_c_code %type subscriptable_id id %token TOK_ARGS %token TOK_INIT %token TOK_ANALYSIS %token TOK_NEW_TIMEPOINT %token TOK_TIME %token TOK_RAD_FREQ %token TOK_TEMPERATURE %token TOK_T %token TOK_PARAM %token TOK_PARAM_SIZE %token TOK_PARAM_NULL %token TOK_PORT_SIZE %token TOK_PORT_NULL %token TOK_PARTIAL %token TOK_AC_GAIN %token TOK_CHANGED %token TOK_OUTPUT_DELAY %token TOK_STATIC_VAR %token TOK_STATIC_VAR_SIZE %token TOK_STATIC_VAR_INST %token TOK_INPUT %token TOK_INPUT_STRENGTH %token TOK_INPUT_STATE %token TOK_INPUT_TYPE %token TOK_OUTPUT %token TOK_OUTPUT_CHANGED %token TOK_OUTPUT_STRENGTH %token TOK_OUTPUT_STATE %token TOK_OUTPUT_TYPE %token TOK_COMMA %token TOK_LPAREN %token TOK_RPAREN %token TOK_LBRACKET %token TOK_RBRACKET %token TOK_MISC_C %token TOK_IDENTIFIER %token TOK_LOAD %token TOK_TOTAL_LOAD %token TOK_MESSAGE %token TOK_CALL_TYPE %start mod_file %% mod_file : /* empty */ | mod_file c_code ; c_code : /* empty */ | c_code c_char | c_code macro /*| TOK_RPAREN {yyerror ("Unmatched )"); YYERROR;} | TOK_RBRACKET {yyerror ("Unmatched ]"); YYERROR;}*/ ; buffered_c_code : {init_buffer();} buffered_c_code2 {$$ = strdup (buffer);} ; buffered_c_code2 : /* empty */ | buffered_c_code2 buffered_c_char ; buffered_c_char : TOK_IDENTIFIER {append (mod_yytext);} | TOK_MISC_C {append (mod_yytext);} | TOK_COMMA {append (mod_yytext);} | TOK_LBRACKET {append("[");} buffered_c_code2 TOK_RBRACKET {append("]");} | TOK_LPAREN {append("(");} buffered_c_code2 TOK_RPAREN {append(")");} ; c_char : TOK_IDENTIFIER {fputs (mod_yytext, mod_yyout);} | TOK_MISC_C {fputs (mod_yytext, mod_yyout);} | TOK_COMMA {fputs (mod_yytext, mod_yyout);} | TOK_LBRACKET {putc ('[', mod_yyout);} c_code TOK_RBRACKET {putc (']', mod_yyout);} | TOK_LPAREN {putc ('(', mod_yyout);} c_code TOK_RPAREN {putc (')', mod_yyout);} ; macro : TOK_INIT {fprintf (mod_yyout, "mif_private->circuit.init");} | TOK_ARGS {fprintf (mod_yyout, "Mif_Private_t *mif_private");} | TOK_ANALYSIS {fprintf (mod_yyout, "mif_private->circuit.anal_type");} | TOK_NEW_TIMEPOINT {fprintf (mod_yyout, "mif_private->circuit.anal_init");} | TOK_CALL_TYPE {fprintf (mod_yyout, "mif_private->circuit.call_type");} | TOK_TIME {fprintf (mod_yyout, "mif_private->circuit.time");} | TOK_RAD_FREQ {fprintf (mod_yyout, "mif_private->circuit.frequency");} | TOK_TEMPERATURE {fprintf (mod_yyout, "mif_private->circuit.temperature");} | TOK_T TOK_LPAREN buffered_c_code TOK_RPAREN {fprintf (mod_yyout, "mif_private->circuit.t[%s]", $3);} | TOK_PARAM TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, PARAM); fprintf (mod_yyout, "mif_private->param[%d]->element[%s]", i, subscript ($3)); put_type (mod_yyout, mod_ifs_table->param[i].type); } | TOK_PARAM_SIZE TOK_LPAREN id TOK_RPAREN {int i = valid_id ($3, PARAM); fprintf (mod_yyout, "mif_private->param[%d]->size", i);} | TOK_PARAM_NULL TOK_LPAREN id TOK_RPAREN {int i = valid_id ($3, PARAM); fprintf (mod_yyout, "mif_private->param[%d]->is_null", i);} | TOK_PORT_SIZE TOK_LPAREN id TOK_RPAREN {int i = valid_id ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->size", i);} | TOK_PORT_NULL TOK_LPAREN id TOK_RPAREN {int i = valid_id ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->is_null", i);} | TOK_PARTIAL TOK_LPAREN subscriptable_id TOK_COMMA subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); int j = valid_subid ($5, CONN); check_dir (i, OUT, "PARTIAL"); check_dir (j, IN, "PARTIAL"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->partial[%d].port[%s]", i, subscript($3), j, subscript($5));} | TOK_AC_GAIN TOK_LPAREN subscriptable_id TOK_COMMA subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); int j = valid_subid ($5, CONN); check_dir (i, OUT, "AC_GAIN"); check_dir (j, IN, "AC_GAIN"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->ac_gain[%d].port[%s]", i, subscript($3), j, subscript($5));} | TOK_STATIC_VAR TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]->element[%s]", i, subscript($3)); if (mod_ifs_table->inst_var[i].is_array && !($3.has_subscript)) { /* null - eg. for malloc lvalue */ } else { put_type (mod_yyout, mod_ifs_table->inst_var[i].type); } } | TOK_STATIC_VAR_SIZE TOK_LPAREN id TOK_RPAREN {int i = valid_subid ($3, STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]->size", i);} | TOK_STATIC_VAR_INST TOK_LPAREN id TOK_RPAREN {int i = valid_subid ($3, STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]", i);} | TOK_OUTPUT_DELAY TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "OUTPUT_DELAY"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->delay", i, subscript($3));} | TOK_CHANGED TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "CHANGED"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->changed", i, subscript($3));} | TOK_INPUT TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, IN, "INPUT"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->input", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]);} | TOK_INPUT_TYPE TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, IN, "INPUT_TYPE"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->type_str", i, subscript($3)); } | TOK_OUTPUT_TYPE TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "OUTPUT_TYPE"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->type_str", i, subscript($3)); } | TOK_INPUT_STRENGTH TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, IN, "INPUT_STRENGTH"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->input", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->strength");} | TOK_INPUT_STATE TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, IN, "INPUT_STATE"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->input", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->state");} | TOK_OUTPUT TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "OUTPUT"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->output", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]);} | TOK_OUTPUT_STRENGTH TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "OUTPUT_STRENGTH"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->output", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->strength");} | TOK_OUTPUT_STATE TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); check_dir (i, OUT, "OUTPUT_STATE"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->output", i, subscript($3)); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->state");} | TOK_OUTPUT_CHANGED TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->changed", i, subscript($3));} | TOK_LOAD TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->load", i, subscript($3));} | TOK_TOTAL_LOAD TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->total_load", i, subscript($3));} | TOK_MESSAGE TOK_LPAREN subscriptable_id TOK_RPAREN {int i = valid_subid ($3, CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->msg", i, subscript($3));} ; subscriptable_id : id | id TOK_LBRACKET buffered_c_code TOK_RBRACKET {$$ = $1; $$.has_subscript = TRUE; $$.subscript = $3;} ; id : TOK_IDENTIFIER {$$.has_subscript = FALSE; $$.id = strdup (mod_yytext);} ; %% ngspice-26/src/xspice/cmpp/ylwrap0000644000265600020320000000631212264261473016515 0ustar andreasadmin#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. # Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # Usage: # ylwrap PROGRAM INPUT [OUTPUT DESIRED]... -- [ARGS]... # * PROGRAM is program to run. # * INPUT is the input file # * OUTPUT is file PROG generates # * DESIRED is file we actually want # * ARGS are passed to PROG # Any number of OUTPUT,DESIRED pairs may be used. # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in /* | [A-Za-z]:\\*) ;; */*) prog="`pwd`/$prog" ;; esac # The input. input="$1" shift case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. Why? Because otherwise any # debugging info in the generated file will point to the wrong # place. This is really gross. input="`pwd`/$input" ;; esac # We don't want to use the absolute path if the input in the current # directory like when making a tar ball. input_base=`echo $input | sed -e 's|.*/||'` if test -f $input_base && cmp $input_base $input >/dev/null 2>&1; then input=$input_base fi pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ trap "cd `pwd`; rm -rf $dirname > /dev/null 2>&1" 1 2 3 15 mkdir $dirname || exit 1 cd $dirname case "$input" in /* | [A-Za-z]:\\*) # Absolute path; do nothing. ;; *) # Make a symbolic link, hard link or hardcopy. ln -s ../"$input" . > /dev/null 2>&1 || ln ../"$input" . > /dev/null 2>&1 || cp ../"$input" . ;; esac $prog ${1+"$@"} "$input" status=$? if test $status -eq 0; then set X $pairlist shift first=yes while test "$#" -ne 0; do if test -f "$1"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in /* | [A-Za-z]:\\*) target="$2";; *) target="../$2";; esac mv "$1" "$target" || status=$? else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then status=1 fi fi shift shift first=no done else status=$? fi # Remove the directory. cd .. rm -rf $dirname exit $status ngspice-26/src/xspice/cmpp/read_ifs.c0000644000265600020320000000746312264261473017204 0ustar andreasadmin/*============================================================================ FILE read_ifs.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn and Steve Tynor MODIFICATIONS SUMMARY This file contains top-level functions used in reading information from the ifspec.ifs file and building an internal data structure that holds the information. Most of the work in parsing of the ifspec.ifs file and in building the structure is handled by the UNIX 'lex' and 'yacc' utilities. This processing is begun at the call to yyparse() in read_ifs_table() below. See also files: ifs_lex.l ifs_yacc.y INTERFACES read_ifs_file() yywrap() yyerror() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include "ifs_yacc_y.h" extern char *prog_name; extern int ifs_yyparse (void); extern void ifs_yyrestart (FILE*); extern FILE *ifs_yyin; extern int ifs_yylineno; extern char *ifs_yytext; extern Ifs_Table_t *parser_ifs_table; extern Boolean_t parser_just_names; static Status_t read_ifs_table(FILE *fp, int mode, Ifs_Table_t *ifs_table); const char *current_filename; /* *********************************************************************** */ /* NOTE The following function may be called either by cmpp -ifs or cmpp -lst with mode set to GET_IFS_TABLE or GET_IFS_NAME respectively. */ /* read_ifs_file Function read_ifs_file() opens the Interface Specification file (ifspec.ifs) for read access and calls read_ifs_table() with the assigned file pointer to read and parse the file. Upon return from read_ifs_table(), the file is closed. */ Status_t read_ifs_file( const char *filename, /* File to read */ int mode, /* Get names only or get everything? */ Ifs_Table_t *ifs_table) /* Table to put info in */ { FILE *fp; /* Ifs file pointer */ Status_t status; /* returned status from function */ /* Open the ifs file for read access */ fp = fopen_cmpp(&filename, "r"); if(fp == NULL) { perror (prog_name); print_error("ERROR - File not found: %s", filename); return(ERROR); } current_filename = filename; /* Get the stuff from the file into the ifs_table struct */ status = read_ifs_table(fp, mode, ifs_table); /* Close file and return */ fclose(fp); return(status); } /* *********************************************************************** */ /* read_ifs_table Function read_ifs_table() calls yyparse() to read and parse the Interface Specification file contents and place the information into an internal data structure. Function yyparse() is automatically generated by UNIX lex/yacc. */ static Status_t read_ifs_table( FILE *fp, /* File to read from */ int mode, /* Get names only or get everything? */ Ifs_Table_t *ifs_table) /* Table to put info in */ { assert (ifs_table); assert (fp); ifs_yylineno = 1; ifs_yyin = fp; parser_just_names = (mode == GET_IFS_NAME) ? TRUE : FALSE; parser_ifs_table = ifs_table; if (ifs_yyparse()) { print_error ("Error parsing interface specification file"); ifs_yyrestart(NULL); return ERROR; } ifs_yyrestart(NULL); return OK; } /*---------------------------------------------------------------------------*/ void ifs_yyerror (char *str) { fprintf (stderr, "%s: Error: \"%s\": line %d (near \'%s\'):\n\t%s.\n", prog_name, current_filename, ifs_yylineno, ifs_yytext, str); } ngspice-26/src/xspice/cmpp/mod_yacc.h0000644000265600020320000000610112264261712017173 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_ARGS = 258, TOK_INIT = 259, TOK_ANALYSIS = 260, TOK_NEW_TIMEPOINT = 261, TOK_TIME = 262, TOK_RAD_FREQ = 263, TOK_TEMPERATURE = 264, TOK_T = 265, TOK_PARAM = 266, TOK_PARAM_SIZE = 267, TOK_PARAM_NULL = 268, TOK_PORT_SIZE = 269, TOK_PORT_NULL = 270, TOK_PARTIAL = 271, TOK_AC_GAIN = 272, TOK_CHANGED = 273, TOK_OUTPUT_DELAY = 274, TOK_STATIC_VAR = 275, TOK_STATIC_VAR_SIZE = 276, TOK_STATIC_VAR_INST = 277, TOK_INPUT = 278, TOK_INPUT_STRENGTH = 279, TOK_INPUT_STATE = 280, TOK_INPUT_TYPE = 281, TOK_OUTPUT = 282, TOK_OUTPUT_CHANGED = 283, TOK_OUTPUT_STRENGTH = 284, TOK_OUTPUT_STATE = 285, TOK_OUTPUT_TYPE = 286, TOK_COMMA = 287, TOK_LPAREN = 288, TOK_RPAREN = 289, TOK_LBRACKET = 290, TOK_RBRACKET = 291, TOK_MISC_C = 292, TOK_IDENTIFIER = 293, TOK_LOAD = 294, TOK_TOTAL_LOAD = 295, TOK_MESSAGE = 296, TOK_CALL_TYPE = 297 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2068 of yacc.c */ #line 329 "mod_yacc.y" char *str; Sub_Id_t sub_id; /* Line 2068 of yacc.c */ #line 99 "mod_yacc.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; ngspice-26/src/xspice/cmpp/ifs_yacc_y.h0000644000265600020320000000270412264261473017536 0ustar andreasadmin/*============================================================================ FILE ifs_yacc.h MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY Typedefs needed by the YYSTYPE union (%union operator) in the yacc file. These are only used in the yacc file, but must be defined here since the generated token.h file includes a definition of the union YYSTYPE. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "cmpp.h" typedef struct { Boolean_t has_value; Data_Type_t kind; union { Boolean_t bvalue; int ivalue; double rvalue; Complex_t cvalue; char *svalue; } u; } My_Value_t; typedef struct { Boolean_t has_bound; My_Value_t bound; } Bound_t; typedef struct { Boolean_t is_named; union { char *name; struct { Bound_t upper; Bound_t lower; } bounds; } u; } Range_t; typedef struct { Port_Type_t kind; char *id; /* undefined unless kind == USER_DEFINED */ } My_Port_Type_t; typedef struct ctype_list_s { My_Port_Type_t ctype; struct ctype_list_s *next; } Ctype_List_t; extern void ifs_yyerror(char*); ngspice-26/src/xspice/cmpp/ifs_yacc.h0000644000265600020320000000711312264261712017201 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_ALLOWED_TYPES = 258, TOK_ARRAY = 259, TOK_ARRAY_BOUNDS = 260, TOK_BOOL_NO = 261, TOK_BOOL_YES = 262, TOK_COMMA = 263, TOK_PORT_NAME = 264, TOK_PORT_TABLE = 265, TOK_CTYPE_D = 266, TOK_CTYPE_G = 267, TOK_CTYPE_GD = 268, TOK_CTYPE_H = 269, TOK_CTYPE_HD = 270, TOK_CTYPE_I = 271, TOK_CTYPE_ID = 272, TOK_CTYPE_V = 273, TOK_CTYPE_VD = 274, TOK_CTYPE_VNAM = 275, TOK_C_FUNCTION_NAME = 276, TOK_DASH = 277, TOK_DATA_TYPE = 278, TOK_DEFAULT_TYPE = 279, TOK_DEFAULT_VALUE = 280, TOK_DESCRIPTION = 281, TOK_DIRECTION = 282, TOK_DIR_IN = 283, TOK_DIR_INOUT = 284, TOK_DIR_OUT = 285, TOK_DTYPE_BOOLEAN = 286, TOK_DTYPE_COMPLEX = 287, TOK_DTYPE_INT = 288, TOK_DTYPE_POINTER = 289, TOK_DTYPE_REAL = 290, TOK_DTYPE_STRING = 291, TOK_IDENTIFIER = 292, TOK_STATIC_VAR_NAME = 293, TOK_STATIC_VAR_TABLE = 294, TOK_INT_LITERAL = 295, TOK_LANGLE = 296, TOK_LBRACKET = 297, TOK_LIMITS = 298, TOK_NAME_TABLE = 299, TOK_NULL_ALLOWED = 300, TOK_PARAMETER_NAME = 301, TOK_PARAMETER_TABLE = 302, TOK_RANGLE = 303, TOK_RBRACKET = 304, TOK_REAL_LITERAL = 305, TOK_SPICE_MODEL_NAME = 306, TOK_STRING_LITERAL = 307 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 2068 of yacc.c */ #line 488 "ifs_yacc.y" Ctype_List_t *ctype_list; Dir_t dir; Boolean_t bool; Range_t range; Data_Type_t dtype; My_Port_Type_t ctype; My_Value_t value; char *str; Bound_t bound; int ival; double rval; Complex_t cval; /* Line 2068 of yacc.c */ #line 119 "ifs_yacc.h" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE yylval; ngspice-26/src/xspice/cmpp/Makefile.am0000644000265600020320000000134112264261473017305 0ustar andreasadmin## Process this file with automake to produce Makefile.in BUILT_SOURCES = ifs_lex.c ifs_yacc.c ifs_yacc.h mod_lex.c mod_yacc.c mod_yacc.h EXTRA_DIST = ifs_lex.l mod_lex.l ifs_yacc.h mod_yacc.h .gitignore MAINTAINERCLEANFILES = Makefile.in LEX = flex BISON = bison bin_PROGRAMS = cmpp cmpp_SOURCES = cmpp.h main.c pp_ifs.c pp_lst.c pp_mod.c read_ifs.c util.c \ writ_ifs.c ifs_yacc_y.h ifs_yacc.y ifs_lex.c mod_yacc_y.h mod_yacc.y \ mod_lex.c mod_lex.o : mod_yacc.h mod_lex.c : mod_lex.l $(LEX) -o$@ $< ifs_lex.o : ifs_yacc.h ifs_lex.c : ifs_lex.l $(LEX) -o$@ $< ifs_yacc.c ifs_yacc.h : ifs_yacc.y $(BISON) $(BISONFLAGS) -d -o ifs_yacc.c $< mod_yacc.c mod_yacc.h : mod_yacc.y $(BISON) $(BISONFLAGS) -d -o mod_yacc.c $< ngspice-26/src/xspice/cmpp/ifs_yacc.y0000644000265600020320000005577012264261473017242 0ustar andreasadmin%{ /*============================================================================ FILE ifs_yacc.y MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 12/31/91 Bill Kuhn Fix bug in usage of strcmp in check_default_type() SUMMARY This file contains the BNF specification of the language used in the ifspec.ifs file together with various support functions, and parses the ifspec.ifs file to get the information from it and place this information into a data structure of type Ifs_Table_t. INTERFACES yyparse() - Generated automatically by UNIX 'yacc' utility. REFERENCED FILES ifs_lex.l NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include #include "ifs_yacc_y.h" #define yymaxdepth ifs_yymaxdepth #define yyparse ifs_yyparse #define yylex ifs_yylex #define yyerror ifs_yyerror #define yylval ifs_yylval #define yychar ifs_yychar #define yydebug ifs_yydebug #define yypact ifs_yypact #define yyr1 ifs_yyr1 #define yyr2 ifs_yyr2 #define yydef ifs_yydef #define yychk ifs_yychk #define yypgo ifs_yypgo #define yyact ifs_yyact #define yyexca ifs_yyexca #define yyerrflag ifs_yyerrflag #define yynerrs ifs_yynerrs #define yyps ifs_yyps #define yypv ifs_yypv #define yys ifs_yys #define yy_yys ifs_yyyys #define yystate ifs_yystate #define yytmp ifs_yytmp #define yyv ifs_yyv #define yy_yyv ifs_yyyyv #define yyval ifs_yyval #define yylloc ifs_yylloc #define yyreds ifs_yyreds #define yytoks ifs_yytoks #define yylhs ifs_yyyylhs #define yylen ifs_yyyylen #define yydefred ifs_yyyydefred #define yydgoto ifs_yyyydgoto #define yysindex ifs_yyyysindex #define yyrindex ifs_yyyyrindex #define yygindex ifs_yyyygindex #define yytable ifs_yyyytable #define yycheck ifs_yyyycheck #define yyname ifs_yyyyname #define yyrule ifs_yyyyrule extern int yylineno; extern int yyival; extern double yydval; extern char *ifs_yytext; extern int ifs_yylex(void); Boolean_t parser_just_names; static Boolean_t saw_model_name; static Boolean_t saw_function_name; static char *dtype_to_str[] = { "BOOLEAN", "INTEGER", "REAL", "COMPLEX", "STRING", "POINTER" }; static Boolean_t did_default_type; static Boolean_t did_allowed_types; static int num_items; static int item; static int item_offset; static Boolean_t num_items_fixed; Ifs_Table_t *parser_ifs_table; #define TBL parser_ifs_table static size_t alloced_size [4]; /* * !!!!! Make sure these are large enough so that they never get realloced * !!!!! since that will cause garbage uninitialized data... * !!!!! (FIX THIS!) */ #define DEFAULT_SIZE_CONN 100 #define DEFAULT_SIZE_PARAM 100 #define DEFAULT_SIZE_INST_VAR 100 #define GROW_SIZE 10 typedef enum { TBL_NAME, TBL_PORT, TBL_PARAMETER, TBL_STATIC_VAR, } Table_t; typedef struct { Table_t table; int record; } Context_t; Context_t context; #define ITEM_BUFFER_SIZE 20 /* number of items that can be put in a table * before requiring a new xxx_TABLE: keyword */ #define FOR_ITEM(i) for (i = item_offset; i < num_items; i++) #define ITEM_BUF(i) item_buffer[i-item_offset] #define ASSIGN_BOUNDS(struct_name, i) \ if (ITEM_BUF(i).range.is_named) {\ TBL->struct_name[i].has_conn_ref = TRUE;\ TBL->struct_name[i].conn_ref = find_conn_ref (ITEM_BUF(i).range.u.name);\ } else {\ TBL->struct_name[i].has_conn_ref = FALSE;\ TBL->struct_name[i].has_lower_bound =\ ITEM_BUF(i).range.u.bounds.lower.has_bound;\ TBL->struct_name[i].has_upper_bound =\ ITEM_BUF(i).range.u.bounds.upper.has_bound;\ if (TBL->struct_name[i].has_lower_bound) {\ assert (ITEM_BUF(i).range.u.bounds.lower.bound.kind == INTEGER);\ TBL->struct_name[i].lower_bound =\ ITEM_BUF(i).range.u.bounds.lower.bound.u.ivalue;\ }\ if (TBL->struct_name[i].has_upper_bound) {\ assert (ITEM_BUF(i).range.u.bounds.upper.bound.kind == INTEGER);\ TBL->struct_name[i].upper_bound =\ ITEM_BUF(i).range.u.bounds.upper.bound.u.ivalue;\ }\ } /*---------------------------------------------------------------------------*/ static void fatal (char *str) { yyerror (str); exit(1); } /*---------------------------------------------------------------------------*/ static int find_conn_ref (char *name) { int i; char str[130]; for (i = 0; i < TBL->num_conn; i++) { if (strcmp (name, TBL->conn[i].name) == 0) { return i; } } sprintf (str, "Port `%s' not found", name); yyerror (str); return 0; } typedef enum {C_DOUBLE, C_BOOLEAN, C_POINTER, C_UNDEF} Ctype_Class_t; /*---------------------------------------------------------------------------*/ static Ctype_Class_t get_ctype_class (Port_Type_t type) { switch (type) { case USER_DEFINED: return C_POINTER; break; case DIGITAL: return C_BOOLEAN; break; default: return C_DOUBLE; break; } } /*---------------------------------------------------------------------------*/ static void check_port_type_direction (Dir_t dir, Port_Type_t port_type) { switch (port_type) { case VOLTAGE: case DIFF_VOLTAGE: case CURRENT: case DIFF_CURRENT: case DIGITAL: case USER_DEFINED: /* * anything goes */ break; case VSOURCE_CURRENT: if (dir != IN) { yyerror ("Port type `vnam' is only valid for `in' ports"); } break; case CONDUCTANCE: case DIFF_CONDUCTANCE: case RESISTANCE: case DIFF_RESISTANCE: if (dir != INOUT) { yyerror ("Port types `g', `gd', `h', `hd' are only valid for `inout' ports"); } break; default: assert (0); } } /*---------------------------------------------------------------------------*/ static void check_dtype_not_pointer (Data_Type_t dtype) { if (dtype == POINTER) { yyerror("Invalid parameter type - POINTER type valid only for STATIC_VARs"); } } /*---------------------------------------------------------------------------*/ static void check_default_type (Conn_Info_t conn) { int i; for (i = 0; i < conn.num_allowed_types; i++) { if (conn.default_port_type == conn.allowed_port_type[i]) { if ((conn.default_port_type != USER_DEFINED) || (strcmp (conn.default_type, conn.allowed_type[i]) == 0)) { return; } } } yyerror ("Port default type is not an allowed type"); } /*---------------------------------------------------------------------------*/ static void assign_ctype_list (Conn_Info_t *conn, Ctype_List_t *ctype_list ) { int i; Ctype_List_t *p; Ctype_Class_t ctype_class = C_UNDEF; conn->num_allowed_types = 0; for (p = ctype_list; p; p = p->next) { conn->num_allowed_types++; } conn->allowed_type = (char**) calloc ((size_t) conn->num_allowed_types, sizeof (char*)); conn->allowed_port_type = (Port_Type_t*) calloc ((size_t) conn->num_allowed_types, sizeof (Port_Type_t)); if (! (conn->allowed_type && conn->allowed_port_type)) { fatal ("Could not allocate memory"); } for (i = conn->num_allowed_types-1, p = ctype_list; p; i--, p = p->next) { if (ctype_class == C_UNDEF) { ctype_class = get_ctype_class (p->ctype.kind); } if (ctype_class != get_ctype_class (p->ctype.kind)) { yyerror ("Incompatible port types in `allowed_types' clause"); } check_port_type_direction (conn->direction, p->ctype.kind); conn->allowed_port_type[i] = p->ctype.kind; conn->allowed_type[i] = p->ctype.id; } } /*---------------------------------------------------------------------------*/ static void assign_value (Data_Type_t type, Value_t *dest_value, My_Value_t src_value) { char str[200]; if ((type == REAL) && (src_value.kind == INTEGER)) { dest_value->rvalue = src_value.u.ivalue; return; } else if (type != src_value.kind) { sprintf (str, "Invalid parameter type (saw %s - expected %s)", dtype_to_str[src_value.kind], dtype_to_str[type] ); yyerror (str); } switch (type) { case BOOLEAN: dest_value->bvalue = src_value.u.bvalue; break; case INTEGER: dest_value->ivalue = src_value.u.ivalue; break; case REAL: dest_value->rvalue = src_value.u.rvalue; break; case COMPLEX: dest_value->cvalue = src_value.u.cvalue; break; case STRING: dest_value->svalue = src_value.u.svalue; break; default: yyerror ("INTERNAL ERROR - unexpected data type in `assign_value'"); } } /*---------------------------------------------------------------------------*/ static void assign_limits (Data_Type_t type, Param_Info_t *param, Range_t range) { if (range.is_named) { yyerror ("Named range not allowed for limits"); } param->has_lower_limit = range.u.bounds.lower.has_bound; if (param->has_lower_limit) { assign_value (type, ¶m->lower_limit, range.u.bounds.lower.bound); } param->has_upper_limit = range.u.bounds.upper.has_bound; if (param->has_upper_limit) { assign_value (type, ¶m->upper_limit, range.u.bounds.upper.bound); } } /*---------------------------------------------------------------------------*/ static void check_item_num (void) { if (item-item_offset >= ITEM_BUFFER_SIZE) { fatal ("Too many items in table - split into sub-tables"); } if (item > (int) alloced_size [context.table] ) { switch (context.table) { case TBL_NAME: break; case TBL_PORT: alloced_size[context.table] += GROW_SIZE; TBL->conn = (Conn_Info_t*) realloc (TBL->conn, alloced_size [context.table] * sizeof (Conn_Info_t)); if (! TBL->conn) { fatal ("Error allocating memory for port definition"); } break; case TBL_PARAMETER: alloced_size [context.table] += GROW_SIZE; TBL->param = (Param_Info_t*) realloc (TBL->param, alloced_size [context.table] * sizeof (Param_Info_t)); if (! TBL->param) { fatal ("Error allocating memory for parameter definition"); } break; case TBL_STATIC_VAR: alloced_size [context.table] += GROW_SIZE; TBL->inst_var = (Inst_Var_Info_t*) realloc (TBL->inst_var, alloced_size [context.table] * sizeof (Inst_Var_Info_t)); if (! TBL->inst_var) { fatal ("Error allocating memory for static variable definition"); } break; } } item++; } /*---------------------------------------------------------------------------*/ static void check_end_item_num (void) { if (num_items_fixed) { if (item != num_items) { char buf[200]; sprintf (buf, "Wrong number of elements in sub-table (saw %d - expected %d)", item - item_offset, num_items - item_offset); fatal (buf); } } else { num_items = item; num_items_fixed = TRUE; switch (context.table) { case TBL_NAME: break; case TBL_PORT: TBL->num_conn = num_items; break; case TBL_PARAMETER: TBL->num_param = num_items; break; case TBL_STATIC_VAR: TBL->num_inst_var = num_items; break; } } item = item_offset; } #define INIT(n) item = (n); item_offset = (n); num_items = (n); num_items_fixed = FALSE #define ITEM check_item_num() #define END check_end_item_num() %} %token TOK_ALLOWED_TYPES %token TOK_ARRAY %token TOK_ARRAY_BOUNDS %token TOK_BOOL_NO %token TOK_BOOL_YES %token TOK_COMMA %token TOK_PORT_NAME %token TOK_PORT_TABLE %token TOK_CTYPE_D %token TOK_CTYPE_G %token TOK_CTYPE_GD %token TOK_CTYPE_H %token TOK_CTYPE_HD %token TOK_CTYPE_I %token TOK_CTYPE_ID %token TOK_CTYPE_V %token TOK_CTYPE_VD %token TOK_CTYPE_VNAM %token TOK_C_FUNCTION_NAME %token TOK_DASH %token TOK_DATA_TYPE %token TOK_DEFAULT_TYPE %token TOK_DEFAULT_VALUE %token TOK_DESCRIPTION %token TOK_DIRECTION %token TOK_DIR_IN %token TOK_DIR_INOUT %token TOK_DIR_OUT %token TOK_DTYPE_BOOLEAN %token TOK_DTYPE_COMPLEX %token TOK_DTYPE_INT %token TOK_DTYPE_POINTER %token TOK_DTYPE_REAL %token TOK_DTYPE_STRING %token TOK_IDENTIFIER %token TOK_STATIC_VAR_NAME %token TOK_STATIC_VAR_TABLE %token TOK_INT_LITERAL %token TOK_LANGLE %token TOK_LBRACKET %token TOK_LIMITS %token TOK_NAME_TABLE %token TOK_NULL_ALLOWED %token TOK_PARAMETER_NAME %token TOK_PARAMETER_TABLE %token TOK_RANGLE %token TOK_RBRACKET %token TOK_REAL_LITERAL %token TOK_SPICE_MODEL_NAME %token TOK_STRING_LITERAL %union { Ctype_List_t *ctype_list; Dir_t dir; Boolean_t bool; Range_t range; Data_Type_t dtype; My_Port_Type_t ctype; My_Value_t value; char *str; Bound_t bound; int ival; double rval; Complex_t cval; } %type ctype_list delimited_ctype_list %type direction %type ctype %type dtype %type range int_range %type value number integer_value value_or_dash %type identifier string %type bool %type int_or_dash number_or_dash %type integer %type real %type complex %start ifs_file %{ /* * resuse the Yacc union for our buffer: */ YYSTYPE item_buffer [ITEM_BUFFER_SIZE]; /* * Shorthand for refering to the current element of the item buffer: */ #define BUF ITEM_BUF(item-1) %} %% ifs_file : {TBL->num_conn = 0; TBL->num_param = 0; TBL->num_inst_var = 0; saw_function_name = FALSE; saw_model_name = FALSE; alloced_size [TBL_PORT] = DEFAULT_SIZE_CONN; alloced_size [TBL_PARAMETER] = DEFAULT_SIZE_PARAM; alloced_size [TBL_STATIC_VAR] = DEFAULT_SIZE_INST_VAR; TBL->conn = (Conn_Info_t*) calloc (DEFAULT_SIZE_CONN, sizeof (Conn_Info_t)); TBL->param = (Param_Info_t*) calloc (DEFAULT_SIZE_PARAM, sizeof (Param_Info_t)); TBL->inst_var = (Inst_Var_Info_t*) calloc (DEFAULT_SIZE_INST_VAR, sizeof (Inst_Var_Info_t)); if (! (TBL->conn && TBL->param && TBL->inst_var) ) { fatal ("Could not allocate enough memory"); } } list_of_tables ; list_of_tables : table | list_of_tables table ; table : TOK_NAME_TABLE {context.table = TBL_NAME;} name_table | TOK_PORT_TABLE {context.table = TBL_PORT; did_default_type = FALSE; did_allowed_types = FALSE; INIT (TBL->num_conn);} port_table {TBL->num_conn = num_items;} | TOK_PARAMETER_TABLE {context.table = TBL_PARAMETER; INIT (TBL->num_param);} parameter_table {TBL->num_param = num_items;} | TOK_STATIC_VAR_TABLE {context.table = TBL_STATIC_VAR; INIT (TBL->num_inst_var);} static_var_table {TBL->num_inst_var = num_items;} ; name_table : /* empty */ | name_table name_table_item ; name_table_item : TOK_C_FUNCTION_NAME identifier {TBL->name.c_fcn_name =strdup (ifs_yytext); saw_function_name = TRUE; if (parser_just_names && saw_model_name) return 0;} | TOK_SPICE_MODEL_NAME identifier {TBL->name.model_name = strdup (ifs_yytext); saw_model_name = TRUE; if (parser_just_names && saw_function_name) return 0;} | TOK_DESCRIPTION string {TBL->name.description = strdup (ifs_yytext);} ; port_table : /* empty */ | port_table port_table_item ; port_table_item : TOK_PORT_NAME list_of_ids {int i; END; FOR_ITEM (i) { TBL->conn[i].name = ITEM_BUF(i).str; }} | TOK_DESCRIPTION list_of_strings {int i; END; FOR_ITEM (i) { TBL->conn[i].description = ITEM_BUF(i).str; }} | TOK_DIRECTION list_of_directions {int i; END; FOR_ITEM (i) { TBL->conn[i].direction = ITEM_BUF(i).dir; }} | TOK_DEFAULT_TYPE list_of_ctypes {int i; END; did_default_type = TRUE; FOR_ITEM (i) { TBL->conn[i].default_port_type = ITEM_BUF(i).ctype.kind; TBL->conn[i].default_type = ITEM_BUF(i).ctype.id; if (did_allowed_types) { check_default_type (TBL->conn[i]); } }} | TOK_ALLOWED_TYPES list_of_ctype_lists {int i; END; did_allowed_types = TRUE; FOR_ITEM (i) { assign_ctype_list (&TBL->conn[i], ITEM_BUF(i).ctype_list); if (did_default_type) { check_default_type (TBL->conn[i]); } }} | TOK_ARRAY list_of_bool {int i; END; FOR_ITEM (i) { TBL->conn[i].is_array = ITEM_BUF(i).bool; }} | TOK_ARRAY_BOUNDS list_of_array_bounds {int i; END; FOR_ITEM (i) { ASSIGN_BOUNDS (conn, i); assert (!TBL->conn[i].has_conn_ref); }} | TOK_NULL_ALLOWED list_of_bool {int i; END; FOR_ITEM (i) { TBL->conn[i].null_allowed = ITEM_BUF(i).bool; }} ; parameter_table : /* empty */ | parameter_table parameter_table_item ; parameter_table_item : TOK_PARAMETER_NAME list_of_ids {int i; END; FOR_ITEM (i) { TBL->param[i].name = ITEM_BUF(i).str; }} | TOK_DESCRIPTION list_of_strings {int i; END; FOR_ITEM (i) { TBL->param[i].description = ITEM_BUF(i).str; }} | TOK_DATA_TYPE list_of_dtypes {int i; END; FOR_ITEM (i) { check_dtype_not_pointer (ITEM_BUF(i).dtype); TBL->param[i].type = ITEM_BUF(i).dtype; }} | TOK_DEFAULT_VALUE list_of_values {int i; END; FOR_ITEM (i) { TBL->param[i].has_default = ITEM_BUF(i).value.has_value; if (TBL->param[i].has_default) { assign_value (TBL->param[i].type, &TBL->param[i].default_value, ITEM_BUF(i).value); } }} | TOK_LIMITS list_of_ranges {int i; END; FOR_ITEM (i) { assign_limits (TBL->param[i].type, &TBL->param[i], ITEM_BUF(i).range); }} | TOK_ARRAY list_of_bool {int i; END; FOR_ITEM (i) { TBL->param[i].is_array = ITEM_BUF(i).bool; }} | TOK_ARRAY_BOUNDS list_of_array_bounds {int i; END; FOR_ITEM (i) { ASSIGN_BOUNDS (param, i); }} | TOK_NULL_ALLOWED list_of_bool {int i; END; FOR_ITEM (i) { TBL->param[i].null_allowed = ITEM_BUF(i).bool; }} ; static_var_table : /* empty */ | static_var_table static_var_table_item ; static_var_table_item : TOK_STATIC_VAR_NAME list_of_ids {int i; END; FOR_ITEM (i) { TBL->inst_var[i].name = ITEM_BUF(i).str; }} | TOK_DESCRIPTION list_of_strings {int i; END; FOR_ITEM (i) { TBL->inst_var[i].description = ITEM_BUF(i).str; }} | TOK_DATA_TYPE list_of_dtypes {int i; END; FOR_ITEM (i) { TBL->inst_var[i].type = ITEM_BUF(i).dtype; }} | TOK_ARRAY list_of_bool {int i; END; FOR_ITEM (i) { TBL->inst_var[i].is_array = ITEM_BUF(i).bool; }} ; list_of_ids : /* empty */ | list_of_ids identifier {ITEM; BUF.str = $2;} ; list_of_array_bounds : /* empty */ | list_of_array_bounds int_range {ITEM; BUF.range = $2;} | list_of_array_bounds identifier {ITEM; BUF.range.is_named = TRUE; BUF.range.u.name = $2;} ; list_of_strings : /* empty */ | list_of_strings string {ITEM; BUF.str = $2;} ; list_of_directions : /* empty */ | list_of_directions direction {ITEM; BUF.dir = $2;} ; direction : TOK_DIR_IN {$$ = IN;} | TOK_DIR_OUT {$$ = OUT;} | TOK_DIR_INOUT {$$ = INOUT;} ; list_of_bool : /* empty */ | list_of_bool bool {ITEM; BUF.bool = $2;} ; list_of_ctypes : /* empty */ | list_of_ctypes ctype {ITEM; BUF.ctype = $2;} ; ctype : TOK_CTYPE_V {$$.kind = VOLTAGE;} | TOK_CTYPE_VD {$$.kind = DIFF_VOLTAGE;} | TOK_CTYPE_VNAM {$$.kind = VSOURCE_CURRENT;} | TOK_CTYPE_I {$$.kind = CURRENT;} | TOK_CTYPE_ID {$$.kind = DIFF_CURRENT;} | TOK_CTYPE_G {$$.kind = CONDUCTANCE;} | TOK_CTYPE_GD {$$.kind = DIFF_CONDUCTANCE;} | TOK_CTYPE_H {$$.kind = RESISTANCE;} | TOK_CTYPE_HD {$$.kind = DIFF_RESISTANCE;} | TOK_CTYPE_D {$$.kind = DIGITAL;} | identifier {$$.kind = USER_DEFINED; $$.id = $1;} ; list_of_dtypes : /* empty */ | list_of_dtypes dtype {ITEM; BUF.dtype = $2;} ; dtype : TOK_DTYPE_REAL {$$ = REAL;} | TOK_DTYPE_INT {$$ = INTEGER;} | TOK_DTYPE_BOOLEAN {$$ = BOOLEAN;} | TOK_DTYPE_COMPLEX {$$ = COMPLEX;} | TOK_DTYPE_STRING {$$ = STRING;} | TOK_DTYPE_POINTER {$$ = POINTER;} ; list_of_ranges : /* empty */ | list_of_ranges range {ITEM; BUF.range = $2;} ; int_range : TOK_DASH {$$.is_named = FALSE; $$.u.bounds.lower.has_bound = FALSE; $$.u.bounds.upper.has_bound = FALSE;} | TOK_LBRACKET int_or_dash maybe_comma int_or_dash TOK_RBRACKET {$$.is_named = FALSE; $$.u.bounds.lower = $2; $$.u.bounds.upper = $4;} ; maybe_comma : /* empty */ | TOK_COMMA ; int_or_dash : TOK_DASH {$$.has_bound = FALSE;} | integer_value {$$.has_bound = TRUE; $$.bound = $1;} ; range : TOK_DASH {$$.is_named = FALSE; $$.u.bounds.lower.has_bound = FALSE; $$.u.bounds.upper.has_bound = FALSE;} | TOK_LBRACKET number_or_dash maybe_comma number_or_dash TOK_RBRACKET {$$.is_named = FALSE; $$.u.bounds.lower = $2; $$.u.bounds.upper = $4;} ; number_or_dash : TOK_DASH {$$.has_bound = FALSE;} | number {$$.has_bound = TRUE; $$.bound = $1;} ; list_of_values : /* empty */ | list_of_values value_or_dash {ITEM; BUF.value = $2;} ; value_or_dash : TOK_DASH {$$.has_value = FALSE;} | value ; value : string {$$.has_value = TRUE; $$.kind = STRING; $$.u.svalue = $1;} | bool {$$.has_value = TRUE; $$.kind = BOOLEAN; $$.u.bvalue = $1;} | complex {$$.has_value = TRUE; $$.kind = COMPLEX; $$.u.cvalue = $1;} | number ; complex : TOK_LANGLE real maybe_comma real TOK_RANGLE {$$.real = $2; $$.imag = $4;} ; list_of_ctype_lists : /* empty */ | list_of_ctype_lists delimited_ctype_list {ITEM; BUF.ctype_list = $2;} ; delimited_ctype_list : TOK_LBRACKET ctype_list TOK_RBRACKET {$$ = $2;} ; ctype_list : ctype {$$ = (Ctype_List_t*)calloc (1, sizeof (Ctype_List_t)); if (!$$) { fatal ("Error allocating memory"); } $$->ctype = $1; $$->next = (Ctype_List_t*)0;} | ctype_list maybe_comma ctype {$$ = (Ctype_List_t*)calloc (1, sizeof (Ctype_List_t)); if (!$$) { fatal ("Error allocating memory"); } $$->ctype = $3; $$->next = $1; /*$$->next = (Ctype_List_t*)0; assert ($1); $1->next = $$;*/} ; bool : TOK_BOOL_YES {$$ = TRUE;} | TOK_BOOL_NO {$$ = FALSE;} ; string : TOK_STRING_LITERAL {$$ = strdup(ifs_yytext);} ; identifier : TOK_IDENTIFIER {$$ = strdup(ifs_yytext);} ; number : real {$$.has_value = TRUE; $$.kind = REAL; $$.u.rvalue = $1;} | integer_value ; integer_value : integer {$$.has_value = TRUE; $$.kind = INTEGER; $$.u.ivalue = $1;} ; real : TOK_REAL_LITERAL {$$ = yydval;} ; integer : TOK_INT_LITERAL {$$ = yyival;} ; %% ngspice-26/src/xspice/cmpp/Makefile.in0000644000265600020320000004730212264261540017320 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = cmpp$(EXEEXT) subdir = src/xspice/cmpp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ifs_yacc.c \ mod_yacc.c ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_cmpp_OBJECTS = main.$(OBJEXT) pp_ifs.$(OBJEXT) pp_lst.$(OBJEXT) \ pp_mod.$(OBJEXT) read_ifs.$(OBJEXT) util.$(OBJEXT) \ writ_ifs.$(OBJEXT) ifs_yacc.$(OBJEXT) ifs_lex.$(OBJEXT) \ mod_yacc.$(OBJEXT) mod_lex.$(OBJEXT) cmpp_OBJECTS = $(am_cmpp_OBJECTS) cmpp_LDADD = $(LDADD) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; @MAINTAINER_MODE_FALSE@am__skipyacc = test -f $@ || YACCCOMPILE = $(YACC) $(AM_YFLAGS) $(YFLAGS) LTYACCCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(YACC) $(AM_YFLAGS) $(YFLAGS) AM_V_YACC = $(am__v_YACC_@AM_V@) am__v_YACC_ = $(am__v_YACC_@AM_DEFAULT_V@) am__v_YACC_0 = @echo " YACC " $@; YLWRAP = $(top_srcdir)/ylwrap AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(cmpp_SOURCES) DIST_SOURCES = $(cmpp_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = flex LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ BUILT_SOURCES = ifs_lex.c ifs_yacc.c ifs_yacc.h mod_lex.c mod_yacc.c mod_yacc.h EXTRA_DIST = ifs_lex.l mod_lex.l ifs_yacc.h mod_yacc.h .gitignore MAINTAINERCLEANFILES = Makefile.in BISON = bison cmpp_SOURCES = cmpp.h main.c pp_ifs.c pp_lst.c pp_mod.c read_ifs.c util.c \ writ_ifs.c ifs_yacc_y.h ifs_yacc.y ifs_lex.c mod_yacc_y.h mod_yacc.y \ mod_lex.c all: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj .y $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/cmpp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/cmpp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list cmpp$(EXEEXT): $(cmpp_OBJECTS) $(cmpp_DEPENDENCIES) $(EXTRA_cmpp_DEPENDENCIES) @rm -f cmpp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(cmpp_OBJECTS) $(cmpp_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifs_lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ifs_yacc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_lex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mod_yacc.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pp_ifs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pp_lst.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pp_mod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/read_ifs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/writ_ifs.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< .y.c: $(AM_V_YACC)$(am__skipyacc) $(SHELL) $(YLWRAP) $< y.tab.c $@ y.tab.h $*.h y.output $*.output -- $(YACCCOMPILE) mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -rm -f ifs_yacc.c -rm -f mod_yacc.c -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am \ uninstall-binPROGRAMS mod_lex.o : mod_yacc.h mod_lex.c : mod_lex.l $(LEX) -o$@ $< ifs_lex.o : ifs_yacc.h ifs_lex.c : ifs_lex.l $(LEX) -o$@ $< ifs_yacc.c ifs_yacc.h : ifs_yacc.y $(BISON) $(BISONFLAGS) -d -o ifs_yacc.c $< mod_yacc.c mod_yacc.h : mod_yacc.y $(BISON) $(BISONFLAGS) -d -o mod_yacc.c $< # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/cmpp/main.c0000644000265600020320000000515312264261473016346 0ustar andreasadmin/*============================================================================ FILE main.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the top-level function for the Code Model PreProcessor (cmpp). It handles reading the command-line arguments, and then vectors to an appropriate function. INTERFACES main() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include #include "cmpp.h" #define USAGE_MSG "Usage: cmpp [-ifs] [-mod []] [-lst]" #define TOO_FEW_ARGS "ERROR - Too few arguments" #define TOO_MANY_ARGS "ERROR - Too many arguments" #define UNRECOGNIZED_ARGS "ERROR - Unrecognized argument" /* *********************************************************************** */ /* main Function main checks the validity of the command-line arguments supplied when the program is invoked and calls one of the three major functions as appropriate: preprocess_ifs_file Process Interface Specification File. preprocess_mod_file Process Model Definition File. preprocess_lst_file Process Pathname List Files. depending on the argument. */ int main( int argc, /* Number of command line arguments */ char *argv[]) /* Command line argument text */ { init_error (argv[0]); /* Process command line arguments and vector to appropriate function */ if(argc < 2) { print_error(TOO_FEW_ARGS); print_error(USAGE_MSG); exit(1); } if(strcmp(argv[1],"-ifs") == 0) { if(argc == 2) { preprocess_ifs_file(); } else { print_error(TOO_MANY_ARGS); print_error(USAGE_MSG); exit(1); } } else if(strcmp(argv[1],"-lst") == 0) { if(argc == 2) { preprocess_lst_files(); } else { print_error(TOO_MANY_ARGS); print_error(USAGE_MSG); exit(1); } } else if(strcmp(argv[1],"-mod") == 0) { if(argc == 2) { preprocess_mod_file("cfunc.mod"); } else if(argc == 3) { preprocess_mod_file(argv[2]); } else { print_error(TOO_MANY_ARGS); print_error(USAGE_MSG); exit(1); } } else { print_error(UNRECOGNIZED_ARGS); print_error(USAGE_MSG); exit(1); } exit(0); } ngspice-26/src/xspice/cmpp/mod_lex.c0000644000265600020320000017007012264261712017046 0ustar andreasadmin#line 2 "mod_lex.c" #line 4 "mod_lex.c" #define YY_INT_ALIGNED short int /* A lexical scanner generated by flex */ #define yy_create_buffer mod_yy_create_buffer #define yy_delete_buffer mod_yy_delete_buffer #define yy_flex_debug mod_yy_flex_debug #define yy_init_buffer mod_yy_init_buffer #define yy_flush_buffer mod_yy_flush_buffer #define yy_load_buffer_state mod_yy_load_buffer_state #define yy_switch_to_buffer mod_yy_switch_to_buffer #define yyin mod_yyin #define yyleng mod_yyleng #define yylex mod_yylex #define yylineno mod_yylineno #define yyout mod_yyout #define yyrestart mod_yyrestart #define yytext mod_yytext #define yywrap mod_yywrap #define yyalloc mod_yyalloc #define yyrealloc mod_yyrealloc #define yyfree mod_yyfree #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 #define YY_FLEX_SUBMINOR_VERSION 35 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif /* First, we deal with platform-specific or compiler-specific issues. */ /* begin standard C headers. */ #include #include #include #include /* end standard C headers. */ /* flex integer type definitions */ #ifndef FLEXINT_H #define FLEXINT_H /* C99 systems have . Non-C99 systems may or may not. */ #if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, * if you want the limit (max/min) macros for int types. */ #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS 1 #endif #include typedef int8_t flex_int8_t; typedef uint8_t flex_uint8_t; typedef int16_t flex_int16_t; typedef uint16_t flex_uint16_t; typedef int32_t flex_int32_t; typedef uint32_t flex_uint32_t; #else typedef signed char flex_int8_t; typedef short int flex_int16_t; typedef int flex_int32_t; typedef unsigned char flex_uint8_t; typedef unsigned short int flex_uint16_t; typedef unsigned int flex_uint32_t; /* Limits of integral types. */ #ifndef INT8_MIN #define INT8_MIN (-128) #endif #ifndef INT16_MIN #define INT16_MIN (-32767-1) #endif #ifndef INT32_MIN #define INT32_MIN (-2147483647-1) #endif #ifndef INT8_MAX #define INT8_MAX (127) #endif #ifndef INT16_MAX #define INT16_MAX (32767) #endif #ifndef INT32_MAX #define INT32_MAX (2147483647) #endif #ifndef UINT8_MAX #define UINT8_MAX (255U) #endif #ifndef UINT16_MAX #define UINT16_MAX (65535U) #endif #ifndef UINT32_MAX #define UINT32_MAX (4294967295U) #endif #endif /* ! C99 */ #endif /* ! FLEXINT_H */ #ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ /* C99 requires __STDC__ to be defined as 1. */ #if defined (__STDC__) #define YY_USE_CONST #endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif /* Returned upon end-of-file. */ #define YY_NULL 0 /* Promotes a possibly negative, possibly signed char to an unsigned * integer for use as an array index. If the signed char is negative, * we want to instead treat it as an 8-bit unsigned char, hence the * double cast. */ #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) /* Enter a start condition. This macro really ought to take a parameter, * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ #define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ #define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ #define YY_NEW_FILE mod_yyrestart(mod_yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ #ifndef YY_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k. * Moreover, YY_BUF_SIZE is 2*YY_READ_BUF_SIZE in the general case. * Ditto for the __ia64__ case accordingly. */ #define YY_BUF_SIZE 32768 #else #define YY_BUF_SIZE 16384 #endif /* __ia64__ */ #endif /* The state buf must be large enough to hold one state per character in the main buffer. */ #define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) #ifndef YY_TYPEDEF_YY_BUFFER_STATE #define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif extern int mod_yyleng; extern FILE *mod_yyin, *mod_yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 /* Note: We specifically omit the test for yy_rule_can_match_eol because it requires * access to the local variable yy_act. Since yyless() is a macro, it would break * existing scanners that call yyless() from OUTSIDE mod_yylex. * One obvious solution it to make yy_act a global. I tried that, and saw * a 5% performance hit in a non-mod_yylineno scanner, because yy_act is * normally declared as a register variable-- so it is not worth it. */ #define YY_LESS_LINENO(n) \ do { \ int yyl;\ for ( yyl = n; yyl < mod_yyleng; ++yyl )\ if ( mod_yytext[yyl] == '\n' )\ --mod_yylineno;\ }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up mod_yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up mod_yytext again */ \ } \ while ( 0 ) #define unput(c) yyunput( c, (yytext_ptr) ) #ifndef YY_TYPEDEF_YY_SIZE_T #define YY_TYPEDEF_YY_SIZE_T typedef size_t yy_size_t; #endif #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; char *yy_ch_buf; /* input buffer */ char *yy_buf_pos; /* current position in input buffer */ /* Size of input buffer in bytes, not including room for EOB * characters. */ yy_size_t yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. */ int yy_n_chars; /* Whether we "own" the buffer - i.e., we know we created it, * and can realloc() it to grow it, and should free() it to * delete it. */ int yy_is_our_buffer; /* Whether this is an "interactive" input source; if so, and * if we're using stdio for input, then we want to use getc() * instead of fread(), to make sure we stop fetching input after * each newline. */ int yy_is_interactive; /* Whether we're considered to be at the beginning of a line. * If so, '^' rules will be active on the next match, otherwise * not. */ int yy_at_bol; int yy_bs_lineno; /**< The line count. */ int yy_bs_column; /**< The column count. */ /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process * then we mark the buffer as YY_EOF_PENDING, to indicate that we * shouldn't try reading from the input source any more. We might * still have a bunch of tokens to match, though, because of * possible backing-up. * * When we actually see the EOF, we change the status to "new" * (via mod_yyrestart()), so that the user can continue scanning by * just pointing mod_yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 }; #endif /* !YY_STRUCT_YY_BUFFER_STATE */ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". * * Returns the top of the stack, or NULL. */ #define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ : NULL) /* Same as previous macro, but useful when we know that the buffer stack is not * NULL or when we need an lvalue. For internal use only. */ #define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when mod_yytext is formed. */ static char yy_hold_char; static int yy_n_chars; /* number of characters read into yy_ch_buf */ int mod_yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow mod_yywrap()'s to do buffer switches * instead of setting up a fresh mod_yyin. A bit of a hack ... */ static int yy_did_buffer_switch_on_eof; void mod_yyrestart (FILE *input_file ); void mod_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); YY_BUFFER_STATE mod_yy_create_buffer (FILE *file,int size ); void mod_yy_delete_buffer (YY_BUFFER_STATE b ); void mod_yy_flush_buffer (YY_BUFFER_STATE b ); void mod_yypush_buffer_state (YY_BUFFER_STATE new_buffer ); void mod_yypop_buffer_state (void ); static void mod_yyensure_buffer_stack (void ); static void mod_yy_load_buffer_state (void ); static void mod_yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); #define YY_FLUSH_BUFFER mod_yy_flush_buffer(YY_CURRENT_BUFFER ) YY_BUFFER_STATE mod_yy_scan_buffer (char *base,yy_size_t size ); YY_BUFFER_STATE mod_yy_scan_string (yyconst char *yy_str ); YY_BUFFER_STATE mod_yy_scan_bytes (yyconst char *bytes,int len ); void *mod_yyalloc (yy_size_t ); void *mod_yyrealloc (void *,yy_size_t ); void mod_yyfree (void * ); #define yy_new_buffer mod_yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ if ( ! YY_CURRENT_BUFFER ){ \ mod_yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ mod_yy_create_buffer(mod_yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ if ( ! YY_CURRENT_BUFFER ){\ mod_yyensure_buffer_stack (); \ YY_CURRENT_BUFFER_LVALUE = \ mod_yy_create_buffer(mod_yyin,YY_BUF_SIZE ); \ } \ YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } #define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) /* Begin user sect3 */ #define mod_yywrap(n) 1 #define YY_SKIP_YYWRAP typedef unsigned char YY_CHAR; FILE *mod_yyin = (FILE *) 0, *mod_yyout = (FILE *) 0; typedef int yy_state_type; extern int mod_yylineno; int mod_yylineno = 1; extern char *mod_yytext; #define yytext_ptr mod_yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up mod_yytext. */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ mod_yyleng = (size_t) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 44 #define YY_END_OF_BUFFER 45 /* This struct is not used in this scanner, but its presence is necessary. */ struct yy_trans_info { flex_int32_t yy_verify; flex_int32_t yy_nxt; }; static yyconst flex_int16_t yy_accept[206] = { 0, 0, 0, 45, 43, 41, 42, 35, 36, 39, 43, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 11, 37, 38, 1, 2, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 3, 40, 4, 40, 12, 40, 40, 40, 40, 40, 40, 40, 40, 40, 8, 40, 40, 40, 40, 26, 40, 40, 40, 15, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 30, 40, 40, 40, 40, 40, 40, 40, 40, 21, 40, 40, 40, 40, 14, 40, 40, 40, 40, 20, 40, 40, 40, 40, 40, 40, 5, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 9, 40, 40, 40, 7, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 19, 18, 40, 40, 40, 40, 40, 28, 40, 40, 40, 40, 40, 40, 17, 16, 23, 40, 13, 27, 40, 40, 40, 40, 40, 40, 33, 40, 10, 40, 40, 40, 22, 31, 40, 40, 40, 40, 6, 40, 40, 40, 40, 29, 34, 40, 40, 40, 32, 25, 24, 0 } ; static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 4, 5, 6, 1, 7, 1, 1, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 1, 1, 1, 1, 1, 1, 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 11, 11, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 11, 31, 32, 33, 1, 34, 1, 35, 1, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; static yyconst flex_int32_t yy_meta[36] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 2 } ; static yyconst flex_int16_t yy_base[208] = { 0, 0, 0, 405, 406, 406, 406, 406, 406, 406, 30, 28, 395, 32, 30, 34, 36, 38, 35, 45, 48, 37, 51, 406, 406, 406, 406, 0, 394, 39, 52, 50, 59, 61, 62, 66, 67, 68, 71, 73, 72, 77, 74, 79, 80, 84, 82, 93, 94, 81, 95, 96, 101, 97, 102, 106, 103, 105, 108, 111, 112, 119, 127, 113, 393, 115, 392, 122, 391, 129, 132, 133, 134, 137, 136, 138, 139, 142, 390, 143, 149, 151, 154, 155, 156, 157, 159, 160, 164, 161, 167, 171, 169, 170, 175, 179, 176, 182, 184, 180, 190, 192, 193, 194, 197, 202, 195, 210, 205, 389, 201, 208, 212, 214, 388, 219, 223, 220, 225, 387, 228, 229, 217, 231, 235, 233, 386, 237, 243, 247, 248, 249, 245, 254, 255, 256, 258, 260, 263, 385, 264, 267, 273, 384, 269, 271, 275, 278, 282, 279, 284, 288, 293, 290, 383, 382, 292, 294, 297, 299, 305, 381, 298, 306, 311, 296, 315, 316, 380, 379, 309, 319, 377, 376, 322, 313, 323, 326, 327, 328, 374, 333, 373, 331, 334, 336, 372, 371, 337, 339, 338, 345, 370, 354, 343, 346, 355, 369, 368, 356, 357, 360, 367, 366, 362, 406, 366, 116 } ; static yyconst flex_int16_t yy_def[208] = { 0, 205, 1, 205, 205, 205, 205, 205, 205, 205, 205, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 205, 205, 205, 205, 207, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 206, 0, 205, 205 } ; static yyconst flex_int16_t yy_nxt[442] = { 0, 4, 5, 6, 7, 8, 4, 9, 10, 4, 11, 12, 13, 12, 12, 12, 12, 12, 14, 15, 16, 17, 18, 19, 12, 20, 21, 22, 12, 12, 12, 12, 12, 23, 24, 12, 25, 27, 26, 27, 29, 27, 32, 27, 27, 27, 27, 27, 27, 30, 35, 33, 36, 31, 27, 38, 34, 27, 40, 27, 27, 27, 46, 37, 41, 42, 47, 39, 27, 43, 27, 27, 51, 44, 45, 27, 27, 27, 48, 49, 27, 27, 27, 27, 50, 57, 27, 58, 27, 27, 27, 27, 52, 27, 59, 54, 55, 53, 56, 60, 62, 63, 27, 27, 27, 27, 27, 61, 66, 68, 27, 27, 27, 65, 27, 27, 72, 27, 27, 64, 27, 27, 27, 67, 27, 71, 78, 69, 27, 79, 74, 27, 70, 73, 77, 76, 27, 80, 27, 84, 75, 27, 27, 27, 81, 27, 27, 27, 27, 83, 82, 27, 27, 90, 87, 88, 92, 91, 27, 85, 27, 86, 93, 27, 27, 27, 27, 94, 27, 27, 27, 89, 98, 27, 102, 99, 27, 95, 27, 27, 27, 96, 103, 106, 27, 27, 100, 104, 27, 27, 97, 27, 105, 27, 107, 101, 109, 110, 114, 27, 115, 27, 27, 27, 27, 108, 27, 111, 112, 113, 27, 27, 119, 117, 27, 121, 122, 27, 118, 27, 124, 27, 120, 27, 125, 116, 27, 126, 27, 27, 123, 127, 27, 130, 27, 131, 132, 27, 27, 128, 27, 139, 27, 136, 27, 129, 27, 137, 135, 133, 134, 143, 27, 144, 27, 142, 27, 27, 27, 149, 140, 138, 141, 27, 27, 27, 148, 27, 145, 27, 146, 147, 27, 27, 156, 152, 27, 155, 27, 154, 27, 150, 27, 158, 27, 160, 151, 27, 27, 161, 153, 27, 163, 27, 165, 157, 159, 27, 164, 27, 162, 27, 27, 27, 169, 27, 27, 27, 27, 166, 172, 167, 168, 173, 27, 27, 175, 170, 27, 171, 27, 177, 27, 178, 27, 27, 174, 176, 27, 179, 180, 27, 27, 182, 184, 27, 27, 27, 183, 185, 27, 187, 27, 27, 181, 27, 27, 27, 27, 188, 193, 189, 27, 194, 27, 27, 196, 186, 191, 190, 195, 192, 197, 27, 27, 27, 27, 198, 28, 27, 199, 27, 200, 202, 204, 27, 27, 27, 27, 27, 27, 27, 27, 27, 203, 27, 27, 201, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 205, 3, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 } ; static yyconst flex_int16_t yy_chk[442] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 10, 11, 10, 14, 11, 13, 13, 15, 18, 16, 21, 17, 29, 11, 16, 14, 17, 11, 19, 19, 15, 20, 20, 31, 22, 30, 30, 18, 21, 22, 31, 19, 32, 22, 33, 34, 34, 22, 29, 35, 36, 37, 32, 33, 38, 40, 39, 42, 33, 40, 41, 41, 43, 44, 49, 46, 35, 45, 42, 37, 38, 36, 39, 43, 45, 46, 47, 48, 50, 51, 53, 44, 49, 51, 52, 54, 56, 48, 57, 55, 55, 58, 207, 47, 59, 60, 63, 50, 65, 54, 60, 52, 61, 61, 56, 67, 53, 55, 59, 58, 62, 62, 69, 69, 57, 70, 71, 72, 63, 74, 73, 75, 76, 67, 65, 77, 79, 75, 72, 73, 77, 76, 80, 70, 81, 71, 79, 82, 83, 84, 85, 80, 86, 87, 89, 74, 84, 88, 88, 85, 90, 81, 92, 93, 91, 82, 89, 91, 94, 96, 86, 89, 95, 99, 83, 97, 90, 98, 92, 87, 94, 95, 98, 100, 99, 101, 102, 103, 106, 93, 104, 96, 97, 97, 110, 105, 102, 101, 108, 104, 105, 111, 101, 107, 107, 112, 103, 113, 108, 100, 122, 110, 115, 117, 106, 111, 116, 115, 118, 116, 116, 120, 121, 112, 123, 122, 125, 118, 124, 113, 127, 120, 117, 116, 116, 127, 128, 128, 132, 125, 129, 130, 131, 132, 123, 121, 124, 133, 134, 135, 131, 136, 128, 137, 129, 130, 138, 140, 140, 135, 141, 138, 144, 137, 145, 133, 142, 142, 146, 145, 134, 147, 149, 146, 136, 148, 148, 150, 150, 141, 144, 151, 149, 153, 147, 156, 152, 157, 153, 165, 158, 162, 159, 150, 158, 151, 152, 159, 160, 163, 162, 156, 170, 157, 164, 164, 175, 165, 166, 167, 160, 163, 171, 166, 167, 174, 176, 171, 175, 177, 178, 179, 174, 176, 183, 178, 181, 184, 170, 185, 188, 190, 189, 179, 185, 181, 194, 188, 191, 195, 190, 177, 183, 181, 189, 184, 191, 193, 196, 199, 200, 193, 206, 201, 194, 204, 195, 199, 201, 203, 202, 198, 197, 192, 187, 186, 182, 180, 200, 173, 172, 196, 169, 168, 161, 155, 154, 143, 139, 126, 119, 114, 109, 78, 68, 66, 64, 28, 12, 3, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205, 205 } ; /* Table of booleans, true if rule could match eol. */ static yyconst flex_int32_t yy_rule_can_match_eol[45] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, }; static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; extern int mod_yy_flex_debug; int mod_yy_flex_debug = 0; /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ #define REJECT reject_used_but_not_detected #define yymore() yymore_used_but_not_detected #define YY_MORE_ADJ 0 #define YY_RESTORE_YY_MORE_OFFSET char *mod_yytext; #line 1 "mod_lex.l" #line 5 "mod_lex.l" /*============================================================================ FILE mod_lex.l MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY This file defines tokens applicable to parsing the cfunc.mod file, and actions to be taken on encountering those tokens. INTERFACES None. REFERENCED FILES mod_yacc.y NON-STANDARD FEATURES None. ============================================================================*/ #include "mod_yacc_y.h" #include "mod_yacc.h" #line 710 "mod_lex.c" #define INITIAL 0 #ifndef YY_NO_UNISTD_H /* Special case for "unistd.h", since it is non-ANSI. We include it way * down here because we want the user's section 1 to have been scanned first. * The user has a chance to override it with an option. */ #include #endif #ifndef YY_EXTRA_TYPE #define YY_EXTRA_TYPE void * #endif static int yy_init_globals (void ); /* Accessor methods to globals. These are made visible to non-reentrant scanners for convenience. */ int mod_yylex_destroy (void ); int mod_yyget_debug (void ); void mod_yyset_debug (int debug_flag ); YY_EXTRA_TYPE mod_yyget_extra (void ); void mod_yyset_extra (YY_EXTRA_TYPE user_defined ); FILE *mod_yyget_in (void ); void mod_yyset_in (FILE * in_str ); FILE *mod_yyget_out (void ); void mod_yyset_out (FILE * out_str ); int mod_yyget_leng (void ); char *mod_yyget_text (void ); int mod_yyget_lineno (void ); void mod_yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. */ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus extern "C" int mod_yywrap (void ); #else extern int mod_yywrap (void ); #endif #endif static void yyunput (int c,char *buf_ptr ); #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void ); #else static int input (void ); #endif #endif /* Amount of stuff to slurp up with each read. */ #ifndef YY_READ_BUF_SIZE #ifdef __ia64__ /* On IA-64, the buffer size is 16k, not 8k */ #define YY_READ_BUF_SIZE 16384 #else #define YY_READ_BUF_SIZE 8192 #endif /* __ia64__ */ #endif /* Copy whatever the last rule matched to the standard output. */ #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ #define ECHO do { if (fwrite( mod_yytext, mod_yyleng, 1, mod_yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, * is returned in "result". */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ int c = '*'; \ size_t n; \ for ( n = 0; n < max_size && \ (c = getc( mod_yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ if ( c == '\n' ) \ buf[n++] = (char) c; \ if ( c == EOF && ferror( mod_yyin ) ) \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ result = n; \ } \ else \ { \ errno=0; \ while ( (result = fread(buf, 1, max_size, mod_yyin))==0 && ferror(mod_yyin)) \ { \ if( errno != EINTR) \ { \ YY_FATAL_ERROR( "input in flex scanner failed" ); \ break; \ } \ errno=0; \ clearerr(mod_yyin); \ } \ }\ \ #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - * we don't want an extra ';' after the "return" because that will cause * some compilers to complain about unreachable statements. */ #ifndef yyterminate #define yyterminate() return YY_NULL #endif /* Number of entries by which start-condition stack grows. */ #ifndef YY_START_STACK_INCR #define YY_START_STACK_INCR 25 #endif /* Report a fatal error. */ #ifndef YY_FATAL_ERROR #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif /* end tables serialization structures and prototypes */ /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL #define YY_DECL_IS_OURS 1 extern int mod_yylex (void); #define YY_DECL int mod_yylex (void) #endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after mod_yytext and mod_yyleng * have been set up. */ #ifndef YY_USER_ACTION #define YY_USER_ACTION #endif /* Code executed at the end of each rule. */ #ifndef YY_BREAK #define YY_BREAK break; #endif #define YY_RULE_SETUP \ YY_USER_ACTION /** The main scanner function which does all the work. */ YY_DECL { register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; #line 53 "mod_lex.l" #line 900 "mod_lex.c" if ( !(yy_init) ) { (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif if ( ! (yy_start) ) (yy_start) = 1; /* first start state */ if ( ! mod_yyin ) mod_yyin = stdin; if ( ! mod_yyout ) mod_yyout = stdout; if ( ! YY_CURRENT_BUFFER ) { mod_yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = mod_yy_create_buffer(mod_yyin,YY_BUF_SIZE ); } mod_yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); /* Support of mod_yytext. */ *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 206 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 406 ); yy_find_action: yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { int yyl; for ( yyl = 0; yyl < mod_yyleng; ++yyl ) if ( mod_yytext[yyl] == '\n' ) mod_yylineno++; ; } do_action: /* This label is used only to access EOF actions. */ switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ *yy_cp = (yy_hold_char); yy_cp = (yy_last_accepting_cpos); yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP #line 55 "mod_lex.l" {int ch, last_ch; ECHO; /* a comment - repeat it */ ch = '\0'; do { last_ch = ch; #ifdef __cplusplus ch = yyinput(); #else ch = input(); #endif if(ch == EOF) { mod_yyerror ("Unterminated comment"); break; } fputc(ch,mod_yyout); } while (!((last_ch == '*') && (ch == '/'))); } YY_BREAK case 2: YY_RULE_SETUP #line 74 "mod_lex.l" {int ch; ECHO; /* a comment - repeat it */ do { #ifdef __cplusplus ch = yyinput(); #else ch = input(); #endif if(ch == EOF) { mod_yyerror ("Unterminated comment"); break; } fputc(ch, mod_yyout); } while (ch != '\n'); } YY_BREAK case 3: YY_RULE_SETUP #line 91 "mod_lex.l" {return TOK_ARGS;} YY_BREAK case 4: YY_RULE_SETUP #line 92 "mod_lex.l" {return TOK_INIT;} YY_BREAK case 5: YY_RULE_SETUP #line 93 "mod_lex.l" {return TOK_ANALYSIS;} YY_BREAK case 6: YY_RULE_SETUP #line 94 "mod_lex.l" {return TOK_NEW_TIMEPOINT;} YY_BREAK case 7: YY_RULE_SETUP #line 95 "mod_lex.l" {return TOK_CALL_TYPE;} YY_BREAK case 8: YY_RULE_SETUP #line 96 "mod_lex.l" {return TOK_TIME;} YY_BREAK case 9: YY_RULE_SETUP #line 97 "mod_lex.l" {return TOK_RAD_FREQ;} YY_BREAK case 10: YY_RULE_SETUP #line 98 "mod_lex.l" {return TOK_TEMPERATURE;} YY_BREAK case 11: YY_RULE_SETUP #line 99 "mod_lex.l" {return TOK_T;} YY_BREAK case 12: YY_RULE_SETUP #line 100 "mod_lex.l" {return TOK_LOAD;} YY_BREAK case 13: YY_RULE_SETUP #line 101 "mod_lex.l" {return TOK_TOTAL_LOAD;} YY_BREAK case 14: YY_RULE_SETUP #line 102 "mod_lex.l" {return TOK_MESSAGE;} YY_BREAK case 15: YY_RULE_SETUP #line 103 "mod_lex.l" {return TOK_PARAM;} YY_BREAK case 16: YY_RULE_SETUP #line 104 "mod_lex.l" {return TOK_PARAM_SIZE;} YY_BREAK case 17: YY_RULE_SETUP #line 105 "mod_lex.l" {return TOK_PARAM_NULL;} YY_BREAK case 18: YY_RULE_SETUP #line 106 "mod_lex.l" {return TOK_PORT_SIZE;} YY_BREAK case 19: YY_RULE_SETUP #line 107 "mod_lex.l" {return TOK_PORT_NULL;} YY_BREAK case 20: YY_RULE_SETUP #line 108 "mod_lex.l" {return TOK_PARTIAL;} YY_BREAK case 21: YY_RULE_SETUP #line 109 "mod_lex.l" {return TOK_AC_GAIN;} YY_BREAK case 22: YY_RULE_SETUP #line 110 "mod_lex.l" {return TOK_OUTPUT_DELAY;} YY_BREAK case 23: YY_RULE_SETUP #line 111 "mod_lex.l" {return TOK_STATIC_VAR;} YY_BREAK case 24: YY_RULE_SETUP #line 112 "mod_lex.l" {return TOK_STATIC_VAR_SIZE;} YY_BREAK case 25: YY_RULE_SETUP #line 113 "mod_lex.l" {return TOK_STATIC_VAR_INST;} YY_BREAK case 26: YY_RULE_SETUP #line 114 "mod_lex.l" {return TOK_INPUT;} YY_BREAK case 27: YY_RULE_SETUP #line 115 "mod_lex.l" {return TOK_INPUT_STATE;} YY_BREAK case 28: YY_RULE_SETUP #line 116 "mod_lex.l" {return TOK_INPUT_TYPE;} YY_BREAK case 29: YY_RULE_SETUP #line 117 "mod_lex.l" {return TOK_INPUT_STRENGTH;} YY_BREAK case 30: YY_RULE_SETUP #line 118 "mod_lex.l" {return TOK_OUTPUT;} YY_BREAK case 31: YY_RULE_SETUP #line 119 "mod_lex.l" {return TOK_OUTPUT_STATE;} YY_BREAK case 32: YY_RULE_SETUP #line 120 "mod_lex.l" {return TOK_OUTPUT_STRENGTH;} YY_BREAK case 33: YY_RULE_SETUP #line 121 "mod_lex.l" {return TOK_OUTPUT_TYPE;} YY_BREAK case 34: YY_RULE_SETUP #line 122 "mod_lex.l" {return TOK_OUTPUT_CHANGED;} YY_BREAK case 35: YY_RULE_SETUP #line 124 "mod_lex.l" {return TOK_LPAREN;} YY_BREAK case 36: YY_RULE_SETUP #line 125 "mod_lex.l" {return TOK_RPAREN;} YY_BREAK case 37: YY_RULE_SETUP #line 126 "mod_lex.l" {return TOK_LBRACKET;} YY_BREAK case 38: YY_RULE_SETUP #line 127 "mod_lex.l" {return TOK_RBRACKET;} YY_BREAK case 39: YY_RULE_SETUP #line 128 "mod_lex.l" {return TOK_COMMA;} YY_BREAK case 40: YY_RULE_SETUP #line 130 "mod_lex.l" {return TOK_IDENTIFIER;} YY_BREAK case 41: YY_RULE_SETUP #line 131 "mod_lex.l" ECHO; /* just eat non-newline whitespace */ YY_BREAK case 42: /* rule 42 can match eol */ YY_RULE_SETUP #line 132 "mod_lex.l" ECHO; /* echo newlines */ YY_BREAK case 43: YY_RULE_SETUP #line 133 "mod_lex.l" {return TOK_MISC_C;} YY_BREAK case 44: YY_RULE_SETUP #line 135 "mod_lex.l" ECHO; YY_BREAK #line 1246 "mod_lex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed mod_yyin at a new source and called * mod_yylex(). If so, then we have to assure * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; YY_CURRENT_BUFFER_LVALUE->yy_input_file = mod_yyin; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position * of the first EOB in the buffer, since yy_c_buf_p will * already have been incremented past the NUL character * (since all states make transitions on EOB to the * end-of-buffer state). Contrast this with the test * in input(). */ if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have * yy_get_previous_state() go ahead and do it * for us because it doesn't know how to deal * with the possibility of jamming (and we don't * want to build jamming into it because then it * will run more slowly). */ yy_next_state = yy_try_NUL_trans( yy_current_state ); yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { yy_cp = (yy_c_buf_p); goto yy_find_action; } } else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { (yy_did_buffer_switch_on_eof) = 0; if ( mod_yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up * mod_yytext, we can now set up * yy_c_buf_p so that if some total * hoser (like flex itself) wants to * call the scanner after we return the * YY_NULL, it'll still work - another * YY_NULL will get returned. */ (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; } else { if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: (yy_c_buf_p) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; yy_current_state = yy_get_previous_state( ); yy_cp = (yy_c_buf_p); yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; } default: YY_FATAL_ERROR( "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ } /* end of mod_yylex */ /* yy_get_next_buffer - try to read in a new buffer * * Returns a code representing an action: * EOB_ACT_LAST_MATCH - * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ static int yy_get_next_buffer (void) { register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. */ return EOB_ACT_END_OF_FILE; } else { /* We matched some text prior to the EOB, first * process it. */ return EOB_ACT_LAST_MATCH; } } /* Try to read more data. */ /* First move last chars to start of buffer. */ number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { int num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { int new_size = b->yy_buf_size * 2; if ( new_size <= 0 ) b->yy_buf_size += b->yy_buf_size / 8; else b->yy_buf_size *= 2; b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ mod_yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ b->yy_ch_buf = 0; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), (yy_n_chars), (size_t) num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; mod_yyrestart(mod_yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } else ret_val = EOB_ACT_CONTINUE_SCAN; if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) mod_yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); } (yy_n_chars) += number_to_move; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; return ret_val; } /* yy_get_previous_state - get the state just before the EOB char was reached */ static yy_state_type yy_get_previous_state (void) { register yy_state_type yy_current_state; register char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 206 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; } return yy_current_state; } /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { register int yy_is_jam; register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { yy_current_state = (int) yy_def[yy_current_state]; if ( yy_current_state >= 206 ) yy_c = yy_meta[(unsigned int) yy_c]; } yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; yy_is_jam = (yy_current_state == 205); return yy_is_jam ? 0 : yy_current_state; } static void yyunput (int c, register char * yy_bp ) { register char *yy_cp; yy_cp = (yy_c_buf_p); /* undo effects of setting up mod_yytext */ *yy_cp = (yy_hold_char); if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ register int number_to_move = (yy_n_chars) + 2; register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; if ( c == '\n' ){ --mod_yylineno; } (yytext_ptr) = yy_bp; (yy_hold_char) = *yy_cp; (yy_c_buf_p) = yy_cp; } #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) #else static int input (void) #endif { int c; *(yy_c_buf_p) = (yy_hold_char); if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ *(yy_c_buf_p) = '\0'; else { /* need more input */ int offset = (yy_c_buf_p) - (yytext_ptr); ++(yy_c_buf_p); switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() * sees that we've accumulated a * token and flags that we need to * try matching the token before * proceeding. But for input(), * there's no matching to consider. * So convert the EOB_ACT_LAST_MATCH * to EOB_ACT_END_OF_FILE. */ /* Reset buffer status. */ mod_yyrestart(mod_yyin ); /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { if ( mod_yywrap( ) ) return EOF; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); #else return input(); #endif } case EOB_ACT_CONTINUE_SCAN: (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ *(yy_c_buf_p) = '\0'; /* preserve mod_yytext */ (yy_hold_char) = *++(yy_c_buf_p); if ( c == '\n' ) mod_yylineno++; ; return c; } #endif /* ifndef YY_NO_INPUT */ /** Immediately switch to a different input stream. * @param input_file A readable stream. * * @note This function does not reset the start condition to @c INITIAL . */ void mod_yyrestart (FILE * input_file ) { if ( ! YY_CURRENT_BUFFER ){ mod_yyensure_buffer_stack (); YY_CURRENT_BUFFER_LVALUE = mod_yy_create_buffer(mod_yyin,YY_BUF_SIZE ); } mod_yy_init_buffer(YY_CURRENT_BUFFER,input_file ); mod_yy_load_buffer_state( ); } /** Switch to a different input buffer. * @param new_buffer The new input buffer. * */ void mod_yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) { /* TODO. We should be able to replace this entire function body * with * mod_yypop_buffer_state(); * mod_yypush_buffer_state(new_buffer); */ mod_yyensure_buffer_stack (); if ( YY_CURRENT_BUFFER == new_buffer ) return; if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } YY_CURRENT_BUFFER_LVALUE = new_buffer; mod_yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (mod_yywrap()) processing, but the only time this flag * is looked at is after mod_yywrap() is called, so it's safe * to go ahead and always set it. */ (yy_did_buffer_switch_on_eof) = 1; } static void mod_yy_load_buffer_state (void) { (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; mod_yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; (yy_hold_char) = *(yy_c_buf_p); } /** Allocate and initialize an input buffer state. * @param file A readable stream. * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. * * @return the allocated buffer state. */ YY_BUFFER_STATE mod_yy_create_buffer (FILE * file, int size ) { YY_BUFFER_STATE b; b = (YY_BUFFER_STATE) mod_yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in mod_yy_create_buffer()" ); b->yy_buf_size = size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ b->yy_ch_buf = (char *) mod_yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in mod_yy_create_buffer()" ); b->yy_is_our_buffer = 1; mod_yy_init_buffer(b,file ); return b; } /** Destroy the buffer. * @param b a buffer created with mod_yy_create_buffer() * */ void mod_yy_delete_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) mod_yyfree((void *) b->yy_ch_buf ); mod_yyfree((void *) b ); } #ifndef __cplusplus extern int isatty (int ); #endif /* __cplusplus */ /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a mod_yyrestart() or at EOF. */ static void mod_yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) { int oerrno = errno; mod_yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; /* If b is the current buffer, then mod_yy_init_buffer was _probably_ * called from mod_yyrestart() or through yy_get_next_buffer. * In that case, we don't want to reset the lineno or column. */ if (b != YY_CURRENT_BUFFER){ b->yy_bs_lineno = 1; b->yy_bs_column = 0; } b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; errno = oerrno; } /** Discard all buffered characters. On the next scan, YY_INPUT will be called. * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. * */ void mod_yy_flush_buffer (YY_BUFFER_STATE b ) { if ( ! b ) return; b->yy_n_chars = 0; /* We always need two end-of-buffer characters. The first causes * a transition to the end-of-buffer state. The second causes * a jam in that state. */ b->yy_ch_buf[0] = YY_END_OF_BUFFER_CHAR; b->yy_ch_buf[1] = YY_END_OF_BUFFER_CHAR; b->yy_buf_pos = &b->yy_ch_buf[0]; b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; if ( b == YY_CURRENT_BUFFER ) mod_yy_load_buffer_state( ); } /** Pushes the new state onto the stack. The new state becomes * the current state. This function will allocate the stack * if necessary. * @param new_buffer The new state. * */ void mod_yypush_buffer_state (YY_BUFFER_STATE new_buffer ) { if (new_buffer == NULL) return; mod_yyensure_buffer_stack(); /* This block is copied from mod_yy_switch_to_buffer. */ if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ *(yy_c_buf_p) = (yy_hold_char); YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } /* Only push if top exists. Otherwise, replace top. */ if (YY_CURRENT_BUFFER) (yy_buffer_stack_top)++; YY_CURRENT_BUFFER_LVALUE = new_buffer; /* copied from mod_yy_switch_to_buffer. */ mod_yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } /** Removes and deletes the top of the stack, if present. * The next element becomes the new top. * */ void mod_yypop_buffer_state (void) { if (!YY_CURRENT_BUFFER) return; mod_yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; if ((yy_buffer_stack_top) > 0) --(yy_buffer_stack_top); if (YY_CURRENT_BUFFER) { mod_yy_load_buffer_state( ); (yy_did_buffer_switch_on_eof) = 1; } } /* Allocates the stack if it does not exist. * Guarantees space for at least one push. */ static void mod_yyensure_buffer_stack (void) { int num_to_alloc; if (!(yy_buffer_stack)) { /* First allocation is just for 2 elements, since we don't know if this * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ num_to_alloc = 1; (yy_buffer_stack) = (struct yy_buffer_state**)mod_yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in mod_yyensure_buffer_stack()" ); memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; (yy_buffer_stack_top) = 0; return; } if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ int grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)mod_yyrealloc ((yy_buffer_stack), num_to_alloc * sizeof(struct yy_buffer_state*) ); if ( ! (yy_buffer_stack) ) YY_FATAL_ERROR( "out of dynamic memory in mod_yyensure_buffer_stack()" ); /* zero only the new slots.*/ memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); (yy_buffer_stack_max) = num_to_alloc; } } /** Setup the input buffer state to scan directly from a user-specified character buffer. * @param base the character buffer * @param size the size in bytes of the character buffer * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE mod_yy_scan_buffer (char * base, yy_size_t size ) { YY_BUFFER_STATE b; if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; b = (YY_BUFFER_STATE) mod_yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in mod_yy_scan_buffer()" ); b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; b->yy_input_file = 0; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; mod_yy_switch_to_buffer(b ); return b; } /** Setup the input buffer state to scan a string. The next call to mod_yylex() will * scan from a @e copy of @a str. * @param yystr a NUL-terminated string to scan * * @return the newly allocated buffer state object. * @note If you want to scan bytes that may contain NUL values, then use * mod_yy_scan_bytes() instead. */ YY_BUFFER_STATE mod_yy_scan_string (yyconst char * yystr ) { return mod_yy_scan_bytes(yystr,strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to mod_yylex() will * scan from a @e copy of @a bytes. * @param yybytes the byte buffer to scan * @param _yybytes_len the number of bytes in the buffer pointed to by @a bytes. * * @return the newly allocated buffer state object. */ YY_BUFFER_STATE mod_yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) { YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; /* Get memory for full buffer, including space for trailing EOB's. */ n = _yybytes_len + 2; buf = (char *) mod_yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in mod_yy_scan_bytes()" ); for ( i = 0; i < _yybytes_len; ++i ) buf[i] = yybytes[i]; buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; b = mod_yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in mod_yy_scan_bytes()" ); /* It's okay to grow etc. this buffer, and we should throw it * away when we're done. */ b->yy_is_our_buffer = 1; return b; } #ifndef YY_EXIT_FAILURE #define YY_EXIT_FAILURE 2 #endif static void yy_fatal_error (yyconst char* msg ) { (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } /* Redefine yyless() so it works in section 3 code. */ #undef yyless #define yyless(n) \ do \ { \ /* Undo effects of setting up mod_yytext. */ \ int yyless_macro_arg = (n); \ YY_LESS_LINENO(yyless_macro_arg);\ mod_yytext[mod_yyleng] = (yy_hold_char); \ (yy_c_buf_p) = mod_yytext + yyless_macro_arg; \ (yy_hold_char) = *(yy_c_buf_p); \ *(yy_c_buf_p) = '\0'; \ mod_yyleng = yyless_macro_arg; \ } \ while ( 0 ) /* Accessor methods (get/set functions) to struct members. */ /** Get the current line number. * */ int mod_yyget_lineno (void) { return mod_yylineno; } /** Get the input stream. * */ FILE *mod_yyget_in (void) { return mod_yyin; } /** Get the output stream. * */ FILE *mod_yyget_out (void) { return mod_yyout; } /** Get the length of the current token. * */ int mod_yyget_leng (void) { return mod_yyleng; } /** Get the current token. * */ char *mod_yyget_text (void) { return mod_yytext; } /** Set the current line number. * @param line_number * */ void mod_yyset_lineno (int line_number ) { mod_yylineno = line_number; } /** Set the input stream. This does not discard the current * input buffer. * @param in_str A readable stream. * * @see mod_yy_switch_to_buffer */ void mod_yyset_in (FILE * in_str ) { mod_yyin = in_str ; } void mod_yyset_out (FILE * out_str ) { mod_yyout = out_str ; } int mod_yyget_debug (void) { return mod_yy_flex_debug; } void mod_yyset_debug (int bdebug ) { mod_yy_flex_debug = bdebug ; } static int yy_init_globals (void) { /* Initialization is the same as for the non-reentrant scanner. * This function is called from mod_yylex_destroy(), so don't allocate here. */ /* We do not touch mod_yylineno unless the option is enabled. */ mod_yylineno = 1; (yy_buffer_stack) = 0; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; (yy_c_buf_p) = (char *) 0; (yy_init) = 0; (yy_start) = 0; /* Defined in main.c */ #ifdef YY_STDINIT mod_yyin = stdin; mod_yyout = stdout; #else mod_yyin = (FILE *) 0; mod_yyout = (FILE *) 0; #endif /* For future reference: Set errno on error, since we are called by * mod_yylex_init() */ return 0; } /* mod_yylex_destroy is for both reentrant and non-reentrant scanners. */ int mod_yylex_destroy (void) { /* Pop the buffer stack, destroying each element. */ while(YY_CURRENT_BUFFER){ mod_yy_delete_buffer(YY_CURRENT_BUFFER ); YY_CURRENT_BUFFER_LVALUE = NULL; mod_yypop_buffer_state(); } /* Destroy the stack itself. */ mod_yyfree((yy_buffer_stack) ); (yy_buffer_stack) = NULL; /* Reset the globals. This is important in a non-reentrant scanner so the next time * mod_yylex() is called, initialization will occur. */ yy_init_globals( ); return 0; } /* * Internal utility routines. */ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } #endif #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { register int n; for ( n = 0; s[n]; ++n ) ; return n; } #endif void *mod_yyalloc (yy_size_t size ) { return (void *) malloc( size ); } void *mod_yyrealloc (void * ptr, yy_size_t size ) { /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter * because both ANSI C and C++ allow castless assignment from * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); } void mod_yyfree (void * ptr ) { free( (char *) ptr ); /* see mod_yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" #line 135 "mod_lex.l" ngspice-26/src/xspice/cmpp/mod_yacc.c0000644000265600020320000022141512264261712017175 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "mod_yacc.y" /*============================================================================ FILE mod_yacc.y MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 20050420 Steven Borley Renamed strcmpi() to local_strcmpi() to avoid clash with strcmpi() in a windows header file. SUMMARY This file contains a BNF specification of the translation of cfunc.mod files to cfunc.c files, together with various support functions. INTERFACES mod_yyparse() - Function 'yyparse()' is generated automatically by UNIX 'yacc' utility and then converted to 'mod_yyparse()' by UNIX 'sed' utility under direction of Makefile. REFERENCED FILES mod_lex.l NON-STANDARD FEATURES Names of functions generated by 'yacc' are translated by 'sed' under direction of the Makefile to prevent collisions with functions generated from ifs_yacc.y. ============================================================================*/ #include #include #include #include "mod_yacc_y.h" extern int mod_yylex(void); #define yymaxdepth mod_yymaxdepth #define yyparse mod_yyparse #define yylex mod_yylex #define yyerror mod_yyerror #define yylval mod_yylval #define yychar mod_yychar #define yydebug mod_yydebug #define yypact mod_yypact #define yyr1 mod_yyr1 #define yyr2 mod_yyr2 #define yydef mod_yydef #define yychk mod_yychk #define yypgo mod_yypgo #define yyact mod_yyact #define yyexca mod_yyexca #define yyerrflag mod_yyerrflag #define yynerrs mod_yynerrs #define yyps mod_yyps #define yypv mod_yypv #define yys mod_yys #define yy_yys mod_yyyys #define yystate mod_yystate #define yytmp mod_yytmp #define yyv mod_yyv #define yy_yyv mod_yyyyv #define yyval mod_yyval #define yylloc mod_yylloc #define yyreds mod_yyreds #define yytoks mod_yytoks #define yylhs mod_yyyylhs #define yylen mod_yyyylen #define yydefred mod_yyyydefred #define yydgoto mod_yyyydgoto #define yysindex mod_yyyysindex #define yyrindex mod_yyyyrindex #define yygindex mod_yyyygindex #define yytable mod_yyyytable #define yycheck mod_yyyycheck #define yyname mod_yyyyname #define yyrule mod_yyyyrule Ifs_Table_t *mod_ifs_table; extern char *mod_yytext; extern FILE* mod_yyout; #include #include int mod_num_errors; #define BUFFER_SIZE 3000 static char buffer [BUFFER_SIZE]; static int buf_len; typedef enum {CONN, PARAM, STATIC_VAR} Id_Kind_t; /*--------------------------------------------------------------------------*/ static char *subscript (Sub_Id_t sub_id) { if (sub_id.has_subscript) { return sub_id.subscript; } else { return "0"; } } /*--------------------------------------------------------------------------*/ static int local_strcmpi(char *s, char *t) /* string compare - case insensitive */ { for (; *s && t && tolower(*s) == tolower(*t); s++, t++) ; if (*s && !*t) { return 1; } if (!*s && *t) { return -1; } if (! (*s || *t)) { return 0; } return (tolower(*s) - tolower(*t)); } /*---------------------------------------------------------------------------*/ static void put_type (FILE *fp, Data_Type_t type) { char ch = ' '; switch (type) { case INTEGER: ch = 'i'; break; case REAL: ch = 'r'; break; case COMPLEX: ch = 'c'; break; case BOOLEAN: ch = 'b'; break; case STRING: ch = 's'; break; case POINTER: ch = 'p'; break; } fprintf (fp, ".%cvalue", ch); } /*---------------------------------------------------------------------------*/ static void put_conn_type (FILE *fp, Port_Type_t type) { char ch; switch (type) { case USER_DEFINED: ch = 'p'; break; case DIGITAL: ch = 'p'; break; default: ch = 'r'; break; } fprintf (fp, ".%cvalue", ch); } /*---------------------------------------------------------------------------*/ static void check_dir (int conn_number, Dir_t dir, char *context) { Dir_t conn_dir; if (conn_number >= 0) { /* * If negative, this is an invalid port ID and we've already issued * an error. */ conn_dir = mod_ifs_table->conn[conn_number].direction; if ((conn_dir != dir) && (conn_dir != INOUT)) { char error_str[200]; sprintf (error_str, "Direction of port `%s' in %s() is not %s or INOUT", mod_ifs_table->conn[conn_number].name, context, (dir == IN) ? "IN" : "OUT"); yyerror (error_str); mod_num_errors++; } } } /*---------------------------------------------------------------------------*/ static void check_subscript (Boolean_t formal, Boolean_t actual, Boolean_t missing_actual_ok, char *context, char *id) { char error_str[200]; if ((formal && !actual) && !missing_actual_ok) { sprintf (error_str, "%s `%s' is an array - subscript required", context, id); yyerror (error_str); mod_num_errors++; return; } else if (!formal && actual) { sprintf (error_str, "%s `%s' is not an array - subscript prohibited", context, id); yyerror (error_str); mod_num_errors++; return; } } /*---------------------------------------------------------------------------*/ static int check_id (Sub_Id_t sub_id, Id_Kind_t kind, Boolean_t do_subscript) { int i; char error_str[200]; switch (kind) { case CONN: for (i = 0; i < mod_ifs_table->num_conn; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->conn[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->conn[i].is_array, sub_id.has_subscript, FALSE, "Port", sub_id.id); } return i; } } break; case PARAM: for (i = 0; i < mod_ifs_table->num_param; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->param[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->param[i].is_array, sub_id.has_subscript, FALSE, "Parameter", sub_id.id); } return i; } } break; case STATIC_VAR: for (i = 0; i < mod_ifs_table->num_inst_var; i++) { if (0 == local_strcmpi (sub_id.id, mod_ifs_table->inst_var[i].name)) { if (do_subscript) { check_subscript (mod_ifs_table->inst_var[i].is_array, sub_id.has_subscript, TRUE, "Static Variable", sub_id.id); } return i; } } break; } sprintf (error_str, "No %s named '%s'", ((kind==CONN) ? "port" : ((kind==PARAM) ? "parameter" :"static variable")), sub_id.id); yyerror (error_str); mod_num_errors++; return -1; } /*---------------------------------------------------------------------------*/ static int valid_id (Sub_Id_t sub_id, Id_Kind_t kind) { return check_id (sub_id, kind, FALSE); } /*---------------------------------------------------------------------------*/ static int valid_subid (Sub_Id_t sub_id, Id_Kind_t kind) { return check_id (sub_id, kind, TRUE); } /*---------------------------------------------------------------------------*/ static void init_buffer (void) { buf_len = 0; buffer[0] = '\0'; } /*---------------------------------------------------------------------------*/ static void append (char *str) { int len = (int) strlen (str); if (len + buf_len > BUFFER_SIZE) { yyerror ("Buffer overflow - try reducing the complexity of CM-macro array subscripts"); exit (1); } (void)strcat (buffer,str); } /* Line 268 of yacc.c */ #line 400 "mod_yacc.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_ARGS = 258, TOK_INIT = 259, TOK_ANALYSIS = 260, TOK_NEW_TIMEPOINT = 261, TOK_TIME = 262, TOK_RAD_FREQ = 263, TOK_TEMPERATURE = 264, TOK_T = 265, TOK_PARAM = 266, TOK_PARAM_SIZE = 267, TOK_PARAM_NULL = 268, TOK_PORT_SIZE = 269, TOK_PORT_NULL = 270, TOK_PARTIAL = 271, TOK_AC_GAIN = 272, TOK_CHANGED = 273, TOK_OUTPUT_DELAY = 274, TOK_STATIC_VAR = 275, TOK_STATIC_VAR_SIZE = 276, TOK_STATIC_VAR_INST = 277, TOK_INPUT = 278, TOK_INPUT_STRENGTH = 279, TOK_INPUT_STATE = 280, TOK_INPUT_TYPE = 281, TOK_OUTPUT = 282, TOK_OUTPUT_CHANGED = 283, TOK_OUTPUT_STRENGTH = 284, TOK_OUTPUT_STATE = 285, TOK_OUTPUT_TYPE = 286, TOK_COMMA = 287, TOK_LPAREN = 288, TOK_RPAREN = 289, TOK_LBRACKET = 290, TOK_RBRACKET = 291, TOK_MISC_C = 292, TOK_IDENTIFIER = 293, TOK_LOAD = 294, TOK_TOTAL_LOAD = 295, TOK_MESSAGE = 296, TOK_CALL_TYPE = 297 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 329 "mod_yacc.y" char *str; Sub_Id_t sub_id; /* Line 293 of yacc.c */ #line 485 "mod_yacc.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 497 "mod_yacc.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 2 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 219 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 43 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 15 /* YYNRULES -- Number of rules. */ #define YYNRULES 60 /* YYNRULES -- Number of states. */ #define YYNSTATES 148 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 297 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 4, 7, 8, 11, 14, 15, 18, 19, 22, 24, 26, 28, 29, 34, 35, 40, 42, 44, 46, 47, 52, 53, 58, 60, 62, 64, 66, 68, 70, 72, 74, 79, 84, 89, 94, 99, 104, 111, 118, 123, 128, 133, 138, 143, 148, 153, 158, 163, 168, 173, 178, 183, 188, 193, 198, 203, 205, 210 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 44, 0, -1, -1, 44, 45, -1, -1, 45, 52, -1, 45, 55, -1, -1, 47, 48, -1, -1, 48, 49, -1, 38, -1, 37, -1, 32, -1, -1, 35, 50, 48, 36, -1, -1, 33, 51, 48, 34, -1, 38, -1, 37, -1, 32, -1, -1, 35, 53, 45, 36, -1, -1, 33, 54, 45, 34, -1, 4, -1, 3, -1, 5, -1, 6, -1, 42, -1, 7, -1, 8, -1, 9, -1, 10, 33, 46, 34, -1, 11, 33, 56, 34, -1, 12, 33, 57, 34, -1, 13, 33, 57, 34, -1, 14, 33, 57, 34, -1, 15, 33, 57, 34, -1, 16, 33, 56, 32, 56, 34, -1, 17, 33, 56, 32, 56, 34, -1, 20, 33, 56, 34, -1, 21, 33, 57, 34, -1, 22, 33, 57, 34, -1, 19, 33, 56, 34, -1, 18, 33, 56, 34, -1, 23, 33, 56, 34, -1, 26, 33, 56, 34, -1, 31, 33, 56, 34, -1, 24, 33, 56, 34, -1, 25, 33, 56, 34, -1, 27, 33, 56, 34, -1, 29, 33, 56, 34, -1, 30, 33, 56, 34, -1, 28, 33, 56, 34, -1, 39, 33, 56, 34, -1, 40, 33, 56, 34, -1, 41, 33, 56, 34, -1, 57, -1, 57, 35, 46, 36, -1, 38, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 382, 382, 383, 386, 387, 388, 393, 393, 397, 398, 401, 402, 403, 405, 404, 409, 408, 414, 415, 416, 418, 417, 422, 421, 427, 429, 431, 433, 435, 437, 439, 441, 443, 445, 451, 454, 457, 460, 463, 471, 480, 492, 496, 500, 506, 512, 520, 526, 532, 541, 550, 558, 567, 576, 581, 586, 591, 598, 599, 605 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "TOK_ARGS", "TOK_INIT", "TOK_ANALYSIS", "TOK_NEW_TIMEPOINT", "TOK_TIME", "TOK_RAD_FREQ", "TOK_TEMPERATURE", "TOK_T", "TOK_PARAM", "TOK_PARAM_SIZE", "TOK_PARAM_NULL", "TOK_PORT_SIZE", "TOK_PORT_NULL", "TOK_PARTIAL", "TOK_AC_GAIN", "TOK_CHANGED", "TOK_OUTPUT_DELAY", "TOK_STATIC_VAR", "TOK_STATIC_VAR_SIZE", "TOK_STATIC_VAR_INST", "TOK_INPUT", "TOK_INPUT_STRENGTH", "TOK_INPUT_STATE", "TOK_INPUT_TYPE", "TOK_OUTPUT", "TOK_OUTPUT_CHANGED", "TOK_OUTPUT_STRENGTH", "TOK_OUTPUT_STATE", "TOK_OUTPUT_TYPE", "TOK_COMMA", "TOK_LPAREN", "TOK_RPAREN", "TOK_LBRACKET", "TOK_RBRACKET", "TOK_MISC_C", "TOK_IDENTIFIER", "TOK_LOAD", "TOK_TOTAL_LOAD", "TOK_MESSAGE", "TOK_CALL_TYPE", "$accept", "mod_file", "c_code", "buffered_c_code", "$@1", "buffered_c_code2", "buffered_c_char", "$@2", "$@3", "c_char", "$@4", "$@5", "macro", "subscriptable_id", "id", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 43, 44, 44, 45, 45, 45, 47, 46, 48, 48, 49, 49, 49, 50, 49, 51, 49, 52, 52, 52, 53, 52, 54, 52, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 55, 56, 56, 57 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 0, 2, 2, 0, 2, 0, 2, 1, 1, 1, 0, 4, 0, 4, 1, 1, 1, 0, 4, 0, 4, 1, 1, 1, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 6, 6, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 1, 4, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 4, 1, 3, 26, 25, 27, 28, 30, 31, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 23, 21, 19, 18, 0, 0, 0, 29, 5, 6, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 9, 60, 0, 58, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 33, 8, 34, 7, 35, 36, 37, 38, 0, 0, 45, 44, 41, 42, 43, 46, 49, 50, 47, 51, 54, 52, 53, 48, 24, 22, 55, 56, 57, 13, 16, 14, 12, 11, 10, 0, 0, 0, 9, 9, 59, 39, 40, 0, 0, 17, 15 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 3, 71, 72, 102, 135, 140, 139, 42, 67, 66, 43, 74, 75 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -124 static const yytype_int16 yypact[] = { -124, 25, -124, 138, -124, -124, -124, -124, -124, -124, -124, -7, -6, -5, -4, 3, 8, 15, 17, 20, 21, 22, 23, 24, 61, 99, 139, 141, 148, 149, 150, 151, 152, -124, -124, -124, -124, -124, 153, 154, 155, -124, -124, -124, -124, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, 156, -124, -124, 156, 156, 156, 157, -124, -124, 158, 160, 159, 162, 163, 164, 26, 167, 166, 168, 169, 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 58, 98, 181, 182, 183, -124, 14, -124, -124, -124, -124, -124, -124, 156, 156, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, -124, 165, 184, 185, -124, -124, -124, -124, -124, 0, 7, -124, -124 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -124, -124, -61, 85, -124, -123, -124, -124, -124, -124, -124, -124, -124, -50, -25 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 80, 81, 82, 83, 84, 96, 97, 87, 88, 89, 90, 91, 92, 93, 94, 95, 144, 145, 98, 99, 100, 76, 77, 78, 79, 2, 44, 45, 46, 47, 85, 86, 130, 131, 146, 132, 48, 133, 134, 130, 131, 49, 132, 147, 133, 134, 130, 131, 50, 132, 51, 133, 134, 52, 53, 54, 55, 56, 109, 137, 138, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 125, 35, 57, 36, 37, 38, 39, 40, 41, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 58, 35, 126, 36, 37, 38, 39, 40, 41, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 59, 35, 60, 36, 37, 38, 39, 40, 41, 61, 62, 63, 64, 65, 68, 69, 70, 136, 0, 101, 103, 105, 73, 104, 106, 107, 108, 110, 111, 141, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 127, 128, 129, 142, 143 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-124)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int16 yycheck[] = { 50, 51, 52, 53, 54, 66, 67, 57, 58, 59, 60, 61, 62, 63, 64, 65, 139, 140, 68, 69, 70, 46, 47, 48, 49, 0, 33, 33, 33, 33, 55, 56, 32, 33, 34, 35, 33, 37, 38, 32, 33, 33, 35, 36, 37, 38, 32, 33, 33, 35, 33, 37, 38, 33, 33, 33, 33, 33, 32, 109, 110, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 33, 37, 38, 39, 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 33, 35, 36, 37, 38, 39, 40, 41, 42, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 33, 35, 33, 37, 38, 39, 40, 41, 42, 33, 33, 33, 33, 33, 33, 33, 33, 104, -1, 34, 34, 34, 38, 35, 34, 34, 34, 32, 34, 36, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 44, 0, 45, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 35, 37, 38, 39, 40, 41, 42, 52, 55, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 33, 54, 53, 33, 33, 33, 46, 47, 38, 56, 57, 57, 57, 57, 57, 56, 56, 56, 56, 56, 57, 57, 56, 56, 56, 56, 56, 56, 56, 56, 56, 45, 45, 56, 56, 56, 34, 48, 34, 35, 34, 34, 34, 34, 32, 32, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 34, 36, 34, 34, 34, 32, 33, 35, 37, 38, 49, 46, 56, 56, 51, 50, 36, 34, 34, 48, 48, 34, 36 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 7: /* Line 1806 of yacc.c */ #line 393 "mod_yacc.y" {init_buffer();} break; case 8: /* Line 1806 of yacc.c */ #line 394 "mod_yacc.y" {(yyval.str) = strdup (buffer);} break; case 11: /* Line 1806 of yacc.c */ #line 401 "mod_yacc.y" {append (mod_yytext);} break; case 12: /* Line 1806 of yacc.c */ #line 402 "mod_yacc.y" {append (mod_yytext);} break; case 13: /* Line 1806 of yacc.c */ #line 403 "mod_yacc.y" {append (mod_yytext);} break; case 14: /* Line 1806 of yacc.c */ #line 405 "mod_yacc.y" {append("[");} break; case 15: /* Line 1806 of yacc.c */ #line 407 "mod_yacc.y" {append("]");} break; case 16: /* Line 1806 of yacc.c */ #line 409 "mod_yacc.y" {append("(");} break; case 17: /* Line 1806 of yacc.c */ #line 411 "mod_yacc.y" {append(")");} break; case 18: /* Line 1806 of yacc.c */ #line 414 "mod_yacc.y" {fputs (mod_yytext, mod_yyout);} break; case 19: /* Line 1806 of yacc.c */ #line 415 "mod_yacc.y" {fputs (mod_yytext, mod_yyout);} break; case 20: /* Line 1806 of yacc.c */ #line 416 "mod_yacc.y" {fputs (mod_yytext, mod_yyout);} break; case 21: /* Line 1806 of yacc.c */ #line 418 "mod_yacc.y" {putc ('[', mod_yyout);} break; case 22: /* Line 1806 of yacc.c */ #line 420 "mod_yacc.y" {putc (']', mod_yyout);} break; case 23: /* Line 1806 of yacc.c */ #line 422 "mod_yacc.y" {putc ('(', mod_yyout);} break; case 24: /* Line 1806 of yacc.c */ #line 424 "mod_yacc.y" {putc (')', mod_yyout);} break; case 25: /* Line 1806 of yacc.c */ #line 428 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.init");} break; case 26: /* Line 1806 of yacc.c */ #line 430 "mod_yacc.y" {fprintf (mod_yyout, "Mif_Private_t *mif_private");} break; case 27: /* Line 1806 of yacc.c */ #line 432 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.anal_type");} break; case 28: /* Line 1806 of yacc.c */ #line 434 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.anal_init");} break; case 29: /* Line 1806 of yacc.c */ #line 436 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.call_type");} break; case 30: /* Line 1806 of yacc.c */ #line 438 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.time");} break; case 31: /* Line 1806 of yacc.c */ #line 440 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.frequency");} break; case 32: /* Line 1806 of yacc.c */ #line 442 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.temperature");} break; case 33: /* Line 1806 of yacc.c */ #line 444 "mod_yacc.y" {fprintf (mod_yyout, "mif_private->circuit.t[%s]", (yyvsp[(3) - (4)].str));} break; case 34: /* Line 1806 of yacc.c */ #line 446 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), PARAM); fprintf (mod_yyout, "mif_private->param[%d]->element[%s]", i, subscript ((yyvsp[(3) - (4)].sub_id))); put_type (mod_yyout, mod_ifs_table->param[i].type); } break; case 35: /* Line 1806 of yacc.c */ #line 452 "mod_yacc.y" {int i = valid_id ((yyvsp[(3) - (4)].sub_id), PARAM); fprintf (mod_yyout, "mif_private->param[%d]->size", i);} break; case 36: /* Line 1806 of yacc.c */ #line 455 "mod_yacc.y" {int i = valid_id ((yyvsp[(3) - (4)].sub_id), PARAM); fprintf (mod_yyout, "mif_private->param[%d]->is_null", i);} break; case 37: /* Line 1806 of yacc.c */ #line 458 "mod_yacc.y" {int i = valid_id ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->size", i);} break; case 38: /* Line 1806 of yacc.c */ #line 461 "mod_yacc.y" {int i = valid_id ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->is_null", i);} break; case 39: /* Line 1806 of yacc.c */ #line 465 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (6)].sub_id), CONN); int j = valid_subid ((yyvsp[(5) - (6)].sub_id), CONN); check_dir (i, OUT, "PARTIAL"); check_dir (j, IN, "PARTIAL"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->partial[%d].port[%s]", i, subscript((yyvsp[(3) - (6)].sub_id)), j, subscript((yyvsp[(5) - (6)].sub_id)));} break; case 40: /* Line 1806 of yacc.c */ #line 473 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (6)].sub_id), CONN); int j = valid_subid ((yyvsp[(5) - (6)].sub_id), CONN); check_dir (i, OUT, "AC_GAIN"); check_dir (j, IN, "AC_GAIN"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->ac_gain[%d].port[%s]", i, subscript((yyvsp[(3) - (6)].sub_id)), j, subscript((yyvsp[(5) - (6)].sub_id)));} break; case 41: /* Line 1806 of yacc.c */ #line 481 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]->element[%s]", i, subscript((yyvsp[(3) - (4)].sub_id))); if (mod_ifs_table->inst_var[i].is_array && !((yyvsp[(3) - (4)].sub_id).has_subscript)) { /* null - eg. for malloc lvalue */ } else { put_type (mod_yyout, mod_ifs_table->inst_var[i].type); } } break; case 42: /* Line 1806 of yacc.c */ #line 493 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]->size", i);} break; case 43: /* Line 1806 of yacc.c */ #line 497 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), STATIC_VAR); fprintf (mod_yyout, "mif_private->inst_var[%d]", i);} break; case 44: /* Line 1806 of yacc.c */ #line 501 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "OUTPUT_DELAY"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->delay", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 45: /* Line 1806 of yacc.c */ #line 507 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "CHANGED"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->changed", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 46: /* Line 1806 of yacc.c */ #line 513 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, IN, "INPUT"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->input", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]);} break; case 47: /* Line 1806 of yacc.c */ #line 521 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, IN, "INPUT_TYPE"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->type_str", i, subscript((yyvsp[(3) - (4)].sub_id))); } break; case 48: /* Line 1806 of yacc.c */ #line 527 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "OUTPUT_TYPE"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->type_str", i, subscript((yyvsp[(3) - (4)].sub_id))); } break; case 49: /* Line 1806 of yacc.c */ #line 533 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, IN, "INPUT_STRENGTH"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->input", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->strength");} break; case 50: /* Line 1806 of yacc.c */ #line 542 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, IN, "INPUT_STATE"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->input", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->state");} break; case 51: /* Line 1806 of yacc.c */ #line 551 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "OUTPUT"); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->output", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]);} break; case 52: /* Line 1806 of yacc.c */ #line 559 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "OUTPUT_STRENGTH"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->output", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->strength");} break; case 53: /* Line 1806 of yacc.c */ #line 568 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); check_dir (i, OUT, "OUTPUT_STATE"); fprintf (mod_yyout, "((Digital_t*)(mif_private->conn[%d]->port[%s]->output", i, subscript((yyvsp[(3) - (4)].sub_id))); put_conn_type (mod_yyout, mod_ifs_table->conn[i].allowed_port_type[0]); fprintf (mod_yyout, "))->state");} break; case 54: /* Line 1806 of yacc.c */ #line 577 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->changed", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 55: /* Line 1806 of yacc.c */ #line 582 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->load", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 56: /* Line 1806 of yacc.c */ #line 587 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->total_load", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 57: /* Line 1806 of yacc.c */ #line 592 "mod_yacc.y" {int i = valid_subid ((yyvsp[(3) - (4)].sub_id), CONN); fprintf (mod_yyout, "mif_private->conn[%d]->port[%s]->msg", i, subscript((yyvsp[(3) - (4)].sub_id)));} break; case 59: /* Line 1806 of yacc.c */ #line 600 "mod_yacc.y" {(yyval.sub_id) = (yyvsp[(1) - (4)].sub_id); (yyval.sub_id).has_subscript = TRUE; (yyval.sub_id).subscript = (yyvsp[(3) - (4)].str);} break; case 60: /* Line 1806 of yacc.c */ #line 606 "mod_yacc.y" {(yyval.sub_id).has_subscript = FALSE; (yyval.sub_id).id = strdup (mod_yytext);} break; /* Line 1806 of yacc.c */ #line 2318 "mod_yacc.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 610 "mod_yacc.y" ngspice-26/src/xspice/cmpp/ifs_yacc.c0000644000265600020320000024422012264261712017176 0ustar andreasadmin/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "ifs_yacc.y" /*============================================================================ FILE ifs_yacc.y MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 12/31/91 Bill Kuhn Fix bug in usage of strcmp in check_default_type() SUMMARY This file contains the BNF specification of the language used in the ifspec.ifs file together with various support functions, and parses the ifspec.ifs file to get the information from it and place this information into a data structure of type Ifs_Table_t. INTERFACES yyparse() - Generated automatically by UNIX 'yacc' utility. REFERENCED FILES ifs_lex.l NON-STANDARD FEATURES None. ============================================================================*/ #include #include #include #include "ifs_yacc_y.h" #define yymaxdepth ifs_yymaxdepth #define yyparse ifs_yyparse #define yylex ifs_yylex #define yyerror ifs_yyerror #define yylval ifs_yylval #define yychar ifs_yychar #define yydebug ifs_yydebug #define yypact ifs_yypact #define yyr1 ifs_yyr1 #define yyr2 ifs_yyr2 #define yydef ifs_yydef #define yychk ifs_yychk #define yypgo ifs_yypgo #define yyact ifs_yyact #define yyexca ifs_yyexca #define yyerrflag ifs_yyerrflag #define yynerrs ifs_yynerrs #define yyps ifs_yyps #define yypv ifs_yypv #define yys ifs_yys #define yy_yys ifs_yyyys #define yystate ifs_yystate #define yytmp ifs_yytmp #define yyv ifs_yyv #define yy_yyv ifs_yyyyv #define yyval ifs_yyval #define yylloc ifs_yylloc #define yyreds ifs_yyreds #define yytoks ifs_yytoks #define yylhs ifs_yyyylhs #define yylen ifs_yyyylen #define yydefred ifs_yyyydefred #define yydgoto ifs_yyyydgoto #define yysindex ifs_yyyysindex #define yyrindex ifs_yyyyrindex #define yygindex ifs_yyyygindex #define yytable ifs_yyyytable #define yycheck ifs_yyyycheck #define yyname ifs_yyyyname #define yyrule ifs_yyyyrule extern int yylineno; extern int yyival; extern double yydval; extern char *ifs_yytext; extern int ifs_yylex(void); Boolean_t parser_just_names; static Boolean_t saw_model_name; static Boolean_t saw_function_name; static char *dtype_to_str[] = { "BOOLEAN", "INTEGER", "REAL", "COMPLEX", "STRING", "POINTER" }; static Boolean_t did_default_type; static Boolean_t did_allowed_types; static int num_items; static int item; static int item_offset; static Boolean_t num_items_fixed; Ifs_Table_t *parser_ifs_table; #define TBL parser_ifs_table static size_t alloced_size [4]; /* * !!!!! Make sure these are large enough so that they never get realloced * !!!!! since that will cause garbage uninitialized data... * !!!!! (FIX THIS!) */ #define DEFAULT_SIZE_CONN 100 #define DEFAULT_SIZE_PARAM 100 #define DEFAULT_SIZE_INST_VAR 100 #define GROW_SIZE 10 typedef enum { TBL_NAME, TBL_PORT, TBL_PARAMETER, TBL_STATIC_VAR, } Table_t; typedef struct { Table_t table; int record; } Context_t; Context_t context; #define ITEM_BUFFER_SIZE 20 /* number of items that can be put in a table * before requiring a new xxx_TABLE: keyword */ #define FOR_ITEM(i) for (i = item_offset; i < num_items; i++) #define ITEM_BUF(i) item_buffer[i-item_offset] #define ASSIGN_BOUNDS(struct_name, i) \ if (ITEM_BUF(i).range.is_named) {\ TBL->struct_name[i].has_conn_ref = TRUE;\ TBL->struct_name[i].conn_ref = find_conn_ref (ITEM_BUF(i).range.u.name);\ } else {\ TBL->struct_name[i].has_conn_ref = FALSE;\ TBL->struct_name[i].has_lower_bound =\ ITEM_BUF(i).range.u.bounds.lower.has_bound;\ TBL->struct_name[i].has_upper_bound =\ ITEM_BUF(i).range.u.bounds.upper.has_bound;\ if (TBL->struct_name[i].has_lower_bound) {\ assert (ITEM_BUF(i).range.u.bounds.lower.bound.kind == INTEGER);\ TBL->struct_name[i].lower_bound =\ ITEM_BUF(i).range.u.bounds.lower.bound.u.ivalue;\ }\ if (TBL->struct_name[i].has_upper_bound) {\ assert (ITEM_BUF(i).range.u.bounds.upper.bound.kind == INTEGER);\ TBL->struct_name[i].upper_bound =\ ITEM_BUF(i).range.u.bounds.upper.bound.u.ivalue;\ }\ } /*---------------------------------------------------------------------------*/ static void fatal (char *str) { yyerror (str); exit(1); } /*---------------------------------------------------------------------------*/ static int find_conn_ref (char *name) { int i; char str[130]; for (i = 0; i < TBL->num_conn; i++) { if (strcmp (name, TBL->conn[i].name) == 0) { return i; } } sprintf (str, "Port `%s' not found", name); yyerror (str); return 0; } typedef enum {C_DOUBLE, C_BOOLEAN, C_POINTER, C_UNDEF} Ctype_Class_t; /*---------------------------------------------------------------------------*/ static Ctype_Class_t get_ctype_class (Port_Type_t type) { switch (type) { case USER_DEFINED: return C_POINTER; break; case DIGITAL: return C_BOOLEAN; break; default: return C_DOUBLE; break; } } /*---------------------------------------------------------------------------*/ static void check_port_type_direction (Dir_t dir, Port_Type_t port_type) { switch (port_type) { case VOLTAGE: case DIFF_VOLTAGE: case CURRENT: case DIFF_CURRENT: case DIGITAL: case USER_DEFINED: /* * anything goes */ break; case VSOURCE_CURRENT: if (dir != IN) { yyerror ("Port type `vnam' is only valid for `in' ports"); } break; case CONDUCTANCE: case DIFF_CONDUCTANCE: case RESISTANCE: case DIFF_RESISTANCE: if (dir != INOUT) { yyerror ("Port types `g', `gd', `h', `hd' are only valid for `inout' ports"); } break; default: assert (0); } } /*---------------------------------------------------------------------------*/ static void check_dtype_not_pointer (Data_Type_t dtype) { if (dtype == POINTER) { yyerror("Invalid parameter type - POINTER type valid only for STATIC_VARs"); } } /*---------------------------------------------------------------------------*/ static void check_default_type (Conn_Info_t conn) { int i; for (i = 0; i < conn.num_allowed_types; i++) { if (conn.default_port_type == conn.allowed_port_type[i]) { if ((conn.default_port_type != USER_DEFINED) || (strcmp (conn.default_type, conn.allowed_type[i]) == 0)) { return; } } } yyerror ("Port default type is not an allowed type"); } /*---------------------------------------------------------------------------*/ static void assign_ctype_list (Conn_Info_t *conn, Ctype_List_t *ctype_list ) { int i; Ctype_List_t *p; Ctype_Class_t ctype_class = C_UNDEF; conn->num_allowed_types = 0; for (p = ctype_list; p; p = p->next) { conn->num_allowed_types++; } conn->allowed_type = (char**) calloc ((size_t) conn->num_allowed_types, sizeof (char*)); conn->allowed_port_type = (Port_Type_t*) calloc ((size_t) conn->num_allowed_types, sizeof (Port_Type_t)); if (! (conn->allowed_type && conn->allowed_port_type)) { fatal ("Could not allocate memory"); } for (i = conn->num_allowed_types-1, p = ctype_list; p; i--, p = p->next) { if (ctype_class == C_UNDEF) { ctype_class = get_ctype_class (p->ctype.kind); } if (ctype_class != get_ctype_class (p->ctype.kind)) { yyerror ("Incompatible port types in `allowed_types' clause"); } check_port_type_direction (conn->direction, p->ctype.kind); conn->allowed_port_type[i] = p->ctype.kind; conn->allowed_type[i] = p->ctype.id; } } /*---------------------------------------------------------------------------*/ static void assign_value (Data_Type_t type, Value_t *dest_value, My_Value_t src_value) { char str[200]; if ((type == REAL) && (src_value.kind == INTEGER)) { dest_value->rvalue = src_value.u.ivalue; return; } else if (type != src_value.kind) { sprintf (str, "Invalid parameter type (saw %s - expected %s)", dtype_to_str[src_value.kind], dtype_to_str[type] ); yyerror (str); } switch (type) { case BOOLEAN: dest_value->bvalue = src_value.u.bvalue; break; case INTEGER: dest_value->ivalue = src_value.u.ivalue; break; case REAL: dest_value->rvalue = src_value.u.rvalue; break; case COMPLEX: dest_value->cvalue = src_value.u.cvalue; break; case STRING: dest_value->svalue = src_value.u.svalue; break; default: yyerror ("INTERNAL ERROR - unexpected data type in `assign_value'"); } } /*---------------------------------------------------------------------------*/ static void assign_limits (Data_Type_t type, Param_Info_t *param, Range_t range) { if (range.is_named) { yyerror ("Named range not allowed for limits"); } param->has_lower_limit = range.u.bounds.lower.has_bound; if (param->has_lower_limit) { assign_value (type, ¶m->lower_limit, range.u.bounds.lower.bound); } param->has_upper_limit = range.u.bounds.upper.has_bound; if (param->has_upper_limit) { assign_value (type, ¶m->upper_limit, range.u.bounds.upper.bound); } } /*---------------------------------------------------------------------------*/ static void check_item_num (void) { if (item-item_offset >= ITEM_BUFFER_SIZE) { fatal ("Too many items in table - split into sub-tables"); } if (item > (int) alloced_size [context.table] ) { switch (context.table) { case TBL_NAME: break; case TBL_PORT: alloced_size[context.table] += GROW_SIZE; TBL->conn = (Conn_Info_t*) realloc (TBL->conn, alloced_size [context.table] * sizeof (Conn_Info_t)); if (! TBL->conn) { fatal ("Error allocating memory for port definition"); } break; case TBL_PARAMETER: alloced_size [context.table] += GROW_SIZE; TBL->param = (Param_Info_t*) realloc (TBL->param, alloced_size [context.table] * sizeof (Param_Info_t)); if (! TBL->param) { fatal ("Error allocating memory for parameter definition"); } break; case TBL_STATIC_VAR: alloced_size [context.table] += GROW_SIZE; TBL->inst_var = (Inst_Var_Info_t*) realloc (TBL->inst_var, alloced_size [context.table] * sizeof (Inst_Var_Info_t)); if (! TBL->inst_var) { fatal ("Error allocating memory for static variable definition"); } break; } } item++; } /*---------------------------------------------------------------------------*/ static void check_end_item_num (void) { if (num_items_fixed) { if (item != num_items) { char buf[200]; sprintf (buf, "Wrong number of elements in sub-table (saw %d - expected %d)", item - item_offset, num_items - item_offset); fatal (buf); } } else { num_items = item; num_items_fixed = TRUE; switch (context.table) { case TBL_NAME: break; case TBL_PORT: TBL->num_conn = num_items; break; case TBL_PARAMETER: TBL->num_param = num_items; break; case TBL_STATIC_VAR: TBL->num_inst_var = num_items; break; } } item = item_offset; } #define INIT(n) item = (n); item_offset = (n); num_items = (n); num_items_fixed = FALSE #define ITEM check_item_num() #define END check_end_item_num() /* Line 268 of yacc.c */ #line 508 "ifs_yacc.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { TOK_ALLOWED_TYPES = 258, TOK_ARRAY = 259, TOK_ARRAY_BOUNDS = 260, TOK_BOOL_NO = 261, TOK_BOOL_YES = 262, TOK_COMMA = 263, TOK_PORT_NAME = 264, TOK_PORT_TABLE = 265, TOK_CTYPE_D = 266, TOK_CTYPE_G = 267, TOK_CTYPE_GD = 268, TOK_CTYPE_H = 269, TOK_CTYPE_HD = 270, TOK_CTYPE_I = 271, TOK_CTYPE_ID = 272, TOK_CTYPE_V = 273, TOK_CTYPE_VD = 274, TOK_CTYPE_VNAM = 275, TOK_C_FUNCTION_NAME = 276, TOK_DASH = 277, TOK_DATA_TYPE = 278, TOK_DEFAULT_TYPE = 279, TOK_DEFAULT_VALUE = 280, TOK_DESCRIPTION = 281, TOK_DIRECTION = 282, TOK_DIR_IN = 283, TOK_DIR_INOUT = 284, TOK_DIR_OUT = 285, TOK_DTYPE_BOOLEAN = 286, TOK_DTYPE_COMPLEX = 287, TOK_DTYPE_INT = 288, TOK_DTYPE_POINTER = 289, TOK_DTYPE_REAL = 290, TOK_DTYPE_STRING = 291, TOK_IDENTIFIER = 292, TOK_STATIC_VAR_NAME = 293, TOK_STATIC_VAR_TABLE = 294, TOK_INT_LITERAL = 295, TOK_LANGLE = 296, TOK_LBRACKET = 297, TOK_LIMITS = 298, TOK_NAME_TABLE = 299, TOK_NULL_ALLOWED = 300, TOK_PARAMETER_NAME = 301, TOK_PARAMETER_TABLE = 302, TOK_RANGLE = 303, TOK_RBRACKET = 304, TOK_REAL_LITERAL = 305, TOK_SPICE_MODEL_NAME = 306, TOK_STRING_LITERAL = 307 }; #endif #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef union YYSTYPE { /* Line 293 of yacc.c */ #line 488 "ifs_yacc.y" Ctype_List_t *ctype_list; Dir_t dir; Boolean_t bool; Range_t range; Data_Type_t dtype; My_Port_Type_t ctype; My_Value_t value; char *str; Bound_t bound; int ival; double rval; Complex_t cval; /* Line 293 of yacc.c */ #line 613 "ifs_yacc.c" } YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 518 "ifs_yacc.y" /* * resuse the Yacc union for our buffer: */ YYSTYPE item_buffer [ITEM_BUFFER_SIZE]; /* * Shorthand for refering to the current element of the item buffer: */ #define BUF ITEM_BUF(item-1) /* Line 343 of yacc.c */ #line 639 "ifs_yacc.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 3 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 109 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 53 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 47 /* YYNRULES -- Number of rules. */ #define YYNRULES 114 /* YYNRULES -- Number of states. */ #define YYNSTATES 143 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 307 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint16 yyprhs[] = { 0, 0, 3, 4, 7, 9, 12, 13, 17, 18, 22, 23, 27, 28, 32, 33, 36, 39, 42, 45, 46, 49, 52, 55, 58, 61, 64, 67, 70, 73, 74, 77, 80, 83, 86, 89, 92, 95, 98, 101, 102, 105, 108, 111, 114, 117, 118, 121, 122, 125, 128, 129, 132, 133, 136, 138, 140, 142, 143, 146, 147, 150, 152, 154, 156, 158, 160, 162, 164, 166, 168, 170, 172, 173, 176, 178, 180, 182, 184, 186, 188, 189, 192, 194, 200, 201, 203, 205, 207, 209, 215, 217, 219, 220, 223, 225, 227, 229, 231, 233, 235, 241, 242, 245, 249, 251, 255, 257, 259, 261, 263, 265, 267, 269, 271 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 54, 0, -1, -1, 55, 56, -1, 57, -1, 56, 57, -1, -1, 44, 58, 62, -1, -1, 10, 59, 64, -1, -1, 47, 60, 66, -1, -1, 39, 61, 68, -1, -1, 62, 63, -1, 21, 95, -1, 51, 95, -1, 26, 94, -1, -1, 64, 65, -1, 9, 70, -1, 26, 72, -1, 27, 73, -1, 24, 76, -1, 3, 90, -1, 4, 75, -1, 5, 71, -1, 45, 75, -1, -1, 66, 67, -1, 46, 70, -1, 26, 72, -1, 23, 78, -1, 25, 86, -1, 43, 80, -1, 4, 75, -1, 5, 71, -1, 45, 75, -1, -1, 68, 69, -1, 38, 70, -1, 26, 72, -1, 23, 78, -1, 4, 75, -1, -1, 70, 95, -1, -1, 71, 81, -1, 71, 95, -1, -1, 72, 94, -1, -1, 73, 74, -1, 28, -1, 30, -1, 29, -1, -1, 75, 93, -1, -1, 76, 77, -1, 18, -1, 19, -1, 20, -1, 16, -1, 17, -1, 12, -1, 13, -1, 14, -1, 15, -1, 11, -1, 95, -1, -1, 78, 79, -1, 35, -1, 33, -1, 31, -1, 32, -1, 36, -1, 34, -1, -1, 80, 84, -1, 22, -1, 42, 83, 82, 83, 49, -1, -1, 8, -1, 22, -1, 97, -1, 22, -1, 42, 85, 82, 85, 49, -1, 22, -1, 96, -1, -1, 86, 87, -1, 22, -1, 88, -1, 94, -1, 93, -1, 89, -1, 96, -1, 41, 98, 82, 98, 48, -1, -1, 90, 91, -1, 42, 92, 49, -1, 77, -1, 92, 82, 77, -1, 7, -1, 6, -1, 52, -1, 37, -1, 98, -1, 97, -1, 99, -1, 50, -1, 40, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint16 yyrline[] = { 0, 533, 533, 533, 562, 563, 567, 566, 570, 569, 577, 576, 582, 581, 588, 589, 592, 596, 600, 604, 605, 608, 614, 620, 626, 638, 649, 655, 662, 670, 671, 674, 680, 686, 693, 705, 713, 719, 725, 733, 734, 737, 743, 749, 755, 763, 764, 767, 768, 771, 777, 778, 781, 782, 785, 786, 787, 790, 791, 794, 795, 798, 799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 812, 813, 816, 817, 818, 819, 820, 821, 824, 825, 828, 831, 838, 839, 842, 843, 847, 850, 857, 858, 862, 863, 866, 867, 870, 873, 876, 879, 882, 887, 888, 892, 895, 903, 916, 917, 920, 923, 926, 929, 932, 937, 940 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "TOK_ALLOWED_TYPES", "TOK_ARRAY", "TOK_ARRAY_BOUNDS", "TOK_BOOL_NO", "TOK_BOOL_YES", "TOK_COMMA", "TOK_PORT_NAME", "TOK_PORT_TABLE", "TOK_CTYPE_D", "TOK_CTYPE_G", "TOK_CTYPE_GD", "TOK_CTYPE_H", "TOK_CTYPE_HD", "TOK_CTYPE_I", "TOK_CTYPE_ID", "TOK_CTYPE_V", "TOK_CTYPE_VD", "TOK_CTYPE_VNAM", "TOK_C_FUNCTION_NAME", "TOK_DASH", "TOK_DATA_TYPE", "TOK_DEFAULT_TYPE", "TOK_DEFAULT_VALUE", "TOK_DESCRIPTION", "TOK_DIRECTION", "TOK_DIR_IN", "TOK_DIR_INOUT", "TOK_DIR_OUT", "TOK_DTYPE_BOOLEAN", "TOK_DTYPE_COMPLEX", "TOK_DTYPE_INT", "TOK_DTYPE_POINTER", "TOK_DTYPE_REAL", "TOK_DTYPE_STRING", "TOK_IDENTIFIER", "TOK_STATIC_VAR_NAME", "TOK_STATIC_VAR_TABLE", "TOK_INT_LITERAL", "TOK_LANGLE", "TOK_LBRACKET", "TOK_LIMITS", "TOK_NAME_TABLE", "TOK_NULL_ALLOWED", "TOK_PARAMETER_NAME", "TOK_PARAMETER_TABLE", "TOK_RANGLE", "TOK_RBRACKET", "TOK_REAL_LITERAL", "TOK_SPICE_MODEL_NAME", "TOK_STRING_LITERAL", "$accept", "ifs_file", "$@1", "list_of_tables", "table", "$@2", "$@3", "$@4", "$@5", "name_table", "name_table_item", "port_table", "port_table_item", "parameter_table", "parameter_table_item", "static_var_table", "static_var_table_item", "list_of_ids", "list_of_array_bounds", "list_of_strings", "list_of_directions", "direction", "list_of_bool", "list_of_ctypes", "ctype", "list_of_dtypes", "dtype", "list_of_ranges", "int_range", "maybe_comma", "int_or_dash", "range", "number_or_dash", "list_of_values", "value_or_dash", "value", "complex", "list_of_ctype_lists", "delimited_ctype_list", "ctype_list", "bool", "string", "identifier", "number", "integer_value", "real", "integer", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287, 288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306, 307 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 53, 55, 54, 56, 56, 58, 57, 59, 57, 60, 57, 61, 57, 62, 62, 63, 63, 63, 64, 64, 65, 65, 65, 65, 65, 65, 65, 65, 66, 66, 67, 67, 67, 67, 67, 67, 67, 67, 68, 68, 69, 69, 69, 69, 70, 70, 71, 71, 71, 72, 72, 73, 73, 74, 74, 74, 75, 75, 76, 76, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 77, 78, 78, 79, 79, 79, 79, 79, 79, 80, 80, 81, 81, 82, 82, 83, 83, 84, 84, 85, 85, 86, 86, 87, 87, 88, 88, 88, 88, 89, 90, 90, 91, 92, 92, 93, 93, 94, 95, 96, 96, 97, 98, 99 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 0, 2, 1, 2, 0, 3, 0, 3, 0, 3, 0, 3, 0, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 2, 2, 2, 2, 2, 0, 2, 0, 2, 2, 0, 2, 0, 2, 1, 1, 1, 0, 2, 0, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 0, 2, 1, 5, 0, 1, 1, 1, 1, 5, 1, 1, 0, 2, 1, 1, 1, 1, 1, 1, 5, 0, 2, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 2, 0, 0, 1, 8, 12, 6, 10, 3, 4, 19, 39, 14, 29, 5, 9, 13, 7, 11, 101, 57, 47, 45, 59, 50, 52, 57, 20, 57, 72, 50, 45, 40, 0, 0, 0, 15, 57, 47, 72, 92, 50, 80, 57, 45, 30, 25, 26, 27, 21, 24, 22, 23, 28, 44, 43, 42, 41, 109, 16, 108, 18, 17, 36, 37, 33, 34, 32, 35, 38, 31, 0, 102, 107, 106, 58, 82, 0, 48, 49, 46, 70, 66, 67, 68, 69, 64, 65, 61, 62, 63, 60, 71, 51, 54, 56, 55, 53, 76, 77, 75, 79, 74, 78, 73, 94, 114, 0, 113, 93, 95, 98, 97, 96, 99, 111, 110, 112, 88, 0, 81, 104, 84, 86, 84, 87, 84, 90, 84, 91, 85, 103, 0, 0, 0, 0, 105, 0, 0, 0, 83, 100, 89 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int16 yydefgoto[] = { -1, 1, 2, 8, 9, 12, 10, 13, 11, 17, 36, 15, 27, 18, 45, 16, 32, 49, 48, 51, 52, 97, 47, 50, 91, 55, 104, 68, 78, 132, 124, 120, 128, 66, 109, 110, 111, 46, 72, 122, 75, 93, 80, 129, 115, 116, 117 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -101 static const yytype_int8 yypact[] = { -101, 10, 27, -101, -101, -101, -101, -101, 27, -101, -101, -101, -101, -101, -101, 9, 4, 26, 18, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -26, -32, -26, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 11, 19, -13, -26, 67, -32, 72, 19, 19, 57, -32, -26, -101, -101, -101, -101, -101, 19, -13, 57, -1, -32, 28, 19, -26, 67, -101, -101, -101, -101, -101, 33, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 7, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, 6, -101, -101, -4, -101, 59, -101, 59, -101, 59, -101, -101, -101, 67, 33, 7, 6, -101, 23, 20, 46, -101, -101, -101 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -101, -101, -101, -101, 89, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -101, -12, 65, 35, -101, -101, 32, -101, -70, 66, -101, -101, -101, -30, -27, -101, -28, -101, -101, -101, -101, -101, -101, -101, 42, -18, -33, 43, -74, -100, -101 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -1 static const yytype_uint8 yytable[] = { 59, 121, 62, 125, 130, 73, 74, 126, 28, 76, 3, 58, 19, 20, 21, 79, 61, 92, 22, 57, 60, 105, 37, 38, 58, 73, 74, 29, 127, 77, 30, 79, 70, 23, 138, 24, 25, 4, 92, 106, 107, 39, 31, 40, 41, 131, 106, 33, 113, 108, 118, 60, 34, 71, 26, 123, 108, 108, 53, 125, 54, 42, 136, 43, 44, 56, 5, 130, 141, 63, 119, 6, 140, 106, 7, 69, 67, 35, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 98, 99, 100, 101, 102, 103, 133, 142, 134, 14, 135, 92, 94, 95, 96, 64, 58, 65, 137, 139, 112, 114 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-101)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_uint8 yycheck[] = { 33, 71, 35, 77, 8, 6, 7, 107, 4, 22, 0, 37, 3, 4, 5, 48, 34, 50, 9, 31, 52, 22, 4, 5, 37, 6, 7, 23, 22, 42, 26, 64, 44, 24, 134, 26, 27, 10, 71, 40, 41, 23, 38, 25, 26, 49, 40, 21, 66, 50, 22, 52, 26, 42, 45, 22, 50, 50, 26, 133, 28, 43, 132, 45, 46, 30, 39, 8, 48, 37, 42, 44, 49, 40, 47, 43, 41, 51, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 31, 32, 33, 34, 35, 36, 124, 49, 126, 8, 128, 132, 28, 29, 30, 38, 37, 39, 133, 135, 66, 66 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 54, 55, 0, 10, 39, 44, 47, 56, 57, 59, 61, 58, 60, 57, 64, 68, 62, 66, 3, 4, 5, 9, 24, 26, 27, 45, 65, 4, 23, 26, 38, 69, 21, 26, 51, 63, 4, 5, 23, 25, 26, 43, 45, 46, 67, 90, 75, 71, 70, 76, 72, 73, 75, 75, 78, 72, 70, 37, 95, 52, 94, 95, 75, 71, 78, 86, 72, 80, 75, 70, 42, 91, 6, 7, 93, 22, 42, 81, 95, 95, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 77, 95, 94, 28, 29, 30, 74, 31, 32, 33, 34, 35, 36, 79, 22, 40, 41, 50, 87, 88, 89, 93, 94, 96, 97, 98, 99, 22, 42, 84, 77, 92, 22, 83, 97, 98, 22, 85, 96, 8, 49, 82, 82, 82, 82, 77, 83, 98, 85, 49, 48, 49 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { case 2: /* Line 1806 of yacc.c */ #line 533 "ifs_yacc.y" {TBL->num_conn = 0; TBL->num_param = 0; TBL->num_inst_var = 0; saw_function_name = FALSE; saw_model_name = FALSE; alloced_size [TBL_PORT] = DEFAULT_SIZE_CONN; alloced_size [TBL_PARAMETER] = DEFAULT_SIZE_PARAM; alloced_size [TBL_STATIC_VAR] = DEFAULT_SIZE_INST_VAR; TBL->conn = (Conn_Info_t*) calloc (DEFAULT_SIZE_CONN, sizeof (Conn_Info_t)); TBL->param = (Param_Info_t*) calloc (DEFAULT_SIZE_PARAM, sizeof (Param_Info_t)); TBL->inst_var = (Inst_Var_Info_t*) calloc (DEFAULT_SIZE_INST_VAR, sizeof (Inst_Var_Info_t)); if (! (TBL->conn && TBL->param && TBL->inst_var) ) { fatal ("Could not allocate enough memory"); } } break; case 6: /* Line 1806 of yacc.c */ #line 567 "ifs_yacc.y" {context.table = TBL_NAME;} break; case 8: /* Line 1806 of yacc.c */ #line 570 "ifs_yacc.y" {context.table = TBL_PORT; did_default_type = FALSE; did_allowed_types = FALSE; INIT (TBL->num_conn);} break; case 9: /* Line 1806 of yacc.c */ #line 575 "ifs_yacc.y" {TBL->num_conn = num_items;} break; case 10: /* Line 1806 of yacc.c */ #line 577 "ifs_yacc.y" {context.table = TBL_PARAMETER; INIT (TBL->num_param);} break; case 11: /* Line 1806 of yacc.c */ #line 580 "ifs_yacc.y" {TBL->num_param = num_items;} break; case 12: /* Line 1806 of yacc.c */ #line 582 "ifs_yacc.y" {context.table = TBL_STATIC_VAR; INIT (TBL->num_inst_var);} break; case 13: /* Line 1806 of yacc.c */ #line 585 "ifs_yacc.y" {TBL->num_inst_var = num_items;} break; case 16: /* Line 1806 of yacc.c */ #line 593 "ifs_yacc.y" {TBL->name.c_fcn_name =strdup (ifs_yytext); saw_function_name = TRUE; if (parser_just_names && saw_model_name) return 0;} break; case 17: /* Line 1806 of yacc.c */ #line 597 "ifs_yacc.y" {TBL->name.model_name = strdup (ifs_yytext); saw_model_name = TRUE; if (parser_just_names && saw_function_name) return 0;} break; case 18: /* Line 1806 of yacc.c */ #line 601 "ifs_yacc.y" {TBL->name.description = strdup (ifs_yytext);} break; case 21: /* Line 1806 of yacc.c */ #line 609 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->conn[i].name = ITEM_BUF(i).str; }} break; case 22: /* Line 1806 of yacc.c */ #line 615 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->conn[i].description = ITEM_BUF(i).str; }} break; case 23: /* Line 1806 of yacc.c */ #line 621 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->conn[i].direction = ITEM_BUF(i).dir; }} break; case 24: /* Line 1806 of yacc.c */ #line 627 "ifs_yacc.y" {int i; END; did_default_type = TRUE; FOR_ITEM (i) { TBL->conn[i].default_port_type = ITEM_BUF(i).ctype.kind; TBL->conn[i].default_type = ITEM_BUF(i).ctype.id; if (did_allowed_types) { check_default_type (TBL->conn[i]); } }} break; case 25: /* Line 1806 of yacc.c */ #line 639 "ifs_yacc.y" {int i; END; did_allowed_types = TRUE; FOR_ITEM (i) { assign_ctype_list (&TBL->conn[i], ITEM_BUF(i).ctype_list); if (did_default_type) { check_default_type (TBL->conn[i]); } }} break; case 26: /* Line 1806 of yacc.c */ #line 650 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->conn[i].is_array = ITEM_BUF(i).bool; }} break; case 27: /* Line 1806 of yacc.c */ #line 656 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { ASSIGN_BOUNDS (conn, i); assert (!TBL->conn[i].has_conn_ref); }} break; case 28: /* Line 1806 of yacc.c */ #line 663 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->conn[i].null_allowed = ITEM_BUF(i).bool; }} break; case 31: /* Line 1806 of yacc.c */ #line 675 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->param[i].name = ITEM_BUF(i).str; }} break; case 32: /* Line 1806 of yacc.c */ #line 681 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->param[i].description = ITEM_BUF(i).str; }} break; case 33: /* Line 1806 of yacc.c */ #line 687 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { check_dtype_not_pointer (ITEM_BUF(i).dtype); TBL->param[i].type = ITEM_BUF(i).dtype; }} break; case 34: /* Line 1806 of yacc.c */ #line 694 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->param[i].has_default = ITEM_BUF(i).value.has_value; if (TBL->param[i].has_default) { assign_value (TBL->param[i].type, &TBL->param[i].default_value, ITEM_BUF(i).value); } }} break; case 35: /* Line 1806 of yacc.c */ #line 706 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { assign_limits (TBL->param[i].type, &TBL->param[i], ITEM_BUF(i).range); }} break; case 36: /* Line 1806 of yacc.c */ #line 714 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->param[i].is_array = ITEM_BUF(i).bool; }} break; case 37: /* Line 1806 of yacc.c */ #line 720 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { ASSIGN_BOUNDS (param, i); }} break; case 38: /* Line 1806 of yacc.c */ #line 726 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->param[i].null_allowed = ITEM_BUF(i).bool; }} break; case 41: /* Line 1806 of yacc.c */ #line 738 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->inst_var[i].name = ITEM_BUF(i).str; }} break; case 42: /* Line 1806 of yacc.c */ #line 744 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->inst_var[i].description = ITEM_BUF(i).str; }} break; case 43: /* Line 1806 of yacc.c */ #line 750 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->inst_var[i].type = ITEM_BUF(i).dtype; }} break; case 44: /* Line 1806 of yacc.c */ #line 756 "ifs_yacc.y" {int i; END; FOR_ITEM (i) { TBL->inst_var[i].is_array = ITEM_BUF(i).bool; }} break; case 46: /* Line 1806 of yacc.c */ #line 764 "ifs_yacc.y" {ITEM; BUF.str = (yyvsp[(2) - (2)].str);} break; case 48: /* Line 1806 of yacc.c */ #line 769 "ifs_yacc.y" {ITEM; BUF.range = (yyvsp[(2) - (2)].range);} break; case 49: /* Line 1806 of yacc.c */ #line 772 "ifs_yacc.y" {ITEM; BUF.range.is_named = TRUE; BUF.range.u.name = (yyvsp[(2) - (2)].str);} break; case 51: /* Line 1806 of yacc.c */ #line 778 "ifs_yacc.y" {ITEM; BUF.str = (yyvsp[(2) - (2)].str);} break; case 53: /* Line 1806 of yacc.c */ #line 782 "ifs_yacc.y" {ITEM; BUF.dir = (yyvsp[(2) - (2)].dir);} break; case 54: /* Line 1806 of yacc.c */ #line 785 "ifs_yacc.y" {(yyval.dir) = IN;} break; case 55: /* Line 1806 of yacc.c */ #line 786 "ifs_yacc.y" {(yyval.dir) = OUT;} break; case 56: /* Line 1806 of yacc.c */ #line 787 "ifs_yacc.y" {(yyval.dir) = INOUT;} break; case 58: /* Line 1806 of yacc.c */ #line 791 "ifs_yacc.y" {ITEM; BUF.bool = (yyvsp[(2) - (2)].bool);} break; case 60: /* Line 1806 of yacc.c */ #line 795 "ifs_yacc.y" {ITEM; BUF.ctype = (yyvsp[(2) - (2)].ctype);} break; case 61: /* Line 1806 of yacc.c */ #line 798 "ifs_yacc.y" {(yyval.ctype).kind = VOLTAGE;} break; case 62: /* Line 1806 of yacc.c */ #line 799 "ifs_yacc.y" {(yyval.ctype).kind = DIFF_VOLTAGE;} break; case 63: /* Line 1806 of yacc.c */ #line 800 "ifs_yacc.y" {(yyval.ctype).kind = VSOURCE_CURRENT;} break; case 64: /* Line 1806 of yacc.c */ #line 801 "ifs_yacc.y" {(yyval.ctype).kind = CURRENT;} break; case 65: /* Line 1806 of yacc.c */ #line 802 "ifs_yacc.y" {(yyval.ctype).kind = DIFF_CURRENT;} break; case 66: /* Line 1806 of yacc.c */ #line 803 "ifs_yacc.y" {(yyval.ctype).kind = CONDUCTANCE;} break; case 67: /* Line 1806 of yacc.c */ #line 804 "ifs_yacc.y" {(yyval.ctype).kind = DIFF_CONDUCTANCE;} break; case 68: /* Line 1806 of yacc.c */ #line 805 "ifs_yacc.y" {(yyval.ctype).kind = RESISTANCE;} break; case 69: /* Line 1806 of yacc.c */ #line 806 "ifs_yacc.y" {(yyval.ctype).kind = DIFF_RESISTANCE;} break; case 70: /* Line 1806 of yacc.c */ #line 807 "ifs_yacc.y" {(yyval.ctype).kind = DIGITAL;} break; case 71: /* Line 1806 of yacc.c */ #line 808 "ifs_yacc.y" {(yyval.ctype).kind = USER_DEFINED; (yyval.ctype).id = (yyvsp[(1) - (1)].str);} break; case 73: /* Line 1806 of yacc.c */ #line 813 "ifs_yacc.y" {ITEM; BUF.dtype = (yyvsp[(2) - (2)].dtype);} break; case 74: /* Line 1806 of yacc.c */ #line 816 "ifs_yacc.y" {(yyval.dtype) = REAL;} break; case 75: /* Line 1806 of yacc.c */ #line 817 "ifs_yacc.y" {(yyval.dtype) = INTEGER;} break; case 76: /* Line 1806 of yacc.c */ #line 818 "ifs_yacc.y" {(yyval.dtype) = BOOLEAN;} break; case 77: /* Line 1806 of yacc.c */ #line 819 "ifs_yacc.y" {(yyval.dtype) = COMPLEX;} break; case 78: /* Line 1806 of yacc.c */ #line 820 "ifs_yacc.y" {(yyval.dtype) = STRING;} break; case 79: /* Line 1806 of yacc.c */ #line 821 "ifs_yacc.y" {(yyval.dtype) = POINTER;} break; case 81: /* Line 1806 of yacc.c */ #line 825 "ifs_yacc.y" {ITEM; BUF.range = (yyvsp[(2) - (2)].range);} break; case 82: /* Line 1806 of yacc.c */ #line 828 "ifs_yacc.y" {(yyval.range).is_named = FALSE; (yyval.range).u.bounds.lower.has_bound = FALSE; (yyval.range).u.bounds.upper.has_bound = FALSE;} break; case 83: /* Line 1806 of yacc.c */ #line 833 "ifs_yacc.y" {(yyval.range).is_named = FALSE; (yyval.range).u.bounds.lower = (yyvsp[(2) - (5)].bound); (yyval.range).u.bounds.upper = (yyvsp[(4) - (5)].bound);} break; case 86: /* Line 1806 of yacc.c */ #line 842 "ifs_yacc.y" {(yyval.bound).has_bound = FALSE;} break; case 87: /* Line 1806 of yacc.c */ #line 843 "ifs_yacc.y" {(yyval.bound).has_bound = TRUE; (yyval.bound).bound = (yyvsp[(1) - (1)].value);} break; case 88: /* Line 1806 of yacc.c */ #line 847 "ifs_yacc.y" {(yyval.range).is_named = FALSE; (yyval.range).u.bounds.lower.has_bound = FALSE; (yyval.range).u.bounds.upper.has_bound = FALSE;} break; case 89: /* Line 1806 of yacc.c */ #line 852 "ifs_yacc.y" {(yyval.range).is_named = FALSE; (yyval.range).u.bounds.lower = (yyvsp[(2) - (5)].bound); (yyval.range).u.bounds.upper = (yyvsp[(4) - (5)].bound);} break; case 90: /* Line 1806 of yacc.c */ #line 857 "ifs_yacc.y" {(yyval.bound).has_bound = FALSE;} break; case 91: /* Line 1806 of yacc.c */ #line 858 "ifs_yacc.y" {(yyval.bound).has_bound = TRUE; (yyval.bound).bound = (yyvsp[(1) - (1)].value);} break; case 93: /* Line 1806 of yacc.c */ #line 863 "ifs_yacc.y" {ITEM; BUF.value = (yyvsp[(2) - (2)].value);} break; case 94: /* Line 1806 of yacc.c */ #line 866 "ifs_yacc.y" {(yyval.value).has_value = FALSE;} break; case 96: /* Line 1806 of yacc.c */ #line 870 "ifs_yacc.y" {(yyval.value).has_value = TRUE; (yyval.value).kind = STRING; (yyval.value).u.svalue = (yyvsp[(1) - (1)].str);} break; case 97: /* Line 1806 of yacc.c */ #line 873 "ifs_yacc.y" {(yyval.value).has_value = TRUE; (yyval.value).kind = BOOLEAN; (yyval.value).u.bvalue = (yyvsp[(1) - (1)].bool);} break; case 98: /* Line 1806 of yacc.c */ #line 876 "ifs_yacc.y" {(yyval.value).has_value = TRUE; (yyval.value).kind = COMPLEX; (yyval.value).u.cvalue = (yyvsp[(1) - (1)].cval);} break; case 100: /* Line 1806 of yacc.c */ #line 883 "ifs_yacc.y" {(yyval.cval).real = (yyvsp[(2) - (5)].rval); (yyval.cval).imag = (yyvsp[(4) - (5)].rval);} break; case 102: /* Line 1806 of yacc.c */ #line 889 "ifs_yacc.y" {ITEM; BUF.ctype_list = (yyvsp[(2) - (2)].ctype_list);} break; case 103: /* Line 1806 of yacc.c */ #line 892 "ifs_yacc.y" {(yyval.ctype_list) = (yyvsp[(2) - (3)].ctype_list);} break; case 104: /* Line 1806 of yacc.c */ #line 896 "ifs_yacc.y" {(yyval.ctype_list) = (Ctype_List_t*)calloc (1, sizeof (Ctype_List_t)); if (!(yyval.ctype_list)) { fatal ("Error allocating memory"); } (yyval.ctype_list)->ctype = (yyvsp[(1) - (1)].ctype); (yyval.ctype_list)->next = (Ctype_List_t*)0;} break; case 105: /* Line 1806 of yacc.c */ #line 904 "ifs_yacc.y" {(yyval.ctype_list) = (Ctype_List_t*)calloc (1, sizeof (Ctype_List_t)); if (!(yyval.ctype_list)) { fatal ("Error allocating memory"); } (yyval.ctype_list)->ctype = (yyvsp[(3) - (3)].ctype); (yyval.ctype_list)->next = (yyvsp[(1) - (3)].ctype_list); /*$$->next = (Ctype_List_t*)0; assert ($1); $1->next = $$;*/} break; case 106: /* Line 1806 of yacc.c */ #line 916 "ifs_yacc.y" {(yyval.bool) = TRUE;} break; case 107: /* Line 1806 of yacc.c */ #line 917 "ifs_yacc.y" {(yyval.bool) = FALSE;} break; case 108: /* Line 1806 of yacc.c */ #line 920 "ifs_yacc.y" {(yyval.str) = strdup(ifs_yytext);} break; case 109: /* Line 1806 of yacc.c */ #line 923 "ifs_yacc.y" {(yyval.str) = strdup(ifs_yytext);} break; case 110: /* Line 1806 of yacc.c */ #line 926 "ifs_yacc.y" {(yyval.value).has_value = TRUE; (yyval.value).kind = REAL; (yyval.value).u.rvalue = (yyvsp[(1) - (1)].rval);} break; case 112: /* Line 1806 of yacc.c */ #line 932 "ifs_yacc.y" {(yyval.value).has_value = TRUE; (yyval.value).kind = INTEGER; (yyval.value).u.ivalue = (yyvsp[(1) - (1)].ival);} break; case 113: /* Line 1806 of yacc.c */ #line 937 "ifs_yacc.y" {(yyval.rval) = yydval;} break; case 114: /* Line 1806 of yacc.c */ #line 940 "ifs_yacc.y" {(yyval.ival) = yyival;} break; /* Line 1806 of yacc.c */ #line 2798 "ifs_yacc.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 943 "ifs_yacc.y" ngspice-26/src/xspice/cmpp/pp_lst.c0000644000265600020320000007657212264261473016740 0ustar andreasadmin/*============================================================================ FILE pp_lst.c MEMBER OF process cmpp Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions used in processing the files: modpath.lst udnpath.lst The files 'modpath.lst' and 'udnpath.lst' are read to get the pathnames to directories containing the models and node types desired in the simulator to be built. Files in each of these directories are then examined to get the names of functions and/or data structures that the simulator must know about. The names are then checked for uniqueness, and finally, a collection of files needed in the 'make' for the simulator are written. INTERFACES preprocess_lst_files() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "cmpp.h" #include #include #include /* void *malloc(unsigned size); void *realloc(void *ptr, unsigned size); */ /* *********************************************************************** */ /* * Information for processing the pathname files */ typedef struct { char *path_name; /* Pathname read from model path file */ char *spice_name; /* Name of model from ifspec.ifs */ char *cfunc_name; /* Name of C fcn from ifspec.ifs */ Boolean_t spice_unique; /* True if spice name unique */ Boolean_t cfunc_unique; /* True if C fcn name unique */ } Model_Info_t; typedef struct { char *path_name; /* Pathname read from udn path file */ char *node_name; /* Name of node type */ Boolean_t unique; /* True if node type name unique */ } Node_Info_t; /* *********************************************************************** */ static Status_t read_modpath(int *num_models, Model_Info_t **model_info); static Status_t read_udnpath(int *num_nodes, Node_Info_t **node_info); static Status_t read_model_names(int num_models, Model_Info_t *model_info); static Status_t read_node_names(int num_nodes, Node_Info_t *node_info); static Status_t check_uniqueness(int num_models, Model_Info_t *model_info, int num_nodes, Node_Info_t *node_info); static Status_t write_CMextrn(int num_models, Model_Info_t *model_info); static Status_t write_CMinfo(int num_models, Model_Info_t *model_info); static Status_t write_UDNextrn(int num_nodes, Node_Info_t *node_info); static Status_t write_UDNinfo(int num_nodes, Node_Info_t *node_info); static Status_t write_objects_inc(int num_models, Model_Info_t *model_info, int num_nodes, Node_Info_t *node_info); static Status_t read_udn_type_name(const char *path, char **node_name); /* *********************************************************************** */ /* preprocess_lst_files Function preprocess_lst_files is the top-level driver function for preprocessing a simulator model path list file (modpath.lst). This function calls read_ifs_file() requesting it to read and parse the Interface Specification file (ifspec.ifs) to extract the model name and associated C function name and place this information into an internal data structure. It then calls check_uniqueness() to verify that the model names and function names are unique with respect to each other and to the models and functions internal to SPICE 3C1. Following this check, it calls write_CMextrn(), write_CMinfo(), and write_make_include() to write out the C include files CMextrn.h and CMinfo.h required by SPICE function SPIinit.c to define the models known to the simulator, and to write out a make include file used by the make utility to locate the object modules necessary to link the models into the simulator. */ void preprocess_lst_files(void) { Status_t status; /* Return status */ Model_Info_t *model_info; /* Info about each model */ Node_Info_t *node_info; /* Info about each user-defined node type */ int num_models; /* The number of models */ int num_nodes; /* The number of user-defined nodes */ /* Get list of models from model pathname file */ status = read_modpath(&num_models, &model_info); if(status != OK) { exit(1); } /* Get list of node types from udn pathname file */ status = read_udnpath(&num_nodes, &node_info); if(status != OK) { exit(1); } /* Get the spice and C function names from the ifspec.ifs files */ status = read_model_names(num_models, model_info); if(status != OK) { exit(1); } /* Get the user-defined node type names */ status = read_node_names(num_nodes, node_info); if(status != OK) { exit(1); } /* Check to be sure the names are unique */ status = check_uniqueness(num_models, model_info, num_nodes, node_info); if(status != OK) { exit(1); } /* Write out the CMextrn.h file used to compile SPIinit.c */ status = write_CMextrn(num_models, model_info); if(status != OK) { exit(1); } /* Write out the CMinfo.h file used to compile SPIinit.c */ status = write_CMinfo(num_models, model_info); if(status != OK) { exit(1); } /* Write out the UDNextrn.h file used to compile SPIinit.c */ status = write_UDNextrn(num_nodes, node_info); if(status != OK) { exit(1); } /* Write out the UDNinfo.h file used to compile SPIinit.c */ status = write_UDNinfo(num_nodes, node_info); if(status != OK) { exit(1); } /* Write the make_include file used to link the models and */ /* user-defined node functions with the simulator */ status = write_objects_inc(num_models, model_info, num_nodes, node_info); if(status != OK) { exit(1); } } /* *********************************************************************** */ /* read_modpath This function opens the modpath.lst file, reads the pathnames from the file, and puts them into an internal data structure for future processing. */ static Status_t read_modpath( int *num_models, /* Number of model pathnames found */ Model_Info_t **model_info /* Info about each model */ ) { FILE *fp; /* Model pathname file pointer */ char path[MAX_PATH_LEN+2]; /* space to read pathnames into */ Model_Info_t *model = NULL; /* temporary pointer to model info */ int n; int i; int j; int len; int line_num; const char *filename = MODPATH_FILENAME; /* Initialize number of models to zero in case of error */ *num_models = 0; /* Open the model pathname file */ fp = fopen_cmpp(&filename, "r"); if(fp == NULL) { print_error("ERROR - File not found: %s", filename); return(ERROR); } /* Read the pathnames from the file, one line at a time until EOF */ n = 0; line_num = 0; while( fgets(path, sizeof(path), fp) ) { line_num++; len = (int) strlen(path); /* If line was too long for buffer, exit with error */ if(len > MAX_PATH_LEN) { print_error("ERROR - Line %d of %s exceeds %d characters", line_num, filename, MAX_PATH_LEN); return(ERROR); } /* Strip white space including newline */ for(i = 0, j = 0; i < len; ) { if(isspace(path[i])) { i++; } else { path[j] = path[i]; i++; j++; } } path[j] = '\0'; len = j; /* Strip trailing '/' if any */ if(path[len - 1] == '/') path[--len] = '\0'; /* If blank line, continue */ if(len == 0) continue; /* Make sure pathname is short enough to add a filename at the end */ if(len > (MAX_PATH_LEN - (MAX_FN_LEN + 1)) ) { print_error("ERROR - Pathname on line %d of %s exceeds %d characters", line_num, filename, (MAX_PATH_LEN - (MAX_FN_LEN + 1))); return(ERROR); } /* Allocate and initialize a new model info structure */ if(n == 0) model = (Model_Info_t *) malloc(sizeof(Model_Info_t)); else model = (Model_Info_t *) realloc(model, (size_t) (n + 1) * sizeof(Model_Info_t)); model[n].path_name = NULL; model[n].spice_name = NULL; model[n].cfunc_name = NULL; model[n].spice_unique = TRUE; model[n].cfunc_unique = TRUE; /* Put pathname into info structure */ model[n].path_name = (char *) malloc((size_t) (len+1)); strcpy(model[n].path_name, path); /* Increment count of paths read */ n++; } /* Close model pathname file and return data read */ fclose(fp); *num_models = n; *model_info = model; return(OK); } /* *********************************************************************** */ /* read_udnpath This function opens the udnpath.lst file, reads the pathnames from the file, and puts them into an internal data structure for future processing. */ static Status_t read_udnpath( int *num_nodes, /* Number of node pathnames found */ Node_Info_t **node_info /* Info about each node */ ) { FILE *fp; /* Udn pathname file pointer */ char path[MAX_PATH_LEN+2]; /* space to read pathnames into */ Node_Info_t *node = NULL; /* temporary pointer to node info */ int n; int i; int j; int len; int line_num; const char *filename = UDNPATH_FILENAME; /* Initialize number of nodes to zero in case of error */ *num_nodes = 0; /* Open the node pathname file */ fp = fopen_cmpp(&filename, "r"); /* For backward compatibility, return with WARNING only if file not found */ if(fp == NULL) { print_error("WARNING - File not found: %s", filename); return(OK); } /* Read the pathnames from the file, one line at a time until EOF */ n = 0; line_num = 0; while( fgets(path, sizeof(path), fp) ) { line_num++; len = (int) strlen(path); /* If line was too long for buffer, exit with error */ if(len > MAX_PATH_LEN) { print_error("ERROR - Line %d of %s exceeds %d characters", line_num, filename, MAX_PATH_LEN); return(ERROR); } /* Strip white space including newline */ for(i = 0, j = 0; i < len; ) { if(isspace(path[i])) { i++; } else { path[j] = path[i]; i++; j++; } } path[j] = '\0'; len = j; /* Strip trailing '/' if any */ if(path[len - 1] == '/') path[--len] = '\0'; /* If blank line, continue */ if(len == 0) continue; /* Make sure pathname is short enough to add a filename at the end */ if(len > (MAX_PATH_LEN - (MAX_FN_LEN + 1)) ) { print_error("ERROR - Pathname on line %d of %s exceeds %d characters", line_num, filename, (MAX_PATH_LEN - (MAX_FN_LEN + 1))); return(ERROR); } /* Allocate and initialize a new node info structure */ if(n == 0) node = (Node_Info_t *) malloc(sizeof(Node_Info_t)); else node = (Node_Info_t *) realloc(node, (size_t) (n + 1) * sizeof(Node_Info_t)); node[n].path_name = NULL; node[n].node_name = NULL; node[n].unique = TRUE; /* Put pathname into info structure */ node[n].path_name = (char *) malloc((size_t) (len+1)); strcpy(node[n].path_name, path); /* Increment count of paths read */ n++; } /* Close node pathname file and return data read */ fclose(fp); *num_nodes = n; *node_info = node; return(OK); } /* *********************************************************************** */ /* read_model_names This function opens each of the models and gets the names of the model and the C function into the internal model information structure. */ static Status_t read_model_names( int num_models, /* Number of model pathnames */ Model_Info_t *model_info /* Info about each model */ ) { Boolean_t all_found; /* True if all ifspec files read */ int i; /* A temporary counter */ char path[MAX_PATH_LEN+1]; /* full pathname to ifspec file */ Status_t status; /* Return status */ Ifs_Table_t ifs_table; /* Repository for info read from ifspec file */ /* For each model found in model pathname file, read the interface */ /* spec file to get the SPICE and C function names into model_info */ for(i = 0, all_found = TRUE; i < num_models; i++) { /* Form the full pathname to the interface spec file */ strcpy(path, model_info[i].path_name); strcat(path, "/"); strcat(path, IFSPEC_FILENAME); /* Read the SPICE and C function names from the interface spec file */ status = read_ifs_file(path, GET_IFS_NAME, &ifs_table); /* Transfer the names into the model_info structure */ if(status == OK) { model_info[i].spice_name = ifs_table.name.model_name; model_info[i].cfunc_name = ifs_table.name.c_fcn_name; } else { all_found = FALSE; print_error("ERROR - Problems reading %s in directory %s", IFSPEC_FILENAME, model_info[i].path_name); } } if(all_found) return(OK); else return(ERROR); } /* *********************************************************************** */ /* read_node_names This function opens each of the user-defined node definition files and gets the names of the node into the internal information structure. */ static Status_t read_node_names( int num_nodes, /* Number of node pathnames */ Node_Info_t *node_info /* Info about each node */ ) { Boolean_t all_found; /* True if all files read OK */ int i; /* A temporary counter */ char path[MAX_PATH_LEN+1]; /* full pathname to file */ Status_t status; /* Return status */ char *node_name; /* Name of node type read from file */ /* For each node found in node pathname file, read the udnfunc.c */ /* file to get the node type names into node_info */ for(i = 0, all_found = TRUE; i < num_nodes; i++) { /* Form the full pathname to the interface spec file */ strcpy(path, node_info[i].path_name); strcat(path, "/"); strcat(path, UDNFUNC_FILENAME); /* Read the udn node type name from the file */ status = read_udn_type_name(path, &node_name); /* Transfer the names into the node_info structure */ if(status == OK) { node_info[i].node_name = node_name; } else { all_found = FALSE; print_error("ERROR - Problems reading %s in directory %s", UDNFUNC_FILENAME, node_info[i].path_name); } } if(all_found) return(OK); else return(ERROR); } /* *********************************************************************** */ /* check_uniqueness Function check_uniqueness determines if model names and function names are unique with respect to each other and to the models and functions internal to SPICE 3C1. */ static Status_t check_uniqueness( int num_models, /* Number of model pathnames */ Model_Info_t *model_info, /* Info about each model */ int num_nodes, /* Number of node type pathnames */ Node_Info_t *node_info /* Info about each node type */ ) { int i; /* A temporary counter */ int j; /* A temporary counter */ Boolean_t all_unique; /* true if names are unique */ /* Define a list of model names used internally by XSPICE */ /* These names (except 'poly') are defined in src/sim/INP/INPdomodel.c and */ /* are case insensitive */ static char *SPICEmodel[] = { "npn", "pnp", "d", "njf", "pjf", "nmf", "pmf", "urc", "nmos", "pmos", "r", "c", "sw", "csw", "poly" }; static int numSPICEmodels = sizeof(SPICEmodel) / sizeof(char *); /* Define a list of node type names used internally by the simulator */ /* These names are defined in src/sim/include/MIFtypes.h and are case */ /* insensitive */ static char *UDNidentifier[] = { "v", "vd", "i", "id", "vnam", "g", "gd", "h", "hd", "d" }; static int numUDNidentifiers = sizeof(UDNidentifier) / sizeof(char *); /* First, normalize case of all model and node names to lower since */ /* SPICE is case insensitive in parsing decks */ for(i = 0; i < num_models; i++) str_to_lower(model_info[i].spice_name); for(i = 0; i < num_nodes; i++) str_to_lower(node_info[i].node_name); /* Then, loop through all model names and report errors if same as SPICE */ /* model name or same as another model name in list */ for(i = 0, all_unique = TRUE; i < num_models; i++) { /* First check against list of SPICE internal names */ for(j = 0; j < numSPICEmodels; j++) { if(strcmp(model_info[i].spice_name, SPICEmodel[j]) == 0) { all_unique = FALSE; print_error("ERROR - Model name '%s' is same as internal SPICE model name\n", model_info[i].spice_name); } } /* Skip if already seen once */ if(model_info[i].spice_unique == FALSE) continue; /* Then check against other names in list */ for(j = 0; j < num_models; j++) { /* Skip checking against itself */ if(i == j) continue; /* Compare the names */ if(strcmp(model_info[i].spice_name, model_info[j].spice_name) == 0) { all_unique = FALSE; model_info[i].spice_unique = FALSE; model_info[j].spice_unique = FALSE; print_error("ERROR - Model name '%s' in directory: %s", model_info[i].spice_name, model_info[i].path_name); print_error(" is same as"); print_error(" model name '%s' in directory: %s\n", model_info[j].spice_name, model_info[j].path_name); } } } /* Loop through all C function names and report errors if duplicates found */ for(i = 0; i < num_models; i++) { /* Skip if already seen once */ if(model_info[i].cfunc_unique == FALSE) continue; /* Check against other names in list only, not against SPICE identifiers */ /* Let linker catch collisions with SPICE identifiers for now */ for(j = 0; j < num_models; j++) { /* Skip checking against itself */ if(i == j) continue; /* Compare the names */ if(strcmp(model_info[i].cfunc_name, model_info[j].cfunc_name) == 0) { all_unique = FALSE; model_info[i].cfunc_unique = FALSE; model_info[j].cfunc_unique = FALSE; print_error("ERROR - C function name '%s' in directory: %s", model_info[i].cfunc_name, model_info[i].path_name); print_error(" is same as"); print_error(" C function name '%s' in directory: %s\n", model_info[j].cfunc_name, model_info[j].path_name); } } } /* Loop through all node type names and report errors if same as internal */ /* name or same as another name in list */ for(i = 0; i < num_nodes; i++) { /* First check against list of internal names */ for(j = 0; j < numUDNidentifiers; j++) { if(strcmp(node_info[i].node_name, UDNidentifier[j]) == 0) { all_unique = FALSE; print_error("ERROR - Node type '%s' is same as internal node type\n", node_info[i].node_name); } } /* Skip if already seen once */ if(node_info[i].unique == FALSE) continue; /* Then check against other names in list */ for(j = 0; j < num_nodes; j++) { /* Skip checking against itself */ if(i == j) continue; /* Compare the names */ if(strcmp(node_info[i].node_name, node_info[j].node_name) == 0) { all_unique = FALSE; node_info[i].unique = FALSE; node_info[j].unique = FALSE; print_error("ERROR - Node type '%s' in directory: %s", node_info[i].node_name, node_info[i].path_name); print_error(" is same as"); print_error(" node type '%s' in directory: %s\n", node_info[j].node_name, node_info[j].path_name); } } } /* Return error status */ if(all_unique) return(OK); else return(ERROR); } /* *********************************************************************** */ /* write_CMextrn Function write_CMextrn writes the CMextrn.h file used in compiling SPIinit.c immediately prior to linking the simulator and code models. This SPICE source file uses the structures mentioned in the include file to define the models known to the simulator. */ static Status_t write_CMextrn( int num_models, /* Number of model pathnames */ Model_Info_t *model_info /* Info about each model */ ) { int i; /* A temporary counter */ FILE *fp; /* File pointer for writing CMextrn.h */ const char *filename = "cmextrn.h"; /* Open the file to be written */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Problems opening %s for write", filename); return(ERROR); } /* Write out the data */ for(i = 0; i < num_models; i++) { fprintf(fp, "extern SPICEdev %s_info;\n", model_info[i].cfunc_name); } /* Close the file and return */ fclose(fp); return(OK); } /* *********************************************************************** */ /* write_CMinfo Function write_CMinfo writes the CMinfo.h file used in compiling SPIinit.c immediately prior to linking the simulator and code models. This SPICE source file uses the structures mentioned in the include file to define the models known to the simulator. */ static Status_t write_CMinfo( int num_models, /* Number of model pathnames */ Model_Info_t *model_info /* Info about each model */ ) { int i; /* A temporary counter */ FILE *fp; /* File pointer for writing CMinfo.h */ const char *filename = "cminfo.h"; /* Open the file to be written */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Problems opening %s for write", filename); return(ERROR); } /* Write out the data */ for(i = 0; i < num_models; i++) { fprintf(fp, "&%s_info,\n", model_info[i].cfunc_name); } /* Close the file and return */ fclose(fp); return(OK); } /* *********************************************************************** */ /* write_UDNextrn Function write_UDNextrn writes the UDNextrn.h file used in compiling SPIinit.c immediately prior to linking the simulator and user-defined nodes. This SPICE source file uses the structures mentioned in the include file to define the node types known to the simulator. */ static Status_t write_UDNextrn( int num_nodes, /* Number of node pathnames */ Node_Info_t *node_info /* Info about each node */ ) { int i; /* A temporary counter */ FILE *fp; /* File pointer for writing UDNextrn.h */ const char *filename = "udnextrn.h"; /* Open the file to be written */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Problems opening %s for write", filename); return(ERROR); } /* Write out the data */ for(i = 0; i < num_nodes; i++) { fprintf(fp, "extern Evt_Udn_Info_t udn_%s_info;\n", node_info[i].node_name); } /* Close the file and return */ fclose(fp); return(OK); } /* *********************************************************************** */ /* write_UDNinfo Function write_UDNinfo writes the UDNinfo.h file used in compiling SPIinit.c immediately prior to linking the simulator and user-defined nodes. This SPICE source file uses the structures mentioned in the include file to define the node types known to the simulator. */ static Status_t write_UDNinfo( int num_nodes, /* Number of node pathnames */ Node_Info_t *node_info /* Info about each node */ ) { int i; /* A temporary counter */ FILE *fp; /* File pointer for writing UDNinfo.h */ const char *filename = "udninfo.h"; /* Open the file to be written */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Problems opening %s for write", filename); return(ERROR); } /* Write out the data */ for(i = 0; i < num_nodes; i++) { fprintf(fp, "&udn_%s_info,\n", node_info[i].node_name); } /* Close the file and return */ fclose(fp); return(OK); } /* *********************************************************************** */ /* write_objects_inc Function write_objects_inc writes a make include file used by the make utility to locate the object modules needed to link the simulator with the code models and user-defined node types. */ static Status_t write_objects_inc( int num_models, /* Number of model pathnames */ Model_Info_t *model_info, /* Info about each model */ int num_nodes, /* Number of udn pathnames */ Node_Info_t *node_info /* Info about each node type */ ) { int i; /* A temporary counter */ FILE *fp; /* File pointer for writing make_include */ const char *filename = "objects.inc"; /* Open the file to be written */ fp = fopen_cmpp(&filename, "w"); if(fp == NULL) { print_error("ERROR - Problems opening %s for write", filename); return(ERROR); } /* Write out the data */ for(i = 0; i < num_models; i++) { fprintf(fp, "%s/*.o", model_info[i].path_name); if((i < (num_models - 1)) || (num_nodes > 0)) fprintf(fp, " \\\n"); else fprintf(fp, "\n"); } for(i = 0; i < num_nodes; i++) { fprintf(fp, "%s/*.o", node_info[i].path_name); if(i < (num_nodes - 1)) fprintf(fp, " \\\n"); else fprintf(fp, "\n"); } /* Close the file and return */ fclose(fp); return(OK); } /* read_udn_type_name This function reads a User-Defined Node Definition File until the definition of the Evt_Udn_Info_t struct is found, and then gets the name of the node type from the first member of the structure. */ static Status_t read_udn_type_name( const char *path, /* the path to the node definition file */ char **node_name /* the node type name found in the file */ ) { FILE *fp; /* file pointer for opened file */ Boolean_t found; /* true if name found successfully */ Boolean_t in_struct; /* true if found struct with name */ char name[MAX_NAME_LEN + 1]; /* temporary storage for name read */ int c; /* a character read from the file */ int i; /* a counter */ static char *struct_type = "Evt_Udn_Info_t"; /* Open the file from which the node type name will be read */ fp = fopen_cmpp(&path, "r"); if(fp == NULL) return(ERROR); /* Read the file until the definition of the Evt_Udn_Info_t struct */ /* is found, then get the name of the node type from the first */ /* member of the structure */ found = FALSE; do { /* read the next character */ c = fgetc(fp); /* check for and gobble up comments */ if(c == '/') { c = fgetc(fp); if(c == '*') { do { c = fgetc(fp); if(c == '*') { c = fgetc(fp); if((c == '/') || (c == EOF)) break; else ungetc(c, fp); } } while(c != EOF); } } if(c == EOF) break; /* read until "Evt_Udn_Info_t" is encountered */ for(i = 0, in_struct = FALSE; ; i++) { if(c != struct_type[i]) break; else if(i == (sizeof(struct_type) - 2)) { in_struct = TRUE; break; } else c = fgetc(fp); } /* if found it, read until open quote found */ /* and then read the name until the closing quote is found */ if(in_struct) { do { c = fgetc(fp); if(c == '"') { i = 0; do { c = fgetc(fp); if(c == '"') { found = TRUE; name[i] = '\0'; } else if(c != EOF) name[i++] = (char) c; } while((c != EOF) && (! found)); } } while((c != EOF) && (! found)); } } while((c != EOF) && (! found)); /* Close the file and return */ fclose(fp); if(found) { *node_name = (char *) malloc(strlen(name) + 1); strcpy(*node_name, name); return(OK); } else { *node_name = NULL; return(ERROR); } } ngspice-26/src/xspice/README0000644000265600020320000000501512264261473015174 0ustar andreasadminngspice Xspice code model support. 2012 05 06 -------------------------------------- Use configure the flag --enable-xspice to compile xspice support in, when you run the ./configure script. This creates a new command, "codemodel", which you can use to load a codemodel. The command codemodel attempts to load all the codemodels specified in the arguments, eg "ngspice 1 ->codemodel /usr/lib/ngspice/analog.cm /usr/lib/ngspice/spice2poly.cm" ( note: the codemodel path must begin with ./ or / to work ) The codemodels are automatically compiled and then installed in ${prefix}/lib/ngspice/ when ngspice is installed. To create your own codemodels: * Unpack the ngspice source and compile as normal. * cd src/xspice/icm * make the directory structure for the new library: Create the nested library_name and module_name directories and copy the source code to the module_name directories src/xspice/icm/ / modpath.lst udnpath.lst / files: cfunc.mod ifspec.ifs ( for a device ) or udnfunc.c ( or a user defined node ) * For each library create the files modpath.lst and udnpath.lst, which contain a list of the user devices and nodes respectivily, in the location shown above. * Edit src/xspice/icm/makedefs.in and alter the CMDIRS line to include your library directory. * Run make in the src/xspice/icm directory. ( the makefile does the rest ) The codemodel can be then found in src/xspice/icm//.cm ----------------------------------------- SPICE2 POLY codemodel support. SPICE2 POLY attributes are now available for controlled sources. To use POLY attributes, configure and install ( make install ) ngspice with the --enable-xspice flag set as described above. After compilation of ngspice edit ${prefix}/share/tclspice/scripts/spinit or ${prefix}/share/ngspice/scripts/spinit ( depending if you included tcl support or not ) and uncomment the "* codemodel /usr/lib/spice/spice2poly.cm" line and edit as required. ( the path to spice2poly.cm may be wrong ) ( alternativily create a ~/.spiceinit file with the above codemodel line ) Then read in your SPICE netlist. SPICE 2 POLY attributes in controlled sources will be translated into .models invoking the spice2poly codemodel. You should be able to run ngspice and simulate in the usual way! Please direct questions/comments/complaints to the ngspice user's list or forum. ngspice-26/src/xspice/mif/0000755000265600020320000000000012264261712015062 5ustar andreasadminngspice-26/src/xspice/mif/mifdelete.c0000644000265600020320000001432612264261473017176 0ustar andreasadmin/*============================================================================ FILE MIFdelete.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function used by SPICE to delete an instance and its allocated data structures from the internal circuit description data structures. INTERFACES MIFdelete() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/mifproto.h" #include "ngspice/mifdefs.h" #include "ngspice/suffix.h" #include "ngspice/devdefs.h" /* MIFdelete This function deletes a particular instance from the linked list of instance structures, freeing all dynamically allocated memory used by the instance structure. */ int MIFdelete( GENmodel *inModel, /* The head of the model list */ IFuid name, /* The name of the instance to delete */ GENinstance **inst /* The instance structure to delete */ ) { MIFmodel *model; MIFinstance **fast; MIFinstance **prev; MIFinstance *here=NULL; Mif_Boolean_t found; int i; int j; int k; int num_conn; int num_port; int num_inst_var; /* Convert generic pointers in arg list to MIF specific pointers */ model = (MIFmodel *) inModel; fast = (MIFinstance **) inst; /*******************************************/ /* Cut the instance out of the linked list */ /*******************************************/ /* Loop through all models */ for(found = MIF_FALSE; model; model = model->MIFnextModel) { prev = &(model->MIFinstances); /* Loop through all instances of this model */ for(here = *prev; here; here = here->MIFnextInstance) { /* If name or pointer matches, cut it out and mark that its found */ if(here->MIFname == name || (fast && here == *fast) ) { *prev= here->MIFnextInstance; found = MIF_TRUE; break; } prev = &(here->MIFnextInstance); } if(found) break; } /* Return error if not found */ if(!found) return(E_NODEV); /*******************************/ /* Free the instance structure */ /*******************************/ /* Loop through all connections on the instance */ /* and dismantle the stuff allocated during readin/setup */ /* in MIFinit_inst, MIFget_port, and MIFsetup */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* If connection never used, skip it */ if(here->conn[i]->is_null) continue; /* If analog output, lots to free... */ if(here->conn[i]->is_output && here->analog) { num_port = here->conn[i]->size; /* For each port on the connector */ for(j = 0; j < num_port; j++) { /* Free the partial/ac_gain/smp stuff allocated in MIFsetup */ for(k = 0; k < num_conn; k++) { if((here->conn[k]->is_null) || (! here->conn[k]->is_input) ) continue; if(here->conn[i]->port[j]->partial) FREE(here->conn[i]->port[j]->partial[k].port); if(here->conn[i]->port[j]->ac_gain) FREE(here->conn[i]->port[j]->ac_gain[k].port); if(here->conn[i]->port[j]->smp_data.input) FREE(here->conn[i]->port[j]->smp_data.input[k].port); } FREE(here->conn[i]->port[j]->partial); FREE(here->conn[i]->port[j]->ac_gain); FREE(here->conn[i]->port[j]->smp_data.input); /* but don't free strings. They are either not owned */ /* by the inst or are part of tokens. SPICE3C1 never */ /* frees tokens, so we don't either... */ } } /* Free the basic port structure allocated in MIFget_port */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) FREE(here->conn[i]->port[j]); FREE(here->conn[i]->port); } /* Free the connector stuff allocated in MIFinit_inst */ /* Don't free name/description! They are not owned */ /* by the instance */ for(i = 0; i < num_conn; i++) { FREE(here->conn[i]); } FREE(here->conn); /* Loop through all instance variables on the instance */ /* and free stuff */ num_inst_var = here->num_inst_var; for(i = 0; i < num_inst_var; i++) { if(here->inst_var[i]->element != NULL) { /* Do not delete inst_var[i]->element if MS Windows and is_array==1. Memory is then allocated in the code model dll, and it cannot be guaranteed that it can be freed safely here! A small memory leak is created. FIXME Finally one has to free the memory in the same module where allocated. */ #if defined(_MSC_VER) || defined(__MINGW32__) if(!DEVices[here->MIFmodPtr->MIFmodType]->DEVpublic.inst_var[i].is_array) #endif FREE(here->inst_var[i]->element); } FREE(here->inst_var[i]); } FREE(here->inst_var); /* ************************************************************* */ /* Dont free params here. They are not currently implemented on */ /* a per-instance basis, so their allocated space is owned by */ /* the parent model, not the instance. Param stuff will be freed */ /* by MIFmDelete */ /* ************************************************************* */ /* Free the stuff used by the cm_... functions */ if(here->num_state && here->state) FREE(here->state); if(here->num_intgr && here->intgr) FREE(here->intgr); if(here->num_conv && here->conv) FREE(here->conv); /* Finally, free the instance struct itself */ FREE(here); return(OK); } ngspice-26/src/xspice/mif/mifsetup.c0000644000265600020320000004675712264261473017111 0ustar andreasadmin/*============================================================================ FILE MIFsetup.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function called by SPICE to setup data structures of a code model after parsing, but prior to beginning a simulation. The major responsibilities of this function are to default values for model parameters not given on the .model card, create equations in the matrix for any voltage sources, and setup the matrix pointers used during simulation to load the matrix. INTERFACES MIFsetup() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/smpdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" /* define macro for easy creation of matrix entries/pointers for outputs */ #define TSTALLOC(ptr,first,second) \ do { if((smp_data_out->ptr = \ SMPmakeElt(matrix, smp_data_out->first, smp_data_out->second)) == NULL) { \ return(E_NOMEM); \ } } while(0) /* define macro for easy creation of matrix entries/pointers for inputs */ #define CTSTALLOC(ptr,first,second) \ do { if((smp_data_out->input[k].port[l].ptr = \ SMPmakeElt(matrix, smp_data_out->first, smp_data_cntl->second)) == NULL) { \ return(E_NOMEM); \ } } while(0) /* MIFsetup This function is called by the CKTsetup() driver function to prepare all code model structures and all code model instance structures for simulation. It loops through all models of a particular code model type and provides defaults for any parameters not specified on a .model card. It loops through all instances of the model and prepares the instance structures for simulation. The most important setup task is the creation of entries in the SPICE matrix and the storage of pointers to locations of the matrix used by MIFload during a simulation. */ int MIFsetup( SMPmatrix *matrix, /* The analog simulation matrix structure */ GENmodel *inModel, /* The head of the model list */ CKTcircuit *ckt, /* The circuit structure */ int *states) /* The states vector */ { MIFmodel *model; MIFinstance *here; int mod_type; int max_size; int size; int error; int num_conn; int num_port; int num_port_k; int i; int j; int k; int l; Mif_Port_Type_t type; Mif_Port_Type_t in_type; Mif_Port_Type_t out_type; Mif_Cntl_Src_Type_t cntl_src_type; Mif_Smp_Ptr_t *smp_data_out; Mif_Smp_Ptr_t *smp_data_cntl; Mif_Param_Info_t *param_info; /* Mif_Conn_Info_t *conn_info;*/ Mif_Boolean_t is_input; Mif_Boolean_t is_output; char *suffix; CKTnode *tmp; /* Setup for access into MIF specific model data */ model = (MIFmodel *) inModel; mod_type = model->MIFmodType; /* loop through all models of this type */ for( ; model != NULL; model = model->MIFnextModel) { /* For each parameter not given explicitly on the .model */ /* card, default it */ for(i = 0; i < model->num_param; i++) { if(model->param[i]->is_null) { /* setup a pointer for quick access */ param_info = &(DEVices[mod_type]->DEVpublic.param[i]); /* determine the size and allocate the parameter element(s) */ if(! param_info->is_array) { model->param[i]->size = 1; model->param[i]->element = TMALLOC(Mif_Value_t, 1); } else { /* parameter is an array */ /* MIF_INP2A() parser assures that there is an associated array connection */ /* Since several instances may share this model, we have to create an array */ /* big enough for the instance with the biggest connection array */ max_size = 0; for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { size = here->conn[param_info->conn_ref]->size; if(size > max_size) max_size = size; } model->param[i]->size = max_size; model->param[i]->element = TMALLOC(Mif_Value_t, max_size); } /* end if parameter is an array */ /* set the parameter element(s) to default value */ for(j = 0; j < model->param[i]->size; j++) { switch(param_info->type) { case MIF_BOOLEAN: model->param[i]->element[j].bvalue = param_info->default_value.bvalue; break; case MIF_INTEGER: model->param[i]->element[j].ivalue = param_info->default_value.ivalue; break; case MIF_REAL: model->param[i]->element[j].rvalue = param_info->default_value.rvalue; break; case MIF_COMPLEX: model->param[i]->element[j].cvalue = param_info->default_value.cvalue; break; case MIF_STRING: model->param[i]->element[j].svalue = param_info->default_value.svalue; break; default: return(E_BADPARM); } } /* end for number of elements in param array */ } /* end if null */ } /* end for number of parameters */ /* For each instance, initialize stuff used by cm_... functions */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { here->num_state = 0; here->state = NULL; here->num_intgr = 0; here->intgr = NULL; here->num_conv = 0; here->conv = NULL; } /* For each instance, allocate runtime structs for output connections/ports */ /* and grab a place in the state vector for all input connections/ports */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { /* Skip these expensive allocations if the instance is not analog */ if(! here->analog) continue; num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { if((here->conn[i]->is_null) || (! here->conn[i]->is_output) ) continue; num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { here->conn[i]->port[j]->partial = TMALLOC(Mif_Partial_t, num_conn); here->conn[i]->port[j]->ac_gain = TMALLOC(Mif_AC_Gain_t, num_conn); here->conn[i]->port[j]->smp_data.input = TMALLOC(Mif_Conn_Ptr_t, num_conn); for(k = 0; k < num_conn; k++) { if((here->conn[k]->is_null) || (! here->conn[k]->is_input) ) continue; num_port_k = here->conn[k]->size; here->conn[i]->port[j]->partial[k].port = TMALLOC(double, num_port_k); here->conn[i]->port[j]->ac_gain[k].port = TMALLOC(Mif_Complex_t, num_port_k); here->conn[i]->port[j]->smp_data.input[k].port = TMALLOC(Mif_Port_Ptr_t, num_port_k); } } } num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { if((here->conn[i]->is_null) || (! here->conn[i]->is_input) ) continue; num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { here->conn[i]->port[j]->old_input = *states; (*states)++; } } } /* Loop through all instances of this model and for each port of each connection */ /* create current equations, matrix entries, and matrix pointers as necessary. */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { /* Skip these expensive allocations if the instance is not analog */ if(! here->analog) continue; num_conn = here->num_conn; /* loop through all connections on this instance */ /* and create matrix data needed for outputs and */ /* V sources associated with I inputs */ for(i = 0; i < num_conn; i++) { /* if the connection is null, skip to next connection */ if(here->conn[i]->is_null) continue; /* prepare things for convenient access later */ is_input = here->conn[i]->is_input; is_output = here->conn[i]->is_output; num_port = here->conn[i]->size; /* loop through all ports on this connection */ for(j = 0; j < num_port; j++) { /* if port is null, skip to next */ if(here->conn[i]->port[j]->is_null) continue; /* determine the type of this port */ type = here->conn[i]->port[j]->type; /* create a pointer to the smp data for quick access */ smp_data_out = &(here->conn[i]->port[j]->smp_data); /* if it has a voltage source output, */ /* create the matrix data needed */ if( (is_output && (type == MIF_VOLTAGE || type == MIF_DIFF_VOLTAGE)) || (type == MIF_RESISTANCE || type == MIF_DIFF_RESISTANCE) ) { /* first, make the current equation */ suffix = TMALLOC(char, strlen(here->MIFname) + 100); sprintf(suffix, "branch_%d_%d", i, j); error = CKTmkCur(ckt, &tmp, here->MIFname, suffix); FREE(suffix); if(error) return(error); smp_data_out->branch = tmp->number; /* ibranch is needed to find the input equation for RESISTANCE type */ smp_data_out->ibranch = tmp->number; /* then make the matrix pointers */ TSTALLOC(pos_branch, pos_node, branch); TSTALLOC(neg_branch, neg_node, branch); TSTALLOC(branch_pos, branch, pos_node); TSTALLOC(branch_neg, branch, neg_node); } /* end if current input */ /* if it is a current input */ /* create the matrix data needed for the associated zero-valued V source */ if(is_input && (type == MIF_CURRENT || type == MIF_DIFF_CURRENT)) { /* first, make the current equation */ suffix = TMALLOC(char, strlen(here->MIFname) + 100); sprintf(suffix, "ibranch_%d_%d", i, j); error = CKTmkCur(ckt, &tmp, here->MIFname, suffix); FREE(suffix); if(error) return(error); smp_data_out->ibranch = tmp->number; /* then make the matrix pointers */ TSTALLOC(pos_ibranch, pos_node, ibranch); TSTALLOC(neg_ibranch, neg_node, ibranch); TSTALLOC(ibranch_pos, ibranch, pos_node); TSTALLOC(ibranch_neg, ibranch, neg_node); } /* end if current input */ /* if it is a vsource current input (refers to a vsource elsewhere */ /* in the circuit), locate the source and get its equation number */ if(is_input && (type == MIF_VSOURCE_CURRENT)) { smp_data_out->ibranch = CKTfndBranch(ckt, here->conn[i]->port[j]->vsource_str); if(smp_data_out->ibranch == 0) { IFuid names[2]; names[0] = here->MIFname; names[1] = here->conn[i]->port[j]->vsource_str; SPfrontEnd->IFerror (ERR_FATAL, "%s: unknown controlling source %s",names); return(E_BADPARM); } } /* end if vsource current input */ } /* end for number of ports */ } /* end for number of connections */ /* now loop through all connections on the instance and create */ /* matrix data needed for partial derivatives of outputs */ for(i = 0; i < num_conn; i++) { /* if the connection is null or is not an output */ /* skip to next connection */ if((here->conn[i]->is_null) || (! here->conn[i]->is_output)) continue; /* loop through all ports on this connection */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { /* if port is null, skip to next */ if(here->conn[i]->port[j]->is_null) continue; /* determine the type of this output port */ out_type = here->conn[i]->port[j]->type; /* create a pointer to the smp data for quick access */ smp_data_out = &(here->conn[i]->port[j]->smp_data); /* for this port, loop through all connections */ /* and all ports to touch on each possible input */ for(k = 0; k < num_conn; k++) { /* if the connection is null or is not an input */ /* skip to next connection */ if((here->conn[k]->is_null) || (! here->conn[k]->is_input)) continue; num_port_k = here->conn[k]->size; /* loop through all the ports of this connection */ for(l = 0; l < num_port_k; l++) { /* if port is null, skip to next */ if(here->conn[k]->port[l]->is_null) continue; /* determine the type of this input port */ in_type = here->conn[k]->port[l]->type; /* create a pointer to the smp data for quick access */ smp_data_cntl = &(here->conn[k]->port[l]->smp_data); /* determine type of controlled source according */ /* to input and output types */ cntl_src_type = MIFget_cntl_src_type(in_type, out_type); switch(cntl_src_type) { case MIF_VCVS: CTSTALLOC(e.branch_poscntl, branch, pos_node); CTSTALLOC(e.branch_negcntl, branch, neg_node); break; case MIF_ICIS: CTSTALLOC(f.pos_ibranchcntl, pos_node, ibranch); CTSTALLOC(f.neg_ibranchcntl, neg_node, ibranch); break; case MIF_VCIS: CTSTALLOC(g.pos_poscntl, pos_node, pos_node); CTSTALLOC(g.pos_negcntl, pos_node, neg_node); CTSTALLOC(g.neg_poscntl, neg_node, pos_node); CTSTALLOC(g.neg_negcntl, neg_node, neg_node); break; case MIF_ICVS: CTSTALLOC(h.branch_ibranchcntl, branch, ibranch); break; case MIF_minus_one: break; } /* end switch on controlled source type */ } /* end for number of input ports */ } /* end for number of input connections */ } /* end for number of output ports */ } /* end for number of output connections */ } /* end for all instances */ } /* end for all models of this type */ return(OK); } int MIFunsetup(GENmodel *inModel,CKTcircuit *ckt) { MIFmodel *model; MIFinstance *here; Mif_Smp_Ptr_t *smp_data_out; /* Mif_Smp_Ptr_t *smp_data_cntl;*/ /* Mif_Port_Type_t type, in_type, out_type;*/ Mif_Port_Type_t in_type, out_type; Mif_Cntl_Src_Type_t cntl_src_type; int num_conn,num_port,i,j,k,l,num_port_k; for (model = (MIFmodel *)inModel; model != NULL; model = model->MIFnextModel) { for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { num_conn=here->num_conn; for(i = 0; i < num_conn; i++) { /* if the connection is null, skip to next connection */ if(here->conn[i]->is_null) continue; /* prepare things for convenient access later */ num_port = here->conn[i]->size; /* loop through all ports on this connection */ for(j = 0; j < num_port; j++) { /* determine the type of this output port */ out_type = here->conn[i]->port[j]->type; /* create a pointer to the smp data for quick access */ smp_data_out = &(here->conn[i]->port[j]->smp_data); for(k = 0; k < num_conn; k++) { /* if the connection is null or is not an input skip to next connection */ if((here->conn[k]->is_null) || (! here->conn[k]->is_input)) continue; num_port_k = here->conn[k]->size; /* determine the type of this input port */ for(l = 0; l < num_port_k; l++) { /* if port is null, skip to next */ if(here->conn[k]->port[l]->is_null) continue; in_type = here->conn[i]->port[j]->type; cntl_src_type = MIFget_cntl_src_type(in_type, out_type); switch(cntl_src_type) { case MIF_VCVS: case MIF_ICVS: case MIF_VCIS: case MIF_ICIS: case MIF_minus_one: /* FIXME, really ? */ if(smp_data_out->branch) { CKTdltNNum(ckt, smp_data_out->branch); smp_data_out->branch = 0; } if(smp_data_out->ibranch) { CKTdltNNum(ckt, smp_data_out->ibranch); smp_data_out->ibranch = 0; } here->initialized=MIF_FALSE; break; } } } } } } } /* printf("MIFunsetup completed.\n");*/ return OK; } ngspice-26/src/xspice/mif/mifgetvalue.c0000644000265600020320000002047312264261473017550 0ustar andreasadmin/*============================================================================ FILE MIFgetValue.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function called to read parameter values from a .model card. INTERFACES MIFgetValue() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include #include "ngspice/ifsim.h" //#include "util.h" #include "ngspice/inpdefs.h" #include "ngspice/inpptree.h" /* #include */ #include #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" /* #include "suffix.h" */ static int MIFget_boolean(char *token, char **err); static int MIFget_integer(char *token, char **err); static double MIFget_real(char *token, char **err); static char *MIFget_string(char *token, char **err); static IFcomplex MIFget_complex(char *token, Mif_Token_Type_t token_type, char **line, char **err); /* MIFgetValue This function gets a parameter value from the .model text line into an IFvalue structure. The parameter type is specified in the argument list and is used to determine how to parse the text on the .model line. If the parameter is an array, the entire array is parsed and placed in the IFvalue structure along with the number of elements found. */ IFvalue * MIFgetValue ( CKTcircuit *ckt, /* The circuit structure */ char **line, /* The text line to read value from */ int type, /* The type of data to read */ INPtables *tab, /* Unused */ char **err ) /* Error string text */ { static IFvalue val; int btemp; int itemp; double rtemp; char *stemp; IFcomplex ctemp; char *token; Mif_Token_Type_t token_type; int value_type; int is_array; NG_IGNORE(ckt); NG_IGNORE(tab); /* Mask off non-type bits */ value_type = type & IF_VARTYPES; /* Setup array boolean */ is_array = value_type & IF_VECTOR; /* initialize stuff if array */ if(is_array) { token = MIFget_token(line, &token_type); if(token_type != MIF_LARRAY_TOK) { *err = "Array parameter expected - No array delimiter found"; return(NULL); } val.v.numValue = 0; val.v.vec.iVec = NULL; } /* now get the values into val */ for (;;) { token = MIFget_token(line, &token_type); /* exit if no more tokens */ if(token_type == MIF_NO_TOK) { *err = "Unexpected end of model card"; return(NULL); } /* exit if end of array found */ if(is_array && (token_type == MIF_RARRAY_TOK)) { if(val.v.numValue == 0) { *err = "Array parameter must have at least one value"; return(NULL); } break; } /* process the token to extract a value */ switch(value_type) { case IF_FLAG: val.iValue = MIFget_boolean(token, err); break; case IF_INTEGER: val.iValue = MIFget_integer(token, err); break; case IF_REAL: val.rValue = MIFget_real(token, err); break; case IF_STRING: val.sValue = MIFget_string(token, err); break; case IF_COMPLEX: val.cValue = MIFget_complex(token, token_type, line, err); break; case IF_FLAGVEC: btemp = MIFget_boolean(token, err); val.v.vec.iVec = TREALLOC(int, val.v.vec.iVec, val.v.numValue + 1); val.v.vec.iVec[val.v.numValue] = btemp; val.v.numValue++; break; case IF_INTVEC: itemp = MIFget_integer(token, err); val.v.vec.iVec = TREALLOC(int, val.v.vec.iVec, val.v.numValue + 1); val.v.vec.iVec[val.v.numValue] = itemp; val.v.numValue++; break; case IF_REALVEC: rtemp = MIFget_real(token, err); val.v.vec.rVec = TREALLOC(double, val.v.vec.rVec, val.v.numValue + 1); val.v.vec.rVec[val.v.numValue] = rtemp; val.v.numValue++; break; case IF_STRINGVEC: stemp = MIFget_string(token, err); val.v.vec.sVec = TREALLOC(char *, val.v.vec.sVec, val.v.numValue + 1); val.v.vec.sVec[val.v.numValue] = stemp; val.v.numValue++; break; case IF_CPLXVEC: ctemp = MIFget_complex(token, token_type, line, err); val.v.vec.cVec = TREALLOC(IFcomplex, val.v.vec.cVec, val.v.numValue + 1); val.v.vec.cVec[val.v.numValue] = ctemp; val.v.numValue++; break; default: *err = "Internal error - unexpected value type in MIFgetValue()"; return(NULL); } if(*err) return(NULL); /* exit after this single pass if not array */ if(! is_array) break; tfree(token); } /* end forever loop */ tfree(token); return(&val); } /* *************************************************************** */ static int MIFget_boolean(char *token, char **err) { int i; *err = NULL; if((strcmp(token, "t") == 0) || (strcmp(token, "true") == 0)) return(1); if((strcmp(token, "f") == 0) || (strcmp(token, "false") == 0)) return(0); i = MIFget_integer(token, err); // Try integer if(!*err && (i == 1 || i == 0)) return i; *err = "Bad boolean value"; return(-1); } /* *************************************************************** */ static int MIFget_integer(char *token, char **err) { int error; long l; double dtemp; char *endp; *err = NULL; errno = 0; l = strtol(token, &endp, 0); /* handles base 8, 10, 16 automatically */ if(!errno && (*endp == '\0')) return((int) l); /* if error, probably caused by engineering suffixes, */ /* so try parsing with INPevaluate */ dtemp = INPevaluate(&token, &error, 1); if(error) { *err = "Bad integer, octal, or hex value"; return(0); } return((int)floor(dtemp + 0.5)); } /* *************************************************************** */ static double MIFget_real(char *token, char **err) { double dtemp; int error; *err = NULL; dtemp = INPevaluate(&token, &error, 1); if(error) *err = "Bad real value"; return(dtemp); } /* *************************************************************** */ static char *MIFget_string(char *token, char **err) { char* ctoken = MIFcopy(token); *err = NULL; return(ctoken); } /* *************************************************************** */ static IFcomplex MIFget_complex(char *token, Mif_Token_Type_t token_type, char **line, char **err) { static char *msg = "Bad complex value"; IFcomplex ctemp; double dtemp; int error; *err = NULL; ctemp.real = 0.0; ctemp.imag = 0.0; /* Complex values must be of form < > */ if(token_type != MIF_LCOMPLEX_TOK) { *err = msg; return(ctemp); } /* get the real part */ token = MIFget_token(line, &token_type); if(token_type != MIF_STRING_TOK) { *err = msg; return(ctemp); } dtemp = INPevaluate(&token, &error, 1); if(error) { *err = msg; return(ctemp); } ctemp.real = dtemp; /* get the imaginary part */ token = MIFget_token(line, &token_type); if(token_type != MIF_STRING_TOK) { *err = msg; return(ctemp); } dtemp = INPevaluate(&token, &error, 1); if(error) { *err = msg; return(ctemp); } ctemp.imag = dtemp; /* eat the closing > delimiter */ token = MIFget_token(line, &token_type); if(token_type != MIF_RCOMPLEX_TOK) { *err = msg; return(ctemp); } return(ctemp); } ngspice-26/src/xspice/mif/mif_inp2.c0000644000265600020320000010320412264261473016735 0ustar andreasadmin/*============================================================================ FILE MIF_INP2A.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS 11/19/12 H Vogt patch by Marcel (mhx) added SUMMARY This file contains the main routine for parsing code model lines in the SPICE circuit description input deck. INTERFACES MIF_INP2A() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ /* jgroves */ #include "ngspice/ngspice.h" #include #include "ngspice/fteext.h" #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/devdefs.h" #include "ngspice/inpmacs.h" #include "ngspice/fteext.h" #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" extern int *DEVicesfl; /*flags for the devices */ static void MIFinit_inst(MIFmodel *mdfast, MIFinstance *fast); static void MIFget_port_type( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current, /* MUST be named 'current' for spice macros */ char **line, char **next_token, Mif_Token_Type_t *next_token_type, Mif_Port_Type_t *port_type, char **port_type_str, Mif_Conn_Info_t *conn_info, /* for faster access to conn info struct */ Mif_Status_t *status); static void MIFget_port( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current, /* MUST be named 'current' for spice macros */ MIFinstance *fast, /* pointer to instance struct */ char **line, char **next_token, Mif_Token_Type_t *next_token_type, Mif_Port_Type_t def_port_type, char *def_port_type_str, Mif_Conn_Info_t *conn_inf, /* for faster access to conn info struct */ int conn_num, int port_num, Mif_Status_t *status); /* ********************************************************************* */ /* MIF_INP2A This function is called by INPpas2() in SPICE to parse the new ``a'' type element cards and build the required circuit structures for the associated code model device and instance. It first checks the model name at the end of the element card to be sure the model was found in pass 1 of the parser. If so, MIFgetMod is called to process the .model card, creating the necessary internal model structure and filling in the parameter value information. Next, the instance structure is allocated. Finally, the connections on the element card are scanned and the connection information is filled-in on the instance structure, and error checks are performed. */ /*--------------- Quick summary of algorithm ----------------------- 1. Get the spice card. Place card string into variable 'line'. 2. Get the name of the instance and add it to the symbol table 3. Locate the last token on the line and assign it to variable 'model' 4. Locate the model from pass 1. If it hasn't been processed yet, allocate structure in ckt for it, process the parameters, and return a pointer to its structure in 'thismodel' 5. Get model type. 6. Create a new instance structure in ckt for this instance. ------ Process the connections: here's where it gets interesting. ----- 7. Reset 'line'. Then read instance name again to go over it. 8. Read initial token. 9 Start loop through port tokens: 10. If token is a %, then read next token to get port type and save this port type. Otherwise, use default port type. 11. Check if connection is null. If so, iterate to next conn. 12. Get next token. Depending upon token type (scalar or array) do the following: -- Scalar: Process it, then continue loop. -- Array: Loop through all tokens until ] is found & process tokens. If token is a %, then read next token to get port type Then continue outer loop over port tokens. 13. After looping through connection tokens, do error checks. At this point, nothing should be left in 'line' -------------------------------------------------------------------------*/ void MIF_INP2A ( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current ) /* the card we are to parse */ /* Must be called "current" for compatibility */ /* with macros */ { /* parse a code model instance card */ /* Aname */ char *line; /* the text line for this card */ char *name; /* the name of the instance */ char *model=NULL; /* the name of the model */ char *def_port_type_str = NULL; /* The default port type in string form */ char *next_token; /* a token string */ char *tmp_token; /* a token string */ int i; /* a loop counter */ int j; /* a loop counter */ int type; /* the type of the model for this instance */ /* int num_conn; number of connections for this model */ int error; /* for the IFC macro */ MIFmodel *mdfast; /* pointer to model struct */ MIFinstance *fast[1]; /* pointer to instance struct */ INPmodel *thismodel; /* pointer to model struct */ Mif_Conn_Info_t *conn_info; /* for faster access to conn info struct */ Mif_Param_Info_t *param_info; /* for faster access to param info struct */ Mif_Port_Type_t def_port_type = MIF_VOLTAGE; /* the default port type */ Mif_Status_t status; /* return status */ Mif_Token_Type_t next_token_type; /* the type of the next token */ #ifdef TRACE /* SDB debug statement */ printf("In MIF_INP2A, line to process = %s . . . \n", current->line); #endif /* get the line text from the card struct */ line = current->line; /* get the name of the instance and add it to the symbol table */ name = MIFgettok(&line); INPinsert(&name, tab); /* locate the last token on the line (i.e. model name) and put it into "model" */ while(*line != '\0') { if (model) tfree(model); model = MIFgettok(&line); } /* make sure the model name was there. */ if(model == NULL) { LITERR("Missing model on A type device"); return; } /* Locate model from pass 1. If it hasn't been processed yet, */ /* allocate a structure in ckt for it, process its parameters */ /* and return a pointer to its structure in 'thismodel' */ current->error = MIFgetMod(ckt, model, &thismodel, tab); if(current->error) { return; } /* get the integer index into the DEVices data array for this */ /* model */ type = thismodel->INPmodType; if((type >= DEVmaxnum) || DEVicesfl[type] == 0) { LITERR("Invalid model type for A type device"); return; } /* create a new structure for this instance in ckt */ mdfast = (MIFmodel*) thismodel->INPmodfast; IFC(newInstance, (ckt, (GENmodel*)mdfast, (GENinstance **)fast, name)); /* initialize the code model specific elements of the inst struct */ MIFinit_inst(mdfast, fast[0]); /* *********************** */ /* Process the connections */ /* *********************** */ /* reset 'line', and then read instance name again. */ line = current->line; tmp_token = MIFgettok(&line); /* read instance name again . . . .*/ tfree(tmp_token); /* OK -- now &line points to the first token after the instance name and we are ready to process the connections (netnames) */ /* now get next token. It should be either a % token, a [, or a connection (netname) which might be 'null'. */ next_token = MIFget_token(&line,&next_token_type); /* When we enter the loop, next_token holds the first thing *after* the instance name. Upon each iteration, we start the iteration with next_token holding the next *unprocessed* token. The loop proceeds through the fixed number of connections expected, as defined in the DEVices struct. */ for(i = 0; i < DEVices[type]->DEVpublic.num_conn; i++) { /* Check that the line is not finished yet. */ if(*line == '\0') { LITERR("Encountered end of line before all connections were found in model."); return; } /* At this point, we have one of three possibilities: 1. next_token holds a %, and &line points to either the port type identifier (id, vd, etc) 2. next_token holds a netname and &line points to the thing *after* the first netname. 3. next_token holds a [ indicating the start of an array of ports. */ /* prepare a pointer for fast access to info about this connection */ conn_info = &(DEVices[type]->DEVpublic.conn[i]); /* Now if we had a % token, get actual info about connection type. Otherwise use default info */ if(next_token_type == MIF_PERCENT_TOK) { /* we found a % */ /* get the port type identifier and check it for validity */ if (next_token) tfree(next_token); next_token = MIFget_token(&line, &next_token_type); /* Note that MIFget_port_type eats the next token and advances the token pointer in line */ MIFget_port_type(ckt, tab, current, &line, &next_token, &next_token_type, &def_port_type, &def_port_type_str, conn_info, &status); if(status == MIF_ERROR) return; } else { /* use the default port type for this connection */ def_port_type = conn_info->default_port_type; def_port_type_str = conn_info->default_type; } /* At this point, next_token should be either a [ char, or should hold the the first connection (netname) */ /* set analog and event_driven flags on instance and model */ if((def_port_type == MIF_DIGITAL) || (def_port_type == MIF_USER_DEFINED)) { fast[0]->event_driven = MIF_TRUE; mdfast->event_driven = MIF_TRUE; } else { fast[0]->analog = MIF_TRUE; mdfast->analog = MIF_TRUE; } /* check for a null connection and continue to next connection if found */ if(next_token_type == MIF_NULL_TOK) { /* make sure null is allowed */ if(! conn_info->null_allowed) { LITERR("NULL connection found where not allowed"); return; } /* set the null flag to true */ fast[0]->conn[i]->is_null = MIF_TRUE; fast[0]->conn[i]->size = 0; /* eat the null token and continue to next connection */ next_token = MIFget_token(&line,&next_token_type); continue; /* iterate */ } else { /* set the null flag to false */ fast[0]->conn[i]->is_null = MIF_FALSE; } /* ===== process connection as appropriate for scalar or array ====== */ if(! conn_info->is_array) { /* a scalar connection - the simpler case */ /* If we get to there, next_token should hold a netname in the port netlist. */ /* First, do a couple of error checks */ if(next_token_type == MIF_LARRAY_TOK) { LITERR("ERROR - Scalar connection expected, [ found"); printf("ERROR - Scalar connection expected, [ found. Returning . . ."); return; } if(next_token_type == MIF_RARRAY_TOK) { LITERR("ERROR - Unexpected ]"); printf("ERROR - Unexpected ]. Returning . . ."); return; } /* If all OK, get the port data into the instance struct */ /* allocating the port member of the instance struct as needed */ /* Note that MIFget_port eats next_token, and advances the &line pointer.. */ MIFget_port(ckt, tab, current, fast[0], &line, &next_token, &next_token_type, def_port_type, def_port_type_str, conn_info, i, /* connection index */ 0, /* port index for scalar connection */ &status); if(status == MIF_ERROR) return; fast[0]->conn[i]->size = 1; /* when we leave here, next_token should hold the next, unprocessed netname */ } else { /* ====== the connection is an array - much to be done ... ====== */ /* At this point, the next_token should be a [ */ /* check for required leading array delim character [ and eat it if found */ if(next_token_type != MIF_LARRAY_TOK) { LITERR("Missing [, an array connection was expected"); printf("Missing [, an array connection was expected. Returning . . ."); return; } else /* eat the [ */ if (next_token) tfree(next_token); next_token = MIFget_token(&line,&next_token_type); /*------ get and process ports until ] is encountered ------*/ for(j = 0; (next_token_type != MIF_RARRAY_TOK) && (*line != '\0'); j++) { /********** mhx Friday, August 19, 2011, 15:08 begin *** Now if we had a % token, get actual info about connection type, or else use the port type for this connection that was setup BEFORE the '[' token. Do NOT use conn_info->default_port_type! */ if (next_token_type == MIF_PERCENT_TOK) { next_token = MIFget_token (&line,&next_token_type); MIFget_port_type(ckt, tab, current, &line, &next_token, &next_token_type, &def_port_type, &def_port_type_str, conn_info, &status); if(status == MIF_ERROR) return; } /* At this point, next_token should be either a [ or ] char (not allowed), or hold a non-null connection (netname) */ if(next_token_type == MIF_NULL_TOK) { LITERR("NULL connection found where not allowed"); printf("NULL connection found where not allowed. Returning . . ."); return; } if(next_token_type == MIF_LARRAY_TOK) { LITERR("ERROR - Unexpected [ - Arrays of arrays not allowed"); printf("ERROR - Unexpected [ - Arrays of arrays not allowed. Returning . . ."); return; } if(next_token_type == MIF_RARRAY_TOK) { LITERR("ERROR - Unexpected ]"); printf("ERROR - Unexpected ]. Returning . . ."); return; } /********** mhx Friday, August 19, 2011, 15:08 end ***/ /* If all OK, get the port nodes into the instance struct */ /* allocating the port member of the instance struct as needed */ /* Note that MIFget_port eats next_token and advances &line by one. */ MIFget_port(ckt, tab, current, fast[0], &line, &next_token, &next_token_type, def_port_type, def_port_type_str, conn_info, i, /* connection index */ j, /* port index */ &status); if(status == MIF_ERROR) return; } /*------ end of for loop until ] is encountered ------*/ /* At this point, next_token should hold the next token after the port netnames. This token should be a ]. */ /* make sure we exited because the end of the array connection was reached. */ if(*line == '\0') { LITERR("Missing ] in array connection"); return; } /* record the number of ports found for this connection */ if(j < 1) { LITERR("Array connection must have at least one port"); return; } fast[0]->conn[i]->size = j; /* At this point, the next time we get_token, we should get a % or a net name. We'll do that now, since when we enter the loop, we expect next_token to hold the next unprocessed token. */ if (next_token) tfree(next_token); next_token = MIFget_token(&line, &next_token_type); } /* ====== array connection processing ====== */ /* be careful about putting stuff here, there is a 'continue' used */ /* in the processing of NULL connections above */ /* At this point, next_token should hold the next unprocessed token. */ } /******* for number of connections *******/ /* *********************** */ /* Error Checks */ /* *********************** */ /* check for too many connections */ /* At this point, we should have eaten all the net connections, and left next_token holding the model name. &line should be empty. */ if(strcmp(next_token, model) != 0) { LITERR("Too many connections -- expecting model name but encountered other tokens."); return; } tfree(model); /* check connection constraints */ for(i = 0; i < DEVices[type]->DEVpublic.num_conn; i++) { conn_info = &(DEVices[type]->DEVpublic.conn[i]); if( (fast[0]->conn[i]->is_null) && (! conn_info->null_allowed) ) { LITERR("Null found for connection where not allowed"); return; } if(conn_info->has_lower_bound) { if(fast[0]->conn[i]->size < conn_info->lower_bound) { LITERR("Too few ports in connection"); return; } } if(conn_info->has_upper_bound) { if(fast[0]->conn[i]->size > conn_info->upper_bound) { LITERR("Too many ports in connection"); return; } } } /* check model parameter constraints */ /* some of these should probably be done in MIFgetMod() */ /* to prevent multiple error messages */ for(i = 0; i < DEVices[type]->DEVpublic.num_param; i++) { param_info = &(DEVices[type]->DEVpublic.param[i]); if(mdfast->param[i]->is_null) { if(! param_info->has_default) { LITERR("Parameter on model has no default"); return; } else if((param_info->is_array) && (! param_info->has_conn_ref)) { LITERR("Defaulted array parameter must have associated array connection"); return; } } if((! mdfast->param[i]->is_null) && (param_info->is_array)) { if(param_info->has_conn_ref) { if(fast[0]->conn[param_info->conn_ref]->size != fast[0]->param[i]->size) { LITERR("Array parameter size on model does not match connection size"); return; } } } } } /* ********************************************************************* */ /* MIFinit_inst This function initializes the code model specific elements of the inst struct. */ static void MIFinit_inst( MIFmodel *mdfast, /* The model the instance is derived from */ MIFinstance *fast) /* The instance to initialize */ { int mod_type; /* type of this model */ Mif_Conn_Info_t *conn_info; int i; /* get an index into the DEVices information structure */ mod_type = mdfast->MIFmodType; /* allocate code model connector data in instance struct */ fast->num_conn = DEVices[mod_type]->DEVpublic.num_conn; fast->conn = TMALLOC(Mif_Conn_Data_t *, fast->num_conn); for(i = 0; i < fast->num_conn; i++) fast->conn[i] = TMALLOC(Mif_Conn_Data_t, 1); /* initialize code model connector data */ for(i = 0; i < fast->num_conn; i++) { conn_info = &(DEVices[mod_type]->DEVpublic.conn[i]); fast->conn[i]->name = conn_info->name; fast->conn[i]->description = conn_info->description; fast->conn[i]->is_null = MIF_TRUE; fast->conn[i]->size = 0; fast->conn[i]->port = NULL; switch(conn_info->direction) { case MIF_INOUT: fast->conn[i]->is_input = MIF_TRUE; fast->conn[i]->is_output = MIF_TRUE; break; case MIF_IN: fast->conn[i]->is_input = MIF_TRUE; fast->conn[i]->is_output = MIF_FALSE; break; case MIF_OUT: fast->conn[i]->is_input = MIF_FALSE; fast->conn[i]->is_output = MIF_TRUE; break; default: printf("\nERROR - Impossible direction type in MIFinit_inst\n"); controlled_exit(1); } } /* allocate and copy instance variable data to the instance */ fast->num_inst_var = DEVices[mod_type]->DEVpublic.num_inst_var; fast->inst_var = TMALLOC(Mif_Inst_Var_Data_t *, fast->num_inst_var); for(i = 0; i < fast->num_inst_var; i++) { fast->inst_var[i] = TMALLOC(Mif_Inst_Var_Data_t, 1); if(DEVices[mod_type]->DEVpublic.inst_var[i].is_array) { fast->inst_var[i]->size = 0; fast->inst_var[i]->element = NULL; /* The code model allocates space for the data and sets the size */ } else { fast->inst_var[i]->size = 1; fast->inst_var[i]->element = TMALLOC(Mif_Value_t, 1); } } /* copy model parameter data to the instance */ fast->num_param = mdfast->num_param; fast->param = mdfast->param; /* initialize any additional instance data */ fast->initialized = MIF_FALSE; fast->analog = MIF_FALSE; fast->event_driven = MIF_FALSE; fast->inst_index = 0; } /* ********************************************************************* */ /* MIFget_port_type This function gets the port type identifier and checks it for validity. It also replaces false default information in conn_info with the real info based upon the discovered port type string. When we call it, we expect that the next token type (sent from above) should be the port type (MIF_STRING_TOK type). That is, we should be sitting right on the def of the port type (i.e. %vnam, %vd, %id, etc.) Note that the parser should have stripped the % already. Upon return, this fcn should leave next_token holding the token *after* the port type (i.e. the thing after vnam, v, vd, id, etc). */ static void MIFget_port_type( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current, /* MUST be named 'current' for spice macros */ char **line, char **next_token, Mif_Token_Type_t *next_token_type, Mif_Port_Type_t *port_type, char **port_type_str, Mif_Conn_Info_t *conn_info, /* for faster access to conn info struct */ Mif_Status_t *status) { Mif_Boolean_t found_type; char *temp; int i; NG_IGNORE(ckt); NG_IGNORE(tab); if(**line == '\0') { LITERR("Missing connections on A device"); *status = MIF_ERROR; return; } if(*next_token_type != MIF_STRING_TOK) { LITERR("Invalid port type specifier"); *status = MIF_ERROR; return; } /* OK, so get the port type string from the token and read next token */ temp = *next_token; *next_token = MIFget_token(line, next_token_type); /* check port type for validity */ found_type = MIF_FALSE; for(i = 0; i < conn_info->num_allowed_types; i++) { if(strcmp(temp, conn_info->allowed_type_str[i]) == 0) { found_type = MIF_TRUE; *port_type = conn_info->allowed_type[i]; *port_type_str = temp; break; } } if(! found_type) { LITERR("Port type is invalid"); *status = MIF_ERROR; } else { /* Fix by SDB so that the netlist parser uses the actual nature of the port instead of the default state to decide if it is an array. */ /* if ( (*port_type == MIF_DIFF_VOLTAGE) || (*port_type == MIF_DIFF_CURRENT) || (*port_type == MIF_DIFF_CONDUCTANCE) || (*port_type == MIF_DIFF_RESISTANCE) ) { conn_info->is_array = 1; } */ *status = MIF_OK; } } /* ********************************************************************* */ /* MIFget_port This function processes a port being parsed, either single ended, or both connections of a differential. When we call this fcn, next_token should be the *first* netname in the port net list. Depending upon the type of port, this fcn should eat the appropriate number of net tokens. When we leave this fcn, next_token should hold the next token after the last netname processed. */ static void MIFget_port( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current, /* MUST be named 'current' for spice macros */ MIFinstance *fast, /* pointer to instance struct */ char **line, char **next_token, Mif_Token_Type_t *next_token_type, Mif_Port_Type_t def_port_type, char *def_port_type_str, Mif_Conn_Info_t *conn_info, /* for faster access to conn info struct */ int conn_num, int port_num, Mif_Status_t *status) { CKTnode *pos_node[1]; /* positive connection node */ CKTnode *neg_node[1]; /* negative connection node */ char *node; /* allocate space in the instance data struct for this port */ if(port_num == 0) { fast->conn[conn_num]->port = TMALLOC(Mif_Port_Data_t *, 1); fast->conn[conn_num]->port[0] = TMALLOC(Mif_Port_Data_t, 1); } else { fast->conn[conn_num]->port = TREALLOC(Mif_Port_Data_t *, fast->conn[conn_num]->port, port_num + 1); fast->conn[conn_num]->port[port_num] = TMALLOC(Mif_Port_Data_t, 1); } /* store the port type information in the instance struct */ fast->conn[conn_num]->port[port_num]->type = def_port_type; fast->conn[conn_num]->port[port_num]->type_str = def_port_type_str; /* check for a leading tilde on digital ports */ if(*next_token_type == MIF_TILDE_TOK) { if((def_port_type != MIF_DIGITAL) && (def_port_type != MIF_USER_DEFINED)) { LITERR("ERROR - Tilde not allowed on analog nodes"); *status = MIF_ERROR; return; } fast->conn[conn_num]->port[port_num]->invert = MIF_TRUE; /* eat the tilde and get the next token */ *next_token = MIFget_token(line, next_token_type); if(**line == '\0') { LITERR("ERROR - Not enough ports"); *status = MIF_ERROR; return; } } else fast->conn[conn_num]->port[port_num]->invert = MIF_FALSE; /* check for null port */ if(*next_token_type == MIF_NULL_TOK) { /* make sure null is allowed */ if(! conn_info->null_allowed) { LITERR("NULL connection found where not allowed"); *status = MIF_ERROR; return; } /* set the (port specific) null flag to true */ fast->conn[conn_num]->port[port_num]->is_null = MIF_TRUE; /* set input value to zero in case user code model refers to it */ fast->conn[conn_num]->port[port_num]->input.rvalue = 0.0; /* eat the null token and return */ *next_token = MIFget_token(line, next_token_type); *status = MIF_OK; return; } else { /* set the (port specific) null flag to false */ fast->conn[conn_num]->port[port_num]->is_null = MIF_FALSE; } /* next token must be a node/instance identifier ... */ if(*next_token_type != MIF_STRING_TOK) { LITERR("ERROR - Expected node/instance identifier"); *status = MIF_ERROR; return; } /* Get the first connection or the voltage source name */ switch(def_port_type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: /* Call the spice3c1 function to put this node in the node list in ckt */ INPtermInsert(ckt, next_token, tab, pos_node); /* store the equation number and node identifier */ /* This is the equivalent of what CKTbindNode() does in 3C1 */ fast->conn[conn_num]->port[port_num]->pos_node_str = *next_token; fast->conn[conn_num]->port[port_num]->smp_data.pos_node = pos_node[0]->number; break; case MIF_VSOURCE_CURRENT: /* Call the spice3c1 function to put this vsource instance name in */ /* the symbol table */ INPinsert(next_token, tab); /* Now record the name of the vsource instance for processing */ /* later by MIFsetup. This is equivalent to what INPpName */ /* does in 3C1. Checking to see if the source is present in */ /* the circuit is deferred to MIFsetup as is done in 3C1. */ fast->conn[conn_num]->port[port_num]->vsource_str = *next_token; break; case MIF_DIGITAL: case MIF_USER_DEFINED: /* Insert data into event-driven info structs */ EVTtermInsert(ckt, fast, *next_token, def_port_type_str, conn_num, port_num, &(current->error)); if(current->error) { *status = MIF_ERROR; return; } /* free just the digital ones, the other are still assigned by INPtermInsert */ tfree(*next_token); break; default: /* impossible connection type */ LITERR("INTERNAL ERROR - Impossible connection type"); *status = MIF_ERROR; return; } /* get the next token */ *next_token = MIFget_token(line, next_token_type); /* get other node if appropriate */ switch(def_port_type) { case MIF_VOLTAGE: case MIF_CURRENT: case MIF_CONDUCTANCE: case MIF_RESISTANCE: /* These are single ended types, so default other node to ground */ // This don't work dickhead, INPtermInsert tries to FREE(&node) K.A. Feb 27, 2000 // which was not allocted node = TMALLOC(char, 2);// added by K.A. march 5th 2000 *node = '0'; // added by K.A. March 5th 2000 node[1] ='\0'; // added by K.A. March 5th 2000 // node = "0"; // deleted by K.A. March 5th 2000, this is incorrect, it creates a new pointer // that cause a crash in INPtermInsert() INPtermInsert(ckt, &node, tab, neg_node); fast->conn[conn_num]->port[port_num]->neg_node_str = node; fast->conn[conn_num]->port[port_num]->smp_data.neg_node = neg_node[0]->number; break; case MIF_DIFF_VOLTAGE: case MIF_DIFF_CURRENT: case MIF_DIFF_CONDUCTANCE: case MIF_DIFF_RESISTANCE: /* These are differential types, so get the other node */ if((**line == '\0') || (*next_token_type != MIF_STRING_TOK)) { LITERR("ERROR - Expected node identifier"); *status = MIF_ERROR; return; } INPtermInsert(ckt, next_token, tab, neg_node); fast->conn[conn_num]->port[port_num]->neg_node_str = *next_token; fast->conn[conn_num]->port[port_num]->smp_data.neg_node = neg_node[0]->number; *next_token = MIFget_token(line, next_token_type); break; default: /* must be vsource name, digital, or user defined, so there is no other node */ break; } *status = MIF_OK; return; } ngspice-26/src/xspice/mif/mifmask.c0000644000265600020320000001337712264261473016674 0ustar andreasadmin/*============================================================================ FILE MIFmAsk.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function called by nutmeg to get the value of a specified code model parameter. INTERFACES MIFmAsk() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include //#include "CONST.h" //#include "util.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include #include "ngspice/mifproto.h" #include "ngspice/mifdefs.h" /* #include "suffix.h" */ /* MIFmAsk This function is called by SPICE/Nutmeg to query the value of a parameter on a model. It is essentially the opposite of MIFmParam, taking the index of the parameter, locating the value of the parameter in the model structure, and converting that value into the IFvalue structure understood by Nutmeg. */ int MIFmAsk( CKTcircuit *ckt, /* The circuit structure */ GENmodel *inModel, /* The model to get the value from */ int param_index, /* The parameter to get */ IFvalue *value) /* The value returned */ { MIFmodel *model; int mod_type; int value_type; int i; int size; Mif_Boolean_t is_array; NG_IGNORE(ckt); /* Arrange for access to MIF specific data in the model */ model = (MIFmodel *) inModel; /* Get model type */ mod_type = model->MIFmodType; if((mod_type < 0) || (mod_type >= DEVmaxnum)) return(E_BADPARM); /* Check parameter index for validity */ if((param_index < 0) || (param_index >= model->num_param)) return(E_BADPARM); /* get value type to know which members of unions to access */ value_type = DEVices[mod_type]->DEVpublic.modelParms[param_index].dataType; value_type &= IF_VARTYPES; /* determine if the parameter is an array or not */ is_array = value_type & IF_VECTOR; /* Transfer the values to the SPICE3C1 value union from the param elements */ /* This is analagous to what SPICE3 does with other device types */ if(! is_array) { switch(value_type) { case IF_FLAG: value->iValue = model->param[param_index]->element[0].bvalue; break; case IF_INTEGER: value->iValue = model->param[param_index]->element[0].ivalue; break; case IF_REAL: value->rValue = model->param[param_index]->element[0].rvalue; break; case IF_STRING: /* Make copy of string. We don't trust caller to not free it */ /* These copies could get expensive! */ value->sValue = MIFcopy(model->param[param_index]->element[0].svalue); break; case IF_COMPLEX: /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ value->cValue.real = model->param[param_index]->element[0].cvalue.real; value->cValue.imag = model->param[param_index]->element[0].cvalue.imag; break; default: return(E_BADPARM); } } else { /* it is an array */ size = model->param[param_index]->size; if(size < 0) size = 0; value->v.numValue = size; switch(value_type) { /* Note that we malloc space each time this function is called. */ /* This is what TRAask.c does, so we do it too, even though */ /* we don't know if it is ever freed... */ case IF_FLAGVEC: if(size <= 0) break; value->v.vec.iVec = TMALLOC(int, size); for(i = 0; i < size; i++) value->v.vec.iVec[i] = model->param[param_index]->element[i].bvalue; break; case IF_INTVEC: if(size <= 0) break; value->v.vec.iVec = TMALLOC(int, size); for(i = 0; i < size; i++) value->v.vec.iVec[i] = model->param[param_index]->element[i].ivalue; break; case IF_REALVEC: if(size <= 0) break; value->v.vec.rVec = TMALLOC(double, size); for(i = 0; i < size; i++) value->v.vec.rVec[i] = model->param[param_index]->element[i].rvalue; break; case IF_STRINGVEC: if(size <= 0) break; value->v.vec.sVec = TMALLOC(char *, size); for(i = 0; i < size; i++) /* Make copy of string. We don't trust caller to not free it */ /* These copies could get expensive! */ value->v.vec.sVec[i] = MIFcopy(model->param[param_index]->element[i].svalue); break; case IF_CPLXVEC: if(size <= 0) break; /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ value->v.vec.cVec = TMALLOC(IFcomplex, size); for(i = 0; i < size; i++) { value->v.vec.cVec[i].real = model->param[param_index]->element[i].cvalue.real; value->v.vec.cVec[i].imag = model->param[param_index]->element[i].cvalue.imag; } break; default: return(E_BADPARM); } /* end switch */ } /* end else */ return(OK); } ngspice-26/src/xspice/mif/mifmpara.c0000644000265600020320000001346212264261473017034 0ustar andreasadmin/*============================================================================ FILE MIFmParam.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function used to assign the value of a parameter read from the .model card into the appropriate structure in the model. INTERFACES MIFmParam() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include //#include "CONST.h" //#include "util.h" #include "ngspice/ifsim.h" //#include "resdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" /* #include "suffix.h" */ /* MIFmParam This function is called by SPICE/Nutmeg to set the value of a parameter on a model according to information parsed from a .model card or information supplied interactively by a user. It takes the value of the parameter input in an IFvalue structure and sets the parameter on the specified model structure. Unlike the procedure for SPICE 3C1 devices, MIFmParam does not use enumerations for identifying the parameter to set. Instead, the parameter is identified directly by the index value of the parameter in the SPICEdev.DEVpublic.modelParms array. */ int MIFmParam( int param_index, /* The parameter to set */ IFvalue *value, /* The value of the parameter */ GENmodel *inModel) /* The model structure on which to set the value */ { MIFmodel *model; int mod_type; int value_type; int i; Mif_Boolean_t is_array; /* Arrange for access to MIF specific data in the model */ model = (MIFmodel *) inModel; /* Get model type */ mod_type = model->MIFmodType; if((mod_type < 0) || (mod_type >= DEVmaxnum)) return(E_BADPARM); /* Check parameter index for validity */ if((param_index < 0) || (param_index >= model->num_param)) return(E_BADPARM); /* get value type to know which members of unions to access */ value_type = DEVices[mod_type]->DEVpublic.modelParms[param_index].dataType; value_type &= IF_VARTYPES; /* determine if the parameter is an array or not */ is_array = value_type & IF_VECTOR; /* initialize the parameter is_null and size elements and allocate elements */ model->param[param_index]->is_null = MIF_FALSE; if(is_array) { model->param[param_index]->size = value->v.numValue; model->param[param_index]->element = TMALLOC(Mif_Value_t, value->v.numValue); } else { model->param[param_index]->size = 1; model->param[param_index]->element = TMALLOC(Mif_Value_t, 1); } /* Transfer the values from the SPICE3C1 value union to the param elements */ /* This is analagous to what SPICE3 does with other device types */ if(! is_array) { switch(value_type) { case IF_FLAG: model->param[param_index]->element[0].bvalue = value->iValue; break; case IF_INTEGER: model->param[param_index]->element[0].ivalue = value->iValue; break; case IF_REAL: model->param[param_index]->element[0].rvalue = value->rValue; break; case IF_STRING: /* we don't trust the caller to keep the string alive, so copy it */ model->param[param_index]->element[0].svalue = TMALLOC(char, 1 + strlen(value->sValue)); strcpy(model->param[param_index]->element[0].svalue, value->sValue); break; case IF_COMPLEX: /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ model->param[param_index]->element[0].cvalue.real = value->cValue.real; model->param[param_index]->element[0].cvalue.imag = value->cValue.imag; break; default: return(E_BADPARM); } } else { /* it is an array */ for(i = 0; i < value->v.numValue; i++) { switch(value_type) { case IF_FLAGVEC: model->param[param_index]->element[i].bvalue = value->v.vec.iVec[i]; break; case IF_INTVEC: model->param[param_index]->element[i].ivalue = value->v.vec.iVec[i]; break; case IF_REALVEC: model->param[param_index]->element[i].rvalue = value->v.vec.rVec[i]; break; case IF_STRINGVEC: /* we don't trust the caller to keep the string alive, so copy it */ model->param[param_index]->element[i].svalue = TMALLOC(char, 1 + strlen(value->v.vec.sVec[i])); strcpy(model->param[param_index]->element[i].svalue, value->v.vec.sVec[i]); break; case IF_CPLXVEC: /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ model->param[param_index]->element[i].cvalue.real = value->v.vec.cVec[i].real; model->param[param_index]->element[i].cvalue.imag = value->v.vec.cVec[i].imag; break; default: return(E_BADPARM); } /* end switch */ } /* end for number of elements of vector */ } /* end else */ return(OK); } ngspice-26/src/xspice/mif/mifgetmod.c0000644000265600020320000002067312264261473017215 0ustar andreasadmin/*============================================================================ FILE MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved * * Copyright (c) 1985 Thomas L. Quarles * * NOTE: Portions of this code are Copyright Thomas L. Quarles and University of * California at Berkeley. Other portions are modified and added by * the Georgia Tech Research Institute. * PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the routine that allocates a new model structure and parses the .model card parameters. INTERFACES MIFgetMod() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include #include "ngspice/inpdefs.h" #include "ngspice/devdefs.h" #include "ngspice/ifsim.h" #include "ngspice/cpstd.h" #include "ngspice/fteext.h" #include "ngspice/mifproto.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" #include "ngspice/suffix.h" /* This is the table of all models known to the program. It is now defined in inpmkmod.c. */ extern INPmodel *modtab; /* MIFgetMod This function is a modified version of SPICE 3C1 INPgetMod(). MIFgetMod looks in the table of model information created on the first pass of the parser to find the text of the .model card. It then checks to see if the .model card has already been processed by a previous element card reference. If so, it returns a pointer to the previously created model structure. If not, it allocates a new model structure and processes the parameters on the .model card. Parameter values for parameters not found on the .model card are not filled in by this function. They are defaulted later by MIFsetup(). The function returns NULL when successful, and an error string on failure. */ char *MIFgetMod( CKTcircuit *ckt, /* The circuit structure */ char *name, /* The name of the model to look for */ INPmodel **model, /* The model found/created */ INPtables *tab /* Table of model info from first pass */ ) { INPmodel *modtmp; IFvalue * val; register int j; char * line; char *parm; char *err = NULL; char *temp; int error; int i; char *err1; char *err2; MIFmodel *mdfast; /* Mif_Param_Info_t *param_info;*/ /* =========== First locate the named model in the modtab list ================= */ #ifdef TRACE /* SDB debug statement */ printf("In MIFgetMod, looking for model name = %s . . .\n", name); #endif /* maschmann : remove : from name * char *pos; * if((pos=strstr(name,":"))!=NULL) *pos=0; */ /*------------------------------------ for (i = &modtab; *i != NULL; i = &((*i)->INPnextModel)) { if (strcmp((*i)->INPmodName, token) == 0) { return (OK); } } --------------------------*/ /* loop through modtable looking for this model (*name) */ for (modtmp = modtab; modtmp != NULL; modtmp = modtmp->INPnextModel) { #ifdef TRACE /* SDB debug statement */ printf("In MIFgetMod, checking model against stored model = %s . . .\n", modtmp->INPmodName); #endif if (strcmp(modtmp->INPmodName, name) == 0) { #ifdef TRACE /* SDB debug statement */ printf("In MIFgetMod, found model!!!\n"); #endif /* ========= found the model in question - now instantiate if necessary ========== */ /* ============== and return an appropriate pointer to it ===================== */ /* make sure the type is valid before proceeding */ if(modtmp->INPmodType < 0) { /* illegal device type, so can't handle */ *model = NULL; /* fixed by SDB -- magic number is 39, not 35. * Also needed parens to correctly compute # of bytes to malloc */ err = TMALLOC(char, 39 + strlen(name)); sprintf(err, "MIF: Unknown device type for model %s \n",name); return(err); } /* check to see if this model's parameters have been processed */ if(! modtmp->INPmodfast) { /* not already processed, so create data struct */ error = ft_sim->newModel ( ckt, modtmp->INPmodType, &(modtmp->INPmodfast), modtmp->INPmodName); if(error) return(INPerror(error)); /* gtri modification: allocate and initialize MIF specific model struct items */ mdfast = (MIFmodel*) modtmp->INPmodfast; mdfast->num_param = DEVices[modtmp->INPmodType]->DEVpublic.num_param; mdfast->param = TMALLOC(Mif_Param_Data_t *, mdfast->num_param); for(i = 0; i < mdfast->num_param; i++) { mdfast->param[i] = TMALLOC(Mif_Param_Data_t, 1); mdfast->param[i]->is_null = MIF_TRUE; mdfast->param[i]->size = 0; mdfast->param[i]->element = NULL; } /* remaining initializations will be done by MIFmParam() and MIFsetup() */ /* parameter isolation, identification, binding */ line = modtmp->INPmodLine->line; INPgetTok(&line,&parm,1); /* throw away '.model' */ tfree(parm); INPgetTok(&line,&parm,1); /* throw away 'modname' */ tfree(parm); /* throw away the modtype - we don't treat it as a parameter */ /* like SPICE does */ INPgetTok(&line,&parm,1); /* throw away 'modtype' */ tfree(parm); while(*line != 0) { INPgetTok(&line,&parm,1); for(j=0 ; j < *(ft_sim->devices[modtmp->INPmodType]->numModelParms); j++) { if (strcmp(parm, ft_sim->devices[modtmp->INPmodType]->modelParms[j].keyword) == 0) { /* gtri modification: call MIFgetValue instead of INPgetValue */ err1 = NULL; val = MIFgetValue(ckt,&line, ft_sim->devices[modtmp->INPmodType]->modelParms[j].dataType, tab, &err1); if(err1) { err2 = TMALLOC(char, 25 + strlen(name) + strlen(err1)); sprintf(err2, "MIF-ERROR - model: %s - %s\n", name, err1); return(err2); } error = ft_sim->setModelParm (ckt, modtmp->INPmodfast, ft_sim->devices[modtmp->INPmodType]->modelParms[j].id, val, NULL); if(error) return(INPerror(error)); break; } } /* gtri modification: processing of special parameter "level" removed */ if(j >= *(ft_sim->devices[modtmp->INPmodType]->numModelParms)) { //err has not been allocated, but free() in INPerrCat() // This did not allocate enough memory you wanker, K.A. replaced 5 March 2000 // temp = TMALLOC(char, 40 + strlen(parm)); temp = TMALLOC(char, 42 + strlen(parm));// K.A. replaced 5 March 2000 sprintf(temp, "MIF: unrecognized parameter (%s) - ignored\n", parm); fprintf(stdout, "%s", temp); err = TMALLOC(char, 2 * strlen(temp) + 2);// K.A. added 5 March 2000 *err = '\0';// K.A. added 5 March 2000 err = INPerrCat(err,temp); } FREE(parm); } /* end while end of line not reached */ modtmp->INPmodLine->error = err; } /* end if model parameters not processed yet */ *model = modtmp; return(NULL); } /* end if name matches */ } /* end for all models in modtab linked list */ /* didn't find model - ERROR - return NULL model */ *model = NULL; err = TMALLOC(char, 60 + strlen(name)); sprintf(err, " MIF-ERROR - unable to find definition of model %s\n",name); return(err); } ngspice-26/src/xspice/mif/miftrunc.c0000644000265600020320000001300612264261473017061 0ustar andreasadmin/*============================================================================ FILE MIFtrunc.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function called by SPICE to check truncation error of an integration state used by a code model. INTERFACES MIFtrunc() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" //#include "util.h" #include #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" /* #include "suffix.h" */ static void MIFterr(Mif_Intgr_t *intgr, CKTcircuit *ckt, double *timeStep); /* MIFtrunc This function is called by the CKTtrunc() driver function to check numerical integration truncation error of any integrals associated with instances of a particular code model type. It traverses all models of that type and all instances of each model. For each instance, it looks in the instance structure to determine if any variables allocated by cm_analog_alloc() have been used in a call to cm_analog_integrate(). If so, the truncation error of that integration is computed and used to set the maximum delta allowed for the current timestep. */ int MIFtrunc( GENmodel *inModel, /* The head of the model list */ CKTcircuit *ckt, /* The circuit structure */ double *timeStep) /* The timestep delta */ { MIFmodel *model; MIFinstance *here; int i; /* Setup for access into MIF specific model data */ model = (MIFmodel *) inModel; /* loop through all models of this type */ for( ; model != NULL; model = model->MIFnextModel) { /* Loop through all instances of this model */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { /* Loop through all integration states on the instance */ for(i = 0; i < here->num_intgr; i++) { /* Limit timeStep according to truncation error */ MIFterr(&(here->intgr[i]), ckt, timeStep); } /* end for number of integration states */ } /* end for all instances */ } /* end for all models of this type */ return(OK); } /* * Copyright (c) 1985 Thomas L. Quarles * * This is a modified version of the function CKTterr(). It limits * timeStep according to computed truncation error. * * Modifications are Copyright 1991 Georgia Tech Research Institute * */ static void MIFterr( Mif_Intgr_t *intgr, CKTcircuit *ckt, double *timeStep) { double volttol; double chargetol; double tol; double del; double diff[8]; double deltmp[8]; double factor; int i; int j; static double gearCoeff[] = { .5, .2222222222, .1363636364, .096, .07299270073, .05830903790 }; static double trapCoeff[] = { .5, .08333333333 }; /* Define new local variables. Dimension = number of states in ckt struct */ char *byte_aligned_state_ptr; double *state_ptr[8]; /* Set state pointers to the (possibly byte-aligned) states */ for(i = 0; i < 8; i++) { byte_aligned_state_ptr = (char *) ckt->CKTstates[i]; byte_aligned_state_ptr += intgr->byte_index; state_ptr[i] = (double *) byte_aligned_state_ptr; } /* Modify computation of volttol to not include current from previous timestep */ /* which is unavailable in this implementation. Note that this makes the */ /* the overall trunction error timestep smaller (which is better accuracy) */ /* Old code */ /* volttol = ckt->CKTabstol + ckt->CKTreltol * MAX( fabs(ckt->CKTstate0[ccap]), fabs(ckt->CKTstate1[ccap])); */ /* New code */ volttol = ckt->CKTabstol + ckt->CKTreltol * fabs(*(state_ptr[0]) - *(state_ptr[1])) / ckt->CKTdelta; /* Modify remaining references to qcap to access byte-aligned MIF state */ /* Otherwise, remaining code is same as SPICE3C1 ... */ chargetol = MAX(fabs(*(state_ptr[0])),fabs(*(state_ptr[1]))); chargetol = ckt->CKTreltol * MAX(chargetol,ckt->CKTchgtol)/ckt->CKTdelta; tol = MAX(volttol,chargetol); /* now divided differences */ for(i=ckt->CKTorder+1;i>=0;i--) { diff[i] = *(state_ptr[i]); } for(i=0 ; i <= ckt->CKTorder ; i++) { deltmp[i] = ckt->CKTdeltaOld[i]; } j = ckt->CKTorder; for (;;) { for(i=0;i <= j;i++) { diff[i] = (diff[i] - diff[i+1])/deltmp[i]; } if (--j < 0) break; for(i=0;i <= j;i++) { deltmp[i] = deltmp[i+1] + ckt->CKTdeltaOld[i]; } } switch(ckt->CKTintegrateMethod) { case GEAR: default: factor = gearCoeff[ckt->CKTorder-1]; break; case TRAPEZOIDAL: factor = trapCoeff[ckt->CKTorder - 1] ; break; } del = ckt->CKTtrtol * tol/MAX(ckt->CKTabstol,factor * fabs(diff[0])); if(ckt->CKTorder == 2) { del = sqrt(del); } else if (ckt->CKTorder > 2) { del = exp(log(del)/ckt->CKTorder); } *timeStep = MIN(*timeStep,del); return; } ngspice-26/src/xspice/mif/mifload.c0000644000265600020320000010544212264261473016653 0ustar andreasadmin/*============================================================================ FILE MIFload.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the driver function for calling code model evaluation functions. This is one of the most important, complex, and often called functions in the model interface package. It iterates through all models and all instances of a specified code model device type, fills in the inputs for the model, calls the model, and then uses the outputs and partials returned by the model to load the matrix. INTERFACES MIFload() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include #include #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" #include "ngspice/mif.h" #include "ngspice/enh.h" #include "ngspice/cm.h" /* #include "suffix.h" */ static void MIFauto_partial( MIFinstance *here, void (*cm_func) (Mif_Private_t *), Mif_Private_t *cm_data ); /* MIFload This function is called by the CKTload() driver function to call the C function for each instance of a code model type. It loops through all models of that type and all instances of each model. For each instance, it prepares the structure that is passed to the code model by filling it with the input values for that instance. The code model's C function is then called, and the outputs and partial derivatives computed by the C function are used to fill the matrix for the next solution attempt. */ int MIFload( GENmodel *inModel, /* The head of the model list */ CKTcircuit *ckt) /* The circuit structure */ { MIFmodel *model; MIFinstance *here; Mif_Private_t cm_data; /* data to be passed to/from code model */ Mif_Port_Type_t type; Mif_Port_Data_t *fast; Mif_Smp_Ptr_t *smp_data_out; Mif_Port_Ptr_t *smp_ptr; Mif_Port_Type_t in_type; Mif_Port_Type_t out_type; Mif_Boolean_t is_input; Mif_Boolean_t is_output; Mif_Cntl_Src_Type_t cntl_src_type; Mif_Analysis_t anal_type; Mif_Complex_t czero; Mif_Complex_t ac_gain; int mod_type; int num_conn; int num_port; int num_port_k; int i; int j; int k; int l; /*int tag;*/ double *rhs; double *rhsOld; double partial; double temp; double *double_ptr0; double *double_ptr1; /*double *input;*/ /* double *oldinput;*/ char *byte_ptr0; char *byte_ptr1; double last_input; double conv_limit; double cntl_input; Evt_Node_Data_t *node_data; /* Prepare a zero complex number for AC gain initializations */ czero.real = 0.0; czero.imag = 0.0; /* Setup for access into MIF specific model data */ model = (MIFmodel *) inModel; mod_type = model->MIFmodType; /* Setup pointers for fast access to rhs and rhsOld elements of ckt struct */ rhs = ckt->CKTrhs; rhsOld = ckt->CKTrhsOld; node_data = ckt->evt->data.node; /* *********************************************************************** */ /* Setup the circuit data in the structure to be passed to the code models */ /* *********************************************************************** */ /* anal_init is set if this is the first iteration at any step in */ /* an analysis */ if(!(ckt->CKTmode & MODEINITFLOAT)) g_mif_info.circuit.anal_init = MIF_TRUE; cm_data.circuit.anal_init = g_mif_info.circuit.anal_init; /* anal_type is determined by CKTload */ anal_type = g_mif_info.circuit.anal_type; cm_data.circuit.anal_type = anal_type; /* get the analysis freq from the ckt struct if this is an AC analysis */ /* otherwise, set the freq to zero */ if(anal_type == MIF_AC) cm_data.circuit.frequency = ckt->CKTomega; else cm_data.circuit.frequency = 0.0; /* get the analysis times from the ckt struct if this is a transient analysis */ /* otherwise, set the times to zero */ if(anal_type == MIF_TRAN) { cm_data.circuit.time = ckt->CKTtime; cm_data.circuit.t[0] = ckt->CKTtime; for(i = 1; i < 8; i++) { cm_data.circuit.t[i] = cm_data.circuit.t[i-1] - ckt->CKTdeltaOld[i-1]; if(cm_data.circuit.t[i] < 0.0) cm_data.circuit.t[i] = 0.0; } } else { cm_data.circuit.time = 0.0; for(i = 0; i < 8; i++) { cm_data.circuit.t[i] = 0.0; } } cm_data.circuit.call_type = MIF_ANALOG; cm_data.circuit.temperature = ckt->CKTtemp - 273.15; g_mif_info.circuit.call_type = MIF_ANALOG; g_mif_info.ckt = ckt; /* ***************************************************************** */ /* loop through all models of this type */ /* ***************************************************************** */ for( ; model != NULL; model = model->MIFnextModel) { /* If not an analog or hybrid model, continue to next */ if(! model->analog) continue; /* ***************************************************************** */ /* loop through all instances of this model */ /* ***************************************************************** */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { /* If not an analog or hybrid instance, continue to next */ if(! here->analog) continue; /* ***************************************************************** */ /* Prepare the data needed by the cm_.. functions */ /* ***************************************************************** */ g_mif_info.instance = here; g_mif_info.errmsg = ""; if(here->initialized) { cm_data.circuit.init = MIF_FALSE; g_mif_info.circuit.init = MIF_FALSE; } else { cm_data.circuit.init = MIF_TRUE; g_mif_info.circuit.init = MIF_TRUE; } /* ***************************************************************** */ /* if tran analysis and anal_init is true, copy state 1 to state 0 */ /* Otherwise the data in state 0 would be invalid */ /* ***************************************************************** */ if((anal_type == MIF_TRAN) && g_mif_info.circuit.anal_init) { for(i = 0; i < here->num_state; i++) { double_ptr0 = ckt->CKTstate0 + here->state[i].index; double_ptr1 = ckt->CKTstate1 + here->state[i].index; byte_ptr0 = (char *) double_ptr0; byte_ptr1 = (char *) double_ptr1; for(j = 0; j < here->state[i].bytes; j++) byte_ptr0[j] = byte_ptr1[j]; } } /* ***************************************************************** */ /* If not AC analysis, loop through all connections on this instance */ /* and load the input values for each input port of each connection */ /* ***************************************************************** */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* If AC analysis, skip getting input values. The input values */ /* should stay the same as they were at the last iteration of */ /* the operating point analysis */ if(anal_type == MIF_AC) break; /* if the connection is null, skip to next connection */ if(here->conn[i]->is_null) continue; /* if this connection is not an input, skip to next connection */ if(! here->conn[i]->is_input) continue; /* Get number of ports on this connection */ num_port = here->conn[i]->size; /* loop through all ports on this connection */ for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this port */ type = fast->type; /* If port type is Digital or User-Defined, we only need */ /* to get the total load. The input values are pointers */ /* already set by EVTsetup() */ if((type == MIF_DIGITAL) || (type == MIF_USER_DEFINED)) { fast->total_load = node_data->total_load[fast->evt_data.node_index]; } /* otherwise, it is an analog node and we get the input value */ else { /* load the input values based on type and mode */ if(ckt->CKTmode & MODEINITJCT) /* first iteration step for DC */ fast->input.rvalue = 0.0; else if((ckt->CKTmode & MODEINITTRAN) || (ckt->CKTmode & MODEINITPRED)) /* first iteration step at timepoint */ fast->input.rvalue = ckt->CKTstate1[fast->old_input]; else { /* subsequent iterations */ /* record last iteration's input value for convergence limiting */ last_input = fast->input.rvalue; /* get the new input value */ switch(type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: fast->input.rvalue = rhsOld[fast->smp_data.pos_node] - rhsOld[fast->smp_data.neg_node]; break; case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_VSOURCE_CURRENT: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: fast->input.rvalue = rhsOld[fast->smp_data.ibranch]; break; case MIF_DIGITAL: case MIF_USER_DEFINED: break; } /* end switch on type of port */ /* If convergence limiting enabled, limit maximum input change */ if(ckt->enh->conv_limit.enabled) { /* compute the maximum the input is allowed to change */ conv_limit = fabs(last_input) * ckt->enh->conv_limit.step; if(conv_limit < ckt->enh->conv_limit.abs_step) conv_limit = ckt->enh->conv_limit.abs_step; /* if input has changed too much, limit it and signal not converged */ if(fabs(fast->input.rvalue - last_input) > conv_limit) { if((fast->input.rvalue - last_input) > 0.0) fast->input.rvalue = last_input + conv_limit; else fast->input.rvalue = last_input - conv_limit; (ckt->CKTnoncon)++; /* report convergence problem if last call */ if(ckt->enh->conv_debug.report_conv_probs) { ENHreport_conv_prob(ENH_ANALOG_INSTANCE, here->MIFname, ""); } } } } /* end else */ /* Save value of input for use with MODEINITTRAN */ ckt->CKTstate0[fast->old_input] = fast->input.rvalue; } /* end else analog type */ } /* end for number of ports */ } /* end for number of connections */ /* ***************************************************************** */ /* loop through all connections on this instance and zero out all */ /* outputs/partials/AC gains for each output port of each connection */ /* ***************************************************************** */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* if the connection is null or is not an output */ /* skip to next connection */ if(here->conn[i]->is_null || (! here->conn[i]->is_output)) continue; /* loop through all ports on this connection */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this port */ type = fast->type; /* If not an analog node, continue to next port */ if((type == MIF_DIGITAL) || (type == MIF_USER_DEFINED)) continue; /* initialize the output to zero */ fast->output.rvalue = 0.0; /* loop through all connections and ports that */ /* could be inputs for this port and zero the partials */ for(k = 0; k < num_conn; k++) { if(here->conn[k]->is_null || (! here->conn[k]->is_input)) continue; num_port_k = here->conn[k]->size; for(l = 0; l < num_port_k; l++) { /* skip if this port is null */ if(here->conn[k]->port[l]->is_null) continue; fast->partial[k].port[l] = 0.0; fast->ac_gain[k].port[l] = czero; } /* end for number of ports */ } /* end for number of connections */ } /* end for number of ports */ } /* end for number of connections */ /* ***************************************************************** */ /* Prepare the structure to be passed to the code model */ /* ***************************************************************** */ cm_data.num_conn = here->num_conn; cm_data.conn = here->conn; cm_data.num_param = here->num_param; cm_data.param = here->param; cm_data.num_inst_var = here->num_inst_var; cm_data.inst_var = here->inst_var; /* Initialize the auto_partial flag to false */ g_mif_info.auto_partial.local = MIF_FALSE; /* ******************* */ /* Call the code model */ /* ******************* */ DEVices[mod_type]->DEVpublic.cm_func (&cm_data); /* Automatically compute partials if requested by .options auto_partial */ /* or by model through call to cm_analog_auto_partial() in DC or TRAN analysis */ if((anal_type != MIF_AC) && (g_mif_info.auto_partial.global || g_mif_info.auto_partial.local)) MIFauto_partial(here, DEVices[mod_type]->DEVpublic.cm_func, &cm_data); /* ***************************************************************** */ /* Loop through all connections on this instance and */ /* load the data into the matrix for each output port */ /* and for each V source associated with a current input. */ /* For AC analysis, we only load the +-1s required to satisfy */ /* KCL and KVL in the matrix equations. */ /* ***************************************************************** */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* if the connection is null, skip to next connection */ if(here->conn[i]->is_null) continue; /* prepare things for convenient access later */ is_input = here->conn[i]->is_input; is_output = here->conn[i]->is_output; /* loop through all ports on this connection */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this port */ type = fast->type; /* If not an analog node, continue to next port */ if((type == MIF_DIGITAL) || (type == MIF_USER_DEFINED)) continue; /* create a pointer to the smp data for quick access */ smp_data_out = &(fast->smp_data); /* if it is a current input */ /* load the matrix data needed for the associated zero-valued V source */ if(is_input && (type == MIF_CURRENT || type == MIF_DIFF_CURRENT)) { *(smp_data_out->pos_ibranch) += 1.0; *(smp_data_out->neg_ibranch) -= 1.0; *(smp_data_out->ibranch_pos) += 1.0; *(smp_data_out->ibranch_neg) -= 1.0; /* rhs[smp_data_out->ibranch] += 0.0; */ } /* end if current input */ /* if it has a voltage source output, */ /* load the matrix with the V source output data */ if( (is_output && (type == MIF_VOLTAGE || type == MIF_DIFF_VOLTAGE)) || (type == MIF_RESISTANCE || type == MIF_DIFF_RESISTANCE) ) { *(smp_data_out->pos_branch) += 1.0; *(smp_data_out->neg_branch) -= 1.0; *(smp_data_out->branch_pos) += 1.0; *(smp_data_out->branch_neg) -= 1.0; if(anal_type != MIF_AC) rhs[smp_data_out->branch] += fast->output.rvalue; } /* end if V source output */ /* if it has a current source output, */ /* load the matrix with the V source output data */ if( (is_output && (type == MIF_CURRENT || type == MIF_DIFF_CURRENT)) || (type == MIF_CONDUCTANCE || type == MIF_DIFF_CONDUCTANCE) ) { if(anal_type != MIF_AC) { rhs[smp_data_out->pos_node] -= fast->output.rvalue; rhs[smp_data_out->neg_node] += fast->output.rvalue; } } /* end if current output */ } /* end for number of ports */ } /* end for number of connections */ /* ***************************************************************** */ /* loop through all output connections on this instance and */ /* load the partials/AC gains into the matrix */ /* ***************************************************************** */ for(i = 0; i < num_conn; i++) { /* if the connection is null or is not an output */ /* skip to next connection */ if((here->conn[i]->is_null) || (! here->conn[i]->is_output)) continue; /* loop through all ports on this connection */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this output port */ out_type = fast->type; /* If not an analog node, continue to next port */ if((out_type == MIF_DIGITAL) || (out_type == MIF_USER_DEFINED)) continue; /* create a pointer to the smp data for quick access */ smp_data_out = &(fast->smp_data); /* for this port, loop through all connections */ /* and all ports to touch on each possible input */ for(k = 0; k < num_conn; k++) { /* if the connection is null or is not an input */ /* skip to next connection */ if((here->conn[k]->is_null) || (! here->conn[k]->is_input)) continue; num_port_k = here->conn[k]->size; /* loop through all the ports of this connection */ for(l = 0; l < num_port_k; l++) { /* skip if this port is null */ if(here->conn[k]->port[l]->is_null) continue; /* determine the type of this input port */ in_type = here->conn[k]->port[l]->type; /* If not an analog node, continue to next port */ if((in_type == MIF_DIGITAL) || (in_type == MIF_USER_DEFINED)) continue; /* get the partial to local variable for fast access */ partial = fast->partial[k].port[l]; ac_gain = fast->ac_gain[k].port[l]; /* create a pointer to the matrix pointer data for quick access */ smp_ptr = &(smp_data_out->input[k].port[l]); /* get the input value */ cntl_input = here->conn[k]->port[l]->input.rvalue; /* determine type of controlled source according */ /* to input and output types */ cntl_src_type = MIFget_cntl_src_type(in_type, out_type); switch(cntl_src_type) { case MIF_VCVS: if(anal_type == MIF_AC) { smp_ptr->e.branch_poscntl[0] -= ac_gain.real; smp_ptr->e.branch_negcntl[0] += ac_gain.real; smp_ptr->e.branch_poscntl[1] -= ac_gain.imag; smp_ptr->e.branch_negcntl[1] += ac_gain.imag; } else { smp_ptr->e.branch_poscntl[0] -= partial; smp_ptr->e.branch_negcntl[0] += partial; rhs[smp_data_out->branch] -= partial * cntl_input; } break; case MIF_ICIS: if(anal_type == MIF_AC) { smp_ptr->f.pos_ibranchcntl[0] += ac_gain.real; smp_ptr->f.neg_ibranchcntl[0] -= ac_gain.real; smp_ptr->f.pos_ibranchcntl[1] += ac_gain.imag; smp_ptr->f.neg_ibranchcntl[1] -= ac_gain.imag; } else { smp_ptr->f.pos_ibranchcntl[0] += partial; smp_ptr->f.neg_ibranchcntl[0] -= partial; temp = partial * cntl_input; rhs[smp_data_out->pos_node] += temp; rhs[smp_data_out->neg_node] -= temp; } break; case MIF_VCIS: if(anal_type == MIF_AC) { smp_ptr->g.pos_poscntl[0] += ac_gain.real; smp_ptr->g.pos_negcntl[0] -= ac_gain.real; smp_ptr->g.neg_poscntl[0] -= ac_gain.real; smp_ptr->g.neg_negcntl[0] += ac_gain.real; smp_ptr->g.pos_poscntl[1] += ac_gain.imag; smp_ptr->g.pos_negcntl[1] -= ac_gain.imag; smp_ptr->g.neg_poscntl[1] -= ac_gain.imag; smp_ptr->g.neg_negcntl[1] += ac_gain.imag; } else { smp_ptr->g.pos_poscntl[0] += partial; smp_ptr->g.pos_negcntl[0] -= partial; smp_ptr->g.neg_poscntl[0] -= partial; smp_ptr->g.neg_negcntl[0] += partial; temp = partial * cntl_input; rhs[smp_data_out->pos_node] += temp; rhs[smp_data_out->neg_node] -= temp; } break; case MIF_ICVS: if(anal_type == MIF_AC) { smp_ptr->h.branch_ibranchcntl[0] -= ac_gain.real; smp_ptr->h.branch_ibranchcntl[1] -= ac_gain.imag; } else { smp_ptr->h.branch_ibranchcntl[0] -= partial; rhs[smp_data_out->branch] -= partial * cntl_input; } break; case MIF_minus_one: break; } /* end switch on controlled source type */ } /* end for number of input ports */ } /* end for number of input connections */ } /* end for number of output ports */ } /* end for number of output connections */ here->initialized = MIF_TRUE; } /* end for all instances */ } /* end for all models */ return(OK); } /* MIFauto_partial This function is called by MIFload() when a code model requests that partial derivatives be computed automatically. It calls the code model additional times with an individual input to the model varied by a small amount at each call. Partial derivatives of each output with respect to the varied input are then computed by divided differences. */ static void MIFauto_partial( MIFinstance *here, /* The instance structure */ void (*cm_func) (Mif_Private_t *), /* The code model function to be called */ Mif_Private_t *cm_data) /* The data to be passed to the code model */ { Mif_Port_Data_t *fast; Mif_Port_Data_t *out_fast; Mif_Port_Type_t type; Mif_Port_Type_t out_type; int num_conn; int num_port; int num_port_k; int i; int j; int k; int l; double epsilon; double nominal_input; /* Reset init and anal_init flags before making additional calls */ /* to the model */ cm_data->circuit.init = MIF_FALSE; g_mif_info.circuit.init = MIF_FALSE; cm_data->circuit.anal_init = MIF_FALSE; g_mif_info.circuit.anal_init = MIF_FALSE; /* *************************** */ /* Save nominal analog outputs */ /* *************************** */ /* loop through all connections */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* if the connection is null or is not an output */ /* skip to next connection */ if(here->conn[i]->is_null || (! here->conn[i]->is_output)) continue; /* loop through all ports on this connection */ num_port = here->conn[i]->size; for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this port */ type = fast->type; /* If not an analog port, continue to next port */ if((type == MIF_DIGITAL) || (type == MIF_USER_DEFINED)) continue; /* copy the output for use in computing output deltas */ fast->nominal_output = fast->output.rvalue; } /* end for number of output ports */ } /* end for number of output connections */ /* ***************************************************************** */ /* Change each analog input by a small amount and call the model to */ /* compute new outputs. */ /* ***************************************************************** */ /* loop through all connections */ num_conn = here->num_conn; for(i = 0; i < num_conn; i++) { /* if the connection is null, skip to next connection */ if(here->conn[i]->is_null) continue; /* if this connection is not an input, skip to next connection */ if(! here->conn[i]->is_input) continue; /* Get number of ports on this connection */ num_port = here->conn[i]->size; /* loop through all ports on this connection */ for(j = 0; j < num_port; j++) { /*setup a pointer for fast access to port data */ fast = here->conn[i]->port[j]; /* skip if this port is null */ if(fast->is_null) continue; /* determine the type of this port */ type = fast->type; /* If port type is Digital or User-Defined, skip it */ if((type == MIF_DIGITAL) || (type == MIF_USER_DEFINED)) continue; /* otherwise, it is an analog port and we need to perturb it and */ /* then call the model */ /* compute the perturbation amount depending on type of input */ switch(type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: epsilon = 1.0e-6; break; case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_VSOURCE_CURRENT: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: epsilon = 1.0e-12; break; default: printf("INTERNAL ERROR - MIFauto_partial. Invalid port type\n"); epsilon = 1.0e-30; break; } /* end switch on type of port */ /* record and perturb input value */ nominal_input = fast->input.rvalue; fast->input.rvalue += epsilon; /* call model to compute new outputs */ cm_func (cm_data); /* ******************************************************* */ /* Compute the partials of each output with respect to the */ /* perturbed input by divided differences. */ /* ******************************************************* */ /* loop through all analog output connections */ for(k = 0; k < num_conn; k++) { /* if the connection is null or is not an output */ /* skip to next connection */ if((here->conn[k]->is_null) || (! here->conn[k]->is_output)) continue; /* loop through all the ports of this connection */ num_port_k = here->conn[k]->size; for(l = 0; l < num_port_k; l++) { /*setup a pointer for out_fast access to port data */ out_fast = here->conn[k]->port[l]; /* skip if this port is null */ if(out_fast->is_null) continue; /* determine the out_type of this port */ out_type = out_fast->type; /* If port type is Digital or User-Defined, skip it */ if((out_type == MIF_DIGITAL) || (out_type == MIF_USER_DEFINED)) continue; /* compute partial by divided differences */ out_fast->partial[i].port[j] = (out_fast->output.rvalue - out_fast->nominal_output) / epsilon; /* zero the output in preparation for next call */ out_fast->output.rvalue = 0.0; } /* end for number of output ports */ } /* end for number of output connections */ /* restore nominal input value */ fast->input.rvalue = nominal_input; } /* end for number of input ports */ } /* end for number of input connections */ /* *************************************************** */ /* Call model one last time to recompute nominal case. */ /* *************************************************** */ /* This is needed even though the outputs are recorded, because */ /* the model may compute other state values that cannot be restored */ /* to the nominal condition from here */ cm_func (cm_data); } ngspice-26/src/xspice/mif/mif.c0000644000265600020320000000206412264261473016007 0ustar andreasadmin/*============================================================================ FILE MIF.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file allocates globals used by various packages, including MIF. INTERFACES g_mif_info REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/mif.h" int MIFiSize = sizeof(MIFinstance); int MIFmSize = sizeof(MIFmodel); /* Allocate global used to pass info on analysis type, etc. from */ /* SPICE to the MIF load routine */ /* This must be initialized so that EVTfindvec can check for */ /* NULL pointer in g_mif_info.ckt */ Mif_Info_t g_mif_info = { { MIF_FALSE, MIF_FALSE, MIF_DC, MIF_ANALOG, 0.0,}, NULL, NULL, NULL, { 0.0, 0.0,}, { MIF_FALSE, MIF_FALSE,}, }; ngspice-26/src/xspice/mif/mifdestr.c0000644000265600020320000000252712264261473017055 0ustar andreasadmin/*============================================================================ FILE MIFdestroy.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains a function that deletes all models of a particular device (code model) type from the circuit description structures. INTERFACES MIFdestroy() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include #include "ngspice/mifproto.h" /* #include "suffix.h" */ /* MIFdestroy This function deletes all models and all instances of a specified device type. It traverses the linked list of model structures for that type and calls MIFmDelete on each model. */ void MIFdestroy( GENmodel **inModel) /* The head of the list of models to delete */ { /* Free all models of this device type by removing */ /* models from the head of the linked list until */ /* the head is null */ while(*inModel) { MIFmDelete(inModel, (*inModel)->GENmodName, *inModel); } } ngspice-26/src/xspice/mif/mifmdelete.c0000644000265600020320000000532712264261473017354 0ustar andreasadmin/*============================================================================ FILE MIFmDelete.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function called by SPICE to delete a model structure and all instances of that model. INTERFACES MIFmDelete() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include //#include "util.h" #include "ngspice/sperror.h" #include "ngspice/gendefs.h" #include "ngspice/mifproto.h" #include "ngspice/mifdefs.h" /* #include "suffix.h" */ /* MIFmDelete This function deletes a particular model defined by a .model card from the linked list of model structures of a particular code model type, freeing all dynamically allocated memory used by the model structure. It calls MIFdelete as needed to delete all instances of the specified model. */ int MIFmDelete( GENmodel **inModel, /* The head of the model list */ IFuid modname, /* The name of the model to delete */ GENmodel *kill /* The model structure to be deleted */ ) { MIFmodel **model; MIFmodel *modfast; MIFmodel **oldmod; MIFmodel *here=NULL; Mif_Boolean_t found; int i; /* Convert the generic pointers to MIF specific pointers */ model = (MIFmodel **) inModel; modfast = (MIFmodel *) kill; /* Locate the model by name or pointer and cut it out of the list */ oldmod = model; for(found = MIF_FALSE; *model; model = &((*model)->MIFnextModel)) { if( (*model)->MIFmodName == modname || (modfast && *model == modfast) ) { here = *model; *oldmod = (*model)->MIFnextModel; found = MIF_TRUE; break; } oldmod = model; } if(! found) return(E_NOMOD); /* Free the instances under this model if any */ /* by removing from the head of the linked list */ /* until the head is null */ while(here->MIFinstances) { MIFdelete((GENmodel *) here, here->MIFinstances->MIFname, (GENinstance **) &(here->MIFinstances)); } /* Free the model params stuff allocated in MIFget_mod */ for(i = 0; i < here->num_param; i++) { if(here->param[i]->element) FREE(here->param[i]->element); FREE(here->param[i]); } FREE(here->param); /* Free the model and return */ FREE(here); return(OK); } ngspice-26/src/xspice/mif/Makefile.am0000644000265600020320000000076212264261473017127 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libmifxsp.la libmifxsp_la_SOURCES = \ mif_inp2.c \ mifgetmod.c \ mifgetvalue.c \ mifload.c \ mifmpara.c \ mifsetup.c \ mifutil.c \ mifask.c \ mifmask.c \ miftrunc.c \ mifconvt.c \ mifdelete.c \ mifmdelete.c \ mifdestr.c \ mif.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/mif/Makefile.in0000644000265600020320000004243412264261541017136 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/mif DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmifxsp_la_LIBADD = am_libmifxsp_la_OBJECTS = mif_inp2.lo mifgetmod.lo mifgetvalue.lo \ mifload.lo mifmpara.lo mifsetup.lo mifutil.lo mifask.lo \ mifmask.lo miftrunc.lo mifconvt.lo mifdelete.lo mifmdelete.lo \ mifdestr.lo mif.lo libmifxsp_la_OBJECTS = $(am_libmifxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmifxsp_la_SOURCES) DIST_SOURCES = $(libmifxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmifxsp.la libmifxsp_la_SOURCES = \ mif_inp2.c \ mifgetmod.c \ mifgetvalue.c \ mifload.c \ mifmpara.c \ mifsetup.c \ mifutil.c \ mifask.c \ mifmask.c \ miftrunc.c \ mifconvt.c \ mifdelete.c \ mifmdelete.c \ mifdestr.c \ mif.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/mif/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/mif/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmifxsp.la: $(libmifxsp_la_OBJECTS) $(libmifxsp_la_DEPENDENCIES) $(EXTRA_libmifxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmifxsp_la_OBJECTS) $(libmifxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mif_inp2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifconvt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifdelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifdestr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifgetmod.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifgetvalue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifmask.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifmdelete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifmpara.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/miftrunc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mifutil.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/mif/mifconvt.c0000644000265600020320000000754012264261473017065 0ustar andreasadmin/*============================================================================ FILE MIFconvTest.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function used to check that internal states of a code model have converged. These internal states are typically integration states. INTERFACES MIFconvTest() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" //#include "util.h" #include "ngspice/devdefs.h" //#include "CONST.h" #include "ngspice/trandefs.h" #include #include "ngspice/mifproto.h" #include "ngspice/mifparse.h" #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" /* #include "suffix.h" */ /* MIFconvTest This function is called by the CKTconvTest() driver function to check convergence of any states owned by instances of a particular code model type. It loops through all models of that type and all instances of each model. For each instance, it looks in the instance structure to determine if any variables allocated by cm_analog_alloc() have been registered by a call to cm_analog_converge() to have their convergence tested. If so, the value of the function at the last iteration is compared with the value at the current iteration to see if it has converged to within the same delta amount used in node convergence checks (as defined by SPICE 3C1). */ int MIFconvTest( GENmodel *inModel, /* The head of the model list */ CKTcircuit *ckt) /* The circuit structure */ { MIFmodel *model; MIFinstance *here; int i; double value; double last_value; char *byte_aligned_double_ptr; double *double_ptr; double tol; Mif_Boolean_t gotone = MIF_FALSE; /* Setup for access into MIF specific model data */ model = (MIFmodel *) inModel; /* loop through all models of this type */ for( ; model != NULL; model = model->MIFnextModel) { /* Loop through all instances of this model */ for(here = model->MIFinstances; here != NULL; here = here->MIFnextInstance) { /* Loop through all items registered for convergence */ for(i = 0; i < here->num_conv; i++) { /* Get the current value and the last value */ byte_aligned_double_ptr = (char *) ckt->CKTstate0; byte_aligned_double_ptr += here->conv[i].byte_index; double_ptr = (double *) byte_aligned_double_ptr; value = *double_ptr; last_value = here->conv[i].last_value; /* If none have failed so far, check convergence */ if(! gotone) { tol = ckt->CKTreltol * MAX(fabs(value), fabs(last_value)) + ckt->CKTabstol; if (fabs(value - last_value) > tol) { if(ckt->enh->conv_debug.report_conv_probs) { ENHreport_conv_prob(ENH_ANALOG_INSTANCE, here->MIFname, ""); } ckt->CKTnoncon++; gotone = MIF_TRUE; } } /* Rotate the current value to last_value */ here->conv[i].last_value = value; } /* end for number of conv items */ } /* end for all instances */ } /* end for all models of this type */ return(OK); } ngspice-26/src/xspice/mif/mifask.c0000644000265600020320000001420112264261473016502 0ustar andreasadmin/*============================================================================ FILE MIFask.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the function used by nutmeg to request the value of a code model static var. INTERFACES MIFask() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" #include //#include "CONST.h" //#include "util.h" #include "ngspice/ifsim.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include #include "ngspice/mifproto.h" #include "ngspice/mifdefs.h" /* #include "suffix.h" */ /* MIFask This function is called by SPICE/Nutmeg to query the value of a parameter on an instance. It locates the value of the parameter in the instance structure and converts the value into the IFvalue structure understood by Nutmeg. For code models, this function is provided to allow output of Instance Variables defined in the code model's Interface Specification. */ int MIFask( CKTcircuit *ckt, /* The circuit structure */ GENinstance *inInst, /* The instance to get the value from */ int which, /* The parameter to get */ IFvalue *value, /* The value returned */ IFvalue *select) /* Unused */ { MIFinstance *inst; MIFmodel *model; int mod_type; int value_type; int i; int size; int inst_index; Mif_Boolean_t is_array; NG_IGNORE(ckt); NG_IGNORE(select); /* Arrange for access to MIF specific data in the instance */ inst = (MIFinstance *) inInst; /* Arrange for access to MIF specific data in the model */ model = inst->MIFmodPtr; /* Get model type */ mod_type = model->MIFmodType; if((mod_type < 0) || (mod_type >= DEVmaxnum)) return(E_BADPARM); /* Adjust parameter tag to actual index into inst info array */ inst_index = which - model->num_param; /* Check instance index for validity */ if((inst_index < 0) || (inst_index >= inst->num_inst_var)) return(E_BADPARM); /* get value type to know which members of unions to access */ value_type = DEVices[mod_type]->DEVpublic.instanceParms[inst_index].dataType; value_type &= IF_VARTYPES; /* determine if the parameter is an array or not */ is_array = value_type & IF_VECTOR; /* Transfer the values to the SPICE3C1 value union from the param elements */ /* This is analagous to what SPICE3 does with other device types */ if(! is_array) { switch(value_type) { case IF_FLAG: value->iValue = inst->inst_var[inst_index]->element[0].bvalue; break; case IF_INTEGER: value->iValue = inst->inst_var[inst_index]->element[0].ivalue; break; case IF_REAL: value->rValue = inst->inst_var[inst_index]->element[0].rvalue; break; case IF_STRING: /* Make copy of string. We don't trust caller to not free it */ /* These copies could get expensive! */ value->sValue = MIFcopy(inst->inst_var[inst_index]->element[0].svalue); break; case IF_COMPLEX: /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ value->cValue.real = inst->inst_var[inst_index]->element[0].cvalue.real; value->cValue.imag = inst->inst_var[inst_index]->element[0].cvalue.imag; break; default: return(E_BADPARM); } } else { /* it is an array */ size = inst->inst_var[inst_index]->size; if(size < 0) size = 0; value->v.numValue = size; switch(value_type) { /* Note that we malloc space each time this function is called. */ /* This is what TRAask.c does, so we do it too, even though */ /* we don't know if it is ever freed... */ case IF_FLAGVEC: if(size <= 0) break; value->v.vec.iVec = TMALLOC(int, size); for(i = 0; i < size; i++) value->v.vec.iVec[i] = inst->inst_var[inst_index]->element[i].bvalue; break; case IF_INTVEC: if(size <= 0) break; value->v.vec.iVec = TMALLOC(int, size); for(i = 0; i < size; i++) value->v.vec.iVec[i] = inst->inst_var[inst_index]->element[i].ivalue; break; case IF_REALVEC: if(size <= 0) break; value->v.vec.rVec = TMALLOC(double, size); for(i = 0; i < size; i++) value->v.vec.rVec[i] = inst->inst_var[inst_index]->element[i].rvalue; break; case IF_STRINGVEC: if(size <= 0) break; value->v.vec.sVec = TMALLOC(char *, size); for(i = 0; i < size; i++) /* Make copy of string. We don't trust caller to not free it */ /* These copies could get expensive! */ value->v.vec.sVec[i] = MIFcopy(inst->inst_var[inst_index]->element[i].svalue); break; case IF_CPLXVEC: if(size <= 0) break; /* we don't trust the caller to have a parallel complex structure */ /* so copy the real and imaginary parts explicitly */ value->v.vec.cVec = TMALLOC(IFcomplex, size); for(i = 0; i < size; i++) { value->v.vec.cVec[i].real = inst->inst_var[inst_index]->element[i].cvalue.real; value->v.vec.cVec[i].imag = inst->inst_var[inst_index]->element[i].cvalue.imag; } break; default: return(E_BADPARM); } /* end switch */ } /* end else */ return(OK); } ngspice-26/src/xspice/mif/mifutil.c0000644000265600020320000001432212264261473016705 0ustar andreasadmin/*============================================================================ FILE MIFutil.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains various utility routines used by the MIF package. INTERFACES MIFgettok() MIFget_token() MIFget_cntl_src_type() MIFcopy() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /* #include "prefix.h" */ #include "ngspice/ngspice.h" //#include "util.h" #include "ngspice/cpstd.h" #include #include "ngspice/miftypes.h" #include "ngspice/mifproto.h" /* #include "suffix.h" */ /* MIFgettok Get the next token from the input string. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. MIFgettok treats ( and ) like whitespace. */ char *MIFgettok(char **s) { char *buf; /* temporary storage to copy token into */ char *ret_str; /* storage for returned string */ int i; /* allocate space big enough for the whole string */ buf = TMALLOC(char, strlen(*s) + 1); /* skip over any white space */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* isolate the next token */ switch(**s) { case '\0': FREE(buf); return(NULL); case '<': case '>': case '[': case ']': case '~': case '%': buf[0] = **s; buf[1] = '\0'; (*s)++; break; default: i = 0; /* if first character is a quote, read until the closing */ /* quote, or the end of string, discarding the quotes */ if(**s == '"') { (*s)++; while( (**s != '\0') && (**s != '"') ) { buf[i] = **s; i++; (*s)++; } if(**s == '"') (*s)++; } /* else, read until the next delimiter */ else { while( (**s != '\0') && (! ( isspace(**s) || (**s == '=') || (**s == '%') || (**s == '(') || (**s == ')') || (**s == ',') || (**s == '[') || (**s == ']') || (**s == '<') || (**s == '>') || (**s == '~') ) ) ) { buf[i] = **s; i++; (*s)++; } } buf[i] = '\0'; break; } /* skip over white space up to next token */ while(isspace(**s) || (**s == '=') || (**s == '(') || (**s == ')') || (**s == ',')) (*s)++; /* make a copy using only the space needed by the string length */ /* Changed from copy to MIFcopy by SDB on 6.22.2003 */ ret_str = MIFcopy(buf); FREE(buf); return(ret_str); } /* MIFget_token Get the next token from the input string together with its type. The input string pointer is advanced to the following token and the token from the input string is copied to malloced storage and a pointer to that storage is returned. The original input string is undisturbed. */ char *MIFget_token( char **s, /* The text line to get the token from */ Mif_Token_Type_t *type) /* The type of token found */ { char *ret_str; /* storage for returned string */ /* get the token from the input line */ ret_str = MIFgettok(s); /* if no next token, return */ if(ret_str == NULL) { *type = MIF_NO_TOK; return(NULL); } /* else, determine and return token type */ switch(*ret_str) { case '[': *type = MIF_LARRAY_TOK; break; case ']': *type = MIF_RARRAY_TOK; break; case '<': *type = MIF_LCOMPLEX_TOK; break; case '>': *type = MIF_RCOMPLEX_TOK; break; case '%': *type = MIF_PERCENT_TOK; break; case '~': *type = MIF_TILDE_TOK; break; default: if(strcmp(ret_str, "null") == 0) *type = MIF_NULL_TOK; else *type = MIF_STRING_TOK; break; } return(ret_str); } /* MIFget_cntl_src_type This function takes an input connection/port type and an output connection/port type (MIF_VOLTAGE, MIF_CURRENT, etc.) and maps this pair to one of the four controlled source types used in SPICE (VCVS, VCIS, ICVS, ICIS). */ Mif_Cntl_Src_Type_t MIFget_cntl_src_type( Mif_Port_Type_t in_port_type, /* The type of the input port */ Mif_Port_Type_t out_port_type) /* The type of the output port */ { switch(in_port_type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: switch(out_port_type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: return(MIF_VCVS); break; case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: return(MIF_VCIS); break; default: break; } break; case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_VSOURCE_CURRENT: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: switch(out_port_type) { case MIF_VOLTAGE: case MIF_DIFF_VOLTAGE: case MIF_RESISTANCE: case MIF_DIFF_RESISTANCE: return(MIF_ICVS); break; case MIF_CURRENT: case MIF_DIFF_CURRENT: case MIF_CONDUCTANCE: case MIF_DIFF_CONDUCTANCE: return(MIF_ICIS); break; default: break; } break; default: break; } return(MIF_minus_one); } /* MIFcopy This function allocates a new copy of a string. */ char *MIFcopy(char *str) { if(str) return copy(str); else return NULL; } ngspice-26/src/xspice/ipc/0000755000265600020320000000000012264261712015062 5ustar andreasadminngspice-26/src/xspice/ipc/ipc.c0000644000265600020320000006252012264261473016012 0ustar andreasadmin/*============================================================================ FILE IPC.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS 6/13/92 Bill Kuhn Added some comments SUMMARY Provides compatibility for the new SPICE simulator to both the MSPICE user interface and BCP (via ATESSE v.1 style AEGIS mailboxes) and the new ATESSE v.2 Simulator Interface and BCP (via Bsd Sockets). The Interprocess Communications package provides functions called to receive XSPICE decks from the ATESSE Simulator Interface or Batch Control processes, and to return results to those processes. Functions callable from the simulator packages include: ipc_initialize_server ipc_terminate_server ipc_get_line ipc_send_line ipc_send_data_prefix ipc_send_data_suffix ipc_send_dcop_prefix ipc_send_dcop_suffix ipc_send_evtdict_prefix ipc_send_evtdict_suffix ipc_send_evtdata_prefix ipc_send_evtdata_suffix ipc_send_errchk ipc_send_end ipc_send_boolean ipc_send_int ipc_send_double ipc_send_complex ipc_send_event ipc_flush These functions communicate with a set of transport-level functions that implement the interprocess communications under one of the following protocol types determined by a compile-time option: BSD UNIX Sockets HP/Apollo Mailboxes For each transport protocol, the following functions are written: ipc_transport_initialize_server ipc_transport_get_line ipc_transport_terminate_server ipc_transport_send_line ============================================================================*/ #include "ngspice/ngspice.h" #include #include "ngspice/memory.h" /* NOTE: I think this is a Sys5ism (there is not man * page for it under Bsd, but it's in /usr/include * and it has a BSD copyright header. Go figure. */ #include "ngspice/ipc.h" #include "ngspice/ipctiein.h" #include "ngspice/ipcproto.h" /* * Conditional compilation sanity check: */ #if !defined (IPC_AEGIS_MAILBOXES) && !defined (IPC_UNIX_SOCKETS)\ && !defined (IPC_DEBUG_VIA_STDIO) " compiler error - must specify a transport mechanism"; #endif /* * static 'globals' */ /* typedef unsigned char Buffer_Char_t; */ typedef char Buffer_Char_t; #define OUT_BUFFER_SIZE 1000 #define MAX_NUM_RECORDS 200 static int end_of_record_index [MAX_NUM_RECORDS]; static int num_records; static Buffer_Char_t out_buffer [OUT_BUFFER_SIZE]; static int fill_count; static Ipc_Mode_t mode; static Ipc_Protocol_t protocol; static Ipc_Boolean_t end_of_deck_seen; static int batch_fd; #define FMT_BUFFER_SIZE 80 static char fmt_buffer [FMT_BUFFER_SIZE]; /*---------------------------------------------------------------------------*/ Ipc_Boolean_t kw_match (char *keyword, char *str) /* * returns IPC_TRUE if the first `strlen(keyword)' characters of `str' match * the ones in `keyword' - case sensitive */ { char *k = keyword; char *s = str; /* * quit if we run off the end of either string: */ while (*s && *k) { if (*s != *k) { return IPC_FALSE; } s++; k++; } /* * if we get this far, it sould be because we ran off the end of the * keyword else we didn't match: */ return (*k == '\0'); } /*---------------------------------------------------------------------------*/ /* ipc_initialize_server This function creates the interprocess communication channel server mailbox or socket. */ Ipc_Status_t ipc_initialize_server ( char *server_name, /* Mailbox path or host/portnumber pair */ Ipc_Mode_t m, /* Interactive or batch */ Ipc_Protocol_t p ) /* Type of IPC protocol */ /* * For mailboxes, `server_name' would be the mailbox pathname; for * sockets, this needs to be a host/portnumber pair. Maybe this should be * automatically generated by the routine... */ { Ipc_Status_t status; char batch_filename [1025]; mode = m; protocol = p; end_of_deck_seen = IPC_FALSE; num_records = 0; fill_count = 0; status = ipc_transport_initialize_server (server_name, m, p, batch_filename); if (status != IPC_STATUS_OK) { fprintf (stderr, "ERROR: IPC: error initializing server\n"); return IPC_STATUS_ERROR; } if (mode == IPC_MODE_BATCH) { #ifdef IPC_AEGIS_MAILBOXES strcat (batch_filename, ".log"); #endif batch_fd = open (batch_filename, O_WRONLY | O_CREAT, 0666); if (batch_fd < 0) { /* fprintf (stderr, "ERROR: IPC: Error opening batch output file: %s\n",batch_filename); */ perror ("IPC"); return IPC_STATUS_ERROR; } } return status; } /*---------------------------------------------------------------------------*/ /* ipc_terminate_server This function deallocates the interprocess communication channel mailbox or socket. */ Ipc_Status_t ipc_terminate_server (void) { return ipc_transport_terminate_server (); } /*---------------------------------------------------------------------------*/ /* ipc_get_line This function gets a SPICE deck input line from the interprocess communication channel. Any special control commands in the deck beginning with a ``>'' or ``#'' character are processed internally by this function and not returned to SPICE. */ Ipc_Status_t ipc_get_line ( char *str, /* Text retrieved from IPC channel */ int *len, /* Length of text string */ Ipc_Wait_t wait ) /* Select blocking or non-blocking */ /* * Reads one SPICE line from the connection. Strips any control lines * which cannot be interpretted by the simulator (e.g. >INQCON) and * processes them. If such a line is read, it is processed and the next * line is read. `ipc_get_line' does not return until a non-interceptable * line is read or end of file. * * If `wait' is IPC_NO_WAIT and there is no data available on the * connection, `ipc_get_line' returns IPC_STATUS_NO_DATA. If `wait' is * IPC_WAIT, `ipc_get_line' will not return until there is data available * or and end of file condition is reached or an error occurs. * * Intercepts and processes the following commands: * #RETURNI, #MINTIME, #VTRANS, * >PAUSE, >CONT, >STOP, >INQCON, >NETLIST, >ENDNET * Other > records are silently ignored. * * Intercepts old-style .TEMP card generated by MSPICE * * Returns: * IPC_STATUS_OK - for successful reads * IPC_STATUS_NO_DATA - when NO_WAIT and no data available * IPC_STATUS_END_OF_DECK - at end of deck (>ENDNET seen) * IPC_STATUS_ERROR - otherwise */ { Ipc_Status_t status; Ipc_Boolean_t need_another = IPC_TRUE; do { status = ipc_transport_get_line (str, len, wait); switch (status) { case IPC_STATUS_NO_DATA: case IPC_STATUS_ERROR: need_another = IPC_FALSE; break; case IPC_STATUS_END_OF_DECK: assert (0); /* should never get this from the low-level get-line */ status = IPC_STATUS_ERROR; need_another = IPC_FALSE; break; case IPC_STATUS_OK: /* * Got a good line - check to see if it's one of the ones we need to * intercept */ if (str[0] == '>') { if (kw_match (">STOP", str)) { ipc_handle_stop(); } else if (kw_match (">PAUSE", str)) { /* assert (need_another); */ /* * once more around the loop to do a blocking wait for the >CONT */ need_another = IPC_TRUE; wait = IPC_WAIT; } else if (kw_match (">INQCON", str)) { ipc_send_line (">ABRTABL"); ipc_send_line (">PAUSABL"); ipc_send_line (">KEEPABL"); status = ipc_flush (); if (IPC_STATUS_OK != status) { need_another = IPC_FALSE; } } else if (kw_match (">ENDNET", str)) { end_of_deck_seen = IPC_TRUE; need_another = IPC_FALSE; status = IPC_STATUS_END_OF_DECK; } else { /* silently ignore */ } } else if (str[0] == '#') { if (kw_match ("#RETURNI", str)) { ipc_handle_returni (); } else if (kw_match ("#MINTIME", str)) { double d1/*,d2*/; if (1 != sscanf (&str[8], "%lg", &d1)) { status = IPC_STATUS_ERROR; need_another = IPC_FALSE; } else { ipc_handle_mintime (d1); } } else if (kw_match ("#VTRANS", str)) { char *tok1; char *tok2; char *tok3; tok1 = &str[8]; for (tok2 = tok1; *tok2; tok2++) { if (isspace(*tok2)) { *tok2 = '\0'; tok2++; break; } } for(tok3 = tok2; *tok3; tok3++) { if(isspace(*tok3)) { *tok3 = '\0'; break; } } ipc_handle_vtrans (tok1, tok2); } else { /* silently ignore */ } } else if (str[0] == '.') { if (kw_match (".TEMP", str)) { /* don't pass .TEMP card to caller */ printf("Old-style .TEMP card found - ignored\n"); } else { /* pass all other . cards to the caller */ need_another = IPC_FALSE; } } else { /* * Not a '>' or '#' record - let the caller deal with it */ need_another = IPC_FALSE; } break; default: /* * some unknown status value! */ assert (0); status = IPC_STATUS_ERROR; need_another = IPC_FALSE; break; } } while (need_another); return status; } /*---------------------------------------------------------------------------*/ /* ipc_flush This function flushes the interprocess communication channel buffer contents. */ Ipc_Status_t ipc_flush (void) /* * Flush all buffered messages out the connection. */ { Ipc_Status_t status; int last = 0; /*int bytes;*/ int i; /* if batch mode */ if (mode == IPC_MODE_BATCH) { assert (batch_fd >= 0); /* for number of records in buffer */ for (i = 0; i < num_records; i++) { /* write the records to the .log file */ if ((end_of_record_index [i] - last) != write (batch_fd, &out_buffer[last], (size_t) (end_of_record_index [i] - last))) { /* fprintf (stderr,"ERROR: IPC: Error writing to batch output file\n"); */ perror ("IPC"); return IPC_STATUS_ERROR; } /* If the record is one of the batch simulation status messages, */ /* send it over the ipc channel too */ if( kw_match("#ERRCHK", &out_buffer[last]) || kw_match(">ENDANAL", &out_buffer[last]) || kw_match(">ABORTED", &out_buffer[last]) ) { status = ipc_transport_send_line (&out_buffer[last], end_of_record_index [i] - last); if (IPC_STATUS_OK != status) { return status; } } last = end_of_record_index [i]; } /* else, must be interactive mode */ } else { /* send the full buffer over the ipc channel */ status = ipc_transport_send_line (&out_buffer[0], end_of_record_index [num_records - 1]); if (IPC_STATUS_OK != status) { return status; } } /* reset counts to zero and return */ num_records = 0; fill_count = 0; return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ Ipc_Status_t ipc_send_line_binary ( char *str, int len ) /* * Same as `ipc_send_line' except does not expect the str to be null * terminated. Sends exactly `len' characters. Use this for binary data * strings that may have embedded nulls. * * Modified by wbk to append newlines for compatibility with * ATESSE 1.0 * */ { int length = len + 1; /*int diff;*/ Ipc_Status_t status; /* * If we can't add the whole str to the buffer, or if there are no more * record indices free, flush the buffer: */ if (((fill_count + length) >= OUT_BUFFER_SIZE) || (num_records >= MAX_NUM_RECORDS)) { status = ipc_flush (); if (IPC_STATUS_OK != status) { return status; } } /* * make sure that the str will fit: */ if (length + fill_count > OUT_BUFFER_SIZE) { /* fprintf (stderr,"ERROR: IPC: String too long to fit in output buffer (> %d bytes) - truncated\n",OUT_BUFFER_SIZE); */ length = OUT_BUFFER_SIZE - fill_count; } /* * finally, concatenate the str to the end of the buffer and add the newline: */ memcpy (&out_buffer[fill_count], str, (size_t) len); fill_count += len; out_buffer[fill_count] = '\n'; fill_count++; end_of_record_index [num_records++] = fill_count; return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ /* ipc_send_line This function sends a line of text over the interprocess communication channel. */ Ipc_Status_t ipc_send_line (char *str ) /* The text to send */ { int len; int send_len; char *s; Ipc_Status_t status= IPC_STATUS_OK; len = (int) strlen(str); /* if short string, send it immediately */ if(len < 80) status = ipc_send_line_binary (str, len); else { /* otherwise, we have to send it as multiple strings */ /* because Mspice cannot handle things longer than 80 chars */ s = str; while(len > 0) { if(len < 80) send_len = len; else send_len = 79; status = ipc_send_line_binary (str, send_len); if(status != IPC_STATUS_OK) break; s += send_len; len -= send_len; } } return(status); } /*---------------------------------------------------------------------------*/ /* ipc_send_data_prefix This function sends a ``>DATAB'' line over the interprocess communication channel to signal that this is the beginning of a results dump for the current analysis point. */ Ipc_Status_t ipc_send_data_prefix (double time ) /* The analysis point for this data set */ { char buffer[40]; sprintf (buffer, ">DATAB %.5E", time); return ipc_send_line (buffer); } /*---------------------------------------------------------------------------*/ /* ipc_send_data_suffix This function sends a ``>ENDDATA'' line over the interprocess communication channel to signal that this is the end of a results dump from a particular analysis point. */ Ipc_Status_t ipc_send_data_suffix (void) { Ipc_Status_t status; status = ipc_send_line (">ENDDATA"); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); } /*---------------------------------------------------------------------------*/ /* ipc_send_dcop_prefix This function sends a ``>DCOPB'' line over the interprocess communication channel to signal that this is the beginning of a results dump from a DC operating point analysis. */ Ipc_Status_t ipc_send_dcop_prefix (void) { return ipc_send_line (">DCOPB"); } /*---------------------------------------------------------------------------*/ /* ipc_send_dcop_suffix This function sends a ``>ENDDATA'' line over the interprocess communication channel to signal that this is the end of a results dump from a particular analysis point. */ Ipc_Status_t ipc_send_dcop_suffix (void) { Ipc_Status_t status; status = ipc_send_line (">ENDDCOP"); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); } /*---------------------------------------------------------------------------*/ /* ipc_send_evtdict_prefix This function sends a ``>EVTDICT'' line over the interprocess communication channel to signal that this is the beginning of an event-driven node dictionary. The line is sent only if the IPC is configured for UNIX sockets, indicating use with the V2 ATESSE SI process. */ Ipc_Status_t ipc_send_evtdict_prefix (void) { #ifdef IPC_AEGIS_MAILBOXES return IPC_STATUS_OK; #else return ipc_send_line (">EVTDICT"); #endif } /*---------------------------------------------------------------------------*/ /* ipc_send_evtdict_suffix This function sends a ``>ENDDICT'' line over the interprocess communication channel to signal that this is the end of an event-driven node dictionary. The line is sent only if the IPC is configured for UNIX sockets, indicating use with the V2 ATESSE SI process. */ Ipc_Status_t ipc_send_evtdict_suffix (void) { #ifdef IPC_AEGIS_MAILBOXES return IPC_STATUS_OK; #else Ipc_Status_t status; status = ipc_send_line (">ENDDICT"); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); #endif } /*---------------------------------------------------------------------------*/ /* ipc_send_evtdata_prefix This function sends a ``>EVTDATA'' line over the interprocess communication channel to signal that this is the beginning of an event-driven node data block. The line is sent only if the IPC is configured for UNIX sockets, indicating use with the V2 ATESSE SI process. */ Ipc_Status_t ipc_send_evtdata_prefix (void) { #ifdef IPC_AEGIS_MAILBOXES return IPC_STATUS_OK; #else return ipc_send_line (">EVTDATA"); #endif } /*---------------------------------------------------------------------------*/ /* ipc_send_evtdata_suffix This function sends a ``>ENDDATA'' line over the interprocess communication channel to signal that this is the end of an event-driven node data block. The line is sent only if the IPC is configured for UNIX sockets, indicating use with the V2 ATESSE SI process. */ Ipc_Status_t ipc_send_evtdata_suffix (void) { #ifdef IPC_AEGIS_MAILBOXES return IPC_STATUS_OK; #else Ipc_Status_t status; status = ipc_send_line (">ENDDATA"); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); #endif } /*---------------------------------------------------------------------------*/ /* ipc_send_errchk This function sends a ``\ERRCHK [GO|NOGO]'' message over the interprocess communication channel to signal that the initial parsing of the input deck has been completed and to indicate whether or not errors were detected. */ Ipc_Status_t ipc_send_errchk(void) { char str[IPC_MAX_LINE_LEN+1]; Ipc_Status_t status; if(g_ipc.errchk_sent) return(IPC_STATUS_OK); if(g_ipc.syntax_error) sprintf(str, "#ERRCHK NOGO"); else sprintf(str, "#ERRCHK GO"); g_ipc.errchk_sent = IPC_TRUE; status = ipc_send_line(str); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); } /*---------------------------------------------------------------------------*/ /* ipc_send_end This function sends either an ``>ENDANAL'' or an ``>ABORTED'' message over the interprocess communication channel together with the total CPU time used to indicate whether or not the simulation completed normally. */ Ipc_Status_t ipc_send_end(void) { char str[IPC_MAX_LINE_LEN+1]; Ipc_Status_t status; if(g_ipc.syntax_error || g_ipc.run_error) sprintf(str, ">ABORTED %.4f", g_ipc.cpu_time); else sprintf(str, ">ENDANAL %.4f", g_ipc.cpu_time); status = ipc_send_line(str); if(status != IPC_STATUS_OK) return(status); return(ipc_flush()); } /*---------------------------------------------------------------------------*/ int stuff_binary_v1 ( double d1, double d2, /* doubles to be stuffed */ int n, /* how many of d1, d2 ( 1 <= n <= 2 ) */ char *buf, /* buffer to stuff to */ int pos ) /* index at which to stuff */ { union { float float_val[2]; char ch[32]; } trick; int i, j; assert (protocol == IPC_PROTOCOL_V1); assert (sizeof(float) == 4); assert (sizeof(char) == 1); assert ((n >= 1) && (n <= 2)); trick.float_val[0] = (float)d1; if (n > 1) { trick.float_val[1] = (float)d2; } for (i = 0, j = pos; i < n * (int) sizeof(float); j++, i++) buf[j] = trick.ch[i]; buf[0] = (char) ('A' + j - 1); return j; } /*---------------------------------------------------------------------------*/ /* ipc_send_double This function sends a double data value over the interprocess communication channel preceded by a character string that identifies the simulation variable. */ Ipc_Status_t ipc_send_double ( char *tag, /* The node or instance */ double value ) /* The data value to send */ { int len = 0; switch (protocol) { case IPC_PROTOCOL_V1: strcpy (fmt_buffer, " "); /* save room for the length byte */ strcat (fmt_buffer, tag); strcat (fmt_buffer, " "); /* If talking to Mentor tools, must force upper case for Mspice 7.0 */ strtoupper(fmt_buffer); len = stuff_binary_v1 (value, 0.0, 1, fmt_buffer, (int) strlen(fmt_buffer)); break; case IPC_PROTOCOL_V2: break; } return ipc_send_line_binary (fmt_buffer, len); } /*---------------------------------------------------------------------------*/ /* ipc_send_complex This function sends a complex data value over the interprocess communication channel preceded by a character string that identifies the simulation variable. */ Ipc_Status_t ipc_send_complex ( char *tag, /* The node or instance */ Ipc_Complex_t value ) /* The data value to send */ { int len=0; switch (protocol) { case IPC_PROTOCOL_V1: strcpy (fmt_buffer, " "); /* save room for the length byte */ strcat (fmt_buffer, tag); strcat (fmt_buffer, " "); /* If talking to Mentor tools, must force upper case for Mspice 7.0 */ strtoupper(fmt_buffer); len = stuff_binary_v1 (value.real, value.imag, 2, fmt_buffer, (int) strlen(fmt_buffer)); break; case IPC_PROTOCOL_V2: break; } return ipc_send_line_binary (fmt_buffer, len); } /*---------------------------------------------------------------------------*/ /* ipc_send_event This function sends data from an event-driven node over the interprocess communication channel. The data is sent only if the IPC is configured for UNIX sockets, indicating use with the V2 ATESSE SI process. */ Ipc_Status_t ipc_send_event ( int ipc_index, /* Index used in EVTDICT */ double step, /* Analysis point or timestep (0.0 for DC) */ double plot_val, /* The value for plotting purposes */ char *print_val, /* The value for printing purposes */ void *ipc_val, /* The binary representation of the node data */ int len ) /* The length of the binary representation */ { #ifdef IPC_AEGIS_MAILBOXES return IPC_STATUS_OK; #else char buff[OUT_BUFFER_SIZE]; int i; int buff_len; char *buff_ptr; char *temp_ptr; float fvalue; /* Report error if size of data is too big for IPC channel block size */ if((len + (int) strlen(print_val) + 100) >= OUT_BUFFER_SIZE) { printf("ERROR - Size of event-driven data too large for IPC channel\n"); return IPC_STATUS_ERROR; } /* Place the index into the buffer with a trailing space */ sprintf(buff, "%d ", ipc_index); assert(sizeof(float) == 4); assert(sizeof(int) == 4); /* Put the analysis step bytes in */ buff_len = (int) strlen(buff); buff_ptr = buff + buff_len; fvalue = (float)step; temp_ptr = (char *) &fvalue; for(i = 0; i < 4; i++) { *buff_ptr = temp_ptr[i]; buff_ptr++; buff_len++; } /* Put the plot value in */ fvalue = (float)plot_val; temp_ptr = (char *) &fvalue; for(i = 0; i < 4; i++) { *buff_ptr = temp_ptr[i]; buff_ptr++; buff_len++; } /* Put the length of the binary representation in */ temp_ptr = (char *) &len; for(i = 0; i < 4; i++) { *buff_ptr = temp_ptr[i]; buff_ptr++; buff_len++; } /* Put the binary representation bytes in last */ temp_ptr = (char*) ipc_val; for(i = 0; i < len; i++) buff_ptr[i] = temp_ptr[i]; buff_ptr += len; buff_len += len; /* Put the print value in */ strcpy(buff_ptr, print_val); buff_ptr += strlen(print_val); buff_len += (int) strlen(print_val); /* Send the data to the IPC channel */ return ipc_send_line_binary(buff, buff_len); #endif } ngspice-26/src/xspice/ipc/ipcsockets.c0000644000265600020320000004715412264261473017414 0ustar andreasadmin/*============================================================================= FILE IPCsockets.c Copyright 1991 Georgia Tech Research Corporation, Atlanta, Georgia 30332 All Rights Reserved PROJECT ATESSE A-8503 AUTHOR Stefan Roth July 1991 MODIFICATIONS none SUMMARY Generic Interprocess Communication module Provides compatibility for the new SPICE simulator to both the MSPICE user interface and BCP (via ATESSE v.1 style AEGIS mailboxes) and the new ATESSE v.2 Simulator Interface and BCP (via BSD Sockets). This file contains the BSD sockets version. The Simulator is the server, while the SI and BCP will be the clients. INTERFACES FILE ROUTINE CALLED IPC.c ipc_get_line(); REFERENCED FILES Outputs to stderr. =============================================================================*/ /*============================================================================= DESCRIPTION OF FUNCTIONALITY: Outline of Initialize_Server function: create socket; bind name to socket; getsockname; listen; sock_state = IPC_SOCK_INITIALIZED; return ipc_get_line (); Format of a message line: bytes description ----- ------------------- 0 recognition character for beginning of line; value is BOL_CHAR. 1-4 message length (not including bytes 0-4); 32 bits in htonl format; if value = -1, then EOF and socket should be closed. 5-N+5 message body of length specified in bytes 1-4. The bytes before the message body are the message header. The header length is specified as SOCK_MSG_HDR_LEN bytes. Outline of Get_Line function: read 5 characters; verify that first char is BOL_CHAR; interpret message length (N) from bytes 1-4; do error checking on message header bytes; read N characters as message body; do error checking on message body read; Outline of Send_Line function: write BOL_CHAR; write 4-byte message body length write message body (N bytes) do error checking after each write operation Outline of Terminate_Server function: Continue to read lines (with ipc_transport_get_line) and ignore them until socket EOF is reached; Close the socket. =============================================================================*/ #include "ngspice/ngspice.h" #ifdef IPC_UNIX_SOCKETS /*=== INCLUDE FILES ===*/ #include #include #include "ngspice/ipc.h" #include "ngspice/ipctiein.h" /*=== TYPE DEFINITIONS ===*/ typedef enum { IPC_SOCK_UNINITIALIZED, IPC_SOCK_INITIALIZED, IPC_SOCK_CONNECTED_TO_CLIENT } Ipc_Sock_State_t; /*=== LOCAL VARIABLES ===*/ static int sock_desc; /* socket descriptor */ static int msg_stream; /* socket stream */ static Ipc_Sock_State_t sock_state = IPC_SOCK_UNINITIALIZED; /*=== INCLUDE FILES ===*/ #include "ngspice/ipcproto.h" /*============================================================================= FUNCTION ipc_transport_initialize_server AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Creates and opens the BSD socket of the server. Listens for requests by a client and then reads the first line message. INTERFACES Called by: (IPC.c) ipc_initialize_server(); RETURNED VALUE Ipc_Status_t - returns status of the socket connection. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ Ipc_Status_t ipc_transport_initialize_server ( char *server_name, /* not used */ Ipc_Mode_t mode, /* not used */ Ipc_Protocol_t protocol, /* IN - only used in assert */ char *batch_filename ) /* OUT - returns a value */ /* Note that unused parameters are required to maintain compatibility */ /* with version 1 (mailboxes) functions of the same names. */ { struct sockaddr_in server; /* Server specifications for socket*/ unsigned int server_length; /* Size of server structure */ int port_num; /* Port number converted from server_name */ NG_IGNORE(mode); NG_IGNORE(protocol); /* assert (protocol == IPC_PROTOCOL_V2); */ /* allow v1 protocol - wbk */ assert (sock_state == IPC_SOCK_UNINITIALIZED); /* convert server_name (from atesse_xspice invocation line) to a port */ /* number */ port_num = atoi(server_name); if((port_num > 0) && (port_num < 1024)) { /* Reserved port number */ perror ("ERROR: IPC Port numbers below 1024 are reserved"); sock_state = IPC_SOCK_UNINITIALIZED; return IPC_STATUS_ERROR; } sock_desc = socket (AF_INET, SOCK_STREAM, 0); if (sock_desc < 0) { /* Unsuccessful socket opening */ perror ("ERROR: IPC Creating socket"); sock_state = IPC_SOCK_UNINITIALIZED; return IPC_STATUS_ERROR; } /* Socket opened successfully */ server.sin_family = AF_INET; server.sin_addr.s_addr = INADDR_ANY; server.sin_port = SOCKET_PORT; server_length = sizeof (server); if (bind (sock_desc, (struct sockaddr *)&server, server_length) < 0) { fprintf (stderr, "ERROR: IPC: Bind unsuccessful\n"); perror ("ERROR: IPC"); sock_state = IPC_SOCK_UNINITIALIZED; return IPC_STATUS_ERROR; } if (getsockname (sock_desc, (struct sockaddr *)&server, &server_length) < 0) { fprintf (stderr, "ERROR: IPC: getting socket name\n"); perror ("ERROR: IPC"); sock_state = IPC_SOCK_UNINITIALIZED; return IPC_STATUS_ERROR; } fprintf (stderr, "Socket port %d.\n", ntohs(server.sin_port)); listen (sock_desc, 5); sock_state = IPC_SOCK_INITIALIZED; /* Socket ok to use now */ /* * First record is the name of the batch filename if we're in batch mode. */ if(g_ipc.mode == IPC_MODE_BATCH) { int len; return ipc_get_line (batch_filename, &len, IPC_WAIT); } /* Return success */ return IPC_STATUS_OK; } /* end ipc_transport_initialize_server */ /*============================================================================= FUNCTION bytes_to_integer AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Convert four bytes at START in the string STR to a 32-bit unsigned integer. The string is assumed to be in network byte order and the returned value is converted to host byte order (with ntohl). INTERFACES Local to this file. Called by: ipc_transport_get_line(); RETURNED VALUE u_long - unsigned 32 bit integer GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ static u_long bytes_to_integer ( char *str, /* IN - string that contains the bytes to convert */ int start ) /* IN - index into string where bytes are */ { u_long u; /* Value to be returned */ char buff[4]; /* Transfer str into buff to word align reqd data */ int index; /* Index into str and buff for transfer */ /* Get the str+start character and cast it into a u_long and put the value through the network-to-host-short converter and store it in the variable u. */ index = 0; while (index < (int) sizeof(u)) { buff[index] = str[index+start]; index++; } /* u = ntohl (*((u_long *) buff)); */ u = strtoul(buff, NULL, 10); return u; } /* end bytes_to_integer */ /*============================================================================= FUNCTION handle_socket_eof AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Do processing when the socket reaches EOF or when a message from the client states that EOF has been reached. INTERFACES Local to this file. Called by: ipc_transport_get_line(); RETURNED VALUE Ipc_Status_t - always IPC_STATUS_EOF GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ static Ipc_Status_t handle_socket_eof (void) { close (msg_stream); close (sock_desc); sock_state = IPC_SOCK_UNINITIALIZED; return IPC_STATUS_EOF; } /* handle_socket_eof */ /*============================================================================= FUNCTION read_sock AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Read N bytes from a socket. Only returns when the read had an error, when 0 bytes (EOF) could be read, or LENGTH bytes are read. INTERFACES Local to this file. Called by: ipc_transport_get_line(); RETURNED VALUE int - Returns the total number of bytes read. GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ static int read_sock ( int stream, /* IN - Socket stream */ char *buffer, /* OUT - buffer to store incoming data */ int length, /* IN - Number of bytes to be read */ Ipc_Wait_t wait, /* IN - type of read operation */ int flags ) /* IN - Original socket flags for blocking read */ { int count; /* Number of bytes read with last `read` */ int totalcount; /* total number of bytes read */ char *buf2; /* count = 0; */ /* while (count < length) { */ /* buffer[count] = 'x'; */ /* count++; */ /* } */ count = (int) read (stream, buffer, (size_t) length); if (wait == IPC_NO_WAIT) { fcntl (stream, F_SETFL, flags); /* Revert to blocking read */ } if ((count <= 0) || (count == length)) { /* If error or if read in reqd number of bytes: */ return count; } else { /* Only got some of the bytes requested */ totalcount = count; buf2 = &buffer[totalcount]; length = length - count; while (length > 0) { count = (int) read (stream, buf2, (size_t) length); if (count <= 0) /* EOF or read error */ break; totalcount = totalcount + count; buf2 = &buffer[totalcount]; length = length - count; } if (length != 0) { fprintf (stderr, "WARNING: READ_SOCK read %d bytes instead of %d\n", totalcount, totalcount + length); } return totalcount; } } /* end read_sock */ /*============================================================================= FUNCTION ipc_transport_get_line AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Main function for reading one line from a socket. Requires that the socket be open. Lines are mostly SPICE code, but commands may also be embedded in the socket data and they are interpreted by this function. Therefore, this function may cause the socket to be closed. INTERFACES Called by: ipc_transport_terminate_server(); (IPC.c) ipc_get_line(); RETURNED VALUE Ipc_Status_t - returns status of the read operation GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ Ipc_Status_t ipc_transport_get_line ( char *str, /* returns the result, null terminated */ int *len, /* length of str passed IN and passed OUT */ Ipc_Wait_t wait ) /* IN - wait or dont wait on incoming msg */ { int count = 0; /* number of bytes read */ int message_length; /* extracted from message header */ if (sock_state == IPC_SOCK_UNINITIALIZED) { fprintf (stderr, "ERROR: IPC: Attempted to read from uninitialized socket\n"); return IPC_STATUS_ERROR; } assert ((sock_state == IPC_SOCK_CONNECTED_TO_CLIENT) || (sock_state == IPC_SOCK_INITIALIZED)); if (sock_state == IPC_SOCK_INITIALIZED) { /* We have an open socket but have not connected to a client. */ /* Accept a connection from a client. */ msg_stream = accept (sock_desc, (struct sockaddr *)0, (unsigned int *)0); if (msg_stream == -1) { fprintf (stderr, "ERROR: IPC: Server accepting request\n"); perror ("ERROR: IPC"); return IPC_STATUS_ERROR; } sock_state = IPC_SOCK_CONNECTED_TO_CLIENT; } /*-----------------------------------------------------------------------*/ /* First read in the message header. */ { int flags; flags = fcntl(msg_stream, F_GETFL, NULL); /* Blocking read mode */ if (wait == IPC_WAIT) { /* Block here and wait for the next message */ count = read_sock (msg_stream, str, SOCK_MSG_HDR_LEN, wait, flags); if (count == 0) { /* EOF, will this ever happen? */ /* fprintf (stderr, "WARNING: IPC: Reached eof on socket\n"); */ return handle_socket_eof (); } } else if (wait == IPC_NO_WAIT) { /* Read message, but do not wait if none available. */ fcntl (msg_stream, F_SETFL, flags | O_NDELAY); count = read_sock (msg_stream, str, SOCK_MSG_HDR_LEN, wait, flags); if (count == 0) { /* EOF, will this ever happen? */ /* fprintf (stderr, "WARNING: IPC: Reached eof on socket\n"); */ return handle_socket_eof (); } else if (count == -1) { if (errno == EWOULDBLOCK) { return IPC_STATUS_NO_DATA; } } } else { /* Serious problem, since it is not reading anything. */ fprintf (stderr, "ERROR: IPC: invalid wait arg to ipc_transport_get_line\n"); } } /* Do more error checking on the read in values of the message header: */ if (count == -1) { fprintf (stderr, "ERROR: IPC: Reading from socket\n"); perror ("ERROR: IPC"); return IPC_STATUS_ERROR; } else if (str[0] != BOL_CHAR) { fprintf (stderr, "ERROR: IPC: Did not find beginning of message header (%c)\n", str[0]); return IPC_STATUS_ERROR; } else if ((message_length = (int) bytes_to_integer (str, 1)) == -1) { /* fprintf (stderr, "WARNING: IPC: Reached eof on socket\n"); */ return handle_socket_eof (); } else if (message_length == 0) { *len = 0; return IPC_STATUS_NO_DATA; /* Invalid test... delete - wbk } else if (message_length > *len) { fprintf (stderr, "ERROR: IPC: Buffer (%d) is too short for message (%d)\n", *len, message_length); return IPC_STATUS_ERROR; */ } /*-----------------------------------------------------------------------*/ /* Now read in the message body. */ /* Always block here since the message header was already read and */ /* we must get the body. */ *len = message_length; count = read_sock (msg_stream, str, message_length, IPC_WAIT, 0); if (count == 0) { /* EOF, will this ever happen? */ /* fprintf (stderr, */ /* "WARNING: IPC: Reached eof in message body on socket\n");*/ return handle_socket_eof (); } else if (count == -1) { fprintf (stderr, "ERROR: IPC: reading message body from socket\n"); perror ("ERROR: IPC"); return IPC_STATUS_ERROR; } /* Looks like we have a valid message here. Put in the string terminator. */ *len = count; str[count] = '\0'; return IPC_STATUS_OK; } /* end ipc_transport_get_line */ /*============================================================================= FUNCTION ipc_transport_send_line AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY Send a line of information. First sends a message header and then the actual message body. Error checking is done to make reasonably sure that the data was sent. INTERFACES Called by: (IPC.c) ipc_flush (); RETURNED VALUE Ipc_Status_t - returns status of the send operation (typically IPC_STATUS_ERROR or IPC_STATUS_OK). GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ Ipc_Status_t ipc_transport_send_line ( char *str, /* IN - String to write */ int len ) /* IN - Number of characters out of STR to write */ { int count; /* Counts how many bytes were actually written */ u_long u; /* 32-bit placeholder for transmission of LEN */ char hdr_buff[5]; /* Buffer for building header message in */ int i; /* Temporary counter */ char *char_ptr; /* Pointer for int to bytes conversion */ if (sock_state != IPC_SOCK_CONNECTED_TO_CLIENT) { fprintf (stderr, "ERROR: IPC: Attempt to write to non-open socket\n"); return IPC_STATUS_ERROR; } /* Write message body header with length: */ hdr_buff[0] = BOL_CHAR; u = htonl ((u_long) len); char_ptr = (char *) &u; for(i = 0; i < 4; i++) hdr_buff[i+1] = char_ptr[i]; count = (int) write (msg_stream, hdr_buff, 5); if (count != 5) { fprintf (stderr, "ERROR: IPC: (%d) send line error 1\n", count); return IPC_STATUS_ERROR; } /* Write message body: */ count = (int) write (msg_stream, str, (size_t) len); if (count != len) { fprintf (stderr, "ERROR: IPC: (%d) send line error 2\n", count); return IPC_STATUS_ERROR; } return IPC_STATUS_OK; } /* end ipc_transport_send_line */ /*============================================================================= FUNCTION ipc_transport_terminate_server AUTHORS July 1991 Stefan Roth MODIFICATIONS NONE SUMMARY This function reads all pending incoming messages and discards them. Reading continues until a read error occurs or EOF is reached, at which time the socket is closed. Note that this function does not actually close the socket. This is done in ipc_transport_get_line, which is called in this function. In this function, the incoming line length is limited. See buffer below. INTERFACES Called by: (IPC.c) ipc_terminate_server(); RETURNED VALUE Ipc_Status_t - returns status of last read operation (always IPC_STATUS_ERROR or IPC_STATUS_EOF). GLOBAL VARIABLES NONE NON-STANDARD FEATURES NONE =============================================================================*/ Ipc_Status_t ipc_transport_terminate_server (void) { char buffer[17000]; /* temp buffer for incoming data */ int len; /* placeholder var to as arg to function */ Ipc_Status_t status; /* value to be returned from function */ int max_size; /* Max length of buffer */ max_size = sizeof (buffer); do { len = max_size; status = ipc_transport_get_line (buffer, &len, IPC_WAIT); } while ((status != IPC_STATUS_ERROR) && (status != IPC_STATUS_EOF)); return status; } #endif /* IPC_UNIX_SOCKETS */ ngspice-26/src/xspice/ipc/ipcaegis.c0000644000265600020320000002045012264261473017017 0ustar andreasadmin/*============================================================================ FILE IPCaegis.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY Provides compatibility for the new XSPICE simulator to both the MSPICE user interface and BCP via ATESSE v.1 style AEGIS mailboxes. INTERFACES REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #ifdef IPC_AEGIS_MAILBOXES #include #include #include #include #include "ngspice/memory.h" #include "ngspice/ipc.h" typedef unsigned char Buffer_char_t; static status_$t status; typedef enum { IPC_MBX_UNINITIALIZED, IPC_MBX_INITIALIZED, IPC_MBX_CONNECTED_TO_CLIENT, } Ipc_Mbx_State_t; static void *mbx_handle; static Ipc_Mbx_State_t mbx_state = IPC_MBX_UNINITIALIZED; static mbx_$server_msg_t mbx_send_msg_buf; static mbx_$server_msg_t mbx_recieve_msg_buf; static mbx_$server_msg_t *mbx_ret_ptr; static int mbx_ret_len; static short mbx_chan; #include "ngspice/ipcproto.h" /*---------------------------------------------------------------------------*/ /* ipc_transport_initialize_server This function creates an Aegis mailbox, and if successful, calls ipc_get_line to wait for the first record sent which is assumed to be the batch output filename. */ Ipc_Status_t ipc_transport_initialize_server (server_name, m, p, batch_filename) char *server_name; /* The mailbox pathname */ Ipc_Mode_t m; /* Mode - interactive or batch */ Ipc_Protocol_t p; /* Protocol type */ char *batch_filename; /* Batch filename returned */ { int len; /* extern void *malloc(); */ assert (p == IPC_PROTOCOL_V1); mbx_$create_server (server_name, strlen (server_name), mbx_$serv_msg_max, 1, &mbx_handle, &status); if (status.all != status_$ok) { fprintf (stderr, "ERROR: IPC: Error creating mailbox server \"%s\"\n", server_name); error_$print (status); mbx_state = IPC_MBX_UNINITIALIZED; return IPC_STATUS_ERROR; } else { mbx_state = IPC_MBX_INITIALIZED; /* * First record is the name of the batch filename - whether we're in * batch mode or not: */ return ipc_get_line (batch_filename, &len, IPC_WAIT); } /* * shouldn't get here */ assert (0); return IPC_STATUS_ERROR; } /*---------------------------------------------------------------------------*/ Ipc_Status_t extract_msg (str, len) char *str; int *len; { *len = mbx_ret_len - mbx_$serv_msg_hdr_len; assert (*len >= 0); /* * null terminate before copy: */ mbx_ret_ptr->data [*len] = '\0'; strcpy (str, mbx_ret_ptr->data); return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ /* ipc_transport_get_line This function reads data sent by a client over the mailbox channel. It also handles the initial opening of the mailbox channel when requested by a client. */ Ipc_Status_t ipc_transport_get_line (str, len, wait) char *str; /* The string text read from IPC channel */ int *len; /* The length of str */ Ipc_Wait_t wait; /* Blocking or non-blocking */ { if (mbx_state == IPC_MBX_UNINITIALIZED) { fprintf (stderr, "ERROR: IPC: Attempted to read from non-initialized mailbox\n"); return IPC_STATUS_ERROR; } assert ((mbx_state == IPC_MBX_CONNECTED_TO_CLIENT) || (mbx_state == IPC_MBX_INITIALIZED)); for (;;) { if (wait == IPC_WAIT) { mbx_$get_rec (mbx_handle, &mbx_recieve_msg_buf, mbx_$serv_msg_max, &mbx_ret_ptr, &mbx_ret_len, &status); } else { mbx_$get_conditional (mbx_handle, &mbx_recieve_msg_buf, mbx_$serv_msg_max, &mbx_ret_ptr, &mbx_ret_len, &status); if (status.all == mbx_$channel_empty) { return IPC_STATUS_NO_DATA; } } if (status.all != status_$ok) { fprintf (stderr, "ERROR: IPC: Error reading from mailbox\n"); error_$print (status); return IPC_STATUS_ERROR; } switch (mbx_ret_ptr->mt) { case mbx_$channel_open_mt: if (mbx_state == IPC_MBX_CONNECTED_TO_CLIENT) { /* * we're already connected to a client... refuse the connection */ mbx_send_msg_buf.mt = mbx_$reject_open_mt; } else { mbx_send_msg_buf.mt = mbx_$accept_open_mt; mbx_state = IPC_MBX_CONNECTED_TO_CLIENT; } mbx_send_msg_buf.cnt = mbx_$serv_msg_hdr_len; mbx_chan = mbx_ret_ptr->chan; mbx_send_msg_buf.chan = mbx_chan; mbx_$put_rec (mbx_handle, &mbx_send_msg_buf, mbx_$serv_msg_hdr_len, &status); if (status.all != status_$ok) { fprintf (stderr, "ERROR: IPC: Error writing to mailbox\n"); error_$print (status); return IPC_STATUS_ERROR; } /* * check to see if there was a message buried in the open request: */ if (mbx_ret_len > mbx_$serv_msg_hdr_len) { return extract_msg (str, len); } break; case mbx_$eof_mt: mbx_chan = mbx_ret_ptr->chan; mbx_$deallocate(mbx_handle, mbx_chan, &status); if (status.all != status_$ok) { fprintf (stderr, "ERROR: IPC: Error deallocating mailbox\n"); error_$print (status); return IPC_STATUS_ERROR; } mbx_state = IPC_MBX_INITIALIZED; return IPC_STATUS_EOF; break; case mbx_$data_mt: assert (mbx_state == IPC_MBX_CONNECTED_TO_CLIENT); return extract_msg (str, len); break; case mbx_$data_partial_mt: fprintf (stderr, "ERROR: IPC: Recieved partial data message - ignored\n"); break; default: fprintf (stderr, "ERROR: IPC: Bad message type (0x%x) recieved\n", mbx_ret_ptr->mt); } } return IPC_STATUS_ERROR; } /*---------------------------------------------------------------------------*/ /* ipc_transport_terminate_server This function calls ipc\_transport\_get\_line until it receives an EOF from the client, which concludes the communication. */ Ipc_Status_t ipc_transport_terminate_server () { char buffer[300]; int len; Ipc_Status_t status; do { status = ipc_transport_get_line (buffer, &len, IPC_WAIT); } while ((status != IPC_STATUS_ERROR) && (status != IPC_STATUS_EOF)); return status; } /*---------------------------------------------------------------------------*/ /* ipc_transport_send_line This function sends a message to the current client through the mailbox channel. */ Ipc_Status_t ipc_transport_send_line (str, len) char *str; /* The bytes to send */ int len; /* The number of bytes from str to send */ { long cnt; if (mbx_state != IPC_MBX_CONNECTED_TO_CLIENT) { fprintf (stderr, "ERROR: IPC: Attempted to write to non-open mailbox\n"); return IPC_STATUS_ERROR; } mbx_send_msg_buf.mt = mbx_$data_mt; if (mbx_$serv_msg_hdr_len + len > mbx_$serv_msg_max) { fprintf (stderr, "ERROR: IPC: send_line message too long - truncating\n"); len = mbx_$serv_msg_max - mbx_$serv_msg_hdr_len; } mbx_send_msg_buf.cnt = mbx_$serv_msg_hdr_len + len; mbx_send_msg_buf.chan = mbx_chan; memcpy (mbx_send_msg_buf.data, str, len); cnt = mbx_send_msg_buf.cnt; mbx_$put_rec (mbx_handle, &mbx_send_msg_buf, cnt, &status); if (status.all != status_$ok) { fprintf (stderr, "ERROR: IPC: Error writing to mailbox\n"); error_$print (status); return IPC_STATUS_ERROR; } return IPC_STATUS_OK; } #else int intDummy1; #endif /* IPC_AEGIS_MAILBOXES */ ngspice-26/src/xspice/ipc/ipcstdio.c0000644000265600020320000000303112264261473017045 0ustar andreasadmin/* * Steve Tynor * * Generic Interprocess Communication module * * Used for debugging in absense of IPC interface. * */ #include "ngspice/ngspice.h" #ifdef IPC_DEBUG_VIA_STDIO #include #include "ngspice/ipc.h" #include "ngspice/ipcproto.h" #include /* 12/1/97 jg */ /*---------------------------------------------------------------------------*/ Ipc_Status_t ipc_transport_initialize_server ( char *server_name, Ipc_Mode_t m, Ipc_Protocol_t p, char *batch_filename ) { NG_IGNORE(server_name); NG_IGNORE(p); NG_IGNORE(batch_filename); assert (m == IPC_MODE_INTERACTIVE); printf ("INITIALIZE_SERVER\n"); return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ Ipc_Status_t ipc_transport_get_line ( char *str, int *len, Ipc_Wait_t wait ) { NG_IGNORE(wait); printf ("GET_LINE\n"); gets (str); *len = (int) strlen (str); return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ Ipc_Status_t ipc_transport_send_line ( char *str, int len ) { int i; printf ("SEND_LINE: /"); for (i = 0; i < len; i++) putchar (str[i]); printf ("/\n"); return IPC_STATUS_OK; } /*---------------------------------------------------------------------------*/ Ipc_Status_t ipc_transport_terminate_server () { return IPC_STATUS_OK; } #endif /* IPC_DEBUG_VIA_STDIO */ ngspice-26/src/xspice/ipc/ipctiein.c0000644000265600020320000003212712264261473017043 0ustar andreasadmin/*============================================================================ FILE IPCtiein.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY Provides a protocol independent interface between the simulator and the IPC method used to interface to CAE packages. INTERFACES g_ipc (global variable) ipc_handle_stop() ipc_handle_returni() ipc_handle_mintime() ipc_handle_vtrans() ipc_send_stdout() ipc_send_stderr() ipc_send_std_files() ipc_screen_name() ipc_get_devices() ipc_free_devices() ipc_check_pause_stop() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #define CONFIG #include "ngspice/ngspice.h" #include "ngspice/inpdefs.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" #include "bjt/bjtdefs.h" #include "jfet/jfetdefs.h" #include "mos1/mos1defs.h" #include "mos2/mos2defs.h" #include "mos3/mos3defs.h" #include "ngspice/mifproto.h" #include "ngspice/ipc.h" #include "ngspice/ipctiein.h" /* Global variable g_ipc is used by the SPICE mods that take care of interprocess communications activities. */ Ipc_Tiein_t g_ipc = { IPC_FALSE, /* enabled */ IPC_MODE_INTERACTIVE, /* mode */ IPC_ANAL_DCOP, /* analysis mode */ IPC_FALSE, /* parse_error */ IPC_FALSE, /* run_error */ IPC_FALSE, /* errchk_sent */ IPC_FALSE, /* returni */ 0.0, /* mintime */ 0.0, /* lasttime */ 0.0, /* cpu time */ NULL, /* send array */ NULL, /* log file */ { /* vtrans struct */ 0, /* size */ NULL, /* vsrc_name array */ NULL, /* device_name array */ }, IPC_FALSE, /* stop analysis */ }; /* ipc_handle_stop This function sets a flag in the g_ipc variable to signal that a stop message has been received over the IPC channel. */ void ipc_handle_stop(void) { g_ipc.stop_analysis = IPC_TRUE; } /* ipc_handle_returni This function sets a flag in the g_ipc variable to signal that a message has been received over the IPC channel specifying that current values are to be returned in the results data sets. */ void ipc_handle_returni(void) { g_ipc.returni = IPC_TRUE; } /* ipc_handle_mintime This function sets a value in the g_ipc variable that specifies how often data is to be returned as it is computed. If the simulator takes timestep backups, data may still be returned more often that that specified by 'mintime' so that glitches are not missed. */ void ipc_handle_mintime(double time) { g_ipc.mintime = time; } /* ipc_handle_vtrans This function processes arguments from a #VTRANS card received over the IPC channel. The data on the card specifies that a particular zero-valued voltage source name should be translated to the specified instance name for which it was setup to monitor currents. */ void ipc_handle_vtrans( char *vsrc, /* The name of the voltage source to be translated */ char *dev) /* The device name the vsource name should be translated to */ { int i; int size; if(g_ipc.vtrans.size == 0) { g_ipc.vtrans.size = 1; g_ipc.vtrans.vsrc_name = TMALLOC(char *, 1); g_ipc.vtrans.device_name = TMALLOC(char *, 1); g_ipc.vtrans.vsrc_name[0] = MIFcopy(vsrc); g_ipc.vtrans.device_name[0] = MIFcopy(dev); } else { g_ipc.vtrans.size++; size = g_ipc.vtrans.size; i = g_ipc.vtrans.size - 1; g_ipc.vtrans.vsrc_name = TREALLOC(char *, g_ipc.vtrans.vsrc_name, size); g_ipc.vtrans.device_name = TREALLOC(char *, g_ipc.vtrans.device_name, size); g_ipc.vtrans.vsrc_name[i] = MIFcopy(vsrc); g_ipc.vtrans.device_name[i] = MIFcopy(dev); } } /* ipc_send_stdout This function sends the data written to stdout over the IPC channel. This stream was previously redirected to a temporary file during the simulation. */ void ipc_send_stdout(void) { int c; int len; char buf[IPC_MAX_LINE_LEN+1]; /* rewind the redirected stdout stream */ rewind(stdout); /* Begin reading from the top of file and send lines */ /* over the IPC channel. */ /* Don't send newlines. Also, if line is > IPC_MAX_LINE_LEN chars */ /* we must wrap it because Mspice can't handle it */ len = 0; while( (c=fgetc(stdout)) != EOF) { if(c != '\n') { buf[len] = (char) c; len++; } if((c == '\n') || (len == IPC_MAX_LINE_LEN)) { buf[len] = '\0'; ipc_send_line(buf); len = 0; } } if(len > 0) { buf[len] = '\0'; ipc_send_line(buf); } /* Finally, rewind file again to discard the data already sent */ rewind(stdout); } /* ipc_send_stderr This function sends the data written to stderr over the IPC channel. This stream was previously redirected to a temporary file during the simulation. */ void ipc_send_stderr(void) { int c; int len; char buf[IPC_MAX_LINE_LEN+1]; /* rewind the redirected stderr stream */ rewind(stderr); /* Begin reading from the top of file and send lines */ /* over the IPC channel. */ /* Don't send newlines. Also, if line is > IPC_MAX_LINE_LEN chars */ /* we must wrap it because Mspice can't handle it */ len = 0; while( (c=fgetc(stderr)) != EOF) { if(c != '\n') { buf[len] = (char) c; len++; } if((c == '\n') || (len == IPC_MAX_LINE_LEN)) { buf[len] = '\0'; ipc_send_line(buf); len = 0; } } if(len > 0) { buf[len] = '\0'; ipc_send_line(buf); } /* Finally, rewind file again to discard the data already sent */ rewind(stderr); } /* ipc_send_std_files This function sends the data written to stdout and stderr over the IPC channel. These streams were previously redirected to temporary files during the simulation. */ Ipc_Status_t ipc_send_std_files(void) { ipc_send_stdout(); ipc_send_stderr(); return(ipc_flush()); } /* ipc_screen_name This function screens names of instances and nodes to limit the data returned over the IPC channel. */ Ipc_Boolean_t ipc_screen_name(char *name, char *mapped_name) { char *endp; int i; int len; long l; /* Return FALSE if name is in a subcircuit */ for(i = 0; name[i] != '\0'; i++) { if(name[i] == ':') return(IPC_FALSE); } /* Determine if name is numeric and what value is */ l = strtol(name, &endp, 10); /* If numeric */ if(*endp == '\0') { /* Return FALSE if >100,000 -> added by ms_server in ATESSE 1.0 */ if(l >= 100000) return(IPC_FALSE); /* Otherwise, copy name to mapped name and return true */ else { strcpy(mapped_name,name); return(IPC_TRUE); } } /* If node is an internal node from a semiconductor (indicated by a */ /* trailing #collector, #source, ...), do not return its current. */ /* Otherwise, map to upper case and eliminate trailing "#branch" if any. */ for(i = 0; name[i]; i++) { if(name[i] == '#') { if(strcmp(name + i, "#branch") == 0) break; else return(IPC_FALSE); } else { if(islower(name[i])) mapped_name[i] = (char) toupper(name[i]); else mapped_name[i] = name[i]; } } mapped_name[i] = '\0'; len = i; /* If len != 8 or 6'th char not equal to $, then doesn't need vtrans */ /* Otherwise, translate to device name that it monitors */ if(len != 8) return(IPC_TRUE); else if(name[5] != '$') return(IPC_TRUE); else { /* Scan list of prefixes in VTRANS table and convert name */ for(i = 0; i < g_ipc.vtrans.size; i++) { if(strncmp(mapped_name, g_ipc.vtrans.vsrc_name[i], 5) == 0) { strcpy(mapped_name, g_ipc.vtrans.device_name[i]); return(IPC_TRUE); } } return(IPC_TRUE); } } /* ipc_get_devices This function is used to setup the OUTinterface data structure that determines what instances will have data returned over the IPC channel. */ int ipc_get_devices( CKTcircuit *ckt, /* The circuit structure */ char *device, /* The device name as it appears in the info struct */ char ***names, /* Array of name strings to be built */ double **modtypes) /* Array of types to be built */ { int index; int num_instances; GENmodel *model; GENinstance *here; char *inst_name; int inst_name_len; int i; BJTmodel *BJTmod; JFETmodel *JFETmod; MOS1model *MOS1mod; MOS2model *MOS2mod; MOS3model *MOS3mod; /* Initialize local variables */ num_instances = 0; /* Get the index into the circuit structure linked list of models */ index = INPtypelook(device); /* Iterate through all models of this type */ for(model = ckt->CKThead[index]; model; model = model->GENnextModel) { /* Iterate through all instance of this model */ for(here = model->GENinstances; here; here = here->GENnextInstance) { /* Get the name of the instance */ inst_name = here->GENname; inst_name_len = (int) strlen(inst_name); /* Skip if it is a inside a subcircuit */ for(i = 0; i < inst_name_len; i++) if(inst_name[i] == ':') break; if(i < inst_name_len) continue; /* Otherwise, add the name to the list */ num_instances++; if(num_instances == 1) *names = TMALLOC(char *, 1); else *names = TREALLOC(char *, *names, num_instances); (*names)[num_instances-1] = MIFcopy(inst_name); /* Then get the type if it is a Q J or M */ if(num_instances == 1) *modtypes = TMALLOC(double, 1); else *modtypes = TREALLOC(double, *modtypes, num_instances); if(strcmp(device,"BJT") == 0) { BJTmod = (BJTmodel *) model; (*modtypes)[num_instances-1] = BJTmod->BJTtype; } else if(strcmp(device,"JFET") == 0) { JFETmod = (JFETmodel *) model; (*modtypes)[num_instances-1] = JFETmod->JFETtype; } else if(strcmp(device,"Mos1") == 0) { MOS1mod = (MOS1model *) model; (*modtypes)[num_instances-1] = MOS1mod->MOS1type; } else if(strcmp(device,"Mos2") == 0) { MOS2mod = (MOS2model *) model; (*modtypes)[num_instances-1] = MOS2mod->MOS2type; } else if(strcmp(device,"Mos3") == 0) { MOS3mod = (MOS3model *) model; (*modtypes)[num_instances-1] = MOS3mod->MOS3type; } else { (*modtypes)[num_instances-1] = 1.0; } } /* end for all instances */ } /* end for all models */ return(num_instances); } /* ipc_free_devices This function frees temporary data created by ipc_get_devices(). */ void ipc_free_devices( int num_items, /* Number of things to free */ char **names, /* Array of name strings to be built */ double *modtypes) /* Array of types to be built */ { int i; for(i = 0; i < num_items; i++) { FREE(names[i]); names[i] = 0; } if(num_items > 0) { FREE(names); FREE(modtypes); names = NULL; modtypes = NULL; } } /* ipc_check_pause_stop This function is called at various times during a simulation to check for incoming messages of the form >STOP or >PAUSE signaling that simulation should be stopped or paused. Processing of the messages is handled by ipc_get_line(). */ void ipc_check_pause_stop(void) { char buf[1025]; int len; /* If already seen stop analysis, don't call ipc_get_line, just return. */ /* This is provided so that the function can be called multiple times */ /* during the process of stopping */ if(g_ipc.stop_analysis) return; /* Otherwise do a non-blocking call to ipc_get_line() to check for messages. */ /* We assume that the only possible messages at this point are >PAUSE */ /* and >STOP, so we don't do anything with the returned text if any */ ipc_get_line(buf, &len, IPC_NO_WAIT); } ngspice-26/src/xspice/ipc/Makefile.am0000644000265600020320000000062612264261473017126 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libipcxsp.la libipcxsp_la_SOURCES = \ ipcaegis.c \ ipc.c \ ipcsockets.c \ ipcstdio.c \ ipctiein.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/ipc/Makefile.in0000644000265600020320000004055012264261541017133 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/ipc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libipcxsp_la_LIBADD = am_libipcxsp_la_OBJECTS = ipcaegis.lo ipc.lo ipcsockets.lo ipcstdio.lo \ ipctiein.lo libipcxsp_la_OBJECTS = $(am_libipcxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libipcxsp_la_SOURCES) DIST_SOURCES = $(libipcxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libipcxsp.la libipcxsp_la_SOURCES = \ ipcaegis.c \ ipc.c \ ipcsockets.c \ ipcstdio.c \ ipctiein.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/ipc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/ipc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libipcxsp.la: $(libipcxsp_la_OBJECTS) $(libipcxsp_la_DEPENDENCIES) $(EXTRA_libipcxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libipcxsp_la_OBJECTS) $(libipcxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipcaegis.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipcsockets.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipcstdio.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipctiein.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/Makefile.am0000644000265600020320000000205612264261473016352 0ustar andreasadmin# Process this file with automake EXTRA_DIST = README examples icm xspice.c .gitignore ## This is removed because icm relies upon the existance of all other ## libs. It is currently compiled manually, last. ##SUBDIRS = mif cm enh evt ipc idn icm SUBDIRS = mif cm enh evt ipc idn cmpp icm dist-hook: rm -f "$(distdir)/icm/makedefs" rm -f "$(distdir)/icm/GNUmakefile" rm -rf `find $(distdir)/icm -name .deps` rm -rf `find $(distdir)/icm -name *.o` rm -rf `find $(distdir)/icm -name *.cm` for sub in analog digital spice2poly xtradev xtraevt ; do \ rm -rf `find $(distdir)/icm/$$sub -name cmextrn.h`; \ rm -rf `find $(distdir)/icm/$$sub -name cminfo.h`; \ rm -rf `find $(distdir)/icm/$$sub -name udnextrn.h`; \ rm -rf `find $(distdir)/icm/$$sub -name udninfo.h`; \ rm -rf `find $(distdir)/icm/$$sub -name ifspec.c`; \ rm -rf `find $(distdir)/icm/$$sub -name cfunc.c`; \ rm -rf `find $(distdir)/icm/$$sub -name dlmain.c`; \ rm -rf `find $(distdir)/icm/$$sub -name objects.inc`; \ done MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/evt/0000755000265600020320000000000012264261712015105 5ustar andreasadminngspice-26/src/xspice/evt/evtqueue.c0000644000265600020320000001547512264261473017134 0ustar andreasadmin/*============================================================================ FILE EVTqueue.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions that place new events into the output and instance queues. INTERFACES void EVTqueue_output( CKTcircuit *ckt, int output_index, int udn_index, Evt_Output_Event_t *new_event, double posted_time, double event_time) void EVTqueue_inst( CKTcircuit *ckt, int inst_index, double posted_time, double event_time) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/evtproto.h" /* EVTqueue_output This function places the specified output event onto the output queue. It is called by EVTload during a transient analysis. The linked list in the queue for the specified output is searched beginning at the current head of the pending events to find the location at which to insert the new event. The events are ordered in the list by event_time. If the event is placed before the end of the list, subsequent events are removed from the list by marking them as 'removed' and recording the time of removal. This allows efficient backup of the state of the queue if a subsequent analog timestep fails. */ void EVTqueue_output( CKTcircuit *ckt, /* The circuit structure */ int output_index, /* The output in question */ int udn_index, /* The associated user-defined node type */ Evt_Output_Event_t *new_event, /* The event to queue */ double posted_time, /* The current time */ double event_time) /* The time the event should happen */ { Evt_Output_Queue_t *output_queue; Evt_Output_Event_t **here; Evt_Output_Event_t *next; Mif_Boolean_t splice; NG_IGNORE(udn_index); /* Get pointers for fast access */ output_queue = &(ckt->evt->queue.output); /* Put the times into the event struct */ new_event->event_time = event_time; new_event->posted_time = posted_time; new_event->removed = MIF_FALSE; /* Update next_time in output queue */ if((output_queue->num_pending <= 0) || (event_time < output_queue->next_time)) output_queue->next_time = event_time; /* Find location at which to insert event */ splice = MIF_FALSE; here = output_queue->current[output_index]; while(*here) { if(event_time <= (*here)->event_time) { splice = MIF_TRUE; break; } here = &((*here)->next); } /* If needs to be spliced into middle of existing list */ if(splice) { /* splice it in */ next = *here; *here = new_event; new_event->next = next; /* mark later events as removed */ while(next) { if(! next->removed) { next->removed = MIF_TRUE; next->removed_time = posted_time; } next = next->next; } } /* else, just put it at the end */ else { *here = new_event; new_event->next = NULL; } /* Add to the list of outputs modified since last accepted timestep */ if(! output_queue->modified[output_index]) { output_queue->modified[output_index] = MIF_TRUE; output_queue->modified_index[(output_queue->num_modified)++] = output_index; } /* Add to the list of outputs with events pending */ if(! output_queue->pending[output_index]) { output_queue->pending[output_index] = MIF_TRUE; output_queue->pending_index[(output_queue->num_pending)++] = output_index; } } /* EVTqueue_inst This function places the specified inst event onto the inst queue. The linked list in the queue for the specified inst is searched beginning at the current head of the pending events to find the location at which to insert the new event. The events are ordered in the list by event_time. */ void EVTqueue_inst( CKTcircuit *ckt, /* The circuit structure */ int inst_index, /* The instance in question */ double posted_time, /* The current time */ double event_time) /* The time the event should happen */ { Evt_Inst_Queue_t *inst_queue; Evt_Inst_Event_t **here; Evt_Inst_Event_t *new_event; Evt_Inst_Event_t *next; Mif_Boolean_t splice, malloced = FALSE; /* Get pointers for fast access */ inst_queue = &(ckt->evt->queue.inst); /* Update next_time in inst queue */ if((inst_queue->num_pending <= 0) || (event_time < inst_queue->next_time)) inst_queue->next_time = event_time; /* Create a new event or get one from the free list and copy in data */ if(inst_queue->free[inst_index]) { new_event = inst_queue->free[inst_index]; inst_queue->free[inst_index] = new_event->next; } else { new_event = TMALLOC(Evt_Inst_Event_t, 1); malloced = TRUE; } new_event->event_time = event_time; new_event->posted_time = posted_time; /* Find location at which to insert event */ splice = MIF_FALSE; here = inst_queue->current[inst_index]; while(*here) { /* If there's an event with the same time, don't duplicate it */ if(event_time == (*here)->event_time) { if(malloced) tfree(new_event); return; } else if(event_time < (*here)->event_time) { splice = MIF_TRUE; break; } here = &((*here)->next); } /* If needs to be spliced into middle of existing list */ if(splice) { /* splice it in */ next = *here; *here = new_event; new_event->next = next; } /* else, just put it at the end */ else { *here = new_event; new_event->next = NULL; } /* Add to the list of insts modified since last accepted timestep */ if(! inst_queue->modified[inst_index]) { inst_queue->modified[inst_index] = MIF_TRUE; inst_queue->modified_index[(inst_queue->num_modified)++] = inst_index; } /* Add to the list of insts with events pending */ if(! inst_queue->pending[inst_index]) { inst_queue->pending[inst_index] = MIF_TRUE; inst_queue->pending_index[(inst_queue->num_pending)++] = inst_index; } } ngspice-26/src/xspice/evt/evtnode_copy.c0000644000265600020320000000756212264261473017765 0ustar andreasadmin/*============================================================================ FILE EVTnode_copy.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTnode_copy which copies the state of a node structure. INTERFACES void EVTnode_copy(CKTcircuit *ckt, int node_index, Evt_Node_t *from, Evt_Node_t **to) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/mifproto.h" #include "ngspice/evtproto.h" #include "ngspice/cm.h" /* EVTnode_copy This function copies the state of a node structure. If the destination is NULL, it is allocated before the copy. This is the case when EVTiter copies a node during a transient analysis to save the state of an element of rhsold into the node data structure lists. If the destination is non-NULL, only the internal elements of the node structure are copied. This is the case when EVTbackup restores that state of nodes that existed at a certain timestep back into rhs and rhsold. */ void EVTnode_copy( CKTcircuit *ckt, /* The circuit structure */ int node_index, /* The node to copy */ Evt_Node_t *from, /* Location to copy from */ Evt_Node_t **to) /* Location to copy to */ { int i; int udn_index; int num_outputs; Mif_Boolean_t invert; Evt_Node_Data_t *node_data; Evt_Node_Info_t **node_table; Evt_Node_t *here; /* Digital_t *dummy;*/ /* char buff[128];*/ /* Get data for fast access */ node_data = ckt->evt->data.node; node_table = ckt->evt->info.node_table; udn_index = node_table[node_index]->udn_index; num_outputs = node_table[node_index]->num_outputs; invert = node_table[node_index]->invert; /* If destination is not allocated, allocate it */ /* otherwise we just copy into the node struct */ here = *to; if(here == NULL) { /* Use allocated structure on free list if available */ /* Otherwise, allocate a new one */ here = node_data->free[node_index]; if(here) { *to = here; node_data->free[node_index] = here->next; here->next = NULL; } else { here = TMALLOC(Evt_Node_t, 1); *to = here; /* Allocate/initialize the data in the new node struct */ if(num_outputs > 1) { here->output_value = TMALLOC(void *, num_outputs); for(i = 0; i < num_outputs; i++) { g_evt_udn_info[udn_index]->create ( &(here->output_value[i]) ); } } here->node_value = NULL; g_evt_udn_info[udn_index]->create ( &(here->node_value) ); if(invert) g_evt_udn_info[udn_index]->create ( &(here->inverted_value) ); } } /* Copy the node data */ here->op = from->op; here->step = from->step; if(num_outputs > 1) { for(i = 0; i < num_outputs; i++) { g_evt_udn_info[udn_index]->copy (from->output_value[i], here->output_value[i]); } } g_evt_udn_info[udn_index]->copy (from->node_value, here->node_value); if(invert) { g_evt_udn_info[udn_index]->copy (from->inverted_value, here->inverted_value); } } ngspice-26/src/xspice/evt/evtsetup.c0000644000265600020320000003762112264261473017145 0ustar andreasadmin/*============================================================================ FILE EVTsetup.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTsetup which clears/allocates the event-driven queues and data structures immediately prior to a new analysis. In addition, it places entries in the job list so that results data from multiple analysis can be retrieved similar to SPICE3C1 saving multiple 'plots'. INTERFACES int EVTsetup(CKTcircuit *ckt) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" //#include "misc.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/mifproto.h" #include "ngspice/evtproto.h" static int EVTsetup_queues(CKTcircuit *ckt); static int EVTsetup_data(CKTcircuit *ckt); static int EVTsetup_jobs(CKTcircuit *ckt); static int EVTsetup_load_ptrs(CKTcircuit *ckt); /* Allocation macros with built-in check for out-of-memory */ /* Adapted from SPICE 3C1 code in CKTsetup.c */ #define CKALLOC(var,size,type) \ if(size) { \ if((var = TMALLOC(type, size)) == NULL) \ return(E_NOMEM); \ } #define CKREALLOC(var,size,type) \ if((size) == 1) { \ if((var = TMALLOC(type, size)) == NULL) \ return(E_NOMEM); \ } else if((size) > 1) { \ if((var = TREALLOC(type, (var), size)) == NULL) \ return(E_NOMEM); \ } /* EVTsetup This function clears/allocates the event-driven queues and data structures immediately prior to a new analysis. In addition, it places entries in the job list so that results data from multiple analysis can be retrieved similar to SPICE3C1 saving multiple 'plots'. */ int EVTsetup( CKTcircuit *ckt) /* The circuit structure */ { int err; /* Exit immediately if no event-driven instances in circuit */ if(ckt->evt->counts.num_insts == 0) return(OK); /* Clear the inst, node, and output queues, and initialize the to_call */ /* elements in the instance queue to call all event-driven instances */ err = EVTsetup_queues(ckt); if(err) return(err); /* Allocate and initialize the node, state, message, and statistics data */ err = EVTsetup_data(ckt); if(err) return(err); /* Set the job pointers to the allocated results, states, messages, */ /* and statistics so that data will be accessable after run */ err = EVTsetup_jobs(ckt); if(err) return(err); /* Setup the pointers in the MIFinstance structure for inputs, outputs, */ /* and total loads */ err = EVTsetup_load_ptrs(ckt); if(err) return(err); /* Initialize additional event data */ g_mif_info.circuit.evt_step = 0.0; /* Return OK */ return(OK); } /* EVTsetup_queues This function clears the event-driven queues in preparation for a new simulation. */ static int EVTsetup_queues( CKTcircuit *ckt) /* The circuit structure */ { int i; int num_insts; int num_nodes; int num_outputs; Evt_Inst_Queue_t *inst_queue; Evt_Node_Queue_t *node_queue; Evt_Output_Queue_t *output_queue; Evt_Inst_Event_t *inst_event; Evt_Output_Event_t *output_event; void *ptr; /* ************************ */ /* Clear the instance queue */ /* ************************ */ num_insts = ckt->evt->counts.num_insts; inst_queue = &(ckt->evt->queue.inst); for(i = 0; i < num_insts; i++) { inst_event = inst_queue->head[i]; while(inst_event) { ptr = inst_event; inst_event = inst_event->next; FREE(ptr); } inst_event = inst_queue->free[i]; while(inst_event) { ptr = inst_event; inst_event = inst_event->next; FREE(ptr); } inst_queue->head[i] = NULL; inst_queue->current[i] = &(inst_queue->head[i]); inst_queue->last_step[i] = &(inst_queue->head[i]); inst_queue->free[i] = NULL; } inst_queue->next_time = 0.0; inst_queue->last_time = 0.0; inst_queue->num_modified = 0; inst_queue->num_pending = 0; inst_queue->num_to_call = 0; for(i = 0; i < num_insts; i++) { inst_queue->modified[i] = MIF_FALSE; inst_queue->pending[i] = MIF_FALSE; inst_queue->to_call[i] = MIF_FALSE; } /* ******************** */ /* Clear the node queue */ /* ******************** */ num_nodes = ckt->evt->counts.num_nodes; node_queue = &(ckt->evt->queue.node); node_queue->num_changed = 0; node_queue->num_to_eval = 0; for(i = 0; i < num_nodes; i++) { node_queue->changed[i] = MIF_FALSE; node_queue->to_eval[i] = MIF_FALSE; } /* ********************** */ /* Clear the output queue */ /* ********************** */ num_outputs = ckt->evt->counts.num_outputs; output_queue = &(ckt->evt->queue.output); for(i = 0; i < num_outputs; i++) { output_event = output_queue->head[i]; while(output_event) { ptr = output_event; output_event = output_event->next; FREE(ptr); } output_event = output_queue->free[i]; while(output_event) { ptr = output_event; output_event = output_event->next; FREE(ptr); } output_queue->head[i] = NULL; output_queue->current[i] = &(output_queue->head[i]); output_queue->last_step[i] = &(output_queue->head[i]); output_queue->free[i] = NULL; } output_queue->next_time = 0.0; output_queue->last_time = 0.0; output_queue->num_modified = 0; output_queue->num_pending = 0; output_queue->num_changed = 0; for(i = 0; i < num_outputs; i++) { output_queue->modified[i] = MIF_FALSE; output_queue->pending[i] = MIF_FALSE; output_queue->changed[i] = MIF_FALSE; } return(OK); } /* EVTsetup_data This function sets up the event-driven node, state, and message data runtime structures in preparation for a new simulation. */ static int EVTsetup_data( CKTcircuit *ckt) /* The circuit structure */ { Evt_Data_t *data; int i; int j; int num_insts; int num_ports; int num_nodes; int udn_index; int num_outputs; Mif_Boolean_t invert; Evt_Node_Data_t *node_data; Evt_State_Data_t *state_data; Evt_Msg_Data_t *msg_data; /* Evt_Statistic_t *statistics_data;*/ Evt_Node_t *rhs; Evt_Node_t *rhsold; Evt_Node_Info_t *node_info; /* Allocate main substructures of data */ /* Note that we don't free any old structures */ /* since they are pointed to by jobs and need */ /* to be maintained so that results from multiple */ /* jobs are kept around like SPICE does */ data = &(ckt->evt->data); CKALLOC(data->node, 1, Evt_Node_Data_t) CKALLOC(data->state, 1, Evt_State_Data_t) CKALLOC(data->msg, 1, Evt_Msg_Data_t) CKALLOC(data->statistics, 1, Evt_Statistic_t) /* Allocate node data */ num_nodes = ckt->evt->counts.num_nodes; node_data = data->node; CKALLOC(node_data->head, num_nodes, Evt_Node_t *) CKALLOC(node_data->tail, num_nodes, Evt_Node_t **) CKALLOC(node_data->last_step, num_nodes, Evt_Node_t **) CKALLOC(node_data->free, num_nodes, Evt_Node_t *) CKALLOC(node_data->modified_index, num_nodes, int) CKALLOC(node_data->modified, num_nodes, Mif_Boolean_t) CKALLOC(node_data->rhs, num_nodes, Evt_Node_t) CKALLOC(node_data->rhsold, num_nodes, Evt_Node_t) CKALLOC(node_data->total_load, num_nodes, double) /* Initialize the node data */ for(i = 0; i < num_nodes; i++) { node_data->tail[i] = &(node_data->head[i]); node_data->last_step[i] = &(node_data->head[i]); } for(i = 0; i < num_nodes; i++) { /* Get pointers to rhs & rhsold, the user-defined node type index, */ /* the number of outputs on the node and the invert flag */ rhs = &(node_data->rhs[i]); rhsold = &(node_data->rhsold[i]); node_info = ckt->evt->info.node_table[i]; udn_index = node_info->udn_index; num_outputs = node_info->num_outputs; invert = node_info->invert; /* Initialize the elements within rhs and rhsold */ rhs->step = 0.0; rhsold->step = 0.0; if(num_outputs > 1) { CKALLOC(rhs->output_value, num_outputs, void *) CKALLOC(rhsold->output_value, num_outputs, void *) for(j = 0; j < num_outputs; j++) { g_evt_udn_info[udn_index]->create (&(rhs->output_value[j])); g_evt_udn_info[udn_index]->initialize (rhs->output_value[j]); g_evt_udn_info[udn_index]->create (&(rhsold->output_value[j])); g_evt_udn_info[udn_index]->initialize (rhsold->output_value[j]); } } g_evt_udn_info[udn_index]->create (&(rhs->node_value)); g_evt_udn_info[udn_index]->initialize (rhs->node_value); g_evt_udn_info[udn_index]->create (&(rhsold->node_value)); g_evt_udn_info[udn_index]->initialize (rhsold->node_value); if(invert) { g_evt_udn_info[udn_index]->create (&(rhs->inverted_value)); g_evt_udn_info[udn_index]->initialize (rhs->inverted_value); g_evt_udn_info[udn_index]->create (&(rhsold->inverted_value)); g_evt_udn_info[udn_index]->initialize (rhsold->inverted_value); } /* Initialize the total load value to zero */ node_data->total_load[i] = 0.0; } /* Allocate and initialize state data */ num_insts = ckt->evt->counts.num_insts; state_data = data->state; CKALLOC(state_data->head, num_insts, Evt_State_t *) CKALLOC(state_data->tail, num_insts, Evt_State_t **) CKALLOC(state_data->last_step, num_insts, Evt_State_t **) CKALLOC(state_data->free, num_insts, Evt_State_t *) CKALLOC(state_data->modified_index, num_insts, int) CKALLOC(state_data->modified, num_insts, Mif_Boolean_t) CKALLOC(state_data->total_size, num_insts, int) CKALLOC(state_data->desc, num_insts, Evt_State_Desc_t *) for(i = 0; i < num_insts; i++) { state_data->tail[i] = &(state_data->head[i]); state_data->last_step[i] = &(state_data->head[i]); } /* Allocate and initialize msg data */ num_ports = ckt->evt->counts.num_ports; msg_data = data->msg; CKALLOC(msg_data->head, num_ports, Evt_Msg_t *) CKALLOC(msg_data->tail, num_ports, Evt_Msg_t **) CKALLOC(msg_data->last_step, num_ports, Evt_Msg_t **) CKALLOC(msg_data->free, num_ports, Evt_Msg_t *) CKALLOC(msg_data->modified_index, num_ports, int) CKALLOC(msg_data->modified, num_ports, Mif_Boolean_t) for(i = 0; i < num_ports; i++) { msg_data->tail[i] = &(msg_data->head[i]); msg_data->last_step[i] = &(msg_data->head[i]); } /* Don't need to initialize statistics since they were */ /* calloc'ed above */ return(OK); } /* EVTsetup_jobs This function prepares the jobs data for a new simulation. */ static int EVTsetup_jobs( CKTcircuit *ckt) /* The circuit structure */ { int i; int num_jobs; Evt_Job_t *jobs; Evt_Data_t *data; jobs = &(ckt->evt->jobs); data = &(ckt->evt->data); /* Increment the number of jobs */ num_jobs = ++(jobs->num_jobs); /* Allocate/reallocate necessary pointers */ CKREALLOC(jobs->job_name, num_jobs, char *) CKREALLOC(jobs->node_data, num_jobs, Evt_Node_Data_t *) CKREALLOC(jobs->state_data, num_jobs, Evt_State_Data_t *) CKREALLOC(jobs->msg_data, num_jobs, Evt_Msg_Data_t *) CKREALLOC(jobs->statistics, num_jobs, Evt_Statistic_t *) /* Fill in the pointers, etc. for this new job */ i = num_jobs - 1; jobs->job_name[i] = MIFcopy(ckt->CKTcurJob->JOBname); jobs->node_data[i] = data->node; jobs->state_data[i] = data->state; jobs->msg_data[i] = data->msg; jobs->statistics[i] = data->statistics; return(OK); } /* EVTsetup_load_ptrs This function setups up the required data in the MIFinstance structure of event-driven and hybrid instances. */ static int EVTsetup_load_ptrs( CKTcircuit *ckt) /* The circuit structure */ { int i; int j; int k; int num_insts; int num_conn; int num_port; int num_outputs; int node_index; int output_subindex; MIFinstance *fast; Mif_Conn_Data_t *conn; Mif_Port_Type_t type; Mif_Port_Data_t *port; Evt_Node_Data_t *node_data; /* This function setups up the required data in the MIFinstance */ /* structure of event-driven and hybrid instances */ /* Loop through all event-driven and hybrid instances */ num_insts = ckt->evt->counts.num_insts; for(i = 0; i < num_insts; i++) { /* Get the MIFinstance pointer */ fast = ckt->evt->info.inst_table[i]->inst_ptr; /* Loop through all connections */ num_conn = fast->num_conn; for(j = 0; j < num_conn; j++) { /* Skip if connection is null */ if(fast->conn[j]->is_null) continue; conn = fast->conn[j]; /* Loop through all ports */ num_port = conn->size; for(k = 0; k < num_port; k++) { /* Get port data pointer for quick access */ port = conn->port[k]; if(port->is_null) continue; /* Skip if port is not digital or user-defined type */ type = port->type; if((type != MIF_DIGITAL) && (type != MIF_USER_DEFINED)) continue; /* Set input.pvalue to point to rhsold.node_value or to */ /* rhsold.inverted_value as appropriate */ node_index = port->evt_data.node_index; node_data = ckt->evt->data.node; if(conn->is_input) { if(port->invert) { port->input.pvalue = node_data->rhsold[node_index]. inverted_value; } else { port->input.pvalue = node_data->rhsold[node_index]. node_value; } } /* Set output.pvalue to point to rhs.node_value or rhs.output_value[i] */ /* where i is given by the output_subindex in output info */ /* depending on whether more than one output is connected to the node. */ /* Note that this is only for the DCOP analysis. During a transient */ /* analysis, new structures will be created and the pointers will */ /* be set by EVTload */ if(conn->is_output) { num_outputs = ckt->evt->info.node_table[node_index]->num_outputs; if(num_outputs <= 1) { port->output.pvalue = node_data->rhs[node_index]. node_value; } else { output_subindex = port->evt_data.output_subindex; port->output.pvalue = node_data->rhs[node_index]. output_value[output_subindex]; } } } /* end for number of ports */ } /* end for number of connections */ } /* end for number of insts */ return(OK); } ngspice-26/src/xspice/evt/evtop.c0000644000265600020320000002127212264261473016416 0ustar andreasadmin/*============================================================================ FILE EVTop.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTop which is used to perform an operating point analysis in place of CKTop when there are event-driven instances in the circuit. It alternates between doing event-driven iterations with EVTiter and doing analog iterations with NIiter/CKTop until no more event-driven outputs change. INTERFACES EVTop() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/sperror.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" #include "ngspice/evtudn.h" static void EVTnode_compare( CKTcircuit *ckt, int node_index, Evt_Node_t *node1, Evt_Node_t *node2, Mif_Boolean_t *equal); /* EVTop This function is used to perform an operating point analysis in place of CKTop when there are event-driven instances in the circuit. It alternates between doing event-driven iterations with EVTiter and doing analog iterations with NIiter/CKTop until no more event-driven outputs change. */ int EVTop( CKTcircuit *ckt, /* The circuit structure */ long firstmode, /* The SPICE 3C1 CKTop() firstmode parameter */ long continuemode, /* The SPICE 3C1 CKTop() continuemode paramter */ int max_iter, /* The SPICE 3C1 CKTop() max iteration parameter */ Mif_Boolean_t first_call) /* Is this the first time through? */ { int i; int num_insts; int converged; int output_index; int port_index; char *err_msg; Mif_Boolean_t firstime; Evt_Inst_Queue_t *inst_queue; Evt_Output_Queue_t *output_queue; Evt_Output_Info_t **output_table; Evt_Port_Info_t **port_table; /* get data to local storage for fast access */ num_insts = ckt->evt->counts.num_insts; inst_queue = &(ckt->evt->queue.inst); /* Initialize to_call entries in event inst queue */ /* to force calling all event/hybrid instance the first */ /* time through */ if(first_call) { for(i = 0; i < num_insts; i++) { inst_queue->to_call[i] = MIF_TRUE; inst_queue->to_call_index[i] = i; } inst_queue->num_to_call = num_insts; } /* Alternate between event-driven and analog solutions until */ /* there are no changed event-driven outputs */ firstime = MIF_TRUE; for(;;) { /* Call EVTiter to establish initial outputs from */ /* event/hybrid instances with states (e.g. flip-flops) */ ckt->CKTmode = firstmode; converged = EVTiter(ckt); if(converged != 0) return(converged); /* Now do analog solution for current state of hybrid outputs */ /* If first analog solution, call CKTop */ if(firstime) { firstime = MIF_FALSE; converged = CKTop(ckt, firstmode, continuemode, max_iter); if(converged != 0) return(converged); } /* Otherwise attempt to converge with mode = continuemode */ else { ckt->CKTmode = continuemode; converged = NIiter(ckt,max_iter); if(converged != 0) { converged = CKTop(ckt, firstmode, continuemode, max_iter); if(converged != 0) return(converged); } } /* Call all hybrids to allow new event outputs to be posted */ EVTcall_hybrids(ckt); /* Increment count of successful alternations */ (ckt->evt->data.statistics->op_alternations)++; /* If .option card specified not to alternate solutions, exit */ /* immediately with this first pass solution */ if(! ckt->evt->options.op_alternate) return(0); /* If no hybrid instances produced different event outputs, */ /* alternation is completed, so exit */ if(ckt->evt->queue.output.num_changed == 0) return(0); /* If too many alternations, exit with error */ if(ckt->evt->data.statistics->op_alternations >= ckt->evt->limits.max_op_alternations) { SPfrontEnd->IFerror (ERR_WARNING, "Too many analog/event-driven solution alternations", NULL); err_msg = TMALLOC(char, 10000); output_queue = &(ckt->evt->queue.output); output_table = ckt->evt->info.output_table; port_table = ckt->evt->info.port_table; for(i = 0; i < output_queue->num_changed; i++) { output_index = output_queue->changed_index[i]; port_index = output_table[output_index]->port_index; sprintf(err_msg, "\n Instance: %s\n Connection: %s\n Port: %d", port_table[port_index]->inst_name, port_table[port_index]->conn_name, port_table[port_index]->port_num); ENHreport_conv_prob(ENH_EVENT_NODE, port_table[port_index]->node_name, err_msg); } FREE(err_msg); return(E_ITERLIM); } } /* end forever */ } /* EVTop_save Save result from operating point iteration into the node data area. */ void EVTop_save( CKTcircuit *ckt, /* The circuit structure */ Mif_Boolean_t op, /* True if from a DCOP analysis, false if TRANOP, etc. */ double step) { int i; int num_nodes; Mif_Boolean_t equal; Evt_Node_Data_t *node_data; Evt_Node_t *rhsold; Evt_Node_t **head; Evt_Node_t **here; /* char buff[128];*/ /* Get pointers for fast access */ node_data = ckt->evt->data.node; rhsold = node_data->rhsold; head = node_data->head; /* For number of event nodes, copy rhsold to node data */ /* and set the op member if appropriate */ num_nodes = ckt->evt->counts.num_nodes; for(i = 0; i < num_nodes; i++) { /* if head is null, just copy there */ if(head[i] == NULL) { EVTnode_copy(ckt, i, &(rhsold[i]), &(head[i])); head[i]->op = op; head[i]->step = step; } /* Otherwise, add to the end of the list */ else { /* Locate end of list */ here = &(head[i]); for(;;) { if((*here)->next) here = &((*here)->next); else break; } /* Compare entry at end of list to rhsold */ EVTnode_compare(ckt, i, &(rhsold[i]), *here, &equal); /* If new value in rhsold is different, add it to the list */ if(!equal) { here = &((*here)->next); EVTnode_copy(ckt, i, &(rhsold[i]), here); (*here)->op = op; (*here)->step = step; } } /* end else add to end of list */ } /* end for number of nodes */ } /* ************************************************************ */ /* EVTnode_compare This function compares the resolved values of the old and new states on a node. The actual comparison is done by calling the appropriate user-defined node compare function. */ static void EVTnode_compare( CKTcircuit *ckt, /* The circuit structure */ int node_index, /* The index for the node in question */ Evt_Node_t *node1, /* The first value */ Evt_Node_t *node2, /* The second value */ Mif_Boolean_t *equal) /* The computed result */ { Evt_Node_Data_t *node_data; Evt_Node_Info_t **node_table; int udn_index; /* Get data for fast access */ node_data = ckt->evt->data.node; node_table = ckt->evt->info.node_table; udn_index = node_table[node_index]->udn_index; /* Do compare based on changes in resolved node value only */ g_evt_udn_info[udn_index]->compare ( node1->node_value, node2->node_value, equal); } ngspice-26/src/xspice/evt/evtcall_hybrids.c0000644000265600020320000000304612264261473020436 0ustar andreasadmin/*============================================================================ FILE EVTcall_hybrids.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTcall_hybrids which calls all models which have both analog and event-driven ports. It is called following successful evaluation of an analog iteration attempt to allow events to be scheduled by the hybrid models. The 'CALL_TYPE' is set to 'EVENT_DRIVEN' when the model is called from this function. INTERFACES void EVTcall_hybrids(CKTcircuit *ckt) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" /* EVTcall_hybrids This function calls all the hybrid instances. It is called following the successful evaluation of an analog iteration. */ void EVTcall_hybrids( CKTcircuit *ckt) /* the main circuit structure */ { int i; int num_hybrids; int *hybrid_index; /* Get needed data for fast access */ num_hybrids = ckt->evt->counts.num_hybrids; hybrid_index = ckt->evt->info.hybrid_index; /* Call EVTload for all hybrids */ for(i = 0; i < num_hybrids; i++) EVTload(ckt, hybrid_index[i]); } ngspice-26/src/xspice/evt/evtload.c0000644000265600020320000004322512264261473016721 0ustar andreasadmin/*============================================================================ FILE EVTload.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTload which is used to call a specified event-driven or hybrid code model during an event-driven iteration. The 'CALL_TYPE' is set to 'EVENT_DRIVEN' when the model is called from this function. INTERFACES int EVTload(CKTcircuit *ckt, int inst_index) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/mifproto.h" #include "ngspice/evtproto.h" static void EVTcreate_state( CKTcircuit *ckt, int inst_index); static void EVTadd_msg( CKTcircuit *ckt, int port_index, char *msg_text); static void EVTcreate_output_event( CKTcircuit *ckt, int node_index, int output_index, void **value_ptr); static void EVTprocess_output( CKTcircuit *ckt, Mif_Boolean_t changed, int output_index, Mif_Boolean_t invert, double delay); /* EVTload This function calls the code model function for the specified instance with CALL_TYPE set to EVENT_DRIVEN. Event outputs, messages, etc. are processed on return from the code model. Analog outputs, partials, etc. should not be computed by the code model when the call type is event-driven and are ignored. */ int EVTload( CKTcircuit *ckt, /* The circuit structure */ int inst_index) /* The instance to call code model for */ { int i; int j; int num_conn; int num_port; int mod_type; Mif_Conn_Data_t *conn; Mif_Port_Data_t *port; Mif_Private_t cm_data; MIFinstance *inst; Evt_Node_Data_t *node_data; void *value_ptr; /* ***************************** */ /* Prepare the code model inputs */ /* ***************************** */ /* Get pointer to instance data structure and other data */ /* needed for fast access */ inst = ckt->evt->info.inst_table[inst_index]->inst_ptr; node_data = ckt->evt->data.node; /* Setup circuit data in struct to be passed to code model function */ if(inst->initialized) cm_data.circuit.init = MIF_FALSE; else cm_data.circuit.init = MIF_TRUE; cm_data.circuit.anal_init = MIF_FALSE; cm_data.circuit.anal_type = g_mif_info.circuit.anal_type; if(g_mif_info.circuit.anal_type == MIF_TRAN) cm_data.circuit.time = g_mif_info.circuit.evt_step; else cm_data.circuit.time = 0.0; cm_data.circuit.call_type = MIF_EVENT_DRIVEN; cm_data.circuit.temperature = ckt->CKTtemp - 273.15; /* Setup data needed by cm_... functions */ g_mif_info.ckt = ckt; g_mif_info.instance = inst; g_mif_info.errmsg = ""; g_mif_info.circuit.call_type = MIF_EVENT_DRIVEN; if(inst->initialized) g_mif_info.circuit.init = MIF_FALSE; else g_mif_info.circuit.init = MIF_TRUE; /* If after initialization and in transient analysis mode */ /* create a new state for the instance */ if((g_mif_info.circuit.anal_type == MIF_TRAN) && inst->initialized) EVTcreate_state(ckt, inst_index); /* Loop through all connections on the instance and setup */ /* load, total_load, and msg on all ports, and changed flag */ /* and output pointer on all outputs */ num_conn = inst->num_conn; for(i = 0; i < num_conn; i++) { conn = inst->conn[i]; /* if connection is null, continue to next */ if(conn->is_null) continue; /* Loop through each port on the connection */ num_port = conn->size; for(j = 0; j < num_port; j++) { port = conn->port[j]; /* Skip if port is null */ if(port->is_null) continue; /* If port type is Digital or User-Defined */ if((port->type == MIF_DIGITAL) || (port->type == MIF_USER_DEFINED)) { /* Initialize the msg pointer on the port to NULL, */ /* initialize the load value to zero, and get the total load */ port->msg = NULL; port->load = 0.0; port->total_load = node_data->total_load[port->evt_data.node_index]; /* If connection is an output, initialize changed to true */ /* and create a new output event object in the free list */ /* if transient analysis mode */ if(conn->is_output) { port->changed = MIF_TRUE; if(g_mif_info.circuit.anal_type == MIF_TRAN) { EVTcreate_output_event(ckt, port->evt_data.node_index, port->evt_data.output_index, &value_ptr); port->output.pvalue = value_ptr; } } } else { /* Get the analog input value. All we need to do is */ /* set it to zero if mode is INITJCT. Otherwise, value */ /* should still be around from last successful analog call */ if(ckt->CKTmode & MODEINITJCT) port->input.rvalue = 0.0; } } /* end for number of ports */ } /* end for number of connections */ /* Prepare the structure to be passed to the code model */ cm_data.num_conn = inst->num_conn; cm_data.conn = inst->conn; cm_data.num_param = inst->num_param; cm_data.param = inst->param; cm_data.num_inst_var = inst->num_inst_var; cm_data.inst_var = inst->inst_var; /* ******************* */ /* Call the code model */ /* ******************* */ mod_type = inst->MIFmodPtr->MIFmodType; DEVices[mod_type]->DEVpublic.cm_func (&cm_data); /* ****************************** */ /* Process the code model outputs */ /* ****************************** */ /* Loop through all connections and ports and process the msgs */ /* and event outputs */ num_conn = inst->num_conn; for(i = 0; i < num_conn; i++) { conn = inst->conn[i]; if(conn->is_null) continue; /* Loop through each port on the connection */ num_port = conn->size; for(j = 0; j < num_port; j++) { port = conn->port[j]; /* Skip if port is null */ if(port->is_null) continue; /* Process the message if any */ if(port->msg) EVTadd_msg(ckt, port->evt_data.port_index, port->msg); /* If this is the initialization pass, process the load factor */ if(! inst->initialized) { node_data->total_load[port->evt_data.node_index] += port->load; } /* If connection is not an event output, continue to next port */ if(! conn->is_output) continue; if((port->type != MIF_DIGITAL) && (port->type != MIF_USER_DEFINED)) continue; /* If output changed, process it */ EVTprocess_output(ckt, port->changed, port->evt_data.output_index, port->invert, port->delay); /* And prevent erroneous models from overwriting it during */ /* analog iterations */ if(g_mif_info.circuit.anal_type == MIF_TRAN) port->output.pvalue = NULL; } /* end for number of ports */ } /* end for number of connections */ /* Record statistics */ if(g_mif_info.circuit.anal_type == MIF_DC) (ckt->evt->data.statistics->op_load_calls)++; else if(g_mif_info.circuit.anal_type == MIF_TRAN) (ckt->evt->data.statistics->tran_load_calls)++; /* Mark that the instance has been called once */ inst->initialized = MIF_TRUE; return(OK); } /* EVTcreate_state This function creates a new state storage area for a particular instance during an event-driven simulation. New states must be created so that old states are saved and can be accessed by code models in the future. The new state is initialized to the previous state value. */ static void EVTcreate_state( CKTcircuit *ckt, /* The circuit structure */ int inst_index) /* The instance to create state for */ { size_t total_size; Evt_State_Data_t *state_data; Evt_State_t *new_state; Evt_State_t *prev_state; /* Get variables for fast access */ state_data = ckt->evt->data.state; /* Exit immediately if no states on this instance */ if(state_data->desc[inst_index] == NULL) return; /* Get size of state block to be allocated */ total_size = (size_t) state_data->total_size[inst_index]; /* Allocate a new state for the instance */ if(state_data->free[inst_index]) { new_state = state_data->free[inst_index]; state_data->free[inst_index] = new_state->next; } else { new_state = TMALLOC(Evt_State_t, 1); new_state->block = tmalloc(total_size); } /* Splice the new state into the state data linked list */ /* and update the tail pointer */ prev_state = *(state_data->tail[inst_index]); prev_state->next = new_state; new_state->prev = prev_state; state_data->tail[inst_index] = &(prev_state->next); /* Copy the old state to the new state and set the step */ memcpy(new_state->block, prev_state->block, total_size); new_state->step = g_mif_info.circuit.evt_step; /* Mark that the state data on the instance has been modified */ if(! state_data->modified[inst_index]) { state_data->modified[inst_index] = MIF_TRUE; state_data->modified_index[(state_data->num_modified)++] = inst_index; } } /* EVTcreate_output_event This function creates a new output event. */ static void EVTcreate_output_event( CKTcircuit *ckt, /* The circuit structure */ int node_index, /* The node type port is on */ int output_index, /* The output index for this port */ void **value_ptr) /* The event created */ { int udn_index; Evt_Node_Info_t **node_table; Evt_Output_Queue_t *output_queue; Evt_Output_Event_t *event; /* Check the output queue free list and use the structure */ /* at the head of the list if non-null. Otherwise, create a new one. */ output_queue = &(ckt->evt->queue.output); if(output_queue->free[output_index]) { *value_ptr = output_queue->free[output_index]->value; } else { /* Create a new event */ event = TMALLOC(Evt_Output_Event_t, 1); event->next = NULL; /* Initialize the value */ node_table = ckt->evt->info.node_table; udn_index = node_table[node_index]->udn_index; g_evt_udn_info[udn_index]->create (&(event->value)); /* Put the event onto the free list and return the value pointer */ output_queue->free[output_index] = event; *value_ptr = event->value; } } /* EVTadd_msg This function records a message output by a code model into the message results data structure. */ static void EVTadd_msg( CKTcircuit *ckt, /* The circuit structure */ int port_index, /* The port to add message to */ char *msg_text) /* The message text */ { Evt_Msg_Data_t *msg_data; Evt_Msg_t **msg_ptr; Evt_Msg_t *msg; /* Get pointers for fast access */ msg_data = ckt->evt->data.msg; msg_ptr = msg_data->tail[port_index]; /* Set pointer to location at which to add, and update tail */ if(*msg_ptr != NULL) { msg_ptr = &((*msg_ptr)->next); msg_data->tail[port_index] = msg_ptr; } /* Add a new entry in the list of messages for this port */ if(msg_data->free[port_index]) { *msg_ptr = msg_data->free[port_index]; msg_data->free[port_index] = msg_data->free[port_index]->next; } else { *msg_ptr = TMALLOC(Evt_Msg_t, 1); } /* Fill in the values */ msg = *msg_ptr; msg->next = NULL; if((ckt->CKTmode & MODEDCOP) == MODEDCOP) msg->op = MIF_TRUE; else msg->step = g_mif_info.circuit.evt_step; msg->text = MIFcopy(msg_text); /* Update the modified indexes */ if(g_mif_info.circuit.anal_type == MIF_TRAN) { if(! msg_data->modified[port_index]) { msg_data->modified[port_index] = MIF_TRUE; msg_data->modified_index[(msg_data->num_modified)++] = port_index; } } } /* EVTprocess_output This function processes an event-driven output produced by a code model. If transient analysis mode, the event is placed into the output queue according to its (non-zero) delay. If DC analysis, the event is processed immediately. */ static void EVTprocess_output( CKTcircuit *ckt, /* The circuit structure */ Mif_Boolean_t changed, /* Has output changed? */ int output_index, /* The output of interest */ Mif_Boolean_t invert, /* Does output need to be inverted? */ double delay) /* The output delay in transient analysis */ { int num_outputs; int node_index; int udn_index; int output_subindex; Evt_Output_Info_t **output_table; Evt_Node_Info_t **node_table; Evt_Node_t *rhs; Evt_Node_t *rhsold; Evt_Output_Queue_t *output_queue; Evt_Output_Event_t *output_event; Mif_Boolean_t equal; output_queue = &(ckt->evt->queue.output); output_table = ckt->evt->info.output_table; node_table = ckt->evt->info.node_table; node_index = output_table[output_index]->node_index; udn_index = node_table[node_index]->udn_index; /* if transient analysis, just put the output event on the queue */ /* to be processed at a later time */ if(g_mif_info.circuit.anal_type == MIF_TRAN) { /* If model signaled that output was not posted, */ /* leave the event struct on the free list and return */ if((! changed) || (delay <= 0.0)) { if(changed && (delay <= 0.0)) printf("\nERROR - Output delay <= 0 not allowed - output ignored!\n"); return; } /* Remove the (now used) struct from the head of the free list */ output_event = output_queue->free[output_index]; output_queue->free[output_index] = output_event->next; /* Invert the output value if necessary */ if(invert) g_evt_udn_info[udn_index]->invert (output_event->value); /* Add it to the queue */ EVTqueue_output(ckt, output_index, udn_index, output_event, g_mif_info.circuit.evt_step, g_mif_info.circuit.evt_step + delay); return; } /* If not transient analysis, process immediately. */ /* Determine if output has changed from rhsold value */ /* and put entry in output queue changed list if so */ else { /* If model signaled that output was not posted, */ /* just return */ if(! changed) return; /* if(delay > 0.0) printf("\nWARNING - Non-zero output delay not allowed in DCOP - delay ignored!\n"); */ rhs = ckt->evt->data.node->rhs; rhsold = ckt->evt->data.node->rhsold; /* Determine if changed */ num_outputs = node_table[node_index]->num_outputs; if(num_outputs > 1) { output_subindex = output_table[output_index]->output_subindex; if(invert) g_evt_udn_info[udn_index]->invert (rhs[node_index].output_value[output_subindex]); g_evt_udn_info[udn_index]->compare (rhs[node_index].output_value[output_subindex], rhsold[node_index].output_value[output_subindex], &equal); if(! equal) { g_evt_udn_info[udn_index]->copy (rhs[node_index].output_value[output_subindex], rhsold[node_index].output_value[output_subindex]); } } else { if(invert) g_evt_udn_info[udn_index]->invert (rhs[node_index].node_value); g_evt_udn_info[udn_index]->compare (rhs[node_index].node_value, rhsold[node_index].node_value, &equal); if(! equal) { g_evt_udn_info[udn_index]->copy (rhs[node_index].node_value, rhsold[node_index].node_value); } } /* If changed, put in changed list of output queue */ if(! equal) { if(! output_queue->changed[output_index]) { output_queue->changed[output_index] = MIF_TRUE; output_queue->changed_index[(output_queue->num_changed)++] = output_index; } } return; } /* end else process immediately */ } ngspice-26/src/xspice/evt/evtiter.c0000644000265600020320000002157112264261473016745 0ustar andreasadmin/*============================================================================ FILE EVTiter.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTiter which iterates through event-driven outputs and instances until the outputs no longer change. INTERFACES int EVTiter(CKTcircuit *ckt) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" //#include "misc.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/sperror.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/evtproto.h" /* EVTiter This function iterates through event-driven outputs and instances until the outputs no longer change. The general algorithm used is: Do: Scan list of changed outputs Put items on the node queue 'to_eval' list for each changed output. Scan list of changed nodes Resolve nodes with multiple outputs posted. Create inverted state for nodes with attached inverted inputs. Put items on the instance queue 'to_call' list for each changed node. If transient analysis, put state of the node into the node data structure. Scan instance to_call list Call EVTload for each instance on list. While there are changed outputs */ int EVTiter( CKTcircuit *ckt) /* the circuit structure */ { int i; int num_changed; int num_to_eval; int num_to_call; int output_index; /* int output_subindex;*/ int inst_index; int node_index; int port_index; int num_outputs; int udn_index; int passes; Evt_Ckt_Data_t *evt; Evt_Output_Queue_t *output_queue; Evt_Node_Queue_t *node_queue; Evt_Inst_Queue_t *inst_queue; Evt_Output_Info_t **output_table; Evt_Node_Info_t **node_table; Evt_Port_Info_t **port_table; Evt_Inst_Index_t *inst_list; Evt_Node_Data_t *node_data; Evt_Node_t *rhs; Evt_Node_t *rhsold; Evt_Node_t *node; Mif_Boolean_t equal; char *err_msg; /* Get temporary pointers for fast access */ evt = ckt->evt; output_queue = &(evt->queue.output); node_queue = &(evt->queue.node); inst_queue = &(evt->queue.inst); output_table = evt->info.output_table; node_table = evt->info.node_table; port_table = evt->info.port_table; node_data = evt->data.node; rhs = node_data->rhs; rhsold = node_data->rhsold; /* Loop until no more output change, or too many passes through loop */ for(passes = 0; passes < evt->limits.max_event_passes; passes++) { /* Create list of nodes to evaluate from list of changed outputs */ num_changed = output_queue->num_changed; for(i = 0; i < num_changed; i++) { /* Get index of node that output is connected to */ output_index = output_queue->changed_index[i]; node_index = output_table[output_index]->node_index; /* If not already on list of nodes to evaluate, add it */ if(! node_queue->to_eval[node_index]) { node_queue->to_eval[node_index] = MIF_TRUE; node_queue->to_eval_index[(node_queue->num_to_eval)++] = node_index; } /* Reset the changed flag on the output queue */ output_queue->changed[output_index] = MIF_FALSE; } output_queue->num_changed = 0; /* Evaluate nodes and for any which have changed, enter */ /* the instances that receive inputs from them on the list */ /* of instances to call */ num_to_eval = node_queue->num_to_eval; for(i = 0; i < num_to_eval; i++) { /* Get the node index, udn index and number of outputs */ node_index = node_queue->to_eval_index[i]; udn_index = node_table[node_index]->udn_index; num_outputs = node_table[node_index]->num_outputs; /* Resolve the node value if multiple outputs on it */ /* and test if new node value is different than old value */ if(num_outputs > 1) { g_evt_udn_info[udn_index]->resolve (num_outputs, rhs[node_index].output_value, rhs[node_index].node_value); g_evt_udn_info[udn_index]->compare (rhs[node_index].node_value, rhsold[node_index].node_value, &equal); if(! equal) { g_evt_udn_info[udn_index]->copy (rhs[node_index].node_value, rhsold[node_index].node_value); } } /* Else, load function has already determined that they were */ /* not equal */ else equal = MIF_FALSE; /* If not equal, make inverted copy in rhsold if */ /* needed, and place indexes of instances with inputs connected */ /* to the node in the to_call list of inst queue */ if(! equal) { if(node_table[node_index]->invert) { g_evt_udn_info[udn_index]->copy (rhsold[node_index].node_value, rhsold[node_index].inverted_value); g_evt_udn_info[udn_index]->invert (rhsold[node_index].inverted_value); } inst_list = node_table[node_index]->inst_list; while(inst_list) { inst_index = inst_list->index; if(! inst_queue->to_call[inst_index]) { inst_queue->to_call[inst_index] = MIF_TRUE; inst_queue->to_call_index[(inst_queue->num_to_call)++] = inst_index; } inst_list = inst_list->next; } /* end while instances with inputs on node */ } /* end if not equal */ /* If transient analysis mode */ /* Save the node data onto the node results list and mark */ /* that it has been modified, even if the */ /* resolved node value has not changed */ if(g_mif_info.circuit.anal_type == MIF_TRAN) { node = *(node_data->tail[node_index]); node_data->tail[node_index] = &(node->next); EVTnode_copy(ckt, node_index, &(rhsold[node_index]), &(node->next)); node->next->step = g_mif_info.circuit.evt_step; if(! node_data->modified[node_index]) { node_data->modified[node_index] = MIF_TRUE; node_data->modified_index[(node_data->num_modified)++] = node_index; } } /* Reset the to_eval flag on the node queue */ node_queue->to_eval[node_index] = MIF_FALSE; } /* end for number of nodes to evaluate */ node_queue->num_to_eval = 0; /* Call the instances with inputs on nodes that have changed */ num_to_call = inst_queue->num_to_call; for(i = 0; i < num_to_call; i++) { inst_index = inst_queue->to_call_index[i]; inst_queue->to_call[inst_index] = MIF_FALSE; EVTload(ckt, inst_index); } inst_queue->num_to_call = 0; /* Record statistics */ if(g_mif_info.circuit.anal_type == MIF_DC) (ckt->evt->data.statistics->op_event_passes)++; /* If no outputs changed, iteration is over, so return with success! */ if(output_queue->num_changed == 0) return(0); } /* end for */ /* Too many passes through loop, report problems and exit with error */ err_msg = TMALLOC(char, 10000); for(i = 0; i < output_queue->num_changed; i++) { output_index = output_queue->changed_index[i]; port_index = output_table[output_index]->port_index; sprintf(err_msg, "\n Instance: %s\n Connection: %s\n Port: %d", port_table[port_index]->inst_name, port_table[port_index]->conn_name, port_table[port_index]->port_num); ENHreport_conv_prob(ENH_EVENT_NODE, port_table[port_index]->node_name, err_msg); } FREE(err_msg); SPfrontEnd->IFerror (ERR_WARNING, "Too many iteration passes in event-driven circuits", NULL); return(E_ITERLIM); } ngspice-26/src/xspice/evt/evtaccept.c0000644000265600020320000001122112264261473017230 0ustar andreasadmin/*============================================================================ FILE EVTaccept.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains a function called at the end of a successful (accepted) analog timepoint. It saves pointers to the states of the queues and data at this accepted time. INTERFACES void EVTaccept(CKTcircuit *ckt, double time) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /*=== INCLUDE FILES ===*/ #include "ngspice/config.h" #include #include "ngspice/cktdefs.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" /* EVTaccept() This function is called at the end of a successful (accepted) analog timepoint. It saves pointers to the states of the queues and data at this accepted time. */ void EVTaccept( CKTcircuit *ckt, /* main circuit struct */ double time) /* time at which analog soln was accepted */ { int i; int index; int num_modified; Evt_Inst_Queue_t *inst_queue; Evt_Output_Queue_t *output_queue; Evt_Node_Data_t *node_data; Evt_State_Data_t *state_data; Evt_Msg_Data_t *msg_data; /* Exit if no event instances */ if(ckt->evt->counts.num_insts == 0) return; /* Get often used pointers */ inst_queue = &(ckt->evt->queue.inst); output_queue = &(ckt->evt->queue.output); node_data = ckt->evt->data.node; state_data = ckt->evt->data.state; msg_data = ckt->evt->data.msg; /* Process the inst queue */ num_modified = inst_queue->num_modified; /* Loop through list of items modified since last time */ for(i = 0; i < num_modified; i++) { /* Get the index of the inst modified */ index = inst_queue->modified_index[i]; /* Update last_step for this index */ inst_queue->last_step[index] = inst_queue->current[index]; /* Reset the modified flag */ inst_queue->modified[index] = MIF_FALSE; } /* Record the new last_time and reset number modified to zero */ inst_queue->last_time = time; inst_queue->num_modified = 0; /* Process the output queue */ num_modified = output_queue->num_modified; /* Loop through list of items modified since last time */ for(i = 0; i < num_modified; i++) { /* Get the index of the output modified */ index = output_queue->modified_index[i]; /* Update last_step for this index */ output_queue->last_step[index] = output_queue->current[index]; /* Reset the modified flag */ output_queue->modified[index] = MIF_FALSE; } /* Record the new last_time and reset number modified to zero */ output_queue->last_time = time; output_queue->num_modified = 0; /* Process the node data */ num_modified = node_data->num_modified; /* Loop through list of items modified since last time */ for(i = 0; i < num_modified; i++) { /* Get the index of the node modified */ index = node_data->modified_index[i]; /* Update last_step for this index */ node_data->last_step[index] = node_data->tail[index]; /* Reset the modified flag */ node_data->modified[index] = MIF_FALSE; } /* Reset number modified to zero */ node_data->num_modified = 0; /* Process the state data */ num_modified = state_data->num_modified; /* Loop through list of items modified since last time */ for(i = 0; i < num_modified; i++) { /* Get the index of the state modified */ index = state_data->modified_index[i]; /* Update last_step for this index */ state_data->last_step[index] = state_data->tail[index]; /* Reset the modified flag */ state_data->modified[index] = MIF_FALSE; } /* Reset number modified to zero */ state_data->num_modified = 0; /* Process the msg data */ num_modified = msg_data->num_modified; /* Loop through list of items modified since last time */ for(i = 0; i < num_modified; i++) { /* Get the index of the msg modified */ index = msg_data->modified_index[i]; /* Update last_step for this index */ msg_data->last_step[index] = msg_data->tail[index]; /* Reset the modified flag */ msg_data->modified[index] = MIF_FALSE; } /* Reset number modified to zero */ msg_data->num_modified = 0; } /* EVTaccept */ ngspice-26/src/xspice/evt/evtdeque.c0000644000265600020320000002327212264261473017105 0ustar andreasadmin/*============================================================================ FILE EVTdequeue.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTdequeue which removes any items on the output and instance queues with event times matching the specified simulation time. INTERFACES void EVTdequeue(CKTcircuit *ckt, double time) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/evtproto.h" static void EVTdequeue_output(CKTcircuit *ckt, double time); static void EVTdequeue_inst(CKTcircuit *ckt, double time); static void EVTprocess_output( CKTcircuit *ckt, int output_index, void *value); /* EVTdequeue This function removes any items on the output and instance queues with event times matching the specified simulation time. EVTiter is then called to determine which instances need to be called. */ void EVTdequeue( CKTcircuit *ckt, /* The circuit structure */ double time) /* The event time of the events to dequeue */ { /* Take all items on output queue with matching time */ /* and set changed flags in output queue */ EVTdequeue_output(ckt, time); /* Take all items on inst queue with matching time */ /* and set to_call flags in inst queue */ EVTdequeue_inst(ckt, time); } /* EVTdequeue_output This function de-queues output events with times matching the specified time. */ static void EVTdequeue_output( CKTcircuit *ckt, /* The circuit structure */ double time) /* The event time of the events to dequeue */ { int i; int j; int num_pending; int index; int output_index; double next_time; double event_time; Evt_Output_Queue_t *output_queue; Evt_Output_Event_t *output; Evt_Output_Event_t **output_ptr; /* Get pointers for fast access */ output_queue = &(ckt->evt->queue.output); /* Exit if nothing pending on output queue or if next_time */ /* != specified time */ if(output_queue->num_pending == 0) return; if(output_queue->next_time != time) return; /* Scan the list of outputs pending */ num_pending = output_queue->num_pending; for(i = 0; i < num_pending; i++) { /* Get the index of the output */ index = output_queue->pending_index[i]; /* Get pointer to next event in queue at this index */ output = *(output_queue->current[index]); /* If event time does not match current time, skip */ if(output->event_time != time) continue; /* It must match, so pull the event from the queue and process it */ EVTprocess_output(ckt, index, output->value); /* Move current to point to next non-removed item in list */ output_ptr = &(output->next); output = *output_ptr; while(output) { if(! output->removed) break; output_ptr = &(output->next); output = *output_ptr; } output_queue->current[index] = output_ptr; /* Mark that this index in the queue has been modified */ if(! output_queue->modified[index]) { output_queue->modified[index] = MIF_TRUE; output_queue->modified_index[(output_queue->num_modified)++] = index; } } /* Update/compact the pending list and update the next_time */ next_time = 1e30; for(i = 0, j = 0; i < num_pending; i++) { output_index = output_queue->pending_index[i]; output = *(output_queue->current[output_index]); /* If nothing in queue at last_step, remove this index from the pending list */ if(! output) { output_queue->pending[output_index] = MIF_FALSE; (output_queue->num_pending)--; } /* else, keep the index and update the next time */ else { output_queue->pending_index[j] = output_queue->pending_index[i]; j++; event_time = output->event_time; if(event_time < next_time) next_time = event_time; } } output_queue->next_time = next_time; } /* EVTdequeue_inst This function de-queues instance events with times matching the specified time. */ void EVTdequeue_inst( CKTcircuit *ckt, /* The circuit structure */ double time) /* The event time of the events to dequeue */ { int i; int j; int num_pending; int index; int inst_index; double next_time; double event_time; Evt_Inst_Queue_t *inst_queue; Evt_Inst_Event_t *inst; /* Get pointers for fast access */ inst_queue = &(ckt->evt->queue.inst); /* Exit if nothing pending on inst queue or if next_time */ /* != specified time */ if(inst_queue->num_pending == 0) return; if(inst_queue->next_time != time) return; /* Scan the list of insts pending */ num_pending = inst_queue->num_pending; for(i = 0; i < num_pending; i++) { /* Get the index of the inst */ index = inst_queue->pending_index[i]; /* Get pointer to next event in queue at this index */ inst = *(inst_queue->current[index]); /* If event time does not match current time, skip */ if(inst->event_time != time) continue; /* It must match, so pull the event from the queue and process it */ if(! inst_queue->to_call[index]) { inst_queue->to_call[index] = MIF_TRUE; inst_queue->to_call_index[(inst_queue->num_to_call)++] = index; } /* Move current to point to next item in list */ inst_queue->current[index] = &(inst->next); /* Mark that this index in the queue has been modified */ if(! inst_queue->modified[index]) { inst_queue->modified[index] = MIF_TRUE; inst_queue->modified_index[(inst_queue->num_modified)++] = index; } } /* Update/compact the pending list and update the next_time */ next_time = 1e30; for(i = 0, j = 0; i < num_pending; i++) { inst_index = inst_queue->pending_index[i]; inst = *(inst_queue->current[inst_index]); /* If nothing in queue at last_step, remove this index from the pending list */ if(! inst) { inst_queue->pending[inst_index] = MIF_FALSE; (inst_queue->num_pending)--; } /* else, keep the index and update the next time */ else { inst_queue->pending_index[j] = inst_queue->pending_index[i]; j++; event_time = inst->event_time; if(event_time < next_time) next_time = event_time; } } inst_queue->next_time = next_time; } /* EVTprocess_output This function processes a specified output after it is pulled from the queue. */ static void EVTprocess_output( CKTcircuit *ckt, /* The circuit structure */ int output_index, /* The index of the output to process */ void *value) /* The output value */ { int num_outputs; int node_index; int udn_index; int output_subindex; Evt_Output_Info_t **output_table; Evt_Node_Info_t **node_table; Evt_Node_t *rhs; Evt_Node_t *rhsold; Evt_Output_Queue_t *output_queue; Mif_Boolean_t equal; output_table = ckt->evt->info.output_table; node_table = ckt->evt->info.node_table; node_index = output_table[output_index]->node_index; num_outputs = node_table[node_index]->num_outputs; udn_index = node_table[node_index]->udn_index; rhs = ckt->evt->data.node->rhs; rhsold = ckt->evt->data.node->rhsold; /* Determine if output is different from rhsold value */ /* and copy it to rhs AND rhsold if so */ /* This is somewhat inefficient, but that's the way */ /* we have setup the structures (rhs and rhsold must match)... */ if(num_outputs > 1) { output_subindex = output_table[output_index]->output_subindex; g_evt_udn_info[udn_index]->compare (value, rhsold[node_index].output_value[output_subindex], &equal); if(! equal) { g_evt_udn_info[udn_index]->copy (value, rhs[node_index].output_value[output_subindex]); g_evt_udn_info[udn_index]->copy (value, rhsold[node_index].output_value[output_subindex]); } } else { g_evt_udn_info[udn_index]->compare (value, rhsold[node_index].node_value, &equal); if(! equal) { g_evt_udn_info[udn_index]->copy (value, rhs[node_index].node_value); g_evt_udn_info[udn_index]->copy (value, rhsold[node_index].node_value); } } /* If different, put in changed list of output queue */ if(! equal) { output_queue = &(ckt->evt->queue.output); if(! output_queue->changed[output_index]) { output_queue->changed[output_index] = MIF_TRUE; output_queue->changed_index[(output_queue->num_changed)++] = output_index; } } } ngspice-26/src/xspice/evt/evttermi.c0000644000265600020320000003431512264261473017122 0ustar andreasadmin/*============================================================================ FILE EVTtermInsert.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTtermInsert which is called by MIF_INP2A during the parsing of the input deck. EVTtermInsert is similar to SPICE3's INPtermInsert except that it is used when the node type is event-driven. Calls to this function build the info lists for instances, nodes, outputs, and ports. The completion of the info struct is carried out by EVTinit following the parsing of all instances in the deck. INTERFACES void EVTtermInsert( CKTcircuit *ckt, MIFinstance *fast, char *node_name, char *type_name, int conn_num, int port_num, char **err_msg) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" //#include "misc.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/mifproto.h" #include "ngspice/evtproto.h" static void EVTinst_insert( CKTcircuit *ckt, MIFinstance *fast, int *inst_index, char **err_msg); static void EVTnode_insert( CKTcircuit *ckt, MIFinstance *fast, int inst_index, char *node_name, char *type_name, int conn_num, int port_num, int *node_index, int *output_subindex, char **err_msg); static void EVTport_insert( CKTcircuit *ckt, MIFinstance *fast, int inst_index, int node_index, char *node_name, int conn_num, int port_num, int *port_index, char **err_msg); static void EVToutput_insert( CKTcircuit *ckt, MIFinstance *fast, int inst_index, int node_index, int port_index, int output_subindex, int conn_num, int port_num, char **err_msg); /* EVTtermInsert This function is called by MIF_INP2A during the parsing of the input deck. EVTtermInsert is similar to 3C1's INPtermInsert except that it is used when the node type is event-driven. Calls to this function build the info lists for instances, nodes, outputs, and ports. The completion of the info struct is carried out by EVTinit following the parsing of all instances in the deck. */ void EVTtermInsert( CKTcircuit *ckt, /* The circuit structure */ MIFinstance *fast, /* The instance being parsed */ char *node_name, /* The node name */ char *type_name, /* The type of node */ int conn_num, /* The port connection number */ int port_num, /* The sub-port number - 0 for scalar ports */ char **err_msg) /* Returned error message if any */ { int inst_index; int node_index; int port_index; int output_subindex; /* Get the instance index and create new entry in inst */ /* info list if this is a new instance. */ EVTinst_insert(ckt, fast, &inst_index, err_msg); if(*err_msg) return; /* Get the node index and create new entry in node info */ /* list if this is a new node */ EVTnode_insert(ckt, fast, inst_index, node_name, type_name, conn_num, port_num, &node_index, &output_subindex, err_msg); if(*err_msg) return; /* Create new entry in port info list and return port index */ EVTport_insert(ckt, fast, inst_index, node_index, node_name, conn_num, port_num, &port_index, err_msg); if(*err_msg) return; /* Create new entry in output info list if appropriate */ if(fast->conn[conn_num]->is_output) { EVToutput_insert(ckt, fast, inst_index, node_index, port_index, output_subindex, conn_num, port_num, err_msg); if(*err_msg) return; } } /* EVTinst_insert This function locates or creates a new entry for the specified instance in the event-driven ``info'' structures during parsing. */ static void EVTinst_insert( CKTcircuit *ckt, /* The circuit structure */ MIFinstance *fast, /* The instance being parsed */ int *inst_index, /* The index found or added */ char **err_msg) /* Error message if any */ { Mif_Boolean_t found; int index; Evt_Inst_Info_t *inst; Evt_Inst_Info_t **inst_ptr; NG_IGNORE(err_msg); /* Scan list of instances in event structure to see if already there */ /* and get the index */ found = MIF_FALSE; index = 0; inst = ckt->evt->info.inst_list; inst_ptr = &(ckt->evt->info.inst_list); while(inst) { if(inst->inst_ptr == fast) { found = MIF_TRUE; break; } else { index++; inst_ptr = &(inst->next); inst = inst->next; } } /* If not found, create a new entry in list and increment the */ /* instance count in the event structure */ if(! found) { *inst_ptr = TMALLOC(Evt_Inst_Info_t, 1); inst = *inst_ptr; inst->next = NULL; inst->inst_ptr = fast; index = ckt->evt->counts.num_insts; (ckt->evt->counts.num_insts)++; } /* Record the inst index in the MIFinstance structure and return it */ fast->inst_index = index; *inst_index = index; } /* EVTnode_insert This function locates or creates a new entry for the specified node in the event-driven ``info'' structures during parsing. */ static void EVTnode_insert( CKTcircuit *ckt, /* The circuit structure */ MIFinstance *fast, /* The instance being parsed */ int inst_index, /* The index of inst in evt structures */ char *node_name, /* The node name */ char *type_name, /* The node type specified */ int conn_num, /* The port connection number */ int port_num, /* The sub-port number - 0 if scalar port */ int *node_index, /* The node index found or added */ int *output_subindex, /* The output number on this node */ char **err_msg) /* Error message text if any */ { int i; int udn_index=0; Mif_Boolean_t found; int index; Evt_Node_Info_t *node; Evt_Node_Info_t **node_ptr; Evt_Inst_Index_t *inst; Evt_Inst_Index_t **inst_ptr; /* *************************************** */ /* Get and check the node type information */ /* *************************************** */ /* Scan the list of user-defined node types and get the index */ found = MIF_FALSE; for(i = 0; i < g_evt_num_udn_types; i++) { if(strcmp(type_name, g_evt_udn_info[i]->name) == 0) { udn_index = i; found = MIF_TRUE; break; } } /* Report error if not recognized */ if(! found) { *err_msg = "Unrecognized connection type"; return; } /* If inverted, check to be sure invert function exists for type */ if(fast->conn[conn_num]->port[port_num]->invert) { if(g_evt_udn_info[udn_index]->invert == NULL) { *err_msg = "Connection type cannot be inverted"; return; } } /* ******************************************* */ /* Find/create entry in event-driven node list */ /* ******************************************* */ /* Scan list of nodes in event structure to see if already there */ /* and get the index */ found = MIF_FALSE; index = 0; node = ckt->evt->info.node_list; node_ptr = &(ckt->evt->info.node_list); while(node) { if(strcmp(node_name, node->name) == 0) { found = MIF_TRUE; break; } else { index++; node_ptr = &(node->next); node = node->next; } } /* If found, verify that connection type is same as type of node */ if(found) { if(udn_index != node->udn_index) { *err_msg = "Node cannot have two different types"; return; } } /* If not found, create a new entry in list and increment the */ /* node count in the event structure */ if(! found) { *node_ptr = TMALLOC(Evt_Node_Info_t, 1); node = *node_ptr; node->next = NULL; node->name = MIFcopy(node_name); node->udn_index = udn_index; index = ckt->evt->counts.num_nodes; (ckt->evt->counts.num_nodes)++; } /* ******************************************* */ /* Update remaining items in node list struct */ /* ******************************************* */ /* Update flag on node that indicates if inversion is used by any */ /* instance inputs */ if(fast->conn[conn_num]->is_input) if(! node->invert) node->invert = fast->conn[conn_num]->port[port_num]->invert; /* Increment counts of ports, outputs connected to node */ (node->num_ports)++; if(fast->conn[conn_num]->is_output) (node->num_outputs)++; /* If this is an input, add instance to list if not already there */ if(fast->conn[conn_num]->is_input) { found = MIF_FALSE; inst = node->inst_list; inst_ptr = &(node->inst_list); while(inst) { if(inst_index == inst->index) { found = MIF_TRUE; break; } else { inst_ptr = &(inst->next); inst = inst->next; } } if(! found) { (node->num_insts)++; *inst_ptr = TMALLOC(Evt_Inst_Index_t, 1); inst = *inst_ptr; inst->next = NULL; inst->index = inst_index; } } /* Record the node index in the MIFinstance structure */ fast->conn[conn_num]->port[port_num]->evt_data.node_index = index; /* Return the node index */ *node_index = index; if(fast->conn[conn_num]->is_output) *output_subindex = node->num_outputs - 1; else *output_subindex = 0; /* just for safety - shouldn't need this */ } /* EVTport_insert This function locates or creates a new entry for the specified port in the event-driven ``info'' structures during parsing. */ static void EVTport_insert( CKTcircuit *ckt, /* The circuit structure */ MIFinstance *fast, /* The instance being parsed */ int inst_index, /* The index of inst in evt structures */ int node_index, /* The index of the node in evt structures */ char *node_name, /* The node name */ int conn_num, /* The port connection number */ int port_num, /* The sub-port number - 0 if scalar port */ int *port_index, /* The port index found or added */ char **err_msg) /* Error message text if any */ { Evt_Port_Info_t *port; Evt_Port_Info_t **port_ptr; int index; NG_IGNORE(err_msg); /* Find the end of the port info list */ port = ckt->evt->info.port_list; port_ptr = &(ckt->evt->info.port_list); index = 0; while(port) { port_ptr = &(port->next); port = port->next; index++; } /* Update the port count and create a new entry in the list */ (ckt->evt->counts.num_ports)++; *port_ptr = TMALLOC(Evt_Port_Info_t, 1); port = *port_ptr; /* Fill in the elements */ port->next = NULL; port->inst_index = inst_index; port->node_index = node_index; port->node_name = MIFcopy(node_name); port->inst_name = MIFcopy(fast->MIFname); port->conn_name = MIFcopy(fast->conn[conn_num]->name); port->port_num = port_num; /* Record the port index in the MIFinstance structure */ fast->conn[conn_num]->port[port_num]->evt_data.port_index = index; /* Return the port index */ *port_index = index; } /* EVToutput_insert This function locates or creates a new entry for the specified output in the event-driven ``info'' structures during parsing. */ static void EVToutput_insert( CKTcircuit *ckt, /* The circuit structure */ MIFinstance *fast, /* The instance being parsed */ int inst_index, /* The index of inst in evt structures */ int node_index, /* The index of the node in evt structures */ int port_index, /* The index of the port in the evt structures */ int output_subindex, /* The output on this node */ int conn_num, /* The port connection number */ int port_num, /* The sub-port number - 0 if scalar port */ char **err_msg) /* Error message text if any */ { Evt_Output_Info_t *output; Evt_Output_Info_t **output_ptr; int index; NG_IGNORE(err_msg); /* Find the end of the port info list */ output = ckt->evt->info.output_list; output_ptr = &(ckt->evt->info.output_list); index = 0; while(output) { output_ptr = &(output->next); output = output->next; index++; } /* Update the port count and create a new entry in the list */ (ckt->evt->counts.num_outputs)++; *output_ptr = TMALLOC(Evt_Output_Info_t, 1); output = *output_ptr; /* Fill in the elements */ output->next = NULL; output->inst_index = inst_index; output->node_index = node_index; output->port_index = port_index; output->output_subindex = output_subindex; /* Record the output index and subindex in the MIFinstance structure */ fast->conn[conn_num]->port[port_num]->evt_data.output_index = index; fast->conn[conn_num]->port[port_num]->evt_data.output_subindex = output_subindex; } ngspice-26/src/xspice/evt/evtnext_time.c0000644000265600020320000000360512264261473017774 0ustar andreasadmin/*============================================================================ FILE EVTnext_time.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTnext_time which determines and returns the time of the next scheduled event on the inst and output queues. INTERFACES double EVTnext_time(CKTcircuit *ckt) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" /* EVTnext_time Get the next event time as the minimum of the next times in the inst and output queues. If no next time in either, return machine infinity. */ double EVTnext_time( CKTcircuit *ckt) /* The circuit structure */ { double next_time; Evt_Inst_Queue_t *inst_queue; Evt_Output_Queue_t *output_queue; /* Initialize next time to machine infinity */ next_time = 1e30; /* Get pointers for fast access */ inst_queue = &(ckt->evt->queue.inst); output_queue = &(ckt->evt->queue.output); /* If anything pending in inst queue, set next time */ /* to minimum of itself and the inst queue next time */ if(inst_queue->num_pending) if(inst_queue->next_time < next_time) next_time = inst_queue->next_time; /* If anything pending in output queue, set next time */ /* to minimum of itself and the output queue next time */ if(output_queue->num_pending) if(output_queue->next_time < next_time) next_time = output_queue->next_time; return(next_time); } ngspice-26/src/xspice/evt/evtinit.c0000644000265600020320000002705212264261473016745 0ustar andreasadmin/*============================================================================ FILE EVTinit.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTinit which allocates and initializes evt structure elements after the number of instances, nodes, etc. have been determined in parsing during INPpas2. EVTinit also checks to be sure no nodes have been used for both analog and event-driven algorithms simultaneously. INTERFACES int EVTinit(CKTcircuit *ckt) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/sperror.h" #include "ngspice/evtproto.h" static int EVTcheck_nodes(CKTcircuit *ckt); static int EVTcount_hybrids(CKTcircuit *ckt); static int EVTinit_info(CKTcircuit *ckt); static int EVTinit_queue(CKTcircuit *ckt); static int EVTinit_limits(CKTcircuit *ckt); /* Allocation macro with built-in check for out-of-memory */ /* Adapted from SPICE 3C1 code in CKTsetup.c */ #define CKALLOC(var,size,type) \ if(size) { \ if((var = TMALLOC(type, size)) == NULL) \ return(E_NOMEM); \ } /* EVTinit Allocate and initialize additional evt structure elements now that we can determine the number of instances, nodes, etc. Also check to be sure that no nodes have been used in both event-driven and analog domains. In this version, we also report an error if there are no hybrids in the circuit. This restriction may be removed in the future to allow the simulator to be used with digital only circuits... */ int EVTinit( CKTcircuit *ckt) /* the circuit structure */ { int err; /* SPICE error return code 0 = OK */ /* static char *err_no_hybrids = "ERROR - no hybrids found in input deck";*/ /* Exit immediately if there are no event-driven instances */ /* but don't complain */ if(ckt->evt->counts.num_insts == 0) return(OK); /* Count the number of hybrids and hybrid outputs */ err = EVTcount_hybrids(ckt); if(err) return(err); /* Exit with error if there are no hybrids in the circuit. */ /* Will probably remove this restriction later... */ /* if(ckt->evt->counts.num_hybrids == 0) { errMsg = TMALLOC(char, strlen(err_no_hybrids) + 1); strcpy(errMsg, err_no_hybrids); return(E_PRIVATE); } */ /* Check that event nodes have not been used as analog nodes also */ err = EVTcheck_nodes(ckt); if(err) return(err); /* Create info table arrays */ err = EVTinit_info(ckt); if(err) return(err); /* Setup queues */ err = EVTinit_queue(ckt); if(err) return(err); /* Initialize limits */ err = EVTinit_limits(ckt); if(err) return(err); /* Note: Options were initialized in CKTinit so that INPpas2 */ /* could set values according to .options cards in deck. The */ /* structure 'jobs' will be setup immediately prior to each */ /* simulation job. The results data structure is also */ /* allocated immediately prior to each simulation job. */ /* Return */ return(OK); } /* EVTcount_hybrids Count the number of hybrids and the number of outputs on all hybrids. */ static int EVTcount_hybrids( CKTcircuit *ckt) /* The circuit structure */ { int i; int j; int num_hybrids; int num_hybrid_outputs; int num_conn; int num_port; MIFinstance *fast; Evt_Inst_Info_t *inst; /* Count number of hybrids and hybrid outputs in the inst list */ /* created during parsing. Note: other counts */ /* are created during parsing, but these were */ /* too difficult to do until now... */ num_hybrids = 0; num_hybrid_outputs = 0; inst = ckt->evt->info.inst_list; while(inst) { fast = inst->inst_ptr; if(fast->analog && fast->event_driven) { num_hybrids++; num_conn = fast->num_conn; for(i = 0; i < num_conn; i++) { if((! fast->conn[i]->is_null) && (fast->conn[i]->is_output)) { num_port = fast->conn[i]->size; for(j = 0; j < num_port; j++) if(! fast->conn[i]->port[j]->is_null) num_hybrid_outputs++; } } } inst = inst->next; } ckt->evt->counts.num_hybrids = num_hybrids; ckt->evt->counts.num_hybrid_outputs = num_hybrid_outputs; return(OK); } /* EVTcheck_nodes Report error if any event node name is also used as an analog node. */ static int EVTcheck_nodes( CKTcircuit *ckt) /* The circuit structure */ { CKTnode *analog_node; Evt_Node_Info_t *event_node; static char *err_prefix = "ERROR - node "; static char *err_collide = " cannot be both analog and digital"; /* Report error if any analog node name matches any event node name */ event_node = ckt->evt->info.node_list; while(event_node) { analog_node = ckt->CKTnodes; while(analog_node) { if(strcmp(event_node->name, analog_node->name) == 0) { errMsg = TMALLOC(char, strlen(err_prefix) + strlen(event_node->name) + strlen(err_collide) + 1); sprintf(errMsg, "%s%s%s", err_prefix, event_node->name, err_collide); fprintf(stdout, "%s\n", errMsg); return(E_PRIVATE); } analog_node = analog_node->next; } event_node = event_node->next; } /* Return */ return(OK); } /* EVTinit_info This function creates the ``info'' pointer tables used in the event-driven circuit representation. These arrays allow faster access to data associated with instances, nodes, ports, and outputs than could be provided by having to scan the linked-list representations created during parsing. */ static int EVTinit_info( CKTcircuit *ckt) /* the circuit structure */ { int i; int j; int num_insts; int num_nodes; int num_ports; int num_outputs; Evt_Inst_Info_t *inst; Evt_Node_Info_t *node; Evt_Port_Info_t *port; Evt_Output_Info_t *output; Evt_Inst_Info_t **inst_table = NULL; Evt_Node_Info_t **node_table = NULL; Evt_Port_Info_t **port_table = NULL; Evt_Output_Info_t **output_table = NULL; int *hybrid_index = NULL; int num_hybrids; /* Allocate and initialize table of inst pointers */ num_insts = ckt->evt->counts.num_insts; CKALLOC(inst_table, num_insts, Evt_Inst_Info_t *) inst = ckt->evt->info.inst_list; for(i = 0; i < num_insts; i++) { inst_table[i] = inst; inst = inst->next; } ckt->evt->info.inst_table = inst_table; /* Allocate and initialize table of node pointers */ num_nodes = ckt->evt->counts.num_nodes; CKALLOC(node_table, num_nodes, Evt_Node_Info_t *) node = ckt->evt->info.node_list; for(i = 0; i < num_nodes; i++) { node_table[i] = node; node = node->next; } ckt->evt->info.node_table = node_table; /* Allocate and initialize table of port pointers */ num_ports = ckt->evt->counts.num_ports; CKALLOC(port_table, num_ports, Evt_Port_Info_t *) port = ckt->evt->info.port_list; for(i = 0; i < num_ports; i++) { port_table[i] = port; port = port->next; } ckt->evt->info.port_table = port_table; /* Allocate and initialize table of output pointers */ num_outputs = ckt->evt->counts.num_outputs; CKALLOC(output_table, num_outputs, Evt_Output_Info_t *) output = ckt->evt->info.output_list; for(i = 0; i < num_outputs; i++) { output_table[i] = output; output = output->next; } ckt->evt->info.output_table = output_table; /* Allocate and create table of indexes into inst_table for hybrids */ num_hybrids = ckt->evt->counts.num_hybrids; CKALLOC(hybrid_index, num_hybrids, int) for(i = 0, j = 0; i < num_insts; i++) { if(inst_table[i]->inst_ptr->analog) hybrid_index[j++] = i; } ckt->evt->info.hybrid_index = hybrid_index; /* Return */ return(OK); } /* EVTinit_queue This function prepares the event-driven queues for simulation. */ static int EVTinit_queue( CKTcircuit *ckt) /* the circuit structure */ { int num_insts; int num_nodes; int num_outputs; Evt_Inst_Queue_t *inst_queue; Evt_Node_Queue_t *node_queue; Evt_Output_Queue_t *output_queue; /* Allocate elements in the inst queue */ num_insts = ckt->evt->counts.num_insts; inst_queue = &(ckt->evt->queue.inst); CKALLOC(inst_queue->head, num_insts, Evt_Inst_Event_t *) CKALLOC(inst_queue->current, num_insts, Evt_Inst_Event_t **) CKALLOC(inst_queue->last_step, num_insts, Evt_Inst_Event_t **) CKALLOC(inst_queue->free, num_insts, Evt_Inst_Event_t *) CKALLOC(inst_queue->modified_index, num_insts, int) CKALLOC(inst_queue->modified, num_insts, Mif_Boolean_t) CKALLOC(inst_queue->pending_index, num_insts, int) CKALLOC(inst_queue->pending, num_insts, Mif_Boolean_t) CKALLOC(inst_queue->to_call_index, num_insts, int) CKALLOC(inst_queue->to_call, num_insts, Mif_Boolean_t) /* Allocate elements in the node queue */ num_nodes = ckt->evt->counts.num_nodes; node_queue = &(ckt->evt->queue.node); CKALLOC(node_queue->to_eval_index, num_nodes, int) CKALLOC(node_queue->to_eval, num_nodes, Mif_Boolean_t) CKALLOC(node_queue->changed_index, num_nodes, int) CKALLOC(node_queue->changed, num_nodes, Mif_Boolean_t) /* Allocate elements in the output queue */ num_outputs = ckt->evt->counts.num_outputs; output_queue = &(ckt->evt->queue.output); CKALLOC(output_queue->head, num_outputs, Evt_Output_Event_t *) CKALLOC(output_queue->current, num_outputs, Evt_Output_Event_t **) CKALLOC(output_queue->last_step, num_outputs, Evt_Output_Event_t **) CKALLOC(output_queue->free, num_outputs, Evt_Output_Event_t *) CKALLOC(output_queue->modified_index, num_outputs, int) CKALLOC(output_queue->modified, num_outputs, Mif_Boolean_t) CKALLOC(output_queue->pending_index, num_outputs, int) CKALLOC(output_queue->pending, num_outputs, Mif_Boolean_t) CKALLOC(output_queue->changed_index, num_outputs, int) CKALLOC(output_queue->changed, num_outputs, Mif_Boolean_t) /* Return */ return(OK); } /* EVTinit_limits This function initializes the iteration limits applicable to the event-driven algorithm. */ static int EVTinit_limits( CKTcircuit *ckt) /* the circuit structure */ { /* Set maximum number of event load calls within a single event iteration */ /* to the number of event outputs. This should allow for the */ /* maximum possible number of events that can trickle through any */ /* circuit that does not contain loops. */ ckt->evt->limits.max_event_passes = ckt->evt->counts.num_outputs + 1; /* Set maximum number of alternations between analog and event-driven */ /* iterations to the number of event outputs on hybrids. */ ckt->evt->limits.max_op_alternations = ckt->evt->counts.num_hybrid_outputs + 1; /* Return */ return(OK); } ngspice-26/src/xspice/evt/Makefile.am0000644000265600020320000000103512264261473017144 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libevtxsp.la libevtxsp_la_SOURCES = \ evtaccept.c \ evtcall_hybrids.c \ evtdump.c \ evtiter.c \ evtnext_time.c \ evtop.c \ evtprint.c \ evtsetup.c \ evtbackup.c \ evtdeque.c \ evtinit.c \ evtload.c \ evtnode_copy.c \ evtplot.c \ evtqueue.c \ evttermi.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/evt/Makefile.in0000644000265600020320000004266412264261541017166 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/evt DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libevtxsp_la_LIBADD = am_libevtxsp_la_OBJECTS = evtaccept.lo evtcall_hybrids.lo evtdump.lo \ evtiter.lo evtnext_time.lo evtop.lo evtprint.lo evtsetup.lo \ evtbackup.lo evtdeque.lo evtinit.lo evtload.lo evtnode_copy.lo \ evtplot.lo evtqueue.lo evttermi.lo libevtxsp_la_OBJECTS = $(am_libevtxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libevtxsp_la_SOURCES) DIST_SOURCES = $(libevtxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libevtxsp.la libevtxsp_la_SOURCES = \ evtaccept.c \ evtcall_hybrids.c \ evtdump.c \ evtiter.c \ evtnext_time.c \ evtop.c \ evtprint.c \ evtsetup.c \ evtbackup.c \ evtdeque.c \ evtinit.c \ evtload.c \ evtnode_copy.c \ evtplot.c \ evtqueue.c \ evttermi.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/evt/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/evt/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libevtxsp.la: $(libevtxsp_la_OBJECTS) $(libevtxsp_la_DEPENDENCIES) $(EXTRA_libevtxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libevtxsp_la_OBJECTS) $(libevtxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtaccept.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtbackup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtcall_hybrids.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtdeque.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtdump.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtiter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtnext_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtnode_copy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtop.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtplot.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtprint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evtsetup.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/evttermi.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/evt/evtbackup.c0000644000265600020320000004427212264261473017252 0ustar andreasadmin/*============================================================================ FILE EVTbackup.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains a function that resets the queues and data structures to their state at the new analog simulation time specified following the rejection of an analog timestep by the DCtran routine. INTERFACES void EVTbackup(CKTcircuit *ckt, double new_time) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ /*=== INCLUDE FILES ===*/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" /*=== FUNCTION PROTOTYPES ===*/ static void EVTbackup_node_data(CKTcircuit *ckt, double new_time); static void EVTbackup_state_data(CKTcircuit *ckt, double new_time); static void EVTbackup_msg_data(CKTcircuit *ckt, double new_time); static void EVTbackup_inst_queue(CKTcircuit *ckt, double new_time); static void EVTbackup_output_queue(CKTcircuit *ckt, double new_time); /* EVTbackup() This function resets the queues and data structures to their state at the new analog simulation time specified. The algorithms in this file assume the following timestep coordination between analog and event-driven algorithms: while(not end of analysis) { while (next event time <= next analog time) { do event solution with call_type = event_driven if any instance set analog breakpoint < next analog time set next analog time to breakpoint } do analog timestep solution with call_type = analog call all hybrid models with call_type = event_driven if(analog solution doesn't converge) Call EVTbackup else Call EVTaccept } */ void EVTbackup( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { /* Backup the node data */ EVTbackup_node_data(ckt, new_time); /* Backup the state data */ EVTbackup_state_data(ckt, new_time); /* Backup the msg data */ EVTbackup_msg_data(ckt, new_time); /* Backup the inst queue */ EVTbackup_inst_queue(ckt, new_time); /* Backup the output queue */ EVTbackup_output_queue(ckt, new_time); /* Record statistics */ (ckt->evt->data.statistics->tran_time_backups)++; } /* EVTbackup */ /* EVTbackup_node_data() Reset the node structure data. */ static void EVTbackup_node_data( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { int i; int j; int num_modified; int node_index; Evt_Node_Info_t **node_table; Evt_Node_Data_t *node_data; Evt_Node_t **node_ptr; Evt_Node_t *node; Evt_Node_t *from_node; Evt_Node_t *to_node; Evt_Node_t *head; Evt_Node_t *tail; Evt_Node_t *free_head; /* Get pointers for quick access */ node_data = ckt->evt->data.node; node_table = ckt->evt->info.node_table; /* Loop through list of indexes modified since last accepted timepoint */ num_modified = node_data->num_modified; for(i = 0; i < num_modified; i++) { /* Get the needed node and udn indexes */ node_index = node_data->modified_index[i]; /* Scan data for this node from last_step to determine new setting */ /* for tail, and splice later data into the free list */ node_ptr = node_data->last_step[node_index]; node = *node_ptr; for (;;) { if((node->next == NULL) || (node->next->step > new_time)) { /* Splice rest of list, if any, into free list */ head = node->next; if(head) { tail = *(node_data->tail[node_index]); free_head = node_data->free[node_index]; node_data->free[node_index] = head; tail->next = free_head; } /* Set the tail */ node_data->tail[node_index] = node_ptr; node->next = NULL; break; } node_ptr = &(node->next); node = node->next; } /* Copy data from the location at tail to rhs and rhsold */ from_node = *(node_data->tail[node_index]); to_node = &(node_data->rhs[node_index]); EVTnode_copy(ckt, node_index, from_node, &to_node); to_node = &(node_data->rhsold[node_index]); EVTnode_copy(ckt, node_index, from_node, &to_node); } /* end for number modified */ /* Update/compact the modified list */ for(i = 0, j = 0; i < num_modified; i++) { node_index = node_data->modified_index[i]; /* If nothing after last_step, remove this index from the modified list */ if((*(node_data->last_step[node_index]))->next == NULL) { node_data->modified[node_index] = MIF_FALSE; (node_data->num_modified)--; } /* else, keep the index */ else { node_data->modified_index[j] = node_data->modified_index[i]; j++; } } } /* EVTbackup_node_data */ /* EVTbackup_state_data() Reset the state structure data. */ static void EVTbackup_state_data( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { int i; int j; int num_modified; int inst_index; Evt_State_Data_t *state_data; Evt_State_t **state_ptr; Evt_State_t *state; Evt_State_t *head; Evt_State_t *tail; Evt_State_t *free_head; /* Get pointers for quick access */ state_data = ckt->evt->data.state; /* Loop through list of indexes modified since last accepted timepoint */ num_modified = state_data->num_modified; for(i = 0; i < num_modified; i++) { /* Get the inst index */ inst_index = state_data->modified_index[i]; /* Scan data for this inst from last_step to determine new setting */ /* for tail, and splice later data into the free list */ state_ptr = state_data->last_step[inst_index]; state = *state_ptr; for (;;) { if((state->next == NULL) || (state->next->step > new_time)) { /* Splice rest of list, if any, into free list */ head = state->next; if(head) { tail = *(state_data->tail[inst_index]); free_head = state_data->free[inst_index]; state_data->free[inst_index] = head; tail->next = free_head; } /* Set the tail */ state_data->tail[inst_index] = state_ptr; state->next = NULL; break; } state_ptr = &(state->next); state = state->next; } } /* end for number modified */ /* Update/compact the modified list */ for(i = 0, j = 0; i < num_modified; i++) { inst_index = state_data->modified_index[i]; /* If nothing after last_step, remove this index from the modified list */ if((*(state_data->last_step[inst_index]))->next == NULL) { state_data->modified[inst_index] = MIF_FALSE; (state_data->num_modified)--; } /* else, keep the index */ else { state_data->modified_index[j] = state_data->modified_index[i]; j++; } } } /* EVTbackup_state_data */ /* EVTbackup_msg_data() Backup the message data. */ static void EVTbackup_msg_data( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { int i; int j; int num_modified; int port_index; Evt_Msg_Data_t *msg_data; Evt_Msg_t **msg_ptr; Evt_Msg_t *msg; Evt_Msg_t *head; Evt_Msg_t *tail; Evt_Msg_t *free_head; /* Get pointers for quick access */ msg_data = ckt->evt->data.msg; /* Loop through list of indexes modified since last accepted timepoint */ num_modified = msg_data->num_modified; for(i = 0; i < num_modified; i++) { /* Get the port index */ port_index = msg_data->modified_index[i]; /* Scan data for this port from last_step to determine new setting */ /* for tail, and splice later data into the free list */ msg_ptr = msg_data->last_step[port_index]; msg = *msg_ptr; for (;;) { if((msg->next == NULL) || (msg->next->step > new_time)) { /* Splice rest of list, if any, into free list */ head = msg->next; if(head) { tail = *(msg_data->tail[port_index]); free_head = msg_data->free[port_index]; msg_data->free[port_index] = head; tail->next = free_head; } /* Set the tail */ msg_data->tail[port_index] = msg_ptr; msg->next = NULL; break; } msg_ptr = &(msg->next); msg = msg->next; } } /* end for number modified */ /* Update/compact the modified list */ for(i = 0, j = 0; i < num_modified; i++) { port_index = msg_data->modified_index[i]; /* If nothing after last_step, remove this index from the modified list */ if((*(msg_data->last_step[port_index]))->next == NULL) { msg_data->modified[port_index] = MIF_FALSE; (msg_data->num_modified)--; } /* else, keep the index */ else { msg_data->modified_index[j] = msg_data->modified_index[i]; j++; } } } /* EVTbackup_inst_queue() Backup data in inst queue. */ static void EVTbackup_inst_queue( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { int i; int j; int num_modified; int num_pending; int inst_index; Evt_Inst_Queue_t *inst_queue; Evt_Inst_Event_t **inst_ptr; Evt_Inst_Event_t *inst; double next_time; double event_time; /* Get pointers for quick access */ inst_queue = &(ckt->evt->queue.inst); /* Loop through list of indexes modified since last accepted timepoint */ /* and remove events with posted time > new_time */ num_modified = inst_queue->num_modified; for(i = 0; i < num_modified; i++) { /* Get the inst index */ inst_index = inst_queue->modified_index[i]; /* Scan forward from last_step and cut out data with posted time */ /* > new_time and add it to the free list */ inst_ptr = inst_queue->last_step[inst_index]; inst = *inst_ptr; while(inst) { if(inst->posted_time > new_time) { *inst_ptr = inst->next; inst->next = inst_queue->free[inst_index]; inst_queue->free[inst_index] = inst; inst = *inst_ptr; } else { inst_ptr = &(inst->next); inst = *inst_ptr; } } /* Scan forward from last_step and set current to first */ /* event with event_time > new_time */ inst_ptr = inst_queue->last_step[inst_index]; inst = *inst_ptr; while(inst) { if(inst->event_time > new_time) break; inst_ptr = &((*inst_ptr)->next); inst = *inst_ptr; } inst_queue->current[inst_index] = inst_ptr; } /* Add set of items modified to set of items pending before updating the */ /* pending list because things may have been pulled from the pending list */ for(i = 0; i < num_modified; i++) { j = inst_queue->modified_index[i]; if(! inst_queue->pending[j]) { inst_queue->pending[j] = MIF_TRUE; inst_queue->pending_index[(inst_queue->num_pending)++] = j; } } /* Update the pending list and the next time by seeing if there */ /* is anything at the location pointed to by current */ next_time = 1e30; num_pending = inst_queue->num_pending; for(i = 0, j = 0; i < num_pending; i++) { inst_index = inst_queue->pending_index[i]; inst = *(inst_queue->current[inst_index]); /* If nothing in queue at last_step, remove this index from the pending list */ if(! inst) { inst_queue->pending[inst_index] = MIF_FALSE; (inst_queue->num_pending)--; } /* else, keep the index and update the next time */ else { inst_queue->pending_index[j] = inst_queue->pending_index[i]; j++; event_time = inst->event_time; if(event_time < next_time) next_time = event_time; } } inst_queue->next_time = next_time; /* Update the modified list by looking for any queued events */ /* with posted time > last_time */ for(i = 0, j = 0; i < num_modified; i++) { inst_index = inst_queue->modified_index[i]; inst = *(inst_queue->last_step[inst_index]); while(inst) { if(inst->posted_time > inst_queue->last_time) break; inst = inst->next; } if(! inst) { inst_queue->modified[inst_index] = MIF_FALSE; (inst_queue->num_modified)--; } else { inst_queue->modified_index[j] = inst_queue->modified_index[i]; j++; } } } /* EVTbackup_output_queue() Backup data in output queue. */ static void EVTbackup_output_queue( CKTcircuit *ckt, /* the main circuit structure */ double new_time) /* the time to backup to */ { int i; int j; int num_modified; int num_pending; int output_index; Evt_Output_Queue_t *output_queue; Evt_Output_Event_t **output_ptr; Evt_Output_Event_t *output; double next_time; double event_time; /* Get pointers for quick access */ output_queue = &(ckt->evt->queue.output); /* Loop through list of indexes modified since last accepted timepoint */ /* and remove events with posted time > new_time */ num_modified = output_queue->num_modified; for(i = 0; i < num_modified; i++) { /* Get the output index */ output_index = output_queue->modified_index[i]; /* Scan forward from last_step and cut out data with posted time */ /* > new_time and add it to the free list */ /* Also, unremove anything with removed time > new_time */ output_ptr = output_queue->last_step[output_index]; output = *output_ptr; while(output) { if(output->posted_time > new_time) { *output_ptr = output->next; output->next = output_queue->free[output_index]; output_queue->free[output_index] = output; output = *output_ptr; } else { if(output->removed && (output->removed_time > new_time)) output->removed = MIF_FALSE; output_ptr = &(output->next); output = *output_ptr; } } /* Scan forward from last_step and set current to first */ /* event with event_time > new_time */ output_ptr = output_queue->last_step[output_index]; output = *output_ptr; while(output) { if(output->event_time > new_time) break; output_ptr = &((*output_ptr)->next); output = *output_ptr; } output_queue->current[output_index] = output_ptr; } /* Add set of items modified to set of items pending before updating the */ /* pending list because things may have been pulled from the pending list */ for(i = 0; i < num_modified; i++) { j = output_queue->modified_index[i]; if(! output_queue->pending[j]) { output_queue->pending[j] = MIF_TRUE; output_queue->pending_index[(output_queue->num_pending)++] = j; } } /* Update the pending list and the next time by seeing if there */ /* is anything at the location pointed to by current */ next_time = 1e30; num_pending = output_queue->num_pending; for(i = 0, j = 0; i < num_pending; i++) { output_index = output_queue->pending_index[i]; output = *(output_queue->current[output_index]); /* If nothing in queue at last_step, remove this index from the pending list */ if(! output) { output_queue->pending[output_index] = MIF_FALSE; (output_queue->num_pending)--; } /* else, keep the index and update the next time */ else { output_queue->pending_index[j] = output_queue->pending_index[i]; j++; event_time = output->event_time; if(event_time < next_time) next_time = event_time; } } output_queue->next_time = next_time; /* Update the modified list by looking for any queued events */ /* with posted time > last_time */ for(i = 0, j = 0; i < num_modified; i++) { output_index = output_queue->modified_index[i]; output = *(output_queue->last_step[output_index]); while(output) { if(output->posted_time > output_queue->last_time) break; output = output->next; } if(! output) { output_queue->modified[output_index] = MIF_FALSE; (output_queue->num_modified)--; } else { output_queue->modified_index[j] = output_queue->modified_index[i]; j++; } } } ngspice-26/src/xspice/evt/evtdump.c0000644000265600020320000002400112264261473016736 0ustar andreasadmin/*============================================================================ FILE EVTdump.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 6/15/92 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions used to send event-driven node results data to the IPC channel when the simulator is used with CAE software. INTERFACES EVTdump() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" //#include "misc.h" #include "ngspice/cktdefs.h" //#include "util.h" #include "ngspice/sperror.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" #include "ngspice/evtudn.h" #include "ngspice/ipc.h" #include "ngspice/ipctiein.h" #include "ngspice/ipcproto.h" static void EVTsend_line( int ipc_index, /* The index used in the dictionary */ double step, /* The analysis step */ void *node_value, /* The node value */ int udn_index); /* The user-defined node index */ /* EVTdump This function is called to send event-driven node data to the IPC channel. A ``mode'' argument determines how the data is located in the event data structure and what data is sent. If the mode is DCOP, then this is necessarily the first call to the function. In this case, the set of event-driven nodes is scanned to determine which should be sent. Only nodes that are not inside subcircuits are sent. Next, the function sends a ``dictionary'' of node names/types vs. node indexes. Finally, the function sends the DC operating point solutions for the event-driven nodes in the dictionary. If the mode is DCTRCURVE, it is assumed that the function has already been called with mode = DCOP. The function scans the solution vector and sends data for any nodes that have changed. If the mode is TRAN, it is assumed that the function has already been called once with mode = DCOP. The function scans the event data for nodes that have changed since the last accepted analog timepoint and sends the new data. Note: This function must be called BEFORE calling EVTop_save or EVTaccept() so that the state of the node data structure will allow it to determine what has changed. */ typedef struct evtdump_s { Mif_Boolean_t send; /* True if this node should be sent */ int ipc_index; /* Index for this node in dict sent to CAE system */ char *node_name_str; /* Node name */ char *udn_type_str; /* UDN type */ } evtdump_dict_t; void EVTdump( CKTcircuit *ckt, /* The circuit structure */ Ipc_Anal_t mode, /* The analysis mode for this call */ double step) /* The sweep step for a DCTRCURVE analysis, or */ /* 0.0 for DCOP and TRAN */ { static evtdump_dict_t *node_dict = NULL; static int num_send_nodes; int i; int j; int num_nodes; int num_modified; int index; char *name; int name_len; Mif_Boolean_t firstcall; Evt_Node_Data_t *node_data; Evt_Node_t *rhsold; Evt_Node_t **head; Evt_Node_t *here; Evt_Node_Info_t **node_table; char buff[10000]; Mif_Boolean_t equal; /* Return immediately if IPC is not enabled */ if(! g_ipc.enabled) return; /* Get number of event-driven nodes */ num_nodes = ckt->evt->counts.num_nodes; /* Exit immediately if no event-driven nodes in circuit */ if(num_nodes <= 0) return; /* Get pointers for fast access to event data */ node_data = ckt->evt->data.node; node_table = ckt->evt->info.node_table; rhsold = node_data->rhsold; head = node_data->head; /* Determine if this is the first call */ if(node_dict == NULL) firstcall = MIF_TRUE; else firstcall = MIF_FALSE; /* If this is the first call, get the dictionary info */ if(firstcall) { /* Allocate local data structure used to process nodes */ node_dict = TMALLOC(evtdump_dict_t, num_nodes); /* Loop through all nodes to determine which nodes should be sent. */ /* Only nodes not within subcircuits qualify. */ num_send_nodes = 0; for(i = 0; i < num_nodes; i++) { /* Get the name of the node. */ name = node_table[i]->name; /* If name is in a subcircuit, mark that node should not be sent */ /* and continue to next node. */ name_len = (int) strlen(name); for(j = 0; j < name_len; j++) { if(name[j] == ':') break; } if(j < name_len) { node_dict[i].send = MIF_FALSE; continue; } /* Otherwise, fill in info in dictionary. */ node_dict[i].send = MIF_TRUE; node_dict[i].ipc_index = num_send_nodes; node_dict[i].node_name_str = name; node_dict[i].udn_type_str = g_evt_udn_info[node_table[i]->udn_index]->name; /* Increment the count of nodes to be sent. */ num_send_nodes++; } /* end for */ } /* end if first call */ /* Exit if there are no nodes to be sent */ if(num_send_nodes <= 0) return; /* If this is the first call, send the dictionary */ if(firstcall) { ipc_send_evtdict_prefix(); for(i = 0; i < num_nodes; i++) { if(node_dict[i].send) { sprintf(buff, "%d %s %s", node_dict[i].ipc_index, node_dict[i].node_name_str, node_dict[i].udn_type_str); ipc_send_line(buff); } } ipc_send_evtdict_suffix(); } /* If this is the first call, send the operating point solution */ /* and return. */ if(firstcall) { ipc_send_evtdata_prefix(); for(i = 0; i < num_nodes; i++) { if(node_dict[i].send) { EVTsend_line(node_dict[i].ipc_index, step, rhsold[i].node_value, node_table[i]->udn_index); } } ipc_send_evtdata_suffix(); return; } /* Otherwise, this must be DCTRCURVE or TRAN mode and we need to */ /* send only stuff that has changed since the last call. */ /* The determination of what to send is modeled after code in */ /* EVTop_save() for DCTRCURVE and EVTaccept() for TRAN. */ if(mode == IPC_ANAL_DCTRCURVE) { /* Send data prefix */ ipc_send_evtdata_prefix(); /* Loop through event nodes */ for(i = 0; i < num_nodes; i++) { /* If dictionary indicates this node should be sent */ if(node_dict[i].send) { /* Locate end of node data */ here = head[i]; for(;;) { if(here->next) here = here->next; else break; } /* Compare entry at end of list to rhsold */ g_evt_udn_info[node_table[i]->udn_index]->compare ( rhsold[i].node_value, here->node_value, &equal); /* If value in rhsold is different, send it */ if(!equal) { EVTsend_line(node_dict[i].ipc_index, step, rhsold[i].node_value, node_table[i]->udn_index); } } } /* Send data suffix and return */ ipc_send_evtdata_suffix(); return; } if(mode == IPC_ANAL_TRAN) { /* Send data prefix */ ipc_send_evtdata_prefix(); /* Loop through list of nodes modified since last time */ num_modified = node_data->num_modified; for(i = 0; i < num_modified; i++) { /* Get the index of the node modified */ index = node_data->modified_index[i]; /* If dictionary indicates this node should be sent */ if(node_dict[index].send) { /* Scan through new events and send the data for each event */ here = *(node_data->last_step[index]); while((here = here->next) != NULL) { EVTsend_line(node_dict[index].ipc_index, here->step, here->node_value, node_table[index]->udn_index); } } } /* Send data suffix and return */ ipc_send_evtdata_suffix(); return; } } /* EVTsend_line This function formats the event node data and sends it to the IPC channel. */ static void EVTsend_line( int ipc_index, /* The index used in the dictionary */ double step, /* The analysis step */ void *node_value, /* The node value */ int udn_index) /* The user-defined node index */ { double dvalue; char *svalue; void *pvalue; int len; /* Get the data to send */ if(g_evt_udn_info[udn_index]->plot_val) g_evt_udn_info[udn_index]->plot_val (node_value, "", &dvalue); else dvalue = 0.0; if(g_evt_udn_info[udn_index]->print_val) g_evt_udn_info[udn_index]->print_val (node_value, "", &svalue); else svalue = ""; if(g_evt_udn_info[udn_index]->ipc_val) g_evt_udn_info[udn_index]->ipc_val (node_value, &pvalue, &len); else { pvalue = NULL; len = 0; } /* Send it to the IPC channel */ ipc_send_event(ipc_index, step, dvalue, svalue, pvalue, len); } ngspice-26/src/xspice/evt/evtplot.c0000644000265600020320000001236412264261473016760 0ustar andreasadmin/*============================================================================ FILE EVTplot.c MEMBER OF process XSPICE Copyright 1992 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 5/7/92 Bill Kuhn MODIFICATIONS SUMMARY This file contains function EVTplot which is used to provide basic plotting of event driven nodes through SPICE3's 'plot' command. INTERFACES void EVTplot() REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" //nclude "misc.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/evtproto.h" #include "ngspice/mif.h" #include "ngspice/mifproto.h" /*saj for output */ #include "ngspice/sim.h" #include "ngspice/dvec.h" //#include "ftedata.h" //#include "fteconstant.h" //#include "util.h" #include "ngspice/cpstd.h" /* EVTfindvec() This function is called from FTE/vectors.c:findvec() when a node specified for plotting cannot be located in the analog plot data. It scans the event driven data structures looking for the node, and if found, returns a new 'dvec' structure holding the data to be plotted. The dvec struct is created with it's own v_scale member holding the event time vector for this node since the time vector is not aligned with the analog data points or with other event vectors. The node name supplied as argument can either be a simple node name, or a name of the form (), where is the member of the event-driven structure to be plotted. These member names are defined by the individual "user-defined node" plot_val routines for the node type in question. If the simple node name form is used, the special keyword "all" is supplied to the plot_val routine for the member name. */ struct dvec *EVTfindvec( char *node) /* The node name (and optional member name) */ { char *name; char *member = "all"; char *ptr; int i; int num_nodes; int udn_index; int num_events; Mif_Boolean_t found; Evt_Node_Info_t **node_table; Evt_Node_t *head; Evt_Node_t *event; double *anal_point_vec; double *value_vec; double value = 0; struct dvec *d; struct dvec *scale; /* Exit immediately if event-driven stuff not allocated yet, */ /* or if number of event nodes is zero. */ if(! g_mif_info.ckt) return(NULL); if(! g_mif_info.ckt->evt) return(NULL); if(g_mif_info.ckt->evt->counts.num_nodes == 0) return(NULL); /* Make a copy of the node name. */ /* Do not free this string. It is assigned into the dvec structure below. */ name = MIFcopy(node); /* Convert to all lower case */ strtolower(name); /* Divide into the node name and member name */ for(ptr = name; *ptr != '\0'; ptr++) if(*ptr == '(') break; if(*ptr == '(') { *ptr = '\0'; ptr++; member = ptr; for( ; *ptr != '\0'; ptr++) if(*ptr == ')') break; *ptr = '\0'; } /* Look for node name in the event-driven node list */ num_nodes = g_mif_info.ckt->evt->counts.num_nodes; node_table = g_mif_info.ckt->evt->info.node_table; for(i = 0, found = MIF_FALSE; i < num_nodes; i++) { if(cieq(name, node_table[i]->name)) { found = MIF_TRUE; break; } } if(! found) return(NULL); /* Get the UDN type index */ udn_index = node_table[i]->udn_index; /* Count the number of events */ head = g_mif_info.ckt->evt->data.node->head[i]; for(event = head, num_events = 0; event; event = event->next) num_events++; /* Allocate arrays to hold the analysis point and node value vectors */ anal_point_vec = TMALLOC(double, 2 * (num_events + 2)); value_vec = TMALLOC(double, 2 * (num_events + 2)); /* Iterate through the events and fill the arrays. */ /* Note that we create vertical segments every time an event occurs. */ /* Need to modify this in the future to complete the vector out to the */ /* last analysis point... */ for(i = 0, event = head; event; event = event->next) { /* If not first point, put the second value of the horizontal line in the vectors */ if(i > 0) { anal_point_vec[i] = event->step; value_vec[i] = value; i++; } /* Get the next value by calling the appropriate UDN plot_val function */ value = 0.0; g_evt_udn_info[udn_index]->plot_val (event->node_value, member, &value); /* Put the first value of the horizontal line in the vector */ anal_point_vec[i] = event->step; value_vec[i] = value; i++; } /* Allocate dvec structures and assign the vectors into them. */ /* See FTE/OUTinterface.c:plotInit() for initialization example. */ scale = TMALLOC(struct dvec, 1); scale->v_name = MIFcopy("step"); scale->v_type = SV_TIME; scale->v_flags = VF_REAL & ~VF_PERMANENT; scale->v_length = i; scale->v_realdata = anal_point_vec; scale->v_scale = NULL; d = TMALLOC(struct dvec, 1); d->v_name = name; d->v_type = SV_VOLTAGE; d->v_flags = VF_REAL & ~VF_PERMANENT; d->v_length = i; d->v_realdata = value_vec; d->v_scale = scale; /* Return the dvec */ return(d); } ngspice-26/src/xspice/evt/evtprint.c0000644000265600020320000002170512264261473017135 0ustar andreasadmin/*============================================================================ FILE EVTprint.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS 7/11/2012 Holger Vogt Replace printf by out_printf to allow output redirection SUMMARY This file contains function EVTprint which is used to provide a simple tabular output of event-driven node data. This printout is invoked through a new nutmeg command called 'eprint' which takes event-driven node names as argument. INTERFACES void EVTprint(wordlist *wl) REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #include "ngspice/ngspice.h" #include "ngspice/cpstd.h" #include "ngspice/cpextern.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtudn.h" #include "ngspice/evtproto.h" static int get_index(char *node_name); static void print_data( Mif_Boolean_t dcop, double step, char **node_value, int nargs); /* EVTprint This function implements the 'eprint' command used to print event-driven node values and messages from the latest simulation. This is a simple prototype implementation of the eprint command for testing purposes. It is currently lacking in the following areas: 1) It accepts only up to 16 nodes. 2) It does not support the selected printing of different members of a user-defined data struct. 3) It is dumb in its output formatting - just tries to print everything on a line with 4 space separators. 4) It works only for the latest simulation - i.e. it does not use the evt jobs structure to find old results. 5) It does not allow a range of timesteps to be selected. */ #define EPRINT_MAXARGS 32 void EVTprint( wordlist *wl) /* The command line entered by user */ { int i; int nargs; int num_ports; wordlist *w; char *node_name[EPRINT_MAXARGS]; int node_index[EPRINT_MAXARGS]; int udn_index[EPRINT_MAXARGS]; Evt_Node_t *node_data[EPRINT_MAXARGS]; char *node_value[EPRINT_MAXARGS]; CKTcircuit *ckt; Evt_Node_Info_t **node_table; Evt_Port_Info_t **port_table; Mif_Boolean_t more; Mif_Boolean_t dcop; double step = 0.0; double next_step; double this_step; char *value; Evt_Msg_t *msg_data; Evt_Statistic_t *statistics; /* Count the number of arguments to the command */ nargs = 0; w = wl; while(w) { nargs++; w = w->wl_next; } if(nargs < 1) { printf("Usage: eprint ...\n"); return; } if(nargs > EPRINT_MAXARGS) { printf("ERROR - eprint currently limited to 32 arguments\n"); return; } /* Get needed pointers */ ckt = g_mif_info.ckt; node_table = ckt->evt->info.node_table; /* Get data for each argument */ w = wl; for(i = 0; i < nargs; i++) { node_name[i] = w->wl_word; node_index[i] = get_index(node_name[i]); if(node_index[i] < 0) { printf("ERROR - Node %s is not an event node.\n", node_name[i]); return; } udn_index[i] = node_table[node_index[i]]->udn_index; if (ckt->evt->data.node) node_data[i] = ckt->evt->data.node->head[node_index[i]]; else { printf("ERROR - No node data: simulation not yet run?\n"); return; } node_value[i] = ""; w = w->wl_next; } out_init(); /* Print results data */ out_printf("\n**** Results Data ****\n\n"); /* Print the column identifiers */ out_printf("Time or Step\n"); for(i = 0; i < nargs; i++) out_printf("%s\n",node_name[i]); out_printf("\n\n"); /* Scan the node data and determine if the first vector */ /* is for a DCOP analysis or the first step in a swept DC */ /* or transient analysis. Also, determine if there is */ /* more data following it and if so, what the next step */ /* is. */ more = MIF_FALSE; dcop = MIF_FALSE; next_step = 1e30; for(i = 0; i < nargs; i++) { if(node_data[i]->op) dcop = MIF_TRUE; else step = node_data[i]->step; (*(g_evt_udn_info[udn_index[i]]->print_val)) (node_data[i]->node_value, "all", &value); node_value[i] = value; node_data[i] = node_data[i]->next; if(node_data[i]) { more = MIF_TRUE; if(node_data[i]->step < next_step) next_step = node_data[i]->step; } } /* Print the data */ print_data(dcop, step, node_value, nargs); /* While there is more data, get the next values and print */ while(more) { more = MIF_FALSE; this_step = next_step; next_step = 1e30; for(i = 0; i < nargs; i++) { if(node_data[i]) { if(node_data[i]->step == this_step) { (*(g_evt_udn_info[udn_index[i]]->print_val)) (node_data[i]->node_value, "all", &value); node_value[i] = value; node_data[i] = node_data[i]->next; } if(node_data[i]) { more = MIF_TRUE; if(node_data[i]->step < next_step) next_step = node_data[i]->step; } } /* end if node_data not NULL */ } /* end for number of args */ print_data(MIF_FALSE, this_step, node_value, nargs); } /* end while there is more data */ out_printf("\n\n"); /* Print messages for all ports */ out_printf("\n**** Messages ****\n\n"); num_ports = ckt->evt->counts.num_ports; port_table = ckt->evt->info.port_table; for(i = 0; i < num_ports; i++) { /* Get pointer to messages for this port */ msg_data = ckt->evt->data.msg->head[i]; /* If no messages on this port, skip */ if(! msg_data) continue; /* Print the port description */ out_printf("Node: %s Inst: %s Conn: %s Port: %d\n\n", port_table[i]->node_name, port_table[i]->inst_name, port_table[i]->conn_name, port_table[i]->port_num); /* Print the messages on this port */ while(msg_data) { if(msg_data->op) printf("DCOP "); else printf("%-16.9e", msg_data->step); printf("%s\n", msg_data->text); msg_data = msg_data->next; } out_printf("\n\n"); } /* end for number of ports */ /* Print statistics */ out_printf("\n**** Statistics ****\n\n"); statistics = ckt->evt->data.statistics; out_printf("Operating point analog/event alternations: %d\n", statistics->op_alternations); out_printf("Operating point load calls: %d\n", statistics->op_load_calls); out_printf("Operating point event passes: %d\n", statistics->op_event_passes); out_printf("Transient analysis load calls: %d\n", statistics->tran_load_calls); out_printf("Transient analysis timestep backups: %d\n", statistics->tran_time_backups); out_printf("\n\n"); } /* get_index This function determines the index of a specified event-driven node. */ static int get_index( char *node_name /* The name of the node to search for */ ) { /* Get the event-driven node index for the specified name */ int index; Mif_Boolean_t found; Evt_Node_Info_t *node; CKTcircuit *ckt; /* Scan list of nodes in event structure to see if there */ found = MIF_FALSE; index = 0; ckt = g_mif_info.ckt; node = ckt->evt->info.node_list; while(node) { if(strcmp(node_name, node->name) == 0) { found = MIF_TRUE; break; } else { index++; node = node->next; } } /* Return the index or -1 if not found */ if(! found) return(-1); else return(index); } /* print_data This function prints the values of one or more nodes to standard output. */ static void print_data( Mif_Boolean_t dcop, /* Is this the operating point data */ double step, /* The analysis step if dcop */ char **node_value, /* The array of values to be printed */ int nargs) /* The size of the value array */ { int i; char step_str[100]; if(dcop) strcpy(step_str, "DCOP "); else sprintf(step_str, "%-16.9e", step); out_printf("%s", step_str); for(i = 0; i < nargs; i++) out_printf(" %s", node_value[i]); out_printf("\n"); } ngspice-26/src/xspice/Makefile.in0000644000265600020320000004544112264261540016363 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Process this file with automake VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = README examples icm xspice.c .gitignore SUBDIRS = mif cm enh evt ipc idn cmpp icm MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive dist-hook distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am dist-hook: rm -f "$(distdir)/icm/makedefs" rm -f "$(distdir)/icm/GNUmakefile" rm -rf `find $(distdir)/icm -name .deps` rm -rf `find $(distdir)/icm -name *.o` rm -rf `find $(distdir)/icm -name *.cm` for sub in analog digital spice2poly xtradev xtraevt ; do \ rm -rf `find $(distdir)/icm/$$sub -name cmextrn.h`; \ rm -rf `find $(distdir)/icm/$$sub -name cminfo.h`; \ rm -rf `find $(distdir)/icm/$$sub -name udnextrn.h`; \ rm -rf `find $(distdir)/icm/$$sub -name udninfo.h`; \ rm -rf `find $(distdir)/icm/$$sub -name ifspec.c`; \ rm -rf `find $(distdir)/icm/$$sub -name cfunc.c`; \ rm -rf `find $(distdir)/icm/$$sub -name dlmain.c`; \ rm -rf `find $(distdir)/icm/$$sub -name objects.inc`; \ done # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/xspice.c0000644000265600020320000000260412264261473015754 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/mif.h" #include "ngspice/cm.h" #include "ngspice/dllitf.h" /*how annoying!, needed for structure below*/ static void *tcalloc(size_t a, size_t b) { return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */ } static void no_free(void *p) { NG_IGNORE(p); } static FILE * no_file(void) { return NULL; } struct coreInfo_t coreInfo = { MIF_INP2A, MIFgetMod, MIFgetValue, MIFsetup, MIFunsetup, MIFload, MIFmParam, MIFask, MIFmAsk, MIFtrunc, MIFconvTest, MIFdelete, MIFmDelete, MIFdestroy, MIFgettok, MIFget_token, MIFget_cntl_src_type, MIFcopy, cm_climit_fcn, cm_smooth_corner, cm_smooth_discontinuity, cm_smooth_pwl, cm_analog_ramp_factor, cm_analog_alloc, cm_analog_get_ptr, cm_analog_integrate, cm_analog_converge, cm_analog_set_temp_bkpt, cm_analog_set_perm_bkpt, cm_analog_not_converged, cm_analog_auto_partial, cm_event_alloc, cm_event_get_ptr, cm_event_queue, cm_message_get_errmsg, cm_message_send, cm_netlist_get_c, cm_netlist_get_l, cm_complex_set, cm_complex_add, cm_complex_subtract, cm_complex_multiply, cm_complex_divide, no_file, no_file, no_file, #ifndef HAVE_LIBGC tmalloc, tcalloc, trealloc, txfree, tmalloc, trealloc, txfree #else GC_malloc, tcalloc, GC_realloc, no_free, GC_malloc, GC_realloc, no_free #endif }; ngspice-26/src/xspice/cm/0000755000265600020320000000000012264261712014706 5ustar andreasadminngspice-26/src/xspice/cm/cm.c0000644000265600020320000004521612264261473015465 0ustar andreasadmin/* =========================================================================== FILE CM.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions callable from user code models. INTERFACES cm_analog_alloc() cm_analog_get_ptr() cm_analog_integrate() cm_analog_converge() cm_analog_set_temp_bkpt() cm_analog_set_perm_bkpt() cm_analog_ramp_factor() cm_analog_not_converged() cm_analog_auto_partial() cm_message_get_errmsg() cm_message_send() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/ngspice.h" #include "ngspice/cm.h" #include "ngspice/mif.h" #include "ngspice/cktdefs.h" //#include "util.h" static void cm_static_integrate(int byte_index, double integrand, double *integral, double *partial); /* cm_analog_alloc() This function is called from code model C functions to allocate state storage for a particular instance. It computes the number of doubles that need to be allocated in SPICE's state storage vectors from the number of bytes specified in it's argument and then allocates space for the states. An index into the SPICE state-vectors is stored in the instance's data structure along with a ``tag'' variable supplied by the caller so that the location of the state storage area can be found by cm_analog_get_ptr(). */ void cm_analog_alloc( int tag, /* The user-specified tag for this block of memory */ int bytes) /* The number of bytes to allocate */ { MIFinstance *here; CKTcircuit *ckt; Mif_State_t *state; int doubles_needed; int i; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* Scan states in instance struct and see if tag has already been used */ for(i = 0; i < here->num_state; i++) { if(tag == here->state[i].tag) { g_mif_info.errmsg = "ERROR - cm_analog_alloc() - Tag already used in previous call\n"; return; } } /* Compute number of doubles needed and allocate space in ckt->CKTstates[i] */ doubles_needed = bytes / (int) sizeof(double) + 1; /* Allocate space in instance struct for this state descriptor */ if(here->num_state == 0) { here->num_state = 1; here->state = TMALLOC(Mif_State_t, 1); } else { here->num_state++; here->state = TREALLOC(Mif_State_t, here->state, here->num_state); } /* Fill in the members of the state descriptor struct */ state = &(here->state[here->num_state - 1]); state->tag = tag; state->index = ckt->CKTnumStates; state->doubles = doubles_needed; state->bytes = bytes; /* Add the states to the ckt->CKTstates vectors */ ckt->CKTnumStates += doubles_needed; for(i=0;i<=ckt->CKTmaxOrder+1;i++) { if(ckt->CKTnumStates == doubles_needed) ckt->CKTstates[i] = TMALLOC(double, ckt->CKTnumStates); else ckt->CKTstates[i] = TREALLOC(double, ckt->CKTstates[i], ckt->CKTnumStates); } } /* cm_analog_get_ptr() This function is called from code model C functions to return a pointer to state storage allocated with cm_analog_alloc(). A tag specified in its argument list is used to locate the state in question. A second argument specifies whether the desired state is for the current timestep or from a preceding timestep. The location of the state in memory is then computed and returned. */ void *cm_analog_get_ptr( int tag, /* The user-specified tag for this block of memory */ int timepoint) /* The timepoint of interest - 0=current 1=previous */ { MIFinstance *here; CKTcircuit *ckt; Mif_State_t *state=NULL; Mif_Boolean_t got_tag; int i; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* Scan states in instance struct and see if tag exists */ for(got_tag = MIF_FALSE, i = 0; i < here->num_state; i++) { if(tag == here->state[i].tag) { state = &(here->state[i]); got_tag = MIF_TRUE; break; } } /* Return error if tag not found */ if(! got_tag) { g_mif_info.errmsg = "ERROR - cm_analog_get_ptr() - Bad tag\n"; return(NULL); } /* Return error if timepoint is not 0 or 1 */ if((timepoint < 0) || (timepoint > 1)) { g_mif_info.errmsg = "ERROR - cm_analog_get_ptr() - Bad timepoint\n"; return(NULL); } /* Return address of requested state in ckt->CKTstates[timepoint] vector */ return( (void *) (ckt->CKTstates[timepoint] + state->index) ); } /* cm_analog_integrate() This function performs a numerical integration on the state supplied in its argument list according to the integrand also supplied in the argument list. The next value of the integral and the partial derivative with respect to the integrand input is returned. The integral argument must be a pointer to memory previously allocated through a call to cm_analog_alloc(). If this is the first call to cm_analog_integrate(), information is entered into the instance structure to mark that the integral should be processed by MIFtrunc and MIFconvTest. */ int cm_analog_integrate( double integrand, /* The integrand */ double *integral, /* The current and returned value of integral */ double *partial) /* The partial derivative of integral wrt integrand */ { MIFinstance *here; CKTcircuit *ckt; Mif_Intgr_t *intgr; Mif_Boolean_t got_index; char *char_state0; char *char_state; int byte_index; int i; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* Check to be sure we're in transient analysis */ if(g_mif_info.circuit.anal_type != MIF_TRAN) { g_mif_info.errmsg = "ERROR - cm_analog_integrate() - Called in non-transient analysis\n"; *partial = 0.0; return(MIF_ERROR); } /* Preliminary check to be sure argument was allocated by cm_analog_alloc() */ if(ckt->CKTnumStates <= 0) { g_mif_info.errmsg = "ERROR - cm_analog_integrate() - Integral must be memory allocated by cm_analog_alloc()\n"; *partial = 0.0; return(MIF_ERROR); } /* Compute byte offset from start of state0 vector */ char_state0 = (char *) ckt->CKTstate0; char_state = (char *) integral; byte_index = (int) (char_state - char_state0); /* Check to be sure argument address is in range of state0 vector */ if((byte_index < 0) || (byte_index > (ckt->CKTnumStates - 1) * (int) sizeof(double))) { g_mif_info.errmsg = "ERROR - cm_analog_integrate() - Argument must be in state vector 0\n"; *partial = 0.0; return(MIF_ERROR); } /* Scan the intgr array in the instance struct to see if already exists */ for(got_index = MIF_FALSE, i = 0; i < here->num_intgr; i++) { if(here->intgr[i].byte_index == byte_index) { got_index = MIF_TRUE; } } /* Report error if not found and this is not the first load pass in tran analysis */ if((! got_index) && (! g_mif_info.circuit.anal_init)) { g_mif_info.errmsg = "ERROR - cm_analog_integrate() - New integral and not initialization pass\n"; *partial = 0.0; return(MIF_ERROR); } /* If new integral state, allocate space in instance */ /* struct for this intgr descriptor and register it with */ /* the cm_analog_converge() function */ if(! got_index) { if(here->num_intgr == 0) { here->num_intgr = 1; here->intgr = TMALLOC(Mif_Intgr_t, 1); } else { here->num_intgr++; here->intgr = TREALLOC(Mif_Intgr_t, here->intgr, here->num_intgr); } intgr = &(here->intgr[here->num_intgr - 1]); intgr->byte_index = byte_index; if(cm_analog_converge(integral)) { printf("%s\n",g_mif_info.errmsg); g_mif_info.errmsg = "ERROR - cm_analog_integrate() - Failure in cm_analog_converge() call\n"; return(MIF_ERROR); } } /* Compute the new integral and the partial */ cm_static_integrate(byte_index, integrand, integral, partial); return(MIF_OK); } /* cm_analog_converge() This function registers a state variable allocated with cm_analog_alloc() to be subjected to a convergence test at the end of each iteration. The state variable must be a double. Information is entered into the instance structure to mark that the state variable should be processed by MIFconvTest. */ int cm_analog_converge( double *state) /* The state to be converged */ { MIFinstance *here; CKTcircuit *ckt; Mif_Conv_t *conv; char *char_state0; char *char_state; int byte_index; int i; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* Preliminary check to be sure argument was allocated by cm_analog_alloc() */ if(ckt->CKTnumStates <= 0) { g_mif_info.errmsg = "ERROR - cm_analog_converge() - Argument must be memory allocated by cm_analog_alloc()\n"; return(MIF_ERROR); } /* Compute byte offset from start of state0 vector */ char_state0 = (char *) ckt->CKTstate0; char_state = (char *) state; byte_index = (int) (char_state - char_state0); /* Check to be sure argument address is in range of state0 vector */ if((byte_index < 0) || (byte_index > (ckt->CKTnumStates - 1) * (int) sizeof(double))) { g_mif_info.errmsg = "ERROR - cm_analog_converge() - Argument must be in state vector 0\n"; return(MIF_ERROR); } /* Scan the conv array in the instance struct to see if already registered */ /* If so, do nothing, just return */ for(i = 0; i < here->num_conv; i++) { if(here->conv[i].byte_index == byte_index) return(MIF_OK); } /* Allocate space in instance struct for this conv descriptor */ if(here->num_conv == 0) { here->num_conv = 1; here->conv = TMALLOC(Mif_Conv_t, 1); } else { here->num_conv++; here->conv = TREALLOC(Mif_Conv_t, here->conv, here->num_conv); } /* Fill in the conv descriptor data */ conv = &(here->conv[here->num_conv - 1]); conv->byte_index = byte_index; conv->last_value = 1.0e30; /* There should be a better way ... */ return(MIF_OK); } /* cm_message_get_errmsg() This function returns the address of an error message string set by a call to some code model support function. */ char *cm_message_get_errmsg(void) { return(g_mif_info.errmsg); } /* cm_analog_set_temp_bkpt() This function is called by a code model C function to set a temporary breakpoint. These temporary breakpoints remain in effect only until the next timestep is taken. A temporary breakpoint added with a time less than the current time, but greater than the last successful timestep causes the simulator to abandon the current timestep and decrease the timestep to hit the breakpoint. A temporary breakpoint with a time greater than the current time causes the simulator to make the breakpoint the next timepoint if the next timestep would produce a time greater than that of the breakpoint. */ int cm_analog_set_temp_bkpt( double time) /* The time of the breakpoint to be set */ { CKTcircuit *ckt; /* Get the address of the ckt and instance structs from g_mif_info */ ckt = g_mif_info.ckt; /* Make sure breakpoint is not prior to last accepted timepoint */ if(time < ((ckt->CKTtime - ckt->CKTdelta) + ckt->CKTminBreak)) { g_mif_info.errmsg = "ERROR - cm_analog_set_temp_bkpt() - Time < last accepted timepoint\n"; return(MIF_ERROR); } /* If too close to a permanent breakpoint or the current time, discard it */ if( (fabs(time - ckt->CKTbreaks[0]) < ckt->CKTminBreak) || (fabs(time - ckt->CKTbreaks[1]) < ckt->CKTminBreak) || (fabs(time - ckt->CKTtime) < ckt->CKTminBreak) ) return(MIF_OK); /* If < current dynamic breakpoint, make it the current breakpoint */ if( time < g_mif_info.breakpoint.current) g_mif_info.breakpoint.current = time; return(MIF_OK); } /* cm_analog_set_perm_bkpt() This function is called by a code model C function to set a permanent breakpoint. These permanent breakpoints remain in effect from the time they are introduced until the simulation time equals or exceeds the breakpoint time. A permanent breakpoint added with a time less than the current time, but greater than the last successful timestep causes the simulator to abandon the current timestep and decrease the timestep to hit the breakpoint. A permanent breakpoint with a time greater than the current time causes the simulator to make the breakpoint the next timepoint if the next timestep would produce a time greater than that of the breakpoint. */ int cm_analog_set_perm_bkpt( double time) /* The time of the breakpoint to be set */ { CKTcircuit *ckt; /* Get the address of the ckt and instance structs from g_mif_info */ ckt = g_mif_info.ckt; /* Call cm_analog_set_temp_bkpt() to force backup if less than current time */ if(time < (ckt->CKTtime + ckt->CKTminBreak)) return(cm_analog_set_temp_bkpt(time)); else CKTsetBreak(ckt,time); return(MIF_OK); } /* cm_analog_ramp_factor() This function returns the current value of the ramp factor associated with the ``ramptime'' option. For this option to work best, models with analog outputs that may be non-zero at time zero should call this function and scale their outputs and partials by the ramp factor. */ double cm_analog_ramp_factor(void) { CKTcircuit *ckt; /* Get the address of the ckt and instance structs from g_mif_info */ ckt = g_mif_info.ckt; /* if ramptime == 0.0, no ramptime option given, so return 1.0 */ /* this is the most common case, so it goes first */ if(ckt->enh->ramp.ramptime == 0.0) return(1.0); /* else if not transient analysis, return 1.0 */ else if( (!(ckt->CKTmode & MODETRANOP)) && (!(ckt->CKTmode & MODETRAN)) ) return(1.0); /* else if time >= ramptime, return 1.0 */ else if(ckt->CKTtime >= ckt->enh->ramp.ramptime) return(1.0); /* else time < end of ramp, so compute and return factor based on time */ else return(ckt->CKTtime / ckt->enh->ramp.ramptime); } /* ************************************************************ */ /* * Copyright (c) 1985 Thomas L. Quarles * * This is a modified version of the function NIintegrate() * * Modifications are Copyright 1991 Georgia Tech Research Institute * */ static void cm_static_integrate(int byte_index, double integrand, double *integral, double *partial) { CKTcircuit *ckt; double intgr[7]; double cur=0; double *double_ptr; double ceq; double geq; char *char_ptr; int i; /* Get the address of the ckt struct from g_mif_info */ ckt = g_mif_info.ckt; /* Get integral values from current and previous timesteps */ for(i = 0; i <= ckt->CKTorder; i++) { char_ptr = (char *) ckt->CKTstates[i]; char_ptr += byte_index; double_ptr = (double *) char_ptr; intgr[i] = *double_ptr; } /* Do what SPICE3C1 does for its implicit integration */ switch(ckt->CKTintegrateMethod) { case TRAPEZOIDAL: switch(ckt->CKTorder) { case 1: cur = ckt->CKTag[1] * intgr[1]; break; case 2: /* WARNING - This code needs to be redone. */ /* The correct code should rely on one previous value */ /* of cur as done in NIintegrate() */ cur = -0.5 * ckt->CKTag[0] * intgr[1]; break; } break; case GEAR: cur = 0.0; switch(ckt->CKTorder) { case 6: cur += ckt->CKTag[6] * intgr[6]; /* fall through */ case 5: cur += ckt->CKTag[5] * intgr[5]; /* fall through */ case 4: cur += ckt->CKTag[4] * intgr[4]; /* fall through */ case 3: cur += ckt->CKTag[3] * intgr[3]; /* fall through */ case 2: cur += ckt->CKTag[2] * intgr[2]; /* fall through */ case 1: cur += ckt->CKTag[1] * intgr[1]; break; } break; } ceq = cur; geq = ckt->CKTag[0]; /* WARNING: Take this out when the case 2: above is fixed */ if((ckt->CKTintegrateMethod == TRAPEZOIDAL) && (ckt->CKTorder == 2)) geq *= 0.5; /* The following code is equivalent to */ /* the solution of one matrix iteration to produce the */ /* integral value. */ *integral = (integrand - ceq) / geq; *partial = 1.0 / geq; } /* cm_analog_not_converged() This function tells the simulator not to allow the current iteration to be the final iteration. It is called when a code model performs internal limiting on one or more of its inputs to assist convergence. */ void cm_analog_not_converged(void) { (g_mif_info.ckt->CKTnoncon)++; } /* cm_message_send() This function prints a message output from a code model, prepending the instance name. */ int cm_message_send( char *msg) /* The message to output. */ { MIFinstance *here; /* Get the address of the instance struct from g_mif_info */ here = g_mif_info.instance; /* Print the name of the instance and the message */ printf("\nInstance: %s Message: %s\n", here->MIFname, msg); return(0); } /* cm_analog_auto_partial() This function tells the simulator to automatically compute approximations of partial derivatives of analog outputs with respect to analog inputs. When called from a code model, it sets a flag in the g_mif_info structure which tells function MIFload() and it's associated MIFauto_partial() function to perform the necessary calculations. */ void cm_analog_auto_partial(void) { g_mif_info.auto_partial.local = MIF_TRUE; } ngspice-26/src/xspice/cm/cmexport.c0000644000265600020320000000263512264261473016725 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/mif.h" #include "ngspice/cm.h" #include "ngspice/dllitf.h" /*how annoying!, needed for structure below*/ static void *tcalloc(size_t a, size_t b) { return tmalloc(a*b); /* FIXME, tcalloc must zero !?!? */ } #ifdef HAVE_LIBGC static void no_free(void *p) { NG_IGNORE(p); } #endif static FILE * no_file(void) { return NULL; } struct coreInfo_t coreInfo = { MIF_INP2A, MIFgetMod, MIFgetValue, MIFsetup, MIFunsetup, MIFload, MIFmParam, MIFask, MIFmAsk, MIFtrunc, MIFconvTest, MIFdelete, MIFmDelete, MIFdestroy, MIFgettok, MIFget_token, MIFget_cntl_src_type, MIFcopy, cm_climit_fcn, cm_smooth_corner, cm_smooth_discontinuity, cm_smooth_pwl, cm_analog_ramp_factor, cm_analog_alloc, cm_analog_get_ptr, cm_analog_integrate, cm_analog_converge, cm_analog_set_temp_bkpt, cm_analog_set_perm_bkpt, cm_analog_not_converged, cm_analog_auto_partial, cm_event_alloc, cm_event_get_ptr, cm_event_queue, cm_message_get_errmsg, cm_message_send, cm_netlist_get_c, cm_netlist_get_l, cm_complex_set, cm_complex_add, cm_complex_subtract, cm_complex_multiply, cm_complex_divide, no_file, no_file, no_file, #ifndef HAVE_LIBGC tmalloc, tcalloc, trealloc, txfree, tmalloc, trealloc, txfree #else GC_malloc, tcalloc, GC_realloc, no_free, GC_malloc, GC_realloc, no_free #endif }; ngspice-26/src/xspice/cm/cmmeters.c0000644000265600020320000002275012264261473016703 0ustar andreasadmin/* =========================================================================== FILE CMmeters.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions callable from code models. These functions are primarily designed for use by the "cmeter" and "lmeter" models provided in the XSPICE code model library. INTERFACES cm_netlist_get_c() cm_netlist_get_l() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/ngspice.h" #include "ngspice/cm.h" #include "ngspice/mif.h" #include "ngspice/cktdefs.h" #include "ngspice/mifdefs.h" #include "cap/capdefs.h" #include "ind/inddefs.h" #include "vsrc/vsrcdefs.h" #include "ngspice/inpdefs.h" /* cm_netlist_get_c() This is a special function designed for use with the c_meter model. It returns the parallel combination of the capacitance connected to the first port on the instance. */ double cm_netlist_get_c(void) { CKTcircuit *ckt; MIFinstance *cmeter_inst; CAPinstance *cap_inst; VSRCinstance *vsrc_inst; CAPmodel *cap_head; CAPmodel *cap_model; VSRCmodel *vsrc_head; VSRCmodel *vsrc_model; int cap_type; int vsrc_type; int cmeter_node; int vsrc_node; double c; /* Get the circuit data structure and current instance */ ckt = g_mif_info.ckt; cmeter_inst = g_mif_info.instance; /* Get internal node number for positive node of cmeter input */ cmeter_node = cmeter_inst->conn[0]->port[0]->smp_data.pos_node; /* Initialize total capacitance value to zero */ c = 0.0; /* ****************************************************** */ /* Look for capacitors connected directly to cmeter input */ /* ****************************************************** */ /* Get the head of the list of capacitor models in the circuit */ cap_type = INPtypelook("Capacitor"); if(cap_type < 0) { printf("\nERROR - Capacitor type not supported in this binary\n"); return(0); } cap_head = (CAPmodel *) ckt->CKThead[cap_type]; /* Scan through all capacitor instances and add in values */ /* of any capacitors connected to cmeter input */ for(cap_model = cap_head; cap_model; cap_model = cap_model->CAPnextModel) { for(cap_inst = cap_model->CAPinstances; cap_inst; cap_inst = cap_inst->CAPnextInstance) { if((cmeter_node == cap_inst->CAPposNode) || (cmeter_node == cap_inst->CAPnegNode)) { c += cap_inst->CAPcapac; } } } /* ***************************************************************** */ /* Look for capacitors connected through zero-valued voltage sources */ /* ***************************************************************** */ /* Get the head of the list of voltage source models in the circuit */ vsrc_type = INPtypelook("Vsource"); if(vsrc_type < 0) { printf("\nERROR - Vsource type not supported in this binary\n"); return(0); } vsrc_head = (VSRCmodel *) ckt->CKThead[vsrc_type]; /* Scan through all voltage source instances and add in values */ /* of any capacitors connected to cmeter input through voltage source */ for(vsrc_model = vsrc_head; vsrc_model; vsrc_model = vsrc_model->VSRCnextModel) { for(vsrc_inst = vsrc_model->VSRCinstances; vsrc_inst; vsrc_inst = vsrc_inst->VSRCnextInstance) { /* Skip to next if not DC source with value = 0.0 */ if((vsrc_inst->VSRCfunctionType != 0) || (vsrc_inst->VSRCdcValue != 0.0)) continue; /* See if voltage source is connected to cmeter input */ /* If so, get other node voltage source is connected to */ /* If not, skip to next source */ if(cmeter_node == vsrc_inst->VSRCposNode) vsrc_node = vsrc_inst->VSRCnegNode; else if(cmeter_node == vsrc_inst->VSRCnegNode) vsrc_node = vsrc_inst->VSRCposNode; else continue; /* Scan through all capacitor instances and add in values */ /* of any capacitors connected to the voltage source node */ for(cap_model = cap_head; cap_model; cap_model = cap_model->CAPnextModel) { for(cap_inst = cap_model->CAPinstances; cap_inst; cap_inst = cap_inst->CAPnextInstance) { if((vsrc_node == cap_inst->CAPposNode) || (vsrc_node == cap_inst->CAPnegNode)) { c += cap_inst->CAPcapac; } } } } /* end for all vsrc instances */ } /* end for all vsrc models */ /* Return the total capacitance value */ return(c); } /* cm_netlist_get_l() This is a special function designed for use with the l_meter model. It returns the equivalent value of inductance connected to the first port on the instance. */ double cm_netlist_get_l(void) { CKTcircuit *ckt; MIFinstance *lmeter_inst; INDinstance *ind_inst; VSRCinstance *vsrc_inst; INDmodel *ind_head; INDmodel *ind_model; VSRCmodel *vsrc_head; VSRCmodel *vsrc_model; int ind_type; int vsrc_type; int lmeter_node; int vsrc_node; double l; /* Get the circuit data structure and current instance */ ckt = g_mif_info.ckt; lmeter_inst = g_mif_info.instance; /* Get internal node number for positive node of lmeter input */ lmeter_node = lmeter_inst->conn[0]->port[0]->smp_data.pos_node; /* Initialize total inductance to infinity */ l = 1.0e12; /* ****************************************************** */ /* Look for inductors connected directly to lmeter input */ /* ****************************************************** */ /* Get the head of the list of inductor models in the circuit */ ind_type = INPtypelook("Inductor"); if(ind_type < 0) { printf("\nERROR - Inductor type not supported in this binary\n"); return(0); } ind_head = (INDmodel *) ckt->CKThead[ind_type]; /* Scan through all inductor instances and add in values */ /* of any inductors connected to lmeter input */ for(ind_model = ind_head; ind_model; ind_model = ind_model->INDnextModel) { for(ind_inst = ind_model->INDinstances; ind_inst; ind_inst = ind_inst->INDnextInstance) { if((lmeter_node == ind_inst->INDposNode) || (lmeter_node == ind_inst->INDnegNode)) { l = 1.0 / ( (1.0 / l) + (1.0 / ind_inst->INDinduct) ); } } } /* ***************************************************************** */ /* Look for inductors connected through zero-valued voltage sources */ /* ***************************************************************** */ /* Get the head of the list of voltage source models in the circuit */ vsrc_type = INPtypelook("Vsource"); if(vsrc_type < 0) { printf("\nERROR - Vsource type not supported in this binary\n"); return(0); } vsrc_head = (VSRCmodel *) ckt->CKThead[vsrc_type]; /* Scan through all voltage source instances and add in values */ /* of any inductors connected to lmeter input through voltage source */ for(vsrc_model = vsrc_head; vsrc_model; vsrc_model = vsrc_model->VSRCnextModel) { for(vsrc_inst = vsrc_model->VSRCinstances; vsrc_inst; vsrc_inst = vsrc_inst->VSRCnextInstance) { /* Skip to next if not DC source with value = 0.0 */ if((vsrc_inst->VSRCfunctionType != 0) || (vsrc_inst->VSRCdcValue != 0.0)) continue; /* See if voltage source is connected to lmeter input */ /* If so, get other node voltage source is connected to */ /* If not, skip to next source */ if(lmeter_node == vsrc_inst->VSRCposNode) vsrc_node = vsrc_inst->VSRCnegNode; else if(lmeter_node == vsrc_inst->VSRCnegNode) vsrc_node = vsrc_inst->VSRCposNode; else continue; /* Scan through all inductor instances and add in values */ /* of any inductors connected to the voltage source node */ for(ind_model = ind_head; ind_model; ind_model = ind_model->INDnextModel) { for(ind_inst = ind_model->INDinstances; ind_inst; ind_inst = ind_inst->INDnextInstance) { if((vsrc_node == ind_inst->INDposNode) || (vsrc_node == ind_inst->INDnegNode)) { l = 1.0 / ( (1.0 / l) + (1.0 / ind_inst->INDinduct) ); } } } } /* end for all vsrc instances */ } /* end for all vsrc models */ /* Return the total capacitance value */ return(l); } ngspice-26/src/xspice/cm/cmevt.c0000644000265600020320000001417112264261473016200 0ustar andreasadmin/* =========================================================================== FILE CMevt.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains functions callable from user code models that are associated with the event-driven algorithm. INTERFACES cm_event_alloc() cm_event_get_ptr() cm_event_queue() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/cm.h" #include "ngspice/mif.h" #include "ngspice/evt.h" #include "ngspice/evtproto.h" /* cm_event_alloc() This function is called from code model C functions to allocate state storage for a particular event-driven instance. It is similar to the function cm_analog_alloc() used by analog models, but allocates states that are rotated during event-driven 'timesteps' instead of analog timesteps. */ void cm_event_alloc( int tag, /* The user-specified tag for the memory block */ int bytes) /* The number of bytes to be allocated */ { int inst_index; int num_tags; MIFinstance *here; CKTcircuit *ckt; Evt_State_Desc_t **desc_ptr; Evt_State_Desc_t *desc; Evt_State_Data_t *state_data; Evt_State_t *state; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* If not initialization pass, return error */ if(here->initialized) { g_mif_info.errmsg = "ERROR - cm_event_alloc() - Cannot alloc when not initialization pass\n"; return; } /* Get pointers for fast access */ inst_index = here->inst_index; state_data = ckt->evt->data.state; /* Scan state descriptor list to determine if tag is present and to */ /* find the end of the list. Report error if duplicate tag */ desc_ptr = &(state_data->desc[inst_index]); desc = *desc_ptr; num_tags = 1; while(desc) { if(desc->tag == tag) { g_mif_info.errmsg = "ERROR - cm_event_alloc() - Duplicate tag\n"; return; } desc_ptr = &(desc->next); desc = *desc_ptr; num_tags++; } /* Create a new state description structure at end of list */ /* and fill in the data and update the total size */ *desc_ptr = TMALLOC(Evt_State_Desc_t, 1); desc = *desc_ptr; desc->tag = tag; desc->size = bytes; desc->offset = state_data->total_size[inst_index]; state_data->total_size[inst_index] += bytes; /* Create a new state structure if list starting at head is null */ state = state_data->head[inst_index]; if(state == NULL) { state = TMALLOC(Evt_State_t, 1); state_data->head[inst_index] = state; } /* Create or enlarge the block and set the time */ if(num_tags == 1) state->block = tmalloc((size_t) state_data->total_size[inst_index]); else state->block = trealloc(state->block, (size_t) state_data->total_size[inst_index]); state->step = g_mif_info.circuit.evt_step; } /* cm_event_get_ptr() This function is called from code model C functions to return a pointer to state storage allocated with cm_event_alloc(). A tag specified in its argument list is used to locate the state in question. A second argument specifies whether the desired state is for the current timestep or from a preceding timestep. The location of the state in memory is then computed and returned. */ void *cm_event_get_ptr( int tag, /* The user-specified tag for the memory block */ int timepoint) /* The timepoint - 0=current, 1=previous */ { int i; int inst_index; MIFinstance *here; CKTcircuit *ckt; void *ptr; Evt_State_Desc_t *desc; Evt_State_Data_t *state_data; Evt_State_t *state; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* If initialization pass, return error */ if((! here->initialized) && (timepoint > 0)) { g_mif_info.errmsg = "ERROR - cm_event_get_ptr() - Cannot get_ptr(tag,1) during initialization pass\n"; return(NULL); } /* Get pointers for fast access */ inst_index = here->inst_index; state_data = ckt->evt->data.state; /* Scan state descriptor list to find the descriptor for this tag. */ /* Report error if tag not found */ desc = state_data->desc[inst_index]; while(desc) { if(desc->tag == tag) break; desc = desc->next; } if(desc == NULL) { g_mif_info.errmsg = "ERROR - cm_event_get_ptr() - Specified tag not found\n"; return(NULL); } /* Get the state pointer from the current array */ state = *(state_data->tail[inst_index]); /* Backup the specified number of timesteps */ for(i = 0; i < timepoint; i++) if(state->prev) state = state->prev; /* Return pointer */ ptr = ((char *) state->block) + desc->offset; return(ptr); } /* cm_event_queue() This function queues an event for an instance participating in the event-driven algorithm. */ int cm_event_queue( double time) /* The time of the event to be queued */ { MIFinstance *here; CKTcircuit *ckt; /* Get the address of the ckt and instance structs from g_mif_info */ here = g_mif_info.instance; ckt = g_mif_info.ckt; /* If breakpoint time <= current event time, return error */ if(time <= g_mif_info.circuit.evt_step) { g_mif_info.errmsg = "ERROR - cm_event_queue() - Event time cannot be <= current time\n"; return(MIF_ERROR); } /* Add the event time to the inst queue */ EVTqueue_inst(ckt, here->inst_index, g_mif_info.circuit.evt_step, time); return(MIF_OK); } ngspice-26/src/xspice/cm/Makefile.am0000644000265600020320000000061612264261473016751 0ustar andreasadmin## Process this file with automake to produce Makefile.in # # JW 3/9/01 - had a go and makeing an autoconf script. noinst_LTLIBRARIES = libcmxsp.la libcmxsp_la_SOURCES = \ cm.c \ cmevt.c \ cmmeters.c \ cmutil.c \ cmexport.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/xspice/cm/Makefile.in0000644000265600020320000004047712264261540016766 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # # JW 3/9/01 - had a go and makeing an autoconf script. VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/xspice/cm DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcmxsp_la_LIBADD = am_libcmxsp_la_OBJECTS = cm.lo cmevt.lo cmmeters.lo cmutil.lo \ cmexport.lo libcmxsp_la_OBJECTS = $(am_libcmxsp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcmxsp_la_SOURCES) DIST_SOURCES = $(libcmxsp_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcmxsp.la libcmxsp_la_SOURCES = \ cm.c \ cmevt.c \ cmmeters.c \ cmutil.c \ cmexport.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/xspice/cm/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/xspice/cm/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcmxsp.la: $(libcmxsp_la_OBJECTS) $(libcmxsp_la_DEPENDENCIES) $(EXTRA_libcmxsp_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcmxsp_la_OBJECTS) $(libcmxsp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmevt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmexport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmmeters.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmutil.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/xspice/cm/cmutil.c0000644000265600020320000004717512264261473016371 0ustar andreasadmin/* =========================================================================== FILE CMutil.c MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Jeff Murray MODIFICATIONS SUMMARY This file contains functions callable from user code models. These functions were written to support code models in the XSPICE library, but may be useful in general. INTERFACES cm_smooth_corner() cm_smooth_discontinuity() cm_smooth_pwl() cm_climit_fcn() cm_complex_set() cm_complex_add() cm_complex_subtract() cm_complex_multiply() cm_complex_divide() REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/ngspice.h" /* for NaN */ #include #include #include "ngspice/cm.h" /* Corner Smoothing Function ************************************ * * * The following function smooths the transition between two * * slopes into a quadratic (parabolic) curve. The calling * * function passes an x,y coordinate representing the * * "breakpoint", a smoothing domain value (d), and the slopes at * * both endpoints, and the x value itself. The situation is * * shown below: B C * * A |<-d->| ^ y * * ---------*-----* | | * * lower_slope-^ |<-d->|\ | | * * \ | | * * \ | *------>x * * At Ax * *****************************************************************/ void cm_smooth_discontinuity( double x_input, /* The x value at which to compute y */ double x_lower, /* The x value of the lower corner */ double y_lower, /* The y value of the lower corner */ double x_upper, /* The x value of the upper corner */ double y_upper, /* The y value of the upper corner */ double *y_output, /* The computed smoothed y value */ double *dy_dx) /* The partial of y wrt x */ { double x_center,y_center,a,b,c,center_slope; /* Derive x_center, y_center & center_slope values */ x_center = (x_upper + x_lower) / 2.0; y_center = (y_upper + y_lower) / 2.0; center_slope = 2.0 * (y_upper - y_lower) / (x_upper - x_lower); if (x_input < x_lower) { /* x_input @ lower level */ *y_output = y_lower; *dy_dx = 0.0; } else { if (x_input < x_center) { /* x_input in lower transition */ a = center_slope / (x_upper - x_lower); b = center_slope - 2.0 * a * x_center; c = y_center - a * x_center * x_center - b * x_center; *y_output = a * x_input * x_input + b * x_input + c; *dy_dx = 2.0 * a * x_input + b; } else { /* x_input in upper transition */ if (x_input < x_upper) { a = -center_slope / (x_upper - x_lower); b = -2.0 * a * x_upper; c = y_upper - a * x_upper * x_upper - b * x_upper; *y_output = a * x_input * x_input + b * x_input + c; *dy_dx = 2.0 * a * x_input + b; } else { /* x_input @ upper level */ *y_output = y_upper; *dy_dx = 0.0; } } } } /* Controlled Limiter Function (modified CLIMIT) */ /* This is a special function created for use with the CLIMIT controlled limiter model. */ void cm_climit_fcn( double in, /* The input value */ double in_offset, /* The input offset */ double cntl_upper, /* The upper control input value */ double cntl_lower, /* The lower control input value */ double lower_delta, /* The delta from control to limit value */ double upper_delta, /* The delta from control to limit value */ double limit_range, /* The limiting range */ double gain, /* The gain from input to output */ int percent, /* The fraction vs. absolute range flag */ double *out_final, /* The output value */ double *pout_pin_final, /* The partial of output wrt input */ double *pout_pcntl_lower_final, /* The partial of output wrt lower control input */ double *pout_pcntl_upper_final) /* The partial of output wrt upper control input */ { /* Define error message string constants */ char *climit_range_error = "\n**** ERROR ****\n* CLIMIT function linear range less than zero. *\n"; double threshold_upper,threshold_lower,linear_range, out_lower_limit,out_upper_limit,limited_out, out,pout_pin,pout_pcntl_lower,pout_pcntl_upper,junk; /* Find Upper & Lower Limits */ out_lower_limit = cntl_lower + lower_delta; out_upper_limit = cntl_upper - upper_delta; if (percent == TRUE) /* Set range to absolute value */ limit_range = limit_range * (out_upper_limit - out_lower_limit); threshold_upper = out_upper_limit - /* Set Upper Threshold */ limit_range; threshold_lower = out_lower_limit + /* Set Lower Threshold */ limit_range; linear_range = threshold_upper - threshold_lower; /* Test the linear region & make sure there IS one... */ if (linear_range < 0.0) { printf("%s\n",climit_range_error); /* limited_out = 0.0; pout_pin = 0.0; pout_pcntl_lower = 0.0; pout_pcntl_upper = 0.0; return; */ } /* Compute Un-Limited Output */ out = gain * (in_offset + in); if (out < threshold_lower) { /* Limit Out @ Lower Bound */ pout_pcntl_upper= 0.0; if (out > (out_lower_limit - limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_lower_limit,out_lower_limit, limit_range,0.0,1.0,&limited_out, &pout_pin); pout_pin = gain * pout_pin; cm_smooth_discontinuity(out,out_lower_limit,1.0,threshold_lower, 0.0,&pout_pcntl_lower,&junk); } else { /* Hard-Limited Region */ limited_out = out_lower_limit; pout_pin = 0.0; pout_pcntl_lower = 1.0; } } else { if (out > threshold_upper) { /* Limit Out @ Upper Bound */ pout_pcntl_lower= 0.0; if (out < (out_upper_limit+limit_range)) { /* Parabolic */ cm_smooth_corner(out,out_upper_limit,out_upper_limit, limit_range,1.0,0.0,&limited_out, &pout_pin); pout_pin = gain * pout_pin; cm_smooth_discontinuity(out,threshold_upper,0.0,out_upper_limit, 1.0,&pout_pcntl_upper,&junk); } else { /* Hard-Limited Region */ limited_out = out_upper_limit; pout_pin = 0.0; pout_pcntl_upper = 1.0; } } else { /* No Limiting Needed */ limited_out = out; pout_pin = gain; pout_pcntl_lower = 0.0; pout_pcntl_upper = 0.0; } } *out_final = limited_out; *pout_pin_final = pout_pin; *pout_pcntl_lower_final = pout_pcntl_lower; *pout_pcntl_upper_final = pout_pcntl_upper; } /**** End Controlled Limiter Function ****/ /*=============================================================================*/ /* Piecewise Linear Smoothing Function ********************* * The following is a transfer curve function which * * accepts as input an "x" value, and returns a "y" * * value. The transfer characteristic is a smoothed * * piece-wise linear curve described by *x and *y array * * coordinate pairs. * * * * Created 8/14/91 * * Last Modified 8/14/91 J.P.Murray * ***********************************************************/ /*********************************************************** * * * ^ x[4] * * x[1] | * * * | midpoint /|\ * * | | / \ * * | V | / | \ * * *----*----* \ * * midpoint /| | | \ * * | / || * <- midpoint * * V/ | |x[3] \ * * <-----------*------------O------------\-------------> * * | / | \ | | * * / | \ * * |/ | \| | * * * | *-----*---> * * /| | x[5] x[6] * * / | * * / x[0] | * * / | * * / | * * / | * * V * * * ***********************************************************/ /*********************************************************** * * * Note that for the cm_smooth_pwl function, the arguments * * are as listed below: * * * * * * double x_input; input * * * double *x; pointer to the x-coordinate * * array * * * double *y; pointer to the y-coordinate * * array * * * int size; size of the arrays * * * * double input_domain; smoothing range * * * double dout_din; partial derivative of the * * output w.r.t. the input * * * * ***********************************************************/ double cm_smooth_pwl(double x_input, double *x, double *y, int size, double input_domain, double *dout_din) { int i; /* generic loop counter index */ double lower_seg; /* x segment below which input resides */ double upper_seg; /* x segment above which the input resides */ double lower_slope; /* slope of the lower segment */ double upper_slope; /* slope of the upper segment */ double out; /* output */ double threshold_lower; /* value below which the output begins smoothing */ double threshold_upper; /* value above which the output begins smoothing */ /* char *limit_error="\n***ERROR***\nViolation of 50% rule in breakpoints!\n";*/ /* Determine segment boundaries within which x_input resides */ if (x_input <= (x[1] + x[0])/2.0) {/*** x_input below lowest midpoint ***/ *dout_din = (y[1] - y[0])/(x[1] - x[0]); out = *y + (x_input - *x) * *dout_din; return out; } else { if (x_input >= (x[size-2] + x[size-1])/2.0) { /*** x_input above highest midpoint ***/ *dout_din = (y[size-1] - y[size-2]) / (x[size-1] - x[size-2]); out = y[size-1] + (x_input - x[size-1]) * *dout_din; return out; } else { /*** x_input within bounds of end midpoints... ***/ /*** must determine position progressively & then ***/ /*** calculate required output. ***/ for (i=1; i // standard Windows calls #include // Win32 message cracker #include // sprintf and co #include // exit codes #include // var. arguments #include // assert macro #include "ngspice/stringutil.h" // copy #include // _read #include #include #include #include #include #include "ngspice/bool.h" /* bool defined as unsigned char */ #include "misc/misc_time.h" /* timediff */ /* Constants */ #define TBufSize 65536 // size of text buffer #define CR VK_RETURN // Carriage Return #define VK_EOT 0x1A // End of Transmission, should emulate ctrl-z #define LF 10 // Line Feed #define SE 0 // String termination #define BorderSize 8 // Umrandung des Stringfeldes #define SBufSize 100 // Groesze des Stringbuffers #define IOBufSize 16348 // Groesze des printf-Buffers #define HistSize 20 // Zeilen History-Buffer #define StatusHeight 25 // Hoehe des Status Bars #define StatusFrame 2 // Abstand Statusbar / StatusElement #define StatusElHeight (StatusHeight - 2 * StatusFrame) #define SourceLength 500 // Platz fuer Source File Name #define AnalyseLength 100 // Platz fuer Analyse #define QuitButtonLength 80 /* macro to ignore unused variables and parameters */ #define NG_IGNORE(x) (void)x #define QUIT_BUTTON_ID 2 /* Types */ typedef char SBufLine[SBufSize+1]; // Eingabezeile /* Global variables */ HINSTANCE hInst; /* Application instance */ int WinLineWidth = 690; /* Window width */ HWND hwMain; /* Main Window of the application */ HWND twText; /* Text window */ HWND swString; /* input string */ HWND hwStatus; /* status bar */ HWND hwSource; /* display of source name */ HWND hwAnalyse; /* analysis window */ HWND hwQuitButton; /* Pause button */ static int nReturnCode = 0; /* WinMain return value */ static int nShowState; /* Display mode of main window */ static WNDCLASS hwMainClass; /* Class definition for the main window */ static LPCTSTR hwClassName = "SPICE_TEXT_WND";/* Class name of the main window */ static LPCTSTR hwWindowName = PACKAGE_STRING; /* main window displayed name */ static WNDCLASS twTextClass; /* Class definition for the text box */ static LPCTSTR twClassName = "SPICE_TEXT_BOX"; /* Class name for the text box */ static LPCTSTR twWindowName = "TextOut"; /* text box name */ static size_t TBufEnd = 0; /* Pointer to \0 */ static char TBuffer [TBufSize+1]; /* Text buffer */ static SBufLine SBuffer; /* Input buffer */ static WNDCLASS swStringClass; /* Class definition of string window */ static LPCTSTR swClassName = "SPICE_STR_IN"; /* Class name of text input */ static LPCTSTR swWindowName = "StringIn"; /* Window name */ static char CRLF [] = { CR, LF, SE} ; /* CR/LF */ static WNDCLASS hwElementClass; /* Class definition of status displays */ static LPCTSTR hwElementClassName = "ElementClass"; static LPCTSTR hwSourceWindowName = "SourceDisplay"; static LPCTSTR hwAnalyseWindowName = "AnalyseDisplay"; static int RowHeight = 16; /* Height of line of text */ static int LineHeight = 25; /* Height of input line */ static int VisibleRows = 10; /* Number of visible lines in text window */ static BOOL DoUpdate = FALSE; /* Update text window */ static WNDPROC swProc = NULL; /* original string window procedure */ static WNDPROC twProc = NULL; /* original text window procedure */ static SBufLine HistBuffer[HistSize]; /* History buffer for string window */ static int HistIndex = 0; /* History management */ static int HistPtr = 0; /* History management */ extern bool ft_ngdebug; /* some additional debug info printed */ extern bool ft_batchmode; extern FILE *flogp; /* definition see xmain.c, stdout redirected to file */ #include "winmain.h" /* -------------------------------------------------------- */ /* Clear history buffer, set pointer to the beginning */ static void HistoryInit(void) { int i; HistIndex = 0; HistPtr = 0; for ( i = 0; i < HistSize; i++) HistBuffer[i][0] = SE; } /* Delete first line of buffer, all other lines move one down */ static void HistoryScroll(void) { memmove( &(HistBuffer[0]), &(HistBuffer[1]), sizeof(SBufLine) * (HistSize-1)); HistBuffer[HistSize-1][0] = SE; if (HistIndex) HistIndex--; if (HistPtr) HistPtr--; } /* Enter new input line into history buffer */ static void HistoryEnter( char * newLine) { if (!newLine || !*newLine) return; if (HistPtr == HistSize) HistoryScroll(); strcpy( HistBuffer[HistPtr], newLine); HistPtr++; HistIndex = HistPtr; } // Mit dem Index eine Zeile zurueckgehen und den dort stehenden Eintrag zurueckgeben static char * HistoryGetPrev(void) { if (HistIndex) HistIndex--; return &(HistBuffer[HistIndex][0]); } // Mit dem Index eine Zeile vorgehen und den dort stehenden Eintrag zurueckgeben static char * HistoryGetNext(void) { if (HistIndex < HistPtr) HistIndex++; if (HistIndex == HistPtr) return ""; //HistIndex--; return &(HistBuffer[HistIndex][0]); } // ---------------------------------------------------------- // Warte, bis keine Messages mehr zu bearbeiten sind void WaitForIdle(void) { MSG m; // arbeite alle Nachrichten ab while ( PeekMessage( &m, NULL, 0, 0, PM_REMOVE)) { TranslateMessage( &m); DispatchMessage( &m); } } // ---------------------------------------------------------- // Warte, bis keine Messages mehr zu bearbeiten sind, // dann warte auf neue Message (Input handling ohne Dauerloop) static void WaitForMessage(void) { MSG m; // arbeite alle Nachrichten ab while ( PeekMessage( &m, NULL, 0, 0, PM_REMOVE)) { TranslateMessage( &m); DispatchMessage( &m); } WaitMessage(); } // ------------------------------------------------------------- // Loeschen des Stringfensters static void ClearInput(void) { // Darstellen Edit_SetText( swString, ""); } // -------------------------------------------------------- /* New text to Source file window */ void SetSource( char * Name) { if (hwSource) { SetWindowText( hwSource, Name); InvalidateRgn( hwSource, NULL, TRUE); } } // ----------------------------------------------------------- /* New progress report into analysis window. Update only every DELTATIME milliseconds */ #define DELTATIME 150 void SetAnalyse( char * Analyse, /*in: analysis type */ int DecaPercent /*in: 10 times the progress [%]*/ /*HWND hwAnalyse, in: global handle to analysis window */ ) { static int OldPercent = -2; /* Previous progress value */ static char OldAn[128]; /* Previous analysis type */ char s[128], t[128]; /* outputs to analysis window and task bar */ static struct timeb timebefore; /* previous time stamp */ struct timeb timenow; /* actual time stamp */ int diffsec, diffmillisec; /* differences actual minus prev. time stamp */ WaitForIdle(); if ((DecaPercent == OldPercent) && !strcmp(OldAn, Analyse)) return; /* get actual time */ ftime(&timenow); timediff(&timenow, &timebefore, &diffsec, &diffmillisec); /* info every one percent of progress: actual time, progress, to catch linearity of progress of simulation */ if (ft_ngdebug && !strcmp(Analyse, "tran")) if ((int)((double)DecaPercent/10.) > (int)((double)OldPercent/10.)) { p_r_i_n_t_f("%3.1f%% percent progress after %4.2f seconds.\n", (double)DecaPercent/10., seconds()); } OldPercent = DecaPercent; /* output only into hwAnalyse window and if time elapsed is larger than DELTATIME given value, or if analysis has changed, else return */ if (hwAnalyse && ((diffsec > 0) || (diffmillisec > DELTATIME) || strcmp(OldAn, Analyse))) { if (DecaPercent < 0) { sprintf( s, "--ready--"); sprintf( t, "%s", PACKAGE_STRING); } else if (DecaPercent == 0) { sprintf( s, "%s", Analyse); sprintf( t, "%s %s", PACKAGE_STRING, Analyse); } else if (!strcmp(Analyse, "shooting")) { sprintf( s, "%s: %d", Analyse, DecaPercent); sprintf( t, "%s %d", PACKAGE_STRING, DecaPercent); } else { sprintf( s, "%s: %3.1f%%", Analyse, (double)DecaPercent/10.); sprintf( t, "%s %3.1f%%", PACKAGE_STRING, (double)DecaPercent/10.); } timebefore.dstflag = timenow.dstflag; timebefore.millitm = timenow.millitm; timebefore.time = timenow.time; timebefore.timezone = timenow.timezone; /* info when previous analysis period has finished */ if (strcmp(OldAn, Analyse)) { if (ft_ngdebug && (strcmp(OldAn, ""))) p_r_i_n_t_f("%s finished after %4.2f seconds.\n", OldAn, seconds()); strncpy(OldAn, Analyse, 127); } SetWindowText( hwAnalyse, s); SetWindowText( hwMain, t); InvalidateRgn( hwAnalyse, NULL, TRUE); InvalidateRgn( hwMain, NULL, TRUE); } UpdateWindow(hwAnalyse); UpdateWindow(hwMain); } // --------------------------------------------------------------- // Anpassen des Scrollers im Textfenster // Stellt gleichzeitig den Text neu dar static void AdjustScroller(void) { int LineCount; int FirstLine; int MyFirstLine; LineCount = Edit_GetLineCount( twText); FirstLine = Edit_GetFirstVisibleLine( twText); MyFirstLine = LineCount - VisibleRows; if (MyFirstLine < 0 ) MyFirstLine = 0; Edit_Scroll( twText, MyFirstLine - FirstLine, 0); // Das wars DoUpdate = FALSE; } // Loeschen einer Zeile im Textbuffer static void _DeleteFirstLine(void) { char * cp = strchr( TBuffer, LF); if (!cp) { // Buffer leeren TBufEnd = 0; TBuffer[TBufEnd] = SE; return; } cp++; TBufEnd -= (size_t)(cp - TBuffer); memmove( TBuffer, cp, TBufEnd); TBuffer[TBufEnd] = SE; } // Anfuegen eines chars an den TextBuffer static void AppendChar( char c) { // Textbuffer nicht zu grosz werden lassen while ((TBufEnd+4) >= TBufSize) _DeleteFirstLine(); // Zeichen anfuegen TBuffer[TBufEnd++] = c; TBuffer[TBufEnd] = SE; DoUpdate = TRUE; // Sobald eine Zeile zuende, im Textfenster anzeigen if (c == LF) DisplayText(); } // Anfuegen eines Strings an den TextBuffer static void AppendString( const char * Line) { size_t i; if (!Line) return; // Zeilenlaenge bestimmen i = strlen(Line); // Textbuffer nicht zu grosz werden lassen while ((i+TBufEnd+3) >= TBufSize) _DeleteFirstLine(); // Zeile dranhaengen strcpy( &TBuffer[TBufEnd], Line); TBufEnd += i; DoUpdate = TRUE; } // Text neu darstellen static void DisplayText( void) { // Darstellen Edit_SetText( twText, TBuffer); // Scroller updaten, neuen Text darstellen AdjustScroller(); } /* // Anfuegen einer Zeile an den Textbuffer void AppendLine( const char * Line) { if (!Line) return; // String anhaengen AppendString( Line); // CRLF anhaengen AppendString( CRLF); } */ // ------------------------------------------------------------------- // Lese ein Zeichen ein static int w_getch(void) { int c; // Sind noch Zeichen da? c = SBuffer[0]; if (!c) { // Alte Informationen darstellen if (DoUpdate) DisplayText(); // Focus setzen SetFocus( swString); // Cursor = normal SetCursor( LoadCursor( NULL, IDC_IBEAM)); // Analyse ist fertig SetAnalyse("", -1); // Warten auf die Eingabe do { WaitForMessage(); c = SBuffer[0]; } while ( !c ); // Zeichen an die Ausgabe anhaengen AppendString( SBuffer); // Cursor = warten SetCursor( LoadCursor( NULL, IDC_WAIT)); } // Zeichen abholen memmove( &SBuffer[0], &SBuffer[1], SBufSize); return c; } // Gebe ein Zeichen aus static int w_putch( int c) { if (c) AppendChar( (char)c ); return c; } /* --------------------------------------------------------- */ /* Main window changes size */ static void Main_OnSize(HWND hwnd, UINT state, int cx, int cy) { int h = cy - LineHeight - StatusHeight; NG_IGNORE(hwnd); NG_IGNORE(state); /* Expand text window */ MoveWindow( twText, 0, 0, cx, h , TRUE); VisibleRows = (h / RowHeight) -1; AdjustScroller(); /* Expand string window */ MoveWindow( swString, 0, h, cx, LineHeight, TRUE); /* Expand Status Elements */ h = cy - LineHeight + StatusFrame -1; MoveWindow( hwSource, StatusFrame, h, SourceLength, StatusElHeight, TRUE); MoveWindow( hwAnalyse, cx - 3 * StatusFrame - QuitButtonLength - AnalyseLength - 20, h, AnalyseLength, StatusElHeight, TRUE); MoveWindow( hwQuitButton, cx - StatusFrame - QuitButtonLength - 20, h, QuitButtonLength, StatusElHeight, TRUE); } /* Write a command into the command buffer */ static void PostSpiceCommand( const char * const cmd) { strcpy( SBuffer, cmd); strcat( SBuffer, CRLF); } /* Main Window procedure */ static LRESULT CALLBACK MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { /* command issued by pushing the "Quit" button */ case WM_COMMAND: if (HIWORD(wParam) == BN_CLICKED) if (ft_batchmode && (MessageBox(NULL, "Do you want to quit ngspice?", "Quit", MB_OKCANCEL|MB_ICONERROR) == IDCANCEL)) goto DEFAULT_AFTER; if (LOWORD(wParam) == QUIT_BUTTON_ID) { SendMessage(GetParent((HWND)lParam), WM_CLOSE, 0, 0); } /* write all achieved so far to log file */ if (flogp) f_f_l_u_s_h(flogp); goto DEFAULT_AFTER; case WM_CLOSE: /* Put Spice commmand "Quit" to end the program into the text buffer */ PostSpiceCommand( "quit"); /* If simulation is running, set a breakpoint */ raise (SIGINT); return 0; case WM_SIZE: HANDLE_WM_SIZE( hwnd, wParam, lParam, Main_OnSize); goto DEFAULT_AFTER; default: DEFAULT_AFTER: return DefWindowProc( hwnd, uMsg, wParam, lParam); } } /* Procedure for string window */ static LRESULT CALLBACK StringWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { char c; UINT i; switch (uMsg) { case WM_KEYDOWN: i = (UINT) wParam; if ((i == VK_UP) || (i == VK_DOWN)) { /* Set old text to new */ SetWindowText( hwnd, i == VK_UP? HistoryGetPrev(): HistoryGetNext()); /* Put cursor to end of line */ CallWindowProc( swProc, hwnd, uMsg, (WPARAM) VK_END, lParam); return 0; } if ( i == VK_ESCAPE) { ClearInput(); return 0; } goto DEFAULT; case WM_CHAR: c = (char) wParam; if (c == CR) { GetWindowText( hwnd, SBuffer, SBufSize); HistoryEnter( SBuffer); strcat( SBuffer, CRLF); ClearInput(); return 0; } if (c == VK_ESCAPE) return 0; /* ctrl-z ends input from string window (like a console input), FIXME: not yet working */ if (c == VK_EOT) { // strcat( SBuffer, ""); SBuffer[0] = c; // '\004'; SBuffer[1] = '\n'; return 0; } /* ctrl-c interrupts simulation */ if (c == VK_CANCEL) { raise (SIGINT); return 0; } default: DEFAULT: return CallWindowProc( swProc, hwnd, uMsg, wParam, lParam); } } /* Procedure for text window */ static LRESULT CALLBACK TextWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { unsigned char c; UINT i; switch (uMsg) { case WM_KEYDOWN: i = (UINT) wParam; if ((i == VK_UP) || (i == VK_DOWN) || (i == VK_ESCAPE)) { /* redirect input into string window */ SetFocus( swString); return SendMessage( swString, uMsg, wParam, lParam); } goto DEFAULT_TEXT; case WM_CHAR: c = (unsigned char) wParam; if ((c == CR) || ( c >= ' ') || ( c == VK_ESCAPE)) { /* redirect input into string window */ SetFocus( swString); return SendMessage( swString, uMsg, wParam, lParam); } /* ctrl-c interrupts simulation */ if (c == VK_CANCEL) { raise (SIGINT); return 0; } default: DEFAULT_TEXT: return CallWindowProc( twProc, hwnd, uMsg, wParam, lParam); } } static void Element_OnPaint(HWND hwnd) { PAINTSTRUCT ps; RECT r; RECT s; HGDIOBJ o; char buffer[128]; int i; /* Prepare */ HDC hdc = BeginPaint( hwnd, &ps); GetClientRect( hwnd, &r); /* Draw frame */ o = GetStockObject( GRAY_BRUSH); s.left = r.left; s.right = r.right; s.top = r.top; s.bottom = r.top+1; FillRect( hdc, &s, o); s.right = r.left+1; s.bottom = r.bottom; FillRect( hdc, &s, o); o = GetStockObject( WHITE_BRUSH); s.right = r.right; s.top = r.bottom-1; FillRect( hdc, &s, o); s.left = r.right-1; s.top = r.top; FillRect( hdc, &s, o); /* Draw contents */ buffer[0] = '\0'; i = GetWindowText( hwnd, buffer, 127); s.left = r.left+1; s.right = r.right-1; s.top = r.top+1; s.bottom = r.bottom-1; o = GetStockObject( LTGRAY_BRUSH); FillRect( hdc, &s, o); SetBkMode( hdc, TRANSPARENT); ExtTextOut( hdc, s.left+1, s.top+1, ETO_CLIPPED, &s, buffer, (unsigned)i, NULL); /* End */ EndPaint( hwnd, &ps); } /* Procedure for element window */ static LRESULT CALLBACK ElementWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_PAINT: HANDLE_WM_PAINT(hwnd, wParam, lParam, Element_OnPaint); return 0; default: return DefWindowProc( hwnd, uMsg, wParam, lParam); } } #define SPACE ' ' #define QUOTE '\"' #define DELIMITER 26 /* for the lack of anything better */ #define DELIMITERSTRING "\26" /* This function converts a string into an argc/argv represenation. INPUT: cmdline - a string OUTPUT: argc - the number of equivalent argv strings which is also the number of strings in argv argv - the argv given the input string which consists of seperate strings for each argument RETURNS: 0 on success -1 on failure */ static int MakeArgcArgv(char *cmdline,int *argc,char ***argv) { char *pC1; /* a temporary character pointer */ char *pWorkString=NULL; /* a working copy of cmdline */ int i; /* a loop counter */ int quoteflag=0; /* for the finite state machine parsing cmdline */ bool firstspace = TRUE; /* count only the first space */ int numargs=1; /* the number of command line arguments, later copied to *argc */ char **tmpargv; /* the temporary argv, later copied to *argv */ int status = ERROR_SUCCESS; /* status */ char buffer[MAX_PATH+1]; char deli[2]; /* make sure we aren't dealing with any NULL pointers */ if ( (NULL == argc) || (NULL == argv)) { status = -1; goto outahere; } *argc = 0; /* set the count to zero to start */ *argv = NULL; /* set the pointer to NULL to start */ /* if the string passed in was a NULL pointer, consider this to be an empty command line and give back only an argc of 1 and an argv[0] */ if (NULL != cmdline) { /* make a copy of the string so that we can modify it without messing up the original */ pWorkString = copy(cmdline); if (NULL == pWorkString) return -1; /* memory allocation error */ /* Now, to make sure we don't have any quoted arguments with spaces in them, replace all spaces except those between " marks with our own special delimiter for strtok */ /* trim all the whitespace off the end of the string. */ for (i=(signed)strlen(pWorkString)-1; i >=0; i--) if (isspace(pWorkString[i])) pWorkString[i] = '\0'; else break; #if defined(__CYGWIN__) /* for CYGWIN: trim off the leading white space delivered by lpszCmdLine. */ pWorkString = rlead(pWorkString); #endif /* If we still have a string left, parse it for all the arguments. */ if (strlen(pWorkString)) { /* This could probably be done with strtok as well but strtok is destructive if I wanted to look for " \"" and I couldn't tell what delimiter that I had bumped against */ for (i=0; i < (signed)strlen(pWorkString); i++) { switch (pWorkString[i]) { case SPACE: if (!quoteflag) { pWorkString[i] = DELIMITER; /* change space to delimiter */ if (firstspace) numargs++; /* count only the first space */ firstspace = FALSE; } break; case QUOTE: quoteflag = !quoteflag; /* turns on and off as we pass quotes */ break; default: firstspace = TRUE; break; } } /* Now, we should have ctrl-Zs everywhere that there used to be a space not protected by quote marks. We should also have the number of command line arguments that were in the command line (not including argv[0] which should be the program name). We should add one more to numargs to take into account argv[0]. */ numargs++; } } /* malloc an argv */ tmpargv = (char**)malloc((unsigned)numargs * sizeof(char *)); if (NULL == tmpargv) { status = -1; goto outahere; } /* API to give the program name */ GetModuleFileName(NULL, buffer, sizeof(buffer)); tmpargv[0] = copy(buffer); /* add program name to argv */ deli[0] = DELIMITER; deli[1] = '\0'; /* delimiter for strtok */ pC1 = NULL; /* Now actually strdup all the arguments out of the string and store them in the argv */ for (i=1; i < numargs; i++) { if (NULL == pC1) pC1 = pWorkString; if (i == 1) tmpargv[i] = copy(strtok(pC1, deli)); else tmpargv[i] = copy(strtok(NULL, deli)); } /* copy the working values over to the arguments */ *argc = numargs; *argv = tmpargv; outahere: /* free the working string if one was allocated */ if (pWorkString) free(pWorkString); /* return status */ return status; } /* Main entry point for our Windows application */ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLine, int nCmdShow) { int ix, iy; /* width and height of screen */ int iyt; /* height of screen divided by 3 */ int status; int argc; char **argv; RECT wsize; /* size of usable window */ NG_IGNORE(hPrevInstance); /* fill global variables */ hInst = hInstance; nShowState = nCmdShow; /* Initialize text buffer */ TBufEnd = 0; TBuffer[TBufEnd] = SE; SBuffer[0] = SE; HistoryInit(); /* Define main window class */ hwMainClass.style = CS_HREDRAW | CS_VREDRAW; hwMainClass.lpfnWndProc = MainWindowProc; hwMainClass.cbClsExtra = 0; hwMainClass.cbWndExtra = 0; hwMainClass.hInstance = hInst; hwMainClass.hIcon = LoadIcon( hInst, MAKEINTRESOURCE(1)); hwMainClass.hCursor = LoadCursor( NULL, IDC_ARROW); hwMainClass.hbrBackground = GetStockObject( LTGRAY_BRUSH); hwMainClass.lpszMenuName = NULL; hwMainClass.lpszClassName = hwClassName; if (!RegisterClass( &hwMainClass)) goto THE_END; /* Define text window class */ if (!GetClassInfo( NULL, "EDIT", &twTextClass)) goto THE_END; twProc = twTextClass.lpfnWndProc; twTextClass.lpfnWndProc = TextWindowProc; twTextClass.hInstance = hInst; twTextClass.lpszMenuName = NULL; twTextClass.lpszClassName = twClassName; if (!RegisterClass( &twTextClass)) goto THE_END; /* Define string window class */ if (!GetClassInfo( NULL, "EDIT", &swStringClass)) goto THE_END; swProc = swStringClass.lpfnWndProc; swStringClass.lpfnWndProc = StringWindowProc; swStringClass.hInstance = hInst; swStringClass.lpszMenuName = NULL; swStringClass.lpszClassName = swClassName; if (!RegisterClass( &swStringClass)) goto THE_END; /* Define status element class */ hwElementClass.style = CS_HREDRAW | CS_VREDRAW; hwElementClass.lpfnWndProc = ElementWindowProc; hwElementClass.cbClsExtra = 0; hwElementClass.cbWndExtra = 0; hwElementClass.hInstance = hInst; hwElementClass.hIcon = NULL; hwElementClass.hCursor = LoadCursor( NULL, IDC_ARROW); hwElementClass.hbrBackground = GetStockObject( LTGRAY_BRUSH); hwElementClass.lpszMenuName = NULL; hwElementClass.lpszClassName = hwElementClassName; if (!RegisterClass( &hwElementClass)) goto THE_END; /*Create main window */ SystemParametersInfo(SPI_GETWORKAREA, 0, &wsize, 0); iy = wsize.bottom; iyt = iy / 3; ix = wsize.right; // iy = GetSystemMetrics( SM_CYSCREEN); // iyt = GetSystemMetrics( SM_CYSCREEN) / 3; // ix = GetSystemMetrics( SM_CXSCREEN); hwMain = CreateWindow( hwClassName, hwWindowName, WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN, 0, iyt * 2, ix, iyt, NULL, NULL, hInst, NULL); if (!hwMain) goto THE_END; /* Create text window */ twText = CreateWindowEx(WS_EX_NOPARENTNOTIFY, twClassName, twWindowName, ES_LEFT | ES_MULTILINE | ES_READONLY | WS_CHILD | WS_BORDER | WS_VSCROLL, 20,20,300,100, hwMain, NULL, hInst, NULL); if (!twText) goto THE_END; /* Ansii fixed font */ { HDC textDC; HFONT font; TEXTMETRIC tm; font = GetStockFont( ANSI_FIXED_FONT); SetWindowFont( twText, font, FALSE); textDC = GetDC( twText); if (textDC) { SelectObject( textDC, font); if (GetTextMetrics( textDC, &tm)) { RowHeight = tm.tmHeight; WinLineWidth = 90 * tm.tmAveCharWidth; } ReleaseDC( twText, textDC); } } /* Create string window */ swString = CreateWindowEx(WS_EX_NOPARENTNOTIFY, swClassName, swWindowName, ES_LEFT | WS_CHILD | WS_BORDER, 20,20,300,100, hwMain, NULL, hInst, NULL); if (!swString) goto THE_END; { HDC stringDC; TEXTMETRIC tm; stringDC = GetDC( swString); if (stringDC) { if (GetTextMetrics( stringDC, &tm)) LineHeight = tm.tmHeight + tm.tmExternalLeading + BorderSize; ReleaseDC( swString, stringDC); } } /* Create source window */ hwSource = CreateWindowEx(WS_EX_NOPARENTNOTIFY, hwElementClassName, hwSourceWindowName, WS_CHILD, 0,0, SourceLength, StatusElHeight, hwMain, NULL, hInst, NULL); if (!hwSource) goto THE_END; /* Create analysis window */ hwAnalyse = CreateWindowEx(WS_EX_NOPARENTNOTIFY, hwElementClassName, hwAnalyseWindowName, WS_CHILD, 0,0, AnalyseLength, StatusElHeight, hwMain, NULL, hInst, NULL); if (!hwAnalyse) goto THE_END; /* Create "Quit" button */ hwQuitButton = CreateWindow("BUTTON", "Quit", WS_CHILD | BS_PUSHBUTTON, 0, 0, QuitButtonLength, StatusElHeight, hwMain, (HMENU)(UINT_PTR)QUIT_BUTTON_ID, hInst, NULL); if (!hwQuitButton) goto THE_END; /* Make main window and subwindows visible. Size of windows allows display of 80 character line. Limit window to screen size (if only VGA). */ if (ix < WinLineWidth) WinLineWidth = ix; MoveWindow( hwMain, 0, (iyt * 2), WinLineWidth, iyt, FALSE); ShowWindow( hwMain, nShowState); ShowWindow( twText, SW_SHOWNORMAL); ShowWindow( swString, SW_SHOWNORMAL); ShowWindow( hwSource, SW_SHOWNORMAL); ShowWindow( hwAnalyse,SW_SHOWNORMAL); ShowWindow( hwQuitButton,SW_SHOWNORMAL); ClearInput(); DisplayText(); SetSource( ""); SetAnalyse("Start", 0); UpdateWindow( hwMain); SetFocus( swString); status = MakeArgcArgv(lpszCmdLine,&argc,&argv); /* Wait until everything is settled */ WaitForIdle(); /* Go to main() */ nReturnCode = xmain(argc, argv); THE_END: /* terminate */ return nReturnCode; } // ------------------------------------------------------------------- /* Eigentlich wollte ich die Standard-Streams durch einen Hook in der Library umleiten, aber so etwas gibt es anscheinend nicht. Deswegen musz ich praktisch alle IO-Funktionen umdefinieren (siehe wstdio.h). Leider geht das nicht bei allen. Man schaue also nach, bevor man eine Funktion benutzt! */ int f_f_l_u_s_h( FILE * __stream) { if (((__stream == stdout) && !flogp) || (__stream == stderr)) return 0; else return fflush(__stream); } int fg_e_t_c( FILE * __stream) { if (__stream == stdin) { int c; do { c = w_getch(); } while( c == CR); return c; } else return fgetc(__stream); } int f_g_e_t_p_o_s( FILE * __stream, fpos_t * __pos) { int result; if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } else result = fgetpos(__stream, __pos); return result; } char * fg_e_t_s(char * __s, int __n, FILE * __stream) { if (__stream == stdin) { int i = 0; int c; while ( i < (__n-1)) { c = w_getch(); if (c == LF) { __s[i++] = LF; break; } if (c != CR) __s[i++] = (char)c; } __s[i] = SE; return __s; } else return fgets( __s, __n, __stream); } int fp_u_t_c(int __c, FILE * __stream) { if (!flogp && ((__stream == stdout) || (__stream == stderr))) { if ( __c == LF) w_putch( CR); return w_putch(__c); // Ausgabe in Datei *.log 14.6.2000 } else if (flogp && ((__stream == stdout) || __stream == stderr)) { return fputc( __c, flogp); } else return fputc( __c, __stream); } int fp_u_t_s(const char * __s, FILE * __stream) { // if (((__stream == stdout) && !flogp) || (__stream == stderr)) { hvogt 14.6.2000 if ((__stream == stdout) || (__stream == stderr)) { int c = SE; if (!__s) return EOF; for (;;) { if (*__s) { c = *__s++; fp_u_t_c(c, __stream); } else return c; } } else return fputs( __s, __stream); } int fp_r_i_n_t_f(FILE * __stream, const char * __format, ...) { int result; char s [IOBufSize]; va_list args; va_start(args, __format); // if (((__stream == stdout) && !flogp) || (__stream == stderr)) { if ((__stream == stdout) || (__stream == stderr)) { s[0] = SE; result = vsprintf( s, __format, args); fp_u_t_s( s, __stream); } else result = vfprintf( __stream, __format, args); va_end(args); return result; } int f_c_l_o_s_e( FILE * __stream) { if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } return fclose( __stream); } size_t f_r_e_a_d(void * __ptr, size_t __size, size_t __n, FILE * __stream) { // if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { if (((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } if (__stream == stdin) { size_t i = 0; int c; char s [IOBufSize]; while ( i < (__size * __n - 1)) { c = w_getch(); if (c == LF) { // s[i++] = LF; break; } if (c != CR) s[i++] = (char)c; } // s[i] = SE; __ptr = &s[0]; return (size_t)(i/__size); } return fread( __ptr, __size, __n, __stream); } FILE * f_r_e_o_p_e_n(const char * __path, const char * __mode, FILE * __stream) { if ((__stream == stdin)/* || ((__stream == stdout) && !flogp) || (__stream == stderr)*/) { assert(FALSE); return 0; } return freopen( __path, __mode, __stream); } int fs_c_a_n_f(FILE * __stream, const char * __format, ...) { int result; va_list args; va_start(args, __format); if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } result = fscanf( __stream, __format, args); va_end(args); return result; } int f_s_e_e_k(FILE * __stream, long __offset, int __whence) { if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } return fseek( __stream, __offset, __whence); } int f_s_e_t_p_o_s(FILE * __stream, const fpos_t *__pos) { if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } return fsetpos( __stream, __pos); } long f_t_e_l_l(FILE * __stream) { if ((__stream == stdin) || ((__stream == stdout) && !flogp) || (__stream == stderr)) { assert(FALSE); return 0; } return ftell( __stream); } size_t f_w_r_i_t_e(const void * __ptr, size_t __size, size_t __n, FILE * __stream) { // p_r_i_n_t_f("entered fwrite, size %d, n %d \n", __size, __n); if (__stream == stdin) { assert(FALSE); // p_r_i_n_t_f("False \n"); return 0; } if ((__stream == stdout) || (__stream == stderr)) { const char * __s = __ptr; int c = SE; size_t i = 0; // char *out; // p_r_i_n_t_f("test1 %s\n", __s); if (!__s) return 0 /*EOF*/; for (i = 0; i< (__size * __n); i++) { if (*__s) { c = *__s++; fp_u_t_c(c, __stream); } else break; } // f_r_e_a_d(out, __size, __n, __stream); // p_r_i_n_t_f("test2 %s", out); return (int)(i/__size); } // p_r_i_n_t_f("test3 %s\n", __ptr); return fwrite( __ptr, __size, __n, __stream); } char * g_e_t_s(char * __s) { return fg_e_t_s( __s, 10000, stdin); } void p_e_r_r_o_r(const char * __s) { const char * cp; // char s [IOBufSize]; cp = strerror(errno); fp_r_i_n_t_f(stderr, "%s: %s\n", __s, cp); /* output to message box sprintf(s, "%s: %s\n", __s, cp); if (!flogp) winmessage(s);*/ } int p_r_i_n_t_f(const char * __format, ...) { int result; char s [IOBufSize]; va_list args; va_start(args, __format); s[0] = SE; result = vsprintf( s, __format, args); fp_u_t_s( s, stdout); va_end(args); return result; } int p_u_t_s(const char * __s) { return fp_u_t_s( __s, stdout); } int s_c_a_n_f(const char * __format, ...) { NG_IGNORE(__format); assert( FALSE); return FALSE; } int ung_e_t_c(int __c, FILE * __stream) { NG_IGNORE(__c); NG_IGNORE(__stream); assert( FALSE); return FALSE; } int vfp_r_i_n_t_f(FILE * __stream, const char * __format, void * __arglist) { int result; char s [IOBufSize]; s[0] = SE; // if (((__stream == stdout) && !flogp) || (__stream == stderr)) { if ((__stream == stdout) || (__stream == stderr)) { result = vsprintf( s, __format, __arglist); fp_u_t_s( s, stdout); } else result = vfprintf( __stream, __format, __arglist); return result; } /*int vfs_c_a_n_f(FILE * __stream, const char * __format, void * __arglist) { if (__stream == stdin) { assert(FALSE); return 0; } return vfscanf( __stream, __format, __arglist); } */ int vp_r_i_n_t_f(const char * __format, void * __arglist) { int result; char s [IOBufSize]; s[0] = SE; result = vsprintf( s, __format, __arglist); fp_u_t_s( s, stdout); return result; } /*int vs_c_a_n_f(const char * __format, void * __arglist) { assert( FALSE); return FALSE; } */ int r_e_a_d(int fd, char * __buf, int __n) { if (fd == 0) { int i = 0; int c; char s [IOBufSize]; while ( i < __n ) { c = w_getch(); if (c == LF) { // s[i++] = LF; break; } if (c != CR) s[i++] = (char)c; } // s[i] = SE; __buf = &s[0]; return (i); } else { return _read(fd, __buf, __n); } } int g_e_t_c(FILE * __fp) { return fg_e_t_c( __fp); } int g_e_t_char(void) { return fg_e_t_c( stdin); } int p_u_t_char(const int __c) { return fp_u_t_c( __c, stdout); } int p_u_t_c(const int __c, FILE * __fp) { return fp_u_t_c( __c, __fp); } int f_e_o_f(FILE * __fp) { if ((__fp == stdin) || (__fp == stdout) || (__fp == stderr)) { assert(FALSE); return 0; } return feof( __fp); } int f_e_r_r_o_r(FILE * __fp) { if ((__fp == stdin) || (__fp == stdout) || (__fp == stderr)) { assert(FALSE); return 0; } return ferror( __fp); } int fg_e_t_char(void) { return fg_e_t_c( stdin); } int fp_u_t_char(int __c) { return fp_u_t_c( __c, stdout); } // ------------------------------------------------------ /* size_t _memavl(void) { MEMORYSTATUS ms; DWORD sum; ms.dwLength = sizeof(MEMORYSTATUS); GlobalMemoryStatus( &ms); sum = ms.dwAvailPhys + ms.dwAvailPageFile; return (size_t) sum; } // -------------------------------------------- #ifndef _MSC_VER int system( const char * command) { // info-Bloecke STARTUPINFO si; PROCESS_INFORMATION pi; DWORD ExitStatus; // Datenstrukturen fuellen memset( &si, 0, sizeof( STARTUPINFO)); si.cb = sizeof( STARTUPINFO); memset( &pi, 0, sizeof( PROCESS_INFORMATION)); // starte den neuen Prozess if (!CreateProcess( NULL, // address of module name (char *) command, // address of command line NULL, // address of process security attributes NULL, // address of thread security attributes FALSE, // new process inherits handles NORMAL_PRIORITY_CLASS, // creation flags NULL, // address of new environment block NULL, // address of current directory name &si, // address of STARTUPINFO &pi // address of PROCESS_INFORMATION )) return -1; // dieses Handle musz da sein if (!pi.hProcess) return -1; do { // Multitasking ermoeglichen WaitForIdle(); // hole mir den Exit-Code des Prozesses if (!GetExitCodeProcess( pi.hProcess, &ExitStatus)) return -1; // solange er existiert } while( ExitStatus == STILL_ACTIVE); // Handles freigeben if (pi.hThread) CloseHandle( pi.hThread); if (pi.hProcess) CloseHandle( pi.hProcess); // fertig return 0; } // system Windows95 #endif */ #ifdef __CYGWIN__ /* Strip leading spaces, return a copy of s */ static char* rlead(char *s) { int i,j=0; static char temp[512]; bool has_space = TRUE; for(i=0;s[i] != '\0';i++) { if(isspace(s[i]) && has_space) { ; //Do nothing } else { temp[j] = s[i]; j++; has_space = FALSE; } } temp[j] = '\0'; return copy(temp); } #endif void winmessage(char* new_msg) { /* open a message box only if message is not written into -o xxx.log */ if (!flogp) MessageBox(NULL, new_msg, "Ngspice Info", MB_OK|MB_ICONERROR); } #endif /* HAS_WINGUI */ ngspice-26/src/devload0000644000265600020320000000054312264261473014363 0ustar andreasadmin* initialize a device plot .control begin unset devfile if $argc = 1 set devfile = $argv[1] load $devfile strcmp flag "$?&y" "1" if ($flag = 0) let yaxis = y[0] transpose all let xaxis = x[0] transpose all setscale yaxis end else echo "usage: devload " end unset devfile flag end ngspice-26/src/conf.c0000644000265600020320000000175712264261473014123 0ustar andreasadmin/* Common configuration file for ng-spice and nutmeg */ #include "ngspice/config.h" #include "conf.h" /* The GNU configure system should set PACKAGE_BUGREPORT use this if it does, otherwise fall back to a hardcoded address */ #ifdef PACKAGE_BUGREPORT #define BUG_ADDRESS PACKAGE_BUGREPORT #else #define BUG_ADDRESS "http://ngspice.sourceforge.net/bugrep.html" #endif char Spice_Version[] = PACKAGE_VERSION; char Spice_Notice[] = "Please file your bug-reports at " BUG_ADDRESS; #ifndef _MSC_VER char Spice_Build_Date[] = NGSPICEBUILDDATE; #else char Spice_Build_Date[] = __DATE__" "__TIME__; #endif char Spice_Manual[] = "Please get your ngspice manual from http://ngspice.sourceforge.net/docs.html"; char *Spice_Exec_Dir = NGSPICEBINDIR; char *Spice_Lib_Dir = NGSPICEDATADIR; #if defined (__MINGW32__) || defined (_MSC_VER) char *Def_Editor = "notepad.exe"; #else char *Def_Editor = "vi"; #endif int AsciiRawFile = 0; char *Bug_Addr = BUG_ADDRESS; char *Spice_Host = ""; char *Spiced_Log = ""; ngspice-26/src/ChangeLog0000644000265600020320000001347112264261473014600 0ustar andreasadmin2002-01-03 Paolo Nenzi * main.c: Some code additions for Windows support (Holger Vogt patch). * maths/cmaths/Makefile.am: reintegrated test code removed from Holger Vogt patch (this may cause trouble under Windows). * maths/cmaths/cmath1.c, maths/cmaths/test_cx_ph.c: small changes to support Windows (Holger Vogt patch). * winmain.c: added file for Windows port (Holger Vogt). 2001-12-04 Emmanuel Rouat * maths/cmaths/Makefile.am (noinst_PROGRAMS): test programs shouldnt get installed 2000-10-13 Arno W. Peters * ngspice.txt: changes SPICE: to NGSPICE: to restore help functionality. Thanks go to Michael Widlok for the analysis. 2000-07-21 Arno W. Peters * src/analysis/*: Moved these files into src/devices/analysis. The files in this directory implement the analysis and simulation for electrical circuits. This is the final step to separating the Spice sources into a library part and a frontend part. Now, the devices subdirectory has to be renamed to spicelib and the devices that are now scattered in that directory should be moved into a new devices directory. * configure.in, src/Makefile.am, src/devices/Makefile.am: Files affected by the move. 2000-07-20 Arno W. Peters * src/hlp/*: moved these files into src/frontend/help. The files in this directory implement the help system for the frontend. * configure.in, src/Makefile.am, src/frontend/Makefile.am: Files affected by the move. * src/circuit/*: moved these files into src/devices/parser. The files in this directory take a model line from the input file and add the corresponding element to the representation of the circuit in memory. * configure.in, src/Makefile.am, src/devices/Makefile.am: Files affected by the move. 2000-07-18 Arno W. Peters * main.c: Added the call to the initialization function of the devices. 2000-07-07 Arno W. Peters * parser/cshpar.c: Separated out com_chdir(), com_echo(), com_rehash() and com_shell() and moved them into frontend directory. * frontend/com_chdir.c, frontend/com_echo.c, frontend/com_rehash.c, frontend/com_shell.c: Their new homes. * parser/quote.c, parser/quote.h: The quote/unquote functions are used exclusively in the frontend, moved them there. * frontend/quote.c, frontend/quote.h: Their new location. * parser/input.c, parser/input.h: Input, output and error streams handled in the frontend. Moved to the frontend directory. * frontend/streams.c: Its new home. * frontend/Makefile.am: Updates for new files. * frontend/breakp2.c, frontend/newcoms.c, frontend/postcoms.c, frontend/resource.c, frontend/terminal.h, frontend/variable.c, frontend/variable.h, frontend/com_compose.c, frontend/com_display.c, frontend/com_setscale.c, frontend/com_strcmp.c: Include files update. * parser/var2.c, parser/var2.h: Empty files, removed. * parser/Makefile.am: Updates for removed files. * parser/lexical.c: Small adjustments 2000-04-04 Paolo Nenzi * ngspice.c: Added support for BSIM4. * Makefile.am: Added support for bsim4 shared library. 2000-01-14 Paolo Nenzi * conf.c: inserted definitions for bsim3v2 and bsim3v1 devices. It is necessary to include old models for commercially available components libraries. 1999-12-01 Emmanuel Rouat * source code: created new directory 'frontend' mainly filled with files from 'fte' - remaing files go into maths/cmaths (complex maths routines) 1999-11-30 Emmanuel Rouat * tune.c: removed * conf.c/nconf.c : simplified 1999-09-07 Arno * conf.c: removed unused variables `devs' and `ans' * help.c: return value from main() changed to int 1999-09-04 Emmanuel Rouat * main.c: removed #include patchlec.h and suffix.h (and related code) * Makefile.am: updated to reflect filename changes in fte/ 1999-08-31 Emmanuel Rouat * help.c: renamed helpfile 'ngspice' * main.c: renamed helpfile 'ngspice' 1999-08-28 Emmanuel Rouat * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-24 Paolo Nenzi * conf.c: linked the jfet2 model to the devices table. 1999-08-08 Emmanuel Rouat * makeidx.c: removed HAS_MAC_ARCARGV related code * main.c: removed all code related to dos and macos features 1999-08-06 Emmanuel Rouat * proc2mod.c: removed test on HAS_VPERROR (always true on Unix) * main.c (main): changed HAS_ISATTY in HAVE_ISATTY (main): removed test on HAS_LONGJUMP (always have it) (main): removed test on HAS_UNIX_SIGS (always true on Unix) (main): removed test on HAS_UNLINK (always true on Unix) 1999-08-05 Emmanuel Rouat * main.c: changed HAS_GETPW in HAVE_PWD_H (main): removed test on HAS_GETPID 1999-08-02 Emmanuel Rouat * Makefile.am (LIBS): removed '-lm' since it is handled by autoconf 1999-08-01 Emmanuel Rouat * conf.c: changed SIMinfo entry to 'ngspice' * Makefile.am: changed binary name to ngspice 1999-07-31 Emmanuel Rouat * Makefile.am: added @X_CFLAGS@ to INCLUDES list 1999-07-30 Emmanuel Rouat * Makefile.am : fixed breaking of 'make distcheck' 29-07-1999 emmanuel.rouat@wanadoo.fr (Manu Rouat) * tune.c: includes which defines SPICEBINDIR etc 28-07-1999 emmanuel.rouat@wanadoo.fr (Manu Rouat) * help.c: Changed HAS_X11 define to X_DISPLAY_MISSING (supplied by autoconf in config.h) * removed HAS_X11 in defs flag in Makefile.am ngspice-26/src/ciderinit0000644000265600020320000000075212264261473014721 0ustar andreasadmin*** This is a sample spice/cider initialization file. alias pl print line alias pc print col alias ds display alias hi history alias li listing alias p plot alias pr print alias q quit alias bye quit alias exit quit alias so source alias ld load alias xg xgraph tmp alias sp setplot alias dl devload alias dx devaxis set width = 80 height = 24 nosort noaskquit nobreak set xbrushheight = 3 xbrushwidth = 3 set unixcom set hcopydevtype = postscript set pointstyle = markers set term = vt100 ngspice-26/src/spectrum0000644000265600020320000001222712264261473014611 0ustar andreasadmin* Fourier Series Function for SPICE * This script is offered here for learning purposes, even if it is outdated * and superseeded by the spec function and especially by the much faster fft function. * You may use this script in conjunction with e.g. a ringoscillator output (see * the ngspice manual, chapter 17). .control begin * Variable argc delivers the number of command line parameters given by the user * after the 'spectrum' command if ($argc lt 4) echo Error: Too few arguments. echo ' 'Spectrum produces a plot containing a fourier series transformation of echo ' 'the specified vectors echo usage: spectrum startfreq stop step vec [[vec] ...] goto bottom end * Check if vectors 'time' and any input vector(s) are available * argv[n] delivers the command line entries after the 'spectrum' command, * starting with argv[1]. $argv[4-len] delivers the value of all tokens, * starting with postion 4 till the end of the command line if ( time eq time ) foreach vec $argv[4-len] if ( $vec eq $vec ) else goto bottom end end else echo ' 'Spectrum can not work without a time vector from a transient analysis. goto bottom end * generate a new plot entitled 'scratch', which will hold intermediate * results and will be discarded after their evaluation. set dt=$curplot set title=$curplottitle set curplot=new set scratch=$curplot * A vector 'span' is created in the 'scratch' plot to hold the time difference * of the transient simulation. {$dt}.time allows to access the 'time' vector * from the dt plot (which is normally named 'tranx' with x a consecutoive * integer number, depending on the amount of transient simulations already run * in the present job. let span={$dt}.time[length({$dt}.time)-1]-{$dt}.time[0] * Calculate the number of steps in all of the spectra to be evaluated below if ($argv[3] gt 0.999/span) let fpoints= ( $argv[2] - $argv[1] ) / $argv[3] +1 if (fpoints < 2) echo frequency start stop or step not correctly specified goto reset end else echo Error: time span is not long enough for a step frequency of $argv[3] Hz goto reset end let lent = length({$dt}.time) set lent = "$&lent" let nyquist = {$lent}/2/span if ($argv[2] gt nyquist) echo Error: The nyquist limit is exceeded, try a frequency less than "$&nyquist" Hz goto reset end set fpoints="$&fpoints" * generate a new plot to hold the spectra set curplot=new set spec=$curplot set curplottitle=$title set curplotname='Spectrum Analysis' * argv[3] is the third agrgument from the input line * spectrum 1 1000MEG 10MEG v(out25) * that is the delta frequency * The fcn vector(n) creates a vector of length n, its elements have * the values 0, 1, 2, 3, ..., n-2, n-1. Each element then is multiplied * with the frequency step value. let frequency=vector( $fpoints )*$argv[3] * Add an frequency offset to each element of vector 'frequency' * to suppress the (typically) large dc component. dowhile frequency[1] < ( $argv[1] + 1e-9 ) let frequency = frequency + $argv[3] end * For each input vector given on the command line, * create a new vector for complex numbers foreach vec $argv[4-len] let $vec = vector( $fpoints ) + j(vector( $fpoints )) reshape $vec [{$fpoints}] end * $scratch is a plot for intermediate results, will be destroyed during cleanup * $dt is the plot with the original data * $spec is a plot for storing the spectrum set curplot=$scratch * some test let npers=1 let test = span-2/$argv[3] + 1e-9 while test > 0 let npers = npers + 1 let test = test-1/$argv[3] end * Do the spectrum calculations let ircle = 2*pi*max(-1,({$dt}.time-{$dt}.time[{$lent}-1])*{$argv[3]}/npers) let win = 1 - cos(ircle) let ircle = npers*ircle let circle = ircle * ({$spec}.frequency[0]/$argv[3] - 1) let k=vector( $fpoints ) foreach k $&k let circle = circle + ircle foreach vec $argv[4-len] let tmp = win*{$dt}.{$vec} let {$spec}.{$vec}[{$k}] = 2*(mean(cos(circle)*tmp),mean(sin(circle)*tmp)) end end * plot (and write) the generated spectrum set curplot = $spec settype frequency frequency foreach vec $argv[4-len] let spectrum = mag({$vec}) plot spectrum write specout.out spectrum end * If you have an oscillator, fimd its frequency * as maximum of vector spectrum or goto end (uncomment next line) * goto cleanup set curplot=$scratch let counter = 0 let contents = 0 let freqmax = 0 let spectrum = {$spec}.spectrum foreach spectrum $&spectrum if counter > 4 if ( contents < $spectrum ) let contents = $spectrum set count = "$&counter" let freqmax = {$spec}.frequency[{$count}] end end let counter = counter + 1 end echo echo Osc. frequency at "$&freqmax" Hz echo goto cleanup label reset set curplot=$dt label cleanup destroy $scratch unset fpoints dt scratch spec vec k title lent label bottom end ngspice-26/src/tclspice.map0000644000265600020320000000007012264261473015322 0ustar andreasadminTCLSPICE_0.2 { global: Spice_Init; local: *; }; ngspice-26/src/Makefile.am0000644000265600020320000002724112264261473015062 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = misc maths frontend spicelib include/ngspice DIST_SUBDIRS = misc maths frontend spicelib include/ngspice xspice ciderlib unsupported if XSPICE_WANTED SUBDIRS += xspice endif if CIDER_WANTED SUBDIRS += ciderlib endif if SENSE2_WANTED SUBDIRS += unsupported endif if !TCL_MODULE if !SHARED_MODULE bin_PROGRAMS = ngspice ngnutmeg if !WINGUI bin_PROGRAMS += ngsconvert ngproc2mod ngmultidec ngmakeidx helpdatadir = $(pkgdatadir)/helpdir helpdata_DATA = ngspice.txt ngspice.idx if !NO_HELP bin_PROGRAMS += nghelp endif !NO_HELP endif !WINGUI endif !SHARED_MODULE endif !TCL_MODULE EXTRA_DIST = ngspice.txt setplot spectrum \ devload devaxis ciderinit winmain.c winmain.h \ tclspice.c tclspice.map pkgIndex.tcl.in spinit.in tclspinit.in \ main.c sharedspice.c initdatadir = $(pkgdatadir)/scripts initdata_DATA = spinit setplot spectrum if CIDER_WANTED initdata_DATA += devload devaxis ciderinit endif DYNAMIC_DEVICELIBS = \ spicelib/devices/asrc/libasrc.la \ spicelib/devices/bjt/libbjt.la \ spicelib/devices/bsim1/libbsim1.la \ spicelib/devices/bsim2/libbsim2.la \ spicelib/devices/bsim3/libbsim3.la \ spicelib/devices/bsim3v0/libbsim3v0.la \ spicelib/devices/bsim3v1/libbsim3v1.la \ spicelib/devices/bsim3v32/libbsim3v32.la \ spicelib/devices/bsim4/libbsim4.la \ spicelib/devices/bsim4v4/libbsim4v4.la \ spicelib/devices/bsim4v5/libbsim4v5.la \ spicelib/devices/bsim4v6/libbsim4v6.la \ spicelib/devices/cap/libcap.la \ spicelib/devices/bsim3soi_pd/libbsim3soipd.la \ spicelib/devices/bsim3soi_fd/libbsim3soifd.la \ spicelib/devices/bsim3soi_dd/libbsim3soidd.la \ spicelib/devices/bsimsoi/libbsim4soi.la \ spicelib/devices/cccs/libcccs.la \ spicelib/devices/ccvs/libccvs.la \ spicelib/devices/cpl/libcpl.la \ spicelib/devices/csw/libcsw.la \ spicelib/devices/dio/libdio.la \ spicelib/devices/ind/libind.la \ spicelib/devices/isrc/libisrc.la \ spicelib/devices/hfet1/libhfet.la \ spicelib/devices/hfet2/libhfet2.la \ spicelib/devices/hisim2/libhisim2.la \ spicelib/devices/hisimhv1/libhisimhv1.la \ spicelib/devices/jfet/libjfet.la \ spicelib/devices/jfet2/libjfet2.la \ spicelib/devices/ltra/libltra.la \ spicelib/devices/mes/libmes.la \ spicelib/devices/mesa/libmesa.la \ spicelib/devices/mos1/libmos1.la \ spicelib/devices/mos2/libmos2.la \ spicelib/devices/mos3/libmos3.la \ spicelib/devices/mos6/libmos6.la \ spicelib/devices/mos9/libmos9.la \ spicelib/devices/res/libres.la \ spicelib/devices/soi3/libsoi3.la \ spicelib/devices/sw/libsw.la \ spicelib/devices/txl/libtxl.la \ spicelib/devices/tra/libtra.la \ spicelib/devices/urc/liburc.la \ spicelib/devices/vbic/libvbic.la \ spicelib/devices/vccs/libvccs.la \ spicelib/devices/vcvs/libvcvs.la \ spicelib/devices/vsrc/libvsrc.la \ @VLADEV@ ## Build ngspice first: ngspice_SOURCES = \ main.c \ conf.c \ conf.h \ ngspice.c ngspice_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR if WINGUI ngspice_SOURCES += winmain.c endif ngspice_LDADD = \ frontend/libfte.la if WINGUI ngspice_LDADD += \ frontend/wdisp/libwindisp.la endif ngspice_LDADD += \ frontend/plotting/libplotting.la ngspice_LDADD += \ spicelib/devices/dev.lo \ $(DYNAMIC_DEVICELIBS) if NDEV_WANTED ngspice_LDADD += spicelib/devices/ndev/libndev.la endif if NUMDEV_WANTED ngspice_LDADD += \ spicelib/devices/nbjt/libnbjt.la \ spicelib/devices/nbjt2/libnbjt2.la \ spicelib/devices/numd/libnumd.la \ spicelib/devices/numd2/libnumd2.la \ spicelib/devices/numos/libnumos.la endif ngspice_LDADD += \ spicelib/analysis/libckt.la \ spicelib/devices/libdev.la if SENSE2_WANTED ngspice_LDADD += unsupported/libunsupported.la endif if XSPICE_WANTED ngspice_LDADD += \ xspice/cm/libcmxsp.la \ xspice/mif/libmifxsp.la \ xspice/evt/libevtxsp.la \ xspice/enh/libenhxsp.la \ xspice/ipc/libipcxsp.la \ xspice/idn/libidnxsp.la \ @XSPICEDLLIBS@ endif ngspice_LDADD += \ frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la \ spicelib/parser/libinp.la if CIDER_WANTED ngspice_LDADD += \ ciderlib/twod/libcidertwod.la \ ciderlib/oned/libcideroned.la \ ciderlib/input/libciderinput.la \ ciderlib/support/libcidersuprt.la endif ngspice_LDADD += \ maths/deriv/libderiv.la \ maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la \ maths/fft/libmathfft.la \ maths/poly/libpoly.la \ maths/ni/libni.la \ maths/sparse/libsparse.la \ misc/libmisc.la if !WINGUI if !NO_X ngspice_LDADD += frontend/help/libhlp.la endif endif ## nutmeg: ngnutmeg_SOURCES = \ main.c \ conf.c \ conf.h \ ngnutmeg.c ngnutmeg_CPPFLAGS = $(AM_CPPFLAGS) if WINGUI ngnutmeg_SOURCES += winmain.c endif ngnutmeg_LDADD = \ frontend/libfte.la if WINGUI ngnutmeg_LDADD += \ frontend/wdisp/libwindisp.la endif ngnutmeg_LDADD += \ frontend/plotting/libplotting.la \ frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la \ maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la \ maths/fft/libmathfft.la \ maths/poly/libpoly.la \ misc/libmisc.la \ spicelib/parser/libinp.la ## These programs are not required on Windows if !WINGUI if !SHWIN if !NO_X ngnutmeg_LDADD += \ frontend/help/libhlp.la endif !NO_X ## help: nghelp_SOURCES = conf.c nghelp.c if !NO_HELP # We keep the libraries to a minimum here and link against terminal.o # rather than the full front-end library libfte.a to avoid link errors that # that would otherwise occur (thanks to Andreas Unger for this fix). nghelp_LDADD = \ frontend/terminal.lo \ misc/libmisc.la if !NO_X nghelp_LDADD += \ frontend/help/libhlp.la endif !NO_X endif !NO_HELP ## sconvert: ngsconvert_SOURCES = ngsconvert.c ngsconvert_LDADD = \ frontend/libfte.la \ frontend/parser/libparser.la \ maths/misc/libmathmisc.la \ misc/libmisc.la ## proc2mod: ngproc2mod_SOURCES = ngproc2mod.c ngproc2mod_LDADD = \ frontend/parser/libparser.la \ spicelib/parser/libinp.la \ misc/libmisc.la ## multidec: ngmultidec_SOURCES = ngmultidec.c ngmultidec_LDADD = \ maths/sparse/libsparse.la \ misc/libmisc.la ## ngmakeidx: ngmakeidx_SOURCES = makeidx.c ## create index for online help: ngspice.idx: ngmakeidx$(EXEEXT) $(srcdir)/ngspice.txt ./ngmakeidx$(EXEEXT) -o ngspice.idx $(srcdir)/ngspice.txt endif !SHWIN endif !WINGUI ## create spinit at compile time, see ## (info "(autoconf) Installation Directory Variables") edit = sed \ -e 's|@XSPICEINIT[@]|$(XSPICEINIT)|g' \ -e 's|@pkglibdir[@]|$(pkglibdir)|g' spinit tclspinit : Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in >$@.tmp mv $@.tmp $@ spinit: $(srcdir)/spinit.in tclspinit: $(srcdir)/tclspinit.in ## General Includes and libraries: AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices @X_CFLAGS@ AM_CFLAGS = -static LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ if WINGUI LIBS += -lpsapi endif CLEANFILES = ngspice.idx spinit tclspinit pkgIndex.tcl MAINTAINERCLEANFILES = Makefile.in ## Tcl: if TCL_MODULE lib_LTLIBRARIES = libspice.la initdata_DATA += tclspinit pkgIndex_DATA = pkgIndex.tcl pkgIndexdir = $(pkglibdir) if TCLWIN LIBS += -lpsapi -ltcl84 -lBLT24 endif libspice_la_SOURCES = \ main.c \ conf.c \ conf.h \ ngspice.c \ tclspice.c libspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \ -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" libspice_la_LIBADD = \ @X_LIBS@ \ frontend/libfte.la if WINGUI libspice_la_LIBADD += \ frontend/wdisp/libwindisp.la endif libspice_la_LIBADD += \ frontend/plotting/libplotting.la if XSPICE_WANTED libspice_la_LIBADD += \ xspice/cm/libcmxsp.la \ xspice/mif/libmifxsp.la endif libspice_la_LIBADD += \ $(DYNAMIC_DEVICELIBS) if NDEV_WANTED libspice_la_LIBADD += \ spicelib/devices/ndev/libndev.la endif if NUMDEV_WANTED libspice_la_LIBADD += \ spicelib/devices/nbjt/libnbjt.la \ spicelib/devices/nbjt2/libnbjt2.la \ spicelib/devices/numd/libnumd.la \ spicelib/devices/numd2/libnumd2.la \ spicelib/devices/numos/libnumos.la endif libspice_la_LIBADD += \ spicelib/analysis/libckt.la \ spicelib/devices/libdev.la if XSPICE_WANTED libspice_la_LIBADD += \ xspice/evt/libevtxsp.la \ xspice/enh/libenhxsp.la \ xspice/ipc/libipcxsp.la \ xspice/idn/libidnxsp.la \ @XSPICEDLLIBS@ endif libspice_la_LIBADD += \ frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la \ spicelib/parser/libinp.la if CIDER_WANTED libspice_la_LIBADD += \ ciderlib/twod/libcidertwod.la \ ciderlib/oned/libcideroned.la \ ciderlib/input/libciderinput.la \ ciderlib/support/libcidersuprt.la endif libspice_la_LIBADD += \ maths/deriv/libderiv.la \ maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la \ maths/fft/libmathfft.la \ maths/poly/libpoly.la \ maths/ni/libni.la \ maths/sparse/libsparse.la \ misc/libmisc.la \ $(LIBS) libspice_la_CFLAGS = -shared libspice_la_LDFLAGS = -shared -Wl,--version-script=$(srcdir)/tclspice.map if TCLWIN libspice_la_LDFLAGS += -no-undefined libspice_la_LDFLAGS += --def spice.def @TCL_LIB_SPEC@ endif if TCLCYG libspice_la_LDFLAGS += -no-undefined libspice_la_LDFLAGS += --def spice.def @TCL_LIB_SPEC@ endif TCLSPICE_VERSION = @VERSION@ pkgIndex_edit = sed \ -e 's|%LIB_DIR%|$(libdir)|g' \ -e 's|%VERSION%|$(TCLSPICE_VERSION)|g' pkgIndex.tcl : Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(pkgIndex_edit) $${srcdir}$@.in >$@.tmp mv $@.tmp $@ pkgIndex.tcl: $(srcdir)/pkgIndex.tcl.in endif TCL_MODULE EXTRA_DIST += spice.def ## ngspice as shared module: if SHARED_MODULE lib_LTLIBRARIES = libngspice.la if SHWIN LIBS += -lpsapi endif libngspice_la_SOURCES = \ main.c \ conf.c \ conf.h \ ngspice.c \ sharedspice.c libngspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \ -DSHAREDSPICE_version="\"$(SHAREDSPICE_VERSION)\"" libngspice_la_LIBADD = \ @X_LIBS@ \ frontend/libfte.la libngspice_la_LIBADD += \ frontend/plotting/libplotting.la if XSPICE_WANTED libngspice_la_LIBADD += \ xspice/cm/libcmxsp.la \ xspice/mif/libmifxsp.la endif libngspice_la_LIBADD += \ $(DYNAMIC_DEVICELIBS) if NDEV_WANTED libngspice_la_LIBADD += \ spicelib/devices/ndev/libndev.la endif if NUMDEV_WANTED libngspice_la_LIBADD += \ spicelib/devices/nbjt/libnbjt.la \ spicelib/devices/nbjt2/libnbjt2.la \ spicelib/devices/numd/libnumd.la \ spicelib/devices/numd2/libnumd2.la \ spicelib/devices/numos/libnumos.la endif libngspice_la_LIBADD += \ spicelib/analysis/libckt.la \ spicelib/devices/libdev.la if XSPICE_WANTED libngspice_la_LIBADD += \ xspice/evt/libevtxsp.la \ xspice/enh/libenhxsp.la \ xspice/ipc/libipcxsp.la \ xspice/idn/libidnxsp.la \ @XSPICEDLLIBS@ endif libngspice_la_LIBADD += \ frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la \ spicelib/parser/libinp.la if CIDER_WANTED libngspice_la_LIBADD += \ ciderlib/twod/libcidertwod.la \ ciderlib/oned/libcideroned.la \ ciderlib/input/libciderinput.la \ ciderlib/support/libcidersuprt.la endif libngspice_la_LIBADD += \ maths/deriv/libderiv.la \ maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la \ maths/fft/libmathfft.la \ maths/poly/libpoly.la \ maths/ni/libni.la \ maths/sparse/libsparse.la \ misc/libmisc.la \ $(LIBS) \ $(OPENMP_CFLAGS) libngspice_la_CFLAGS = -shared libngspice_la_LDFLAGS = -shared if SHWIN libngspice_la_LDFLAGS += -Wl,--output-def=ngspice.def -Wl,--out-implib=ngspice.dll.a libngspice_la_LDFLAGS += -no-undefined EXTRA_DIST += ngspice.def endif if SHCYG libngspice_la_LDFLAGS += -Wl,--output-def=ngspice.def -Wl,--out-implib=ngspice.dll.a libngspice_la_LDFLAGS += -no-undefined EXTRA_DIST += ngspice.def endif SHAREDSPICE_VERSION = @VERSION@ endif SHARED_MODULE ngspice-26/src/maths/0000755000265600020320000000000012264261703014130 5ustar andreasadminngspice-26/src/maths/fft/0000755000265600020320000000000012264261703014707 5ustar andreasadminngspice-26/src/maths/fft/fftext.c0000644000265600020320000002632212264261473016364 0ustar andreasadmin/******************************************************************* This file extends the fftlib with calls to maintain the cosine and bit reversed tables for you (including mallocs and free's). Call the init routine for each fft size you will be using. Then you can call the fft routines below which will make the fftlib library call with the appropriate tables passed. When you are done with all fft's you can call fftfree to release the storage for the tables. Note that you can call fftinit repeatedly with the same size, the extra calls will be ignored. So, you could make a macro to call fftInit every time you call ffts. For example you could have someting like: #define FFT(a,n) if(!fftInit(roundtol(LOG2(n)))) ffts(a,roundtol(LOG2(n)),1);else printf("fft error\n"); *******************************************************************/ #include #include #include #include #include "fftlib.h" #include "matlib.h" #include "ngspice/fftext.h" #include "ngspice/memory.h" #ifndef M_PI #define M_PI 3.141592653589793238462643383279502884197 // pi #endif #define eq(a,b) (!strcmp((a), (b))) // pointers to storage of Utbl's and BRLow's static double *UtblArray[8*sizeof(int)] = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0}; static short *BRLowArray[8*sizeof(int)/2] = {0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0}; int fftInit(int M) { // malloc and init cosine and bit reversed tables for a given size fft, ifft, rfft, rifft /* INPUTS */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* OUTPUTS */ /* private cosine and bit reversed tables */ int theError = 1; /*** I did NOT test cases with M>27 ***/ if ((M >= 0) && ((size_t) M < 8*sizeof(int))) { theError = 0; if (UtblArray[M] == 0) { // have we not inited this size fft yet? // init cos table UtblArray[M] = TMALLOC(double, POW2(M)/4+1); if (UtblArray[M] == 0) theError = 2; else { fftCosInit(M, UtblArray[M]); } if (M > 1) { if (BRLowArray[M/2] == 0) { // init bit reversed table for cmplx fft BRLowArray[M/2] = TMALLOC(short, POW2(M/2-1)); if (BRLowArray[M/2] == 0) theError = 2; else { fftBRInit(M, BRLowArray[M/2]); } } } if (M > 2) { if (BRLowArray[(M-1)/2] == 0) { // init bit reversed table for real fft BRLowArray[(M-1)/2] = TMALLOC(short, POW2((M-1)/2-1)); if (BRLowArray[(M-1)/2] == 0) theError = 2; else { fftBRInit(M-1, BRLowArray[(M-1)/2]); } } } } } return theError; } void fftFree(void) { // release storage for all private cosine and bit reversed tables int i1; for (i1=8*sizeof(int)/2-1; i1>=0; i1--) { if (BRLowArray[i1] != 0) { free(BRLowArray[i1]); BRLowArray[i1] = 0; } } for (i1=8*sizeof(int)-1; i1>=0; i1--) { if (UtblArray[i1] != 0) { free(UtblArray[i1]); UtblArray[i1] = 0; } } } int fft_windows(char *window, double *win, double *time, int length, double maxt, double span, int order) { int i; double sigma, scale; /* window functions - should have an average of one */ if (eq(window, "none")) for (i = 0; i < length; i++) win[i] = 1.0; else if (eq(window, "rectangular")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) win[i] = 0.0; else win[i] = 1.0; } else if (eq(window, "triangle") || eq(window, "bartlet") || eq(window, "bartlett")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) win[i] = 0.0; else win[i] = 2.0 - fabs(2+4*(time[i]-maxt)/span); } else if (eq(window, "hann") || eq(window, "hanning") || eq(window, "cosine")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) win[i] = 0.0; else win[i] = 1.0 - cos(2*M_PI*(time[i]-maxt)/span); } else if (eq(window, "hamming")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) win[i] = 0.0; else win[i] = 1.0 - 0.46/0.54*cos(2*M_PI*(time[i]-maxt)/span); } else if (eq(window, "blackman")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1.0; win[i] -= 0.50/0.42*cos(2*M_PI*(time[i]-maxt)/span); win[i] += 0.08/0.42*cos(4*M_PI*(time[i]-maxt)/span); } } else if (eq(window, "flattop")) for (i = 0; i < length; i++) { if (maxt-time[i] > span) { win[i] = 0; } else { win[i] = 1.0; win[i] -= 1.93*cos(2*M_PI*(time[i]-maxt)/span); win[i] += 1.29*cos(4*M_PI*(time[i]-maxt)/span); win[i] -= 0.388*cos(6*M_PI*(time[i]-maxt)/span); win[i] += 0.032*cos(8*M_PI*(time[i]-maxt)/span); } } else if (eq(window, "gaussian")) { sigma = 1.0/order; scale = 0.83/sigma; for (i = 0; i < length; i++) { if (maxt-time[i] > span) win[i] = 0; else win[i] = scale*exp(-0.5 * pow((time[i]-maxt/2)/(sigma*maxt/2), 2)); } } else { printf( "Warning: unknown window type %s\n", window); return 0; } return 1; } /************************************************* The following calls are easier than calling to fftlib directly. Just make sure fftlib has been called for each M first. **************************************************/ void ffts(double *data, int M, int Rows) { /* Compute in-place complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array */ ffts1(data, M, Rows, UtblArray[M], BRLowArray[M/2]); } void iffts(double *data, int M, int Rows) { /* Compute in-place inverse complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array */ iffts1(data, M, Rows, UtblArray[M], BRLowArray[M/2]); } void rffts(double *data, int M, int Rows) { /* Compute in-place real fft on the rows of the input array */ /* The result is the complex spectra of the positive frequencies */ /* except the location for the first complex number contains the real */ /* values for DC and Nyquest */ /* See rspectprod for multiplying two of these spectra together- ex. for fast convolution */ /* INPUTS */ /* *ioptr = real input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array in the following order */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ rffts1(data, M, Rows, UtblArray[M], BRLowArray[(M-1)/2]); } void riffts(double *data, int M, int Rows) { /* Compute in-place real ifft on the rows of the input array */ /* data order as from rffts */ /* INPUTS */ /* *ioptr = input data array in the following order */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = real output data array */ riffts1(data, M, Rows, UtblArray[M], BRLowArray[(M-1)/2]); } void rspectprod(double *data1, double *data2, double *outdata, int N) { // When multiplying a pair of spectra from rfft care must be taken to multiply the // two real values seperately from the complex ones. This routine does it correctly. // the result can be stored in-place over one of the inputs /* INPUTS */ /* *data1 = input data array first spectra */ /* *data2 = input data array second spectra */ /* N = fft input size for both data1 and data2 */ /* OUTPUTS */ /* *outdata = output data array spectra */ if(N>1) { outdata[0] = data1[0] * data2[0]; // multiply the zero freq values outdata[1] = data1[1] * data2[1]; // multiply the nyquest freq values cvprod(data1 + 2, data2 + 2, outdata + 2, N/2-1); // multiply the other positive freq values } else { outdata[0] = data1[0] * data2[0]; } } #ifdef BOURKE static void fftext(double *x, double *y, long int n, long int nn, int dir) { /* http://local.wasp.uwa.edu.au/~pbourke/other/dft/ download 22.05.08 Used with permission from the author Paul Bourke */ /* This computes an in-place complex-to-complex FFT x and y are the real and imaginary arrays n is the number of points, has to be to the power of 2 nn is the number of points w/o zero padded values dir = 1 gives forward transform dir = -1 gives reverse transform */ long i, i1, j, k, i2, l, l1, l2; double c1, c2, tx, ty, t1, t2, u1, u2, z; int m = 0, M = 1; /* get the exponent to the base of 2 from the number of points */ while (M < n) { M *= 2; m++; } /* Do the bit reversal */ i2 = n >> 1; j = 0; for (i = 0; i < n-1; i++) { if (i < j) { tx = x[i]; ty = y[i]; x[i] = x[j]; y[i] = y[j]; x[j] = tx; y[j] = ty; } k = i2; while (k <= j) { j -= k; k >>= 1; } j += k; } /* Compute the FFT */ c1 = -1.0; c2 = 0.0; l2 = 1; for (l = 0; l < m; l++) { l1 = l2; l2 <<= 1; u1 = 1.0; u2 = 0.0; for (j = 0; j < l1; j++) { for (i = j; i < n; i += l2) { i1 = i + l1; t1 = u1 * x[i1] - u2 * y[i1]; t2 = u1 * y[i1] + u2 * x[i1]; x[i1] = x[i] - t1; y[i1] = y[i] - t2; x[i] += t1; y[i] += t2; } z = u1 * c1 - u2 * c2; u2 = u1 * c2 + u2 * c1; u1 = z; } c2 = sqrt((1.0 - c1) / 2.0); if (dir == 1) c2 = -c2; c1 = sqrt((1.0 + c1) / 2.0); } /* Scaling for forward transform */ if (dir == 1) { double scale = 1.0 / nn; for (i = 0; i < n; i++) { x[i] *= scale; /* don't consider zero padded values */ y[i] *= scale; } } } #endif /* BOURKE */ ngspice-26/src/maths/fft/fftlib.h0000644000265600020320000000577012264261473016343 0ustar andreasadmin#define MYRECIPLN2 1.442695040888963407359924681001892137426 // 1.0/log(2) /* some useful conversions between a number and its power of 2 */ #define LOG2(a) (MYRECIPLN2*log(a)) // floating point logarithm base 2 #define POW2(m) (1 << (m)) // integer power of 2 for m<32 /******************************************************************* lower level fft stuff called by routines in fftext.c and fft2d.c *******************************************************************/ void fftCosInit(int M, double *Utbl); /* Compute Utbl, the cosine table for ffts */ /* of size (pow(2,M)/4 +1) */ /* INPUTS */ /* M = log2 of fft size */ /* OUTPUTS */ /* *Utbl = cosine table */ void fftBRInit(int M, short *BRLow); /* Compute BRLow, the bit reversed table for ffts */ /* of size pow(2,M/2 -1) */ /* INPUTS */ /* M = log2 of fft size */ /* OUTPUTS */ /* *BRLow = bit reversed counter table */ void ffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow); /* Compute in-place complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array */ void iffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow); /* Compute in-place inverse complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array */ void rffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow); /* Compute in-place real fft on the rows of the input array */ /* The result is the complex spectra of the positive frequencies */ /* except the location for the first complex number contains the real */ /* values for DC and Nyquest */ /* INPUTS */ /* *ioptr = real input data array */ /* M = log2 of fft size */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array in the following order */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ void riffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow); /* Compute in-place real ifft on the rows of the input array */ /* data order as from rffts1 */ /* INPUTS */ /* *ioptr = input data array in the following order */ /* M = log2 of fft size */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = real output data array */ ngspice-26/src/maths/fft/matlib.c0000644000265600020320000002153712264261473016337 0ustar andreasadmin/* a few routines from a vector/matrix library */ #include "matlib.h" void xpose(double *indata, long iRsiz, double *outdata, long oRsiz, long Nrows, long Ncols) { /* not in-place matrix transpose */ /* INPUTS */ /* *indata = input data array */ /* iRsiz = offset to between rows of input data array */ /* oRsiz = offset to between rows of output data array */ /* Nrows = number of rows in input data array */ /* Ncols = number of columns in input data array */ /* OUTPUTS */ /* *outdata = output data array */ double *irow; /* pointer to input row start */ double *ocol; /* pointer to output col start */ double *idata; /* pointer to input data */ double *odata; /* pointer to output data */ long RowCnt; /* row counter */ long ColCnt; /* col counter */ double T0; /* data storage */ double T1; /* data storage */ double T2; /* data storage */ double T3; /* data storage */ double T4; /* data storage */ double T5; /* data storage */ double T6; /* data storage */ double T7; /* data storage */ const long inRsizd1 = iRsiz; const long inRsizd2 = 2*iRsiz; const long inRsizd3 = inRsizd2+iRsiz; const long inRsizd4 = 4*iRsiz; const long inRsizd5 = inRsizd3+inRsizd2; const long inRsizd6 = inRsizd4+inRsizd2; const long inRsizd7 = inRsizd4+inRsizd3; const long inRsizd8 = 8*iRsiz; ocol = outdata; irow = indata; for (RowCnt=Nrows/8; RowCnt>0; RowCnt--) { idata = irow; odata = ocol; for (ColCnt=Ncols; ColCnt>0; ColCnt--) { T0 = *idata; T1 = *(idata+inRsizd1); T2 = *(idata+inRsizd2); T3 = *(idata+inRsizd3); T4 = *(idata+inRsizd4); T5 = *(idata+inRsizd5); T6 = *(idata+inRsizd6); T7 = *(idata+inRsizd7); *odata = T0; *(odata+1) = T1; *(odata+2) = T2; *(odata+3) = T3; *(odata+4) = T4; *(odata+5) = T5; *(odata+6) = T6; *(odata+7) = T7; idata++; odata += oRsiz; } irow += inRsizd8; ocol += 8; } if (Nrows%8 != 0) { for (ColCnt=Ncols; ColCnt>0; ColCnt--) { idata = irow++; odata = ocol; ocol += oRsiz; for (RowCnt=Nrows%8; RowCnt>0; RowCnt--) { T0 = *idata; *odata++ = T0; idata += iRsiz; } } } } void cxpose(double *indata, long iRsiz, double *outdata, long oRsiz, long Nrows, long Ncols) { /* not in-place complex double matrix transpose */ /* INPUTS */ /* *indata = input data array */ /* iRsiz = offset to between rows of input data array */ /* oRsiz = offset to between rows of output data array */ /* Nrows = number of rows in input data array */ /* Ncols = number of columns in input data array */ /* OUTPUTS */ /* *outdata = output data array */ double *irow; /* pointer to input row start */ double *ocol; /* pointer to output col start */ double *idata; /* pointer to input data */ double *odata; /* pointer to output data */ long RowCnt; /* row counter */ long ColCnt; /* col counter */ double T0r; /* data storage */ double T0i; /* data storage */ double T1r; /* data storage */ double T1i; /* data storage */ double T2r; /* data storage */ double T2i; /* data storage */ double T3r; /* data storage */ double T3i; /* data storage */ const long inRsizd1 = 2*iRsiz; const long inRsizd1i = 2*iRsiz + 1; const long inRsizd2 = 4*iRsiz; const long inRsizd2i = 4*iRsiz + 1; const long inRsizd3 = inRsizd2+inRsizd1; const long inRsizd3i = inRsizd2+inRsizd1 + 1; const long inRsizd4 = 8*iRsiz; ocol = outdata; irow = indata; for (RowCnt=Nrows/4; RowCnt>0; RowCnt--) { idata = irow; odata = ocol; for (ColCnt=Ncols; ColCnt>0; ColCnt--) { T0r = *idata; T0i = *(idata +1); T1r = *(idata+inRsizd1); T1i = *(idata+inRsizd1i); T2r = *(idata+inRsizd2); T2i = *(idata+inRsizd2i); T3r = *(idata+inRsizd3); T3i = *(idata+inRsizd3i); *odata = T0r; *(odata+1) = T0i; *(odata+2) = T1r; *(odata+3) = T1i; *(odata+4) = T2r; *(odata+5) = T2i; *(odata+6) = T3r; *(odata+7) = T3i; idata+=2; odata += 2*oRsiz; } irow += inRsizd4; ocol += 8; } if (Nrows%4 != 0) { for (ColCnt=Ncols; ColCnt>0; ColCnt--) { idata = irow; odata = ocol; for (RowCnt=Nrows%4; RowCnt>0; RowCnt--) { T0r = *idata; T0i = *(idata+1); *odata = T0r; *(odata+1) = T0i; odata+=2; idata += 2*iRsiz; } irow+=2; ocol += 2*oRsiz; } } } void cvprod(double *a, double *b, double *out, long N) { /* complex vector product, can be in-place */ /* product of complex vector *a times complex vector *b */ /* INPUTS */ /* N vector length */ /* *a complex vector length N complex numbers */ /* *b complex vector length N complex numbers */ /* OUTPUTS */ /* *out complex vector length N */ long OutCnt; /* output counter */ double A0R; /* A storage */ double A0I; /* A storage */ double A1R; /* A storage */ double A1I; /* A storage */ double A2R; /* A storage */ double A2I; /* A storage */ double A3R; /* A storage */ double A3I; /* A storage */ double B0R; /* B storage */ double B0I; /* B storage */ double B1R; /* B storage */ double B1I; /* B storage */ double B2R; /* B storage */ double B2I; /* B storage */ double B3R; /* B storage */ double B3I; /* B storage */ double T0R; /* TMP storage */ double T0I; /* TMP storage */ double T1R; /* TMP storage */ double T1I; /* TMP storage */ double T2R; /* TMP storage */ double T2I; /* TMP storage */ double T3R; /* TMP storage */ double T3I; /* TMP storage */ if (N>=4) { A0R = *a; B0R = *b; A0I = *(a +1); B0I = *(b +1); A1R = *(a +2); B1R = *(b +2); A1I = *(a +3); B1I = *(b +3); A2R = *(a +4); B2R = *(b +4); A2I = *(a +5); B2I = *(b +5); A3R = *(a +6); B3R = *(b +6); A3I = *(a +7); B3I = *(b +7); T0R = A0R * B0R; T0I = (A0R * B0I); T1R = A1R * B1R; T1I = (A1R * B1I); T2R = A2R * B2R; T2I = (A2R * B2I); T3R = A3R * B3R; T3I = (A3R * B3I); T0R -= (A0I * B0I); T0I = A0I * B0R + T0I; T1R -= (A1I * B1I); T1I = A1I * B1R + T1I; T2R -= (A2I * B2I); T2I = A2I * B2R + T2I; T3R -= (A3I * B3I); T3I = A3I * B3R + T3I; for (OutCnt=N/4-1; OutCnt > 0; OutCnt--) { a += 8; b += 8; A0R = *a; B0R = *b; A0I = *(a +1); B0I = *(b +1); A1R = *(a +2); B1R = *(b +2); A1I = *(a +3); B1I = *(b +3); A2R = *(a +4); B2R = *(b +4); A2I = *(a +5); B2I = *(b +5); A3R = *(a +6); B3R = *(b +6); A3I = *(a +7); B3I = *(b +7); *out = T0R; *(out +1) = T0I; *(out +2) = T1R; *(out +3) = T1I; *(out +4) = T2R; *(out +5) = T2I; *(out +6) = T3R; *(out +7) = T3I; T0R = A0R * B0R; T0I = (A0R * B0I); T1R = A1R * B1R; T1I = (A1R * B1I); T2R = A2R * B2R; T2I = (A2R * B2I); T3R = A3R * B3R; T3I = (A3R * B3I); T0R -= (A0I * B0I); T0I = A0I * B0R + T0I; T1R -= (A1I * B1I); T1I = A1I * B1R + T1I; T2R -= (A2I * B2I); T2I = A2I * B2R + T2I; T3R -= (A3I * B3I); T3I = A3I * B3R + T3I; out += 8; } a += 8; b += 8; *out = T0R; *(out +1) = T0I; *(out +2) = T1R; *(out +3) = T1I; *(out +4) = T2R; *(out +5) = T2I; *(out +6) = T3R; *(out +7) = T3I; out += 8; } for (OutCnt=N%4; OutCnt > 0; OutCnt--) { A0R = *a++; B0R = *b++; A0I = *a++; B0I = *b++; T0R = A0R * B0R; T0I = (A0R * B0I); T0R -= (A0I * B0I); T0I = A0I * B0R + T0I; *out++ = T0R; *out++ = T0I; } } ngspice-26/src/maths/fft/fftlib.c0000644000265600020320000022706112264261473016335 0ustar andreasadmin/******************************************************************* lower level fft stuff including routines called in fftext.c and fft2d.c *******************************************************************/ #include "fftlib.h" #include #define MCACHE (11-(int)(sizeof(double)/8)) // fft's with M bigger than this bust primary cache // some math constants to 40 decimal places #define MYPI 3.141592653589793238462643383279502884197 // pi #define MYROOT2 1.414213562373095048801688724209698078569 // sqrt(2) #define MYCOSPID8 0.9238795325112867561281831893967882868224 // cos(pi/8) #define MYSINPID8 0.3826834323650897717284599840303988667613 // sin(pi/8) #ifdef _MSC_VER #define inline __inline #endif /************************************************* routines to initialize tables used by fft routines **************************************************/ void fftCosInit(int M, double *Utbl) { /* Compute Utbl, the cosine table for ffts */ /* of size (pow(2,M)/4 +1) */ /* INPUTS */ /* M = log2 of fft size */ /* OUTPUTS */ /* *Utbl = cosine table */ int fftN = POW2(M); int i1; Utbl[0] = 1.0; for (i1 = 1; i1 < fftN/4; i1++) Utbl[i1] = cos( (2.0 * MYPI * i1) / fftN ); Utbl[fftN/4] = 0.0; } void fftBRInit(int M, short *BRLow) { /* Compute BRLow, the bit reversed table for ffts */ /* of size pow(2,M/2 -1) */ /* INPUTS */ /* M = log2 of fft size */ /* OUTPUTS */ /* *BRLow = bit reversed counter table */ int Mroot_1 = M / 2 - 1; int Nroot_1 = POW2(Mroot_1); int i1; int bitsum; int bitmask; int bit; for (i1 = 0; i1 < Nroot_1; i1++) { bitsum = 0; bitmask = 1; for (bit=1; bit <= Mroot_1; bitmask<<=1, bit++) if (i1 & bitmask) bitsum = bitsum + (Nroot_1 >> bit); BRLow[i1] = (short) bitsum; } } /************************************************ parts of ffts1 *************************************************/ static inline void bitrevR2(double *ioptr, int M, short *BRLow); static inline void bitrevR2(double *ioptr, int M, short *BRLow) { /*** bit reverse and first radix 2 stage of forward or inverse fft ***/ double f0r; double f0i; double f1r; double f1i; double f2r; double f2i; double f3r; double f3i; double f4r; double f4i; double f5r; double f5i; double f6r; double f6i; double f7r; double f7i; double t0r; double t0i; double t1r; double t1i; double *p0r; double *p1r; double *IOP; double *iolimit; int Colstart; int iCol; int posA; int posAi; int posB; int posBi; const int Nrems2 = POW2((M+3)/2); const int Nroot_1_ColInc = POW2(M)-Nrems2; const int Nroot_1 = POW2(M/2-1)-1; const int ColstartShift = (M+1)/2 +1; posA = POW2(M); // 1/2 of POW2(M) complexes posAi = posA + 1; posB = posA + 2; posBi = posB + 1; iolimit = ioptr + Nrems2; for (; ioptr < iolimit; ioptr += POW2(M/2+1)) { for (Colstart = Nroot_1; Colstart >= 0; Colstart--) { iCol = Nroot_1; p0r = ioptr+ Nroot_1_ColInc + BRLow[Colstart]*4; IOP = ioptr + (Colstart << ColstartShift); p1r = IOP + BRLow[iCol]*4; f0r = *(p0r); f0i = *(p0r+1); f1r = *(p0r+posA); f1i = *(p0r+posAi); for (; iCol > Colstart;) { f2r = *(p0r+2); f2i = *(p0r+(2+1)); f3r = *(p0r+posB); f3i = *(p0r+posBi); f4r = *(p1r); f4i = *(p1r+1); f5r = *(p1r+posA); f5i = *(p1r+posAi); f6r = *(p1r+2); f6i = *(p1r+(2+1)); f7r = *(p1r+posB); f7i = *(p1r+posBi); t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r + f3r; t1i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; f0r = f4r + f5r; f0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; f2r = f6r + f7r; f2i = f6i + f7i; f7r = f6r - f7r; f7i = f6i - f7i; *(p1r) = t0r; *(p1r+1) = t0i; *(p1r+2) = f1r; *(p1r+(2+1)) = f1i; *(p1r+posA) = t1r; *(p1r+posAi) = t1i; *(p1r+posB) = f3r; *(p1r+posBi) = f3i; *(p0r) = f0r; *(p0r+1) = f0i; *(p0r+2) = f5r; *(p0r+(2+1)) = f5i; *(p0r+posA) = f2r; *(p0r+posAi) = f2i; *(p0r+posB) = f7r; *(p0r+posBi) = f7i; p0r -= Nrems2; f0r = *(p0r); f0i = *(p0r+1); f1r = *(p0r+posA); f1i = *(p0r+posAi); iCol -= 1; p1r = IOP + BRLow[iCol]*4; } f2r = *(p0r+2); f2i = *(p0r+(2+1)); f3r = *(p0r+posB); f3i = *(p0r+posBi); t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r + f3r; t1i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; *(p0r) = t0r; *(p0r+1) = t0i; *(p0r+2) = f1r; *(p0r+(2+1)) = f1i; *(p0r+posA) = t1r; *(p0r+posAi) = t1i; *(p0r+posB) = f3r; *(p0r+posBi) = f3i; } } } static inline void fft2pt(double *ioptr); static inline void fft2pt(double *ioptr) { /*** RADIX 2 fft ***/ double f0r, f0i, f1r, f1i; double t0r, t0i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[2]; f1i = ioptr[3]; /* Butterflys */ /* f0 - - t0 f1 - 1 - f1 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; /* store result */ ioptr[0] = t0r; ioptr[1] = t0i; ioptr[2] = f1r; ioptr[3] = f1i; } static inline void fft4pt(double *ioptr); static inline void fft4pt(double *ioptr) { /*** RADIX 4 fft ***/ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double t0r, t0i, t1r, t1i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[4]; f1i = ioptr[5]; f2r = ioptr[2]; f2i = ioptr[3]; f3r = ioptr[6]; f3i = ioptr[7]; /* Butterflys */ /* f0 - - t0 - - f0 f1 - 1 - f1 - - f1 f2 - - f2 - 1 - f2 f3 - 1 - t1 - -i - f3 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r - t1i; f3i = f1i + t1r; f1r = f1r + t1i; f1i = f1i - t1r; /* store result */ ioptr[0] = f0r; ioptr[1] = f0i; ioptr[2] = f1r; ioptr[3] = f1i; ioptr[4] = f2r; ioptr[5] = f2i; ioptr[6] = f3r; ioptr[7] = f3i; } static inline void fft8pt(double *ioptr); static inline void fft8pt(double *ioptr) { /*** RADIX 8 fft ***/ double w0r = 1.0/MYROOT2; /* cos(pi/4) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[8]; f1i = ioptr[9]; f2r = ioptr[4]; f2i = ioptr[5]; f3r = ioptr[12]; f3i = ioptr[13]; f4r = ioptr[2]; f4i = ioptr[3]; f5r = ioptr[10]; f5i = ioptr[11]; f6r = ioptr[6]; f6i = ioptr[7]; f7r = ioptr[14]; f7i = ioptr[15]; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1 - 1 - f1 - - f1 - - f1 f2 - - f2 - 1 - f2 - - f2 f3 - 1 - t1 - -i - f3 - - f3 f4 - - t0 - - f4 - 1 - t0 f5 - 1 - f5 - - f5 - w3 - f4 f6 - - f6 - 1 - f6 - -i - t1 f7 - 1 - t1 - -i - f7 - iw3- f6 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r - t1i; f3i = f1i + t1r; f1r = f1r + t1i; f1i = f1i - t1r; t0r = f4r + f5r; t0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; t1r = f6r - f7r; t1i = f6i - f7i; f6r = f6r + f7r; f6i = f6i + f7i; f4r = t0r + f6r; f4i = t0i + f6i; f6r = t0r - f6r; f6i = t0i - f6i; f7r = f5r - t1i; f7i = f5i + t1r; f5r = f5r + t1i; f5i = f5i - t1r; t0r = f0r - f4r; t0i = f0i - f4i; f0r = f0r + f4r; f0i = f0i + f4i; t1r = f2r - f6i; t1i = f2i + f6r; f2r = f2r + f6i; f2i = f2i - f6r; f4r = f1r - f5r * w0r - f5i * w0r; f4i = f1i + f5r * w0r - f5i * w0r; f1r = f1r * Two - f4r; f1i = f1i * Two - f4i; f6r = f3r + f7r * w0r - f7i * w0r; f6i = f3i + f7r * w0r + f7i * w0r; f3r = f3r * Two - f6r; f3i = f3i * Two - f6i; /* store result */ ioptr[0] = f0r; ioptr[1] = f0i; ioptr[2] = f1r; ioptr[3] = f1i; ioptr[4] = f2r; ioptr[5] = f2i; ioptr[6] = f3r; ioptr[7] = f3i; ioptr[8] = t0r; ioptr[9] = t0i; ioptr[10] = f4r; ioptr[11] = f4i; ioptr[12] = t1r; ioptr[13] = t1i; ioptr[14] = f6r; ioptr[15] = f6i; } static inline void bfR2(double *ioptr, int M, int NDiffU); static inline void bfR2(double *ioptr, int M, int NDiffU) { /*** 2nd radix 2 stage ***/ int pos; int posi; int pinc; int pnext; int NSameU; int SameUCnt; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; /* const double Two = 2.0; */ pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 4; pos = 2; posi = pos+1; NSameU = POW2(M) / 4 /NDiffU; // 4 Us at a time pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - f4 f1 - 1 - f5 f2 - - f6 f3 - 1 - f7 */ /* Butterflys */ /* f0 - - f4 f1 - 1 - f5 f2 - - f6 f3 - 1 - f7 */ for (SameUCnt = NSameU; SameUCnt > 0 ; SameUCnt--) { f0r = *p0r; f1r = *p1r; f0i = *(p0r + 1); f1i = *(p1r + 1); f2r = *p2r; f3r = *p3r; f2i = *(p2r + 1); f3i = *(p3r + 1); f4r = f0r + f1r; f4i = f0i + f1i; f5r = f0r - f1r; f5i = f0i - f1i; f6r = f2r + f3r; f6i = f2i + f3i; f7r = f2r - f3r; f7i = f2i - f3i; *p0r = f4r; *(p0r + 1) = f4i; *p1r = f5r; *(p1r + 1) = f5i; *p2r = f6r; *(p2r + 1) = f6i; *p3r = f7r; *(p3r + 1) = f7i; f0r = *(p0r + pos); f1i = *(p1r + posi); f0i = *(p0r + posi); f1r = *(p1r + pos); f2r = *(p2r + pos); f3i = *(p3r + posi); f2i = *(p2r + posi); f3r = *(p3r + pos); f4r = f0r + f1i; f4i = f0i - f1r; f5r = f0r - f1i; f5i = f0i + f1r; f6r = f2r + f3i; f6i = f2i - f3r; f7r = f2r - f3i; f7i = f2i + f3r; *(p0r + pos) = f4r; *(p0r + posi) = f4i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; *(p2r + pos) = f6r; *(p2r + posi) = f6i; *(p3r + pos) = f7r; *(p3r + posi) = f7i; p0r += pnext; p1r += pnext; p2r += pnext; p3r += pnext; } } static inline void bfR4(double *ioptr, int M, int NDiffU); static inline void bfR4(double *ioptr, int M, int NDiffU) { /*** 1 radix 4 stage ***/ int pos; int posi; int pinc; int pnext; int pnexti; int NSameU; int SameUCnt; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double w1r = 1.0/MYROOT2; /* cos(pi/4) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t1r, t1i; const double Two = 2.0; pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 4; pnexti = pnext + 1; pos = 2; posi = pos+1; NSameU = POW2(M) / 4 /NDiffU; // 4 pts per butterfly pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - f0 - - f4 f1 - 1 - f5 - - f5 f2 - - f6 - 1 - f6 f3 - 1 - f3 - -i - f7 */ /* Butterflys */ /* f0 - - f4 - - f4 f1 - -i - t1 - - f5 f2 - - f2 - w1 - f6 f3 - -i - f7 - iw1- f7 */ f0r = *p0r; f1r = *p1r; f2r = *p2r; f3r = *p3r; f0i = *(p0r + 1); f1i = *(p1r + 1); f2i = *(p2r + 1); f3i = *(p3r + 1); f5r = f0r - f1r; f5i = f0i - f1i; f0r = f0r + f1r; f0i = f0i + f1i; f6r = f2r + f3r; f6i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; for (SameUCnt = NSameU-1; SameUCnt > 0 ; SameUCnt--) { f7r = f5r - f3i; f7i = f5i + f3r; f5r = f5r + f3i; f5i = f5i - f3r; f4r = f0r + f6r; f4i = f0i + f6i; f6r = f0r - f6r; f6i = f0i - f6i; f2r = *(p2r + pos); f2i = *(p2r + posi); f1r = *(p1r + pos); f1i = *(p1r + posi); f3i = *(p3r + posi); f0r = *(p0r + pos); f3r = *(p3r + pos); f0i = *(p0r + posi); *p3r = f7r; *p0r = f4r; *(p3r + 1) = f7i; *(p0r + 1) = f4i; *p1r = f5r; *p2r = f6r; *(p1r + 1) = f5i; *(p2r + 1) = f6i; f7r = f2r - f3i; f7i = f2i + f3r; f2r = f2r + f3i; f2i = f2i - f3r; f4r = f0r + f1i; f4i = f0i - f1r; t1r = f0r - f1i; t1i = f0i + f1r; f5r = t1r - f7r * w1r + f7i * w1r; f5i = t1i - f7r * w1r - f7i * w1r; f7r = t1r * Two - f5r; f7i = t1i * Two - f5i; f6r = f4r - f2r * w1r - f2i * w1r; f6i = f4i + f2r * w1r - f2i * w1r; f4r = f4r * Two - f6r; f4i = f4i * Two - f6i; f3r = *(p3r + pnext); f0r = *(p0r + pnext); f3i = *(p3r + pnexti); f0i = *(p0r + pnexti); f2r = *(p2r + pnext); f2i = *(p2r + pnexti); f1r = *(p1r + pnext); f1i = *(p1r + pnexti); *(p2r + pos) = f6r; *(p1r + pos) = f5r; *(p2r + posi) = f6i; *(p1r + posi) = f5i; *(p3r + pos) = f7r; *(p0r + pos) = f4r; *(p3r + posi) = f7i; *(p0r + posi) = f4i; f6r = f2r + f3r; f6i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; f5r = f0r - f1r; f5i = f0i - f1i; f0r = f0r + f1r; f0i = f0i + f1i; p3r += pnext; p0r += pnext; p1r += pnext; p2r += pnext; } f7r = f5r - f3i; f7i = f5i + f3r; f5r = f5r + f3i; f5i = f5i - f3r; f4r = f0r + f6r; f4i = f0i + f6i; f6r = f0r - f6r; f6i = f0i - f6i; f2r = *(p2r + pos); f2i = *(p2r + posi); f1r = *(p1r + pos); f1i = *(p1r + posi); f3i = *(p3r + posi); f0r = *(p0r + pos); f3r = *(p3r + pos); f0i = *(p0r + posi); *p3r = f7r; *p0r = f4r; *(p3r + 1) = f7i; *(p0r + 1) = f4i; *p1r = f5r; *p2r = f6r; *(p1r + 1) = f5i; *(p2r + 1) = f6i; f7r = f2r - f3i; f7i = f2i + f3r; f2r = f2r + f3i; f2i = f2i - f3r; f4r = f0r + f1i; f4i = f0i - f1r; t1r = f0r - f1i; t1i = f0i + f1r; f5r = t1r - f7r * w1r + f7i * w1r; f5i = t1i - f7r * w1r - f7i * w1r; f7r = t1r * Two - f5r; f7i = t1i * Two - f5i; f6r = f4r - f2r * w1r - f2i * w1r; f6i = f4i + f2r * w1r - f2i * w1r; f4r = f4r * Two - f6r; f4i = f4i * Two - f6i; *(p2r + pos) = f6r; *(p1r + pos) = f5r; *(p2r + posi) = f6i; *(p1r + posi) = f5i; *(p3r + pos) = f7r; *(p0r + pos) = f4r; *(p3r + posi) = f7i; *(p0r + posi) = f4i; } static inline void bfstages(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt); static inline void bfstages(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt) { /*** RADIX 8 Stages ***/ int pos; int posi; int pinc; int pnext; int NSameU; int Uinc; int Uinc2; int Uinc4; int DiffUCnt; int SameUCnt; int U2toU3; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double *u0r, *u0i, *u1r, *u1i, *u2r, *u2i; double w0r, w0i, w1r, w1i, w2r, w2i, w3r, w3i; double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 8; pos = pinc * 4; posi = pos + 1; NSameU = POW2(M) / 8 /NDiffU; // 8 pts per butterfly Uinc = NSameU * Ustride; Uinc2 = Uinc * 2; Uinc4 = Uinc * 4; U2toU3 = (POW2(M) / 8)*Ustride; for (; StageCnt > 0 ; StageCnt--) { u0r = &Utbl[0]; u0i = &Utbl[POW2(M-2)*Ustride]; u1r = u0r; u1i = u0i; u2r = u0r; u2i = u0i; w0r = *u0r; w0i = *u0i; w1r = *u1r; w1i = *u1i; w2r = *u2r; w2i = *u2i; w3r = *(u2r+U2toU3); w3i = *(u2i-U2toU3); pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1 - w0- f1 - - f1 - - f1 f2 - - f2 - w1- f2 - - f4 f3 - w0- t1 - iw1- f3 - - f5 f4 - - t0 - - f4 - w2- t0 f5 - w0- f5 - - f5 - w3- t1 f6 - - f6 - w1- f6 - iw2- f6 f7 - w0- t1 - iw1- f7 - iw3- f7 */ for (DiffUCnt = NDiffU; DiffUCnt > 0 ; DiffUCnt--) { f0r = *p0r; f0i = *(p0r + 1); f1r = *p1r; f1i = *(p1r + 1); for (SameUCnt = NSameU-1; SameUCnt > 0 ; SameUCnt--) { f2r = *p2r; f2i = *(p2r + 1); f3r = *p3r; f3i = *(p3r + 1); t0r = f0r + f1r * w0r + f1i * w0i; t0i = f0i - f1r * w0i + f1i * w0r; f1r = f0r * Two - t0r; f1i = f0i * Two - t0i; f4r = *(p0r + pos); f4i = *(p0r + posi); f5r = *(p1r + pos); f5i = *(p1r + posi); f6r = *(p2r + pos); f6i = *(p2r + posi); f7r = *(p3r + pos); f7i = *(p3r + posi); t1r = f2r - f3r * w0r - f3i * w0i; t1i = f2i + f3r * w0i - f3i * w0r; f2r = f2r * Two - t1r; f2i = f2i * Two - t1i; f0r = t0r + f2r * w1r + f2i * w1i; f0i = t0i - f2r * w1i + f2i * w1r; f2r = t0r * Two - f0r; f2i = t0i * Two - f0i; f3r = f1r + t1r * w1i - t1i * w1r; f3i = f1i + t1r * w1r + t1i * w1i; f1r = f1r * Two - f3r; f1i = f1i * Two - f3i; t0r = f4r + f5r * w0r + f5i * w0i; t0i = f4i - f5r * w0i + f5i * w0r; f5r = f4r * Two - t0r; f5i = f4i * Two - t0i; t1r = f6r - f7r * w0r - f7i * w0i; t1i = f6i + f7r * w0i - f7i * w0r; f6r = f6r * Two - t1r; f6i = f6i * Two - t1i; f4r = t0r + f6r * w1r + f6i * w1i; f4i = t0i - f6r * w1i + f6i * w1r; f6r = t0r * Two - f4r; f6i = t0i * Two - f4i; f7r = f5r + t1r * w1i - t1i * w1r; f7i = f5i + t1r * w1r + t1i * w1i; f5r = f5r * Two - f7r; f5i = f5i * Two - f7i; t0r = f0r - f4r * w2r - f4i * w2i; t0i = f0i + f4r * w2i - f4i * w2r; f0r = f0r * Two - t0r; f0i = f0i * Two - t0i; t1r = f1r - f5r * w3r - f5i * w3i; t1i = f1i + f5r * w3i - f5i * w3r; f1r = f1r * Two - t1r; f1i = f1i * Two - t1i; *(p0r + pos) = t0r; *(p1r + pos) = t1r; *(p0r + posi) = t0i; *(p1r + posi) = t1i; *p0r = f0r; *p1r = f1r; *(p0r + 1) = f0i; *(p1r + 1) = f1i; p0r += pnext; f0r = *p0r; f0i = *(p0r + 1); p1r += pnext; f1r = *p1r; f1i = *(p1r + 1); f4r = f2r - f6r * w2i + f6i * w2r; f4i = f2i - f6r * w2r - f6i * w2i; f6r = f2r * Two - f4r; f6i = f2i * Two - f4i; f5r = f3r - f7r * w3i + f7i * w3r; f5i = f3i - f7r * w3r - f7i * w3i; f7r = f3r * Two - f5r; f7i = f3i * Two - f5i; *p2r = f4r; *p3r = f5r; *(p2r + 1) = f4i; *(p3r + 1) = f5i; *(p2r + pos) = f6r; *(p3r + pos) = f7r; *(p2r + posi) = f6i; *(p3r + posi) = f7i; p2r += pnext; p3r += pnext; } f2r = *p2r; f2i = *(p2r + 1); f3r = *p3r; f3i = *(p3r + 1); t0r = f0r + f1r * w0r + f1i * w0i; t0i = f0i - f1r * w0i + f1i * w0r; f1r = f0r * Two - t0r; f1i = f0i * Two - t0i; f4r = *(p0r + pos); f4i = *(p0r + posi); f5r = *(p1r + pos); f5i = *(p1r + posi); f6r = *(p2r + pos); f6i = *(p2r + posi); f7r = *(p3r + pos); f7i = *(p3r + posi); t1r = f2r - f3r * w0r - f3i * w0i; t1i = f2i + f3r * w0i - f3i * w0r; f2r = f2r * Two - t1r; f2i = f2i * Two - t1i; f0r = t0r + f2r * w1r + f2i * w1i; f0i = t0i - f2r * w1i + f2i * w1r; f2r = t0r * Two - f0r; f2i = t0i * Two - f0i; f3r = f1r + t1r * w1i - t1i * w1r; f3i = f1i + t1r * w1r + t1i * w1i; f1r = f1r * Two - f3r; f1i = f1i * Two - f3i; if (DiffUCnt == NDiffU/2) Uinc4 = -Uinc4; u0r += Uinc4; u0i -= Uinc4; u1r += Uinc2; u1i -= Uinc2; u2r += Uinc; u2i -= Uinc; pstrt += 2; t0r = f4r + f5r * w0r + f5i * w0i; t0i = f4i - f5r * w0i + f5i * w0r; f5r = f4r * Two - t0r; f5i = f4i * Two - t0i; t1r = f6r - f7r * w0r - f7i * w0i; t1i = f6i + f7r * w0i - f7i * w0r; f6r = f6r * Two - t1r; f6i = f6i * Two - t1i; f4r = t0r + f6r * w1r + f6i * w1i; f4i = t0i - f6r * w1i + f6i * w1r; f6r = t0r * Two - f4r; f6i = t0i * Two - f4i; f7r = f5r + t1r * w1i - t1i * w1r; f7i = f5i + t1r * w1r + t1i * w1i; f5r = f5r * Two - f7r; f5i = f5i * Two - f7i; w0r = *u0r; w0i = *u0i; w1r = *u1r; w1i = *u1i; if (DiffUCnt <= NDiffU/2) w0r = -w0r; t0r = f0r - f4r * w2r - f4i * w2i; t0i = f0i + f4r * w2i - f4i * w2r; f0r = f0r * Two - t0r; f0i = f0i * Two - t0i; f4r = f2r - f6r * w2i + f6i * w2r; f4i = f2i - f6r * w2r - f6i * w2i; f6r = f2r * Two - f4r; f6i = f2i * Two - f4i; *(p0r + pos) = t0r; *p2r = f4r; *(p0r + posi) = t0i; *(p2r + 1) = f4i; w2r = *u2r; w2i = *u2i; *p0r = f0r; *(p2r + pos) = f6r; *(p0r + 1) = f0i; *(p2r + posi) = f6i; p0r = pstrt; p2r = pstrt + pinc + pinc; t1r = f1r - f5r * w3r - f5i * w3i; t1i = f1i + f5r * w3i - f5i * w3r; f1r = f1r * Two - t1r; f1i = f1i * Two - t1i; f5r = f3r - f7r * w3i + f7i * w3r; f5i = f3i - f7r * w3r - f7i * w3i; f7r = f3r * Two - f5r; f7i = f3i * Two - f5i; *(p1r + pos) = t1r; *p3r = f5r; *(p1r + posi) = t1i; *(p3r + 1) = f5i; w3r = *(u2r+U2toU3); w3i = *(u2i-U2toU3); *p1r = f1r; *(p3r + pos) = f7r; *(p1r + 1) = f1i; *(p3r + posi) = f7i; p1r = pstrt + pinc; p3r = p2r + pinc; } NSameU /= 8; Uinc /= 8; Uinc2 /= 8; Uinc4 = Uinc * 4; NDiffU *= 8; pinc *= 8; pnext *= 8; pos *= 8; posi = pos + 1; } } void fftrecurs(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt); void fftrecurs(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt) { /* recursive bfstages calls to maximize on chip cache efficiency */ int i1; if (M <= MCACHE) // fits on chip ? bfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt); /* RADIX 8 Stages */ else { for (i1=0; i1<8; i1++) { fftrecurs(&ioptr[i1*POW2(M-3)*2], M-3, Utbl, 8*Ustride, NDiffU, StageCnt-1); /* RADIX 8 Stages */ } bfstages(ioptr, M, Utbl, Ustride, POW2(M-3), 1); /* RADIX 8 Stage */ } } void ffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow) { /* Compute in-place complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array */ int StageCnt; int NDiffU; switch (M) { case 0: break; case 1: for (; Rows>0; Rows--) { fft2pt(ioptr); /* a 2 pt fft */ ioptr += 2*POW2(M); } break; case 2: for (; Rows>0; Rows--) { fft4pt(ioptr); /* a 4 pt fft */ ioptr += 2*POW2(M); } break; case 3: for (; Rows>0; Rows--) { fft8pt(ioptr); /* an 8 pt fft */ ioptr += 2*POW2(M); } break; default: for (; Rows>0; Rows--) { bitrevR2(ioptr, M, BRLow); /* bit reverse and first radix 2 stage */ StageCnt = (M-1) / 3; // number of radix 8 stages NDiffU = 2; // one radix 2 stage already complete if ( (M-1-(StageCnt * 3)) == 1 ) { bfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */ NDiffU *= 2; } if ( (M-1-(StageCnt * 3)) == 2 ) { bfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */ NDiffU *= 4; } if (M <= MCACHE) bfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */ else { fftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */ } ioptr += 2*POW2(M); } } } /************************************************ parts of iffts1 *************************************************/ static inline void scbitrevR2(double *ioptr, int M, short *BRLow, double scale); static inline void scbitrevR2(double *ioptr, int M, short *BRLow, double scale) { /*** scaled bit reverse and first radix 2 stage forward or inverse fft ***/ double f0r; double f0i; double f1r; double f1i; double f2r; double f2i; double f3r; double f3i; double f4r; double f4i; double f5r; double f5i; double f6r; double f6i; double f7r; double f7i; double t0r; double t0i; double t1r; double t1i; double *p0r; double *p1r; double *IOP; double *iolimit; int Colstart; int iCol; int posA; int posAi; int posB; int posBi; const int Nrems2 = POW2((M+3)/2); const int Nroot_1_ColInc = POW2(M)-Nrems2; const int Nroot_1 = POW2(M/2-1)-1; const int ColstartShift = (M+1)/2 +1; posA = POW2(M); // 1/2 of POW2(M) complexes posAi = posA + 1; posB = posA + 2; posBi = posB + 1; iolimit = ioptr + Nrems2; for (; ioptr < iolimit; ioptr += POW2(M/2+1)) { for (Colstart = Nroot_1; Colstart >= 0; Colstart--) { iCol = Nroot_1; p0r = ioptr+ Nroot_1_ColInc + BRLow[Colstart]*4; IOP = ioptr + (Colstart << ColstartShift); p1r = IOP + BRLow[iCol]*4; f0r = *(p0r); f0i = *(p0r+1); f1r = *(p0r+posA); f1i = *(p0r+posAi); for (; iCol > Colstart;) { f2r = *(p0r+2); f2i = *(p0r+(2+1)); f3r = *(p0r+posB); f3i = *(p0r+posBi); f4r = *(p1r); f4i = *(p1r+1); f5r = *(p1r+posA); f5i = *(p1r+posAi); f6r = *(p1r+2); f6i = *(p1r+(2+1)); f7r = *(p1r+posB); f7i = *(p1r+posBi); t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r + f3r; t1i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; f0r = f4r + f5r; f0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; f2r = f6r + f7r; f2i = f6i + f7i; f7r = f6r - f7r; f7i = f6i - f7i; *(p1r) = scale*t0r; *(p1r+1) = scale*t0i; *(p1r+2) = scale*f1r; *(p1r+(2+1)) = scale*f1i; *(p1r+posA) = scale*t1r; *(p1r+posAi) = scale*t1i; *(p1r+posB) = scale*f3r; *(p1r+posBi) = scale*f3i; *(p0r) = scale*f0r; *(p0r+1) = scale*f0i; *(p0r+2) = scale*f5r; *(p0r+(2+1)) = scale*f5i; *(p0r+posA) = scale*f2r; *(p0r+posAi) = scale*f2i; *(p0r+posB) = scale*f7r; *(p0r+posBi) = scale*f7i; p0r -= Nrems2; f0r = *(p0r); f0i = *(p0r+1); f1r = *(p0r+posA); f1i = *(p0r+posAi); iCol -= 1; p1r = IOP + BRLow[iCol]*4; } f2r = *(p0r+2); f2i = *(p0r+(2+1)); f3r = *(p0r+posB); f3i = *(p0r+posBi); t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r + f3r; t1i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; *(p0r) = scale*t0r; *(p0r+1) = scale*t0i; *(p0r+2) = scale*f1r; *(p0r+(2+1)) = scale*f1i; *(p0r+posA) = scale*t1r; *(p0r+posAi) = scale*t1i; *(p0r+posB) = scale*f3r; *(p0r+posBi) = scale*f3i; } } } static inline void ifft2pt(double *ioptr, double scale); static inline void ifft2pt(double *ioptr, double scale) { /*** RADIX 2 ifft ***/ double f0r, f0i, f1r, f1i; double t0r, t0i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[2]; f1i = ioptr[3]; /* Butterflys */ /* f0 - - t0 f1 - 1 - f1 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; /* store result */ ioptr[0] = scale*t0r; ioptr[1] = scale*t0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; } static inline void ifft4pt(double *ioptr, double scale); static inline void ifft4pt(double *ioptr, double scale) { /*** RADIX 4 ifft ***/ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double t0r, t0i, t1r, t1i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[4]; f1i = ioptr[5]; f2r = ioptr[2]; f2i = ioptr[3]; f3r = ioptr[6]; f3i = ioptr[7]; /* Butterflys */ /* f0 - - t0 - - f0 f1 - 1 - f1 - - f1 f2 - - f2 - 1 - f2 f3 - 1 - t1 - i - f3 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r + t1i; f3i = f1i - t1r; f1r = f1r - t1i; f1i = f1i + t1r; /* store result */ ioptr[0] = scale*f0r; ioptr[1] = scale*f0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[4] = scale*f2r; ioptr[5] = scale*f2i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; } static inline void ifft8pt(double *ioptr, double scale); static inline void ifft8pt(double *ioptr, double scale) { /*** RADIX 8 ifft ***/ double w0r = 1.0/MYROOT2; /* cos(pi/4) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[8]; f1i = ioptr[9]; f2r = ioptr[4]; f2i = ioptr[5]; f3r = ioptr[12]; f3i = ioptr[13]; f4r = ioptr[2]; f4i = ioptr[3]; f5r = ioptr[10]; f5i = ioptr[11]; f6r = ioptr[6]; f6i = ioptr[7]; f7r = ioptr[14]; f7i = ioptr[15]; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1 - 1 - f1 - - f1 - - f1 f2 - - f2 - 1 - f2 - - f2 f3 - 1 - t1 - i - f3 - - f3 f4 - - t0 - - f4 - 1 - t0 f5 - 1 - f5 - - f5 - w3 - f4 f6 - - f6 - 1 - f6 - i - t1 f7 - 1 - t1 - i - f7 - iw3- f6 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r + t1i; f3i = f1i - t1r; f1r = f1r - t1i; f1i = f1i + t1r; t0r = f4r + f5r; t0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; t1r = f6r - f7r; t1i = f6i - f7i; f6r = f6r + f7r; f6i = f6i + f7i; f4r = t0r + f6r; f4i = t0i + f6i; f6r = t0r - f6r; f6i = t0i - f6i; f7r = f5r + t1i; f7i = f5i - t1r; f5r = f5r - t1i; f5i = f5i + t1r; t0r = f0r - f4r; t0i = f0i - f4i; f0r = f0r + f4r; f0i = f0i + f4i; t1r = f2r + f6i; t1i = f2i - f6r; f2r = f2r - f6i; f2i = f2i + f6r; f4r = f1r - f5r * w0r + f5i * w0r; f4i = f1i - f5r * w0r - f5i * w0r; f1r = f1r * Two - f4r; f1i = f1i * Two - f4i; f6r = f3r + f7r * w0r + f7i * w0r; f6i = f3i - f7r * w0r + f7i * w0r; f3r = f3r * Two - f6r; f3i = f3i * Two - f6i; /* store result */ ioptr[0] = scale*f0r; ioptr[1] = scale*f0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[4] = scale*f2r; ioptr[5] = scale*f2i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; ioptr[8] = scale*t0r; ioptr[9] = scale*t0i; ioptr[10] = scale*f4r; ioptr[11] = scale*f4i; ioptr[12] = scale*t1r; ioptr[13] = scale*t1i; ioptr[14] = scale*f6r; ioptr[15] = scale*f6i; } static inline void ibfR2(double *ioptr, int M, int NDiffU); static inline void ibfR2(double *ioptr, int M, int NDiffU) { /*** 2nd radix 2 stage ***/ int pos; int posi; int pinc; int pnext; int NSameU; int SameUCnt; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; /* const double Two = 2.0; */ pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 4; pos = 2; posi = pos+1; NSameU = POW2(M) / 4 /NDiffU; // 4 Us at a time pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - f4 f1 - 1 - f5 f2 - - f6 f3 - 1 - f7 */ /* Butterflys */ /* f0 - - f4 f1 - 1 - f5 f2 - - f6 f3 - 1 - f7 */ for (SameUCnt = NSameU; SameUCnt > 0 ; SameUCnt--) { f0r = *p0r; f1r = *p1r; f0i = *(p0r + 1); f1i = *(p1r + 1); f2r = *p2r; f3r = *p3r; f2i = *(p2r + 1); f3i = *(p3r + 1); f4r = f0r + f1r; f4i = f0i + f1i; f5r = f0r - f1r; f5i = f0i - f1i; f6r = f2r + f3r; f6i = f2i + f3i; f7r = f2r - f3r; f7i = f2i - f3i; *p0r = f4r; *(p0r + 1) = f4i; *p1r = f5r; *(p1r + 1) = f5i; *p2r = f6r; *(p2r + 1) = f6i; *p3r = f7r; *(p3r + 1) = f7i; f0r = *(p0r + pos); f1i = *(p1r + posi); f0i = *(p0r + posi); f1r = *(p1r + pos); f2r = *(p2r + pos); f3i = *(p3r + posi); f2i = *(p2r + posi); f3r = *(p3r + pos); f4r = f0r - f1i; f4i = f0i + f1r; f5r = f0r + f1i; f5i = f0i - f1r; f6r = f2r - f3i; f6i = f2i + f3r; f7r = f2r + f3i; f7i = f2i - f3r; *(p0r + pos) = f4r; *(p0r + posi) = f4i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; *(p2r + pos) = f6r; *(p2r + posi) = f6i; *(p3r + pos) = f7r; *(p3r + posi) = f7i; p0r += pnext; p1r += pnext; p2r += pnext; p3r += pnext; } } static inline void ibfR4(double *ioptr, int M, int NDiffU); static inline void ibfR4(double *ioptr, int M, int NDiffU) { /*** 1 radix 4 stage ***/ int pos; int posi; int pinc; int pnext; int pnexti; int NSameU; int SameUCnt; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double w1r = 1.0/MYROOT2; /* cos(pi/4) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t1r, t1i; const double Two = 2.0; pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 4; pnexti = pnext + 1; pos = 2; posi = pos+1; NSameU = POW2(M) / 4 /NDiffU; // 4 pts per butterfly pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - f0 - - f4 f1 - 1 - f5 - - f5 f2 - - f6 - 1 - f6 f3 - 1 - f3 - -i - f7 */ /* Butterflys */ /* f0 - - f4 - - f4 f1 - -i - t1 - - f5 f2 - - f2 - w1 - f6 f3 - -i - f7 - iw1- f7 */ f0r = *p0r; f1r = *p1r; f2r = *p2r; f3r = *p3r; f0i = *(p0r + 1); f1i = *(p1r + 1); f2i = *(p2r + 1); f3i = *(p3r + 1); f5r = f0r - f1r; f5i = f0i - f1i; f0r = f0r + f1r; f0i = f0i + f1i; f6r = f2r + f3r; f6i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; for (SameUCnt = NSameU-1; SameUCnt > 0 ; SameUCnt--) { f7r = f5r + f3i; f7i = f5i - f3r; f5r = f5r - f3i; f5i = f5i + f3r; f4r = f0r + f6r; f4i = f0i + f6i; f6r = f0r - f6r; f6i = f0i - f6i; f2r = *(p2r + pos); f2i = *(p2r + posi); f1r = *(p1r + pos); f1i = *(p1r + posi); f3i = *(p3r + posi); f0r = *(p0r + pos); f3r = *(p3r + pos); f0i = *(p0r + posi); *p3r = f7r; *p0r = f4r; *(p3r + 1) = f7i; *(p0r + 1) = f4i; *p1r = f5r; *p2r = f6r; *(p1r + 1) = f5i; *(p2r + 1) = f6i; f7r = f2r + f3i; f7i = f2i - f3r; f2r = f2r - f3i; f2i = f2i + f3r; f4r = f0r - f1i; f4i = f0i + f1r; t1r = f0r + f1i; t1i = f0i - f1r; f5r = t1r - f7r * w1r - f7i * w1r; f5i = t1i + f7r * w1r - f7i * w1r; f7r = t1r * Two - f5r; f7i = t1i * Two - f5i; f6r = f4r - f2r * w1r + f2i * w1r; f6i = f4i - f2r * w1r - f2i * w1r; f4r = f4r * Two - f6r; f4i = f4i * Two - f6i; f3r = *(p3r + pnext); f0r = *(p0r + pnext); f3i = *(p3r + pnexti); f0i = *(p0r + pnexti); f2r = *(p2r + pnext); f2i = *(p2r + pnexti); f1r = *(p1r + pnext); f1i = *(p1r + pnexti); *(p2r + pos) = f6r; *(p1r + pos) = f5r; *(p2r + posi) = f6i; *(p1r + posi) = f5i; *(p3r + pos) = f7r; *(p0r + pos) = f4r; *(p3r + posi) = f7i; *(p0r + posi) = f4i; f6r = f2r + f3r; f6i = f2i + f3i; f3r = f2r - f3r; f3i = f2i - f3i; f5r = f0r - f1r; f5i = f0i - f1i; f0r = f0r + f1r; f0i = f0i + f1i; p3r += pnext; p0r += pnext; p1r += pnext; p2r += pnext; } f7r = f5r + f3i; f7i = f5i - f3r; f5r = f5r - f3i; f5i = f5i + f3r; f4r = f0r + f6r; f4i = f0i + f6i; f6r = f0r - f6r; f6i = f0i - f6i; f2r = *(p2r + pos); f2i = *(p2r + posi); f1r = *(p1r + pos); f1i = *(p1r + posi); f3i = *(p3r + posi); f0r = *(p0r + pos); f3r = *(p3r + pos); f0i = *(p0r + posi); *p3r = f7r; *p0r = f4r; *(p3r + 1) = f7i; *(p0r + 1) = f4i; *p1r = f5r; *p2r = f6r; *(p1r + 1) = f5i; *(p2r + 1) = f6i; f7r = f2r + f3i; f7i = f2i - f3r; f2r = f2r - f3i; f2i = f2i + f3r; f4r = f0r - f1i; f4i = f0i + f1r; t1r = f0r + f1i; t1i = f0i - f1r; f5r = t1r - f7r * w1r - f7i * w1r; f5i = t1i + f7r * w1r - f7i * w1r; f7r = t1r * Two - f5r; f7i = t1i * Two - f5i; f6r = f4r - f2r * w1r + f2i * w1r; f6i = f4i - f2r * w1r - f2i * w1r; f4r = f4r * Two - f6r; f4i = f4i * Two - f6i; *(p2r + pos) = f6r; *(p1r + pos) = f5r; *(p2r + posi) = f6i; *(p1r + posi) = f5i; *(p3r + pos) = f7r; *(p0r + pos) = f4r; *(p3r + posi) = f7i; *(p0r + posi) = f4i; } static inline void ibfstages(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt); static inline void ibfstages(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt) { /*** RADIX 8 Stages ***/ int pos; int posi; int pinc; int pnext; int NSameU; int Uinc; int Uinc2; int Uinc4; int DiffUCnt; int SameUCnt; int U2toU3; double *pstrt; double *p0r, *p1r, *p2r, *p3r; double *u0r, *u0i, *u1r, *u1i, *u2r, *u2i; double w0r, w0i, w1r, w1i, w2r, w2i, w3r, w3i; double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; pinc = NDiffU * 2; // 2 doubles per complex pnext = pinc * 8; pos = pinc * 4; posi = pos + 1; NSameU = POW2(M) / 8 /NDiffU; // 8 pts per butterfly Uinc = NSameU * Ustride; Uinc2 = Uinc * 2; Uinc4 = Uinc * 4; U2toU3 = (POW2(M) / 8)*Ustride; for (; StageCnt > 0 ; StageCnt--) { u0r = &Utbl[0]; u0i = &Utbl[POW2(M-2)*Ustride]; u1r = u0r; u1i = u0i; u2r = u0r; u2i = u0i; w0r = *u0r; w0i = *u0i; w1r = *u1r; w1i = *u1i; w2r = *u2r; w2i = *u2i; w3r = *(u2r+U2toU3); w3i = *(u2i-U2toU3); pstrt = ioptr; p0r = pstrt; p1r = pstrt+pinc; p2r = p1r+pinc; p3r = p2r+pinc; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1 - w0- f1 - - f1 - - f1 f2 - - f2 - w1- f2 - - f4 f3 - w0- t1 - iw1- f3 - - f5 f4 - - t0 - - f4 - w2- t0 f5 - w0- f5 - - f5 - w3- t1 f6 - - f6 - w1- f6 - iw2- f6 f7 - w0- t1 - iw1- f7 - iw3- f7 */ for (DiffUCnt = NDiffU; DiffUCnt > 0 ; DiffUCnt--) { f0r = *p0r; f0i = *(p0r + 1); f1r = *p1r; f1i = *(p1r + 1); for (SameUCnt = NSameU-1; SameUCnt > 0 ; SameUCnt--) { f2r = *p2r; f2i = *(p2r + 1); f3r = *p3r; f3i = *(p3r + 1); t0r = f0r + f1r * w0r - f1i * w0i; t0i = f0i + f1r * w0i + f1i * w0r; f1r = f0r * Two - t0r; f1i = f0i * Two - t0i; f4r = *(p0r + pos); f4i = *(p0r + posi); f5r = *(p1r + pos); f5i = *(p1r + posi); f6r = *(p2r + pos); f6i = *(p2r + posi); f7r = *(p3r + pos); f7i = *(p3r + posi); t1r = f2r - f3r * w0r + f3i * w0i; t1i = f2i - f3r * w0i - f3i * w0r; f2r = f2r * Two - t1r; f2i = f2i * Two - t1i; f0r = t0r + f2r * w1r - f2i * w1i; f0i = t0i + f2r * w1i + f2i * w1r; f2r = t0r * Two - f0r; f2i = t0i * Two - f0i; f3r = f1r + t1r * w1i + t1i * w1r; f3i = f1i - t1r * w1r + t1i * w1i; f1r = f1r * Two - f3r; f1i = f1i * Two - f3i; t0r = f4r + f5r * w0r - f5i * w0i; t0i = f4i + f5r * w0i + f5i * w0r; f5r = f4r * Two - t0r; f5i = f4i * Two - t0i; t1r = f6r - f7r * w0r + f7i * w0i; t1i = f6i - f7r * w0i - f7i * w0r; f6r = f6r * Two - t1r; f6i = f6i * Two - t1i; f4r = t0r + f6r * w1r - f6i * w1i; f4i = t0i + f6r * w1i + f6i * w1r; f6r = t0r * Two - f4r; f6i = t0i * Two - f4i; f7r = f5r + t1r * w1i + t1i * w1r; f7i = f5i - t1r * w1r + t1i * w1i; f5r = f5r * Two - f7r; f5i = f5i * Two - f7i; t0r = f0r - f4r * w2r + f4i * w2i; t0i = f0i - f4r * w2i - f4i * w2r; f0r = f0r * Two - t0r; f0i = f0i * Two - t0i; t1r = f1r - f5r * w3r + f5i * w3i; t1i = f1i - f5r * w3i - f5i * w3r; f1r = f1r * Two - t1r; f1i = f1i * Two - t1i; *(p0r + pos) = t0r; *(p0r + posi) = t0i; *p0r = f0r; *(p0r + 1) = f0i; p0r += pnext; f0r = *p0r; f0i = *(p0r + 1); *(p1r + pos) = t1r; *(p1r + posi) = t1i; *p1r = f1r; *(p1r + 1) = f1i; p1r += pnext; f1r = *p1r; f1i = *(p1r + 1); f4r = f2r - f6r * w2i - f6i * w2r; f4i = f2i + f6r * w2r - f6i * w2i; f6r = f2r * Two - f4r; f6i = f2i * Two - f4i; f5r = f3r - f7r * w3i - f7i * w3r; f5i = f3i + f7r * w3r - f7i * w3i; f7r = f3r * Two - f5r; f7i = f3i * Two - f5i; *p2r = f4r; *(p2r + 1) = f4i; *(p2r + pos) = f6r; *(p2r + posi) = f6i; p2r += pnext; *p3r = f5r; *(p3r + 1) = f5i; *(p3r + pos) = f7r; *(p3r + posi) = f7i; p3r += pnext; } f2r = *p2r; f2i = *(p2r + 1); f3r = *p3r; f3i = *(p3r + 1); t0r = f0r + f1r * w0r - f1i * w0i; t0i = f0i + f1r * w0i + f1i * w0r; f1r = f0r * Two - t0r; f1i = f0i * Two - t0i; f4r = *(p0r + pos); f4i = *(p0r + posi); f5r = *(p1r + pos); f5i = *(p1r + posi); f6r = *(p2r + pos); f6i = *(p2r + posi); f7r = *(p3r + pos); f7i = *(p3r + posi); t1r = f2r - f3r * w0r + f3i * w0i; t1i = f2i - f3r * w0i - f3i * w0r; f2r = f2r * Two - t1r; f2i = f2i * Two - t1i; f0r = t0r + f2r * w1r - f2i * w1i; f0i = t0i + f2r * w1i + f2i * w1r; f2r = t0r * Two - f0r; f2i = t0i * Two - f0i; f3r = f1r + t1r * w1i + t1i * w1r; f3i = f1i - t1r * w1r + t1i * w1i; f1r = f1r * Two - f3r; f1i = f1i * Two - f3i; if (DiffUCnt == NDiffU/2) Uinc4 = -Uinc4; u0r += Uinc4; u0i -= Uinc4; u1r += Uinc2; u1i -= Uinc2; u2r += Uinc; u2i -= Uinc; pstrt += 2; t0r = f4r + f5r * w0r - f5i * w0i; t0i = f4i + f5r * w0i + f5i * w0r; f5r = f4r * Two - t0r; f5i = f4i * Two - t0i; t1r = f6r - f7r * w0r + f7i * w0i; t1i = f6i - f7r * w0i - f7i * w0r; f6r = f6r * Two - t1r; f6i = f6i * Two - t1i; f4r = t0r + f6r * w1r - f6i * w1i; f4i = t0i + f6r * w1i + f6i * w1r; f6r = t0r * Two - f4r; f6i = t0i * Two - f4i; f7r = f5r + t1r * w1i + t1i * w1r; f7i = f5i - t1r * w1r + t1i * w1i; f5r = f5r * Two - f7r; f5i = f5i * Two - f7i; w0r = *u0r; w0i = *u0i; w1r = *u1r; w1i = *u1i; if (DiffUCnt <= NDiffU/2) w0r = -w0r; t0r = f0r - f4r * w2r + f4i * w2i; t0i = f0i - f4r * w2i - f4i * w2r; f0r = f0r * Two - t0r; f0i = f0i * Two - t0i; f4r = f2r - f6r * w2i - f6i * w2r; f4i = f2i + f6r * w2r - f6i * w2i; f6r = f2r * Two - f4r; f6i = f2i * Two - f4i; *(p0r + pos) = t0r; *p2r = f4r; *(p0r + posi) = t0i; *(p2r + 1) = f4i; w2r = *u2r; w2i = *u2i; *p0r = f0r; *(p2r + pos) = f6r; *(p0r + 1) = f0i; *(p2r + posi) = f6i; p0r = pstrt; p2r = pstrt + pinc + pinc; t1r = f1r - f5r * w3r + f5i * w3i; t1i = f1i - f5r * w3i - f5i * w3r; f1r = f1r * Two - t1r; f1i = f1i * Two - t1i; f5r = f3r - f7r * w3i - f7i * w3r; f5i = f3i + f7r * w3r - f7i * w3i; f7r = f3r * Two - f5r; f7i = f3i * Two - f5i; *(p1r + pos) = t1r; *p3r = f5r; *(p1r + posi) = t1i; *(p3r + 1) = f5i; w3r = *(u2r+U2toU3); w3i = *(u2i-U2toU3); *p1r = f1r; *(p3r + pos) = f7r; *(p1r + 1) = f1i; *(p3r + posi) = f7i; p1r = pstrt + pinc; p3r = p2r + pinc; } NSameU /= 8; Uinc /= 8; Uinc2 /= 8; Uinc4 = Uinc * 4; NDiffU *= 8; pinc *= 8; pnext *= 8; pos *= 8; posi = pos + 1; } } void ifftrecurs(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt); void ifftrecurs(double *ioptr, int M, double *Utbl, int Ustride, int NDiffU, int StageCnt) { /* recursive bfstages calls to maximize on chip cache efficiency */ int i1; if (M <= MCACHE) ibfstages(ioptr, M, Utbl, Ustride, NDiffU, StageCnt); /* RADIX 8 Stages */ else { for (i1=0; i1<8; i1++) { ifftrecurs(&ioptr[i1*POW2(M-3)*2], M-3, Utbl, 8*Ustride, NDiffU, StageCnt-1); /* RADIX 8 Stages */ } ibfstages(ioptr, M, Utbl, Ustride, POW2(M-3), 1); /* RADIX 8 Stage */ } } void iffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow) { /* Compute in-place inverse complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array */ int StageCnt; int NDiffU; const double scale = 1.0/POW2(M); switch (M) { case 0: break; case 1: for (; Rows>0; Rows--) { ifft2pt(ioptr, scale); /* a 2 pt fft */ ioptr += 2*POW2(M); } break; case 2: for (; Rows>0; Rows--) { ifft4pt(ioptr, scale); /* a 4 pt fft */ ioptr += 2*POW2(M); } break; case 3: for (; Rows>0; Rows--) { ifft8pt(ioptr, scale); /* an 8 pt fft */ ioptr += 2*POW2(M); } break; default: for (; Rows>0; Rows--) { scbitrevR2(ioptr, M, BRLow, scale); /* bit reverse and first radix 2 stage */ StageCnt = (M-1) / 3; // number of radix 8 stages NDiffU = 2; // one radix 2 stage already complete if ( (M-1-(StageCnt * 3)) == 1 ) { ibfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */ NDiffU *= 2; } if ( (M-1-(StageCnt * 3)) == 2 ) { ibfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */ NDiffU *= 4; } if (M <= MCACHE) ibfstages(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */ else { ifftrecurs(ioptr, M, Utbl, 1, NDiffU, StageCnt); /* RADIX 8 Stages */ } ioptr += 2*POW2(M); } } } /************************************************ parts of rffts1 *************************************************/ static inline void rfft1pt(double *ioptr); static inline void rfft1pt(double *ioptr) { /*** RADIX 2 rfft ***/ double f0r, f0i; double t0r, t0i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; /* finish rfft */ t0r = f0r + f0i; t0i = f0r - f0i; /* store result */ ioptr[0] = t0r; ioptr[1] = t0i; } static inline void rfft2pt(double *ioptr); static inline void rfft2pt(double *ioptr) { /*** RADIX 4 rfft ***/ double f0r, f0i, f1r, f1i; double t0r, t0i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[2]; f1i = ioptr[3]; /* Butterflys */ /* f0 - - t0 f1 - 1 - f1 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f1i - f0i; /* finish rfft */ f0r = t0r + t0i; f0i = t0r - t0i; /* store result */ ioptr[0] = f0r; ioptr[1] = f0i; ioptr[2] = f1r; ioptr[3] = f1i; } static inline void rfft4pt(double *ioptr); static inline void rfft4pt(double *ioptr) { /*** RADIX 8 rfft ***/ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double t0r, t0i, t1r, t1i; double w0r = 1.0/MYROOT2; /* cos(pi/4) */ const double Two = 2.0; const double scale = 0.5; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[4]; f1i = ioptr[5]; f2r = ioptr[2]; f2i = ioptr[3]; f3r = ioptr[6]; f3i = ioptr[7]; /* Butterflys */ /* f0 - - t0 - - f0 f1 - 1 - f1 - - f1 f2 - - f2 - 1 - f2 f3 - 1 - t1 - -i - f3 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = f2i - t0i; // neg for rfft f3r = f1r - t1i; f3i = f1i + t1r; f1r = f1r + t1i; f1i = f1i - t1r; /* finish rfft */ t0r = f0r + f0i; /* compute Re(x[0]) */ t0i = f0r - f0i; /* compute Re(x[N/2]) */ t1r = f1r + f3r; t1i = f1i - f3i; f0r = f1i + f3i; f0i = f3r - f1r; f1r = t1r + w0r * f0r + w0r * f0i; f1i = t1i - w0r * f0r + w0r * f0i; f3r = Two * t1r - f1r; f3i = f1i - Two * t1i; /* store result */ ioptr[4] = f2r; ioptr[5] = f2i; ioptr[0] = t0r; ioptr[1] = t0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; } static inline void rfft8pt(double *ioptr); static inline void rfft8pt(double *ioptr) { /*** RADIX 16 rfft ***/ double w0r = 1.0/MYROOT2; /* cos(pi/4) */ double w1r = MYCOSPID8; /* cos(pi/8) */ double w1i = MYSINPID8; /* sin(pi/8) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; const double scale = 0.5; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; f1r = ioptr[8]; f1i = ioptr[9]; f2r = ioptr[4]; f2i = ioptr[5]; f3r = ioptr[12]; f3i = ioptr[13]; f4r = ioptr[2]; f4i = ioptr[3]; f5r = ioptr[10]; f5i = ioptr[11]; f6r = ioptr[6]; f6i = ioptr[7]; f7r = ioptr[14]; f7i = ioptr[15]; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1 - 1 - f1 - - f1 - - f1 f2 - - f2 - 1 - f2 - - f2 f3 - 1 - t1 - -i - f3 - - f3 f4 - - t0 - - f4 - 1 - t0 f5 - 1 - f5 - - f5 - w3 - f4 f6 - - f6 - 1 - f6 - -i - t1 f7 - 1 - t1 - -i - f7 - iw3- f6 */ t0r = f0r + f1r; t0i = f0i + f1i; f1r = f0r - f1r; f1i = f0i - f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r - t1i; f3i = f1i + t1r; f1r = f1r + t1i; f1i = f1i - t1r; t0r = f4r + f5r; t0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; t1r = f6r - f7r; t1i = f6i - f7i; f6r = f6r + f7r; f6i = f6i + f7i; f4r = t0r + f6r; f4i = t0i + f6i; f6r = t0r - f6r; f6i = t0i - f6i; f7r = f5r - t1i; f7i = f5i + t1r; f5r = f5r + t1i; f5i = f5i - t1r; t0r = f0r - f4r; t0i = f4i - f0i; // neg for rfft f0r = f0r + f4r; f0i = f0i + f4i; t1r = f2r - f6i; t1i = f2i + f6r; f2r = f2r + f6i; f2i = f2i - f6r; f4r = f1r - f5r * w0r - f5i * w0r; f4i = f1i + f5r * w0r - f5i * w0r; f1r = f1r * Two - f4r; f1i = f1i * Two - f4i; f6r = f3r + f7r * w0r - f7i * w0r; f6i = f3i + f7r * w0r + f7i * w0r; f3r = f3r * Two - f6r; f3i = f3i * Two - f6i; /* finish rfft */ f5r = f0r + f0i; /* compute Re(x[0]) */ f5i = f0r - f0i; /* compute Re(x[N/2]) */ f0r = f2r + t1r; f0i = f2i - t1i; f7r = f2i + t1i; f7i = t1r - f2r; f2r = f0r + w0r * f7r + w0r * f7i; f2i = f0i - w0r * f7r + w0r * f7i; t1r = Two * f0r - f2r; t1i = f2i - Two * f0i; f0r = f1r + f6r; f0i = f1i - f6i; f7r = f1i + f6i; f7i = f6r - f1r; f1r = f0r + w1r * f7r + w1i * f7i; f1i = f0i - w1i * f7r + w1r * f7i; f6r = Two * f0r - f1r; f6i = f1i - Two * f0i; f0r = f3r + f4r; f0i = f3i - f4i; f7r = f3i + f4i; f7i = f4r - f3r; f3r = f0r + w1i * f7r + w1r * f7i; f3i = f0i - w1r * f7r + w1i * f7i; f4r = Two * f0r - f3r; f4i = f3i - Two * f0i; /* store result */ ioptr[8] = t0r; ioptr[9] = t0i; ioptr[0] = f5r; ioptr[1] = f5i; ioptr[4] = scale*f2r; ioptr[5] = scale*f2i; ioptr[12] = scale*t1r; ioptr[13] = scale*t1i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; ioptr[10] = scale*f4r; ioptr[11] = scale*f4i; ioptr[14] = scale*f6r; ioptr[15] = scale*f6i; } static inline void frstage(double *ioptr, int M, double *Utbl); static inline void frstage(double *ioptr, int M, double *Utbl) { /* Finish RFFT */ int pos; int posi; int diffUcnt; double *p0r, *p1r; double *u0r, *u0i; double w0r, w0i; double f0r, f0i, f1r, f1i, f4r, f4i, f5r, f5i; double t0r, t0i, t1r, t1i; const double Two = 2.0; pos = POW2(M-1); posi = pos + 1; p0r = ioptr; p1r = ioptr + pos/2; u0r = Utbl + POW2(M-3); w0r = *u0r, f0r = *(p0r); f0i = *(p0r + 1); f4r = *(p0r + pos); f4i = *(p0r + posi); f1r = *(p1r); f1i = *(p1r + 1); f5r = *(p1r + pos); f5i = *(p1r + posi); t0r = Two * f0r + Two * f0i; /* compute Re(x[0]) */ t0i = Two * f0r - Two * f0i; /* compute Re(x[N/2]) */ t1r = f4r + f4r; t1i = -f4i - f4i; f0r = f1r + f5r; f0i = f1i - f5i; f4r = f1i + f5i; f4i = f5r - f1r; f1r = f0r + w0r * f4r + w0r * f4i; f1i = f0i - w0r * f4r + w0r * f4i; f5r = Two * f0r - f1r; f5i = f1i - Two * f0i; *(p0r) = t0r; *(p0r + 1) = t0i; *(p0r + pos) = t1r; *(p0r + posi) = t1i; *(p1r) = f1r; *(p1r + 1) = f1i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; u0r = Utbl + 1; u0i = Utbl + (POW2(M-2)-1); w0r = *u0r, w0i = *u0i; p0r = (ioptr + 2); p1r = (ioptr + (POW2(M-2)-1)*2); /* Butterflys */ /* f0 - t0 - - f0 f5 - t1 - w0 - f5 f1 - t0 - - f1 f4 - t1 -iw0 - f4 */ for (diffUcnt = POW2(M-3)-1; diffUcnt > 0 ; diffUcnt--) { f0r = *(p0r); f0i = *(p0r + 1); f5r = *(p1r + pos); f5i = *(p1r + posi); f1r = *(p1r); f1i = *(p1r + 1); f4r = *(p0r + pos); f4i = *(p0r + posi); t0r = f0r + f5r; t0i = f0i - f5i; t1r = f0i + f5i; t1i = f5r - f0r; f0r = t0r + w0r * t1r + w0i * t1i; f0i = t0i - w0i * t1r + w0r * t1i; f5r = Two * t0r - f0r; f5i = f0i - Two * t0i; t0r = f1r + f4r; t0i = f1i - f4i; t1r = f1i + f4i; t1i = f4r - f1r; f1r = t0r + w0i * t1r + w0r * t1i; f1i = t0i - w0r * t1r + w0i * t1i; f4r = Two * t0r - f1r; f4i = f1i - Two * t0i; *(p0r) = f0r; *(p0r + 1) = f0i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; w0r = *++u0r; w0i = *--u0i; *(p1r) = f1r; *(p1r + 1) = f1i; *(p0r + pos) = f4r; *(p0r + posi) = f4i; p0r += 2; p1r -= 2; } } void rffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow) { /* Compute in-place real fft on the rows of the input array */ /* The result is the complex spectra of the positive frequencies */ /* except the location for the first complex number contains the real */ /* values for DC and Nyquest */ /* INPUTS */ /* *ioptr = real input data array */ /* M = log2 of fft size */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = output data array in the following order */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ double scale; int StageCnt; int NDiffU; M=M-1; switch (M) { case -1: break; case 0: for (; Rows>0; Rows--) { rfft1pt(ioptr); /* a 2 pt fft */ ioptr += 2*POW2(M); } case 1: for (; Rows>0; Rows--) { rfft2pt(ioptr); /* a 4 pt fft */ ioptr += 2*POW2(M); } break; case 2: for (; Rows>0; Rows--) { rfft4pt(ioptr); /* an 8 pt fft */ ioptr += 2*POW2(M); } break; case 3: for (; Rows>0; Rows--) { rfft8pt(ioptr); /* a 16 pt fft */ ioptr += 2*POW2(M); } break; default: scale = 0.5; for (; Rows>0; Rows--) { scbitrevR2(ioptr, M, BRLow, scale); /* bit reverse and first radix 2 stage */ StageCnt = (M-1) / 3; // number of radix 8 stages NDiffU = 2; // one radix 2 stage already complete if ( (M-1-(StageCnt * 3)) == 1 ) { bfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */ NDiffU *= 2; } if ( (M-1-(StageCnt * 3)) == 2 ) { bfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */ NDiffU *= 4; } if (M <= MCACHE) { bfstages(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ frstage(ioptr, M+1, Utbl); } else { fftrecurs(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ frstage(ioptr, M+1, Utbl); } ioptr += 2*POW2(M); } } } /************************************************ parts of riffts1 *************************************************/ static inline void rifft1pt(double *ioptr, double scale); static inline void rifft1pt(double *ioptr, double scale) { /*** RADIX 2 rifft ***/ double f0r, f0i; double t0r, t0i; /* bit reversed load */ f0r = ioptr[0]; f0i = ioptr[1]; /* finish rfft */ t0r = f0r + f0i; t0i = f0r - f0i; /* store result */ ioptr[0] = scale*t0r; ioptr[1] = scale*t0i; } static inline void rifft2pt(double *ioptr, double scale); static inline void rifft2pt(double *ioptr, double scale) { /*** RADIX 4 rifft ***/ double f0r, f0i, f1r, f1i; double t0r, t0i; const double Two = 2.0; /* bit reversed load */ t0r = ioptr[0]; t0i = ioptr[1]; f1r = Two * ioptr[2]; f1i = Two * ioptr[3]; /* start rifft */ f0r = t0r + t0i; f0i = t0r - t0i; /* Butterflys */ /* f0 - - t0 f1 - 1 - f1 */ t0r = f0r + f1r; t0i = f0i - f1i; f1r = f0r - f1r; f1i = f0i + f1i; /* store result */ ioptr[0] = scale*t0r; ioptr[1] = scale*t0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; } static inline void rifft4pt(double *ioptr, double scale); static inline void rifft4pt(double *ioptr, double scale) { /*** RADIX 8 rifft ***/ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double t0r, t0i, t1r, t1i; double w0r = 1.0/MYROOT2; /* cos(pi/4) */ const double Two = 2.0; /* bit reversed load */ t0r = ioptr[0]; t0i = ioptr[1]; f2r = ioptr[2]; f2i = ioptr[3]; f1r = Two * ioptr[4]; f1i = Two * ioptr[5]; f3r = ioptr[6]; f3i = ioptr[7]; /* start rfft */ f0r = t0r + t0i; /* compute Re(x[0]) */ f0i = t0r - t0i; /* compute Re(x[N/2]) */ t1r = f2r + f3r; t1i = f2i - f3i; t0r = f2r - f3r; t0i = f2i + f3i; f2r = t1r - w0r * t0r - w0r * t0i; f2i = t1i + w0r * t0r - w0r * t0i; f3r = Two * t1r - f2r; f3i = f2i - Two * t1i; /* Butterflys */ /* f0 - - t0 - - f0 f1 - 1 - f1 - - f1 f2 - - f2 - 1 - f2 f3 - 1 - t1 - i - f3 */ t0r = f0r + f1r; t0i = f0i - f1i; f1r = f0r - f1r; f1i = f0i + f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r + t1i; f3i = f1i - t1r; f1r = f1r - t1i; f1i = f1i + t1r; /* store result */ ioptr[0] = scale*f0r; ioptr[1] = scale*f0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[4] = scale*f2r; ioptr[5] = scale*f2i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; } static inline void rifft8pt(double *ioptr, double scale); static inline void rifft8pt(double *ioptr, double scale) { /*** RADIX 16 rifft ***/ double w0r = 1.0/MYROOT2; /* cos(pi/4) */ double w1r = MYCOSPID8; /* cos(pi/8) */ double w1i = MYSINPID8; /* sin(pi/8) */ double f0r, f0i, f1r, f1i, f2r, f2i, f3r, f3i; double f4r, f4i, f5r, f5i, f6r, f6i, f7r, f7i; double t0r, t0i, t1r, t1i; const double Two = 2.0; /* bit reversed load */ t0r = ioptr[0]; t0i = ioptr[1]; f4r = ioptr[2]; f4i = ioptr[3]; f2r = ioptr[4]; f2i = ioptr[5]; f6r = ioptr[6]; f6i = ioptr[7]; f1r = Two * ioptr[8]; f1i = Two * ioptr[9]; f5r = ioptr[10]; f5i = ioptr[11]; f3r = ioptr[12]; f3i = ioptr[13]; f7r = ioptr[14]; f7i = ioptr[15]; /* start rfft */ f0r = t0r + t0i; /* compute Re(x[0]) */ f0i = t0r - t0i; /* compute Re(x[N/2]) */ t0r = f2r + f3r; t0i = f2i - f3i; t1r = f2r - f3r; t1i = f2i + f3i; f2r = t0r - w0r * t1r - w0r * t1i; f2i = t0i + w0r * t1r - w0r * t1i; f3r = Two * t0r - f2r; f3i = f2i - Two * t0i; t0r = f4r + f7r; t0i = f4i - f7i; t1r = f4r - f7r; t1i = f4i + f7i; f4r = t0r - w1i * t1r - w1r * t1i; f4i = t0i + w1r * t1r - w1i * t1i; f7r = Two * t0r - f4r; f7i = f4i - Two * t0i; t0r = f6r + f5r; t0i = f6i - f5i; t1r = f6r - f5r; t1i = f6i + f5i; f6r = t0r - w1r * t1r - w1i * t1i; f6i = t0i + w1i * t1r - w1r * t1i; f5r = Two * t0r - f6r; f5i = f6i - Two * t0i; /* Butterflys */ /* f0 - - t0 - - f0 - - f0 f1* - 1 - f1 - - f1 - - f1 f2 - - f2 - 1 - f2 - - f2 f3 - 1 - t1 - i - f3 - - f3 f4 - - t0 - - f4 - 1 - t0 f5 - 1 - f5 - - f5 - w3 - f4 f6 - - f6 - 1 - f6 - i - t1 f7 - 1 - t1 - i - f7 - iw3- f6 */ t0r = f0r + f1r; t0i = f0i - f1i; f1r = f0r - f1r; f1i = f0i + f1i; t1r = f2r - f3r; t1i = f2i - f3i; f2r = f2r + f3r; f2i = f2i + f3i; f0r = t0r + f2r; f0i = t0i + f2i; f2r = t0r - f2r; f2i = t0i - f2i; f3r = f1r + t1i; f3i = f1i - t1r; f1r = f1r - t1i; f1i = f1i + t1r; t0r = f4r + f5r; t0i = f4i + f5i; f5r = f4r - f5r; f5i = f4i - f5i; t1r = f6r - f7r; t1i = f6i - f7i; f6r = f6r + f7r; f6i = f6i + f7i; f4r = t0r + f6r; f4i = t0i + f6i; f6r = t0r - f6r; f6i = t0i - f6i; f7r = f5r + t1i; f7i = f5i - t1r; f5r = f5r - t1i; f5i = f5i + t1r; t0r = f0r - f4r; t0i = f0i - f4i; f0r = f0r + f4r; f0i = f0i + f4i; t1r = f2r + f6i; t1i = f2i - f6r; f2r = f2r - f6i; f2i = f2i + f6r; f4r = f1r - f5r * w0r + f5i * w0r; f4i = f1i - f5r * w0r - f5i * w0r; f1r = f1r * Two - f4r; f1i = f1i * Two - f4i; f6r = f3r + f7r * w0r + f7i * w0r; f6i = f3i - f7r * w0r + f7i * w0r; f3r = f3r * Two - f6r; f3i = f3i * Two - f6i; /* store result */ ioptr[0] = scale*f0r; ioptr[1] = scale*f0i; ioptr[2] = scale*f1r; ioptr[3] = scale*f1i; ioptr[4] = scale*f2r; ioptr[5] = scale*f2i; ioptr[6] = scale*f3r; ioptr[7] = scale*f3i; ioptr[8] = scale*t0r; ioptr[9] = scale*t0i; ioptr[10] = scale*f4r; ioptr[11] = scale*f4i; ioptr[12] = scale*t1r; ioptr[13] = scale*t1i; ioptr[14] = scale*f6r; ioptr[15] = scale*f6i; } static inline void ifrstage(double *ioptr, int M, double *Utbl); static inline void ifrstage(double *ioptr, int M, double *Utbl) { /* Start RIFFT */ int pos; int posi; int diffUcnt; double *p0r, *p1r; double *u0r, *u0i; double w0r, w0i; double f0r, f0i, f1r, f1i, f4r, f4i, f5r, f5i; double t0r, t0i, t1r, t1i; const double Two = 2.0; pos = POW2(M-1); posi = pos + 1; p0r = ioptr; p1r = ioptr + pos/2; u0r = Utbl + POW2(M-3); w0r = *u0r, f0r = *(p0r); f0i = *(p0r + 1); f4r = *(p0r + pos); f4i = *(p0r + posi); f1r = *(p1r); f1i = *(p1r + 1); f5r = *(p1r + pos); f5i = *(p1r + posi); t0r = f0r + f0i; t0i = f0r - f0i; t1r = f4r + f4r; t1i = -f4i - f4i; f0r = f1r + f5r; f0i = f1i - f5i; f4r = f1r - f5r; f4i = f1i + f5i; f1r = f0r - w0r * f4r - w0r * f4i; f1i = f0i + w0r * f4r - w0r * f4i; f5r = Two * f0r - f1r; f5i = f1i - Two * f0i; *(p0r) = t0r; *(p0r + 1) = t0i; *(p0r + pos) = t1r; *(p0r + posi) = t1i; *(p1r) = f1r; *(p1r + 1) = f1i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; u0r = Utbl + 1; u0i = Utbl + (POW2(M-2)-1); w0r = *u0r, w0i = *u0i; p0r = (ioptr + 2); p1r = (ioptr + (POW2(M-2)-1)*2); /* Butterflys */ /* f0 - t0 - f0 f1 - t1 -w0- f1 f2 - t0 - f2 f3 - t1 -iw0- f3 */ for (diffUcnt = POW2(M-3)-1; diffUcnt > 0 ; diffUcnt--) { f0r = *(p0r); f0i = *(p0r + 1); f5r = *(p1r + pos); f5i = *(p1r + posi); f1r = *(p1r); f1i = *(p1r + 1); f4r = *(p0r + pos); f4i = *(p0r + posi); t0r = f0r + f5r; t0i = f0i - f5i; t1r = f0r - f5r; t1i = f0i + f5i; f0r = t0r - w0i * t1r - w0r * t1i; f0i = t0i + w0r * t1r - w0i * t1i; f5r = Two * t0r - f0r; f5i = f0i - Two * t0i; t0r = f1r + f4r; t0i = f1i - f4i; t1r = f1r - f4r; t1i = f1i + f4i; f1r = t0r - w0r * t1r - w0i * t1i; f1i = t0i + w0i * t1r - w0r * t1i; f4r = Two * t0r - f1r; f4i = f1i - Two * t0i; *(p0r) = f0r; *(p0r + 1) = f0i; *(p1r + pos) = f5r; *(p1r + posi) = f5i; w0r = *++u0r; w0i = *--u0i; *(p1r) = f1r; *(p1r + 1) = f1i; *(p0r + pos) = f4r; *(p0r + posi) = f4i; p0r += 2; p1r -= 2; } } void riffts1(double *ioptr, int M, int Rows, double *Utbl, short *BRLow) { /* Compute in-place real ifft on the rows of the input array */ /* data order as from rffts1 */ /* INPUTS */ /* *ioptr = input data array in the following order */ /* M = log2 of fft size */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ /* Rows = number of rows in ioptr array (use Rows of 1 if ioptr is a 1 dimensional array) */ /* *Utbl = cosine table */ /* *BRLow = bit reversed counter table */ /* OUTPUTS */ /* *ioptr = real output data array */ double scale; int StageCnt; int NDiffU; scale = 1.0/POW2(M); M=M-1; switch (M) { case -1: break; case 0: for (; Rows>0; Rows--) { rifft1pt(ioptr, scale); /* a 2 pt fft */ ioptr += 2*POW2(M); } case 1: for (; Rows>0; Rows--) { rifft2pt(ioptr, scale); /* a 4 pt fft */ ioptr += 2*POW2(M); } break; case 2: for (; Rows>0; Rows--) { rifft4pt(ioptr, scale); /* an 8 pt fft */ ioptr += 2*POW2(M); } break; case 3: for (; Rows>0; Rows--) { rifft8pt(ioptr, scale); /* a 16 pt fft */ ioptr += 2*POW2(M); } break; default: for (; Rows>0; Rows--) { ifrstage(ioptr, M+1, Utbl); scbitrevR2(ioptr, M, BRLow, scale); /* bit reverse and first radix 2 stage */ StageCnt = (M-1) / 3; // number of radix 8 stages NDiffU = 2; // one radix 2 stage already complete if ( (M-1-(StageCnt * 3)) == 1 ) { ibfR2(ioptr, M, NDiffU); /* 1 radix 2 stage */ NDiffU *= 2; } if ( (M-1-(StageCnt * 3)) == 2 ) { ibfR4(ioptr, M, NDiffU); /* 1 radix 4 stage */ NDiffU *= 4; } if (M <= MCACHE) { ibfstages(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ } else { ifftrecurs(ioptr, M, Utbl, 2, NDiffU, StageCnt); /* RADIX 8 Stages */ } ioptr += 2*POW2(M); } } } ngspice-26/src/maths/fft/matlib.h0000644000265600020320000000240512264261473016335 0ustar andreasadmin/* a few routines from a vector/matrix library */ void xpose(double *indata, long iRsiz, double *outdata, long oRsiz, long Nrows, long Ncols); /* not in-place matrix transpose */ /* INPUTS */ /* *indata = input data array */ /* iRsiz = offset to between rows of input data array */ /* oRsiz = offset to between rows of output data array */ /* Nrows = number of rows in input data array */ /* Ncols = number of columns in input data array */ /* OUTPUTS */ /* *outdata = output data array */ void cxpose(double *indata, long iRsiz, double *outdata, long oRsiz, long Nrows, long Ncols); /* not in-place complex matrix transpose */ /* INPUTS */ /* *indata = input data array */ /* iRsiz = offset to between rows of input data array */ /* oRsiz = offset to between rows of output data array */ /* Nrows = number of rows in input data array */ /* Ncols = number of columns in input data array */ /* OUTPUTS */ /* *outdata = output data array */ void cvprod(double *a, double *b, double *out, long N); /* complex vector product, can be in-place */ /* product of complex vector *a times complex vector *b */ /* INPUTS */ /* N vector length */ /* *a complex vector length N complex numbers */ /* *b complex vector length N complex numbers */ /* OUTPUTS */ /* *out complex vector length N */ ngspice-26/src/maths/fft/Read-Me0000644000265600020320000000546312264261473016060 0ustar andreasadminThis directory contains a public domain FFT library which was optimized for speed on RISC processors such as the PowerPC. All ffts use single precision floats, for double precision just use a global search and replace to change float to double in all source files. Codewarrier Pro 1.0 project files are also supplied. ** Warning ** Perform rigorous testing to your own standards before using this code. (John Green) green_jt@vsdec.npt.nuwc.navy.mil files: fftTiming Application to time complex ffts rfftTiming Application to time real ffts // Directory: fft libraries files: fftext.c Library of in-place fast fourier transforms. Contains forward and inverse complex and real transforms. The real fft's expect the frequency domain data to have the real part of the fsamp/2 bin (which has a 0 imaginary part) to be stored in the location for the imaginary part of the DC bin (the DC bin of real data is also strictly real.) You must first call an initialization routine fftInit before calling the fft computation routines ffts, iffts, rffts and riffts. The init routines malloc the memory to store the cosine and bit reversed counter tables as well as initializing their values. fftlib.c Lower level library of in-place fast fourier transforms. Same as fftext.c but you need to manage the mallocs for the cosine and bit reversed tables yourself. fft2d.c Library of 2d and 3d complex and 2d real in-place fast fourier transforms. The init routine fft2dInit must be called before using the 2d routines and fft3dInit must be called before using the 3d routines. These init routines will also call the appropriate 1d init routines in fftext.c matlib.c Matrix transpose routines used by fft2d.c and complex vector multiply for forming the product of two spectra. dxpose.c Double precision matrix transpose for quick single precision complex transposing // Directory: timing code This directory contains the source to fftTiming and rfftTiming // Directory: Numerical Recipes testing This directory contains files used to test the various fft routines using the Numerical Recipes in C routines as a baseline. These routines can be purchased in PeeCee (after expanding you can move them to a Mac) format from: http://cfata2.harvard.edu/numerical-recipes/ Unfortunately Numerical Recipes defines its forward and inverse fft's backwards. For complex fft's I just use their inverse fft as a forward one, but for real ffts their forward fft followed by my inverse fft reverses the data. They also have ugly matrix and tensor data types and start their indices with one, Fortran style, but these are minor annoyances. // Directory: Matlab testing This directory contains files to test fast 1d and 2d convolution with Matlab used to verify the results. An example of using Matlab to test the fft library routines is also given for the 2d real fft. ngspice-26/src/maths/fft/Makefile.am0000644000265600020320000000050712264261473016751 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmathfft.la libmathfft_la_SOURCES = \ fftext.c \ fftlib.c \ fftlib.h \ matlib.c \ matlib.h EXTRA_DIST = NOTE Read-Me AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/fft/Makefile.in0000644000265600020320000004015412264261535016763 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/fft DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmathfft_la_LIBADD = am_libmathfft_la_OBJECTS = fftext.lo fftlib.lo matlib.lo libmathfft_la_OBJECTS = $(am_libmathfft_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmathfft_la_SOURCES) DIST_SOURCES = $(libmathfft_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmathfft.la libmathfft_la_SOURCES = \ fftext.c \ fftlib.c \ fftlib.h \ matlib.c \ matlib.h EXTRA_DIST = NOTE Read-Me AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/fft/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/fft/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmathfft.la: $(libmathfft_la_OBJECTS) $(libmathfft_la_DEPENDENCIES) $(EXTRA_libmathfft_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmathfft_la_OBJECTS) $(libmathfft_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftlib.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/matlib.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/fft/NOTE0000644000265600020320000000344412264261473015410 0ustar andreasadminSubject: FFT for RISC 2.0 To: macgifts@sumex-aim.stanford.edu Enclosure: FFTs-for-RISC-2.sit Enclosed is a stuffit archive of version 2.0 of my 'C' source code fft library. Very-Fast Fourier Transform routines. Routines are provided for real and complex forward and inverse 1d and 2d fourier transforms and 3d complex forward and inverse ffts. I coded these to optimize execution speed on Risc processors like the PowerPC. All fft sizes must still be a power of two. Test programs based on the Numerical Recipes in C routines are provided. Also included are some simple applications with source code which time the FFTs. See the enclosed read me file for more information. Revision version 2.0: Rewrote code to rely more on compiler optimization (and be less ugly.) Removed restrictions on too small or too large ffts. Provided a library extension that manages memory for cosine and bit reversed counter tables. Added 2d and 3d complex and 2d real ffts. Speeded routines for data too large to fit in primary cache. Changed most testing from Matlab to Numerical Recipes based (because its cheaper.) Changed call parameters (watch out.) Revision version 1.21: line 126 of rfftTest.c corrected. Revisions version 1.2: I now store the Nyquest point of the real transform where the 0 for the DC term's imaginary part used to be. !! WATCH OUT FOR THIS IF YOU USE rfft !! Added the real inverse Fourier transform. Revisions version 1.1: Re-arranged to put fft routines in a shared library and changed source file name to fftlib.c. Removed some ugly optimizations that are no longer needed for CodeWarrier. This code is public domain, do anything you want to with it. [Moderators- This file should replace ffts-for-risc-121-c.hqx and can be included on any CD] ngspice-26/src/maths/ni/0000755000265600020320000000000012264261703014536 5ustar andreasadminngspice-26/src/maths/ni/niconv.c0000644000265600020320000000450412264261473016205 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * NIconvTest(ckt) * perform the convergence test - returns 1 if any of the * values in the old and new arrays have changed by more * than absTol + relTol*(max(old,new)), otherwise returns 0 */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" int NIconvTest(CKTcircuit *ckt) { int i; /* generic loop variable */ int size; /* size of the matrix */ CKTnode *node; /* current matrix entry */ double old; double new; double tol; node = ckt->CKTnodes; size = SMPmatSize(ckt->CKTmatrix); #ifdef STEPDEBUG for (i=1;i<=size;i++) { new = ckt->CKTrhs [i] ; old = ckt->CKTrhsOld [i] ; printf("chk for convergence: %s new: %g old: %g\n",CKTnodName(ckt,i),new,old); } #endif /* STEPDEBUG */ for (i=1;i<=size;i++) { node = node->next; new = ckt->CKTrhs [i] ; old = ckt->CKTrhsOld [i] ; if(node->type == SP_VOLTAGE) { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTvoltTol; if (fabs(new-old) >tol ) { #ifdef STEPDEBUG printf(" non-convergence at node (type=3) %s (fabs(new-old)>tol --> fabs(%g-%g)>%g)\n",CKTnodName(ckt,i),new,old,tol); printf(" reltol: %g voltTol: %g (tol=reltol*(MAX(fabs(old),fabs(new))) + voltTol)\n",ckt->CKTreltol,ckt->CKTvoltTol); #endif /* STEPDEBUG */ ckt->CKTtroubleNode = i; ckt->CKTtroubleElt = NULL; return(1); } } else { tol = ckt->CKTreltol * (MAX(fabs(old),fabs(new))) + ckt->CKTabstol; if (fabs(new-old) >tol ) { #ifdef STEPDEBUG printf(" non-convergence at node (type=%d) %s (fabs(new-old)>tol --> fabs(%g-%g)>%g)\n",node->type,CKTnodName(ckt,i),new,old,tol); printf(" reltol: %g abstol: %g (tol=reltol*(MAX(fabs(old),fabs(new))) + abstol)\n",ckt->CKTreltol,ckt->CKTabstol); #endif /* STEPDEBUG */ ckt->CKTtroubleNode = i; ckt->CKTtroubleElt = NULL; return(1); } } } #ifdef NEWCONV i = CKTconvTest(ckt); if (i) ckt->CKTtroubleNode = 0; return(i); #else /* NEWCONV */ return(0); #endif /* NEWCONV */ } ngspice-26/src/maths/ni/nireinit.c0000644000265600020320000000222512264261473016530 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* NIreinit(ckt) * Perform reinitialization necessary for the numerical iteration * package - the matrix has now been fully accessed once, so we know * how big it is, so allocate RHS vector */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/sperror.h" #define CKALLOC(ptr,size,type) if(( ckt->ptr =\ TMALLOC(type, size)) == NULL) return(E_NOMEM); int NIreinit( CKTcircuit *ckt) { int size; #ifdef PREDICTOR int i; #endif size = SMPmatSize(ckt->CKTmatrix); CKALLOC(CKTrhs,size+1,double); CKALLOC(CKTrhsOld,size+1,double); CKALLOC(CKTrhsSpare,size+1,double); CKALLOC(CKTirhs,size+1,double); CKALLOC(CKTirhsOld,size+1,double); CKALLOC(CKTirhsSpare,size+1,double); #ifdef PREDICTOR CKALLOC(CKTpred,size+1,double); for( i=0;i<8;i++) { CKALLOC(CKTsols[i],size+1,double); } #endif /* PREDICTOR */ ckt->CKTniState = NISHOULDREORDER | NIACSHOULDREORDER | NIPZSHOULDREORDER; return(0); } ngspice-26/src/maths/ni/niditer.c0000644000265600020320000000467712264261473016362 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S. Roychowdhury **********/ /* * NIdIter(ckt) * * This is absolutely the same as NIacIter, except that the RHS * vector is stored before acLoad so that it is not lost. Moreover, * acLoading is done only if reordering is necessary * */ #include "ngspice/ngspice.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" int NIdIter(CKTcircuit *ckt) { int error; int ignore; double *temp; ckt->CKTnoncon = 0; goto skip; retry: ckt->CKTnoncon=0; temp = ckt->CKTrhs; ckt->CKTrhs = ckt->CKTrhsSpare; ckt->CKTrhsSpare = temp; temp = ckt->CKTirhs; ckt->CKTirhs = ckt->CKTirhsSpare; ckt->CKTirhsSpare = temp; error = CKTacLoad(ckt); if(error) return(error); temp = ckt->CKTrhs; ckt->CKTrhs = ckt->CKTrhsSpare; ckt->CKTrhsSpare = temp; temp = ckt->CKTirhs; ckt->CKTirhs = ckt->CKTirhsSpare; ckt->CKTirhsSpare = temp; skip: if(ckt->CKTniState & NIACSHOULDREORDER) { error = SMPcReorder(ckt->CKTmatrix,ckt->CKTpivotAbsTol, ckt->CKTpivotRelTol,&ignore); ckt->CKTniState &= ~NIACSHOULDREORDER; if(error != 0) { /* either singular equations or no memory, in either case, * let caller handle problem */ return(error); } } else { error = SMPcLUfac(ckt->CKTmatrix,ckt->CKTpivotAbsTol); if(error != 0) { if(error == E_SINGULAR) { /* the problem is that the matrix can't be solved with the * current LU factorization. Maybe if we reload and * try to reorder again it will help... */ ckt->CKTniState |= NIACSHOULDREORDER; goto retry; } return(error); /* can't handle E_BADMATRIX, so let caller */ } } SMPcSolve(ckt->CKTmatrix,ckt->CKTrhs, ckt->CKTirhs, ckt->CKTrhsSpare, ckt->CKTirhsSpare); *ckt->CKTrhs = 0; *ckt->CKTrhsSpare = 0; *ckt->CKTrhsOld = 0; *ckt->CKTirhs = 0; *ckt->CKTirhsSpare = 0; *ckt->CKTirhsOld = 0; temp = ckt->CKTirhsOld; ckt->CKTirhsOld = ckt->CKTirhs; ckt->CKTirhs = temp; temp = ckt->CKTrhsOld; ckt->CKTrhsOld = ckt->CKTrhs; ckt->CKTrhs = temp; return(OK); } ngspice-26/src/maths/ni/nisenre.c0000644000265600020320000000425112264261473016353 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* NIsenReinit(ckt) * Perform reinitialization necessary for the numerical iteration * package - the matrix has now been fully accessed once, so we know * how big it is, so allocate RHS vector */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/sperror.h" #define CKALLOC(ptr,size,type) if(( ckt->ptr =\ TMALLOC(type, size)) == NULL) return(E_NOMEM); int NIsenReinit(CKTcircuit *ckt) { int size; int senparms; int i; #ifdef SENSDEBUG printf("NIsenReinit \n"); printf("senflag = %d\n",ckt->CKTsenInfo->SENinitflag); if(ckt->CKTniState & NIUNINITIALIZED) { printf("circuit uninitialized\n"); } else{ printf("circuit already initialized\n"); } #endif /* SENSDEBUG */ size = SMPmatSize(ckt->CKTmatrix); if(ckt->CKTsenInfo->SENinitflag){ if(!(ckt->CKTniState & NIUNINITIALIZED)) { #ifdef SENSDEBUG printf("NIsenReinit1\n"); #endif /* SENSDEBUG */ if(ckt->CKTrhsOp) FREE(ckt->CKTrhsOp); if(ckt->CKTsenRhs) FREE(ckt->CKTsenRhs); if(ckt->CKTseniRhs) FREE(ckt->CKTseniRhs); } senparms = ckt->CKTsenInfo->SENparms; #ifdef SENSDEBUG printf("NIsenReinit2\n"); #endif /* SENSDEBUG */ /* CKALLOC(CKTsenInfo->SEN_parmVal,senparms+1,double); */ ckt->CKTsenInfo->SENsize = size; CKALLOC(CKTrhsOp,size+1,double); CKALLOC(CKTsenRhs,size+1,double); CKALLOC(CKTseniRhs,size+1,double); CKALLOC(CKTsenInfo->SEN_Sap,size+1,double*); CKALLOC(CKTsenInfo->SEN_RHS,size+1,double*); CKALLOC(CKTsenInfo->SEN_iRHS,size+1,double*); for(i=0;i<=(size);i++){ CKALLOC(CKTsenInfo->SEN_Sap[i],senparms+1,double); CKALLOC(CKTsenInfo->SEN_RHS[i],senparms+1,double); CKALLOC(CKTsenInfo->SEN_iRHS[i],senparms+1,double); } #ifdef SENSDEBUG printf("NIsenReinit3\n"); #endif /* SENSDEBUG */ ckt->CKTsenInfo->SENinitflag = OFF; } return(0); } ngspice-26/src/maths/ni/niniter.c0000644000265600020320000000173412264261473016363 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" /* * NInzIter (ckt, posDrive, negDrive) * * This routine solves the adjoint system. It assumes that the matrix has * already been loaded by a call to NIacIter, so it only alters the right * hand side vector. The unit-valued current excitation is applied * between nodes posDrive and negDrive. */ void NInzIter(CKTcircuit *ckt, int posDrive, int negDrive) { int i; /* clear out the right hand side vector */ for (i = 0; i <= SMPmatSize(ckt->CKTmatrix); i++) { ckt->CKTrhs [i] = 0.0; ckt->CKTirhs [i] = 0.0; } ckt->CKTrhs [posDrive] = 1.0; /* apply unit current excitation */ ckt->CKTrhs [negDrive] = -1.0; SMPcaSolve(ckt->CKTmatrix, ckt->CKTrhs, ckt->CKTirhs, ckt->CKTrhsSpare, ckt->CKTirhsSpare); *ckt->CKTrhs = 0.0; *ckt->CKTirhs = 0.0; } ngspice-26/src/maths/ni/niinteg.c0000644000265600020320000000456112264261473016351 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* NIintegrate(ckt,geq,ceq,cap,qcap) * integrate the specified capacitor - method and order in the * ckt structure, ccap follows qcap. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #define ccap qcap+1 int NIintegrate(CKTcircuit *ckt, double *geq, double *ceq, double cap, int qcap) { static char *ordmsg = "Illegal integration order"; static char *methodmsg = "Unknown integration method"; switch(ckt->CKTintegrateMethod) { case TRAPEZOIDAL: switch(ckt->CKTorder) { case 1: ckt->CKTstate0[ccap] = ckt->CKTag[0] * ckt->CKTstate0[qcap] + ckt->CKTag[1] * ckt->CKTstate1[qcap]; break; case 2: ckt->CKTstate0[ccap] = - ckt->CKTstate1[ccap] * ckt->CKTag[1] + ckt->CKTag[0] * ( ckt->CKTstate0[qcap] - ckt->CKTstate1[qcap] ); break; default: errMsg = TMALLOC(char, strlen(ordmsg) + 1); strcpy(errMsg,ordmsg); return(E_ORDER); } break; case GEAR: ckt->CKTstate0[ccap]=0; switch(ckt->CKTorder) { case 6: ckt->CKTstate0[ccap] += ckt->CKTag[6]* ckt->CKTstate6[qcap]; /* fall through */ case 5: ckt->CKTstate0[ccap] += ckt->CKTag[5]* ckt->CKTstate5[qcap]; /* fall through */ case 4: ckt->CKTstate0[ccap] += ckt->CKTag[4]* ckt->CKTstate4[qcap]; /* fall through */ case 3: ckt->CKTstate0[ccap] += ckt->CKTag[3]* ckt->CKTstate3[qcap]; /* fall through */ case 2: ckt->CKTstate0[ccap] += ckt->CKTag[2]* ckt->CKTstate2[qcap]; /* fall through */ case 1: ckt->CKTstate0[ccap] += ckt->CKTag[1]* ckt->CKTstate1[qcap]; ckt->CKTstate0[ccap] += ckt->CKTag[0]* ckt->CKTstate0[qcap]; break; default: return(E_ORDER); } break; default: errMsg = TMALLOC(char, strlen(methodmsg) + 1); strcpy(errMsg,methodmsg); return(E_METHOD); } *ceq = ckt->CKTstate0[ccap] - ckt->CKTag[0] * ckt->CKTstate0[qcap]; *geq = ckt->CKTag[0] * cap; return(OK); } ngspice-26/src/maths/ni/niiter.c0000644000265600020320000002402112264261473016177 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2001 AlansFixes **********/ /* * NIiter(ckt,maxIter) * * This subroutine performs the actual numerical iteration. * It uses the sparse matrix stored in the circuit struct * along with the matrix loading program, the load data, the * convergence test function, and the convergence parameters */ #include "ngspice/ngspice.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/sperror.h" /* NIiter() - return value is non-zero for convergence failure */ int NIiter(CKTcircuit *ckt, int maxIter) { int iterno; int ipass; int error; int i,j; /* temporaries for finding error location */ char *message; /* temporary message buffer */ double *temp; double startTime; static char *msg = "Too many iterations without convergence"; CKTnode *node; /* current matrix entry */ double diff, maxdiff, damp_factor, *OldCKTstate0=NULL; if ( maxIter < 100 ) maxIter = 100; /* some convergence issues that get resolved by increasing max iter */ iterno=0; ipass=0; if( (ckt->CKTmode & MODETRANOP) && (ckt->CKTmode & MODEUIC)) { temp = ckt->CKTrhsOld; ckt->CKTrhsOld = ckt->CKTrhs; ckt->CKTrhs = temp; error = CKTload(ckt); if(error) { return(error); } return(OK); } #ifdef WANT_SENSE2 if(ckt->CKTsenInfo) { error = NIsenReinit(ckt); if(error) return(error); } #endif if(ckt->CKTniState & NIUNINITIALIZED) { error = NIreinit(ckt); if(error) { #ifdef STEPDEBUG printf("re-init returned error \n"); #endif return(error); } } /* OldCKTstate0=TMALLOC(double, ckt->CKTnumStates + 1); */ for(;;) { ckt->CKTnoncon=0; #ifdef NEWPRED if(!(ckt->CKTmode & MODEINITPRED)) { #else /* NEWPRED */ if(1) { /* } */ #endif /* NEWPRED */ error = CKTload(ckt); /*printf("loaded, noncon is %d\n",ckt->CKTnoncon);*/ /*fflush(stdout);*/ iterno++; if(error) { ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG printf("load returned error \n"); #endif FREE(OldCKTstate0); return(error); } /*printf("after loading, before solving\n");*/ /*CKTdump(ckt);*/ if(!(ckt->CKTniState & NIDIDPREORDER)) { error = SMPpreOrder(ckt->CKTmatrix); if(error) { ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG printf("pre-order returned error \n"); #endif FREE(OldCKTstate0); return(error); /* badly formed matrix */ } ckt->CKTniState |= NIDIDPREORDER; } if( (ckt->CKTmode & MODEINITJCT) || ( (ckt->CKTmode & MODEINITTRAN) && (iterno==1))) { ckt->CKTniState |= NISHOULDREORDER; } if(ckt->CKTniState & NISHOULDREORDER) { startTime = SPfrontEnd->IFseconds(); error = SMPreorder(ckt->CKTmatrix,ckt->CKTpivotAbsTol, ckt->CKTpivotRelTol,ckt->CKTdiagGmin); ckt->CKTstat->STATreorderTime += SPfrontEnd->IFseconds() - startTime; if(error) { /* new feature - we can now find out something about what is * wrong - so we ask for the troublesome entry */ SMPgetError(ckt->CKTmatrix,&i,&j); message = TMALLOC(char, 1000); /* should be enough */ (void)sprintf(message, "singular matrix: check nodes %s and %s\n", NODENAME(ckt,i),NODENAME(ckt,j)); SPfrontEnd->IFerror (ERR_WARNING, message, NULL); FREE(message); ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG printf("reorder returned error \n"); #endif FREE(OldCKTstate0); return(error); /* can't handle these errors - pass up! */ } ckt->CKTniState &= ~NISHOULDREORDER; } else { startTime = SPfrontEnd->IFseconds(); error=SMPluFac(ckt->CKTmatrix,ckt->CKTpivotAbsTol, ckt->CKTdiagGmin); ckt->CKTstat->STATdecompTime += SPfrontEnd->IFseconds() - startTime; if(error) { if( error == E_SINGULAR ) { ckt->CKTniState |= NISHOULDREORDER; DEBUGMSG(" forced reordering....\n"); continue; } /*CKTload(ckt);*/ /*SMPprint(ckt->CKTmatrix,stdout);*/ /* seems to be singular - pass the bad news up */ ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG printf("lufac returned error \n"); #endif FREE(OldCKTstate0); return(error); } } /*moved it to here as if xspice is included then CKTload changes CKTnumStates the first time it is run */ if(!OldCKTstate0) OldCKTstate0=TMALLOC(double, ckt->CKTnumStates + 1); for(i=0; iCKTnumStates; i++) { OldCKTstate0[i] = ckt->CKTstate0[i]; } startTime = SPfrontEnd->IFseconds(); SMPsolve(ckt->CKTmatrix,ckt->CKTrhs,ckt->CKTrhsSpare); ckt->CKTstat->STATsolveTime += SPfrontEnd->IFseconds() - startTime; #ifdef STEPDEBUG /*XXXX*/ if (*ckt->CKTrhs != 0.0) printf("NIiter: CKTrhs[0] = %g\n", *ckt->CKTrhs); if (*ckt->CKTrhsSpare != 0.0) printf("NIiter: CKTrhsSpare[0] = %g\n", *ckt->CKTrhsSpare); if (*ckt->CKTrhsOld != 0.0) printf("NIiter: CKTrhsOld[0] = %g\n", *ckt->CKTrhsOld); /*XXXX*/ #endif *ckt->CKTrhs = 0; *ckt->CKTrhsSpare = 0; *ckt->CKTrhsOld = 0; if(iterno > maxIter) { /*fprintf(stderr,"too many iterations without convergence: %d iter's (max iter == %d)\n", iterno,maxIter);*/ ckt->CKTstat->STATnumIter += iterno; FREE(errMsg); errMsg = TMALLOC(char, strlen(msg) + 1); strcpy(errMsg,msg); #ifdef STEPDEBUG printf("iterlim exceeded \n"); #endif FREE(OldCKTstate0); return(E_ITERLIM); } if(ckt->CKTnoncon==0 && iterno!=1) { ckt->CKTnoncon = NIconvTest(ckt); } else { ckt->CKTnoncon = 1; } #ifdef STEPDEBUG printf("noncon is %d\n",ckt->CKTnoncon); #endif } if( (ckt->CKTnodeDamping!=0) && (ckt->CKTnoncon!=0) && ((ckt->CKTmode & MODETRANOP) || (ckt->CKTmode & MODEDCOP)) && (iterno>1) ) { maxdiff=0; for (node = ckt->CKTnodes->next; node; node = node->next) { if(node->type == SP_VOLTAGE) { diff = ckt->CKTrhs [node->number] - ckt->CKTrhsOld [node->number]; if (diff>maxdiff) maxdiff=diff; } } if (maxdiff>10) { damp_factor=10/maxdiff; if (damp_factor<0.1) damp_factor=0.1; for (node = ckt->CKTnodes->next; node; node = node->next) { diff = ckt->CKTrhs[node->number] - ckt->CKTrhsOld[node->number]; ckt->CKTrhs[node->number] = ckt->CKTrhsOld[node->number] + (damp_factor * diff); } for(i=0; iCKTnumStates; i++) { diff = ckt->CKTstate0[i] - OldCKTstate0[i]; ckt->CKTstate0[i] = OldCKTstate0[i] + (damp_factor * diff); } } } if(ckt->CKTmode & MODEINITFLOAT) { if ((ckt->CKTmode & MODEDC) && ( ckt->CKThadNodeset) ) { if(ipass) { ckt->CKTnoncon=ipass; } ipass=0; } if(ckt->CKTnoncon == 0) { ckt->CKTstat->STATnumIter += iterno; FREE(OldCKTstate0); return(OK); } } else if(ckt->CKTmode & MODEINITJCT) { ckt->CKTmode = (ckt->CKTmode&(~INITF))|MODEINITFIX; ckt->CKTniState |= NISHOULDREORDER; } else if (ckt->CKTmode & MODEINITFIX) { if(ckt->CKTnoncon==0) ckt->CKTmode = (ckt->CKTmode&(~INITF))|MODEINITFLOAT; ipass=1; } else if (ckt->CKTmode & MODEINITSMSIG) { ckt->CKTmode = (ckt->CKTmode&(~INITF))|MODEINITFLOAT; } else if (ckt->CKTmode & MODEINITTRAN) { if(iterno<=1) ckt->CKTniState |= NISHOULDREORDER; ckt->CKTmode = (ckt->CKTmode&(~INITF))|MODEINITFLOAT; } else if (ckt->CKTmode & MODEINITPRED) { ckt->CKTmode = (ckt->CKTmode&(~INITF))|MODEINITFLOAT; } else { ckt->CKTstat->STATnumIter += iterno; #ifdef STEPDEBUG printf("bad initf state \n"); #endif FREE(OldCKTstate0); return(E_INTERN); /* impossible - no such INITF flag! */ } /* build up the lvnim1 array from the lvn array */ temp = ckt->CKTrhsOld; ckt->CKTrhsOld = ckt->CKTrhs; ckt->CKTrhs = temp; /*printf("after loading, after solving\n");*/ /*CKTdump(ckt);*/ } /*NOTREACHED*/ } ngspice-26/src/maths/ni/niinit.c0000644000265600020320000000131312264261473016176 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* * NIinit(nistruct,loadpkg) * * Initialize the Numerical iteration package to perform Newton-Raphson * iterations on a sparse matrix filled by the specified load package, */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/smpdefs.h" int NIinit(CKTcircuit *ckt) { #ifdef SPARSE /* a concession to Ken Kundert's sparse matrix package - SMP doesn't need this*/ int Error; #endif /* SPARSE */ ckt->CKTniState = NIUNINITIALIZED; return(SMPnewMatrix( &(ckt->CKTmatrix) ) ); } ngspice-26/src/maths/ni/nipzmeth.c0000644000265600020320000002241712264261473016552 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ngspice/pzdefs.h" #include "ngspice/complex.h" #include "ngspice/cktdefs.h" #include "ngspice/devdefs.h" #include "ngspice/sperror.h" #ifdef PZDEBUG #define DEBUG(N) if (Debug >= (unsigned) (N)) static unsigned int Debug = 3; #endif extern void zaddeq(double *a, int *amag, double x, int xmag, double y, int ymag); extern int CKTpzTrapped; double NIpzK; int NIpzK_mag; int NIpzSym(PZtrial **set, PZtrial *new) { return NIpzSym2(set, new); } int NIpzComplex(PZtrial **set, PZtrial *new) { return NIpzSym2(set, new); } int NIpzMuller(PZtrial **set, PZtrial *newtry) { SPcomplex A, B, C, D, E; SPcomplex h0, h1; SPcomplex lambda_i, delta_i; double scale[3]; double q; int mag[3], magx, min; int i, j , total; min = -999999; j = 0; total = 0; for (i = 0; i < 3; i++) { if (set[i]->f_def.real != 0.0 || set[i]->f_def.imag != 0.0) { if (min < set[i]->mag_def - 50) min = set[i]->mag_def - 50; total += set[i]->mag_def; j += 1; } } magx = total / j; if (magx < min) magx = min; #ifdef PZDEBUG DEBUG(2) fprintf(stderr, "Base scale: %d / %d (0: %d, 1: %d, 2: %d)\n", magx, min, set[0]->mag_def, set[1]->mag_def, set[2]->mag_def); #endif for (i = 0; i < 3; i++) { mag[i] = set[i]->mag_def - magx; scale[i] = 1.0; while (mag[i] > 0) { scale[i] *= 2.0; mag[i] -= 1; } if (mag[i] < -90) scale[i] = 0.0; else { while (mag[i] < 0) { scale[i] /= 2.0; mag[i] += 1; } } } C_SUBEQ(h0,set[0]->s,set[1]->s); C_SUBEQ(h1,set[1]->s,set[2]->s); C_DIVEQ(lambda_i,h0,h1); /* Quadratic interpolation (Muller's method) */ C_EQ(delta_i,lambda_i); delta_i.real += 1.0; /* Quadratic coefficients A, B, C (Note: reciprocal form of eqn) */ /* A = lambda_i * (f[i-2] * lambda_i - f[i-1] * delta_i + f[i]) */ C_MULEQ(A,scale[2] * set[2]->f_def,lambda_i); C_MULEQ(C,scale[1] * set[1]->f_def,delta_i); C_SUB(A,C); C_ADD(A,scale[0] * set[0]->f_def); C_MUL(A,lambda_i); /* B = f[i-2] * lambda_i * lambda_1 - f[i-1] * delta_i * delta_i + f[i] * (lambda_i + delta_i) */ C_MULEQ(B,lambda_i,lambda_i); C_MUL(B,scale[2] * set[2]->f_def); C_MULEQ(C,delta_i,delta_i); C_MUL(C,scale[1] * set[1]->f_def); C_SUB(B,C); C_ADDEQ(C,lambda_i,delta_i); C_MUL(C,scale[0] * set[0]->f_def); C_ADD(B,C); /* C = delta_i * f[i] */ C_MULEQ(C,delta_i,scale[0] * set[0]->f_def); while (fabs(A.real) > 1.0 || fabs(A.imag) > 1.0 || fabs(B.real) > 1.0 || fabs(B.imag) > 1.0 || fabs(C.real) > 1.0 || fabs(C.imag) > 1.0) { A.real /= 2.0; B.real /= 2.0; C.real /= 2.0; A.imag /= 2.0; B.imag /= 2.0; C.imag /= 2.0; } /* discriminate = B * B - 4 * A * C */ C_MULEQ(D,B,B); C_MULEQ(E,4.0 * A,C); C_SUB(D,E); #ifdef PZDEBUG DEBUG(2) fprintf(stderr, " Discr: (%g,%g)\n",D.real, D.imag); #endif C_SQRT(D); #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " sqrtDiscr: (%g,%g)\n",D.real, D.imag); #endif #ifndef notdef /* Maximize denominator */ #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " B: (%g,%g)\n",B.real, B.imag); #endif /* Dot product */ q = B.real * D.real + B.imag * D.imag; if (q > 0.0) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " add\n"); #endif C_ADD(B,D); } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " sub\n"); #endif C_SUB(B,D); } #else /* For trapped zeros, the step should always be positive */ if (C.real >= 0.0) { if (B.real < D.real) { C_SUB(B,D); } else { C_ADD(B,D); } } else { if (B.real > D.real) { C_SUB(B,D); } else { C_ADD(B,D); } } #endif #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " C: (%g,%g)\n", C.real, C.imag); #endif C_DIV(C,-0.5 * B); newtry->next = NULL; #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " lambda: (%g,%g)\n",C.real, C.imag); #endif C_MULEQ(newtry->s,h0,C); #ifdef PZDEBUG DEBUG(1) fprintf(stderr, " h: (%g,%g)\n", newtry->s.real, newtry->s.imag); #endif C_ADD(newtry->s,set[0]->s); #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "New try: (%g,%g)\n", newtry->s.real, newtry->s.imag); #endif return OK; } int NIpzSym2(PZtrial **set, PZtrial *new) { double a, b, c, x0, x1; double dx0, dx1, d2x, diff; double disc; int a_mag, b_mag, c_mag; int tmag; int error; int disc_mag; int new_mag = 0; error = OK; /* NIpzK = 0.0; NIpzK_mag = 0; */ /* Solve for X = the distance from set[1], where X > 0 => root < set[1] */ dx0 = set[1]->s.real - set[0]->s.real; dx1 = set[2]->s.real - set[1]->s.real; x0 = (set[0]->s.real + set[1]->s.real) / 2.0; x1 = (set[1]->s.real + set[2]->s.real) / 2.0; /* d2x = x1 - x0; */ d2x = (set[2]->s.real - set[0]->s.real) / 2.0; zaddeq(&a, &a_mag, set[1]->f_def.real, set[1]->mag_def, -set[0]->f_def.real, set[0]->mag_def); tmag = 0; R_NORM(dx0,tmag); a /= dx0; a_mag -= tmag; R_NORM(a,a_mag); zaddeq(&b, &b_mag, set[2]->f_def.real, set[2]->mag_def, -set[1]->f_def.real, set[1]->mag_def); tmag = 0; R_NORM(dx1,tmag); b /= dx1; b_mag -= tmag; R_NORM(b,b_mag); zaddeq(&c, &c_mag, b, b_mag, -a, a_mag); tmag = 0; R_NORM(d2x,tmag); c /= d2x; /* = f'' */ c_mag -= tmag; R_NORM(c,c_mag); if (c == 0.0 || ((a == 0.0 || c_mag < a_mag - 40) && (b = 0.0 ||c_mag < b_mag - 40))) { /*fprintf(stderr, "\t- linear (%g, %d)\n", c, c_mag);*/ if (a == 0.0) { a = b; a_mag = b_mag; } if (a != 0.0) { new->s.real = - set[1]->f_def.real / a; a_mag -= set[1]->mag_def; while (a_mag > 0) { new->s.real /= 2.0; a_mag -= 1; } while (a_mag < 0) { new->s.real *= 2.0; a_mag += 1; } new->s.real += set[1]->s.real; } else new->s.real = set[1]->s.real; } else { /* Quadratic power series about set[1]->s.real */ /* c : d2f/dx2 @ s1 (assumed constant for all s), or "2A" */ /* a : (df/dx) / (d2f/dx2) @ s1, or "B/2A" */ a /= c; R_NORM(a,a_mag); a_mag -= c_mag; diff = set[1]->s.real - x0; tmag = 0; R_NORM(diff,tmag); zaddeq(&a, &a_mag, a, a_mag, diff, tmag); /* b : f(s1) / (1/2 d2f/ds2), or "C / A" */ b = 2.0 * set[1]->f_def.real / c; b_mag = set[1]->mag_def - c_mag; R_NORM(b,b_mag); disc = a * a; disc_mag = 2 * a_mag; /* disc = a^2 - b :: (B/2A)^2 - C/A */ zaddeq(&disc, &disc_mag, disc, disc_mag, - b, b_mag); if (disc < 0.0) { /* Look for minima instead, but save radical for later work */ disc *= -1; new_mag = 1; } if (disc_mag % 2 == 0) disc = sqrt(disc); else { disc = sqrt(2.0 * disc); disc_mag -= 1; } disc_mag /= 2; if (new_mag != 0) { if (NIpzK == 0.0) { NIpzK = disc; NIpzK_mag = disc_mag; #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "New NIpzK: %g*2^%d\n", NIpzK, NIpzK_mag); #endif } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "Ignore NIpzK: %g*2^%d for previous value of %g*2^%d\n", disc, disc_mag, NIpzK, NIpzK_mag); #endif } disc = 0.0; disc_mag = 0; } /* NOTE: c & b get reused here-after */ if (a * disc >= 0.0) { zaddeq(&c, &c_mag, a, a_mag, disc, disc_mag); } else { zaddeq(&c, &c_mag, a, a_mag, -disc, disc_mag); } /* second root = C / (first root) */ if (c != 0.0) { b /= c; b_mag -= c_mag; } else { /* special case */ b = 0.0; b = 0; } zaddeq(&b, &b_mag, set[1]->s.real, 0, -b, b_mag); zaddeq(&c, &c_mag, set[1]->s.real, 0, -c, c_mag); while (b_mag > 0) { b *= 2.0; b_mag -= 1; } while (b_mag < 0) { b /= 2.0; b_mag += 1; } while (c_mag > 0) { c *= 2.0; c_mag -= 1; } while (c_mag < 0) { c /= 2.0; c_mag += 1; } #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ (%.15g) -vs- (%.15g)\n", b, c); #endif /* XXXX */ if (b < set[0]->s.real || b > set[2]->s.real) { /* b not in range */ if (c < set[0]->s.real || c > set[2]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ both are junk\n"); #endif if (CKTpzTrapped == 1) new->s.real = (set[0]->s.real + set[1]->s.real) / 2.0; else if (CKTpzTrapped == 2) new->s.real = (set[1]->s.real + set[2]->s.real) / 2.0; else if (CKTpzTrapped == 3) { if (fabs(set[1]->s.real - c) < fabs(set[1]->s.real - b)) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ mix w/second (c)\n"); #endif new->s.real = (set[1]->s.real + c) / 2.0; } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ mix w/first (b)\n"); #endif new->s.real = (set[1]->s.real + b) / 2.0; } } else MERROR(E_PANIC,"Lost numerical stability"); } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ take second (c)\n"); #endif new->s.real = c; } } else { /* b in range */ if (c < set[0]->s.real || c > set[2]->s.real) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ take first (b)\n"); #endif new->s.real = b; } else { /* Both in range -- take the smallest mag */ if (a > 0.0) { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ push -- first (b)\n"); #endif new->s.real = b; } else { #ifdef PZDEBUG DEBUG(1) fprintf(stderr, "@@@ push -- first (b)\n"); #endif new->s.real = c; } } } } new->s.imag = 0.0; return error; } ngspice-26/src/maths/ni/ChangeLog0000644000265600020320000000121412264261473016312 0ustar andreasadmin2000-07-18 Arno W. Peters * niconv.c: Removed NEWCONV. This symbol was defined by default, adjusted the code to this reality. 1999-09-03 Emmanuel Rouat * *.h: added header file for each .c file 1999-09-01 Paolo Nenzi * *.c: replaced GENERIC with void and removed #include suffix.h. 1999-08-12 Emmanuel Rouat * nipzmeth.c (NIpzMuller): removed unused variables * *.c : made functions ANSI compliant using 'protoize' 1999-08-08 Emmanuel Rouat * niiter.c: changed HAS_SENSE2 in WANT_SENSE2 ngspice-26/src/maths/ni/nicomcof.c0000644000265600020320000001363412264261473016512 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" /* xmu=0: Backward Euler * xmu=0.5: trapezoidal (standard) * xmu=0.48: good damping of current ringing, e.g. in R.O.s. */ #define xmu 0.5 int NIcomCof(CKTcircuit *ckt) { double mat[8][8]; /* matrix to compute the gear coefficients in */ int i,j,k; /* generic loop indicies */ double arg; double arg1; /* this routine calculates the timestep-dependent terms used in the * numerical integration. */ /* * compute coefficients for particular integration method */ switch(ckt->CKTintegrateMethod) { case TRAPEZOIDAL: switch(ckt->CKTorder) { case 1: ckt->CKTag[0] = 1/ckt->CKTdelta; ckt->CKTag[1] = -1/ckt->CKTdelta; break; case 2: ckt->CKTag[0] = 1.0 / ckt->CKTdelta / (1.0 - xmu); ckt->CKTag[1] = xmu / (1.0 - xmu); break; default: return(E_ORDER); } break; case GEAR: switch(ckt->CKTorder) { case 1: /* ckt->CKTag[0] = 1/ckt->CKTdelta; ckt->CKTag[1] = -1/ckt->CKTdelta; break;*/ case 2: case 3: case 4: case 5: case 6: bzero(ckt->CKTag,7*sizeof(double)); ckt->CKTag[1] = -1/ckt->CKTdelta; /* first, set up the matrix */ arg=0; for(i=0;i<=ckt->CKTorder;i++) { mat[0][i]=1; } for(i=1;i<=ckt->CKTorder;i++) { mat[i][0]=0; } /* SPICE2 difference warning * the following block builds the corrector matrix * using (sum of h's)/h(final) instead of just (sum of h's) * because the h's are typically ~1e-10, so h^7 is an * underflow on many machines, but the ratio is ~1 * and produces much better results */ for(i=1;i<=ckt->CKTorder;i++) { arg += ckt->CKTdeltaOld[i-1]; arg1 = 1; for(j=1;j<=ckt->CKTorder;j++) { arg1 *= arg/ckt->CKTdelta; mat[j][i]=arg1; } } /* lu decompose */ /* weirdness warning! * The following loop (and the first one after the forward * substitution comment) start at one instead of zero * because of a SPECIAL CASE - the first column is 1 0 0 ... * thus, the first iteration of both loops does nothing, * so it is skipped */ for(i=1;i<=ckt->CKTorder;i++) { for(j=i+1;j<=ckt->CKTorder;j++) { mat[j][i] /= mat[i][i]; for(k=i+1;k<=ckt->CKTorder;k++) { mat[j][k] -= mat[j][i]*mat[i][k]; } } } /* forward substitution */ for(i=1;i<=ckt->CKTorder;i++) { for(j=i+1;j<=ckt->CKTorder;j++) { ckt->CKTag[j]=ckt->CKTag[j]-mat[j][i]*ckt->CKTag[i]; } } /* backward substitution */ ckt->CKTag[ckt->CKTorder] /= mat[ckt->CKTorder][ckt->CKTorder]; for(i=ckt->CKTorder-1;i>=0;i--) { for(j=i+1;j<=ckt->CKTorder;j++) { ckt->CKTag[i]=ckt->CKTag[i]-mat[i][j]*ckt->CKTag[j]; } ckt->CKTag[i] /= mat[i][i]; } break; default: return(E_ORDER); } break; default: return(E_METHOD); } #ifdef PREDICTOR /* ok, have the coefficients for corrector, now for the predictor */ switch(ckt->CKTintegrateMethod) { default: return(E_METHOD); case TRAPEZOIDAL: /* ADAMS-BASHFORD PREDICTOR FOR TRAPEZOIDAL CORRECTOR * MAY BE SUPPLEMENTED BY SECOND ORDER GEAR CORRECTOR * AGP(1) STORES b0 AND AGP(2) STORES b1 */ arg = ckt->CKTdelta/(2*ckt->CKTdeltaOld[1]); ckt->CKTagp[0] = 1+arg; ckt->CKTagp[1] = -arg; break; case GEAR: /* * CONSTRUCT GEAR PREDICTOR COEFICENT MATRIX * MUST STILL ACCOUNT FOR ARRAY AGP() * KEEP THE SAME NAME FOR GMAT */ bzero(ckt->CKTagp,7*sizeof(double)); /* SET UP RHS OF EQUATIONS */ ckt->CKTagp[0]=1; for(i=0;i<=ckt->CKTorder;i++) { mat[0][i] = 1; } arg = 0; for(i=0;i<=ckt->CKTorder;i++){ arg += ckt->CKTdeltaOld[i]; arg1 = 1; for(j=1;j<=ckt->CKTorder;j++) { arg1 *= arg/ckt->CKTdelta; mat[j][i]=arg1; } } /* * SOLVE FOR GEAR COEFFICIENTS AGP(*) */ /* * LU DECOMPOSITION */ for(i=0;i<=ckt->CKTorder;i++) { for(j=i+1;j<=ckt->CKTorder;j++) { mat[j][i] /= mat[i][i]; for(k=i+1;k<=ckt->CKTorder;k++) { mat[j][k] -= mat[j][i]*mat[i][k]; } } } /* * FORWARD SUBSTITUTION */ for(i=0;i<=ckt->CKTorder;i++) { for(j=i+1;j<=ckt->CKTorder;j++) { ckt->CKTagp[j] -= mat[j][i]*ckt->CKTagp[i]; } } /* * BACKWARD SUBSTITUTION */ ckt->CKTagp[ckt->CKTorder] /= mat[ckt->CKTorder][ckt->CKTorder]; for(i=ckt->CKTorder-1;i>=0;i--) { for(j=i+1;j<=ckt->CKTorder;j++) { ckt->CKTagp[i] -= mat[i][j]*ckt->CKTagp[j]; } ckt->CKTagp[i] /= mat[i][i]; } /* * FINISHED */ break; } #endif /* PREDICTOR */ return(OK); } ngspice-26/src/maths/ni/niaciter.c0000644000265600020320000000502612264261473016507 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified 1999 Emmanuel Rouat **********/ /* * NIacIter(ckt) * * This subroutine performs the actual numerical iteration. * It uses the sparse matrix stored in the NIstruct by NIinit, * along with the matrix loading program, the load data, the * convergence test function, and the convergence parameters * - return value is non-zero for convergence failure */ #include "ngspice/ngspice.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" int NIacIter(CKTcircuit *ckt) { int error; int ignore; double *temp; double startTime; retry: ckt->CKTnoncon=0; error = CKTacLoad(ckt); if(error) return(error); if(ckt->CKTniState & NIACSHOULDREORDER) { startTime = SPfrontEnd->IFseconds(); error = SMPcReorder(ckt->CKTmatrix,ckt->CKTpivotAbsTol, ckt->CKTpivotRelTol,&ignore); ckt->CKTstat->STATreorderTime += SPfrontEnd->IFseconds()- startTime; ckt->CKTniState &= ~NIACSHOULDREORDER; if(error != 0) { /* either singular equations or no memory, in either case, * let caller handle problem */ return(error); } } else { startTime = SPfrontEnd->IFseconds(); error = SMPcLUfac(ckt->CKTmatrix,ckt->CKTpivotAbsTol); ckt->CKTstat->STATdecompTime += SPfrontEnd->IFseconds()-startTime; if(error != 0) { if(error == E_SINGULAR) { /* the problem is that the matrix can't be solved with the * current LU factorization. Maybe if we reload and * try to reorder again it will help... */ ckt->CKTniState |= NIACSHOULDREORDER; goto retry; } return(error); /* can't handle E_BADMATRIX, so let caller */ } } startTime = SPfrontEnd->IFseconds(); SMPcSolve(ckt->CKTmatrix,ckt->CKTrhs, ckt->CKTirhs, ckt->CKTrhsSpare, ckt->CKTirhsSpare); ckt->CKTstat->STATsolveTime += SPfrontEnd->IFseconds() - startTime; *ckt->CKTrhs = 0; *ckt->CKTrhsSpare = 0; *ckt->CKTrhsOld = 0; *ckt->CKTirhs = 0; *ckt->CKTirhsSpare = 0; *ckt->CKTirhsOld = 0; temp = ckt->CKTirhsOld; ckt->CKTirhsOld = ckt->CKTirhs; ckt->CKTirhs = temp; temp = ckt->CKTrhsOld; ckt->CKTrhsOld = ckt->CKTrhs; ckt->CKTrhs = temp; return(OK); } ngspice-26/src/maths/ni/nidest.c0000644000265600020320000000167712264261473016207 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ /* NIdestroy(ckt) * delete the data structures allocated for numeric integration. */ #include "ngspice/ngspice.h" #include "ngspice/cktdefs.h" void NIdestroy(CKTcircuit *ckt) { if (ckt->CKTmatrix) SMPdestroy(ckt->CKTmatrix); ckt->CKTmatrix = NULL; if(ckt->CKTrhs) FREE(ckt->CKTrhs); if(ckt->CKTrhsOld) FREE(ckt->CKTrhsOld); if(ckt->CKTrhsSpare) FREE(ckt->CKTrhsSpare); if(ckt->CKTirhs) FREE(ckt->CKTirhs); if(ckt->CKTirhsOld) FREE(ckt->CKTirhsOld); if(ckt->CKTirhsSpare) FREE(ckt->CKTirhsSpare); #ifdef WANT_SENSE2 if(ckt->CKTsenInfo){ if(ckt->CKTrhsOp) FREE(ckt->CKTrhsOp); if(ckt->CKTsenRhs) FREE(ckt->CKTsenRhs); if(ckt->CKTseniRhs) FREE(ckt->CKTseniRhs); SENdestroy(ckt->CKTsenInfo); } #endif } ngspice-26/src/maths/ni/nipred.c0000644000265600020320000001104212264261473016165 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* * NIpred(ckt) * * This subroutine does node voltage prediction based on the * integration method */ #include "ngspice/ngspice.h" #include "ngspice/trandefs.h" #include "ngspice/cktdefs.h" #include "ngspice/sperror.h" #include "ngspice/smpdefs.h" #ifdef PREDICTOR int NIpred(CKTcircuit * ckt) { int i; int size; CKTnode *node; /* for our prediction, we have: * ckt->CKTrhs[] is the current solution * ckt->CKTsols[8][] is the set of previous solutions * * we want: * ckt->CKTpred[] = ckt->CKTrhs = prediction based on proper number of * previous time steps. */ size = SMPmatSize(ckt->CKTmatrix); switch (ckt->CKTintegrateMethod) { case TRAPEZOIDAL: { double dd0, dd1, a, b; switch (ckt->CKTorder) { case 1: for (i = 0; i <= size; i++) { dd0 = (ckt->CKTsols[0][i] - ckt->CKTsols[1][i]) / ckt->CKTdeltaOld[1]; ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTsols[0][i] + ckt->CKTdeltaOld[0] * dd0; } break; case 2: for (i = 0; i <= size; i++) { b = - ckt->CKTdeltaOld[0] / (2*ckt->CKTdeltaOld[1]); a = 1 - b; dd0 = (ckt->CKTsols[0][i] - ckt->CKTsols[1][i]) / ckt->CKTdeltaOld[1]; dd1 = (ckt->CKTsols[1][i] - ckt->CKTsols[2][i]) / ckt->CKTdeltaOld[2]; ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTsols[0][i] + (b * dd1 + a * dd0) * ckt->CKTdeltaOld[0]; } break; default: return(E_ORDER); } } break; case GEAR: node = ckt->CKTnodes; switch (ckt->CKTorder) { case 1: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] ; node = node->next; } break; case 2: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] + ckt->CKTagp[2] * ckt->CKTsols[2][i] ; node = node->next; } break; case 3: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] + ckt->CKTagp[2] * ckt->CKTsols[2][i] + ckt->CKTagp[3] * ckt->CKTsols[3][i] ; } break; case 4: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] + ckt->CKTagp[2] * ckt->CKTsols[2][i] + ckt->CKTagp[3] * ckt->CKTsols[3][i] + ckt->CKTagp[4] * ckt->CKTsols[4][i] ; } break; case 5: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] + ckt->CKTagp[2] * ckt->CKTsols[2][i] + ckt->CKTagp[3] * ckt->CKTsols[3][i] + ckt->CKTagp[4] * ckt->CKTsols[4][i] + ckt->CKTagp[5] * ckt->CKTsols[5][i] ; } break; case 6: for (i = 0; i <= size; i++) { ckt->CKTpred[i] = ckt->CKTrhs[i] = ckt->CKTagp[0] * ckt->CKTsols[0][i] + ckt->CKTagp[1] * ckt->CKTsols[1][i] + ckt->CKTagp[2] * ckt->CKTsols[2][i] + ckt->CKTagp[3] * ckt->CKTsols[3][i] + ckt->CKTagp[4] * ckt->CKTsols[4][i] + ckt->CKTagp[5] * ckt->CKTsols[5][i] + ckt->CKTagp[6] * ckt->CKTsols[6][i] ; } break; default: return(E_ORDER); } break; default: return(E_METHOD); } return(OK); } #else int Dummy_Symbol; #endif /* PREDICTOR */ ngspice-26/src/maths/ni/Makefile.am0000644000265600020320000000062612264261473016602 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libni.la libni_la_SOURCES = \ niaciter.c \ nicomcof.c \ niconv.c \ nidest.c \ niditer.c \ niinit.c \ niinteg.c \ niiter.c \ niniter.c \ nipred.c \ nipzmeth.c \ nireinit.c \ nisenre.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/ni/Makefile.in0000644000265600020320000004171712264261535016620 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/ni DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libni_la_LIBADD = am_libni_la_OBJECTS = niaciter.lo nicomcof.lo niconv.lo nidest.lo \ niditer.lo niinit.lo niinteg.lo niiter.lo niniter.lo nipred.lo \ nipzmeth.lo nireinit.lo nisenre.lo libni_la_OBJECTS = $(am_libni_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libni_la_SOURCES) DIST_SOURCES = $(libni_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libni.la libni_la_SOURCES = \ niaciter.c \ nicomcof.c \ niconv.c \ nidest.c \ niditer.c \ niinit.c \ niinteg.c \ niiter.c \ niniter.c \ nipred.c \ nipzmeth.c \ nireinit.c \ nisenre.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/ni/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/ni/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libni.la: $(libni_la_OBJECTS) $(libni_la_DEPENDENCIES) $(EXTRA_libni_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libni_la_OBJECTS) $(libni_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niaciter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nicomcof.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niconv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nidest.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niditer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niinteg.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niiter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/niniter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nipred.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nipzmeth.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nireinit.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nisenre.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/deriv/0000755000265600020320000000000012264261703015241 5ustar andreasadminngspice-26/src/maths/deriv/cubeder.c0000644000265600020320000000640112264261473017023 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * CubeDeriv computes the partial derivatives of the cube * function where the argument to the function is itself a * function of three variables p, q, and r. */ void CubeDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = temp.value * temp.value * temp.value; new->d1_p = 3*temp.value*temp.value*temp.d1_p; new->d1_q = 3*temp.value*temp.value*temp.d1_q; new->d1_r = 3*temp.value*temp.value*temp.d1_r; new->d2_p2 = 3*(2*temp.value*temp.d1_p*temp.d1_p + temp.value*temp.value*temp.d2_p2); new->d2_q2 = 3*(2*temp.value*temp.d1_q*temp.d1_q + temp.value*temp.value*temp.d2_q2); new->d2_r2 = 3*(2*temp.value*temp.d1_r*temp.d1_r + temp.value*temp.value*temp.d2_r2); new->d2_pq = 3*(2*temp.value*temp.d1_p*temp.d1_q + temp.value*temp.value*temp.d2_pq); new->d2_qr = 3*(2*temp.value*temp.d1_q*temp.d1_r + temp.value*temp.value*temp.d2_qr); new->d2_pr = 3*(2*temp.value*temp.d1_p*temp.d1_r + temp.value*temp.value*temp.d2_pr); new->d3_p3 = 3*(2*(temp.d1_p*temp.d1_p*temp.d1_p + temp.value*(temp.d2_p2*temp.d1_p + temp.d2_p2*temp.d1_p + temp.d2_p2*temp.d1_p)) + temp.value*temp.value*temp.d3_p3); new->d3_q3 = 3*(2*(temp.d1_q*temp.d1_q*temp.d1_q + temp.value*(temp.d2_q2*temp.d1_q + temp.d2_q2*temp.d1_q + temp.d2_q2*temp.d1_q)) + temp.value*temp.value*temp.d3_q3); new->d3_r3 = 3*(2*(temp.d1_r*temp.d1_r*temp.d1_r + temp.value*(temp.d2_r2*temp.d1_r + temp.d2_r2*temp.d1_r + temp.d2_r2*temp.d1_r)) + temp.value*temp.value*temp.d3_r3); new->d3_p2r = 3*(2*(temp.d1_p*temp.d1_p*temp.d1_r + temp.value*(temp.d2_p2*temp.d1_r + temp.d2_pr*temp.d1_p + temp.d2_pr*temp.d1_p)) + temp.value*temp.value*temp.d3_p2r); new->d3_p2q = 3*(2*(temp.d1_p*temp.d1_p*temp.d1_q + temp.value*(temp.d2_p2*temp.d1_q + temp.d2_pq*temp.d1_p + temp.d2_pq*temp.d1_p)) + temp.value*temp.value*temp.d3_p2q); new->d3_q2r = 3*(2*(temp.d1_q*temp.d1_q*temp.d1_r + temp.value*(temp.d2_q2*temp.d1_r + temp.d2_qr*temp.d1_q + temp.d2_qr*temp.d1_q)) + temp.value*temp.value*temp.d3_q2r); new->d3_pq2 = 3*(2*(temp.d1_q*temp.d1_q*temp.d1_p + temp.value*(temp.d2_q2*temp.d1_p + temp.d2_pq*temp.d1_q + temp.d2_pq*temp.d1_q)) + temp.value*temp.value*temp.d3_pq2); new->d3_pr2 = 3*(2*(temp.d1_r*temp.d1_r*temp.d1_p + temp.value*(temp.d2_r2*temp.d1_p + temp.d2_pr*temp.d1_r + temp.d2_pr*temp.d1_r)) + temp.value*temp.value*temp.d3_pr2); new->d3_qr2 = 3*(2*(temp.d1_r*temp.d1_r*temp.d1_q + temp.value*(temp.d2_r2*temp.d1_q + temp.d2_qr*temp.d1_r + temp.d2_qr*temp.d1_r)) + temp.value*temp.value*temp.d3_qr2); new->d3_pqr = 3*(2*(temp.d1_p*temp.d1_q*temp.d1_r + temp.value*(temp.d2_pq*temp.d1_r + temp.d2_qr*temp.d1_p + temp.d2_pr*temp.d1_q)) + temp.value*temp.value*temp.d3_pqr); } ngspice-26/src/maths/deriv/atander.c0000644000265600020320000000674512264261473017043 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * AtanDeriv computes the partial derivatives of the arctangent * function where the argument to the atan function is itself a * function of three variables p, q, and r. */ void AtanDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = atan( temp.value); new->d1_p = temp.d1_p / (1 + temp.value * temp.value); new->d1_q = temp.d1_q / (1 + temp.value * temp.value); new->d1_r = temp.d1_r / (1 + temp.value * temp.value); new->d2_p2 = temp.d2_p2 / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_p * new->d1_p; new->d2_q2 = temp.d2_q2 / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_q * new->d1_q; new->d2_r2 = temp.d2_r2 / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_r * new->d1_r; new->d2_pq = temp.d2_pq / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_p * new->d1_q; new->d2_qr = temp.d2_qr / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_q * new->d1_r; new->d2_pr = temp.d2_pr / (1 + temp.value * temp.value) - 2 * temp.value * new->d1_p * new->d1_r; new->d3_p3 = (temp.d3_p3 - temp.d2_p2 * new->d1_p * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_p * new->d1_p * temp.d1_p + temp.value * ( new->d2_p2 * new->d1_p + new->d2_p2 * new->d1_p)); new->d3_q3 = (temp.d3_q3 - temp.d2_q2 * new->d1_q * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_q * new->d1_q * temp.d1_q + temp.value * ( new->d2_q2 * new->d1_q + new->d2_q2 * new->d1_q)); new->d3_r3 = (temp.d3_r3 - temp.d2_r2 * new->d1_r * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_r * new->d1_r * temp.d1_r + temp.value * ( new->d2_r2 * new->d1_r + new->d2_r2 * new->d1_r)); new->d3_p2r = (temp.d3_p2r - temp.d2_p2 * new->d1_r * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_p * new->d1_p * temp.d1_r + temp.value * ( new->d2_pr * new->d1_p + new->d2_pr * new->d1_p)); new->d3_p2q = (temp.d3_p2q - temp.d2_p2 * new->d1_q * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_p * new->d1_p * temp.d1_q + temp.value * ( new->d2_pq * new->d1_p + new->d2_pq * new->d1_p)); new->d3_q2r = (temp.d3_q2r - temp.d2_q2 * new->d1_r * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_q * new->d1_q * temp.d1_r + temp.value * ( new->d2_qr * new->d1_q + new->d2_qr * new->d1_q)); new->d3_pq2 = (temp.d3_pq2 - temp.d2_q2 * new->d1_p * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_q * new->d1_q * temp.d1_p + temp.value * ( new->d2_pq * new->d1_q + new->d2_pq * new->d1_q)); new->d3_pr2 = (temp.d3_pr2 - temp.d2_r2 * new->d1_p * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_r * new->d1_r * temp.d1_p + temp.value * ( new->d2_pr * new->d1_r + new->d2_pr * new->d1_r)); new->d3_qr2 = (temp.d3_qr2 - temp.d2_r2 * new->d1_q * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_r * new->d1_r * temp.d1_q + temp.value * ( new->d2_qr * new->d1_r + new->d2_qr * new->d1_r)); new->d3_pqr = (temp.d3_pqr - temp.d2_pq * new->d1_r * 2 * temp.value) / (1 + temp.value * temp.value) - 2 * (new->d1_p * new->d1_q * temp.d1_r + temp.value * ( new->d2_pr * new->d1_q + new->d2_qr * new->d1_p)); } ngspice-26/src/maths/deriv/tanderiv.c0000644000265600020320000000562312264261473017233 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * TanDeriv computes the partial derivatives of the tangent * function where the argument to the function is itself a * function of three variables p, q, and r. */ void TanDeriv( Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = tan(temp.value); new->d1_p = (1 + new->value*new->value)*temp.d1_p; new->d1_q = (1 + new->value*new->value)*temp.d1_q; new->d1_r = (1 + new->value*new->value)*temp.d1_r; new->d2_p2 = (1 + new->value*new->value)*temp.d2_p2 + 2*new->value*temp.d1_p*new->d1_p; new->d2_q2 = (1 + new->value*new->value)*temp.d2_q2 + 2*new->value*temp.d1_q*new->d1_q; new->d2_r2 = (1 + new->value*new->value)*temp.d2_r2 + 2*new->value*temp.d1_r*new->d1_r; new->d2_pq = (1 + new->value*new->value)*temp.d2_pq + 2*new->value*temp.d1_p*new->d1_q; new->d2_qr = (1 + new->value*new->value)*temp.d2_qr + 2*new->value*temp.d1_q*new->d1_r; new->d2_pr = (1 + new->value*new->value)*temp.d2_pr + 2*new->value*temp.d1_p*new->d1_r; new->d3_p3 = (1 + new->value*new->value)*temp.d3_p3 +2*( new->value*( temp.d2_p2*new->d1_p + temp.d2_p2*new->d1_p + new->d2_p2* temp.d1_p) + temp.d1_p*new->d1_p*new->d1_p); new->d3_q3 = (1 + new->value*new->value)*temp.d3_q3 +2*( new->value*( temp.d2_q2*new->d1_q + temp.d2_q2*new->d1_q + new->d2_q2* temp.d1_q) + temp.d1_q*new->d1_q*new->d1_q); new->d3_r3 = (1 + new->value*new->value)*temp.d3_r3 +2*( new->value*( temp.d2_r2*new->d1_r + temp.d2_r2*new->d1_r + new->d2_r2* temp.d1_r) + temp.d1_r*new->d1_r*new->d1_r); new->d3_p2r = (1 + new->value*new->value)*temp.d3_p2r +2*( new->value*( temp.d2_p2*new->d1_r + temp.d2_pr*new->d1_p + new->d2_pr* temp.d1_p) + temp.d1_p*new->d1_p*new->d1_r); new->d3_p2q = (1 + new->value*new->value)*temp.d3_p2q +2*( new->value*( temp.d2_p2*new->d1_q + temp.d2_pq*new->d1_p + new->d2_pq* temp.d1_p) + temp.d1_p*new->d1_p*new->d1_q); new->d3_q2r = (1 + new->value*new->value)*temp.d3_q2r +2*( new->value*( temp.d2_q2*new->d1_r + temp.d2_qr*new->d1_q + new->d2_qr* temp.d1_q) + temp.d1_q*new->d1_q*new->d1_r); new->d3_pq2 = (1 + new->value*new->value)*temp.d3_pq2 +2*( new->value*( temp.d2_q2*new->d1_p + temp.d2_pq*new->d1_q + new->d2_pq* temp.d1_q) + temp.d1_q*new->d1_q*new->d1_p); new->d3_pr2 = (1 + new->value*new->value)*temp.d3_pr2 +2*( new->value*( temp.d2_r2*new->d1_p + temp.d2_pr*new->d1_r + new->d2_pr* temp.d1_r) + temp.d1_r*new->d1_r*new->d1_p); new->d3_qr2 = (1 + new->value*new->value)*temp.d3_qr2 +2*( new->value*( temp.d2_r2*new->d1_q + temp.d2_qr*new->d1_r + new->d2_qr* temp.d1_r) + temp.d1_r*new->d1_r*new->d1_q); new->d3_pqr = (1 + new->value*new->value)*temp.d3_pqr +2*( new->value*( temp.d2_pq*new->d1_r + temp.d2_pr*new->d1_q + new->d2_qr* temp.d1_p) + temp.d1_p*new->d1_q*new->d1_r); } ngspice-26/src/maths/deriv/powderiv.c0000644000265600020320000000765112264261473017261 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * PowDeriv computes the partial derivatives of the x^^m * function where the argument to the function is itself a * function of three variables p, q, and r. m is a constant. */ void PowDeriv(Dderivs *new, Dderivs *old, double emm) { Dderivs temp; EqualDeriv(&temp, old); new->value = pow(temp.value, emm); new->d1_p = emm * new->value / temp.value * temp.d1_p; new->d1_q = emm * new->value / temp.value * temp.d1_q; new->d1_r = emm * new->value / temp.value * temp.d1_r; new->d2_p2 = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_p * temp.d1_p + temp.d2_p2); new->d2_q2 = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_q * temp.d1_q + temp.d2_q2); new->d2_r2 = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_r * temp.d1_r + temp.d2_r2); new->d2_pq = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_p * temp.d1_q + temp.d2_pq); new->d2_qr = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_q * temp.d1_r + temp.d2_qr); new->d2_pr = emm * new->value / temp.value * ((emm-1) / temp.value * temp.d1_p * temp.d1_r + temp.d2_pr); new->d3_p3 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_p * temp.d1_p * temp.d1_p + temp.d1_p * temp.d2_p2 + temp.d1_p * temp.d2_p2 + temp.d1_p * temp.d2_p2) + emm * new->value / temp.value * temp.d3_p3; new->d3_q3 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_q * temp.d1_q * temp.d1_q + temp.d1_q * temp.d2_q2 + temp.d1_q * temp.d2_q2 + temp.d1_q * temp.d2_q2) + emm * new->value / temp.value * temp.d3_q3; new->d3_r3 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_r *temp.d1_r * temp.d1_r + temp.d1_r * temp.d2_r2 + temp.d1_r * temp.d2_r2 + temp.d1_r * temp.d2_r2) + emm * new->value / temp.value * temp.d3_r3; new->d3_p2r = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_p * temp.d1_p * temp.d1_r + temp.d1_p * temp.d2_pr + temp.d1_p * temp.d2_pr + temp.d1_r * temp.d2_p2) + emm * new->value / temp.value * temp.d3_p2r; new->d3_p2q = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_p * temp.d1_p * temp.d1_q + temp.d1_p * temp.d2_pq + temp.d1_p * temp.d2_pq + temp.d1_q * temp.d2_p2) + emm * new->value / temp.value * temp.d3_p2q; new->d3_q2r = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_q * temp.d1_q * temp.d1_r + temp.d1_q * temp.d2_qr + temp.d1_q * temp.d2_qr + temp.d1_r * temp.d2_q2) + emm * new->value / temp.value * temp.d3_q2r; new->d3_pq2 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_q * temp.d1_q * temp.d1_p + temp.d1_q * temp.d2_pq + temp.d1_q * temp.d2_pq + temp.d1_p * temp.d2_q2) + emm * new->value / temp.value * temp.d3_pq2; new->d3_pr2 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_r * temp.d1_r * temp.d1_p + temp.d1_r * temp.d2_pr + temp.d1_r * temp.d2_pr + temp.d1_p * temp.d2_r2) + emm * new->value / temp.value * temp.d3_pr2; new->d3_qr2 = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_r * temp.d1_r * temp.d1_q + temp.d1_r * temp.d2_qr + temp.d1_r * temp.d2_qr + temp.d1_q * temp.d2_r2) + emm * new->value / temp.value * temp.d3_qr2; new->d3_pqr = emm * (emm-1) * new->value / (temp.value * temp.value) * ((emm-2) / temp.value * temp.d1_p * temp.d1_q * temp.d1_r + temp.d1_p * temp.d2_qr + temp.d1_q * temp.d2_pr + temp.d1_r * temp.d2_pq) + emm * new->value / temp.value * temp.d3_pqr; } ngspice-26/src/maths/deriv/equalder.c0000644000265600020320000000153712264261473017221 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * EqualDeriv equates partial derivatives. */ void EqualDeriv(Dderivs *new, Dderivs *old) { new->value = old->value; new->d1_p = old->d1_p; new->d1_q = old->d1_q; new->d1_r = old->d1_r; new->d2_p2 = old->d2_p2 ; new->d2_q2 = old->d2_q2 ; new->d2_r2 = old->d2_r2 ; new->d2_pq = old->d2_pq ; new->d2_qr = old->d2_qr ; new->d2_pr = old->d2_pr ; new->d3_p3 = old->d3_p3 ; new->d3_q3 = old->d3_q3 ; new->d3_r3 = old->d3_r3 ; new->d3_p2r = old->d3_p2r ; new->d3_p2q = old->d3_p2q ; new->d3_q2r = old->d3_q2r ; new->d3_pq2 = old->d3_pq2 ; new->d3_pr2 = old->d3_pr2 ; new->d3_qr2 = old->d3_qr2 ; new->d3_pqr = old->d3_pqr ; } ngspice-26/src/maths/deriv/sqrtder.c0000644000265600020320000000770412264261473017105 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * SqrtDeriv computes the partial derivatives of the sqrt * function where the argument to the function is itself a * function of three variables p, q, and r. */ void SqrtDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = sqrt(temp.value); if (temp.value == 0.0) { new->d1_p = 0.0; new->d1_q = 0.0; new->d1_r = 0.0; new->d2_p2 = 0.0; new->d2_q2 = 0.0; new->d2_r2 = 0.0; new->d2_pq = 0.0; new->d2_qr = 0.0; new->d2_pr = 0.0; new->d3_p3 = 0.0; new->d3_q3 = 0.0; new->d3_r3 = 0.0; new->d3_p2r = 0.0; new->d3_p2q = 0.0; new->d3_q2r = 0.0; new->d3_pq2 = 0.0; new->d3_pr2 = 0.0; new->d3_qr2 = 0.0; new->d3_pqr = 0.0; } else { new->d1_p = 0.5*temp.d1_p/new->value; new->d1_q = 0.5*temp.d1_q/new->value; new->d1_r = 0.5*temp.d1_r/new->value; new->d2_p2 = 0.5/new->value * (temp.d2_p2 - 0.5 * temp.d1_p * temp.d1_p/ temp.value); new->d2_q2 = 0.5/new->value*(temp.d2_q2 -0.5 * temp.d1_q * temp.d1_q/ temp.value); new->d2_r2 = 0.5/new->value*(temp.d2_r2 -0.5 * temp.d1_r * temp.d1_r/ temp.value); new->d2_pq = 0.5/new->value*(temp.d2_pq -0.5 * temp.d1_p * temp.d1_q/ temp.value); new->d2_qr = 0.5/new->value*(temp.d2_qr -0.5 * temp.d1_q * temp.d1_r/ temp.value); new->d2_pr = 0.5/new->value*(temp.d2_pr -0.5 * temp.d1_p * temp.d1_r/ temp.value); new->d3_p3 = 0.5 * (temp.d3_p3 / new->value - 0.5 / (temp.value*new->value) * (-1.5 / temp.value * temp.d1_p * temp.d1_p * temp.d1_p + temp.d1_p*temp.d2_p2 + temp.d1_p*temp.d2_p2 + temp.d1_p*temp.d2_p2)); new->d3_q3 = 0.5 * (temp.d3_q3 / new->value - 0.5 / (temp.value*new->value) * (-1.5 / temp.value * temp.d1_q * temp.d1_q * temp.d1_q + temp.d1_q*temp.d2_q2 + temp.d1_q*temp.d2_q2 + temp.d1_q* temp.d2_q2)); new->d3_r3 = 0.5 * (temp.d3_r3 / new->value - 0.5 / (temp.value*new->value) * (-1.5 / temp.value * temp.d1_r * temp.d1_r * temp.d1_r + temp.d1_r*temp.d2_r2 + temp.d1_r*temp.d2_r2 + temp.d1_r* temp.d2_r2)); new->d3_p2r = 0.5 * (temp.d3_p2r / new->value - 0.5 / (temp.value*new->value) * (-1.5 / temp.value * temp.d1_p * temp.d1_p * temp.d1_r + temp.d1_p * temp.d2_pr + temp.d1_p * temp.d2_pr + temp.d1_r * temp.d2_p2)); new->d3_p2q = 0.5 * (temp.d3_p2q / new->value - 0.5 / (temp.value * new->value) * (-1.5/temp.value*temp.d1_p*temp.d1_p*temp.d1_q + temp.d1_p * temp.d2_pq + temp.d1_p * temp.d2_pq + temp.d1_q * temp.d2_p2)); new->d3_q2r = 0.5 * (temp.d3_q2r / new->value - 0.5 / (temp.value * new->value) * (-1.5 / temp.value * temp.d1_q * temp.d1_q * temp.d1_r + temp.d1_q*temp.d2_qr + temp.d1_q*temp.d2_qr + temp.d1_r* temp.d2_q2)); new->d3_pq2 = 0.5 * (temp.d3_pq2 / new->value - 0.5 / (temp.value * new->value) * (-1.5 / temp.value * temp.d1_q * temp.d1_q * temp.d1_p + temp.d1_q*temp.d2_pq + temp.d1_q*temp.d2_pq + temp.d1_p* temp.d2_q2)); new->d3_pr2 = 0.5 * (temp.d3_pr2 / new->value - 0.5 / (temp.value * new->value) * (-1.5/temp.value * temp.d1_r * temp.d1_r * temp.d1_p + temp.d1_r*temp.d2_pr + temp.d1_r*temp.d2_pr + temp.d1_p* temp.d2_r2)); new->d3_qr2 = 0.5 * (temp.d3_qr2 / new->value - 0.5 / (temp.value * new->value) * (-1.5/temp.value * temp.d1_r * temp.d1_r * temp.d1_q + temp.d1_r*temp.d2_qr + temp.d1_r*temp.d2_qr + temp.d1_q* temp.d2_r2)); new->d3_pqr = 0.5 * (temp.d3_pqr / new->value - 0.5 / (temp.value * new->value) * (-1.5/temp.value * temp.d1_p * temp.d1_q * temp.d1_r + temp.d1_p*temp.d2_qr + temp.d1_q*temp.d2_pr + temp.d1_r* temp.d2_pq)); } } ngspice-26/src/maths/deriv/cosderiv.c0000644000265600020320000000625712264261473017241 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * CosDeriv computes the partial derivatives of the cosine * function where the argument to the function is itself a * function of three variables p, q, and r. */ void CosDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = cos (temp.value); new->d1_p = - sin(temp.value)*temp.d1_p; new->d1_q = - sin(temp.value)*temp.d1_q; new->d1_r = - sin(temp.value)*temp.d1_r; new->d2_p2 = -(cos(temp.value)*temp.d1_p*temp.d1_p + sin(temp.value)*temp.d2_p2); new->d2_q2 = -(cos(temp.value)*temp.d1_q*temp.d1_q + sin(temp.value)*temp.d2_q2); new->d2_r2 = -(cos(temp.value)*temp.d1_r*temp.d1_r + sin(temp.value)*temp.d2_r2); new->d2_pq = -(cos(temp.value)*temp.d1_p*temp.d1_q + sin(temp.value)*temp.d2_pq); new->d2_qr = -(cos(temp.value)*temp.d1_q*temp.d1_r + sin(temp.value)*temp.d2_qr); new->d2_pr = -(cos(temp.value)*temp.d1_p*temp.d1_r + sin(temp.value)*temp.d2_pr); new->d3_p3 = -(sin(temp.value)*(temp.d3_p3 - temp.d1_p*temp.d1_p*temp.d1_p) + cos(temp.value)*(temp.d1_p*temp.d2_p2 + temp.d1_p*temp.d2_p2 + temp.d1_p*temp.d2_p2)); new->d3_q3 = -(sin(temp.value)*(temp.d3_q3 - temp.d1_q*temp.d1_q*temp.d1_q) + cos(temp.value)*(temp.d1_q*temp.d2_q2 + temp.d1_q*temp.d2_q2 + temp.d1_q*temp.d2_q2)); new->d3_r3 = -(sin(temp.value)*(temp.d3_r3 - temp.d1_r*temp.d1_r*temp.d1_r) + cos(temp.value)*(temp.d1_r*temp.d2_r2 + temp.d1_r*temp.d2_r2 + temp.d1_r*temp.d2_r2)); new->d3_p2r = -(sin(temp.value)*(temp.d3_p2r - temp.d1_r*temp.d1_p*temp.d1_p) + cos(temp.value)*(temp.d1_p*temp.d2_pr + temp.d1_p*temp.d2_pr + temp.d1_r*temp.d2_p2)); new->d3_p2q = -(sin(temp.value)*(temp.d3_p2q - temp.d1_q*temp.d1_p*temp.d1_p) + cos(temp.value)*(temp.d1_p*temp.d2_pq + temp.d1_p*temp.d2_pq + temp.d1_q*temp.d2_p2)); new->d3_q2r = -(sin(temp.value)*(temp.d3_q2r - temp.d1_r*temp.d1_q*temp.d1_q) + cos(temp.value)*(temp.d1_q*temp.d2_qr + temp.d1_q*temp.d2_qr + temp.d1_r*temp.d2_q2)); new->d3_pq2 = -(sin(temp.value)*(temp.d3_pq2 - temp.d1_p*temp.d1_q*temp.d1_q) + cos(temp.value)*(temp.d1_q*temp.d2_pq + temp.d1_q*temp.d2_pq + temp.d1_p*temp.d2_q2)); new->d3_pr2 = -(sin(temp.value)*(temp.d3_pr2 - temp.d1_p*temp.d1_r*temp.d1_r) + cos(temp.value)*(temp.d1_r*temp.d2_pr + temp.d1_r*temp.d2_pr + temp.d1_p*temp.d2_r2)); new->d3_qr2 = -(sin(temp.value)*(temp.d3_qr2 - temp.d1_q*temp.d1_r*temp.d1_r) + cos(temp.value)*(temp.d1_r*temp.d2_qr + temp.d1_r*temp.d2_qr + temp.d1_q*temp.d2_r2)); new->d3_pqr = -(sin(temp.value)*(temp.d3_pqr - temp.d1_r*temp.d1_p*temp.d1_q) + cos(temp.value)*(temp.d1_q*temp.d2_pr + temp.d1_p*temp.d2_qr + temp.d1_r*temp.d2_pq)); } ngspice-26/src/maths/deriv/Makefile.am0000644000265600020320000000064612264261473017307 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libderiv.la libderiv_la_SOURCES = \ atander.c \ cosderiv.c \ cubeder.c \ divderiv.c \ equalder.c \ expderiv.c \ invderiv.c \ multder.c \ plusder.c \ powderiv.c \ sqrtder.c \ tanderiv.c \ timesder.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/deriv/Makefile.in0000644000265600020320000004202312264261535017312 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/deriv DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libderiv_la_LIBADD = am_libderiv_la_OBJECTS = atander.lo cosderiv.lo cubeder.lo divderiv.lo \ equalder.lo expderiv.lo invderiv.lo multder.lo plusder.lo \ powderiv.lo sqrtder.lo tanderiv.lo timesder.lo libderiv_la_OBJECTS = $(am_libderiv_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libderiv_la_SOURCES) DIST_SOURCES = $(libderiv_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libderiv.la libderiv_la_SOURCES = \ atander.c \ cosderiv.c \ cubeder.c \ divderiv.c \ equalder.c \ expderiv.c \ invderiv.c \ multder.c \ plusder.c \ powderiv.c \ sqrtder.c \ tanderiv.c \ timesder.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/deriv/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/deriv/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libderiv.la: $(libderiv_la_OBJECTS) $(libderiv_la_DEPENDENCIES) $(EXTRA_libderiv_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libderiv_la_OBJECTS) $(libderiv_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/atander.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cosderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cubeder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/divderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equalder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/expderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/invderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/multder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/plusder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/powderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sqrtder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tanderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/timesder.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/deriv/timesder.c0000644000265600020320000000211512264261473017224 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * TimesDeriv computes the partial derivatives of the x*k * function where the argument to the function is itself a * function of three variables p, q, and r. k is a constant. */ void TimesDeriv(Dderivs *new, Dderivs *old, double k) { new->value = k* old->value; new->d1_p = k*old->d1_p; new->d1_q = k*old->d1_q; new->d1_r = k*old->d1_r; new->d2_p2 = k*old->d2_p2; new->d2_q2 = k*old->d2_q2; new->d2_r2 = k*old->d2_r2; new->d2_pq = k*old->d2_pq; new->d2_qr = k*old->d2_qr; new->d2_pr = k*old->d2_pr; new->d3_p3 = k*old->d3_p3; new->d3_q3 = k*old->d3_q3; new->d3_r3 = k*old->d3_r3; new->d3_p2r = k*old->d3_p2r; new->d3_p2q = k*old->d3_p2q; new->d3_q2r = k*old->d3_q2r; new->d3_pq2 = k*old->d3_pq2; new->d3_pr2 = k*old->d3_pr2; new->d3_qr2 = k*old->d3_qr2; new->d3_pqr = k*old->d3_pqr; } ngspice-26/src/maths/deriv/divderiv.c0000644000265600020320000001262012264261473017226 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * DivDeriv computes the partial derivatives of the division * function where the arguments to the function are * functions of three variables p, q, and r. */ void DivDeriv(Dderivs *new, Dderivs *old1, Dderivs *old2) { Dderivs num, den; EqualDeriv(&num, old1); EqualDeriv(&den, old2); new->value = num.value / den.value; new->d1_p = (num.d1_p - num.value * den.d1_p / den.value) / den.value; new->d1_q = (num.d1_q - num.value * den.d1_q / den.value) / den.value; new->d1_r = (num.d1_r - num.value * den.d1_r / den.value) / den.value; new->d2_p2 = (num.d2_p2 - den.d1_p * new->d1_p - new->value * den.d2_p2 + (den.d1_p * (new->value * den.d1_p - num.d1_p) / den.value)) / den.value; new->d2_q2 = (num.d2_q2 - den.d1_q * new->d1_q - new->value * den.d2_q2 + (den.d1_q * (new->value * den.d1_q - num.d1_q) / den.value)) / den.value; new->d2_r2 = (num.d2_r2 - den.d1_r * new->d1_r - new->value * den.d2_r2 + den.d1_r * (new->value * den.d1_r - num.d1_r) / den.value) / den.value; new->d2_pq = (num.d2_pq - den.d1_q * new->d1_p - new->value * den.d2_pq + den.d1_p * (new->value * den.d1_q - num.d1_q) / den.value) / den.value; new->d2_qr = (num.d2_qr - den.d1_r * new->d1_q - new->value * den.d2_qr + den.d1_q * (new->value * den.d1_r - num.d1_r) / den.value) / den.value; new->d2_pr = (num.d2_pr - den.d1_r * new->d1_p - new->value * den.d2_pr + den.d1_p * (new->value * den.d1_r - num.d1_r) / den.value) / den.value; new->d3_p3 = (-den.d1_p * new->d2_p2 + num.d3_p3 -den.d2_p2 * new->d1_p - den.d1_p * new->d2_p2 - new->d1_p * den.d2_p2 - new->value * den.d3_p3 + (den.d1_p * (new->d1_p * den.d1_p + new->value * den.d2_p2 - num.d2_p2) + (new->value * den.d1_p - num.d1_p) * (den.d2_p2 - den.d1_p * den.d1_p / den.value)) / den.value) / den.value; new->d3_q3 = (-den.d1_q * new->d2_q2 + num.d3_q3 -den.d2_q2 * new->d1_q - den.d1_q * new->d2_q2 - new->d1_q * den.d2_q2 - new->value * den.d3_q3 + (den.d1_q * (new->d1_q * den.d1_q + new->value * den.d2_q2 - num.d2_q2) + (new->value * den.d1_q - num.d1_q) * (den.d2_q2 - den.d1_q * den.d1_q / den.value)) / den.value) / den.value; new->d3_r3 = (-den.d1_r * new->d2_r2 + num.d3_r3 -den.d2_r2 * new->d1_r - den.d1_r * new->d2_r2 - new->d1_r * den.d2_r2 - new->value * den.d3_r3 + (den.d1_r * (new->d1_r * den.d1_r + new->value * den.d2_r2 - num.d2_r2) + (new->value * den.d1_r - num.d1_r) * (den.d2_r2 - den.d1_r * den.d1_r / den.value)) / den.value) / den.value; new->d3_p2r = (-den.d1_r * new->d2_p2 + num.d3_p2r -den.d2_pr * new->d1_p - den.d1_p * new->d2_pr - new->d1_r * den.d2_p2 - new->value * den.d3_p2r + (den.d1_p * (new->d1_r * den.d1_p + new->value * den.d2_pr - num.d2_pr) + (new->value * den.d1_p - num.d1_p) * (den.d2_pr - den.d1_p * den.d1_r / den.value)) / den.value) / den.value; new->d3_p2q = (-den.d1_q * new->d2_p2 + num.d3_p2q -den.d2_pq * new->d1_p - den.d1_p * new->d2_pq - new->d1_q * den.d2_p2 - new->value * den.d3_p2q + (den.d1_p * (new->d1_q * den.d1_p + new->value * den.d2_pq - num.d2_pq) + (new->value * den.d1_p - num.d1_p) * (den.d2_pq - den.d1_p * den.d1_q / den.value)) / den.value) / den.value; new->d3_q2r = (-den.d1_r * new->d2_q2 + num.d3_q2r -den.d2_qr * new->d1_q - den.d1_q * new->d2_qr - new->d1_r * den.d2_q2 - new->value * den.d3_q2r + (den.d1_q * (new->d1_r * den.d1_q + new->value * den.d2_qr - num.d2_qr) + (new->value * den.d1_q - num.d1_q) * (den.d2_qr - den.d1_q * den.d1_r / den.value)) / den.value) / den.value; new->d3_pq2 = (-den.d1_p * new->d2_q2 + num.d3_pq2 -den.d2_pq * new->d1_q - den.d1_q * new->d2_pq - new->d1_p * den.d2_q2 - new->value * den.d3_pq2 + (den.d1_q * (new->d1_p * den.d1_q + new->value * den.d2_pq - num.d2_pq) + (new->value * den.d1_q - num.d1_q) * (den.d2_pq - den.d1_q * den.d1_p / den.value)) / den.value) / den.value; new->d3_pr2 = (-den.d1_p * new->d2_r2 + num.d3_pr2 -den.d2_pr * new->d1_r - den.d1_r * new->d2_pr - new->d1_p * den.d2_r2 - new->value * den.d3_pr2 + (den.d1_r * (new->d1_p * den.d1_r + new->value * den.d2_pr - num.d2_pr) + (new->value * den.d1_r - num.d1_r) * (den.d2_pr - den.d1_r * den.d1_p / den.value)) / den.value) / den.value; new->d3_qr2 = (-den.d1_q * new->d2_r2 + num.d3_qr2 -den.d2_qr * new->d1_r - den.d1_r * new->d2_qr - new->d1_q * den.d2_r2 - new->value * den.d3_qr2 + (den.d1_r * (new->d1_q * den.d1_r + new->value * den.d2_qr - num.d2_qr) + (new->value * den.d1_r - num.d1_r) * (den.d2_qr - den.d1_r * den.d1_q / den.value)) / den.value) / den.value; new->d3_pqr = (-den.d1_r * new->d2_pq + num.d3_pqr -den.d2_qr * new->d1_p - den.d1_q * new->d2_pr - new->d1_r * den.d2_pq - new->value * den.d3_pqr + (den.d1_p * (new->d1_r * den.d1_q + new->value * den.d2_qr - num.d2_qr) + (new->value * den.d1_q - num.d1_q) * (den.d2_pr - den.d1_p * den.d1_r / den.value)) / den.value) / den.value; } ngspice-26/src/maths/deriv/plusder.c0000644000265600020320000000251712264261473017074 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * PlusDeriv computes the partial derivatives of the addition * function where the arguments to the function are * functions of three variables p, q, and r. */ void PlusDeriv(Dderivs *new, Dderivs *old1, Dderivs *old2) { new->value = old1->value + old2->value; new->d1_p = old1->d1_p + old2->d1_p; new->d1_q = old1->d1_q + old2->d1_q; new->d1_r = old1->d1_r + old2->d1_r; new->d2_p2 = old1->d2_p2 + old2->d2_p2; new->d2_q2 = old1->d2_q2 + old2->d2_q2; new->d2_r2 = old1->d2_r2 + old2->d2_r2; new->d2_pq = old1->d2_pq + old2->d2_pq; new->d2_qr = old1->d2_qr + old2->d2_qr; new->d2_pr = old1->d2_pr + old2->d2_pr; new->d3_p3 = old1->d3_p3 + old2->d3_p3; new->d3_q3 = old1->d3_q3 + old2->d3_q3; new->d3_r3 = old1->d3_r3 + old2->d3_r3; new->d3_p2r = old1->d3_p2r + old2->d3_p2r; new->d3_p2q = old1->d3_p2q + old2->d3_p2q; new->d3_q2r = old1->d3_q2r + old2->d3_q2r; new->d3_pq2 = old1->d3_pq2 + old2->d3_pq2; new->d3_pr2 = old1->d3_pr2 + old2->d3_pr2; new->d3_qr2 = old1->d3_qr2 + old2->d3_qr2; new->d3_pqr = old1->d3_pqr + old2->d3_pqr; } ngspice-26/src/maths/deriv/expderiv.c0000644000265600020320000000413612264261473017243 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * ExpDeriv computes the partial derivatives of the exponential * function where the argument to the function is itself a * function of three variables p, q, and r. */ void ExpDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = exp(temp.value); new->d1_p = new->value*temp.d1_p; new->d1_q = new->value*temp.d1_q; new->d1_r = new->value*temp.d1_r; new->d2_p2 = new->value*temp.d2_p2 + temp.d1_p*new->d1_p; new->d2_q2 = new->value*temp.d2_q2 + temp.d1_q*new->d1_q; new->d2_r2 = new->value*temp.d2_r2 + temp.d1_r*new->d1_r; new->d2_pq = new->value*temp.d2_pq + temp.d1_p*new->d1_q; new->d2_qr = new->value*temp.d2_qr + temp.d1_q*new->d1_r; new->d2_pr = new->value*temp.d2_pr + temp.d1_p*new->d1_r; new->d3_p3 = new->value*temp.d3_p3 + temp.d2_p2*new->d1_p + temp.d2_p2*new->d1_p + new->d2_p2*temp.d1_p; new->d3_q3 = new->value*temp.d3_q3 + temp.d2_q2*new->d1_q + temp.d2_q2*new->d1_q + new->d2_q2*temp.d1_q; new->d3_r3 = new->value*temp.d3_r3 + temp.d2_r2*new->d1_r + temp.d2_r2*new->d1_r + new->d2_r2*temp.d1_r; new->d3_p2r = new->value*temp.d3_p2r + temp.d2_p2*new->d1_r + temp.d2_pr*new->d1_p + new->d2_pr*temp.d1_p; new->d3_p2q = new->value*temp.d3_p2q + temp.d2_p2*new->d1_q + temp.d2_pq*new->d1_p + new->d2_pq*temp.d1_p; new->d3_q2r = new->value*temp.d3_q2r + temp.d2_q2*new->d1_r + temp.d2_qr*new->d1_q + new->d2_qr*temp.d1_q; new->d3_pq2 = new->value*temp.d3_pq2 + temp.d2_q2*new->d1_p + temp.d2_pq*new->d1_q + new->d2_pq*temp.d1_q; new->d3_pr2 = new->value*temp.d3_pr2 + temp.d2_r2*new->d1_p + temp.d2_pr*new->d1_r + new->d2_pr*temp.d1_r; new->d3_qr2 = new->value*temp.d3_qr2 + temp.d2_r2*new->d1_q + temp.d2_qr*new->d1_r + new->d2_qr*temp.d1_r; new->d3_pqr = new->value*temp.d3_pqr + temp.d2_pq*new->d1_r + temp.d2_pr*new->d1_q + new->d2_qr*temp.d1_p; } ngspice-26/src/maths/deriv/invderiv.c0000644000265600020320000000552712264261473017250 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * InvDeriv computes the partial derivatives of the 1/x * function where the argument to the function is itself a * function of three variables p, q, and r. */ void InvDeriv(Dderivs *new, Dderivs *old) { Dderivs temp; EqualDeriv(&temp, old); new->value = 1/temp.value; new->d1_p = -new->value*new->value*temp.d1_p; new->d1_q = -new->value*new->value*temp.d1_q; new->d1_r = -new->value*new->value*temp.d1_r; new->d2_p2 = -new->value*(2*new->d1_p*temp.d1_p + new->value*temp.d2_p2); new->d2_q2 = -new->value*(2*new->d1_q*temp.d1_q + new->value*temp.d2_q2); new->d2_r2 = -new->value*(2*new->d1_r*temp.d1_r + new->value*temp.d2_r2); new->d2_pq = -new->value*(2*new->d1_q*temp.d1_p + new->value*temp.d2_pq); new->d2_qr = -new->value*(2*new->d1_r*temp.d1_q + new->value*temp.d2_qr); new->d2_pr = -new->value*(2*new->d1_r*temp.d1_p + new->value*temp.d2_pr); new->d3_p3 = -(2*(temp.d1_p*new->d1_p*new->d1_p + new->value*( new->d2_p2*temp.d1_p + new->d1_p*temp.d2_p2 + new->d1_p*temp.d2_p2)) + new->value*new->value*temp.d3_p3); new->d3_q3 = -(2*(temp.d1_q*new->d1_q*new->d1_q + new->value*( new->d2_q2*temp.d1_q + new->d1_q*temp.d2_q2 + new->d1_q*temp.d2_q2)) + new->value*new->value*temp.d3_q3); new->d3_r3 = -(2*(temp.d1_r*new->d1_r*new->d1_r + new->value*( new->d2_r2*temp.d1_r + new->d1_r*temp.d2_r2 + new->d1_r*temp.d2_r2)) + new->value*new->value*temp.d3_r3); new->d3_p2r = -(2*(temp.d1_p*new->d1_p*new->d1_r + new->value*( new->d2_pr*temp.d1_p + new->d1_p*temp.d2_pr + new->d1_r*temp.d2_p2)) + new->value*new->value*temp.d3_p2r); new->d3_p2q = -(2*(temp.d1_p*new->d1_p*new->d1_q + new->value*( new->d2_pq*temp.d1_p + new->d1_p*temp.d2_pq + new->d1_q*temp.d2_p2)) + new->value*new->value*temp.d3_p2q); new->d3_q2r = -(2*(temp.d1_q*new->d1_q*new->d1_r + new->value*( new->d2_qr*temp.d1_q + new->d1_q*temp.d2_qr + new->d1_r*temp.d2_q2)) + new->value*new->value*temp.d3_q2r); new->d3_pq2 = -(2*(temp.d1_q*new->d1_q*new->d1_p + new->value*( new->d2_pq*temp.d1_q + new->d1_q*temp.d2_pq + new->d1_p*temp.d2_q2)) + new->value*new->value*temp.d3_pq2); new->d3_pr2 = -(2*(temp.d1_r*new->d1_r*new->d1_p + new->value*( new->d2_pr*temp.d1_r + new->d1_r*temp.d2_pr + new->d1_p*temp.d2_r2)) + new->value*new->value*temp.d3_pr2); new->d3_qr2 = -(2*(temp.d1_r*new->d1_r*new->d1_q + new->value*( new->d2_qr*temp.d1_r + new->d1_r*temp.d2_qr + new->d1_q*temp.d2_r2)) + new->value*new->value*temp.d3_qr2); new->d3_pqr = -(2*(temp.d1_p*new->d1_q*new->d1_r + new->value*( new->d2_qr*temp.d1_p + new->d1_q*temp.d2_pr + new->d1_r*temp.d2_pq)) + new->value*new->value*temp.d3_pqr); } ngspice-26/src/maths/deriv/multder.c0000644000265600020320000000722112264261473017067 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1989 Jaijeet S. Roychowdhury **********/ #include "ngspice/ngspice.h" #include "ngspice/distodef.h" #include "ngspice/suffix.h" /* * MultDeriv computes the partial derivatives of the multiplication * function where the arguments to the function are * functions of three variables p, q, and r. */ void MultDeriv(Dderivs *new, Dderivs *old1, Dderivs *old2) { Dderivs temp1, temp2; EqualDeriv(&temp1, old1); EqualDeriv(&temp2, old2); new->value = temp1.value * temp2.value; new->d1_p = temp1.d1_p*temp2.value + temp1.value*temp2.d1_p; new->d1_q = temp1.d1_q*temp2.value + temp1.value*temp2.d1_q; new->d1_r = temp1.d1_r*temp2.value + temp1.value*temp2.d1_r; new->d2_p2 = temp1.d2_p2*temp2.value + temp1.d1_p*temp2.d1_p + temp1.d1_p*temp2.d1_p + temp1.value*temp2.d2_p2; new->d2_q2 = temp1.d2_q2*temp2.value + temp1.d1_q*temp2.d1_q + temp1.d1_q*temp2.d1_q + temp1.value*temp2.d2_q2; new->d2_r2 = temp1.d2_r2*temp2.value + temp1.d1_r*temp2.d1_r + temp1.d1_r*temp2.d1_r + temp1.value*temp2.d2_r2; new->d2_pq = temp1.d2_pq*temp2.value + temp1.d1_p*temp2.d1_q + temp1.d1_q*temp2.d1_p + temp1.value*temp2.d2_pq; new->d2_qr = temp1.d2_qr*temp2.value + temp1.d1_q*temp2.d1_r + temp1.d1_r*temp2.d1_q + temp1.value*temp2.d2_qr; new->d2_pr = temp1.d2_pr*temp2.value + temp1.d1_p*temp2.d1_r + temp1.d1_r*temp2.d1_p + temp1.value*temp2.d2_pr; new->d3_p3 = temp1.d3_p3*temp2.value + temp1.d2_p2*temp2.d1_p + temp1.d2_p2*temp2.d1_p + temp2.d2_p2*temp1.d1_p + temp2.d2_p2*temp1.d1_p + temp1.d2_p2*temp2.d1_p + temp2.d2_p2*temp1.d1_p + temp1.value*temp2.d3_p3; new->d3_q3 = temp1.d3_q3*temp2.value + temp1.d2_q2*temp2.d1_q + temp1.d2_q2*temp2.d1_q + temp2.d2_q2*temp1.d1_q + temp2.d2_q2*temp1.d1_q + temp1.d2_q2*temp2.d1_q + temp2.d2_q2*temp1.d1_q + temp1.value*temp2.d3_q3; new->d3_r3 = temp1.d3_r3*temp2.value + temp1.d2_r2*temp2.d1_r + temp1.d2_r2*temp2.d1_r + temp2.d2_r2*temp1.d1_r + temp2.d2_r2*temp1.d1_r + temp1.d2_r2*temp2.d1_r + temp2.d2_r2*temp1.d1_r + temp1.value*temp2.d3_r3; new->d3_p2r = temp1.d3_p2r*temp2.value + temp1.d2_p2*temp2.d1_r + temp1.d2_pr*temp2.d1_p + temp2.d2_p2*temp1.d1_r + temp2.d2_pr*temp1.d1_p + temp1.d2_pr*temp2.d1_p + temp2.d2_pr*temp1.d1_p + temp1.value*temp2.d3_p2r; new->d3_p2q = temp1.d3_p2q*temp2.value + temp1.d2_p2*temp2.d1_q + temp1.d2_pq*temp2.d1_p + temp2.d2_p2*temp1.d1_q + temp2.d2_pq*temp1.d1_p + temp1.d2_pq*temp2.d1_p + temp2.d2_pq*temp1.d1_p + temp1.value*temp2.d3_p2q; new->d3_q2r = temp1.d3_q2r*temp2.value + temp1.d2_q2*temp2.d1_r + temp1.d2_qr*temp2.d1_q + temp2.d2_q2*temp1.d1_r + temp2.d2_qr*temp1.d1_q + temp1.d2_qr*temp2.d1_q + temp2.d2_qr*temp1.d1_q + temp1.value*temp2.d3_q2r; new->d3_pq2 = temp1.d3_pq2*temp2.value + temp1.d2_q2*temp2.d1_p + temp1.d2_pq*temp2.d1_q + temp2.d2_q2*temp1.d1_p + temp2.d2_pq*temp1.d1_q + temp1.d2_pq*temp2.d1_q + temp2.d2_pq*temp1.d1_q + temp1.value*temp2.d3_pq2; new->d3_pr2 = temp1.d3_pr2*temp2.value + temp1.d2_r2*temp2.d1_p + temp1.d2_pr*temp2.d1_r + temp2.d2_r2*temp1.d1_p + temp2.d2_pr*temp1.d1_r + temp1.d2_pr*temp2.d1_r + temp2.d2_pr*temp1.d1_r + temp1.value*temp2.d3_pr2; new->d3_qr2 = temp1.d3_qr2*temp2.value + temp1.d2_r2*temp2.d1_q + temp1.d2_qr*temp2.d1_r + temp2.d2_r2*temp1.d1_q + temp2.d2_qr*temp1.d1_r + temp1.d2_qr*temp2.d1_r + temp2.d2_qr*temp1.d1_r + temp1.value*temp2.d3_qr2; new->d3_pqr = temp1.d3_pqr*temp2.value + temp1.d2_pq*temp2.d1_r + temp1.d2_pr*temp2.d1_q + temp2.d2_pq*temp1.d1_r + temp2.d2_qr*temp1.d1_p + temp1.d2_qr*temp2.d1_p + temp2.d2_pr*temp1.d1_q + temp1.value*temp2.d3_pqr; } ngspice-26/src/maths/poly/0000755000265600020320000000000012264261703015113 5ustar andreasadminngspice-26/src/maths/poly/polyfit.c0000644000265600020320000000747112264261473016762 0ustar andreasadmin#include "ngspice/ngspice.h" #include "polyfit.h" #include "polyeval.h" /* Takes n = (degree+1) doubles, and fills in result with the n * coefficients of the polynomial that will fit them. It also takes a * pointer to an array of n ^ 2 + n doubles to use for scratch -- we * want to make this fast and avoid doing tmallocs for each call. */ bool ft_polyfit(double *xdata, double *ydata, double *result, int degree, double *scratch) { double *mat1 = scratch; int l, k, j, i; int n = degree + 1; double *mat2 = scratch + n * n; /* XXX These guys are hacks! */ double d; /* speed up fitting process, e.g. for command 'linearize' */ if (degree == 1) { result[0] = (xdata[1] * ydata[0] - xdata[0] * ydata[1]) / (xdata[1] - xdata[0]); result[1] = (ydata[1] - ydata[0]) / (xdata[1] - xdata[0]); return (TRUE); } memset(result, 0, (size_t) (n) * sizeof(double)); memset(mat1, 0, (size_t) (n * n) * sizeof(double)); memcpy(mat2, ydata, (size_t) (n) * sizeof(double)); /* Fill in the matrix with x^k for 0 <= k <= degree for each point */ l = 0; for (i = 0; i < n; i++) { d = 1.0; for (j = 0; j < n; j++) { mat1[l] = d; d *= xdata[i]; l += 1; } } /* Do Gauss-Jordan elimination on mat1. */ for (i = 0; i < n; i++) { int lindex; double largest; /* choose largest pivot */ for (j=i, largest = mat1[i * n + i], lindex = i; j < n; j++) { if (fabs(mat1[j * n + i]) > largest) { largest = fabs(mat1[j * n + i]); lindex = j; } } if (lindex != i) { /* swap rows i and lindex */ for (k = 0; k < n; k++) { d = mat1[i * n + k]; mat1[i * n + k] = mat1[lindex * n + k]; mat1[lindex * n + k] = d; } d = mat2[i]; mat2[i] = mat2[lindex]; mat2[lindex] = d; } /* Make sure we have a non-zero pivot. */ if (mat1[i * n + i] == 0.0) { /* this should be rotated. */ return (FALSE); } for (j = i + 1; j < n; j++) { d = mat1[j * n + i] / mat1[i * n + i]; for (k = 0; k < n; k++) mat1[j * n + k] -= d * mat1[i * n + k]; mat2[j] -= d * mat2[i]; } } for (i = n - 1; i > 0; i--) for (j = i - 1; j >= 0; j--) { d = mat1[j * n + i] / mat1[i * n + i]; for (k = 0; k < n; k++) mat1[j * n + k] -= d * mat1[i * n + k]; mat2[j] -= d * mat2[i]; } /* Now write the stuff into the result vector. */ for (i = 0; i < n; i++) { result[i] = mat2[i] / mat1[i * n + i]; /* printf(cp_err, "result[%d] = %G\n", i, result[i]);*/ } #define ABS_TOL 0.001 #define REL_TOL 0.001 /* Let's check and make sure the coefficients are ok. If they aren't, * just return FALSE. This is not the best way to do it. */ for (i = 0; i < n; i++) { d = ft_peval(xdata[i], result, degree); if (fabs(d - ydata[i]) > ABS_TOL) { /* fprintf(cp_err, "Error: polyfit: x = %e, y = %le, int = %e\n", xdata[i], ydata[i], d); printmat("mat1", mat1, n, n); printmat("mat2", mat2, n, 1); */ return (FALSE); } else if (fabs(d - ydata[i]) / (fabs(d) > ABS_TOL ? fabs(d) : ABS_TOL) > REL_TOL) { /* fprintf(cp_err, "Error: polyfit: x = %e, y = %le, int = %e\n", xdata[i], ydata[i], d); printmat("mat1", mat1, n, n); printmat("mat2", mat2, n, 1); */ return (FALSE); } } return (TRUE); } ngspice-26/src/maths/poly/polyderiv.h0000644000265600020320000000016012264261473017302 0ustar andreasadmin#ifndef ngspice_POLYDERIV_H #define ngspice_POLYDERIV_H void ft_polyderiv(double *coeffs, int degree); #endif ngspice-26/src/maths/poly/polyeval.c0000644000265600020320000000044612264261473017122 0ustar andreasadmin#include "polyeval.h" double ft_peval(double x, double *coeffs, int degree) { double y; int i; if (!coeffs) return 0.0; /* XXX Should not happen */ y = coeffs[degree]; /* there are (degree+1) coeffs */ for (i = degree - 1; i >= 0; i--) { y *= x; y += coeffs[i]; } return y; } ngspice-26/src/maths/poly/polyeval.h0000644000265600020320000000016612264261473017126 0ustar andreasadmin#ifndef ngspice_POLYEVAL_H #define ngspice_POLYEVAL_H double ft_peval(double x, double *coeffs, int degree); #endif ngspice-26/src/maths/poly/ChangeLog0000644000265600020320000000026412264261473016673 0ustar andreasadmin2000-10-13 Arno W. Peters * polyfit.c: Input matrix got overwritten too soon, leading to NaN results for Fourier Analysis. Fix due to Daniele Gordini. ngspice-26/src/maths/poly/Makefile.am0000644000265600020320000000055712264261473017162 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libpoly.la libpoly_la_SOURCES = \ interpolate.c \ interpolate.h \ polyfit.c \ polyfit.h \ polyderiv.c \ polyderiv.h \ polyeval.c \ polyeval.h EXTRA_DIST = poly.h AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/poly/Makefile.in0000644000265600020320000004035012264261535017165 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/poly DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpoly_la_LIBADD = am_libpoly_la_OBJECTS = interpolate.lo polyfit.lo polyderiv.lo \ polyeval.lo libpoly_la_OBJECTS = $(am_libpoly_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libpoly_la_SOURCES) DIST_SOURCES = $(libpoly_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libpoly.la libpoly_la_SOURCES = \ interpolate.c \ interpolate.h \ polyfit.c \ polyfit.h \ polyderiv.c \ polyderiv.h \ polyeval.c \ polyeval.h EXTRA_DIST = poly.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/poly/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/poly/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libpoly.la: $(libpoly_la_OBJECTS) $(libpoly_la_DEPENDENCIES) $(EXTRA_libpoly_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libpoly_la_OBJECTS) $(libpoly_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interpolate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyderiv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyeval.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/polyfit.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/poly/polyderiv.c0000644000265600020320000000023512264261473017300 0ustar andreasadmin#include "polyderiv.h" void ft_polyderiv(double *coeffs, int degree) { int i; for (i = 0; i < degree; i++) { coeffs[i] = (i + 1) * coeffs[i + 1]; } } ngspice-26/src/maths/poly/interpolate.h0000644000265600020320000000032212264261473017613 0ustar andreasadmin#ifndef ngspice_INTERPOLATE_H #define ngspice_INTERPOLATE_H #include "ngspice/bool.h" bool ft_interpolate(double *data, double *ndata, double *oscale, int olen, double *nscale, int nlen, int degree); #endif ngspice-26/src/maths/poly/polyfit.h0000644000265600020320000000026612264261473016762 0ustar andreasadmin#ifndef ngspice_POLYFIT_H #define ngspice_POLYFIT_H #include "ngspice/bool.h" bool ft_polyfit(double *xdata, double *ydata, double *result, int degree, double *scratch); #endif ngspice-26/src/maths/poly/poly.h0000644000265600020320000000030712264261473016253 0ustar andreasadmin/* The public interface to the polygon library. */ #ifndef ngspice_POLY_H #define ngspice_POLY_H #include "interpolate.h" #include "polyderiv.h" #include "polyeval.h" #include "polyfit.h" #endif ngspice-26/src/maths/poly/interpolate.c0000644000265600020320000000724112264261473017615 0ustar andreasadmin#include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "interpolate.h" #include "polyeval.h" #include "polyfit.h" /* Returns thestrchr of the last element that was calculated. oval is * the value of the old scale at the end of the interval that is being * interpolated from, and sign is 1 if the old scale was increasing, * and -1 if it was decreasing. */ static int putinterval(double *poly, int degree, double *nvec, int last, double *nscale, int nlen, double oval, int sign) { int end, i; /* See how far we have to go. */ for (end = last + 1; end < nlen; end++) if (nscale[end] * sign > oval * sign) break; end--; for (i = last + 1; i <= end; i++) nvec[i] = ft_peval(nscale[i], poly, degree); return (end); } /* Interpolate data from oscale to nscale. data is assumed to be olen long, * ndata will be nlen long. Returns FALSE if the scales are too strange * to deal with. Note that we are guaranteed that either both scales are * strictly increasing or both are strictly decreasing. */ bool ft_interpolate(double *data, double *ndata, double *oscale, int olen, double *nscale, int nlen, int degree) { double *result, *scratch, *xdata, *ydata; int sign, lastone, i, l; if ((olen < 2) || (nlen < 2)) { fprintf(cp_err, "Error: lengths too small to interpolate.\n"); return (FALSE); } if ((degree < 1) || (degree > olen)) { fprintf(cp_err, "Error: degree is %d, can't interpolate.\n", degree); return (FALSE); } if (oscale[1] < oscale[0]) sign = -1; else sign = 1; scratch = TMALLOC(double, (degree + 1) * (degree + 2)); result = TMALLOC(double, degree + 1); xdata = TMALLOC(double, degree + 1); ydata = TMALLOC(double, degree + 1); /* Deal with the first degree pieces. */ bcopy(data, ydata, (size_t) (degree + 1) * sizeof (double)); bcopy(oscale, xdata, (size_t) (degree + 1) * sizeof (double)); while (!ft_polyfit(xdata, ydata, result, degree, scratch)) { /* If it doesn't work this time, bump the interpolation * degree down by one. */ if (--degree == 0) { fprintf(cp_err, "ft_interpolate: Internal Error.\n"); return (FALSE); } } /* Add this part of the curve. What we do is evaluate the polynomial * at those points between the last one and the one that is greatest, * without being greater than the leftmost old scale point, or least * if the scale is decreasing at the end of the interval we are looking * at. */ lastone = -1; for (i = 0; i < degree; i++) { lastone = putinterval(result, degree, ndata, lastone, nscale, nlen, xdata[i], sign); } /* Now plot the rest, piece by piece. l is the * last element under consideration. */ for (l = degree + 1; l < olen; l++) { /* Shift the old stuff by one and get another value. */ for (i = 0; i < degree; i++) { xdata[i] = xdata[i + 1]; ydata[i] = ydata[i + 1]; } ydata[i] = data[l]; xdata[i] = oscale[l]; while (!ft_polyfit(xdata, ydata, result, degree, scratch)) { if (--degree == 0) { fprintf(cp_err, "interpolate: Internal Error.\n"); return (FALSE); } } lastone = putinterval(result, degree, ndata, lastone, nscale, nlen, xdata[i], sign); } if (lastone < nlen - 1) /* ??? */ ndata[nlen - 1] = data[olen - 1]; tfree(scratch); tfree(xdata); tfree(ydata); tfree(result); return (TRUE); } ngspice-26/src/maths/cmaths/0000755000265600020320000000000012264261703015407 5ustar andreasadminngspice-26/src/maths/cmaths/test_cx_cph.c0000644000265600020320000000300612264261473020061 0ustar andreasadmin#include #include #include #include "ngspice/config.h" #include "ngspice/memory.h" #include "ngspice/dvec.h" #include "ngspice/complex.h" #include "ngspice/defines.h" #include "cmath.h" #include "cmath1.h" FILE *cp_err; static int eq_p(double a, double b, double eps) { return fabs(a-b) < eps; } int main(void) { ngcomplex_t *c = NULL; double *d = NULL; short int t1; short int t2; int n1, n2; double eps = DBL_EPSILON; cp_err = stderr; n1 = 9; t1 = VF_COMPLEX; c = alloc_c(n1); realpart(c[0]) = 0.0; imagpart(c[0]) = +1.0; /* i^1 */ realpart(c[1]) = -1.0; imagpart(c[1]) = 0.0; /* i^2 */ realpart(c[2]) = 0.0; imagpart(c[2]) = -1.0; /* i^3 */ realpart(c[3]) = +1.0; imagpart(c[3]) = 0.0; /* i^4 */ realpart(c[4]) = 0.0; imagpart(c[4]) = +1.0; /* i^5 */ realpart(c[5]) = +1.0; imagpart(c[5]) = 0.0; /* i^4 */ realpart(c[6]) = 0.0; imagpart(c[6]) = -1.0; /* i^3 */ realpart(c[7]) = -1.0; imagpart(c[7]) = 0.0; /* i^2 */ realpart(c[8]) = 0.0; imagpart(c[8]) = +1.0; /* i^1 */ d = (double *) cx_cph((void *) c, t1, n1, &n2, &t2); if ( eq_p(1*M_PI/2, d[0], eps) && eq_p(2*M_PI/2, d[1], eps) && eq_p(3*M_PI/2, d[2], eps) && eq_p(4*M_PI/2, d[3], eps) && eq_p(5*M_PI/2, d[4], eps) && eq_p(4*M_PI/2, d[5], eps) && eq_p(3*M_PI/2, d[6], eps) && eq_p(2*M_PI/2, d[7], eps) && eq_p(1*M_PI/2, d[8], eps) ) return 0; else return 1; } ngspice-26/src/maths/cmaths/cmath2.c0000644000265600020320000005270512264261473016746 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to do complex mathematical functions. These routines require * the -lm libraries. We sacrifice a lot of space to be able * to avoid having to do a seperate call for every vector element, * but it pays off in time savings. These routines should never * allow FPE's to happen. * * Complex functions are called as follows: * cx_something(data, type, length, &newlength, &newtype), * and return a char * that is cast to complex or double. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/dvec.h" #include "cmath.h" #include "cmath2.h" extern void checkseed(void); /* seed random or set by 'set rndseed=value'*/ extern double drand(void); /* from randnumb.c */ extern double gauss0(void); /* from randnumb.c */ extern int poisson(double); /* from randnumb.c */ extern double exprand(double); /* from randnumb.c */ static double cx_max_local(void *data, short int type, int length) { double largest = 0.0; if (type == VF_COMPLEX) { ngcomplex_t *cc = (ngcomplex_t *) data; int i; for (i = 0; i < length; i++) if (cmag(cc[i]) > largest) largest = cmag(cc[i]); } else { double *dd = (double *) data; int i; for (i = 0; i < length; i++) if (FTEcabs(dd[i]) > largest) largest = FTEcabs(dd[i]); } return largest; } /* Normalize the data so that the magnitude of the greatest value is 1. */ void * cx_norm(void *data, short int type, int length, int *newlength, short int *newtype) { double largest = 0.0; largest = cx_max_local(data, type, length); if (largest == 0.0) { fprintf(cp_err, "Error: can't normalize a 0 vector\n"); return (NULL); } *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = realpart(cc[i]) / largest; imagpart(c[i]) = imagpart(cc[i]) / largest; } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = dd[i] / largest; return ((void *) d); } } void * cx_uminus(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = - realpart(cc[i]); imagpart(c[i]) = - imagpart(cc[i]); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = - dd[i]; return ((void *) d); } } /* random integers drawn from a uniform distribution *data in: integer numbers, their absolut values are used, maximum is RAND_MAX (32767) *data out: random integers in interval [0, data[i][ standard library function rand() is used */ void * cx_rnd(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; checkseed(); if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { int j, k; j = (int)floor(realpart(cc[i])); k = (int)floor(imagpart(cc[i])); realpart(c[i]) = j ? rand() % j : 0; imagpart(c[i]) = k ? rand() % k : 0; } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { int j; j = (int)floor(dd[i]); d[i] = j ? rand() % j : 0; } return ((void *) d); } } /* random numbers drawn from a uniform distribution *data out: random numbers in interval [-1, 1[ */ void * cx_sunif(void *data, short int type, int length, int *newlength, short int *newtype) { NG_IGNORE(data); *newlength = length; checkseed(); if (type == VF_COMPLEX) { ngcomplex_t *c; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = drand(); imagpart(c[i]) = drand(); } return ((void *) c); } else { double *d; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { d[i] = drand(); } return ((void *) d); } } /* random numbers drawn from a poisson distribution *data in: lambda *data out: random integers according to poisson distribution, with lambda given by each vector element */ void * cx_poisson(void *data, short int type, int length, int *newlength, short int *newtype) { NG_IGNORE(data); *newlength = length; checkseed(); if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = poisson (realpart(cc[i])); imagpart(c[i]) = poisson (imagpart(cc[i])); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { d[i] = poisson(dd[i]); } return ((void *) d); } } /* random numbers drawn from an exponential distribution *data in: Mean values *data out: exponentially distributed random numbers, with mean given by each vector element */ void * cx_exponential(void *data, short int type, int length, int *newlength, short int *newtype) { NG_IGNORE(data); *newlength = length; checkseed(); if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = exprand(realpart(cc[i])); imagpart(c[i]) = exprand(imagpart(cc[i])); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { d[i] = exprand(dd[i]); } return ((void *) d); } } /* random numbers drawn from a Gaussian distribution mean 0, std dev 1 */ void * cx_sgauss(void *data, short int type, int length, int *newlength, short int *newtype) { NG_IGNORE(data); *newlength = length; checkseed(); if (type == VF_COMPLEX) { ngcomplex_t *c; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = gauss0(); imagpart(c[i]) = gauss0(); } return ((void *) c); } else { double *d; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { d[i] = gauss0(); } return ((void *) d); } } /* Compute the avg of a vector. Created by A.M.Roldan 2005-05-21 */ void *cx_avg(void *data, short int type, int length, int *newlength, short int *newtype) { double sum_real = 0.0, sum_imag = 0.0; int i; if (type == VF_REAL) { double *d = alloc_d(length); double *dd = (double *) data; *newtype = VF_REAL; *newlength = length; for (i = 0; i < length; i++) { sum_real += dd[i]; d[i] = sum_real / (double)(i+1); } return ((void *) d); } else { ngcomplex_t *c = alloc_c(length); ngcomplex_t *cc = (ngcomplex_t *) data; *newtype = VF_COMPLEX; *newlength = length; for (i = 0; i < length; i++) { sum_real += realpart(cc[i]); realpart(c[i]) = sum_real / (double)(i+1); sum_imag += imagpart(cc[i]); imagpart(c[i]) = sum_imag / (double)(i+1); } return ((void *) c); } } /* Compute the mean of a vector. */ void * cx_mean(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = 1; rcheck(length > 0, "mean"); if (type == VF_REAL) { double *d; double *dd = (double *) data; int i; d = alloc_d(1); *newtype = VF_REAL; for (i = 0; i < length; i++) *d += dd[i]; *d /= length; return ((void *) d); } else { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(1); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(*c) += realpart(cc[i]); imagpart(*c) += imagpart(cc[i]); } realpart(*c) /= length; imagpart(*c) /= length; return ((void *) c); } } void * cx_length(void *data, short int type, int length, int *newlength, short int *newtype) { double *d; NG_IGNORE(data); NG_IGNORE(type); *newlength = 1; *newtype = VF_REAL; d = alloc_d(1); *d = length; return ((void *) d); } /* Return a vector from 0 to the magnitude of the argument. Length of the * argument is irrelevent. */ void * cx_vector(void *data, short int type, int length, int *newlength, short int *newtype) { ngcomplex_t *cc = (ngcomplex_t *) data; double *dd = (double *) data; int i, len; double *d; NG_IGNORE(length); if (type == VF_REAL) len = (int)FTEcabs(*dd); else len = (int)cmag(*cc); if (len == 0) len = 1; d = alloc_d(len); *newlength = len; *newtype = VF_REAL; for (i = 0; i < len; i++) d[i] = i; return ((void *) d); } /* Create a vector of the given length composed of all ones. */ void * cx_unitvec(void *data, short int type, int length, int *newlength, short int *newtype) { ngcomplex_t *cc = (ngcomplex_t *) data; double *dd = (double *) data; int i, len; double *d; NG_IGNORE(length); if (type == VF_REAL) len = (int)FTEcabs(*dd); else len = (int)cmag(*cc); if (len == 0) len = 1; d = alloc_d(len); *newlength = len; *newtype = VF_REAL; for (i = 0; i < len; i++) d[i] = 1; return ((void *) d); } /* Calling methods for these functions are: * cx_something(data1, data2, datatype1, datatype2, length) * * The length of the two data vectors is always the same, and is the length * of the result. The result type is complex iff one of the args is * complex. */ void * cx_plus(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) d[i] = dd1[i] + dd2[i]; return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } realpart(c[i]) = realpart(c1) + realpart(c2); imagpart(c[i]) = imagpart(c1) + imagpart(c2); } return ((void *) c); } } void * cx_minus(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) d[i] = dd1[i] - dd2[i]; return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } realpart(c[i]) = realpart(c1) - realpart(c2); imagpart(c[i]) = imagpart(c1) - imagpart(c2); } return ((void *) c); } } void * cx_times(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) d[i] = dd1[i] * dd2[i]; return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } realpart(c[i]) = realpart(c1) * realpart(c2) - imagpart(c1) * imagpart(c2); imagpart(c[i]) = imagpart(c1) * realpart(c2) + realpart(c1) * imagpart(c2); } return ((void *) c); } } void * cx_mod(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i, r1, r2, i1, i2, r3, i3; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) { r1 = (int)floor(FTEcabs(dd1[i])); rcheck(r1 > 0, "mod"); r2 = (int)floor(FTEcabs(dd2[i])); rcheck(r2 > 0, "mod"); r3 = r1 % r2; d[i] = (double) r3; } return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } r1 = (int)floor(FTEcabs(realpart(c1))); rcheck(r1 > 0, "mod"); r2 = (int)floor(FTEcabs(realpart(c2))); rcheck(r2 > 0, "mod"); i1 = (int)floor(FTEcabs(imagpart(c1))); rcheck(i1 > 0, "mod"); i2 = (int)floor(FTEcabs(imagpart(c2))); rcheck(i2 > 0, "mod"); r3 = r1 % r2; i3 = i1 % i2; realpart(c[i]) = (double) r3; imagpart(c[i]) = (double) i3; } return ((void *) c); } } /* Routoure JM : Compute the max of a vector. */ void * cx_max(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = 1; /* test if length >0 et affiche un message d'erreur */ rcheck(length > 0, "mean"); if (type == VF_REAL) { double largest=0.0; double *d; double *dd = (double *) data; int i; d = alloc_d(1); *newtype = VF_REAL; largest=dd[0]; for (i = 1; i < length; i++) if (dd[i]>largest) largest=dd[i]; *d=largest; return ((void *) d); } else { double largest_real=0.0; double largest_complex=0.0; ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(1); *newtype = VF_COMPLEX; largest_real=realpart(*cc); largest_complex=imagpart(*cc); for (i = 0; i < length; i++) { if (realpart(cc[i])>largest_real) largest_real=realpart(cc[i]); if (imagpart(cc[i])>largest_complex) largest_complex=imagpart(cc[i]); } realpart(*c) = largest_real; imagpart(*c) = largest_complex; return ((void *) c); } } /* Routoure JM : Compute the min of a vector. */ void * cx_min(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = 1; /* test if length >0 et affiche un message d'erreur */ rcheck(length > 0, "mean"); if (type == VF_REAL) { double smallest; double *d; double *dd = (double *) data; int i; d = alloc_d(1); *newtype = VF_REAL; smallest=dd[0]; for (i = 1; i < length; i++) if (dd[i]0 et affiche un message d'erreur */ rcheck(length > 0, "deriv"); if (type == VF_REAL) { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; d[0]=dd[1]-dd[0]; d[length-1]=dd[length-1]-dd[length-2]; for (i = 1; i < length-1; i++) d[i]=dd[i+1]-dd[i-1]; return ((void *) d); } else { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; realpart(*c)=realpart(cc[1])-realpart(cc[0]); imagpart(*c)=imagpart(cc[1])-imagpart(cc[0]); realpart(c[length-1])=realpart(cc[length-1])-realpart(cc[length-2]); imagpart(c[length-1])=imagpart(cc[length-1])-imagpart(cc[length-2]); for (i = 1; i < (length-1); i++) { realpart(c[i])=realpart(cc[i+1])-realpart(cc[i-1]); imagpart(c[i])=imagpart(cc[i+1])-imagpart(cc[i-1]); } return ((void *) c); } } void * cx_floor(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = floor(realpart(cc[i])); imagpart(c[i]) = floor(imagpart(cc[i])); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = floor(dd[i]); return ((void *) d); } } void * cx_ceil(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = ceil(realpart(cc[i])); imagpart(c[i]) = ceil(imagpart(cc[i])); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = ceil(dd[i]); return ((void *) d); } } ngspice-26/src/maths/cmaths/cmath4.h0000644000265600020320000000224412264261473016746 0ustar andreasadmin/************* * Header file for cmath4.c * 1999 E. Rouat ************/ #ifndef ngspice_CMATH4_H #define ngspice_CMATH4_H void * cx_and(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_or(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_not(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_interpolate(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping); void * cx_deriv(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping); void * cx_group_delay(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping); void * cx_fft(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping); void * cx_ifft(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping); #endif ngspice-26/src/maths/cmaths/cmath3.c0000644000265600020320000003273012264261473016743 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to do complex mathematical functions. These routines require * the -lm libraries. We sacrifice a lot of space to be able * to avoid having to do a seperate call for every vector element, * but it pays off in time savings. These routines should never * allow FPE's to happen. * * Complex functions are called as follows: * cx_something(data, type, length, &newlength, &newtype), * and return a char * that is cast to complex or double. */ #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/dvec.h" #include "cmath.h" #include "cmath3.h" static ngcomplex_t *cexp_sp3(ngcomplex_t *c); /* cexp exist's in some newer compiler */ static ngcomplex_t *cln(ngcomplex_t *c); static ngcomplex_t *ctimes(ngcomplex_t *c1, ngcomplex_t *c2); void * cx_divide(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) { rcheck(dd2[i] != 0, "divide"); d[i] = dd1[i] / dd2[i]; } return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } rcheck((realpart(c2) != 0) || (imagpart(c2) != 0), "divide"); #define xx5 realpart(c1) #define xx6 imagpart(c1) cdiv(xx5, xx6, realpart(c2), imagpart(c2), realpart(c[i]), imagpart(c[i])); } return ((void *) c); } } /* Should just use "j( )" */ /* The comma operator. What this does (unless it is part of the argument * list of a user-defined function) is arg1 + j(arg2). */ void * cx_comma(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2; int i; c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } realpart(c[i]) = realpart(c1) + imagpart(c2); imagpart(c[i]) = imagpart(c1) + realpart(c2); } return ((void *) c); } void * cx_power(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t *c, c1, c2, *t; int i; if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { d = alloc_d(length); for (i = 0; i < length; i++) { rcheck((dd1[i] >= 0) || (floor(dd2[i]) == ceil(dd2[i])), "power"); d[i] = pow(dd1[i], dd2[i]); } return ((void *) d); } else { c = alloc_c(length); for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } if ((realpart(c1) == 0.0) && (imagpart(c1) == 0.0)) { realpart(c[i]) = 0.0; imagpart(c[i]) = 0.0; } else { /* if ((imagpart(c1) != 0.0) && (imagpart(c2) != 0.0)) */ t = cexp_sp3(ctimes(&c2, cln(&c1))); realpart(c[i]) = realpart(*t); imagpart(c[i]) = imagpart(*t); /* } else { realpart(c[i]) = pow(realpart(c1), realpart(c2)); imagpart(c[i]) = 0.0; */ } } return ((void *) c); } } /* These are unnecessary... Only cx_power uses them... */ static ngcomplex_t * cexp_sp3(ngcomplex_t *c) { static ngcomplex_t r; double d; d = exp(realpart(*c)); realpart(r) = d * cos(imagpart(*c)); if (imagpart(*c) != 0.0) imagpart(r) = d * sin(imagpart(*c)); else imagpart(r) = 0.0; return (&r); } static ngcomplex_t * cln(ngcomplex_t *c) { static ngcomplex_t r; rcheck(cmag(*c) != 0, "ln"); realpart(r) = log(cmag(*c)); if (imagpart(*c) != 0.0) imagpart(r) = atan2(imagpart(*c), realpart(*c)); else imagpart(r) = 0.0; return (&r); } static ngcomplex_t * ctimes(ngcomplex_t *c1, ngcomplex_t *c2) { static ngcomplex_t r; realpart(r) = realpart(*c1) * realpart(*c2) - imagpart(*c1) * imagpart(*c2); imagpart(r) = imagpart(*c1) * realpart(*c2) + realpart(*c1) * imagpart(*c2); return (&r); } /* Now come all the relational and logical functions. It's overkill to put * them here, but... Note that they always return a real value, with the * result the same length as the arguments. */ void * cx_eq(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] == dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) == realpart(c2)) && (imagpart(c1) == imagpart(c2))); } } return ((void *) d); } void * cx_gt(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] > dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) > realpart(c2)) && (imagpart(c1) > imagpart(c2))); } } return ((void *) d); } void * cx_lt(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] < dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) < realpart(c2)) && (imagpart(c1) < imagpart(c2))); } } return ((void *) d); } void * cx_ge(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] >= dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) >= realpart(c2)) && (imagpart(c1) >= imagpart(c2))); } } return ((void *) d); } void * cx_le(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] <= dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) <= realpart(c2)) && (imagpart(c1) <= imagpart(c2))); } } return ((void *) d); } void * cx_ne(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) if (dd1[i] != dd2[i]) d[i] = 1.0; else d[i] = 0.0; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) != realpart(c2)) && (imagpart(c1) != imagpart(c2))); } } return ((void *) d); } ngspice-26/src/maths/cmaths/test_cx_ph.c0000644000265600020320000000124512264261473017721 0ustar andreasadmin#include #include #include #include "ngspice/config.h" #include "ngspice/memory.h" #include "ngspice/dvec.h" #include "ngspice/complex.h" #include "ngspice/defines.h" #include "cmath.h" #include "cmath1.h" FILE *cp_err; int main(void) { ngcomplex_t *c = NULL; double *d = NULL; short int t1; short int t2; int n1; int n2; double eps = DBL_EPSILON; cp_err = stderr; n1 = 1; t1 = VF_COMPLEX; c = alloc_c(n1); realpart(c[0]) = .0; imagpart(c[0]) = 1.0; d = (double *) cx_ph((void *) c, t1, n1, &n2, &t2); if (M_PI/2 - eps < d[0] && d[0] < M_PI/2 + eps) return 0; else return 1; } ngspice-26/src/maths/cmaths/cmath2.h0000644000265600020320000000407212264261473016745 0ustar andreasadmin/************* * Header file for cmath2.c * 1999 E. Rouat ************/ #ifndef ngspice_CMATH2_H #define ngspice_CMATH2_H void * cx_norm(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_uminus(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_rnd(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sunif(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sgauss(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_poisson(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_exponential(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_mean(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_length(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_vector(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_unitvec(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_plus(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_minus(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_times(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_mod(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_max(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_min(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_d(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_avg(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_floor(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_ceil(void *data, short int type, int length, int *newlength, short int *newtype); #endif ngspice-26/src/maths/cmaths/cmath3.h0000644000265600020320000000174112264261473016746 0ustar andreasadmin/************* * Header file for cmath3.c * 1999 E. Rouat ************/ #ifndef ngspice_CMATH3_H #define ngspice_CMATH3_H void * cx_divide(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_comma(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_power(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_eq(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_gt(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_lt(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_ge(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_le(void *data1, void *data2, short int datatype1, short int datatype2, int length); void * cx_ne(void *data1, void *data2, short int datatype1, short int datatype2, int length); #endif ngspice-26/src/maths/cmaths/Makefile.am0000644000265600020320000000216712264261473017455 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libcmaths.la libcmaths_la_SOURCES = \ cmath.h \ cmath1.c \ cmath1.h \ cmath2.c \ cmath2.h \ cmath3.c \ cmath3.h \ cmath4.c \ cmath4.h if !TCL_MODULE if !WINGUI if !SHARED_MODULE noinst_PROGRAMS = test_cx_mag test_cx_j test_cx_ph test_cx_cph test_cx_ph_SOURCES = \ test_cx_ph.c test_cx_ph_LDADD = \ libcmaths.la \ ../../misc/libmisc.la \ $(TCL_LIB_SPEC) test_cx_cph_SOURCES = \ test_cx_cph.c test_cx_cph_LDADD = \ libcmaths.la \ ../../misc/libmisc.la \ $(TCL_LIB_SPEC) test_cx_mag_SOURCES = \ test_cx_mag.c test_cx_mag_LDADD = \ libcmaths.la \ ../../misc/libmisc.la \ $(TCL_LIB_SPEC) test_cx_j_SOURCES = \ test_cx_j.c test_cx_j_LDADD = \ libcmaths.la \ ../../misc/libmisc.la \ $(TCL_LIB_SPEC) TESTS = test_cx_mag test_cx_j test_cx_ph test_cx_cph endif !SHARED_MODULE endif !WINGUI endif !TCL_MODULE AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/maths/poly AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/cmaths/cmath1.c0000644000265600020320000005115612264261473016744 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to do complex mathematical functions. These routines require * the -lm libraries. We sacrifice a lot of space to be able * to avoid having to do a seperate call for every vector element, * but it pays off in time savings. These routines should never * allow FPE's to happen. * * Complex functions are called as follows: * cx_something(data, type, length, &newlength, &newtype), * and return a char * that is cast to complex or double. * */ #include "ngspice/ngspice.h" #include "ngspice/memory.h" #include "ngspice/cpdefs.h" #include "ngspice/dvec.h" #include "cmath.h" #include "cmath1.h" #ifdef HAS_WINGUI #define fp_r_i_n_t_f fprintf #endif /* This flag determines whether degrees or radians are used. The radtodeg * and degtorad macros are no-ops if this is FALSE. */ bool cx_degrees = FALSE; void * cx_mag(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_REAL) for (i = 0; i < length; i++) d[i] = FTEcabs(dd[i]); else for (i = 0; i < length; i++) d[i] = cmag(cc[i]); return ((void *) d); } void * cx_ph(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) for (i = 0; i < length; i++) { d[i] = radtodeg(cph(cc[i])); } /* Otherwise it is 0, but tmalloc zeros the stuff already. */ return ((void *) d); } /* SJdV Modified from above to find closest from +2pi,0, -2pi */ void * cx_cph(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) { double last_ph = cph(cc[0]); d[0] = radtodeg(last_ph); for (i = 1; i < length; i++) { double ph = cph(cc[i]); last_ph = ph - (2*M_PI) * floor((ph - last_ph)/(2*M_PI) + 0.5); d[i] = radtodeg(last_ph); } } /* Otherwise it is 0, but tmalloc zeros the stuff already. */ return ((void *) d); } /* Modified from above but with real phase vector in degrees as input */ void * cx_unwrap(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_REAL) { double last_ph = degtorad(dd[0]); d[0] = last_ph; for (i = 1; i < length; i++) { double ph = degtorad(dd[i]); last_ph = ph - (2*M_PI) * floor((ph - last_ph)/(2*M_PI) + 0.5); d[i] = radtodeg(last_ph); } } /* Otherwise it is 0, but tmalloc zeros the stuff already. */ return ((void *) d); } /* If this is pure imaginary we might get real, but never mind... */ void * cx_j(void *data, short int type, int length, int *newlength, short int *newtype) { ngcomplex_t *c = alloc_c(length); ngcomplex_t *cc = (ngcomplex_t *) data; double *dd = (double *) data; int i; *newlength = length; *newtype = VF_COMPLEX; if (type == VF_COMPLEX) for (i = 0; i < length; i++) { realpart(c[i]) = - imagpart(cc[i]); imagpart(c[i]) = realpart(cc[i]); } else for (i = 0; i < length; i++) { imagpart(c[i]) = dd[i]; /* Real part is already 0. */ } return ((void *) c); } void * cx_real(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) for (i = 0; i < length; i++) d[i] = realpart(cc[i]); else for (i = 0; i < length; i++) d[i] = dd[i]; return ((void *) d); } void * cx_imag(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) for (i = 0; i < length; i++) d[i] = imagpart(cc[i]); else for (i = 0; i < length; i++) d[i] = dd[i]; return ((void *) d); } /* This is obsolete... */ void * cx_pos(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) for (i = 0; i < length; i++) d[i] = ((realpart(cc[i]) > 0.0) ? 1.0 : 0.0); else for (i = 0; i < length; i++) d[i] = ((dd[i] > 0.0) ? 1.0 : 0.0); return ((void *) d); } void * cx_db(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; double tt; int i; *newlength = length; *newtype = VF_REAL; if (type == VF_COMPLEX) for (i = 0; i < length; i++) { tt = cmag(cc[i]); rcheck(tt > 0, "db"); /* if (tt == 0.0) d[i] = 20.0 * - log(HUGE); else */ d[i] = 20.0 * log10(tt); } else for (i = 0; i < length; i++) { rcheck(dd[i] > 0, "db"); /* if (dd[i] == 0.0) d[i] = 20.0 * - log(HUGE); else */ d[i] = 20.0 * log10(dd[i]); } return ((void *) d); } void * cx_log(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { double td; td = cmag(cc[i]); /* Perhaps we should trap when td = 0.0, but Ken wants * this to be possible... */ rcheck(td >= 0, "log"); if (td == 0.0) { realpart(c[i]) = - log10(HUGE); imagpart(c[i]) = 0.0; } else { realpart(c[i]) = log10(td); imagpart(c[i]) = atan2(imagpart(cc[i]), realpart(cc[i])); } } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { rcheck(dd[i] >= 0, "log"); if (dd[i] == 0.0) d[i] = - log10(HUGE); else d[i] = log10(dd[i]); } return ((void *) d); } } void * cx_ln(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { double td; td = cmag(cc[i]); rcheck(td >= 0, "ln"); if (td == 0.0) { realpart(c[i]) = - log(HUGE); imagpart(c[i]) = 0.0; } else { realpart(c[i]) = log(td); imagpart(c[i]) = atan2(imagpart(cc[i]), realpart(cc[i])); } } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) { rcheck(dd[i] >= 0, "ln"); if (dd[i] == 0.0) d[i] = - log(HUGE); else d[i] = log(dd[i]); } return ((void *) d); } } void * cx_exp(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { double td; td = exp(realpart(cc[i])); realpart(c[i]) = td * cos(imagpart(cc[i])); imagpart(c[i]) = td * sin(imagpart(cc[i])); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = exp(dd[i]); return ((void *) d); } } void * cx_sqrt(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = NULL; ngcomplex_t *c = NULL; double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i, cres = (type == VF_REAL) ? 0 : 1; if (type == VF_REAL) for (i = 0; i < length; i++) if (dd[i] < 0.0) cres = 1; if (cres) { c = alloc_c(length); *newtype = VF_COMPLEX; } else { d = alloc_d(length); *newtype = VF_REAL; } *newlength = length; if (type == VF_COMPLEX) { for (i = 0; i < length; i++) { if (realpart(cc[i]) == 0.0) { if (imagpart(cc[i]) == 0.0) { realpart(c[i]) = 0.0; imagpart(c[i]) = 0.0; } else if (imagpart(cc[i]) > 0.0) { realpart(c[i]) = sqrt (0.5 * imagpart(cc[i])); imagpart(c[i]) = realpart(c[i]); } else { imagpart(c[i]) = sqrt( -0.5 * imagpart(cc[i])); realpart(c[i]) = - imagpart(c[i]); } } else if (realpart(cc[i]) > 0.0) { if (imagpart(cc[i]) == 0.0) { realpart(c[i]) = sqrt(realpart(cc[i])); imagpart(c[i]) = 0.0; } else if (imagpart(cc[i]) < 0.0) { realpart(c[i]) = -sqrt(0.5 * (cmag(cc[i]) + realpart(cc[i]))); } else { realpart(c[i]) = sqrt(0.5 * (cmag(cc[i]) + realpart(cc[i]))); } imagpart(c[i]) = imagpart(cc[i]) / (2.0 * realpart(c[i])); } else { /* realpart(cc[i]) < 0.0) */ if (imagpart(cc[i]) == 0.0) { realpart(c[i]) = 0.0; imagpart(c[i]) = sqrt(- realpart(cc[i])); } else { if (imagpart(cc[i]) < 0.0) imagpart(c[i]) = - sqrt(0.5 * (cmag(cc[i]) - realpart(cc[i]))); else imagpart(c[i]) = sqrt(0.5 * (cmag(cc[i]) - realpart(cc[i]))); realpart(c[i]) = imagpart(cc[i]) / (2.0 * imagpart(c[i])); } } } return ((void *) c); } else if (cres) { for (i = 0; i < length; i++) if (dd[i] < 0.0) imagpart(c[i]) = sqrt(- dd[i]); else realpart(c[i]) = sqrt(dd[i]); return ((void *) c); } else { for (i = 0; i < length; i++) d[i] = sqrt(dd[i]); return ((void *) d); } } void * cx_sin(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = sin(degtorad(realpart(cc[i]))) * cosh(degtorad(imagpart(cc[i]))); imagpart(c[i]) = cos(degtorad(realpart(cc[i]))) * sinh(degtorad(imagpart(cc[i]))); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = sin(degtorad(dd[i])); return ((void *) d); } } void * cx_sinh(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; double u, v; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { /* sinh(x+iy) = sinh(x)*cos(y) + i * cosh(x)*sin(y) */ u = degtorad(realpart(cc[i])); v = degtorad(imagpart(cc[i])); realpart(c[i]) = sinh(u)*cos(v); imagpart(c[i]) = cosh(u)*sin(v); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = sinh(degtorad(dd[i])); return ((void *) d); } } void * cx_cos(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { realpart(c[i]) = cos(degtorad(realpart(cc[i]))) * cosh(degtorad(imagpart(cc[i]))); imagpart(c[i]) = - sin(degtorad(realpart(cc[i]))) * sinh(degtorad(imagpart(cc[i]))); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = cos(degtorad(dd[i])); return ((void *) d); } } void * cx_cosh(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *c; ngcomplex_t *cc = (ngcomplex_t *) data; int i; double u, v; c = alloc_c(length); *newtype = VF_COMPLEX; for (i = 0; i < length; i++) { /* cosh(x+iy) = cosh(x)*cos(y) + i * sinh(x)*sin(y) */ u = degtorad(realpart(cc[i])); v = degtorad(imagpart(cc[i])); realpart(c[i]) = cosh(u)*cos(v); imagpart(c[i]) = sinh(u)*sin(v); } return ((void *) c); } else { double *d; double *dd = (double *) data; int i; d = alloc_d(length); *newtype = VF_REAL; for (i = 0; i < length; i++) d[i] = cosh(degtorad(dd[i])); return ((void *) d); } } static double * d_tan(double *dd, int length) { double *d; int i; d = alloc_d(length); for (i = 0; i < length; i++) { rcheck(cos(degtorad(dd[i])) != 0, "tan"); d[i] = sin(degtorad(dd[i])) / cos(degtorad(dd[i])); } return d; } static double * d_tanh(double *dd, int length) { double *d; int i; d = alloc_d(length); for (i = 0; i < length; i++) { rcheck(cosh(degtorad(dd[i])) != 0, "tanh"); d[i] = sinh(degtorad(dd[i])) / cosh(degtorad(dd[i])); } return d; } static ngcomplex_t * c_tan(ngcomplex_t *cc, int length) { ngcomplex_t *c; int i; c = alloc_c(length); for (i = 0; i < length; i++) { double u, v; rcheck(cos(degtorad(realpart(cc[i]))) * cosh(degtorad(imagpart(cc[i]))), "tan"); rcheck(sin(degtorad(realpart(cc[i]))) * sinh(degtorad(imagpart(cc[i]))), "tan"); u = degtorad(realpart(cc[i])); v = degtorad(imagpart(cc[i])); /* The Lattice C compiler won't take multi-line macros, and * CMS won't take >80 column lines.... */ #define xx1 sin(u) * cosh(v) #define xx2 cos(u) * sinh(v) #define xx3 cos(u) * cosh(v) #define xx4 -sin(u) * sinh(v) cdiv(xx1, xx2, xx3, xx4, realpart(c[i]), imagpart(c[i])); } return c; } /* complex tanh function, uses tanh(z) = -i * tan (i * z) */ static ngcomplex_t * c_tanh(ngcomplex_t *cc, int length) { ngcomplex_t *c, *s, *t; int i; c = alloc_c(length); s = alloc_c(1); t = alloc_c(1); for (i = 0; i < length; i++) { /* multiply by i */ t[0].cx_real = -1. * imagpart(cc[i]); t[0].cx_imag = realpart(cc[i]); /* get complex tangent */ s = c_tan(t, 1); /* if check in c_tan fails */ if (s == NULL) { tfree(t); return (NULL); } /* multiply by -i */ realpart(c[i]) = imagpart(s[0]); imagpart(c[i]) = -1. * realpart(s[0]); } tfree(s); tfree(t); return c; } void * cx_tan(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_REAL) { *newtype = VF_REAL; return (void *) d_tan((double *) data, length); } else { *newtype = VF_COMPLEX; return (void *) c_tan((ngcomplex_t *) data, length); } } void * cx_tanh(void *data, short int type, int length, int *newlength, short int *newtype) { *newlength = length; if (type == VF_REAL) { *newtype = VF_REAL; return (void *) d_tanh((double *) data, length); } else { *newtype = VF_COMPLEX; return (void *) c_tanh((ngcomplex_t *) data, length); } } void * cx_atan(void *data, short int type, int length, int *newlength, short int *newtype) { double *d; d = alloc_d(length); *newtype = VF_REAL; *newlength = length; if (type == VF_COMPLEX) { ngcomplex_t *cc = (ngcomplex_t *) data; int i; for (i = 0; i < length; i++) d[i] = radtodeg(atan(realpart(cc[i]))); } else { double *dd = (double *) data; int i; for (i = 0; i < length; i++) d[i] = radtodeg(atan(dd[i])); } return ((void *) d); } /* Struct to store and order the values of the amplitudes preserving the index in the original array */ typedef struct { double amplitude; int index; } amplitude_index_t; static int compare_structs (const void *a, const void *b); /* * Returns the positions of the elements in a real vector * after they have been sorted into increasing order using a stable method (qsort). */ void * cx_sortorder(void *data, short int type, int length, int *newlength, short int *newtype) { double *d = alloc_d(length); double *dd = (double *) data; int i; amplitude_index_t *array_amplitudes; array_amplitudes = (amplitude_index_t *) malloc(sizeof(amplitude_index_t) * (size_t) length); *newlength = length; *newtype = VF_REAL; if (type == VF_REAL) { for(i = 0; i < length; i++){ array_amplitudes[i].amplitude = dd[i]; array_amplitudes[i].index = i; } qsort(array_amplitudes, (size_t) length, sizeof(array_amplitudes[0]), compare_structs); for(i = 0; i < length; i++) d[i] = array_amplitudes[i].index; } free(array_amplitudes); /* Otherwise it is 0, but tmalloc zeros the stuff already. */ return ((void *) d); } static int compare_structs(const void *a, const void *b) { amplitude_index_t *aa = (amplitude_index_t *) a; amplitude_index_t *bb = (amplitude_index_t *) b; if (aa->amplitude > bb->amplitude) return 1; else if (aa->amplitude == bb->amplitude) return 0; else return -1; } ngspice-26/src/maths/cmaths/Makefile.in0000644000265600020320000006157212264261534017471 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@noinst_PROGRAMS = test_cx_mag$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_j$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_ph$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_cph$(EXEEXT) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@TESTS = test_cx_mag$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_j$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_ph$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_cph$(EXEEXT) subdir = src/maths/cmaths DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libcmaths_la_LIBADD = am_libcmaths_la_OBJECTS = cmath1.lo cmath2.lo cmath3.lo cmath4.lo libcmaths_la_OBJECTS = $(am_libcmaths_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent PROGRAMS = $(noinst_PROGRAMS) am__test_cx_cph_SOURCES_DIST = test_cx_cph.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am_test_cx_cph_OBJECTS = test_cx_cph.$(OBJEXT) test_cx_cph_OBJECTS = $(am_test_cx_cph_OBJECTS) am__DEPENDENCIES_1 = @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_cph_DEPENDENCIES = libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(am__DEPENDENCIES_1) am__test_cx_j_SOURCES_DIST = test_cx_j.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am_test_cx_j_OBJECTS = test_cx_j.$(OBJEXT) test_cx_j_OBJECTS = $(am_test_cx_j_OBJECTS) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_j_DEPENDENCIES = libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(am__DEPENDENCIES_1) am__test_cx_mag_SOURCES_DIST = test_cx_mag.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am_test_cx_mag_OBJECTS = test_cx_mag.$(OBJEXT) test_cx_mag_OBJECTS = $(am_test_cx_mag_OBJECTS) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_mag_DEPENDENCIES = libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(am__DEPENDENCIES_1) am__test_cx_ph_SOURCES_DIST = test_cx_ph.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am_test_cx_ph_OBJECTS = test_cx_ph.$(OBJEXT) test_cx_ph_OBJECTS = $(am_test_cx_ph_OBJECTS) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_ph_DEPENDENCIES = libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libcmaths_la_SOURCES) $(test_cx_cph_SOURCES) \ $(test_cx_j_SOURCES) $(test_cx_mag_SOURCES) \ $(test_cx_ph_SOURCES) DIST_SOURCES = $(libcmaths_la_SOURCES) $(am__test_cx_cph_SOURCES_DIST) \ $(am__test_cx_j_SOURCES_DIST) $(am__test_cx_mag_SOURCES_DIST) \ $(am__test_cx_ph_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/maths/poly AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libcmaths.la libcmaths_la_SOURCES = \ cmath.h \ cmath1.c \ cmath1.h \ cmath2.c \ cmath2.h \ cmath3.c \ cmath3.h \ cmath4.c \ cmath4.h @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_ph_SOURCES = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_ph.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_ph_LDADD = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(TCL_LIB_SPEC) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_cph_SOURCES = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_cph.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_cph_LDADD = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(TCL_LIB_SPEC) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_mag_SOURCES = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_mag.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_mag_LDADD = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(TCL_LIB_SPEC) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_j_SOURCES = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ test_cx_j.c @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@test_cx_j_LDADD = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ libcmaths.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ../../misc/libmisc.la \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ $(TCL_LIB_SPEC) AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/cmaths/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/cmaths/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libcmaths.la: $(libcmaths_la_OBJECTS) $(libcmaths_la_DEPENDENCIES) $(EXTRA_libcmaths_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libcmaths_la_OBJECTS) $(libcmaths_la_LIBADD) $(LIBS) clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list test_cx_cph$(EXEEXT): $(test_cx_cph_OBJECTS) $(test_cx_cph_DEPENDENCIES) $(EXTRA_test_cx_cph_DEPENDENCIES) @rm -f test_cx_cph$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_cx_cph_OBJECTS) $(test_cx_cph_LDADD) $(LIBS) test_cx_j$(EXEEXT): $(test_cx_j_OBJECTS) $(test_cx_j_DEPENDENCIES) $(EXTRA_test_cx_j_DEPENDENCIES) @rm -f test_cx_j$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_cx_j_OBJECTS) $(test_cx_j_LDADD) $(LIBS) test_cx_mag$(EXEEXT): $(test_cx_mag_OBJECTS) $(test_cx_mag_DEPENDENCIES) $(EXTRA_test_cx_mag_DEPENDENCIES) @rm -f test_cx_mag$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_cx_mag_OBJECTS) $(test_cx_mag_LDADD) $(LIBS) test_cx_ph$(EXEEXT): $(test_cx_ph_OBJECTS) $(test_cx_ph_DEPENDENCIES) $(EXTRA_test_cx_ph_DEPENDENCIES) @rm -f test_cx_ph$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_cx_ph_OBJECTS) $(test_cx_ph_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmath1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmath2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmath3.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cmath4.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cx_cph.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cx_j.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cx_mag.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_cx_ph.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/cmaths/test_cx_j.c0000644000265600020320000000111712264261473017541 0ustar andreasadmin#include #include "ngspice/config.h" #include "ngspice/memory.h" #include "ngspice/dvec.h" #include "ngspice/complex.h" #include "cmath.h" #include "cmath1.h" FILE *cp_err; int main(void) { ngcomplex_t *c = NULL; ngcomplex_t *d = NULL; short int t1; short int t2; int n1; int n2; cp_err = stderr; n1 = 1; t1 = VF_COMPLEX; c = alloc_c(n1); realpart(c[0]) = .0; imagpart(c[0]) = 1.0; d = (ngcomplex_t *) cx_j((void *) c, t1, n1, &n2, &t2); if (realpart(d[0]) == -1 && imagpart(d[0]) == 0) return 0; else return 1; } ngspice-26/src/maths/cmaths/cmath.h0000644000265600020320000000023412264261473016657 0ustar andreasadmin#ifndef ngspice_CMATH_H #define ngspice_CMATH_H #define alloc_c(len) (TMALLOC(ngcomplex_t, len)) #define alloc_d(len) (TMALLOC(double, len)) #endif ngspice-26/src/maths/cmaths/cmath1.h0000644000265600020320000000401312264261473016737 0ustar andreasadmin/************* * Header file for cmath1.c * 1999 E. Rouat ************/ #ifndef ngspice_CMATH1_H #define ngspice_CMATH1_H void * cx_mag(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_ph(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_cph(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_unwrap(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_j(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_real(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_imag(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_pos(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_db(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_log(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_ln(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_exp(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sqrt(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sin(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sinh(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_cos(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_cosh(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_tan(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_tanh(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_atan(void *data, short int type, int length, int *newlength, short int *newtype); void * cx_sortorder(void *data, short int type, int length, int *newlength, short int *newtype); #endif ngspice-26/src/maths/cmaths/test_cx_mag.c0000644000265600020320000000104512264261473020054 0ustar andreasadmin#include #include "ngspice/config.h" #include "ngspice/memory.h" #include "ngspice/dvec.h" #include "ngspice/complex.h" #include "cmath.h" #include "cmath1.h" FILE *cp_err; int main(void) { ngcomplex_t *c = NULL; double *d = NULL; short int t1; short int t2; int n1; int n2; cp_err = stderr; n1 = 1; t1 = VF_COMPLEX; c = alloc_c(n1); realpart(c[0]) = .0; imagpart(c[0]) = 1.0; d = (double *) cx_mag((void *) c, t1, n1, &n2, &t2); if (d[0] == 1) return 0; else return 1; } ngspice-26/src/maths/cmaths/cmath4.c0000644000265600020320000006463712264261473016757 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Routines to do complex mathematical functions. These routines require * the -lm libraries. We sacrifice a lot of space to be able * to avoid having to do a seperate call for every vector element, * but it pays off in time savings. These routines should never * allow FPE's to happen. * * Complex functions are called as follows: * cx_something(data, type, length, &newlength, &newtype), * and return a char * that is cast to complex or double. */ #include "ngspice/ngspice.h" #include "ngspice/plot.h" #include "ngspice/complex.h" #include "ngspice/cpdefs.h" #include #include #include #include #include "cmath.h" #include "cmath4.h" #include "ngspice/sim.h" /* To get SV_TIME */ #include "ngspice/fftext.h" extern bool cx_degrees; extern void vec_new(struct dvec *d); #ifdef HAVE_LIBFFTW3 #include "fftw3.h" #endif void * cx_and(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) d[i] = dd1[i] && dd2[i]; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) && realpart(c2)) && (imagpart(c1) && imagpart(c2))); } } return ((void *) d); } void * cx_or(void *data1, void *data2, short int datatype1, short int datatype2, int length) { double *dd1 = (double *) data1; double *dd2 = (double *) data2; double *d; ngcomplex_t *cc1 = (ngcomplex_t *) data1; ngcomplex_t *cc2 = (ngcomplex_t *) data2; ngcomplex_t c1, c2; int i; d = alloc_d(length); if ((datatype1 == VF_REAL) && (datatype2 == VF_REAL)) { for (i = 0; i < length; i++) d[i] = dd1[i] || dd2[i]; } else { for (i = 0; i < length; i++) { if (datatype1 == VF_REAL) { realpart(c1) = dd1[i]; imagpart(c1) = 0.0; } else { realpart(c1) = realpart(cc1[i]); imagpart(c1) = imagpart(cc1[i]); } if (datatype2 == VF_REAL) { realpart(c2) = dd2[i]; imagpart(c2) = 0.0; } else { realpart(c2) = realpart(cc2[i]); imagpart(c2) = imagpart(cc2[i]); } d[i] = ((realpart(c1) || realpart(c2)) && (imagpart(c1) || imagpart(c2))); } } return ((void *) d); } void * cx_not(void *data, short int type, int length, int *newlength, short int *newtype) { double *d; double *dd = (double *) data; ngcomplex_t *cc = (ngcomplex_t *) data; int i; d = alloc_d(length); *newtype = VF_REAL; *newlength = length; if (type == VF_COMPLEX) { for (i = 0; i < length; i++) { /* gcc doens't like !double */ d[i] = realpart(cc[i]) ? 0 : 1; d[i] = imagpart(cc[i]) ? 0 : 1; } } else { for (i = 0; i < length; i++) d[i] = ! dd[i]; } return ((void *) d); } /* This is a strange function. What we do is fit a polynomial to the * curve, of degree $polydegree, and then evaluate it at the points * in the time scale. What we do is this: for every set of points that * we fit a polynomial to, fill in as much of the new vector as we can * (i.e, between the last value of the old scale we went from to this * one). At the ends we just use what we have... We have to detect * badness here too... * * Note that we pass arguments differently for this one cx_ function... */ void * cx_interpolate(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping) { struct dvec *ns, *os; double *d; int degree; register int i, oincreasing = 1, nincreasing = 1; int base; if (grouping == 0) grouping = length; /* First do some sanity checks. */ if (!pl || !pl->pl_scale || !newpl || !newpl->pl_scale) { fprintf(cp_err, "Internal error: cx_interpolate: bad scale\n"); return (NULL); } ns = newpl->pl_scale; os = pl->pl_scale; if (iscomplex(ns)) { fprintf(cp_err, "Error: new scale has complex data\n"); return (NULL); } if (iscomplex(os)) { fprintf(cp_err, "Error: old scale has complex data\n"); return (NULL); } if (length != os->v_length) { fprintf(cp_err, "Error: lengths don't match\n"); return (NULL); } if (type != VF_REAL) { fprintf(cp_err, "Error: argument has complex data\n"); return (NULL); } /* Now make sure that either both scales are strictly increasing * or both are strictly decreasing. */ if (os->v_realdata[0] < os->v_realdata[1]) oincreasing = TRUE; else oincreasing = FALSE; for (i = 0; i < os->v_length - 1; i++) if ((os->v_realdata[i] < os->v_realdata[i + 1]) != oincreasing) { fprintf(cp_err, "Error: old scale not monotonic\n"); return (NULL); } if (ns->v_realdata[0] < ns->v_realdata[1]) nincreasing = TRUE; else nincreasing = FALSE; for (i = 0; i < ns->v_length - 1; i++) if ((ns->v_realdata[i] < ns->v_realdata[i + 1]) != nincreasing) { fprintf(cp_err, "Error: new scale not monotonic\n"); return (NULL); } *newtype = VF_REAL; *newlength = ns->v_length; d = alloc_d(ns->v_length); if (!cp_getvar("polydegree", CP_NUM, °ree)) degree = 1; for (base = 0; base < length; base += grouping) { if (!ft_interpolate((double *) data + base, d + base, os->v_realdata + base, grouping, ns->v_realdata + base, grouping, degree)) { tfree(d); return (NULL); } } return ((void *) d); } void * cx_deriv(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping) { double *scratch; double *spare; double x; int i, j, k; int degree; int n, base; if (grouping == 0) grouping = length; /* First do some sanity checks. */ if (!pl || !pl->pl_scale || !newpl || !newpl->pl_scale) { fprintf(cp_err, "Internal error: cx_deriv: bad scale\n"); return (NULL); } if (!cp_getvar("dpolydegree", CP_NUM, °ree)) degree = 2; /* default quadratic */ n = degree + 1; spare = alloc_d(n); scratch = alloc_d(n * (n + 1)); *newlength = length; *newtype = type; if (type == VF_COMPLEX) { ngcomplex_t *c_outdata, *c_indata; double *r_coefs, *i_coefs; double *scale; r_coefs = alloc_d(n); i_coefs = alloc_d(n); c_indata = (ngcomplex_t *) data; c_outdata = alloc_c(length); scale = alloc_d(length); /* XXX */ if (pl->pl_scale->v_type == VF_COMPLEX) /* Not ideal */ for (i = 0; i < length; i++) scale[i] = realpart(pl->pl_scale->v_compdata[i]); else for (i = 0; i < length; i++) scale[i] = pl->pl_scale->v_realdata[i]; for (base = 0; base < length; base += grouping) { k = 0; for (i = degree; i < grouping; i += 1) { /* real */ for (j = 0; j < n; j++) spare[j] = c_indata[j + i + base].cx_real; if (!ft_polyfit(scale + i + base - degree, spare, r_coefs, degree, scratch)) { fprintf(stderr, "ft_polyfit @ %d failed\n", i); } ft_polyderiv(r_coefs, degree); /* for loop gets the beginning part */ for (j = k; j <= i + degree / 2; j++) { x = scale[j + base]; c_outdata[j + base].cx_real = ft_peval(x, r_coefs, degree - 1); } /* imag */ for (j = 0; j < n; j++) spare[j] = c_indata[j + i + base].cx_imag; if (!ft_polyfit(scale + i - degree + base, spare, i_coefs, degree, scratch)) { fprintf(stderr, "ft_polyfit @ %d failed\n", i); } ft_polyderiv(i_coefs, degree); /* for loop gets the beginning part */ for (j = k; j <= i - degree / 2; j++) { x = scale[j + base]; c_outdata[j + base].cx_imag = ft_peval(x, i_coefs, degree - 1); } k = j; } /* get the tail */ for (j = k; j < length; j++) { x = scale[j + base]; /* real */ c_outdata[j + base].cx_real = ft_peval(x, r_coefs, degree - 1); /* imag */ c_outdata[j + base].cx_imag = ft_peval(x, i_coefs, degree - 1); } } tfree(r_coefs); tfree(i_coefs); tfree(scale); return (void *) c_outdata; } else { /* all-real case */ double *coefs; double *outdata, *indata; double *scale; coefs = alloc_d(n); indata = (double *) data; outdata = alloc_d(length); scale = alloc_d(length); /* XXX */ /* Here I encountered a problem because when we issue an instruction like this: * plot -deriv(vp(3)) to calculate something similar to the group delay, the code * detects that vector vp(3) is real and it is believed that the frequency is also * real. The frequency is COMPLEX and the program aborts so I'm going to put the * check that the frequency is complex vector not to abort. */ /* Original problematic code * for (i = 0; i < length; i++) * scale[i] = pl->pl_scale->v_realdata[i]; */ /* Modified to deal with complex frequency vector */ if (pl->pl_scale->v_type == VF_COMPLEX) for (i = 0; i < length; i++) scale[i] = realpart(pl->pl_scale->v_compdata[i]); else for (i = 0; i < length; i++) scale[i] = pl->pl_scale->v_realdata[i]; for (base = 0; base < length; base += grouping) { k = 0; for (i = degree; i < grouping; i += 1) { if (!ft_polyfit(scale + i - degree + base, indata + i - degree + base, coefs, degree, scratch)) { fprintf(stderr, "ft_polyfit @ %d failed\n", i + base); } ft_polyderiv(coefs, degree); /* for loop gets the beginning part */ for (j = k; j <= i - degree / 2; j++) { /* Seems the same problem because the frequency vector is complex * and the real part of the complex should be accessed because if we * run x = pl-> pl_scale-> v_realdata [base + j]; the execution will * abort. */ if (pl->pl_scale->v_type == VF_COMPLEX) x = realpart(pl->pl_scale->v_compdata[j+base]); /* For complex scale vector */ else x = pl->pl_scale->v_realdata[j + base]; /* For real scale vector */ outdata[j + base] = ft_peval(x, coefs, degree - 1); } k = j; } for (j = k; j < length; j++) { /* Again the same error */ /* x = pl->pl_scale->v_realdata[j + base]; */ if (pl->pl_scale->v_type == VF_COMPLEX) x = realpart(pl->pl_scale->v_compdata[j+base]); /* For complex scale vector */ else x = pl->pl_scale->v_realdata[j + base]; /* For real scale vector */ outdata[j + base] = ft_peval(x, coefs, degree - 1); } } tfree(coefs); tfree(scale); /* XXX */ return (char *) outdata; } } void * cx_group_delay(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping) { ngcomplex_t *cc = (ngcomplex_t *) data; double *v_phase = alloc_d(length); double *datos,adjust_final; double *group_delay = alloc_d(length); int i; /* char *datos_aux; */ /* Check to see if we have the frequency vector for the derivative */ if (!eq(pl->pl_scale->v_name, "frequency")) { fprintf(cp_err, "Internal error: cx_group_delay: need frequency based complex vector.\n"); return (NULL); } if (type == VF_COMPLEX) for (i = 0; i < length; i++) { v_phase[i] = radtodeg(cph(cc[i])); } else { fprintf(cp_err, "Signal must be complex to calculate group delay\n"); return (NULL); } type = VF_REAL; /* datos_aux = (char *)cx_deriv((char *)v_phase, type, length, newlength, newtype, pl, newpl, grouping); * datos = (double *) datos_aux; */ datos = (double *)cx_deriv((char *)v_phase, type, length, newlength, newtype, pl, newpl, grouping); /* With this global variable I will change how to obtain the group delay because * it is defined as: * * gd()=-dphase[rad]/dw[rad/s] * * if you have degrees in phase and frequency in Hz, must be taken into account * * gd()=-dphase[deg]/df[Hz]/360 * gd()=-dphase[rad]/df[Hz]/(2*pi) */ if(cx_degrees) { adjust_final=1.0/360; } else { adjust_final=1.0/(2*M_PI); } for (i = 0; i < length; i++) { group_delay[i] = -datos[i]*adjust_final; } /* Adjust to Real because the result is Real */ *newtype = VF_REAL; /* Set the type of Vector to "Time" because the speed of group units' s' * The different types of vectors are INCLUDE \ Fte_cons.h */ pl->pl_dvecs->v_type= SV_TIME; return ((char *) group_delay); } void * cx_fft(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping) { int i, fpts, order; double span, scale, maxt; double *xscale; double *time = NULL, *win = NULL; ngcomplex_t *outdata = NULL; struct dvec *sv; char window[BSIZE_SP]; double *realdata; #ifdef HAVE_LIBFFTW3 fftw_complex *inc; double *ind; fftw_complex *out = NULL; fftw_plan plan_forward = NULL; #else int N, M; double *datax = NULL; #endif if (grouping == 0) grouping = length; /* First do some sanity checks. */ if (!pl || !pl->pl_scale || !newpl || !newpl->pl_scale) { fprintf(cp_err, "Internal error cx_fft: bad scale\n"); return (NULL); } if ((type != VF_REAL) && (type != VF_COMPLEX)) { fprintf(cp_err, "Internal error cx_fft: argument has wrong data\n"); return (NULL); } #ifdef HAVE_LIBFFTW3 if (type == VF_COMPLEX) fpts = length; else fpts = length/2 + 1; #else /* size of fft input vector is power of two and larger or equal than spice vector */ N = 1; M = 0; while (N < length) { N <<= 1; M++; } if (type == VF_COMPLEX) fpts = N; else fpts = N/2 + 1; #endif *newtype = VF_COMPLEX; time = alloc_d(length); xscale = TMALLOC(double, length); if (pl->pl_scale->v_type == SV_TIME) { /* calculate the frequency from time */ span = pl->pl_scale->v_realdata[length-1] - pl->pl_scale->v_realdata[0]; for (i = 0; ipl_scale->v_length; i++) time[i] = pl->pl_scale->v_realdata[i]; } else if (pl->pl_scale->v_type == SV_FREQUENCY) { /* take frequency from ac data and calculate time */ /* Deal with complex frequency vector */ if (pl->pl_scale->v_type == VF_COMPLEX) { span = realpart(pl->pl_scale->v_compdata[pl->pl_scale->v_length-1]) - realpart(pl->pl_scale->v_compdata[0]); for (i = 0; ipl_scale->v_length; i++) xscale[i] = realpart(pl->pl_scale->v_compdata[i]); } else { span = pl->pl_scale->v_realdata[pl->pl_scale->v_length-1] - pl->pl_scale->v_realdata[0]; for (i = 0; ipl_scale->v_length; i++) xscale[i] = pl->pl_scale->v_realdata[i]; } for (i = 0; i < length; i++) #ifdef HAVE_LIBFFTW3 time[i] = i*1.0/span; #else time[i] = i*1.0/span*length/N; #endif span = time[length-1] - time[0]; } else { /* there is no usable plot vector - using simple bins */ for (i = 0; i < fpts; i++) xscale[i] = i; for (i = 0; i < length; i++) time[i] = i; span = time[length-1] - time[0]; } win = TMALLOC(double, length); maxt = time[length-1]; if (!cp_getvar("specwindow", CP_STRING, window)) strcpy(window, "none"); if (!cp_getvar("specwindoworder", CP_NUM, &order)) order = 2; if (order < 2) order = 2; if (fft_windows(window, win, time, length, maxt, span, order) == 0) goto done; /* create a new scale vector */ sv = alloc(struct dvec); ZERO(sv, struct dvec); sv->v_name = copy("fft_scale"); sv->v_type = SV_FREQUENCY; sv->v_flags = (VF_REAL | VF_PERMANENT | VF_PRINT); sv->v_length = fpts; sv->v_realdata = xscale; vec_new(sv); if (type == VF_COMPLEX) { /* input vector is complex */ ngcomplex_t *indata = (ngcomplex_t *) data; #ifdef HAVE_LIBFFTW3 printf("FFT: Time span: %g s, input length: %d\n", span, length); printf("FFT: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, fpts); inc = fftw_malloc(sizeof(fftw_complex) * (unsigned int) length); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) fpts); for (i = 0; i < length; i++) { inc[i][0] = indata[i].cx_real * win[i]; inc[i][1] = indata[i].cx_imag * win[i]; } plan_forward = fftw_plan_dft_1d(fpts, inc, out, FFTW_FORWARD, FFTW_ESTIMATE); fftw_execute(plan_forward); *newlength = fpts; outdata = alloc_c(fpts); scale = (double) fpts; for (i = 0; i < fpts; i++) { outdata[i].cx_real = out[i][0]/scale; outdata[i].cx_imag = out[i][1]/scale; } fftw_free(inc); #else /* Green's FFT */ printf("FFT: Time span: %g s, input length: %d, zero padding: %d\n", span, length, N-length); printf("FFT: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, N); datax = TMALLOC(double, 2*N); for (i = 0; i < length; i++) { datax[2*i] = indata[i].cx_real * win[i]; datax[2*i+1] = indata[i].cx_imag * win[i]; } for (i = length; i < N; i++) { datax[2*i] = 0.0; datax[2*i+1] = 0.0; } fftInit(M); ffts(datax, M, 1); fftFree(); *newlength = N; outdata = alloc_c(N); scale = (double) N; for (i = 0; i < N; i++) { outdata[i].cx_real = datax[2*i]/scale; outdata[i].cx_imag = datax[2*i+1]/scale; } #endif } else { /* input vector is real */ realdata = (double *) data; *newlength = fpts; outdata = alloc_c(fpts); #ifdef HAVE_LIBFFTW3 printf("FFT: Time span: %g s, input length: %d\n", span, length); printf("FFT: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, fpts); ind = fftw_malloc(sizeof(double) * (unsigned int) length); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) fpts); for (i = 0; i < length; i++) ind[i] = realdata[i] * win[i]; plan_forward = fftw_plan_dft_r2c_1d(length, ind, out, FFTW_ESTIMATE); fftw_execute(plan_forward); scale = (double) length; for (i = 0; i < fpts; i++) { outdata[i].cx_real = out[i][0]/scale; outdata[i].cx_imag = out[i][1]/scale; } fftw_free(ind); #else /* Green's FFT */ printf("FFT: Time span: %g s, input length: %d, zero padding: %d\n", span, length, N-length); printf("FFT: Frequency resolution: %g Hz, output length: %d\n", 1.0/span, fpts); datax = TMALLOC(double, N); for (i = 0; i < length; i++) datax[i] = realdata[i] * win[i]; for (i = length; i < N; i++) datax[i] = 0.0; fftInit(M); rffts(datax, M, 1); fftFree(); scale = (double) N; /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ outdata[0].cx_real = datax[0]/scale; outdata[0].cx_imag = 0.0; for (i = 1; i < fpts-1; i++) { outdata[i].cx_real = datax[2*i]/scale; outdata[i].cx_imag = datax[2*i+1]/scale; } outdata[fpts-1].cx_real = datax[1]/scale; outdata[fpts-1].cx_imag = 0.0; #endif } done: #ifdef HAVE_LIBFFTW3 fftw_free(out); fftw_destroy_plan(plan_forward); #else tfree(datax); #endif tfree(time); tfree(win); return ((void *) outdata); } void * cx_ifft(void *data, short int type, int length, int *newlength, short int *newtype, struct plot *pl, struct plot *newpl, int grouping) { ngcomplex_t *indata = (ngcomplex_t *) data; int i, tpts; double span; double *xscale; ngcomplex_t *outdata = NULL; struct dvec *sv; #ifdef HAVE_LIBFFTW3 fftw_complex *in; fftw_complex *out = NULL; fftw_plan plan_backward = NULL; #else int N, M; double *datax = NULL; double scale; #endif if (grouping == 0) grouping = length; /* First do some sanity checks. */ if (!pl || !pl->pl_scale || !newpl || !newpl->pl_scale) { fprintf(cp_err, "Internal error cx_ifft: bad scale\n"); return (NULL); } if ((type != VF_REAL) && (type != VF_COMPLEX)) { fprintf(cp_err, "Internal error cx_ifft: argument has wrong data\n"); return (NULL); } #ifdef HAVE_LIBFFTW3 tpts = length; #else /* size of ifft input vector is power of two and larger or equal than spice vector */ N = 1; M = 0; while (N < length) { N <<= 1; M++; } tpts = N; #endif if (pl->pl_scale->v_type == SV_TIME) { /* take the time from transient */ /* output vector has same length as the plot scale vector */ tpts = pl->pl_scale->v_length; xscale = TMALLOC(double, tpts); for (i = 0; ipl_scale->v_realdata[i]; } else if (pl->pl_scale->v_type == SV_FREQUENCY) { /* calculate time from frequency */ /* output vector has same length as the plot scale vector */ tpts = pl->pl_scale->v_length; xscale = TMALLOC(double, tpts); /* Deal with complex frequency vector */ if (pl->pl_scale->v_type == VF_COMPLEX) span = realpart(pl->pl_scale->v_compdata[tpts-1]) - realpart(pl->pl_scale->v_compdata[0]); else span = pl->pl_scale->v_realdata[tpts-1] - pl->pl_scale->v_realdata[0]; for (i = 0; iv_name = copy("ifft_scale"); sv->v_type = SV_TIME; sv->v_flags = (VF_REAL | VF_PERMANENT | VF_PRINT); sv->v_length = tpts; sv->v_realdata = xscale; vec_new(sv); *newtype = VF_COMPLEX; *newlength = tpts; outdata = alloc_c(tpts); #ifdef HAVE_LIBFFTW3 printf("IFFT: Frequency span: %g Hz, input length: %d\n", 1/span*length, length); printf("IFFT: Time resolution: %g s, output length: %d\n", span/(tpts-1), tpts); in = fftw_malloc(sizeof(fftw_complex) * (unsigned int) length); out = fftw_malloc(sizeof(fftw_complex) * (unsigned int) tpts); for (i = 0; i < length; i++) { in[i][0] = indata[i].cx_real; in[i][1] = indata[i].cx_imag; } plan_backward = fftw_plan_dft_1d(tpts, in, out, FFTW_BACKWARD, FFTW_ESTIMATE); fftw_execute(plan_backward); for (i = 0; i < tpts; i++) { outdata[i].cx_real = out[i][0]; outdata[i].cx_imag = out[i][1]; } fftw_free(in); fftw_destroy_plan(plan_backward); fftw_free(out); #else /* Green's IFFT */ printf("IFFT: Frequency span: %g Hz, input length: %d, zero padding: %d\n", 1/span*length, length, N-length); printf("IFFT: Time resolution: %g s, output length: %d\n", span/(tpts-1), tpts); datax = TMALLOC(double, 2*N); for (i = 0; i < length; i++) { datax[2*i] = indata[i].cx_real; datax[2*i+1] = indata[i].cx_imag; } for (i = length; i < N; i++) { datax[2*i] = 0.0; datax[2*i+1] = 0.0; } fftInit(M); iffts(datax, M, 1); fftFree(); scale = (double) tpts; for (i = 0; i < tpts; i++) { outdata[i].cx_real = datax[2*i] * scale; outdata[i].cx_imag = datax[2*i+1] * scale; } tfree(datax); #endif return ((void *) outdata); } ngspice-26/src/maths/Makefile.am0000644000265600020320000000025312264261473016170 0ustar andreasadmin## Process this file with automake SUBDIRS = cmaths ni sparse poly deriv misc fft DIST_SUBDIRS = cmaths ni sparse poly deriv misc fft MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/Makefile.in0000644000265600020320000004362012264261534016204 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = cmaths ni sparse poly deriv misc fft DIST_SUBDIRS = cmaths ni sparse poly deriv misc fft MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/misc/0000755000265600020320000000000012264261703015063 5ustar andreasadminngspice-26/src/maths/misc/erfc.c0000644000265600020320000000270512264261473016156 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "ngspice/numconst.h" #ifndef HAVE_ERFC /* erfc computes the erfc(x) the code is from sedan's derfc.f */ double erfc (double x) { double sqrtPi, n, temp1, xSq, sum1, sum2; sqrtPi = sqrt( PI ); x = ABS( x ); n = 1.0; xSq = 2.0 * x * x; sum1 = 0.0; if ( x > 3.23 ) { /* asymptotic expansion */ temp1 = exp( - x * x ) / ( sqrtPi * x ); sum2 = temp1; while ( sum1 != sum2 ) { sum1 = sum2; temp1 = -1.0 * ( temp1 / xSq ); sum2 += temp1; n += 2.0; } return( sum2 ); } else { /* series expansion for small x */ temp1 = ( 2.0 / sqrtPi ) * exp( - x * x ) * x; sum2 = temp1; while ( sum1 != sum2 ) { n += 2.0; sum1 = sum2; temp1 *= xSq / n; sum2 += temp1; } return( 1.0 - sum2 ); } } /* From C. Hastings, Jr., Approximations for digital computers, Princeton Univ. Press, 1955. Approximation accurate to within 1.5E-7 (making some assumptions about your machine's floating point mechanism) */ double ierfc(double x) { double t, z; t = 1/(1 + 0.3275911*x); z = 1.061405429; z = -1.453152027 + t * z; z = 1.421413741 + t * z; z = -0.284496736 + t * z; z = 0.254829592 + t * z; z = exp(-x*x) * t * z; return(z); } #else int Dummy_Symbol_5; #endif ngspice-26/src/maths/misc/equality.c0000644000265600020320000000346212264261473017075 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include #include #ifdef _MSC_VER #define llabs(x) ((x) < 0 ? -(x) : (x)) #endif #define int64_min (((int64_t) -1) << 63) /* From Bruce Dawson, Comparing floating point numbers, http://www.cygnus-software.com/papers/comparingfloats/Comparing%20floating%20point%20numbers.htm Original this function is named AlmostEqual2sComplement but we leave it to AlmostEqualUlps and can leave the code (measure.c, dctran.c) unchanged. The transformation to the 2's complement prevent problems around 0.0. One Ulp is equivalent to a maxRelativeError of between 1/4,000,000,000,000,000 and 1/8,000,000,000,000,000. Practical: 3 < maxUlps < some hundred's (or thousand's) - depending on numerical requirements. */ bool AlmostEqualUlps(double A, double B, int maxUlps) { int64_t aInt, bInt, intDiff; union { double d; int64_t i; } uA, uB; if (A == B) return TRUE; /* If not - the entire method can not work */ assert(sizeof(double) == sizeof(int64_t)); /* Make sure maxUlps is non-negative and small enough that the */ /* default NAN won't compare as equal to anything. */ assert(maxUlps > 0 && maxUlps < 4 * 1024 * 1024); uA.d = A; aInt = uA.i; /* Make aInt lexicographically ordered as a twos-complement int */ if (aInt < 0) aInt = int64_min - aInt; uB.d = B; bInt = uB.i; /* Make bInt lexicographically ordered as a twos-complement int */ if (bInt < 0) bInt = int64_min - bInt; intDiff = llabs(aInt - bInt); /* printf("A:%e B:%e aInt:%d bInt:%d diff:%d\n", A, B, aInt, bInt, intDiff); */ if (intDiff <= maxUlps) return TRUE; return FALSE; } ngspice-26/src/maths/misc/norm.h0000644000265600020320000000045112264261473016213 0ustar andreasadmin/********** (C) Paolo Nenzi 2001 **********/ /* * Bernoulli function */ #ifndef ngspice_NORM_H #define ngspice_NORM_H extern double maxNorm(double *, int); extern double oneNorm(double *, int); extern double l2Norm(double *, int); extern double dot(double *, double *, int); #endif ngspice-26/src/maths/misc/test_accuracy.c0000644000265600020320000000224412264261473020066 0ustar andreasadmin/* Paolo Nenzi 2002 - This program tests some machine * dependent variables. */ /* Nota: * * Compilare due volte nel seguente modo: * * gcc test_accuracy.c -o test_64accuracy -lm * gcc -DIEEEDOUBLE test_accuracy.c -o test_53accuracy -lm * */ #include #include #include #include int main (void) { fpu_control_t prec; double acc=1.0; double xl = 0.0; double xu = 1.0; double xh, x1, x2; double xhold =0.0; #ifdef IEEEDOUBLE _FPU_GETCW(prec); prec &= ~_FPU_EXTENDED; prec |= _FPU_DOUBLE; _FPU_SETCW(prec); #endif for( ; (acc + 1.0) > 1.0 ; ) { acc *= 0.5; } acc *= 2.0; printf("Accuracy: %e\n", acc); printf("------------------------------------------------------------------\n"); xh = 0.5 * (xl + xu); for( ; (xu-xl > (2.0 * acc * (xu + xl))); ) { x1 = 1.0 / ( 1.0 + (0.5 * xh) ); x2 = xh / ( exp(xh) - 1.0 ); if( (x1 - x2) <= (acc * (x1 + x2))) { xl = xh; xhold = xh; } else { xu = xh; xhold = xh; } xh = 0.5 * (xl + xu); /* if (xhold == xh) break; */ } printf("xu-xl: %e \t cond: %e \t xh: %e\n", (xu-xl), (2.0 * acc * (xu + xl)), xh); exit(1); } ngspice-26/src/maths/misc/accuracy.h0000644000265600020320000000106512264261473017034 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ #ifndef ngspice_ACCURACY_H #define ngspice_ACCURACY_H /* * Definitions of Globals for Machine Accuracy Limits */ extern double BMin; /* lower limit for B(x) */ extern double BMax; /* upper limit for B(x) */ extern double ExpLim; /* limit for exponential */ extern double Accuracy; /* accuracy of the machine */ extern double MuLim, MutLim; extern void evalAccLimits(void); #endif ngspice-26/src/maths/misc/bernoull.c0000644000265600020320000000334012264261473017055 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "accuracy.h" #include "bernoull.h" /* * this function computes the bernoulli function * f(x) = x / ( exp (x) - 1 ) and its derivatives. the function * f(-x) alongwith its derivative is also computed. */ /* * input delta-psi * outputs f(x), df(x)/dx, f(-x), and df(-x)/dx */ void bernoulli (double x, double *pfx, double *pDfxDx, double *pfMx, double *pDfMxDx, BOOLEAN derivAlso) { double fx, fMx; double dFxDx = 0.0; double dFMxDx = 0.0; double expX, temp; if( x <= -BMax ) { fx = -x; if( x <= -ExpLim ) { fMx = 0.0; if( derivAlso ) { dFxDx = -1.0; dFMxDx = 0.0; } } else { expX = exp( x ); fMx = -x * expX; if( derivAlso ) { dFxDx = fMx - 1.0; dFMxDx = -expX * ( 1.0 + x ); } } } else if ( ABS( x) <= BMin ) { fx = 1.0 / (1.0 + 0.5 * x ); fMx = 1.0 / (1.0 - 0.5 * x ); if( derivAlso ) { temp = 1.0 + x; dFxDx = -(0.5 + x / 3.0) / temp; dFMxDx = (0.5 + 2 * x /3.0 )/ temp; } } else if ( x >= BMax ) { fMx = x; if( x >= ExpLim ) { fx = 0.0; if( derivAlso ) { dFxDx = 0.0; dFMxDx = 1.0; } } else { expX = exp( -x ); fx = x * expX; if( derivAlso ) { dFxDx = expX * ( 1.0 - x ); dFMxDx = 1.0 - fx; } } } else { expX = exp( x ); temp = 1.0 / ( expX - 1.0 ); fx = x * temp; fMx = expX * fx; if( derivAlso ) { dFxDx = temp * ( 1.0 - fMx ); dFMxDx = temp * ( expX - fMx ); } } *pfx = fx; *pfMx = fMx; *pDfxDx = dFxDx; *pDfMxDx = dFMxDx; } ngspice-26/src/maths/misc/norm.c0000644000265600020320000000252612264261473016213 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group **********/ #include "ngspice/ngspice.h" #include "norm.h" /* functions to compute max and one norms of a given vector of doubles */ double maxNorm(double *vector, int size) { double norm = 0.0; double candidate; int index; for( index = 1; index <= size; index++ ) { candidate = fabs(vector[ index ]); if( candidate > norm ) { norm = candidate; } } return( norm ); } double oneNorm(double *vector, int size) { double norm = 0.0; double value; int index; for( index = 1; index <= size; index++ ) { value = vector[ index ]; if( value < 0.0 ) norm -= value; else norm += value; } return( norm ); } double l2Norm(double *vector, int size) { double norm = 0.0; double value; int index; for( index = 1; index <= size; index++ ) { value = vector[ index ]; norm += value * value; } norm = sqrt( norm ); return( norm ); } /* * dot(): * computes dot product of two vectors */ double dot(double *vector1, double *vector2, int size) { register double dot = 0.0; register int index; for( index = 1; index <= size; index++ ) { dot += vector1[ index ] * vector2[ index ]; } return( dot ); } ngspice-26/src/maths/misc/accuracy.c0000644000265600020320000001165512264261473017035 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1987 Kartikeya Mayaram, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ #include "ngspice/ngspice.h" #include "accuracy.h" /* XXX Globals are hiding here. * All globals have been moved to main.c were all true globals * should reside. May be in the future that the machine dependent * global symbols will be gathered into a structure. * * Paolo Nenzi 2002 */ /* * void * evalAccLimits(void) * * This function computes the floating point accuracy on your machine. * This part of the code is critical and will affect the result of * CIDER simulator. CIDER uses directly some constants calculated here * while SPICE does not (yet), but remember that spice runs on the same * machine that runs CIDER and uses the same floating point implementation. * * A note to x86 Linux users: * * Intel processors (from i386 up to the latest Pentiums) do FP calculations * in two ways: * 53-bit mantissa mode (64 bits overall) * 64-bit mantissa mode (80 bits overall) * * The 53-bit mantissa mode conforms to the IEEE 754 standard (double * precision), the other (64-bit mantissa mode) does not conform to * IEEE 754, butlet programmers to use the higher precision "long double" * data type. * * Now the problem: the x86 FPU can be in on mode only, therefore is * not possible to have IEEE conformant double and "long double" data * type at the same time. You have to choose which one you prefer. * * Linux developers decided that was better to give "long double" to * programmers that to provide a standard "double" implementation and, * by default, Linux set the FPU in 64 bit mantissa mode. FreeBSD, on * the other side, adopt the opposite solution : the FPU is in 53 bit * mantissa mode. * * Since no one but the programmers really knows what a program requires, * the final decision on the FPU mode of operation is left to her/him. * It is possible to alter the FPU mode of operation using instruction * produced by the operating system. * * Thanks to AMAKAWA Shuhei for the information on x86 FPU Linux and * freeBSD on which the above text was derived. * Paolo Nenzi 2002. */ void evalAccLimits(void) { double acc = 1.0; double xl = 0.0; double xu = 1.0; double xh, x1, x2, expLim; double muLim, temp1, temp2, temp3, temp4; double xhold, dif; /* Introduced to avoid numerical trap if using non IEEE754 FPU */ /* First we compute accuracy */ for( ; (acc + 1.0) > 1.0 ; ) { acc *= 0.5; } acc *= 2.0; Accuracy = acc; /* * This loop has been modified to include a variable to track * xh change. If it does not change, we exit the loop. This is * an ugly countermeasure to avoid infinite cycling when in * x86 64-bit mantissa mode. * * Paolo Nenzi 2002 */ xh = 0.5 * (xl + xu); for( ; (xu-xl > (2.0 * acc * (xu + xl))); ) { x1 = 1.0 / ( 1.0 + (0.5 * xh) ); x2 = xh / ( exp(xh) - 1.0 ); if( (x1 - x2) <= (acc * (x1 + x2))) { xl = xh; xhold = xh; } else { xu = xh; xhold = xh; } xh = 0.5 * (xl + xu); dif = fabs(xhold - xh); if (dif <= DBL_EPSILON) break; } BMin = xh; BMax = -log( acc ); /* * This loop calculate the maximum exponent x for * which the function exp(-x) returns a value greater * than 0. The result is used to prevent underflow * on large negative arguments to exponential. * AFAIK: used only in Bernoulli function. */ expLim = 80.0; for( ; exp( -expLim ) > 0.0; ) { expLim += 1.0; } expLim -= 1.0; ExpLim = expLim; /* * What this loop does ??? */ muLim = 1.0; temp4 = 0.0; for( ; 1.0 - temp4 > acc; ){ muLim *= 0.5; temp1 = muLim; temp2 = pow( temp1 , 0.333 ) ; temp3 = 1.0 / (1.0 + temp1 * temp2 ); temp4 = pow( temp3 , 0.37/1.333 ); } muLim *= 2.0; MuLim = muLim; muLim = 1.0; temp3 = 0.0; for( ; 1.0 - temp3 > acc; ){ muLim *= 0.5; temp1 = muLim; temp2 = 1.0 / (1.0 + temp1 * temp1 ); temp3 = sqrt( temp2 ); } muLim *= 2.0; MutLim = muLim; } /* * Other misterious code. * Berkeley's people love to leave spare code for info archeologists. * main () { double x; double bx, dbx, bMx, dbMx; evalAccLimits(); for( x = 0.0; x <= 100.0 ; x += 1.0 ) { bernoulliNew( x, &bx, &dbx, &bMx, &dbMx, 1); printf( "\nbernoulliNew: x = %e bx = %e dbx = %e bMx = %e dbMx = %e ", x, bx, dbx, bMx, dbMx ); bernoulli( x, &bx, &dbx, &bMx, &dbMx); printf( "\nbernoulli: x = %e bx = %e dbx = %e bMx = %e dbMx = %e ", x, bx, dbx, bMx, dbMx ); } for( x = 0.0; x >= -100.0 ; x -= 1.0 ) { bernoulliNew( x, &bx, &dbx, &bMx, &dbMx, 1); printf( "\nbernoulliNew: x = %e bx = %e dbx = %e bMx = %e dbMx = %e ", x, bx, dbx, bMx, dbMx ); bernoulli( x, &bx, &dbx, &bMx, &dbMx); printf( "\nbernoulli: x = %e bx = %e dbx = %e bMx = %e dbMx = %e ", x, bx, dbx, bMx, dbMx ); } } */ ngspice-26/src/maths/misc/bernoull.h0000644000265600020320000000037012264261473017062 0ustar andreasadmin/********** (C) Paolo Nenzi 2001 **********/ /* * Bernoulli function */ #ifndef ngspice_BERNOULL_H #define ngspice_BERNOULL_H extern void bernoulli (double, double *, double *, double *, double *, BOOLEAN); #endif ngspice-26/src/maths/misc/randnumb.c0000644000265600020320000002075412264261473017051 0ustar andreasadmin/********** Copyright 2008 Holger Vogt **********/ /* Care about random numbers The seed value is set as random number in main.c, line 746. A fixed seed value may be set by 'set rndseed=value'. */ /* CombLCGTaus() Combined Tausworthe & LCG random number generator Algorithm has been suggested in: GPUGems 3, Addison Wesley, 2008, Chapter 37. It combines a three component Tausworthe generator taus88 (see P. L’Ecuyer: "Maximally equidistributed combined Tausworthe generators", Mathematics of Computation, 1996, http://www.iro.umontreal.ca/~lecuyer/myftp/papers/tausme.ps ) and a quick linear congruent generator (LCG), decribed in: Press: "Numerical recipes in C", Cambridge, 1992, p. 284. Generator has passed the bbattery_SmallCrush(gen) test of the TestU01 library from Pierre L’Ecuyer and Richard Simard, http://www.iro.umontreal.ca/~simardr/testu01/tu01.html */ /* TausSeed creates three start values for Tausworthe state variables. Uses rand() from , therefore values depend on the value of seed in srand(seed). A constant seed will result in a reproducible series of random variates. Calling sequence: srand(seed); TausSeed(); double randvar = CombLCGTaus(void); */ //#define HVDEBUG #include "ngspice/ngspice.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include #include #include #ifdef _MSC_VER #include #else #include #endif #include // var. argumente /* Tausworthe state variables for double variates*/ static unsigned CombState1 = 129, CombState2 = 130, CombState3 = 131; static unsigned CombState4 = 132; /* LCG state variable */ /* Tausworthe state variables for integer variates*/ static unsigned CombState5 = 133, CombState6 = 135, CombState7 = 137; static unsigned CombState8 = 138; /* LCG state variable */ static unsigned TauS(unsigned *state, int C1, int C2, int C3, unsigned m); static unsigned LGCS(unsigned *state, unsigned A1, unsigned A2); double CombLCGTaus(void); float CombLCGTaus2(void); unsigned int CombLCGTausInt(void); unsigned int CombLCGTausInt2(void); double exprand(double); void checkseed(void); double drand(void); double gauss0(void); void rgauss(double* py1, double* py2); int poisson(double); /* Check if a seed has been set by the command 'set rndseed=value' in spinit with integer value > 0. If available, call srand(value). This will override the call to srand in main.c. Checkseed should be put in front of any call to rand or CombLCGTaus.. . */ void checkseed(void) { int newseed; static int oldseed; /* printf("Enter checkseed()\n"); */ if (cp_getvar("rndseed", CP_NUM, &newseed)) { if ((newseed > 0) && (oldseed != newseed)) { srand((unsigned int)newseed); TausSeed(); oldseed = newseed; printf("Seed value for random number generator is set to %d\n", newseed); } /* else printf("Oldseed %d, newseed %d\n", oldseed, newseed); */ } } /* uniform random number generator, interval [-1 .. +1[ */ double drand(void) { checkseed(); // return ( 2.0*((double) (RR_MAX-abs(rand())) / (double)RR_MAX-0.5)); return 2.0 * CombLCGTaus() - 1.0; } void TausSeed(void) { /* The Tausworthe initial states should be greater than 128. We restrict the values up to 32767. Here we use the standard random functions srand, called in main.c upon ngspice startup or later in fcn checkseed(), rand() and the maximum return value RAND_MAX*/ CombState1 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState2 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState3 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState4 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState5 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState6 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState7 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; CombState8 = (unsigned int)((double)rand()/(double)RAND_MAX * 32638.) + 129; #ifdef HVDEBUG printf("\nTausworthe Double generator init states: %d, %d, %d, %d\n", CombState1, CombState2, CombState3, CombState4); printf("Tausworthe Integer generator init states: %d, %d, %d, %d\n", CombState5, CombState6, CombState7, CombState8); #endif } static unsigned TauS(unsigned *state, int C1, int C2, int C3, unsigned m) { unsigned b = (((*state << C1) ^ *state) >> C2); return *state = (((*state & m) << C3) ^ b); } static unsigned LGCS(unsigned *state, unsigned A1, unsigned A2) { return *state = (A1 * *state + A2); } /* generate random variates randvar uniformly distributed in [0.0 .. 1.0[ by calls to CombLCGTaus() like: double randvar = CombLCGTaus(); */ double CombLCGTaus(void) { return 2.3283064365387e-10 * ( TauS(&CombState1, 13, 19, 12, 4294967294UL) ^ TauS(&CombState2, 2, 25, 4, 4294967288UL) ^ TauS(&CombState3, 3, 11, 17, 4294967280UL) ^ LGCS(&CombState4, 1664525, 1013904223UL) ); } /* generate random variates randvarint uniformly distributed in [0 .. 4294967296[ (32 bit unsigned int) by calls to CombLCGTausInt() like: unsigned int randvarint = CombLCGTausInt(); */ unsigned int CombLCGTausInt(void) { return ( TauS(&CombState5, 13, 19, 12, 4294967294UL) ^ TauS(&CombState6, 2, 25, 4, 4294967288UL) ^ TauS(&CombState7, 3, 11, 17, 4294967280UL) ^ LGCS(&CombState8, 1664525, 1013904223UL) ); } /* test versions of the generators listed above */ float CombLCGTaus2(void) { unsigned long b; b = (((CombState1 << 13) ^ CombState1) >> 19); CombState1 = (unsigned int)(((CombState1 & 4294967294UL) << 12) ^ b); b = (((CombState2 << 2) ^ CombState2) >> 25); CombState2 = (unsigned int)(((CombState2 & 4294967288UL) << 4) ^ b); b = (((CombState3 << 3) ^ CombState3) >> 11); CombState3 = (unsigned int)(((CombState3 & 4294967280UL) << 17) ^ b); CombState4 = (unsigned int)(1664525 * CombState4 + 1013904223UL); return ((float)(CombState1 ^ CombState2 ^ CombState3 ^ CombState4) * 2.3283064365387e-10f); } unsigned int CombLCGTausInt2(void) { unsigned long b; b = (((CombState5 << 13) ^ CombState5) >> 19); CombState5 = (unsigned int)(((CombState5 & 4294967294UL) << 12) ^ b); b = (((CombState6 << 2) ^ CombState6) >> 25); CombState6 = (unsigned int)(((CombState6 & 4294967288UL) << 4) ^ b); b = (((CombState7 << 3) ^ CombState7) >> 11); CombState7 = (unsigned int)(((CombState7 & 4294967280UL) << 17) ^ b); CombState8 = (unsigned int)(1664525 * CombState8 + 1013904223UL); return (CombState5 ^ CombState6 ^ CombState7 ^ CombState8); } /*** gauss ***/ double gauss0(void) { static bool gliset = TRUE; static double glgset = 0.0; double fac,r,v1,v2; if (gliset) { do { v1 = drand(); v2 = drand(); r = v1*v1 + v2*v2; } while (r >= 1.0); /* printf("v1 %f, v2 %f\n", v1, v2); */ fac = sqrt(-2.0 * log(r) / r); glgset = v1 * fac; gliset = FALSE; return v2 * fac; } else { gliset = TRUE; return glgset; } } /* Polar form of the Box-Muller generator for Gaussian distributed random variates. Generator will be fed with two uniformly distributed random variates. Delivers two values per call */ void rgauss(double* py1, double* py2) { double x1, x2, w; do { x1 = 2.0 * CombLCGTaus() - 1.0; x2 = 2.0 * CombLCGTaus() - 1.0; w = x1 * x1 + x2 * x2; } while ( w >= 1.0 ); w = sqrt( (-2.0 * log( w ) ) / w ); *py1 = x1 * w; *py2 = x2 * w; } /** Code by: Inexpensive http://everything2.com/title/Generating+random+numbers+with+a+Poisson+distribution **/ int poisson(double lambda) { int k=0; //Counter const int max_k = 1000; //k upper limit double p = CombLCGTaus(); //uniform random number double P = exp(-lambda); //probability double sum=P; //cumulant if (sum>=p) return 0; //done allready for (k=1; k=p) break; //Leave loop } return k; //return random number } /* return an exponentially distributed random number */ double exprand(double mean) { double expval; checkseed(); expval = -log(CombLCGTaus()) * mean; return expval; } ngspice-26/src/maths/misc/Makefile.am0000644000265600020320000000067312264261473017131 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmathmisc.la libmathmisc_la_SOURCES = \ accuracy.c \ accuracy.h \ bernoull.h \ bernoull.c \ erfc.c \ equality.c \ isinf.c \ isnan.c \ logb.c \ scalb.c \ norm.h \ norm.c \ randnumb.c EXTRA_DIST = test_accuracy.c test_erfc.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/misc/Makefile.in0000644000265600020320000004145212264261535017141 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmathmisc_la_LIBADD = am_libmathmisc_la_OBJECTS = accuracy.lo bernoull.lo erfc.lo \ equality.lo isinf.lo isnan.lo logb.lo scalb.lo norm.lo \ randnumb.lo libmathmisc_la_OBJECTS = $(am_libmathmisc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmathmisc_la_SOURCES) DIST_SOURCES = $(libmathmisc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmathmisc.la libmathmisc_la_SOURCES = \ accuracy.c \ accuracy.h \ bernoull.h \ bernoull.c \ erfc.c \ equality.c \ isinf.c \ isnan.c \ logb.c \ scalb.c \ norm.h \ norm.c \ randnumb.c EXTRA_DIST = test_accuracy.c test_erfc.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/misc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmathmisc.la: $(libmathmisc_la_OBJECTS) $(libmathmisc_la_DEPENDENCIES) $(EXTRA_libmathmisc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmathmisc_la_OBJECTS) $(libmathmisc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/accuracy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bernoull.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/equality.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/erfc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isinf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/logb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/norm.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/randnumb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scalb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/misc/isnan.c0000644000265600020320000000203612264261473016344 0ustar andreasadmin#include "ngspice/ngspice.h" #if !HAVE_DECL_ISNAN #ifndef HAVE_ISNAN /* isnan (originally) for SOI devices in MINGW32 hvogt (dev.c) */ union ieee754_double { double d; /* This is the IEEE 754 double-precision format. */ struct { /* Together these comprise the mantissa. */ unsigned int mantissa1:32; unsigned int mantissa0:20; unsigned int exponent:11; unsigned int negative:1; } ieee; struct { /* Together these comprise the mantissa. */ unsigned int mantissa1:32; unsigned int mantissa0:19; unsigned int quiet_nan:1; unsigned int exponent:11; unsigned int negative:1; } ieee_nan; }; int isnan(double value) { union ieee754_double u; u.d = value; /* IEEE 754 NaN's have the maximum possible exponent and a nonzero mantissa. */ return ((u.ieee.exponent & 0x7ff) == 0x7ff && (u.ieee.mantissa0 != 0 || u.ieee.mantissa1 != 0)); } /* * end isnan.c */ #else /* HAVE_ISNAN */ int Dummy_Symbol_4; #endif /* HAVE_ISNAN */ #endif /* HAVE_DECL_ISNAN */ ngspice-26/src/maths/misc/isinf.c0000644000265600020320000000107712264261473016350 0ustar andreasadmin#include "ngspice/ngspice.h" #if !HAVE_DECL_ISINF #ifndef HAVE_ISINF #if defined(HAVE_FINITE) /* not the best replacement - see missing_math.h */ int isinf(double x) { return !finite(x) && x==x; } #else /* HAVE_FINITE */ /* this is really ugly - but it is a emergency case */ static int isinf (const double x) { double y = x - x; int s = (y != y); if (s && x > 0) return +1; else if (s && x < 0) return -1; else return 0; } #endif /* HAVE_FINITE */ #else /* HAVE_ISINF */ int Dummy_Symbol_7; #endif /* HAVE_ISINF */ #endif /* HAVE_DECL_ISINF */ ngspice-26/src/maths/misc/test_erfc.c0000644000265600020320000000371312264261473017215 0ustar andreasadmin/* Paolo Nenzi 2002 - This program tests erfc function * implementations. */ /* * The situation on erfc functions in spice/cider: * * First we have the ierfc in spice, a sort of interpolation, which is * fast to compute but gives is not so "good" * Then we have derfc from cider, which is accurate but slow, the code is from sedan's derfc.f . * Both above are only valid for x > 0.0 * Then we have glibc/os specific implementation. * * Proposal: * * Use glibc/os specific implementation as default and then test cider one. */ #include #include #include #ifdef HAVE_FPU_CTRL #include #endif double derfc(double x) { double sqrtPi, n, temp1, xSq, sum1, sum2; sqrtPi = sqrt( M_PI ); x = fabs( x ); /* only x > 0 interested */ n = 1.0; xSq = 2.0 * x * x; sum1 = 0.0; if ( x > 3.23 ) { /* asymptotic expansion */ temp1 = exp( - x * x ) / ( sqrtPi * x ); sum2 = temp1; while ( sum1 != sum2 ) { sum1 = sum2; temp1 = -1.0 * ( temp1 / xSq ); sum2 += temp1; n += 2.0; } return( sum2 ); } else { /* series expansion for small x */ temp1 = ( 2.0 / sqrtPi ) * exp( - x * x ) * x; sum2 = temp1; while ( sum1 != sum2 ) { n += 2.0; sum1 = sum2; temp1 *= xSq / n; sum2 += temp1; } return( 1.0 - sum2 ); } } double ierfc(double x) { double t, z; t = 1/(1 + 0.3275911*x); z = 1.061405429; z = -1.453152027 + t * z; z = 1.421413741 + t * z; z = -0.284496736 + t * z; z = 0.254829592 + t * z; z = exp(-x*x) * t * z; return(z); } int main (void) { double x = -30.0; double y1= 0.0, y2 = 0.0; #ifdef HAVE_FPU_CTRL fpu_control_t prec; _FPU_GETCW(prec); prec &= ~_FPU_EXTENDED; prec |= _FPU_DOUBLE; _FPU_SETCW(prec); #endif for (;(x <= 30.0);) { y1 = ierfc(x); y2 = derfc(x); printf("x: %f \t ierfc: %e \t derfc: %e \t erfc: %e\n", x, y1, y2, erfc(x) ); x = x + 1.0; } exit(1); } ngspice-26/src/maths/misc/logb.c0000644000265600020320000000066512264261473016165 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #ifndef HAVE_LOGB double logb(double x) { double y = 0.0; if (x != 0.0) { if (x < 0.0) x = - x; while (x > 2.0) { y += 1.0; x /= 2.0; } while (x < 1.0) { y -= 1.0; x *= 2.0; } } else y = 0.0; return y; } #else int Dummy_Symbol_3; #endif ngspice-26/src/maths/misc/scalb.c0000644000265600020320000000114412264261473016317 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #ifndef HAVE_SCALBN double scalbn(double x, int n) { double y, z = 1.0, k = 2.0; if (n < 0) { n = -n; k = 0.5; } if (x != 0.0) for (y = 1.0; n; n >>= 1) { y *= k; if (n & 1) z *= y; } return x * z; } #else /* HAVE_SCALBN */ int Dummy_Symbol_1; #endif /* HAVE_SCALBN */ #ifndef HAVE_SCALB double scalb(double x, double n) { return scalbn(x, (int) n); } #else /* HAVE_SCALB */ int Dummy_Symbol_2; #endif /* HAVE_SCALB */ ngspice-26/src/maths/sparse/0000755000265600020320000000000012264261703015425 5ustar andreasadminngspice-26/src/maths/sparse/spdefs.h0000644000265600020320000007600112264261473017072 0ustar andreasadmin#ifndef ngspice_SPDEFS_H #define ngspice_SPDEFS_H /* * DATA STRUCTURE AND MACRO DEFINITIONS for Sparse. * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains common type definitions and macros for the sparse * matrix routines. These definitions are of no interest to the user. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS */ #include #undef ABORT #undef MALLOC #undef FREE #undef REALLOC /* * MACRO DEFINITIONS * * Macros are distinguished by using solely capital letters in their * identifiers. This contrasts with C defined identifiers which are * strictly lower case, and program variable and procedure names * which use both upper and lower case. */ /* Begin macros. */ /* Boolean data type */ #define BOOLEAN int #define NO 0 #define YES 1 #define SPARSE_ID 0x772773 /* Arbitrary (is Sparse on phone). */ #define IS_SPARSE(matrix) ((matrix) != NULL && \ (matrix)->ID == SPARSE_ID) #define IS_VALID(matrix) ((matrix) != NULL && \ (matrix)->ID == SPARSE_ID && \ (matrix)->Error >= spOKAY && \ (matrix)->Error < spFATAL) #define IS_FACTORED(matrix) ((matrix)->Factored && !(matrix)->NeedsOrdering) /* Macro commands */ /* Macro functions that return the maximum or minimum independent of type. */ #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) /* Macro function that returns the absolute value of a floating point number. */ #define ABS(a) ((a) < 0 ? -(a) : (a)) /* Macro function that returns the square of a number. */ #define SQR(a) ((a)*(a)) /* Macro procedure that swaps two entities. */ #define SWAP(type, a, b) {type swapx; swapx = a; a = b; b = swapx;} /* Real and Complex numbers definition */ #define spREAL double /* Begin `realNumber'. */ typedef spREAL RealNumber, *RealVector; /* Begin `ComplexNumber'. */ typedef struct { RealNumber Real; RealNumber Imag; } ComplexNumber, *ComplexVector; /* Macro function that returns the approx absolute value of a complex number. */ #define ELEMENT_MAG(ptr) (ABS((ptr)->Real) + ABS((ptr)->Imag)) #define CMPLX_ASSIGN_VALUE(cnum, vReal, vImag) \ { (cnum).Real = vReal; \ (cnum).Imag = vImag; \ } /* Complex assignment statements. */ #define CMPLX_ASSIGN(to,from) \ { (to).Real = (from).Real; \ (to).Imag = (from).Imag; \ } #define CMPLX_CONJ_ASSIGN(to,from) \ { (to).Real = (from).Real; \ (to).Imag = -(from).Imag; \ } #define CMPLX_NEGATE_ASSIGN(to,from) \ { (to).Real = -(from).Real; \ (to).Imag = -(from).Imag; \ } #define CMPLX_CONJ_NEGATE_ASSIGN(to,from) \ { (to).Real = -(from).Real; \ (to).Imag = (from).Imag; \ } #define CMPLX_CONJ(a) (a).Imag = -(a).Imag #define CONJUGATE(a) (a).Imag = -(a).Imag #define CMPLX_NEGATE(a) \ { (a).Real = -(a).Real; \ (a).Imag = -(a).Imag; \ } #define CMPLX_NEGATE_SELF(cnum) \ { (cnum).Real = -(cnum).Real; \ (cnum).Imag = -(cnum).Imag; \ } /* Macro that returns the approx magnitude (L-1 norm) of a complex number. */ #define CMPLX_1_NORM(a) (ABS((a).Real) + ABS((a).Imag)) /* Macro that returns the approx magnitude (L-infinity norm) of a complex. */ #define CMPLX_INF_NORM(a) (MAX (ABS((a).Real),ABS((a).Imag))) /* Macro function that returns the magnitude (L-2 norm) of a complex number. */ #define CMPLX_2_NORM(a) (sqrt((a).Real*(a).Real + (a).Imag*(a).Imag)) /* Macro function that performs complex addition. */ #define CMPLX_ADD(to,from_a,from_b) \ { (to).Real = (from_a).Real + (from_b).Real; \ (to).Imag = (from_a).Imag + (from_b).Imag; \ } /* Macro function that performs addition of a complex and a scalar. */ #define CMPLX_ADD_SELF_SCALAR(cnum, scalar) \ { (cnum).Real += scalar; \ } /* Macro function that performs complex subtraction. */ #define CMPLX_SUBT(to,from_a,from_b) \ { (to).Real = (from_a).Real - (from_b).Real; \ (to).Imag = (from_a).Imag - (from_b).Imag; \ } /* Macro function that is equivalent to += operator for complex numbers. */ #define CMPLX_ADD_ASSIGN(to,from) \ { (to).Real += (from).Real; \ (to).Imag += (from).Imag; \ } /* Macro function that is equivalent to -= operator for complex numbers. */ #define CMPLX_SUBT_ASSIGN(to,from) \ { (to).Real -= (from).Real; \ (to).Imag -= (from).Imag; \ } /* Macro function that multiplies a complex number by a scalar. */ #define SCLR_MULT(to,sclr,cmplx) \ { (to).Real = (sclr) * (cmplx).Real; \ (to).Imag = (sclr) * (cmplx).Imag; \ } /* Macro function that multiply-assigns a complex number by a scalar. */ #define SCLR_MULT_ASSIGN(to,sclr) \ { (to).Real *= (sclr); \ (to).Imag *= (sclr); \ } /* Macro function that multiplies two complex numbers. */ #define CMPLX_MULT(to,from_a,from_b) \ { (to).Real = (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag = (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies a complex number and a scalar. */ #define CMPLX_MULT_SCALAR(to,from, scalar) \ { (to).Real = (from).Real * scalar; \ (to).Imag = (from).Imag * scalar; \ } /* Macro function that implements *= for a complex and a scalar number. */ #define CMPLX_MULT_SELF_SCALAR(cnum, scalar) \ { (cnum).Real *= scalar; \ (cnum).Imag *= scalar; \ } /* Macro function that multiply-assigns a complex number by a scalar. */ #define SCLR_MULT_ASSIGN(to,sclr) \ { (to).Real *= (sclr); \ (to).Imag *= (sclr); \ } /* Macro function that implements to *= from for complex numbers. */ #define CMPLX_MULT_ASSIGN(to,from) \ { RealNumber to_Real_ = (to).Real; \ (to).Real = to_Real_ * (from).Real - \ (to).Imag * (from).Imag; \ (to).Imag = to_Real_ * (from).Imag + \ (to).Imag * (from).Real; \ } /* Macro function that multiplies two complex numbers, the first of which is * conjugated. */ #define CMPLX_CONJ_MULT(to,from_a,from_b) \ { (to).Real = (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag = (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a * mult_b */ #define CMPLX_MULT_ADD(to,mult_a,mult_b,add) \ { (to).Real = (mult_a).Real * (mult_b).Real - \ (mult_a).Imag * (mult_b).Imag + (add).Real; \ (to).Imag = (mult_a).Real * (mult_b).Imag + \ (mult_a).Imag * (mult_b).Real + (add).Imag; \ } /* Macro function that subtracts the product of two complex numbers from * another. to = subt - mult_a * mult_b */ #define CMPLX_MULT_SUBT(to,mult_a,mult_b,subt) \ { (to).Real = (subt).Real - (mult_a).Real * (mult_b).Real + \ (mult_a).Imag * (mult_b).Imag; \ (to).Imag = (subt).Imag - (mult_a).Real * (mult_b).Imag - \ (mult_a).Imag * (mult_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a* * mult_b where mult_a* represents mult_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD(to,mult_a,mult_b,add) \ { (to).Real = (mult_a).Real * (mult_b).Real + \ (mult_a).Imag * (mult_b).Imag + (add).Real; \ (to).Imag = (mult_a).Real * (mult_b).Imag - \ (mult_a).Imag * (mult_b).Real + (add).Imag; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to += mult_a * mult_b */ #define CMPLX_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).Real += (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag += (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from another. */ #define CMPLX_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).Real -= (from_a).Real * (from_b).Real - \ (from_a).Imag * (from_b).Imag; \ (to).Imag -= (from_a).Real * (from_b).Imag + \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then adds them * to the destination. to += from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).Real += (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag += (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from the destination. to -= from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).Real -= (from_a).Real * (from_b).Real + \ (from_a).Imag * (from_b).Imag; \ (to).Imag -= (from_a).Real * (from_b).Imag - \ (from_a).Imag * (from_b).Real; \ } /* * Macro functions that provide complex division. */ /* Complex division: to = num / den */ #define CMPLX_DIV(to,num,den) \ { RealNumber r_, s_; \ if (((den).Real >= (den).Imag && (den).Real > -(den).Imag) || \ ((den).Real < (den).Imag && (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ s_ = (den).Real + r_*(den).Imag; \ (to).Real = ((num).Real + r_*(num).Imag)/s_; \ (to).Imag = ((num).Imag - r_*(num).Real)/s_; \ } \ else \ { r_ = (den).Real / (den).Imag; \ s_ = (den).Imag + r_*(den).Real; \ (to).Real = (r_*(num).Real + (num).Imag)/s_; \ (to).Imag = (r_*(num).Imag - (num).Real)/s_; \ } \ } /* Complex division and assignment: num /= den */ #define CMPLX_DIV_ASSIGN(num,den) \ { RealNumber r_, s_, t_; \ if (((den).Real >= (den).Imag && (den).Real > -(den).Imag) || \ ((den).Real < (den).Imag && (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ s_ = (den).Real + r_*(den).Imag; \ t_ = ((num).Real + r_*(num).Imag)/s_; \ (num).Imag = ((num).Imag - r_*(num).Real)/s_; \ (num).Real = t_; \ } \ else \ { r_ = (den).Real / (den).Imag; \ s_ = (den).Imag + r_*(den).Real; \ t_ = (r_*(num).Real + (num).Imag)/s_; \ (num).Imag = (r_*(num).Imag - (num).Real)/s_; \ (num).Real = t_; \ } \ } /* Complex reciprocation: to = 1.0 / den */ #define CMPLX_RECIPROCAL(to,den) \ { RealNumber r_; \ if (((den).Real >= (den).Imag && (den).Real > -(den).Imag) || \ ((den).Real < (den).Imag && (den).Real <= -(den).Imag)) \ { r_ = (den).Imag / (den).Real; \ (to).Imag = -r_*((to).Real = 1.0/((den).Real + r_*(den).Imag)); \ } \ else \ { r_ = (den).Real / (den).Imag; \ (to).Real = -r_*((to).Imag = -1.0/((den).Imag + r_*(den).Real));\ } \ } /* Allocation */ extern void * tmalloc(size_t); extern void txfree(void *); extern void * trealloc(void *, size_t); #define SP_MALLOC(type,number) (type *) tmalloc((size_t)(number) * sizeof(type)) #define SP_REALLOC(ptr,type,number) \ ptr = (type *) trealloc(ptr, (size_t)(number) * sizeof(type)) #define SP_FREE(ptr) { if ((ptr) != NULL) txfree(ptr); (ptr) = NULL; } /* A new calloc */ #ifndef HAVE_LIBGC #define SP_CALLOC(ptr,type,number) \ { ptr = (type *) calloc((size_t)(number), sizeof(type)); \ } #else /* HAVE_LIBCG */ #define SP_CALLOC(ptr,type,number) \ { ptr = (type *) tmalloc((size_t)(number) * sizeof(type)); \ } #endif #include "ngspice/defines.h" /* * MATRIX ELEMENT DATA STRUCTURE * * Every nonzero element in the matrix is stored in a dynamically allocated * MatrixElement structure. These structures are linked together in an * orthogonal linked list. Two different MatrixElement structures exist. * One is used when only real matrices are expected, it is missing an entry * for imaginary data. The other is used if complex matrices are expected. * It contains an entry for imaginary data. * * >>> Structure fields: * Real (RealNumber) * The real portion of the value of the element. Real must be the first * field in this structure. * Imag (RealNumber) * The imaginary portion of the value of the element. If the matrix * routines are not compiled to handle complex matrices, then this * field does not exist. If it exists, it must follow immediately after * Real. * Row (int) * The row number of the element. * Col (int) * The column number of the element. * NextInRow (struct MatrixElement *) * NextInRow contains a pointer to the next element in the row to the * right of this element. If this element is the last nonzero in the * row then NextInRow contains NULL. * NextInCol (struct MatrixElement *) * NextInCol contains a pointer to the next element in the column below * this element. If this element is the last nonzero in the column then * NextInCol contains NULL. * pInitInfo (void *) * Pointer to user data used for initialization of the matrix element. * Initialized to NULL. * * >>> Type definitions: * ElementPtr * A pointer to a MatrixElement. * ArrayOfElementPtrs * An array of ElementPtrs. Used for FirstInRow, FirstInCol and * Diag pointer arrays. */ /* Begin `MatrixElement'. */ struct MatrixElement { RealNumber Real; RealNumber Imag; int Row; int Col; struct MatrixElement *NextInRow; struct MatrixElement *NextInCol; #if INITIALIZE void *pInitInfo; #endif }; typedef struct MatrixElement *ElementPtr; typedef ElementPtr *ArrayOfElementPtrs; /* * ALLOCATION DATA STRUCTURE * * The sparse matrix routines keep track of all memory that is allocated by * the operating system so the memory can later be freed. This is done by * saving the pointers to all the chunks of memory that are allocated to a * particular matrix in an allocation list. That list is organized as a * linked list so that it can grow without a priori bounds. * * >>> Structure fields: * AllocatedPtr (void *) * Pointer to chunk of memory that has been allocated for the matrix. * NextRecord (struct AllocationRecord *) * Pointer to the next allocation record. */ /* Begin `AllocationRecord'. */ struct AllocationRecord { void *AllocatedPtr; struct AllocationRecord *NextRecord; }; typedef struct AllocationRecord *AllocationListPtr; /* * FILL-IN LIST DATA STRUCTURE * * The sparse matrix routines keep track of all fill-ins separately from * user specified elements so they may be removed by spStripFills(). Fill-ins * are allocated in bunched in what is called a fill-in lists. The data * structure defined below is used to organize these fill-in lists into a * linked-list. * * >>> Structure fields: * pFillinList (ElementPtr) * Pointer to a fill-in list, or a bunch of fill-ins arranged contiguously * in memory. * NumberOfFillinsInList (int) * Seems pretty self explanatory to me. * Next (struct FillinListNodeStruct *) * Pointer to the next fill-in list structures. */ /* Begin `FillinListNodeStruct'. */ struct FillinListNodeStruct { ElementPtr pFillinList; int NumberOfFillinsInList; struct FillinListNodeStruct *Next; }; /* Similar to above, but keeps track of the original Elements */ /* Begin `ElementListNodeStruct'. */ struct ElementListNodeStruct { ElementPtr pElementList; int NumberOfElementsInList; struct ElementListNodeStruct *Next; }; /* * MATRIX FRAME DATA STRUCTURE * * This structure contains all the pointers that support the orthogonal * linked list that contains the matrix elements. Also included in this * structure are other numbers and pointers that are used globally by the * sparse matrix routines and are associated with one particular matrix. * * >>> Type definitions: * MatrixPtr * A pointer to MatrixFrame. Essentially, a pointer to the matrix. * * >>> Structure fields: * AbsThreshold (RealNumber) * The absolute magnitude an element must have to be considered as a * pivot candidate, except as a last resort. * AllocatedExtSize (int) * The allocated size of the arrays used to translate external row and * column numbers to their internal values. * AllocatedSize (int) * The currently allocated size of the matrix; the size the matrix can * grow to when EXPANDABLE is set true and AllocatedSize is the largest * the matrix can get without requiring that the matrix frame be * reallocated. * Complex (int) * The flag which indicates whether the matrix is complex (true) or * real. * CurrentSize (int) * This number is used during the building of the matrix when the * TRANSLATE option is set true. It indicates the number of internal * rows and columns that have elements in them. * Diag (ArrayOfElementPtrs) * Array of pointers that points to the diagonal elements. * DoCmplxDirect (int *) * Array of flags, one for each column in matrix. If a flag is true * then corresponding column in a complex matrix should be eliminated * in spFactor() using direct addressing (rather than indirect * addressing). * DoRealDirect (int *) * Array of flags, one for each column in matrix. If a flag is true * then corresponding column in a real matrix should be eliminated * in spFactor() using direct addressing (rather than indirect * addressing). * Elements (int) * The total number of elements present in matrix. * Error (int) * The error status of the sparse matrix package. * ExtSize (int) * The value of the largest external row or column number encountered. * ExtToIntColMap (int []) * An array that is used to convert external columns number to internal * external column numbers. Present only if TRANSLATE option is set true. * ExtToIntRowMap (int []) * An array that is used to convert external row numbers to internal * external row numbers. Present only if TRANSLATE option is set true. * Factored (int) * Indicates if matrix has been factored. This flag is set true in * spFactor() and spOrderAndFactor() and set false in spCreate() * and spClear(). * Fillins (int) * The number of fill-ins created during the factorization the matrix. * FirstInCol (ArrayOfElementPtrs) * Array of pointers that point to the first nonzero element of the * column corresponding to the index. * FirstInRow (ArrayOfElementPtrs) * Array of pointers that point to the first nonzero element of the row * corresponding to the index. * ID (unsigned long int) * A constant that provides the sparse data structure with a signature. * When DEBUG is true, all externally available sparse routines check * this signature to assure they are operating on a valid matrix. * Intermediate (RealVector) * Temporary storage used in the spSolve routines. Intermediate is an * array used during forward and backward substitution. It is * commonly called y when the forward and backward substitution process is * denoted Ax = b => Ly = b and Ux = y. * InternalVectorsAllocated (int) * A flag that indicates whether the Markowitz vectors and the * Intermediate vector have been created. * These vectors are created in spcCreateInternalVectors(). * IntToExtColMap (int []) * An array that is used to convert internal column numbers to external * external column numbers. * IntToExtRowMap (int []) * An array that is used to convert internal row numbers to external * external row numbers. * MarkowitzCol (int []) * An array that contains the count of the non-zero elements excluding * the pivots for each column. Used to generate and update MarkowitzProd. * MarkowitzProd (long []) * The array of the products of the Markowitz row and column counts. The * element with the smallest product is the best pivot to use to maintain * sparsity. * MarkowitzRow (int []) * An array that contains the count of the non-zero elements excluding * the pivots for each row. Used to generate and update MarkowitzProd. * MaxRowCountInLowerTri (int) * The maximum number of off-diagonal element in the rows of L, the * lower triangular matrix. This quantity is used when computing an * estimate of the roundoff error in the matrix. * NeedsOrdering (int) * This is a flag that signifies that the matrix needs to be ordered * or reordered. NeedsOrdering is set true in spCreate() and * spGetElement() or spGetAdmittance() if new elements are added to the * matrix after it has been previously factored. It is set false in * spOrderAndFactor(). * NumberOfInterchangesIsOdd (int) * Flag that indicates the sum of row and column interchange counts * is an odd number. Used when determining the sign of the determinant. * Originals (int) * The number of original elements (total elements minus fill ins) * present in matrix. * Partitioned (int) * This flag indicates that the columns of the matrix have been * partitioned into two groups. Those that will be addressed directly * and those that will be addressed indirectly in spFactor(). * PivotsOriginalCol (int) * Column pivot was chosen from. * PivotsOriginalRow (int) * Row pivot was chosen from. * PivotSelectionMethod (char) * Character that indicates which pivot search method was successful. * PreviousMatrixWasComplex (int) * This flag in needed to determine how to clear the matrix. When * dealing with real matrices, it is important that the imaginary terms * in the matrix elements be zero. Thus, if the previous matrix was * complex, then the current matrix will be cleared as if it were complex * even if it is real. * RelThreshold (RealNumber) * The magnitude an element must have relative to others in its row * to be considered as a pivot candidate, except as a last resort. * Reordered (int) * This flag signifies that the matrix has been reordered. It * is cleared in spCreate(), set in spMNA_Preorder() and * spOrderAndFactor() and is used in spPrint(). * RowsLinked (int) * A flag that indicates whether the row pointers exist. The AddByIndex * routines do not generate the row pointers, which are needed by some * of the other routines, such as spOrderAndFactor() and spScale(). * The row pointers are generated in the function spcLinkRows(). * SingularCol (int) * Normally zero, but if matrix is found to be singular, SingularCol is * assigned the external column number of pivot that was zero. * SingularRow (int) * Normally zero, but if matrix is found to be singular, SingularRow is * assigned the external row number of pivot that was zero. * Singletons (int) * The number of singletons available for pivoting. Note that if row I * and column I both contain singletons, only one of them is counted. * Size (int) * Number of rows and columns in the matrix. Does not change as matrix * is factored. * TrashCan (MatrixElement) * This is a dummy MatrixElement that is used to by the user to stuff * data related to the zero row or column. In other words, when the user * adds an element in row zero or column zero, then the matrix returns * a pointer to TrashCan. In this way the user can have a uniform way * data into the matrix independent of whether a component is connected * to ground. * * >>> The remaining fields are related to memory allocation. * TopOfAllocationList (AllocationListPtr) * Pointer which points to the top entry in a list. The list contains * all the pointers to the segments of memory that have been allocated * to this matrix. This is used when the memory is to be freed on * deallocation of the matrix. * RecordsRemaining (int) * Number of slots left in the list of allocations. * NextAvailElement (ElementPtr) * Pointer to the next available element which has been allocated but as * yet is unused. Matrix elements are allocated in groups of * ELEMENTS_PER_ALLOCATION in order to speed element allocation and * freeing. * ElementsRemaining (int) * Number of unused elements left in last block of elements allocated. * NextAvailFillin (ElementPtr) * Pointer to the next available fill-in which has been allocated but * as yet is unused. Fill-ins are allocated in a group in order to keep * them physically close in memory to the rest of the matrix. * FillinsRemaining (int) * Number of unused fill-ins left in the last block of fill-ins * allocated. * FirstFillinListNode (FillinListNodeStruct *) * A pointer to the head of the linked-list that keeps track of the * lists of fill-ins. * LastFillinListNode (FillinListNodeStruct *) * A pointer to the tail of the linked-list that keeps track of the * lists of fill-ins. */ /* Begin `MatrixFrame'. */ struct MatrixFrame { RealNumber AbsThreshold; int AllocatedSize; int AllocatedExtSize; int Complex; int CurrentSize; ArrayOfElementPtrs Diag; int *DoCmplxDirect; int *DoRealDirect; int Elements; int Error; int ExtSize; int *ExtToIntColMap; int *ExtToIntRowMap; int Factored; int Fillins; ArrayOfElementPtrs FirstInCol; ArrayOfElementPtrs FirstInRow; unsigned long ID; RealVector Intermediate; int InternalVectorsAllocated; int *IntToExtColMap; int *IntToExtRowMap; int *MarkowitzRow; int *MarkowitzCol; long *MarkowitzProd; int MaxRowCountInLowerTri; int NeedsOrdering; int NumberOfInterchangesIsOdd; int Originals; int Partitioned; int PivotsOriginalCol; int PivotsOriginalRow; char PivotSelectionMethod; int PreviousMatrixWasComplex; RealNumber RelThreshold; int Reordered; int RowsLinked; int SingularCol; int SingularRow; int Singletons; int Size; struct MatrixElement TrashCan; AllocationListPtr TopOfAllocationList; int RecordsRemaining; ElementPtr NextAvailElement; int ElementsRemaining; struct ElementListNodeStruct *FirstElementListNode; struct ElementListNodeStruct *LastElementListNode; ElementPtr NextAvailFillin; int FillinsRemaining; struct FillinListNodeStruct *FirstFillinListNode; struct FillinListNodeStruct *LastFillinListNode; }; /* * Function declarations */ extern ElementPtr spcGetElement( MatrixPtr ); extern ElementPtr spcGetFillin( MatrixPtr ); extern ElementPtr spcFindElementInCol( MatrixPtr, ElementPtr*, int, int, int ); extern ElementPtr spcCreateElement( MatrixPtr, int, int, ElementPtr*, int ); extern void spcCreateInternalVectors( MatrixPtr ); extern void spcLinkRows( MatrixPtr ); extern void spcColExchange( MatrixPtr, int, int ); extern void spcRowExchange( MatrixPtr, int, int ); void spErrorMessage(MatrixPtr, FILE *, char *); #endif ngspice-26/src/maths/sparse/spbuild.c0000644000265600020320000010242412264261473017242 0ustar andreasadmin/* * MATRIX BUILD MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the routines associated with clearing, loading and * preprocessing the matrix for the sparse matrix routines. * * >>> User accessible functions contained in this file: * spClear * spGetElement * spFindElement * spGetAdmittance * spGetQuad * spGetOnes * spInstallInitInfo * spGetInitInfo * spInitialize * * >>> Other functions contained in this file: * spcFindElementInCol * Translate * spcCreateElement * spcLinkRows * EnlargeMatrix * ExpandTranslationArrays */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" /* * Function declarations */ static void Translate( MatrixPtr, int*, int* ); static void EnlargeMatrix( MatrixPtr, int ); static void ExpandTranslationArrays( MatrixPtr, int ); /* * CLEAR MATRIX * * Sets every element of the matrix to zero and clears the error flag. * * >>> Arguments: * Matrix (char *) * Pointer to matrix that is to be cleared. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the element being cleared. */ void spClear(MatrixPtr Matrix) { ElementPtr pElement; int I; /* Begin `spClear'. */ assert( IS_SPARSE( Matrix ) ); /* Clear matrix. */ if (Matrix->PreviousMatrixWasComplex || Matrix->Complex) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0; pElement->Imag = 0.0; pElement = pElement->NextInCol; } } } else { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real = 0.0; pElement = pElement->NextInCol; } } } /* Empty the trash. */ Matrix->TrashCan.Real = 0.0; Matrix->TrashCan.Imag = 0.0; Matrix->Error = spOKAY; Matrix->Factored = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->PreviousMatrixWasComplex = Matrix->Complex; return; } /* * SINGLE ELEMENT LOCATION IN MATRIX BY INDEX * * Finds element [Row,Col] and returns a pointer to it. If element is * not found then it is created and spliced into matrix. This routine * is only to be used after spCreate() and before spMNA_Preorder(), * spFactor() or spOrderAndFactor(). Returns a pointer to the * Real portion of a MatrixElement. This pointer is later used by * spADD_xxx_ELEMENT to directly access element. * * >>> Returns: * Returns a pointer to the element. This pointer is then used to directly * access the element during successive builds. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that the element is to be added to. * Row (int) * Row index for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * row zero are discarded. In no case may Row be less than zero. * Col (int) * Column index for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * column zero are discarded. In no case may Col be less than zero. * * >>> Local variables: * pElement (RealNumber *) * Pointer to the element. * * >>> Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ RealNumber * spFindElement(MatrixPtr Matrix, int Row, int Col) { ElementPtr pElement; /* Begin `spFindElement'. */ assert( IS_SPARSE( Matrix ) && Row >= 0 && Col >= 0 ); if ((Row == 0) || (Col == 0)) return &Matrix->TrashCan.Real; #if TRANSLATE Translate( Matrix, &Row, &Col ); if (Matrix->Error == spNO_MEMORY) return NULL; #endif #if ! TRANSLATE assert(Row <= Matrix->Size && Col <= Matrix->Size); #endif /* * The condition part of the following if statement tests to see if the * element resides along the diagonal, if it does then it tests to see * if the element has been created yet (Diag pointer not NULL). The * pointer to the element is then assigned to Element after it is cast * into a pointer to a RealNumber. This casting makes the pointer into * a pointer to Real. This statement depends on the fact that Real * is the first record in the MatrixElement structure. */ if ((Row != Col) || ((pElement = Matrix->Diag[Row]) == NULL)) { /* * Element does not exist or does not reside along diagonal. Search * column for element. As in the if statement above, the pointer to the * element which is returned by spcFindElementInCol is cast into a * pointer to Real, a RealNumber. */ pElement = spcFindElementInCol( Matrix, &(Matrix->FirstInCol[Col]), Row, Col, NO ); } return & pElement->Real; } /* * SINGLE ELEMENT ADDITION TO MATRIX BY INDEX * * Finds element [Row,Col] and returns a pointer to it. If element is * not found then it is created and spliced into matrix. This routine * is only to be used after spCreate() and before spMNA_Preorder(), * spFactor() or spOrderAndFactor(). Returns a pointer to the * Real portion of a MatrixElement. This pointer is later used by * spADD_xxx_ELEMENT to directly access element. * * >>> Returns: * Returns a pointer to the element. This pointer is then used to directly * access the element during successive builds. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that the element is to be added to. * Row (int) * Rowstrchr for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * row zero are discarded. In no case may Row be less than zero. * Col (int) * Columnstrchr for element. Must be in the range of [0..Size] unless * the options EXPANDABLE or TRANSLATE are used. Elements placed in * column zero are discarded. In no case may Col be less than zero. * * >>> Local variables: * pElement (RealNumber *) * Pointer to the element. * * >>> Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ RealNumber * spGetElement(MatrixPtr Matrix, int Row, int Col) { ElementPtr pElement; /* Begin `spGetElement'. */ assert( IS_SPARSE( Matrix ) && Row >= 0 && Col >= 0 ); if ((Row == 0) || (Col == 0)) return &Matrix->TrashCan.Real; #if !TRANSLATE assert(Matrix->NeedsOrdering); #endif #if TRANSLATE Translate( Matrix, &Row, &Col ); if (Matrix->Error == spNO_MEMORY) return NULL; #endif #if !TRANSLATE #if !EXPANDABLE assert(Row <= Matrix->Size && Col <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if ((Row > Matrix->Size) || (Col > Matrix->Size)) EnlargeMatrix( Matrix, MAX(Row, Col) ); if (Matrix->Error == spNO_MEMORY) return NULL; #endif #endif /* The condition part of the following if statement tests to see * if the element resides along the diagonal, if it does then it * tests to see if the element has been created yet (Diag pointer * not NULL). The pointer to the element is then assigned to * Element after it is cast into a pointer to a RealNumber. This * casting makes the pointer into a pointer to Real. This * statement depends on the fact that Real is the first record in * the MatrixElement structure. */ if ((Row != Col) || ((pElement = Matrix->Diag[Row]) == NULL)) { /* Element does not exist or does not reside along diagonal. * Search column for element. As in the if statement above, * the pointer to the element which is returned by * spcFindElementInCol is cast into a pointer to Real, a * RealNumber. */ pElement = spcFindElementInCol( Matrix, &(Matrix->FirstInCol[Col]), Row, Col, YES ); } return & pElement->Real; } /* * FIND ELEMENT BY SEARCHING COLUMN * * Searches column starting at element specified at PtrAddr and finds element * in Row. If Element does not exists, it is created. The pointer to the * element is returned. * * >>> Returned: * A pointer to the desired element: * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to Matrix. * LastAddr (ElementPtr *) * Address of pointer that initially points to the element in Col at which * the search is started. The pointer in this location may be changed if * a fill-in is required in and adjacent element. For this reason it is * important that LastAddr be the address of a FirstInCol or a NextInCol * rather than a temporary variable. * Row (int) * Row being searched for. * Col (int) * Column being searched. * CreateIfMissing (int) * Indicates what to do if element is not found, create one or return a * NULL pointer. * * Local variables: * pElement (ElementPtr) * Pointer used to search through matrix. */ ElementPtr spcFindElementInCol(MatrixPtr Matrix, ElementPtr *LastAddr, int Row, int Col, int CreateIfMissing) { ElementPtr pElement; /* Begin `spcFindElementInCol'. */ pElement = *LastAddr; /* Search for element. */ while (pElement != NULL) { if (pElement->Row < Row) { /* Have not reached element yet. */ LastAddr = &(pElement->NextInCol); pElement = pElement->NextInCol; } else if (pElement->Row == Row) { /* Reached element. */ return pElement; } else break; /* while loop */ } /* Element does not exist and must be created. */ if (CreateIfMissing) return spcCreateElement( Matrix, Row, Col, LastAddr, NO ); else return NULL; } #if TRANSLATE /* * TRANSLATE EXTERNAL INDICES TO INTERNAL * * Convert external row and column numbers to internal row and column numbers. * Also updates Ext/Int maps. * * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row (int *) * Upon entry Row is either a external row number or an external node * number. Upon return, the internal equivalent is supplied. * Col (int *) * Upon entry Column is either a external column number or an external node * number. Upon return, the internal equivalent is supplied. * * >>> Local variables: * ExtCol (int) * Temporary variable used to hold the external column or node number * during the external to internal column number translation. * ExtRow (int) * Temporary variable used to hold the external row or node number during * the external to internal row number translation. * IntCol (int) * Temporary variable used to hold the internal column or node number * during the external to internal column number translation. * IntRow (int) * Temporary variable used to hold the internal row or node number during * the external to internal row number translation. */ static void Translate(MatrixPtr Matrix, int *Row, int *Col) { int IntRow, IntCol, ExtRow, ExtCol; /* Begin `Translate'. */ ExtRow = *Row; ExtCol = *Col; /* Expand translation arrays if necessary. */ if ((ExtRow > Matrix->AllocatedExtSize) || (ExtCol > Matrix->AllocatedExtSize)) { ExpandTranslationArrays( Matrix, MAX(ExtRow, ExtCol) ); if (Matrix->Error == spNO_MEMORY) return; } /* Set ExtSize if necessary. */ if ((ExtRow > Matrix->ExtSize) || (ExtCol > Matrix->ExtSize)) Matrix->ExtSize = MAX(ExtRow, ExtCol); /* Translate external row or node number to internal row or node number. */ if ((IntRow = Matrix->ExtToIntRowMap[ExtRow]) == -1) { Matrix->ExtToIntRowMap[ExtRow] = ++Matrix->CurrentSize; Matrix->ExtToIntColMap[ExtRow] = Matrix->CurrentSize; IntRow = Matrix->CurrentSize; #if !EXPANDABLE assert(IntRow <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if (IntRow > Matrix->Size) EnlargeMatrix( Matrix, IntRow ); if (Matrix->Error == spNO_MEMORY) return; #endif Matrix->IntToExtRowMap[IntRow] = ExtRow; Matrix->IntToExtColMap[IntRow] = ExtRow; } /* Translate external column or node number to internal column or node number.*/ if ((IntCol = Matrix->ExtToIntColMap[ExtCol]) == -1) { Matrix->ExtToIntRowMap[ExtCol] = ++Matrix->CurrentSize; Matrix->ExtToIntColMap[ExtCol] = Matrix->CurrentSize; IntCol = Matrix->CurrentSize; #if !EXPANDABLE assert(IntCol <= Matrix->Size); #endif #if EXPANDABLE /* Re-size Matrix if necessary. */ if (IntCol > Matrix->Size) EnlargeMatrix( Matrix, IntCol ); if (Matrix->Error == spNO_MEMORY) return; #endif Matrix->IntToExtRowMap[IntCol] = ExtCol; Matrix->IntToExtColMap[IntCol] = ExtCol; } *Row = IntRow; *Col = IntCol; return; } #endif #if QUAD_ELEMENT /* * ADDITION OF ADMITTANCE TO MATRIX BY INDEX * * Performs same function as spGetElement except rather than one * element, all four Matrix elements for a floating component are * added. This routine also works if component is grounded. Positive * elements are placed at [Node1,Node2] and [Node2,Node1]. This * routine is only to be used after spCreate() and before * spMNA_Preorder(), spFactor() or spOrderAndFactor(). * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Node1 (int) * Row and column indices for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Node zero is the * ground node. In no case may Node1 be less than zero. * Node2 (int) * Row and column indices for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Node zero is the * ground node. In no case may Node2 be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetAdmittance(MatrixPtr Matrix, int Node1, int Node2, struct spTemplate *Template) { /* Begin `spGetAdmittance'. */ Template->Element1 = spGetElement(Matrix, Node1, Node1 ); Template->Element2 = spGetElement(Matrix, Node2, Node2 ); Template->Element3Negated = spGetElement( Matrix, Node2, Node1 ); Template->Element4Negated = spGetElement( Matrix, Node1, Node2 ); if ((Template->Element1 == NULL) || (Template->Element2 == NULL) || (Template->Element3Negated == NULL) || (Template->Element4Negated == NULL)) return spNO_MEMORY; if (Node1 == 0) SWAP( RealNumber*, Template->Element1, Template->Element2 ); return spOKAY; } #endif /* QUAD_ELEMENT */ #if QUAD_ELEMENT /* * ADDITION OF FOUR ELEMENTS TO MATRIX BY INDEX * * Similar to spGetAdmittance, except that spGetAdmittance only * handles 2-terminal components, whereas spGetQuad handles simple * 4-terminals as well. These 4-terminals are simply generalized * 2-terminals with the option of having the sense terminals different * from the source and sink terminals. spGetQuad adds four * elements to the matrix. Positive elements occur at Row1,Col1 * Row2,Col2 while negative elements occur at Row1,Col2 and Row2,Col1. * The routine works fine if any of the rows and columns are zero. * This routine is only to be used after spCreate() and before * spMNA_Preorder(), spFactor() or spOrderAndFactor() * unless TRANSLATE is set TRUE. * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Row1 (int) * First rowstrchr for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Row1 be less than zero. * Row2 (int) * Second rowstrchr for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Row2 be less than zero. * Col1 (int) * First columnstrchr for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground column. In no case may Col1 be less than zero. * Col2 (int) * Second columnstrchr for elements. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground column. In no case may Col2 be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * Real (RealNumber) * Real data to be added to elements. * Imag (RealNumber) * Imag data to be added to elements. If matrix is real, this argument * may be deleted. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetQuad(MatrixPtr Matrix, int Row1, int Row2, int Col1, int Col2, struct spTemplate *Template) { /* Begin `spGetQuad'. */ Template->Element1 = spGetElement( Matrix, Row1, Col1); Template->Element2 = spGetElement( Matrix, Row2, Col2 ); Template->Element3Negated = spGetElement( Matrix, Row2, Col1 ); Template->Element4Negated = spGetElement( Matrix, Row1, Col2 ); if ((Template->Element1 == NULL) || (Template->Element2 == NULL) || (Template->Element3Negated == NULL) || (Template->Element4Negated == NULL)) return spNO_MEMORY; if (Template->Element1 == & Matrix->TrashCan.Real) SWAP( RealNumber *, Template->Element1, Template->Element2 ); return spOKAY; } #endif /* QUAD_ELEMENT */ #if QUAD_ELEMENT /* * ADDITION OF FOUR STRUCTURAL ONES TO MATRIX BY INDEX * * Performs similar function to spGetQuad() except this routine is * meant for components that do not have an admittance representation. * * The following stamp is used: * Pos Neg Eqn * Pos [ . . 1 ] * Neg [ . . -1 ] * Eqn [ 1 -1 . ] * * >>> Returns: * Error code. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix that component is to be entered in. * Pos (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Pos be less than zero. * Neg (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Neg be less than zero. * Eqn (int) * See stamp above. Must be in the range of [0..Size] * unless the options EXPANDABLE or TRANSLATE are used. Zero is the * ground row. In no case may Eqn be less than zero. * Template (struct spTemplate *) * Collection of pointers to four elements that are later used to directly * address elements. User must supply the template, this routine will * fill it. * * Possible errors: * spNO_MEMORY * Error is not cleared in this routine. */ int spGetOnes(MatrixPtr Matrix, int Pos, int Neg, int Eqn, struct spTemplate *Template) { /* Begin `spGetOnes'. */ Template->Element4Negated = spGetElement( Matrix, Neg, Eqn ); Template->Element3Negated = spGetElement( Matrix, Eqn, Neg ); Template->Element2 = spGetElement( Matrix, Pos, Eqn ); Template->Element1 = spGetElement( Matrix, Eqn, Pos ); if ((Template->Element1 == NULL) || (Template->Element2 == NULL) || (Template->Element3Negated == NULL) || (Template->Element4Negated == NULL)) return spNO_MEMORY; spADD_REAL_QUAD( *Template, 1.0 ); return spOKAY; } #endif /* QUAD_ELEMENT */ /* * * CREATE AND SPLICE ELEMENT INTO MATRIX * * This routine is used to create new matrix elements and splice them into the * matrix. * * >>> Returned: * A pointer to the element that was created is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Row (int) * Rowstrchr for element. * Col (int) * Columnstrchr for element. * LastAddr (ElementPtr *) * This contains the address of the pointer to the element just above the * one being created. It is used to speed the search and it is updated with * address of the created element. * Fillin (int) * Flag that indicates if created element is to be a fill-in. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. It is used to refer to the newly * created element and to restring the pointers of the element's row and * column. * pLastElement (ElementPtr) * Pointer to the element in the matrix that was just previously pointed * to by pElement. It is used to restring the pointers of the element's * row and column. * pCreatedElement (ElementPtr) * Pointer to the desired element, the one that was just created. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcCreateElement(MatrixPtr Matrix, int Row, int Col, ElementPtr *LastAddr, int Fillin) { ElementPtr pElement, pLastElement; ElementPtr pCreatedElement; /* Begin `spcCreateElement'. */ if (Matrix->RowsLinked) { /* Row pointers cannot be ignored. */ if (Fillin) { pElement = spcGetFillin( Matrix ); Matrix->Fillins++; } else { pElement = spcGetElement( Matrix ); Matrix->Originals++; Matrix->NeedsOrdering = YES; } if (pElement == NULL) return NULL; /* If element is on diagonal, store pointer in Diag. */ if (Row == Col) Matrix->Diag[Row] = pElement; /* Initialize Element. */ pCreatedElement = pElement; pElement->Row = Row; pElement->Col = Col; pElement->Real = 0.0; pElement->Imag = 0.0; #if INITIALIZE pElement->pInitInfo = NULL; #endif /* Splice element into column. */ pElement->NextInCol = *LastAddr; *LastAddr = pElement; /* Search row for proper element position. */ pElement = Matrix->FirstInRow[Row]; pLastElement = NULL; while (pElement != NULL) { /* Search for element row position. */ if (pElement->Col < Col) { /* Have not reached desired element. */ pLastElement = pElement; pElement = pElement->NextInRow; } else pElement = NULL; } /* Splice element into row. */ pElement = pCreatedElement; if (pLastElement == NULL) { /* Element is first in row. */ pElement->NextInRow = Matrix->FirstInRow[Row]; Matrix->FirstInRow[Row] = pElement; } else { /* Element is not first in row. */ pElement->NextInRow = pLastElement->NextInRow; pLastElement->NextInRow = pElement; } } else { /* Matrix has not been factored yet. Thus get element rather * than fill-in. Also, row pointers can be ignored. */ /* Allocate memory for Element. */ pElement = spcGetElement( Matrix ); Matrix->Originals++; if (pElement == NULL) return NULL; /* If element is on diagonal, store pointer in Diag. */ if (Row == Col) Matrix->Diag[Row] = pElement; /* Initialize Element. */ pCreatedElement = pElement; pElement->Row = Row; #if DEBUG pElement->Col = Col; #endif pElement->Real = 0.0; pElement->Imag = 0.0; #if INITIALIZE pElement->pInitInfo = NULL; #endif /* Splice element into column. */ pElement->NextInCol = *LastAddr; *LastAddr = pElement; } Matrix->Elements++; return pCreatedElement; } /* * * LINK ROWS * * This routine is used to generate the row links. The spGetElement() * routines do not create row links, which are needed by the spFactor() * routines. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. * FirstInRowEntry (ElementPtr *) * A pointer into the FirstInRow array. Points to the FirstInRow entry * currently being operated upon. * FirstInRowArray (ArrayOfElementPtrs) * A pointer to the FirstInRow array. Same as Matrix->FirstInRow but * resides in a and requires less indirection so is faster to * use. * Col (int) * Column currently being operated upon. */ void spcLinkRows(MatrixPtr Matrix) { ElementPtr pElement, *FirstInRowEntry; ArrayOfElementPtrs FirstInRowArray; int Col; /* Begin `spcLinkRows'. */ FirstInRowArray = Matrix->FirstInRow; for (Col = Matrix->Size; Col >= 1; Col--) { /* Generate row links for the elements in the Col'th column. */ pElement = Matrix->FirstInCol[Col]; while (pElement != NULL) { pElement->Col = Col; FirstInRowEntry = &FirstInRowArray[pElement->Row]; pElement->NextInRow = *FirstInRowEntry; *FirstInRowEntry = pElement; pElement = pElement->NextInCol; } } Matrix->RowsLinked = YES; return; } /* * ENLARGE MATRIX * * Increases the size of the matrix. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NewSize (int) * The new size of the matrix. * * >>> Local variables: * OldAllocatedSize (int) * The allocated size of the matrix before it is expanded. */ static void EnlargeMatrix(MatrixPtr Matrix, int NewSize) { int I, OldAllocatedSize = Matrix->AllocatedSize; /* Begin `EnlargeMatrix'. */ Matrix->Size = NewSize; if (NewSize <= OldAllocatedSize) return; /* Expand the matrix frame. */ NewSize = (int)MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedSize = NewSize; if (( SP_REALLOC(Matrix->IntToExtColMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( SP_REALLOC(Matrix->IntToExtRowMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( SP_REALLOC(Matrix->Diag, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( SP_REALLOC(Matrix->FirstInCol, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( SP_REALLOC(Matrix->FirstInRow, ElementPtr, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } /* Destroy the Markowitz and Intermediate vectors, they will be * recreated in spOrderAndFactor(). */ SP_FREE( Matrix->MarkowitzRow ); SP_FREE( Matrix->MarkowitzCol ); SP_FREE( Matrix->MarkowitzProd ); SP_FREE( Matrix->DoRealDirect ); SP_FREE( Matrix->DoCmplxDirect ); SP_FREE( Matrix->Intermediate ); Matrix->InternalVectorsAllocated = NO; /* Initialize the new portion of the vectors. */ for (I = OldAllocatedSize+1; I <= NewSize; I++) { Matrix->IntToExtColMap[I] = I; Matrix->IntToExtRowMap[I] = I; Matrix->Diag[I] = NULL; Matrix->FirstInRow[I] = NULL; Matrix->FirstInCol[I] = NULL; } return; } #if TRANSLATE /* * EXPAND TRANSLATION ARRAYS * * Increases the size arrays that are used to translate external to internal * row and column numbers. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NewSize (int) * The new size of the translation arrays. * * >>> Local variables: * OldAllocatedSize (int) * The allocated size of the translation arrays before being expanded. */ static void ExpandTranslationArrays(MatrixPtr Matrix, int NewSize) { int I, OldAllocatedSize = Matrix->AllocatedExtSize; /* Begin `ExpandTranslationArrays'. */ Matrix->ExtSize = NewSize; if (NewSize <= OldAllocatedSize) return; /* Expand the translation arrays ExtToIntRowMap and ExtToIntColMap. */ NewSize = (int)MAX( NewSize, EXPANSION_FACTOR * OldAllocatedSize ); Matrix->AllocatedExtSize = NewSize; if (( SP_REALLOC(Matrix->ExtToIntRowMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } if (( SP_REALLOC(Matrix->ExtToIntColMap, int, NewSize+1)) == NULL) { Matrix->Error = spNO_MEMORY; return; } /* Initialize the new portion of the vectors. */ for (I = OldAllocatedSize+1; I <= NewSize; I++) { Matrix->ExtToIntRowMap[I] = -1; Matrix->ExtToIntColMap[I] = -1; } return; } #endif #if INITIALIZE /* * INITIALIZE MATRIX * * With the INITIALIZE compiler option (see spConfig.h) set TRUE, * Sparse allows the user to keep initialization information with each * structurally nonzero matrix element. Each element has a pointer * that is set and used by the user. The user can set this pointer * using spInstallInitInfo and may be read using spGetInitInfo. Both * may be used only after the element exists. The function * spInitialize() is a user customizable way to initialize the matrix. * Passed to this routine is a function pointer. spInitialize() sweeps * through every element in the matrix and checks the pInitInfo * pointer (the user supplied pointer). If the pInitInfo is NULL, * which is TRUE unless the user changes it (almost always TRUE for * fill-ins), then the element is zeroed. Otherwise, the function * pointer is called and passed the pInitInfo pointer as well as the * element pointer and the external row and column numbers. If the * user sets the value of each element, then spInitialize() replaces * spClear(). * * The user function is expected to return a nonzero integer if there * is a fatal error and zero otherwise. Upon encountering a nonzero * return code, spInitialize() terminates and returns the error code. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible Errors: * Returns nonzero if error, zero otherwise. */ void spInstallInitInfo(RealNumber *pElement, void *pInitInfo) { /* Begin `spInstallInitInfo'. */ assert(pElement != NULL); ((ElementPtr)pElement)->pInitInfo = pInitInfo; } void * spGetInitInfo(RealNumber *pElement) { /* Begin `spGetInitInfo'. */ assert(pElement != NULL); return ((ElementPtr)pElement)->pInitInfo; } int spInitialize(MatrixPtr Matrix, int (*pInit)(RealNumber*, void *InitInfo, int , int Col)) { ElementPtr pElement; int J, Error, Col; /* Begin `spInitialize'. */ assert( IS_SPARSE( Matrix ) ); /* Clear imaginary part of matrix if matrix is real but was complex. */ if (Matrix->PreviousMatrixWasComplex && !Matrix->Complex) { for (J = Matrix->Size; J > 0; J--) { pElement = Matrix->FirstInCol[J]; while (pElement != NULL) { pElement->Imag = 0.0; pElement = pElement->NextInCol; } } } /* Initialize the matrix. */ for (J = Matrix->Size; J > 0; J--) { pElement = Matrix->FirstInCol[J]; Col = Matrix->IntToExtColMap[J]; while (pElement != NULL) { if (pElement->pInitInfo == NULL) { pElement->Real = 0.0; pElement->Imag = 0.0; } else { Error = pInit (& pElement->Real, pElement->pInitInfo, Matrix->IntToExtRowMap[pElement->Row], Col); if (Error) { Matrix->Error = spFATAL; return Error; } } pElement = pElement->NextInCol; } } /* Empty the trash. */ Matrix->TrashCan.Real = 0.0; Matrix->TrashCan.Imag = 0.0; Matrix->Error = spOKAY; Matrix->Factored = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->PreviousMatrixWasComplex = Matrix->Complex; return 0; } #endif /* INITIALIZE */ ngspice-26/src/maths/sparse/spconfig.h0000644000265600020320000004415012264261473017416 0ustar andreasadmin/* * CONFIGURATION MACRO DEFINITIONS for sparse matrix routines * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * U.C. Berkeley * * This file contains macros for the sparse matrix routines that are used * to define the personality of the routines. The user is expected to * modify this file to maximize the performance of the routines with * his/her matrices. * * Macros are distinguished by using solely capital letters in their * identifiers. This contrasts with C defined identifiers which are * strictly lower case, and program variable and procedure names which use * both upper and lower case. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef ngspice_SPCONFIG_H #define ngspice_SPCONFIG_H #ifdef spINSIDE_SPARSE /* * OPTIONS * * These are compiler options. Set each option to one to compile that * section of the code. If a feature is not desired, set the macro * to NO. Recommendations are given in brackets, [ignore them]. * * >>> Option descriptions: * Arithmetic Precision * The precision of the arithmetic used by Sparse can be set by * changing changing the spREAL macro. This macro is * contained in the file spMatrix.h. It is strongly suggested to * used double precision with circuit simulators. Note that * because C always performs arithmetic operations in double * precision, the only benefit to using single precision is that * less storage is required. There is often a noticeable speed * penalty when using single precision. Sparse internally refers * to a spREAL as a RealNumber. * EXPANDABLE * Setting this compiler flag true (1) makes the matrix * expandable before it has been factored. If the matrix is * expandable, then if an element is added that would be * considered out of bounds in the current matrix, the size of * the matrix is increased to hold that element. As a result, * the size of the matrix need not be known before the matrix is * built. The matrix can be allocated with size zero and * expanded. * TRANSLATE * This option allows the set of external row and column numbers * to be non-packed. In other words, the row and column numbers * do not have to be contiguous. The priced paid for this * flexibility is that when TRANSLATE is set true, the time * required to initially build the matrix will be greater because * the external row and column number must be translated into * internal equivalents. This translation brings about other * benefits though. First, the spGetElement() and * spGetAdmittance() routines may be used after the matrix has * been factored. Further, elements, and even rows and columns, * may be added to the matrix, and row and columns may be deleted * from the matrix, after it has been factored. Note that when * the set of row and column number is not a packed set, neither * are the RHS and Solution vectors. Thus the size of these * vectors must be at least as large as the external size, which * is the value of the largest given row or column numbers. * INITIALIZE * Causes the spInitialize(), spGetInitInfo(), and * spInstallInitInfo() routines to be compiled. These routines * allow the user to store and read one pointer in each nonzero * element in the matrix. spInitialize() then calls a user * specified function for each structural nonzero in the matrix, * and includes this pointer as well as the external row and * column numbers as arguments. This allows the user to write * custom matrix initialization routines. * DIAGONAL_PIVOTING * Many matrices, and in particular node- and modified-node * admittance matrices, tend to be nearly symmetric and nearly * diagonally dominant. For these matrices, it is a good idea to * select pivots from the diagonal. With this option enabled, * this is exactly what happens, though if no satisfactory pivot * can be found on the diagonal, an off-diagonal pivot will be * used. If this option is disabled, Sparse does not * preferentially search the diagonal. Because of this, Sparse * has a wider variety of pivot candidates available, and so * presumably fewer fill-ins will be created. However, the * initial pivot selection process will take considerably longer. * If working with node admittance matrices, or other matrices * with a strong diagonal, it is probably best to use * DIAGONAL_PIVOTING for two reasons. First, accuracy will be * better because pivots will be chosen from the large diagonal * elements, thus reducing the chance of growth. Second, a near * optimal ordering will be chosen quickly. If the class of * matrices you are working with does not have a strong diagonal, * do not use DIAGONAL_PIVOTING, but consider using a larger * threshold. When DIAGONAL_PIVOTING is turned off, the following * options and constants are not used: MODIFIED_MARKOWITZ, * MAX_MARKOWITZ_TIES, and TIES_MULTIPLIER. * MODIFIED_MARKOWITZ * This specifies that the modified Markowitz method of pivot * selection is to be used. The modified Markowitz method differs * from standard Markowitz in two ways. First, under modified * Markowitz, the search for a pivot can be terminated early if a * adequate (in terms of sparsity) pivot candidate is found. * Thus, when using modified Markowitz, the initial factorization * can be faster, but at the expense of a suboptimal pivoting * order that may slow subsequent factorizations. The second * difference is in the way modified Markowitz breaks Markowitz * ties. When two or more elements are pivot candidates and they * all have the same Markowitz product, then the tie is broken by * choosing the element that is best numerically. The numerically * best element is the one with the largest ratio of its magnitude * to the magnitude of the largest element in the same column, * excluding itself. The modified Markowitz method results in * marginally better accuracy. This option is most appropriate * for use when working with very large matrices where the initial * factor time represents an unacceptable burden. [NO] * DELETE * This specifies that the spDeleteRowAndCol() routine * should be compiled. Note that for this routine to be * compiled, both DELETE and TRANSLATE should be set true. * STRIP * This specifies that the spStripFills() routine should be compiled. * MODIFIED_NODAL * This specifies that the routine that preorders modified node * admittance matrices should be compiled. This routine results * in greater speed and accuracy if used with this type of * matrix. * QUAD_ELEMENT * This specifies that the routines that allow four related * elements to be entered into the matrix at once should be * compiled. These elements are usually related to an * admittance. The routines affected by QUAD_ELEMENT are the * spGetAdmittance, spGetQuad and spGetOnes routines. * TRANSPOSE * This specifies that the routines that solve the matrix as if * it was transposed should be compiled. These routines are * useful when performing sensitivity analysis using the adjoint * method. * SCALING * This specifies that the routine that performs scaling on the * matrix should be complied. Scaling is not strongly * supported. The routine to scale the matrix is provided, but * no routines are provided to scale and descale the RHS and * Solution vectors. It is suggested that if scaling is desired, * it only be preformed when the pivot order is being chosen [in * spOrderAndFactor()]. This is the only time scaling has * an effect. The scaling may then either be removed from the * solution by the user or the scaled factors may simply be * thrown away. [NO] * DOCUMENTATION * This specifies that routines that are used to document the * matrix, such as spPrint() and spFileMatrix(), should be * compiled. * DETERMINANT * This specifies that the routine spDeterminant() should be complied. * STABILITY * This specifies that spLargestElement() and spRoundoff() should * be compiled. These routines are used to check the stability (and * hence the quality of the pivoting) of the factorization by * computing a bound on the size of the element is the matrix E = * A - LU. If this bound is very high after applying * spOrderAndFactor(), then the pivot threshold should be raised. * If the bound increases greatly after using spFactor(), then the * matrix should probably be reordered. * CONDITION * This specifies that spCondition() and spNorm(), the code that * computes a good estimate of the condition number of the matrix, * should be compiled. * PSEUDOCONDITION * This specifies that spPseudoCondition(), the code that computes * a crude and easily fooled indicator of ill-conditioning in the * matrix, should be compiled. * MULTIPLICATION * This specifies that the routines to multiply the unfactored * matrix by a vector should be compiled. * DEBUG * This specifies that additional error checking will be compiled. * The type of error checked are those that are common when the * matrix routines are first integrated into a user's program. Once * the routines have been integrated in and are running smoothly, this * option should be turned off. */ /* Begin options. */ #define EXPANDABLE YES #define TRANSLATE YES #define INITIALIZE NO #define DIAGONAL_PIVOTING YES #define MODIFIED_MARKOWITZ NO #define DELETE NO #define STRIP NO #define MODIFIED_NODAL YES #define QUAD_ELEMENT NO #define TRANSPOSE YES #define SCALING NO #define DOCUMENTATION YES #define MULTIPLICATION YES #define DETERMINANT YES #define DETERMINANT2 YES #define STABILITY NO #define CONDITION NO #define PSEUDOCONDITION NO #ifdef HAS_MINDATA # define DEBUG NO #else # define DEBUG YES #endif /* * The following options affect Sparse exports and so are exported as a * side effect. For this reason they use the `sp' prefix. The boolean * constants YES an NO are not defined in spMatrix.h to avoid conflicts * with user code, so use 0 for NO and 1 for YES. */ /* * MATRIX CONSTANTS * * These constants are used throughout the sparse matrix routines. They * should be set to suit the type of matrix being solved. Recommendations * are given in brackets. * * Some terminology should be defined. The Markowitz row count is the number * of non-zero elements in a row excluding the one being considered as pivot. * There is one Markowitz row count for every row. The Markowitz column * is defined similarly for columns. The Markowitz product for an element * is the product of its row and column counts. It is a measure of how much * work would be required on the next step of the factorization if that * element were chosen to be pivot. A small Markowitz product is desirable. * * >>> Constants descriptions: * DEFAULT_THRESHOLD * The relative threshold used if the user enters an invalid * threshold. Also the threshold used by spFactor() when * calling spOrderAndFactor(). The default threshold should * not be less than or equal to zero nor larger than one. [0.001] * DIAG_PIVOTING_AS_DEFAULT * This indicates whether spOrderAndFactor() should use diagonal * pivoting as default. This issue only arises when * spOrderAndFactor() is called from spFactor(). * SPACE_FOR_ELEMENTS * This number multiplied by the size of the matrix equals the number * of elements for which memory is initially allocated in * spCreate(). [6] * SPACE_FOR_FILL_INS * This number multiplied by the size of the matrix equals the number * of elements for which memory is initially allocated and specifically * reserved for fill-ins in spCreate(). [4] * ELEMENTS_PER_ALLOCATION * The number of matrix elements requested from the tmalloc utility on * each call to it. Setting this value greater than 1 reduces the * amount of overhead spent in this system call. On a virtual memory * machine, its good to allocate slightly less than a page worth of * elements at a time (or some multiple thereof). * [For the VAX, for real only use 41, otherwise use 31] * MINIMUM_ALLOCATED_SIZE * The minimum allocated size of a matrix. Note that this does not * limit the minimum size of a matrix. This just prevents having to * resize a matrix many times if the matrix is expandable, large and * allocated with an estimated size of zero. This number should not * be less than one. * EXPANSION_FACTOR * The amount the allocated size of the matrix is increased when it * is expanded. * MAX_MARKOWITZ_TIES * This number is used for two slightly different things, both of which * relate to the search for the best pivot. First, it is the maximum * number of elements that are Markowitz tied that will be sifted * through when trying to find the one that is numerically the best. * Second, it creates an upper bound on how large a Markowitz product * can be before it eliminates the possibility of early termination * of the pivot search. In other words, if the product of the smallest * Markowitz product yet found and TIES_MULTIPLIER is greater than * MAX_MARKOWITZ_TIES, then no early termination takes place. * Set MAX_MARKOWITZ_TIES to some small value if no early termination of * the pivot search is desired. An array of RealNumbers is allocated * of size MAX_MARKOWITZ_TIES so it must be positive and shouldn't * be too large. Active when MODIFIED_MARKOWITZ is 1 (true). [100] * TIES_MULTIPLIER * Specifies the number of Markowitz ties that are allowed to occur * before the search for the pivot is terminated early. Set to some * large value if no early termination of the pivot search is desired. * This number is multiplied times the Markowitz product to determine * how many ties are required for early termination. This means that * more elements will be searched before early termination if a large * number of fill-ins could be created by accepting what is currently * considered the best choice for the pivot. Active when * MODIFIED_MARKOWITZ is 1 (true). Setting this number to zero * effectively eliminates all pivoting, which should be avoided. * This number must be positive. TIES_MULTIPLIER is also used when * diagonal pivoting breaks down. [5] * DEFAULT_PARTITION * Which partition mode is used by spPartition() as default. * Possibilities include * spDIRECT_PARTITION -- each row used direct addressing, best for * a few relatively dense matrices. * spINDIRECT_PARTITION -- each row used indirect addressing, best * for a few very sparse matrices. * spAUTO_PARTITION -- direct or indirect addressing is chosen on * a row-by-row basis, carries a large overhead, but speeds up * both dense and sparse matrices, best if there is a large * number of matrices that can use the same ordering. */ /* Begin constants. */ #define DEFAULT_THRESHOLD 1.0e-3 #define DIAG_PIVOTING_AS_DEFAULT YES #define SPACE_FOR_ELEMENTS 6 #define SPACE_FOR_FILL_INS 4 #define ELEMENTS_PER_ALLOCATION 31 #define MINIMUM_ALLOCATED_SIZE 6 #define EXPANSION_FACTOR 1.5 #define MAX_MARKOWITZ_TIES 100 #define TIES_MULTIPLIER 5 #define DEFAULT_PARTITION spAUTO_PARTITION /* * PRINTER WIDTH * * This macro characterize the printer for the spPrint() routine. * * >>> Macros: * PRINTER_WIDTH * The number of characters per page width. Set to 80 for terminal, * 132 for line printer. */ /* Begin printer constants. */ #define PRINTER_WIDTH 80 /* * MACHINE CONSTANTS * * These numbers must be updated when the program is ported to a new machine. */ /* Begin machine constants. */ /* * Grab from Spice include files */ #define MACHINE_RESOLUTION DBL_EPSILON #define LARGEST_REAL DBL_MAX #define SMALLEST_REAL DBL_MIN #define LARGEST_SHORT_INTEGER SHRT_MAX #define LARGEST_LONG_INTEGER LONG_MAX /* * ANNOTATION * * This macro changes the amount of annotation produced by the matrix * routines. The annotation is used as a debugging aid. Change the number * associated with ANNOTATE to change the amount of annotation produced by * the program. */ /* Begin annotation definitions. */ #define ANNOTATE NONE #define NONE 0 #define ON_STRANGE_BEHAVIOR 1 #define FULL 2 #endif /* spINSIDE_SPARSE */ #endif ngspice-26/src/maths/sparse/spalloc.c0000644000265600020320000005525212264261473017243 0ustar andreasadmin/* * MATRIX ALLOCATION MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the allocation and deallocation routines for the * sparse matrix routines. * * >>> User accessible functions contained in this file: * spCreate * spDestroy * spError * spWhereSingular * spGetSize * spSetReal * spSetComplex * spFillinCount * spElementCount * spOriginalCount * * >>> Other functions contained in this file: * spcGetElement * InitializeElementBlocks * spcGetFillin * RecordAllocation * AllocateBlockOfAllocationList * EnlargeMatrix * ExpandTranslationArrays */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" /* * Function declarations */ static void InitializeElementBlocks( MatrixPtr, int, int ); static void RecordAllocation( MatrixPtr, void *); static void AllocateBlockOfAllocationList( MatrixPtr ); /* * MATRIX ALLOCATION * * Allocates and initializes the data structures associated with a matrix. * * >>> Returned: * A pointer to the matrix is returned cast into the form of a pointer to * a character. This pointer is then passed and used by the other matrix * routines to refer to a particular matrix. If an error occurs, the NULL * pointer is returned. * * >>> Arguments: * Size (int) * Size of matrix or estimate of size of matrix if matrix is EXPANDABLE. * Complex (int) * Type of matrix. If Complex is 0 then the matrix is real, otherwise * the matrix will be complex. Note that if the routines are not set up * to handle the type of matrix requested, then a spPANIC error will occur. * Further note that if a matrix will be both real and complex, it must * be specified here as being complex. * pError (int *) * Returns error flag, needed because function spError() will not work * correctly if spCreate() returns NULL. * * >>> Local variables: * AllocatedSize (int) * The size of the matrix being allocated. * Matrix (MatrixPtr) * A pointer to the matrix frame being created. * * >>> Possible errors: * spNO_MEMORY * spPANIC * Error is cleared in this routine. */ MatrixPtr spCreate(int Size, int Complex, int *pError) { unsigned SizePlusOne; MatrixPtr Matrix; int I; int AllocatedSize; /* Begin `spCreate'. */ /* Clear error flag. */ *pError = spOKAY; /* Test for valid size. */ #if EXPANDABLE if (Size < 0) { *pError = spPANIC; return NULL; } #else if (Size <= 0) { *pError = spPANIC; return NULL; } #endif #if 0 /* pn: skipped for cider */ /* Test for valid type. */ if (!Complex) { *pError = spPANIC; return NULL; } #endif /* Create Matrix. */ AllocatedSize = MAX( Size, MINIMUM_ALLOCATED_SIZE ); SizePlusOne = (unsigned)(AllocatedSize + 1); if ((Matrix = SP_MALLOC(struct MatrixFrame, 1)) == NULL) { *pError = spNO_MEMORY; return NULL; } /* Initialize matrix */ Matrix->ID = SPARSE_ID; Matrix->Complex = Complex; Matrix->PreviousMatrixWasComplex = Complex; Matrix->Factored = NO; Matrix->Elements = 0; Matrix->Error = *pError; Matrix->Originals = 0; Matrix->Fillins = 0; Matrix->Reordered = NO; Matrix->NeedsOrdering = YES; Matrix->NumberOfInterchangesIsOdd = NO; Matrix->Partitioned = NO; Matrix->RowsLinked = NO; Matrix->InternalVectorsAllocated = NO; Matrix->SingularCol = 0; Matrix->SingularRow = 0; Matrix->Size = Size; Matrix->AllocatedSize = AllocatedSize; Matrix->ExtSize = Size; Matrix->AllocatedExtSize = AllocatedSize; Matrix->CurrentSize = 0; Matrix->ExtToIntColMap = NULL; Matrix->ExtToIntRowMap = NULL; Matrix->IntToExtColMap = NULL; Matrix->IntToExtRowMap = NULL; Matrix->MarkowitzRow = NULL; Matrix->MarkowitzCol = NULL; Matrix->MarkowitzProd = NULL; Matrix->DoCmplxDirect = NULL; Matrix->DoRealDirect = NULL; Matrix->Intermediate = NULL; Matrix->RelThreshold = DEFAULT_THRESHOLD; Matrix->AbsThreshold = 0.0; Matrix->TopOfAllocationList = NULL; Matrix->RecordsRemaining = 0; Matrix->ElementsRemaining = 0; Matrix->FillinsRemaining = 0; RecordAllocation( Matrix, Matrix ); if (Matrix->Error == spNO_MEMORY) goto MemoryError; /* Take out the trash. */ Matrix->TrashCan.Real = 0.0; Matrix->TrashCan.Imag = 0.0; Matrix->TrashCan.Row = 0; Matrix->TrashCan.Col = 0; Matrix->TrashCan.NextInRow = NULL; Matrix->TrashCan.NextInCol = NULL; #if INITIALIZE Matrix->TrashCan.pInitInfo = NULL; #endif /* Allocate space in memory for Diag pointer vector. */ SP_CALLOC( Matrix->Diag, ElementPtr, SizePlusOne); if (Matrix->Diag == NULL) goto MemoryError; /* Allocate space in memory for FirstInCol pointer vector. */ SP_CALLOC( Matrix->FirstInCol, ElementPtr, SizePlusOne); if (Matrix->FirstInCol == NULL) goto MemoryError; /* Allocate space in memory for FirstInRow pointer vector. */ SP_CALLOC( Matrix->FirstInRow, ElementPtr, SizePlusOne); if (Matrix->FirstInRow == NULL) goto MemoryError; /* Allocate space in memory for IntToExtColMap vector. */ if (( Matrix->IntToExtColMap = SP_MALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Allocate space in memory for IntToExtRowMap vector. */ if (( Matrix->IntToExtRowMap = SP_MALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Initialize MapIntToExt vectors. */ for (I = 1; I <= AllocatedSize; I++) { Matrix->IntToExtRowMap[I] = I; Matrix->IntToExtColMap[I] = I; } #if TRANSLATE /* Allocate space in memory for ExtToIntColMap vector. */ if (( Matrix->ExtToIntColMap = SP_MALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Allocate space in memory for ExtToIntRowMap vector. */ if (( Matrix->ExtToIntRowMap = SP_MALLOC(int, SizePlusOne)) == NULL) goto MemoryError; /* Initialize MapExtToInt vectors. */ for (I = 1; I <= AllocatedSize; I++) { Matrix->ExtToIntColMap[I] = -1; Matrix->ExtToIntRowMap[I] = -1; } Matrix->ExtToIntColMap[0] = 0; Matrix->ExtToIntRowMap[0] = 0; #endif /* Allocate space for fill-ins and initial set of elements. */ InitializeElementBlocks( Matrix, SPACE_FOR_ELEMENTS*AllocatedSize, SPACE_FOR_FILL_INS*AllocatedSize ); if (Matrix->Error == spNO_MEMORY) goto MemoryError; return Matrix; MemoryError: /* Deallocate matrix and return no pointer to matrix if there is not enough memory. */ *pError = spNO_MEMORY; spDestroy(Matrix); return NULL; } /* * ELEMENT ALLOCATION * * This routine allocates space for matrix elements. It requests large blocks * of storage from the system and doles out individual elements as required. * This technique, as opposed to allocating elements individually, tends to * speed the allocation process. * * >>> Returned: * A pointer to an element. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the first element in the group of elements being allocated. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcGetElement(MatrixPtr Matrix) { ElementPtr pElements; /* Begin `spcGetElement'. */ #if !COMBINE || STRIP || LINT /* Allocate block of MatrixElements if necessary. */ if (Matrix->ElementsRemaining == 0) { pElements = SP_MALLOC(struct MatrixElement, ELEMENTS_PER_ALLOCATION); RecordAllocation( Matrix, pElements ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->ElementsRemaining = ELEMENTS_PER_ALLOCATION; Matrix->NextAvailElement = pElements; } #endif #if COMBINE || STRIP || LINT if (Matrix->ElementsRemaining == 0) { pListNode = Matrix->LastElementListNode; /* First see if there are any stripped elements left. */ if (pListNode->Next != NULL) { Matrix->LastElementListNode = pListNode = pListNode->Next; Matrix->ElementsRemaining = pListNode->NumberOfElementsInList; Matrix->NextAvailElement = pListNode->pElementList; } else { /* Allocate block of elements. */ pElements = SP_MALLOC(struct MatrixElement, ELEMENTS_PER_ALLOCATION); RecordAllocation( Matrix, pElements ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->ElementsRemaining = ELEMENTS_PER_ALLOCATION; Matrix->NextAvailElement = pElements; /* Allocate an element list structure. */ pListNode->Next = SP_MALLOC(struct ElementListNodeStruct,1); RecordAllocation( Matrix, pListNode->Next ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->LastElementListNode = pListNode = pListNode->Next; pListNode->pElementList = pElements; pListNode->NumberOfElementsInList = ELEMENTS_PER_ALLOCATION; pListNode->Next = NULL; } } #endif /* Update Element counter and return pointer to Element. */ Matrix->ElementsRemaining--; return Matrix->NextAvailElement++; } /* * ELEMENT ALLOCATION INITIALIZATION * * This routine allocates space for matrix fill-ins and an initial * set of elements. Besides being faster than allocating space for * elements one at a time, it tends to keep the fill-ins physically * close to the other matrix elements in the computer memory. This * keeps virtual memory paging to a minimum. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * InitialNumberOfElements (int) * This number is used as the size of the block of memory, in * MatrixElements, reserved for elements. If more than this number of * elements are generated, then more space is allocated later. * NumberOfFillinsExpected (int) * This number is used as the size of the block of memory, in * MatrixElements, reserved for fill-ins. If more than this number of * fill-ins are generated, then more space is allocated, but they may * not be physically close in computer's memory. * * >>> Local variables: * pElement (ElementPtr) * A pointer to the first element in the group of elements being allocated. * * >>> Possible errors: * spNO_MEMORY */ static void InitializeElementBlocks(MatrixPtr Matrix, int InitialNumberOfElements, int NumberOfFillinsExpected) { ElementPtr pElement; /* Begin `InitializeElementBlocks'. */ /* Allocate block of MatrixElements for elements. */ pElement = SP_MALLOC(struct MatrixElement, InitialNumberOfElements); RecordAllocation( Matrix, pElement ); if (Matrix->Error == spNO_MEMORY) return; Matrix->ElementsRemaining = InitialNumberOfElements; Matrix->NextAvailElement = pElement; /* Allocate an element list structure. */ Matrix->FirstElementListNode = SP_MALLOC(struct ElementListNodeStruct,1); RecordAllocation( Matrix, Matrix->FirstElementListNode ); if (Matrix->Error == spNO_MEMORY) return; Matrix->LastElementListNode = Matrix->FirstElementListNode; Matrix->FirstElementListNode->pElementList = pElement; Matrix->FirstElementListNode->NumberOfElementsInList = InitialNumberOfElements; Matrix->FirstElementListNode->Next = NULL; /* Allocate block of MatrixElements for fill-ins. */ pElement = SP_MALLOC(struct MatrixElement, NumberOfFillinsExpected); RecordAllocation( Matrix, pElement ); if (Matrix->Error == spNO_MEMORY) return; Matrix->FillinsRemaining = NumberOfFillinsExpected; Matrix->NextAvailFillin = pElement; /* Allocate a fill-in list structure. */ Matrix->FirstFillinListNode = SP_MALLOC(struct FillinListNodeStruct,1); RecordAllocation( Matrix, Matrix->FirstFillinListNode ); if (Matrix->Error == spNO_MEMORY) return; Matrix->LastFillinListNode = Matrix->FirstFillinListNode; Matrix->FirstFillinListNode->pFillinList = pElement; Matrix->FirstFillinListNode->NumberOfFillinsInList =NumberOfFillinsExpected; Matrix->FirstFillinListNode->Next = NULL; return; } /* * FILL-IN ALLOCATION * * This routine allocates space for matrix fill-ins. It requests * large blocks of storage from the system and doles out individual * elements as required. This technique, as opposed to allocating * elements individually, tends to speed the allocation process. * * >>> Returned: * A pointer to the fill-in. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Possible errors: * spNO_MEMORY */ ElementPtr spcGetFillin(MatrixPtr Matrix) { /* Begin `spcGetFillin'. */ #if !STRIP || LINT if (Matrix->FillinsRemaining == 0) return spcGetElement( Matrix ); #endif #if STRIP || LINT if (Matrix->FillinsRemaining == 0) { pListNode = Matrix->LastFillinListNode; /* First see if there are any stripped fill-ins left. */ if (pListNode->Next != NULL) { Matrix->LastFillinListNode = pListNode = pListNode->Next; Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList; Matrix->NextAvailFillin = pListNode->pFillinList; } else { /* Allocate block of fill-ins. */ pFillins = SP_MALLOC(struct MatrixElement, ELEMENTS_PER_ALLOCATION); RecordAllocation( Matrix, pFillins ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->FillinsRemaining = ELEMENTS_PER_ALLOCATION; Matrix->NextAvailFillin = pFillins; /* Allocate a fill-in list structure. */ pListNode->Next = SP_MALLOC(struct FillinListNodeStruct,1); RecordAllocation( Matrix, pListNode->Next ); if (Matrix->Error == spNO_MEMORY) return NULL; Matrix->LastFillinListNode = pListNode = pListNode->Next; pListNode->pFillinList = pFillins; pListNode->NumberOfFillinsInList = ELEMENTS_PER_ALLOCATION; pListNode->Next = NULL; } } #endif /* Update Fill-in counter and return pointer to Fill-in. */ Matrix->FillinsRemaining--; return Matrix->NextAvailFillin++; } /* * RECORD A MEMORY ALLOCATION * * This routine is used to record all memory allocations so that the * memory can be freed later. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * AllocatedPtr (void *) * The pointer returned by tmalloc or calloc. These pointers are * saved in a list so that they can be easily freed. * * >>> Possible errors: * spNO_MEMORY */ static void RecordAllocation(MatrixPtr Matrix, void *AllocatedPtr ) { /* Begin `RecordAllocation'. */ /* If Allocated pointer is NULL, assume that tmalloc returned a * NULL pointer, which indicates a spNO_MEMORY error. */ if (AllocatedPtr == NULL) { Matrix->Error = spNO_MEMORY; return; } /* Allocate block of MatrixElements if necessary. */ if (Matrix->RecordsRemaining == 0) { AllocateBlockOfAllocationList( Matrix ); if (Matrix->Error == spNO_MEMORY) { SP_FREE(AllocatedPtr); return; } } /* Add Allocated pointer to Allocation List. */ (++Matrix->TopOfAllocationList)->AllocatedPtr = AllocatedPtr; Matrix->RecordsRemaining--; return; } /* * ADD A BLOCK OF SLOTS TO ALLOCATION LIST * * This routine increases the size of the allocation list. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * * >>> Local variables: * ListPtr (AllocationListPtr) * Pointer to the list that contains the pointers to segments of * memory that were allocated by the operating system for the * current matrix. * * >>> Possible errors: * spNO_MEMORY */ static void AllocateBlockOfAllocationList(MatrixPtr Matrix) { int I; AllocationListPtr ListPtr; /* Begin `AllocateBlockOfAllocationList'. */ /* Allocate block of records for allocation list. */ ListPtr = SP_MALLOC(struct AllocationRecord, (ELEMENTS_PER_ALLOCATION+1)); if (ListPtr == NULL) { Matrix->Error = spNO_MEMORY; return; } /* String entries of allocation list into singly linked list. List is linked such that any record points to the one before it. */ ListPtr->NextRecord = Matrix->TopOfAllocationList; Matrix->TopOfAllocationList = ListPtr; ListPtr += ELEMENTS_PER_ALLOCATION; for (I = ELEMENTS_PER_ALLOCATION; I > 0; I--) { ListPtr->NextRecord = ListPtr - 1; ListPtr--; } /* Record allocation of space for allocation list on allocation list. */ Matrix->TopOfAllocationList->AllocatedPtr = (void *)ListPtr; Matrix->RecordsRemaining = ELEMENTS_PER_ALLOCATION; return; } /* * MATRIX DEALLOCATION * * Deallocates pointers and elements of Matrix. * * >>> Arguments: * Matrix (void *) * Pointer to the matrix frame which is to be removed from memory. * * >>> Local variables: * ListPtr (AllocationListPtr) * Pointer into the linked list of pointers to allocated data structures. * Points to pointer to structure to be freed. * NextListPtr (AllocationListPtr) * Pointer into the linked list of pointers to allocated data structures. * Points to the next pointer to structure to be freed. This is needed * because the data structure to be freed could include the current node * in the allocation list. */ void spDestroy(MatrixPtr Matrix) { AllocationListPtr ListPtr, NextListPtr; /* Begin `spDestroy'. */ assert( IS_SPARSE( Matrix ) ); /* Deallocate the vectors that are located in the matrix frame. */ SP_FREE( Matrix->IntToExtColMap ); SP_FREE( Matrix->IntToExtRowMap ); SP_FREE( Matrix->ExtToIntColMap ); SP_FREE( Matrix->ExtToIntRowMap ); SP_FREE( Matrix->Diag ); SP_FREE( Matrix->FirstInRow ); SP_FREE( Matrix->FirstInCol ); SP_FREE( Matrix->MarkowitzRow ); SP_FREE( Matrix->MarkowitzCol ); SP_FREE( Matrix->MarkowitzProd ); SP_FREE( Matrix->DoCmplxDirect ); SP_FREE( Matrix->DoRealDirect ); SP_FREE( Matrix->Intermediate ); /* Sequentially step through the list of allocated pointers * freeing pointers along the way. */ ListPtr = Matrix->TopOfAllocationList; while (ListPtr != NULL) { NextListPtr = ListPtr->NextRecord; if ((void *) ListPtr == ListPtr->AllocatedPtr) { SP_FREE( ListPtr ); } else { SP_FREE( ListPtr->AllocatedPtr ); } ListPtr = NextListPtr; } return; } /* * RETURN MATRIX ERROR STATUS * * This function is used to determine the error status of the given * matrix. * * >>> Returned: * The error status of the given matrix. * * >>> Arguments: * Matrix (void *) * The matrix for which the error status is desired. */ int spError(MatrixPtr Matrix ) { /* Begin `spError'. */ if (Matrix != NULL) { assert(Matrix->ID == SPARSE_ID); return Matrix->Error; } else { /* This error may actually be spPANIC, no way to tell. */ return spNO_MEMORY; } } /* * WHERE IS MATRIX SINGULAR * * This function returns the row and column number where the matrix was * detected as singular or where a zero was detected on the diagonal. * * >>> Arguments: * Matrix (void *) * The matrix for which the error status is desired. * pRow (int *) * The row number. * pCol (int *) * The column number. */ void spWhereSingular(MatrixPtr Matrix, int *pRow, int *pCol) { /* Begin `spWhereSingular'. */ assert( IS_SPARSE( Matrix ) ); if (Matrix->Error == spSINGULAR || Matrix->Error == spZERO_DIAG) { *pRow = Matrix->SingularRow; *pCol = Matrix->SingularCol; } else *pRow = *pCol = 0; return; } /* * MATRIX SIZE * * Returns the size of the matrix. Either the internal or external size of * the matrix is returned. * * >>> Arguments: * Matrix (void *) * Pointer to matrix. * External (int) * If External is set TRUE, the external size , i.e., the value of the * largest external row or column number encountered is returned. * Otherwise the TRUE size of the matrix is returned. These two sizes * may differ if the TRANSLATE option is set TRUE. */ int spGetSize(MatrixPtr Matrix, int External) { /* Begin `spGetSize'. */ assert( IS_SPARSE( Matrix ) ); #if TRANSLATE if (External) return Matrix->ExtSize; else return Matrix->Size; #else return Matrix->Size; #endif } /* * SET MATRIX COMPLEX OR REAL * * Forces matrix to be either real or complex. * * >>> Arguments: * Matrix (void *) * Pointer to matrix. */ void spSetReal(MatrixPtr Matrix) { /* Begin `spSetReal'. */ assert( IS_SPARSE( Matrix )); Matrix->Complex = NO; return; } void spSetComplex(MatrixPtr Matrix) { /* Begin `spSetComplex'. */ assert( IS_SPARSE( Matrix )); Matrix->Complex = YES; return; } /* * ELEMENT, FILL-IN OR ORIGINAL COUNT * * Two functions used to return simple statistics. Either the number * of total elements, or the number of fill-ins, or the number * of original elements can be returned. * * >>> Arguments: * Matrix (void *) * Pointer to matrix. */ int spFillinCount(MatrixPtr Matrix) { /* Begin `spFillinCount'. */ assert( IS_SPARSE( Matrix ) ); return Matrix->Fillins; } int spElementCount(MatrixPtr Matrix) { /* Begin `spElementCount'. */ assert( IS_SPARSE( Matrix ) ); return Matrix->Elements; } int spOriginalCount(MatrixPtr Matrix) { /* Begin `spOriginalCount'. */ assert( IS_SPARSE( Matrix ) ); return Matrix->Originals; } ngspice-26/src/maths/sparse/ChangeLog0000644000265600020320000000023112264261473017177 0ustar andreasadmin1999-08-28 Emmanuel Rouat * spdefs.h: #includes spice.h instead of misc.h added a few #undefs to avoid redaclarations ngspice-26/src/maths/sparse/spfactor.c0000644000265600020320000030510712264261473017424 0ustar andreasadmin/* * MATRIX FACTORIZATION MODULE * * Author: Advising Professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the routines to factor the matrix into LU form. * * >>> User accessible functions contained in this file: * spOrderAndFactor * spFactor * spPartition * * >>> Other functions contained in this file: * FactorComplexMatrix spcCreateInternalVectors * CountMarkowitz MarkowitzProducts * SearchForPivot SearchForSingleton * QuicklySearchDiagonal SearchDiagonal * SearchEntireMatrix FindLargestInCol * FindBiggestInColExclude ExchangeRowsAndCols * spcRowExchange spcColExchange * ExchangeColElements ExchangeRowElements * RealRowColElimination ComplexRowColElimination * UpdateMarkowitzNumbers CreateFillin * MatrixIsSingular ZeroPivot * WriteStatus */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" /* * Function declarations */ static int FactorComplexMatrix( MatrixPtr ); static void CountMarkowitz( MatrixPtr, RealVector, int ); static void MarkowitzProducts( MatrixPtr, int ); static ElementPtr SearchForPivot( MatrixPtr, int, int ); static ElementPtr SearchForSingleton( MatrixPtr, int ); static ElementPtr QuicklySearchDiagonal( MatrixPtr, int ); static ElementPtr SearchDiagonal( MatrixPtr, int ); static ElementPtr SearchEntireMatrix( MatrixPtr, int ); static RealNumber FindLargestInCol( ElementPtr ); static RealNumber FindBiggestInColExclude( MatrixPtr, ElementPtr, int ); static void ExchangeRowsAndCols( MatrixPtr, ElementPtr, int ); static void ExchangeColElements( MatrixPtr, int, ElementPtr, int, ElementPtr, int ); static void ExchangeRowElements( MatrixPtr, int, ElementPtr, int, ElementPtr, int ); static void RealRowColElimination( MatrixPtr, ElementPtr ); static void ComplexRowColElimination( MatrixPtr, ElementPtr ); static void UpdateMarkowitzNumbers( MatrixPtr, ElementPtr ); static ElementPtr CreateFillin( MatrixPtr, int, int ); static int MatrixIsSingular( MatrixPtr, int ); static int ZeroPivot( MatrixPtr, int ); /* * ORDER AND FACTOR MATRIX * * This routine chooses a pivot order for the matrix and factors it * into LU form. It handles both the initial factorization and subsequent * factorizations when a reordering is desired. This is handled in a manner * that is transparent to the user. The routine uses a variation of * Gauss's method where the pivots are associated with L and the * diagonal terms of U are one. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * Representative right-hand side vector that is used to determine * pivoting order when the right hand side vector is sparse. If * RHS is a NULL pointer then the RHS vector is assumed to * be full and it is not used when determining the pivoting * order. * RelThreshold (RealNumber) * This number determines what the pivot relative threshold will * be. It should be between zero and one. If it is one then the * pivoting method becomes complete pivoting, which is very slow * and tends to fill up the matrix. If it is set close to zero * the pivoting method becomes strict Markowitz with no * threshold. The pivot threshold is used to eliminate pivot * candidates that would cause excessive element growth if they * were used. Element growth is the cause of roundoff error. * Element growth occurs even in well-conditioned matrices. * Setting the RelThreshold large will reduce element growth and * roundoff error, but setting it too large will cause execution * time to be excessive and will result in a large number of * fill-ins. If this occurs, accuracy can actually be degraded * because of the large number of operations required on the * matrix due to the large number of fill-ins. A good value seems * to be 0.001. The default is chosen by giving a value larger * than one or less than or equal to zero. This value should be * increased and the matrix resolved if growth is found to be * excessive. Changing the pivot threshold does not improve * performance on matrices where growth is low, as is often the * case with ill-conditioned matrices. Once a valid threshold is * given, it becomes the new default. The default value of * RelThreshold was choosen for use with nearly diagonally * dominant matrices such as node- and modified-node admittance * matrices. For these matrices it is usually best to use * diagonal pivoting. For matrices without a strong diagonal, it * is usually best to use a larger threshold, such as 0.01 or * 0.1. * AbsThreshold (RealNumber) * The absolute magnitude an element must have to be considered * as a pivot candidate, except as a last resort. This number * should be set significantly smaller than the smallest diagonal * element that is is expected to be placed in the matrix. If * there is no reasonable prediction for the lower bound on these * elements, then AbsThreshold should be set to zero. * AbsThreshold is used to reduce the possibility of choosing as a * pivot an element that has suffered heavy cancellation and as a * result mainly consists of roundoff error. Once a valid * threshold is given, it becomes the new default. * DiagPivoting (int) * A flag indicating that pivot selection should be confined to the * diagonal if possible. If DiagPivoting is nonzero and if * DIAGONAL_PIVOTING is enabled pivots will be chosen only from * the diagonal unless there are no diagonal elements that satisfy * the threshold criteria. Otherwise, the entire reduced * submatrix is searched when looking for a pivot. The diagonal * pivoting in Sparse is efficient and well refined, while the * off-diagonal pivoting is not. For symmetric and near symmetric * matrices, it is best to use diagonal pivoting because it * results in the best performance when reordering the matrix and * when factoring the matrix without ordering. If there is a * considerable amount of nonsymmetry in the matrix, then * off-diagonal pivoting may result in a better equation ordering * simply because there are more pivot candidates to choose from. * A better ordering results in faster subsequent factorizations. * However, the initial pivot selection process takes considerably * longer for off-diagonal pivoting. * * >>> Local variables: * pPivot (ElementPtr) * Pointer to the element being used as a pivot. * ReorderingRequired (int) * Flag that indicates whether reordering is required. * * >>> Possible errors: * spNO_MEMORY * spSINGULAR * spSMALL_PIVOT * Error is cleared in this function. */ int spOrderAndFactor(MatrixPtr Matrix, RealNumber RHS[], RealNumber RelThreshold, RealNumber AbsThreshold, int DiagPivoting) { ElementPtr pPivot; int Step, Size, ReorderingRequired; RealNumber LargestInCol; /* Begin `spOrderAndFactor'. */ assert( IS_VALID(Matrix) && !Matrix->Factored); Matrix->Error = spOKAY; Size = Matrix->Size; if (RelThreshold <= 0.0) RelThreshold = Matrix->RelThreshold; if (RelThreshold > 1.0) RelThreshold = Matrix->RelThreshold; Matrix->RelThreshold = RelThreshold; if (AbsThreshold < 0.0) AbsThreshold = Matrix->AbsThreshold; Matrix->AbsThreshold = AbsThreshold; ReorderingRequired = NO; if (!Matrix->NeedsOrdering) { /* Matrix has been factored before and reordering is not required. */ for (Step = 1; Step <= Size; Step++) { pPivot = Matrix->Diag[Step]; LargestInCol = FindLargestInCol(pPivot->NextInCol); if ((LargestInCol * RelThreshold < ELEMENT_MAG(pPivot))) { if (Matrix->Complex) ComplexRowColElimination( Matrix, pPivot ); else RealRowColElimination( Matrix, pPivot ); } else { ReorderingRequired = YES; break; /* for loop */ } } if (!ReorderingRequired) goto Done; else { /* A pivot was not large enough to maintain accuracy, so a * partial reordering is required. */ #if (ANNOTATE >= ON_STRANGE_BEHAVIOR) printf("Reordering, Step = %1d\n", Step); #endif } } /* End of if(!Matrix->NeedsOrdering) */ else { /* This is the first time the matrix has been factored. These * few statements indicate to the rest of the code that a full * reodering is required rather than a partial reordering, * which occurs during a failure of a fast factorization. */ Step = 1; if (!Matrix->RowsLinked) spcLinkRows( Matrix ); if (!Matrix->InternalVectorsAllocated) spcCreateInternalVectors( Matrix ); if (Matrix->Error >= spFATAL) return Matrix->Error; } /* Form initial Markowitz products. */ CountMarkowitz( Matrix, RHS, Step ); MarkowitzProducts( Matrix, Step ); Matrix->MaxRowCountInLowerTri = -1; /* Perform reordering and factorization. */ for (; Step <= Size; Step++) { pPivot = SearchForPivot( Matrix, Step, DiagPivoting ); if (pPivot == NULL) return MatrixIsSingular( Matrix, Step ); ExchangeRowsAndCols( Matrix, pPivot, Step ); if (Matrix->Complex) ComplexRowColElimination( Matrix, pPivot ); else RealRowColElimination( Matrix, pPivot ); if (Matrix->Error >= spFATAL) return Matrix->Error; UpdateMarkowitzNumbers( Matrix, pPivot ); #if (ANNOTATE == FULL) WriteStatus( Matrix, Step ); #endif } Done: Matrix->NeedsOrdering = NO; Matrix->Reordered = YES; Matrix->Factored = YES; return Matrix->Error; } /* * FACTOR MATRIX * * This routine is the companion routine to spOrderAndFactor(). * Unlike spOrderAndFactor(), spFactor() cannot change the ordering. * It is also faster than spOrderAndFactor(). The standard way of * using these two routines is to first use spOrderAndFactor() for * the initial factorization. For subsequent factorizations, * spFactor() is used if there is some assurance that little growth * will occur (say for example, that the matrix is diagonally * dominant). If spFactor() is called for the initial factorization * of the matrix, then spOrderAndFactor() is automatically called * with the default threshold. This routine uses "row at a time" LU * factorization. Pivots are associated with the lower triangular * matrix and the diagonals of the upper triangular matrix are ones. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible errors: * spNO_MEMORY * spSINGULAR * spZERO_DIAG * spSMALL_PIVOT * Error is cleared in this function. */ int spFactor(MatrixPtr Matrix) { ElementPtr pElement; ElementPtr pColumn; int Step, Size; RealNumber Mult; /* Begin `spFactor'. */ assert( IS_VALID(Matrix) && !Matrix->Factored); if (Matrix->NeedsOrdering) { return spOrderAndFactor( Matrix, NULL, 0.0, 0.0, DIAG_PIVOTING_AS_DEFAULT ); } if (!Matrix->Partitioned) spPartition( Matrix, spDEFAULT_PARTITION ); if (Matrix->Complex) return FactorComplexMatrix( Matrix ); Size = Matrix->Size; if (Matrix->Diag[1]->Real == 0.0) return ZeroPivot( Matrix, 1 ); Matrix->Diag[1]->Real = 1.0 / Matrix->Diag[1]->Real; /* Start factorization. */ for (Step = 2; Step <= Size; Step++) { if (Matrix->DoRealDirect[Step]) { /* Update column using direct addressing scatter-gather. */ RealNumber *Dest = (RealNumber *)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Dest[pElement->Row] = pElement->Real; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; pColumn->Real = Dest[pColumn->Row] * pElement->Real; while ((pElement = pElement->NextInCol) != NULL) Dest[pElement->Row] -= pColumn->Real * pElement->Real; pColumn = pColumn->NextInCol; } /* Gather. */ pElement = Matrix->Diag[Step]->NextInCol; while (pElement != NULL) { pElement->Real = Dest[pElement->Row]; pElement = pElement->NextInCol; } /* Check for singular matrix. */ if (Dest[Step] == 0.0) return ZeroPivot( Matrix, Step ); Matrix->Diag[Step]->Real = 1.0 / Dest[Step]; } else { /* Update column using indirect addressing scatter-gather. */ RealNumber **pDest = (RealNumber **)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { pDest[pElement->Row] = &pElement->Real; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; Mult = (*pDest[pColumn->Row] *= pElement->Real); while ((pElement = pElement->NextInCol) != NULL) *pDest[pElement->Row] -= Mult * pElement->Real; pColumn = pColumn->NextInCol; } /* Check for singular matrix. */ if (Matrix->Diag[Step]->Real == 0.0) return ZeroPivot( Matrix, Step ); Matrix->Diag[Step]->Real = 1.0 / Matrix->Diag[Step]->Real; } } Matrix->Factored = YES; return (Matrix->Error = spOKAY); } /* * FACTOR COMPLEX MATRIX * * This routine is the companion routine to spFactor(), it * handles complex matrices. It is otherwise identical. * * >>> Returned: * The error code is returned. Possible errors are listed below. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * * >>> Possible errors: * spSINGULAR * Error is cleared in this function. */ static int FactorComplexMatrix( MatrixPtr Matrix ) { ElementPtr pElement; ElementPtr pColumn; int Step, Size; ComplexNumber Mult, Pivot; /* Begin `FactorComplexMatrix'. */ assert(Matrix->Complex); Size = Matrix->Size; pElement = Matrix->Diag[1]; if (ELEMENT_MAG(pElement) == 0.0) return ZeroPivot( Matrix, 1 ); /* Cmplx expr: *pPivot = 1.0 / *pPivot. */ CMPLX_RECIPROCAL( *pElement, *pElement ); /* Start factorization. */ for (Step = 2; Step <= Size; Step++) { if (Matrix->DoCmplxDirect[Step]) { /* Update column using direct addressing scatter-gather. */ ComplexNumber *Dest; Dest = (ComplexNumber *)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Dest[pElement->Row] = *(ComplexNumber *)pElement; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; /* Cmplx expr: Mult = Dest[pColumn->Row] * (1.0 / *pPivot). */ CMPLX_MULT(Mult, Dest[pColumn->Row], *pElement); CMPLX_ASSIGN(*pColumn, Mult); while ((pElement = pElement->NextInCol) != NULL) { /* Cmplx expr: Dest[pElement->Row] -= Mult * pElement */ CMPLX_MULT_SUBT_ASSIGN(Dest[pElement->Row],Mult,*pElement); } pColumn = pColumn->NextInCol; } /* Gather. */ pElement = Matrix->Diag[Step]->NextInCol; while (pElement != NULL) { *(ComplexNumber *)pElement = Dest[pElement->Row]; pElement = pElement->NextInCol; } /* Check for singular matrix. */ Pivot = Dest[Step]; if (CMPLX_1_NORM(Pivot) == 0.0) return ZeroPivot( Matrix, Step ); CMPLX_RECIPROCAL( *Matrix->Diag[Step], Pivot ); } else { /* Update column using direct addressing scatter-gather. */ ComplexNumber **pDest; pDest = (ComplexNumber **)Matrix->Intermediate; /* Scatter. */ pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { pDest[pElement->Row] = (ComplexNumber *)pElement; pElement = pElement->NextInCol; } /* Update column. */ pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; /* Cmplx expr: Mult = *pDest[pColumn->Row] * (1.0 / *pPivot). */ CMPLX_MULT(Mult, *pDest[pColumn->Row], *pElement); CMPLX_ASSIGN(*pDest[pColumn->Row], Mult); while ((pElement = pElement->NextInCol) != NULL) { /* Cmplx expr: *pDest[pElement->Row] -= Mult * pElement */ CMPLX_MULT_SUBT_ASSIGN(*pDest[pElement->Row],Mult,*pElement); } pColumn = pColumn->NextInCol; } /* Check for singular matrix. */ pElement = Matrix->Diag[Step]; if (ELEMENT_MAG(pElement) == 0.0) return ZeroPivot( Matrix, Step ); CMPLX_RECIPROCAL( *pElement, *pElement ); } } Matrix->Factored = YES; return (Matrix->Error = spOKAY); } /* * PARTITION MATRIX * * This routine determines the cost to factor each row using both * direct and indirect addressing and decides, on a row-by-row basis, * which addressing mode is fastest. This information is used in * spFactor() to speed the factorization. * * When factoring a previously ordered matrix using spFactor(), * Sparse operates on a row-at-a-time basis. For speed, on each * step, the row being updated is copied into a full vector and the * operations are performed on that vector. This can be done one of * two ways, either using direct addressing or indirect addressing. * Direct addressing is fastest when the matrix is relatively dense * and indirect addressing is best when the matrix is quite sparse. * The user selects the type of partition used with Mode. If Mode is * set to spDIRECT_PARTITION, then the all rows are placed in the * direct addressing partition. Similarly, if Mode is set to * spINDIRECT_PARTITION, then the all rows are placed in the indirect * addressing partition. By setting Mode to spAUTO_PARTITION, the * user allows Sparse to select the partition for each row * individually. spFactor() generally runs faster if Sparse is * allowed to choose its own partitioning, however choosing a * partition is expensive. The time required to choose a partition * is of the same order of the cost to factor the matrix. If you * plan to factor a large number of matrices with the same structure, * it is best to let Sparse choose the partition. Otherwise, you * should choose the partition based on the predicted density of the * matrix. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * Mode (int) * Mode must be one of three special codes: spDIRECT_PARTITION, * spINDIRECT_PARTITION, or spAUTO_PARTITION. */ void spPartition(MatrixPtr Matrix, int Mode) { ElementPtr pElement, pColumn; int Step, Size; int *Nc, *No, *Nm; int *DoRealDirect, *DoCmplxDirect; /* Begin `spPartition'. */ assert( IS_SPARSE( Matrix ) ); if (Matrix->Partitioned) return; Size = Matrix->Size; DoRealDirect = Matrix->DoRealDirect; DoCmplxDirect = Matrix->DoCmplxDirect; Matrix->Partitioned = YES; /* If partition is specified by the user, this is easy. */ if (Mode == spDEFAULT_PARTITION) Mode = DEFAULT_PARTITION; if (Mode == spDIRECT_PARTITION) { for (Step = 1; Step <= Size; Step++) { DoRealDirect[Step] = YES; DoCmplxDirect[Step] = YES; } return; } else if (Mode == spINDIRECT_PARTITION) { for (Step = 1; Step <= Size; Step++) { DoRealDirect[Step] = NO; DoCmplxDirect[Step] = NO; } return; } else assert( Mode == spAUTO_PARTITION ); /* Otherwise, count all operations needed in when factoring matrix. */ Nc = Matrix->MarkowitzRow; No = Matrix->MarkowitzCol; Nm = (int *)Matrix->MarkowitzProd; /* Start mock-factorization. */ for (Step = 1; Step <= Size; Step++) { Nc[Step] = No[Step] = Nm[Step] = 0; pElement = Matrix->FirstInCol[Step]; while (pElement != NULL) { Nc[Step]++; pElement = pElement->NextInCol; } pColumn = Matrix->FirstInCol[Step]; while (pColumn->Row < Step) { pElement = Matrix->Diag[pColumn->Row]; Nm[Step]++; while ((pElement = pElement->NextInCol) != NULL) No[Step]++; pColumn = pColumn->NextInCol; } } for (Step = 1; Step <= Size; Step++) { /* The following are just estimates based on a count on the * number of machine instructions used on each machine to * perform the various tasks. It was assumed that each * machine instruction required the same amount of time (I * don't believe this is TRUE for the VAX, and have no idea if * this is TRUE for the 68000 family). For optimum * performance, these numbers should be tuned to the machine. * * Nc is the number of nonzero elements in the column. * Nm is the number of multipliers in the column. * No is the number of operations in the inner loop. */ #define generic #ifdef hp9000s300 DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); /* On the hp350, it is never profitable to use direct for complex. */ DoCmplxDirect[Step] = NO; #undef generic #endif #ifdef vax DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); DoCmplxDirect[Step] = (Nm[Step] + No[Step] > 7*Nc[Step] - 4*Nm[Step]); #undef generic #endif #ifdef generic DoRealDirect[Step] = (Nm[Step] + No[Step] > 3*Nc[Step] - 2*Nm[Step]); DoCmplxDirect[Step] = (Nm[Step] + No[Step] > 7*Nc[Step] - 4*Nm[Step]); #undef generic #endif } #if (ANNOTATE == FULL) { int Ops = 0; for (Step = 1; Step <= Size; Step++) Ops += No[Step]; printf("Operation count for inner loop of factorization = %d.\n", Ops); } #endif return; } /* * CREATE INTERNAL VECTORS * * Creates the Markowitz and Intermediate vectors. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * * >>> Local variables: * SizePlusOne (unsigned) * Size of the arrays to be allocated. * * >>> Possible errors: * spNO_MEMORY */ void spcCreateInternalVectors( MatrixPtr Matrix ) { int Size; /* Begin `spcCreateInternalVectors'. */ /* Create Markowitz arrays. */ Size= Matrix->Size; if (Matrix->MarkowitzRow == NULL) { if (( Matrix->MarkowitzRow = SP_MALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->MarkowitzCol == NULL) { if (( Matrix->MarkowitzCol = SP_MALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->MarkowitzProd == NULL) { if (( Matrix->MarkowitzProd = SP_MALLOC(long, Size+2)) == NULL) Matrix->Error = spNO_MEMORY; } /* Create DoDirect vectors for use in spFactor(). */ if (Matrix->DoRealDirect == NULL) { if (( Matrix->DoRealDirect = SP_MALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->DoCmplxDirect == NULL) { if (( Matrix->DoCmplxDirect = SP_MALLOC(int, Size+1)) == NULL) Matrix->Error = spNO_MEMORY; } /* Create Intermediate vectors for use in MatrixSolve. */ if (Matrix->Intermediate == NULL) { if ((Matrix->Intermediate = SP_MALLOC(RealNumber,2*(Size+1))) == NULL) Matrix->Error = spNO_MEMORY; } if (Matrix->Error != spNO_MEMORY) Matrix->InternalVectorsAllocated = YES; return; } /* * COUNT MARKOWITZ * * Scans Matrix to determine the Markowitz counts for each row and column. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * RHS (RealVector) * Representative right-hand side vector that is used to determine * pivoting order when the right hand side vector is sparse. If * RHS is a NULL pointer then the RHS vector is assumed to be full * and it is not used when determining the pivoting order. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * Count (int) * Temporary counting variable. * ExtRow (int) * The external row number that corresponds to I. * pElement (ElementPtr) * Pointer to matrix elements. * Size (int) * The size of the matrix. */ static void CountMarkowitz(MatrixPtr Matrix, RealVector RHS, int Step) { int Count, I, Size = Matrix->Size; ElementPtr pElement; int ExtRow; /* Begin `CountMarkowitz'. */ /* Generate MarkowitzRow Count for each row. */ for (I = Step; I <= Size; I++) { /* Set Count to -1 initially to remove count due to pivot element. */ Count = -1; pElement = Matrix->FirstInRow[I]; while (pElement != NULL && pElement->Col < Step) pElement = pElement->NextInRow; while (pElement != NULL) { Count++; pElement = pElement->NextInRow; } /* Include nonzero elements in the RHS vector. */ ExtRow = Matrix->IntToExtRowMap[I]; if (RHS != NULL) if (RHS[ExtRow] != 0.0) Count++; Matrix->MarkowitzRow[I] = Count; } /* Generate the MarkowitzCol count for each column. */ for (I = Step; I <= Size; I++) { /* Set Count to -1 initially to remove count due to pivot element. */ Count = -1; pElement = Matrix->FirstInCol[I]; while (pElement != NULL && pElement->Row < Step) pElement = pElement->NextInCol; while (pElement != NULL) { Count++; pElement = pElement->NextInCol; } Matrix->MarkowitzCol[I] = Count; } return; } /* * MARKOWITZ PRODUCTS * * Calculates MarkowitzProduct for each diagonal element from the Markowitz * counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local Variables: * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. Is used to * sequentially access entries quickly. * pMarkowitzRow (int *) * Pointer that points into MarkowitzRow array. Is used to sequentially * access entries quickly. * pMarkowitzCol (int *) * Pointer that points into MarkowitzCol array. Is used to sequentially * access entries quickly. * Product (long) * Temporary storage for Markowitz product./ * Size (int) * The size of the matrix. */ static void MarkowitzProducts(MatrixPtr Matrix, int Step) { int I, *pMarkowitzRow, *pMarkowitzCol; long Product, *pMarkowitzProduct; int Size = Matrix->Size; double fProduct; /* Begin `MarkowitzProducts'. */ Matrix->Singletons = 0; pMarkowitzProduct = &(Matrix->MarkowitzProd[Step]); pMarkowitzRow = &(Matrix->MarkowitzRow[Step]); pMarkowitzCol = &(Matrix->MarkowitzCol[Step]); for (I = Step; I <= Size; I++) { /* If chance of overflow, use real numbers. */ if ((*pMarkowitzRow > LARGEST_SHORT_INTEGER && *pMarkowitzCol != 0) || (*pMarkowitzCol > LARGEST_SHORT_INTEGER && *pMarkowitzRow != 0)) { fProduct = (double)(*pMarkowitzRow++) * (double)(*pMarkowitzCol++); if (fProduct >= LARGEST_LONG_INTEGER) *pMarkowitzProduct++ = LARGEST_LONG_INTEGER; else *pMarkowitzProduct++ = (long)fProduct; } else { Product = *pMarkowitzRow++ * *pMarkowitzCol++; if ((*pMarkowitzProduct++ = Product) == 0) Matrix->Singletons++; } } return; } /* * SEARCH FOR BEST PIVOT * * Performs a search to determine the element with the lowest Markowitz * Product that is also acceptable. An acceptable element is one that is * larger than the AbsThreshold and at least as large as RelThreshold times * the largest element in the same column. The first step is to look for * singletons if any exist. If none are found, then all the diagonals are * searched. The diagonal is searched once quickly using the assumption that * elements on the diagonal are large compared to other elements in their * column, and so the pivot can be chosen only on the basis of the Markowitz * criterion. After a element has been chosen to be pivot on the basis of * its Markowitz product, it is checked to see if it is large enough. * Waiting to the end of the Markowitz search to check the size of a pivot * candidate saves considerable time, but is not guaranteed to find an * acceptable pivot. Thus if unsuccessful a second pass of the diagonal is * made. This second pass checks to see if an element is large enough during * the search, not after it. If still no acceptable pivot candidate has * been found, the search expands to cover the entire matrix. * * >>> Returned: * A pointer to the element chosen to be pivot. If every element in the * matrix is zero, then NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * The row and column number of the beginning of the reduced submatrix. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to element that has been chosen to be the pivot. * * >>> Possible errors: * spSINGULAR * spSMALL_PIVOT */ static ElementPtr SearchForPivot( MatrixPtr Matrix, int Step, int DiagPivoting ) { ElementPtr ChosenPivot; /* Begin `SearchForPivot'. */ /* If singletons exist, look for an acceptable one to use as pivot. */ if (Matrix->Singletons) { ChosenPivot = SearchForSingleton( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 's'; return ChosenPivot; } } #if DIAGONAL_PIVOTING if (DiagPivoting) { /* * Either no singletons exist or they weren't acceptable. Take quick first * pass at searching diagonal. First search for element on diagonal of * remaining submatrix with smallest Markowitz product, then check to see * if it okay numerically. If not, QuicklySearchDiagonal fails. */ ChosenPivot = QuicklySearchDiagonal( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 'q'; return ChosenPivot; } /* * Quick search of diagonal failed, carefully search diagonal and check each * pivot candidate numerically before even tentatively accepting it. */ ChosenPivot = SearchDiagonal( Matrix, Step ); if (ChosenPivot != NULL) { Matrix->PivotSelectionMethod = 'd'; return ChosenPivot; } } #endif /* DIAGONAL_PIVOTING */ /* No acceptable pivot found yet, search entire matrix. */ ChosenPivot = SearchEntireMatrix( Matrix, Step ); Matrix->PivotSelectionMethod = 'e'; return ChosenPivot; } /* * SEARCH FOR SINGLETON TO USE AS PIVOT * * Performs a search to find a singleton to use as the pivot. The * first acceptable singleton is used. A singleton is acceptable if * it is larger in magnitude than the AbsThreshold and larger * than RelThreshold times the largest of any other elements in the same * column. It may seem that a singleton need not satisfy the * relative threshold criterion, however it is necessary to prevent * excessive growth in the RHS from resulting in overflow during the * forward and backward substitution. A singleton does not need to * be on the diagonal to be selected. * * >>> Returned: * A pointer to the singleton chosen to be pivot. In no singleton is * acceptable, return NULL. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to element that has been chosen to be the pivot. * PivotMag (RealNumber) * Magnitude of ChosenPivot. * Singletons (int) * The count of the number of singletons that can be used as pivots. * A local version of Matrix->Singletons. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. */ static ElementPtr SearchForSingleton( MatrixPtr Matrix, int Step ) { ElementPtr ChosenPivot; int I; long *pMarkowitzProduct; int Singletons; RealNumber PivotMag; /* Begin `SearchForSingleton'. */ /* Initialize pointer that is to scan through MarkowitzProduct vector. */ pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+1]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Decrement the count of available singletons, on the assumption that an * acceptable one will be found. */ Singletons = Matrix->Singletons--; /* * Assure that following while loop will always terminate, this is just * preventive medicine, if things are working right this should never * be needed. */ Matrix->MarkowitzProd[Step-1] = 0; while (Singletons-- > 0) { /* Singletons exist, find them. */ /* * This is tricky. Am using a pointer to sequentially step through the * MarkowitzProduct array. Search terminates when singleton (Product = 0) * is found. Note that the conditional in the while statement * ( *pMarkowitzProduct ) is TRUE as long as the MarkowitzProduct is not * equal to zero. The row (and column)strchr on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element, the singleton. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ while ( *pMarkowitzProduct-- ) { /* * N bottles of beer on the wall; * N bottles of beer. * you take one down and pass it around; * N-1 bottles of beer on the wall. */ } I = (int)(pMarkowitzProduct - Matrix->MarkowitzProd) + 1; /* Assure that I is valid. */ if (I < Step) break; /* while (Singletons-- > 0) */ if (I > Matrix->Size) I = Step; /* Singleton has been found in either/both row or/and column I. */ if ((ChosenPivot = Matrix->Diag[I]) != NULL) { /* Singleton lies on the diagonal. */ PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold && PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } else { /* Singleton does not lie on diagonal, find it. */ if (Matrix->MarkowitzCol[I] == 0) { ChosenPivot = Matrix->FirstInCol[I]; while ((ChosenPivot != NULL) && (ChosenPivot->Row < Step)) ChosenPivot = ChosenPivot->NextInCol; if (ChosenPivot != NULL) { /* Reduced column has no elements, matrix is singular. */ break; } PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold && PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; else { if (Matrix->MarkowitzRow[I] == 0) { ChosenPivot = Matrix->FirstInRow[I]; while((ChosenPivot != NULL) && (ChosenPivot->ColNextInRow; if (ChosenPivot != NULL) { /* Reduced row has no elements, matrix is singular. */ break; } PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold && PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } } } else { ChosenPivot = Matrix->FirstInRow[I]; while ((ChosenPivot != NULL) && (ChosenPivot->Col < Step)) ChosenPivot = ChosenPivot->NextInRow; if (ChosenPivot != NULL) { /* Reduced row has no elements, matrix is singular. */ break; } PivotMag = ELEMENT_MAG(ChosenPivot); if ( PivotMag > Matrix->AbsThreshold && PivotMag > Matrix->RelThreshold * FindBiggestInColExclude( Matrix, ChosenPivot, Step ) ) return ChosenPivot; } } /* Singleton not acceptable (too small), try another. */ } /* end of while(lSingletons>0) */ /* * All singletons were unacceptable. Restore Matrix->Singletons count. * Initial assumption that an acceptable singleton would be found was wrong. */ Matrix->Singletons++; return NULL; } #if DIAGONAL_PIVOTING #if MODIFIED_MARKOWITZ /* * QUICK SEARCH OF DIAGONAL FOR PIVOT WITH MODIFIED MARKOWITZ CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. Search terminates * early if a diagonal is found with a MarkowitzProduct of one and its * magnitude is larger than the other elements in its row and column. * Since its MarkowitzProduct is one, there is only one other element in * both its row and column, and, as a condition for early termination, * these elements must be located symmetricly in the matrix. If a tie * occurs between elements of equal MarkowitzProduct, then the element with * the largest ratio between its magnitude and the largest element in its * column is used. The search will be terminated after a given number of * ties have occurred and the best (largest ratio) of the tied element will * be used as the pivot. The number of ties that will trigger an early * termination is MinMarkowitzProduct * TIES_MULTIPLIER. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestOffDiagonal (RealNumber) * Magnitude of the largest of the off-diagonal terms associated with * a diagonal with MarkowitzProduct equal to one. * Magnitude (RealNumber) * Absolute value of diagonal element. * MaxRatio (RealNumber) * Among the elements tied with the smallest Markowitz product, MaxRatio * is the best (smallest) ratio of LargestInCol to the diagonal Magnitude * found so far. The smaller the ratio, the better numerically the * element will be as pivot. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates that lie along * diagonal. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the ratio of the largest * element in its column (excluding itself) to its magnitude. * TiedElements (ElementPtr[]) * Array of pointers to the elements with the minimum Markowitz * product. * pOtherInCol (ElementPtr) * When there is only one other element in a column other than the * diagonal, pOtherInCol is used to point to it. Used when Markowitz * product is to determine if off diagonals are placed symmetricly. * pOtherInRow (ElementPtr) * When there is only one other element in a row other than the diagonal, * pOtherInRow is used to point to it. Used when Markowitz product is * to determine if off diagonals are placed symmetricly. */ static ElementPtr QuicklySearchDiagonal( MatrixPtr Matrix, int Step ) { long MinMarkowitzProduct, *pMarkowitzProduct; ElementPtr pDiag, pOtherInRow, pOtherInCol; int I, NumberOfTies; ElementPtr ChosenPivot, TiedElements[MAX_MARKOWITZ_TIES + 1]; RealNumber Magnitude, LargestInCol, Ratio, MaxRatio; RealNumber LargestOffDiagonal; RealNumber FindBiggestInColExclude(); /* Begin `QuicklySearchDiagonal'. */ NumberOfTies = -1; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+2]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Assure that following while loop will always terminate. */ Matrix->MarkowitzProd[Step-1] = -1; /* * This is tricky. Am using a pointer in the inner while loop to * sequentially step through the MarkowitzProduct array. Search * terminates when the Markowitz product of zero placed at location * Step-1 is found. The row (and column)strchr on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element. The outer for loop is infinite, broken by using * break. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ for(;;) { /* Endless for loop. */ while (MinMarkowitzProduct < *(--pMarkowitzProduct)) { /* * N bottles of beer on the wall; * N bottles of beer. * You take one down and pass it around; * N-1 bottles of beer on the wall. */ } I = pMarkowitzProduct - Matrix->MarkowitzProd; /* Assure that I is valid; if I < Step, terminate search. */ if (I < Step) break; /* Endless for loop */ if (I > Matrix->Size) I = Step; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* Endless for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* Endless for loop */ if (*pMarkowitzProduct == 1) { /* Case where only one element exists in row and column other than diagonal. */ /* Find off diagonal elements. */ pOtherInRow = pDiag->NextInRow; pOtherInCol = pDiag->NextInCol; if (pOtherInRow == NULL && pOtherInCol == NULL) { pOtherInRow = Matrix->FirstInRow[I]; while(pOtherInRow != NULL) { if (pOtherInRow->Col >= Step && pOtherInRow->Col != I) break; pOtherInRow = pOtherInRow->NextInRow; } pOtherInCol = Matrix->FirstInCol[I]; while(pOtherInCol != NULL) { if (pOtherInCol->Row >= Step && pOtherInCol->Row != I) break; pOtherInCol = pOtherInCol->NextInCol; } } /* Accept diagonal as pivot if diagonal is larger than off diagonals and the * off diagonals are placed symmetricly. */ if (pOtherInRow != NULL && pOtherInCol != NULL) { if (pOtherInRow->Col == pOtherInCol->Row) { LargestOffDiagonal = MAX(ELEMENT_MAG(pOtherInRow), ELEMENT_MAG(pOtherInCol)); if (Magnitude >= LargestOffDiagonal) { /* Accept pivot, it is unlikely to contribute excess error. */ return pDiag; } } } } if (*pMarkowitzProduct < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ TiedElements[0] = pDiag; MinMarkowitzProduct = *pMarkowitzProduct; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ if (NumberOfTies < MAX_MARKOWITZ_TIES) { TiedElements[++NumberOfTies] = pDiag; if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) break; /* Endless for loop */ } } } /* End of endless for loop. */ /* Test to see if any element was chosen as a pivot candidate. */ if (NumberOfTies < 0) return NULL; /* Determine which of tied elements is best numerically. */ ChosenPivot = NULL; MaxRatio = 1.0 / Matrix->RelThreshold; for (I = 0; I <= NumberOfTies; I++) { pDiag = TiedElements[I]; Magnitude = ELEMENT_MAG(pDiag); LargestInCol = FindBiggestInColExclude( Matrix, pDiag, Step ); Ratio = LargestInCol / Magnitude; if (Ratio < MaxRatio) { ChosenPivot = pDiag; MaxRatio = Ratio; } } return ChosenPivot; } #else /* Not MODIFIED_MARKOWITZ */ /* * QUICK SEARCH OF DIAGONAL FOR PIVOT WITH CONVENTIONAL MARKOWITZ * CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. Search terminates * early if a diagonal is found with a MarkowitzProduct of one and its * magnitude is larger than the other elements in its row and column. * Since its MarkowitzProduct is one, there is only one other element in * both its row and column, and, as a condition for early termination, * these elements must be located symmetricly in the matrix. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestOffDiagonal (RealNumber) * Magnitude of the largest of the off-diagonal terms associated with * a diagonal with MarkowitzProduct equal to one. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates which are * acceptable. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long *) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * pOtherInCol (ElementPtr) * When there is only one other element in a column other than the * diagonal, pOtherInCol is used to point to it. Used when Markowitz * product is to determine if off diagonals are placed symmetricly. * pOtherInRow (ElementPtr) * When there is only one other element in a row other than the diagonal, * pOtherInRow is used to point to it. Used when Markowitz product is * to determine if off diagonals are placed symmetricly. */ static ElementPtr QuicklySearchDiagonal( MatrixPtr Matrix, int Step ) { long MinMarkowitzProduct, *pMarkowitzProduct; ElementPtr pDiag; int I; ElementPtr ChosenPivot, pOtherInRow, pOtherInCol; RealNumber Magnitude, LargestInCol, LargestOffDiagonal; /* Begin `QuicklySearchDiagonal'. */ ChosenPivot = NULL; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Matrix->Size+2]); Matrix->MarkowitzProd[Matrix->Size+1] = Matrix->MarkowitzProd[Step]; /* Assure that following while loop will always terminate. */ Matrix->MarkowitzProd[Step-1] = -1; /* * This is tricky. Am using a pointer in the inner while loop to * sequentially step through the MarkowitzProduct array. Search * terminates when the Markowitz product of zero placed at location * Step-1 is found. The row (and column)strchr on the diagonal is then * calculated by subtracting the pointer to the Markowitz product of * the first diagonal from the pointer to the Markowitz product of the * desired element. The outer for loop is infinite, broken by using * break. * * Search proceeds from the end (high row and column numbers) to the * beginning (low row and column numbers) so that rows and columns with * large Markowitz products will tend to be move to the bottom of the * matrix. However, choosing Diag[Step] is desirable because it would * require no row and column interchanges, so inspect it first by * putting its Markowitz product at the end of the MarkowitzProd * vector. */ for (;;) { /* Endless for loop. */ while (*(--pMarkowitzProduct) >= MinMarkowitzProduct) { /* Just passing through. */ } I = (int)(pMarkowitzProduct - Matrix->MarkowitzProd); /* Assure that I is valid; if I < Step, terminate search. */ if (I < Step) break; /* Endless for loop */ if (I > Matrix->Size) I = Step; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* Endless for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* Endless for loop */ if (*pMarkowitzProduct == 1) { /* Case where only one element exists in row and column other than diagonal. */ /* Find off-diagonal elements. */ pOtherInRow = pDiag->NextInRow; pOtherInCol = pDiag->NextInCol; if (pOtherInRow == NULL && pOtherInCol == NULL) { pOtherInRow = Matrix->FirstInRow[I]; while(pOtherInRow != NULL) { if (pOtherInRow->Col >= Step && pOtherInRow->Col != I) break; pOtherInRow = pOtherInRow->NextInRow; } pOtherInCol = Matrix->FirstInCol[I]; while(pOtherInCol != NULL) { if (pOtherInCol->Row >= Step && pOtherInCol->Row != I) break; pOtherInCol = pOtherInCol->NextInCol; } } /* Accept diagonal as pivot if diagonal is larger than off-diagonals and the * off-diagonals are placed symmetricly. */ if (pOtherInRow != NULL && pOtherInCol != NULL) { if (pOtherInRow->Col == pOtherInCol->Row) { LargestOffDiagonal = MAX(ELEMENT_MAG(pOtherInRow), ELEMENT_MAG(pOtherInCol)); if (Magnitude >= LargestOffDiagonal) { /* Accept pivot, it is unlikely to contribute excess error. */ return pDiag; } } } } MinMarkowitzProduct = *pMarkowitzProduct; ChosenPivot = pDiag; } /* End of endless for loop. */ if (ChosenPivot != NULL) { LargestInCol = FindBiggestInColExclude( Matrix, ChosenPivot, Step ); if( ELEMENT_MAG(ChosenPivot) <= Matrix->RelThreshold * LargestInCol ) ChosenPivot = NULL; } return ChosenPivot; } #endif /* Not MODIFIED_MARKOWITZ */ /* * SEARCH DIAGONAL FOR PIVOT WITH MODIFIED MARKOWITZ CRITERION * * Searches the diagonal looking for the best pivot. For a pivot to be * acceptable it must be larger than the pivot RelThreshold times the largest * element in its reduced column. Among the acceptable diagonals, the * one with the smallest MarkowitzProduct is sought. If a tie occurs * between elements of equal MarkowitzProduct, then the element with * the largest ratio between its magnitude and the largest element in its * column is used. The search will be terminated after a given number of * ties have occurred and the best (smallest ratio) of the tied element will * be used as the pivot. The number of ties that will trigger an early * termination is MinMarkowitzProduct * TIES_MULTIPLIER. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no diagonal is * acceptable, a NULL is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * Size (int) * Local version of size which is placed in a to increase speed. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of those pivot candidates which are * acceptable. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pDiag (ElementPtr) * Pointer to current diagonal element. * pMarkowitzProduct (long*) * Pointer that points into MarkowitzProduct array. It is used to quickly * access successive Markowitz products. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the * Ratio of the largest element in its column to its magnitude. * RatioOfAccepted (RealNumber) * For the best pivot candidate found so far, RatioOfAccepted is the * Ratio of the largest element in its column to its magnitude. */ static ElementPtr SearchDiagonal( MatrixPtr Matrix, int Step ) { int J; long MinMarkowitzProduct, *pMarkowitzProduct; int I; ElementPtr pDiag; int NumberOfTies = 0; int Size = Matrix->Size; ElementPtr ChosenPivot; RealNumber Magnitude, Ratio; RealNumber RatioOfAccepted = 0; RealNumber LargestInCol; /* Begin `SearchDiagonal'. */ ChosenPivot = NULL; MinMarkowitzProduct = LARGEST_LONG_INTEGER; pMarkowitzProduct = &(Matrix->MarkowitzProd[Size+2]); Matrix->MarkowitzProd[Size+1] = Matrix->MarkowitzProd[Step]; /* Start search of diagonal. */ for (J = Size+1; J > Step; J--) { if (*(--pMarkowitzProduct) > MinMarkowitzProduct) continue; /* for loop */ if (J > Matrix->Size) I = Step; else I = J; if ((pDiag = Matrix->Diag[I]) == NULL) continue; /* for loop */ if ((Magnitude = ELEMENT_MAG(pDiag)) <= Matrix->AbsThreshold) continue; /* for loop */ /* Test to see if diagonal's magnitude is acceptable. */ LargestInCol = FindBiggestInColExclude( Matrix, pDiag, Step ); if (Magnitude <= Matrix->RelThreshold * LargestInCol) continue; /* for loop */ if (*pMarkowitzProduct < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ ChosenPivot = pDiag; MinMarkowitzProduct = *pMarkowitzProduct; RatioOfAccepted = LargestInCol / Magnitude; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ NumberOfTies++; Ratio = LargestInCol / Magnitude; if (Ratio < RatioOfAccepted) { ChosenPivot = pDiag; RatioOfAccepted = Ratio; } if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) return ChosenPivot; } } /* End of for(Step) */ return ChosenPivot; } #endif /* DIAGONAL_PIVOTING */ /* * SEARCH ENTIRE MATRIX FOR BEST PIVOT * * Performs a search over the entire matrix looking for the acceptable * element with the lowest MarkowitzProduct. If there are several that * are tied for the smallest MarkowitzProduct, the tie is broken by using * the ratio of the magnitude of the element being considered to the largest * element in the same column. If no element is acceptable then the largest * element in the reduced submatrix is used as the pivot and the * matrix is declared to be spSMALL_PIVOT. If the largest element is * zero, the matrix is declared to be spSINGULAR. * * >>> Returned: * A pointer to the diagonal element chosen to be pivot. If no element is * found, then NULL is returned and the matrix is spSINGULAR. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * ChosenPivot (ElementPtr) * Pointer to the element that has been chosen to be the pivot. * LargestElementMag (RealNumber) * Magnitude of the largest element yet found in the reduced submatrix. * Size (int) * Local version of Size; placed in a for speed. * Magnitude (RealNumber) * Absolute value of diagonal element. * MinMarkowitzProduct (long) * Smallest Markowitz product found of pivot candidates which are * acceptable. * NumberOfTies (int) * A count of the number of Markowitz ties that have occurred at current * MarkowitzProduct. * pElement (ElementPtr) * Pointer to current element. * pLargestElement (ElementPtr) * Pointer to the largest element yet found in the reduced submatrix. * Product (long) * Markowitz product for the current row and column. * Ratio (RealNumber) * For the current pivot candidate, Ratio is the * Ratio of the largest element in its column to its magnitude. * RatioOfAccepted (RealNumber) * For the best pivot candidate found so far, RatioOfAccepted is the * Ratio of the largest element in its column to its magnitude. * * >>> Possible errors: * spSINGULAR * spSMALL_PIVOT */ static ElementPtr SearchEntireMatrix( MatrixPtr Matrix, int Step ) { int I, Size = Matrix->Size; ElementPtr pElement; int NumberOfTies = 0; long Product, MinMarkowitzProduct; ElementPtr ChosenPivot; ElementPtr pLargestElement = NULL; RealNumber Magnitude, LargestElementMag, Ratio; RealNumber RatioOfAccepted = 0; RealNumber LargestInCol; /* Begin `SearchEntireMatrix'. */ ChosenPivot = NULL; LargestElementMag = 0.0; MinMarkowitzProduct = LARGEST_LONG_INTEGER; /* Start search of matrix on column by column basis. */ for (I = Step; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL && pElement->Row < Step) pElement = pElement->NextInCol; if((LargestInCol = FindLargestInCol(pElement)) == 0.0) continue; /* for loop */ while (pElement != NULL) { /* Check to see if element is the largest encountered so far. If so, record its magnitude and address. */ if ((Magnitude = ELEMENT_MAG(pElement)) > LargestElementMag) { LargestElementMag = Magnitude; pLargestElement = pElement; } /* Calculate element's MarkowitzProduct. */ Product = Matrix->MarkowitzRow[pElement->Row] * Matrix->MarkowitzCol[pElement->Col]; /* Test to see if element is acceptable as a pivot candidate. */ if ((Product <= MinMarkowitzProduct) && (Magnitude > Matrix->RelThreshold * LargestInCol) && (Magnitude > Matrix->AbsThreshold)) { /* Test to see if element has lowest MarkowitzProduct yet found, or whether it is tied with an element found earlier. */ if (Product < MinMarkowitzProduct) { /* Notice strict inequality in test. This is a new smallest MarkowitzProduct. */ ChosenPivot = pElement; MinMarkowitzProduct = Product; RatioOfAccepted = LargestInCol / Magnitude; NumberOfTies = 0; } else { /* This case handles Markowitz ties. */ NumberOfTies++; Ratio = LargestInCol / Magnitude; if (Ratio < RatioOfAccepted) { ChosenPivot = pElement; RatioOfAccepted = Ratio; } if (NumberOfTies >= MinMarkowitzProduct * TIES_MULTIPLIER) return ChosenPivot; } } pElement = pElement->NextInCol; } /* End of while(pElement != NULL) */ } /* End of for(Step) */ if (ChosenPivot != NULL) return ChosenPivot; if (LargestElementMag == 0.0) { Matrix->Error = spSINGULAR; return NULL; } Matrix->Error = spSMALL_PIVOT; return pLargestElement; } /* * DETERMINE THE MAGNITUDE OF THE LARGEST ELEMENT IN A COLUMN * * This routine searches a column and returns the magnitude of the * largest element. This routine begins the search at the element * pointed to by pElement, the parameter. * * The search is conducted by starting at the element specified by a * pointer, which should be one below the diagonal, and moving down * the column. On the way down the column, the magnitudes of the * elements are tested to see if they are the largest yet found. * * >>> Returned: * The magnitude of the largest element in the column below and including * the one pointed to by the input parameter. * * >>> Arguments: * pElement (ElementPtr) * The pointer to the first element to be tested. Also, used by the * routine to access all lower elements in the column. * * >>> Local variables: * Largest (RealNumber) * The magnitude of the largest element. * Magnitude (RealNumber) * The magnitude of the currently active element. */ static RealNumber FindLargestInCol( ElementPtr pElement ) { RealNumber Magnitude, Largest = 0.0; /* Begin `FindLargestInCol'. */ /* Search column for largest element beginning at Element. */ while (pElement != NULL) { if ((Magnitude = ELEMENT_MAG(pElement)) > Largest) Largest = Magnitude; pElement = pElement->NextInCol; } return Largest; } /* * DETERMINE THE MAGNITUDE OF THE LARGEST ELEMENT IN A COLUMN * EXCLUDING AN ELEMENT * * This routine searches a column and returns the magnitude of the largest * element. One given element is specifically excluded from the search. * * The search is conducted by starting at the first element in the column * and moving down the column until the active part of the matrix is entered, * i.e. the reduced submatrix. The rest of the column is then traversed * looking for the largest element. * * >>> Returned: * The magnitude of the largest element in the active portion of the column, * excluding the specified element, is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * pElement (ElementPtr) * The pointer to the element that is to be excluded from search. Column * to be searched is one that contains this element. Also used to * access the elements in the column. * Step (int) * Index of the diagonal currently being eliminated. Indicates where * the active part of the matrix begins. * * >>> Local variables: * Col (int) * The number of the column to be searched. Also the column number of * the element to be avoided in the search. * Largest (RealNumber) * The magnitude of the largest element. * Magnitude (RealNumber) * The magnitude of the currently active element. * Row (int) * The row number of element to be excluded from the search. */ static RealNumber FindBiggestInColExclude( MatrixPtr Matrix, ElementPtr pElement, int Step ) { int Row; int Col; RealNumber Largest, Magnitude; /* Begin `FindBiggestInColExclude'. */ Row = pElement->Row; Col = pElement->Col; pElement = Matrix->FirstInCol[Col]; /* Travel down column until reduced submatrix is entered. */ while ((pElement != NULL) && (pElement->Row < Step)) pElement = pElement->NextInCol; /* Initialize the variable Largest. */ if (pElement->Row != Row) Largest = ELEMENT_MAG(pElement); else Largest = 0.0; /* Search rest of column for largest element, avoiding excluded element. */ while ((pElement = pElement->NextInCol) != NULL) { if ((Magnitude = ELEMENT_MAG(pElement)) > Largest) { if (pElement->Row != Row) Largest = Magnitude; } } return Largest; } /* * EXCHANGE ROWS AND COLUMNS * * Exchanges two rows and two columns so that the selected pivot is moved to * the upper left corner of the remaining submatrix. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * Step (int) * Index of the diagonal currently being eliminated. * * >>> Local variables: * Col (int) * Column where the pivot was found. * Row (int) * Row where the pivot was found. * OldMarkowitzProd_Col (long) * Markowitz product associated with the diagonal element in the row * the pivot was found in. * OldMarkowitzProd_Row (long) * Markowitz product associated with the diagonal element in the column * the pivot was found in. * OldMarkowitzProd_Step (long) * Markowitz product associated with the diagonal element that is being * moved so that the pivot can be placed in the upper left-hand corner * of the reduced submatrix. */ static void ExchangeRowsAndCols( MatrixPtr Matrix, ElementPtr pPivot, int Step ) { int Row, Col; long OldMarkowitzProd_Step, OldMarkowitzProd_Row, OldMarkowitzProd_Col; /* Begin `ExchangeRowsAndCols'. */ Row = pPivot->Row; Col = pPivot->Col; Matrix->PivotsOriginalRow = Row; Matrix->PivotsOriginalCol = Col; if ((Row == Step) && (Col == Step)) return; /* Exchange rows and columns. */ if (Row == Col) { spcRowExchange( Matrix, Step, Row ); spcColExchange( Matrix, Step, Col ); SWAP( long, Matrix->MarkowitzProd[Step], Matrix->MarkowitzProd[Row] ); SWAP( ElementPtr, Matrix->Diag[Row], Matrix->Diag[Step] ); } else { /* Initialize variables that hold old Markowitz products. */ OldMarkowitzProd_Step = Matrix->MarkowitzProd[Step]; OldMarkowitzProd_Row = Matrix->MarkowitzProd[Row]; OldMarkowitzProd_Col = Matrix->MarkowitzProd[Col]; /* Exchange rows. */ if (Row != Step) { spcRowExchange( Matrix, Step, Row ); Matrix->NumberOfInterchangesIsOdd = !Matrix->NumberOfInterchangesIsOdd; Matrix->MarkowitzProd[Row] = Matrix->MarkowitzRow[Row] * Matrix->MarkowitzCol[Row]; /* Update singleton count. */ if ((Matrix->MarkowitzProd[Row]==0) != (OldMarkowitzProd_Row==0)) { if (OldMarkowitzProd_Row == 0) Matrix->Singletons--; else Matrix->Singletons++; } } /* Exchange columns. */ if (Col != Step) { spcColExchange( Matrix, Step, Col ); Matrix->NumberOfInterchangesIsOdd = !Matrix->NumberOfInterchangesIsOdd; Matrix->MarkowitzProd[Col] = Matrix->MarkowitzCol[Col] * Matrix->MarkowitzRow[Col]; /* Update singleton count. */ if ((Matrix->MarkowitzProd[Col]==0) != (OldMarkowitzProd_Col==0)) { if (OldMarkowitzProd_Col == 0) Matrix->Singletons--; else Matrix->Singletons++; } Matrix->Diag[Col] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Col, Col, Col, NO ); } if (Row != Step) { Matrix->Diag[Row] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Row, Row, Row, NO ); } Matrix->Diag[Step] = spcFindElementInCol( Matrix, Matrix->FirstInCol+Step, Step, Step, NO ); /* Update singleton count. */ Matrix->MarkowitzProd[Step] = Matrix->MarkowitzCol[Step] * Matrix->MarkowitzRow[Step]; if ((Matrix->MarkowitzProd[Step]==0) != (OldMarkowitzProd_Step==0)) { if (OldMarkowitzProd_Step == 0) Matrix->Singletons--; else Matrix->Singletons++; } } return; } /* * EXCHANGE ROWS * * Performs all required operations to exchange two rows. Those operations * include: swap FirstInRow pointers, fixing up the NextInCol pointers, * swapping rowstrchres in MatrixElements, and swapping Markowitz row * counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row1 (int) * Rowstrchr of one of the rows, becomes the smalleststrchr. * Row2 (int) * Rowstrchr of the other row, becomes the largeststrchr. * * Local variables: * Column (int) * Column in which row elements are currently being exchanged. * Row1Ptr (ElementPtr) * Pointer to an element in Row1. * Row2Ptr (ElementPtr) * Pointer to an element in Row2. * Element1 (ElementPtr) * Pointer to the element in Row1 to be exchanged. * Element2 (ElementPtr) * Pointer to the element in Row2 to be exchanged. */ void spcRowExchange( MatrixPtr Matrix, int Row1, int Row2 ) { ElementPtr Row1Ptr, Row2Ptr; int Column; ElementPtr Element1, Element2; /* Begin `spcRowExchange'. */ if (Row1 > Row2) SWAP(int, Row1, Row2); Row1Ptr = Matrix->FirstInRow[Row1]; Row2Ptr = Matrix->FirstInRow[Row2]; while (Row1Ptr != NULL || Row2Ptr != NULL) { /* Exchange elements in rows while traveling from left to right. */ if (Row1Ptr == NULL) { Column = Row2Ptr->Col; Element1 = NULL; Element2 = Row2Ptr; Row2Ptr = Row2Ptr->NextInRow; } else if (Row2Ptr == NULL) { Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = NULL; Row1Ptr = Row1Ptr->NextInRow; } else if (Row1Ptr->Col < Row2Ptr->Col) { Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = NULL; Row1Ptr = Row1Ptr->NextInRow; } else if (Row1Ptr->Col > Row2Ptr->Col) { Column = Row2Ptr->Col; Element1 = NULL; Element2 = Row2Ptr; Row2Ptr = Row2Ptr->NextInRow; } else { /* Row1Ptr->Col == Row2Ptr->Col */ Column = Row1Ptr->Col; Element1 = Row1Ptr; Element2 = Row2Ptr; Row1Ptr = Row1Ptr->NextInRow; Row2Ptr = Row2Ptr->NextInRow; } ExchangeColElements( Matrix, Row1, Element1, Row2, Element2, Column); } /* end of while(Row1Ptr != NULL || Row2Ptr != NULL) */ if (Matrix->InternalVectorsAllocated) SWAP( int, Matrix->MarkowitzRow[Row1], Matrix->MarkowitzRow[Row2]); SWAP( ElementPtr, Matrix->FirstInRow[Row1], Matrix->FirstInRow[Row2]); SWAP( int, Matrix->IntToExtRowMap[Row1], Matrix->IntToExtRowMap[Row2]); #if TRANSLATE Matrix->ExtToIntRowMap[ Matrix->IntToExtRowMap[Row1] ] = Row1; Matrix->ExtToIntRowMap[ Matrix->IntToExtRowMap[Row2] ] = Row2; #endif return; } /* * EXCHANGE COLUMNS * * Performs all required operations to exchange two columns. Those operations * include: swap FirstInCol pointers, fixing up the NextInRow pointers, * swapping columnstrchres in MatrixElements, and swapping Markowitz * column counts. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col1 (int) * Columnstrchr of one of the columns, becomes the smalleststrchr. * Col2 (int) * Columnstrchr of the other column, becomes the largeststrchr * * Local variables: * Row (int) * Row in which column elements are currently being exchanged. * Col1Ptr (ElementPtr) * Pointer to an element in Col1. * Col2Ptr (ElementPtr) * Pointer to an element in Col2. * Element1 (ElementPtr) * Pointer to the element in Col1 to be exchanged. * Element2 (ElementPtr) * Pointer to the element in Col2 to be exchanged. */ void spcColExchange( MatrixPtr Matrix, int Col1, int Col2 ) { ElementPtr Col1Ptr, Col2Ptr; int Row; ElementPtr Element1, Element2; /* Begin `spcColExchange'. */ if (Col1 > Col2) SWAP(int, Col1, Col2); Col1Ptr = Matrix->FirstInCol[Col1]; Col2Ptr = Matrix->FirstInCol[Col2]; while (Col1Ptr != NULL || Col2Ptr != NULL) { /* Exchange elements in rows while traveling from top to bottom. */ if (Col1Ptr == NULL) { Row = Col2Ptr->Row; Element1 = NULL; Element2 = Col2Ptr; Col2Ptr = Col2Ptr->NextInCol; } else if (Col2Ptr == NULL) { Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = NULL; Col1Ptr = Col1Ptr->NextInCol; } else if (Col1Ptr->Row < Col2Ptr->Row) { Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = NULL; Col1Ptr = Col1Ptr->NextInCol; } else if (Col1Ptr->Row > Col2Ptr->Row) { Row = Col2Ptr->Row; Element1 = NULL; Element2 = Col2Ptr; Col2Ptr = Col2Ptr->NextInCol; } else { /* Col1Ptr->Row == Col2Ptr->Row */ Row = Col1Ptr->Row; Element1 = Col1Ptr; Element2 = Col2Ptr; Col1Ptr = Col1Ptr->NextInCol; Col2Ptr = Col2Ptr->NextInCol; } ExchangeRowElements( Matrix, Col1, Element1, Col2, Element2, Row); } /* end of while(Col1Ptr != NULL || Col2Ptr != NULL) */ if (Matrix->InternalVectorsAllocated) SWAP( int, Matrix->MarkowitzCol[Col1], Matrix->MarkowitzCol[Col2]); SWAP( ElementPtr, Matrix->FirstInCol[Col1], Matrix->FirstInCol[Col2]); SWAP( int, Matrix->IntToExtColMap[Col1], Matrix->IntToExtColMap[Col2]); #if TRANSLATE Matrix->ExtToIntColMap[ Matrix->IntToExtColMap[Col1] ] = Col1; Matrix->ExtToIntColMap[ Matrix->IntToExtColMap[Col2] ] = Col2; #endif return; } /* * EXCHANGE TWO ELEMENTS IN A COLUMN * * Performs all required operations to exchange two elements in a column. * Those operations are: restring NextInCol pointers and swapping rowstrchres * in the MatrixElements. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Row1 (int) * Row of top element to be exchanged. * Element1 (ElementPtr) * Pointer to top element to be exchanged. * Row2 (int) * Row of bottom element to be exchanged. * Element2 (ElementPtr) * Pointer to bottom element to be exchanged. * Column (int) * Column that exchange is to take place in. * * >>> Local variables: * ElementAboveRow1 (ElementPtr *) * Location of pointer which points to the element above Element1. This * pointer is modified so that it points to correct element on exit. * ElementAboveRow2 (ElementPtr *) * Location of pointer which points to the element above Element2. This * pointer is modified so that it points to correct element on exit. * ElementBelowRow1 (ElementPtr) * Pointer to element below Element1. * ElementBelowRow2 (ElementPtr) * Pointer to element below Element2. * pElement (ElementPtr) * Pointer used to traverse the column. */ static void ExchangeColElements( MatrixPtr Matrix, int Row1, ElementPtr Element1, int Row2, ElementPtr Element2, int Column ) { ElementPtr *ElementAboveRow1, *ElementAboveRow2; ElementPtr ElementBelowRow1, ElementBelowRow2; ElementPtr pElement; /* Begin `ExchangeColElements'. */ /* Search to find the ElementAboveRow1. */ ElementAboveRow1 = &(Matrix->FirstInCol[Column]); pElement = *ElementAboveRow1; while (pElement->Row < Row1) { ElementAboveRow1 = &(pElement->NextInCol); pElement = *ElementAboveRow1; } if (Element1 != NULL) { ElementBelowRow1 = Element1->NextInCol; if (Element2 == NULL) { /* Element2 does not exist, move Element1 down to Row2. */ if ( ElementBelowRow1 != NULL && ElementBelowRow1->Row < Row2 ) { /* Element1 must be removed from linked list and moved. */ *ElementAboveRow1 = ElementBelowRow1; /* Search column for Row2. */ pElement = ElementBelowRow1; do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement != NULL && pElement->Row < Row2); /* Place Element1 in Row2. */ *ElementAboveRow2 = Element1; Element1->NextInCol = pElement; *ElementAboveRow1 =ElementBelowRow1; } Element1->Row = Row2; } else { /* Element2 does exist, and the two elements must be exchanged. */ if ( ElementBelowRow1->Row == Row2) { /* Element2 is just below Element1, exchange them. */ Element1->NextInCol = Element2->NextInCol; Element2->NextInCol = Element1; *ElementAboveRow1 = Element2; } else { /* Element2 is not just below Element1 and must be searched for. */ pElement = ElementBelowRow1; do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement->Row < Row2); ElementBelowRow2 = Element2->NextInCol; /* Switch Element1 and Element2. */ *ElementAboveRow1 = Element2; Element2->NextInCol = ElementBelowRow1; *ElementAboveRow2 = Element1; Element1->NextInCol = ElementBelowRow2; } Element1->Row = Row2; Element2->Row = Row1; } } else { /* Element1 does not exist. */ ElementBelowRow1 = pElement; /* Find Element2. */ if (ElementBelowRow1->Row != Row2) { do { ElementAboveRow2 = &(pElement->NextInCol); pElement = *ElementAboveRow2; } while (pElement->Row < Row2); ElementBelowRow2 = Element2->NextInCol; /* Move Element2 to Row1. */ *ElementAboveRow2 = Element2->NextInCol; *ElementAboveRow1 = Element2; Element2->NextInCol = ElementBelowRow1; } Element2->Row = Row1; } return; } /* * EXCHANGE TWO ELEMENTS IN A ROW * * Performs all required operations to exchange two elements in a row. * Those operations are: restring NextInRow pointers and swapping column * strchres in the MatrixElements. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col1 (int) * Col of left-most element to be exchanged. * Element1 (ElementPtr) * Pointer to left-most element to be exchanged. * Col2 (int) * Col of right-most element to be exchanged. * Element2 (ElementPtr) * Pointer to right-most element to be exchanged. * Row (int) * Row that exchange is to take place in. * * >>> Local variables: * ElementLeftOfCol1 (ElementPtr *) * Location of pointer which points to the element to the left of * Element1. This pointer is modified so that it points to correct * element on exit. * ElementLeftOfCol2 (ElementPtr *) * Location of pointer which points to the element to the left of * Element2. This pointer is modified so that it points to correct * element on exit. * ElementRightOfCol1 (ElementPtr) * Pointer to element right of Element1. * ElementRightOfCol2 (ElementPtr) * Pointer to element right of Element2. * pElement (ElementPtr) * Pointer used to traverse the row. */ static void ExchangeRowElements( MatrixPtr Matrix, int Col1, ElementPtr Element1, int Col2, ElementPtr Element2, int Row ) { ElementPtr *ElementLeftOfCol1, *ElementLeftOfCol2; ElementPtr ElementRightOfCol1, ElementRightOfCol2; ElementPtr pElement; /* Begin `ExchangeRowElements'. */ /* Search to find the ElementLeftOfCol1. */ ElementLeftOfCol1 = &(Matrix->FirstInRow[Row]); pElement = *ElementLeftOfCol1; while (pElement->Col < Col1) { ElementLeftOfCol1 = &(pElement->NextInRow); pElement = *ElementLeftOfCol1; } if (Element1 != NULL) { ElementRightOfCol1 = Element1->NextInRow; if (Element2 == NULL) { /* Element2 does not exist, move Element1 to right to Col2. */ if ( ElementRightOfCol1 != NULL && ElementRightOfCol1->Col < Col2 ) { /* Element1 must be removed from linked list and moved. */ *ElementLeftOfCol1 = ElementRightOfCol1; /* Search Row for Col2. */ pElement = ElementRightOfCol1; do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement != NULL && pElement->Col < Col2); /* Place Element1 in Col2. */ *ElementLeftOfCol2 = Element1; Element1->NextInRow = pElement; *ElementLeftOfCol1 =ElementRightOfCol1; } Element1->Col = Col2; } else { /* Element2 does exist, and the two elements must be exchanged. */ if ( ElementRightOfCol1->Col == Col2) { /* Element2 is just right of Element1, exchange them. */ Element1->NextInRow = Element2->NextInRow; Element2->NextInRow = Element1; *ElementLeftOfCol1 = Element2; } else { /* Element2 is not just right of Element1 and must be searched for. */ pElement = ElementRightOfCol1; do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement->Col < Col2); ElementRightOfCol2 = Element2->NextInRow; /* Switch Element1 and Element2. */ *ElementLeftOfCol1 = Element2; Element2->NextInRow = ElementRightOfCol1; *ElementLeftOfCol2 = Element1; Element1->NextInRow = ElementRightOfCol2; } Element1->Col = Col2; Element2->Col = Col1; } } else { /* Element1 does not exist. */ ElementRightOfCol1 = pElement; /* Find Element2. */ if (ElementRightOfCol1->Col != Col2) { do { ElementLeftOfCol2 = &(pElement->NextInRow); pElement = *ElementLeftOfCol2; } while (pElement->Col < Col2); ElementRightOfCol2 = Element2->NextInRow; /* Move Element2 to Col1. */ *ElementLeftOfCol2 = Element2->NextInRow; *ElementLeftOfCol1 = Element2; Element2->NextInRow = ElementRightOfCol1; } Element2->Col = Col1; } return; } /* * PERFORM ROW AND COLUMN ELIMINATION ON REAL MATRIX * * Eliminates a single row and column of the matrix and leaves single row of * the upper triangular matrix and a single column of the lower triangular * matrix in its wake. Uses Gauss's method. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * pLower (ElementPtr) * Points to matrix element in lower triangular column. * pSub (ElementPtr) * Points to elements in the reduced submatrix. * Row (int) * Rowstrchr. * pUpper (ElementPtr) * Points to matrix element in upper triangular row. * * >>> Possible errors: * spNO_MEMORY */ static void RealRowColElimination( MatrixPtr Matrix, ElementPtr pPivot ) { ElementPtr pSub; int Row; ElementPtr pLower, pUpper; /* Begin `RealRowColElimination'. */ /* Test for zero pivot. */ if (ABS(pPivot->Real) == 0.0) { (void)MatrixIsSingular( Matrix, pPivot->Row ); return; } pPivot->Real = 1.0 / pPivot->Real; pUpper = pPivot->NextInRow; while (pUpper != NULL) { /* Calculate upper triangular element. */ pUpper->Real *= pPivot->Real; pSub = pUpper->NextInCol; pLower = pPivot->NextInCol; while (pLower != NULL) { Row = pLower->Row; /* Find element in row that lines up with current lower triangular element. */ while (pSub != NULL && pSub->Row < Row) pSub = pSub->NextInCol; /* Test to see if desired element was not found, if not, create fill-in. */ if (pSub == NULL || pSub->Row > Row) { pSub = CreateFillin( Matrix, Row, pUpper->Col ); if (pSub == NULL) { Matrix->Error = spNO_MEMORY; return; } } pSub->Real -= pUpper->Real * pLower->Real; pSub = pSub->NextInCol; pLower = pLower->NextInCol; } pUpper = pUpper->NextInRow; } return; } /* * PERFORM ROW AND COLUMN ELIMINATION ON COMPLEX MATRIX * * Eliminates a single row and column of the matrix and leaves single row of * the upper triangular matrix and a single column of the lower triangular * matrix in its wake. Uses Gauss's method. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * pLower (ElementPtr) * Points to matrix element in lower triangular column. * pSub (ElementPtr) * Points to elements in the reduced submatrix. * Row (int) * Rowstrchr. * pUpper (ElementPtr) * Points to matrix element in upper triangular row. * * Possible errors: * spNO_MEMORY */ static void ComplexRowColElimination( MatrixPtr Matrix, ElementPtr pPivot ) { ElementPtr pSub; int Row; ElementPtr pLower, pUpper; /* Begin `ComplexRowColElimination'. */ /* Test for zero pivot. */ if (ELEMENT_MAG(pPivot) == 0.0) { (void)MatrixIsSingular( Matrix, pPivot->Row ); return; } CMPLX_RECIPROCAL(*pPivot, *pPivot); pUpper = pPivot->NextInRow; while (pUpper != NULL) { /* Calculate upper triangular element. */ /* Cmplx expr: *pUpper = *pUpper * (1.0 / *pPivot). */ CMPLX_MULT_ASSIGN(*pUpper, *pPivot); pSub = pUpper->NextInCol; pLower = pPivot->NextInCol; while (pLower != NULL) { Row = pLower->Row; /* Find element in row that lines up with current lower triangular element. */ while (pSub != NULL && pSub->Row < Row) pSub = pSub->NextInCol; /* Test to see if desired element was not found, if not, create fill-in. */ if (pSub == NULL || pSub->Row > Row) { pSub = CreateFillin( Matrix, Row, pUpper->Col ); if (pSub == NULL) { Matrix->Error = spNO_MEMORY; return; } } /* Cmplx expr: pElement -= *pUpper * pLower. */ CMPLX_MULT_SUBT_ASSIGN(*pSub, *pUpper, *pLower); pSub = pSub->NextInCol; pLower = pLower->NextInCol; } pUpper = pUpper->NextInRow; } return; } /* * UPDATE MARKOWITZ NUMBERS * * Updates the Markowitz numbers after a row and column have been eliminated. * Also updates singleton count. * * >>> Argument: * Matrix (MatrixPtr) * Pointer to the matrix. * pPivot (ElementPtr) * Pointer to the current pivot. * * >>> Local variables: * Row (int) * Rowstrchr. * Col (int) * Columnstrchr. * ColPtr (ElementPtr) * Points to matrix element in upper triangular column. * RowPtr (ElementPtr) * Points to matrix element in lower triangular row. */ static void UpdateMarkowitzNumbers( MatrixPtr Matrix, ElementPtr pPivot ) { int Row, Col; ElementPtr ColPtr, RowPtr; int *MarkoRow = Matrix->MarkowitzRow; int *MarkoCol = Matrix->MarkowitzCol; double Product; /* Begin `UpdateMarkowitzNumbers'. */ /* Update Markowitz numbers. */ for (ColPtr = pPivot->NextInCol; ColPtr != NULL; ColPtr = ColPtr->NextInCol) { Row = ColPtr->Row; --MarkoRow[Row]; /* Form Markowitz product while being cautious of overflows. */ if ((MarkoRow[Row] > LARGEST_SHORT_INTEGER && MarkoCol[Row] != 0) || (MarkoCol[Row] > LARGEST_SHORT_INTEGER && MarkoRow[Row] != 0)) { Product = MarkoCol[Row] * MarkoRow[Row]; if (Product >= LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Row] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Row] = (long)Product; } else Matrix->MarkowitzProd[Row] = MarkoRow[Row] * MarkoCol[Row]; if (MarkoRow[Row] == 0) Matrix->Singletons++; } for (RowPtr = pPivot->NextInRow; RowPtr != NULL; RowPtr = RowPtr->NextInRow) { Col = RowPtr->Col; --MarkoCol[Col]; /* Form Markowitz product while being cautious of overflows. */ if ((MarkoRow[Col] > LARGEST_SHORT_INTEGER && MarkoCol[Col] != 0) || (MarkoCol[Col] > LARGEST_SHORT_INTEGER && MarkoRow[Col] != 0)) { Product = MarkoCol[Col] * MarkoRow[Col]; if (Product >= LARGEST_LONG_INTEGER) Matrix->MarkowitzProd[Col] = LARGEST_LONG_INTEGER; else Matrix->MarkowitzProd[Col] = (long)Product; } else Matrix->MarkowitzProd[Col] = MarkoRow[Col] * MarkoCol[Col]; if ((MarkoCol[Col] == 0) && (MarkoRow[Col] != 0)) Matrix->Singletons++; } return; } /* * CREATE FILL-IN * * This routine is used to create fill-ins and splice them into the * matrix. * * >>> Returns: * Pointer to fill-in. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * Col (int) * Columnstrchr for element. * Row (int) * Rowstrchr for element. * * >>> Local variables: * pElement (ElementPtr) * Pointer to an element in the matrix. * ppElementAbove (ElementPtr *) * This contains the address of the pointer to the element just above the * one being created. It is used to speed the search and it is updated * with address of the created element. * * >>> Possible errors: * spNO_MEMORY */ static ElementPtr CreateFillin( MatrixPtr Matrix, int Row, int Col ) { ElementPtr pElement, *ppElementAbove; /* Begin `CreateFillin'. */ /* Find Element above fill-in. */ ppElementAbove = &Matrix->FirstInCol[Col]; pElement = *ppElementAbove; while (pElement != NULL) { if (pElement->Row < Row) { ppElementAbove = &pElement->NextInCol; pElement = *ppElementAbove; } else break; /* while loop */ } /* End of search, create the element. */ pElement = spcCreateElement( Matrix, Row, Col, ppElementAbove, YES ); /* Update Markowitz counts and products. */ Matrix->MarkowitzProd[Row] = ++Matrix->MarkowitzRow[Row] * Matrix->MarkowitzCol[Row]; if ((Matrix->MarkowitzRow[Row] == 1) && (Matrix->MarkowitzCol[Row] != 0)) Matrix->Singletons--; Matrix->MarkowitzProd[Col] = ++Matrix->MarkowitzCol[Col] * Matrix->MarkowitzRow[Col]; if ((Matrix->MarkowitzRow[Col] != 0) && (Matrix->MarkowitzCol[Col] == 1)) Matrix->Singletons--; return pElement; } /* * ZERO PIVOT ENCOUNTERED * * This routine is called when a singular matrix is found. It then * records the current row and column and exits. * * >>> Returned: * The error code spSINGULAR or spZERO_DIAG is returned. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to matrix. * Step (int) * Index of diagonal that is zero. */ static int MatrixIsSingular( MatrixPtr Matrix, int Step ) { /* Begin `MatrixIsSingular'. */ Matrix->SingularRow = Matrix->IntToExtRowMap[ Step ]; Matrix->SingularCol = Matrix->IntToExtColMap[ Step ]; return (Matrix->Error = spSINGULAR); } static int ZeroPivot( MatrixPtr Matrix, int Step ) { /* Begin `ZeroPivot'. */ Matrix->SingularRow = Matrix->IntToExtRowMap[ Step ]; Matrix->SingularCol = Matrix->IntToExtColMap[ Step ]; return (Matrix->Error = spZERO_DIAG); } #if (ANNOTATE == FULL) /* * * WRITE STATUS * * Write a summary of important variables to standard output. */ static void WriteStatus( MatrixPtr Matrix, int Step ) { int I; /* Begin `WriteStatus'. */ printf("Step = %1d ", Step); printf("Pivot found at %1d,%1d using ", Matrix->PivotsOriginalRow, Matrix->PivotsOriginalCol); switch(Matrix->PivotSelectionMethod) { case 's': printf("SearchForSingleton\n"); break; case 'q': printf("QuicklySearchDiagonal\n"); break; case 'd': printf("SearchDiagonal\n"); break; case 'e': printf("SearchEntireMatrix\n"); break; } printf("MarkowitzRow = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzRow[I]); printf("\n"); printf("MarkowitzCol = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzCol[I]); printf("\n"); printf("MarkowitzProduct = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->MarkowitzProd[I]); printf("\n"); printf("Singletons = %2d\n", Matrix->Singletons); printf("IntToExtRowMap = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->IntToExtRowMap[I]); printf("\n"); printf("IntToExtColMap = "); for (I = 1; I <= Matrix->Size; I++) printf("%2d ", Matrix->IntToExtColMap[I]); printf("\n"); printf("ExtToIntRowMap = "); for (I = 1; I <= Matrix->ExtSize; I++) printf("%2d ", Matrix->ExtToIntRowMap[I]); printf("\n"); printf("ExtToIntColMap = "); for (I = 1; I <= Matrix->ExtSize; I++) printf("%2d ", Matrix->ExtToIntColMap[I]); printf("\n\n"); return; } #endif /* ANNOTATE == FULL */ ngspice-26/src/maths/sparse/spsmp.c0000644000265600020320000002644612264261473016753 0ustar andreasadmin/* * Spice3 COMPATIBILITY MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This module contains routines that make Sparse1.3 a direct * replacement for the SMP sparse matrix package in Spice3c1 or Spice3d1. * Sparse1.3 is in general a faster and more robust package than SMP. * These advantages become significant on large circuits. * * >>> User accessible functions contained in this file: * SMPaddElt * SMPmakeElt * SMPcClear * SMPclear * SMPcLUfac * SMPluFac * SMPcReorder * SMPreorder * SMPcaSolve * SMPcSolve * SMPsolve * SMPmatSize * SMPnewMatrix * SMPdestroy * SMPpreOrder * SMPprint * SMPgetError * SMPcProdDiag * LoadGmin * SMPfindElt */ /* * To replace SMP with Sparse, rename the file spSpice3.h to * spMatrix.h and place Sparse in a subdirectory of SPICE called * `sparse'. Then on UNIX compile Sparse by executing `make spice'. * If not on UNIX, after compiling Sparse and creating the sparse.a * archive, compile this file (spSMP.c) and spSMP.o to the archive, * then copy sparse.a into the SPICE main directory and rename it * SMP.a. Finally link SPICE. * * To be compatible with SPICE, the following Sparse compiler options * (in spConfig.h) should be set as shown below: * * EXPANDABLE YES * TRANSLATE NO * INITIALIZE NO or YES, YES for use with test prog. * DIAGONAL_PIVOTING YES * MODIFIED_MARKOWITZ NO * DELETE NO * STRIP NO * MODIFIED_NODAL YES * QUAD_ELEMENT NO * TRANSPOSE YES * SCALING NO * DOCUMENTATION YES * MULTIPLICATION NO * DETERMINANT YES * STABILITY NO * CONDITION NO * PSEUDOCONDITION NO * DEBUG YES * * spREAL double */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and supporting * documentation and that the authors and the University of California * are properly credited. The authors and the University of California * make no representations as to the suitability of this software for * any purpose. It is provided `as is', without express or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spMatrix.h * Sparse macros and declarations. * SMPdefs.h * Spice3's matrix macro definitions. */ #include "ngspice/config.h" #include #include #include #include "ngspice/spmatrix.h" #include "spdefs.h" #include "ngspice/smpdefs.h" #if defined (_MSC_VER) extern double scalbn(double, int); #define logb _logb extern double logb(double); #endif static void LoadGmin(SMPmatrix *Matrix, double Gmin); /* * SMPaddElt() */ int SMPaddElt(SMPmatrix *Matrix, int Row, int Col, double Value) { *spGetElement( Matrix, Row, Col ) = Value; return spError( Matrix ); } /* * SMPmakeElt() */ double * SMPmakeElt(SMPmatrix *Matrix, int Row, int Col) { return spGetElement( Matrix, Row, Col ); } /* * SMPcClear() */ void SMPcClear(SMPmatrix *Matrix) { spClear( Matrix ); } /* * SMPclear() */ void SMPclear(SMPmatrix *Matrix) { spClear( Matrix ); } #define NG_IGNORE(x) (void)x /* * SMPcLUfac() */ /*ARGSUSED*/ int SMPcLUfac(SMPmatrix *Matrix, double PivTol) { NG_IGNORE(PivTol); spSetComplex( Matrix ); return spFactor( Matrix ); } /* * SMPluFac() */ /*ARGSUSED*/ int SMPluFac(SMPmatrix *Matrix, double PivTol, double Gmin) { NG_IGNORE(PivTol); spSetReal( Matrix ); LoadGmin( Matrix, Gmin ); return spFactor( Matrix ); } /* * SMPcReorder() */ int SMPcReorder(SMPmatrix *Matrix, double PivTol, double PivRel, int *NumSwaps) { *NumSwaps = 1; spSetComplex( Matrix ); return spOrderAndFactor( Matrix, NULL, PivRel, PivTol, YES ); } /* * SMPreorder() */ int SMPreorder(SMPmatrix *Matrix, double PivTol, double PivRel, double Gmin) { spSetReal( Matrix ); LoadGmin( Matrix, Gmin ); return spOrderAndFactor( Matrix, NULL, PivRel, PivTol, YES ); } /* * SMPcaSolve() */ void SMPcaSolve(SMPmatrix *Matrix, double RHS[], double iRHS[], double Spare[], double iSpare[]) { NG_IGNORE(iSpare); NG_IGNORE(Spare); spSolveTransposed( Matrix, RHS, RHS, iRHS, iRHS ); } /* * SMPcSolve() */ void SMPcSolve(SMPmatrix *Matrix, double RHS[], double iRHS[], double Spare[], double iSpare[]) { NG_IGNORE(iSpare); NG_IGNORE(Spare); spSolve( Matrix, RHS, RHS, iRHS, iRHS ); } /* * SMPsolve() */ void SMPsolve(SMPmatrix *Matrix, double RHS[], double Spare[]) { NG_IGNORE(Spare); spSolve( Matrix, RHS, RHS, NULL, NULL ); } /* * SMPmatSize() */ int SMPmatSize(SMPmatrix *Matrix) { return spGetSize( Matrix, 1 ); } /* * SMPnewMatrix() */ int SMPnewMatrix(SMPmatrix **pMatrix) { int Error; *pMatrix = spCreate( 0, 1, &Error ); return Error; } /* * SMPdestroy() */ void SMPdestroy(SMPmatrix *Matrix) { spDestroy( Matrix ); } /* * SMPpreOrder() */ int SMPpreOrder(SMPmatrix *Matrix) { spMNA_Preorder( Matrix ); return spError( Matrix ); } /* * SMPprint() */ void SMPprintRHS(SMPmatrix *Matrix, char *Filename, RealVector RHS, RealVector iRHS) { spFileVector( Matrix, Filename, RHS, iRHS ); } /* * SMPprint() */ void SMPprint(SMPmatrix *Matrix, char *Filename) { if (Filename) spFileMatrix(Matrix, Filename, "Circuit Matrix", 0, 1, 1 ); else spPrint( Matrix, 0, 1, 1 ); } /* * SMPgetError() */ void SMPgetError(SMPmatrix *Matrix, int *Col, int *Row) { spWhereSingular( Matrix, Row, Col ); } /* * SMPcProdDiag() * note: obsolete for Spice3d2 and later */ int SMPcProdDiag(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent) { spDeterminant( Matrix, pExponent, &(pMantissa->real), &(pMantissa->imag) ); return spError( Matrix ); } /* * SMPcDProd() */ int SMPcDProd(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent) { double re, im, x, y, z; int p; spDeterminant( Matrix, &p, &re, &im); #ifndef M_LN2 #define M_LN2 0.69314718055994530942 #endif #ifndef M_LN10 #define M_LN10 2.30258509299404568402 #endif #ifdef debug_print printf("Determinant 10: (%20g,%20g)^%d\n", re, im, p); #endif /* Convert base 10 numbers to base 2 numbers, for comparison */ y = p * M_LN10 / M_LN2; x = (int) y; y -= x; /* ASSERT * x = integral part of exponent, y = fraction part of exponent */ /* Fold in the fractional part */ #ifdef debug_print printf(" ** base10 -> base2 int = %g, frac = %20g\n", x, y); #endif z = pow(2.0, y); re *= z; im *= z; #ifdef debug_print printf(" ** multiplier = %20g\n", z); #endif /* Re-normalize (re or im may be > 2.0 or both < 1.0 */ if (re != 0.0) { y = logb(re); if (im != 0.0) z = logb(im); else z = 0; } else if (im != 0.0) { z = logb(im); y = 0; } else { /* Singular */ /*printf("10 -> singular\n");*/ y = 0; z = 0; } #ifdef debug_print printf(" ** renormalize changes = %g,%g\n", y, z); #endif if (y < z) y = z; *pExponent = (int)(x + y); x = scalbn(re, (int) -y); z = scalbn(im, (int) -y); #ifdef debug_print printf(" ** values are: re %g, im %g, y %g, re' %g, im' %g\n", re, im, y, x, z); #endif pMantissa->real = scalbn(re, (int) -y); pMantissa->imag = scalbn(im, (int) -y); #ifdef debug_print printf("Determinant 10->2: (%20g,%20g)^%d\n", pMantissa->real, pMantissa->imag, *pExponent); #endif return spError( Matrix ); } /* * The following routines need internal knowledge of the Sparse data * structures. */ /* * LOAD GMIN * * This routine adds Gmin to each diagonal element. Because Gmin is * added to the current diagonal, which may bear little relation to * what the outside world thinks is a diagonal, and because the * elements that are diagonals may change after calling spOrderAndFactor, * use of this routine is not recommended. It is included here simply * for compatibility with Spice3. */ static void LoadGmin(SMPmatrix *Matrix, double Gmin) { int I; ArrayOfElementPtrs Diag; ElementPtr diag; /* Begin `LoadGmin'. */ assert( IS_SPARSE( Matrix ) ); if (Gmin != 0.0) { Diag = Matrix->Diag; for (I = Matrix->Size; I > 0; I--) { if ((diag = Diag[I]) != NULL) diag->Real += Gmin; } } return; } /* * FIND ELEMENT * * This routine finds an element in the matrix by row and column number. * If the element exists, a pointer to it is returned. If not, then NULL * is returned unless the CreateIfMissing flag is TRUE, in which case a * pointer to the new element is returned. */ SMPelement * SMPfindElt(SMPmatrix *Matrix, int Row, int Col, int CreateIfMissing) { ElementPtr Element; /* Begin `SMPfindElt'. */ assert( IS_SPARSE( Matrix ) ); Row = Matrix->ExtToIntRowMap[Row]; Col = Matrix->ExtToIntColMap[Col]; Element = Matrix->FirstInCol[Col]; Element = spcFindElementInCol(Matrix, &Element, Row, Col, CreateIfMissing); return Element; } /* XXX The following should probably be implemented in spUtils */ /* * SMPcZeroCol() */ int SMPcZeroCol(SMPmatrix *Matrix, int Col) { ElementPtr Element; Col = Matrix->ExtToIntColMap[Col]; for (Element = Matrix->FirstInCol[Col]; Element != NULL; Element = Element->NextInCol) { Element->Real = 0.0; Element->Imag = 0.0; } return spError( Matrix ); } /* * SMPcAddCol() */ int SMPcAddCol(SMPmatrix *Matrix, int Accum_Col, int Addend_Col) { ElementPtr Accum, Addend, *Prev; Accum_Col = Matrix->ExtToIntColMap[Accum_Col]; Addend_Col = Matrix->ExtToIntColMap[Addend_Col]; Addend = Matrix->FirstInCol[Addend_Col]; Prev = &Matrix->FirstInCol[Accum_Col]; Accum = *Prev; while (Addend != NULL) { while (Accum && Accum->Row < Addend->Row) { Prev = &Accum->NextInCol; Accum = *Prev; } if (!Accum || Accum->Row > Addend->Row) { Accum = spcCreateElement(Matrix, Addend->Row, Accum_Col, Prev, 0); } Accum->Real += Addend->Real; Accum->Imag += Addend->Imag; Addend = Addend->NextInCol; } return spError( Matrix ); } /* * SMPzeroRow() */ int SMPzeroRow(SMPmatrix *Matrix, int Row) { ElementPtr Element; Row = Matrix->ExtToIntColMap[Row]; if (Matrix->RowsLinked == NO) spcLinkRows(Matrix); if (Matrix->PreviousMatrixWasComplex || Matrix->Complex) { for (Element = Matrix->FirstInRow[Row]; Element != NULL; Element = Element->NextInRow) { Element->Real = 0.0; Element->Imag = 0.0; } } else { for (Element = Matrix->FirstInRow[Row]; Element != NULL; Element = Element->NextInRow) { Element->Real = 0.0; } } return spError( Matrix ); } ngspice-26/src/maths/sparse/spsolve.c0000644000265600020320000004650712264261473017304 0ustar andreasadmin/* * MATRIX SOLVE MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the forward and backward substitution routines for * the sparse matrix routines. * * >>> User accessible functions contained in this file: * spSolve * spSolveTransposed * * >>> Other functions contained in this file: * SolveComplexMatrix * SolveComplexTransposedMatrix */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" /* * Function declarations */ static void SolveComplexMatrix( MatrixPtr, RealVector, RealVector, RealVector, RealVector ); static void SolveComplexTransposedMatrix( MatrixPtr, RealVector, RealVector, RealVector, RealVector ); /* * SOLVE MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and factored matrix. This * routine assumes that the pivots are associated with the lower * triangular (L) matrix and that the diagonal of the upper triangular * (U) matrix consists of ones. This routine arranges the computation * in different way than is traditionally used in order to exploit the * sparsity of the right-hand side. See the reference in spRevision. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand side. This data is * undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the output data array. This routine is constructed such that * RHS and Solution can be the same array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. * * >>> Local variables: * Intermediate (RealVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c Local version of * Matrix->Intermediate, which was created during the initial * factorization in function spcCreateInternalVectors() in the matrix * factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (RealNumber) * Temporary storage for entries in arrays. */ /*VARARGS3*/ void spSolve(MatrixPtr Matrix, RealVector RHS, RealVector Solution, RealVector iRHS, RealVector iSolution) { ElementPtr pElement; RealVector Intermediate; RealNumber Temp; int I, *pExtOrder, Size; ElementPtr pPivot; /* Begin `spSolve'. */ assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) ); if (Matrix->Complex) { SolveComplexMatrix( Matrix, RHS, Solution, iRHS, iSolution ); return; } Intermediate = Matrix->Intermediate; Size = Matrix->Size; /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) Intermediate[I] = RHS[*(pExtOrder--)]; /* Forward elimination. Solves Lc = b.*/ for (I = 1; I <= Size; I++) { /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp = Intermediate[I]) != 0.0) { pPivot = Matrix->Diag[I]; Intermediate[I] = (Temp *= pPivot->Real); pElement = pPivot->NextInCol; while (pElement != NULL) { Intermediate[pElement->Row] -= Temp * pElement->Real; pElement = pElement->NextInCol; } } } /* Backward Substitution. Solves Ux = c.*/ for (I = Size; I > 0; I--) { Temp = Intermediate[I]; pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { Temp -= pElement->Real * Intermediate[pElement->Col]; pElement = pElement->NextInRow; } Intermediate[I] = Temp; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) Solution[*(pExtOrder--)] = Intermediate[I]; return; } /* * SOLVE COMPLEX MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and factored matrix. This * routine assumes that the pivots are associated with the lower * triangular (L) matrix and that the diagonal of the upper triangular * (U) matrix consists of ones. This routine arranges the computation * in different way than is traditionally used in order to exploit the * sparsity of the right-hand side. See the reference in spRevision. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the real portion of the input data array, the right hand * side. This data is undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the real portion of the output data array. This routine * is constructed such that RHS and Solution can be the same * array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * If spSEPARATED_COMPLEX_VECTOR is set FALSE, there is no need to * supply this array. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. If spSEPARATED_COMPLEX_VECTOR is set FALSE, there is no * need to supply this array. * * >>> Local variables: * Intermediate (ComplexVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. * Local version of Matrix->Intermediate, which was created during * the initial factorization in function spcCreateInternalVectors() in the * matrix factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (ComplexNumber) * Temporary storage for entries in arrays. */ static void SolveComplexMatrix( MatrixPtr Matrix, RealVector RHS, RealVector Solution , RealVector iRHS, RealVector iSolution ) { ElementPtr pElement; ComplexVector Intermediate; int I, *pExtOrder, Size; ElementPtr pPivot; ComplexNumber Temp; /* Begin `SolveComplexMatrix'. */ Size = Matrix->Size; Intermediate = (ComplexVector)Matrix->Intermediate; /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) { Intermediate[I].Real = RHS[*(pExtOrder)]; Intermediate[I].Imag = iRHS[*(pExtOrder--)]; } /* Forward substitution. Solves Lc = b.*/ for (I = 1; I <= Size; I++) { Temp = Intermediate[I]; /* This step of the substitution is skipped if Temp equals zero. */ if ((Temp.Real != 0.0) || (Temp.Imag != 0.0)) { pPivot = Matrix->Diag[I]; /* Cmplx expr: Temp *= (1.0 / Pivot). */ CMPLX_MULT_ASSIGN(Temp, *pPivot); Intermediate[I] = Temp; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: Intermediate[Element->Row] -= Temp * *Element. */ CMPLX_MULT_SUBT_ASSIGN(Intermediate[pElement->Row], Temp, *pElement); pElement = pElement->NextInCol; } } } /* Backward Substitution. Solves Ux = c.*/ for (I = Size; I > 0; I--) { Temp = Intermediate[I]; pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: Temp -= *Element * Intermediate[Element->Col]. */ CMPLX_MULT_SUBT_ASSIGN(Temp, *pElement,Intermediate[pElement->Col]); pElement = pElement->NextInRow; } Intermediate[I] = Temp; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) { Solution[*(pExtOrder)] = Intermediate[I].Real; iSolution[*(pExtOrder--)] = Intermediate[I].Imag; } return; } #if TRANSPOSE /* * SOLVE TRANSPOSED MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and transposed factored * matrix. This routine is useful when performing sensitivity analysis * on a circuit using the adjoint method. This routine assumes that * the pivots are associated with the untransposed lower triangular * (L) matrix and that the diagonal of the untransposed upper * triangular (U) matrix consists of ones. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand side. This data is * undisturbed and may be reused for other solves. * Solution (RealVector) * Solution is the output data array. This routine is constructed such that * RHS and Solution can be the same array. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * If spSEPARATED_COMPLEX_VECTOR is set FALSE, or if matrix is real, there * is no need to supply this array. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. If spSEPARATED_COMPLEX_VECTOR is set FALSE, or if * matrix is real, there is no need to supply this array. * * >>> Local variables: * Intermediate (RealVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. Local version of * Matrix->Intermediate, which was created during the initial * factorization in function spcCreateInternalVectors() in the matrix * factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtRowMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (RealNumber) * Temporary storage for entries in arrays. */ /*VARARGS3*/ void spSolveTransposed(MatrixPtr Matrix, RealVector RHS, RealVector Solution, RealVector iRHS, RealVector iSolution) { ElementPtr pElement; RealVector Intermediate; int I, *pExtOrder, Size; ElementPtr pPivot; RealNumber Temp; /* Begin `spSolveTransposed'. */ assert( IS_VALID(Matrix) && IS_FACTORED(Matrix) ); if (Matrix->Complex) { SolveComplexTransposedMatrix( Matrix, RHS, Solution , iRHS, iSolution ); return; } Size = Matrix->Size; Intermediate = Matrix->Intermediate; /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) Intermediate[I] = RHS[*(pExtOrder--)]; /* Forward elimination. */ for (I = 1; I <= Size; I++) { /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp = Intermediate[I]) != 0.0) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { Intermediate[pElement->Col] -= Temp * pElement->Real; pElement = pElement->NextInRow; } } } /* Backward Substitution. */ for (I = Size; I > 0; I--) { pPivot = Matrix->Diag[I]; Temp = Intermediate[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { Temp -= pElement->Real * Intermediate[pElement->Row]; pElement = pElement->NextInCol; } Intermediate[I] = Temp * pPivot->Real; } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) Solution[*(pExtOrder--)] = Intermediate[I]; return; } #endif /* TRANSPOSE */ #if TRANSPOSE /* * SOLVE COMPLEX TRANSPOSED MATRIX EQUATION * * Performs forward elimination and back substitution to find the * unknown vector from the RHS vector and transposed factored * matrix. This routine is useful when performing sensitivity analysis * on a circuit using the adjoint method. This routine assumes that * the pivots are associated with the untransposed lower triangular * (L) matrix and that the diagonal of the untransposed upper * triangular (U) matrix consists of ones. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * RHS (RealVector) * RHS is the input data array, the right hand * side. This data is undisturbed and may be reused for other solves. * This vector is only the real portion if the matrix is complex. * Solution (RealVector) * Solution is the real portion of the output data array. This routine * is constructed such that RHS and Solution can be the same array. * This vector is only the real portion if the matrix is complex. * iRHS (RealVector) * iRHS is the imaginary portion of the input data array, the right * hand side. This data is undisturbed and may be reused for other solves. * iSolution (RealVector) * iSolution is the imaginary portion of the output data array. This * routine is constructed such that iRHS and iSolution can be * the same array. * * >>> Local variables: * Intermediate (ComplexVector) * Temporary storage for use in forward elimination and backward * substitution. Commonly referred to as c, when the LU factorization * equations are given as Ax = b, Lc = b, Ux = c. Local version of * Matrix->Intermediate, which was created during * the initial factorization in function spcCreateInternalVectors() in the * matrix factorization module. * pElement (ElementPtr) * Pointer used to address elements in both the lower and upper triangle * matrices. * pExtOrder (int *) * Pointer used to sequentially access each entry in IntToExtRowMap * and IntToExtColMap arrays. Used to quickly scramble and unscramble * RHS and Solution to account for row and column interchanges. * pPivot (ElementPtr) * Pointer that points to current pivot or diagonal element. * Size (int) * Size of matrix. Made local to reduce indirection. * Temp (ComplexNumber) * Temporary storage for entries in arrays. */ static void SolveComplexTransposedMatrix(MatrixPtr Matrix, RealVector RHS, RealVector Solution , RealVector iRHS, RealVector iSolution ) { ElementPtr pElement; ComplexVector Intermediate; int I, *pExtOrder, Size; ElementPtr pPivot; ComplexNumber Temp; /* Begin `SolveComplexTransposedMatrix'. */ Size = Matrix->Size; Intermediate = (ComplexVector)Matrix->Intermediate; /* Initialize Intermediate vector. */ pExtOrder = &Matrix->IntToExtColMap[Size]; for (I = Size; I > 0; I--) { Intermediate[I].Real = RHS[*(pExtOrder)]; Intermediate[I].Imag = iRHS[*(pExtOrder--)]; } /* Forward elimination. */ for (I = 1; I <= Size; I++) { Temp = Intermediate[I]; /* This step of the elimination is skipped if Temp equals zero. */ if ((Temp.Real != 0.0) || (Temp.Imag != 0.0)) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: Intermediate[Element->Col] -= Temp * *Element. */ CMPLX_MULT_SUBT_ASSIGN( Intermediate[pElement->Col], Temp, *pElement); pElement = pElement->NextInRow; } } } /* Backward Substitution. */ for (I = Size; I > 0; I--) { pPivot = Matrix->Diag[I]; Temp = Intermediate[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: Temp -= Intermediate[Element->Row] * *Element. */ CMPLX_MULT_SUBT_ASSIGN(Temp,Intermediate[pElement->Row],*pElement); pElement = pElement->NextInCol; } /* Cmplx expr: Intermediate = Temp * (1.0 / *pPivot). */ CMPLX_MULT(Intermediate[I], Temp, *pPivot); } /* Unscramble Intermediate vector while placing data in to Solution vector. */ pExtOrder = &Matrix->IntToExtRowMap[Size]; for (I = Size; I > 0; I--) { Solution[*(pExtOrder)] = Intermediate[I].Real; iSolution[*(pExtOrder--)] = Intermediate[I].Imag; } return; } #endif /* TRANSPOSE */ ngspice-26/src/maths/sparse/Makefile.am0000644000265600020320000000055612264261473017473 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libsparse.la libsparse_la_SOURCES = \ spalloc.c \ spbuild.c \ spconfig.h \ spdefs.h \ spextra.c \ spfactor.c \ spoutput.c \ spsmp.c \ spsolve.c \ sputils.c AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/maths/sparse/Makefile.in0000644000265600020320000004110112264261535017472 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/maths/sparse DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libsparse_la_LIBADD = am_libsparse_la_OBJECTS = spalloc.lo spbuild.lo spextra.lo spfactor.lo \ spoutput.lo spsmp.lo spsolve.lo sputils.lo libsparse_la_OBJECTS = $(am_libsparse_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libsparse_la_SOURCES) DIST_SOURCES = $(libsparse_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libsparse.la libsparse_la_SOURCES = \ spalloc.c \ spbuild.c \ spconfig.h \ spdefs.h \ spextra.c \ spfactor.c \ spoutput.c \ spsmp.c \ spsolve.c \ sputils.c AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/maths/sparse/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/maths/sparse/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libsparse.la: $(libsparse_la_OBJECTS) $(libsparse_la_DEPENDENCIES) $(EXTRA_libsparse_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libsparse_la_OBJECTS) $(libsparse_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spalloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spbuild.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spextra.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spfactor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spoutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spsmp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spsolve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sputils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/maths/sparse/spextra.c0000644000265600020320000000152212264261473017263 0ustar andreasadmin/* * MATRIX UTILITY MODULE * * This file contains new routines for Spice3f * * >>> User accessible functions contained in this file: * spConstMul * * >>> Other functions contained in this file: */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" void spConstMult(MatrixPtr matrix, double constant) { ElementPtr e; int i; int size = matrix->Size; for (i = 1; i <= size; i++) { for (e = matrix->FirstInCol[i]; e; e = e->NextInCol) { e->Real *= constant; e->Imag *= constant; } } } ngspice-26/src/maths/sparse/spoutput.c0000644000265600020320000005343712264261473017514 0ustar andreasadmin/* * MATRIX OUTPUT MODULE * * Author: Advisor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains the output-to-file and output-to-screen routines for * the matrix package. * * >>> User accessible functions contained in this file: * spPrint * spFileMatrix * spFileVector * spFileStats * * >>> Other functions contained in this file: */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" int Printer_Width = PRINTER_WIDTH; #include "ngspice/config.h" #ifdef HAS_WINGUI #include "ngspice/wstdio.h" #endif #if DOCUMENTATION /* * PRINT MATRIX * * Formats and send the matrix to standard output. Some elementary * statistics are also output. The matrix is output in a format that is * readable by people. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * PrintReordered (int) * Indicates whether the matrix should be printed out in its original * form, as input by the user, or whether it should be printed in its * reordered form, as used by the matrix routines. A zero indicates that * the matrix should be printed as inputed, a one indicates that it * should be printed reordered. * Data (int) * Boolean flag that when FALSE indicates that output should be * compressed such that only the existence of an element should be * indicated rather than giving the actual value. Thus 11 times as * many can be printed on a row. A zero signifies that the matrix * should be printed compressed. A one indicates that the matrix * should be printed in all its glory. * Header (int) * Flag indicating that extra information should be given, such as row * and column numbers. * * >>> Local variables: * Col (int) * Column being printed. * ElementCount (int) * Variable used to count the number of nonzero elements in the matrix. * LargestElement (RealNumber) * The magnitude of the largest element in the matrix. * LargestDiag (RealNumber) * The magnitude of the largest diagonal in the matrix. * Magnitude (RealNumber) * The absolute value of the matrix element being printed. * PrintOrdToIntColMap (int []) * A translation array that maps the order that columns will be * printed in (if not PrintReordered) to the internal column numbers. * PrintOrdToIntRowMap (int []) * A translation array that maps the order that rows will be * printed in (if not PrintReordered) to the internal row numbers. * pElement (ElementPtr) * Pointer to the element in the matrix that is to be printed. * pImagElements (ElementPtr [ ]) * Array of pointers to elements in the matrix. These pointers point * to the elements whose real values have just been printed. They are * used to quickly access those same elements so their imaginary values * can be printed. * Row (int) * Row being printed. * Size (int) * The size of the matrix. * SmallestDiag (RealNumber) * The magnitude of the smallest diagonal in the matrix. * SmallestElement (RealNumber) * The magnitude of the smallest element in the matrix excluding zero * elements. * StartCol (int) * The column number of the first column to be printed in the group of * columns currently being printed. * StopCol (int) * The column number of the last column to be printed in the group of * columns currently being printed. * Top (int) * The largest expected external row or column number. */ void spPrint(MatrixPtr Matrix, int PrintReordered, int Data, int Header) { int J = 0; int I, Row, Col, Size, Top; int StartCol = 1, StopCol, Columns, ElementCount = 0; double Magnitude; double SmallestDiag = 0; double SmallestElement = 0; double LargestElement = 0.0, LargestDiag = 0.0; ElementPtr pElement, *pImagElements; int *PrintOrdToIntRowMap, *PrintOrdToIntColMap; /* Begin `spPrint'. */ assert( IS_SPARSE( Matrix ) ); Size = Matrix->Size; SP_CALLOC(pImagElements, ElementPtr, Printer_Width / 10 + 1); if ( pImagElements == NULL) { Matrix->Error = spNO_MEMORY; SP_FREE(pImagElements); return; } /* Create a packed external to internal row and column translation array. */ # if TRANSLATE Top = Matrix->AllocatedExtSize; #else Top = Matrix->AllocatedSize; #endif SP_CALLOC( PrintOrdToIntRowMap, int, Top + 1 ); if ( PrintOrdToIntRowMap == NULL) { Matrix->Error = spNO_MEMORY; SP_FREE(pImagElements); return; } SP_CALLOC( PrintOrdToIntColMap, int, Top + 1 ); if (PrintOrdToIntColMap == NULL) { Matrix->Error = spNO_MEMORY; SP_FREE(pImagElements); SP_FREE(PrintOrdToIntRowMap); return; } for (I = 1; I <= Size; I++) { PrintOrdToIntRowMap[ Matrix->IntToExtRowMap[I] ] = I; PrintOrdToIntColMap[ Matrix->IntToExtColMap[I] ] = I; } /* Pack the arrays. */ for (J = 1, I = 1; I <= Top; I++) { if (PrintOrdToIntRowMap[I] != 0) PrintOrdToIntRowMap[ J++ ] = PrintOrdToIntRowMap[ I ]; } for (J = 1, I = 1; I <= Top; I++) { if (PrintOrdToIntColMap[I] != 0) PrintOrdToIntColMap[ J++ ] = PrintOrdToIntColMap[ I ]; } /* Print header. */ if (Header) { printf("MATRIX SUMMARY\n\n"); printf("Size of matrix = %1d x %1d.\n", Size, Size); if ( Matrix->Reordered && PrintReordered ) printf("Matrix has been reordered.\n"); putchar('\n'); if ( Matrix->Factored ) printf("Matrix after factorization:\n"); else printf("Matrix before factorization:\n"); SmallestElement = LARGEST_REAL; SmallestDiag = SmallestElement; } /* Determine how many columns to use. */ Columns = Printer_Width; if (Header) Columns -= 5; if (Data) Columns = (Columns+1) / 10; /* Print matrix by printing groups of complete columns until all * the columns are printed. */ J = 0; while ( J <= Size ) { /* Calculatestrchr of last column to printed in this group. */ StopCol = StartCol + Columns - 1; if (StopCol > Size) StopCol = Size; /* Label the columns. */ if (Header) { if (Data) { printf(" "); for (I = StartCol; I <= StopCol; I++) { if (PrintReordered) Col = I; else Col = PrintOrdToIntColMap[I]; printf(" %9d", Matrix->IntToExtColMap[ Col ]); } printf("\n\n"); } else { if (PrintReordered) printf("Columns %1d to %1d.\n",StartCol,StopCol); else { printf("Columns %1d to %1d.\n", Matrix->IntToExtColMap[ PrintOrdToIntColMap[StartCol] ], Matrix->IntToExtColMap[ PrintOrdToIntColMap[StopCol] ]); } } } /* Print every row ... */ for (I = 1; I <= Size; I++) { if (PrintReordered) Row = I; else Row = PrintOrdToIntRowMap[I]; if (Header) { if (PrintReordered && !Data) printf("%4d", I); else printf("%4d", Matrix->IntToExtRowMap[ Row ]); if (!Data) putchar(' '); } /* ... in each column of the group. */ for (J = StartCol; J <= StopCol; J++) { if (PrintReordered) Col = J; else Col = PrintOrdToIntColMap[J]; pElement = Matrix->FirstInCol[Col]; while(pElement != NULL && pElement->Row != Row) pElement = pElement->NextInCol; if (Data) pImagElements[J - StartCol] = pElement; if (pElement != NULL) { /* Case where element exists */ if (Data) printf(" %9.3g", pElement->Real); else putchar('x'); /* Update status variables */ if ( (Magnitude = ELEMENT_MAG(pElement)) > LargestElement ) LargestElement = Magnitude; if ((Magnitude < SmallestElement) && (Magnitude != 0.0)) SmallestElement = Magnitude; ElementCount++; } /* Case where element is structurally zero */ else { if (Data) printf(" ..."); else putchar('.'); } } putchar('\n'); if (Matrix->Complex && Data) { printf(" "); for (J = StartCol; J <= StopCol; J++) { if (pImagElements[J - StartCol] != NULL) { printf(" %8.2gj", pImagElements[J-StartCol]->Imag); } else printf(" "); } putchar('\n'); } } /* Calculatestrchr of first column in next group. */ StartCol = StopCol; StartCol++; putchar('\n'); } if (Header) { printf("\nLargest element in matrix = %-1.4g.\n", LargestElement); printf("Smallest element in matrix = %-1.4g.\n", SmallestElement); /* Search for largest and smallest diagonal values */ for (I = 1; I <= Size; I++) { if (Matrix->Diag[I] != NULL) { Magnitude = ELEMENT_MAG( Matrix->Diag[I] ); if ( Magnitude > LargestDiag ) LargestDiag = Magnitude; if ( Magnitude < SmallestDiag ) SmallestDiag = Magnitude; } } /* Print the largest and smallest diagonal values */ if ( Matrix->Factored ) { printf("\nLargest diagonal element = %-1.4g.\n", LargestDiag); printf("Smallest diagonal element = %-1.4g.\n", SmallestDiag); } else { printf("\nLargest pivot element = %-1.4g.\n", LargestDiag); printf("Smallest pivot element = %-1.4g.\n", SmallestDiag); } /* Calculate and print sparsity and number of fill-ins created. */ printf("\nDensity = %2.2f%%.\n", ((double)(ElementCount * 100)) / ((double)(Size * Size))); printf("Number of originals = %1d.\n", Matrix->Originals); if (!Matrix->NeedsOrdering) printf("Number of fill-ins = %1d.\n", Matrix->Fillins); } putchar('\n'); (void)fflush(stdout); SP_FREE(PrintOrdToIntColMap); SP_FREE(PrintOrdToIntRowMap); return; } /* * OUTPUT MATRIX TO FILE * * Writes matrix to file in format suitable to be read back in by the * matrix test program. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * Label (char *) * String that is transferred to file and is used as a label. * Reordered (int) * Specifies whether matrix should be output in reordered form, * or in original order. * Data (int) * Indicates that the element values should be output along with * the indices for each element. This parameter must be TRUE if * matrix is to be read by the sparse test program. * Header (int) * Indicates that header is desired. This parameter must be TRUE if * matrix is to be read by the sparse test program. * * >>> Local variables: * Col (int) * The original column number of the element being output. * pElement (ElementPtr) * Pointer to an element in the matrix. * pMatrixFile (FILE *) * File pointer to the matrix file. * Row (int) * The original row number of the element being output. * Size (int) * The size of the matrix. */ int spFileMatrix(MatrixPtr Matrix, char *File, char *Label, int Reordered, int Data, int Header) { int I, Size; ElementPtr pElement; int Row, Col, Err; FILE *pMatrixFile; /* Begin `spFileMatrix'. */ assert( IS_SPARSE( Matrix ) ); /* Open file matrix file in write mode. */ if ((pMatrixFile = fopen(File, "w")) == NULL) return 0; /* Output header. */ Size = Matrix->Size; if (Header) { if (Matrix->Factored && Data) { Err = fprintf(pMatrixFile, "Warning : The following matrix is " "factored in to LU form.\n"); if (Err < 0) return 0; } if (fprintf(pMatrixFile, "%s\n", Label) < 0) return 0; Err = fprintf( pMatrixFile, "%d\t%s\n", Size, (Matrix->Complex ? "complex" : "real")); if (Err < 0) return 0; } /* Output matrix. */ if (!Data) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { if (Reordered) { Row = pElement->Row; Col = I; } else { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; } pElement = pElement->NextInCol; if (fprintf(pMatrixFile, "%d\t%d\n", Row, Col) < 0) return 0; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile, "0\t0\n") < 0) return 0; } if (Data && Matrix->Complex) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { if (Reordered) { Row = pElement->Row; Col = I; } else { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; } Err = fprintf ( pMatrixFile,"%d\t%d\t%-.15g\t%-.15g\n", Row, Col, pElement->Real, pElement->Imag ); if (Err < 0) return 0; pElement = pElement->NextInCol; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile,"0\t0\t0.0\t0.0\n") < 0) return 0; } if (Data && !Matrix->Complex) { for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Row = Matrix->IntToExtRowMap[pElement->Row]; Col = Matrix->IntToExtColMap[I]; Err = fprintf ( pMatrixFile,"%d\t%d\t%-.15g\n", Row, Col, pElement->Real ); if (Err < 0) return 0; pElement = pElement->NextInCol; } } /* Output terminator, a line of zeros. */ if (Header) if (fprintf(pMatrixFile,"0\t0\t0.0\n") < 0) return 0; } /* Close file. */ if (fclose(pMatrixFile) < 0) return 0; return 1; } /* * OUTPUT SOURCE VECTOR TO FILE * * Writes vector to file in format suitable to be read back in by the * matrix test program. This routine should be executed after the function * spFileMatrix. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * RHS (RealNumber []) * Right-hand side vector, real portion * iRHS (RealNumber []) * Right-hand side vector, imaginary portion. * * >>> Local variables: * pMatrixFile (FILE *) * File pointer to the matrix file. * Size (int) * The size of the matrix. * */ int spFileVector(MatrixPtr Matrix, char *File, RealVector RHS, RealVector iRHS) { int I, Size, Err; FILE *pMatrixFile; /* Begin `spFileVector'. */ assert( IS_SPARSE( Matrix ) && RHS != NULL); if (File) { /* Open File in append mode. */ pMatrixFile = fopen(File,"a"); if (pMatrixFile == NULL) return 0; } else pMatrixFile=stdout; /* Output vector. */ Size = Matrix->Size; if (Matrix->Complex) { for (I = 1; I <= Size; I++) { Err = fprintf ( pMatrixFile, "%-.15g\t%-.15g\n", RHS[I], iRHS[I] ); if (Err < 0) return 0; } } else { for (I = 1; I <= Size; I++) { if (fprintf(pMatrixFile, "%-.15g\n", RHS[I]) < 0) return 0; } } /* Close file. */ if (File) if (fclose(pMatrixFile) < 0) return 0; return 1; } /* * OUTPUT STATISTICS TO FILE * * Writes useful information concerning the matrix to a file. Should be * executed after the matrix is factored. * * >>> Returns: * One is returned if routine was successful, otherwise zero is returned. * The calling function can query errno (the system global error variable) * as to the reason why this routine failed. * * >>> Arguments: * Matrix (char *) * Pointer to matrix. * File (char *) * Name of file into which matrix is to be written. * Label (char *) * String that is transferred to file and is used as a label. * * >>> Local variables: * Data (RealNumber) * The value of the matrix element being output. * LargestElement (RealNumber) * The largest element in the matrix. * NumberOfElements (int) * Number of nonzero elements in the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pStatsFile (FILE *) * File pointer to the statistics file. * Size (int) * The size of the matrix. * SmallestElement (RealNumber) * The smallest element in the matrix excluding zero elements. */ int spFileStats(MatrixPtr Matrix, char *File, char *Label) { int Size, I; ElementPtr pElement; int NumberOfElements; RealNumber Data, LargestElement, SmallestElement; FILE *pStatsFile; /* Begin `spFileStats'. */ assert( IS_SPARSE( Matrix ) ); /* Open File in append mode. */ if ((pStatsFile = fopen(File, "a")) == NULL) return 0; /* Output statistics. */ Size = Matrix->Size; if (!Matrix->Factored) fprintf(pStatsFile, "Matrix has not been factored.\n"); fprintf(pStatsFile, "||| Starting new matrix |||\n"); fprintf(pStatsFile, "%s\n", Label); if (Matrix->Complex) fprintf(pStatsFile, "Matrix is complex.\n"); else fprintf(pStatsFile, "Matrix is real.\n"); fprintf(pStatsFile," Size = %d\n",Size); /* Search matrix. */ NumberOfElements = 0; LargestElement = 0.0; SmallestElement = LARGEST_REAL; for (I = 1; I <= Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { NumberOfElements++; Data = ELEMENT_MAG(pElement); if (Data > LargestElement) LargestElement = Data; if (Data < SmallestElement && Data != 0.0) SmallestElement = Data; pElement = pElement->NextInCol; } } SmallestElement = MIN( SmallestElement, LargestElement ); /* Output remaining statistics. */ fprintf(pStatsFile, " Initial number of elements = %d\n", NumberOfElements - Matrix->Fillins); fprintf(pStatsFile, " Initial average number of elements per row = %f\n", (double)(NumberOfElements - Matrix->Fillins) / (double)Size); fprintf(pStatsFile, " Fill-ins = %d\n",Matrix->Fillins); fprintf(pStatsFile, " Average number of fill-ins per row = %f%%\n", (double)Matrix->Fillins / (double)Size); fprintf(pStatsFile, " Total number of elements = %d\n", NumberOfElements); fprintf(pStatsFile, " Average number of elements per row = %f\n", (double)NumberOfElements / (double)Size); fprintf(pStatsFile," Density = %f%%\n", (double)(100.0*NumberOfElements)/(double)(Size*Size)); fprintf(pStatsFile," Relative Threshold = %e\n", Matrix->RelThreshold); fprintf(pStatsFile," Absolute Threshold = %e\n", Matrix->AbsThreshold); fprintf(pStatsFile," Largest Element = %e\n", LargestElement); fprintf(pStatsFile," Smallest Element = %e\n\n\n", SmallestElement); /* Close file. */ (void)fclose(pStatsFile); return 1; } #endif /* DOCUMENTATION */ ngspice-26/src/maths/sparse/sputils.c0000644000265600020320000020125312264261473017303 0ustar andreasadmin/* * MATRIX UTILITY MODULE * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains various optional utility routines. * * >>> User accessible functions contained in this file: * spMNA_Preorder * spScale * spMultiply * spMultTransposed * spDeterminant * spStripFills * spDeleteRowAndCol * spPseudoCondition * spCondition * spNorm * spLargestElement * spRoundoff * spErrorMessage * * >>> Other functions contained in this file: * CountTwins * SwapCols * ScaleComplexMatrix * ComplexMatrixMultiply * ComplexCondition */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ /* * IMPORTS * * >>> Import descriptions: * spConfig.h * Macros that customize the sparse matrix routines. * spMatrix.h * Macros and declarations to be imported by the user. * spDefs.h * Matrix type and macro definitions for the sparse matrix routines. */ #include #include #define spINSIDE_SPARSE #include "spconfig.h" #include "ngspice/spmatrix.h" #include "spdefs.h" /* Function declarations */ static int CountTwins( MatrixPtr, int, ElementPtr*, ElementPtr* ); static void SwapCols( MatrixPtr, ElementPtr, ElementPtr ); static void ComplexMatrixMultiply( MatrixPtr, RealVector, RealVector, RealVector, RealVector ); static void ComplexTransposedMatrixMultiply( MatrixPtr, RealVector, RealVector, RealVector, RealVector); #if MODIFIED_NODAL /* * PREORDER MODIFIED NODE ADMITTANCE MATRIX TO REMOVE ZEROS FROM DIAGONAL * * This routine massages modified node admittance matrices to remove * zeros from the diagonal. It takes advantage of the fact that the * row and column associated with a zero diagonal usually have * structural ones placed symmetricly. This routine should be used * only on modified node admittance matrices and should be executed * after the matrix has been built but before the factorization * begins. It should be executed for the initial factorization only * and should be executed before the rows have been linked. Thus it * should be run before using spScale(), spMultiply(), * spDeleteRowAndCol(), or spNorm(). * * This routine exploits the fact that the structural ones are placed * in the matrix in symmetric twins. For example, the stamps for * grounded and a floating voltage sources are * grounded: floating: * [ x x 1 ] [ x x 1 ] * [ x x ] [ x x -1 ] * [ 1 ] [ 1 -1 ] * Notice for the grounded source, there is one set of twins, and for * the floating, there are two sets. We remove the zero from the diagonal * by swapping the rows associated with a set of twins. For example: * grounded: floating 1: floating 2: * [ 1 ] [ 1 -1 ] [ x x 1 ] * [ x x ] [ x x -1 ] [ 1 -1 ] * [ x x 1 ] [ x x 1 ] [ x x -1 ] * * It is important to deal with any zero diagonals that only have one * set of twins before dealing with those that have more than one because * swapping row destroys the symmetry of any twins in the rows being * swapped, which may limit future moves. Consider * [ x x 1 ] * [ x x -1 1 ] * [ 1 -1 ] * [ 1 ] * There is one set of twins for diagonal 4 and two for diagonal 3. * Dealing with diagonal 4 first requires swapping rows 2 and 4. * [ x x 1 ] * [ 1 ] * [ 1 -1 ] * [ x x -1 1 ] * We can now deal with diagonal 3 by swapping rows 1 and 3. * [ 1 -1 ] * [ 1 ] * [ x x 1 ] * [ x x -1 1 ] * And we are done, there are no zeros left on the diagonal. However, if * we originally dealt with diagonal 3 first, we could swap rows 2 and 3 * [ x x 1 ] * [ 1 -1 ] * [ x x -1 1 ] * [ 1 ] * Diagonal 4 no longer has a symmetric twin and we cannot continue. * * So we always take care of lone twins first. When none remain, we * choose arbitrarily a set of twins for a diagonal with more than one set * and swap the rows corresponding to that twin. We then deal with any * lone twins that were created and repeat the procedure until no * zero diagonals with symmetric twins remain. * * In this particular implementation, columns are swapped rather than rows. * The algorithm used in this function was developed by Ken Kundert and * Tom Quarles. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be preordered. * * >>> Local variables; * J (int) * Column with zero diagonal being currently considered. * pTwin1 (ElementPtr) * Pointer to the twin found in the column belonging to the zero diagonal. * pTwin2 (ElementPtr) * Pointer to the twin found in the row belonging to the zero diagonal. * belonging to the zero diagonal. * AnotherPassNeeded (int) * Flag indicating that at least one zero diagonal with symmetric twins * remain. * StartAt (int) * Column number of first zero diagonal with symmetric twins. * Swapped (int) * Flag indicating that columns were swapped on this pass. * Twins (int) * Number of symmetric twins corresponding to current zero diagonal. */ void spMNA_Preorder(MatrixPtr Matrix) { int J, Size; ElementPtr pTwin1, pTwin2; int Twins, StartAt = 1; int Swapped, AnotherPassNeeded; /* Begin `spMNA_Preorder'. */ assert( IS_VALID(Matrix) && !Matrix->Factored ); if (Matrix->RowsLinked) return; Size = Matrix->Size; Matrix->Reordered = YES; do { AnotherPassNeeded = Swapped = NO; /* Search for zero diagonals with lone twins. */ for (J = StartAt; J <= Size; J++) { if (Matrix->Diag[J] == NULL) { Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 ); if (Twins == 1) { /* Lone twins found, swap rows. */ SwapCols( Matrix, pTwin1, pTwin2 ); Swapped = YES; } else if ((Twins > 1) && !AnotherPassNeeded) { AnotherPassNeeded = YES; StartAt = J; } } } /* All lone twins are gone, look for zero diagonals with multiple twins. */ if (AnotherPassNeeded) { for (J = StartAt; !Swapped && (J <= Size); J++) { if (Matrix->Diag[J] == NULL) { Twins = CountTwins( Matrix, J, &pTwin1, &pTwin2 ); SwapCols( Matrix, pTwin1, pTwin2 ); Swapped = YES; } } } } while (AnotherPassNeeded); return; } /* * COUNT TWINS * * This function counts the number of symmetric twins associated with * a zero diagonal and returns one set of twins if any exist. The * count is terminated early at two. */ static int CountTwins( MatrixPtr Matrix, int Col, ElementPtr *ppTwin1, ElementPtr *ppTwin2 ) { int Row, Twins = 0; ElementPtr pTwin1, pTwin2; /* Begin `CountTwins'. */ pTwin1 = Matrix->FirstInCol[Col]; while (pTwin1 != NULL) { if (ABS(pTwin1->Real) == 1.0) { Row = pTwin1->Row; pTwin2 = Matrix->FirstInCol[Row]; while ((pTwin2 != NULL) && (pTwin2->Row != Col)) pTwin2 = pTwin2->NextInCol; if ((pTwin2 != NULL) && (ABS(pTwin2->Real) == 1.0)) { /* Found symmetric twins. */ if (++Twins >= 2) return Twins; (*ppTwin1 = pTwin1)->Col = Col; (*ppTwin2 = pTwin2)->Col = Row; } } pTwin1 = pTwin1->NextInCol; } return Twins; } /* * SWAP COLUMNS * * This function swaps two columns and is applicable before the rows are * linked. */ static void SwapCols( MatrixPtr Matrix, ElementPtr pTwin1, ElementPtr pTwin2 ) { int Col1 = pTwin1->Col, Col2 = pTwin2->Col; /* Begin `SwapCols'. */ SWAP (ElementPtr, Matrix->FirstInCol[Col1], Matrix->FirstInCol[Col2]); SWAP (int, Matrix->IntToExtColMap[Col1], Matrix->IntToExtColMap[Col2]); #if TRANSLATE Matrix->ExtToIntColMap[Matrix->IntToExtColMap[Col2]]=Col2; Matrix->ExtToIntColMap[Matrix->IntToExtColMap[Col1]]=Col1; #endif Matrix->Diag[Col1] = pTwin2; Matrix->Diag[Col2] = pTwin1; Matrix->NumberOfInterchangesIsOdd = !Matrix->NumberOfInterchangesIsOdd; return; } #endif /* MODIFIED_NODAL */ #if SCALING /* * SCALE MATRIX * * This function scales the matrix to enhance the possibility of * finding a good pivoting order. Note that scaling enhances accuracy * of the solution only if it affects the pivoting order, so it makes * no sense to scale the matrix before spFactor(). If scaling is * desired it should be done before spOrderAndFactor(). There * are several things to take into account when choosing the scale * factors. First, the scale factors are directly multiplied against * the elements in the matrix. To prevent roundoff, each scale factor * should be equal to an integer power of the number base of the * machine. Since most machines operate in base two, scale factors * should be a power of two. Second, the matrix should be scaled such * that the matrix of element uncertainties is equilibrated. Third, * this function multiplies the scale factors by the elements, so if * one row tends to have uncertainties 1000 times smaller than the * other rows, then its scale factor should be 1024, not 1/1024. * Fourth, to save time, this function does not scale rows or columns * if their scale factors are equal to one. Thus, the scale factors * should be normalized to the most common scale factor. Rows and * columns should be normalized separately. For example, if the size * of the matrix is 100 and 10 rows tend to have uncertainties near * 1e-6 and the remaining 90 have uncertainties near 1e-12, then the * scale factor for the 10 should be 1/1,048,576 and the scale factors * for the remaining 90 should be 1. Fifth, since this routine * directly operates on the matrix, it is necessary to apply the scale * factors to the RHS and Solution vectors. It may be easier to * simply use spOrderAndFactor() on a scaled matrix to choose the * pivoting order, and then throw away the matrix. Subsequent * factorizations, performed with spFactor(), will not need to have * the RHS and Solution vectors descaled. Lastly, this function * should not be executed before the function spMNA_Preorder. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be scaled. * SolutionScaleFactors (RealVector) * The array of Solution scale factors. These factors scale the columns. * All scale factors are real valued. * RHS_ScaleFactors (RealVector) * The array of RHS scale factors. These factors scale the rows. * All scale factors are real valued. * * >>> Local variables: * lSize (int) * Local version of the size of the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pExtOrder (int *) * Pointer into either IntToExtRowMap or IntToExtColMap vector. Used to * compensate for any row or column swaps that have been performed. * ScaleFactor (RealNumber) * The scale factor being used on the current row or column. */ void spScale(MatrixPtr Matrix, RealVector RHS_ScaleFactors, RealVector SolutionScaleFactors) { ElementPtr pElement; int I, lSize, *pExtOrder; RealNumber ScaleFactor; void ScaleComplexMatrix(); /* Begin `spScale'. */ assert( IS_VALID(Matrix) && !Matrix->Factored ); if (!Matrix->RowsLinked) spcLinkRows( Matrix ); if (Matrix->Complex) { ScaleComplexMatrix( Matrix, RHS_ScaleFactors, SolutionScaleFactors ); return; } lSize = Matrix->Size; /* Scale Rows */ pExtOrder = &Matrix->IntToExtRowMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = RHS_ScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInRow[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement = pElement->NextInRow; } } } /* Scale Columns */ pExtOrder = &Matrix->IntToExtColMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = SolutionScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement = pElement->NextInCol; } } } return; } #endif /* SCALING */ #if SCALING /* * SCALE COMPLEX MATRIX * * This function scales the matrix to enhance the possibility of * finding a good pivoting order. Note that scaling enhances accuracy * of the solution only if it affects the pivoting order, so it makes * no sense to scale the matrix before spFactor(). If scaling is * desired it should be done before spOrderAndFactor(). There * are several things to take into account when choosing the scale * factors. First, the scale factors are directly multiplied against * the elements in the matrix. To prevent roundoff, each scale factor * should be equal to an integer power of the number base of the * machine. Since most machines operate in base two, scale factors * should be a power of two. Second, the matrix should be scaled such * that the matrix of element uncertainties is equilibrated. Third, * this function multiplies the scale factors by the elements, so if * one row tends to have uncertainties 1000 times smaller than the * other rows, then its scale factor should be 1024, not 1/1024. * Fourth, to save time, this function does not scale rows or columns * if their scale factors are equal to one. Thus, the scale factors * should be normalized to the most common scale factor. Rows and * columns should be normalized separately. For example, if the size * of the matrix is 100 and 10 rows tend to have uncertainties near * 1e-6 and the remaining 90 have uncertainties near 1e-12, then the * scale factor for the 10 should be 1/1,048,576 and the scale factors * for the remaining 90 should be 1. Fifth, since this routine * directly operates on the matrix, it is necessary to apply the scale * factors to the RHS and Solution vectors. It may be easier to * simply use spOrderAndFactor() on a scaled matrix to choose the * pivoting order, and then throw away the matrix. Subsequent * factorizations, performed with spFactor(), will not need to have * the RHS and Solution vectors descaled. Lastly, this function * should not be executed before the function spMNA_Preorder. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be scaled. * SolutionScaleFactors (RealVector) * The array of Solution scale factors. These factors scale the columns. * All scale factors are real valued. * RHS_ScaleFactors (RealVector) * The array of RHS scale factors. These factors scale the rows. * All scale factors are real valued. * * >>> Local variables: * lSize (int) * Local version of the size of the matrix. * pElement (ElementPtr) * Pointer to an element in the matrix. * pExtOrder (int *) * Pointer into either IntToExtRowMap or IntToExtColMap vector. Used to * compensate for any row or column swaps that have been performed. * ScaleFactor (RealNumber) * The scale factor being used on the current row or column. */ static void ScaleComplexMatrix( Matrix, RHS_ScaleFactors, SolutionScaleFactors ) MatrixPtr Matrix; RealVector RHS_ScaleFactors, SolutionScaleFactors; { ElementPtr pElement; int I, lSize, *pExtOrder; RealNumber ScaleFactor; /* Begin `ScaleComplexMatrix'. */ lSize = Matrix->Size; /* Scale Rows */ pExtOrder = &Matrix->IntToExtRowMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = RHS_ScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInRow[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement->Imag *= ScaleFactor; pElement = pElement->NextInRow; } } } /* Scale Columns */ pExtOrder = &Matrix->IntToExtColMap[1]; for (I = 1; I <= lSize; I++) { if ((ScaleFactor = SolutionScaleFactors[*(pExtOrder++)]) != 1.0) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { pElement->Real *= ScaleFactor; pElement->Imag *= ScaleFactor; pElement = pElement->NextInCol; } } } return; } #endif /* SCALING */ #if MULTIPLICATION /* * MATRIX MULTIPLICATION * * Multiplies matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. It should not be used * before spMNA_Preorder(). * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. */ void spMultiply(MatrixPtr Matrix, RealVector RHS, RealVector Solution, RealVector iRHS, RealVector iSolution) { ElementPtr pElement; RealVector Vector; RealNumber Sum; int I, *pExtOrder; /* Begin `spMultiply'. */ assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); if (!Matrix->RowsLinked) spcLinkRows(Matrix); if (!Matrix->InternalVectorsAllocated) spcCreateInternalVectors( Matrix ); if (Matrix->Complex) { ComplexMatrixMultiply( Matrix, RHS, Solution , iRHS, iSolution ); return; } /* Initialize Intermediate vector with reordered Solution vector. */ Vector = Matrix->Intermediate; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) Vector[I] = Solution[*(pExtOrder--)]; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Sum = 0.0; while (pElement != NULL) { Sum += pElement->Real * Vector[pElement->Col]; pElement = pElement->NextInRow; } RHS[*pExtOrder--] = Sum; } return; } #endif /* MULTIPLICATION */ #if MULTIPLICATION /* * COMPLEX MATRIX MULTIPLICATION * * Multiplies matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. */ static void ComplexMatrixMultiply( MatrixPtr Matrix, RealVector RHS, RealVector Solution , RealVector iRHS, RealVector iSolution ) { ElementPtr pElement; ComplexVector Vector; ComplexNumber Sum; int I, *pExtOrder; /* Begin `ComplexMatrixMultiply'. */ /* Initialize Intermediate vector with reordered Solution vector. */ Vector = (ComplexVector)Matrix->Intermediate; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { Vector[I].Real = Solution[*pExtOrder]; Vector[I].Imag = iSolution[*(pExtOrder--)]; } pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Sum.Real = Sum.Imag = 0.0; while (pElement != NULL) { /* Cmplx expression : Sum += Element * Vector[Col] */ CMPLX_MULT_ADD_ASSIGN( Sum, *pElement, Vector[pElement->Col] ); pElement = pElement->NextInRow; } RHS[*pExtOrder] = Sum.Real; iRHS[*pExtOrder--] = Sum.Imag; } return; } #endif /* MULTIPLICATION */ #if MULTIPLICATION && TRANSPOSE /* * TRANSPOSED MATRIX MULTIPLICATION * * Multiplies transposed matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. It should not be used * before spMNA_Preorder(). * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. */ void spMultTransposed(MatrixPtr Matrix, RealVector RHS, RealVector Solution, RealVector iRHS, RealVector iSolution) { ElementPtr pElement; RealVector Vector; RealNumber Sum; int I, *pExtOrder; /* Begin `spMultTransposed'. */ assert( IS_SPARSE( Matrix ) && !Matrix->Factored ); if (!Matrix->InternalVectorsAllocated) spcCreateInternalVectors( Matrix ); if (Matrix->Complex) { ComplexTransposedMatrixMultiply( Matrix, RHS, Solution , iRHS, iSolution ); return; } /* Initialize Intermediate vector with reordered Solution vector. */ Vector = Matrix->Intermediate; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) Vector[I] = Solution[*(pExtOrder--)]; pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; Sum = 0.0; while (pElement != NULL) { Sum += pElement->Real * Vector[pElement->Row]; pElement = pElement->NextInCol; } RHS[*pExtOrder--] = Sum; } return; } #endif /* MULTIPLICATION && TRANSPOSE */ #if MULTIPLICATION && TRANSPOSE /* * COMPLEX TRANSPOSED MATRIX MULTIPLICATION * * Multiplies transposed matrix by solution vector to find source vector. * Assumes matrix has not been factored. This routine can be used * as a test to see if solutions are correct. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * RHS (RealVector) * RHS is the right hand side. This is what is being solved for. * Solution (RealVector) * Solution is the vector being multiplied by the matrix. * iRHS (RealVector) * iRHS is the imaginary portion of the right hand side. This is * what is being solved for. * iSolution (RealVector) * iSolution is the imaginary portion of the vector being multiplied * by the matrix. */ static void ComplexTransposedMatrixMultiply( MatrixPtr Matrix, RealVector RHS, RealVector Solution , RealVector iRHS, RealVector iSolution ) { ElementPtr pElement; ComplexVector Vector; ComplexNumber Sum; int I, *pExtOrder; /* Begin `ComplexMatrixMultiply'. */ /* Initialize Intermediate vector with reordered Solution vector. */ Vector = (ComplexVector)Matrix->Intermediate; pExtOrder = &Matrix->IntToExtRowMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { Vector[I].Real = Solution[*pExtOrder]; Vector[I].Imag = iSolution[*(pExtOrder--)]; } pExtOrder = &Matrix->IntToExtColMap[Matrix->Size]; for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInCol[I]; Sum.Real = Sum.Imag = 0.0; while (pElement != NULL) { /* Cmplx expression : Sum += Element * Vector[Row] */ CMPLX_MULT_ADD_ASSIGN( Sum, *pElement, Vector[pElement->Row] ); pElement = pElement->NextInCol; } RHS[*pExtOrder] = Sum.Real; iRHS[*pExtOrder--] = Sum.Imag; } return; } #endif /* MULTIPLICATION && TRANSPOSE */ #if DETERMINANT /* * CALCULATE DETERMINANT * * This routine in capable of calculating the determinant of the * matrix once the LU factorization has been performed. Hence, only * use this routine after spFactor() and before spClear(). * The determinant equals the product of all the diagonal elements of * the lower triangular matrix L, except that this product may need * negating. Whether the product or the negative product equals the * determinant is determined by the number of row and column * interchanges performed. Note that the determinants of matrices can * be very large or very small. On large matrices, the determinant * can be far larger or smaller than can be represented by a floating * point number. For this reason the determinant is scaled to a * reasonable value and the logarithm of the scale factor is returned. * * >>> Arguments: * Matrix (char *) * A pointer to the matrix for which the determinant is desired. * pExponent (int *) * The logarithm base 10 of the scale factor for the determinant. To find * the actual determinant, Exponent should be added to the exponent of * Determinant. * pDeterminant (RealNumber *) * The real portion of the determinant. This number is scaled to be * greater than or equal to 1.0 and less than 10.0. * piDeterminant (RealNumber *) * The imaginary portion of the determinant. When the matrix is real * this pointer need not be supplied, nothing will be returned. This * number is scaled to be greater than or equal to 1.0 and less than 10.0. * * >>> Local variables: * Norm (RealNumber) * L-infinity norm of a complex number. * Size (int) * Local storage for Matrix->Size. Placed in a for speed. * Temp (RealNumber) * Temporary storage for real portion of determinant. */ void spDeterminant(MatrixPtr Matrix, int *pExponent, RealNumber *pDeterminant, RealNumber *piDeterminant) { int I, Size; RealNumber Norm, nr, ni; ComplexNumber Pivot, cDeterminant; #define NORM(a) (nr = ABS((a).Real), ni = ABS((a).Imag), MAX (nr,ni)) /* Begin `spDeterminant'. */ assert( IS_SPARSE( Matrix ) && IS_FACTORED(Matrix) ); *pExponent = 0; if (Matrix->Error == spSINGULAR) { *pDeterminant = 0.0; if (Matrix->Complex) *piDeterminant = 0.0; return; } Size = Matrix->Size; I = 0; if (Matrix->Complex) /* Complex Case. */ { cDeterminant.Real = 1.0; cDeterminant.Imag = 0.0; while (++I <= Size) { CMPLX_RECIPROCAL( Pivot, *Matrix->Diag[I] ); CMPLX_MULT_ASSIGN( cDeterminant, Pivot ); /* Scale Determinant. */ Norm = NORM( cDeterminant ); if (Norm != 0.0) { while (Norm >= 1.0e12) { cDeterminant.Real *= 1.0e-12; cDeterminant.Imag *= 1.0e-12; *pExponent += 12; Norm = NORM( cDeterminant ); } while (Norm < 1.0e-12) { cDeterminant.Real *= 1.0e12; cDeterminant.Imag *= 1.0e12; *pExponent -= 12; Norm = NORM( cDeterminant ); } } } /* Scale Determinant again, this time to be between 1.0 <= x < 10.0. */ Norm = NORM( cDeterminant ); if (Norm != 0.0) { while (Norm >= 10.0) { cDeterminant.Real *= 0.1; cDeterminant.Imag *= 0.1; (*pExponent)++; Norm = NORM( cDeterminant ); } while (Norm < 1.0) { cDeterminant.Real *= 10.0; cDeterminant.Imag *= 10.0; (*pExponent)--; Norm = NORM( cDeterminant ); } } if (Matrix->NumberOfInterchangesIsOdd) CMPLX_NEGATE( cDeterminant ); *pDeterminant = cDeterminant.Real; *piDeterminant = cDeterminant.Imag; } else { /* Real Case. */ *pDeterminant = 1.0; while (++I <= Size) { *pDeterminant /= Matrix->Diag[I]->Real; /* Scale Determinant. */ if (*pDeterminant != 0.0) { while (ABS(*pDeterminant) >= 1.0e12) { *pDeterminant *= 1.0e-12; *pExponent += 12; } while (ABS(*pDeterminant) < 1.0e-12) { *pDeterminant *= 1.0e12; *pExponent -= 12; } } } /* Scale Determinant again, this time to be between 1.0 <= x < 10.0. */ if (*pDeterminant != 0.0) { while (ABS(*pDeterminant) >= 10.0) { *pDeterminant *= 0.1; (*pExponent)++; } while (ABS(*pDeterminant) < 1.0) { *pDeterminant *= 10.0; (*pExponent)--; } } if (Matrix->NumberOfInterchangesIsOdd) *pDeterminant = -*pDeterminant; } } #endif /* DETERMINANT */ #if STRIP /* * STRIP FILL-INS FROM MATRIX * * Strips the matrix of all fill-ins. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix to be stripped. * * >>> Local variables: * pElement (ElementPtr) * Pointer that is used to step through the matrix. * ppElement (ElementPtr *) * Pointer to the location of an ElementPtr. This location will be * updated if a fill-in is stripped from the matrix. * pFillin (ElementPtr) * Pointer used to step through the lists of fill-ins while marking them. * pLastFillin (ElementPtr) * A pointer to the last fill-in in the list. Used to terminate a loop. * pListNode (struct FillinListNodeStruct *) * A pointer to a node in the FillinList linked-list. */ void spStripFills(MatrixPtr Matrix) { struct FillinListNodeStruct *pListNode; /* Begin `spStripFills'. */ assert( IS_SPARSE( Matrix ) ); if (Matrix->Fillins == 0) return; Matrix->NeedsOrdering = YES; Matrix->Elements -= Matrix->Fillins; Matrix->Fillins = 0; /* Mark the fill-ins. */ { ElementPtr pFillin, pLastFillin; pListNode = Matrix->LastFillinListNode = Matrix->FirstFillinListNode; Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList; Matrix->NextAvailFillin = pListNode->pFillinList; while (pListNode != NULL) { pFillin = pListNode->pFillinList; pLastFillin = &(pFillin[ pListNode->NumberOfFillinsInList - 1 ]); while (pFillin <= pLastFillin) (pFillin++)->Row = 0; pListNode = pListNode->Next; } } /* Unlink fill-ins by searching for elements marked with Row = 0. */ { ElementPtr pElement, *ppElement; int I, Size = Matrix->Size; /* Unlink fill-ins in all columns. */ for (I = 1; I <= Size; I++) { ppElement = &(Matrix->FirstInCol[I]); while ((pElement = *ppElement) != NULL) { if (pElement->Row == 0) { *ppElement = pElement->NextInCol; /* Unlink fill-in. */ if (Matrix->Diag[pElement->Col] == pElement) Matrix->Diag[pElement->Col] = NULL; } else ppElement = &pElement->NextInCol; /* Skip element. */ } } /* Unlink fill-ins in all rows. */ for (I = 1; I <= Size; I++) { ppElement = &(Matrix->FirstInRow[I]); while ((pElement = *ppElement) != NULL) { if (pElement->Row == 0) *ppElement = pElement->NextInRow; /* Unlink fill-in. */ else ppElement = &pElement->NextInRow; /* Skip element. */ } } } return; } /* Same as above, but strips entire matrix without destroying the * frame. This assumes that the matrix will be replaced with one of * the same size. */ void spStripMatrix(MatrixPtr Matrix) { /* Begin `spStripMatrix'. */ assert( IS_SPARSE( Matrix ) ); if (Matrix->Elements == 0) return; Matrix->RowsLinked = NO; Matrix->NeedsOrdering = YES; Matrix->Elements = 0; Matrix->Originals = 0; Matrix->Fillins = 0; /* Reset the element lists. */ { struct ElementListNodeStruct *pListNode; pListNode = Matrix->LastElementListNode = Matrix->FirstElementListNode; Matrix->ElementsRemaining = pListNode->NumberOfElementsInList; Matrix->NextAvailElement = pListNode->pElementList; } /* Reset the fill-in lists. */ { struct FillinListNodeStruct *pListNode; pListNode = Matrix->LastFillinListNode = Matrix->FirstFillinListNode; Matrix->FillinsRemaining = pListNode->NumberOfFillinsInList; Matrix->NextAvailFillin = pListNode->pFillinList; } /* Reset the Row, Column and Diag pointers */ { int I, Size = Matrix->Size; for (I = 1; I <= Size; I++) { Matrix->FirstInRow[I] = NULL; Matrix->FirstInCol[I] = NULL; Matrix->Diag[I] = NULL; } } } #endif #if TRANSLATE && DELETE /* * DELETE A ROW AND COLUMN FROM THE MATRIX * * Deletes a row and a column from a matrix. * * Sparse will abort if an attempt is made to delete a row or column that * doesn't exist. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix in which the row and column are to be deleted. * Row (int) * Row to be deleted. * Col (int) * Column to be deleted. * * >>> Local variables: * ExtCol (int) * The external column that is being deleted. * ExtRow (int) * The external row that is being deleted. * pElement (ElementPtr) * Pointer to an element in the matrix. Used when scanning rows and * columns in order to eliminate elements from the last row or column. * ppElement (ElementPtr *) * Pointer to the location of an ElementPtr. This location will be * filled with a NULL pointer if it is the new last element in its row * or column. * pElement (ElementPtr) * Pointer to an element in the last row or column of the matrix. * Size (int) * The local version Matrix->Size, the size of the matrix. */ void spDeleteRowAndCol(MatrixPtr Matrix, int Row, int Col) { ElementPtr pElement, *ppElement, pLastElement; int Size, ExtRow, ExtCol; ElementPtr spcFindElementInCol(); /* Begin `spDeleteRowAndCol'. */ assert( IS_SPARSE(Matrix) && Row > 0 && Col > 0 ); assert( Row <= Matrix->ExtSize && Col <= Matrix->ExtSize ); Size = Matrix->Size; ExtRow = Row; ExtCol = Col; if (!Matrix->RowsLinked) spcLinkRows( Matrix ); Row = Matrix->ExtToIntRowMap[Row]; Col = Matrix->ExtToIntColMap[Col]; assert( Row > 0 && Col > 0 ); /* Move Row so that it is the last row in the matrix. */ if (Row != Size) spcRowExchange( Matrix, Row, Size ); /* Move Col so that it is the last column in the matrix. */ if (Col != Size) spcColExchange( Matrix, Col, Size ); /* Correct Diag pointers. */ if (Row == Col) SWAP( ElementPtr, Matrix->Diag[Row], Matrix->Diag[Size] ); else { Matrix->Diag[Row] = spcFindElementInCol(Matrix, Matrix->FirstInCol+Row, Row, Row, NO ); Matrix->Diag[Col] = spcFindElementInCol(Matrix, Matrix->FirstInCol+Col, Col, Col, NO ); } /* Delete last row and column of the matrix. */ /* Break the column links to every element in the last row. */ pLastElement = Matrix->FirstInRow[ Size ]; while (pLastElement != NULL) { ppElement = &(Matrix->FirstInCol[ pLastElement->Col ]); while ((pElement = *ppElement) != NULL) { if (pElement == pLastElement) *ppElement = NULL; /* Unlink last element in column. */ else ppElement = &pElement->NextInCol; /* Skip element. */ } pLastElement = pLastElement->NextInRow; } /* Break the row links to every element in the last column. */ pLastElement = Matrix->FirstInCol[ Size ]; while (pLastElement != NULL) { ppElement = &(Matrix->FirstInRow[ pLastElement->Row ]); while ((pElement = *ppElement) != NULL) { if (pElement == pLastElement) *ppElement = NULL; /* Unlink last element in row. */ else ppElement = &pElement->NextInRow; /* Skip element. */ } pLastElement = pLastElement->NextInCol; } /* Clean up some details. */ Matrix->Size = Size - 1; Matrix->Diag[Size] = NULL; Matrix->FirstInRow[Size] = NULL; Matrix->FirstInCol[Size] = NULL; Matrix->CurrentSize--; Matrix->ExtToIntRowMap[ExtRow] = -1; Matrix->ExtToIntColMap[ExtCol] = -1; Matrix->NeedsOrdering = YES; return; } #endif #if PSEUDOCONDITION /* * CALCULATE PSEUDOCONDITION * * Computes the magnitude of the ratio of the largest to the smallest * pivots. This quantity is an indicator of ill-conditioning in the * matrix. If this ratio is large, and if the matrix is scaled such * that uncertainties in the RHS and the matrix entries are * equilibrated, then the matrix is ill-conditioned. However, a * small ratio does not necessarily imply that the matrix is * well-conditioned. This routine must only be used after a matrix * has been factored by spOrderAndFactor() or spFactor() and before * it is cleared by spClear() or spInitialize(). The pseudocondition * is faster to compute than the condition number calculated by * spCondition(), but is not as informative. * * >>> Returns: * The magnitude of the ratio of the largest to smallest pivot used during * previous factorization. If the matrix was singular, zero is returned. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. */ RealNumber spPseudoCondition(MatrixPtr Matrix) { int I; ArrayOfElementPtrs Diag; RealNumber MaxPivot, MinPivot, Mag; /* Begin `spPseudoCondition'. */ assert( IS_SPARSE(Matrix) && IS_FACTORED(Matrix) ); if (Matrix->Error == spSINGULAR || Matrix->Error == spZERO_DIAG) return 0.0; Diag = Matrix->Diag; MaxPivot = MinPivot = ELEMENT_MAG( Diag[1] ); for (I = 2; I <= Matrix->Size; I++) { Mag = ELEMENT_MAG( Diag[I] ); if (Mag > MaxPivot) MaxPivot = Mag; else if (Mag < MinPivot) MinPivot = Mag; } assert( MaxPivot > 0.0); return MaxPivot / MinPivot; } #endif #if CONDITION /* * ESTIMATE CONDITION NUMBER * * Computes an estimate of the condition number using a variation on * the LINPACK condition number estimation algorithm. This quantity * is an indicator of ill-conditioning in the matrix. To avoid * problems with overflow, the reciprocal of the condition number is * returned. If this number is small, and if the matrix is scaled * such that uncertainties in the RHS and the matrix entries are * equilibrated, then the matrix is ill-conditioned. If the this * number is near one, the matrix is well conditioned. This routine * must only be used after a matrix has been factored by * spOrderAndFactor() or spFactor() and before it is cleared by * spClear() or spInitialize(). * * Unlike the LINPACK condition number estimator, this routines * returns the L infinity condition number. This is an artifact of * Sparse placing ones on the diagonal of the upper triangular matrix * rather than the lower. This difference should be of no * importance. * * References: * A.K. Cline, C.B. Moler, G.W. Stewart, J.H. Wilkinson. An estimate * for the condition number of a matrix. SIAM Journal on Numerical * Analysis. Vol. 16, No. 2, pages 368-375, April 1979. * * J.J. Dongarra, C.B. Moler, J.R. Bunch, G.W. Stewart. LINPACK * User's Guide. SIAM, 1979. * * Roger G. Grimes, John G. Lewis. Condition number estimation for * sparse matrices. SIAM Journal on Scientific and Statistical * Computing. Vol. 2, No. 4, pages 384-388, December 1981. * * Dianne Prost O'Leary. Estimating matrix condition numbers. SIAM * Journal on Scientific and Statistical Computing. Vol. 1, No. 2, * pages 205-209, June 1980. * * >>> Returns: * The reciprocal of the condition number. If the matrix was singular, * zero is returned. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * NormOfMatrix (RealNumber) * The L-infinity norm of the unfactored matrix as computed by * spNorm(). * pError (int *) * Used to return error code. * * >>> Possible errors: * spSINGULAR * spNO_MEMORY */ RealNumber spCondition(MatrixPtr Matrix, RealNumber NormOfMatrix, int *pError) { ElementPtr pElement; RealVector T, Tm; int I, K, Row; ElementPtr pPivot; int Size; RealNumber E, Em, Wp, Wm, ASp, ASm, ASw, ASy, ASv, ASz, MaxY, ScaleFactor; RealNumber Linpack, OLeary, InvNormOfInverse, ComplexCondition(); #define SLACK 1e4 /* Begin `spCondition'. */ assert( IS_SPARSE(Matrix) && IS_FACTORED(Matrix) ); *pError = Matrix->Error; if (Matrix->Error >= spFATAL) return 0.0; if (NormOfMatrix == 0.0) { *pError = spSINGULAR; return 0.0; } if (Matrix->Complex) return ComplexCondition( Matrix, NormOfMatrix, pError ); Size = Matrix->Size; T = Matrix->Intermediate; Tm = Matrix->Intermediate + Size; for (I = Size; I > 0; I--) T[I] = 0.0; /* * Part 1. Ay = e. * * Solve Ay = LUy = e where e consists of +1 and -1 terms with the * sign chosen to maximize the size of w in Lw = e. Since the * terms in w can get very large, scaling is used to avoid * overflow. */ /* Forward elimination. Solves Lw = e while choosing e. */ E = 1.0; for (I = 1; I <= Size; I++) { pPivot = Matrix->Diag[I]; if (T[I] < 0.0) Em = -E; else Em = E; Wm = (Em + T[I]) * pPivot->Real; if (ABS(Wm) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(Wm) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; E *= ScaleFactor; Em *= ScaleFactor; Wm = (Em + T[I]) * pPivot->Real; } Wp = (T[I] - Em) * pPivot->Real; ASp = ABS(T[I] - Em); ASm = ABS(Em + T[I]); /* Update T for both values of W, minus value is placed in Tm. */ pElement = pPivot->NextInCol; while (pElement != NULL) { Row = pElement->Row; Tm[Row] = T[Row] - (Wm * pElement->Real); T[Row] -= (Wp * pElement->Real); ASp += ABS(T[Row]); ASm += ABS(Tm[Row]); pElement = pElement->NextInCol; } /* If minus value causes more growth, overwrite T with its values. */ if (ASm > ASp) { T[I] = Wm; pElement = pPivot->NextInCol; while (pElement != NULL) { T[pElement->Row] = Tm[pElement->Row]; pElement = pElement->NextInCol; } } else T[I] = Wp; } /* Compute 1-norm of T, which now contains w, and scale ||T|| to 1/SLACK. */ for (ASw = 0.0, I = Size; I > 0; I--) ASw += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASw); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; E *= ScaleFactor; } /* Backward Substitution. Solves Uy = w.*/ for (I = Size; I >= 1; I--) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { T[I] -= pElement->Real * T[pElement->Col]; pElement = pElement->NextInRow; } if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; E *= ScaleFactor; } } /* Compute 1-norm of T, which now contains y, and scale ||T|| to 1/SLACK. */ for (ASy = 0.0, I = Size; I > 0; I--) ASy += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASy); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; ASy = 1.0 / SLACK; E *= ScaleFactor; } /* Compute infinity-norm of T for O'Leary's estimate. */ for (MaxY = 0.0, I = Size; I > 0; I--) if (MaxY < ABS(T[I])) MaxY = ABS(T[I]); /* * Part 2. * * A* z = y where the * represents the transpose. Recall that A = * LU implies A* = U* L*. */ /* Forward elimination, U* v = y. */ for (I = 1; I <= Size; I++) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { T[pElement->Col] -= T[I] * pElement->Real; pElement = pElement->NextInRow; } if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains v, and scale ||T|| to 1/SLACK. */ for (ASv = 0.0, I = Size; I > 0; I--) ASv += ABS(T[I]); ScaleFactor = 1.0 / (SLACK * ASv); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) T[I] *= ScaleFactor; ASy *= ScaleFactor; } /* Backward Substitution, L* z = v. */ for (I = Size; I >= 1; I--) { pPivot = Matrix->Diag[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { T[I] -= pElement->Real * T[pElement->Row]; pElement = pElement->NextInCol; } T[I] *= pPivot->Real; if (ABS(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), ABS(T[I]) ); for (K = Size; K > 0; K--) T[K] *= ScaleFactor; ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains z. */ for (ASz = 0.0, I = Size; I > 0; I--) ASz += ABS(T[I]); Linpack = ASy / ASz; OLeary = E / MaxY; InvNormOfInverse = MIN( Linpack, OLeary ); return InvNormOfInverse / NormOfMatrix; } /* * ESTIMATE CONDITION NUMBER * * Complex version of spCondition(). * * >>> Returns: * The reciprocal of the condition number. * * >>> Arguments: * Matrix (MatrixPtr) * Pointer to the matrix. * NormOfMatrix (RealNumber) * The L-infinity norm of the unfactored matrix as computed by * spNorm(). * pError (int *) * Used to return error code. * * >>> Possible errors: * spNO_MEMORY */ static RealNumber ComplexCondition( Matrix, NormOfMatrix, pError ) MatrixPtr Matrix; RealNumber NormOfMatrix; int *pError; { ElementPtr pElement; ComplexVector T, Tm; int I, K, Row; ElementPtr pPivot; int Size; RealNumber E, Em, ASp, ASm, ASw, ASy, ASv, ASz, MaxY, ScaleFactor; RealNumber Linpack, OLeary, InvNormOfInverse; ComplexNumber Wp, Wm; /* Begin `ComplexCondition'. */ Size = Matrix->Size; T = (ComplexVector)Matrix->Intermediate; Tm = SP_MALLOC( ComplexNumber, Size+1 ); if (Tm == NULL) { *pError = spNO_MEMORY; return 0.0; } for (I = Size; I > 0; I--) T[I].Real = T[I].Imag = 0.0; /* * Part 1. Ay = e. * * Solve Ay = LUy = e where e consists of +1 and -1 terms with the * sign chosen to maximize the size of w in Lw = e. Since the * terms in w can get very large, scaling is used to avoid * overflow. */ /* Forward elimination. Solves Lw = e while choosing e. */ E = 1.0; for (I = 1; I <= Size; I++) { pPivot = Matrix->Diag[I]; if (T[I].Real < 0.0) Em = -E; else Em = E; Wm = T[I]; Wm.Real += Em; ASm = CMPLX_1_NORM( Wm ); CMPLX_MULT_ASSIGN( Wm, *pPivot ); if (CMPLX_1_NORM(Wm) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(Wm) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); E *= ScaleFactor; Em *= ScaleFactor; ASm *= ScaleFactor; SCLR_MULT_ASSIGN( Wm, ScaleFactor ); } Wp = T[I]; Wp.Real -= Em; ASp = CMPLX_1_NORM( Wp ); CMPLX_MULT_ASSIGN( Wp, *pPivot ); /* Update T for both values of W, minus value is placed in Tm. */ pElement = pPivot->NextInCol; while (pElement != NULL) { Row = pElement->Row; /* Cmplx expr: Tm[Row] = T[Row] - (Wp * *pElement). */ CMPLX_MULT_SUBT( Tm[Row], Wm, *pElement, T[Row] ); /* Cmplx expr: T[Row] -= Wp * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[Row], Wm, *pElement ); ASp += CMPLX_1_NORM(T[Row]); ASm += CMPLX_1_NORM(Tm[Row]); pElement = pElement->NextInCol; } /* If minus value causes more growth, overwrite T with its values. */ if (ASm > ASp) { T[I] = Wm; pElement = pPivot->NextInCol; while (pElement != NULL) { T[pElement->Row] = Tm[pElement->Row]; pElement = pElement->NextInCol; } } else T[I] = Wp; } /* Compute 1-norm of T, which now contains w, and scale ||T|| to 1/SLACK. */ for (ASw = 0.0, I = Size; I > 0; I--) ASw += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASw); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); E *= ScaleFactor; } /* Backward Substitution. Solves Uy = w.*/ for (I = Size; I >= 1; I--) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: T[I] -= T[pElement->Col] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[I], T[pElement->Col], *pElement ); pElement = pElement->NextInRow; } if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); E *= ScaleFactor; } } /* Compute 1-norm of T, which now contains y, and scale ||T|| to 1/SLACK. */ for (ASy = 0.0, I = Size; I > 0; I--) ASy += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASy); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); ASy = 1.0 / SLACK; E *= ScaleFactor; } /* Compute infinity-norm of T for O'Leary's estimate. */ for (MaxY = 0.0, I = Size; I > 0; I--) if (MaxY < CMPLX_1_NORM(T[I])) MaxY = CMPLX_1_NORM(T[I]); /* Part 2. A* z = y where the * represents the transpose. Recall * that A = LU implies A* = U* L*. */ /* Forward elimination, U* v = y. */ for (I = 1; I <= Size; I++) { pElement = Matrix->Diag[I]->NextInRow; while (pElement != NULL) { /* Cmplx expr: T[pElement->Col] -= T[I] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[pElement->Col], T[I], *pElement ); pElement = pElement->NextInRow; } if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains v, and scale ||T|| to 1/SLACK. */ for (ASv = 0.0, I = Size; I > 0; I--) ASv += CMPLX_1_NORM(T[I]); ScaleFactor = 1.0 / (SLACK * ASv); if (ScaleFactor < 0.5) { for (I = Size; I > 0; I--) SCLR_MULT_ASSIGN( T[I], ScaleFactor ); ASy *= ScaleFactor; } /* Backward Substitution, L* z = v. */ for (I = Size; I >= 1; I--) { pPivot = Matrix->Diag[I]; pElement = pPivot->NextInCol; while (pElement != NULL) { /* Cmplx expr: T[I] -= T[pElement->Row] * *pElement. */ CMPLX_MULT_SUBT_ASSIGN( T[I], T[pElement->Row], *pElement ); pElement = pElement->NextInCol; } CMPLX_MULT_ASSIGN( T[I], *pPivot ); if (CMPLX_1_NORM(T[I]) > SLACK) { ScaleFactor = 1.0 / MAX( SQR( SLACK ), CMPLX_1_NORM(T[I]) ); for (K = Size; K > 0; K--) SCLR_MULT_ASSIGN( T[K], ScaleFactor ); ASy *= ScaleFactor; } } /* Compute 1-norm of T, which now contains z. */ for (ASz = 0.0, I = Size; I > 0; I--) ASz += CMPLX_1_NORM(T[I]); SP_FREE( Tm ); Linpack = ASy / ASz; OLeary = E / MaxY; InvNormOfInverse = MIN( Linpack, OLeary ); return InvNormOfInverse / NormOfMatrix; } /* * L-INFINITY MATRIX NORM * * Computes the L-infinity norm of an unfactored matrix. It is a fatal * error to pass this routine a factored matrix. * * One difficulty is that the rows may not be linked. * * >>> Returns: * The largest absolute row sum of matrix. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. */ RealNumber spNorm(MatrixPtr Matrix) { ElementPtr pElement; int I; RealNumber Max = 0.0, AbsRowSum; /* Begin `spNorm'. */ assert( IS_SPARSE(Matrix) && !IS_FACTORED(Matrix) ); if (!Matrix->RowsLinked) spcLinkRows( Matrix ); /* Compute row sums. */ if (!Matrix->Complex) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; AbsRowSum = 0.0; while (pElement != NULL) { AbsRowSum += ABS( pElement->Real ); pElement = pElement->NextInRow; } if (Max < AbsRowSum) Max = AbsRowSum; } } else { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; AbsRowSum = 0.0; while (pElement != NULL) { AbsRowSum += CMPLX_1_NORM( *pElement ); pElement = pElement->NextInRow; } if (Max < AbsRowSum) Max = AbsRowSum; } } return Max; } #endif /* CONDITION */ #if STABILITY /* * STABILITY OF FACTORIZATION * * The following routines are used to gauge the stability of a * factorization. If the factorization is determined to be too * unstable, then the matrix should be reordered. The routines * compute quantities that are needed in the computation of a bound * on the error attributed to any one element in the matrix during * the factorization. In other words, there is a matrix E = [e_ij] * of error terms such that A+E = LU. This routine finds a bound on * |e_ij|. Erisman & Reid [1] showed that |e_ij| < 3.01 u rho m_ij, * where u is the machine rounding unit, rho = max a_ij where the max * is taken over every row i, column j, and step k, and m_ij is the * number of multiplications required in the computation of l_ij if i * > j or u_ij otherwise. Barlow [2] showed that rho < max_i || l_i * ||_p max_j || u_j ||_q where 1/p + 1/q = 1. * * The first routine finds the magnitude on the largest element in * the matrix. If the matrix has not yet been factored, the largest * element is found by direct search. If the matrix is factored, a * bound on the largest element in any of the reduced submatrices is * computed using Barlow with p = oo and q = 1. The ratio of these * two numbers is the growth, which can be used to determine if the * pivoting order is adequate. A large growth implies that * considerable error has been made in the factorization and that it * is probably a good idea to reorder the matrix. If a large growth * in encountered after using spFactor(), reconstruct the matrix and * refactor using spOrderAndFactor(). If a large growth is * encountered after using spOrderAndFactor(), refactor using * spOrderAndFactor() with the pivot threshold increased, say to 0.1. * * Using only the size of the matrix as an upper bound on m_ij and * Barlow's bound, the user can estimate the size of the matrix error * terms e_ij using the bound of Erisman and Reid. The second * routine computes a tighter bound (with more work) based on work by * Gear [3], |e_ij| < 1.01 u rho (t c^3 + (1 + t)c^2) where t is the * threshold and c is the maximum number of off-diagonal elements in * any row of L. The expensive part of computing this bound is * determining the maximum number of off-diagonals in L, which * changes only when the order of the matrix changes. This number is * computed and saved, and only recomputed if the matrix is * reordered. * * [1] A. M. Erisman, J. K. Reid. Monitoring the stability of the * triangular factorization of a sparse matrix. Numerische * Mathematik. Vol. 22, No. 3, 1974, pp 183-186. * * [2] J. L. Barlow. A note on monitoring the stability of triangular * decomposition of sparse matrices. "SIAM Journal of Scientific * and Statistical Computing." Vol. 7, No. 1, January 1986, pp 166-168. * * [3] I. S. Duff, A. M. Erisman, J. K. Reid. "Direct Methods for Sparse * Matrices." Oxford 1986. pp 99. */ /* * LARGEST ELEMENT IN MATRIX * * >>> Returns: * If matrix is not factored, returns the magnitude of the largest element in * the matrix. If the matrix is factored, a bound on the magnitude of the * largest element in any of the reduced submatrices is returned. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. */ RealNumber spLargestElement(MatrixPtr Matrix) { int I; RealNumber Mag, AbsColSum, Max = 0.0, MaxRow = 0.0, MaxCol = 0.0; RealNumber Pivot; ComplexNumber cPivot; ElementPtr pElement, pDiag; /* Begin `spLargestElement'. */ assert( IS_SPARSE(Matrix) ); if (Matrix->Factored && !Matrix->Complex) { if (Matrix->Error == spSINGULAR) return 0.0; /* Find the bound on the size of the largest element over all factorization. */ for (I = 1; I <= Matrix->Size; I++) { pDiag = Matrix->Diag[I]; /* Lower triangular matrix. */ Pivot = 1.0 / pDiag->Real; Mag = ABS( Pivot ); if (Mag > MaxRow) MaxRow = Mag; pElement = Matrix->FirstInRow[I]; while (pElement != pDiag) { Mag = ABS( pElement->Real ); if (Mag > MaxRow) MaxRow = Mag; pElement = pElement->NextInRow; } /* Upper triangular matrix. */ pElement = Matrix->FirstInCol[I]; AbsColSum = 1.0; /* Diagonal of U is unity. */ while (pElement != pDiag) { AbsColSum += ABS( pElement->Real ); pElement = pElement->NextInCol; } if (AbsColSum > MaxCol) MaxCol = AbsColSum; } } else if (!Matrix->Complex) { for (I = 1; I <= Matrix->Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Mag = ABS( pElement->Real ); if (Mag > Max) Max = Mag; pElement = pElement->NextInCol; } } return Max; } if (Matrix->Factored && Matrix->Complex) { if (Matrix->Error == spSINGULAR) return 0.0; /* Find the bound on the size of the largest element over all factorization. */ for (I = 1; I <= Matrix->Size; I++) { pDiag = Matrix->Diag[I]; /* Lower triangular matrix. */ CMPLX_RECIPROCAL( cPivot, *pDiag ); Mag = CMPLX_1_NORM( cPivot ); if (Mag > MaxRow) MaxRow = Mag; pElement = Matrix->FirstInRow[I]; while (pElement != pDiag) { Mag = CMPLX_1_NORM( *pElement ); if (Mag > MaxRow) MaxRow = Mag; pElement = pElement->NextInRow; } /* Upper triangular matrix. */ pElement = Matrix->FirstInCol[I]; AbsColSum = 1.0; /* Diagonal of U is unity. */ while (pElement != pDiag) { AbsColSum += CMPLX_1_NORM( *pElement ); pElement = pElement->NextInCol; } if (AbsColSum > MaxCol) MaxCol = AbsColSum; } } else if (Matrix->Complex) { for (I = 1; I <= Matrix->Size; I++) { pElement = Matrix->FirstInCol[I]; while (pElement != NULL) { Mag = CMPLX_1_NORM( *pElement ); if (Mag > Max) Max = Mag; pElement = pElement->NextInCol; } } return Max; } return MaxRow * MaxCol; } /* * MATRIX ROUNDOFF ERROR * * >>> Returns: * Returns a bound on the magnitude of the largest element in E = A - LU. * * >>> Arguments: * Matrix (char *) * Pointer to the matrix. * Rho (RealNumber) * The bound on the magnitude of the largest element in any of the * reduced submatrices. This is the number computed by the function * spLargestElement() when given a factored matrix. If this number is * negative, the bound will be computed automatically. */ RealNumber spRoundoff(MatrixPtr Matrix, RealNumber Rho) { ElementPtr pElement; int Count, I, MaxCount = 0; RealNumber Reid, Gear; /* Begin `spRoundoff'. */ assert( IS_SPARSE(Matrix) && IS_FACTORED(Matrix) ); /* Compute Barlow's bound if it is not given. */ if (Rho < 0.0) Rho = spLargestElement( Matrix ); /* Find the maximum number of off-diagonals in L if not previously computed. */ if (Matrix->MaxRowCountInLowerTri < 0) { for (I = Matrix->Size; I > 0; I--) { pElement = Matrix->FirstInRow[I]; Count = 0; while (pElement->Col < I) { Count++; pElement = pElement->NextInRow; } if (Count > MaxCount) MaxCount = Count; } Matrix->MaxRowCountInLowerTri = MaxCount; } else MaxCount = Matrix->MaxRowCountInLowerTri; /* Compute error bound. */ Gear = 1.01*((MaxCount + 1) * Matrix->RelThreshold + 1.0) * SQR(MaxCount); Reid = 3.01 * Matrix->Size; if (Gear < Reid) return (MACHINE_RESOLUTION * Rho * Gear); else return (MACHINE_RESOLUTION * Rho * Reid); } #endif #if DOCUMENTATION /* * SPARSE ERROR MESSAGE * * This routine prints a short message to a stream describing the error * error state of sparse. No message is produced if there is no error. * * >>> Arguments: * Matrix (char *) * Matrix for which the error message is to be printed. * Stream (FILE *) * Stream to which the error message is to be printed. * Originator (char *) * Name of originator of error message. If NULL, `sparse' is used. * If zero-length string, no originator is printed. */ void spErrorMessage(MatrixPtr Matrix, FILE *Stream, char *Originator) { int Row, Col, Error; /* Begin `spErrorMessage'. */ if (Matrix == NULL) Error = spNO_MEMORY; else { assert(Matrix->ID == SPARSE_ID); Error = Matrix->Error; } if (Error == spOKAY) return; if (Originator == NULL) Originator = "sparse"; if (Originator[0] != '\0') fprintf( Stream, "%s: ", Originator); if (Error >= spFATAL) fprintf( Stream, "fatal error, "); else fprintf( Stream, "warning, "); /* Print particular error message. Do not use switch statement * because error codes may not be unique. */ if (Error == spPANIC) fprintf( Stream, "Sparse called improperly.\n"); else if (Error == spNO_MEMORY) fprintf( Stream, "insufficient memory available.\n"); else if (Error == spSINGULAR) { spWhereSingular( Matrix, &Row, &Col ); fprintf( Stream, "singular matrix detected at row %d and column %d.\n", Row, Col); } else if (Error == spZERO_DIAG) { spWhereSingular( Matrix, &Row, &Col ); fprintf( Stream, "zero diagonal detected at row %d and column %d.\n", Row, Col); } else if (Error == spSMALL_PIVOT) { fprintf( Stream, "unable to find a pivot that is larger than absolute threshold.\n"); } else { abort(); } return; } #endif /* DOCUMENTATION */ ngspice-26/src/tclspinit.in0000644000265600020320000000102612264261473015360 0ustar andreasadmin* Standard spice and nutmeg init file alias exit quit alias acct rusage all set x11lineararcs *unset brief strcmp __flag $program "ngspice" if $__flag = 0 *set numparams * For SPICE2 POLYs, edit the below line to point to the location * of your codemode. @XSPICEINIT@ codemodel @pkglibdir@/spice2poly.cm * The other codemodels @XSPICEINIT@ codemodel @pkglibdir@/analog.cm @XSPICEINIT@ codemodel @pkglibdir@/digital.cm @XSPICEINIT@ codemodel @pkglibdir@/xtradev.cm @XSPICEINIT@ codemodel @pkglibdir@/xtraevt.cm end unset __flag ngspice-26/src/Makefile.in0000644000265600020320000023543112264261534015073 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XSPICE_WANTED_TRUE@am__append_1 = xspice @CIDER_WANTED_TRUE@am__append_2 = ciderlib @SENSE2_WANTED_TRUE@am__append_3 = unsupported @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@bin_PROGRAMS = \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@ ngspice$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@ ngnutmeg$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@ $(am__EXEEXT_1) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@ $(am__EXEEXT_2) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am__append_4 = ngsconvert ngproc2mod ngmultidec ngmakeidx @NO_HELP_FALSE@@SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am__append_5 = nghelp @CIDER_WANTED_TRUE@am__append_6 = devload devaxis ciderinit @WINGUI_TRUE@am__append_7 = winmain.c @WINGUI_TRUE@am__append_8 = \ @WINGUI_TRUE@ frontend/wdisp/libwindisp.la @NDEV_WANTED_TRUE@am__append_9 = spicelib/devices/ndev/libndev.la @NUMDEV_WANTED_TRUE@am__append_10 = \ @NUMDEV_WANTED_TRUE@ spicelib/devices/nbjt/libnbjt.la \ @NUMDEV_WANTED_TRUE@ spicelib/devices/nbjt2/libnbjt2.la \ @NUMDEV_WANTED_TRUE@ spicelib/devices/numd/libnumd.la \ @NUMDEV_WANTED_TRUE@ spicelib/devices/numd2/libnumd2.la \ @NUMDEV_WANTED_TRUE@ spicelib/devices/numos/libnumos.la @SENSE2_WANTED_TRUE@am__append_11 = unsupported/libunsupported.la @XSPICE_WANTED_TRUE@am__append_12 = \ @XSPICE_WANTED_TRUE@ xspice/cm/libcmxsp.la \ @XSPICE_WANTED_TRUE@ xspice/mif/libmifxsp.la \ @XSPICE_WANTED_TRUE@ xspice/evt/libevtxsp.la \ @XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la \ @XSPICE_WANTED_TRUE@ @XSPICEDLLIBS@ @CIDER_WANTED_TRUE@am__append_13 = \ @CIDER_WANTED_TRUE@ ciderlib/twod/libcidertwod.la \ @CIDER_WANTED_TRUE@ ciderlib/oned/libcideroned.la \ @CIDER_WANTED_TRUE@ ciderlib/input/libciderinput.la \ @CIDER_WANTED_TRUE@ ciderlib/support/libcidersuprt.la @NO_X_FALSE@@WINGUI_FALSE@am__append_14 = frontend/help/libhlp.la @WINGUI_TRUE@am__append_15 = winmain.c @WINGUI_TRUE@am__append_16 = \ @WINGUI_TRUE@ frontend/wdisp/libwindisp.la @NO_X_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@am__append_17 = \ @NO_X_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ frontend/help/libhlp.la @NO_HELP_FALSE@@NO_X_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@am__append_18 = \ @NO_HELP_FALSE@@NO_X_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ frontend/help/libhlp.la @WINGUI_TRUE@am__append_19 = -lpsapi @TCL_MODULE_TRUE@am__append_20 = tclspinit @TCLWIN_TRUE@@TCL_MODULE_TRUE@am__append_21 = -lpsapi -ltcl84 -lBLT24 @TCL_MODULE_TRUE@@WINGUI_TRUE@am__append_22 = \ @TCL_MODULE_TRUE@@WINGUI_TRUE@ frontend/wdisp/libwindisp.la @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__append_23 = \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/cm/libcmxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/mif/libmifxsp.la @NDEV_WANTED_TRUE@@TCL_MODULE_TRUE@am__append_24 = \ @NDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/ndev/libndev.la @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@am__append_25 = \ @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/nbjt/libnbjt.la \ @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/nbjt2/libnbjt2.la \ @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/numd/libnumd.la \ @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/numd2/libnumd2.la \ @NUMDEV_WANTED_TRUE@@TCL_MODULE_TRUE@ spicelib/devices/numos/libnumos.la @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__append_26 = \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/evt/libevtxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ @XSPICEDLLIBS@ @CIDER_WANTED_TRUE@@TCL_MODULE_TRUE@am__append_27 = \ @CIDER_WANTED_TRUE@@TCL_MODULE_TRUE@ ciderlib/twod/libcidertwod.la \ @CIDER_WANTED_TRUE@@TCL_MODULE_TRUE@ ciderlib/oned/libcideroned.la \ @CIDER_WANTED_TRUE@@TCL_MODULE_TRUE@ ciderlib/input/libciderinput.la \ @CIDER_WANTED_TRUE@@TCL_MODULE_TRUE@ ciderlib/support/libcidersuprt.la @TCLWIN_TRUE@@TCL_MODULE_TRUE@am__append_28 = -no-undefined --def \ @TCLWIN_TRUE@@TCL_MODULE_TRUE@ spice.def @TCL_LIB_SPEC@ @TCLCYG_TRUE@@TCL_MODULE_TRUE@am__append_29 = -no-undefined --def \ @TCLCYG_TRUE@@TCL_MODULE_TRUE@ spice.def @TCL_LIB_SPEC@ @SHARED_MODULE_TRUE@@SHWIN_TRUE@am__append_30 = -lpsapi @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__append_31 = \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/cm/libcmxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/mif/libmifxsp.la @NDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@am__append_32 = \ @NDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/ndev/libndev.la @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@am__append_33 = \ @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/nbjt/libnbjt.la \ @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/nbjt2/libnbjt2.la \ @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/numd/libnumd.la \ @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/numd2/libnumd2.la \ @NUMDEV_WANTED_TRUE@@SHARED_MODULE_TRUE@ spicelib/devices/numos/libnumos.la @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__append_34 = \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/evt/libevtxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ @XSPICEDLLIBS@ @CIDER_WANTED_TRUE@@SHARED_MODULE_TRUE@am__append_35 = \ @CIDER_WANTED_TRUE@@SHARED_MODULE_TRUE@ ciderlib/twod/libcidertwod.la \ @CIDER_WANTED_TRUE@@SHARED_MODULE_TRUE@ ciderlib/oned/libcideroned.la \ @CIDER_WANTED_TRUE@@SHARED_MODULE_TRUE@ ciderlib/input/libciderinput.la \ @CIDER_WANTED_TRUE@@SHARED_MODULE_TRUE@ ciderlib/support/libcidersuprt.la @SHARED_MODULE_TRUE@@SHWIN_TRUE@am__append_36 = \ @SHARED_MODULE_TRUE@@SHWIN_TRUE@ -Wl,--output-def=ngspice.def \ @SHARED_MODULE_TRUE@@SHWIN_TRUE@ -Wl,--out-implib=ngspice.dll.a \ @SHARED_MODULE_TRUE@@SHWIN_TRUE@ -no-undefined @SHARED_MODULE_TRUE@@SHWIN_TRUE@am__append_37 = ngspice.def @SHARED_MODULE_TRUE@@SHCYG_TRUE@am__append_38 = \ @SHARED_MODULE_TRUE@@SHCYG_TRUE@ -Wl,--output-def=ngspice.def \ @SHARED_MODULE_TRUE@@SHCYG_TRUE@ -Wl,--out-implib=ngspice.dll.a \ @SHARED_MODULE_TRUE@@SHCYG_TRUE@ -no-undefined @SHARED_MODULE_TRUE@@SHCYG_TRUE@am__append_39 = ngspice.def subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(helpdatadir)" "$(DESTDIR)$(initdatadir)" \ "$(DESTDIR)$(pkgIndexdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = spicelib/devices/asrc/libasrc.la \ spicelib/devices/bjt/libbjt.la \ spicelib/devices/bsim1/libbsim1.la \ spicelib/devices/bsim2/libbsim2.la \ spicelib/devices/bsim3/libbsim3.la \ spicelib/devices/bsim3v0/libbsim3v0.la \ spicelib/devices/bsim3v1/libbsim3v1.la \ spicelib/devices/bsim3v32/libbsim3v32.la \ spicelib/devices/bsim4/libbsim4.la \ spicelib/devices/bsim4v4/libbsim4v4.la \ spicelib/devices/bsim4v5/libbsim4v5.la \ spicelib/devices/bsim4v6/libbsim4v6.la \ spicelib/devices/cap/libcap.la \ spicelib/devices/bsim3soi_pd/libbsim3soipd.la \ spicelib/devices/bsim3soi_fd/libbsim3soifd.la \ spicelib/devices/bsim3soi_dd/libbsim3soidd.la \ spicelib/devices/bsimsoi/libbsim4soi.la \ spicelib/devices/cccs/libcccs.la \ spicelib/devices/ccvs/libccvs.la \ spicelib/devices/cpl/libcpl.la spicelib/devices/csw/libcsw.la \ spicelib/devices/dio/libdio.la spicelib/devices/ind/libind.la \ spicelib/devices/isrc/libisrc.la \ spicelib/devices/hfet1/libhfet.la \ spicelib/devices/hfet2/libhfet2.la \ spicelib/devices/hisim2/libhisim2.la \ spicelib/devices/hisimhv1/libhisimhv1.la \ spicelib/devices/jfet/libjfet.la \ spicelib/devices/jfet2/libjfet2.la \ spicelib/devices/ltra/libltra.la \ spicelib/devices/mes/libmes.la \ spicelib/devices/mesa/libmesa.la \ spicelib/devices/mos1/libmos1.la \ spicelib/devices/mos2/libmos2.la \ spicelib/devices/mos3/libmos3.la \ spicelib/devices/mos6/libmos6.la \ spicelib/devices/mos9/libmos9.la \ spicelib/devices/res/libres.la \ spicelib/devices/soi3/libsoi3.la spicelib/devices/sw/libsw.la \ spicelib/devices/txl/libtxl.la spicelib/devices/tra/libtra.la \ spicelib/devices/urc/liburc.la \ spicelib/devices/vbic/libvbic.la \ spicelib/devices/vccs/libvccs.la \ spicelib/devices/vcvs/libvcvs.la \ spicelib/devices/vsrc/libvsrc.la @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__DEPENDENCIES_2 = xspice/evt/libevtxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @SHARED_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la am__DEPENDENCIES_3 = am__DEPENDENCIES_4 = $(am__DEPENDENCIES_3) $(am__DEPENDENCIES_3) \ $(am__DEPENDENCIES_3) @SHARED_MODULE_TRUE@libngspice_la_DEPENDENCIES = frontend/libfte.la \ @SHARED_MODULE_TRUE@ frontend/plotting/libplotting.la \ @SHARED_MODULE_TRUE@ $(am__append_31) $(am__DEPENDENCIES_1) \ @SHARED_MODULE_TRUE@ $(am__append_32) $(am__append_33) \ @SHARED_MODULE_TRUE@ spicelib/analysis/libckt.la \ @SHARED_MODULE_TRUE@ spicelib/devices/libdev.la \ @SHARED_MODULE_TRUE@ $(am__DEPENDENCIES_2) \ @SHARED_MODULE_TRUE@ frontend/parser/libparser.la \ @SHARED_MODULE_TRUE@ frontend/numparam/libnumparam.la \ @SHARED_MODULE_TRUE@ frontend/trannoise/libtrannoise.la \ @SHARED_MODULE_TRUE@ spicelib/parser/libinp.la $(am__append_35) \ @SHARED_MODULE_TRUE@ maths/deriv/libderiv.la \ @SHARED_MODULE_TRUE@ maths/cmaths/libcmaths.la \ @SHARED_MODULE_TRUE@ maths/misc/libmathmisc.la \ @SHARED_MODULE_TRUE@ maths/fft/libmathfft.la \ @SHARED_MODULE_TRUE@ maths/poly/libpoly.la maths/ni/libni.la \ @SHARED_MODULE_TRUE@ maths/sparse/libsparse.la misc/libmisc.la \ @SHARED_MODULE_TRUE@ $(am__DEPENDENCIES_4) \ @SHARED_MODULE_TRUE@ $(am__DEPENDENCIES_3) am__libngspice_la_SOURCES_DIST = main.c conf.c conf.h ngspice.c \ sharedspice.c @SHARED_MODULE_TRUE@am_libngspice_la_OBJECTS = libngspice_la-main.lo \ @SHARED_MODULE_TRUE@ libngspice_la-conf.lo \ @SHARED_MODULE_TRUE@ libngspice_la-ngspice.lo \ @SHARED_MODULE_TRUE@ libngspice_la-sharedspice.lo libngspice_la_OBJECTS = $(am_libngspice_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent libngspice_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libngspice_la_CFLAGS) \ $(CFLAGS) $(libngspice_la_LDFLAGS) $(LDFLAGS) -o $@ @SHARED_MODULE_TRUE@am_libngspice_la_rpath = -rpath $(libdir) @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@am__DEPENDENCIES_5 = \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/evt/libevtxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @TCL_MODULE_TRUE@@XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la @TCL_MODULE_TRUE@libspice_la_DEPENDENCIES = frontend/libfte.la \ @TCL_MODULE_TRUE@ $(am__append_22) \ @TCL_MODULE_TRUE@ frontend/plotting/libplotting.la \ @TCL_MODULE_TRUE@ $(am__append_23) $(am__DEPENDENCIES_1) \ @TCL_MODULE_TRUE@ $(am__append_24) $(am__append_25) \ @TCL_MODULE_TRUE@ spicelib/analysis/libckt.la \ @TCL_MODULE_TRUE@ spicelib/devices/libdev.la \ @TCL_MODULE_TRUE@ $(am__DEPENDENCIES_5) \ @TCL_MODULE_TRUE@ frontend/parser/libparser.la \ @TCL_MODULE_TRUE@ frontend/numparam/libnumparam.la \ @TCL_MODULE_TRUE@ frontend/trannoise/libtrannoise.la \ @TCL_MODULE_TRUE@ spicelib/parser/libinp.la $(am__append_27) \ @TCL_MODULE_TRUE@ maths/deriv/libderiv.la \ @TCL_MODULE_TRUE@ maths/cmaths/libcmaths.la \ @TCL_MODULE_TRUE@ maths/misc/libmathmisc.la \ @TCL_MODULE_TRUE@ maths/fft/libmathfft.la maths/poly/libpoly.la \ @TCL_MODULE_TRUE@ maths/ni/libni.la maths/sparse/libsparse.la \ @TCL_MODULE_TRUE@ misc/libmisc.la $(am__DEPENDENCIES_4) am__libspice_la_SOURCES_DIST = main.c conf.c conf.h ngspice.c \ tclspice.c @TCL_MODULE_TRUE@am_libspice_la_OBJECTS = libspice_la-main.lo \ @TCL_MODULE_TRUE@ libspice_la-conf.lo libspice_la-ngspice.lo \ @TCL_MODULE_TRUE@ libspice_la-tclspice.lo libspice_la_OBJECTS = $(am_libspice_la_OBJECTS) libspice_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(libspice_la_CFLAGS) \ $(CFLAGS) $(libspice_la_LDFLAGS) $(LDFLAGS) -o $@ @TCL_MODULE_TRUE@am_libspice_la_rpath = -rpath $(libdir) @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am__EXEEXT_1 = ngsconvert$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ngproc2mod$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ngmultidec$(EXEEXT) \ @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@ ngmakeidx$(EXEEXT) @NO_HELP_FALSE@@SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@am__EXEEXT_2 = nghelp$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am__nghelp_SOURCES_DIST = conf.c nghelp.c @SHWIN_FALSE@@WINGUI_FALSE@am_nghelp_OBJECTS = conf.$(OBJEXT) \ @SHWIN_FALSE@@WINGUI_FALSE@ nghelp.$(OBJEXT) nghelp_OBJECTS = $(am_nghelp_OBJECTS) @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@nghelp_DEPENDENCIES = frontend/terminal.lo \ @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la \ @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ $(am__append_18) am__ngmakeidx_SOURCES_DIST = makeidx.c @SHWIN_FALSE@@WINGUI_FALSE@am_ngmakeidx_OBJECTS = makeidx.$(OBJEXT) ngmakeidx_OBJECTS = $(am_ngmakeidx_OBJECTS) ngmakeidx_LDADD = $(LDADD) am__ngmultidec_SOURCES_DIST = ngmultidec.c @SHWIN_FALSE@@WINGUI_FALSE@am_ngmultidec_OBJECTS = \ @SHWIN_FALSE@@WINGUI_FALSE@ ngmultidec.$(OBJEXT) ngmultidec_OBJECTS = $(am_ngmultidec_OBJECTS) @SHWIN_FALSE@@WINGUI_FALSE@ngmultidec_DEPENDENCIES = \ @SHWIN_FALSE@@WINGUI_FALSE@ maths/sparse/libsparse.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la am__ngnutmeg_SOURCES_DIST = main.c conf.c conf.h ngnutmeg.c winmain.c @WINGUI_TRUE@am__objects_1 = ngnutmeg-winmain.$(OBJEXT) am_ngnutmeg_OBJECTS = ngnutmeg-main.$(OBJEXT) ngnutmeg-conf.$(OBJEXT) \ ngnutmeg-ngnutmeg.$(OBJEXT) $(am__objects_1) ngnutmeg_OBJECTS = $(am_ngnutmeg_OBJECTS) ngnutmeg_DEPENDENCIES = frontend/libfte.la $(am__append_16) \ frontend/plotting/libplotting.la frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la maths/fft/libmathfft.la \ maths/poly/libpoly.la misc/libmisc.la \ spicelib/parser/libinp.la $(am__append_17) am__ngproc2mod_SOURCES_DIST = ngproc2mod.c @SHWIN_FALSE@@WINGUI_FALSE@am_ngproc2mod_OBJECTS = \ @SHWIN_FALSE@@WINGUI_FALSE@ ngproc2mod.$(OBJEXT) ngproc2mod_OBJECTS = $(am_ngproc2mod_OBJECTS) @SHWIN_FALSE@@WINGUI_FALSE@ngproc2mod_DEPENDENCIES = \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/parser/libparser.la \ @SHWIN_FALSE@@WINGUI_FALSE@ spicelib/parser/libinp.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la am__ngsconvert_SOURCES_DIST = ngsconvert.c @SHWIN_FALSE@@WINGUI_FALSE@am_ngsconvert_OBJECTS = \ @SHWIN_FALSE@@WINGUI_FALSE@ ngsconvert.$(OBJEXT) ngsconvert_OBJECTS = $(am_ngsconvert_OBJECTS) @SHWIN_FALSE@@WINGUI_FALSE@ngsconvert_DEPENDENCIES = \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/libfte.la \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/parser/libparser.la \ @SHWIN_FALSE@@WINGUI_FALSE@ maths/misc/libmathmisc.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la am__ngspice_SOURCES_DIST = main.c conf.c conf.h ngspice.c winmain.c @WINGUI_TRUE@am__objects_2 = ngspice-winmain.$(OBJEXT) am_ngspice_OBJECTS = ngspice-main.$(OBJEXT) ngspice-conf.$(OBJEXT) \ ngspice-ngspice.$(OBJEXT) $(am__objects_2) ngspice_OBJECTS = $(am_ngspice_OBJECTS) @XSPICE_WANTED_TRUE@am__DEPENDENCIES_6 = xspice/cm/libcmxsp.la \ @XSPICE_WANTED_TRUE@ xspice/mif/libmifxsp.la \ @XSPICE_WANTED_TRUE@ xspice/evt/libevtxsp.la \ @XSPICE_WANTED_TRUE@ xspice/enh/libenhxsp.la \ @XSPICE_WANTED_TRUE@ xspice/ipc/libipcxsp.la \ @XSPICE_WANTED_TRUE@ xspice/idn/libidnxsp.la ngspice_DEPENDENCIES = frontend/libfte.la $(am__append_8) \ frontend/plotting/libplotting.la spicelib/devices/dev.lo \ $(am__DEPENDENCIES_1) $(am__append_9) $(am__append_10) \ spicelib/analysis/libckt.la spicelib/devices/libdev.la \ $(am__append_11) $(am__DEPENDENCIES_6) \ frontend/parser/libparser.la frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la spicelib/parser/libinp.la \ $(am__append_13) maths/deriv/libderiv.la \ maths/cmaths/libcmaths.la maths/misc/libmathmisc.la \ maths/fft/libmathfft.la maths/poly/libpoly.la \ maths/ni/libni.la maths/sparse/libsparse.la misc/libmisc.la \ $(am__append_14) DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libngspice_la_SOURCES) $(libspice_la_SOURCES) \ $(nghelp_SOURCES) $(ngmakeidx_SOURCES) $(ngmultidec_SOURCES) \ $(ngnutmeg_SOURCES) $(ngproc2mod_SOURCES) \ $(ngsconvert_SOURCES) $(ngspice_SOURCES) DIST_SOURCES = $(am__libngspice_la_SOURCES_DIST) \ $(am__libspice_la_SOURCES_DIST) $(am__nghelp_SOURCES_DIST) \ $(am__ngmakeidx_SOURCES_DIST) $(am__ngmultidec_SOURCES_DIST) \ $(am__ngnutmeg_SOURCES_DIST) $(am__ngproc2mod_SOURCES_DIST) \ $(am__ngsconvert_SOURCES_DIST) $(am__ngspice_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(helpdata_DATA) $(initdata_DATA) $(pkgIndex_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include -I$(top_srcdir)/src/spicelib/devices @X_CFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ @X_LIBS@ @X_PRE_LIBS@ @X_EXTRA_LIBS@ $(am__append_19) \ $(am__append_21) $(am__append_30) LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = misc maths frontend spicelib include/ngspice $(am__append_1) \ $(am__append_2) $(am__append_3) DIST_SUBDIRS = misc maths frontend spicelib include/ngspice xspice ciderlib unsupported @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@helpdatadir = $(pkgdatadir)/helpdir @SHARED_MODULE_FALSE@@TCL_MODULE_FALSE@@WINGUI_FALSE@helpdata_DATA = ngspice.txt ngspice.idx EXTRA_DIST = ngspice.txt setplot spectrum devload devaxis ciderinit \ winmain.c winmain.h tclspice.c tclspice.map pkgIndex.tcl.in \ spinit.in tclspinit.in main.c sharedspice.c spice.def \ $(am__append_37) $(am__append_39) initdatadir = $(pkgdatadir)/scripts initdata_DATA = spinit setplot spectrum $(am__append_6) \ $(am__append_20) DYNAMIC_DEVICELIBS = \ spicelib/devices/asrc/libasrc.la \ spicelib/devices/bjt/libbjt.la \ spicelib/devices/bsim1/libbsim1.la \ spicelib/devices/bsim2/libbsim2.la \ spicelib/devices/bsim3/libbsim3.la \ spicelib/devices/bsim3v0/libbsim3v0.la \ spicelib/devices/bsim3v1/libbsim3v1.la \ spicelib/devices/bsim3v32/libbsim3v32.la \ spicelib/devices/bsim4/libbsim4.la \ spicelib/devices/bsim4v4/libbsim4v4.la \ spicelib/devices/bsim4v5/libbsim4v5.la \ spicelib/devices/bsim4v6/libbsim4v6.la \ spicelib/devices/cap/libcap.la \ spicelib/devices/bsim3soi_pd/libbsim3soipd.la \ spicelib/devices/bsim3soi_fd/libbsim3soifd.la \ spicelib/devices/bsim3soi_dd/libbsim3soidd.la \ spicelib/devices/bsimsoi/libbsim4soi.la \ spicelib/devices/cccs/libcccs.la \ spicelib/devices/ccvs/libccvs.la \ spicelib/devices/cpl/libcpl.la \ spicelib/devices/csw/libcsw.la \ spicelib/devices/dio/libdio.la \ spicelib/devices/ind/libind.la \ spicelib/devices/isrc/libisrc.la \ spicelib/devices/hfet1/libhfet.la \ spicelib/devices/hfet2/libhfet2.la \ spicelib/devices/hisim2/libhisim2.la \ spicelib/devices/hisimhv1/libhisimhv1.la \ spicelib/devices/jfet/libjfet.la \ spicelib/devices/jfet2/libjfet2.la \ spicelib/devices/ltra/libltra.la \ spicelib/devices/mes/libmes.la \ spicelib/devices/mesa/libmesa.la \ spicelib/devices/mos1/libmos1.la \ spicelib/devices/mos2/libmos2.la \ spicelib/devices/mos3/libmos3.la \ spicelib/devices/mos6/libmos6.la \ spicelib/devices/mos9/libmos9.la \ spicelib/devices/res/libres.la \ spicelib/devices/soi3/libsoi3.la \ spicelib/devices/sw/libsw.la \ spicelib/devices/txl/libtxl.la \ spicelib/devices/tra/libtra.la \ spicelib/devices/urc/liburc.la \ spicelib/devices/vbic/libvbic.la \ spicelib/devices/vccs/libvccs.la \ spicelib/devices/vcvs/libvcvs.la \ spicelib/devices/vsrc/libvsrc.la \ @VLADEV@ ngspice_SOURCES = main.c conf.c conf.h ngspice.c $(am__append_7) ngspice_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR ngspice_LDADD = frontend/libfte.la $(am__append_8) \ frontend/plotting/libplotting.la spicelib/devices/dev.lo \ $(DYNAMIC_DEVICELIBS) $(am__append_9) $(am__append_10) \ spicelib/analysis/libckt.la spicelib/devices/libdev.la \ $(am__append_11) $(am__append_12) frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la spicelib/parser/libinp.la \ $(am__append_13) maths/deriv/libderiv.la \ maths/cmaths/libcmaths.la maths/misc/libmathmisc.la \ maths/fft/libmathfft.la maths/poly/libpoly.la \ maths/ni/libni.la maths/sparse/libsparse.la misc/libmisc.la \ $(am__append_14) ngnutmeg_SOURCES = main.c conf.c conf.h ngnutmeg.c $(am__append_15) ngnutmeg_CPPFLAGS = $(AM_CPPFLAGS) ngnutmeg_LDADD = frontend/libfte.la $(am__append_16) \ frontend/plotting/libplotting.la frontend/parser/libparser.la \ frontend/numparam/libnumparam.la \ frontend/trannoise/libtrannoise.la maths/cmaths/libcmaths.la \ maths/misc/libmathmisc.la maths/fft/libmathfft.la \ maths/poly/libpoly.la misc/libmisc.la \ spicelib/parser/libinp.la $(am__append_17) @SHWIN_FALSE@@WINGUI_FALSE@nghelp_SOURCES = conf.c nghelp.c # We keep the libraries to a minimum here and link against terminal.o # rather than the full front-end library libfte.a to avoid link errors that # that would otherwise occur (thanks to Andreas Unger for this fix). @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@nghelp_LDADD = frontend/terminal.lo \ @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la \ @NO_HELP_FALSE@@SHWIN_FALSE@@WINGUI_FALSE@ $(am__append_18) @SHWIN_FALSE@@WINGUI_FALSE@ngsconvert_SOURCES = ngsconvert.c @SHWIN_FALSE@@WINGUI_FALSE@ngsconvert_LDADD = \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/libfte.la \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/parser/libparser.la \ @SHWIN_FALSE@@WINGUI_FALSE@ maths/misc/libmathmisc.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la @SHWIN_FALSE@@WINGUI_FALSE@ngproc2mod_SOURCES = ngproc2mod.c @SHWIN_FALSE@@WINGUI_FALSE@ngproc2mod_LDADD = \ @SHWIN_FALSE@@WINGUI_FALSE@ frontend/parser/libparser.la \ @SHWIN_FALSE@@WINGUI_FALSE@ spicelib/parser/libinp.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la @SHWIN_FALSE@@WINGUI_FALSE@ngmultidec_SOURCES = ngmultidec.c @SHWIN_FALSE@@WINGUI_FALSE@ngmultidec_LDADD = \ @SHWIN_FALSE@@WINGUI_FALSE@ maths/sparse/libsparse.la \ @SHWIN_FALSE@@WINGUI_FALSE@ misc/libmisc.la @SHWIN_FALSE@@WINGUI_FALSE@ngmakeidx_SOURCES = makeidx.c edit = sed \ -e 's|@XSPICEINIT[@]|$(XSPICEINIT)|g' \ -e 's|@pkglibdir[@]|$(pkglibdir)|g' AM_CFLAGS = -static CLEANFILES = ngspice.idx spinit tclspinit pkgIndex.tcl MAINTAINERCLEANFILES = Makefile.in @SHARED_MODULE_TRUE@lib_LTLIBRARIES = libngspice.la @TCL_MODULE_TRUE@lib_LTLIBRARIES = libspice.la @TCL_MODULE_TRUE@pkgIndex_DATA = pkgIndex.tcl @TCL_MODULE_TRUE@pkgIndexdir = $(pkglibdir) @TCL_MODULE_TRUE@libspice_la_SOURCES = \ @TCL_MODULE_TRUE@ main.c \ @TCL_MODULE_TRUE@ conf.c \ @TCL_MODULE_TRUE@ conf.h \ @TCL_MODULE_TRUE@ ngspice.c \ @TCL_MODULE_TRUE@ tclspice.c @TCL_MODULE_TRUE@libspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \ @TCL_MODULE_TRUE@ -DTCLSPICE_version="\"$(TCLSPICE_VERSION)\"" @TCL_MODULE_TRUE@libspice_la_LIBADD = @X_LIBS@ frontend/libfte.la \ @TCL_MODULE_TRUE@ $(am__append_22) \ @TCL_MODULE_TRUE@ frontend/plotting/libplotting.la \ @TCL_MODULE_TRUE@ $(am__append_23) $(DYNAMIC_DEVICELIBS) \ @TCL_MODULE_TRUE@ $(am__append_24) $(am__append_25) \ @TCL_MODULE_TRUE@ spicelib/analysis/libckt.la \ @TCL_MODULE_TRUE@ spicelib/devices/libdev.la $(am__append_26) \ @TCL_MODULE_TRUE@ frontend/parser/libparser.la \ @TCL_MODULE_TRUE@ frontend/numparam/libnumparam.la \ @TCL_MODULE_TRUE@ frontend/trannoise/libtrannoise.la \ @TCL_MODULE_TRUE@ spicelib/parser/libinp.la $(am__append_27) \ @TCL_MODULE_TRUE@ maths/deriv/libderiv.la \ @TCL_MODULE_TRUE@ maths/cmaths/libcmaths.la \ @TCL_MODULE_TRUE@ maths/misc/libmathmisc.la \ @TCL_MODULE_TRUE@ maths/fft/libmathfft.la maths/poly/libpoly.la \ @TCL_MODULE_TRUE@ maths/ni/libni.la maths/sparse/libsparse.la \ @TCL_MODULE_TRUE@ misc/libmisc.la $(LIBS) @TCL_MODULE_TRUE@libspice_la_CFLAGS = -shared @TCL_MODULE_TRUE@libspice_la_LDFLAGS = -shared \ @TCL_MODULE_TRUE@ -Wl,--version-script=$(srcdir)/tclspice.map \ @TCL_MODULE_TRUE@ $(am__append_28) $(am__append_29) @TCL_MODULE_TRUE@TCLSPICE_VERSION = @VERSION@ @TCL_MODULE_TRUE@pkgIndex_edit = sed \ @TCL_MODULE_TRUE@ -e 's|%LIB_DIR%|$(libdir)|g' \ @TCL_MODULE_TRUE@ -e 's|%VERSION%|$(TCLSPICE_VERSION)|g' @SHARED_MODULE_TRUE@libngspice_la_SOURCES = \ @SHARED_MODULE_TRUE@ main.c \ @SHARED_MODULE_TRUE@ conf.c \ @SHARED_MODULE_TRUE@ conf.h \ @SHARED_MODULE_TRUE@ ngspice.c \ @SHARED_MODULE_TRUE@ sharedspice.c @SHARED_MODULE_TRUE@libngspice_la_CPPFLAGS = $(AM_CPPFLAGS) -DSIMULATOR \ @SHARED_MODULE_TRUE@ -DSHAREDSPICE_version="\"$(SHAREDSPICE_VERSION)\"" @SHARED_MODULE_TRUE@libngspice_la_LIBADD = @X_LIBS@ frontend/libfte.la \ @SHARED_MODULE_TRUE@ frontend/plotting/libplotting.la \ @SHARED_MODULE_TRUE@ $(am__append_31) $(DYNAMIC_DEVICELIBS) \ @SHARED_MODULE_TRUE@ $(am__append_32) $(am__append_33) \ @SHARED_MODULE_TRUE@ spicelib/analysis/libckt.la \ @SHARED_MODULE_TRUE@ spicelib/devices/libdev.la \ @SHARED_MODULE_TRUE@ $(am__append_34) \ @SHARED_MODULE_TRUE@ frontend/parser/libparser.la \ @SHARED_MODULE_TRUE@ frontend/numparam/libnumparam.la \ @SHARED_MODULE_TRUE@ frontend/trannoise/libtrannoise.la \ @SHARED_MODULE_TRUE@ spicelib/parser/libinp.la $(am__append_35) \ @SHARED_MODULE_TRUE@ maths/deriv/libderiv.la \ @SHARED_MODULE_TRUE@ maths/cmaths/libcmaths.la \ @SHARED_MODULE_TRUE@ maths/misc/libmathmisc.la \ @SHARED_MODULE_TRUE@ maths/fft/libmathfft.la \ @SHARED_MODULE_TRUE@ maths/poly/libpoly.la maths/ni/libni.la \ @SHARED_MODULE_TRUE@ maths/sparse/libsparse.la misc/libmisc.la \ @SHARED_MODULE_TRUE@ $(LIBS) $(OPENMP_CFLAGS) @SHARED_MODULE_TRUE@libngspice_la_CFLAGS = -shared @SHARED_MODULE_TRUE@libngspice_la_LDFLAGS = -shared $(am__append_36) \ @SHARED_MODULE_TRUE@ $(am__append_38) @SHARED_MODULE_TRUE@SHAREDSPICE_VERSION = @VERSION@ all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libngspice.la: $(libngspice_la_OBJECTS) $(libngspice_la_DEPENDENCIES) $(EXTRA_libngspice_la_DEPENDENCIES) $(AM_V_CCLD)$(libngspice_la_LINK) $(am_libngspice_la_rpath) $(libngspice_la_OBJECTS) $(libngspice_la_LIBADD) $(LIBS) libspice.la: $(libspice_la_OBJECTS) $(libspice_la_DEPENDENCIES) $(EXTRA_libspice_la_DEPENDENCIES) $(AM_V_CCLD)$(libspice_la_LINK) $(am_libspice_la_rpath) $(libspice_la_OBJECTS) $(libspice_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list nghelp$(EXEEXT): $(nghelp_OBJECTS) $(nghelp_DEPENDENCIES) $(EXTRA_nghelp_DEPENDENCIES) @rm -f nghelp$(EXEEXT) $(AM_V_CCLD)$(LINK) $(nghelp_OBJECTS) $(nghelp_LDADD) $(LIBS) ngmakeidx$(EXEEXT): $(ngmakeidx_OBJECTS) $(ngmakeidx_DEPENDENCIES) $(EXTRA_ngmakeidx_DEPENDENCIES) @rm -f ngmakeidx$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngmakeidx_OBJECTS) $(ngmakeidx_LDADD) $(LIBS) ngmultidec$(EXEEXT): $(ngmultidec_OBJECTS) $(ngmultidec_DEPENDENCIES) $(EXTRA_ngmultidec_DEPENDENCIES) @rm -f ngmultidec$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngmultidec_OBJECTS) $(ngmultidec_LDADD) $(LIBS) ngnutmeg$(EXEEXT): $(ngnutmeg_OBJECTS) $(ngnutmeg_DEPENDENCIES) $(EXTRA_ngnutmeg_DEPENDENCIES) @rm -f ngnutmeg$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngnutmeg_OBJECTS) $(ngnutmeg_LDADD) $(LIBS) ngproc2mod$(EXEEXT): $(ngproc2mod_OBJECTS) $(ngproc2mod_DEPENDENCIES) $(EXTRA_ngproc2mod_DEPENDENCIES) @rm -f ngproc2mod$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngproc2mod_OBJECTS) $(ngproc2mod_LDADD) $(LIBS) ngsconvert$(EXEEXT): $(ngsconvert_OBJECTS) $(ngsconvert_DEPENDENCIES) $(EXTRA_ngsconvert_DEPENDENCIES) @rm -f ngsconvert$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngsconvert_OBJECTS) $(ngsconvert_LDADD) $(LIBS) ngspice$(EXEEXT): $(ngspice_OBJECTS) $(ngspice_DEPENDENCIES) $(EXTRA_ngspice_DEPENDENCIES) @rm -f ngspice$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ngspice_OBJECTS) $(ngspice_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngspice_la-conf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngspice_la-main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngspice_la-ngspice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libngspice_la-sharedspice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspice_la-conf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspice_la-main.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspice_la-ngspice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libspice_la-tclspice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/makeidx.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nghelp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngmultidec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngnutmeg-conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngnutmeg-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngnutmeg-ngnutmeg.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngnutmeg-winmain.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngproc2mod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngsconvert.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngspice-conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngspice-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngspice-ngspice.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ngspice-winmain.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libngspice_la-main.lo: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -MT libngspice_la-main.lo -MD -MP -MF $(DEPDIR)/libngspice_la-main.Tpo -c -o libngspice_la-main.lo `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngspice_la-main.Tpo $(DEPDIR)/libngspice_la-main.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='libngspice_la-main.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -c -o libngspice_la-main.lo `test -f 'main.c' || echo '$(srcdir)/'`main.c libngspice_la-conf.lo: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -MT libngspice_la-conf.lo -MD -MP -MF $(DEPDIR)/libngspice_la-conf.Tpo -c -o libngspice_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngspice_la-conf.Tpo $(DEPDIR)/libngspice_la-conf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='libngspice_la-conf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -c -o libngspice_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c libngspice_la-ngspice.lo: ngspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -MT libngspice_la-ngspice.lo -MD -MP -MF $(DEPDIR)/libngspice_la-ngspice.Tpo -c -o libngspice_la-ngspice.lo `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngspice_la-ngspice.Tpo $(DEPDIR)/libngspice_la-ngspice.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngspice.c' object='libngspice_la-ngspice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -c -o libngspice_la-ngspice.lo `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c libngspice_la-sharedspice.lo: sharedspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -MT libngspice_la-sharedspice.lo -MD -MP -MF $(DEPDIR)/libngspice_la-sharedspice.Tpo -c -o libngspice_la-sharedspice.lo `test -f 'sharedspice.c' || echo '$(srcdir)/'`sharedspice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libngspice_la-sharedspice.Tpo $(DEPDIR)/libngspice_la-sharedspice.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sharedspice.c' object='libngspice_la-sharedspice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libngspice_la_CPPFLAGS) $(CPPFLAGS) $(libngspice_la_CFLAGS) $(CFLAGS) -c -o libngspice_la-sharedspice.lo `test -f 'sharedspice.c' || echo '$(srcdir)/'`sharedspice.c libspice_la-main.lo: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -MT libspice_la-main.lo -MD -MP -MF $(DEPDIR)/libspice_la-main.Tpo -c -o libspice_la-main.lo `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspice_la-main.Tpo $(DEPDIR)/libspice_la-main.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='libspice_la-main.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -c -o libspice_la-main.lo `test -f 'main.c' || echo '$(srcdir)/'`main.c libspice_la-conf.lo: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -MT libspice_la-conf.lo -MD -MP -MF $(DEPDIR)/libspice_la-conf.Tpo -c -o libspice_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspice_la-conf.Tpo $(DEPDIR)/libspice_la-conf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='libspice_la-conf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -c -o libspice_la-conf.lo `test -f 'conf.c' || echo '$(srcdir)/'`conf.c libspice_la-ngspice.lo: ngspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -MT libspice_la-ngspice.lo -MD -MP -MF $(DEPDIR)/libspice_la-ngspice.Tpo -c -o libspice_la-ngspice.lo `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspice_la-ngspice.Tpo $(DEPDIR)/libspice_la-ngspice.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngspice.c' object='libspice_la-ngspice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -c -o libspice_la-ngspice.lo `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c libspice_la-tclspice.lo: tclspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -MT libspice_la-tclspice.lo -MD -MP -MF $(DEPDIR)/libspice_la-tclspice.Tpo -c -o libspice_la-tclspice.lo `test -f 'tclspice.c' || echo '$(srcdir)/'`tclspice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libspice_la-tclspice.Tpo $(DEPDIR)/libspice_la-tclspice.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tclspice.c' object='libspice_la-tclspice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libspice_la_CPPFLAGS) $(CPPFLAGS) $(libspice_la_CFLAGS) $(CFLAGS) -c -o libspice_la-tclspice.lo `test -f 'tclspice.c' || echo '$(srcdir)/'`tclspice.c ngnutmeg-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-main.o -MD -MP -MF $(DEPDIR)/ngnutmeg-main.Tpo -c -o ngnutmeg-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-main.Tpo $(DEPDIR)/ngnutmeg-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='ngnutmeg-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c ngnutmeg-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-main.obj -MD -MP -MF $(DEPDIR)/ngnutmeg-main.Tpo -c -o ngnutmeg-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-main.Tpo $(DEPDIR)/ngnutmeg-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='ngnutmeg-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` ngnutmeg-conf.o: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-conf.o -MD -MP -MF $(DEPDIR)/ngnutmeg-conf.Tpo -c -o ngnutmeg-conf.o `test -f 'conf.c' || echo '$(srcdir)/'`conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-conf.Tpo $(DEPDIR)/ngnutmeg-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='ngnutmeg-conf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-conf.o `test -f 'conf.c' || echo '$(srcdir)/'`conf.c ngnutmeg-conf.obj: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-conf.obj -MD -MP -MF $(DEPDIR)/ngnutmeg-conf.Tpo -c -o ngnutmeg-conf.obj `if test -f 'conf.c'; then $(CYGPATH_W) 'conf.c'; else $(CYGPATH_W) '$(srcdir)/conf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-conf.Tpo $(DEPDIR)/ngnutmeg-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='ngnutmeg-conf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-conf.obj `if test -f 'conf.c'; then $(CYGPATH_W) 'conf.c'; else $(CYGPATH_W) '$(srcdir)/conf.c'; fi` ngnutmeg-ngnutmeg.o: ngnutmeg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-ngnutmeg.o -MD -MP -MF $(DEPDIR)/ngnutmeg-ngnutmeg.Tpo -c -o ngnutmeg-ngnutmeg.o `test -f 'ngnutmeg.c' || echo '$(srcdir)/'`ngnutmeg.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-ngnutmeg.Tpo $(DEPDIR)/ngnutmeg-ngnutmeg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngnutmeg.c' object='ngnutmeg-ngnutmeg.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-ngnutmeg.o `test -f 'ngnutmeg.c' || echo '$(srcdir)/'`ngnutmeg.c ngnutmeg-ngnutmeg.obj: ngnutmeg.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-ngnutmeg.obj -MD -MP -MF $(DEPDIR)/ngnutmeg-ngnutmeg.Tpo -c -o ngnutmeg-ngnutmeg.obj `if test -f 'ngnutmeg.c'; then $(CYGPATH_W) 'ngnutmeg.c'; else $(CYGPATH_W) '$(srcdir)/ngnutmeg.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-ngnutmeg.Tpo $(DEPDIR)/ngnutmeg-ngnutmeg.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngnutmeg.c' object='ngnutmeg-ngnutmeg.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-ngnutmeg.obj `if test -f 'ngnutmeg.c'; then $(CYGPATH_W) 'ngnutmeg.c'; else $(CYGPATH_W) '$(srcdir)/ngnutmeg.c'; fi` ngnutmeg-winmain.o: winmain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-winmain.o -MD -MP -MF $(DEPDIR)/ngnutmeg-winmain.Tpo -c -o ngnutmeg-winmain.o `test -f 'winmain.c' || echo '$(srcdir)/'`winmain.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-winmain.Tpo $(DEPDIR)/ngnutmeg-winmain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='winmain.c' object='ngnutmeg-winmain.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-winmain.o `test -f 'winmain.c' || echo '$(srcdir)/'`winmain.c ngnutmeg-winmain.obj: winmain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngnutmeg-winmain.obj -MD -MP -MF $(DEPDIR)/ngnutmeg-winmain.Tpo -c -o ngnutmeg-winmain.obj `if test -f 'winmain.c'; then $(CYGPATH_W) 'winmain.c'; else $(CYGPATH_W) '$(srcdir)/winmain.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngnutmeg-winmain.Tpo $(DEPDIR)/ngnutmeg-winmain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='winmain.c' object='ngnutmeg-winmain.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngnutmeg_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngnutmeg-winmain.obj `if test -f 'winmain.c'; then $(CYGPATH_W) 'winmain.c'; else $(CYGPATH_W) '$(srcdir)/winmain.c'; fi` ngspice-main.o: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-main.o -MD -MP -MF $(DEPDIR)/ngspice-main.Tpo -c -o ngspice-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-main.Tpo $(DEPDIR)/ngspice-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='ngspice-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-main.o `test -f 'main.c' || echo '$(srcdir)/'`main.c ngspice-main.obj: main.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-main.obj -MD -MP -MF $(DEPDIR)/ngspice-main.Tpo -c -o ngspice-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-main.Tpo $(DEPDIR)/ngspice-main.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='main.c' object='ngspice-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-main.obj `if test -f 'main.c'; then $(CYGPATH_W) 'main.c'; else $(CYGPATH_W) '$(srcdir)/main.c'; fi` ngspice-conf.o: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-conf.o -MD -MP -MF $(DEPDIR)/ngspice-conf.Tpo -c -o ngspice-conf.o `test -f 'conf.c' || echo '$(srcdir)/'`conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-conf.Tpo $(DEPDIR)/ngspice-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='ngspice-conf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-conf.o `test -f 'conf.c' || echo '$(srcdir)/'`conf.c ngspice-conf.obj: conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-conf.obj -MD -MP -MF $(DEPDIR)/ngspice-conf.Tpo -c -o ngspice-conf.obj `if test -f 'conf.c'; then $(CYGPATH_W) 'conf.c'; else $(CYGPATH_W) '$(srcdir)/conf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-conf.Tpo $(DEPDIR)/ngspice-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conf.c' object='ngspice-conf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-conf.obj `if test -f 'conf.c'; then $(CYGPATH_W) 'conf.c'; else $(CYGPATH_W) '$(srcdir)/conf.c'; fi` ngspice-ngspice.o: ngspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-ngspice.o -MD -MP -MF $(DEPDIR)/ngspice-ngspice.Tpo -c -o ngspice-ngspice.o `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-ngspice.Tpo $(DEPDIR)/ngspice-ngspice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngspice.c' object='ngspice-ngspice.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-ngspice.o `test -f 'ngspice.c' || echo '$(srcdir)/'`ngspice.c ngspice-ngspice.obj: ngspice.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-ngspice.obj -MD -MP -MF $(DEPDIR)/ngspice-ngspice.Tpo -c -o ngspice-ngspice.obj `if test -f 'ngspice.c'; then $(CYGPATH_W) 'ngspice.c'; else $(CYGPATH_W) '$(srcdir)/ngspice.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-ngspice.Tpo $(DEPDIR)/ngspice-ngspice.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ngspice.c' object='ngspice-ngspice.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-ngspice.obj `if test -f 'ngspice.c'; then $(CYGPATH_W) 'ngspice.c'; else $(CYGPATH_W) '$(srcdir)/ngspice.c'; fi` ngspice-winmain.o: winmain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-winmain.o -MD -MP -MF $(DEPDIR)/ngspice-winmain.Tpo -c -o ngspice-winmain.o `test -f 'winmain.c' || echo '$(srcdir)/'`winmain.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-winmain.Tpo $(DEPDIR)/ngspice-winmain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='winmain.c' object='ngspice-winmain.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-winmain.o `test -f 'winmain.c' || echo '$(srcdir)/'`winmain.c ngspice-winmain.obj: winmain.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ngspice-winmain.obj -MD -MP -MF $(DEPDIR)/ngspice-winmain.Tpo -c -o ngspice-winmain.obj `if test -f 'winmain.c'; then $(CYGPATH_W) 'winmain.c'; else $(CYGPATH_W) '$(srcdir)/winmain.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ngspice-winmain.Tpo $(DEPDIR)/ngspice-winmain.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='winmain.c' object='ngspice-winmain.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ngspice_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ngspice-winmain.obj `if test -f 'winmain.c'; then $(CYGPATH_W) 'winmain.c'; else $(CYGPATH_W) '$(srcdir)/winmain.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-helpdataDATA: $(helpdata_DATA) @$(NORMAL_INSTALL) @list='$(helpdata_DATA)'; test -n "$(helpdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(helpdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(helpdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(helpdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(helpdatadir)" || exit $$?; \ done uninstall-helpdataDATA: @$(NORMAL_UNINSTALL) @list='$(helpdata_DATA)'; test -n "$(helpdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(helpdatadir)'; $(am__uninstall_files_from_dir) install-initdataDATA: $(initdata_DATA) @$(NORMAL_INSTALL) @list='$(initdata_DATA)'; test -n "$(initdatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(initdatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(initdatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(initdatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(initdatadir)" || exit $$?; \ done uninstall-initdataDATA: @$(NORMAL_UNINSTALL) @list='$(initdata_DATA)'; test -n "$(initdatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(initdatadir)'; $(am__uninstall_files_from_dir) install-pkgIndexDATA: $(pkgIndex_DATA) @$(NORMAL_INSTALL) @list='$(pkgIndex_DATA)'; test -n "$(pkgIndexdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgIndexdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgIndexdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgIndexdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgIndexdir)" || exit $$?; \ done uninstall-pkgIndexDATA: @$(NORMAL_UNINSTALL) @list='$(pkgIndex_DATA)'; test -n "$(pkgIndexdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgIndexdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(helpdatadir)" "$(DESTDIR)$(initdatadir)" "$(DESTDIR)$(pkgIndexdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ clean-libtool mostlyclean-am distclean: distclean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-helpdataDATA install-initdataDATA \ install-pkgIndexDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-helpdataDATA \ uninstall-initdataDATA uninstall-libLTLIBRARIES \ uninstall-pkgIndexDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libLTLIBRARIES clean-libtool ctags \ ctags-recursive distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-helpdataDATA install-html \ install-html-am install-info install-info-am \ install-initdataDATA install-libLTLIBRARIES install-man \ install-pdf install-pdf-am install-pkgIndexDATA install-ps \ install-ps-am install-strip installcheck installcheck-am \ installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-recursive uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-helpdataDATA \ uninstall-initdataDATA uninstall-libLTLIBRARIES \ uninstall-pkgIndexDATA @SHWIN_FALSE@@WINGUI_FALSE@ngspice.idx: ngmakeidx$(EXEEXT) $(srcdir)/ngspice.txt @SHWIN_FALSE@@WINGUI_FALSE@ ./ngmakeidx$(EXEEXT) -o ngspice.idx $(srcdir)/ngspice.txt spinit tclspinit : Makefile rm -f $@ $@.tmp srcdir=''; \ test -f ./$@.in || srcdir=$(srcdir)/; \ $(edit) $${srcdir}$@.in >$@.tmp mv $@.tmp $@ spinit: $(srcdir)/spinit.in tclspinit: $(srcdir)/tclspinit.in @TCL_MODULE_TRUE@pkgIndex.tcl : Makefile @TCL_MODULE_TRUE@ rm -f $@ $@.tmp @TCL_MODULE_TRUE@ srcdir=''; \ @TCL_MODULE_TRUE@ test -f ./$@.in || srcdir=$(srcdir)/; \ @TCL_MODULE_TRUE@ $(pkgIndex_edit) $${srcdir}$@.in >$@.tmp @TCL_MODULE_TRUE@ mv $@.tmp $@ @TCL_MODULE_TRUE@pkgIndex.tcl: $(srcdir)/pkgIndex.tcl.in # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/main.c0000644000265600020320000011252212264261473014113 0ustar andreasadmin/* Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher The main routine for ngspice */ #include "ngspice/ngspice.h" #ifdef HAVE_ASPRINTF # ifdef HAVE_LIBIBERTY_H /* asprintf */ # include # elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ # include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); # endif #endif #include #include /* Added GNU Readline Support 11/3/97 -- Andrew Veliath */ /* from spice3f4 patch to ng-spice. jmr */ #ifdef HAVE_GNUREADLINE # include # include #endif /* SJB added editline support 2005-05-05 */ #ifdef HAVE_BSDEDITLINE # include extern VFunction *rl_event_hook; /* missing from editline/readline.h */ extern int rl_catch_signals; /* missing from editline/readline.h */ #endif #include "ngspice/iferrmsg.h" #include "ngspice/ftedefs.h" #include "ngspice/devdefs.h" #include "spicelib/devices/dev.h" #include "spicelib/analysis/analysis.h" #include "misc/ivars.h" #include "misc/misc_time.h" #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) # include "misc/mktemp.h" #endif #if defined(HAVE_GETOPT_LONG) && defined(HAVE_GETOPT_H) # include #else # include "misc/getopt_bsd.h" #endif #include "frontend/spiceif.h" #include "frontend/resource.h" #include "frontend/variable.h" #include "frontend/display.h" /* added by SDB to pick up Input() fcn */ #include "frontend/signal_handler.h" #include "frontend/misccoms.h" #include "ngspice/compatmode.h" /* saj xspice headers */ #ifdef XSPICE # include "ngspice/ipctiein.h" # include "ngspice/mif.h" # include "ngspice/enh.h" # include "ngspice/mifproto.h" # include "ngspice/evtproto.h" #endif #ifdef CIDER # include "ngspice/numenum.h" # include "maths/misc/accuracy.h" #endif #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) char history_file[512] = {'\0'}; static char *application_name; #endif /* Undefine this next line for debug tracing */ /* #define TRACE */ /* Main options */ static bool ft_servermode = FALSE; bool ft_batchmode = FALSE; bool ft_pipemode = FALSE; bool rflag = FALSE; /* has rawfile */ /* Frontend options */ bool ft_intrpt = FALSE; /* Set by the (void) signal handlers. TRUE = we've been interrupted. */ bool ft_setflag = FALSE; /* TRUE = Don't abort simulation after an interrupt. */ char *ft_rawfile = "rawspice.raw"; #ifdef HAS_WINGUI extern void winmessage(char *new_msg); /* display a message box (defined in winmain.c)*/ extern void SetSource( char *Name); /* display the source file name in the source window */ extern int xmain(int argc, char **argv); FILE *flogp = NULL; /* log file ('-o logfile' command line option) */ #else bool orflag = FALSE; /* global for -o option */ #endif FILE *slogp = NULL; /* soa log file ('--soa-log file' command line option) */ /* Frontend and circuit options */ IFsimulator *ft_sim = NULL; char *errRtn; /* name of the routine declaring error */ char *errMsg = NULL; /* descriptive message about what went wrong */ char *cp_program; /* program name 'ngspice' */ /* Globals definitions for Machine Accuracy Limits * (needed by CIDER) */ double BMin; /* lower limit for B(x) */ double BMax; /* upper limit for B(x) */ double ExpLim; /* limit for exponential */ double Accuracy; /* accuracy of the machine */ double MuLim, MutLim; #ifdef CIDER /* Global debug flags from CIDER, soon they will become * spice variables :) */ BOOLEAN ONEacDebug = FALSE; BOOLEAN ONEdcDebug = TRUE; BOOLEAN ONEtranDebug = TRUE; BOOLEAN ONEjacDebug = FALSE; BOOLEAN TWOacDebug = FALSE; BOOLEAN TWOdcDebug = TRUE; BOOLEAN TWOtranDebug = TRUE; BOOLEAN TWOjacDebug = FALSE; /* CIDER Global Variable Declarations */ int BandGapNarrowing; int TempDepMobility, ConcDepMobility, FieldDepMobility, TransDepMobility; int SurfaceMobility, MatchingMobility, MobDeriv; int CCScattering; int Srh, Auger, ConcDepLifetime, AvalancheGen; int FreezeOut = FALSE; int OneCarrier; int MaxIterations = 100; int AcAnalysisMethod = DIRECT; double Temp, RelTemp, Vt; double RefPsi;/* potential at Infinity */ double EpsNorm, VNorm, NNorm, LNorm, TNorm, JNorm, GNorm, ENorm; /* end cider globals */ #endif /* CIDER */ struct variable *(*if_getparam)(CKTcircuit *ckt, char **name, char *param, int ind, int do_model); /* static functions */ int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator); static void sp_shutdown(int exitval); static void app_rl_readlines(void); #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) static char *prompt(void); #endif #ifndef X_DISPLAY_MISSING # include "frontend/plotting/x11.h" # ifdef HAVE_GNUREADLINE static int app_event_func(void); # endif # ifdef HAVE_BSDEDITLINE static void app_event_func(void); # endif #endif static void show_help(void); static void show_version(void); static bool read_initialisation_file(char *dir, char *name); #ifdef SIMULATOR static void append_to_stream(FILE *dest, FILE *source); #endif extern IFsimulator SIMinfo; #ifdef SIMULATOR const bool ft_nutmeg = FALSE; extern struct comm spcp_coms[ ]; struct comm *cp_coms = spcp_coms; extern int OUTpBeginPlot(CKTcircuit *,JOB *,IFuid,IFuid,int,int,IFuid *,int,runDesc **); extern int OUTpData(runDesc *,IFvalue *,IFvalue *); extern int OUTwBeginPlot(CKTcircuit *,JOB *,IFuid,IFuid,int,int,IFuid *,int,runDesc **); extern int OUTwReference(runDesc *,IFvalue *,void **); extern int OUTwData(runDesc *,int,IFvalue *,void *), OUTwEnd(runDesc *), OUTendPlot(runDesc *); extern int OUTbeginDomain(runDesc *,IFuid,int,IFvalue *); extern int OUTendDomain(runDesc *), OUTstopnow(void), OUTerror(int,char *,IFuid *); extern int OUTattributes(runDesc *,IFuid,int,IFvalue *); extern void initw(void); IFfrontEnd nutmeginfo = { IFnewUid, IFdelUid, OUTstopnow, seconds, OUTerror, OUTpBeginPlot, OUTpData, OUTwBeginPlot, OUTwReference, OUTwData, OUTwEnd, OUTendPlot, OUTbeginDomain, OUTendDomain, OUTattributes }; #else /* SIMULATOR */ const bool ft_nutmeg = TRUE; extern struct comm nutcp_coms[ ]; struct comm *cp_coms = nutcp_coms; IFfrontEnd nutmeginfo; /* -------------------------------------------------------------------------- */ int if_run(CKTcircuit *t, char *w, wordlist *s, INPtables *b) { NG_IGNORE(b); NG_IGNORE(s); NG_IGNORE(w); NG_IGNORE(t); return (0); } /* -------------------------------------------------------------------------- */ int if_sens_run(CKTcircuit *t, wordlist *args, INPtables *tab) { NG_IGNORE(tab); NG_IGNORE(args); NG_IGNORE(t); return (0); } /* -------------------------------------------------------------------------- */ void if_dump(CKTcircuit *ckt, FILE *fp) { NG_IGNORE(fp); NG_IGNORE(ckt); return; } /* -------------------------------------------------------------------------- */ CKTcircuit * if_inpdeck(struct line *deck, INPtables **tab) { NG_IGNORE(tab); NG_IGNORE(deck); return NULL; } /* -------------------------------------------------------------------------- */ int if_option(CKTcircuit *ckt, char *name, enum cp_types type, void *value) { NG_IGNORE(value); NG_IGNORE(type); NG_IGNORE(name); NG_IGNORE(ckt); return 0; } /* -------------------------------------------------------------------------- */ void if_cktfree(CKTcircuit *ckt, INPtables *tab) { NG_IGNORE(tab); NG_IGNORE(ckt); return; } /* -------------------------------------------------------------------------- */ void if_setndnames(char *line) { NG_IGNORE(line); } /* -------------------------------------------------------------------------- */ char * if_errstring(int code) { NG_IGNORE(code); return ("spice error"); } /* -------------------------------------------------------------------------- */ void if_setparam_model(CKTcircuit *ckt, char **name, char *val) { NG_IGNORE(val); NG_IGNORE(name); NG_IGNORE(ckt); return; } void if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_model) { NG_IGNORE(do_model); NG_IGNORE(val); NG_IGNORE(param); NG_IGNORE(name); NG_IGNORE(ckt); return; } /* -------------------------------------------------------------------------- */ bool if_tranparams(struct circ *ckt, double *start, double *stop, double *step) { NG_IGNORE(step); NG_IGNORE(stop); NG_IGNORE(start); NG_IGNORE(ckt); return (FALSE); } /* -------------------------------------------------------------------------- */ struct variable * if_getstat(CKTcircuit *ckt, char *name) { NG_IGNORE(name); NG_IGNORE(ckt); return (NULL); } void com_snload(wordlist *wl) { NG_IGNORE(wl); } void com_snsave(wordlist *wl) { NG_IGNORE(wl); } void SMPprint( SMPmatrix *n1 , char *n2) { NG_IGNORE(n1); NG_IGNORE(n2); return; } void SMPprintRHS( SMPmatrix *n1, char *n2 , double* n3 , double* n4) { NG_IGNORE(n1); NG_IGNORE(n2); NG_IGNORE(n3); NG_IGNORE(n4); return; } void spice_destroy_devices(void) { } #endif /* SIMULATOR */ #ifndef SIMULATOR #ifdef XSPICE /* saj to get nutmeg to compile, not nice but necessary */ Ipc_Tiein_t g_ipc; Ipc_Status_t ipc_send_errchk(void ) { Ipc_Status_t x = IPC_STATUS_OK; return(x); } Ipc_Status_t ipc_get_line(char *str , int *len , Ipc_Wait_t wait ){ Ipc_Status_t x = IPC_STATUS_OK; NG_IGNORE(str); NG_IGNORE(len); NG_IGNORE(wait); return(x); } struct line *ENHtranslate_poly(struct line *deck){ NG_IGNORE(deck); return(NULL); } int load_opus(char *name){ NG_IGNORE(name); return(1); } char *MIFgettok(char **s){ NG_IGNORE(s); return(NULL); } void EVTprint(wordlist *wl){ NG_IGNORE(wl); return; } struct dvec *EVTfindvec(char *node){ NG_IGNORE(node); return NULL; } #endif /* XSPICE */ #endif /* SIMULATOR */ char *hlp_filelist[] = { "ngspice", 0 }; /* allocate space for global constants in 'CONST.h' */ double CONSTroot2; double CONSTvt0; double CONSTKoverQ; double CONSTe; IFfrontEnd *SPfrontEnd = NULL; int DEVmaxnum = 0; /* -------------------------------------------------------------------------- */ /* Set a compatibility flag. Currently available are flags for: - ngspice (standard) - a commercial simulator - Spice3 - all compatibility stuff */ COMPATMODE_T ngspice_compat_mode(void) { char behaviour[80] ; if( cp_getvar("ngbehavior", CP_STRING, behaviour)){ if (strcasecmp(behaviour, "all")==0) return( COMPATMODE_ALL ) ; if (strcasecmp(behaviour, "hs")==0) return( COMPATMODE_HS ) ; if (strcasecmp(behaviour, "ps")==0) return( COMPATMODE_PS ) ; if (strcasecmp(behaviour, "spice3")==0) return( COMPATMODE_SPICE3 ) ; } return(COMPATMODE_ALL) ; } /* end ngspice_compat_mode() */ /* -------------------------------------------------------------------------- */ int SIMinit(IFfrontEnd *frontEnd, IFsimulator **simulator) { #ifdef SIMULATOR spice_init_devices(); SIMinfo.numDevices = DEVmaxnum = num_devices(); SIMinfo.devices = devices_ptr(); SIMinfo.numAnalyses = spice_num_analysis(); SIMinfo.analyses = (IFanalysis **)spice_analysis_ptr(); /* va: we recast, because we use * only the public part */ #ifdef CIDER /* Evaluates limits of machine accuracy for CIDER */ evalAccLimits(); #endif /* CIDER */ #endif /* SIMULATOR */ SPfrontEnd = frontEnd; *simulator = &SIMinfo; CONSTroot2 = sqrt(2.); CONSTvt0 = CONSTboltz * (27 /* deg c */ + CONSTCtoK ) / CHARGE; CONSTKoverQ = CONSTboltz / CHARGE; CONSTe = exp(1.0); return(OK); } /* -------------------------------------------------------------------------- */ /* Shutdown gracefully. */ static void sp_shutdown(int exitval) { destroy_ivars(); #ifdef HAS_WINGUI if (exitval == EXIT_BAD) winmessage("Fatal error in SPICE"); else if (exitval == EXIT_INFO) winmessage("Information during setup, see main window!"); #endif if (exitval == EXIT_INFO) exitval = EXIT_NORMAL; exit (exitval); } /* -------------------------------------------------------------------------- */ #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) /* Adapted ../lib/cp/lexical.c:prompt() for GNU Readline -- Andrew Veliath */ static char * prompt(void) { static char pbuf[128]; char *p = pbuf, *s; if (cp_interactive == FALSE) return NULL; /* NULL means no prompt */ s = get_alt_prompt(); if(s==NULL) s = cp_promptstring; if(s==NULL) s = "->"; while (*s) { switch (strip(*s)) { case '!': #if defined(HAVE_BSDEDITLINE) && 0 { /* SJB In the present version of editline (v2.9) it seems that where_history() is broken. This is a hack that works round this problem. WARNING: It may fail to work in the future as it relies on undocumented structure */ /* some years later, it fails indeed, (v2.11 on debian) */ int where = 0; HIST_ENTRY *he = current_history(); if(he!=NULL) where = *(int*)(he->data); p += sprintf(p, "%d", where + 1); } #else p += sprintf(p, "%d", where_history() + 1); #endif /* HAVE_BSDEDITLINE*/ break; case '\\': if (s[1]) p += sprintf(p, "%c", strip(*++s)); default: *p = (char) strip(*s); ++p; break; } s++; } *p = 0; return pbuf; } #endif /* HAVE_GNUREADLINE || HAVE_BSDEDITLINE */ #ifndef X_DISPLAY_MISSING #ifdef HAVE_GNUREADLINE /* -------------------------------------------------------------------------- */ /* Process device events in Readline's hook since there is no where else to do it now - AV */ static int app_event_func(void) /* called by GNU readline periodically to know what to do about keypresses */ { static REQUEST reqst = { char_option, 0 }; reqst.fp = rl_instream; X11_Input(&reqst, NULL); return 0; } #endif /* HAVE_GNUREADLINE */ #ifdef HAVE_BSDEDITLINE /* -------------------------------------------------------------------------- */ /* Process device events in Editline's hook. similar to the readline function above but returns void */ static void app_event_func(void) /* called by GNU readline periodically to know what to do about keypresses */ { static REQUEST reqst = { char_option, 0 }; reqst.fp = rl_instream; X11_Input(&reqst, NULL); } #endif /* HAVE_BSDEDITLINE */ #endif /* -------------------------------------------------------------------------- */ /* This is the command processing loop for spice and nutmeg. The function is called even when GNU readline is unavailable, in which case it falls back to repeatable calling cp_evloop() SJB 26th April 2005 */ static void app_rl_readlines(void) { #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) /* GNU Readline Support -- Andrew Veliath */ char *line, *expanded_line; /* --- set up readline params --- */ strcpy(history_file, getenv("HOME")); strcat(history_file, "/."); strcat(history_file, application_name); strcat(history_file, "_history"); using_history(); read_history(history_file); rl_readline_name = application_name; rl_instream = cp_in; rl_outstream = cp_out; #ifndef X_DISPLAY_MISSING if(dispdev->Input == X11_Input) rl_event_hook = app_event_func; #endif rl_catch_signals = 0; /* disable signal handling */ /* sjb - what to do for editline? This variable is not supported by editline. */ #if defined(HAVE_GNUREADLINE) rl_catch_sigwinch = 1; /* allow readline to respond to resized windows */ #endif /* note that we want some mechanism to detect ctrl-D and expand it to exit */ for (;;) { history_set_pos(history_length); if (SETJMP(jbuf, 1)) /* Set location to jump to after handling SIGINT (ctrl-C) */ ft_sigintr_cleanup(); line = readline(prompt()); if (!line) { cp_evloop("quit"); continue; } if (*line) { int s = history_expand(line, &expanded_line); if (s == 2) { fprintf(stderr, "-> %s\n", expanded_line); } else if (s == -1) { fprintf(stderr, "readline: %s\n", expanded_line); } else { cp_evloop(expanded_line); add_history(expanded_line); } free(expanded_line); } free(line); } /* History gets written in ../fte/misccoms.c com_quit */ #else while (cp_evloop(NULL) == 1) ; #endif /* defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) */ } /* -------------------------------------------------------------------------- */ static void show_help(void) { printf("Usage: %s [OPTION]... [FILE]...\n" "Simulate the electical circuits in FILE.\n" "\n" " -a --autorun run the loaded netlist\n" " -b, --batch process FILE in batch mode\n" " -c, --circuitfile=FILE set the circuitfile\n" " -i, --interactive run in interactive mode\n" " -n, --no-spiceinit don't load the local or user's config file\n" " -o, --output=FILE set the outputfile\n" " -p, --pipe run in I/O pipe mode\n" " -q, --completion activate command completion\n" " -r, --rawfile=FILE set the rawfile output\n" " --soa-log=FILE set the outputfile for SOA warnings\n" " -s, --server run spice as a server process\n" " -t, --term=TERM set the terminal type\n" " -h, --help display this help and exit\n" " -v, --version output version information and exit\n" "\n" "Report bugs to %s.\n", cp_program, Bug_Addr); } /* -------------------------------------------------------------------------- */ static void show_version(void) { printf("%s compiled from %s revision %s\n" "Written originally by Berkeley University\n" "Currently maintained by the NGSpice Project\n\n" "Copyright (C) 1985-1996," " The Regents of the University of California\n" "Copyright (C) 1999-2011," " The NGSpice Project\n", cp_program, PACKAGE, VERSION); } #ifdef SIMULATOR /* -------------------------------------------------------------------------- */ static void append_to_stream(FILE *dest, FILE *source) { char buf[BSIZE_SP]; size_t n; while ((n = fread(buf, 1, BSIZE_SP, source)) > 0) fwrite(buf, n, 1, dest); } #endif /* SIMULATOR */ /* -------------------------------------------------------------------------- */ /* Read an initialisation file. dir is the directory (use NULL or "" for current directory) name is the initialisation file's name Return true on success SJB 25th April 2005 */ static bool read_initialisation_file(char *dir, char *name) { #ifndef HAVE_UNISTD_H FILE *fp = NULL; #endif /* not HAVE_UNISTD_H */ char *path; bool result = FALSE; /* check name */ if(name==NULL || name[0]=='\0') return FALSE; /* Fail; name needed */ /* contruct the full path */ if(dir == NULL || dir[0]=='\0') { path = name; } else { #ifdef HAVE_ASPRINTF asprintf(&path, "%s" DIR_PATHSEP "%s", dir, name); if(path==NULL) return FALSE; /* memory allocation error */ #else /* ~ HAVE_ASPRINTF */ path = TMALLOC(char, 2 + strlen(dir) + strlen(name)); if(path==NULL) return FALSE; /* memory allocation error */ sprintf(path, "%s" DIR_PATHSEP "%s", dir, name); #endif /* HAVE_ASPRINTF */ } /* now access the file */ #ifdef HAVE_UNISTD_H if (access(path, R_OK) == 0) { #else if ((fp = fopen(path, "r")) != NULL) { (void) fclose(fp); #endif /* HAVE_UNISTD_H */ inp_source(path); #ifdef TRACE printf("Init file: '%s'\n", path); #endif /* TRACE */ result = TRUE; /* loaded okay */ } /* if dir was not NULL and not empty then we allocated memory above */ if(dir!=NULL && dir[0] !='\0') #ifdef HAVE_ASPRINTF free(path); #else tfree(path); #endif /* HAVE_ASPRINTF */ return result; } /* -------------------------------------------------------------------------- */ static void print_news(void) { if (News_File && *News_File) { char* fname = cp_tildexpand(News_File); /*DG Memory leak */ FILE *fp = fopen(fname, "r"); tfree(fname); if (fp) { char buf[BSIZE_SP]; while (fgets(buf, BSIZE_SP, fp)) fputs(buf, stdout); (void) fclose(fp); } } } #ifdef HAS_WINGUI #define main xmain #endif int main(int argc, char **argv) { char log_file[BSIZE_SP]; char soa_log_file[BSIZE_SP]; volatile bool readinit = TRUE; bool istty = TRUE; bool iflag = FALSE; bool qflag = FALSE; FILE * volatile circuit_file; bool oflag = FALSE; bool srflag = FALSE; #ifdef TRACE /* this is used to detect memory leaks during debugging */ /* added by SDB during debug . . . . */ /* mtrace(); */ #endif #ifdef TRACE /* this is also used for memory leak plugging . . . */ /* added by SDB during debug . . . . */ /* mwDoFlush(1); */ #endif /* MFB tends to jump to 0 on errors. This tends to catch it. */ { static int started = 0; if (started++) { fprintf(cp_err, "main: Internal Error: jump to zero\n"); sp_shutdown(EXIT_BAD); } } #if defined(HAVE_GNUREADLINE) || defined(HAVE_BSDEDITLINE) application_name = strrchr(argv[0], '/'); if (application_name) application_name ++; else application_name = argv[0]; #endif ivars(argv[0]); cp_in = stdin; cp_out = stdout; cp_err = stderr; circuit_file = stdin; #if defined(HAVE_ISATTY) && !defined(HAS_WINGUI) istty = (bool) isatty(fileno(stdin)); #endif init_time( ); { int rv = SIMinit(&nutmeginfo, &ft_sim); if(rv != OK) { ft_sperror(rv, "SIMinit"); sp_shutdown(EXIT_BAD); } } cp_program = ft_sim->simulator; srand((unsigned int) getpid()); TausSeed(); /* --- Process command line options --- */ for(;;) { enum { soa_log = 1001, }; static struct option long_options[] = { {"help", no_argument, 0, 'h'}, {"version", no_argument, 0, 'v'}, {"batch", no_argument, 0, 'b'}, {"autorun", no_argument, 0, 'a'}, {"circuitfile", required_argument, 0, 'c'}, {"interactive", no_argument, 0, 'i'}, {"no-spiceinit", no_argument, 0, 'n'}, {"output", required_argument, 0, 'o'}, {"pipe", no_argument, 0, 'p'}, {"completion", no_argument, 0, 'q'}, {"rawfile", required_argument, 0, 'r'}, {"server", no_argument, 0, 's'}, {"terminal", required_argument, 0, 't'}, {"soa-log", required_argument, 0, soa_log}, {0, 0, 0, 0} }; int option_index = 0; int c = getopt_long (argc, argv, "hvbac:ino:pqr:st:", long_options, &option_index); if (c == -1) break; switch (c) { case 'h': /* Help */ show_help(); sp_shutdown (EXIT_INFO); break; case 'v': /* Version info */ show_version(); sp_shutdown (EXIT_INFO); break; case 'b': /* Batch mode */ { bool x_false = FALSE; cp_vset("addcontrol", CP_BOOL, &x_false); ft_batchmode = TRUE; } break; case 'a': /* Add control section for autorun */ if (!ft_batchmode) { bool x_true = TRUE; cp_vset("addcontrol", CP_BOOL, &x_true); } break; case 'c': /* Circuit file */ if (optarg) { if ((circuit_file = fopen(optarg, "r")) == NULL) { perror(optarg); sp_shutdown(EXIT_BAD); } istty = FALSE; } break; case 'i': /* Interactive mode */ iflag = TRUE; break; case 'n': /* Don't read initialisation file */ readinit = FALSE; break; case 'o': /* Output file */ if (optarg) { /* switch to line buffering for stdout */ setvbuf(stdout, NULL, _IOLBF, BUFSIZ); sprintf (log_file, "%s", optarg); oflag = TRUE; } break; case 'p': /* Run in pipe mode */ iflag = TRUE; istty = TRUE; ft_pipemode = TRUE; /* switch to line buffering for stdout */ setvbuf(stdout, NULL, _IOLBF, BUFSIZ); break; case 'q': /* Command completion */ qflag = TRUE; break; case 'r': /* The raw file */ if (optarg) cp_vset("rawfile", CP_STRING, optarg); rflag = TRUE; break; case 's': /* Server mode */ ft_servermode = TRUE; break; case 't': if (optarg) cp_vset("term", CP_STRING, optarg); break; case soa_log: if (optarg) { sprintf (soa_log_file, "%s", optarg); srflag = TRUE; } break; case '?': break; default: printf ("?? getopt returned character code 0%o ??\n", c); } } /* --- End of command line option processing (While(1)-loop) --- */ if (oflag) { /* -o option has been set */ com_version(NULL); if (ft_servermode) fprintf(stdout, "\nServer mode\n\n"); else if (ft_batchmode) fprintf(stdout, "\nBatch mode\n\n"); else fprintf(stdout, "\nInteractive mode, better used without -o option\n\n"); if (rflag) fprintf(stdout, "Simulation output goes to rawfile: %s\n", ft_rawfile); fprintf(stdout, "Comments and warnings go to log-file: %s\n\n", log_file); /* Open the log file */ #ifdef HAS_WINGUI /* flogp used by winmain's putc which writes to file 'log_file' */ flogp = fopen(log_file, "w"); if (!flogp) { perror (log_file); sp_shutdown (EXIT_BAD); } #else orflag = TRUE; /* Connect stdout and stderr to file log_file and log stdout */ if (!freopen (log_file, "w", stdout)) { perror (log_file); sp_shutdown (EXIT_BAD); } dup2(fileno(stdout), fileno(stderr)); setvbuf(stdout, NULL, _IOLBF, BUFSIZ); /* enable line buffering */ #endif } /* orflag */ if (srflag) { /* --soa-log option has been set */ fprintf(stdout, "\nSOA warnings go to log-file: %s\n", soa_log_file); /* Open the soa log file */ slogp = fopen(soa_log_file, "w"); if (!slogp) { perror (soa_log_file); sp_shutdown (EXIT_BAD); } } /* srflag */ #ifdef SIMULATOR if_getparam = spif_getparam_special; #else if_getparam = nutif_getparam; #endif if ((!iflag && !istty) || ft_servermode) /* (batch and file) or server operation */ ft_batchmode = TRUE; if ((iflag && !istty) || qflag) /* (interactive and file) or command completion */ cp_nocc = TRUE; /* set command completion */ else cp_nocc = FALSE; if (ft_servermode) /* in server no init file */ readinit = FALSE; if (!istty || ft_batchmode) /* file or batch - no more output */ out_moremode = FALSE; /* Get information on memory status upon startup. Would like to do this later, but cpinit evals commands. fcn is in resource.c */ init_rlimits( ); /* Have to initialize cp now. fcn is in cpitf.c*/ ft_cpinit(); /* Set up signal handling */ if (!ft_batchmode) { /* Set up interrupt handler */ (void) signal(SIGINT, (SIGNAL_FUNCTION) ft_sigintr); /* floating point exception */ (void) signal(SIGFPE, (SIGNAL_FUNCTION) sigfloat); #ifdef SIGTSTP signal(SIGTSTP, (SIGNAL_FUNCTION) sigstop); #endif } /* Set up signal handling for fatal errors. */ signal(SIGILL, (SIGNAL_FUNCTION) sigill); #ifdef SIGBUS signal(SIGBUS, (SIGNAL_FUNCTION) sigbus); #endif #if defined(SIGSEGV) && !defined(NGDEBUG) && defined(HAS_WINGUI) /* Allow a comment and graceful shutdown after seg fault */ signal(SIGSEGV, (SIGNAL_FUNCTION) sigsegv); #endif #ifdef SIGSYS signal(SIGSYS, (SIGNAL_FUNCTION) sig_sys); #endif /* To catch interrupts during .spiceinit... */ if (SETJMP(jbuf, 1)) { ft_sigintr_cleanup(); fprintf(cp_err, "Warning: error executing .spiceinit.\n"); } else { if (readinit) { /* load user's initialisation file try accessing the initialisation file in the current directory if that fails try the alternate name */ if(FALSE == read_initialisation_file("", INITSTR) && FALSE == read_initialisation_file("", ALT_INITSTR)) { /* if that failed try in the user's home directory if their HOME environment variable is set */ char *homedir = getenv("HOME"); if(homedir != NULL) if(FALSE == read_initialisation_file(homedir, INITSTR) && FALSE == read_initialisation_file(homedir, ALT_INITSTR)) { ; } } } if (!ft_batchmode) { com_version(NULL); DevInit( ); print_news(); } } #ifdef SIMULATOR /* Pass 2 -- get the filenames. If we are spice, then this means * build a circuit for this file. If this is in server mode, don't * process any of these args. */ if (SETJMP(jbuf, 1)) { ft_sigintr_cleanup(); fprintf(cp_err, "Warning: error executing during ngspice startup.\n"); } else { bool gotone = FALSE; cp_interactive = FALSE; #ifdef FastRand // initialization and seed for FastNorm Gaussian random generator { unsigned int rseed = 66; initnorm (0, 0); if (!cp_getvar("rndseed", CP_NUM, &rseed)) { time_t acttime = time(NULL); rseed = (unsigned int) acttime; } initnorm (rseed, 2); fprintf (cp_out, "SoS %f, seed value: %ld\n", renormalize(), rseed); } #elif defined (WaGauss) { unsigned int rseed = 66; if (!cp_getvar("rndseed", CP_NUM, &rseed)) { time_t acttime = time(NULL); rseed = (unsigned int) acttime; } srand(rseed); initw(); } #endif if (!ft_servermode) { int err = 0; /* Concatenate all non-option arguments into a temporary file and load that file into the spice core. The original routine took a special path if there was only one non-option argument. In that case, it didn't create the temporary file but used the original file instead. The current algorithm is uniform at the expense of a little startup time. */ FILE *tempfile = tmpfile(); #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) char *dname = NULL; /* input file*/ char *tpf = NULL; /* temporary file */ /* tmpfile() returns NULL, if in MS Windows as non admin user in directory C:\something (no write permission to root C:). Then we add a tempfile in the local directory. File will be removed automatically due to TD option in fopen */ if (tempfile == NULL) { tpf = smktemp("sp"); tempfile = fopen(tpf, "w+bTD"); if (tempfile == NULL) { fprintf(stderr, "Could not open a temporary file to save and use optional arguments."); sp_shutdown(EXIT_BAD); } } #endif if(!tempfile) { perror("tmpfile()"); sp_shutdown(EXIT_BAD); } if (optind == argc && !istty) append_to_stream(tempfile, stdin); while (optind < argc) { char *arg = argv[optind++]; FILE *tp; /* Copy all the arguments into the temporary file */ tp = fopen(arg, "r"); if (!tp) { char *lbuffer = getenv("NGSPICE_INPUT_DIR"); if (lbuffer && *lbuffer) { char *p = TMALLOC(char, strlen(lbuffer) + strlen(DIR_PATHSEP) + strlen(arg) + 1); sprintf(p, "%s%s%s", lbuffer, DIR_PATHSEP, arg); tp = fopen(p, "r"); tfree(p); } if (!tp) { perror(arg); err = 1; break; } } #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) /* Copy the input file name which otherwise will be lost due to the temporary file */ dname = copy(arg); #endif #if defined(HAS_WINGUI) /* write source file name into source window */ SetSource(dname); #endif append_to_stream(tempfile, tp); fclose(tp); } fseek(tempfile, 0L, SEEK_SET); if (tempfile && (!err || !ft_batchmode)) { #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) /* Copy the input file name for adding another file search path */ inp_spsource(tempfile, FALSE, dname, FALSE); tfree(dname); #else inp_spsource(tempfile, FALSE, NULL, FALSE); #endif gotone = TRUE; } if (ft_batchmode && err) sp_shutdown(EXIT_BAD); } /* --- if (!ft_servermode) --- */ if (!gotone && ft_batchmode) inp_spsource(circuit_file, FALSE, NULL, FALSE); } if (ft_batchmode) { /* If we get back here in batch mode then something is wrong, * so exit. */ if (SETJMP(jbuf, 1)) { ft_sigintr_cleanup(); sp_shutdown(EXIT_BAD); } if (ft_servermode) { if (ft_curckt == NULL) { fprintf(cp_err, "Error: no circuit loaded!\n"); sp_shutdown(EXIT_BAD); } if (ft_dorun("")) sp_shutdown(EXIT_BAD); sp_shutdown(EXIT_NORMAL); } cp_interactive = FALSE; if (rflag) { /* If -r is specified, then dot cards (.width, .plot, .print, .op, .meas, .tf) are ignored, except .save, which has been handled by ft_dotsaves() from within inp_spsource (), data are put into linked list dbs. */ int error2 = ft_dorun(ft_rawfile); /* Execute the .whatever lines found in the deck, after we are done running. */ if (ft_cktcoms(TRUE) || error2) sp_shutdown(EXIT_BAD); } else if (ft_savedotargs()) { /* all dot card data to be put into dbs */ int error2 = ft_dorun(NULL); /* Execute the .whatever lines found in the deck, after we are done running. */ if (ft_cktcoms(FALSE) || error2) sp_shutdown(EXIT_BAD); } else { fprintf(stderr, "Note: No \".plot\", \".print\", or \".fourier\" lines; " "no simulations run\n"); sp_shutdown(EXIT_BAD); } sp_shutdown(EXIT_NORMAL); return 0; } /* --- if (ft_batchmode) --- */ #else /* ~ SIMULATOR */ if (SETJMP(jbuf, 1)) { ft_sigintr_cleanup(); fprintf(cp_err, "Warning: error executing during ft_loadfile().\n"); } else { bool gdata = TRUE; if (optind == argc) /* No raw file */ gdata = FALSE; cp_interactive = FALSE; if (gdata) { if (optind < argc) while (optind < argc) ft_loadfile(argv[optind++]); else ft_loadfile(ft_rawfile); } } #endif /* ~ SIMULATOR */ for(;;) if(!SETJMP(jbuf, 1)) { /* enter the command processing loop */ cp_interactive = TRUE; app_rl_readlines(); } else { ft_sigintr_cleanup(); } } ngspice-26/src/misc/0000755000265600020320000000000012264261703013747 5ustar andreasadminngspice-26/src/misc/tilde.h0000644000265600020320000000024612264261473015227 0ustar andreasadmin/************* * Header file for tilde.c * 1999 E. Rouat ************/ #ifndef ngspice_TILDE_H #define ngspice_TILDE_H char * tildexpand(char *string); #endif ngspice-26/src/misc/string.c0000644000265600020320000003457012264261473015436 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* * String functions */ #include "ngspice/ngspice.h" #include "ngspice/stringutil.h" #include "ngspice/dstring.h" int prefix(register char *p, register char *s) { while (*p && (*p == *s)) p++, s++; if (!*p) return (TRUE); else return (FALSE); } /* Create a copy of a string. */ char * copy(const char *str) { char *p; if (!str) return NULL; if ((p = TMALLOC(char, strlen(str) + 1)) != NULL) (void) strcpy(p, str); return(p); } char * copy_substring(const char *str, const char *end) { size_t n = (size_t) (end - str); char *p; if ((p = TMALLOC(char, n + 1)) != NULL) { (void) strncpy(p, str, n); p[n] = '\0'; } return(p); } /* Determine whether sub is a substring of str. */ /* Like strstr( ) XXX */ int substring(register char *sub, register char *str) { char *s, *t; while (*str) { if (*str == *sub) { t = str; for (s = sub; *s; s++) { if (!*t || (*s != *t++)) break; } if (*s == '\0') return (TRUE); } str++; } return (FALSE); } /* Append one character to a string. Don't check for overflow. */ /* Almost like strcat( ) XXX */ void appendc(char *s, char c) { while (*s) s++; *s++ = c; *s = '\0'; return; } /* Try to identify an integer that begins a string. Stop when a non- * numeric character is reached. */ /* Like atoi( ) XXX */ int scannum(char *str) { int i = 0; while(isdigit(*str)) i = i * 10 + *(str++) - '0'; return(i); } /* Case insensitive str eq. */ /* Like strcasecmp( ) XXX */ int cieq(register char *p, register char *s) { while (*p) { if ((isupper(*p) ? tolower(*p) : *p) != (isupper(*s) ? tolower(*s) : *s)) return(FALSE); p++; s++; } return (*s ? FALSE : TRUE); } /* Case insensitive prefix. */ int ciprefix(register char *p, register char *s) { while (*p) { if ((isupper(*p) ? tolower(*p) : *p) != (isupper(*s) ? tolower(*s) : *s)) return(FALSE); p++; s++; } return (TRUE); } void strtolower(char *str) { if (str) while (*str) { if(isupper(*str)) *str = (char) tolower(*str); str++; } } void strtoupper(char *str) { if (str) while (*str) { if(islower(*str)) *str = (char) toupper(*str); str++; } } #ifdef CIDER /* * Imported from cider file support/strmatch.c * Original copyright notice: * Author: 1991 David A. Gates, U. C. Berkeley CAD Group * */ /* * Case-insensitive test of whether p is a prefix of s and at least the * first n characters are the same */ int cinprefix( register char *p, register char *s, register int n) { if (!p || !s) return( 0 ); while (*p) { if ((isupper(*p) ? tolower(*p) : *p) != (isupper(*s) ? tolower(*s) : *s)) return( 0 ); p++; s++; n--; } if (n > 0) return( 0 ); else return( 1 ); } /* * Case-insensitive match of prefix string p against string s * returns the number of matching characters * */ int cimatch( register char *p, register char *s) { register int n = 0; if (!p || !s) return( 0 ); while (*p) { if ((isupper(*p) ? tolower(*p) : *p) != (isupper(*s) ? tolower(*s) : *s)) return( n ); p++; s++; n++; } return( n ); } #endif /* CIDER */ /*-------------------------------------------------------------------------* * gettok skips over whitespace and returns the next token found. This is * the original version. It does not "do the right thing" when you have * parens or commas anywhere in the nodelist. Note that I left this unmodified * since I didn't want to break any fcns which called it from elsewhere than * subckt.c. -- SDB 12.3.2003. *-------------------------------------------------------------------------*/ char * gettok(char **s) { char c; int paren; char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ paren = 0; while (isspace(**s)) (*s)++; if (!**s) return (NULL); spice_dstring_init(&buf) ; while ((c = **s) != '\0' && !isspace(c)) { if (c == '('/*)*/) paren += 1; else if (c == /*(*/')') paren -= 1; else if (c == ',' && paren < 1) break; spice_dstring_append_char( &buf, *(*s)++ ) ; } while (isspace(**s) || **s == ',') (*s)++; token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } /*-------------------------------------------------------------------------* * gettok skips over whitespaces or '=' and returns the next token found, * if the token is something like i(xxx), v(yyy), or v(xxx,yyy) * -- h_vogt 10.07.2010. *-------------------------------------------------------------------------*/ char * gettok_iv(char **s) { char c; int paren; char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ paren = 0; while ((isspace(**s)) || (**s=='=')) (*s)++; if ((!**s) || ((**s != 'v') && (**s != 'i') && (**s != 'V') && (**s != 'I'))) return (NULL); // initialize string spice_dstring_init(&buf); // add v or i to buf spice_dstring_append_char( &buf, *(*s)++ ) ; while ((c = **s) != '\0') { if (c == '('/*)*/) paren += 1; else if (c == /*(*/')') paren -= 1; if (isspace(c)) (*s)++; else { spice_dstring_append_char( &buf, *(*s)++ ) ; if (paren == 0) break; } } while (isspace(**s) || **s == ',') (*s)++; token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } /*-------------------------------------------------------------------------* * gettok_noparens was added by SDB on 4.21.2003. * It acts like gettok, except that it treats parens and commas like * whitespace while looking for the POLY token. That is, it stops * parsing and returns when it finds one of those chars. It is called from * 'translate' (subckt.c). *-------------------------------------------------------------------------*/ char * gettok_noparens(char **s) { char c; char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ while ( isspace(**s) ) (*s)++; /* iterate over whitespace */ if (!**s) return (NULL); /* return NULL if we come to end of line */ spice_dstring_init(&buf) ; while ((c = **s) != '\0' && !isspace(c) && ( **s != '(' ) && ( **s != ')' ) && ( **s != ',') ) { spice_dstring_append_char( &buf, *(*s)++ ) ; } /* Now iterate up to next non-whitespace char */ while ( isspace(**s) ) (*s)++; token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } char * gettok_instance(char **s) { char c; char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ while ( isspace(**s) ) (*s)++; /* iterate over whitespace */ if (!**s) return (NULL); /* return NULL if we come to end of line */ spice_dstring_init(&buf) ; while ((c = **s) != '\0' && !isspace(c) && ( **s != '(' ) && ( **s != ')' ) ) { spice_dstring_append_char( &buf, *(*s)++ ) ; } /* Now iterate up to next non-whitespace char */ while ( isspace(**s) ) (*s)++; token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } /* get the next token starting at next non white spice, stopping at p, if inc_p is true, then including p, else excluding p, return NULL if p is not found. If '}', ']' or ')' and nested is true, find corresponding p */ char * gettok_char(char **s, char p, bool inc_p, bool nested) { char c; char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ while ( isspace(**s) ) (*s)++; /* iterate over whitespace */ if (!**s) return (NULL); /* return NULL if we come to end of line */ spice_dstring_init(&buf) ; if (nested && (( p == '}' ) || ( p == ')' ) || ( p == ']'))) { char q; int count = 0; /* find opening bracket */ if ( p == '}' ) q = '{'; else if(p == ']' ) q = '['; else q = '('; /* add string in front of q, excluding q */ while ((c = **s) != '\0' && ( **s != q )) { spice_dstring_append_char( &buf, *(*s)++ ) ; } /* return if nested bracket found, excluding its character */ while ((c = **s) != '\0') { if (c == q) count++; else if (c == p) count--; if (count == 0) { break; } spice_dstring_append_char( &buf, *(*s)++ ) ; } } else /* just look for p and return string, excluding p */ while ((c = **s) != '\0' && ( **s != p )) { spice_dstring_append_char( &buf, *(*s)++ ) ; } if (c == '\0') /* p not found */ return (NULL); if (inc_p) /* add p */ spice_dstring_append_char( &buf, *(*s)++ ) ; /* Now iterate up to next non-whitespace char */ while ( isspace(**s) ) (*s)++; token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } /*-------------------------------------------------------------------------* * gettok_node was added by SDB on 12.3.2003 * It acts like gettok, except that it treats parens and commas like * whitespace (i.e. it ignores them). Use it when parsing through netnames * (node names) since they may be grouped using ( , ). *-------------------------------------------------------------------------*/ char * gettok_node(char **s) { char c; char *token ; /* return token */ if (*s == NULL) return NULL; while (isspace(**s) || ( **s == '(' ) || ( **s == ')' ) || ( **s == ',') ) (*s)++; /* iterate over whitespace and ( , ) */ if (!**s) return (NULL); /* return NULL if we come to end of line */ token = *s; while ((c = **s) != '\0' && !isspace(c) && ( **s != '(' ) && ( **s != ')' ) && ( **s != ',') ) { /* collect chars until whitespace or ( , ) */ (*s)++; } token = copy_substring(token, *s); /* Now iterate up to next non-whitespace char */ while (isspace(**s) || ( **s == '(' ) || ( **s == ')' ) || ( **s == ',') ) (*s)++; /* iterate over whitespace and ( , ) */ return ( token ) ; } /*-------------------------------------------------------------------------* * get_l_paren iterates the pointer forward in a string until it hits * the position after the next left paren "(". It returns 0 if it found a left * paren, and 1 if no left paren is found. It is called from 'translate' * (subckt.c). *-------------------------------------------------------------------------*/ int get_l_paren(char **s) { while (**s && ( **s != '(' ) ) (*s)++; if (!**s) return (1); (*s)++; if (!**s) return (1); else return 0; } /*-------------------------------------------------------------------------* * get_r_paren iterates the pointer forward in a string until it hits * the position after the next right paren ")". It returns 0 if it found a right * paren, and 1 if no right paren is found. It is called from 'translate' * (subckt.c). *-------------------------------------------------------------------------*/ int get_r_paren(char **s) { while (**s && ( **s != ')' ) ) (*s)++; if (!**s) return (1); (*s)++; if (!**s) return (1); else return 0; } /*-------------------------------------------------------------------------* * this function strips all white space inside parens * is needed in gettoks (dotcards.c) for right processing of expressions * like ".plot v( 5,4) v(6)" *-------------------------------------------------------------------------*/ char * stripWhiteSpacesInsideParens(char *str) { char *token ; /* return token */ SPICE_DSTRING buf ; /* allow any length string */ int i = 0 ; /* index into string */ while ( (str[i] == ' ') || (str[i] == '\t') ) i++; spice_dstring_init(&buf) ; for(i=i; str[i]!='\0'; i++) { if ( str[i] != '(' ) { spice_dstring_append_char( &buf, str[i] ) ; } else { spice_dstring_append_char( &buf, str[i] ) ; while ( (str[i++] != ')') ) { if ( str[i] != ' ' ) spice_dstring_append_char( &buf, str[i] ) ; } i--; } } token = copy( spice_dstring_value(&buf) ) ; spice_dstring_free(&buf) ; return ( token ) ; } #ifndef HAVE_BCOPY #ifndef bcopy void bcopy(const void *vfrom, void *vto, size_t num) { register const char *from=vfrom; register char *to=vto; while (num-- > 0) *to++ = *from++; return; } #endif #endif #ifndef HAVE_BZERO #ifndef bzero void bzero(void *vptr, size_t num) { register char *ptr=vptr; while (num-- > 0) *ptr++ = '\0'; return; } #endif #endif bool isquote( char ch ) { return ( ch == '\'' || ch == '"' ); } bool is_arith_char( char c ) { if ( c == '+' || c == '-' || c == '*' || c == '/' || c == '(' || c == ')' || c == '<' || c == '>' || c == '?' || c == '|' || c == '&' || c == '^') return TRUE; else return FALSE; } bool str_has_arith_char( char *s ) { while ( *s && *s != '\0' ) { if ( is_arith_char(*s) ) return TRUE; s++; } return FALSE; } int get_comma_separated_values( char *values[], char *str ) { int count = 0; char *ptr, *comma_ptr, keep; while ( ( comma_ptr = strstr( str, "," ) ) != NULL ) { ptr = comma_ptr - 1; while ( isspace(*ptr) ) ptr--; ptr++; keep = *ptr; *ptr = '\0'; values[count++] = strdup(str); *ptr = keep; str = comma_ptr + 1; while ( isspace(*str) ) str++; } values[count++] = strdup(str); return count; } ngspice-26/src/misc/alloc.h0000644000265600020320000000037212264261473015220 0ustar andreasadmin/************* * Header file for alloc.c * 1999 E. Rouat ************/ #ifndef ngspice_ALLOC_H #define ngspice_ALLOC_H #ifndef HAVE_LIBGC void * tmalloc(size_t num); void * trealloc(void *ptr, size_t num); void txfree(void *ptr); #endif #endif ngspice-26/src/misc/util.h0000644000265600020320000000043112264261473015077 0ustar andreasadmin/************* * Header file for util.c * 2002 R. Oktas, ************/ #ifndef ngspice_UTIL_H #define ngspice_UTIL_H char *canonicalize_pathname(char *path); char *absolute_pathname(char *string, char *dot_path); char *ngdirname(const char *name); #endif ngspice-26/src/misc/dup2.h0000644000265600020320000000026612264261473015002 0ustar andreasadmin/************* * Header file for dup2.c * 1999 E. Rouat ************/ #ifndef ngspice_DUP2_H #define ngspice_DUP2_H #ifndef HAVE_DUP2 dup2(int oldd, int newd); #endif #endif ngspice-26/src/misc/util.c0000644000265600020320000001312712264261473015100 0ustar andreasadmin/************* * Various utility functions. * 2002 R. Oktas, ************/ #include "ngspice/ngspice.h" #include "util.h" /* **************************************************************** */ /* */ /* Stuff for Filename Handling */ /* */ /* **************************************************************** */ /* Canonicalize PATH, and return a new path. The new path differs from PATH in that: Multple `/'s are collapsed to a single `/'. Leading `./'s and trailing `/.'s are removed. Trailing `/'s are removed. Non-leading `../'s and trailing `..'s are handled by removing portions of the path. Stolen from Bash source (slightly modified). Credit goes to Chet Ramey, et al. -- ro */ char * canonicalize_pathname(char *path) { int i, start; char stub_char; char *result; /* The result cannot be larger than the input PATH. */ result = copy(path); stub_char = '.'; if(*path == '/') stub_char = '/'; /* Walk along RESULT looking for things to compact. */ i = 0; for (;;) { if (!result[i]) break; while (result[i] && result[i] != '/') i++; start = i++; /* If we didn't find any slashes, then there is nothing left to do. */ if (!result[start]) break; /* Handle multiple `/'s in a row. */ while (result[i] == '/') i++; #if !defined (apollo) if ((start + 1) != i) #else if ((start + 1) != i && (start != 0 || i != 2)) #endif /* apollo */ { strcpy (result + start + 1, result + i); i = start + 1; } #if 0 /* Handle backslash-quoted `/'. */ if (start > 0 && result[start - 1] == '\\') continue; #endif /* Check for trailing `/'. */ if (start && !result[i]) { zero_last: result[--i] = '\0'; break; } /* Check for `../', `./' or trailing `.' by itself. */ if (result[i] == '.') { /* Handle trailing `.' by itself. */ if (!result[i + 1]) goto zero_last; /* Handle `./'. */ if (result[i + 1] == '/') { strcpy(result + i, result + i + 1); i = (start < 0) ? 0 : start; continue; } /* Handle `../' or trailing `..' by itself. */ if (result[i + 1] == '.' && (result[i + 2] == '/' || !result[i + 2])) { while (--start > -1 && result[start] != '/') ; strcpy(result + start + 1, result + i + 2); i = (start < 0) ? 0 : start; continue; } } } if (!*result) { *result = stub_char; result[1] = '\0'; } return (result); } /* Turn STRING (a pathname) into an absolute pathname, assuming that DOT_PATH contains the symbolic location of `.'. This always returns a new string, even if STRING was an absolute pathname to begin with. Stolen from Bash source (slightly modified). Credit goes to Chet Ramey, et al. -- ro */ char * absolute_pathname(char *string, char *dot_path) { char *result; size_t result_len; if (!dot_path || *string == '/') result = copy(string); else { if (dot_path && dot_path[0]) { result = TMALLOC(char, 2 + strlen(dot_path) + strlen(string)); strcpy(result, dot_path); result_len = strlen(result); if (result[result_len - 1] != '/') { result[result_len++] = '/'; result[result_len] = '\0'; } } else { result = TMALLOC(char, 3 + strlen (string)); result[0] = '.'; result[1] = '/'; result[2] = '\0'; result_len = 2; } strcpy(result + result_len, string); } return (result); } /* char * basename(const char *name) { char *base; char *p; static char *tmp = NULL; int len; if (tmp) { free(tmp); tmp = NULL; } if (!name || !strcmp(name, "")) return ""; if (!strcmp(name, "/")) return "/"; len = strlen(name); if (name[len - 1] == '/') { // ditch the trailing '/' p = tmp = TMALLOC(char, len); strncpy(p, name, len - 1); } else { p = (char *) name; } for (base = p; *p; p++) if (*p == '/') base = p + 1; return base; } */ #if defined(HAS_WINGUI) || defined(_MSC_VER) || defined(__MINGW32__) char * ngdirname(const char *name) { char *ret; const char *end = NULL; int start = 0; if(name && ((name[0] >= 'a' && name[0] <= 'z') || (name[0] >= 'A' && name[0] <= 'Z')) && name[1] == ':') start = 2; if(name) { const char *p = name + start; for(; *p; p++) if(*p == '/' || *p == '\\') end = p; } if(end && end == name + start) end++; if(end) ret = copy_substring(name, end); else { char *p = TMALLOC(char, 4); ret = p; if(start) { *p++ = name[0]; *p++ = name[1]; } *p++ = '.'; *p++ = '\0'; } return ret; } #else char * ngdirname(const char *name) { char *ret; const char *end; end = name ? strrchr(name, '/') : NULL; if(end && end == name) end++; if(end) ret = copy_substring(name, end); else ret = copy("."); return ret; } #endif ngspice-26/src/misc/mktemp.h0000644000265600020320000000024112264261473015416 0ustar andreasadmin/************* * Header file for mktemp.c * 1999 E. Rouat ************/ #ifndef ngspice_MKTEMP_H #define ngspice_MKTEMP_H char * smktemp(char *id); #endif ngspice-26/src/misc/wlist.c0000644000265600020320000001522112264261473015262 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* Wordlist manipulation stuff. */ #include "ngspice/ngspice.h" #include "ngspice/bool.h" #include "ngspice/wordlist.h" /* Determine the length of a word list. */ int wl_length(const wordlist *wl) { int i = 0; for (; wl; wl = wl->wl_next) i++; return (i); } /* Free the storage used by a word list. */ void wl_free(wordlist *wl) { while (wl) { wordlist *next = wl->wl_next; tfree(wl->wl_word); tfree(wl); wl = next; } } /* Copy a wordlist and the words. */ wordlist * wl_copy(wordlist *wl) { wordlist *first = NULL, *last = NULL; for (; wl; wl = wl->wl_next) wl_append_word(&first, &last, copy(wl->wl_word)); return (first); } /* Substitute a wordlist for one element of a wordlist, and return a * pointer to the last element of the inserted list. */ wordlist * wl_splice(wordlist *elt, wordlist *list) { if (list) list->wl_prev = elt->wl_prev; if (elt->wl_prev) elt->wl_prev->wl_next = list; if (list) { while (list->wl_next) list = list->wl_next; list->wl_next = elt->wl_next; } if (elt->wl_next) elt->wl_next->wl_prev = list; tfree(elt->wl_word); tfree(elt); return (list); } static void printword(char *string, FILE *fp) { if (string) while (*string) putc(strip(*string++), fp); } /* Print a word list. (No \n at the end...) */ void wl_print(const wordlist *wl, FILE *fp) { for (; wl; wl = wl->wl_next) { printword(wl->wl_word, fp); if (wl->wl_next) putc(' ', fp); } } /* Turn an array of char *'s into a wordlist. */ wordlist * wl_build(char **v) { wordlist *first = NULL; wordlist *last = NULL; while (*v) wl_append_word(&first, &last, copy(*v++)); return (first); } char ** wl_mkvec(wordlist *wl) { int len = wl_length(wl); char **vec = TMALLOC(char *, len + 1); int i; for (i = 0; i < len; i++) { vec[i] = copy(wl->wl_word); wl = wl->wl_next; } vec[i] = NULL; return (vec); } /* Nconc two wordlists together. */ wordlist * wl_append(wordlist *wlist, wordlist *nwl) { wordlist *wl; if (wlist == NULL) return (nwl); if (nwl == NULL) return (wlist); for (wl = wlist; wl->wl_next; wl = wl->wl_next) ; wl->wl_next = nwl; nwl->wl_prev = wl; return (wlist); } /* Reverse a word list. */ wordlist * wl_reverse(wordlist *wl) { if (!wl) return (wl); for (;;) { wordlist *t = wl->wl_next; wl->wl_next = wl->wl_prev; wl->wl_prev = t; if (!t) return (wl); wl = t; } } /* Convert a wordlist into a string. */ char * wl_flatten(wordlist *wlist) { char *buf; wordlist *wl; size_t len = 0; for (wl = wlist; wl; wl = wl->wl_next) len += strlen(wl->wl_word) + 1; buf = TMALLOC(char, len + 1); *buf = '\0'; for (wl = wlist; wl; wl = wl->wl_next) { (void) strcat(buf, wl->wl_word); if (wl->wl_next) (void) strcat(buf, " "); } return (buf); } /* Return the nth element of a wordlist, or the last one if n is too * big. Numbering starts at 0... */ wordlist * wl_nthelem(int i, wordlist *wl) { while ((i-- > 0) && wl->wl_next) wl = wl->wl_next; return (wl); } static int wlcomp(const void *a, const void *b) { const char **s = (const char **) a; const char **t = (const char **) b; return (strcmp(*s, *t)); } void wl_sort(wordlist *wl) { size_t i = 0; wordlist *ww = wl; char **stuff; for (i = 0; ww; i++) ww = ww->wl_next; if (i < 2) return; stuff = TMALLOC(char *, i); for (i = 0, ww = wl; ww; i++, ww = ww->wl_next) stuff[i] = ww->wl_word; qsort(stuff, i, sizeof (char *), wlcomp); for (i = 0, ww = wl; ww; i++, ww = ww->wl_next) ww->wl_word = stuff[i]; tfree(stuff); } /* Return a range of wordlist elements... */ wordlist * wl_range(wordlist *wl, int low, int up) { int i; wordlist *tt; bool rev = FALSE; if (low > up) { i = up; up = low; low = i; rev = TRUE; } up -= low; while (wl && (low > 0)) { tt = wl->wl_next; tfree(wl->wl_word); tfree(wl); wl = tt; if (wl) wl->wl_prev = NULL; low--; } tt = wl; while (tt && (up > 0)) { tt = tt->wl_next; up--; } if (tt && tt->wl_next) { wl_free(tt->wl_next); tt->wl_next = NULL; } if (rev) wl = wl_reverse(wl); return (wl); } /* * prepend a new `word' * to the front of the given `wlist' wordlist * and return this new list */ wordlist * wl_cons(char *word, wordlist *wlist) { wordlist *w = alloc(wordlist); w->wl_next = wlist; w->wl_prev = NULL; w->wl_word = word; if (wlist) wlist->wl_prev = w; return (w); } /* * given a wordlist * described by a `first' and `last' wordlist element * append a new `word' * and update the given `first' and `last' pointers accordingly */ void wl_append_word(wordlist **first, wordlist **last, char *word) { wordlist *w = alloc(wordlist); w->wl_next = NULL; w->wl_prev = (*last); w->wl_word = word; if (*last) (*last)->wl_next = w; else (*first) = w; (*last) = w; } /* * given a pointer `wl' into a wordlist * cut off this list from its preceding elements * and return itself */ wordlist * wl_chop(wordlist *wl) { if (wl && wl->wl_prev) { wl->wl_prev->wl_next = NULL; wl->wl_prev = NULL; } return (wl); } /* * given a pointer `wl' into a wordlist * cut off the rest of the list * and return this rest */ wordlist * wl_chop_rest(wordlist *wl) { wordlist *rest = wl->wl_next; wl->wl_next = NULL; if(rest) rest->wl_prev = NULL; return (rest); } /* * search for a string in a wordlist */ wordlist * wl_find(const char *string, const wordlist *wl) { for (; wl; wl = wl->wl_next) if (eq(string, wl->wl_word)) break; return ((wordlist *) wl); } /* * delete elements from a wordlist * from inclusive `from' * up to exclusive `to' */ void wl_delete_slice(wordlist *from, wordlist *to) { wordlist *prev; if (from == to) return; prev = from->wl_prev; if(prev) prev->wl_next = to; if (to) { to->wl_prev->wl_next = NULL; to->wl_prev = prev; } wl_free(from); } ngspice-26/src/misc/hash.c0000644000265600020320000007330512264261473015052 0ustar andreasadmin/* ----------------------------------------------------------------- FILE: hash.c DESCRIPTION:This file contains the routines for building and maintaining a hash table. Abstract : Contains routines for managing hash tables. Tables may be given their own hash and compare functions. If your keys are pointers, numbers or strings, it is recommended that you use the functions * HASH_DEF_HASH_PTR and HASH_DEF_CMP_PTR for pointers, * HASH_DEF_HASH_NUM and HASH_DEF_CMP_NUM for numbers, and * HASH_DEF_HASH_STR and HASH_DEF_CMP_STR for strings. The hash package will recognize these and run faster as a result. You may use your own hash and compare functions provided they look like * int hash(void * key) and * int compare(void * key1, void * key2). The hash function's return value should be in the interval [0, Uint_MAX]. The compare should return zero if the two keys are equal and a non-zero value otherwise. CONTENTS: DATE: Jul 7, 1988 - original coding. 1988 - 2009 many updates... REVISIONS: ----------------------------------------------------------------- */ #include "ngspice/ngspice.h" #include "ngspice/hash.h" /* definitions local to this file only */ /* ********************** TYPE DEFINITIONS ************************* */ #define PRIMECOUNT 200 #define MINPRIMESIZE 7 /* ********************** STATIC DEFINITIONS ************************* */ static NGTABLEPTR _nghash_find_item(NGHASHPTR hhtable,void *user_key,void *data) ; NGHASHPTR nghash_init_with_parms(nghash_compare_func_t *comp_func, nghash_func_t *hash_func, int num, int max, double growth, NGHASHFLAGS_T flags) { BOOL unique ; /* entries are to be unique */ BOOL power_of_two ; /* want hash table power of 2 */ NGHASHPTR hashtable ; unique = flags & NGHASH_UNIQUE ; power_of_two = flags & NGHASH_POWER_OF_TWO ; hashtable = NGMALLOC( 1, NGHASHBOX ) ; if( power_of_two ){ hashtable->size = nghash_table_size2( num ) ; } else { /* prime size */ hashtable->size = nghash_table_size( num ) ; } hashtable->compare_func = comp_func ; hashtable->hash_func = hash_func ; hashtable->hash_table = NGMALLOC( hashtable->size, NGTABLEPTR ) ; hashtable->max_density = max ; hashtable->need_resize = hashtable->size * hashtable->max_density ; hashtable->growth_factor = growth ; hashtable->unique = (unique ? 1 : 0); hashtable->power_of_two = (power_of_two ? 1 : 0); hashtable->thread = NULL ; /* initialize list */ hashtable->last_entry = NULL ; /* end of list */ hashtable->num_entries = 0 ; hashtable->call_from_free = FALSE ; hashtable->access = 0; hashtable->collision = 0; hashtable->enumeratePtr = NULL ; return(hashtable) ; } /* end nghash_init_with_parms() */ void nghash_resize(NGHASHPTR hashtable, int num) { NGTABLEPTR *oldtable, hptr, zapptr ; NGTABLEPTR new_hptr ; /* new hash table entry */ int i, oldsize ; oldsize = hashtable->size ; oldtable = hashtable->hash_table; if( hashtable->power_of_two ){ hashtable->size = nghash_table_size2( num - 1 ) ; } else { hashtable->size = nghash_table_size( num ) ; } hashtable->num_entries = 0 ; hashtable->thread = NULL ; hashtable->last_entry = NULL ; /* end of list */ hashtable->need_resize = hashtable->size * hashtable->max_density ; hashtable->hash_table = NGMALLOC( hashtable->size, NGTABLEPTR); for( i = 0 ; i < oldsize ; i++ ) { for( hptr = oldtable[i]; hptr; ) { zapptr = hptr ; nghash_insert( hashtable, hptr->key, hptr->data ) ; if( hashtable->searchPtr && hashtable->searchPtr == hptr ){ new_hptr = _nghash_find_item(hashtable, hptr->key, hptr->data ) ; hashtable->searchPtr = new_hptr ; } if( hashtable->enumeratePtr && hashtable->enumeratePtr == hptr ){ new_hptr = _nghash_find_item(hashtable, hptr->key, hptr->data ) ; hashtable->enumeratePtr = new_hptr ; } /* Now safe to free */ if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { NGFREE( hptr->key); } hptr = hptr->next ; NGFREE( zapptr ) ; } } NGFREE( oldtable ); } /* end nghash_resize() */ void nghash_reset_stat(NGHASHPTR hashtable) { hashtable->collision = 0 ; hashtable->access = 0 ; } NGHASHPTR nghash_init(int num_entries) { return( nghash_init_with_parms( NGHASH_DEF_CMP(NGHASH_FUNC_STR), NGHASH_DEF_HASH(NGHASH_FUNC_STR), num_entries, NGHASH_DEF_MAX_DENSITY, NGHASH_DEF_GROW_FACTOR, NGHASH_UNIQUE) ) ; } /* end nghash_init() */ NGHASHPTR nghash_init_pointer(int num_entries) { return( nghash_init_with_parms( NGHASH_DEF_CMP(NGHASH_FUNC_PTR), NGHASH_DEF_HASH(NGHASH_FUNC_PTR), num_entries, NGHASH_DEF_MAX_DENSITY, NGHASH_DEF_GROW_FACTOR, NGHASH_UNIQUE_TWO) ) ; } /* end nghash_init_pointer() */ NGHASHPTR nghash_init_integer(int num_entries) { return( nghash_init_with_parms( NGHASH_DEF_CMP(NGHASH_FUNC_NUM), NGHASH_DEF_HASH(NGHASH_FUNC_NUM), num_entries, NGHASH_DEF_MAX_DENSITY, NGHASH_DEF_GROW_FACTOR, NGHASH_UNIQUE_TWO) ) ; } /* end nghash_init_integer() */ int nghash_table_get(NGHASHPTR hashtable) { return(hashtable->size) ; } int nghash_max_density(NGHASHPTR hashtable,int max_density) { if( max_density > 0 ){ hashtable->max_density = max_density ; hashtable->need_resize = hashtable->size * hashtable->max_density ; } return(hashtable->max_density) ; } void nghash_empty(NGHASHPTR hashtable, void (*delete_data) (void *), void (*delete_key) (void *)) { NGTABLEPTR *table, hptr , zapptr ; nghash_reset_stat(hashtable); table = hashtable->hash_table ; if( table ){ for( hptr = hashtable->thread ; hptr ; ){ zapptr = hptr ; hptr = hptr->thread_next ; /* execute user define delete function if requested */ if( delete_data ){ delete_data (zapptr->data); } if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { /* we allocated this ourselves we can delete it */ NGFREE( zapptr->key ) ; } else if( delete_key ){ delete_key (zapptr->key); } NGFREE( zapptr ) ; } memset(table, 0, (size_t) hashtable->size*sizeof(NGTABLEPTR)) ; } /* free decks associated with tree if they exist */ hashtable->thread = NULL ; /* initialize list */ hashtable->last_entry = NULL ; /* initialize list */ hashtable->num_entries = 0 ; } /* end nghash_empty() */ void nghash_free(NGHASHPTR hashtable, void (*delete_data) (void *), void (*delete_key) (void *)) { hashtable->call_from_free = TRUE; nghash_empty(hashtable, delete_data, delete_key ) ; hashtable->call_from_free = FALSE ; NGFREE( hashtable->hash_table ) ; NGFREE( hashtable ) ; } /* end nghash_free() */ void nghash_free_string_func( char *str ) { NGFREE( str ) ; } /* end nghash_free_string_func() */ void nghash_free_string_hashtable(NGHASHPTR hashtable) { hashtable->call_from_free = TRUE; nghash_empty(hashtable, (ngdelete) nghash_free_string_func, NULL ) ; hashtable->call_from_free = FALSE ; NGFREE( hashtable->hash_table ) ; NGFREE( hashtable ) ; } /* end nghash_free_string_hashtable() */ /* ----------------------------------------------------------------- * Now nghash_search is broken into four routines: nghash_find, * nghash_find_again, nghash_delete, and nghash_insert. ----------------------------------------------------------------- */ void * _nghash_find(NGHASHPTR hashtable, void * user_key,BOOL *status) { int ret_code ; unsigned int hsum ; NGTABLEPTR curPtr ; NGTABLEPTR *table ; /* initialization */ table = hashtable->hash_table ; DS(hashtable->access++;) ; /* ----------------------------------------------------------------- * Process the hash function. ----------------------------------------------------------------- */ switch( (intptr_t) hashtable->hash_func ) { case NGHASH_FUNC_STR: NGHASH_STR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_PTR: NGHASH_PTR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_NUM: NGHASH_NUM_TO_HASH( user_key, hsum, hashtable->size); break ; default: hsum = hashtable->hash_func (hashtable, user_key); } curPtr = table[hsum] ; if( curPtr ){ /* list started at this hash */ for( ; curPtr ; curPtr=curPtr->next ) { if( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key ); } else { ret_code = hashtable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ /* ---------------------------------------------------- * Operation find or enter with unique items, we * return item. On a nonunique enter, add item below. ------------------------------------------------------- */ hashtable->searchPtr = curPtr ; if( status ){ *status = TRUE ; } return( curPtr->data ) ; } } } /* cant find anything on a find operation */ hashtable->searchPtr = NULL ; if( status ){ *status = FALSE ; } return( NULL ) ; } /* end nghash_find() */ /* ----------------------------------------------------------------- * This find does not understand 0 or NULL data items. Use _nghash_find * instead. * ----------------------------------------------------------------- */ void * nghash_find(NGHASHPTR hashtable, void * user_key) { return( _nghash_find( hashtable, user_key, NULL ) ) ; } /* end nghash_find() */ void * _nghash_find_again(NGHASHPTR hashtable, void * user_key,BOOL *status) { int ret_code ; /* comparison return code */ NGTABLEPTR curPtr ; /* current hashtable entry */ /* initialization */ DS(hashtable->access++;) ; if( hashtable->searchPtr ){ for(curPtr=hashtable->searchPtr->next; curPtr ; curPtr=curPtr->next ) { if( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key ); } else { ret_code = hashtable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ hashtable->searchPtr = curPtr ; if( status ){ *status = TRUE ; } return( curPtr->data ) ; } } } if( status ){ *status = FALSE ; } return(NULL) ; } /* end _nghash_find_again() */ void * nghash_find_again(NGHASHPTR hashtable, void * user_key) { return( _nghash_find_again( hashtable, user_key, NULL ) ) ; } /* end nghash_find_again() */ void * nghash_delete(NGHASHPTR hashtable, void * user_key) { int ret_code ; unsigned int hsum ; void * user_data_p ; NGTABLEPTR curPtr, *prevPtr ; NGTABLEPTR *table ; /* initialization */ table = hashtable->hash_table ; DS(hashtable->access++;) ; /* ----------------------------------------------------------------- * Process the hash function. ----------------------------------------------------------------- */ switch( (intptr_t) hashtable->hash_func ) { case NGHASH_FUNC_STR: NGHASH_STR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_PTR: NGHASH_PTR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_NUM: NGHASH_NUM_TO_HASH( user_key, hsum, hashtable->size); break ; default: hsum = hashtable->hash_func (hashtable, user_key); } /* insert into table only if distinct number */ curPtr = table[hsum] ; if( curPtr ){ /* list started at this hash */ prevPtr = table + hsum ; for( ; curPtr ; prevPtr = &(curPtr->next), curPtr=curPtr->next ) { if( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key ); } else { ret_code = hashtable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ if( curPtr->thread_prev ){ /* no sentinel */ curPtr->thread_prev->thread_next = curPtr->thread_next; } else { hashtable->thread = curPtr->thread_next ; } if( curPtr->thread_next ){ /* no sentinel */ curPtr->thread_next->thread_prev = curPtr->thread_prev ; } else { hashtable->last_entry = curPtr->thread_prev ; } *prevPtr = curPtr->next ; if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { /* we allocated this ourselves we can delete it */ NGFREE( curPtr->key ) ; } user_data_p = curPtr->data ; NGFREE(curPtr); hashtable->num_entries-- ; return( user_data_p ) ; } } } return( NULL ) ; /* didn't find anything to delete */ } /* end nghash_delete() */ void * nghash_insert(NGHASHPTR hashtable, void * user_key, void * data) { int ret_code ; unsigned int hsum ; NGTABLEPTR curPtr, temptr, curTable ; NGTABLEPTR *table ; /* initialization */ table = hashtable->hash_table ; DS(hashtable->access++;) /* ----------------------------------------------------------------- * Process the hash function. ----------------------------------------------------------------- */ switch( (intptr_t) hashtable->hash_func ) { case NGHASH_FUNC_STR: NGHASH_STR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_PTR: NGHASH_PTR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_NUM: NGHASH_NUM_TO_HASH( user_key, hsum, hashtable->size); break ; default: hsum = hashtable->hash_func (hashtable, user_key); } /* insert into table only if distinct number */ temptr = table[hsum] ; if( temptr ){ /* list started at this hash */ for( curPtr = temptr ; curPtr ; curPtr=curPtr->next ) { DS(hashtable->collision++;) ; if( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key); } else { ret_code = hashtable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ if( hashtable->unique ){ /* ---------------------------------------------------- * Operation enter with unique items, we * return item. On a nonunique enter, add item below. ------------------------------------------------------- */ hashtable->searchPtr = curPtr ; return( curPtr->data ) ; } else { break ; /* avoid some work for nonunique hash_enter */ } } } } /* now save data */ hashtable->num_entries++ ; table[hsum] = curTable = NGMALLOC(1,NGTABLEBOX); curTable->data = data ; if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { curTable->key = copy((char *) user_key); } else { curTable->key = user_key ; } curTable->next = temptr ; /* now fix thread which goes through hash table */ if( hashtable->last_entry ){ hashtable->last_entry->thread_next = curTable ; curTable->thread_prev = hashtable->last_entry ; hashtable->last_entry = curTable ; } else { hashtable->thread = hashtable->last_entry = curTable ; curTable->thread_prev = NULL ; } curTable->thread_next = NULL ; if( hashtable->num_entries >= hashtable->need_resize ){ int newsize ; /* new size of table */ newsize = (int)(hashtable->size * hashtable->growth_factor); nghash_resize(hashtable, newsize ) ; } return( NULL ) ; /* no conflict on a enter */ } /* end nghash_insert() */ /* returns the pointer with the item */ static NGTABLEPTR _nghash_find_item(NGHASHPTR htable,void * user_key,void * data) { int ret_code ; unsigned int hsum ; NGTABLEPTR curPtr, temptr ; NGTABLEPTR *table ; /* initialization */ table = htable->hash_table ; /* ----------------------------------------------------------------- * Process the hash function. ----------------------------------------------------------------- */ switch( (intptr_t) htable->hash_func ) { case NGHASH_FUNC_STR: NGHASH_STR_TO_HASH( user_key, hsum, htable->size); break ; case NGHASH_FUNC_PTR: NGHASH_PTR_TO_HASH( user_key, hsum, htable->size); break ; case NGHASH_FUNC_NUM: NGHASH_NUM_TO_HASH( user_key, hsum, htable->size); break ; default: hsum = htable->hash_func (htable, user_key); } /* insert into table only if distinct number */ if( (temptr = table[hsum]) != NULL ){ /* list started at this hash */ for(curPtr=temptr ; curPtr ; curPtr=curPtr->next ) { if( htable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( htable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || htable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key); } else { ret_code = htable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ if( data ){ if( curPtr->data == data ){ return( curPtr ) ; } } else { return( curPtr ) ; } } } } return( NULL ) ; /* no matching item */ } /* end _nghash_find_item() */ void * nghash_enumeratek(NGHASHPTR htable, void * *key_return, BOOL start_flag) { NGTABLEPTR current_spot ; /* current place in threaded list */ if( start_flag ){ if( (htable->enumeratePtr = htable->thread) != NULL ) { current_spot = htable->enumeratePtr ; *key_return = current_spot->key ; return( current_spot->data ) ; } } else { if( htable->enumeratePtr && (htable->enumeratePtr = htable->enumeratePtr->thread_next) != NULL ){ current_spot = htable->enumeratePtr ; *key_return = current_spot->key ; return( current_spot->data ) ; } } *key_return = NULL ; return( NULL ) ; } /* end nghash_enumeratek() */ void * nghash_enumerate(NGHASHPTR htable,BOOL start_flag) { NGTABLEPTR current_spot ; /* current place in threaded list */ if( start_flag ){ if( (htable->enumeratePtr = htable->thread) != NULL ){ current_spot = htable->enumeratePtr ; return( current_spot->data ) ; } } else { if( htable->enumeratePtr && (htable->enumeratePtr = htable->enumeratePtr->thread_next) != NULL ){ current_spot = htable->enumeratePtr ; return( current_spot->data ) ; } } return( NULL ) ; } /* end nghash_enumerate() */ /* ----------------------------------------------------------------- * This is the reentrant version which uses an iterator. * ----------------------------------------------------------------- */ void * nghash_enumeratekRE(NGHASHPTR htable, void * *key_return, NGHASHITERPTR iter_p) { NGTABLEPTR current_spot ; /* current place in threaded list */ FUNC_NAME("nghash_enumeratekRE") ; if(!(iter_p)){ fprintf( stderr, "ERROR[%s]:Null iterator pointer.\n", routine ) ; return(NULL) ; } if(!(iter_p->position)){ if( (iter_p->position = htable->thread) != NULL ){ current_spot = iter_p->position ; *key_return = current_spot->key ; return( current_spot->data ) ; } } else { if( iter_p->position && (iter_p->position = iter_p->position->thread_next) != NULL ){ current_spot = iter_p->position ; *key_return = current_spot->key ; return( current_spot->data ) ; } } *key_return = NULL ; return( NULL ) ; } /* end nghash_enumeratekRE() */ /* ----------------------------------------------------------------- * This is the reentrant version which uses an iterator. * ----------------------------------------------------------------- */ void * nghash_enumerateRE(NGHASHPTR htable, NGHASHITERPTR iter_p) { NGTABLEPTR current_spot ; /* current place in threaded list */ FUNC_NAME("nghash_enumerateRE") ; if(!(iter_p)){ fprintf( stderr, "ERROR[%s]:Null iterator pointer.\n", routine ) ; return(NULL) ; } if(!(iter_p->position)){ if( (iter_p->position = htable->thread) != NULL ){ current_spot = iter_p->position ; return( current_spot->data ) ; } } else { if( iter_p->position && (iter_p->position = iter_p->position->thread_next) != NULL ){ current_spot = iter_p->position ; return( current_spot->data ) ; } } return( NULL ) ; } /* end nghash_enumerateRE() */ /* ----------------------------------------------------------------- * Merge items in merge_htable into master_htable. Create master_htable * if master_htable is NULL. Returns the merged hash table. * ----------------------------------------------------------------- */ NGHASHPTR nghash_merge( NGHASHPTR master_htable, NGHASHPTR merge_htable ) { NGTABLEPTR ptr ; /* traverse hash table */ if(!(master_htable)){ master_htable = NGMALLOC( 1, NGHASHBOX ) ; *master_htable = *merge_htable ; master_htable->hash_table = NGMALLOC( master_htable->size, NGTABLEPTR ) ; master_htable->thread = NULL ; master_htable->last_entry = NULL ; master_htable->num_entries = 0 ; master_htable->enumeratePtr = NULL ; master_htable->searchPtr = NULL ; master_htable->access = 0 ; master_htable->collision = 0 ; } for( ptr = merge_htable->thread ; ptr ; ptr = ptr->thread_next ){ nghash_insert( master_htable, ptr->key, ptr->data ) ; } return( master_htable ) ; } /* end nghash_merge() */ int nghash_get_size(NGHASHPTR hashtable) { return( hashtable->num_entries ) ; } void nghash_dump(NGHASHPTR htable, void (*print_key) (void *)) { int i ; /* counter */ int count ; /* counter */ NGTABLEPTR *table ; /* hash table */ NGTABLEPTR hptr ; /* hash table element */ table = htable->hash_table ; fprintf( stderr, "Dump of hashtable containing %d entries...\n", htable->num_entries ) ; fprintf( stderr, "Table is %4.2f%% full\n", 100.0 * (double) htable->num_entries / (double) htable->size ) ; for( i = 0 ; i < htable->size ; i++ ) { if( (hptr = table[i]) != NULL ){ fprintf( stderr, " [%5d]:", i ) ; count = 0 ; for( ; hptr ; hptr=hptr->next ){ if( ++count == 3 ){ fprintf( stderr, "\n\t" ) ; count = 0 ; } if( htable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { fprintf( stderr, " key:%s ", (char *) hptr->key ) ; } else { fprintf( stderr, " key:%p ", hptr->key ) ; } if( print_key) { print_key (hptr->data); } else { fprintf( stderr, " data:%p ", hptr->data ) ; } } fprintf( stderr, "\n" ) ; } } /* end for( i = 0... */ } /* end nghash_enumerate() */ /* ----------------------------------------------------------------- * nghash_deleteItem - deletes a specified item out of the hash table. * To be useful, unique flag should be off. Otherwise just use nghash_delete. * Returns true if item was deleted. ----------------------------------------------------------------- */ BOOL nghash_deleteItem(NGHASHPTR hashtable, void * user_key, void * data) { int ret_code ; unsigned long hsum ; NGTABLEPTR curPtr, temptr, *prevPtr ; NGTABLEPTR *table ; /* initialization */ table = hashtable->hash_table ; /* ----------------------------------------------------------------- * Process the hash function. ----------------------------------------------------------------- */ switch( (intptr_t) hashtable->hash_func ) { case NGHASH_FUNC_STR: NGHASH_STR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_PTR: NGHASH_PTR_TO_HASH( user_key, hsum, hashtable->size); break ; case NGHASH_FUNC_NUM: NGHASH_NUM_TO_HASH( user_key, hsum, hashtable->size); break ; default: hsum = hashtable->hash_func (hashtable, user_key); } /* insert into table only if distinct number */ temptr = table[hsum] ; if( temptr ){ /* list started at this hash */ prevPtr = table + hsum ; for(curPtr=temptr;curPtr;prevPtr = &(curPtr->next), curPtr=curPtr->next ) { /* ----------------------------------------------------------------- * Look for match. ----------------------------------------------------------------- */ if( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_STR) ) { ret_code = strcmp((char *)curPtr->key, (char *) user_key ) ; } else if ( hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_PTR) || hashtable->compare_func == NGHASH_DEF_CMP(NGHASH_FUNC_NUM) ) { ret_code = NGHASH_PTR_COMPARE_FUNC( curPtr->key, user_key ); } else { ret_code = hashtable->compare_func (curPtr->key, user_key); } if( ret_code == STRINGEQ ){ if( curPtr->data == data ){ if( curPtr->thread_prev ){ /* no sentinel */ curPtr->thread_prev->thread_next = curPtr->thread_next; } else { hashtable->thread = curPtr->thread_next ; } if( curPtr->thread_next ){ /* no sentinel */ curPtr->thread_next->thread_prev = curPtr->thread_prev ; } else { hashtable->last_entry = curPtr->thread_prev ; } *prevPtr = curPtr->next; if( hashtable->hash_func == NGHASH_DEF_HASH(NGHASH_FUNC_STR) ) { /* we allocated this ourselves we can delete it */ NGFREE( curPtr->key ) ; } NGFREE(curPtr); hashtable->num_entries-- ; return( TRUE ) ; } } } /* end for(curPtr=temptr... */ } /* end if( temptr... */ return( FALSE ) ; /* could not find item */ } /* end nghash_deleteItem() */ /*---------------------------- hash_table_size -------------------------*/ int nghash_table_size(int minEntries) { int i; BOOL isPrime; int prime; int testPrime; static int primes[PRIMECOUNT] = { 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 991, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997,1009,1013,1019, 1021,1031,1033,1039,1049,1051,1061,1063,1069,1087, 1091,1093,1097,1103,1109,1117,1123,1129,1151,1153, 1163,1171,1181,1187,1193,1201,1213,1217,1223,1229 }; if (minEntries <= MINPRIMESIZE){ return(MINPRIMESIZE); } else { testPrime = minEntries; /* test to see if even */ if ((testPrime % 2) == 0){ testPrime = testPrime + 1; } do { testPrime = testPrime + 2; isPrime = TRUE; for (i=0;i < PRIMECOUNT;i++){ prime = primes[i]; if (testPrime < prime*prime){ break; } if ((testPrime % prime) == 0){ isPrime = FALSE; break; } } } while (!(isPrime)); return(testPrime); } } /* FUNCTION nghash_table_size */ int nghash_table_size2(int minEntries) { int power ; int table_size ; power = 0 ; while( minEntries > 0 ){ minEntries = minEntries >> 1 ; power++ ; } power = MIN( power, 32 ) ; table_size = 1 << power ; table_size = MAX( NGHASH_MIN_SIZE, table_size ) ; return( table_size ) ; } /* end nghash_table_size2() */ void nghash_distribution(NGHASHPTR hashtable) { int i ; /* counter */ long min ; /* min count */ long max ; /* max count */ long nzero_cnt ; /* non zero count */ long this_count ; /* count items at this list */ long tablesize ; /* table size */ double avg ; /* average */ double sum2 ; /* squared sum */ double diff ; /* difference */ double diff2 ; /* difference squared */ double nzavg ; /* non zero average */ double variance ; /* variance of table */ NGTABLEPTR *table ; /* hash table */ NGTABLEPTR hptr ; /* hash table pointer */ FUNC_NAME("nghash_distribution" ) ; tablesize = nghash_tablesize(hashtable) ; table = hashtable->hash_table ; avg = hashtable->num_entries / (double) tablesize ; sum2 = 0.0 ; min = max = 0 ; nzero_cnt = 0 ; for( i = 0 ; i < tablesize ; i++ ) { this_count = 0 ; for( hptr = table[i]; hptr; hptr = hptr->next ) { this_count++ ; } if( i == 0 ){ min = max = this_count ; } else { if( this_count < min ){ min = this_count ; } if( this_count > max ){ max = this_count ; } } if( this_count > 0 ){ nzero_cnt++ ; } diff = (double)this_count - avg ; diff2 = diff * diff ; sum2 += diff2 ; } variance = sum2 / hashtable->num_entries ; nzavg = hashtable->num_entries / (double) nzero_cnt ; fprintf( stderr, "[%s]:min:%ld max:%ld nonzero avg:%f\n", routine, min, max, nzavg ) ; fprintf( stderr, " variance:%f std dev:%f target:%f nonzero entries:%ld / %ld\n", variance, sqrt(variance), avg, nzero_cnt, tablesize ) ; } /* end nghash_distribution() */ ngspice-26/src/misc/getopt_long_bsd.c0000644000265600020320000004243012264261473017273 0ustar andreasadmin/* $OpenBSD: getopt_long.c,v 1.11 2002/12/10 17:51:42 millert Exp $ */ /* $NetBSD: getopt_long.c,v 1.15 2002/01/31 22:43:40 tv Exp $ */ /* * Copyright (c) 2002 Todd C. Miller * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Dieter Baron and Thomas Klausner. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the NetBSD * Foundation, Inc. and its contributors. * 4. Neither the name of The NetBSD Foundation nor the names of its * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ /* downloaded from http://www.koders.com/c/fid5FCCD794DA3E7129AC307C40B5D31C268ED04FF5.aspx at 04/10/09 by H. Vogt */ #include "ngspice/ngspice.h" #include /* If configure finds getopt.h and fcn getopt_long(), then the rest of this file will not be used. Otherwise (as in MS Visual Studio) this file provides the fcn getopt_long(), used in main() of ngspice */ #if !defined(HAVE_GETOPT_LONG) || !defined(HAVE_GETOPT_H) #include "getopt_bsd.h" #include #include #include #include //#ifdef REPLACE_GETOPT int opterr = 1; /* if error message should be printed */ int optind = 1; /* index into parent argv vector */ int optopt = '?'; /* character checked for validity */ char *optarg = NULL; /* argument associated with option */ //#endif int optreset = 0; /* reset getopt */ #define PRINT_ERROR ((opterr) && (*options != ':')) #define FLAG_PERMUTE 0x01 /* permute non-options to the end of argv */ #define FLAG_ALLARGS 0x02 /* treat non-options as args to option "-1" */ #define FLAG_LONGONLY 0x04 /* operate as getopt_long_only */ /* return values */ #define BADCH (int)'?' #define BADARG ((*options == ':') ? (int)':' : (int)'?') #define INORDER (int)1 #define EMSG "" static int getopt_internal(int, char * const *, const char *, const struct option *, int *, int); static int parse_long_options(char * const *, const char *, const struct option *, int *, int); static int gcd(int, int); static void permute_args(int, int, int, char * const *); static char *place = EMSG; /* option letter processing */ /* XXX: set optreset to 1 rather than these two */ static int nonopt_start = -1; /* first non option argument (for permute) */ static int nonopt_end = -1; /* first option after non options (for permute) */ /* Error messages */ static const char recargchar[] = "option requires an argument -- %c"; static const char recargstring[] = "option requires an argument -- %s"; static const char ambig[] = "ambiguous option -- %.*s"; static const char noarg[] = "option doesn't take an argument -- %.*s"; static const char illoptchar[] = "unknown option -- %c"; static const char illoptstring[] = "unknown option -- %s"; static void warnxx(const char *fmt, ...) { va_list args; va_start(args, fmt); vfprintf(stderr, fmt, args); fprintf(stderr,"\n"); va_end(args); } /* * Compute the greatest common divisor of a and b. */ static int gcd(int a, int b) { int c; c = a % b; while (c != 0) { a = b; b = c; c = a % b; } return (b); } /* * Exchange the block from nonopt_start to nonopt_end with the block * from nonopt_end to opt_end (keeping the same order of arguments * in each block). */ static void permute_args(int panonopt_start, int panonopt_end, int opt_end, char * const *nargv) { int cstart, cyclelen, i, j, ncycle, nnonopts, nopts, pos; char *swap; /* * compute lengths of blocks and number and size of cycles */ nnonopts = panonopt_end - panonopt_start; nopts = opt_end - panonopt_end; ncycle = gcd(nnonopts, nopts); cyclelen = (opt_end - panonopt_start) / ncycle; for (i = 0; i < ncycle; i++) { cstart = panonopt_end+i; pos = cstart; for (j = 0; j < cyclelen; j++) { if (pos >= panonopt_end) pos -= nnonopts; else pos += nopts; swap = nargv[pos]; /* LINTED const cast */ ((char **) nargv)[pos] = nargv[cstart]; /* LINTED const cast */ ((char **)nargv)[cstart] = swap; } } } /* * parse_long_options -- * Parse long options in argc/argv argument vector. * Returns -1 if short_too is set and the option does not match long_options. */ static int parse_long_options(char * const *nargv, const char *options, const struct option *long_options, int *idx, int short_too) { char *current_argv, *has_equal; size_t current_argv_len; int i, match; current_argv = place; match = -1; optind++; if ((has_equal = strchr(current_argv, '=')) != NULL) { /* argument found (--option=arg) */ current_argv_len = has_equal - current_argv; has_equal++; } else current_argv_len = strlen(current_argv); for (i = 0; long_options[i].name; i++) { /* find matching long option */ if (strncmp(current_argv, long_options[i].name, current_argv_len)) continue; if (strlen(long_options[i].name) == current_argv_len) { /* exact match */ match = i; break; } /* * If this is a known short option, don't allow * a partial match of a single character. */ if (short_too && current_argv_len == 1) continue; if (match == -1) /* partial match */ match = i; else { /* ambiguous abbreviation */ if (PRINT_ERROR) warnxx(ambig, (int)current_argv_len, current_argv); optopt = 0; return (BADCH); } } if (match != -1) { /* option found */ if (long_options[match].has_arg == no_argument && has_equal) { if (PRINT_ERROR) warnxx(noarg, (int)current_argv_len, current_argv); /* * XXX: GNU sets optopt to val regardless of flag */ if (long_options[match].flag == NULL) optopt = long_options[match].val; else optopt = 0; return (BADARG); } if (long_options[match].has_arg == required_argument || long_options[match].has_arg == optional_argument) { if (has_equal) optarg = has_equal; else if (long_options[match].has_arg == required_argument) { /* * optional argument doesn't use next nargv */ optarg = nargv[optind++]; } } if ((long_options[match].has_arg == required_argument) && (optarg == NULL)) { /* * Missing argument; leading ':' indicates no error * should be generated. */ if (PRINT_ERROR) warnxx(recargstring, current_argv); /* * XXX: GNU sets optopt to val regardless of flag */ if (long_options[match].flag == NULL) optopt = long_options[match].val; else optopt = 0; --optind; return (BADARG); } } else { /* unknown option */ if (short_too) { --optind; return (-1); } if (PRINT_ERROR) warnxx(illoptstring, current_argv); optopt = 0; return (BADCH); } if (idx) *idx = match; if (long_options[match].flag) { *long_options[match].flag = long_options[match].val; return (0); } else return (long_options[match].val); } /* * getopt_internal -- * Parse argc/argv argument vector. Called by user level routines. */ static int getopt_internal(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx, int flags) { char *oli; /* option letter list index */ int optchar, short_too; static int posixly_correct = -1; if (options == NULL) return (-1); /* * Disable GNU extensions if POSIXLY_CORRECT is set or options * string begins with a '+'. */ if (posixly_correct == -1) posixly_correct = (getenv("POSIXLY_CORRECT") != NULL); if (posixly_correct || *options == '+') flags &= ~FLAG_PERMUTE; else if (*options == '-') flags |= FLAG_ALLARGS; if (*options == '+' || *options == '-') options++; /* * XXX Some GNU programs (like cvs) set optind to 0 instead of * XXX using optreset. Work around this braindamage. */ if (optind == 0) optind = optreset = 1; optarg = NULL; if (optreset) nonopt_start = nonopt_end = -1; start: if (optreset || !*place) { /* update scanning pointer */ optreset = 0; if (optind >= nargc) { /* end of argument vector */ place = EMSG; if (nonopt_end != -1) { /* do permutation, if we have to */ permute_args(nonopt_start, nonopt_end, optind, nargv); optind -= nonopt_end - nonopt_start; } else if (nonopt_start != -1) { /* * If we skipped non-options, set optind * to the first of them. */ optind = nonopt_start; } nonopt_start = nonopt_end = -1; return (-1); } if (*(place = nargv[optind]) != '-' || (place[1] == '\0' && strchr(options, '-') == NULL)) { place = EMSG; /* found non-option */ if (flags & FLAG_ALLARGS) { /* * GNU extension: * return non-option as argument to option 1 */ optarg = nargv[optind++]; return (INORDER); } if (!(flags & FLAG_PERMUTE)) { /* * If no permutation wanted, stop parsing * at first non-option. */ return (-1); } /* do permutation */ if (nonopt_start == -1) nonopt_start = optind; else if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, nargv); nonopt_start = optind - (nonopt_end - nonopt_start); nonopt_end = -1; } optind++; /* process next argument */ goto start; } if (nonopt_start != -1 && nonopt_end == -1) nonopt_end = optind; /* * Check for "--" or "--foo" with no long options * but if place is simply "-" leave it unmolested. */ if (place[1] != '\0' && *++place == '-' && (place[1] == '\0' || long_options == NULL)) { optind++; place = EMSG; /* * We found an option (--), so if we skipped * non-options, we have to permute. */ if (nonopt_end != -1) { permute_args(nonopt_start, nonopt_end, optind, nargv); optind -= nonopt_end - nonopt_start; } nonopt_start = nonopt_end = -1; return (-1); } } /* * Check long options if: * 1) we were passed some * 2) the arg is not just "-" * 3) either the arg starts with -- we are getopt_long_only() */ if (long_options != NULL && place != nargv[optind] && (*place == '-' || (flags & FLAG_LONGONLY))) { short_too = 0; if (*place == '-') place++; /* --foo long option */ else if (*place != ':' && strchr(options, *place) != NULL) short_too = 1; /* could be short option too */ optchar = parse_long_options(nargv, options, long_options, idx, short_too); if (optchar != -1) { place = EMSG; return (optchar); } } if ((optchar = (int)*place++) == (int)':' || (oli = strchr(options, optchar)) == NULL) { /* * If the user didn't specify '-' as an option, * assume it means -1 as POSIX specifies. */ if (optchar == (int)'-') return (-1); /* option letter unknown or ':' */ if (!*place) ++optind; if (PRINT_ERROR) warnxx(illoptchar, optchar); optopt = optchar; return (BADCH); } if (long_options != NULL && optchar == 'W' && oli[1] == ';') { /* -W long-option */ if (*place) /* no space */ /* NOTHING */; else if (++optind >= nargc) { /* no arg */ place = EMSG; if (PRINT_ERROR) warnxx(recargchar, optchar); optopt = optchar; return (BADARG); } else /* white space */ place = nargv[optind]; optchar = parse_long_options(nargv, options, long_options, idx, 0); place = EMSG; return (optchar); } if (*++oli != ':') { /* doesn't take argument */ if (!*place) ++optind; } else { /* takes (optional) argument */ optarg = NULL; if (*place) /* no white space */ optarg = place; /* XXX: disable test for :: if PC? (GNU doesn't) */ else if (oli[1] != ':') { /* arg not optional */ if (++optind >= nargc) { /* no arg */ place = EMSG; if (PRINT_ERROR) warnxx(recargchar, optchar); optopt = optchar; return (BADARG); } else optarg = nargv[optind]; } place = EMSG; ++optind; } /* dump back option letter */ return (optchar); } #ifdef REPLACE_GETOPT /* * getopt -- * Parse argc/argv argument vector. * * [eventually this will replace the BSD getopt] */ int getopt(int nargc, char * const *nargv, const char *options) { /* * We dont' pass FLAG_PERMUTE to getopt_internal() since * the BSD getopt(3) (unlike GNU) has never done this. * * Furthermore, since many privileged programs call getopt() * before dropping privileges it makes sense to keep things * as simple (and bug-free) as possible. */ return (getopt_internal(nargc, nargv, options, NULL, NULL, 0)); } #endif /* REPLACE_GETOPT */ /* * getopt_long -- * Parse argc/argv argument vector. */ int getopt_long(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx) { return (getopt_internal(nargc, nargv, options, long_options, idx, FLAG_PERMUTE)); } /* * getopt_long_only -- * Parse argc/argv argument vector. */ int getopt_long_only(int nargc, char * const *nargv, const char *options, const struct option *long_options, int *idx) { return (getopt_internal(nargc, nargv, options, long_options, idx, FLAG_PERMUTE|FLAG_LONGONLY)); } #endif /* HAVE_GETOPT_LONG */ ngspice-26/src/misc/misc_time.h0000644000265600020320000000047012264261473016076 0ustar andreasadmin/************* * Header file for misc_time.c * 1999 E. Rouat ************/ #ifndef ngspice_MISC_TIME_H #define ngspice_MISC_TIME_H char * datestring(void); double seconds(void); #ifdef HAVE_FTIME extern struct timeb timebegin; void timediff(struct timeb *, struct timeb *, int *, int *); #endif #endif ngspice-26/src/misc/alloc.c0000644000265600020320000000606612264261473015221 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* for thread handling */ #if defined __MINGW32__ || defined _MSC_VER #include #endif /* * Memory alloction functions */ #include "ngspice/ngspice.h" /* We need this because some tests in cmaths and some executables other than ngspice and ngnutmeg under LINUX don't know about controlled_exit */ #if defined HAS_WINGUI || defined SHARED_MODULE extern void controlled_exit(int status); #endif #ifdef SHARED_MODULE #ifndef HAVE_LIBPTHREAD #ifdef SRW #define mutex_lock(a) AcquireSRWLockExclusive(a) #define mutex_unlock(a) ReleaseSRWLockExclusive(a) typedef SRWLOCK mutexType; #else #define mutex_lock(a) EnterCriticalSection(a) #define mutex_unlock(a) LeaveCriticalSection(a) typedef CRITICAL_SECTION mutexType; #endif extern mutexType allocMutex; #else #include #define mutex_lock(a) pthread_mutex_lock(a) #define mutex_unlock(a) pthread_mutex_unlock(a) typedef pthread_mutex_t mutexType; extern mutexType allocMutex; #endif #endif #ifndef HAVE_LIBGC /*saj For Tcl module locking*/ #ifdef TCL_MODULE #include #endif /* Malloc num bytes and initialize to zero. Fatal error if the space can't * be tmalloc'd. Return NULL for a request for 0 bytes. */ /* New implementation of tmalloc, it uses calloc and does not call bzero() */ void * tmalloc(size_t num) { void *s; /*saj*/ #ifdef TCL_MODULE Tcl_Mutex *alloc; alloc = Tcl_GetAllocMutex(); #endif if (!num) return NULL; /*saj*/ #ifdef TCL_MODULE Tcl_MutexLock(alloc); #elif defined SHARED_MODULE mutex_lock(&allocMutex); #endif s = calloc(num,1); /*saj*/ #ifdef TCL_MODULE Tcl_MutexUnlock(alloc); #elif defined SHARED_MODULE mutex_unlock(&allocMutex); #endif if (!s){ fprintf(stderr,"malloc: Internal Error: can't allocate %ld bytes. \n",(long)num); #if defined HAS_WINGUI || defined SHARED_MODULE controlled_exit(EXIT_FAILURE); #else exit(EXIT_FAILURE); #endif } return(s); } void * trealloc(void *ptr, size_t num) { void *s; /*saj*/ #ifdef TCL_MODULE Tcl_Mutex *alloc; alloc = Tcl_GetAllocMutex(); #endif if (!num) { if (ptr) free(ptr); return NULL; } if (!ptr) s = tmalloc(num); else { /*saj*/ #ifdef TCL_MODULE Tcl_MutexLock(alloc); #elif defined SHARED_MODULE mutex_lock(&allocMutex); #endif s = realloc(ptr, num); /*saj*/ #ifdef TCL_MODULE Tcl_MutexUnlock(alloc); #elif defined SHARED_MODULE mutex_unlock(&allocMutex); #endif } if (!s) { fprintf(stderr,"realloc: Internal Error: can't allocate %ld bytes.\n", (long)num); #if defined HAS_WINGUI || defined SHARED_MODULE controlled_exit(EXIT_FAILURE); #else exit(EXIT_FAILURE); #endif } return(s); } void txfree(void *ptr) { /*saj*/ #ifdef TCL_MODULE Tcl_Mutex *alloc; alloc = Tcl_GetAllocMutex(); Tcl_MutexLock(alloc); #endif #ifdef SHARED_MODULE mutex_lock(&allocMutex); #endif if (ptr) free(ptr); /*saj*/ #ifdef TCL_MODULE Tcl_MutexUnlock(alloc); #elif defined SHARED_MODULE mutex_unlock(&allocMutex); #endif } #endif ngspice-26/src/misc/ivars.c0000644000265600020320000000702112264261473015243 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #include "ivars.h" #include "../misc/util.h" /* ngdirname() */ #ifdef HAVE_ASPRINTF #ifdef HAVE_LIBIBERTY_H /* asprintf */ #include #elif defined(__MINGW32__) || defined(__SUNPRO_C) /* we have asprintf, but not libiberty.h */ #include extern int asprintf(char **out, const char *fmt, ...); extern int vasprintf(char **out, const char *fmt, va_list ap); #endif #endif char *Spice_Path; char *News_File; char *Help_Path; char *Lib_Path; char *Inp_Path; static void env_overr(char **v, char *e) { char *p; if (v && e && (p = getenv(e)) != NULL) *v = p; } static void mkvar(char **p, char *path_prefix, char *var_dir, char *env_var) { char *buffer; /* Override by environment variables */ buffer = getenv(env_var); #ifdef HAVE_ASPRINTF if (buffer) asprintf(p, "%s", buffer); else asprintf(p, "%s%s%s", path_prefix, DIR_PATHSEP, var_dir); #else /* ~ HAVE_ASPRINTF */ if (buffer){ *p = TMALLOC(char, strlen(buffer) + 1); sprintf(*p,"%s",buffer); /* asprintf(p, "%s", buffer); */ } else{ *p = TMALLOC(char, strlen(path_prefix) + strlen(DIR_PATHSEP) + strlen(var_dir) + 1); sprintf(*p, "%s%s%s", path_prefix, DIR_PATHSEP, var_dir); /* asprintf(p, "%s%s%s", path_prefix, DIR_PATHSEP, var_dir); */ } #endif /* HAVE_ASPRINTF */ } void ivars(char *argv0) { char *temp=NULL; /* $dprefix has been set to /usr/local or C:/Spice (Windows) in configure.ac, NGSPICEBINDIR has been set to $dprefix/bin in configure.ac, Spice_Exec_Dir has been set to NGSPICEBINDIR in conf.c, may be overridden here by environmental variable SPICE_EXEC_DIR */ env_overr(&Spice_Exec_Dir, "SPICE_EXEC_DIR"); env_overr(&Spice_Lib_Dir, "SPICE_LIB_DIR"); /* for printing a news file */ mkvar(&News_File, Spice_Lib_Dir, "news", "SPICE_NEWS"); /* help directory, not used in Windows mode */ mkvar(&Help_Path, Spice_Lib_Dir, "helpdir", "SPICE_HELP_DIR"); /* where spinit is found */ mkvar(&Lib_Path, Spice_Lib_Dir, "scripts", "SPICE_SCRIPTS"); /* used to call ngspice with aspice command, not used in Windows mode */ mkvar(&Spice_Path, Spice_Exec_Dir, "ngspice", "SPICE_PATH"); /* may be used to store input files (*.lib, *.include, ...) */ /* get directory where ngspice resides */ #if defined (HAS_WINGUI) || defined (__MINGW32__) || defined (_MSC_VER) { char *ngpath = ngdirname(argv0); /* set path either to /input or, if set, to environment variable NGSPICE_INPUT_DIR */ mkvar(&Inp_Path, ngpath, "input", "NGSPICE_INPUT_DIR"); tfree(ngpath); } #else NG_IGNORE(argv0); /* set path either to environment variable NGSPICE_INPUT_DIR (if given) or to NULL */ env_overr(&Inp_Path, "NGSPICE_INPUT_DIR"); Inp_Path = copy(Inp_Path); /* allow tfree */ #endif env_overr(&Spice_Host, "SPICE_HOST"); /* aspice */ env_overr(&Bug_Addr, "SPICE_BUGADDR"); env_overr(&Def_Editor, "SPICE_EDITOR"); /* Set raw file mode, 0 by default (binary) set in conf.c, may be overridden by environmental variable, not sure if acknowledged everywhere in ngspice */ env_overr(&temp, "SPICE_ASCIIRAWFILE"); if(temp) AsciiRawFile = atoi(temp); } void destroy_ivars(void) { tfree(News_File); tfree(Help_Path); tfree(Lib_Path); tfree(Spice_Path); tfree(Inp_Path); } ngspice-26/src/misc/printnum.h0000644000265600020320000000026412264261473016002 0ustar andreasadmin/************* * Header file for printnum.c * 1999 E. Rouat ************/ #ifndef ngspice_PRINTNUM_H #define ngspice_PRINTNUM_H void printnum(char * buf, double num); #endif ngspice-26/src/misc/ivars.h0000644000265600020320000000026212264261473015250 0ustar andreasadmin/************* * Header file for ivars.c * 1999 E. Rouat ************/ #ifndef ngspice_IVARS_H #define ngspice_IVARS_H void ivars(char*); void destroy_ivars(void); #endif ngspice-26/src/misc/ChangeLog0000644000265600020320000000350612264261473015531 0ustar andreasadmin2000-07-18 Arno W. Peters * Makefile.am: Added wlist.c. * wlist.c: moved here from src/parser/wlist.c 2000-03-11 Paolo Nenzi * missing_math.c: as Chris wrote: In missing_math.c line 50: changed the preprocessor directive "#elif" to "#else" because the elif must have a condition (ie. else if ...). Again seemingly no adverse side effects. 1999-09-07 Arno * string.c: put extra braces around assignment in if condition. 1999-09-03 Emmanuel Rouat * misc_time.c: renamed time.c into misc_time.c * missing_math.c: renamed math.c into missing_math.c * *.c: added header file for all .c files 1999-08-30 Paolo Nenzi * Removed suffix.h and replaced GENERIC with void * alloc.c: Modified the code of tmalloc, tralloc and txfree functions. Now tmalloc uses calloc() instead of malloc+bzero and all of them works on void *. 1999-08-29 Emmanuel Rouat * Made function decls ANSI using protoize 1999-08-28 Emmanuel Rouat * Removed all #includes of misc.h and util.h (now in spice.h) 1999-08-08 Emmanuel Rouat * Makefile.am (libmisc_a_SOURCES): removed dos_dirs.c (unused) * string.c: changed HAS_INDEX in HAVE_INDEX * dup2.c (dup2): changed HAS_FCNTL in HAVE_FCNTL_H 1999-08-06 Emmanuel Rouat * time.c: changed HAS_LOCALTIME in HAVE_LOCALTIME * dup2.c: changed HAS_DUP2 into HAVE_DUP2 1999-08-05 Emmanuel Rouat * ivars.c (env_overr): removed HAS_ENVIRON tests * mktemp.c (smktemp): removed test on HAS_GETPID 1999-08-03 Emmanuel Rouat * string.c (bcopy): changed HAS_BCOPY into HAVE_BCOPY ngspice-26/src/misc/dstring.c0000644000265600020320000003074612264261473015603 0ustar andreasadmin/* ----------------------------------------------------------------- FILE: dstring.c DESCRIPTION:This file contains the routines for manipulating dynamic strings. ----------------------------------------------------------------- */ #include "ngspice/ngspice.h" #include #include "ngspice/dstring.h" /* definitions local to this file only */ /* ********************** TYPE DEFINITIONS ************************* */ /* ********************** STATIC DEFINITIONS ************************* */ /* *---------------------------------------------------------------------- * * spice_dstring_init -- * * Initializes a dynamic string, discarding any previous contents * of the string (spice_dstring_free should have been called already * if the dynamic string was previously in use). * * Results: * None. * * Side effects: * The dynamic string is initialized to be empty. * *---------------------------------------------------------------------- */ void spice_dstring_init(SPICE_DSTRINGPTR dsPtr) { dsPtr->string = dsPtr->staticSpace ; dsPtr->length = 0 ; dsPtr->spaceAvl = SPICE_DSTRING_STATIC_SIZE ; dsPtr->staticSpace[0] = '\0'; } /* end spice_dstring_init() */ /* *---------------------------------------------------------------------- * * spice_dstring_append -- * * Append more characters to the current value of a dynamic string. * * Results: * The return value is a pointer to the dynamic string's new value. * * Side effects: * Length bytes from string (or all of string if length is less * than zero) are added to the current value of the string. Memory * gets reallocated if needed to accomodate the string's new size. * * Notes: char *string; String to append. If length is -1 then * this must be null-terminated. * INT length; Number of characters from string to append. * If < 0, then append all of string, up to null at end. * *---------------------------------------------------------------------- */ char *spice_dstring_append(SPICE_DSTRINGPTR dsPtr, const char *string, int length) { int newSize ; /* needed size */ char *newString ; /* newly allocated string buffer */ char *dst ; /* destination */ const char *end ; /* end of string */ if( length < 0){ length = (int) strlen(string) ; } newSize = length + dsPtr->length ; /* ----------------------------------------------------------------- * Allocate a larger buffer for the string if the current one isn't * large enough. Allocate extra space in the new buffer so that there * will be room to grow before we have to allocate again. ----------------------------------------------------------------- */ if (newSize >= dsPtr->spaceAvl) { dsPtr->spaceAvl = 2 * newSize ; newString = TMALLOC(char, dsPtr->spaceAvl) ; memcpy(newString, dsPtr->string, (size_t) dsPtr->length) ; if (dsPtr->string != dsPtr->staticSpace) { txfree(dsPtr->string) ; } dsPtr->string = newString; } /* ----------------------------------------------------------------- * Copy the new string into the buffer at the end of the old * one. ----------------------------------------------------------------- */ for( dst = dsPtr->string + dsPtr->length, end = string+length; string < end; string++, dst++) { *dst = *string ; } *dst = '\0' ; dsPtr->length += length ; return(dsPtr->string) ; } /* end spice_dstring_append() */ /* *---------------------------------------------------------------------- * * spice_dstring_append_lower -- * * Append more characters converted to lower case to the current * value of a dynamic string. * * Results: * The return value is a pointer to the dynamic string's new value. * * Side effects: * Length bytes from string (or all of string if length is less * than zero) are added to the current value of the string. Memory * gets reallocated if needed to accomodate the string's new size. * * Notes: char *string; String to append. If length is -1 then * this must be null-terminated. * INT length; Number of characters from string to append. * If < 0, then append all of string, up to null at end. * *---------------------------------------------------------------------- */ char *spice_dstring_append_lower(SPICE_DSTRINGPTR dsPtr, const char *string, int length) { int newSize ; /* needed size */ char *newString ; /* newly allocated string buffer */ char *dst ; /* destination */ const char *end ; /* end of string */ if( length < 0){ length = (int) strlen(string) ; } newSize = length + dsPtr->length ; /* ----------------------------------------------------------------- * Allocate a larger buffer for the string if the current one isn't * large enough. Allocate extra space in the new buffer so that there * will be room to grow before we have to allocate again. ----------------------------------------------------------------- */ if (newSize >= dsPtr->spaceAvl) { dsPtr->spaceAvl = 2 * newSize ; newString = TMALLOC(char, dsPtr->spaceAvl) ; memcpy(newString, dsPtr->string, (size_t) dsPtr->length) ; if (dsPtr->string != dsPtr->staticSpace) { txfree(dsPtr->string) ; } dsPtr->string = newString; } /* ----------------------------------------------------------------- * Copy the new string into the buffer at the end of the old * one. ----------------------------------------------------------------- */ for( dst = dsPtr->string + dsPtr->length, end = string+length; string < end; string++, dst++) { if( isupper(*string) ) { *dst = (char)tolower(*string) ; } else { *dst = *string ; } } *dst = '\0' ; dsPtr->length += length ; return(dsPtr->string) ; } /* end spice_dstring_append_lower() */ /* ----------------------------------------------------------------- * Function: add character c to dynamic string dstr_p. * ----------------------------------------------------------------- */ char *spice_dstring_append_char( SPICE_DSTRINGPTR dstr_p, char c) { return spice_dstring_append( dstr_p, &c, 1 ) ; } /* end spice_dstring_append_char() */ static int spice_format_length( va_list args, const char *fmt ) { int i ; /* integer */ int len ; /* length of format */ int size_format ; /* width of field */ int found_special ; /* look for special characters */ char *s ; /* string */ double d ; /* ----------------------------------------------------------------- * First find length of buffer. ----------------------------------------------------------------- */ len = 0 ; while(fmt && *fmt){ if( *fmt == '%' ){ fmt++ ; if( *fmt == '%' ){ len++ ; } else { /* ----------------------------------------------------------------- * We have a real formatting character, loop until we get a special * character. ----------------------------------------------------------------- */ if( *fmt == '.' || *fmt == '-' ){ fmt++ ; /* skip over these characters */ } size_format = atoi(fmt) ; if( size_format > 0 ){ len += size_format ; } found_special = FALSE ; for( ; fmt && *fmt ; fmt++ ){ switch( *fmt ){ case 's': s = va_arg(args, char *) ; if( s ){ len += (int) strlen(s) ; } found_special = TRUE ; break ; case 'i': case 'd': case 'o': case 'x': case 'X': case 'u': i = va_arg(args, int) ; len += 10 ; found_special = TRUE ; break ; case 'c': i = va_arg(args, int) ; len++ ; found_special = TRUE ; break ; case 'f': case 'e': case 'F': case 'g': case 'G': d = va_arg(args, double) ; len += 35 ; found_special = TRUE ; break ; default: ; } /* end switch() */ if( found_special ){ break ; } } } } else { len++ ; } fmt++ ; } /* end while() */ va_end(args) ; return(len) ; } /* end Ymessage_format_length() */ char *spice_dstring_print( SPICE_DSTRINGPTR dsPtr, const char *format, ... ) { va_list args ; int format_len ; /* length of format */ int length ; /* new length */ int orig_length ; /* original length of buffer */ char *buffer ; /* proper length of buffer */ /* ----------------------------------------------------------------- * First get the length of the buffer needed. ----------------------------------------------------------------- */ va_start( args, format ) ; format_len = spice_format_length(args,format) ; /* ----------------------------------------------------------------- * Next allocate the proper buffer size. ----------------------------------------------------------------- */ orig_length = dsPtr->length ; length = orig_length + format_len + 1 ; buffer = spice_dstring_setlength( dsPtr, length) ; /* ----------------------------------------------------------------- * Convert the format. ----------------------------------------------------------------- */ va_start( args, format ) ; if( format ){ vsprintf( buffer + orig_length, format, args ) ; dsPtr->length = (int) strlen(buffer) ; } else { buffer = NULL ; } va_end(args) ; return( buffer ) ; } /* end spice_dstring_print() */ /* *---------------------------------------------------------------------- * * _spice_dstring_setlength -- * * Change the length of a dynamic string. This can cause the * string to either grow or shrink, depending on the value of * length. * * Results: * Returns the current string buffer. * * Side effects: * The length of dsPtr is changed to length but a null byte is not * stored at that position in the string. Use spice_dstring_setlength * for that function. If length is larger * than the space allocated for dsPtr, then a panic occurs. * *---------------------------------------------------------------------- */ char *_spice_dstring_setlength(SPICE_DSTRINGPTR dsPtr,int length) { char *newString ; if (length < 0) { length = 0 ; } if (length >= dsPtr->spaceAvl) { dsPtr->spaceAvl = length+1; newString = TMALLOC(char, dsPtr->spaceAvl) ; /* ----------------------------------------------------------------- * SPECIAL NOTE: must use memcpy, not strcpy, to copy the string * to a larger buffer, since there may be embedded NULLs in the * string in some cases. ----------------------------------------------------------------- */ memcpy(newString, dsPtr->string, (size_t) dsPtr->length) ; if( dsPtr->string != dsPtr->staticSpace ) { txfree(dsPtr->string) ; } dsPtr->string = newString ; } dsPtr->length = length ; return(dsPtr->string) ; } /* end _spice_dstring_setlength() */ /* *---------------------------------------------------------------------- * * spice_dstring_setlength -- * * Change the length of a dynamic string. This can cause the * string to either grow or shrink, depending on the value of * length. * * Results: * Returns the current string buffer. * * Side effects: * The length of dsPtr is changed to length and a null byte is * stored at that position in the string. If length is larger * than the space allocated for dsPtr, then a panic occurs. * *---------------------------------------------------------------------- */ char *spice_dstring_setlength(SPICE_DSTRINGPTR dsPtr,int length) { char *str_p ; /* newly create string */ str_p = _spice_dstring_setlength( dsPtr,length) ; str_p[length] = '\0' ; return( str_p ) ; } /* end spice_dstring_setlength() */ /* *---------------------------------------------------------------------- * * spice_dstring_free -- * * Frees up any memory allocated for the dynamic string and * reinitializes the string to an empty state. * * Results: * None. * * Side effects: * The previous contents of the dynamic string are lost, and * the new value is an empty string. * *---------------------------------------------------------------------- */ void spice_dstring_free(SPICE_DSTRINGPTR dsPtr) { if (dsPtr->string != dsPtr->staticSpace) { txfree(dsPtr->string) ; } dsPtr->string = dsPtr->staticSpace ; dsPtr->length = 0 ; dsPtr->spaceAvl = SPICE_DSTRING_STATIC_SIZE; dsPtr->staticSpace[0] = '\0' ; } /* end spice_dstring_free() */ ngspice-26/src/misc/Makefile.am0000644000265600020320000000134512264261473016012 0ustar andreasadmin## Process this file with automake to produce Makefile.in noinst_LTLIBRARIES = libmisc.la libmisc_la_SOURCES = \ getopt_long_bsd.c \ getopt_bsd.h \ alloc.c \ alloc.h \ dup2.c \ dstring.c \ dup2.h \ hash.c \ ivars.c \ ivars.h \ mktemp.c \ mktemp.h \ printnum.c \ printnum.h \ string.c \ tilde.c \ tilde.h \ misc_time.c \ misc_time.h \ wlist.c \ util.c \ util.h ## Note that the getopt files get compiled unconditionnaly but some ## magic #define away the body of their own code if the compilation environment ## provides an implementation of its own (like GNU libc) AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/misc/printnum.c0000644000265600020320000000115012264261473015770 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2001 Paolo Nenzi **********/ /* Paolo Nenzi 2001: printnum does not returns static data anymore. * It is up to the caller to allocate space for strings. */ #include "ngspice/ngspice.h" #include "printnum.h" #include int cp_numdgt = -1; void printnum(char *buf, double num) { int n; if (cp_numdgt > 1) n = cp_numdgt; else n = 6; if (num < 0.0) n--; (void) sprintf(buf, "%.*e", n, num); } ngspice-26/src/misc/Makefile.in0000644000265600020320000004211412264261535016021 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/misc DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmisc_la_LIBADD = am_libmisc_la_OBJECTS = getopt_long_bsd.lo alloc.lo dup2.lo dstring.lo \ hash.lo ivars.lo mktemp.lo printnum.lo string.lo tilde.lo \ misc_time.lo wlist.lo util.lo libmisc_la_OBJECTS = $(am_libmisc_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent DEFAULT_INCLUDES = depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; SOURCES = $(libmisc_la_SOURCES) DIST_SOURCES = $(libmisc_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ -I$(top_srcdir)/src/include AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = libmisc.la libmisc_la_SOURCES = \ getopt_long_bsd.c \ getopt_bsd.h \ alloc.c \ alloc.h \ dup2.c \ dstring.c \ dup2.h \ hash.c \ ivars.c \ ivars.h \ mktemp.c \ mktemp.h \ printnum.c \ printnum.h \ string.c \ tilde.c \ tilde.h \ misc_time.c \ misc_time.h \ wlist.c \ util.c \ util.h AM_CFLAGS = $(STATIC) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/misc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/misc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done libmisc.la: $(libmisc_la_OBJECTS) $(libmisc_la_DEPENDENCIES) $(EXTRA_libmisc_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmisc_la_OBJECTS) $(libmisc_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dstring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getopt_long_bsd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ivars.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc_time.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mktemp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printnum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tilde.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wlist.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/misc/getopt_bsd.h0000644000265600020320000000556212264261473016266 0ustar andreasadmin/* * Copyright (c) 1987, 1993, 1994, 1996 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * 3. All advertising materials mentioning features or use of this software * must display the following acknowledgement: * This product includes software developed by the University of * California, Berkeley and its contributors. * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. */ /* from MINGW gcc 345, H. Vogt 04/10/09 */ #ifndef __GETOPT_BSD_H__ #define __GETOPT_BSD_H__ #ifdef __cplusplus extern "C" { #endif extern int opterr; /* if error message should be printed */ extern int optind; /* index into parent argv vector */ extern int optopt; /* character checked for validity */ extern int optreset; /* reset getopt */ extern char *optarg; /* argument associated with option */ int getopt (int, char * const *, const char *); #ifdef __cplusplus } #endif #endif /* __GETOPT_H__ */ #ifndef __UNISTD_GETOPT__ #ifndef __GETOPT_LONG_BSD_H__ #define __GETOPT_LONG_BSD_H__ #ifdef __cplusplus extern "C" { #endif struct option { const char *name; int has_arg; int *flag; int val; }; int getopt_long (int, char *const *, const char *, const struct option *, int *); #ifndef HAVE_DECL_GETOPT #define HAVE_DECL_GETOPT 1 #endif #define no_argument 0 #define required_argument 1 #define optional_argument 2 #ifdef __cplusplus } #endif #endif /* __GETOPT_LONG_H__ */ #endif /* __UNISTD_GETOPT__ */ ngspice-26/src/misc/misc_time.c0000644000265600020320000000451712264261473016077 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* * Date and time utility functions */ #include "ngspice/ngspice.h" #include #include "misc_time.h" #ifdef HAVE_LOCALTIME #include #endif #ifdef HAVE_GETRUSAGE # include # include # include #else # ifdef HAVE_TIMES # include # include # include # else # ifdef HAVE_FTIME /* default to ftime if we can't get real CPU times */ # include # include # endif # endif #endif #ifdef HAVE_FTIME # include #endif /* Return the date. Return value is static data. */ char * datestring(void) { #ifdef HAVE_LOCALTIME static char tbuf[45]; struct tm *tp; char *ap; size_t i; time_t tloc; time(&tloc); tp = localtime(&tloc); ap = asctime(tp); (void) sprintf(tbuf, "%.20s", ap); (void) strcat(tbuf, ap + 19); i = strlen(tbuf); tbuf[i - 1] = '\0'; return (tbuf); #else return ("today"); #endif } /* return time interval in seconds and milliseconds */ #ifdef HAVE_FTIME struct timeb timebegin; void timediff(struct timeb *now, struct timeb *begin, int *sec, int *msec) { *msec = now->millitm - begin->millitm; *sec = (int)(now->time - begin->time); if (*msec < 0) { *msec += 1000; (*sec)--; } return; } #endif /* * How many seconds have elapsed in running time. * This is the routine called in IFseconds */ double seconds(void) { #ifdef HAVE_GETRUSAGE int ret; struct rusage ruse; memset(&ruse, 0, sizeof(ruse)); ret = getrusage(RUSAGE_SELF, &ruse); if(ret == -1) { perror("getrusage(): "); return 1; } return ((double)ruse.ru_utime.tv_sec + (double) ruse.ru_utime.tv_usec / 1000000.0); #else #ifdef HAVE_TIMES struct tms tmsbuf; times(&tmsbuf); return((double) tmsbuf.tms_utime / HZ); #else #ifdef HAVE_FTIME struct timeb timenow; int sec, msec; ftime(&timenow); timediff(&timenow, &timebegin, &sec, &msec); return(sec + (double) msec / 1000.0); #else /* unknown */ /* don't know how to do this in general. */ return(-1.0); /* Obvious error condition */ #endif /* !FTIME */ #endif /* !SYSV */ #endif /* !BSD */ } ngspice-26/src/misc/mktemp.c0000644000265600020320000000122412264261473015413 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* * A more portable version of the standard "mktemp( )" function * * FIXME: remove smktemp() and adjust all callers to use tmpfile(3). */ #include "ngspice/ngspice.h" #include "mktemp.h" #ifdef HAVE_UNISTD_H #include #endif #ifndef TEMPFORMAT #define TEMPFORMAT "temp%s%d" #endif char * smktemp(char *id) { char rbuf[513]; char *nbuf; int num; num = getpid( ); if (!id) id = "sp"; sprintf(rbuf, TEMPFORMAT, id, num); nbuf = TMALLOC(char, strlen(rbuf) + 1); strcpy(nbuf, rbuf); return nbuf; } ngspice-26/src/misc/dup2.c0000644000265600020320000000044212264261473014771 0ustar andreasadmin/* Modified: 2000 AlansFixes */ #include "ngspice/ngspice.h" #include "dup2.h" #ifndef HAVE_DUP2 #include dup2(int oldd, int newd) { #ifdef HAVE_FCNTL_H close(newd); #ifdef F_DUPFD (void) fcntl(oldd, F_DUPFD, newd); #endif #endif return 0; } #else int Dummy_Symbol_6; #endif ngspice-26/src/misc/tilde.c0000644000265600020320000000513712264261473015226 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Modified: 2002 R. Oktas, **********/ #include "ngspice/ngspice.h" #include "tilde.h" #ifdef HAVE_PWD_H #include #endif #if defined(__MINGW32__) || defined(_MSC_VER) #undef BOOLEAN #include /* win32 functions */ #include "Shlobj.h" /* SHGetFolderPath */ #endif /* XXX To prevent a name collision with `readline's `tilde_expand', the original name: `tilde_expand' has changed to `tildexpand'. This situation naturally brings to mind that `tilde_expand' could be used directly from `readline' (since it will already be included if we wish to activate the `readline' support). Following implementation of 'tilde expanding' has some problems which constitutes another good reason why it should be replaced: eg. it returns NULL which should not behave this way, IMHO. Anyway... Don't care for the moment, may be in the future. -- ro */ char * tildexpand(char *string) { #ifdef HAVE_PWD_H char buf[BSIZE_SP]; char *k, c; #endif #if defined(__MINGW32__) || defined(_MSC_VER) char buf2[BSIZE_SP]; #endif char *result = NULL; if (!string) return NULL; while (*string && isspace(*string)) string++; if (*string != '~') return copy(string); string += 1; if (!*string || *string == '/') { /* First try the environment setting. May also make life easier for non-unix platforms, eg. MS-DOS. -- ro */ result = getenv("HOME"); #ifdef HAVE_PWD_H /* Can't find a result from the environment, let's try the other stuff. -- ro */ if (!result) { struct passwd *pw; pw = getpwuid(getuid()); if (pw) result = pw->pw_dir; *buf = 0; } } else { struct passwd *pw; k = buf; while ((c = *string) && c != '/') *k++ = c, string++; *k = 0; pw = getpwnam(buf); if (pw) result = pw->pw_dir; #endif } if (result) { #ifdef HAVE_PWD_H strcpy(buf, result); if (*string) strcat(buf, string); return copy(buf); } else return NULL; #else /* Emulate the old behavior to prevent side effects. -- ro */ return copy(string); } #if defined(__MINGW32__) || defined(_MSC_VER) else if(SUCCEEDED(SHGetFolderPath(NULL, CSIDL_PERSONAL, NULL, 0, buf2))) { if (*string) strcat(buf2, string); return copy(buf2); } #endif return NULL; #endif } ngspice-26/src/ngnutmeg.c0000644000265600020320000000432212264261473015011 0ustar andreasadmin/* Configuration file for nutmeg */ /********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #include "ngspice/ngspice.h" #define CONFIG #include #include "ngspice/ifsim.h" #include "ngspice/suffix.h" IFsimulator SIMinfo = { "ngnutmeg", /* my name */ "data analysis and manipulation program", /* more about me */ Spice_Version, /* my version */ NULL, /* newCircuit function */ NULL, /* deleteCircuit function */ NULL, /* newNode function */ /* NEEDED */ NULL, /* groundNode function */ NULL, /* bindNode function */ NULL, /* findNode function */ /* NEEDED */ NULL, /* instToNode function */ /* NEEDED */ NULL, /* setNodeParm function */ /* NEEDED */ NULL, /* askNodeQuest function */ /* NEEDED */ NULL, /* deleteNode function */ /* NEEDED */ NULL, /* newInstance function */ NULL, /* setInstanceParm function */ NULL, /* askInstanceQuest function */ NULL, /* findInstance funciton */ NULL, /* deleteInstance function */ /* to be added later */ NULL, /* newModel function */ NULL, /* setModelParm function */ NULL, /* askModelQuest function */ NULL, /* findModel function */ NULL, /* deleteModel function */ /* to be added later */ NULL, /* newTask function */ NULL, /* newAnalysis function */ NULL, /* setAnalysisParm function */ NULL, /* askAnalysisQeust function */ NULL, /* findAnalysis function */ NULL, /* findTask function */ NULL, /* deleteTask function */ NULL, /* doAnalyses function */ NULL, /* non-convergence message function */ 0, NULL, 0, NULL, 0, NULL, 0, NULL, }; /* An ugly hack */ #ifdef CIDER #include "ngspice/cktdefs.h" void NDEVacct(CKTcircuit *ckt, FILE *file) { NG_IGNORE(ckt); fprintf(file, "Ouch, you have called NDEV from ngnutmeg\n"); } #endif ngspice-26/src/include/0000755000265600020320000000000012264261712014437 5ustar andreasadminngspice-26/src/include/ngspice/0000755000265600020320000000000012264261712016067 5ustar andreasadminngspice-26/src/include/ngspice/bool.h0000644000265600020320000000032112264261473017173 0ustar andreasadmin#ifndef ngspice_BOOL_H #define ngspice_BOOL_H //typedef unsigned char bool; typedef int bool; typedef int BOOL ; #define BOOLEAN int #define TRUE 1 #define FALSE 0 #define NO 0 #define YES 1 #endif ngspice-26/src/include/ngspice/const.h0000644000265600020320000000121212264261473017366 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ /* */ #ifndef ngspice_CONST_H #define ngspice_CONST_H #define CHARGE (1.6021918e-19) #define CONSTCtoK (273.15) #define CONSTboltz (1.3806226e-23) #define CONSTepsZero (8.854214871e-12) /* epsilon zero F/m */ #define CONSTepsSiO2 (3.4531479969e-11) /* epsilon SiO2 F/m */ #define CONSTmuZero (1.25663706143592e-6) /* MuZero H/m */ #define REFTEMP 300.15 /* 27 degrees C */ extern double CONSTroot2; extern double CONSTvt0; extern double CONSTKoverQ; extern double CONSTe; #endif ngspice-26/src/include/ngspice/dgen.h0000644000265600020320000000105512264261473017162 0ustar andreasadmin#ifndef ngspice_DGEN_H #define ngspice_DGEN_H typedef struct st_dgen dgen; struct st_dgen { GENcircuit *ckt; wordlist *dev_list; int flags; int dev_type_no; int dev; GENinstance *instance; GENmodel *model; }; #define DGEN_ALL 0x00e #define DGEN_TYPE 0x002 #define DGEN_MODEL 0x004 #define DGEN_INSTANCE 0x008 #define DGEN_INIT 0x010 #define DGEN_DEFDEVS 0x020 #define DGEN_ALLDEVS 0x040 #define DGEN_DEFPARAMS 0x001 #define DGEN_ALLPARAMS 0x002 extern dgen *dgen_init(GENcircuit *ckt, wordlist *wl, int nomix, int flag, int model); #endif ngspice-26/src/include/ngspice/ipc.h0000644000265600020320000000532112264261473017020 0ustar andreasadmin/*============================================================================ FILE IPC.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Steve Tynor MODIFICATIONS SUMMARY Provides compatibility for the new SPICE simulator to both the MSPICE user interface and BCP (via ATESSE v.1 style AEGIS mailboxes) and the new ATESSE v.2 Simulator Interface and BCP (via Bsd Sockets). INTERFACES REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #ifndef ngspice_IPC_H #define ngspice_IPC_H #define IPC_MAX_LINE_LEN 80 #define IPC_MAX_PATH_LEN 2048 /* Known socket port for server and client to communicate: */ #define SOCKET_PORT 1064 /* Recognition character for Beginning Of Line of message: */ #define BOL_CHAR '\\' /* Length (in bytes) of a socket message header: */ #define SOCK_MSG_HDR_LEN 5 typedef int Ipc_Boolean_t; #define IPC_FALSE 0 #define IPC_TRUE 1 typedef struct { /* Don't change this type! It is cast elsewhere */ double real; double imag; } Ipc_Complex_t; /*---------------------------------------------------------------------------*/ typedef enum { IPC_STATUS_OK, IPC_STATUS_NO_DATA, IPC_STATUS_END_OF_DECK, IPC_STATUS_EOF, IPC_STATUS_ERROR, } Ipc_Status_t; #if 0 /*---------------------------------------------------------------------------*/ typedef void* Ipc_Connection_t; /* * A connection is an `opaque' type - the user has no access to the details of * the implementation. Indeed the details are different depending on whether * underlying transport mechanism is AEGIS Mailboxes or Bsd Sockets (or * something else...) */ #endif /*---------------------------------------------------------------------------*/ typedef enum { IPC_WAIT, IPC_NO_WAIT, } Ipc_Wait_t; /*---------------------------------------------------------------------------*/ typedef enum { IPC_PROTOCOL_V1, /* >DATAB records in ATESSE v.1 format * Handles v.1 style logfile name passing protocol */ IPC_PROTOCOL_V2, /* >DATAB records in ATESSE v.2 format */ } Ipc_Protocol_t; /*---------------------------------------------------------------------------*/ typedef enum { IPC_MODE_BATCH, IPC_MODE_INTERACTIVE, } Ipc_Mode_t; /*---------------------------------------------------------------------------*/ typedef enum { IPC_ANAL_DCOP, IPC_ANAL_DCTRCURVE, IPC_ANAL_AC, IPC_ANAL_TRAN, } Ipc_Anal_t; #endif ngspice-26/src/include/ngspice/dvec.h0000644000265600020320000000474112264261473017173 0ustar andreasadmin#ifndef ngspice_DVEC_H #define ngspice_DVEC_H #include "ngspice/complex.h" #include "ngspice/grid.h" /* Dvec flags. */ enum dvec_flags { VF_REAL = (1 << 0), /* The data is real. */ VF_COMPLEX = (1 << 1), /* The data is complex. */ VF_ACCUM = (1 << 2), /* writedata should save this vector. */ VF_PLOT = (1 << 3), /* writedata should incrementally plot it. */ VF_PRINT = (1 << 4), /* writedata should print this vector. */ VF_MINGIVEN = (1 << 5), /* The v_minsignal value is valid. */ VF_MAXGIVEN = (1 << 6), /* The v_maxsignal value is valid. */ VF_PERMANENT = (1 << 7) /* Don't garbage collect this vector. */ }; /* Plot types. */ typedef enum { PLOT_LIN, PLOT_COMB, PLOT_POINT } PLOTTYPE; /* A (possibly multi-dimensional) data vector. The data is represented * internally by a 1-d array. The number of dimensions and the size * of each dimension is recorded, along with v_length, the total size of * the array. If the dimensionality is 0 or 1, v_length is significant * instead of v_numdims and v_dims, and the vector is handled in the old * manner. */ #define MAXDIMS 8 struct dvec { char *v_name; /* Same as so_vname. */ int v_type; /* Same as so_vtype. */ short v_flags; /* Flags (a combination of VF_*). */ double *v_realdata; /* Real data. */ ngcomplex_t *v_compdata; /* Complex data. */ double v_minsignal; /* Minimum value to plot. */ double v_maxsignal; /* Maximum value to plot. */ GRIDTYPE v_gridtype; /* One of GRID_*. */ PLOTTYPE v_plottype; /* One of PLOT_*. */ int v_length; /* Length of the vector. */ int v_rlength; /* How much space we really have. */ int v_outindex; /* Index if writedata is building the vector. */ int v_linestyle; /* What line style we are using. */ int v_color; /* What color we are using. */ char *v_defcolor; /* The name of a color to use. */ int v_numdims; /* How many dims -- 0 = scalar (len = 1). */ int v_dims[MAXDIMS]; /* The actual size in each dimension. */ struct plot *v_plot; /* The plot structure (if it has one). */ struct dvec *v_next; /* Link for list of plot vectors. */ struct dvec *v_link2; /* Extra link for things like print. */ struct dvec *v_scale; /* If this has a non-standard scale... */ } ; #define isreal(v) ((v)->v_flags & VF_REAL) #define iscomplex(v) ((v)->v_flags & VF_COMPLEX) /* list of data vectors being displayed */ struct dveclist { struct dvec *vector; struct dveclist *next; }; #endif ngspice-26/src/include/ngspice/contdefs.h0000644000265600020320000000132612264261473020053 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_CONTDEFS_H #define ngspice_CONTDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sCONTcard { struct sCONTcard *CONTnextCard; double CONTworkfun; int CONTtype; int CONTnumber; unsigned int CONTworkfunGiven : 1; unsigned int CONTtypeGiven : 1; unsigned int CONTnumberGiven : 1; } CONTcard; /* CONT parameters */ #define CONT_NEUTRAL 1 #define CONT_ALUMINUM 2 #define CONT_P_POLY 3 #define CONT_N_POLY 4 #define CONT_WORKFUN 5 #define CONT_NUMBER 6 #endif ngspice-26/src/include/ngspice/numcards.h0000644000265600020320000000242112264261473020057 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1991 David Gates **********/ /* * Structures for parsing numerical-device input cards */ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_NUMCARDS_H #define ngspice_NUMCARDS_H #include "ngspice/ifsim.h" /* * Generic header for a linked list of cards */ typedef struct sGENcard { struct sGENcard *GENnextCard; /* pointer to next card of this type */ } GENcard; /* * Structure: IFcardInfo * * This structure is a generic description of an input card to * the program. It can be used in situations where input parameters * need to be grouped together under a single heading. */ typedef struct sIFcardInfo { char *name; /* name of the card */ char *description; /* description of its purpose */ int numParms; /* number of parameter descriptors */ IFparm *cardParms; /* array of parameter descriptors */ int (*newCard)(GENcard**,GENmodel*); /* routine to add a new card to a numerical device model */ int (*setCardParm)(int,IFvalue*,GENcard*); /* routine to input a parameter to a card instance */ int (*askCardQuest)(int,IFvalue*,GENcard*); /* routine to find out about a card's details */ } IFcardInfo; #endif ngspice-26/src/include/ngspice/compatmode.h0000644000265600020320000000044212264261473020374 0ustar andreasadmin#ifndef ngspice_COMPATMODE_H #define ngspice_COMPATMODE_H #include "ngspice/config.h" typedef enum { COMPATMODE_NATIVE = 0, COMPATMODE_HS = 1, COMPATMODE_SPICE3 = 2, COMPATMODE_ALL = 3, COMPATMODE_PS = 4 } COMPATMODE_T ; extern COMPATMODE_T ngspice_compat_mode(void) ; #endif ngspice-26/src/include/ngspice/ngspice.h0000644000265600020320000001317312264261473017701 0ustar andreasadmin/************* * Main header file for ngspice * 1999 E. Rouat ************/ #ifndef ngspice_NGSPICE_H #define ngspice_NGSPICE_H /* #include "memwatch.h" #define MEMWATCH */ /* * This file will eventually replace spice.h and lots of other * files in src/include */ #ifndef _GNU_SOURCE # define _GNU_SOURCE #endif #include "ngspice/config.h" #include #ifdef HAVE_LIMITS_H # include #endif #ifdef HAVE_FLOAT_H # include #endif #include "ngspice/memory.h" #include "ngspice/defines.h" #include "ngspice/macros.h" #include "ngspice/bool.h" #include "ngspice/complex.h" #include "ngspice/typedefs.h" #include #include #ifdef HAVE_IEEEFP_H #include #endif #include "ngspice/missing_math.h" #ifdef STDC_HEADERS # include # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_CTYPE_H # include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_TERMIOS_H #include #else # ifdef HAVE_SGTTY_H # include # else # ifdef HAVE_TERMIO_H # include # endif # endif #endif #ifdef HAVE_PWD_H #include #endif #ifdef HAVE_NETINET_IN_H #include #endif #ifdef HAVE_NETDB_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_SYS_WAIT_H #include #endif #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_DIR_H #include #else # ifdef HAVE_DIRENT_H # include # include # ifndef direct # define direct dirent # endif # endif #endif #ifdef HAVE_GETRLIMIT # include # include #endif #ifdef HAVE_GETRUSAGE # ifndef HAVE_GETRLIMIT # include # include # endif #else # ifdef HAVE_TIMES # include # include # else # ifdef HAVE_FTIME # include # endif # endif #endif #ifdef HAVE_UNISTD_H #include #include #endif #ifdef HAS_TIME_H #include #endif #ifdef HAS_WINGUI #include "ngspice/wstdio.h" #define HAS_PROGREP extern void SetAnalyse(char *Analyse, int Percent); #endif #if defined (__MINGW32__) || defined (__CYGWIN__) || defined (_MSC_VER) #include #else # ifdef HAVE_SYS_IO_H # include # endif #endif #if defined (__MINGW32__) #include /* getpid() */ #endif #if defined (_MSC_VER) #include #include /* C99 not available before VC++ 2013) */ #if (_MSC_VER < 1800) #define trunc x_trunc extern double x_trunc(double); #define nearbyint x_nearbyint extern double x_nearbyint(double); #define asinh x_asinh extern double x_asinh(double); #define acosh x_acosh extern double x_acosh(double); #define atanh x_atanh extern double x_atanh(double); #endif #define strdup _strdup #define unlink _unlink #define fileno _fileno #define getcwd _getcwd #define chdir _chdir #define isnan _isnan #define finite _finite #define scalb _scalb #define logb _logb #define getpid _getpid #define access _access #define dup2 _dup2 #define open _open #define write _write #define strcasecmp _stricmp #define strncasecmp _strnicmp #define snprintf _snprintf #define isatty _isatty #define inline __inline /* NAN not available in MS VS 2008 */ #ifndef NAN static const __int64 global_nan = 0x7ff8000000000000i64; #define NAN (*(const double *) &global_nan) #endif // warning C4127: Bedingter Ausdruck ist konstant #pragma warning(disable: 4127) #endif // for non C99 environments #if !defined(NAN) #define NAN (0.0/0.0) #endif /* Fast random number generator */ //#define FastRand #define WaGauss #define RR_MAX RAND_MAX #if !defined(HAVE_STRCHR) && defined(HAVE_INDEX) # define strchr index # define strrchr rindex #endif /* added for CYGWIN */ #ifndef HUGE #define HUGE HUGE_VAL #endif extern char *gettok_noparens(char **s); extern char *gettok_node(char **s); extern char *gettok_iv(char **s); extern int get_l_paren(char **s); extern int get_r_paren(char **s); /* Some external variables */ extern char *Spice_Exec_Dir; extern char *Spice_Lib_Dir; extern char *Def_Editor; extern char *Bug_Addr; extern int AsciiRawFile; extern char *Spice_Host; extern char *Spiced_Log; extern char Spice_Version[]; extern char Spice_Notice[]; extern char Spice_Build_Date[]; extern char Spice_Manual[]; extern char *News_File; extern char *Spice_Path; extern char *Help_Path; extern char *Lib_Path; extern char *Inp_Path; #ifdef TCL_MODULE #include extern int tcl_printf(const char *format, ...); extern int tcl_fprintf(FILE *f, const char *format, ...); #undef printf #define printf tcl_printf #undef fprintf #define fprintf tcl_fprintf #undef perror #define perror(string) fprintf(stderr,"%s: %s\n",string,sys_errlist[errno]) #elif defined SHARED_MODULE #include extern int sh_printf(const char *format, ...); extern int sh_fprintf(FILE *fd, const char *format, ...); extern int sh_fputs(const char *input, FILE *fd); extern int sh_fputc(int input, FILE *fd); extern int sh_putc(int input, FILE *fd); extern void SetAnalyse(char *analyse, int percent); #define HAS_PROGREP #undef printf #define printf sh_printf #undef fprintf #define fprintf sh_fprintf #undef perror #define perror(string) fprintf(stderr, "%s: %s\n", string, sys_errlist[errno]) #undef fputs #define fputs sh_fputs #undef fputc #define fputc sh_fputc #undef putc #define putc sh_putc #endif void soa_printf(CKTcircuit *ckt, GENinstance *instance, const char *fmt, ...); /* macro to ignore unused variables and parameters */ #define NG_IGNORE(x) (void)x #define NG_IGNOREABLE(x) (void)x #endif ngspice-26/src/include/ngspice/smpdefs.h0000644000265600020320000000303312264261473017704 0ustar andreasadmin#ifndef ngspice_SMPDEFS_H #define ngspice_SMPDEFS_H typedef struct MatrixFrame SMPmatrix; typedef struct MatrixElement SMPelement; /********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #include #include #include "ngspice/complex.h" int SMPaddElt( SMPmatrix *, int , int , double ); double * SMPmakeElt( SMPmatrix * , int , int ); void SMPcClear( SMPmatrix *); void SMPclear( SMPmatrix *); int SMPcLUfac( SMPmatrix *, double ); int SMPluFac( SMPmatrix *, double , double ); int SMPcReorder( SMPmatrix * , double , double , int *); int SMPreorder( SMPmatrix * , double , double , double ); void SMPcaSolve(SMPmatrix *Matrix, double RHS[], double iRHS[], double Spare[], double iSpare[]); void SMPcSolve( SMPmatrix *, double [], double [], double [], double []); void SMPsolve( SMPmatrix *, double [], double []); int SMPmatSize( SMPmatrix *); int SMPnewMatrix( SMPmatrix ** ); void SMPdestroy( SMPmatrix *); int SMPpreOrder( SMPmatrix *); void SMPprint( SMPmatrix * , char *); void SMPprintRHS( SMPmatrix * , char *, double*, double*); void SMPgetError( SMPmatrix *, int *, int *); int SMPcProdDiag( SMPmatrix *, SPcomplex *, int *); int SMPcDProd(SMPmatrix *Matrix, SPcomplex *pMantissa, int *pExponent); SMPelement * SMPfindElt( SMPmatrix *, int , int , int ); int SMPcZeroCol(SMPmatrix *Matrix, int Col); int SMPcAddCol(SMPmatrix *Matrix, int Accum_Col, int Addend_Col); int SMPzeroRow(SMPmatrix *Matrix, int Row); #endif ngspice-26/src/include/ngspice/fteext.h0000644000265600020320000003001212264261473017537 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 1999 Paolo Nenzi - 2000 AlansFixes **********/ /* * Definitions for all external symbols in FTE. */ #ifndef ngspice_FTEEXT_H #define ngspice_FTEEXT_H #include "ngspice/config.h" /* needed to find out what the interface structures look like */ #include "ngspice/typedefs.h" #include "ngspice/ifsim.h" #include "ngspice/dvec.h" #include "ngspice/plot.h" #include "ngspice/cpdefs.h" #include "ngspice/ftedefs.h" #include "ngspice/fteinp.h" /* aspice.c */ extern void ft_checkkids(void); /* breakpoint.c */ extern bool ft_bpcheck(struct plot *runplot, int iteration); extern void dbfree(struct dbcomm *db); /* breakp2.c */ extern int ft_getSaves(struct save_info **); /* circuits.c */ extern struct circ *ft_curckt; extern struct circ *ft_circuits; extern struct subcirc *ft_subcircuits; extern void ft_newcirc(struct circ *ckt); /* clip.c */ extern bool clip_line(int *pX1, int *pY1, int *pX2, int *pY2, int l, int b, int r, int t); extern bool clip_to_circle(int *x1, int *y1, int *x2, int *y2, int cx, int cy, int rad); /* cmath1.c */ extern bool cx_degrees; extern void *cx_mag(void *, short int , int , int *, short int *); extern void *cx_ph(void *, short int , int , int *, short int *); extern void *cx_cph(void *, short int , int , int *, short int *); extern void *cx_unwrap(void *, short int , int , int *, short int *); extern void *cx_j(void *, short int , int , int *, short int *); extern void *cx_real(void *, short int , int , int *, short int *); extern void *cx_imag(void *, short int , int , int *, short int *); extern void *cx_pos(void *, short int , int , int *, short int *); extern void *cx_db(void *, short int , int , int *, short int *); extern void *cx_log(void *, short int , int , int *, short int *); extern void *cx_ln(void *, short int , int , int *, short int *); extern void *cx_exp(void *, short int , int , int *, short int *); extern void *cx_sqrt(void *, short int , int , int *, short int *); extern void *cx_sin(void *, short int , int , int *, short int *); extern void *cx_sinh(void *, short int , int , int *, short int *); extern void *cx_cos(void *, short int , int , int *, short int *); extern void *cx_cosh(void *, short int , int , int *, short int *); extern void *cx_tan(void *, short int , int , int *, short int *); extern void *cx_tanh(void *, short int , int , int *, short int *); extern void *cx_atan(void *, short int , int , int *, short int *); extern void *cx_floor(void *, short int , int , int *, short int *); extern void *cx_ceil(void *, short int , int , int *, short int *); extern void *cx_sortorder(void *, short int , int , int *, short int *); /* cmath2.c */ extern void * cx_norm(void *, short int , int , int *, short int *); extern void *cx_uminus(void *, short int , int , int *, short int *); extern void *cx_rnd(void *, short int , int , int *, short int *); extern void *cx_sunif(void *, short int , int , int *, short int *); extern void *cx_sgauss(void *, short int , int , int *, short int *); extern void *cx_poisson(void *, short int , int , int *, short int *); extern void *cx_exponential(void *, short int , int , int *, short int *); extern void *cx_mean(void *, short int , int , int *, short int *); extern void *cx_length(void *, short int , int , int *, short int *); extern void *cx_vector(void *, short int , int , int *, short int *); extern void *cx_unitvec(void *, short int , int , int *, short int *); extern void *cx_plus(void *, void *, short int , short int , int ); extern void *cx_minus(void *, void *, short int , short int , int ); extern void *cx_times(void *, void *, short int , short int , int ); extern void *cx_mod(void *, void *, short int , short int , int ); extern void *cx_max(void *, short int , int , int *, short int *); extern void *cx_min(void *, short int , int , int *, short int *); extern void *cx_d(void *, short int , int , int *, short int *); extern void *cx_avg(void *, short int , int , int *, short int *); /* cmath3.c */ extern void *cx_divide(void *, void *, short int , short int , int); extern void *cx_comma(void *, void *, short int , short int , int); extern void *cx_power(void *, void *, short int , short int , int); extern void *cx_eq(void *, void *, short int , short int , int); extern void *cx_gt(void *, void *, short int , short int , int); extern void *cx_lt(void *, void *, short int , short int , int); extern void *cx_ge(void *, void *, short int , short int , int); extern void *cx_le(void *, void *, short int , short int , int); extern void *cx_ne(void *, void *, short int , short int , int); /* cmath4.c */ extern void *cx_and(void *, void *, short int , short int , int); extern void *cx_or(void *, void *, short int , short int , int); extern void *cx_not(void *, short int , int , int *, short int *); extern void *cx_interpolate(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); extern void *cx_deriv(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); extern void *cx_group_delay(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); extern void *cx_fft(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); extern void *cx_ifft(void *, short int , int , int *, short int *, struct plot *, struct plot *, int ); /* define.c */ extern struct pnode *ft_substdef(const char *name, struct pnode *args); extern void ft_pnode(struct pnode *pn); /* DEVHELP*/ extern void com_devhelp(wordlist *wl); extern void com_inventory(wordlist *wl); /* dotcards.c */ extern bool ft_acctprint; extern bool ft_noacctprint; extern bool ft_noinitprint; extern bool ft_listprint; extern bool ft_nopage; extern bool ft_nomod; extern bool ft_nodesprint; extern bool ft_optsprint; extern int ft_cktcoms(bool terse); extern void ft_dotsaves(void); extern int ft_savedotargs(void); /* error.c */ extern void fperror(char *mess, int code); extern void ft_sperror(int code, char *mess); extern char ErrorMessage[]; extern void internalerror(char *); extern void externalerror(char *); extern bool ft_pipemode; /* evaluate.c */ extern struct dvec *ft_evaluate(struct pnode *node); /* ftesopt.c */ extern struct variable *ft_getstat(struct circ *, char *); /* ginterface.c extern bool gi_init(); extern bool gi_endpause; extern bool gi_rottext; extern int gi_fntheight; extern int gi_fntwidth; extern int gi_maxx; extern int gi_maxy; extern int gi_nolst; extern int gi_nocolors; extern int gi_package; extern void gi_arc(); extern void gi_clearscreen(); extern void gi_close(); extern void gi_drawline(); extern void gi_redraw(); extern void gi_setcolor(); extern void gi_resetcolor(); extern void gi_setlinestyle(); extern void gi_text(); extern void gi_update(); */ /* graf.c */ extern bool gr_gmode; extern bool gr_hmode; extern double gr_xrange[2]; extern double gr_yrange[2]; extern int gr_xmargin; extern int gr_ymargin; extern int gr_xcenter; extern int gr_ycenter; extern int gr_radius; extern bool gr_circular; /* inp.c */ void inp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, struct line *options, char *filename); extern void inp_source(char *file); void inp_spsource(FILE *fp, bool comfile, char *filename, bool intfile); extern void inp_casefix(char *string); extern void inp_list(FILE *file, struct line *deck, struct line *extras, int type); extern struct line *inp_readall(FILE *fp, char *dir_name, bool comfile, bool intfile); extern FILE *inp_pathopen(char *name, char *mode); extern char** circarray; /* nutinp.c */ void inp_nutsource(FILE *fp, bool comfile, char *filename); void nutinp_dodeck(struct line *deck, char *tt, wordlist *end, bool reuse, struct line *options, char *filename); extern void nutcom_source(wordlist *wl); /* interpolate.c */ extern bool ft_interpolate(double *data, double *ndata, double *oscale, int olen, double *nscale, int nlen, int degree); extern bool ft_polyfit(double *xdata, double *ydata, double *result, int degree, double *scratch); extern double ft_peval(double x, double *coeffs, int degree); extern void ft_polyderiv(double *coeffs, int degree); /* numparse.c */ extern bool ft_strictnumparse; double * ft_numparse(char **s, bool whole); /* options.c */ extern bool ft_simdb; extern bool ft_parsedb; extern bool ft_evdb; extern bool ft_vecdb; extern bool ft_grdb; extern bool ft_gidb; extern bool ft_controldb; extern bool ft_asyncdb; extern char *ft_setkwords[]; extern struct line *inp_getopts(struct line *deck); extern struct line *inp_getoptsc(char *in_line, struct line *com_options); extern bool ft_ngdebug; extern bool ft_stricterror; /* parse.c */ extern struct func ft_funcs[]; extern struct func func_not; extern struct func func_uminus; extern struct pnode * ft_getpnames(wordlist *wl, bool check); #define free_pnode(ptr) free_pnode_x(ptr); ptr=NULL extern void free_pnode_x(struct pnode *t); /* plotcurve.c */ extern int ft_findpoint(double pt, double *lims, int maxp, int minp, bool islog); extern double * ft_minmax(struct dvec *v, bool real); extern void ft_graf(struct dvec *v, struct dvec *xs, bool nostart); /* rawfile.c */ extern int raw_prec; extern void raw_write(char *name, struct plot *pl, bool app, bool binary); extern void spar_write(char *name, struct plot *pl, double val); extern struct plot *raw_read(char *name); /* meas.c */ extern bool do_measure(char *what, bool chk_only); extern bool check_autostop(char *what); /* randnumb.c */ extern void TausSeed(void); /* rnorrexp.c */ extern void zigset(unsigned long jsrseed); /* resource.c */ extern void ft_ckspace(void); /* runcoms.c */ extern int ft_dorun(char *file); extern bool ft_getOutReq(FILE **, struct plot **, bool *, char *, char *); /* spice.c & nutmeg.c */ extern const bool ft_nutmeg; extern IFsimulator *ft_sim; extern char *ft_rawfile; extern int main(int argc, char **argv); /* spiceif.c & nutmegif.c */ extern bool if_tranparams(struct circ *ci, double *start, double *stop, double *step); extern char *if_errstring(int code); extern int if_sens_run(CKTcircuit *t, wordlist *args, INPtables *tab); extern struct variable *(*if_getparam)(CKTcircuit *ckt, char** name, char* param, int ind, int do_model); extern struct variable * nutif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model); extern struct variable *spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model); extern struct variable *spif_getparam_special(CKTcircuit *ckt, char **name, char *param, int ind, int do_model); extern void if_setndnames(char *line); extern void if_setparam_model(CKTcircuit *ckt, char **name, char *val ); extern void if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_model); extern struct variable *if_getstat(CKTcircuit *ckt, char *name); extern int ft_find_analysis(char *name); extern IFparm * ft_find_analysis_parm(int which, char *name); /* typesdef.c */ extern char *ft_typabbrev(int); extern char *ft_typenames(int); extern char *ft_plotabbrev(char *); extern int ft_typnum(char *); /* vectors.c */ extern bool vec_eq(struct dvec *v1, struct dvec *v2); extern int plot_num; extern struct dvec *vec_fromplot(char *word, struct plot *plot); extern struct dvec *vec_copy(struct dvec *v); extern struct dvec *vec_get(const char *word); extern struct dvec *vec_mkfamily(struct dvec *v); extern struct plot *plot_cur; extern struct plot *plot_alloc(char *name); extern struct plot *plot_list; extern int plotl_changed; extern void plot_add(struct plot *pl); #define vec_free(ptr) vec_free_x(ptr); ptr=NULL extern void vec_free_x(struct dvec *v); extern void vec_gc(void); extern void ft_loadfile(char *file); extern void vec_new(struct dvec *d); extern void plot_docoms(wordlist *wl); extern void vec_remove(char *name); extern void plot_setcur(char *name); extern void plot_new(struct plot *pl); extern char *vec_basename(struct dvec *v); extern bool plot_prefix(char *pre, char *str); extern void vec_transpose(struct dvec *v); /* main.c */ extern bool ft_intrpt; extern bool ft_setflag; /* error.c */ extern void controlled_exit(int status); #endif ngspice-26/src/include/ngspice/multi_line.h0000644000265600020320000000256312264261473020413 0ustar andreasadmin/* * project.h * * Diagonalization by Successive Rotations Method * (The Jacobi Method) * * Date: October 4, 1991 * * Author: Shen Lin * * Copyright (C) University of California, Berkeley * */ /************************************************************ * * Macros * ************************************************************/ #ifndef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif #ifndef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif #ifndef ABS #define ABS(x) ((x) >= 0 ? (x) : (-(x))) #endif #ifndef SGN #define SGN(x) ((x) >= 0 ? (1.0) : (-1.0)) #endif /************************************************************ * * Defines * ************************************************************/ #define MAX_DIM 16 #define Title "Diagonalization of a Symmetric matrix A (A = S^-1 D S)\n" #define Left_deg 7 /* should be greater than or equal to 6 */ #define Right_deg 2 /************************************************************ * * Data Structure Definitions * ************************************************************/ typedef struct linked_list_of_max_entry{ struct linked_list_of_max_entry *next; int row, col; double value; } MAXE, *MAXE_PTR; typedef struct { double *Poly[MAX_DIM]; double C_0[MAX_DIM]; } Mult_Out; typedef struct { double *Poly; double C_0; } Single_Out; ngspice-26/src/include/ngspice/matldefs.h0000644000265600020320000000450712264261473020051 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_MATLDEFS_H #define ngspice_MATLDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sMATLcard { struct sMATLcard *MATLnextCard; int MATLnumber; int MATLmaterial; double MATLpermittivity; double MATLaffinity; double MATLnc0; double MATLnv0; double MATLeg0; double MATLdEgdT; double MATLtrefEg; double MATLdEgdN; double MATLnrefEg; double MATLdEgdP; double MATLprefEg; double MATLtaun0; double MATLtaup0; double MATLnrefSRHn; double MATLnrefSRHp; double MATLcnAug; double MATLcpAug; double MATLaRichN; double MATLaRichP; unsigned int MATLnumberGiven : 1; unsigned int MATLmaterialGiven : 1; unsigned int MATLpermittivityGiven : 1; unsigned int MATLaffinityGiven : 1; unsigned int MATLnc0Given : 1; unsigned int MATLnv0Given : 1; unsigned int MATLeg0Given : 1; unsigned int MATLdEgdTGiven : 1; unsigned int MATLtrefEgGiven : 1; unsigned int MATLdEgdNGiven : 1; unsigned int MATLnrefEgGiven : 1; unsigned int MATLdEgdPGiven : 1; unsigned int MATLprefEgGiven : 1; unsigned int MATLtaun0Given : 1; unsigned int MATLtaup0Given : 1; unsigned int MATLnrefSRHnGiven : 1; unsigned int MATLnrefSRHpGiven : 1; unsigned int MATLcnAugGiven : 1; unsigned int MATLcpAugGiven : 1; unsigned int MATLaRichNGiven : 1; unsigned int MATLaRichPGiven : 1; unsigned int MATLtnomGiven : 1; } MATLcard; /* MATL parameters */ #define MATL_NC0 1 #define MATL_NV0 2 #define MATL_EG0 3 #define MATL_DEGDT 4 #define MATL_TREF_EG 5 #define MATL_DEGDN 6 #define MATL_NREF_EG 7 #define MATL_DEGDP 8 #define MATL_PREF_EG 9 #define MATL_AFFIN 10 #define MATL_PERMIT 11 #define MATL_TAUN0 12 #define MATL_TAUP0 13 #define MATL_NSRHN 14 #define MATL_NSRHP 15 #define MATL_CNAUG 16 #define MATL_CPAUG 17 #define MATL_ARICHN 18 #define MATL_ARICHP 19 #define MATL_INSULATOR 20 #define MATL_OXIDE 21 #define MATL_NITRIDE 22 #define MATL_SEMICON 23 #define MATL_SILICON 24 #define MATL_POLYSIL 25 #define MATL_GAAS 26 #define MATL_NUMBER 27 #define MATL_DEGDC 28 #define MATL_CREF_EG 29 #endif ngspice-26/src/include/ngspice/sim.h0000644000265600020320000000057012264261473017036 0ustar andreasadmin#ifndef ngspice_SIM_H #define ngspice_SIM_H enum simulation_types { SV_NOTYPE, SV_TIME, SV_FREQUENCY, SV_VOLTAGE, SV_CURRENT, SV_OUTPUT_N_DENS, SV_OUTPUT_NOISE, SV_INPUT_N_DENS, SV_INPUT_NOISE, SV_POLE, SV_ZERO, SV_SPARAM, SV_TEMP, SV_RES, SV_IMPEDANCE, SV_ADMITTANCE, SV_POWER, SV_PHASE, SV_DB, SV_CAPACITANCE, SV_CHARGE }; #endif ngspice-26/src/include/ngspice/elctdefs.h0000644000265600020320000000215312264261473020036 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_ELCTDEFS_H #define ngspice_ELCTDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sELCTcard { struct sELCTcard *ELCTnextCard; double ELCTxLow; double ELCTxHigh; double ELCTyLow; double ELCTyHigh; int ELCTixLow; int ELCTixHigh; int ELCTiyLow; int ELCTiyHigh; int ELCTnumber; unsigned int ELCTxLowGiven : 1; unsigned int ELCTxHighGiven : 1; unsigned int ELCTyLowGiven : 1; unsigned int ELCTyHighGiven : 1; unsigned int ELCTixLowGiven : 1; unsigned int ELCTixHighGiven : 1; unsigned int ELCTiyLowGiven : 1; unsigned int ELCTiyHighGiven : 1; unsigned int ELCTnumberGiven : 1; } ELCTcard; /* ELCT parameters */ #define ELCT_X_LOW 1 #define ELCT_X_HIGH 2 #define ELCT_Y_LOW 3 #define ELCT_Y_HIGH 4 #define ELCT_IX_LOW 5 #define ELCT_IX_HIGH 6 #define ELCT_IY_LOW 7 #define ELCT_IY_HIGH 8 #define ELCT_NUMBER 9 #endif ngspice-26/src/include/ngspice/cpdefs.h0000644000265600020320000000461112264261473017512 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * General stuff for the C-shell parser. */ /* Standard definitions */ #ifndef ngspice_CPDEFS_H #define ngspice_CPDEFS_H #include "ngspice/cpstd.h" #define MAXWORDS 512 /* Information about spice commands. */ struct comm { /* The name of the command. */ char *co_comname; /* The function that handles the command. */ void (*co_func) (wordlist *wl); /* These can't be used from nutmeg. */ bool co_spiceonly; /* Is this a "major" command? */ bool co_major; /* Bitmasks for command completion. */ long co_cctypes[4]; /* print help message on this environment mask */ unsigned int co_env; /* minimum number of arguments required */ int co_minargs; /* maximum number of arguments allowed */ int co_maxargs; /* The fn that prompts the user. */ void (*co_argfn) (wordlist *wl, struct comm *command); /* When these are printed, printf(string, av[0]) .. */ char *co_help; }; #define LOTS 1000 /* The history list. Things get put here after the first (basic) parse. * The word list will change later, so be sure to copy it. */ struct histent { int hi_event; wordlist *hi_wlist; struct histent *hi_next; struct histent *hi_prev; }; /* The values returned by cp_usrset(). */ #define US_OK 1 /* Either not relevant or nothing special. */ #define US_READONLY 2 /* Complain and don't set this var. */ #define US_DONTRECORD 3 /* Ok, but don't keep track of this one. */ #define US_SIMVAR 4 /* OK, recorded in options struct */ #define US_NOSIMVAR 5 /* Not OK, simulation param but circuit not loaded */ /* Aliases. These will be expanded if the word is the first in an input * line. The substitution string may contain arg selectors. */ struct alias { char *al_name; /* The word to be substituted for. */ wordlist *al_text; /* What to substitute for it. */ struct alias *al_next; struct alias *al_prev; } ; /* The current record of what characters are special. */ #define CPC_BRR 004 /* Break word to right of character. */ #define CPC_BRL 010 /* Break word to left of character. */ #define CT_ALIASES 1 #define CT_LABEL 15 /* Get all the extern definitions... */ #include "ngspice/cpextern.h" #endif ngspice-26/src/include/ngspice/evtudn.h0000644000265600020320000001060612264261473017554 0ustar andreasadmin#ifndef ngspice_EVTUDN_H #define ngspice_EVTUDN_H /* =========================================================================== FILE EVTudn.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of "User-Defined Nodes". These nodes are integrated into the simulator similar to the way models are tied into SPICE 3C1, so that new node types can be relatively easily added. The functions (required and optional) are listed below. For optional functions, the function can be left undefined and the pointer placed into the Evt_Udn_Info_t structure can be specified as NULL. Required functions: create - allocate data structure used as inputs and outputs to code models initialize - set structure to appropriate initial value for first use as model input copy - make a copy of the contents into created but possibly uninitialized structure compare - determine if two structures are equal in value Optional functions: dismantle - free allocations _inside_ structure (but not structure itself) invert - invert logical value of structure resolve - determine the resultant when multiple outputs are connected to a node plot_val - output a real value for specified structure component for plotting purposes print_val - output a string value for specified structure component for printing ipc_val - output a binary data structure and size of the structure for IPC INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" /* for Mif_Boolean_t used in udn_..._compare */ #define MALLOCED_PTR (*evt_struct_ptr) #define STRUCT_PTR evt_struct_ptr #define STRUCT_PTR_1 evt_struct_ptr_1 #define STRUCT_PTR_2 evt_struct_ptr_2 #define EQUAL (*evt_equal) #define INPUT_STRUCT_PTR evt_input_struct_ptr #define OUTPUT_STRUCT_PTR evt_output_struct_ptr #define INPUT_STRUCT_PTR_ARRAY evt_input_struct_ptr_array #define INPUT_STRUCT_PTR_ARRAY_SIZE evt_input_struct_ptr_array_size #define STRUCT_MEMBER_ID evt_struct_member_id #define PLOT_VAL (*evt_plot_val) #define PRINT_VAL (*evt_print_val) #define IPC_VAL (*evt_ipc_val) #define IPC_VAL_SIZE (*evt_ipc_val_size) #define CREATE_ARGS void **evt_struct_ptr #define INITIALIZE_ARGS void *evt_struct_ptr #define COMPARE_ARGS void *evt_struct_ptr_1, \ void *evt_struct_ptr_2, \ Mif_Boolean_t *evt_equal #define COPY_ARGS void *evt_input_struct_ptr, \ void *evt_output_struct_ptr #define DISMANTLE_ARGS void *evt_struct_ptr #define INVERT_ARGS void *evt_struct_ptr #define RESOLVE_ARGS int evt_input_struct_ptr_array_size, \ void **evt_input_struct_ptr_array, \ void *evt_output_struct_ptr #define PLOT_VAL_ARGS void *evt_struct_ptr, \ char *evt_struct_member_id, \ double *evt_plot_val #define PRINT_VAL_ARGS void *evt_struct_ptr, \ char *evt_struct_member_id, \ char **evt_print_val #define IPC_VAL_ARGS void *evt_struct_ptr, \ void **evt_ipc_val, \ int *evt_ipc_val_size typedef struct { char *name; char *description; void ((*create)(CREATE_ARGS)); void ((*dismantle)(DISMANTLE_ARGS)); void ((*initialize)(INITIALIZE_ARGS)); void ((*invert)(INVERT_ARGS)); void ((*copy)(COPY_ARGS)); void ((*resolve)(RESOLVE_ARGS)); void ((*compare)(COMPARE_ARGS)); void ((*plot_val)(PLOT_VAL_ARGS)); void ((*print_val)(PRINT_VAL_ARGS)); void ((*ipc_val)(IPC_VAL_ARGS)); } Evt_Udn_Info_t; extern int g_evt_num_udn_types; extern Evt_Udn_Info_t **g_evt_udn_info; #endif ngspice-26/src/include/ngspice/stringutil.h0000644000265600020320000000230112264261473020444 0ustar andreasadmin/************* * Header file for string.c * 1999 E. Rouat ************/ #include "ngspice/config.h" #include "ngspice/bool.h" #ifndef ngspice_STRINGUTIL_H #define ngspice_STRINGUTIL_H int prefix(register char *p, register char *s); char * copy(const char *str); char * copy_substring(const char *str, const char *end); int substring(register char *sub, register char *str); void appendc(char *s, char c); int scannum(char *str); int cieq(register char *p, register char *s); int ciprefix(register char *p, register char *s); void strtolower(char *str); void strtoupper(char *str); char * stripWhiteSpacesInsideParens(char *str); char * gettok(char **s); char * gettok_instance(char **); char * gettok_char(char **s, char p, bool inc_p, bool nested); #ifdef CIDER /* cider integration */ int cinprefix(register char *p, register char *s, register int n); int cimatch(register char *p, register char *s); #endif #ifndef HAVE_BCOPY void bcopy(const void *from, void *to, size_t num); #endif #ifndef HAVE_BZERO void bzero(void *ptr, size_t num); #endif bool isquote(char ch); bool is_arith_char(char c); bool str_has_arith_char(char *s); int get_comma_separated_values( char *values[], char *str ); #endif ngspice-26/src/include/ngspice/mifproto.h0000644000265600020320000000506612264261473020112 0ustar andreasadmin#ifndef ngspice_MIFPROTO_H #define ngspice_MIFPROTO_H /* =========================================================================== FILE MIFproto.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains ANSI C function prototypes for functions in the MIF package. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/ifsim.h" #include "ngspice/inpdefs.h" #include "ngspice/smpdefs.h" #include "ngspice/cktdefs.h" #include "ngspice/miftypes.h" extern void MIF_INP2A( CKTcircuit *ckt, /* circuit structure to put mod/inst structs in */ INPtables *tab, /* symbol table for node names, etc. */ card *current /* the card we are to parse */ ); extern char * MIFgetMod( CKTcircuit *ckt, char *name, INPmodel **model, INPtables *tab ); extern IFvalue * MIFgetValue( CKTcircuit *ckt, char **line, int type, INPtables *tab, char **err ); extern int MIFsetup( SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state ); extern int MIFunsetup( GENmodel *inModel, CKTcircuit *ckt ); extern int MIFload( GENmodel *inModel, CKTcircuit *ckt ); extern int MIFmParam( int param_index, IFvalue *value, GENmodel *inModel ); extern int MIFask( CKTcircuit *ckt, GENinstance *inst, int param_index, IFvalue *value, IFvalue *select ); extern int MIFmAsk( CKTcircuit *ckt, GENmodel *inModel, int param_index, IFvalue *value ); extern int MIFtrunc( GENmodel *inModel, CKTcircuit *ckt, double *timeStep ); extern int MIFconvTest( GENmodel *inModel, CKTcircuit *ckt ); extern int MIFdelete( GENmodel *inModel, IFuid name, GENinstance **inst ); extern int MIFmDelete( GENmodel **inModel, IFuid modname, GENmodel *model ); extern void MIFdestroy( GENmodel **inModel ); extern char *MIFgettok( char **s ); extern char *MIFget_token( char **s, Mif_Token_Type_t *type ); extern Mif_Cntl_Src_Type_t MIFget_cntl_src_type( Mif_Port_Type_t in_port_type, Mif_Port_Type_t out_port_type ); extern char *MIFcopy(char *); #endif ngspice-26/src/include/ngspice/material.h0000644000265600020320000000521712264261473020047 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_MATERIAL_H #define ngspice_MATERIAL_H #ifndef NUM_CARRIERS #include "ngspice/numenum.h" #endif /* Information needed by the various physical models */ typedef struct sMaterialInfo { int id; /* Unique identification number */ int material; /* Oxide, Nitride, Silicon, Aluminum */ int type; /* Insulator, Semiconductor, Metal */ double tnom; /* Parameter Measurement Temp. */ /* Intrinsic-Concentration-Related Parameters */ double eps; /* Dielectric Permittivity */ double affin; /* Electron Affinity */ double refPsi; /* Reference Potential of Intrinsic */ double ni0; /* Reference Intrinsic Concentration */ double nc0; /* Conduction Band Num States */ double nv0; /* Valence Band Num States */ double mass[NUM_CARRIERS]; /* Conduction Masses */ double eg0; /* Band Gap */ double dEgDt; /* Temp-Dep Band Gap Narrowing */ double trefBGN; /* Ref. Temp for BGN */ double dEgDn[NUM_CARRIERS]; /* Conc-Dep BGN Constants */ double nrefBGN[NUM_CARRIERS]; /* Ref. Conc's for BGN */ /* Generation-Recombination Parameters */ double tau0[NUM_CARRIERS]; /* Low-Conc. SRH Lifetimes */ double nrefSRH[NUM_CARRIERS]; /* Ref. Conc.'s for Lifetime */ double cAug[NUM_CARRIERS]; /* Auger Constants */ double aii[NUM_CARRIERS]; /* Avalanche Factors */ double bii[NUM_CARRIERS]; /* Aval. Critical Fields */ /* Incomplete Ionization Parameters */ double eDon; /* Donor Energy Level */ double eAcc; /* Acceptor Energy Level */ double gDon; /* Donor Degeneracy Factor */ double gAcc; /* Acceptor Degeneracy Factor */ /* Carrier-Velocity Related Parameters */ double aRich[NUM_CARRIERS]; /* Effective Richardson Constants */ double vRich[NUM_CARRIERS]; /* Effective Recombination Velocities */ /* Mobility Concentration and Temperature Dependence */ int concModel; int tempModel; double muMax[NUM_CARRIERS][NUM_CARRTYPES]; double muMin[NUM_CARRIERS][NUM_CARRTYPES]; double ntRef[NUM_CARRIERS][NUM_CARRTYPES]; double ntExp[NUM_CARRIERS][NUM_CARRTYPES]; /* Mobility Hot Carrier Dependence */ int fieldModel; double vSat[NUM_CARRIERS]; double vWarm[NUM_CARRIERS]; /* Inversion-Layer Mobility */ int surfModel; double mus[NUM_CARRIERS]; double thetaA[NUM_CARRIERS]; double thetaB[NUM_CARRIERS]; struct sMaterialInfo *next; } MaterialInfo; typedef struct sMaterialInfo ONEmaterial; typedef struct sMaterialInfo TWOmaterial; typedef struct sMaterialInfo MATLmaterial; #endif ngspice-26/src/include/ngspice/defines.h0000644000265600020320000000561412264261473017667 0ustar andreasadmin/************* * Definitions header file * 1999 E. Rouat ************/ /* * This file will contain all #defines needed * by ngspice code (in construction) * It should only #define numeric constants, not macros. */ #ifndef ngspice_DEFINES_H #define ngspice_DEFINES_H #ifndef M_PI # define M_PI 3.14159265358979323846 #endif #ifndef M_E # define M_E 2.7182818284590452354 #endif #ifndef M_LOG2E # define M_LOG2E 1.4426950408889634074 #endif #ifndef M_LOG10E # define M_LOG10E 0.43429448190325182765 #endif /* * IEEE Floating point */ #define MAX_EXP_ARG 709.0 #ifndef DBL_EPSILON # define DBL_EPSILON 2.2204460492503131e-16 #endif #ifndef DBL_MAX # define DBL_MAX 1.79769313486231e+308 #endif #ifndef DBL_MIN # define DBL_MIN 2.22507385850721e-308 #endif #ifndef SHRT_MAX # define SHRT_MAX 32766 #endif #ifndef INT_MAX # define INT_MAX 2147483646 #endif #ifndef LONG_MAX # define LONG_MAX 2147483646 #endif #define MAXPOSINT INT_MAX /* * Physical constants (const.h) */ #define CHARGE (1.6021918e-19) #define CONSTCtoK (273.15) #define CONSTboltz (1.3806226e-23) #define CONSTepsZero (8.854214871e-12) /* epsilon zero F/m */ #define CONSTepsSiO2 (3.4531479969e-11) /* epsilon SiO2 F/m */ #define CONSTmuZero (1.25663706143592e-6) /* MuZero H/m */ #define REFTEMP 300.15 /* 27 degrees C */ /* Standard initialisation file name */ #define INITSTR ".spiceinit" /* Alternate initialisation file name */ #define ALT_INITSTR "spice.rc" #if defined(__MINGW32__) || defined(_MSC_VER) || defined (HAS_WINGUI) #define DIR_PATHSEP "\\" #define DIR_TERM '\\' #define DIR_PATHSEP_LINUX "/" #define DIR_TERM_LINUX '/' #define DIR_CWD "." #define TEMPFORMAT "%s%d.tmp" /* #define SYSTEM_PLOT5LPR "lpr -P%s -g %s" #define SYSTEM_PSLPR "lpr -P%s %s" #define SYSTEM_MAIL "Mail -s \"%s (%s) Bug Report\" %s" */ #else #define DIR_PATHSEP "/" #define DIR_TERM '/' #define DIR_CWD "." #define TEMPFORMAT "/tmp/%s%d" #define SYSTEM_PLOT5LPR "lpr -P%s -g %s" #define SYSTEM_PSLPR "lpr -P%s %s" #define SYSTEM_MAIL "Mail -s \"%s (%s) Bug Report\" %s" #endif /* * #define-s that are always on */ /* On Unix the following should always be true, so they should jump out */ #define HAS_ASCII #define HAS_TTY_ #define HAS_TIME_H #define HAS_RLIMIT_ #ifndef SIGNAL_FUNCTION # ifdef HAVE_SIGHANDLER_T # define SIGNAL_FUNCTION sighandler_t # elif HAVE_SIG_T # define SIGNAL_FUNCTION sig_t # elif HAVE___SIGHANDLER_T # define SIGNAL_FUNCTION __sighandler_t # else # define SIGNAL_FUNCTION RETSIGTYPE (*)(int) # endif #endif #define BSIZE_SP 512 #define EXIT_NORMAL 0 #define EXIT_BAD 1 #define EXIT_INFO 2 #define TRUE 1 #define FALSE 0 /* #define DIR_PATHSEP "/" #define DIR_TERM '/' #define DIR_CWD "." #define TEMPFORMAT "/tmp/%s%d" #define SYSTEM_PLOT5LPR "lpr -P%s -g %s" #define SYSTEM_PSLPR "lpr -P%s %s" #define SYSTEM_MAIL "Mail -s \"%s (%s) Bug Report\" %s" */ #endif ngspice-26/src/include/ngspice/dopdefs.h0000644000265600020320000000377712264261473017706 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_DOPDEFS_H #define ngspice_DOPDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sDOPcard { struct sDOPcard *DOPnextCard; double DOPxLow; double DOPxHigh; double DOPyLow; double DOPyHigh; double DOPconc; double DOPlocation; double DOPcharLen; double DOPratioLat; int DOPprofileType; int DOPlatProfileType; int DOProtateLat; int DOPimpurityType; int DOPaxisType; int DOPnumDomains; int *DOPdomains; char *DOPinFile; unsigned int DOPxLowGiven : 1; unsigned int DOPxHighGiven : 1; unsigned int DOPyLowGiven : 1; unsigned int DOPyHighGiven : 1; unsigned int DOPconcGiven : 1; unsigned int DOPlocationGiven : 1; unsigned int DOPcharLenGiven : 1; unsigned int DOPratioLatGiven : 1; unsigned int DOPprofileTypeGiven : 1; unsigned int DOPlatProfileTypeGiven : 1; unsigned int DOProtateLatGiven : 1; unsigned int DOPimpurityTypeGiven : 1; unsigned int DOPaxisTypeGiven : 1; unsigned int DOPdomainsGiven : 1; unsigned int DOPinFileGiven : 1; } DOPcard; /* DOP parameters */ #define DOP_UNIF 1 #define DOP_LINEAR 2 #define DOP_GAUSS 3 #define DOP_ERFC 4 #define DOP_EXP 5 #define DOP_SUPREM3 6 #define DOP_ASCII 7 #define DOP_SUPASCII 8 #define DOP_INFILE 9 #define DOP_BORON 10 #define DOP_PHOSP 11 #define DOP_ARSEN 12 #define DOP_ANTIM 13 #define DOP_P_TYPE 14 #define DOP_N_TYPE 15 #define DOP_X_AXIS 16 #define DOP_Y_AXIS 17 #define DOP_X_LOW 18 #define DOP_X_HIGH 19 #define DOP_Y_LOW 20 #define DOP_Y_HIGH 21 #define DOP_CONC 22 #define DOP_LOCATION 23 #define DOP_CHAR_LEN 24 #define DOP_RATIO_LAT 25 #define DOP_ROTATE_LAT 26 #define DOP_UNIF_LAT 27 #define DOP_LINEAR_LAT 28 #define DOP_GAUSS_LAT 29 #define DOP_ERFC_LAT 30 #define DOP_EXP_LAT 31 #define DOP_DOMAIN 32 #endif ngspice-26/src/include/ngspice/outpdefs.h0000644000265600020320000000500112264261473020071 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Authors: 1992 David Gates **********/ #ifndef ngspice_OUTPDEFS_H #define ngspice_OUTPDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sOUTPcard { struct sOUTPcard *OUTPnextCard; char *OUTProotFile; int OUTPnumVars; int OUTPdcDebug; int OUTPtranDebug; int OUTPacDebug; int OUTPgeom; int OUTPmesh; int OUTPmaterial; int OUTPglobals; int OUTPstats; int OUTPfileType; int OUTPdoping; int OUTPpsi; int OUTPequPsi; int OUTPvacPsi; int OUTPnConc; int OUTPpConc; int OUTPphin; int OUTPphip; int OUTPphic; int OUTPphiv; int OUTPeField; int OUTPjc; int OUTPjd; int OUTPjn; int OUTPjp; int OUTPjt; int OUTPuNet; int OUTPmun; int OUTPmup; unsigned int OUTProotFileGiven : 1; unsigned int OUTPdcDebugGiven : 1; unsigned int OUTPtranDebugGiven : 1; unsigned int OUTPacDebugGiven : 1; unsigned int OUTPgeomGiven : 1; unsigned int OUTPmeshGiven : 1; unsigned int OUTPmaterialGiven : 1; unsigned int OUTPglobalsGiven : 1; unsigned int OUTPstatsGiven : 1; unsigned int OUTPfileTypeGiven : 1; unsigned int OUTPdopingGiven : 1; unsigned int OUTPpsiGiven : 1; unsigned int OUTPequPsiGiven : 1; unsigned int OUTPvacPsiGiven : 1; unsigned int OUTPnConcGiven : 1; unsigned int OUTPpConcGiven : 1; unsigned int OUTPphinGiven : 1; unsigned int OUTPphipGiven : 1; unsigned int OUTPphicGiven : 1; unsigned int OUTPphivGiven : 1; unsigned int OUTPeFieldGiven : 1; unsigned int OUTPjcGiven : 1; unsigned int OUTPjdGiven : 1; unsigned int OUTPjnGiven : 1; unsigned int OUTPjpGiven : 1; unsigned int OUTPjtGiven : 1; unsigned int OUTPuNetGiven : 1; unsigned int OUTPmunGiven : 1; unsigned int OUTPmupGiven : 1; } OUTPcard; /* OUTP parameters */ #define OUTP_ALL_DEBUG 1 #define OUTP_DC_DEBUG 2 #define OUTP_TRAN_DEBUG 3 #define OUTP_AC_DEBUG 4 #define OUTP_GEOM 5 #define OUTP_MESH 6 #define OUTP_MATERIAL 7 #define OUTP_GLOBALS 8 #define OUTP_STATS 9 #define OUTP_ROOTFILE 10 #define OUTP_RAWFILE 11 #define OUTP_HDF 12 #define OUTP_DOPING 13 #define OUTP_PSI 14 #define OUTP_EQU_PSI 15 #define OUTP_VAC_PSI 16 #define OUTP_N_CONC 17 #define OUTP_P_CONC 18 #define OUTP_PHIN 19 #define OUTP_PHIP 20 #define OUTP_PHIC 21 #define OUTP_PHIV 22 #define OUTP_E_FIELD 23 #define OUTP_J_C 24 #define OUTP_J_D 25 #define OUTP_J_N 26 #define OUTP_J_P 27 #define OUTP_J_T 28 #define OUTP_U_NET 29 #define OUTP_MUN 30 #define OUTP_MUP 31 #endif ngspice-26/src/include/ngspice/inpptree.h0000644000265600020320000001137112264261473020075 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * faustus@cad.berkeley.edu, ucbvax!faustus * * These definitions specify the format of the parse tree parameter type. * The first four are the elements of IFparseTree, defined in IFsim.h. */ #include "ngspice/ifsim.h" #ifndef ngspice_INPPTREE_H #define ngspice_INPPTREE_H /* This is the parameter value passed to the device routines. To get the * value of the function, where tree is a pointer to the INPparseTree, * result is a pointer to where you want the result, derivs is a pointer to * an vector of numVars doubles, and vals is a pointer to the selected * elements from the RHS, do * tree->p.IFeval(&tree, result, vals, derivs) * This routine will return either OK, E_PARMVAL, or E_PANIC. If an error * is reported the eval function will have printed something to standard * out before returning. */ typedef struct INPparseTree { IFparseTree p; struct INPparseNode *tree; /* The real stuff. */ struct INPparseNode **derivs; /* The derivative parse trees. */ } INPparseTree; /* This is what is passed as the actual parameter value. The fields will all * be filled in as needed. * * Values with names like v(something) and i(something) are treated specially. * They are considered voltages at nodes and branch currents through * voltage sources, respectively. The corresponding parameters will be of * type IF_NODE and IF_INSTANCE, respectively. */ typedef struct INPparseNode { int type; /* One of PT_*, below. */ struct INPparseNode *left; /* Left operand, or single operand. */ struct INPparseNode *right; /* Right operand, if there is one. */ double constant; /* If INP_CONSTANT. */ int valueIndex; /* If INP_VAR, index into vars array. */ char *funcname; /* If INP_FUNCTION, name of function, */ int funcnum; /* ... one of PTF_*, */ void (*function)(void); /* ... and pointer to the function. */ void *data; /* private data for certain functions, currently PTF_PWL */ int usecnt; } INPparseNode; /* A debugging function */ void INPptPrint(char *str, IFparseTree * ptree); /* FIXME, less public * and replace with static inline functions for better type check */ #define PTunary(node_ptr) \ ((double(*)(double)) (node_ptr)) #define PTbinary(node_ptr) \ ((double(*)(double, double)) (node_ptr)) #define PTunary_with_private(node_ptr) \ ((double(*)(double, void*)) (node_ptr)) /* These are the possible types of nodes we can have in the parse tree. The * numbers for the ops 1 - 5 have to be the same as the token numbers, * below. */ #define PT_PLACEHOLDER 0 /* For i(something) ... */ #define PT_PLUS 1 #define PT_MINUS 2 #define PT_TIMES 3 #define PT_DIVIDE 4 #define PT_POWER 5 #define PT_FUNCTION 6 #define PT_CONSTANT 7 #define PT_VAR 8 #define PT_COMMA 10 #define PT_TERN 11 #define PT_TIME 12 #define PT_TEMPERATURE 13 #define PT_FREQUENCY 14 /* These are the functions that we support. */ #define PTF_ACOS 0 #define PTF_ACOSH 1 #define PTF_ASIN 2 #define PTF_ASINH 3 #define PTF_ATAN 4 #define PTF_ATANH 5 #define PTF_COS 6 #define PTF_COSH 7 #define PTF_EXP 8 #define PTF_LN 9 #define PTF_LOG 10 #define PTF_SIN 11 #define PTF_SINH 12 #define PTF_SQRT 13 #define PTF_TAN 14 #define PTF_TANH 15 #define PTF_UMINUS 16 #define PTF_ABS 17 #define PTF_SGN 18 #define PTF_USTEP 19 #define PTF_URAMP 20 /* MW. PTF_CIF - next function */ #define PTF_USTEP2 21 #define PTF_PWL 22 #define PTF_PWL_DERIVATIVE 23 #define PTF_EQ0 24 #define PTF_NE0 25 #define PTF_GT0 26 #define PTF_LT0 27 #define PTF_GE0 28 #define PTF_LE0 29 #define PTF_POW 30 #define PTF_PWR 31 #define PTF_MIN 32 #define PTF_MAX 33 #define PTF_CEIL 34 #define PTF_FLOOR 35 /* The following things are used by the parser -- these are the token types the * lexer returns. */ #define TOK_END 0 #define TOK_PLUS 1 #define TOK_MINUS 2 #define TOK_TIMES 3 #define TOK_DIVIDE 4 #define TOK_POWER 5 #define TOK_UMINUS 6 #define TOK_LPAREN 7 #define TOK_RPAREN 8 #define TOK_VALUE 9 #define TOK_COMMA 10 /* And the types for value tokens... */ #define TYP_NUM 0 #define TYP_STRING 1 #define TYP_PNODE 2 /* A parser stack element. */ typedef struct PTelement { int token; int type; union { char *string; double real; INPparseNode *pnode; } value; } PTelement ; #define PT_STACKSIZE 200 /* And in IFeval.c */ extern int IFeval(IFparseTree *tree, double gmin, double *result, double *vals, double *derivs); #endif ngspice-26/src/include/ngspice/profile.h0000644000265600020320000000300612264261473017703 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * Doping Profile Data Structures */ #ifndef ngspice_PROFILE_H #define ngspice_PROFILE_H typedef struct sDOPprofile { int type; /* Primary profile type UNIF, EXP, etc */ int latType; /* Lateral profile type UNIF, EXP, etc */ int rotate; /* Is lat prof rotation of primary? */ int numDomains; /* Size of vector of domains to dope */ int *domains; /* Vector of domains to dope */ double param[10]; struct sDOPprofile *next; } DOPprofile; #define CONC param[1] #define PEAK_CONC param[1] #define IMPID param[1] #define X_LOW param[2] #define X_HIGH param[3] #define Y_LOW param[4] #define Y_HIGH param[5] #define RANGE param[6] #define LOCATION param[6] #define CHAR_LENGTH param[7] #define DIRECTION param[8] #define LAT_RATIO param[9] /* Structure for holding lookup tables of concentrations */ typedef struct sDOPtable { int impId; /* id of impurity */ double **dopData; /* Array of doping values */ struct sDOPtable *next; /* Pointer to next table in list */ } DOPtable; /* define impurity types */ #define IMP_BORON 1 #define IMP_PHOSPHORUS 2 #define IMP_ARSENIC 3 #define IMP_ANTIMONY 4 #define IMP_N_TYPE 5 #define IMP_P_TYPE 6 #endif ngspice-26/src/include/ngspice/swec.h0000644000265600020320000002725212264261473017215 0ustar andreasadmin/* * project.h * * Timing Simulator (ESWEC) * * Date: October 5, 1990 * * Author: Shen Lin * * Copyright (C) University of California, Berkeley * */ #ifndef ngspice_SWEC_H #define ngspice_SWEC_H /************************************************************ * * Defines * ************************************************************/ #define MainTitle " Timing Simulator\n" #define MAXDEVICE 4 #define MAXMOS 31500 /* suggested value */ #define MAXDD 256 /* suggested value */ #define MAXVCCS 128 /* suggested value */ #define MAXTIME 1000000 #define MAXNODE 136 #define TAB_SIZE 8192 /* originally 2048 */ #define NUM_STEPS_PER_MICRON 10 /* 0.1 micron is the smallest step */ #define MAX_FET_SIZE 80 /* largest fet in microns */ #define Vol_Step 1.0e-3 /* voltage resolution */ #define SCL 1000.0 /* voltage scaler (1V/3mv) */ #define MAX_CP_TX_LINES 8 /* max number of coupled lines in a multiconductor line system */ /************************************************************ * * Macro * ************************************************************/ #ifndef MAX #define MAX(x, y) ((x) > (y) ? (x) : (y)) #endif #ifndef MIN #define MIN(x, y) ((x) < (y) ? (x) : (y)) #endif #ifndef ABS #define ABS(x) ((x) >= 0 ? (x) : (-(x))) #endif /************************************************************ * * Data Structure Definitions * ************************************************************/ typedef struct reglist REGLIST; typedef struct node NODE; typedef struct mosfet MOSFET; typedef struct emosfet EMOSFET; typedef struct diode DIODE; typedef struct ediode EDIODE; typedef struct vccs VCCS; typedef struct evccs EVCCS; typedef struct i_cap I_CAP; typedef struct ei_cap EI_CAP; typedef struct resistor RESISTOR; typedef struct eresistor ERESISTOR; typedef struct rline RLINE; typedef struct erline ERLINE; typedef struct txline TXLine; typedef struct etxline ETXLine; typedef struct cpline CPLine; typedef struct ecpline ECPLine; typedef struct bqueue BQUEUE; typedef struct pqueue PQUEUE; typedef struct ms_device MS_DEVICE; typedef struct bp_device BP_DEVICE; typedef struct dd_device DD_DEVICE; struct mosfet{ int type; /* 1 : NMOS, 2 : PMOS */ MS_DEVICE *device; /* NULL if the nominal device model */ NODE *out_node; NODE *in_node; float Cs, Cd; MOSFET *nx; int time; /* instantaneous information */ float voltage, dvg; /* instantaneous information */ float vgN_1; /* gate voltage at previous event point */ float G; /* effective conductance at t(n) */ float effective; /* W over effective L */ int tabW; /* width in ns/um */ REGLIST *region; /* region associated with this mos */ /* NULL if driven by the node of the same region */ }; struct diode{ float Is; /* saturation current */ float Vj; /* junction potential */ double G; NODE *in_node; NODE *out_node; DIODE *nx; }; struct vccs{ float Is; /* saturation current */ NODE *in_node; NODE *out_node; NODE *pcv_node; NODE *ncv_node; DIODE *nx; }; typedef struct { char name[10]; /* device name */ int type; /* 1 : NMOS, 2 : PMOS */ int device_id; /* device id */ } DEVICENAME; struct ms_device{ char name[10]; int used; /* device used in circuit flag */ float rho; /* device vsat denom param */ float alpha; /* device vsat denom vgg param */ float vt; /* device zero bias threshold voltage in mv*/ float gamma; /* device backgate bias vt param */ float fermi; /* device fermi potential in mv */ float theta; /* device backgate bias vt width param */ float mu; /* device vt width param */ float eta; /* device saturation slope */ float eta5; /* eta - 0.5 */ int pzld; /* positive lambda */ float lambda; /* channel-length modulation */ float kp; /* device conductance parameter */ float cgs0; /* gate-source overlap capacitance per meter channel width */ float cgd0; /* gate-drain overlap capacitance per meter channel width */ float cox; /* oxide-field capacitance per square meter of gate area */ float cjsw; /* zero-biased junction sidewall capacitace per meter of junction perimeter */ float cj0; /* zero-biased junction bottom capacitace per square meter of junction area */ float keq; /* abrupt junction parameter */ float ld; /* lateral diffusion */ float *thresh; float *sat; float *dsat; float *body; float *gammod; }; struct bp_device{ char name[10]; int type; /* 1 : NPN; 2 : PNP */ float rc; /* collector resistance */ float re; /* emitter resistance */ float rb; /* zero bias base resistance */ float Is; /* transport saturation current */ float Af; /* ideal maximum forward alpha */ float Ar; /* ideal maximum reverse alpha */ float Vje; /* B-E built-in potential */ float Vjc; /* B-C built-in potential */ }; struct dd_device{ char name[10]; float Is; /* saturation current */ float rs; /* ohmic resistance */ float Vj; /* junction potential */ }; typedef struct linked_lists_of_Bpoint{ struct linked_lists_of_Bpoint *next; int time; float voltage; float slope; } BPOINT, *BPOINTPTR; typedef struct linked_lists_of_nodeName{ char id[24]; struct linked_lists_of_nodeName *left, *right; NODE *nd; } NDname, *NDnamePt; struct node { NDnamePt name; EMOSFET *mptr; /* pointer to head of src/drn MOSFET list */ EMOSFET *gptr; /* pointer to head of gate MOSFET list */ EI_CAP *cptr; /* pointer to head of internodal cap list */ ERESISTOR *rptr; /* pointer to head of internodal resistor list */ ERLINE *rlptr; /* pointer to head of internodal TX line list */ ETXLine *tptr; /* pointer to head of transmission line list */ ECPLine *cplptr; /* pointer to head of coupled lines list */ EDIODE *ddptr; /* pointer to head of diode list */ EVCCS *vccsptr; /* pointer to head of VCCS list */ EVCCS *cvccsptr;/* pointer to head of controlled VCCS list */ NODE *next; /* pointer to next node */ REGLIST *region; /* region associated with this node */ NODE *base_ptr; /* group src/drn nodes into region */ /* charles 2,2 1/18/93 float V; float dv; voltage at t(n-1) and slope at t(n) */ double V; double dv; double CL; /* grounded capacitance in F */ double gsum; /*^ sum of the equivalent conductance */ double cgsum; /*^ sum of the constant conductance */ double is; /*^ equivalent Is */ int tag; /* -2 : Vdd, -3 : Vss, -1 : initial value */ int flag; /*^ flag to show some features of the node */ PQUEUE *qptr; /*^ pointer to the entry in the queue or waiting list */ FILE *ofile; /* output file for the signal at this node */ /* NULL if not for print */ int dvtag; }; struct reglist{ REGLIST *rnxt; /* pointer to next region */ NODE *nlist; /* node list */ MOSFET *mos; I_CAP *cap; RESISTOR *res; TXLine *txl; CPLine *cpl; struct linked_lists_of_Bpoint *Bpoint; /* break points at primary inputs */ struct linked_lists_of_Bpoint *head; /* header of the break points at primary inputs */ int eTime; /* time when this region previously evaluated */ int DCvalue; /* 1, 0, 2 : unknown, 3 : unchangeable 1, 4 : unchangeable 0 */ BQUEUE *prediction; }; struct bqueue{ int key; /* time for the event to be fired, or DC weight */ BQUEUE *left; BQUEUE *right; BQUEUE *pred; BQUEUE *pool; REGLIST *region; /* region id */ }; struct pqueue { NODE *node; PQUEUE *next; PQUEUE *prev; }; struct i_cap { NODE *in_node; NODE *out_node; float cap; I_CAP *nx; }; struct resistor { NODE *in_node; NODE *out_node; float g; /* conductance */ int ifF; /* whether floating */ float g1; /* conductance for floating resistor */ RESISTOR *nx; }; struct rline { NODE *in_node; NODE *out_node; double g; /* conductance */ RLINE *nx; }; typedef struct linked_lists_of_vi_txl{ struct linked_lists_of_vi_txl *next; struct linked_lists_of_vi_txl *pool; int time; /* charles 2,2 float v_i, v_o; float i_i, i_o; */ double v_i, v_o; double i_i, i_o; } VI_list_txl; typedef struct linked_lists_of_vi{ struct linked_lists_of_vi *next; struct linked_lists_of_vi *pool; int time; double v_i[MAX_CP_TX_LINES], v_o[MAX_CP_TX_LINES]; double i_i[MAX_CP_TX_LINES], i_o[MAX_CP_TX_LINES]; } VI_list; typedef struct { double c, x; double cnv_i, cnv_o; } TERM; typedef struct { int ifImg; double aten; TERM tm[3]; } TMS; struct cpline { int noL; int ext; double ratio[MAX_CP_TX_LINES]; double taul[MAX_CP_TX_LINES]; TMS *h1t[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; TMS *h2t[MAX_CP_TX_LINES][MAX_CP_TX_LINES][MAX_CP_TX_LINES]; TMS *h3t[MAX_CP_TX_LINES][MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double h1C[MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double h2C[MAX_CP_TX_LINES][MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double h3C[MAX_CP_TX_LINES][MAX_CP_TX_LINES][MAX_CP_TX_LINES]; double h1e[MAX_CP_TX_LINES][MAX_CP_TX_LINES][3]; NODE *in_node[MAX_CP_TX_LINES]; NODE *out_node[MAX_CP_TX_LINES]; int tag_i[MAX_CP_TX_LINES], tag_o[MAX_CP_TX_LINES]; CPLine *nx; struct linked_lists_of_vi *vi_head; struct linked_lists_of_vi *vi_tail; double dc1[MAX_CP_TX_LINES], dc2[MAX_CP_TX_LINES]; }; struct txline { int lsl; /* 1 if the line is lossless, otherwise 0 */ int ext; /* a flag, set if time step is greater than tau */ double ratio; double taul; double sqtCdL; double h2_aten; double h3_aten; double h1C; double h1e[3]; int ifImg; NODE *in_node; NODE *out_node; int tag_i, tag_o; TERM h1_term[3]; TERM h2_term[3]; TERM h3_term[6]; TXLine *nx; struct linked_lists_of_vi_txl *vi_head; struct linked_lists_of_vi_txl *vi_tail; double dc1, dc2; int newtp; /* flag indicating new time point */ }; struct evccs { VCCS *vccs; EVCCS *link; }; struct ediode { DIODE *dd; EDIODE *link; }; struct emosfet { MOSFET *mos; EMOSFET *link; }; struct ei_cap { I_CAP *cap; EI_CAP *link; }; struct eresistor { RESISTOR *res; ERESISTOR *link; }; struct erline { RLINE *rl; ERLINE *link; }; struct etxline { TXLine *line; ETXLine *link; }; struct ecpline { CPLine *line; ECPLine *link; }; #endif ngspice-26/src/include/ngspice/macros.h0000644000265600020320000000530612264261473017534 0ustar andreasadmin/************* * Macros definitions header file * 1999 E. Rouat ************/ /* * This file will contain all macros definitions needed * by ngspice code. (in construction) */ #ifndef ngspice_MACROS_H #define ngspice_MACROS_H /* * #define-s that are always on */ #define NEWCONV #define NUMELEMS(ARRAY) (sizeof(ARRAY)/sizeof(*ARRAY)) /* String macros */ #define eq(a,b) (!strcmp((a), (b))) #define eqc(a,b) (cieq((a), (b))) #define isalphanum(c) (isalpha(c) || isdigit(c)) #define hexnum(c) ((((c) >= '0') && ((c) <= '9')) ? ((c) - '0') : ((((c) >= \ 'a') && ((c) <= 'f')) ? ((c) - 'a' + 10) : ((((c) >= 'A') && \ ((c) <= 'F')) ? ((c) - 'A' + 10) : 0))) /* Mathematical macros */ #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) #define ABS(a) ((a) < 0.0 ? -(a) : (a)) #define SGN(a) ((a) < 0.0 ? -(1.0) : (1.0)) #define SIGN(a,b) ( b >= 0 ? (a >= 0 ? a : - a) : (a >= 0 ? - a : a)) #define SWAP(type, a, b) {type swapx; swapx = a; a = b; b = swapx;} #define ABORT() fflush(stderr);fflush(stdout);abort(); #define MERROR(CODE, MESSAGE) \ do { \ errMsg = TMALLOC(char, strlen(MESSAGE) + 1); \ strcpy(errMsg, (MESSAGE)); \ return (CODE); \ } while(0) #define NEW(TYPE) (TMALLOC(TYPE, 1)) #define NEWN(TYPE,COUNT) (TMALLOC(TYPE, COUNT)) #define R_NORM(A,B) { \ if ((A) == 0.0) { \ (B) = 0; \ } else { \ while (fabs(A) > 1.0) { \ (B) += 1; \ (A) /= 2.0; \ } \ while (fabs(A) < 0.5) { \ (B) -= 1; \ (A) *= 2.0; \ } \ } \ } #ifdef DEBUG #define DEBUGMSG(textargs) printf(textargs) #define DS(name_xz) { name_xz } #define DBGDEFINE(func_xz) func_xz #else /* ! DEBUG */ #define DEBUGMSG(testargs) #define DS(name_xz) #define DBGDEFINE(func_xz) #endif /* DEBUG */ /* A few useful macros - string eq just makes the code easier to read */ #define STRINGEQ 0 #define FUNC_NAME(x_xz) char *routine = x_xz /* Macro that queries the system to find the process time. */ #define ELAPSED_TIME( time ) \ { struct tms {int user, sys, cuser, csys;} buffer; \ \ times(&buffer); \ time = buffer.user / 60.0; \ } #ifdef HAVE_SIGSETJMP # define SETJMP(env, save_signals) sigsetjmp(env, save_signals) # define LONGJMP(env, retval) siglongjmp(env, retval) # define JMP_BUF sigjmp_buf #else # define SETJMP(env, save_signals) setjmp(env) # define LONGJMP(env, retval) longjmp(env, retval) # define JMP_BUF jmp_buf #endif #endif ngspice-26/src/include/ngspice/domndefs.h0000644000265600020320000000234112264261473020043 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_DOMNDEFS_H #define ngspice_DOMNDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sDOMNcard { struct sDOMNcard *DOMNnextCard; /* pointer to next domain */ double DOMNxLow; double DOMNxHigh; double DOMNyLow; double DOMNyHigh; int DOMNixLow; int DOMNixHigh; int DOMNiyLow; int DOMNiyHigh; int DOMNmaterial; int DOMNnumber; unsigned int DOMNxLowGiven : 1; unsigned int DOMNxHighGiven : 1; unsigned int DOMNyLowGiven : 1; unsigned int DOMNyHighGiven : 1; unsigned int DOMNixLowGiven : 1; unsigned int DOMNixHighGiven : 1; unsigned int DOMNiyLowGiven : 1; unsigned int DOMNiyHighGiven : 1; unsigned int DOMNmaterialGiven : 1; unsigned int DOMNnumberGiven : 1; } DOMNcard; /* DOMN parameters */ #define DOMN_X_LOW 1 #define DOMN_X_HIGH 2 #define DOMN_Y_LOW 3 #define DOMN_Y_HIGH 4 #define DOMN_IX_LOW 5 #define DOMN_IX_HIGH 6 #define DOMN_IY_LOW 7 #define DOMN_IY_HIGH 8 #define DOMN_NUMBER 9 #define DOMN_MATERIAL 10 #endif ngspice-26/src/include/ngspice/trcvdefs.h0000644000265600020320000000334512264261473020071 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 1999 Paolo Nenzi **********/ /* */ #ifndef ngspice_TRCVDEFS_H #define ngspice_TRCVDEFS_H #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" #include "ngspice/gendefs.h" /* * structures used to describe D.C. transfer curve analyses to * be performed. */ #define TRCVNESTLEVEL 2 /* depth of nesting of curves - 2 for spice2 */ /* PN: The following define is for temp sweep */ /* Courtesy of: Serban M. Popescu */ #ifndef TEMP_CODE #define TEMP_CODE 1023 #endif typedef struct { int JOBtype; JOB *JOBnextJob; char *JOBname; double TRCVvStart[TRCVNESTLEVEL]; /* starting voltage/current */ double TRCVvStop[TRCVNESTLEVEL]; /* ending voltage/current */ double TRCVvStep[TRCVNESTLEVEL]; /* voltage/current step */ double TRCVvSave[TRCVNESTLEVEL]; /* voltage of this source BEFORE * analysis-to restore when done */ int TRCVgSave[TRCVNESTLEVEL]; /* dcGiven flag; as with vSave */ IFuid TRCVvName[TRCVNESTLEVEL]; /* source being varied */ GENinstance *TRCVvElt[TRCVNESTLEVEL]; /* pointer to source */ int TRCVvType[TRCVNESTLEVEL]; /* type of element being varied */ int TRCVset[TRCVNESTLEVEL]; /* flag to indicate this nest level used */ int TRCVnestLevel; /* number of levels of nesting called for */ int TRCVnestState; /* iteration state during pause */ } TRCV; #define DCT_START1 1 #define DCT_STOP1 2 #define DCT_STEP1 3 #define DCT_NAME1 4 #define DCT_TYPE1 5 #define DCT_START2 6 #define DCT_STOP2 7 #define DCT_STEP2 8 #define DCT_NAME2 9 #define DCT_TYPE2 10 #endif ngspice-26/src/include/ngspice/ifsim.h0000644000265600020320000004302212264261473017354 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Thomas L. Quarles **********/ #ifndef ngspice_IFSIM_H #define ngspice_IFSIM_H #include "ngspice/typedefs.h" /* gtri - add - wbk - 10/11/90 - for structs referenced in IFdevice */ #ifdef XSPICE #include "ngspice/mifparse.h" #include "ngspice/mifcmdat.h" #endif /* gtri - end - wbk - 10/11/90 */ /* * structure: IFparm * * * The structure used to describe all values passed * between the front end and the simulator when there is any * possibility one argument of the function could have more * than one type. * * keyword is provided for the front end and is the token * the user is expected to label the data with. * * id is an integer intended to uniquely identify the parameter * to the simulator * * dataType is an integer which indicates the type of argument * that must be passed for this parameter * * description is a longer description intended for help menus * the description should all fit on one line, but should * give a knowledgable user a good idea what the parameter is * used for. */ struct IFparm { char *keyword; int id; int dataType; char *description; }; /* * datatype: IFuid * * unique identifier for all name-type data in the simulator. * this permits the front end to use something other than * a unique, fully qualified character string to identify * an object. * */ /* moved to "typedefs.h" * typedef char *IFuid; */ /* * * types for IFnewUid * */ #define UID_ANALYSIS 0x1 #define UID_TASK 0x2 #define UID_INSTANCE 0x4 #define UID_MODEL 0x8 #define UID_SIGNAL 0x10 #define UID_OTHER 0x20 /* * dataType values: * * Note: These structures are put together by ORing together the * appropriate bits from the fields below as is shown for the vector * types. * IF_REQUIRED indicates that the parameter must be specified. * The front end does not NEED to check for this, but can to save time, * since failure to do so will cause the simulator to fail. * IF_SET indicates that the specified item is an input parameter. * IF_ASK indicates that the specified item is something the simulator * can provide information about. * IF_SET and IF_ASK are NOT mutually exclusive. * if IF_SET and IF_ASK are both zero, it indicates a parameter that * the simulator recoginizes are being a reasonable paremeter, but * which this simulator does not implement. */ #define IF_FLAG 0x1 #define IF_INTEGER 0x2 #define IF_REAL 0x4 #define IF_COMPLEX 0x8 #define IF_NODE 0x10 #define IF_STRING 0x20 #define IF_INSTANCE 0x40 #define IF_PARSETREE 0x80 /* indicates that for a query the integer field will have a selector * in it to pick a sub-field */ #define IF_SELECT 0x800 #define IF_VSELECT 0x400 /* indicates a vector of the specified type */ #define IF_VECTOR 0x8000 #define IF_FLAGVEC (IF_FLAG|IF_VECTOR) #define IF_INTVEC (IF_INTEGER|IF_VECTOR) #define IF_REALVEC (IF_REAL|IF_VECTOR) #define IF_CPLXVEC (IF_COMPLEX|IF_VECTOR) #define IF_NODEVEC (IF_NODE|IF_VECTOR) #define IF_STRINGVEC (IF_STRING|IF_VECTOR) #define IF_INSTVEC (IF_INSTANCE|IF_VECTOR) #define IF_REQUIRED 0x4000 #define IF_VARTYPES 0x80ff #define IF_SET 0x2000 #define IF_ASK 0x1000 /* If you AND with IF_UNIMP_MASK and get 0, it is recognized, but not * implemented */ #define IF_UNIMP_MASK (~0xfff) /* Used by sensetivity to check if a parameter is or is not useful */ #define IF_REDUNDANT 0x0010000 #define IF_PRINCIPAL 0x0020000 #define IF_AC 0x0040000 #define IF_AC_ONLY 0x0080000 #define IF_NOISE 0x0100000 #define IF_NONSENSE 0x0200000 #define IF_SETQUERY 0x0400000 #define IF_ORQUERY 0x0800000 #define IF_CHKQUERY 0x1000000 /* For "show" command: do not print value in a table by default */ #define IF_UNINTERESTING 0x2000000 /* Structure: IFparseTree * * This structure is returned by the parser for a IF_PARSETREE valued * parameter and describes the information that the simulator needs * to know about the parse tree in order to use it. * It is expected that the front end will have a more extensive * structure which this structure will be a prefix of. * * Note that the function pointer is provided as a hook for * versions which may want to compile code for the parse trees * if they are used heavily. * */ struct IFparseTree { int numVars; /* number of variables used */ int *varTypes; /* array of types of variables */ IFvalue *vars; /* array of structures describing values */ int (*IFeval) (IFparseTree *, double, double *, double *, double *); /* function to call to get evaluated */ }; /* * Structure: IFvalue * * structure used to pass the values corresponding to the above * dataType. All types are passed in one of these structures, with * relatively simple rules concerning the handling of the structure. * * whoever makes the subroutine call allocates a single instance of the * structure. The basic data structure belongs to you, and you * should arrange to free it when appropriate. * * The responsibilities of the data supplier are: * Any vectors referenced by the structure are to be tmalloc()'d * and are assumed to have been turned over to the recipient and * thus should not be re-used or tfree()'d. * * The responsibilities of the data recipient are: * scalar valued data is to be copied by the recipient * vector valued data is now the property of the recipient, * and must be tfree()'d when no longer needed. * * Character strings are a special case: Since it is assumed * that all character strings are directly descended from input * tokens, it is assumed that they are static, thus nobody * frees them until the circuit is deleted, when the front end * may do so. * * EVERYBODY's responsibility is to be SURE that the right data * is filled in and read out of the structure as per the IFparm * structure describing the parameter being passed. Programs * neglecting this rule are fated to die of data corruption * */ /* * Some preliminary definitions: * * IFnode's are returned by the simulator, thus we don't really * know what they look like, just that we get to carry pointers * to them around all the time, and will need to save them occasionally * */ typedef void *IFnode; /* * and of course, the standard complex data type */ struct IFcomplex { double real; double imag; }; union IFvalue { int iValue; /* integer or flag valued data */ double rValue; /* real valued data */ IFcomplex cValue; /* complex valued data */ char *sValue; /* string valued data */ IFuid uValue; /* UID valued data */ CKTnode *nValue; /* node valued data */ IFparseTree *tValue; /* parse tree */ struct { int numValue; /* length of vector */ union { int *iVec; /* pointer to integer vector */ double *rVec; /* pointer to real vector */ IFcomplex *cVec;/* pointer to complex vector */ char **sVec; /* pointer to string vector */ IFuid *uVec; /* pointer to UID vector */ IFnode *nVec; /* pointer to node vector */ } vec; } v; }; /* * structure: IFdevice * * This structure contains all the information available to the * front end about a particular device. The simulator will * present the front end with an array of pointers to these structures * which it will use to determine legal device types and parameters. * * Note to simulators: you are passing an array of pointers to * these structures, so you may in fact make this the first component * in a larger, more complex structure which includes other data * which you need, but which is not needed in the common * front end interface. * */ struct IFdevice { char *name; /* name of this type of device */ char *description; /* description of this type of device */ int *terms; /* number of terminals on this device */ int *numNames; /* number of names in termNames */ char **termNames; /* pointer to array of pointers to names */ /* array contains 'terms' pointers */ int *numInstanceParms; /* number of instance parameter descriptors */ IFparm *instanceParms; /* array of instance parameter descriptors */ int *numModelParms; /* number of model parameter descriptors */ IFparm *modelParms; /* array of model parameter descriptors */ /* gtri - modify - wbk - 10/11/90 - add entries to hold data required */ /* by new parser */ #ifdef XSPICE void (*cm_func) (Mif_Private_t *); /* pointer to code model function */ int num_conn; /* number of code model connections */ Mif_Conn_Info_t *conn; /* array of connection info for mif parser */ int num_param; /* number of parameters = numModelParms */ Mif_Param_Info_t *param; /* array of parameter info for mif parser */ int num_inst_var; /* number of instance vars = numInstanceParms */ Mif_Inst_Var_Info_t *inst_var; /* array of instance var info for mif parser */ /* gtri - end - wbk - 10/11/90 */ #endif int flags; /* DEV_ */ }; /* * Structure: IFanalysis * * This structure contains all the information available to the * front end about a particular analysis type. The simulator will * present the front end with an array of pointers to these structures * which it will use to determine legal analysis types and parameters. * * Note to simulators: As for IFdevice above, you pass an array of pointers * to these, so you can make this structure a prefix to a larger structure * which you use internally. * */ struct IFanalysis { char *name; /* name of this analysis type */ char *description; /* description of this type of analysis */ int numParms; /* number of analysis parameter descriptors */ IFparm *analysisParms; /* array of analysis parameter descriptors */ }; /* * Structure: IFsimulator * * This is what we have been leading up to all along. * This structure describes a simulator to the front end, and is * returned from the SIMinit command to the front end. * This is where all those neat structures we described in the first * few hundred lines of this file come from. * */ struct IFsimulator { char *simulator; /* the simulator's name */ char *description; /* description of this simulator */ char *version; /* version or revision level of simulator*/ int (*newCircuit) (CKTcircuit **); /* create new circuit */ int (*deleteCircuit) (CKTcircuit *); /* destroy old circuit's data structures*/ int (*newNode) (CKTcircuit *, CKTnode **, IFuid); /* create new node */ int (*groundNode) (CKTcircuit *, CKTnode **, IFuid); /* create ground node */ int (*bindNode) (CKTcircuit *, GENinstance *, int, CKTnode *); /* bind a node to a terminal */ int (*findNode) (CKTcircuit *, CKTnode **, IFuid); /* find a node by name */ int (*instToNode) (CKTcircuit *, void *, int, void **, IFuid *); /* find the node attached to a terminal */ int (*setNodeParm) (CKTcircuit *, CKTnode *, int, IFvalue *, IFvalue *); /* set a parameter on a node */ int (*askNodeQuest) (CKTcircuit *, CKTnode *, int, IFvalue *, IFvalue *); /* ask a question about a node */ int (*deleteNode) (CKTcircuit *, CKTnode *); /* delete a node from the circuit */ int (*newInstance) (CKTcircuit *, GENmodel *, GENinstance **, IFuid); /* create new instance */ int (*setInstanceParm) (CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); /* set a parameter on an instance */ int (*askInstanceQuest) (CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *); /* ask a question about an instance */ GENinstance *(*findInstance) (CKTcircuit *, IFuid); /* find a specific instance */ int (*deleteInstance) (CKTcircuit *, void *); /* delete an instance from the circuit */ int (*newModel) (CKTcircuit *, int, GENmodel **, IFuid); /* create new model */ int (*setModelParm) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *); /* set a parameter on a model */ int (*askModelQuest) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *); /* ask a questions about a model */ GENmodel *(*findModel) (CKTcircuit *, IFuid); /* find a specific model */ int (*deleteModel) (CKTcircuit *, GENmodel *); /* delete a model from the circuit*/ int (*newTask) (CKTcircuit *, TSKtask **, IFuid, TSKtask **); /*CDHW*/ /* create a new task */ int (*newAnalysis) (CKTcircuit *, int, IFuid, JOB **, TSKtask *); /* create new analysis within a task */ int (*setAnalysisParm) (CKTcircuit *, JOB *, int, IFvalue *, IFvalue *); /* set a parameter on an analysis */ int (*askAnalysisQuest) (CKTcircuit *, JOB *, int, IFvalue *, IFvalue *); /* ask a question about an analysis */ int (*findAnalysis) (CKTcircuit *, int *, JOB **, IFuid, TSKtask *, IFuid); /* find a specific analysis */ int (*findTask) (CKTcircuit *, TSKtask **, IFuid); /* find a specific task */ int (*deleteTask) (CKTcircuit *, TSKtask *); /* delete a task */ int (*doAnalyses) (CKTcircuit *, int, TSKtask *); char *(*nonconvErr) (CKTcircuit *, char *); /* return nonconvergence error */ int numDevices; /* number of device types supported */ IFdevice **devices; /* array of device type descriptors */ int numAnalyses; /* number of analysis types supported */ IFanalysis **analyses; /* array of analysis type descriptors */ int numNodeParms; /* number of node parameters supported */ IFparm *nodeParms; /* array of node parameter descriptors */ int numSpecSigs; /* number of special signals legal in parse trees */ char **specSigs; /* names of special signals legal in parse trees */ }; /* * Structure: IFfrontEnd * * This structure provides the simulator with all the information * it needs about the front end. This is the entire set of * front end and back end related routines the simulator * should know about. * */ struct IFfrontEnd { int (*IFnewUid) (CKTcircuit *, IFuid *, IFuid, char *, int, CKTnode **); /* create a new UID in the circuit */ int (*IFdelUid) (CKTcircuit *, IFuid, int); /* create a new UID in the circuit */ int (*IFpauseTest) (void); /* should we stop now? */ double (*IFseconds) (void); /* what time is it? */ int (*IFerror) (int, char *, IFuid *); /* output an error or warning message */ int (*OUTpBeginPlot) (CKTcircuit *, JOB *, IFuid, IFuid, int, int, IFuid *, int, runDesc **); /* start pointwise output plot */ int (*OUTpData) (runDesc *, IFvalue *, IFvalue *); /* data for pointwise plot */ int (*OUTwBeginPlot) (CKTcircuit *, JOB *, IFuid, IFuid, int, int, IFuid *, int, runDesc **); /* start windowed output plot */ int (*OUTwReference) (runDesc *, IFvalue *, void **); /* independent vector for windowed plot */ int (*OUTwData) (runDesc *, int, IFvalue *, void *); /* data for windowed plot */ int (*OUTwEnd) (runDesc *); /* signal end of windows */ int (*OUTendPlot) (runDesc *); /* end of plot */ int (*OUTbeginDomain) (runDesc *, IFuid, int, IFvalue *); /* start nested domain */ int (*OUTendDomain) (runDesc *); /* end nested domain */ int (*OUTattributes) (runDesc *, IFuid, int, IFvalue *); /* specify output attributes of node */ }; /* flags for the first argument to IFerror */ #define ERR_WARNING 0x1 #define ERR_FATAL 0x2 #define ERR_PANIC 0x4 #define ERR_INFO 0x8 /* valid values for the second argument to doAnalyses */ /* continue the analysis from where we left off */ #define RESUME 0 /* start everything over from the beginning of this task*/ #define RESTART 1 /* abandon the current analysis and go on the the next in the task*/ #define SKIPTONEXT 2 #define OUT_SCALE_LIN 1 #define OUT_SCALE_LOG 2 #endif ngspice-26/src/include/ngspice/sperror.h0000644000265600020320000000305112264261473017737 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_SPERROR_H #define ngspice_SPERROR_H #include "ngspice/iferrmsg.h" /* * definitions for error codes returned by SPICE3 routines. */ #define E_INTERN E_PANIC #define E_BADMATRIX (E_PRIVATE+1)/* ill-formed matrix can't be decomposed */ #define E_SINGULAR (E_PRIVATE+2) /* matrix is singular */ #define E_ITERLIM (E_PRIVATE+3) /* iteration limit reached,operation aborted */ #define E_ORDER (E_PRIVATE+4) /* integration order not supported */ #define E_METHOD (E_PRIVATE+5) /* integration method not supported */ #define E_TIMESTEP (E_PRIVATE+6) /* timestep too small */ #define E_XMISSIONLINE (E_PRIVATE+7) /* transmission line in pz analysis */ #define E_MAGEXCEEDED (E_PRIVATE+8) /* pole-zero magnitude too large */ #define E_SHORT (E_PRIVATE+9) /* pole-zero input or output shorted */ #define E_INISOUT (E_PRIVATE+10) /* pole-zero input is output */ #define E_ASKCURRENT (E_PRIVATE+11) /* ac currents cannot be ASKed */ #define E_ASKPOWER (E_PRIVATE+12) /* ac powers cannot be ASKed */ #define E_NODUNDEF (E_PRIVATE+13) /* node not defined in noise anal */ #define E_NOACINPUT (E_PRIVATE+14) /* no ac input src specified for noise */ #define E_NOF2SRC (E_PRIVATE+15) /* no source at F2 for IM disto analysis */ #define E_NODISTO (E_PRIVATE+16) /* no distortion analysis - NODISTO defined */ #define E_NONOISE (E_PRIVATE+17) /* no noise analysis - NONOISE defined */ const char *SPerror(int type); #endif ngspice-26/src/include/ngspice/1-f-code.h0000644000265600020320000000477712264261473017556 0ustar andreasadmin extern double drand(void); extern double exprand(double); extern int poisson(double); extern double gauss0(void); void f_alpha(int n_pts, int n_exp, double X[], double Q_d, double alpha); void rvfft(float X[], unsigned long int n); #define TRNOISE_STATE_MEM_LEN 4 struct trnoise_state { double points[TRNOISE_STATE_MEM_LEN]; size_t top; double NA, TS, NAMP, NALPHA, RTSAM, RTSCAPT, RTSEMT; double *oneof; size_t oneof_length; double RTScapTime, RTSemTime; bool RTS; }; struct trrandom_state { double value; int rndtype; double TS, TD, PARAM1, PARAM2; }; struct trnoise_state *trnoise_state_init(double NA, double TS, double NALPHA, double NAMP, double RTSAM, double RTSCAPT, double RTSEMT); struct trrandom_state *trrandom_state_init(int rndtype, double TS, double TD, double PARAM1, double PARAM2); void trnoise_state_gen(struct trnoise_state *this, CKTcircuit *ckt); void trnoise_state_free(struct trnoise_state *this); static inline void trnoise_state_push(struct trnoise_state *this, double val) { this->points[this->top++ % TRNOISE_STATE_MEM_LEN] = val; } static inline double trnoise_state_get(struct trnoise_state *this, CKTcircuit *ckt, size_t index) { while(index >= this->top) trnoise_state_gen(this, ckt); if(index + TRNOISE_STATE_MEM_LEN < this->top) { fprintf(stderr, "ouch, trying to fetch from the past %d %d\n", (int)index, (int)this->top); exit(1); } return this->points[index % TRNOISE_STATE_MEM_LEN]; } static inline double trrandom_state_get(struct trrandom_state *this) { double param1 = this->PARAM1; double param2 = this->PARAM2; switch (this->rndtype) { case 1: /* param1: range -param1[ ... +param1[ (default = 1) param2: offset (default = 0) */ return (param1 * drand() + param2); break; case 2: /* param1: standard deviation (default = 1) param2: mean (default = 0) */ return param1 * gauss0() + param2; break; case 3: /* param1: mean (default = 1) param2: offset (default = 0) */ return exprand(param1) + param2; break; case 4: /* param1: lambda (default = 1) param2: offset (default = 0) */ return (double)poisson(param1) + param2; break; default: return 0.0; break; } } ngspice-26/src/include/ngspice/ciderinp.h0000644000265600020320000000254612264261473020050 0ustar andreasadmin/* * ciderinp.h * * CIDER input library header */ #ifndef ngspice_CIDERINP_H #define ngspice_CIDERINP_H /* externals for bdryset.c */ extern int BDRYcheck(BDRYcard *, DOMNdomain *); extern int BDRYsetup(BDRYcard *, MESHcoord *, MESHcoord *, DOMNdomain *); /* externals for contset.c */ extern int CONTcheck(CONTcard *); extern int CONTsetup(CONTcard *, ELCTelectrode *); /* externals for domnset.c */ extern int DOMNcheck(DOMNcard *, MaterialInfo *); extern int DOMNsetup(DOMNcard *,DOMNdomain **, MESHcoord *, MESHcoord *, MaterialInfo *); /* externals for dopset.c */ extern int DOPcheck(DOPcard *, MESHcoord *, MESHcoord *); extern int DOPsetup(DOPcard *, DOPprofile **, DOPtable **, MESHcoord *, MESHcoord *); /* externals for elctset.c */ extern int ELCTcheck(ELCTcard *); extern int ELCTsetup(ELCTcard *, ELCTelectrode **, MESHcoord *, MESHcoord *); /* externals for matlset.c */ extern int MATLcheck(MATLcard *); extern int MATLsetup(MATLcard *, MaterialInfo **); /* externals for mobset.c */ extern int MOBcheck(MOBcard *, MaterialInfo *); extern int MOBsetup(MOBcard *, MaterialInfo *); /* externals for modlset.c */ extern int MODLcheck(MODLcard *); extern int MODLsetup(MODLcard *); /* externals for outpset.c */ extern int OUTPcheck(OUTPcard *); extern int OUTPsetup(OUTPcard *); #endif ngspice-26/src/include/ngspice/fteoptdefs.h0000644000265600020320000000127612264261473020415 0ustar andreasadmin/********** Author: 2010 Paolo Nenzi **********/ #ifndef ngspice_FTEOPTDEFS_H #define ngspice_FTEOPTDEFS_H /* Structure used to describe the frontend statistics to be collected */ /* This is similar to the STATististics in optdefs.h but collects */ /* statistics pertaining to ngspice frontend */ typedef struct sFTESTATistics { int FTESTATdeckNumLines; /* number of lines in spice deck */ double FTESTATnetLoadTime; /* total time required to load the spice deck */ double FTESTATnetParseTime; /* total time required to parse the netlist */ } FTESTATistics; #define FTEOPT_NLDECK 1 #define FTEOPT_NLT 2 #define FTEOPT_NPT 3 #endif ngspice-26/src/include/ngspice/miftypes.h0000644000265600020320000001036412264261473020110 0ustar andreasadmin#ifndef ngspice_MIFTYPES_H #define ngspice_MIFTYPES_H /* =========================================================================== FILE MIFtypes.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains typedefs shared by several header files in the MIF package. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ /* ***************************************************************************** */ typedef int Mif_Boolean_t; #define MIF_FALSE 0 #define MIF_TRUE 1 typedef int Mif_Status_t; #define MIF_OK 0 #define MIF_ERROR 1 /* typedef enum { MIF_OK, MIF_ERROR, } Mif_Status_t; */ /* ***************************************************************************** */ /* * The type of call to a code model - analog or event-driven */ typedef enum { MIF_ANALOG, /* Analog call */ MIF_EVENT_DRIVEN, /* Event-driven call */ } Mif_Call_Type_t; /* * Analysis type enumerations */ typedef enum { MIF_DC, /* A DC or DCOP analysis */ MIF_AC, /* A swept AC analysis */ MIF_TRAN, /* A transient analysis */ } Mif_Analysis_t; /* * Port type enumerations */ typedef enum { MIF_VOLTAGE, /* v - Single-ended voltage */ MIF_DIFF_VOLTAGE, /* vd - Differential voltage */ MIF_CURRENT, /* i - Single-ended current */ MIF_DIFF_CURRENT, /* id - Differential current */ MIF_VSOURCE_CURRENT, /* vnam - Voltage source current */ MIF_CONDUCTANCE, /* g - Single-ended VCIS */ MIF_DIFF_CONDUCTANCE, /* gd - Differential VCIS */ MIF_RESISTANCE, /* h - Single-ended ICVS */ MIF_DIFF_RESISTANCE, /* hd - Differential ICVS */ MIF_DIGITAL, /* d - Digital */ MIF_USER_DEFINED, /* - Any user defined type */ } Mif_Port_Type_t; /* * The direction of a connector */ typedef enum { MIF_IN, /* Input only */ MIF_OUT, /* Output only */ MIF_INOUT, /* Input and output (e.g. g or h type) */ } Mif_Dir_t; /* * The type of a parameter */ typedef enum { MIF_BOOLEAN, MIF_INTEGER, MIF_REAL, MIF_COMPLEX, MIF_STRING, } Mif_Data_Type_t; /* * The type of a token */ typedef enum { MIF_LARRAY_TOK, MIF_RARRAY_TOK, MIF_LCOMPLEX_TOK, MIF_RCOMPLEX_TOK, MIF_PERCENT_TOK, MIF_TILDE_TOK, MIF_STRING_TOK, MIF_NULL_TOK, MIF_NO_TOK, } Mif_Token_Type_t; /* * Type of controlled source */ typedef enum { MIF_VCVS, MIF_VCIS, MIF_ICVS, MIF_ICIS, MIF_minus_one, } Mif_Cntl_Src_Type_t; /* ***************************************************************************** */ /* * Complex numbers */ typedef struct { double real; double imag; } Mif_Complex_t; /* * Values of different types used by the load, ... routines */ typedef union { Mif_Boolean_t bvalue; /* For digital node value */ int ivalue; /* For integer parameters */ double rvalue; /* For spice node values and real parameters */ Mif_Complex_t cvalue; /* For complex parameters */ char *svalue; /* For string parameters */ void *pvalue; /* For user defined nodes */ } Mif_Value_t; /* * Values of different types used by the parser. Note that this is a structure * instead of a union because we need to do initializations in the ifspec.c files for * the models and unions cannot be initialized in any useful way in C * */ typedef struct { Mif_Boolean_t bvalue; /* For boolean values */ int ivalue; /* For integer values */ double rvalue; /* For real values */ Mif_Complex_t cvalue; /* For complex values */ char *svalue; /* For string values */ } Mif_Parse_Value_t; #endif ngspice-26/src/include/ngspice/tfdefs.h0000644000265600020320000000146212264261473017522 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_TFDEFS_H #define ngspice_TFDEFS_H #include "ngspice/typedefs.h" #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" #include "ngspice/cktdefs.h" /* TFdefs.h - defs for transfer function analyses */ struct TFan { int JOBtype; JOB *JOBnextJob; IFuid JOBname; CKTnode *TFoutPos; CKTnode *TFoutNeg; IFuid TFoutSrc; IFuid TFinSrc; char *TFoutName; /* a printable name for an output v(x,y) */ unsigned int TFoutIsV :1; unsigned int TFoutIsI :1; unsigned int TFinIsV :1; unsigned int TFinIsI :1; }; #define TF_OUTPOS 1 #define TF_OUTNEG 2 #define TF_OUTSRC 3 #define TF_INSRC 4 #define TF_OUTNAME 5 #endif ngspice-26/src/include/ngspice/wordlist.h0000644000265600020320000000247412264261473020122 0ustar andreasadmin#ifndef ngspice_WORDLIST_H #define ngspice_WORDLIST_H /* Doubly linked lists of words. */ struct wordlist { char *wl_word; struct wordlist *wl_next; struct wordlist *wl_prev; } ; typedef struct wordlist wordlist; int wl_length(const wordlist *wlist); void wl_free(wordlist *wlist); wordlist * wl_copy(wordlist *wlist); wordlist * wl_splice(wordlist *elt, wordlist *list); void wl_print(const wordlist *wlist, FILE *fp); wordlist * wl_build(char **v); char ** wl_mkvec(wordlist *wl); wordlist * wl_append(wordlist *wlist, wordlist *nwl); wordlist * wl_reverse(wordlist *wl); char * wl_flatten(wordlist *wl); wordlist * wl_nthelem(int i, wordlist *wl); void wl_sort(wordlist *wl); wordlist * wl_range(wordlist *wl, int low, int up); wordlist *wl_cons(char *word, wordlist *tail); void wl_append_word(wordlist **first, wordlist **last, char *word); wordlist *wl_chop(wordlist *wlist); wordlist *wl_chop_rest(wordlist *wlist); wordlist *wl_find(const char *string, const wordlist *wlist); void wl_delete_slice(wordlist *from, wordlist *to); /* For quoting individual characters. '' strings are all quoted, but * `` and "" strings are maintained as single words with the quotes * around them. Note that this won't work on non-ascii machines. */ #define quote(c) ((c) | 0200) #define strip(c) ((c) & 0177) #endif ngspice-26/src/include/ngspice/ftedev.h0000644000265600020320000000426412264261473017527 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Jeffrey M. Hsu **********/ /* The display device structure. */ #ifndef ngspice_FTEDEV_H #define ngspice_FTEDEV_H struct graph; struct request; struct response; typedef int disp_fn_Init_t (void); typedef int disp_fn_NewViewport_t (struct graph *); typedef int disp_fn_Close_t (void); typedef int disp_fn_Clear_t (void); typedef int disp_fn_DrawLine_t (int x1, int y1, int x2, int y2); typedef int disp_fn_Arc_t (int x0, int y0, int radius, double theta, double delta_theta); typedef int disp_fn_Text_t (char *text, int x, int y); typedef int disp_fn_DefineColor_t (int colorid, double red, double green, double blue); typedef int disp_fn_DefineLinestyle_t (int linestyleid, int mask); typedef int disp_fn_SetLinestyle_t (int linestyleid); typedef int disp_fn_SetColor_t (int colorid); typedef int disp_fn_Update_t (void); typedef int disp_fn_Track_t (void); typedef int disp_fn_MakeMenu_t (void); typedef int disp_fn_MakeDialog_t (void); typedef int disp_fn_Input_t (struct request *request, struct response *response); typedef void disp_fn_DatatoScreen_t (struct graph *graph, double x, double y, int *screenx, int *screeny); typedef struct { char *name; int minx, miny; int width, height; /* in screen coordinate system */ int numlinestyles, numcolors; /* number supported */ disp_fn_Init_t *Init; disp_fn_NewViewport_t *NewViewport; disp_fn_Close_t *Close; disp_fn_Clear_t *Clear; disp_fn_DrawLine_t *DrawLine; disp_fn_Arc_t *DrawArc; disp_fn_Text_t *DrawText; disp_fn_DefineColor_t *DefineColor; disp_fn_DefineLinestyle_t *DefineLinestyle; disp_fn_SetLinestyle_t *SetLinestyle; disp_fn_SetColor_t *SetColor; disp_fn_Update_t *Update; /* int (*NDCtoScreen)(); */ disp_fn_Track_t *Track; disp_fn_MakeMenu_t *MakeMenu; disp_fn_MakeDialog_t *MakeDialog; disp_fn_Input_t *Input; disp_fn_DatatoScreen_t *DatatoScreen; } DISPDEVICE; extern DISPDEVICE *dispdev; #endif ngspice-26/src/include/ngspice/numconst.h0000644000265600020320000001635612264261473020125 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* * Constants used by the numerical simulation routines */ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_NUMCONST_H #define ngspice_NUMCONST_H /* Mathematical Constants */ #ifdef PI #undef PI #endif #define PI 3.14159265358973923846264338327950288419716939937511 #define TWO_PI (2.0 * PI) #define ROOT_TWO 1.41421356237309504880168872420969807856967187537694 /* Basic Physical Constants */ #ifdef CHARGE #undef CHARGE #endif #define CHARGE 1.602191770e-19 /* C */ #define BOLTZMANN_CONSTANT 1.38062259e-23 /* J/oK */ #define VELOCITY_OF_LIGHT 2.997924562e8 /* CM/S */ #define ELECTRON_MASS 9.10955854e-31 /* kG */ #define ZERO_DEGREES_CELSIUS 273.15 /* oK */ #define EPS0 8.854e-14 /* F/CM */ /* Physical Constants of Silicon, GaAs, SiO2, Si3N4 */ #define EPS_REL_SI 11.7 /* ~EPS0 */ #define EPS_SI EPS0 * EPS_REL_SI /* F/CM */ #define EPS_REL_GA 10.9 /* ~EPS0 */ #define EPS_GA EPS0 * EPS_REL_GA /* F/CM */ #define EPS_REL_OX 3.9 /* ~EPS0 */ #define EPS_OX EPS0 * EPS_REL_OX /* F/CM */ #define EPS_REL_NI 7.5 /* ~EPS0 */ #define EPS_NI EPS0 * EPS_REL_NI /* F/CM */ /* Work Function, Affinity, Band & Bandgap Parameters */ #define AFFIN_SI 4.05 /* eV */ #define AFFIN_GA 4.07 /* eV */ #define AFFIN_OX 0.95 /* eV */ #define AFFIN_NI 3.10 /* eV */ #define PHI_METAL 4.10 /* eV */ #define PHI_ALUM 4.10 /* eV */ #define PHI_GOLD 4.75 /* eV */ #define EGAP300_SI 1.1245 /* eV */ #define EGAP300_GA 1.43 /* eV */ #define EGAP300_OX 9.00 /* eV */ #define EGAP300_NI 4.70 /* eV */ #define DGAPDT_SI 4.73e-4 /* eV/oK */ #define DGAPDT_GA 5.405e-4 /* eV/oK */ #define TREF_EG_SI 636.0 /* oK */ #define TREF_EG_GA 204.0 /* oK */ #define NCV_NOM 2.509e19 /* CM^-3 */ #define M_N_SI 1.447 /* ~ELECTRON_MASS */ #define M_P_SI 1.08 /* ~ELECTRON_MASS */ #define M_N_GA 7.05e-2 /* ~ELECTRON_MASS */ #define M_P_GA 0.427 /* ~ELECTRON_MASS */ /* Physical Model Parameters for Silicon and GaAs*/ /* N = electrons, P = holes */ /* Effective Richardson Constants (ref. PISCES) */ #define A_RICH_N_SI 110.0 /* A/CM^2/oK^2 */ #define A_RICH_P_SI 30.0 /* A/CM^2/oK^2 */ #define A_RICH_N_GA 6.2857 /* A/CM^2/oK^2 */ #define A_RICH_P_GA 105.0 /* A/CM^2/oK^2 */ /* Auger Recombination (ref. PISCES, SOLL90) */ #define C_AUG_N_SI 1.8e-31 /* CM^6/S */ #define C_AUG_P_SI 8.3e-32 /* CM^6/S */ #define C_AUG_N_GA 2.8e-31 /* CM^6/S */ #define C_AUG_P_GA 9.9e-32 /* CM^6/S */ /* SRH Recombination (ref. SOLL90) */ #define TAU0_N_SI 3.0e-5 /* S */ #define NSRH_N_SI 1.0e17 /* CM^-3 */ #define S_N_SI 1.0e4 /* CM/S */ #define TAU0_P_SI 1.0e-5 /* S */ #define NSRH_P_SI 1.0e17 /* CM^-3 */ #define S_P_SI 1.0e4 /* CM/S */ #define TAU0_N_GA 1.0e-7 /* S */ #define NSRH_N_GA 5.0e16 /* CM^-3 */ #define S_N_GA 1.0e4 /* CM/S */ #define TAU0_P_GA 1.0e-7 /* S */ #define NSRH_P_GA 5.0e16 /* CM^-3 */ #define S_P_GA 1.0e4 /* CM/S */ /* Bandgap Narrowing (ref. SOLL90) */ #define DGAPDN_N 1.2e-2 /* V */ #define NBGN_N 1.0e18 /* CM^-3 */ #define DGAPDN_P 9.7e-3 /* V */ #define NBGN_P 1.0e17 /* CM^-3 */ /* Mobility Models : */ /* Scharfetter-Gummel (SG) mobility (ref. SCHA69) */ #define SG_MUMAX_N 1400.0 #define SG_MUMIN_N 75.0 #define SG_NTREF_N 3.0e16 #define SG_NTEXP_N 0.5 #define SG_VSAT_N 1.036e7 #define SG_VWARM_N 4.9e6 #define SG_FIT_N 8.8 #define SG_MUMAX_P 480.0 #define SG_MUMIN_P 53.0 #define SG_NTREF_P 4.0e16 #define SG_NTEXP_P 0.5 #define SG_VSAT_P 1.2e7 #define SG_VWARM_P 2.928e6 #define SG_FIT_P 1.6 /* Caughey-Thomas (CT) mobility (ref. CAUG67) */ #define CT_MUMAX_N 1360.0 #define CT_MUMIN_N 92.0 #define CT_NTREF_N 1.3e17 #define CT_NTEXP_N 0.91 #define CT_VSAT_N 1.1e7 #define CT_MUMAX_P 520.0 #define CT_MUMIN_P 65.0 #define CT_NTREF_P 2.4e17 #define CT_NTEXP_P 0.61 #define CT_VSAT_P 9.5e6 /* Arora (AR) mobility (ref. AROR82) */ #define AR_MUMAX_N 1340.0 #define AR_MUMIN_N 88.0 #define AR_NTREF_N 1.26e17 #define AR_NTEXP_N 0.88 #define AR_VSAT_N 1.38e7 #define AR_MUMAX_P 461.3 #define AR_MUMIN_P 54.3 #define AR_NTREF_P 2.35e17 #define AR_NTEXP_P 0.88 #define AR_VSAT_P 9.0e6 /* Minority Carrier mobility (ref. SOLL90) */ /* * These parameters are flawed in that they don't match the majority * carrier mobility when the concentration drops to zero. * Carrier heating effects must be handled by a different model. */ #define UF_MUMAX_N 1412.0 #define UF_MUMIN_N 232.0 #define UF_NTREF_N 8.0e16 #define UF_NTEXP_N 0.9 #define UF_MUMAX_P 500.0 #define UF_MUMIN_P 130.0 #define UF_NTREF_P 8.0e17 #define UF_NTEXP_P 1.25 /* Temperature-Dependence of Arora mobility */ /* Applicable to all above models, but not necessarily accurate. */ #define TD_TREFVS_N 175.0 #define TD_TREFVS_P 312.0 #define TD_EXPMUMAX_N -2.33 #define TD_EXPMUMAX_P -2.23 #define TD_EXPMUMIN_N -0.57 #define TD_EXPMUMIN_P -0.57 #define TD_EXPNTREF_N 2.4 #define TD_EXPNTREF_P 2.4 #define TD_EXPNTEXP_N -0.146 #define TD_EXPNTEXP_P -0.146 /* * Inversion-layers are handled differently. They don't fit into the nice * pattern established above for bulk mobility. */ /* Surface mobility (ref. GATE90) */ #define MUS_N 991.0 /* CM^2/VS */ #define THETAA_N 2.67e-6 /* CM/V */ #define THETAB_N 4.18e-14 /* CM^2/V^2 */ #define SALPHA_N 1.0 / 2.0 /* --- */ #define SBETA_N 1.0 / 2.0 /* --- */ #define MUS_P 240.0 /* CM^2/VS */ #define THETAA_P 3.07e-6 /* CM/V */ #define THETAB_P 0.0 /* CM^2/V^2 */ #define SALPHA_P 2.0 / 3.0 /* --- */ #define SBETA_P 1.0 / 3.0 /* --- */ /* Gallium-Arsenide (GA) mobility (ref. PISCES) */ #define GA_MUMAX_N 5000.0 #define GA_MUMIN_N 50.0 #define GA_NTREF_N 1.0e17 #define GA_NTEXP_N 1.0 #define GA_VSAT_N 7.7e6 #define GA_VWARM_N 2.31e7 #define GA_MUMAX_P 400.0 #define GA_MUMIN_P 40.0 #define GA_NTREF_P 1.0e17 #define GA_NTEXP_P 1.0 #define GA_VSAT_P 7.7e6 #define GA_VWARM_P 2.31e7 /* END OF MOBILITY MODELS */ /* Freeze Out / Incomplete Ionization Parameters */ #define E_ARS_SI 0.049 /* eV (Arsenic) */ #define E_DON_SI 0.044 /* eV (Phosphorus) */ #define E_ACC_SI 0.045 /* eV (Boron) */ #define G_DON_SI 2.0 /* --- */ #define G_ACC_SI 4.0 /* --- */ #define E_DON_GA 0.005 /* eV */ #define E_ACC_GA 0.005 /* eV */ #define G_DON_GA 2.0 /* --- */ #define G_ACC_GA 2.0 /* --- */ /* Impact Ionization / Avalanche Generation Parameters */ /* These are for Silicon. Need better GaAs parameters. */ #define AII_N 7.03e5 #define BII_N 1.231e6 #define AII_P 1.582e6 #define BII_P 2.036e6 /* Default Surface-State / Fixed-Charge Density */ #define NSS 0.0 /* CM^-2 */ /* Default abstol for Poisson and Current-Continuity Equations */ #define DABSTOL1D 1.0e-12 /* --- */ #define DABSTOL2D 1.0e-8 /* --- */ #endif ngspice-26/src/include/ngspice/modldefs.h0000644000265600020320000000265712264261473020053 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_MODLDEFS_H #define ngspice_MODLDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sMODLcard { struct sMODLcard *MODLnextCard; int MODLbandGapNarrowing; int MODLtempDepMobility; int MODLconcDepMobility; int MODLfieldDepMobility; int MODLtransDepMobility; int MODLsurfaceMobility; int MODLmatchingMobility; int MODLsrh; int MODLconcDepLifetime; int MODLauger; int MODLavalancheGen; unsigned int MODLbandGapNarrowingGiven : 1; unsigned int MODLtempDepMobilityGiven : 1; unsigned int MODLconcDepMobilityGiven : 1; unsigned int MODLfieldDepMobilityGiven : 1; unsigned int MODLtransDepMobilityGiven : 1; unsigned int MODLsurfaceMobilityGiven : 1; unsigned int MODLmatchingMobilityGiven : 1; unsigned int MODLsrhGiven : 1; unsigned int MODLconcDepLifetimeGiven : 1; unsigned int MODLaugerGiven : 1; unsigned int MODLavalancheGenGiven : 1; } MODLcard; /* MODL parameters */ #define MODL_BGNW 1 #define MODL_TEMPMOB 2 #define MODL_CONCMOB 3 #define MODL_FIELDMOB 4 #define MODL_TRANSMOB 5 #define MODL_SURFMOB 6 #define MODL_MATCHMOB 7 #define MODL_SRH 8 #define MODL_CONCTAU 9 #define MODL_AUGER 10 #define MODL_AVAL 11 #endif ngspice-26/src/include/ngspice/cpextern.h0000644000265600020320000001074012264261473020076 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified: 2000 AlansFixes **********/ /* * Definitions for all external symbols in CP. */ #ifndef ngspice_CPEXTERN_H #define ngspice_CPEXTERN_H #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include struct ccom; /* com_alias.c */ extern struct alias *cp_aliases; extern void cp_paliases(char *word); extern void cp_setalias(char *word, wordlist *wlist); extern void cp_unalias(char *word); extern wordlist *cp_doalias(wordlist *wlist); /* backquote.c */ extern char cp_back; extern wordlist *cp_bquote(wordlist *wlist); /* complete.c */ extern bool cp_nocc; extern bool cp_comlook(char *word); extern struct ccom *cp_kwswitch(int kw_class, struct ccom *tree); extern void cp_addcomm(char *word, long int bits0, long int bits1, long int bits2, long int bits3); extern void cp_addkword(int kw_class, char *word); extern void cp_ccom(wordlist *wlist, char *buf, bool esc); extern void cp_ccon(bool on); extern void cp_ccrestart(bool kwords); extern void cp_remcomm(char *word); extern void cp_remkword(int kw_class, char *word); extern void cp_destroy_keywords(void); extern wordlist *cp_cctowl(struct ccom *stuff); /* cshpar.c */ extern FILE *cp_in; extern FILE *cp_out; extern FILE *cp_err; extern FILE *cp_curin; extern FILE *cp_curout; extern FILE *cp_curerr; extern bool cp_debug; extern char cp_amp; extern char cp_gt; extern char cp_lt; extern void cp_ioreset(void); extern wordlist *cp_redirect(wordlist *wlist); extern wordlist *cp_parse(char *string); /* control.c */ extern bool cp_cwait; extern bool cp_dounixcom; extern char *cp_csep; extern char * get_alt_prompt(void); extern int cp_evloop(char *string); extern void cp_resetcontrol(void); extern void cp_toplevel(void); extern void cp_popcontrol(void); extern void cp_pushcontrol(void); /* glob.c */ extern bool cp_globmatch(char *p, char *s); extern char *cp_tildexpand(char *string); extern char cp_cbrac; extern char cp_ccurl; extern char cp_comma; extern char cp_huh; extern char cp_obrac; extern char cp_ocurl; extern char cp_star; extern char cp_til; extern wordlist *cp_doglob(wordlist *wlist); /* history.c */ extern bool cp_didhsubst; extern char cp_bang; extern char cp_hat; extern int cp_maxhistlength; extern struct histent *cp_lastone; extern void cp_addhistent(int event, wordlist *wlist); void cp_hprint(int eventhi, int eventlo, bool rev); extern wordlist *cp_histsubst(wordlist *wlist); /* lexical.c */ extern FILE *cp_inp_cur; extern bool cp_bqflag; extern bool cp_interactive; extern char *cp_altprompt; extern char *cp_promptstring; extern char cp_hash; extern int cp_event; extern wordlist *cp_lexer(char *string); extern int inchar(FILE *fp); /* modify.c */ extern char cp_chars[]; extern void cp_init(void); /* output.c */ extern bool out_moremode; extern bool out_isatty; extern void out_init(void); #ifdef __GNUC__ extern void out_printf(char *fmt, ...) __attribute__ ((format (__printf__, 1, 2))); #else extern void out_printf(char *fmt, ...); #endif extern void out_vprintf(const char *fmt, va_list ap); extern void out_send(char *string); /* quote.c */ extern char *cp_unquote(char *string); extern void cp_quoteword(char *str); extern void cp_striplist(wordlist *wlist); extern void cp_wstrip(char *str); /* unixcom.c */ extern bool cp_unixcom(wordlist *wlist); extern void cp_hstat(void); void cp_rehash(char *pathlist, bool docc); /* variable.c */ enum cp_types { CP_BOOL, CP_NUM, CP_REAL, CP_STRING, CP_LIST }; extern bool cp_ignoreeof; extern bool cp_noclobber; extern bool cp_noglob; extern bool cp_nonomatch; extern char cp_dol; extern void cp_remvar(char *varname); extern void cp_vset(char *varname, enum cp_types type, void *value); extern struct variable *cp_setparse(wordlist *wl); extern wordlist *vareval(char *string); extern char *span_var_expr(char *t); /* var2.c */ extern void cp_vprint(void); extern bool cp_getvar(char *name, enum cp_types type, void *retval); /* cpinterface.c etc -- stuff CP needs from FTE */ extern bool cp_istrue(wordlist *wl); extern bool cp_oddcomm(char *s, wordlist *wlist); extern void cp_doquit(void); extern void cp_periodic(void); extern void ft_cpinit(void); extern struct comm *cp_coms; extern char *cp_program; extern struct variable *cp_enqvar(char *word); extern void cp_usrvars(struct variable **v1, struct variable **v2); int cp_usrset(struct variable *var, bool isset); extern void fatal(void); #endif ngspice-26/src/include/ngspice/ipctiein.h0000644000265600020320000000477512264261473020065 0ustar andreasadmin/*============================================================================ FILE IPCtiein.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY Provides a protocol independent interface between the simulator and the IPC method used to interface to CAE packages. INTERFACES REFERENCED FILES None. NON-STANDARD FEATURES None. ============================================================================*/ #ifndef ngspice_IPCTIEIN_H #define ngspice_IPCTIEIN_H #include "ngspice/ipc.h" #include "ngspice/ipcproto.h" #define IPC_STDOUT_FILE_NAME "/usr/tmp/atesse_xspice.out" #define IPC_STDERR_FILE_NAME "/usr/tmp/atesse_xspice.err" /* Ipc_Vtrans_t is used by functions that return results to translate voltage source names to the names of the devices they monitor. This table is built from #VTRANS cards in the incoming deck and is provided for ATESSE 1.0 compatibility. */ typedef struct { int size; /* Size of arrays */ char **vsrc_name; /* Array of voltage source name prefixes */ char **device_name; /* Array of device names the vsources map to */ } Ipc_Vtrans_t; /* Ipc_Tiein_t is used by the SPICE mods that take care of interprocess communications activities. */ typedef struct { Ipc_Boolean_t enabled; /* True if we are using IPC */ Ipc_Mode_t mode; /* INTERACTIVE or BATCH mode */ Ipc_Anal_t anal_type; /* DCOP, AC, ... mode */ Ipc_Boolean_t syntax_error; /* True if error occurred during parsing */ Ipc_Boolean_t run_error; /* True if error occurred during simulation */ Ipc_Boolean_t errchk_sent; /* True if #ERRCHK has been sent */ Ipc_Boolean_t returni; /* True if simulator should return currents */ double mintime; /* Minimum time between timepoints returned */ double last_time; /* Last timepoint returned */ double cpu_time; /* CPU time used during simulation */ Ipc_Boolean_t *send; /* Used by OUTinterface to determine what to send */ char *log_file; /* Path to write log file */ Ipc_Vtrans_t vtrans; /* Used by OUTinterface to translate v sources */ Ipc_Boolean_t stop_analysis; /* True if analysis should be terminated */ } Ipc_Tiein_t; extern Ipc_Tiein_t g_ipc; #endif ngspice-26/src/include/ngspice/graph.h0000644000265600020320000000755712264261473017363 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* This file contains the graph structure. */ #ifndef ngspice_GRAPH_H #define ngspice_GRAPH_H #include "ngspice/typedefs.h" #include "ngspice/grid.h" #include "ngspice/plot.h" #include "ngspice/dvec.h" /* for struct dvec */ struct _keyed; /* Device-independent data structure for plots. */ struct graph { int graphid; struct dveclist *plotdata; /* normalized data */ char *plotname; /* name of plot this graph is in */ int onevalue; /* boolean variable, true if plotting one value against itself (real vs imaginary) */ int degree; /* degree of polynomial interpretation */ int currentcolor; int linestyle; struct { int height, width; } viewport; int viewportxoff; /* x offset of viewport w/in graph */ int viewportyoff; /* y offset of viewport w/in graph */ struct { int xpos; /* x position of graph in screen coord */ int ypos; /* y position of graph in screen coord */ int width; /* width of window on screen */ int height; /* height of window on screen */ } absolute; struct { double xmin, ymin, xmax, ymax; } data; struct { double xmin, ymin, xmax, ymax; /* cache: width = xmax - xmin height = ymax - ymin */ double width, height; } datawindow; /* cache (datawindow size) / (viewport size) */ double aspectratiox, aspectratioy; int ticmarks; /* mark every ticmark'th point */ double *ticdata; int fontwidth, fontheight; /* for use in grid */ PLOTTYPE plottype; /* defined in FTEconstant.h */ struct { GRIDTYPE gridtype; /* defined in FTEconstant.h */ int circular; /* TRUE if circular plot area */ union { struct { char units[16]; /* unit labels */ int spacing, numspace; double distance, lowlimit, highlimit; int mult; int onedec; /* a boolean */ int hacked; /* true if hi - lo already hacked up */ double tenpowmag; double tenpowmagx; int digits; } lin; struct { char units[16]; /* unit labels */ int hmt, lmt, decsp, subs, pp; } log; struct { char units[16]; /* unit labels */ int radius, center; double mrad; int lmt; int hmt, mag; /* added, p.w.h. */ } circular; /* bogus, rework when write polar grids, etc */ } xaxis, yaxis; int xdatatype, ydatatype; int xsized, ysized; double xdelta, ydelta; /* if non-zero, user-specified deltas */ char *xlabel, *ylabel; } grid; int numbuttons; /* number of buttons */ struct { int id; char *message; } *buttons; int buttonsxoff; /* viewportxoff + x size of viewport */ int buttonsyoff; struct { int width, height; char message[161]; /* two lines of text */ } messagebox; int messagexoff; int messageyoff; /* characters the user typed on graph */ /* note: think up better names */ struct _keyed *keyed; /* for zoomin */ char *commandline; /* Space here is allocated by NewViewport and de-allocated by DestroyGraph. */ void *devdep; }; /* characters the user typed on graph */ /* note: think up better names */ struct _keyed { char *text; int x, y; int colorindex; /* index into colors array */ struct _keyed *next; }; #define NEWGRAPH TMALLOC(GRAPH, 1) #define rnd(x) (int) ((x)+0.5) #endif ngspice-26/src/include/ngspice/gendev.h0000644000265600020320000001124312264261473017515 0ustar andreasadmin/********** Copyright 1992 Regents of the University of California. All rights reserved. Authors: 1992 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_GENDEV_H #define ngspice_GENDEV_H #include "ngspice/numenum.h" typedef struct sStatInfo { double setupTime[NUM_STATTYPES]; double loadTime[NUM_STATTYPES]; double orderTime[NUM_STATTYPES]; double factorTime[NUM_STATTYPES]; double solveTime[NUM_STATTYPES]; double updateTime[NUM_STATTYPES]; double checkTime[NUM_STATTYPES]; double miscTime[NUM_STATTYPES]; double totalTime[NUM_STATTYPES]; double lteTime; int numIters[NUM_STATTYPES]; } StatInfo; typedef struct sStatInfo ONEstats; typedef struct sStatInfo TWOstats; typedef struct sStatInfo STATstats; /* Transient analysis information transferred via this structure. */ typedef struct sTranInfo { int method; /* integration method */ int order; /* integration order */ int maxOrder; /* maximum order to be used */ double lteCoeff; /* coefficient for calculating LTE */ double intCoeff[7]; /* array of integration coefficients */ double predCoeff[7]; /* array of predicted coefficients */ double *delta; /* array of the time deltas */ } TranInfo; typedef struct sTranInfo ONEtranInfo; typedef struct sTranInfo TWOtranInfo; /* Mesh coordinates transferred via this structure */ typedef struct sCoordInfo { struct sCoordInfo *next; /* pointer to next mesh info */ int number; /* number/position in list of coordinates */ double location; /* location of node */ } CoordInfo; typedef struct sCoordInfo ONEcoord; typedef struct sCoordInfo TWOcoord; typedef struct sCoordInfo MESHcoord; /* Generic vertex structure */ typedef struct sVertexInfo { struct sVertexInfo *next; /* pointer to next vertex */ int ix; /* the x coordinate */ int iy; /* the y coordinate */ } VertexInfo; typedef struct sVertexInfo ONEvertex; typedef struct sVertexInfo TWOvertex; /* Generic box structure that other box-shaped things are derived from */ typedef struct sBoxInfo { struct sBoxInfo *next; /* pointer to next box */ int ixLo; /* the low x coordinate */ int iyLo; /* the low y coordinate */ int ixHi; /* the high x coordinate */ int iyHi; /* the high y coordinate */ } BoxInfo; typedef struct sBoxInfo ONEbox; typedef struct sBoxInfo TWObox; /* Structure for domains */ typedef struct sDomainInfo { struct sDomainInfo *next; /* pointer to next domain */ int ixLo; /* the low x coordinate */ int iyLo; /* the low y coordinate */ int ixHi; /* the high x coordinate */ int iyHi; /* the high y coordinate */ int id; /* ID number of domain */ int material; /* ID of material used by domain */ } DomainInfo; typedef struct sDomainInfo ONEdomain; typedef struct sDomainInfo TWOdomain; typedef struct sDomainInfo DOMNdomain; /* Structure used for electrodes */ typedef struct sElectrodeInfo { struct sElectrodeInfo *next; /* pointer to next electrode */ int ixLo; /* the low x coordinate */ int iyLo; /* the low y coordinate */ int ixHi; /* the high x coordinate */ int iyHi; /* the high y coordinate */ int id; /* ID number */ double workf; /* electrode work function */ } ElectrodeInfo; typedef struct sElectrodeInfo ONEelectrode; typedef struct sElectrodeInfo TWOelectrode; typedef struct sElectrodeInfo ELCTelectrode; /* Structure used for boundaries and interfaces */ typedef struct sBoundaryInfo { struct sBoundaryInfo *next; /* pointer to next boundary */ int ixLo; /* the low x coordinate */ int iyLo; /* the low y coordinate */ int ixHi; /* the high x coordinate */ int iyHi; /* the high y coordinate */ int domain; /* ID of primary domain */ int neighbor; /* ID of neighbor domain */ double qf; /* fixed charge density */ double sn; /* elec surface recomb velocity */ double sp; /* hole surface recomb velocity */ double layer; /* surface layer width */ } BoundaryInfo; typedef struct sBoundaryInfo ONEboundary; typedef struct sBoundaryInfo TWOboundary; typedef struct sBoundaryInfo BDRYboundary; #endif ngspice-26/src/include/ngspice/mifparse.h0000644000265600020320000001002112264261473020044 0ustar andreasadmin#ifndef ngspice_MIFPARSE_H #define ngspice_MIFPARSE_H /* =========================================================================== FILE MIFparse.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the information structure definitions used by the code model parser to check for valid connections and parameters. Structures of these types are created by the code model preprocessor (cmpp) from the user created ifspec.ifs file. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" /* * Information about a connection used by the parser to error check input */ typedef struct Mif_Conn_Info_s { char *name; /* Name of this connection */ char *description; /* Description of this connection */ Mif_Dir_t direction; /* Is this connection an input, output, or both? */ Mif_Port_Type_t default_port_type; /* The default port type */ char *default_type; /* The default type in string form */ int num_allowed_types; /* The size of the allowed type arrays */ Mif_Port_Type_t *allowed_type; /* The allowed types */ char **allowed_type_str; /* The allowed types in string form */ Mif_Boolean_t is_array; /* True if connection is an array */ Mif_Boolean_t has_lower_bound; /* True if there is an array size lower bound */ int lower_bound; /* Array size lower bound */ Mif_Boolean_t has_upper_bound; /* True if there is an array size upper bound */ int upper_bound; /* Array size upper bound */ Mif_Boolean_t null_allowed; /* True if null is allowed for this connection */ } Mif_Conn_Info_t; /* * Information about a parameter used by the parser to error check input */ typedef struct Mif_Param_Info_s { char *name; /* Name of this parameter */ char *description; /* Description of this parameter */ Mif_Data_Type_t type; /* Is this a real, boolean, string, ... */ Mif_Boolean_t has_default; /* True if there is a default value */ Mif_Parse_Value_t default_value; /* The default value */ Mif_Boolean_t has_lower_limit; /* True if there is a lower limit */ Mif_Parse_Value_t lower_limit; /* The lower limit for this parameter */ Mif_Boolean_t has_upper_limit; /* True if there is a upper limit */ Mif_Parse_Value_t upper_limit; /* The upper limit for this parameter */ Mif_Boolean_t is_array; /* True if parameter is an array */ Mif_Boolean_t has_conn_ref; /* True if parameter is associated with a connector */ int conn_ref; /* The subscript of the associated connector */ Mif_Boolean_t has_lower_bound; /* True if there is an array size lower bound */ int lower_bound; /* Array size lower bound */ Mif_Boolean_t has_upper_bound; /* True if there is an array size upper bound */ int upper_bound; /* Array size upper bound */ Mif_Boolean_t null_allowed; /* True if null is allowed for this parameter */ } Mif_Param_Info_t; /* * Information about an instance parameter used by the parser to error check input */ typedef struct Mif_Inst_Var_Info_s { char *name; /* Name of this instance var */ char *description; /* Description of this instance var */ Mif_Data_Type_t type; /* Is this a real, boolean, string, ... */ Mif_Boolean_t is_array; /* True if instance var is an array */ } Mif_Inst_Var_Info_t; #endif ngspice-26/src/include/ngspice/onemesh.h0000644000265600020320000001170212264261473017703 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * One-Dimensional Element-based Simulation-Mesh Data Structures */ #ifndef ngspice_ONEMESH_H #define ngspice_ONEMESH_H #include "ngspice/material.h" typedef struct sONEelem { struct sONEelem *pElems[2]; /* array to store neighbor elements */ struct sONEnode *pNodes[2]; /* array to store the element nodes */ struct sONEedge *pEdge; /* the edge */ double dx; /* the x length */ double rDx; /* 1 / dx */ int domain; /* domain to which this elem belongs */ int elemType; /* material type of element */ ONEmaterial *matlInfo; /* material information */ double epsRel; /* epsilon of material rel to Semicon */ int evalNodes[2]; /* nodes to be evaluated in elem */ } ONEelem; #define pLeftElem pElems[0] #define pRightElem pElems[1] #define pLeftNode pNodes[0] #define pRightNode pNodes[1] typedef struct sONEedge { double mun; /* electron mobility */ double mup; /* hole mobility */ double dPsi; /* deltaPsi */ double jn; /* electron current */ double jp; /* hole current */ double jd; /* displacement current */ double dJnDpsiP1; /* dJn/dPsi(+1) */ double dJnDn; /* dJnx/dN */ double dJnDnP1; /* dJn/dN(+1) */ double dJpDpsiP1; /* dJpx/dPsi(+1) */ double dJpDp; /* dJpx/dP */ double dJpDpP1; /* dJpxDp(+1) */ double dCBand; /* effective delta conduction band */ double dVBand; /* effective delta valence band */ int edgeState; /* pointer to state vector */ unsigned evaluated : 1; /* flag to indicated evaluated */ } ONEedge; typedef struct sONEnode { double x; /* x location */ int nodeI; /* node x-index */ int poiEqn; /* equation number for equil poisson */ int psiEqn; /* equation number for bias poisson */ int nEqn; /* equation number for n continuity */ int pEqn; /* equation number for p continuity */ int nodeType; /* type of node */ int baseType; /* baseType n or p or none */ double vbe; /* base emitter voltage for BJTs */ struct sONEelem *pElems[2]; /* array of elements */ double psi0; /* equilibrium potential */ double psi; /* electrostatic potential */ double nConc; /* electron conc. */ double pConc; /* hole conc. */ double nie; /* effective intrinsic carrier conc. */ double eg; /* energy gap */ double eaff; /* electron affinity; work phi for metal*/ double tn; /* electron lifetime */ double tp; /* hole lifetime */ double netConc; /* net conc. */ double totalConc; /* total conc. */ double na; /* acceptor conc. */ double nd; /* donor conc. */ double qf; /* fixed charge density */ double nPred; /* predicted electron conc. */ double pPred; /* predicted hole conc. */ double uNet; /* net recombination rate */ double dUdN; /* dU / dN */ double dUdP; /* dU / dP */ double dNdT; /* dN / dT value */ double dPdT; /* dN / dT value */ int nodeState; /* pointer to the state vector */ unsigned evaluated : 1; /* flag to indicated evaluated */ /* sparse matrix pointers. pointers to doubles */ double *fPsiPsiiM1; double *fPsiPsi; double *fPsiPsiiP1; double *fPsiN; double *fPsiP; double *fNPsiiM1; double *fNPsi; double *fNPsiiP1; double *fNNiM1; double *fNN; double *fNNiP1; double *fNPiM1; double *fNP; double *fNPiP1; double *fPPsiiM1; double *fPPsi; double *fPPsiiP1; double *fPPiM1; double *fPP; double *fPPiP1; double *fPNiM1; double *fPN; double *fPNiP1; } ONEnode; #define pLeftElem pElems[0] #define pRightElem pElems[1] #define nodePsi nodeState #define nodeN nodeState+1 #define nodeP nodeState+3 #define edgeDpsi edgeState #define ONEnumNodeStates 5 #define ONEnumEdgeStates 2 #endif ngspice-26/src/include/ngspice/cmconstants.h0000644000265600020320000000164012264261473020601 0ustar andreasadmin#ifndef ngspice_CMCONSTANTS_H #define ngspice_CMCONSTANTS_H /* =========================================================================== FILE CMconstants.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains constants used by code models. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" /***** Define Constants *******************************************/ #define FALSE 0 #define TRUE 1 #define DC MIF_DC #define AC MIF_AC #define TRANSIENT MIF_TRAN #define ANALOG MIF_ANALOG #define EVENT MIF_EVENT_DRIVEN #endif ngspice-26/src/include/ngspice/optdefs.h0000644000265600020320000001104212264261473017706 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #ifndef ngspice_OPTDEFS_H #define ngspice_OPTDEFS_H /* structure used to describe the statistics to be collected */ typedef struct sSTATdevList { struct sSTATdevList *STATnextDev; int modNum; int instNum; } STATdevList; typedef struct { int STATnumIter; /* number of total iterations performed */ int STATtranIter; /* number of iterations for transient analysis */ int STAToldIter; /* number of iterations at the end of the last point */ /* used to compute iterations per point */ int STATtimePts; /* total number of timepoints */ int STATaccepted; /* number of timepoints accepted */ int STATrejected; /* number of timepoints rejected */ int STATtotalDev; /* PN: number of total devices in the netlist */ double STATtotAnalTime; /* total time for all analysis */ double STATloadTime; /* total time spent in device loading */ double STATdecompTime; /* total time spent in LU decomposition */ double STATsolveTime; /* total time spent in F-B subst. */ double STATreorderTime; /* total time spent reordering */ double STATsyncTime; /* total time spent sync'ing after load */ double STATtranTime; /* transient analysis time */ double STATtranDecompTime; /* time spent in transient LU decomposition */ double STATtranSolveTime; /* time spent in transient F-B subst. */ double STATtranLoadTime; /* time spent in transient device loading */ double STATtranTruncTime; /* time spent calculating LTE and new step */ double STATtranSyncTime; /* time spent in transient sync'ing */ double STATacTime; /* AC analysis time */ double STATacDecompTime; /* time spent in AC LU decomposition */ double STATacSolveTime; /* time spent in AC F-B subst. */ double STATacLoadTime; /* time spent in AC device loading */ double STATacSyncTime; /* time spent in transient sync'ing */ STATdevList *STATdevNum; /* PN: Number of instances and models for each device */ } STATistics; #define OPT_GMIN 1 #define OPT_RELTOL 2 #define OPT_ABSTOL 3 #define OPT_VNTOL 4 #define OPT_TRTOL 5 #define OPT_CHGTOL 6 #define OPT_PIVTOL 7 #define OPT_PIVREL 8 #define OPT_TNOM 9 #define OPT_ITL1 10 #define OPT_ITL2 11 #define OPT_ITL3 12 #define OPT_ITL4 13 #define OPT_ITL5 14 #define OPT_DEFL 15 #define OPT_DEFW 16 #define OPT_DEFAD 17 #define OPT_DEFAS 18 #define OPT_BYPASS 19 #define OPT_MAXORD 20 #define OPT_ITERS 21 #define OPT_TRANIT 22 #define OPT_TRANPTS 23 #define OPT_TRANACCPT 24 #define OPT_TRANRJCT 25 #define OPT_TOTANALTIME 26 #define OPT_TRANTIME 27 #define OPT_LOADTIME 28 #define OPT_DECOMP 29 #define OPT_SOLVE 30 #define OPT_TRANDECOMP 31 #define OPT_TRANSOLVE 32 #define OPT_TEMP 33 #define OPT_OLDLIMIT 34 #define OPT_TRANCURITER 35 #define OPT_SRCSTEPS 36 #define OPT_GMINSTEPS 37 #define OPT_MINBREAK 38 #define OPT_NOOPITER 39 #define OPT_EQNS 40 #define OPT_REORDTIME 41 #define OPT_METHOD 42 #define OPT_TRYTOCOMPACT 43 #define OPT_BADMOS3 44 #define OPT_KEEPOPINFO 45 #define OPT_TRANLOAD 46 #define OPT_TRANTRUNC 47 #define OPT_ACTIME 48 #define OPT_ACLOAD 49 #define OPT_ACDECOMP 50 #define OPT_ACSOLVE 51 #define OPT_ORIGNZ 52 #define OPT_FILLNZ 53 #define OPT_TOTALNZ 54 #define OPT_SYNCTIME 58 #define OPT_TRANSYNC 59 #define OPT_ACSYNC 60 /* AlansFixes: It is not possible to use the same numbers of the original Alan code. The following options are all AlansFixes */ #define OPT_GSHUNT 61 /* Original: 48 */ #define OPT_DEFM 62 /* Original: 46 */ #define OPT_GMINFACT 63 /* Original: 47 */ #define OPT_COPYNODESETS 64 /* Original: 49 (NodesetFix) */ #define OPT_NODEDAMPING 65 /* Original: 50 (Node_Damping) */ #define OPT_ABSDV 66 /* Original: 51 (Node_Damping) */ #define OPT_RELDV 67 /* Original: 52 (Node_Damping) */ #define OPT_NOOPAC 68 #ifdef XSPICE /* gtri - begin - wbk - add new options */ #define OPT_ENH_NOOPALTER 100 #define OPT_ENH_RAMPTIME 101 #define OPT_EVT_MAX_EVT_PASSES 102 #define OPT_EVT_MAX_OP_ALTER 103 #define OPT_ENH_CONV_LIMIT 104 #define OPT_ENH_CONV_ABS_STEP 105 #define OPT_ENH_CONV_STEP 106 #define OPT_MIF_AUTO_PARTIAL 107 #define OPT_ENH_RSHUNT 108 /* gtri - end - wbk - add new options */ #endif #define OPT_TOTALDEV 200 /* Total devices in the netlist */ #endif ngspice-26/src/include/ngspice/inpdefs.h0000644000265600020320000001013412264261473017673 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ #ifndef ngspice_INPDEFS_H #define ngspice_INPDEFS_H /* structure declarations used by either/both input package */ #include "ngspice/ifsim.h" #include "ngspice/gendefs.h" #include "ngspice/inpptree.h" typedef struct INPtables INPtables; typedef struct card card; typedef struct INPmodel INPmodel; struct INPtab { char *t_ent; struct INPtab *t_next; }; struct INPnTab { char *t_ent; CKTnode *t_node; struct INPnTab *t_next; }; struct INPtables{ struct INPtab **INPsymtab; struct INPnTab **INPtermsymtab; int INPsize; int INPtermsize; GENmodel *defAmod; GENmodel *defBmod; GENmodel *defCmod; GENmodel *defDmod; GENmodel *defEmod; GENmodel *defFmod; GENmodel *defGmod; GENmodel *defHmod; GENmodel *defImod; GENmodel *defJmod; GENmodel *defKmod; GENmodel *defLmod; GENmodel *defMmod; GENmodel *defNmod; GENmodel *defOmod; GENmodel *defPmod; GENmodel *defQmod; GENmodel *defRmod; GENmodel *defSmod; GENmodel *defTmod; GENmodel *defUmod; GENmodel *defVmod; GENmodel *defWmod; GENmodel *defYmod; GENmodel *defZmod; }; struct card{ int linenum; int linenum_orig; char *line; char *error; card *nextcard; card *actualLine; }; /* structure used to save models in after they are read during pass 1 */ struct INPmodel{ IFuid INPmodName; /* uid of model */ int INPmodType; /* type index of device type */ INPmodel *INPnextModel; /* link to next model */ card *INPmodLine; /* pointer to line describing model */ GENmodel *INPmodfast; /* high speed pointer to model for access */ }; /* listing types - used for debug listings */ #define LOGICAL 1 #define PHYSICAL 2 int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, CKTnode **); int IFdelUid(CKTcircuit *, IFuid, int); int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, GENinstance **, IFsimulator *, int *, IFvalue *); int INPapName(CKTcircuit *, int, JOB *, char *, IFvalue *); void INPcaseFix(char *); char *INPdevParse(char **, CKTcircuit *, int, GENinstance *, double *, int *, INPtables *); char *INPdomodel(CKTcircuit *, card *, INPtables *); void INPdoOpts(CKTcircuit *, JOB *, card *, INPtables *); char *INPerrCat(char *, char *); char *INPstrCat(char *, char *, char *); char *INPerror(int); double INPevaluate(char **, int *, int); char *INPfindLev(char *, int *); char *INPgetMod(CKTcircuit *, char *, INPmodel **, INPtables *); char *INPgetModBin(CKTcircuit *, char *, INPmodel **, INPtables *, char *); int INPgetTok(char **, char **, int); int INPgetNetTok(char **, char **, int); void INPgetTree(char **, INPparseTree **, CKTcircuit *, INPtables *); void INPfreeTree(IFparseTree *); IFvalue *INPgetValue(CKTcircuit *, char **, int, INPtables *); int INPgndInsert(CKTcircuit *, char **, INPtables *, CKTnode **); int INPinsertNofree(char **token, INPtables *tab); int INPinsert(char **, INPtables *); int INPretrieve(char **, INPtables *); int INPremove(char *, INPtables *); INPmodel *INPlookMod(const char *); int INPmakeMod(char *, int, card *); char *INPmkTemp(char *); void INPpas1(CKTcircuit *, card *, INPtables *); void INPpas2(CKTcircuit *, card *, INPtables *, TSKtask *); void INPpas3(CKTcircuit *, card *, INPtables *, TSKtask *, IFparm *, int); int INPpName(char *, IFvalue *, CKTcircuit *, int, GENinstance *); int INPtermInsert(CKTcircuit *, char **, INPtables *, CKTnode **); int INPmkTerm(CKTcircuit *, char **, INPtables *, CKTnode **); int INPtypelook(char *); int INP2dot(CKTcircuit *, INPtables *, card *, TSKtask *, CKTnode *); INPtables *INPtabInit(int); void INPkillMods(void); void INPtabEnd(INPtables *); char * INPfindVer(char *line, char *version); int INPgetStr(char **line, char **token, int gobble); int INPgetTitle(CKTcircuit **ckt, card **data); int INPgetUTok(char **line, char **token, int gobble); int INPgetU2Tok(char **line, char **token, int gobble); int INPremTerm(char *token, INPtables *tab); #endif ngspice-26/src/include/ngspice/complex.h0000644000265600020320000004411512264261473017720 0ustar andreasadmin/* * Copyright (c) 1985 Thomas L. Quarles * Modified: 1999 Paolo Nenzi, 2000 Arno W. Peters */ #ifndef ngspice_COMPLEX_H #define ngspice_COMPLEX_H /* Complex numbers. */ struct ngcomplex { double cx_real; double cx_imag; } ; typedef struct ngcomplex ngcomplex_t; #define realpart(cval) (cval).cx_real #define imagpart(cval) (cval).cx_imag #ifdef CIDER /* From Cider numcomplex.h pn:leave it here until I decide what to do about struct mosAdmittances { ngcomplex_t yIdVdb; ngcomplex_t yIdVsb; ngcomplex_t yIdVgb; ngcomplex_t yIsVdb; ngcomplex_t yIsVsb; ngcomplex_t yIsVgb; ngcomplex_t yIgVdb; ngcomplex_t yIgVsb; ngcomplex_t yIgVgb; }; */ #endif /* * Each expects two arguments for each complex number - a real and an * imaginary part. */ typedef struct { double real; double imag; } SPcomplex; /* * COMPLEX NUMBER DATA STRUCTURE * * >>> Structure fields: * real (realNumber) * The real portion of the number. real must be the first * field in this structure. * imag (realNumber) * The imaginary portion of the number. This field must follow * immediately after real. */ #define spREAL double #if 0 /* Can this be deleted? */ /* Begin `realNumber'. */ typedef spREAL realNumber, *realVector; /* Begin `ComplexNumber'. */ typedef struct { RealNumber Real; RealNumber Imag; } ComplexNumber, *ComplexVector; #endif /* Some defines used mainly in cmath.c. */ #define FTEcabs(d) (((d) < 0.0) ? - (d) : (d)) #define cph(c) (atan2(imagpart(c), (realpart(c)))) #define cmag(c) (sqrt(imagpart(c) * imagpart(c) + realpart(c) * realpart(c))) #define radtodeg(c) (cx_degrees ? ((c) / 3.14159265358979323846 * 180) : (c)) #define degtorad(c) (cx_degrees ? ((c) * 3.14159265358979323846 / 180) : (c)) #define rcheck(cond, name) if (!(cond)) { \ fprintf(cp_err, "Error: argument out of range for %s\n", name); \ return (NULL); } #define cdiv(r1, i1, r2, i2, r3, i3) \ { \ double r, s; \ if (FTEcabs(r2) > FTEcabs(i2)) { \ r = (i2) / (r2); \ s = (r2) + r * (i2); \ (r3) = ((r1) + r * (i1)) / s; \ (i3) = ((i1) - r * (r1)) / s; \ } else { \ r = (r2) / (i2); \ s = (i2) + r * (r2); \ (r3) = (r * (r1) + (i1)) / s; \ (i3) = (r * (i1) - (r1)) / s; \ } \ } #define DC_ABS(a,b) (fabs(a) + fabs(b)) /* * Division among complex numbers */ #define DC_DIVEQ(a,b,c,d) { \ double r,s,x,y;\ if(fabs(c)>fabs(d)) { \ r=(d)/(c);\ s=(c)+r*(d);\ x=((*(a))+(*(b))*r)/s;\ y=((*(b))-(*(a))*r)/s;\ } else { \ r=(c)/(d);\ s=(d)+r*(c);\ x=((*(a))*r+(*(b)))/s;\ y=((*(b))*r-(*(a)))/s;\ }\ (*(a)) = x; \ (*(b)) = y; \ } /* * This is the standard multiplication among complex numbers: * (x+jy)=(a+jb)*(c+jd) * x = ac - bd and y = ad + bc */ #define DC_MULT(a,b,c,d,x,y) { \ *(x) = (a) * (c) - (b) * (d) ;\ *(y) = (a) * (d) + (b) * (c) ;\ } /* * Difference among complex numbers a+jb and c+jd * a = a - c amd b = b - d */ #define DC_MINUSEQ(a,b,c,d) { \ *(a) -= (c) ;\ *(b) -= (d) ;\ } /* * Square root among complex numbers * We need to treat all the cases because the sqrt() function * works only on real numbers. */ #define C_SQRT(A) { \ double _mag, _a; \ if ((A).imag == 0.0) { \ if ((A).real < 0.0) { \ (A).imag = sqrt(-(A).real); \ (A).real = 0.0; \ } else { \ (A).real = sqrt((A).real); \ (A).imag = 0.0; \ } \ } else { \ _mag = sqrt((A).real * (A).real + (A).imag * (A).imag); \ _a = (_mag - (A).real) / 2.0; \ if (_a <= 0.0) { \ (A).real = sqrt(_mag); \ (A).imag /= (2.0 * (A).real); /*XXX*/ \ } else { \ _a = sqrt(_a); \ (A).real = (A).imag / (2.0 * _a); \ (A).imag = _a; \ } \ } \ } /* * This macro calculates the squared modulus of the complex number * and return it as the real part of the same number: * a+jb -> a = (a*a) + (b*b) */ #define C_MAG2(A) (((A).real = (A).real * (A).real + (A).imag * (A).imag), \ (A).imag = 0.0) /* * Two macros to obtain the colpex conjugate of a number, * The first one replace the given complex with the conjugate, * the second sets A as the conjugate of B. */ #define C_CONJ(A) ((A).imag *= -1.0) #define C_CONJEQ(A,B) { \ (A).real = (B.real); \ (A).imag = - (B.imag); \ } /* * Simple assignement */ #define C_EQ(A,B) { \ (A).real = (B.real); \ (A).imag = (B.imag); \ } /* * Normalization ??? * */ #define C_NORM(A,B) { \ if ((A).real == 0.0 && (A).imag == 0.0) { \ (B) = 0; \ } else { \ while (fabs((A).real) > 1.0 || fabs((A).imag) > 1.0) { \ (B) += 1; \ (A).real /= 2.0; \ (A).imag /= 2.0; \ } \ while (fabs((A).real) <= 0.5 && fabs((A).imag) <= 0.5) { \ (B) -= 1; \ (A).real *= 2.0; \ (A).imag *= 2.0; \ } \ } \ } /* * The magnitude of the complex number */ #define C_ABS(A) (sqrt((A).real * (A.real) + (A.imag * A.imag))) /* * Standard arithmetic between complex numbers * */ #define C_MUL(A,B) { \ double TMP1, TMP2; \ TMP1 = (A.real); \ TMP2 = (B.real); \ (A).real = TMP1 * TMP2 - (A.imag) * (B.imag); \ (A).imag = TMP1 * (B.imag) + (A.imag) * TMP2; \ } #define C_MULEQ(A,B,C) { \ (A).real = (B.real) * (C.real) - (B.imag) * (C.imag); \ (A).imag = (B.real) * (C.imag) + (B.imag) * (C.real); \ } #define C_DIV(A,B) { \ double _tmp, _mag; \ _tmp = (A.real); \ (A).real = _tmp * (B.real) + (A).imag * (B.imag); \ (A).imag = - _tmp * (B.imag) + (A.imag) * (B.real); \ _mag = (B.real) * (B.real) + (B.imag) * (B.imag); \ (A).real /= _mag; \ (A).imag /= _mag; \ } #define C_DIVEQ(A,B,C) { \ double _mag; \ (A).real = (B.real) * (C.real) + (B.imag) * (C.imag); \ (A).imag = (B.imag) * (C.real) - (B.real) * (C.imag) ; \ _mag = (C.real) * (C.real) + (C.imag) * (C.imag); \ (A).real /= _mag; \ (A).imag /= _mag; \ } #define C_ADD(A,B) { \ (A).real += (B.real); \ (A).imag += (B.imag); \ } #define C_ADDEQ(A,B,C) { \ (A).real = (B.real) + (C.real); \ (A).imag = (B.imag) + (C.imag); \ } #define C_SUB(A,B) { \ (A).real -= (B.real); \ (A).imag -= (B.imag); \ } #define C_SUBEQ(A,B,C) { \ (A).real = (B.real) - (C.real); \ (A).imag = (B.imag) - (C.imag); \ } #ifndef ngspice_SPDEFS_H /* Macro function that returns the approx absolute value of a complex number. */ #define ELEMENT_MAG(ptr) (ABS((ptr)->real) + ABS((ptr)->imag)) #define CMPLX_ASSIGN_VALUE(cnum, vreal, vimag) \ { (cnum).real = vreal; \ (cnum).imag = vimag; \ } /* Complex assignment statements. */ #define CMPLX_ASSIGN(to,from) \ { (to).real = (from).real; \ (to).imag = (from).imag; \ } #define CMPLX_CONJ_ASSIGN(to,from) \ { (to).real = (from).real; \ (to).imag = -(from).imag; \ } #define CMPLX_NEGATE_ASSIGN(to,from) \ { (to).real = -(from).real; \ (to).imag = -(from).imag; \ } #define CMPLX_CONJ_NEGATE_ASSIGN(to,from) \ { (to).real = -(from).real; \ (to).imag = (from).imag; \ } #define CMPLX_CONJ(a) (a).imag = -(a).imag #define CONJUGATE(a) (a).imag = -(a).imag #define CMPLX_NEGATE(a) \ { (a).real = -(a).real; \ (a).imag = -(a).imag; \ } #define CMPLX_NEGATE_SELF(cnum) \ { (cnum).real = -(cnum).real; \ (cnum).imag = -(cnum).imag; \ } /* Macro that returns the approx magnitude (L-1 norm) of a complex number. */ #define CMPLX_1_NORM(a) (ABS((a).real) + ABS((a).imag)) /* Macro that returns the approx magnitude (L-infinity norm) of a complex. */ #define CMPLX_INF_NORM(a) (MAX (ABS((a).real),ABS((a).imag))) /* Macro function that returns the magnitude (L-2 norm) of a complex number. */ #define CMPLX_2_NORM(a) (sqrt((a).real*(a).real + (a).imag*(a).imag)) /* Macro function that performs complex addition. */ #define CMPLX_ADD(to,from_a,from_b) \ { (to).real = (from_a).real + (from_b).real; \ (to).imag = (from_a).imag + (from_b).imag; \ } /* Macro function that performs addition of a complex and a scalar. */ #define CMPLX_ADD_SELF_SCALAR(cnum, scalar) \ { (cnum).real += scalar; \ } /* Macro function that performs complex subtraction. */ #define CMPLX_SUBT(to,from_a,from_b) \ { (to).real = (from_a).real - (from_b).real; \ (to).imag = (from_a).imag - (from_b).imag; \ } /* Macro function that is equivalent to += operator for complex numbers. */ #define CMPLX_ADD_ASSIGN(to,from) \ { (to).real += (from).real; \ (to).imag += (from).imag; \ } /* Macro function that is equivalent to -= operator for complex numbers. */ #define CMPLX_SUBT_ASSIGN(to,from) \ { (to).real -= (from).real; \ (to).imag -= (from).imag; \ } /* Macro function that multiplies a complex number by a scalar. */ #define SCLR_MULT(to,sclr,cmplx) \ { (to).real = (sclr) * (cmplx).real; \ (to).imag = (sclr) * (cmplx).imag; \ } /* Macro function that multiply-assigns a complex number by a scalar. */ #define SCLR_MULT_ASSIGN(to,sclr) \ { (to).real *= (sclr); \ (to).imag *= (sclr); \ } /* Macro function that multiplies two complex numbers. */ #define CMPLX_MULT(to,from_a,from_b) \ { (to).real = (from_a).real * (from_b).real - \ (from_a).imag * (from_b).imag; \ (to).imag = (from_a).real * (from_b).imag + \ (from_a).imag * (from_b).real; \ } /* Macro function that multiplies a complex number and a scalar. */ #define CMPLX_MULT_SCALAR(to,from, scalar) \ { (to).real = (from).real * scalar; \ (to).imag = (from).imag * scalar; \ } /* Macro function that implements *= for a complex and a scalar number. */ #define CMPLX_MULT_SELF_SCALAR(cnum, scalar) \ { (cnum).real *= scalar; \ (cnum).imag *= scalar; \ } /* Macro function that multiply-assigns a complex number by a scalar. */ #define SCLR_MULT_ASSIGN(to,sclr) \ { (to).real *= (sclr); \ (to).imag *= (sclr); \ } /* Macro function that implements to *= from for complex numbers. */ #define CMPLX_MULT_ASSIGN(to,from) \ { realNumber to_real_ = (to).real; \ (to).real = to_real_ * (from).real - \ (to).imag * (from).imag; \ (to).imag = to_real_ * (from).imag + \ (to).imag * (from).real; \ } /* Macro function that multiplies two complex numbers, the first of which is * conjugated. */ #define CMPLX_CONJ_MULT(to,from_a,from_b) \ { (to).real = (from_a).real * (from_b).real + \ (from_a).imag * (from_b).imag; \ (to).imag = (from_a).real * (from_b).imag - \ (from_a).imag * (from_b).real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a * mult_b */ #define CMPLX_MULT_ADD(to,mult_a,mult_b,add) \ { (to).real = (mult_a).real * (mult_b).real - \ (mult_a).imag * (mult_b).imag + (add).real; \ (to).imag = (mult_a).real * (mult_b).imag + \ (mult_a).imag * (mult_b).real + (add).imag; \ } /* Macro function that subtracts the product of two complex numbers from * another. to = subt - mult_a * mult_b */ #define CMPLX_MULT_SUBT(to,mult_a,mult_b,subt) \ { (to).real = (subt).real - (mult_a).real * (mult_b).real + \ (mult_a).imag * (mult_b).imag; \ (to).imag = (subt).imag - (mult_a).real * (mult_b).imag - \ (mult_a).imag * (mult_b).real; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to = add + mult_a* * mult_b where mult_a* represents mult_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD(to,mult_a,mult_b,add) \ { (to).real = (mult_a).real * (mult_b).real + \ (mult_a).imag * (mult_b).imag + (add).real; \ (to).imag = (mult_a).real * (mult_b).imag - \ (mult_a).imag * (mult_b).real + (add).imag; \ } /* Macro function that multiplies two complex numbers and then adds them * to another. to += mult_a * mult_b */ #define CMPLX_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).real += (from_a).real * (from_b).real - \ (from_a).imag * (from_b).imag; \ (to).imag += (from_a).real * (from_b).imag + \ (from_a).imag * (from_b).real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from another. */ #define CMPLX_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).real -= (from_a).real * (from_b).real - \ (from_a).imag * (from_b).imag; \ (to).imag -= (from_a).real * (from_b).imag + \ (from_a).imag * (from_b).real; \ } /* Macro function that multiplies two complex numbers and then adds them * to the destination. to += from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_ADD_ASSIGN(to,from_a,from_b) \ { (to).real += (from_a).real * (from_b).real + \ (from_a).imag * (from_b).imag; \ (to).imag += (from_a).real * (from_b).imag - \ (from_a).imag * (from_b).real; \ } /* Macro function that multiplies two complex numbers and then subtracts them * from the destination. to -= from_a* * from_b where from_a* represents from_a * conjugate. */ #define CMPLX_CONJ_MULT_SUBT_ASSIGN(to,from_a,from_b) \ { (to).real -= (from_a).real * (from_b).real + \ (from_a).imag * (from_b).imag; \ (to).imag -= (from_a).real * (from_b).imag - \ (from_a).imag * (from_b).real; \ } /* * Macro functions that provide complex division. */ /* Complex division: to = num / den */ #define CMPLX_DIV(to,num,den) \ { realNumber r_, s_; \ if (((den).real >= (den).imag && (den).real > -(den).imag) || \ ((den).real < (den).imag && (den).real <= -(den).imag)) \ { r_ = (den).imag / (den).real; \ s_ = (den).real + r_*(den).imag; \ (to).real = ((num).real + r_*(num).imag)/s_; \ (to).imag = ((num).imag - r_*(num).real)/s_; \ } \ else \ { r_ = (den).real / (den).imag; \ s_ = (den).imag + r_*(den).real; \ (to).real = (r_*(num).real + (num).imag)/s_; \ (to).imag = (r_*(num).imag - (num).real)/s_; \ } \ } /* Complex division and assignment: num /= den */ #define CMPLX_DIV_ASSIGN(num,den) \ { realNumber r_, s_, t_; \ if (((den).real >= (den).imag && (den).real > -(den).imag) || \ ((den).real < (den).imag && (den).real <= -(den).imag)) \ { r_ = (den).imag / (den).real; \ s_ = (den).real + r_*(den).imag; \ t_ = ((num).real + r_*(num).imag)/s_; \ (num).imag = ((num).imag - r_*(num).real)/s_; \ (num).real = t_; \ } \ else \ { r_ = (den).real / (den).imag; \ s_ = (den).imag + r_*(den).real; \ t_ = (r_*(num).real + (num).imag)/s_; \ (num).imag = (r_*(num).imag - (num).real)/s_; \ (num).real = t_; \ } \ } /* Complex reciprocation: to = 1.0 / den */ #define CMPLX_RECIPROCAL(to,den) \ { realNumber r_; \ if (((den).real >= (den).imag && (den).real > -(den).imag) || \ ((den).real < (den).imag && (den).real <= -(den).imag)) \ { r_ = (den).imag / (den).real; \ (to).imag = -r_*((to).real = 1.0/((den).real + r_*(den).imag)); \ } \ else \ { r_ = (den).real / (den).imag; \ (to).real = -r_*((to).imag = -1.0/((den).imag + r_*(den).real));\ } \ } #endif /* ngspice_SPDEF_H */ #endif ngspice-26/src/include/ngspice/trandefs.h0000644000265600020320000000124412264261473020053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_TRANDEFS_H #define ngspice_TRANDEFS_H #include "ngspice/cktdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" /* * TRANdefs.h - defs for transient analyses */ typedef struct { int JOBtype; JOB *JOBnextJob; char *JOBname; double TRANfinalTime; double TRANstep; double TRANmaxStep; double TRANinitTime; long TRANmode; runDesc *TRANplot; } TRANan; #define TRAN_TSTART 1 #define TRAN_TSTOP 2 #define TRAN_TSTEP 3 #define TRAN_TMAX 4 #define TRAN_UIC 5 #endif ngspice-26/src/include/ngspice/mifcmdat.h0000644000265600020320000002573512264261473020044 0ustar andreasadmin#ifndef ngspice_MIFCMDAT_H #define ngspice_MIFCMDAT_H /* =========================================================================== FILE MIFcmdat.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the data structure definitions used by code model and the associated MIF package. A special preprocessor (cmpp) is used on models written by a user to turn items like INPUT() into the appropriate structure reference. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/typedefs.h" #include "ngspice/miftypes.h" /* ************************************************************************** */ /* * Pointers into matrix for a voltage input, voltage output partial */ typedef struct Mif_E_Ptr_s { double *branch_poscntl; /* Branch row, positive controlling column */ double *branch_negcntl; /* Branch row, negative controlling column */ } Mif_E_Ptr_t; /* * Pointers into matrix for a current input, current output partial */ typedef struct Mif_F_Ptr_s { double *pos_ibranchcntl; /* Positive row, controlling branch column */ double *neg_ibranchcntl; /* Negative row, controlling branch column */ } Mif_F_Ptr_t; /* * Pointers into matrix for a voltage input, current output partial */ typedef struct Mif_G_Ptr_s { double *pos_poscntl; /* Positive row, positive controlling column */ double *pos_negcntl; /* Positive row, negative controlling column */ double *neg_poscntl; /* Negative row, positive controlling column */ double *neg_negcntl; /* Negative row, negative controlling column */ } Mif_G_Ptr_t; /* * Pointers into matrix for a current input, voltage output partial */ typedef struct Mif_H_Ptr_s { double *branch_ibranchcntl; /* Branch row, controlling branch column */ } Mif_H_Ptr_t; /* * Matrix pointers associated with a particular port (of a particular type) */ typedef union Mif_Port_Ptr_u { Mif_E_Ptr_t e; /* Pointers for voltage input, voltage output */ Mif_F_Ptr_t f; /* Pointers for current input, current output */ Mif_G_Ptr_t g; /* Pointers for voltage input, current output */ Mif_H_Ptr_t h; /* Pointers for current input, voltage output */ } Mif_Port_Ptr_t; /* * Array of matrix data pointers for particular ports in a connection */ typedef struct Mif_Conn_Ptr_s { Mif_Port_Ptr_t *port; /* Data for a particular port */ } Mif_Conn_Ptr_t; /* * Row numbers and matrix entry pointers for loading the matrix and RHS with * data appropriate for the particular output port and input ports. */ typedef struct Mif_Smp_Ptr_s { /* Data at this level is for this connection. The Mif_Conn_Ptr_t */ /* subtree is used only if this connection is an output. It supplies */ /* the matrix pointers required for loading the partials from each */ /* input. */ /* node connection equation numbers */ int pos_node; /* Row associated with positive node */ int neg_node; /* Row associated with negative node */ /* V source branch equation numbers */ int branch; /* Row associated with V output branch */ int ibranch; /* Row associated with I input branch */ /* matrix pointers for V source output */ double *pos_branch; /* Positive node row, branch column */ double *neg_branch; /* Negative node row, branch column */ double *branch_pos; /* Branch row, positive node column */ double *branch_neg; /* Branch row, negative node column */ /* matrix pointers for the zero-valued V source associated with an I input */ double *pos_ibranch; /* Positive node row, branch column */ double *neg_ibranch; /* Negative node row, branch column */ double *ibranch_pos; /* Branch row, positive node column */ double *ibranch_neg; /* Branch row, negative node column */ /* array of pointer info required for putting partials into the matrix */ Mif_Conn_Ptr_t *input; /* Matrix pointers associated with inputs */ } Mif_Smp_Ptr_t; /* ******************************************************************** */ /* * Partial derivatives wrt ports of a particular input connection */ typedef struct Mif_Partial_s { double *port; /* Partial wrt this port */ } Mif_Partial_t; /* * AC gains wrt ports of a particular input connection */ typedef struct Mif_AC_Gain_s { Mif_Complex_t *port; /* AC gain wrt this port */ } Mif_AC_Gain_t; /* * Data used to access information in event struct in CKTcircuit struct ckt */ typedef struct { int node_index; /* Index of node in event-driven structures */ int output_subindex; /* Subindex of output on node */ int port_index; /* Index of port in event-driven structures */ int output_index; /* Index of output in event-driven structures */ } Mif_Evt_Data_t; /* * Information about individual port(s) of a connection. */ typedef struct Mif_Port_Data_s { Mif_Port_Type_t type; /* Port type - e.g. MIF_VOLTAGE, ... */ char *type_str; /* Port type in string form */ char *pos_node_str; /* Positive node identifier */ char *neg_node_str; /* Negative node identifier */ char *vsource_str; /* Voltage source identifier */ Mif_Boolean_t is_null; /* Set to true if null in SPICE deck */ Mif_Value_t input; /* The input value */ Mif_Value_t output; /* The output value */ Mif_Partial_t *partial; /* Partials for this port wrt inputs */ Mif_AC_Gain_t *ac_gain; /* AC gains for this port wrt inputs */ int old_input; /* Index into CKTstate for old input */ Mif_Boolean_t invert; /* True if state should be inverted */ Mif_Boolean_t changed; /* A new output has been assigned */ double load; /* Load factor output to this port */ double total_load; /* Total load for this port */ double delay; /* Digital delay for this output port */ char *msg; /* Message string output to port */ Mif_Smp_Ptr_t smp_data; /* Pointers used to load matrix/rhs */ Mif_Evt_Data_t evt_data; /* Data used to access evt struct */ double nominal_output; /* Saved output when doing auto partial */ } Mif_Port_Data_t; /* ******************************************************************** */ /* * Information in MIFinstance struct used by cm_.. support functions. */ typedef struct Mif_State_s { /* for cm_analog_alloc() */ int tag; /* Tag identifying this particular state */ int index; /* Index into ckt->CKTstate[i] vector */ int doubles; /* Number of doubles allocated for this state */ int bytes; /* Actual number of bytes requested by cm_analog_alloc() */ } Mif_State_t; typedef struct Mif_Intgr_s { /* for cm_analog_integrate() */ int byte_index; /* Byte offset into state array */ } Mif_Intgr_t; typedef struct Mif_Conv_s { /* for cm_analog_converge() */ int byte_index; /* Byte offset into state array */ double last_value; /* Value at last iteration */ } Mif_Conv_t; /* ******************************************************************** */ /* * Information about the circuit in which this model is simulating. */ typedef struct Mif_Circ_Data_s { Mif_Boolean_t init; /* True if first call to model - a setup pass */ Mif_Analysis_t anal_type; /* Current analysis type */ Mif_Boolean_t anal_init; /* True if first call in this analysis type */ Mif_Call_Type_t call_type; /* Analog or event type call */ double time; /* Current analysis time */ double frequency; /* Current analysis frequency */ double temperature; /* Current analysis temperature */ double t[8]; /* History of last 8 analysis times t[0]=time */ } Mif_Circ_Data_t; /* * The structure associated with a named "connection" on the model. */ typedef struct Mif_Conn_Data_s { char *name; /* Name of this connection - currently unused */ char *description; /* Description of this connection - unused */ Mif_Boolean_t is_null; /* Set to true if null in SPICE deck */ Mif_Boolean_t is_input; /* Set to true if connection is an input */ Mif_Boolean_t is_output; /* Set to true if connection is an output */ int size; /* The size of an array (1 if scalar) */ Mif_Port_Data_t **port; /* Pointer(s) to port(s) for this connection */ } Mif_Conn_Data_t; /* * Values for model parameters */ typedef struct Mif_Param_Data_s { Mif_Boolean_t is_null; /* True if no value given on .model card */ int size; /* Size of array (1 if scalar) */ Mif_Value_t *element; /* Value of parameter(s) */ } Mif_Param_Data_t; /* * Values for instance variables */ typedef struct Mif_Inst_Var_Data_s { int size; /* Size of array (1 if scalar) */ Mif_Value_t *element; /* Value of instance variables(s) */ } Mif_Inst_Var_Data_t; /* ************************************************************************* */ /* * HERE IT IS!!! * The top level data structure passed to code models. */ typedef struct Mif_Private_s { Mif_Circ_Data_t circuit; /* Information about the circuit */ int num_conn; /* Number of connections on this model */ Mif_Conn_Data_t **conn; /* Information about each connection */ int num_param; /* Number of parameters on this model */ Mif_Param_Data_t **param; /* Information about each parameter */ int num_inst_var; /* Number of instance variables */ Mif_Inst_Var_Data_t **inst_var; /* Information about each inst variable */ } Mif_Private_t; #endif ngspice-26/src/include/ngspice/sen2defs.h0000644000265600020320000000461612264261473017764 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* * SENdefs.h - structures for sensitivity package */ #ifndef ngspice_SEN2DEFS_H #define ngspice_SEN2DEFS_H #include "ngspice/smpdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/typedefs.h" struct SENstruct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ int SENnumVal; /* length of the next two arrays */ char **SENdevices; /* names of the devices to do sensetivity analysis of */ char **SENparmNames;/* parameters of the above devices to do analysis wrt */ unsigned int SENinitflag :1 ; /* indicates whether sensitivity structure*/ /* is to be initialized */ unsigned int SENicflag :1 ; /* indicates whether initial conditions are specified for transient analysis */ unsigned int SENstatus :1; /* indicates whether perturbation is in progress*/ unsigned int SENacpertflag :1; /* indictes whether the perturbation is to be carried out in ac analysis (is done only for first frequency )*/ int SENmode; /* indicates the type of sensitivity analysis reqired: DC, Transient, or AC */ int SENparms; /* # of design parameters */ double SENpertfac; /* perturbation factor (for active devices )*/ double **SEN_Sap; /* sensitivity matrix (DC and transient )*/ double **SEN_RHS; /* RHS matrix (real part) contains the sensitivity values after SMPsolve*/ double **SEN_iRHS; /* RHS matrix (imag part ) contains the sensitivity values after SMPsolve*/ int SENsize; /* stores the number of rows of each of the above three matrices */ SMPmatrix *SEN_Jacmat; /* sensitivity Jacobian matrix, */ double *SEN_parmVal; /* table containing values of design parameters */ char **SEN_parmName; /* table containing names of design parameters */ }; /* SENmode */ #define DCSEN 0x1 #define TRANSEN 0x2 #define ACSEN 0x4 #define NORMAL 0 #define PERTURBATION 1 #define OFF 0 #define ON 1 #define SEN_AC 1 #define SEN_DC 2 #define SEN_TRAN 3 #define SEN_DEV 4 #define SEN_PARM 5 #endif ngspice-26/src/include/ngspice/inpmacs.h0000644000265600020320000000370412264261473017702 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ /* a couple of macros to make much of the input code * much much shorter and easier to handle. * * First, call the simulator function 'func', giving it the arglist * 'args' (must have its own parens!) and check the error returned. * If necessary, get the proper error message and tack it on the current * error */ #define IFC(func, args) \ do { \ error = (*(ft_sim->func)) args; \ if (error) \ current->error = INPerrCat(current->error, INPerror(error)); \ } while(0) /* and one for calling more General functions that still return an * error code as above */ #define GCA(func, args) \ do { \ error = func args; \ if (error) \ current->error = INPerrCat(current->error, INPerror(error)); \ } while(0) /* and one for putting our own error messages onto the current * line's error string */ #define LITERR(text) \ do { \ current->error = INPerrCat(current->error, INPmkTemp(text)); \ } while(0) /* and now a special one for calling INPdevParse which returns an * already concatenated list of error messages or NUL */ #define PARSECALL(args) \ do { \ current->error = INPerrCat(current->error, INPdevParse args); \ } while(0) ngspice-26/src/include/ngspice/cpstd.h0000644000265600020320000000145412264261473017365 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * Standard definitions. This file serves as the header file for std.c and * wlist.c */ #ifndef ngspice_CPSTD_H #define ngspice_CPSTD_H #ifndef FILE /* XXX Bogus */ # include #endif /* FIXME: Split this file and adjust all callers to use new header files */ #if 0 #warning "Please use bool.h, wordlist.h or complex.h rather than cpstd.h" #endif #include "ngspice/bool.h" #include "ngspice/wordlist.h" #include "ngspice/complex.h" /* Externs defined in std.c */ extern char *tildexpand(char *string); extern void printnum(char *buf, double num); extern int cp_numdgt; extern void cp_printword(char *string, FILE *fp); #endif ngspice-26/src/include/ngspice/methdefs.h0000644000265600020320000000212512264261473020043 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_METHDEFS_H #define ngspice_METHDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sMETHcard { struct sMETHcard *METHnextCard; double METHdabstol; double METHdreltol; double METHomega; int METHoneCarrier; int METHacAnalysisMethod; int METHmobDeriv; int METHitLim; int METHvoltPred; unsigned int METHdabstolGiven : 1; unsigned int METHdreltolGiven : 1; unsigned int METHomegaGiven : 1; unsigned int METHoneCarrierGiven : 1; unsigned int METHacAnalysisMethodGiven : 1; unsigned int METHmobDerivGiven : 1; unsigned int METHitLimGiven : 1; unsigned int METHvoltPredGiven : 1; } METHcard; /* METH parameters */ #define METH_DABSTOL 1 #define METH_DRELTOL 2 #define METH_OMEGA 3 #define METH_ONEC 4 #define METH_ACANAL 5 #define METH_NOMOBDERIV 6 #define METH_ITLIM 7 #define METH_VOLTPRED 8 #endif ngspice-26/src/include/ngspice/meshext.h0000644000265600020320000000130412264261473017717 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David A. Gates, U. C. Berkeley CAD Group **********/ /* Member of CIDER device simulator * Version: 1b1 */ /********** Mesh Definitions and Declarations. **********/ #ifndef ngspice_MESHEXT_H #define ngspice_MESHEXT_H #include "ngspice/meshdefs.h" #include "ngspice/gendev.h" extern double *MESHmkArray( MESHcoord *, int ); extern void MESHiBounds( MESHcoord *, int *, int * ); extern void MESHlBounds( MESHcoord *, double *, double * ); extern int MESHlocate( MESHcoord *, double ); extern int MESHcheck( char, MESHcard * ); extern int MESHsetup( char, MESHcard *, MESHcoord **, int * ); #endif ngspice-26/src/include/ngspice/tclspice.h0000644000265600020320000000206312264261473020053 0ustar andreasadmin/*Include file to allow spice to export certain data */ #ifndef ngspice_TCLSPICE_H #define ngspice_TCLSPICE_H extern int steps_completed; extern void blt_init(void *run); extern void blt_add(int index,double value); extern void blt_relink(int index, void* v); extern void blt_lockvec(int index); /* For things to do per loop */ int Tcl_ExecutePerLoop(void); #include "ngspice/graph.h" #include "ngspice/ftedev.h" /* For tk ploting */ disp_fn_Init_t sp_Tk_Init; disp_fn_NewViewport_t sp_Tk_NewViewport; disp_fn_Close_t sp_Tk_Close; disp_fn_Clear_t sp_Tk_Clear; disp_fn_DrawLine_t sp_Tk_DrawLine; disp_fn_Arc_t sp_Tk_Arc; disp_fn_Text_t sp_Tk_Text; disp_fn_DefineColor_t sp_Tk_DefineColor; disp_fn_DefineLinestyle_t sp_Tk_DefineLinestyle; disp_fn_SetLinestyle_t sp_Tk_SetLinestyle; disp_fn_SetColor_t sp_Tk_SetColor; disp_fn_Update_t sp_Tk_Update; /* The blt callback method */ #include "ngspice/dvec.h" extern int blt_plot(struct dvec *y,struct dvec *x,int new); #endif ngspice-26/src/include/ngspice/typedefs.h0000644000265600020320000000165612264261473020077 0ustar andreasadmin/* * forward declaration of important structs * and central typedefs which are not allowed to be repeated */ #ifndef ngspice_TYPEDEFS_H #define ngspice_TYPEDEFS_H typedef struct CKTcircuit CKTcircuit; typedef struct CKTnode CKTnode; typedef struct GENinstance GENinstance; typedef struct GENmodel GENmodel; typedef struct IFparm IFparm; typedef union IFvalue IFvalue; typedef struct IFparseTree IFparseTree; typedef struct IFcomplex IFcomplex; typedef struct IFdevice IFdevice; typedef struct IFanalysis IFanalysis; typedef struct IFsimulator IFsimulator; typedef struct IFfrontEnd IFfrontEnd; typedef char *IFuid; typedef struct TFan TFan; typedef struct graph GRAPH; struct dbcomm; typedef struct PZtrial PZtrial; typedef struct PZAN PZAN; typedef struct SENstruct SENstruct; typedef struct TSKtask TSKtask; typedef struct JOB JOB; typedef struct SPICEanalysis SPICEanalysis; typedef struct runDesc runDesc; #endif ngspice-26/src/include/ngspice/wallace.h0000644000265600020320000000130712264261473017655 0ustar andreasadmin/* Wallace generator for normally distributed random variates Copyright Holger Vogt, 2008 Calling sequence: initw(void); initialize using srand(seed) double x = GaussWa; returns normally distributed random variate */ extern double *outgauss; /*output vector for user access */ extern unsigned int variate_used; /* actual index of variate called by user */ extern double ScaleGauss; /* scale factor, including chi square correction */ double NewWa(void); /* generate new pool, return outgauss[0] */ #define GaussWa ((--variate_used)?(outgauss[variate_used]*ScaleGauss):NewWa()) void initw(void); /* initialization of Wallace generator */ void PolarGauss(double* py1, double* py2); ngspice-26/src/include/ngspice/iferrmsg.h0000644000265600020320000000523312264261473020065 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Thomas L. Quarles **********/ /* */ #ifndef ngspice_IFERRMSG_H #define ngspice_IFERRMSG_H /* common error message descriptions */ #define E_PAUSE -1 /* pausing on demand */ #define OK 0 #define E_PANIC 1 /* vague internal error for "can't get here" cases */ #define E_EXISTS 2 /* warning/error - attempt to create duplicate */ /* instance or model. Old one reused instead */ #define E_NODEV 3 /* attempt to modify a non-existant instance */ #define E_NOMOD 4 /* attempt to modify a non-existant model */ #define E_NOANAL 5 /* attempt to modify a non-existant analysis */ #define E_NOTERM 6 /* attempt to bind to a non-existant terminal */ #define E_BADPARM 7 /* attempt to specify a non-existant parameter */ #define E_NOMEM 8 /* insufficient memory available - VERY FATAL */ #define E_NODECON 9 /* warning/error - node already connected, old */ /* connection replaced */ #define E_UNSUPP 10 /* the specified operation is unsupported by the */ /* simulator */ #define E_PARMVAL 11 /* the parameter value specified is illegal */ #define E_NOTEMPTY 12 /* deleted still referenced item. */ #define E_NOCHANGE 13 /* simulator can't tolerate any more topology changes */ #define E_NOTFOUND 14 /* simulator can't find something it was looking for */ #define E_BAD_DOMAIN 15 /* output interface begin/end domain calls mismatched */ #define E_PRIVATE 100 /* messages above this number are private to */ /* the simulator and MUST be accompanied by */ /* a proper setting of errMsg */ /* this constant should be added to all such messages */ /* to ensure error free operation if it must be */ /* changed in the future */ extern char *errMsg; /* descriptive message about what went wrong */ /* MUST be tmalloc()'d - front end will tfree() */ /* this should be a detailed message,and is assumed */ /* tmalloc()'d so that you will feel free to add */ /* lots of descriptive information with sprintf*/ extern char *errRtn; /* name of the routine declaring error */ /* should not be tmalloc()'d, will not be free()'d */ /* This should be a simple constant in your routine */ /* and thus can be set correctly even if we run out */ /* of memory */ #endif ngspice-26/src/include/ngspice/cluster.h0000644000265600020320000000122112264261473017721 0ustar andreasadmin#ifndef ngspice_CLUSTER_H #define ngspice_CLUSTER_H #include "ngspice/cktdefs.h" /* Cluster definitions */ #define PORT 1234 #define TIME_PORT 1235 #define DOMAIN_NAME "cluster.multigig" #define CLUSTER_WIDTH 4 #define TIME_HOST "time.cluster.multigig" /* does all the setups */ extern int CLUsetup(CKTcircuit *ckt); /* reads input pipes and sets voltages*/ /* call each time the present time is changed, ie just before NIinter*/ extern int CLUinput(CKTcircuit *ckt); /* call after each accepted timestep, ie CKTdump */ extern int CLUoutput(CKTcircuit *ckt); /* the time step control */ extern int CLUsync(double time,double *delta, int error); #endif ngspice-26/src/include/ngspice/fteinput.h0000644000265600020320000000204612264261473020104 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jeffrey M. Hsu **********/ /* Defs to use the Input routine. char_option is used by the lexer and the command interpreter response.reply contains a pointer to a character button_option is used by the menu system and the help package response.reply contains the button number click_option is used in the X10 version for the hardcopy command response.reply is the associated graph structure checkup_option is for handling and pending asynchonous events */ #ifndef ngspice_FTEINPUT_H #define ngspice_FTEINPUT_H #include #include "ngspice/graph.h" typedef enum { error_option, /* a reply option only */ button_option, char_option, click_option, checkup_option } OPTION; typedef struct request { OPTION option; FILE *fp; } REQUEST; typedef struct response { OPTION option; union { int ch; GRAPH *graph; int button; } reply; } RESPONSE; #endif ngspice-26/src/include/ngspice/fftext.h0000644000265600020320000001163212264261473017547 0ustar andreasadmin/******************************************************************* This file extends the fftlib with calls to maintain the cosine and bit reversed tables for you (including mallocs and free's). Call the init routine for each fft size you will be using. Then you can call the fft routines below which will make the fftlib library call with the appropriate tables passed. When you are done with all fft's you can call fftfree to release the storage for the tables. Note that you can call fftinit repeatedly with the same size, the extra calls will be ignored. So, you could make a macro to call fftInit every time you call ffts. For example you could have someting like: #define FFT(a,n) if(!fftInit(roundtol(LOG2(n)))) ffts(a,roundtol(LOG2(n)),1);else printf("fft error\n"); *******************************************************************/ int fftInit(int M); // malloc and init cosine and bit reversed tables for a given size fft, ifft, rfft, rifft /* INPUTS */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* OUTPUTS */ /* private cosine and bit reversed tables */ void fftFree(void); // release storage for all private cosine and bit reversed tables int fft_windows(char *window, double *win, double *time, int length, double maxt, double span, int order); // computes some popular window functions void ffts(double *data, int M, int Rows); /* Compute in-place complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array */ void iffts(double *data, int M, int Rows); /* Compute in-place inverse complex fft on the rows of the input array */ /* INPUTS */ /* *ioptr = input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array */ void rffts(double *data, int M, int Rows); /* Compute in-place real fft on the rows of the input array */ /* The result is the complex spectra of the positive frequencies */ /* except the location for the first complex number contains the real */ /* values for DC and Nyquest */ /* See rspectprod for multiplying two of these spectra together- ex. for fast convolution */ /* INPUTS */ /* *ioptr = real input data array */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = output data array in the following order */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ void riffts(double *data, int M, int Rows); /* Compute in-place real ifft on the rows of the input array */ /* data order as from rffts */ /* INPUTS */ /* *ioptr = input data array in the following order */ /* M = log2 of fft size (ex M=10 for 1024 point fft) */ /* Re(x[0]), Re(x[N/2]), Re(x[1]), Im(x[1]), Re(x[2]), Im(x[2]), ... Re(x[N/2-1]), Im(x[N/2-1]). */ /* Rows = number of rows in ioptr array (use 1 for Rows for a single fft) */ /* OUTPUTS */ /* *ioptr = real output data array */ void rspectprod(double *data1, double *data2, double *outdata, int N); // When multiplying a pair of spectra from rfft care must be taken to multiply the // two real values seperately from the complex ones. This routine does it correctly. // the result can be stored in-place over one of the inputs /* INPUTS */ /* *data1 = input data array first spectra */ /* *data2 = input data array second spectra */ /* N = fft input size for both data1 and data2 */ /* OUTPUTS */ /* *outdata = output data array spectra */ // The following is FYI //Note that most of the fft routines require full matrices, ie Rsiz==Ncols //This is how I like to define a real matrix: //struct matrix { // real matrix // double *d; // pointer to data // int Nrows; // number of rows in the matrix // int Ncols; // number of columns in the matrix (can be less than Rsiz) // int Rsiz; // number of doubles from one row to the next //}; //typedef struct matrix matrix; // CACHEFILLMALLOC and CEILCACHELINE can be used instead of malloc to make // arrays that start exactly on a cache line start. // First we CACHEFILLMALLOC a void * (use this void * when free'ing), // then we set our array pointer equal to the properly cast CEILCACHELINE of this void * // example: // aInit = CACHEFILLMALLOC( NUMFLOATS*sizeof(float) ); // a = (float *) CEILCACHELINE(ainit); // ... main body of code ... // free(aInit); // // To disable this alignment, set CACHELINESIZE to 1 //#define CACHELINESIZE 32 // Bytes per cache line //#define CACHELINEFILL (CACHELINESIZE-1) //#define CEILCACHELINE(p) ((((unsigned long)p+CACHELINEFILL)/CACHELINESIZE)*CACHELINESIZE) //#define CACHEFILLMALLOC(n) malloc((n)+CACHELINEFILL) #ifdef BOURKE static void fftext(double *x, double *y, long int n, long int nn, int dir); #endif ngspice-26/src/include/ngspice/cidersupt.h0000644000265600020320000000554212264261473020254 0ustar andreasadmin/* * cidersupt.h * * CIDER support library header */ #ifndef ngspice_CIDERSUPT_H #define ngspice_CIDERSUPT_H #include "ngspice/numglobs.h" #include "ngspice/material.h" #include "ngspice/gendev.h" #include "ngspice/profile.h" /* externals for database.c */ extern struct plot* DBread( char *); extern double *DBgetData( struct plot *, char *, int ); extern void DBfree( struct plot *); /* externals for devprint.c */ extern void printVoltages(FILE *, char *, char *, int, int, double, double, double, double, double, double ); /* externals for geominfo.c */ extern void printCoordInfo(CoordInfo *); extern void killCoordInfo(CoordInfo *); extern void ONEprintDomainInfo(DomainInfo *); extern void TWOprintDomainInfo(DomainInfo *); extern void killDomainInfo(DomainInfo *); extern void ONEprintBoundaryInfo(BoundaryInfo *); extern void TWOprintBoundaryInfo(BoundaryInfo *); extern void killBoundaryInfo(BoundaryInfo *); extern void TWOprintElectrodeInfo(ElectrodeInfo *); extern void killElectrodeInfo(ElectrodeInfo *); /* externals for globals.c */ extern void GLOBcomputeGlobals(GLOBvalues *, double); extern void GLOBputGlobals(GLOBvalues *); extern void GLOBgetGlobals(GLOBvalues *); extern void GLOBprnGlobals(FILE *, GLOBvalues *); /* externals for integset.c */ extern void computeIntegCoeff(int, int, double *, double *); extern void computePredCoeff(int, int, double *, double *); /* externals for integuse.c */ extern double integrate(double **, TranInfo *, int ); extern double predict(double **, TranInfo *, int ); extern double computeLTECoeff( TranInfo * ); extern double integrateLin(double **, TranInfo *, int ); /* externals for logfile.c */ extern void LOGmakeEntry(char *, char * ); /* externals for mater.c */ extern void MATLdefaults(MaterialInfo * ); extern void MATLtempDep(MaterialInfo *, double ); extern void printMaterialInfo(MaterialInfo * ); /* externals for mobil.c */ extern void MOBdefaults(MaterialInfo *, int, int, int, int ); extern void MOBtempDep (MaterialInfo *, double ); extern void MOBconcDep (MaterialInfo *, double, double *, double *); extern void MOBfieldDep (MaterialInfo *, int, double, double *, double * ); /* externals for recomb.c */ extern void recomb (double, double, double, double, double, double, double, double *, double *, double * ); /* externals for suprem.c */ extern void readAsciiData( char *, int, DOPtable ** ); extern void readSupremData( char *, int, int, DOPtable ** ); /* externals for suprmitf.c */ extern void SUPbinRead( char *, float *, float *, int *, int * ); extern void SUPascRead( char *, float *, float *, int *, int * ); /* externals for misc.c */ extern double guessNewConc(double , double ); extern double lookup(double **, double ); extern BOOLEAN hasSORConverged(double *, double *, int); extern BOOLEAN foundError(int ); #endif ngspice-26/src/include/ngspice/cmtypes.h0000644000265600020320000000242412264261473017732 0ustar andreasadmin#ifndef ngspice_CMTYPES_H #define ngspice_CMTYPES_H /* =========================================================================== FILE CMtypes.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Jeff Murray, Bill Kuhn MODIFICATIONS SUMMARY This file contains type definitions used by code models. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" /***** Define Typedefs ********************************************/ typedef int Boolean_t; typedef Mif_Complex_t Complex_t; typedef enum { ZERO, /* Normally referenced as 0 */ ONE, /* Normally referenced as 1 */ UNKNOWN, /* Unknown */ } Digital_State_t; typedef enum { STRONG, /* strong */ RESISTIVE, /* resistive */ HI_IMPEDANCE, /* high impedance */ UNDETERMINED, /* unknown strength */ } Digital_Strength_t; typedef struct { Digital_State_t state; Digital_Strength_t strength; } Digital_t; #endif ngspice-26/src/include/ngspice/wstdio.h0000644000265600020320000000655112264261473017564 0ustar andreasadmin/* I/O Redirection for Spice 3F4 under Win32s Autor: Wolfgang Muees Stand: 21.05.95 */ #ifndef ngspice_WSTDIO_H #define ngspice_WSTDIO_H #include /* original definitions */ #undef getc /* old macros removed */ #undef putc #undef ungetc #undef getchar #undef putchar #undef feof #undef ferror /* -----------------------------------------------------------------*/ int f_c_l_o_s_e( FILE * __stream); int f_f_l_u_s_h( FILE * __stream); int fg_e_t_c( FILE * __stream); int f_g_e_t_p_o_s( FILE * __stream, fpos_t * __pos); char * fg_e_t_s(char * __s, int __n, FILE * __stream); int fp_r_i_n_t_f(FILE * __stream, const char * __format, ...); int fp_u_t_c(int __c, FILE * __stream); int fp_u_t_s(const char * __s, FILE * __stream); size_t f_r_e_a_d(void * __ptr, size_t __size, size_t __n, FILE * __stream); FILE * f_r_e_o_p_e_n(const char * __path, const char * __mode, FILE * __stream); int fs_c_a_n_f(FILE * __stream, const char * __format, ...); int f_s_e_e_k(FILE * __stream, long __offset, int __whence); int f_s_e_t_p_o_s(FILE * __stream, const fpos_t*__pos); long f_t_e_l_l(FILE * __stream); size_t f_w_r_i_t_e(const void * __ptr, size_t __size, size_t __n, FILE * __stream); char * g_e_t_s(char * __s); void p_e_r_r_o_r(const char * __s); int p_r_i_n_t_f(const char * __format, ...); int p_u_t_s(const char * __s); int s_c_a_n_f(const char * __format, ...); int ung_e_t_c(int __c, FILE * __stream); int vfp_r_i_n_t_f(FILE * __stream, const char * __format, void * __arglist); /*int vfs_c_a_n_f(FILE * __stream, const char * __format, void * __arglist);*/ int vp_r_i_n_t_f(const char * __format, void * __arglist); /*int vs_c_a_n_f(const char * __format, void * __arglist); */ #ifdef _MSC_VER #if _MSC_VER < 1500 /* VC++ 6.0, VC++ 2005 */ _CRTIMP int __cdecl read(int fd, void * __buf, unsigned int __n); #else /* VC++ 2008 */ _CRTIMP int __cdecl read(int fd, _Out_bytecap_(_MaxCharCount) void * __buf, _In_ unsigned int __n); #endif #else int r_e_a_d(int fd, char * __buf, int __n); #endif int g_e_t_c(FILE * __fp); int g_e_t_char(void); int p_u_t_char(const int __c); int p_u_t_c(const int __c, FILE * __fp); int f_e_o_f(FILE * __fp); int f_e_r_r_o_r(FILE * __fp); int fg_e_t_char(void); int fp_u_t_char(int __c); /* ---------------------------------------------------------------*/ #define fclose f_c_l_o_s_e #define fflush f_f_l_u_s_h #define fgetc fg_e_t_c #define fgetpos f_g_e_t_p_o_s #define fgets fg_e_t_s #define fprintf fp_r_i_n_t_f #define fputc fp_u_t_c #define fputs fp_u_t_s #define fread f_r_e_a_d #define afreopen f_r_e_o_p_e_n /* hvogt 10.05.2000 */ #define fscanf fs_c_a_n_f #define fseek f_s_e_e_k #define fsetpos f_s_e_t_p_o_s #define ftell f_t_e_l_l #define fwrite f_w_r_i_t_e #define gets g_e_t_s #define perror p_e_r_r_o_r #define printf p_r_i_n_t_f #define puts p_u_t_s #define scanf s_c_a_n_f #define ungetc ung_e_t_c #define vfprintf vfp_r_i_n_t_f /*#define vfscanf vfs_c_a_n_f*/ #define vprintf vp_r_i_n_t_f /*#define vscanf vs_c_a_n_f*/ #define read r_e_a_d #define getc g_e_t_c #define getchar g_e_t_char #define putchar p_u_t_char #define putc p_u_t_c #define feof f_e_o_f #define ferror f_e_r_r_o_r #define fgetchar fg_e_t_char #define fputchar fp_u_t_char /*----------------------------------------------------------------------------*/ #endif ngspice-26/src/include/ngspice/dllitf.h0000644000265600020320000000734612264261473017534 0ustar andreasadmin/* DLL load interface (c)2000 Arpad Buermen */ #ifndef ngspice_DLLITF_H #define ngspice_DLLITF_H #include "ngspice/mifproto.h" #include "ngspice/cmproto.h" /* This structure contains pointers to core SPICE OPUS functions used in CMs and UDNs. A pointer to this structure is passed to the dll when the dll is loaded. */ struct coreInfo_t { /* MIF stuff */ void ((*dllitf_MIF_INP2A)(CKTcircuit *, INPtables *, card *)); char * ((*dllitf_MIFgetMod)(CKTcircuit *, char *, INPmodel **, INPtables *)); IFvalue * ((*dllitf_MIFgetValue)(CKTcircuit *, char **, int, INPtables *, char **)); int ((*dllitf_MIFsetup)(SMPmatrix *, GENmodel *, CKTcircuit *, int *)); int ((*dllitf_MIFunsetup)(GENmodel *, CKTcircuit *)); int ((*dllitf_MIFload)(GENmodel *, CKTcircuit *)); int ((*dllitf_MIFmParam)(int, IFvalue *, GENmodel *)); int ((*dllitf_MIFask)(CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *)); int ((*dllitf_MIFmAsk)(CKTcircuit *, GENmodel *, int, IFvalue *)); int ((*dllitf_MIFtrunc)(GENmodel *, CKTcircuit *, double *)); int ((*dllitf_MIFconvTest)(GENmodel *, CKTcircuit *)); int ((*dllitf_MIFdelete)(GENmodel *, IFuid, GENinstance **)); int ((*dllitf_MIFmDelete)(GENmodel **, IFuid, GENmodel *)); void ((*dllitf_MIFdestroy)(GENmodel **)); char * ((*dllitf_MIFgettok)(char **)); char * ((*dllitf_MIFget_token)(char **, Mif_Token_Type_t *)); Mif_Cntl_Src_Type_t ((*dllitf_MIFget_cntl_src_type)(Mif_Port_Type_t, Mif_Port_Type_t)); char * ((*dllitf_MIFcopy)(char *)); /* CM stuff */ void ((*dllitf_cm_climit_fcn)(double, double, double, double, double, double, double, double, int, double *, double *, double *, double *)); void ((*dllitf_cm_smooth_corner)(double, double, double, double, double, double, double *, double *)); void ((*dllitf_cm_smooth_discontinuity)(double, double, double, double, double, double *, double *)); double ((*dllitf_cm_smooth_pwl)(double, double *, double *, int, double, double *)); double ((*dllitf_cm_analog_ramp_factor)(void)); void ((*dllitf_cm_analog_alloc)(int, int)); void * ((*dllitf_cm_analog_get_ptr)(int, int)); int ((*dllitf_cm_analog_integrate)(double, double *, double *)); int ((*dllitf_cm_analog_converge)(double *)); int ((*dllitf_cm_analog_set_temp_bkpt)(double)); int ((*dllitf_cm_analog_set_perm_bkpt)(double)); void ((*dllitf_cm_analog_not_converged)(void)); void ((*dllitf_cm_analog_auto_partial)(void)); void ((*dllitf_cm_event_alloc)(int, int)); void * ((*dllitf_cm_event_get_ptr)(int, int)); int ((*dllitf_cm_event_queue)(double)); char * ((*dllitf_cm_message_get_errmsg)(void)); int ((*dllitf_cm_message_send)(char *)); double ((*dllitf_cm_netlist_get_c)(void)); double ((*dllitf_cm_netlist_get_l)(void)); Complex_t ((*dllitf_cm_complex_set)(double, double)); Complex_t ((*dllitf_cm_complex_add)(Complex_t, Complex_t)); Complex_t ((*dllitf_cm_complex_subtract)(Complex_t, Complex_t)); Complex_t ((*dllitf_cm_complex_multiply)(Complex_t, Complex_t)); Complex_t ((*dllitf_cm_complex_divide)(Complex_t, Complex_t)); FILE * ((*dllitf_cm_stream_out)(void)); FILE * ((*dllitf_cm_stream_in)(void)); FILE * ((*dllitf_cm_stream_err)(void)); /*Other stuff*/ void * ((*dllitf_malloc_pj)(size_t)); void * ((*dllitf_calloc_pj)(size_t, size_t)); void * ((*dllitf_realloc_pj)(void *, size_t)); void ((*dllitf_free_pj)(void *)); void * ((*dllitf_tmalloc)(size_t)); void * ((*dllitf_trealloc)(void *, size_t)); void ((*dllitf_txfree)(void *)); }; #endif ngspice-26/src/include/ngspice/sharedspice.h0000644000265600020320000002722212264261473020543 0ustar andreasadmin/* header file for shared ngspice */ /* Copyright 2013 Holger Vogt */ /* Modified BSD license */ /* Interface between a calling program (caller) and ngspice.dll (ngspice.so) ** ngSpice_Init(SendChar*, SendStat*, ControlledExit*, SendData*, SendInitData*, BGThreadRunning*, void*) After caller has loaded ngspice.dll, the simulator has to be initialized by calling ngSpice_Init(). Address pointers of several callback functions defined in the caller are sent to ngspice.dll. Callback funtion typedefs SendChar typedef of callback function for reading printf, fprintf, fputs SendStat typedef of callback function for reading status string and precent value ControlledExit typedef of callback function for tranferring a signal upon ngspice controlled_exit to caller. May be used by caller to detach ngspice.dll. SendData typedef of callback function for sending an array of structs containing data values of all vectors in the current plot (simulation output) SendInitData typedef of callback function for sending an array of structs containing info on all vectors in the current plot (immediately before simulation starts) BGThreadRunning typedef of callback function for sending a boolean signal (true if thread is running) The void pointer may contain the object address of the calling function ('self' or 'this' pointer), so that the answer may be directed to a calling object. Callback functions are defined in the global section. ** ngSpice_Command(char*) Send a valid command (see the control or interactive commands) from caller to ngspice.dll. Will be executed immediately (as if in interactive mode). Some commands are rejected (e.g. 'plot', because there is no graphics interface). Command 'quit' will remove internal data, and then send a notice to caller via ngexit(). ** ngGet_Vec_Info(char*) receives the name of a vector (may be in the form 'vectorname' or .vectorname) and returns a pointer to a vector_info struct. The caller may then directly assess the vector data (but probably should not modify them). ** ngSpice_Circ(char**) sends an array of null-terminated char* to ngspice.dll. Each char* contains a single line of a circuit (each line like in an input file **.sp). The last entry to char** has to be NULL. Upon receiving the arry, ngspice.dll will immediately parse the input and set up the circuit structure (as if received the circuit from a file by the 'source' command. ** char* ngSpice_CurPlot(); returns to the caller a pointer to the name of the current plot ** char** ngSpice_AllPlots() returns to the caller a pointer to an array of all plots (by their typename) ** char** ngSpice_AllVecs(char*); returns to the caller a pointer to an array of vector names in the plot named by the string in the argument. ** Additional basics: No memory mallocing and freeing across the interface: Memory allocated in ngspice.dll has to be freed in ngspice.dll. Memory allocated in the calling program has to be freed only there. ngspice.dll should never call exit() directly, but handle either the 'quit' request to the caller or an request for exiting upon error, done by callback function ngexit(). */ #ifndef NGSPICE_DLL_H #define NGSPICE_DLL_H #ifdef __cplusplus extern "C" { #endif #if defined(__MINGW32__) || defined(_MSC_VER) || defined(__CYGWIN__) #ifdef SHARED_MODULE #define IMPEXP __declspec(dllexport) #else #define IMPEXP __declspec(dllimport) #endif #else /* use with gcc flag -fvisibility=hidden */ #if __GNUC__ >= 4 #define IMPEXP __attribute__ ((visibility ("default"))) #define IMPEXPLOCAL __attribute__ ((visibility ("hidden"))) #else #define IMPEXP #define IMPEXP_LOCAL #endif #endif /* required only if header is used by the caller, is already defined in ngspice.dll */ #ifndef ngspice_NGSPICE_H /* Complex numbers. */ struct ngcomplex { double cx_real; double cx_imag; } ; typedef struct ngcomplex ngcomplex_t; #endif /* vector info obtained from any vector in ngspice.dll. Allows direct access to the ngspice internal vector structure, as defined in include/ngspice/devc.h . */ typedef struct vector_info { char *v_name; /* Same as so_vname. */ int v_type; /* Same as so_vtype. */ short v_flags; /* Flags (a combination of VF_*). */ double *v_realdata; /* Real data. */ ngcomplex_t *v_compdata; /* Complex data. */ int v_length; /* Length of the vector. */ } vector_info, *pvector_info; typedef struct vecvalues { char* name; /* name of a specific vector */ double creal; /* actual data value */ double cimag; /* actual data value */ bool is_scale; /* if 'name' is the scale vector */ bool is_complex; /* if the data are complex numbers */ } vecvalues, *pvecvalues; typedef struct vecvaluesall { int veccount; /* number of vectors in plot */ int vecindex; /* index of actual set of vectors. i.e. the number of accepted data points */ pvecvalues *vecsa; /* values of actual set of vectors, indexed from 0 to veccount - 1 */ } vecvaluesall, *pvecvaluesall; /* info for a specific vector */ typedef struct vecinfo { int number; /* number of vector, as postion in the linked list of vectors, starts with 0 */ char *vecname; /* name of the actual vector */ bool is_real; /* TRUE if the actual vector has real data */ void *pdvec; /* a void pointer to struct dvec *d, the actual vector */ void *pdvecscale; /* a void pointer to struct dvec *ds, the scale vector */ } vecinfo, *pvecinfo; /* info for the current plot */ typedef struct vecinfoall { /* the plot */ char *name; char *title; char *date; char *type; int veccount; /* the data as an array of vecinfo with length equal to the number of vectors in the plot */ pvecinfo *vecs; } vecinfoall, *pvecinfoall; /* callback functions addresses received from caller with ngSpice_Init() function */ /* sending output from stdout, stderr to caller */ typedef int (SendChar)(char*, int, void*); /* char* string to be sent to caller output int identification number of calling ngspice shared lib void* return pointer received from caller, e.g. pointer to object having sent the request */ /* sending simulation status to caller */ typedef int (SendStat)(char*, int, void*); /* char* simulation status and value (in percent) to be sent to caller int identification number of calling ngspice shared lib void* return pointer received from caller */ /* asking for controlled exit */ typedef int (ControlledExit)(int, bool, bool, int, void*); /* int exit status bool if true: immediate unloading dll, if false: just set flag, unload is done when function has returned bool if true: exit upon 'quit', if false: exit due to ngspice.dll error int identification number of calling ngspice shared lib void* return pointer received from caller */ /* send back actual vector data */ typedef int (SendData)(pvecvaluesall, int, int, void*); /* vecvaluesall* pointer to array of structs containing actual values from all vectors int number of structs (one per vector) int identification number of calling ngspice shared lib void* return pointer received from caller */ /* send back initailization vector data */ typedef int (SendInitData)(pvecinfoall, int, void*); /* vecinfoall* pointer to array of structs containing data from all vectors right after initialization int identification number of calling ngspice shared lib void* return pointer received from caller */ /* indicate if background thread is running */ typedef int (BGThreadRunning)(bool, int, void*); /* bool true if background thread is running int identification number of calling ngspice shared lib void* return pointer received from caller */ /* callback functions addresses received from caller with ngSpice_Init_Sync() function */ /* ask for VSRC EXTERNAL value */ typedef int (GetVSRCData)(double*, double, char*, int, void*); /* double* return voltage value double actual time char* node name int identification number of calling ngspice shared lib void* return pointer received from caller */ /* ask for ISRC EXTERNAL value */ typedef int (GetISRCData)(double*, double, char*, int, void*); /* double* return current value double actual time char* node name int identification number of calling ngspice shared lib void* return pointer received from caller */ /* ask for new delta time depending on synchronization requirements */ typedef int (GetSyncData)(double, double*, double, int, int, int, void*); /* double actual time (ckt->CKTtime) double* delta time (ckt->CKTdelta) double old delta time (olddelta) int redostep (as set by ngspice) int identification number of calling ngspice shared lib int location of call for synchronization in dctran.c void* return pointer received from caller */ /* ngspice initialization, printfcn: pointer to callback function for reading printf, fprintf statfcn: pointer to callback function for the status string and percent value ControlledExit: pointer to callback function for setting a 'quit' signal in caller SendData: pointer to callback function for returning data values of all current output vectors SendInitData: pointer to callback function for returning information of all output vectors just initialized BGThreadRunning: pointer to callback function indicating if workrt thread is running userData: pointer to user-defined data, will not be modified, but handed over back to caller during Callback, e.g. address of calling object */ IMPEXP int ngSpice_Init(SendChar* printfcn, SendStat* statfcn, ControlledExit* ngexit, SendData* sdata, SendInitData* sinitdata, BGThreadRunning* bgtrun, void* userData); /* initialization of synchronizing functions vsrcdat: pointer to callback function for retrieving a voltage source value from caller isrcdat: pointer to callback function for retrieving a current source value from caller syncdat: pointer to callback function for synchronization ident: pointer to integer unique to this shared library (defaults to 0) userData: pointer to user-defined data, will not be modified, but handed over back to caller during Callback, e.g. address of calling object. If NULL is sent here, userdata info from ngSpice_Init() will be kept, otherwise userdata will be overridden by new value from here. */ IMPEXP int ngSpice_Init_Sync(GetVSRCData *vsrcdat, GetISRCData *isrcdat, GetSyncData *syncdat, int *ident, void *userData); /* Caller may send ngspice commands to ngspice.dll. Commands are executed immediately */ IMPEXP int ngSpice_Command(char* command); /* get info about a vector */ IMPEXP pvector_info ngGet_Vec_Info(char* vecname); /* send a circuit to ngspice.dll The circuit description is a dynamic array of char*. Each char* corresponds to a single circuit line. The last entry of the array has to be a NULL */ IMPEXP int ngSpice_Circ(char** circarray); /* return to the caller a pointer to the name of the current plot */ IMPEXP char* ngSpice_CurPlot(void); /* return to the caller a pointer to an array of all plots created so far by ngspice.dll */ IMPEXP char** ngSpice_AllPlots(void); /* return to the caller a pointer to an array of vector names in the plot named by plotname */ IMPEXP char** ngSpice_AllVecs(char* plotname); /* returns TRUE if ngspice is running in a second (background) thread */ IMPEXP bool ngSpice_running(void); /* set a breakpoint in ngspice */ IMPEXP bool ngSpice_SetBkpt(double time); #ifdef __cplusplus } #endif #endif ngspice-26/src/include/ngspice/fteinp.h0000644000265600020320000000121312264261473017526 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * * Note that this definition must be the same as struct card in INPdefs.h... */ #ifndef ngspice_FTEINP_H #define ngspice_FTEINP_H #include "ngspice/inpdefs.h" /* This struct defines a linked list of lines from a SPICE file. */ struct line { int li_linenum; int li_linenum_orig; char *li_line; char *li_error; struct line *li_next; struct line *li_actual; } ; /* Listing types. */ #define LS_LOGICAL 1 #define LS_PHYSICAL 2 #define LS_DECK 3 #endif ngspice-26/src/include/ngspice/acdefs.h0000644000265600020320000000171412264261473017474 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_ACDEFS_H #define ngspice_ACDEFS_H #include "ngspice/jobdefs.h" /* structure used to describe an AC analysis to be performed */ typedef struct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ double ACstartFreq; double ACstopFreq; double ACfreqDelta; /* multiplier for decade/octave stepping, */ /* step for linear steps. */ double ACsaveFreq; /* frequency at which we left off last time*/ int ACstepType; /* values described below */ int ACnumberSteps; } ACAN; /* available step types: XXX should be somewhere else */ #define DECADE 1 #define OCTAVE 2 #define LINEAR 3 #define AC_DEC 1 #define AC_OCT 2 #define AC_LIN 3 #define AC_START 4 #define AC_STOP 5 #define AC_STEPS 6 #endif ngspice-26/src/include/ngspice/suffix.h0000644000265600020320000000002012264261473017540 0ustar andreasadmin/* Null file */ ngspice-26/src/include/ngspice/twomesh.h0000644000265600020320000001747212264261473017745 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * Two-Dimensional Element-based Simulation-Mesh Data Structures */ #ifndef ngspice_TWOMESH_H #define ngspice_TWOMESH_H #include "ngspice/material.h" typedef struct sTWOelem { struct sTWOelem *pElems[4]; /* array to store the element neighbors */ struct sTWOnode *pNodes[4]; /* array to store the element nodes */ struct sTWOedge *pEdges[4]; /* array to store the edges */ double dx; /* the x length */ double dy; /* the y length */ double dxOverDy; /* dX / dY */ double dyOverDx; /* dY / dX */ int domain; /* device domain owning element */ int elemType; /* material type of element */ TWOmaterial *matlInfo; /* material information */ double epsRel; /* relative epsilon */ /* Values needed to calc. mobility and its derivatives at element center */ double mun0, mup0; /* temp. and doping-dep. mobilities */ double mun, mup; /* field and carrier-dep. mobilities */ double dMunDEs, dMupDEs; /* Mob Deriv surf EFIELD Comp */ double dMunDEx, dMupDEx; /* Mob Deriv x EFIELD Comp */ double dMunDEy, dMupDEy; /* Mob Deriv y EFIELD Comp */ double dMunDWx, dMupDWx; /* Mob Deriv x WDF Comp */ double dMunDWy, dMupDWy; /* Mob Deriv y WDF Comp */ double dMunDN, dMupDN; /* Mob Deriv nConc Comp */ double dMunDP, dMupDP; /* Mob Deriv pConc Comp */ unsigned surface : 1; /* flag to indicate surface elem */ int channel; /* id of channel elem is in, 0 is none */ int direction; /* direction of flow for channels */ int evalNodes[4]; /* nodes to be evaluated in elem */ int evalEdges[4]; /* edges to be evaluated in elem */ } TWOelem; #define pTopElem pElems[0] #define pRightElem pElems[1] #define pBotElem pElems[2] #define pLeftElem pElems[3] #define pTLNode pNodes[0] #define pTRNode pNodes[1] #define pBRNode pNodes[2] #define pBLNode pNodes[3] #define pTopEdge pEdges[0] #define pRightEdge pEdges[1] #define pBotEdge pEdges[2] #define pLeftEdge pEdges[3] typedef struct sTWOedge { int edgeType; /* boundary type of edge */ double dPsi; /* deltaPsi */ double jn; /* electron current */ double jp; /* hole current */ double jd; /* displacement current */ double dJnDpsiP1; /* dJn/dPsi(+1) */ double dJnDn; /* dJnx/dN */ double dJnDnP1; /* dJn/dN(+1) */ double dJpDpsiP1; /* dJpx/dPsi(+1) */ double dJpDp; /* dJpx/dP */ double dJpDpP1; /* dJpxDp(+1) */ double dCBand; /* effective delta conduction band */ double dVBand; /* effective delta valence band */ double qf; /* fixed charge density */ /* Terms to find weighted carrier driving force and its derivatives */ double wdfn; /* N weighted driving force */ double wdfp; /* P weighted driving force */ double dWnDpsiP1; /* dWn/dPsi(+1) */ double dWnDn; /* dWn/dN */ double dWnDnP1; /* dWn/dN(+1) */ double dWpDpsiP1; /* dWp/dPsi(+1) */ double dWpDp; /* dWp/dP */ double dWpDpP1; /* dWp/dP(+1) */ /* Coefficients for weighting mobility on sides of edges */ double kNeg; /* Spline for negative side of edge */ double kPos; /* Spline for positive side of edge */ int edgeState; /* pointer to state vector */ unsigned evaluated : 1; /* flag to indicated evaluated */ } TWOedge; typedef struct sTWOnode { int nodeType; /* type of node */ int nodeI; /* node x-index */ int nodeJ; /* node y-index */ int poiEqn; /* equation number for equilib poisson */ int psiEqn; /* equation number for bias poisson */ int nEqn; /* equation number for n continuity */ int pEqn; /* equation number for p continuity */ struct sTWOelem *pElems[4]; /* array of elements */ double psi0; /* equilibrium potential */ double psi; /* electrostatic potential */ double nConc; /* electron conc. */ double pConc; /* hole conc. */ double nie; /* effective intrinsic carrier conc. */ double eg; /* energy gap */ double eaff; /* electron affinity; work phi for metal*/ double tn; /* electron lifetime */ double tp; /* hole lifetime */ double netConc; /* net doping conc. */ double totalConc; /* total doping conc. */ double na; /* acceptor conc. */ double nd; /* donor conc. */ double nPred; /* predicted electron conc. */ double pPred; /* predicted hole conc. */ double uNet; /* net recombination rate */ double dUdN; /* dU / dN */ double dUdP; /* dU / dP */ double dNdT; /* dN / dT */ double dPdT; /* dP / dT */ int nodeState; /* pointer to the state vector */ unsigned evaluated : 1; /* flag to indicated evaluated */ /* sparse matrix pointers. pointers to doubles */ /* DAG: diagonal pointers fXXiX1jX1 */ double *fPsiPsiiM1; double *fPsiPsi; double *fPsiPsiiP1; double *fPsiPsijM1; double *fPsiPsijP1; double *fPsiN; double *fPsiP; double *fNPsiiM1; double *fNPsi; double *fNPsiiP1; double *fNPsijM1; double *fNPsijP1; double *fNPsiiM1jM1; double *fNPsiiM1jP1; double *fNPsiiP1jM1; double *fNPsiiP1jP1; double *fNNiM1; double *fNN; double *fNNiP1; double *fNNjM1; double *fNNjP1; double *fNNiM1jM1; double *fNNiM1jP1; double *fNNiP1jM1; double *fNNiP1jP1; double *fNP; double *fPPsiiM1; double *fPPsi; double *fPPsiiP1; double *fPPsijM1; double *fPPsijP1; double *fPPsiiM1jM1; double *fPPsiiM1jP1; double *fPPsiiP1jM1; double *fPPsiiP1jP1; double *fPPiM1; double *fPP; double *fPPiP1; double *fPPjM1; double *fPPjP1; double *fPPiM1jM1; double *fPPiM1jP1; double *fPPiP1jM1; double *fPPiP1jP1; double *fPN; /* DAG: Pointers for Surface-Field-Dependent Terms */ /* For Oxide/Insulator on Silicon/Semiconductor: Ox OxM1 + ----- + ----- + OxP1 OXIDE | | | | | | - InM1 + ----- + ----- + InP1 --- INTERFACE In */ double *fNPsiInM1; double *fNPsiIn; double *fNPsiInP1; double *fNPsiOxM1; double *fNPsiOx; double *fNPsiOxP1; double *fPPsiInM1; double *fPPsiIn; double *fPPsiInP1; double *fPPsiOxM1; double *fPPsiOx; double *fPPsiOxP1; } TWOnode; #define pTLElem pElems[0] #define pTRElem pElems[1] #define pBRElem pElems[2] #define pBLElem pElems[3] #define nodePsi nodeState #define nodeN nodeState+1 #define nodeP nodeState+3 #define edgeDpsi edgeState #define TWOnumNodeStates 5 #define TWOnumEdgeStates 2 #endif ngspice-26/src/include/ngspice/noisedef.h0000644000265600020320000001111112264261473020033 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Gary W. Ng **********/ #ifndef ngspice_NOISEDEF_H #define ngspice_NOISEDEF_H #include "ngspice/jobdefs.h" /* structure used to describe an noise analysis */ typedef struct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ CKTnode *output; /* noise output summation node */ CKTnode *outputRef; /* noise output reference node */ IFuid input; /* name of the AC source used as input reference */ double NstartFreq; double NstopFreq; double NfreqDelta; /* multiplier for decade/octave stepping, */ /* step for linear steps. */ double NsavFstp; /* frequency step at which we stopped last time */ double NsavOnoise; /* integrated output noise when we left off last time */ double NsavInoise; /* integrated input noise when we left off last time */ int NstpType; /* values described below */ int NnumSteps; int NStpsSm; /* number of steps before we output a noise summary report */ } NOISEAN; /* structure used to carry information between subparts of the noise analysis code */ typedef struct { double freq; double lstFreq; double delFreq; double outNoiz; /* integrated output noise as of the last frequency point */ double inNoise; /* integrated input noise as of the last frequency point */ double GainSqInv; double lnGainInv; double lnFreq; double lnLastFreq; double delLnFreq; int outNumber; /* keeps track of the current output variable */ int numPlots; /* keeps track of the number of active plots so we can close them in */ /* a do loop. */ unsigned int prtSummary; double *outpVector; /* pointer to our array of noise outputs */ runDesc *NplotPtr; /* the plot pointer */ IFuid *namelist; /* list of plot names */ } Ndata; /* codes for saving and retrieving integrated noise data */ #define LNLSTDENS 0 /* array location that the log of the last noise density is stored */ #define OUTNOIZ 1 /* array location that integrated output noise is stored */ #define INNOIZ 2 /* array location that integrated input noise is stored */ #define NSTATVARS 3 /* number of "state" variables that must be stored for each noise */ /* generator. in this case it is three: LNLSTDENS, OUTNOIZ */ /* and INNOIZ */ /* available step types: */ #define DECADE 1 #define OCTAVE 2 #define LINEAR 3 /* noise analysis parameters */ #define N_OUTPUT 1 #define N_OUTREF 2 #define N_INPUT 3 #define N_START 4 #define N_STOP 5 #define N_STEPS 6 #define N_PTSPERSUM 7 #define N_DEC 8 #define N_OCT 9 #define N_LIN 10 /* noise routine operations/modes */ #define N_DENS 1 #define INT_NOIZ 2 #define N_OPEN 1 #define N_CALC 2 #define N_CLOSE 3 #define SHOTNOISE 1 #define THERMNOISE 2 #define N_GAIN 3 /* tolerances and limits to make numerical analysis more robust */ #define N_MINLOG 1E-38 /* the smallest number we can take the log of */ #define N_MINGAIN 1E-20 /* the smallest input-output gain we can tolerate */ /* (to calculate input-referred noise we divide */ /* the output noise by the gain) */ #define N_INTFTHRESH 1E-10 /* the largest slope (of a log-log noise spectral */ /* density vs. freq plot) at which the noise */ /* spectum is still considered flat. (no need for */ /* log curve fitting) */ #define N_INTUSELOG 1E-10 /* decides which expression to use for the integral of */ /* x**k. If k is -1, then we must use a 'ln' form. */ /* Otherwise, we use a 'power' form. This */ /* parameter is the region around (k=) -1 for which */ /* use the 'ln' form. */ /* misc constants */ #define N_MXVLNTH 64 /* maximum length for noise output variables we will generate */ /* (see MAXVLENGTH in FTE/writedata.c) */ void NevalSrc (double *noise, double *lnNoise, CKTcircuit *ckt, int type, int node1, int node2, double param); void NevalSrc2 (double *, double *, CKTcircuit *, int, int, int, double, int, int, double, double); void NevalSrcInstanceTemp (double *noise, double *lnNoise, CKTcircuit *ckt, int type, int node1, int node2, double param, double param2); double Nintegrate (double noizDens, double lnNdens, double lnNlstDens, Ndata *data); #endif ngspice-26/src/include/ngspice/hlpdefs.h0000644000265600020320000000637612264261473017705 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1986 Wayne A. Christopher, U. C. Berkeley CAD Group Modified 1999 Emmanuel Rouat - 2000 AlansFixes **********/ /* * Definitions for the help system. */ #include "ngspice/config.h" #ifndef X_DISPLAY_MISSING # include #endif typedef struct fplace { char *filename; long fpos; FILE *fp; } fplace; typedef struct button { char *text; fplace *tag; /* Why isn't used for anything? */ int x; int y; int width; int height; } button; struct hlp_index { char subject[64]; long fpos; }; typedef struct toplink { char *description; /* really the subject */ fplace *place; struct toplink *next; struct button button; } toplink; typedef struct topic { char *subject; char *title; fplace *place; wordlist *text; char *chartext; toplink *subtopics; toplink *seealso; int xposition; int yposition; struct topic *parent; struct topic *children; struct topic *next; struct topic *winlink; struct topic *readlink; int numlines; int maxcols; int curtopline; #ifndef X_DISPLAY_MISSING Widget shellwidget, formwidget, titlewidget, buttonwidget, textwidget, seelabelwidget, sublabelwidget, seeboxwidget, subboxwidget; #endif } topic; typedef struct handle { topic *parent; toplink *result; } handle; #define REG_FONT "timrom12" #define BOLD_FONT "timrom12b" #define ITALIC_FONT "timrom12i" #define TITLE_FONT "accordb" #define BUTTON_FONT "6x10" #define X_INCR 20 #define Y_INCR 20 #define BORDER_WIDTH 3 #define INT_BORDER 10 #define BUTTON_XPAD 4 #define BUTTON_YPAD 2 #define START_XPOS 100 #define START_YPOS 100 /* If the MAX_LINES and SCROLL_INCR are different, it is very confusing... */ #define MIN_COLS 40 #define MAX_COLS 90 #define MAX_LINES 25 #define SCROLL_INCR 25 #define BS_LEFT 0 #define BS_CENTER 1 #define BS_UNIF 2 /* External symbols. */ /* help.c */ extern char *hlp_directory; extern void hlp_main(char *path, wordlist *wl); extern FILE *hlp_fopen(char *filename); extern fplace *findglobalsubject(char *subject); extern bool hlp_approvedfile(char *filename); extern void hlp_pathfix(char *buf); /* readhelp.c */ extern topic *hlp_read(fplace *place); extern void hlp_free(void); extern long findsubject(char *filename, char *subject); /* provide.c */ extern void hlp_provide(topic *top); extern bool hlp_usex; extern void hlp_fixchildren(topic *parent); extern void hlp_killfamily(topic *top); /* xdisplay.c */ extern char *hlp_regfontname; extern char *hlp_boldfontname; extern char *hlp_italicfontname; extern char *hlp_titlefontname; extern char *hlp_buttonfontname; extern int hlp_initxpos; extern int hlp_initypos; extern int hlp_buttonstyle; extern char *hlp_displayname; extern bool hlp_xdisplay(topic *top); extern void hlp_xclosedisplay(void); extern toplink *hlp_xhandle(topic **pp); extern void hlp_xkillwin(topic *top); extern void hlp_xwait(topic *top, bool on); /* textdisp.c */ extern bool hlp_tdisplay(topic *top); extern toplink *hlp_thandle(topic **parent); extern void hlp_tkillwin(topic *top); extern int hlp_width; ngspice-26/src/include/ngspice/sensdefs.h0000644000265600020320000000372112264261473020061 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. **********/ #ifndef ngspice_SENSDEFS_H #define ngspice_SENSDEFS_H #include "ngspice/jobdefs.h" /* structure used to describe an Adjoint Sensitivity analysis */ typedef struct st_sens SENS_AN; typedef struct st_devsen DevSenList; typedef struct st_modsen ModSenList; typedef struct st_devsen ParamSenList; typedef struct st_nodes Nodes; typedef struct st_output output; struct st_sens { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ DevSenList *first; double start_freq; double stop_freq; int step_type; int n_freq_steps; CKTnode *output_pos, *output_neg; IFuid output_src; char *output_name; int output_volt; double deftol; double defperturb; unsigned int pct_flag :1; }; struct st_output { int type; int pos, neg; }; struct st_nodes { int pos, neg; }; struct st_paramsenlist { ParamSenList *next; int param_no; double delta, tol; }; struct st_modsenlist { ModSenList *next; int mod_no; ParamSenList *first; }; struct st_devsenlist { DevSenList *next; int dev_no; ModSenList *first; }; /* va, with prototypes */ extern int SENSask(CKTcircuit *,JOB *,int ,IFvalue *); extern int SENSsetParam(CKTcircuit *,JOB *,int ,IFvalue *); extern int sens_sens(CKTcircuit *,int); #define SENS_POS 2 #define SENS_NEG 3 #define SENS_SRC 4 #define SENS_NAME 5 #define SENS_START 10 #define SENS_STOP 11 #define SENS_STEPS 12 #define SENS_DEC 13 #define SENS_OCT 14 #define SENS_LIN 15 #define SENS_DECADE 13 #define SENS_OCTAVE 14 #define SENS_LINEAR 15 #define SENS_DC 16 #define SENS_DEFTOL 17 #define SENS_DEFPERT 18 #define SENS_DEFPERTURB 18 #define SENS_DEVDEFTOL 19 #define SENS_DEVDEFPERT 20 #define SENS_TYPE 21 #define SENS_DEVICE 22 #define SENS_PARAM 24 #define SENS_TOL 25 #define SENS_PERT 26 #endif /*DEFS*/ ngspice-26/src/include/ngspice/ChangeLog0000644000265600020320000001015312264261473017645 0ustar andreasadmin2003.4.10 Stuart Brorson * Added declaration for INPgetNetTok to inpdefs.h 2002-01-03 Paolo Nenzi * wstdio.h: Standard input/output for Windows (Holger Vogt patch). * complex.h: _complex redefined as _complex1 to avoid conflict with MINGW32 Paolo Nenzi * defines.h: added defines for Windows (Holger Vogt patch). * ngspice.h: added wstdio.h inclusion if compiling for Windows (Holger Vogt patch). 2001-12-14 Paolo Nenzi * cpextern.h: Modification needed for patches sent by Charles Williams. 2001-11-25 Emmanuel Rouat * ftedefs.h: added definition of structure circ (taken from circuits.h) 2000-09-09 Arno W. Peters * fteext.h: Removed prototype for com_fourier(). Use src/frontend/fourier.h for the proper prototype. 2000-07-18 Arno W. Peters * cpdefs.h: Moved quote() and strip() macro's to ... * wordlist.h: ... here. Also added ANSI C prototypes for all functions that manipulate wordlists. * defines.h: Removed CAPZEROBYPASS, NEWCONV and CAPBYPASS as they are no longer used in the code. 2000-05-22 Paolo Nenzi * inpptree.h: Applied Widlok patch (u2 function). 1999-11-30 Emmanuel Rouat * ngspice.h: substitutes spice.h 1999-09-08 Arno * distodef.h: added prototypes for derivative functions, retained only ANSI conforming prototypes. 1999-09-07 Arno * ifsim.h: changed the typedef for IFuid from GENERIC to char *. 1999-09-06 Arno Peters * fteext.h: changed parameters and return values for math functions from char * to void *. 1999-09-04 Emmanuel Rouat * Makefile.am (noinst_HEADERS): removed patchlev.h added ngspice.h 1999-09-03 Emmanuel Rouat * ngspice.h: added this generic header file (will eventually replace spice.h) 1999-08-28 Emmanuel Rouat * cpstd.h: now #includes spice.h instead of misc.h * spice.h: removed capabil.h from #includes #includes "hw_ieee.h" instead of "hw.h" (removes vms support) merged spice.h with misc.h and util.h * misc.h: suppressed code related to HAS_MEMAVL and HAS_BSDRAND 1999-08-26 Paolo Nenzi * spmatrix.h: added externs for spOriginalCount 1999-08-19 Paolo Nenzi * fteext.h: patched for spec command downloaded from: ftp://ftp.mpce.mq.edu.au/pub/elec/spice/patches. 1999-08-12 Emmanuel Rouat * hlpdefs.h: ansi-fied function declarations * complex.h (C_NORM): fixed a bug in C_NORM macros 1999-10-08 Paolo Nenzi * cktdefs.h: removed non STDC definitions and converted to ANSI prototypes the functions. Marked with ??? the circuit elements whose function is unknown. If you know their meaning, please write me an email describing it. Thank you. * complex.h: Removed HAS_SHORTMACRO definitions. Defined macros should be better documented. 1999-08-08 Emmanuel Rouat * spice.h: removed 'porth.h' from #includes - now everything shold be handled by autoconf 1999-08-07 Emmanuel Rouat * strext.h: changed HAS_STRINGS into STDC_HEADERS (reversed) 1999-08-06 Emmanuel Rouat * capabil.h: removed X10 defines * misc.h: removed test on HAS_VPERROR removed test on HAS_CLEARERR 1999-08-05 Emmanuel Rouat * util.h: * misc.h: changed HAS_STDLIB to STDC_HEADERS * spice.h: removed 'port.h' from includes 1999-08-04 Emmanuel Rouat * mfb.h: changed HAS_STAT into STAT_MACROS_BROKEN 04-08-1999 Paolo Nenzi * changed trcvdefs.h: now includes the TEMP code for the temperature sweep code supplied by Serban-Mihai Popescu. 29-07-1999 emmanuel.rouat@wanadoo.fr (Manu Rouat) * removed old config.h (used my ms-dos only) to avoid confusion with autoconf config.h ngspice-26/src/include/ngspice/cktdefs.h0000644000265600020320000004337612264261473017704 0ustar andreasadmin/* * Copyright (c) 1985 Thomas L. Quarles * Modified 1999 Paolo Nenzi - Removed non STDC definitions * Modified 2000 AlansFixes */ #ifndef ngspice_CKTDEFS_H #define ngspice_CKTDEFS_H #include "ngspice/typedefs.h" /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ #ifdef XSPICE #include "ngspice/evt.h" #include "ngspice/enh.h" #endif /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ #define MAXNUMDEVS 64 /* Max number of possible devices PN:XXX may cause toubles*/ #define MAXNUMDEVNODES 4 /* Max No. of nodes per device */ /* Need to change for SOI devs ? */ #include "ngspice/smpdefs.h" #include "ngspice/ifsim.h" #include "ngspice/acdefs.h" #include "ngspice/gendefs.h" #include "ngspice/trcvdefs.h" #include "ngspice/optdefs.h" #include "ngspice/sen2defs.h" #include "ngspice/pzdefs.h" #include "ngspice/noisedef.h" #include "ngspice/hash.h" struct CKTnode { IFuid name; int type; #define SP_VOLTAGE 3 #define SP_CURRENT 4 #define NODE_VOLTAGE SP_VOLTAGE #define NODE_CURRENT SP_CURRENT int number; /* Number of the node */ double ic; /* Value of the initial condition */ double nodeset; /* Value of the .nodeset option */ double *ptr; /* ??? */ CKTnode *next; /* pointer to the next node */ unsigned int icGiven:1; /* FLAG ic given */ unsigned int nsGiven:1; /* FLAG nodeset given */ }; /* defines for node parameters */ #define PARM_NS 1 #define PARM_IC 2 #define PARM_NODETYPE 3 struct CKTcircuit { /* gtri - begin - wbk - change declaration to allow dynamic sizing */ /* An associated change is made in CKTinit.c to alloc the space */ /* required for the pointers. No changes are needed to the source */ /* code at the 3C1 level, although the compiler will generate */ /* slightly different code for references to this data. */ /* GENmodel *CKThead[MAXNUMDEVS]; The max number of loadable devices */ GENmodel **CKThead; /* gtri - end - wbk - change declaration to allow dynamic sizing */ /* GENmodel *CKThead[MAXNUMDEVS]; maschmann : deleted */ STATistics *CKTstat; /* The STATistics structure */ double *(CKTstates[8]); /* Used as memory of past steps ??? */ /* Some shortcut for CKTstates */ #define CKTstate0 CKTstates[0] #define CKTstate1 CKTstates[1] #define CKTstate2 CKTstates[2] #define CKTstate3 CKTstates[3] #define CKTstate4 CKTstates[4] #define CKTstate5 CKTstates[5] #define CKTstate6 CKTstates[6] #define CKTstate7 CKTstates[7] double CKTtime; /* ??? */ double CKTdelta; /* ??? */ double CKTdeltaOld[7]; /* Memory for ??? */ double CKTtemp; /* Actual temperature of CKT */ double CKTnomTemp; /* Reference temperature 27 C ? */ double CKTvt; /* Thernmal voltage at CKTtemp */ double CKTag[7]; /* the gear variable coefficient matrix */ #ifdef PREDICTOR double CKTagp[7]; /* the gear predictor variable coefficient matrix */ #endif /*PREDICTOR*/ int CKTorder; /* the integration method order */ int CKTmaxOrder; /* maximum integration method order */ int CKTintegrateMethod; /* the integration method to be used */ /* known integration methods */ #define TRAPEZOIDAL 1 #define GEAR 2 SMPmatrix *CKTmatrix; /* pointer to sparse matrix */ int CKTniState; /* internal state */ double *CKTrhs; /* current rhs value - being loaded */ double *CKTrhsOld; /* previous rhs value for convergence testing */ double *CKTrhsSpare; /* spare rhs value for reordering */ double *CKTirhs; /* current rhs value - being loaded (imag) */ double *CKTirhsOld; /* previous rhs value (imaginary)*/ double *CKTirhsSpare; /* spare rhs value (imaginary)*/ #ifdef PREDICTOR double *CKTpred; /* predicted solution vector */ double *CKTsols[8]; /* previous 8 solutions */ #endif /* PREDICTOR */ double *CKTrhsOp; /* opearating point values */ double *CKTsenRhs; /* current sensitivity rhs values */ double *CKTseniRhs; /* current sensitivity rhs values (imag)*/ /* * symbolic constants for CKTniState * Note that they are bitwise disjoint * What is their meaning ???? */ #define NISHOULDREORDER 0x1 #define NIREORDERED 0x2 #define NIUNINITIALIZED 0x4 #define NIACSHOULDREORDER 0x10 #define NIACREORDERED 0x20 #define NIACUNINITIALIZED 0x40 #define NIDIDPREORDER 0x100 #define NIPZSHOULDREORDER 0x200 int CKTmaxEqNum; /* And this ? */ int CKTcurrentAnalysis; /* the analysis in progress (if any) */ /* defines for the value of CKTcurrentAnalysis */ /* are in TSKdefs.h */ CKTnode *CKTnodes; /* ??? */ CKTnode *CKTlastNode; /* ??? */ /* This define should be somewhere else ??? */ #define NODENAME(ckt,nodenum) CKTnodName(ckt,nodenum) int CKTnumStates; /* Number of sates effectively valid ??? */ long CKTmode; /* Mode of operation of the circuit ??? */ /* defines for CKTmode */ /* old 'mode' parameters */ #define MODE 0x3 #define MODETRAN 0x1 #define MODEAC 0x2 /* old 'modedc' parameters */ #define MODEDC 0x70 #define MODEDCOP 0x10 #define MODETRANOP 0x20 #define MODEDCTRANCURVE 0x40 /* old 'initf' parameters */ #define INITF 0x3f00 #define MODEINITFLOAT 0x100 #define MODEINITJCT 0x200 #define MODEINITFIX 0x400 #define MODEINITSMSIG 0x800 #define MODEINITTRAN 0x1000 #define MODEINITPRED 0x2000 /* old 'nosolv' paramater */ #define MODEUIC 0x10000l int CKTbypass; /* bypass option, how does it work ? */ int CKTdcMaxIter; /* iteration limit for dc op. (itl1) */ int CKTdcTrcvMaxIter; /* iteration limit for dc tran. curv (itl2) */ int CKTtranMaxIter; /* iteration limit for each timepoint for tran*/ /* (itl4) */ int CKTbreakSize; /* ??? */ int CKTbreak; /* ??? */ double CKTsaveDelta; /* ??? */ double CKTminBreak; /* ??? */ double *CKTbreaks; /* List of breakpoints ??? */ double CKTabstol; /* --- */ double CKTpivotAbsTol; /* --- */ double CKTpivotRelTol; /* --- */ double CKTreltol; /* --- */ double CKTchgtol; /* --- */ double CKTvoltTol; /* --- */ /* What is this define for ? */ #ifdef NEWTRUNC double CKTlteReltol; double CKTlteAbstol; #endif /* NEWTRUNC */ double CKTgmin; /* Parallel Conductance --- */ double CKTgshunt; double CKTdelmin; /* ??? */ double CKTtrtol; /* ??? */ double CKTfinalTime; /* ??? */ double CKTstep; /* ??? */ double CKTmaxStep; /* ??? */ double CKTinitTime; /* ??? */ double CKTomega; /* ??? */ double CKTsrcFact; /* ??? */ double CKTdiagGmin; /* ??? */ int CKTnumSrcSteps; /* ??? */ int CKTnumGminSteps; /* ??? */ double CKTgminFactor; int CKTnoncon; /* ??? */ double CKTdefaultMosM; double CKTdefaultMosL; /* Default Channel Lenght of MOS devices */ double CKTdefaultMosW; /* Default Channel Width of MOS devics */ double CKTdefaultMosAD; /* Default Drain Area of MOS */ double CKTdefaultMosAS; /* Default Source Area of MOS */ unsigned int CKThadNodeset:1; /* ??? */ unsigned int CKTfixLimit:1; /* flag to indicate that the limiting of MOSFETs should be done as in SPICE2 */ unsigned int CKTnoOpIter:1; /* flag to indicate not to try the operating point brute force, but to use gmin stepping first */ unsigned int CKTisSetup:1; /* flag to indicate if CKTsetup done */ #ifdef XSPICE unsigned int CKTadevFlag:1; /* flag indicates 'A' devices in the circuit */ #endif JOB *CKTcurJob; /* Next analysis to be performed ??? */ SENstruct *CKTsenInfo; /* the sensitivity information */ double *CKTtimePoints; /* list of all accepted timepoints in the current transient simulation */ double *CKTdeltaList; /* list of all timesteps in the current transient simulation */ int CKTtimeListSize; /* size of above lists */ int CKTtimeIndex; /* current position in above lists */ int CKTsizeIncr; /* amount to increment size of above arrays when you run out of space */ unsigned int CKTtryToCompact:1; /* try to compact past history for LTRA lines */ unsigned int CKTbadMos3:1; /* Use old, unfixed MOS3 equations */ unsigned int CKTkeepOpInfo:1; /* flag for small signal analyses */ unsigned int CKTcopyNodesets:1; /* NodesetFIX */ unsigned int CKTnodeDamping:1; /* flag for node damping fix */ double CKTabsDv; /* abs limit for iter-iter voltage change */ double CKTrelDv; /* rel limit for iter-iter voltage change */ int CKTtroubleNode; /* Non-convergent node number */ GENinstance *CKTtroubleElt; /* Non-convergent device instance */ int CKTvarHertz; /* variable HERTZ in B source */ /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ #ifdef XSPICE Evt_Ckt_Data_t *evt; /* all data about event driven stuff */ Enh_Ckt_Data_t *enh; /* data used by general enhancements */ #endif /* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */ #ifdef WITH_PSS /* SP: Periodic Steady State Analysis - 100609 */ double CKTstabTime; /* PSS stab time */ double CKTguessedFreq; /* PSS guessed frequency */ int CKTharms; /* PSS harmonics */ long int CKTpsspoints; /* PSS number of samples */ char *CKToscNode; /* PSS oscnode */ double CKTsteady_coeff; /* PSS Steady Coefficient */ int CKTsc_iter; /* PSS Maximum Number of Shooting Iterations */ /* SP: 100609 */ #endif unsigned int CKTisLinear:1; /* flag to indicate that the circuit contains only linear elements */ unsigned int CKTnoopac:1; /* flag to indicate that OP will not be evaluated during AC simulation */ int CKTsoaCheck; /* flag to indicate that in certain device models a safe operating area (SOA) check is executed */ int CKTsoaMaxWarns; /* specifies the maximum number of SOA warnings */ NGHASHPTR DEVnameHash; NGHASHPTR MODnameHash; }; /* Now function prottypes */ extern int ACan(CKTcircuit *, int); extern int ACaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int ACsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int CKTacDump(CKTcircuit *, double , void *); extern int CKTacLoad(CKTcircuit *); extern int CKTaccept(CKTcircuit *); extern int CKTacct(CKTcircuit *, JOB *, int , IFvalue *); extern int CKTask(CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *); extern int CKTaskAnalQ(CKTcircuit *, JOB *, int , IFvalue *, IFvalue *); extern int CKTaskNodQst(CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); extern int CKTbindNode(CKTcircuit *, GENinstance *, int , CKTnode *); extern void CKTbreakDump(CKTcircuit *); extern int CKTclrBreak(CKTcircuit *); extern int CKTconvTest(CKTcircuit *); extern int CKTcrtElt(CKTcircuit *, GENmodel *, GENinstance **, IFuid); extern int CKTdelTask(CKTcircuit *, TSKtask *); extern int CKTdestroy(CKTcircuit *); extern int CKTdltAnal(void *, void *, void *); extern int CKTdltInst(CKTcircuit *, void *); extern int CKTdltMod(CKTcircuit *, GENmodel *); extern int CKTdltNNum(CKTcircuit *, int); extern int CKTdltNod(CKTcircuit *, CKTnode *); extern int CKTdoJob(CKTcircuit *, int , TSKtask *); extern void CKTdump(CKTcircuit *, double, void *); extern int CKTsoaInit(void); extern int CKTsoaCheck(CKTcircuit *); #ifdef CIDER extern void NDEVacct(CKTcircuit *ckt, FILE *file); #endif /* CIDER */ extern void CKTncDump(CKTcircuit *); extern int CKTfndAnal(CKTcircuit *, int *, JOB **, IFuid , TSKtask *, IFuid); extern int CKTfndBranch(CKTcircuit *, IFuid); extern GENinstance *CKTfndDev(CKTcircuit *, IFuid); extern GENmodel *CKTfndMod(CKTcircuit *, IFuid); extern int CKTfndNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTfndTask(CKTcircuit *, TSKtask **, IFuid ); extern int CKTground(CKTcircuit *, CKTnode **, IFuid); extern int CKTic(CKTcircuit *); extern int CKTinit(CKTcircuit **); extern int CKTinst2Node(CKTcircuit *, void *, int , CKTnode **, IFuid *); extern int CKTlinkEq(CKTcircuit *, CKTnode *); extern int CKTload(CKTcircuit *); extern int CKTmapNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTmkCur(CKTcircuit *, CKTnode **, IFuid , char *); extern int CKTmkNode(CKTcircuit *, CKTnode **); extern int CKTmkVolt(CKTcircuit *, CKTnode **, IFuid , char *); extern int CKTmodAsk(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); extern int CKTmodCrt(CKTcircuit *, int , GENmodel **, IFuid); extern int CKTmodParam(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *); extern int CKTnames(CKTcircuit *, int *, IFuid **); extern int CKTdnames(CKTcircuit *); extern int CKTnewAnal(CKTcircuit *, int , IFuid , JOB **, TSKtask *); extern int CKTnewEq(CKTcircuit *, CKTnode **, IFuid); extern int CKTnewNode(CKTcircuit *, CKTnode **, IFuid); extern int CKTnewTask(CKTcircuit *, TSKtask **, IFuid, TSKtask **); extern int CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data); extern IFuid CKTnodName(CKTcircuit *, int); extern void CKTnodOut(CKTcircuit *); extern CKTnode * CKTnum2nod(CKTcircuit *, int); extern int CKTop(CKTcircuit *, long, long, int); extern int CKTpModName(char *, IFvalue *, CKTcircuit *, int , IFuid , GENmodel **); extern int CKTpName(char *, IFvalue *, CKTcircuit *, int , char *, GENinstance **); extern int CKTparam(CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *); extern int CKTpzFindZeros(CKTcircuit *, PZtrial **, int *); extern int CKTpzLoad(CKTcircuit *, SPcomplex *); extern int CKTpzSetup(CKTcircuit *, int); extern int CKTsenAC(CKTcircuit *); extern int CKTsenComp(CKTcircuit *); extern int CKTsenDCtran(CKTcircuit *); extern int CKTsenLoad(CKTcircuit *); extern void CKTsenPrint(CKTcircuit *); extern int CKTsenSetup(CKTcircuit *); extern int CKTsenUpdate(CKTcircuit *); extern int CKTsetAnalPm(CKTcircuit *, JOB *, int , IFvalue *, IFvalue *); extern int CKTsetBreak(CKTcircuit *, double); extern int CKTsetNodPm(CKTcircuit *, CKTnode *, int , IFvalue *, IFvalue *); extern int CKTsetOpt(CKTcircuit *, JOB *, int , IFvalue *); extern int CKTsetup(CKTcircuit *); extern int CKTunsetup(CKTcircuit *); extern int CKTtemp(CKTcircuit *); extern char *CKTtrouble(CKTcircuit *, char *); extern void CKTterr(int , CKTcircuit *, double *); extern int CKTtrunc(CKTcircuit *, double *); extern int CKTtypelook(char *); extern int DCOaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int DCOsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int DCTaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int DCTsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int DCop(CKTcircuit *ckt, int notused); /* va: notused avoids "init from incompatible pointer type" */ extern int DCtrCurv(CKTcircuit *, int); extern int DCtran(CKTcircuit *, int); extern int DISTOan(CKTcircuit *, int); extern int NOISEan(CKTcircuit *, int); extern int PZan(CKTcircuit *, int); extern int PZinit(CKTcircuit *); extern int PZpost(CKTcircuit *); extern int PZaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int PZsetParm(CKTcircuit *, JOB *, int , IFvalue *); #ifdef WANT_SENSE2 extern int SENaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern void SENdestroy(SENstruct *); extern int SENsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int SENstartup(CKTcircuit *, int); #endif extern int SPIinit(IFfrontEnd *, IFsimulator **); extern int TFanal(CKTcircuit *, int); extern int TFaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int TFsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int TRANaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int TRANsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int TRANinit(CKTcircuit *, JOB *); #ifdef WITH_PSS /* SP: Steady State Analysis */ extern int PSSaskQuest(CKTcircuit *, JOB *, int , IFvalue *); extern int PSSsetParm(CKTcircuit *, JOB *, int , IFvalue *); extern int PSSinit(CKTcircuit *, JOB *); extern int DCpss(CKTcircuit *, int); /* SP */ #endif extern int NaskQuest(CKTcircuit *, JOB *, int, IFvalue *); extern int NsetParm(CKTcircuit *, JOB *, int, IFvalue *); extern int NIacIter(CKTcircuit *); extern int NIcomCof(CKTcircuit *); extern int NIconvTest(CKTcircuit *); extern void NIdestroy(CKTcircuit *); extern int NIinit(CKTcircuit *); extern int NIintegrate(CKTcircuit *, double *, double *, double , int); extern int NIiter(CKTcircuit * , int); extern int NIpzMuller(PZtrial **, PZtrial *); extern int NIpzComplex(PZtrial **, PZtrial *); extern int NIpzSym(PZtrial **, PZtrial *); extern int NIpzSym2(PZtrial **, PZtrial *); extern int NIreinit(CKTcircuit *); extern int NIsenReinit(CKTcircuit *); extern int NIdIter (CKTcircuit *); extern void NInzIter(CKTcircuit *, int, int); #ifdef PREDICTOR extern int NIpred(CKTcircuit *ckt); #endif extern IFfrontEnd *SPfrontEnd; extern bool expr_w_temper; #endif ngspice-26/src/include/ngspice/devdefs.h0000644000265600020320000001731412264261473017672 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_DEVDEFS_H #define ngspice_DEVDEFS_H #include "ngspice/optdefs.h" #include "ngspice/gendefs.h" #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/noisedef.h" #include "ngspice/complex.h" double DEVlimvds(double,double); double DEVpnjlim(double,double,double,double,int*); double DEVfetlim(double,double,double); void DEVcmeyer(double,double,double,double,double,double,double,double,double, double,double,double*,double*,double*,double,double,double,double); void DEVqmeyer(double,double,double,double,double,double*,double*,double*, double,double); double DEVpred(CKTcircuit*,int); /* Cider integration */ double limitResistorVoltage( double, double, int * ); double limitJunctionVoltage( double, double, int * ); double limitVbe( double, double, int * ); double limitVce( double, double, int * ); double limitVgb( double, double, int * ); /* Area Calculation Method (ACM) for MOS models (devsup.c) */ int ACM_SourceDrainResistances(int, double, double, double, double, double, double, double, int, double, double, double, int, double, double, double, double *, double *); int ACM_saturationCurrents(int, int, int, double, double, double, double, double, double, int, double, int, double, int, double, int, double, double *, double *); int ACM_junctionCapacitances(int, int, int, double, double, double, double, int, double, int, double, int, double, int, double, double, double, double, double *, double *, double *, double *, double *, double *); typedef struct SPICEdev { IFdevice DEVpublic; int (*DEVparam)(int,IFvalue*,GENinstance*,IFvalue *); /* routine to input a parameter to a device instance */ int (*DEVmodParam)(int,IFvalue*,GENmodel*); /* routine to input a paramater to a model */ int (*DEVload)(GENmodel*,CKTcircuit*); /* routine to load the device into the matrix */ int (*DEVsetup)(SMPmatrix*,GENmodel*,CKTcircuit*,int*); /* setup routine to preprocess devices once before soloution begins */ int (*DEVunsetup)(GENmodel*,CKTcircuit*); /* clean up before running again */ int (*DEVpzSetup)(SMPmatrix*,GENmodel*,CKTcircuit*,int*); /* setup routine to process devices specially for pz analysis */ int (*DEVtemperature)(GENmodel*,CKTcircuit*); /* subroutine to do temperature dependent setup processing */ int (*DEVtrunc)(GENmodel*,CKTcircuit*,double*); /* subroutine to perform truncation error calc. */ int (*DEVfindBranch)(CKTcircuit*,GENmodel*,IFuid); /* subroutine to search for device branch eq.s */ int (*DEVacLoad)(GENmodel*,CKTcircuit*); /* ac analysis loading function */ int (*DEVaccept)(CKTcircuit*,GENmodel*); /* subroutine to call on acceptance of a timepoint */ void (*DEVdestroy)(GENmodel**); /* subroutine to destroy all models and instances */ int (*DEVmodDelete)(GENmodel**,IFuid,GENmodel*); /* subroutine to delete a model and all instances */ int (*DEVdelete)(GENmodel*,IFuid,GENinstance**); /* subroutine to delete an instance */ int (*DEVsetic)(GENmodel*,CKTcircuit*); /* routine to pick up device init conds from rhs */ int (*DEVask)(CKTcircuit*,GENinstance*,int,IFvalue*,IFvalue*); /* routine to ask about device details*/ int (*DEVmodAsk)(CKTcircuit*,GENmodel*,int,IFvalue*); /* routine to ask about model details*/ int (*DEVpzLoad)(GENmodel*,CKTcircuit*,SPcomplex*); /* routine to load for pole-zero analysis */ int (*DEVconvTest)(GENmodel*,CKTcircuit*); /* convergence test function */ int (*DEVsenSetup)(SENstruct*,GENmodel*); /* routine to setup the device sensitivity info */ int (*DEVsenLoad)(GENmodel*,CKTcircuit*); /* routine to load the device sensitivity info */ int (*DEVsenUpdate)(GENmodel*,CKTcircuit*); /* routine to update the device sensitivity info */ int (*DEVsenAcLoad)(GENmodel*,CKTcircuit*); /* routine to load the device ac sensitivity info */ void (*DEVsenPrint)(GENmodel*,CKTcircuit*); /* subroutine to print out sensitivity info */ int (*DEVsenTrunc)(GENmodel*,CKTcircuit*,double*); /* subroutine to print out sensitivity info */ int (*DEVdisto)(int,GENmodel*,CKTcircuit*); /* procedure to do distortion operations */ int (*DEVnoise)(int, int, GENmodel*,CKTcircuit*, Ndata *, double *); /* noise routine */ int (*DEVsoaCheck)(CKTcircuit*,GENmodel*); /* subroutine to call on soa check */ #ifdef CIDER void (*DEVdump)(GENmodel *, CKTcircuit *); void (*DEVacct)(GENmodel *, CKTcircuit *, FILE *); /* routines to report device internals * now used only by cider numerical devices */ #endif int *DEVinstSize; /* size of an instance */ int *DEVmodSize; /* size of a model */ } SPICEdev; /* instance of structure for each possible type of device */ extern SPICEdev **DEVices; extern int DEVmaxnum; /* size of DEVices array */ /* IOP( ) Input/output parameter * IOPP( ) IO parameter which the principle value of a device (used * for naming output variables in sensetivity) * IOPA( ) IO parameter significant for time-varying (non-dc) analyses * IOPAP( ) Principle value is significant for time-varying analyses * IOPAA( ) IO parameter significant for ac analyses only * IOPAAP( ) IO parameter principle value for ac analyses only * IOPN( ) IO parameter significant for noise analyses only * IOPR( ) Redundant IO parameter name (e.g. "vto" vs. "vt0") * IOPX( ) IO parameter which is not used by sensetivity in any case * * IOPQ( ) This (Q) parameter must be non-zero for sensetivity of * following Z parameter (model params done first) * IOPZ( ) Prev. 'Q' parameter must be non-zero for sensetivity * IOPQO( ) Like Q, but or-ed with previous Q value * ....U( ) uninteresting for default "show" command output */ # define IOP(a,b,c,d) { a, b, c|IF_SET|IF_ASK, d } # define IOPU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_UNINTERESTING, d } # define IOPP(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_PRINCIPAL, d } # define IOPA(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC, d } # define IOPAU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC|IF_UNINTERESTING,d } # define IOPAP(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC|IF_PRINCIPAL, d } # define IOPAA(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC_ONLY, d } # define IOPAAU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC_ONLY|IF_UNINTERESTING,d} # define IOPPA(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_AC_ONLY|IF_PRINCIPAL, d } # define IOPN(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_NOISE, d } # define IOPR(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_REDUNDANT, NULL } # define IOPX(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_NONSENSE, d } # define IOPXU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_NONSENSE|IF_UNINTERESTING,\ d } # define IOPQ(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_SETQUERY, d } # define IOPQU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_SETQUERY|IF_UNINTERESTING,\ d } # define IOPZ(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_CHKQUERY, d } # define IOPZU(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_CHKQUERY|IF_UNINTERESTING,\ d } # define IOPQO(a,b,c,d) { a, b, c|IF_SET|IF_ASK|IF_ORQUERY, d } # define IP(a,b,c,d) { a , b , c|IF_SET , d } # define OP(a,b,c,d) { a , b , c|IF_ASK , d } # define OPU(a,b,c,d) { a , b , c|IF_ASK|IF_UNINTERESTING , d } # define OPR(a,b,c,d) { a , b , c|IF_ASK|IF_REDUNDANT , d } # define P(a,b,c,d) { a , b , c , d } #define DEV_DEFAULT 0x1 #endif ngspice-26/src/include/ngspice/gendefs.h0000644000265600020320000000310512264261473017656 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_GENDEFS_H #define ngspice_GENDEFS_H #include "ngspice/typedefs.h" #include "ngspice/ifsim.h" /* definitions used to describe generic devices */ /* information used to describe a single instance */ struct GENinstance { GENmodel *GENmodPtr; /* backpointer to model */ GENinstance *GENnextInstance; /* pointer to next instance of * current model*/ IFuid GENname; /* pointer to character string naming this instance */ int GENstate; /* state index number */ int GENnode1; /* appropriate node numbers */ int GENnode2; /* appropriate node numbers */ int GENnode3; /* appropriate node numbers */ int GENnode4; /* appropriate node numbers */ int GENnode5; /* appropriate node numbers */ int GENnode6; /* added to create body node 01/06/99 */ int GENnode7; /* added to create temp node 2/03/99 */ }; /* Generic circuit data */ typedef void GENcircuit; /* per model data */ struct GENmodel { /* model structure for a resistor */ int GENmodType; /* type index of this device type */ GENmodel *GENnextModel; /* pointer to next possible model in * linked list */ GENinstance *GENinstances; /* pointer to list of instances that have this * model */ IFuid GENmodName; /* pointer to character string naming this model */ }; #endif ngspice-26/src/include/ngspice/spmatrix.h0000644000265600020320000002530212264261473020115 0ustar andreasadmin/* * EXPORTS for sparse matrix routines with SPICE3. * * Author: Advising professor: * Kenneth S. Kundert Alberto Sangiovanni-Vincentelli * UC Berkeley * * This file contains definitions that are useful to the calling * program. In particular, this file contains error keyword * definitions, some macro functions that are used to quickly enter * data into the matrix and the type definition of a data structure * that acts as a template for entering admittances into the matrix. * Also included is the type definitions for the various functions * available to the user. * * This file is a modified version of spMatrix.h that is used when * interfacing to Spice3. */ /* * Revision and copyright information. * * Copyright (c) 1985,86,87,88,89,90 * by Kenneth S. Kundert and the University of California. * * Permission to use, copy, modify, and distribute this software and * its documentation for any purpose and without fee is hereby granted, * provided that the copyright notices appear in all copies and * supporting documentation and that the authors and the University of * California are properly credited. The authors and the University of * California make no representations as to the suitability of this * software for any purpose. It is provided `as is', without express * or implied warranty. */ #ifndef spOKAY /* * ERROR KEYWORDS * * The actual numbers used in the error codes are not sacred, they can be * changed under the condition that the codes for the nonfatal errors are * less than the code for spFATAL and similarly the codes for the fatal * errors are greater than that for spFATAL. * * >>> Error descriptions: * spOKAY * No error has occurred. * spSMALL_PIVOT * When reordering the matrix, no element was found which satisfies the * threshold criteria. The largest element in the matrix was chosen * as pivot. Non-fatal. * spZERO_DIAG * Fatal error. A zero was encountered on the diagonal the matrix. This * does not necessarily imply that the matrix is singular. When this * error occurs, the matrix should be reconstructed and factored using * spOrderAndFactor(). * spSINGULAR * Fatal error. Matrix is singular, so no unique solution exists. * spNO_MEMORY * Fatal error. Indicates that not enough memory is available to handle * the matrix. * spPANIC * Fatal error indicating that the routines are not prepared to * handle the matrix that has been requested. This may occur when * the matrix is specified to be real and the routines are not * compiled for real matrices, or when the matrix is specified to * be complex and the routines are not compiled to handle complex * matrices. * spFATAL * Not an error flag, but rather the dividing line between fatal errors * and warnings. */ #include "ngspice/sperror.h" /* Spice error definitions. */ /* Begin error macros. */ #define spOKAY OK #define spSMALL_PIVOT OK #define spZERO_DIAG E_SINGULAR #define spSINGULAR E_SINGULAR #define spNO_MEMORY E_NOMEM #define spPANIC E_BADMATRIX #define spFATAL E_BADMATRIX /* * KEYWORD DEFINITIONS * * Here we define what precision arithmetic Sparse will use. Double * precision is suggested as being most appropriate for circuit * simulation and for C. However, it is possible to change spREAL * to a float for single precision arithmetic. Note that in C, single * precision arithmetic is often slower than double precision. Sparse * internally refers to spREALs as RealNumbers. * * Some C compilers, notably the old VMS compiler, do not handle the keyword * "void" correctly. If this is true for your compiler, remove the * comment delimiters from the redefinition of void to int below. */ #define spREAL double /* #define void int */ /* * PARTITION TYPES * * When factoring a previously ordered matrix using spFactor(), Sparse * operates on a row-at-a-time basis. For speed, on each step, the row * being updated is copied into a full vector and the operations are * performed on that vector. This can be done one of two ways, either * using direct addressing or indirect addressing. Direct addressing * is fastest when the matrix is relatively dense and indirect addressing * is quite sparse. The user can select which partitioning mode is used. * The following keywords are passed to spPartition() and indicate that * Sparse should use only direct addressing, only indirect addressing, or * that it should choose the best mode on a row-by-row basis. The time * required to choose a partition is of the same order of the cost to factor * the matrix. * * If you plan to factor a large number of matrices with the same structure, * it is best to let Sparse choose the partition. Otherwise, you should * choose the partition based on the predicted density of the matrix. */ /* Begin partition keywords. */ #define spDEFAULT_PARTITION 0 #define spDIRECT_PARTITION 1 #define spINDIRECT_PARTITION 2 #define spAUTO_PARTITION 3 /* * MACRO FUNCTION DEFINITIONS * * >>> Macro descriptions: * spADD_REAL_ELEMENT * Macro function that adds data to a real element in the matrix by a * pointer. * spADD_IMAG_ELEMENT * Macro function that adds data to a imaginary element in the matrix by * a pointer. * spADD_COMPLEX_ELEMENT * Macro function that adds data to a complex element in the matrix by a * pointer. * spADD_REAL_QUAD * Macro function that adds data to each of the four real matrix elements * specified by the given template. * spADD_IMAG_QUAD * Macro function that adds data to each of the four imaginary matrix * elements specified by the given template. * spADD_COMPLEX_QUAD * Macro function that adds data to each of the four complex matrix * elements specified by the given template. */ /* Begin Macros. */ #define spADD_REAL_ELEMENT(element,real) *(element) += real #define spADD_IMAG_ELEMENT(element,imag) *(element+1) += imag #define spADD_COMPLEX_ELEMENT(element,real,imag) \ { *(element) += real; \ *(element+1) += imag; \ } #define spADD_REAL_QUAD(template,real) \ { *((template).Element1) += real; \ *((template).Element2) += real; \ *((template).Element3Negated) -= real; \ *((template).Element4Negated) -= real; \ } #define spADD_IMAG_QUAD(template,imag) \ { *((template).Element1+1) += imag; \ *((template).Element2+1) += imag; \ *((template).Element3Negated+1) -= imag; \ *((template).Element4Negated+1) -= imag; \ } #define spADD_COMPLEX_QUAD(template,real,imag) \ { *((template).Element1) += real; \ *((template).Element2) += real; \ *((template).Element3Negated) -= real; \ *((template).Element4Negated) -= real; \ *((template).Element1+1) += imag; \ *((template).Element2+1) += imag; \ *((template).Element3Negated+1) -= imag; \ *((template).Element4Negated+1) -= imag; \ } /* * TYPE DEFINITION FOR COMPONENT TEMPLATE * * This data structure is used to hold pointers to four related elements in * matrix. It is used in conjunction with the routines * spGetAdmittance * spGetQuad * spGetOnes * These routines stuff the structure which is later used by the spADD_QUAD * macro functions above. It is also possible for the user to collect four * pointers returned by spGetElement and stuff them into the template. * The spADD_QUAD routines stuff data into the matrix in locations specified * by Element1 and Element2 without changing the data. The data is negated * before being placed in Element3 and Element4. */ /* Begin `spTemplate'. */ struct spTemplate { spREAL *Element1 ; spREAL *Element2 ; spREAL *Element3Negated; spREAL *Element4Negated; }; typedef struct MatrixFrame *MatrixPtr; /* * FUNCTION TYPE DEFINITIONS * * The type of every user accessible function is declared here. */ /* Begin function declarations. */ extern void spClear( MatrixPtr ); extern spREAL spCondition( MatrixPtr, spREAL, int* ); extern MatrixPtr spCreate( int, int, int* ); extern void spDeleteRowAndCol( MatrixPtr, int, int ); extern void spDestroy( MatrixPtr); extern int spElementCount( MatrixPtr ); extern int spError( MatrixPtr ); extern int spFactor( MatrixPtr ); extern int spFileMatrix( MatrixPtr, char *, char *, int, int, int ); extern int spFileStats( MatrixPtr, char *, char * ); extern int spFillinCount( MatrixPtr ); extern int spGetAdmittance( MatrixPtr, int, int, struct spTemplate* ); extern spREAL *spFindElement(MatrixPtr Matrix, int Row, int Col ); extern spREAL *spGetElement(MatrixPtr, int, int ); extern void *spGetInitInfo( spREAL* ); extern int spGetOnes( MatrixPtr, int, int, int, struct spTemplate* ); extern int spGetQuad( MatrixPtr, int, int, int, int, struct spTemplate* ); extern int spGetSize( MatrixPtr, int ); extern int spInitialize(MatrixPtr, int (*pInit)(spREAL*, void *InitInfo, int, int Col)); extern void spInstallInitInfo( spREAL*, void * ); extern spREAL spLargestElement( MatrixPtr ); extern void spMNA_Preorder( MatrixPtr ); extern spREAL spNorm( MatrixPtr ); extern int spOrderAndFactor(MatrixPtr, spREAL*, spREAL, spREAL, int ); extern int spOriginalCount( MatrixPtr); extern void spPartition( MatrixPtr, int ); extern void spPrint(MatrixPtr, int, int, int ); extern spREAL spPseudoCondition( MatrixPtr ); extern spREAL spRoundoff( MatrixPtr, spREAL ); extern void spScale( MatrixPtr, spREAL*, spREAL* ); extern void spSetComplex( MatrixPtr ); extern void spSetReal( MatrixPtr ); extern void spStripFills( MatrixPtr ); extern void spWhereSingular(MatrixPtr, int*, int* ); extern void spConstMult(MatrixPtr, double); /* Functions with argument lists that are dependent on options. */ extern void spDeterminant ( MatrixPtr, int*, spREAL*, spREAL* ); extern int spFileVector( MatrixPtr, char * , spREAL*, spREAL*); extern void spMultiply( MatrixPtr, spREAL*, spREAL*, spREAL*, spREAL* ); extern void spMultTransposed(MatrixPtr,spREAL*,spREAL*,spREAL*,spREAL*); extern void spSolve( MatrixPtr, spREAL*, spREAL*, spREAL*, spREAL* ); extern void spSolveTransposed(MatrixPtr,spREAL*,spREAL*,spREAL*,spREAL*); #endif /* spOKAY */ ngspice-26/src/include/ngspice/numenum.h0000644000265600020320000000366112264261473017736 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1991 David Gates **********/ /* * Enumerations used by the numerical simulation routines */ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_NUMENUM_H #define ngspice_NUMENUM_H /* Doping Profiles */ #define UNIF 101 #define LIN 102 #define GAUSS 103 #define EXP 104 #define ERRFC 105 #define LOOKUP 106 #define X 107 #define Y 108 /* AC-Analysis Method */ #define SOR 201 #define DIRECT 202 #define SOR_ONLY 203 /* One-Carrier-Simulation Types */ #define N_TYPE 301 #define P_TYPE 302 /* Element, Node, and Edge Types */ #define SEMICON 401 #define INSULATOR 402 #define METAL 403 #define INTERFACE 404 #define CONTACT 405 #define SCHOTTKY 406 #define HETERO 407 /* Material Types */ #define OXIDE 1 #define NITRIDE 2 #define SILICON 3 #define POLYSILICON 4 #define GAAS 5 /* Time-Integration Method */ #ifndef TRAPEZOIDAL #define TRAPEZOIDAL 1 #define BDF 2 #define GEAR 2 #endif /* Mobility Models */ #define SG 1 /* Scharfetter-Gummel Model */ #define CT 2 /* Caughey-Thomas Model */ #define AR 3 /* Arora Model */ #define UF 4 /* Univ. of Florida Model */ #define GA 5 /* Gallium-Arsenide Model */ #define TD 6 /* Temperature Dependent */ #define CCS 7 /* Carrier-Carrier Scattering */ /* Carrier Classification */ #define NUM_CARRIERS 2 #define ELEC 0 #define HOLE 1 #define NUM_CARRTYPES 2 #define MAJOR 0 #define MINOR 1 /* Solvers */ #define SLV_NONE 0 #define SLV_EQUIL 1 #define SLV_BIAS 2 #define SLV_SMSIG 3 /* Output Data Formats */ #define RAWFILE 0 #define HDF 1 /* Time and Memory Statistics Types */ #define NUM_STATTYPES 4 #define STAT_SETUP 0 #define STAT_DC 1 #define STAT_TRAN 2 #define STAT_AC 3 #endif ngspice-26/src/include/ngspice/mif.h0000644000265600020320000000434712264261473017027 0ustar andreasadmin#ifndef ngspice_MIF_H #define ngspice_MIF_H /* =========================================================================== FILE MIF.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file structure definitions global data used with the MIF package. The global data structure is used to circumvent the need to modify argument lists in existing SPICE 3C1 functions. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" #include "ngspice/mifdefs.h" #include "ngspice/cktdefs.h" typedef struct { Mif_Boolean_t init; /* TRUE if first call to model */ Mif_Boolean_t anal_init; /* TRUE if first call for this analysis type */ Mif_Analysis_t anal_type; /* The type of analysis being performed */ Mif_Call_Type_t call_type; /* Type of call to code model - analog or event-driven */ double evt_step; /* The current DC step or time in event analysis */ } Mif_Circuit_Info_t; typedef struct { double current; /* The current dynamic breakpoint time */ double last; /* The last used dynamic breakpoint time */ } Mif_Bkpt_Info_t; typedef struct { Mif_Boolean_t global; /* Set by .option to force all models to use auto */ Mif_Boolean_t local; /* Set by individual model to request auto partials */ } Mif_Auto_Partial_t; typedef struct { Mif_Circuit_Info_t circuit; /* Circuit data that will be needed by MIFload */ MIFinstance *instance; /* Current instance struct */ CKTcircuit *ckt; /* The ckt struct for the circuit */ char *errmsg; /* An error msg from a cm_... function */ Mif_Bkpt_Info_t breakpoint; /* Data used by dynamic breakpoints */ Mif_Auto_Partial_t auto_partial; /* Flags to enable auto partial computations */ } Mif_Info_t; /* These are defined in mif.c */ extern int MIFiSize; extern int MIFmSize; extern Mif_Info_t g_mif_info; #endif ngspice-26/src/include/ngspice/evtproto.h0000644000265600020320000000460212264261473020130 0ustar andreasadmin#ifndef ngspice_EVTPROTO_H #define ngspice_EVTPROTO_H /* =========================================================================== FILE EVTproto.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains ANSI C function prototypes for functions in the event-driven simulation algorithm package. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/cktdefs.h" #include "ngspice/cpstd.h" #include "ngspice/mifdefs.h" #include "ngspice/ipc.h" /* ******************* */ /* Function Prototypes */ /* ******************* */ int EVTinit(CKTcircuit *ckt); /*int EVTinit2(CKTcircuit *ckt);*/ void EVTtermInsert( CKTcircuit *ckt, MIFinstance *fast, char *node_name, char *type_name, int conn_num, int port_num, char **err_msg); int EVTsetup(CKTcircuit *ckt); int EVTiter(CKTcircuit *ckt); void EVTbackup(CKTcircuit *ckt, double new_time); double EVTnext_time(CKTcircuit *ckt); void EVTqueue_output( CKTcircuit *ckt, int output_index, int udn_index, Evt_Output_Event_t *new_event, double posted_time, double event_time); void EVTqueue_inst( CKTcircuit *ckt, int inst_index, double posted_time, double event_time); void EVTdequeue(CKTcircuit *ckt, double time); int EVTload(CKTcircuit *ckt, int inst_index); void EVTprint(wordlist *wl); int EVTop( CKTcircuit *ckt, long firstmode, long continuemode, int max_iter, Mif_Boolean_t first_call); void EVTop_save( CKTcircuit *ckt, Mif_Boolean_t op, double step); void EVTnode_copy( CKTcircuit *ckt, int node_index, Evt_Node_t *from, Evt_Node_t **to); void EVTcall_hybrids(CKTcircuit *ckt); void EVTdump( CKTcircuit *ckt, Ipc_Anal_t mode, double step); void EVTaccept( CKTcircuit *ckt, /* main circuit struct */ double time); /* time at which analog soln was accepted */ struct dvec *EVTfindvec(char *node); #endif ngspice-26/src/include/ngspice/cm.h0000644000265600020320000000137712264261473016653 0ustar andreasadmin#ifndef ngspice_CM_H #define ngspice_CM_H /* =========================================================================== FILE CM.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file is includes all include data in the CM package. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/config.h" #include "ngspice/cmtypes.h" #include "ngspice/cmconstants.h" #include "ngspice/cmproto.h" #include "ngspice/mifcmdat.h" #endif ngspice-26/src/include/ngspice/evt.h0000644000265600020320000003556712264261473017062 0ustar andreasadmin#ifndef ngspice_EVT_H #define ngspice_EVT_H /* =========================================================================== FILE EVT.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains the definition of the evt data structure and all its substructures. The single evt structure is housed inside of the main 3C1 circuit structure 'ckt' and contains virtually all information about the event-driven simulation. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/mifdefs.h" #include "ngspice/mifcmdat.h" #include "ngspice/miftypes.h" /* ************** */ /* Info structure */ /* ************** */ typedef struct Evt_Output_Info_s { struct Evt_Output_Info_s *next; /* the next in the linked list */ int node_index; /* index into node info struct for this output */ int output_subindex; /* index into output data in node data struct */ int inst_index; /* Index of instance the port is on */ int port_index; /* Index of port the output corresponds to */ } Evt_Output_Info_t; typedef struct Evt_Port_Info_s { struct Evt_Port_Info_s *next; /* the next in the linked list of node info */ int inst_index; /* Index of instance the port is on */ int node_index; /* index of node the port is connected to */ char *node_name; /* name of node port is connected to */ char *inst_name; /* instance name */ char *conn_name; /* connection name on instance */ int port_num; /* port number of instance connector */ } Evt_Port_Info_t; typedef struct Evt_Inst_Index_s { struct Evt_Inst_Index_s *next; /* the next in the linked list */ int index; /* the value of the index */ } Evt_Inst_Index_t; typedef struct Evt_Node_Info_s { struct Evt_Node_Info_s *next; /* the next in the linked list */ char *name; /* Name of node in deck */ int udn_index; /* Index of the node type */ Mif_Boolean_t invert; /* True if need to make inverted copy */ int num_ports; /* Number of ports connected to this node */ int num_outputs; /* Number of outputs connected to this node */ int num_insts; /* The number of insts receiving node as input */ Evt_Inst_Index_t *inst_list; /* Linked list of indexes of these instances */ } Evt_Node_Info_t; typedef struct Evt_Inst_Info_s { struct Evt_Inst_Info_s *next; /* the next in the linked list of node info */ MIFinstance *inst_ptr; /* Pointer to MIFinstance struct for this instance */ } Evt_Inst_Info_t; typedef struct { Evt_Inst_Info_t *inst_list; /* static info about event/hybrid instances */ Evt_Node_Info_t *node_list; /* static info about event nodes */ Evt_Port_Info_t *port_list; /* static info about event ports */ Evt_Output_Info_t *output_list; /* static info about event outputs */ int *hybrid_index; /* vector of inst indexs for hybrids */ Evt_Inst_Info_t **inst_table; /* vector of pointers to elements in inst_list */ Evt_Node_Info_t **node_table; /* vector of pointers to elements in node_list */ Evt_Port_Info_t **port_table; /* vector of pointers to elements in port_list */ Evt_Output_Info_t **output_table; /* vector of pointers to elements in output_list */ } Evt_Info_t; /* *************** */ /* Queue structure */ /* *************** */ typedef struct Evt_Inst_Event_s { struct Evt_Inst_Event_s *next; /* the next in the linked list */ double event_time; /* Time for this event to happen */ double posted_time; /* Time at which event was entered in queue */ } Evt_Inst_Event_t; typedef struct { Evt_Inst_Event_t **head; /* Beginning of linked lists */ Evt_Inst_Event_t ***current; /* Beginning of pending events */ Evt_Inst_Event_t ***last_step; /* Values of 'current' at last accepted timepoint */ Evt_Inst_Event_t **free; /* Linked lists of items freed by backups */ double last_time; /* Time at which last_step was set */ double next_time; /* Earliest next event time in queue */ int num_modified; /* Number modified since last accepted timepoint */ int *modified_index; /* Indexes of modified instances */ Mif_Boolean_t *modified; /* Flags used to prevent multiple entries */ int num_pending; /* Count of number of pending events in lists */ int *pending_index; /* Indexes of pending events */ Mif_Boolean_t *pending; /* Flags used to prevent multiple entries */ int num_to_call; /* Count of number of instances that need to be called */ int *to_call_index; /* Indexes of instances to be called */ Mif_Boolean_t *to_call; /* Flags used to prevent multiple entries */ } Evt_Inst_Queue_t; typedef struct { int num_to_eval; /* Count of number of nodes that need to be evaluated */ int *to_eval_index; /* Indexes of nodes to be evaluated */ Mif_Boolean_t *to_eval; /* Flags used to prevent multiple entries */ int num_changed; /* Count of number of nodes that changed */ int *changed_index; /* Indexes of nodes that changed */ Mif_Boolean_t *changed; /* Flags used to prevent multiple entries */ } Evt_Node_Queue_t; typedef struct Evt_Output_Event_s { struct Evt_Output_Event_s *next; /* the next in the linked list */ double event_time; /* Time for this event to happen */ double posted_time; /* Time at which event was entered in queue */ Mif_Boolean_t removed; /* True if event has been deactivated */ double removed_time; /* Time at which event was deactivated */ void *value; /* The delayed value sent to this output */ } Evt_Output_Event_t; typedef struct { Evt_Output_Event_t **head; /* Beginning of linked lists */ Evt_Output_Event_t ***current; /* Beginning of pending events */ Evt_Output_Event_t ***last_step; /* Values of 'current' at last accepted timepoint */ Evt_Output_Event_t **free; /* Linked lists of items freed by backups */ double last_time; /* Time at which last_step was set */ double next_time; /* Earliest next event time in queue */ int num_modified; /* Number modified since last accepted timepoint */ int *modified_index; /* Indexes of modified outputs */ Mif_Boolean_t *modified; /* Flags used to prevent multiple entries */ int num_pending; /* Count of number of pending events in lists */ int *pending_index; /* Indexes of pending events */ Mif_Boolean_t *pending; /* Flags used to prevent multiple entries */ int num_changed; /* Count of number of outputs that changed */ int *changed_index; /* Indexes of outputs that changed */ Mif_Boolean_t *changed; /* Flags used to prevent multiple entries */ } Evt_Output_Queue_t; typedef struct { Evt_Inst_Queue_t inst; /* dynamic queue for instances */ Evt_Node_Queue_t node; /* dynamic queue of changing nodes */ Evt_Output_Queue_t output; /* dynamic queue of delayed outputs */ } Evt_Queue_t; /* ************** */ /* Data structure */ /* ************** */ typedef struct Evt_Node_s { struct Evt_Node_s *next; /* pointer to next in linked list */ Mif_Boolean_t op; /* true if computed from op analysis */ double step; /* DC step or time at which data was computed */ void **output_value; /* Array of outputs posted to this node */ void *node_value; /* Resultant computed from output values */ void *inverted_value; /* Inverted copy of node_value */ } Evt_Node_t; typedef struct { Evt_Node_t **head; /* Beginning of linked lists */ Evt_Node_t ***tail; /* Location of last item added to list */ Evt_Node_t ***last_step; /* 'tail' at last accepted timepoint */ Evt_Node_t **free; /* Linked lists of items freed by backups */ int num_modified; /* Number modified since last accepted timepoint */ int *modified_index; /* Indexes of modified nodes */ Mif_Boolean_t *modified; /* Flags used to prevent multiple entries */ Evt_Node_t *rhs; /* Location where model outputs are placed */ Evt_Node_t *rhsold; /* Location where model inputs are retrieved */ double *total_load; /* Location where total load inputs are retrieved */ } Evt_Node_Data_t; typedef struct Evt_State_s { struct Evt_State_s *next; /* Pointer to next state */ struct Evt_State_s *prev; /* Pointer to previous state */ double step; /* Time at which state was assigned (0 for DC) */ void *block; /* Block of memory holding all states on inst */ } Evt_State_t; typedef struct Evt_State_Desc_s { struct Evt_State_Desc_s *next; /* Pointer to next description */ int tag; /* Tag for this state */ int size; /* Size of this state */ int offset; /* Offset of this state into the state block */ } Evt_State_Desc_t; typedef struct { Evt_State_t **head; /* Beginning of linked lists */ Evt_State_t ***tail; /* Location of last item added to list */ Evt_State_t ***last_step; /* 'tail' at last accepted timepoint */ Evt_State_t **free; /* Linked lists of items freed by backups */ int num_modified; /* Number modified since last accepted timepoint */ int *modified_index; /* List of indexes modified */ Mif_Boolean_t *modified; /* Flags used to prevent multiple entries */ int *total_size; /* Total bytes for all states allocated */ Evt_State_Desc_t **desc; /* Lists of description structures */ } Evt_State_Data_t; typedef struct Evt_Msg_s { struct Evt_Msg_s *next; /* Pointer to next state */ Mif_Boolean_t op; /* true if output from op analysis */ double step; /* DC step or time at which message was output */ char *text; /* The value of the message text */ int port_index; /* The index of the port from which the message came */ } Evt_Msg_t; typedef struct { Evt_Msg_t **head; /* Beginning of linked lists */ Evt_Msg_t ***tail; /* Location of last item added to list */ Evt_Msg_t ***last_step; /* 'tail' at last accepted timepoint */ Evt_Msg_t **free; /* Linked lists of items freed by backups */ int num_modified; /* Number modified since last accepted timepoint */ int *modified_index; /* List of indexes modified */ Mif_Boolean_t *modified; /* Flags used to prevent multiple entries */ } Evt_Msg_Data_t; typedef struct { int op_alternations; /* Total alternations between event and analog */ int op_load_calls; /* Total load calls in DCOP analysis */ int op_event_passes; /* Total passes through event iteration loop */ int tran_load_calls; /* Total inst calls in transient analysis */ int tran_time_backups; /* Number of transient timestep cuts */ } Evt_Statistic_t; typedef struct { Evt_Node_Data_t *node; /* dynamic event solution vector */ Evt_State_Data_t *state; /* dynamic event instance state data */ Evt_Msg_Data_t *msg; /* dynamic event message data */ Evt_Statistic_t *statistics; /* Statistics for events, etc. */ } Evt_Data_t; /* **************** */ /* Counts structure */ /* **************** */ typedef struct { int num_insts; /* number of event/hybrid instances parsed */ int num_hybrids; /* number of hybrids parsed */ int num_hybrid_outputs; /* number of outputs on all hybrids parsed */ int num_nodes; /* number of event nodes parsed */ int num_ports; /* number of event ports parsed */ int num_outputs; /* number of event outputs parsed */ } Evt_Count_t; /* **************** */ /* Limits structure */ /* **************** */ typedef struct { int max_event_passes; /* maximum loops in attempting convergence of event nodes */ int max_op_alternations; /* maximum loops through event/analog alternation */ } Evt_Limit_t; /* ************** */ /* Jobs structure */ /* ************** */ typedef struct { int num_jobs; /* Number of jobs run */ char **job_name; /* Names of different jobs */ Evt_Node_Data_t **node_data; /* node_data for different jobs */ Evt_State_Data_t **state_data; /* state_data for different jobs */ Evt_Msg_Data_t **msg_data; /* messages for different jobs */ Evt_Statistic_t **statistics; /* Statistics for different jobs */ } Evt_Job_t; /* ***************** */ /* Options structure */ /* ***************** */ typedef struct { Mif_Boolean_t op_alternate; /* Alternate analog/event solutions in OP analysis */ } Evt_Option_t; /* ****************** */ /* Main evt structure */ /* ****************** */ typedef struct { Evt_Count_t counts; /* Number of insts, nodes, etc. */ Evt_Info_t info; /* Static info about insts, etc. */ Evt_Queue_t queue; /* Dynamic queued events */ Evt_Data_t data; /* Results and state data */ Evt_Limit_t limits; /* Iteration limits, etc. */ Evt_Job_t jobs; /* Data held from multiple job runs */ Evt_Option_t options; /* Data input on .options cards */ } Evt_Ckt_Data_t; #endif ngspice-26/src/include/ngspice/dstring.h0000644000265600020320000000367612264261473017732 0ustar andreasadmin/* dstring.h */ #ifndef ngspice_DSTRING_H #define ngspice_DSTRING_H /* ----------------------------------------------------------------- * This structure is modified from Tcl. We do this to avoid a * conflict and later add a conditional compile to just use the Tcl * code if desired. ----------------------------------------------------------------- */ #define SPICE_DSTRING_STATIC_SIZE 200 typedef struct spice_dstring { char *string ; /* Points to beginning of string: either * staticSpace below or a malloced array. */ int length ; /* Number of non-NULL characters in the * string. */ int spaceAvl ; /* Total number of bytes available for the * string and its terminating NULL char. */ char staticSpace[SPICE_DSTRING_STATIC_SIZE] ; /* Space to use in common case where string * is small. */ } SPICE_DSTRING, *SPICE_DSTRINGPTR ; /* ----------------------------------------------------------------- * spice_dstring_xxxx routines. Used to manipulate dynamic strings. ----------------------------------------------------------------- */ extern void spice_dstring_init(SPICE_DSTRINGPTR dsPtr) ; extern char *spice_dstring_append(SPICE_DSTRINGPTR dsPtr,const char *string,int length) ; extern char *spice_dstring_append_lower(SPICE_DSTRINGPTR dsPtr,const char *string,int length) ; extern char *spice_dstring_append_char(SPICE_DSTRINGPTR dsPtr,char c) ; extern char *spice_dstring_print(SPICE_DSTRINGPTR dsPtr,const char *format, ... ) ; extern char *spice_dstring_setlength(SPICE_DSTRINGPTR dsPtr,int length) ; extern char *_spice_dstring_setlength(SPICE_DSTRINGPTR dsPtr,int length) ; extern void spice_dstring_free(SPICE_DSTRINGPTR dsPtr) ; #define spice_dstring_reinit(x_xz) spice_dstring_setlength(x_xz,0) ; #define spice_dstring_value(x_xz) ((x_xz)->string) #define spice_dstring_space(x_xz) ((x_xz)->spaceAvl) #define spice_dstring_length(x_xz) ((x_xz)->length) #endif ngspice-26/src/include/ngspice/ipcproto.h0000644000265600020320000000517412264261473020112 0ustar andreasadmin#ifndef ngspice_IPCPROTO_H #define ngspice_IPCPROTO_H /* IPC.c */ Ipc_Boolean_t kw_match (char *keyword , char *str ); Ipc_Status_t ipc_initialize_server (char *server_name , Ipc_Mode_t m , Ipc_Protocol_t p ); Ipc_Status_t ipc_terminate_server (void ); Ipc_Status_t ipc_get_line (char *str , int *len , Ipc_Wait_t wait ); Ipc_Status_t ipc_flush (void ); Ipc_Status_t ipc_send_line_binary (char *str , int len ); Ipc_Status_t ipc_send_line (char *str ); Ipc_Status_t ipc_send_data_prefix (double time ); Ipc_Status_t ipc_send_dcop_prefix (void ); Ipc_Status_t ipc_send_data_suffix (void ); Ipc_Status_t ipc_send_dcop_suffix (void ); Ipc_Status_t ipc_send_errchk (void ); Ipc_Status_t ipc_send_end (void ); int stuff_binary_v1 (double d1 , double d2 , int n , char *buf , int pos ); Ipc_Status_t ipc_send_double (char *tag , double value ); Ipc_Status_t ipc_send_complex (char *tag , Ipc_Complex_t value ); Ipc_Status_t ipc_send_int (char *tag , int value ); Ipc_Status_t ipc_send_boolean (char *tag , Ipc_Boolean_t value ); Ipc_Status_t ipc_send_string (char *tag , char *value ); Ipc_Status_t ipc_send_int_array (char *tag , int array_len , int *value ); Ipc_Status_t ipc_send_double_array (char *tag , int array_len , double *value ); Ipc_Status_t ipc_send_complex_array (char *tag , int array_len , Ipc_Complex_t *value ); Ipc_Status_t ipc_send_boolean_array (char *tag , int array_len , Ipc_Boolean_t *value ); Ipc_Status_t ipc_send_string_array (char *tag , int array_len , char **value ); Ipc_Status_t ipc_send_evtdict_prefix (void ); Ipc_Status_t ipc_send_evtdict_suffix (void ); Ipc_Status_t ipc_send_evtdata_prefix (void ); Ipc_Status_t ipc_send_evtdata_suffix (void ); Ipc_Status_t ipc_send_event(int, double, double, char *, void *, int); /* IPCtiein.c */ void ipc_handle_stop (void ); void ipc_handle_returni (void ); void ipc_handle_mintime (double time ); void ipc_handle_vtrans (char *vsrc , char *dev ); void ipc_send_stdout (void ); void ipc_send_stderr (void ); Ipc_Status_t ipc_send_std_files (void ); Ipc_Boolean_t ipc_screen_name (char *name , char *mapped_name ); int ipc_get_devices (CKTcircuit *circuit , char *device , char ***names , double **modtypes ); void ipc_free_devices (int num_items , char **names , double *modtypes ); void ipc_check_pause_stop (void ); /* IPCaegis.c */ Ipc_Status_t ipc_transport_initialize_server (char *server_name , Ipc_Mode_t m , Ipc_Protocol_t p , char *batch_filename ); Ipc_Status_t extract_msg (char *str , int *len ); Ipc_Status_t ipc_transport_get_line (char *str , int *len , Ipc_Wait_t wait ); Ipc_Status_t ipc_transport_terminate_server (void ); Ipc_Status_t ipc_transport_send_line (char *str , int len ); #endif ngspice-26/src/include/ngspice/carddefs.h0000644000265600020320000000124212264261473020016 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_CARDDEFS_H #define ngspice_CARDDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ #include "ngspice/bdrydefs.h" #include "ngspice/contdefs.h" #include "ngspice/domndefs.h" #include "ngspice/dopdefs.h" #include "ngspice/elctdefs.h" #include "ngspice/meshdefs.h" #include "ngspice/methdefs.h" #include "ngspice/matldefs.h" #include "ngspice/mobdefs.h" #include "ngspice/modldefs.h" #include "ngspice/optndefs.h" #include "ngspice/outpdefs.h" #endif ngspice-26/src/include/ngspice/plot.h0000644000265600020320000000205112264261473017220 0ustar andreasadmin#ifndef ngspice_PLOT_H #define ngspice_PLOT_H #include "ngspice/wordlist.h" #include "ngspice/bool.h" #include "ngspice/dvec.h" #include "ngspice/hash.h" struct ccom; /* The information for a particular set of vectors that come from one * plot. */ struct plot { char *pl_title; /* The title card. */ char *pl_date; /* Date. */ char *pl_name; /* The plot name. */ char *pl_typename; /* Tran1, op2, etc. */ struct dvec *pl_dvecs; /* The data vectors in this plot. */ struct dvec *pl_scale; /* The "scale" for the rest of the vectors. */ struct plot *pl_next; /* List of plots. */ NGHASHPTR pl_lookup_table; /* for quick lookup of vectors */ wordlist *pl_commands; /* Commands to execute for this plot. */ struct variable *pl_env; /* The 'environment' for this plot. */ struct ccom *pl_ccom; /* The ccom struct for this plot. */ bool pl_written; /* Some or all of the vecs have been saved. */ bool pl_lookup_valid; /* vector lookup table valid */ int pl_ndims; /* Number of dimensions */ } ; #endif ngspice-26/src/include/ngspice/ftedbgra.h0000644000265600020320000000055212264261473020024 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1987 Jeffrey M. Hsu **********/ /* External definitions for the graph database module. */ extern GRAPH *currentgraph; extern GRAPH *NewGraph(void); extern GRAPH *FindGraph(int id); extern GRAPH *CopyGraph(GRAPH *graph); extern void RemoveWindow(GRAPH*); ngspice-26/src/include/ngspice/enh.h0000644000265600020320000000602712264261473017023 0ustar andreasadmin#ifndef ngspice_ENH_H #define ngspice_ENH_H /* =========================================================================== FILE ENH.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains typedefs used by the event-driven algorithm. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/miftypes.h" #include "ngspice/fteinp.h" /* The following data is used in implementing various enhancements made to the simulator. The main struct is dynamically allocated in ckt so that incremental additions can be made more easily without the need to recompile multiple modules. Allocation and initialization is done in CKTinit.c which should be the only module needed to recompile after additions are made here. */ typedef enum { ENH_ANALOG_NODE, /* An analog node */ ENH_EVENT_NODE, /* An event-driven node */ ENH_ANALOG_BRANCH, /* A branch current */ ENH_ANALOG_INSTANCE, /* An analog instance */ ENH_EVENT_INSTANCE, /* An event-driven instance */ ENH_HYBRID_INSTANCE, /* A hybrid (analog/event-driven) instance */ } Enh_Conv_Source_t; typedef struct { double current; /* The current dynamic breakpoint time */ double last; /* The last used dynamic breakpoint time */ } Enh_Bkpt_t; typedef struct { double ramptime; /* supply ramping time specified on .options */ } Enh_Ramp_t; typedef struct { Mif_Boolean_t last_NIiter_call; /* True if this is the last call to NIiter() */ Mif_Boolean_t report_conv_probs; /* True if conv test functions should send debug info */ } Enh_Conv_Debug_t; typedef struct { Mif_Boolean_t enabled; /* True if convergence limiting enabled on code models */ double abs_step; /* Minimum limiting step size */ double step; /* Fractional step amount */ } Enh_Conv_Limit_t; typedef struct { Mif_Boolean_t enabled; /* True if rshunt option used */ double gshunt; /* 1.0 / rshunt */ int num_nodes; /* Number of nodes in matrix */ double **diag; /* Pointers to matrix diagonals */ } Enh_Rshunt_t; typedef struct { Enh_Bkpt_t breakpoint; /* Data used by dynamic breakpoints */ Enh_Ramp_t ramp; /* New options added to simulator */ Enh_Conv_Debug_t conv_debug; /* Convergence debug info dumping data */ Enh_Conv_Limit_t conv_limit; /* Convergence limiting info */ Enh_Rshunt_t rshunt_data; /* Shunt conductance from nodes to ground */ } Enh_Ckt_Data_t; void ENHreport_conv_prob(Enh_Conv_Source_t type, char *name, char *msg); struct line *ENHtranslate_poly(struct line *deck); #endif ngspice-26/src/include/ngspice/cmproto.h0000644000265600020320000000567012264261473017737 0ustar andreasadmin#ifndef ngspice_CMPROTO_H #define ngspice_CMPROTO_H /* =========================================================================== FILE CMproto.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Jeff Murray, Bill Kuhn MODIFICATIONS SUMMARY This file contains ANSI C function prototypes for cm_xxx functions called by code models. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ /* Prototypes for functions used by internal code models */ /* The actual functions reside in ../ICM/CMutil.c */ /* 12/17/90 */ #include #include "ngspice/cmtypes.h" void cm_climit_fcn(double in, double in_offset, double cntl_upper, double cntl_lower, double lower_delta, double upper_delta, double limit_range, double gain, int percent, double *out_final, double *pout_pin_final, double *pout_pcntl_lower_final, double *pout_pcntl_upper_final); void cm_smooth_corner(double x_input, double x_center, double y_center, double domain, double lower_slope, double upper_slope, double *y_output, double *dy_dx); void cm_smooth_discontinuity(double x_input, double x_lower, double y_lower, double x_upper, double y_upper, double *y_output, double *dy_dx); double cm_smooth_pwl(double x_input, double *x, double *y, int size, double input_domain, double *dout_din); double cm_analog_ramp_factor(void); void cm_analog_alloc(int tag, int bytes); void *cm_analog_get_ptr(int tag, int timepoint); int cm_analog_integrate(double integrand, double *integral, double *partial); int cm_analog_converge(double *state); int cm_analog_set_temp_bkpt(double time); int cm_analog_set_perm_bkpt(double time); void cm_analog_not_converged(void); void cm_analog_auto_partial(void); void cm_event_alloc(int tag, int bytes); void *cm_event_get_ptr(int tag, int timepoint); int cm_event_queue(double time); char *cm_message_get_errmsg(void); int cm_message_send(char *msg); double cm_netlist_get_c(void); double cm_netlist_get_l(void); Complex_t cm_complex_set(double real, double imag); Complex_t cm_complex_add(Complex_t x, Complex_t y); Complex_t cm_complex_subtract(Complex_t x, Complex_t y); Complex_t cm_complex_multiply(Complex_t x, Complex_t y); Complex_t cm_complex_divide(Complex_t x, Complex_t y); FILE *cm_stream_out(void); FILE *cm_stream_in(void); FILE *cm_stream_err(void); void *malloc_pj(size_t s); void *calloc_pj(size_t s1, size_t s2); void *realloc_pj(void *ptr, size_t s); void free_pj(void *ptr); FILE *fopen_with_path(const char *path, const char *mode); #endif ngspice-26/src/include/ngspice/distodef.h0000644000265600020320000001460512264261473020053 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1988 Jaijeet S Roychowdhury Modified: 2000 AlansFixes **********/ #ifndef ngspice_DISTODEF_H #define ngspice_DISTODEF_H #ifdef D_DBG_ALLTIMES #define D_DBG_BLOCKTIMES #define D_DBG_SMALLTIMES #endif #include "ngspice/jobdefs.h" #include "ngspice/gendefs.h" #include "ngspice/cktdefs.h" /* structure for passing a large number of values */ typedef struct { double cxx; double cyy; double czz; double cxy; double cyz; double cxz; double cxxx; double cyyy; double czzz; double cxxy; double cxxz; double cxyy; double cyyz; double cxzz; double cyzz; double cxyz; double r1h1x; double i1h1x; double r1h1y; double i1h1y; double r1h1z; double i1h1z; double r1h2x; double i1h2x; double r1h2y; double i1h2y; double r1h2z; double i1h2z; double r2h11x; double i2h11x; double r2h11y; double i2h11y; double r2h11z; double i2h11z; double h2f1f2x; double ih2f1f2x; double h2f1f2y; double ih2f1f2y; double h2f1f2z; double ih2f1f2z; } DpassStr; /* structure to keep derivatives of upto 3rd order w.r.t 3 variables */ typedef struct { double value; double d1_p; double d1_q; double d1_r; double d2_p2; double d2_q2; double d2_r2; double d2_pq; double d2_qr; double d2_pr; double d3_p3; double d3_q3; double d3_r3; double d3_p2q; double d3_p2r; double d3_pq2; double d3_q2r; double d3_pr2; double d3_qr2; double d3_pqr; } Dderivs; /* structure used to describe an DISTO analysis to be performed */ typedef struct { int JOBtype; JOB *JOBnextJob; /* pointer to next thing to do */ char *JOBname; /* name of this job */ double DstartF1; /* the start value of the higher frequency for distortion analysis */ double DstopF1; /* the stop value ove above */ double DfreqDelta; /* multiplier for decade/octave stepping, step for linear steps. */ double DsaveF1; /* frequency at which we left off last time*/ int DstepType; /* values described below */ int DnumSteps; int Df2wanted; /* set if f2overf1 is given in the disto command line */ int Df2given; /* set if at least 1 source has an f2 input */ double Df2ovrF1; /* ratio of f2 over f1 if 2 frequencies given should be < 1 */ double Domega1; /* current omega1 */ double Domega2; /* current omega2 */ double* r1H1ptr; double* i1H1ptr; double* r2H11ptr; double* i2H11ptr; double* r3H11ptr; double* i3H11ptr; double* r1H2ptr; /* distortion analysis Volterra transforms */ double* i1H2ptr; double* r2H12ptr; double* i2H12ptr; double* r2H1m2ptr; double* i2H1m2ptr; double* r3H1m2ptr; double* i3H1m2ptr; double** r1H1stor; double** i1H1stor; double** r2H11stor; double** i2H11stor; double** r3H11stor; double** i3H11stor; /*these store computed values*/ double** r1H2stor; /* for the plots */ double** i1H2stor; double** r2H12stor; double** i2H12stor; double** r2H1m2stor; double** i2H1m2stor; double** r3H1m2stor; double** i3H1m2stor; } DISTOAN; /* available step types: */ #define DECADE 1 #define OCTAVE 2 #define LINEAR 3 /* defns. used in DsetParm */ #define D_DEC 1 #define D_OCT 2 #define D_LIN 3 #define D_START 4 #define D_STOP 5 #define D_STEPS 6 #define D_F2OVRF1 7 /* defns. used by CKTdisto for calling different functions */ #define D_SETUP 1 #define D_F1 2 #define D_F2 3 #define D_TWOF1 4 #define D_THRF1 5 #define D_F1PF2 6 #define D_F1MF2 7 #define D_2F1MF2 8 #define D_RHSF1 9 #define D_RHSF2 10 extern int DsetParm(CKTcircuit*,JOB *,int,IFvalue*); extern int DaskQuest(CKTcircuit*,JOB *,int,IFvalue*); extern double D1i2F1(double, double, double); extern double D1i3F1(double, double, double, double, double, double); extern double D1iF12(double, double, double, double, double); extern double D1i2F12(double, double, double, double, double, double, double, double, double, double); extern double D1n2F1(double, double, double); extern double D1n3F1(double, double, double, double, double, double); extern double D1nF12(double, double, double, double, double); extern double D1n2F12(double, double, double, double, double, double, double, double, double, double); extern double DFn2F1(double, double, double, double, double, double, double, double, double, double, double, double); extern double DFi2F1(double, double, double, double, double, double, double, double, double, double, double, double); extern double DFi3F1(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double); extern double DFn3F1(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double); extern double DFnF12(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double); extern double DFiF12(double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double, double); extern double DFn2F12(DpassStr*); extern double DFi2F12(DpassStr*); extern void EqualDeriv(Dderivs *, Dderivs *); extern void TimesDeriv(Dderivs *, Dderivs *, double); extern void InvDeriv(Dderivs *, Dderivs *); extern void MultDeriv(Dderivs *, Dderivs *, Dderivs *); extern void CubeDeriv(Dderivs *, Dderivs *); extern void PlusDeriv(Dderivs *, Dderivs *, Dderivs *); extern void SqrtDeriv(Dderivs *, Dderivs *); extern void DivDeriv(Dderivs *, Dderivs *, Dderivs *); extern void PowDeriv(Dderivs *, Dderivs *, double); extern void AtanDeriv(Dderivs *, Dderivs *); extern void CosDeriv(Dderivs *, Dderivs *); extern void TanDeriv(Dderivs *, Dderivs *); extern void ExpDeriv(Dderivs *, Dderivs *); extern int CKTdisto(CKTcircuit *ckt, int mode); extern int DkerProc(int type, double *rPtr, double *iPtr, int size, DISTOAN *job); #endif ngspice-26/src/include/ngspice/fteparse.h0000644000265600020320000000505712264261473020064 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * * Stuff for parsing -- used by the parser and in ft_evaluate(). */ #ifndef ngspice_FTEPARSE_H #define ngspice_FTEPARSE_H #include "ngspice/cpstd.h" #include "ngspice/dvec.h" #include "ngspice/plot.h" /* FIXME: Split this file and adjust all callers. */ #if 0 #warning "Please use a more specific header than fteparse.h" #endif #include "ngspice/pnode.h" /* Operations. These should really be considered functions. */ struct op { int op_num; /* From parser #defines. */ char *op_name; /* Printing name. */ char op_arity; /* One or two. */ union { void (*anonymous)(void); struct dvec *(*unary)(struct pnode *); struct dvec *(*binary)(struct pnode *, struct pnode *); } op_func; /* The function to do the work. */ } ; /* The functions that are available. */ struct func { /* The print name of the function. */ char *fu_name; /* The function. */ void *(*fu_func)(void *data, short int type, int length, int *newlength, short int *newtype); } ; /* User-definable functions. The idea of ud_name is that the args are * kept in strings after the name, all seperated by '\0's. There * will be ud_arity of them. */ struct udfunc { char *ud_name; /* The name. */ int ud_arity; /* The arity of the function. */ struct pnode *ud_text; /* The definition. */ struct udfunc *ud_next; /* Link pointer. */ } ; /* Parser elements. */ struct element { int e_token; /* One of the below. */ int e_type; /* If the token is VALUE. */ union { char *un_string; double un_double; struct pnode *un_pnode; } e_un; #define e_string e_un.un_string #define e_double e_un.un_double #define e_indices e_un.un_indices #define e_pnode e_un.un_pnode }; /* See the table in parse.c */ #define PT_OP_END 0 #define PT_OP_PLUS 1 #define PT_OP_MINUS 2 #define PT_OP_TIMES 3 #define PT_OP_MOD 4 #define PT_OP_DIVIDE 5 #define PT_OP_POWER 6 #define PT_OP_UMINUS 7 #define PT_OP_LPAREN 8 #define PT_OP_RPAREN 9 #define PT_OP_COMMA 10 #define PT_OP_VALUE 11 #define PT_OP_EQ 12 #define PT_OP_GT 13 #define PT_OP_LT 14 #define PT_OP_GE 15 #define PT_OP_LE 16 #define PT_OP_NE 17 #define PT_OP_AND 18 #define PT_OP_OR 19 #define PT_OP_NOT 20 #define PT_OP_INDX 21 #define PT_OP_RANGE 22 #define PT_OP_TERNARY 23 #endif ngspice-26/src/include/ngspice/FastNorm3.h0000644000265600020320000000214712264261473020064 0ustar andreasadmin/* Last revised 28-1-1999 */ /* This is the header file FastNorm3.h to be included in code files using FastNorm3.c */ /* I M P O R T A N T ! ! ! ! ! The definition below should be altered to ensure that integer arithmetic is done on 32-bit words. It may need to be changed from int to long on some platforms. The 32-bit requirement arises from the use of a Uniform pseudo-random generator in part of the code, which assumes 32-bit twos-complement arithmetic. In dire need, replace this generator with another more suitable for the platform. The rest of the code assumes only that signed integers up to a bit less than 2^31 can be handled. */ #define Sw int /* MUST define Sw as a 32-bit integer or longer */ #define Sf double extern int gaussfaze; extern int gaussmask; extern double *gausssave; extern double GScale; #define FastNorm ((--gaussfaze)?GScale*gausssave[gaussfaze]:fastnorm()) void initnorm(Sw seed, Sw quoll); Sf fastnorm (void); Sf c7rand(Sw*); Sw irandm(Sw*); unsigned Sw urandm(Sw*); double adchi (double a, int *is); double rgamma (double g, int *is); Sf renormalize(void); ngspice-26/src/include/ngspice/Makefile.am0000644000265600020320000000331512264261473020131 0ustar andreasadmin## Process this file with automake to produce Makefile.in includedir = $(pkgdatadir)/include/ngspice nodist_include_HEADERS = \ config.h include_HEADERS = \ tclspice.h \ acdefs.h \ bdrydefs.h \ bool.h \ carddefs.h \ ciderinp.h \ cidersupt.h \ cktdefs.h \ cluster.h \ cmconstants.h \ cm.h \ cmproto.h \ cmtypes.h \ compatmode.h \ complex.h \ const.h \ contdefs.h \ cpdefs.h \ cpextern.h \ cpstd.h \ defines.h \ devdefs.h \ dgen.h \ distodef.h \ dllitf.h \ domndefs.h \ dopdefs.h \ dstring.h \ dvec.h \ elctdefs.h \ enh.h \ evt.h \ evtproto.h \ evtudn.h \ ftedbgra.h \ ftedebug.h \ ftedefs.h \ fteoptdefs.h \ ftedev.h \ fteext.h \ fteinp.h \ fteinput.h \ fteparse.h \ gendefs.h \ gendev.h \ graph.h \ grid.h \ hash.h \ hlpdefs.h \ iferrmsg.h \ ifsim.h \ inpdefs.h \ inpmacs.h \ inpptree.h \ ipc.h \ ipcproto.h \ ipctiein.h \ jobdefs.h \ lsort.h \ macros.h \ material.h \ matldefs.h \ memory.h \ meshdefs.h \ meshext.h \ methdefs.h \ mifcmdat.h \ mifdefs.h \ mif.h \ mifparse.h \ mifproto.h \ miftypes.h \ missing_math.h \ mobdefs.h \ modldefs.h \ multi_line.h \ ngspice.h \ noisedef.h \ numcards.h \ numconst.h \ numenum.h \ numgen.h \ numglobs.h \ onedev.h \ onemesh.h \ opdefs.h \ optdefs.h \ optndefs.h \ outpdefs.h \ plot.h \ pnode.h \ profile.h \ pssdefs.h \ pzdefs.h \ sen2defs.h \ sensdefs.h \ sensgen.h \ sharedspice.h \ sim.h \ smpdefs.h \ sperror.h \ spmatrix.h \ stringutil.h \ suffix.h \ swec.h \ tfdefs.h \ trandefs.h \ trcvdefs.h \ tskdefs.h \ twodev.h \ twomesh.h \ typedefs.h \ wordlist.h \ 1-f-code.h \ FastNorm3.h \ fftext.h \ wallace.h \ wstdio.h MAINTAINERCLEANFILES = Makefile.in ngspice-26/src/include/ngspice/mobdefs.h0000644000265600020320000000302212264261473017660 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_MOBDEFS_H #define ngspice_MOBDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sMOBcard { struct sMOBcard *MOBnextCard; int MOBmaterial; int MOBcarrier; int MOBcarrType; double MOBmuMax; double MOBmuMin; double MOBntRef; double MOBntExp; double MOBvSat; double MOBvWarm; double MOBmus; double MOBecA; double MOBecB; int MOBconcModel; int MOBfieldModel; int MOBinit; unsigned MOBmaterialGiven : 1; unsigned MOBcarrierGiven : 1; unsigned MOBcarrTypeGiven : 1; unsigned MOBmuMaxGiven : 1; unsigned MOBmuMinGiven : 1; unsigned MOBntRefGiven : 1; unsigned MOBntExpGiven : 1; unsigned MOBvSatGiven : 1; unsigned MOBvWarmGiven : 1; unsigned MOBmusGiven : 1; unsigned MOBecAGiven : 1; unsigned MOBecBGiven : 1; unsigned MOBconcModelGiven : 1; unsigned MOBfieldModelGiven : 1; unsigned MOBinitGiven : 1; } MOBcard; /* MOB parameters */ #define MOB_ELEC 1 #define MOB_HOLE 2 #define MOB_MAJOR 3 #define MOB_MINOR 4 #define MOB_MUMAX 5 #define MOB_MUMIN 6 #define MOB_NTREF 7 #define MOB_NTEXP 8 #define MOB_VSAT 9 #define MOB_VWARM 10 #define MOB_MUS 11 #define MOB_EC_A 12 #define MOB_EC_B 13 #define MOB_CONC_MOD 14 #define MOB_FIELD_MOD 15 #define MOB_MATERIAL 16 #define MOB_INIT 17 #endif ngspice-26/src/include/ngspice/hash.h0000644000265600020320000004175412264261473017202 0ustar andreasadmin/* ----------------------------------------------------------------- FILE: nghash.h DESCRIPTION:Insert file for threaded hash routines. This code was donated from TimberWolf. CONTENTS: DATE: Jul 17, 1988 - original coding REVISIONS: Aug 21, 2009 - adapted for ngspice ----------------------------------------------------------------- */ #ifndef ngspice_HASH_H #define ngspice_HASH_H #include "ngspice/bool.h" #include #define _NGMALLOC(size_xz) tmalloc((size_xz)) #define NGMALLOC(n, els) TMALLOC(els, n) #define NGREALLOC(ar,n,els) TREALLOC(els, ar, n) #define NGFREE(els) txfree(els) /* ********************** TYPE DEFINITIONS ************************* */ typedef void (*ngdelete)(void *) ; typedef struct ngtable_rec { void *key ; void *data ; struct ngtable_rec *next ; /* collision list */ struct ngtable_rec *thread_next ; /* thread thru entire table */ struct ngtable_rec *thread_prev ; /* thread thru entire table */ } NGTABLEBOX, *NGTABLEPTR ; struct nghashbox; typedef unsigned int nghash_func_t(struct nghashbox *, void *) ; typedef int nghash_compare_func_t(const void *, const void *) ; struct nghashbox { NGTABLEPTR *hash_table ; NGTABLEPTR thread ; /* thread of hash table */ NGTABLEPTR last_entry ; /* last entry into hash table */ NGTABLEPTR enumeratePtr ; /* used to enumerate hash table */ NGTABLEPTR searchPtr ; /* used for find again mechanism */ nghash_compare_func_t *compare_func ; /* the comparison function */ nghash_func_t *hash_func ; /* the hash function */ double growth_factor ; /* how much to grow table by */ int size ; /* the size of the table */ int max_density ; /* maximum number of entries before growth */ int num_entries ; /* current number of entries in table */ int need_resize ; /* amount before we need a resize */ long access ; /* used for statistics */ long collision ; /* collision times */ unsigned int power_of_two : 8 ; /* build table as a power of two */ unsigned int call_from_free : 8 ;/* true if in a free calling sequence */ unsigned int unique : 16 ; /* true if only one unique item in col. list */ }; typedef struct nghashbox NGHASHBOX, *NGHASHPTR; /* ----------------------------------------------------------------- * This enumerated type is used to control the base hash function types * as well as hash table attributes such as uniqueness and power of 2. * The negative definitions for the function are used so we catch a * segfault immediately if the hash table is used incorrectly. Notice * that the default function string is zero. Because there definitions * can be cast into functions, they are defined as longs so it will work * on all architecture types include 64bits. * ----------------------------------------------------------------- */ typedef enum { NGHASH_UNIQUE = 1 << 0, NGHASH_POWER_OF_TWO = 1 << 1, NGHASH_UNIQUE_TWO = NGHASH_UNIQUE | NGHASH_POWER_OF_TWO } NGHASHFLAGS_T ; enum nghash_default_func_t { NGHASH_FUNC_NUM = -2, NGHASH_FUNC_PTR = -1, NGHASH_FUNC_STR = 0 }; typedef struct nghash_iter_rec { struct ngtable_rec *position ; } NGHASHITER, *NGHASHITERPTR ; /* ----------------------------------------------------------------- * macro definition for enumeration. Strange looking but compiler * will optimize. x_yz->position = 0 and x_yz will be returned. #define NGHASH_FIRST(x_yz) ( ((x_yz)->position = NULL) ? (x_yz) : (x_yz) ) No longer use this trick and now explicitly write out both lines because some compilers complain about unintentional assignment. Unfortunately, we want to intentionally assign it. The compiler is warning unnecessarily. ----------------------------------------------------------------- */ #define NGHASH_FIRST(x_yz) ( (x_yz)->position = NULL ) ; #define NGHASH_ITER_EQUAL(x_yz,y_yz) ( (x_yz)->position == (y_yz)->position ) #define NGHASH_DEF_HASH(x) ((nghash_func_t *) (intptr_t) (x)) #define NGHASH_DEF_CMP(x) ((nghash_compare_func_t *) (intptr_t) (x)) /* defines for unique flag */ /* misc definitions */ #define NGHASH_DEF_GROW_FACTOR 2.0 #define NGHASH_DEF_MAX_DENSITY 4 #define NGHASH_MIN_SIZE 4 #define nghash_tablesize( htable_xz ) ( (htable_xz)->size ) /* ----------------------------------------------------------------- * Here are three hash functions in order of increasingly better * behaviour. Remember hsum must be unsigned int. The best one * is taken from tcl. ----------------------------------------------------------------- */ #define NGHASH_STR_TO_HASH( str, hsum, size ) \ do { \ char *name ; \ int shift ; \ for( name=str,shift=1,hsum=0 ;*name; name++){ \ hsum = hsum + ((*name)<> 24); \ hsum = hsum^g; \ } \ } \ hsum = hsum & (size-1); \ } while(0); #undef NGHASH_STR_TO_HASH #define NGHASH_STR_TO_HASH( str, hsum, size ) \ do { \ int c ; \ char *string ; \ hsum = 0 ; \ string = (char *) str ; \ for (;;) { \ c = *string ; \ string++ ; \ if( c == 0) { \ break ; \ } \ hsum += (hsum<<3) + (unsigned int) c; \ } \ hsum %= (unsigned int) (size) ; \ } while(0); #define NGHASH_NUM_TO_HASH( num, hsum, size ) \ do { \ int c, len ; \ unsigned long temp; \ char cptr[80] ; \ sprintf( cptr, "%lx", (UNSIGNED_LONG) num) ; \ len = strlen(cptr) ; \ temp = (unsigned long) cptr[0] ; \ for( c = 1 ; c < len ; c++ ){ \ temp += (temp<<3) + (unsigned long) cptr[c] ; \ } \ temp %= (size) ; \ hsum = temp ; \ } while(0); #undef NGHASH_NUM_TO_HASH /* ----------------------------------------------------------------- * Replace the old num to hash with a new algorithm which is simple * and is 5 times faster. Variance was even less on generated data. * To use this hash table power of 2 table size must be enforced. ----------------------------------------------------------------- */ #define NGHASH_NUM_TO_HASH( ptr, hsum, size ) \ do { \ unsigned int temp ; \ intptr_t value = (intptr_t) ptr ; \ temp = (unsigned int) value ; \ hsum = temp & (unsigned int) (size - 1) ; \ } while(0); #define NGHASH_PTR_TO_HASH( ptr, hsum, size ) \ do { \ unsigned long temp; \ temp = (unsigned long) (ptr); \ temp %= (size) ; \ hsum = temp ; \ } while(0); #undef NGHASH_PTR_TO_HASH /* ----------------------------------------------------------------- * We use strlen instead of looking at the return value of sprintf * because it is not standard. Actually no machine have 80 byte pointers * but just being cautious. ----------------------------------------------------------------- */ #define NGHASH_PTR_TO_HASH( ptr, hsum, size ) \ do { \ int c, len ; \ unsigned long temp; \ char cptr[80] ; \ sprintf( cptr, "%lx", (UNSIGNED_LONG) ptr) ; \ len = strlen(cptr) ; \ temp = (UNSIGNED_LONG) cptr[0] ; \ for( c = 1 ; c < len ; c++ ){ \ temp += (temp<<3) + (UNSIGNED_LONG) cptr[c] ; \ } \ temp %= (size) ; \ hsum = temp ; \ } while(0); #undef NGHASH_PTR_TO_HASH /* ----------------------------------------------------------------- * Replace the old ptr to hash with a new algorithm which is simple * and is 5 times faster. Variance was even less on generated data. * To use this hash table power of 2 table size must be enforced. ----------------------------------------------------------------- */ #define NGHASH_PTR_TO_HASH( ptr, hsum, size ) \ do { \ unsigned int temp ; \ intptr_t value = (intptr_t) ptr ; \ temp = (unsigned int) (value >> 4) ; \ hsum = temp & (unsigned int) (size - 1) ; \ } while(0); #define NGHASH_PTR_COMPARE_FUNC( p1 , p2 ) ( (p1) != (p2) ) #define nghash_unique( htable_xz, flag_xz ) ((htable_xz)->unique = flag_xz) extern NGHASHPTR nghash_init( int numentries ) ; /* Function: Returns a hash table with the given number of entries. More that one hash table can coexist at the same time. The default key type is string. The default comparison function is strcmp. */ extern NGHASHPTR nghash_init_integer( int numentries ) ; /* Function: Returns a hash table with the given number of entries. More that one hash table can coexist at the same time. The default key type is an integer. The default comparison function is integer comparison. */ extern NGHASHPTR nghash_init_pointer( int numentries ) ; /* Function: Returns a hash table with the given number of entries. More that one hash table can coexist at the same time. The default key type is a pointer. The default comparison function is pointer comparison. */ extern NGHASHPTR nghash_init_with_parms( nghash_compare_func_t *comp_func, nghash_func_t *hash_func, int numentries, int max_density, double growth, NGHASHFLAGS_T flags ) ; /* Function: Returns a hash table with the given number of entries. More that one hash table can coexist at the same time. Tables may be given their own hash and compare functions. If your keys are pointers, numbers or strings, it is recommended that you use the functions: * HASH_DEF_HASH_PTR and HASH_DEF_CMP_PTR for pointers, * HASH_DEF_HASH_NUM and HASH_DEF_CMP_NUM for numbers, and * HASH_DEF_HASH_STR and HASH_DEF_CMP_STR for strings. The hash package will recognize these and run faster as a result. You may use your own hash and compare functions provided they look like * INT hash(void * key) and * UNSIGNED_INT compare(void * key1, void * key2). The hash function's return value should be in the interval [0, UINT_MAX]. The compare should return zero if the two keys are equal and a non-zero value otherwise. Whenever number of entries in hash table >= size of table * max_density, the table is grown at a the specified by growth. Unique if TRUE only allows one entry which matches comparison function. Otherwise, multiple items which are not unique relative to the comparison function can exist in collision list. */ extern int nghash_max_density(NGHASHPTR hashtable,int max_density) ; /* Function: Changes the max_density limit in the hash table if max_density > 1. This function returns the current value of max_density. */ extern int nghash_table_get( NGHASHPTR hashtable ) ; /* Function: Returns the current size of hash table set by nghash_table_create */ extern int nghash_table_size( int num ) ; /* Function: Returns the closest prime number to given size. */ extern int nghash_table_size2( int num ) ; /* Function: Returns the table size to the closest power of 2. */ extern void *_nghash_find(NGHASHPTR hashtable, void * user_key,BOOL *status) ; extern void *nghash_find(NGHASHPTR hashtable, void * user_key) ; extern void *nghash_find_again(NGHASHPTR hashtable, void * user_key) ; extern void *_nghash_find_again(NGHASHPTR hashtable, void * user_key,BOOL *status) ; extern void *nghash_delete(NGHASHPTR hashtable, void * user_key) ; extern void *nghash_insert(NGHASHPTR hashtable, void * user_key, void * data) ; /* The four functions above replace the old nghash_search function. The same functionality but now four functions. Function: Hash table search routine. Given a hashtable and a key, perform the following operations: HASH_ENTER:if key is in table it, returns a pointer to the item. if key is not in table, add it to the table. returns NULL. HASH_FIND:if key is in table, it returns data pointer. if key is not in the table, it returns NULL. HASH_FIND_AGAIN:if additional keys are in table, returns data pointer. if no more keys are in the table, it returns NULL. HASH_DELETE:if key is in table, it returns -1 if key is not in table, it return NULL. Memory is not freed in the delete case, but marked dirty. Data is a pointer to the information to be store with the given key. A new operation is available for using pointers are arguments. Just pass the pointer in as a key. Make sure to call the nghash_init_pointer function first. */ /* ----------------------------------------------------------------- * Convenience functions. ----------------------------------------------------------------- */ typedef void * (*nghash)(void *) ; extern void nghash_free(NGHASHPTR htabl,void (*del_data)(void *),void (*del_key)(void *) ); /* Function: Frees the memory associated with a hash table. The user make supply a function which deletes the memory associated with the data field. In addition, the user may free the memory stored at the key. This function must have the data pointer supplied by the hash add routines as an argument,ie. nghash_table_delete( my_hash_table, my_free_func, my_key_free ) ; my_free_func( data ) void * data ; { } my_key_free( key ) void * key ; { } Note: for the default hash types: STR, PTR, and NUM, the free key operation is ignored. */ extern void nghash_free_string_func(char *str) ; /* Function: Just a wrapper for YFREE(string) */ extern void nghash_free_string_hashtable(NGHASHPTR htable) ; /* Function: Frees the memory associated with a hash table. This version is a convenience function as it is equivalent to the function: nghash_free( htable, (ngdelete) nghash_free_string_func, NULL ) ; */ extern void nghash_empty(NGHASHPTR htabl,void (*del_data)(void *),void (*del_key)(void *) ) ; /* Function: Similar to nghash_free except table structure is not delete. However, all entries have been deleted. */ extern NGHASHPTR nghash_merge( NGHASHPTR master_htable, NGHASHPTR merge_htable ) ; /* Function: Merge items in merge_htable into master_htable. Create master_htable if master_htable is NULL. Returns the merged hash table. */ extern int nghash_get_size( NGHASHPTR hashtable ) ; /* Function: Since this is a threaded hash table we can find the size of all the valid entries in the table in O(n) where n is the number of valid entries. Returns the number of valid entries. One may enumerate the hash table by writing the following loop. TABLEPTR ptr ; for( ptr = mytable->thread; ptr ; ptr= ptr->threadNext ){ ... } */ extern void *nghash_enumeratek(NGHASHPTR hashtable,void **key_ret,BOOL flag) ; /* Function: Since this is a threaded hash table, we can enumerate the elements of the hash table in O(n) time where n is the number of valid entries. Returns the data and key associated with each entry. The flag is similar to the rbtree enumerate function. This eliminates the need for writing the following: TABLEPTR ptr ; for( ptr = mytable->thread; ptr ; ptr= ptr->threadNext ){ ... } Instead write: for( data = nghash_enumerate(hashtable,&key,TRUE) ; data ; data = nghash_enumerate(hashtable,&key,TRUE) ){ ... } The order returned is guaranteed to be the same as the order entered. */ extern void *nghash_enumeratekRE(NGHASHPTR hashtable,void **key_ret,NGHASHITERPTR iter_p) ; /* Function: Same as nghash_enumeratekRE but this is a reentrant version. Use as void * key_ret ; for( i_p= nghash_enumeratekRE(htable_p,&key_ret,YHASH_FIRST(&iter) ) ; i_p ; i_p= nghash_enumeratekRE(htable_p,&key_ret,&iter) ) ){ data_p = (data_cast) key_ret ; } */ extern void *nghash_enumerate(NGHASHPTR hashtable,BOOL flag) ; /* Function: Like above but we don't return the key. */ extern void *nghash_enumerateRE(NGHASHPTR hashtable,NGHASHITERPTR iter_p) ; /* Function: Like nghash_enumerate but this is a reentrant version. for( i_p= nghash_enumerateRE(htable_p,YHASH_FIRST(&iter) ) ; i_p ; i_p= nghash_enumerateRE(htable_p,&iter) ) ){ data_p = (data_cast) key_ret ; } */ extern BOOL nghash_deleteItem( NGHASHPTR hashtable, void *key, void *data ) ; /* Function: Delete a specific item in the hash table. Returns true if the item was found and deleted. */ /* * This function has been removed because we now support reentrant versions. extern VOID nghash_enumeratePush( P1(YHASHPTR hashtable)); Function: Push the current enumeration pointer onto a stack. This is useful for recursive enumeration. */ /* * This function has been removed because we now support reentrant versions. extern VOID nghash_enumeratePop( P1(YHASHPTR hashtable)); Function: Pops the current enumeration pointer from the stack. This is useful for recursive enumeration. */ extern void nghash_dump( NGHASHPTR hashtable,void (*print_func)(void *) ) ; /* Function: Prints the contents of the hash table. */ extern void nghash_reset_stat( NGHASHPTR hashtable ) ; extern void nghash_resize( NGHASHPTR hashtable, int num ) ; extern void nghash_distribution( NGHASHPTR hashtable ) ; /* Function: Returns information about hash table distribution to message system. */ #endif ngspice-26/src/include/ngspice/opdefs.h0000644000265600020320000000072312264261473017526 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_OPDEFS_H #define ngspice_OPDEFS_H #include "ngspice/cktdefs.h" #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" /* * structures used to describe D.C. operationg point analyses to * be performed. */ typedef struct { int JOBtype; JOB *JOBnextJob; char *JOBname; } OP; #endif ngspice-26/src/include/ngspice/twodev.h0000644000265600020320000001064612264261473017563 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * Two-Dimensional Numerical Device Data Structures */ #ifndef ngspice_TWODEV_H #define ngspice_TWODEV_H #include "ngspice/gendev.h" #include "ngspice/smpdefs.h" typedef struct sTWOdevice { double *dcSolution; /* solution vector for device */ double *dcDeltaSolution; /* delta solution vector */ double *copiedSolution; /* copy of the solution vector */ double *rhs; /* rhs vector */ double *rhsImag; /* imaginary part of rhs vector */ SMPmatrix *matrix; /* matrix for device equations */ int solverType; /* what is matrix set up to do */ int dimEquil; /* dimension in equilibrium */ int numOrigEquil; /* orig number of nz's in equilibrium */ int numFillEquil; /* fill number of nz's in equilibrium */ int dimBias; /* dimension under bias */ int numOrigBias; /* orig number of nz's under bias */ int numFillBias; /* fill number of nz's under bias */ int numEqns; /* number of equations */ int poissonOnly; /* flag for Poisson eqn solution */ struct sTWOelem **elements; /* 1D list of elements */ struct sTWOelem ***elemArray; /* 2D list of elements for printing */ double **devStates; /* device states */ double *xScale; /* array of X node locations */ double *yScale; /* array of Y node locations */ int numXNodes; /* number of X nodes */ int numYNodes; /* number of Y nodes */ int numNodes; /* total number of nodes */ int numEdges; /* total number of edges */ int numElems; /* total number of elements */ struct sTWOcontact *pFirstContact; /* first contact */ struct sTWOcontact *pLastContact; /* last contact */ struct sTWOchannel *pChannel; /* surface mobility channel */ struct sMaterialInfo *pMaterials; /* temp-dep material information */ struct sStatInfo *pStats; /* run-time statistics */ int converged; /* flag for device convergence */ int iterationNumber; /* device iteration counter */ double width; /* device width in CM */ double rhsNorm; /* norm of rhs vector */ double abstol; /* absolute tolerance for device */ double reltol; /* relative tolerance for device */ char *name; /* name of device */ } TWOdevice; #define devState0 devStates[0] #define devState1 devStates[1] #define devState2 devStates[2] #define devState3 devStates[3] #define devState4 devStates[4] #define devState5 devStates[5] #define devState6 devStates[6] #define devState7 devStates[7] typedef struct sTWOcontact { struct sTWOcontact *next; /* pointer to next contact */ struct sTWOnode **pNodes; /* pointer to the contact nodes */ int numNodes; /* number of nodes in contact */ int id; /* unique contact identifier */ double workf; /* metal work function */ } TWOcontact; /* Structure for channels. * A channel is divided into 'columns' that are perpendicular to the * channel's insulator/semiconductor interface. Each column begins * at its 'seed', the closest semiconductor element to the interface. * It is assumed that the current flows parallel to the interface. */ typedef struct sTWOchannel { struct sTWOchannel *next; /* pointer to next channel */ struct sTWOelem *pSeed; /* pointer to the seed element */ struct sTWOelem *pNElem; /* pointer to the insulator element */ int id; /* unique channel identifier */ int type; /* ID of direction to interface */ } TWOchannel; struct mosConductances { double dIdDVdb; double dIdDVsb; double dIdDVgb; double dIsDVdb; double dIsDVsb; double dIsDVgb; double dIgDVdb; double dIgDVsb; double dIgDVgb; }; #endif ngspice-26/src/include/ngspice/optndefs.h0000644000265600020320000000301312264261473020063 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_OPTNDEFS_H #define ngspice_OPTNDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sOPTNcard { struct sOPTNcard *OPTNnextCard; char *OPTNicFile; int OPTNunique; int OPTNdeviceType; double OPTNdefa; double OPTNdefw; double OPTNdefl; double OPTNbaseArea; double OPTNbaseLength; double OPTNbaseDepth; double OPTNtnom; unsigned int OPTNicFileGiven : 1; unsigned int OPTNuniqueGiven : 1; unsigned int OPTNdeviceTypeGiven : 1; unsigned int OPTNdefaGiven : 1; unsigned int OPTNdefwGiven : 1; unsigned int OPTNdeflGiven : 1; unsigned int OPTNbaseAreaGiven : 1; unsigned int OPTNbaseLengthGiven : 1; unsigned int OPTNbaseDepthGiven : 1; unsigned int OPTNtnomGiven : 1; } OPTNcard; /* OPTN parameters */ #define OPTN_RESISTOR 1 #define OPTN_CAPACITOR 2 #define OPTN_DIODE 3 #define OPTN_BIPOLAR 4 #define OPTN_SOIBJT 5 #define OPTN_MOSCAP 6 #define OPTN_MOSFET 7 #define OPTN_SOIMOS 8 #define OPTN_JFET 9 #define OPTN_MESFET 10 #define OPTN_DEFA 11 #define OPTN_DEFW 12 #define OPTN_DEFL 13 #define OPTN_BASE_AREA 14 #define OPTN_BASE_LENGTH 15 #define OPTN_BASE_DEPTH 16 #define OPTN_TNOM 17 #define OPTN_IC_FILE 18 #define OPTN_UNIQUE 19 #endif ngspice-26/src/include/ngspice/Makefile.in0000644000265600020320000004403212264261534020141 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = src/include/ngspice DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = $(pkgdatadir)/include/ngspice infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nodist_include_HEADERS = \ config.h include_HEADERS = \ tclspice.h \ acdefs.h \ bdrydefs.h \ bool.h \ carddefs.h \ ciderinp.h \ cidersupt.h \ cktdefs.h \ cluster.h \ cmconstants.h \ cm.h \ cmproto.h \ cmtypes.h \ compatmode.h \ complex.h \ const.h \ contdefs.h \ cpdefs.h \ cpextern.h \ cpstd.h \ defines.h \ devdefs.h \ dgen.h \ distodef.h \ dllitf.h \ domndefs.h \ dopdefs.h \ dstring.h \ dvec.h \ elctdefs.h \ enh.h \ evt.h \ evtproto.h \ evtudn.h \ ftedbgra.h \ ftedebug.h \ ftedefs.h \ fteoptdefs.h \ ftedev.h \ fteext.h \ fteinp.h \ fteinput.h \ fteparse.h \ gendefs.h \ gendev.h \ graph.h \ grid.h \ hash.h \ hlpdefs.h \ iferrmsg.h \ ifsim.h \ inpdefs.h \ inpmacs.h \ inpptree.h \ ipc.h \ ipcproto.h \ ipctiein.h \ jobdefs.h \ lsort.h \ macros.h \ material.h \ matldefs.h \ memory.h \ meshdefs.h \ meshext.h \ methdefs.h \ mifcmdat.h \ mifdefs.h \ mif.h \ mifparse.h \ mifproto.h \ miftypes.h \ missing_math.h \ mobdefs.h \ modldefs.h \ multi_line.h \ ngspice.h \ noisedef.h \ numcards.h \ numconst.h \ numenum.h \ numgen.h \ numglobs.h \ onedev.h \ onemesh.h \ opdefs.h \ optdefs.h \ optndefs.h \ outpdefs.h \ plot.h \ pnode.h \ profile.h \ pssdefs.h \ pzdefs.h \ sen2defs.h \ sensdefs.h \ sensgen.h \ sharedspice.h \ sim.h \ smpdefs.h \ sperror.h \ spmatrix.h \ stringutil.h \ suffix.h \ swec.h \ tfdefs.h \ trandefs.h \ trcvdefs.h \ tskdefs.h \ twodev.h \ twomesh.h \ typedefs.h \ wordlist.h \ 1-f-code.h \ FastNorm3.h \ fftext.h \ wallace.h \ wstdio.h MAINTAINERCLEANFILES = Makefile.in all: config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/include/ngspice/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/include/ngspice/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then rm -f stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/include/ngspice/config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) config.h installdirs: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-includeHEADERS install-nodist_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-nodist_includeHEADERS .MAKE: all install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libtool ctags distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-man install-nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-includeHEADERS \ uninstall-nodist_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/src/include/ngspice/pnode.h0000644000265600020320000000100112264261473017341 0ustar andreasadmin#ifndef ngspice_PNODE_H #define ngspice_PNODE_H struct pnode { char *pn_name; /* If non-NULL, the name. */ struct dvec *pn_value; /* Non-NULL in a terminal node. */ struct func *pn_func; /* Non-NULL is a function. */ struct op *pn_op; /* Operation if the above two NULL. */ struct pnode *pn_left; /* Left branch or function argument. */ struct pnode *pn_right; /* Right branch. */ struct pnode *pn_next; /* For expression lists. */ int pn_use; /* usage counter */ } ; #endif ngspice-26/src/include/ngspice/lsort.h0000644000265600020320000000557212264261473017420 0ustar andreasadmin/* * 'Generic' linked-list sorting 'package' * * Use: * #define TYPE the linked-list type (usually a struct) * #define NEXT 'next' field name in the linked-list structure * #define SORT sorting routine (see below) * * Optional: * #define DECL_SORT 'static' or undefined * #define DECL_SORT1 'static' or undefined * #define SORT1 sorting routine (see below) * #define FIELD select a subfield of the structure for the * compare function (default is to pass * a pointer to the structure) * #include "lsort.h" * * This defines up to two routines: * SORT1(TYPE *list, int (*compare)(TYPE *x, TYPE *y)) * sort the linked list 'list' according to the compare function * 'compare' * * SORT(TYPE *list, int (*compare)(TYPE *x, TYPE *y), int length) * sort the linked list 'list' according to the compare function * 'compare'. length is the length of the linked list. * * Both routines gracefully handle length == 0 (in which case, list == 0 * is also allowed). * * By default, both routines are declared 'static'. This can be changed * using '#define DECL_SORT' or '#define DECL_SORT1'. * * If field is used, then a pointer to the particular field is passed * to the comparison function (rather than a TYPE *). */ /* This file was originally part of Cider 1b1 and has been moved to * the ngspice misc directory since macros will probably be converted * into real functions. * (Paolo Nenzi 2001) */ #ifndef DECL_SORT1 #define DECL_SORT1 static #endif #ifndef DECL_SORT #define DECL_SORT static #endif DECL_SORT TYPE *SORT(TYPE *list_in, int (*compare)(TYPE*, TYPE*), long cnt ); #ifdef SORT1 DECL_SORT1 TYPE *SORT1(TYPE *list_in, int (*compare)(TYPE*, TYPE*) ) { register long cnt; register TYPE *p; /* Find the length of the list */ for(p = list_in, cnt = 0; p != 0; p = p->NEXT, cnt++) ; return SORT(list_in, compare, cnt); } #endif DECL_SORT TYPE *SORT(TYPE *list_in, int (*compare)(TYPE*, TYPE*), long cnt ) { register TYPE *p, **plast, *list1, *list2; register long i; if (cnt > 1) { /* break the list in half */ for(p = list_in, i = cnt/2-1; i > 0; p = p->NEXT, i--) ; list1 = list_in; list2 = p->NEXT; p->NEXT = 0; /* Recursively sort the sub-lists (unless only 1 element) */ if ((i = cnt/2) > 1) { list1 = SORT(list1, compare, i); } if ((i = cnt - i) > 1) { list2 = SORT(list2, compare, i); } /* Merge the two sorted sub-lists */ plast = &list_in; for(;;) { #ifdef FIELD if ((*compare)(&list1->FIELD, &list2->FIELD) <= 0) { #else if ((*compare)(list1, list2) <= 0) { #endif *plast = list1; plast = &(list1->NEXT); if ((list1 = list1->NEXT) == 0) { *plast = list2; break; } } else { *plast = list2; plast = &(list2->NEXT); if ((list2 = list2->NEXT) == 0) { *plast = list1; break; } } } } return list_in; } ngspice-26/src/include/ngspice/meshdefs.h0000644000265600020320000000200612264261473020040 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Author: 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_MESHDEFS_H #define ngspice_MESHDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sMESHcard { struct sMESHcard *MESHnextCard; double MESHlocation; double MESHwidth; double MESHlocStart; double MESHlocEnd; double MESHhStart; double MESHhEnd; double MESHhMax; double MESHratio; int MESHnumber; unsigned int MESHlocationGiven : 1; unsigned int MESHwidthGiven : 1; unsigned int MESHhStartGiven : 1; unsigned int MESHhEndGiven : 1; unsigned int MESHhMaxGiven : 1; unsigned int MESHratioGiven : 1; unsigned int MESHnumberGiven : 1; } MESHcard; /* MESH parameters */ #define MESH_NUMBER 1 #define MESH_LOCATION 2 #define MESH_WIDTH 3 #define MESH_H_START 4 #define MESH_H_END 5 #define MESH_H_MAX 6 #define MESH_RATIO 7 #endif ngspice-26/src/include/ngspice/numgen.h0000644000265600020320000000276412264261473017546 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * Generic Numerical Model Structure */ #ifndef ngspice_NUMGEN_H #define ngspice_NUMGEN_H #include "ngspice/ifsim.h" #include "ngspice/cktdefs.h" #include "ngspice/gendefs.h" #include "ngspice/carddefs.h" typedef struct sGENnumModel { /* model structure for a numerical device */ int GENmodType; /* type index of this device type */ struct sGENnumModel *GENnextModel; /* pointer to next model in list */ GENinstance *GENinstances; /* pointer to list of instances */ IFuid GENmodName; /* pointer to string naming this model */ /* Everything below here is numerical-device-specific */ MESHcard *GENxMeshes; /* list of xmesh cards */ MESHcard *GENyMeshes; /* list of ymesh cards */ DOMNcard *GENdomains; /* list of domain cards */ BDRYcard *GENboundaries; /* list of boundary cards */ DOPcard *GENdopings; /* list of doping cards */ ELCTcard *GENelectrodes; /* list of electrode cards */ CONTcard *GENcontacts; /* list of contact cards */ MODLcard *GENmodels; /* list of model cards */ MATLcard *GENmaterials; /* list of material cards */ MOBcard *GENmobility; /* list of mobility cards */ METHcard *GENmethods; /* list of method cards */ OPTNcard *GENoptions; /* list of option cards */ OUTPcard *GENoutputs; /* list of output cards */ } GENnumModel; #endif ngspice-26/src/include/ngspice/numglobs.h0000644000265600020320000000233212264261473020072 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Define various flags, constants, and indices */ /* These variables are defined in support/globals.c */ #ifndef ngspice_NUMGLOBS_H #define ngspice_NUMGLOBS_H extern int BandGapNarrowing; extern int TempDepMobility; extern int ConcDepMobility; extern int FieldDepMobility; extern int TransDepMobility; extern int SurfaceMobility; extern int MatchingMobility; extern int MobDeriv; extern int CCScattering; extern int Srh; extern int Auger; extern int ConcDepLifetime; extern int AvalancheGen; extern int FreezeOut; extern int OneCarrier; extern int MaxIterations; extern int AcAnalysisMethod; extern double Temp; extern double RelTemp; extern double Vt; extern double RefPsi; extern double EpsNorm; extern double VNorm; extern double NNorm; extern double LNorm; extern double TNorm; extern double JNorm; extern double GNorm; extern double ENorm; typedef struct sGLOBvalues { double Temp; double RelTemp; double Vt; double RefPsi; double EpsNorm; double VNorm; double NNorm; double LNorm; double TNorm; double JNorm; double GNorm; double ENorm; } GLOBvalues; #endif ngspice-26/src/include/ngspice/ftedebug.h0000644000265600020320000000354212264261473020035 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ #ifndef ngspice_FTEDEBUG_H #define ngspice_FTEDEBUG_H /* * * Stuff for debugging a spice run. Debugging information will be printed * on the standard output. */ #define DB_TRACENODE 1 /* Print the value of a node every iteration. */ #define DB_TRACEALL 2 /* Trace all nodes. */ #define DB_STOPAFTER 3 /* Break after this many iterations. */ #define DB_STOPWHEN 4 /* Break when a node reaches this value. */ #define DB_IPLOT 5 /* Incrementally plot the stuff. */ #define DB_IPLOTALL 6 /* Incrementally plot everything. */ #define DB_SAVE 7 /* Save a node. */ #define DB_SAVEALL 8 /* Save everything. */ #define DB_DEADIPLOT 9 /* Incrementally plot the stuff. */ /* These only make sense in the real case, so always use realpart(). It's too * bad that we have to say "ge" instead of ">=", etc, but cshpar takes * the <>'s. */ #define DBC_EQU 1 /* == (eq) */ #define DBC_NEQ 2 /* != (ne) */ #define DBC_GT 3 /* > (gt) */ #define DBC_LT 4 /* < (lt) */ #define DBC_GTE 5 /* >= (ge) */ #define DBC_LTE 6 /* <= (le) */ struct dbcomm { int db_number; /* The number of this debugging command. */ char db_type; /* One of the above. */ char *db_nodename1; /* What node. */ char *db_nodename2; /* What node. */ char *db_analysis; /* for a specific analysis. */ int db_iteration; /* For the DB_STOPAFTER command. */ char db_op; /* For DB_STOPWHEN. */ double db_value1; /* If this is DB_STOPWHEN. */ double db_value2; /* If this is DB_STOPWHEN. */ int db_graphid; /* If iplot, id of graph. */ struct dbcomm *db_also; /* Link for conjunctions. */ struct dbcomm *db_next; /* List of active debugging commands. */ } ; #endif ngspice-26/src/include/ngspice/memory.h0000644000265600020320000000440012264261473017552 0ustar andreasadmin#ifndef ngspice_MEMORY_H #define ngspice_MEMORY_H #include #define TMALLOC(t, n) (t*) tmalloc(sizeof(t) * (size_t)(n)) #define TREALLOC(t, p, n) (t*) trealloc(p, sizeof(t) * (size_t)(n)) #ifndef HAVE_LIBGC extern void *tmalloc(size_t num); extern void *trealloc(void *str, size_t num); extern void txfree(void *ptr); #define tfree(x) (txfree(x), (x) = 0) #else #include #define tmalloc(m) GC_malloc(m) #define trealloc(m, n) GC_realloc((m), (n)) #define tfree(m) #define txfree(m) #endif /* HAVE_LIBGC */ #include "ngspice/stringutil.h" /* va: spice3 internally bzero */ #define alloc(TYPE) TMALLOC(TYPE, 1) #define MALLOC(x) tmalloc((size_t) (x)) #define FREE(x) do { if(x) { txfree(x); (x) = NULL; } } while(0) #define REALLOC(x, y) trealloc(x, (size_t) (y)) #define ZERO(PTR, TYPE) bzero(PTR, sizeof(TYPE)) #if defined(_MSC_VER) || defined(__MINGW32__) void *hrealloc(void *ptr, size_t num); #endif #ifdef CIDER #define RALLOC(ptr, type, number) \ do { \ if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) \ return E_NOMEM; \ } while(0) #define XALLOC(ptr, type, number) \ do { \ if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) { \ SPfrontEnd->IFerror(E_PANIC, "Out of Memory", NULL); \ exit(1); \ } \ } while(0) #define XCALLOC(ptr, type, number) \ do { \ if ((number) && (ptr = (type *)calloc((size_t)(number), sizeof(type))) == NULL) { \ fprintf(stderr, "Out of Memory\n"); \ exit(1); \ } \ } while(0) #endif /* CIDER */ #endif ngspice-26/src/include/ngspice/jobdefs.h0000644000265600020320000000100712264261473017656 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles **********/ #ifndef ngspice_JOBDEFS_H #define ngspice_JOBDEFS_H #include "ngspice/typedefs.h" #include "ngspice/ifsim.h" struct JOB { int JOBtype; /* type of job */ struct JOB *JOBnextJob; /* next job in list */ IFuid JOBname; /* name of this job */ }; #define NODOMAIN 0 #define TIMEDOMAIN 1 #define FREQUENCYDOMAIN 2 #define SWEEPDOMAIN 3 #endif ngspice-26/src/include/ngspice/pssdefs.h0000644000265600020320000000136712264261473017722 0ustar andreasadmin/********** Author: 2010-05 Stefano Perticaroli ``spertica'' Review: 2012-10 Francesco Lannutti **********/ #ifndef ngspice_PSSDEFS_H #define ngspice_PSSDEFS_H #include "ngspice/jobdefs.h" #include "ngspice/tskdefs.h" /* * PSSdefs.h - defs for pss analyses */ typedef struct { int JOBtype; JOB *JOBnextJob; char *JOBname; double PSSguessedFreq; CKTnode *PSSoscNode; double PSSstabTime; long PSSmode; long int PSSpoints; int PSSharms; runDesc *PSSplot_td; runDesc *PSSplot_fd; int sc_iter; double steady_coeff; } PSSan; #define GUESSED_FREQ 1 #define STAB_TIME 2 #define OSC_NODE 3 #define PSS_POINTS 4 #define PSS_HARMS 5 #define PSS_UIC 6 #define SC_ITER 7 #define STEADY_COEFF 8 #endif ngspice-26/src/include/ngspice/pzdefs.h0000644000265600020320000000203312264261473017535 0ustar andreasadmin#ifndef ngspice_PZDEFS_H #define ngspice_PZDEFS_H /* structure used to describe an PZ analysis to be performed */ #include "ngspice/jobdefs.h" #include #include "ngspice/complex.h" #include "ngspice/typedefs.h" struct PZtrial { SPcomplex s, f_raw, f_def; PZtrial *next, *prev; int mag_raw, mag_def; int multiplicity; int flags; int seq_num; int count; }; struct PZAN { int JOBtype; JOB *JOBnextJob; IFuid JOBname; int PZin_pos; int PZin_neg; int PZout_pos; int PZout_neg; int PZinput_type; int PZwhich; int PZnumswaps; int PZbalance_col; int PZsolution_col; PZtrial *PZpoleList; PZtrial *PZzeroList; int PZnPoles; int PZnZeros; double *PZdrive_pptr; double *PZdrive_nptr; }; #define PZ_DO_POLES 0x1 #define PZ_DO_ZEROS 0x2 #define PZ_IN_VOL 1 #define PZ_IN_CUR 2 #define PZ_NODEI 1 #define PZ_NODEG 2 #define PZ_NODEJ 3 #define PZ_NODEK 4 #define PZ_V 5 #define PZ_I 6 #define PZ_POL 7 #define PZ_ZER 8 #define PZ_PZ 9 #endif ngspice-26/src/include/ngspice/tskdefs.h0000644000265600020320000000463512264261473017717 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Thomas L. Quarles Modified: 2000 AlansFixes **********/ /* */ #ifndef ngspice_TSKDEFS_H #define ngspice_TSKDEFS_H #include "ngspice/typedefs.h" #include "ngspice/jobdefs.h" struct TSKtask { JOB taskOptions; /* job structure at the front to hold options */ JOB *jobs; char *TSKname; double TSKtemp; double TSKnomTemp; int TSKmaxOrder; /* maximum integration method order */ int TSKintegrateMethod; /* the integration method to be used */ int TSKcurrentAnalysis; /* the analysis in progress (if any) */ /* defines for the value of TSKcurrentAnalysis */ #define DOING_DCOP 1 #define DOING_TRCV 2 #define DOING_AC 4 #define DOING_TRAN 8 int TSKbypass; int TSKdcMaxIter; /* iteration limit for dc op. (itl1) */ int TSKdcTrcvMaxIter; /* iteration limit for dc tran. curv (itl2) */ int TSKtranMaxIter; /* iteration limit for each timepoint for tran*/ /* (itl4) */ int TSKnumSrcSteps; /* number of steps for source stepping */ int TSKnumGminSteps; /* number of steps for Gmin stepping */ double TSKgminFactor; /* factor for Gmin stepping */ double TSKminBreak; double TSKabstol; double TSKpivotAbsTol; double TSKpivotRelTol; double TSKreltol; double TSKchgtol; double TSKvoltTol; #ifdef NEWTRUNC double TSKlteReltol; double TSKlteAbstol; #endif /* NEWTRUNC */ double TSKgmin; double TSKgshunt; /* shunt conductance (CKTdiagGmin) */ double TSKdelmin; double TSKtrtol; double TSKdefaultMosM; double TSKdefaultMosL; double TSKdefaultMosW; double TSKdefaultMosAD; double TSKdefaultMosAS; unsigned int TSKfixLimit:1; unsigned int TSKnoOpIter:1; /* no OP iterating, go straight to gmin step */ unsigned int TSKtryToCompact:1; /* flag for LTRA lines */ unsigned int TSKbadMos3:1; /* flag for MOS3 models */ unsigned int TSKkeepOpInfo:1; /* flag for small signal analyses */ unsigned int TSKcopyNodesets:1; /* flag for nodeset copy */ unsigned int TSKnodeDamping:1; /* flag for node damping */ double TSKabsDv; /* abs limit for iter-iter voltage change */ double TSKrelDv; /* rel limit for iter-iter voltage change */ unsigned int TSKnoopac:1; /* flag for no OP calculation before AC */ }; #endif ngspice-26/src/include/ngspice/grid.h0000644000265600020320000000063512264261473017175 0ustar andreasadmin#ifndef ngspice_GRID_H #define ngspice_GRID_H #include "typedefs.h" /* Grid types. Note: SMITHGRID is only a smith grid, SMITH transforms the data */ typedef enum { GRID_NONE, GRID_LIN, GRID_LOGLOG, GRID_XLOG, GRID_YLOG, GRID_POLAR, GRID_SMITH, GRID_SMITHGRID } GRIDTYPE; void gr_fixgrid(GRAPH *graph, double xdelta, double ydelta, int xtype, int ytype); void gr_redrawgrid(GRAPH *graph); #endif ngspice-26/src/include/ngspice/missing_math.h0000644000265600020320000000155512264261473020734 0ustar andreasadmin/********** Copyright 1999 Emmanuel Rouat **********/ /* Decl. for missing maths functions, if any */ #ifndef ngspice_MISSING_MATH_H #define ngspice_MISSING_MATH_H bool AlmostEqualUlps(double, double, int); #ifndef HAVE_ERFC extern double erfc(double); #endif #ifndef HAVE_LOGB extern double logb(double); #endif #ifndef HAVE_SCALB extern double scalb(double, double); #endif #ifndef HAVE_SCALBN extern double scalbn(double, int); #endif #if !HAVE_DECL_ISNAN #ifndef HAVE_ISNAN extern int isnan(double); #endif #endif #if !HAVE_DECL_ISINF #ifndef HAVE_ISINF #if defined(HAVE_FINITE) && (HAVE_DECL_ISNAN || defined (HAVE_ISNAN)) #define isinf(x) (!finite(x) && !isnan(x)) #define HAVE_ISINF #else #ifdef HAVE_IEEEFP_H extern int isinf(double); #endif #endif #else /* HAVE_ISINF */ extern int isinf(double); #endif /* HAVE_ISINF */ #endif /* HAVE_DECL_ISINF */ #endif ngspice-26/src/include/ngspice/sensgen.h0000644000265600020320000000106512264261473017710 0ustar andreasadmintypedef struct s_sgen sgen; struct s_sgen { CKTcircuit *ckt; GENmodel **devlist; GENmodel *model, *next_model, *first_model; GENinstance *instance, *next_instance, *first_instance; IFparm *ptable; double value; int dev; int istate; int param, max_param; int is_dc; int is_instparam; int is_q; int is_principle; int is_zerook; }; extern sgen *sgen_init(CKTcircuit *ckt, int is_dc); extern int sgen_next(sgen **xsg); extern int sgen_setp(sgen*, CKTcircuit*, IFvalue* ); /* AlansFixes */ extern int sens_getp(sgen *, CKTcircuit *, IFvalue *); ngspice-26/src/include/ngspice/bdrydefs.h0000644000265600020320000000275712264261473020061 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors : 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ #ifndef ngspice_BDRYDEFS_H #define ngspice_BDRYDEFS_H /* Data Structures and Definitions for Device Simulation Cards */ typedef struct sBDRYcard { struct sBDRYcard *BDRYnextCard; double BDRYxLow; double BDRYxHigh; double BDRYyLow; double BDRYyHigh; double BDRYqf; double BDRYsn; double BDRYsp; double BDRYlayer; int BDRYixLow; int BDRYixHigh; int BDRYiyLow; int BDRYiyHigh; int BDRYdomain; int BDRYneighbor; unsigned int BDRYxLowGiven : 1; unsigned int BDRYxHighGiven : 1; unsigned int BDRYyLowGiven : 1; unsigned int BDRYyHighGiven : 1; unsigned int BDRYqfGiven : 1; unsigned int BDRYsnGiven : 1; unsigned int BDRYspGiven : 1; unsigned int BDRYlayerGiven : 1; unsigned int BDRYixLowGiven : 1; unsigned int BDRYixHighGiven : 1; unsigned int BDRYiyLowGiven : 1; unsigned int BDRYiyHighGiven : 1; unsigned int BDRYdomainGiven : 1; unsigned int BDRYneighborGiven : 1; } BDRYcard; /* BDRY parameters */ #define BDRY_X_LOW 1 #define BDRY_X_HIGH 2 #define BDRY_Y_LOW 3 #define BDRY_Y_HIGH 4 #define BDRY_IX_LOW 5 #define BDRY_IX_HIGH 6 #define BDRY_IY_LOW 7 #define BDRY_IY_HIGH 8 #define BDRY_DOMAIN 9 #define BDRY_NEIGHBOR 10 #define BDRY_QF 11 #define BDRY_SN 12 #define BDRY_SP 13 #define BDRY_LAYER 14 #endif ngspice-26/src/include/ngspice/ftedefs.h0000644000265600020320000000471112264261473017667 0ustar andreasadmin/********** Copyright 1990 Regents of the University of California. All rights reserved. Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group **********/ /* * * General front end stuff. */ #ifndef ngspice_FTEDEFS_H #define ngspice_FTEDEFS_H #define DEF_WIDTH 80 /* Line printer width. */ #define DEF_HEIGHT 60 /* Line printer height. */ #define IPOINTMIN 20 /* When we start plotting incremental plots. */ #include "ngspice/fteparse.h" #include "ngspice/fteinp.h" #include "ngspice/fteoptdefs.h" struct ccom; struct save_info { char *name; IFuid analysis; int used; }; /* The curcuits that are currently available to the user. */ struct circ { char *ci_name; /* What the circuit can be called. */ CKTcircuit *ci_ckt; /* The CKTcircuit structure. */ INPtables *ci_symtab; /* The INP symbol table. */ INPmodel *ci_modtab; /* The INP model table. */ struct dbcomm *ci_dbs; /* The database storing save, iplot, stop data */ struct line *ci_deck; /* The input deck. */ struct line *ci_origdeck;/* The input deck, before subckt expansion. */ struct line *ci_options;/* The .option cards from the deck... */ struct line *ci_meas; /* .measure commands to run after simulation */ struct line *ci_param; /* .param statements found in deck */ struct variable *ci_vars; /* ... and the parsed versions. */ bool ci_inprogress; /* We are in a break now. */ bool ci_runonce; /* So com_run can to a reset if necessary... */ wordlist *ci_commands; /* Things to do when this circuit is done. */ struct circ *ci_next; /* The next in the list. */ struct ccom *ci_nodes; /* ccom structs for the nodes... */ struct ccom *ci_devices; /* and devices in the circuit. */ char *ci_filename; /* Where this circuit came from. */ TSKtask *ci_defTask; /* the default task for this circuit */ TSKtask *ci_specTask; /* the special task for command line jobs */ TSKtask *ci_curTask; /* the most recent task for this circuit */ JOB *ci_defOpt; /* the default options anal. for this circuit */ JOB *ci_specOpt; /* the special options anal. for command line jobs */ JOB *ci_curOpt; /* the most recent options anal. for the circuit */ char *ci_last_an; /* name of last analysis run */ FTESTATistics *FTEstats; /* Statistics for the front end */ } ; #define mylog10(xx) (((xx) > 0.0) ? log10(xx) : (- log10(HUGE))) #include "ngspice/fteext.h" #endif ngspice-26/src/include/ngspice/onedev.h0000644000265600020320000000621212264261473017525 0ustar andreasadmin/********** Copyright 1991 Regents of the University of California. All rights reserved. Authors: 1987 Karti Mayaram, 1991 David Gates **********/ /* Member of CIDER device simulator * Version: 1b1 */ /* * One Dimensional Numerical Device Data Structures */ #ifndef ngspice_ONEDEV_H #define ngspice_ONEDEV_H #include "ngspice/gendev.h" #include "ngspice/smpdefs.h" typedef struct sONEdevice { double *dcSolution; /* solution vector for device */ double *dcDeltaSolution; /* delta solution vector */ double *copiedSolution; /* copy of the solution vector */ double *rhs; /* rhs vector */ double *rhsImag; /* imaginary part of rhs vector */ SMPmatrix *matrix; /* matrix for device equations */ int solverType; /* type of equations matrix can solve */ int dimEquil; /* dimension in equilibrium */ int numOrigEquil; /* orig number of nz's in equilibrium */ int numFillEquil; /* fill number of nz's in equilibrium */ int dimBias; /* dimension under bias */ int numOrigBias; /* orig number of nz's under bias */ int numFillBias; /* fill number of nz's under bias */ int numEqns; /* number of equations */ int poissonOnly; /* flag for Poisson eqn solution */ struct sONEelem **elemArray; /* array of elements */ double **devStates; /* device states */ int numNodes; /* total number of nodes */ struct sONEcontact *pFirstContact; /* first contact */ struct sONEcontact *pLastContact; /* last contact */ struct sMaterialInfo *pMaterials; /* temp-dep material information */ struct sStatInfo *pStats; /* run-time statistics */ int converged; /* flag for device convergence */ int iterationNumber; /* device iteration counter */ int baseIndex; /* index for base contact in BJTs */ double baseLength; /* length of base contact in BJTs */ double area; /* area of device in CM^2 */ double rhsNorm; /* norm of rhs vector */ double abstol; /* absolute tolerance for device */ double reltol; /* relative tolerance for device */ char *name; /* name of device */ } ONEdevice; #define devState0 devStates[0] #define devState1 devStates[1] #define devState2 devStates[2] #define devState3 devStates[3] #define devState4 devStates[4] #define devState5 devStates[5] #define devState6 devStates[6] #define devState7 devStates[7] typedef struct sONEcontact { struct sONEcontact *next; /* pointer to next contact */ struct sONEnode **pNodes; /* pointer to the contact nodes */ int numNodes; /* number of nodes in contact */ int id; /* unique contact identifier */ double workf; /* metal work function */ } ONEcontact; #endif ngspice-26/src/include/ngspice/config.h.in0000644000265600020320000003554312264261533020125 0ustar andreasadmin/* src/include/ngspice/config.h.in. Generated from configure.ac by autoheader. */ /* Support for Verilog-A models */ #undef ADMS /* Define if we want debug sensitivity analysis */ #undef ASDEBUG /* Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd */ #undef CAPBYPASS /* The CIDER enhancements */ #undef CIDER /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* Spice cluster support */ #undef CLUSTER /* Define if you want to debug ngspice shell */ #undef CPDEBUG /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define if we want debug distortion analysis (BLOCKTIMES) */ #undef D_DBG_BLOCKTIMES /* Define if we want debug distortion analysis (SMALLTIMES) */ #undef D_DBG_SMALLTIMES /* Define if we want some experimental code */ #undef EXPERIMENTAL_CODE /* Define if we want to enable experimental devices */ #undef EXP_DEV /* Define if you want to debug frontend */ #undef FTEDEBUG /* ngspice.dll Windows */ #undef HAS_SHWIN /* Tcl Windows */ #undef HAS_TCLWIN /* define to specify MS Windows executable with simple GUI */ #undef HAS_WINGUI /* Define to 1 if you have the `access' function. */ #undef HAVE_ACCESS /* Define to 1 if you have the `acosh' function. */ #undef HAVE_ACOSH /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the `asinh' function. */ #undef HAVE_ASINH /* Have asprintf in libiberty */ #undef HAVE_ASPRINTF /* Define to 1 if you have the `atanh' function. */ #undef HAVE_ATANH /* Define to 1 if you have the `bcopy' function. */ #undef HAVE_BCOPY /* Define to 1 if you have the header file. */ #undef HAVE_BLT_H /* Define to enable BSD editline */ #undef HAVE_BSDEDITLINE /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the header file. */ #undef HAVE_CTYPE_H /* Define to 1 if you have the declaration of `isinf', and to 0 if you don't. */ #undef HAVE_DECL_ISINF /* Define to 1 if you have the declaration of `isnan', and to 0 if you don't. */ #undef HAVE_DECL_ISNAN /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ #undef HAVE_DECL_TZNAME /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Have dirname in libgen */ #undef HAVE_DIRNAME /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the `dup2' function. */ #undef HAVE_DUP2 /* Define to 1 if you have the header file. */ #undef HAVE_EDITLINE_READLINE_H /* Define to 1 if you have the `endpwent' function. */ #undef HAVE_ENDPWENT /* Define to 1 if you have the `erfc' function. */ #undef HAVE_ERFC /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FFTW3_H /* Define to 1 if you have the `finite' function. */ #undef HAVE_FINITE /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `ftime' function. */ #undef HAVE_FTIME /* Define to 1 if you have the `getcwd' function. */ #undef HAVE_GETCWD /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* Have fcn getopt_long() */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `getrlimit' function. */ #undef HAVE_GETRLIMIT /* Define to 1 if you have the `getrusage' function. */ #undef HAVE_GETRUSAGE /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the `getwd' function. */ #undef HAVE_GETWD /* Define if we have GNU readline */ #undef HAVE_GNUREADLINE /* Define to 1 if you have the header file. */ #undef HAVE_IEEEFP_H /* Define to 1 if you have the `index' function. */ #undef HAVE_INDEX /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `isatty' function. */ #undef HAVE_ISATTY /* Have fft routines in libfftw3 */ #undef HAVE_LIBFFTW3 /* Define if we want garbage collection enabled */ #undef HAVE_LIBGC /* Define to 1 if you have the header file. */ #undef HAVE_LIBGEN_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBIBERTY_H /* Define to 1 if you have the header file. */ #undef HAVE_LIBINTL_H /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `pthread' library (-lpthread). */ #undef HAVE_LIBPTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the `localtime' function. */ #undef HAVE_LOCALTIME /* Define to 1 if you have the `logb' function. */ #undef HAVE_LOGB /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `modf' function. */ #undef HAVE_MODF /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_TERMCAP_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the `popen' function. */ #undef HAVE_POPEN /* Define to 1 if you have the header file. */ #undef HAVE_PWD_H /* Define to 1 if you have the `qsort' function. */ #undef HAVE_QSORT /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_HISTORY_H /* Define to 1 if you have the header file. */ #undef HAVE_READLINE_READLINE_H /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the `rindex' function. */ #undef HAVE_RINDEX /* Define to 1 if you have the `scalb' function. */ #undef HAVE_SCALB /* Define to 1 if you have the `scalbn' function. */ #undef HAVE_SCALBN /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if you have the header file. */ #undef HAVE_SGTTY_H /* Define to 1 if the system has the type `sighandler_t'. */ #undef HAVE_SIGHANDLER_T /* Define if we have sigsetjmp(). */ #undef HAVE_SIGSETJMP /* Define to 1 if the system has the type `sig_t'. */ #undef HAVE_SIG_T /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDDEF_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if `tm_zone' is a member of `struct tm'. */ #undef HAVE_STRUCT_TM_TM_ZONE /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IO_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `tcgetattr' function. */ #undef HAVE_TCGETATTR /* Define to 1 if you have the header file. */ #undef HAVE_TCL_H /* Define to 1 if you have the `tcsetattr' function. */ #undef HAVE_TCSETATTR /* Define if we have ncurses or termcap */ #undef HAVE_TERMCAP /* Define to 1 if you have the header file. */ #undef HAVE_TERMCAP_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_TERMIO_H /* Define to 1 if you have the `time' function. */ #undef HAVE_TIME /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ #undef HAVE_TM_ZONE /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ #undef HAVE_TZNAME /* Define to 1 if you have the `ulimit' function. */ #undef HAVE_ULIMIT /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `utimes' function. */ #undef HAVE_UTIMES /* Define to 1 if you have the header file. */ #undef HAVE_VALUES_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if you have the header file. */ #undef HAVE__PROC_MEMINFO /* Define to 1 if the system has the type `__sighandler_t'. */ #undef HAVE___SIGHANDLER_T /* Client-Server only via stdio. */ #undef IPC_DEBUG_VIA_STDIO /* Client-Server via socket. */ #undef IPC_UNIX_SOCKETS /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* The NDEV interface */ #undef NDEV /* Define if you want to discover :) */ #undef NEWPRED /* Do not trigger unwanted traps by default */ #undef NEWTRUNC /* Compile with debug info */ #undef NGDEBUG /* Define the directory for executables */ #undef NGSPICEBINDIR /* Define the build date */ #undef NGSPICEBUILDDATE /* Define the directory for architecture independent data files */ #undef NGSPICEDATADIR /* Define if we want NOBYPASS */ #undef NOBYPASS /* Experimental code never implemented to damp Newton iterations */ #undef NODELIMITING /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define if we want predictor algorithm */ #undef PREDICTOR /* Define if you want to debug pole-zero analysis */ #undef PZDEBUG /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define if we want debug sensititvity analysis */ #undef SENSDEBUG /* shared ngspice module */ #undef SHARED_MODULE /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if the `S_IS*' macros in do not work properly. */ #undef STAT_MACROS_BROKEN /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define if we want stepdebug */ #undef STEPDEBUG /* Tcl Module */ #undef TCL_MODULE /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* OpenMP parallel processing */ #undef USE_OMP /* Version number of package */ #undef VERSION /* Define if we want spice2 sensitivity analysis */ #undef WANT_SENSE2 /* Define if you want PSS analysis */ #undef WITH_PSS /* The xspice enhancements */ #undef XSPICE /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to `unsigned int' if does not define. */ #undef size_t /* Define as `fork' if `vfork' does not work. */ #undef vfork ngspice-26/src/include/ngspice/mifdefs.h0000644000265600020320000000666012264261473017671 0ustar andreasadmin#ifndef ngspice_MIFDEFS_H #define ngspice_MIFDEFS_H /* =========================================================================== FILE MIFdefs.h MEMBER OF process XSPICE Copyright 1991 Georgia Tech Research Corporation Atlanta, Georgia 30332 All Rights Reserved PROJECT A-8503 AUTHORS 9/12/91 Bill Kuhn MODIFICATIONS SUMMARY This file contains (augmented) SPICE 3C1 compatible typedefs for use with code models. These typedefs define the data structures that are used internally to describe instances and models in the circuit description linked lists. INTERFACES None. REFERENCED FILES None. NON-STANDARD FEATURES None. =========================================================================== */ #include "ngspice/mifcmdat.h" #include "ngspice/ifsim.h" /* The per-instance data structure */ typedef struct sMIFinstance { struct sMIFmodel *MIFmodPtr; /* backpointer to model */ struct sMIFinstance *MIFnextInstance; /* pointer to next instance of current model */ IFuid MIFname; /* pointer to character string naming this instance */ int num_conn; /* number of connections on the code model */ Mif_Conn_Data_t **conn; /* array of data structures for each connection */ int num_inst_var; /* number of instance variables on the code model */ Mif_Inst_Var_Data_t **inst_var; /* array of structs for each instance var */ int num_param; /* number of parameters on the code model */ Mif_Param_Data_t **param; /* array of structs for each parameter */ int num_state; /* Number of state tags used for this inst */ Mif_State_t *state; /* Info about states */ int num_intgr; /* Number of integrals */ Mif_Intgr_t *intgr; /* Info for integrals */ int num_conv; /* Number of things to be converged */ Mif_Conv_t *conv; /* Info for convergence things */ Mif_Boolean_t initialized; /* True if model called once already */ Mif_Boolean_t analog; /* true if this inst is analog or hybrid type */ Mif_Boolean_t event_driven; /* true if this inst is event-driven or hybrid type */ int inst_index; /* Index into inst_table in evt struct in ckt */ } MIFinstance ; /* The per model data structure */ typedef struct sMIFmodel { int MIFmodType; /* type index of this device type */ struct sMIFmodel *MIFnextModel; /* pointer to next possible model in linked list */ MIFinstance *MIFinstances; /* pointer to list of instances that have this model */ IFuid MIFmodName; /* pointer to character string naming this model */ int num_param; /* number of parameters on the code model */ Mif_Param_Data_t **param; /* array of structs for each parameter */ Mif_Boolean_t analog; /* true if this model is analog or hybrid type */ Mif_Boolean_t event_driven; /* true if this model is event-driven or hybrid type */ } MIFmodel; /* NOTE: There are no device parameter tags, since the ask, mAsk, ... */ /* functions for code models work out of the generic code model structure */ #endif ngspice-26/src/ngspice.txt0000644000265600020320000142317512264261473015226 0ustar andreasadminSUBJECT: main TITLE: Table of Contents TEXT: H TEXT: H TEXT: H TEXT: H Important Notice: TEXT: H This manual is describing the original Spice3 code. It does TEXT: H not contain all the updates which have been added to ngspice TEXT: H over the last 10 years! Even if most of its content is still TEXT: H valid, it may be considered outdated. TEXT: H TEXT: H For updated information, please have a look at the actual TEXT: H ngspicexx-manual.pdf. TEXT: H TEXT: H TEXT: H TEXT: H SUBTOPIC: NGSPICE:INTRODUCTION SUBTOPIC: NGSPICE:CIRCUIT DESCRIPTION SUBTOPIC: NGSPICE:CIRCUIT ELEMENTS AND MODELS SUBTOPIC: NGSPICE:ANALYSES AND OUTPUT CONTROL SUBTOPIC: NGSPICE:INTERACTIVE INTERPRETER SUBTOPIC: NGSPICE:BIBLIOGRAPHY SUBTOPIC: NGSPICE:APPENDIX A SUBTOPIC: NGSPICE:APPENDIX B SUBJECT: INTRODUCTION TITLE: INTRODUCTION TEXT: H TEXT: H _1. _I_N_T_R_O_D_U_C_T_I_O_N TEXT: H TEXT: H TEXT: H SPICE is a general-purpose circuit simulation program TEXT: H for nonlinear dc, nonlinear transient, and linear ac ana- TEXT: H lyses. Circuits may contain resistors, capacitors, induc- TEXT: H tors, mutual inductors, independent voltage and current TEXT: H sources, four types of dependent sources, lossless and lossy TEXT: H transmission lines (two separate implementations), switches, TEXT: H uniform distributed RC lines, and the five most common sem- TEXT: H iconductor devices: diodes, BJTs, JFETs, MESFETs, and MOS- TEXT: H FETs. TEXT: H TEXT: H The SPICE3 version is based directly on SPICE 2G.6. TEXT: H While SPICE3 is being developed to include new features, it TEXT: H continues to support those capabilities and models which TEXT: H remain in extensive use in the SPICE2 program. TEXT: H TEXT: H SPICE has built-in models for the semiconductor dev- TEXT: H ices, and the user need specify only the pertinent model TEXT: H parameter values. The model for the BJT is based on the TEXT: H integral-charge model of Gummel and Poon; however, if the TEXT: H Gummel- Poon parameters are not specified, the model reduces TEXT: H to the simpler Ebers-Moll model. In either case, charge- TEXT: H storage effects, ohmic resistances, and a current-dependent TEXT: H output conductance may be included. The diode model can be TEXT: H used for either junction diodes or Schottky barrier diodes. TEXT: H The JFET model is based on the FET model of Shichman and TEXT: H Hodges. Six MOSFET models are implemented: MOS1 is TEXT: H described by a square-law I-V characteristic, MOS2 [1] is an TEXT: H analytical model, while MOS3 [1] is a semi-empirical model; TEXT: H MOS6 [2] is a simple analytic model accurate in the short- TEXT: H channel region; MOS4 [3, 4] and MOS5 [5] are the BSIM TEXT: H (Berkeley Short-channel IGFET Model) and BSIM2. MOS2, MOS3, TEXT: H and MOS4 include second-order effects such as channel-length TEXT: H modulation, subthreshold conduction, scattering-limited TEXT: H velocity saturation, small-size effects, and charge- TEXT: H controlled capacitances. SUBTOPIC: NGSPICE:TYPES OF ANALYSIS SUBTOPIC: NGSPICE:ANALYSIS AT DIFFERENT TEMPERATURES SUBTOPIC: NGSPICE:CONVERGENCE SUBJECT: TYPES OF ANALYSIS TITLE: TYPES OF ANALYSIS TEXT: H TEXT: H _1._1. _T_Y_P_E_S _O_F _A_N_A_L_Y_S_I_S TEXT: H SUBTOPIC: NGSPICE:DC Analysis SUBTOPIC: NGSPICE:AC SmallSignal Analysis SUBTOPIC: NGSPICE:Transient Analysis SUBTOPIC: NGSPICE:PoleZero Analysis SUBTOPIC: NGSPICE:SmallSignal Distortion Analysis SUBTOPIC: NGSPICE:Sensitivity Analysis SUBTOPIC: NGSPICE:Noise Analysis SUBJECT: DC Analysis TITLE: DC Analysis TEXT: H TEXT: H _1._1._1. _D_C _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H The dc analysis portion of SPICE determines the dc TEXT: H operating point of the circuit with inductors shorted and TEXT: H capacitors opened. The dc analysis options are specified on TEXT: H the .DC, .TF, and .OP control lines. A dc analysis is TEXT: H automatically performed prior to a transient analysis to TEXT: H determine the transient initial conditions, and prior to an TEXT: H ac small-signal analysis to determine the linearized, TEXT: H small-signal models for nonlinear devices. If requested, TEXT: H the dc small-signal value of a transfer function (ratio of TEXT: H output variable to input source), input resistance, and out- TEXT: H put resistance is also computed as a part of the dc solu- TEXT: H tion. The dc analysis can also be used to generate dc TEXT: H transfer curves: a specified independent voltage or current TEXT: H source is stepped over a user-specified range and the dc TEXT: H output variables are stored for each sequential source TEXT: H value. TEXT: H SUBJECT: AC SmallSignal Analysis TITLE: AC Small-Signal Analysis TEXT: H TEXT: H _1._1._2. _A_C _S_m_a_l_l-_S_i_g_n_a_l _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H The ac small-signal portion of SPICE computes the ac TEXT: H output variables as a function of frequency. The program TEXT: H first computes the dc operating point of the circuit and TEXT: H determines linearized, small-signal models for all of the TEXT: H nonlinear devices in the circuit. The resultant linear cir- TEXT: H cuit is then analyzed over a user-specified range of fre- TEXT: H quencies. The desired output of an ac small- signal TEXT: H analysis is usually a transfer function (voltage gain, tran- TEXT: H simpedance, etc). If the circuit has only one ac input, it TEXT: H is convenient to set that input to unity and zero phase, so TEXT: H that output variables have the same value as the transfer TEXT: H function of the output variable with respect to the input. TEXT: H SUBJECT: Transient Analysis TITLE: Transient Analysis TEXT: H TEXT: H _1._1._3. _T_r_a_n_s_i_e_n_t _A_n_a_l_y_s_i_s TEXT: H TEXT: H The transient analysis portion of SPICE computes the TEXT: H transient output variables as a function of time over a TEXT: H user-specified time interval. The initial conditions are TEXT: H automatically determined by a dc analysis. All sources TEXT: H which are not time dependent (for example, power supplies) TEXT: H are set to their dc value. The transient time interval is TEXT: H specified on a .TRAN control line. TEXT: H SUBJECT: PoleZero Analysis TITLE: Pole-Zero Analysis TEXT: H TEXT: H _1._1._4. _P_o_l_e-_Z_e_r_o _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H The pole-zero analysis portion of SPICE computes the TEXT: H poles and/or zeros in the small-signal ac transfer function. TEXT: H The program first computes the dc operating point and then TEXT: H determines the linearized, small-signal models for all the TEXT: H nonlinear devices in the circuit. This circuit is then used TEXT: H to find the poles and zeros of the transfer function. TEXT: H TEXT: H Two types of transfer functions are allowed : one of TEXT: H the form (output voltage)/(input voltage) and the other of TEXT: H the form (output voltage)/(input current). These two types TEXT: H of transfer functions cover all the cases and one can find TEXT: H the poles/zeros of functions like input/output impedance and TEXT: H voltage gain. The input and output ports are specified as TEXT: H two pairs of nodes. TEXT: H TEXT: H The pole-zero analysis works with resistors, capaci- TEXT: H tors, inductors, linear-controlled sources, independent TEXT: H sources, BJTs, MOSFETs, JFETs and diodes. Transmission TEXT: H lines are not supported. TEXT: H TEXT: H The method used in the analysis is a sub-optimal numer- TEXT: H ical search. For large circuits it may take a considerable TEXT: H time or fail to find all poles and zeros. For some cir- TEXT: H cuits, the method becomes "lost" and finds an excessive TEXT: H number of poles or zeros. TEXT: H SUBJECT: SmallSignal Distortion Analysis TITLE: Small-Signal Distortion Analysis TEXT: H TEXT: H _1._1._5. _S_m_a_l_l-_S_i_g_n_a_l _D_i_s_t_o_r_t_i_o_n _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H The distortion analysis portion of SPICE computes TEXT: H steady-state harmonic and intermodulation products for small TEXT: H input signal magnitudes. If signals of a single frequency TEXT: H are specified as the input to the circuit, the complex TEXT: H values of the second and third harmonics are determined at TEXT: H every point in the circuit. If there are signals of two TEXT: H frequencies input to the circuit, the analysis finds out the TEXT: H complex values of the circuit variables at the sum and TEXT: H difference of the input frequencies, and at the difference TEXT: H of the smaller frequency from the second harmonic of the TEXT: H larger frequency. TEXT: H TEXT: H Distortion analysis is supported for the following non- TEXT: H linear devices: diodes (DIO), BJT, JFET, MOSFETs (levels 1, TEXT: H 2, 3, 4/BSIM1, 5/BSIM2, and 6) and MESFETS. All linear dev- TEXT: H ices are automatically supported by distortion analysis. If TEXT: H there are switches present in the circuit, the analysis con- TEXT: H tinues to be accurate provided the switches do not change TEXT: H state under the small excitations used for distortion calcu- TEXT: H lations. TEXT: H SUBJECT: Sensitivity Analysis TITLE: Sensitivity Analysis TEXT: H TEXT: H _1._1._6. _S_e_n_s_i_t_i_v_i_t_y _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H Spice3 will calculate either the DC operating-point TEXT: H sensitivity or the AC small-signal sensitivity of an output TEXT: H variable with respect to all circuit variables, including TEXT: H model parameters. Spice calculates the difference in an TEXT: H output variable (either a node voltage or a branch current) TEXT: H by perturbing each parameter of each device independently. TEXT: H Since the method is a numerical approximation, the results TEXT: H may demonstrate second order effects in highly sensitive TEXT: H parameters, or may fail to show very low but non-zero sensi- TEXT: H tivity. Further, since each variable is perturb by a small TEXT: H fraction of its value, zero-valued parameters are not analy- TEXT: H ized (this has the benefit of reducing what is usually a TEXT: H very large amount of data). TEXT: H SUBJECT: Noise Analysis TITLE: Noise Analysis TEXT: H TEXT: H _1._1._7. _N_o_i_s_e _A_n_a_l_y_s_i_s TEXT: H TEXT: H TEXT: H The noise analysis portion of SPICE does analysis TEXT: H device-generated noise for the given circuit. When provided TEXT: H with an input source and an output port, the analysis calcu- TEXT: H lates the noise contributions of each device (and each noise TEXT: H generator within the device) to the output port voltage. It TEXT: H also calculates the input noise to the circuit, equivalent TEXT: H to the output noise referred to the specified input source. TEXT: H This is done for every frequency point in a specified range TEXT: H - the calculated value of the noise corresponds to the spec- TEXT: H tral density of the circuit variable viewed as a stationary TEXT: H gaussian stochastic process. TEXT: H TEXT: H After calculating the spectral densities, noise TEXT: H analysis integrates these values over the specified fre- TEXT: H quency range to arrive at the total noise voltage/current TEXT: H (over this frequency range). This calculated value TEXT: H corresponds to the variance of the circuit variable viewed TEXT: H as a stationary gaussian process. SUBJECT: ANALYSIS AT DIFFERENT TEMPERATURES TITLE: ANALYSIS AT DIFFERENT TEMPERATURES TEXT: H TEXT: H _1._2. _A_N_A_L_Y_S_I_S _A_T _D_I_F_F_E_R_E_N_T _T_E_M_P_E_R_A_T_U_R_E_S TEXT: H TEXT: H TEXT: H All input data for SPICE is assumed to have been meas- TEXT: H o TEXT: H ured at a nominal temperature of 27 C, which can be changed TEXT: H by use of the TNOM parameter on the .OPTION control line. TEXT: H This value can further be overridden for any device which TEXT: H models temperature effects by specifying the TNOM parameter TEXT: H on the model itself. The circuit simulation is performed at TEXT: H o TEXT: H a temperature of 27 C, unless overridden by a TEMP parameter TEXT: H on the .OPTION control line. Individual instances may TEXT: H further override the circuit temperature through the specif- TEXT: H ication of a TEMP parameter on the instance. TEXT: H TEXT: H Temperature dependent support is provided for resis- TEXT: H tors, diodes, JFETs, BJTs, and level 1, 2, and 3 MOSFETs. TEXT: H BSIM (levels 4 and 5) MOSFETs have an alternate temperature TEXT: H dependency scheme which adjusts all of the model parameters TEXT: H before input to SPICE. For details of the BSIM temperature TEXT: H adjustment, see [6] and [7]. TEXT: H TEXT: H TEXT: H Temperature appears explicitly in the exponential terms TEXT: H of the BJT and diode model equations. In addition, satura- TEXT: H tion currents have a built-in temperature dependence. The TEXT: H temperature dependence of the saturation current in the BJT TEXT: H models is determined by: TEXT: H TEXT: H XTI TEXT: H |T | | E q(T T )| TEXT: H 1 g 1 0 TEXT: H I (T ) = I (T ) |--| exp|-----------| TEXT: H S 1 S 0 TEXT: H |T | |k (T - T )| TEXT: H 0 1 0 TEXT: H TEXT: H TEXT: H TEXT: H where k is Boltzmann's constant, q is the electronic TEXT: H charge, E is the energy gap which is a model parameter, TEXT: H G TEXT: H and XTI is the saturation current temperature exponent TEXT: H (also a model parameter, and usually equal to 3). TEXT: H TEXT: H TEXT: H TEXT: H The temperature dependence of forward and reverse beta TEXT: H is according to the formula: TEXT: H TEXT: H XTB TEXT: H |T | TEXT: H 1 TEXT: H B(T ) = B(T ) |--| TEXT: H 1 0 TEXT: H |T | TEXT: H 0 TEXT: H TEXT: H TEXT: H TEXT: H where T and T are in degrees Kelvin, and XTB is a TEXT: H 1 0 TEXT: H user-supplied model parameter. Temperature effects on TEXT: H beta are carried out by appropriate adjustment to the TEXT: H values of B , I , B , and I (spice model parameters TEXT: H F SE R SC TEXT: H BF, ISE, BR, and ISC, respectively). TEXT: H TEXT: H TEXT: H TEXT: H Temperature dependence of the saturation current in the TEXT: H junction diode model is determined by: TEXT: H TEXT: H XTI TEXT: H --- TEXT: H N TEXT: H |T | | E q(T T ) | TEXT: H 1 g 1 0 TEXT: H I (T ) = I (T ) |--| exp|-------------| TEXT: H S 1 S 0 TEXT: H |T | |N k (T - T )| TEXT: H 0 1 0 TEXT: H TEXT: H TEXT: H TEXT: H where N is the emission coefficient, which is a model TEXT: H parameter, and the other symbols have the same meaning TEXT: H as above. Note that for Schottky barrier diodes, the TEXT: H value of the saturation current temperature exponent, TEXT: H XTI, is usually 2. TEXT: H TEXT: H TEXT: H TEXT: H Temperature appears explicitly in the value of junction TEXT: H potential, U (in spice PHI), for all the device models. The TEXT: H temperature dependence is determined by: TEXT: H TEXT: H TEXT: H | N N | TEXT: H a d TEXT: H kT |------ | TEXT: H U(T) = -- log 2 TEXT: H q e |N (T) | TEXT: H i TEXT: H TEXT: H TEXT: H where k is Boltzmann's constant, q is the electronic TEXT: H charge, N is the acceptor impurity density, N is the TEXT: H a d TEXT: H donor impurity density, N is the intrinsic carrier con- TEXT: H i TEXT: H centration, and E is the energy gap. TEXT: H g TEXT: H TEXT: H TEXT: H TEXT: H Temperature appears explicitly in the value of surface TEXT: H mobility, M (or UO), for the MOSFET model. The temperature TEXT: H 0 TEXT: H dependence is determined by: TEXT: H TEXT: H TEXT: H M (T ) TEXT: H 0 0 TEXT: H M (T) = ------- TEXT: H 0 1.5 TEXT: H | T| TEXT: H |--| TEXT: H |T | TEXT: H 0 TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The effects of temperature on resistors is modeled by TEXT: H the formula: TEXT: H TEXT: H TEXT: H 2 TEXT: H R(T) = R(T ) [1 + TC (T - T ) + TC (T - T ) ] TEXT: H 0 1 0 2 0 TEXT: H TEXT: H TEXT: H TEXT: H where T is the circuit temperature, T is the nominal TEXT: H 0 TEXT: H temperature, and TC and TC are the first- and second- TEXT: H 1 2 TEXT: H order temperature coefficients. TEXT: H SUBJECT: CONVERGENCE TITLE: CONVERGENCE TEXT: H TEXT: H _1._3. _C_O_N_V_E_R_G_E_N_C_E TEXT: H TEXT: H TEXT: H Both dc and transient solutions are obtained by an TEXT: H iterative process which is terminated when both of the fol- TEXT: H lowing conditions hold: TEXT: H TEXT: H TEXT: H 1) The nonlinear branch currents converge to within a TEXT: H tolerance of 0.1% or 1 picoamp (1.0e-12 Amp), whichever TEXT: H is larger. TEXT: H TEXT: H 2) The node voltages converge to within a tolerance of TEXT: H 0.1% or 1 microvolt (1.0e-6 Volt), whichever is larger. TEXT: H TEXT: H Although the algorithm used in SPICE has been found to TEXT: H be very reliable, in some cases it fails to converge to a TEXT: H solution. When this failure occurs, the program terminates TEXT: H the job. TEXT: H TEXT: H Failure to converge in dc analysis is usually due to an TEXT: H error in specifying circuit connections, element values, or TEXT: H model parameter values. Regenerative switching circuits or TEXT: H circuits with positive feedback probably will not converge TEXT: H in the dc analysis unless the OFF option is used for some of TEXT: H the devices in the feedback path, or the .NODESET control TEXT: H line is used to force the circuit to converge to the desired TEXT: H state. SUBJECT: CIRCUIT DESCRIPTION TITLE: CIRCUIT DESCRIPTION TEXT: H TEXT: H _2. _C_I_R_C_U_I_T _D_E_S_C_R_I_P_T_I_O_N SUBTOPIC: NGSPICE:GENERAL STRUCTURE AND CONVENTIONS SUBTOPIC: NGSPICE:TITLE LINE COMMENT LINES AND .END LINE SUBTOPIC: NGSPICE:DEVICE MODELS SUBTOPIC: NGSPICE:SUBCIRCUITS SUBTOPIC: NGSPICE:COMBINING FILES SUBJECT: GENERAL STRUCTURE AND CONVENTIONS TITLE: GENERAL STRUCTURE AND CONVENTIONS TEXT: H TEXT: H _2._1. _G_E_N_E_R_A_L _S_T_R_U_C_T_U_R_E _A_N_D _C_O_N_V_E_N_T_I_O_N_S TEXT: H TEXT: H TEXT: H The circuit to be analyzed is described to SPICE by a TEXT: H set of element lines, which define the circuit topology and TEXT: H element values, and a set of control lines, which define the TEXT: H model parameters and the run controls. The first line in TEXT: H the input file must be the title, and the last line must be TEXT: H ".END". The order of the remaining lines is arbitrary TEXT: H (except, of course, that continuation lines must immediately TEXT: H follow the line being continued). TEXT: H TEXT: H Each element in the circuit is specified by an element TEXT: H line that contains the element name, the circuit nodes to TEXT: H which the element is connected, and the values of the param- TEXT: H eters that determine the electrical characteristics of the TEXT: H element. The first letter of the element name specifies the TEXT: H element type. The format for the SPICE element types is TEXT: H given in what follows. The strings XXXXXXX, YYYYYYY, and TEXT: H ZZZZZZZ denote arbitrary alphanumeric strings. For example, TEXT: H a resistor name must begin with the letter R and can contain TEXT: H one or more characters. Hence, R, R1, RSE, ROUT, and TEXT: H R3AC2ZY are valid resistor names. Details of each type of TEXT: H device are supplied in a following section. TEXT: H TEXT: H Fields on a line are separated by one or more blanks, a TEXT: H comma, an equal ('=') sign, or a left or right parenthesis; TEXT: H extra spaces are ignored. A line may be continued by enter- TEXT: H ing a '+' (plus) in column 1 of the following line; SPICE TEXT: H continues reading beginning with column 2. TEXT: H TEXT: H A name field must begin with a letter (A through Z) and TEXT: H cannot contain any delimiters. TEXT: H TEXT: H TEXT: H A number field may be an integer field (12, -44), a TEXT: H floating point field (3.14159), either an integer or float- TEXT: H ing point number followed by an integer exponent (1e-14, TEXT: H 2.65e3), or either an integer or a floating point number TEXT: H followed by one of the following scale factors: TEXT: H TEXT: H 12 9 6 3 -6 TEXT: H T = 10 G = 10 Meg = 10 K = 10 mil = 25.4 TEXT: H -3 -6 -9 -12 -15 TEXT: H m = 10 u (or M) = 10 n = 10 p = 10 f = 10 TEXT: H TEXT: H TEXT: H TEXT: H Letters immediately following a number that are not scale TEXT: H factors are ignored, and letters immediately following a TEXT: H scale factor are ignored. Hence, 10, 10V, 10Volts, and 10Hz TEXT: H all represent the same number, and M, MA, MSec, and MMhos TEXT: H all represent the same scale factor. Note that 1000, TEXT: H 1000.0, 1000Hz, 1e3, 1.0e3, 1KHz, and 1K all represent the TEXT: H same number. TEXT: H TEXT: H Nodes names may be arbitrary character strings. The TEXT: H datum (ground) node must be named '0'. Note the difference TEXT: H in SPICE3 where the nodes are treated as character strings TEXT: H and not evaluated as numbers, thus '0' and '00' are distinct TEXT: H nodes in SPICE3 but not in SPICE2. The circuit cannot con- TEXT: H tain a loop of voltage sources and/or inductors and cannot TEXT: H contain a cut-set of current sources and/or capacitors. TEXT: H Each node in the circuit must have a dc path to ground. TEXT: H Every node must have at least two connections except for TEXT: H transmission line nodes (to permit unterminated transmission TEXT: H lines) and MOSFET substrate nodes (which have two internal TEXT: H connections anyway). TEXT: H SUBJECT: TITLE LINE COMMENT LINES AND .END LINE TITLE: TITLE LINE, COMMENT LINES AND .END LINE TEXT: H TEXT: H _2._2. _T_I_T_L_E _L_I_N_E, _C_O_M_M_E_N_T _L_I_N_E_S _A_N_D ._E_N_D _L_I_N_E TEXT: H SUBTOPIC: NGSPICE:Title Line SUBTOPIC: NGSPICE:.END Line SUBTOPIC: NGSPICE:Comments SUBJECT: Title Line TITLE: Title Line TEXT: H TEXT: H _2._2._1. _T_i_t_l_e _L_i_n_e TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H POWER AMPLIFIER CIRCUIT TEXT: H TEST OF CAM CELL TEXT: H TEXT: H TEXT: H The title line must be the first in the input file. TEXT: H Its contents are printed verbatim as the heading for each TEXT: H section of output. TEXT: H TEXT: H SUBJECT: .END Line TITLE: .END Line TEXT: H TEXT: H _2._2._2. ._E_N_D _L_i_n_e TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .END TEXT: H TEXT: H TEXT: H The "End" line must always be the last in the input TEXT: H file. Note that the period is an integral part of the TEXT: H name. TEXT: H TEXT: H TEXT: H SUBJECT: Comments TITLE: Comments TEXT: H TEXT: H _2._2._3. _C_o_m_m_e_n_t_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m: TEXT: H TEXT: H * TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H * RF=1K Gain should be 100 TEXT: H * Check open-loop gain and phase margin TEXT: H TEXT: H TEXT: H The asterisk in the first column indicates that TEXT: H this line is a comment line. Comment lines may be TEXT: H placed anywhere in the circuit description. Note that TEXT: H SPICE3 also considers any line with leading white space TEXT: H to be a comment. TEXT: H TEXT: H SUBJECT: DEVICE MODELS TITLE: DEVICE MODELS TEXT: H TEXT: H _2._3. _D_E_V_I_C_E _M_O_D_E_L_S TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... ) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .MODEL MOD1 NPN (BF=50 IS=1E-13 VBF=50) TEXT: H TEXT: H TEXT: H TEXT: H Most simple circuit elements typically require only a TEXT: H few parameter values. However, some devices (semiconductor TEXT: H devices in particular) that are included in SPICE require TEXT: H many parameter values. Often, many devices in a circuit are TEXT: H defined by the same set of device model parameters. For TEXT: H these reasons, a set of device model parameters is defined TEXT: H on a separate .MODEL line and assigned a unique model name. TEXT: H The device element lines in SPICE then refer to the model TEXT: H name. TEXT: H TEXT: H For these more complex device types, each device ele- TEXT: H ment line contains the device name, the nodes to which the TEXT: H device is connected, and the device model name. In addi- TEXT: H tion, other optional parameters may be specified for some TEXT: H devices: geometric factors and an initial condition (see TEXT: H the following section on Transistors and Diodes for more de- TEXT: H tails). TEXT: H TEXT: H MNAME in the above is the model name, and type is one TEXT: H of the following fifteen types: TEXT: H TEXT: H R Semiconductor resistor model TEXT: H C Semiconductor capacitor model TEXT: H SW Voltage controlled switch TEXT: H CSW Current controlled switch TEXT: H URC Uniform distributed RC model TEXT: H LTRA Lossy transmission line model TEXT: H D Diode model TEXT: H NPN NPN BJT model TEXT: H PNP PNP BJT model TEXT: H NJF N-channel JFET model TEXT: H PJF P-channel JFET model TEXT: H NMOS N-channel MOSFET model TEXT: H PMOS P-channel MOSFET model TEXT: H NMF N-channel MESFET model TEXT: H PMF P-channel MESFET model TEXT: H TEXT: H TEXT: H TEXT: H Parameter values are defined by appending the parameter TEXT: H name followed by an equal sign and the parameter value. TEXT: H Model parameters that are not given a value are assigned the TEXT: H default values given below for each model type. Models, TEXT: H model parameters, and default values are listed in the next TEXT: H section along with the description of device element lines. TEXT: H SUBJECT: SUBCIRCUITS TITLE: SUBCIRCUITS TEXT: H TEXT: H _2._4. _S_U_B_C_I_R_C_U_I_T_S TEXT: H TEXT: H TEXT: H A subcircuit that consists of SPICE elements can be TEXT: H defined and referenced in a fashion similar to device TEXT: H models. The subcircuit is defined in the input file by a TEXT: H grouping of element lines; the program then automatically TEXT: H inserts the group of elements wherever the subcircuit is TEXT: H referenced. There is no limit on the size or complexity of TEXT: H subcircuits, and subcircuits may contain other subcircuits. TEXT: H An example of subcircuit usage is given in Appendix A. TEXT: H TEXT: H SUBTOPIC: NGSPICE:.SUBCKT Line SUBTOPIC: NGSPICE:.ENDS Line SUBTOPIC: NGSPICE:Subcircuit Calls SUBJECT: .SUBCKT Line TITLE: .SUBCKT Line TEXT: H TEXT: H _2._4._1. ._S_U_B_C_K_T _L_i_n_e TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .SUBCKT subnam N1 TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .SUBCKT OPAMP 1 2 3 4 TEXT: H TEXT: H TEXT: H TEXT: H A circuit definition is begun with a .SUBCKT line. TEXT: H SUBNAM is the subcircuit name, and N1, N2, ... are the TEXT: H external nodes, which cannot be zero. The group of element TEXT: H lines which immediately follow the .SUBCKT line define the TEXT: H subcircuit. The last line in a subcircuit definition is the TEXT: H .ENDS line (see below). Control lines may not appear within TEXT: H a subcircuit definition; however, subcircuit definitions TEXT: H may contain anything else, including other subcircuit defin- TEXT: H itions, device models, and subcircuit calls (see below). TEXT: H Note that any device models or subcircuit definitions TEXT: H included as part of a subcircuit definition are strictly TEXT: H local (i.e., such models and definitions are not known out- TEXT: H side the subcircuit definition). Also, any element nodes TEXT: H not included on the .SUBCKT line are strictly local, with TEXT: H the exception of 0 (ground) which is always global. TEXT: H TEXT: H SUBJECT: .ENDS Line TITLE: .ENDS Line TEXT: H TEXT: H _2._4._2. ._E_N_D_S _L_i_n_e TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .ENDS TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .ENDS OPAMP TEXT: H TEXT: H TEXT: H The "Ends" line must be the last one for any sub- TEXT: H circuit definition. The subcircuit name, if included, TEXT: H indicates which subcircuit definition is being terminat- TEXT: H ed; if omitted, all subcircuits being defined are ter- TEXT: H minated. The name is needed only when nested subcircuit TEXT: H definitions are being made. TEXT: H TEXT: H TEXT: H SUBJECT: Subcircuit Calls TITLE: Subcircuit Calls TEXT: H TEXT: H _2._4._3. _S_u_b_c_i_r_c_u_i_t _C_a_l_l_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H XYYYYYYY N1 SUBNAM TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H X1 2 4 17 3 1 MULTI TEXT: H TEXT: H TEXT: H Subcircuits are used in SPICE by specifying TEXT: H pseudo-elements beginning with the letter X, followed by TEXT: H the circuit nodes to be used in expanding the subcir- TEXT: H cuit. TEXT: H TEXT: H SUBJECT: COMBINING FILES TITLE: COMBINING FILES: .INCLUDE LINES TEXT: H TEXT: H _2._5. _C_O_M_B_I_N_I_N_G _F_I_L_E_S: ._I_N_C_L_U_D_E _L_I_N_E_S TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .INCLUDE _f_i_l_e_n_a_m_e TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .INCLUDE /users/spice/common/wattmeter.cir TEXT: H TEXT: H TEXT: H Frequently, portions of circuit descriptions will be TEXT: H reused in several input files, particularly with common TEXT: H models and subcircuits. In any spice input file, the TEXT: H ".include" line may be used to copy some other file as if TEXT: H that second file appeared in place of the ".include" line in TEXT: H the original file. There is no restriction on the file name TEXT: H imposed by spice beyond those imposed by the local operating TEXT: H system. SUBJECT: CIRCUIT ELEMENTS AND MODELS TITLE: CIRCUIT ELEMENTS AND MODELS TEXT: H TEXT: H _3. _C_I_R_C_U_I_T _E_L_E_M_E_N_T_S _A_N_D _M_O_D_E_L_S TEXT: H TEXT: H TEXT: H Data fields that are enclosed in less-than and TEXT: H greater-than signs ('< >') are optional. All indicated TEXT: H punctuation (parentheses, equal signs, etc.) is optional but TEXT: H indicate the presence of any delimiter. Further, future TEXT: H implementations may require the punctuation as stated. A TEXT: H consistent style adhering to the punctuation shown here TEXT: H makes the input easier to understand. With respect to TEXT: H branch voltages and currents, SPICE uniformly uses the asso- TEXT: H ciated reference convention (current flows in the direction TEXT: H of voltage drop). SUBTOPIC: NGSPICE:ELEMENTARY DEVICES SUBTOPIC: NGSPICE:VOLTAGE AND CURRENT SOURCES SUBTOPIC: NGSPICE:TRANSMISSION LINES SUBTOPIC: NGSPICE:TRANSISTORS AND DIODES SUBJECT: ELEMENTARY DEVICES TITLE: ELEMENTARY DEVICES TEXT: H TEXT: H _3._1. _E_L_E_M_E_N_T_A_R_Y _D_E_V_I_C_E_S TEXT: H SUBTOPIC: NGSPICE:Resistors SUBTOPIC: NGSPICE:Semiconductor Resistors SUBTOPIC: NGSPICE:Semiconductor Resistor Model SUBTOPIC: NGSPICE:Capacitors SUBTOPIC: NGSPICE:Semiconductor Capacitors SUBTOPIC: NGSPICE:Semiconductor Capacitor Model SUBTOPIC: NGSPICE:Inductors SUBTOPIC: NGSPICE:Coupled Inductors SUBTOPIC: NGSPICE:Switches SUBTOPIC: NGSPICE:Switch Model SUBJECT: Resistors TITLE: Resistors TEXT: H TEXT: H _3._1._1. _R_e_s_i_s_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H RXXXXXXX N1 N2 VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H R1 1 2 100 TEXT: H RC1 12 17 1K TEXT: H TEXT: H TEXT: H N1 and N2 are the two element nodes. VALUE is the TEXT: H resistance (in ohms) and may be positive or negative but not TEXT: H zero. TEXT: H TEXT: H SUBJECT: Semiconductor Resistors TITLE: Semiconductor Resistors TEXT: H TEXT: H _3._1._2. _S_e_m_i_c_o_n_d_u_c_t_o_r _R_e_s_i_s_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H RXXXXXXX N1 N2 TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H RLOAD 2 10 10K TEXT: H RMOD 3 7 RMODEL L=10u W=1u TEXT: H TEXT: H TEXT: H TEXT: H This is the more general form of the resistor presented TEXT: H in section 6.1, and allows the modeling of temperature TEXT: H effects and for the calculation of the actual resistance TEXT: H value from strictly geometric information and the specifica- TEXT: H tions of the process. If VALUE is specified, it overrides TEXT: H the geometric information and defines the resistance. If TEXT: H MNAME is specified, then the resistance may be calculated TEXT: H from the process information in the model MNAME and the TEXT: H given LENGTH and WIDTH. If VALUE is not specified, then TEXT: H MNAME and LENGTH must be specified. If WIDTH is not speci- TEXT: H fied, then it is taken from the default width given in the TEXT: H model. The (optional) TEMP value is the temperature at TEXT: H which this device is to operate, and overrides the tempera- TEXT: H ture specification on the .OPTION control line. TEXT: H TEXT: H SUBJECT: Semiconductor Resistor Model TITLE: Semiconductor Resistor Model (R) TEXT: H TEXT: H _3._1._3. _S_e_m_i_c_o_n_d_u_c_t_o_r _R_e_s_i_s_t_o_r _M_o_d_e_l (_R) TEXT: H TEXT: H TEXT: H The resistor model consists of process-related device TEXT: H data that allow the resistance to be calculated from TEXT: H geometric information and to be corrected for temperature. TEXT: H The parameters available are: TEXT: H TEXT: H name parameter units default example TEXT: H TEXT: H o TEXT: H TC1 first order temperature coeff. Z/ C 0.0 - TEXT: H o 2 TEXT: H TC2 second order temperature coeff. Z/ C 0.0 - TEXT: H RSH sheet resistance Z/[] - 50 TEXT: H DEFW default width meters 1e-6 2e-6 TEXT: H NARROW narrowing due to side etching meters 0.0 1e-7 TEXT: H o TEXT: H TNOM parameter measurement temperature C 27 50 TEXT: H TEXT: H TEXT: H TEXT: H The sheet resistance is used with the narrowing parame- TEXT: H ter and L and W from the resistor device to determine the TEXT: H nominal resistance by the formula TEXT: H TEXT: H L - NARROW TEXT: H R = RSH ---------- TEXT: H W - NARROW TEXT: H TEXT: H DEFW is used to supply a default value for W if one is not TEXT: H specified for the device. If either RSH or L is not speci- TEXT: H fied, then the standard default resistance value of 1k Z is TEXT: H used. TNOM is used to override the circuit-wide value given TEXT: H on the .OPTIONS control line where the parameters of this TEXT: H model have been measured at a different temperature. After TEXT: H the nominal resistance is calculated, it is adjusted for TEXT: H temperature by the formula: TEXT: H TEXT: H 2 TEXT: H R(T) = R(T ) [1 + TC1 (T - T ) + TC2 (T-T ) ] TEXT: H 0 0 0 TEXT: H TEXT: H TEXT: H SUBJECT: Capacitors TITLE: Capacitors TEXT: H TEXT: H _3._1._4. _C_a_p_a_c_i_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H CXXXXXXX N+ N- VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H CBYP 13 0 1UF TEXT: H COSC 17 23 10U IC=3V TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative element TEXT: H nodes, respectively. VALUE is the capacitance in TEXT: H Farads. TEXT: H TEXT: H TEXT: H The (optional) initial condition is the initial (time- TEXT: H zero) value of capacitor voltage (in Volts). Note that the TEXT: H initial conditions (if any) apply 'only' if the UIC option TEXT: H is specified on the .TRAN control line. TEXT: H TEXT: H SUBJECT: Semiconductor Capacitors TITLE: Semiconductor Capacitors TEXT: H TEXT: H _3._1._5. _S_e_m_i_c_o_n_d_u_c_t_o_r _C_a_p_a_c_i_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H CXXXXXXX N1 N2 TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H CLOAD 2 10 10P TEXT: H CMOD 3 7 CMODEL L=10u W=1u TEXT: H TEXT: H TEXT: H TEXT: H This is the more general form of the Capacitor TEXT: H presented in section 6.2, and allows for the calculation of TEXT: H the actual capacitance value from strictly geometric infor- TEXT: H mation and the specifications of the process. If VALUE is TEXT: H specified, it defines the capacitance. If MNAME is speci- TEXT: H fied, then the capacitance is calculated from the process TEXT: H information in the model MNAME and the given LENGTH and TEXT: H WIDTH. If VALUE is not specified, then MNAME and LENGTH TEXT: H must be specified. If WIDTH is not specified, then it is TEXT: H taken from the default width given in the model. Either TEXT: H VALUE or MNAME, LENGTH, and WIDTH may be specified, but not TEXT: H both sets. TEXT: H TEXT: H SUBJECT: Semiconductor Capacitor Model TITLE: Semiconductor Capacitor Model (C) TEXT: H TEXT: H _3._1._6. _S_e_m_i_c_o_n_d_u_c_t_o_r _C_a_p_a_c_i_t_o_r _M_o_d_e_l (_C) TEXT: H TEXT: H TEXT: H The capacitor model contains process information that TEXT: H may be used to compute the capacitance from strictly TEXT: H geometric information. TEXT: H TEXT: H TEXT: H TEXT: H name parameter units default example TEXT: H TEXT: H 2 TEXT: H CJ junction bottom capacitance F/meters - 5e-5 TEXT: H CJSW junction sidewall capacitance F/meters - 2e-11 TEXT: H DEFW default device width meters 1e-6 2e-6 TEXT: H NARROW narrowing due to side etching meters 0.0 1e-7 TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The capacitor has a capacitance computed as TEXT: H TEXT: H CAP = CJ (LENGTH - NARROW) (WIDTH - NARROW) + 2 CJSW (LENGTH + WIDTH - 2 NARROW) TEXT: H TEXT: H SUBJECT: Inductors TITLE: Inductors TEXT: H TEXT: H _3._1._7. _I_n_d_u_c_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H LYYYYYYY N+ N- VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H LLINK 42 69 1UH TEXT: H LSHUNT 23 51 10U IC=15.7MA TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative element TEXT: H nodes, respectively. VALUE is the inductance in Hen- TEXT: H ries. TEXT: H TEXT: H TEXT: H The (optional) initial condition is the initial (time- TEXT: H zero) value of inductor current (in Amps) that flows from TEXT: H N+, through the inductor, to N-. Note that the initial con- TEXT: H ditions (if any) apply only if the UIC option is specified TEXT: H on the .TRAN analysis line. TEXT: H TEXT: H SUBJECT: Coupled Inductors TITLE: Coupled (Mutual) Inductors TEXT: H TEXT: H _3._1._8. _C_o_u_p_l_e_d (_M_u_t_u_a_l) _I_n_d_u_c_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H KXXXXXXX LYYYYYYY LZZZZZZZ VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H K43 LAA LBB 0.999 TEXT: H KXFRMR L1 L2 0.87 TEXT: H TEXT: H TEXT: H LYYYYYYY and LZZZZZZZ are the names of the two cou- TEXT: H pled inductors, and VALUE is the coefficient of cou- TEXT: H pling, K, which must be greater than 0 and less than or TEXT: H equal to 1. Using the 'dot' convention, place a 'dot' TEXT: H on the first node of each inductor. TEXT: H TEXT: H TEXT: H SUBJECT: Switches TITLE: Switches TEXT: H TEXT: H _3._1._9. _S_w_i_t_c_h_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H SXXXXXXX N+ N- NC+ NC- MODEL TEXT: H WYYYYYYY N+ N- VNAM MODEL TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H s1 1 2 3 4 switch1 ON TEXT: H s2 5 6 3 0 sm2 off TEXT: H Switch1 1 2 10 0 smodel1 TEXT: H w1 1 2 vclock switchmod1 TEXT: H W2 3 0 vramp sm1 ON TEXT: H wreset 5 6 vclck lossyswitch OFF TEXT: H TEXT: H TEXT: H Nodes 1 and 2 are the nodes between which the TEXT: H switch terminals are connected. The model name is man- TEXT: H datory while the initial conditions are optional. For TEXT: H the voltage controlled switch, nodes 3 and 4 are the po- TEXT: H sitive and negative controlling nodes respectively. For TEXT: H the current controlled switch, the controlling current TEXT: H is that through the specified voltage source. The TEXT: H direction of positive controlling current flow is from TEXT: H the positive node, through the source, to the negative TEXT: H node. TEXT: H TEXT: H TEXT: H SUBJECT: Switch Model TITLE: Switch Model (SW/CSW) TEXT: H TEXT: H _3._1._1_0. _S_w_i_t_c_h _M_o_d_e_l (_S_W/_C_S_W) TEXT: H TEXT: H TEXT: H The switch model allows an almost ideal switch to be TEXT: H described in SPICE. The switch is not quite ideal, in that TEXT: H the resistance can not change from 0 to infinity, but must TEXT: H always have a finite positive value. By proper selection of TEXT: H the on and off resistances, they can be effectively zero and TEXT: H infinity in comparison to other circuit elements. The TEXT: H parameters available are: TEXT: H TEXT: H name parameter units default switch TEXT: H TEXT: H VT threshold voltage Volts 0.0 S TEXT: H IT threshold current Amps 0.0 W TEXT: H VH hysteresis voltage Volts 0.0 S TEXT: H IH hysteresis current Amps 0.0 W TEXT: H RON on resistance Z 1.0 both TEXT: H ROFF off resistance Z 1/GMIN* both TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H *(See the .OPTIONS control line for a description of TEXT: H GMIN, its default value results in an off-resistance of TEXT: H 1.0e+12 ohms.) TEXT: H TEXT: H TEXT: H The use of an ideal element that is highly nonlinear TEXT: H such as a switch can cause large discontinuities to occur in TEXT: H the circuit node voltages. A rapid change such as that TEXT: H associated with a switch changing state can cause numerical TEXT: H roundoff or tolerance problems leading to erroneous results TEXT: H or timestep difficulties. The user of switches can improve TEXT: H the situation by taking the following steps: TEXT: H TEXT: H First, it is wise to set ideal switch impedances just TEXT: H high or low enough to be negligible with respect to other TEXT: H circuit elements. Using switch impedances that are close to TEXT: H "ideal" in all cases aggravates the problem of discontinui- TEXT: H ties mentioned above. Of course, when modeling real devices TEXT: H such as MOSFETS, the on resistance should be adjusted to a TEXT: H realistic level depending on the size of the device being TEXT: H modeled. TEXT: H TEXT: H If a wide range of ON to OFF resistance must be used in TEXT: H the switches (ROFF/RON >1e+12), then the tolerance on errors TEXT: H allowed during transient analysis should be decreased by TEXT: H using the .OPTIONS control line and specifying TRTOL to be TEXT: H less than the default value of 7.0. When switches are TEXT: H placed around capacitors, then the option CHGTOL should also TEXT: H be reduced. Suggested values for these two options are 1.0 TEXT: H and 1e-16 respectively. These changes inform SPICE3 to be TEXT: H more careful around the switch points so that no errors are TEXT: H made due to the rapid change in the circuit. TEXT: H SUBJECT: VOLTAGE AND CURRENT SOURCES TITLE: VOLTAGE AND CURRENT SOURCES TEXT: H TEXT: H _3._2. _V_O_L_T_A_G_E _A_N_D _C_U_R_R_E_N_T _S_O_U_R_C_E_S TEXT: H SUBTOPIC: NGSPICE:Independent Sources SUBTOPIC: NGSPICE:Linear Dependent Sources SUBTOPIC: NGSPICE:Nonlinear Dependent Sources SUBJECT: Independent Sources TITLE: Independent Sources TEXT: H TEXT: H _3._2._1. _I_n_d_e_p_e_n_d_e_n_t _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H VXXXXXXX N+ N- < DC/TRAN VALUE> >> TEXT: H + >> >> TEXT: H IYYYYYYY N+ N- < DC/TRAN VALUE> >> TEXT: H + >> >> TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H VCC 10 0 DC 6 TEXT: H VIN 13 2 0.001 AC 1 SIN(0 1 1MEG) TEXT: H ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K) TEXT: H VMEAS 12 9 TEXT: H VCARRIER 1 0 DISTOF1 0.1 -90.0 TEXT: H VMODULATOR 2 0 DISTOF2 0.01 TEXT: H IIN1 1 5 AC 1 DISTOF1 DISTOF2 0.001 TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative nodes, respec- TEXT: H tively. Note that voltage sources need not be grounded. TEXT: H Positive current is assumed to flow from the positive node, TEXT: H through the source, to the negative node. A current source TEXT: H of positive value forces current to flow out of the N+ node, TEXT: H through the source, and into the N- node. Voltage sources, TEXT: H in addition to being used for circuit excitation, are the TEXT: H 'ammeters' for SPICE, that is, zero valued voltage sources TEXT: H may be inserted into the circuit for the purpose of measur- TEXT: H ing current. They of course have no effect on circuit TEXT: H operation since they represent short-circuits. TEXT: H TEXT: H TEXT: H DC/TRAN is the dc and transient analysis value of the TEXT: H source. If the source value is zero both for dc and tran- TEXT: H sient analyses, this value may be omitted. If the source TEXT: H value is time-invariant (e.g., a power supply), then the TEXT: H value may optionally be preceded by the letters DC. TEXT: H TEXT: H TEXT: H ACMAG is the ac magnitude and ACPHASE is the ac phase. TEXT: H The source is set to this value in the ac analysis. If TEXT: H ACMAG is omitted following the keyword AC, a value of unity TEXT: H is assumed. If ACPHASE is omitted, a value of zero is TEXT: H assumed. If the source is not an ac small-signal input, the TEXT: H keyword AC and the ac values are omitted. TEXT: H TEXT: H TEXT: H DISTOF1 and DISTOF2 are the keywords that specify that TEXT: H the independent source has distortion inputs at the frequen- TEXT: H cies F1 and F2 respectively (see the description of the TEXT: H .DISTO control line). The keywords may be followed by an TEXT: H optional magnitude and phase. The default values of the TEXT: H magnitude and phase are 1.0 and 0.0 respectively. TEXT: H TEXT: H TEXT: H Any independent source can be assigned a time-dependent TEXT: H value for transient analysis. If a source is assigned a TEXT: H time-dependent value, the time-zero value is used for dc TEXT: H analysis. There are five independent source functions: TEXT: H pulse, exponential, sinusoidal, piece-wise linear, and TEXT: H single-frequency FM. If parameters other than source values TEXT: H are omitted or set to zero, the default values shown are TEXT: H assumed. (TSTEP is the printing increment and TSTOP is the TEXT: H final time (see the .TRAN control line for explanation)). TEXT: H TEXT: H SUBTOPIC: NGSPICE:Pulse SUBTOPIC: NGSPICE:Sinusoidal SUBTOPIC: NGSPICE:Exponential SUBTOPIC: NGSPICE:PieceWise Linear SUBTOPIC: NGSPICE:SingleFrequency FM SUBJECT: Pulse TITLE: Pulse TEXT: H TEXT: H _3._2._1._1. _P_u_l_s_e TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H PULSE(V1 V2 TD TR TF PW PER) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS) TEXT: H TEXT: H TEXT: H TEXT: H parameter default value units TEXT: H ----------------------------------------------------- TEXT: H V1 (initial value) Volts or Amps TEXT: H V2 (pulsed value) Volts or Amps TEXT: H TD (delay time) 0.0 seconds TEXT: H TR (rise time) TSTEP seconds TEXT: H TF (fall time) TSTEP seconds TEXT: H PW (pulse width) TSTOP seconds TEXT: H PER(period) TSTOP seconds TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H A single pulse so specified is described by the follow- TEXT: H ing table: TEXT: H TEXT: H TEXT: H TEXT: H time value TEXT: H ------------------- TEXT: H 0 V1 TEXT: H TD V1 TEXT: H TD+TR V2 TEXT: H TD+TR+PW V2 TEXT: H TD+TR+PW+TF V1 TEXT: H TSTOP V1 TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H Intermediate points are determined by linear interpola- TEXT: H tion. TEXT: H TEXT: H SUBJECT: Sinusoidal TITLE: Sinusoidal TEXT: H TEXT: H _3._2._1._2. _S_i_n_u_s_o_i_d_a_l TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H SIN(VO VA FREQ TD THETA) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H VIN 3 0 SIN(0 1 100MEG 1NS 1E10) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H parameters default value units TEXT: H ------------------------------------------------------- TEXT: H VO (offset) Volts or Amps TEXT: H VA (amplitude) Volts or Amps TEXT: H FREQ (frequency) 1/TSTOP Hz TEXT: H TD (delay) 0.0 seconds TEXT: H THETA (damping factor) 0.0 1/seconds TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The shape of the waveform is described by the following TEXT: H table: TEXT: H TEXT: H TEXT: H time value TEXT: H ------------------------------------------------------------ TEXT: H 0 to TD VO TEXT: H -(t - TD)THETA TEXT: H TD to TSTOP VO + VA e sin(2 J FREQ (t + TD)) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: Exponential TITLE: Exponential TEXT: H TEXT: H _3._2._1._3. _E_x_p_o_n_e_n_t_i_a_l TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m: TEXT: H TEXT: H EXP(V1 V2 TD1 TAU1 TD2 TAU2) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H VIN 3 0 EXP(-4 -1 2NS 30NS 60NS 40NS) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H parameter default value units TEXT: H --------------------------------------------------------- TEXT: H V1 (initial value) Volts or Amps TEXT: H V2 (pulsed value) Volts or Amps TEXT: H TD1 (rise delay time) 0.0 seconds TEXT: H TAU1 (rise time constant) TSTEP seconds TEXT: H TD2 (fall delay time) TD1+TSTEP seconds TEXT: H TAU2 (fall time constant) TSTEP seconds TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The shape of the waveform is described by the following TEXT: H table: TEXT: H TEXT: H TEXT: H TEXT: H time value TEXT: H ---------------------------------------------------------------------------- TEXT: H 0 to TD1 V1 TEXT: H | ------------| TEXT: H TAU1 TEXT: H | -(t - TD1) | -(t - TD2) TEXT: H TD1 to TD2 V1 + (V2 - V1) 1 - e TEXT: H | ----------| | ----------| TEXT: H | TAU1 | | TAU2 | TEXT: H TD2 to TSTOP V1 + (V2 - V1) - e + (V1 - V2) 1 - e TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: PieceWise Linear TITLE: Piece-Wise Linear TEXT: H TEXT: H _3._2._1._4. _P_i_e_c_e-_W_i_s_e _L_i_n_e_a_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m: TEXT: H TEXT: H PWL(T1 V1 ) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H Each pair of values (Ti, Vi) specifies that the value TEXT: H of the source is Vi (in Volts or Amps) at time=Ti. The TEXT: H value of the source at intermediate values of time is deter- TEXT: H mined by using linear interpolation on the input values. TEXT: H TEXT: H SUBJECT: SingleFrequency FM TITLE: Single-Frequency FM TEXT: H TEXT: H _3._2._1._5. _S_i_n_g_l_e-_F_r_e_q_u_e_n_c_y _F_M TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m: TEXT: H TEXT: H SFFM(VO VA FC MDI FS) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H V1 12 0 SFFM(0 1M 20K 5 1K) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H parameter default value units TEXT: H ------------------------------------------------------- TEXT: H VO (offset) Volts or Amps TEXT: H VA (amplitude) Volts or Amps TEXT: H FC (carrier frequency) 1/TSTOP Hz TEXT: H MDI (modulation index) TEXT: H FS (signal frequency) 1/TSTOP Hz TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The shape of the waveform is described by the following TEXT: H equation: TEXT: H TEXT: H TEXT: H | | TEXT: H V(t)=V + V sin 2 J FC t + MDI sin(2 J FS t) TEXT: H O A | | TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: Linear Dependent Sources TITLE: Linear Dependent Sources TEXT: H TEXT: H _3._2._2. _L_i_n_e_a_r _D_e_p_e_n_d_e_n_t _S_o_u_r_c_e_s TEXT: H TEXT: H TEXT: H SPICE allows circuits to contain linear dependent TEXT: H sources characterized by any of the four equations TEXT: H TEXT: H i = g v v = e v i = f i v TEXT: H = h i TEXT: H TEXT: H where g, e, f, and h are constants representing transconduc- TEXT: H tance, voltage gain, current gain, and transresistance, TEXT: H respectively. TEXT: H TEXT: H TEXT: H SUBTOPIC: NGSPICE:Linear VoltageControlled Current Sources SUBTOPIC: NGSPICE:Linear VoltageControlled Voltage Sources SUBTOPIC: NGSPICE:Linear CurrentControlled Current Sources SUBTOPIC: NGSPICE:Linear CurrentControlled Voltage Sources SUBJECT: Linear VoltageControlled Current Sources TITLE: Linear Voltage-Controlled Current Sources TEXT: H TEXT: H _3._2._2._1. _L_i_n_e_a_r _V_o_l_t_a_g_e-_C_o_n_t_r_o_l_l_e_d _C_u_r_r_e_n_t _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H GXXXXXXX N+ N- NC+ NC- VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H G1 2 0 5 0 0.1MMHO TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative nodes, TEXT: H respectively. Current flow is from the positive node, TEXT: H through the source, to the negative node. NC+ and NC- TEXT: H are the positive and negative controlling nodes, respec- TEXT: H tively. VALUE is the transconductance (in mhos). TEXT: H TEXT: H TEXT: H SUBJECT: Linear VoltageControlled Voltage Sources TITLE: Linear Voltage-Controlled Voltage Sources TEXT: H TEXT: H _3._2._2._2. _L_i_n_e_a_r _V_o_l_t_a_g_e-_C_o_n_t_r_o_l_l_e_d _V_o_l_t_a_g_e _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H EXXXXXXX N+ N- NC+ NC- VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H E1 2 3 14 1 2.0 TEXT: H TEXT: H TEXT: H N+ is the positive node, and N- is the negative TEXT: H node. NC+ and NC- are the positive and negative con- TEXT: H trolling nodes, respectively. VALUE is the voltage TEXT: H gain. TEXT: H TEXT: H TEXT: H SUBJECT: Linear CurrentControlled Current Sources TITLE: Linear Current-Controlled Current Sources TEXT: H TEXT: H _3._2._2._3. _L_i_n_e_a_r _C_u_r_r_e_n_t-_C_o_n_t_r_o_l_l_e_d _C_u_r_r_e_n_t _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H FXXXXXXX N+ N- VNAM VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H F1 13 5 VSENS 5 TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative nodes, TEXT: H respectively. Current flow is from the positive node, TEXT: H through the source, to the negative node. VNAM is the TEXT: H name of a voltage source through which the controlling TEXT: H current flows. The direction of positive controlling TEXT: H current flow is from the positive node, through the TEXT: H source, to the negative node of VNAM. VALUE is the TEXT: H current gain. TEXT: H TEXT: H TEXT: H SUBJECT: Linear CurrentControlled Voltage Sources TITLE: Linear Current-Controlled Voltage Sources TEXT: H TEXT: H _3._2._2._4. _L_i_n_e_a_r _C_u_r_r_e_n_t-_C_o_n_t_r_o_l_l_e_d _V_o_l_t_a_g_e _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H HXXXXXXX N+ N- VNAM VALUE TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H HX 5 17 VZ 0.5K TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative nodes, TEXT: H respectively. VNAM is the name of a voltage source TEXT: H through which the controlling current flows. The direc- TEXT: H tion of positive controlling current flow is from the TEXT: H positive node, through the source, to the negative node TEXT: H of VNAM. VALUE is the transresistance (in ohms). TEXT: H TEXT: H TEXT: H SUBJECT: Nonlinear Dependent Sources TITLE: Non-linear Dependent Sources TEXT: H TEXT: H _3._2._3. _N_o_n-_l_i_n_e_a_r _D_e_p_e_n_d_e_n_t _S_o_u_r_c_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H BXXXXXXX N+ N- TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H B1 0 1 I=cos(v(1))+sin(v(2)) TEXT: H B1 0 1 V=ln(cos(log(v(1,2)^2)))-v(3)^4+v(2)^v(1) TEXT: H B1 3 4 I=17 TEXT: H B1 3 4 V=exp(pi^i(vdd)) TEXT: H TEXT: H TEXT: H TEXT: H _N+ is the positive node, and _N- is the negative node. TEXT: H The values of the V and I parameters determine the voltages TEXT: H and currents across and through the device, respectively. TEXT: H If I is given then the device is a current source, and if V TEXT: H is given the device is a voltage source. One and only one TEXT: H of these parameters must be given. TEXT: H TEXT: H The small-signal AC behavior of the nonlinear source is TEXT: H a linear dependent source (or sources) with a proportional- TEXT: H ity constant equal to the derivative (or derivatives) of the TEXT: H source at the DC operating point. TEXT: H TEXT: H TEXT: H The expressions given for V and I may be any function TEXT: H of voltages and currents through voltage sources in the sys- TEXT: H tem. The following functions of real variables are defined: TEXT: H TEXT: H abs asinh cosh sin TEXT: H acos atan exp sinh TEXT: H acosh atanh ln sqrt TEXT: H asin cos log tan TEXT: H TEXT: H TEXT: H TEXT: H The function "u" is the unit step function, with a TEXT: H value of one for arguments greater than one and a value of TEXT: H zero for arguments less than zero. The function "uramp" is TEXT: H the integral of the unit step: for an input _x, the value is TEXT: H zero if _x is less than zero, or if _x is greater than zero TEXT: H the value is _x. These two functions are useful in sythesiz- TEXT: H ing piece-wise non-linear functions, though convergence may TEXT: H be adversely affected. TEXT: H TEXT: H TEXT: H The following standard operators are defined: TEXT: H TEXT: H + - * / ^ unary - TEXT: H TEXT: H TEXT: H If the argument of log, ln, or sqrt becomes less than TEXT: H zero, the absolute value of the argument is used. If a TEXT: H divisor becomes zero or the argument of log or ln becomes TEXT: H zero, an error will result. Other problems may occur when TEXT: H the argument for a function in a partial derivative enters a TEXT: H region where that function is undefined. TEXT: H TEXT: H TEXT: H To get time into the expression you can integrate the TEXT: H current from a constant current source with a capacitor and TEXT: H use the resulting voltage (don't forget to set the initial TEXT: H voltage across the capacitor). Non-linear resistors, capa- TEXT: H citors, and inductors may be synthesized with the nonlinear TEXT: H dependent source. Non-linear resistors are obvious. Non- TEXT: H linear capacitors and inductors are implemented with their TEXT: H linear counterparts by a change of variables implemented TEXT: H with the nonlinear dependent source. The following subcir- TEXT: H cuit will implement a nonlinear capacitor: TEXT: H TEXT: H .Subckt nlcap pos neg TEXT: H * Bx: calculate f(input voltage) TEXT: H Bx 1 0 v = f(v(pos,neg)) TEXT: H * Cx: linear capacitance TEXT: H Cx 2 0 1 TEXT: H * Vx: Ammeter to measure current into the capacitor TEXT: H Vx 2 1 DC 0Volts TEXT: H * Drive the current through Cx back into the circuit TEXT: H Fx pos neg Vx 1 TEXT: H .ends TEXT: H TEXT: H TEXT: H Non-linear inductors are similar. TEXT: H TEXT: H SUBJECT: TRANSMISSION LINES TITLE: TRANSMISSION LINES TEXT: H TEXT: H _3._3. _T_R_A_N_S_M_I_S_S_I_O_N _L_I_N_E_S TEXT: H SUBTOPIC: NGSPICE:Lossless Transmission Lines SUBTOPIC: NGSPICE:Lossy Transmission Lines SUBTOPIC: NGSPICE:Lossy Transmission Line Model SUBTOPIC: NGSPICE:Uniform Distributed RC Lines SUBTOPIC: NGSPICE:Uniform Distributed RC Model SUBJECT: Lossless Transmission Lines TITLE: Lossless Transmission Lines TEXT: H TEXT: H _3._3._1. _L_o_s_s_l_e_s_s _T_r_a_n_s_m_i_s_s_i_o_n _L_i_n_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H TXXXXXXX N1 N2 N3 N4 Z0=VALUE > TEXT: H + TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H T1 1 0 2 0 Z0=50 TD=10NS TEXT: H TEXT: H TEXT: H N1 and N2 are the nodes at port 1; N3 and N4 are the TEXT: H nodes at port 2. Z0 is the characteristic impedance. The TEXT: H length of the line may be expressed in either of two forms. TEXT: H The transmission delay, TD, may be specified directly (as TEXT: H TD=10ns, for example). Alternatively, a frequency F may be TEXT: H given, together with NL, the normalized electrical length of TEXT: H the transmission line with respect to the wavelength in the TEXT: H line at the frequency F. If a frequency is specified but NL TEXT: H is omitted, 0.25 is assumed (that is, the frequency is TEXT: H assumed to be the quarter-wave frequency). Note that TEXT: H although both forms for expressing the line length are indi- TEXT: H cated as optional, one of the two must be specified. TEXT: H TEXT: H Note that this element models only one propagating TEXT: H mode. If all four nodes are distinct in the actual circuit, TEXT: H then two modes may be excited. To simulate such a situa- TEXT: H tion, two transmission-line elements are required. (see the TEXT: H example in Appendix A for further clarification.) TEXT: H TEXT: H The (optional) initial condition specification consists TEXT: H of the voltage and current at each of the transmission line TEXT: H ports. Note that the initial conditions (if any) apply TEXT: H 'only' if the UIC option is specified on the .TRAN control TEXT: H line. TEXT: H TEXT: H Note that a lossy transmission line (see below) with TEXT: H zero loss may be more accurate than than the lossless TEXT: H transmission line due to implementation details. TEXT: H TEXT: H SUBJECT: Lossy Transmission Lines TITLE: Lossy Transmission Lines TEXT: H TEXT: H _3._3._2. _L_o_s_s_y _T_r_a_n_s_m_i_s_s_i_o_n _L_i_n_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H OXXXXXXX N1 N2 N3 N4 MNAME TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H O23 1 0 2 0 LOSSYMOD TEXT: H OCONNECT 10 5 20 5 INTERCONNECT TEXT: H TEXT: H TEXT: H TEXT: H This is a two-port convolution model for single- TEXT: H conductor lossy transmission lines. N1 and N2 are the nodes TEXT: H at port 1; N3 and N4 are the nodes at port 2. Note that a TEXT: H lossy transmission line with zero loss may be more accurate TEXT: H than than the lossless transmission line due to implementa- TEXT: H tion details. TEXT: H SUBJECT: Lossy Transmission Line Model TITLE: Lossy Transmission Line Model (LTRA) TEXT: H TEXT: H _3._3._3. _L_o_s_s_y _T_r_a_n_s_m_i_s_s_i_o_n _L_i_n_e _M_o_d_e_l (_L_T_R_A) TEXT: H TEXT: H TEXT: H The uniform RLC/RC/LC/RG transmission line model (re- TEXT: H ferred to as the LTRA model henceforth) models a uniform TEXT: H constant-parameter distributed transmission line. The RC TEXT: H and LC cases may also be modeled using the URC and TRA TEXT: H models; however, the newer LTRA model is usually faster and TEXT: H more accurate than the others. The operation of the LTRA TEXT: H model is based on the convolution of the transmission line's TEXT: H impulse responses with its inputs (see [8]). TEXT: H TEXT: H The LTRA model takes a number of parameters, some of TEXT: H which must be given and some of which are optional. TEXT: H TEXT: H name parameter units/type default example TEXT: H TEXT: H R resistance/length Z/unit 0.0 0.2 TEXT: H L inductance/length henrys/unit 0.0 9.13e-9 TEXT: H G conductance/length mhos/unit 0.0 0.0 TEXT: H C capacitance/length farads/unit 0.0 3.65e-12 TEXT: H LEN length of line no default 1.0 TEXT: H REL breakpoint control arbitrary unit 1 0.5 TEXT: H ABS breakpoint control 1 5 TEXT: H NOSTEPLIMIT don't limit timestep to less than flag not set set TEXT: H line delay TEXT: H NOCONTROL don't do complex timestep control flag not set set TEXT: H LININTERP use linear interpolation flag not set set TEXT: H MIXEDINTERP use linear when quadratic seems bad not set set TEXT: H COMPACTREL special reltol for history compaction flag RELTOL 1.0e-3 TEXT: H COMPACTABS special abstol for history compaction ABSTOL 1.0e-9 TEXT: H TRUNCNR use Newton-Raphson method for flag not set set TEXT: H timestep control TEXT: H TRUNCDONTCUT don't limit timestep to keep flag not set set TEXT: H impulse-response errors low TEXT: H TEXT: H TEXT: H TEXT: H The following types of lines have been implemented so TEXT: H far: RLC (uniform transmission line with series loss only), TEXT: H RC (uniform RC line), LC (lossless transmission line), and TEXT: H RG (distributed series resistance and parallel conductance TEXT: H only). Any other combination will yield erroneous results TEXT: H and should not be tried. The length LEN of the line must be TEXT: H specified. TEXT: H TEXT: H NOSTEPLIMIT is a flag that will remove the default res- TEXT: H triction of limiting time-steps to less than the line delay TEXT: H in the RLC case. NOCONTROL is a flag that prevents the TEXT: H default limiting of the time-step based on convolution error TEXT: H criteria in the RLC and RC cases. This speeds up simulation TEXT: H but may in some cases reduce the accuracy of results. TEXT: H LININTERP is a flag that, when specified, will use linear TEXT: H interpolation instead of the default quadratic interpolation TEXT: H for calculating delayed signals. MIXEDINTERP is a flag TEXT: H that, when specified, uses a metric for judging whether qua- TEXT: H dratic interpolation is not applicable and if so uses linear TEXT: H interpolation; otherwise it uses the default quadratic TEXT: H interpolation. TRUNCDONTCUT is a flag that removes the TEXT: H default cutting of the time-step to limit errors in the TEXT: H actual calculation of impulse-response related quantities. TEXT: H COMPACTREL and COMPACTABS are quantities that control the TEXT: H compaction of the past history of values stored for convolu- TEXT: H tion. Larger values of these lower accuracy but usually TEXT: H increase simulation speed. These are to be used with the TEXT: H TRYTOCOMPACT option, described in the .OPTIONS section. TEXT: H TRUNCNR is a flag that turns on the use of Newton-Raphson TEXT: H iterations to determine an appropriate timestep in the TEXT: H timestep control routines. The default is a trial and error TEXT: H procedure by cutting the previous timestep in half. REL and TEXT: H ABS are quantities that control the setting of breakpoints. TEXT: H TEXT: H The option most worth experimenting with for increasing TEXT: H the speed of simulation is REL. The default value of 1 is TEXT: H usually safe from the point of view of accuracy but occa- TEXT: H sionally increases computation time. A value greater than 2 TEXT: H eliminates all breakpoints and may be worth trying depending TEXT: H on the nature of the rest of the circuit, keeping in mind TEXT: H that it might not be safe from the viewpoint of accuracy. TEXT: H Breakpoints may usually be entirely eliminated if it is TEXT: H expected the circuit will not display sharp discontinuities. TEXT: H Values between 0 and 1 are usually not required but may be TEXT: H used for setting many breakpoints. TEXT: H TEXT: H COMPACTREL may also be experimented with when the TEXT: H option TRYTOCOMPACT is specified in a .OPTIONS card. The TEXT: H legal range is between 0 and 1. Larger values usually TEXT: H decrease the accuracy of the simulation but in some cases TEXT: H improve speed. If TRYTOCOMPACT is not specified on a TEXT: H .OPTIONS card, history compaction is not attempted and accu- TEXT: H racy is high. NOCONTROL, TRUNCDONTCUT and NOSTEPLIMIT also TEXT: H tend to increase speed at the expense of accuracy. TEXT: H SUBJECT: Uniform Distributed RC Lines TITLE: Uniform Distributed RC Lines (Lossy) TEXT: H TEXT: H _3._3._4. _U_n_i_f_o_r_m _D_i_s_t_r_i_b_u_t_e_d _R_C _L_i_n_e_s (_L_o_s_s_y) TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H UXXXXXXX N1 N2 N3 MNAME L=LEN TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H U1 1 2 0 URCMOD L=50U TEXT: H URC2 1 12 2 UMODL l=1MIL N=6 TEXT: H TEXT: H TEXT: H TEXT: H N1 and N2 are the two element nodes the RC line con- TEXT: H nects, while N3 is the node to which the capacitances are TEXT: H connected. MNAME is the model name, LEN is the length of TEXT: H the RC line in meters. LUMPS, if specified, is the number TEXT: H of lumped segments to use in modeling the RC line (see the TEXT: H model description for the action taken if this parameter is TEXT: H omitted). TEXT: H SUBJECT: Uniform Distributed RC Model TITLE: Uniform Distributed RC Model (URC) TEXT: H TEXT: H _3._3._5. _U_n_i_f_o_r_m _D_i_s_t_r_i_b_u_t_e_d _R_C _M_o_d_e_l (_U_R_C) TEXT: H TEXT: H TEXT: H The URC model is derived from a model proposed by L. TEXT: H Gertzberrg in 1974. The model is accomplished by a subcir- TEXT: H cuit type expansion of the URC line into a network of lumped TEXT: H RC segments with internally generated nodes. The RC seg- TEXT: H ments are in a geometric progression, increasing toward the TEXT: H middle of the URC line, with K as a proportionality con- TEXT: H stant. The number of lumped segments used, if not specified TEXT: H for the URC line device, is determined by the following for- TEXT: H mula: TEXT: H 2 TEXT: H | R C |(K-1)| | TEXT: H _ _ 2 TEXT: H log|F 2 J L |-----| | TEXT: H max TEXT: H | L L | K | | TEXT: H TEXT: H N = ------------------------------ TEXT: H log K TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The URC line is made up strictly of resistor and capa- TEXT: H citor segments unless the ISPERL parameter is given a non- TEXT: H zero value, in which case the capacitors are replaced with TEXT: H reverse biased diodes with a zero-bias junction capacitance TEXT: H equivalent to the capacitance replaced, and with a satura- TEXT: H tion current of ISPERL amps per meter of transmission line TEXT: H and an optional series resistance equivalent to RSPERL ohms TEXT: H per meter. TEXT: H TEXT: H name parameter units default example area TEXT: H TEXT: H 1 K Propagation Constant - 2.0 1.2 - TEXT: H 2 FMAX Maximum Frequency of interest Hz 1.0G 6.5Meg - TEXT: H 3 RPERL Resistance per unit length Z/m 1000 10 - TEXT: H 4 CPERL Capacitance per unit length F/m 1.0e-15 1pF - TEXT: H 5 ISPERL Saturation Current per unit length A/m 0 - - TEXT: H 6 RSPERL Diode Resistance per unit length Z/m 0 - - TEXT: H TEXT: H TEXT: H SUBJECT: TRANSISTORS AND DIODES TITLE: TRANSISTORS AND DIODES TEXT: H TEXT: H _3._4. _T_R_A_N_S_I_S_T_O_R_S _A_N_D _D_I_O_D_E_S TEXT: H TEXT: H TEXT: H The area factor used on the diode, BJT, JFET, and MES- TEXT: H FET devices determines the number of equivalent parallel TEXT: H devices of a specified model. The affected parameters are TEXT: H marked with an asterisk under the heading 'area' in the TEXT: H model descriptions below. Several geometric factors associ- TEXT: H ated with the channel and the drain and source diffusions TEXT: H can be specified on the MOSFET device line. TEXT: H TEXT: H Two different forms of initial conditions may be speci- TEXT: H fied for some devices. The first form is included to TEXT: H improve the dc convergence for circuits that contain more TEXT: H than one stable state. If a device is specified OFF, the dc TEXT: H operating point is determined with the terminal voltages for TEXT: H that device set to zero. After convergence is obtained, the TEXT: H program continues to iterate to obtain the exact value for TEXT: H the terminal voltages. If a circuit has more than one dc TEXT: H stable state, the OFF option can be used to force the solu- TEXT: H tion to correspond to a desired state. If a device is TEXT: H specified OFF when in reality the device is conducting, the TEXT: H program still obtains the correct solution (assuming the TEXT: H solutions converge) but more iterations are required since TEXT: H the program must independently converge to two separate TEXT: H solutions. The .NODESET control line serves a similar pur- TEXT: H pose as the OFF option. The .NODESET option is easier to TEXT: H apply and is the preferred means to aid convergence. TEXT: H TEXT: H The second form of initial conditions are specified for TEXT: H use with the transient analysis. These are true 'initial TEXT: H conditions' as opposed to the convergence aids above. See TEXT: H the description of the .IC control line and the .TRAN con- TEXT: H trol line for a detailed explanation of initial conditions. TEXT: H TEXT: H TEXT: H SUBTOPIC: NGSPICE:Junction Diodes SUBTOPIC: NGSPICE:Diode Model SUBTOPIC: NGSPICE:Bipolar Junction Transistors SUBTOPIC: NGSPICE:BJT Models SUBTOPIC: NGSPICE:Junction FieldEffect Transistors SUBTOPIC: NGSPICE:JFET Models SUBTOPIC: NGSPICE:MOSFETs SUBTOPIC: NGSPICE:MOSFET Models SUBTOPIC: NGSPICE:MESFETs SUBTOPIC: NGSPICE:MESFET Models SUBJECT: Junction Diodes TITLE: Junction Diodes TEXT: H TEXT: H _3._4._1. _J_u_n_c_t_i_o_n _D_i_o_d_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H DXXXXXXX N+ N- MNAME TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H DBRIDGE 2 10 DIODE1 TEXT: H DCLMP 3 7 DMOD 3.0 IC=0.2 TEXT: H TEXT: H TEXT: H TEXT: H N+ and N- are the positive and negative nodes, respec- TEXT: H tively. MNAME is the model name, AREA is the area factor, TEXT: H and OFF indicates an (optional) starting condition on the TEXT: H device for dc analysis. If the area factor is omitted, a TEXT: H value of 1.0 is assumed. The (optional) initial condition TEXT: H specification using IC=VD is intended for use with the UIC TEXT: H option on the .TRAN control line, when a transient analysis TEXT: H is desired starting from other than the quiescent operating TEXT: H point. The (optional) TEMP value is the temperature at TEXT: H which this device is to operate, and overrides the tempera- TEXT: H ture specification on the .OPTION control line. TEXT: H TEXT: H SUBJECT: Diode Model TITLE: Diode Model (D) TEXT: H TEXT: H _3._4._2. _D_i_o_d_e _M_o_d_e_l (_D) TEXT: H TEXT: H TEXT: H The dc characteristics of the diode are determined by TEXT: H the parameters IS and N. An ohmic resistance, RS, is in- TEXT: H cluded. Charge storage effects are modeled by a transit TEXT: H time, TT, and a nonlinear depletion layer capacitance which TEXT: H is determined by the parameters CJO, VJ, and M. The tem- TEXT: H perature dependence of the saturation current is defined by TEXT: H the parameters EG, the energy and XTI, the saturation TEXT: H current temperature exponent. The nominal temperature at TEXT: H which these parameters were measured is TNOM, which defaults TEXT: H to the circuit-wide value specified on the .OPTIONS control TEXT: H line. Reverse breakdown is modeled by an exponential in- TEXT: H crease in the reverse diode current and is determined by the TEXT: H parameters BV and IBV (both of which are positive numbers). TEXT: H TEXT: H TEXT: H TEXT: H name parameter units default example area TEXT: H TEXT: H 1 IS saturation current A 1.0e-14 1.0e-14 * TEXT: H 2 RS ohmic resistance Z 0 10 * TEXT: H 3 N emission coefficient - 1 1.0 TEXT: H 4 TT transit-time sec 0 0.1ns TEXT: H 5 CJO zero-bias junction capacitance F 0 2pF * TEXT: H 6 VJ junction potential V 1 0.6 TEXT: H 7 M grading coefficient - 0.5 0.5 TEXT: H 8 EG activation energy eV 1.11 1.11 Si TEXT: H 0.69 Sbd TEXT: H 0.67 Ge TEXT: H 9 XTI saturation-current temp. exp - 3.0 3.0 jn TEXT: H 2.0 Sbd TEXT: H 10 KF flicker noise coefficient - 0 TEXT: H 11 AF flicker noise exponent - 1 TEXT: H 12 FC coefficient for forward-bias - 0.5 TEXT: H depletion capacitance formula TEXT: H 13 BV reverse breakdown voltage V infinite 40.0 TEXT: H 14 IBV current at breakdown voltage A 1.0e-3 TEXT: H o TEXT: H 15 TNOM parameter measurement temperature C 27 50 TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: Bipolar Junction Transistors TITLE: Bipolar Junction Transistors (BJTs) TEXT: H TEXT: H _3._4._3. _B_i_p_o_l_a_r _J_u_n_c_t_i_o_n _T_r_a_n_s_i_s_t_o_r_s (_B_J_T_s) TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H QXXXXXXX NC NB NE MNAME TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H Q23 10 24 13 QMOD IC=0.6, 5.0 TEXT: H Q50A 11 26 4 20 MOD1 TEXT: H TEXT: H TEXT: H TEXT: H NC, NB, and NE are the collector, base, and emitter TEXT: H nodes, respectively. NS is the (optional) substrate node. TEXT: H If unspecified, ground is used. MNAME is the model name, TEXT: H AREA is the area factor, and OFF indicates an (optional) TEXT: H initial condition on the device for the dc analysis. If the TEXT: H area factor is omitted, a value of 1.0 is assumed. The TEXT: H (optional) initial condition specification using IC=VBE, VCE TEXT: H is intended for use with the UIC option on the .TRAN control TEXT: H line, when a transient analysis is desired starting from TEXT: H other than the quiescent operating point. See the .IC con- TEXT: H trol line description for a better way to set transient ini- TEXT: H tial conditions. The (optional) TEMP value is the tempera- TEXT: H ture at which this device is to operate, and overrides the TEXT: H temperature specification on the .OPTION control line. TEXT: H TEXT: H SUBJECT: BJT Models TITLE: BJT Models (NPN/PNP) TEXT: H TEXT: H _3._4._4. _B_J_T _M_o_d_e_l_s (_N_P_N/_P_N_P) TEXT: H TEXT: H TEXT: H The bipolar junction transistor model in SPICE is an TEXT: H adaptation of the integral charge control model of Gummel TEXT: H and Poon. This modified Gummel-Poon model extends the ori- TEXT: H ginal model to include several effects at high bias levels. TEXT: H The model automatically simplifies to the simpler Ebers-Moll TEXT: H model when certain parameters are not specified. The param- TEXT: H eter names used in the modified Gummel-Poon model have been TEXT: H chosen to be more easily understood by the program user, and TEXT: H to reflect better both physical and circuit design thinking. TEXT: H TEXT: H TEXT: H The dc model is defined by the parameters IS, BF, NF, TEXT: H ISE, IKF, and NE which determine the forward current gain TEXT: H characteristics, IS, BR, NR, ISC, IKR, and NC which deter- TEXT: H mine the reverse current gain characteristics, and VAF and TEXT: H VAR which determine the output conductance for forward and TEXT: H reverse regions. Three ohmic resistances RB, RC, and RE are TEXT: H included, where RB can be high current dependent. Base TEXT: H charge storage is modeled by forward and reverse transit TEXT: H times, TF and TR, the forward transit time TF being bias TEXT: H dependent if desired, and nonlinear depletion layer capaci- TEXT: H tances which are determined by CJE, VJE, and MJE for the B-E TEXT: H junction , CJC, VJC, and MJC for the B-C junction and CJS, TEXT: H VJS, and MJS for the C-S (Collector-Substrate) junction. TEXT: H The temperature dependence of the saturation current, IS, is TEXT: H determined by the energy-gap, EG, and the saturation current TEXT: H temperature exponent, XTI. Additionally base current tem- TEXT: H perature dependence is modeled by the beta temperature TEXT: H exponent XTB in the new model. The values specified are TEXT: H assumed to have been measured at the temperature TNOM, which TEXT: H can be specified on the .OPTIONS control line or overridden TEXT: H by a specification on the .MODEL line. TEXT: H TEXT: H The BJT parameters used in the modified Gummel-Poon TEXT: H model are listed below. The parameter names used in earlier TEXT: H versions of SPICE2 are still accepted. TEXT: H TEXT: H Modified Gummel-Poon BJT Parameters. TEXT: H TEXT: H TEXT: H name parameter units default example area TEXT: H TEXT: H 1 IS transport saturation current A 1.0e-16 1.0e-15 * TEXT: H 2 BF ideal maximum forward beta - 100 100 TEXT: H 3 NF forward current emission coefficient - 1.0 1 TEXT: H 4 VAF forward Early voltage V infinite 200 TEXT: H 5 IKF corner for forward beta TEXT: H high current roll-off A infinite 0.01 * TEXT: H 6 ISE B-E leakage saturation current A 0 1.0e-13 * TEXT: H 7 NE B-E leakage emission coefficient - 1.5 2 TEXT: H 8 BR ideal maximum reverse beta - 1 0.1 TEXT: H 9 NR reverse current emission coefficient - 1 1 TEXT: H 10 VAR reverse Early voltage V infinite 200 TEXT: H 11 IKR corner for reverse beta TEXT: H high current roll-off A infinite 0.01 * TEXT: H 12 ISC B-C leakage saturation current A 0 1.0e-13 * TEXT: H 13 NC B-C leakage emission coefficient - 2 1.5 TEXT: H 14 RB zero bias base resistance Z 0 100 * TEXT: H 15 IRB current where base resistance TEXT: H falls halfway to its min value A infinite 0.1 * TEXT: H 16 RBM minimum base resistance TEXT: H at high currents Z RB 10 * TEXT: H 17 RE emitter resistance Z 0 1 * TEXT: H 18 RC collector resistance Z 0 10 * TEXT: H 19 CJE B-E zero-bias depletion capacitance F 0 2pF * TEXT: H 20 VJE B-E built-in potential V 0.75 0.6 TEXT: H 21 MJE B-E junction exponential factor - 0.33 0.33 TEXT: H 22 TF ideal forward transit time sec 0 0.1ns TEXT: H 23 XTF coefficient for bias dependence of TF - 0 TEXT: H 24 VTF voltage describing VBC TEXT: H dependence of TF V infinite TEXT: H 25 ITF high-current parameter TEXT: H for effect on TF A 0 * TEXT: H 26 PTF excess phase at freq=1.0/(TF*2PI) Hz deg 0 TEXT: H 27 CJC B-C zero-bias depletion capacitance F 0 2pF * TEXT: H 28 VJC B-C built-in potential V 0.75 0.5 TEXT: H 29 MJC B-C junction exponential factor - 0.33 0.5 TEXT: H 30 XCJC fraction of B-C depletion capacitance - 1 TEXT: H connected to internal base node TEXT: H 31 TR ideal reverse transit time sec 0 10ns TEXT: H 32 CJS zero-bias collector-substrate TEXT: H capacitance F 0 2pF * TEXT: H 33 VJS substrate junction built-in potential V 0.75 TEXT: H 34 MJS substrate junction exponential factor - 0 0.5 TEXT: H 35 XTB forward and reverse beta TEXT: H temperature exponent - 0 TEXT: H 36 EG energy gap for temperature TEXT: H effect on IS eV 1.11 TEXT: H 37 XTI temperature exponent for effect on IS - 3 TEXT: H 38 KF flicker-noise coefficient - 0 TEXT: H 39 AF flicker-noise exponent - 1 TEXT: H 40 FC coefficient for forward-bias TEXT: H depletion capacitance formula - 0.5 TEXT: H o TEXT: H 41 TNOM Parameter measurement temperature C 27 50 TEXT: H TEXT: H TEXT: H SUBJECT: Junction FieldEffect Transistors TITLE: Junction Field-Effect Transistors (JFETs) TEXT: H TEXT: H _3._4._5. _J_u_n_c_t_i_o_n _F_i_e_l_d-_E_f_f_e_c_t _T_r_a_n_s_i_s_t_o_r_s (_J_F_E_T_s) TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H JXXXXXXX ND NG NS MNAME TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H J1 7 2 3 JM1 OFF TEXT: H TEXT: H TEXT: H TEXT: H ND, NG, and NS are the drain, gate, and source nodes, TEXT: H respectively. MNAME is the model name, AREA is the area TEXT: H factor, and OFF indicates an (optional) initial condition on TEXT: H the device for dc analysis. If the area factor is omitted, TEXT: H a value of 1.0 is assumed. The (optional) initial condition TEXT: H specification, using IC=VDS, VGS is intended for use with TEXT: H the UIC option on the .TRAN control line, when a transient TEXT: H analysis is desired starting from other than the quiescent TEXT: H operating point. See the .IC control line for a better way TEXT: H to set initial conditions. The (optional) TEMP value is the TEXT: H temperature at which this device is to operate, and over- TEXT: H rides the temperature specification on the .OPTION control TEXT: H line. TEXT: H TEXT: H SUBJECT: JFET Models TITLE: JFET Models (NJF/PJF) TEXT: H TEXT: H _3._4._6. _J_F_E_T _M_o_d_e_l_s (_N_J_F/_P_J_F) TEXT: H TEXT: H TEXT: H The JFET model is derived from the FET model of Shich- TEXT: H man and Hodges. The dc characteristics are defined by the TEXT: H parameters VTO and BETA, which determine the variation of TEXT: H drain current with gate voltage, LAMBDA, which determines TEXT: H the output conductance, and IS, the saturation current of TEXT: H the two gate junctions. Two ohmic resistances, RD and RS, TEXT: H are included. Charge storage is modeled by nonlinear deple- TEXT: H tion layer capacitances for both gate junctions which vary TEXT: H as the -1/2 power of junction voltage and are defined by the TEXT: H parameters CGS, CGD, and PB. TEXT: H TEXT: H Note that in Spice3f and later, a fitting parameter B TEXT: H has been added. For details, see [9]. TEXT: H TEXT: H TEXT: H name parameter units default example area TEXT: H TEXT: H 1 VTO threshold voltage (V V -2.0 -2.0 TEXT: H TO 2 TEXT: H 2 BETA transconductance parameter (B) A/V 1.0e-4 1.0e-3 * TEXT: H 3 LAMBDA channel-length modulation TEXT: H parameter (L) 1/V 0 1.0e-4 TEXT: H 4 RD drain ohmic resistance Z 0 100 * TEXT: H 5 RS source ohmic resistance Z 0 100 * TEXT: H 6 CGS zero-bias G-S junction capacitance (C ) F 0 5pF * TEXT: H gs TEXT: H 7 CGD zero-bias G-D junction capacitance (C ) F 0 1pF * TEXT: H gs TEXT: H 8 PB gate junction potential V 1 0.6 TEXT: H 9 IS gate junction saturation current (I ) A 1.0e-14 1.0e-14 * TEXT: H S TEXT: H 10 B doping tail parameter - 1 1.1 TEXT: H 11 KF flicker noise coefficient - 0 TEXT: H 12 AF flicker noise exponent - 1 TEXT: H 13 FC coefficient for forward-bias - 0.5 TEXT: H depletion capacitance formula TEXT: H o TEXT: H 14 TNOM parameter measurement temperature C 27 50 TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: MOSFETs TITLE: MOSFETs TEXT: H TEXT: H _3._4._7. _M_O_S_F_E_T_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H MXXXXXXX ND NG NS NB MNAME TEXT: H + TEXT: H + TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H M1 24 2 0 20 TYPE1 TEXT: H M31 2 17 6 10 MODM L=5U W=2U TEXT: H M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U TEXT: H TEXT: H TEXT: H ND, NG, NS, and NB are the drain, gate, source, and bulk TEXT: H (substrate) nodes, respectively. MNAME is the model name. TEXT: H L and W are the channel length and width, in meters. AD and TEXT: H AS are the areas of the drain and source diffusions, in TEXT: H 2 TEXT: H meters . Note that the suffix U specifies microns (1e-6 m) TEXT: H 2 TEXT: H and P sq-microns (1e-12 m ). If any of L, W, AD, or AS are TEXT: H not specified, default values are used. The use of defaults TEXT: H simplifies input file preparation, as well as the editing TEXT: H required if device geometries are to be changed. PD and PS TEXT: H are the perimeters of the drain and source junctions, in TEXT: H meters. NRD and NRS designate the equivalent number of TEXT: H squares of the drain and source diffusions; these values TEXT: H multiply the sheet resistance RSH specified on the .MODEL TEXT: H control line for an accurate representation of the parasitic TEXT: H series drain and source resistance of each transistor. PD TEXT: H and PS default to 0.0 while NRD and NRS to 1.0. OFF indi- TEXT: H cates an (optional) initial condition on the device for dc TEXT: H analysis. The (optional) initial condition specification TEXT: H using IC=VDS, VGS, VBS is intended for use with the UIC TEXT: H option on the .TRAN control line, when a transient analysis TEXT: H is desired starting from other than the quiescent operating TEXT: H point. See the .IC control line for a better and more con- TEXT: H venient way to specify transient initial conditions. The TEXT: H (optional) TEMP value is the temperature at which this dev- TEXT: H ice is to operate, and overrides the temperature specifica- TEXT: H tion on the .OPTION control line. The temperature specifi- TEXT: H cation is ONLY valid for level 1, 2, 3, and 6 MOSFETs, not TEXT: H for level 4 or 5 (BSIM) devices. TEXT: H TEXT: H SUBJECT: MOSFET Models TITLE: MOSFET Models (NMOS/PMOS) TEXT: H TEXT: H _3._4._8. _M_O_S_F_E_T _M_o_d_e_l_s (_N_M_O_S/_P_M_O_S) TEXT: H TEXT: H TEXT: H SPICE provides four MOSFET device models, which differ TEXT: H in the formulation of the I-V characteristic. The variable TEXT: H LEVEL specifies the model to be used: TEXT: H TEXT: H LEVEL=1 -> Shichman-Hodges TEXT: H LEVEL=2 -> MOS2 (as described in [1]) TEXT: H LEVEL=3 -> MOS3, a semi-empirical model(see [1]) TEXT: H LEVEL=4 -> BSIM (as described in [3]) TEXT: H LEVEL=5 -> new BSIM (BSIM2; as described in [5]) TEXT: H LEVEL=6 -> MOS6 (as described in [2]) TEXT: H TEXT: H TEXT: H The dc characteristics of the level 1 through level 3 MOS- TEXT: H FETs are defined by the device parameters VTO, KP, LAMBDA, TEXT: H PHI and GAMMA. These parameters are computed by SPICE if TEXT: H process parameters (NSUB, TOX, ...) are given, but user- TEXT: H specified values always override. VTO is positive (nega- TEXT: H tive) for enhancement mode and negative (positive) for TEXT: H depletion mode N-channel (P-channel) devices. Charge TEXT: H storage is modeled by three constant capacitors, CGSO, CGDO, TEXT: H and CGBO which represent overlap capacitances, by the non- TEXT: H linear thin-oxide capacitance which is distributed among the TEXT: H gate, source, drain, and bulk regions, and by the nonlinear TEXT: H depletion-layer capacitances for both substrate junctions TEXT: H divided into bottom and periphery, which vary as the MJ and TEXT: H MJSW power of junction voltage respectively, and are deter- TEXT: H mined by the parameters CBD, CBS, CJ, CJSW, MJ, MJSW and PB. TEXT: H Charge storage effects are modeled by the piecewise linear TEXT: H voltages-dependent capacitance model proposed by Meyer. The TEXT: H thin-oxide charge-storage effects are treated slightly dif- TEXT: H ferent for the LEVEL=1 model. These voltage-dependent capa- TEXT: H citances are included only if TOX is specified in the input TEXT: H description and they are represented using Meyer's formula- TEXT: H tion. TEXT: H TEXT: H There is some overlap among the parameters describing TEXT: H the junctions, e.g. the reverse current can be input either TEXT: H 2 TEXT: H as IS (in A) or as JS (in A/m ). Whereas the first is an TEXT: H absolute value the second is multiplied by AD and AS to give TEXT: H the reverse current of the drain and source junctions TEXT: H respectively. This methodology has been chosen since there TEXT: H is no sense in relating always junction characteristics with TEXT: H AD and AS entered on the device line; the areas can be TEXT: H defaulted. The same idea applies also to the zero-bias TEXT: H junction capacitances CBD and CBS (in F) on one hand, and CJ TEXT: H 2 TEXT: H (in F/m ) on the other. The parasitic drain and source TEXT: H series resistance can be expressed as either RD and RS (in TEXT: H ohms) or RSH (in ohms/sq.), the latter being multiplied by TEXT: H the number of squares NRD and NRS input on the device line. TEXT: H TEXT: H A discontinuity in the MOS level 3 model with respect TEXT: H to the KAPPA parameter has been detected (see [10]). The TEXT: H supplied fix has been implemented in Spice3f2 and later. TEXT: H Since this fix may affect parameter fitting, the option TEXT: H "BADMOS3" may be set to use the old implementation (see the TEXT: H section on simulation variables and the ".OPTIONS" line). TEXT: H SPICE level 1, 2, 3 and 6 parameters: TEXT: H TEXT: H TEXT: H name parameter units default example TEXT: H TEXT: H 1 LEVEL model index - 1 TEXT: H 2 VTO zero-bias threshold voltage (V ) V 0.0 1.0 TEXT: H TO 2 TEXT: H 3 KP transconductance parameter A/V 2.0e-5 3.1e-5 TEXT: H 1/2 TEXT: H 4 GAMMA bulk threshold parameter (\) V 0.0 0.37 TEXT: H 5 PHI surface potential (U) V 0.6 0.65 TEXT: H 6 LAMBDA channel-length modulation TEXT: H (MOS1 and MOS2 only) (L) 1/V 0.0 0.02 TEXT: H 7 RD drain ohmic resistance Z 0.0 1.0 TEXT: H 8 RS source ohmic resistance Z 0.0 1.0 TEXT: H 9 CBD zero-bias B-D junction capacitance F 0.0 20fF TEXT: H 10 CBS zero-bias B-S junction capacitance F 0.0 20fF TEXT: H 11 IS bulk junction saturation current (I ) A 1.0e-14 1.0e-15 TEXT: H S TEXT: H 12 PB bulk junction potential V 0.8 0.87 TEXT: H 13 CGSO gate-source overlap capacitance TEXT: H per meter channel width F/m 0.0 4.0e-11 TEXT: H 14 CGDO gate-drain overlap capacitance TEXT: H per meter channel width F/m 0.0 4.0e-11 TEXT: H 15 CGBO gate-bulk overlap capacitance TEXT: H per meter channel length F/m 0.0 2.0e-10 TEXT: H 16 RSH drain and source diffusion TEXT: H sheet resistance Z/[] 0.0 10.0 TEXT: H 17 CJ zero-bias bulk junction bottom cap. TEXT: H 2 TEXT: H per sq-meter of junction area F/m 0.0 2.0e-4 TEXT: H 18 MJ bulk junction bottom grading coeff. - 0.5 0.5 TEXT: H 19 CJSW zero-bias bulk junction sidewall cap. TEXT: H per meter of junction perimeter F/m 0.0 1.0e-9 TEXT: H 20 MJSW bulk junction sidewall grading coeff. - 0.50(level1) TEXT: H 0.33(level2, 3) TEXT: H 21 JS bulk junction saturation current TEXT: H 2 TEXT: H per sq-meter of junction area A/m 1.0e-8 TEXT: H 22 TOX oxide thickness meter 1.0e-7 1.0e-7 TEXT: H 3 TEXT: H 23 NSUB substrate doping 1/cm 0.0 4.0e15 TEXT: H 2 TEXT: H 24 NSS surface state density 1/cm 0.0 1.0e10 TEXT: H 2 TEXT: H 25 NFS fast surface state density 1/cm 0.0 1.0e10 TEXT: H TEXT: H _c_o_n_t_i_n_u_e_d TEXT: H TEXT: H name parameter units default example TEXT: H TEXT: H 26 TPG type of gate material: - 1.0 TEXT: H +1 opp. to substrate TEXT: H -1 same as substrate TEXT: H 0 Al gate TEXT: H 27 XJ metallurgical junction depth meter 0.0 1M TEXT: H 28 LD lateral diffusion meter 0.0 0.8M TEXT: H 2 TEXT: H 29 UO surface mobility cm /Vs 600 700 TEXT: H 30 UCRIT critical field for mobility TEXT: H degradation (MOS2 only) V/cm 1.0e4 1.0e4 TEXT: H 31 UEXP critical field exponent in TEXT: H mobility degradation (MOS2 only) - 0.0 0.1 TEXT: H 32 UTRA transverse field coeff. (mobility) TEXT: H (deleted for MOS2) - 0.0 0.3 TEXT: H 33 VMAX maximum drift velocity of carriers m/s 0.0 5.0e4 TEXT: H 34 NEFF total channel-charge (fixed and TEXT: H mobile) coefficient (MOS2 only) - 1.0 5.0 TEXT: H 35 KF flicker noise coefficient - 0.0 1.0e-26 TEXT: H 36 AF flicker noise exponent - 1.0 1.2 TEXT: H 37 FC coefficient for forward-bias TEXT: H depletion capacitance formula - 0.5 TEXT: H 38 DELTA width effect on threshold voltage TEXT: H (MOS2 and MOS3) - 0.0 1.0 TEXT: H 39 THETA mobility modulation (MOS3 only) 1/V 0.0 0.1 TEXT: H 40 ETA static feedback (MOS3 only) - 0.0 1.0 TEXT: H 41 KAPPA saturation field factor (MOS3 only) - 0.2 0.5 TEXT: H o TEXT: H 42 TNOM parameter measurement temperature C 27 50 TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The level 4 and level 5 (BSIM1 and BSIM2) parameters TEXT: H are all values obtained from process characterization, and TEXT: H can be generated automatically. J. Pierret [4] describes a TEXT: H means of generating a 'process' file, and the program TEXT: H Proc2Mod provided with SPICE3 converts this file into a se- TEXT: H quence of BSIM1 ".MODEL" lines suitable for inclusion in a TEXT: H SPICE input file. Parameters marked below with an * in the TEXT: H l/w column also have corresponding parameters with a length TEXT: H and width dependency. For example, VFB is the basic parame- TEXT: H ter with units of Volts, and LVFB and WVFB also exist and TEXT: H have units of Volt-Mmeter The formula TEXT: H TEXT: H P P TEXT: H L W TEXT: H P = P + ---------- + ---------- TEXT: H 0 TEXT: H L W TEXT: H effective effective TEXT: H TEXT: H is used to evaluate the parameter for the actual device TEXT: H specified with TEXT: H TEXT: H L = L - DL TEXT: H effective input TEXT: H and TEXT: H TEXT: H W = W - DW TEXT: H effective input TEXT: H TEXT: H TEXT: H TEXT: H Note that unlike the other models in SPICE, the BSIM TEXT: H model is designed for use with a process characterization TEXT: H system that provides all the parameters, thus there are no TEXT: H defaults for the parameters, and leaving one out is con- TEXT: H sidered an error. For an example set of parameters and the TEXT: H format of a process file, see the SPICE2 implementation TEXT: H notes[3]. TEXT: H TEXT: H For more information on BSIM2, see reference [5]. TEXT: H TEXT: H SPICE BSIM (level 4) parameters. TEXT: H TEXT: H TEXT: H name parameter units l/w TEXT: H TEXT: H VFB flat-band voltage V * TEXT: H PHI surface inversion potential V * TEXT: H 1/2 TEXT: H K1 body effect coefficient V * TEXT: H K2 drain/source depletion charge-sharing coefficient - * TEXT: H ETA zero-bias drain-induced barrier-lowering coefficient - * TEXT: H 2 TEXT: H MUZ zero-bias mobility cm /V-s TEXT: H DL shortening of channel Mm TEXT: H DW narrowing of channel Mm TEXT: H -1 TEXT: H U0 zero-bias transverse-field mobility degradation coefficient V * TEXT: H U1 zero-bias velocity saturation coefficient Mm/V * TEXT: H 2 2 TEXT: H X2MZ sens. of mobility to substrate bias at v =0 cm /V -s * TEXT: H ds -1 TEXT: H X2E sens. of drain-induced barrier lowering effect to substrate bias V * TEXT: H -1 TEXT: H X3E sens. of drain-induced barrier lowering effect to drain bias at V =V V * TEXT: H ds dd -2 TEXT: H X2U0 sens. of transverse field mobility degradation effect to substrate bias V * TEXT: H -2 TEXT: H X2U1 sens. of velocity saturation effect to substrate bias MmV * TEXT: H 2 2 TEXT: H MUS mobility at zero substrate bias and at V =V cm /V -s TEXT: H ds dd 2 2 TEXT: H X2MS sens. of mobility to substrate bias at V =V cm /V -s * TEXT: H ds dd 2 2 TEXT: H X3MS sens. of mobility to drain bias at V =V cm /V -s * TEXT: H ds dd -2 TEXT: H X3U1 sens. of velocity saturation effect on drain bias at V =V MmV * TEXT: H ds dd TEXT: H TOX gate oxide thickness Mm TEXT: H o TEXT: H TEMP temperature at which parameters were measured C TEXT: H VDD measurement bias range V TEXT: H CGDO gate-drain overlap capacitance per meter channel width F/m TEXT: H CGSO gate-source overlap capacitance per meter channel width F/m TEXT: H CGBO gate-bulk overlap capacitance per meter channel length F/m TEXT: H XPART gate-oxide capacitance-charge model flag - TEXT: H N0 zero-bias subthreshold slope coefficient - * TEXT: H NB sens. of subthreshold slope to substrate bias - * TEXT: H ND sens. of subthreshold slope to drain bias - * TEXT: H RSH drain and source diffusion sheet resistance Z/[] TEXT: H 2 TEXT: H JS source drain junction current density A/m TEXT: H PB built in potential of source drain junction V TEXT: H MJ Grading coefficient of source drain junction - TEXT: H PBSW built in potential of source, drain junction sidewall V TEXT: H MJSW grading coefficient of source drain junction sidewall - TEXT: H 2 TEXT: H CJ Source drain junction capacitance per unit area F/m TEXT: H CJSW source drain junction sidewall capacitance per unit length F/m TEXT: H WDF source drain junction default width m TEXT: H DELL Source drain junction length reduction m TEXT: H TEXT: H TEXT: H TEXT: H XPART = 0 selects a 40/60 drain/source charge partition TEXT: H in saturation, while XPART=1 selects a 0/100 drain/source TEXT: H charge partition. TEXT: H TEXT: H TEXT: H ND, NG, and NS are the drain, gate, and source nodes, TEXT: H respectively. MNAME is the model name, AREA is the area TEXT: H factor, and OFF indicates an (optional) initial condition on TEXT: H the device for dc analysis. If the area factor is omitted, TEXT: H a value of 1.0 is assumed. The (optional) initial condition TEXT: H specification, using IC=VDS, VGS is intended for use with TEXT: H the UIC option on the .TRAN control line, when a transient TEXT: H analysis is desired starting from other than the quiescent TEXT: H operating point. See the .IC control line for a better way TEXT: H to set initial conditions. TEXT: H TEXT: H SUBJECT: MESFETs TITLE: MESFETs TEXT: H TEXT: H _3._4._9. _M_E_S_F_E_T_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H ZXXXXXXX ND NG NS MNAME TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H Z1 7 2 3 ZM1 OFF TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: MESFET Models TITLE: MESFET Models (NMF/PMF) TEXT: H TEXT: H _3._4._1_0. _M_E_S_F_E_T _M_o_d_e_l_s (_N_M_F/_P_M_F) TEXT: H TEXT: H TEXT: H The MESFET model is derived from the GaAs FET model of TEXT: H Statz et al. as described in [11]. The dc characteristics TEXT: H are defined by the parameters VTO, B, and BETA, which deter- TEXT: H mine the variation of drain current with gate voltage, AL- TEXT: H PHA, which determines saturation voltage, and LAMBDA, which TEXT: H determines the output conductance. The formula are given TEXT: H by: TEXT: H TEXT: H 3 TEXT: H 2 TEXT: H B (V -V ) | | V | | 3 TEXT: H gs T ds _ TEXT: H I = --------------- |1 - |1-A---| |(1 + L V ) for 0 < V < TEXT: H d ds ds TEXT: H 1 + b(V - V ) | | 3 | | A TEXT: H gs T TEXT: H 2 TEXT: H B (V -V ) 3 TEXT: H gs T _ TEXT: H I = ---------------(1 + L V ) for V > TEXT: H d ds ds TEXT: H 1 + b(V - V ) A TEXT: H gs T TEXT: H TEXT: H TEXT: H Two ohmic resistances, RD and RS, are included. Charge TEXT: H storage is modeled by total gate charge as a function of TEXT: H gate-drain and gate-source voltages and is defined by the TEXT: H parameters CGS, CGD, and PB. TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H name parameter units default example area TEXT: H TEXT: H 1 VTO pinch-off voltage V -2.0 -2.0 TEXT: H 2 TEXT: H 2 BETA transconductance parameter A/V 1.0e-4 1.0e-3 * TEXT: H 3 B doping tail extending parameter 1/V 0.3 0.3 * TEXT: H 4 ALPHA saturation voltage parameter 1/V 2 2 * TEXT: H 5 LAMBDA channel-length modulation TEXT: H parameter 1/V 0 1.0e-4 TEXT: H 6 RD drain ohmic resistance Z 0 100 * TEXT: H 7 RS source ohmic resistance Z 0 100 * TEXT: H 8 CGS zero-bias G-S junction capacitance F 0 5pF * TEXT: H 9 CGD zero-bias G-D junction capacitance F 0 1pF * TEXT: H 10 PB gate junction potential V 1 0.6 TEXT: H 11 KF flicker noise coefficient - 0 TEXT: H 12 AF flicker noise exponent - 1 TEXT: H 13 FC coefficient for forward-bias - 0.5 TEXT: H depletion capacitance formula TEXT: H TEXT: H SUBJECT: ANALYSES AND OUTPUT CONTROL TITLE: ANALYSES AND OUTPUT CONTROL TEXT: H TEXT: H _4. _A_N_A_L_Y_S_E_S _A_N_D _O_U_T_P_U_T _C_O_N_T_R_O_L TEXT: H TEXT: H TEXT: H The following command lines are for specifying analyses TEXT: H or plots within the circuit description file. Parallel com- TEXT: H mands exist in the interactive command interpreter (detailed TEXT: H in the following section). Specifying analyses and plots TEXT: H (or tables) in the input file is useful for batch runs. TEXT: H Batch mode is entered when either the -b option is given or TEXT: H when the default input source is redirected from a file. In TEXT: H batch mode, the analyses specified by the control lines in TEXT: H the input file (e.g. ".ac", ".tran", etc.) are immediately TEXT: H executed (unless ".control" lines exists; see the section on TEXT: H the interactive command interpretor). If the -r _r_a_w_f_i_l_e TEXT: H option is given then all data generated is written to a TEXT: H Spice3 rawfile. The rawfile may be read by either the TEXT: H interactive mode of Spice3 or by nutmeg; see the previous TEXT: H section for details. In this case, the .SAVE line (see TEXT: H below) may be used to record the value of internal device TEXT: H variables (see Appendix B). TEXT: H TEXT: H If a rawfile is not specified, then output plots (in TEXT: H "line-printer" form) and tables can be printed according to TEXT: H the .PRINT, .PLOT, and .FOUR control lines, described next. TEXT: H .PLOT, .PRINT, and .FOUR lines are meant for compatibility TEXT: H with Spice2. TEXT: H SUBTOPIC: NGSPICE:SIMULATOR VARIABLES SUBTOPIC: NGSPICE:INITIAL CONDITIONS SUBTOPIC: NGSPICE:ANALYSES SUBTOPIC: NGSPICE:BATCH OUTPUT SUBJECT: SIMULATOR VARIABLES TITLE: SIMULATOR VARIABLES (.OPTIONS) TEXT: H TEXT: H _4._1. _S_I_M_U_L_A_T_O_R _V_A_R_I_A_B_L_E_S (._O_P_T_I_O_N_S) TEXT: H TEXT: H TEXT: H Various parameters of the simulations available in TEXT: H Spice3 can be altered to control the accuracy, speed, or TEXT: H default values for some devices. These parameters may be TEXT: H changed via the "set" command (described later in the sec- TEXT: H tion on the interactive front-end) or via the ".OPTIONS" TEXT: H line: TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...) TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .OPTIONS RELTOL=.005 TRTOL=8 TEXT: H TEXT: H TEXT: H The options line allows the user to reset program con- TEXT: H trol and user options for specific simulation purposes. TEXT: H Additional options for Nutmeg may be specified as well and TEXT: H take effect when Nutmeg reads the input file. Options TEXT: H specified to Nutmeg via the 'set' command are also passed on TEXT: H to SPICE3 as if specified on a .OPTIONS line. See the fol- TEXT: H lowing section on the interactive command interpreter for TEXT: H the parameters which may be set with a .OPTIONS line and the TEXT: H format of the 'set' command. Any combination of the follow- TEXT: H ing options may be included, in any order. 'x' (below) TEXT: H represents some positive number. TEXT: H TEXT: H option effect TEXT: H TEXT: H ABSTOL=x resets the absolute current error tolerance of the TEXT: H program. TEXT: H The default value is 1 picoamp. TEXT: H BADMOS3 Use the older version of the MOS3 model with the "kappa" TEXT: H discontinuity. TEXT: H CHGTOL=x resets the charge tolerance of the program. The default TEXT: H value is 1.0e-14. TEXT: H DEFAD=x resets the value for MOS drain diffusion area; the TEXT: H default is 0.0. TEXT: H DEFAS=x resets the value for MOS source diffusion area; the TEXT: H default is 0.0. TEXT: H DEFL=x resets the value for MOS channel length; the default TEXT: H is 100.0 micrometer. TEXT: H DEFW=x resets the value for MOS channel width; the default TEXT: H is 100.0 micrometer. TEXT: H GMIN=x resets the value of GMIN, the minimum conductance TEXT: H allowed by the program. TEXT: H The default value is 1.0e-12. TEXT: H ITL1=x resets the dc iteration limit. The default is 100. TEXT: H ITL2=x resets the dc transfer curve iteration limit. The TEXT: H default is 50. TEXT: H ITL3=x resets the lower transient analysis iteration limit. TEXT: H the default value is 4. (Note: not implemented in Spice3). TEXT: H ITL4=x resets the transient analysis timepoint iteration limit. TEXT: H the default is 10. TEXT: H ITL5=x resets the transient analysis total iteration limit. TEXT: H the default is 5000. Set ITL5=0 to omit this test. TEXT: H (Note: not implemented in Spice3). TEXT: H KEEPOPINFO Retain the operating point information when either an TEXT: H AC, Distortion, or Pole-Zero analysis is run. TEXT: H This is particularly useful if the circuit is large TEXT: H and you do not want to run a (redundant) ".OP" analysis. TEXT: H METHOD=name sets the numerical integration method used by SPICE. TEXT: H Possible names are "Gear" or "trapezoidal" (or just "trap"). TEXT: H The default is trapezoidal. TEXT: H PIVREL=x resets the relative ratio between the largest column entry TEXT: H and an acceptable pivot value. The default value is 1.0e-3. TEXT: H In the numerical pivoting algorithm the allowed minimum TEXT: H pivot value is determined by TEXT: H EPSREL=AMAX1(PIVREL*MAXVAL, PIVTOL) TEXT: H where MAXVAL is the maximum element in the column where TEXT: H a pivot is sought (partial pivoting). TEXT: H PIVTOL=x resets the absolute minimum value for a matrix entry TEXT: H to be accepted as a pivot. The default value is 1.0e-13. TEXT: H RELTOL=x resets the relative error tolerance of the program. TEXT: H The TEXT: H default value is 0.001 (0.1%). TEXT: H TEMP=x Resets the operating temperature of the circuit. The TEXT: H default value is 27 deg C (300 deg K). TEMP can be overridden TEXT: H by a temperature specification on any temperature dependent TEXT: H instance. TEXT: H TNOM=x resets the nominal temperature at which device parameters TEXT: H are measured. The default value is 27 deg C (300 deg K). TEXT: H TNOM can be overridden by a specification on any temperature TEXT: H dependent device model. TEXT: H TRTOL=x resets the transient error tolerance. The default value TEXT: H is 7.0. This parameter is an estimate of the factor by TEXT: H which SPICE overestimates the actual truncation error. TEXT: H TRYTOCOMPACT Applicable only to the LTRA model. TEXT: H When specified, the simulator tries to condense LTRA transmission TEXT: H lines' past history of input voltages and currents. TEXT: H VNTOL=x resets the absolute voltage error tolerance of the TEXT: H program. The default value is 1 microvolt. TEXT: H TEXT: H TEXT: H In addition, the following options have the listed TEXT: H effect when operating in spice2 emulation mode: TEXT: H TEXT: H option effect TEXT: H TEXT: H option effect TEXT: H ACCT causes accounting and run time statistics to be printed TEXT: H LIST causes the summary listing of the input data to be printed TEXT: H NOMOD suppresses the printout of the model parameters TEXT: H NOPAGE suppresses page ejects TEXT: H NODE causes the printing of the node table. TEXT: H OPTS causes the option values to be printed. TEXT: H TEXT: H SUBJECT: INITIAL CONDITIONS TITLE: INITIAL CONDITIONS TEXT: H TEXT: H _4._2. _I_N_I_T_I_A_L _C_O_N_D_I_T_I_O_N_S TEXT: H SUBTOPIC: NGSPICE:.NODESET SUBTOPIC: NGSPICE:.IC SUBJECT: .NODESET TITLE: .NODESET: Specify Initial Node Voltage Guesses TEXT: H TEXT: H _4._2._1. ._N_O_D_E_S_E_T: _S_p_e_c_i_f_y _I_n_i_t_i_a_l _N_o_d_e _V_o_l_t_a_g_e _G_u_e_s_s_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .NODESET V(NODNUM)=VAL V(NODNUM)=VAL ... TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .NODESET V(12)=4.5 V(4)=2.23 TEXT: H TEXT: H TEXT: H TEXT: H The Nodeset line helps the program find the dc or ini- TEXT: H tial transient solution by making a preliminary pass with TEXT: H the specified nodes held to the given voltages. The res- TEXT: H triction is then released and the iteration continues to the TEXT: H true solution. The .NODESET line may be necessary for con- TEXT: H vergence on bistable or a-stable circuits. In general, this TEXT: H line should not be necessary. TEXT: H TEXT: H SUBJECT: .IC TITLE: .IC: Set Initial Conditions TEXT: H TEXT: H _4._2._2. ._I_C: _S_e_t _I_n_i_t_i_a_l _C_o_n_d_i_t_i_o_n_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .IC V(NODNUM)=VAL V(NODNUM)=VAL ... TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .IC V(11)=5 V(4)=-5 V(2)=2.2 TEXT: H TEXT: H TEXT: H TEXT: H The IC line is for setting transient initial condi- TEXT: H tions. It has two different interpretations, depending on TEXT: H whether the UIC parameter is specified on the .TRAN control TEXT: H line. Also, one should not confuse this line with the TEXT: H .NODESET line. The .NODESET line is only to help dc conver- TEXT: H gence, and does not affect final bias solution (except for TEXT: H multi-stable circuits). The two interpretations of this TEXT: H line are as follows: TEXT: H TEXT: H 1. When the UIC parameter is specified on the .TRAN line, TEXT: H then the node voltages specified on the .IC control line are TEXT: H used to compute the capacitor, diode, BJT, JFET, and MOSFET TEXT: H initial conditions. This is equivalent to specifying the TEXT: H IC=... parameter on each device line, but is much more con- TEXT: H venient. The IC=... parameter can still be specified and TEXT: H takes precedence over the .IC values. Since no dc bias TEXT: H (initial transient) solution is computed before the tran- TEXT: H sient analysis, one should take care to specify all dc TEXT: H source voltages on the .IC control line if they are to be TEXT: H used to compute device initial conditions. TEXT: H TEXT: H 2. When the UIC parameter is not specified on the .TRAN TEXT: H control line, the dc bias (initial transient) solution is TEXT: H computed before the transient analysis. In this case, the TEXT: H node voltages specified on the .IC control line is forced to TEXT: H the desired initial values during the bias solution. During TEXT: H transient analysis, the constraint on these node voltages is TEXT: H removed. This is the preferred method since it allows SPICE TEXT: H to compute a consistent dc solution. TEXT: H SUBJECT: ANALYSES TITLE: ANALYSES TEXT: H TEXT: H _4._3. _A_N_A_L_Y_S_E_S TEXT: H TEXT: H SUBTOPIC: NGSPICE:.AC SUBTOPIC: NGSPICE:.DC SUBTOPIC: NGSPICE:.DISTO SUBTOPIC: NGSPICE:.NOISE SUBTOPIC: NGSPICE:.OP SUBTOPIC: NGSPICE:.PZ SUBTOPIC: NGSPICE:.SENS SUBTOPIC: NGSPICE:.TF SUBTOPIC: NGSPICE:.TRAN SUBJECT: .AC TITLE: .AC: Small-Signal AC Analysis TEXT: H TEXT: H _4._3._1. ._A_C: _S_m_a_l_l-_S_i_g_n_a_l _A_C _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .AC DEC ND FSTART FSTOP TEXT: H .AC OCT NO FSTART FSTOP TEXT: H .AC LIN NP FSTART FSTOP TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .AC DEC 10 1 10K TEXT: H .AC DEC 10 1K 100MEG TEXT: H .AC LIN 100 1 100HZ TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H DEC stands for decade variation, and ND is the number TEXT: H of points per decade. OCT stands for octave variation, and TEXT: H NO is the number of points per octave. LIN stands for TEXT: H linear variation, and NP is the number of points. FSTART is TEXT: H the starting frequency, and FSTOP is the final frequency. TEXT: H If this line is included in the input file, SPICE performs TEXT: H an AC analysis of the circuit over the specified frequency TEXT: H range. Note that in order for this analysis to be meaning- TEXT: H ful, at least one independent source must have been speci- TEXT: H fied with an ac value. TEXT: H TEXT: H SUBJECT: .DC TITLE: .DC: DC Transfer Function TEXT: H TEXT: H _4._3._2. ._D_C: _D_C _T_r_a_n_s_f_e_r _F_u_n_c_t_i_o_n TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2] TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .DC VIN 0.25 5.0 0.25 TEXT: H .DC VDS 0 10 .5 VGS 0 5 1 TEXT: H .DC VCE 0 10 .25 IB 0 10U 1U TEXT: H TEXT: H TEXT: H TEXT: H The DC line defines the dc transfer curve source and TEXT: H sweep limits (again with capacitors open and inductors TEXT: H shorted). SRCNAM is the name of an independent voltage or TEXT: H current source. VSTART, VSTOP, and VINCR are the starting, TEXT: H final, and incrementing values respectively. The first TEXT: H example causes the value of the voltage source VIN to be TEXT: H swept from 0.25 Volts to 5.0 Volts in increments of 0.25 TEXT: H Volts. A second source (SRC2) may optionally be specified TEXT: H with associated sweep parameters. In this case, the first TEXT: H source is swept over its range for each value of the second TEXT: H source. This option can be useful for obtaining semiconduc- TEXT: H tor device output characteristics. See the second example TEXT: H circuit description in Appendix A. TEXT: H TEXT: H SUBJECT: .DISTO TITLE: .DISTO: Distortion Analysis TEXT: H TEXT: H _4._3._3. ._D_I_S_T_O: _D_i_s_t_o_r_t_i_o_n _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .DISTO DEC ND FSTART FSTOP TEXT: H .DISTO OCT NO FSTART FSTOP TEXT: H .DISTO LIN NP FSTART FSTOP TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .DISTO DEC 10 1kHz 100MHz TEXT: H .DISTO DEC 10 1kHz 100MHz 0.9 TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The Disto line does a small-signal distortion analysis TEXT: H of the circuit. A multi-dimensional Volterra series TEXT: H analysis is done using multi-dimensional Taylor series to TEXT: H represent the nonlinearities at the operating point. Terms TEXT: H of up to third order are used in the series expansions. TEXT: H TEXT: H If the optional parameter F2OVERF1 is not specified, TEXT: H .DISTO does a harmonic analysis - i.e., it analyses distor- TEXT: H tion in the circuit using only a single input frequency F1, TEXT: H which is swept as specified by arguments of the .DISTO com- TEXT: H mand exactly as in the .AC command. Inputs at this fre- TEXT: H quency may be present at more than one input source, and TEXT: H their magnitudes and phases are specified by the arguments TEXT: H of the DISTOF1 keyword in the input file lines for the input TEXT: H sources (see the description for independent sources). (The TEXT: H arguments of the DISTOF2 keyword are not relevant in this TEXT: H case). The analysis produces information about the A.C. TEXT: H values of all node voltages and branch currents at the har- TEXT: H monic frequencies 2F1 and 3F1, vs. the input frequency F1 as TEXT: H it is swept. (A value of 1 (as a complex distortion output) TEXT: H signifies cos(2J(2F1)t) at 2F1 and cos(2J(3F1)t) at 3F1, TEXT: H using the convention that 1 at the input fundamental fre- TEXT: H quency is equivalent to cos(2JF1t).) The distortion com- TEXT: H ponent desired (2F1 or 3F1) can be selected using commands TEXT: H in nutmeg, and then printed or plotted. (Normally, one is TEXT: H interested primarily in the magnitude of the harmonic com- TEXT: H ponents, so the magnitude of the AC distortion value is TEXT: H looked at). It should be noted that these are the A.C. TEXT: H values of the actual harmonic components, and are not equal TEXT: H to HD2 and HD3. To obtain HD2 and HD3, one must divide by TEXT: H the corresponding A.C. values at F1, obtained from an .AC TEXT: H line. This division can be done using nutmeg commands. TEXT: H TEXT: H If the optional F2OVERF1 parameter is specified, it TEXT: H should be a real number between (and not equal to) 0.0 and TEXT: H 1.0; in this case, .DISTO does a spectral analysis. It con- TEXT: H siders the circuit with sinusoidal inputs at two different TEXT: H frequencies F1 and F2. F1 is swept according to the .DISTO TEXT: H control line options exactly as in the .AC control line. F2 TEXT: H is kept fixed at a single frequency as F1 sweeps - the value TEXT: H at which it is kept fixed is equal to F2OVERF1 times FSTART. TEXT: H Each independent source in the circuit may potentially have TEXT: H two (superimposed) sinusoidal inputs for distortion, at the TEXT: H frequencies F1 and F2. The magnitude and phase of the F1 TEXT: H component are specified by the arguments of the DISTOF1 key- TEXT: H word in the source's input line (see the description of TEXT: H independent sources); the magnitude and phase of the F2 com- TEXT: H ponent are specified by the arguments of the DISTOF2 key- TEXT: H word. The analysis produces plots of all node TEXT: H voltages/branch currents at the intermodulation product fre- TEXT: H quencies F1 + F2, F1 - F2, and (2 F1) - F2, vs the swept TEXT: H frequency F1. The IM product of interest may be selected TEXT: H using the setplot command, and displayed with the print and TEXT: H plot commands. It is to be noted as in the harmonic TEXT: H analysis case, the results are the actual AC voltages and TEXT: H currents at the intermodulation frequencies, and need to be TEXT: H normalized with respect to .AC values to obtain the IM TEXT: H parameters. TEXT: H TEXT: H If the DISTOF1 or DISTOF2 keywords are missing from the TEXT: H description of an independent source, then that source is TEXT: H assumed to have no input at the corresponding frequency. TEXT: H The default values of the magnitude and phase are 1.0 and TEXT: H 0.0 respectively. The phase should be specified in degrees. TEXT: H TEXT: H It should be carefully noted that the number F2OVERF1 TEXT: H should ideally be an irrational number, and that since this TEXT: H is not possible in practice, efforts should be made to keep TEXT: H the denominator in its fractional representation as large as TEXT: H possible, certainly above 3, for accurate results (i.e., if TEXT: H F2OVERF1 is represented as a fraction A/B, where A and B are TEXT: H integers with no common factors, B should be as large as TEXT: H possible; note that A < B because F2OVERF1 is constrained to TEXT: H be < 1). To illustrate why, consider the cases where TEXT: H F2OVERF1 is 49/100 and 1/2. In a spectral analysis, the TEXT: H outputs produced are at F1 + F2, F1 - F2 and 2 F1 - F2. In TEXT: H the latter case, F1 - F2 = F2, so the result at the F1-F2 TEXT: H component is erroneous because there is the strong fundamen- TEXT: H tal F2 component at the same frequency. Also, F1 + F2 = 2 TEXT: H F1 - F2 in the latter case, and each result is erroneous TEXT: H individually. This problem is not there in the case where TEXT: H F2OVERF1 = 49/100, because F1-F2 = 51/100 F1 < > 49/100 F1 = TEXT: H F2. In this case, there are two very closely spaced fre- TEXT: H quency components at F2 and F1 - F2. One of the advantages TEXT: H of the Volterra series technique is that it computes distor- TEXT: H tions at mix frequencies expressed symbolically (i.e. n F1 + TEXT: H m F2), therefore one is able to obtain the strengths of dis- TEXT: H tortion components accurately even if the separation between TEXT: H them is very small, as opposed to transient analysis for TEXT: H example. The disadvantage is of course that if two of the TEXT: H mix frequencies coincide, the results are not merged TEXT: H together and presented (though this could presumably be done TEXT: H as a postprocessing step). Currently, the interested user TEXT: H should keep track of the mix frequencies himself or herself TEXT: H and add the distortions at coinciding mix frequencies TEXT: H together should it be necessary. TEXT: H TEXT: H SUBJECT: .NOISE TITLE: .NOISE: Noise Analysis TEXT: H TEXT: H _4._3._4. ._N_O_I_S_E: _N_o_i_s_e _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .NOISE V(OUTPUT <,REF>) SRC ( DEC | LIN | OCT ) PTS FSTART FSTOP TEXT: H + TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .NOISE V(5) VIN DEC 10 1kHz 100MHz TEXT: H .NOISE V(5,3) V1 OCT 8 1.0 1.0e6 1 TEXT: H TEXT: H TEXT: H TEXT: H The Noise line does a noise analysis of the circuit. TEXT: H OUTPUT is the node at which the total output noise is TEXT: H desired; if REF is specified, then the noise voltage TEXT: H V(OUTPUT) - V(REF) is calculated. By default, REF is TEXT: H assumed to be ground. SRC is the name of an independent TEXT: H source to which input noise is referred. PTS, FSTART and TEXT: H FSTOP are .AC type parameters that specify the frequency TEXT: H range over which plots are desired. PTS_PER_SUMMARY is an TEXT: H optional integer; if specified, the noise contributions of TEXT: H each noise generator is produced every PTS_PER_SUMMARY fre- TEXT: H quency points. TEXT: H TEXT: H The .NOISE control line produces two plots - one for TEXT: H the Noise Spectral Density curves and one for the total TEXT: H Integrated Noise over the specified frequency range. All TEXT: H 2 TEXT: H noise voltages/currents are in squared units (V /Hz and TEXT: H 2 2 2 TEXT: H A /Hz for spectral density, V and A for integrated noise). TEXT: H SUBJECT: .OP TITLE: .OP: Operating Point Analysis TEXT: H TEXT: H _4._3._5. ._O_P: _O_p_e_r_a_t_i_n_g _P_o_i_n_t _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .OP TEXT: H TEXT: H TEXT: H TEXT: H The inclusion of this line in an input file directs TEXT: H SPICE to determine the dc operating point of the circuit TEXT: H with inductors shorted and capacitors opened. Note: a DC TEXT: H analysis is automatically performed prior to a transient TEXT: H analysis to determine the transient initial conditions, and TEXT: H prior to an AC small-signal, Noise, and Pole-Zero analysis TEXT: H to determine the linearized, small-signal models for non- TEXT: H linear devices (see the KEEPOPINFO variable above). TEXT: H TEXT: H SUBJECT: .PZ TITLE: .PZ: Pole-Zero Analysis TEXT: H TEXT: H _4._3._6. ._P_Z: _P_o_l_e-_Z_e_r_o _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 CUR POL TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 CUR ZER TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 CUR PZ TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 VOL POL TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 VOL ZER TEXT: H .PZ NODE1 NODE2 NODE3 NODE4 VOL PZ TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .PZ 1 0 3 0 CUR POL TEXT: H .PZ 2 3 5 0 VOL ZER TEXT: H .PZ 4 1 4 1 CUR PZ TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H CUR stands for a transfer function of the type (output TEXT: H voltage)/(input current) while VOL stands for a transfer TEXT: H function of the type (output voltage)/(input voltage). POL TEXT: H stands for pole analysis only, ZER for zero analysis only TEXT: H and PZ for both. This feature is provided mainly because if TEXT: H there is a nonconvergence in finding poles or zeros, then, TEXT: H at least the other can be found. Finally, NODE1 and NODE2 TEXT: H are the two input nodes and NODE3 and NODE4 are the two out- TEXT: H put nodes. Thus, there is complete freedom regarding the TEXT: H output and input ports and the type of transfer function. TEXT: H TEXT: H In interactive mode, the command syntax is the same TEXT: H except that the first field is PZ instead of .PZ. To print TEXT: H the results, one should use the command 'print all'. TEXT: H TEXT: H SUBJECT: .SENS TITLE: .SENS: DC or Small-Signal AC Sensitivity Analysis TEXT: H TEXT: H _4._3._7. ._S_E_N_S: _D_C _o_r _S_m_a_l_l-_S_i_g_n_a_l _A_C _S_e_n_s_i_t_i_v_i_t_y _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .SENS OUTVAR TEXT: H .SENS OUTVAR AC DEC ND FSTART FSTOP TEXT: H .SENS OUTVAR AC OCT NO FSTART FSTOP TEXT: H .SENS OUTVAR AC LIN NP FSTART FSTOP TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .SENS V(1,OUT) TEXT: H .SENS V(OUT) AC DEC 10 100 100k TEXT: H .SENS I(VTEST) TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H The sensitivity of OUTVAR to all non-zero device param- TEXT: H eters is calculated when the SENS analysis is specified. TEXT: H OUTVAR is a circuit variable (node voltage or voltage-source TEXT: H branch current). The first form calculates sensitivity of TEXT: H the DC operating-point value of OUTVAR. The second form TEXT: H calculates sensitivity of the AC values of OUTVAR. The TEXT: H parameters listed for AC sensitivity are the same as in an TEXT: H AC analysis (see ".AC" above). The output values are in TEXT: H dimensions of change in output per unit change of input (as TEXT: H opposed to percent change in output or per percent change of TEXT: H input). TEXT: H TEXT: H SUBJECT: .TF TITLE: .TF: Transfer Function Analysis TEXT: H TEXT: H _4._3._8. ._T_F: _T_r_a_n_s_f_e_r _F_u_n_c_t_i_o_n _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .TF OUTVAR INSRC TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .TF V(5, 3) VIN TEXT: H .TF I(VLOAD) VIN TEXT: H TEXT: H TEXT: H TEXT: H The TF line defines the small-signal output and input TEXT: H for the dc small-signal analysis. OUTVAR is the small- TEXT: H signal output variable and INSRC is the small-signal input TEXT: H source. If this line is included, SPICE computes the dc TEXT: H small-signal value of the transfer function (output/input), TEXT: H input resistance, and output resistance. For the first TEXT: H example, SPICE would compute the ratio of V(5, 3) to VIN, TEXT: H the small-signal input resistance at VIN, and the small- TEXT: H signal output resistance measured across nodes 5 and 3. TEXT: H TEXT: H SUBJECT: .TRAN TITLE: .TRAN: Transient Analysis TEXT: H TEXT: H _4._3._9. ._T_R_A_N: _T_r_a_n_s_i_e_n_t _A_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .TRAN TSTEP TSTOP > TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .TRAN 1NS 100NS TEXT: H .TRAN 1NS 1000NS 500NS TEXT: H .TRAN 10NS 1US TEXT: H TEXT: H TEXT: H TEXT: H TSTEP is the printing or plotting increment for line- TEXT: H printer output. For use with the post-processor, TSTEP is TEXT: H the suggested computing increment. TSTOP is the final time, TEXT: H and TSTART is the initial time. If TSTART is omitted, it is TEXT: H assumed to be zero. The transient analysis always begins at TEXT: H time zero. In the interval , the circuit is TEXT: H analyzed (to reach a steady state), but no outputs are TEXT: H stored. In the interval , the circuit is TEXT: H analyzed and outputs are stored. TMAX is the maximum step- TEXT: H size that SPICE uses; for default, the program chooses TEXT: H either TSTEP or (TSTOP-TSTART)/50.0, whichever is smaller. TEXT: H TMAX is useful when one wishes to guarantee a computing TEXT: H interval which is smaller than the printer increment, TSTEP. TEXT: H TEXT: H UIC (use initial conditions) is an optional keyword TEXT: H which indicates that the user does not want SPICE to solve TEXT: H for the quiescent operating point before beginning the tran- TEXT: H sient analysis. If this keyword is specified, SPICE uses TEXT: H the values specified using IC=... on the various elements as TEXT: H the initial transient condition and proceeds with the TEXT: H analysis. If the .IC control line has been specified, then TEXT: H the node voltages on the .IC line are used to compute the TEXT: H initial conditions for the devices. Look at the description TEXT: H on the .IC control line for its interpretation when UIC is TEXT: H not specified. TEXT: H SUBJECT: BATCH OUTPUT TITLE: BATCH OUTPUT TEXT: H TEXT: H _4._4. _B_A_T_C_H _O_U_T_P_U_T TEXT: H TEXT: H SUBTOPIC: NGSPICE:.SAVE Lines SUBTOPIC: NGSPICE:.PRINT Lines SUBTOPIC: NGSPICE:.PLOT Lines SUBTOPIC: NGSPICE:.FOUR SUBJECT: .SAVE Lines TITLE: .SAVE Lines TEXT: H TEXT: H _4._4._1. ._S_A_V_E _L_i_n_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .SAVE _v_e_c_t_o_r _v_e_c_t_o_r _v_e_c_t_o_r ... TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .SAVE i(vin) input output TEXT: H .SAVE @m1[id] TEXT: H TEXT: H TEXT: H TEXT: H The vectors listed on the .SAVE line are recorded in TEXT: H the rawfile for use later with spice3 or nutmeg (nutmeg is TEXT: H just the data-analysis half of spice3, without the ability TEXT: H to simulate). The standard vector names are accepted. If TEXT: H no .SAVE line is given, then the default set of vectors are TEXT: H saved (node voltages and voltage source branch currents). TEXT: H If .SAVE lines are given, only those vectors specified are TEXT: H saved. For more discussion on internal device data, see TEXT: H Appendix B. See also the section on the interactive command TEXT: H interpretor for information on how to use the rawfile. TEXT: H SUBJECT: .PRINT Lines TITLE: .PRINT Lines TEXT: H TEXT: H _4._4._2. ._P_R_I_N_T _L_i_n_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .PRINT PRTYPE OV1 TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .PRINT TRAN V(4) I(VIN) TEXT: H .PRINT DC V(2) I(VSRC) V(23, 17) TEXT: H .PRINT AC VM(4, 2) VR(7) VP(8, 3) TEXT: H TEXT: H TEXT: H The Print line defines the contents of a tabular list- TEXT: H ing of one to eight output variables. PRTYPE is the type of TEXT: H the analysis (DC, AC, TRAN, NOISE, or DISTO) for which the TEXT: H specified outputs are desired. The form for voltage or TEXT: H current output variables is the same as given in the previ- TEXT: H ous section for the print command; Spice2 restricts the out- TEXT: H put variable to the following forms (though this restriction TEXT: H is not enforced by Spice3): TEXT: H TEXT: H TEXT: H V(N1<,N2>) TEXT: H specifies the voltage difference between nodes N1 TEXT: H and N2. If N2 (and the preceding comma) is omit- TEXT: H ted, ground (0) is assumed. See the print command TEXT: H in the previous section for more details. For TEXT: H compatibility with spice2, the following five TEXT: H additional values can be accessed for the ac TEXT: H analysis by replacing the "V" in V(N1,N2) with: TEXT: H TEXT: H TEXT: H VR - real part TEXT: H VI - imaginary part TEXT: H VM - magnitude TEXT: H VP - phase TEXT: H VDB - 20 log10(magnitude) TEXT: H TEXT: H TEXT: H TEXT: H I(VXXXXXXX) TEXT: H specifies the current flowing in the independent TEXT: H voltage source named VXXXXXXX. Positive current TEXT: H flows from the positive node, through the source, TEXT: H to the negative node. For the ac analysis, the TEXT: H corresponding replacements for the letter I may be TEXT: H made in the same way as described for voltage out- TEXT: H puts. TEXT: H TEXT: H TEXT: H Output variables for the noise and distortion analyses TEXT: H have a different general form from that of the other ana- TEXT: H lyses. TEXT: H TEXT: H There is no limit on the number of .PRINT lines for TEXT: H each type of analysis. TEXT: H TEXT: H SUBJECT: .PLOT Lines TITLE: .PLOT Lines TEXT: H TEXT: H _4._4._3. ._P_L_O_T _L_i_n_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .PLOT PLTYPE OV1 <(PLO1, PHI1)> ... OV8> TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .PLOT DC V(4) V(5) V(1) TEXT: H .PLOT TRAN V(17, 5) (2, 5) I(VIN) V(17) (1, 9) TEXT: H .PLOT AC VM(5) VM(31, 24) VDB(5) VP(5) TEXT: H .PLOT DISTO HD2 HD3(R) SIM2 TEXT: H .PLOT TRAN V(5, 3) V(4) (0, 5) V(7) (0, 10) TEXT: H TEXT: H TEXT: H The Plot line defines the contents of one plot of TEXT: H from one to eight output variables. PLTYPE is the type TEXT: H of analysis (DC, AC, TRAN, NOISE, or DISTO) for which TEXT: H the specified outputs are desired. The syntax for the TEXT: H OVI is identical to that for the .PRINT line and for the TEXT: H plot command in the interactive mode. TEXT: H TEXT: H TEXT: H The overlap of two or more traces on any plot is indi- TEXT: H cated by the letter X. TEXT: H TEXT: H When more than one output variable appears on the same TEXT: H plot, the first variable specified is printed as well as TEXT: H plotted. If a printout of all variables is desired, then a TEXT: H companion .PRINT line should be included. TEXT: H TEXT: H There is no limit on the number of .PLOT lines speci- TEXT: H fied for each type of analysis. TEXT: H TEXT: H SUBJECT: .FOUR TITLE: .FOUR: Fourier Analysis of Transient Analysis Output TEXT: H TEXT: H _4._4._4. ._F_O_U_R: _F_o_u_r_i_e_r _A_n_a_l_y_s_i_s _o_f _T_r_a_n_s_i_e_n_t _A_n_a_l_y_s_i_s _O_u_t- TEXT: H _p_u_t TEXT: H TEXT: H _G_e_n_e_r_a_l _f_o_r_m: TEXT: H TEXT: H .FOUR FREQ OV1 TEXT: H TEXT: H TEXT: H _E_x_a_m_p_l_e_s: TEXT: H TEXT: H .FOUR 100K V(5) TEXT: H TEXT: H TEXT: H The Four (or Fourier) line controls whether SPICE TEXT: H performs a Fourier analysis as a part of the transient TEXT: H analysis. FREQ is the fundamental frequency, and OV1, TEXT: H desired. The Fourier analysis is performed over the in- TEXT: H terval , where TSTOP is the final TEXT: H time specified for the transient analysis, and period is TEXT: H one period of the fundamental frequency. The dc com- TEXT: H ponent and the first nine harmonics are determined. For TEXT: H maximum accuracy, TMAX (see the .TRAN line) should be TEXT: H set to period/100.0 (or less for very high-Q circuits). TEXT: H SUBJECT: INTERACTIVE INTERPRETER TITLE: INTERACTIVE INTERPRETER TEXT: H TEXT: H _5. _I_N_T_E_R_A_C_T_I_V_E _I_N_T_E_R_P_R_E_T_E_R TEXT: H TEXT: H Spice3 consists of a simulator and a front-end for data TEXT: H analysis and plotting. The front-end may be run as a TEXT: H separate "stand-alone" program under the name Nutmeg. TEXT: H TEXT: H _N_u_t_m_e_g will read in the "raw" data output file created TEXT: H by spice -r or with the write command in an interactive TEXT: H Spice3 session. Nutmeg or interactive Spice3 can plot data TEXT: H from a simulation on a graphics terminal or a workstation TEXT: H display. Most of the commands available in the interactive TEXT: H Spice3 front end are available in nutmeg; where this is not TEXT: H the case, Spice-only commands have been marked with an TEXT: H asterisk ("*"). Note that the raw output file is different TEXT: H from the data that Spice2 writes to the standard output, TEXT: H which may also be produced by spice3 with the "-b" command TEXT: H line option. TEXT: H TEXT: H Spice and Nutmeg use the X Window System for plotting TEXT: H if they find the environment variable DISPLAY. Otherwise, a TEXT: H graphics-terminal independent interface (MFB) is used. If TEXT: H you are using X on a workstation, the DISPLAY variable TEXT: H should already be set; if you want to display graphics on a TEXT: H system different from the one you are running Spice3 or Nut- TEXT: H meg on, DISPLAY should be of the form "_m_a_c_h_i_n_e:0.0". See TEXT: H the appropriate documentation on the X Window Sytem for more TEXT: H details. TEXT: H TEXT: H TEXT: H _C_o_m_m_a_n_d _S_y_n_o_p_s_i_s TEXT: H TEXT: H spice [ -n ] [ -t term ] [ -r rawfile] [ -b ] [ -i ] [ input file ... ] TEXT: H TEXT: H nutmeg [ - ] [ -n ] [ -t term ] [ datafile ... ] TEXT: H TEXT: H TEXT: H TEXT: H TEXT: H Options are: TEXT: H TEXT: H - Don't try to load the default data file TEXT: H ("rawspice.raw") if no other files are given. Nutmeg TEXT: H only. TEXT: H TEXT: H -n (or -N) TEXT: H Don't try to source the file ".spiceinit" upon startup. TEXT: H Normally spice and nutmeg try to find the file in the TEXT: H current directory, and if it is not found then in the TEXT: H user's home directory. TEXT: H TEXT: H -t term (or -T term) TEXT: H The program is being run on a terminal with _m_f_b name TEXT: H term. TEXT: H TEXT: H -b (or -B) TEXT: H Run in batch mode. Spice3 reads the default input TEXT: H source (e.g. keyboard) or reads the given input file TEXT: H and performs the analyses specified; output is either TEXT: H Spice2-like line-printer plots ("ascii plots") or a TEXT: H spice rawfile. See the following section for details. TEXT: H Note that if the input source is not a terminal (e.g. TEXT: H using the IO redirection notation of "<") Spice3 de- TEXT: H faults to batch mode (-i overrides). This option is TEXT: H valid for Spice3 only. TEXT: H TEXT: H TEXT: H TEXT: H -s (or -S) TEXT: H Run in server mode. This is like batch mode, except TEXT: H that a temporary rawfile is used and then written to TEXT: H the standard output, preceded by a line with a single TEXT: H "@", after the simulation is done. This mode is used TEXT: H by the spice daemon. This option is valid for Spice3 TEXT: H only. TEXT: H TEXT: H TEXT: H TEXT: H -i (or -I) TEXT: H Run in interactive mode. This is useful if the stan- TEXT: H dard input is not a terminal but interactive mode is TEXT: H desired. Command completion is not available unless TEXT: H the standard input is a terminal, however. This option TEXT: H is valid for Spice3 only. TEXT: H TEXT: H TEXT: H TEXT: H -r _r_a_w_f_i_l_e (or -P _r_a_w_f_i_l_e) TEXT: H Use _r_a_w_f_i_l_e as the default file into which the results TEXT: H of the simulation are saved. This option is valid for TEXT: H Spice3 only. TEXT: H TEXT: H TEXT: H Further arguments to spice are taken to be Spice3 input TEXT: H files, which are read and saved (if running in batch mode TEXT: H then they are run immediately). Spice3 accepts most Spice2 TEXT: H input file, and output ascii plots, fourier analyses, and TEXT: H node printouts as specified in .plot, .four, and .print TEXT: H cards. If an out parameter is given on a .width card, the TEXT: H effect is the same as set width = .... Since Spice3 ascii TEXT: H plots do not use multiple ranges, however, if vectors TEXT: H together on a .plot card have different ranges they are not TEXT: H provide as much information as they would in Spice2. The TEXT: H output of Spice3 is also much less verbose than Spice2, in TEXT: H that the only data printed is that requested by the above TEXT: H cards. TEXT: H TEXT: H For nutmeg, further arguments are taken to be data TEXT: H files in binary or ascii format (see sconvert(1)) which are TEXT: H loaded into nutmeg. If the file is in binary format, it may TEXT: H be only partially completed (useful for examining Spice2 TEXT: H output before the simulation is finished). One file may TEXT: H contain any number of data sets from different analyses. SUBTOPIC: NGSPICE:EXPRESSIONS FUNCTIONS AND CONSTANTS SUBTOPIC: NGSPICE:COMMAND INTERPRETATION SUBTOPIC: NGSPICE:COMMANDS SUBTOPIC: NGSPICE:CONTROL STRUCTURES SUBTOPIC: NGSPICE:VARIABLES SUBTOPIC: NGSPICE:MISCELLANEOUS SUBTOPIC: NGSPICE:BUGS SUBJECT: EXPRESSIONS FUNCTIONS AND CONSTANTS TITLE: EXPRESSIONS, FUNCTIONS, AND CONSTANTS TEXT: H TEXT: H _5._1. _E_X_P_R_E_S_S_I_O_N_S, _F_U_N_C_T_I_O_N_S, _A_N_D _C_O_N_S_T_A_N_T_S TEXT: H TEXT: H Spice and Nutmeg data is in the form of vectors: time, TEXT: H voltage, etc. Each vector has a type, and vectors can be TEXT: H operated on and combined algebraicly in ways consistent with TEXT: H their types. Vectors are normally created when a data file TEXT: H is read in (see the _l_o_a_d command below), and when the ini- TEXT: H tial datafile is loaded. They can also be created with the TEXT: H _l_e_t command. TEXT: H TEXT: H TEXT: H An expression is an algebraic formula involving vectors TEXT: H and scalars (a scalar is a vector of length 1) and the fol- TEXT: H lowing operations: TEXT: H TEXT: H + - * / ^ % TEXT: H TEXT: H TEXT: H % is the modulo operator, and the comma operator has two TEXT: H meanings: if it is present in the argument list of a user- TEXT: H definable function, it serves to separate the arguments. TEXT: H Otherwise, the term x , y is synonymous with x + j(y). TEXT: H TEXT: H TEXT: H TEXT: H Also available are the logical operations & (and), | TEXT: H (or), ! (not), and the relational operations <, >, >=, <=, TEXT: H =, and <> (not equal). If used in an algebraic expression TEXT: H they work like they would in C, producing values of 0 or 1. TEXT: H The relational operators have the following synonyms: TEXT: H TEXT: H TEXT: H gt > TEXT: H lt < TEXT: H ge >= TEXT: H le <= TEXT: H ne <> TEXT: H eq = TEXT: H and & TEXT: H or | TEXT: H not ! TEXT: H TEXT: H TEXT: H These are useful when < and > might be confused with IO TEXT: H redirection (which is almost always). TEXT: H TEXT: H TEXT: H TEXT: H The following functions are available: TEXT: H TEXT: H mag(vector) The magnitude of vector TEXT: H ph(vector) The phase of vector TEXT: H j(vector) _i (sqrt(-1)) times vector TEXT: H real(vector) The real component of vector TEXT: H imag(vector) The imaginary part of vector TEXT: H db(vector) 20 log10(mag(vector)) TEXT: H log(vector) The logarithm (base 10) of vector TEXT: H ln(vector) The natural logarithm (base e) of vector TEXT: H exp(vector) e to the vector power TEXT: H abs(vector) The absolute value of vector. TEXT: H sqrt(vector) The square root of vector. TEXT: H sin(vector) The sine of vector. TEXT: H cos(vector) The cosine of vector. TEXT: H tan(vector) The tangent of vector. TEXT: H atan(vector) The inverse tangent of vector. TEXT: H norm(vector) The vector normalized to 1 (i.e, the TEXT: H largest magnitude of any component is TEXT: H 1). TEXT: H rnd(vector) A vector with each component a random TEXT: H integer between 0 and the absolute value TEXT: H of the vectors's corresponding com- TEXT: H ponent. TEXT: H mean(vector) The result is a scalar (a length 1 vec- TEXT: H tor) that is the mean of the elements of TEXT: H vector. TEXT: H vector(number) The result is a vector of length number, TEXT: H with elements 0, 1, ... number - 1. If TEXT: H number is a vector then just the first TEXT: H element is taken, and if it isn't an in- TEXT: H teger then the floor of the magnitude is TEXT: H used. TEXT: H length(vector) The length of vector. TEXT: H interpolate(plot.vector) The result of interpolating the named TEXT: H vector onto the scale of the current TEXT: H plot. This function uses the variable TEXT: H polydegree to determine the degree of TEXT: H interpolation. TEXT: H deriv(vector) Calculates the derivative of the given TEXT: H vector. This uses numeric differentia- TEXT: H tion by interpolating a polynomial and TEXT: H may not produce satisfactory results TEXT: H (particularly with iterated differentia- TEXT: H tion). The implementation only cacu- TEXT: H lates the dirivative with respect to the TEXT: H real componant of that vector's scale. TEXT: H TEXT: H TEXT: H A vector may be either the name of a vector already TEXT: H defined or a floating-point number (a scalar). A number may TEXT: H be written in any format acceptable to SPICE, such as TEXT: H 14.6Meg or -1.231e-4. Note that you can either use scien- TEXT: H tific notation or one of the abbreviations like _M_E_G or _G, TEXT: H but not both. As with SPICE, a number may have trailing TEXT: H alphabetic characters after it. TEXT: H TEXT: H The notation expr [num] denotes the num'th element of TEXT: H expr. For multi-dimensional vectors, a vector of one less TEXT: H dimension is returned. Also for multi-dimensional vectors, TEXT: H the notation expr[m][n] will return the _nth element of the TEXT: H mth subvector. To get a subrange of a vector, use the form TEXT: H expr[lower, upper]. TEXT: H TEXT: H To reference vectors in a plot that is not the _c_u_r_r_e_n_t TEXT: H _p_l_o_t (see the setplot command, below), the notation TEXT: H plotname.vecname can be used. TEXT: H TEXT: H TEXT: H Either a plotname or a vector name may be the wildcard TEXT: H all. If the plotname is all, matching vectors from all TEXT: H plots are specified, and if the vector name is all, all vec- TEXT: H tors in the specified plots are referenced. Note that you TEXT: H may not use binary operations on expressions involving wild- TEXT: H cards - it is not obvious what all + all should denote, for TEXT: H instance. Thus some (contrived) examples of expressions TEXT: H are: TEXT: H TEXT: H cos(TIME) + db(v(3)) TEXT: H sin(cos(log([1 2 3 4 5 6 7 8 9 10]))) TEXT: H TIME * rnd(v(9)) - 15 * cos(vin#branch) ^ [7.9e5 8] TEXT: H not ((ac3.FREQ[32] & tran1.TIME[10]) gt 3) TEXT: H TEXT: H TEXT: H TEXT: H Vector names in spice may have a name such as TEXT: H @name[param], where name is either the name of a device TEXT: H instance or model. This denotes the value of the param TEXT: H parameter of the device or model. See Appendix B for TEXT: H details of what parameters are available. The value is a TEXT: H vector of length 1. This function is also available with TEXT: H the show command, and is available with variables for con- TEXT: H venience for command scripts. TEXT: H TEXT: H TEXT: H There are a number of pre-defined constants in nutmeg. TEXT: H They are: TEXT: H TEXT: H pi J (3.14159...) TEXT: H e The base of natural logarithms (2.71828...) TEXT: H c The speed of light (299,792,500 m/sec) TEXT: H i The square root of -1 TEXT: H o TEXT: H kelvin Absolute 0 in Centigrade (-273.15 C) TEXT: H echarge The charge on an electron (1.6021918e-19 C) TEXT: H boltz Boltzman's constant (1.3806226e-23) TEXT: H planck Planck's constant (h = 6.626200e-34) TEXT: H TEXT: H TEXT: H These are all in MKS units. If you have another vari- TEXT: H able with a name that conflicts with one of these then it TEXT: H takes precedence. TEXT: H SUBJECT: COMMAND INTERPRETATION TITLE: COMMAND INTERPRETATION TEXT: H TEXT: H _5._2. _C_O_M_M_A_N_D _I_N_T_E_R_P_R_E_T_A_T_I_O_N TEXT: H TEXT: H If a word is typed as a command, and there is no TEXT: H built-in command with that name, the directories in the TEXT: H _s_o_u_r_c_e_p_a_t_h list are searched in order for the file. If it TEXT: H is found, it is read in as a command file (as if it were TEXT: H sourced). Before it is read, however, the variables _a_r_g_c TEXT: H and _a_r_g_v are set to the number of words following the TEXT: H filename on the command line, and a list of those words TEXT: H respectively. After the file is finished, these variables TEXT: H are unset. Note that if a command file calls another, it TEXT: H must save its _a_r_g_v and _a_r_g_c since they are altered. Also, TEXT: H command files may not be re-entrant since there are no local TEXT: H variables. (Of course, the procedures may explicitly mani- TEXT: H pulate a stack...) This way one can write scripts analogous TEXT: H to shell scripts for nutmeg and Spice3. TEXT: H TEXT: H Note that for the script to work with Spice3, it must TEXT: H begin with a blank line (or whatever else, since it is TEXT: H thrown away) and then a line with .control on it. This is TEXT: H an unfortunate result of the source command being used for TEXT: H both circuit input and command file execution. Note also TEXT: H that this allows the user to merely type the name of a cir- TEXT: H cuit file as a command and it is automatically run. The TEXT: H commands are executed immediately, without running any ana- TEXT: H lyses that may be spicified in the circuit (to execute the TEXT: H analyses before the script executes, include a "run" command TEXT: H in the script). TEXT: H TEXT: H There are various command scripts installed in TEXT: H /_u_s_r/_l_o_c_a_l/_l_i_b/_s_p_i_c_e/_s_c_r_i_p_t_s (or whatever the path is on TEXT: H your machine), and the default _s_o_u_r_c_e_p_a_t_h includes this TEXT: H directory, so you can use these command files (almost) like TEXT: H builtin commands. SUBJECT: COMMANDS TITLE: COMMANDS TEXT: H TEXT: H _5._3. _C_O_M_M_A_N_D_S TEXT: H TEXT: H SUBTOPIC: NGSPICE:Ac SUBTOPIC: NGSPICE:Alias SUBTOPIC: NGSPICE:Alter SUBTOPIC: NGSPICE:Asciiplot SUBTOPIC: NGSPICE:Aspice SUBTOPIC: NGSPICE:Bug SUBTOPIC: NGSPICE:Cd SUBTOPIC: NGSPICE:Destroy SUBTOPIC: NGSPICE:Dc SUBTOPIC: NGSPICE:Define SUBTOPIC: NGSPICE:Delete SUBTOPIC: NGSPICE:Diff SUBTOPIC: NGSPICE:Display SUBTOPIC: NGSPICE:Echo SUBTOPIC: NGSPICE:Edit SUBTOPIC: NGSPICE:Fourier SUBTOPIC: NGSPICE:Hardcopy SUBTOPIC: NGSPICE:Help SUBTOPIC: NGSPICE:History SUBTOPIC: NGSPICE:Iplot SUBTOPIC: NGSPICE:Jobs SUBTOPIC: NGSPICE:Let SUBTOPIC: NGSPICE:Linearize SUBTOPIC: NGSPICE:Listing SUBTOPIC: NGSPICE:Load SUBTOPIC: NGSPICE:Op SUBTOPIC: NGSPICE:Plot SUBTOPIC: NGSPICE:Print SUBTOPIC: NGSPICE:Quit SUBTOPIC: NGSPICE:Rehash SUBTOPIC: NGSPICE:Reset SUBTOPIC: NGSPICE:Reshape SUBTOPIC: NGSPICE:Resume SUBTOPIC: NGSPICE:Rspice SUBTOPIC: NGSPICE:Run SUBTOPIC: NGSPICE:Rusage SUBTOPIC: NGSPICE:Save SUBTOPIC: NGSPICE:Sens SUBTOPIC: NGSPICE:Set SUBTOPIC: NGSPICE:Setcirc SUBTOPIC: NGSPICE:Setplot SUBTOPIC: NGSPICE:Settype SUBTOPIC: NGSPICE:Shell SUBTOPIC: NGSPICE:Shift SUBTOPIC: NGSPICE:Show SUBTOPIC: NGSPICE:Showmod SUBTOPIC: NGSPICE:Source SUBTOPIC: NGSPICE:Status SUBTOPIC: NGSPICE:Step SUBTOPIC: NGSPICE:Stop SUBTOPIC: NGSPICE:Tf SUBTOPIC: NGSPICE:Trace SUBTOPIC: NGSPICE:Tran SUBTOPIC: NGSPICE:Transpose SUBTOPIC: NGSPICE:Unalias SUBTOPIC: NGSPICE:Undefine SUBTOPIC: NGSPICE:Unset SUBTOPIC: NGSPICE:Version SUBTOPIC: NGSPICE:Where SUBTOPIC: NGSPICE:Write SUBTOPIC: NGSPICE:Xgraph SUBJECT: Ac TITLE: Ac*: Perform an AC, small-signal frequency response analysis TEXT: H TEXT: H _5._3._1. _A_c*: _P_e_r_f_o_r_m _a_n _A_C, _s_m_a_l_l-_s_i_g_n_a_l _f_r_e_q_u_e_n_c_y _r_e_s_p_o_n_s_e TEXT: H _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H ac ( DEC | OCT | LIN ) _N _F_s_t_a_r_t _F_s_t_o_p TEXT: H TEXT: H TEXT: H Do an ac analysis. See the previous sections of TEXT: H this manual for more details. TEXT: H TEXT: H SUBJECT: Alias TITLE: Alias: Create an alias for a command TEXT: H TEXT: H _5._3._2. _A_l_i_a_s: _C_r_e_a_t_e _a_n _a_l_i_a_s _f_o_r _a _c_o_m_m_a_n_d TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H alias [word] [text ...] TEXT: H TEXT: H TEXT: H Causes word to be aliased to text. History substi- TEXT: H tutions may be used, as in C-shell aliases. TEXT: H TEXT: H SUBJECT: Alter TITLE: Alter*: Change a device or model parameter TEXT: H TEXT: H _5._3._3. _A_l_t_e_r*: _C_h_a_n_g_e _a _d_e_v_i_c_e _o_r _m_o_d_e_l _p_a_r_a_m_e_t_e_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H alter _d_e_v_i_c_e _v_a_l_u_e TEXT: H alter _d_e_v_i_c_e _p_a_r_a_m_e_t_e_r _v_a_l_u_e [ _p_a_r_a_m_e_t_e_r _v_a_l_u_e ] TEXT: H TEXT: H TEXT: H Alter changes the value for a device or a specified TEXT: H parameter of a device or model. The first form is used TEXT: H by simple devices which have one principal value (resis- TEXT: H tors, capacitors, etc.) where the second form is for TEXT: H more complex devices (bjt's, etc.). Model parameters TEXT: H can be changed with the second form if the name contains TEXT: H a "#". TEXT: H TEXT: H For specifying vectors as values, start the vector TEXT: H with "[", followed by the values in the vector, and end TEXT: H with "]". Be sure to place a space between each of the TEXT: H values and before and after the "[" and "]". TEXT: H TEXT: H SUBJECT: Asciiplot TITLE: Asciiplot: Plot values using old-style character plots TEXT: H TEXT: H _5._3._4. _A_s_c_i_i_p_l_o_t: _P_l_o_t _v_a_l_u_e_s _u_s_i_n_g _o_l_d-_s_t_y_l_e _c_h_a_r_a_c_t_e_r TEXT: H _p_l_o_t_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H asciiplot _p_l_o_t_a_r_g_s TEXT: H TEXT: H TEXT: H Produce a line printer plot of the vectors. The TEXT: H plot is sent to the standard output, so you can put it TEXT: H into a file with _a_s_c_i_i_p_l_o_t _a_r_g_s ... > _f_i_l_e. The set op- TEXT: H tions width, height, and nobreak determine the width and TEXT: H height of the plot, and whether there are page breaks, TEXT: H respectively. Note that you will have problems if you TEXT: H try to asciiplot something with an X-scale that isn't TEXT: H monotonic (i.e, something like _s_i_n(_T_I_M_E) ), because as- TEXT: H ciiplot uses a simple-minded linear interpolation. TEXT: H TEXT: H SUBJECT: Aspice TITLE: Aspice: Asynchronous spice run TEXT: H TEXT: H _5._3._5. _A_s_p_i_c_e: _A_s_y_n_c_h_r_o_n_o_u_s _s_p_i_c_e _r_u_n TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H aspice input-file [output-file] TEXT: H TEXT: H TEXT: H Start a SPICE-3 run, and when it is finished load TEXT: H the resulting data. The raw data is kept in a temporary TEXT: H file. If _o_u_t_p_u_t-_f_i_l_e is specified then the diagnostic TEXT: H output is directed into that file, otherwise it is TEXT: H thrown away. TEXT: H TEXT: H SUBJECT: Bug TITLE: Bug: Mail a bug report TEXT: H TEXT: H _5._3._6. _B_u_g: _M_a_i_l _a _b_u_g _r_e_p_o_r_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H bug TEXT: H TEXT: H TEXT: H Send a bug report. Please include a short summary TEXT: H of the problem, the version number and name of the TEXT: H operating system that you are running, the version of TEXT: H Spice that you are running, and the relevant spice input TEXT: H file. (If you have defined BUGADDR, the mail is TEXT: H delivered to there.) TEXT: H TEXT: H SUBJECT: Cd TITLE: Cd: Change directory TEXT: H TEXT: H _5._3._7. _C_d: _C_h_a_n_g_e _d_i_r_e_c_t_o_r_y TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H cd [directory] TEXT: H TEXT: H TEXT: H Change the current working directory to directory, TEXT: H or to the user's home directory if none is given. TEXT: H TEXT: H SUBJECT: Destroy TITLE: Destroy: Delete a data set TEXT: H TEXT: H _5._3._8. _D_e_s_t_r_o_y: _D_e_l_e_t_e _a _d_a_t_a _s_e_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H destroy [_p_l_o_t_n_a_m_e_s | all] TEXT: H TEXT: H TEXT: H Release the memory holding the data for the speci- TEXT: H fied runs. TEXT: H TEXT: H SUBJECT: Dc TITLE: Dc*: Perform a DC-sweep analysis TEXT: H TEXT: H _5._3._9. _D_c*: _P_e_r_f_o_r_m _a _D_C-_s_w_e_e_p _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H dc _S_o_u_r_c_e-_N_a_m_e _V_s_t_a_r_t _V_s_t_o_p _V_i_n_c_r [ _S_o_u_r_c_e_2 _V_s_t_a_r_t_2 _V_s_t_o_p_2 _V_i_n_c_r_2 ] TEXT: H TEXT: H TEXT: H Do a dc transfer curve analysis. See the previous TEXT: H sections of this manual for more details. TEXT: H TEXT: H SUBJECT: Define TITLE: Define: Define a function TEXT: H TEXT: H _5._3._1_0. _D_e_f_i_n_e: _D_e_f_i_n_e _a _f_u_n_c_t_i_o_n TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H define function(arg1, arg2, ...) expression TEXT: H TEXT: H TEXT: H Define the _u_s_e_r-_d_e_f_i_n_a_b_l_e _f_u_n_c_t_i_o_n with the name TEXT: H _f_u_n_c_t_i_o_n and arguments _a_r_g_1, _a_r_g_2, ... to be _e_x_p_r_e_s_s_i_o_n, TEXT: H which may involve the arguments. When the function is TEXT: H later used, the arguments it is given are substituted TEXT: H for the formal arguments when it is parsed. If _e_x_p_r_e_s- TEXT: H _s_i_o_n is not present, any definition for _f_u_n_c_t_i_o_n is TEXT: H printed, and if there are no arguments to _d_e_f_i_n_e then TEXT: H all currently active definitions are printed. Note that TEXT: H you may have different functions defined with the same TEXT: H name but different arities. TEXT: H TEXT: H TEXT: H TEXT: H Some useful definitions are: TEXT: H TEXT: H define max(x,y) (x > y) * x + (x <= y) * y TEXT: H define min(x,y) (x < y) * x + (x >= y) * y TEXT: H TEXT: H TEXT: H SUBJECT: Delete TITLE: Delete*: Remove a trace or breakpoint TEXT: H TEXT: H _5._3._1_1. _D_e_l_e_t_e*: _R_e_m_o_v_e _a _t_r_a_c_e _o_r _b_r_e_a_k_p_o_i_n_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H delete [ _d_e_b_u_g-_n_u_m_b_e_r ... ] TEXT: H TEXT: H TEXT: H Delete the specified breakpoints and traces. The TEXT: H debug numbers are those shown by the status command (un- TEXT: H less you do status > file, in which case the debug TEXT: H numbers are not printed). TEXT: H TEXT: H SUBJECT: Diff TITLE: Diff: Compare vectors TEXT: H TEXT: H _5._3._1_2. _D_i_f_f: _C_o_m_p_a_r_e _v_e_c_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H diff plot1 plot2 [vec ...] TEXT: H TEXT: H TEXT: H Compare all the vectors in the specified _p_l_o_t_s, or TEXT: H only the named vectors if any are given. There are dif- TEXT: H ferent vectors in the two plots, or any values in the TEXT: H vectors differ significantly the difference is reported. TEXT: H The variable diff_abstol, diff_reltol, and diff_vntol TEXT: H are used to determine a significant difference. TEXT: H TEXT: H SUBJECT: Display TITLE: Display: List known vectors and types TEXT: H TEXT: H _5._3._1_3. _D_i_s_p_l_a_y: _L_i_s_t _k_n_o_w_n _v_e_c_t_o_r_s _a_n_d _t_y_p_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H display [varname ...] TEXT: H TEXT: H TEXT: H Prints a summary of currently defined vectors, or TEXT: H of the names specified. The vectors are sorted by name TEXT: H unless the variable nosort is set. The information TEXT: H given is the name of the vector, the length, the type of TEXT: H the vector, and whether it is real or complex data. Ad- TEXT: H ditionally, one vector is labeled [scale]. When a com- TEXT: H mand such as _p_l_o_t is given without a _v_s argument, this TEXT: H scale is used for the X-axis. It is always the first TEXT: H vector in a rawfile, or the first vector defined in a TEXT: H new plot. If you undefine the scale (i.e, _l_e_t _T_I_M_E = TEXT: H []), one of the remaining vectors becomes the new scale TEXT: H (which is undetermined). TEXT: H TEXT: H SUBJECT: Echo TITLE: Echo: Print text TEXT: H TEXT: H _5._3._1_4. _E_c_h_o: _P_r_i_n_t _t_e_x_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H echo [text...] TEXT: H TEXT: H TEXT: H Echos the given text to the screen. TEXT: H TEXT: H SUBJECT: Edit TITLE: Edit*: Edit the current circuit TEXT: H TEXT: H _5._3._1_5. _E_d_i_t*: _E_d_i_t _t_h_e _c_u_r_r_e_n_t _c_i_r_c_u_i_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H edit [ _f_i_l_e ] TEXT: H TEXT: H TEXT: H Print the current Spice3 input file into a file, TEXT: H call up the editor on that file and allow the user to TEXT: H modify it, and then read it back in, replacing the ori- TEXT: H ginal file. If a _f_i_l_e_n_a_m_e is given, then edit that file TEXT: H and load it, making the circuit the current one. TEXT: H TEXT: H SUBJECT: Fourier TITLE: Fourier: Perform a fourier transform TEXT: H TEXT: H _5._3._1_6. _F_o_u_r_i_e_r: _P_e_r_f_o_r_m _a _f_o_u_r_i_e_r _t_r_a_n_s_f_o_r_m TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H fourier fundamental_frequency [value ...] TEXT: H TEXT: H TEXT: H Does a fourier analysis of each of the given TEXT: H values, using the first 10 multiples of the fundamental TEXT: H frequency (or the first _n_f_r_e_q_s, if that variable is set TEXT: H - see below). The output is like that of the .four TEXT: H Spice3 line. The values may be any valid expression. TEXT: H The values are interpolated onto a fixed-space grid with TEXT: H the number of points given by the fourgridsize variable, TEXT: H or 200 if it is not set. The interpolation is of degree TEXT: H polydegree if that variable is set, or 1. If polydegree TEXT: H is 0, then no interpolation is done. This is likely to TEXT: H give erroneous results if the time scale is not monoton- TEXT: H ic, though. TEXT: H TEXT: H SUBJECT: Hardcopy TITLE: Hardcopy: Save a plot to a file for printing TEXT: H TEXT: H _5._3._1_7. _H_a_r_d_c_o_p_y: _S_a_v_e _a _p_l_o_t _t_o _a _f_i_l_e _f_o_r _p_r_i_n_t_i_n_g TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H hardcopy file _p_l_o_t_a_r_g_s TEXT: H TEXT: H TEXT: H Just like plot, except creates a file called _f_i_l_e TEXT: H containing the plot. The file is an image in _p_l_o_t(_5) TEXT: H format, and can be printed by either the plot(1) program TEXT: H or lpr with the -g flag. TEXT: H TEXT: H SUBJECT: Help TITLE: Help: Print summaries of Spice3 commands TEXT: H TEXT: H _5._3._1_8. _H_e_l_p: _P_r_i_n_t _s_u_m_m_a_r_i_e_s _o_f _S_p_i_c_e_3 _c_o_m_m_a_n_d_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H help [all] [command ...] TEXT: H TEXT: H TEXT: H Prints help. If the argument all is given, a short TEXT: H description of everything you could possibly type is TEXT: H printed. If commands are given, descriptions of those TEXT: H commands are printed. Otherwise help for only a few ma- TEXT: H jor commands is printed. TEXT: H TEXT: H SUBJECT: History TITLE: History: Review previous commands TEXT: H TEXT: H _5._3._1_9. _H_i_s_t_o_r_y: _R_e_v_i_e_w _p_r_e_v_i_o_u_s _c_o_m_m_a_n_d_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H history [number] TEXT: H TEXT: H TEXT: H Print out the history, or the last number commands TEXT: H typed at the keyboard. _N_o_t_e: in Spice3 version 3a7 and TEXT: H earlier, all commands (including ones read from files) TEXT: H were saved. TEXT: H TEXT: H SUBJECT: Iplot TITLE: Iplot*: Incremental plot TEXT: H TEXT: H _5._3._2_0. _I_p_l_o_t*: _I_n_c_r_e_m_e_n_t_a_l _p_l_o_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H iplot [ node ...] TEXT: H TEXT: H TEXT: H Incrementally plot the values of the nodes while TEXT: H Spice3 runs. The iplot command can be used with the TEXT: H where command to find trouble spots in a transient simu- TEXT: H lation. TEXT: H TEXT: H SUBJECT: Jobs TITLE: Jobs: List active asynchronous spice runs TEXT: H TEXT: H _5._3._2_1. _J_o_b_s: _L_i_s_t _a_c_t_i_v_e _a_s_y_n_c_h_r_o_n_o_u_s _s_p_i_c_e _r_u_n_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H jobs TEXT: H TEXT: H TEXT: H Report on the asynchronous SPICE-3 jobs currently TEXT: H running. Nutmeg checks to see if the jobs are finished TEXT: H every time you execute a command. If it is done then TEXT: H the data is loaded and becomes available. TEXT: H TEXT: H SUBJECT: Let TITLE: Let: Assign a value to a vector TEXT: H TEXT: H _5._3._2_2. _L_e_t: _A_s_s_i_g_n _a _v_a_l_u_e _t_o _a _v_e_c_t_o_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H let name = expr TEXT: H TEXT: H TEXT: H Creates a new vector called _n_a_m_e with the value TEXT: H specified by _e_x_p_r, an expression as described above. If TEXT: H expr is [] (a zero-length vector) then the vector be- TEXT: H comes undefined. Individual elements of a vector may be TEXT: H modified by appending a subscript to name (ex. name[0]). TEXT: H If there are no arguments, let is the same as display. TEXT: H TEXT: H SUBJECT: Linearize TITLE: Linearize*: Interpolate to a linear scale TEXT: H TEXT: H _5._3._2_3. _L_i_n_e_a_r_i_z_e*: _I_n_t_e_r_p_o_l_a_t_e _t_o _a _l_i_n_e_a_r _s_c_a_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H linearize vec ... TEXT: H TEXT: H TEXT: H Create a new plot with all of the vectors in the TEXT: H current plot, or only those mentioned if arguments are TEXT: H given. The new vectors are interpolated onto a linear TEXT: H time scale, which is determined by the values of tstep, TEXT: H tstart, and tstop in the currently active transient TEXT: H analysis. The currently loaded input file must include TEXT: H a transient analysis (a tran command may be run interac- TEXT: H tively before the last reset, alternately), and the TEXT: H current plot must be from this transient analysis. This TEXT: H command is needed because Spice3 doesn't output the TEXT: H results from a transient analysis in the same manner TEXT: H that Spice2 did. TEXT: H TEXT: H SUBJECT: Listing TITLE: Listing*: Print a listing of the current circuit TEXT: H TEXT: H _5._3._2_4. _L_i_s_t_i_n_g*: _P_r_i_n_t _a _l_i_s_t_i_n_g _o_f _t_h_e _c_u_r_r_e_n_t _c_i_r_c_u_i_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H listing [logical] [physical] [deck] [expand] TEXT: H TEXT: H TEXT: H If the logical argument is given, the listing is TEXT: H with all continuation lines collapsed into one line, and TEXT: H if the physical argument is given the lines are printed TEXT: H out as they were found in the file. The default is log- TEXT: H ical. A deck listing is just like the physical listing, TEXT: H except without the line numbers it recreates the input TEXT: H file verbatim (except that it does not preserve case). TEXT: H If the word expand is present, the circuit is printed TEXT: H with all subcircuits expanded. TEXT: H TEXT: H SUBJECT: Load TITLE: Load: Load rawfile data TEXT: H TEXT: H _5._3._2_5. _L_o_a_d: _L_o_a_d _r_a_w_f_i_l_e _d_a_t_a TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H load [filename] ... TEXT: H TEXT: H TEXT: H Loads either binary or ascii format rawfile data TEXT: H from the files named. The default filename is TEXT: H rawspice.raw, or the argument to the -r flag if there TEXT: H was one. TEXT: H TEXT: H SUBJECT: Op TITLE: Op*: Perform an operating point analysis TEXT: H TEXT: H _5._3._2_6. _O_p*: _P_e_r_f_o_r_m _a_n _o_p_e_r_a_t_i_n_g _p_o_i_n_t _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H op TEXT: H TEXT: H TEXT: H Do an operating point analysis. See the previous TEXT: H sections of this manual for more details. TEXT: H TEXT: H SUBJECT: Plot TITLE: Plot: Plot values on the display TEXT: H TEXT: H _5._3._2_7. _P_l_o_t: _P_l_o_t _v_a_l_u_e_s _o_n _t_h_e _d_i_s_p_l_a_y TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H plot exprs [ylimit ylo yhi] [xlimit xlo xhi] [xindices xilo xihi] TEXT: H [xcompress comp] [xdelta xdel] [ydelta ydel] [xlog] [ylog] [loglog] TEXT: H [vs xname] [xlabel word] [ylabel word] [title word] [samep] TEXT: H [linear] TEXT: H TEXT: H TEXT: H TEXT: H Plot the given _e_x_p_r_s on the screen (if you are on a TEXT: H graphics terminal). The _x_l_i_m_i_t and _y_l_i_m_i_t arguments deter- TEXT: H mine the high and low x- and y-limits of the axes, respec- TEXT: H tively. The _x_i_n_d_i_c_e_s arguments determine what range of TEXT: H points are to be plotted - everything between the xilo'th TEXT: H point and the xihi'th point is plotted. The _x_c_o_m_p_r_e_s_s argu- TEXT: H ment specifies that only one out of every comp points should TEXT: H be plotted. If an xdelta or a ydelta parameter is present, TEXT: H it specifies the spacing between grid lines on the X- and TEXT: H Y-axis. These parameter names may be abbreviated to _x_l, _y_l, TEXT: H _x_i_n_d, _x_c_o_m_p, _x_d_e_l, and _y_d_e_l respectively. TEXT: H TEXT: H The _x_n_a_m_e argument is an expression to use as the scale TEXT: H on the x-axis. If xlog or ylog are present then the X or Y TEXT: H scale, respectively, is logarithmic (loglog is the same as TEXT: H specifying both). The xlabel and ylabel arguments cause the TEXT: H specified labels to be used for the X and Y axes, respec- TEXT: H tively. TEXT: H TEXT: H If samep is given, the values of the other parameters TEXT: H (other than xname) from the previous plot, hardcopy, or TEXT: H asciiplot command is used unless re-defined on the command TEXT: H line. TEXT: H TEXT: H The title argument is used in the place of the plot TEXT: H name at the bottom of the graph. TEXT: H TEXT: H The linear keyword is used to override a default log- TEXT: H scale plot (as in the output for an AC analysis). TEXT: H TEXT: H Finally, the keyword polar to generate a polar plot. TEXT: H To produce a smith plot, use the keyword smith. Note that TEXT: H the data is transformed, so for smith plots you will see the TEXT: H data transformed by the function (x-1)/(x+1). To produce a TEXT: H polar plot with a smith grid but without performing the TEXT: H smith transform, use the keyword smithgrid. TEXT: H SUBJECT: Print TITLE: Print: Print values TEXT: H TEXT: H _5._3._2_8. _P_r_i_n_t: _P_r_i_n_t _v_a_l_u_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H print [col] [line] expr ... TEXT: H TEXT: H TEXT: H Prints the vector described by the expression _e_x_p_r. TEXT: H If the _c_o_l argument is present, print the vectors named TEXT: H side by side. If line is given, the vectors are printed TEXT: H horizontally. col is the default, unless all the vec- TEXT: H tors named have a length of one, in which case line is TEXT: H the default. The options width, length, and nobreak are TEXT: H effective for this command (see asciiplot). If the ex- TEXT: H pression is all, all of the vectors available are print- TEXT: H ed. Thus print col all > file prints everything in the TEXT: H file in SPICE2 format. The scale vector (time, frequen- TEXT: H cy) is always in the first column unless the variable TEXT: H noprintscale is true. TEXT: H TEXT: H SUBJECT: Quit TITLE: Quit: Leave Spice3 or Nutmeg TEXT: H TEXT: H _5._3._2_9. _Q_u_i_t: _L_e_a_v_e _S_p_i_c_e_3 _o_r _N_u_t_m_e_g TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H quit TEXT: H TEXT: H TEXT: H Quit nutmeg or spice. TEXT: H TEXT: H SUBJECT: Rehash TITLE: Rehash: Reset internal hash tables TEXT: H TEXT: H _5._3._3_0. _R_e_h_a_s_h: _R_e_s_e_t _i_n_t_e_r_n_a_l _h_a_s_h _t_a_b_l_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H rehash TEXT: H TEXT: H TEXT: H Recalculate the internal hash tables used when TEXT: H looking up UNIX commands, and make all UNIX commands in TEXT: H the user's PATH available for command completion. This TEXT: H is useless unless you have set unixcom first (see TEXT: H above). TEXT: H TEXT: H SUBJECT: Reset TITLE: Reset*: Reset an analysis TEXT: H TEXT: H _5._3._3_1. _R_e_s_e_t*: _R_e_s_e_t _a_n _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H reset TEXT: H TEXT: H TEXT: H Throw out any intermediate data in the circuit TEXT: H (e.g, after a breakpoint or after one or more analyses TEXT: H have been done already), and re-parse the input file. TEXT: H The circuit can then be re-run from it's initial state, TEXT: H overriding the effect of any set or alter commands. In TEXT: H Spice-3e and earlier versions this was done automatical- TEXT: H ly by the run command. TEXT: H TEXT: H SUBJECT: Reshape TITLE: Reshape: Alter the dimensionality or dimensions of a vector TEXT: H TEXT: H _5._3._3_2. _R_e_s_h_a_p_e: _A_l_t_e_r _t_h_e _d_i_m_e_n_s_i_o_n_a_l_i_t_y _o_r _d_i_m_e_n_s_i_o_n_s _o_f TEXT: H _a _v_e_c_t_o_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H reshape _v_e_c_t_o_r _v_e_c_t_o_r ... TEXT: H or TEXT: H reshape _v_e_c_t_o_r _v_e_c_t_o_r ... [ _d_i_m_e_n_s_i_o_n, _d_i_m_e_n_s_i_o_n, ... ] TEXT: H or TEXT: H reshape _v_e_c_t_o_r _v_e_c_t_o_r ... [ _d_i_m_e_n_s_i_o_n ][ _d_i_m_e_n_s_i_o_n ] ... TEXT: H TEXT: H TEXT: H This command changes the dimensions of a vector or TEXT: H a set of vectors. The final dimension may be left off TEXT: H and it will be filled in automatically. If no dimen- TEXT: H sions are specified, then the dimensions of the first TEXT: H vector are copied to the other vectors. An error mes- TEXT: H sage of the form 'dimensions of _x were inconsistent' can TEXT: H be ignored. TEXT: H TEXT: H SUBJECT: Resume TITLE: Resume*: Continue a simulation after a stop TEXT: H TEXT: H _5._3._3_3. _R_e_s_u_m_e*: _C_o_n_t_i_n_u_e _a _s_i_m_u_l_a_t_i_o_n _a_f_t_e_r _a _s_t_o_p TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H resume TEXT: H TEXT: H TEXT: H Resume a simulation after a stop or interruption TEXT: H (control-C). TEXT: H TEXT: H SUBJECT: Rspice TITLE: Rspice: Remote spice submission TEXT: H TEXT: H _5._3._3_4. _R_s_p_i_c_e: _R_e_m_o_t_e _s_p_i_c_e _s_u_b_m_i_s_s_i_o_n TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H rspice _i_n_p_u_t _f_i_l_e TEXT: H TEXT: H TEXT: H Runs a SPICE-3 remotely taking the input file as a TEXT: H SPICE-3 input file, or the current circuit if no argu- TEXT: H ment is given. Nutmeg or Spice3 waits for the job to TEXT: H complete, and passes output from the remote job to the TEXT: H user's standard output. When the job is finished the TEXT: H data is loaded in as with aspice. If the variable _r_h_o_s_t TEXT: H is set, nutmeg connects to this host instead of the de- TEXT: H fault remote Spice3 server machine. This command uses TEXT: H the "rsh" command and thereby requires authentication TEXT: H via a ".rhosts" file or other equivalent method. Note TEXT: H that "rsh" refers to the "remote shell" program, which TEXT: H may be "remsh" on your system; to override the default TEXT: H name of "rsh", set the variable _r_e_m_o_t_e__s_h_e_l_l. If the TEXT: H variable _r_p_r_o_g_r_a_m is set, then rspice uses this as the TEXT: H pathname to the program to run on the remote system. TEXT: H TEXT: H Note: rspice will not acknowledge elements that TEXT: H have been changed via the "alter" or "altermod" com- TEXT: H mands. TEXT: H TEXT: H SUBJECT: Run TITLE: Run*: Run analysis from the input file TEXT: H TEXT: H _5._3._3_5. _R_u_n*: _R_u_n _a_n_a_l_y_s_i_s _f_r_o_m _t_h_e _i_n_p_u_t _f_i_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H run [rawfile] TEXT: H TEXT: H TEXT: H Run the simulation as specified in the input file. TEXT: H If there were any of the control lines .ac, .op, .tran, TEXT: H or .dc, they are executed. The output is put in rawfile TEXT: H if it was given, in addition to being available interac- TEXT: H tively. In Spice-3e and earlier versions, the input TEXT: H file would be re-read and any effects of the set or TEXT: H alter commands would be reversed. This is no longer the TEXT: H effect. TEXT: H TEXT: H SUBJECT: Rusage TITLE: Rusage: Resource usage TEXT: H TEXT: H _5._3._3_6. _R_u_s_a_g_e: _R_e_s_o_u_r_c_e _u_s_a_g_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H rusage [resource ...] TEXT: H TEXT: H TEXT: H Print resource usage statistics. If any resources TEXT: H are given, just print the usage of that resource. Most TEXT: H resources require that a circuit be loaded. Currently TEXT: H valid resources are: TEXT: H TEXT: H elapsed The amount of time elapsed since the last rusage TEXT: H elaped call. TEXT: H faults Number of page faults and context switches (BSD only). TEXT: H space Data space used. TEXT: H time CPU time used so far. TEXT: H TEXT: H temp Operating temperature. TEXT: H tnom Temperature at which device parameters were measured. TEXT: H equations Circuit Equations TEXT: H TEXT: H time Total Analysis Time TEXT: H totiter Total iterations TEXT: H accept Accepted timepoints TEXT: H rejected Rejected timepoints TEXT: H TEXT: H loadtime Time spent loading the circuit matrix and RHS. TEXT: H reordertime Matrix reordering time TEXT: H lutime L-U decomposition time TEXT: H solvetime Matrix solve time TEXT: H TEXT: H trantime Transient analysis time TEXT: H tranpoints Transient timepoints TEXT: H traniter Transient iterations TEXT: H trancuriters Transient iterations for the last time point* TEXT: H tranlutime Transient L-U decomposition time TEXT: H transolvetime Transient matrix solve time TEXT: H TEXT: H everything All of the above. TEXT: H TEXT: H * listed incorrectly as "Transient iterations per point". TEXT: H TEXT: H SUBJECT: Save TITLE: Save*: Save a set of outputs TEXT: H TEXT: H _5._3._3_7. _S_a_v_e*: _S_a_v_e _a _s_e_t _o_f _o_u_t_p_u_t_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H save [all | _o_u_t_p_u_t ...] TEXT: H .save [all | _o_u_t_p_u_t ...] TEXT: H TEXT: H TEXT: H Save a set of outputs, discarding the rest. If a TEXT: H node has been mentioned in a save command, it appears in TEXT: H the working plot after a run has completed, or in the TEXT: H rawfile if spice is run in batch mode. If a node is TEXT: H traced or plotted (see below) it is also saved. For TEXT: H backward compatibility, if there are no save commands TEXT: H given, all outputs are saved. TEXT: H TEXT: H When the keyword "all" or the keyword "allv", appears in TEXT: H the save command, all node voltages, voltage source TEXT: H currents and inductor currents are saved in addition to TEXT: H any other values listed. If the keyword "alli" appears TEXT: H in the save command, all devices currents are saved. TEXT: H TEXT: H Note: the current implementation saves only the currents TEXT: H of devices which have internal nodes, i.e. MOSFETs TEXT: H with non zero RD and RS; BJTs with non-zero RC, RB TEXT: H and RE; DIODEs with non-zero RS; etc. Resistor and TEXT: H capacitor currents are not saved with this option. TEXT: H These deficiencies will be addressed in a later TEXT: H revision. SUBJECT: Sens TITLE: Sens*: Run a sensitivity analysis TEXT: H TEXT: H _5._3._3_8. _S_e_n_s*: _R_u_n _a _s_e_n_s_i_t_i_v_i_t_y _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H sens _o_u_t_p_u_t__v_a_r_i_a_b_l_e TEXT: H sens _o_u_t_p_u_t__v_a_r_i_a_b_l_e ac ( DEC | OCT | LIN ) _N _F_s_t_a_r_t _F_s_t_o_p TEXT: H TEXT: H TEXT: H Perform a Sensitivity analysis. _o_u_t_p_u_t__v_a_r_i_a_b_l_e is TEXT: H either a node voltage (ex. "v(1)" or "v(A,out)") or a TEXT: H current through a voltage source (ex. "i(vtest)"). The TEXT: H first form calculates DC sensitivities, the second form TEXT: H calculates AC sensitivies. The output values are in di- TEXT: H mensions of change in output per unit change of input TEXT: H (as opposed to percent change in output or per percent TEXT: H change of input). TEXT: H TEXT: H SUBJECT: Set TITLE: Set: Set the value of a variable TEXT: H TEXT: H _5._3._3_9. _S_e_t: _S_e_t _t_h_e _v_a_l_u_e _o_f _a _v_a_r_i_a_b_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H set [word] TEXT: H set [word = value] ... TEXT: H TEXT: H TEXT: H Set the value of word to be value, if it is TEXT: H present. You can set any word to be any value, numeric TEXT: H or string. If no value is given then the value is the TEXT: H boolean 'true'. TEXT: H TEXT: H TEXT: H The value of _w_o_r_d may be inserted into a command by TEXT: H writing $_w_o_r_d. If a variable is set to a list of values TEXT: H that are enclosed in parentheses (which must be separated TEXT: H from their values by white space), the value of the variable TEXT: H is the list. TEXT: H TEXT: H The variables used by nutmeg are listed in the follow- TEXT: H ing section. TEXT: H SUBJECT: Setcirc TITLE: Setcirc*: Change the current circuit TEXT: H TEXT: H _5._3._4_0. _S_e_t_c_i_r_c*: _C_h_a_n_g_e _t_h_e _c_u_r_r_e_n_t _c_i_r_c_u_i_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H setcirc [circuit name] TEXT: H TEXT: H TEXT: H The current circuit is the one that is used for the TEXT: H simulation commands below. When a circuit is loaded TEXT: H with the source command (see below) it becomes the TEXT: H current circuit. TEXT: H TEXT: H SUBJECT: Setplot TITLE: Setplot: Switch the current set of vectors TEXT: H TEXT: H _5._3._4_1. _S_e_t_p_l_o_t: _S_w_i_t_c_h _t_h_e _c_u_r_r_e_n_t _s_e_t _o_f _v_e_c_t_o_r_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H setplot [plotname] TEXT: H TEXT: H TEXT: H Set the current plot to the plot with the given TEXT: H name, or if no name is given, prompt the user with a TEXT: H menu. (Note that the plots are named as they are loaded, TEXT: H with names like tran1 or op2. These names are shown by TEXT: H the setplot and display commands and are used by diff, TEXT: H below.) If the "New plot" item is selected, the current TEXT: H plot becomes one with no vectors defined. TEXT: H TEXT: H Note that here the word "plot" refers to a group of TEXT: H vectors that are the result of one SPICE run. When more TEXT: H than one file is loaded in, or more than one plot is TEXT: H present in one file, nutmeg keeps them separate and only TEXT: H shows you the vectors in the current plot. TEXT: H TEXT: H SUBJECT: Settype TITLE: Settype: Set the type of a vector TEXT: H TEXT: H _5._3._4_2. _S_e_t_t_y_p_e: _S_e_t _t_h_e _t_y_p_e _o_f _a _v_e_c_t_o_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H settype type vector ... TEXT: H TEXT: H TEXT: H Change the type of the named vectors to type. Type TEXT: H names can be found in the manual page for sconvert. TEXT: H TEXT: H SUBJECT: Shell TITLE: Shell: Call the command interpreter TEXT: H TEXT: H _5._3._4_3. _S_h_e_l_l: _C_a_l_l _t_h_e _c_o_m_m_a_n_d _i_n_t_e_r_p_r_e_t_e_r TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H shell [ _c_o_m_m_a_n_d ] TEXT: H TEXT: H TEXT: H Call the operating system's command interpreter; TEXT: H execute the specified command or call for interactive TEXT: H use. TEXT: H TEXT: H SUBJECT: Shift TITLE: Shift: Alter a list variable TEXT: H TEXT: H _5._3._4_4. _S_h_i_f_t: _A_l_t_e_r _a _l_i_s_t _v_a_r_i_a_b_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H shift [varname] [number] TEXT: H TEXT: H TEXT: H If _v_a_r_n_a_m_e is the name of a list variable, it is TEXT: H shifted to the left by _n_u_m_b_e_r elements (i.e, the _n_u_m_b_e_r TEXT: H leftmost elements are removed). The default _v_a_r_n_a_m_e is TEXT: H argv, and the default _n_u_m_b_e_r is 1. TEXT: H TEXT: H SUBJECT: Show TITLE: Show*: List device state TEXT: H TEXT: H _5._3._4_5. _S_h_o_w*: _L_i_s_t _d_e_v_i_c_e _s_t_a_t_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H show _d_e_v_i_c_e_s [ : _p_a_r_a_m_e_t_e_r_s ] , ... TEXT: H TEXT: H TEXT: H _O_l_d _F_o_r_m TEXT: H TEXT: H show -v @_d_e_v_i_c_e [ [ _n_a_m_e ] ] TEXT: H TEXT: H TEXT: H The show command prints out tables summarizing the TEXT: H operating condition of selected devices (much like the TEXT: H spice2 operation point summary). If _d_e_v_i_c_e is missing, TEXT: H a default set of devices are listed, if _d_e_v_i_c_e is a sin- TEXT: H gle letter, devices of that type are listed; if _d_e_v_i_c_e TEXT: H is a subcircuit name (beginning and ending in ":") only TEXT: H devices in that subcircuit are shown (end the name in a TEXT: H double-":" to get devices within sub-subcircuits recur- TEXT: H sively). The second and third forms may be combined TEXT: H ("letter:subcircuit:") or "letter:subcircuit::") to TEXT: H select a specific type of device from a subcircuit. A TEXT: H device's full name may be specified to list only that TEXT: H device. Finally, devices may be selected by model by TEXT: H using the form "#modelname" or ":subcircuit#modelname" TEXT: H or "letter:subcircuit#modelname". TEXT: H TEXT: H If no _p_a_r_a_m_e_t_e_r_s are specified, the values for a TEXT: H standard set of parameters are listed. If the list of TEXT: H _p_a_r_a_m_e_t_e_r_s contains a "+", the default set of parameters TEXT: H is listed along with any other specified parameters. TEXT: H TEXT: H For both _d_e_v_i_c_e_s and _p_a_r_a_m_e_t_e_r_s, the word "all" has TEXT: H the obvious meaning. Note: there must be spaces TEXT: H separating the ":" that divides the _d_e_v_i_c_e list from the TEXT: H _p_a_r_a_m_e_t_e_r list. TEXT: H TEXT: H The "old form" (with "-v") prints the data in a TEXT: H older, more verbose pre-spice3f format. TEXT: H TEXT: H SUBJECT: Showmod TITLE: Showmod*: List model parameter values TEXT: H TEXT: H _5._3._4_6. _S_h_o_w_m_o_d*: _L_i_s_t _m_o_d_e_l _p_a_r_a_m_e_t_e_r _v_a_l_u_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H showmod _m_o_d_e_l_s [ : _p_a_r_a_m_e_t_e_r_s ] , ... TEXT: H TEXT: H TEXT: H The showmod command operates like the show command TEXT: H (above) but prints out model parameter values. The ap- TEXT: H plicable forms for _m_o_d_e_l_s are a single letter specifying TEXT: H the device type letter, "letter:subckt:", "modelname", TEXT: H ":subckt:modelname", or "letter:subcircuit:modelname". TEXT: H TEXT: H SUBJECT: Source TITLE: Source: Read a Spice3 input file TEXT: H TEXT: H _5._3._4_7. _S_o_u_r_c_e: _R_e_a_d _a _S_p_i_c_e_3 _i_n_p_u_t _f_i_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H source _f_i_l_e TEXT: H TEXT: H TEXT: H For Spice3: Read the Spice3 input file file. Nut- TEXT: H meg and Spice3 commands may be included in the file, and TEXT: H must be enclosed between the lines ._c_o_n_t_r_o_l and ._e_n_d_c. TEXT: H These commands are executed immediately after the cir- TEXT: H cuit is loaded, so a control line of _a_c ... works the TEXT: H same as the corresponding ._a_c card. The first line in TEXT: H any input file is considered a title line and not parsed TEXT: H but kept as the name of the circuit. The exception to TEXT: H this rule is the file ._s_p_i_c_e_i_n_i_t. Thus, a Spice3 com- TEXT: H mand script must begin with a blank line and then with a TEXT: H .control line. Also, any line beginning with the char- TEXT: H acters *# is considered a control line. This makes it TEXT: H possible to imbed commands in Spice3 input files that TEXT: H are ignored by earlier versions of Spice2 TEXT: H TEXT: H For Nutmeg: Reads commands from the file _f_i_l_e_n_a_m_e. TEXT: H Lines beginning with the character * are considered com- TEXT: H ments and ignored. TEXT: H TEXT: H SUBJECT: Status TITLE: Status*: Display breakpoint information TEXT: H TEXT: H _5._3._4_8. _S_t_a_t_u_s*: _D_i_s_p_l_a_y _b_r_e_a_k_p_o_i_n_t _i_n_f_o_r_m_a_t_i_o_n TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H status TEXT: H TEXT: H TEXT: H Display all of the traces and breakpoints currently TEXT: H in effect. TEXT: H TEXT: H SUBJECT: Step TITLE: Step*: Run a fixed number of timepoints TEXT: H TEXT: H _5._3._4_9. _S_t_e_p*: _R_u_n _a _f_i_x_e_d _n_u_m_b_e_r _o_f _t_i_m_e_p_o_i_n_t_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H step [number] TEXT: H TEXT: H TEXT: H Iterate number times, or once, and then stop. TEXT: H TEXT: H SUBJECT: Stop TITLE: Stop*: Set a breakpoint TEXT: H TEXT: H _5._3._5_0. _S_t_o_p*: _S_e_t _a _b_r_e_a_k_p_o_i_n_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H stop [ after n] [ when _v_a_l_u_e _c_o_n_d _v_a_l_u_e ] ... TEXT: H TEXT: H TEXT: H Set a breakpoint. The argument after n means stop TEXT: H after n iteration number n, and the argument when _v_a_l_u_e TEXT: H _c_o_n_d _v_a_l_u_e means stop when the first _v_a_l_u_e is in the TEXT: H given relation with the second _v_a_l_u_e, the possible rela- TEXT: H tions being TEXT: H TEXT: H eq or = equal to TEXT: H ne or <> not equal to TEXT: H gt or > greater than TEXT: H lt or < less than TEXT: H ge or >= greater than or equal to TEXT: H le or <= less than or equal to TEXT: H TEXT: H TEXT: H IO redirection is disabled for the stop command, since the TEXT: H relational operations conflict with it (it doesn't produce TEXT: H any output anyway). The _v_a_l_u_es above may be node names in TEXT: H the running circuit, or real values. If more than one con- TEXT: H dition is given, e.g. stop after 4 when v(1) > 4 when v(2) TEXT: H < 2, the conjunction of the conditions is implied. TEXT: H TEXT: H SUBJECT: Tf TITLE: Tf*: Run a Transfer Function analysis TEXT: H TEXT: H _5._3._5_1. _T_f*: _R_u_n _a _T_r_a_n_s_f_e_r _F_u_n_c_t_i_o_n _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H tf _o_u_t_p_u_t__n_o_d_e _i_n_p_u_t__s_o_u_r_c_e TEXT: H TEXT: H TEXT: H The tf command performs a transfer function TEXT: H analysis, returning the transfer function TEXT: H (output/input), output resistance, and input resistance TEXT: H between the given output node and the given input TEXT: H source. The analysis assumes a small-signal DC (slowly TEXT: H varying) input. TEXT: H TEXT: H SUBJECT: Trace TITLE: Trace*: Trace nodes TEXT: H TEXT: H _5._3._5_2. _T_r_a_c_e*: _T_r_a_c_e _n_o_d_e_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H trace [ node ...] TEXT: H TEXT: H TEXT: H For every step of an analysis, the value of the TEXT: H node is printed. Several traces may be active at once. TEXT: H Tracing is not applicable for all analyses. To remove a TEXT: H trace, use the delete command. TEXT: H TEXT: H SUBJECT: Tran TITLE: Tran*: Perform a transient analysis TEXT: H TEXT: H _5._3._5_3. _T_r_a_n*: _P_e_r_f_o_r_m _a _t_r_a_n_s_i_e_n_t _a_n_a_l_y_s_i_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H tran _T_s_t_e_p _T_s_t_o_p [ _T_s_t_a_r_t [ _T_m_a_x ] ] [ UIC ] TEXT: H TEXT: H TEXT: H Perform a transient analysis. See the previous TEXT: H sections of this manual for more details. TEXT: H TEXT: H SUBJECT: Transpose TITLE: Transpose: Swap the elements in a multi-dimensional data set TEXT: H TEXT: H _5._3._5_4. _T_r_a_n_s_p_o_s_e: _S_w_a_p _t_h_e _e_l_e_m_e_n_t_s _i_n _a _m_u_l_t_i-_d_i_m_e_n_s_i_o_n_a_l TEXT: H _d_a_t_a _s_e_t TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H transpose _v_e_c_t_o_r _v_e_c_t_o_r ... TEXT: H TEXT: H TEXT: H This command transposes a multidimensional vector. TEXT: H No analysis in Spice3 produces multidimensional vectors, TEXT: H although the DC transfer curve may be run with two vary- TEXT: H ing sources. You must use the "reshape" command to re- TEXT: H form the one-dimensional vectors into two dimensional TEXT: H vectors. In addition, the default scale is incorrect TEXT: H for plotting. You must plot versus the vector TEXT: H corresponding to the second source, but you must also TEXT: H refer only to the first segment of this second source TEXT: H vector. For example (circuit to produce the tranfer TEXT: H characteristic of a MOS transistor): TEXT: H TEXT: H spice3 > dc vgg 0 5 1 vdd 0 5 1 TEXT: H spice3 > plot i(vdd) TEXT: H spice3 > reshape all [6,6] TEXT: H spice3 > transpose i(vdd) v(drain) TEXT: H spice3 > plot i(vdd) vs v(drain)[0] TEXT: H TEXT: H TEXT: H SUBJECT: Unalias TITLE: Unalias: Retract an alias TEXT: H TEXT: H _5._3._5_5. _U_n_a_l_i_a_s: _R_e_t_r_a_c_t _a_n _a_l_i_a_s TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H unalias [word ...] TEXT: H TEXT: H TEXT: H Removes any aliases present for the words. TEXT: H TEXT: H SUBJECT: Undefine TITLE: Undefine: Retract a definition TEXT: H TEXT: H _5._3._5_6. _U_n_d_e_f_i_n_e: _R_e_t_r_a_c_t _a _d_e_f_i_n_i_t_i_o_n TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H undefine function TEXT: H TEXT: H TEXT: H Definitions for the named user-defined functions TEXT: H are deleted. TEXT: H TEXT: H SUBJECT: Unset TITLE: Unset: Clear a variable TEXT: H TEXT: H _5._3._5_7. _U_n_s_e_t: _C_l_e_a_r _a _v_a_r_i_a_b_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H unset [_w_o_r_d ...] TEXT: H TEXT: H TEXT: H Clear the value of the specified variable(s) TEXT: H (_w_o_r_d). TEXT: H TEXT: H SUBJECT: Version TITLE: Version: Print the version of Spice TEXT: H TEXT: H _5._3._5_8. _V_e_r_s_i_o_n: _P_r_i_n_t _t_h_e _v_e_r_s_i_o_n _o_f _S_p_i_c_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H version [version id] TEXT: H TEXT: H TEXT: H Print out the version of nutmeg that is running. TEXT: H If there are arguments, it checks to make sure that the TEXT: H arguments match the current version of SPICE. (This is TEXT: H mainly used as a Command: line in rawfiles.) TEXT: H TEXT: H SUBJECT: Where TITLE: Where: Identify troublesome node or device TEXT: H TEXT: H _5._3._5_9. _W_h_e_r_e: _I_d_e_n_t_i_f_y _t_r_o_u_b_l_e_s_o_m_e _n_o_d_e _o_r _d_e_v_i_c_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H where TEXT: H TEXT: H TEXT: H When performing a transient or operating point TEXT: H analysis, the name of the last node or device to cause TEXT: H non-convergence is saved. The where command prints out TEXT: H this information so that you can examine the circuit and TEXT: H either correct the problem or make a bug report. You TEXT: H may do this either in the middle of a run or after the TEXT: H simulator has given up on the analysis. For transient TEXT: H simulation, the iplot command can be used to monitor the TEXT: H progress of the analysis. When the analysis slows down TEXT: H severly or hangs, interrupt the simulator (with TEXT: H control-C) and issue the where command. Note that only TEXT: H one node or device is printed; there may be problems TEXT: H with more than one node. TEXT: H TEXT: H SUBJECT: Write TITLE: Write: Write data to a file TEXT: H TEXT: H _5._3._6_0. _W_r_i_t_e: _W_r_i_t_e _d_a_t_a _t_o _a _f_i_l_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H write [file] [exprs] TEXT: H TEXT: H TEXT: H Writes out the expressions to _f_i_l_e. TEXT: H TEXT: H First vectors are grouped together by plots, and TEXT: H written out as such (i.e, if the expression list con- TEXT: H tained three vectors from one plot and two from another, TEXT: H then two plots are written, one with three vectors and TEXT: H one with two). Additionally, if the scale for a vector TEXT: H isn't present, it is automatically written out as well. TEXT: H TEXT: H The default format is ascii, but this can be TEXT: H changed with the set filetype command. The default TEXT: H filename is rawspice.raw, or the argument to the -r flag TEXT: H on the command line, if there was one, and the default TEXT: H expression list is all. TEXT: H TEXT: H SUBJECT: Xgraph TITLE: Xgraph: use the xgraph(1) program for plotting. TEXT: H TEXT: H _5._3._6_1. _X_g_r_a_p_h: _u_s_e _t_h_e _x_g_r_a_p_h(_1) _p_r_o_g_r_a_m _f_o_r _p_l_o_t_t_i_n_g. TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H xgraph _f_i_l_e [exprs] [plot options] TEXT: H TEXT: H TEXT: H The spice3/nutmeg xgraph command plots data like TEXT: H the plot command but via xgraph, a popular X11 plotting TEXT: H program. TEXT: H TEXT: H If _f_i_l_e is either "temp" or "tmp" a temporary file TEXT: H is used to hold the data while being plotted. For TEXT: H available plot options, see the plot command. All op- TEXT: H tions except for polar or smith plots are supported. TEXT: H SUBJECT: CONTROL STRUCTURES TITLE: CONTROL STRUCTURES TEXT: H TEXT: H _5._4. _C_O_N_T_R_O_L _S_T_R_U_C_T_U_R_E_S TEXT: H TEXT: H SUBTOPIC: NGSPICE:While End SUBTOPIC: NGSPICE:Repeat End SUBTOPIC: NGSPICE:Dowhile End SUBTOPIC: NGSPICE:Foreach End SUBTOPIC: NGSPICE:If Then Else SUBTOPIC: NGSPICE:Label SUBTOPIC: NGSPICE:Goto SUBTOPIC: NGSPICE:Continue SUBTOPIC: NGSPICE:Break SUBJECT: While End TITLE: While - End TEXT: H TEXT: H _5._4._1. _W_h_i_l_e - _E_n_d TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H while _c_o_n_d_i_t_i_o_n TEXT: H statement TEXT: H ... TEXT: H end TEXT: H TEXT: H TEXT: H While _c_o_n_d_i_t_i_o_n, an arbitrary algebraic expression, TEXT: H is true, execute the statements. TEXT: H TEXT: H SUBJECT: Repeat End TITLE: Repeat - End TEXT: H TEXT: H _5._4._2. _R_e_p_e_a_t - _E_n_d TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H repeat [_n_u_m_b_e_r] TEXT: H statement TEXT: H ... TEXT: H end TEXT: H TEXT: H TEXT: H Execute the statements _n_u_m_b_e_r times, or forever if TEXT: H no argument is given. TEXT: H TEXT: H SUBJECT: Dowhile End TITLE: Dowhile - End TEXT: H TEXT: H _5._4._3. _D_o_w_h_i_l_e - _E_n_d TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H dowhile _c_o_n_d_i_t_i_o_n TEXT: H statement TEXT: H ... TEXT: H end TEXT: H TEXT: H TEXT: H The same as while, except that the _c_o_n_d_i_t_i_o_n is TEXT: H tested after the statements are executed. TEXT: H TEXT: H SUBJECT: Foreach End TITLE: Foreach - End TEXT: H TEXT: H _5._4._4. _F_o_r_e_a_c_h - _E_n_d TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H foreach _v_a_r _v_a_l_u_e ... TEXT: H statement TEXT: H ... TEXT: H end TEXT: H TEXT: H TEXT: H The statements are executed once for each of the TEXT: H _v_a_l_u_es, each time with the variable _v_a_r set to the TEXT: H current one. (_v_a_r can be accessed by the $_v_a_r notation TEXT: H - see below). TEXT: H TEXT: H SUBJECT: If Then Else TITLE: If - Then - Else TEXT: H TEXT: H _5._4._5. _I_f - _T_h_e_n - _E_l_s_e TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H if _c_o_n_d_i_t_i_o_n TEXT: H statement TEXT: H ... TEXT: H else TEXT: H statement TEXT: H ... TEXT: H end TEXT: H TEXT: H TEXT: H If the _c_o_n_d_i_t_i_o_n is non-zero then the first set of TEXT: H statements are executed, otherwise the second set. The TEXT: H else and the second set of statements may be omitted. TEXT: H TEXT: H SUBJECT: Label TITLE: Label TEXT: H TEXT: H _5._4._6. _L_a_b_e_l TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H label _w_o_r_d TEXT: H TEXT: H TEXT: H If a statement of the form goto _w_o_r_d is encoun- TEXT: H tered, control is transferred to this point, otherwise TEXT: H this is a no-op. TEXT: H TEXT: H SUBJECT: Goto TITLE: Goto TEXT: H TEXT: H _5._4._7. _G_o_t_o TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H goto _w_o_r_d TEXT: H TEXT: H TEXT: H If a statement of the form label _w_o_r_d is present in TEXT: H the block or an enclosing block, control is transferred TEXT: H there. Note that if the label is at the top level, it TEXT: H _m_u_s_t be before the goto _s_t_a_t_e_m_e_n_t (_i._e, _a _f_o_r_w_a_r_d _g_o_t_o TEXT: H may occur only within a block). TEXT: H TEXT: H SUBJECT: Continue TITLE: Continue TEXT: H TEXT: H _5._4._8. _C_o_n_t_i_n_u_e TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H continue TEXT: H TEXT: H TEXT: H If there is a while, dowhile, or foreach block en- TEXT: H closing this statement, control passes to the test, or TEXT: H in the case of foreach, the next value is taken. Other- TEXT: H wise an error results. TEXT: H TEXT: H SUBJECT: Break TITLE: Break TEXT: H TEXT: H _5._4._9. _B_r_e_a_k TEXT: H TEXT: H _G_e_n_e_r_a_l _F_o_r_m TEXT: H TEXT: H break TEXT: H TEXT: H TEXT: H If there is a while, dowhile, or foreach block en- TEXT: H closing this statement, control passes out of the block. TEXT: H Otherwise an error results. TEXT: H TEXT: H Of course, control structures may be nested. When TEXT: H a block is entered and the input is the terminal, the TEXT: H prompt becomes a number of >'s corresponding to the TEXT: H number of blocks the user has entered. The current con- TEXT: H trol structures may be examined with the debugging com- TEXT: H mand _c_d_u_m_p. TEXT: H SUBJECT: VARIABLES TITLE: VARIABLES TEXT: H TEXT: H _5._5. _V_A_R_I_A_B_L_E_S TEXT: H TEXT: H TEXT: H The operation of both Nutmeg and Spice3 may be affected TEXT: H by setting variables with the "set" command. In addition to TEXT: H the variables mentioned below, the set command in Spice3 TEXT: H also affect the behaviour of the simulator via the options TEXT: H previously described under the section on ".OPTIONS". TEXT: H TEXT: H The variables meaningful to nutmeg which may be altered TEXT: H by the set command are: TEXT: H TEXT: H diff_abstol The absolute tolerance used by the diff command. TEXT: H appendwrite Append to the file when a write command is is- TEXT: H sued, if one already exists. TEXT: H color_N These variables determine the colors used, if X TEXT: H is being run on a color display. _N may be TEXT: H between 0 and 15. Color 0 is the background, TEXT: H color 1 is the grid and text color, and colors 2 TEXT: H through 15 are used in order for vectors plot- TEXT: H ted. The value of the color variables should be TEXT: H names of colors, which may be found in the file TEXT: H /usr/lib/rgb.txt. TEXT: H combplot Plot vectors by drawing a vertical line from TEXT: H each point to the X-axis, as opposed to joining TEXT: H the points. Note that this option is subsumed TEXT: H in the _p_l_o_t_t_y_p_e option, below. TEXT: H cpdebug Print _c_s_h_p_a_r debugging information (must be com- TEXT: H plied with the -DCPDEBUG flag). Unsupported in TEXT: H the current release. TEXT: H TEXT: H TEXT: H debug If set then a lot of debugging information is TEXT: H printed (must be compiled with the -DFTEDEBUG TEXT: H flag). Unsupported in the current release. TEXT: H device The name (/dev/tty??) of the graphics device. TEXT: H If this variable isn't set then the user's TEXT: H terminal is used. To do plotting on another TEXT: H monitor you probably have to set both the TEXT: H device and term variables. (If device is set TEXT: H to the name of a file, nutmeg dumps the TEXT: H graphics control codes into this file -- this TEXT: H is useful for saving plots.) TEXT: H echo Print out each command before it is executed. TEXT: H filetype This can be either _a_s_c_i_i or _b_i_n_a_r_y, and TEXT: H determines what format are. The default is TEXT: H _a_s_c_i_i. TEXT: H TEXT: H TEXT: H fourgridsize How many points to use for interpolating TEXT: H into when doing fourier analysis. TEXT: H gridsize If this variable is set to an integer, TEXT: H this number is used as the number of TEXT: H equally spaced points to use for the Y- TEXT: H axis when plotting. Otherwise the TEXT: H current scale is used (which may not TEXT: H have equally spaced points). If the TEXT: H current scale isn't strictly monotonic, TEXT: H then this option has no effect. TEXT: H hcopydev If this is set, when the hardcopy com- TEXT: H mand is run the resulting file is au- TEXT: H tomatically printed on the printer named TEXT: H hcopydev with the command _l_p_r -_Phcopydev TEXT: H -_g file. TEXT: H TEXT: H TEXT: H hcopyfont This variable specifies the font name TEXT: H for hardcopy output plots. The value is TEXT: H device dependent. TEXT: H hcopyfontsize This is a scaling factor for the font TEXT: H used in hardcopy plots. TEXT: H hcopydevtype This variable specifies the type of the TEXT: H printer output to use in the hardcopy TEXT: H command. If hcopydevtype is not set, TEXT: H plot (5) format is assumed. The stan- TEXT: H dard distribution currently recognizes TEXT: H postscript as an alternative output for- TEXT: H mat. When used in conjunction with TEXT: H hcopydev, hcopydevtype should specify a TEXT: H format supported by the printer. TEXT: H height The length of the page for asciiplot and TEXT: H print col. TEXT: H history The number of events to save in the his- TEXT: H tory list. TEXT: H lprplot5 This is a printf(3s) style format string TEXT: H used to specify the command to use for TEXT: H sending plot(5)-style plots to a printer TEXT: H or plotter. The first parameter sup- TEXT: H plied is the printer name, the second TEXT: H parameter supplied is a file name con- TEXT: H taining the plot. Both parameters are TEXT: H strings. It is trivial to cause Spice3 TEXT: H to abort by supplying a unreasonable TEXT: H format string. TEXT: H lprps This is a printf(3s) style format string TEXT: H used to specify the command to use for TEXT: H sending PostScript plots to a printer or TEXT: H plotter. The first parameter supplied TEXT: H is the printer name, the second parame- TEXT: H ter supplied is a file name containing TEXT: H the plot. Both parameters are strings. TEXT: H It is trivial to cause Spice3 to abort TEXT: H by supplying a unreasonable format TEXT: H string. TEXT: H nfreqs The number of frequencies to compute in TEXT: H the _f_o_u_r_i_e_r command. (Defaults to 10.) TEXT: H nobreak Don't have asciiplot and print col break TEXT: H between pages. TEXT: H TEXT: H TEXT: H noasciiplotvalue Don't print the first vector plotted to TEXT: H the left when doing an asciiplot. TEXT: H noclobber Don't overwrite existing files when do- TEXT: H ing IO redirection. TEXT: H noglob Don't expand the global characters `*', TEXT: H `?', `[', and `]'. This is the default. TEXT: H nogrid Don't plot a grid when graphing curves TEXT: H (but do label the axes). TEXT: H nomoremode If nomoremode is not set, whenever a TEXT: H large amount of data is being printed to TEXT: H the screen (e.g, the print or asciiplot TEXT: H commands), the output is stopped every TEXT: H screenful and continues when a carriage TEXT: H return is typed. If nomoremode is set TEXT: H then data scrolls off the screen without TEXT: H check. TEXT: H nonomatch If noglob is unset and a global expres- TEXT: H sion cannot be matched, use the global TEXT: H characters literally instead of com- TEXT: H plaining. TEXT: H TEXT: H TEXT: H nosort Don't have display sort the variable names. TEXT: H noprintscale Don't print the scale in the leftmost TEXT: H column when a print col command is given. TEXT: H numdgt The number of digits to print when printing TEXT: H tables of data (fourier, print col). The TEXT: H default precision is 6 digits. On the VAX, TEXT: H approximately 16 decimal digits are avail- TEXT: H able using double precision, so numdgt TEXT: H should not be more than 16. If the number TEXT: H is negative, one fewer digit is printed to TEXT: H ensure constant widths in tables. TEXT: H plottype This should be one of normal, comb, or TEXT: H point:_c_h_a_r_s. normal, the default, causes TEXT: H points to be plotted as parts of connected TEXT: H lines. comb causes a comb plot to be done TEXT: H (see the description of the combplot vari- TEXT: H able above). point causes each point to be TEXT: H plotted separately - the chars are a list TEXT: H of characters that are used for each vector TEXT: H plotted. If they are omitted then a de- TEXT: H fault set is used. TEXT: H polydegree The degree of the polynomial that the plot TEXT: H command should fit to the data. If _p_o_l_y_d_e- TEXT: H _g_r_e_e is N, then nutmeg fits a degree N po- TEXT: H lynomial to every set of N points and draw TEXT: H 10 intermediate points in between each end- TEXT: H point. If the points aren't monotonic, TEXT: H then it tries rotating the curve and reduc- TEXT: H ing the degree until a fit is achieved. TEXT: H polysteps The number of points to interpolate between TEXT: H every pair of points available when doing TEXT: H curve fitting. The default is 10. TEXT: H program The name of the current program (_a_r_g_v[_0]). TEXT: H prompt The prompt, with the character `!' replaced TEXT: H by the current event number. TEXT: H TEXT: H TEXT: H rawfile The default name for rawfiles created. TEXT: H diff_reltol The relative tolerance used by the diff command. TEXT: H remote_shell Overrides the name used for generating rspice TEXT: H runs (default is "rsh"). TEXT: H rhost The machine to use for remote SPICE-3 runs, in- TEXT: H stead of the default one (see the description of TEXT: H the rspice command, below). TEXT: H rprogram The name of the remote program to use in the TEXT: H rspice command. TEXT: H slowplot Stop between each graph plotted and wait for the TEXT: H user to type return before continuing. TEXT: H sourcepath A list of the directories to search when a TEXT: H source command is given. The default is the TEXT: H current directory and the standard spice library TEXT: H (/_u_s_r/_l_o_c_a_l/_l_i_b/_s_p_i_c_e, or whatever LIBPATH is TEXT: H #defined to in the Spice3 source. TEXT: H spicepath The program to use for the aspice command. The TEXT: H default is /cad/bin/spice. TEXT: H term The _m_f_b name of the current terminal. TEXT: H units If this is degrees, then all the trig functions TEXT: H will use degrees instead of radians. TEXT: H unixcom If a command isn't defined, try to execute it as TEXT: H a UNIX command. Setting this option has the ef- TEXT: H fect of giving a rehash command, below. This is TEXT: H useful for people who want to use nutmeg as a TEXT: H login shell. TEXT: H verbose Be verbose. This is midway between echo and de- TEXT: H bug / cpdebug. TEXT: H diff_vntol The absolute voltage tolerance used by the diff TEXT: H command. TEXT: H TEXT: H TEXT: H width The width of the page for asciiplot and TEXT: H print col. TEXT: H x11lineararcs Some X11 implementations have poor arc TEXT: H drawing. If you set this option, Spice3 TEXT: H will plot using an approximation to the TEXT: H curve using straight lines. TEXT: H xbrushheight The height of the brush to use if X is TEXT: H being run. TEXT: H xbrushwidth The width of the brush to use if X is TEXT: H being run. TEXT: H xfont The name of the X font to use when plot- TEXT: H ting data and entering labels. The plot TEXT: H may not look good if this is a TEXT: H variable-width font. TEXT: H TEXT: H TEXT: H There are several set variables that Spice3 uses but TEXT: H Nutmeg does not. They are: TEXT: H TEXT: H editor The editor to use for the edit command. TEXT: H modelcard The name of the model card (normally TEXT: H .model). TEXT: H noaskquit Do not check to make sure that there are TEXT: H no circuits suspended and no plots un- TEXT: H saved. Normally Spice3 warns the user TEXT: H when he tries to quit if this is the TEXT: H case. TEXT: H nobjthack Assume that BJTs have 4 nodes. TEXT: H noparse Don't attempt to parse input files when TEXT: H they are read in (useful for debugging). TEXT: H Of course, they cannot be run if they TEXT: H are not parsed. TEXT: H nosubckt Don't expand subcircuits. TEXT: H renumber Renumber input lines when an input file TEXT: H has .include's. TEXT: H subend The card to end subcircuits (normally TEXT: H .ends). TEXT: H subinvoke The prefix to invoke subcircuits (nor- TEXT: H mally x). TEXT: H substart The card to begin subcircuits (normally TEXT: H .subckt). TEXT: H TEXT: H SUBJECT: MISCELLANEOUS TITLE: MISCELLANEOUS TEXT: H TEXT: H _5._6. _M_I_S_C_E_L_L_A_N_E_O_U_S TEXT: H TEXT: H If there are subcircuits in the input file, Spice3 TEXT: H expands instances of them. A subcircuit is delimited by the TEXT: H cards ._s_u_b_c_k_t and ._e_n_d_s, or whatever the value of the vari- TEXT: H ables _s_u_b_s_t_a_r_t and _s_u_b_e_n_d is, respectively. An instance of TEXT: H a subcircuit is created by specifying a device with type 'x' TEXT: H - the device line is written TEXT: H TEXT: H xname node1 node2 ... subcktname TEXT: H TEXT: H TEXT: H where the nodes are the node names that replace the formal TEXT: H parameters on the .subckt line. All nodes that are not for- TEXT: H mal parameters are prepended with the name given to the TEXT: H instance and a ':', as are the names of the devices in the TEXT: H subcircuit. If there are several nested subcircuits, node TEXT: H and device names look like subckt1:subckt2:...:name. If the TEXT: H variable subinvoke is set, then it is used as the prefix TEXT: H that specifies instances of subcircuits, instead of 'x'. TEXT: H TEXT: H Nutmeg occasionally checks to see if it is getting TEXT: H close to running out of space, and warns the user if this is TEXT: H the case. (This is more likely to be useful with the SPICE TEXT: H front end.) TEXT: H TEXT: H C-shell type quoting with "" and '', and backquote sub- TEXT: H stitution may be used. Within single quotes, no further TEXT: H substitution (like history substitution) is done, and within TEXT: H double quotes, the words are kept together but further sub- TEXT: H stitution is done. Any text between backquotes is replaced TEXT: H by the result of executing the text as a command to the TEXT: H shell. TEXT: H TEXT: H Tenex-style ('set filec' in the 4.3 C-shell) command, TEXT: H filename, and keyword completion is possible: If EOF TEXT: H (control-D) is typed after the first character on the line, TEXT: H a list of the commands or possible arguments is printed (If TEXT: H it is alone on the line it exits nutmeg). If escape is TEXT: H typed, then nutmeg trys to complete what the user has TEXT: H already typed. To get a list of all commands, the user TEXT: H should type ^D. TEXT: H TEXT: H The values of variables may be used in commands by TEXT: H writing $varname where the value of the variable is to TEXT: H appear. The special variables $$ and $< refer to the pro- TEXT: H cess ID of the program and a line of input which is read TEXT: H from the terminal when the variable is evaluated, respec- TEXT: H tively. If a variable has a name of the form $&word, then TEXT: H word is considered a vector (see above), and its value is TEXT: H taken to be the value of the variable. If $_f_o_o is a valid TEXT: H variable, and is of type list, then the expression TEXT: H $_f_o_o[_l_o_w-_h_i_g_h] represents a range of elements. Either the TEXT: H upper index or the lower may be left out, and the reverse of TEXT: H a list may be obtained with $_f_o_o[_l_e_n-_0]. Also, the notation TEXT: H $?_f_o_o evaluates to 1 if the variable _f_o_o is defined, 0 oth- TEXT: H erwise, and $#_f_o_o evaluates to the number of elements in _f_o_o TEXT: H if it is a list, 1 if it is a number or string, and 0 if it TEXT: H is a boolean variable. TEXT: H TEXT: H History substitutions, similar to C-shell history sub- TEXT: H stitutions, are also available - see the C-shell manual page TEXT: H for all of the details. TEXT: H TEXT: H The characters ~, {, and } have the same effects as TEXT: H they do in the C-Shell, i.e., home directory and alternative TEXT: H expansion. It is possible to use the wildcard characters *, TEXT: H ?, [, and ] also, but only if you unset noglob first. This TEXT: H makes them rather useless for typing algebraic expressions, TEXT: H so you should set noglob again after you are done with wild- TEXT: H card expansion. Note that the pattern [^abc] matchs all TEXT: H characters _e_x_c_e_p_t a, b, _a_n_d c. TEXT: H TEXT: H IO redirection is available - the symbols >, >>, >&, TEXT: H >>&, and < have the same effects as in the C-shell. TEXT: H TEXT: H You may type multiple commands on one line, separated TEXT: H by semicolons. TEXT: H TEXT: H If you want to use a different mfbcap file than the TEXT: H default (usually ~cad/lib/mfbcap), you have to set the TEXT: H environment variable SPICE_MFBCAP before you start nutmeg or TEXT: H spice. The -m option and the mfbcap variable no longer TEXT: H work. TEXT: H TEXT: H If X is being used, the cursor may be positioned at any TEXT: H point on the screen when the window is up and characters TEXT: H typed at the keyboard are added to the window at that point. TEXT: H The window may then be sent to a printer using the xpr(1) TEXT: H program. TEXT: H TEXT: H Nutmeg can be run under VAX/VMS, as well as several TEXT: H other operating systems. Some features like command comple- TEXT: H tion, expansion of *, ?, and [], backquote substitution, the TEXT: H shell command, and so forth do not work. TEXT: H TEXT: H On some systems you have to respond to the -_m_o_r_e- TEXT: H prompt during plot with a carriage return instead of any key TEXT: H as you can do on UNIX. SUBJECT: BUGS TITLE: BUGS TEXT: H TEXT: H _5._7. _B_U_G_S TEXT: H TEXT: H The label entry facilities are primitive. You must be TEXT: H careful to type slowly when entering labels -- nutmeg checks TEXT: H for input once every second, and can get confused if charac- TEXT: H ters arrive faster. TEXT: H TEXT: H If you redefine colors after creating a plot window TEXT: H with X, and then cause the window to be redrawn, it does not TEXT: H redraw in the correct colors. TEXT: H TEXT: H TEXT: H When defining aliases like TEXT: H TEXT: H alias pdb plot db( '!:1' - '!:2' ) TEXT: H TEXT: H TEXT: H you must be careful to quote the argument list substitu- TEXT: H tions in this manner. If you quote the whole argument TEXT: H it might not work properly. TEXT: H TEXT: H TEXT: H TEXT: H In a user-defined function, the arguments cannot be TEXT: H part of a name that uses the _p_l_o_t._v_e_c syntax. For example: TEXT: H TEXT: H define check(v(1)) cos(tran1.v(1)) TEXT: H TEXT: H TEXT: H does not work. TEXT: H TEXT: H TEXT: H If you type plot all all, or otherwise use a wildcard TEXT: H reference for one plot twice in a command, the effect is TEXT: H unpredictable. TEXT: H TEXT: H The asciiplot command doesn't deal with log scales or TEXT: H the delta keywords. TEXT: H TEXT: H TEXT: H Often the names of terminals recognized by MFB are dif- TEXT: H ferent from those in /etc/termcap. Thus you may have to TEXT: H reset your terminal type with the command TEXT: H TEXT: H set term = termname TEXT: H TEXT: H TEXT: H where termname is the name in the mfbcap file. TEXT: H TEXT: H TEXT: H The hardcopy command is useless on VMS and other sys- TEXT: H tems without the plot command, unless the user has a program TEXT: H that understands _p_l_o_t(_5) format. TEXT: H TEXT: H Spice3 recognizes all the notations used in SPICE2 TEXT: H .plot cards, and translates vp(1) into ph(v(1)), and so TEXT: H forth. However, if there are spaces in these names it won't TEXT: H work. Hence v(1, 2) and (-.5, .5) aren't recognized. TEXT: H TEXT: H BJTs can have either 3 or 4 nodes, which makes it dif- TEXT: H ficult for the subcircuit expansion routines to decide what TEXT: H to rename. If the fourth parameter has been declared as a TEXT: H model name, then it is assumed that there are 3 nodes, oth- TEXT: H erwise it is considered a node. To disable this, you can TEXT: H set the variable "nobjthack" which forces BJTs to have 4 TEXT: H nodes (for the purposes of subcircuit expansion, at least). TEXT: H TEXT: H The @name[param] notation might not work with trace, TEXT: H iplot, etc. yet. TEXT: H TEXT: H The first line of a command file (except for the ._s_p_i_- TEXT: H _c_e_i_n_i_t file) should be a comment, otherwise SPICE may create TEXT: H an empty circuit. TEXT: H TEXT: H Files specified on the command line are read before TEXT: H .spiceinit is read. SUBJECT: BIBLIOGRAPHY TITLE: BIBLIOGRAPHY TEXT: H TEXT: H _6. _B_I_B_L_I_O_G_R_A_P_H_Y TEXT: H TEXT: H TEXT: H [1] A. Vladimirescu and S. Liu, _T_h_e _S_i_m_u_l_a_t_i_o_n _o_f _M_O_S TEXT: H _I_n_t_e_g_r_a_t_e_d _C_i_r_c_u_i_t_s _U_s_i_n_g _S_P_I_C_E_2 TEXT: H ERL Memo No. ERL M80/7, Electronics Research Laboratory TEXT: H University of California, Berkeley, October 1980 TEXT: H TEXT: H [2] T. Sakurai and A. R. Newton, _A _S_i_m_p_l_e _M_O_S_F_E_T _M_o_d_e_l _f_o_r TEXT: H _C_i_r_c_u_i_t _A_n_a_l_y_s_i_s _a_n_d _i_t_s _a_p_p_l_i_c_a_t_i_o_n _t_o _C_M_O_S _g_a_t_e _d_e_l_a_y TEXT: H _a_n_a_l_y_s_i_s _a_n_d _s_e_r_i_e_s-_c_o_n_n_e_c_t_e_d _M_O_S_F_E_T _S_t_r_u_c_t_u_r_e TEXT: H ERL Memo No. ERL M90/19, Electronics Research Labora- TEXT: H tory, TEXT: H University of California, Berkeley, March 1990 TEXT: H TEXT: H [3] B. J. Sheu, D. L. Scharfetter, and P. K. Ko, _S_P_I_C_E_2 TEXT: H _I_m_p_l_e_m_e_n_t_a_t_i_o_n _o_f _B_S_I_M TEXT: H ERL Memo No. ERL M85/42, Electronics Research Labora- TEXT: H tory TEXT: H University of California, Berkeley, May 1985 TEXT: H TEXT: H [4] J. R. Pierret, _A _M_O_S _P_a_r_a_m_e_t_e_r _E_x_t_r_a_c_t_i_o_n _P_r_o_g_r_a_m _f_o_r TEXT: H _t_h_e _B_S_I_M _M_o_d_e_l TEXT: H ERL Memo Nos. ERL M84/99 and M84/100, Electronics TEXT: H Research Laboratory TEXT: H University of California, Berkeley, November 1984 TEXT: H TEXT: H [5] Min-Chie Jeng, _D_e_s_i_g_n _a_n_d _M_o_d_e_l_i_n_g _o_f _D_e_e_p- TEXT: H _S_u_b_m_i_c_r_o_m_e_t_e_r _M_O_S_F_E_T_S_s TEXT: H ERL Memo Nos. ERL M90/90, Electronics Research Labora- TEXT: H tory TEXT: H University of California, Berkeley, October 1990 TEXT: H TEXT: H [6] Soyeon Park, _A_n_a_l_y_s_i_s _a_n_d _S_P_I_C_E _i_m_p_l_e_m_e_n_t_a_t_i_o_n _o_f _H_i_g_h TEXT: H _T_e_m_p_e_r_a_t_u_r_e _E_f_f_e_c_t_s _o_n _M_O_S_F_E_T, TEXT: H Master's thesis, University of California, Berkeley, TEXT: H December 1986. TEXT: H TEXT: H [7] Clement Szeto, _S_i_m_u_l_a_t_o_r _o_f _T_e_m_p_e_r_a_t_u_r_e _E_f_f_e_c_t_s _i_n _M_O_S_- TEXT: H _F_E_T_s (_S_T_E_I_M), TEXT: H Master's thesis, University of California, Berkeley, TEXT: H May 1988. TEXT: H TEXT: H [8] J.S. Roychowdhury and D.O. Pederson, _E_f_f_i_c_i_e_n_t _T_r_a_n_- TEXT: H _s_i_e_n_t _S_i_m_u_l_a_t_i_o_n _o_f _L_o_s_s_y _I_n_t_e_r_c_o_n_n_e_c_t, TEXT: H Proc. of the 28th ACM/IEEE Design Automation Confer- TEXT: H ence, June 17-21 1991, San Francisco TEXT: H TEXT: H [9] A. E. Parker and D. J. Skellern, _A_n _I_m_p_r_o_v_e_d _F_E_T _M_o_d_e_l TEXT: H _f_o_r _C_o_m_p_u_t_e_r _S_i_m_u_l_a_t_o_r_s, TEXT: H IEEE Trans CAD, vol. 9, no. 5, pp. 551-553, May 1990. TEXT: H TEXT: H [10] R. Saleh and A. Yang, Editors, _S_i_m_u_l_a_t_i_o_n _a_n_d _M_o_d_e_l_i_n_g, TEXT: H IEEE Circuits and Devices, vol. 8, no. 3, pp. 7-8 and TEXT: H 49, May 1992 TEXT: H TEXT: H [11] H.Statz et al., _G_a_A_s _F_E_T _D_e_v_i_c_e _a_n_d _C_i_r_c_u_i_t _S_i_m_u_l_a_t_i_o_n TEXT: H _i_n _S_P_I_C_E, TEXT: H IEEE Transactions on Electron Devices, V34, Number 2, TEXT: H February, 1987 pp160-169. SUBJECT: APPENDIX A TITLE: APPENDIX A: EXAMPLE CIRCUITS TEXT: H TEXT: H _A. _A_P_P_E_N_D_I_X _A: _E_X_A_M_P_L_E _C_I_R_C_U_I_T_S TEXT: H TEXT: H SUBTOPIC: NGSPICE:Circuit 1 SUBTOPIC: NGSPICE:Circuit 2 SUBTOPIC: NGSPICE:Circuit 3 SUBTOPIC: NGSPICE:Circuit 4 SUBTOPIC: NGSPICE:Circuit 5 SUBJECT: Circuit 1 TITLE: Circuit 1: Differential Pair TEXT: H TEXT: H _A._1. _C_i_r_c_u_i_t _1: _D_i_f_f_e_r_e_n_t_i_a_l _P_a_i_r TEXT: H TEXT: H TEXT: H The following deck determines the dc operating point of TEXT: H a simple differential pair. In addition, the ac small-signal TEXT: H response is computed over the frequency range 1Hz to TEXT: H 100MEGHz. TEXT: H TEXT: H SIMPLE DIFFERENTIAL PAIR TEXT: H VCC 7 0 12 TEXT: H VEE 8 0 -12 TEXT: H VIN 1 0 AC 1 TEXT: H RS1 1 2 1K TEXT: H RS2 6 0 1K TEXT: H Q1 3 2 4 MOD1 TEXT: H Q2 5 6 4 MOD1 TEXT: H RC1 7 3 10K TEXT: H RC2 7 5 10K TEXT: H RE 4 8 10K TEXT: H .MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS TEXT: H .TF V(5) VIN TEXT: H .AC DEC 10 1 100MEG TEXT: H .END TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: Circuit 2 TITLE: Circuit 2: MOSFET Characterization TEXT: H TEXT: H _A._2. _C_i_r_c_u_i_t _2: _M_O_S_F_E_T _C_h_a_r_a_c_t_e_r_i_z_a_t_i_o_n TEXT: H TEXT: H The following deck computes the output characteristics of a TEXT: H MOSFET device over the range 0-10V for VDS and 0-5V for VGS. TEXT: H TEXT: H TEXT: H MOS OUTPUT CHARACTERISTICS TEXT: H .OPTIONS NODE NOPAGE TEXT: H VDS 3 0 TEXT: H VGS 2 0 TEXT: H M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P TEXT: H * VIDS MEASURES ID, WE COULD HAVE USED VDS, BUT ID WOULD BE NEGATIVE TEXT: H VIDS 3 1 TEXT: H .MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550 TEXT: H .DC VDS 0 10 .5 VGS 0 5 1 TEXT: H .END TEXT: H TEXT: H TEXT: H TEXT: H SUBJECT: Circuit 3 TITLE: Circuit 3: RTL Inverter TEXT: H TEXT: H _A._3. _C_i_r_c_u_i_t _3: _R_T_L _I_n_v_e_r_t_e_r TEXT: H TEXT: H TEXT: H The following deck determines the dc transfer curve and TEXT: H the transient pulse response of a simple RTL inverter. The TEXT: H input is a pulse from 0 to 5 Volts with delay, rise, and TEXT: H fall times of 2ns and a pulse width of 30ns. The transient TEXT: H interval is 0 to 100ns, with printing to be done every TEXT: H nanosecond. TEXT: H TEXT: H TEXT: H SIMPLE RTL INVERTER TEXT: H VCC 4 0 5 TEXT: H VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS TEXT: H RB 1 2 10K TEXT: H Q1 3 2 0 Q1 TEXT: H RC 3 4 1K TEXT: H .MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF TEXT: H .DC VIN 0 5 0.1 TEXT: H .TRAN 1NS 100NS TEXT: H .END TEXT: H TEXT: H TEXT: H SUBJECT: Circuit 4 TITLE: Circuit 4: Four-Bit Binary Adder TEXT: H TEXT: H _A._4. _C_i_r_c_u_i_t _4: _F_o_u_r-_B_i_t _B_i_n_a_r_y _A_d_d_e_r TEXT: H TEXT: H TEXT: H The following deck simulates a four-bit binary adder, TEXT: H using several subcircuits to describe various pieces of the TEXT: H overall circuit. TEXT: H TEXT: H TEXT: H ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER TEXT: H TEXT: H *** SUBCIRCUIT DEFINITIONS TEXT: H .SUBCKT NAND 1 2 3 4 TEXT: H * NODES: INPUT(2), OUTPUT, VCC TEXT: H Q1 9 5 1 QMOD TEXT: H D1CLAMP 0 1 DMOD TEXT: H Q2 9 5 2 QMOD TEXT: H D2CLAMP 0 2 DMOD TEXT: H RB 4 5 4K TEXT: H R1 4 6 1.6K TEXT: H Q3 6 9 8 QMOD TEXT: H R2 8 0 1K TEXT: H RC 4 7 130 TEXT: H Q4 7 6 10 QMOD TEXT: H DVBEDROP 10 3 DMOD TEXT: H Q5 3 8 0 QMOD TEXT: H .ENDS NAND TEXT: H TEXT: H .SUBCKT ONEBIT 1 2 3 4 5 6 TEXT: H * NODES: INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC TEXT: H X1 1 2 7 6 NAND TEXT: H X2 1 7 8 6 NAND TEXT: H X3 2 7 9 6 NAND TEXT: H X4 8 9 10 6 NAND TEXT: H X5 3 10 11 6 NAND TEXT: H X6 3 11 12 6 NAND TEXT: H X7 10 11 13 6 NAND TEXT: H X8 12 13 4 6 NAND TEXT: H X9 11 7 5 6 NAND TEXT: H .ENDS ONEBIT TEXT: H TEXT: H .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 TEXT: H * NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1, TEXT: H * CARRY-IN, CARRY-OUT, VCC TEXT: H X1 1 2 7 5 10 9 ONEBIT TEXT: H X2 3 4 10 6 8 9 ONEBIT TEXT: H .ENDS TWOBIT TEXT: H TEXT: H .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 TEXT: H * NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2), TEXT: H * OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC TEXT: H X1 1 2 3 4 9 10 13 16 15 TWOBIT TEXT: H X2 5 6 7 8 11 12 16 14 15 TWOBIT TEXT: H .ENDS FOURBIT TEXT: H TEXT: H *** DEFINE NOMINAL CIRCUIT TEXT: H .MODEL DMOD D TEXT: H .MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF) TEXT: H VCC 99 0 DC 5V TEXT: H VIN1A 1 0 PULSE(0 3 0 10NS 10NS 10NS 50NS) TEXT: H VIN1B 2 0 PULSE(0 3 0 10NS 10NS 20NS 100NS) TEXT: H VIN2A 3 0 PULSE(0 3 0 10NS 10NS 40NS 200NS) TEXT: H VIN2B 4 0 PULSE(0 3 0 10NS 10NS 80NS 400NS) TEXT: H VIN3A 5 0 PULSE(0 3 0 10NS 10NS 160NS 800NS) TEXT: H VIN3B 6 0 PULSE(0 3 0 10NS 10NS 320NS 1600NS) TEXT: H VIN4A 7 0 PULSE(0 3 0 10NS 10NS 640NS 3200NS) TEXT: H VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS) TEXT: H X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT TEXT: H RBIT0 9 0 1K TEXT: H RBIT1 10 0 1K TEXT: H RBIT2 11 0 1K TEXT: H RBIT3 12 0 1K TEXT: H RCOUT 13 0 1K TEXT: H TEXT: H *** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN) TEXT: H .TRAN 1NS 6400NS TEXT: H .END TEXT: H TEXT: H TEXT: H SUBJECT: Circuit 5 TITLE: Circuit 5: Transmission-Line Inverter TEXT: H TEXT: H _A._5. _C_i_r_c_u_i_t _5: _T_r_a_n_s_m_i_s_s_i_o_n-_L_i_n_e _I_n_v_e_r_t_e_r TEXT: H TEXT: H TEXT: H The following deck simulates a transmission-line in- TEXT: H verter. Two transmission-line elements are required since TEXT: H two propagation modes are excited. In the case of a coaxial TEXT: H line, the first line (T1) models the inner conductor with TEXT: H respect to the shield, and the second line (T2) models the TEXT: H shield with respect to the outside world. TEXT: H TEXT: H TEXT: H TRANSMISSION-LINE INVERTER TEXT: H V1 1 0 PULSE(0 1 0 0.1N) TEXT: H R1 1 2 50 TEXT: H X1 2 0 0 4 TLINE TEXT: H R2 4 0 50 TEXT: H TEXT: H .SUBCKT TLINE 1 2 3 4 TEXT: H T1 1 2 3 4 Z0=50 TD=1.5NS TEXT: H T2 2 0 4 0 Z0=100 TD=1NS TEXT: H .ENDS TLINE TEXT: H TEXT: H .TRAN 0.1NS 20NS TEXT: H .END TEXT: H TEXT: H SUBJECT: APPENDIX B TITLE: APPENDIX B: MODEL AND DEVICE PARAMETERS TEXT: H TEXT: H _B. _A_P_P_E_N_D_I_X _B: _M_O_D_E_L _A_N_D _D_E_V_I_C_E _P_A_R_A_M_E_T_E_R_S TEXT: H TEXT: H The following tables summarize the parameters available TEXT: H on each of the devices and models in (note that for some TEXT: H systems with limited memory, output parameters are not TEXT: H available). There are several tables for each type of dev- TEXT: H ice supported by . Input parameters to instances and models TEXT: H are parameters that can occur on an instance or model defin- TEXT: H ition line in the form "keyword=value" where "keyword" is TEXT: H the parameter name as given in the tables. Default input TEXT: H parameters (such as the resistance of a resistor or the TEXT: H capacitance of a capacitor) obviously do not need the key- TEXT: H word specified. TEXT: H TEXT: H Output parameters are those additional parameters which TEXT: H are available for many types of instances for the output of TEXT: H operating point and debugging information. These parameters TEXT: H are specified as "@device[keyword]" and are available for TEXT: H the most recent point computed or, if specified in a ".save" TEXT: H statement, for an entire simulation as a normal output vec- TEXT: H tor. Thus, to monitor the gate-to-source capacitance of a TEXT: H MOSFET, a command TEXT: H TEXT: H save @m1[cgs] TEXT: H TEXT: H given before a transient simulation causes the specified TEXT: H capacitance value to be saved at each timepoint, and a sub- TEXT: H sequent command such as TEXT: H TEXT: H plot @m1[cgs] TEXT: H TEXT: H produces the desired plot. (Note that the show command does TEXT: H not use this format). TEXT: H TEXT: H Some variables are listed as both input and output, and TEXT: H their output simply returns the previously input value, or TEXT: H the default value after the simulation has been run. Some TEXT: H parameter are input only because the output system can not TEXT: H handle variables of the given type yet, or the need for them TEXT: H as output variables has not been apparent. Many such input TEXT: H variables are available as output variables in a different TEXT: H format, such as the initial condition vectors that can be TEXT: H retrieved as individual initial condition values. Finally, TEXT: H internally derived values are output only and are provided TEXT: H for debugging and operating point output purposes. TEXT: H TEXT: H Please note that these tables do not provide the TEXT: H detailed information available about the parameters provided TEXT: H in the section on each device and model, but are provided as TEXT: H a quick reference guide. SUBTOPIC: NGSPICE:URC SUBTOPIC: NGSPICE:ASRC SUBTOPIC: NGSPICE:BJT SUBTOPIC: NGSPICE:BSIM1 SUBTOPIC: NGSPICE:BSIM2 SUBTOPIC: NGSPICE:Capacitor SUBTOPIC: NGSPICE:CCCS SUBTOPIC: NGSPICE:CCVS SUBTOPIC: NGSPICE:CSwitch SUBTOPIC: NGSPICE:Diode SUBTOPIC: NGSPICE:Inductor SUBTOPIC: NGSPICE:mutual SUBTOPIC: NGSPICE:Isource SUBTOPIC: NGSPICE:JFET SUBTOPIC: NGSPICE:LTRA SUBTOPIC: NGSPICE:MES SUBTOPIC: NGSPICE:Mos1 SUBTOPIC: NGSPICE:Mos2 SUBTOPIC: NGSPICE:Mos3 SUBTOPIC: NGSPICE:Mos6 SUBTOPIC: NGSPICE:Resistor SUBTOPIC: NGSPICE:Switch SUBTOPIC: NGSPICE:Tranline SUBTOPIC: NGSPICE:VCCS SUBTOPIC: NGSPICE:VCVS SUBTOPIC: NGSPICE:Vsource SUBJECT: URC TITLE: URC: Uniform R.C. line TEXT: H TEXT: H _B._1. _U_R_C: _U_n_i_f_o_r_m _R._C. _l_i_n_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| URC - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length of transmission line | TEXT: H| n Number of lumps | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| URC - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of URC | TEXT: H| neg_node Negative node of URC | TEXT: H| gnd Ground node of URC | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| URC - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| urc Uniform R.C. line model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| URC - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| k Propagation constant | TEXT: H| fmax Maximum frequency of interest | TEXT: H| rperl Resistance per unit length | TEXT: H| cperl Capacitance per unit length | TEXT: H| isperl Saturation current per length | TEXT: H| rsperl Diode resistance per length | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: ASRC TITLE: ASRC: Arbitrary Source TEXT: H TEXT: H _B._2. _A_S_R_C: _A_r_b_i_t_r_a_r_y _S_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| ASRC - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| i Current source | TEXT: H| v Voltage source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| ASRC - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| i Current through source | TEXT: H| v Voltage across source | TEXT: H| pos_node Positive Node | TEXT: H| neg_node Negative Node | TEXT: H ------------------------------------------------------------ SUBJECT: BJT TITLE: BJT: Bipolar Junction Transistor TEXT: H TEXT: H _B._3. _B_J_T: _B_i_p_o_l_a_r _J_u_n_c_t_i_o_n _T_r_a_n_s_i_s_t_o_r TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Initial condition vector | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H| icvbe Initial B-E voltage | TEXT: H| icvce Initial C-E voltage | TEXT: H| area Area factor | TEXT: H| temp instance temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| colnode Number of collector node | TEXT: H| basenode Number of base node | TEXT: H| emitnode Number of emitter node | TEXT: H| substnode Number of substrate node | TEXT: H ------------------------------------------------------------ TEXT: H| colprimenode Internal collector node | TEXT: H| baseprimenode Internal base node | TEXT: H| emitprimenode Internal emitter node | TEXT: H| ic Current at collector node | TEXT: H|-----------------------------------------------------------+ TEXT: H ib Current at base node TEXT: H| ie Emitter current | TEXT: H| is Substrate current | TEXT: H| vbe B-E voltage | TEXT: H ------------------------------------------------------------ TEXT: H| vbc B-C voltage | TEXT: H| gm Small signal transconductance | TEXT: H| gpi Small signal input conductance - pi | TEXT: H| gmu Small signal conductance - mu | TEXT: H|-----------------------------------------------------------+ TEXT: H| gx Conductance from base to internal base | TEXT: H| go Small signal output conductance | TEXT: H| geqcb d(Ibe)/d(Vbc) | TEXT: H| gccs Internal C-S cap. equiv. cond. | TEXT: H ------------------------------------------------------------ TEXT: H| geqbx Internal C-B-base cap. equiv. cond. | TEXT: H| cpi Internal base to emitter capactance | TEXT: H| cmu Internal base to collector capactiance | TEXT: H| cbx Base to collector capacitance | TEXT: H|-----------------------------------------------------------+ TEXT: H| ccs Collector to substrate capacitance | TEXT: H| cqbe Cap. due to charge storage in B-E jct. | TEXT: H| cqbc Cap. due to charge storage in B-C jct. | TEXT: H| cqcs Cap. due to charge storage in C-S jct. | TEXT: H| cqbx Cap. due to charge storage in B-X jct. | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| cexbc Total Capacitance in B-X junction | TEXT: H| qbe Charge storage B-E junction | TEXT: H| qbc Charge storage B-C junction | TEXT: H| qcs Charge storage C-S junction | TEXT: H| qbx Charge storage B-X junction | TEXT: H| p Power dissipation | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| npn NPN type device | TEXT: H| pnp PNP type device | TEXT: H| is Saturation Current | TEXT: H| bf Ideal forward beta | TEXT: H ------------------------------------------------------------ TEXT: H| nf Forward emission coefficient | TEXT: H| vaf Forward Early voltage | TEXT: H| va (null) | TEXT: H| ikf Forward beta roll-off corner current | TEXT: H|-----------------------------------------------------------+ TEXT: H| ik (null) | TEXT: H| ise B-E leakage saturation current | TEXT: H| ne B-E leakage emission coefficient | TEXT: H| br Ideal reverse beta | TEXT: H ------------------------------------------------------------ TEXT: H| nr Reverse emission coefficient | TEXT: H| var Reverse Early voltage | TEXT: H| vb (null) | TEXT: H| ikr reverse beta roll-off corner current | TEXT: H|-----------------------------------------------------------+ TEXT: H| isc B-C leakage saturation current | TEXT: H| nc B-C leakage emission coefficient | TEXT: H| rb Zero bias base resistance | TEXT: H| irb Current for base resistance=(rb+rbm)/2 | TEXT: H ------------------------------------------------------------ TEXT: H| rbm Minimum base resistance | TEXT: H| re Emitter resistance | TEXT: H| rc Collector resistance | TEXT: H| cje Zero bias B-E depletion capacitance | TEXT: H|-----------------------------------------------------------+ TEXT: H| vje B-E built in potential | TEXT: H| pe (null) | TEXT: H| mje B-E junction grading coefficient | TEXT: H| me (null) | TEXT: H ------------------------------------------------------------ TEXT: H| tf Ideal forward transit time | TEXT: H| xtf Coefficient for bias dependence of TF | TEXT: H| vtf Voltage giving VBC dependence of TF | TEXT: H| itf High current dependence of TF | TEXT: H|-----------------------------------------------------------+ TEXT: H| ptf Excess phase | TEXT: H| cjc Zero bias B-C depletion capacitance | TEXT: H| vjc B-C built in potential | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - model input-output parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| pc (null) | TEXT: H| mjc B-C junction grading coefficient | TEXT: H| mc (null) | TEXT: H| xcjc Fraction of B-C cap to internal base | TEXT: H ------------------------------------------------------------ TEXT: H| tr Ideal reverse transit time | TEXT: H| cjs Zero bias C-S capacitance | TEXT: H| ccs Zero bias C-S capacitance | TEXT: H| vjs Substrate junction built in potential | TEXT: H|-----------------------------------------------------------+ TEXT: H| ps (null) | TEXT: H| mjs Substrate junction grading coefficient | TEXT: H| ms (null) | TEXT: H| xtb Forward and reverse beta temp. exp. | TEXT: H ------------------------------------------------------------ TEXT: H| eg Energy gap for IS temp. dependency | TEXT: H| xti Temp. exponent for IS | TEXT: H| fc Forward bias junction fit parameter | TEXT: H| tnom Parameter measurement temperature | TEXT: H| kf Flicker Noise Coefficient | TEXT: H| af Flicker Noise Exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BJT - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type NPN or PNP | TEXT: H| invearlyvoltf Inverse early voltage:forward | TEXT: H| invearlyvoltr Inverse early voltage:reverse | TEXT: H| invrollofff Inverse roll off - forward | TEXT: H ------------------------------------------------------------ TEXT: H| invrolloffr Inverse roll off - reverse | TEXT: H| collectorconduct Collector conductance | TEXT: H| emitterconduct Emitter conductance | TEXT: H| transtimevbcfact Transit time VBC factor | TEXT: H| excessphasefactor Excess phase fact. | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: BSIM1 TITLE: BSIM1: Berkeley Short Channel IGFET Model TEXT: H TEXT: H _B._4. _B_S_I_M_1: _B_e_r_k_e_l_e_y _S_h_o_r_t _C_h_a_n_n_e_l _I_G_F_E_T _M_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM1 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Vector of DS,GS,BS initial voltages | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM1 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Number of squares in drain | TEXT: H| nrs Number of squares in source | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device is initially off | TEXT: H| vds Initial D-S voltage | TEXT: H| vgs Initial G-S voltage | TEXT: H| vbs Initial B-S voltage | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM1 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos Flag to indicate NMOS | TEXT: H| pmos Flag to indicate PMOS | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM1 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vfb Flat band voltage | TEXT: H lvfb Length dependence of vfb TEXT: H| wvfb Width dependence of vfb | TEXT: H| phi Strong inversion surface potential | TEXT: H ------------------------------------------------------------ TEXT: H| lphi Length dependence of phi | TEXT: H| wphi Width dependence of phi | TEXT: H| k1 Bulk effect coefficient 1 | TEXT: H| lk1 Length dependence of k1 | TEXT: H|-----------------------------------------------------------+ TEXT: H| wk1 Width dependence of k1 | TEXT: H| k2 Bulk effect coefficient 2 | TEXT: H| lk2 Length dependence of k2 | TEXT: H| wk2 Width dependence of k2 | TEXT: H ------------------------------------------------------------ TEXT: H| eta VDS dependence of threshold voltage | TEXT: H| leta Length dependence of eta | TEXT: H| weta Width dependence of eta | TEXT: H| x2e VBS dependence of eta | TEXT: H| lx2e Length dependence of x2e | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H --------------------------------------------------------------------- TEXT: H| BSIM1 - model input-output parameters - _c_o_n_t_i_n_u_e_d| TEXT: H|--------------------------------------------------------------------+ TEXT: H|wx2e Width dependence of x2e | TEXT: H|x3e VDS dependence of eta | TEXT: H|lx3e Length dependence of x3e | TEXT: H|wx3e Width dependence of x3e | TEXT: H --------------------------------------------------------------------- TEXT: H|dl Channel length reduction in um | TEXT: H|dw Channel width reduction in um | TEXT: H|muz Zero field mobility at VDS=0 VGS=VTH | TEXT: H|x2mz VBS dependence of muz | TEXT: H|--------------------------------------------------------------------+ TEXT: H|lx2mz Length dependence of x2mz | TEXT: H|wx2mz Width dependence of x2mz | TEXT: H mus Mobility at VDS=VDD VGS=VTH, channel length modulation TEXT: H|lmus Length dependence of mus | TEXT: H --------------------------------------------------------------------- TEXT: H|wmus Width dependence of mus | TEXT: H|x2ms VBS dependence of mus | TEXT: H|lx2ms Length dependence of x2ms | TEXT: H|wx2ms Width dependence of x2ms | TEXT: H|--------------------------------------------------------------------+ TEXT: H|x3ms VDS dependence of mus | TEXT: H|lx3ms Length dependence of x3ms | TEXT: H|wx3ms Width dependence of x3ms | TEXT: H|u0 VGS dependence of mobility | TEXT: H --------------------------------------------------------------------- TEXT: H|lu0 Length dependence of u0 | TEXT: H|wu0 Width dependence of u0 | TEXT: H|x2u0 VBS dependence of u0 | TEXT: H|lx2u0 Length dependence of x2u0 | TEXT: H|--------------------------------------------------------------------+ TEXT: H|wx2u0 Width dependence of x2u0 | TEXT: H|u1 VDS depence of mobility, velocity saturation | TEXT: H|lu1 Length dependence of u1 | TEXT: H|wu1 Width dependence of u1 | TEXT: H --------------------------------------------------------------------- TEXT: H|x2u1 VBS depence of u1 | TEXT: H|lx2u1 Length depence of x2u1 | TEXT: H|wx2u1 Width depence of x2u1 | TEXT: H|x3u1 VDS depence of u1 | TEXT: H|--------------------------------------------------------------------+ TEXT: H|lx3u1 Length dependence of x3u1 | TEXT: H|wx3u1 Width depence of x3u1 | TEXT: H|n0 Subthreshold slope | TEXT: H ln0 Length dependence of n0 TEXT: H --------------------------------------------------------------------- TEXT: H|wn0 Width dependence of n0 | TEXT: H|nb VBS dependence of subthreshold slope | TEXT: H|lnb Length dependence of nb | TEXT: H|wnb Width dependence of nb | TEXT: H|--------------------------------------------------------------------+ TEXT: H|nd VDS dependence of subthreshold slope | TEXT: H|lnd Length dependence of nd | TEXT: H|wnd Width dependence of nd | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H --------------------------------------------------------------------- TEXT: H TEXT: H TEXT: H --------------------------------------------------------------------------- TEXT: H| BSIM1 - model input-output parameters - _c_o_n_t_i_n_u_e_d | TEXT: H|--------------------------------------------------------------------------+ TEXT: H|tox Gate oxide thickness in um | TEXT: H|temp Temperature in degree Celcius | TEXT: H|vdd Supply voltage to specify mus | TEXT: H|cgso Gate source overlap capacitance per unit channel width(m) | TEXT: H --------------------------------------------------------------------------- TEXT: H|cgdo Gate drain overlap capacitance per unit channel width(m) | TEXT: H|cgbo Gate bulk overlap capacitance per unit channel length(m) | TEXT: H|xpart Flag for channel charge partitioning | TEXT: H|rsh Source drain diffusion sheet resistance in ohm per square | TEXT: H|--------------------------------------------------------------------------+ TEXT: H|js Source drain junction saturation current per unit area | TEXT: H|pb Source drain junction built in potential | TEXT: H mj Source drain bottom junction capacitance grading coefficient TEXT: H|pbsw Source drain side junction capacitance built in potential | TEXT: H --------------------------------------------------------------------------- TEXT: H|mjsw Source drain side junction capacitance grading coefficient | TEXT: H|cj Source drain bottom junction capacitance per unit area | TEXT: H|cjsw Source drain side junction capacitance per unit area | TEXT: H|wdf Default width of source drain diffusion in um | TEXT: H|dell Length reduction of source drain diffusion | TEXT: H --------------------------------------------------------------------------- TEXT: H SUBJECT: BSIM2 TITLE: BSIM2: Berkeley Short Channel IGFET Model TEXT: H TEXT: H _B._5. _B_S_I_M_2: _B_e_r_k_e_l_e_y _S_h_o_r_t _C_h_a_n_n_e_l _I_G_F_E_T _M_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM2 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Vector of DS,GS,BS initial voltages | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM2 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Number of squares in drain | TEXT: H| nrs Number of squares in source | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device is initially off | TEXT: H| vds Initial D-S voltage | TEXT: H| vgs Initial G-S voltage | TEXT: H| vbs Initial B-S voltage | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM2 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos Flag to indicate NMOS | TEXT: H| pmos Flag to indicate PMOS | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM2 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H|vfb Flat band voltage | TEXT: H|lvfb Length dependence of vfb | TEXT: H|wvfb Width dependence of vfb | TEXT: H|phi Strong inversion surface potential | TEXT: H ------------------------------------------------------------ TEXT: H|lphi Length dependence of phi | TEXT: H|wphi Width dependence of phi | TEXT: H|k1 Bulk effect coefficient 1 | TEXT: H|lk1 Length dependence of k1 | TEXT: H|-----------------------------------------------------------+ TEXT: H|wk1 Width dependence of k1 | TEXT: H|k2 Bulk effect coefficient 2 | TEXT: H|lk2 Length dependence of k2 | TEXT: H|wk2 Width dependence of k2 | TEXT: H ------------------------------------------------------------ TEXT: H|eta0 VDS dependence of threshold voltage at VDD=0 TEXT: H|leta0 Length dependence of eta0 | TEXT: H|weta0 Width dependence of eta0 | TEXT: H|etab VBS dependence of eta | TEXT: H|-----------------------------------------------------------+ TEXT: H|letab Length dependence of etab | TEXT: H|wetab Width dependence of etab | TEXT: H|dl Channel length reduction in um | TEXT: H|dw Channel width reduction in um | TEXT: H ------------------------------------------------------------ TEXT: H|mu0 Low-field mobility, at VDS=0 VGS=VTH | TEXT: H|mu0b VBS dependence of low-field mobility | TEXT: H|lmu0b Length dependence of mu0b | TEXT: H|wmu0b Width dependence of mu0b | TEXT: H|-----------------------------------------------------------+ TEXT: H|mus0 Mobility at VDS=VDD VGS=VTH | TEXT: H|lmus0 Length dependence of mus0 | TEXT: H|wmus0 Width dependence of mus | TEXT: H|musb VBS dependence of mus | TEXT: H ------------------------------------------------------------ TEXT: H|lmusb Length dependence of musb | TEXT: H|wmusb Width dependence of musb | TEXT: H|mu20 VDS dependence of mu in tanh term | TEXT: H|lmu20 Length dependence of mu20 | TEXT: H|-----------------------------------------------------------+ TEXT: H|wmu20 Width dependence of mu20 | TEXT: H|mu2b VBS dependence of mu2 | TEXT: H|lmu2b Length dependence of mu2b | TEXT: H|wmu2b Width dependence of mu2b | TEXT: H ------------------------------------------------------------ TEXT: H|mu2g VGS dependence of mu2 | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| BSIM2 - model input-output parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| lmu2g Length dependence of mu2g | TEXT: H| wmu2g Width dependence of mu2g | TEXT: H| mu30 VDS dependence of mu in linear term | TEXT: H| lmu30 Length dependence of mu30 | TEXT: H ------------------------------------------------------------ TEXT: H| wmu30 Width dependence of mu30 | TEXT: H| mu3b VBS dependence of mu3 | TEXT: H| lmu3b Length dependence of mu3b | TEXT: H| wmu3b Width dependence of mu3b | TEXT: H|-----------------------------------------------------------+ TEXT: H| mu3g VGS dependence of mu3 | TEXT: H| lmu3g Length dependence of mu3g | TEXT: H| wmu3g Width dependence of mu3g | TEXT: H| mu40 VDS dependence of mu in linear term | TEXT: H ------------------------------------------------------------ TEXT: H| lmu40 Length dependence of mu40 | TEXT: H| wmu40 Width dependence of mu40 | TEXT: H| mu4b VBS dependence of mu4 | TEXT: H| lmu4b Length dependence of mu4b | TEXT: H|-----------------------------------------------------------+ TEXT: H| wmu4b Width dependence of mu4b | TEXT: H| mu4g VGS dependence of mu4 | TEXT: H| lmu4g Length dependence of mu4g | TEXT: H| wmu4g Width dependence of mu4g | TEXT: H ------------------------------------------------------------ TEXT: H| ua0 Linear VGS dependence of mobility | TEXT: H| lua0 Length dependence of ua0 | TEXT: H| wua0 Width dependence of ua0 | TEXT: H| uab VBS dependence of ua | TEXT: H|-----------------------------------------------------------+ TEXT: H| luab Length dependence of uab | TEXT: H| wuab Width dependence of uab | TEXT: H| ub0 Quadratic VGS dependence of mobility | TEXT: H| lub0 Length dependence of ub0 | TEXT: H ------------------------------------------------------------ TEXT: H| wub0 Width dependence of ub0 | TEXT: H| ubb VBS dependence of ub | TEXT: H| lubb Length dependence of ubb | TEXT: H| wubb Width dependence of ubb | TEXT: H|-----------------------------------------------------------+ TEXT: H| u10 VDS depence of mobility | TEXT: H| lu10 Length dependence of u10 | TEXT: H wu10 Width dependence of u10 TEXT: H| u1b VBS depence of u1 | TEXT: H ------------------------------------------------------------ TEXT: H| lu1b Length depence of u1b | TEXT: H| wu1b Width depence of u1b | TEXT: H| u1d VDS depence of u1 | TEXT: H| lu1d Length depence of u1d | TEXT: H|-----------------------------------------------------------+ TEXT: H| wu1d Width depence of u1d | TEXT: H| n0 Subthreshold slope at VDS=0 VBS=0 | TEXT: H| ln0 Length dependence of n0 | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------------------ TEXT: H| BSIM2 - model input-output parameters - _c_o_n_t_i_n_u_e_d | TEXT: H|-----------------------------------------------------------------------+ TEXT: H|wn0 Width dependence of n0 | TEXT: H|nb VBS dependence of n | TEXT: H|lnb Length dependence of nb | TEXT: H|wnb Width dependence of nb | TEXT: H ------------------------------------------------------------------------ TEXT: H|nd VDS dependence of n | TEXT: H|lnd Length dependence of nd | TEXT: H|wnd Width dependence of nd | TEXT: H|vof0 Threshold voltage offset AT VDS=0 VBS=0 | TEXT: H|-----------------------------------------------------------------------+ TEXT: H|lvof0 Length dependence of vof0 | TEXT: H|wvof0 Width dependence of vof0 | TEXT: H|vofb VBS dependence of vof | TEXT: H|lvofb Length dependence of vofb | TEXT: H ------------------------------------------------------------------------ TEXT: H|wvofb Width dependence of vofb | TEXT: H|vofd VDS dependence of vof | TEXT: H|lvofd Length dependence of vofd | TEXT: H|wvofd Width dependence of vofd | TEXT: H|-----------------------------------------------------------------------+ TEXT: H|ai0 Pre-factor of hot-electron effect. | TEXT: H|lai0 Length dependence of ai0 | TEXT: H|wai0 Width dependence of ai0 | TEXT: H|aib VBS dependence of ai | TEXT: H ------------------------------------------------------------------------ TEXT: H|laib Length dependence of aib | TEXT: H|waib Width dependence of aib | TEXT: H|bi0 Exponential factor of hot-electron effect. | TEXT: H|lbi0 Length dependence of bi0 | TEXT: H|-----------------------------------------------------------------------+ TEXT: H|wbi0 Width dependence of bi0 | TEXT: H|bib VBS dependence of bi | TEXT: H|lbib Length dependence of bib | TEXT: H|wbib Width dependence of bib | TEXT: H ------------------------------------------------------------------------ TEXT: H|vghigh Upper bound of the cubic spline function. | TEXT: H|lvghigh Length dependence of vghigh | TEXT: H|wvghigh Width dependence of vghigh | TEXT: H|vglow Lower bound of the cubic spline function. | TEXT: H|-----------------------------------------------------------------------+ TEXT: H|lvglow Length dependence of vglow | TEXT: H|wvglow Width dependence of vglow | TEXT: H|tox Gate oxide thickness in um | TEXT: H|temp Temperature in degree Celcius | TEXT: H ------------------------------------------------------------------------ TEXT: H|vdd Maximum Vds | TEXT: H|vgg Maximum Vgs | TEXT: H|vbb Maximum Vbs | TEXT: H|cgso Gate source overlap capacitance per unit channel width(m) TEXT: H|-----------------------------------------------------------------------+ TEXT: H|cgdo Gate drain overlap capacitance per unit channel width(m)| TEXT: H|cgbo Gate bulk overlap capacitance per unit channel length(m)| TEXT: H|xpart Flag for channel charge partitioning | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------------------ TEXT: H TEXT: H TEXT: H --------------------------------------------------------------------------- TEXT: H| BSIM2 - model input-output parameters - _c_o_n_t_i_n_u_e_d | TEXT: H|--------------------------------------------------------------------------+ TEXT: H|rsh Source drain diffusion sheet resistance in ohm per square | TEXT: H|js Source drain junction saturation current per unit area | TEXT: H|pb Source drain junction built in potential | TEXT: H mj Source drain bottom junction capacitance grading coefficient TEXT: H| | TEXT: H --------------------------------------------------------------------------- TEXT: H|pbsw Source drain side junction capacitance built in potential | TEXT: H|mjsw Source drain side junction capacitance grading coefficient | TEXT: H|cj Source drain bottom junction capacitance per unit area | TEXT: H|cjsw Source drain side junction capacitance per unit area | TEXT: H|wdf Default width of source drain diffusion in um | TEXT: H|dell Length reduction of source drain diffusion | TEXT: H --------------------------------------------------------------------------- TEXT: H SUBJECT: Capacitor TITLE: Capacitor: Fixed capacitor TEXT: H TEXT: H _B._6. _C_a_p_a_c_i_t_o_r: _F_i_x_e_d _c_a_p_a_c_i_t_o_r TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Capacitor - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| capacitance Device capacitance | TEXT: H| ic Initial capacitor voltage | TEXT: H| w Device width | TEXT: H| l Device length | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Capacitor - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| i Device current | TEXT: H| p Instantaneous device power | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Capacitor - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| c Capacitor model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Capacitor - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| cj Bottom Capacitance per area | TEXT: H| cjsw Sidewall capacitance per meter | TEXT: H| defw Default width | TEXT: H| narrow width correction factor | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: CCCS TITLE: CCCS: Current controlled current source TEXT: H TEXT: H _B._7. _C_C_C_S: _C_u_r_r_e_n_t _c_o_n_t_r_o_l_l_e_d _c_u_r_r_e_n_t _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CCCS - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gain Gain of source | TEXT: H| control Name of controlling source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CCCS - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| neg_node Negative node of source | TEXT: H| pos_node Positive node of source | TEXT: H| i CCCS output current | TEXT: H| v CCCS voltage at output | TEXT: H| p CCCS power | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: CCVS TITLE: CCVS: Linear current controlled current source TEXT: H TEXT: H _B._8. _C_C_V_S: _L_i_n_e_a_r _c_u_r_r_e_n_t _c_o_n_t_r_o_l_l_e_d _c_u_r_r_e_n_t _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CCVS - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gain Transresistance (gain) | TEXT: H| control Controlling voltage source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CCVS - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of source | TEXT: H| neg_node Negative node of source | TEXT: H| i CCVS output current | TEXT: H| v CCVS output voltage | TEXT: H| p CCVS power | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: CSwitch TITLE: CSwitch: Current controlled ideal switch TEXT: H TEXT: H _B._9. _C_S_w_i_t_c_h: _C_u_r_r_e_n_t _c_o_n_t_r_o_l_l_e_d _i_d_e_a_l _s_w_i_t_c_h TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CSwitch - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| on Initially closed | TEXT: H| off Initially open | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CSwitch - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| control Name of controlling source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CSwitch - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of switch | TEXT: H| neg_node Negative node of switch | TEXT: H| i Switch current | TEXT: H| p Instantaneous power | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CSwitch - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| csw Current controlled switch model | TEXT: H| it Threshold current | TEXT: H| ih Hysterisis current | TEXT: H| ron Closed resistance | TEXT: H| roff Open resistance | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| CSwitch - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gon Closed conductance | TEXT: H| goff Open conductance | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Diode TITLE: Diode: Junction Diode model TEXT: H TEXT: H _B._1_0. _D_i_o_d_e: _J_u_n_c_t_i_o_n _D_i_o_d_e _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Diode - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Initially off | TEXT: H| temp Instance temperature | TEXT: H| ic Initial device voltage | TEXT: H| area Area factor | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Diode - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vd Diode voltage | TEXT: H| id Diode current | TEXT: H| c Diode current | TEXT: H| gd Diode conductance | TEXT: H ------------------------------------------------------------ TEXT: H| cd Diode capacitance | TEXT: H| charge Diode capacitor charge | TEXT: H| capcur Diode capacitor current | TEXT: H| p Diode power | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Diode - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| d Diode model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Diode - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| is Saturation current | TEXT: H| tnom Parameter measurement temperature | TEXT: H| rs Ohmic resistance | TEXT: H| n Emission Coefficient | TEXT: H ------------------------------------------------------------ TEXT: H| tt Transit Time | TEXT: H| cjo Junction capacitance | TEXT: H| cj0 (null) | TEXT: H| vj Junction potential | TEXT: H|-----------------------------------------------------------+ TEXT: H| m Grading coefficient | TEXT: H| eg Activation energy | TEXT: H| xti Saturation current temperature exp. | TEXT: H| kf flicker noise coefficient | TEXT: H ------------------------------------------------------------ TEXT: H| af flicker noise exponent | TEXT: H| fc Forward bias junction fit parameter | TEXT: H| bv Reverse breakdown voltage | TEXT: H| ibv Current at reverse breakdown voltage | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Diode - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| cond Ohmic conductance | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Inductor TITLE: Inductor: Inductors TEXT: H TEXT: H _B._1_1. _I_n_d_u_c_t_o_r: _I_n_d_u_c_t_o_r_s TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Inductor - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| inductance Inductance of inductor | TEXT: H| ic Initial current through inductor | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------- TEXT: H| Inductor - instance parameters (output-only) | TEXT: H|------------------------------------------------------------+ TEXT: H|flux Flux through inductor | TEXT: H|v Terminal voltage of inductor | TEXT: H|volt | TEXT: H|i Current through the inductor | TEXT: H|current | TEXT: H p instantaneous power dissipated by the inductor TEXT: H| | TEXT: H ------------------------------------------------------------- TEXT: H SUBJECT: mutual TITLE: mutual: Mutual inductors TEXT: H TEXT: H _B._1_2. _m_u_t_u_a_l: _M_u_t_u_a_l _i_n_d_u_c_t_o_r_s TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| mutual - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| k Mutual inductance | TEXT: H| coefficient (null) | TEXT: H| inductor1 First coupled inductor | TEXT: H| inductor2 Second coupled inductor | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Isource TITLE: Isource: Independent current source TEXT: H TEXT: H _B._1_3. _I_s_o_u_r_c_e: _I_n_d_e_p_e_n_d_e_n_t _c_u_r_r_e_n_t _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Isource - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pulse Pulse description | TEXT: H| sine Sinusoidal source description | TEXT: H| sin Sinusoidal source description | TEXT: H| exp Exponential source description | TEXT: H ------------------------------------------------------------ TEXT: H| pwl Piecewise linear description | TEXT: H| sffm single freq. FM description | TEXT: H| ac AC magnitude,phase vector | TEXT: H| c Current through current source | TEXT: H| distof1 f1 input for distortion | TEXT: H| distof2 f2 input for distortion | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Isource - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| dc DC value of source | TEXT: H| acmag AC magnitude | TEXT: H| acphase AC phase | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Isource - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| neg_node Negative node of source | TEXT: H| pos_node Positive node of source | TEXT: H acreal AC real part TEXT: H| acimag AC imaginary part | TEXT: H ------------------------------------------------------------ TEXT: H| function Function of the source | TEXT: H| order Order of the source function | TEXT: H| coeffs Coefficients of the source | TEXT: H| v Voltage across the supply | TEXT: H| p Power supplied by the source | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: JFET TITLE: JFET: Junction Field effect transistor TEXT: H TEXT: H _B._1_4. _J_F_E_T: _J_u_n_c_t_i_o_n _F_i_e_l_d _e_f_f_e_c_t _t_r_a_n_s_i_s_t_o_r TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| JFET - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H| ic Initial VDS,VGS vector | TEXT: H| area Area factor | TEXT: H| ic-vds Initial D-S voltage | TEXT: H| ic-vgs Initial G-S volrage | TEXT: H| temp Instance temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H --------------------------------------------------------------- TEXT: H| JFET - instance parameters (output-only) | TEXT: H|--------------------------------------------------------------+ TEXT: H|drain-node Number of drain node | TEXT: H|gate-node Number of gate node | TEXT: H|source-node Number of source node | TEXT: H|drain-prime-node Internal drain node | TEXT: H --------------------------------------------------------------- TEXT: H|source-prime-nodeInternal source node | TEXT: H|vgs Voltage G-S | TEXT: H|vgd Voltage G-D | TEXT: H|ig Current at gate node | TEXT: H|--------------------------------------------------------------+ TEXT: H|id Current at drain node | TEXT: H|is Source current | TEXT: H|igd Current G-D | TEXT: H|gm Transconductance | TEXT: H --------------------------------------------------------------- TEXT: H|gds Conductance D-S | TEXT: H|ggs Conductance G-S | TEXT: H|ggd Conductance G-D | TEXT: H|qgs Charge storage G-S junction | TEXT: H|--------------------------------------------------------------+ TEXT: H|qgd Charge storage G-D junction | TEXT: H cqgs Capacitance due to charge storage G-S junction TEXT: H| | TEXT: H cqgd Capacitance due to charge storage G-D junction TEXT: H|p Power dissipated by the JFET | TEXT: H --------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| JFET - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| njf N type JFET model | TEXT: H| pjf P type JFET model | TEXT: H| vt0 Threshold voltage | TEXT: H| vto (null) | TEXT: H ------------------------------------------------------------ TEXT: H| beta Transconductance parameter | TEXT: H| lambda Channel length modulation param. | TEXT: H| rd Drain ohmic resistance | TEXT: H| rs Source ohmic resistance | TEXT: H| cgs G-S junction capactance | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| JFET - model input-output parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| cgd G-D junction cap | TEXT: H| pb Gate junction potential | TEXT: H| is Gate junction saturation current | TEXT: H| fc Forward bias junction fit parm. | TEXT: H ------------------------------------------------------------ TEXT: H| b Doping tail parameter | TEXT: H| tnom parameter measurement temperature | TEXT: H| kf Flicker Noise Coefficient | TEXT: H| af Flicker Noise Exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| JFET - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-type or P-type JFET model | TEXT: H| gd Drain conductance | TEXT: H| gs Source conductance | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: LTRA TITLE: LTRA: Lossy transmission line TEXT: H TEXT: H _B._1_5. _L_T_R_A: _L_o_s_s_y _t_r_a_n_s_m_i_s_s_i_o_n _l_i_n_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| LTRA - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Initial condition vector:v1,i1,v2,i2 | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| LTRA - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| v1 Initial voltage at end 1 | TEXT: H| v2 Initial voltage at end 2 | TEXT: H| i1 Initial current at end 1 | TEXT: H| i2 Initial current at end 2 | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| LTRA - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node1 Positive node of end 1 of t-line | TEXT: H| neg_node1 Negative node of end 1 of t.line | TEXT: H| pos_node2 Positive node of end 2 of t-line | TEXT: H| neg_node2 Negative node of end 2 of t-line | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| LTRA - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H|ltra LTRA model | TEXT: H|r Resistance per metre | TEXT: H|l Inductance per metre | TEXT: H|g (null) | TEXT: H ------------------------------------------------------------ TEXT: H|c Capacitance per metre | TEXT: H|len length of line | TEXT: H|nocontrol No timestep control | TEXT: H|steplimit always limit timestep to 0.8*(delay of line) TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H ----------------------------------------------------------------------------------- TEXT: H| LTRA - model input-output parameters - _c_o_n_t_i_n_u_e_d | TEXT: H|----------------------------------------------------------------------------------+ TEXT: H|nosteplimit don't always limit timestep to 0.8*(delay of line) | TEXT: H|lininterp use linear interpolation | TEXT: H|quadinterp use quadratic interpolation | TEXT: H|mixedinterp use linear interpolation if quadratic results look unacceptable | TEXT: H ----------------------------------------------------------------------------------- TEXT: H|truncnr use N-R iterations for step calculation in LTRAtrunc | TEXT: H|truncdontcut don't limit timestep to keep impulse response calculation errors low TEXT: H|compactrel special reltol for straight line checking | TEXT: H|compactabs special abstol for straight line checking | TEXT: H ----------------------------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| LTRA - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| rel Rel. rate of change of deriv. for bkpt | TEXT: H| abs Abs. rate of change of deriv. for bkpt | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: MES TITLE: MES: GaAs MESFET model TEXT: H TEXT: H _B._1_6. _M_E_S: _G_a_A_s _M_E_S_F_E_T _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| area Area factor | TEXT: H| icvds Initial D-S voltage | TEXT: H| icvgs Initial G-S voltage | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H|off Device initially off | TEXT: H|dnode Number of drain node | TEXT: H|gnode Number of gate node | TEXT: H|snode Number of source node | TEXT: H ------------------------------------------------------------ TEXT: H|dprimenode Number of internal drain node | TEXT: H|sprimenode Number of internal source node | TEXT: H|vgs Gate-Source voltage | TEXT: H|vgd Gate-Drain voltage | TEXT: H|-----------------------------------------------------------+ TEXT: H|cg Gate capacitance | TEXT: H|cd Drain capacitance | TEXT: H|cgd Gate-Drain capacitance | TEXT: H|gm Transconductance | TEXT: H ------------------------------------------------------------ TEXT: H|gds Drain-Source conductance | TEXT: H|ggs Gate-Source conductance | TEXT: H|ggd Gate-Drain conductance | TEXT: H|cqgs Capacitance due to gate-source charge storage TEXT: H|-----------------------------------------------------------+ TEXT: H|cqgd Capacitance due to gate-drain charge storage| TEXT: H|qgs Gate-Source charge storage | TEXT: H|qgd Gate-Drain charge storage | TEXT: H|is Source current | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| p Power dissipated by the mesfet | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmf N type MESfet model | TEXT: H| pmf P type MESfet model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vt0 Pinch-off voltage | TEXT: H| vto (null) | TEXT: H| alpha Saturation voltage parameter | TEXT: H| beta Transconductance parameter | TEXT: H ------------------------------------------------------------ TEXT: H| lambda Channel length modulation parm. | TEXT: H| b Doping tail extending parameter | TEXT: H| rd Drain ohmic resistance | TEXT: H| rs Source ohmic resistance | TEXT: H|-----------------------------------------------------------+ TEXT: H| cgs G-S junction capacitance | TEXT: H| cgd G-D junction capacitance | TEXT: H| pb Gate junction potential | TEXT: H| is Junction saturation current | TEXT: H ------------------------------------------------------------ TEXT: H| fc Forward bias junction fit parm. | TEXT: H| kf Flicker noise coefficient | TEXT: H| af Flicker noise exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| MES - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-type or P-type MESfet model | TEXT: H| gd Drain conductance | TEXT: H| gs Source conductance | TEXT: H| depl_cap Depletion capacitance | TEXT: H| vcrit Critical voltage | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Mos1 TITLE: Mos1: Level 1 MOSfet model with Meyer capacitance model TEXT: H TEXT: H _B._1_7. _M_o_s_1: _L_e_v_e_l _1 _M_O_S_f_e_t _m_o_d_e_l _w_i_t_h _M_e_y_e_r _c_a_p_a_c_i_t_a_n_c_e TEXT: H _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H| ic Vector of D-S, G-S, B-S voltages | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Drain squares | TEXT: H| nrs Source squares | TEXT: H|-----------------------------------------------------------+ TEXT: H| icvds Initial D-S voltage | TEXT: H| icvgs Initial G-S voltage | TEXT: H| icvbs Initial B-S voltage | TEXT: H| temp Instance temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| id Drain current | TEXT: H| is Source current | TEXT: H| ig Gate current | TEXT: H| ib Bulk current | TEXT: H ------------------------------------------------------------ TEXT: H| ibd B-D junction current | TEXT: H| ibs B-S junction current | TEXT: H| vgs Gate-Source voltage | TEXT: H| vds Drain-Source voltage | TEXT: H|-----------------------------------------------------------+ TEXT: H| vbs Bulk-Source voltage | TEXT: H| vbd Bulk-Drain voltage | TEXT: H| dnode Number of the drain node | TEXT: H| gnode Number of the gate node | TEXT: H ------------------------------------------------------------ TEXT: H| snode Number of the source node | TEXT: H| bnode Number of the node | TEXT: H| dnodeprime Number of int. drain node | TEXT: H| snodeprime Number of int. source node | TEXT: H|-----------------------------------------------------------+ TEXT: H| von | TEXT: H| vdsat Saturation drain voltage | TEXT: H| sourcevcrit Critical source voltage | TEXT: H| drainvcrit Critical drain voltage | TEXT: H| rs Source resistance | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H -------------------------------------------------------------- TEXT: H| Mos1 - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-------------------------------------------------------------+ TEXT: H|sourceconductanceConductance of source | TEXT: H|rd Drain conductance | TEXT: H|drainconductance Conductance of drain | TEXT: H|gm Transconductance | TEXT: H -------------------------------------------------------------- TEXT: H|gds Drain-Source conductance | TEXT: H|gmb Bulk-Source transconductance | TEXT: H|gmbs | TEXT: H|gbd Bulk-Drain conductance | TEXT: H|-------------------------------------------------------------+ TEXT: H|gbs Bulk-Source conductance | TEXT: H|cbd Bulk-Drain capacitance | TEXT: H|cbs Bulk-Source capacitance | TEXT: H|cgs Gate-Source capacitance | TEXT: H -------------------------------------------------------------- TEXT: H|cgd Gate-Drain capacitance | TEXT: H|cgb Gate-Bulk capacitance | TEXT: H|cqgs Capacitance due to gate-source charge storage TEXT: H|cqgd Capacitance due to gate-drain charge storage| TEXT: H|-------------------------------------------------------------+ TEXT: H|cqgb Capacitance due to gate-bulk charge storage | TEXT: H|cqbd Capacitance due to bulk-drain charge storage| TEXT: H cqbs Capacitance due to bulk-source charge storage TEXT: H|cbd0 Zero-Bias B-D junction capacitance | TEXT: H -------------------------------------------------------------- TEXT: H|cbdsw0 | TEXT: H|cbs0 Zero-Bias B-S junction capacitance | TEXT: H|cbssw0 | TEXT: H|qgs Gate-Source charge storage | TEXT: H|-------------------------------------------------------------+ TEXT: H|qgd Gate-Drain charge storage | TEXT: H|qgb Gate-Bulk charge storage | TEXT: H|qbd Bulk-Drain charge storage | TEXT: H|qbs Bulk-Source charge storage | TEXT: H|p Instaneous power | TEXT: H -------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos N type MOSfet model | TEXT: H| pmos P type MOSfet model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vto Threshold voltage | TEXT: H| vt0 (null) | TEXT: H| kp Transconductance parameter | TEXT: H| gamma Bulk threshold parameter | TEXT: H ------------------------------------------------------------ TEXT: H| phi Surface potential | TEXT: H| lambda Channel length modulation | TEXT: H| rd Drain ohmic resistance | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - model input-output parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-----------------------------------------------------------+ TEXT: H| rs Source ohmic resistance | TEXT: H| cbd B-D junction capacitance | TEXT: H| cbs B-S junction capacitance | TEXT: H| is Bulk junction sat. current | TEXT: H ------------------------------------------------------------ TEXT: H| pb Bulk junction potential | TEXT: H| cgso Gate-source overlap cap. | TEXT: H| cgdo Gate-drain overlap cap. | TEXT: H| cgbo Gate-bulk overlap cap. | TEXT: H|-----------------------------------------------------------+ TEXT: H| rsh Sheet resistance | TEXT: H| cj Bottom junction cap per area | TEXT: H| mj Bottom grading coefficient | TEXT: H| cjsw Side junction cap per area | TEXT: H ------------------------------------------------------------ TEXT: H| mjsw Side grading coefficient | TEXT: H| js Bulk jct. sat. current density | TEXT: H| tox Oxide thickness | TEXT: H| ld Lateral diffusion | TEXT: H|-----------------------------------------------------------+ TEXT: H| u0 Surface mobility | TEXT: H| uo (null) | TEXT: H| fc Forward bias jct. fit parm. | TEXT: H| nsub Substrate doping | TEXT: H ------------------------------------------------------------ TEXT: H| tpg Gate type | TEXT: H| nss Surface state density | TEXT: H| tnom Parameter measurement temperature | TEXT: H| kf Flicker noise coefficient | TEXT: H| af Flicker noise exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos1 - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-channel or P-channel MOS | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Mos2 TITLE: Mos2: Level 2 MOSfet model with Meyer capacitance model TEXT: H TEXT: H _B._1_8. _M_o_s_2: _L_e_v_e_l _2 _M_O_S_f_e_t _m_o_d_e_l _w_i_t_h _M_e_y_e_r _c_a_p_a_c_i_t_a_n_c_e TEXT: H _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H| ic Vector of D-S, G-S, B-S voltages | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Drain squares | TEXT: H| nrs Source squares | TEXT: H|-----------------------------------------------------------+ TEXT: H| icvds Initial D-S voltage | TEXT: H| icvgs Initial G-S voltage | TEXT: H| icvbs Initial B-S voltage | TEXT: H| temp Instance operating temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| id Drain current | TEXT: H| cd | TEXT: H| ibd B-D junction current | TEXT: H| ibs B-S junction current | TEXT: H ------------------------------------------------------------ TEXT: H| is Source current | TEXT: H| ig Gate current | TEXT: H| ib Bulk current | TEXT: H| vgs Gate-Source voltage | TEXT: H|-----------------------------------------------------------+ TEXT: H| vds Drain-Source voltage | TEXT: H| vbs Bulk-Source voltage | TEXT: H| vbd Bulk-Drain voltage | TEXT: H| dnode Number of drain node | TEXT: H ------------------------------------------------------------ TEXT: H| gnode Number of gate node | TEXT: H| snode Number of source node | TEXT: H| bnode Number of bulk node | TEXT: H| dnodeprime Number of internal drain node | TEXT: H|-----------------------------------------------------------+ TEXT: H| snodeprime Number of internal source node | TEXT: H| von | TEXT: H| vdsat Saturation drain voltage | TEXT: H| sourcevcrit Critical source voltage | TEXT: H| drainvcrit Critical drain voltage | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H -------------------------------------------------------------- TEXT: H| Mos2 - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-------------------------------------------------------------+ TEXT: H|rs Source resistance | TEXT: H|sourceconductanceSource conductance | TEXT: H|rd Drain resistance | TEXT: H|drainconductance Drain conductance | TEXT: H -------------------------------------------------------------- TEXT: H|gm Transconductance | TEXT: H|gds Drain-Source conductance | TEXT: H|gmb Bulk-Source transconductance | TEXT: H|gmbs | TEXT: H|-------------------------------------------------------------+ TEXT: H|gbd Bulk-Drain conductance | TEXT: H|gbs Bulk-Source conductance | TEXT: H|cbd Bulk-Drain capacitance | TEXT: H|cbs Bulk-Source capacitance | TEXT: H -------------------------------------------------------------- TEXT: H|cgs Gate-Source capacitance | TEXT: H|cgd Gate-Drain capacitance | TEXT: H|cgb Gate-Bulk capacitance | TEXT: H|cbd0 Zero-Bias B-D junction capacitance | TEXT: H|-------------------------------------------------------------+ TEXT: H|cbdsw0 | TEXT: H|cbs0 Zero-Bias B-S junction capacitance | TEXT: H|cbssw0 | TEXT: H cqgs Capacitance due to gate-source charge storage TEXT: H| | TEXT: H -------------------------------------------------------------- TEXT: H|cqgd Capacitance due to gate-drain charge storage| TEXT: H|cqgb Capacitance due to gate-bulk charge storage | TEXT: H|cqbd Capacitance due to bulk-drain charge storage| TEXT: H|cqbs Capacitance due to bulk-source charge storage TEXT: H|-------------------------------------------------------------+ TEXT: H|qgs Gate-Source charge storage | TEXT: H|qgd Gate-Drain charge storage | TEXT: H|qgb Gate-Bulk charge storage | TEXT: H|qbd Bulk-Drain charge storage | TEXT: H|qbs Bulk-Source charge storage | TEXT: H|p Instantaneous power | TEXT: H -------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos N type MOSfet model | TEXT: H| pmos P type MOSfet model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vto Threshold voltage | TEXT: H| vt0 (null) | TEXT: H| kp Transconductance parameter | TEXT: H| gamma Bulk threshold parameter | TEXT: H ------------------------------------------------------------ TEXT: H| phi Surface potential | TEXT: H| lambda Channel length modulation | TEXT: H| rd Drain ohmic resistance | TEXT: H| rs Source ohmic resistance | TEXT: H|-----------------------------------------------------------+ TEXT: H| cbd B-D junction capacitance | TEXT: H| cbs B-S junction capacitance | TEXT: H| is Bulk junction sat. current | TEXT: H| pb Bulk junction potential | TEXT: H ------------------------------------------------------------ TEXT: H| cgso Gate-source overlap cap. | TEXT: H| cgdo Gate-drain overlap cap. | TEXT: H| cgbo Gate-bulk overlap cap. | TEXT: H| rsh Sheet resistance | TEXT: H|-----------------------------------------------------------+ TEXT: H| cj Bottom junction cap per area | TEXT: H| mj Bottom grading coefficient | TEXT: H| cjsw Side junction cap per area | TEXT: H| mjsw Side grading coefficient | TEXT: H ------------------------------------------------------------ TEXT: H| js Bulk jct. sat. current density | TEXT: H| tox Oxide thickness | TEXT: H| ld Lateral diffusion | TEXT: H| u0 Surface mobility | TEXT: H|-----------------------------------------------------------+ TEXT: H| uo (null) | TEXT: H| fc Forward bias jct. fit parm. | TEXT: H| nsub Substrate doping | TEXT: H| tpg Gate type | TEXT: H ------------------------------------------------------------ TEXT: H| nss Surface state density | TEXT: H| delta Width effect on threshold | TEXT: H| uexp Crit. field exp for mob. deg. | TEXT: H| ucrit Crit. field for mob. degradation | TEXT: H|-----------------------------------------------------------+ TEXT: H| vmax Maximum carrier drift velocity | TEXT: H| xj Junction depth | TEXT: H| neff Total channel charge coeff. | TEXT: H| nfs Fast surface state density | TEXT: H ------------------------------------------------------------ TEXT: H| tnom Parameter measurement temperature | TEXT: H| kf Flicker noise coefficient | TEXT: H| af Flicker noise exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos2 - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-channel or P-channel MOS | TEXT: H ------------------------------------------------------------ SUBJECT: Mos3 TITLE: Mos3: Level 3 MOSfet model with Meyer capacitance model TEXT: H TEXT: H _B._1_9. _M_o_s_3: _L_e_v_e_l _3 _M_O_S_f_e_t _m_o_d_e_l _w_i_t_h _M_e_y_e_r _c_a_p_a_c_i_t_a_n_c_e TEXT: H _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Drain squares | TEXT: H| nrs Source squares | TEXT: H|-----------------------------------------------------------+ TEXT: H| icvds Initial D-S voltage | TEXT: H| icvgs Initial G-S voltage | TEXT: H| icvbs Initial B-S voltage | TEXT: H| ic Vector of D-S, G-S, B-S voltages | TEXT: H| temp Instance operating temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| id Drain current | TEXT: H| cd Drain current | TEXT: H| ibd B-D junction current | TEXT: H| ibs B-S junction current | TEXT: H ------------------------------------------------------------ TEXT: H| is Source current | TEXT: H| ig Gate current | TEXT: H| ib Bulk current | TEXT: H| vgs Gate-Source voltage | TEXT: H|-----------------------------------------------------------+ TEXT: H| vds Drain-Source voltage | TEXT: H| vbs Bulk-Source voltage | TEXT: H| vbd Bulk-Drain voltage | TEXT: H| dnode Number of drain node | TEXT: H ------------------------------------------------------------ TEXT: H| gnode Number of gate node | TEXT: H| snode Number of source node | TEXT: H| bnode Number of bulk node | TEXT: H| dnodeprime Number of internal drain node | TEXT: H| snodeprime Number of internal source node | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H -------------------------------------------------------------- TEXT: H| Mos3 - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-------------------------------------------------------------+ TEXT: H|von Turn-on voltage | TEXT: H|vdsat Saturation drain voltage | TEXT: H|sourcevcrit Critical source voltage | TEXT: H|drainvcrit Critical drain voltage | TEXT: H -------------------------------------------------------------- TEXT: H|rs Source resistance | TEXT: H|sourceconductanceSource conductance | TEXT: H|rd Drain resistance | TEXT: H|drainconductance Drain conductance | TEXT: H|-------------------------------------------------------------+ TEXT: H|gm Transconductance | TEXT: H|gds Drain-Source conductance | TEXT: H|gmb Bulk-Source transconductance | TEXT: H|gmbs Bulk-Source transconductance | TEXT: H -------------------------------------------------------------- TEXT: H|gbd Bulk-Drain conductance | TEXT: H|gbs Bulk-Source conductance | TEXT: H|cbd Bulk-Drain capacitance | TEXT: H|cbs Bulk-Source capacitance | TEXT: H|-------------------------------------------------------------+ TEXT: H|cgs Gate-Source capacitance | TEXT: H|cgd Gate-Drain capacitance | TEXT: H|cgb Gate-Bulk capacitance | TEXT: H cqgs Capacitance due to gate-source charge storage TEXT: H| | TEXT: H -------------------------------------------------------------- TEXT: H|cqgd Capacitance due to gate-drain charge storage| TEXT: H|cqgb Capacitance due to gate-bulk charge storage | TEXT: H|cqbd Capacitance due to bulk-drain charge storage| TEXT: H|cqbs Capacitance due to bulk-source charge storage TEXT: H|-------------------------------------------------------------+ TEXT: H|cbd0 Zero-Bias B-D junction capacitance | TEXT: H|cbdsw0 Zero-Bias B-D sidewall capacitance | TEXT: H|cbs0 Zero-Bias B-S junction capacitance | TEXT: H|cbssw0 Zero-Bias B-S sidewall capacitance | TEXT: H -------------------------------------------------------------- TEXT: H|qbs Bulk-Source charge storage | TEXT: H|qgs Gate-Source charge storage | TEXT: H|qgd Gate-Drain charge storage | TEXT: H|qgb Gate-Bulk charge storage | TEXT: H|qbd Bulk-Drain charge storage | TEXT: H|p Instantaneous power | TEXT: H -------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos N type MOSfet model | TEXT: H| pmos P type MOSfet model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vto Threshold voltage | TEXT: H| vt0 (null) | TEXT: H| kp Transconductance parameter | TEXT: H| gamma Bulk threshold parameter | TEXT: H ------------------------------------------------------------ TEXT: H| phi Surface potential | TEXT: H| rd Drain ohmic resistance | TEXT: H| rs Source ohmic resistance | TEXT: H| cbd B-D junction capacitance | TEXT: H|-----------------------------------------------------------+ TEXT: H| cbs B-S junction capacitance | TEXT: H| is Bulk junction sat. current | TEXT: H| pb Bulk junction potential | TEXT: H| cgso Gate-source overlap cap. | TEXT: H ------------------------------------------------------------ TEXT: H| cgdo Gate-drain overlap cap. | TEXT: H| cgbo Gate-bulk overlap cap. | TEXT: H| rsh Sheet resistance | TEXT: H| cj Bottom junction cap per area | TEXT: H|-----------------------------------------------------------+ TEXT: H| mj Bottom grading coefficient | TEXT: H| cjsw Side junction cap per area | TEXT: H| mjsw Side grading coefficient | TEXT: H| js Bulk jct. sat. current density | TEXT: H ------------------------------------------------------------ TEXT: H| tox Oxide thickness | TEXT: H| ld Lateral diffusion | TEXT: H| u0 Surface mobility | TEXT: H| uo (null) | TEXT: H|-----------------------------------------------------------+ TEXT: H| fc Forward bias jct. fit parm. | TEXT: H| nsub Substrate doping | TEXT: H| tpg Gate type | TEXT: H| nss Surface state density | TEXT: H ------------------------------------------------------------ TEXT: H| vmax Maximum carrier drift velocity | TEXT: H| xj Junction depth | TEXT: H| nfs Fast surface state density | TEXT: H| xd Depletion layer width | TEXT: H|-----------------------------------------------------------+ TEXT: H| alpha Alpha | TEXT: H| eta Vds dependence of threshold voltage | TEXT: H| delta Width effect on threshold | TEXT: H| input_delta (null) | TEXT: H ------------------------------------------------------------ TEXT: H| theta Vgs dependence on mobility | TEXT: H| kappa Kappa | TEXT: H| tnom Parameter measurement temperature | TEXT: H| kf Flicker noise coefficient | TEXT: H| af Flicker noise exponent | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos3 - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-channel or P-channel MOS | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Mos6 TITLE: Mos6: Level 6 MOSfet model with Meyer capacitance model TEXT: H TEXT: H _B._2_0. _M_o_s_6: _L_e_v_e_l _6 _M_O_S_f_e_t _m_o_d_e_l _w_i_t_h _M_e_y_e_r _c_a_p_a_c_i_t_a_n_c_e TEXT: H _m_o_d_e_l TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| off Device initially off | TEXT: H| ic Vector of D-S, G-S, B-S voltages | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| l Length | TEXT: H| w Width | TEXT: H| ad Drain area | TEXT: H| as Source area | TEXT: H ------------------------------------------------------------ TEXT: H| pd Drain perimeter | TEXT: H| ps Source perimeter | TEXT: H| nrd Drain squares | TEXT: H| nrs Source squares | TEXT: H|-----------------------------------------------------------+ TEXT: H| icvds Initial D-S voltage | TEXT: H| icvgs Initial G-S voltage | TEXT: H| icvbs Initial B-S voltage | TEXT: H| temp Instance temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| id Drain current | TEXT: H| cd Drain current | TEXT: H| is Source current | TEXT: H| ig Gate current | TEXT: H ------------------------------------------------------------ TEXT: H| ib Bulk current | TEXT: H| ibs B-S junction capacitance | TEXT: H| ibd B-D junction capacitance | TEXT: H| vgs Gate-Source voltage | TEXT: H|-----------------------------------------------------------+ TEXT: H| vds Drain-Source voltage | TEXT: H| vbs Bulk-Source voltage | TEXT: H| vbd Bulk-Drain voltage | TEXT: H| dnode Number of the drain node | TEXT: H ------------------------------------------------------------ TEXT: H| gnode Number of the gate node | TEXT: H| snode Number of the source node | TEXT: H| bnode Number of the node | TEXT: H| dnodeprime Number of int. drain node | TEXT: H| snodeprime Number of int. source node | TEXT: H| _c_o_n_t_i_n_u_e_d | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H -------------------------------------------------------------- TEXT: H| Mos6 - instance output-only parameters - _c_o_n_t_i_n_u_e_d TEXT: H|-------------------------------------------------------------+ TEXT: H|rs Source resistance | TEXT: H|sourceconductanceSource conductance | TEXT: H|rd Drain resistance | TEXT: H|drainconductance Drain conductance | TEXT: H -------------------------------------------------------------- TEXT: H|von Turn-on voltage | TEXT: H|vdsat Saturation drain voltage | TEXT: H|sourcevcrit Critical source voltage | TEXT: H|drainvcrit Critical drain voltage | TEXT: H|-------------------------------------------------------------+ TEXT: H|gmbs Bulk-Source transconductance | TEXT: H|gm Transconductance | TEXT: H|gds Drain-Source conductance | TEXT: H|gbd Bulk-Drain conductance | TEXT: H -------------------------------------------------------------- TEXT: H|gbs Bulk-Source conductance | TEXT: H|cgs Gate-Source capacitance | TEXT: H|cgd Gate-Drain capacitance | TEXT: H|cgb Gate-Bulk capacitance | TEXT: H|-------------------------------------------------------------+ TEXT: H|cbd Bulk-Drain capacitance | TEXT: H|cbs Bulk-Source capacitance | TEXT: H|cbd0 Zero-Bias B-D junction capacitance | TEXT: H|cbdsw0 | TEXT: H -------------------------------------------------------------- TEXT: H|cbs0 Zero-Bias B-S junction capacitance | TEXT: H|cbssw0 | TEXT: H|cqgs Capacitance due to gate-source charge storage TEXT: H|cqgd Capacitance due to gate-drain charge storage| TEXT: H|-------------------------------------------------------------+ TEXT: H|cqgb Capacitance due to gate-bulk charge storage | TEXT: H|cqbd Capacitance due to bulk-drain charge storage| TEXT: H cqbs Capacitance due to bulk-source charge storage TEXT: H|qgs Gate-Source charge storage | TEXT: H -------------------------------------------------------------- TEXT: H|qgd Gate-Drain charge storage | TEXT: H|qgb Gate-Bulk charge storage | TEXT: H|qbd Bulk-Drain charge storage | TEXT: H|qbs Bulk-Source charge storage | TEXT: H|p Instaneous power | TEXT: H -------------------------------------------------------------- TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| nmos N type MOSfet model | TEXT: H| pmos P type MOSfet model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| vto Threshold voltage | TEXT: H| vt0 (null) | TEXT: H| kv Saturation voltage factor | TEXT: H| nv Saturation voltage coeff. | TEXT: H ------------------------------------------------------------ TEXT: H| kc Saturation current factor | TEXT: H| nc Saturation current coeff. | TEXT: H| nvth Threshold voltage coeff. | TEXT: H| ps Sat. current modification par. | TEXT: H|-----------------------------------------------------------+ TEXT: H| gamma Bulk threshold parameter | TEXT: H| gamma1 Bulk threshold parameter 1 | TEXT: H| sigma Static feedback effect par. | TEXT: H| phi Surface potential | TEXT: H ------------------------------------------------------------ TEXT: H| lambda Channel length modulation param. | TEXT: H| lambda0 Channel length modulation param. 0 | TEXT: H| lambda1 Channel length modulation param. 1 | TEXT: H| rd Drain ohmic resistance | TEXT: H|-----------------------------------------------------------+ TEXT: H| rs Source ohmic resistance | TEXT: H| cbd B-D junction capacitance | TEXT: H| cbs B-S junction capacitance | TEXT: H| is Bulk junction sat. current | TEXT: H ------------------------------------------------------------ TEXT: H| pb Bulk junction potential | TEXT: H| cgso Gate-source overlap cap. | TEXT: H| cgdo Gate-drain overlap cap. | TEXT: H| cgbo Gate-bulk overlap cap. | TEXT: H|-----------------------------------------------------------+ TEXT: H| rsh Sheet resistance | TEXT: H| cj Bottom junction cap per area | TEXT: H| mj Bottom grading coefficient | TEXT: H| cjsw Side junction cap per area | TEXT: H ------------------------------------------------------------ TEXT: H| mjsw Side grading coefficient | TEXT: H| js Bulk jct. sat. current density | TEXT: H| ld Lateral diffusion | TEXT: H| tox Oxide thickness | TEXT: H|-----------------------------------------------------------+ TEXT: H| u0 Surface mobility | TEXT: H| uo (null) | TEXT: H| fc Forward bias jct. fit parm. | TEXT: H| tpg Gate type | TEXT: H ------------------------------------------------------------ TEXT: H| nsub Substrate doping | TEXT: H| nss Surface state density | TEXT: H| tnom Parameter measurement temperature | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Mos6 - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| type N-channel or P-channel MOS | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Resistor TITLE: Resistor: Simple linear resistor TEXT: H TEXT: H _B._2_1. _R_e_s_i_s_t_o_r: _S_i_m_p_l_e _l_i_n_e_a_r _r_e_s_i_s_t_o_r TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Resistor - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| resistance Resistance | TEXT: H| temp Instance operating temperature | TEXT: H| l Length | TEXT: H| w Width | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Resistor - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| i Current | TEXT: H| p Power | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Resistor - model parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| r Device is a resistor model | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Resistor - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| rsh Sheet resistance | TEXT: H| narrow Narrowing of resistor | TEXT: H| tc1 First order temp. coefficient | TEXT: H| tc2 Second order temp. coefficient | TEXT: H| defw Default device width | TEXT: H| tnom Parameter measurement temperature | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Switch TITLE: Switch: Ideal voltage controlled switch TEXT: H TEXT: H _B._2_2. _S_w_i_t_c_h: _I_d_e_a_l _v_o_l_t_a_g_e _c_o_n_t_r_o_l_l_e_d _s_w_i_t_c_h TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Switch - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| on Switch initially closed | TEXT: H| off Switch initially open | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Switch - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of switch | TEXT: H| neg_node Negative node of switch | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Switch - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| cont_p_node Positive contr. node of switch | TEXT: H| cont_n_node Positive contr. node of switch | TEXT: H| i Switch current | TEXT: H| p Switch power | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Switch - model parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| sw Switch model | TEXT: H| vt Threshold voltage | TEXT: H| vh Hysteresis voltage | TEXT: H| ron Resistance when closed | TEXT: H| roff Resistance when open | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Switch - model parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gon Conductance when closed | TEXT: H| goff Conductance when open | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Tranline TITLE: Tranline: Lossless transmission line TEXT: H TEXT: H _B._2_3. _T_r_a_n_l_i_n_e: _L_o_s_s_l_e_s_s _t_r_a_n_s_m_i_s_s_i_o_n _l_i_n_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Tranline - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Initial condition vector:v1,i1,v2,i2 | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Tranline - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| z0 Characteristic impedance | TEXT: H| zo (null) | TEXT: H| f Frequency | TEXT: H| td Transmission delay | TEXT: H ------------------------------------------------------------ TEXT: H| nl Normalized length at frequency given | TEXT: H| v1 Initial voltage at end 1 | TEXT: H| v2 Initial voltage at end 2 | TEXT: H| i1 Initial current at end 1 | TEXT: H| i2 Initial current at end 2 | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Tranline - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| rel Rel. rate of change of deriv. for bkpt | TEXT: H| abs Abs. rate of change of deriv. for bkpt | TEXT: H| pos_node1 Positive node of end 1 of t. line | TEXT: H| neg_node1 Negative node of end 1 of t. line | TEXT: H ------------------------------------------------------------ TEXT: H| pos_node2 Positive node of end 2 of t. line | TEXT: H| neg_node2 Negative node of end 2 of t. line | TEXT: H| delays Delayed values of excitation | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: VCCS TITLE: VCCS: Voltage controlled current source TEXT: H TEXT: H _B._2_4. _V_C_C_S: _V_o_l_t_a_g_e _c_o_n_t_r_o_l_l_e_d _c_u_r_r_e_n_t _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCCS - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Initial condition of controlling source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCCS - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gain Transconductance of source (gain) | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCCS - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of source | TEXT: H| neg_node Negative node of source | TEXT: H| cont_p_node Positive node of contr. source | TEXT: H| cont_n_node Negative node of contr. source | TEXT: H ------------------------------------------------------------ TEXT: H| i Output current | TEXT: H| v Voltage across output | TEXT: H| p Power | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: VCVS TITLE: VCVS: Voltage controlled voltage source TEXT: H TEXT: H _B._2_5. _V_C_V_S: _V_o_l_t_a_g_e _c_o_n_t_r_o_l_l_e_d _v_o_l_t_a_g_e _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCVS - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| ic Initial condition of controlling source | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCVS - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| gain Voltage gain | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| VCVS - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of source | TEXT: H| neg_node Negative node of source | TEXT: H| cont_p_node Positive node of contr. source | TEXT: H cont_n_node Negative node of contr. source TEXT: H ------------------------------------------------------------ TEXT: H| i Output current | TEXT: H| v Output voltage | TEXT: H| p Power | TEXT: H ------------------------------------------------------------ TEXT: H SUBJECT: Vsource TITLE: Vsource: Independent voltage source TEXT: H TEXT: H _B._2_6. _V_s_o_u_r_c_e: _I_n_d_e_p_e_n_d_e_n_t _v_o_l_t_a_g_e _s_o_u_r_c_e TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Vsource - instance parameters (input-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pulse Pulse description | TEXT: H| sine Sinusoidal source description | TEXT: H| sin Sinusoidal source description | TEXT: H| exp Exponential source description | TEXT: H ------------------------------------------------------------ TEXT: H| pwl Piecewise linear description | TEXT: H| sffm Single freq. FM descripton | TEXT: H| ac AC magnitude, phase vector | TEXT: H| distof1 f1 input for distortion | TEXT: H| distof2 f2 input for distortion | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Vsource - instance parameters (input-output) | TEXT: H|-----------------------------------------------------------+ TEXT: H| dc D.C. source value | TEXT: H| acmag A.C. Magnitude | TEXT: H| acphase A.C. Phase | TEXT: H ------------------------------------------------------------ TEXT: H TEXT: H TEXT: H ------------------------------------------------------------ TEXT: H| Vsource - instance parameters (output-only) | TEXT: H|-----------------------------------------------------------+ TEXT: H| pos_node Positive node of source | TEXT: H| neg_node Negative node of source | TEXT: H| function Function of the source | TEXT: H| order Order of the source function | TEXT: H ------------------------------------------------------------ TEXT: H| coeffs Coefficients for the function | TEXT: H| acreal AC real part | TEXT: H| acimag AC imaginary part | TEXT: H| i Voltage source current | TEXT: H| p Instantaneous power | TEXT: H ------------------------------------------------------------ ngspice-26/src/devaxis0000644000265600020320000000237612264261473014416 0ustar andreasadmin* initialize a device plot .control begin unset axis if $argc = 1 set axis = $argv[1] strcmp flag $axis "x" if ($flag = 0) echo "setting axis to x" strcmp flag "$?&devaxis" "0" if ($flag = 0) strcmp flag "$?&xaxis" "0" if ($flag = 0) echo "Error: no x axis present" else transpose all setscale xaxis let devaxis = 1 end else strcmp flag "$&devaxis" "-1" if ($flag = 0) strcmp flag "$?&xaxis" "0" if ($flag = 0) echo "Error: no x axis present" else transpose all setscale xaxis let devaxis = 1 end end end else strcmp flag $axis "y" if ($flag = 0) echo "setting axis to y" strcmp flag "$?&devaxis" "0" if ($flag = 0) strcmp flag "$?&yaxis" "0" if ($flag = 0) echo "Error: no y axis present" else setscale yaxis let devaxis = -1 end else strcmp flag "$&devaxis" "1" if ($flag = 0) strcmp flag "$?&yaxis" "0" if ($flag = 0) echo "Error: no y axis present" else transpose all setscale yaxis let devaxis = -1 end end end else echo "Error: unknown axis" $axis echo "usage: devaxis " end end else echo "usage: devaxis " end unset axis flag end ngspice-26/configure.ac0000644000265600020320000012331012264261473014517 0ustar andreasadmin# configure.ac script for ngspice # # This file is part of ngspice. # # (Process this file with autoconf to produce a configure script.) # # This configure file has been updated to mostly follow the guidence in the # GNU Autoconf manual for version 2.59 # Initialisation # --------------- # Initialisation of configure AC_INIT([ngspice], [26], [http://ngspice.sourceforge.net/bugrep.html]) # Unique file in the source directory AC_CONFIG_SRCDIR([src/ngspice.c]) # Ensure a recent version of Autoconf is in use # Older versions may not work with this script and this will report the # problem to the user. (2.52 is a guess and might need some adjustment) AC_PREREQ([2.59]) # Revison stamp the generated ./configure script AC_REVISION([$Revision$]) # Create a configuration header AC_CONFIG_HEADER([src/include/ngspice/config.h]) # Initialise automake stuff AM_INIT_AUTOMAKE([-Wall -Werror nostdinc]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) m4_ifdef([AM_PROG_AR], [AM_PROG_AR]) AC_SUBST([AM_CPPFLAGS], ['-I. -I$(srcdir) -I$(top_builddir)/src/include']) AC_CONFIG_MACRO_DIR([m4]) # Package Options # --------------- # --enable-ansi: try to force --ansi option to the compiler AC_ARG_ENABLE([ansi], [AS_HELP_STRING([--enable-ansi], [Force --ansi option for compilation])]) # --disable-debug: remove -g and -Wall option to the compiler AC_ARG_ENABLE([debug], [AS_HELP_STRING([--disable-debug], [Add -g option for compilation (default)])]) # --enable-gprof: add -pg option to the compiler (GCC) AC_ARG_ENABLE([gprof], [AS_HELP_STRING([--enable-gprof], [Produce gprof profiling data in 'gmon.out' (GCC only).])]) # --enable-checker: add --with-checker-debug option to the compiler AC_ARG_ENABLE([checker], [AS_HELP_STRING([--enable-checkergcc], [Option for compilation with checkergcc])]) # --enable-gc: Enable Boehm-Weiser Conservative Garbage Collector AC_ARG_ENABLE([checker], [AS_HELP_STRING([--enable-gc], [Use Boehm-Weiser Conservative Garbage Collector. Disabled by default.])]) # --enable-nobypass: define NOBYPASS for the code AC_ARG_ENABLE([nobypass], [AS_HELP_STRING([--enable-nobypass], [Don't bypass recalculations of slowly changing variables])]) # --enable-capbypass: define CAPBYPASS for the code AC_ARG_ENABLE([capbypass], [AS_HELP_STRING([--enable-capbypass], [Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd voltages are unchanged])]) # --enable-nodelimiting: define NODELIMITING for the code AC_ARG_ENABLE([nodelimiting], [AS_HELP_STRING([--enable-nodelimiting], [Experimental damping scheme.])]) # --enable-predictor: define PREDICTOR for the code AC_ARG_ENABLE([predictor], [AS_HELP_STRING([--enable-predictor], [Enable a predictor method for convergence.])]) # --enable-newpred: define NEWPRED for the code AC_ARG_ENABLE([newpred], [AS_HELP_STRING([--enable-newpred], [Enable NEWPRED whatever it is(?)])]) # --enable-newtrunc: define NEWTRUNC for the code AC_ARG_ENABLE([newtrunc], [AS_HELP_STRING([--enable-newtrunc], [Enable, how we want extrapolate capacitances.])]) # --enable-sense2: define WANT_SENSE2 for the code AC_ARG_ENABLE([sense2], [AS_HELP_STRING([--enable-sense2], [Use spice2 sensitivity analysis.])]) # --enable-ftedebug: enable frontend debug macros AC_ARG_ENABLE([ftedebug], [AS_HELP_STRING([--enable-ftedebug], [Enable ngspice frontend debug])]) # --enable-cpdebug: enable frontend debug macros AC_ARG_ENABLE([cpdebug], [AS_HELP_STRING([--enable-cpdebug], [Enable ngspice shell debug])]) # --enable-sensdebug: define SENSDEBUG for the code AC_ARG_ENABLE([sensdebug], [AS_HELP_STRING([--enable-sensdebug], [Debug sensitivity code *SENSDEBUG*])]) # --enable-asdebug: define ASDEBUG for the code AC_ARG_ENABLE([asdebug], [AS_HELP_STRING([--enable-asdebug], [Debug sensitivity code *ASDEBUG*])]) # --enable-stepdebug: define STEPDEBUG for the code AC_ARG_ENABLE([stepdebug], [AS_HELP_STRING([--enable-stepdebug], [Unknown debug option])]) # --enable-pzdebug: define PZDEBUG for the code AC_ARG_ENABLE([pzdebug], [AS_HELP_STRING([--enable-pzdebug], [Debug pole/zero code])]) # --enable-blktmsdebug: define D_DBG_BLOCKTIMES for the code AC_ARG_ENABLE([blktmsdebug], [AS_HELP_STRING([--enable-blktmsdebug], [Debug distortion code *BLOCKTIMES*])]) # --enable-smltmsdebug: define D_DBG_SMALLTIMES for the code AC_ARG_ENABLE([smltmsdebug], [AS_HELP_STRING([--enable-smltmsdebug], [Debug distortion code *SMALLTIMES*])]) # --enable-smoketest: a smoketest AC_ARG_ENABLE([smoketest], [AS_HELP_STRING([--enable-smoketest], [Enable smoketest compile])]) # --enable-experimental: define EXPERIMENTAL_CODE for the code AC_ARG_ENABLE([experimental], [AS_HELP_STRING([--enable-experimental], [Enable some experimental code])]) # --enable-expdevices: Enable the compilation of experimental devices AC_ARG_ENABLE([expdevices], [AS_HELP_STRING([--enable-expdevices], [Enable experimental devices (they do not compile)])]) # --enable-xspice: define XSPICE in the code. This is for xspice support AC_ARG_ENABLE([xspice], [AS_HELP_STRING([--enable-xspice], [Enable XSpice enhancements, (experimental)])]) # --enable-cider: define CIDER in the code. This is for CIDER support AC_ARG_ENABLE([cider], [AS_HELP_STRING([--enable-cider], [Enable CIDER enhancements, (experimental)])]) # --enable-adms: define ADMS in the code. This is for the adms Verilog-A compiler support AC_ARG_ENABLE([adms], [AS_HELP_STRING([--enable-adms], [Enable ADMS code models, (experimental)])]) # --enable-pss: enable PSS Analysis AC_ARG_ENABLE([pss], [AS_HELP_STRING([--enable-pss], [Enable PSS Analysis, (experimental)])]) # --enable-ndev: define NDEV in the code. An interface for external device i.e. numerical device AC_ARG_ENABLE([ndev], [AS_HELP_STRING([--enable-ndev], [Enable NDEV interface, (experimental)])]) # --enable-cluster: define CLUSTER in the code. This is for cluster support AC_ARG_ENABLE([cluster], [AS_HELP_STRING([--enable-cluster], [Enable cluster support, (experimental)])]) # --enable-help: try to force --ansi option to the compiler AC_ARG_ENABLE([help], [AS_HELP_STRING([--enable-help], [Force building nghelp (deprecated)])]) # --enable-xgraph: Compile the xgraph plotting program. Default is "no". # Xgraph is a plotting package for X11 once very popular. AC_ARG_ENABLE([xgraph], [AS_HELP_STRING([--enable-xgraph], [Enable xgraph compilation.])]) # --with-readline: Includes GNU readline support into CLI. Default is "no". AC_ARG_WITH([readline], [AS_HELP_STRING([--with-readline[=yes/no]], [Enable GNU readline support for CLI. Default=no.])]) # --with-editline: Includes BSD Editline support into CLI. Default is "no". AC_ARG_WITH([editline], [AS_HELP_STRING([--with-editline[=yes/no]], [Enable BSD editline support for CLI. Default=no.])]) # --with-tcl: define TCL_MODULE in the code. This is for tcl support AC_ARG_WITH([tcl], [AS_HELP_STRING([--with-tcl=tcldir], [Compiles the tcl module instead, experimental, see README.tcl])]) # --with-ngshared: define SHARED_MODULE in the code. This is for ngspice as shared library (or dll) AC_ARG_WITH([ngshared], [AS_HELP_STRING([--with-ngshared], [Compiles ngspice as shared library (dll)])]) # readline and editline cannot both be enabled if test "x$with_editline" = xyes; then if test "x$with_readline" = xyes; then AC_MSG_ERROR([Readline and editline cannot both be enabled]) fi fi # Enable maintainer commands only if requested AM_MAINTAINER_MODE # Compiler checks # --------------- ext_CFLAGS="$CFLAGS" AC_PROG_CC # Work on compiler options according to system: # Set default CFLAGS - only use -Wall if we have gcc # the above AC_PROG_CC may set CFLAGS to "-O2 -g" if test "x$enable_debug" = xno; then if test "x$GCC" = xyes; then AC_MSG_WARN([Removing debugging option!]) CFLAGS="-O2 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion -s $ext_CFLAGS" else AC_MSG_WARN([Removing debugging option!]) CFLAGS="-O2 $ext_CFLAGS" fi else AC_DEFINE([NGDEBUG], [1], [Compile with debug info]) if test "x$GCC" = xyes; then CFLAGS="-g -O1 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion $ext_CFLAGS" else CFLAGS="-g $ext_CFLAGS" fi fi # the profiling option if test "x$enable_gprof" = xyes; then # Probably other compilers support -pg or something similar; # feel free to extend this to include them. if test "x$GCC" = xyes; then if test "x$enable_shared" = xyes ; then AC_MSG_ERROR([Can't have --enable-gprof without --disable-shared (we recommend also using --enable-all-static).]) fi if test "x$enable_static" != xyes ; then AC_MSG_WARN([We recommend --enable-static with --enable-gprof.]) fi AC_MSG_NOTICE([Enabling gprof profiling data (to gmon.out).]) CFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -pg" else AC_MSG_ERROR([We only support --enable-gprof with GCC right now.]) fi fi # Not sure that this will work.... if test "x$with_checkergcc" = xyes; then CC="checkergcc" fi # Checks for ANSI-C header files. AC_HEADER_STDC AC_CHECK_HEADERS([strings.h]) if test "x$enable_ansi" = xyes; then AC_PROG_CC() AC_DIAGNOSE([obsolete], [AM_PROG_CC_STDC: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc if test "x$am_cv_prog_cc_stdc" != xyes ; then AC_MSG_WARN([Failed to find Ansi flag!]) fi fi if test "x$enable_smoketest" = xyes; then # CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -pedantic -W -Wmissing-prototypes" CFLAGS="$CFLAGS -Wstrict-prototypes -Wtraditional" CFLAGS="$CFLAGS -Wconversion -Wshadow -Wpointer-arith" CFLAGS="$CFLAGS -Wcast-qual -Wcast-align -Wwrite-strings" CFLAGS="$CFLAGS -Waggregate-return -fshort-enums -fno-common" CFLAGS="$CFLAGS -Wnested-externs -Dinline= -g -O4" fi # Check system we're on , and tune accordingly AC_CANONICAL_HOST # Expand the prefix variable if test "x$prefix" = xNONE ; then # with the MS WINDOWS executable we suggest C:/Spice/bin as *.exe-path if test "x$with_wingui" = xyes; then dprefix="C:/Spice" prefix=$dprefix else dprefix=$ac_default_prefix fi else dprefix=$prefix fi ########################################################################## # # ngspice as shared library (ngspice.so or ngspice.dll) # ########################################################################## if test "x$with_ngshared" != x && test "x$with_ngshared" != xno ; then has_shared_module=true AC_DEFINE([SHARED_MODULE], [1], [shared ngspice module]) case $host_os in *mingw* ) has_shwin=true has_no_help=true AC_DEFINE([HAS_SHWIN], [1], [ngspice.dll Windows]) ;; *cygwin* ) has_shcyg=true AC_CHECK_LIB([pthread], [pthread_create]) ;; *) CFLAGS="$CFLAGS -fvisibility=hidden" AC_CHECK_LIB([pthread], [pthread_create]) ;; esac with_x=no with_windows=no AC_SUBST([STATIC], [-shared]) TCL_PACKAGE_PATH="" TCL_LIB_SPEC="" ########################################################################## # # tcl libraries test # ########################################################################## # # The tclSpice options # elif test "x$with_tcl" != x && test "x$with_tcl" != xno ; then has_tcl_module=true AC_DEFINE([TCL_MODULE], [1], [Tcl Module]) case $host_os in *mingw* ) has_tclwin=true has_no_help=true AC_DEFINE([HAS_TCLWIN], [1], [Tcl Windows]) ;; *cygwin* ) has_tclcyg=true ;; *) ;; esac with_x=no AC_MSG_CHECKING([for tclConfig.sh]) tcl_config_sh="" if test "x$with_tcl" != xyes ; then for dir in \ $with_tcl do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break elif test -r "$dir/unix/tclConfig.sh" ; then tcl_config_sh="$dir/unix/tclConfig.sh" break fi done else for dir in \ $prefix \ $exec_prefix do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break elif test -r "$dir/unix/tclConfig.sh" ; then tcl_config_sh="$dir/unix/tclConfig.sh" break fi done if test "x$tcl_config_sh" = x ; then for dir in \ `ls -dr /usr/local/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/local/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/local/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/share/tcltk/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/share/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/share/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/lib/tcl/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ `ls -dr /usr/lib/tcl[[7-9]].[[0-9]]* 2>/dev/null` \ /usr/local/tcl \ /usr/local \ /usr \ /mingw do if test -r "$dir/tclConfig.sh" ; then echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." tcl_config_sh="$dir/lib/tclConfig.sh" break fi done fi fi AC_MSG_RESULT([${tcl_config_sh}]) if test "x$tcl_config_sh" = x ; then echo "can't find Tcl configuration script \"tclConfig.sh\"" find /usr/ -name 'tclConfig.sh' -exec echo "Should you add --with-tcl={} to ./configure arguments?" \; | sed -re "s/\/tclConfig.sh/ /" exit 1 fi . $tcl_config_sh CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC" CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" AC_CHECK_HEADERS([tcl.h blt.h], [], [AC_MSG_ERROR([Couldn't find Tcl/BLT headers])]) if test ! -x "$TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" ; then AC_MSG_ERROR([Couldn't find $TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION]) fi AC_MSG_CHECKING([for TCL module BLT]) rm -f conftest.tcl cat > conftest.tcl << EOF package require BLT; exit; EOF if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null then AC_MSG_RESULT([Found]) else AC_MSG_ERROR([Couldn't find BLT]) fi rm -f conftest.tcl AC_CHECK_LIB([pthread], [pthread_create]) if test -n "$libdir" ; then AC_SUBST([libdir]) echo "libraries in $libdir" fi if test -z "$libdir" ; then for TCL_PACKAGE_PATH_ELEMENT in $TCL_PACKAGE_PATH ; do if test -a "$TCL_PACKAGE_PATH_ELEMENT" ; then libdir=$TCL_PACKAGE_PATH_ELEMENT AC_SUBST([libdir]) echo "library in $libdir" break fi done fi AC_SUBST([STATIC], [-shared]) else TCL_PACKAGE_PATH="" TCL_LIB_SPEC="" AC_SUBST([STATIC], [-static]) fi AM_CONDITIONAL([SHARED_MODULE], [test "x$has_shared_module" = xtrue]) AM_CONDITIONAL([SHWIN], [test "x$has_shwin" = xtrue]) AM_CONDITIONAL([SHCYG], [test "x$has_shcyg" = xtrue]) AM_CONDITIONAL([TCL_MODULE], [test "x$has_tcl_module" = xtrue]) AM_CONDITIONAL([TCLWIN], [test "x$has_tclwin" = xtrue]) AM_CONDITIONAL([TCLCYG], [test "x$has_tclcyg" = xtrue]) AC_SUBST([TCL_PACKAGE_PATH]) AC_SUBST([TCL_LIB_SPEC]) ################################################################## # # #End of tcl libraries test # ################################################################# # Checks for programs AC_LIBTOOL_WIN32_DLL AC_LIBTOOL_DLOPEN AM_PROG_CC_C_O ## AM_PROG_LIBTOOL AC_PROG_LIBTOOL # --with-windows : the user wants to use generate the MS WINDOWS GUI executable # old command version, deprecated, use --with-wingui AC_ARG_WITH([windows], [AS_HELP_STRING([--with-windows], [MS WINDOWS GUI executable, deprecated])], [if test "x$with_windows" = xyes; then AC_DEFINE([HAS_WINGUI], [1], [define to specify MS Windows executable with simple GUI]) fi], [with_windows=no]) # --with-wingui : the user wants to use generate the MS WINDOWS GUI executable AC_MSG_CHECKING([whether windows code with gui is enabled]) AC_ARG_WITH([wingui], [AS_HELP_STRING([--with-wingui], [MS WINDOWS GUI executable])], [if test "x$with_wingui" = xyes; then AC_DEFINE([HAS_WINGUI], [1], [define to specify MS Windows executable with simple GUI]) fi], [if test "x$with_windows" = xyes; then with_wingui=yes else with_wingui=no fi]) AC_MSG_RESULT([$with_wingui]) AM_CONDITIONAL([WINGUI], [test "x$with_wingui" = xyes]) case $with_wingui in yes ) AC_DEFINE([X_DISPLAY_MISSING]) AC_MSG_RESULT([No X display!]) has_no_x=true if test "x$enable_help" = xyes; then has_no_help=false else has_no_help=true fi CFLAGS="$CFLAGS -mwindows" ;; * ) # Check for /proc (virtual process information file system) AC_CHECK_HEADERS([/proc/meminfo]) # Checks for X11 header files and libraries - X11 support can be disabled # by passing the '--without-x' option to configure: # Try to locate the X-Windows include files and libraries # will set no_x="yes" or no_x="" AC_PATH_X # will set X_CFLAGS, X_LIBS, and might define X_DISPLAY_MISSING AC_PATH_XTRA # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_CLOSEDIR_VOID AC_FUNC_SELECT_ARGTYPES AC_FUNC_SETVBUF_REVERSED AC_FUNC_VPRINTF # Check if the user wants to use the appropriate rpath commands to compile in # the shared library path for the X libraries. This is off by default since # that is how it has been historically. Using --enable-rpath will turn this on _use_rpath=no AC_MSG_CHECKING([if hardcoding of the X11 runtime library path is desired]) AC_ARG_ENABLE([rpath], [AS_HELP_STRING([--enable-rpath], [Enable hardcoding the X11 runtime library path])], [ if test "x$enable_rpath" = xno ; then AC_MSG_RESULT([no]) _use_rpath=no else AC_MSG_RESULT([yes]) _use_rpath=yes fi ], [ AC_MSG_RESULT([no]) _use_rpath=no ] ) if test "x$_use_rpath" = xyes ; then # Try to figure out if we need -Rpath for finding X11 libs # at runtime. Why autoconf doesn't already do this, I don't # know... xlib_path="" for p in $X_LDFLAGS ; do case $p in -L*) xlib_path="$xlib_path $p" ;; esac done _save_LIBS=$LIBS LIBS="$LIBS $X_LDFLAGS" rpath="" for fl in "-Wl,-rpath " "-Wl,--rpath " "-rpath " "--rpath " "-Wl,-R" "-R" "-R " ; do xlib_rpath=`echo $xlib_path | sed "s/-L/$fl/g"` LIBS="$_save_LIBS $X_LIBS $xlib_rpath" AC_MSG_CHECKING([if the compiler accepts ${fl}path for runtime libraries]) AC_LINK_IFELSE([AC_LANG_PROGRAM()], [AC_MSG_RESULT([yes]) rpath=$fl], [AC_MSG_RESULT([no])]) test -n "$rpath" && break done if test -n "$rpath"; then X_LDFLAGS="$X_LDFLAGS $xlib_rpath" fi LIBS=$_save_LIBS fi # Checks for X libraries - if X11 wasn't found then don't make following # tests and compile without X11 support - otherwise, check if the following # libraries are present (error if they are not) # In CYGWIN library ordering has to be changed. Is this compatible to LINUX? # XShmAttach is a struct in CYGWIN, not a function # SJB: 13th march 2005 # Library order is giving linker warnings on MacOSX # It's not clear to me which order is required for Cygwin (see comment above) # and neither can I find any authoritative answer for the correct link order # for MacOSX or Linux, but # -lXaw -lXmu -lXt -lXext -lX11 # seems to be the popular choice. # (The previous order was -lX11 -lXt -lXext -lXmu -lXaw) if test "x$no_x" != xyes ; then AC_CHECK_LIB([Xaw], [main], [X_LIBS="$X_LIBS -lXaw"], [AC_MSG_ERROR([Couldn't find Xaw library])], [$X_LIBS $X_EXTRA_LIBS]) AC_CHECK_LIB([Xmu], [main], [X_LIBS="$X_LIBS -lXmu"], [AC_MSG_ERROR([Couldn't find Xmu library])], [$X_LIBS $X_EXTRA_LIBS]) X_LIBS="$X_LIBS -lXt" AC_CHECK_LIB([Xext], [XShmAttach], [X_LIBS="$X_LIBS -lXext"], [AC_MSG_ERROR([Couldn't find Xext library])], [$X_LIBS $X_EXTRA_LIBS]) X_LIBS="$X_LIBS -lX11" has_no_x=false else AC_DEFINE([X_DISPLAY_MISSING]) AC_MSG_RESULT([No X display!]) has_no_x=true fi if test "x$enable_help" = xyes && test "x$no_x" != xyes ; then has_no_help=false else has_no_help=true fi ;; esac # end of case --with-windows AM_CONDITIONAL([NO_X], [test "x$has_no_x" = xtrue]) AM_CONDITIONAL([NO_HELP], [test "x$has_no_help" = xtrue]) # Check for a few typdefs: AC_TYPE_PID_T AC_TYPE_SIGNAL # sighandler_t is the type of the signal handler on GNU variants, # sig_t is the type of a signal handler on 4.4BSD's, # other systems use __sighandler_t. AC_CHECK_TYPES([sighandler_t, sig_t, __sighandler_t], [], [], [#include #include ]) # Check for a few libraries and headers: AC_HEADER_DIRENT AC_CHECK_HEADERS([unistd.h ctype.h pwd.h fcntl.h sys/ioctl.h stropts.h]) AC_HEADER_SYS_WAIT AC_HEADER_STAT AC_CHECK_HEADERS([arpa/inet.h netdb.h netinet/in.h stddef.h sys/file.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/io.h]) # Check time and resources headers and functions: AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_CHECK_FUNCS([localtime]) AC_CHECK_FUNCS([ftime gettimeofday]) # Do not use time or getrusage function for CPU time measurement under OpenMP if test "x$enable_openmp" != xyes; then AC_CHECK_FUNCS([time getrusage]) fi AC_CHECK_FUNCS([utimes]) AC_CHECK_FUNCS([getrlimit ulimit], [break]) AC_CHECK_FUNCS([endpwent gethostbyname memset select socket strdup strerror strncasecmp strstr strtol]) # Look for termios first (posix) AC_CHECK_HEADERS([termios.h termio.h sgtty.h], [break]) AC_CHECK_FUNCS([isatty tcgetattr tcsetattr]) # Check for a few functions: AC_FUNC_FORK([]) AC_CHECK_FUNCS([access bcopy bzero qsort dup2 popen]) AC_CHECK_FUNCS([strchr index], [break]) AC_CHECK_FUNCS([strrchr rindex], [break]) AC_CHECK_FUNCS([getcwd getwd], [break]) AC_MSG_RESULT([Checking mathematical features of the system:]) # Look for math library: AC_CHECK_LIB([m], [sqrt]) AC_CHECK_HEADERS([float.h limits.h values.h ieeefp.h]) AC_CHECK_HEADERS([fftw3.h]) AC_CHECK_LIB([fftw3], [fftw_plan_dft_1d], [AC_DEFINE([HAVE_LIBFFTW3], [], [Have fft routines in libfftw3]) LIBS="$LIBS -lfftw3"]) # Check for a few mathematical functions: AC_CHECK_FUNCS([erfc logb scalb scalbn asinh acosh atanh finite]) # According POSIX we should look for macros first AC_CHECK_DECLS([isinf], [], [], [[#include ]]) AC_CHECK_DECLS([isnan], [], [], [[#include ]]) # But may be we have still functions if test "x$ac_cv_have_decl_isinf" != xyes; then AC_CHECK_FUNC([isinf]) fi if test "x$ac_cv_have_decl_isnan" != xyes; then AC_CHECK_FUNC([isnan]) fi # If user enables garbage collection, look for garbage collector if test "x$TCL_PACKAGE_PATH" = x; then if test "x$enable_gc" = xyes; then AC_MSG_RESULT([Checking for the presence of the Garbage Collector:]) AC_CHECK_LIB([gc], [GC_malloc], [AC_DEFINE([HAVE_LIBGC], [], [Define if we want garbage collection enabled]) LIBS="$LIBS -lgc"]) fi fi # check, if we have sigsetjmp and siglongjmp. # A trivial AC_CHECK_FUNCS(sigsetjmp) won't do because sigsetjmp() might be a # macro declared in . (joze) AC_MSG_CHECKING([for sigsetjmp]) AC_TRY_LINK([#include ],[jmp_buf env; sigsetjmp(env, 1);], [AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_SIGSETJMP], [], [Define if we have sigsetjmp().])], [AC_MSG_RESULT([no])]) # A mingw ngspice dll with linking against libiberty.a seems not to be possible. # Because there is a internal replacement for asprintf, and dirmane is not been used anywhere, # just skip it. case $host_os in *mingw* ) AC_MSG_RESULT([Cannot make dll from libiberty.a, no check for headers]) ;; * ) # Check for some headers (asprintf, dirname, etc.) AC_CHECK_HEADERS([libiberty.h libgen.h]) # Check for the asprintf function: AC_CHECK_FUNCS([asprintf], [], [AC_CHECK_LIB([iberty], [asprintf], [AC_DEFINE([HAVE_ASPRINTF], [1], [Have asprintf in libiberty]) LIBS="$LIBS -liberty"])]) ;; esac # Check for the snprintf function: if test "x$ac_cv_func_asprintf" = xno ; then AC_CHECK_FUNCS([snprintf]) fi # Check for the dirname function: AC_CHECK_FUNCS([dirname], [], [AC_CHECK_LIB([gen], [dirname], [AC_DEFINE([HAVE_DIRNAME], [1], [Have dirname in libgen]) LIBS="$LIBS -lgen"])]) AC_CHECK_HEADERS([getopt.h]) AC_CHECK_FUNC([getopt_long], [getopt_long=true]) if test "x$getopt_long" = xtrue; then AC_DEFINE([HAVE_GETOPT_LONG], [1], [Have fcn getopt_long()]) fi AC_DEFINE_UNQUOTED([NGSPICEBINDIR], ["`echo $dprefix/bin`"], [Define the directory for executables]) AC_DEFINE_UNQUOTED([NGSPICEDATADIR], ["`echo $dprefix/share/ngspice`"], [Define the directory for architecture independent data files]) AC_DEFINE_UNQUOTED([NGSPICEBUILDDATE], ["`date`"], [Define the build date]) if test "x$with_wingui" = xyes; then AC_MSG_RESULT([WINDOWS GUI code enabled]) AC_CHECK_FUNCS([memmove]) fi # Recapitulate settings: AC_MSG_RESULT([Settings which were chosen:]) if test "x$enable_sense2" = xyes; then AC_DEFINE([WANT_SENSE2], [], [Define if we want spice2 sensitivity analysis]) AC_MSG_RESULT([Spice2 sensitivity analysis enabled]) AC_MSG_WARN([This feature is UNSUPPORTED]) fi if test "x$enable_nobypass" = xyes; then AC_DEFINE([NOBYPASS], [], [Define if we want NOBYPASS]) AC_MSG_RESULT([NOBYPASS option enabled]) fi if test "x$enable_capbypass" = xyes; then AC_DEFINE([CAPBYPASS], [], [Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd]) AC_MSG_RESULT([CAPBYPASS option enabled]) fi if test "x$enable_nodelimiting" = xyes; then AC_DEFINE([NODELIMITING], [], [Experimental code never implemented to damp Newton iterations]) AC_MSG_RESULT([NODELIMITING option enabled]) fi if test "x$enable_predictor" = xyes; then AC_DEFINE([PREDICTOR], [], [Define if we want predictor algorithm]) AC_MSG_RESULT([PREDICTOR algorithm enabled]) fi if test "x$enable_newpred" = xyes; then AC_DEFINE([NEWPRED], [], [Define if you want to discover :)]) AC_MSG_RESULT([NEWPRED enabled]) fi if test "x$enable_newtrunc" = xyes; then AC_DEFINE([NEWTRUNC], [], [Do not trigger unwanted traps by default]) AC_MSG_RESULT([New truncation error calculation enabled]) fi if test "x$enable_experimental" = xyes; then AC_DEFINE([EXPERIMENTAL_CODE], [], [Define if we want some experimental code]) AC_MSG_RESULT([EXPERIMENTAL_CODE enabled]) fi if test "x$enable_cpdebug" = xyes; then AC_DEFINE([CPDEBUG], [], [Define if you want to debug ngspice shell]) AC_MSG_RESULT([WARNING: Shell debug is enabled]) fi if test "x$enable_ftedebug" = xyes; then AC_DEFINE([FTEDEBUG], [], [Define if you want to debug frontend]) AC_MSG_RESULT([WARNING: Frontend debug is enabled]) fi if test "x$enable_sensdebug" = xyes; then AC_DEFINE([SENSDEBUG], [], [Define if we want debug sensititvity analysis]) AC_MSG_RESULT([WARNING: Sensitivity code debug *SENSDEBUG* is enabled]) fi if test "x$enable_asdebug" = xyes; then AC_DEFINE([ASDEBUG], [], [Define if we want debug sensitivity analysis]) AC_MSG_RESULT([WARNING: Sensitivity code debug *ASDEBUG* is enabled]) fi if test "x$enable_stepdebug" = xyes; then AC_DEFINE([STEPDEBUG], [], [Define if we want stepdebug]) AC_MSG_RESULT([WARNING: STEPDEBUG debug is enabled]) fi if test "x$enable_pzdebug" = xyes; then AC_DEFINE([PZDEBUG], [], [Define if you want to debug pole-zero analysis]) AC_MSG_RESULT([WARNING: Pole/Zero analysis debug is enabled]) fi if test "x$enable_pss" = xyes; then AC_DEFINE([WITH_PSS], [], [Define if you want PSS analysis]) AC_MSG_RESULT([WARNING: PSS analysis enabled]) fi if test "x$enable_blktmsdebug" = xyes; then AC_DEFINE([D_DBG_BLOCKTIMES], [], [Define if we want debug distortion analysis (BLOCKTIMES)]) AC_MSG_RESULT([WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled]) fi if test "x$enable_smltmsdebug" = xyes; then AC_DEFINE([D_DBG_SMALLTIMES], [], [Define if we want debug distortion analysis (SMALLTIMES)]) AC_MSG_RESULT([WARNING: Distortion analysis debug *D_DBG_SMALLTIMES* is enabled]) fi if test "x$enable_xgraph" = xyes; then AC_MSG_RESULT([Xgraph compilation enabled.]) AC_CONFIG_SUBDIRS([xgraph]) XGRAPHDIR="xgraph" NOTXGRAPH="" else XGRAPHDIR="" NOTXGRAPH="xgraph" fi AC_SUBST([XGRAPHDIR]) AC_SUBST([NOTXGRAPH]) AC_CHECK_PROGS([YACC], ['bison -y' byacc yacc]) ################# XSPICE ################################################## # Add new code models to the build by pointing to them here. if test "x$enable_xspice" = xyes; then if test -z "${YACC}" ; then AC_MSG_ERROR([XSPICE build requires bison, byacc or yacc parser generator]) fi AC_MSG_RESULT([X-Spice features included]) AC_DEFINE([XSPICE], [1], [The xspice enhancements]) # Define variables for LEX AC_CHECK_PROGS([LEX], [flex lex]) if test -z "$LEX" ; then AC_MSG_ERROR([Flex is required for building XSPICE]) fi case $host_os in *mingw* ) AC_DEFINE([IPC_DEBUG_VIA_STDIO], [1], [Client-Server only via stdio.]) XSPICEDLLIBS="" ;; *cygwin* ) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) XSPICEDLLIBS="" ;; *freebsd* ) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) XSPICEDLLIBS="" ;; *openbsd* ) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) XSPICEDLLIBS="" ;; * ) AC_DEFINE([IPC_UNIX_SOCKETS], [1], [Client-Server via socket.]) XSPICEDLLIBS="-ldl" ;; esac XSPICEINIT="" AC_CHECK_FUNCS([modf]) AC_CHECK_HEADERS([libintl.h malloc.h]) else XSPICEINIT="*" if test -z "${YACC}" ; then AC_MSG_WARN([No bison, byacc, yacc found: Uses prebuilt default parsers]) fi fi AC_SUBST([XSPICEINIT]) AC_SUBST([XSPICEDLLIBS]) AM_CONDITIONAL([XSPICE_WANTED], [test "x$enable_xspice" = xyes]) # Add CIDER enhancements to ngspice. if test "x$enable_cider" = xyes; then AC_MSG_RESULT([CIDER features enabled]) AC_DEFINE([CIDER], [1], [The CIDER enhancements]) fi AM_CONDITIONAL([CIDER_WANTED], [test "x$enable_cider" = xyes]) AM_CONDITIONAL([NUMDEV_WANTED], [test "x$enable_cider" = xyes]) AM_CONDITIONAL([PSS_WANTED], [test "x$enable_pss" = xyes]) AM_CONDITIONAL([SENSE2_WANTED], [test "x$enable_sense2" = xyes]) # adms option if test "x$enable_adms" = xyes ; then AC_MSG_RESULT([********************************** * ADMS support is experimental * **********************************]) AC_CHECK_PROGS([ADMSXML], [admsXml admsXml.exe], [no]) if test "x$ADMSXML" = xno; then AC_MSG_ERROR([If you want Verilog-A models you should install admsXml]) fi AC_DEFINE([ADMS], [1], [Support for Verilog-A models]) VLADEVDIR=" adms/ekv \ adms/hicum0 \ adms/hicum2 \ adms/mextram \ adms/psp102 " # The makefiles for adms (to be added to AC_CONFIG_FILES by ./autogen.sh --adms) #VLAMKF src/spicelib/devices/adms/ekv/Makefile #VLAMKF src/spicelib/devices/adms/hicum0/Makefile #VLAMKF src/spicelib/devices/adms/hicum2/Makefile #VLAMKF src/spicelib/devices/adms/mextram/Makefile #VLAMKF src/spicelib/devices/adms/psp102/Makefile NOTVLADEVDIR="" VLADEV=" spicelib/devices/adms/ekv/libekv.la \ spicelib/devices/adms/hicum0/libhicum0.la \ spicelib/devices/adms/hicum2/libhicum2.la \ spicelib/devices/adms/mextram/libbjt504t.la \ spicelib/devices/adms/psp102/libpsp102.la " else VLADEVDIR="" NOTVLADEVDIR="adms" fi AC_SUBST([ADMSXML]) AC_SUBST([VLADEVDIR]) AC_SUBST([VLADEV]) AC_SUBST([NOTVLADEVDIR]) # NDEV option if test "x$enable_ndev" = xyes; then AC_MSG_RESULT([NDEV features enabled]) AC_DEFINE([NDEV], [], [The NDEV interface]) fi AM_CONDITIONAL([NDEV_WANTED], [test "x$enable_ndev" = xyes]) # Cluster option if test "x$enable_cluster" = xyes; then AC_MSG_RESULT([Cluster version is being compiled]) AC_DEFINE([CLUSTER], [], [Spice cluster support]) LIBS="$LIBS -lpthread" fi if test "x$enable_expdevices" = xyes; then AC_DEFINE([EXP_DEV], [], [Define if we want to enable experimental devices]) AC_MSG_RESULT([WARNING: Experimental devices enabled]) fi # ---- Option to include GNU readline support in ngspice CLI ---- # ---- Default: disabled. ---- # ---- Hope to see in the future readline replacement. ---- if test "x$with_readline" != xyes; then AC_MSG_RESULT([GNU readline disabled.]) else if test "x$with_tcl" = x || test "x$with_tcl" = xno ; then AC_MSG_RESULT([Checking for readline:]) AC_CHECK_HEADERS([readline/readline.h readline/history.h], [AC_DEFINE([HAVE_GNUREADLINE], [], [Define if we have GNU readline])], [AC_MSG_ERROR([Couldn't find GNU readline headers.])]) AC_SEARCH_LIBS([tputs], [ncurses termcap], [AC_DEFINE([HAVE_TERMCAP], [], [Define if we have ncurses or termcap])], [AC_MSG_ERROR([Found neither ncurses or termcap])]) AC_CHECK_LIB([readline], [readline], [LIBS="$LIBS -lreadline"], [AC_MSG_ERROR([Couldn't find readline libraries.])]) fi fi # ---- Option to include BSD editline support in ngspice CLI ---- # ---- Default: disabled. ---- if test "x$with_editline" != xyes; then AC_MSG_RESULT([BSD editline disabled.]) else AC_MSG_RESULT([Checking for editline:]) AC_CHECK_HEADERS([editline/readline.h], [AC_DEFINE([HAVE_BSDEDITLINE], [1], [Define to enable BSD editline])], [AC_MSG_ERROR([Couldn't find BSD editline headers.])]) AC_SEARCH_LIBS([tputs], [ncurses termcap], [AC_DEFINE([HAVE_TERMCAP], [], [Define if we have ncurses or termcap])], [AC_MSG_ERROR([Found neither ncurses or termcap])]) AC_CHECK_LIB([edit], [readline], [LIBS="$LIBS -ledit"], [AC_MSG_ERROR([Couldn't find editline libraries.])], [-lncurses]) fi # Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined AC_CHECK_HEADERS([ncurses/termcap.h termcap.h]) # --enable-openmp: Use OpenMP on multi-core processors AC_ARG_ENABLE([openmp], [AS_HELP_STRING([--enable-openmp], [Use OpenMP parallel processing])]) # Add OpenMP to ngspice. : ${enable_openmp:=no} m4_ifdef([AC_OPENMP], [AC_OPENMP]) if test "x$enable_openmp" = xyes; then AC_DEFINE([USE_OMP], [1], [OpenMP parallel processing]) CFLAGS="$CFLAGS $OPENMP_CFLAGS" AC_MSG_RESULT([OpenMP feature enabled]) fi # Output Files # ------------ AC_CONFIG_FILES([Makefile man/Makefile man/man1/Makefile src/Makefile src/spicelib/Makefile src/spicelib/analysis/Makefile src/spicelib/devices/Makefile src/spicelib/devices/asrc/Makefile src/spicelib/devices/bjt/Makefile src/spicelib/devices/bsim1/Makefile src/spicelib/devices/bsim2/Makefile src/spicelib/devices/bsim3/Makefile src/spicelib/devices/bsim3v0/Makefile src/spicelib/devices/bsim3v1/Makefile src/spicelib/devices/bsim3v32/Makefile src/spicelib/devices/bsim4/Makefile src/spicelib/devices/bsim4v4/Makefile src/spicelib/devices/bsim4v5/Makefile src/spicelib/devices/bsim4v6/Makefile src/spicelib/devices/bsim3soi_pd/Makefile src/spicelib/devices/bsim3soi_fd/Makefile src/spicelib/devices/bsim3soi_dd/Makefile src/spicelib/devices/bsimsoi/Makefile src/spicelib/devices/cap/Makefile src/spicelib/devices/cccs/Makefile src/spicelib/devices/ccvs/Makefile src/spicelib/devices/csw/Makefile src/spicelib/devices/cpl/Makefile src/spicelib/devices/dio/Makefile src/spicelib/devices/ind/Makefile src/spicelib/devices/isrc/Makefile src/spicelib/devices/hfet1/Makefile src/spicelib/devices/hfet2/Makefile src/spicelib/devices/hisim2/Makefile src/spicelib/devices/hisimhv1/Makefile src/spicelib/devices/jfet/Makefile src/spicelib/devices/jfet2/Makefile src/spicelib/devices/ltra/Makefile src/spicelib/devices/mes/Makefile src/spicelib/devices/mesa/Makefile src/spicelib/devices/mos1/Makefile src/spicelib/devices/mos2/Makefile src/spicelib/devices/mos3/Makefile src/spicelib/devices/mos6/Makefile src/spicelib/devices/mos9/Makefile src/spicelib/devices/ndev/Makefile src/spicelib/devices/res/Makefile src/spicelib/devices/soi3/Makefile src/spicelib/devices/sw/Makefile src/spicelib/devices/tra/Makefile src/spicelib/devices/txl/Makefile src/spicelib/devices/urc/Makefile src/spicelib/devices/vbic/Makefile src/spicelib/devices/vccs/Makefile src/spicelib/devices/vcvs/Makefile src/spicelib/devices/vsrc/Makefile src/spicelib/devices/nbjt/Makefile src/spicelib/devices/nbjt2/Makefile src/spicelib/devices/numd/Makefile src/spicelib/devices/numd2/Makefile src/spicelib/devices/numos/Makefile src/spicelib/parser/Makefile src/ciderlib/Makefile src/ciderlib/input/Makefile src/ciderlib/support/Makefile src/ciderlib/oned/Makefile src/ciderlib/twod/Makefile src/frontend/Makefile src/frontend/numparam/Makefile src/frontend/help/Makefile src/frontend/parser/Makefile src/frontend/plotting/Makefile src/frontend/trannoise/Makefile src/frontend/wdisp/Makefile src/include/ngspice/Makefile src/maths/Makefile src/maths/cmaths/Makefile src/maths/fft/Makefile src/maths/misc/Makefile src/maths/ni/Makefile src/maths/deriv/Makefile src/maths/poly/Makefile src/maths/sparse/Makefile src/misc/Makefile src/xspice/Makefile src/xspice/cm/Makefile src/xspice/cmpp/Makefile src/xspice/icm/makedefs src/xspice/icm/GNUmakefile src/xspice/mif/Makefile src/xspice/evt/Makefile src/xspice/enh/Makefile src/xspice/ipc/Makefile src/xspice/idn/Makefile src/unsupported/Makefile tests/Makefile tests/bsim1/Makefile tests/bsim2/Makefile tests/bsim3/Makefile tests/bsim3/ac_sim/Makefile tests/bsim3/dc_sim/Makefile tests/bsim3/tran_sim/Makefile tests/bsim3soidd/Makefile tests/bsim3soifd/Makefile tests/bsim3soipd/Makefile tests/bsim4/Makefile tests/bsimsoi/Makefile tests/filters/Makefile tests/general/Makefile tests/hfet/Makefile tests/hisim/Makefile tests/hisimhv1/Makefile tests/jfet/Makefile tests/mes/Makefile tests/mesa/Makefile tests/mos6/Makefile tests/polezero/Makefile tests/regression/Makefile tests/regression/subckt-processing/Makefile tests/regression/lib-processing/Makefile tests/regression/parser/Makefile tests/sensitivity/Makefile tests/transient/Makefile tests/transmission/Makefile tests/xspice/Makefile tests/xspice/digital/Makefile tests/xspice/digital/spinit tests/resistance/Makefile tests/vbic/Makefile]) AC_OUTPUT ngspice-26/ylwrap0000755000265600020320000001435712264261540013502 0ustar andreasadmin#! /bin/sh # ylwrap - wrapper for lex/yacc invocations. scriptversion=2011-08-25.18; # UTC # Copyright (C) 1996, 1997, 1998, 1999, 2001, 2002, 2003, 2004, 2005, # 2007, 2009, 2010, 2011 Free Software Foundation, Inc. # # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . case "$1" in '') echo "$0: No files given. Try \`$0 --help' for more information." 1>&2 exit 1 ;; --basedir) basedir=$2 shift 2 ;; -h|--h*) cat <<\EOF Usage: ylwrap [--help|--version] INPUT [OUTPUT DESIRED]... -- PROGRAM [ARGS]... Wrapper for lex/yacc invocations, renaming files as desired. INPUT is the input file OUTPUT is one file PROG generates DESIRED is the file we actually want instead of OUTPUT PROGRAM is program to run ARGS are passed to PROG Any number of OUTPUT,DESIRED pairs may be used. Report bugs to . EOF exit $? ;; -v|--v*) echo "ylwrap $scriptversion" exit $? ;; esac # The input. input="$1" shift case "$input" in [\\/]* | ?:[\\/]*) # Absolute path; do nothing. ;; *) # Relative path. Make it absolute. input="`pwd`/$input" ;; esac pairlist= while test "$#" -ne 0; do if test "$1" = "--"; then shift break fi pairlist="$pairlist $1" shift done # The program to run. prog="$1" shift # Make any relative path in $prog absolute. case "$prog" in [\\/]* | ?:[\\/]*) ;; *[\\/]*) prog="`pwd`/$prog" ;; esac # FIXME: add hostname here for parallel makes that run commands on # other machines. But that might take us over the 14-char limit. dirname=ylwrap$$ do_exit="cd '`pwd`' && rm -rf $dirname > /dev/null 2>&1;"' (exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 mkdir $dirname || exit 1 cd $dirname case $# in 0) "$prog" "$input" ;; *) "$prog" "$@" "$input" ;; esac ret=$? if test $ret -eq 0; then set X $pairlist shift first=yes # Since DOS filename conventions don't allow two dots, # the DOS version of Bison writes out y_tab.c instead of y.tab.c # and y_tab.h instead of y.tab.h. Test to see if this is the case. y_tab_nodot="no" if test -f y_tab.c || test -f y_tab.h; then y_tab_nodot="yes" fi # The directory holding the input. input_dir=`echo "$input" | sed -e 's,\([\\/]\)[^\\/]*$,\1,'` # Quote $INPUT_DIR so we can use it in a regexp. # FIXME: really we should care about more than `.' and `\'. input_rx=`echo "$input_dir" | sed 's,\\\\,\\\\\\\\,g;s,\\.,\\\\.,g'` while test "$#" -ne 0; do from="$1" # Handle y_tab.c and y_tab.h output by DOS if test $y_tab_nodot = "yes"; then if test $from = "y.tab.c"; then from="y_tab.c" else if test $from = "y.tab.h"; then from="y_tab.h" fi fi fi if test -f "$from"; then # If $2 is an absolute path name, then just use that, # otherwise prepend `../'. case "$2" in [\\/]* | ?:[\\/]*) target="$2";; *) target="../$2";; esac # We do not want to overwrite a header file if it hasn't # changed. This avoid useless recompilations. However the # parser itself (the first file) should always be updated, # because it is the destination of the .y.c rule in the # Makefile. Divert the output of all other files to a temporary # file so we can compare them to existing versions. if test $first = no; then realtarget="$target" target="tmp-`echo $target | sed s/.*[\\/]//g`" fi # Edit out `#line' or `#' directives. # # We don't want the resulting debug information to point at # an absolute srcdir; it is better for it to just mention the # .y file with no path. # # We want to use the real output file name, not yy.lex.c for # instance. # # We want the include guards to be adjusted too. FROM=`echo "$from" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` TARGET=`echo "$2" | sed \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'\ -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZ]/_/g'` sed -e "/^#/!b" -e "s,$input_rx,," -e "s,$from,$2," \ -e "s,$FROM,$TARGET," "$from" >"$target" || ret=$? # Check whether header files must be updated. if test $first = no; then if test -f "$realtarget" && cmp -s "$realtarget" "$target"; then echo "$2" is unchanged rm -f "$target" else echo updating "$2" mv -f "$target" "$realtarget" fi fi else # A missing file is only an error for the first file. This # is a blatant hack to let us support using "yacc -d". If -d # is not specified, we don't want an error when the header # file is "missing". if test $first = yes; then ret=1 fi fi shift shift first=no done else ret=$? fi # Remove the directory. cd .. rm -rf $dirname exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ngspice-26/autogen.sh0000755000265600020320000001154712264261473014242 0ustar andreasadmin#!/bin/sh # Configuration script for ngspice. # # This script performs initial configuration of ngspice source # package. # # # temp-adms.ac: modified configure.ac if --adms is selected # for temporary use by autoconf, will be deleted automatically # configure.ac stays untouched PROJECT=ngspice # ADMS variables ADMSDIR=src/spicelib/devices/adms XMLPATH=src/spicelib/devices/adms/admst ADMSXML=admsXml ADMS=0 # Exit variable DIE=0 # Check for Mac OS X uname -a | grep -q "Darwin" if [ $? -eq 0 ]; then LIBTOOLIZE=glibtoolize else LIBTOOLIZE=libtoolize fi help() { echo echo "$PROJECT autogen.sh help" echo echo "--adms -a: enables adms feature" echo "--help -h: print this file" echo "--version -v: print version" echo } version() { echo echo "$PROJECT autogen.sh 1.0" echo } error_and_exit() { echo "Error: $1" if [ "$ADMS" -eq 1 ]; then rm -f temp-adms.ac fi exit 1 } check_awk() { (awk --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have awk installed to compile $PROJECT with --adms." exit 1 } } check_autoconf() { (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have autoconf installed to compile $PROJECT." echo "See http://www.gnu.org/software/automake/" echo "(newest stable release is recommended)" DIE=1 } ($LIBTOOLIZE --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have libtool installed to compile $PROJECT." echo "See http://www.gnu.org/software/libtool/" echo "(newest stable release is recommended)" DIE=1 } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have automake installed to compile $PROJECT." echo "See http://www.gnu.org/software/automake/" echo "(newest stable release is recommended)" DIE=1 } } check_adms() { (admsXml --version) < /dev/null > /dev/null 2>&1 || { echo echo "You must have admsXml installed to compile adms models." echo "See http://mot-adms.sourceforge.net" echo "(newest stable release is recommended)" DIE=1 } } case "$1" in "--adms" | "-a") check_adms ADMS=1 ;; "--help" | "-h") help exit 0 ;; "--version" | "-v") version exit 0 ;; *) ;; esac check_autoconf if [ "$DIE" -eq 1 ]; then exit 1 fi [ -f "DEVICES" ] || { echo "You must run this script in the top-level $PROJECT directory" exit 1 } # only for --adms: if [ "$ADMS" -gt 0 ]; then check_awk # add adms related Makefile entries to a configure.ac style file for # autoconf and automake # Find all lines with "#VLAMKF" and put the second token of each line # into a shell variable adms_Makefiles=`awk '$1 ~ /#VLAMKF/ { print "./" $2 }' < configure.ac` # just the same, but escape newlines with '\' for the following sed expression znew=`awk '$1 ~ /#VLAMKF/ { print " " $2 "\\\\" }' < configure.ac` # Find "tests/vbic/Makefile" and insert the list of Makefiles # some sed's fail to process the '\n' escape on the RHS, # thus use an escaped plain newline sed \ -e "s,tests\\/vbic\\/Makefile,&\\ $znew ," \ configure.ac > temp-adms.ac for adms_dir in `ls $ADMSDIR` ; do if [ -d "$ADMSDIR/$adms_dir" ]; then case "$adms_dir" in "admst") echo "Skipping scripts dir" ;; *) echo "Entering into directory: $adms_dir" echo "-->"$ADMSDIR/$adms_dir ( cd $ADMSDIR/$adms_dir $ADMSXML `ls admsva/*.va` -Iadmsva -xv \ -e ../admst/ngspiceVersion.xml \ -e ../admst/ngspiceMakefile.am.xml ) ;; esac fi done fi echo "Running $LIBTOOLIZE" $LIBTOOLIZE --copy --force \ || error_and_exit "$LIBTOOLIZE failed" echo "Running aclocal $ACLOCAL_FLAGS" aclocal $ACLOCAL_FLAGS \ || error_and_exit "aclocal failed" # optional feature: autoheader (autoheader --version) < /dev/null > /dev/null 2>&1 if [ $? -eq 0 ]; then echo "Running autoheader" autoheader \ || error_and_exit "autoheader failed" fi echo "Running automake -Wall --copy --add-missing" automake -Wall --copy --add-missing \ || error_and_exit "automake failed" if [ "$ADMS" -gt 0 ]; then echo "Running automake for adms" automake -Wall --copy --add-missing $adms_Makefiles \ || error_and_exit "automake failed" fi echo "Running autoconf" if [ "$ADMS" -gt 0 ]; then autoconf temp-adms.ac > configure \ || error_and_exit "autoconf failed, with adms" rm -f temp-adms.ac chmod +x configure else autoconf \ || error_and_exit "autoconf failed" fi echo "Success." exit 0 ngspice-26/m4/0000755000265600020320000000000012264261530012543 5ustar andreasadminngspice-26/m4/lt~obsolete.m40000644000265600020320000001375612264261530015373 0ustar andreasadmin# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) ngspice-26/m4/ltoptions.m40000644000265600020320000003007312264261530015043 0ustar andreasadmin# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) ngspice-26/m4/ltversion.m40000644000265600020320000000126212264261530015033 0ustar andreasadmin# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) ngspice-26/m4/libtool.m40000644000265600020320000105754212264261530014467 0ustar andreasadmin# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS ngspice-26/m4/ltsugar.m40000644000265600020320000001042412264261530014467 0ustar andreasadmin# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) ngspice-26/depcomp0000755000265600020320000005064312264261534013614 0ustar andreasadmin#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2012-03-27.16; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # A tabulation character. tab=' ' # A newline character. nl=' ' if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' "$nl" < "$tmpdepfile" | ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependent.h'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'. # However on # $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\': # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... # tcc 0.9.26 (FIXME still under development at the moment of writing) # will emit a similar output, but also prepend the continuation lines # with horizontal tabulation characters. "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form 'foo.o: dependent.h', # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'. # Do two passes, one to just change these to # '$object: dependent.h' and one to simply 'dependent.h:'. sed -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ < "$tmpdepfile" > "$depfile" sed ' s/[ '"$tab"'][ '"$tab"']*/ /g s/^ *// s/ *\\*$// s/^[^:]*: *// /^$/d /:$/d s/$/ :/ ' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' "$nl" < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ngspice-26/ltmain.sh0000644000265600020320000105202612264261530014051 0ustar andreasadmin # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.2 Debian-2.4.2-1.1" TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 ngspice-26/README0000644000265600020320000000355512264261473013121 0ustar andreasadminREADME for NGSPICE ================== Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on three open source software packages: Spice3f5, Cider1b1 and Xspice. Spice3 does not need any introduction, is the most popular circuit simulator. In over 30 years of its life Spice3 has become a de-facto standard for simulating circuits. Cider couples Spice3f5 circuit level simulator to DSIM device simulator to provide greater simulation accuracy of critical devices. DSIM devices are described in terms of their structures and materials. Xspice is an extension to Spice3C1 that provides code modelling support and simulation of digital components through an embedded event driven algorithm. Ngspice is, anyway, much more than the simple sum of the packages above, as many people contributed to the project with their experience, their bug fixes and their improvements. If you are interested, browse the site and discover what ngspice offers and what needs. If you think you can help, join the development team. Ngspice is an ongoing project, growing everyday from users contributions, suggestions and reports. What we will be able to do depends mostly on user interests, contributions and feedback. MAILING LISTS: ------------- There are two mailing lists dedicated to the use and development of ngspice. * ngspice-users@lists.sourceforge.net: This list is the list for the users of the ngspice simulator. * ngspice-devel@lists.sourceforge.net: ngspice development issues. Developers and "want to be" developers should subscribe here. To subscribe the list(s), send a message to: WEB SITEs: -------- This project is hosted on Sourceforge.net. The home page is http://ngspice.sourceforge.net The summary page is http://sourceforge.net/projects/ngspice ngspice-26/Stuarts_Poly_Notes0000644000265600020320000000647512264261473016010 0ustar andreasadminSPICE 2 POLY CODEMODEL WARNING! The text in this document has been prepared in 2003 and is outdated. It is provided here only for reference and may provide some (historical) information. SPICE2 POLY attributes are now available for controlled sources. To use POLY attributes, configure tclspice/ngspice with the --enable-xspice flag set as described above. After compilation of ngspice, cd into $(top_srcdir)/src/xspice/icm and read the README file there for instructions about how to get POLY support. (Hint: you have to download some stuff from http://www.fe.uni-lj.si/ and edit the Makefiles before you can do "make && make install" of the codemodel stuff.) -- SDB 6.22.2003. -------------------------------------------------------------------- COMPILING XSPICE CHANGES The dependencies in the Makefile don't seem to work when you are compiling changes in the xspice stuff. Obviously, the best thing to do is fix Makefile.am, but since I am not an expert at this, I have been using the following workaround when making: touch src/main.c && make && make install I recommend you also do this if you hack anything under src/xspice. -- SDB 6.19.2003. --------------------------------------------------------------------- DEBUGGING SPICE To avoid a segmentation fault in the initial run, use the following command in gdb: setenv SPICE_NO_DATASEG_CHECK "1" Or, the comparable command in your shell before running gdb. This disable accurate tracking of how much memory is used. ---------------------------------------------------------------------- USING A GARBAGE COLLECTOR Get the Boehm-Weiser conservative garbage collector at the following address: http://www.hpl.hp.com/personal/Hans_Boehm/gc/ Compile it with 'make liblinuxgc.so' and install libgc.so and gc.h where the compiler can find them (i.e., /usr/local/lib and /usr/local/include). Run configure and compile. ---------------------------------------------------------------------- CREATING PATCHES If you don't have access to anonymous CVS: # extract the differences $ diff -ruN ng-spice-rework-x ng-spice > my.patch where ng-spice-rework-x is the snapshot you used to base your changes on. If you do have access to anonymous CVS: $ cvs diff -u > my.patch Note: this only works if you haven't added any files. Otherwise, the first method is better. Now, send your patch to ng-spice mailing list. ---------------------------------------------------------------------- INCORPORATING PATCHES # apply the patch $ patch -p1 < my.patch # update the automatically generated files $ sh autogen.sh ---------------------------------------------------------------------- INCOMPATIBILITIES BETWEEN SPICE3 AND SPICE2 The output format of spice3 is slightly different for .print and .plot lines. Most notably, different traces on plots are not scaled independently. This is most noticeable on phase/magnitude plots from an AC analysis (also, phase is displayed in radians). Finally, frequency for ".PRINT AC" lines is displayed as a complex quantity with an all-zero imaginary component. For input, "POLY( )" sources are not supported (the non-linear dependent source provides a more general replacement). Also, the ".ALTER" line is not supported. The Spice3 parser may be slightly different on subtle points of reading input (lines need not start at column 1 for instance). ngspice-26/ChangeLog0000644000265600020320000247511612264261473014023 0ustar andreasadmin2014-01-03 h_vogt * INSTALL, * configure.ac, * tests/bin/ngspice.pm, * visualc-shared/include/ngspice/config.h, * visualc/include/ngspice/config.h: ngspice-26: substitute 25 --> 26 2014-01-02 h_vogt * AUTHORS, * NEWS: ngspice-26: Henrik Forstén 2014-01-04 h_vogt * ANALYSES, * AUTHORS, * COPYING, * DEVICES, * FAQ, * INSTALL, * NEWS, * README, * README.tcl, * Stuarts_Poly_Notes: ngspice-26: update documentation 2014-01-04 h_vogt * ANALYSES, * AUTHORS, * BUGS, * COPYING, * DEVICES, * FAQ, * INSTALL, * NEWS, * README, * README.adms, * README.tcl, * Stuarts_Poly_Notes: whitespace 2014-01-11 h_vogt * tests/mos6/simpleinv.cir: mos6/simple inverter: true inverter circuit 2014-01-10 h_vogt * examples/Monte_Carlo/MC_2_circ.sp, * examples/Monte_Carlo/MC_2_control.sp: monte carlo with control script and MOS parameter set containing AGAUSS parameter variations (like commercial parameter libraries) 2014-01-10 rlar * src/frontend/plotting/x11.c: set X11 window title from `graph->plotname' in response to a bug report by Dominique Michel "#272 no title in plots" http://sourceforge.net/p/ngspice/bugs/272/ 2014-01-10 h_vogt * src/frontend/inpcom.c: inpcom.c: E, G source, improved search for 'vol' and 'cur' in response to a bug report by Marlize Schoeman "#274 VCVS Exxxx name and node names do not allow VOL as text" http://sourceforge.net/p/ngspice/bugs/274/ 2014-01-09 rlar * src/frontend/numparam/xpressn.c: parseunit(), support 'T' for "Tera" in response to a bug report by Andy Fierman "#273 T = Tera = 1e12 suffix is ignored when used in a parameter in a subcircuit." http://sourceforge.net/p/ngspice/bugs/273/ 2014-01-08 h_vogt * src/frontend/inp.c, * src/spicelib/parser/inp2q.c: inp.c, inp2q.c improve error message when we exit() in batch mode due to a missing model definition 2014-01-06 rlar * src/frontend/inp.c: workaround, avoid batch termination when there are .model issues these were introduced by commit "inp.c, evtinit.c: improved error message suggested by Calin Andrian" and caused ngspice checks to fail unexpectedly 2014-01-05 dwarning * tests/hisim/nmos/qaSpec, * tests/hisim/pmos/qaSpec, * tests/hisimhv1/nmos/qaSpec.basic, * tests/hisimhv1/pmos/qaSpec.basic: correct parameter names for hisim qa checks 2014-01-05 h_vogt * src/frontend/plotting/gnuplot.c: gnuplot.c: enable correct terminal for non MINGW/MSVC 2014-01-03 rlar * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c: tfanal.c noisean.c, bug fix which was introduced in "CKTfndDev(), rewrite" the original CKTfndDev() was able to limit its search for an instance with given name to instances of a certain "type" (this was a speed optimisation which is of no use anymore, because we use a hashtable now) the new CKTfndDev() does not consider "type" thus, here in tfanal.c and noisean.c we have to check the "type" after CKTfndDev() since we no longer can limit its search to the given "type" 2014-01-04 h_vogt * src/frontend/variable.c: variable.c: prevent buffer overflow by limiting variable output to BSIZE_SP characters 2014-01-03 h_vogt * src/include/ngspice/cm.h: cm.h: add config.h to access #defines 2014-01-03 h_vogt * src/frontend/com_ghelp.c: com_ghelp.c: add info on non-availability of help to console versions w/o X display. 2013-12-30 rlar * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/square/ifspec.ifs, * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/analog/triangle/ifspec.ifs: analog/{square,triangle}, store boolean tran_init in STATIC_VAR itself 2013-12-30 rlar * src/xspice/icm/analog/sine/cfunc.mod, * src/xspice/icm/analog/sine/ifspec.ifs, * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/xtradev/core/cfunc.mod, * src/xspice/icm/xtradev/core/ifspec.ifs: analog/{sine,square,triangle}, xtradev/core, change array access avoid copy of parameter array, which would need to be freed to avoid a memory leak this is a modified and partial version of a patch provided by Krzysztof Blaszkowski 2013-12-30 rlar * src/xspice/icm/analog/sine/cfunc.mod, * src/xspice/icm/analog/sine/sin.h, * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/square/square.h, * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/analog/triangle/triangle.h, * src/xspice/icm/xtradev/core/cfunc.mod, * src/xspice/icm/xtradev/core/core.h: analog/{sine,square,triangle}, xtradev/core, drop .h files 2013-12-30 rlar * src/xspice/icm/analog/sine/cfunc.mod, * src/xspice/icm/analog/sine/ifspec.ifs, * src/xspice/icm/analog/sine/sin.h, * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/square/ifspec.ifs, * src/xspice/icm/analog/square/square.h, * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/analog/triangle/ifspec.ifs, * src/xspice/icm/analog/triangle/triangle.h, * src/xspice/icm/xtradev/core/cfunc.mod, * src/xspice/icm/xtradev/core/core.h, * src/xspice/icm/xtradev/core/ifspec.ifs: analog/{sine,square,triangle}, xtradev/core, whitespace cleanup 2013-12-16 dwarning * examples/various/FFT_Leakage.cir, * examples/various/FFT_tests.cir: two examples to show fft/ifft vector command 2013-12-03 dwarning * src/frontend/trannoise/1-f-code.c: 1-f-code.c, correct the printout for noise generation 2013-12-02 dwarning * src/frontend/trannoise/1-f-code.c, * src/spicelib/devices/isrc/isrcacct.c, * src/spicelib/devices/vsrc/vsrcacct.c: 1-f-code.c, use fftw3 2013-12-02 dwarning * src/frontend/com_fft.c: com_fft.c, set hanning as default window 2013-12-02 dwarning * src/frontend/com_fft.c: com_fft.c, rename variable `tlen' --> `length' 2013-11-25 dwarning * src/frontend/com_fft.c: com_fft.c, correct array size and relay to specific array order for r2c transformation 2013-11-24 dwarning * src/frontend/com_fft.c: com_fft.c, use FFTW3 for com_fft() and com_psd() 2013-11-24 dwarning * src/include/ngspice/fftext.h, * src/maths/fft/fftext.c: fftext.c, move the Bourke FFT code to fftext.c (rename macro) 2013-11-24 dwarning * src/frontend/com_fft.c, * src/include/ngspice/fftext.h, * src/maths/fft/fftext.c: fftext.c, move the Bourke FFT code to fftext.c (as a backup) 2013-11-21 dwarning * src/maths/cmaths/cmath4.c: cmath4.c, drop unused doubledouble() 2013-11-25 dwarning * src/maths/cmaths/cmath4.c: cmath4.c, correct array size and relay to specific array order for r2c transformation 2013-11-21 dwarning * src/maths/cmaths/cmath4.c: cmath4.c, correct scale for ifft 2013-11-21 dwarning * configure.ac, * src/maths/cmaths/cmath4.c: cmath4.c, use FFTW3 for cx_fft() and cx_ifft() 2013-12-29 h_vogt * visualc/.gitignore, * visualc/fftw3/fftw-3.3.3-dll32/README-ngspice.txt, * visualc/fftw3/fftw-3.3.3-dll64/README-ngspice.txt, * visualc/vngspice_fftw.sln, * visualc/vngspice_fftw.vcproj: VC project with FFTW3 library enabled 2013-11-21 dwarning * visualc/vngspice_fftw.sln, * visualc/vngspice_fftw.vcproj: visualc, copy to new project which uses the FFTW3 library 2013-11-24 dwarning * src/frontend/com_fft.c, * src/maths/cmaths/cmath4.c: cmath4.c, com_fft.c, cleanup 2013-11-24 dwarning * src/frontend/com_fft.c, * src/maths/cmaths/cmath4.c: cmath4.c, com_fft.c, rename `size' --> `N' and `mm' --> `M' 2013-12-31 rlar * .gitignore, * visualc-shared/.gitignore, * visualc/.gitignore: polish .gitignore 2013-12-31 h_vogt * visualc/vngspice.vcproj: bugfix: add CONFIG64 to console64/debug 2013-12-29 h_vogt * visualc/vngspice.sln, * visualc/vngspice.vcproj: VC project, output directory "64" 2013-12-30 h_vogt * src/maths/poly/polyfit.c: polyfit.c, speed up fitting process when degree == 1 this patch war provided by Henrik Forstén in "#14 Special case for polyfit, move initw()" http://sourceforge.net/p/ngspice/patches/14/ 2013-12-28 h_vogt * src/frontend/inpcom.c: inpcom.c: allow node names and .func parameters having equal string representation 2013-12-30 h_vogt * src/frontend/outitf.c, * src/main.c: main.c, suppress progress report when '-o' is used to redirect output 2013-12-30 h_vogt * src/main.c: main.c, fix stdout and stderr redirection and buffering with regard to '-o' and '-p' in response to a bug report from Johann Glaser "#259 Pipe mode: buffering" http://sourceforge.net/p/ngspice/bugs/259/ 2013-12-27 h_vogt * src/frontend/inpcom.c: inpcom.c: enable .include with $end-of-line in .control section 2013-12-27 dwarning * tests/bsim4/nmos/qaSpec, * tests/bsim4/pmos/qaSpec: correct bsim4 parameter mobmod 2013-12-22 h_vogt * src/include/ngspice/ngspice.h: C99 functions are only available in MSVC 2013 and newer. Still needs testing! 2013-12-16 rlar * src/spicelib/parser/ptfuncs.c: ptfuncs.c, drop inaccurate replacements for ashinh() acosh() and atanh() 2013-12-16 rlar * src/frontend/numparam/xpressn.c, * src/include/ngspice/ngspice.h, * tests/regression/parser/xpressn-1.cir, * visualc/msvc-compat.c: xpressn.c, introduce fortran style nint() rounding function 2013-12-22 rlar * configure.ac, * src/frontend/subckt.c, * tests/regression/Makefile.am, * tests/regression/subckt-processing/Makefile.am, * tests/regression/subckt-processing/model-scope-5.cir, * tests/regression/subckt-processing/model-scope-5.out: subckt.c, fix .model processing (scope) 2013-12-21 h_vogt * src/frontend/inpcom.c: enable parameter replacement in R, L, C lines, if equation is without {} and not in a subcircuit 2013-12-21 h_vogt * src/frontend/inpcom.c: inpcom.c: allow proper 'temper' substitution if device name and parameter name are the same, or if parameter name is the last token in the line. 2013-12-21 h_vogt * src/frontend/inp.c: inp.c: evaluate for 'temper' only the models which have been entered into the hash table ckt->MODnameHash 2013-12-17 h_vogt * src/spicelib/analysis/dctran.c: dctran.c bug fix, reported by Berk Özer 2013-12-14 h_vogt * src/frontend/inpcom.c: inpcom.c remove bug: parens around equation h, f add equation + temper capability to gain of F-Source 2013-12-13 h_vogt * src/frontend/inpcom.c: inpcom.c: H Source with equation and temper in transresistance 2013-12-17 h_vogt * visualc-shared/sharedspice.vcproj: sharedspice.vcproj, add soa 2013-12-07 dwarning * examples/various/modelcard.nmos, * examples/various/modelcard.pmos, * examples/various/nic_soa.cir: soa check example 2013-10-31 dwarning * src/spicelib/devices/vbic/Makefile.am, * src/spicelib/devices/vbic/vbic.c, * src/spicelib/devices/vbic/vbicdefs.h, * src/spicelib/devices/vbic/vbicext.h, * src/spicelib/devices/vbic/vbicinit.c, * src/spicelib/devices/vbic/vbicmask.c, * src/spicelib/devices/vbic/vbicmpar.c, * src/spicelib/devices/vbic/vbicsetup.c, * src/spicelib/devices/vbic/vbicsoachk.c, * visualc/vngspice.vcproj: devices/vbic, implement VBICsoaCheck() 2013-10-31 dwarning * src/spicelib/devices/hisim2/Makefile.am, * src/spicelib/devices/hisim2/hsm2.c, * src/spicelib/devices/hisim2/hsm2def.h, * src/spicelib/devices/hisim2/hsm2ext.h, * src/spicelib/devices/hisim2/hsm2init.c, * src/spicelib/devices/hisim2/hsm2mask.c, * src/spicelib/devices/hisim2/hsm2mpar.c, * src/spicelib/devices/hisim2/hsm2set.c, * src/spicelib/devices/hisim2/hsm2soachk.c, * visualc/vngspice.vcproj: devices/hisim2, implement HSM2soaCheck() 2013-10-30 dwarning * src/spicelib/devices/hisimhv1/Makefile.am, * src/spicelib/devices/hisimhv1/hsmhv.c, * src/spicelib/devices/hisimhv1/hsmhvdef.h, * src/spicelib/devices/hisimhv1/hsmhvext.h, * src/spicelib/devices/hisimhv1/hsmhvinit.c, * src/spicelib/devices/hisimhv1/hsmhvmask.c, * src/spicelib/devices/hisimhv1/hsmhvmpar.c, * src/spicelib/devices/hisimhv1/hsmhvset.c, * src/spicelib/devices/hisimhv1/hsmhvsoachk.c, * visualc/vngspice.vcproj: devices/hisimhv1, implement HSMHVsoaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsimsoi/Makefile.am, * src/spicelib/devices/bsimsoi/b4soi.c, * src/spicelib/devices/bsimsoi/b4soidef.h, * src/spicelib/devices/bsimsoi/b4soiext.h, * src/spicelib/devices/bsimsoi/b4soiinit.c, * src/spicelib/devices/bsimsoi/b4soimask.c, * src/spicelib/devices/bsimsoi/b4soimpar.c, * src/spicelib/devices/bsimsoi/b4soiset.c, * src/spicelib/devices/bsimsoi/b4soisoachk.c, * visualc/vngspice.vcproj: devices/bsimsoi, implement B4SOIsoaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsim4v6/Makefile.am, * src/spicelib/devices/bsim4v6/b4v6.c, * src/spicelib/devices/bsim4v6/b4v6mask.c, * src/spicelib/devices/bsim4v6/b4v6mpar.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/b4v6soachk.c, * src/spicelib/devices/bsim4v6/bsim4v6def.h, * src/spicelib/devices/bsim4v6/bsim4v6ext.h, * src/spicelib/devices/bsim4v6/bsim4v6init.c, * visualc/vngspice.vcproj: devices/bsim4v6, implement BSIM4v6soaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsim4v5/Makefile.am, * src/spicelib/devices/bsim4v5/b4v5.c, * src/spicelib/devices/bsim4v5/b4v5mask.c, * src/spicelib/devices/bsim4v5/b4v5mpar.c, * src/spicelib/devices/bsim4v5/b4v5set.c, * src/spicelib/devices/bsim4v5/b4v5soachk.c, * src/spicelib/devices/bsim4v5/bsim4v5def.h, * src/spicelib/devices/bsim4v5/bsim4v5ext.h, * src/spicelib/devices/bsim4v5/bsim4v5init.c, * visualc/vngspice.vcproj: devices/bsim4v5, implement BSIM4v5soaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsim4/Makefile.am, * src/spicelib/devices/bsim4/b4.c, * src/spicelib/devices/bsim4/b4mask.c, * src/spicelib/devices/bsim4/b4mpar.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4/b4soachk.c, * src/spicelib/devices/bsim4/bsim4def.h, * src/spicelib/devices/bsim4/bsim4ext.h, * src/spicelib/devices/bsim4/bsim4init.c, * visualc/vngspice.vcproj: devices/bsim4, implement BSIM4soaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsim3v32/Makefile.am, * src/spicelib/devices/bsim3v32/b3v32.c, * src/spicelib/devices/bsim3v32/b3v32mask.c, * src/spicelib/devices/bsim3v32/b3v32mpar.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim3v32/b3v32soachk.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h, * src/spicelib/devices/bsim3v32/bsim3v32ext.h, * src/spicelib/devices/bsim3v32/bsim3v32init.c, * visualc/vngspice.vcproj: devices/bsim3v32, implement BSIM3v32soaCheck() 2013-10-30 dwarning * src/spicelib/devices/bsim3/Makefile.am, * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3mask.c, * src/spicelib/devices/bsim3/b3mpar.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3soachk.c, * src/spicelib/devices/bsim3/bsim3def.h, * src/spicelib/devices/bsim3/bsim3ext.h, * src/spicelib/devices/bsim3/bsim3init.c, * visualc/vngspice.vcproj: devices/bsim3, implement BSIM3soaCheck() 2013-11-01 dwarning * src/spicelib/devices/bjt/Makefile.am, * src/spicelib/devices/bjt/bjt.c, * src/spicelib/devices/bjt/bjtdefs.h, * src/spicelib/devices/bjt/bjtext.h, * src/spicelib/devices/bjt/bjtinit.c, * src/spicelib/devices/bjt/bjtmask.c, * src/spicelib/devices/bjt/bjtmpar.c, * src/spicelib/devices/bjt/bjtsetup.c, * src/spicelib/devices/bjt/bjtsoachk.c, * visualc/vngspice.vcproj: devices/bjt, implement BJTsoaCheck() 2013-10-30 dwarning * src/spicelib/devices/dio/Makefile.am, * src/spicelib/devices/dio/dio.c, * src/spicelib/devices/dio/diodefs.h, * src/spicelib/devices/dio/dioext.h, * src/spicelib/devices/dio/dioinit.c, * src/spicelib/devices/dio/diomask.c, * src/spicelib/devices/dio/diompar.c, * src/spicelib/devices/dio/diosetup.c, * src/spicelib/devices/dio/diosoachk.c, * visualc/vngspice.vcproj: devices/dio, implement DIOsoaCheck() 2013-10-30 dwarning * src/spicelib/devices/cap/Makefile.am, * src/spicelib/devices/cap/cap.c, * src/spicelib/devices/cap/capask.c, * src/spicelib/devices/cap/capdefs.h, * src/spicelib/devices/cap/capext.h, * src/spicelib/devices/cap/capinit.c, * src/spicelib/devices/cap/capmask.c, * src/spicelib/devices/cap/capmpar.c, * src/spicelib/devices/cap/capparam.c, * src/spicelib/devices/cap/capsetup.c, * src/spicelib/devices/cap/capsoachk.c, * visualc/vngspice.vcproj: devices/cap, implement CAPsoaCheck() 2013-10-30 dwarning * src/spicelib/devices/res/Makefile.am, * src/spicelib/devices/res/res.c, * src/spicelib/devices/res/resask.c, * src/spicelib/devices/res/resdefs.h, * src/spicelib/devices/res/resext.h, * src/spicelib/devices/res/resinit.c, * src/spicelib/devices/res/resmask.c, * src/spicelib/devices/res/resmpar.c, * src/spicelib/devices/res/resparam.c, * src/spicelib/devices/res/ressetup.c, * src/spicelib/devices/res/ressoachk.c, * visualc/vngspice.vcproj: devices/res, implement RESsoaCheck() 2013-11-01 rlar * src/include/ngspice/cktdefs.h, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/cktsoachk.c: introduce CKTsoaInit() 2013-10-30 dwarning * src/frontend/inp.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ngspice.h, * src/main.c, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/Makefile.am, * src/spicelib/devices/cktsoachk.c, * src/spicelib/devices/devsup.c, * visualc/vngspice.vcproj: implement CKTsoaCheck() 2013-10-30 dwarning * src/include/ngspice/devdefs.h, * src/spicelib/devices/adms/admst/ngspiceMODULEinit.c.xml, * src/spicelib/devices/asrc/asrcinit.c, * src/spicelib/devices/bjt/bjtinit.c, * src/spicelib/devices/bsim1/bsim1init.c, * src/spicelib/devices/bsim2/bsim2init.c, * src/spicelib/devices/bsim3/bsim3init.c, * src/spicelib/devices/bsim3soi_dd/b3soiddinit.c, * src/spicelib/devices/bsim3soi_fd/b3soifdinit.c, * src/spicelib/devices/bsim3soi_pd/b3soipdinit.c, * src/spicelib/devices/bsim3v0/bsim3v0init.c, * src/spicelib/devices/bsim3v1/bsim3v1init.c, * src/spicelib/devices/bsim3v32/bsim3v32init.c, * src/spicelib/devices/bsim4/bsim4init.c, * src/spicelib/devices/bsim4v4/bsim4v4init.c, * src/spicelib/devices/bsim4v5/bsim4v5init.c, * src/spicelib/devices/bsim4v6/bsim4v6init.c, * src/spicelib/devices/bsimsoi/b4soiinit.c, * src/spicelib/devices/cap/capinit.c, * src/spicelib/devices/cccs/cccsinit.c, * src/spicelib/devices/ccvs/ccvsinit.c, * src/spicelib/devices/cpl/cplinit.c, * src/spicelib/devices/csw/cswinit.c, * src/spicelib/devices/dio/dioinit.c, * src/spicelib/devices/hfet1/hfetinit.c, * src/spicelib/devices/hfet2/hfet2init.c, * src/spicelib/devices/hisim2/hsm2init.c, * src/spicelib/devices/hisimhv1/hsmhvinit.c, * src/spicelib/devices/ind/indinit.c, * src/spicelib/devices/isrc/isrcinit.c, * src/spicelib/devices/jfet/jfetinit.c, * src/spicelib/devices/jfet2/jfet2init.c, * src/spicelib/devices/ltra/ltrainit.c, * src/spicelib/devices/mes/mesinit.c, * src/spicelib/devices/mesa/mesainit.c, * src/spicelib/devices/mos1/mos1init.c, * src/spicelib/devices/mos2/mos2init.c, * src/spicelib/devices/mos3/mos3init.c, * src/spicelib/devices/mos6/mos6init.c, * src/spicelib/devices/mos9/mos9init.c, * src/spicelib/devices/nbjt/nbjtinit.c, * src/spicelib/devices/nbjt2/nbt2init.c, * src/spicelib/devices/ndev/ndevinit.c, * src/spicelib/devices/numd/numdinit.c, * src/spicelib/devices/numd2/numd2init.c, * src/spicelib/devices/numos/numosinit.c, * src/spicelib/devices/res/resinit.c, * src/spicelib/devices/soi3/soi3init.c, * src/spicelib/devices/sw/swinit.c, * src/spicelib/devices/tra/trainit.c, * src/spicelib/devices/txl/txlinit.c, * src/spicelib/devices/urc/urcinit.c, * src/spicelib/devices/vbic/vbicinit.c, * src/spicelib/devices/vccs/vccsinit.c, * src/spicelib/devices/vcvs/vcvsinit.c, * src/spicelib/devices/vsrc/vsrcinit.c, * src/xspice/cmpp/writ_ifs.c: introduce new SPICEdev operation `DEVsoaCheck()' 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, drop cp_tildexpand() in expand_this(), inp_pathresolve_at() shall do this 2013-08-04 rlar * src/frontend/inpcom.c: inpcom.c, rewrite .lib reading use canonical file names to remember known .lib files remember their directories in `habitat' use inp_pathresolve_at() to find .lib files with regard to `searchpath' and current directory 2013-07-31 rlar * src/frontend/inpcom.c: inpcom.c, recurse expand_section_ref() 2013-07-31 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, whitespace cleanup 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, reorder 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, introduce expand_section_ref() 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, simplify `.include' file processing using inp_pathresolve_at() 2013-08-03 rlar * src/frontend/inpcom.c: inpcom.c, introduce inp_pathresolve_at() 2013-10-24 h_vogt * src/misc/tilde.c: tilde.c, enable search for home dir under MS Windows 2013-10-31 rlar * src/frontend/inpcom.c: inpcom.c, introduce inp_pathresolve(), rewrite inp_pathopen() using this 2013-10-25 h_vogt * src/frontend/inpcom.c: inpcom.c, for mingw absolute pathnames may begin with /d/ allow this when variable 'mingwpath' is set in .spinit 2013-11-09 h_vogt * src/frontend/inpcom.c, * src/main.c: inpcom.c, remove variable "sourcefile" and references to "sourcefile" this will no longer be required for access to input file residing in the executable's directory 2013-10-31 rlar * src/frontend/inpcom.c: inpcom.c, fix inp_pathopen(), always try to fopen() relative to the current working directory first 2013-10-31 rlar * src/frontend/inpcom.c: inpcom.c, fix inp_pathopen(), relative path shall be expanded regarding "sourcepath" 2013-12-08 rlar * src/frontend/inpcom.c: inpcom.c, simplify using is_plain_filename(), fix incorrect comments 2013-12-08 rlar * src/frontend/inpcom.c: inpcom.c, implement is_absolute_pathname() and is_plain_filename() 2013-12-11 h_vogt * src/spicelib/devices/dev.c: remove redundant #include 2013-12-11 h_vogt * src/frontend/inp.c, * src/xspice/evt/evtinit.c: inp.c, evtinit.c: improved error message suggested by Calin Andrian 2013-12-11 h_vogt * src/frontend/inp.c: prevent crash, if due to input bug ckt is not created, reported by Andrian 2013-12-08 rlar * src/xspice/icm/GNUmakefile.in, * src/xspice/icm/makedefs.in: xspice, move `-lm' to the end of the linker command line 2013-12-07 h_vogt * src/frontend/numparam/xpressn.c, * src/include/ngspice/ngspice.h, * visualc-shared/sharedspice.vcproj, * visualc/msvc-compat.c, * visualc/vngspice.vcproj: replacements for functions missing in the msvc world 2013-12-05 Calin Andrian * src/xspice/mif/mifgetvalue.c: MIFget_boolean(), allow numeric values 0 and 1 too 2013-12-05 Anthony J. Bentley * src/maths/misc/randnumb.c: remove unnecessary include of sys/timeb.h. 2013-12-05 Anthony J. Bentley * man/man1/ngmultidec.1, * man/man1/ngnutmeg.1, * man/man1/ngsconvert.1, * man/man1/ngspice.1: man page fixes. - Start new sentences on a new line, so that troff gets inter-sentence spacing correct. - Remove unterminated quotation mark. - Replace no-longer-defined "spice" macro with a literal string. - Remove trailing whitespace. - Close literal contexts instead of letting them propagate throughout an entire section. 2013-11-09 rlar * configure.ac, * tests/regression/Makefile.am, * tests/regression/parser/Makefile.am, * tests/regression/parser/minus-minus.cir, * tests/regression/parser/minus-minus.out, * tests/regression/parser/xpressn-1.cir, * tests/regression/parser/xpressn-1.out, * tests/regression/parser/xpressn-2.cir, * tests/regression/parser/xpressn-2.out: tests/regression/parser check xpressn.c parser capability to parse {2--3} check .control parser capability to parse 2--3 check B parser capability to parse 2--3 check echo commands capability to print "--" check echo commands capability to print upper and lower case check xpressn.c parser capabilities check precision of some transcendental functions 2013-11-08 rlar * tests/regression/lib-processing/ex1a.out, * tests/regression/lib-processing/ex1b.out, * tests/regression/lib-processing/ex2a.out, * tests/regression/lib-processing/ex3a.out: tests/regression/lib-processing, fix upper/lower case 2013-11-09 rlar * src/frontend/numparam/spicenum.c, * src/frontend/numparam/xpressn.c: numparam, almost full precision for stringified double float numbers 2013-11-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, drop initkeys() 2013-11-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, drop "AND OR NOT DIV MOD DEFINED" keywords 2013-11-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, use C strings for the arguments of `keywords()' 2013-11-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, drop '&' and '|' operators, (we have '&&' and '||') 2013-11-07 rlar * src/frontend/inpcom.c: inpcom.c, exclude currently unused functions 2013-11-07 rlar * src/frontend/inpcom.c: inpcom.c, drop ternary_fcn code in inpcom.c, the extended "formula" shall process ternary expressions 2013-11-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, whitespace cleanup 2013-10-15 rlar * src/frontend/numparam/xpressn.c: xpressn.c, implement a?b:c in the "formula" parser 2013-12-01 rlar * src/frontend/numparam/xpressn.c: xpressn.c, drop XFU_V probably accidentally introduced in commit > Author: h_vogt > Date: Sun Feb 7 11:27:59 2010 +0000 > > improved numparam error message 2013-12-01 rlar * src/frontend/numparam/xpressn.c: xpressn.c, use enums instead of literals 2013-12-01 rlar * src/frontend/numparam/numparam.h, * src/frontend/numparam/xpressn.c: xpressn.c, drop "Defd" enum, to be incorporated into a bigger enum 2013-11-24 rlar * src/frontend/numparam/numparam.h, * src/frontend/numparam/xpressn.c: xpressn.c, fix semantics of `int(x)' and remove dangerous macros int(x) most probably shall be trunc(x) instead of floor(x) note trunc(x) was #defined beeing floor(x) note ln(x) was #defined beeing log(x) 2013-11-29 rlar * src/frontend/numparam/general.h, * src/frontend/numparam/mystring.c, * src/frontend/numparam/nupatest.c, * src/frontend/numparam/spicenum.c: fix an endless loop waiting for y/n when the input is at EOF reported by Calin Andrian Subject: [Ngspice-devel] Invaild number bug 2013-11-01 rlar * src/frontend/numparam/xpressn.c: xpressn.c, fix semantics of '&&' and '||' these shall interpret a value as a bool according to (value != 0) and these shall evaluate to either 1.0 or 0.0 2013-11-01 rlar * src/frontend/numparam/xpressn.c: xpressn.c, whitespace cleanup 2013-11-01 rlar * src/frontend/numparam/xpressn.c: xpressn.c, fix `truth' for ternary_fcn() 0.0 is `false', everything else is `true' 2013-11-23 rlar * src/frontend/parse-bison.c, * src/frontend/parse-bison.h, * src/spicelib/parser/inpptree-parser.c, * src/spicelib/parser/inpptree-parser.h: update bison generated files 2013-11-20 rlar * src/frontend/parse-bison.y, * src/spicelib/parser/inpptree-parser.y: .control and `B' parser, fix precedence of '-' versus '^' -2^2 shall be -(2^2) instead of (-2)^2 2013-11-23 h_vogt * src/frontend/trannoise/1-f-code_d.c, * src/frontend/trannoise/Makefile.am: remove unused code 2013-11-18 rlar * src/spicelib/devices/hisim2/hsm2eval.c, * src/spicelib/devices/hisimhv1/hsmhveval.c: devices/hisimhv1, devices/hisim2, avoid overlapping globals TMF1 ... TMF6 reported by James Jackson in message: [Ngspice-users] Problem building git head --with-ngspice Mac OS X 2013-11-16 rlar * src/maths/misc/isinf.c, * src/misc/dup2.c: avoid overlapping "Dummy" symbols reported by James Jackson in message: [Ngspice-users] Problem building git head --with-ngspice Mac OS X 2013-11-03 rlar * src/frontend/inpcom.c: inpcom.c, add missing condition `!comfile' for .title and .end processing 2013-11-03 dwarning * src/spicelib/analysis/cktsens.c: correct the step incrementing type to SENS_LINEAR 2013-11-02 h_vogt * src/frontend/inpcom.c: fix criterion to start `.lib' and `.global gnd' processing 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c: MSVC compatibility 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #7/7, drop misleading comment 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #6/7, tautology `call_depth == 0' 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #5/7, use `rv . line_number' itself 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #4/7, move inp_read() epilog to inp_readall() 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #3/7, return `line_number' too 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_readall() #2/7, move inp_read() prolog to inp_readall() 2013-06-02 rlar * src/frontend/device.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/nutinp.c, * src/include/ngspice/fteext.h: inpcom.c, cleanup inp_readall() #1/7, introduce inp_read() 2013-11-02 rlar * src/frontend/inpcom.c: bug fix, .include and .lib files don't have a `title' line 2013-11-02 dwarning * src/spicelib/devices/cap/capask.c, * src/spicelib/devices/ind/indask.c: add missing tc1 and tc2 parameter entries in ask function 2013-11-02 dwarning * src/spicelib/devices/cap/capask.c, * src/spicelib/devices/ind/indask.c: whitespaces 2013-10-31 dwarning * src/spicelib/devices/vbic/vbicdefs.h: fix an overlap in parameter definitions 2013-10-28 rlar * src/main.c: cleanup getopt_long() options 2013-07-31 rlar * src/frontend/inpcom.c: read_a_lib(), drop call_depth, its always zero 2013-07-31 rlar * src/frontend/inpcom.c: expand_section_references(), drop call_depth, its always zero 2013-08-04 rlar * src/frontend/inpcom.c: harmonize delete_libs() 2013-10-20 h_vogt * src/frontend/inp.c, * src/frontend/measure.c, * src/frontend/numparam/spicenum.c, * src/frontend/runcoms2.c: bug reported by Yamamaya: revert deleting dicoS structure in inp.c and measure.c: still to be used by 'listing param' deletion moved to com_remcirc() 2013-10-20 h_vogt * src/frontend/inpcom.c: inpcom.c: patch provided by Krzysztof Blaszkowski Allow spaces like { token } during parameter substitution 2013-10-20 rlar * src/frontend/inpcom.c: inpcom.c, rewrite, collapsing find_lib() into read_a_lib() 2013-10-20 rlar * src/frontend/inpcom.c: inpcom.c: '$' as end-of-line comment delimiter outside of .control section, '$ ' inside of .control section, # untabify 2013-10-20 h_vogt * src/frontend/inpcom.c: inpcom.c: '$' as end-of-line comment delimiter outside of .control section, '$ ' inside of .control section 2013-10-19 h_vogt * src/frontend/inpcom.c: inpcom.c: allow special characters in function names 2013-10-19 rlar * src/frontend/inpcom.c: inpcom.c: patch provided by Simon Chang: correct function name substitution #2 2013-10-19 h_vogt * src/frontend/inpcom.c: inpcom.c: patch provided by Simon Chang: correct function name substitution 2013-10-18 rlar * src/misc/string.c: gettok_node(), use copy_substring() 2013-10-13 Krzysztof Blaszkowski * src/misc/string.c: gettok_node(), avoid segfault when *s == NULL 2013-10-13 Krzysztof Blaszkowski * src/frontend/inpcom.c: inpcom.c: avoid segfault when `TABLE' is used without parentheses 2013-10-17 rlar * src/frontend/inpcom.c: inp_stripcomments_line(), drop support for '--' comment style seems to be not common in the spice world, and interferes too much with mathematical expressions like {3--2} 2013-10-13 Krzysztof Blaszkowski * src/frontend/signal_handler.c, * src/main.c, * src/sharedspice.c, * src/tclspice.c: execute ft_sigintr_cleanup() outside of the signal handler to avoid execution of non-reentrant functions 2013-10-13 Krzysztof Blaszkowski * src/frontend/signal_handler.c, * src/frontend/signal_handler.h: abstraction, introduce ft_sigintr_cleanup() 2013-10-13 Krzysztof Blaszkowski * src/frontend/signal_handler.c: ft_sigintr(), reorder, side effect: if `ft_setflag' then gr_clean() won't be invoked and can't be invoked anyway from inside of the signal handler 2013-10-14 dwarning * src/spicelib/devices/bjt/bjtdefs.h: fix an overlap in parameter definitions 2013-10-11 Krzysztof Blaszkowski * src/maths/ni/nipred.c: nipred.c, cleanup 2013-10-11 Krzysztof Blaszkowski * src/maths/ni/nipred.c: nipred.c, bug fix NIpred() when running 'TRAPEZOIDAL' a long standing serious bug, allready in the very first commit from Date: Thu Apr 27 20:03:57 2000 +0000 Nipred() after evaluating TRAPEZOIDAL case fell through into GEAR case. see: http://sourceforge.net/p/ngspice/support-requests/18/ 2013-10-10 rlar * src/frontend/inpcom.c: revert, msvc doesn't support `#warning' 2013-10-09 h_vogt * src/frontend/inpcom.c: inpcom.c: improved character check around 'temper' 2013-10-08 rlar * src/frontend/numparam/xpressn.c: numparm, fix pow() implementation 2013-10-08 rlar * src/frontend/numparam/xpressn.c: numparm, cleanup formula() 2013-10-09 h_vogt * src/frontend/numparam/xpressn.c: xpressn.c: add domain check for acosh, atanh replacement functions 2013-10-08 rlar * src/frontend/numparam/xpressn.c: numparm, cleanup rewrite formula() 2013-10-08 h_vogt * src/frontend/numparam/xpressn.c: xpressn.c: asinh, acosh, atanh replacement functions added 2013-06-02 rlar * src/frontend/numparam/xpressn.c: xpressn.c, cleanup `maximize' operation 2013-10-08 rlar * src/frontend/numparam/xpressn.c: xpressn.c, cleanup char index bistromatic 2013-10-08 rlar * src/frontend/numparam/general.h, * src/frontend/numparam/mystring.c, * src/frontend/numparam/xpressn.c, * src/include/ngspice/dstring.h, * src/misc/dstring.c: sprinkle some constness 2013-10-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, use symbolic `state' constants 2013-10-07 rlar * src/frontend/numparam/xpressn.c: xpressn.c, prepare 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, emphasize the inp_readall() tail processing 2013-03-06 rlar * src/frontend/inpcom.c: inpcom.c, delete_libs() can use line_free_x() now 2013-03-06 rlar * src/frontend/inp.c: line_free_x(), prevent stack overflow due to non-trivial recursion 2013-03-06 rlar * src/frontend/inpcom.c: inpcom.c, local scope for `ipc_status' 2013-10-05 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str, pinpoint serious bugs 2013-10-05 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str, use a local variable to improve readability 2013-10-05 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str, use `copy_substring()' 2013-10-05 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str, limit backward search 2013-10-05 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str, cleanup 2013-10-04 rlar * src/frontend/numparam/xpressn.c: xpressn.c, tan, asin, acos, atan, asinh, acosh, atanh, pwr, tanh add tan() asin() acos() atan() asinh() acosh() atanh() rewrite pwr() and tanh() 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), rewrite 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_opening_paren(), rewrite 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_opening_paren(), cleanup 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_opening_paren(), static scope instead of local C99 scope 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), abstraction, new function inp_search_opening_paren() 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), local scope for str_ptr3 2013-10-03 rlar * src/frontend/inpcom.c: cleanup 2013-10-03 rlar * src/frontend/inpcom.c: cleanup 2013-10-03 h_vogt * src/frontend/inpcom.c: inpcom.c: repeated call to inp_fix_ternary_operator_str in inp_fix_ternary_operator, only lines beginning with . selected, comments updated 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), rewrite using strchr() 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), finally fold them 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), rewrite, considering the assertion 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), increase similarity 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), rewrite 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), rewrite 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), rewrite 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), cleanup 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), drop found_paren, its always true 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), cleanup 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), cleanup 2013-10-03 rlar * src/frontend/inpcom.c: inp_search_closing_paren(), static scope instead of local C99 scope 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), abstraction, new function inp_search_closing_paren() 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), prepare for abstraction 2013-10-03 rlar * src/frontend/inpcom.c: inp_fix_ternary_operator_str(), local scope for `count' 2013-10-02 h_vogt * src/frontend/inpcom.c: inpcom.c: hot fix for ternary function for numparam 2013-10-02 rlar * src/tclspice.c: use Tcl_SetObjResult() instead of poking into Tcl_Interp.result 2013-10-01 rlar * src/frontend/outitf.c: avoid `enumerated type mixed with another type' compiler warning 2013-10-01 rlar * src/maths/sparse/spalloc.c: avoid a `constant expression' compiler warning 2013-10-01 h_vogt * src/frontend/inpcom.c: inpcom.c: some cleanups 2013-10-01 rlar * src/frontend/control.c, * src/main.c: avoid `unreachable code' warnings 2013-10-01 rlar * src/frontend/trannoise/FastNorm3.c: FastNorm3.c, use int32_t for some 32 bit specific operations 2013-10-01 rlar * src/xspice/evt/evtinit.c, * src/xspice/mif/mifgetmod.c: fix incorrect fprintf() usage 2013-10-01 h_vogt * src/frontend/inpcom.c: inpcom.c: plug a memory leak, add some comments 2013-09-30 dwarning * src/frontend/com_fft.c: remove unused variable sign 2013-09-29 h_vogt * src/spicelib/parser/inp2m.c: inp2m.c: plug memory leak 2013-09-29 h_vogt * src/spicelib/parser/inp2m.c: inp2m.c: indentation 2013-09-29 h_vogt * src/frontend/inpcom.c: inpcom.c: plug two memory leaks 2013-09-25 h_vogt * src/sharedspice.c, * src/spicelib/analysis/dctran.c: dctran.c, sharedspice.c: function sharedsync has modified parameter list 2013-09-16 dwarning * src/spicelib/devices/cap/capparam.c, * src/spicelib/devices/dio/dioparam.c, * src/spicelib/devices/res/resparam.c: allow geometry scaling by option `scale' 2013-09-16 dwarning * src/spicelib/devices/cpl/cplload.c: index `i' was definitively overwritten 2013-09-15 dwarning * examples/TransmissionLines/cpl_ibm3.sp: suppress a warning by inserting the default diode model 2013-09-14 h_vogt * src/frontend/inpcom.c: inpcom.c: exclude command 'echo' and some others from lower case letter transformation 2013-09-14 h_vogt * src/frontend/numparam/numparam.h, * src/frontend/numparam/xpressn.c: xpressn.c, numparam.h: fcn del_attrib with void* argument, required by nghash_free() 2013-09-14 h_vogt * src/frontend/inpcom.c: inpcom.c: move delete_libs to a safer place outside of recursions 2013-09-14 dwarning * src/spicelib/devices/bsim4/b4par.c, * src/spicelib/devices/bsimsoi/b4soipar.c, * src/spicelib/devices/hisim2/hsm2par.c, * src/spicelib/devices/hisimhv1/hsmhvpar.c, * src/spicelib/devices/mos1/mos1par.c, * src/spicelib/devices/mos2/mos2par.c, * src/spicelib/devices/mos3/mos3par.c: allow geometry scaling by option `scale' 2013-09-14 h_vogt * src/frontend/inpcom.c: inpcom.c: add fcn delete_libs to free libraries[] 2013-09-13 h_vogt * src/frontend/inpcom.c: inpcom.c: plug memory leak 2013-09-12 rlar * src/frontend/inpcom.c: inp_expand_macro_in_str() needs recursive invocation to expand macros 2013-09-12 rlar * src/frontend/inpcom.c: counteract the tfree(macro_str) introduced in 'inpcom.c: plug memory leaks' this one: commit 810f72f850f8177275f17fc635d97b71b911ec0d Author: h_vogt Date: Sun Sep 8 13:01:26 2013 +0200 inpcom.c: plug memory leaks 2013-09-11 h_vogt * src/frontend/inpcom.c: inpcom.c: fix a bug in ternary function 2013-09-11 h_vogt * src/frontend/inpcom.c: inpcom.c: cleanup 2013-09-10 h_vogt * src/frontend/inpcom.c: inpcom.c: further inprovement of 'temper', but still not there: problem with replacement of .func (nesting?) 2013-09-11 h_vogt * src/frontend/inpcom.c: inpcom.c: dynamic array size in `inp_split_multi_param_lines()' 2013-09-08 h_vogt * src/frontend/inpcom.c: inpcom.c: remove name_buf length limitation 2013-09-08 h_vogt * src/frontend/inp.c, * src/frontend/inpcom.c: inp.c, inpcom.c: improved debug printout debug-outx.txt 2013-09-08 h_vogt * src/spicelib/parser/inp2m.c: inp2m.c: plug a small memory leak 2013-09-08 h_vogt * src/frontend/inpcom.c: inpcom.c: plug memory leaks 2013-09-08 h_vogt * src/frontend/inpcom.c: inpcom.c: plug a memory leak 2013-09-07 h_vogt * src/frontend/inpcom.c: inpcom.c: `rewrite expand_section_references()' 2013-09-07 h_vogt * src/frontend/inpcom.c: inpcom.c: fix huge memory leak during library handling 2013-09-07 h_vogt * src/frontend/inpcom.c: inpcom.c: plug memory leak 2013-09-05 h_vogt * src/frontend/inpcom.c: inpcom.c: patch by Simon Chang added, severe trash code identified, to be repaired. 2013-09-05 h_vogt * src/frontend/inpcom.c: inpcom.c: comment added 2013-09-05 h_vogt * src/frontend/inp.c: inp.c: inp_parse_temper(), plug memory leak 2013-09-05 h_vogt * src/frontend/inpcom.c: inpcom.c: simplify a condition in `inp_fix_for_numparam()' 2013-09-05 h_vogt * src/frontend/inpcom.c: inpcom.c: modify only subckt used 2013-09-04 h_vogt * src/frontend/inpcom.c: inpcom.c: plug memory leaks in new TEMPER code 2013-09-04 h_vogt * src/frontend/inp.c, * src/frontend/inpcom.c, * src/include/ngspice/cktdefs.h, * src/spicelib/analysis/dctrcurv.c: allow 'temper' keyword in .param, .model and device instance lines inpcom.c: fcns inp_fix_temper_in_param(), inp_new_func(), inp_rem_func() to convert .param with 'temper' to .func, and replace all affected parameter tokens xxx by their func counterpart xxx() inpcom.c; fcns inp_temper_compat(), inp_modify_exp() added to prepare expression with 'temper' for numparam inp.c: fcns inp_parse_temper(), inp_parse_temper_trees() added inp_evaluate_temper() to prepare, parse and evaluate the expressions containing 'temper' cktdefs.h: add global variable to expressions with 'temper' dctrcurv.c: add fcn inp_evaluate_temper() when temp has changed 2013-09-03 h_vogt * src/include/ngspice/inpdefs.h, * src/spicelib/parser/inperrc.c: inperrc.c: new function `INPstrCat()' to concatenate two strings 2013-08-31 h_vogt * src/frontend/inpcom.c: inpcom.c: debug printout to debug-out.txt improved 2013-08-31 h_vogt * src/frontend/inpcom.c: inpcom.c: update some comments 2013-08-27 dwarning * src/frontend/com_fft.c: com_psd(), reuse the window function `fft_windows()' 2013-08-27 dwarning * src/frontend/com_fft.c, * src/frontend/inpcom.c: cleanup some compiler warnings 2013-08-27 dwarning * src/frontend/variable.c, * src/include/ngspice/cpextern.h: allow cshell $variable substitution with and without $&var 2013-08-27 h_vogt * src/spicelib/parser/inperrc.c: inperrc.c: comments added, white spaces 2013-08-27 h_vogt * src/frontend/inp.c: inp.c: comments added 2013-08-26 h_vogt * src/frontend/runcoms2.c, * src/spicelib/analysis/dctran.c: dctran.c, runcoms2.c: shared ngspice: remove plot data upon 'bg_halt' and 'remcirc' 2013-08-25 h_vogt * src/sharedspice.c: sharedspice.c: improve progress analysis 2013-08-25 h_vogt * src/frontend/misccoms.c: misccoms.c: add more deleting function in 'quit' for shared ngspice 2013-08-24 h_vogt * src/frontend/runcoms2.c: runcoms2.c: remove ci_options upon remcirc 2013-08-24 h_vogt * src/frontend/runcoms2.c: runcoms2.c: plug memory leak during remcirc 2013-08-24 h_vogt * src/spicelib/devices/bsim4/b4dest.c, * src/spicelib/devices/bsim4/b4set.c: BSIM 4.7.0 plug memory leak during remcirc 2013-08-24 h_vogt * src/spicelib/devices/bsim3v32/b3v32dest.c, * src/spicelib/devices/bsim3v32/b3v32set.c: BSIM 3.2.4 plug memory leak during remcirc 2013-08-24 h_vogt * src/spicelib/devices/bsim3/b3dest.c, * src/spicelib/devices/bsim3/b3set.c: BSIM 3.3.0 plug memory leak during remcirc 2013-08-21 h_vogt * src/frontend/runcoms2.c: runcoms2.c: plug memory leak during 'remcirc' 2013-08-21 h_vogt * src/frontend/outitf.c: outitf.c: plug memory leak 2013-08-21 h_vogt * src/frontend/numparam/numparam.h, * src/frontend/numparam/spicenum.c, * src/frontend/numparam/xpressn.c: spicenum.c, xpressn.c: plug setup memory leak by adding user defined delete function for hash table entries 2013-08-21 h_vogt * src/frontend/runcoms2.c: runcoms2.c: plug setup memory leak 2013-08-20 h_vogt * src/spicelib/devices/isrc/isrcdest.c, * src/spicelib/devices/vsrc/vsrcdest.c: vsrcdest.c, isrcdest.c: fix memory leak by freeing VSRCcoeffs, ISRCcoeffs 2013-08-20 dwarning * src/frontend/parse.c, * src/include/ngspice/fteext.h, * src/maths/cmaths/cmath1.c, * src/maths/cmaths/cmath1.h: introduce `cx_sortorder()' function 2013-08-20 h_vogt * src/frontend/runcoms2.c: runcoms2.c: set freed pointers to NULL 2013-08-20 h_vogt * src/frontend/breakp2.c: breakp2.c: plug some tiny memory leaks 2013-08-20 h_vogt * src/frontend/breakp.c: breakp.c: repair nonworking function dbfree() 2013-08-20 h_vogt * src/frontend/dotcards.c: dotcards.c: plug some memory leaks 2013-08-19 h_vogt * src/frontend/numparam/spicenum.c: spicenum.c: fix memory leak completely 2013-08-19 h_vogt * src/frontend/inp.c, * src/frontend/measure.c, * src/frontend/numparam/numpaif.h, * src/frontend/numparam/spicenum.c: remove memory leak freeing dicoS reported by Jonathan Knott 2013-08-15 dwarning * src/frontend/parse.c, * src/include/ngspice/fteext.h, * src/maths/cmaths/cmath1.c, * src/maths/cmaths/cmath1.h: introduce unwrap, minimum and maximum function 2013-08-15 dwarning * src/sharedspice.c: fix a bug on spurious output to console during fprintf reported by Evan Lavelle 2013-08-15 dwarning * src/maths/cmaths/cmath4.c: preserve vector length for fft by interpolation, window by default: none 2013-08-11 h_vogt * tests/bin/check.sh: apply patch `#17 Enable regression tests on OpenBSD' provided by Anthony J. Bentley on http://sourceforge.net/p/ngspice/patches/17/ 2013-08-10 h_vogt * src/include/ngspice/sharedspice.h, * src/sharedspice.c: sharedspice.c: modified callback interface enhanced function ngSpice_Init_Sync() three new callback functions for synchronization 2013-08-10 h_vogt * src/spicelib/analysis/dctran.c: dctran.c: synchronization option for shared library 2013-08-10 h_vogt * src/spicelib/devices/isrc/isrc.c, * src/spicelib/devices/isrc/isrcacct.c, * src/spicelib/devices/isrc/isrcdefs.h, * src/spicelib/devices/isrc/isrcload.c, * src/spicelib/devices/isrc/isrcpar.c: devices/isrc: EXTERNAL option for independent current source ISRC 2013-08-06 dwarning * src/frontend/evaluate.c, * src/frontend/parse.c, * src/include/ngspice/fteext.h, * src/maths/cmaths/cmath4.c, * src/maths/cmaths/cmath4.h: fft and ifft as vector functions 2013-08-09 dwarning * src/include/ngspice/fftext.h, * src/maths/fft/fftext.c: fix type of length in fft window function 2013-08-05 dwarning * src/maths/cmaths/cmath4.c: whitespace 2013-08-03 dwarning * src/maths/fft/fftext.c: specific MS adaption 2013-08-03 dwarning * src/frontend/com_fft.c, * src/include/ngspice/fftext.h, * src/maths/fft/fftext.c: move the `fft_windows()' function to fft/fftext.c 2013-07-30 h_vogt * src/frontend/inpcom.c: inpcom.c, rewrite .subckt parameter processing 2013-07-30 rlar * src/frontend/parser/lexical.c, * src/frontend/variable.c: fix the csh-problem $foo[$bar] and $foo[$&baz] 2013-07-30 rlar * src/frontend/parser/backq.c, * src/frontend/variable.c: cp_variablesubst() and cp_bquote(), rewrite 2013-07-30 rlar * src/frontend/parser/backq.c, * src/frontend/variable.c: cp_variablesubst() and cp_bquote(), rewrite 2013-07-28 rlar * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpdoopt.c: whitespace 2013-07-28 rlar * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/include/ngspice/fteext.h, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpapnam.c, * src/spicelib/parser/inpdoopt.c: ft_find_analysis_parm(), change signature 2013-07-28 rlar * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpapnam.c, * src/spicelib/parser/inpdoopt.c: use type `IFparm' to abbreviate some expressions 2013-07-28 rlar * src/frontend/spiceif.c: if_getstat(), rewrite 2013-07-27 rlar * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/include/ngspice/fteext.h, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpapnam.c, * src/spicelib/parser/inpdoopt.c: abstraction, new function `ft_find_analysis_parm()' 2013-07-27 rlar * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/include/ngspice/fteext.h, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpdoopt.c: abstraction, new function `ft_find_analysis()' 2013-07-27 h_vogt * src/frontend/numparam/xpressn.c: bug fix, `#248 Subcircuit call cannot have a node with same name as the subcircuit' reported by Henrik Forstén http://sourceforge.net/p/ngspice/bugs/248/ 2013-07-27 h_vogt * BUGS: ./BUGS, update the list of known bugs 2013-07-26 h_vogt * src/spicelib/devices/vsrc/vsrc.c: bug fix, `#250 "<>" in op analysis' http://sourceforge.net/p/ngspice/bugs/250/ 2013-07-24 rlar * src/frontend/com_measure2.c, * src/frontend/com_sysinfo.c, * src/frontend/spiceif.c, * src/maths/ni/niiter.c, * src/sharedspice.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/devices/cktinit.c, * src/spicelib/parser/inpgmod.c: cleanup some extra parentheses 2013-07-24 rlar * src/frontend/control.c, * src/spicelib/analysis/cktsens.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/asrc/asrcconv.c, * src/spicelib/devices/mos3/mos3dset.c, * src/spicelib/devices/mos9/mos9dset.c, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inpapnam.c: cleanup some line wraps 2013-07-24 rlar * src/spicelib/parser/inpdoopt.c: inpdoopt.c, bug fix, `i' incremented twice when searching for "options" 2013-07-20 rlar * src/spicelib/parser/inpdomod.c: minor, prepare for automatic indentation 2013-07-20 rlar * src/ciderlib/input/boundary.c, * src/ciderlib/input/contact.c, * src/ciderlib/input/domain.c, * src/ciderlib/input/doping.c, * src/ciderlib/input/dopset.c, * src/ciderlib/input/electrod.c, * src/ciderlib/input/material.c, * src/ciderlib/input/mesh.c, * src/ciderlib/input/method.c, * src/ciderlib/input/mobility.c, * src/ciderlib/input/models.c, * src/ciderlib/input/optionsc.c, * src/ciderlib/input/output.c, * src/include/ngspice/numcards.h, * src/spicelib/parser/inpgmod.c: ciderlib, proper types for newCard(), setCardParm(), askCardQuest() 2013-07-18 rlar * src/ciderlib/input/bdryset.c, * src/ciderlib/input/contset.c, * src/ciderlib/input/domnset.c, * src/ciderlib/input/dopset.c, * src/ciderlib/input/elctset.c, * src/ciderlib/input/matlset.c, * src/ciderlib/input/meshset.c, * src/ciderlib/input/mobset.c, * src/ciderlib/input/modlset.c, * src/ciderlib/input/outpset.c, * src/ciderlib/oned/oneadmit.c, * src/ciderlib/oned/onecond.c, * src/ciderlib/oned/onecont.c, * src/ciderlib/oned/onedopng.c, * src/ciderlib/oned/onemesh.c, * src/ciderlib/oned/oneproj.c, * src/ciderlib/oned/onesetup.c, * src/ciderlib/oned/onesolve.c, * src/ciderlib/support/geominfo.c, * src/ciderlib/support/globals.c, * src/ciderlib/support/mater.c, * src/ciderlib/support/suprem.c, * src/ciderlib/twod/twoadmit.c, * src/ciderlib/twod/twoaval.c, * src/ciderlib/twod/twocond.c, * src/ciderlib/twod/twocont.c, * src/ciderlib/twod/twocurr.c, * src/ciderlib/twod/twodopng.c, * src/ciderlib/twod/twoelect.c, * src/ciderlib/twod/twofield.c, * src/ciderlib/twod/twomesh.c, * src/ciderlib/twod/twoncont.c, * src/ciderlib/twod/twopcont.c, * src/ciderlib/twod/twoprint.c, * src/ciderlib/twod/twoproj.c, * src/ciderlib/twod/tworead.c, * src/ciderlib/twod/twosetbc.c, * src/ciderlib/twod/twosetup.c, * src/ciderlib/twod/twosolve.c, * src/include/ngspice/macros.h, * src/spicelib/devices/nbjt/nbjtset.c, * src/spicelib/devices/nbjt/nbjttemp.c, * src/spicelib/devices/nbjt2/nbt2set.c, * src/spicelib/devices/nbjt2/nbt2temp.c, * src/spicelib/devices/ndev/ndevset.c, * src/spicelib/devices/ndev/ndevtemp.c, * src/spicelib/devices/numd/numdset.c, * src/spicelib/devices/numd/numdtemp.c, * src/spicelib/devices/numd2/nud2set.c, * src/spicelib/devices/numd2/nud2temp.c, * src/spicelib/devices/numos/nummset.c, * src/spicelib/devices/numos/nummtemp.c: drop `NIL' macro 2013-07-16 rlar * src/include/ngspice/memory.h, * src/spicelib/parser/inppas3.c: memory.h, polish macros 2013-07-18 Henrik Forstén * src/misc/dstring.c: dstring_append_char(), rewrite 2013-07-17 rlar * src/spicelib/analysis/cktmcrt.c: CKTmodCrt(), cleanup 2013-07-17 rlar * src/spicelib/analysis/cktmcrt.c: CKTmodCrt(), cleanup, always assign to `*modfast' for all invocations of CKTmodCrt() alias newModel() the following is true (modfast != NULL) && (*modfast == NULL) see (grep "git --no-pager grep -nH -e 'CKTmodCrt\\|newModel'") 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/inpdefs.h, * src/spicelib/parser/inpgmod.c, * src/spicelib/parser/inpmkmod.c, * src/xspice/mif/mifgetmod.c: drop `INPmodUsed' which is redundant to `INPmodfast' 2013-07-07 rlar * src/spicelib/analysis/cktdltm.c: nghash_delete() models and instances in CKTdltMod() 2013-07-17 rlar * src/tclspice.c: CKTfndMod(), cleanup 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), cleanup 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/cktfndm.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), drop unused arguments `type' and `modfast' 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/spicelib/analysis/cktdest.c, * src/spicelib/analysis/cktfndm.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/cktinit.c: CKTfndMod(), use a hashtable 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), cleanup 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/cktfndm.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), dont pass the `type' argument by reference any more 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c: CKTfndMod(), cleanup 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), unuse the `type' argument 2013-07-17 rlar * src/spicelib/analysis/cktfndm.c: CKTfndMod(), this wont happen any more and `*type' will be overwritten anyway 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c: CKTfndMod(), rewrite error expressions 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/cktfndm.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), return the found model instead of error code 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), express error return value outside of this function 2013-07-17 rlar * src/spicelib/analysis/cktfndm.c: CKTfndMod(), this will never happen, when this series of rewrites is finished 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/cktmcrt.c, * src/spicelib/devices/urc/urcsetup.c, * src/tclspice.c: CKTfndMod(), assert some facts 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktfinddev.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), cleanup 2013-07-17 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/cktfinddev.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), drop `type' and `fast' argument 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), rewrite invocations where `*fast == NULL' 2013-07-17 rlar * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c: CKTfndDev(), rewrite invocations where `type == NULL' 2013-07-04 rlar * src/frontend/spiceif.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), unuse the type argument 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), rewrite error expressions 2013-07-04 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/cktfinddev.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), return the found instance instead of error code now if (fast != NULL) CKTfndDev(,,fast, ) is equivalent to *fast = CKTfndDev(,,fast, ) 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), express error return value outside of this function if (fast != NULL) then err = CKTfndDev(,, fast, ); is equivalent to err = CKTfndDev(,, fast, ); err = *fast ? OK : E_NODEV; 2013-07-17 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), assert some facts 2013-06-30 rlar * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/ind/mutsetup.c: CKTfndDev(), unuse `type' argument 2013-06-30 rlar * src/spicelib/devices/cktcrte.c: CKTfndDev(), cleanup usage of `type' argument 2013-06-30 rlar * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/ind/mutsetup.c: CKTfndDev(), cleanup usage of impossible error codes 2013-06-30 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/cktfinddev.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), drop unused argument `modfast' 2013-07-17 Henrik Forstén * src/spicelib/devices/cktfinddev.c: CKTfndDev(), rewrite 2013-07-17 Henrik Forstén * src/include/ngspice/cktdefs.h, * src/spicelib/analysis/cktdest.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/cktfinddev.c, * src/spicelib/devices/cktinit.c: CKTfndDev(), use a hashtable to speed up this function 2013-07-16 h_vogt * src/frontend/subckt.c: subckt.c: `A' device , no special translation when nodename starts with `v' 2013-07-14 rlar * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c: simplify #ifdef nesting #4/4 2013-07-14 rlar * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c: simplify #ifdef nesting #3/4 2013-07-14 rlar * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c: simplify #ifdef nesting #2/4 2013-07-14 rlar * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c: simplify #ifdef nesting #1/4 2013-07-14 h_vogt * src/include/ngspice/sharedspice.h, * src/sharedspice.c: sharedspice.c, .h: fcn to initialize Sync, fcn to set breakpoint, callback fcn to read vsrc external inputs 2013-07-14 h_vogt * src/spicelib/analysis/dctran.c: shared ngspice, dctran.c fcn to add breakpoints 2013-07-14 h_vogt * src/spicelib/devices/vsrc/vsrc.c, * src/spicelib/devices/vsrc/vsrcacct.c, * src/spicelib/devices/vsrc/vsrcdefs.h, * src/spicelib/devices/vsrc/vsrcload.c, * src/spicelib/devices/vsrc/vsrcpar.c: shared ngspice: external voltage source 2013-07-14 rlar * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktsens.c, * src/spicelib/analysis/distoan.c, * src/spicelib/analysis/noisean.c: cleanup OUTattributes() invocations checked for object file invariance 2013-07-14 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktmapn.c, * src/spicelib/analysis/cktmkcur.c, * src/spicelib/analysis/cktmkvol.c, * src/spicelib/analysis/cktnoise.c, * src/spicelib/analysis/cktsens.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/analysis/distoan.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/pzan.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/parser/inp2c.c, * src/spicelib/parser/inp2d.c, * src/spicelib/parser/inp2j.c, * src/spicelib/parser/inp2l.c, * src/spicelib/parser/inp2o.c, * src/spicelib/parser/inp2r.c, * src/spicelib/parser/inp2s.c, * src/spicelib/parser/inp2u.c, * src/spicelib/parser/inp2w.c, * src/spicelib/parser/inp2z.c: cleanup IFnewUid() invocations checked for object file invariance 2013-07-14 rlar * src/frontend/spiceif.c, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktsens.c, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/analysis/distoan.c, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/pzan.c, * src/spicelib/analysis/tfanal.c: cleanup OUTpBeginPlot() invocations checked for object file invariance 2013-07-14 rlar * src/maths/sparse/spsmp.c, * src/spicelib/parser/ifeval.c, * src/xspice/icm/xtradev/potentiometer/cfunc.mod: cleanup stuttered semicolon 2013-07-14 rlar * src/spicelib/analysis/noisean.c: noisean.c, cleanup comment 2013-07-14 rlar * src/include/ngspice/inpmacs.h: polish `PARSECALL' macro checked for object file invariance 2013-07-14 rlar * src/include/ngspice/inpmacs.h, * src/spicelib/parser/inp2d.c, * src/spicelib/parser/inp2m.c, * src/spicelib/parser/inp2p.c, * src/spicelib/parser/inp2q.c, * src/spicelib/parser/inp2y.c, * src/spicelib/parser/inp2z.c, * src/spicelib/parser/inppas3.c: polish `LITERR' macro checked for object file invariance 2013-07-14 rlar * src/include/ngspice/inpmacs.h, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inp2p.c, * src/spicelib/parser/inp2r.c, * src/spicelib/parser/inp2y.c: polish `GCA' macro checked for object file invariance 2013-07-14 rlar * src/include/ngspice/inpmacs.h, * src/spicelib/parser/inp2m.c, * src/spicelib/parser/inp2p.c, * src/spicelib/parser/inp2y.c, * src/spicelib/parser/inppas3.c, * src/xspice/mif/mif_inp2.c: polish `IFC' macro checked for object file invariance, different code for inppas3.c, seems to be ok 2013-07-14 rlar * src/include/ngspice/macros.h, * src/spicelib/analysis/pzan.c: polish `MERROR' macro checked for object file invariance 2013-07-12 h_vogt * src/misc/misc_time.c, * src/misc/misc_time.h: misc_time.c: make timediff always availabe when timeb.h is found 2013-07-07 dwarning * src/spicelib/parser/inp2y.c: inp2y.c, TXL bug fix reported by John Reuben P on the ngspice-users mailing list need to insert instance names into the symbol table with INPinsert() 2013-06-30 rlar * src/frontend/spiceif.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/ifsim.h, * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/cktcrte.c, * src/spicelib/devices/cktfinddev.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/tclspice.c, * src/unsupported/snstart.c: CKTfndDev(), drop unused argument `modname' which is always NULL 2013-06-30 rlar * src/spicelib/analysis/noisean.c, * src/spicelib/analysis/tfanal.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/parser/inpaname.c, * src/unsupported/snstart.c: cleanup CKTfndDev(), findInstance() invocation 2013-06-30 rlar * src/frontend/spiceif.c: unify, use `ckt' instead of `ck' 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #6/6, cleanup 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #5/6, cleanup 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #4/6, cleanup 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #3/6, cleanup 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #2/6, cleanup 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: CKTfndDev(), #1/6, whitespace 2013-06-30 rlar * src/spicelib/devices/cktfinddev.c: abstraction, new function `find_instance()' 2013-06-29 Henrik Forstén * src/frontend/numparam/spicenum.c: numparm, speedup modernizeex() for the common case 2013-06-29 Henrik Forstén * src/spicelib/parser/inp2c.c, * src/spicelib/parser/inp2i.c, * src/spicelib/parser/inp2l.c, * src/spicelib/parser/inp2r.c, * src/spicelib/parser/inp2v.c: search just once for basic device types 2013-06-29 Henrik Forstén * src/frontend/inpcom.c: inpcom.c: fix "sytax" spelling 2013-06-27 dwarning * src/frontend/inpcom.c: allow format like .5 in b-sources 2013-06-25 dwarning * src/spicelib/devices/mos1/mos1temp.c, * src/spicelib/devices/mos2/mos2temp.c, * src/spicelib/devices/mos3/mos3temp.c, * src/spicelib/devices/mos6/mos6temp.c, * src/spicelib/devices/mos9/mos9temp.c: devices/mos*: prevent NaN in sqrt for negative value of model parameter `PHI' 2013-06-24 Henrik Forstén * src/maths/misc/equality.c: rewrite AlmostEqualUlps() to avoid compiler warnings concerning `strict-aliasing' 2013-06-23 Henrik Forstén * src/spicelib/parser/inpsymt.c: inpsymt.c, use "Daniel J. Bernstein" hash function instead of a simple sum. just for note, there is a wealth of newer hash functions. For example "The FNV Non-Cryptographic Hash Algorithm" from http://tools.ietf.org/html/draft-eastlake-fnv-03 2013-06-22 rlar * src/spicelib/analysis/cktmknod.c: avoid `(IFuid) 0' cast 2013-06-22 rlar * src/spicelib/analysis/cktsgen.c: convert K&R function definitions to ansi style 2013-06-15 rlar * src/spicelib/analysis/cktpzstr.c: fix for automatic indention this part of > commit f9144f90b3e121ec866bf437e95ebf7aa8aa890e > Author: pnenzi > Date: Tue May 23 20:04:32 2000 +0000 > > Applied Widlok patch is hostile to automatic indention 2013-06-21 h_vogt * src/sharedspice.c: sharedspice.c: preliminary fixes: ftime() usage, prevent crash if controlled_exit from worker thread 2013-06-09 dwarning * src/spicelib/devices/res/res.c, * src/spicelib/devices/res/resdefs.h, * src/spicelib/devices/res/resmask.c, * src/spicelib/devices/res/resmpar.c, * src/spicelib/devices/res/resparam.c, * src/spicelib/devices/res/restemp.c: devices/res: use model parameter `r' and `res' as default for instances w/o value and set minimal resistor value to 1 mOhm 2013-06-09 dwarning * src/spicelib/devices/res/resmask.c, * src/spicelib/devices/res/resmpar.c, * src/spicelib/devices/res/resparam.c: devices/res: whitespace cleanup 2013-06-09 h_vogt * src/maths/ni/nicomcof.c: nicomcof.c: xmu used to calculate trap integration coefficient 2013-06-09 h_vogt * src/spicelib/analysis/cktop.c: cktop.c: indentation 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, whitespace 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, use strchr(,'\0') 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, use better skip_back functions 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, rewrite `chk_for_line_continuation()' 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, introduce better skip_back functions 2013-06-08 rlar * src/frontend/inpcom.c: inpcom.c, minor cleanup 2013-06-07 rlar * src/frontend/inpcom.c: inpcom.c, rewrite `inp_fix_param_values()' 2013-06-07 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-06-07 rlar * src/frontend/inpcom.c: inpcom.c, cleanup `inp_add_params_to_subckt()' 2013-06-07 rlar * src/frontend/inpcom.c: inpcom.c, minor rewrites 2013-06-06 rlar * src/spicelib/devices/asrc/asrcset.c, * src/spicelib/devices/bjt/bjtsetup.c, * src/spicelib/devices/bsim1/b1set.c, * src/spicelib/devices/bsim2/b2set.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3soi_dd/b3soiddset.c, * src/spicelib/devices/bsim3soi_fd/b3soifdset.c, * src/spicelib/devices/bsim3soi_pd/b3soipdset.c, * src/spicelib/devices/bsim3v0/b3v0set.c, * src/spicelib/devices/bsim3v1/b3v1set.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4v4/b4v4set.c, * src/spicelib/devices/bsim4v5/b4v5set.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsimsoi/b4soiset.c, * src/spicelib/devices/cap/capsetup.c, * src/spicelib/devices/cccs/cccsset.c, * src/spicelib/devices/ccvs/ccvsset.c, * src/spicelib/devices/cpl/cplsetup.c, * src/spicelib/devices/csw/cswsetup.c, * src/spicelib/devices/dio/diosetup.c, * src/spicelib/devices/hfet1/hfetsetup.c, * src/spicelib/devices/hfet2/hfet2setup.c, * src/spicelib/devices/hisim2/hsm2set.c, * src/spicelib/devices/hisimhv1/hsmhvset.c, * src/spicelib/devices/ind/indsetup.c, * src/spicelib/devices/ind/mutsetup.c, * src/spicelib/devices/jfet/jfetset.c, * src/spicelib/devices/jfet2/jfet2set.c, * src/spicelib/devices/ltra/ltraset.c, * src/spicelib/devices/mes/messetup.c, * src/spicelib/devices/mesa/mesasetup.c, * src/spicelib/devices/mos1/mos1set.c, * src/spicelib/devices/mos2/mos2set.c, * src/spicelib/devices/mos3/mos3set.c, * src/spicelib/devices/mos6/mos6set.c, * src/spicelib/devices/mos9/mos9set.c, * src/spicelib/devices/nbjt/nbjtset.c, * src/spicelib/devices/nbjt2/nbt2set.c, * src/spicelib/devices/ndev/ndevset.c, * src/spicelib/devices/numd/numdset.c, * src/spicelib/devices/numd2/nud2set.c, * src/spicelib/devices/numos/nummset.c, * src/spicelib/devices/res/ressetup.c, * src/spicelib/devices/soi3/soi3set.c, * src/spicelib/devices/sw/swsetup.c, * src/spicelib/devices/tra/trasetup.c, * src/spicelib/devices/txl/txlsetup.c, * src/spicelib/devices/vbic/vbicsetup.c, * src/spicelib/devices/vccs/vccsset.c, * src/spicelib/devices/vcvs/vcvsset.c, * src/spicelib/devices/vsrc/vsrcpzs.c, * src/spicelib/devices/vsrc/vsrcset.c, * src/xspice/mif/mifsetup.c: rewrite `TSTALLOC()' macro for auto indentation checked for object code invariance 2013-06-05 h_vogt * src/frontend/inp.c: inp.c: skip title line when searching for .if in dotifeval() 2013-06-05 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, new function `find_assignment()' 2013-06-05 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-06-05 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, new function inp_split_multi_param_lines() 2013-06-05 rlar * src/frontend/inpcom.c: inpcom.c, cleanup `inp_split_multi_param_lines()' 2013-06-03 dwarning * src/spicelib/devices/bsim4/b4.c, * src/spicelib/devices/bsim4/b4mask.c, * src/spicelib/devices/bsim4/b4mpar.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4/bsim4def.h, * src/spicelib/devices/bsim4v5/b4v5.c, * src/spicelib/devices/bsim4v5/b4v5mask.c, * src/spicelib/devices/bsim4v5/b4v5mpar.c, * src/spicelib/devices/bsim4v5/b4v5set.c, * src/spicelib/devices/bsim4v5/bsim4v5def.h, * src/spicelib/devices/bsim4v6/b4v6.c, * src/spicelib/devices/bsim4v6/b4v6mask.c, * src/spicelib/devices/bsim4v6/b4v6mpar.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/bsim4v6def.h: add `rgeomod' as model parameter for bsim4 2013-06-02 dwarning * src/spicelib/parser/inpptree.c: parser/*.c: correct the `pwr' derivative 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, local scope for `newcard' 2013-06-02 h_vogt * src/frontend/inpcom.c: inpcom.c: G source, fix a bug and add `m' to TABLE 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, rewrite `append' of some decks 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, drop unused assignment 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, rewrite deck allocation 2013-06-02 rlar * src/frontend/inpcom.c: inpcom.c, local scope for some vars 2013-06-02 h_vogt * src/frontend/inpcom.c: inpcom.c: multiplier `m' for behavioral G source 2013-06-01 h_vogt * src/frontend/inp.c, * src/frontend/inpcom.c: inp.c, inpcom.c: implement a very basic .if/.else block 2013-05-31 dwarning * src/include/ngspice/inpptree.h, * src/spicelib/parser/ifeval.c, * src/spicelib/parser/inpptree.c, * src/spicelib/parser/inpxx.h, * src/spicelib/parser/ptfuncs.c: parser/*.c: implement a signed power function `pwr' for controlled sources 2013-05-30 h_vogt * src/frontend/subckt.c: subckt.c: prevent crash if 5/6 MOS nodes w/o L, W 2013-05-30 h_vogt * src/frontend/subckt.c: subckt.c: MOS model in subckt w/o L, W 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, reorder some statements 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, local scope for `str' 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, local scope for `global_card' 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, drop variable `prev' 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, get rid of the global `global' 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, rewrite subckt_w_params business 2013-05-30 rlar * src/frontend/inpcom.c: inpcom.c, execute inp_fix_for_numparam() just once when call_depth == 0 2013-05-30 h_vogt * src/spicelib/devices/vccs/vccs.c, * src/spicelib/devices/vccs/vccsask.c, * src/spicelib/devices/vccs/vccsdefs.h, * src/spicelib/devices/vccs/vccspar.c: devices/vccs: implement multiplier `m' (G source) 2013-05-30 h_vogt * src/spicelib/devices/cccs/cccs.c, * src/spicelib/devices/cccs/cccsask.c, * src/spicelib/devices/cccs/cccsdefs.h, * src/spicelib/devices/cccs/cccspar.c: devices/cccs: implement multiplier `m' (F source) 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, drop superflous initialisation 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, improve readability of skip_back_non_ws() and skip_back_ws() 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, drop some local variables 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, simplify error processing 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, simplify tfree() usage 2013-05-29 rlar * src/frontend/inpcom.c: inpcom.c, local scope for some variables 2013-05-29 Francesco Lannutti * src/spicelib/devices/vcvs/vcvsset.c: vcvsset.c, cleanup order of TSTALLOC() invocations 2013-05-26 dwarning * src/spicelib/parser/inpptree.c, * src/spicelib/parser/ptfuncs.c: inpptree.c, ptfuncs.c: whitespace cleanup 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup deck loops #4/4 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup deck loops #3/4 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup deck loops #2/4 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup deck loops #1/4 2013-05-26 h_vogt * src/frontend/numparam/numparam.h, * src/frontend/numparam/xpressn.c: xpressn.c: reduce number of (forbidden) keywords to what is actually used 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, inp_chk_for_multi_in_vcvs() shrink scope of variables 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, bug fix (incorrect check for mal formed line) 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-05-26 rlar * src/frontend/inpcom.c: inpcom.c, simple cleanups 2013-05-25 rlar * src/frontend/inpcom.c: inpcom.c, change semantics of skip_back_non_ws() and skip_back_ws() 2013-05-25 rlar * src/frontend/inpcom.c: inpcom.c, unify skip_back() usage #2/2 2013-05-25 rlar * src/frontend/inpcom.c: inpcom.c, unify skip_back() usage #1/2 2013-05-25 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_get_func_from_line() 2013-05-25 rlar * src/frontend/inpcom.c: inpcom.c, drop artifact, now this isn't any more a bug 2013-05-24 rlar * src/frontend/inpcom.c: inpcom.c, use a list to store the `.func' lookup table 2013-05-24 rlar * src/frontend/inpcom.c: inpcom.c, use a `rib cage' to store the .subckt lexical scoping of `.func' 2013-05-24 rlar * src/frontend/inpcom.c: inpcom.c, cleanup inp_expand_macros_in_deck() recursion 2013-05-23 dwarning * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3mask.c, * src/spicelib/devices/bsim3/b3mpar.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/bsim3def.h, * src/spicelib/devices/bsim3v32/b3v32.c, * src/spicelib/devices/bsim3v32/b3v32mask.c, * src/spicelib/devices/bsim3v32/b3v32mpar.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h: devices/bsim3, devices/bsim3v32: add `nqsmod' as model parameter 2013-05-23 rlar * src/frontend/inpcom.c: bug fix, .func expansion for nested .subckt 2013-05-23 rlar * src/frontend/inpcom.c: inpcom.c, cleanup some while(struct line * ...) loops 2013-05-22 dwarning * src/spicelib/devices/hisimhv1/hsmhvset.c: devices/hisimhv1: correct the `qme2' rangecheck 2013-05-21 dwarning * src/spicelib/devices/bsim3/b3check.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3mpar.c, * src/spicelib/devices/bsim3/b3temp.c: devices/bsim3: whitespace cleanup 2013-05-21 dwarning * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3mask.c, * src/spicelib/devices/bsim3/b3mpar.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c: devices/bsim3: complete the ACM parameter set with xl and xw 2013-05-21 dwarning * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3ask.c, * src/spicelib/devices/bsim3/b3check.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3mask.c, * src/spicelib/devices/bsim3/b3mpar.c, * src/spicelib/devices/bsim3/b3par.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c, * src/spicelib/devices/bsim3/bsim3def.h: devices/bsim3: apply Area Calculation Method (ACM) to the bsim3v3.3 model 2013-05-21 dwarning * src/spicelib/devices/bsim3/b3temp.c: devices/bsim3: reposition sourceConductance block 2013-05-16 dwarning * src/spicelib/devices/bsim3/b3ld.c: devices/bsim3: reposition DrainSatCurrent block 2013-05-20 h_vogt * src/spicelib/devices/hisim2/hsm2set.c, * src/spicelib/devices/hisimhv1/hsmhvset.c: hsm2set, hsmhvset.c: error message 2013-05-20 h_vogt * src/spicelib/analysis/dctran.c: dctran.c, bug fix `#235 When Using .TRAN analysis with UIC, ...' add a breakpoint for UIC #235 When Using .TRAN analysis with UIC, unconnected pulse bug http://sourceforge.net/p/ngspice/bugs/235/ 2013-05-20 h_vogt * README.adms: README.adms Warning about outdated information 2013-05-20 Francesco Lannutti * src/spicelib/devices/vccs/vccsask.c, * src/spicelib/devices/vccs/vccsdefs.h, * src/spicelib/devices/vccs/vccsdel.c, * src/spicelib/devices/vccs/vccsdest.c, * src/spicelib/devices/vccs/vccsload.c, * src/spicelib/devices/vccs/vccsmdel.c, * src/spicelib/devices/vccs/vccspar.c, * src/spicelib/devices/vccs/vccspzld.c, * src/spicelib/devices/vccs/vccssacl.c, * src/spicelib/devices/vccs/vccsset.c, * src/spicelib/devices/vccs/vccssld.c, * src/spicelib/devices/vccs/vccssprt.c, * src/spicelib/devices/vccs/vccssset.c: unify, use #include "vccsext.h" the same way as in all other models 2013-05-20 Francesco Lannutti * configure.ac: configure.ac, cleanup `WARNING: PSS analysis enabled' 2013-05-19 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2013-05-19 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, find_subckt_w_params() 2013-05-19 rlar * src/frontend/inpcom.c: inpcom.c, cleanup, emphasize a search in subckt_w_params[] 2013-05-19 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, new_subckt_w_params() 2013-05-19 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, new_lib() 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, cleanup usage of free_function() 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, abstraction, free_function() 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, think in terms of struct functions instead of an integer 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, emphasize a potential bug 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, think in terms of struct library instead of an integer 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, collect globals into a struct 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c, rename N_FUNCS and N_LIBRARY 2013-05-18 h_vogt * src/spicelib/analysis/traninit.c: traninit.c, cleanup indentation 2013-05-18 h_vogt * src/spicelib/devices/bsim4v4/b4v4getic.c: b4v4getic.c, cleanup indentation 2013-05-18 rlar * src/frontend/inpcom.c: inpcom.c: rewrite .lib processing 2013-05-18 h_vogt * src/frontend/inpcom.c: inpcom.c: debug output streamlined 2013-05-18 h_vogt * src/frontend/inpcom.c: inpcom.c: larger array size, debug output modified 2013-05-17 rlar * src/frontend/inpcom.c: inpcom.c: array bounds check 2013-05-16 dwarning * src/include/ngspice/devdefs.h, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim3v32/b3v32temp.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h: devices/bsim3v32: whitespace cleanup 2013-05-16 dwarning * src/include/ngspice/devdefs.h, * src/spicelib/devices/bsim3v32/b3v32.c, * src/spicelib/devices/bsim3v32/b3v32ask.c, * src/spicelib/devices/bsim3v32/b3v32check.c, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim3v32/b3v32mask.c, * src/spicelib/devices/bsim3v32/b3v32mpar.c, * src/spicelib/devices/bsim3v32/b3v32par.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim3v32/b3v32temp.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h, * src/spicelib/devices/devsup.c: devices/bsim3v32: apply Area Calculation Method (ACM) to the bsim3v3.2.4 model 2013-05-16 dwarning * src/spicelib/devices/bsim3v32/b3v32ld.c: devices/bsim3v32: reposition DrainSatCurrent block 2013-05-16 dwarning * src/spicelib/devices/bsim3v32/b3v32temp.c: devices/bsim3v32: remove duplicate `SourceSatCurrent' block 2013-05-16 dwarning * src/spicelib/devices/bsim3v32/b3v32temp.c: devices/bsim3v32: single out duplicate `SourceSatCurrent' block 2013-05-16 dwarning * src/spicelib/devices/bsim3v32/b3v32temp.c: devices/bsim3v32: remove duplicate `DrainSatCurrent' block 2013-05-16 dwarning * src/spicelib/devices/bsim3v32/b3v32temp.c: devices/bsim3v32: single out duplicate `DrainSatCurrent' block 2013-05-15 dwarning * src/spicelib/devices/bsim3v32/b3v32.c: devices/bsim3v32: correct `rdc' and `rsc' definition 2013-05-15 h_vogt * src/include/ngspice/defines.h, * src/winmain.c, * src/winmain.h: defines.h, winmain.c, .h: fix --with-wingui for CYGWIN 2013-05-15 h_vogt * src/frontend/inpcom.c: inpcom.c: disable `m' for E, H 2013-05-11 dwarning * src/spicelib/devices/bsim3v32/b3v32.c, * src/spicelib/devices/bsim3v32/b3v32acld.c, * src/spicelib/devices/bsim3v32/b3v32ask.c, * src/spicelib/devices/bsim3v32/b3v32check.c, * src/spicelib/devices/bsim3v32/b3v32cvtest.c, * src/spicelib/devices/bsim3v32/b3v32del.c, * src/spicelib/devices/bsim3v32/b3v32dest.c, * src/spicelib/devices/bsim3v32/b3v32getic.c, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim3v32/b3v32mask.c, * src/spicelib/devices/bsim3v32/b3v32mdel.c, * src/spicelib/devices/bsim3v32/b3v32mpar.c, * src/spicelib/devices/bsim3v32/b3v32noi.c, * src/spicelib/devices/bsim3v32/b3v32par.c, * src/spicelib/devices/bsim3v32/b3v32pzld.c, * src/spicelib/devices/bsim3v32/b3v32temp.c, * src/spicelib/devices/bsim3v32/b3v32trunc.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h, * src/spicelib/devices/bsim3v32/bsim3v32ext.h, * src/spicelib/devices/bsim3v32/bsim3v32init.c: devices/bsim3v32: whitespace cleanup 2013-05-11 dwarning * src/spicelib/devices/isrc/isrc.c, * src/spicelib/devices/isrc/isrcacld.c, * src/spicelib/devices/isrc/isrcask.c, * src/spicelib/devices/isrc/isrcdefs.h, * src/spicelib/devices/isrc/isrcload.c, * src/spicelib/devices/isrc/isrcpar.c, * src/spicelib/devices/isrc/isrctemp.c: devices/isrc: implement multiplier `m' for current sources 2013-05-11 dwarning * src/frontend/inpcom.c: allow Multiplier for current source in subckts 2013-05-11 h_vogt * src/frontend/inpcom.c: inpcom.c: add some some comments 2013-05-11 h_vogt * src/frontend/inpcom.c: inpcom.c: no multiplier 'm' added to V, I lines in subckt 2013-05-09 dwarning * src/spicelib/devices/cap/cap.c, * src/spicelib/devices/cap/capdefs.h, * src/spicelib/devices/cap/capmask.c, * src/spicelib/devices/cap/capmpar.c, * src/spicelib/devices/cap/capsetup.c: alternative geometry correction `del' for semiconductor capacitors 2013-05-09 dwarning * src/spicelib/devices/bsim3/b3check.c, * src/spicelib/devices/bsim3v32/b3v32check.c: someone gives version=3.30e+00 in bsim models 2013-05-09 h_vogt * src/frontend/measure.c: measure.c: disable autostop, if no .meas commands found 2013-05-09 h_vogt * src/frontend/subckt.c: subckt.c: enable correct model renaming for inductors 2013-05-09 h_vogt * src/spicelib/devices/ind/indacld.c, * src/spicelib/devices/ind/indload.c: devices/ind: implement multiplier `m' 2013-05-09 h_vogt * src/spicelib/devices/res/resload.c: resload.c: `m' already set in ressetup.c 2013-05-09 h_vogt * src/spicelib/devices/res/res.c, * src/spicelib/devices/res/resdefs.h, * src/spicelib/devices/res/resload.c, * src/spicelib/devices/res/resmpar.c, * src/spicelib/devices/res/resparam.c, * src/spicelib/devices/res/ressetup.c, * src/spicelib/devices/res/restemp.c: devices/res: whitespace cleanup 2013-05-09 h_vogt * src/spicelib/devices/ind/ind.c, * src/spicelib/devices/ind/inddefs.h, * src/spicelib/devices/ind/indload.c, * src/spicelib/devices/ind/indmpar.c, * src/spicelib/devices/ind/indparam.c, * src/spicelib/devices/ind/indtemp.c: devices/ind: whitespace cleanup 2013-05-08 h_vogt * src/spicelib/devices/cap/cap.c, * src/spicelib/devices/cap/capacld.c, * src/spicelib/devices/cap/capdefs.h, * src/spicelib/devices/cap/capload.c, * src/spicelib/devices/cap/capmask.c, * src/spicelib/devices/cap/capmpar.c, * src/spicelib/devices/cap/capparam.c, * src/spicelib/devices/cap/capsetup.c, * src/spicelib/devices/cap/captemp.c: devices/cap: whitespace cleanup 2013-05-09 h_vogt * src/spicelib/devices/ind/ind.c, * src/spicelib/devices/ind/inddefs.h, * src/spicelib/devices/ind/indparam.c, * src/spicelib/devices/ind/indtemp.c: devices/ind: implement `tc1', `tc2' instance parameters 2013-05-08 h_vogt * src/spicelib/devices/cap/cap.c, * src/spicelib/devices/cap/capdefs.h, * src/spicelib/devices/cap/capparam.c, * src/spicelib/devices/cap/captemp.c: devices/cap: implement `tc1', `tc2' instance parameters 2013-05-07 h_vogt * src/spicelib/devices/res/resload.c, * src/spicelib/devices/res/ressetup.c: move instance m-factor into ressetup 2013-05-07 h_vogt * src/spicelib/devices/res/resload.c, * src/spicelib/devices/res/restemp.c: resload.c, restemp.c: tc1, tc2 instance parameters override model parameters 2013-05-07 dwarning * src/spicelib/devices/bsim3/b3temp.c: bsim3: fix incorrect version printout 2013-05-07 dwarning * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3ask.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3par.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c, * src/spicelib/devices/bsim3/bsim3def.h: this is the delvto/mulu0 instance extension to bsim3v3 2013-05-05 dwarning * src/spicelib/devices/bsim3/b3.c, * src/spicelib/devices/bsim3/b3ask.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3par.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c, * src/spicelib/devices/bsim3/bsim3def.h: devices/bsim3: whitespace cleanup 2013-05-03 h_vogt * src/frontend/inpcom.c: inpcom.c: hot fix for nested ternary expressions 2013-05-01 dwarning * src/spicelib/devices/cap/cap.c, * src/spicelib/devices/res/res.c, * src/spicelib/devices/res/resdefs.h, * src/spicelib/devices/res/resmask.c, * src/spicelib/devices/res/resmpar.c, * src/spicelib/devices/res/restemp.c: devices/cap, devices/res: some parameter aliases for compatibility 2013-04-28 rlar * src/maths/sparse/spalloc.c, * src/maths/sparse/spbuild.c, * src/maths/sparse/spfactor.c, * src/maths/sparse/spoutput.c, * src/maths/sparse/spsmp.c, * src/maths/sparse/spsolve.c, * src/maths/sparse/sputils.c: sparse/*.c, whitespace 2013-04-28 rlar * src/maths/sparse/spalloc.c, * src/maths/sparse/sputils.c: sparse/*.c, rename `eMatrix' --> `Matrix' (comments) 2013-04-28 rlar * src/include/ngspice/smpdefs.h, * src/include/ngspice/spmatrix.h, * src/maths/sparse/spsmp.c: sparse/*.c, rename `eMatrix' --> `Matrix' (prototypes) 2013-04-28 rlar * src/maths/sparse/spalloc.c, * src/maths/sparse/sputils.c: sparse/*.c, rename `eMatrix' --> `Matrix' 2013-04-28 rlar * src/maths/sparse/spalloc.c, * src/maths/sparse/spbuild.c, * src/maths/sparse/spfactor.c, * src/maths/sparse/spoutput.c, * src/maths/sparse/spsmp.c, * src/maths/sparse/spsolve.c, * src/maths/sparse/sputils.c: sparse/*.c, simplify, drop the local copy `Matrix' 2013-04-28 rlar * src/maths/sparse/spfactor.c, * src/maths/sparse/sputils.c: sparse/*.c, unify, use local copy `Matrix' instead of `eMatrix' 2013-04-28 rlar * src/maths/sparse/spsmp.c: sparse/*.c, drop unnecessary (spREAL) cast 2013-04-28 rlar * src/maths/sparse/spoutput.c: sparse/*.c, drop unnecessary (double) cast 2013-04-28 rlar * src/maths/sparse/spfactor.c: sparse/*.c, drop unnecessary (int *) cast 2013-04-28 rlar * src/maths/sparse/spbuild.c: sparse/*.c, drop unnecessary (MatrixPtr) cast 2013-04-28 rlar * src/maths/sparse/spbuild.c: sparse/*.c, avoid (RealNumber *) casts by proper use of ElementPr 2013-04-28 rlar * src/maths/sparse/spalloc.c: sparse/*.c, drop unnecessary (void *) cast 2013-04-28 rlar * src/maths/sparse/sputils.c: sparse/*.c, drop unused artifacts 2013-04-25 dwarning * src/spicelib/analysis/dctran.c, * src/spicelib/devices/bjt/bjtsupd.c, * src/unsupported/cktsenup.c, * src/unsupported/cktsncom.c, * src/unsupported/cktsnld.c, * src/unsupported/cktsnprt.c, * src/unsupported/cktsnset.c, * src/unsupported/snstart.c: adapt the sense2 code to ngspice workaround, make the opaque struct MatrixElement partially visible this struct is private to the `sparse' world, and lives in "maths/sparse/spdefs.h" which can't be included here, because it is incompatible to the rest of ngspice. this is the same problem as in ciderlib/oned/oneprint.c ciderlib/twod/twoprint.c 2013-04-26 rlar * src/include/ngspice/smpdefs.h, * src/maths/sparse/spsmp.c: fix an incorrect typedef and cast which was of no consequence, because nobody made use of it. ancient, already in the very first commit of ngspice Date: Thu Apr 27 20:03:57 2000 +0000 2013-04-24 dwarning * src/spicelib/devices/dio/dioload.c: fix a wrong GMIN implementation 2013-04-23 rlar * src/frontend/inpcom.c: bug fix, preserve filename case for `codemodel', `load' and `use' reported and fixed by Emil Lambrache on the bug tracker http://sourceforge.net/p/ngspice/bugs/241/ "#241 case sensitivity not preserved for file names" 2013-04-23 dwarning * src/unsupported/Makefile.am: fix Makefile.am for SENSDEBUG code 2013-04-23 dwarning * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/bjt/bjtsacl.c, * src/spicelib/devices/dio/diosload.c, * src/spicelib/devices/ind/indsacl.c, * src/spicelib/devices/ind/indsload.c, * src/spicelib/devices/vbic/vbicload.c: fix SENSDEBUG related code 2013-04-22 h_vogt * src/spicelib/devices/sw/swload.c: swload.c: reinstate the truncation code from swtrunc.c which was removed in the following commit: commit 0dae4607a01e2bbf93a925f5c37385ad9ce232f2 Date: Wed Apr 25 18:28:20 2001 +0000 Added a patch to csw and sw from Jon Engelbert dealing with negative histeresys 2013-04-22 h_vogt * src/spicelib/devices/txl/txldefs.h: txldefs.h: update some comments 2013-04-14 h_vogt * INSTALL: INSTALL add --with-ngshared 2013-04-13 h_vogt * src/include/ngspice/sharedspice.h, * src/sharedspice.c, * visualc-shared/sharedspice.vcproj: sharedspice.c, .h, .vcproj: comments, update für MS Visual Sudio build 2013-04-13 h_vogt * src/include/ngspice/sharedspice.h, * src/sharedspice.c: sharedspice.c, *.h: interface update, more comments 2013-04-12 h_vogt * src/sharedspice.c: sharedspice.c: improved comments 2013-04-07 h_vogt * src/sharedspice.c: sharedspice.c: remove bug causing sigsegv 2013-04-07 rlar * src/xspice/mif/mif_inp2.c: xpsice, fix premature tfree() invocation reported by "Heini X" on the ngspice-users mailing list this bug was introduced in : commit 0af75f3bd968f8a29f88221a81da6f9dafd2fceb : Date: Sat Aug 18 18:31:23 2012 +0200 : : subckt.c, mif_inp2.c: plug XSPICE setup memory leaks 2013-04-07 rlar * src/unsupported/sen2setp.c: sense2, cleanup, avoid (SENstruct *) casts 2013-04-07 rlar * src/unsupported/cktsenac.c, * src/unsupported/cktsenup.c, * src/unsupported/cktsncom.c, * src/unsupported/cktsndct.c, * src/unsupported/cktsnld.c, * src/unsupported/cktsnprt.c, * src/unsupported/cktsnset.c, * src/unsupported/sen2dest.c, * src/unsupported/sen2setp.c, * src/unsupported/snaskq.c, * src/unsupported/snstart.c: sense2, whitespace cleanup checked for object file invariance 2013-04-07 Francesco Lannutti * configure.ac, * src/Makefile.am, * src/include/ngspice/cktdefs.h, * src/spicelib/analysis/analysis.c, * src/spicelib/analysis/cktsetup.c, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/parser/inp2dot.c, * src/unsupported/Makefile.am, * src/unsupported/cktsenac.c, * src/unsupported/cktsenup.c, * src/unsupported/cktsncom.c, * src/unsupported/cktsndct.c, * src/unsupported/cktsnld.c, * src/unsupported/cktsnprt.c, * src/unsupported/cktsnset.c, * src/unsupported/sen2dest.c, * src/unsupported/sen2setp.c, * src/unsupported/snaskq.c, * src/unsupported/snstart.c: fix sense2, which is unsupported code 2013-04-03 h_vogt * src/sharedspice.c: sharedspice.c: small updates 2013-04-01 h_vogt * src/xspice/icm/makedefs.in: icm/makedefs.in: add -lm for self-consistent shared libs 2013-04-01 h_vogt * src/sharedspice.c: sharedspice.c: fix sigsev fault under LINUX 2013-04-01 h_vogt * src/frontend/inp.c: inp.c: add function prototype 2013-04-01 Francesco Lannutti * src/spicelib/devices/mes/messetup.c: whitespace, align TSTALLOC calls in the setup routine of the MES model 2013-04-01 Francesco Lannutti * src/spicelib/devices/jfet2/jfet2set.c: whitespace, align TSTALLOC calls in the setup routine of the JFET2 model 2013-04-01 Francesco Lannutti * src/spicelib/devices/jfet/jfetset.c: whitespace, align TSTALLOC calls in the setup routine of the JFET model 2013-04-01 h_vogt * src/sharedspice.c: sharedspice.c: update stopping printsend thread 2013-04-01 Francesco Lannutti * src/spicelib/devices/bsim4v5/b4v5set.c: whitespaces 2013-03-31 Francesco Lannutti * src/spicelib/devices/bsim3soi_pd/b3soipdset.c: remove a duplicate entry in the setup routine of the BSIM3SOIPD model 2013-03-31 Francesco Lannutti * src/spicelib/devices/bsim3soi_dd/b3soiddset.c: remove a duplicate entry in the setup routine of the BSIM3SOIDD model 2013-03-26 h_vogt * src/sharedspice.c: sharedspice.c: command bg_pstop to stop printsend thread before unloading ngspice library 2013-03-25 h_vogt * src/sharedspice.c: sharedspice.c: thread handling updated 2013-03-24 h_vogt * src/misc/alloc.c, * src/sharedspice.c: alloc.c sharedspice.c: improve thread safety still much more to be done! 2013-03-23 h_vogt * src/sharedspice.c: sharedspice.c: correction for LINUX 2013-03-23 h_vogt * configure.ac: configure.ac: shared module added 2013-03-23 h_vogt * Makefile.am, * visualc-shared/include/inttypes.h, * visualc-shared/include/ngspice/config.h, * visualc-shared/include/stdint.h, * visualc-shared/include/strings.h, * visualc-shared/sharedspice.sln, * visualc-shared/sharedspice.vcproj: visualc-shared: support for compiling ngspice.dll with MS Visual Studio 2008 2013-03-23 h_vogt * src/xspice/icm/dlmain.c: icm/dlmain.c: restrict exported symbols under LINUX 2013-03-23 h_vogt * src/include/ngspice/ngspice.h: ngspice.h: add shared module 2013-03-23 h_vogt * src/frontend/misccoms.c: misccoms.c: special return value for shared module 2013-03-23 h_vogt * src/frontend/error.c: error.c: no exit, but callback if shared module 2013-03-23 h_vogt * src/frontend/display.c: display.c: exclude SHARED_MODULE if console 2013-03-23 h_vogt * src/Makefile.am, * src/include/ngspice/Makefile.am: src/Makefile.am include/ngspice/Makefile.am: add shared module 2013-03-23 h_vogt * src/frontend/outitf.c: outitf.c: prepare for feedback in shared ngspice 2013-03-23 h_vogt * src/include/ngspice/sharedspice.h, * src/sharedspice.c: main file and header for ngspice as shared module 2013-03-23 h_vogt * src/maths/cmaths/Makefile.am: new flag `SHARED_MODULE' for shared module 2013-03-23 h_vogt * src/spicelib/analysis/dctran.c: dctran.c: better rounding for status report 2013-03-23 h_vogt * INSTALL, * compile_min.sh, * configure.ac, * src/Makefile.am, * src/maths/cmaths/Makefile.am: --with-windows --> --with-wingui 2013-03-23 h_vogt * src/frontend/inp.c, * src/frontend/measure.c, * src/frontend/spec.c, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktop.c, * src/spicelib/analysis/cktsetup.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/parser/inppas2.c: separate progress report from having Windows GUI 2013-03-23 h_vogt * src/frontend/inp.c, * src/frontend/measure.c, * src/frontend/spec.h, * src/include/ngspice/ngspice.h, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktop.c, * src/spicelib/analysis/cktsetup.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/parser/inppas2.c: fix `SetAnalyse()' re-declaration 2013-03-23 h_vogt * configure.ac, * src/frontend/com_ghelp.c, * src/frontend/com_hardcopy.c, * src/frontend/com_sysinfo.c, * src/frontend/cpitf.c, * src/frontend/display.c, * src/frontend/error.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/measure.c, * src/frontend/misccoms.c, * src/frontend/numparam/mystring.c, * src/frontend/outitf.c, * src/frontend/parser/input.c, * src/frontend/postcoms.c, * src/frontend/rawfile.c, * src/frontend/resource.c, * src/frontend/signal_handler.c, * src/frontend/spec.c, * src/frontend/spec.h, * src/frontend/wdisp/windisp.c, * src/frontend/wdisp/winprint.c, * src/include/ngspice/ngspice.h, * src/main.c, * src/maths/cmaths/cmath1.c, * src/maths/sparse/spoutput.c, * src/misc/alloc.c, * src/misc/ivars.c, * src/misc/util.c, * src/nghelp.c, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktop.c, * src/spicelib/analysis/cktsetup.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/dev.c, * src/spicelib/parser/inppas2.c, * src/winmain.c, * visualc/include/ngspice/config.h: HAS_WINDOWS --> HAS_WINGUI allow compilation on MS Windows without GUI 2013-03-16 rlar * FAQ: fix mailing list instructions 2013-03-06 h_vogt * src/frontend/commands.c, * src/frontend/cpitf.c, * src/frontend/device.c, * src/frontend/inp.c, * src/frontend/inp.h, * src/frontend/inpcom.c, * src/frontend/nutinp.c, * src/include/ngspice/fteext.h, * src/main.c: add command 'circbyline' to allow entering circuit line by line 2013-03-05 h_vogt * src/frontend/inp.c: inp.c: do not run all 'save' commands upfront, but cumulative when they appear in the .control section 2013-03-05 h_vogt * src/frontend/breakp2.c: breakp2.c: allow v(12) and i(vdd) in 'save' command 2013-03-05 h_vogt * src/frontend/runcoms2.c: runcoms2.c: update for dbs after remcirc 2013-03-05 h_vogt * src/tclspice.c: update 'alter' handling as in ngspice main.c 2013-03-05 h_vogt * src/frontend/breakp.c, * src/frontend/breakp2.c, * src/frontend/inp.c, * src/frontend/plotting/graf.c, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/include/ngspice/ftedefs.h: make database dbs local to each circuit 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: cleanup comments 2013-02-25 rlar * src/frontend/inpcom.c: expand_libs(): think of `next' instead `prev' 2013-02-24 rlar * src/frontend/inpcom.c: expand_libs(): rename `tmp_ptr2' --> `next' 2013-02-24 rlar * src/frontend/inpcom.c: expand_libs(): reposition `keep_char' restorage 2013-02-24 rlar * src/frontend/inpcom.c: expand_libs(): shrink scope of `found_section' 2013-02-24 rlar * src/frontend/inpcom.c: expand_libs(): bug fix, missing check for .endl at the tail of a file 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename local variable names 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename local variable names 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename local variable names 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename found_lib_name --> found_section 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename inp_determine_libraries() --> collect_section_references() 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename expand_libs() --> expand_section_references() 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename function argument names 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename function argument names 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: cleanup 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename library_file[] --> library_name[] 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename library_name[][] --> section_name[][] 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename library_ll_ptr[][] --> section_ref[][] 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename libraries[] -> library_deck[] 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename num_lib_names --> num_sections 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: rename new_lib_name() --> remember_section_ref() 2013-02-24 rlar * src/frontend/inpcom.c: inpcom.c: rename find_lib_name() --> find_section() 2013-02-25 rlar * src/frontend/inpcom.c: inpcom.c: static declaration of library related global variables 2013-02-22 h_vogt * src/frontend/inp.c, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/frontend/spiceif.c, * src/include/ngspice/ftedefs.h, * src/spicelib/parser/inpkmods.c: unique modtab for each circuit, store in ckt structure 2013-02-22 h_vogt * src/frontend/inp.c: inp.c: nullify `dbs' for use with 'source' command 2013-02-14 rlar * src/spicelib/analysis/cktdojob.c: fix bug `#233 cktdojob: Uninitialized variable: ANALmaxnum' this is WANT_SENSE2 specific http://sourceforge.net/p/ngspice/bugs/233/ 2013-02-14 rlar * src/spicelib/devices/soi3/soi3cap.c: fix bug `#232 soi3cap.c: wrong array index alpha_args[2]' though incorrect, this didn't lead to misbehavior. http://sourceforge.net/p/ngspice/bugs/232/ 2013-02-12 rlar * src/frontend/device.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/nutinp.c, * src/include/ngspice/fteext.h: inp_readall() change function signature for readability 2013-02-09 rlar * src/frontend/inpcom.c: inpcom.c: abstract into new function read_a_lib() 2013-02-09 rlar * src/frontend/inpcom.c: inpcom.c: rewrite using new function find_lib() 2013-02-09 rlar * src/frontend/inpcom.c: inp_determine_libraries(): rewrite 2013-02-09 rlar * src/frontend/inpcom.c: inp_determine_libraries(): can happen at most once 2013-02-09 rlar * src/frontend/inpcom.c: inpcom.c: small cleanup 2013-02-09 rlar * src/frontend/inpcom.c: inpcom.c: comment .lib semantic 2013-02-09 rlar * src/frontend/inpcom.c: inp_readall(): rename local variables 2013-02-09 rlar * src/frontend/inpcom.c: inp_readall(): local scope for `tmp_ptr1' 2013-01-19 rlar * src/frontend/inpcom.c: inp_readall(): local scope for `fdo' 2013-02-03 rlar * src/maths/ni/niconv.c, * src/spicelib/analysis/cktncdump.c, * src/spicelib/analysis/ckttrunc.c, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/parser/inppas3.c: use SP_VOLTAGE instead of literal value `3' (grep "git --no-pager grep -nH -e '->[ \t]*type.*[0-9]'") 2013-02-03 rlar * src/maths/ni/niiter.c, * src/spicelib/analysis/cktsetup.c: retire #define NODE_VOLTAGE, use SP_VOLTAGE instead (grep "git --no-pager grep -nH -e '\\(SP_\\|NODE_\\)\\(VOLTAGE\\|CURRENT\\)'") 2013-01-26 dwarning * src/spicelib/devices/jfet/jfet.c, * src/spicelib/devices/jfet/jfetdefs.h, * src/spicelib/devices/jfet/jfetmask.c, * src/spicelib/devices/jfet/jfetmpar.c, * src/spicelib/devices/jfet/jfetnoi.c, * src/spicelib/devices/jfet/jfetset.c: jfet: new noise model selector nlev=3 for correct noise in non-saturated region 2013-01-26 dwarning * src/spicelib/devices/jfet/jfetmask.c, * src/spicelib/devices/jfet/jfetmpar.c, * src/spicelib/devices/jfet/jfetnoi.c, * src/spicelib/devices/jfet/jfetset.c: jfet: whitespace cleanup 2013-01-26 rlar * src/ciderlib/oned/onecond.c, * src/ciderlib/oned/onecont.c, * src/ciderlib/oned/onesolve.c, * src/ciderlib/support/integuse.c, * src/ciderlib/twod/twocont.c, * src/ciderlib/twod/twoncont.c, * src/ciderlib/twod/twopcont.c, * src/ciderlib/twod/twosolve.c, * src/frontend/com_hardcopy.c, * src/frontend/device.c, * src/frontend/inpcom.c, * src/frontend/measure.c, * src/frontend/outitf.c, * src/frontend/parser/lexical.c, * src/frontend/vectors.c, * src/main.c, * src/maths/ni/niconv.c, * src/maths/ni/niinteg.c, * src/maths/ni/niiter.c, * src/maths/ni/niniter.c, * src/ngproc2mod.c, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktbkdum.c, * src/spicelib/analysis/cktclrbk.c, * src/spicelib/analysis/cktdisto.c, * src/spicelib/analysis/cktic.c, * src/spicelib/analysis/cktload.c, * src/spicelib/analysis/cktnames.c, * src/spicelib/analysis/cktncdump.c, * src/spicelib/analysis/cktop.c, * src/spicelib/analysis/cktsetbk.c, * src/spicelib/analysis/cktterr.c, * src/spicelib/analysis/dcop.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/distoan.c, * src/spicelib/analysis/nevalsrc.c, * src/spicelib/analysis/noisean.c, * src/spicelib/parser/inpeval.c, * src/spicelib/parser/inpgval.c, * src/unsupported/cktsncom.c, * src/unsupported/cktsnld.c, * src/unsupported/sen2setp.c, * src/unsupported/snstart.c, * src/xspice/cm/cmutil.c, * src/xspice/icm/analog/oneshot/cfunc.mod, * src/xspice/icm/analog/sine/cfunc.mod, * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/xtradev/core/cfunc.mod, * src/xspice/mif/mifload.c, * src/xspice/mif/miftrunc.c: cleanup, use array operator checked for object file invariance on linux with ./configure --enable-debug=no --enable-maintainer-mode --with-readline=yes --enable-cider --enable-ndev --enable-pss --enable-xspice 2013-01-25 h_vogt * src/winmain.c: winmain.c: print buffer enlarged 2013-01-25 h_vogt * src/frontend/inp.c: inp.c: some comments added 2013-01-23 rlar * contrib/mslib/datadef.h, * src/conf.h, * src/frontend/arg.h, * src/frontend/aspice.h, * src/frontend/breakp.h, * src/frontend/breakp2.h, * src/frontend/circuits.h, * src/frontend/com_alias.h, * src/frontend/com_chdir.h, * src/frontend/com_dl.h, * src/frontend/com_echo.h, * src/frontend/com_fft.h, * src/frontend/com_rehash.h, * src/frontend/com_shell.h, * src/frontend/com_shift.h, * src/frontend/com_unset.h, * src/frontend/control.h, * src/frontend/cpitf.h, * src/frontend/define.h, * src/frontend/device.h, * src/frontend/dimens.h, * src/frontend/display.h, * src/frontend/dotcards.h, * src/frontend/fourier.h, * src/frontend/gens.h, * src/frontend/hpgl.h, * src/frontend/inp.h, * src/frontend/inpcom.h, * src/frontend/interp.h, * src/frontend/linear.h, * src/frontend/misccoms.h, * src/frontend/miscvars.h, * src/frontend/mw_coms.h, * src/frontend/newcoms.h, * src/frontend/numparam/numpaif.h, * src/frontend/nutinp.h, * src/frontend/nutmegif.h, * src/frontend/options.h, * src/frontend/outitf.h, * src/frontend/parser/backq.h, * src/frontend/parser/complete.h, * src/frontend/parser/cshpar.h, * src/frontend/parser/glob.h, * src/frontend/parser/input.h, * src/frontend/parser/lexical.h, * src/frontend/parser/numparse.h, * src/frontend/parser/unixcom.h, * src/frontend/plotting/clip.h, * src/frontend/plotting/gnuplot.h, * src/frontend/plotting/graf.h, * src/frontend/plotting/graphdb.h, * src/frontend/plotting/plot5.h, * src/frontend/plotting/plotcurv.h, * src/frontend/plotting/x11.h, * src/frontend/plotting/xgraph.h, * src/frontend/points.h, * src/frontend/postcoms.h, * src/frontend/postsc.h, * src/frontend/quote.h, * src/frontend/rawfile.h, * src/frontend/resource.h, * src/frontend/runcoms.h, * src/frontend/runcoms2.h, * src/frontend/shyu.h, * src/frontend/signal_handler.h, * src/frontend/spec.h, * src/frontend/spiceif.h, * src/frontend/streams.h, * src/frontend/subckt.h, * src/frontend/typesdef.h, * src/frontend/vectors.h, * src/frontend/wdisp/windisp.h, * src/frontend/wdisp/winprint.h, * src/frontend/where.h, * src/include/ngspice/acdefs.h, * src/include/ngspice/bdrydefs.h, * src/include/ngspice/carddefs.h, * src/include/ngspice/cluster.h, * src/include/ngspice/cm.h, * src/include/ngspice/cmconstants.h, * src/include/ngspice/cmproto.h, * src/include/ngspice/cmtypes.h, * src/include/ngspice/const.h, * src/include/ngspice/contdefs.h, * src/include/ngspice/cpdefs.h, * src/include/ngspice/cpextern.h, * src/include/ngspice/cpstd.h, * src/include/ngspice/defines.h, * src/include/ngspice/devdefs.h, * src/include/ngspice/dgen.h, * src/include/ngspice/distodef.h, * src/include/ngspice/dllitf.h, * src/include/ngspice/domndefs.h, * src/include/ngspice/dopdefs.h, * src/include/ngspice/dstring.h, * src/include/ngspice/elctdefs.h, * src/include/ngspice/enh.h, * src/include/ngspice/evt.h, * src/include/ngspice/evtproto.h, * src/include/ngspice/evtudn.h, * src/include/ngspice/ftedebug.h, * src/include/ngspice/ftedefs.h, * src/include/ngspice/ftedev.h, * src/include/ngspice/fteext.h, * src/include/ngspice/fteinp.h, * src/include/ngspice/fteinput.h, * src/include/ngspice/fteoptdefs.h, * src/include/ngspice/fteparse.h, * src/include/ngspice/gendefs.h, * src/include/ngspice/gendev.h, * src/include/ngspice/hash.h, * src/include/ngspice/iferrmsg.h, * src/include/ngspice/ifsim.h, * src/include/ngspice/inpdefs.h, * src/include/ngspice/inpptree.h, * src/include/ngspice/ipc.h, * src/include/ngspice/ipcproto.h, * src/include/ngspice/ipctiein.h, * src/include/ngspice/jobdefs.h, * src/include/ngspice/macros.h, * src/include/ngspice/material.h, * src/include/ngspice/matldefs.h, * src/include/ngspice/meshdefs.h, * src/include/ngspice/meshext.h, * src/include/ngspice/methdefs.h, * src/include/ngspice/mif.h, * src/include/ngspice/mifcmdat.h, * src/include/ngspice/mifdefs.h, * src/include/ngspice/mifparse.h, * src/include/ngspice/mifproto.h, * src/include/ngspice/miftypes.h, * src/include/ngspice/missing_math.h, * src/include/ngspice/mobdefs.h, * src/include/ngspice/modldefs.h, * src/include/ngspice/ngspice.h, * src/include/ngspice/noisedef.h, * src/include/ngspice/numcards.h, * src/include/ngspice/numconst.h, * src/include/ngspice/numenum.h, * src/include/ngspice/numgen.h, * src/include/ngspice/numglobs.h, * src/include/ngspice/onedev.h, * src/include/ngspice/onemesh.h, * src/include/ngspice/opdefs.h, * src/include/ngspice/optdefs.h, * src/include/ngspice/optndefs.h, * src/include/ngspice/outpdefs.h, * src/include/ngspice/profile.h, * src/include/ngspice/pssdefs.h, * src/include/ngspice/pzdefs.h, * src/include/ngspice/sen2defs.h, * src/include/ngspice/sensdefs.h, * src/include/ngspice/smpdefs.h, * src/include/ngspice/stringutil.h, * src/include/ngspice/swec.h, * src/include/ngspice/tclspice.h, * src/include/ngspice/tfdefs.h, * src/include/ngspice/trandefs.h, * src/include/ngspice/trcvdefs.h, * src/include/ngspice/tskdefs.h, * src/include/ngspice/twodev.h, * src/include/ngspice/twomesh.h, * src/include/ngspice/typedefs.h, * src/include/ngspice/wstdio.h, * src/maths/cmaths/cmath1.h, * src/maths/cmaths/cmath2.h, * src/maths/cmaths/cmath3.h, * src/maths/cmaths/cmath4.h, * src/maths/misc/accuracy.h, * src/maths/misc/bernoull.h, * src/maths/misc/norm.h, * src/maths/sparse/spconfig.h, * src/misc/alloc.h, * src/misc/dup2.h, * src/misc/ivars.h, * src/misc/misc_time.h, * src/misc/mktemp.h, * src/misc/printnum.h, * src/misc/tilde.h, * src/misc/util.h, * src/spicelib/parser/inpxx.h: unify #ifndef include wrapper 2013-01-23 rlar * src/frontend/com_chdir.h, * src/frontend/com_echo.h, * src/frontend/com_rehash.h, * src/frontend/com_shell.h, * src/frontend/com_shift.h, * src/frontend/com_unset.h, * src/frontend/control.h, * src/frontend/display.h, * src/frontend/gens.h, * src/frontend/spiceif.h, * src/frontend/streams.h, * src/frontend/wdisp/windisp.h, * src/frontend/wdisp/winprint.h, * src/include/ngspice/acdefs.h, * src/include/ngspice/bdrydefs.h, * src/include/ngspice/carddefs.h, * src/include/ngspice/cm.h, * src/include/ngspice/cmconstants.h, * src/include/ngspice/cmproto.h, * src/include/ngspice/cmtypes.h, * src/include/ngspice/contdefs.h, * src/include/ngspice/cpdefs.h, * src/include/ngspice/devdefs.h, * src/include/ngspice/dgen.h, * src/include/ngspice/distodef.h, * src/include/ngspice/domndefs.h, * src/include/ngspice/dopdefs.h, * src/include/ngspice/dstring.h, * src/include/ngspice/elctdefs.h, * src/include/ngspice/enh.h, * src/include/ngspice/evt.h, * src/include/ngspice/evtproto.h, * src/include/ngspice/evtudn.h, * src/include/ngspice/ftedebug.h, * src/include/ngspice/ftedefs.h, * src/include/ngspice/fteext.h, * src/include/ngspice/fteinp.h, * src/include/ngspice/fteoptdefs.h, * src/include/ngspice/fteparse.h, * src/include/ngspice/gendefs.h, * src/include/ngspice/gendev.h, * src/include/ngspice/hash.h, * src/include/ngspice/iferrmsg.h, * src/include/ngspice/ifsim.h, * src/include/ngspice/inpdefs.h, * src/include/ngspice/ipc.h, * src/include/ngspice/ipctiein.h, * src/include/ngspice/jobdefs.h, * src/include/ngspice/material.h, * src/include/ngspice/matldefs.h, * src/include/ngspice/meshdefs.h, * src/include/ngspice/meshext.h, * src/include/ngspice/methdefs.h, * src/include/ngspice/mif.h, * src/include/ngspice/mifcmdat.h, * src/include/ngspice/mifdefs.h, * src/include/ngspice/mifparse.h, * src/include/ngspice/mifproto.h, * src/include/ngspice/miftypes.h, * src/include/ngspice/missing_math.h, * src/include/ngspice/mobdefs.h, * src/include/ngspice/modldefs.h, * src/include/ngspice/ngspice.h, * src/include/ngspice/noisedef.h, * src/include/ngspice/numcards.h, * src/include/ngspice/numconst.h, * src/include/ngspice/numenum.h, * src/include/ngspice/numgen.h, * src/include/ngspice/numglobs.h, * src/include/ngspice/onedev.h, * src/include/ngspice/onemesh.h, * src/include/ngspice/opdefs.h, * src/include/ngspice/optdefs.h, * src/include/ngspice/optndefs.h, * src/include/ngspice/outpdefs.h, * src/include/ngspice/profile.h, * src/include/ngspice/sen2defs.h, * src/include/ngspice/smpdefs.h, * src/include/ngspice/tfdefs.h, * src/include/ngspice/trandefs.h, * src/include/ngspice/trcvdefs.h, * src/include/ngspice/tskdefs.h, * src/include/ngspice/twodev.h, * src/include/ngspice/twomesh.h, * src/include/ngspice/wstdio.h, * src/maths/misc/accuracy.h, * src/maths/misc/bernoull.h, * src/maths/misc/norm.h, * src/maths/sparse/spconfig.h: prepare for #ifndef include wrapper unification 2013-01-23 rlar * src/include/ngspice/cktdefs.h, * src/spicelib/devices/ndev/ndevexch.h: rename #ifndef include wrapper CKT_H 2013-01-22 rlar * src/ciderlib/oned/oneddefs.h, * src/ciderlib/oned/onedext.h, * src/ciderlib/twod/twoddefs.h, * src/ciderlib/twod/twodext.h, * src/frontend/com_ahelp.h, * src/frontend/com_asciiplot.h, * src/frontend/com_cdump.h, * src/frontend/com_commands.h, * src/frontend/com_compose.h, * src/frontend/com_display.h, * src/frontend/com_dl.h, * src/frontend/com_dump.h, * src/frontend/com_ghelp.h, * src/frontend/com_gnuplot.h, * src/frontend/com_hardcopy.h, * src/frontend/com_help.h, * src/frontend/com_history.h, * src/frontend/com_let.h, * src/frontend/com_measure2.h, * src/frontend/com_option.h, * src/frontend/com_plot.h, * src/frontend/com_set.h, * src/frontend/com_setscale.h, * src/frontend/com_state.h, * src/frontend/com_strcmp.h, * src/frontend/com_xgraph.h, * src/frontend/commands.h, * src/frontend/completion.h, * src/frontend/diff.h, * src/frontend/evaluate.h, * src/frontend/hcomp.h, * src/frontend/init.h, * src/frontend/parse.h, * src/frontend/plotting/agraf.h, * src/frontend/plotting/plotit.h, * src/frontend/plotting/plotting.h, * src/frontend/plotting/pvec.h, * src/frontend/terminal.h, * src/frontend/variable.h, * src/include/ngspice/bool.h, * src/include/ngspice/ciderinp.h, * src/include/ngspice/cidersupt.h, * src/include/ngspice/cluster.h, * src/include/ngspice/compatmode.h, * src/include/ngspice/complex.h, * src/include/ngspice/cpstd.h, * src/include/ngspice/defines.h, * src/include/ngspice/dllitf.h, * src/include/ngspice/dvec.h, * src/include/ngspice/fteinput.h, * src/include/ngspice/graph.h, * src/include/ngspice/grid.h, * src/include/ngspice/macros.h, * src/include/ngspice/memory.h, * src/include/ngspice/plot.h, * src/include/ngspice/pnode.h, * src/include/ngspice/sim.h, * src/include/ngspice/sperror.h, * src/include/ngspice/swec.h, * src/include/ngspice/wordlist.h, * src/maths/cmaths/cmath.h, * src/maths/poly/interpolate.h, * src/maths/poly/poly.h, * src/maths/poly/polyderiv.h, * src/maths/poly/polyeval.h, * src/maths/poly/polyfit.h, * src/maths/sparse/spdefs.h, * src/spicelib/analysis/analysis.h, * src/spicelib/parser/inppas1.h, * src/spicelib/parser/inppas2.h, * src/spicelib/parser/inppas3.h: avoid leading underscore in preprocessor macros 2013-01-22 rlar * src/frontend/com_measure2.h, * src/include/ngspice/complex.h, * src/include/ngspice/cpstd.h, * src/include/ngspice/defines.h, * src/include/ngspice/fteinput.h, * src/include/ngspice/macros.h: cleanup some preprocessor macros 2013-01-19 rlar * configure.ac, * tests/Makefile.am, * tests/bin/check.sh, * tests/regression/Makefile.am, * tests/regression/lib-processing/Makefile.am, * tests/regression/lib-processing/ex1.lib, * tests/regression/lib-processing/ex1a.cir, * tests/regression/lib-processing/ex1a.out, * tests/regression/lib-processing/ex1b.cir, * tests/regression/lib-processing/ex1b.out, * tests/regression/lib-processing/ex2.lib, * tests/regression/lib-processing/ex2a.cir, * tests/regression/lib-processing/ex2a.out, * tests/regression/lib-processing/ex3.lib, * tests/regression/lib-processing/ex3a.cir, * tests/regression/lib-processing/ex3a.out, * tests/regression/lib-processing/extra3.lib: check the .lib processing 2013-01-18 h_vogt * src/frontend/subckt.c: fix bug #229 `Node name "n" is sometimes toxic' Error: too few nodes for MOS or CPL: m6 1 n 2 vss nch.3 l=4.3e-07 ... http://sourceforge.net/p/ngspice/bugs/229/ 2013-01-16 Francesco Lannutti * autogen.sh: Restored the execution flag on configure when ADMS is enabled 2013-01-13 rlar * src/frontend/inpcom.c: inpcom.c: rewrite for readability 2013-01-12 rlar * src/frontend/inpcom.c: inpcom.c, bug fix, incorrect start value for `prev' this bug was introduced in the following commit, which `reused' variable prev, failing to preserve its initialization value NULL Author: pnenzi Date: Mon Oct 8 21:10:34 2007 +0000 Improvements in frontend by Phil Barker 2013-01-12 Francesco Lannutti * src/spicelib/analysis/dcpss.c: Fixed a memory leak in dcpss.c on the "err_conv" array 2013-01-11 Francesco Lannutti * configure.ac: Changed --enable-debug to --disable-debug in configure.ac to have it correctly displayed in the automatic completion 2013-01-07 Francesco Lannutti * INSTALL: Added Mac OS X compilation information 2013-01-02 rlar * ChangeLog: update ChangeLog from `git log' 2013-01-01 h_vogt * src/include/ngspice/ngspice.h, * src/misc/ivars.c: ivars.c: prevent crash in CYGWIN batch mode, if NGSPICE_INPUT_DIR given remove unused Default_MFB_Cap 2013-01-01 dwarning * src/spicelib/devices/bsimsoi/b4soinoi.c: b4soinoi.c: Correct the flicker noise model with device multiplier 2013-01-01 h_vogt * src/frontend/inp.c: inp.c: remove buf if .control section contains only 'save...' lines 2012-12-31 dwarning * DEVICES, * FAQ, * NEWS: update the hisim and hisimhv versions 2012-12-31 rlar * src/spicelib/devices/hisim2/hsm2init.c: fix commit "update hisim to version 2.7.0" missing #include "ngspice/config.h" thats required for consistent interpretation of the type struct IFdevice from ngspice/ifsim.h included from ngspice/devdefs.h (invisible XSPICE definition leading to different size and layout of this struct) 2012-12-31 rlar * tests/bin/check.sh: compare a little bit less when running `make check' windows ngspice emmits a user notice "binary raw file" when running ngspice don't compare that 2012-12-30 h_vogt * src/frontend/inpcom.c: inpcom.c: exit if 'poly' option is required, but XSPICE not available, remove memory leak 2012-12-30 h_vogt * src/spicelib/analysis/dcpss.c: dcpss.c: Allow XSPICE usage without excessive debug message 2012-12-30 h_vogt * src/frontend/com_dl.c: com_dl.c: exit upon codemodel load error 2012-12-28 h_vogt * src/spicelib/analysis/dcpss.c, * visualc/include/ngspice/config.h, * visualc/vngspice.vcproj: dcpss.c : compatibility to MS Visual Studio C vngspice.vcproj, config.h: add PSS to Vc project 2012-12-28 Stefano Perticaroli * configure.ac, * examples/pss/colpitt_osc_pss.cir, * examples/pss/compl_cross_quad_osc_pss.cir, * examples/pss/hartley_osc_pss.cir, * examples/pss/ring_osc_pss.cir, * examples/pss/vackar_osc_pss.cir, * examples/pss/vdp_osc_pss.cir, * src/frontend/commands.c, * src/frontend/outitf.c, * src/frontend/runcoms.c, * src/frontend/runcoms.h, * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/frontend/typesdef.c, * src/include/ngspice/Makefile.am, * src/include/ngspice/cktdefs.h, * src/include/ngspice/pssdefs.h, * src/spicelib/analysis/Makefile.am, * src/spicelib/analysis/analysis.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/pssaskq.c, * src/spicelib/analysis/pssinit.c, * src/spicelib/analysis/psssetp.c, * src/spicelib/parser/inp2dot.c, * visualc/vngspice.vcproj: next version of PSS2 which was reviewed and rewritten on branch `PSS-2-try-to-rebase+4' by Stefano Perticaroli and Francesco Lannutti 2012-12-28 rlar * configure.ac, * examples/pss/colpitt_osc_pss.cir, * examples/pss/compl_cross_quad_osc_pss.cir, * examples/pss/hartley_osc_pss.cir, * examples/pss/ring_osc_pss.cir, * examples/pss/vackar_osc_pss.cir, * examples/pss/vdp_osc_pss.cir, * src/frontend/commands.c, * src/frontend/runcoms.c, * src/frontend/runcoms.h, * src/frontend/shyu.c, * src/frontend/spiceif.c, * src/include/ngspice/Makefile.am, * src/include/ngspice/cktdefs.h, * src/include/ngspice/pssdefs.h, * src/spicelib/analysis/Makefile.am, * src/spicelib/analysis/analysis.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/pssaskq.c, * src/spicelib/analysis/pssinit.c, * src/spicelib/analysis/psssetp.c, * src/spicelib/parser/inp2dot.c, * visualc/vngspice.vcproj: remove PSS2 2012-12-27 h_vogt * src/spicelib/parser/Makefile.am, * src/spicelib/parser/ifeval.c, * src/spicelib/parser/ifnewuid.c, * src/spicelib/parser/inp.h, * src/spicelib/parser/inp2b.c, * src/spicelib/parser/inp2c.c, * src/spicelib/parser/inp2d.c, * src/spicelib/parser/inp2dot.c, * src/spicelib/parser/inp2e.c, * src/spicelib/parser/inp2f.c, * src/spicelib/parser/inp2g.c, * src/spicelib/parser/inp2h.c, * src/spicelib/parser/inp2i.c, * src/spicelib/parser/inp2j.c, * src/spicelib/parser/inp2k.c, * src/spicelib/parser/inp2l.c, * src/spicelib/parser/inp2m.c, * src/spicelib/parser/inp2n.c, * src/spicelib/parser/inp2o.c, * src/spicelib/parser/inp2p.c, * src/spicelib/parser/inp2q.c, * src/spicelib/parser/inp2r.c, * src/spicelib/parser/inp2s.c, * src/spicelib/parser/inp2t.c, * src/spicelib/parser/inp2u.c, * src/spicelib/parser/inp2v.c, * src/spicelib/parser/inp2w.c, * src/spicelib/parser/inp2y.c, * src/spicelib/parser/inp2z.c, * src/spicelib/parser/inpaname.c, * src/spicelib/parser/inpapnam.c, * src/spicelib/parser/inpcfix.c, * src/spicelib/parser/inpdomod.c, * src/spicelib/parser/inpdpar.c, * src/spicelib/parser/inperrc.c, * src/spicelib/parser/inperror.c, * src/spicelib/parser/inpeval.c, * src/spicelib/parser/inpfindl.c, * src/spicelib/parser/inpfindv.c, * src/spicelib/parser/inpgmod.c, * src/spicelib/parser/inpgstr.c, * src/spicelib/parser/inpgtitl.c, * src/spicelib/parser/inpgtok.c, * src/spicelib/parser/inpgval.c, * src/spicelib/parser/inpkmods.c, * src/spicelib/parser/inplist.c, * src/spicelib/parser/inpmkmod.c, * src/spicelib/parser/inpmktmp.c, * src/spicelib/parser/inppas2.c, * src/spicelib/parser/inppname.c, * src/spicelib/parser/inpptree.c, * src/spicelib/parser/inpsymt.c, * src/spicelib/parser/inptyplk.c, * src/spicelib/parser/inpxx.h, * src/spicelib/parser/ptfuncs.c, * src/spicelib/parser/sperror.c, * visualc/vngspice.vcproj: rename spicelib/parser/inp.h to inpxx.h since we have another "inp.h" in src/frontend 2012-12-25 Francesco Lannutti * src/maths/ni/nipred.c: nipred.c, remove unused variable `temp' 2012-12-25 Francesco Lannutti * src/include/ngspice/cktdefs.h, * src/maths/ni/Makefile.am, * src/maths/ni/nipred.c, * src/maths/ni/nipred.h, * src/spicelib/analysis/dctran.c, * visualc/vngspice.vcproj: remove almost empty src/maths/ni/nipred.h 2012-12-25 dwarning * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml: distclean and maintainer-clean shall remove generated Makefile.am files in adms directories 2012-12-24 Francesco Lannutti * src/maths/ni/Makefile.am, * src/maths/ni/niaciter.c, * src/maths/ni/niaciter.h, * src/maths/ni/nicomcof.c, * src/maths/ni/nicomcof.h, * src/maths/ni/niconv.c, * src/maths/ni/niconv.h, * src/maths/ni/nidest.c, * src/maths/ni/nidest.h, * src/maths/ni/niditer.c, * src/maths/ni/niditer.h, * src/maths/ni/niinit.c, * src/maths/ni/niinit.h, * src/maths/ni/niinteg.c, * src/maths/ni/niinteg.h, * src/maths/ni/niiter.c, * src/maths/ni/niiter.h, * src/maths/ni/niniter.c, * src/maths/ni/niniter.h, * src/maths/ni/nipzmeth.c, * src/maths/ni/nipzmeth.h, * src/maths/ni/nireinit.c, * src/maths/ni/nireinit.h, * src/maths/ni/nisenre.c, * src/maths/ni/nisenre.h, * src/spicelib/analysis/noisean.c, * visualc/vngspice.vcproj: remove empty src/maths/ni/*.h include files 2012-12-23 h_vogt * src/tclspice.c, * tests/bin/ngspice.pm, * visualc/include/ngspice/config.h: tclspice.c, ngspice.pm, config.h in visualc: prepare ngspice-25 2012-12-23 h_vogt * configure.ac: configure.ac: prepare ngspice-25 2012-12-23 h_vogt * COPYING, * FAQ, * INSTALL, * NEWS, * README.tcl: prepare ngspice-25, Robert's patches and more 2012-12-15 rlar * configure.ac: configure.ac, defensive use of `AC_OPENMP' 2012-12-22 h_vogt * src/spicelib/parser/inpdpar.c: inpdpar.c: remove memory leak 2012-12-22 h_vogt * ANALYSES, * AUTHORS, * COPYING, * README: prepare ngspice-25 2012-12-22 h_vogt * src/spicelib/devices/isrc/isrcacct.c, * src/spicelib/devices/isrc/isrcload.c, * src/spicelib/devices/vsrc/vsrcacct.c, * src/spicelib/devices/vsrc/vsrcload.c: vsrc, isrc TRNOISE: allow repeated calls to 'tran' 2012-12-22 h_vogt * src/spicelib/analysis/cktntask.c: cktntask.c: remove meory leak 2012-12-22 h_vogt * FAQ, * INSTALL: FAQ, INSTALL: update to git, ngspice-25 2012-12-20 rlar * src/xspice/mif/mif_inp2.c: use enum Mif_Port_Type_t values instead of numericals 2012-12-19 dwarning * src/frontend/inp.c, * src/frontend/spiceif.c: remove of modtab after the job is done to issue additional source commands 2012-12-18 h_vogt * src/spicelib/devices/isrc/isrcload.c: isrcload.c: remove memory read beyond array boundary 2012-12-16 rlar * src/frontend/fourier.c: use enum dvec_flags values instead of numericals 2012-12-16 rlar * src/frontend/fourier.c, * src/frontend/vectors.c: use enum simulation_types values instead of numericals 2012-12-16 h_vogt * src/frontend/device.c: device.c: plug memory leak in 'alter' command 2012-12-15 h_vogt * src/frontend/plotting/plotit.c: plotit.c: remove memory leaks 2012-12-15 h_vogt * src/frontend/com_display.c: com_display.c: remove memory leak 2012-12-15 rlar * src/spicelib/parser/inperror.c: inperror.c, release errMsg when it has been consumed 2012-12-15 h_vogt * src/maths/ni/niiter.c: niiter.c: indentations 2012-12-15 h_vogt * src/main.c, * src/spicelib/parser/inperror.c: main.c, inperror.c: unify errMsg 2012-12-15 h_vogt * src/spicelib/parser/inperror.c: inperror.c: indentations 2012-12-09 h_vogt * src/frontend/com_measure2.c, * src/frontend/measure.c: com_measure.c, measure.c: remove memory leaks 2012-12-09 h_vogt * src/frontend/measure.c, * src/include/ngspice/fteext.h: measure.c, rewrite do_measure() 2012-12-09 h_vogt * src/frontend/evaluate.c: apply_func(), use arg->pn_value->v_name instead of recreated name 2012-12-09 h_vogt * src/frontend/diff.c: com_diff(), use hash tables for the vector search patch originally provided by Bill Swartz, 2010 reduces vector search time from O(n*n) to O(n) 2012-12-09 h_vogt * src/frontend/plotting/plotting.c, * src/frontend/vectors.c, * src/include/ngspice/plot.h: findvec(), use hash tables for the vector search patch originally provided by Bill Swartz, 2010 reduces vector search time from O(n) to O(1) 2012-12-09 h_vogt * src/include/ngspice/dstring.h, * src/misc/dstring.c: implement spice_dstring_append_lower() patch originally provided by Bill Swartz, 2010 2012-12-05 h_vogt * src/frontend/measure.c: measure.c: outputting 'meas' status in Windows GUI 2012-12-04 dwarning * src/spicelib/devices/jfet/jfet.c, * src/spicelib/devices/jfet/jfetdefs.h, * src/spicelib/devices/jfet/jfetdset.c, * src/spicelib/devices/jfet/jfetload.c, * src/spicelib/devices/jfet/jfetmask.c, * src/spicelib/devices/jfet/jfetmpar.c, * src/spicelib/devices/jfet/jfetset.c, * src/spicelib/devices/jfet/jfettemp.c: jfet model temperature extension, tcv and bex parameter 2012-12-02 rlar * src/main.c: allow Ctrl-d to quit based upon Cody Creagers patch, EOF Control-D support - ID: 3586069 http://sourceforge.net/tracker/?func=detail&aid=3586069&group_id=38962&atid=423917 2012-12-01 rlar * src/xspice/cmpp/cmpp.h, * src/xspice/cmpp/pp_lst.c, * src/xspice/cmpp/pp_mod.c, * src/xspice/cmpp/read_ifs.c, * src/xspice/cmpp/util.c, * src/xspice/cmpp/writ_ifs.c: cmpp, rewrite for proper report of error locations 2012-12-01 rlar * src/xspice/cmpp/cmpp.h, * src/xspice/cmpp/pp_lst.c, * src/xspice/cmpp/pp_mod.c, * src/xspice/cmpp/read_ifs.c, * src/xspice/cmpp/util.c, * src/xspice/cmpp/writ_ifs.c: cmpp, use for print_error() 2012-12-01 rlar * src/xspice/cmpp/pp_mod.c: cmpp, remove dead code 2012-12-01 rlar * src/xspice/cmpp/pp_mod.c: cmpp, don't exit(0) when reporting an error 2012-12-01 rlar * src/frontend/com_fft.c, * src/frontend/device.c, * src/frontend/gens.c, * src/frontend/inpcom.c, * src/frontend/plotting/graf.c, * src/frontend/plotting/grid.c, * src/frontend/rawfile.c, * src/maths/misc/norm.c, * src/spicelib/analysis/cktnames.c, * src/spicelib/analysis/cktpzstr.c, * src/spicelib/devices/asrc/asrcacld.c, * src/spicelib/parser/inpgtok.c: remove unused variables 2012-12-01 rlar * src/spicelib/devices/hisimhv1/hsmhvld.c, * src/spicelib/devices/hisimhv1/hsmhvnoi.c: hisimhv1, avoid warnings 2012-12-01 h_vogt * src/spicelib/devices/cpl/cplsetup.c: cplsetup.c: indentations etc. 2012-12-01 h_vogt * src/spicelib/devices/cpl/cplsetup.c: cplsetup.c: remove memory leaks 2012-12-01 h_vogt * src/frontend/inpcom.c: inpcom.c: remove memory leak 2012-12-01 rlar * src/spicelib/devices/ltra/ltraacct.c: ltraacct.c, shortcutting the bug fix use following fact at the artificial timestep time[-1] voltage[-1] === voltage[0] to shortcut the expressions 2012-12-01 rlar * src/spicelib/devices/ltra/ltraacct.c: ltraacct.c, bug fix reported by Gary Hennigan on tracker http://sourceforge.net/tracker/index.php?func=detail&aid=3591132&group_id=38962&atid=423915 access to uninitialized memory, trying to acquire the "time" of a projected auxiliary timestep in the past. now using the following auxiliary timestep t[-1] voltage(t[-1]) === voltage(t[0]) and t[-1] === t[0] - (t[1] - t[0]) the details are not understood, but thats certainly better than accessing uninitialized memory. 2012-11-27 h_vogt * src/frontend/inpcom.c: inpcom.c: plug memory leaks 2012-11-26 dwarning * tests/hisimhv1/nmos/reference/dcVsub_Id1_vb0.standard, * tests/hisimhv1/nmos/reference/dcVsub_Id1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcVsub_Id1_vb1.standard, * tests/hisimhv1/nmos/reference/dcVsub_Id1_vb2.standard, * tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb0.standard, * tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb1.standard, * tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb2.standard, * tests/hisimhv1/pmos/reference/dcVsub_Id1_vb0.standard, * tests/hisimhv1/pmos/reference/dcVsub_Id1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcVsub_Id1_vb1.standard, * tests/hisimhv1/pmos/reference/dcVsub_Id1_vb2.standard, * tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb0.standard, * tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb1.standard, * tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb2.standard: hisimhv update to version 1.2.3 2012-11-26 dwarning * src/spicelib/devices/hisimhv1/hisimhv.h, * src/spicelib/devices/hisimhv1/hsmhv.c, * src/spicelib/devices/hisimhv1/hsmhvacld.c, * src/spicelib/devices/hisimhv1/hsmhvask.c, * src/spicelib/devices/hisimhv1/hsmhvcvtest.c, * src/spicelib/devices/hisimhv1/hsmhvdef.h, * src/spicelib/devices/hisimhv1/hsmhvdel.c, * src/spicelib/devices/hisimhv1/hsmhvdest.c, * src/spicelib/devices/hisimhv1/hsmhveval.c, * src/spicelib/devices/hisimhv1/hsmhveval_qover.h, * src/spicelib/devices/hisimhv1/hsmhvevalenv.h, * src/spicelib/devices/hisimhv1/hsmhvext.h, * src/spicelib/devices/hisimhv1/hsmhvgetic.c, * src/spicelib/devices/hisimhv1/hsmhvitf.h, * src/spicelib/devices/hisimhv1/hsmhvld.c, * src/spicelib/devices/hisimhv1/hsmhvld_info_eval.h, * src/spicelib/devices/hisimhv1/hsmhvmask.c, * src/spicelib/devices/hisimhv1/hsmhvmdel.c, * src/spicelib/devices/hisimhv1/hsmhvmpar.c, * src/spicelib/devices/hisimhv1/hsmhvnoi.c, * src/spicelib/devices/hisimhv1/hsmhvpar.c, * src/spicelib/devices/hisimhv1/hsmhvpzld.c, * src/spicelib/devices/hisimhv1/hsmhvset.c, * src/spicelib/devices/hisimhv1/hsmhvtemp.c, * src/spicelib/devices/hisimhv1/hsmhvtemp_eval.h, * src/spicelib/devices/hisimhv1/hsmhvtrunc.c, * tests/hisimhv1/nmos/parameters/nmosParameters, * tests/hisimhv1/nmos/qaSpec, * tests/hisimhv1/nmos/qaSpec.basic, * tests/hisimhv1/nmos/reference/acFreq.standard, * tests/hisimhv1/nmos/reference/acFreq_coadov.standard, * tests/hisimhv1/nmos/reference/acFreq_coiigs.standard, * tests/hisimhv1/nmos/reference/acFreq_conqs.standard, * tests/hisimhv1/nmos/reference/acFreq_coovlp.standard, * tests/hisimhv1/nmos/reference/acFreq_cosym.standard, * tests/hisimhv1/nmos/reference/acFreq_nover.standard, * tests/hisimhv1/nmos/reference/acVd.standard, * tests/hisimhv1/nmos/reference/acVd_corsrd1.standard, * tests/hisimhv1/nmos/reference/acVd_corsrd2.standard, * tests/hisimhv1/nmos/reference/acVd_cosym.standard, * tests/hisimhv1/nmos/reference/acVd_cvdsover.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd0.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd1.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd2.standard, * tests/hisimhv1/nmos/reference/dcSw_cosym.standard, * tests/hisimhv1/nmos/reference/dcSw_gidl.standard, * tests/hisimhv1/nmos/reference/dcSw_isub.standard, * tests/hisimhv1/nmos/reference/dcSw_ld2.standard, * tests/hisimhv1/nmos/reference/dcSw_lg2.standard, * tests/hisimhv1/nmos/reference/dcSw_rs2m.standard, * tests/hisimhv1/nmos/reference/dcSw_she.standard, * tests/hisimhv1/nmos/reference/noise1.standard, * tests/hisimhv1/nmos/reference/noise2.standard, * tests/hisimhv1/pmos/parameters/pmosParameters, * tests/hisimhv1/pmos/qaSpec, * tests/hisimhv1/pmos/qaSpec.basic, * tests/hisimhv1/pmos/reference/acFreq.standard, * tests/hisimhv1/pmos/reference/acFreq_coadov.standard, * tests/hisimhv1/pmos/reference/acFreq_coiigs.standard, * tests/hisimhv1/pmos/reference/acFreq_conqs.standard, * tests/hisimhv1/pmos/reference/acFreq_coovlp.standard, * tests/hisimhv1/pmos/reference/acFreq_cosym.standard, * tests/hisimhv1/pmos/reference/acFreq_nover.standard, * tests/hisimhv1/pmos/reference/acVd.standard, * tests/hisimhv1/pmos/reference/acVd_corsrd1.standard, * tests/hisimhv1/pmos/reference/acVd_corsrd2.standard, * tests/hisimhv1/pmos/reference/acVd_cosym.standard, * tests/hisimhv1/pmos/reference/acVd_cvdsover.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd0.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd1.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd2.standard, * tests/hisimhv1/pmos/reference/dcSw_cosym.standard, * tests/hisimhv1/pmos/reference/dcSw_gidl.standard, * tests/hisimhv1/pmos/reference/dcSw_isub.standard, * tests/hisimhv1/pmos/reference/dcSw_ld2.standard, * tests/hisimhv1/pmos/reference/dcSw_lg2.standard, * tests/hisimhv1/pmos/reference/dcSw_rs2m.standard, * tests/hisimhv1/pmos/reference/dcSw_she.standard, * tests/hisimhv1/pmos/reference/noise1.standard, * tests/hisimhv1/pmos/reference/noise2.standard: hisimhv update to version 1.2.3 2012-11-25 h_vogt * src/frontend/inpcom.c: inpcom.c: prevent invalid memory read/write 2012-11-25 dwarning * configure.ac, * src/Makefile.am, * src/spicelib/devices/Makefile.am, * src/spicelib/devices/dev.c, * src/spicelib/devices/hisimhv1/Makefile.am, * tests/Makefile.am, * visualc/vngspice.vcproj: change model name from hisimhv to hisimhv1 2012-11-25 dwarning * src/spicelib/devices/hisimhv/Makefile.am, * src/spicelib/devices/hisimhv/hisimhv.h, * src/spicelib/devices/hisimhv/hsmhv.c, * src/spicelib/devices/hisimhv/hsmhvacld.c, * src/spicelib/devices/hisimhv/hsmhvask.c, * src/spicelib/devices/hisimhv/hsmhvcvtest.c, * src/spicelib/devices/hisimhv/hsmhvdef.h, * src/spicelib/devices/hisimhv/hsmhvdel.c, * src/spicelib/devices/hisimhv/hsmhvdest.c, * src/spicelib/devices/hisimhv/hsmhveval.c, * src/spicelib/devices/hisimhv/hsmhveval_qover.h, * src/spicelib/devices/hisimhv/hsmhvevalenv.h, * src/spicelib/devices/hisimhv/hsmhvext.h, * src/spicelib/devices/hisimhv/hsmhvgetic.c, * src/spicelib/devices/hisimhv/hsmhvinit.c, * src/spicelib/devices/hisimhv/hsmhvinit.h, * src/spicelib/devices/hisimhv/hsmhvitf.h, * src/spicelib/devices/hisimhv/hsmhvld.c, * src/spicelib/devices/hisimhv/hsmhvld_info_eval.h, * src/spicelib/devices/hisimhv/hsmhvmask.c, * src/spicelib/devices/hisimhv/hsmhvmdel.c, * src/spicelib/devices/hisimhv/hsmhvmpar.c, * src/spicelib/devices/hisimhv/hsmhvnoi.c, * src/spicelib/devices/hisimhv/hsmhvpar.c, * src/spicelib/devices/hisimhv/hsmhvpzld.c, * src/spicelib/devices/hisimhv/hsmhvset.c, * src/spicelib/devices/hisimhv/hsmhvtemp.c, * src/spicelib/devices/hisimhv/hsmhvtemp_eval.h, * src/spicelib/devices/hisimhv/hsmhvtrunc.c, * src/spicelib/devices/hisimhv1/Makefile.am, * src/spicelib/devices/hisimhv1/hisimhv.h, * src/spicelib/devices/hisimhv1/hsmhv.c, * src/spicelib/devices/hisimhv1/hsmhvacld.c, * src/spicelib/devices/hisimhv1/hsmhvask.c, * src/spicelib/devices/hisimhv1/hsmhvcvtest.c, * src/spicelib/devices/hisimhv1/hsmhvdef.h, * src/spicelib/devices/hisimhv1/hsmhvdel.c, * src/spicelib/devices/hisimhv1/hsmhvdest.c, * src/spicelib/devices/hisimhv1/hsmhveval.c, * src/spicelib/devices/hisimhv1/hsmhveval_qover.h, * src/spicelib/devices/hisimhv1/hsmhvevalenv.h, * src/spicelib/devices/hisimhv1/hsmhvext.h, * src/spicelib/devices/hisimhv1/hsmhvgetic.c, * src/spicelib/devices/hisimhv1/hsmhvinit.c, * src/spicelib/devices/hisimhv1/hsmhvinit.h, * src/spicelib/devices/hisimhv1/hsmhvitf.h, * src/spicelib/devices/hisimhv1/hsmhvld.c, * src/spicelib/devices/hisimhv1/hsmhvld_info_eval.h, * src/spicelib/devices/hisimhv1/hsmhvmask.c, * src/spicelib/devices/hisimhv1/hsmhvmdel.c, * src/spicelib/devices/hisimhv1/hsmhvmpar.c, * src/spicelib/devices/hisimhv1/hsmhvnoi.c, * src/spicelib/devices/hisimhv1/hsmhvpar.c, * src/spicelib/devices/hisimhv1/hsmhvpzld.c, * src/spicelib/devices/hisimhv1/hsmhvset.c, * src/spicelib/devices/hisimhv1/hsmhvtemp.c, * src/spicelib/devices/hisimhv1/hsmhvtemp_eval.h, * src/spicelib/devices/hisimhv1/hsmhvtrunc.c, * tests/hisimhv/Makefile.am, * tests/hisimhv/nmos/parameters/nmosParameters, * tests/hisimhv/nmos/qaSpec, * tests/hisimhv/nmos/qaSpec.basic, * tests/hisimhv/nmos/reference/acFreq.standard, * tests/hisimhv/nmos/reference/acFreq_coadov.standard, * tests/hisimhv/nmos/reference/acFreq_coiigs.standard, * tests/hisimhv/nmos/reference/acFreq_conqs.standard, * tests/hisimhv/nmos/reference/acFreq_coovlp.standard, * tests/hisimhv/nmos/reference/acFreq_cosym.standard, * tests/hisimhv/nmos/reference/acFreq_nover.standard, * tests/hisimhv/nmos/reference/acVd.standard, * tests/hisimhv/nmos/reference/acVd_corsrd1.standard, * tests/hisimhv/nmos/reference/acVd_corsrd2.standard, * tests/hisimhv/nmos/reference/acVd_cosym.standard, * tests/hisimhv/nmos/reference/acVd_cvdsover.standard, * tests/hisimhv/nmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv/nmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv/nmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv/nmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv/nmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv/nmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv/nmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv/nmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv/nmos/reference/dcSw_corsrd0.standard, * tests/hisimhv/nmos/reference/dcSw_corsrd1.standard, * tests/hisimhv/nmos/reference/dcSw_corsrd2.standard, * tests/hisimhv/nmos/reference/dcSw_cosym.standard, * tests/hisimhv/nmos/reference/dcSw_gidl.standard, * tests/hisimhv/nmos/reference/dcSw_isub.standard, * tests/hisimhv/nmos/reference/dcSw_ld2.standard, * tests/hisimhv/nmos/reference/dcSw_lg2.standard, * tests/hisimhv/nmos/reference/dcSw_rs2m.standard, * tests/hisimhv/nmos/reference/dcSw_she.standard, * tests/hisimhv/nmos/reference/noise1.standard, * tests/hisimhv/nmos/reference/noise2.standard, * tests/hisimhv/nmos/run, * tests/hisimhv/pmos/parameters/pmosParameters, * tests/hisimhv/pmos/qaSpec, * tests/hisimhv/pmos/qaSpec.basic, * tests/hisimhv/pmos/reference/acFreq.standard, * tests/hisimhv/pmos/reference/acFreq_coadov.standard, * tests/hisimhv/pmos/reference/acFreq_coiigs.standard, * tests/hisimhv/pmos/reference/acFreq_conqs.standard, * tests/hisimhv/pmos/reference/acFreq_coovlp.standard, * tests/hisimhv/pmos/reference/acFreq_cosym.standard, * tests/hisimhv/pmos/reference/acFreq_nover.standard, * tests/hisimhv/pmos/reference/acVd.standard, * tests/hisimhv/pmos/reference/acVd_corsrd1.standard, * tests/hisimhv/pmos/reference/acVd_corsrd2.standard, * tests/hisimhv/pmos/reference/acVd_cosym.standard, * tests/hisimhv/pmos/reference/acVd_cvdsover.standard, * tests/hisimhv/pmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv/pmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv/pmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv/pmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv/pmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv/pmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv/pmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv/pmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv/pmos/reference/dcSw_corsrd0.standard, * tests/hisimhv/pmos/reference/dcSw_corsrd1.standard, * tests/hisimhv/pmos/reference/dcSw_corsrd2.standard, * tests/hisimhv/pmos/reference/dcSw_cosym.standard, * tests/hisimhv/pmos/reference/dcSw_gidl.standard, * tests/hisimhv/pmos/reference/dcSw_isub.standard, * tests/hisimhv/pmos/reference/dcSw_ld2.standard, * tests/hisimhv/pmos/reference/dcSw_lg2.standard, * tests/hisimhv/pmos/reference/dcSw_rs2m.standard, * tests/hisimhv/pmos/reference/dcSw_she.standard, * tests/hisimhv/pmos/reference/noise1.standard, * tests/hisimhv/pmos/reference/noise2.standard, * tests/hisimhv/pmos/run, * tests/hisimhv1/Makefile.am, * tests/hisimhv1/nmos/parameters/nmosParameters, * tests/hisimhv1/nmos/qaSpec, * tests/hisimhv1/nmos/qaSpec.basic, * tests/hisimhv1/nmos/reference/acFreq.standard, * tests/hisimhv1/nmos/reference/acFreq_coadov.standard, * tests/hisimhv1/nmos/reference/acFreq_coiigs.standard, * tests/hisimhv1/nmos/reference/acFreq_conqs.standard, * tests/hisimhv1/nmos/reference/acFreq_coovlp.standard, * tests/hisimhv1/nmos/reference/acFreq_cosym.standard, * tests/hisimhv1/nmos/reference/acFreq_nover.standard, * tests/hisimhv1/nmos/reference/acVd.standard, * tests/hisimhv1/nmos/reference/acVd_corsrd1.standard, * tests/hisimhv1/nmos/reference/acVd_corsrd2.standard, * tests/hisimhv1/nmos/reference/acVd_cosym.standard, * tests/hisimhv1/nmos/reference/acVd_cvdsover.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv1/nmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv1/nmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd0.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd1.standard, * tests/hisimhv1/nmos/reference/dcSw_corsrd2.standard, * tests/hisimhv1/nmos/reference/dcSw_cosym.standard, * tests/hisimhv1/nmos/reference/dcSw_gidl.standard, * tests/hisimhv1/nmos/reference/dcSw_isub.standard, * tests/hisimhv1/nmos/reference/dcSw_ld2.standard, * tests/hisimhv1/nmos/reference/dcSw_lg2.standard, * tests/hisimhv1/nmos/reference/dcSw_rs2m.standard, * tests/hisimhv1/nmos/reference/dcSw_she.standard, * tests/hisimhv1/nmos/reference/noise1.standard, * tests/hisimhv1/nmos/reference/noise2.standard, * tests/hisimhv1/nmos/run, * tests/hisimhv1/pmos/parameters/pmosParameters, * tests/hisimhv1/pmos/qaSpec, * tests/hisimhv1/pmos/qaSpec.basic, * tests/hisimhv1/pmos/reference/acFreq.standard, * tests/hisimhv1/pmos/reference/acFreq_coadov.standard, * tests/hisimhv1/pmos/reference/acFreq_coiigs.standard, * tests/hisimhv1/pmos/reference/acFreq_conqs.standard, * tests/hisimhv1/pmos/reference/acFreq_coovlp.standard, * tests/hisimhv1/pmos/reference/acFreq_cosym.standard, * tests/hisimhv1/pmos/reference/acFreq_nover.standard, * tests/hisimhv1/pmos/reference/acVd.standard, * tests/hisimhv1/pmos/reference/acVd_corsrd1.standard, * tests/hisimhv1/pmos/reference/acVd_corsrd2.standard, * tests/hisimhv1/pmos/reference/acVd_cosym.standard, * tests/hisimhv1/pmos/reference/acVd_cvdsover.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb0.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb1.standard, * tests/hisimhv1/pmos/reference/dcSw_Id1_vb2.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0_jd.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb1.standard, * tests/hisimhv1/pmos/reference/dcSw_Ig1_vb2.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd0.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd1.standard, * tests/hisimhv1/pmos/reference/dcSw_corsrd2.standard, * tests/hisimhv1/pmos/reference/dcSw_cosym.standard, * tests/hisimhv1/pmos/reference/dcSw_gidl.standard, * tests/hisimhv1/pmos/reference/dcSw_isub.standard, * tests/hisimhv1/pmos/reference/dcSw_ld2.standard, * tests/hisimhv1/pmos/reference/dcSw_lg2.standard, * tests/hisimhv1/pmos/reference/dcSw_rs2m.standard, * tests/hisimhv1/pmos/reference/dcSw_she.standard, * tests/hisimhv1/pmos/reference/noise1.standard, * tests/hisimhv1/pmos/reference/noise2.standard, * tests/hisimhv1/pmos/run: rename directories hisimhv --> hisimhv1 2012-11-21 dwarning * src/frontend/plotting/gnuplot.c: gnuplot.c: allow png terminal by gnuplot_terminal variable 2012-11-21 dwarning * tests/hisim/nmos/reference/10_dcSweep_COGIDL=0.standard, * tests/hisim/nmos/reference/11_dcSweep_COGIDL=1.standard, * tests/hisim/nmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/nmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/nmos/reference/14_dcSweep_COISTI=1_NSUBC.standard, * tests/hisim/nmos/reference/15_dcSweep_COISTI=1_NSUBP.standard, * tests/hisim/nmos/reference/16_dcSweep_WPE.standard, * tests/hisim/nmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/nmos/reference/1_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/nmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/nmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/nmos/reference/23_dcSweep_CODFM=0.standard, * tests/hisim/nmos/reference/24_dcSweep_CODFM=1.standard, * tests/hisim/nmos/reference/25_dcSweep_VFBCL.standard, * tests/hisim/nmos/reference/2_dcSweep_CORSRD=-1_GDLD.standard, * tests/hisim/nmos/reference/35_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/36_acVd_CORSRD=-1_GDLD.standard, * tests/hisim/nmos/reference/37_acVd_CORSRD=-1_PT.standard, * tests/hisim/nmos/reference/38_acVd_WPE.standard, * tests/hisim/nmos/reference/39_acVd_VFBCL.standard, * tests/hisim/nmos/reference/3_dcSweep_CORSRD=-1_PT.standard, * tests/hisim/nmos/reference/45_acFreq_COOVLP=1.standard, * tests/hisim/nmos/reference/46_acFreq_COISUB=0.standard, * tests/hisim/nmos/reference/47_acFreq_COISUB=1.standard, * tests/hisim/nmos/reference/48_acFreq_COIIGS=0.standard, * tests/hisim/nmos/reference/49_acFreq_COIIGS=1.standard, * tests/hisim/nmos/reference/4_dcSweep_NSUBPFAC.standard, * tests/hisim/nmos/reference/50_acFreq_COGIDL=0.standard, * tests/hisim/nmos/reference/51_acFreq_COGIDL=1.standard, * tests/hisim/nmos/reference/52_acFreq_COSTI=0.standard, * tests/hisim/nmos/reference/53_acFreq_COSTI=1.standard, * tests/hisim/nmos/reference/54_acFreq_COADOV=0.standard, * tests/hisim/nmos/reference/55_acFreq_COADOV=1.standard, * tests/hisim/nmos/reference/56_acFreq_CONQS=0.standard, * tests/hisim/nmos/reference/57_acFreq_CONQS=1.standard, * tests/hisim/nmos/reference/58_acFreq_CORG=0.standard, * tests/hisim/nmos/reference/59_acFreq_CORG=1.standard, * tests/hisim/nmos/reference/5_dcSweep_NSUBPDLT.standard, * tests/hisim/nmos/reference/60_acFreq_CORBNET=0.standard, * tests/hisim/nmos/reference/61_acFreq_CORBNET=1.standard, * tests/hisim/nmos/reference/62_acFreq_COFLICK=0.standard, * tests/hisim/nmos/reference/63_acFreq_COFLICK=1.standard, * tests/hisim/nmos/reference/64_acFreq_COTHRML=0.standard, * tests/hisim/nmos/reference/65_acFreq_COTHRML=1.standard, * tests/hisim/nmos/reference/66_acFreq_COIGN=0.standard, * tests/hisim/nmos/reference/67_acFreq_COIGN=1.standard, * tests/hisim/nmos/reference/68_acFreq_WPE.standard, * tests/hisim/nmos/reference/69_acFreq_CODFM=0.standard, * tests/hisim/nmos/reference/6_dcSweep_COISUB=0.standard, * tests/hisim/nmos/reference/70_acFreq_CODFM=1.standard, * tests/hisim/nmos/reference/75_noise_COIGN=1_T27.standard, * tests/hisim/nmos/reference/76_noise_COIGN=1_T-55.standard, * tests/hisim/nmos/reference/77_noise_COIGN=1_T150.standard, * tests/hisim/nmos/reference/78_noise_COIGN=0_T27.standard, * tests/hisim/nmos/reference/79_noise_COIGN=0_T-55.standard, * tests/hisim/nmos/reference/7_dcSweep_COISUB=1.standard, * tests/hisim/nmos/reference/80_noise_COIGN=0_T150.standard, * tests/hisim/nmos/reference/8_dcSweep_COIIGS=0.standard, * tests/hisim/nmos/reference/9_dcSweep_COIIGS=1.standard, * tests/hisim/pmos/reference/10_dcSweep_COGIDL=0.standard, * tests/hisim/pmos/reference/11_dcSweep_COGIDL=1.standard, * tests/hisim/pmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/pmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/pmos/reference/14_dcSweep_COISTI=1_NSUBC.standard, * tests/hisim/pmos/reference/15_dcSweep_COISTI=1_NSUBP.standard, * tests/hisim/pmos/reference/16_dcSweep_WPE.standard, * tests/hisim/pmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/pmos/reference/1_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/pmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/pmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/pmos/reference/23_dcSweep_CODFM=0.standard, * tests/hisim/pmos/reference/24_dcSweep_CODFM=1.standard, * tests/hisim/pmos/reference/25_dcSweep_VFBCL.standard, * tests/hisim/pmos/reference/2_dcSweep_CORSRD=-1_GDLD.standard, * tests/hisim/pmos/reference/35_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/36_acVd_CORSRD=-1_GDLD.standard, * tests/hisim/pmos/reference/37_acVd_CORSRD=-1_PT.standard, * tests/hisim/pmos/reference/38_acVd_WPE.standard, * tests/hisim/pmos/reference/39_acVd_VFBCL.standard, * tests/hisim/pmos/reference/3_dcSweep_CORSRD=-1_PT.standard, * tests/hisim/pmos/reference/45_acFreq_COOVLP=1.standard, * tests/hisim/pmos/reference/46_acFreq_COISUB=0.standard, * tests/hisim/pmos/reference/47_acFreq_COISUB=1.standard, * tests/hisim/pmos/reference/48_acFreq_COIIGS=0.standard, * tests/hisim/pmos/reference/49_acFreq_COIIGS=1.standard, * tests/hisim/pmos/reference/4_dcSweep_NSUBPFAC.standard, * tests/hisim/pmos/reference/50_acFreq_COGIDL=0.standard, * tests/hisim/pmos/reference/51_acFreq_COGIDL=1.standard, * tests/hisim/pmos/reference/52_acFreq_COSTI=0.standard, * tests/hisim/pmos/reference/53_acFreq_COSTI=1.standard, * tests/hisim/pmos/reference/54_acFreq_COADOV=0.standard, * tests/hisim/pmos/reference/55_acFreq_COADOV=1.standard, * tests/hisim/pmos/reference/56_acFreq_CONQS=0.standard, * tests/hisim/pmos/reference/57_acFreq_CONQS=1.standard, * tests/hisim/pmos/reference/58_acFreq_CORG=0.standard, * tests/hisim/pmos/reference/59_acFreq_CORG=1.standard, * tests/hisim/pmos/reference/5_dcSweep_NSUBPDLT.standard, * tests/hisim/pmos/reference/60_acFreq_CORBNET=0.standard, * tests/hisim/pmos/reference/61_acFreq_CORBNET=1.standard, * tests/hisim/pmos/reference/62_acFreq_COFLICK=0.standard, * tests/hisim/pmos/reference/63_acFreq_COFLICK=1.standard, * tests/hisim/pmos/reference/64_acFreq_COTHRML=0.standard, * tests/hisim/pmos/reference/65_acFreq_COTHRML=1.standard, * tests/hisim/pmos/reference/66_acFreq_COIGN=0.standard, * tests/hisim/pmos/reference/67_acFreq_COIGN=1.standard, * tests/hisim/pmos/reference/68_acFreq_WPE.standard, * tests/hisim/pmos/reference/69_acFreq_CODFM=0.standard, * tests/hisim/pmos/reference/6_dcSweep_COISUB=0.standard, * tests/hisim/pmos/reference/70_acFreq_CODFM=1.standard, * tests/hisim/pmos/reference/75_noise_COIGN=1_T27.standard, * tests/hisim/pmos/reference/76_noise_COIGN=1_T-55.standard, * tests/hisim/pmos/reference/77_noise_COIGN=1_T150.standard, * tests/hisim/pmos/reference/78_noise_COIGN=0_T27.standard, * tests/hisim/pmos/reference/79_noise_COIGN=0_T-55.standard, * tests/hisim/pmos/reference/7_dcSweep_COISUB=1.standard, * tests/hisim/pmos/reference/80_noise_COIGN=0_T150.standard, * tests/hisim/pmos/reference/8_dcSweep_COIIGS=0.standard, * tests/hisim/pmos/reference/9_dcSweep_COIIGS=1.standard: update hisim to version 2.7.0 2012-11-21 dwarning * tests/hisim/nmos/parameters/nmosParameters, * tests/hisim/nmos/qaSpec, * tests/hisim/nmos/reference/10_dcSweep_COIIGS=1.standard, * tests/hisim/nmos/reference/11_dcSweep_COGIDL=0.standard, * tests/hisim/nmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/nmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/nmos/reference/14_dcSweep_COISTI=1.standard, * tests/hisim/nmos/reference/15_dcSweep_WPE.standard, * tests/hisim/nmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/nmos/reference/2-1_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/2-2_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/nmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/nmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/nmos/reference/2_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/33_dcSweep_CODFM=0.standard, * tests/hisim/nmos/reference/34_dcSweep_CODFM=1.standard, * tests/hisim/nmos/reference/36-1_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/36-2_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/36_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/37_acVd_WPE.standard, * tests/hisim/nmos/reference/40_acFreq_COOVLP=1.standard, * tests/hisim/nmos/reference/41_acFreq_COISUB=0.standard, * tests/hisim/nmos/reference/42_acFreq_COISUB=1.standard, * tests/hisim/nmos/reference/43_acFreq_COIIGS=0.standard, * tests/hisim/nmos/reference/44_acFreq_COIIGS=1.standard, * tests/hisim/nmos/reference/45_acFreq_COGIDL=0.standard, * tests/hisim/nmos/reference/46_acFreq_COGIDL=1.standard, * tests/hisim/nmos/reference/47_acFreq_COSTI=0.standard, * tests/hisim/nmos/reference/48_acFreq_COSTI=1.standard, * tests/hisim/nmos/reference/49_acFreq_COADOV=0.standard, * tests/hisim/nmos/reference/50_acFreq_COADOV=1.standard, * tests/hisim/nmos/reference/51_acFreq_CONQS=0.standard, * tests/hisim/nmos/reference/52_acFreq_CONQS=1.standard, * tests/hisim/nmos/reference/53_acFreq_CORG=0.standard, * tests/hisim/nmos/reference/54_acFreq_CORG=1.standard, * tests/hisim/nmos/reference/55_acFreq_CORBNET=0.standard, * tests/hisim/nmos/reference/56_acFreq_CORBNET=1.standard, * tests/hisim/nmos/reference/57_acFreq_COFLICK=0.standard, * tests/hisim/nmos/reference/58_acFreq_COFLICK=1.standard, * tests/hisim/nmos/reference/59_acFreq_COTHRML=0.standard, * tests/hisim/nmos/reference/60_acFreq_COTHRML=1.standard, * tests/hisim/nmos/reference/61_acFreq_COIGN=0.standard, * tests/hisim/nmos/reference/62_acFreq_COIGN=1.standard, * tests/hisim/nmos/reference/63_acFreq_WPE.standard, * tests/hisim/nmos/reference/67_acFreq_CODFM=0.standard, * tests/hisim/nmos/reference/68_acFreq_CODFM=1.standard, * tests/hisim/nmos/reference/69-1_noise_COIGN=1_T-55.standard, * tests/hisim/nmos/reference/69-2_noise_COIGN=1_T150.standard, * tests/hisim/nmos/reference/69_noise_COIGN=1_T27.standard, * tests/hisim/nmos/reference/70-1_noise_COIGN=0_T-55.standard, * tests/hisim/nmos/reference/70-2_noise_COIGN=0_T150.standard, * tests/hisim/nmos/reference/70_noise_COIGN=0_T27.standard, * tests/hisim/nmos/reference/7_dcSweep_COISUB=0.standard, * tests/hisim/nmos/reference/8_dcSweep_COISUB=1.standard, * tests/hisim/nmos/reference/9_dcSweep_COIIGS=0.standard, * tests/hisim/pmos/qaSpec, * tests/hisim/pmos/reference/10_dcSweep_COIIGS=1.standard, * tests/hisim/pmos/reference/11_dcSweep_COGIDL=0.standard, * tests/hisim/pmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/pmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/pmos/reference/14_dcSweep_COISTI=1.standard, * tests/hisim/pmos/reference/15_dcSweep_WPE.standard, * tests/hisim/pmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/pmos/reference/2-1_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/2-2_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/pmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/pmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/pmos/reference/2_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/33_dcSweep_CODFM=0.standard, * tests/hisim/pmos/reference/34_dcSweep_CODFM=1.standard, * tests/hisim/pmos/reference/36-1_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/36-2_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/36_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/37_acVd_WPE.standard, * tests/hisim/pmos/reference/40_acFreq_COOVLP=1.standard, * tests/hisim/pmos/reference/41_acFreq_COISUB=0.standard, * tests/hisim/pmos/reference/42_acFreq_COISUB=1.standard, * tests/hisim/pmos/reference/43_acFreq_COIIGS=0.standard, * tests/hisim/pmos/reference/44_acFreq_COIIGS=1.standard, * tests/hisim/pmos/reference/45_acFreq_COGIDL=0.standard, * tests/hisim/pmos/reference/46_acFreq_COGIDL=1.standard, * tests/hisim/pmos/reference/47_acFreq_COSTI=0.standard, * tests/hisim/pmos/reference/48_acFreq_COSTI=1.standard, * tests/hisim/pmos/reference/49_acFreq_COADOV=0.standard, * tests/hisim/pmos/reference/50_acFreq_COADOV=1.standard, * tests/hisim/pmos/reference/51_acFreq_CONQS=0.standard, * tests/hisim/pmos/reference/52_acFreq_CONQS=1.standard, * tests/hisim/pmos/reference/53_acFreq_CORG=0.standard, * tests/hisim/pmos/reference/54_acFreq_CORG=1.standard, * tests/hisim/pmos/reference/55_acFreq_CORBNET=0.standard, * tests/hisim/pmos/reference/56_acFreq_CORBNET=1.standard, * tests/hisim/pmos/reference/57_acFreq_COFLICK=0.standard, * tests/hisim/pmos/reference/58_acFreq_COFLICK=1.standard, * tests/hisim/pmos/reference/59_acFreq_COTHRML=0.standard, * tests/hisim/pmos/reference/60_acFreq_COTHRML=1.standard, * tests/hisim/pmos/reference/61_acFreq_COIGN=0.standard, * tests/hisim/pmos/reference/62_acFreq_COIGN=1.standard, * tests/hisim/pmos/reference/63_acFreq_WPE.standard, * tests/hisim/pmos/reference/67_acFreq_CODFM=0.standard, * tests/hisim/pmos/reference/68_acFreq_CODFM=1.standard, * tests/hisim/pmos/reference/69-1_noise_COIGN=1_T-55.standard, * tests/hisim/pmos/reference/69-2_noise_COIGN=1_T150.standard, * tests/hisim/pmos/reference/69_noise_COIGN=1_T27.standard, * tests/hisim/pmos/reference/70-1_noise_COIGN=0_T-55.standard, * tests/hisim/pmos/reference/70-2_noise_COIGN=0_T150.standard, * tests/hisim/pmos/reference/70_noise_COIGN=0_T27.standard, * tests/hisim/pmos/reference/7_dcSweep_COISUB=0.standard, * tests/hisim/pmos/reference/8_dcSweep_COISUB=1.standard, * tests/hisim/pmos/reference/9_dcSweep_COIIGS=0.standard: update hisim to version 2.7.0 2012-11-21 dwarning * src/spicelib/devices/hisim2/hisim2.h, * src/spicelib/devices/hisim2/hsm2.c, * src/spicelib/devices/hisim2/hsm2acld.c, * src/spicelib/devices/hisim2/hsm2ask.c, * src/spicelib/devices/hisim2/hsm2cvtest.c, * src/spicelib/devices/hisim2/hsm2def.h, * src/spicelib/devices/hisim2/hsm2del.c, * src/spicelib/devices/hisim2/hsm2dest.c, * src/spicelib/devices/hisim2/hsm2eval.c, * src/spicelib/devices/hisim2/hsm2evalenv.h, * src/spicelib/devices/hisim2/hsm2ext.h, * src/spicelib/devices/hisim2/hsm2getic.c, * src/spicelib/devices/hisim2/hsm2init.c, * src/spicelib/devices/hisim2/hsm2itf.h, * src/spicelib/devices/hisim2/hsm2ld.c, * src/spicelib/devices/hisim2/hsm2mask.c, * src/spicelib/devices/hisim2/hsm2mdel.c, * src/spicelib/devices/hisim2/hsm2mpar.c, * src/spicelib/devices/hisim2/hsm2noi.c, * src/spicelib/devices/hisim2/hsm2par.c, * src/spicelib/devices/hisim2/hsm2pzld.c, * src/spicelib/devices/hisim2/hsm2set.c, * src/spicelib/devices/hisim2/hsm2temp.c, * src/spicelib/devices/hisim2/hsm2trunc.c: update hisim to version 2.7.0 2012-11-21 Francesco Lannutti * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim4/b4ld.c: b3ld.c, b4ld.c, b3v32ld.c: charge computation for MODEDCTRANCURCE instead of MODEDC this is a fix for commit: b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep 2012-11-19 h_vogt * src/xspice/mif/mif_inp2.c: mif_inp2.c: bug 3389072 fixed 2012-11-19 h_vogt * src/xspice/mif/mif_inp2.c: beautify code 2012-11-17 h_vogt * examples/various/adder_mos.cir, * examples/various/agauss_test.cir, * examples/various/gain_stage.cir, * examples/various/param_sweep.cir: input examples drawn from manual 2012-11-17 h_vogt * src/frontend/inp.c: inp.c: pre_ to allow command execution from the .control section before parsing the circuit 2012-11-16 rlar * Makefile.am, * src/xspice/Makefile.am, * src/xspice/cmpp/Makefile.am, * tests/Makefile.am: fix `make dist' 2012-11-07 h_vogt * src/frontend/outitf.c: outitf.c: do not call clock() if MS Windows GUI 2012-11-07 rlar * src/frontend/variable.c: improve commit `variable.c: add strict error handling' 2012-11-07 dwarning * src/spicelib/parser/inpdomod.c: make the level switch compatible for HiSIM2 and HiSIMHV 2012-11-07 dwarning * src/spicelib/parser/inpdomod.c: rm whitespaces 2012-11-06 Francesco Lannutti * src/frontend/Makefile.am: remove "error.h" from Makefile.am this file is not anymore in the "frontend" folder and "make dist" failed to generate the tarball 2012-11-06 dwarning * src/frontend/subckt.c: fix a leak in devmodtranslate 3 terminal section 2012-11-06 Francesco Lannutti * src/frontend/wdisp/windisp.c, * src/frontend/wdisp/winprint.c: move windows specific `STRICT' definition to canonical place 2012-11-06 Francesco Lannutti * Makefile.am: Makefile.am, add `ar-lib' to the MAINTAINERCLEANFILES 2012-11-06 Francesco Lannutti * Makefile.am, * autogen.sh, * src/spicelib/Makefile.am, * src/xspice/Makefile.am: Makefiles, drop some CVS remnants 2012-11-06 Francesco Lannutti * src/frontend/com_fft.c: avoid a compiler warning, (unused static function) 2012-11-06 Francesco Lannutti * src/xspice/icm/makedefs.in: Added datarootdir variable as usual behavior and to avoid autoconf warning 2012-11-06 Francesco Lannutti * src/ngsconvert.c: Solved linking error for ngsconvert after ft_stricterror patch in src/frontend/variable.c 2012-11-05 Francesco Lannutti * src/frontend/com_dl.c: fix #include <> versus "" 2012-11-05 rlar * src/xspice/icm/GNUmakefile.in, * src/xspice/icm/makedefs.in: XSPICE, install dlmain.c for separate compilation of XSPICE user models 2012-11-05 Francesco Lannutti * configure.ac: configure.ac, defensive use of `AM_SILENT_RULES' 2012-11-05 dwarning * src/frontend/subckt.c: allow more then 4 terminal mos models in subckts 2012-11-04 h_vogt * src/frontend/variable.c: variable.c: add strict error handling 2012-11-04 h_vogt * src/frontend/inpcom.c: inpcom.c: remove bug in inp_add_series_resistor(), prevent crash in inp_remove_ws() upon erroneous input 2012-11-04 h_vogt * src/frontend/inp.c: inp.c: avoid crash if setparse() returns NULL 2012-11-03 h_vogt * examples/snapshot/adder_mos.cir, * examples/snapshot/adder_mos_circ.cir, * examples/snapshot/adder_snload.script: examples/snapshot: start, interrupt and resume simulation 2012-11-03 h_vogt * src/frontend/spiceif.c: spiceif.c: correct types being loaded by snload() 2012-11-02 Francesco Lannutti * Makefile.am: make maintainer-clean shall remove the m4/ directory too 2012-11-01 h_vogt * src/frontend/commands.c, * src/frontend/spiceif.c, * src/frontend/spiceif.h, * src/main.c: rename commands 'savesnap', 'loadsnap' to 'snsave', 'snload' to avoid conflict with command 'save' 2012-01-15 rlar * src/spicelib/devices/hisim2/hsm2eval.c, * src/spicelib/devices/hisim2/hsm2temp.c: hisim2, bug fix, a numerical problem in the hisim2 and hisimhv models First seen when compiled with gcc-4.6.2 -g -O1 The macro `Fn_SZ' which boils down to 1/2 * (x + sqrt(x*x + c*c)) was used in a context where a negative result blew up the following computations. (used to compute `Egidl', which is used to compute exp(-1 / (Egidl + small_constant))) For large negative values of x the computation boils down to 1/2 ( x + almost(|x|) ) where the summands almost cancel each other, sometimes yielding a small negative result. small_constant was too small to avoid a big result for -1/(Egidl + small_constant) yielding an `inf' during the exp() computation, which was later multiplied with a `0' yielding a NaN, which was carried forward during the rest of computations. Because the error of the cancellation scales with the magnitude of x, no larger `small_constant' could have avoided the problem. Presumably the problem was amplified by a mixture of precisions (double versus extended float) of intermediate values. (the program wasn't compiled for sse) ( x was -2.812500e+06, c was 1.000000e-02, Fn_SZ result was -1.853095e-11 thus the cancellation remainder was of relative size 6.6e-18 which is approximately 2^-57 and thus more accurate as a `double float' could have delivered ) 2012-11-01 rlar * src/spicelib/devices/hisim2/hsm2noi.c: hisim2, use TMALLOC, funcall, and NULL casts 2011-05-22 rlar * src/spicelib/devices/hisim2/hsm2noi.c: hisim2, fix NevalSrc(), Nintegrate() redeclaration 2012-10-29 h_vogt * src/frontend/inpcom.c: inpcom.c: add series resistor to each inductor with option rseries=1m 2012-10-29 h_vogt * src/frontend/com_ghelp.c: com_ghelp.c: better message for help under Windows 2012-10-29 Francesco Lannutti * autogen.sh: autogen.sh, fix for Mac OS X 2012-10-26 Francesco Lannutti * .cvsignore, * doc/.cvsignore, * man/.cvsignore, * man/man1/.cvsignore, * src/.cvsignore, * src/ciderlib/.cvsignore, * src/ciderlib/input/.cvsignore, * src/ciderlib/oned/.cvsignore, * src/ciderlib/support/.cvsignore, * src/ciderlib/twod/.cvsignore, * src/frontend/.cvsignore, * src/frontend/help/.cvsignore, * src/frontend/numparam/.cvsignore, * src/frontend/parser/.cvsignore, * src/frontend/plotting/.cvsignore, * src/frontend/trannoise/.cvsignore, * src/frontend/wdisp/.cvsignore, * src/include/ngspice/.cvsignore, * src/maths/.cvsignore, * src/maths/cmaths/.cvsignore, * src/maths/deriv/.cvsignore, * src/maths/fft/.cvsignore, * src/maths/misc/.cvsignore, * src/maths/ni/.cvsignore, * src/maths/poly/.cvsignore, * src/maths/sparse/.cvsignore, * src/misc/.cvsignore, * src/spicelib/.cvsignore, * src/spicelib/analysis/.cvsignore, * src/spicelib/devices/.cvsignore, * src/spicelib/devices/adms/ekv/.cvsignore, * src/spicelib/devices/adms/hicum0/.cvsignore, * src/spicelib/devices/adms/hicum2/.cvsignore, * src/spicelib/devices/adms/mextram/.cvsignore, * src/spicelib/devices/adms/psp102/.cvsignore, * src/spicelib/devices/asrc/.cvsignore, * src/spicelib/devices/bjt/.cvsignore, * src/spicelib/devices/bsim1/.cvsignore, * src/spicelib/devices/bsim2/.cvsignore, * src/spicelib/devices/bsim3/.cvsignore, * src/spicelib/devices/bsim3soi_dd/.cvsignore, * src/spicelib/devices/bsim3soi_fd/.cvsignore, * src/spicelib/devices/bsim3soi_pd/.cvsignore, * src/spicelib/devices/bsim3v0/.cvsignore, * src/spicelib/devices/bsim3v1/.cvsignore, * src/spicelib/devices/bsim3v32/.cvsignore, * src/spicelib/devices/bsim4/.cvsignore, * src/spicelib/devices/bsim4v4/.cvsignore, * src/spicelib/devices/bsim4v5/.cvsignore, * src/spicelib/devices/bsim4v6/.cvsignore, * src/spicelib/devices/bsimsoi/.cvsignore, * src/spicelib/devices/cap/.cvsignore, * src/spicelib/devices/cccs/.cvsignore, * src/spicelib/devices/ccvs/.cvsignore, * src/spicelib/devices/cpl/.cvsignore, * src/spicelib/devices/csw/.cvsignore, * src/spicelib/devices/dio/.cvsignore, * src/spicelib/devices/hfet1/.cvsignore, * src/spicelib/devices/hfet2/.cvsignore, * src/spicelib/devices/hisim2/.cvsignore, * src/spicelib/devices/hisimhv/.cvsignore, * src/spicelib/devices/ind/.cvsignore, * src/spicelib/devices/isrc/.cvsignore, * src/spicelib/devices/jfet/.cvsignore, * src/spicelib/devices/jfet2/.cvsignore, * src/spicelib/devices/ltra/.cvsignore, * src/spicelib/devices/mes/.cvsignore, * src/spicelib/devices/mesa/.cvsignore, * src/spicelib/devices/mos1/.cvsignore, * src/spicelib/devices/mos2/.cvsignore, * src/spicelib/devices/mos3/.cvsignore, * src/spicelib/devices/mos6/.cvsignore, * src/spicelib/devices/mos9/.cvsignore, * src/spicelib/devices/nbjt/.cvsignore, * src/spicelib/devices/nbjt2/.cvsignore, * src/spicelib/devices/ndev/.cvsignore, * src/spicelib/devices/numd/.cvsignore, * src/spicelib/devices/numd2/.cvsignore, * src/spicelib/devices/numos/.cvsignore, * src/spicelib/devices/res/.cvsignore, * src/spicelib/devices/soi3/.cvsignore, * src/spicelib/devices/sw/.cvsignore, * src/spicelib/devices/tra/.cvsignore, * src/spicelib/devices/txl/.cvsignore, * src/spicelib/devices/urc/.cvsignore, * src/spicelib/devices/vbic/.cvsignore, * src/spicelib/devices/vccs/.cvsignore, * src/spicelib/devices/vcvs/.cvsignore, * src/spicelib/devices/vsrc/.cvsignore, * src/spicelib/parser/.cvsignore, * src/xspice/.cvsignore, * src/xspice/cm/.cvsignore, * src/xspice/cmpp/.cvsignore, * src/xspice/enh/.cvsignore, * src/xspice/evt/.cvsignore, * src/xspice/icm/.cvsignore, * src/xspice/icm/analog/.cvsignore, * src/xspice/icm/analog/climit/.cvsignore, * src/xspice/icm/analog/d_dt/.cvsignore, * src/xspice/icm/analog/divide/.cvsignore, * src/xspice/icm/analog/file_source/.cvsignore, * src/xspice/icm/analog/gain/.cvsignore, * src/xspice/icm/analog/hyst/.cvsignore, * src/xspice/icm/analog/ilimit/.cvsignore, * src/xspice/icm/analog/int/.cvsignore, * src/xspice/icm/analog/limit/.cvsignore, * src/xspice/icm/analog/mult/.cvsignore, * src/xspice/icm/analog/multi_input_pwl/.cvsignore, * src/xspice/icm/analog/oneshot/.cvsignore, * src/xspice/icm/analog/pwl/.cvsignore, * src/xspice/icm/analog/s_xfer/.cvsignore, * src/xspice/icm/analog/sine/.cvsignore, * src/xspice/icm/analog/slew/.cvsignore, * src/xspice/icm/analog/square/.cvsignore, * src/xspice/icm/analog/summer/.cvsignore, * src/xspice/icm/analog/triangle/.cvsignore, * src/xspice/icm/digital/.cvsignore, * src/xspice/icm/digital/adc_bridge/.cvsignore, * src/xspice/icm/digital/d_and/.cvsignore, * src/xspice/icm/digital/d_buffer/.cvsignore, * src/xspice/icm/digital/d_dff/.cvsignore, * src/xspice/icm/digital/d_dlatch/.cvsignore, * src/xspice/icm/digital/d_fdiv/.cvsignore, * src/xspice/icm/digital/d_inverter/.cvsignore, * src/xspice/icm/digital/d_jkff/.cvsignore, * src/xspice/icm/digital/d_nand/.cvsignore, * src/xspice/icm/digital/d_nor/.cvsignore, * src/xspice/icm/digital/d_open_c/.cvsignore, * src/xspice/icm/digital/d_open_e/.cvsignore, * src/xspice/icm/digital/d_or/.cvsignore, * src/xspice/icm/digital/d_osc/.cvsignore, * src/xspice/icm/digital/d_pulldown/.cvsignore, * src/xspice/icm/digital/d_pullup/.cvsignore, * src/xspice/icm/digital/d_ram/.cvsignore, * src/xspice/icm/digital/d_source/.cvsignore, * src/xspice/icm/digital/d_srff/.cvsignore, * src/xspice/icm/digital/d_srlatch/.cvsignore, * src/xspice/icm/digital/d_state/.cvsignore, * src/xspice/icm/digital/d_tff/.cvsignore, * src/xspice/icm/digital/d_tristate/.cvsignore, * src/xspice/icm/digital/d_xnor/.cvsignore, * src/xspice/icm/digital/d_xor/.cvsignore, * src/xspice/icm/digital/dac_bridge/.cvsignore, * src/xspice/icm/spice2poly/.cvsignore, * src/xspice/icm/spice2poly/icm_spice2poly/.cvsignore, * src/xspice/icm/xtradev/.cvsignore, * src/xspice/icm/xtradev/aswitch/.cvsignore, * src/xspice/icm/xtradev/capacitor/.cvsignore, * src/xspice/icm/xtradev/cmeter/.cvsignore, * src/xspice/icm/xtradev/core/.cvsignore, * src/xspice/icm/xtradev/inductor/.cvsignore, * src/xspice/icm/xtradev/lcouple/.cvsignore, * src/xspice/icm/xtradev/lmeter/.cvsignore, * src/xspice/icm/xtradev/potentiometer/.cvsignore, * src/xspice/icm/xtradev/zener/.cvsignore, * src/xspice/icm/xtraevt/.cvsignore, * src/xspice/icm/xtraevt/d_to_real/.cvsignore, * src/xspice/icm/xtraevt/int/.cvsignore, * src/xspice/icm/xtraevt/real/.cvsignore, * src/xspice/icm/xtraevt/real_delay/.cvsignore, * src/xspice/icm/xtraevt/real_gain/.cvsignore, * src/xspice/icm/xtraevt/real_to_v/.cvsignore, * src/xspice/idn/.cvsignore, * src/xspice/ipc/.cvsignore, * src/xspice/mif/.cvsignore, * tests/.cvsignore, * tests/bsim1/.cvsignore, * tests/bsim2/.cvsignore, * tests/bsim3/.cvsignore, * tests/bsim3/ac_sim/.cvsignore, * tests/bsim3/dc_sim/.cvsignore, * tests/bsim3/tran_sim/.cvsignore, * tests/bsim3soidd/.cvsignore, * tests/bsim3soifd/.cvsignore, * tests/bsim3soipd/.cvsignore, * tests/bsim4/.cvsignore, * tests/bsimsoi/.cvsignore, * tests/filters/.cvsignore, * tests/general/.cvsignore, * tests/hfet/.cvsignore, * tests/hisim/.cvsignore, * tests/hisimhv/.cvsignore, * tests/jfet/.cvsignore, * tests/mes/.cvsignore, * tests/mesa/.cvsignore, * tests/mos6/.cvsignore, * tests/polezero/.cvsignore, * tests/resistance/.cvsignore, * tests/sensitivity/.cvsignore, * tests/transient/.cvsignore, * tests/transmission/.cvsignore, * tests/vbic/.cvsignore, * tests/xspice/.cvsignore, * tests/xspice/digital/.cvsignore, * xgraph/.cvsignore: remove all .cvsignore files 2012-10-26 Francesco Lannutti * src/frontend/numparam/mystring.c, * src/frontend/numparam/xpressn.c, * src/maths/misc/randnumb.c, * src/misc/hash.c, * src/spicelib/analysis/cktdest.c, * src/spicelib/devices/isrc/isrcload.c, * src/spicelib/devices/vsrc/vsrcload.c, * src/xspice/mif/mif_inp2.c: remove compilation warnings (type casts) 2012-10-26 Francesco Lannutti * configure.ac, * src/Makefile.am, * src/spicelib/devices/Makefile.am, * src/spicelib/devices/bsim3soi/.cvsignore, * src/spicelib/devices/bsim3soi/BsimTerms_use, * src/spicelib/devices/bsim3soi/Makefile.am, * src/spicelib/devices/bsim3soi/b4soi.c, * src/spicelib/devices/bsim3soi/b4soiacld.c, * src/spicelib/devices/bsim3soi/b4soiask.c, * src/spicelib/devices/bsim3soi/b4soicheck.c, * src/spicelib/devices/bsim3soi/b4soicvtest.c, * src/spicelib/devices/bsim3soi/b4soidef.h, * src/spicelib/devices/bsim3soi/b4soidel.c, * src/spicelib/devices/bsim3soi/b4soidest.c, * src/spicelib/devices/bsim3soi/b4soiext.h, * src/spicelib/devices/bsim3soi/b4soigetic.c, * src/spicelib/devices/bsim3soi/b4soiinit.c, * src/spicelib/devices/bsim3soi/b4soiinit.h, * src/spicelib/devices/bsim3soi/b4soiitf.h, * src/spicelib/devices/bsim3soi/b4soild.c, * src/spicelib/devices/bsim3soi/b4soimask.c, * src/spicelib/devices/bsim3soi/b4soimdel.c, * src/spicelib/devices/bsim3soi/b4soimpar.c, * src/spicelib/devices/bsim3soi/b4soinoi.c, * src/spicelib/devices/bsim3soi/b4soipar.c, * src/spicelib/devices/bsim3soi/b4soipzld.c, * src/spicelib/devices/bsim3soi/b4soiset.c, * src/spicelib/devices/bsim3soi/b4soitemp.c, * src/spicelib/devices/bsim3soi/b4soitrunc.c, * src/spicelib/devices/bsimsoi/.cvsignore, * src/spicelib/devices/bsimsoi/BsimTerms_use, * src/spicelib/devices/bsimsoi/Makefile.am, * src/spicelib/devices/bsimsoi/b4soi.c, * src/spicelib/devices/bsimsoi/b4soiacld.c, * src/spicelib/devices/bsimsoi/b4soiask.c, * src/spicelib/devices/bsimsoi/b4soicheck.c, * src/spicelib/devices/bsimsoi/b4soicvtest.c, * src/spicelib/devices/bsimsoi/b4soidef.h, * src/spicelib/devices/bsimsoi/b4soidel.c, * src/spicelib/devices/bsimsoi/b4soidest.c, * src/spicelib/devices/bsimsoi/b4soiext.h, * src/spicelib/devices/bsimsoi/b4soigetic.c, * src/spicelib/devices/bsimsoi/b4soiinit.c, * src/spicelib/devices/bsimsoi/b4soiinit.h, * src/spicelib/devices/bsimsoi/b4soiitf.h, * src/spicelib/devices/bsimsoi/b4soild.c, * src/spicelib/devices/bsimsoi/b4soimask.c, * src/spicelib/devices/bsimsoi/b4soimdel.c, * src/spicelib/devices/bsimsoi/b4soimpar.c, * src/spicelib/devices/bsimsoi/b4soinoi.c, * src/spicelib/devices/bsimsoi/b4soipar.c, * src/spicelib/devices/bsimsoi/b4soipzld.c, * src/spicelib/devices/bsimsoi/b4soiset.c, * src/spicelib/devices/bsimsoi/b4soitemp.c, * src/spicelib/devices/bsimsoi/b4soitrunc.c, * src/spicelib/devices/dev.c, * tests/Makefile.am, * tests/bsim3soi/.cvsignore, * tests/bsim3soi/Makefile.am, * tests/bsim3soi/nmos/parameters/nmosParameters, * tests/bsim3soi/nmos/qaSpec, * tests/bsim3soi/nmos/reference/acFreq01.standard, * tests/bsim3soi/nmos/reference/acFreq02.standard, * tests/bsim3soi/nmos/reference/acVd01.standard, * tests/bsim3soi/nmos/reference/acVd02.standard, * tests/bsim3soi/nmos/reference/dcSweep01.standard, * tests/bsim3soi/nmos/reference/dcSweep02.standard, * tests/bsim3soi/nmos/reference/dcSweep03.standard, * tests/bsim3soi/nmos/reference/noise01.standard, * tests/bsim3soi/nmos/reference/noise02.standard, * tests/bsim3soi/nmos/reference/noise03.standard, * tests/bsim3soi/pmos/parameters/pmosParameters, * tests/bsim3soi/pmos/qaSpec, * tests/bsim3soi/pmos/reference/acFreq01.standard, * tests/bsim3soi/pmos/reference/acFreq02.standard, * tests/bsim3soi/pmos/reference/acVd01.standard, * tests/bsim3soi/pmos/reference/acVd02.standard, * tests/bsim3soi/pmos/reference/dcSweep01.standard, * tests/bsim3soi/pmos/reference/dcSweep02.standard, * tests/bsim3soi/pmos/reference/dcSweep03.standard, * tests/bsim3soi/pmos/reference/noise01.standard, * tests/bsim3soi/pmos/reference/noise02.standard, * tests/bsim3soi/pmos/reference/noise03.standard, * tests/bsimsoi/.cvsignore, * tests/bsimsoi/Makefile.am, * tests/bsimsoi/nmos/parameters/nmosParameters, * tests/bsimsoi/nmos/qaSpec, * tests/bsimsoi/nmos/reference/acFreq01.standard, * tests/bsimsoi/nmos/reference/acFreq02.standard, * tests/bsimsoi/nmos/reference/acVd01.standard, * tests/bsimsoi/nmos/reference/acVd02.standard, * tests/bsimsoi/nmos/reference/dcSweep01.standard, * tests/bsimsoi/nmos/reference/dcSweep02.standard, * tests/bsimsoi/nmos/reference/dcSweep03.standard, * tests/bsimsoi/nmos/reference/noise01.standard, * tests/bsimsoi/nmos/reference/noise02.standard, * tests/bsimsoi/nmos/reference/noise03.standard, * tests/bsimsoi/pmos/parameters/pmosParameters, * tests/bsimsoi/pmos/qaSpec, * tests/bsimsoi/pmos/reference/acFreq01.standard, * tests/bsimsoi/pmos/reference/acFreq02.standard, * tests/bsimsoi/pmos/reference/acVd01.standard, * tests/bsimsoi/pmos/reference/acVd02.standard, * tests/bsimsoi/pmos/reference/dcSweep01.standard, * tests/bsimsoi/pmos/reference/dcSweep02.standard, * tests/bsimsoi/pmos/reference/dcSweep03.standard, * tests/bsimsoi/pmos/reference/noise01.standard, * tests/bsimsoi/pmos/reference/noise02.standard, * tests/bsimsoi/pmos/reference/noise03.standard, * visualc/vngspice.vcproj: rename "bsim3soi" device to "bsimsoi" 2012-10-25 rlar * src/spicelib/devices/adms/admst/ngspice.xml, * src/spicelib/devices/adms/admst/prengspice.xml, * src/spicelib/devices/adms/ekv/adms3va/ekv.va, * src/spicelib/devices/adms/hicum0/adms3va/hicum0.va, * src/spicelib/devices/adms/hicum2/adms3va/hicum2.va, * src/spicelib/devices/adms/mextram/adms3va/COPYRIGHT_NOTICE, * src/spicelib/devices/adms/mextram/adms3va/bjt504t.va, * src/spicelib/devices/adms/mextram/adms3va/evaluate.inc, * src/spicelib/devices/adms/mextram/adms3va/frontdef.inc, * src/spicelib/devices/adms/mextram/adms3va/initialize.inc, * src/spicelib/devices/adms/mextram/adms3va/opinfo.inc, * src/spicelib/devices/adms/mextram/adms3va/opvars.inc, * src/spicelib/devices/adms/mextram/adms3va/parameters.inc, * src/spicelib/devices/adms/mextram/adms3va/tscaling.inc, * src/spicelib/devices/adms/mextram/adms3va/variables.inc, * src/spicelib/devices/adms/psp102/adms3va/JUNCAP200_InitModel.include, * src/spicelib/devices/adms/psp102/adms3va/JUNCAP200_macrodefs.include, * src/spicelib/devices/adms/psp102/adms3va/JUNCAP200_parlist.include, * src/spicelib/devices/adms/psp102/adms3va/JUNCAP200_varlist.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_ChargesNQS.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_InitNQS.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_binning.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_binpars.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_macrodefs.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_module.include, * src/spicelib/devices/adms/psp102/adms3va/PSP102_nqs_macrodefs.include, * src/spicelib/devices/adms/psp102/adms3va/SIMKIT_macrodefs.include, * src/spicelib/devices/adms/psp102/adms3va/psp102.va, * src/spicelib/devices/adms/psp102/adms3va/readme.ngspice, * src/spicelib/devices/adms/psp102/adms3va/readme.txt: remove adms3 #2/2, files 2012-10-25 rlar * autogen.sh, * configure.ac, * src/frontend/inpcom.c, * src/frontend/subckt.c, * src/include/ngspice/devdefs.h, * src/include/ngspice/ngspice.h, * src/spicelib/devices/dev.c, * src/spicelib/parser/inp.h, * src/spicelib/parser/inp2u.c, * src/spicelib/parser/inpdomod.c, * src/spicelib/parser/inppas2.c: remove adms3 #1/2, code due to license issues, and with the aim to approach the next ngspice release 25 we have to move this over to a development branch 2012-10-24 h_vogt * visualc/vngspice.vcproj: vngspice.vcproj: 64 bit compilation improved 2012-10-24 dwarning * src/spicelib/devices/hisim2/hisim2.h, * src/spicelib/devices/hisim2/hsm2.c, * src/spicelib/devices/hisim2/hsm2acld.c, * src/spicelib/devices/hisim2/hsm2ask.c, * src/spicelib/devices/hisim2/hsm2cvtest.c, * src/spicelib/devices/hisim2/hsm2def.h, * src/spicelib/devices/hisim2/hsm2del.c, * src/spicelib/devices/hisim2/hsm2dest.c, * src/spicelib/devices/hisim2/hsm2eval.c, * src/spicelib/devices/hisim2/hsm2evalenv.h, * src/spicelib/devices/hisim2/hsm2ext.h, * src/spicelib/devices/hisim2/hsm2getic.c, * src/spicelib/devices/hisim2/hsm2init.c, * src/spicelib/devices/hisim2/hsm2itf.h, * src/spicelib/devices/hisim2/hsm2ld.c, * src/spicelib/devices/hisim2/hsm2mask.c, * src/spicelib/devices/hisim2/hsm2mdel.c, * src/spicelib/devices/hisim2/hsm2mpar.c, * src/spicelib/devices/hisim2/hsm2noi.c, * src/spicelib/devices/hisim2/hsm2par.c, * src/spicelib/devices/hisim2/hsm2pzld.c, * src/spicelib/devices/hisim2/hsm2set.c, * src/spicelib/devices/hisim2/hsm2temp.c, * src/spicelib/devices/hisim2/hsm2trunc.c: hisim2 update to version 2.6.1 2012-10-24 dwarning * tests/hisim/nmos/parameters/nmosParameters, * tests/hisim/nmos/qaSpec, * tests/hisim/nmos/reference/10_dcSweep_COIIGS=1.standard, * tests/hisim/nmos/reference/11_dcSweep_COGIDL=0.standard, * tests/hisim/nmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/nmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/nmos/reference/14-1_dcSweep_COISTI=1.standard, * tests/hisim/nmos/reference/14-2_dcSweep_COISTI=1.standard, * tests/hisim/nmos/reference/14_dcSweep_COISTI=1.standard, * tests/hisim/nmos/reference/15_dcSweep_WPE.standard, * tests/hisim/nmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/nmos/reference/2-1_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/2-2_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/20-1_dcSweep_CORG=1.standard, * tests/hisim/nmos/reference/20-2_dcSweep_CORG=1.standard, * tests/hisim/nmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/nmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/nmos/reference/22-1_dcSweep_CORBNET=1.standard, * tests/hisim/nmos/reference/22-2_dcSweep_CORBNET=1.standard, * tests/hisim/nmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/nmos/reference/2_dcSweep_CORSRD=0.standard, * tests/hisim/nmos/reference/33_dcSweep_CODFM=0.standard, * tests/hisim/nmos/reference/34-1_dcSweep_CODFM=1.standard, * tests/hisim/nmos/reference/34-2_dcSweep_CODFM=1.standard, * tests/hisim/nmos/reference/34_dcSweep_CODFM=1.standard, * tests/hisim/nmos/reference/36-1_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/36-2_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/36_acVd_CORSRD=0.standard, * tests/hisim/nmos/reference/37_acVd_WPE.standard, * tests/hisim/nmos/reference/40_acFreq_COOVLP=1.standard, * tests/hisim/nmos/reference/41_acFreq_COISUB=0.standard, * tests/hisim/nmos/reference/42_acFreq_COISUB=1.standard, * tests/hisim/nmos/reference/43_acFreq_COIIGS=0.standard, * tests/hisim/nmos/reference/44_acFreq_COIIGS=1.standard, * tests/hisim/nmos/reference/45_acFreq_COGIDL=0.standard, * tests/hisim/nmos/reference/46_acFreq_COGIDL=1.standard, * tests/hisim/nmos/reference/47_acFreq_COSTI=0.standard, * tests/hisim/nmos/reference/48-1_acFreq_COSTI=1.standard, * tests/hisim/nmos/reference/48-2_acFreq_COSTI=1.standard, * tests/hisim/nmos/reference/48_acFreq_COSTI=1.standard, * tests/hisim/nmos/reference/49_acFreq_COADOV=0.standard, * tests/hisim/nmos/reference/50_acFreq_COADOV=1.standard, * tests/hisim/nmos/reference/51_acFreq_CONQS=0.standard, * tests/hisim/nmos/reference/52-1_acFreq_CONQS=1.standard, * tests/hisim/nmos/reference/52-2_acFreq_CONQS=1.standard, * tests/hisim/nmos/reference/52_acFreq_CONQS=1.standard, * tests/hisim/nmos/reference/53_acFreq_CORG=0.standard, * tests/hisim/nmos/reference/54-1_acFreq_CORG=1.standard, * tests/hisim/nmos/reference/54-2_acFreq_CORG=1.standard, * tests/hisim/nmos/reference/54_acFreq_CORG=1.standard, * tests/hisim/nmos/reference/55_acFreq_CORBNET=0.standard, * tests/hisim/nmos/reference/55_acFreq_CORBNETt=0.standard, * tests/hisim/nmos/reference/56-1_acFreq_CORBNETt=1.standard, * tests/hisim/nmos/reference/56-2_acFreq_CORBNETt=1.standard, * tests/hisim/nmos/reference/56_acFreq_CORBNET=1.standard, * tests/hisim/nmos/reference/56_acFreq_CORBNETt=1.standard, * tests/hisim/nmos/reference/57_acFreq_COFLICK=0.standard, * tests/hisim/nmos/reference/58_acFreq_COFLICK=1.standard, * tests/hisim/nmos/reference/59_acFreq_COTHRML=0.standard, * tests/hisim/nmos/reference/60_acFreq_COTHRML=1.standard, * tests/hisim/nmos/reference/61_acFreq_COIGN=0.standard, * tests/hisim/nmos/reference/62_acFreq_COIGN=1.standard, * tests/hisim/nmos/reference/63_acFreq_WPE.standard, * tests/hisim/nmos/reference/67_acFreq_CODFM=0.standard, * tests/hisim/nmos/reference/68-1_acFreq_CODFM=1.standard, * tests/hisim/nmos/reference/68-2_acFreq_CODFM=1.standard, * tests/hisim/nmos/reference/68_acFreq_CODFM=1.standard, * tests/hisim/nmos/reference/69-1_noise_COIGN=1_T-55.standard, * tests/hisim/nmos/reference/69-2_noise_COIGN=1_T150.standard, * tests/hisim/nmos/reference/69_noise_COIGN=1_T27.standard, * tests/hisim/nmos/reference/70-1_noise_COIGN=0_T-55.standard, * tests/hisim/nmos/reference/70-2_noise_COIGN=0_T150.standard, * tests/hisim/nmos/reference/70_noise_COIGN=0_T27.standard, * tests/hisim/nmos/reference/7_dcSweep_COISUB=0.standard, * tests/hisim/nmos/reference/8_dcSweep_COISUB=1.standard, * tests/hisim/nmos/reference/9_dcSweep_COIIGS=0.standard, * tests/hisim/pmos/parameters/pmosParameters, * tests/hisim/pmos/qaSpec, * tests/hisim/pmos/reference/10_dcSweep_COIIGS=1.standard, * tests/hisim/pmos/reference/11_dcSweep_COGIDL=0.standard, * tests/hisim/pmos/reference/12_dcSweep_COGIDL=1.standard, * tests/hisim/pmos/reference/13_dcSweep_COISTI=0.standard, * tests/hisim/pmos/reference/14-1_dcSweep_COISTI=1.standard, * tests/hisim/pmos/reference/14-2_dcSweep_COISTI=1.standard, * tests/hisim/pmos/reference/14_dcSweep_COISTI=1.standard, * tests/hisim/pmos/reference/15_dcSweep_WPE.standard, * tests/hisim/pmos/reference/19_dcSweep_CORG=0.standard, * tests/hisim/pmos/reference/2-1_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/2-2_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/20-1_dcSweep_CORG=1.standard, * tests/hisim/pmos/reference/20-2_dcSweep_CORG=1.standard, * tests/hisim/pmos/reference/20_dcSweep_CORG=1.standard, * tests/hisim/pmos/reference/21_dcSweep_CORBNET=0.standard, * tests/hisim/pmos/reference/22-1_dcSweep_CORBNET=1.standard, * tests/hisim/pmos/reference/22-2_dcSweep_CORBNET=1.standard, * tests/hisim/pmos/reference/22_dcSweep_CORBNET=1.standard, * tests/hisim/pmos/reference/2_dcSweep_CORSRD=0.standard, * tests/hisim/pmos/reference/33_dcSweep_CODFM=0.standard, * tests/hisim/pmos/reference/34-1_dcSweep_CODFM=1.standard, * tests/hisim/pmos/reference/34-2_dcSweep_CODFM=1.standard, * tests/hisim/pmos/reference/34_dcSweep_CODFM=1.standard, * tests/hisim/pmos/reference/36-1_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/36-2_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/36_acVd_CORSRD=0.standard, * tests/hisim/pmos/reference/37_acVd_WPE.standard, * tests/hisim/pmos/reference/40_acFreq_COOVLP=1.standard, * tests/hisim/pmos/reference/41_acFreq_COISUB=0.standard, * tests/hisim/pmos/reference/42_acFreq_COISUB=1.standard, * tests/hisim/pmos/reference/43_acFreq_COIIGS=0.standard, * tests/hisim/pmos/reference/44_acFreq_COIIGS=1.standard, * tests/hisim/pmos/reference/45_acFreq_COGIDL=0.standard, * tests/hisim/pmos/reference/46_acFreq_COGIDL=1.standard, * tests/hisim/pmos/reference/47_acFreq_COSTI=0.standard, * tests/hisim/pmos/reference/48-1_acFreq_COSTI=1.standard, * tests/hisim/pmos/reference/48-2_acFreq_COSTI=1.standard, * tests/hisim/pmos/reference/48_acFreq_COSTI=1.standard, * tests/hisim/pmos/reference/49_acFreq_COADOV=0.standard, * tests/hisim/pmos/reference/50_acFreq_COADOV=1.standard, * tests/hisim/pmos/reference/51_acFreq_CONQS=0.standard, * tests/hisim/pmos/reference/52-1_acFreq_CONQS=1.standard, * tests/hisim/pmos/reference/52-2_acFreq_CONQS=1.standard, * tests/hisim/pmos/reference/52_acFreq_CONQS=1.standard, * tests/hisim/pmos/reference/53_acFreq_CORG=0.standard, * tests/hisim/pmos/reference/54-1_acFreq_CORG=1.standard, * tests/hisim/pmos/reference/54-2_acFreq_CORG=1.standard, * tests/hisim/pmos/reference/54_acFreq_CORG=1.standard, * tests/hisim/pmos/reference/55_acFreq_CORBNET=0.standard, * tests/hisim/pmos/reference/55_acFreq_CORBNETt=0.standard, * tests/hisim/pmos/reference/56-1_acFreq_CORBNETt=1.standard, * tests/hisim/pmos/reference/56-2_acFreq_CORBNETt=1.standard, * tests/hisim/pmos/reference/56_acFreq_CORBNET=1.standard, * tests/hisim/pmos/reference/56_acFreq_CORBNETt=1.standard, * tests/hisim/pmos/reference/57_acFreq_COFLICK=0.standard, * tests/hisim/pmos/reference/58_acFreq_COFLICK=1.standard, * tests/hisim/pmos/reference/59_acFreq_COTHRML=0.standard, * tests/hisim/pmos/reference/60_acFreq_COTHRML=1.standard, * tests/hisim/pmos/reference/61_acFreq_COIGN=0.standard, * tests/hisim/pmos/reference/62_acFreq_COIGN=1.standard, * tests/hisim/pmos/reference/63_acFreq_WPE.standard, * tests/hisim/pmos/reference/67_acFreq_CODFM=0.standard, * tests/hisim/pmos/reference/68-1_acFreq_CODFM=1.standard, * tests/hisim/pmos/reference/68-2_acFreq_CODFM=1.standard, * tests/hisim/pmos/reference/68_acFreq_CODFM=1.standard, * tests/hisim/pmos/reference/69-1_noise_COIGN=1_T-55.standard, * tests/hisim/pmos/reference/69-2_noise_COIGN=1_T150.standard, * tests/hisim/pmos/reference/69_noise_COIGN=1_T27.standard, * tests/hisim/pmos/reference/70-1_noise_COIGN=0_T-55.standard, * tests/hisim/pmos/reference/70-2_noise_COIGN=0_T150.standard, * tests/hisim/pmos/reference/70_noise_COIGN=0_T27.standard, * tests/hisim/pmos/reference/7_dcSweep_COISUB=0.standard, * tests/hisim/pmos/reference/8_dcSweep_COISUB=1.standard, * tests/hisim/pmos/reference/9_dcSweep_COIIGS=0.standard: hisim2 new qa tests 2012-10-22 Francesco Lannutti * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/spicelib/analysis/cktop.c: white space changes 2012-10-22 Francesco Lannutti * src/spicelib/analysis/dcpss.c, * src/spicelib/devices/bsim1/b1set.c, * src/spicelib/devices/bsim2/b2set.c, * src/spicelib/devices/bsim3/b3cvtest.c, * src/spicelib/devices/bsim3/b3getic.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3pzld.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c, * src/spicelib/devices/bsim3/b3trunc.c, * src/spicelib/devices/bsim3soi/b4soiacld.c, * src/spicelib/devices/bsim3soi/b4soicvtest.c, * src/spicelib/devices/bsim3soi/b4soidest.c, * src/spicelib/devices/bsim3soi/b4soigetic.c, * src/spicelib/devices/bsim3soi/b4soild.c, * src/spicelib/devices/bsim3soi/b4soimdel.c, * src/spicelib/devices/bsim3soi/b4soinoi.c, * src/spicelib/devices/bsim3soi/b4soitrunc.c, * src/spicelib/devices/bsim3soi_dd/b3soiddcvtest.c, * src/spicelib/devices/bsim3soi_dd/b3soiddgetic.c, * src/spicelib/devices/bsim3soi_dd/b3soiddld.c, * src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c, * src/spicelib/devices/bsim3soi_dd/b3soiddset.c, * src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c, * src/spicelib/devices/bsim3soi_fd/b3soifdacld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdcvtest.c, * src/spicelib/devices/bsim3soi_fd/b3soifdgetic.c, * src/spicelib/devices/bsim3soi_fd/b3soifdld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c, * src/spicelib/devices/bsim3soi_fd/b3soifdset.c, * src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c, * src/spicelib/devices/bsim3soi_fd/b3soifdtrunc.c, * src/spicelib/devices/bsim3soi_pd/b3soipdacld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdcvtest.c, * src/spicelib/devices/bsim3soi_pd/b3soipdgetic.c, * src/spicelib/devices/bsim3soi_pd/b3soipdld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c, * src/spicelib/devices/bsim3soi_pd/b3soipdpzld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdset.c, * src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c, * src/spicelib/devices/bsim3soi_pd/b3soipdtrunc.c, * src/spicelib/devices/bsim3v0/b3v0acld.c, * src/spicelib/devices/bsim3v0/b3v0cvtest.c, * src/spicelib/devices/bsim3v0/b3v0getic.c, * src/spicelib/devices/bsim3v0/b3v0ld.c, * src/spicelib/devices/bsim3v0/b3v0noi.c, * src/spicelib/devices/bsim3v0/b3v0set.c, * src/spicelib/devices/bsim3v0/b3v0temp.c, * src/spicelib/devices/bsim3v0/b3v0trunc.c, * src/spicelib/devices/bsim3v1/b3v1cvtest.c, * src/spicelib/devices/bsim3v1/b3v1getic.c, * src/spicelib/devices/bsim3v1/b3v1ld.c, * src/spicelib/devices/bsim3v1/b3v1noi.c, * src/spicelib/devices/bsim3v1/b3v1set.c, * src/spicelib/devices/bsim3v1/b3v1temp.c, * src/spicelib/devices/bsim3v1/b3v1trunc.c, * src/spicelib/devices/bsim3v1/bsim3v1def.h, * src/spicelib/devices/bsim3v32/b3v32getic.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4v4/b4v4cvtest.c, * src/spicelib/devices/bsim4v4/b4v4set.c, * src/spicelib/devices/bsim4v5/b4v5cvtest.c, * src/spicelib/devices/bsim4v5/b4v5set.c, * src/spicelib/devices/bsim4v5/b4v5trunc.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/b4v6trunc.c, * src/spicelib/devices/cap/capgetic.c, * src/spicelib/devices/cap/capsset.c, * src/spicelib/devices/cccs/cccsload.c, * src/spicelib/devices/cccs/cccspzld.c, * src/spicelib/devices/cccs/cccssacl.c, * src/spicelib/devices/cccs/cccssset.c, * src/spicelib/devices/ccvs/ccvssacl.c, * src/spicelib/devices/ccvs/ccvssld.c, * src/spicelib/devices/ccvs/ccvssprt.c, * src/spicelib/devices/ccvs/ccvssset.c, * src/spicelib/devices/dio/diosset.c, * src/spicelib/devices/hfet2/hfet2defs.h, * src/spicelib/devices/ind/indsetup.c, * src/spicelib/devices/mos1/mos1set.c, * src/spicelib/devices/mos2/mos2acld.c, * src/spicelib/devices/mos2/mos2conv.c, * src/spicelib/devices/mos2/mos2ic.c, * src/spicelib/devices/mos2/mos2noi.c, * src/spicelib/devices/mos2/mos2pzld.c, * src/spicelib/devices/mos2/mos2set.c, * src/spicelib/devices/mos2/mos2trun.c, * src/spicelib/devices/mos3/mos3set.c, * src/spicelib/devices/mos9/mos9set.c, * src/spicelib/devices/ndev/ndevaccept.c, * src/spicelib/devices/ndev/ndevload.c, * src/spicelib/devices/numd2/nud2set.c, * src/spicelib/devices/res/resload.c, * src/spicelib/devices/res/resnoise.c, * src/spicelib/devices/res/respzld.c, * src/spicelib/devices/res/ressetup.c, * src/spicelib/devices/res/ressload.c, * src/spicelib/devices/res/restemp.c, * src/spicelib/devices/soi3/soi3set.c, * src/spicelib/devices/vccs/vccssld.c, * src/spicelib/devices/vccs/vccssset.c, * src/spicelib/devices/vcvs/vcvssld.c, * src/spicelib/devices/vcvs/vcvssset.c: white space changes 2012-10-22 Francesco Lannutti * src/frontend/outitf.c, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/gendefs.h, * src/include/ngspice/ngspice.h, * src/include/ngspice/optdefs.h, * src/include/ngspice/smpdefs.h, * src/include/ngspice/sperror.h, * src/main.c, * src/maths/sparse/Makefile.am, * src/maths/sparse/spalloc.c, * src/maths/sparse/spcombin.c, * src/maths/sparse/spsmp.c, * src/misc/misc_time.c, * src/spicelib/analysis/Makefile.am, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktacct.c, * src/spicelib/analysis/cktload.c, * src/spicelib/analysis/cktop.c, * src/spicelib/analysis/cktpartn.c, * src/spicelib/analysis/cktpzld.c, * src/spicelib/analysis/cktsetup.c, * src/spicelib/analysis/cktsopt.c, * src/spicelib/analysis/ckttrunc.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/devices/adms/admst/ngspice.xml, * src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml, * src/spicelib/devices/adms/admst/ngspiceMODULEnoise.c.xml, * src/spicelib/devices/asrc/asrcacld.c, * src/spicelib/devices/asrc/asrcconv.c, * src/spicelib/devices/asrc/asrcdefs.h, * src/spicelib/devices/asrc/asrcload.c, * src/spicelib/devices/asrc/asrcpzld.c, * src/spicelib/devices/asrc/asrctemp.c, * src/spicelib/devices/bjt/bjtacld.c, * src/spicelib/devices/bjt/bjtconv.c, * src/spicelib/devices/bjt/bjtdefs.h, * src/spicelib/devices/bjt/bjtdisto.c, * src/spicelib/devices/bjt/bjtgetic.c, * src/spicelib/devices/bjt/bjtload.c, * src/spicelib/devices/bjt/bjtnoise.c, * src/spicelib/devices/bjt/bjtpzld.c, * src/spicelib/devices/bjt/bjtsetup.c, * src/spicelib/devices/bjt/bjtsload.c, * src/spicelib/devices/bjt/bjtsprt.c, * src/spicelib/devices/bjt/bjtsset.c, * src/spicelib/devices/bjt/bjtsupd.c, * src/spicelib/devices/bjt/bjttemp.c, * src/spicelib/devices/bjt/bjttrunc.c, * src/spicelib/devices/bsim1/b1acld.c, * src/spicelib/devices/bsim1/b1cvtest.c, * src/spicelib/devices/bsim1/b1disto.c, * src/spicelib/devices/bsim1/b1dset.c, * src/spicelib/devices/bsim1/b1getic.c, * src/spicelib/devices/bsim1/b1ld.c, * src/spicelib/devices/bsim1/b1noi.c, * src/spicelib/devices/bsim1/b1pzld.c, * src/spicelib/devices/bsim1/b1set.c, * src/spicelib/devices/bsim1/b1temp.c, * src/spicelib/devices/bsim1/b1trunc.c, * src/spicelib/devices/bsim1/bsim1def.h, * src/spicelib/devices/bsim2/b2acld.c, * src/spicelib/devices/bsim2/b2cvtest.c, * src/spicelib/devices/bsim2/b2getic.c, * src/spicelib/devices/bsim2/b2ld.c, * src/spicelib/devices/bsim2/b2noi.c, * src/spicelib/devices/bsim2/b2pzld.c, * src/spicelib/devices/bsim2/b2set.c, * src/spicelib/devices/bsim2/b2temp.c, * src/spicelib/devices/bsim2/b2trunc.c, * src/spicelib/devices/bsim2/bsim2def.h, * src/spicelib/devices/bsim3/b3acld.c, * src/spicelib/devices/bsim3/b3cvtest.c, * src/spicelib/devices/bsim3/b3getic.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3pzld.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/b3temp.c, * src/spicelib/devices/bsim3/b3trunc.c, * src/spicelib/devices/bsim3/bsim3def.h, * src/spicelib/devices/bsim3soi/b4soiacld.c, * src/spicelib/devices/bsim3soi/b4soicvtest.c, * src/spicelib/devices/bsim3soi/b4soidef.h, * src/spicelib/devices/bsim3soi/b4soidest.c, * src/spicelib/devices/bsim3soi/b4soigetic.c, * src/spicelib/devices/bsim3soi/b4soild.c, * src/spicelib/devices/bsim3soi/b4soimdel.c, * src/spicelib/devices/bsim3soi/b4soinoi.c, * src/spicelib/devices/bsim3soi/b4soipzld.c, * src/spicelib/devices/bsim3soi/b4soitemp.c, * src/spicelib/devices/bsim3soi/b4soitrunc.c, * src/spicelib/devices/bsim3soi_dd/b3soiddacld.c, * src/spicelib/devices/bsim3soi_dd/b3soiddcvtest.c, * src/spicelib/devices/bsim3soi_dd/b3soidddef.h, * src/spicelib/devices/bsim3soi_dd/b3soiddgetic.c, * src/spicelib/devices/bsim3soi_dd/b3soiddld.c, * src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c, * src/spicelib/devices/bsim3soi_dd/b3soiddpzld.c, * src/spicelib/devices/bsim3soi_dd/b3soiddset.c, * src/spicelib/devices/bsim3soi_dd/b3soiddtemp.c, * src/spicelib/devices/bsim3soi_dd/b3soiddtrunc.c, * src/spicelib/devices/bsim3soi_fd/b3soifdacld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdcvtest.c, * src/spicelib/devices/bsim3soi_fd/b3soifddef.h, * src/spicelib/devices/bsim3soi_fd/b3soifdgetic.c, * src/spicelib/devices/bsim3soi_fd/b3soifdld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c, * src/spicelib/devices/bsim3soi_fd/b3soifdpzld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdset.c, * src/spicelib/devices/bsim3soi_fd/b3soifdtemp.c, * src/spicelib/devices/bsim3soi_fd/b3soifdtrunc.c, * src/spicelib/devices/bsim3soi_pd/b3soipdacld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdcvtest.c, * src/spicelib/devices/bsim3soi_pd/b3soipddef.h, * src/spicelib/devices/bsim3soi_pd/b3soipdgetic.c, * src/spicelib/devices/bsim3soi_pd/b3soipdld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c, * src/spicelib/devices/bsim3soi_pd/b3soipdpzld.c, * src/spicelib/devices/bsim3soi_pd/b3soipdset.c, * src/spicelib/devices/bsim3soi_pd/b3soipdtemp.c, * src/spicelib/devices/bsim3soi_pd/b3soipdtrunc.c, * src/spicelib/devices/bsim3v0/b3v0acld.c, * src/spicelib/devices/bsim3v0/b3v0cvtest.c, * src/spicelib/devices/bsim3v0/b3v0getic.c, * src/spicelib/devices/bsim3v0/b3v0ld.c, * src/spicelib/devices/bsim3v0/b3v0noi.c, * src/spicelib/devices/bsim3v0/b3v0pzld.c, * src/spicelib/devices/bsim3v0/b3v0set.c, * src/spicelib/devices/bsim3v0/b3v0temp.c, * src/spicelib/devices/bsim3v0/b3v0trunc.c, * src/spicelib/devices/bsim3v0/bsim3v0def.h, * src/spicelib/devices/bsim3v1/ChangeLog, * src/spicelib/devices/bsim3v1/b3v1acld.c, * src/spicelib/devices/bsim3v1/b3v1cvtest.c, * src/spicelib/devices/bsim3v1/b3v1getic.c, * src/spicelib/devices/bsim3v1/b3v1ld.c, * src/spicelib/devices/bsim3v1/b3v1noi.c, * src/spicelib/devices/bsim3v1/b3v1pzld.c, * src/spicelib/devices/bsim3v1/b3v1set.c, * src/spicelib/devices/bsim3v1/b3v1temp.c, * src/spicelib/devices/bsim3v1/b3v1trunc.c, * src/spicelib/devices/bsim3v1/bsim3v1def.h, * src/spicelib/devices/bsim3v32/b3v32acld.c, * src/spicelib/devices/bsim3v32/b3v32cvtest.c, * src/spicelib/devices/bsim3v32/b3v32getic.c, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim3v32/b3v32pzld.c, * src/spicelib/devices/bsim3v32/b3v32set.c, * src/spicelib/devices/bsim3v32/b3v32temp.c, * src/spicelib/devices/bsim3v32/b3v32trunc.c, * src/spicelib/devices/bsim3v32/bsim3v32def.h, * src/spicelib/devices/bsim4/b4acld.c, * src/spicelib/devices/bsim4/b4cvtest.c, * src/spicelib/devices/bsim4/b4getic.c, * src/spicelib/devices/bsim4/b4ld.c, * src/spicelib/devices/bsim4/b4pzld.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4/b4temp.c, * src/spicelib/devices/bsim4/b4trunc.c, * src/spicelib/devices/bsim4/bsim4def.h, * src/spicelib/devices/bsim4v4/b4v4acld.c, * src/spicelib/devices/bsim4v4/b4v4cvtest.c, * src/spicelib/devices/bsim4v4/b4v4getic.c, * src/spicelib/devices/bsim4v4/b4v4ld.c, * src/spicelib/devices/bsim4v4/b4v4pzld.c, * src/spicelib/devices/bsim4v4/b4v4set.c, * src/spicelib/devices/bsim4v4/b4v4temp.c, * src/spicelib/devices/bsim4v4/b4v4trunc.c, * src/spicelib/devices/bsim4v4/bsim4v4def.h, * src/spicelib/devices/bsim4v5/b4v5acld.c, * src/spicelib/devices/bsim4v5/b4v5cvtest.c, * src/spicelib/devices/bsim4v5/b4v5getic.c, * src/spicelib/devices/bsim4v5/b4v5ld.c, * src/spicelib/devices/bsim4v5/b4v5pzld.c, * src/spicelib/devices/bsim4v5/b4v5set.c, * src/spicelib/devices/bsim4v5/b4v5temp.c, * src/spicelib/devices/bsim4v5/b4v5trunc.c, * src/spicelib/devices/bsim4v5/bsim4v5def.h, * src/spicelib/devices/bsim4v6/b4v6acld.c, * src/spicelib/devices/bsim4v6/b4v6cvtest.c, * src/spicelib/devices/bsim4v6/b4v6getic.c, * src/spicelib/devices/bsim4v6/b4v6ld.c, * src/spicelib/devices/bsim4v6/b4v6pzld.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/b4v6temp.c, * src/spicelib/devices/bsim4v6/b4v6trunc.c, * src/spicelib/devices/bsim4v6/bsim4v6def.h, * src/spicelib/devices/cap/capacld.c, * src/spicelib/devices/cap/capdefs.h, * src/spicelib/devices/cap/capgetic.c, * src/spicelib/devices/cap/capload.c, * src/spicelib/devices/cap/cappzld.c, * src/spicelib/devices/cap/capsacl.c, * src/spicelib/devices/cap/capsetup.c, * src/spicelib/devices/cap/capsload.c, * src/spicelib/devices/cap/capsprt.c, * src/spicelib/devices/cap/capsset.c, * src/spicelib/devices/cap/capsupd.c, * src/spicelib/devices/cap/captemp.c, * src/spicelib/devices/cap/captrunc.c, * src/spicelib/devices/cccs/cccsdefs.h, * src/spicelib/devices/cccs/cccsload.c, * src/spicelib/devices/cccs/cccspzld.c, * src/spicelib/devices/cccs/cccssacl.c, * src/spicelib/devices/cccs/cccssprt.c, * src/spicelib/devices/cccs/cccssset.c, * src/spicelib/devices/ccvs/ccvsdefs.h, * src/spicelib/devices/ccvs/ccvsload.c, * src/spicelib/devices/ccvs/ccvspzld.c, * src/spicelib/devices/ccvs/ccvssacl.c, * src/spicelib/devices/ccvs/ccvssld.c, * src/spicelib/devices/ccvs/ccvssprt.c, * src/spicelib/devices/ccvs/ccvssset.c, * src/spicelib/devices/cktask.c, * src/spicelib/devices/cpl/cpldefs.h, * src/spicelib/devices/csw/cswacld.c, * src/spicelib/devices/csw/cswdefs.h, * src/spicelib/devices/csw/cswload.c, * src/spicelib/devices/csw/cswnoise.c, * src/spicelib/devices/csw/cswpzld.c, * src/spicelib/devices/csw/cswsetup.c, * src/spicelib/devices/dio/dioacld.c, * src/spicelib/devices/dio/dioconv.c, * src/spicelib/devices/dio/diodefs.h, * src/spicelib/devices/dio/diodisto.c, * src/spicelib/devices/dio/diodset.c, * src/spicelib/devices/dio/diogetic.c, * src/spicelib/devices/dio/dioload.c, * src/spicelib/devices/dio/dionoise.c, * src/spicelib/devices/dio/diopzld.c, * src/spicelib/devices/dio/diosacl.c, * src/spicelib/devices/dio/diosetup.c, * src/spicelib/devices/dio/diosload.c, * src/spicelib/devices/dio/diosprt.c, * src/spicelib/devices/dio/diosset.c, * src/spicelib/devices/dio/diosupd.c, * src/spicelib/devices/dio/diotemp.c, * src/spicelib/devices/dio/diotrunc.c, * src/spicelib/devices/hfet1/hfetacl.c, * src/spicelib/devices/hfet1/hfetdefs.h, * src/spicelib/devices/hfet1/hfetgetic.c, * src/spicelib/devices/hfet1/hfetload.c, * src/spicelib/devices/hfet1/hfetpzl.c, * src/spicelib/devices/hfet1/hfetsetup.c, * src/spicelib/devices/hfet1/hfettemp.c, * src/spicelib/devices/hfet1/hfettrunc.c, * src/spicelib/devices/hfet2/hfet2acl.c, * src/spicelib/devices/hfet2/hfet2defs.h, * src/spicelib/devices/hfet2/hfet2getic.c, * src/spicelib/devices/hfet2/hfet2load.c, * src/spicelib/devices/hfet2/hfet2pzl.c, * src/spicelib/devices/hfet2/hfet2setup.c, * src/spicelib/devices/hfet2/hfet2temp.c, * src/spicelib/devices/hfet2/hfet2trunc.c, * src/spicelib/devices/hisim2/hsm2def.h, * src/spicelib/devices/hisimhv/hsmhvdef.h, * src/spicelib/devices/ind/indacld.c, * src/spicelib/devices/ind/inddefs.h, * src/spicelib/devices/ind/indload.c, * src/spicelib/devices/ind/indpzld.c, * src/spicelib/devices/ind/indsetup.c, * src/spicelib/devices/ind/indsload.c, * src/spicelib/devices/ind/indsprt.c, * src/spicelib/devices/ind/indsset.c, * src/spicelib/devices/ind/indsupd.c, * src/spicelib/devices/ind/indtemp.c, * src/spicelib/devices/ind/indtrunc.c, * src/spicelib/devices/ind/mutacld.c, * src/spicelib/devices/ind/mutpzld.c, * src/spicelib/devices/ind/mutsprt.c, * src/spicelib/devices/ind/mutsset.c, * src/spicelib/devices/ind/muttemp.c, * src/spicelib/devices/isrc/isrcacld.c, * src/spicelib/devices/isrc/isrcdefs.h, * src/spicelib/devices/isrc/isrcload.c, * src/spicelib/devices/isrc/isrctemp.c, * src/spicelib/devices/jfet/jfetacld.c, * src/spicelib/devices/jfet/jfetdefs.h, * src/spicelib/devices/jfet/jfetdist.c, * src/spicelib/devices/jfet/jfetdset.c, * src/spicelib/devices/jfet/jfetic.c, * src/spicelib/devices/jfet/jfetload.c, * src/spicelib/devices/jfet/jfetnoi.c, * src/spicelib/devices/jfet/jfetpzld.c, * src/spicelib/devices/jfet/jfetset.c, * src/spicelib/devices/jfet/jfettemp.c, * src/spicelib/devices/jfet/jfettrun.c, * src/spicelib/devices/jfet2/jfet2acld.c, * src/spicelib/devices/jfet2/jfet2defs.h, * src/spicelib/devices/jfet2/jfet2ic.c, * src/spicelib/devices/jfet2/jfet2load.c, * src/spicelib/devices/jfet2/jfet2noi.c, * src/spicelib/devices/jfet2/jfet2set.c, * src/spicelib/devices/jfet2/jfet2temp.c, * src/spicelib/devices/jfet2/jfet2trun.c, * src/spicelib/devices/ltra/ltraacct.c, * src/spicelib/devices/ltra/ltraacld.c, * src/spicelib/devices/ltra/ltradefs.h, * src/spicelib/devices/ltra/ltraload.c, * src/spicelib/devices/ltra/ltratemp.c, * src/spicelib/devices/ltra/ltratrun.c, * src/spicelib/devices/mes/mesacl.c, * src/spicelib/devices/mes/mesdefs.h, * src/spicelib/devices/mes/mesdisto.c, * src/spicelib/devices/mes/mesdset.c, * src/spicelib/devices/mes/mesgetic.c, * src/spicelib/devices/mes/mesload.c, * src/spicelib/devices/mes/mesnoise.c, * src/spicelib/devices/mes/mespzld.c, * src/spicelib/devices/mes/messetup.c, * src/spicelib/devices/mes/mestrunc.c, * src/spicelib/devices/mesa/mesaacl.c, * src/spicelib/devices/mesa/mesadefs.h, * src/spicelib/devices/mesa/mesagetic.c, * src/spicelib/devices/mesa/mesaload.c, * src/spicelib/devices/mesa/mesapzl.c, * src/spicelib/devices/mesa/mesasetup.c, * src/spicelib/devices/mesa/mesatemp.c, * src/spicelib/devices/mesa/mesatrunc.c, * src/spicelib/devices/mos1/mos1acld.c, * src/spicelib/devices/mos1/mos1conv.c, * src/spicelib/devices/mos1/mos1defs.h, * src/spicelib/devices/mos1/mos1dist.c, * src/spicelib/devices/mos1/mos1dset.c, * src/spicelib/devices/mos1/mos1ic.c, * src/spicelib/devices/mos1/mos1load.c, * src/spicelib/devices/mos1/mos1noi.c, * src/spicelib/devices/mos1/mos1pzld.c, * src/spicelib/devices/mos1/mos1sacl.c, * src/spicelib/devices/mos1/mos1set.c, * src/spicelib/devices/mos1/mos1sld.c, * src/spicelib/devices/mos1/mos1sprt.c, * src/spicelib/devices/mos1/mos1sset.c, * src/spicelib/devices/mos1/mos1supd.c, * src/spicelib/devices/mos1/mos1temp.c, * src/spicelib/devices/mos1/mos1trun.c, * src/spicelib/devices/mos2/mos2acld.c, * src/spicelib/devices/mos2/mos2conv.c, * src/spicelib/devices/mos2/mos2defs.h, * src/spicelib/devices/mos2/mos2dist.c, * src/spicelib/devices/mos2/mos2dset.c, * src/spicelib/devices/mos2/mos2ic.c, * src/spicelib/devices/mos2/mos2load.c, * src/spicelib/devices/mos2/mos2noi.c, * src/spicelib/devices/mos2/mos2pzld.c, * src/spicelib/devices/mos2/mos2sacl.c, * src/spicelib/devices/mos2/mos2set.c, * src/spicelib/devices/mos2/mos2sld.c, * src/spicelib/devices/mos2/mos2sprt.c, * src/spicelib/devices/mos2/mos2sset.c, * src/spicelib/devices/mos2/mos2supd.c, * src/spicelib/devices/mos2/mos2temp.c, * src/spicelib/devices/mos2/mos2trun.c, * src/spicelib/devices/mos3/mos3acld.c, * src/spicelib/devices/mos3/mos3conv.c, * src/spicelib/devices/mos3/mos3defs.h, * src/spicelib/devices/mos3/mos3dist.c, * src/spicelib/devices/mos3/mos3dset.c, * src/spicelib/devices/mos3/mos3ic.c, * src/spicelib/devices/mos3/mos3load.c, * src/spicelib/devices/mos3/mos3noi.c, * src/spicelib/devices/mos3/mos3pzld.c, * src/spicelib/devices/mos3/mos3sacl.c, * src/spicelib/devices/mos3/mos3set.c, * src/spicelib/devices/mos3/mos3sld.c, * src/spicelib/devices/mos3/mos3sprt.c, * src/spicelib/devices/mos3/mos3sset.c, * src/spicelib/devices/mos3/mos3supd.c, * src/spicelib/devices/mos3/mos3temp.c, * src/spicelib/devices/mos3/mos3trun.c, * src/spicelib/devices/mos6/mos6conv.c, * src/spicelib/devices/mos6/mos6defs.h, * src/spicelib/devices/mos6/mos6ic.c, * src/spicelib/devices/mos6/mos6load.c, * src/spicelib/devices/mos6/mos6set.c, * src/spicelib/devices/mos6/mos6temp.c, * src/spicelib/devices/mos6/mos6trun.c, * src/spicelib/devices/mos9/mos9acld.c, * src/spicelib/devices/mos9/mos9conv.c, * src/spicelib/devices/mos9/mos9defs.h, * src/spicelib/devices/mos9/mos9dist.c, * src/spicelib/devices/mos9/mos9dset.c, * src/spicelib/devices/mos9/mos9ic.c, * src/spicelib/devices/mos9/mos9load.c, * src/spicelib/devices/mos9/mos9noi.c, * src/spicelib/devices/mos9/mos9pzld.c, * src/spicelib/devices/mos9/mos9sacl.c, * src/spicelib/devices/mos9/mos9set.c, * src/spicelib/devices/mos9/mos9sld.c, * src/spicelib/devices/mos9/mos9sprt.c, * src/spicelib/devices/mos9/mos9sset.c, * src/spicelib/devices/mos9/mos9supd.c, * src/spicelib/devices/mos9/mos9temp.c, * src/spicelib/devices/mos9/mos9trun.c, * src/spicelib/devices/nbjt/nbjtacld.c, * src/spicelib/devices/nbjt/nbjtdefs.h, * src/spicelib/devices/nbjt/nbjtdump.c, * src/spicelib/devices/nbjt/nbjtload.c, * src/spicelib/devices/nbjt/nbjtpzld.c, * src/spicelib/devices/nbjt/nbjtset.c, * src/spicelib/devices/nbjt/nbjttemp.c, * src/spicelib/devices/nbjt/nbjttrun.c, * src/spicelib/devices/nbjt2/nbjt2def.h, * src/spicelib/devices/nbjt2/nbt2acld.c, * src/spicelib/devices/nbjt2/nbt2dump.c, * src/spicelib/devices/nbjt2/nbt2load.c, * src/spicelib/devices/nbjt2/nbt2pzld.c, * src/spicelib/devices/nbjt2/nbt2set.c, * src/spicelib/devices/nbjt2/nbt2temp.c, * src/spicelib/devices/nbjt2/nbt2trun.c, * src/spicelib/devices/ndev/ndevaccept.c, * src/spicelib/devices/ndev/ndevdefs.h, * src/spicelib/devices/ndev/ndevload.c, * src/spicelib/devices/numd/numdacld.c, * src/spicelib/devices/numd/numddefs.h, * src/spicelib/devices/numd/numddump.c, * src/spicelib/devices/numd/numdload.c, * src/spicelib/devices/numd/numdpzld.c, * src/spicelib/devices/numd/numdset.c, * src/spicelib/devices/numd/numdtemp.c, * src/spicelib/devices/numd/numdtrun.c, * src/spicelib/devices/numd2/nud2acld.c, * src/spicelib/devices/numd2/nud2dump.c, * src/spicelib/devices/numd2/nud2load.c, * src/spicelib/devices/numd2/nud2pzld.c, * src/spicelib/devices/numd2/nud2set.c, * src/spicelib/devices/numd2/nud2temp.c, * src/spicelib/devices/numd2/nud2trun.c, * src/spicelib/devices/numd2/numd2def.h, * src/spicelib/devices/numos/nummacld.c, * src/spicelib/devices/numos/nummdump.c, * src/spicelib/devices/numos/nummload.c, * src/spicelib/devices/numos/nummpzld.c, * src/spicelib/devices/numos/nummset.c, * src/spicelib/devices/numos/nummtemp.c, * src/spicelib/devices/numos/nummtrun.c, * src/spicelib/devices/numos/numosdef.h, * src/spicelib/devices/res/resdefs.h, * src/spicelib/devices/res/resload.c, * src/spicelib/devices/res/resnoise.c, * src/spicelib/devices/res/respzld.c, * src/spicelib/devices/res/ressacl.c, * src/spicelib/devices/res/ressload.c, * src/spicelib/devices/res/ressprt.c, * src/spicelib/devices/res/ressset.c, * src/spicelib/devices/res/restemp.c, * src/spicelib/devices/soi3/soi3acld.c, * src/spicelib/devices/soi3/soi3conv.c, * src/spicelib/devices/soi3/soi3defs.h, * src/spicelib/devices/soi3/soi3ic.c, * src/spicelib/devices/soi3/soi3load.c, * src/spicelib/devices/soi3/soi3nois.c, * src/spicelib/devices/soi3/soi3set.c, * src/spicelib/devices/soi3/soi3temp.c, * src/spicelib/devices/soi3/soi3trun.c, * src/spicelib/devices/sw/swacload.c, * src/spicelib/devices/sw/swdefs.h, * src/spicelib/devices/sw/swload.c, * src/spicelib/devices/sw/swnoise.c, * src/spicelib/devices/sw/swpzload.c, * src/spicelib/devices/sw/swsetup.c, * src/spicelib/devices/tra/traacct.c, * src/spicelib/devices/tra/traacld.c, * src/spicelib/devices/tra/tradefs.h, * src/spicelib/devices/tra/traload.c, * src/spicelib/devices/tra/tratemp.c, * src/spicelib/devices/tra/tratrunc.c, * src/spicelib/devices/txl/txldefs.h, * src/spicelib/devices/urc/urcdefs.h, * src/spicelib/devices/urc/urcsetup.c, * src/spicelib/devices/vbic/vbicacld.c, * src/spicelib/devices/vbic/vbicconv.c, * src/spicelib/devices/vbic/vbicdefs.h, * src/spicelib/devices/vbic/vbicgetic.c, * src/spicelib/devices/vbic/vbicload.c, * src/spicelib/devices/vbic/vbicnoise.c, * src/spicelib/devices/vbic/vbicpzld.c, * src/spicelib/devices/vbic/vbicsetup.c, * src/spicelib/devices/vbic/vbictemp.c, * src/spicelib/devices/vbic/vbictrunc.c, * src/spicelib/devices/vccs/vccsdefs.h, * src/spicelib/devices/vccs/vccsload.c, * src/spicelib/devices/vccs/vccspzld.c, * src/spicelib/devices/vccs/vccssacl.c, * src/spicelib/devices/vccs/vccssld.c, * src/spicelib/devices/vccs/vccssprt.c, * src/spicelib/devices/vccs/vccssset.c, * src/spicelib/devices/vcvs/vcvsdefs.h, * src/spicelib/devices/vcvs/vcvsload.c, * src/spicelib/devices/vcvs/vcvspzld.c, * src/spicelib/devices/vcvs/vcvssacl.c, * src/spicelib/devices/vcvs/vcvssld.c, * src/spicelib/devices/vcvs/vcvssprt.c, * src/spicelib/devices/vcvs/vcvssset.c, * src/spicelib/devices/vsrc/vsrcacld.c, * src/spicelib/devices/vsrc/vsrcdefs.h, * src/spicelib/devices/vsrc/vsrcload.c, * src/spicelib/devices/vsrc/vsrcpzld.c, * src/spicelib/devices/vsrc/vsrctemp.c, * src/spicelib/parser/sperror.c, * src/tclspice.c, * visualc/vngspice.vcproj: removed ancient PARALLEL_ARCH feature removed variables ARCHme ARCHsize removed functions SMPcombine() SMPcCombine() CKTpartition() removed files spcombin.c cktpartn.c removed struct slots STATcombineTime STATtranCombTime STATacCombTime GENowner owner 2012-10-22 Francesco Lannutti * src/spicelib/devices/bsim4/b4acld.c, * src/spicelib/devices/bsim4/b4cvtest.c, * src/spicelib/devices/bsim4/b4getic.c, * src/spicelib/devices/bsim4/b4ld.c, * src/spicelib/devices/bsim4/b4pzld.c, * src/spicelib/devices/bsim4/b4temp.c, * src/spicelib/devices/bsim4v4/b4v4acld.c, * src/spicelib/devices/bsim4v4/b4v4getic.c, * src/spicelib/devices/bsim4v4/b4v4ld.c, * src/spicelib/devices/bsim4v4/b4v4pzld.c, * src/spicelib/devices/bsim4v4/b4v4temp.c, * src/spicelib/devices/bsim4v5/b4v5acld.c, * src/spicelib/devices/bsim4v5/b4v5getic.c, * src/spicelib/devices/bsim4v5/b4v5ld.c, * src/spicelib/devices/bsim4v5/b4v5pzld.c, * src/spicelib/devices/bsim4v5/b4v5temp.c, * src/spicelib/devices/bsim4v6/b4v6acld.c, * src/spicelib/devices/bsim4v6/b4v6cvtest.c, * src/spicelib/devices/bsim4v6/b4v6getic.c, * src/spicelib/devices/bsim4v6/b4v6ld.c, * src/spicelib/devices/bsim4v6/b4v6pzld.c, * src/spicelib/devices/bsim4v6/b4v6temp.c: white space changes 2012-10-22 Francesco Lannutti * src/spicelib/devices/bsim3v1/ChangeLog, * src/spicelib/devices/bsim4v4/ChangeLog: bsim3v1/ChangeLog, bsim4v4/ChangeLog: cleanup 2012-10-21 h_vogt * examples/xspice/xspice_c1.cir: example input file as cited in manual 2012-10-20 rlar * ChangeLog, * src/frontend/inpcom.c, * src/maths/misc/randnumb.c, * src/spicelib/devices/bsim3soi/BsimTerms_use, * src/spicelib/devices/bsim3soi_dd/BsimTerms_use, * src/spicelib/devices/bsim3soi_fd/BsimTerms_use, * src/spicelib/devices/bsim3soi_pd/BsimTerms_use, * src/spicelib/devices/cpl/cplsetup.c, * src/spicelib/devices/isrc/isrcacct.c, * src/spicelib/devices/vsrc/vsrcacct.c: use utf-8 encoding 2012-10-20 rlar * INSTALL, * contrib/mslib/COPYING, * contrib/mslib/libprm_readme, * contrib/mslib/mslib_readme, * contrib/scripts/COPYING, * contrib/scripts/libprm_readme, * examples/Monte_Carlo/OpWien.sp, * examples/control_structs/s-param.cir, * examples/measure/simple-meas-tran.sp, * src/spice.def: missing newline at end of file 2012-10-20 rlar * src/xspice/examples/rca3040.in, * src/xspice/examples/rtlinv.in: Changed line-ending from DOS to UNIX 2012-10-17 h_vogt * src/frontend/inpcom.c: inpcom.c: require parentheses in ternary functions if numparam parser is involved (no B sources) 2012-10-17 rlar * src/frontend/postcoms.c: com_print(), fix a memory leak 2012-10-17 rlar * src/spicelib/analysis/dctrcurv.c: DCtrCurv(), fix a memory leak 2012-10-17 rlar * src/frontend/parse.c: mkfnode(), fix a memory leak 2012-10-15 rlar * src/frontend/postcoms.c: com_write(), com_write_sparam(), fix a big memory leak 2012-10-15 h_vogt * src/frontend/fourier.c: fourier.c: rename stored vectors 2012-10-15 h_vogt * src/frontend/inpcom.c: inpcom.c: plug small memory leak 2012-10-13 rlar * src/frontend/vectors.c: vector.c, rewrite vec_basename(), FIXME ! This rewritten code is functionally equivalent to the previous code, yet the result is queer, because the char *v_name slot of struct dvec is read beyond its terminating '\0' Is there indeed some code in ngspice which creates v_name strings with an embedded '\0' ? 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, rewrite 2012-10-13 h_vogt * src/frontend/fourier.c: fourier.c: output also to vector feature request tracker no. 3575841 2012-10-13 rlar * src/frontend/fourier.c: fourier.c: remove even more memory leaks 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, use strchr() in favour of strstr() 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, inp_fix_ternary_operator_str(), use copy_substring() 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, inp_fix_ternary_operator_str(), rewrite 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, get_instance_subckt(), more carefull when there is trailing whitespace 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, get_instance_subckt(), rewrite 2012-10-13 h_vogt * src/frontend/fourier.c: fourier.c: remove memory leaks 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, make use of copy_substring() 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, rewrite 2012-10-13 rlar * src/frontend/inpcom.c: inpcom.c, bug fix in inp_get_subckt_name() 2012-10-12 rlar * src/frontend/inpcom.c: inpcom.c, rewrite 2012-10-12 rlar * src/frontend/inpcom.c: inpcom.c, rewrite 2012-10-12 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2012-10-11 rlar * src/frontend/inpcom.c: inpcom.c, fix a bug which was introduced in commit skip-ws, #5/6, unify macro versions, obj not invariant where the SKIP.*back.* macros have been unified FIXME, the check for `\0' in the backwards direction if of course nonsense. These backward functions either shall not check it at all (being optimistic), or they shell check against a start of string pointer. 2012-10-10 rlar * src/frontend/inpcom.c: inpcom.c, cleanup 2012-10-09 h_vogt * examples/measure/simple-meas-tran.sp, * src/frontend/plotting/gnuplot.c: gnuplot.c: improve scaling of y axis 2012-10-08 rlar * src/frontend/inpcom.c: skip_ws(), #2/2, drop macros, obj-invariant 2012-10-08 rlar * src/frontend/inpcom.c: skip_ws(), #1/2, use functions instead of macros 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #6/6, unify macro versions, obj-invariant checked for object file invariance 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #5/6, unify macro versions, obj not invariant 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #4/6, use macros, obj-invariant checked for object file invariance 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #3/6, introduce macros, obj-invariant checked for object file invariance 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #2/6, prepare for rewrite, obj-invariant checked for object file invariance 2012-10-07 rlar * src/frontend/inpcom.c: skip-ws, #1/6, prepare for rewrite, obj-invariant checked for object file invariance 2012-10-07 h_vogt * src/frontend/inpcom.c: inpcom.c: remove cccs from F, ccvs from H source 2012-10-07 h_vogt * src/frontend/inpcom.c: inpcom.c: correct replacement of vccs, vcvs in E, G-sources search for 'par(' instead of 'par' 2012-10-06 rlar * src/frontend/com_fft.c, * src/frontend/parse.c, * src/frontend/parse.h, * src/frontend/spec.c: com_fft(), com_psd(), com_spec(), cleanup storage more thoroughly use free_pnode() instead of free_pnode_o() drop free_pnode_o() 2012-10-06 rlar * src/frontend/misccoms.c: invoke com_remcirc() in com_quit() 2012-10-06 rlar * src/ngnutmeg.c, * src/ngspice.c: cleanup, whitespace 2012-10-06 rlar * src/ngnutmeg.c: cleanup, drop unused macros 2012-10-06 rlar * src/frontend/com_measure2.h, * src/ngnutmeg.c, * src/ngspice.c, * src/spicelib/parser/inp2n.c: cleanup, ngspice/config.h is already in ngspice/ngspice.h, #2/2 2012-10-06 rlar * src/frontend/com_ahelp.c, * src/frontend/com_asciiplot.c, * src/frontend/com_dump.c, * src/frontend/com_echo.c, * src/frontend/com_hardcopy.c, * src/frontend/com_help.c, * src/frontend/com_measure2.c, * src/frontend/com_plot.c, * src/frontend/com_rehash.c, * src/frontend/com_set.c, * src/frontend/com_shell.c, * src/frontend/com_shift.c, * src/frontend/com_state.c, * src/frontend/com_strcmp.c, * src/frontend/com_sysinfo.c, * src/frontend/com_unset.c, * src/frontend/help/help.c, * src/frontend/help/provide.c, * src/frontend/help/readhelp.c, * src/frontend/help/x11disp.c, * src/frontend/help/xdisplay.c, * src/frontend/parser/backq.c, * src/frontend/parser/complete.c, * src/frontend/parser/glob.c, * src/frontend/parser/input.c, * src/frontend/parser/lexical.c, * src/frontend/parser/numparse.c, * src/frontend/parser/std.c, * src/frontend/parser/unixcom.c, * src/frontend/plotting/plotit.c, * src/frontend/resource.c, * src/frontend/streams.c, * src/frontend/terminal.c, * src/frontend/variable.c, * src/maths/poly/interpolate.c, * src/misc/dup2.c, * src/misc/misc_time.c, * src/misc/wlist.c, * src/nghelp.c, * src/ngproc2mod.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/dctran.c, * src/spicelib/devices/cktask.c, * src/spicelib/devices/cktbindnode.c, * src/spicelib/devices/dev.c, * src/spicelib/parser/inppas1.c, * src/spicelib/parser/inppas3.c, * src/spicelib/parser/ptfuncs.c: cleanup, ngspice/config.h is already in ngspice/ngspice.h, #1/2 (easy ones) 2012-10-03 h_vogt * src/frontend/outitf.c, * src/frontend/typesdef.c, * src/include/ngspice/sim.h: outif.c, typesdef.c, sim.h: correct labeling of cap, cur, and charge data 2012-10-03 h_vogt * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3v32/b3v32ld.c, * src/spicelib/devices/bsim4/b4ld.c: b3ld.c, b4ld.c, b3v32ld.c: enable capacitance calculation during dc sweep 2012-10-01 h_vogt * src/spicelib/devices/bsim3v32/b3v32.c: b3v32.c: make additional parameters accessible by @m1[par] 2012-10-01 h_vogt * src/frontend/parser/complete.c: prototype for controlled_exit() 2012-10-01 rlar * src/frontend/postcoms.c: com_write_sparam(), cleanup storage more thoroughly (`wl_sparam') 2012-10-01 rlar * src/frontend/device.c: com_alter_common(), cleanup storage more thoroughly (on error) 2012-10-01 rlar * src/frontend/postcoms.c: com_write(), com_write_sparam(), com_cross(), cleanup storage more thoroughly 2012-10-01 rlar * src/frontend/com_fft.c: com_psd(), cleanup storage more thoroughly (`win') 2012-10-01 rlar * src/frontend/postcoms.c: com_print(), cleanup storage more thoroughly 2012-10-01 rlar * src/frontend/com_compose.c: com_compose(), cleanup storage more thoroughly 2012-10-01 rlar * src/frontend/cpitf.c, * src/frontend/plotting/plotit.c, * src/frontend/postcoms.c: variable rename, unify the source checked for object file invariance 2012-10-01 rlar * src/frontend/postcoms.c: com_print(), com_cross(), use for(;;) loops 2012-09-30 h_vogt * src/spicelib/devices/bsim3/b3.c: bsim3, make additonal parameters accessible with @m[par] 2012-09-30 rlar * src/frontend/define.c: variable rename, unify the source checked for object file invariance 2012-09-30 rlar * src/frontend/fourier.c: fourier(), use for(;;) loops 2012-09-30 rlar * src/frontend/fourier.c: variable rename, unify the source checked for object file invariance 2012-09-30 rlar * src/frontend/fourier.c: bug fix, fourier(), prevent endless loop when processing unexpected vectors 2012-09-30 rlar * src/frontend/com_compose.c: com_compose(), use for(;;) loops 2012-09-30 rlar * src/frontend/com_compose.c: variable rename, unify the source checked for object file invariance 2012-09-30 rlar * src/frontend/spec.c: com_spec(), use for(;;) loops 2012-09-30 rlar * src/frontend/spec.c: variable rename, unify the source checked for object file invariance 2012-09-30 rlar * src/frontend/com_fft.c: com_fft(), com_psd(), use for(;;) loops 2012-09-30 rlar * src/frontend/com_fft.c, * src/frontend/com_let.c: variable rename, unify the source checked for object file invariance 2012-09-30 rlar * src/frontend/inp.c, * src/frontend/parser/complete.c: bug fix, invalid read when the title line is the empty 2012-09-29 dwarning * src/frontend/com_hardcopy.c, * src/frontend/numparam/spicenum.c, * src/frontend/numparam/xpressn.c, * src/frontend/trannoise/1-f-code.c, * src/frontend/trannoise/FastNorm3.c, * src/frontend/trannoise/wallace.c, * src/frontend/variable.c, * src/spicelib/devices/hisim2/hsm2acld.c, * src/spicelib/devices/hisim2/hsm2eval.c, * src/spicelib/devices/hisim2/hsm2ld.c, * src/spicelib/parser/inppas1.c, * src/xspice/evt/evtbackup.c, * src/xspice/evt/evtdeque.c, * src/xspice/evt/evtdump.c, * src/xspice/evt/evtinit.c, * src/xspice/evt/evtiter.c, * src/xspice/evt/evtload.c, * src/xspice/evt/evtnext_time.c, * src/xspice/evt/evtop.c, * src/xspice/evt/evtplot.c, * src/xspice/evt/evtprint.c, * src/xspice/evt/evtqueue.c, * src/xspice/evt/evtsetup.c, * src/xspice/evt/evttermi.c, * src/xspice/mif/mifdelete.c: changed the #include order - ngspice.h must be first because icc complains about declaration visibility of mmsghdr struct 2012-09-29 dwarning * src/spicelib/devices/bjt/bjttemp.c: bjttemp.c: prevent uninitialized variables 2012-09-27 rlar * src/spicelib/analysis/acan.c: polish a very old and unused artifact in WANT_SENSE2 2012-09-27 rlar * src/frontend/parse.c: cleanup db_print_pnode_tree() 2012-09-27 rlar * src/frontend/define.c: bug fix, dvec in a `define' can't be member of any plot 2012-09-27 rlar * src/frontend/vectors.c: bug fix, avoid segfault when the refered plot is still empty 2012-09-26 h_vogt * src/frontend/plotting/grid.c: grid.c: prevent overflow of div_list 2012-09-26 h_vogt * src/spicelib/parser/ifeval.c: ifeval.c: reduce fudge factor for div and atanh 2012-09-26 h_vogt * src/frontend/plotting/plotit.c: grid.c: prevent crash if real low and high values are close 2012-09-26 h_vogt * src/frontend/inp.c, * src/include/ngspice/cktdefs.h, * src/include/ngspice/optdefs.h, * src/include/ngspice/tskdefs.h, * src/spicelib/analysis/acan.c, * src/spicelib/analysis/cktdojob.c, * src/spicelib/analysis/cktntask.c, * src/spicelib/analysis/cktsopt.c: new option noopac, don't do op simulation before ac if circuit is linear May simplify ac simulation of passive RLC networks (No need to add series resistors in Ls, allows to C inseries) 2012-09-25 rlar * src/frontend/misccoms.c: disable some more cleanup code in com_quit() destroy_ivars() is reported to freeze 2012-09-22 rlar * src/frontend/subckt.c: subckt.c, cleanup, use `for' instead of `while' 2012-09-22 rlar * configure.ac: automake 1.12 might need AM_PROG_AR, which is not available in 1.11 2012-09-22 rlar * src/frontend/aspice.c, * src/frontend/breakp.c, * src/frontend/breakp2.c, * src/frontend/circuits.c, * src/frontend/com_ahelp.c, * src/frontend/com_alias.c, * src/frontend/com_asciiplot.c, * src/frontend/com_cdump.c, * src/frontend/com_chdir.c, * src/frontend/com_compose.c, * src/frontend/com_display.c, * src/frontend/com_dl.c, * src/frontend/com_dump.c, * src/frontend/com_gnuplot.c, * src/frontend/com_hardcopy.c, * src/frontend/com_help.c, * src/frontend/com_history.c, * src/frontend/com_let.c, * src/frontend/com_measure2.c, * src/frontend/com_option.c, * src/frontend/com_plot.c, * src/frontend/com_rehash.c, * src/frontend/com_set.c, * src/frontend/com_shell.c, * src/frontend/com_shift.c, * src/frontend/com_state.c, * src/frontend/com_strcmp.c, * src/frontend/com_unset.c, * src/frontend/com_xgraph.c, * src/frontend/control.c, * src/frontend/device.c, * src/frontend/diff.c, * src/frontend/dotcards.c, * src/frontend/error.c, * src/frontend/help/help.c, * src/frontend/help/provide.c, * src/frontend/help/readhelp.c, * src/frontend/help/textdisp.c, * src/frontend/help/x11disp.c, * src/frontend/init.c, * src/frontend/inpcom.c, * src/frontend/interp.c, * src/frontend/inventory.c, * src/frontend/linear.c, * src/frontend/nutinp.c, * src/frontend/parser/complete.c, * src/frontend/parser/cshpar.c, * src/frontend/parser/unixcom.c, * src/frontend/plotting/agraf.c, * src/frontend/plotting/gnuplot.c, * src/frontend/plotting/graf.c, * src/frontend/plotting/grid.c, * src/frontend/plotting/plotcurv.c, * src/frontend/plotting/pvec.c, * src/frontend/plotting/x11.c, * src/frontend/plotting/xgraph.c, * src/frontend/postcoms.c, * src/frontend/quote.c, * src/frontend/rawfile.c, * src/frontend/resource.c, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/frontend/signal_handler.c, * src/frontend/spec.c, * src/frontend/spiceif.c, * src/frontend/subckt.c, * src/frontend/terminal.c, * src/frontend/trannoise/FastNorm3.c, * src/frontend/trannoise/wallace.c, * src/frontend/typesdef.c, * src/frontend/vectors.c: src/frontend/** remove superfluous `return' invocations 2012-09-22 rlar * src/frontend/arg.c, * src/frontend/com_dl.h, * src/frontend/com_dump.c, * src/frontend/com_ghelp.c, * src/frontend/com_history.c, * src/frontend/com_measure2.c, * src/frontend/com_rehash.c, * src/frontend/com_shift.c, * src/frontend/com_strcmp.c, * src/frontend/control.h, * src/frontend/define.h, * src/frontend/help/help.c, * src/frontend/help/provide.c, * src/frontend/help/readhelp.c, * src/frontend/help/textdisp.c, * src/frontend/help/x11disp.c, * src/frontend/help/xdisplay.c, * src/frontend/hpgl.h, * src/frontend/init.c, * src/frontend/interp.c, * src/frontend/inventory.c, * src/frontend/linear.c, * src/frontend/miscvars.c, * src/frontend/numparam/general.h, * src/frontend/postsc.c, * src/frontend/rawfile.c, * src/frontend/runcoms2.c, * src/frontend/spiceif.c: src/frontend/** whitespace, indentation, ... checked for object file invariance on linux 2012-09-22 rlar * src/frontend/misccoms.c: invoke cleanup functions in com_quit() trying to get the valgrind reports down. 2012-09-21 rlar * src/frontend/misccoms.c, * src/main.c, * src/spicelib/devices/dev.c, * src/spicelib/devices/dev.h: free spice_init_devices() allocated memory in com_quit() 2012-09-21 rlar * src/frontend/misccoms.c, * src/frontend/postcoms.c, * src/frontend/postcoms.h: destroy `const' plot in com_quit() 2012-09-21 rlar * src/frontend/postcoms.c: drop a superfluous cast 2012-09-20 dwarning * src/spicelib/devices/dio/dioload.c, * src/spicelib/devices/dio/diosetup.c, * src/spicelib/devices/dio/diotemp.c: correct the diode temperature model 2012-09-20 rlar * src/frontend/dotcards.c, * src/frontend/numparam/xpressn.c: src/frontend/**, whitespace, object files will change, due to __LINE__ usage 2012-09-20 rlar * src/frontend/arg.c, * src/frontend/aspice.c, * src/frontend/breakp.c, * src/frontend/breakp2.c, * src/frontend/circuits.h, * src/frontend/com_ahelp.c, * src/frontend/com_alias.c, * src/frontend/com_cdump.c, * src/frontend/com_chdir.c, * src/frontend/com_compose.c, * src/frontend/com_display.c, * src/frontend/com_dl.c, * src/frontend/com_echo.c, * src/frontend/com_fft.c, * src/frontend/com_gnuplot.c, * src/frontend/com_hardcopy.c, * src/frontend/com_help.c, * src/frontend/com_history.c, * src/frontend/com_let.c, * src/frontend/com_measure2.c, * src/frontend/com_measure2.h, * src/frontend/com_option.c, * src/frontend/com_set.c, * src/frontend/com_setscale.c, * src/frontend/com_shell.c, * src/frontend/com_sysinfo.c, * src/frontend/com_xgraph.c, * src/frontend/commands.c, * src/frontend/control.c, * src/frontend/cpitf.c, * src/frontend/define.c, * src/frontend/device.c, * src/frontend/diff.c, * src/frontend/dimens.c, * src/frontend/dimens.h, * src/frontend/display.c, * src/frontend/dotcards.c, * src/frontend/error.c, * src/frontend/evaluate.c, * src/frontend/evaluate.h, * src/frontend/fourier.c, * src/frontend/ftesopt.c, * src/frontend/gens.c, * src/frontend/hpgl.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/measure.c, * src/frontend/misccoms.c, * src/frontend/newcoms.c, * src/frontend/numparam/general.h, * src/frontend/numparam/mystring.c, * src/frontend/numparam/numpaif.h, * src/frontend/numparam/numparam.h, * src/frontend/numparam/spicenum.c, * src/frontend/numparam/xpressn.c, * src/frontend/nutinp.c, * src/frontend/options.c, * src/frontend/outitf.c, * src/frontend/outitf.h, * src/frontend/parse.c, * src/frontend/parser/backq.c, * src/frontend/parser/backq.h, * src/frontend/parser/complete.c, * src/frontend/parser/complete.h, * src/frontend/parser/cshpar.c, * src/frontend/parser/glob.c, * src/frontend/parser/glob.h, * src/frontend/parser/input.c, * src/frontend/parser/lexical.c, * src/frontend/parser/numparse.c, * src/frontend/parser/numparse.h, * src/frontend/parser/unixcom.c, * src/frontend/parser/unixcom.h, * src/frontend/plotting/agraf.c, * src/frontend/plotting/agraf.h, * src/frontend/plotting/clip.c, * src/frontend/plotting/gnuplot.c, * src/frontend/plotting/gnuplot.h, * src/frontend/plotting/graf.c, * src/frontend/plotting/graf.h, * src/frontend/plotting/graphdb.c, * src/frontend/plotting/graphdb.h, * src/frontend/plotting/grid.c, * src/frontend/plotting/plot5.c, * src/frontend/plotting/plot5.h, * src/frontend/plotting/plotcurv.c, * src/frontend/plotting/plotit.c, * src/frontend/plotting/plotting.c, * src/frontend/plotting/pvec.c, * src/frontend/plotting/x11.c, * src/frontend/plotting/x11.h, * src/frontend/plotting/xgraph.c, * src/frontend/plotting/xgraph.h, * src/frontend/points.c, * src/frontend/postcoms.c, * src/frontend/postsc.c, * src/frontend/quote.c, * src/frontend/rawfile.c, * src/frontend/resource.c, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/frontend/shyu.c, * src/frontend/signal_handler.c, * src/frontend/spec.c, * src/frontend/spec.h, * src/frontend/spiceif.c, * src/frontend/streams.c, * src/frontend/subckt.c, * src/frontend/terminal.c, * src/frontend/testcommands.c, * src/frontend/trannoise/1-f-code.c, * src/frontend/trannoise/1-f-code_d.c, * src/frontend/trannoise/FastNorm3.c, * src/frontend/trannoise/wallace.c, * src/frontend/typesdef.c, * src/frontend/variable.c, * src/frontend/variable.h, * src/frontend/vectors.c, * src/frontend/where.c: src/frontend/**, whitespace, indentation, ... untabify delete-trailing-whitespace braces ... checked for object file invariance on linux 2012-09-19 rlar * src/frontend/control.c, * src/frontend/inp.c, * src/frontend/plotting/clip.c, * src/frontend/plotting/graphdb.c, * src/frontend/plotting/plot5.c, * src/frontend/plotting/x11.c, * src/frontend/rawfile.c, * src/frontend/runcoms2.c, * src/frontend/subckt.c: cleanup some macros, try to be more careful 2012-09-15 rlar * src/frontend/options.c, * src/frontend/variable.c: fix ownership of `cp_promptstring' and `cp_program' 2012-09-14 Francesco Lannutti * configure.ac: configure.ac, silent compilation (enabled by default) using AM_SILENT_RULES([yes]) 2012-09-13 rlar * src/frontend/define.c: define.c, plug a memleak in com_undefine() 2012-09-13 rlar * src/frontend/define.c: define.c, cleanup 2012-09-13 rlar * src/frontend/define.c: define.c, cleanup 2012-09-13 rlar * src/frontend/define.c: define.c, whitespace cleanup 2012-09-13 rlar * src/frontend/define.c: define.c, bug fix, when undefining more than one udfunc 2012-09-13 rlar * src/frontend/device.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/misc/ivars.c, * src/misc/util.c: api change for ngdirname() to fix a memory leak ngdirname did `own' the returned string. now the invoker is responsible for the returned string. note, this is contrary to the POSIX dirname() implementation, which *might* return pointers to statical allocated memory. 2012-09-11 h_vogt * src/xspice/icm/xtradev/lcouple/cfunc.mod: XSPICE lcouple: remove unused cm_analog_integrate 2012-09-10 h_vogt * src/xspice/icm/xtradev/core/cfunc.mod, * src/xspice/icm/xtradev/core/ifspec.ifs: XSPICE core: remove memory leak 2012-09-10 h_vogt * src/xspice/examples/analog_models4_transient.deck, * src/xspice/icm/analog/square/cfunc.mod, * src/xspice/icm/analog/square/ifspec.ifs: XSPICE square: remove memory leak, initialize phase1 2012-09-10 h_vogt * src/xspice/icm/analog/square/cfunc.mod: XSPICE square: indentations 2012-09-09 h_vogt * src/xspice/icm/analog/triangle/cfunc.mod, * src/xspice/icm/analog/triangle/ifspec.ifs: XSPICE triangle: remove memory leak remove initialization error for phase1 FIXME: there are still more initialization errors 2012-09-09 h_vogt * src/xspice/icm/analog/triangle/cfunc.mod: XSPICE triangle: indentations 2012-09-09 h_vogt * src/xspice/icm/analog/oneshot/cfunc.mod, * src/xspice/icm/analog/oneshot/ifspec.ifs: XSPICE oneshot: remove memory leak remove using uninitialzed variable old_clock correct waveform shape by using permanent breakpoints 2012-09-09 h_vogt * src/xspice/icm/analog/oneshot/cfunc.mod: indentations 2012-09-08 h_vogt * src/xspice/icm/analog/sine/cfunc.mod: XSPICE sine: out-of-bounds removed 2012-09-08 h_vogt * src/xspice/examples/analog_models4_transient.deck, * src/xspice/icm/analog/sine/cfunc.mod, * src/xspice/icm/analog/sine/ifspec.ifs: XSPICE sine source: memory leak removed (bug no. 3564166) 2012-09-07 h_vogt * src/spicelib/analysis/cktdest.c: cktdest.c: reset for XSPICE allocated memory (not yet complete) 2012-09-07 h_vogt * src/xspice/icm/analog/file_source/cfunc.mod, * src/xspice/icm/analog/file_source/ifspec.ifs: XSPICE filesource: remove segfault with op before tran 2012-09-02 h_vogt * src/spicelib/analysis/cktload.c: cktload.c, indentations 2012-08-30 h_vogt * src/frontend/inp.c: inp.c: unify syntax of .save and save commands: allow node1 and v(node1), v2#branch and i(v2), @dev[param] 2012-08-27 h_vogt * src/xspice/evt/evtqueue.c: evtqueue.c: plug memory leak 2012-08-27 h_vogt * src/spicelib/devices/res/resask.c: resask.c: avoid segfault if @R[i] is asked before analysis is run 2012-08-26 h_vogt * src/frontend/vectors.c, * src/spicelib/devices/res/resask.c: vectors.c, resask.c: indentation 2012-08-25 h_vogt * src/xspice/icm/digital/d_source/cfunc.mod, * src/xspice/icm/digital/d_source/ifspec.ifs: d_source: Use STATIC_VAR_TABLE to save memory 2012-08-23 rlar * src/frontend/misccoms.c, * src/frontend/parser/complete.c, * src/include/ngspice/cpextern.h: cleanup keyword databases on proram termination 2012-08-23 rlar * src/frontend/inp.c, * src/frontend/nutinp.c: plug a memory leak in inp_spsource/inp_nutsource (deck title string) 2012-08-23 rlar * src/frontend/misccoms.c, * src/main.c, * src/misc/ivars.c, * src/misc/ivars.h: cleanup ivars() related globals on program termination 2012-08-22 h_vogt * src/xspice/icm/digital/d_source/cfunc.mod: d_source: allow multiple instances 2012-08-22 rlar * src/frontend/trannoise/wallace.c: cleanup wallace arrays on program termination 2012-08-20 rlar * src/frontend/display.c: avoid error messages when finally closing the display device. these messages creeped in with commit 2012-08-19 18:58:31 "plug memory leak in x11.c" when the "printf" device Close and Update functions might be invoked on program termination. use the silent "nop" implementation instead of the error reporting "nodev" implementation 2012-08-20 h_vogt * src/xspice/icm/digital/d_source/cfunc.mod: d_source cfunc.mod: plug memory leaks 2012-08-19 h_vogt * src/xspice/icm/digital/d_source/cfunc.mod, * src/xspice/icm/digital/d_source/ifspec.ifs: bug no. 3456221: new d_source model 2012-08-19 rlar * src/xspice/icm/digital/d_source/cfunc.mod: cleanup, white space changes 2012-08-19 rlar * src/frontend/display.c, * src/frontend/misccoms.c, * src/frontend/plotting/x11.c: plug memory leak in x11.c try to obey the Xt toolkit protocol when closing widgets and application 2012-08-19 h_vogt * src/xspice/mif/mifgetvalue.c: mifgetvalue.c: need a copy to allow freeing token 2012-08-19 rlar * src/frontend/inp.c, * src/frontend/terminal.c, * src/include/ngspice/cpextern.h: rewrite inp_list() avoid duplicate code 2012-08-19 rlar * src/tclspice.c: reimplement tcl_vfprintf() 2012-08-19 rlar * src/frontend/terminal.c: bug fix, out_send() erroneously interpreting printf %-style sequences 2012-08-19 rlar * src/tclspice.c: cleanup (checked for code invariance) 2012-08-18 dwarning * src/spicelib/devices/bjt/bjt.c, * src/spicelib/devices/bjt/bjtdefs.h, * src/spicelib/devices/bjt/bjtmask.c, * src/spicelib/devices/bjt/bjtmpar.c, * src/spicelib/devices/bjt/bjtsetup.c, * src/spicelib/devices/bjt/bjttemp.c: part of temperature level=3 model 2012-08-18 rlar * src/include/ngspice/cpextern.h, * src/ngsconvert.c: out_printf() is not supposed to be a preprocessor macro 2012-08-18 h_vogt * src/frontend/subckt.c, * src/xspice/mif/mif_inp2.c: subckt.c, mif_inp2.c: plug XSPICE setup memory leaks 2012-08-18 rlar * src/frontend/inp.c, * src/frontend/plotting/agraf.c, * src/frontend/postcoms.c, * src/frontend/terminal.c, * src/frontend/variable.c, * src/include/ngspice/cpextern.h, * src/ngsconvert.c: drop out_pbuf, which was an ancient workaround obviously an old implementation of out_printf() has been unreliable. 2012-08-18 rlar * src/frontend/postcoms.c: bug fix, print complex yet real valued frequency when printing a complex frequency vector, yet with real value some left over nonsens was printed instead of the actual real value. this bug was introduced in commit: Date: Thu Jan 15 21:08:09 2009 +0000 Improvements in vector derivative computation and new functions to compute group delay and moving average. From espice (A. Roldan). 2012-08-15 h_vogt * src/frontend/subckt.c, * src/xspice/mif/mif_inp2.c: mif_inp2.c, subckt.c: plug memory leaks at XSPICE setup 2012-08-15 rlar * src/frontend/misccoms.c: rewrite com_quit() emphasize user confirmation and if we are going to remove dangling circuits, then do so unconditionally 2012-08-15 rlar * src/frontend/inp.c, * src/frontend/shyu.c, * src/spicelib/analysis/cktntask.c: cleanup (checked for code invariance) 2012-08-14 h_vogt * examples/xspice/delta-sigma/README, * examples/xspice/delta-sigma/count-latch-dac.cir, * examples/xspice/delta-sigma/counter-test.cir, * examples/xspice/delta-sigma/delta-sigma-1.cir, * examples/xspice/delta-sigma/mod1-ct-test.cir, * examples/xspice/delta-sigma/mod1-ct.cir: XSPICE example: delta-sigma converter 2012-08-14 rlar * src/frontend/com_shell.c: plug a memory leak when executing `shell' 2012-08-14 rlar * src/frontend/variable.c: plug a memory leak when (un)setting variables 2012-08-14 rlar * src/frontend/spiceif.c: spiceif.c, cleanup (checked for code invariance) 2012-08-12 rlar * src/frontend/spiceif.c: spiceif.c, cleanup (checked for code invariance) 2012-08-12 rlar * src/frontend/options.c: options.c cleanup 2012-08-12 rlar * src/frontend/options.c: options.c, whitespace 2012-08-12 rlar * src/frontend/options.c: cleanup, if_options() will copy() anyway 2012-08-08 rlar * src/frontend/display.c: display.c, cleanup 2012-08-07 h_vogt * examples/measure/mos-meas-dc-control.sp: demonstrate effect of W crossing binning limits 2012-08-07 rlar * src/frontend/numparam/spicenum.c, * src/main.c, * src/maths/fft/fftext.c, * src/maths/fft/fftlib.c, * src/maths/ni/niiter.c, * src/spicelib/analysis/cktncdump.c, * src/spicelib/devices/bjt/bjtask.c, * src/spicelib/devices/devsup.c, * src/spicelib/devices/mos3/mos3load.c, * src/spicelib/devices/mos9/mos9load.c, * src/tclspice.c, * src/winmain.c: cancer of the semicolon 2012-08-06 rlar * src/frontend/spiceif.c, * src/main.c, * src/misc/string.c, * src/spicelib/devices/asrc/asrcdest.c: swallow warnings 2012-08-06 rlar * src/frontend/measure.c: avoid `meas' syntax error causing segfault Invalid meas crashes ngspice with SIGSEV - ID: 3554330 http://sourceforge.net/tracker/?func=detail&aid=3554330&group_id=38962&atid=423915 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #9/9, whitespace 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #8/9, braces 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #7/9, braces 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #6/9, braces 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #5/9, localize 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #4/9, line wrap 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #3/9, drop some comments 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #2/9, emphasize maximize/minimize 2012-08-04 rlar * src/frontend/plotting/plotit.c: plotit.c #1/9, think positive 2012-08-05 h_vogt * examples/xspice/pll/test-f-p-det.cir: add BSIM3 model parameters for loop filer with transistor charge pump 2012-08-05 h_vogt * examples/measure/mos-meas-dc-control.sp: example, add 'alter @m1[w]=11u' using binning and model change 2012-08-05 h_vogt * src/frontend/com_measure2.c, * src/frontend/measure.c: com_measure2.c: enable 'meas dc' without 'from' and 'to' given measure.c: no error printout during autostop 2012-08-05 rlar * src/frontend/variable.c: cleanup free_struct_variable() 2012-08-05 rlar * src/frontend/variable.c: variable.c, cleanup (mostly whitespace) 2012-08-05 dwarning * src/frontend/device.c, * src/frontend/spiceif.c: correct alter of mos geometries for binned models 2012-08-05 dwarning * examples/xspice/pll/test-f-p-det.cir, * examples/xspice/pll/test_vco.cir: correct the plot output 2012-08-04 rlar * src/frontend/cpitf.c: cp_oddcomm(), plug a memory leak 2012-08-04 h_vogt * src/frontend/inpcom.c, * src/frontend/plotting/plotit.c, * src/frontend/subckt.c, * src/xspice/mif/mif_inp2.c, * src/xspice/mif/mifgetmod.c, * src/xspice/mif/mifgetvalue.c: remove memory leaks 2012-08-04 dwarning * src/spicelib/devices/cktfinddev.c, * src/spicelib/parser/inpgmod.c: indentation 2012-08-04 rlar * src/misc/wlist.c: wlist #3/3, whitespace 2012-08-04 rlar * src/misc/wlist.c: wlist #2/3, cleanup 2012-08-04 rlar * src/misc/wlist.c: wlist #1/3, cleanup 2012-08-04 h_vogt * examples/xspice/pll/pll-xspice-fstep.cir, * examples/xspice/pll/pll-xspice.cir, * examples/xspice/pll/test_vco.cir: pll: just include one of the two vco available (avoid a bug which has been removed only recently) 2012-08-03 h_vogt * examples/xspice/pll/README, * examples/xspice/pll/loop-filter-2.cir, * examples/xspice/pll/loop-filter.cir, * examples/xspice/pll/pll-xspice-fstep.cir, * examples/xspice/pll/pll-xspice.cir, * examples/xspice/pll/test-f-p-det.cir, * examples/xspice/pll/test_vco.cir, * examples/xspice/pll/vco_sub.cir, * examples/xspice/pll/vco_sub_new.cir: update to XSPICE phase-locked loop example 2012-08-03 h_vogt * src/frontend/inpcom.c: inpcom.c: safely uncomment unused subcircuits (top level only) if they contain further nested subcircuits 2012-08-03 rlar * src/include/ngspice/wordlist.h, * src/misc/wlist.c: wlist.c, `const' ness 2012-08-03 rlar * src/frontend/device.c: use wl_find() 2012-08-03 rlar * src/frontend/plotting/plotit.c: cleanup, linewrap 2012-08-03 rlar * src/frontend/inp.c: cleanup, char 0 2012-08-03 rlar * src/frontend/inp.c, * src/frontend/plotting/plotit.c: cleanup, void return 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical, use wl_append_word() 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #6/6, whitespace 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #5/6, cleanup 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #4/6, parentheses and braces 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #3/6, rewrite 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #2/6, linewrap 2012-08-03 rlar * src/frontend/parser/lexical.c: lexical #1/6, cleanup 2012-08-03 h_vogt * src/misc/alloc.c: alloc.c: exlude controlled_exit if not MS Windows not available in some tests in cmaths and executable like ngproc2mod 2012-08-02 rlar * src/frontend/parser/complete.c, * src/frontend/parser/lexical.c: lexical #3/3, collapse append(NULL) into cp_ccom() the sequence orig_wlist = wlist; append(NULL); cp_ccom(wlist, ...); is transformed. expressions to care about in cp_ccom() C1 := (wlist->wl_next != NULL) C2 := (wlist->wl_word != NULL) C3 := wl_length(wlist) D1 := (orig_wlist != NULL) D2 := (orig_wlist->wl_word != NULL) D3 := wl_length(orig_wlist); cases and their significance in cp_ccom(): orig_wlist = NULL; wlist = wl_cons(NULL, NULL); C1 == false D1 == false C2,C3 dont care orig_wlist = wl_cons(E1, wl_cons(E2, ... wl_cons(En, NULL))) wlist = wl_cons(E1, wl_cons(E2, .... wl_cons(En, wl_cons(NULL, NULL)))) C1 == true D1 == true C2 === D2 C3 === D3 + 1 2012-08-02 rlar * src/frontend/parser/lexical.c: lexical #2/3, fix memory leaks 2012-08-02 rlar * src/frontend/parser/lexical.c: lexical #1/3, move append(NULL) invokations into position 2012-08-01 h_vogt * src/misc/alloc.c: undo controlled_exit: not compatible with ancient tests in cmath under LINUX 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #19/19, rewrite 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #18/19, rewrite `cw' won't be looked at, thus the append + removal can be dropped `wl_word' is already NULL 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #17/19, rewrite 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #16/19, transform append --> append(word) 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #15/19, drop `delayed' which is never zero ... 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #14/19, drop `delayed = 0' wherever its effect isn't visible without effect, because we return or will overwrite it anyway 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #13/19, delay `append' delay its execution, until either `wlist' or `cw' will be accessed, or a return or goto nloop is inevitable 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #12/19, use `append' some `assumption' are no longer valid 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #11/19, aproach `append' here 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #10/19, split off `append' from `newword' 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #9/19, aproach the `append' cw has never been NULL here, because we used to survive an update of cw->wl_next here wlist hasn't been NULL either, because there is no place where wlist becomes NULL without setting cw to NULL as well. yet cw isn't NULL (see above) aproach the `append' 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #8/19, express where `wlist' and `cw' start being != NULL 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #7/19, express verbosely where `wlist' and `cw' are NULL 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #6/19, express cp_ccom() property 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #5/19, collapse into `newword' 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #4/19, the `else' can take that job (unconditionally) 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #3/19, attach and instantly remove a NULL wl_word here this modification is faithful iff cw != NULL and cw->wl_next == NULL cw != NULL because we have just survived an update of cw->wl_word cw->wl_next == NULL is witnessed by: 1) cw either NULL or pointing to a wl_cons(,NULL) 2) cw not being modified, and no wl_next being modified 3) check of all function invocations with wlist/cw argument not to modify any wl_next slot which are: 1) cp_ccom(wlist, ...) 2) wl_free() always followed by goto nloop, which does a cw = wl_cons(,NULL) and cp_ccom() doesn't modify any wl_next slot the first part of the patch is intentionally similar to newword `i' and `buf' can be modified here, because we will inevitably `goto done' attach and instantly remove a NULL wl_word here 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #2/19, rewrite the `else if' 2012-07-31 rlar * src/frontend/parser/lexical.c: lexical #1/19, use wl_cons 2012-07-31 rlar * src/frontend/parser/lexical.c: Revert "cleanup, use wl_cons()" This reverts parts of commit 7a7250cdbdbd9f151d15fbe2142bde3a2dd81ca0. There is a cleaner way to rewrite lexical.c 2012-07-31 h_vogt * examples/xspice/pll/README, * examples/xspice/pll/pll-xspice-fstep.cir: pll-xspice-fstep.cir: pll with ref frequency steps 2012-07-31 h_vogt * src/frontend/trannoise/1-f-code.c, * src/misc/alloc.c, * src/spicelib/analysis/cktsens.c, * src/spicelib/devices/txl/txlacct.c, * src/spicelib/devices/txl/txlsetup.c, * src/spicelib/parser/inpgmod.c, * src/spicelib/parser/inpptree.c, * src/xspice/mif/mif_inp2.c: controlled_exit() instead of exit() 2012-07-31 h_vogt * examples/xspice/pll/pll-xspice.cir: pll-xspice.cir: save command added 2012-07-30 h_vogt * src/xspice/evt/evtprint.c: evtprint.c: no node data: error message instead of seg fault 2012-07-30 h_vogt * examples/xspice/pll/pll-xspice.cir: new XSPICE example: use trtol=1 less ripple, but longer simulation time 2012-07-29 h_vogt * examples/xspice/pll/README, * examples/xspice/pll/f-p-det-d-sub.cir, * examples/xspice/pll/loop-filter.cir, * examples/xspice/pll/pll-xspice.cir, * examples/xspice/pll/test-f-p-det.cir, * examples/xspice/pll/test_vco.cir, * examples/xspice/pll/vco_sub.cir: new XSPICE example: mixed mode pll circuit 2012-07-29 rlar * src/frontend/cpitf.c, * src/frontend/plotting/plotit.c, * src/frontend/streams.c, * src/frontend/subckt.c: use wl_delete_slice() 2012-07-29 rlar * src/include/ngspice/wordlist.h, * src/misc/wlist.c: implement wl_delete_slice() 2012-07-29 h_vogt * src/spicelib/analysis/cktdojob.c: variable xtrtol may override the XSPICE reduction of trtol 2012-07-28 rlar * src/frontend/plotting/plotit.c: plotit(), cleanup wordlist processing 2012-07-28 rlar * src/misc/string.c: copy(), allow NULL argument 2012-07-28 rlar * src/frontend/plotting/plotit.c: fix typo in the commit `use wl_find()' 2012-07-28 dwarning * src/spicelib/parser/inpgmod.c: inpgmod.c: correct the range check to prevent overlap 2012-07-28 dwarning * src/spicelib/parser/inpgmod.c, * src/spicelib/parser/inpmkmod.c: indentation 2012-07-28 rlar * src/frontend/com_alias.c, * src/frontend/control.c, * src/frontend/device.c, * src/frontend/plotting/plotit.c, * src/frontend/subckt.c: use wl_find() 2012-07-28 rlar * src/include/ngspice/wordlist.h, * src/misc/wlist.c: implement wl_find() 2012-07-28 rlar * src/frontend/plotting/plotit.c: plotit.c, prepare for usage of wl_find() 2012-07-27 rlar * src/frontend/com_hardcopy.c, * src/frontend/parser/lexical.c: cleanup, use wl_cons() 2012-07-25 h_vogt * src/xspice/enh/enhtrans.c: enhtrans.c: indentations 2012-07-25 h_vogt * src/spicelib/analysis/cktsetup.c: message "OpenMP: %d threads are requested..." removed 2012-07-24 h_vogt * src/xspice/enh/enhtrans.c: enhtrans.c, improved error meassage upon non 'Exxx poly' line bug 2012-07-23 h_vogt * src/frontend/measure.c: measure.c: indentations 2012-07-23 h_vogt * src/frontend/measure.c: measure.c: Update on error message for .meas 2012-07-23 h_vogt * src/frontend/com_measure2.c, * src/frontend/measure.c: measure, error message updated and return(NAN) in case of measure failure test for failure with isnan() 2012-07-23 rlar * src/frontend/plotting/plotit.c: plotit.c, whitespace cleanup 2012-07-22 rlar * src/frontend/streams.c: rewrite using wl_ functions 2012-07-22 rlar * src/frontend/streams.c: bug fix, cp_ioreset(): fclosing an already closed stream causing memory corruption when using `>&' stderr redirection 2012-07-21 h_vogt * src/frontend/inp.c, * src/frontend/inpcom.c, * src/include/ngspice/stringutil.h, * src/misc/string.c: repair broken ternary function in B-Source failed if parameters were included in function. fixed by finding nested parens in gettok_char() 2012-07-21 h_vogt * src/frontend/inpcom.c: table: prevent crashes upon wrong inputs, allow time, temper, hertz as part of device or node name (e.g. Rtime), remove some memory leaks 2012-07-21 rlar * src/frontend/com_alias.c, * src/frontend/control.c: rewrite using wl_ functions this fixed following bug as well: echo "echo abra ; ; echo kadabra" | ngspice -p building a circular list and looping forever 2012-07-21 rlar * src/frontend/subckt.c, * src/include/ngspice/wordlist.h, * src/misc/wlist.c: implement wl_chop() 2012-07-19 h_vogt * src/misc/string.c: gettok_char(), return(NULL) if substring not found 2012-07-19 rlar * src/frontend/cpitf.c, * src/frontend/mw_coms.c: untabify 2012-07-19 rlar * src/frontend/mw_coms.c: mw_coms.c, fix the cleanup using wl_cons() 2012-07-19 rlar * src/frontend/cpitf.c: cpif.c, whitespace, indentation, cleanups 2012-07-19 rlar * src/frontend/cpitf.c: cpitf.c, cleanup using wl_ functions 2012-07-19 rlar * src/frontend/mw_coms.c: mw_comms.c, whitespace, indentation, cleanups 2012-07-19 rlar * src/frontend/mw_coms.c: mw_coms.c, cleanup using wl_cons() 2012-07-15 rlar * src/misc/wlist.c: fix the fix wl_reverse() for empty lists 2012-07-14 rlar * src/frontend/inp.c, * src/frontend/nutinp.c, * src/misc/wlist.c: fix wl_reverse() for empty lists 2012-07-14 rlar * src/misc/wlist.c: comments for wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 rlar * src/frontend/arg.c, * src/frontend/com_history.c, * src/frontend/device.c, * src/frontend/dotcards.c, * src/frontend/help/readhelp.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/measure.c, * src/frontend/nutinp.c, * src/frontend/parser/backq.c, * src/frontend/parser/complete.c, * src/frontend/parser/glob.c, * src/frontend/parser/lexical.c, * src/frontend/plotting/plotit.c, * src/frontend/rawfile.c, * src/frontend/runcoms.c, * src/frontend/subckt.c, * src/frontend/variable.c, * src/misc/wlist.c: cleanup, use wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 rlar * src/include/ngspice/wordlist.h, * src/misc/wlist.c: implement wl_cons(), wl_append_word() and wl_chop_rest() 2012-07-14 h_vogt * src/main.c: remove second call to tmpfile() 2012-07-12 rlar * src/frontend/device.c: bug fix, missing update of a wordlist's wl_prev pointer 2012-07-12 rlar * src/frontend/parser/complete.c: bug fix, incorrect update of a wordlist's wl_prev pointer 2012-07-11 h_vogt * src/xspice/evt/evtprint.c: printf() ---> out_printf(): allow output redirection into file 2012-07-07 rlar * src/spicelib/parser/inp.h, * src/spicelib/parser/inp2u.c, * src/spicelib/parser/inppas2.c: emphasize the adms3 `U' device hijack 2012-07-07 rlar * configure.ac, * src/Makefile.am: don't mess with libtools --enable-static / --enable-shared tie libspice to -shared ngspice et al to -static and use $(STATIC) elsewhere which is governed by configure.ac 2012-07-07 rlar * src/ciderlib/input/Makefile.am, * src/ciderlib/oned/Makefile.am, * src/ciderlib/support/Makefile.am, * src/ciderlib/twod/Makefile.am, * src/frontend/Makefile.am, * src/frontend/help/Makefile.am, * src/frontend/numparam/Makefile.am, * src/frontend/parser/Makefile.am, * src/frontend/plotting/Makefile.am, * src/frontend/trannoise/Makefile.am, * src/frontend/wdisp/Makefile.am, * src/maths/cmaths/Makefile.am, * src/maths/deriv/Makefile.am, * src/maths/fft/Makefile.am, * src/maths/misc/Makefile.am, * src/maths/ni/Makefile.am, * src/maths/poly/Makefile.am, * src/maths/sparse/Makefile.am, * src/misc/Makefile.am, * src/spicelib/analysis/Makefile.am, * src/spicelib/devices/Makefile.am, * src/spicelib/devices/adms/admst/ngspice.xml, * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml, * src/spicelib/devices/asrc/Makefile.am, * src/spicelib/devices/bjt/Makefile.am, * src/spicelib/devices/bsim1/Makefile.am, * src/spicelib/devices/bsim2/Makefile.am, * src/spicelib/devices/bsim3/Makefile.am, * src/spicelib/devices/bsim3soi/Makefile.am, * src/spicelib/devices/bsim3soi_dd/Makefile.am, * src/spicelib/devices/bsim3soi_fd/Makefile.am, * src/spicelib/devices/bsim3soi_pd/Makefile.am, * src/spicelib/devices/bsim3v0/Makefile.am, * src/spicelib/devices/bsim3v1/Makefile.am, * src/spicelib/devices/bsim3v32/Makefile.am, * src/spicelib/devices/bsim4/Makefile.am, * src/spicelib/devices/bsim4v4/Makefile.am, * src/spicelib/devices/bsim4v5/Makefile.am, * src/spicelib/devices/bsim4v6/Makefile.am, * src/spicelib/devices/cap/Makefile.am, * src/spicelib/devices/cccs/Makefile.am, * src/spicelib/devices/ccvs/Makefile.am, * src/spicelib/devices/cpl/Makefile.am, * src/spicelib/devices/csw/Makefile.am, * src/spicelib/devices/dio/Makefile.am, * src/spicelib/devices/hfet1/Makefile.am, * src/spicelib/devices/hfet2/Makefile.am, * src/spicelib/devices/hisim2/Makefile.am, * src/spicelib/devices/hisimhv/Makefile.am, * src/spicelib/devices/ind/Makefile.am, * src/spicelib/devices/isrc/Makefile.am, * src/spicelib/devices/jfet/Makefile.am, * src/spicelib/devices/jfet2/Makefile.am, * src/spicelib/devices/ltra/Makefile.am, * src/spicelib/devices/mes/Makefile.am, * src/spicelib/devices/mesa/Makefile.am, * src/spicelib/devices/mos1/Makefile.am, * src/spicelib/devices/mos2/Makefile.am, * src/spicelib/devices/mos3/Makefile.am, * src/spicelib/devices/mos6/Makefile.am, * src/spicelib/devices/mos9/Makefile.am, * src/spicelib/devices/nbjt/Makefile.am, * src/spicelib/devices/nbjt2/Makefile.am, * src/spicelib/devices/ndev/Makefile.am, * src/spicelib/devices/numd/Makefile.am, * src/spicelib/devices/numd2/Makefile.am, * src/spicelib/devices/numos/Makefile.am, * src/spicelib/devices/res/Makefile.am, * src/spicelib/devices/soi3/Makefile.am, * src/spicelib/devices/sw/Makefile.am, * src/spicelib/devices/tra/Makefile.am, * src/spicelib/devices/txl/Makefile.am, * src/spicelib/devices/urc/Makefile.am, * src/spicelib/devices/vbic/Makefile.am, * src/spicelib/devices/vccs/Makefile.am, * src/spicelib/devices/vcvs/Makefile.am, * src/spicelib/devices/vsrc/Makefile.am, * src/spicelib/parser/Makefile.am, * src/xspice/cm/Makefile.am, * src/xspice/enh/Makefile.am, * src/xspice/evt/Makefile.am, * src/xspice/idn/Makefile.am, * src/xspice/ipc/Makefile.am, * src/xspice/mif/Makefile.am: introduce AM_CFLAGS = $(STATIC) 2012-07-07 h_vogt * src/maths/sparse/spfactor.c: spfactor.c, indentations 2012-07-07 h_vogt * src/main.c: Adding TD to the fopen() is sufficient in MS Windows to reliably unlink the temporary file 2012-07-04 dwarning * src/spicelib/devices/dio/dioload.c: no double count of area for capacitances 2012-07-04 dwarning * src/spicelib/devices/dio/dio.c, * src/spicelib/devices/dio/dioacld.c, * src/spicelib/devices/dio/dioask.c, * src/spicelib/devices/dio/diodefs.h, * src/spicelib/devices/dio/dioload.c, * src/spicelib/devices/dio/diomask.c, * src/spicelib/devices/dio/diompar.c, * src/spicelib/devices/dio/dioparam.c, * src/spicelib/devices/dio/diopzld.c, * src/spicelib/devices/dio/diosetup.c, * src/spicelib/devices/dio/diotemp.c: new scalable diode model including tunnel component 2012-07-03 h_vogt * src/main.c: tmpfile() on MS Windows create temporary files with Microsoft specific fopen() flags "TD" and (propably redundant) remove them with an atexit() handler see bug report #3535348 "sp*.tmp file created, but not deleted when Windows UAC is en" https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3535348&group_id=38962 2012-06-28 h_vogt * src/include/ngspice/ngspice.h: Visual Studio: isatty --> _isatty 2012-06-26 h_vogt * src/frontend/com_measure2.c: measure_at(), allow real valued data for meas ac 2012-06-26 h_vogt * src/frontend/inpcom.c: no exchange of ' ' by { } inside .control section 2012-06-25 h_vogt * src/main.c: correct usage of `unlink()' error return value -1 2012-06-25 dwarning * src/spicelib/devices/dio/dioload.c, * src/spicelib/devices/dio/diosetup.c: dioload.c, diosetup.c, correct knee current parameter defaults 2012-06-25 dwarning * src/spicelib/devices/dio/dioload.c: dio/dioload.c, whitespace change 2012-06-22 rlar * configure.ac: configure.ac, unify `x' escape of `test' expressions 2012-06-22 rlar * configure.ac: configure.ac, robustness unify and honor some hints from (info "(autoconf) Limitations of Builtins") use shell || and && instead of test -o and test -a ! test a = b --> test a != b dont use () drop eval missing quotes 2012-06-21 rlar * configure.ac: configure.ac, use AS_HELP_STRING 2012-06-21 rlar * configure.ac: configure.ac, cleanup 2012-06-21 rlar * configure.ac: configure.ac, comment style, (dnl -> #) 2012-06-21 rlar * configure.ac: configure.ac, whitespace cleanup 2012-06-21 rlar * autogen.sh: bug fix, first run libtoolize then aclocal reported by Joseph Trebbien on [Ngspice-devel] Build error "required file `./ltmain.sh' not found" 2012-06-16 rlar * src/spicelib/devices/ltra/ltrapar.c, * src/spicelib/devices/tra/traparam.c: bug fix, ltra and tra, (initial conditions) reported in https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3535544&group_id=38962 bug was introduced in this commit: Date: Wed Dec 31 17:02:46 2003 +0000 Cleaned up LTRA, TRA and URC code and updated DEVICES file. 2012-06-15 dwarning * src/spicelib/analysis/cktsetup.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/bsim3def.h, * src/spicelib/devices/bsim3soi/b4soidef.h, * src/spicelib/devices/bsim3soi/b4soiset.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4/bsim4def.h, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/bsim4v6def.h: call omp_set_num_threads once in central place instead in model routines 2012-06-15 dwarning * configure.ac: mv ext_CFLAGS on the end for overwriting existing CFLAGS 2012-06-12 rlar * src/xspice/icm/GNUmakefile.in, * src/xspice/icm/makedefs.in: xpsice, use the CFLAGS when linking .cm code models 2012-06-13 dwarning * src/spicelib/devices/bsim3/b3dest.c, * src/spicelib/devices/bsim3/b3ld.c, * src/spicelib/devices/bsim3/b3set.c, * src/spicelib/devices/bsim3/bsim3def.h, * src/spicelib/devices/bsim3soi/b4soidef.h, * src/spicelib/devices/bsim3soi/b4soild.c, * src/spicelib/devices/bsim3soi/b4soiset.c, * src/spicelib/devices/bsim4/b4dest.c, * src/spicelib/devices/bsim4/b4ld.c, * src/spicelib/devices/bsim4/b4set.c, * src/spicelib/devices/bsim4/bsim4def.h, * src/spicelib/devices/bsim4v6/b4v6dest.c, * src/spicelib/devices/bsim4v6/b4v6ld.c, * src/spicelib/devices/bsim4v6/b4v6set.c, * src/spicelib/devices/bsim4v6/bsim4v6def.h: use unified macro USE_OMP and nthreads is set in setup once - not in load as clause 2012-06-11 h_vogt * examples/memristor/memristor_x.sp: memristor example, parameters changed 2012-06-09 h_vogt * examples/memristor/memristor_x.sp, * src/xspice/icm/xtradev/memristor/cfunc.mod: add ac and dc simulation to memristor model 2012-06-13 h_vogt * examples/memristor/memristor_x.sp, * src/xspice/icm/xtradev/memristor/cfunc.mod, * src/xspice/icm/xtradev/memristor/ifspec.ifs, * src/xspice/icm/xtradev/modpath.lst: memristor code model in extradev 2012-06-08 h_vogt * src/spicelib/devices/bsim3v1/b3v1ld.c, * src/spicelib/devices/mos6/mos6load.c: FABS() --> fabs() 2012-06-05 h_vogt * src/spicelib/parser/ptfuncs.c: In B source the argument to 'log' may be 0 upon start of simulation, allow recovery like in function 'ln' 2012-06-05 h_vogt * src/include/ngspice/inpptree.h, * src/spicelib/parser/ifeval.c, * src/spicelib/parser/inpptree.c: enable B source debugging in behavioral models, exit on error if variable strict_errorhandling is set 2012-06-05 h_vogt * examples/memristor/memristor.sp: memristor subcircuit model example 2012-05-30 rlar * configure.ac: configure.ac, rewrite M4 Quotation (non zero diff) small differences in the autogen.sh generated files 2012-05-30 rlar * configure.ac: configure.ac, rewrite M4 Quotation verified for zero diff of the autogen.sh generated files 2012-05-28 rlar * configure.ac: configure.ac, use AC_OPENMP 2012-05-27 h_vogt * visualc/vngspice.vcproj: Visual Studio, increase Stack for 64 bits from standard (0) to StackReserveSize="4194304" StackCommitSize="16384" 2012-05-27 h_vogt * src/frontend/commands.c, * src/frontend/spiceif.c, * src/frontend/spiceif.h, * src/main.c: commands.c: 'options' equivalent to 'option' and allow 'loadsnap' and 'savesnap' which have been EXPERIMENTAL_CODE so far 2012-05-22 h_vogt * tests/bsim3/ac_sim/op-amp.out, * tests/bsim3/tran_sim/comparator.out, * tests/bsim3/tran_sim/one-shot.out, * tests/xspice/digital/d_ram.out, * tests/xspice/digital/d_source.out, * tests/xspice/digital/d_state.out, * tests/xspice/digital/spinit.in: tests/bsim3, tests/xspice, update output files for comparison 2012-05-22 h_vogt * tests/Makefile.am: tests/Makefile.am: drop tests keep tests only for BSIM3 (old style), BSIM4, BSIMSOI4, HiSIM, HiSIMHV and XSPICE 2012-05-22 h_vogt * .gitignore: .gitignore: new name for local tclspice devel directory under MS Windows 2012-05-21 dwarning * tests/bsim3soi/nmos/reference/dcSweep01.standard, * tests/bsim3soi/nmos/reference/dcSweep02.standard, * tests/bsim3soi/nmos/reference/dcSweep03.standard, * tests/bsim3soi/pmos/reference/dcSweep01.standard, * tests/bsim3soi/pmos/reference/dcSweep02.standard, * tests/bsim3soi/pmos/reference/dcSweep03.standard: bsim3soi aka b4soi, ngspice makes correct dc loops - reference files now have 1.6V 2012-05-21 dwarning * tests/bin/run_cmc_check, * tests/bin/spice.pm: CMC tests, `spice' entry not needed 2012-05-20 dwarning * m4/.cvsignore: remove m4/.cvsignore 2012-05-20 dwarning * tests/bsim3soi/Makefile.am, * tests/bsim3soi/inv_dc.cir, * tests/bsim3soi/inv_dc.out, * tests/bsim3soi/inv_tr.cir, * tests/bsim3soi/inv_tr.out, * tests/bsim3soi/nmos/parameters/nmosParameters, * tests/bsim3soi/nmos/qaSpec, * tests/bsim3soi/nmos/reference/acFreq01.standard, * tests/bsim3soi/nmos/reference/acFreq02.standard, * tests/bsim3soi/nmos/reference/acVd01.standard, * tests/bsim3soi/nmos/reference/acVd02.standard, * tests/bsim3soi/nmos/reference/dcSweep01.standard, * tests/bsim3soi/nmos/reference/dcSweep02.standard, * tests/bsim3soi/nmos/reference/dcSweep03.standard, * tests/bsim3soi/nmos/reference/noise01.standard, * tests/bsim3soi/nmos/reference/noise02.standard, * tests/bsim3soi/nmos/reference/noise03.standard, * tests/bsim3soi/nmos4p3.mod, * tests/bsim3soi/pmos/parameters/pmosParameters, * tests/bsim3soi/pmos/qaSpec, * tests/bsim3soi/pmos/reference/acFreq01.standard, * tests/bsim3soi/pmos/reference/acFreq02.standard, * tests/bsim3soi/pmos/reference/acVd01.standard, * tests/bsim3soi/pmos/reference/acVd02.standard, * tests/bsim3soi/pmos/reference/dcSweep01.standard, * tests/bsim3soi/pmos/reference/dcSweep02.standard, * tests/bsim3soi/pmos/reference/dcSweep03.standard, * tests/bsim3soi/pmos/reference/noise01.standard, * tests/bsim3soi/pmos/reference/noise02.standard, * tests/bsim3soi/pmos/reference/noise03.standard, * tests/bsim3soi/pmos4p3.mod, * tests/bsim3soi/ring51_41.cir, * tests/bsim3soi/ring51_41.out, * tests/bsim3soi/test1.cir, * tests/bsim3soi/test1.out, * tests/bsim3soi/test2.cir, * tests/bsim3soi/test2.out, * tests/bsim3soi/test3.cir, * tests/bsim3soi/test3.out, * tests/bsim3soi/test4.cir, * tests/bsim3soi/test4.out, * tests/bsim3soi/test5.cir, * tests/bsim3soi/test5.out, * tests/bsim3soi/test6.cir, * tests/bsim3soi/test6.out, * tests/bsim3soi/test7.cir, * tests/bsim3soi/test7.out, * tests/bsim3soi/test8.cir, * tests/bsim3soi/test8.out: new QA test for `bsim3soi' aka `b4soi' 2012-05-20 dwarning * src/spicelib/devices/bsim3soi/BsimTerms_use, * src/spicelib/devices/bsim3soi/Makefile.am, * src/spicelib/devices/bsim3soi/b4soi.c, * src/spicelib/devices/bsim3soi/b4soiacld.c, * src/spicelib/devices/bsim3soi/b4soiask.c, * src/spicelib/devices/bsim3soi/b4soicheck.c, * src/spicelib/devices/bsim3soi/b4soicvtest.c, * src/spicelib/devices/bsim3soi/b4soidef.h, * src/spicelib/devices/bsim3soi/b4soidel.c, * src/spicelib/devices/bsim3soi/b4soidest.c, * src/spicelib/devices/bsim3soi/b4soiext.h, * src/spicelib/devices/bsim3soi/b4soigetic.c, * src/spicelib/devices/bsim3soi/b4soiinit.c, * src/spicelib/devices/bsim3soi/b4soiitf.h, * src/spicelib/devices/bsim3soi/b4soild.c, * src/spicelib/devices/bsim3soi/b4soimask.c, * src/spicelib/devices/bsim3soi/b4soimdel.c, * src/spicelib/devices/bsim3soi/b4soimpar.c, * src/spicelib/devices/bsim3soi/b4soinoi.c, * src/spicelib/devices/bsim3soi/b4soipar.c, * src/spicelib/devices/bsim3soi/b4soipzld.c, * src/spicelib/devices/bsim3soi/b4soiset.c, * src/spicelib/devices/bsim3soi/b4soitemp.c, * src/spicelib/devices/bsim3soi/b4soitrunc.c: update `bsim3soi' aka `b4soi' 2012-05-18 rlar * src/frontend/outitf.c: outitf.c, cleanup 2012-05-18 rlar * src/frontend/outitf.c: outitf.c, cleanup cancer of the semicolon 2012-05-18 rlar * src/frontend/outitf.c: outitf.c, cleanup comment 2012-05-18 rlar * src/frontend/outitf.c: outitf.c, cleanup return 2012-05-18 rlar * src/frontend/outitf.c: outitf.c, whitespace 2012-05-17 h_vogt * src/spicelib/parser/inppas3.c: .nodeset all = value added to set all voltage nodes at once 2012-05-17 rlar * src/spicelib/analysis/analysis.c, * src/spicelib/analysis/analysis.h: tiny cleanup 2012-05-17 rlar * src/maths/cmaths/Makefile.am: fix tcl module compilation test programs don't compile when compiling for TCL_MODULE due to redefinition of fprintf() 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, com_quit(), implement exitcode 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, tiny rewrite 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, shrink scope 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, collect byemessage() 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, noask 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, collapse strings 2012-05-17 rlar * src/frontend/help/readhelp.c, * src/frontend/misccoms.c, * src/include/ngspice/ngspice.h: misccoms.c, use strncasecmp() 2012-05-17 rlar * src/frontend/misccoms.c: misccoms.c, indentation and whitespace cleanup 2012-05-12 h_vogt * compile_min.sh: change comments, CVS --> git 2012-05-09 rlar * src/spicelib/devices/adms/hicum2/adms3va/hicum2.va, * src/spicelib/devices/adms/hicum2/admsva/hicum2.va, * src/spicelib/devices/bsim3soi_dd/BsimTerms_use, * src/spicelib/devices/bsim3soi_fd/BsimTerms_use, * src/spicelib/devices/bsim3soi_pd/BsimTerms_use, * src/xspice/examples/hybrid_models1_dc.deck, * src/xspice/examples/initial_conditions.deck, * src/xspice/examples/io_ordering.deck, * src/xspice/examples/io_types.deck, * src/xspice/examples/long_names.deck, * src/xspice/examples/mixed_case.deck, * src/xspice/examples/mixed_io_size.deck, * src/xspice/examples/mixed_mode.deck, * src/xspice/examples/mixed_ref.deck, * src/xspice/examples/mosamp2.in, * src/xspice/examples/mosmem.in, * src/xspice/examples/param_defaults.deck, * src/xspice/examples/param_types.deck, * src/xspice/examples/parsing.deck, * src/xspice/examples/polarity.deck, * src/xspice/examples/schmitt.in, * src/xspice/examples/spice3.deck, * src/xspice/examples/suffixes.deck, * src/xspice/examples/supply_ramping.deck, * src/xspice/examples/user_defined_nodes.deck, * src/xspice/examples/xspice.deck: Changed line ending of several files from DOS to UNIX 2012-05-09 rlar * examples/tclspice/tcl-testbench1/tcl-testbench1.tcl, * examples/tclspice/tcl-testbench2/tcl-testbench2.tcl, * examples/tclspice/tcl-testbench3/tcl-testbench3.tcl, * examples/tclspice/tcl-testbench4/tcl-testbench4.tcl, * examples/tclspice/tcl/test_vectoblt.tcl, * src/frontend/com_dl.c, * src/frontend/com_dl.h, * src/include/ngspice/cm.h, * src/include/ngspice/dllitf.h, * src/include/ngspice/ipc.h, * src/pkgIndex.tcl.in, * src/spicelib/analysis/cluster.c, * src/spicelib/analysis/dcpss.c, * src/spicelib/analysis/pssaskq.c, * src/spicelib/analysis/pssinit.c, * src/spicelib/analysis/psssetp.c, * src/spicelib/devices/cpl/Makefile.am, * src/spicelib/devices/txl/Makefile.am, * src/tclspice.c, * src/xspice/Makefile.am, * src/xspice/README, * src/xspice/cm/Makefile.am, * src/xspice/cm/cm.c, * src/xspice/cm/cmevt.c, * src/xspice/cm/cmexport.c, * src/xspice/cm/cmmeters.c, * src/xspice/cm/cmutil.c, * src/xspice/cmpp/.cvsignore, * src/xspice/cmpp/.gitignore, * src/xspice/cmpp/cmpp.h, * src/xspice/cmpp/ifs_lex.l, * src/xspice/cmpp/ifs_yacc.y, * src/xspice/cmpp/ifs_yacc_y.h, * src/xspice/cmpp/main.c, * src/xspice/cmpp/mod_lex.l, * src/xspice/cmpp/mod_yacc.y, * src/xspice/cmpp/mod_yacc_y.h, * src/xspice/cmpp/pp_ifs.c, * src/xspice/cmpp/pp_lst.c, * src/xspice/cmpp/pp_mod.c, * src/xspice/cmpp/read_ifs.c, * src/xspice/cmpp/util.c, * src/xspice/cmpp/writ_ifs.c, * src/xspice/cmpp/ylwrap, * src/xspice/enh/Makefile.am, * src/xspice/enh/enh.c, * src/xspice/enh/enhtrans.c, * src/xspice/evt/Makefile.am, * src/xspice/evt/evtaccept.c, * src/xspice/evt/evtbackup.c, * src/xspice/evt/evtcall_hybrids.c, * src/xspice/evt/evtdeque.c, * src/xspice/evt/evtdump.c, * src/xspice/evt/evtinit.c, * src/xspice/evt/evtiter.c, * src/xspice/evt/evtload.c, * src/xspice/evt/evtnext_time.c, * src/xspice/evt/evtnode_copy.c, * src/xspice/evt/evtop.c, * src/xspice/evt/evtplot.c, * src/xspice/evt/evtprint.c, * src/xspice/evt/evtqueue.c, * src/xspice/evt/evtsetup.c, * src/xspice/evt/evttermi.c, * src/xspice/examples/analog_models1_ac.deck, * src/xspice/examples/analog_models1_dc.deck, * src/xspice/examples/analog_models1_swept_dc.deck, * src/xspice/examples/analog_models1_transient.deck, * src/xspice/examples/analog_models2_ac.deck, * src/xspice/examples/analog_models2_dc.deck, * src/xspice/examples/analog_models2_swept_dc.deck, * src/xspice/examples/analog_models2_transient.deck, * src/xspice/examples/analog_models3_ac.deck, * src/xspice/examples/analog_models3_dc.deck, * src/xspice/examples/analog_models3_swept_dc.deck, * src/xspice/examples/analog_models3_transient.deck, * src/xspice/examples/analog_models4_ac.deck, * src/xspice/examples/analog_models4_dc.deck, * src/xspice/examples/analog_models4_swept_dc.deck, * src/xspice/examples/analog_models4_transient.deck, * src/xspice/examples/arbitrary_phase.deck, * src/xspice/examples/bad_io.deck, * src/xspice/examples/bad_io_type.deck, * src/xspice/examples/bad_name.deck, * src/xspice/examples/bad_param.deck, * src/xspice/examples/bad_param_type.deck, * src/xspice/examples/d_to_real/Makefile, * src/xspice/examples/d_to_real/cfunc.mod, * src/xspice/examples/d_to_real/ifspec.ifs, * src/xspice/examples/diffpair.in, * src/xspice/examples/digital_invert.deck, * src/xspice/examples/digital_models.deck, * src/xspice/examples/digital_models1.deck, * src/xspice/examples/digital_models2.deck, * src/xspice/examples/digital_models3.deck, * src/xspice/examples/digital_models4.deck, * src/xspice/examples/dot_model_ref.deck, * src/xspice/examples/hybrid_models1_dc.deck, * src/xspice/examples/hybrid_models1_transient.deck, * src/xspice/examples/initial_conditions.deck, * src/xspice/examples/io_ordering.deck, * src/xspice/examples/io_types.deck, * src/xspice/examples/long_names.deck, * src/xspice/examples/mixed_case.deck, * src/xspice/examples/mixed_io_size.deck, * src/xspice/examples/mixed_mode.deck, * src/xspice/examples/mixed_ref.deck, * src/xspice/examples/mosamp2.in, * src/xspice/examples/mosmem.in, * src/xspice/examples/nco/Makefile, * src/xspice/examples/nco/cfunc.mod, * src/xspice/examples/nco/ifspec.ifs, * src/xspice/examples/param_defaults.deck, * src/xspice/examples/param_types.deck, * src/xspice/examples/parsing.deck, * src/xspice/examples/polarity.deck, * src/xspice/examples/print_param_types/Makefile, * src/xspice/examples/print_param_types/cfunc.mod, * src/xspice/examples/print_param_types/ifspec.ifs, * src/xspice/examples/rca3040.in, * src/xspice/examples/real_delay/Makefile, * src/xspice/examples/real_delay/cfunc.mod, * src/xspice/examples/real_delay/ifspec.ifs, * src/xspice/examples/real_gain/Makefile, * src/xspice/examples/real_gain/cfunc.mod, * src/xspice/examples/real_gain/ifspec.ifs, * src/xspice/examples/real_to_v/Makefile, * src/xspice/examples/real_to_v/cfunc.mod, * src/xspice/examples/real_to_v/ifspec.ifs, * src/xspice/examples/rtlinv.in, * src/xspice/examples/schmitt.in, * src/xspice/examples/spice3.deck, * src/xspice/examples/suffixes.deck, * src/xspice/examples/supply_ramping.deck, * src/xspice/examples/user_defined_nodes.deck, * src/xspice/examples/xspice.deck, * src/xspice/idn/Makefile.am, * src/xspice/idn/idndig.c, * src/xspice/ipc/Makefile.am, * src/xspice/ipc/ipc.c, * src/xspice/ipc/ipcaegis.c, * src/xspice/ipc/ipcsockets.c, * src/xspice/ipc/ipcstdio.c, * src/xspice/ipc/ipctiein.c, * src/xspice/mif/Makefile.am, * src/xspice/mif/mif.c, * src/xspice/mif/mif_inp2.c, * src/xspice/mif/mifask.c, * src/xspice/mif/mifconvt.c, * src/xspice/mif/mifdelete.c, * src/xspice/mif/mifdestr.c, * src/xspice/mif/mifgetmod.c, * src/xspice/mif/mifgetvalue.c, * src/xspice/mif/mifload.c, * src/xspice/mif/mifmask.c, * src/xspice/mif/mifmdelete.c, * src/xspice/mif/mifmpara.c, * src/xspice/mif/mifsetup.c, * src/xspice/mif/miftrunc.c, * src/xspice/mif/mifutil.c, * src/xspice/xspice.c: fix file modes 2012-05-06 h_vogt * src/frontend/rawfile.c: Exit with error if file not found: fgets() cannot read from NULL 2012-05-06 rlar * src/spicelib/devices/nbjt/nbjtdump.c, * src/spicelib/devices/nbjt2/nbt2dump.c, * src/spicelib/devices/numd/numddump.c, * src/spicelib/devices/numd2/nud2dump.c, * src/spicelib/devices/numos/nummdump.c: raw_write() always fopen("wb"), even on windows use "\n" line termination 2012-05-06 rlar * src/frontend/rawfile.c: raw_read() always fopen("rb") even on windows, always swallow "\r" 2012-05-06 rlar * src/spicelib/devices/numd/numddump.c: Reverting "NUMDdump(): add binary mode" This reverts commit 40e8f868da564c9c8999729bf53ed4fc748c3783 2012-05-05 rlar * src/frontend/com_measure2.c, * src/frontend/device.c, * src/frontend/display.c, * src/frontend/error.c, * src/frontend/error.h, * src/frontend/hpgl.c, * src/frontend/inp.c, * src/frontend/inpcom.c, * src/frontend/measure.c, * src/frontend/numparam/mystring.c, * src/frontend/numparam/spicenum.c, * src/frontend/numparam/xpressn.c, * src/frontend/plotting/graf.c, * src/frontend/plotting/graphdb.c, * src/frontend/plotting/x11.c, * src/frontend/postsc.c, * src/frontend/spiceif.c, * src/frontend/vectors.c, * src/include/ngspice/fteext.h, * src/spicelib/devices/bsim3soi_dd/b3soiddld.c, * src/spicelib/devices/bsim3soi_fd/b3soifdld.c, * src/spicelib/devices/cktask.c, * src/spicelib/devices/cpl/cplload.c, * src/spicelib/devices/cpl/cplsetup.c, * src/spicelib/devices/txl/txlload.c, * src/spicelib/devices/txl/txlsetup.c, * src/spicelib/parser/inp2q.c, * src/spicelib/parser/inp2u.c, * src/spicelib/parser/inpdomod.c: remove error.h, use fteext.h for controlled_exit() 2012-05-05 rlar * src/frontend/inpcom.c: avoid `ambiguous else' Warning 2012-05-05 dwarning * tests/bsim4/Makefile.am, * tests/bsim4/comprt.cir, * tests/bsim4/comprt.out, * tests/bsim4/gstage.cir, * tests/bsim4/gstage.out, * tests/bsim4/modelcard.nmos, * tests/bsim4/modelcard.pmos, * tests/bsim4/nmos/parameters/nmosParameters, * tests/bsim4/nmos/qaSpec, * tests/bsim4/nmos/reference/acFreq.standard, * tests/bsim4/nmos/reference/acFreq_acnqsmod.standard, * tests/bsim4/nmos/reference/acFreq_capmod.standard, * tests/bsim4/nmos/reference/acFreq_diomod.standard, * tests/bsim4/nmos/reference/acFreq_geomod.standard, * tests/bsim4/nmos/reference/acFreq_igcmod.standard, * tests/bsim4/nmos/reference/acFreq_mobmod.standard, * tests/bsim4/nmos/reference/acFreq_trnqsmod.standard, * tests/bsim4/nmos/reference/acFreq_wpemod.standard, * tests/bsim4/nmos/reference/acFreq_xpart.standard, * tests/bsim4/nmos/reference/acVd.standard, * tests/bsim4/nmos/reference/dcSweep_lw1.standard, * tests/bsim4/nmos/reference/dcSweep_lw1_vb1.standard, * tests/bsim4/nmos/reference/dcSweep_lw1_vb2.standard, * tests/bsim4/nmos/reference/dcSweep_lw2.standard, * tests/bsim4/nmos/reference/dcSweep_lw3.standard, * tests/bsim4/nmos/reference/dcSweep_lw4.standard, * tests/bsim4/nmos/reference/dcSweep_lw5.standard, * tests/bsim4/nmos/reference/dcSweep_lw6.standard, * tests/bsim4/nmos/reference/dcSweep_lw7.standard, * tests/bsim4/nmos/reference/dcSweep_lw8.standard, * tests/bsim4/nmos/reference/dcSweep_lw9.standard, * tests/bsim4/nmos/reference/dcSweep_nrd.standard, * tests/bsim4/nmos/reference/dcSweep_nrs.standard, * tests/bsim4/nmos/reference/dcSweep_sa.standard, * tests/bsim4/nmos/reference/dcSweep_sb.standard, * tests/bsim4/nmos/reference/dcSweep_sca.standard, * tests/bsim4/nmos/reference/dcSweep_scb.standard, * tests/bsim4/nmos/reference/dcSweep_scc.standard, * tests/bsim4/nmos/reference/noise1.standard, * tests/bsim4/nmos/reference/noise2.standard, * tests/bsim4/nmos/reference/noise3.standard, * tests/bsim4/nmos/reference/noise4.standard, * tests/bsim4/nmos/run, * tests/bsim4/oneshot.cir, * tests/bsim4/oneshot.out, * tests/bsim4/opamp.cir, * tests/bsim4/opamp.out, * tests/bsim4/pmos/parameters/pmosParameters, * tests/bsim4/pmos/qaSpec, * tests/bsim4/pmos/reference/acFreq.standard, * tests/bsim4/pmos/reference/acFreq_acnqsmod.standard, * tests/bsim4/pmos/reference/acFreq_capmod.standard, * tests/bsim4/pmos/reference/acFreq_diomod.standard, * tests/bsim4/pmos/reference/acFreq_geomod.standard, * tests/bsim4/pmos/reference/acFreq_igcmod.standard, * tests/bsim4/pmos/reference/acFreq_mobmod.standard, * tests/bsim4/pmos/reference/acFreq_trnqsmod.standard, * tests/bsim4/pmos/reference/acFreq_wpemod.standard, * tests/bsim4/pmos/reference/acFreq_xpart.standard, * tests/bsim4/pmos/reference/acVd.standard, * tests/bsim4/pmos/reference/dcSweep_lw1.standard, * tests/bsim4/pmos/reference/dcSweep_lw1_vb1.standard, * tests/bsim4/pmos/reference/dcSweep_lw1_vb2.standard, * tests/bsim4/pmos/reference/dcSweep_lw2.standard, * tests/bsim4/pmos/reference/dcSweep_lw3.standard, * tests/bsim4/pmos/reference/dcSweep_lw4.standard, * tests/bsim4/pmos/reference/dcSweep_lw5.standard, * tests/bsim4/pmos/reference/dcSweep_lw6.standard, * tests/bsim4/pmos/reference/dcSweep_lw7.standard, * tests/bsim4/pmos/reference/dcSweep_lw8.standard, * tests/bsim4/pmos/reference/dcSweep_lw9.standard, * tests/bsim4/pmos/reference/dcSweep_nrd.standard, * tests/bsim4/pmos/reference/dcSweep_nrs.standard, * tests/bsim4/pmos/reference/dcSweep_sa.standard, * tests/bsim4/pmos/reference/dcSweep_sb.standard, * tests/bsim4/pmos/reference/dcSweep_sca.standard, * tests/bsim4/pmos/reference/dcSweep_scb.standard, * tests/bsim4/pmos/reference/dcSweep_scc.standard, * tests/bsim4/pmos/reference/noise1.standard, * tests/bsim4/pmos/reference/noise2.standard, * tests/bsim4/pmos/reference/noise3.standard, * tests/bsim4/pmos/reference/noise4.standard, * tests/bsim4/pmos/run, * tests/bsim4/ro_17.cir, * tests/bsim4/ro_17.out, * tests/bsim4/test1.cir, * tests/bsim4/test1.out, * tests/bsim4/test10.cir, * tests/bsim4/test10.out, * tests/bsim4/test11.cir, * tests/bsim4/test11.out, * tests/bsim4/test12.cir, * tests/bsim4/test12.out, * tests/bsim4/test13.cir, * tests/bsim4/test13.out, * tests/bsim4/test14.cir, * tests/bsim4/test14.out, * tests/bsim4/test2.cir, * tests/bsim4/test2.out, * tests/bsim4/test3.cir, * tests/bsim4/test3.out, * tests/bsim4/test4.cir, * tests/bsim4/test4.out, * tests/bsim4/test5.cir, * tests/bsim4/test5.out, * tests/bsim4/test6.cir, * tests/bsim4/test6.out, * tests/bsim4/test7.cir, * tests/bsim4/test7.out, * tests/bsim4/test8.cir, * tests/bsim4/test8.out, * tests/bsim4/test9.cir, * tests/bsim4/test9.out: tests/bsim4: use the standard CMC model check 2012-05-05 h_vogt * src/xspice/README: update `making xspice' within actual ngspice 2012-05-05 h_vogt * src/spicelib/devices/numd/numddump.c: NUMDdump(): add binary mode fopen() with wb write operating point (external state) for true binary output 2012-05-01 h_vogt * src/frontend/outitf.c: beautify code 2012-05-01 h_vogt * src/spicelib/devices/cktask.c: error return only if variable `error' is set 2012-04-29 h_vogt * src/frontend/error.h, * src/spicelib/analysis/acan.c, * src/spicelib/devices/cktask.c: prevent false outputs of @dev[param], when not defined in ac simulation 2012-04-23 h_vogt * src/winmain.c: Enable ctrl-c to interrupt a simulation also for Windows GUI 2012-04-14 h_vogt * src/spicelib/parser/ifeval.c: Independent variable `temper' now returns the temperature in degree C 2012-04-14 h_vogt * src/frontend/inpcom.c: allow `time', `temper', and `hertz' in expressions of behavioral R,L,C devices 2012-04-14 rlar * src/frontend/subckt.c: subckt.c, doit(): fix another memory leak 2012-04-13 rlar * src/frontend/subckt.c: subckt.c, doit(): fix a memory leak 2012-04-08 h_vogt * src/frontend/spiceif.c: exclude circuits with XSPICE 'A' devices from using 'savesnap' XSPICE data storage is not yet implemented 2012-04-07 rlar * src/include/ngspice/inpdefs.h, * src/include/ngspice/inpptree.h, * src/spicelib/devices/asrc/asrcdest.c, * src/spicelib/parser/inpptree.c: fix memory leaks in ASRC and in INPgetTree() implement a reference counter `usecnt' for the elements of the `INPparseTree' 2012-04-07 rlar * src/spicelib/parser/inpptree.c: INPgetTree(), express the live range of some globals 2012-04-07 rlar * src/spicelib/parser/inpptree.c: mkfnode(), minor rewrite 2012-04-06 rlar * configure.ac, * src/frontend/display.c: configure.ac, fix `NO_X' and `has_no_help' drop configure options `--enable-x' and `--disable-x' use `--with-x' and `--without-x' provided by AC_PATH_X bug tracker item: [ngspice-Bugs-3515015] Startup error message without x11 https://sourceforge.net/tracker/index.php?func=detail&aid=3515015&group_id=38962&atid=423915 2012-04-05 rlar * src/spicelib/parser/inpptree.c: inpptree.c, fix differentiation of PTF_FLOOR PTF_CEIL and PTF_POW 2012-04-05 rlar * src/frontend/parse-bison.c, * src/frontend/parse-bison.h, * src/spicelib/parser/inpptree-parser.c, * src/spicelib/parser/inpptree-parser.h: update bison generated files 2012-04-05 rlar * src/spicelib/parser/inpptree-parser.y, * src/spicelib/parser/inpptree.c: fix memory leak in PTparse() 2012-04-05 rlar * src/frontend/parse-bison.y, * src/frontend/parse.c: fix memory leak in PPparse() 2012-04-05 rlar * src/frontend/variable.c: fix memory leak in cp_vset() 2012-04-05 rlar * src/spicelib/parser/inpptree.c: inpptree.c, polish comments 2012-04-05 rlar * src/spicelib/parser/inpptree.c: inpptree.c, fix premature memory allocation 2012-04-05 Michael Woodworth * src/spicelib/parser/inpgmod.c: fix a memory leak in parse_line() This has a HUGE affect on memory usage 2012-03-31 h_vogt * src/frontend/inpcom.c, * src/spicelib/parser/inpeval.c: bug_fix: R,L,C instantiations, tc1, tc2, numbers followed by `:' Ternary function was not recognized in R, C, or L lines if no voltage or current node was part of the expression, because then B-Source is not used. In these cases now inp_fix_ternary_operator_str() is called explicitly. tc1, tc2 were sometimes recognized falsely, if part of a token e.g. tc1end. R, C, and L models are never commented out, because their names may be token no. 4 or 5 in an R, C, or L line, and will not be recognized if 5. INPevaluate() will now correctly evaluate a number if followed by ':' (number may be part of the ternary function). 2012-03-30 h_vogt * src/frontend/inpcom.c: bug fix, inp_bsource_compat(): `tc1=' `tc2=' `reciproctc=' `}' don't substitute `tc1=' `tc2=' `reciproctc=' don't fail when processing tokens followed by `}' chars 2012-03-27 rlar * src/frontend/plotting/grid.c: lingrid(), avoid buffer overflow Bug ID: `Buffer overflow detected - ID: 3510521' reported by Zsolt Makaró The variable `mag3' sometimes seems to take unexpected values (for example log10 can be -Inf, which will be casted to 0x80000000) and seems then to have overflown a buffer buf[LABEL_CHARS] 2012-03-25 rlar * src/frontend/subckt.c: rewrite subckt.c transform doit() into a true recursive version, drop usage of global variables reduce scope of many variables cleanup and readability FIXME, an opportunity to plug a memory leak is visible now. 2012-03-25 rlar * src/frontend/subckt.c: bug fix, numnodes() in response to the `ex-41.cir' test case distilled from a Dietmar Warning Bug report in "Subject: Re: subckt, param" translate() is called recursively and depends on `num of nodes' provided by numnodes(). numnodes() depends on availability of `su_numargs'. But the processing allows non-processing of subckt instantiations in inner recursions (which will be processed later) which means `su_numargs' is not always available. 2012-03-25 rlar * src/frontend/com_measure2.c: round to next nearest integer for the rise, fall and cross arguments of `measure' Simon Guan reported Bug item #3509528, `Meas goes wrong when put in a while loop' In a .control block a `let' variable was passed to the `measure' command. The value of this variable would have been a plain integer, yet it was converted internally to an internal ascii representation with exponential representation (203 ==> 2.03e2) and then processed by `ft_numparse()' where it was converted back to double floating point. Because the intermediate 2.03 has no exact representation in the space of double floating point numbers this conversion was lossy and resulted in a non-integer value. This non-integer was then truncated towards minus infinity in com_measure yielding an error of -1 This commit implements round to nearest in com_measure2 to avoid the problem. FIXME, the internal intermediate conversion of double floating point machine values to ascii representations must be dropped, or replaced with an exact/lossless ascii representation. (for example GNU printf/scanf %a or 64bit hexadecimal representation) 2012-03-24 h_vogt * src/frontend/plotting/graf.c: bug fix, iplot(): Buffer overflow Thanks to Zsolt Makaró for the bug report in Buffer overflow detected - ID: 3510521 http://sourceforge.net/tracker/?func=detail&aid=3510521&group_id=38962&atid=423915 2012-03-24 h_vogt * src/frontend/inpcom.c: bug fix, inp_fix_subckt(): problem when parsing a .subckt line this worked .subckt psub a b p2 = {p1*2-1} p1 = 1 but this failed .subckt psub a b p2 = { p1 * 2 - 1 } p1 = 1 thanks to Ivan Riis Nielsen for the report in Message [Ngspice-devel] parsing problem (ngspice-24 tarball) 2012-03-24 h_vogt * src/tclspice.c: tclspice.c: new functions to get start and final time of a transient simulation 2012-03-17 h_vogt * .gitignore: .gitignore: exclude /release* and /debug* directories 2012-03-17 h_vogt * src/frontend/inpcom.c: inp_fix_subckt(): allow spaces in an expression which acts as a parameter 2012-03-10 h_vogt * .gitignore, * visualc/vngspice.sln, * visualc/vngspice.vcproj: Visual Studio: console and GUI, 32 Bit and 64 Bit newly organized 2012-03-01 dwarning * src/spicelib/parser/inpgmod.c: 1. Correct the list of binable models. 2. Fix a problem with wrong MOS level entries. 2012-02-26 rlar * .gitignore, * src/xspice/.gitignore, * src/xspice/cmpp/.gitignore, * src/xspice/icm/analog/.gitignore, * src/xspice/icm/digital/.gitignore, * src/xspice/icm/spice2poly/.gitignore, * src/xspice/icm/xtradev/.gitignore, * src/xspice/icm/xtraevt/.gitignore, * tests/.gitignore: .gitignore files 2012-02-19 Holger Vogt * com_cdump.c, commands.c, main.c: dummy functions for SMPprint() and SMPprintRHS() to allow making of ngnutmeg, small updates, comments 2012-02-19 Dietmar Warning * src/spicelib/devices/asrc/*.c,*.h * src/frontend/inpcom.c, Add reciprocal temperature behaviour for B sources used for nonlinear resistors, capacitors and inductors (the latter non-reciprocal) 2012-02-19 Holger Vogt * com_cdump.c, com_cdump.h, commands.c, smpdefs.h, spoutput.c, spsmp.c, command mrdump to dump the RHS of the matrix to stdout or to a file 2012-02-19 Holger Vogt * spiceif.c: savesnap, loadsnap enabled (still experimental!) * com_cdump.c, com_cdump.h, commands.c, smpdefs.h, spoutput.c, spsmp.c, cktpzstr.c, txlload.c: command mdump to dump the matrix to stdout or to a file 2012-02-11 Dietmar Warning * src/spicelib/devices/asrc/*.c,*.h,Makefile.am * src/frontend/inpcom.c, * vngspice.vcproj Add temperature coefficients for B sources 2012-02-11 Holger Vogt * inpcom.c: Robert's patch, reading libs, incs etc. 2012-02-11 Holger Vogt * tclspice.c, winmain.c, outitf.c, vectors.c, alloc.c: outheap (under Windows) removed 2012-02-11 Holger Vogt * ngspice.h: fprintf --> tcl_fprintf added * tclspice.c: small updates for Windows * outitf.c, vectors.c, alloc.c: outheap (under Windows) provided, but deactivated 2012-02-11 Robert Larice * src/spicelib/parser/inpptree-parser.c , * src/spicelib/parser/inpptree-parser.h : update bison generated files 2012-02-11 Robert Larice * src/spicelib/parser/inpptree-parser.y , * src/spicelib/parser/inpptree.c : upgrade INPgetTree() this parser did parse the *whole* line, now it parses as much as it can, and passes the rest back in arg `line' 2012-02-10 Holger Vogt / (Robert Larice) * src/frontend/cpitf.c : search for tclspinit in `cwd' as well 2012-02-10 Holger Vogt / (Robert Larice) * src/frontend/postcoms.c : NG_IGNORE something 2012-02-10 Dietmar Warning * src/spicelib/devices/dio/*.c,*.h: Typo with junction potential name 2012-02-09 Robert Larice * src/frontend/com_sysinfo.c , * src/frontend/mw_coms.c , * src/frontend/outitf.c : make use of TMALLOC() 2012-02-09 Robert Larice * src/main.c , * src/tclspice.c , * src/maths/cmaths/cmath2.c , * src/maths/misc/randnumb.c : unuse srandom() and random() 2012-02-08 Francesco Lannutti (Robert Larice) * Makefile.am : polish make maintainer-clean, make mrproper 2012-02-07 Robert Larice * src/include/ngspice/complex.h : #4/4 finish the switch from ngcomplex* args to ngcomplex 2012-02-07 Robert Larice * src/ngsconvert.c , * src/tclspice.c , * src/ciderlib/support/database.c , * src/frontend/breakp.c , * src/frontend/com_compose.c , * src/frontend/cpitf.c , * src/frontend/diff.c , * src/frontend/evaluate.c , * src/frontend/options.c , * src/frontend/points.c , * src/frontend/postcoms.c , * src/frontend/rawfile.c , * src/frontend/vectors.c , * src/frontend/plotting/agraf.c , * src/frontend/plotting/gnuplot.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/plotcurv.c , * src/frontend/plotting/plotit.c , * src/frontend/plotting/xgraph.c , * src/include/ngspice/complex.h , * src/maths/cmaths/cmath1.c , * src/maths/cmaths/cmath2.c , * src/maths/cmaths/cmath3.c , * src/maths/cmaths/cmath4.c , * src/maths/cmaths/test_cx_cph.c , * src/maths/cmaths/test_cx_j.c , * src/maths/cmaths/test_cx_mag.c , * src/maths/cmaths/test_cx_ph.c : #3/4 switch realpart() and imagpart() args from ngcomplex* to ngcomplex 2012-02-07 Robert Larice * src/frontend/diff.c , * src/include/ngspice/complex.h , * src/maths/cmaths/cmath1.c , * src/maths/cmaths/cmath2.c , * src/maths/cmaths/cmath3.c , * src/maths/cmaths/cmath4.c : #2/4 switch cph() and cmag() args from ngcomplex* to ngcomplex 2012-02-07 Robert Larice * src/include/ngspice/complex.h : #1/4 drop cast (enable compiler type check) 2012-02-07 Holger Vogt / Robert Larice * src/tclspice.c : fix varags usage, tcl_printf(), tcl_fprintf(), tcl_vfprintf() 2012-02-07 Robert Larice * src/include/ngspice/devdefs.h , * src/spicelib/devices/dev.c , * src/spicelib/devices/adms/admst/ngspice.xml : adms3, fix some types 2012-02-07 Robert Larice * src/frontend/vectors.c , * src/frontend/parser/complete.c , * src/include/ngspice/cpextern.h , * src/include/ngspice/ftedefs.h , * src/include/ngspice/plot.h : use type `struct ccom' 2012-02-07 Robert Larice * src/main.c , * src/frontend/outitf.c , * src/frontend/outitf.h , * src/include/ngspice/ifsim.h , * src/include/ngspice/noisedef.h , * src/include/ngspice/trandefs.h , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/dcop.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c : use type `runDesc' 2012-02-07 Robert Larice * src/frontend/outitf.h , * src/include/ngspice/typedefs.h : struct runDesc forward declaration 2012-02-07 Robert Larice * src/frontend/rawfile.c : comment/pinpoint a local misuse of a structure element 2012-02-06 Robert Larice * src/tclspice.c : drop some (char*) casts 2012-02-06 Robert Larice * src/frontend/vectors.c , * src/misc/wlist.c : preserve const'ness of some casts 2012-02-06 Robert Larice * src/frontend/numparam/spicenum.c : drop (void*) cast of the dispose() argument 2012-02-06 Robert Larice * src/frontend/terminal.c : drop tgetstr() return value cast 2012-02-06 Robert Larice * src/frontend/parser/complete.c : drop (char*) cast in the third argument of ioctl() 2012-02-06 Robert Larice * src/frontend/outitf.c , * src/frontend/spiceif.c , * src/frontend/subckt.c , * src/frontend/plotting/graf.c , * src/spicelib/analysis/cktnames.c , * src/spicelib/devices/hisim2/hsm2noi.c , * src/spicelib/devices/hisimhv/hsmhvnoi.c , * src/spicelib/parser/ifnewuid.c , * src/spicelib/parser/inpptree.c , * src/xspice/mif/mifsetup.c : drop some more casts 2012-02-06 Robert Larice * src/spicelib/analysis/analysis.c , * src/spicelib/devices/urc/urcsetup.c : drop some casts 2012-02-06 Robert Larice * src/xspice/cm/cm.c , * src/xspice/evt/evtsetup.c , * src/xspice/evt/evttermi.c , * src/xspice/mif/mifconvt.c , * src/xspice/mif/mifload.c , * src/xspice/mif/mifsetup.c : drop some (char*) casts 2012-02-06 Robert Larice * src/include/ngspice/inpdefs.h , * src/spicelib/parser/inplkmod.c : rewrite INPlookMod(), return INPmodel*/NULL instead of int 1/0 2012-02-06 Robert Larice * src/frontend/com_compose.c , * src/frontend/define.c , * src/frontend/device.c , * src/frontend/inpcom.c , * src/frontend/parse.c , * src/frontend/vectors.c , * src/frontend/parser/complete.c , * src/frontend/parser/unixcom.c , * src/frontend/wdisp/windisp.c , * src/include/ngspice/ngspice.h , * src/spicelib/parser/inpptree.c : use strchr() instead of index() which is depreciated ============================ ngspice-24 ================================== 2012-01-30 Dietmar Warning * src/spicelib/devices/dio/diotemp.c: Add temperature dependent junction potentials also for tlevc=1 capacitor temperature model 2012-01-28 Robert Larice * src/include/ngspice/ngspice.h : define NAN for non C99 environments 2012-01-28 Holger Vogt * configure.ac, compile_min.sh: prepare for release 24 * mifdelete.c: prevent crash upon 'reset', if codemodel is an array FIXME: leads to small memory leak 2012-01-27 Holger Vogt * NEWS, INSTALL, tests\bin\ngspice.pm, /visualc/include/ngspice/config.h: prepare for release 24 2012-01-24 Dietmar Warning * src/spicelib/devices/bjt/bjttemp.c: Add temperature dependent junction potentials also for tlevc=1 capacitor temperature model 2012-01-15 Robert Larice * src/spicelib/devices/hisim2/hsm2eval.c , * src/spicelib/devices/hisim2/hsm2temp.c , * src/spicelib/devices/hisimhv/hsmhveval.c : bug fix, a numerical problem in the hisim2 an hisimhv models First seen when compiled with gcc-4.6.2 -g -O1 The macro `Fn_SZ' which boils down to 1/2 * (x + sqrt(x*x + c*c)) was used in a context where a negative result blew up the following computations. (used to compute `Egidl', which is used to compute exp(-1 / (Egidl + small_constant))) For large negative values of x the computation boils down to 1/2 ( x + almost(|x|) ) where the summands almost cancel each other, sometimes yielding a small negative result. small_constant was too small to avoid a big result for -1/(Egidl + small_constant) yielding an `inf' during the exp() computation, which was later multiplied with a `0' yielding a NaN, which was carried forward during the rest of computations. Because the error of the cancellation scales with the magnitude of x, no larger `small_constant' could have avoided the problem. Presumably the problem was amplified by a mixture of precisions (double versus extended float) of intermediate values. (the program wasn't compiled for sse) ( x was -2.812500e+06, c was 1.000000e-02, Fn_SZ result was -1.853095e-11 thus the cancellation remainder was of relative size 6.6e-18 which is approximately 2^-57 and thus more accurate as a `double float' could have delivered ) 2012-01-15 Robert Larice * tests/bin/modelQaTestRoutines.pm , * tests/bin/runQaTests.pl : perl, defined(%hash) is depreciated 2012-01-15 Holger Vogt * tests\bin\modelQaTestRoutines.pm: $platform should not contain '/' , removed in line 700 2012-01-13 Robert Larice * src/spicelib/devices/hisimhv/.cvsignore : add missing .cvsignore file 2012-01-13 Robert Larice * src/include/ngspice/missing_math.h : revert last commit, simply insane checking for being a macro is already done with HAVE_DECL_ISNAN 2012-01-11 Robert Larice * src/include/ngspice/missing_math.h : wrap isnan declaration, isnan is a macro on modern systems 2012-01-11 Robert Larice * src/frontend/resource.c : fix printf/scanf format strings to match `unsigned long long' arguments 2012-01-09 Holger Vogt * rawfile.c: error messages, bug during loading ascii rawfile removed plot i(vdd) from a loaded rawfile is working now. 2012-01-08 Robert Larice * src/frontend/parse-bison.c , * src/frontend/parse-bison.h , update bison generated files 2012-01-08 Robert Larice * src/frontend/parse-bison.y : bug fix, broken vdb() vph() see plot vdb(1) vr(2) vi(3) vm(4) vp(5) no works - ID: 3470791 http://sourceforge.net/tracker/?func=detail&atid=423915&group_id=38962&aid=3470791 revert: 2011-08-20 Robert Larice the i() and v() function application have special semantics which was meant to fix a problem, when loading a rawfile and trying to access a vector with name "i(vdd)" yet broke the internal user defined functions vdb(x) --> db(v(x)) ... in short load file plot i(vdd) won't work. but load file plot "i(vdd)" will work 2012-01-08 Robert Larice * src/frontend/numparam/xpressn.c , * src/maths/poly/polyfit.c : bug fix, incorrect '%le' printf format specifier responsible for failure on mingw. see string parameters cause crash on win32 platform - ID: 3469699 http://sourceforge.net/tracker/?func=detail&atid=423915&group_id=38962&aid=3469699 I've sneaked this in with commit "numparm, 17 digit placeholders --> numparm__XXXXXXXX dummy symbols" from 2011-02-19 Robert Larice 2012-01-07 Robert Larice * src/spicelib/devices/bsim1/b1set.c , * src/spicelib/devices/bsim2/b2set.c , * src/spicelib/devices/bsim3/b3set.c , * src/spicelib/devices/bsim3v0/b3v0set.c , * src/spicelib/devices/bsim3v1/b3v1set.c , * src/spicelib/devices/bsim3v32/b3v32set.c , * src/spicelib/devices/bsim4/b4set.c , * src/spicelib/devices/bsim4v4/b4v4set.c , * src/spicelib/devices/bsim4v5/b4v5set.c , * src/spicelib/devices/bsim4v6/b4v6set.c , * src/spicelib/devices/hfet1/hfetsetup.c , * src/spicelib/devices/hfet2/hfet2setup.c , * src/spicelib/devices/jfet/jfetset.c , * src/spicelib/devices/jfet2/jfet2set.c , * src/spicelib/devices/mes/messetup.c , * src/spicelib/devices/mesa/mesasetup.c , * src/spicelib/devices/mos1/mos1set.c , * src/spicelib/devices/mos2/mos2set.c , * src/spicelib/devices/mos3/mos3set.c , * src/spicelib/devices/mos6/mos6set.c , * src/spicelib/devices/mos9/mos9set.c , * src/spicelib/devices/vbic/vbicsetup.c : bug fix, fix the guard for device generated internal nodes (via CKTmkVolt()) There is a longstanding bug in spice, responsible for wired behavior when two analyzes are not separated with a `reset' command The second invocation of CKTsetup() repeated the construction of internal device nodes (CKTmkVolt and CKTmkCur) yielding an incorrect device matrix with growing vector size. Obviously the support for a second CKTsetup() invocation was already included in spice, but not implemented correctly. This patch fixes guards in many device models, which should have prevented repeated invocation of CKTmkVolt() and CKTmkCur() This patch fixes many but not all device models, known exceptions are : b4soiset b3soiddset soi3set This fix is kept short, for better readability of the patch diff. A large whitespace and indentation patch will follow. 2012-01-07 Robert Larice * src/frontend/inpcom.c : cleanup, muffle compiler warning 2012-01-07 Robert Larice * src/spicelib/analysis/cktdojob.c : bug fix, CKTcurJob, make sure this is either up do date or NULL fix a valgrind report, access to allready freed memory during CKTtemp() 2012-01-05 Holger Vogt * inpdomod.c: bug in error message for bjt removed 2012-01-03 Holger Vogt * runcoms.c: undo change from 2012-01-01, conflict with 'alter', altermod' 2012-01-02 Robert Larice * src/frontend/inpcom.c : cleanup, muffle compiler warning 2012-01-02 Robert Larice * src/spicelib/analysis/cktdojob.c : xspice bug fix, invoke EVTsetup(ckt) only when `reset' bug fix, tracker ID 3388916 Segfault when combining digital models and breakpoint control https://sourceforge.net/tracker/?func=detail&aid=3388916&group_id=38962&atid=423915 2012-01-02 Robert Larice * src/frontend/error.c : controlled_exit() shall not block waiting for a keyboard press and advertise the exit message to external syntax coloring schemes, emit "ERROR: " at the very beginning of a new line. 2012-01-02 Robert Larice * configure.ac , * src/frontend/commands.c , * src/frontend/runcoms.c , * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/include/ngspice/cktdefs.h , * src/include/ngspice/pssdefs.h , * src/spicelib/analysis/Makefile.am , * src/spicelib/analysis/analysis.c , * src/spicelib/parser/inp2dot.c , * visualc/vngspice.vcproj : conditionally compile PSS analysis discouraging PSS as being `very experimental', to enable use: configure --enable-pss 2012-01-01 Robert Larice * src/Makefile.am : fix tarball, spinit.in was missing 2012-01-01 Holger Vogt * inpcom.c, main.c, compatmode.h, spinit.in: .lib handling depends on input to compatmode * runcoms.c: enforce 'reset' after tran, op, etc. before next simulation is started 2011-12-30 Holger Vogt * b4v5dest.c, b4dest.c, b3dest, b3v32.dest : memory leaks reduced * b3v32... : struct bsim3SizeDependParam --> struct bsim3v32SizeDependParam * inpcom.c: undo commit from 2011-12-27, lib handling was defect! 2011-12-30 Robert Larice * inpcom.c : cleanup, drop `s_lower' FIXME case insensitive filename compare !! 2011-12-30 Robert Larice * inpcom.c : cleanup scope of `y' and `z' 2011-12-30 Robert Larice * inpcom.c : cleanup scope of `keep_char' and `s_lower', drop `s_ptr' 2011-12-30 Robert Larice * inpcom.c : cleanup, drop variable `found_library' 2011-12-30 Robert Larice * inpcom.c : cleanup scope of variable `newfp' 2011-12-30 Robert Larice * inpcom.c : cleanup scope of variable `big_buff2' 2011-12-30 Robert Larice * inpcom.c : cleanup scope of variable `dir_name_flag' 2011-12-30 Robert Larice * inpcom.c : bug fix, copys not always valid cleanup scope, emphasize live range avoid things to be freed too early avoid incorrect frees 2011-12-30 Holger Vogt * inpcom.c: remove a bug reading a file (FIXME: .inc and .lib need some general overhauling!) 2011-12-30 Robert Larice * src/include/ngspice/cktdefs.h , * src/include/ngspice/pzdefs.h , * src/spicelib/devices/nbjt2/nbjt2def.h , * src/spicelib/devices/ndev/ndevexch.h , * src/spicelib/devices/numd2/numd2def.h , * src/spicelib/devices/numos/numosdef.h : remove CVS `Id',`log' etc. keyword incantations 2011-12-30 Holger Vogt * inppas3.c, cktdest.c: reduce memory leaks * inpsymt.c: beautify * inp.c: .csparam allows to tranfer a param into a vector for use in the .control section (yet experimental, not safe against syntax errors) 2011-12-29 Holger Vogt * b4v6dest.c : improved removal of circuit installation, bug no. 3229770. Memory leaks are quasi gone for 10 run - reset sequences of a 1000 transistor circuit 2011-12-29 Robert Larice * src/include/ngspice/Makefile.am : install headers in $(pkdatadir)/include/ngspice use them with a single -I $(pkdatadir)/include compiler directive This is for user compilation of XSPICE and adms codemodels outside of the ngspice build directory Beware of the "ngspice/config.h" file Especially if you build twice, (for tclspice and then for ngspice) both will install this file, with different contents. These headers are a mess, yet they are at least isolated The -I directive will allow them to be found only on explicit demand with a "ngspice/" namespace seperator (use #include "ngspice/...") 2011-12-29 Robert Larice * src/Makefile.am : cleanup src/Makefile.am TCL_MODULE rules CLEANFILES edit pkgIndex.tcl at `make' time to obey (info "(autoconf) Installation Directory Variables") 2011-12-29 Robert Larice * configure.ac : remove @libname@ has been replaced by $(pkglibdir) 2011-12-29 Robert Larice * configure.ac , * src/Makefile.am , * src/spinit.in , * src/tclspinit.in : generate spinit and tclspinit at `make' time to obey (info "(autoconf) Installation Directory Variables") and edit them for codemodels in $(pkglibdir) 2011-12-29 Robert Larice * src/xspice/icm/GNUmakefile.in , * src/xspice/icm/makedefs.in : install codemodels in $(pkglibdir) this was hardwired to $libdir/spice 2011-12-28 Holger Vogt * cktdest.c, inpsymt.c: reduce memory leaks for command 'reset' bug no. 3229770 2011-12-27 Robert Larice * visualc/vngspice.vcproj , * visualc/include/config.h , * visualc/include/ngspice/config.h : #6/6 config.h --> ngspice/config.h, vngspice.vcproj 2011-12-27 Robert Larice * src/frontend/help/Makefile.am , * src/xspice/icm/makedefs.in : #5/6 config.h --> ngspice/config.h, some more -I include paths 2011-12-27 Robert Larice * **/Makefile.am , #4/6 config.h --> ngspice/config.h, AM_CPPFLAGS 2011-12-27 Robert Larice * **/Makefile.am , * src/spicelib/devices/adms/admst/ngspice.xml , * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml : #3/6 config.h --> ngspice/config.h, AM_CPPFLAGS 2011-12-27 Robert Larice * **/* : #2/6 config.h --> ngspice/config.h, #include's 2011-12-27 Robert Larice * configure.ac , * .cvsignore , * src/include/ngspice/.cvsignore : #1/6 config.h --> ngspice/config.h, configure.ac 2011-12-27 Robert Larice * src/frontend/com_ghelp.c , * src/frontend/cpitf.c : cleanup 2011-12-27 Holger Vogt * inpcom.c: warnings and error messages in .lib handling (bug no. 3111261) 2011-12-26 Holger Vogt * xpressn.c * ptfuncs.c, inpptree.c, inpptree.h, spicelib/parser/inp.h * cmath2.c, cmath2.h, fteext.h, parse.c functions floor and ceil added to numparam, ASRC and scripting language 2011-12-25 Holger Vogt * src/frontend/inpcom.c : remove 'params:' from X or .SUBCKT lines of input deck (in fcn inp_fix_for_numparam()) 2011-12-21 Holger Vogt * src/misc/string.c , src/frontend/inpcom.c , src/include/ngspice/stringutil.h: allow syntax Gxxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2) or Exxx n1 n2 TABLE {expression} = (x0, y0) (x1, y1) (x2, y2) 2011-12-17 Robert Larice * src/xspice/cmpp/ifs_lex.l , * src/xspice/cmpp/ifs_yacc.y , * src/xspice/cmpp/ifs_yacc_y.h , * src/xspice/cmpp/mod_lex.l , * src/xspice/cmpp/mod_yacc.y , * src/xspice/cmpp/mod_yacc_y.h : remove CVS `Id',`log' etc. keyword incantations 2011-12-17 Robert Larice * src/winmain.c , * src/frontend/inpcom.c , * src/include/ngspice/Makefile.am , * src/include/ngspice/memory.h , * src/misc/Makefile.am , * src/misc/string.c , * visualc/vngspice.vcproj : Added src/include/ngspice/stringutil.h Removed src/misc/stringutil.h move stringutil.h --> src/include/ngspice 2011-12-17 Holger Vogt * src/frontend/inpcom.c : allow syntax Gxxx n1 n2 value={equation} or Exxx n1 n2 value={equation} 2011-12-17 Robert Larice * src/spicelib/devices/dev.c , * src/spicelib/devices/adms/admst/ngspice.xml : adms3, use -ldl instead of -lltdl, fix include path 2011-12-17 Robert Larice * src/frontend/breakp2.c , * src/frontend/outitf.c , * src/include/ngspice/ftedefs.h , * src/spicelib/analysis/cktsens.c : type fixes 2011-12-17 Holger Vogt * src/frontend/inp.c, src/frontend/options.c src/include/ngspice/fteext.h : variable ft_stricterror to exit ngspice with exit code 1 if any error occurs during circuit parsing. Usage maybe extended to other errors. Tradditionally ngspice uses to continue, issue error messages, deliver wrong results and exit with exit code 0. 2011-12-16 Holger Vogt * src/frontend/subckt.c: beautify code 2011-12-15 Robert Larice * configure.ac , * src/frontend/inpcom.c , * src/frontend/subckt.c , * src/include/ngspice/devdefs.h , * src/include/ngspice/ngspice.h , * src/spicelib/devices/dev.c , * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inpdomod.c : new: configure --enable-adms3 make Laurents changes truely --adms3 specific trying to preserve --adms 2011-12-15 Laurent Lemaitre * src/frontend/inpcom.c , * src/frontend/subckt.c , * src/include/ngspice/devdefs.h , * src/spicelib/devices/adms/admst/ngspice.xml , * src/spicelib/devices/dev.c : added SPICEadmsdev - a super structure of SPICEdev used to build dynamic device libraries 2011-12-14 Laurent Lemaitre * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inpdomod.c , * src/spicelib/devices/dev.c , * src/include/ngspice/ngspice.h , * src/spicelib/devices/adms/admst/prengspice.xml , * src/spicelib/devices/adms/admst/ngspice.xml : renamed premint.xml to prengspice.xml. xml file that does preformating of verilog files. add routine load_vadev to public definitions. add routine load_vadev for dynamic loading of modules. add dynamic loading of models. shared libs should be libNAME.so. use u instance as dynamically defined models in --adms mode 2011-12-13 Robert Larice * **/* : remove CVS `Id',`log' etc. keyword incantations 2011-12-13 Robert Larice * src/frontend/outitf.c , * src/frontend/outitf.h , * src/frontend/spiceif.c , * src/include/ngspice/ifsim.h , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/dcop.c , * src/spicelib/analysis/dcpss.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c : unify OUTpBeginPlot() invocation 2011-12-13 Robert Larice * src/spicelib/analysis/pzan.c : unify OUTpBeginPlot() usage of ckt->CKTcurJob 2011-12-13 Robert Larice * src/spicelib/analysis/cktdisto.c , * src/spicelib/analysis/cktpzld.c , * src/spicelib/analysis/cktpzset.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/dctsetp.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/sensaskq.c , * src/spicelib/analysis/senssetp.c : rename various analysis vars --> `job' 2011-12-13 Robert Larice * src/spicelib/analysis/acaskq.c , * src/spicelib/analysis/acsetp.c , * src/spicelib/analysis/daskq.c , * src/spicelib/analysis/dsetparm.c , * src/spicelib/analysis/naskq.c , * src/spicelib/analysis/nsetparm.c , * src/spicelib/analysis/pssaskq.c , * src/spicelib/analysis/pssinit.c , * src/spicelib/analysis/psssetp.c , * src/spicelib/analysis/pzaskq.c , * src/spicelib/analysis/pzsetp.c , * src/spicelib/analysis/tfsetp.c , * src/spicelib/analysis/tranaskq.c , * src/spicelib/analysis/traninit.c , * src/spicelib/analysis/transetp.c : auxiliary define `job' --> local variable `job' 2011-12-13 Robert Larice * src/spicelib/analysis/acaskq.c , * src/spicelib/analysis/acsetp.c , * src/spicelib/analysis/daskq.c , * src/spicelib/analysis/dsetparm.c , * src/spicelib/analysis/naskq.c , * src/spicelib/analysis/nsetparm.c , * src/spicelib/analysis/pssaskq.c , * src/spicelib/analysis/pssinit.c , * src/spicelib/analysis/psssetp.c , * src/spicelib/analysis/pzaskq.c , * src/spicelib/analysis/pzsetp.c , * src/spicelib/analysis/tfsetp.c , * src/spicelib/analysis/tranaskq.c , * src/spicelib/analysis/traninit.c , * src/spicelib/analysis/transetp.c : auxiliary define (ANALYSIS*) anal --> `job' 2011-12-13 Robert Larice * autogen.sh , * src/spicelib/devices/adms/admst/ngspice.xml : switch --adms3 over to the new adms3va directories 2011-12-13 Robert Larice * src/spicelib/devices/adms/hicum0/admsva/hicum0.va , * src/spicelib/devices/adms/mextram/admsva/bjt504t.va , * src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include , * src/spicelib/devices/adms/psp102/admsva/PSP102_module.include : undo `2011-12-12 Laurent Lemaitre' which broke --adms in favour of --adms3 adms3 shall now be worked upon in `adms3va' subdirectories 2011-12-13 Robert Larice * src/spicelib/devices/adms/*/adms3va/* : copy old amds .va files to a new directory `adms3va' 2011-12-12 Robert Larice * src/spicelib/devices/adms/admst/ngspiceMODULE*.xml : remove CVS `Id' and `log' keyword incantations I did use '-->' in a commit message, which was injected into the source files due to CVS keyword expansion. Please use `cvs log' if you really want to know the CVS log 2011-12-12 Laurent Lemaitre * src/spicelib/devices/adms/hicum0/admsva/hicum0.va , * src/spicelib/devices/adms/mextram/admsva/bjt504t.va , * src/spicelib/devices/adms/psp102/admsva/JUNCAP200_parlist.include , * src/spicelib/devices/adms/psp102/admsva/PSP102_module.include : Make veriloga models compliant with Language Reference Manual. They will not compile with --adms flag. 2011-12-12 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspice.xml : Set name of model C routines unique - make linker happy. 2011-12-11 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : #4/4 #include --> #include "ngspice/..." for adms3 2011-12-11 Robert Larice * src/spicelib/devices/adms/admst/ngspiceMODULE*.xml : #3/4 #include --> #include "ngspice/..." for adms 2011-12-11 Robert Larice * src/xspice/cmpp/pp_mod.c , * src/xspice/cmpp/writ_ifs.c : #2/4 #include --> #include "ngspice/..." printf strings 2011-12-11 Robert Larice * **/* : #1/4 #include --> #include "ngspice/..." use "" instead of <> to better express project membership <> includes might be skipped by dependency generator tools assuming those being stable system include files 2011-12-11 Robert Larice * src/spicelib/analysis/acan.c , * src/spicelib/analysis/dcpss.c , * src/spicelib/analysis/dctran.c : use a macro to update ckt->CKTstat->STAT.. 2011-12-11 Robert Larice * src/spicelib/**/*.c : auxiliary define `job' --> local variable `job' 2011-12-11 Robert Larice * src/spicelib/**/*.c : auxiliary define (ANALYSIS*) ckt->CKTcurJob --> `job' 2011-12-11 Robert Larice * src/spicelib/analysis/cktdisto.c , * src/spicelib/analysis/cktpzld.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/dctrcurv.c : variable rename `sen_info' `cv' `pzan' `sen_info' --> `job' 2011-12-11 Robert Larice * src/spicelib/analysis/dcpss.c : similiarity dctran.c versus dcpss.c 2011-12-10 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspice.xml : add dynamic loading feature 2011-12-03 Robert Larice * src/spicelib/analysis/dcpss.c , * src/spicelib/analysis/dctran.c : cleanup, aiming for higher similarity of dctran.c and dcpss.c this cleanup was checked for identical object code (gcc on linux) 2011-12-03 Robert Larice * src/frontend/numparam/xpressn.c : bug fix, parameter assignment was broken for expressions containing one of '<=' '>=' or '!=' 2011-12-03 Robert Larice * visualc/vngspice.vcproj : remove some unused `vcproj' dependencies 2011-11-30 Robert Larice * src/frontend/inpcom.c : bug fix, parameter processing was broken for nested .subckt 2011-11-27 Holger Vogt * /frontend/runcoms2.c: command 'remcirc' to remove a circuit. 2011-11-26 Holger Vogt * /frontend/plotting/gnuplot.c: appendwrite and complex variable printing added. 2011-11-13 Holger Vogt * inp.c: code beautify, indentations etc. * inpcom.c: reordering, fcn prototypes added, docu added 2011-11-04 Holger Vogt * INSTALL: give more precise instructions 2011-11-03 Robert Larice * src/xspice/icm/GNUmakefile.in : xspice/icm/GNUmakefile.in, add missing `uninstall' target 2011-10-31 Robert Larice * src/main.c , * src/frontend/com_fft.c , * src/frontend/ftesopt.c , * src/frontend/resource.c , * src/frontend/numparam/xpressn.c : swallow warnings 2011-10-31 Robert Larice * src/spicelib/devices/hisim2/hisim2.h , * src/spicelib/devices/hisim2/hsm2ld.c , * src/spicelib/devices/hisimhv/hisimhv.h , * src/spicelib/devices/hisimhv/hsmhvld.c , * src/spicelib/devices/hisimhv/hsmhvnoi.c , * src/spicelib/devices/hisimhv/hsmhvset.c : swallow warnings in hisimhv and hisim2 code 2011-10-31 Robert Larice * devices/mos2/mos2ask.c: Fix the source/drain typo for overlap cap's, for mos2 as well see https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3429175&group_id=38962 see commit from 2000-09-05 2011-10-30 Holger Vogt * DEVICES: update to hisim_hv 1.2.2 2011-10-30 Dietmar Warning * devices/mos1/mos1ask.c: Fix the source/drain typo for overlap cap's * devices/hisimhv/*.c, *.h, tests/hsimhv: Update to actual hisim_hv model version 1.2.2 * tests/bin/ngspice.pm: remove .st0 files not needed for ngspice 2011-10-16 Robert Larice * src/spicelib/parser/inpptree-parser.c , * src/spicelib/parser/inpptree-parser.h : update bison generated files 2011-10-16 Robert Larice * src/spicelib/parser/inpptree-parser.y , * src/spicelib/parser/inpptree.c : bug fix, allow special nodenames "/Node" and "Node-4" in `B' expressions related to http://sourceforge.net/tracker/?func=detail&aid=3421234&group_id=38962&atid=423915 the lexer will now identify special function applications v(node) v(node,node) and i(instance) 2011-10-02 Holger Vogt * device.c updates to altermod command, allow reading from file with multiple .model sections 2011-09-18 Holger Vogt * com_fft.c: fft now uses faster Green's method (may be deselected by unsetting #define GREEN swirch * spiceif.c: code beutify for better readability * device.c updates to altermod command, allow reading from file * com_measure2.c: warning real ac removed 2011-09-11 Holger Vogt * frontend/plotting/grid.c: Error message, if requested resolution cannot be handled. 2011-08-28 Dietmar Warning * /admst/ngspice.xml, ngspiceVersion.xml, psp102.va: psp102 module name change according to model developer used naming convention (psp102 is now PSP102VA) 2011-08-24 Dietmar Warning * configure.ac, inp2q.c, inpdomod.c, dev.c, ngspice.xml, bjt504t.va: change the name of the mextram verilog module according to model developer used naming convention (mextram.va is substituted by bjt504t.va), means including parasitic substrate transistor and selfheating is enabled 2011-08-24 Robert Larice * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml : adms, fix an extra backslash, which i've sneaked in 2011-08-12, adms, fix parallel execution when using make -j 2011-08-21 Robert Larice * src/spicelib/analysis/cktpzstr.c : prototypes, and avoid a NULL dereference when PZDEBUG is active 2011-08-21 Robert Larice * src/frontend/outitf.c : avoid segfault when printing aout a nonexistant `ReferenceValue' (pzan) 2011-08-21 Holger Vogt * fftext.h, fftext.c, fftlib.c, fftlib.h: type long to int (patch by Robert) isracct.c, vsrcacct.c: suppress info on freeing fft tables 2011-08-21 Robert Larice * src/main.c , * src/frontend/runcoms.c , * src/frontend/runcoms2.c : use unlink() instead of remove() thanks to Marcel Hendrix 2011-08-20 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : #7/7 use a subdirectory "ngspice" for includes to create a uniq namespace adms-3 2011-08-20 Robert Larice * src/spicelib/devices/adms/admst/*.xml : #6/7 use a subdirectory "ngspice" for includes to create a uniq namespace adms-2 2011-08-20 Robert Larice * src/xspice/cmpp/pp_mod.c , * src/xspice/cmpp/writ_ifs.c : #5/7 use a subdirectory "ngspice" for includes to create a uniq namespace xspice 2011-08-20 Robert Larice * visualc/vngspice.vcproj : #4/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 Robert Larice * configure.ac , * src/Makefile.am : #3/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 Robert Larice * src/include/* : #2/7 use a subdirectory "ngspice" for includes to create a uniq namespace move the include files down into the new directory 2011-08-20 Robert Larice * **/* : #1/7 use a subdirectory "ngspice" for includes to create a uniq namespace 2011-08-20 Robert Larice * src/frontend/parse-bison.c , * src/frontend/parse-bison.h , update bison generated files 2011-08-20 Robert Larice * src/frontend/parse-bison.y : the i() and v() function application have special semantics 2011-08-20 Robert Larice * src/maths/fft/Makefile.am , * visualc/vngspice.vcproj : remove maths/fft/fftext.h 2011-08-19 Holger Vogt * rawfile.c: code beautified, 'strange line' error improved * maths/fft/fftext.h removed * include/fftext.h, 1-f-code.c, 1-f-code.h, com_fft.c: type float --> double * control.c: code beautified 2011-08-14 Robert Larice * src/frontend/postsc.c : postsc.c, swallow warnings 2011-08-14 Paolo Nenzi * src/frontend/devices.c : devhelp now prints header when user asks for a single parameter. 2011-08-13 Robert Larice * src/ciderlib/twod/twoprint.c : twoprint.c, swallow warnings 2011-08-13 Robert Larice * src/frontend/parse-bison.c , * src/frontend/parse-bison.h , * src/spicelib/parser/inpptree-parser.c , * src/spicelib/parser/inpptree-parser.h : update bison generated files 2011-08-13 Robert Larice * src/frontend/parse-bison.y , * src/spicelib/parser/inpptree-parser.y : bison files, swallow warnings 2011-08-12 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml , * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml : adms, fix parallel execution when using make -j 2011-08-12 Robert Larice * src/spicelib/devices/adms/admst/ngspiceMODULEask.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEload.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEmask.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEpar.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEpzld.c.xml , * src/spicelib/devices/adms/admst/ngspiceMODULEtemp.c.xml , * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml : pull two -adms3 fixes into -adms 2011-07-25 convert K&R function definitions to ansi style and declare a debug function `static' 2011-07-26 swallow unsed variable warnings in adms generated code, upgrade dependencies 2011-08-12 Robert Larice * src/frontend/plotting/Makefile.am , * src/frontend/plotting/grid.c , * src/frontend/plotting/grid.h , * src/include/grid.h , * visualc/vngspice.vcproj : remove second incarnation of `grid.h' 2011-08-11 Holger Vogt * xpressn.c: correct #include path for error.h 2011-08-10 Holger Vogt * evtplot.c: initilize 'value' to 0 * xpressn.c: improved error message * misccoms.c, main.c, error.c, fteext.h: flag ft_pipemode set in main.c, used to optimize or suppress output messages 2011-08-09 Holger Vogt * inp2dot.c: align spaces and braces * inp2dot.c, examples/pss/*.cir: uic for pss to end of line 2011-08-09 Paolo Nenzi * (new) src/include/fteoptdefs.h * (new) src/frontend/ftesopt.c * (new) src/frontend/inventory.c * src/frontend/commands.c * src/frontend/device.c * src/frontend/device.h * src/frontend/inp.c * src/frontend/mw_coms.c * src/frontend/resource.c * src/frontend/ftedefs.h * src/frontend/fteext.h * src/frontend/optdefs.h * src/spicelib/devices/cktcrte.c * src/spicelib/devices/cktinit.c added "frontend statistics" to the acct command: netlist loading and parsing time and number of lines. Added "devhelp" command to show available devices and describe device parameters. Added "inventory command" to print the number of istances of each device. 2011-08-09 Robert Larice * src/maths/misc/equality.c : swallow some warnings, and use 2011-08-09 Robert Larice * src/spicelib/analysis/dcpss.c : a series of four cleanup patches remove unsed variable `cont_1' reduce scope of variable `tv_01', and use `MAX' reduce scope of variables `fproj' and `err' reduce scope of variable `temp' 2011-08-09 Robert Larice * src/main.c * src/frontend/plotting/graf.c * src/frontend/plotting/grid.c * src/frontend/plotting/x11.c * src/frontend/wdisp/windisp.c * src/spicelib/analysis/acan.c * src/spicelib/analysis/dcop.c * src/spicelib/analysis/dctran.c * src/spicelib/analysis/dctrcurv.c * src/spicelib/analysis/distoan.c * src/spicelib/analysis/pzan.c * src/spicelib/parser/inpeval.c * src/spicelib/parser/inpptree.c rewrite (double)literal --> floating-point-literal 2011-08-08 Holger Vogt * src/frontend/com_fft.c, src/maths/fft/fftext.c, fftext.h, fftlib.c, fftlib.h, matlib.c, matlib.h: convert float to double * winmain.c: increase text output buffer 2011-08-08 Robert Larice * src/xspice/cm/cmutil.c : ngspice.h always must be the first included file because of "man feature_test_macros(7)" 2011-08-08 Robert Larice * src/spicelib/analysis/dcpss.c : rewrite pointer dereferences to array subscripts 2011-08-07 Robert Larice * src/misc/util.c : rewrite ngdirname() 2011-08-07 Paolo Nenzi * (new) examples/pss , * (new) examples/pss/colpitt_osc_pss.cir , * (new) examples/compl_cross_quad_osc_pss.cir , * (new) examples/hartley_osc_pss.cir , * (new) examples/ring_osc_pss.cir , * (new) examples/vackar_osc_pss.cir , * (new) examples/vdp_osc_pss.cir : Moved example files for pss from Stefano Perticaroli from tests/ to the examples directory. 2011-08-07 Robert Larice * src/xspice/cmpp/mod_lex.l : allow '//' comments in xspice code models Bugs item #3387331 `Be careful when using "//" in codemodel sources' https://sourceforge.net/tracker/?func=detail&atid=423915&aid=3387331&group_id=38962 2011-08-07 Robert Larice * src/frontend/shyu.c : fix a `strict-aliasing' warning warning: dereferencing pointer 'current' does break strict-aliasing rules FIXME, this code is, and was broken. in if_sens_run() error messages are generated, and then ignored. 2011-08-07 Robert Larice * configure.ac : use -O1 when debugging, otherwise gcc ignores -Wuninitialized this is temporary, and certainly will confuse users of gdb obviously somewhere around gcc version 4.4 the necessity to have enable optimization for detecting uninitialized variables was dropped. stable Debian's gcc is a 4.4 and still needs -O1 ... 2011-08-06 Dietmar Warning * bsim4v4/b4v4set.c: fix missing model parameter defaults * b4check.c, b4v4check.c, b4v5check.c: add "4.x" as a short form for version 2011-08-06 Robert Larice * src/frontend/shyu.c : fix use of possibly uninitialized variables, return on error 2011-08-06 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : reposition NG_IGNOREABLE for non C99 compiler compatibility 2011-08-06 Robert Larice * src/maths/cmaths/Makefile.am , * src/maths/cmaths/cmath1.c , * src/maths/cmaths/test_cx_cph.c : cph(vec), rewrite, cleanup, and add missing test_cx_cph.c 2011-08-06 Holger Vogt * fteext.h, cmaths/makefile.am, cmath1.c, cmath1.h, parse.c: function cph(vec) delivers phase from a vector without jumps at +-PI 2011-08-06 Robert Larice * src/frontend/com_sysinfo.c , * src/frontend/resource.c : complete `replace size_t by unsigned long long' 2011-08-06 Robert Larice * src/frontend/shyu.c : bug fix, tranJob was used instead of pssJob 2011-08-06 Robert Larice * src/winmain.c : another type fix for Visual Studio, QUIT_BUTTON_ID 2011-08-06 Robert Larice * src/spicelib/devices/dev.c : fix broken commit `type fix for Visual Studio' 2011-08-06 Holger Vogt * inpcom.c: code beautify, bug no. 3386184 * resource.c, resource.h, com_sysinfo.c: replace size_t by unsigned long long 2011-08-05 Robert Larice * src/spicelib/devices/dev.c : type fix for Visual Studio 2011-08-05 Robert Larice * src/include/ngspice.h : disable Visual Studio "warning: C4127: conditional expression is constant" 2011-08-05 Robert Larice * src/maths/cmaths/cmath2.c : rewrite to fix potential (actuall impossible) usage of variable `c' 2011-08-05 Robert Larice * src/spicelib/parser/inp2m.c : fix warning of potential (actuall impossible) usage of uninitialized node5..7 2011-08-04 Holger Vogt * dcpss.c: tiny update to obtain compilation with MS VS 2008, code beautyfied * winmain.c, dcpss.c: Windows progress message improved 2011-08-04 Paolo Nenzi * (new) tests/pss , * (new) tests/pss/colpitt_osc_pss.cir , * (new) tests/compl_cross_quad_osc_pss.cir , * (new) tests/hartley_osc_pss.cir , * (new) tests/ring_osc_pss.cir , * (new) tests/vackar_osc_pss.cir , * (new) tests/vdp_osc_pss.cir : Added example files for pss from Stefano Perticaroli. 2011-08-04 Robert Larice * src/frontend/commands.c , * src/frontend/runcoms.c , * src/frontend/runcoms.h , * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/include/Makefile.am , * src/include/cktdefs.h , * src/spicelib/analysis/Makefile.am , * src/spicelib/analysis/analysis.c , * src/spicelib/parser/inp2dot.c , * (new) src/include/pssdefs.h , * (new) src/spicelib/analysis/dcpss.c , * (new) src/spicelib/analysis/pssaskq.c , * (new) src/spicelib/analysis/pssinit.c , * (new) src/spicelib/analysis/psssetp.c : Committed PSS (Periodic Steady State Analysis) code from Stefano Perticaroli. The analysis is based on the transient analysis and is able to predict the fundamental frequency and amplitude (and also harmonics) for autonomous systems. 2011-08-04 Robert Larice * src/spicelib/analysis/cktsetbk.c : bug fix, broken insert at the front of CKTbreaks[] 2011-08-03 Holger Vogt * ivars.c update for LINUX * tclspice.c, nghelp.c, spiced.c: ivars(NULL) * main.c: reference to memory leak checker for Windows removed * visualc/vngspice.sln, visualc\vngspice.vcproj: 32 and 64 bit 2011-07-30 Dietmar Warning * adms/ekv/admsva/ekv.va: semicolon after macro expl was wrong * adms/mextram/admsva: update va code from version 504.7 to 504.9.1 2011-07-27 Holger Vogt * inpcom.c: nested parens, line 2963 ff * cmutil.c: inlude ngspice.h for NaN 2011-07-26 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : lower-case the first string in an IOP("HuGo",...) incantation 2011-07-26 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspice.xml : remove perl command in generated Makefime.am which lower-case'ed the first string in an IOP("HuGo",...) incantation 2011-07-26 Robert Larice * src/include/ngspice.h , * src/spicelib/devices/adms/admst/ngspice.xml : swallow unsed variable warnings in adms generated code, upagrade dependencies 2011-07-26 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspice.xml : Fixed code generation for ekv by adding definition of min and max and logE. 2011-07-25 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspice.xml : fixed handling of expressions used as default value in parameter definition: parameter real p=ln(q) 2011-07-25 Robert Larice * src/spicelib/devices/adms/admst/ngspice.xml : convert K&R function definitions to ansi style and declare are debug function `static' 2011-07-24 Robert Larice * src/frontend/plotting/plotit.c : cleanup getlims() and plug a memory leak 2011-07-24 Robert Larice * src/xspice/ipc/ipcstdio.c : (int) cast, where size can be expected to be small enough 2011-07-24 Robert Larice * src/misc/util.c : use size_t 2011-07-24 Robert Larice * src/spicelib/parser/inp2m.c : avoid incorrect bindnodes when falling back to a 4 node device thats a polish of saj's fix from 2003-07-23 2011-07-24 Robert Larice * src/spicelib/devices/bsim3soi_dd/b3soiddld.c : bug fix, incomplete check for NAN did this `TURKEY' try to fool the poor old man's eyes, who is named `Alberto' ? 2011-07-24 Robert Larice * src/spicelib/analysis/acan.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/noisean.c : polish saj's resume fix, use it for `acan' as well saj's fix was applied 2003-07-23 19:36 avoid (non)-usage of uninitialized variables FIXME, get rid of the `evil' number `666', find a better solution 2011-07-24 Robert Larice * src/spicelib/analysis/noisean.c : bug fix, stepsize in `noisean' 2011-07-23 Robert Larice * src/frontend/resource.c , * src/frontend/resource.h : use #include and size_t for portability 2011-07-23 Robert Larice * src/xspice/cm/cmutil.c : fix usage of an uninitialized variable 2011-07-23 Robert Larice * src/spicelib/analysis/cktsens.c : fix usage of an uninitialized variable 2011-07-23 Robert Larice * src/ciderlib/oned/oneprint.c , * src/ciderlib/twod/twoprint.c : use #include to platform independent print 'size_t' variables 2011-07-23 Robert Larice * autogen.sh : update for --adms3 2011-07-23 Dietmar Warning * ngspiceMODULE.c.xml, ngspiceMakefile.am.xml: lower case substitution in xml module instead with perl in make process 2011-07-22 Laurent Lemaitre * ngspice.xml: add code to create Makefile.am using flag --create_makefile_am at admsXml command line 2011-07-21 Laurent Lemaitre * ngspice.xml: resync with adms api changes 2011-07-20 Holger Vogt * commands.c, runcoms2.c, runcoms2.h: command 'remcirc': remove the current circuit plotting.c: replace the ancient date by the build date 2011-07-17 Robert Larice * src/frontend/plotting/plotit.c : cleanup, `getlims()' has to be used with number arg >= 1 and get rid of an ancient hack 2011-07-17 Robert Larice * src/frontend/arg.c , * src/frontend/com_hardcopy.c : cleanup usage of `prompt()' and get rid of an ancient hack 2011-07-17 Robert Larice * src/frontend/com_fft.c , * src/frontend/inpcom.c : cleanup, reduce compiler warnings 2011-07-17 Robert Larice * src/misc/hash.c : nghash cleanup, use `%p' to print a pointer value 2011-07-17 Robert Larice * src/include/hash.h , * src/misc/hash.c : nghash cleanup, use stdint.h for proper sized integers representing a pointer 2011-07-17 Robert Larice * visualc/include/inttypes.h , * visualc/include/stdint.h : add inttypes.h and stdint.h for visualc from http://code.google.com/p/msinttypes/ 2011-07-17 Robert Larice * src/maths/cmaths/cmath2.c : cleanup redeclarations for todays tanh commit 2011-07-17 Holger Vogt * inp.c: allow comment lines inside of command files 2011-07-17 Robert Larice * src/include/hash.h , * src/misc/hash.c : nghash cleanup 2011-07-17 Holger Vogt * cmath1.c, cmath1.h, cmath2.c, cmath2.h, parse.c, fteext.h: new complex functions sinh, cosh, tanh * evaluate.c: remove redundant call to cmath2.h 2011-07-10 Holger Vogt * main.c, ivars.c, /xspice/icm/analog/file_source/cfunc.mod: environmental variable NGSPICE_INPUT_DIR for additional search directory for input file 2011-07-10 Robert Larice * src/winmain.c , * src/frontend/wdisp/winprint.c : cleanup integer type conversions 2011-07-10 Robert Larice * src/frontend/wdisp/windisp.c : SetWindowLongPtr() and SetClassLongPtr() for 64bit compatibility 2011-07-09 Holger Vogt * input.c: definition of _read only for Windows console 2011-07-09 Robert Larice * src/frontend/gens.c , * src/frontend/subckt.c , * src/frontend/numparam/xpressn.c , * src/maths/sparse/spfactor.c , * src/spicelib/parser/inpgtok.c , * src/xspice/cm/cm.c : explicit `int' casts for some ptrdiff_t expressions, where an `int' seems to be big enough 2011-07-09 Robert Larice * src/ngsconvert.c , * src/misc/misc_time.c : some explicit `int' casts 2011-07-09 Robert Larice * src/spicelib/devices/ltra/ltraacld.c , * src/frontend/trannoise/1-f-code.c : some long versus int type fixes 2011-07-09 Robert Larice * src/frontend/com_fft.c : possibly inexact long -> double cast 2011-07-09 Robert Larice * src/frontend/inpcom.c , * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c' : remove unused global artifact `dynLlen' 2011-07-09 Robert Larice * src/frontend/com_sysinfo.c , * src/winmain.c : cleanup integer type conversions 2011-07-09 Robert Larice * src/ngsconvert.c , * src/frontend/inp.c , * src/frontend/nutinp.c , * src/frontend/outitf.c , * src/frontend/help/readhelp.c : cleanup fseek() usage 2011-07-08 Holger Vogt * display.c: replace error message by appropriate warning, if compiled as console application under MS Windows 2011-07-04 Holger Vogt * input.c: add ssize_t as SSIZE_T for MS Visual Studio 2011-07-03 Holger Vogt * main.c: remove reference to 'oflag' * ngspice.h: NaN definition for MS VS 2011-07-03 Robert Larice * man/man1/ngnutmeg.1 , * man/man1/ngspice.1 : spelling fixes from debian `ngspice_23-1.debian.tar.gz', thank you ! 2011-07-03 Robert Larice * configure.ac : enable -Wconversion remove -Wimplicit-function-declaration since its implicit in -Wall Note: -Wuninitialized is implicit in -Wall but may not be effective for -O0 2011-07-03 Robert Larice * src/Makefile.am , * src/makeidx.c : upgrade ngmakeidx to support build in a sparate directory 2011-07-02 Robert Larice * src/main.c : main.c, a series of cleanups concerning SETJMP processing two issues surfaced in the original code: - nutmeg called with no file, propably should default to rawspice.raw still so, but now plain visable. shall we fix ? - there was a possiblility of endless recursion when a failure happened during init processing 2011-07-02 Robert Larice * src/main.c : main.c, a series of cleanups 2011-07-02 Dietmar Warning * /devices/bsim4v4, /devices/bsim4v5, /devices/bsim4v6: bsim4vXnoi.c correct the multiplier entry for channel thermal noise 2011-07-02 Robert Larice * src/main.c : remove redundant variable `has_smk' 2011-07-02 Robert Larice * src/main.c : print_news() 2011-07-01 Robert Larice * src/main.c , * src/nghelp.c , * src/winmain.c : winmain.c, remove redundant global variable `oflag' 2011-07-01 Robert Larice * src/xspice/cmpp/mod_lex.l : minor bug fix, use EOF 2011-07-01 Robert Larice * src/frontend/help/textdisp.c : textdisp.c, minor rewrite to swallow type conversion warnings 2011-06-30 Robert Larice * src/frontend/com_measure2.c : surpress warnings, disable currently unused functions 2011-06-30 Robert Larice * src/frontend/plotting/x11.c : remove compiler warnings by explicit casting double -> int etc. extend Holger's commit from 2011-06-11 to x11.c FIXME, consider rounding towards nearest instead of towards zero 2011-06-30 Robert Larice * src/spicelib/devices/hisim2/hsm2eval.c , * src/spicelib/devices/hisimhv/hsmhveval.c : hsm2eval.c, hsmhveval.c, swallow type conversion warnings 2011-06-30 Dietmar Warning * src/spicelib/devices/hisim2/hsm2eval.c: use macros for CeilingPow() and smoothZero() instead of static functions 2011-06-30 Robert Larice * src/ciderlib/oned/oneadmit.c , * src/ciderlib/twod/twoadmit.c : oneadmit.c twoadmit.c, uninitialized variable warning 2011-06-30 Robert Larice * src/ciderlib/support/suprmitf.c : suprmitf.c, uninitialized variable warning 2011-06-30 Robert Larice * src/frontend/com_measure2.c : com_measure2.c, uninitialized variable warning 2011-06-30 Robert Larice * src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/hisim2/hsm2noi.c , * src/spicelib/devices/hisimhv/hsmhvnoi.c : use TMALLOC, funcall, and NULL casts 2011-06-30 Robert Larice * src/xspice/cm/cm.c : cm.c, swallow type conversion warnings 2011-06-30 Robert Larice * src/spicelib/devices/bjt/bjtdefs.h , * src/spicelib/devices/dio/diodefs.h : BJTtlev, BJTtlevc, DIOtlev, DIOtlevc, swallow type conversion warnings 2011-06-30 Robert Larice * src/spicelib/devices/cpl/cplmpar.c , * src/spicelib/devices/isrc/isrcpar.c , * src/spicelib/devices/vsrc/vsrcpar.c : copy_coeffs(), swallow type conversion warnings 2011-06-26 Robert Larice * src/include/hash.h , * src/misc/dstring.c , * src/misc/hash.c : swallow type conversion warnings FIXME, get rid of this homegrown printf implementation (dstring.c) 2011-06-26 Dietmar Warning * devices/bsim4/b4temp.c: zero init with TMALLOC instead of malloc a missing pParam->BSIM4tvoffcv = 0; is the actual culprit. * devices/bsim4/b4noi.c: correct init the correlated noise slot in noiseDens and lnNdens vector, bug should be reported to bsim4 developer team. 2011-06-25 Holger Vogt * ivars.c, ivars.h, inpcom.c, inp.c, util.c, util.h: rename internal fcn dirname() to ngdirname() because it is different from LINUX dirnam(). * analog/file_source/cfunc.mod: remove implicit char to char* conversion 2011-06-25 Robert Larice * src/ngsconvert.c : ngsconvert.c, swallow type conversion warnings this case (tp == VF_REAL) && iscomplex(v) was actually buggy, but couldn't ever happen 2011-06-25 Robert Larice * src/xspice/ipc/ipc.c , * src/xspice/ipc/ipcsockets.c : ipc.c and ipcsockets.c, swallow type conversion warnings 2011-06-25 Robert Larice * src/frontend/plotting/graf.c : graf.c, swallow type conversion warnings 2011-06-25 Holger Vogt * main.c, defines.h: improved shutdown message for Windows GUI * cpitf.c, ngspice.h, ivars.c, ivars.h, analog/file_source/cfunc.mod: Add reading an environmental variable NGSPICE_INPUT to hold a path where input files are searched for (in addition to existing search paths), e.g. *.cir in -b and interactive mode, include and library files, filesource input file. 2011-06-24 Robert Larice * src/main.c , * src/frontend/com_ahelp.c , * src/frontend/inpcom.c , * src/frontend/numparam/mystring.c , * src/frontend/numparam/xpressn.c , * src/frontend/trannoise/wallace.c , * src/spicelib/parser/inp2r.c , * src/xspice/icm/analog/file_source/cfunc.mod : swallow type conversion warnings 2011-06-24 Robert Larice * src/ciderlib/oned/oneprint.c , * src/ciderlib/twod/twoprint.c : tiny rewrite, swallow type conversion warnings 2011-06-24 Robert Larice * src/frontend/com_sysinfo.c : tiny rewrite, swallow type conversion warnings 2011-06-23 Robert Larice * src/xspice/mif/mifgetvalue.c : tiny rewrite, round to nearest integer and reset errno for strtol() 2011-06-23 Holger Vogt * src/xspice/icm/analog/modpath.lst , * src/xspice/icm/analog/file_source/cfunc.mod , * src/xspice/icm/analog/file_source/ifspec.ifs : code model with input from file added (T. Sailer) * examples/xspice/fstest.sp , * examples/xspice/sine.m : test of 'filesource' * inpcom.c: bug no. 3317928, patched by Robert 2011-06-23 Robert Larice * src/frontend/options.c , * src/frontend/spiceif.c , * src/frontend/variable.c : round to nearest integer, `rawfileprec' `numdgt' `history' if_option() doset() 2011-06-23 Robert Larice * src/frontend/evaluate.c : `[]' indexing operator, round index to nearest integer 2011-06-23 Robert Larice * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod : malloc return value cast 2011-06-23 Robert Larice * src/ciderlib/oned/onemesh.c , * src/spicelib/devices/nbjt/nbjttemp.c : tiny rewrite, (integer + integer)/2 2011-06-23 Robert Larice * src/frontend/evaluate.c , * src/misc/hash.c , * src/spicelib/devices/ltra/ltraset.c , * src/xspice/evt/evtdump.c : function pointer invocation, (*p)(...) ---> p(...) 2011-06-23 Robert Larice * src/main.c : tiny fix, reoccuring option `h' in the getopt_long() option string 2011-06-23 Robert Larice * src/frontend/com_sysinfo.c : tiny rewrite, typefix, don't compare EOF with a char 2011-06-23 Holger Vogt * measure.c: another try to obtain correct vector handling 2011-06-22 Robert Larice * src/ngsconvert.c , * src/frontend/outitf.c , * src/frontend/rawfile.c , * src/frontend/help/readhelp.c , * src/misc/dstring.c , * src/misc/hash.c : remove some useless casts 2011-06-22 Robert Larice * src/spicelib/devices/bsim4/b4geo.c , * src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/bsim4/b4temp.c : cleanup bsim4 prototypes 2011-06-22 Robert Larice * src/frontend/commands.c , * src/frontend/misccoms.h , * src/frontend/rawfile.c , * src/frontend/vectors.c , * src/frontend/plotting/pvec.c , * src/include/fteext.h : cleanup some reoccuring function prototypes 2011-06-22 Robert Larice * src/spicelib/analysis/Makefile.am , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktdelt.c , * visualc/vngspice.vcproj : remove ancient artifact "ckt.h" 2011-06-19 Dietmar Warning * Code merged into bsim4v4: Code diff's from formerly version 4v2 and 4v3 merged into 4v4, selectable by "version=4.x.0" model parameter (x=2,3 ... 4) * Update to version 4.7.0: new code into bsim4 folder, Version 6 is now in new folder bsim4v6, OpenMP implemented, Update of tests/bsim4 to new version * res/resnoise.c, analysis/nevalsrc.c: Name changed NevalSrc2 to NevalSrcInstanceTemp and include new bsim4 function NevalSrc2 2011-06-18 Holger Vogt * measure.c: revert a change from Feb. 19th, 2011 to reinstate from=dfall inpcom.c, defines.h: allow / and \ in file paths under MS Windows inp.c: some comment added /examples/measure/simple-meas-tran.sp: another .measure example 2011-06-11 Holger Vogt * onemesh.c misc.c com_compose.c com_fft.c evaluate.c hpgl.c linear.c misccoms.c options.c points.c rawfile.c spec.c spiceif.c variable.c complete.c clip.c graf.c plot5.c plotit.c spbuild.c dctrcurv.c distoan.c noisean.c nbjttemp.c urcsetup.c ipc.c ipcstdio.c mifgetvalue.c postsc.c grid.c hash.c cktsens.c: remove compiler warnings by explicit casting double -> int etc. ============================ ngspice-23 ================================== 2011-06-04 Holger Vogt * tests/bin/ngspice.pm: version 23 2011-06-02 Robert Larice * src/frontend/com_let.c : bug fix, avoid segfault when indexing a vector with a nonexistant variable let foo = thing[nonsuchthing] 2011-06-02 Robert Larice * src/frontend/postcoms.c : bug fix, avoid $curplot (plot_names) being assembled from negative numbers The variable `plot_num' is exclusively used to build plotnames, via sprintf(plot_name, "dc%d", plot_num) expressions Thus plot_num may never be decremented. Otherwise expressions of sort dc-2.var can't be parsed 2011-06-02 Robert Larice * src/frontend/plotting/graf.c , * src/frontend/plotting/x11.c : fix a segfault, when invoking `destroy' while running in batch mode on unix 2011-06-02 Robert Larice * src/frontend/evaluate.c : fix a segfault, incorrect invocation of free() seen with expressions like v(node)[0] 2011-06-02 Holger Vogt * tests/hisim/makefile.am: no more test1.cir in EXTRA_DIST * INSTALL, compile_min.sh: new instructions for mingw compilation 2011-06-01 Dietmar Warning * devices/bjt/bjt.c: introduce ccs as an alias for the zero bias substrate junction capacitance cjs 2011-06-01 Robert Larice * src/Makefile.am : update tclspice to support build in a sparate directory 2011-05-31 Robert Larice * tests/bin/check_cmc.sh , * tests/bin/runQaTests.pl , * tests/bin/run_cmc_check , * tests/hisim/Makefile.am , * tests/hisimhv/Makefile.am : CMC test suite, fix choice of results subdirectory 2011-05-31 Robert Larice * tests/bsim3soifd/RampVg2.out , * tests/bsim3soifd/inv2.out , * tests/bsim3soifd/t3.out , * tests/bsim3soifd/t4.out , * tests/bsim3soifd/t5.out , * tests/filters/lowpass.out , * tests/general/mosmem.out , * tests/mesa/mesa11.out , * tests/polezero/filt_bridge_t.out : massage some tests/* reference files 2011-05-31 Robert Larice * src/Makefile.am , * tests/Makefile.am , * tests/hisim/Makefile.am , * tests/hisimhv/Makefile.am : updates for `make dist' 2011-05-30 Robert Larice * tests/bin/check_cmc.sh : incorporate CMC test suite into make target 'check' 2011-05-30 Robert Larice * configure.ac , * tests/bin/modelQaTestRoutines.pm , * tests/bin/ngspice.pm , * tests/bin/runQaTests.pl , * tests/bin/run_cmc_check , * tests/hisim/Makefile.am , * tests/hisimhv/.cvsignore , * tests/hisimhv/Makefile.am : incorporate CMC test suite into make target 'check' 2011-05-29 Holger Vogt * winmain.c, winmain.h: prototypes and forwards 2011-05-29 Robert Larice * Removed tests/hisimhv/nmos/Makefile , * Removed tests/hisimhv/pmos/Makefile , * Removed tests/hisim/nmos/Makefile , * Removed tests/hisim/pmos/Makefile , * Added tests/bin/run_cmc_check , * Modified tests/hisimhv/nmos/run , * Modified tests/hisimhv/pmos/run , * Modified tests/hisim/nmos/run , * Modified tests/hisim/pmos/run : CMC test suite, cleanup use /bin/sh instead of /bin/csh replace the makefiles with a single script 2011-05-29 Holger Vogt * main.c, inpcom.c, numparam.h, spicenum.c, xpressn.c, compatmode.h, b3v1.c: compatibility issues 2011-05-28 Dietmar Warning * tests/hisim, tests/hisimhv: include the CMC test suite (Author: Colin McAndrew) provided by the model developer - Hiroshima University 2011-05-28 Holger Vogt * configure.ac, visualc/config.h, CPOYING, FAQ, INSTALL, NEWS: update to prepare release 23 2011-05-28 Robert Larice * src/ngsconvert.c : bug fix, (#3188327), segfault in ngsconvert thanks to Ed Spittles http://sourceforge.net/tracker/?func=detail&aid=3188327&group_id=38962&atid=423915 2011-05-23 Holger Vogt * configure.ac: remove reference to devices/hisim/makefile (line 1035) 2011-05-23 Holger Vogt * windisp.c: bug no. 3263437 (fix thanks to Robert) 2011-05-23 Dietmar Warning * src/spicelib/devices/hisim2/*.c, *.h: Some changes for MS visualc and suppr. warnings * src/spicelib/parser/inpdomod.c: hisim is now level=61, compatible with STARC * visualc/vngspice.vcproj: substitute hisim1 with hisim2 2011-05-22 Robert Larice * configure.ac , * src/spicelib/devices/Makefile.am : hisim2, add hisim2 to configure.ac etc 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2itf.h : hisim2, fix hsm2itf.h 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/Makefile.am , * src/spicelib/devices/hisim2/hsm2init.c , * src/spicelib/devices/hisim2/hsm2init.h : hisim2, add ngspice specific hsm2init.[ch] 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2set.c : hisim2, add HSM2unsetup() 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2def.h : hisim2, add ngspice specific GENinstance struct slot 'HSM2owner' aka `GENowner' 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2eval.c : hisim2, drop unused static functions (swallow warnings) 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2eval.c , * src/spicelib/devices/hisim2/hsm2temp.c : hisim2, drop unused vars (swallow warnings) 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2noi.c : hisim2, fix NevalSrc(), Nintegrate() redeclaration 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2noi.c : hisim2, drop (GENERIC **) NULL pointer casts 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2cvtest.c , * src/spicelib/devices/hisim2/hsm2ld.c : hisim2, rename FABS() -> fabs() 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/* : hisim2, convert K&R function definitions to ansi style 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2noi.c : hisim2, remove #include "fteconst.h" 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/* : hisim2, use NG_IGNORE() (swallow warnings) 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/* : hisim2, remove #include "util.h" 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/* : hisim2, #include "spice.h" --> "ngspice.h" 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/hsm2eval.c : hisim2, remove unused labels (swallow warnings) 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/Makefile.am , * src/spicelib/devices/hisim2/.cvsignore : hisim2, new files Makefile.am and .cvsignore 2011-05-22 Robert Larice * src/spicelib/devices/hisim2/* : hisim2, populate this new directory with files from HiSIM_2.5.1_Release_20110407.zip unchanged, from HiSIM_2.5.1_Release_20110407/HiSIM_2.5.1_C-Code/hisim2/ 2011-05-21 Robert Larice * src/spicelib/devices/hisimhv/hsmhvset.c : extend HSMHVunsetup() to process some more CKTmkVolt() generated nodes FIXME, there are still some more to fix 2011-05-21 Holger Vogt * windisp.c, winprint.c, windisp.h, winprint.h, display.c xdisplay.c, winmain.c: reduce compiler warnings 2011-05-20 Robert Larice * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml: revert ngspiceMakfile.am.xml 2011-05-19 Dietmar Warning * spicelib/devices/bsim3v32/b3v32temp.c: move the mulu0 entry outside the size dependent section, like delvto 2011-05-19 Robert Larice * autogen.sh : update --adms3 2011-05-19 Robert Larice * autogen.sh : add --adms3 to autogen.sh 2011-05-19 Robert Larice * src/spicelib/parser/inpptree-parser.c, * src/spicelib/parser/inpptree-parser.h, * src/frontend/parse-bison.c, * src/frontend/parse-bison.h: undo the accidental commit of intemediate files 2011-05-19 Laurent Lemaitre remove usage of ngspiceVersion.xml in autogen.sh 2011-05-19 Laurent Lemaitre all xml files are concatenated into one single file ngspice.xml - except ngspiceMakefile.am.xml 2011-05-15 Holger Vogt * inp2z.c: remove checking for thismodel->INPmodType because this might lead to segfault if the user supplies a wrong ZXXXXX input 2011-05-08 Robert Larice * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/spicelib/analysis/cktdest.c , * src/spicelib/analysis/cktdltm.c , * src/spicelib/analysis/cktdltn.c , * src/spicelib/analysis/cktdojob.c , * src/spicelib/analysis/cktfnda.c , * src/spicelib/analysis/cktgrnd.c , * src/spicelib/analysis/cktneweq.c , * src/spicelib/analysis/cktnewn.c , * src/spicelib/analysis/cktparam.c , * src/spicelib/analysis/ckttroub.c , * src/spicelib/devices/cktask.c , * src/spicelib/devices/cktbindnode.c , * src/spicelib/devices/cktcrte.c , * src/spicelib/devices/cktfinddev.c , * src/xspice/ipc/ipctiein.c : mop up some fixme comments 2011-05-08 Robert Larice * src/frontend/help/x11disp.c : cleanup Xt usage 2011-05-08 Robert Larice * xgraph/alloc.c : rename macros public and private --> PUBLIC and PRIVATE 2011-05-08 Robert Larice * src/xspice/cmpp/mod_yacc.y , * src/xspice/icm/analog/multi_input_pwl/cfunc.mod : rename variable private --> mif_private 2011-05-07 Dietmar Warning * src/Makefile.am: change lib order for linking with gcc4 to prevent unresolved symbols * xspice/cmpp/Makefile.am: there are flex'es, which not accept "-o outfile" but accept "-ooutfile" 2011-05-05 Dietmar Warning * spicelib/devices/bsim3v32/*.c, *.h: allow delvto and mulu0 as instance parameter, usefull for stress amn mismatch simulations 2011-05-04 Dietmar Warning * spicelib/parser/inpdomod.c: vbic now accept level 4 and 9 * DEVICES: update and include HiSIM HV model. 2011-05-03 Holger Vogt * x11.c, graph.h: move #define NUMCOLORS to x11.c to avoid redefinition under MS Visual Studio 2011-05-01 Robert Larice * src/frontend/outitf.c , * src/spicelib/analysis/cktpzstr.c , * src/spicelib/devices/hisim/hsm1eval1_1.c : spelling fixes from debian, thank you ! 2011-05-01 Robert Larice * src/spicelib/parser/inpdomod.c : mop up, in the shadow of the last commits 2011-05-01 Robert Larice * src/spicelib/parser/inpdomod.c : rename variable typename --> type_name 2011-05-01 Robert Larice * src/xspice/cmpp/ifs_yacc.y : rename variable class --> ctype_class 2011-05-01 Robert Larice * src/frontend/parser/complete.c , * src/include/cpextern.h : rename variable class --> kw_class 2011-05-01 Robert Larice * src/spicelib/analysis/analysis.c , * src/spicelib/analysis/analysis.h , * src/spicelib/analysis/cktdojob.c , * src/spicelib/analysis/ckttroub.c : rename struct member public --> if_analysis 2011-05-01 Robert Larice * src/frontend/help/x11disp.c : rename function delete --> delete_w 2011-05-01 Robert Larice * src/spicelib/parser/inpaname.c , * src/spicelib/parser/inpdpar.c , * src/spicelib/parser/inppname.c , * src/xspice/mif/mifgetmod.c : mop up, in the shadow of the last two commits 2011-05-01 Robert Larice * src/spicelib/parser/inpgmod.c , * src/xspice/mif/mifgetmod.c : cleanup, (modtmp) --> modtmp 2011-05-01 Robert Larice * src/spicelib/parser/inpaname.c , * src/spicelib/parser/inpdpar.c , * src/spicelib/parser/inpgmod.c , * src/spicelib/parser/inppname.c , * src/spicelib/parser/inptyplk.c , * src/xspice/mif/mifgetmod.c : cleanup, some more (*p).foo --> p->foo 2011-04-30 Robert Larice * src/spicelib/devices/cktbindnode.c , * src/spicelib/devices/hisimhv/hsmhvmask.c , * src/spicelib/devices/hisimhv/hsmhvpzld.c : c89 compatibility, move NG_IGNORE() after declarations 2011-04-30 Robert Larice * src/spicelib/devices/hisimhv/hsmhvask.c , * src/spicelib/devices/hisimhv/hsmhvld.c , * src/spicelib/devices/hisimhv/hsmhvmask.c , * src/spicelib/devices/hisimhv/hsmhvpar.c , * src/spicelib/devices/hisimhv/hsmhvpzld.c : warnings, use NG_IGNORE() 2011-04-30 Robert Larice * configure.ac : re-enable unused-parameter Warnings 2011-04-30 Robert Larice * **/* : various cleanups - usage of cp_getvar(), receives a void* in the third arg, thus remove casts FIXME, this function signature is error prone - use NG_IGNORE() - casts and prototypes 2011-04-29 Robert Larice * src/spicelib/devices/hisimhv/hsmhvnoi.c , * src/spicelib/devices/hisimhv/hsmhvset.c : minor bug fix (broken diagnostic printout) and swallow some warnings 2011-04-29 Robert Larice * src/spicelib/devices/hisimhv/hsmhvdef.h : hisimhv implementation, ngspice has one more slot (GENowner) in GENinstance 2011-04-29 Dietmar Warning * src/spicelib/devices/hisimhv/** : * **/* : add the HiSIM_HV model vers. 1.2.1 2011-04-28 Robert Larice * src/frontend/inpcom.c , bug fix, (#329233) http://sourceforge.net/tracker/?func=detail&atid=423915&aid=3292330&group_id=38962 this fix is for E1 OUT 0 vol='V(IN)>1 && V(IN)>0 ? 1 : 0' FIXME, INPevaluate() should skip a trailing `unit' string FIXME, E1 OUT 0 vol='(V(IN)>1) and (V(IN)>0) ? 1 : 0' this is simply incorrect syntax, but shoudn't segfault. inp_chk_for_multi_in_vcvs() is much to simple minded. 2011-04-28 Robert Larice * src/main.c , * src/frontend/com_measure2.c , * src/frontend/inpcom.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c , * src/spicelib/devices/cpl/cplsetup.c , * src/spicelib/devices/isrc/isrcacct.c , * src/spicelib/devices/vsrc/vsrcacct.c : code cleanup, some warnings, some casts, ... 2011-04-28 Robert Larice * */** : code cleanup, drop NULL pointer casts 2011-04-28 Robert Larice * src/frontend/plotting/x11.c , * src/frontend/plotting/x11.h : cleanup x11 code 2011-04-27 Dietmar Warning * /devices/bjt2: removed - all GP extensions of this model are now in the bjt model, see Changelog 2011-03-03 and 2011-03-10 2011-04-27 Robert Larice * */** : code cleanup function pointer invocation, (*p)(...) ---> p(...) structure access, (*p).foo ---> p->foo some casts, etc 2011-04-17 Dietmar Warning * /bsim3v2/b3v2set.c, /bsim3/b3set.c: allow multiple call to setup w/ correct node collapsing 2011-04-15 Robert Larice * src/spicelib/analysis/cktsens.c : fix allocation and ownership of auxiliary CKTmatrix CKTrhs etc objects FIXME: invoke release_context() when returning due to errors 2011-04-12 Dietmar Warning * devices: merged bsim3v1a code with bsim3v0 * devices: merged bsim3v1s code with bsim3v1 * update this situation to DEVICES, configure.ac, src/Makefile.am, spicelib/parser/inpdomod.c, inp2m.c, devices/dev.c 2011-04-09 Robert Larice * src/frontend/plotting/x11.c : bugfix, segfault when closing a plot window fix the fix from 2011-02-11 currentgraph is a dynamical scoped variable in response to http://sourceforge.net/tracker/?func=detail&atid=423915&aid=3263437&group_id=38962 FIXME/DONE, need to be fixed for ms-windows as well 2011-04-09 Robert Larice * src/spicelib/analysis/cktsens.c : bugfix, fix sensitvity calculation (for the dc-2+.cir testcase) 2011-04-02 Robert Larice * src/frontend/plotting/x11.c : extend the fix from 2011-02-11 for other ways of closing a plot window. in response to http://sourceforge.net/tracker/?func=detail&atid=423915&aid=3263437&group_id=38962 2011-03-24 Dietmar Warning * xspice/icm/GNUmakefile.in: sun cc needs modified dependency flags (-xMD) 2011-03-18 Dietmar Warning * frontend/typedefs.c, outitf.c: bug no. 3214252 fixed 2011-03-16 Dietmar Warning * plotit.c: fix the wrong x-axis label for temp-sweep and res-sweep by using macros SV_XXX for vector types 2011-03-13 Dietmar Warning * analysis.h, typedefs.h, misc. bXtemp.c: skip printout in bsimtemp for sens analysis * bsim2/bsim2def.h: int for XPARTS flag in ancient debug usage 2011-03-10 Dietmar Warning * src/spicelib/devices/bjt: nkf additional beta rolloff exponent parameter 2011-03-07 Holger Vogt * inpcom.c: bug no. 3201331 fixed 2011-03-04 Robert Larice * src/spicelib/devices/isrc/isrcdefs.h : bug fix, isrc polarity inversion my commit `vsrc, isrc, cleanup aiming for more similarity' from 2011-02-27 changed the polarity of the `isrc' current. the structure definition somewhere has an `overlay', how *evil* ! 2011-03-03 Dietmar Warning * diode & bjt temperature model update tlev, tlevc * cktsgen.c: segfault fix 2011-02-28 Robert Larice * src/spicelib/devices/isrc/isrcacct.c , * src/spicelib/devices/isrc/isrcload.c : merge vsrc PULSE -> isrc to fix PHASE != 0, see commit from 2010-11-21 2011-02-28 Robert Larice * src/spicelib/devices/isrc/isrc.c , * src/spicelib/devices/isrc/isrcacct.c , * src/spicelib/devices/isrc/isrcask.c , * src/spicelib/devices/isrc/isrcdefs.h , * src/spicelib/devices/isrc/isrcload.c , * src/spicelib/devices/isrc/isrcpar.c , * src/spicelib/devices/vsrc/vsrc.c , * src/spicelib/devices/vsrc/vsrcload.c : merge TRRANDOM vsrc -> isrc see commit from 11-01-16 2011-02-27 Robert Larice * src/spicelib/devices/isrc/* , * src/spicelib/devices/vsrc/* : vsrc, isrc, whitespace cleanup 2011-02-27 Robert Larice * src/spicelib/devices/isrc/* , * src/spicelib/devices/vsrc/* : vsrc, isrc, cleanup aiming for more similarity 2011-02-27 Robert Larice * src/spicelib/devices/isrc/isrc.c , * src/spicelib/devices/vsrc/vsrc.c : vsrc, isrc, parameter descriptors, synchronize to each other 2011-02-27 Robert Larice * src/spicelib/devices/isrc/isrcpar.c , * src/spicelib/devices/vsrc/vsrcpar.c : vsrc, isrc, merge checks for length of vector parameters 2011-02-27 Robert Larice * src/spicelib/devices/isrc/isrcask.c , * src/spicelib/devices/vsrc/vsrcload.c , * src/spicelib/devices/vsrc/vsrcpar.c : bug fix, three of them (vsrc, isrc) 2011-02-22 Dietmar Warning * diode & bjt temperature model update, now it is possible to select the temperature equations with tlev and tlevc in similar manner as in other well known simulators 2011-02-21 Dietmar Warning * inpcom.c: exclude appending m= to .model cards * adms/admst/ngspiceMakefile.am.xml: rm some obsolete files on maintainer-clean action 2011-02-19 Holger Vogt * ngspice.h: _snprintf for MS Visual Studio * measure.c, com_measure.c: update FIND .. WHEN measurements 2011-02-19 Robert Larice * configure.ac , * examples/transient-noise/shot_ng.cir , * src/Makefile.am , * src/frontend/trannoise/FastNorm3.c : cleanup some whitespace errors and prototypes 2011-02-19 Robert Larice * src/frontend/numparam/Makefile.am , * src/frontend/numparam/general.h , * src/frontend/numparam/mystring.c , * src/frontend/numparam/numparam.h , * src/frontend/numparam/xpressn.c , * Removed src/frontend/numparam/downgrad.txt , * Removed src/frontend/numparam/washprog.c : numparm, remove unused artifacts 2011-02-19 Robert Larice * src/frontend/numparam/mystring.c , * src/frontend/numparam/nupatest.c , * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c : numparm, un-pascal-ify, ws() wln() 2011-02-19 Robert Larice * src/frontend/numparam/xpressn.c : numparm, cleanup, (()) 2011-02-19 Robert Larice * src/frontend/numparam/xpressn.c : numparm, cleanup, {} 2011-02-19 Robert Larice * src/frontend/numparam/mystring.c , * src/frontend/numparam/xpressn.c : numparm, rewrite some conditional expressions 2011-02-19 Robert Larice * src/frontend/numparam/mystring.c : silence compiler warnings 2011-02-19 Robert Larice * src/frontend/numparam/mystring.c , * src/frontend/numparam/xpressn.c : numparm, un-pascal-ify, use '\0' 2011-02-19 Robert Larice * src/frontend/numparam/mystring.c , * src/frontend/numparam/nupatest.c : numparm, un-pascal-ify, use '\r' '\n' '\t' 2011-02-19 Robert Larice * src/frontend/numparam/general.h , * src/frontend/numparam/mystring.c : numparm, cleanup some small functions 2011-02-19 Robert Larice * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c : numparm, 17 digit placeholders --> numparm__XXXXXXXX dummy symbols 2011-02-19 Robert Larice * src/frontend/numparam/xpressn.c : numparm, upgrade message() to accept format strings 2011-02-19 Robert Larice * src/frontend/numparam/xpressn.c : numparm, shrink scope for dstrings, mostly message() related 2011-02-19 Robert Larice * src/frontend/numparam/xpressn.c : numparm, cleanup parseunit() and fetchnumber() 2011-02-15 Holger Vogt * spicelib/parser/inpfindl.c:41 with MINGW level=4.00000e000 returned 3 instead of 4 at INPevaluate() line 210 2011-02-13 Robert Larice * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c : reinstate a missing if(numerical), which got lost and fix a few comments 2011-02-13 Robert Larice part 2, the actual change 2011-02-13 Robert Larice part 1, whitespace and indentation, nothing else 2011-02-13 Robert Larice undo the last commit, with the sole purpose to seperate it into two commits 2011-02-13 Holger Vogt * spicelib/analysis/acan.c: explicit type cast * spicenum.c, mystring.c, xpressn.c: start cleanup, fix bug no. 3175568 2011-02-12 Holger Vogt * src/makefile.am: enable tclspice again * com_measure2.c fix bug no. 3165634 2011-02-11 Robert Larice * src/spicelib/parser/inp2r.c : bug fix, when rewriting a resistors tc = number number ==> tc=number tc2=number 2011-02-11 Robert Larice * src/xspice/cmpp/mod_lex.l , * src/xspice/cmpp/mod_yacc.y , * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod , * src/xspice/icm/spice2poly/icm_spice2poly/ifspec.ifs : bug fix, when `show' a xspice spice2poly device (acgains) 2011-02-11 Robert Larice * src/frontend/plotting/x11.c : bug fix a segfault when closing a second x11-window, then resizing the first copied a workaround from 2009-01-10 Holger Vogt in windisp.c FIXME, x11 structures and currentgraph ... 2011-02-11 Robert Larice * src/frontend/parse-bison.c : and update the parser output 2011-02-11 Robert Larice * src/frontend/parse-bison.y : silence a `bcheck' warning `read from uninitialized memory' yylval in the bison generated parser is copied, even when the value is actually unused 2011-02-11 Robert Larice * src/spicelib/devices/vsrc/vsrcask.c : add a missing `ask' function for VSRC_TRRANDOM 2011-02-11 Robert Larice * src/spicelib/devices/cpl/cplmpar.c , * src/spicelib/devices/isrc/isrcpar.c , * src/spicelib/devices/vsrc/vsrcpar.c : fix a bug when `alter' a vector parameter (VSRC PWL for example) 2011-01-25 Robert Larice * Modified src/include/cmproto.h , * Modified src/xspice/icm/dlmain.c , * Modified src/xspice/icm/digital/d_source/cfunc.mod , * Modified src/xspice/icm/digital/d_state/cfunc.mod , * Modified tests/bin/check.sh , * Added tests/bin/spinit , * Modified tests/bsim3/dc_sim/Makefile.am , * Modified tests/bsim3soi/Makefile.am , * Modified tests/bsim3soidd/Makefile.am , * Modified tests/bsim3soifd/Makefile.am , * Modified tests/bsim3soipd/Makefile.am , * Modified tests/bsim4/Makefile.am , * Modified tests/xspice/digital/Makefile.am , * Modified tests/xspice/digital/spinit.in : fix `make check' for build in a separate directory 2011-01-25 Robert Larice * Modified configure.ac , * Modified src/xspice/Makefile.am , * Added src/xspice/icm/GNUmakefile.in , * Removed src/xspice/icm/Makefile , * Modified src/xspice/icm/makedefs.in , * Removed src/xspice/icm/modpath.lst , * Removed src/xspice/icm/objects.inc : rework the xspice/icm Makefile for build in a separate directory the new makefile requires GNU make 2011-01-25 Robert Larice * src/xspice/cmpp/cmpp.h , * src/xspice/cmpp/pp_lst.c , * src/xspice/cmpp/pp_mod.c , * src/xspice/cmpp/read_ifs.c , * src/xspice/cmpp/util.c , * src/xspice/cmpp/writ_ifs.c : prepare the xspice cmpp processor for build in a separate directory Two environment variables are introduced to augment the the hardwired filenames with directory names 2011-01-25 Robert Larice * src/frontend/Makefile.am , * src/spicelib/devices/adms/admst/ngspiceMakefile.am.xml * src/spicelib/parser/Makefile.am small fixes to make some `Makefiles' ready for build in a separate directory 11-01-18 Holger Vogt * plotcurv.c: line 139 test for existance of v_plot before comparing pl_scale 11-01-16 Holger Vogt * com_cdump.c: remove compiler warnings * 1-f-code.c, 1-f-code.h, vsrc.c, vsrcacct.c, vsrcdefs.h, vsrcload.c, vsrcpar.c, examples/opwien.sp: Add new random voltage generator option trrandom to vsrc voltage source 2011-01-15 Robert Larice * src/frontend/trannoise/Makefile.am , * src/include/Makefile.am , * src/maths/fft/Makefile.am , * tests/Makefile.am , * src/maths/fft/Read\ Me , * src/maths/fft/Read-Me : updates for the make infrastructure (trannoise and tests/xspice) renamed "Read Me" to avoid whitespace in the filename 11-01-13 Dietmar Warning * devices/adms/admst/*.xml: set version parameter to 2.3.0 to come in line with admsXml 11-01-12 Dietmar Warning * devices/adms/admst/ngspiceMODULEdefs.h.xml: allow gmin stepping by using ckt->CKTdiagGmin 11-01-11 Holger Vogt * postcoms.c: dynamic memory allocation for buf and buf2 in fcn com_print() 11-01-08 Holger Vogt * com_cdump.c: add #include "ngspice.h" to allow use of command 'cdump' also under Windows 11-01-06 Holger Vogt * inpcom.c: allow models like 2N2904 or 2SK136 also in subcircuits * examples/Monte_Carlo/mc_ring.sp: reduce memory consumption by adding 'save' command, add jitter measurement 11-01-03 Holger Vogt * spiceif.c: add error checking for 'altermod' 11-01-02 Dietmar Warning * math/fft/fftlib.c: inline functions to static * ngspice.h: __inline for _MSC_VER 11-01-02 Holger Vogt * spiceif.c: recall yesterday's change due to errors, if reset was given before install again, but only for CKTtime > 0 11-01-01 Holger Vogt * breakp.c: update to multiple conditionals with '=' in stop command dctran.c: set breakpoint upon startup from database dbs ('stop when time = xxx' command) spiceif.c: additional call to CKTtemp(ckt) after 'altermod' command to set device instance pParam for immediate use 10-12-31 Holger Vogt * breakp.c: allow multiple conditionals with '=' in stop command 10-12-30 Holger Vogt * aspice.c, inpcom.c, numparam/general.h, 1-f-code.h, equality.c randnumb.c, spdefs.h, cktsens.c: remove compiler warnings breakp.c: allow 'time = nnn' in stop command 2010-12-28 Holger Vogt * xpressn.c, cmath2.c, cmath2.h, randnumb.c, parse.c, examples/Monte_Carlo/MonteCarlo.sp: add poisson and exponential distribution to nutmeg parser, add gauss, aunif, unif, limit to numparam parser * spiceif.c: remove bug in experimental_code * control.c: no i/o redirection in define command (so > or < may be used safely) 2010-12-27 Robert Larice * tests/bsim3soi/inv_dc.cir , * tests/bsim3soi/inv_tr.cir , * tests/bsim3soi/test1.cir , * tests/bsim3soi/test2.cir , * tests/bsim3soi/test3.cir , * tests/bsim3soi/test4.cir , * tests/bsim3soi/test5.cir , * tests/bsim3soi/test6.cir , * tests/bsim3soi/test7.cir , * tests/bsim3soi/test8.cir : include ./thing ---> include thing ngspice currently has a broken include path semantic. every pathname with a '/' in it is considered to be `absolute' and the include path will not be applied 2010-12-27 Robert Larice * src/spicelib/devices/isrc/isrcask.c : bug fix, missing isrc trnoise ask function breaks tests/vbic/diffamp.cir (infinite recursion of error messages) 2010-12-25 Holger Vogt * inpcom.c: exclude control section from fcn inp_chk_for_multi_in_vcvs, add ')' as a delimiter in param replacement, fcn inp_sort_params 2010-12-19 Holger Vogt * simplify exp variate generation for RTS noise: rnorrexp.c removed, update to randnumb.c, main.c, /maths/misc/makefile.am, visualc/vngspice.vcproj 2010-12-18 Dietmar Warning * devices/bsim*/*ask.c: correct multiplier m for certain currents, conductances, charges and capacitances if they are requested by plotting and printing, e.g. @m1[gds] 2010-12-18 Holger Vogt * rnorrexp.c, randnumb.c, 1-f-code.c, main.c, fteext.h, 1-f-code.h, isrcacct.c, isrcload.c, isrcpar.c, vsrcacct.c, vsrcload.c, vsrcpar.c, maths/misc/makefile.am, visualc/vngspice.vcproj, vngspice.sln, examples/transient-noise/rts-1.cir, README: Random telegraph noise added to independent voltage and current sources 2010-12-17 Holger Vogt * isrc.c, isrcacct.c, isrcload.c, isrcpar.c, isrcdefs.h: transient noise in independent current source 2010-12-15 Dietmar Warning * devices/bsim3soi/b4soild.c: fixed a double consideration of the multiplier m for conductances gm, gds, gmbs 2010-12-13 Holger Vogt * util.c: char* identifiers to remove warnings in MS Visual Studio 2010-12-12 Robert Larice * src/frontend/miscvars.c , * src/frontend/trannoise/1-f-code.c , * src/include/1-f-code.h , * src/include/fftext.h , * src/spicelib/devices/vsrc/vsrcacct.c , * src/spicelib/devices/vsrc/vsrcdefs.h , * src/spicelib/devices/vsrc/vsrcload.c , * src/spicelib/devices/vsrc/vsrcpar.c : rewrite TRNOISE, with the intention to separate the noise sequenze computation from its use in the VSRC device. 2010-12-12 Holger Vogt * vsrcacct.c: Patch von R. Larice for safe breakpoints with TRNOISE 2010-12-11 Robert Larice * src/include/bool.h : Change bool from `unsigned char' to `int' thats what it is supposed to be in `C' (less warnings, cleaner, etc ...) The actual change was accidently injected in a commit from 2010-11-27 2010-12-11 Robert Larice * src/frontend/inpcom.c : support another non-equality '<>' token 2010-12-11 Robert Larice * src/frontend/inpcom.c : don't transform operators ('&|' -> '&&' '&' -> '&&' etc) pass them *literally* 2010-12-11 Holger Vogt * inpcom.c: && and || in B source, bug no. 3127808 * src/makefile.am: trailing white spaces removed 2010-12-04 Robert Larice * src/xspice/mif/mifdelete.c : bug fix, segmentation fault caused by `reset' when xspice used happened when MIFsetup hasn't been executed yet. http://sourceforge.net/tracker/?func=detail&aid=3126116&group_id=38962&atid=423915 2010-11-28 Holger Vogt * transient noise example added 2010-11-27 Holger Vogt * transient noise simulation added to vsrc: M configure.ac A examples/transient-noise/noi-ring51-demo.cir A examples/transient-noise/noi-sc-tr.cir A examples/transient-noise/noilib-demo.h A examples/transient-noise/shot_ng.cir M src/Makefile.am M src/main.c M src/frontend/Makefile.am M src/frontend/com_fft.c M src/frontend/com_fft.h M src/frontend/commands.c A src/frontend/trannoise/1-f-code.c A src/frontend/trannoise/1-f-code_d.c A src/frontend/trannoise/FastNorm3.c A src/frontend/trannoise/Makefile.am A src/frontend/trannoise/wallace.c A src/include/1-f-code.h A src/include/FastNorm3.h M src/include/bool.h A src/include/fftext.h M src/include/ngspice.h A src/include/wallace.h M src/maths/Makefile.am A src/maths/fft/Makefile.am A src/maths/fft/NOTE A src/maths/fft/Read Me A src/maths/fft/fftext.c A src/maths/fft/fftext.h A src/maths/fft/fftlib.c A src/maths/fft/fftlib.h A src/maths/fft/matlib.c A src/maths/fft/matlib.h M src/maths/misc/randnumb.c M src/spicelib/devices/vsrc/vsrc.c M src/spicelib/devices/vsrc/vsrcacct.c M src/spicelib/devices/vsrc/vsrcask.c M src/spicelib/devices/vsrc/vsrcdefs.h M src/spicelib/devices/vsrc/vsrcload.c M src/spicelib/devices/vsrc/vsrcpar.c M visualc/vngspice.vcproj 2010-11-25 Robert Larice * src/frontend/inpcom.c : tiny fix, a boundary check 2010-11-25 Robert Larice * src/xspice/icm/dlmain.c , * src/xspice/icm/makedefs.in : drop -D CM_WINDOWS and -D CM_LINUX 2010-11-23 Robert Larice * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c : use NG_IGNORE() ... 2010-11-23 Robert Larice * src/ciderlib/oned/oneprint.c , * src/ciderlib/support/globals.c , * src/ciderlib/support/mater.c , * src/ciderlib/twod/twoprint.c : attract gcc's attention to some printf format strings (for type checking) 2010-11-23 Robert Larice * src/frontend/inpcom.c , * src/frontend/plotting/grid.c : swallow type conversion warnings 2010-11-23 Robert Larice * src/xspice/ipc/ipcaegis.c : fix an ancient bug (typo `!=' versus `=!') 2010-11-23 Robert Larice * src/spicelib/analysis/cktsopt.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/devices/bjt/bjtparam.c , * src/spicelib/devices/bjt2/bjt2param.c , * src/spicelib/devices/bsim2/b2mpar.c , * src/spicelib/devices/dio/dioparam.c , * src/spicelib/devices/jfet/jfetpar.c , * src/spicelib/devices/jfet2/jfet2par.c , * src/spicelib/devices/mos1/mos1par.c , * src/spicelib/devices/mos2/mos2par.c , * src/spicelib/devices/mos3/mos3par.c , * src/spicelib/devices/mos6/mos6par.c , * src/spicelib/devices/mos9/mos9par.c , * src/spicelib/devices/soi3/soi3par.c , * src/spicelib/devices/vbic/vbicparam.c : swallow type conversion warnings (assignment of int to unsigned:1 flags) actually this fix changes the semantic from true if and only if given number is odd to true if and only if given number != 0 2010-11-22 Robert Larice * src/frontend/parse-bison.c , * src/spicelib/parser/inpptree-parser.c : touch (timestamp) bison output files to make sure bison won't be needed on a fresh CVS checkout 2010-11-22 Robert Larice * src/xspice/icm/digital/d_source/cfunc.mod : d_source, bug fix The recently added d_source test-case did reveal a bug in the implementation of d_source. The test-case fails in the non-debug version of ngspice. In src/xspice/icm/digital/d_source/cfunc.mod the following floating point identity comparison won't match. >> if ( TIME == test_double ) { /* Breakpoint reached */ This is, because test_double, though declared as double, will be calculated in extended precision (80bit) This phenomenon is well known, see for example http://gcc.gnu.org/bugzilla/show_bug.cgi?id=323 This `bug workaround' fixes the problem by declaring the `test_double' to be a `volatile' double, which enforces truncation of the 80bit value, when it is used in the comparison. This fix will cause the test-case to pass. Yet unfortunately DCtran() doesn't seem to process time-Breakpoints with full 64bit precision (search for AlmostEqualUlps()) which makes this whole business a very doubtful thing, doomed to randomly fail <<<<----- !!!!!!! 2010-11-21 Robert Larice * src/xspice/icm/digital/d_ram/cfunc.mod , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod : d_source d_state d_ram, rewrite bit operations 2010-11-21 Robert Larice * src/xspice/icm/digital/d_ram/cfunc.mod , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod : d_source d_state d_ram, rewrite index operations 2010-11-21 Robert Larice * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod : d_source d_state, change float --> double 2010-11-21 Robert Larice * configure.ac , * tests/Makefile.am , * tests/xspice/.cvsignore , * tests/xspice/Makefile.am , * tests/xspice/digital/.cvsignore , * tests/xspice/digital/Makefile.am , * tests/xspice/digital/d_ram-stimulus.txt , * tests/xspice/digital/d_ram.cir , * tests/xspice/digital/d_ram.out , * tests/xspice/digital/d_source-stimulus.txt , * tests/xspice/digital/d_source.cir , * tests/xspice/digital/d_source.out , * tests/xspice/digital/d_state-stimulus.txt , * tests/xspice/digital/d_state-updn.txt , * tests/xspice/digital/d_state.cir , * tests/xspice/digital/d_state.out , * tests/xspice/digital/spinit.in : d_source d_state d_ram, test cases for those xspice codemodels 2010-11-21 Holger Vogt * vsracct.c, vsrcload.c: PULSE: next trial of correct timing in case of phase != 0 2010-11-20 Holger Vogt * vsracct.c: correct timing in case of phase != 0 2010-11-19 Robert Larice * */** : Nr 5/5 (x = ...) == NULL , swallow warnings 2010-11-19 Robert Larice * */** : Nr 4/5 (x = ...) != NULL , swallow warnings 2010-11-19 Robert Larice * */** : Nr 3/5 (x = ...) != 0 , swallow warnings 2010-11-19 Robert Larice * src/ngmultidec.c , * src/frontend/inpcom.c , * src/frontend/quote.c , * src/misc/string.c : Nr 2/5 (x = ...) != '\0' , swallow warnings 2010-11-19 Robert Larice * src/frontend/plotting/clip.c : Nr 1/5 (x = ...) == 0 , swallow warnings 2010-11-16 Robert Larice * src/**/* : rename `IGNORE()' --> `NG_IGNORE()' due to name collision on windows. 2010-11-16 Holger Vogt * linear.c: prevent loop in case of vector not found 2010-11-16 Robert Larice * src/Makefile.am : fix another missing dependencies problem handcraftet compilation rules caused this problem with main.c/spice.o a `make distclean' might be appropriate after this CVS checkout 2010-11-16 Robert Larice * configure.ac , * src/Makefile.am , * src/spicelib/devices/Makefile.am : fix a missing dependencies problem use AM_CONDITIONAL to configure program_LDADD variables 2010-11-16 Robert Larice * src/tclspice.c , * src/include/tclspice.h : local prototypes for "tclspice.c" 2010-11-16 Robert Larice * src/frontend/parse-bison.c , * src/spicelib/parser/inpptree-parser.c : regenerate bison output files 2010-11-16 Robert Larice * src/frontend/parse-bison.y , * src/spicelib/parser/inpptree-parser.y , * src/xspice/xspice.c , * src/xspice/cm/cmexport.c : convert macro `U()' to `IGNORE()' 2010-11-16 Robert Larice * src/**/* : pour `IGNORE()' all over the source 2010-11-16 Robert Larice * src/include/ngspice.h : introduce macro `IGNORE(x)', which shall used to mark unused parameters for better visibility in the source code and to swallow compiler warnings 2010-11-14 Holger Vogt * inpcom.c: bug no. 3072940 http://sourceforge.net/tracker/?func=detail&aid=3072940&group_id=38962&atid=423915 2010-11-13 Dietmar Warning * analysis/dctran.c, devices/*/*load.c: hide obsolete labels and local variables for configuring --enable-nobypass and --enable-predictor 2010-11-06 Robert Larice * src/frontend/inpcom.c : Thank you Éric Larouche, for the report and fix of a bug concerning the number of terminals of the current-controlled switch device (`w' device) (committed at 2007-10-08) 2010-11-06 Robert Larice * src/frontend/numparam/general.h , * src/frontend/numparam/mystring.c , * src/frontend/numparam/numparam.h : ci_prefix() returns a `bool', and change struct element `ivl' type to `int' 2010-11-06 Robert Larice * src/frontend/numparam/general.h , * src/frontend/numparam/mystring.c : remove some unused functions from the numparam world 2010-11-06 Robert Larice * src/frontend/postcoms.c , * src/frontend/plotting/agraf.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c , * src/misc/dstring.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inpgmod.c : add `int' casts to some strlen() expressions, and center labels on a xlog scale 2010-11-06 Robert Larice * src/frontend/outitf.c , * src/frontend/plotting/grid.c , * src/misc/string.c , * src/spicelib/devices/cktcrte.c : add some `int' and `size_t' casts 2010-11-06 Robert Larice * src/frontend/measure.c , * src/frontend/outitf.c , * src/frontend/quote.c , * src/frontend/help/readhelp.c , * src/misc/util.c , * src/misc/wlist.c , * src/spicelib/devices/nbjt/nbjtset.c , * src/spicelib/devices/nbjt2/nbt2set.c , * src/spicelib/devices/numd/numdset.c , * src/spicelib/devices/numd2/nud2set.c , * src/spicelib/devices/numos/nummset.c , * src/xspice/cmpp/ifs_yacc.y , * src/xspice/enh/enhtrans.c , * src/xspice/evt/evtload.c , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod : change the type of a bunch of variables from `int' to `size_t' 2010-11-06 Robert Larice * src/frontend/plotting/plotit.c : tiny rewrite, avoid type conversion warnings 2010-11-06 Dietmar Warning * analysis/dctran.c: use ceil function for correct round up 2010-11-06 Robert Larice * src/spicelib/devices/ndev/ndevdump.c : drop some unused static variables 2010-11-06 Robert Larice * src/frontend/inpcom.c : tiny rewrite, make use of copy_substring() 2010-11-06 Robert Larice * src/frontend/diff.c : tiny rewrite, make use of cieq() 2010-11-06 Robert Larice * src/frontend/parse.c , * src/frontend/typesdef.c , * src/frontend/vectors.c , * src/frontend/numparam/spicenum.c , * src/spicelib/parser/inpptree.c , * src/xspice/evt/evtplot.c , * src/xspice/ipc/ipc.c : tiny rewrite, make use of strtolower() and strtoupper() 2010-11-06 Robert Larice * src/frontend/parser/input.c : tiny rewrite, type fixes 2010-11-06 Robert Larice * src/frontend/inpcom.c : drop a redundant check 2010-11-06 Robert Larice * src/spicelib/parser/inp2dot.c , * src/spicelib/parser/inppas3.c : tiny rewrite, don't invoke strlen() to check for strlen() == 1 2010-11-06 Robert Larice * src/xspice/idn/idndig.c : change a (int) cast application, to avoid type conversion warnings 2010-11-06 Robert Larice * src/frontend/help/readhelp.c : tiny rewrite, to avoid type conversion warnings 2010-11-06 Robert Larice * src/frontend/parser/lexical.c : minor rewrite, a local variable type change 2010-11-06 Robert Larice * src/frontend/evaluate.c : tiny rewrite to avoid "variable ... might be clobbered by 'longjmp'" warnings 2010-11-06 Robert Larice * src/frontend/plotting/agraf.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c , * src/misc/dstring.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inpgmod.c : (int) cast the return value of some strlen() invocations 2010-11-06 Robert Larice * src/frontend/subckt.c , * src/spicelib/parser/inppas2.c : minor rewrite, avoid type conversion warnings 2010-11-06 Robert Larice * src/spicelib/devices/bsim1/b1.c , * src/spicelib/devices/bsim1/b1dset.c , * src/spicelib/devices/bsim1/b1eval.c , * src/spicelib/devices/bsim1/b1mpar.c , * src/spicelib/devices/bsim1/bsim1def.h : change the bsim1 `xpart' model parameter from IF_REAL to IF_FLAG which has been used internaly as boolean anyway. 2010-11-06 Robert Larice * src/spicelib/devices/nbjt/nbjt.c , * src/spicelib/devices/nbjt/nbjtparm.c , * src/spicelib/devices/nbjt2/nbt2.c , * src/spicelib/devices/nbjt2/nbt2parm.c , * src/spicelib/devices/numd/numd.c , * src/spicelib/devices/numd/numdparm.c , * src/spicelib/devices/numd2/nud2.c , * src/spicelib/devices/numd2/nud2parm.c , * src/spicelib/devices/numos/numm.c , * src/spicelib/devices/numos/nummparm.c , * src/spicelib/devices/urc/urc.c , * src/spicelib/devices/urc/urcparam.c : change some model parameters from IF_REAL to IF_INTEGER which have been internaly integers anyway. (model parameters `save' `print' and urc `n'==`number of lumps') 2010-11-06 Dietmar Warning * configure.ac, visualc/include/config.h, frontend/miscoms.c, mos1-9/*.c * remove two really ancient configuration options: * NOSQRT: Nobody want use log/exp instead of sqrt * CAPZEROBYPASS: Nobody want calculate 0.0 * x * analysis/dctran.c: limit the order to 1 if backward Euler is enabled 2010-11-04 Robert Larice * src/misc/string.c , * src/misc/stringutil.h : minor modification of strtolower(), and implement strtoupper() 2010-11-04 Robert Larice * src/frontend/plotting/x11.c : minor rewrite, fix a minor bug in the x11 zoom-in function the rectangle was not always drawn correct, when draging the mouse in all directions. 2010-11-04 Robert Larice * src/frontend/help/x11disp.c , * src/frontend/plotting/x11.c : add casts for x11 operations, to silence type conversion warnings 2010-11-04 Robert Larice * src/frontend/plotting/x11.c , * src/include/graph.h : move device dependent colors[] array from `graph' to the x11 specific struct 2010-11-04 Robert Larice * src/frontend/com_compose.c , * src/frontend/postcoms.c , * src/misc/util.c : minor rewrites in postcoms.c, drop an overwritten |= VF_PERMANENT assignment 2010-11-04 Robert Larice * src/main.c , * src/ngsconvert.c , * src/frontend/aspice.c , * src/frontend/inp.c , * src/frontend/nutinp.c : use `size_t' variables for fread/fwrite operations 2010-11-02 Robert Larice * src/frontend/numparam/general.h , * src/frontend/numparam/mystring.c , * src/frontend/numparam/numparam.h , * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c : use the type `bool' instead of `unsigned char' in the numparam world bool currently is `unsigned char', plan to change to `int' for better type comaptibility with `C' boolean expressions 2010-11-02 Robert Larice * src/frontend/inpcom.c , * src/frontend/parser/lexical.c , * src/frontend/quote.c , * src/frontend/subckt.c , * src/main.c , * src/spicelib/parser/inpcfix.c , * src/xspice/cmpp/pp_lst.c , * src/xspice/cmpp/util.c , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod , * src/xspice/ipc/ipctiein.c : casts, to make int <-> char conversions explicit 2010-11-02 Robert Larice * src/frontend/display.c , * src/frontend/numparam/mystring.c : add some more `int' versus `size_t' casts 2010-11-02 Robert Larice * src/frontend/outitf.c , * src/spicelib/parser/inp2r.c : minor beautification 2010-11-02 Robert Larice * src/ciderlib/input/cards.c , * src/frontend/cpitf.c , * src/frontend/dotcards.c , * src/frontend/plotting/grid.c , * src/ngspice.c , * src/spicelib/analysis/acsetp.c , * src/spicelib/analysis/analysis.c , * src/spicelib/analysis/cktsopt.c , * src/spicelib/analysis/dctsetp.c , * src/spicelib/analysis/dsetparm.c , * src/spicelib/analysis/nsetparm.c , * src/spicelib/analysis/pzsetp.c , * src/spicelib/analysis/senssetp.c , * src/spicelib/analysis/tfsetp.c , * src/spicelib/analysis/transetp.c , * src/spicelib/devices/dev.c , * src/spicelib/parser/inpptree.c , * src/unsupported/sen2setp.c : use `NUMELEMS' and add some `(int)' casts 2010-11-02 Robert Larice * src/xspice/icm/dlmain.c : local prototypes in `dlmain.c' 2010-11-02 Robert Larice * src/frontend/arg.c , * src/misc/misc_time.c , * src/spicelib/parser/inpmktmp.c : convert some variables, from `int' to `size_t' 2010-11-02 Robert Larice * src/frontend/com_history.c , * src/frontend/com_measure2.c , * src/frontend/fourier.c , * src/frontend/numparam/xpressn.c , * src/frontend/parser/backq.c , * src/frontend/parser/complete.c , * src/frontend/plotting/x11.c , * src/frontend/subckt.c , * src/frontend/variable.c , * src/xspice/cmpp/mod_yacc.y , * src/xspice/cmpp/pp_lst.c , * src/xspice/cmpp/pp_mod.c , * src/xspice/cmpp/writ_ifs.c , * src/xspice/evt/evtdump.c , * src/xspice/evt/evtplot.c , * src/xspice/ipc/ipc.c , * src/xspice/ipc/ipctiein.c : (int) casts for some `strlen()' expressions 2010-11-02 Robert Larice * src/xspice/icm/digital/adc_bridge/cfunc.mod , * src/xspice/icm/digital/d_ram/cfunc.mod , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/dac_bridge/cfunc.mod : (int) casts for cm_event_alloc and cm_analog_alloc 2010-11-02 Robert Larice * src/ciderlib/oned/oneprint.c , * src/ciderlib/support/database.c , * src/ciderlib/twod/twoprint.c , * src/frontend/com_ahelp.c , * src/frontend/com_display.c , * src/frontend/com_help.c , * src/frontend/com_let.c , * src/frontend/define.c , * src/frontend/device.c , * src/frontend/help/readhelp.c , * src/frontend/outitf.c , * src/frontend/plotting/plotcurv.c , * src/frontend/subckt.c , * src/frontend/terminal.c , * src/frontend/variable.c , * src/frontend/vectors.c , * src/maths/poly/interpolate.c , * src/maths/poly/polyfit.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/devices/cpl/cplsetup.c , * src/spicelib/devices/ndev/ndevset.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inpgstr.c , * src/spicelib/parser/inpgtok.c , * src/spicelib/parser/inpptree.c , * src/xspice/cmpp/ifs_yacc.y , * src/xspice/cmpp/pp_lst.c , * src/xspice/cmpp/writ_ifs.c , * src/xspice/icm/analog/oneshot/cfunc.mod , * src/xspice/icm/analog/pwl/cfunc.mod , * src/xspice/icm/analog/s_xfer/cfunc.mod , * src/xspice/icm/analog/sine/cfunc.mod , * src/xspice/icm/analog/square/cfunc.mod , * src/xspice/icm/analog/triangle/cfunc.mod , * src/xspice/icm/digital/d_osc/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod , * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod , * src/xspice/icm/xtradev/core/cfunc.mod , * src/xspice/ipc/ipc.c : casts, to make int <-> size_t conversions explicit 2010-11-01 Holger Vogt * compile_min.sh: exit upon make errors 2010-10-31 Robert Larice * src/include/memory.h , * src/maths/sparse/spdefs.h , * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c : cleanup TMALLOC etc macros 2010-10-31 Holger Vogt * compile_min.sh: exit upon autogen or configure error 2010-10-31 Dietmar Warning * src/spicelib/analysis/cktsetup.c, cktsopt.c: Allow maxord=1 w/o crash for experimenting with backward Euler, works so far - but other timestep control then LTE is needed in dctran.c * src/spicelib/analysis/dctran.c: only indentation for better readability 2010-10-28 Robert Larice * src/**/* : wrap tmalloc MALLOC etc, into two macros TMALLOC and TREALLOC add casts to those macros to silence type conversion warnings 2010-10-28 Robert Larice * src/frontend/commands.c , * src/frontend/control.c : bug fix, incorrect handling of `co_spiceonly' commands http://sourceforge.net/tracker/?func=detail&aid=3092998&group_id=38962&atid=423915 2010-10-27 Robert Larice * src/frontend/device.c : bug fix, const data space was used, instead of malloced area 2010-10-27 Robert Larice * src/spicelib/devices/asrc/asrcset.c , * src/xspice/mif/mifgetvalue.c : realloc does work, even with NULL argument 2010-10-27 Robert Larice * src/spicelib/devices/bsim3soi/b4soitemp.c : use tmalloc instead of malloc 2010-10-27 Robert Larice * src/spicelib/analysis/cktmcrt.c , * src/spicelib/analysis/cktnewan.c , * src/xspice/cm/cmevt.c , * src/xspice/evt/evtload.c : use tmalloc and trealloc instead of MALLOC and REALLOC 2010-10-27 Robert Larice * src/spicelib/analysis/distoan.c : bug fix ?, this fix is a mere guesswork, FIXME 2010-10-27 Robert Larice * src/spicelib/devices/ltra/ltraask.c , * src/spicelib/devices/tra/traask.c : bug fix, malloced space too small 2010-10-25 Holger Vogt * src/frontend/inpcom.c: add guards if strstr returns NULL 2010-10-24 Robert Larice * src/frontend/inpcom.c , * src/frontend/subckt.c : trealloc usage unification 2010-10-24 Robert Larice * src/spicelib/devices/ltra/ltramisc.c : MALLOC usage unification, (in comments) 2010-10-24 Robert Larice * src/frontend/com_compose.c , * src/frontend/plotting/plotcurv.c , * src/maths/poly/interpolate.c : tmalloc usage unification, parenthesize some terms 2010-10-24 Robert Larice * src/spicelib/devices/asrc/asrcset.c , * src/xspice/mif/mif_inp2.c : RALLOC usage unification, drop braces around the second argument 2010-10-24 Robert Larice * src/spicelib/devices/ndev/ndevset.c : use char* instead of void* 2010-10-24 Robert Larice * src/frontend/hpgl.c , * src/frontend/plotting/plot5.c , * src/frontend/plotting/x11.c , * src/frontend/postsc.c , * src/frontend/wdisp/windisp.c , * src/frontend/wdisp/winprint.c , * src/include/graph.h , * src/tclspice.c : struct member devdep, use void* instead of char* 2010-10-24 Robert Larice * src/frontend/help/readhelp.c , * src/ngmultidec.c , * src/tclspice.c : tmalloc usage, drop explicit (unsigned) cast later to be reinstated in a tmalloc wrapper macro 2010-10-24 Robert Larice * src/frontend/com_display.c , * src/frontend/device.c , * src/frontend/help/x11disp.c : tmalloc usage, minor usage unification 2010-10-24 Robert Larice * src/frontend/com_sysinfo.c , * src/frontend/plotting/graf.c , * src/misc/util.c , * src/spicelib/devices/cpl/cplsetup.c , * src/spicelib/devices/soi3/soi3ask.c , * src/spicelib/devices/txl/txlsetup.c , * src/tclspice.c , * src/xspice/evt/evtinit.c , * src/xspice/evt/evtload.c , * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c , * src/xspice/idn/idndig.c : cast the tmalloc, MALLOC, return value 2010-10-24 Robert Larice * src/misc/wlist.c , * src/spicelib/devices/bsim3/b3set.c , * src/spicelib/devices/bsim3soi/b4soiset.c , * src/spicelib/devices/bsim4/b4set.c : fix incorrect usage of tmalloc/sizeof, incorrect indirection level 2010-10-24 Robert Larice * src/frontend/com_ahelp.c , * src/frontend/com_display.c , * src/frontend/com_help.c , * src/frontend/help/readhelp.c , * src/frontend/variable.c , * src/frontend/vectors.c , * src/misc/wlist.c : qsort() usage, drop cast of the first argument (which is a void *) 2010-10-24 Robert Larice * src/maths/sparse/spalloc.c , * src/maths/sparse/spbuild.c , * src/maths/sparse/spdefs.h , * src/maths/sparse/spfactor.c , * src/maths/sparse/spoutput.c , * src/maths/sparse/sputils.c : rename ALLOC, REALLOC, CALLOC, FREE, in the "src/maths/sparse" domain -> SP_MALLOC, SP_REALLOC, SP_CALLOC, SP_FREE 2010-10-24 Robert Larice * src/include/complex.h : ngcomplex_t instead of complex, #2/2 rename the structure as well 2010-10-24 Robert Larice * src/frontend/com_compose.c , * src/frontend/com_fft.c , * src/frontend/com_let.c , * src/frontend/define.c , * src/frontend/diff.c , * src/frontend/evaluate.c , * src/frontend/outitf.c , * src/frontend/plotting/plotit.c , * src/frontend/postcoms.c , * src/frontend/rawfile.c , * src/frontend/spec.c , * src/frontend/vectors.c , * src/include/complex.h , * src/include/dvec.h , * src/maths/cmaths/cmath.h , * src/maths/cmaths/cmath1.c , * src/maths/cmaths/cmath2.c , * src/maths/cmaths/cmath3.c , * src/maths/cmaths/cmath4.c , * src/maths/cmaths/test_cx_j.c , * src/maths/cmaths/test_cx_mag.c , * src/maths/cmaths/test_cx_ph.c , * src/ngsconvert.c : ngcomplex_t instead of complex, #1/2 purpose: avoid name collision 2010-10-17 Holger Vogt * main.c: add mktemp.h 2010-10-16 Holger Vogt * windisp.h, windisp.c: prototypes 2010-10-16 Robert Larice * configure.ac : stronger warning levels, redeclarations, missing prototypes, k&r style ... 2010-10-16 Robert Larice * src/main.c , * src/frontend/Makefile.am , * src/frontend/breakp.c , * src/frontend/com_ahelp.c , * src/frontend/com_measure2.c , * src/frontend/com_option.c , * src/frontend/com_sysinfo.c , * src/frontend/commands.c , * src/frontend/cpitf.c , * src/frontend/device.c , * src/frontend/device.h , * src/frontend/dotcards.c , * src/frontend/inp.c , * src/frontend/measure.c , * src/frontend/misccoms.h , * src/frontend/postcoms.c , * src/frontend/postcoms.h , * src/frontend/runcoms.c , * src/frontend/plotting/x11.c , * src/include/cpextern.h , * src/include/fteext.h , * visualc/vngspice.vcproj , New include File: * src/frontend/com_commands.h : move the com_*() prototypes around. 2010-10-16 Robert Larice * src/include/devdefs.h : unconditional visibility of the cider prototypes limit*() 2010-10-16 Robert Larice * src/frontend/rawfile.c : remove unused variables 2010-10-16 Robert Larice * src/frontend/aspice.h , * src/frontend/breakp.h , * src/frontend/breakp2.h , * src/frontend/circuits.h , * src/frontend/com_alias.h , * src/frontend/com_history.h , * src/frontend/control.h , * src/frontend/cpitf.h , * src/frontend/define.h , * src/frontend/dotcards.h , * src/frontend/error.h , * src/frontend/evaluate.h , * src/frontend/gens.h , * src/frontend/inp.h , * src/frontend/inpcom.h , * src/frontend/interp.h , * src/frontend/nutinp.h , * src/frontend/nutmegif.h , * src/frontend/options.h , * src/frontend/parse.h , * src/frontend/parser/backq.h , * src/frontend/parser/complete.h , * src/frontend/parser/cshpar.h , * src/frontend/parser/glob.h , * src/frontend/parser/input.h , * src/frontend/parser/lexical.h , * src/frontend/parser/numparse.h , * src/frontend/parser/unixcom.h , * src/frontend/plotting/clip.h , * src/frontend/plotting/plotcurv.h , * src/frontend/plotting/plotting.h , * src/frontend/points.h , * src/frontend/quote.h , * src/frontend/rawfile.h , * src/frontend/resource.h , * src/frontend/runcoms.h , * src/frontend/shyu.h , * src/frontend/spiceif.h , * src/frontend/terminal.h , * src/frontend/typesdef.h , * src/frontend/variable.h , * src/frontend/vectors.h , * src/include/cpextern.h , * src/include/cpstd.h , * src/include/fteext.h , * src/include/hlpdefs.h , * src/include/opdefs.h , * src/include/tfdefs.h , * src/include/trandefs.h , * src/maths/ni/niaciter.h , * src/maths/ni/nicomcof.h , * src/maths/ni/niconv.h , * src/maths/ni/nidest.h , * src/maths/ni/niditer.h , * src/maths/ni/niinit.h , * src/maths/ni/niinteg.h , * src/maths/ni/niiter.h , * src/maths/ni/niniter.h , * src/maths/ni/nipzmeth.h , * src/maths/ni/nireinit.h , * src/maths/ni/nisenre.h , * src/spicelib/devices/bjt/bjtdset.h , * src/spicelib/devices/bjt2/bjt2dset.h , * src/spicelib/devices/cktaccept.h , * src/spicelib/parser/inppas1.h , * src/spicelib/parser/inppas2.h , * src/spicelib/parser/inppas3.h : remove prototypes, avoid redeclarations 2010-10-16 Robert Larice * src/frontend/inp.c , * src/frontend/nutinp.c , * src/include/fteext.h : collect inp_deckcopy() inp_subcktexpand() in "subckt.h" 2010-10-16 Robert Larice * src/frontend/commands.c , * src/include/fteext.h : collect arg_*() prototypes in "arg.h" 2010-10-16 Robert Larice * src/frontend/vectors.h : collect vec_get() in "fteext.h" 2010-10-16 Robert Larice * src/frontend/com_setscale.c , * src/frontend/plotting/plotting.h : collect plot_cur in "fteext.h" 2010-10-16 Robert Larice * src/frontend/com_dump.c , * src/frontend/inp.c , * src/frontend/mw_coms.c , * src/frontend/options.c , * src/frontend/runcoms.c , * src/frontend/runcoms2.c , * src/include/fteext.h , * src/main.c : collect if_inpdeck() if_run() if_cktfree() if_dump() if_option() in "spiceif.h" 2010-10-16 Robert Larice * src/frontend/misccoms.c , * src/frontend/plotting/plotcurv.c , * src/frontend/signal_handler.c , * src/include/fteext.h : collect gr_clean() gr_end() gr_point() gr_start() gr_fixgrid() in "graf.h" 2010-10-16 Robert Larice * src/frontend/hcomp.c , * src/frontend/misccoms.c , * src/include/fteext.h : collect hcomp() in "hcomp.h" 2010-10-16 Robert Larice * src/frontend/error.h , * src/frontend/hpgl.c , * src/frontend/plotting/plot5.c , * src/frontend/postsc.c : collect internalerror() in "fteext.h" 2010-10-16 Robert Larice * src/frontend/com_help.c , * src/include/cpextern.h : collect ft_nutmeg() in "fteext.h" 2010-10-16 Robert Larice * src/ciderlib/oned/oneadmit.c , * src/ciderlib/oned/onesolve.c : remove local prototypes, which are already included 2010-10-16 Robert Larice * src/include/ngspice.h : remove prototypes, avoid redeclarations 2010-10-16 Holger Vogt * examples/control_structs/s-param.cir new example * commands.c, postcoms.h, postcoms.c, rawfile.h, rawfile.c fteext.h: new command wrs2p, write a s-parameter file using Touchstone vers. 1 format. * device.c: Improved error message "no graphics interface ... 2010-10-15 Holger Vogt * src/ciderlib/input/output.c : #include "../misc/tilde.h" * inpcom.c: line 2800ff, allow -.5 token 2010-10-15 Robert Larice * src/include/ngspice.h , * src/main.c , * src/maths/misc/accuracy.c , * src/maths/misc/accuracy.h : collect BMin BMax ExpLim Accuracy in "accuracy.h", kill `Acc' 2010-10-15 Robert Larice * src/xspice/cmpp/pp_mod.c : cmpp shall add a function prototype to the generated "cfunc.c" file 2010-10-15 Robert Larice * src/ngnutmeg.c : visibility for the NDEVacct() prototype 2010-10-15 Robert Larice * src/ngsconvert.c : remove obsolete artifact XtDispatchEvent() (dummy implementation) 2010-10-15 Robert Larice * src/ciderlib/support/devprint.c : visibility for the printVoltages() prototype 2010-10-15 Robert Larice * src/xspice/cmpp/ifs_lex.l : disable dangling artifact 2010-10-15 Robert Larice * src/spicelib/devices/dev.c : add local prototype for add_device() 2010-10-15 Robert Larice * src/xspice/cmpp/ifs_lex.l , * src/xspice/cmpp/ifs_yacc.y , * src/xspice/cmpp/ifs_yacc_y.h , * src/xspice/cmpp/read_ifs.c : collect prototype for ifs_yyerror() in "ifs_yacc_y.h", and fix return type 2010-10-15 Robert Larice * src/xspice/cmpp/mod_lex.l , * src/xspice/cmpp/mod_yacc.y , * src/xspice/cmpp/mod_yacc_y.h , * src/xspice/cmpp/pp_mod.c : collect prototype for mod_yyerror() in "mod_yacc_y.h", and fix return type 2010-10-15 Robert Larice * src/ciderlib/input/output.c : visibility for tildexpand() prototyp 2010-10-15 Robert Larice * src/frontend/com_measure2.c , * src/frontend/com_sysinfo.c , * src/frontend/control.c , * src/frontend/plotting/x11.c , * src/frontend/subckt.c , * src/maths/cmaths/cmath2.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/dloadfns.c , * src/spicelib/devices/bsim3/b3noi.c , * src/spicelib/devices/bsim3soi/b4soild.c , * src/spicelib/devices/bsim3soi/b4soinoi.c , * src/spicelib/devices/bsim3soi_dd/b3soiddld.c , * src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c , * src/spicelib/devices/bsim3soi_fd/b3soifdld.c , * src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c , * src/spicelib/devices/bsim3soi_pd/b3soipdld.c , * src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c , * src/spicelib/devices/bsim3v0/b3v0noi.c , * src/spicelib/devices/bsim3v1/b3v1noi.c , * src/spicelib/devices/bsim3v1a/b3v1anoi.c , * src/spicelib/devices/bsim3v1s/b3v1snoi.c , * src/spicelib/devices/bsim3v32/b3v32noi.c , * src/spicelib/devices/bsim4/b4geo.c , * src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/bsim4/b4temp.c , * src/spicelib/devices/bsim4v2/b4v2geo.c , * src/spicelib/devices/bsim4v2/b4v2noi.c , * src/spicelib/devices/bsim4v2/b4v2temp.c , * src/spicelib/devices/bsim4v3/b4v3geo.c , * src/spicelib/devices/bsim4v3/b4v3temp.c , * src/spicelib/devices/bsim4v4/b4v4geo.c , * src/spicelib/devices/bsim4v4/b4v4temp.c , * src/spicelib/devices/bsim4v5/b4v5geo.c , * src/spicelib/devices/bsim4v5/b4v5temp.c , * src/spicelib/devices/ltra/ltramisc.c : declare some functions `static' 2010-10-15 Robert Larice * src/include/cmproto.h : add prototypes for some functions --> "cmproto.h" cm_stream_out() cm_stream_in(v) cm_stream_err() malloc_pj() calloc_pj() realloc_pj() free_pj() 2010-10-15 Robert Larice * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c : declare udn_int_ and udn_real_functions `static' 2010-10-15 Robert Larice * src/include/ngspice.h , * src/main.c , * src/misc/misc_time.h : collect extern timebegin in "misc_time.h" 2010-10-15 Robert Larice * src/ciderlib/support/globals.c , * src/ciderlib/support/mater.c , * src/frontend/numparam/spicenum.c , * src/frontend/options.c , * src/frontend/plotting/graf.c , * src/maths/misc/randnumb.c , * src/maths/ni/niniter.c , * src/spicelib/analysis/cktdltn.c , * src/spicelib/analysis/noisean.c , * src/spicelib/devices/nbjt/nbjttemp.c , * src/spicelib/devices/nbjt2/nbt2acld.c , * src/spicelib/devices/nbjt2/nbt2load.c , * src/spicelib/devices/nbjt2/nbt2pzld.c , * src/spicelib/devices/numd2/nud2acld.c , * src/spicelib/devices/numd2/nud2load.c , * src/spicelib/devices/numd2/nud2pzld.c , * src/spicelib/devices/numos/nummacld.c , * src/spicelib/devices/numos/nummload.c , * src/spicelib/devices/numos/nummpzld.c , * src/xspice/ipc/ipc.c : remove local prototypes, which are allready included 2010-10-15 Robert Larice * src/ciderlib/support/database.c , * src/ciderlib/support/geominfo.c , * src/ciderlib/support/globals.c , * src/ciderlib/support/integset.c , * src/ciderlib/support/integuse.c , * src/ciderlib/support/logfile.c , * src/ciderlib/support/mater.c , * src/ciderlib/support/misc.c , * src/ciderlib/support/mobil.c , * src/ciderlib/support/recomb.c , * src/ciderlib/support/suprmitf.c : prototypes, make use of "cidersupt.h" 2010-10-15 Robert Larice * src/tclspice.c : collect extern JMP_BUF jbuf in "frontend/signal_handler.h" 2010-10-15 Robert Larice * src/include/fteext.h : avoid redeclaration, signalhandler 2010-10-15 Robert Larice * src/frontend/com_fft.c , * src/frontend/com_fft.h : remove static fftext() from "com_fft.h" 2010-10-15 Robert Larice * src/frontend/com_fft.c , * src/frontend/com_fft.h , * src/frontend/spec.c , * src/frontend/spec.h : collect free_pnode_o() in "parse.h" 2010-10-15 Robert Larice * src/frontend/plotting/graphdb.c , * src/frontend/plotting/graphdb.h , * src/frontend/postcoms.c , * src/frontend/wdisp/windisp.c , * src/include/ftedbgra.h : collect NewGraph() FindGraph() CopyGraph() RemoveWindow() in "ftedbgra.h" 2010-10-15 Robert Larice * src/frontend/com_fft.c , * src/frontend/outitf.c , * src/frontend/rawfile.c , * src/frontend/spec.c , * src/frontend/vectors.c , * src/include/ngspice.h , * src/tclspice.c : collect datestring() and seconds() in "misc_time.h" 2010-10-15 Robert Larice * src/frontend/aspice.c , * src/frontend/com_gnuplot.c , * src/frontend/com_hardcopy.c , * src/frontend/com_xgraph.c , * src/frontend/inp.c , * src/frontend/nutinp.c , * src/include/ngspice.h , * src/ngsconvert.c : collect smktemp() in "mktemp.h" 2010-10-13 Dietmar Warning * src/frontend/com_option.c: better formatting the output and add some useful parameters if command 'option' is given * src/include/cktdefs.h, * src/spicelib/analysis/cktdojob.c, cktntask.c, * src/spicelib/devices/cktinit.c, * src/spicelib/parser/inppas2.c: Reduction of trtol to 1 only if 'A' devices in the circuit and xspice is enabled 2010-10-09 Robert Larice * src/include/complex.h : !REVERT! remove typedef for _complex, which is used nowhere this breaks MSVC, currently unkown why, FIXME 2010-10-09 Robert Larice * src/frontend/parse-bison.c , * src/frontend/parse-bison.h , * src/spicelib/parser/inpptree-parser.c , * src/spicelib/parser/inpptree-parser.h : update the bison generated files 2010-10-09 Robert Larice * src/frontend/parse-bison.y , * src/spicelib/parser/inpptree-parser.y : avoid function redeclaration, PPparse() and PTparse() 2010-10-09 Robert Larice * src/frontend/define.c , * src/frontend/evaluate.c , * src/frontend/parse-bison.y , * src/frontend/parse.c , * src/include/fteparse.h : add `PT_OP_' prefix to avoid name collision (END, PLUS, MINUS, ...) 2010-10-09 Robert Larice * src/frontend/com_cdump.c , * src/frontend/com_chdir.c , * src/frontend/com_dump.c , * src/frontend/com_echo.c , * src/frontend/com_ghelp.c , * src/frontend/com_rehash.c , * src/frontend/com_setscale.c , * src/frontend/com_shell.c , * src/frontend/com_shift.c , * src/frontend/com_state.c , * src/frontend/parser/unixcom.c , * src/frontend/streams.c , * src/frontend/streams.h , * src/frontend/variable.c : collect cp_* prototypes / extern-declarations in "cpextern.h" 2010-10-09 Robert Larice * src/ciderlib/input/dopset.c : additional #includes for prototype visibility 2010-10-09 Robert Larice * src/include/ciderinp.h , * src/spicelib/devices/nbjt/nbjtset.c , * src/spicelib/devices/numd/numdset.c : collect MESH*() prototypes in "meshext.h" 2010-10-09 Robert Larice * src/spicelib/devices/bsim4/b4geo.c , * src/spicelib/devices/bsim4v2/b4v2geo.c , * src/spicelib/devices/bsim4v3/b4v3geo.c , * src/spicelib/devices/bsim4v4/b4v4geo.c , * src/spicelib/devices/bsim4v5/b4v5geo.c : include bsim4*def.h (bsim4*geo.c files) 2010-10-09 Robert Larice * src/spicelib/devices/bsim4/b4set.c , * src/spicelib/devices/bsim4/b4temp.c , * src/spicelib/devices/bsim4/bsim4def.h , * src/spicelib/devices/bsim4v2/b4v2set.c , * src/spicelib/devices/bsim4v2/b4v2temp.c , * src/spicelib/devices/bsim4v2/bsim4v2def.h , * src/spicelib/devices/bsim4v3/b4v3set.c , * src/spicelib/devices/bsim4v3/b4v3temp.c , * src/spicelib/devices/bsim4v3/bsim4v3def.h , * src/spicelib/devices/bsim4v4/b4v4set.c , * src/spicelib/devices/bsim4v4/b4v4temp.c , * src/spicelib/devices/bsim4v4/bsim4v4def.h , * src/spicelib/devices/bsim4v5/b4v5set.c , * src/spicelib/devices/bsim4v5/b4v5temp.c , * src/spicelib/devices/bsim4v5/bsim4v5def.h : BSIM*Geo() prototypes --> include files 2010-10-09 Robert Larice * src/frontend/measure.c , * src/frontend/numparam/mystring.c , * src/include/dstring.h , * src/misc/dstring.c : remove #define for EOS use '\0' instead 2010-10-09 Robert Larice * src/frontend/terminal.c , * src/include/complex.h , * src/include/fteparse.h , * src/main.c , * src/maths/sparse/spbuild.c , * src/maths/sparse/spdefs.h , * src/misc/ivars.c , * src/spicelib/parser/ifnewuid.c , * src/spicelib/parser/inperror.c , * src/tclspice.c : remove ancient #defines for AND OR NOT substitute with && || ! 2010-10-09 Robert Larice * src/include/profile.h : remove obsolete #defines for BEGIN END LENGTH FORWARD 2010-10-09 Robert Larice * src/include/fteparse.h : remove obsolete #defines for MAXARITY NUM STRING PNODE 2010-10-09 Robert Larice * src/include/complex.h : remove typedef for _complex, which is used nowhere 2010-10-08 Robert Larice * src/frontend/evaluate.c , * src/frontend/parse.c , * src/include/fteext.h : collect some cx_*() prototypes in "cmath2.h" 2010-10-08 Robert Larice * src/main.c : remove winmessage() prototype, there is no such thing (hopefully) 2010-10-08 Robert Larice * src/include/inpdefs.h , * src/spicelib/parser/inp.h : collect the other INP*() prototypes in "inpdefs.h" 2010-10-08 Robert Larice * src/include/inpdefs.h , * src/spicelib/parser/inp.h , * src/spicelib/parser/inppas2.c : collect the INP2?() prototypes in "inp.h" 2010-10-08 Robert Larice * src/include/inpptree.h , * src/spicelib/parser/inp.h : collect the PT*() prototypes in "inp.h" 2010-10-08 Robert Larice * src/frontend/parse.c , * src/include/fteext.h : consider the op_*() functions to be less public 2010-10-08 Robert Larice * src/spicelib/devices/bsim3soi/b4soiinit.c , * src/spicelib/devices/bsim3soi_dd/b3soiddinit.c , * src/spicelib/devices/bsim3soi_fd/b3soifdinit.c , * src/spicelib/devices/bsim3soi_pd/b3soipdinit.c , * src/spicelib/devices/dio/dioinit.c , * src/spicelib/devices/hisim/hsm1init.c : avoid function redeclaration (devices) 2010-10-08 Robert Larice * src/include/sensgen.h , * src/spicelib/analysis/cktsgen.c : sens_getp() prototype --> include file 2010-10-08 Robert Larice * src/xspice/idn/idndig.c : static function definition 2010-10-08 Robert Larice * src/include/ipcproto.h : #ifdef include file wrapper 2010-10-08 Robert Larice * src/include/noisedef.h , * src/spicelib/devices/bjt/bjtnoise.c , * src/spicelib/devices/bjt2/bjt2noise.c , * src/spicelib/devices/bsim1/b1noi.c , * src/spicelib/devices/bsim2/b2noi.c , * src/spicelib/devices/bsim3/b3noi.c , * src/spicelib/devices/bsim3soi/b4soinoi.c , * src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c , * src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c , * src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c , * src/spicelib/devices/bsim3v0/b3v0noi.c , * src/spicelib/devices/bsim3v1/b3v1noi.c , * src/spicelib/devices/bsim3v1a/b3v1anoi.c , * src/spicelib/devices/bsim3v1s/b3v1snoi.c , * src/spicelib/devices/bsim3v32/b3v32noi.c , * src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/bsim4v2/b4v2noi.c , * src/spicelib/devices/bsim4v3/b4v3noi.c , * src/spicelib/devices/bsim4v4/b4v4noi.c , * src/spicelib/devices/bsim4v5/b4v5noi.c , * src/spicelib/devices/csw/cswnoise.c , * src/spicelib/devices/dio/dionoise.c , * src/spicelib/devices/hisim/hsm1noi.c , * src/spicelib/devices/jfet/jfetnoi.c , * src/spicelib/devices/jfet2/jfet2noi.c , * src/spicelib/devices/mes/mesnoise.c , * src/spicelib/devices/mos1/mos1noi.c , * src/spicelib/devices/mos2/mos2noi.c , * src/spicelib/devices/mos3/mos3noi.c , * src/spicelib/devices/mos9/mos9noi.c , * src/spicelib/devices/res/resnoise.c , * src/spicelib/devices/soi3/soi3nois.c , * src/spicelib/devices/sw/swnoise.c , * src/spicelib/devices/vbic/vbicnoise.c : NevalSrc() NevalSrc2() Nintegrate() prototypes --> include files 2010-10-08 Robert Larice * src/frontend/inpcom.c , * src/frontend/numparam/xpressn.c , * src/include/compatmode.h : ngspice_compat_mode() prototype --> include files 2010-10-08 Robert Larice * src/include/distodef.h , * src/spicelib/devices/bjt/bjtdset.c , * src/spicelib/devices/bjt2/bjt2dset.c : TanDeriv() prototype --> include files 2010-10-08 Robert Larice * src/xspice/cmpp/cmpp.h , * src/xspice/cmpp/main.c , * src/xspice/cmpp/pp_lst.c : str_to_lower() init_error() protoypes --> include files 2010-10-08 Robert Larice * src/include/distodef.h , * src/spicelib/analysis/distoan.c : DkerProc() CKTdisto() prototypes --> include files 2010-10-08 Robert Larice * src/ciderlib/oned/onedext.h , * src/spicelib/parser/inp.h : remove some stuttered prototypes 2010-10-08 Robert Larice * src/frontend/dotcards.c , * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c , * src/maths/misc/randnumb.c , * src/spicelib/parser/inplist.c : some .c file local prototypes 2010-10-08 Robert Larice * src/maths/cmaths/cmath2.h : cx_avg() prototype 2010-10-08 Robert Larice * src/frontend/com_measure2.h : com_dotmeasure() prototype 2010-10-08 Robert Larice * src/include/evtproto.h : EVTfindvec() prototyp 2010-10-08 Robert Larice * src/include/cktdefs.h , * src/spicelib/analysis/ckt.h : CKTdnames() prototype 2010-10-08 Robert Larice * src/xspice/icm/Makefile : too much quoting caused an error for quoted things in CFLAGS ( CFLAGS=-D"SIGNAL_FUNCTION='void(*)(int)'" ./configure ) 2010-10-08 Robert Larice * src/frontend/spiceif.c , * src/frontend/spiceif.h , * src/include/cktdefs.h , * src/include/distodef.h , * src/include/ifsim.h , * src/include/opdefs.h , * src/include/sensdefs.h , * src/include/tfdefs.h , * src/include/trandefs.h , * src/spicelib/analysis/acaskq.c , * src/spicelib/analysis/acsetp.c , * src/spicelib/analysis/analysis.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktacct.c , * src/spicelib/analysis/cktaskaq.c , * src/spicelib/analysis/cktfnda.c , * src/spicelib/analysis/cktsopt.c , * src/spicelib/analysis/daskq.c , * src/spicelib/analysis/dcoaskq.c , * src/spicelib/analysis/dcosetp.c , * src/spicelib/analysis/dctaskq.c , * src/spicelib/analysis/dctsetp.c , * src/spicelib/analysis/dsetparm.c , * src/spicelib/analysis/naskq.c , * src/spicelib/analysis/nsetparm.c , * src/spicelib/analysis/pzaskq.c , * src/spicelib/analysis/pzsetp.c , * src/spicelib/analysis/sensaskq.c , * src/spicelib/analysis/senssetp.c , * src/spicelib/analysis/tfaskq.c , * src/spicelib/analysis/tfsetp.c , * src/spicelib/analysis/tranaskq.c , * src/spicelib/analysis/transetp.c , * src/unsupported/sen2setp.c , * src/unsupported/snaskq.c : use the type JOB, remove redundant casts 2010-10-08 Robert Larice * src/frontend/outitf.c , * src/frontend/outitf.h , * src/frontend/spiceif.c , * src/include/ifsim.h , * src/main.c , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/dcop.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c : use the type JOB, remove redundant casts 2010-10-08 Robert Larice * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/include/cktdefs.h , * src/include/ftedefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktdelt.c , * src/spicelib/analysis/cktdojob.c , * src/spicelib/analysis/cktfnda.c , * src/spicelib/analysis/cktftask.c , * src/spicelib/analysis/cktnewan.c , * src/spicelib/analysis/cktntask.c , * src/spicelib/analysis/cktsetap.c , * src/spicelib/devices/bsim4/b4set.c , * src/spicelib/devices/bsim4v2/b4v2set.c , * src/spicelib/devices/bsim4v3/b4v3set.c , * src/spicelib/devices/bsim4v4/b4v4set.c , * src/spicelib/devices/bsim4v5/b4v5set.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inp2dot.c , * src/spicelib/parser/inpapnam.c , * src/spicelib/parser/inpdoopt.c , * src/spicelib/parser/inppas2.c , * src/spicelib/parser/inppas2.h , * src/spicelib/parser/inppas3.c , * src/spicelib/parser/inppas3.h : use the types TSKtask and JOB, instead of void 2010-10-08 Robert Larice * src/frontend/spiceif.c , * src/spicelib/analysis/cktnewan.c , * src/spicelib/parser/inp2dot.c : type bistromatic in preparation for the next patches Note: offsetof struct TSKtask.taskOptions === 0 2010-10-08 Robert Larice * src/frontend/spiceif.c : remove a redundant cast 2010-10-08 Robert Larice * src/frontend/spiceif.c , * src/spicelib/analysis/ckt.h : fix an incorrect prototype 2010-10-08 Robert Larice * src/include/inpptree.h , * src/spicelib/parser/inpptree.c : fix a compiler warning, void* versus void(*)(void) 2010-10-07 Holger Vogt * subckt.c: b. in i(b.xxx.byyy) 2010-10-05 Dietmar Warning * configure.ac: enabling openMP under SunStudio compiler * terminal.c, ivars.c, ifnewuid.c, inperror.c, main.c: asprintf definition also for sun compiler - can not be concentrated in ngspice.h because of libgen - libiberty conflict ============================ Rework-22 ================================== 2010-10-04 Holger Vogt * miscoms.c: remove bug no. 3080398 2010-10-02 Holger Vogt * mesadefs.h, mesamsak.c, mesamparam.c, mesasetup.c jfetmask.c: remove NAN or exp -312 outputs 2010-10-01 Robert Larice * src/spicelib/devices/hfet1/hfetmask.c , * src/spicelib/devices/hfet2/hfet2mask.c , * src/spicelib/devices/mes/mesmask.c , * src/spicelib/devices/mesa/mesamask.c : bugfix, missing return(OK) in some switch statements 2010-09-30 Robert Larice * configure.ac , * src/include/defines.h : use autoconf to find a suitable signal function type 2010-09-30 Robert Larice * src/xspice/icm/Makefile : use $(MAKE) instead of `make' 2010-09-30 Robert Larice * src/xspice/cmpp/Makefile.am , * src/xspice/cmpp/ifs_lex.l , * src/xspice/cmpp/mod_lex.l : always use flex instead of an arbitrary lex, use flex specific %options, to clean up the Makefile don't write the lexer via stdout, to improve gcc warning readability this works around a bug as well, which caused erronous lexer c files to be included in the distribution tar ball 2010-09-26 Holger Vogt * .cvsignore: m4 entry removed 2010-09-25 Holger Vogt * conf.c, conf.h, ngspice.h, visualc/config.h, configure.ac: update welcome message, version 22 * FAQ, COPYING, NEWS, INSTALL, README, README.tcl, BUGS: update to version 22 * examples/Monte_Carlo: new folder with example files 2010-09-23 Robert Larice * Makefile.am , * m4/.cvsignore : add an empty m4/.cvsignore file, to make sure the directory exists add this directory and the file compile_min.sh to the tarball 2010-09-22 Dietmar Warning * devices/mesa/mesaload.c: initialize some variables 2010-09-21 Robert Larice * autogen.sh : there are several implementations of `sed'. Some can't swallow a '\n' escape sequence on the RHS. And some want a plain newline in the RHS to be escaped. see http://sed.sourceforge.net/sedfaq4.html#s4.1 `4.1. How do I insert a newline into the RHS of a substitution?' 2010-09-19 Dietmar Warning * adms/hicum2/admsva/hicum2.va: update to version 2.24 with small exceptions from the original source code, seems the last update because model provider has limited the access only to authorized partners 2010-09-19 Robert Larice * autogen.sh : cleanup 2010-09-19 Robert Larice * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c : fix some ancient \n\r and \r\n typos 2010-09-19 Robert Larice * src/frontend/quote.c : cp_unqoute(), avoid segfault when applied to a single quote "\"" testcase: .control echo "--" .endc FIXME, still not completely done, inp_stripcomments_line() will fail on comments inside of strings 2010-09-19 Holger Vogt * src/spinit.in, configure.ac: allow lib64 in spinit (bug no. 3054424) if libdir contains lib64 * compile_min.sh: new script for compiling MINGW 32 and 64 bit 2010-09-18 Holger Vogt * src/XSPICE/icm/makedefs.in: external LDFLAGS enabled for MINGW 2010-09-18 Robert Larice * contrib/mslib/liblook , * contrib/mslib/libprm , * contrib/scripts/liblook , * contrib/scripts/libprm , * contrib/vbic/sgp2vbic , * contrib/vbic/vbic2sgp * some scripts need bash this patch is from debian, thanks 2010-09-18 Dietmar Warning * src/spicelib/devices/*/isrcacct.c, vsrcacct.c: Correct bitwise operation 2010-09-17 Holger Vogt * visualc/include/config.h, vngspice.sln, vngspice.vcproj: new configurations release, Debug, and ReleaseOMP 2010-09-17 Robert Larice * .cvsignore , * Makefile.am , * configure.ac , * config/.cvsignore : undo "use a subdirectory `config' for autoconfigure ..." from today this has broken `configure' for xgraph 2010-09-17 Robert Larice * src/frontend/Makefile.am : fix parse-bison.y dependencies 2010-09-17 Robert Larice * autogen.sh : run aclocal first, then libtoolize 2010-09-17 Robert Larice * Makefile.am , * src/include/Makefile.am , * src/maths/misc/Makefile.am , * src/maths/poly/Makefile.am , * src/spicelib/devices/ndev/Makefile.am , * src/xspice/Makefile.am , * tests/bsim3soi/Makefile.am , * tests/bsim3soidd/Makefile.am , * tests/bsim3soifd/Makefile.am , * tests/bsim3soipd/Makefile.am , * tests/mesa/Makefile.am : `make dist' add some missing artifacts 2010-09-17 Robert Larice * configure.ac , * src/spicelib/devices/Makefile.am : `make dist' improvements for `NDEV' 2010-09-17 Robert Larice * Makefile.am , * .cvsignore , * config/.cvsignore , * configure.ac : use a subdirectory `config' for autoconfigure related artifacts 2010-09-17 Robert Larice * **/Makefile.am : whitespace cleanup 2010-09-15 Holger Vogt * com_measure2.c: prevent seg fault in meas ac, if real input * examples/control_structs/MonteCarlo.sp: update, add measure 2010-09-12 Robert Larice * src/main.c : fix incorrect buffer type, and exit(1) on failure to open a tempfile 2010-09-08 Holger Vogt * inp.c, inpcom.c: include libiberty.h removed * terminal.c, ivars.c, ifnewuid.c, inperror.c, tclspice.c, main.c: rework of #ifdef HAVE_ASPRINTF ... * fteparse.h: #undef AND /* obsolete macro in ansidecl.h */ added 2010-09-08 Robert Larice * src/frontend/wdisp/windisp.c , * src/frontend/wdisp/winprint.c : fix commit from today, `function rename, Arc() -> DevDrawArc()` 2010-09-08 Robert Larice * src/include/const.h : rename include file wrapper, #ifndef CONST -> CONST_H 2010-09-08 Robert Larice * src/frontend/display.c , * src/include/ftedev.h : function rename, struct DISPDEVICE . Text() -> DrawText() 2010-09-08 Robert Larice * src/frontend/display.c , * src/include/ftedev.h : function rename, struct DISPDEVICE . Arc() -> DrawArc() 2010-09-08 Robert Larice * src/frontend/display.c , * src/frontend/display.h , * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c : function rename, Update() -> DevUpdate() 2010-09-08 Robert Larice * src/frontend/display.c , * src/frontend/display.h , * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c : function rename, DrawLine() -> DevDrawLine() 2010-09-08 Robert Larice * src/frontend/display.c , * src/frontend/display.h , * src/frontend/plotting/graf.c , * src/frontend/plotting/grid.c , * src/frontend/plotting/x11.c : function rename, Text() -> DevDrawText() 2010-09-08 Robert Larice * src/frontend/display.c , * src/frontend/display.h , * src/frontend/plotting/grid.c , * src/frontend/wdisp/windisp.c , * src/frontend/wdisp/winprint.c : function rename, Arc() -> DevDrawArc() 2010-09-08 Robert Larice * README.adms , * autogen.sh , * configure.ac , * configure.in , * src/frontend/cpitf.c , * src/misc/ivars.c : rename configure.in -> configure.ac 2010-09-08 Holger Vogt * visualc/include/config.h, vngspice.sln, vngspice.vcproj: prepare for ngspice22 2010-09-07 Robert Larice * src/frontend/parse.c , * src/include/fteparse.h , * src/spicelib/parser/inpptree.c : muffle some visual-C warnings data pointer -> function pointer conversion void* versus void(*)(void) 2010-09-07 Robert Larice * ng-spice-rework/src/maths/misc/randnumb.c : convert K&R function definitions to ansi style 2010-09-07 Robert Larice * src/xspice/ipc/ipcstdio.c : convert K&R function definitions to ansi style 2010-09-07 Robert Larice * src/frontend/inpcom.c , * src/frontend/plotting/x11.c , * src/frontend/resource.c , * src/frontend/subckt.c , * src/include/hash.h , * src/main.c , * src/misc/util.c , * src/ngproc2mod.c , * src/spicelib/analysis/cktterr.c , * src/spicelib/analysis/dctran.c , * src/spicelib/devices/ltra/ltratemp.c , * src/spicelib/devices/ltra/ltratrun.c , * src/winmain.c , * src/xspice/evt/evtbackup.c , * src/xspice/ipc/ipcaegis.c , * src/xspice/mif/mifgetvalue.c , * src/xspice/mif/miftrunc.c : use for(;;) instead of while(1) to muffle some visual-C warnings 2010-09-07 Robert Larice * examples/tclspice/tcl-testbench2/example.cir , * examples/xspice/xspice_c2.cir , * examples/xspice/xspice_c3.cir , * src/frontend/help/ChangeLog , * src/spicelib/devices/adms/mextram/admsva/COPYRIGHT_NOTICE , * visualc/how-to-ngspice-vstudio.txt , * xgraph/.cvsignore : whitespace cleanup, add missing trailing newlines 2010-09-07 Robert Larice * contrib/vbic/sgp2vbic , * contrib/vbic/vbic2sgp , * src/spicelib/devices/mos9/mos9temp.c , * src/xspice/examples/d_to_real/Makefile , * src/xspice/examples/d_to_real/cfunc.mod , * src/xspice/examples/d_to_real/ifspec.ifs , * src/xspice/examples/nco/Makefile , * src/xspice/examples/nco/ifspec.ifs , * src/xspice/examples/print_param_types/Makefile , * src/xspice/examples/print_param_types/cfunc.mod , * src/xspice/examples/print_param_types/ifspec.ifs , * src/xspice/examples/real_delay/Makefile , * src/xspice/examples/real_delay/ifspec.ifs , * src/xspice/examples/real_gain/Makefile , * src/xspice/examples/real_gain/cfunc.mod , * src/xspice/examples/real_gain/ifspec.ifs , * src/xspice/examples/real_to_v/Makefile , * src/xspice/examples/real_to_v/ifspec.ifs : whitespace cleanup, \r\n -> \n 2010-09-07 Holger Vogt * vectors.c: add plot [alli | allv | ally] * com_measure2.c: prevent seg fault if wrong meas type is chosen 2010-09-04 Dietmar Warning * misc/tilde.c: prevent unreached statement if pwd.h available * define.h: recover signaltype for SunStudio compiler signal function 2010-09-03 Holger Vogt * inpcom.c, inp.h, inpeval.c, inpgtok.c: bug removed in B source parsing, as reported by sdaau 2010-09-02 Holger Vogt * randnumb.c: inproved comments 2010-08-29 Holger Vogt * cmath2.c, randnumb.c, main.c, ngspice.h, configure.in, tclspice.c: remove fcns random() and srandom(), only use rand() and srand() or internal random number generator. * mystring.c: replace Str() by SPICE_DSTRING 2010-08-29 Dietmar Warning * fteext.h, parse.c, cmath2.c, cmath2.h,: new function sunif(), uniform random generator usable in control blocks * examples/control_structs/MonteCarlo.sp: Simple example to perform MC runs in ngspice using uniform and gaussian distributions 2010-08-29 Holger Vogt * fteext.h, main.c, randnumb.c, parse.c, cmath2.c, cmath2.h: new function sgauss(), new random number generator with very high run length 2010-08-19 Holger Vogt * xpressn.c: bug no. 3047884 fixed inp.c: prevent crash if .param is last line in input deck 2010-08-18 Holger Vogt * configure.in: add TCLCYG * autogen.sh: if --adms is selected, read the section from configure.in and store it in AC_CONFIG_FILES of temporary temp-adms.ac. Testing for availability of awk Tested with MINGW, CYGWIN, SUSE Linux, may need more tests on other OSs! 2010-08-17 Dietmar Warning * windisp.c, winprint.c, xspice/cm/cmexport.c: omit warnings 2010-08-15 Holger Vogt * configure.in: add a small section starting with *VLAMKF, containing the adms makefiles to be made * autogen.sh: if --adms is selected, read the section from configure.in and store it in AC_CONFIG_FILES of temporary configure.ac Tested with MINGW, CYGWIN, SUSE Linux, may need more tests on other OSs! 2010-08-15 Robert Larice * src/misc/string.c , * src/xspice/cmpp/mod_yacc.y : chomp some warnings 2010-08-15 Robert Larice * src/include/jobdefs.h , * src/include/tskdefs.h , * src/include/typedefs.h : typedefs for JOB and TSKtask into "typedefs.h" 2010-08-15 Robert Larice * src/spicelib/parser/inp2dot.c : use the type CKTnode instead of void* 2010-08-15 Robert Larice * src/frontend/vectors.c : change for readability 2010-08-15 Robert Larice * src/frontend/evaluate.c : change for readability 2010-08-15 Robert Larice * src/spicelib/devices/cktask.c , * src/spicelib/parser/inp2m.c : drop (GENinstance*) casts, which are no longer necessary 2010-08-15 Robert Larice * src/spicelib/devices/asrc/asrcset.c , * src/spicelib/devices/ccvs/ccvsset.c , * src/spicelib/devices/vcvs/vcvsset.c , * src/spicelib/devices/vsrc/vsrcset.c : check for shorted voltage sources, to avoid a segmentation fault 2010-08-15 Robert Larice * src/maths/sparse/spdefs.h : fix txfree() prototype 2010-08-13 Holger Vogt * autogen.sh: keep configure.in untouched by generating temporary configure.ac if --adms is selected * configure.in: remove VLAMKF; move AM_CONDITIONAL out of conditional clauses; replace AC_PROG_YACC, AC_PROG_LEX by appropriate AC_CHECK_PROGS with warning if BISON is missing w/o XSPICE, but fail if w/ XSPICE and BISON or FLEX missing; AC_CONFIG_MACRO_DIR([m4]) added * Makefile.am: ACLOCAL_AMFLAGS = -I m4 added * .cvsignore: m4 added * nghelp.c: adapt function types 2010-08-11 Robert Larice * src/include/cktdefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/include/noisedef.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktasknq.c , * src/spicelib/analysis/cktdltn.c , * src/spicelib/analysis/cktfnode.c , * src/spicelib/analysis/cktgrnd.c , * src/spicelib/analysis/cktmapn.c , * src/spicelib/analysis/cktmkcur.c , * src/spicelib/analysis/cktmkvol.c , * src/spicelib/analysis/cktneweq.c , * src/spicelib/analysis/cktnewn.c , * src/spicelib/analysis/cktsetnp.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzaskq.c , * src/spicelib/analysis/pzsetp.c , * src/spicelib/analysis/senssetp.c , * src/spicelib/analysis/tfsetp.c , * src/spicelib/devices/asrc/asrcconv.c , * src/spicelib/devices/asrc/asrcload.c , * src/spicelib/devices/asrc/asrcpzld.c , * src/spicelib/devices/asrc/asrcset.c , * src/spicelib/devices/cktbindnode.c , * src/spicelib/devices/ndev/ndevdefs.h , * src/spicelib/devices/ndev/ndevset.c , * src/spicelib/devices/urc/urcsetup.c , * src/spicelib/parser/ifnewuid.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inp2b.c , * src/spicelib/parser/inp2c.c , * src/spicelib/parser/inp2d.c , * src/spicelib/parser/inp2dot.c , * src/spicelib/parser/inp2e.c , * src/spicelib/parser/inp2f.c , * src/spicelib/parser/inp2g.c , * src/spicelib/parser/inp2h.c , * src/spicelib/parser/inp2i.c , * src/spicelib/parser/inp2j.c , * src/spicelib/parser/inp2l.c , * src/spicelib/parser/inp2m.c , * src/spicelib/parser/inp2n.c , * src/spicelib/parser/inp2o.c , * src/spicelib/parser/inp2p.c , * src/spicelib/parser/inp2q.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inp2s.c , * src/spicelib/parser/inp2t.c , * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inp2v.c , * src/spicelib/parser/inp2w.c , * src/spicelib/parser/inp2y.c , * src/spicelib/parser/inp2z.c , * src/spicelib/parser/inppas2.c , * src/spicelib/parser/inppas3.c , * src/spicelib/parser/inpptree.c , * src/spicelib/parser/inpsymt.c , * src/xspice/mif/mif_inp2.c : use the type CKTnode instead of void* 2010-08-11 Robert Larice * src/spicelib/devices/cktinit.c , * src/spicelib/parser/inp2b.c : cleanup 2010-08-10 Robert Larice * src/frontend/spiceif.c , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/cktnoise.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c , * src/spicelib/devices/bjt/bjtnoise.c , * src/spicelib/devices/bjt2/bjt2noise.c , * src/spicelib/devices/bsim1/b1noi.c , * src/spicelib/devices/bsim2/b2noi.c , * src/spicelib/devices/bsim3/b3noi.c , * src/spicelib/devices/bsim3soi/b4soinoi.c , * src/spicelib/devices/bsim3soi_dd/b3soiddnoi.c , * src/spicelib/devices/bsim3soi_fd/b3soifdnoi.c , * src/spicelib/devices/bsim3soi_pd/b3soipdnoi.c , * src/spicelib/devices/bsim3v0/b3v0noi.c , * src/spicelib/devices/bsim3v1/b3v1noi.c , * src/spicelib/devices/bsim3v1a/b3v1anoi.c , * src/spicelib/devices/bsim3v1s/b3v1snoi.c , * src/spicelib/devices/bsim3v32/b3v32noi.c , * src/spicelib/devices/bsim4/b4noi.c , * src/spicelib/devices/bsim4v2/b4v2noi.c , * src/spicelib/devices/bsim4v3/b4v3noi.c , * src/spicelib/devices/bsim4v4/b4v4noi.c , * src/spicelib/devices/bsim4v5/b4v5noi.c , * src/spicelib/devices/csw/cswnoise.c , * src/spicelib/devices/dio/dionoise.c , * src/spicelib/devices/hisim/hsm1noi.c , * src/spicelib/devices/jfet/jfetnoi.c , * src/spicelib/devices/jfet2/jfet2noi.c , * src/spicelib/devices/mes/mesnoise.c , * src/spicelib/devices/mos1/mos1noi.c , * src/spicelib/devices/mos2/mos2noi.c , * src/spicelib/devices/mos3/mos3noi.c , * src/spicelib/devices/mos9/mos9noi.c , * src/spicelib/devices/res/resnoise.c , * src/spicelib/devices/soi3/soi3nois.c , * src/spicelib/devices/sw/swnoise.c , * src/spicelib/devices/urc/urcsetup.c , * src/spicelib/devices/vbic/vbicnoise.c , * src/spicelib/parser/inp2b.c , * src/spicelib/parser/inp2c.c , * src/spicelib/parser/inp2d.c , * src/spicelib/parser/inp2e.c , * src/spicelib/parser/inp2f.c , * src/spicelib/parser/inp2g.c , * src/spicelib/parser/inp2h.c , * src/spicelib/parser/inp2i.c , * src/spicelib/parser/inp2j.c , * src/spicelib/parser/inp2k.c , * src/spicelib/parser/inp2l.c , * src/spicelib/parser/inp2m.c , * src/spicelib/parser/inp2o.c , * src/spicelib/parser/inp2p.c , * src/spicelib/parser/inp2q.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inp2s.c , * src/spicelib/parser/inp2t.c , * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inp2v.c , * src/spicelib/parser/inp2w.c , * src/spicelib/parser/inp2y.c , * src/spicelib/parser/inp2z.c : drop a bunch of (void**) NULL casts, all in the sixth argument of IFnewUid() 2010-08-10 Robert Larice * src/include/cktdefs.h , * src/include/ifsim.h , * src/spicelib/analysis/ckt.h , * src/spicelib/devices/cktbindnode.c , * src/spicelib/devices/urc/urcsetup.c , * src/spicelib/parser/inp2y.c : use GENinstance*, instead of void* 2010-08-10 Robert Larice * src/frontend/plotting/x11.c : fix comment 2010-08-10 Robert Larice * src/spicelib/analysis/ckt.h : missing `extern' 2010-08-10 Robert Larice * src/include/cktdefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktparam.c , * src/spicelib/analysis/cktpname.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inpdpar.c : use GENinstance*, instead of void* 2010-08-10 Robert Larice * src/include/cktdefs.h , * src/include/ifsim.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktdltm.c : use GENmodel*, instead of void* 2010-08-10 Robert Larice * src/maths/ni/niniter.c' : drop (SMPmatrix*) casts, which are no longer necessary 2010-08-10 Robert Larice * src/spicelib/analysis/tfanal.c : drop (GENinstance*) casts, which are no longer necessary 2010-08-10 Robert Larice * src/frontend/spiceif.c' : drop (INPtables*) casts, which are no longer necessary 2010-08-10 Robert Larice * src/frontend/spiceif.c , * src/spicelib/analysis/cktmask.c , * src/spicelib/analysis/cktmcrt.c , * src/spicelib/analysis/cluster.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/devices/cktcrte.c , * src/spicelib/devices/cktfinddev.c : drop (GENmodel*) casts, which are no longer necessary 2010-08-09 Robert Larice * src/frontend/display.c , * src/frontend/parser/input.c , * src/frontend/plotting/x11.c , * src/main.c : fix a busy waiting loop when using editline. rl_event_hook must block until there is some work to do. (select on stdin and the X11 socket). For non-X11, don't use rl_event_hook at all. 2010-08-09 Robert Larice * src/spicelib/analysis/cktmapn.c : bug fix, incorrect indirection level, yet without consequence, function CKTmapNode() is unused. 2010-08-09 Robert Larice * src/spicelib/parser/inpgval.c : fix assignment to a member of union IFvalue 2010-08-07 Robert Larice * src/frontend/parse-bison.c , * src/frontend/parse-bison.h , * src/frontend/parse-bison.y : bug fix, avoid segfault, caused when parsing an unknown function in parse-bison.y 2010-08-07 Dietmar Warning spicelib/devices/*/b4soimask.c, csw*.c, mos6load.c, soi3load.c, swnoise.c: fix some wrong 'double' to 'int' assignments 2010-08-07 Robert Larice * src/main.c : bug fix, segfault caused by an ancient `editline' workaround (bug tracker ID: 2966977, `segfault with editline') 2010-08-07 Robert Larice * src/tclspice.c , * src/include/tclspice.h : bug fix, I've recently broken compilation of tclspice. - missing #include - use the GENmodel and GENinstance type instead of void* - muffle some type warnings. 2010-08-07 Robert Larice * configure.in : for gcc, don't report `unused parameter' Warnings * src/Makefile.am (bug tracker ID: 3019263) add missing $(EXEEXT) for cygwin, thank you marco atzeri 2010-08-06 Dietmar Warning * spicelib/parser/inp2q.c: add prototype for controlled_exit * frontend/com_measure2.c, inp.c, inpcom.c, vectors.c: fallback for not handled enumeration values in switch 2010-08-04 Robert Larice * src/frontend/control.c : fix an ancient bug, trampling on freed memory causing segfaults and sickness. getlims() {a function used by plot} does surgery to a wordlist, freeing some words. yet docommand() relied on the wordlist being unmodified. 2010-08-02 Robert Larice * src/frontend/hpgl.c , * src/frontend/plotting/plot5.c : implement Arc() for plot5 and hpgl (smith diagram) 2010-08-01 Holger Vogt * autogen.sh: update for adms 2010-08-01 Robert Larice * src/pkgIndex.tcl.in , * src/tclspice.c , * src/frontend/display.c , * src/frontend/display.h , * src/frontend/hpgl.c , * src/frontend/postsc.c , * src/frontend/plotting/grid.c , * src/frontend/plotting/plot5.c , * src/frontend/plotting/x11.c , * src/frontend/wdisp/windisp.c , * src/frontend/wdisp/winprint.c , * src/include/ftedev.h : bug fix, implementation of the X11 draw arc implementation. parameter change for all Arc() functions. from theta1, theta2 to theta,delta_theta the previous interface was ambiguous. fix the x11lineararcs implementation, which could loop forever. but don't use it anyways, since the real X11 draw arc works properly now. 2010-08-01 Holger Vogt * autogen.sh, spicelib/parser/inp2q.c: update for adms 2010-07-31 Robert Larice * src/frontend/parse.c : work around a segmentation fault, when plotting plot something vs vec vec was freed too early 2010-07-31 Robert Larice * src/frontend/vectors.c : fix an ancient typo, responsible for segfault or garbage when plotting multidimensional complex vectors 2010-07-30 Robert Larice * src/frontend/evaluate.c : fix an ancient typo, responsible for segfault or garbage when operating on vectors 2010-07-30 Robert Larice * src/main.c : need an #ifdef for one of the just added #includes 2010-07-30 Robert Larice * src/frontend/com_dl.c , * src/frontend/com_help.c , * src/frontend/com_set.c , * src/frontend/com_sysinfo.c , * src/frontend/hcomp.c , * src/frontend/parse.h , * src/include/pzdefs.h , * src/include/sen2defs.h , * src/include/typedefs.h , * src/main.c , * src/maths/misc/accuracy.c , * src/maths/misc/bernoull.c , * src/maths/misc/norm.c , * src/ngsconvert.c , * src/spicelib/analysis/cktdelt.c , * src/spicelib/devices/limit.c , * src/xspice/evt/evtaccept.c : add #include's for visibility of prototypes to their function definitions move some typedefs to "typedef.h" 2010-07-30 Robert Larice * src/include/ifsim.h , * src/include/inpptree.h , * src/ngproc2mod.c , * src/spicelib/devices/bsim3/bsim3def.h , * src/spicelib/devices/bsim3/bsim3ext.h , * src/spicelib/devices/bsim3soi/b4soidef.h , * src/spicelib/devices/bsim3soi/b4soiext.h , * src/spicelib/devices/bsim3v1/bsim3v1def.h , * src/spicelib/devices/bsim4/bsim4def.h , * src/spicelib/devices/bsim4/bsim4ext.h , * src/spicelib/devices/bsim4v2/bsim4v2def.h , * src/spicelib/devices/bsim4v2/bsim4v2ext.h , * src/spicelib/devices/bsim4v3/bsim4v3def.h , * src/spicelib/devices/bsim4v3/bsim4v3ext.h , * src/spicelib/devices/bsim4v4/bsim4v4def.h , * src/spicelib/devices/bsim4v5/bsim4v5def.h , * src/spicelib/devices/bsim4v5/bsim4v5ext.h , * src/spicelib/devices/hisim/hsm1eval102.c , * src/spicelib/devices/hisim/hsm1eval112.c , * src/spicelib/devices/hisim/hsm1eval120.c , * src/spicelib/devices/jfet2/psmodel.h : remove some #ifdef __STDC__ wrappers, and some stray '#' 2010-07-30 Robert Larice * src/frontend/plotting/agraf.c , * src/spicelib/devices/bsim2/b2set.c , * src/spicelib/devices/bsim4v2/b4v2set.c , * src/spicelib/devices/bsim4v3/b4v3set.c , * src/spicelib/devices/bsim4v4/b4v4set.c , * src/spicelib/devices/bsim4v5/b4v5set.c : fix some literal floating point constants, which should have been integers 2010-07-25 Holger Vogt * inpcom.c: correct loop parameter i -> pai, remove unnecessary output 2010-07-24 Robert Larice * src/include/cktdefs.h , * src/include/devdefs.h , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/cktdest.c , * src/spicelib/analysis/cktdisto.c , * src/spicelib/analysis/cktdump.c , * src/spicelib/analysis/cktfbran.c , * src/spicelib/analysis/cktfndm.c , * src/spicelib/analysis/ckti2nod.c , * src/spicelib/analysis/cktic.c , * src/spicelib/analysis/cktload.c , * src/spicelib/analysis/cktmask.c , * src/spicelib/analysis/cktmcrt.c , * src/spicelib/analysis/cktmpar.c , * src/spicelib/analysis/cktnoise.c , * src/spicelib/analysis/cktop.c , * src/spicelib/analysis/cktparam.c , * src/spicelib/analysis/cktpartn.c , * src/spicelib/analysis/cktpmnam.c , * src/spicelib/analysis/cktpname.c , * src/spicelib/analysis/cktpzld.c , * src/spicelib/analysis/cktpzset.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/cktsetup.c , * src/spicelib/analysis/cktsgen.c , * src/spicelib/analysis/ckttemp.c , * src/spicelib/analysis/ckttroub.c , * src/spicelib/analysis/ckttrunc.c , * src/spicelib/analysis/ckttyplk.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/devices/cktfinddev.c , * src/unsupported/cktsenup.c , * src/unsupported/cktsnld.c , * src/unsupported/cktsnprt.c , * src/unsupported/cktsnset.c , * src/xspice/evt/evtload.c , * src/xspice/mif/mif_inp2.c , * src/xspice/mif/mifask.c , * src/xspice/mif/mifgetmod.c , * src/xspice/mif/mifload.c , * src/xspice/mif/mifmask.c , * src/xspice/mif/mifmpara.c , * src/xspice/mif/mifsetup.c : find a suitable home for **DEVices and DEVmaxnum in devdefs.h 2010-07-24 Robert Larice * src/frontend/help/help.c , * src/frontend/misccoms.c , * src/spicelib/devices/dev.c , * src/xspice/cmpp/pp_mod.c , * src/xspice/cmpp/read_ifs.c : muffle `nested extern' warnings, and drop a handcrafted malloc prototype 2010-07-24 Robert Larice * src/ciderlib/input/meshset.c , * src/frontend/breakp.c , * src/frontend/com_alias.c , * src/frontend/define.c , * src/frontend/dotcards.c , * src/frontend/inpcom.c , * src/frontend/numparam/xpressn.c , * src/frontend/parser/backq.c , * src/frontend/parser/lexical.c , * src/frontend/runcoms.c , * src/frontend/shyu.c , * src/frontend/variable.c , * src/misc/string.c , * src/misc/util.c , * src/misc/wlist.c , * src/spicelib/devices/cpl/cplload.c , * src/spicelib/devices/txl/txlload.c , * src/spicelib/parser/inp2dot.c , * src/xspice/cmpp/mod_yacc.y : muffle compiler warnings suggest a space before ';' or explicit braces around empty and similar things. 2010-07-24 Robert Larice * src/frontend/inpcom.c , * src/spicelib/devices/ndev/ndevparm.c , * src/spicelib/parser/inp2n.c , * src/spicelib/parser/inppas2.c , * src/xspice/cm/cmevt.c : muffle `unused variable' warnings 2010-07-24 Robert Larice * src/frontend/plotting/x11.c : muffle `may be used uninitialized' warnings 2010-07-24 Robert Larice * src/spicelib/devices/bsim3soi/b4soi.c , * src/spicelib/devices/bsim3soi/b4soiacld.c , * src/spicelib/devices/bsim3soi/b4soiask.c , * src/spicelib/devices/bsim3soi/b4soicheck.c , * src/spicelib/devices/bsim3soi/b4soicvtest.c , * src/spicelib/devices/bsim3soi/b4soidel.c , * src/spicelib/devices/bsim3soi/b4soidest.c , * src/spicelib/devices/bsim3soi/b4soigetic.c , * src/spicelib/devices/bsim3soi/b4soild.c , * src/spicelib/devices/bsim3soi/b4soimask.c , * src/spicelib/devices/bsim3soi/b4soimdel.c , * src/spicelib/devices/bsim3soi/b4soimpar.c , * src/spicelib/devices/bsim3soi/b4soinoi.c , * src/spicelib/devices/bsim3soi/b4soipar.c , * src/spicelib/devices/bsim3soi/b4soipzld.c , * src/spicelib/devices/bsim3soi/b4soiset.c , * src/spicelib/devices/bsim3soi/b4soitemp.c , * src/spicelib/devices/bsim3soi/b4soitrunc.c : remove static char rcsid to muffle `unused variable' warnings 2010-07-24 Robert Larice * src/include/inpdefs.h , * src/spicelib/devices/ndev/ndevacld.c , * src/spicelib/devices/ndev/ndevask.c , * src/spicelib/devices/ndev/ndevdel.c , * src/spicelib/devices/ndev/ndevdump.c , * src/spicelib/devices/ndev/ndevmdel.c , * src/spicelib/devices/ndev/ndevparm.c , * src/spicelib/devices/ndev/ndevpzld.c , * src/spicelib/devices/ndev/ndevset.c , * src/spicelib/devices/ndev/ndevtemp.c , * src/spicelib/devices/ndev/ndevtrun.c , * src/spicelib/parser/inp2n.c : convert K&R function definitions to ansi style use the GENmodel and GENinstance type instead of void* 2010-07-24 Robert Larice fix dangerous things, potential bugs, at least for big endian machines * src/frontend/inp.c , a bool (unsigned char) and an int have been mixed, and the address of the thing was taken. should fail on a big endian machine * src/frontend/spiceif.c , the value of an union, made of a bool (unsigned char), an int, etc, is silently cast into an int. This can introduce stack noise, in the CP_BOOL case * src/frontend/variable.c : a `variable' is created with type CP_NUM, but only bool was initialized. This can introduce stack noise. 2010-07-24 Robert Larice * src/include/onedev.h , * src/include/twodev.h : add two #include files, to fix broken cider compilation, caused by the changes from 2010-07-23 2010-07-24 Robert Larice * src/frontend/evaluate.c , * src/frontend/parse.c , * src/include/fteext.h , * src/include/fteparse.h , * src/maths/cmaths/cmath2.c , * src/maths/cmaths/cmath2.h : fix the type signature of the cx_* functions 2010-07-23 Robert Larice * src/include/smpdefs.h , * src/include/spmatrix.h : better place for the prototype of spConstMult() 2010-07-23 Robert Larice * src/ciderlib/oned/onecont.c , * src/ciderlib/oned/onepoiss.c , * src/ciderlib/twod/twocont.c , * src/ciderlib/twod/twoncont.c , * src/ciderlib/twod/twopcont.c , * src/ciderlib/twod/twopoiss.c : use the type SMPmatrix instead of char * remove some redundant forward function declarations remove some redundant nested function declarations 2010-07-23 Robert Larice * src/ngmultidec.c , * src/include/onedev.h , * src/include/smpdefs.h , * src/include/spmatrix.h , * src/include/twodev.h , * src/maths/sparse/spalloc.c , * src/maths/sparse/spbuild.c , * src/maths/sparse/spdefs.h , * src/maths/sparse/spfactor.c , * src/maths/sparse/spoutput.c , * src/maths/sparse/spsmp.c , * src/maths/sparse/spsolve.c , * src/maths/sparse/sputils.c , * src/spicelib/analysis/cktacct.c : use the types MatrixPtr and SMPmatrix instead of void and char * both are the same thing, MatrixPtr is used inside the sparse/* domain, SMPmatrix is used in the rest of spice remove casts, which are no longer necessary 2010-07-23 Robert Larice * src/include/spmatrix.h , * src/maths/sparse/spbuild.c , * src/maths/sparse/spdefs.h : use a void* instead of a char* for anonymous `InitInfo' in src/sparse/*.c 2010-07-23 Robert Larice * src/maths/sparse/sputils.c : convert K&R function definitions to ansi style 2010-07-20 Robert Larice * src/frontend/com_option.c , * src/frontend/com_set.c , * src/frontend/com_strcmp.c , * src/frontend/cpitf.c , * src/frontend/dotcards.c , * src/frontend/init.c , * src/frontend/inp.c , * src/frontend/variable.c , * src/frontend/variable.h , * src/frontend/wdisp/windisp.c , * src/include/cpextern.h : use a void * for the third argument (&value) of the cp_vset() function (polymorphic, has been claimed to be char *) 2010-07-20 Robert Larice * src/tclspice.c : drop #include , (even for non MSC_VER) 2010-07-20 Robert Larice * src/main.c : fix an incorrect type, (&char versus &bool) 2010-07-20 Robert Larice * src/frontend/inp.c , * src/frontend/misccoms.c , * src/frontend/postcoms.c , * src/frontend/rawfile.c , * src/frontend/spec.c , * src/frontend/subckt.c , * src/frontend/plotting/agraf.c : Change remaining code to use the new usage pattern cp_getvar(,CP_BOOL,NULL) 2010-07-20 Robert Larice * src/frontend/com_display.c , * src/frontend/device.c , * src/frontend/inp.c , * src/frontend/inpcom.c , * src/frontend/measure.c , * src/frontend/nutinp.c , * src/frontend/outitf.c , * src/frontend/terminal.c , * src/frontend/variable.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/x11.c : allow cp_getvar(,CP_BOOL,NULL) to avoid insane usage The third parameter is a pointer to the result value. Frequently only the function return value is used, (presence or nonpresence of the variable) and the third parameter points to an unused variable. Even worse, in several cases a dummy variable of incorrect type is used for that purpose. Thus, allow the third parameter to be NULL, and kill those dummy variables. 2010-07-19 Holger Vogt * b4ld.c: correct typo which led to non-convergence of ro_17.cir 2010-07-17 Robert Larice * src/main.c , * src/frontend/inp.c , * src/frontend/options.c , * src/frontend/spiceif.c , * src/frontend/spiceif.h , * src/include/fteext.h : use type void* to pass anonymous data to function if_option() indicate its actual type with an enum cp_types argument 2010-07-17 Robert Larice * src/frontend/variable.c , * src/frontend/variable.h , * src/frontend/vectors.c , * src/frontend/plotting/graf.c : replace vt_types -> cp_types to complete the last change, lets rename the enum itself as well replacement was done mechanical, with perl -pi -e 's/vt_types/cp_types/g' $(git grep -le '\bvt_types' | grep -v ChangeLog) * src/include/cpextern.h : fix a comment, reflecting the VT_ -> CP_ change 2010-07-17 Robert Larice * src/* : textual replacement VT_* to CP_* these are the enum constans of `enum vp_types' . VT_* is allready used in the windows world. lets use CP_* to avoid conflicts. replacement was done mechanical, with: perl -pi -e 's/VT_(BOOL|NUM|REAL|STRING|LIST)/CP_\1/g' $(git grep -le '\bVT_') 2010-07-17 Robert Larice * src/frontend/variable.c , * src/frontend/variable.h , * src/frontend/plotting/agraf.c , * src/frontend/plotting/gnuplot.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/plotcurv.c , * src/frontend/plotting/plotit.c , * src/frontend/plotting/xgraph.c , * src/frontend/wdisp/windisp.c , * src/include/cpextern.h , * src/maths/cmaths/cmath4.c , * src/maths/misc/randnumb.c , * src/spicelib/devices/bsim3/b3par.c , * src/spicelib/devices/bsim3/b3set.c , * src/spicelib/devices/bsim3soi/b4soiset.c , * src/spicelib/devices/bsim3v0/b3v0par.c , * src/spicelib/devices/bsim3v1/b3v1par.c , * src/spicelib/devices/bsim3v1a/b3v1apar.c , * src/spicelib/devices/bsim3v1s/b3v1spar.c , * src/spicelib/devices/bsim3v32/b3v32par.c , * src/spicelib/devices/bsim4/b4par.c , * src/spicelib/devices/bsim4/b4set.c , * src/spicelib/devices/bsim4v2/b4v2par.c , * src/spicelib/devices/bsim4v3/b4v3par.c , * src/spicelib/devices/bsim4v4/b4v4par.c , * src/spicelib/devices/bsim4v5/b4v5par.c , * src/spicelib/parser/inpgmod.c : consolidate enum cp_types and enum vt_types . use this enum for some function arguments and struct members . drop some include "variable.h" which are no longer needed , propably many more could be droped . drop #define VT_* which have been used as workaround for the type mess . 2010-07-17 Holger Vogt * typesdef.c: correct the number of available types and plots 2010-07-16 Robert Larice * src/ngsconvert.c , * src/frontend/define.c , * src/frontend/define.h , * src/frontend/vectors.c , * src/frontend/vectors.h , * src/include/fteext.h : `const' qualifier for char* arguments of vec_get() and ft_substdef() 2010-07-16 Robert Larice * src/xspice/icm/xtraevt/d_to_real/cfunc.mod , * src/xspice/icm/xtraevt/real_delay/cfunc.mod , * src/xspice/icm/xtraevt/real_gain/cfunc.mod , * src/xspice/icm/xtraevt/real_to_v/cfunc.mod : xspice, xtraevt/*real*, add casts to `INPUT' and `OUTPUT' the *.ifs files specify this to be `real' yet the *.mod translator seems to be incomplete, and delivers void * 2010-07-16 Robert Larice * src/xspice/icm/analog/multi_input_pwl/cfunc.mod : add a missing `const' qualifier 2010-07-16 Robert Larice * src/xspice/icm/digital/d_fdiv/cfunc.mod : xspice, digital/d_fdiv, fix the type of counter and counter_old from Digital_State_t to int 2010-07-16 Robert Larice * src/xspice/icm/digital/d_dff/cfunc.mod , * src/xspice/icm/digital/d_dlatch/cfunc.mod , * src/xspice/icm/digital/d_jkff/cfunc.mod , * src/xspice/icm/digital/d_srff/cfunc.mod , * src/xspice/icm/digital/d_srlatch/cfunc.mod , * src/xspice/icm/digital/d_tff/cfunc.mod : xspice, flip-flops, cast the `ic' PARAM to Digitial_State_t the *.ifs file claims this parameter to be an integer in range 0..2 meant to represent ZERO, ONE and UNKNOWN * src/xspice/icm/digital/d_ram/cfunc.mod : xspice, the same fix for `ram' 2010-07-16 Robert Larice * src/xspice/icm/analog/pwl/cfunc.mod , * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod , * src/xspice/icm/xtradev/zener/cfunc.mod : xspice, cast so called `STATIC_VAR' pointers to their concrete type 2010-07-14 Holger Vogt * commands.c, options.c, fteext.h, inp.c: option command in spinit or control section as enhancement to .options command 2010-07-14 Robert Larice * src/frontend/commands.c : remove leftover /*FALSE,*/ comments from the last commit, which where left for the single purpose of better visualization in a diff tool. 2010-07-14 Robert Larice * src/frontend/commands.c , * src/frontend/control.c , * src/include/cpdefs.h : eliminate co_stringargs, which is used nowhere, yet is related to an incorrectly typed function call 2010-07-13 Robert Larice * src/frontend/device.c , * src/frontend/device.h , * src/frontend/gens.c , * src/frontend/gens.h * fix the argument types of the functions printstr_n printstr_m bogus1 and bogus2 to fit the type signature expected by the iterator dgen_for_n() 2010-07-13 Robert Larice * src/frontend/device.c , * src/frontend/device.h : split the function printstr() into printstr_n() and printstr_m() printstr() is exclusively used as argument to the map function dgen_for_n() and misused a parameter to distinguish two separate functionalities. 2010-07-13 Robert Larice * src/frontend/gens.c , * src/frontend/gens.h : fix the type of the function pointer argument of wl_forall() 2010-07-11 Robert Larice * src/frontend/parse.c , * src/include/fteparse.h : fix function pointer initialization 2010-07-11 Robert Larice * src/frontend/numparam/spicenum.c , * src/frontend/numparam/xpressn.c , * src/misc/hash.c : add casts for void* returning functions 2010-07-11 Robert Larice * src/xspice/cmpp/mod_lex.l : for c++, lex input() function is named yyinput() 2010-07-11 Robert Larice * src/spicelib/parser/inpptree.c : missing (void*) casts 2010-07-11 Robert Larice * src/spicelib/analysis/cktsens.c : fix type and usage of some function pointers 2010-07-11 Robert Larice * src/spicelib/devices/dev.c : fix some function pointer casts 2010-07-11 Robert Larice * src/xspice/idn/idndig.c : missing casts 2010-07-11 Robert Larice * src/ngmultidec.c , * src/frontend/resource.c : tiny, fix two casts 2010-07-11 Robert Larice * src/xspice/icm/analog/oneshot/cfunc.mod , * src/xspice/icm/analog/pwl/cfunc.mod , * src/xspice/icm/analog/sine/cfunc.mod , * src/xspice/icm/analog/square/cfunc.mod , * src/xspice/icm/analog/triangle/cfunc.mod , * src/xspice/icm/digital/d_osc/cfunc.mod , * src/xspice/icm/xtradev/core/cfunc.mod : dont compare with '\0' when NULL was meant 2010-07-11 Robert Larice * src/spicelib/devices/vccs/vccsask.c , * src/spicelib/devices/vccs/vccsdel.c , * src/spicelib/devices/vccs/vccsdest.c , * src/spicelib/devices/vccs/vccsload.c , * src/spicelib/devices/vccs/vccsmdel.c , * src/spicelib/devices/vccs/vccspar.c , * src/spicelib/devices/vccs/vccspzld.c , * src/spicelib/devices/vccs/vccssacl.c , * src/spicelib/devices/vccs/vccsset.c , * src/spicelib/devices/vccs/vccssld.c , * src/spicelib/devices/vccs/vccssprt.c , * src/spicelib/devices/vccs/vccssset.c : #include "vccsext.h" to make the function declarations visible to their function definitions 2010-07-11 Robert Larice * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c : cast the udn*() function args 2010-07-10 Robert Larice * src/include/spmatrix.h , * src/maths/sparse/spbuild.c : ansi style function args for a function pointer arg of spInitialize() NOTE: split personality, user interface talks about `spREAL' which is internally refered to as `RealNumber' 2010-07-10 Holger Vogt * com_measure2.c: patch by Bill Swartz from 2010-07-04 2010-07-10 Robert Larice * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod , * src/xspice/icm/xtradev/capacitor/cfunc.mod , * src/xspice/icm/xtradev/inductor/cfunc.mod : drop some malloc prototypes, use 2010-07-10 Robert Larice * src/include/lsort.h : ansi function declaration and definition for SORT() and SORT1() * src/xspice/cmpp/read_ifs.c : bool used, Boolean_t wanted. 2010-07-10 Robert Larice * src/include/miftypes.h , * src/xspice/mif/mifload.c , * src/xspice/mif/mifsetup.c , * src/xspice/mif/mifutil.c : extend the Mif_Cntl_Src_Type_t enum, to avoid mixed use with integer -1. FIXME, the switch() in mifsetup.c looks suspicious. 2010-07-10 Holger Vogt * com_measure2.c: allow variables v(n1)=v(n2) * inpcom.c: par('expression') in .four, .plot, .print, .meas, .save, command .probe added * string.c, ngspice.h: new fcn gettok_iv() 2010-07-09 Robert Larice * src/frontend/spiceif.c , * src/spicelib/analysis/tfanal.c , * src/spicelib/parser/inpaname.c : upgrade some casts from void* to more specific type 2010-07-09 Robert Larice * src/xspice/cm/cm.c , * src/xspice/cm/cmevt.c , * src/xspice/cmpp/pp_lst.c , * src/xspice/cmpp/writ_ifs.c , * src/xspice/enh/enhtrans.c , * src/xspice/evt/evtdump.c , * src/xspice/evt/evtinit.c , * src/xspice/evt/evtiter.c , * src/xspice/evt/evtload.c , * src/xspice/evt/evtnode_copy.c , * src/xspice/evt/evtop.c , * src/xspice/evt/evtplot.c , * src/xspice/evt/evtqueue.c , * src/xspice/evt/evtsetup.c , * src/xspice/evt/evttermi.c , * src/xspice/icm/digital/d_source/cfunc.mod , * src/xspice/icm/digital/d_state/cfunc.mod , * src/xspice/icm/spice2poly/icm_spice2poly/cfunc.mod , * src/xspice/icm/xtraevt/int/udnfunc.c , * src/xspice/icm/xtraevt/real/udnfunc.c , * src/xspice/ipc/ipctiein.c , * src/xspice/mif/mif_inp2.c , * src/xspice/mif/mifask.c , * src/xspice/mif/mifgetmod.c , * src/xspice/mif/mifgetvalue.c , * src/xspice/mif/mifmask.c , * src/xspice/mif/mifmpara.c , * src/xspice/mif/mifsetup.c , * src/xspice/mif/mifutil.c : add and fix casts to the return values of malloc() function calls 2010-07-08 Robert Larice * src/xspice/ipc/ipc.c , * src/xspice/mif/mif_inp2.c , * src/xspice/mif/mifgetmod.c : fix some few casts. 2010-07-08 Robert Larice * src/tclspice.c , * src/frontend/outitf.c , * src/frontend/spiceif.c , * src/spicelib/parser/ifnewuid.c : INPtables, remove some casts, which are no longer necessary 2010-07-08 Robert Larice * src/tclspice.c , * src/frontend/outitf.h , * src/frontend/spiceif.c , * src/include/cktdefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktfndm.c , * src/spicelib/analysis/cktmask.c , * src/spicelib/analysis/cktmcrt.c , * src/spicelib/analysis/cktmpar.c , * src/spicelib/analysis/cktpmnam.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/tfanal.c , * src/spicelib/devices/cktask.c , * src/spicelib/devices/cktcrte.c , * src/spicelib/devices/cktfinddev.c , * src/spicelib/devices/ind/mutsetup.c , * src/spicelib/devices/urc/urcsetup.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inp2b.c , * src/spicelib/parser/inp2c.c , * src/spicelib/parser/inp2d.c , * src/spicelib/parser/inp2e.c , * src/spicelib/parser/inp2f.c , * src/spicelib/parser/inp2g.c , * src/spicelib/parser/inp2h.c , * src/spicelib/parser/inp2i.c , * src/spicelib/parser/inp2j.c , * src/spicelib/parser/inp2k.c , * src/spicelib/parser/inp2l.c , * src/spicelib/parser/inp2m.c , * src/spicelib/parser/inp2n.c , * src/spicelib/parser/inp2o.c , * src/spicelib/parser/inp2p.c , * src/spicelib/parser/inp2q.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inp2s.c , * src/spicelib/parser/inp2t.c , * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inp2v.c , * src/spicelib/parser/inp2w.c , * src/spicelib/parser/inp2y.c , * src/spicelib/parser/inp2z.c , * src/spicelib/parser/inpaname.c , * src/spicelib/parser/inppname.c : use the GENmodel and GENinstance type instead of void* 2010-07-07 Robert Larice * src/include/dllitf.h , * src/include/mifproto.h , * src/xspice/icm/dlmain.c , * src/xspice/mif/mif_inp2.c , * src/xspice/mif/mifgetmod.c , * src/xspice/mif/mifgetvalue.c : the fourth of a series of four patches, which will change the code to use the CKTcircuit type instead of the current mixed void*/char* 2010-07-07 Robert Larice * src/main.c , * src/ngnutmeg.c , * src/ngspice.c , * src/frontend/outitf.c , * src/frontend/outitf.h , * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/frontend/where.c , * src/include/cktdefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/include/ipcproto.h , * src/maths/ni/nidest.c , * src/spicelib/analysis/acan.c , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktasknq.c , * src/spicelib/analysis/cktdelt.c , * src/spicelib/analysis/cktdest.c , * src/spicelib/analysis/cktdlti.c , * src/spicelib/analysis/cktdltm.c , * src/spicelib/analysis/cktdltn.c , * src/spicelib/analysis/cktdojob.c , * src/spicelib/analysis/cktfnda.c , * src/spicelib/analysis/cktfndm.c , * src/spicelib/analysis/cktfnode.c , * src/spicelib/analysis/cktftask.c , * src/spicelib/analysis/cktgrnd.c , * src/spicelib/analysis/ckti2nod.c , * src/spicelib/analysis/cktmapn.c , * src/spicelib/analysis/cktmask.c , * src/spicelib/analysis/cktmcrt.c , * src/spicelib/analysis/cktmkcur.c , * src/spicelib/analysis/cktmkvol.c , * src/spicelib/analysis/cktmpar.c , * src/spicelib/analysis/cktnewan.c , * src/spicelib/analysis/cktneweq.c , * src/spicelib/analysis/cktnewn.c , * src/spicelib/analysis/cktntask.c , * src/spicelib/analysis/cktnum2n.c , * src/spicelib/analysis/cktparam.c , * src/spicelib/analysis/cktpmnam.c , * src/spicelib/analysis/cktpname.c , * src/spicelib/analysis/cktsens.c , * src/spicelib/analysis/cktsetnp.c , * src/spicelib/analysis/ckttroub.c , * src/spicelib/analysis/dcop.c , * src/spicelib/analysis/dctran.c , * src/spicelib/analysis/dctrcurv.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/analysis/pzan.c , * src/spicelib/analysis/tfanal.c , * src/spicelib/devices/cktask.c , * src/spicelib/devices/cktbindnode.c , * src/spicelib/devices/cktcrte.c , * src/spicelib/devices/cktfinddev.c , * src/spicelib/devices/ind/mutsetup.c , * src/spicelib/devices/urc/urcsetup.c , * src/spicelib/parser/ifnewuid.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inp2b.c , * src/spicelib/parser/inp2c.c , * src/spicelib/parser/inp2d.c , * src/spicelib/parser/inp2dot.c , * src/spicelib/parser/inp2e.c , * src/spicelib/parser/inp2f.c , * src/spicelib/parser/inp2g.c , * src/spicelib/parser/inp2h.c , * src/spicelib/parser/inp2i.c , * src/spicelib/parser/inp2j.c , * src/spicelib/parser/inp2k.c , * src/spicelib/parser/inp2l.c , * src/spicelib/parser/inp2m.c , * src/spicelib/parser/inp2n.c , * src/spicelib/parser/inp2o.c , * src/spicelib/parser/inp2p.c , * src/spicelib/parser/inp2q.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inp2s.c , * src/spicelib/parser/inp2t.c , * src/spicelib/parser/inp2u.c , * src/spicelib/parser/inp2v.c , * src/spicelib/parser/inp2w.c , * src/spicelib/parser/inp2y.c , * src/spicelib/parser/inp2z.c , * src/spicelib/parser/inpaname.c , * src/spicelib/parser/inpdomod.c , * src/spicelib/parser/inpdpar.c , * src/spicelib/parser/inpgmod.c , * src/spicelib/parser/inpgval.c , * src/spicelib/parser/inppas3.c , * src/spicelib/parser/inppas3.h , * src/spicelib/parser/inppname.c , * src/spicelib/parser/inpptree.c , * src/spicelib/parser/inpsymt.c , * src/xspice/ipc/ipctiein.c : the third of a series of four patches, which will change the code to use the CKTcircuit type instead of the current mixed void*/char* 2010-07-07 Robert Larice * src/include/cktdefs.h , * src/include/ifsim.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktaskaq.c : the second of a series of four patches, which will change the code to use the CKTcircuit type instead of the current mixed void*/char* 2010-07-07 Robert Larice * src/tclspice.c , * src/frontend/com_option.c , * src/frontend/inp.c , * src/frontend/resource.c , * src/frontend/shyu.c , * src/frontend/spiceif.c , * src/include/cktdefs.h , * src/include/ftedefs.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/spicelib/analysis/ckt.h , * src/spicelib/analysis/cktsetap.c , * src/spicelib/devices/cktinit.c , * src/spicelib/parser/inp.h , * src/spicelib/parser/inp2dot.c , * src/spicelib/parser/inpapnam.c , * src/spicelib/parser/inpdoopt.c , * src/spicelib/parser/inpgtitl.c , * src/spicelib/parser/inppas1.c , * src/spicelib/parser/inppas1.h , * src/spicelib/parser/inppas2.c , * src/spicelib/parser/inppas2.h : the first of a series of four patches, which will change the code to use the CKTcircuit type instead of the current mixed void*/char* 2010-07-06 Robert Larice * src/include/fteext.h : ansi function declarations (prototypes) for some functions 2010-07-06 Robert Larice * src/main.c , * src/frontend/nutmegif.c , * src/frontend/nutmegif.h , * src/frontend/shyu.c , * src/frontend/shyu.h , * src/frontend/spiceif.c , * src/frontend/spiceif.h , * src/include/fteext.h : fix the type signature of the if_*() family of functions. some incompatible pointer passing warnings will pop up, and will be fixed later. 2010-07-06 Robert Larice * src/include/typedefs.h : new include file for struct forward declarations and for typedefs * src/include/cktdefs.h , * src/include/gendefs.h , * src/include/graph.h , * src/include/ifsim.h , * src/include/mifcmdat.h , * src/include/ngspice.h , * src/include/tfdefs.h : make use of the new include file. 2010-07-06 Holger Vogt * defines.h: void fcn prototype instead of sighandler_t for MINGW, CYGWIN and MSC * src/spectrum: update of script with explanations * b4soild.c: debug warnings removed 2010-07-05 Robert Larice * src/xspice/cmpp/writ_ifs.c : add initialization of the struct IFdevice.flags element to the generated code. We initialize to 0, which is what the C compiler used as default so far. 2010-07-05 Robert Larice * src/xspice/icm/analog/d_dt/cfunc.mod , * src/xspice/icm/analog/hyst/cfunc.mod , * src/xspice/icm/analog/int/cfunc.mod , * src/xspice/icm/analog/oneshot/cfunc.mod , * src/xspice/icm/analog/s_xfer/cfunc.mod , * src/xspice/icm/analog/sine/cfunc.mod , * src/xspice/icm/analog/slew/cfunc.mod , * src/xspice/icm/analog/square/cfunc.mod , * src/xspice/icm/analog/triangle/cfunc.mod , * src/xspice/icm/digital/adc_bridge/cfunc.mod , * src/xspice/icm/digital/d_osc/cfunc.mod , * src/xspice/icm/digital/dac_bridge/cfunc.mod , * src/xspice/icm/xtradev/capacitor/cfunc.mod , * src/xspice/icm/xtradev/core/cfunc.mod , * src/xspice/icm/xtradev/inductor/cfunc.mod , * src/xspice/icm/xtradev/lcouple/cfunc.mod , * src/xspice/icm/xtraevt/real_delay/cfunc.mod , * src/xspice/icm/xtraevt/real_to_v/cfunc.mod : cast the return values of the void* returning functions cm_event_get_ptr() and cm_analog_get_ptr() 2010-07-04 Robert Larice * src/frontend/evaluate.c : use void* instead of char* for anonymous data * src/frontend/outitf.c : use a rescasted parameter * src/frontend/outitf.h : make use of the existing enum GRIDTYPE * src/frontend/variable.c : add missing casts * src/spicelib/analysis/ckti2nod.c : drop an useless cast * src/include/hlpdefs.h : use the struct name instead of the typedef name 2010-07-04 Robert Larice * src/maths/sparse/spdefs.h : fix the type of an ancient anonymous pointer from char* to void* 2010-07-04 Robert Larice * src/include/defines.h : for non MSC: use sighandler_t from FIXME, should work for MSC as well, please check * src/include/fteext.h : ansi function declarations (prototypes) for some signal functions 2010-07-03 Robert Larice * src/frontend/evaluate.c , * src/include/fteparse.h : ansi style function args for some function pointers 2010-07-03 Robert Larice * src/ciderlib/support/database.c , * src/ciderlib/support/logfile.c , * src/ciderlib/support/suprem.c , * src/ciderlib/support/suprmitf.c , * src/ciderlib/twod/twosetup.c , * src/spicelib/devices/nbjt/nbjtacld.c , * src/spicelib/devices/nbjt/nbjtask.c , * src/spicelib/devices/nbjt/nbjtdel.c , * src/spicelib/devices/nbjt/nbjtdest.c , * src/spicelib/devices/nbjt/nbjtdump.c , * src/spicelib/devices/nbjt/nbjtload.c , * src/spicelib/devices/nbjt/nbjtmdel.c , * src/spicelib/devices/nbjt/nbjtmpar.c , * src/spicelib/devices/nbjt/nbjtparm.c , * src/spicelib/devices/nbjt/nbjtpzld.c , * src/spicelib/devices/nbjt/nbjtset.c , * src/spicelib/devices/nbjt/nbjttemp.c , * src/spicelib/devices/nbjt/nbjttrun.c , * src/spicelib/devices/nbjt2/nbt2acld.c , * src/spicelib/devices/nbjt2/nbt2ask.c , * src/spicelib/devices/nbjt2/nbt2del.c , * src/spicelib/devices/nbjt2/nbt2dest.c , * src/spicelib/devices/nbjt2/nbt2dump.c , * src/spicelib/devices/nbjt2/nbt2load.c , * src/spicelib/devices/nbjt2/nbt2mdel.c , * src/spicelib/devices/nbjt2/nbt2mpar.c , * src/spicelib/devices/nbjt2/nbt2parm.c , * src/spicelib/devices/nbjt2/nbt2pzld.c , * src/spicelib/devices/nbjt2/nbt2set.c , * src/spicelib/devices/nbjt2/nbt2temp.c , * src/spicelib/devices/nbjt2/nbt2trun.c , * src/spicelib/devices/numd/numdacld.c , * src/spicelib/devices/numd/numdask.c , * src/spicelib/devices/numd/numddel.c , * src/spicelib/devices/numd/numddest.c , * src/spicelib/devices/numd/numddump.c , * src/spicelib/devices/numd/numdload.c , * src/spicelib/devices/numd/numdmdel.c , * src/spicelib/devices/numd/numdmpar.c , * src/spicelib/devices/numd/numdparm.c , * src/spicelib/devices/numd/numdpzld.c , * src/spicelib/devices/numd/numdtemp.c , * src/spicelib/devices/numd/numdtrun.c , * src/spicelib/devices/numd2/nud2acld.c , * src/spicelib/devices/numd2/nud2ask.c , * src/spicelib/devices/numd2/nud2del.c , * src/spicelib/devices/numd2/nud2dest.c , * src/spicelib/devices/numd2/nud2dump.c , * src/spicelib/devices/numd2/nud2load.c , * src/spicelib/devices/numd2/nud2mdel.c , * src/spicelib/devices/numd2/nud2mpar.c , * src/spicelib/devices/numd2/nud2parm.c , * src/spicelib/devices/numd2/nud2pzld.c , * src/spicelib/devices/numd2/nud2set.c , * src/spicelib/devices/numd2/nud2temp.c , * src/spicelib/devices/numd2/nud2trun.c , * src/spicelib/devices/numos/nummacld.c , * src/spicelib/devices/numos/nummask.c , * src/spicelib/devices/numos/nummdel.c , * src/spicelib/devices/numos/nummdest.c , * src/spicelib/devices/numos/nummdump.c , * src/spicelib/devices/numos/nummload.c , * src/spicelib/devices/numos/nummmdel.c , * src/spicelib/devices/numos/nummmpar.c , * src/spicelib/devices/numos/nummparm.c , * src/spicelib/devices/numos/nummpzld.c , * src/spicelib/devices/numos/nummset.c , * src/spicelib/devices/numos/nummtemp.c , * src/spicelib/devices/numos/nummtrun.c : convert K&R function definitions to ansi style 2010-07-03 Robert Larice * src/frontend/subckt.c : drop unsued variable. * src/include/ngspice.h : add a missing extern * src/xspice/cmpp/ifs_lex.l : atof() and atoi() live in * src/frontend/parser/glob.c : cast the return values of malloc() function calls 2010-07-03 Robert Larice * src/include/cktdefs.h , * src/include/gendefs.h , * src/include/graph.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/include/tfdefs.h : whitespace change, cleanup, untabify 2010-07-03 Robert Larice * src/include/cktdefs.h , * src/include/gendefs.h , * src/include/graph.h , * src/include/ifsim.h , * src/include/inpdefs.h , * src/include/tfdefs.h : forward declaration of structs, unions and typedefs 2010-07-02 Robert Larice * src/spicelib/analysis/cktsens.c , * src/xspice/mif/mifload.c : ansi style function args for some function pointers 2010-07-02 Holger Vogt * src/frontend/inpcom.c : .TITLE line added * /bsim3soi/b4soild.c, b4soiset., b4soidef.h, DEVICES: OpenMP support for SOI model B4SOI, version 4.3.1. 2010-07-01 Holger Vogt * src/frontend/inpcom.c : no removal of white spaces in echo lines inside a control section 2010-07-01 Robert Larice * src/frontend/com_sysinfo.c , * src/frontend/display.c , * src/frontend/help/readhelp.c , * src/frontend/help/x11disp.c , * src/frontend/hpgl.c , * src/frontend/inpcom.c , * src/frontend/measure.c , * src/frontend/numparam/xpressn.c , * src/frontend/parser/complete.c , * src/frontend/plotting/agraf.c , * src/frontend/plotting/graf.c , * src/frontend/plotting/x11.c , * src/frontend/postsc.c , * src/frontend/quote.c , * src/frontend/subckt.c , * src/maths/ni/niinteg.c , * src/maths/ni/niiter.c , * src/misc/dstring.c , * src/misc/string.c , * src/misc/util.c , * src/misc/wlist.c , * src/spicelib/analysis/ckttroub.c , * src/spicelib/analysis/distoan.c , * src/spicelib/analysis/noisean.c , * src/spicelib/devices/bjt/bjtask.c , * src/spicelib/devices/bjt2/bjt2ask.c , * src/spicelib/devices/cap/capask.c , * src/spicelib/devices/cccs/cccsask.c , * src/spicelib/devices/ccvs/ccvsask.c , * src/spicelib/devices/cpl/cplsetup.c , * src/spicelib/devices/csw/cswask.c , * src/spicelib/devices/dio/dioask.c , * src/spicelib/devices/dio/diotemp.c , * src/spicelib/devices/hfet1/hfetask.c , * src/spicelib/devices/hfet2/hfet2ask.c , * src/spicelib/devices/ind/indask.c , * src/spicelib/devices/isrc/isrcask.c , * src/spicelib/devices/jfet/jfetask.c , * src/spicelib/devices/jfet2/jfet2ask.c , * src/spicelib/devices/mes/mesask.c , * src/spicelib/devices/mesa/mesaask.c , * src/spicelib/devices/mos1/mos1ask.c , * src/spicelib/devices/mos2/mos2ask.c , * src/spicelib/devices/mos3/mos3ask.c , * src/spicelib/devices/mos6/mos6ask.c , * src/spicelib/devices/mos9/mos9ask.c , * src/spicelib/devices/res/resask.c , * src/spicelib/devices/sw/swask.c , * src/spicelib/devices/vccs/vccsask.c , * src/spicelib/devices/vcvs/vcvsask.c , * src/spicelib/devices/vsrc/vsrcask.c , * src/spicelib/parser/inp2r.c , * src/spicelib/parser/inpdpar.c , * src/spicelib/parser/inpmktmp.c , * src/spicelib/parser/inpptree.c : cast the return values of malloc() function calls 2010-07-01 Robert Larice * src/frontend/inpcom.c, * src/spicelib/devices/cktinit.c : fix some typecasts to *malloc() return values 2010-07-01 Robert Larice * src/frontend/inpcom.c : explicit compare with NULL 2010-06-30 Robert Larice * src/frontend/com_ahelp.c : drop NULL casting * src/frontend/com_measure2.c : dont mix enum with integer * src/include/inpptree.h : add parameter-names to a prototype * src/spicelib/parser/ptfuncs.c : add casts to anonymous data 2010-06-30 Holger Vogt * inpcom.c: no braces in let, set commands inside control loop * glob.c: reinstate {$var} expansion (patch by R. Larice) 2010-06-30 Robert Larice * src/include/ftedev.h : ansi prototypes for the function pointers in struct DISPDEVICE typedef for those functions * src/frontend/hpgl.h , * src/frontend/plotting/plot5.h , * src/frontend/plotting/x11.c , * src/frontend/plotting/x11.h , * src/frontend/postsc.h , * src/frontend/wdisp/windisp.h , * src/frontend/wdisp/winprint.h , * src/include/tclspice.h : ansi prototypes, make use of the new typedefs * src/frontend/display.c : cast nodev and nop to the proper function type * src/frontend/wdisp/windisp.c , * src/frontend/wdisp/winprint.c : fix the type signature for the more or less unused _DefineColor() functions fix the type signature for the WIN_Text() function, drop unused CentiDegrees argument, which doesn't fit to struct DISPDEVICE 2010-06-29 Holger Vogt * inpcom.c lines 743, 744 correct malloc for 64 bit LINUX * inpcom.c, inpcom.h, nutinp.c, inp.c, fteext.h: Command files spinit and .spiceinit (comfile==TRUE) will not be treated by numparam processing. Comment_out_unused_subckt() will no longer process lines inside control section. 2010-06-28 Holger Vogt * bsim3/b3set.c b3ld.c bsim3def.h: new preproc flag USE_OMP3 * bsim4/b4set.c b4ld.c bsim4def.h: OpenMP support for BSIM4 model 2010-06-27 Robert Larice * src/xspice/enh/enhtrans.c: drop useless cast of a copy() return value 2010-06-27 Holger Vogt * numparam.h: short replaced by int 2010-06-27 Robert Larice * src/ciderlib/support/database.c, * src/frontend/com_let.c, * src/frontend/define.c, * src/frontend/gens.c, * src/frontend/plotting/graphdb.c, * src/frontend/plotting/plotcurv.c, * src/frontend/plotting/plotit.c, * src/frontend/postcoms.c, * src/frontend/vectors.c, * src/maths/poly/interpolate.c, * src/spicelib/analysis/dctran.c, * src/spicelib/analysis/dctrcurv.c, * src/spicelib/devices/nbjt/nbjtset.c, * src/spicelib/devices/nbjt/nbjttemp.c, * src/spicelib/devices/nbjt2/nbt2set.c, * src/spicelib/devices/nbjt2/nbt2temp.c, * src/spicelib/devices/numd/numdset.c, * src/spicelib/devices/numd/numdtemp.c, * src/spicelib/devices/numd2/nud2set.c, * src/spicelib/devices/numd2/nud2temp.c, * src/spicelib/devices/numos/nummset.c, * src/spicelib/devices/numos/nummtemp.c : drop the casts for pointer arguments of bcopy() and bzero() their arguments are declared to be void pointers. FIXME, src/frontend/vectors.c vec_mkfamily() ugly and propably simply incorrect pointer bistromatic, allocating v_realdata, but copying to v_compdata I left that one untouched, to be fixed later. 2010-06-27 Robert Larice * src/frontend/arg.c, * src/frontend/arg.h, * src/include/fteext.h : function arg_display() change the arguments from none, to two unused args. as to fit with struct comm.co_argfn function pointer add unused attribute later. 2010-06-27 Robert Larice * src/include/ipcproto.h, * src/xspice/cmpp/ifs_yacc.y, * src/xspice/cmpp/mod_yacc.y, * src/xspice/cmpp/pp_mod.c, * src/xspice/cmpp/read_ifs.c : ansi function declarations (prototypes) 2010-06-27 Robert Larice * src/main.c, * src/spicelib/devices/dev.c, * src/xspice/cm/cmmeters.c, * src/xspice/cmpp/ifs_lex.l, * src/xspice/cmpp/ifs_yacc.y, * src/xspice/cmpp/mod_yacc.y, * src/xspice/cmpp/pp_mod.c, * src/xspice/cmpp/read_ifs.c, * src/xspice/icm/digital/d_source/cfunc.mod, * src/xspice/icm/digital/d_state/cfunc.mod, * src/xspice/icm/dlmain.c, * src/xspice/ipc/ipc.c, * src/xspice/ipc/ipcsockets.c, * src/xspice/ipc/ipctiein.c, * src/xspice/mif/mif_inp2.c, * src/xspice/mif/mifgetvalue.c : convert K&R function definitions to ansi style 2010-06-26 Robert Larice * src/include/opdefs.h, * src/include/trandefs.h : ansi function declarations (prototypes) * src/ngproc2mod.c: exit() lives in 2010-06-26 Robert Larice * src/frontend/commands.c: NULL needs no cast 2010-06-26 Robert Larice * src/include/inpptree.h, * src/spicelib/parser/ifeval.c, * src/spicelib/parser/inpptree.c : avoid function pointer warnings 2010-06-25 Robert Larice * src/frontend/com_hardcopy.c, * src/maths/sparse/spbuild.c, * src/maths/sparse/spfactor.c, * src/maths/sparse/spoutput.c, * src/maths/sparse/spsolve.c, * src/maths/sparse/sputils.c, * src/spicelib/analysis/dcop.c, * src/spicelib/parser/inppas1.c, * src/xspice/ipc/ipcsockets.c : remove redundant nested function declarations 2010-06-25 Robert Larice * src/frontend/hpgl.h, * src/frontend/parser/glob.c, * src/include/cpdefs.h, * src/include/cpstd.h, * src/include/fteext.h ; remove abandoned / nowhere-to-be-found non-ansi prototypes 2010-06-24 Robert Larice * src/main.c : make use of allready defined enumerate Ipc_Status_t (IPC_STATUS_OK) * src/xspice/icm/digital/d_and/cfunc.mod, * src/xspice/icm/digital/d_buffer/cfunc.mod, * src/xspice/icm/digital/d_fdiv/cfunc.mod, * src/xspice/icm/digital/d_inverter/cfunc.mod, * src/xspice/icm/digital/d_nand/cfunc.mod,, * src/xspice/icm/digital/d_nor/cfunc.mod, * src/xspice/icm/digital/d_open_c/cfunc.mod, * src/xspice/icm/digital/d_open_e/cfunc.mod, * src/xspice/icm/digital/d_or/cfunc.mod,, * src/xspice/icm/digital/d_xnor/cfunc.mod, * src/xspice/icm/digital/d_xor/cfunc.mod : make use of allready defined enumerate Digital_State_t (ONE,ZERO) 2010-06-23 Holger Vogt * configure.in, INSTALL, DEVICES, bsim3/b3ld.c, bsim3/b3set.c, bsim3/bsim3def.f, spinit.in: Multi-core support with OpenMP for BSIM3 vers. 3.3.0 2010-06-23 Robert Larice * src/ngmultidec.c, * src/frontend/inpcom.c, * src/frontend/help/help.c, * src/frontend/numparam/numpaif.h, * src/frontend/numparam/xpressn.c, * src/include/cpextern.h, * src/include/cpstd.h, * src/include/dgen.h, * src/include/ftedbgra.h, * src/include/fteext.h, * src/include/hlpdefs.h, * src/include/inpptree.h, * src/include/sensgen.h, * src/include/tfdefs.h, * src/maths/cmaths/cmath2.c, * src/maths/ni/niniter.c, * src/spicelib/devices/cpl/cplload.c, * src/spicelib/devices/cpl/cplsetup.c : ansi function declarations (prototypes) 2010-06-23 Robert Larice * src/main.c, * src/frontend/com_measure2.c, * src/frontend/hpgl.c, * src/frontend/inpcom.c, * src/frontend/numparam/spicenum.c, * src/maths/misc/randnumb.c : ansi function definitions, type foo() {} --> type foo(void) {} 2010-06-23 Robert Larice * src/frontend/breakp.c, * src/frontend/com_let.c, * src/frontend/com_measure2.c, * src/frontend/com_sysinfo.c, * src/frontend/cpitf.c, * src/frontend/dotcards.c, * src/frontend/measure.c, * src/frontend/mw_coms.c, * src/frontend/mw_coms.h, * src/frontend/runcoms.c, * src/frontend/runcoms2.c, * src/frontend/where.c, * src/frontend/where.h, * src/include/cpextern.h, * src/include/fteext.h : ansi function definitions and declarations for the com_*() functions. remove some casts to NULL. several com_*() functions don't use their argument, add unused attribute later. 2010-06-22 Holger Vogt * b4soild.c: line 7598 double assignment of Cbg1 removed * configure.in, /visualc/include/config.h: version 21plus ============================ Rework-21 ================================== 2010-06-20 Holger Vogt * COPYING: further update to version 21 2010-06-20 Robert Larice * Makefile.am, configure.in, manual/Makefile.am: undo the manual inclusion, see "2010-06-13 Robert Larice" the manual is now a package of its own, cvs checkout ngspice/ng-spice-manual cd ng-spice-manual ; ./configure make dist # for the tar ball, that is manual source plus pdf manual make install # to install the pdf 2010-06-20 Holger Vogt * AUTHORS, INSTALL, COPYING, README: update to version 21 2010-06-19 Holger Vogt * inpdomod.c: refernces to not existing MOS levels 60, 61 deleted. 2010-06-19 Holger Vogt * subckt.c: line indentations com_measure2.c: remove bug, see support tracker no. 3013968 inpcom.c: no braces around out_variable3 in .MEASURE {DC|AC|TRAN} result FIND out_variable WHEN out_variable2=out_variable3 2010-06-19 Robert Larice * ng-spice-rework/src/xspice/Makefile.am: exclude some junk from `make dist' `make dist' and `make ; make dist' should yield the same tar-ball know * ng-spice-rework/src/xspice/cmpp/Makefile.am: fix missing dependencies to compute ifs_yacc.h and mod_yacc.h to avoid ylwrap, and because bison is neccessairy somewhere else anyway, switched from $(YACC) to $(BISON) 2010-06-17 Holger Vogt * inpcom.c: in inp_fix_gnd_name() remove excessive white spaces around 0 after replacing "gnd" by " 0 " 2010-06-16 Holger Vogt * src/Makefile.am: for WINDOWS all of help files and related files excluded 2010-06-14 Robert Larice * Makefile.am: exclude libtool from `make dist', revert its recent inclusion * src/xspice/Makefile.am: exclude the compiled codemodels from `make dist' * src/xspice/cmpp/Makefile.am: eliminate an automake warning 2010-06-13 Robert Larice * Makefile.am, src/Makefile.am: add `libtool' to `make dist' add `src/spice.def' to `make dist' remove `src/ngspice.idx' from `make dist' it will be created new from `src/ngspice.txt' anyway 2010-06-13 Robert Larice * src/ciderlib/support/Makefile.am: add `readme' to `make dist' * src/spicelib/devices/bsim3/Makefile.am, * src/spicelib/devices/bsim3soi/Makefile.am, * src/spicelib/devices/bsim3soi_dd/Makefile.am, * src/spicelib/devices/bsim3soi_fd/Makefile.am, * src/spicelib/devices/bsim3soi_pd/Makefile.am, * src/spicelib/devices/bsim3v32/Makefile.am, * src/spicelib/devices/bsim4/Makefile.am, * src/spicelib/devices/bsim4v2/Makefile.am, * src/spicelib/devices/bsim4v3/Makefile.am, * src/spicelib/devices/bsim4v4/Makefile.am, * src/spicelib/devices/bsim4v5/Makefile.am: add some license files to `make dist' * tests/general/Makefile.am: add two tests, diffpair.cir and fourbitadder.cir, to `make dist' 2010-06-13 Robert Larice * Makefile.am, configure.in, manual/Makefile.am: make dist, shall compile manual.pdf from the lyx manual and include it in the 'dist' tar ball It is required to have checked out the CVS ng-spice-manuals module side by side with the CVS ng-spice-rework module 2010-06-13 Holger Vogt * NEWS updated 2010-06-12 Robert Larice * man/man1/ngnutmeg.1, man/man1/ngspice.1: smaller cleanup * man/man1/Makefile.am:: reintroduce those two man pages 2010-06-12 Holger Vogt * /visualc/include/config.h: update to version 21 * configure.in: version 21 * FAQ: update 2010-06-11 Holger Vogt * DEVICES: update 4.6.5 /man/man1/ngnutmeg.1 ngspice.1: updated with link to actual ngspice documentation 2010-06-11 Holger Vogt * ngspice.txt: notice to users: help file outdated 2010-06-04 Holger Vogt * inpcom.c: bug report 3008000, overflow of fixed array of used_subckt_names, used_model_names in fcn comment_out_unused_subckt_models removed by dynamic memory allocation 2010-06-03 Holger Vogt * src\spicelib\devices\bsim3soi b4soi.c b4soiacld.c b4soiask.c b4soicheck.c b4soicvtest.c b4soidef.h b4soidel.c b4soidest.c b4soiext.h b4soigetic.c b4soiinit.c b4soiinit.h b4soiitf.h b4soild.c b4soimask.c b4soimdel.c b4soimpar.c b4soinoi.c b4soipar.c b4soipzld.c b4soiset.c b4soitemp.c b4soitrunc.c: update to BSIM4SOI vers. 4.3.1 * misc/tilde.c: return path NULL added 2010-05-30 Holger Vogt * xgraph/dialog.c: fcn getline renamed to getline_xgraph * Makefile.am, frontend/Makefile.am include/Makefile.am spicelib/parser/Makefile.am, tests/bsim3soi/Makefile.am configure.in: updates to allow 'make dist' * com_hardcopy.c: allow filename without '.' * device.c, b4soiask.c, b4soiset.c, b4ask.c, b4v2ask.c, b4v3ask.c, b4v4ask.c, b4v5ask.c: add error handling and add questions for 'show all' 2010-05-27 Holger Vogt * inpcom.c: update B source pwl function handling 2010-05-26 Holger Vogt * xspice api update: cmcm_analog_alloc() and cm_event_alloc() ng-spice-rework/src/include/cmproto.h ng-spice-rework/src/include/dllitf.h ng-spice-rework/src/xspice/cm/cm.c ng-spice-rework/src/xspice/cm/cmevt.c ng-spice-rework/src/xspice/examples/nco/cfunc.mod .../src/xspice/examples/real_delay/cfunc.mod .../src/xspice/examples/real_to_v/cfunc.mod .../src/xspice/icm/analog/d_dt/cfunc.mod .../src/xspice/icm/analog/hyst/cfunc.mod .../src/xspice/icm/analog/int/cfunc.mod .../src/xspice/icm/analog/oneshot/cfunc.mod .../src/xspice/icm/analog/s_xfer/cfunc.mod .../src/xspice/icm/analog/sine/cfunc.mod .../src/xspice/icm/analog/slew/cfunc.mod .../src/xspice/icm/analog/square/cfunc.mod .../src/xspice/icm/analog/triangle/cfunc.mod .../src/xspice/icm/digital/adc_bridge/cfunc.mod .../src/xspice/icm/digital/d_and/cfunc.mod .../src/xspice/icm/digital/d_buffer/cfunc.mod .../src/xspice/icm/digital/d_dff/cfunc.mod .../src/xspice/icm/digital/d_dlatch/cfunc.mod .../src/xspice/icm/digital/d_fdiv/cfunc.mod .../src/xspice/icm/digital/d_inverter/cfunc.mod .../src/xspice/icm/digital/d_jkff/cfunc.mod .../src/xspice/icm/digital/d_nand/cfunc.mod .../src/xspice/icm/digital/d_nor/cfunc.mod .../src/xspice/icm/digital/d_open_c/cfunc.mod .../src/xspice/icm/digital/d_open_e/cfunc.mod .../src/xspice/icm/digital/d_or/cfunc.mod .../src/xspice/icm/digital/d_osc/cfunc.mod .../src/xspice/icm/digital/d_ram/cfunc.mod .../src/xspice/icm/digital/d_source/cfunc.mod .../src/xspice/icm/digital/d_srff/cfunc.mod .../src/xspice/icm/digital/d_srlatch/cfunc.mod .../src/xspice/icm/digital/d_state/cfunc.mod .../src/xspice/icm/digital/d_tff/cfunc.mod .../src/xspice/icm/digital/d_xnor/cfunc.mod .../src/xspice/icm/digital/d_xor/cfunc.mod .../src/xspice/icm/digital/dac_bridge/cfunc.mod ng-spice-rework/src/xspice/icm/dlmain.c .../src/xspice/icm/xtradev/capacitor/cfunc.mod .../src/xspice/icm/xtradev/core/cfunc.mod .../src/xspice/icm/xtradev/inductor/cfunc.mod .../src/xspice/icm/xtradev/lcouple/cfunc.mod .../src/xspice/icm/xtraevt/real_delay/cfunc.mod .../src/xspice/icm/xtraevt/real_to_v/cfunc.mod 2010-05-22 Holger Vogt * inpfindl.c: bugfix 3004317 allow level value number given by scientific notation 2010-05-21 Holger Vogt * inpcom.c: bugfix 2936702 correct handling of ternary fcn in numparam 2010-05-15 Holger Vogt * inpcom.c: exclude comment lines from stripping EOL comments, make ngspice abort if .inc fails. subckt.c: exclude *, and . lines from processing to getting rid of ( ) around node lists 2010-05-14 Holger Vogt * dllitf.h, cplsetup.c, cmexport.c, int/udnfunc.c, real/udnfunc.c, xspice.c: tmalloc patch by R Larice vngspice.sln, vngspice.proj: 64 bit support inpcom.c: exclude .control ... .endc lines from fcn inp_bsource_compat 2010-05-11 Holger Vogt * inpcom.c: new fcn inp_fix_gnd_name: 'gnd' replaced by ' 0 ', if delimiters are '(' or ' ' or ',' on the left and ')' or ' ' or ',' on the right. fcn inp_bsource_compat: 'm={m}' replaced by ' ' 2010-05-10 Holger Vogt * subckt.c:1349: fcn finishLine: add e. and h. to net name inside i(...). 2010-05-09 Holger Vogt * inpcom.c: patch 09/05/10 by Robert * spinit.in: add ngbehavior * inpptree.c: derivatives for fcns min and max 2010-05-08 Holger Vogt * inpcom.c: patch 02/05/10 by Robert: avoid subtraction from a builtin 1.0 * inpcom.c: update to E, G sources with expressions * inpcom.c, line 3707: put expression for dependent resistor in brackets 2010-04-26 Dietmar Warning * parser/inpgval.c: correct parsing of integer model parameter given as double (e.g. capmod=3.000e+00) 2010-04-23 Holger Vogt * xpressn.c: agauss is no. 20 main.c, inp.c, inpcom.c, compatmode.h, inpptree.h, ifeval.c, inpptree.c, ptfuncs.c: ngspice compatibility mode with various functions 2010-04-11 Dietmar Warning * Robert Larice patch to allow new operations in control blocks: * examples/new-check-3.sp, new-check-4.sp * src/include/fteparse.h, ngspice.h * src/frontend/parse*.*, evaluate.c, Makefile.am, src/misc/string.c, stringutil.h 2010-03-25 Dietmar Warning * Bill Swartz patch: * numparam/*.c, *.h, *.txt, misc/hash.c, string.c: local and global hash lists for subckts * misc/dstring.c, include/dstring.h, Makefile.am: dynamic string feature * analysis/cktop.c: remove the CR in some printf's 2010-03-20 Holger Vogt * variable.c:450 prevent ngspice from crashing after command 'unset zzz', when zzz is not defined 2010-03-20 Holger Vogt * com_compose.c: comment corrected * subckt.c, cktdefs.h, acan.c, ifeval.c, inp2b.c, inpptree.c, cktinit.c: Variable HERTZ added to B source 2010-03-16 Holger Vogt * xpressn.c: remove lines 291,292 2010-03-09 Dietmar Warning * analysis/cktop.c: remove the CR in some printf's, need some tests with different terminals * frontend/inp.c: cut the ouput message if wrong parameter warning to have a chance to read it * parser/inpgmod.c: want only the parameter names in output - not the values * devices/vbic/vbic.c: correct a typo of eais/eaic model parameter leading in wrong temperature model 2010-03-08 Holger Vogt * parse.c, inpptree.c, inpptree-parser.y, inpptree-parser.c, inpptree-parser.h: patches by R. Larice 2010-03-07 Holger Vogt * inpcom.c: test for .end improved (comments are now allowed in .end line) * xpressn.c: adding fcn sgn() to numparam function lib * inpptree.h,asrcacld.c,asrcload.c,asrcpzld.c,asrcset.c,ifeval.c,inpptree-parser.c, inpptree-parser.h,inpptree-parser.y,inpptree.c: patch R. Larice, add time and temper variables to B source 2010-03-07 Dietmar Warning * analysis/ninteg.c: limiting exp() in noise integration to prevent overflow and NAN (ID: 2950943). 2010-02-28 Dietmar Warning * com_gnuplot.c, gnuplot.c: cosmetics - missing LF on end * fteext.h: complete prototypes for typesdef.c * com_fft.c, com_fft.h: improve amplitude accuracy by considering zero padded vectors correct the gaussian window, add the flattop window, precise the FFT information, clean-up * cplsetup.c, cplload.c: omit complains from icc 2010-02-28 Holger Vogt * inpcom.c, xpressn.c, inpptree.h, spicelib/parser/makefile.am, inpptree.c, ptfuncs.c, inpptree-parser.y: replace parser for B source with BISON generated one. Patch 2 from R. Larice 2010-02-27 Holger Vogt * command.c, gnuplot.c, gnuplot.h, com_gnuplot.c, com_gnuplot.h, plotit.c: new command 'wrdata file vecs' for simple tabular printout of data 2010-02-26 Holger Vogt * vsrc.c, vsrcacct.c, vsrcask.c, vsrcdefs.h, vsrcload.c, vsrcpar.c: PWL source now has a repeat parameter (r=value) and a delay parameter (td=value) 2010-02-25 Holger Vogt * inpcom.c, general.h, mystring.c, numparam.h, spicenum.c, xpressn.c, include/makefile.am, misc/makefile.am, hash.c, hash.h: major bug-fix on numparam by Bill Swartz * subckt.c: bugfix on bxx_printf() * inp.c memory leak, line 707 wl_free(wl); added * ifeval.c, inpptree.c, inpptree.h: first try of ternary fcn in B source by Robert Larice * vngspice.sln, vngspice.vcproj: new files hash.c, .h added to project 2010-02-22 Dietmar Warning * xpressn.c, spicenum.c: more characters for real number insertion (up to 15) by introducing a long long placeholder 2010-02-21 Dietmar Warning * /devices/bsim3soi/*.*: bsimsoi update to Berkeley Version 4.3 2010-02-15 Holger Vogt * getopt_bsd.h, resask.c, optionssc.c: LF line endings * evttermi.c: #include removed (is in ngspice.h) * wdisp/makedefs, visualc/include/strings.h: removed 2010-02-13 Holger Vogt * icm/dllmain.c, evtload.c, ngspice.h, terminal.c, evaluate.c, twomesh.c, tclspice.c, conf.h, conf.c: patches by R. Larice 100213 * K&R -> ANSI patches by R. Larice 100103 2010-02-11 Holger Vogt * terminal.h, cpextern.h: use format (__printf__, 1, 2) * pzan.c, nipzmeth.c, cktpzstr.c, macros.h: remove conflicting macro definition (MS Visual Studio) ERROR -> MERROR 2010-02-08 Holger Vogt * com_sysinfo.c: 64 bit support enabled * terminal.c, terminal.h, cpextern.h, ngsconvert.c, inpgmod.c, ipcsockets.c: patches by R. Larice from Feb. 8th, 2010 2010-02-07 Dietmar Warning * cpl/cplload.c, cplsetup.c, /txl/txlload.c, txlsetup.c, include/swec.h, multi_line.h, frontend/subckt.c, parser/inp2p.c, inppas2.c: no more float's, improve dc solution by introducing gmin deembedding, better model check, automatic maxStep adaption in tran analysis, correct handling of kspice models in subckt's, kspice models are working now more stable but accuracy in steady state of transient is not sufficient * examples/TransmissionLines/*.sp: ommit itl5-warning * tests/transmission/*.out: adapt reference files to new code behaviour, but this is still a mess 2010-02-07 Holger Vogt * inpcom.c: bug no. 2936702 * vngspice.sln, vngspice.vcproj: add 64 bit support * measure.c, numpaif.h, numparam-h, spicenum.c, xpressn.c, subckt.c: Put original input deck line number into numparam error message. 2010-01-30 Dietmar Warning * b3soiddld.c, b3soifdld.c, cplload.c, cplsetup.c, inpcom.c, measure.c, mystring.c, spicenum.c, txlsetup.c: using a controlled_exit to see error messages in some places and get better program termination * frontend/error.c, error.h: provide a simple controlled_exit function * misc/util.c, util.h: remove controlled_exit function 2010-01-29 Holger Vogt * commands.c: gnuplot need two args minimum * xpressn.c: more characters for real number insertion (up to 15) 2010-01-27 Dietmar Warning * cpl_ibm1.sp: fix the c matrix unsymmetry * swec.h: set maximum cpl lines to eight * inp2y.c, inp2p.c: parsing the length instance parameter in txl and cpl * subckt.c: devmodtranslation for txl and cpl in subckt's 2010-01-17 Dietmar Warning * examples/TransmissionLines: Hopefully more meaningful transmissionline examples * misc/util.c: provide a simple controlled_exit function * devices/cpl/cplsetup.c, cplload.c, devices/txl/txlsetup.c: using a controlled_exit to see error messages in some places 2010-01-17 Holger Vogt * subckt.c: .global bug by R. Larice various files: patches by Robert (Neval, Nintegrate) from Jan 3 2010 and 10 patches from Jan 16, 2010 * com_hardcopy.c: switching graphics context correctly for postscript output * winmain.c: parameter 4 to SystemParametersInfo() corrected 2010-01-16 Dietmar Warning * tests/transmission: Only few tests should be easier, more examples under examples/TransmissionLine at next * tests/bin/check.sh: extend codemodel word in list * devices/cpl/cplsetup.c: few polishments * parser/inp2p.c, inp2y.c, inpdomod.c: change atof to INPevaluate to allow 10p as 10e-12 * parser/inppas2.c: correct P element comment 2010-01-15 Holger Vogt * subckt.c: patch for translate() by R. Larice, .global bug removed (add null character after storing global to node[]) ngspice.h: _inline for _MSC_VER 2010-01-06 Holger Vogt * x11.c: hardcopy by button click, error removed 2010-01-02 Holger Vogt * winmain.c: internal system() no longer needed, its available in mingw and MS Visual Studio. gnuplot.c: small update, call to gnuplot tested up to ver. 4.2.6, does not work for Windows and gnuplot 4.4. * x11.c: add xfont parameter * windisp.c: add wfont and wfont_size parameter * winmain.c: use SystemParametersInfo() to get screen size to improve placement of GUI on the screen. 2010-01-01 Holger Vogt * spinit.in: Small update gnuplot.c: calling gnuplot via xterm 2009-12-31 Holger Vogt * measure.c, resource.c, mesaload.c: small patches by R. Larice graf.c, plotit.c: gnuplot updates, point chars updated 2009-12-30 Holger Vogt * gnuplot.c: some additions 2009-12-29 Holger Vogt * ngproc2mod.c: patch by R. Larice gnuplot.c filename arrays enlarged 2009-12-28 Holger Vogt * measure.c: comments, /examples/control_structs/repeat3.sp: new examples snippets included 2009-12-22 Holger Vogt * measure.c: bugfix (%f replaced by %e) 2009-12-21 Holger Vogt * com_measure2.com, measure.c: add vectors to the meas command. inpcom.c: no parsing of ternary function in .control section (not yet defined anyway). /examples/measure /examples/control_structs /examples/control_xspice: new or updated example files. 2009-12-20 Holger Vogt * fixing the time 0 value of sine in isrc, vsrc * fteext.h, com_measure2.c, measure.c, commands.c: New .meas functions min_at or max_at will return the x value (maximum at x) meas command is now available in the .control ... .endc section in ngspice (still not tested for all possible variations, but ...). 2009-12-19 Paolo Nenzi * src/spicelib/devices/isrc/isrcacct.c, src/spicelib/devices/vsrc/vsrcacct.c: fixed bug reported by Holger. "time" value in accept routine was incorrectly computed when xspice extensions were compiled in. 2009-12-19 Holger Vogt * main.c, inpcom.c: source file path added as additional search path for opening .include files (MS Windows only). measure.c: .meas only when -b and -r are not set fteext.h: cleanup of unused entries breakp2.c, dotcards.c, inp.c, main.c: comments added 2009-12-17 Dietmar Warning * devices/bsim3/b3set.c: add the ngspice specific copyNodesets approach and remove the tnom celsius -> kelvin transformation * devices/bsim3/b3mpar.c: make the tnom celsius -> kelvin transformation in first run * devices/bsim3v32/b3v32ld.c: reconstruct NEWCONV code, also if it is not used because macro is set in macros.h, but is now inline with UCB code * inpcom.c, spicenum.c, xpressn.c: prevent int to unsigned compare * tests/transmission/ibm2.cir: wrong cpl model instantiation 2009-12-12 Holger Vogt * runcoms: evaluate measure commands only when avaialble * /examples/transimpedanceamp/output.net: correct .plot statement * string.c: '^' added to is_arith_char(), to allow parsing of '^' in .func function definitions 2009-12-11 Holger Vogt * bug 2909730, patch for parsing expressions applied * measure.c: Proper warning that .measure is not available in batch mode with -b 2009-12-10 Dietmar Warning * spicelib/parser/inptree.c: omit some debug printf's 2009-12-07 Holger Vogt * windisp.c: allow setting of linewidth by keyboard "set xbrushwidth=3" * main.c: option -p "run in pipe mode" added (patch 1465202) 2009-12-05: Dietmar Warning * inpcom.c, line 3090: allow parameter without curly braces in subckt definition (e.g.: as1=as), there was a wrong memory access before 2009-11-29 Holger Vogt * com_hardcopy.c, postsc.c, windisp.c: plotting with black or white background, postscript to file with hardcopy command or menue entry from plot window (still buggy with X11) psmodel.c: changed the declarator to new format 2009-11-27 Dietmar Warning * a bunch of files, most in device library: changed the declarator to new format to allow safe prototype check (but stay in the original line order) 2009-11-24 Holger Vogt * com_sysinfo.c: bugfix no. 2902374 2009-11-21 Holger Vogt * spicelib/parser/inptree.c: memory allocation of struct pwldata->vals failed in MS Visual Studio 2008, changed. 2009-11-20 Holger Vogt * postsc.c: some cosmetics to postscript plot, hcopypstxcolor for setting text color 2009-11-19 Holger Vogt * com_hardcopy.c, postsc.c: hardcopy set to default postscript (under Windows), LINUX and others require set hcopydevtype=postscript in spinit. set hcopypscolor=0 in spinit will set background color (0==black, 1==white ...) 2009-11-17 Holger Vogt * runcoms.c: comments added 2009-11-17 Dietmar Warning * configure.in: add search for strings.h because AC_HEADER_STDC isn't sufficient * com_measure2.c, 116: remove empty statement * parser/inpfindl.c: rm the annoying bjt level warning * parser/inpptree.c, ptfuncs.c: changed ancient double vector declaration in pwldata * misc/misc_time.c: init structure rusage with 0 instead NULL 2009-11-16 Holger Vogt * com_sysinfo.c: line 355 changed, allow mingw console compilation runcoms2.c: cosmetics cpitf.c, how-to-ngspice-vstudio.txt, visualc/include/config.h, vngspice.sln, vngspice.vcproj: add console app to configuration manager of Visual Studio 2009-11-15 Holger Vogt * main.c, src/include/compatmode.h: compatibility mode flag for other simulators xpressn.c: compatmode removed ============================ Rework-20 ================================== 2009-11-09 Dietmar Warning * subckt.c: support of 5-terminal bjt's in subckt's by prepending subckt name (similar things should be made for 5-7 terminal mos transistors, like soi models) 2009-11-08 Dietmar Warning * numparam/xpressn.c: allow numbers < 1e-30 in fmttype, now everything < 1e-39 is 0 * numparam/mystring.c: using floor and ceil from math lib for rounding and truncation 2009-11-07 Holger Vogt * winmain.c: replace strdup() by copy() 2009-10-31 Holger Vogt * winmain.c: windows updated more often how-to-ngspice-vstudio.txt: updated 2009-10-24: Dietmar Warning * main.c: correct the command completion under X11, cooments and formatting 2009-10-18: Dietmar Warning * inpptree.c: correct __func__ usage for different compiler * string.c, stringutil.h: separate bcopy and bzero providing 2009-10-18 Holger Vogt * main.c, winmain.c: graceful shutdown for MS Windows, "quit" button added conf.c, vngspice.vcproj: build date actualization modified 2009-10-12 Holger Vogt * main.c: bug no. 2874418, initialize global variable history_file 2009-10-10 Robert Larice * ifeval.c, inpptree.c, inpptree.h, ptfuncs.c: PWL functionality for B sources 2009-10-04 Holger Vogt * configure.in, /visualc/include/config.h, vngspice.vcproj: version 20 * com_sysinfo.c: update for Cygwin 2009-10-04: Dietmar Warning * com_sysinfo.c, ftext.h: sys_memory struct w/o static type, sysinfo w/o void Parameter * inpcom.c, gnuplot.c, device.c, inp.c, resource.c, subckt.c, com_fft.c, com_gnuplot.c, com_xgraph.c: initialize local variables * b4soild.c, line 6394: Cbg1 wrong assignment 2009-10-04: Dietmar Warning * b4ld.c, b4temp.c: better formatting to find the typo in b4temp.c, line 1758: needs real compare (==) instead of assignment (=) b4check.c: correct version now 4.6.5 2009-10-01 Holger Vogt * /frontend com_sysinfo.c, commands.c, fteext.h, makefile.am: command sysinfo added * compatmode.c, compatmode.h: typo removed 2009-09-26 Holger Vogt * windisp.c, compatmode.c, compatmode.h: CVS header added (still not working with compatmode) 2009-09-22: Paolo Nenzi * b4ld.c, b4temp.c: Updated BSIM4 code to BSIM 4.6.5 according to BSIM 4.6.5 bug report. 2009-09-20 Holger Vogt * inpmkmod.c: fix bug no. 2859013 * INSTALL corrected * xspice/mif/mifgetmod.c: comments 2009-09-19 Holger Vogt * fteext.h, inpcom.c, inp.c, options.c, winmain.c: variable ngdebug added, sets ft_ngdebug, used for additional debug info printing * dctran.c: setup info added * inpdefs.h, inpmkmod.c: try to fix bug no. 2859013 2009-09-16 Holger Vogt * inpcom.c: .global was disabled, reinstated 2009-09-15 Holger Vogt * winmain.c: will output the time required for the setup stages, if compiled with preprocessor flag NGDEBUG 2009-09-09 Holger Vogt * inp.c: comments added, .TEMP evaluation before numparam parsing * inpcom.c: comments added, inp_casefix() bug removed * winmain.c: SetAnalyse() now writes to task bar, progress in 0.0%, more ouput added for different phases during start up (Start, Prepare Deck, Circuit2, Device Setup, op, tran ...) * acan.c, cktsetup.c, dctran.c, dctrcurv.c, inp.c, inpas2.c, spec.c: SetAnalyse() modified 2009-09-09 Holger Vogt * com_measure2.c: some comments added * windisp.c: white backgrond in plot with set color0=white, thicker lines with set xbrushwidth=2 (0: standard) in spinit 2009-08-29 Holger Vogt * measure.c, com-measure2.c, com-measure2.h: add DC and AC measurement * /examples/measure: example file for .measure dc, ac, and tran added. 2009-08-25 Dietmar Warning * src/spicelib/parser/inpptree.c: wrong derivative for u2 function - bug reported and corrected by Robert Larice 2009-08-23 Holger Vogt * upload of /frontend/compatmode.c, compatmode.h /misc/hash.c, hash.h failed. * xpressn.c: contents of compatmode.c and compatmode.h added as a preliminary solution. * misc/makefile.am: hash.c, mempool.c removed again * forntend/makefile.am: compatmode.c removed again 2009-08-23 Holger Vogt * /frontend/compatmode.c, compatmode.h /misc/hash.c, hash.h, --> new .measurement code 2009-08-23 Holger Vogt * /frontend/makefile.am, com_measure2.c, com_measure2.h, dotcards.c, dotcards.h, measure.c /numparam/numparam.h, xpressn.c, /include/bool.h, macros.h, misc/makefile.am, tclspice.c, visualc/vngspice.sln, vngspice.vcproj, compat --> new .measurement code tested for .tran simulation 2009-08-22 Dietmar Warning * devices/bsim4/b4ld.c, b4noi.c, b4set.c, b4temp.c: Update to version 4.6.4 * subckt.c, 141: "/*" within comment 2009-08-12 Holger Vogt * dctran.c, spiceif.c, options.c, fteext.h: option noinit added. This option suppresses the printout of "Initial Transient Solution". noinit may be combined with acct. noacct will suppress both printouts. * spsmp.c, ngspice.h: reference to _logb added for _MSC_VER 2009-08-17 Holger Vogt * inp.c: some comments added 2009-08-15 Holger Vogt * cpitf.c: MS Windows: search for spinit also in local (ngspice.exe) directory * cpextern.h: function parameters added in declaration * com_alias.h, init.c, cpitf.c, main.c: comments added 2009-08-08 Paolo Nenzi * src/frontend/resource.c: applied patch from Thomas D. Dean to remove the limit warning. 2009-08-08 Holger Vogt * measure.c, com_measure2.c, com_measure2.h, xpressn.c: Patches from Bill Swartz added * examples/inverter3.sp: test of new features 2009-08-08 Holger Vogt * measure.c: add more comments * example/func_cap.sp, inverter.sp, inverter2.sp: hint to start examples only in interactive mode. 2009-08-05 Holger Vogt * measure.c: add comments (not yet complete) 2009-08-04 Dietmar Warning * configure.in, ngspice.h: looking for unistd.h & usage * bsim2/b2ld.c: correct args size * bsim3soi/b4soild.c: init Cbg1 * cmath2.c: init vector d 2009-07-30 Dietmar Warning * frontend/inpcom.c: refurbish spice3 syntax for r models with alternative value like: "r1 a b 2k rmodel" * parser/inp2r.c, inp2l.c, inp2c.c: allow r,l,c element instantiation e.g. r=50 2009-07-28 Holger Vogt * ChangLog repaired (broken since rev. 1.417) * inpcom.c repaired (broken in CVS) 2009-07-25 Dietmar Warning * bsim3v32/b3v32temp.c: init struct pParam * ngspice.h: prototype for getpid under mingw * main.c, winmain.c: small cosmetics 2009-07-21 Dietmar Warning * bsim3v32/b3v32temp.c, bsim4/b4temp.c: backup to the original code - without the FREE(model->pSizeDependParamKnot), if we want call models in a loop, we should introduce this unique to all models 2009-06-11 Holger Vogt * conf.c: editor notepad.exe also with MS Visual C++ * /examples/TransImpedanceAmp/output.net: change integration method to 'gear' for achieving convergence * cpitf.c, ivars.c: add some comments * inp.c, dotcard.c: allow .meas * example/inverter.sp: add .meas .. WHEN ... 2009-05-24 Dietmar Warning * tcl-testbench4.tcl: correct path to codemodel * FB14.cir: better breakthrough current in bas70 2009-05-21 Holger Vogt * evaluate.c, outitf.c, sim.h: use SV_ADMITTANCE for plotting @dev[gxx] * defines.h change signal prototype for _MSC_VER 2009-05-21 Paolo Nenzi * src/frontend/postcoms.c: Fix from Lemaitre Laurent to avoid a segmentation fault when v->v_plot->pl_scale is NULL. 2009-05-16 Holger Vogt * inpcom.c lines 778ff: allow the following .model names: First character is alphabetical First character is digit, second alpha, third digit First character is digit, second alpha, third alpha, fourth digit 2009-05-16 Holger Vogt * inpcom.c lines 2940ff fix case 'q' * inp.c:788 error message with original line number from input deck * inp2q.c:155 error message if no model is found and default BJT is selected instead 2009-05-12 Holger Vogt * inpcom.c fcn inp_fix_gnd_name() remove excessive white spaces after replacing gnd by 0 2009-05-11 Holger Vogt * src/makefile.am replace -lBLT24.dll by -lBLT24 in line 247 2009-05-10 Holger Vogt * subckt.c:1348 find last dot, not first dot in model_name 2009-05-09 Holger Vogt * graf.c: graphics scaling during iplot made a little more convenient 2009-05-06 Holger Vogt * pp_lst.c:428 malloc(len+1) +1 added (bug report 2787072) configure.in:803, 958 (bug reports 1834772, 2787076 and 2787079) 2009-05-02 Holger Vogt * new flag NGDEBUG main.c, signal_handler.c, visualc/vngspice.vcproj: restore SIGSEGV signal handling for error message after seg fault (not in debug mode, now only for Windows) dctrcurv.c: winmessage about dc 2009-05-01 Holger Vogt * cktdojob.c, cktsopt.c: moved to cktsopt.c: maxord set to min 2 or max 6 2009-04-28 Holger Vogt * winmain.c, inp.c, cktop.c: SetAnalyse() modified/added cktdojob.c: maxord set to minimum 2 (prevent crash in dctran.c:774) 2009-04-26 Dietmar Warning * devices/cktinit.c: prototype load_alldevs not needed * ngspice.h: float.h before defines.h, some more function mapping in _MSC_VER section 2009-04-26 Dietmar Warning * measure.c, inpcom.c: winmessage only for windows * misc/util.c, tilde.c, math/poly/ployfit.c: relay to ngspice.h * main.c, tclspice.c, misc/mktemp.c, misc/string.c: don't need include string.h because it comes from central place ngspice.h 2009-04-26 Holger Vogt * xpressn.c:400 Suppress message "cannot redefine" 2009-04-25 Holger Vogt * configure.in, visualc/include/config.h: NGSPICEDATADIR set to $dprefix/share/ngspice 2009-04-23 Holger Vogt * measure.c, inpcom.c, : winmessage() header added ============================ Rework-19 ================================== 2009-04-23 Holger Vogt * measure.c: .measure broken for trig, targ 2009-04-22 Holger Vogt * bsim4v2init.c, bsim4v3init.c: CIDER added 2009-04-22 Holger Vogt * inpcom.c measure.c mystring.c alloc.c: show Windows error message before exiting 2009-04-21 Dietmar Warning * devices/bsim4/*.c, /vbic/*.c: Parameter declaration in function header 2009-04-20 Holger Vogt * src/spice.def: for creating dll * src/makefile.am: libs for tclspice MINGW added * configure.in: automatically select building shared or static libraries * tclspice.c: some additions for MS Visual 2008 2009-04-18 Dietmar Warning * devices/bsim3soi/*.c, *.h, tests/bsim3soi/*.cir, *.out, *.mod, DEVICES: Update to actual version 4.1, contrary to the comment in Berkeley doc's the model is not full downward compatibel to version 4.0 * spicelib/parser/inpgmod.c, 251: using strcmp again, instead of strstr - we need absolute equality to distinguish between node and model names. 2009-04-18 Holger Vogt * INSTALL: chapter 1.5 added (separate object file directory tree) 2009-04-17 Holger Vogt * resource.c: 27 allow compilation into a build directory 2009-04-14 Holger Vogt * control.c: remove bug no. 2724127 repeat loop inside another loop * dotcards.c, inp.c, measure.c: patch submitted by Bill Swartz added 2009-04-12 Holger Vogt * spicenum.c, xpressn.c: dico and inst_dico no longer removed in nupa_done because they are needed in .measure * lexical.c: size of arrays doubled in cp_lexer() to avoid "line too long" message * runcoms.c: enter do_measure() only if ft_curckt->ci_last_an has a value (bug no. 2751855) * winmain.c: winmessage() only if message not into log file * windisp.c: WIN_Text() now uses True Type Fonts and may display text vertically * misc/getopt_long_bsd.c getopt_bsd.h: add a BSD version of getopt_long() getopt.c, getopt1.c, getopt.h removed * misc/makefile.am: add (remove) files * configure.in: check for getopt.h and getopt_long(), if not found, use internal functions in getopt_long_bsd.c Replace package name ng-spice-rework with ngspice Change version number to 19 * main.c: chosse proper getopt_long(), winmessage() * visualc/vngspice.vcproj: files added (removed) * visualc/include/config.h: new version 19 2009-04-10 Holger Vogt * spicenum.c: memory leak removed 2009-04-05 Holger Vogt * com_fft.c, inpcom.c, variable.c, variable.h, resource.c, cpitf.c, plotit.c, inpgtok.c: some more memory leaks removed * spicenum.c: release of memory for dico->dyncategory corrected * subckt.c, inp.c, inpcom.c: more on memory leaks * subckt.c, spicenum.c: make call to fcn nupa_done() at the end of fcn inp_subcktexpand() to clear memory. 2009-04-01 Dietmar Warning * frontend/resource.c, misc/misc_time.c: init of rusage structure to prevent read of uninitialized memory, found with dbx under solaris 2009-03-29 Holger Vogt * inp.c, variable.c: some more memory leaks removed 2009-03-27 Holger Vogt * inpcom.c, variable.c, cpitf.c: memory leaks removed, which were detected by valgrind-3.4.1 under SUSE 11.1 2009-03-22 Holger Vogt * inpcom.c: readline() now returns /n for an empty line, dynLlen consists of maximum line length plus some space for parameter substitution and has a minimum size of 512. * spicenum.c, xpressn.c, general.h, numparam.h: dynamic memory allocation also for all string manipultions, Strbig now is a macro using tmalloc, the macro Strrem deallocates the memory, the size of the arrays is dynLlen. 2009-03-21 Holger Vogt * inpcom.c, fteinp.h, inpdefs.h: line renumbering of input deck added to the end of fcn inp_readall(). cc->li_line_original now contains the line numbering of the input file 2009-03-15 Holger Vogt * cktfinddev.c: some (optical) cleanup * numparam.h, xpressn.c, spicenum.c, inpcom.c: dynamic memory allocation for numparam (the easier part) 2009-03-08 Holger Vogt * dctran.c no printout of 'Initial transient solution' if .options noacct is set 2009-03-08 Holger Vogt * plotit.c fcn plotit(): add quotes again for xlabel, ylabel, title in cline 2009-03-07 Holger Vogt * inpcom.c fcn inp_fix_for_numparam(): no quotes changed for plot lines within control section, e.g. plot v(2) xlabel 'my input' ylabel 'output' 2009-03-07 Dietmar Warning * tests/bsim4/*.out: same as below for bsim3 2009-03-07 Holger Vogt * spicenum.c inpcom.c subckt.c xpressn.c numpaif.h numparam.h general.h Collect information to allow dynamic memory allocation for numparam ( Still to be implemented ! ) Defined in inpcom.c: dynmaxline dynnLen dynMaxckt dynsubst 2009-03-03 Dietmar Warning * tests/bsim3/*_sim/*.out: adapt output format to spice3 numdgt convention, most tests are running except tran tests and op-amp ac test. * test/bin/check.sh: extend the filter rules by two keywords, not nice but works 2009-03-01 Dietmar Warning * spicelib/parser/inp2q.c: allow 4-terminal instances for adms, then the fifth node will be set to ground (same as substrate node for gp if fourth node isn't set). Checked with lots of examples but not 100% waterproof. * tests/bsim3: reorganized the entire directory structure with focus only to the latest published Berkeley testbench for bsim3. ac and tran test included but there are still problems in comparing their spice3 results to ngspice. * adms/hicum0,hicum2,mextram/*.va: Using GMIN from simulator will improve op solution, e.g. by gmin stepping. The coupling of _circuit_gmin to ckt->CKTgmin is generated by adms in ngspiceMODULEdefs.h. 2009-02-28 Holger Vogt * inp.c:605 ff, fcn inp_spsource(), if preproc. flag OUTDECK defined, the deck is saved as debug-out2.txt, here after parameter substitution 2009-02-25 Holger Vogt * inpdomod.c:436 error message adapted to existing devices * /frontend/numparam/numparam.h, general.h: length of char arrays set to 40000 * inpcom.c: preprocessor flag OUTDECK, if set will save complete deck into debug-out.txt 2009-02-25 Dietmar Warning * spicelib/parser/inp2q.c,155: 5-terminal only for adms bipolars 2009-02-24 Dietmar Warning * configure.in: removed Makefile for tests/TransImpedanceAmp * tests/bsim3/.../ac_sim/*.out: removed the imaginary part of frequency on x-axis 2009-02-23 Dietmar Warning * spicelib/parser/inpgmod.c: correct strstr compare * /tests/bsim3/*.cir: .options noacct added * /tests/bsim3/modelcard.*mos: correct level=8 and set version * /tests/.../*.cir: add level parameter for bjts to suppress the long line warning 2009-02-22 Holger Vogt * xspice/icm/makefile: *.cm for CYGWIN need to be made executable (755 instead of 644) * fteext.h spiceif.c options.c dotcards.c: .options NOACCT added * /tests/.../*.cir .options noacct added (except BSIM3 files) * main.c:614 allow null terminator in string 2009-02-22 Dietmar Warning * devices/adms/mextram: Update to release version 504.7 now with selfheating as a 5 terminal version * tests/adms/mextram/*.sp: additional parameters for new mextram version needed * spicelib/parser/inpgmod.c, inp2q.c: Correct handling of adms 5 terminal models 2009-02-21 Holger Vogt * parse.c:922 prevent automtic deletion of @xxx[par] winmain.c: increased width of ngspice window to allow display of 80 characters per line (e.g. for command 'show' /tests/bin/check.sh: allow make check for CYGWIN (will fail though) 2009-02-20 Holger Vogt * x11disp.c: allow closing of help windows with WM x-button 2009-02-14 Dietmar Warning * src/spicelib/parser/inpdomod.c: map level 10 to bsimsoi4 and map ancient version 4.0 and 4.1 of bsim4 to available version 4.2 * DEVICES: corrections and actualizations, add short adms model descriptions * adms/hicum0/admsva/hicum0.va: a slight fix of TFH in version 1.12 * adms/hicum2/admsva/hicum2.va: general update to version 2.23 2009-02-12 Dietmar Warning * src/include/missing_math.h, src/maths/misc/isinf.c: fix a conflict under certain conditions 2009-02-12 Holger Vogt * device.c:908 remove bug: reset i to 0 x11.c: allow closing of plot windows with WM x-button 2009-02-10 Holger Vogt * windisp.c, X11.c, postcom.c 'destroy plot1' now deletes all graphs (plot windows) associated with the plot 'plot1' before the data of plot1 are deleted, to prevent a crash due to unsuccessful redrawing 2009-02-07 Holger Vogt * device.c, inpcom.c alter and altermod commands reinstated and improved 2009-02-01 Dietmar Warning * alloc.c, outitf.c: exclude heap usage for windows compile under __MINGW__ * resource.c: meminfo api usage not for commandline version 2009-02-01 Holger Vogt * alloc.c, outitf.c: Use the new heap only for tclspice in Windows (HAS_TCLWIN defined) because of a crash in the 'destroy' command inpcom.c:1807 do not remove white spaces in an alter or altermod command 2009-01-31 Holger Vogt * xpressn.c, spicenum.c, numparam.h, runcoms.c, runcoms2.c: Incompatibilty to MAC OSX removed by proper variable declarations * subckt.c: bug no. 2293284: preliminary change, further tests required 2009-01-26 Lionel Sainte Cluque * man/man1/ngspice.1, * man/man1/nutmeg.1: apply Ahmed El-Mahmoudy's patch on hyphens in manpages. 2009-01-18 Paolo Nenzi * src/frontend/plotting/plotit.c, * src/frontend/plotting/plotcurv.c: 33: Fixed some of the existing problemass SMITH PLOT. There were 2 errors: one in plotit() to calculate the transformation line (r-1) / (r +1) where a mistake was made in the process of plotting a single real point and the other in ft_graf() that would print imaginary part = real part for real data. A. Roldan - espice 32: Fixed some problems the existing polar PLOT. To summarize the problems were in the wrong calculation of the size of x and y axes for the plot. A. Roldan - espice 2009-01-18 Holger Vogt * src/frontend/mw_coms.c: variable declarations to top of function * outif.c, alloc.c: add HAS_TCLWIN flag to allow coimpilation of tclspice under MS VC++ 2009-01-16 Paolo Nenzi * src/frontend/mw_coms.c, src/frontend/commands.c, * src/frontend/runcoms.c, src/include/fteext.h: 34, 36, 38: Added the removecirc command. This command removes the current circuit and its associated plots. This comes from an old function written by M. Widlok and updated by A. Roldan for espice. Note: I have changed the code to eliminate GTK functions and tested. Things work but in ngspice there is a problem due to model redefinitions, as it seems that in ngspice models are globals. Need further investigation. P. Nenzi * src/frontend/commands.c, src/frontend/misccomms.c: 24: Added the parameter "noask" to quit command to avoid the question before exiting ngspice. A. Roldan - Espice * src/frontend/evaluate.c, src/frontend/typedefs.c, src/include/sim.h: Added some vector types from Espice (impedance, admittance, power etc.) The original implementation by A. Roldan did not fit immediatly. I had to comment two definitions. I could not test "plotab". 2009-01-16 Paolo Nenzi * src/frontend/evaluate.c, src/frontend/typedefs.c, src/include/sim.h: Added some vector types from Espice (impedance, admittance, power etc.) The original implementation by A. Roldan did not fit immediatly. I had to comment two definitions. I could not test "plotab". 2009-01-15 Paolo Nenzi * src/spicelib/devices/vsrc/vsrc.c, * src/spicelib/devices/isrc/isrc.c, * src/frontend/spiceif.c, * src/frontend/device.c, * src/frontend/postcoms.c, * src/frontend/vectors.c: 17: New capability of print command. It is now possible to print and alter vectors of reals like print @vin_sin[sin] to print the vector of parameters defining the sinusoidal source (it works with both the sources type). It is possible to alter the parameters with the command alter @vin_sin[sin] = ( 1 1 3000Hz ). A. Roldan -Espice Note: alter syntax does not work in full yet, it still generate an error but modifies the parameters. P. Nenzi 2009-01-15 Paolo Nenzi * src/frontend/vectors.c: 57: Fixed I(vx), before the if I(*) (upper case) was not recognized as the function to plot the current of vx. A. Roldan - Espice * src/frontend/postcoms.c: 7: Fixed plot number after "destroy all" command. A. Roldan - Espice * src/include/fteext.h * src/frontend/evaluate.c, src/frontend/cpitf.c, src/frontend/parse.c * src/maths/cmaths/cmath2.c, src/cmaths/cmath4.c, src/cmaths/cmath4.h: 16: New function to compute the group delay has been implemented. Group delay is defined as -(dphase/dfrequency) and can be printed or plotted by writing vg(x), where x is a complex vector. A. Roldan - Espice 15: Fixed existing problems in this function due to the complex nature of the frequency vector. To get the data from frequency[i], the real part must be accessed. A. Roldan - Espice 14: New function to compute the moving average. A. Roldan - Espice 2009-01-15 Paolo Nenzi * src/frontend/{spiceif.c, spiceif.h, vectors.c}, src/include/fteext.h, * src/main.c: 3: A new function finddev_special() has been introduced to look for references like @BC107[is] and to verify if we asked for a model or a device and thus call the spif_getparam_special() correctly in vectors.c. The new @ syntax is @{model,device}[parameter]. - A. Roldan - Espice. Note: I have modified the implementation putting the spif_getparam_special() in the if_getparam definition in main.c 2009-01-15 Dietmar Warning * src/include/wstdio.h: read fct. prototype for older MSC compiler * src/misc/alloc.c: heap also needed under windows with tcl * src/frontend/resource.c: resource info under Windows w/o psapi, still not yet perfect 2009-01-11 Dietmar Warning * src/spicelib/devices/hisim/hsm1eval1xx.c, src/spicelib/devices/bsim3soi_x/b3soild.c: using ngspice.h as a central place 2009-01-10 Holger Vogt * windisp.c: improve plot window handling, still not yet perfect 2009-01-09 Dietmar Warning * src/misc/alloc.c, src/frontend/outitf.c: heap only needed under windows for zoom 2009-01-05 Dietmar Warning * src/math/misc/isinf.c, isnan.c, src/include/missing_math.h: small polish for HAVE_DECL_XXX macros, more elaborate isinf function * src/include/memory.h: prototype for hrealloc fct. * adms/hicum2/amsva/hicum2.va: update to actual version 2.22, very small modifications compared to the original va code. 2009-01-04 Dietmar Warning * src/math/misc/isinf.c, Makefile.am: a simple (but ugly) workaround for isinf needed by some adms generated models * src/include/ngspice.h, missing_math.h: try to catch isinf by ieeefp.h * adms/ekv/amsva/ekv.va: compatibility regarding S/D diode behaviour 2009-01-02 Dietmar Warning * adms/ekv/amsva/ekv.va: EPFL-EKV version 2.63, replacement of the long channel version with a code according to the official manual (revision II) available at http://legwww.epfl.ch/ekv, contribution of Ivan Riis Nielsen 11/2006. * /src/frontend/wdisp/windisp.c, 398: windows zoom was broken - %le for double seems not more ignored, changed to more suitable %e 2009-01-01 Dietmar Warning * configure.in, include/missing_math.h, src/math/misc/isnan.c: POSIX conform configure isnan, isinf macros and finite function * admst/ngspiceMODULEdefs.h.xml: some cc needs double cast for isinf macro 2008-12-31 Holger Vogt * resource.c: streamline resource info under Windows * tclspice integration under Windows: dctran.c, inpfindl.c, outitf.c, alloc.c, tclspice.c, winmain.c: type definitions, printf -> fprintf, new heap for plot data to prevent memory fragmentation * configure.in: new flags for TCL under Windows: HAS_TCLWIN (is set instead of HAS_WINDOWS), TCLWIN (for generating makefiles, instead of WINDOWS) * cmath/makefile.am: prevent making test executables under TCL/Windows 2008-12-26 Dietmar Warning * autogen.sh, configure.in: A hopeful way to integrate adms - ugly, but tested under linux, sunOS and msys with and w/o adms enabled. * src/spicelib/devices/adms/hicum0: updated verilog code with small adaption to actual hicum0 version 1.2 * tests/adms/hicum0: using one library file for tests 2008-12-23 Holger Vogt * resource.c: for tclspice HAS_WINDOWS replaced by _MSC_VER and __MINGW32__ * outitf.c, cktdojob.c: printf replaced by fprintf * cpitf.c:216 s replaced by copys * tclspice.c:2168 init_rlimits( ) added to get startup system info 2008-12-22 Holger Vogt * /spicelib/parser/inpdomod.c: checks for BSIM3 and BSIM4 look for major versions 3.2, 3.3, 4.2 - 4.6 2008-12-22 Dietmar Warning * adms/admst/ngspiceMakefile.am.xml: switch to libtool (unfortunately!) 2008-12-20 Holger Vogt * bug 2449483 removed: inpdomod.c:293 added as in b3v32check.c:42 2008-12-14 Dietmar Warning * src/Makefile.am: "hard wired" makefile dependency generation compiler options removed for main.c - this should be done by libtool, left it for tclspice and xspice codemodels (see below) * src/xspice/icm: removed Makefile.am - not used, configuration relays on makedefs.in and fixed Makefile, these files have now sun compiler specific options DEPFLAGS added * src/xspice/ipc/ipc*.c: prevent some warnings under sun compiler 2008-12-07 Dietmar Warning * src/main.c: double semikolon in nutmeginfo decl. gives: "syntax error: empty declaration" under solaris ss12 2008-12-06 Holger Vogt * frontend/spec.c, com_fft.c: free_pnode(first_name); moved further down to allow 'fft vout' instead of only 'fft v(vout)' ============================ Rework-18 ================================== 2008-11-30 Lionel Sainte Cluque * configure.in: --with-tcl search path make broader to limit the need of the optional argument. Message in case of tclConfig.sh file not found fixed by sed. * examples/tclspice/*/*.tcl: fixed load libspice lines due to the directories hierarchy. (One level more) 2008-11-29 Holger Vogt * frontend/numparam/xpressn.c: rand() and gauss() moved to math/misc/randnumb.c -> 'set rndseed=value' value = integer > 0 in spinit will yield deterministic pseudo random number sequence. -> random() and rand() with correspongding max value 2008-11-26 Dietmar Warning * src/spicelib/devices/bsim4v4, bsim4v5: this is a backup because the patch of Phil Barker are providing only a placeholder for propriarity sti stress model - not any equation. If the stimod feature is some time published we can implement it again. 2008-11-26 Holger Vogt * frontend/numparam/xpressn.c: agauss, sinh, cosh tanh, added (source: S. Thiel) * b3soi*ld.c: _isnan defined for _MSC_VER * main.c, cmath2.c, xpressn.c: random, srandom defined extern for _MSC_VER * math/misc/equality.c: llabs defined extern 2008-11-23 Lionel Sainte Cluque * COPYING: update many details and tclspice LGPLv2 * src/tclspice.c: changed headers for LGPLv2 2008-11-23 Lionel Sainte Cluque * configure.in: modified for tclspinit.in * src/tclspinit.in: spinit file for tclspice (at least until installation of codemodels is solved) * src/Makefile.am: modified for tclspinit installation * src/frontend/cpitf.c: modified for use of tclspinit in tclspice 2008-11-04 Holger Vogt * /doc/version.texi committed again * /visualc/include/config.h: version no. 18 * /frontend/com_ftt: tfree, copyright notice 2008-11-22 Lionel Sainte Cluque * COPYING: license clarifications * frontend/inpcom.c: minor changes (correct warning) * frontend/misccoms.c: minor changes (correct warning) * frontend/where.c: minor changes (correct warning) * spicelib/parser/inpgmod.c: minor changes (correct warning) * spicelib/parser/inppas3.c: minor changes (correct warning) * spicelib/devices/numd/numdload.c: minor changes (correct warning) * spicelib/devices/numd2/nud2load.c: minor changes (correct warning) * xspice/mif/mifsetup.c: minor changes (correct warning) * xspice/ipc/ipcsockets.c: minor changes (correct warning) * ciderlib/input/mobset.c: minor changes (correct warning) * include/spmatrix.h: minor changes (correct warning) * tclspice.c: minor changes (correct warning) * frontend/com_fft.c : changed some malloc into tmalloc * frontend/com_measure2.c : changed some malloc into tmalloc * spicelib/devices/bsim3/b3temp.c: changed some malloc into tmalloc * spicelib/devices/bsim3soi/b4soitemp.c: changed some malloc into tmalloc * spicelib/devices/bsim3v32/b3v32temp.c: changed some malloc into tmalloc * spicelib/devices/bsim4/b4temp.c: changed some malloc into tmalloc * spicelib/devices/bsim4v2/b4v2temp.c: changed some malloc into tmalloc * spicelib/devices/bsim4v3/b4v3temp.c: changed some malloc into tmalloc * spicelib/devices/bsim4v4/b4v4temp.c: changed some malloc into tmalloc * spicelib/devices/bsim4v5/b4v5temp.c: changed some malloc into tmalloc * spicelib/devices/cpl/cplload.c: changed some malloc into tmalloc * spicelib/devices/ndev/ndevset.c: changed some malloc into tmalloc * ciderlib/support/database.c : changed some malloc into tmalloc * frontend/numparam/mystring.c : changed some malloc into tmalloc * frontend/numparam/xpressn.c : changed some malloc into tmalloc * spicelib/parser/inp2p.c : changed some malloc into tmalloc * xspice/mif/mif_inp2.c: changed some malloc into tmalloc * misc/util.c: changed some malloc into tmalloc * spicelib/parser/inp2y.c: changed some malloc into tmalloc 2008-11-20 Paolo Nenzi * src/frontend/diff.c: currents in rawfiles are written as i(xxx) and no more as xxx#branch. The diff interactive command (used to compare plots) did not work anymore. This new version traslates back i(xxx) to xxx#branch. 2008-11-19 Dietmar Warning * src/frontend/resource.c: found a way to compile w/o psapi under MS VC++ 6.0, prevent some warnings * src/frontend/com_ghelp.c: prevent warnings * src/frontend/measure.c, src/frontend/numparam/xpressn.c: use well defined macros for min/max instead of fct's * src/frontend/miscoms.c: no more INT_NOISE * src/include/ngspice.h: polishing * src/include/missing_math.h, src/math/misc/scalb.c, src/math/sparse/spsmp.c,: hopefull better scalb handling tested under different OS's, but needs more tests 2008-11-18 Dietmar Warning * src/spicelib/devices/vbic/*.c, *.h: Repair a uninitialized state of some local variables by using the state vector, bug reported by Muris Mujagic, NI. * test/vbic/*.cir: Correct use of pnp transistors substrate connection - VBIC is a vertical transistor model. Collector connection as workaround for pnp Lateral's. 2008-11-16 Dietmar Warning * src/spicelib/devices/bsim4/bsim4itf.h: adapting the ngspice scheme regarding info structure * src/spicelib/devices/bsim4/b4check.c: This is really UCB version 4.6.3 - see below (but will cover all 4.6.x versions) 2008-11-09 Dietmar Warning * src/spicelib/devices/bsim4/*.c,*.h src/spicelib/parser/inpdomod.c: This is the new and actual BSIM4 version 4.6.3 from UCB. All files are 4.6.2 except b4temp.c which is the only bugfix for 4.6.3 (see bsim website). Tested so far with simple testcases - but should be proved further with more practical examples. 2008-11-09 Holger Vogt * visualc/: Directory with project files to compile ngspice with MS Visual Studio 2008 2008-11-04 Holger Vogt * src/frontend/com_ghelp.c: Notify user that internal help is no longer available in Windows port 2008-11-04 Paolo Nenzi * src/frontend/parser/lexical.c: 53: Fixed the problem of segmentation fault when redirecting output putting spaces around "<" or ">". A. Roldan - Espice 2008-11-02 Lionel Sainte Cluque * src/tclspice.c : tcl_vfprintf corrects the stou bug * README.tcl : Creation * tests/tcl/test_vectoblt.tcl : modified invocation and package loading 2008-10-27 Dietmar Warning * src/spicelib/parser/inp2q.c VBIC is standard - not ADMS (yet) * src/spicelib/devices/vbic/vbicnoise.c correct naming array order according vbicdefs.h 2008-10-14 Dietmar Warning * src/main.c, src/misc/util.c polish to prevent warnings 2008-10-11 Holger Vogt * /frontend/resource.c line 41 correct __MINGW32__ /ciderlib/input/options.c renamed to optionsc.c to avoid double options.obj in VC++ 2008 2008-10-05 Holger Vogt * Macros added to allow compilation of tclspice with MS Visual C++ 2008 2008-09-24 Holger Vogt * wstdio.h, scalb.c, complex.h Small changes to allow compilation with MS Visual C++ 2008 main.c, util.c: path of *.cir input file as search path for .include files (Windows only) 2008-09-22 Holger Vogt * complex.h, measure.c, resource.c, windisp.c, xpressn.c, rawfile.c, runcoms.c, readhelp.c, defines.h, ngspice.h, b4soild.c, hsm1eval102.c, hsm1eval112.c, hsm1eval120.c, wstdio.h Small changes to allow compilation with MS Visual C++ 2008 2008-09-15 Lionel Sainte Cluque * src/Makefile.am: Add $(DESTDIR) in tclspice installation, required by debian package. * src/Makefile.am: Use -no-undefined only for windows build (libspice_la_LDFLAGS) 2008-09-13 Holger Vogt * configure.in: add AC_LIBTOOL_WIN32_DLL * src/makefile.am correct typo 2008-09-13 Holger Vogt * configure.in: add /mingw as search path for tcl * tclspice.c: replace sigsetjump and sigjmp_buf with macros from macros.h 2008-09-09 Lionel Sainte Cluque * configure.in: tclspice checks moved before Operating System checks: To set no_x flag before it is used. * tests/tcl-testbench*: chmod a+x tcl-testbench*.tcl 2008-09-01 * configure.in: CAPZEROBYPASS is enabled by default now. To disable it you can add --disable-capzerobypass to configure command. 2008-08-27 Paolo Nenzi * --- TCLSPICE initial integration (Lionel Sainte Cluque) --- * Makefile.am: Makefiles changed for libtool. We use still .a files but we let libtool to create them in a portable manner. This slows compilation a little bit but improves portability of ngspice/tclspice. * src/tclspice.c, src/tclspice.map, pkgIndex.tcl.in, src/include/tclspice.h: tclspice main and include file. (Readded files). * src/tests/tcl/, src/tests/tcl-testbench1/, src/tests/tcl-testbench2/, src/tests/tcl-testbench3/, src/tests/tcl-testbench4/: testbenches for the tclspice simulator. (New dirs). * src/frontend/plotit.c: added blt_plot for blt output device if TCL defined. * src/frontend/com_plot.c, src/frontend/com_plot.h: added com_bltplot. * src/frontend/commands.c: redefined plot command to combltplot if TCL is enabled. * src/frontend/display.c: defined Tk display device. * src/frontend/outitf.c: added blt support. * src/frontend/terminal.c: if TCL is defined, interactive terminal stubs are copiled in. * src/include/ngspice.h: added definitions for TCL functions. * src/misc/alloc.c: Using TCL allocation functions when tclspice is enabled. * src/frontend/com_measure2.c,.h: new measure command (to link and test) * src/main.c: some static function moved for TCL interface (nutmeginfo, etc.) 2008-08-25 Paolo Nenzi * configure.in, src/spicelib/analysis/noisean.c: removed the compilation switch --enable-intnoise. Noise analyses now generate two plot, the first one for spectrum and the second one the integrated noise. 2008-08-24 Paolo Nenzi * src/main.c: Moved the #ifdef CIDER declaration. Machine accuracy limits now are defined even if CIDER is not compiled. This is needed for the subsequent integration of TCL patch. 2008-06-14 Holger Vogt * examples/numparam: adapt examples to new numparam code 2008-05-31 Dietmar Warning * src/frontend/aspice.c: compliant processing of pid and wait() also under solaris 2008-05-24 Holger Vogt * src/frontend/com_fft.c: Fast fourier transform added for transient data analysis. * src/frontend/spec.c: Progress status display for Windows added 2008-05-18 Dietmar Warning * Small changes to compile under Sun Studio 11 for Solaris - may be useful in other configurations too * configure.in * src/frontend/control.c * src/include/ngspice.h * src/maths/misc/equality.c * src/spicelib/devices/cpl/cplask.c * src/spicelib/devices/hisim/hsm1eval102.c * src/spicelib/devices/hisim/hsm1eval112.c * src/spicelib/devices/hisim/hsm1eval120.c * src/spicelib/devices/soi3/soi3acld.c 2008-05-12 Dietmar Warning * src/frontend/inp.c, src/frontend/inp.c, src/frontend/Makefile.am, src/Makefile.am, configure.in: global nodes and numparams now as default - configure switches not needed tested so far - but sure that some problems will raise. 2008-05-11 Dietmar Warning * src/misc/missing_math.c,h, src/math/misc/*.*: move math function to one place * src/include/ngspice.h, src/main.c, src/Makefile.am, src/maths/Makefile.am, src/maths/misc/Makefile.am, src/misc/Makefile.am, configure.in: organization of libmathmisc.a * src/maths/misc/erfc.c: better erfc for lossy transmission line 2008-05-10 Holger Vogt * src/frontend/resource.c: Memory information is now stemming from the /proc file system (LINUX) or using GlobalMemoryStatusEx and GetProcessMemoryInfo (Windows). The old info system with sbrk(0) may still be used. 2008-05-06 Holger Vogt * src/frontend/outitf.c: suppress printing of "Reference value" into log-file under Windows 2008-05-03 Dietmar Warning * src/include/ngspice.h, src/main.c: srandom has a macro in ngspice.h as a central place - should be sufficient also under windows 2008-05-01 Holger Vogt * src/frontend/com_hardcopy.c: bug no. 1885979 removed: currentgraph saved and restored after hardcopy. 2008-04-28 Holger Vogt * src/frontend/plotting/graf.c: remove iplot bug by changing line 686. 2008-04-27 Dietmar Warning * src/frontend/inpcom.c: change _DEBUG to TRACE - unique debug switches * src/frontend/plotting/gnuplot.c: adding windows gnuplot, some modifications 2008-04-26 Holger Vogt * src/frontend/inpcom.c: inp_sort_params() now uses dynamic memory allocation on the heap: no enlargement of stack size is necessary. 2008-04-25 Holger Vogt * src/frontend/inpcom.c: In inp_fix_param_values() xspice variables of type complex are recognized also in vectors. 2008-04-23 Holger Vogt * src/frontend/inpcom.c: In inp_fix_param_values() xspice variables of type complex are recognized. Vectors of complex variables still missing. 2008-04-20 Holger Vogt * src/frontend/inpcom.c: .cmodel added for xspice compatibility: inp_fix_param_values() replaces .cmodel with .model and then skips entire line, thus no numparam search and setting of {} will happen. 2008-04-20 Dietmar Warning * src/spicelib/devices/bsim*/b*ld.c, src/math/ni/niconv.c: Reconstruct NEWCONV macro for better bsim3,4,soi transfer from Berkeley, macro is defined by default in spice3f4 which is used by UCB for testing. Now same behaviour in ngspice - tested and should not impact convergence behaviour. * src/frontend/winprint.c: pragmas only for MSC. * configure.in tests/Makefile.am, tests/bsim3soi/*.cir, *.out, *.mod: new testcase for bsim3soi (origin UCB small modifications). 2008-04-19 Holger Vogt * src/frontend/inpcom.c: inp_fix_param_values(): retain ..=true as boolean, retain ="xxx" as string, allow numparams without {} inside xpsice input vectors 2008-04-16 Dietmar Warning * src/spicelib/devices/bsim3soi/*.c,*.h, src/spicelib/parser/inpdomod.c, inp2m.c, src/spicelib/devices/dev.c, DEVICES: New bsim3soi version 4.0 * src/include/macros.h: redefine NEWCONV because we are using Berkeley spice3f4 code for bsim models. 2008-04-13 Holger Vogt * src/frontend/inpcom.c: get_number_terminals(): support for cpl lines, inp_readall(): debug ouput of input data after processing inp_fix_param_values(): CIDER models excluded from getting {}, xspice model vectors [] excluded from getting {} * src/winmain.c: larger text buffer, MakeArgcArgv() allows multiple spaces between arguments, allows CYGWIN handling, winmessage() for error messages * src/main.c: temporary file for Windows non admin users, printed info independent from sequence of options * src/include/bool.h: BOOLEAN definition added again src/spicelib/devices/dev.c: #undef BOOLEAN added 2008-04-05 Dietmar Warning * src/frontend/inpcom.c: define the missing buffer nam_buf for mos devices * src/misc/string.c, stringutil.h: moving some string functions from inpcom.c * src/include/bool.h: removing BOOLEAN definition (checked under mingw) 2008-03-23 Holger Vogt * src/frontend/inpcom.c: Nodes for SOI devices not detected correct * src/spicelib/parser/inptyplk.c, inpptree.c, ifeval.c: better TRACEing * src/winmain.c: larger printf buffer 2008-03-22 Paolo Nenzi * src/frontend/{commands.c, com_gnuplot.c, com_gnuplot.h}, * src/frontend/plotting/{gnuplot.c, gnuplot.h,plotit.c}: added initial support for gnuplot plotting of simulation outputs. Gnuplot interface code has been sent by Stefano Pedretti. 2008-01-19 Dietmar Warning * configure.in: w/o optimization better debug * src/main.c: fix conflict for own shutdown function * src/frontend/numparam/xpressn.c: more precise recognition of subckt names * src/frontend/numparam/spicenum.c: avoid access to uninitialized memory because of pascal convention 2008-01-12 Dietmar Warning * configure.in, src/xspice/ipc/*.c: xspice ipc is possible * src/include/ngspice.h: reflect the extended autoconfigure 2008-01-06 Dietmar Warning * src/frontend/subckt.c: correct compare of binned model names. Fixed a bug of incorrect subckt expansion when MOS model inside. * src/spicelib/parser/inpdomod.c, DEVICES: Compatibility issue - now all bsim3 models running under level 8 and 49 and all bsim4 models under level 14 and 54. Distinction must be made by version parameter. 2008-01-04 Paolo Nenzi * src/frontend/runcoms.c: commented out code that did not allow rawfile generation for OP and AC analyses. Now rawfile is generated even for OP and AC. I do not know if this is consistent with spice philosopy but I think is nice to have. 2008-01-03 Dietmar Warning * src/main.c: rflag still needed. 2008-01-02 Dietmar Warning * src/frontend/outitf.c: Fixed rawfile ascii generation. Same like below. * src/frontend/inp.c: don't need local buffer w/o getcwd * src/conf.c: belong spice3 manual ascii is default anyway * src/misc/missing_math.*, src/include/missig_math.h, /src/frontend/measure.c, src/spicelib/analysis/dctran.c: Using a real double compare to equal. 2008-01-02 Paolo Nenzi * src/frontend/rawfile.c: Fixed rawfile ascii generation. The prevoius patch produced incorrect string like v(v(1)) for v(1) in the output file. 2007-12-31 Holger Vogt don't need buffer w/o getcwd fix for the crashing of ngspice under Windows when started from windows explorer. * src/frontend/inp.c: ngspice crashed when executing a file consisting of a simple control section. Fixed. 2007-12-29 Dietmar Warning * src/frontend/inpcom.c: 3/4 terminal recognition for bjt's * src/misc/string.c, stringutil.h: token function for bjt instance 2007-12-29 Holger Vogt * src/frontend/runcoms.c, runcoms2.c: backup the filetype problem if set in spinit * src/frontend/inpcom.c: no param handling for "set" commands 2007-12-27 Dietmar Warning * src/spicelib/devices/*/*init.c: No usage of C99 Designated Initializers * src/spicelib/devices/*/*par.c: only formatting issues * src/frontend/numparam/*.c: fixing memory problems in nupa_substitute and other * src/frontend/dotcard.c: strip white spaces only inside parens * src/misc/missing_math.*: AlmostEqualUlps in double is needed 2007-12-26 Paolo Nenzi * src/frontend/numparam/*: downgraded all files to standard C syntax with the included washprog.c tool. 2007-12-14 Dietmar Warning * configure.in, src/spicelib/devices/dev.c: allow mingw build w/o GUI 2007-12-14 Holger Vogt * src/frontend/runcoms.c, runcoms2.c: fix the filetype problem if set in spinit 2007-12-15 Steven Borley * Added automake warning and output verbosity to autogen.sh * src/frontend/spiceif.c: Avoid invalid lvalue assignment errors when calling the macro _foo(). Needed for gcc4 which no longer supports lvalue cast bogosity. Fixes bug 1584784. 2007-12-14 Steven Borley * Added missing .cvsignore file to the tests directories and some devices directories, and updated for change from makeidx to ngmakeidx 2007-12-13 Steven Borley * Fixed(?) missing files error when autogen.sh is run (with no adms) - configure.in: removed adms directors from AC_CONFIG_FILES list * Fixed inclusion of termcap header - configure.in: add check for to - frontend/terminal.c: select either or 2007-12-09 Dietmar Warning * src/frontend/numparam/xpression.c: placeholder for agauss (y=nominal_value) * src/spicelib/parser/inpdomod.c: if no bsim3 version given then use 3.30 2007-12-09 Holger Vogt * src/frontend/wdisp/windisp.c: better prototypes and some cosmetics * src/frontend/inpcom.c: change local index to ind to prevent conflict with index function 2007-12-06 Holger Vogt * src/frontend/wdisp/windisp.c: show coordinates and gradients, zooming 2007-12-02 Dietmar Warning * src/spicelib/devices/bsimX: div. unused variables and prototypes * src/frontend/inpcom.c, inp.c: fix prototype of dirname if not available * src/frontend/dotcards.c, src/misc/string.c: strip WhiteSpaces inside parens of dot cards * src/frontend/display.c: no WINX_DiagramReady parameter 2007-11-28 Dietmar Warning * configure.in: memory display independent from ftime under windows * src/frontend/numparam/xpression.c: fix the arg order for pow * src/frontend/wdisp/windisp.c, wprint.c: Prototypes and C comments * src/frontend/com_hardcopy.c, resource.c, terminal.c: prevent ext. warnings * src/frontend/inpcom.h: move arrays to the files there are needed * src/frontend/inpcom.c, inp.c: prototypes for dirname and asprintf * src/spicelib/parser/ifnewuid.c, inperror.c: prototype for asprintf * src/misc/ivars.c: prototype for asprintf * src/misc/util.c: better macro request to HAVE_DIRNAME * src/main.c: prototype for asprintf * configure.in: check for dirname and asprintf 2007-11-24 Dietmar Warning * configure.in: memory display independent from ftime under windows * src/frontend/numparam: pow function included 2007-11-22 Dietmar Warning * src/spicelib/devices/bsim3: update version 3.3.0 * src/spicelib/devices/bsim3v32: now version 3.2.x 2007-11-21 Dietmar Warning * src/spicelib/devices/bsim3/b3check.c,b3set.c: accept version 3.xx form * src/spicelib/devices/bsim4v2,3: multiplier included * src/spicelib/devices/bsim4v4: no std header * src/spicelib/analysis/dctran.c: AlmostEqualUlps on central place * src/misc/missing_math.x: AlmostEqualUlps on central place * src/include/missing_math.x: AlmostEqualUlps on central place 2007-11-17 Dietmar Warning * src/spicelib/devices/bsim4vX/b*par.c: scale parameter included * src/frontend/numparam/xpressn.c: cast to prevent warning 2007-11-14 Dietmar Warning * src/frontend/inp.c: one only "one" times * src/frontend/resource.c: include prototype for timediff * src/frontend/parser/complete.c: functions used in this branch only * src/spicelib/analysis/acan.c: unused variable step * src/spicelib/parser/inp2q.c: 5 nodes only for adms * src/misc/string.c: comment was nonsens * src/misc/stringutil.h: no prototypes index/rindex for non-provided functions * src/misc/misc_time.h: providing prototype for timediff * src/main.c: unused variable rflag * src/xspice/mif/mifsetup.c: no c++ comments 2007-11-14 Dietmar Warning * src/frontend/inp.c: No title message to stderr - stdout is enough * src/frontend/spiceif.c: reenable INPkillMods after deck processing * src/spicelib/parser/inpdomod.c: til now only bsim4 has version processing 2007-11-13 Paolo Nenzi * src/spicelib/devices/dev.c: As suggested by Alberto Lucchini and Francesco Nizzi I have masked the debug information on xspice device loading with #ifdef TRACE. 2007-11-12 Paolo Nenzi * src/frontend/inp.c: corrected option processing. Now "scale" option is special and is processed before netlist parsing. The implementation is not very clean. 2007-11-04 Dietmar Warning * configure.in, src/Makefile.am, src/spicelib/devices/Makefile.am, src/spicelib/parser/inpgmod.c, src/spicelib/parser/inp2m.c BSIM4 has changed (based on Phil Barker patch): version code 4.2.1/4.3.0/4.5.0 added 4.4.0 small corrections 4.6.0 updated to 4.6.1 2007-10-12 Paolo Nenzi * src/frontend/{cpitf.c, inp.c, miscvars.c}, src/spinit.in: reimplemented "brief" option as a boolean and defaulted to TRUE. Now the netlist is not printed anymore when you load a circuit. For the original behavior uncomment "unset brief" in the spice init file. 2007-10-11 Paolo Nenzi * src/main.c, src/frontend/{inpcom.c, miscvars.c}: added option -a and --autorun to add the control section ans run the loaded netlist. In the original implementation by Phil Barker, the loaded circuit was always run, both in interactive and batch mode. 2007-10-09 Paolo Nenzi * src/frontend/{device.c, miscvars.c}: added "altshow" option to enable the new (Phil Barker) version of the show command. The old show command looks better in interactive mode while the new format is more suitable for automatic processing of the data. * src/maths/ni/niiter.c: added check on iteration numbers (Phil Barker). 2007-10-09 Paolo Nenzi * src/frontend/cktdojob.c: Chenged of reporting analysis temperature from Kelvins to Celsius (as suggested from Phil Barker). * src/spicelib/parser/inp2m.c: Added model binning code left out in the previous commit. * src/frontend/variable.c: Added SIMVARS from Phil Barker. * src/frontend/{outitf.c,runcoms2.c}, src/include/cpextern.h: Patch from Phil Barker. * src/frontend/subckt.c: allow for .ic, .nodeset names to be embedded in a subckt;enhanced subckt.c to created appropriate node names for flattened simulation netlist (Phil Barker). * src/spicelib/devices/cap/cap.c: aliased capacitance parameter with "c" and "cap" (patch from Phil Barker). * src/spicelib/devices/res/res.c: aliased some parameters. Originally got the patch from Phil Barker but used IOPR (redundant) instead of IOPZ. * src/spicelib/devices/res/resparam.c: Added fix for zero valued resistors (Phil Barker). * src/spicelib/devices/vsrc/{vsrc.c, vsrcacct.c, vsrcask.c, vsrcdefs.h, vsrcload.c, vsrcpar.c, vsrctemp.c}: Added "repeat" parameter to the PWL model. * src/xspice/icm/analog/multi_input_pwl/*: added new element from Phil Barker: added new multi-input gate VCVS using XSPICE extensions that supports nand, and, nor, or. Currently only supports 2-inputs (x,y). The x's and y's represent the piecewise linear variation of output as a function of input. Only 1 input determines the state of the outputs: and/nand: controlling input is chosen on the basis of the smallest value, or/nor: controlling input is chosen on the basis of the largest value. 2007-10-08 Paolo Nenzi * src/main.c, src/frontend/{spiceif.c, spiceif.h, subckt.c}, src/include/{fteext.h, inpdefs.h}, src/spicelib/parser/{inp.h, inp2dot.c, inpdomod.c, inpfindv.c, inpgmod.c}: other improvements by Phil Barker: - Added model binning function - Added model version function - enhanced the interactive command 'alter' to allow for changing the model of a device 2007-10-08 Paolo Nenzi * src/frontend/{inp.c, inpcom.c, inpcom.h, measure.c, nutimp.c, runcoms.c subckt.c, ftedefs.c, fteext.c, dctran.c, inp2dot.c, inppas2.c}: added several improvements mad by Phil Barker: - .measure statements: trig/targ, max, min, avg, rms, integral, param - autostop option: which causes the simulation to stop if all .measure statements are satisfied; option is ignored if any max, min, avg, rms or integ measurements defined. - fixed some floating point number comparisons where the code was checking for equality with '==' by adding a routine called 'AlmostEqualUlps'. - parametrized subcircuits - added support for ".lib" syntax - added ability to recursively call spice netlist parser; this allows for reading in additional .include and .lib files defined in other netlist files - changed the flattened netlist names created in 'subckt.c' to match other spice simulators 2007-10-08 Paolo Nenzi * src/frontend/{rawfile.c, outitf.c, runcoms.c}, src/include/ftedefs.h: modified current vectors output amd added struct elements for holding the name of the last analysis run (all from Phil Barker patch). 2007-10-08 Paolo Nenzi *src/frontend/{device.c, device.h}: modified 'show' command to match SmartSpice syntax from Phil Barker patch. 2007-10-08 Paolo Nenzi * src/frontend/plotting/plotit.c, src/frontend/{nutimp.c, parse.c}, src/maths/ni/{niconv.c, niiter.c}, src/spicelib/analysis/dctran.c: Applied patch from Phil barker, iproved error/warning reporting. 2007-10-08 Paolo Nenzi * src/frontend/numparam/{general.h, mystring.c, numpaif.h, numparam.h, nupatest.c, spicenum.c, washprog.c, xpressn.c}: Applied patch from Phil Barker that improves the capabilites of numparam library. Now numparam supports fully parametrized netlists and can handle a larger set of parameters than the previous implementation. Added 'nupa_add_param' routine and ability to reevaluate parameter set using 'nupa_eval' by keeping parameter value set. Added support for 'ternary' operators in parameters as well as 'max' and 'min'. 2007-09-17 Paolo Nenzi * src/frontend/com_let.c: Applied patch from Friedrich Schmidt to fix the big in let command that prevented the following command to be correctly interpreted: let vec=vector(10) let vec[2]=5.0 and returning an error instead. The patch has been submitted by Friedrich Schmidt. 2007-09-14 Paolo Nenzi * src/frontend/inp.c: fixed a bug in com_list() that skipped a line number when in displaying the ".end" line. I just moved the line increment at the end of the for cicle (after the instruction that skips the ".end" line). 2007-09-12 Dietmar Warning * src/frontend/terminal.c: fixed segmentation fault occurring when messages >4096 bytes are sent to out_printf() function. The fix uses asprintf if available. 2007-08-12 Paolo Nenzi * src/frontend/inpcom.c: fixed segmentation fault with empty .include file or directory include. This is a hack the full inpcom shoud be rewritten. 2007-06-17 Gong Ding * src/spicelib/devices/dev.c: use a more flexiable way to define device. If it doesn't work, one can returen to old version (rename as dev_old.c). These files are modified for avoiding NULL DEVices[] pointer. * spicelib/analysis/acan.c: * spicelib/analysis/cktdest.c: * spicelib/analysis/cktdisto.c: * spicelib/analysis/cktdump.c: * spicelib/analysis/cktfbran.c: * spicelib/analysis/cktic.c: * spicelib/analysis/cktload.c: * spicelib/analysis/cktnoise.c: * spicelib/analysis/cktop.c: * spicelib/analysis/cktpzld.c: * spicelib/analysis/cktpzset.c: * spicelib/analysis/cktsetup.c: * spicelib/analysis/ckttemp.c: * spicelib/analysis/ckttrunc.c: * spicelib/analysis/ckttyplk.c: * spicelib/parser/inptyplk.c: The modifications should not affect ngspice's function. 2007-06-14 Paolo Nenzi * src/misc/misc_time.c: added a casting to doube in seconds function to solve the "negative times" in acct command. 2007-05-13 Paolo Nenzi * src/spicelib/devices/dev.c: updated NUMDEV to reflect actual situation. * src/spicelib/devices/adms/admst/ngspiceVersion.xml: added code for ekv. 2007-05-11 Laurent Lemaitre * src/spicelib/devices/adms/admst/ngspiceMODULEguesstopology.c.xml, src/spicelib/devices/adms/admst/ngspiceVersion.xml, src/spicelib/devices/adms/admst/ngspiceMODULEdefs.h.xml: added support to "div" builtin function. 2007-05-09 Dietmar Warning * src/spicelib/devices/dev.c: reserved space for ekv model. 2007-05-08 Dietmar Warning * src/spicelib/devices/amds/ekv/: Initial import of the ekv model (long channel). 2007-05-06 Dietmar Warning * src/spicelib/parser/inpdomod.c: small adaptation for ekv and psp102. 2007-04-30 Gong Ding Add NDEV (numerical device) to device library. It is an interface to call my 2d semiconductor simulation code via network. The device simulation code can be found at http://gss-tcad.sourceforge.net * src/spicelib/device/ndev/*.* : The NDEV implement code * src/spicelib/device/dev.c : Add ndev to spice device library * src/spicelib/parser/inppas2.c : Add element name 'N' to describe NDEV * src/spicelib/parser/inp2n.c : Routine to parse NDEV element * src/spicelib/parser/inpdomod.c : Routine to parse NDEV model * src/frontend/misccoms.c : When quit, call CKTdestroy function * src/spicelib/analysis/dctran.c : Show a time process indicator * src/ciderlib/oned/onedest.c : Fix a invalid memory read problem * src/frontend/terminal.c : change to 2007-04-26 Paolo Nenzi * src/spicelib/devices/bsim4/: updated bsim4 model to 4.6.0. 2007-04-25 Paolo Nenzi * src/spicelib/parser/{inp2m.c, inpdomod.c}, src/spicelib/devices/dev.c, src/spicelib/devices/adms/psp102/: added support for psp102 model. 2007-04-24 Laurent Lemaitre * src/spicelib/devices/adms/admst/: updated templates for adms 2.2.5. 2007-01-21 Paolo Nenzi * src/spicelib/parser/inp2q.c: Added patch from Hitoshi Tanaka to fix error in old BJT devices (that do not have fifth node). 2006-02-21 Paolo Nenzi * src/frontend/subckt.c, src/spicelib/parser/inp2q.c, src/spicelib/parser/inpdomod.c: Added fifth node on bipolar devices (Dietmar Warning) to support newer (adms) models. Updated number of nodes for subcircuits. 2006-02-19 Paolo Nenzi * tests/bin/check.sh: added patch from Gary R. Van Sickle . CYGWIN system is recognized as an UNIX flavour (for testing). 2006-02-17 Paolo Nenzi * src/spicelib/devices/dev.c: Added support for adms devices (Dietmar Warning). Devices implemented: hicum0 and mextram. 2006-02-16 Paolo Nenzi * src/spicelib/devices/dev.c: removed EKV ifdefs. In future versions of ngspice EKV (and other models) will be introduced as verilog-a models. 2006-01-31 Paolo Nenzi : * Committed the admst tree from the adms system. Laurent Lamaitre sent the XML code needed to generate ready-to-compile C code conforming to ngspice api from Verilog-AMS compact model description. Files changed: src/spicelib/devices/Makefile.am: added adms directory to DIST_SUBDIRS target. Files added: README.adms, src/spicelib/devices/adms/, src/spicelib/devices/adms/admst/, src/spicelib/devices/adms/admst/{COPYING, ngspiceMakefile.am.xml,ngspiceMODULEacld.c.xml, ngspiceMODULEask.c.xml, ngspiceMODULE.c.xml, ngspiceMODULEdefs.h.xml, ngspiceMODULEext.h.xml, ngspiceMODULEguesstopology.c.xml, ngspiceMODULEinit.c.xml, ngspiceMODULEinit.h.xml,ngspiceMODULEitf.h.xml, ngspiceMODULEload.c.xml, ngspiceMODULEmask.c.xml, ngspiceMODULEmpar.c.xml, ngspiceMODULEpar.c.xml, ngspiceMODULEsetup.c.xml,ngspiceMODULEtemp.c.xml, ngspiceVersion.xml} 2005-12-06 Dietmar Warning * src/spicelib/devices/hisim/hsm1ld.c: Variable tmp is really used only for flag swapping - because make she int. Some better reading in comments. 2005-12-04 Paolo Nenzi * src/spicelib/devices/bsim4/b4ld.c: As written by Dietmar, the changes introduced into this file around line 4015 - 4020 are wrong. Back to original Berkeley's code. 2005-12-02 Paolo Nenzi * src/maths/cmaths/test_cx_ph.c: added a missing include (patch by Paul Reich). * src/maths/sparse/spconfig.h: removed include directive (ngspice.h). * src/frontend/numparam/general.h, src/maths/ni/niiter.c, src/spicelib/devices/csw/{cswload.c, cswmpar.c}, src/spicelib/devices/hfet1/{hfetload.c, hfetsetup.c}, src/spicelib/devices/hfet2/{hfet2load.c, hfet2setup.c}, src/spicelib/devices/hisim/hisim.h, src/spicelib/parser/ptfuncs.c: partially applied Paul Reich patch that removed C++ style comments. 2005-11-27 Paolo Nenzi * Added manual page for ngmultidec. The man page has been written by John Murdie. 2005-11-13 Paolo Nenzi * src/spicelib/devices/bsim4/*: Updated bsim4 to version 4.5.0 using the code hacked by Hitoshi Tanaka and Dietmar Warning. Changes from original Berkeley's device group implementation: - Added multiplier parameter (m parameter). - Added NodeSet for internal nodes. - Removed #ifdef STDC and non STDC function prototypes - Added missing "pParam->BSIM4ku0we" to fprintf in b4temp.c. * src/spicelib/devices/bsim4/b4temp.c: fixed the following bug (Dietmar Warning): - Freed old node adding FREE(model->pSizeDependParamKnot); near line 146. * src/spicelib/devices/bsim4/b4set.c: fixed the following bug (Dietmar Warning): - Removed double testing for model->BSIM4prtGiven. * src/spicelib/devices/bsim4/b4ld.c: fixed the following bugs: - In the computation of ggts and ggtd near line 4014 here->BSIM4gcrgd and here->BSIM4gcrgs were exchanged. (Dietmar Warning). - In the computation of gcqdb and gcqsb near line 4019 here->BSIM4cqsb and here->BSIM4cqdb were exchanged (Hitoshi Tanaka). 2005-11-07 Paolo Nenzi * src/spicelib/devices/vbic/*: Dietmar Warning sent a patch to his last vbic implementation: - Added temperature dependence for RB and RC, - fixed a bug in current sign (reversing vbei and vbci), - removed double allocation of substrate node. 2005-10-19 Steven Borley * src/Makefile.am: Implemented fix to prevent 'multiple definition' errors during link of nghelp when built on systems that use the latest versions of the GNU tools. Solution provided by Andreas Unger . 2005-10-15 Steven Borley * src/frontend/spiceif.c: Fixed code to avoid errors (invalid lvalue in assignment) under gcc v4.0.2 or and warnings under gcc 4.0.0 (target of assignment not really an lvalue). 2005-10-15 Steven Borley * INTALL: Improved notes for MinGW/MSYS * src/frontend/resource.c: Fixed problems of reporting resource usage for MacOSX (should help other platforms too). * src/frontend/terminal.c: Fixed warning about unused variables and functions that can occur when HAVE_TERMCAP is undefined. * src/spicelib/devices/isrc/isrcload.c and vsrcload.c: Implemented patches supplied by Andreas Unger . Fixes XSpice bug; variable PER was being used before initialisation. 2005-09-19 Steven Borley * xgraph/idraw.c, xgraph/tgif.c and xgraph/xtb.c: Added missing system header includes (string.h and stdio.h) to avoid warnings. * src/frontend/aspice.c: Used (void*)0 instead of 0 for the terminating vararg, to avoid gcc 4.0 warning about missing sentinel in function call. * src/frontend/aspice.c: Resolved Bug 1293746 - Problem with aspice.c(171) in gcc (Solaris). * src/frontend/display.c: Fixed warning about redefinition of XtNumber. 2005-09-09 Steven Borley * Reverted to placing the cp_* stream variable definitions back in to src/frontend/streams.c with their extern declarations in src/frontend/streams.h 2005-09-08 Steven Borley * Added hard-coded paths for NGSPICEBINDIR and NGSPICEDATADIR for MinGW targets (src/conf.h) 2005-09-08 Paolo Nenzi * src/frontend/streams.{c,h}: applied Hitoshi's fix for undefined symbols when compiling ngspice under Linux. 2005-09-06 Steven Borley * Fixed alphabetic order in AUTHORS * Adjusted autogen.sh to give more relevant advice when a required program is missing. * Added ngspice.idx to MAINTAINERCLEANFILES in src/Makefile.am * Added work-round for missing scroll bar in help windows for an X11 display (seems to be an X-Windows bug) src/frontend/x11disp.c * Fixed memory leak in tilde expansion - src/frontend/parser/glob.c * Fixed spelling errors in tests/README * Implemented fix as described by Hitoshi Tanaka for the problem that causes "Warning - approaching max data size...." to be erroneously reported when compiled with MinGW/MSYS src/frontend/resource.c 2005-09-04 Paolo Nenzi * src/spicelib/devices/ltra/{ltraload.c, ltraacld.c, ltratrun.c}: Applied Hitoshi's patches to fix ltra code. The bug produced a "Timestep too small" in simulations and uninitialized variables produced wrong results in some files under MinGW. * src/spicelib/parser/inp2d.c: Fixed a bug that causes an "unknown parameter(save)" error if there is the expression like the following in the netlist of Cider analysis. D1 1 2 M_PN AREA=100 save (Fix from Hitoshi Tanaka). * src/frontend/streams.c: Fix to a bug that caused crash when I input "listing" command after loading Cider examples under Ngspice compiled by Visual C++. (Fix from Hitoshi Tanaka). 2005-08-30 Paolo Nenzi ============================ Rework-17 ================================== * src/frontend/numparam/Makefile.am: added missing include that prevented its dist-ribution. 2005-08-29 Paolo Nenzi ============================ Rework-16 ================================== 2005-08-26 Paolo Nenzi * src/fronted/dotcards.c: expressions were not parsed correctly, the bug was in the offset from string base: corrected. 2005-08-23 Paolo Nenzi * src/xspice/icm/xtradev/aswitch/cfunc.mod: Added minimum on resistance for aswitch to avoid unreasonable high values (due to near zero resistance) in current of connected voltage source. Change supplied by Hitoshi Tanaka. * src/xspice/icm/{cfunc.mod}: updated cfunc.mod files. Changes sent by Hitoshi Tanaka. 2005-08-22 Paolo Nenzi * src/frontend/plotting/x11.c: removed casting in a macro. It conflicts with the strictier syntax of recent gcc compilers. 2005-08-15 Steven Borley * Yet more changes to the doc build system - see doc/ChangeLog for details * In INSTALL added --enable-maintainer-mode as an argument to ./configure when building straight from CVS. This is now necessary due to the use of version.texi to allow versioning info to be passed into the documentation system. 2005-08-14 Steven Borley * More changes to the documentation. Specifically the make dist now produces a PDF file. See doc/ChangeLog for details * Update the AUTHORS file and adjusted formatting to make it more compatable with the texinfo include 2005-08-11 Steven Borley * Fixed problem with text2dvi and makeinfo when running make dist * Corrected many spelling errors in doc/ngspice.texi 2005-08-08 Paolo Nenzi * src/frontend/dotcards.c: Applied patch from Mike Waters to parse probes in the form: vm(4,0) or vm(0,4). Where one of the nodes is ground ie. 0, if the probe is "v" everything works but anything else ie. "vm", "vp", etc. fails. 2005-08-06 Paolo Nenzi * src/xspice/mif/mifsetup.c: Updated MIFunsetup to the latest version provided by Hitoshi Tanaka. 2005-08-04 Paolo Nenzi * Fixed a bug in memory management of xspice/ngspice that caused segmentation fault for codemodels that adds their own states to the state vector. Changes supplied by Hitoshi Tanaka (HDA01055@nifty.com): * src/math/ni/niiter.c: removed the first malloc for OldCKTstate0 since the number of states can be altered by xspice code models. This was already addressed in the past but this line remained. * src/xspice/mif/mifsetup.c: added MIFunsetup() to conform to spice3f devices model interface (xspice was based on spice3c1). * src/xspice/xspice.c, src/xspice/cm/cmexport.c, src/xspice/cmpp/writ_ifs.c: changed the entry corresponding to the unsetup function from NULL to MIFunsetup. * src/include/mifproto.h: added prototype for MIFunsetup. * src/spicelib/analysis/cktsetup.c: cleared node if initial condition of nodeset are given to fix a segfaults on second run of xspice netlists. 2005-06-30 Paolo Nenzi * src/frontend/resource.c: added IPC stuff * src/spicelib/parser/inpptree.c: fixed bug in power function. 2005-06-25 Paolo Nenzi * src/spicelib/analysis/acan.c: modified original integration of xspice event driven algorithm into spice3 code. Now CKTncDump() is used by xspice too. * src/spicelib/analysis/cktdojob.c: added ipc stuff. * src/spicelib/analysis/cktload.c: cosmetics. * src/spicelib/analysis/cktop.c: modularized the source and gmin stepping algorithm. I have extracted the code for gmin and source stepping to improve CKTop readability and maintainability. * src/spicelib/analysis/dcop.c: added event driven algorithm and ipc stuff. * src/spicelib/analysis/dctran.c: added xspice breakpoint control. * src/spicelib/analysis/dctrcurv.c: added event driven algorithm and ipc stuff. 2005-06-12 Steven Borley * Changes supplied bt Hitoshi Tanaka to allow XSpice to compile using MinGW in Windows. Main change points are as follows: (1) dlopen(), dlsym(), dlclose() and dlerror() were changed to the functions of Windows. (src/spicelib/dev.c) (2) The functions relation to IPC were removed. (src/xspice/ipc/ipc.c, and src/xspice/ipc/ipcsockets.c) 2005-06-09 Steven Borley * Fixed *# command operation (src/frontend/inp.c) * Added 'hack' to allow the 'numparams' variable to be set (or unset) before the netlist part of a file is parsed. This is based on code supplied by Dietmar Warning, with changes to allow it to work with the *# syntax, the unset keyword and variable amounts of white space. (src/frontend/inp.c) * line_free(line,flag) is now a macro so that line is set to NULL when it is freed. (src/frontend/inp.c) This is a safty mechnism. 2005-05-31 Steven Borley * Applied fix for logging supplied by Dietmar Warning (src/main.c) * Miscellaneous tidying in src.main.c for format, indentation, #include style ("" vis-a-vis <>) and removal of some compile time warnings. 2005-05-30 Steven Borley * Corrected return types (where necessary) for the functions that make up the devices[] array initialised in src/frontend/display.c, and used specific #includes rather than extern references. Added new headers as required. * Moved jbuf from src/main.c to src/frontend/signal_handler.c * Tidy up of the header files in src/frontend and sub-directories. Motivation is to remove extern declarations within .c files and place in .h files. New header files where necessary. 2005-05-28 Steven Borley * Fix bug introduced in my last change. Fix supplied by Hitoshi Tanaka. Bug can cause a segmentation fault. * Fixed the format of section 5.3.37. Save* in src/ngsoice.txt * In src/frontend/plotting replaced extern references in .c files wiith #include of suitable header files. * Added src/frontend/numparam/numpaif.h for the external interface to the numparam library. 2005-05-26 Steven Borley * Fixed bug with define (see bug reference [ 999546 ] 'define' is broken in ngspice-15). * Fixed bug with 'plot title title_name' (see bug [ 557638 ] plot segmentation fault). 2005-05-23 Steven Borley * Fixed a divide-by-zero bug in the MOS level=2 device model the fix was supplied by Hitoshi Tanaka. * Fixed a 'core-dump' that could be caused by the interactive 'write' command when the plot contains more than one dimension. This was due to improper use of a buffer in rawfile.c as pointed out by Dietmar Warning. Bug also affected ngsconvert. 2005-05-22 Steven Borley * src/frontend/numparam/mystring.c - fix for MinGW from Hitoshi Tanaka. * various files - removal of more warning due to unused variables 2005-05-21 Steven Borley * src/spicelib/devices/vbic/vbicinit.c Fixed a structure initialisation problem that occurs when cider is enabled. Also fixes lots of warning within ciderlib related to unused variables. * Fixed a compile warning in src/frontend/com_history.c when readline or editline are used. * Removed the files src/misc/terminal.h/.c and src/include/terminal.h The first two were empty and the last just included the second. The relevant makefile.am files have been updated, so a ./configure will need to be re-run before building. * Fixed problems where printf format was int yet on some systems the argument is long (due to size_t being long). Fixed by always using long format and casting to long. Affected src/frontend/spiceif.c and src/misc/alloc.c This makes obsolete the IS_SIZE_T_LONG macro that defined by configure.in, now removed -it was not working for all platforms (eg. MacOSX) * configure.in - Removed IS_SIZE_T_LONG (see above). Now only test for ncurses etc., when either Readline or Editline are being used. This will fix the basic problem of building on MinGW which does not have these libraries as standard. Fixed the typo in the AC_REVISION() macro. 2005-05-20 Steven Borley * nghelp now uses src/conf.c for consistency with ngspice and ngnutmeg. Under MinGW the nghelp window is now kept open until a key is pressed. This allows users to see any error messages before the system closes the window. * src/conf.c now uses PACKAGE_VERSION (was VERSION) and PACKAGE_BUGREPORT (was hard coded in file to "ngspice-bugs@lists.sourceforge.net"). These values are set by the AC_INIT macro in configure.in * src/winmain.c - changes to fix warning when compiled with gcc 2005-05-19 Steven Borley * Fixed declaration of oflag in winmain.c - fix from Dietmar Warning * Fixed compile of makeidx for MinGW. 2005-05-18 Steven Borley * Reverted src/spicelib/devices/restemp.c to previous version. Changes in this file were intended for temporary debug and should not have been committed to CVS. * Moved isnan() to src/misc/missing_math.c from src/spicelib/devices/dev.c following suggestion from Dietmar Warning. Also took opportunity to fixed a compiler warning in dev.c * Conversion of files containing non-ASCII characters (German language comments) to ASCII by Dietmar Warning. 2005-05-18 Steven Borley * I erroneously omitted a few changes from Dietmar Warning: Fix to src/maths/cmaths/Makefile.am to exclude test programs that don't compile under MinGW. Fix to src/spicelib/devices/dev.c to exclude local isnan() when it exists as a library function. * Fixes to src/Makefile.am to exclude programs that don't compile under Windows (MinGW). Fix to avoid dependence problem with linking in winmain.o 2005-05-17 Steven Borley * Updates configure.in. Notably this removes the need for acconfig.h (the use of which is deprecated by autoconf). Most of the remaining changes just tidy with the aim of following guidelines in the autoconf manual. Fixed an issue with CFLAGS usage and --disable-debug. Some fixes aimed as support for MinGW (more to follow). * Removed acconfig.h (see above for reason). * Updated various file to allow build using MinGW. Affected files: src/main.c, src/nghelp.c, src/frontend/evaluate.c, src/frontend/resource.c, src/frontend/signal_handler.c, src/frontend/wdisp/windisp.c, src/frontend/wdisp/winprint.c, src/include/macros.h These changes mostly supplied by Dietmar Warning. Highlights: macros used for sigjmp_buf (JMP_BUF), sigsetjmp (SETJMP) and siglongjmp (LONGJMP); Fixed problem of duplicated definition of BOOL. Adjustments to allow ngnutmeg to compile with a Windows frontend. 2005-05-11 Steven Borley * Changed line-ending on several files from DOS to UNIX. * Translated German in to English in comments for several files (where the German was simple and meaning clear from the context - and Babel fish helped too). This also removes the non-ASCII characters from these files, which was giving problems on at least one platform. * In the above files I have also replaced c++ comment style with c comments (i.e. // go to /* ... */). 2005-05-10 Steven Borley * Some minor tidy-up as follows: - Added missing .cvsignore files in many source directories. - Added #ifdef CIDER...#endif around fields in structure initialisation of nbjt, nbjt2, numd, numd2 and numos - this is strictly unnecessary as these devices are only used when CIDER is defined but it keeps symmetry with other devices. - Added some extra TRACE debug statments in in the parser * Added conditional on the ngspice program to prevent errors when spiceinit file is used with ngnutmeg (spiceinit.in) 2005-05-10 Paolo Nenzi * src/spicelib/devices/isrc/*,src/spicelib/devices/vsrc/*: added XSPICE extensions: PHASE parameter and current in isrc. Added AM transient function (Amplitude Modulation): AM (sig_ampl offset_const mod_freq carrier_freq t_delay) The waveform will follow: value = sig_ampl*{offset_const + SIN(2*PI*mod_freq*(t-t_delay))}* SIN(2*PI*carrier_freq*(t-t_delay)) As an example you can use: V1 1 0 AM(10 1 1K 100 1M) R1 1 0 1 2005-05-09 Steven Borley * Added new syntax to the the resistor card to support different style temperature dependence (from Hitoshi Tanaka ). Syntax forms now include: Rxxx n2> TC= Rxxx n2> TC1= Rxxx n2> TC1= TC2= Rxxx n2> TC= The the first pair are equivalent, and the last pair are equivalent. 2005-05-07 Steven Borley * Added support for the BSD licensed editline library This includes a work-around to fix a problem found in the current version of this library (see prompt() in src/main.c). * Added and updated infomation in the INSTALL file. 2005-05-06 Steven Borley * Added code by by H.Tanaka for the .global keyword. This is enabled by supplying the new --enable-dot-global argument to ./configure. * Also added configuration for a new --with-editline=yes|no argument to ./configure for future support of the BSD editline library as an alternative to the GNU readline library. 2005-05-05 Steven Borley * Fixed a compile problem with Xspice on Cygwin. Still will not link, but it's a step in the right direction. 2005-05-04 Steven Borley * Fixed issues with the alternate prompt (src/main.c, src/frontent/control.c and src/include/cpextern.h) - a format problem when used with readline and a buffer overrun. Also reduced max number of chevrons to 16 and added + at start when command stack is holding than 16. * Translations for German comments provided by Dietmar Warning, to fix issue with UTF-8 observed on Windows (src/main.c) * Fixed readline operation within ngnutmeg (src/main.c). Also include some minor tidy-up to avoid some compiler warnings. Updated copyright date for --help. 2005-04-29 Paolo Nenzi * src/frontend/inpcom.c: end-of-line comments starting with the "$" (dollar) sign can be confused with a variable. To avoid this, the new syntax for such and-of-line comment is: $ (the space is mandatory). Patch sent from Steven Borley . 2005-04-26 Paolo Nenzi * src/main.c, src/frontend{inp.c, nutinp.c}, src/include/defines.h: New logic for ngspice initialization (patch from Steven Borley ): Load the standard start up file 'spinit' Then look for '.spiceinit' in current directory If this fails look for 'spice.rc' in currect directory if this fails the check the HOME environment variable if HOME is set then: Look for for '.spiceinit' in user's home directory If this fails look for 'spice.rc' in user's home directory. Fixed a memory leak in main.c * src/include/{complex.h, fteext.h, ngspice.h, sperror.h}: code cleaning and removed some warning (patch from Steven Borley). 2005-04-25 Paolo Nenzi * src/frontend/numparam/{general.h, numparam.h, nupatest.c, spicenum.c, washprog.c, xpressn.c}: Applied patch from Steven Borley . The patch removed the numparam support for end-of-line comments and moved it into frontend code. Line buffer for numparam is increased from 250 to 1000 to accomodate large model cards. Fixed compilation on Cygwin and MacOSX. * src/frontend/subckt.c: numparams, once compiled in, must be enabled, during interactive session, using "set numparams". Since library is experimental and under continuos testing, it is not yet intended for general use and support is provided for interactive sessions only (patch from Steven Borley). * src/frontend/{device.c, spiceif.c}: fixed case sensitivity problems in key-word identification (patch from Steven Borley). * src/frontend/inp.c: Fix a bug where the wrong argument to 'listing' would error, but still produce a listing (patch from Steven Borley). * src/frontend/inpcom.c: From Steven Borley patch: End-of-line comments have been fixed and can be used on a line that is followed by a continuation line. This functionality has been moved from the numparams library and in to the front end code. All the following can be used to start a comment: ; and $ for compatibility with other simulators // like C++, and as per numparams -- as per numparams This was a full re-write of this code, not a conversion of the numparams code. It is not dependent on the numparams library. * src/frontend/resource.c: Fixed a compile bug under window & cygwin (patch from Steven Borley). * src/frontend/plotting/x11.c: Applied patch from Steven Borley. * src/spicelib/analysis/cktsetbk.c: Added some code to track breakpoints (you need to define TRACE_BREAKPOINT macro). 2005-04-16 Paolo Nenzi * src/frontend/{subckt.c, inpcom.c}, src/frontend/numparam/{general.h, mystring.c, readme.txt, spicenum.c, xpressn.c}: Applied patch from Steven Borley that fixed numparam library. Patch description follow (extracted from Steven's message): > Fixes problem with logfile not being opened before we have something to write to it, > Renamed round() and trunc() to avoid clash with functions in math.h, > Numparam now only stops execution when it finds errors, > Added some debug tracing (normally off), > Added some debug tracing (normally off), > Fixes a #ifdef that had a typo and thus stopped numparams, working, > Renames a local variable to avoid confusion (of the developer/maintainer), > Fixes the renumbering of lines from a .include file. * examples/numparam/{example.cir, pintest.cir,pin.mod}: added netlists sent with Steven's patch. * src/frontend/subckt.c: Added fix sent by Hitoshi Tanaka . Now nodes starting with the letter "v" in subcircuits are translated correctly (as internal nodes) and not as voltage sources v. * src/xspice/cmpp/pp_lst.c: malloc did not consider the null terminating character in "path". Applied patch from Mac OSX patch file maintained by Khairulmizam Samsudin . * src/xspice/icm/makedefs.in: Mac OSX requires different flags for shared libraries linking. Applied patch from Mac OSX patch file maintained by Khairulmizam Samsudin . 2005-04-06 Paolo Nenzi * src/frontend/subckt.h: Since inp_numnodes has been declared static the prototype has been removed. 2005-04-04 Paolo Nenzi * src/frontend/subckt.c: Applied patch from Steven Borley that fixes a bug in model name translation that shows in nested subckts reported by Hitoshi Tanaka (for which he sent a patch that was supersed by Steven's one). * configure.in: As Stuart Brorson suggested now the garbage collector library is compiled only on explicit request by the user. 2005-03-20 Paolo Nenzi * src/spicelib/analysis/cktntask.c: The default parallel multiplier (m=1) for mosfet levels 1, 2, 3 and 9 was not set in interactive analyses. Applied fix sent by Steven Borley . * Changed value of trtol to 1 when xspice extensions are compiled (as in xspice source code). 2005-03-17 Paolo Nenzi * src/main.c: Applied patch sent by Steven Borley that removed the duplicate declaration application_name and gnu_history_file, removed the "static" keyword in shutdown() and set NULL as return value in function prompt() when non prompt is passed to readline(). * src/ngspice.txt: Applied patch sent by Steven Borley that fixed a few errors that corrupted text output. * configure.in: Applied patch sent by Steven Borley that fixes compiler warnings on MAC OSX (related to the linking order of X libraries). The remaining changes fix errors in spelling. * tests/bin/check.sh: Applied patch sent by Steven Borley that added support for Mac OSX and a default case for not (yet) supported architectures. * src/frontend/aspice.c: Applied patch sent by Steven Borley that fixed compiler warnings on Mac OSX in definition of "status". * src/spicelib/devices/bsim3/b3set.c: Applied patch sent by Steven Borley that remove the compiler warnings about ambiguous "else". 2005-03-13 Paolo Nenzi * tests/bin/check.sh: Changed the previous check script with the one supplied by Dietmar warning . This new script adds support for different architectures (MINGW32, Linux, SunOS). * src/spicelib/device/vbic/vbicpzld.c: Corrected an error in pole-zero routine. Dietmar Warning sent the fix. 2005-03-07 Paolo Nenzi * src/spicelib/devices/bsim4/b4ld.c: commented out NEWCONV section. 2005-03-06 Paolo Nenzi * src/spicelib/devices/bsim4: removed uninitialized variables in model files. * src/spicelib/analysis/dctrcurv.c: Dietmar Warning has changed the way the lst point in a dc sweep is computed. This new scheme is more accurate. 2005-02-28 Paolo Nenzi * DEVICES: Updated (again) changing BSIM4 level from 60 to 14 since older model revisions are not yet in ngspice. This is consistent with model developers: newer models are compatible with older ones. * src/spicelib/devices/bsim4/: updated to revision 4.4.0 with "m" parallel multiplier enhancements. Thanks to Mick Tooher and Dietmar Warning for this update. * tests/bsim4/: updated test files for bsim4 4.4.0. The old files have been replaced with new ones coming from BSIM4 site. There are new tests: (*_gedl*) and ro_17.cir. 2005-02-25 Paolo Nenzi * DEVICES: Dietmar Warning (warning@danalyse.de) provided me an updated and corrected version of this file. 2005-02-08 Paolo Nenzi * src/frontend/subckt.c: modified the file with the one supplied by Dietmar Warning's (warning@danalyse.de). This fix the bug that caused ngspice to crash with long subckt lines. 2004-09-05 Paolo Nenzi * src/spicelib/devices/jfet/jfet.c: model type (njf or pjf) was defined as input/output parameter. Now is an input-only parameter, as in other models. * tests/jfet/jfet_vds-vgs.out: Corrected the output after the change in jfet.c. With the old code the number associated to njf or pjf (meaningless) changed each run of ngspice and caused the check process to fail. * src/spicelib/devices/mesa/mesa.c: model type was reported incorrectly. Declared parameter vt0 as "redundant", since it has the same meaning of vto. * tests/mesa/mesa11.out: changed test file output according to changes in mesa.c. Now model type ic correct. 2004-09-01 Paolo Nenzi * src/conf.c: Modified bug reports address. Now it points to a mailing list dedicated to bug reports. 2004-08-29 Paolo Nenzi * src/fronted/aspice.c: Added a define for FreeBSD (from FreeBSD ports archive). 2004-08-22 Paolo Nenzi * src/xspice/enhtrans.c: Removed code introduced by Stuart Brorson to limit parsing of POLY statements to dimension 2. Now functions returns a copy of the error strings that i freed by higher level code once processed and write the error on the expanded netlist (as comments) instead of expanded lines (this fixes a segmentation fault since INPpas1() does not check if the returned line is not null and makes expanded netlist more informative). 2004-08-20 Paolo Nenzi * src/frontend/{gens.h, gens.c, device.c}: Committed another Vera Albrecht's patch for the "show" command. This closes the bug definitively. * src/include/{cktdefs.h, dgen.h, ftedebug.h, missing_math.h, ngspice.h, noisedef.h, sensdef.h}, src/spicelib/analysis/{ckt.h, ckti2nod.c}: committed Vera Albrecht patch to remove some compiler warnings. 2004-08-16 Paolo Nenzi * src/frontend/{device.c, gens.c}: Committed Vera Albrecht's patch to the "show command" I closed on 2004-08-13. Vera's patch is better. 2004-08-15 Paolo Nenzi * configure.in, src/spinit.in: Added a variable in configure.in to decomment codemodels lines in spinit if --enable-xspice is issued in the configure phase. It is a hack but works. 2004-08-14 Paolo Nenzi * src/main.c: The code for -o option contained an error that prevented the correct operation of output redirection. The masking #ifdef has been changed to #ifndef. 2004-08-13 Paolo Nenzi * src/frontend/device.c: "show" command leaked 28 bytes for each group of words since an allocated pointer in line 33 of gens.c was never freed. It is not possible to free allocated memory using that pointer since it is used and its value altered. I used "listdg" copying original pointer value to it and freeing memory using "listdg" instead. There were sone "tfree" that caused problems for incorrect inputs, I have removed them and tested against some bad syntax. Results shows no leaks. * src/spicelibe/devices/{res/resparam.c, cap/capparam.c, ind/indparam.c}: Fixed a bug introduced with m and acResistance parameters. Since show command works as soon as a circuit is loaded, before any call to DEVsetup or DEVtemp is made, some parameters, in this early call showed incorrect results. Simulations are not affected by this bug, but it is annoying. Now principal parameters are display correctly. * src/spicelib/analysis/cktncdump.c: fixed a typo that prevents compilation on some systems. 2004-08-09 Paolo Nenzi * Updated and corrected test files in "tests" directory. Added "examples" directory. * src/spicelib/devices/bsim3/b3set.c: Added Dietmar Warning patch to solve a bug that shows up when acm=2 was used. From Dietmar's mail message: if we use the acm=2 option we must set the nrd and nrs defaults to 0. * src/spicelib/devices/mos3/mos3temp.c: As suggested by Dietmar Warning I removed the >1um limit for the model. 2004-07-08 Paolo Nenzi * Applied Al Niessner negabyte patch that removed all compiler warnings. * configure.in, src/xspice/icm/makedefs.in, tests/Makefile.am, xgraph/aclocal.m4, xgraph/configure.in, xgraph/configure: updated configuration files for autoconf V2.59 automake V1.8. 2004-07-05 Paolo Nenzi * src/frontend/resource.c: added __APPLE__ for mac osx support as in patch sent by Khairulmizam Samsudin * src/spicelib/parser/inpdomod.c: fixed some typos as in patch sent by Khairulmizam Samsudin 2004-06-22 Paolo Nenzi * src/spicelib/devices/vbic: Vbic code updated. Thanks to Dietmar Warning (warning@danalyse.de )now we have the four terminal version of the VBIC model. The old three terminal version has been discarded. 2004-06-21 Paolo Nenzi * src/frontend/subckt.c: patch from Stuart Brorson . This patch adresses the following problem (as written by Stuart): Modified modtranslate and devmodtranslate to fix bug noticed by Liu: codemodel names called out in the device instantiation line ("A1 1 2 3 4 lim") were not translated correctly if they were invoked inside a .subckt. Fix involved explicitly adding code to handle "A" device types when translating the line. SDB 6.18.2004. 2004-05-30 Paolo Nenzi * src/frontend/subckt.c: patch from Dietmar Warning (warning@danalyse.de) to fix memory errors when using very long model card. src/spicelibe/devices/vbic/vbicsetup.c: patch from Dietmar Warning (warning@danalyse.de) to fix vbic behavior. 2004-02-14 Paolo Nenzi * Trimmed the autoconf interfaces. Added dummy ".out" files into many tests subdirectories and modified many Makefile.amS. 2004-02-05 Paolo Nenzi * src/spicelib/analysis/cktntask.c: Bug: not all the values of TSKtask structure were copied and got a correct default value. The bug showed as an infinite loop in gmin stepping. 2004-02-10 Paolo Nenzi * src/frontend/inpcom.c: Applied patch from Dietmar Warning to solve the bug discovered by Jelle Haandrikman: wrong subcircuit expansion when leading spaces are present in the subcircuit netlist. 2004-01-28 Paolo Nenzi * configure.in: changed version to rework15. 2004-01-27 Paolo Nenzi * configure.in: changed version to rework15-pre3 and other small changes for release. * AUTHORS, FAQ: Updates * src/spicelib/devices/bjt/bjtpzld.c, src/spicelib/devices/bjt2/bjt2pzld.c: there was an error in the pole-zero routine. The collector resistance was loaded into the matrix instead of the condictance. * inpdomod.c: Updated HiSIM level to 64. * src/spicelib/devices/vbic/*, src/Makefile.am, src/spicelib/devices/dev.c, src/spicelibe/parser/inp2q.c, src/spicelib/parser/inpdomod.c,src/spicelib/devices/Makefile.am, tests/vbic, contrib/vbic, DEVICES: Added VBIC model from Dietmar Warning . This is the 3 terminal model without excess phase and termal network. 2004-01-26 Paolo Nenzi * DEVICES: updated isrc an vsrc status * src/spicelib/devices{isrc,vsrc}: Cleaned up code * tests/cider: Added example files for cider simulator. 2004-01-25 Paolo Nenzi * configure.in, acconfig.h: Added configure options for the following debug symbols: ASDEBUG, D_DBG_BLOCKTIMES, D_DBG_SMALLTIMES, NEWPRED. 2004-01-23 Paolo Nenzi * xgraph: Added xgraph plotting program. It can be added to the ngspice binaries by adding --enable-xgraph in the configuration phase. 2004-01-21 Paolo Nenzi * src/include/ifsim.h, src/include/cktdefs.h, src/frontend/spiceif.c, src/frontend/shyu.c, src/spicelib/cktntask.c: Applied the options patch made by Charles Williams 2004-01-20 Paolo Nenzi * src/maths/ni/*: Cleaned up code removing unnecessary includes. 2004-01-15 Paolo Nenzi * src/spicelib/devices/{cccs,ccvs,vccs,vcvs}/*: cleaned up the code. * src/spicelib/devices/csw/*, src/spicelib/devices/sw/*: cleaned up the code. * DEVICES: updated switches status. 2004-01-14 Paolo Nenzi * src/spicelib/devices/txl/*: Added TXLunsetup function to allow for multiple simulations. * DEVICES: Updated txl status. 2004-01-11 Paolo Nenzi * src/spicelib/analysis/*: Removed redundant includes. File stdio.h is already included via ngspice.h. 2004-01-10 Paolo Nenzi * configure.in: changed version to rework-15pre2. * src/frontend/{com_history.c, cpitf.c, display.h, evaluate.c, inpcom.c, misccoms.c, parser/glob.c, plotting/x11.c, resource.c, runcoms.c, signal_handler.c, subckt.c, variable.c} src/include/{ftedev.h, ngspice.h} src/misc{ivars.c, Makefile.am, string.c, tilde.c, tilde.h, util.c, util.h} src/{main.c, nghelp.c, ngmultidec.c} configure.in: Applied Stuart's patch tclspice-0.2.14_12-03-2003.diff.gz but with libreadline disabled by default. (Stuart Brorson ). * Fixed makefiles in src/xspice/icm and src/xspice/cmpp to make distclean without barfing. (Stuart Brorson ). * configure.in src/xspice/cmpp/Makefile src/xspice/cmpp/Makefile.in: Make configure automatically set paths for lex yacc and install dir (Stefan Jones ). * src/Makefile.am Makefile.am README.Tcl src/xspice/README src/xspice/icm/README src/xspice/icm/spice2poly/icm_spice2poly/README: Updated to reflect codemodel support is now complete (Stefan Jones ). * src/xspice/ipc/ipc.c: Remove linux specific includes which are not needed (Stefan Jones ). * src/xspice/{Makefile.am,xspice.c} src/xspice/cm/{cmexport.c,Makefile.am}: Moved the xspice library hooks into the cm directory (Stefan Jones ). * src/xspice/enh/enhtrans.c src/xspice/mif/mif_inp2.c: Fixed version from Stuart Brorson , http://www.brorson.com/gEDA/ngspice/ * src/spinit, arc/spinit.in, configure.in: parametrized spinit paths for codemodel devices. * src/Makefile.am, src/ngspice.idx: removed ngspice.idx and make it auto-generated and installed (Stefan Jones ). * src/frontend/aspice.c: Added #ifdef for SOLARIS. * src/include/cktdefs.h: added prototype for NInzIter(). * src/spicelib/devices/cpl/*: Added CPLask and CPLmAsk functions to access device's internals. Added CPLunsetup function to allow for multiple simulations. * DEVICES: updated with cpl changes. 2003-12-31 Paolo Nenzi * src/spicelib/devices/tra/*: Cleaned code. * src/spicelib/devices/ltra/*: Cleaned code. * src/spicelib/devices/urc/*: Cleaned code. * tests/transmission/{cpl*, txl*, ibm*}: Added test files for the kspice's cpl and txl devices. * src/spicelib/devices/cpl/*: Cleaned the cpl code. * src/spicelib/devices/txl/*: Cleaned the txl code. * src/frontend/subckt.c, src/spicelib/analysis/cktdojob.c, src/spicelib/analysis/dctran.c: added some txl an cpl specific code from kspice. * src/spicelib/devices/mesa/*: Added parallel multiplier and "dtemp", pole-zero analysis and parallel code switches. * src/spicelib/devices/mes/*: Added parallel multiplier. * tests/mes, tests/mes/subth.cir: added test netlist for mes devices. * DEVICES: updated documentation including MES, MESA, CPL, TXL, TRA, LTRA and URC changes. 2003-12-30 Paolo Nenzi * src/spicelibe/devices/hfet2/*: Added parallel multiplier and "dtemp" parameters. Added pole-zero analysis and parallel code switches. * src/spicelib/devices/jfet/jfetpzld.c: gspr and gdpr were initialized with Resist and not Conduct, corrected! * src/spicelib/devices/hfet1/*: Added parallel multiplier and "dtemp" to the code. Added the pole-zero analysis and parallel code checks. Corrected a bug in the unsetup function that caused a segfault. * tests/hfet/, tests/hfet/id_vgs.cir, tests/inverter.cir: added hfet test netlists. * DEVICES: updated hfet1 status. 2003-12-27 Paolo Nenzi * src/spicelib/devices/jfet2/*: Added parallel multiplier and "dtemp" parameter. Added Alan's CopyNodeSet, and inserted a missing instruction in JFET2temp (for parallel code). * DEVICES: Updated documentation for JFET2 model 2003-12-26 Paolo Nenzi * src/spicelib/devices/jfet/*: Added parallel multiplier and "dtemp" parameter. * src/spicelib/devices/jfet/jfetload.c: reintroduces the old model code, superseded by Sydney code (Parker Skellern). The code is not used but is left as reference. * DEVICES: Updated jfet status * tests/jfet, tests/jfet/jfet_vds-vgs.cir: added jfet directory and one netlist. 2003-12-24 Paolo Nenzi * src/maths/cmaths/cmath4.c: Applied Vera Albrecht patch to enable interpolate function. * src/frontend/{come_let.c, control.c, evaluate.c, outitf.c, parse.c}, src/frontend/parser/lexical.c: Applied Vera Albrecht patch that fixes ngspice bugs in its control language (c shell). 2003-12-08 Paolo Nenzi * src/spicelib/devices/mos9/*: Added "dtemp" parameters. * DEVICES: Updated MOS9 status. 2003-12-08 Paolo Nenzi * src/spicelib/devices/mos6/*: Added "m" "dtemp" parameters. * DEVICES: Updated MOS6 status. 2003-11-22 Paolo Nenzi * src/spicelib/devices/bsim2/*: Added "m" parameter and noise routine. * DEVICES: Updated file with bsim2 changes. 2003-11-21 Paolo Nenzi * src/spicelib/devices/bsim1/*: Added "m" parameter and noise routine. * DEVICES: Updated file with bsim1 changes. 2003-11-12 Paolo Nenzi * src/spicelib/devices/mos2/*: Added "dtemp" parameter. * src/spicelib/devices/mos3/*: Added "dtemp" parameter. * DEVICES: updated file. 2003-11-11 Paolo Nenzi * src/spicelib/devices/mos1/*: Added "dtemp" parameter. * DEVICES: Updated MOS1 status. 2003-11-02 Paolo Nenzi * doc/ngspice.texi: updated documentation. 2003-10-29 Paolo Nenzi * src/spicelib/devices/bjt2/*: Enhanced bjt level 2 model adding dtemp, parallel mutliplier "m" and support for CIDER multiprocessor compilation. * DEVICES: Updated status of Diode and BJT's. 2003-10-26 Paolo Nenzi * src/spicelib/devices/bjt/*: Improved bjt level 1 model adding dtemp and parallel multiplier. 2003-10-24 Paolo Nenzi * src/spicelib/devices/dio/*: Improved diode model with code sent by Diermar Warning and mine improvements. Forward/Reverse knee currents, periphery effect, temperature corrections of some parameters and parallel multiplier. * doc/ngspice.texi: updated documentation with new diode model. 2003-10-01 Paolo Nenzi * src/spicelib/analysis/noisean.c: fixed an arror that caused segfault when resuming an halted long lasting noise analysis. The source fo this fix is Vera Albrecht * src/spicelib/devices/res/restemp.c: Changed default value for flicker noise exponent to 1.0 (was 0.0), as in others spice devices. 2003-09-27 Paolo Nenzi * src/spicelib/devices/ind/*, src/spicelib/parser/inp2l.c, src/spicelib/parser/inpdomod.c, src/include/defines.h, src/include/const.h: Improved inductor model. Added parallel multiplier, temperature correction and solenoid/toroid model. * DEVICES, doc/ngspice.texi: updated documentation to reflect changes in inductor code. 2003-09-25 Paolo Nenzi * src/spicelib/devices/bsim3/*: Added new multirevision bsim3 code sent by Dietmar Warning. This model implements bsim 3v3.2 up to 3v3.2.4 and has enahnced with ACM. * DEVICES: updated bsim3 status. * src/spicelib/devices/bjt2/*, DEVICES, Changelog: Added bjt2 code sent by Dietmar Warning, containing some fixes over the original code and a new feature: temperature correction of re,rb,rc. * src/frontend/numparam/*, src/frontend/Makefile.am, src/Makefile.am, configure.in, acconfig.h, src/frontend/subckt.c: Added numparam library contributed by Georg Post. This library let users to input parametric netlists in ngspice. Look at readme in library directory. * src/spicelib/analysis/dctrcurv.c: small bug fix. CKTtime was confused with CKTtemp. 2003-09-25 Paolo Nenzi * src/spicelib/devices/cap/*, src/spicelib/parser/inp2c.c, src/include/defines.h, src/include/const.h: enhanced capacitor model. Added temperature dependence, model capacitance and cj computation based on insulator thickness and relative dielectric constant. * doc/ngspice.tex, DEVICES: updated documentation reflecting capacitor model changes. 2003-09-24 Paolo Nenzi * src/spicelib/analysis/dctrcurv.c: Fixed resistance sweep. First point is now correct. A call to CKTtemp was needed in the first point. 2003-09-20 Paolo Nenzi * src/spicelib/devices/res/*, src/spicelib/analysis/nevalsrc.c, doc/ngspice.texi, DEVICES: Added new features to resistors: flicker noise, temperature difference with the rest of the circuit, noiseless resistors. The implementation of dtemp required a change in the nevalsrc.c file in the function that computes the noise densities. Updated documentation. 2003-09-18 Paolo Nenzi * src/spicelib/analysis/dctrcurv.c: Corrected temperature sweep. Initial temp was the circuit temperature and not the start value in the input line. There was a missing call to CKTtemp(). 2003-08-24 Paolo Nenzi * src/maths/sparse/, src/include/complex.h: Added a function needed by CIDER in sparse library and started to isolate as much as possible sparse code from spice, reverting some of the work did in the previous releases. The idea is to design an interface between spice and a generic matrix library. In the future the current sparse code will be upgraded to version 1.4 (http://sparse.sourceforge.net). src/frontend/misccoms.c, doc/ngspice.texi: Modified "version" command to include compilation information when called with the new "-f" option. src/frontend/(parse.c,define.c): Applied Stefan patches that close a memory leak. src/spicelib/parser/inpgmod.c: Patched Stuart INPgetNetTok function to correct a parsing error emerged in pole-zero analysis. 2003-08-14 Paolo Nenzi * configure.in, src/main.c, src/misc/tilde.c, src/misc/tilde.h, src/frontend/com_history.c, src/frontend/misccoms.h, src/frontend/signal_handler.c, src/frontend/plotting/x11.c, src/frontend/parser/glob.c, src/include/ngspice.h: Added Andrew Veliath patch for readline support. Using readline with ngspice IS A VIOLATION OF GPL LICENSE, you have been warned. The final decision is up to you. The patch has been applied in the perspective of changing readline library with libedit. Libedit aims to be a replacement of readline and is covered by BSD license. Libedit is available at the URL: libedit.sourceforge.net. Readline code has been extrapolated from a patch available on http://www.btae.mam.gov.tr/~genc/ngspice/. 2003-08-11 Paolo Nenzi * doc/ngspice.texi: updated documentation. Still incomplete but on the way... * main.c, ngnutmeg.c, ngspice.c, frontend/resource.c, include/bool.h, include/cktdefs.h, include/complex.h, include/defines.h, include/devdefs.h, include/macros.h, include/ngspice.h, maths/cmaths/cmath1.c, maths/cmaths/test_cx_ph.c, maths/ni/nidest.c, maths/ni/nipred.h, maths/ni/nireinit.c, misc/misc_time.c, misc/string.c, misc/stringutil.h, spicelib/analysis/cktdltn.c, spicelib/analysis/cktdojob.c, spicelib/analysis/cktdump.c, spicelib/analysis/cktload.c, spicelib/analysis/cktmknod.c, spicelib/analysis/cktntask.c, spicelib/analysis/cktpzstr.c, spicelib/analysis/cktsens.c, spicelib/analysis/cktsetup.c, spicelib/analysis/cktsgen.c, spicelib/analysis/cktsopt.c, spicelib/parser/inp2d.c, spicelib/parser/inp2m.c, spicelib/parser/inp2q.c, spicelib/parser/inpdomod.c, spicelib/parser/inpgmod.c: Updated code for CIDER integration. * src/spicelib/devices/bsim3v2: removed because the V3.2 code is now in bsim3 directory. * src/spicelib/devices: various enhancements on models. Mainly code cleaning (removed spurious #include ). Added parallel multiplier on some device and corrected implementation of cpl an txl devices. * bdrydefs.h, carddefs.h, ciderinp.h, cidersupt.h, contdefs.h, domndefs.h, dopdefs.h, elctdefs.h, gendev.h, lsort.h, material.h, matldefs.h, meshdefs.h, meshext.h, methdefs.h, mobdefs.h, modldefs.h, numcards.h, numconst.h, numenum.h, numgen.h, numglobs.h, onedev.h, onemesh.h, optndefs.h, outpdefs.h, profile.h, twodev.h, twomesh.h: new include files imported with CIDER. * src/ciderlib/*, src/maths/misc, src/spicelib/devices/nbjt, src/spicelib/devices/nbjt2, src/spicelib/devices/numd, src/spicelib/devices/numd2, src/spicelib/devices/numos: Added CIDER simulator routines, support math functions and numerical devices. * src/spicelib/devices/bsim3soi: added bsim3soi v3.x model * src/spicelib/devices/bsim3v0: added version 3.0 of bsim model. * src/spicelib/devices/bsim3v1a: version 3.1 of bsim model. This model has been hacked by Alan Gillespie. * src/spicelib/devices/bsim3v1s: version 3.1 of bsim model. This model has been hacked by Serban Popescu. * src/spicelib/devices/hisim: added hisim model. 2003-08-06 Paolo Nenzi * Another big commit: Stefan Jones has worked on the xspice part and added some fix from Vera Albrecht. Tclspice 0.2.13 Changelog (applicable parts) follows: 2003-08-01 Stefan Jones * src/xspice/mif/mif_inp2.c: Reverted to version 1.1.2.2 so POLY and codemodels work * src/Makefile.am: Fixed libspice.so dependencies * src/frontend/{com_let.c,device.c,evaluate.c}: more memory leak fixes by Vera Albrecht * configure.in src/xspice/icm/* src/xspice/lib/*.cm src/xspice/Makefile.am : Added some easy to use makefiles for codemodels and reordered Removed binary files Added icm to build list * src/xspice/icm/{analog,digital,xtradev,xtraevt}: added the codemodels from xspice in the same structure as spiceopus * src/frontend/misccoms.c src/spinit src/conf.c configure.in: updated email address for bug reports and package version. 2003-07-25 Paolo Nenzi * src/main.c: Studied Vera's main.d and introduced changes following her advice. * src/frontend/vectors.c: Applied Vera patch. * src/spicelib/devices/bsim3soi_{dd,fd,pd}: Corrected bsim3soi{pd,fd,dd}def.h, owner and states fields were swapped. Thanks to Jon Elngelbert. 2003-07-23 Paolo Nenzi * A lot of changes that touched too many files to mention each one. I have introduced the xspice code into ngspice. I take xspice code from tclspice (0.2.12). Since tclspice started as a branch of ngspice, I have applied the patches developed for it that correcting some bugs common to tclspice and ngspice. What follows is the extract of tclspice Changelog file that describes the changes: 2003-07-18 Vera Albrecht * src/{main.c,tclspice.c} src/frontend/{Makefile.am,control.c,control.h,display.c, dotcards.c, hcomp.c,hpgl.c,outitf.c,parse.c,postcoms.c, postsc.c,runcoms.c, spiceif.c,variable.c,variable.h, parser/complete.c,plotting/pvec.c} src/include/{cktdefs.h,ngspice.h} src/misc/{ivars.c,string.c,stringutil.h} src/spicelib/analysis/{acan.c,ckt.h,dcop.c} src/spicelib/devices/bsim3/b3temp.c src/spicelib/parser/{ifnewuid.c,inp2dot.c,inperror.c} : Memory leaks and some WINDOWS compile fixes. 2003-07-17 Stefan Jones * src/frontend/{subckt.c,vectors.c} src/spicelib/analysis/dctran.c src/spicelib/parser/inperror.c src/xspice/idn/idndig.c src/xspice/mif/mif_inp2.c : More memory leak fixes * configure.in src/xspice/xspice.c : Fix compile problems with garbage collector 2003-07-17 Steven Borley src/spicelib/devices/txl/txlload.c : Fixed duplicate declaration of pool_vi_txl 2003-07-16 Vera Albrecht * frontend/{device.c,parse.c,vectors.c,com_compose.c} : More memory leaks closed in utility commands and functions. 2003-07-16 Stefan Jones * src/frontend/{com_compose.c,cpitf.c,device.c,subckt.c, vectors.c} src/frontend/plotting/plotit.c src/include/ngspice.h src/spicelib/parser/{inp2dot.c,inp2r.c,inpdomod.c,inpdpar.c, inpgmod.c,inppas3.c} : Rest of the serious deck reader leaks, plus fixes for the last batch. 2003-07-15 Stefan Jones * /src/frontend/{com_let.c,com_set.c,evaluate.c,parse.c, variable.c} src/frontend/parser/complete.c : Memory leaks plugged 2003-04-14 Stefan Jones * Make all the devices in src/spicelib/devices be built as archives not shared libraries, and don't install them 2003-06-22 Stuart Brorson * Finally got SPICE2 POLY stuff working. This involved lots of changes in src/xspice/mif and src/xspice/enh. Particular changes were made in: -- MIF_INP2A: re-arranged logic to fix parsing problems. -- two2three_translate: fixed some stupid pointer problems. -- etc. * Revamped src/xspice/icm/ and src/xspice/icm/icm_spice2poly directories to enable build of POLY codemodel. Makefiles were fixed, and some stuff was added to enable cmpp (from SPICE Opus) to build the codemodel precursors correctly. (Note that you need to download and install SPICE Opus to rebuild the codemodel stuff. See src/xspice/icm/README for more details.) * Hacked Makefile.am's for much of the directory hierarchy, particularly for src/xspice/icm and src/xspice/icm/icm_spice2poly to build the POLY codemodel correctly. Note that top level make still doesn't detect changes in the xspice hierarchy; read the NOTES file for a workaround. * Added a SPICE netlist incorporating vendor models with SPICE2 POLYs in tests/TransImpedanceAmp/. Running this model successfully demonstrates that you have built the XSpice POLY codemodel correctly and that life is good . . . . * Moved #define TRACE out of src/ngspice.h and made it a compiler option (-DTRACE) invoked in src/Makefile when making spice.o. 2003-05-02 Stuart Brorson * Added #define TRACE to main.c for use in debugging. Added lots of printf's in the code which are turned on by defining TRACE. This is used to help figure out what the program is doing at each step . . . . . * Added lots of comments all over the source tree. This should help explain what the prog is doing for future hackers. * Fixed parser to allow POLY attributes in dependent sources (major changes in src/frontend/subckt.c, as well as move location of call to ENHtranslate_poly in src/frontend/inp.c) * Fixed bug in device init files (src/spicelib/devices/*init.c) so that Deviceinfo structures operated with XSPICE. * Fixed nasty malloc problem in src/xspice/mif/mifgetmod.c which casued frequent segfaults (when compiled with XSPICE). 2002-01-03 Paolo Nenzi * acconfig.h: added define needed for Windows and some aesthetic rework (from Holger Vogt patch). * configure.in: added macros to handle windows related issues (Holger patch and me). * INSTALL: added documentation on ngspice compilation under Windows (Holger Vogt patch). * Makefile.am: added Windows compilation code (Holger Vogt patch and me). 2001-12-05 Emmanuel Rouat * configure.in: removed (unnecessary) macros to handle GNU getopt (I'm an idiot!) 2001-12-04 Emmanuel Rouat * configure.in, main.c: Forgot a bit to handle GNU getopt correctly 2001-11-25 Emmanuel Rouat * configure.in: New way (cleaner) to handle GNU getopt. 2001-01-21 Paolo Nenzi * bsim3soi_dd/*: BSIM3SOI (DD) support added as level 11. Added tests in tests directory (tests/bsim3soidd/*). * ???: Integrated patch form Alan Gillespie to revert the spice raw format to the spice3 original. * configure.in: corrected a bug that broke the on line help system. Help system now works again but its text is a little bit outdated. * ???: all binaries now have ng prepended, so ngspice can be installed with other spice flavours. 2000-10-18 Arno W. Peters * Makefile.am: Changes for notes dir -> NOTES file conversion. * tests/Makefile.am: Make distcheck target work again. 2000-10-17 Arno W. Peters * TODO: Little updates. 2000-10-14 Arno W. Peters * acconfig.h, configure.in, src/frontend/inpcom.c, src/include/complex.h src/include/macros.h, src/include/memory.h src/include/ngspice.h, src/maths/cmaths/Makefile.am src/maths/cmaths/cmath1.c, src/maths/cmaths/cmath2.c src/maths/cmaths/cmath3.c, src/maths/cmaths/cmath4.c src/maths/cmaths/test_cx_j.c, src/maths/cmaths/test_cx_mag.c src/maths/cmaths/test_cx_ph.c, src/misc/alloc.c src/misc/alloc.h: Added support for the Boehm-Weiser conservative garbage collector. * NOTES, src/maths/cmaths/cmath.h: Added. * notes/Linux.changes, notes/dbx, notes/internal, notes/mac_port notes/porting, notes/spice2: Removed or incorporated into NOTES. * *: replaced malloc, realloc and free calls to use tmalloc, trealloc and txfree. 2000-09-05 Arno W. Peters * ???: Paolo and I have integrated patches from Alan Gillespie . 2000-07-28 Arno W. Peters * tests/polezero/*.out: Changed the content of these files because the bug that caused the incorrect pole-zero results have been traced to src/spicelib/analysis/cktpzstr.c. 2000-07-05 Arno W. Peters * src/devices/dev.c: Added first_device() and next_device() to abstract manipulations to the devices list. Now change all the code that uses direct access to these functions... 2000-07-03 Arno W. Peters * src/parser/alias.c, src/parser/alias.h: contain frontend alias command. Moved them to src/frontend/com_alias.c and src/frontend/com_alias.h. Updated Makefile.am's as appropreate. * src/parser/front.c, src/parser/front.h, src/parser/history.c, src/parser/history.h, src/parser/modify.c, src/parser/modify.h, src/parser/variable.c, src/parser/variable.h: Empty files. Removed. * src/include/spconfig.h: Removed spCOMPLEX, spSEPARATED_COMPLEX_VECTORS and spCOMPATIBILITY defines. This made including this file from src/include/spmatrix.h unnecessary. Moved this file to src/maths/sparse/spconfig.h. * src/include/spmatrix.h: Removed include of src/include/spconfig.h. * src/maths/sparse/spalloc.c, src/maths/sparse/spbuild.c, src/maths/sparse/spcombin.c, src/maths/sparse/spdefs.h, src/maths/sparse/spfactor.c, src/maths/sparse/spoutput.c, src/maths/sparse/spsmp.c, src/maths/sparse/spsolve.c, src/maths/sparse/sputils.c: The other files affected by the removal of spCOMPLEX, spSEPARATED_COMPLEX_VECTORS and spCOMPATIBILITY defines. Also: assertions are enabled by default. * src/include/smpdefs.h, src/maths/sparse/spsmp.c: SMPmatrix is now a typedef for void, instead of char. Updated all function declarations to match this. Also added function prototypes not previously mentioned in src/include/smpdefs.h. * src/include/complex.h: Updates of cast from char * to void * * src/analysis/cktsens.c: Matrices cannot be created non-complex. Also added a check to detect an error condition on delta_Y = spCreate(...). 2000-06-27 Arno W. Peters * src/parser: Refactored commands from the frontend into the frontend directory. Major changes to organization, but not to functionality. 2000-06-19 Arno W. Peters * src/analysis/cktask.c: moved to src/devices. * src/analysis/cktbindn.c: moved, renamed to src/devices/cktbindnode.c. * src/analysis/cktfdev.c: moved, renamed to src/devices/cktfinddev.c. 2000-06-18 Arno W. Peters * AUTHORS, doc/ngspice.texi: Included an acknowledgements section. 2000-06-16 Arno W. Peters * src/frontend/doplot.c: Refactored into the following files: src/frontend/com_asciiplot.c src/frontend/com_asciiplot.h src/frontend/com_hardcopy.c src/frontend/com_hardcopy.h src/frontend/com_plot.c src/frontend/com_plot.h src/frontend/com_xgraph.c src/frontend/com_xgraph.h src/frontend/plotting/plotit.c src/frontend/plotting/plotit.h * src/frontend/Makefile.am src/frontend/plotting/Makefile.am: Updated to match the new files. 2000-06-15 Arno W. Peters * src/frontend/graphdb.c, src/frontend/graphdb.c, src/frontend/Makefile.am, src/frontend/plotting/graphdb.c, src/frontend/plotting/graphdb.c, src/frontend/plotting/Makefile.am: Moved plotting specific files into plotting directory. 2000-06-05 Arno W. Peters * tests/*: Added a little hierarchy to the tests. Removed config.sh in favor of check.sh. This script does all checking. Made names of the tests better reflect the circuit under test. 2000-06-03 Arno W. Peters * src/include/complex.h, src/include/macros.h, src/include/memory.h, src/maths/sparse/spdefs.h: Moved definitions of complex into complex.h. There are three different ways to declare a complex number in Spice. We need further work to reduce this to only one. * src/maths/cmaths/Makefile.am, src/maths/cmaths/.cvsignore, src/maths/cmaths/test_cx_ph.c: Added a new test and updated the corresponding support files. 2000-06-02 Arno W. Peters * src/circuit/inp2dot.c: Refactoring introduced a bug in the line parsing. Passing line as an extra parameter to the refactored functions fixes the bug. 2000-05-30 Arno W. Peters * TODO: Updated. * src/maths/cmaths/Makefile.am, src/maths/cmaths/test_cx_mag.c, src/maths/cmaths/test_cx_j.c: Added first testcases for complex math library. 2000-05-25 Arno W. Peters * src/circuit/inp2dot.c: First refactoring of INP2dot into smaller functions. Still needs work. * src/circuit/sperror.c: Reworked, now much simpler. * src/include/inpdefs.h, src/include/sperror.h: Removed redundancy in the definition of function prototypes. 2000-05-06 Arno W. Peters * src/include/fte*: Broken header files into smaller pieces. This avoids long recompile times as less needs to be rebuilt on changes to the header files. Adjusted all callers to use the new header files. Left a warning message in the header file to indicate its obsolescence. You will see this message when compiling. * src/frontend/*: Reorganized part of the frontend commands into their own source file. Moved plotting parts into new plotting directory. * src/devices/*: Removed all RCS log and rcsid from the devices source files. They only give extra clutter and all the information you need is available through CVS. 2000-05-04 Arno W. Peters * src/maths/ni/nipzmeth.c: Corrected an overeager deletion. 2000-05-03 Arno W. Peters * source tree: removed most of `#ifdef notdef' and made converted some function calls from K&R -> ANSI. 2000-05-01 Arno W. Peters * Added .cvsignore files to prevent CVS from marking generated files as unknown. * src/devices/Makefile.am, src/devices/dev.c, src/devices/dev.h, src/Makefile.am, src/ngspice.c, src/main.c: Refactored devices initialization code into the devices dir. * tests/respart.cir, tests/respart.out, tests/respart.sh: additional tests for resistor. 1999-12-07 Arno Peters * source tree: Added MAINTAINERCLEANFILES to Makefile.am to eliminate automatically generated cruft from patches. To create a minimal patch between two trees, just do `make maintainer-clean' on both trees and run `diff -ruN tree1 tree2'. 1999-10-15 Emmanuel Rouat * source tree: entirely modified by Arno Peters (after discussion on the mailing list) 1999-09-06 Emmanuel Rouat * AUTHORS: added list provided by Arno Peters * Applied patch supplied by Arno 1999-09-01 Emmanuel Rouat * AUTHORS: some additions * FAQ: a few minor corrections 1999-08-31 Emmanuel Rouat * configure.in: config.h now in top directory * All Makefile.am's: removed useless 'DEFS' line 1999-08-30 Emmanuel Rouat * FAQ: added the FAQ to the distribution 1999-08-28 Emmanuel Rouat * Removed mfb from build - nutmeg doesn't use it on Unix. 1999-08-23 Emmanuel Rouat * configure.in: added tests ('make check') * ng-spice.patch: added cleanup patch by Arno Peters 1999-08-08 Emmanuel Rouat * configure.in: added some features 1999-08-03 Emmanuel Rouat * configure.in: added a whole bunch of tests! 1999-08-02 Emmanuel Rouat * configure.in: added --with-checkergcc option (experimental!) added some maths checks 1999-07-31 Emmanuel Rouat * configure.in: made X11 tests more efficient ng-spice-0.0: ------------- * changed HAX_X11 define to XMISSING_DISPLAY supplied in config.h * added 'Changelog' files in all subdirectories * added '--enable-ansi' option to configure * put src/lib/dev/devsup.c into src/lib/dev/devsup/ * added header files into Makefile.am's Chianti: -------- (27/07/99) * added some tests to configure.in (ncurses/termcap, xaw....) * cleaned up some directories (examples, patches..) * removed all .orig files Pizza: ------ (25/07/99) * added installation of man pages * emptied 'COPYING' file until we know what to put in it * fixed missing install of help and init files (created tune.c.in to support this) * added missing -DWANT_X11 and -DWANT_MFB in several compiles (fixed some headers in: src/lib/fte/x11.c src/lib/fte/x11disp.c ) Spaghetti: ---------- (25/07/99) - first attempt at autoconf/automake support - based on spice3f5-chili, hardly anything touched on it. < ngspice-26/FAQ0000644000265600020320000003233212264261473012566 0ustar andreasadmin Ngspice F.A.Q.Version 2.0 (ngspice 26 release) Maintained by Paolo Nenzi, Holger Vogt Last update: 02-01-2014 This document contains the Frequently Asked Questions (and Answers) for ngspice project. __________________________________________________________________________ Table of Contents 1. INTRODUCTION AND GENERAL INFORMATION 1.1 What is ngspice? 1.2 What is sharedspice? 1.3 What is tclspice ? 1.4 Why resurrecting Berkeley's Spice? 1.5 What is the project's goal? 1.6 What you are going to do? 1.7 Legal issues 1.8 What mailing lists exist for ngspice? 1.9 Are the mailing lists archived anywhere? 1.10 What newsgroups exist for ngspice? 1.11 Where can I get a copy of ngspice? 1.12 Where should I look on the World Wide Web for ngspice stuff? 1.13 Where should I look on the World Wide Web for Spice documentation? 2. DEVELOPMENT 2.1 What is the current version? 2.2 What are the latest features in the current release? 2.3 What does it look like? 2.4 Who are the authors of ngspice? 2.5 How can I report a bug/request for a feature? 2.6 How can I join the development? 3. SOLUTIONS TO COMMON MISCELLANEOUS PROBLEMS 3.1 What systems are supported? 3.2 I get errors when I try to compile the source code, why? 3.3 This document didn't answer my question. Where else can I look for an answer? 4. ADMINISTRATIVE INFORMATION AND ACKNOWLEDGEMENTS 4.1 Feedback 4.2 Formats in which this FAQ is available 4.3 Authorship and acknowledgements 4.4 Disclaimer and Copyright ______________________________________________________________________ 1. INTRODUCTION AND GENERAL INFORMATION 1.1 What is ngspice ? Ngspice is a mixed-level/mixed-signal circuit simulator, based on three open source software packages: Spice3f5, Cider1b1 and Xspice, and including many bug fixes and enhancements: - Spice3 is a widely used circuit simulator. It was developed by the University of California at Berkeley (UCB), by "a cast of thousand" (as they say) initially under the guide of Donald O. Peterson. - Cider is a mixed-level simulator that already includes Spice3f5 and adds a device simulator to it: DSIM. Cider couples the circuit level simulator to the device simulator to provide greater simulation accuracy (at the expense of greater simulation time). Critical devices can be described with technology parameters (numerical models) and non critical ones with the original spice's compact models. - Xspice is an extension to Spice3 that provides code modeling support and simulation of digital components through an embedded event driven algorithm. The NG prefix has lot of meanings: Next Generation, New Good, etc. Choose or invent the one you prefer. The heart of the project is the ngspice program, with its tremendous advancements. 1.2 What is sharedspice ? Sharedspice is an interface option to ngspice. It compiles the simulator into a shared object (or dynamic link library), providing full control of ngspice to any suitable controlling program (GUI, optimizer, development system, etc., to be provided by the user). 1.3 What is tclspice ? Tclspice is a another interface option of ngspice, providing a tcl/tk interface to the user. Tclspice is both a batch and interactive simulator and a building block for simulator applications. Analyses can be run from a tcl script and vector plotted or post processed using tcl. A small GUI may be built by the user to analyze a circuit or a set of circuits. Tclspice is obtained compiling ngspice activating an additional option. 1.4 Why resurrecting Berkeley's Spice? Berkeley's Spice can be considered the father of most circuit simulators available today. It is an old but still good piece of software, it may not be the fastest or the most reliable but it's free, it's available in source code and most of the electrical simulators inherited it's syntax. Spice3 is based on proven numerical algorithms (most commercial implementations have only strengthened them), implements most of the models for MOSFET submicron design and has a powerful set of analyses. The readily availability of its source code in the past made this simulator the de-facto standard. 1.5 What is the project's goal? Ngspice is both a maintenance and enhancement project. It is a maintenance project because it aims to provide the free EDA community the best spice3 simulator available. This means fixing bugs, adding new features but always in the spice3 framework. Achieving compatibility with commercial spice based simulators and provide users the latest devices models are important goals of the project. Improvements in the postprocessing (data handling capabilities) and user interface are other goals. 1.6 What you are going to do? An official roadmap for ngspice was never drawn. Contributions made by developers drive ngspice development and the roadmap is built day by day by developers writing on the lists. Ngspice development activity can be summarized in 3 points: + Compatibility: Ngspice should be compatible with commercial products, thus allowing people to use the netlist generated for such tools. As most of the commercial simulators available tracked each other in netlist language, this should not be an impossible task. The most important goal here is to provide a reliable support for model libraries coming from foundries. + Compact models: The interest in using ngspice is intimately connected to the available models. To provide the latest models available for active and passive devices is a fundamental goal of the project. In this direction we are integrating ADMS model compiler into ngspice. + Documentation: Commercial simulators come with very good manuals containing tutorials, description of models equations, example of use, suggestions, etc. Spice came with little documentation. The Spice3f manual, available on the Internet has been used as the basis for the new manual. It will be constantly improved during ngspice development and integrated with the documentation accompanying Xspice and Cider. The ngspice manual today contains description of all features ngspice is offering. It is however not a tutorial of ngspice usage, but there are now several good ones available on the internet (see http://ngspice.sourceforge.net/tutorials.html). 1.7 Legal issues The ngspice base license is new BSD, as provided by UCB. For some parts of the code other compatible licences apply. Please see file COPYING for details. 1.8 What mailing lists exist for ngspice? There are two general mailing lists dedicated to the ngspice project. Users mailing list: This list is for ngspice users. Examples, problems, bug reports and general discussion on ngspice can be sent here. Developers mailing list: The list is dedicated to ngspice development. Developers should subscribe here, to follow the program development. May be used to send patches, and technical discussion on ngspice. Send an empty message with Subject "help" to the following addresses to get instructions. Send an empty message to the following address to Subscribe. Documentation about the user interface of these mailing lists can be found at: http://www.gnu.org/software/mailman/mailman-member 1.9 Are the mailing lists archived anywhere ? Yes, the lists are archived. There are two places where to look for archives. The project started on the IEEE Central and South Italy web server and then moved to sourceforge. Sourceforge provides an archiving service that cam be accessed via the summary page: http://sourceforge.net/p/ngspice/mailman/ 1.10 What newsgroups exist for ngspice? There is no ngspice specific newsgroup. Sourceforge offers additional discussion groups for ngspice, please see http://sourceforge.net/p/ngspice/discussion/ ngspice threads may appear on newsgroups dedicated to circuit simulation and electronic design. 1.11 Where can I get a copy of ngspice? You can download ngspice from: http://sourceforge.net/projects/ngspice/files/ng-spice-rework/ 1.12 Where should I look on the World Wide Web for ngspice stuff? Look at the official Ngpice Web Page: http://ngspice.sourceforge.net 1.13 Where should I look on the World Wide Web for Spice documentation? There is a detailed ngspice manual available at: http://ngspice.sourceforge.net/docs.html Others docs are assembled at: http://ngspice.sourceforge.net/literature.html 2. DEVELOPMENT 2.1. What is the current version? The latest version released is: * ngspice-26 (released on 04/01/2013) 2.2. What are the latest features in the current release? - New features: + add temperature coefficients for B source + commands "mdump", "mrdump" to dump matrix to file + allow `time', `temper', and `hertz' in expressions with behavioral R, L, C + Enable ctrl-c to interrupt a simulation also for Windows GUI + tests/bsim4: use the standard CMC model check + implement exit code for command "quit" + .nodeset all = value + memristor code model in extradev + new scalable diode model including tunnel component + variable xtrtol may override the XSPICE reduction of trtol + XSPICE example: delta-sigma converter + XSPICE: new d_source model + new option noopac + bsim3: make additonal parameters accessible with @mxx[par] + enable Mac OS X compilation + option reseries = val + commands "snsave", "snload" + update hisim to version 2.7.0, new qa tests + hisimhv update to version 1.2.3, new qa tests + allow Ctrl-d to quit + jfet model temperature extension, tcv and bex parameter + speed up vector handling by hash table for vector address storage and retrieval + update PSS code - Bug fixes: + many, many ... please see http://ngspice.git.sourceforge.net/git/gitweb.cgi?p=ngspice/ngspice;a=shortlog;pg=0 + remove memory leaks + update tclspice for MS Windows + adms3 removed due to licensing issues + Many small bugs 2.3. What does it look like? Ngspice, as the original Spice3 (and Xspice and Cider) is a command line simulator, but with a graphics output capability. 2.4. Who are the authors of ngspice? The development is open to anyone who wish to contribute. If the original Spice3 was made with the contribution of "a cast of thousand", ngspice can only increase that number. An incomplete list of contributor makes the "acknowledgements" page of the ngspice manual. 2.5. How can I report a bug/request for a feature? The ngspice summary page (hosted on Sourceforge) has bug-reporting, feature-request and bugs trackers. You can use them or subscribe to mailing lists and post there. The former is preferred since almost it allows to track all necessary actions upon a bug. The web site at http://ngspice.sourceforge.net/bugrep.html will give you more details. 2.6. How can I join the development? To join the development just code the feature you want to add and send your patch in the mailing list. Before you start coding check the latest development release of ngspice from our git repository. It might be that your feature has already been implemented. There is no bureaucracy here. 3. SOLUTIONS TO COMMON MISCELLANEOUS PROBLEMS 3.1. What systems are supported? Ngspice is written in C, and uses some GNU extensions, then you need a GNU C compiler and a UNIX environment to compile it. Ngspice can be compiled under Windows using the mingw or cygwin environment as well as MS Visual Studio. 3.2. I get errors when I try to compile the source code, why? This is a one-million-euros question :). Write a mail to the user's list describing the problem and providing information on the type of hardware, the flavour of operating system. 3.3. This document didn't answer my question. Where else can I look for an answer? Read old messages from the mailing list archive, search the web site or read the docs. Upgrade to the latest version of ngspice, many problems are fixed in the new versions. If you still can't find an answer, post your question to the mailing lists. 4. ADMINISTRATIVE INFORMATION AND ACKNOWLEDGEMENTS 4.1. Feedback Send your comments about this F.A.Q. to: Paolo Nenzi . Send your comments about ngspice to: Paolo Nenzi . 4.2. Formats in which this FAQ is available This document is available only in ASCII format in the ngspice source package. 4.3. Authorship and acknowledgements Parts of the questions and answers are originate from Paolo Nenzi. 4.4. Disclaimer and Copyright This document is provided as is. The information in it is not warranted to be correct: you use it at your own risk. ngspice-26/README.adms0000644000265600020320000005144212264261473014042 0ustar andreasadmin*************************************************************************** * DISCLAIMER * * * * The admst code generators, part of adms and this document are released * * under LGPL license terms. * * * * Copyright (C) 2006 Freescale Inc. * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Lesser General Public * * License as published by the Free Software Foundation; either * * version 2.1 of the License, or (at your option) any later version. * * * * This library is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * * Lesser General Public License for more details. * * * * You should have received a copy of the GNU Lesser General Public * * License along with this library; if not, write to the Free Software * * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA * * 02110-1301 USA * *************************************************************************** WARNING! The text in this document has been prepared in 2006 and is outdated. It is provided here only for reference and may provide some (historical) information. Please refer to the ngspice adms web page at http://ngspice.sourceforge.net/admshowto.html for actual information on how to integrate Verilog A device models into ngspice. Holger Vogt, May 2013 INTRODUCTION In this document we will provide a guideline on how to auto-generate the ready-to compile C code for the ngspice API of a compact device model defined in the Verilog-AMS language. Condition: To compile Verilog-AMS compact models into ngspice-ready C models with admsXml a copy of the latest adms distribution is needed. You get it from the adms Download page http://mot-adms.sourceforge.net as a source code package. (Also use of cvs version is possible, but needs some more effort.) Version: This guideline has been tested on Windows-XP under cygwin using: $ admsXml -v [usage] [info] elapsed time: 0 [info] admst iterations: 0 (0 freed) Goal: In this guideline we will add device model hicum0 to ngspice using the Verilog-AMS source code available at: http://www.iee.et.tu-dresden.de/~schroter/Hicum_PD/Hicumna/hicumL0V1p11.va Limitations: The adms ngspice interface supports a limited set of Verilog-AMS language constructs. See the home page of adms (http://mot-adms.sourceforge.net/) for more info. Feel free to contribute to the adms ngspice interface so that more constructs can be supported. 01- ngspice Files Ngspice does not (yet) have support for loading models at run time, every model must be included at compile time. Then, adding a new model into ngspice is a process that cannot be completely automated. Some files need to be edited by hand. 01.01 What ngspice need to know of a new model ? First you have to assign your new model a "device type". As you probably know, ngspice recognizes the type of a device by the first letter in device's name in the netlists ("r" for resistors, "q" for BJT, "m" for mosfets and so on). Then the first thing you have to find is the correct type for your new device (let's call this device_type). Since there can be more than one model for each device type, another parameter you have to set is the device_level, which must be unique for each device type. Once you have found the (device_type, device_level) couple you have identified the files you have to edit: /configure.ac Here you have to add the entries in adms section for your new directory and library. /src/spicelib/parser/inp2.c Substitute with the letter corresponding to the type of you new model. Here you have to add the interface code for your new device. In the case of hicum (a BJT model and thus a "q" device type) you have to edit inp2q.c /src/spicelib/parser/inpdomod.c Here you have to add a switch for the level of your new device. /src/spicelib/devices/dev.c Follow the structure of the files and add information on your new model. In dev.c you have to adjust some macro. See existing examples to make the modifications for your own implementation. is the path to the ngspice source installation. For instance can be /tools/ng-spice-rework-17 Please see appendix 01 about spice3-flavoured flags. 02- adms Files List of files that adms needs to create the ready-to-compile C code: /src/spicelib/devices/adms/admst/ngspice*.xml adms creates the ready-to-compile C code from a set of admst code generators. admst is a subset of the XML language which has been created specifically for the purpose of C code generation. The syntax of admst is very close to the XSLT language (it includes some extensions.) 03- Create the data file structure Create the following directories if they do not already exist: -a /src/spicelib/devices/adms/hicum0 -b /src/spicelib/devices/adms/hicum0/admsva There is no convention on the way to choice the last directory name in -a. However in -b 'admsva' is mandatory. 04- Save the Verilog-AMS source code Save the source code of hicum0 from http://www.iee.et.tu-dresden.de/~schroter/Hicum_PD/Hicumna/hicumL0V1p11.va to: /src/spicelib/devices/adms/hicum0/admsva/hic0_full.va NOTE: the name of the Verilog-AMS file that contains the 'module' declaration should match the name of the module in the file. For instance in file hic0_full.va you will find the following declaration: ... module hic0_full (c,b,e,s); ... 05- Create file 'Makefile.am' In directory ..../hicum0 run the following command in order to create file 'Makefile.am': $ admsXml admsva/hic0_full.va -Iadmsva -e ../admst/ngspiceMakefile.am.xml [info] admsXml-2.1.3 Feb 2 2006 19:01:39 [warning] [admsva\hic0_full.va:30]: standard vams file created (not found in -I path) ... 'constants.h' [warning] [admsva\hic0_full.va:31]: standard vams file created (not found in -I path) ... 'discipline.h' [info] Makefile.am: file created [info] elapsed time: 1.0624 [info] admst iterations: 185425 (185425 freed) After this step file 'Makefile.am' is created: $ head Makefile.am ## ## Interface: ## created by: admsXml-2.1.3 - Monday, 01/30/06 ## Process this file with automake to produce Makefile.in ADMSXMLINTERFACE:=../admst adms: admsXml.exe -Iadmsva admsva/hic0_full.va \ 06- Update/Create the auto-tools files (configure, Makefile.in, Makefile) 06.01 Manual changes In directory edit file configure.ac, add new device 'hicum0' (use the name of the directory - not the name of the module): $ grep hicum0 configure.ac src/spicelib/devices/adms/hicum0/Makefile \ In directory /src/spicelib/devices edit file Makefile.am, add new device 'hicum0': $ grep hicum0 Makefile.am adms/hicum0 \ adms/hicum0 \ 06.02 Makefile.in In directory run the shell command 'automake': File 'Makefile.in' is created in directory /src/spicelib/devices/hicum0. In directory /src/spicelib/devices/hicum0 you should have: $ ls Makefile.am Makefile.in admsva constants.h discipline.h 06.03 Update file 'configure' In directory run the shell command 'autoconf': File 'configure' is updated. Edit the file to make sure that "adms/hicum0/Makefile" is present in the file. 06.04 Makefile In directory run shell command 'configure': $ configure ... config.status: creating src/spicelib/devices/adms/hicum0/Makefile ... File 'Makefile' is created in directory /src/spicelib/devices/hicum0. In directory /src/spicelib/devices/hicum0 you should have: $ ls Makefile Makefile.am Makefile.in admsva constants.h discipline.h 07- Create the ready-to-compile auto-generated C code of device hicum0 In directory ..../hicum0 run the following command in order to create the auto-generated C code: $ make adms admsXml.exe -Iadmsva admsva/hic0_full.va \ -e ../admst/ngspiceVersion.xml \ -e ../admst/ngspiceMakefile.am.xml \ -e ../admst/ngspiceMODULEitf.h.xml \ -e ../admst/ngspiceMODULEinit.c.xml \ -e ../admst/ngspiceMODULEinit.h.xml \ -e ../admst/ngspiceMODULEext.h.xml \ -e ../admst/ngspiceMODULEdefs.h.xml \ -e ../admst/ngspiceMODULEask.c.xml \ -e ../admst/ngspiceMODULEmask.c.xml \ -e ../admst/ngspiceMODULEpar.c.xml \ -e ../admst/ngspiceMODULEmpar.c.xml \ -e ../admst/ngspiceMODULEload.c.xml \ -e ../admst/ngspiceMODULEacld.c.xml \ -e ../admst/ngspiceMODULEtemp.c.xml \ -e ../admst/ngspiceMODULEsetup.c.xml \ -e ../admst/ngspiceMODULEguesstopology.c.xml \ -e ../admst/ngspiceMODULE.c.xml [info] admsXml-2.1.3 Feb 2 2006 19:01:39 [info] Makefile.am: file created [info] hic0_fullitf.h: file created [info] hic0_fullinit.c: file created [info] hic0_fullinit.h: file created [info] hic0_fullext.h: file created [info] hic0_fulldefs.h: file created [info] hic0_fullask.c: file created [info] hic0_fullmask.c: file created [info] hic0_fullpar.c: file created [info] hic0_fullmpar.c: file created [info] noise contribution not implemented - ignored! [info] noise contribution not implemented - ignored! [info] noise contribution not implemented - ignored! [info] noise contribution not implemented - ignored! [info] noise contribution not implemented - ignored! [info] noise contribution not implemented - ignored! [info] hic0_fullload.c: file created [info] hic0_fullacld.c: file created [info] hic0_fulltemp.c: file created [info] hic0_fullsetup.c: file created [info] hic0_fullguesstopology.c: file created [info] hic0_full.c: file created [info] elapsed time: 5.43757 [info] admst iterations: 1099640 (1099640 freed) perl -p -i -e 's/IOP\("(\w+)"/IOP("\L\1"/' hic0_full.c In directory /src/spicelib/devices/hicum0 you should have: $ ls Makefile constants.h hic0_fullacld.c hic0_fullguesstopology.c hic0_fullload.c hic0_fullsetup.c Makefile.am discipline.h hic0_fullask.c hic0_fullinit.c hic0_fullmask.c hic0_fulltemp.c Makefile.in hic0_full.c hic0_fulldefs.h hic0_fullinit.h hic0_fullmpar.c admsva hic0_fullext.h hic0_fullitf.h hic0_fullpar.c 08- Compile the ready-to-compile auto-generated C code In directory ..../hicum0 run the following command in order to create the object files*.o and libhic0_full.a: $ make CFLAGS="-g" if gcc -DHAVE_CONFIG_H -I. -I. -I../../../../.. -I../../../../../src/include -g -MT hic0_full.o -MD -MP -MF ".ds/hic0_full.Tpo" -c -o hic0_full.o hic0_full.c; \ then mv -f ".deps/hic0_full.Tpo" ".deps/hic0_full.Po"; else rm -f ".deps/hic0_full.Tpo"; exit 1; fi ... ar cru libhic0_full.a hic0_full.o hic0_fullacld.o hic0_fullask.o hic0_fullguesstopology.o hic0_fullinit.o hic0_fullload.o hic0_fullmask.o hic0_fullmpar.o hic0_fullpar.o hic0_fullsetup.o hic0_fulltemp.o ranlib libhic0_full.a WARNING: at the compilation step some messages about '#warning conflict' will be printed. They mean that some ngspice reserved keywords have been used in the Verilog-AMS. Just ignore them in the case of hicum0. In directory /src/spicelib/devices/hicum0 you should have: $ ls Makefile hic0_full.c hic0_fullask.o hic0_fullinit.h hic0_fullmask.o hic0_fullsetup.o Makefile.am hic0_fulldefs.h hic0_fullinit.o hic0_fullmpar.c hic0_fulltemp.c Makefile.in hic0_full.o hic0_fullext.h hic0_fullitf.h hic0_fullmpar.o hic0_fulltemp.o admsva hic0_fullacld.c hic0_fullguesstopology.c hic0_fullload.c hic0_fullpar.c libhic0_full.a constants.h hic0_fullacld.o hic0_fullguesstopology.o hic0_fullload.o hic0_fullpar.o discipline.h hic0_fullask.c hic0_fullinit.c hic0_fullmask.c hic0_fullsetup.c NOTE: CFLAGS is redefined to "-g" is order to speed up the compilation process. It is better NOT to redefine CFLAGS for official releases. (the compilation will take a lot longer to complete) 09- Update manually the ngspice parser files Modify the following files: /src/spicelib/parser/inp2q.c ----> depends on the type of the device, here 'q' device /src/spicelib/parser/inpdomod.c /src/spicelib/devices/dev.c ... 10- Update executable 'ngspice' 10-01 Update ngspice In directory run shell command 'make': $ make File 'src/ngspice.exe' is updated and contains the new device 'hicum0'. 10-02 Install ngspice In directory run shell command 'make': $ make install ngspice executables are installed in /usr/local/bin. 11- Test the Implementation of hicum0 into ngspice 11-01 Create a simple ngspice netlist Create file 'hicum0.sp'. Its contents is given below: $ cat hicum0.sp .title Netlist .option + temp=25.0 + reltol=1e-5 + abstol=1e-15 .model mybjtmodel npn + npn=1 + level=5 qN1 + c b 0 0 + mybjtmodel rcc cc c 100.0 rbb bb b 1k vcc + cc 0 + 1.0 vbb + bb 0 + 0.0 + ac=0.0 .dc vbb 0.0 1.0 0.02 .print + dc + v(c) + i(vbb) + i(vcc) .end 11-02 run 'ngspice': $ ngspice -b hicum0.sp Circuit: .title Netlist Doing analysis at TEMP = 298.150000 and TNOM = 300.150000 No. of Data Rows : 51 .title Netlist DC transfer characteristic Mon Jan 30 10:22:01 2006 -------------------------------------------------------------------------------- Index v-sweep v(c) vbb#branch vcc#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e+00 0.000000e+00 -7.105421e-17 1 2.000000e-02 1.000000e+00 -5.593842e-19 -1.265654e-16 2 4.000000e-02 1.000000e+00 -2.076336e-18 -2.775558e-16 3 6.000000e-02 1.000000e+00 -5.366258e-18 -6.061817e-16 4 8.000000e-02 1.000000e+00 -1.254873e-17 -1.320055e-15 5 1.000000e-01 1.000000e+00 -2.812744e-17 -2.874367e-15 6 1.200000e-01 1.000000e+00 -7.629085e-17 -7.666090e-15 7 1.400000e-01 1.000000e+00 -1.669761e-16 -1.669553e-14 8 1.600000e-01 1.000000e+00 -3.645759e-16 -3.636425e-14 9 1.800000e-01 1.000000e+00 -7.948513e-16 -7.920553e-14 10 2.000000e-01 1.000000e+00 -1.732082e-15 -1.725142e-13 11 2.200000e-01 1.000000e+00 -3.773484e-15 -3.757461e-13 12 2.400000e-01 1.000000e+00 -8.219658e-15 -8.183998e-13 13 2.600000e-01 1.000000e+00 -1.790375e-14 -1.782522e-12 14 2.800000e-01 1.000000e+00 -3.899630e-14 -3.882434e-12 15 3.000000e-01 1.000000e+00 -8.493698e-14 -8.456170e-12 16 3.200000e-01 1.000000e+00 -1.849987e-13 -1.841804e-11 17 3.400000e-01 1.000000e+00 -4.029389e-13 -4.011557e-11 18 3.600000e-01 1.000000e+00 -8.776254e-13 -8.737407e-11 19 3.800000e-01 1.000000e+00 -1.911521e-12 -1.903059e-10 20 4.000000e-01 1.000000e+00 -4.163405e-12 -4.144973e-10 21 4.200000e-01 9.999999e-01 -9.068141e-12 -9.027994e-10 22 4.400000e-01 9.999998e-01 -1.975094e-11 -1.966349e-09 23 4.600000e-01 9.999996e-01 -4.301867e-11 -4.282821e-09 24 4.800000e-01 9.999991e-01 -9.369701e-11 -9.328218e-09 25 5.000000e-01 9.999980e-01 -2.040767e-10 -2.031732e-08 26 5.200000e-01 9.999956e-01 -4.444870e-10 -4.425191e-08 27 5.400000e-01 9.999904e-01 -9.680991e-10 -9.638130e-08 28 5.600000e-01 9.999790e-01 -2.108483e-09 -2.099148e-07 29 5.800000e-01 9.999543e-01 -4.591957e-09 -4.571626e-07 30 6.000000e-01 9.999004e-01 -9.999448e-09 -9.955176e-07 31 6.200000e-01 9.997833e-01 -2.176941e-08 -2.167303e-06 32 6.400000e-01 9.995284e-01 -4.736784e-08 -4.715812e-06 33 6.600000e-01 9.989751e-01 -1.029470e-07 -1.024912e-05 34 6.800000e-01 9.977781e-01 -2.231776e-07 -2.221894e-05 35 7.000000e-01 9.952090e-01 -4.812339e-07 -4.791028e-05 36 7.200000e-01 9.897838e-01 -1.026165e-06 -1.021618e-04 37 7.400000e-01 9.786930e-01 -2.140206e-06 -2.130697e-04 38 7.600000e-01 9.573154e-01 -4.287705e-06 -4.268455e-04 39 7.800000e-01 9.197474e-01 -8.062749e-06 -8.025264e-04 40 8.000000e-01 8.611162e-01 -1.395965e-05 -1.388838e-03 41 8.200000e-01 7.801099e-01 -2.212604e-05 -2.198901e-03 42 8.400000e-01 6.791392e-01 -3.235919e-05 -3.208608e-03 43 8.600000e-01 5.627227e-01 -4.429334e-05 -4.372773e-03 44 8.800000e-01 4.367031e-01 -5.756142e-05 -5.632969e-03 45 9.000000e-01 3.111929e-01 -7.186079e-05 -6.888071e-03 46 9.200000e-01 2.120521e-01 -8.696058e-05 -7.879479e-03 47 9.400000e-01 1.637984e-01 -1.026891e-04 -8.362016e-03 48 9.600000e-01 1.443326e-01 -1.189191e-04 -8.556674e-03 49 9.800000e-01 1.353683e-01 -1.355550e-04 -8.646317e-03 50 1.000000e+00 1.312181e-01 -1.525242e-04 -8.687819e-03 Total elapsed time: 0.625 seconds. Current dynamic memory usage = 1.515520 MB, Dynamic memory limit = 1241.702400 MB. 12- How to update ngspice when the Verilog-AMS source code changes If you modify the Verilog-AMS source code of 'hicum0' just complete the following steps in order to update 'ngspice': 12-01 Update the auto-generated C code In directory ..../hicum0 run: - make clean - make adms - make 12-02 Update 'ngspice' and re-install In directory run: - make - make install Appendix 01: Comments on spice3-flavoured flags like npn, pnp, nmos, pmos and so on In the adms-based implementation of hicum0 the value of the device type flag (either npn or pnp) in the model card is just ignored. The selection of the type of the device is actually done using model parameters. In the Verilog-AMS code of hicum0 there are two special model parameters called 'npn' and 'pnp' which decide what the type of the device will be (either a npn bipolar model or pnp bipolar model). The Verilog-AMS piece of code that triggers the decision is as follows: if (`PGIVEN(npn)) HICUMtype = `NPN; else if (`PGIVEN(pnp)) HICUMtype = `PNP; else HICUMtype = `NPN; end `PGIVEN(npn) is a macro that returns 1 is model parameter 'npn' occurs in the .model card of the ngspice netlist. Otherwise it returns 0. For instance: 1- the following model card will select a NPN type device: .model mybjtmodel npn + npn=1 + level=5 2- the following model card will select a PNP type device: .model mybjtmodel npn + pnp=1 + level=5 In both cases flag 'npn' is just ignored. In section 'Update manually the ngspice parser files' it is recommended to use flag 'adms' instead. This limitation results from the LRM of VerilogAMS that does not support flags. ngspice-26/doc/0000755000265600020320000000000012264261473012776 5ustar andreasadminngspice-26/doc/version.texi0000644000265600020320000000013712264261473015357 0ustar andreasadmin@set UPDATED 25 November 2008 @set UPDATED-MONTH November 2008 @set EDITION 20 @set VERSION 20 ngspice-26/doc/ChangeLog0000644000265600020320000000454312264261473014556 0ustar andreasadmin2005-08-15 Steven Borley * Fixed missing parenthesis around CLEANFILES and DISTCLEANFILES in Makefile.am as reported by David Fang * Fixed the section in ngspice.texi where the use of @/ in a @url{} was giving problems. Actually this whole section on the Windows port is now out-of-date, and date link was broken, so I have replaced it with something more appropriate. thank you to Stuart Brorson for reporting these problems. 2005-08-14 Steven Borley * Fixed the problems of the AUTHORS file not being found by adding its directory to the search paths for makeinfo and for texi2dvi in Makefile.am * Fixed the warning caused by @strong{Note:} in ngspice.texti - used the @quotation Note style as given in the texinfo user manual section 10.2 * Added an @include version.texi in the header of the ngspice.texi file. This causes automake to create the necessary files and allow the use of @value(VERSION) in the ngspice.texi. The .cvsignore file has been adjusted to take account of the generated files. * Used @copying and @insertcopying for the copyright text in ngspice.texi and modified the file's structure a little. It now more closely follows the simple example given in the texinfo user manual. * Fixed some of the 'overfull' error generated by TeX when processing ngspice.texi - many more still present. * removed non-ASCII characters from ngspice.texi. this needed a work-round for the degrees symbol - used @math{^o} * Added ngsspice.pdf as an output file of make dist 2001-12-05 Emmanuel Rouat * ngspice.texi: changed (most) references of spice3 to ngspice. 2001-12-04 Emmanuel Rouat * ngspice.texi: corrected a few bugs, and made some chapters readable. 2000-05-22 Paolo Nenzi * ngspice.texi: Added text for u2 function and for resistance ac paramter. 1999-09-06 Arno Peters * ngspice.texi: Added TeX equivalents for some formula. First tables converted to texinfo format. 1999-08-31 Emmanuel Rouat * Makefile.am: added .texi file by Arno Peters - a distribution will now include a postscript doc. updated 'clean' rules ngspice-26/doc/ngspice.texi0000644000265600020320000161770412264261473015341 0ustar andreasadmin\input texinfo @c -*-texinfo-*- @c $Id$ @c %**start of header @setfilename ngspice.info @include version.texi @format INFO-DIR-SECTION Simulation START-INFO-DIR-ENTRY * Ngspice: (ngspice). General-purpose circuit simulation program for nonlinear dc, nonlinear transient, and linear ac analyses END-INFO-DIR-ENTRY @end format @settitle NGSPICE User Manual @setchapternewpage odd @c %**end of header @c Summary Description and Copyright @copying Copyright 1996 The Regents of the University of California. @quotation Permission to use, copy, modify, and distribute this software and its documentation for educational, research and non-profit purposes, without fee, and without a written agreement is hereby granted, provided that the above copyright notice, this paragraph and the following three paragraphs appear in all copies. This software program and documentation are copyrighted by The Regents of the University of California. The software program and documentation are supplied "as is", without any accompanying services from The Regents. The Regents does not warrant that the operation of the program will be uninterrupted or error-free. The end-user understands that the program was developed for research purposes and is advised not to rely exclusively on the program for any reason. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATIONS TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. @end quotation @end copying @c Titlepage, Contents, Copyright and Contents @titlepage @title NGSPICE User Manual @subtitle Describes ngspice-rework-@value{VERSION} @subtitle Draft Version 0.2 @author Many Authors @c The following two commands start the copyright page. @page @vskip 0pt plus 1filll @insertcopying @end titlepage @c Output the table of contents at the begining @contents @c 'Top' Node and master menu @ifnottex @node Top, Preface, (dir), (dir) @top NGSpice User Manual This manual describes the mixed level simulator NGspice and applies to the version called Rework @value{VERSION}. @insertcopying @end ifnottex @menu * Preface:: Some words about this manual. * Acknowledgements:: Almost all the people who contributed to NGSPICE development. * Release Notes:: Release notes for the NGSPICE simulator * Introduction:: Description of NGSPICE. Try to answer the question: What NGSPICE is ? * NGSPICE Compilation:: How to compile NGSPICE. * Supported Analyses:: Describes supported analyses and introduces some convergence issues. * Circuit Description:: How to input a circuit to the simulator. * Circuit Elements and Models:: Description and use of the devices models built into NGSPICE. * Analyses and Output Control:: How to run analyses and check the results. * Interactive Interpreter:: The commands recognized by the NGSPICE interactive frontend. * Bibliography:: A small bibliography. * Example Circuits:: Some examples. * Model and Device Parameters:: Equations that makes the models and parameters. @end menu @c Body of the Document @node Preface, Acknowledgements, Top, Top @comment node-name, next, previous, up @chapter Preface The NGSPICE user's manual is based on the text file included in the Spice3f source package. The original text has been converted to @TeX{}Info format by Emmanuel Rouat and Arno W. Peters. The original text has been modified and extended to reflect the changes between plain Spice3f5 and NGSPICE. Some of the "changes" comes from the HTML documentation Charles D.H. Williams has written and published on his web site. This manual covers the double role of being an introductory text for the novice user who wants to learn how to use spice (and thus NGSPICE), and a reference text for the expert who wants to identify the differences between the original spice3f code (sometimes referred as the Berkeley's Spice) and the NGSPICE code. Since NGSPICE is an Open Source software, one chapter describing program compilation and compilation options have been added to the original text. Since its birth, spice3f had many compilation switches that enabled/disabled some features considered experimental or troublesome. In a "perfect world", most of these switches would be implemented as runtime options, thus allowing users to activate/deactivate the features they want without recompiling the source. Anyway time is never sufficient to implement all the features and, in the end, this is not a "perfect world". Trying to keep a record of the "long" history of this piece of software, an entire chapter has been dedicated to the description of the patches publicly made available in the past years through USENET newsgroups. As always, errors, omissions and unreadable phrases are only my fault. @flushright @email{p.nenzi@@ieee.org, Paolo Nenzi} Roma, March 24th 2001 @end flushright @flushright @quotation Indeed. At the end of the day, this is engineering, and one learns to live within the limitations of the tools. @email{kevin@@anasoft.co.uk, Kevin Aylward} , Warden of the Kings Ale @end quotation @end flushright @node Acknowledgements, Release Notes, Preface, Top @comment node-name, next, previous, up @chapter Acknowledgements @c Include the AUTHORS file from the top directory @c include @value{top_srcdir}/AUTHORS @include AUTHORS @node Release Notes, Introduction, Acknowledgements, Top @comment node-name, next, previous, up @chapter Release Notes @noindent @sc{NGSPICE rework-14 release} (released on December 10th, 2001): @example This release fixes most of the bugs that appeared in rework-13. Some leaks in the frontend have been closed. GNU Autoconf interface cleaned (better support for getopt). Better error reporting (thanks to Charles Williams "CDHW"). Added mesa tests (macspice3f4). Added support for ekv model (not source code). The Rawfile format changed again removing "Probe" compatibility code. @end example @noindent @sc{NGSPICE rework-13 release} (released on November 5th, 2000): @example This is a major release in terms of fixes and enhancements. A garbage collector support has been added. If the configuration script detects that you have installed GC (Bohem-Weiser conservative garbage collector), it will use it. Some memory leaks have been fixed too. Enhancements to the code comes from Alan's (Gillespie) contribute code, a description of improvements follows (extracted form Alan's mail): * Output File Format Changes - Text mode .OP results even though "rawfile" written. Internal device nodes are not saved to "rawfile" (reduces file size). Optionally, these internal nodes can be replaced by device currents and saved. * DC Convergence Enhancements - "Source-Stepping" algorithm modified with a "Dynamic" step size. After each successful step, the node voltages are saved, the source-factor is increased by the step-factor, and the step-factor is increased (for the next step). If the step fails, i.e. the circuit does not converge, the source-factor is set to the value from the previous successful step, the previously stored node voltages are restored, the step-factor is reduced, the source factor is increased by this smaller step-factor, and convergence is attempted again. Same thing done for "Gmin-stepping" algorithm. "Gshunt" option added. This sets the "diagGmin" variable used in the gmin-stepping algorithm to a non-zero value for the final solution. (Normally this is set to zero for the final solution). This helps for circuits with floating nodes (and for some others too). The Gmin implementation across the substrate diodes of MOS1, MOS2, MOS3, MOS6 and BSIM3 devices, and across BJT base-emitter and base-collector diodes, was incorrect. Correcting this dramatically improved DC convergence. (I think this also effects BSIM1 and 2 but I haven't fixed them yet! ). The gm, gmb and gds calculations in the MOS3 model were all wrong. The device equations were fixed, leading to much improved convergence. The Vcrit value used for diode voltage limiting was calculated without taking into account the device area (and in some cases without using the temperature corrected saturation current). This could cause floating point overflows, especially in device models designed to be scaled by a small area, e.g. 2u by 2u diodes (area=4e-12). This is now fixed for Diode, BJT, MOS1, MOS2, and MOS3 models. The diode voltage limiting was modified to add negative voltage limiting. Negative diode voltages are now limited to 3*Vdp-10, where Vdp is the voltage from the previous iteration. If Vdp is positive, then the voltage is limited to -10V. This prevents some more floating point overflows. (Actually, I'm still playing with the best values for this). The Spice3 "fix" for the MOS3 gds discontinuity between the linear and saturated regions only works if the VMAX parameter is non-zero. A "tweak" has been added for the VMAX=0 case. * Transient Convergence Enhancements - Temperature correction of various diode capacitances was implemented slightly incorrectly, leading to capacitance discontinuities in simulations at temperatures other than nominal. This affected the Diode and MOS3 models. A mistake in the implementation of the MOS3 source-bulk capacitance model resulted in a charge storage discontinuity. This has been fixed. The level 2 MOSFET model seems to calculate Von and Vth values for the threshold and subthreshold values respectively, but then uses Vbin to calculate the Vdsat voltage used to find the drain current. However, a jump statement uses Von to decide that the device is in the "cutoff" region, which means that when this jump allows the drain current to be calculated, Vdsat can already be well above zero. This leads to a discontinuity of drain current with respect to gate voltage. The code is now modified to use Vbin for the jump decision. It looks like the code should actually use Vth as the threshold voltage, but since other SPICE simulators follow the original Berkeley code, this was left alone. * New Model Parameters - A device multiplier instance parameter "M" (i.e. M devices in parallel) was added to the MOS1,2,3 and BSIM3 mosfet models. * Input Read-in and Checking - Numbers beginning with a "+" sign got the input routine confused. Fixed now. Attempts to nodeset (or .IC) non-existent nodes are flagged with a warning. PWL statements on Voltage or Current sources are now checked for "non-increasing" time-points at the start of the simulation. Previously each time-point was checked as it was reached during the simulation, which could be very annoying if you made a mistake which caused the simulation to fail after hours of run-time. A check which was performed at the end of each sub-circuit expansion was moved to the top level. This check makes sure that all sub-circuits have been defined, but in its original position, it meant that if a sub-circuit included ANY .MODEL statements at all, then ALL the models called in that sub-circuit must also be defined within that sub-circuit. Now SPICE behaves as expected, i.e. a subcircuit may define its own models, but may also use models defined at any level above. * Miscellaneous Fixes/Enhancements - MOS devices reported only half of the Meyer capacitances, and did not include overlap capacitances, when reporting to the .OP printout, or when storing device capacitances to the "rawfile". The ideal switch devices had no time-step control to stop their controlling voltages/currents overshooting the switching thresholds. The time-step control has been modified to use the last two time points to estimate if the next one will move the controlling voltage/current past a switching threshold. If this looks likely, then the time-step is reduced. The "rawfile" writing routines have been modified to print the "reference value" to the console during the simulation. This lets the user see exactly how far and how fast the simulation is proceeding. .OP printout tidied up a lot to make the printout clearer. Analysis order changed to fix a "feature" where, if you ask for a .OP and a .TRAN in the same simulation, the node voltages printed out correspond to the .OP, but the device data was from the last timepoint of the .TRAN. @end example @noindent @sc{NGSPICE rework-12 release} (released on August 26th, 2000): @example Arno did a great work this summer! This release consists of his work. The pole-zero analysis has been corrected. The error was introduced in an attempt to eliminate compiler warnings. The source has been reworked and info file have been updated. As you may see, a new dir called "spicelib" has been created, another step toward the separation of the simulator from the frontend. @end example @noindent @sc{NGSPICE rework-11 release} (released on May 28th, 2000): @example The code has been cleaned, the resistance code for ac parameter has been modified to conform to Spice3 parameter parsing. A new step function has been introduced (u2). Updated documentation to reflect changes. @end example @noindent @sc{NGSPICE rework-10 release} (released on April 5th, 2000): @example All devices are compiled as shared libraries (ld.so). There is an initial support for the BSIM4 model. This release is to be considered as baseline for the project. There are still some harmless bugs in the resistor code. @end example Release notes for older NGSPICE release are not available. For historical purpose only the following release notes, pertaining to the original Spice3 code have been included into this manual. They have been copied from "SPICE 3 Version 3f5 User's Manual": Spice3f is the six major release of Spice3. This release incorporates new features not available in Spice 3c or 3d, as well as several performance improvements. All of the feature described here are believed to be fully functional. The development of SPICE is ongoing at Berkeley, and therefore not all of the intended capabilities have been implemented in full yet. @noindent @sc{Bugs in 3f2 fixed in 3f3:} @example Ascii (printer) plots in spice3f2 did not print bode plots vs log of the frequency by default, as in spice2. You had to explicitly request the x-axis to be log; either "@command{plot vdb(2) xlog}" (best) or "@command{plot vdb(2) vs log10(frequency)}" will do. Now, simply "@command{plot vdb(2)}" will work. The on-line documentation has been brought up to date by converting this manual into a format readable on-line. Significant problems with AC sensitivities in 3f2 only have been fixed. Multiple analyses and plots in spice2 emulation mode under 3f2 and earlier generated misleading error messages. This no longer happens in 3f3. @end example @noindent @sc{New features and bug fixes incorporated in spice3f} (the current release of Spice3): @example Sensitivity analysis Added a parameter for fitting JFET models (parameter "@code{B}"). Fixed a discontinuity problem in MOS level 3 (related to the "@code{kappa}" parameter). Working "@command{alter}" command. Improved "@command{show}" and "@command{showmod}" commands for operating points summary tables (like Spice2). Working "@command{trace}" command. Interactive "@command{set}" variable values now the same as "@code{.options}" settings. Improved plotting, including implicitly transforming data for smith plots. Added function "@code{deriv()}" (derivative) to the front-end. Corrected an error affecting the specified initial conditions for some circuits. Miscellaneous bug fixes in the front-end. @end example @noindent @sc{New feature and bugs fixes incorporated in Spice3e} (the @emph{previous} release of Spice3): @example Lossy Transmission lines. Proper calculation of sheet resistance in the MOS models. A new command ("@command{where}") to aid in debugging troublesome circuits. Smith-chart plots working (see the "@command{plot}" command). Arbitrary sources in subcircuits handled correctly. Arbitrary source reciprocal calculations and DC biasing fixed. Minor bug-fixes to the Pole-Zero analysis. Miscellaneous bug fixes in the front end. @end example @noindent @sc{Some common problems remaining in Spice3f} (note that this list is not complete): @example Models defined within subcircuits are not always handled correctly. If you have trouble, move the model definition outside of "@code{.subckt}" and "@code{.ends}" lines. Batch run data is not compacted if a "rawspice" data file is generated, resulting in excessively large output files for some difficult inputs. Sufficient detail is sometimes not preserved in transient analysis. Providing a small value for the "@code{TMAX}" parameter (the fourth argument) in the transient run command will solve this problem. Convergence problems can sometimes be worked around by relaxing the transient "@code{TMAX}" parameter. The substrate node of the bipolar transistor (BJT) is modelled incorrectly (this may actually be due to inherent numerical problems with the model). Do not use substrate node; use a semiconductor capacitor to model substrate effects. Charge is not conserved in MOS devices based on the Meyer model. Transient simulation of strictly resistive circuits (typical for first runs or tests) allow a time step the is too large (e.g. a sinusoidal source driving a resistor). There is no integration error to restrict the time step. Use the "@code{TMAX}" parameter or include reactive elements. Deep nesting of subcircuits may exceed internal static buffers. The PZ analysis can not be interrupted; the sensitivity analysis can not be continued (the interactive "@command{resume}" command) once interrupted. There are many other small bugs, particularly in the front end. @end example @section Reporting a bug Berkeley does not provide support anymore for Spice3, if you need some kind of help you can @node Introduction, NGSPICE Compilation, Release Notes, Top @comment node-name, next, previous, up @chapter Introduction NGSPICE is a general-purpose circuit simulation program for nonlinear dc, nonlinear transient, and linear ac analyses. Circuits may contain resistors, capacitors, inductors, mutual inductors, independent voltage and current sources, four types of dependent sources, lossless and lossy transmission lines (two separate implementations), switches, uniform distributed RC lines, and the five most common semiconductor devices: diodes, BJTs, JFETs, MESFETs, and MOSFETs. NGSPICE is a continuation of Spice3f5, the last Berkeley's release of Spice3 simulator family. NGSPICE is being developed to include new features to existing Spice3f5 and to fix its bugs. Improving a circuit simulator is a very hard task and, while some improvements have been ported, most of the job has been done on bug fixing and code refactoring. NGSPICE has built-in models for the semiconductor devices, and the user need specify only the pertinent model parameter values. There are two models for BJT both based on the integral-charge model of Gummel and Poon; however, if the Gummel-Poon parameters are not specified, the model reduces to the simpler Ebers-Moll model. In either case and in either models, charge storage effects, ohmic resistances, and a current-dependent output conductance may be included. The second BJT model BJT2 adds dc current computation in the substrate diode @emph{but is not fully implemented as of ngspice-rework-15}. The semiconductor diode model can be used for either junction diodes or Schottky barrier diodes. There are two models for JFET: the first (JFET) is based on the model of Shichman and Hodges, the second (JFET2) is based on the Parker-Skellern model. All the original six MOSFET models are implemented: MOS1 is described by a square-law I-V characteristic, MOS2 [1] is an analytical model, while MOS3 [1] is a semi-empirical model; MOS6 [2] is a simple analytic model accurate in the shortchannel region; MOS4 [3, 4] and MOS5 [5] are the BSIM (Berkeley Short-channel IGFET Model) and BSIM2. MOS2, MOS3, and MOS4 include second-order effects such as channel-length modulation, subthreshold conduction, scattering-limited velocity saturation, small-size effects, and charge controlled capacitances. Other MOS model have been implemented, like the new BSIM3 and BSIM4 models, the SOI models from the BSIMSOI family and the STAG one. There is partial support for a couple of HFET models and one model for MESA devices. Since the rework-15 release, NGSPICE includes CIDER, a mixed-level circuit and device simulator that provides a direct link between technology parameters and circuit performance. A mixed-level circuit and device simulator can provide greater simulation accuracy than a stand-alone circuit or device simulator by numerically modelling the critical devices in a circuit. Compact models can be used for noncritical devices. CIDER couples Spice (version3) to an internal C-based device simulator, DSIM. Spice3 provides circuit analyses, compact models for semiconductor devices, and an interactive user interface. DSIM provides accurate, one- and two-dimensional numerical device models based on the solution of Poisson's equation, and the electron and hole current-continuity equations. DSIM incorporates many of the same basic physical models found in the Stanford two-dimensional device simulator PISCES. Input to CIDER consists of a SPICE-like description of the circuit and its compact models, and PISCES-like descriptions of the structures of numerically modeled devices. As a result, CIDER should seem familiar to designers already accustomed to these two tools. CIDER is based on the mixed-level circuit and device simulator CODECS, and is a replacement for this program. The basic algorithms of the two programs are the same. Some of the differences between CIDER and CODECS are described below. The CIDER input format has greater flexibility and allows increased access to physical model parameters. New physical models have been added to allow simulation of state-of-the-art devices. These include transverse field mobility degradation important in scaled-down MOSFETs and a polysilicon model for poly-emitter bipolar transistors. Temperature dependence has been included over the range from -50C to 150C. The numerical models can be used to simulate all the basic types of semiconductor devices: resistors, MOS capacitors, diodes, BJTs, JFETs and MOSFETs. BJTs and JFETs can be modelled with or without a substrate contact. Support has been added for the management of device internal states. Post-processing of device states can be performed using the NUTMEG user interface of Spice3. Previously computed states can be loaded into the program to provide accurate initial guesses for subsequent analyses. Finally, numerous small bugs have been discovered and fixed, and the program has been ported to a wider variety of computing platforms. @node NGSPICE Compilation, Supported Analyses, Introduction, Top @comment node-name, next, previous, up @chapter NGSPICE Compilation @menu * Extracting the archive:: * Configuring NGSPICE:: * Compiling NGSPICE:: * Supported systems:: * Platform specific issues:: @end menu NGSPICE is an Open Source project (and software), this means that its source code is available to the end user. Well, to be honest, the source code is the only thing available to the user. This chapter briefly describes how to deal with this rather complex package. @node Extracting the archive, Configuring NGSPICE, NGSPICE Compilation, NGSPICE Compilation @section Extracting the archive NGSPICE is released as "gzipped tarball". The source tree is archived with the @command{tar} command and the result compressed with @command{gzip}. Since the development of the NGSPICE is carried on UNIX (mainly), all the files have the "line feed" character as newline character and this may cause problems when working in non UNIX environments (like DOS). If you are going to extract NGSPICE on system that use different newline character, you will have to convert the files with some utility. To extract the NGSPICE archive you need the @command{tar} archiver and @command{gzip} compression utility: @example pnenzi@@janus:~$ gzip -d ngspice-rework-15.tar.gz pnenzi@@janus:~$ tar -xvf ngspice-rework-15.tar @end example Once extracted, you have to enter the source tree (just @command{cd} into the top level directory). @node Configuring NGSPICE, Compiling NGSPICE, Extracting the archive, NGSPICE Compilation @section Configuring NGSPICE Now that you have extracted all the files, you need to give values to compile time variables and set the correct paths for libraries and include file. If you have compiled other programs released in source form, you have probably already faced the @emph{GNU Autoconf} system. If you already know what Autoconf is and how it works, you can safely skip the next paragraph. GNU Autoconf is a package that automates the task of configuring source code packages. Configuring a source code package means assigning desired values to compile-time variables, something known as "customization", and look at functions, libraries available on the host system to produce the makefiles needed for compilation. As said, this is a very brief introduction to the Autoconf package, if you want to know more, look at its documentation. NGSPICE uses @emph{GNU Autoconf} configuration tool. To configure the package type: @command{./configure --help} on the command prompt. The list of available options will be shown. The list comprises "standard" options (the one every Autoconf package has) and options specific to the NGSPICE package. This chapter deals with the latter only, sending back the reader to the GNU Autoconf documentation for the former. The options specific to NGSPICE are: @itemize @bullet @item @command{--enable-numaparam}: Preliminary support for parameters expansion in netlists. Numparam is a library that attach itself to a single point in NGSPICE code and comes with its own documentation. Before using this library you should look at library's documentation in @file{src/frontend/numaparam} directory. @item @command{--enable-ftedebug}: This switch enables the code for debugging the NGSPICE frontend. Developers who wish to mess with the frontend should enable it (and set to @code{TRUE} the "debug" option). The casual user has no gain in enabling this option. @item @command{--enable-ansi}: This switch forces @code{-ansi} option of the for compilation. This is interesting only to developers cleaning the NGSPICE code. Nore real use for the user. @item @command{--enable-debug}: Add @code{-g} option for compilation. This options is enabled by default and should not be disabled since debugging tools relies on it. @item @command{--enable-checkergcc}: When enabled, NGSPICE will use the @emph{Checker} package. Checker tracks down memory errors at runtime. Again, this is useless for users. @item @command{--enable-gc}: When enabled, NGSPICE will use the Boehm-Weiser Conservative Garbage Collector. The garbage collector library is not provided with NGSPICE, you must download and install it separately. Most distributions provide a binary package of this library. @item @command{--enable-nosqrt}: When enabled, the faster code using SQRT in charge/capacitance calculations of bulk diodes, when the grading coefficients have a vaule of .5, is switched off. I think there is no need to enable it. @item @command{--enable-nobypass}: When enabled the bypass code is not compiled in. Once enabled NGSPICE does not contain the code to bypass recalculations of slowly changing variables. It is advisable to leave this disabled since the bypass code does is used only if the "bypass" option is set to @code{TRUE} at runtime. @item @command{--enable-capbypass}: When enabled the calculation of cbd/cbs in the mosfets is bypassed ifvbs/vbd voltages were unchanged. Better do not enable it if you are not sure of its implications. @item @command{--enable-capzerobypass}: When enabled all the calculations cbd/cbs calculations if Czero is zero. It is safe to enable this feature. @item @command{--enable-nodelimiting}: Enable some experimental code that was intended to do Newton damping by nodes, rather than by branches as is currently done. The flag just turns off the branch limiting code in a couple of mosfets. Obviously, do not enable this if you are not working with the limiting code. @item @command{--enable-predictor}: When this feature is enabled, NGSPICE (like the orignal Spice3f) uses a predictor-corrector method for the numerical integration package. This feature has never been tested too much, so enabling it is NOT considered safe. @item @command{--enable-newtrunc}: When enabled, some unfinished (?) code to do truncation error timestep control on node voltages (rather than on charge in the devices) is activated. Casual users should not enable it. @item @command{--enable-sense2}: Use spice2 sensitivity analysis. @item @command{--enable-sensdebug}: Enables debug switch for sensitivity code. @item @command{--enable-intnoise}: If enabed, noise analysis produces an additional plot: the integrated noise. Users should always enable this. @item @command{--enable-smoketest}: Enables some very restrictive compilation flags. Useful only in development phase and, if enabled, probably NGSPICE does not compile. @item @command{--enable-experimental}: It is possible that some untested code is included in stable releases. If you want to experiment with new untested features, enable this option. @item @command{--enable-ekv}: EKV is a device model not released in source code form. If you have obtained the source code, you have to enable this to have it compiled into NGSPICE. @item @command{--with-readline}: This option enables GNU Readline on NGSPICE. Since NGSPICE license is incompatible with GPL (which covers Readline library), the code is not included compiled into NGSPICE by default. @end itemize @sc{Caveat Emptor}: NGSPICE, like its father Spice3f5 cannot be considered a "black box", it is a complex numerical software whose stability and correctness depends on many parameters. Be sure to understand well what you enable/disable otherwise your simulations may converge to a wrong value or do not converge at all. Once chosen the options to enable/disable, you will have to issue the @command{configure} command followed by the options you choose, like: @command{configure --enable-intnoise --enable-nobypass --enable-capzerobypass} If all goes well, all makefiles will be generated and the package is ready to be compiled. @node Compiling NGSPICE, Supported systems, Configuring NGSPICE, NGSPICE Compilation @section Compiling NGSPICE The reference platform for NGSPICE is a Linux system with glibc2 ang gcc (2.95 o newer) running on the i386 architecture. If you have such a system you can pretty sure that NGSPICE will compile correctly. Once configured, to compile NGSPICE @command{cd} into the top level directory (if you moved from it after configuration) and issue the @command{make}. If you have a multi-processor machine, you can add @option{-j3} to speed up compilation. NGSPICE compilation takes several minutes on an average machine, enough to let you have a lunch. Once NGSPICE has been compiled, you have to install it issuing the command @command{make install}. NGSPICE will be installed under @file{/usr/local/}. @node Supported systems, Platform specific issues, Compiling NGSPICE, NGSPICE Compilation @section Supported systems NGSPICE development is carried on Linux on the i386 processor architecture. Compiling it under different UNIX systems should require only trivial changes, since most of the issues will be resolved by Autoconf. Compiling under non UNIX OSes may require major changes, since Autoconf and other UNIX tools may not be available on those environments. In the past, NGSPICE have been ported to some OSes, the table below shows the port I am aware of: @sc{NetBSD} @email{mcmahill@@mtl.mit.edu, Dan McMahill} has ported NGSPICE (starting from rework-13) on NetBSD systems. Dan maintains a NetBSD package for NGSPICE available at @url{ftp://ftp.netbsd.org/pub/NetBSD/packages/pkgsrc/cad/ng-spice/README.html} . @sc{Solaris 7} @email{skod@@ises-llc.com, Scott Griffith} has compiled ngspice rework-12 on Solaris 7 with gcc (verion 2.95.1). Some changes to the source code were needed: @quotation Notes on compilation on SUN Solaris (extracted from Scott's email): Solaris lacks some of the functions needed by ngspice. You have to copy them from other GNU tools. (Scott defines the following changes "some of the usual workarounds") @itemize @bullet @item Copy @file{getopt.c}, @file{getopt1.c} and @file{asprintf.c} from other GNU tools into the misc directory of the ngspice tree and modify the Makefiles accordingly. @item Change @file{src/maths/cmaths/test_cx_ph.c} to @code{#include }, because that gave me a compiler error on @code{DBL_EPSILON}. @end itemize @end quotation @sc{Windows} @email{holger.vogt@@uni-duisburg.de, Holger Vogt} has ported NGSPICE (from rework-14 release) to the Windows Operating System. His port relies only on DLLs coming with Windows. As of Rework-16 the Windows port is integrated as part of ngspice. It can be build under @url{http://www.cygwin.com/,,Cygwin} or @url{http://www.mingw.org/,,MinGW}. The situation of NGSPICE ports is evolving continually, the one above are the only I (Paolo Nenzi) am aware of. I know that there is a intent to port NGSPICE to FreeBSD but do not know its status. This section will be updated in the future. @node Platform specific issues, , Supported systems, NGSPICE Compilation @section Platform specific issues NGSPICE heavily relies on the floating point representation. On the i386 architecture, the floating point implementation can cause problems to numerical software like NGSPICE. Intel i386 and later processors have 80-bit wide floating point registers in their FPU. This width is referred ad @emph{extended double} precision and all the calculation are done, internally, at that precision. Externally, the result can be used as is or rounded to @emph{double} precision as defined in the IEEE754 standard for floating point, so there are two modes of operation and the choice is left to the operating system. FreeBSD developers decided that the FPU had to provide results conforming to IEEE745, while Linux ones decided to take advantage of the extended precision. This different choice lead to slightly different results when running the same simulation on different operating systems. Catastrophic discrepancies arise on badly written software. @node Supported Analyses, Circuit Description, NGSPICE Compilation, Top @chapter Supported Analyses This chapter introduces the analyses available in NGSPICE. @menu * Types of Analysis:: * Analysis at Different Temperatures:: * Convergence:: @end menu @node Types of Analysis, Analysis at Different Temperatures, Supported Analyses, Supported Analyses @section Types of Analysis @menu * DC Analysis:: * AC Small-Signal Analysis:: * Transient Analysis:: * Pole-Zero Analysis:: * Small-Signal Distortion Analysis:: * Sensitivity Analysis:: * Noise Analysis:: @end menu @node DC Analysis, AC Small-Signal Analysis, Types of Analysis, Types of Analysis @subsection DC Analysis The dc analysis portion of NGSPICE determines the dc operating point of the circuit with inductors shorted and capacitors opened. The dc analysis options are specified on the @code{.DC}, @code{.TF}, and @code{.OP} control lines.A dc analysis is automatically performed prior to a transient analysis to determine the transient initial conditions, and prior to an ac small-signal analysis to determine the linearized, small-signal models for nonlinear devices. If requested, the dc small-signal value of a transfer function (ratio of output variable to input source), input resistance, and output resistance is also computed as a part of the dc solution. The dc analysis can also be used to generate dc transfer curves: a specified independent voltage, current source, resistor or temperature is stepped over a user-specified range and the dc output variables are stored for each sequential source value. Temperature (@code{TEMP}) and resistance sweeps have been introduced in NGSPICE, they were not available in the original code of Spice3f5. @node AC Small-Signal Analysis, Transient Analysis, DC Analysis, Types of Analysis @subsection AC Small-Signal Analysis The ac small-signal portion of NGSPICE computes the ac output variables as a function of frequency. The program first computes the dc operating point of the circuit and determines linearized, small-signal models for all of the nonlinear devices in the circuit. The resultant linear circuit is then analyzed over a user-specified range of frequencies. The desired output of an ac small-signal analysis is usually a transfer function (voltage gain, transimpedance, etc). If the circuit has only one ac input, it is convenient to set that input to unity and zero phase, so that output variables have the same value as the transfer function of the output variable with respect to the input. @node Transient Analysis, Pole-Zero Analysis, AC Small-Signal Analysis, Types of Analysis @subsection Transient Analysis The transient analysis portion of NGSPICE computes the transient output variables as a function of time over a user-specified time interval. The initial conditions are automatically determined by a dc analysis. All sources which are not time dependent (for example, power supplies) are set to their dc value. The transient time interval is specified on a @code{.TRAN} control line. @node Pole-Zero Analysis, Small-Signal Distortion Analysis, Transient Analysis, Types of Analysis @subsection Pole-Zero Analysis The pole-zero analysis portion of NGSPICE computes the poles and/or zeros in the small-signal ac transfer function. The program first computes the dc operating point and then determines the linearized, small-signal models for all the nonlinear devices in the circuit. This circuit is then used to find the poles and zeros of the transfer function. Two types of transfer functions are allowed: one of the form (output voltage)/(input voltage) and the other of the form (output voltage)/(input current). These two types of transfer functions cover all the cases and one can find the poles/zeros of functions like input/output impedance and voltage gain. The input and output ports are specified as two pairs of nodes. The pole-zero analysis works with resistors, capacitors, inductors, linear-controlled sources, independent sources, BJTs, MOSFETs, JFETs and diodes. Transmission lines are not supported. The method used in the analysis is a sub-optimal numerical search. For large circuits it may take a considerable time or fail to find all poles and zeros. For some circuits, the method becomes "lost" and finds an excessive number of poles or zeros. @node Small-Signal Distortion Analysis, Sensitivity Analysis, Pole-Zero Analysis, Types of Analysis @subsection Small-Signal Distortion Analysis The distortion analysis portion of NGSPICE computes steady-state harmonic and intermodulation products for small input signal magnitudes. If signals of a single frequency are specified as the input to the circuit, the complex values of the second and third harmonics are determined at every point in the circuit. If there are signals of two frequencies input to the circuit, the analysis finds out the complex values of the circuit variables at the sum and difference of the input frequencies, and at the difference of the smaller frequency from the second harmonic of the larger frequency. Distortion analysis is supported for the following nonlinear devices: diodes (DIO), BJT, JFET, MOSFETs (levels 1, 2, 3, 4/BSIM1, 5/BSIM2, and 6) and MESFETS. All linear devices are automatically supported by distortion analysis. If there are switches present in the circuit, the analysis continues to be accurate provided the switches do not change state under the small excitations used for distortion calculations. @node Sensitivity Analysis, Noise Analysis, Small-Signal Distortion Analysis, Types of Analysis @subsection Sensitivity Analysis NGSPICE will calculate either the DC operating-point sensitivity or the AC small-signal sensitivity of an output variable with respect to all circuit variables, including model parameters. NGSPICE calculates the difference in an output variable (either a node voltage or a branch current) by perturbing each parameter of each device independently. Since the method is a numerical approximation, the results may demonstrate second order affects in highly sensitive parameters, or may fail to show very low but non-zero sensitivity. Further, since each variable is perturb by a small fraction of its value, zero-valued parameters are not analyized (this has the benefit of reducing what is usually a very large amount of data). @node Noise Analysis, , Sensitivity Analysis, Types of Analysis @subsection Noise Analysis The noise analysis portion of NGSPICE does analysis device-generated noise for the given circuit. When provided with an input source and an output port, the analysis calculates the noise contributions of each device (and each noise generator within the device) to the output port voltage. It also calculates the input noise to the circuit, equivalent to the output noise referred to the specified input source. This is done for every frequency point in a specified range - the calculated value of the noise corresponds to the spectral density of the circuit variable viewed as a stationary gaussian stochastic process. After calculating the spectral densities, noise analysis integrates these values over the specified frequency range to arrive at the total noise voltage/current (over this frequency range). This calculated value corresponds to the variance of the circuit variable viewed as a stationary gaussian process. @node Analysis at Different Temperatures, Convergence, Types of Analysis, Supported Analyses @section Analysis at Different Temperatures Temperature, in NGSPICE, is a property associated to the entire circuit, rather an analysis option. Circuit temperature has a default (nominal) value of 27@math{^o}C (300.15 K) that can be changed using the @option{TNOM} option in an @code{.OPTION} control line. All analyses are, thus, performed at circuit temperature, and if you want to simulate circuit behaviour at different temperatures you should prepare a netlist for each temperature. All input data for NGSPICE is assumed to have been measured at the circuit nominal temperature. This value can further be overridden for any device which models temperature effects by specifying the @option{TNOM} parameter on the @code{.model} itself. Individual instances may further override the circuit temperature through the specification of @option{TEMP} and @option{DTEMP} parameters on the instance. The two options are not independent even if you can specify both on the instance line, the @option{TEMP} option overrides @option{DTEMP}. The algorithm to compute instance temperature is described below: @example IF TEMP is specified THEN instance_temperature = TEMP ELSE IF instance_temperature = circuit_temperature + DTEMP END IF @end example Temperature dependent support is provided for all devices except voltage and current sources (either independent and controlled) and BSIM models. BSIM MOSFETs have an alternate temperature dependency scheme which adjusts all of the model parameters before input to NGSPICE. For details of the BSIM temperature adjustment, see [6] and [7]. Temperature appears explicitly in the exponential terms of the BJT and diode model equations. In addition, saturation currents have a built-in temperature dependence. The temperature dependence of the saturation current in the BJT models is determined by: @tex $$ I_S(T_1) = I_S(T_0) \left|T_1 \over T_0\right|^{XTI} \exp \left| E_g q(T_1 T_0) \over k (T_1 - T_0) \right| $$ @end tex @ifnottex @example XTI |T | | E q(T T )| 1 g 1 0 I (T ) = I (T ) |--| exp|-----------| S 1 S 0 |T | |k (T - T )| 0 1 0 @end example @end ifnottex where `@math{k}' is Boltzmann's constant, `@math{q}' is the electronic charge, `@math{E}' is the energy gap which is a model parameter, `@math{G}' and `@math{XTI}' is the saturation current temperature exponent (also a model parameter, and usually equal to 3). The temperature dependence of forward and reverse beta is according to the formula: @tex $$ B(T_1) = B(T_0) \left| T_1 \over T_0 \right|^{XTB} $$ @end tex @ifnottex @example XTB |T | 1 B(T ) = B(T ) |--| 1 0 |T | 0 @end example @end ifnottex where `@math{T_0}' and `@math{T_1}' are in degrees Kelvin, and `@math{XTB}' is a user-supplied model parameter. Temperature effects on beta are carried out by appropriate adjustment to the values of `@math{B_F}', `@math{I_SE}', `@math{B_R}', and `@math{I_SC}' (spice model parameters @option{BF}, @option{ISE}, @option{BR}, and @option{ISC}, respectively). Temperature dependence of the saturation current in the junction diode model is determined by: @tex $$ I_S(T_1) = I_S(T_0) \left| T_1 \over T_0 \right|^{XTI \over N} \exp \left| E_g q(T_1 T_0) \over N k (T_1 - T_0) \right| $$ @end tex @ifnottex @example XTI --- N |T | | E q(T T ) | 1 g 1 0 I (T ) = I (T ) |--| exp|-------------| S 1 S 0 |T | |N k (T - T )| 0 1 0 @end example @end ifnottex where `@math{N}' is the emission coefficient, which is a model parameter, and the other symbols have the same meaning as above. Note that for Schottky barrier diodes, the value of the saturation current temperature exponent, `@math{XTI}', is usually 2. Temperature appears explicitly in the value of junction potential, `@option{U}' (in NGSPICE @option{PHI}), for all the device models. The temperature dependence is determined by: @tex $$ U(T) = {k T \over q} \log_e \left| N_a N_d \over N_i T^2 \right| $$ @end tex @ifnottex @example | N N | a d kT |------ | U(T) = -- log 2 q e |N (T) | i @end example @end ifnottex where `@math{k}' is Boltzmann's constant, `@math{q}' is the electronic charge, `@math{N_a}' is the acceptor impurity density, `@math{N_d}' is the donor impurity density, `@math{N_i}' is the intrinsic carrier concentration, and `@math{E_g}' is the energy gap. Temperature appears explicitly in the value of surface mobility, `@math{M_0}' (or @math{U_0}), for the MOSFET model. The temperature dependence is determined by: @tex $$ M_0(T) = {M_0(T_0) \over \left| T \over T_0 \right|^{1.5}} $$ @end tex @ifnottex @example M (T ) 0 0 M (T) = ------- 0 1.5 | T| |--| |T | 0 @end example @end ifnottex The effects of temperature on resistors, capacitor and inductors is modeled by the formula: @tex $$ R(T) = R(T_0) \bigl( 1 + TC_1 (T - T_0) + TC_2 (T - T_0)^2 \bigr) $$ @end tex @ifnottex @example 2 R(T) = R(T ) [1 + TC (T - T ) + TC (T - T ) ] 0 1 0 2 0 @end example @end ifnottex where `@math{T}' is the circuit temperature, `@math{T_0}' is the nominal temperature, and `@math{TC_1}' and `@math{TC_2}' are the first and second order temperature coefficients. @node Convergence, , Analysis at Different Temperatures, Supported Analyses @section Convergence Both dc and transient solutions are obtained by an iterative process which is terminated when both of the following conditions hold: @enumerate @item The nonlinear branch currents converge to within a tolerance of 0.1% or 1 picoamp (1.0e-12 Amp), whichever is larger. @item The node voltages converge to within a tolerance of 0.1% or 1 microvolt (1.0e-6 Volt), whichever is larger. @end enumerate Although the algorithm used in NGSPICE has been found to be very reliable, in some cases it fails to converge to a solution. When this failure occurs, the program terminates the job. Failure to converge in dc analysis is usually due to an error in specifying circuit connections, element values, or model parameter values. Regenerative switching circuits or circuits with positive feedback probably will not converge in the dc analysis unless the @code{OFF} option is used for some of the devices in the feedback path, or the @code{.NODESET} control line is used to force the circuit to converge to the desired state. @node Circuit Description, Circuit Elements and Models, Supported Analyses, Top @chapter Circuit Description @menu * General Structure and Conventions:: * Basics:: * Device Models:: * Subcircuits:: * INCLUDE:: @end menu @node General Structure and Conventions, Basics, Circuit Description, Circuit Description @section General Structure and Conventions The circuit to be analyzed is described to ngspice by a set of element lines, which define the circuit topology and element values, and a set of control lines, which define the model parameters and the run controls. The first line in the input file must be the title, and the last line must be "@code{.END}". The order of the remaining lines is arbitrary (except, of course, that continuation lines must immediately follow the line being continued). Each element in the circuit is specified by an element line that contains the element name, the circuit nodes to which the element is connected, and the values of the parameters that determine the electrical characteristics of the element. The first letter of the element name specifies the element type. The format for the NGSPICE element types is given in what follows. The strings @code{XXXXXXX}, @code{YYYYYYY}, and @code{ZZZZZZZ} denote arbitrary alphanumeric strings. For example, a resistor name must begin with the letter @code{R} and can contain one or more characters. Hence, @code{R}, @code{R1}, @code{RSE}, @code{ROUT}, and @code{R3AC2ZY} are valid resistor names. Details of each type of device are supplied in a following section. Fields on a line are separated by one or more blanks, a comma, an equal (`@code{=}') sign, or a left or right parenthesis; extra spaces are ignored. A line may be continued by entering a `@code{+}' (plus) in column 1 of the following line; NGSPICE continues reading beginning with column 2. A name field must begin with a letter (A through Z) and cannot contain any delimiters. A number field may be an integer field (12, -44), a floating point field (3.14159), either an integer or floating point number followed by an integer exponent (1e-14, 2.65e3), or either an integer or a floating point number followed by one of the following scale factors: @c TODO: put this in multiple columns. @ifnottex @math{@code{T} = 10^12} @math{@code{G} = 10^9} @math{@code{Meg} = 10^6} @math{@code{K} = 10^3} @math{@code{mil} = 25.4^-6} @math{@code{m} = 10^-3} @math{@code{u} = 10^-6} @math{@code{n} = 10^-9} @math{@code{p} = 10^-12} @math{@code{f} = 10^-15} @end ifnottex @tex $$ \eqalign{\code{T} &= 10^{12} \cr \code{G} &= 10^9 \cr \code{Meg} &= 10^6 \cr \code{K} &= 10^3 \cr \code{mil} &= 25.4^{-6} \cr \code{m} &= 10^{-3} \cr \code{u} &= 10^{-6} \cr \code{n} &= 10^{-9} \cr \code{p} &= 10^{-12} \cr \code{f} &= 10^{-15} \cr} $$ @end tex Letters immediately following a number that are not scale factors are ignored, and letters immediately following a scale factor are ignored. Hence, 10, 10V, 10Volts, and 10Hz all represent the same number, and M, MA, MSec, and MMhos all represent the same scale factor. Note that 1000, 1000.0, 1000Hz, 1e3, 1.0e3, 1kHz, and 1k all represent the same number. Nodes names may be arbitrary character strings. The datum (ground) node must be named `0' (zero). Note the difference in NGSPICE where the nodes are treated as character strings and not evaluated as numbers, thus `0' and `00' are distinct nodes in NGSPICE but not in SPICE2. NGSPICE needs that the following topological constraints are satisfied: @itemize @bullet @item The circuit cannot contain a loop of voltage sources and/or inductors and cannot contain a cut-set of current sources and/or capacitors. @item Each node in the circuit must have a dc path to ground. @item Every node must have at least two connections except for transmission line nodes (to permit unterminated transmission lines) and MOSFET substrate nodes (which have two internal connections anyway). @end itemize @node Basics, Device Models, General Structure and Conventions, Circuit Description @section Basics: Title Line, Comment Lines and .END Line @menu * Title Line:: * END:: * Comments:: @end menu @node Title Line, END, Basics, Basics @subsection Title Line Examples: @example POWER AMPLIFIER CIRCUIT TEST OF CAM CELL @end example The title line must be the first in the input file. Its contents are printed verbatim as the heading for each section of output. @node END, Comments, Title Line, Basics @subsection .END Line Examples: @example .END @end example The "End" line must always be the last in the input file. Note that the period is an integral part of the name. @node Comments, , END, Basics @subsection Comments General Form: @example * @end example Examples: @example * RF=1K Gain should be 100 * Check open-loop gain and phase margin @end example The asterisk in the first column indicates that this line is a comment line. Comment lines may be placed anywhere in the circuit description. Note that NGSPICE also considers any line with leading white space to be a comment. @node Device Models, Subcircuits, Basics, Circuit Description @section Device Models General form: @example .MODEL MNAME TYPE(PNAME1=PVAL1 PNAME2=PVAL2 ... ) @end example Examples: @example .MODEL MOD1 NPN (BF=50 IS=1E-13 VBF=50) @end example Most simple circuit elements typically require only a few parameter values. However, some devices (semiconductor devices in particular) that are included in NGSPICE require many parameter values. Often, many devices in a circuit are defined by the same set of device model parameters. For these reasons, a set of device model parameters is defined on a separate .MODEL line and assigned a unique model name. The device element lines in NGSPICE then refer to the model name. For these more complex device types, each device element line contains the device name, the nodes to which the device is connected, and the device model name. In addition, other optional parameters may be specified for some devices: geometric factors and an initial condition (see the following section on Transistors and Diodes for more details). MNAME in the above is the model name, and type is one of the following fifteen types: @vtable @code @item R Semiconductor resistor model @item C Semiconductor capacitor model @item L Inductor model @item SW Voltage controlled switch @item CSW Current controlled switch @item URC Uniform distributed RC model @item LTRA Lossy transmission line model @item D Diode model @item NPN NPN BJT model @item PNP PNP BJT model @item NJF N-channel JFET model @item PJF P-channel JFET model @item NMOS N-channel MOSFET model @item PMOS P-channel MOSFET model @item NMF N-channel MESFET model @item PMF P-channel MESFET model @end vtable Parameter values are defined by appending the parameter name followed by an equal sign and the parameter value. Model parameters that are not given a value are assigned the default values given below for each model type. Models, model parameters, and default values are listed in the next section along with the description of device element lines. @node Subcircuits, INCLUDE, Device Models, Circuit Description @section Subcircuits A subcircuit that consists of NGSPICE elements can be defined and referenced in a fashion similar to device models. The subcircuit is defined in the input file by a grouping of element lines; the program then automatically inserts the group of elements wherever the subcircuit is referenced. There is no limit on the size or complexity of subcircuits, and subcircuits may contain other subcircuits. An example of subcircuit usage is given in Appendix A. @menu * SUBCKT:: * ENDS:: * Subcircuit Calls:: @end menu @node SUBCKT, ENDS, Subcircuits, Subcircuits @subsection .SUBCKT Line General form: @example .SUBCKT subnam N1 @end example Examples: @example .SUBCKT OPAMP 1 2 3 4 @end example A circuit definition is begun with a .SUBCKT line. SUBNAM is the subcircuit name, and N1, N2, ... are the external nodes, which cannot be zero. The group of element lines which immediately follow the .SUBCKT line define the subcircuit. The last line in a subcircuit definition is the .ENDS line (see below). Control lines may not appear within a subcircuit definition; however, subcircuit definitions may contain anything else, including other subcircuit definitions, device models, and subcircuit calls (see below). Note that any device models or subcircuit definitions included as part of a subcircuit definition are strictly local (i.e., such models and definitions are not known outside the subcircuit definition). Also, any element nodes not included on the .SUBCKT line are strictly local, with the exception of 0 (ground) which is always global. @node ENDS, Subcircuit Calls, SUBCKT, Subcircuits @subsection ENDS Line General form: @example .ENDS @end example Examples: @example .ENDS OPAMP @end example The "Ends" line must be the last one for any subcircuit definition. The subcircuit name, if included, indicates which subcircuit definition is being terminated; if omitted, all subcircuits being defined are terminated. The name is needed only when nested subcircuit definitions are being made. @node Subcircuit Calls, , ENDS, Subcircuits @subsection Subcircuit Calls General form: @example XYYYYYYY N1 SUBNAM @end example Examples: @example X1 2 4 17 3 1 MULTI @end example Subcircuits are used in NGSPICE by specifying pseudo-elements beginning with the letter X, followed by the circuit nodes to be used in expanding the subcircuit. @node INCLUDE, , Subcircuits, Circuit Description @section INCLUDE General form: @example .INCLUDE filename @end example Examples: @example .INCLUDE /users/spice/common/wattmeter.cir @end example Frequently, portions of circuit descriptions will be reused in several input files, particularly with common models and subcircuits. In any ngspice input file, the ".include" line may be used to copy some other file as if that second file appeared in place of the ".include" line in the original file. There is no restriction on the file name imposed by ngspice beyond those imposed by the local operating system. @node Circuit Elements and Models, Analyses and Output Control, Circuit Description, Top @chapter Circuit Elements and Models Data fields that are enclosed in less-than and greater-than signs ('< >') are optional. All indicated punctuation (parentheses, equal signs, etc.) is optional but indicate the presence of any delimiter. Further, future implementations may require the punctuation as stated. A consistent style adhering to the punctuation shown here makes the input easier to understand. With respect to branch voltages and currents, NGSPICE uniformly uses the associated reference convention (current flows in the direction of voltage drop). @menu * General options and information:: * Elementary Devices:: * Voltage and Current Sources:: * Transmission Lines:: * Transistors and Diodes:: @end menu @node General options and information, Simulating more devices in parallel, Circuit Elements and Models, Circuit Elements and Models @section General options and information @menu * Simulating more devices in parallel:: * Technology scaling:: * Model binning:: @end menu @node Simulating more devices in parallel, Technology scaling, General options and information, General options and information @subsection Simulating more devices in parallel If you need to simulate more devices of the same kind in parallel, you can use the @option{m} (often called parallel multiplier) option which is available for all instances except transmission lines and sources (both independent and controlled). The parallel multiplier is implemented by multiplying by the value of @option{m} the element's matrix stamp, thus it cannot be used to accurately simulate larger devices in integrated circuits. The netlist below show how to correctly use the parallel multiplier: @example Multiple devices d1 2 0 mydiode m=10 d01 1 0 mydiode d02 1 0 mydiode d03 1 0 mydiode d04 1 0 mydiode d05 1 0 mydiode d06 1 0 mydiode d07 1 0 mydiode d08 1 0 mydiode d09 1 0 mydiode d10 1 0 mydiode ... @end example The @code{d1} instance connected between nodes 2 and 0 is equivalent to the parallel @code{d01-d10} connected between 1 and 0. @node Technology scaling, Model binning, Simulating more devices in parallel, General options and information @subsection Technology scaling Still to be implemented and written. @node Model binning, Elementary Devices, Technology scaling, General options and information @subsection Model binning Still to be implemented and written. @node Elementary Devices, Resistors, Model binning, Circuit Elements and Models @section Elementary Devices @menu * Resistors:: * Semiconductor Resistors:: * Semiconductor Resistor Model (R):: * Capacitors:: * Semiconductor Capacitors:: * Semiconductor Capacitor Model (C):: * Inductors:: * Inductor model:: * Coupled (Mutual) Inductors:: * Switches:: * Switch Model (SW/CSW):: @end menu @node Resistors, Semiconductor Resistors, Elementary Devices, Elementary Devices @subsection Resistors General form: @example RXXXXXXX n+ n- value + @end example Examples: @example R1 1 2 100 RC1 12 17 1K R2 5 7 1K ac=2K RL 1 4 2K m=2 @end example Ngspice has a fairly complex model for resistors. It can simulate both discrete and semiconductor resistors. Semiconductor resistors in ngspice means: resistors described by geometrical parameters. So, do not expect detailed modelling of semiconductor effects. @option{n+} and @option{n-} are the two element nodes, @option{value} is the resistance (in ohms) and may be positive or negative but not zero. @sc{Hint}: If you need to simulate very small resistors (0.001 Ohm or less), you should use CCVS (transresistance), it is less efficient but improves overall numerical accuracy. Think about that a small resistance is a large conductance. Ngspice can assign a resistor instance a different value for AC analysis, specified using the @option{ac} keyword. This value must not be zero as described above. The AC resistance is used in AC analysis only (not Pole-Zero nor noise). If you do not specify the @option{ac} parameter, it is defaulted to @option{value}. If you want to simulate temperature dependence of a resistor, you need to specify its temperature coefficients, using a @command{.model} line, like in the example below: @example RE1 1 2 700 std dtemp=5 .MODEL std tc1=0.001 @end example Instance temperature is useful even if resistance does not varies with it, since the thermal noise generated by a resistor depends on its absolute temperature. Resistors in ngspice generates two different noises: thermal and flicker. While thermal noise is always generated in the resistor, to add a flicker noise source you have to add a @command{.model} card defining the flicker noise parameters. It is possible to simulate resistors that do not generate any kind of noise using the @option{noisy} keyword and assigning zero to it, as in the following example: @example Rmd 134 57 1.5k noisy=0 @end example Ngspice calculates the nominal resistance as described below: @tex $$ R_{nom} = {{{\rm VALUE} * {\rm scale}} \over m} $$ $$ R_{acnom} = {{{\rm ac} * {\rm scale}} \over m} $$ @end tex @ifnottex @example Rnom = value * scale / m Racnom = ac * scale / m @end example @end ifnottex If you are interested in temperature effects or noise equations, read the following section on semiconductor resistors. @node Semiconductor Resistors, Semiconductor Resistor Model (R), Resistors, Elementary Devices @subsection Semiconductor Resistors General form: @example RXXXXXXX n+ n- + m= @end example Examples: @example RLOAD 2 10 10K RMOD 3 7 RMODEL L=10u W=1u @end example This is the more general form of the resistor presented before (@pxref{Resistors}) and allows the modelling of temperature effects and for the calculation of the actual resistance value from strictly geometric information and the specifications of the process. If @option{value} is specified, it overrides the geometric information and defines the resistance. If @option{mname} is specified, then the resistance may be calculated from the process information in the model @option{mname} and the given @option{length} and @option{width}. If @option{value} is not specified, then @option{mname} and @option{length} must be specified. If @option{width} is not specified, then it is taken from the default width given in the model. The (optional) @option{temp} value is the temperature at which this device is to operate, and overrides the temperature specification on the @command{.option} control line and the value specified in @option{dtemp}. @node Semiconductor Resistor Model (R), Capacitors, Semiconductor Resistors, Elementary Devices @subsection Semiconductor Resistor Model (R) The resistor model consists of process-related device data that allow the resistance to be calculated from geometric information and to be corrected for temperature. The parameters available are: @multitable {NARROW} {parameter measurement temperature} {ohm/@math{^o}C@math{^2}} {default} {example} @item name @tab parameter @tab units @tab default @tab example @item TC1 @tab first order temperature coeff. @tab ohm/@math{^o}C @tab 0.0 @item TC2 @tab second order temperature coeff. @tab ohm/@math{^o}C@math{^2} @tab 0.0 @item RSH @tab sheet resistance @tab ohm/[] @tab - @tab 50 @item DEFW @tab default width @tab meters @tab 1e-6 @tab 2e-6 @item NARROW @tab narrowing due to side etching @tab meters @tab 0.0 @tab 1e-7 @item SHORT @tab shortening due to side etching @tab meters @tab 0.0 @tab 1e-7 @item TNOM @tab parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @item KF @tab flicker noise coefficient @tab - @tab 0.0 @tab 1e-25 @item AF @tab flicker noise exponent @tab - @tab 0.0 @tab 1.0 @end multitable The sheet resistance is used with the narrowing parameter and @option{l} and @option{w} from the resistor device to determine the nominal resistance by the formula: @tex $$ R_{nom} = {\rm rsh} {l - {\rm SHORT} \over w - {\rm NARROW}} $$ @end tex @ifnottex @example l - SHORT Rnom = rsh ---------- w - NARROW @end example @end ifnottex @option{DEFW} is used to supply a default value for @option{w} if one is not specified for the device. If either @option{rsh} or @option{l} is not specified, then the standard default resistance value of 1k Ohm is used. @option{TNOM} is used to override the circuit-wide value given on the @command{.options} control line where the parameters of this model have been measured at a different temperature. After the nominal resistance is calculated, it is adjusted for temperature by the formula: @tex $$ R(T) = R({\rm TNOM}) \Bigl( 1 + TC_1 (T - {\rm TNOM}) + TC_2 (T-{\rm TNOM})^2 \Bigr) $$ where $R({\rm TNOM}) = R_{nom} \vert R_{acnom}$. @end tex @ifnottex @example 2 R(T) = R(TNOM) [1 + TC (T - TNOM) + TC (T - TNOM) ] 1 2 where R(TNOM) = Rnom or Racnom @end example @end ifnottex In the above formula, `@math{T}' represents the instance temperature, which can be explicitly using the @option{temp} keyword or os calculated using the circuit temperature and @option{dtemp}, if present. If both @option{temp} and @option{dtemp} are specified, the latter is ignored. Ngspice improves spice's resistors noise model, adding flicker noise (1/f) to it and the @option{noisy} keyword to simulate noiseless resistors. The thermal noise in resistors is modelled according to the equation: @tex $$ \bar{i^2_R} = {{4kT} \over R} \Delta f $$ @end tex @ifnottex @example ___ 2 4 k T i = ----- df r R @end example @end ifnottex where "k" is the Boltzmann's constant, and "T" the instance temperature. Flicker noise model is: @tex $$ \bar{i^2_{Rfn}} = {{\rm KF} I^{\rm AF}_R \over f} \Delta f $$ @end tex @ifnottex @example ____ AF 2 KF Ir i = ------- df Rfn f @end example @end ifnottex A small list of sheet resistances (in Ohm/[]) for conductors is shown below. The table represents typical values for MOS processes in the 0.5 - 1 um range. The table is taken from: @emph{N. Weste, K. Eshraghian - Principles of CMOS VLSI Design 2nd Edition, Addison Wesley}. @multitable @columnfractions .55 .15 .15 .15 @item Material @tab Min. @tab Typical @tab Max. @item Intermetal (metal1 - metal2) @tab 0.005 @tab 0.007 @tab 0.1 @item Top-metal (metal 3) @tab 0.003 @tab 0.004 @tab 0.05 @item Polysilicon @tab 15 @tab 20 @tab 30 @item Silicide @tab 2 @tab 3 @tab 6 @item Diffusion(n+,p+) @tab 10 @tab 25 @tab 100 @item Silicided diffusion @tab 2 @tab 4 @tab 10 @item n-well @tab 1000 @tab 2000 @tab 5000 @end multitable @node Capacitors, Semiconductor Capacitors, Semiconductor Resistor Model (R), Elementary Devices @subsection Capacitors General form: @example CXXXXXXX n+ n- + @end example Examples: @example CBYP 13 0 1UF COSC 17 23 10U IC=3V @end example Ngspice provides a detailed model for capacitors. Capacitors in the netlist can be specified giving their capacitance or their geometrical and physical characteristics. Following the original spice3 "convention", capacitors specified by their geometrical or physical characteristics are called "semiconductor capacitors" and are described in the next section. In this first form @option{n+} and @option{n-} are the positive and negative element nodes, respectively and @option{value} is the capacitance in Farads. Capacitance can be specified in the instance line as in the examples above or in a @command{.model} line, as in the example below: @example C1 15 5 cstd C2 2 7 cstd .model cstd C cap=3n @end example Both capacitors have a capacitance of 3nF. If you want to simulate temperature dependence of a capacitor, you need to specify its temperature coefficients, using a @command{.model} line, like in the example below: @example CEB 1 2 1u cap1 dtemp=5 .MODEL cap1 C tc1=0.001 @end example The (optional) initial condition is the initial (timezero) value of capacitor voltage (in Volts). Note that the initial conditions (if any) apply 'only' if the @option{uic} option is specified on the @command{.tran} control line. Ngspice calculates the nominal capacitance as described below: @tex $$ C_{nom} = {{{\rm value} * {\rm scale}} * m} $$ @end tex @ifnottex @example Cnom = value * scale * m @end example @end ifnottex @node Semiconductor Capacitors, Semiconductor Capacitor Model (C), Capacitors, Elementary Devices @subsection Semiconductor Capacitors General form: @example CXXXXXXX n+ n- + @end example Examples: @example CLOAD 2 10 10P CMOD 3 7 CMODEL L=10u W=1u @end example This is the more general form of the Capacitor presented in section (@pxref{Capacitors}), and allows for the calculation of the actual capacitance value from strictly geometric information and the specifications of the process. If @option{value} is specified, it defines the capacitance and both process and geometrical information are discarded. If @option{value} is not specified, the capacitance is calculated from information contained model @option{mname} and the given length and width (@option{l}, @option{w} keywords, respectively). It is possible to specify @option{mname} only, without geometrical dimensions and set the capacitance in the @command{.model} line (@pxref{Capacitors}). @node Semiconductor Capacitor Model (C), Inductors, Semiconductor Capacitors, Elementary Devices @subsection Semiconductor Capacitor Model (C) The capacitor model contains process information that may be used to compute the capacitance from strictly geometric information. @multitable {NARROW} {parameter measurement temperature} {F/@math{^o}C@math{^2}} {default} {example} @item name @tab parameter @tab units @tab default @tab example @item CAP @tab model capacitance @tab F @tab 0.0 @tab 1e-6 @item CJ @tab junction bottom capacitance @tab F/meters@math{^2} @tab - @tab 5e-5 @item CJSW @tab junction sidewall capacitance @tab F/meters @tab - @tab 2e-11 @item DEFW @tab default device width @tab meters @tab 1e-6 @tab 2e-6 @item DEFL @tab default device length @tab meters @tab 0.0 @tab 1e-6 @item NARROW @tab narrowing due to side etching @tab meters @tab 0.0 @tab 1e-7 @item SHORT @tab shorting due to side etching @tab meters @tab 0.0 @tab 1e-7 @item TC1 @tab first order temperature coeff. @tab F/@math{^o}C @tab 0.0 @tab 0.001 @item TC2 @tab second order temperature coeff. @tab F/@math{^o}C@math{^2} @tab 0.0 @tab 0.0001 @item TNOM @tab parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @item DI @tab relative dielectric constant @tab F/m @tab 0.0 @tab 1 @item THICK @tab insulator thickness @tab meters @tab 0.0 @tab 1e-9 @end multitable The capacitor has a capacitance computed as: If @option{value} is specified on the instance line then @tex $$ C_{nom} = {{{\rm value} * {\rm scale}} * m} $$ @end tex @ifnottex @example Cnom = value * scale * m @end example @end ifnottex If model capacitance is specified then @tex $$ C_{nom} = {{{\rm CAP} * {\rm scale}} * m} $$ @end tex @ifnottex @example Cnom = CAP * scale * m @end example @end ifnottex If neither @option{value} nor @option{CAP} are specified, then geometrical and physical parameters are take into account: @tex $$ {\rm C_{0}} = {\rm CJ} (l - {\rm SHORT}) (w - {\rm NARROW}) + 2 {\rm CJSW} (l - {\rm SHORT} + w - {\rm NARROW}) $$ @end tex @ifnottex @example C0 = CJ (l - NARROW) (w - NARROW) + 2 CJSW (l - SHORT + w - NARROW) @end example @end ifnottex @option{CJ} can be explicitly given on the @command{.model} line or calculated by physical parameters. When @option{CJ} is not given, is calculated as: If @option{THICK} is not zero: @tex if {\rm DI } is specified: $$ {\rm CJ } = {{{\rm DI} * \epsilon_{0}} \over {\rm THICK} } $$ otherwise: $$ {\rm CJ } = {{ \epsilon_{SiO_{2}}} \over {\rm THICK} } $$ with: $$ \epsilon_{0} = 8.854214871e-12 {F \over m} $$ $$ \epsilon_{SiO_{2}} = 3.4531479969e-11 {F \over m} $$ @end tex @ifnottex @example DI * eps 0 CJ = --------- if DI is specified THICK eps SiO 2 CJ = --------- if DI is not specified THICK with: eps = 8.854214871e-12 F/m 0 eps = 3.4531479969e-11 F/m SiO 2 @end example @end ifnottex @tex $$ C_{nom} = {C_{0} * {\rm scale} * m} $$ @end tex @ifnottex @example Cnom = C0 * scale * m @end example @end ifnottex After the nominal capacitance is calculated, it is adjusted for temperature by the formula: @tex $$ C(T) = C({\rm TNOM}) \Bigl( 1 + TC_1 (T - {\rm TNOM}) + TC_2 (T-{\rm TNOM})^2 \Bigr) $$ where $C({\rm TNOM}) = C_{nom}$. @end tex @ifnottex @example 2 C(T) = C(TNOM) [1 + TC (T - TNOM) + TC (T - TNOM) ] 1 2 where C(TNOM) = Cnom @end example @end ifnottex In the above formula, `@math{T}' represents the instance temperature, which can be explicitly using the @option{temp} keyword or os calculated using the circuit temperature and @option{dtemp}, if present. @node Inductors, Inductor model, Semiconductor Capacitor Model (C), Elementary Devices @subsection Inductors General form: @example LYYYYYYY n+ n- + @end example Examples: @example LLINK 42 69 1UH LSHUNT 23 51 10U IC=15.7MA @end example The inductor device implemented into ngspice has many enhancements over the original one. @option{n+} and @option{n-} are the positive and negative element nodes, respectively. @option{value} is the inductance in Henries. Inductance can be specified in the instance line as in the examples above or in a @command{.model} line, as in the example below: @example L1 15 5 indmod1 L2 2 7 indmod1 .model indmod1 L ind=3n @end example Both inductors have an inductance of 3nH. The @option{nt} is used in conjunction with a @command{.model} line, and is used to specify the number of turns of the inductor. If you want to simulate temperature dependence of an inductor, you need to specify its temperature coefficients, using a @command{.model} line, like in the example below: @example Lload 1 2 1u ind1 dtemp=5 .MODEL ind1 L tc1=0.001 @end example The (optional) initial condition is the initial (timezero) value of inductor current (in Amps) that flows from @option{n+}, through the inductor, to @option{n-}. Note that the initial conditions (if any) apply only if the @option{UIC} option is specified on the @command{.tran} analysis line. Ngspice calculates the nominal inductance as described below: @tex $$ L_{nom} = {{{\rm value} * {\rm scale}} \over m} $$ @end tex @ifnottex @example Lnom = value * scale / m @end example @end ifnottex @node Inductor model, Coupled (Mutual) Inductors, Inductors, Elementary Devices @subsection Inductor model The inductor model contains physical and geometrical information that may be used to compute the inductance of some common topologies like solenoids and toroids, wound in air or other material with constant magnetic permeability. @multitable @columnfractions .15 .4 .2 .1 .1 @item name @tab parameter @tab units @tab default @tab example @item IND @tab model inductance @tab H @tab 0.0 @tab 1e-3 @item CSECT @tab Cross section @tab meters@math{^2} @tab 0.0 @tab 1e-3 @item LENGTH @tab Length @tab meters @tab 0.0 @tab 1e-2 @item TC1 @tab first order temperature coeff. @tab F/@math{^o}C @tab 0.0 @tab 0.001 @item TC2 @tab second order temperature coeff. @tab F/@math{^o}C@math{^2} @tab 0.0 @tab 0.0001 @item TNOM @tab parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @item NT @tab number of turns @tab - @tab 0.0 @tab 10 @item MU @tab relative magnetic permeability @tab H/meters @tab 0.0 @tab - @end multitable The inductor has an inductance computed as: If @option{value} is specified on the instance line then @tex $$ L_{nom} = {{{\rm value} * {\rm scale}} \over m} $$ @end tex @ifnottex @example Lnom = value * scale / m @end example @end ifnottex If model inductance is specified then @tex $$ L_{nom} = {{{\rm IND} * {\rm scale}} \over m} $$ @end tex @ifnottex @example Lnom = IND * scale / m @end example @end ifnottex If neither @option{value} nor @option{IND} are specified, then geometrical and physical parameters are take into account. In the following formulas @option{NT} refers to both instance and model parameter (instance parameter overrides model parameter): If @option{LENGTH} is not zero: @tex if {\rm MU } is specified: $$ L_{nom} = {{{\rm MU} * \mu_0 * {\rm NT}^2 * {\rm CSECT}} \over {\rm LENGTH} } $$ otherwise: $$ L_{nom} = {{ \mu_0 * {\rm NT}^2 * {\rm CSECT}} \over {\rm LENGTH} } $$ with: $$ \mu_{0} = 1.25663706143592e-6 {H \over m} $$ @end tex @ifnottex @example 2 MU * mu * NT * CSECT 0 Lnom = -------------------- if MU is specified LENGTH 2 mu * NT * CSECT 0 Lnom = --------------- if MU is not specified LENGTH with: mu = 1.25663706143592e-6 H/m 0 @end example @end ifnottex After the nominal inductance is calculated, it is adjusted for temperature by the formula: @tex $$ L(T) = L({\rm TNOM}) \Bigl( 1 + TC_1 (T - {\rm TNOM}) + TC_2 (T-{\rm TNOM})^2 \Bigr) $$ where $L({\rm TNOM}) = L_{nom}$. @end tex @ifnottex @example 2 L(T) = L(TNOM) [1 + TC (T - TNOM) + TC (T - TNOM) ] 1 2 where L(TNOM) = Lnom @end example @end ifnottex In the above formula, `@math{T}' represents the instance temperature, which can be explicitly using the @option{temp} keyword or calculated using the circuit temperature and @option{dtemp}, if present. @node Coupled (Mutual) Inductors, Switches, Inductor model, Elementary Devices @subsection Coupled (Mutual) Inductors General form: @example KXXXXXXX LYYYYYYY LZZZZZZZ value @end example Examples: @example K43 LAA LBB 0.999 KXFRMR L1 L2 0.87 @end example LYYYYYYY and LZZZZZZZ are the names of the two coupled inductors, and @option{value} is the coefficient of coupling, K, which must be greater than 0 and less than or equal to 1. Using the 'dot' convention, place a 'dot' on the first node of each inductor. @node Switches, Switch Model (SW/CSW), Coupled (Mutual) Inductors, Elementary Devices @subsection Switches General form: @example SXXXXXXX N+ N- NC+ NC- MODEL WYYYYYYY N+ N- VNAM MODEL @end example Examples: @example s1 1 2 3 4 switch1 ON s2 5 6 3 0 sm2 off Switch1 1 2 10 0 smodel1 w1 1 2 vclock switchmod1 W2 3 0 vramp sm1 ON wreset 5 6 vclck lossyswitch OFF @end example Nodes 1 and 2 are the nodes between which the switch terminals are connected. The model name is mandatory while the initial conditions are optional. For the voltage controlled switch, nodes 3 and 4 are the positive and negative controlling nodes respectively. For the current controlled switch, the controlling current is that through the specified voltage source. The direction of positive controlling current flow is from the positive node, through the source, to the negative node. @node Switch Model (SW/CSW), , Switches, Elementary Devices @subsection Switch Model (SW/CSW) The switch model allows an almost ideal switch to be described in NGSPICE. The switch is not quite ideal, in that the resistance can not change from 0 to infinity, but must always have a finite positive value. By proper selection of the on and off resistances, they can be effectively zero and infinity in comparison to other circuit elements. The parameters available are: @multitable @columnfractions .15 .4 .2 .1 .1 @item name @tab parameter @tab units @tab default @tab switch @item VT @tab threshold voltage @tab Volts @tab 0.0 @tab S @item IT @tab threshold current @tab Amps @tab 0.0 @tab W @item VH @tab hysteresis voltage @tab Volts @tab 0.0 @tab S @item IH @tab hysteresis current @tab Amps @tab 0.0 @tab W @item RON @tab on resistance @tab Z @tab 1.0 @tab both @item ROFF @tab off resistance @tab Z @tab 1/GMIN* @tab both @end multitable *(See the .OPTIONS control line for a description of GMIN, its default value results in an off-resistance of 1.0e+12 ohms.) The use of an ideal element that is highly nonlinear such as a switch can cause large discontinuities to occur in the circuit node voltages. A rapid change such as that associated with a switch changing state can cause numerical roundoff or tolerance problems leading to erroneous results or timestep difficulties. The user of switches can improve the situation by taking the following steps: First, it is wise to set ideal switch impedances just high or low enough to be negligible with respect to other circuit elements. Using switch impedances that are close to "ideal" in all cases aggravates the problem of discontinuities mentioned above. Of course, when modelling real devices such as MOSFETS, the on resistance should be adjusted to a realistic level depending on the size of the device being modelled. If a wide range of ON to OFF resistance must be used in the switches (ROFF/RON >1e+12), then the tolerance on errors allowed during transient analysis should be decreased by using the .OPTIONS control line and specifying TRTOL to be less than the default value of 7.0. When switches are placed around capacitors, then the option CHGTOL should also be reduced. Suggested values for these two options are 1.0 and 1e-16 respectively. These changes inform NGSPICE to be more careful around the switch points so that no errors are made due to the rapid change in the circuit. @node Voltage and Current Sources, Transmission Lines, ,Circuit Elements and Models @section Voltage and Current Sources @menu * Independent Sources:: * Linear Dependent Sources:: * Non-linear Dependent Sources:: @end menu @node Independent Sources, Linear Dependent Sources, Voltage and Current Sources, Voltage and Current Sources @subsection Independent Sources General form: @example VXXXXXXX N+ N- < DC/TRAN VALUE> >> + >> >> IYYYYYYY N+ N- < DC/TRAN VALUE> >> + >> >> @end example Examples: @example VCC 10 0 DC 6 VIN 13 2 0.001 AC 1 SIN(0 1 1MEG) ISRC 23 21 AC 0.333 45.0 SFFM(0 1 10K 5 1K) VMEAS 12 9 VCARRIER 1 0 DISTOF1 0.1 -90.0 VMODULATOR 2 0 DISTOF2 0.01 IIN1 1 5 AC 1 DISTOF1 DISTOF2 0.001 @end example N+ and N- are the positive and negative nodes, respectively. Note that voltage sources need not be grounded. Positive current is assumed to flow from the positive node, through the source, to the negative node. A current source of positive value forces current to flow out of the N+ node, through the source, and into the N- node. Voltage sources, in addition to being used for circuit excitation, are the 'ammeters' for NGSPICE, that is, zero valued voltage sources may be inserted into the circuit for the purpose of measuring current. They of course have no effect on circuit operation since they represent short-circuits. DC/TRAN is the dc and transient analysis value of the source. If the source value is zero both for dc and transient analyses, this value may be omitted. If the source value is time-invariant (e.g., a power supply), then the value may optionally be preceded by the letters DC. ACMAG is the ac magnitude and ACPHASE is the ac phase. The source is set to this value in the ac analysis. If ACMAG is omitted following the keyword AC, a value of unity is assumed. If ACPHASE is omitted, a value of zero is assumed. If the source is not an ac small-signal input, the keyword AC and the ac values are omitted. DISTOF1 and DISTOF2 are the keywords that specify that the independent source has distortion inputs at the frequencies F1 and F2 respectively (see the description of the .DISTO control line). The keywords may be followed by an optional magnitude and phase. The default values of the magnitude and phase are 1.0 and 0.0 respectively. Any independent source can be assigned a time-dependent value for transient analysis. If a source is assigned a time-dependent value, the time-zero value is used for dc analysis. There are five independent source functions: pulse, exponential, sinusoidal, piece-wise linear, and single-frequency FM. If parameters other than source values are omitted or set to zero, the default values shown are assumed. (TSTEP is the printing increment and TSTOP is the final time (see the .TRAN control line for explanation)). @menu * Pulse:: * Sinusoidal:: * Exponential:: * Piece-Wise Linear:: * Single-Frequency FM:: @end menu @node Pulse, Sinusoidal, Independent Sources, Independent Sources @subsubsection Pulse General form: @example PULSE(V1 V2 TD TR TF PW PER) @end example Examples: @example VIN 3 0 PULSE(-1 1 2NS 2NS 2NS 50NS 100NS) @end example @multitable @columnfractions .33 .33 .33 @item parameter @tab default value @tab units @item V1 (initial value) @tab @tab Volts or Amps @item V2 (pulsed value) @tab @tab Volts or Amps @item TD (delay time) @tab 0.0 @tab seconds @item TR (rise time) @tab TSTEP @tab seconds @item TF (fall time) @tab TSTEP @tab seconds @item PW (pulse width) @tab TSTOP @tab seconds @item PER(period) @tab TSTOP @tab seconds @end multitable A single pulse so specified is described by the following table: @multitable @columnfractions .3 .3 @item time @tab value @item 0 @tab V1 @item TD @tab V1 @item TD+TR @tab V2 @item TD+TR+PW @tab V2 @item TD+TR+PW+TF @tab V1 @item TSTOP @tab V1 @end multitable Intermediate points are determined by linear interpolation. @node Sinusoidal, Exponential, Pulse, Independent Sources @subsubsection Sinusoidal General form: @example SIN(VO VA FREQ TD THETA) @end example Examples: @example VIN 3 0 SIN(0 1 100MEG 1NS 1E10) @end example @multitable @columnfractions .3 .3 .3 @item parameters @tab default value @tab units @item VO (offset) @tab @tab Volts or Amps @item VA (amplitude) @tab @tab Volts or Amps @item FREQ (frequency) @tab 1/TSTOP @tab Hz @item TD (delay) @tab 0.0 @tab seconds @item THETA (damping factor) @tab 0.0 @tab 1/seconds @end multitable The shape of the waveform is described by the following table: @tex $$ V(t) = \cases{V0 ,&if $0\leq t) @end example Examples: @example VCLOCK 7 5 PWL(0 -7 10NS -7 11NS -3 17NS -3 18NS -7 50NS -7) @end example Each pair of values (Ti, Vi) specifies that the value of the source is Vi (in Volts or Amps) at time=Ti. The value of the source at intermediate values of time is determined by using linear interpolation on the input values. @node Single-Frequency FM, , Piece-Wise Linear, Independent Sources @subsubsection Single-Frequency FM General Form: @example SFFM(VO VA FC MDI FS) @end example Examples: @example V1 12 0 SFFM(0 1M 20K 5 1K) @end example @example parameter default value units ------------------------------------------------------ VO (offset) Volts or Amps VA (amplitude) Volts or Amps FC (carrier frequency) 1/TSTOP Hz MDI (modulation index) FS (signal frequency) 1/TSTOP Hz @end example The shape of the waveform is described by the following equation: @tex $$ V(t)=V_O + V_A \sin\left| 2 J FC t + MDI \sin(2 J FS t)\right| $$ @end tex @ifnottex @example | | V(t)=V + V sin 2 J FC t + MDI sin(2 J FS t) O A | | @end example @end ifnottex @node Linear Dependent Sources, Non-linear Dependent Sources, Independent Sources, Voltage and Current Sources @subsection Linear Dependent Sources NGSPICE allows circuits to contain linear dependent sources characterized by any of the four equations @tex $$ i = g v \qquad v = e v \qquad i = f i \qquad v = h i $$ @end tex @ifnottex @example i = g v v = e v i = f i v = h i @end example @end ifnottex where g, e, f, and h are constants representing transconductance, voltage gain, current gain, and transresistance, respectively. @menu * Linear Voltage-Controlled Current Sources:: * Linear Voltage-Controlled Voltage Sources:: * Linear Current-Controlled Current Sources:: * Linear Current-Controlled Voltage Sources:: @end menu @node Linear Voltage-Controlled Current Sources, Linear Voltage-Controlled Voltage Sources, Linear Dependent Sources, Linear Dependent Sources @subsubsection Linear Voltage-Controlled Current Sources General form: @example GXXXXXXX N+ N- NC+ NC- VALUE @end example Examples: @example G1 2 0 5 0 0.1MMHO @end example N+ and N- are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. NC+ and NCare the positive and negative controlling nodes, respectively. VALUE is the transconductance (in mhos). @node Linear Voltage-Controlled Voltage Sources, Linear Current-Controlled Current Sources, Linear Voltage-Controlled Current Sources, Linear Dependent Sources @subsubsection Linear Voltage-Controlled Voltage Sources General form: @example EXXXXXXX N+ N- NC+ NC- VALUE @end example Examples: @example E1 2 3 14 1 2.0 @end example N+ is the positive node, and N- is the negative node. NC+ and NC- are the positive and negative controlling nodes, respectively. VALUE is the voltage gain. @node Linear Current-Controlled Current Sources, Linear Current-Controlled Voltage Sources, Linear Voltage-Controlled Voltage Sources, Linear Dependent Sources @subsubsection Linear Current-Controlled Current Sources General form: @example FXXXXXXX N+ N- VNAM VALUE @end example Examples: @example F1 13 5 VSENS 5 @end example N+ and N- are the positive and negative nodes, respectively. Current flow is from the positive node, through the source, to the negative node. VNAM is the name of a voltage source through which the controlling current flows. The direction of positive controlling current flow is from the positive node, through the source, to the negative node of VNAM. VALUE is the current gain. @node Linear Current-Controlled Voltage Sources, , Linear Current-Controlled Current Sources, Linear Dependent Sources @subsubsection Linear Current-Controlled Voltage Sources General form: @example HXXXXXXX N+ N- VNAM VALUE @end example Examples: @example HX 5 17 VZ 0.5K @end example N+ and N- are the positive and negative nodes, respectively. VNAM is the name of a voltage source through which the controlling current flows. The direction of positive controlling current flow is from the positive node, through the source, to the negative node of VNAM. VALUE is the transresistance (in ohms). @node Non-linear Dependent Sources, , Linear Dependent Sources, Voltage and Current Sources @subsection Non-linear Dependent Sources General form: @example BXXXXXXX N+ N- @end example Examples: @example B1 0 1 I=cos(v(1))+sin(v(2)) B1 0 1 V=ln(cos(log(v(1,2)^2)))-v(3)^4+v(2)^v(1) B1 3 4 I=17 B1 3 4 V=exp(pi^i(vdd)) @end example N+ is the positive node, and N- is the negative node. The values of the V and I parameters determine the voltages and currents across and through the device, respectively. If I is given then the device is a current source, and if V is given the device is a voltage source. One and only one of these parameters must be given. The small-signal AC behaviour of the nonlinear source is a linear dependent source (or sources) with a proportionality constant equal to the derivative (or derivatives) of the source at the DC operating point. The expressions given for V and I may be any function of voltages and currents through voltage sources in the system. The following functions of real variables are defined: @multitable @columnfractions .2 .2 .2 .2 @item abs @tab asinh @tab cosh @tab sin @item acos @tab atan @tab exp @tab sinh @item acosh @tab atanh @tab ln @tab sqrt @item asin @tab cos @tab log @tab tan @end multitable The function "u" is the unit step function, with a value of one for arguments greater than zero and a value of zero for arguments less than zero. The function "uramp" is the integral of the unit step: for an input x, the value is zero if x is less than zero, or if x is greater than zero the value is x. The function "u2" returns a value of zero for arguments less than zero, one for arguments greater than one and assumes the value of the argument between these limits .These three functions are useful in sythesizing piece-wise non-linear functions, though convergence may be adversely affected. Note: "u2" function has been introduced in rework-11. The following standard operators are defined: @example + - * / @{ @} unary - @end example If the argument of log, ln, or sqrt becomes less than zero, the absolute value of the argument is used. If a divisor becomes zero or the argument of log or ln becomes zero, an error will result. Other problems may occur when the argument for a function in a partial derivative enters a region where that function is undefined. To get time into the expression you can integrate the current from a constant current source with a capacitor and use the resulting voltage (don't forget to set the initial voltage across the capacitor). Non-linear resistors, capacitors, and inductors may be synthesized with the nonlinear dependent source. Non-linear resistors are obvious. Nonlinear capacitors and inductors are implemented with their linear counterparts by a change of variables implemented with the nonlinear dependent source. The following subcircuit will implement a nonlinear capacitor: @example .Subckt nlcap pos neg * Bx: calculate f(input voltage) Bx 1 0 v = f(v(pos,neg)) * Cx: linear capacitance Cx 2 0 1 * Vx: Ammeter to measure current into the capacitor Vx 2 1 DC 0Volts * Drive the current through Cx back into the circuit Fx pos neg Vx 1 .ends @end example Non-linear inductors are similar. @node Transmission Lines, Transistors and Diodes, Voltage and Current Sources, Circuit Elements and Models @section Transmission Lines @menu * Lossless Transmission Lines:: * Lossy Transmission Lines:: * Lossy Transmission Line Model (LTRA):: * Uniform Distributed RC Lines (Lossy):: * Uniform Distributed RC Model (URC):: @end menu @node Lossless Transmission Lines, Lossy Transmission Lines, Transmission Lines, Transmission Lines @subsection Lossless Transmission Lines General form: @example TXXXXXXX N1 N2 N3 N4 Z0=VALUE > + @end example Examples: @example T1 1 0 2 0 Z0=50 TD=10NS @end example N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. Z0 is the characteristic impedance. The length of the line may be expressed in either of two forms. The transmission delay, TD, may be specified directly (as TD=10ns, for example). Alternatively, a frequency F may be given, together with NL, the normalized electrical length of the transmission line with respect to the wavelength in the line at the frequency F. If a frequency is specified but NL is omitted, 0.25 is assumed (that is, the frequency is assumed to be the quarter-wave frequency). Note that although both forms for expressing the line length are indicated as optional, one of the two must be specified. Note that this element models only one propagating mode. If all four nodes are distinct in the actual circuit, then two modes may be excited. To simulate such a situation, two transmission-line elements are required. (see the example in Appendix A for further clarification.) The (optional) initial condition specification consists of the voltage and current at each of the transmission line ports. Note that the initial conditions (if any) apply 'only' if the UIC option is specified on the .TRAN control line. Note that a lossy transmission line (see below) with zero loss may be more accurate than than the lossless transmission line due to implementation details. @node Lossy Transmission Lines, Lossy Transmission Line Model (LTRA), Lossless Transmission Lines, Transmission Lines @subsection Lossy Transmission Lines General form: @example OXXXXXXX N1 N2 N3 N4 MNAME @end example Examples: @example O23 1 0 2 0 LOSSYMOD OCONNECT 10 5 20 5 INTERCONNECT @end example This is a two-port convolution model for singleconductor lossy transmission lines. N1 and N2 are the nodes at port 1; N3 and N4 are the nodes at port 2. Note that a lossy transmission line with zero loss may be more accurate than than the lossless transmission line due to implementation details. @node Lossy Transmission Line Model (LTRA), Uniform Distributed RC Lines (Lossy), Lossy Transmission Lines, Transmission Lines @subsection Lossy Transmission Line Model (LTRA) The uniform RLC/RC/LC/RG transmission line model (referred to as the LTRA model henceforth) models a uniform constant-parameter distributed transmission line. The RC and LC cases may also be modelled using the URC and TRA models; however, the newer LTRA model is usually faster and more accurate than the others. The operation of the LTRA model is based on the convolution of the transmission line's impulse responses with its inputs (see [8]). The LTRA model takes a number of parameters, some of which must be given and some of which are optional. @multitable @columnfractions .15 .4 .2 .1 .1 @item name @tab parameter @tab units/type @tab default @tab example @item name @tab parameter @tab units/type @tab default @tab example @item R @tab resistance/length @tab Z/unit @tab 0.0 @tab 0.2 @item L @tab inductance/length @tab henrys/unit @tab 0.0 @tab 9.13e-9 @item G @tab conductance/length @tab mhos/unit @tab 0.0 @tab 0.0 @item C @tab capacitance/length @tab farads/unit @tab 0.0 @tab 3.65e-12 @item LEN @tab length of line @tab no default @tab 1.0 @item REL @tab breakpoint control @tab arbitrary unit @tab 1 @tab 0.5 @item ABS @tab breakpoint control @tab 1 @tab 5 @item NOSTEPLIMIT @tab don't limit timestep to less than line delay @tab flag @tab not set @tab set @item NOCONTROL @tab don't do complex timestep control @tab flag @tab not set @tab set @item LININTERP @tab use linear interpolation @tab flag @tab not set @tab set @item MIXEDINTERP @tab use linear when quadratic seems bad @tab not set @tab set @item COMPACTREL @tab special reltol for history compaction @tab flag @tab RELTOL @tab 1.0e-3 @item COMPACTABS @tab special abstol for history compaction @tab ABSTOL @tab 1.0e-9 @item TRUNCNR @tab use Newton-Raphson method for timestep control @tab flag @tab not set @tab set @item TRUNCDONTCUT @tab don't limit timestep to keep impulse-response errors low @tab flag @tab not set @tab set @end multitable The following types of lines have been implemented so far: RLC (uniform transmission line with series loss only), RC (uniform RC line), LC (lossless transmission line), and RG (distributed series resistance and parallel conductance only). Any other combination will yield erroneous results and should not be tried. The length LEN of the line must be specified. NOSTEPLIMIT is a flag that will remove the default restriction of limiting time-steps to less than the line delay in the RLC case. NOCONTROL is a flag that prevents the default limiting of the time-step based on convolution error criteria in the RLC and RC cases. This speeds up simulation but may in some cases reduce the accuracy of results. LININTERP is a flag that, when specified, will use linear interpolation instead of the default quadratic interpolation for calculating delayed signals. MIXEDINTERP is a flag that, when specified, uses a metric for judging whether quadratic interpolation is not applicable and if so uses linear interpolation; otherwise it uses the default quadratic interpolation. TRUNCDONTCUT is a flag that removes the default cutting of the time-step to limit errors in the actual calculation of impulse-response related quantities. COMPACTREL and COMPACTABS are quantities that control the compaction of the past history of values stored for convolution. Larger values of these lower accuracy but usually increase simulation speed. These are to be used with the TRYTOCOMPACT option, described in the .OPTIONS section. TRUNCNR is a flag that turns on the use of Newton-Raphson iterations to determine an appropriate timestep in the timestep control routines. The default is a trial and error procedure by cutting the previous timestep in half. REL and ABS are quantities that control the setting of breakpoints. The option most worth experimenting with for increasing the speed of simulation is REL. The default value of 1 is usually safe from the point of view of accuracy but occasionally increases computation time. A value greater than 2 eliminates all breakpoints and may be worth trying depending on the nature of the rest of the circuit, keeping in mind that it might not be safe from the viewpoint of accuracy. Breakpoints may usually be entirely eliminated if it is expected the circuit will not display sharp discontinuities. Values between 0 and 1 are usually not required but may be used for setting many breakpoints. COMPACTREL may also be experimented with when the option TRYTOCOMPACT is specified in a .OPTIONS card. The legal range is between 0 and 1. Larger values usually decrease the accuracy of the simulation but in some cases improve speed. If TRYTOCOMPACT is not specified on a .OPTIONS card, history compaction is not attempted and accuracy is high. NOCONTROL, TRUNCDONTCUT and NOSTEPLIMIT also tend to increase speed at the expense of accuracy. @node Uniform Distributed RC Lines (Lossy), Uniform Distributed RC Model (URC), Lossy Transmission Line Model (LTRA), Transmission Lines @subsection Uniform Distributed RC Lines (Lossy) General form: @example UXXXXXXX N1 N2 N3 MNAME L=LEN @end example Examples: @example U1 1 2 0 URCMOD L=50U URC2 1 12 2 UMODL l=1MIL N=6 @end example N1 and N2 are the two element nodes the RC line connects, while N3 is the node to which the capacitances are connected. MNAME is the model name, LEN is the length of the RC line in meters. LUMPS, if specified, is the number of lumped segments to use in modelling the RC line (see the model description for the action taken if this parameter is omitted). @node Uniform Distributed RC Model (URC), , Uniform Distributed RC Lines (Lossy), Transmission Lines @subsection Uniform Distributed RC Model (URC) The URC model is derived from a model proposed by L. Gertzberrg in 1974. The model is accomplished by a subcircuit type expansion of the URC line into a network of lumped RC segments with internally generated nodes. The RC segments are in a geometric progression, increasing toward the middle of the URC line, with @math{K} as a proportionality constant. The number of lumped segments used, if not specified for the URC line device, is determined by the following formula: @tex $$ N = { \log \left| F_{\rm max} {R\over L}{C \over L} 2 J L^2 \left| (K - 1) \over K \right|^2 \right| \over \log K } $$ @end tex @ifnottex @example 2 | R C |(K-1)| | _ _ 2 log|F 2 J L |-----| | max | L L | K | | N = ------------------------------ log K @end example @end ifnottex The URC line is made up strictly of resistor and capacitor segments unless the ISPERL parameter is given a nonzero value, in which case the capacitors are replaced with reverse biased diodes with a zero-bias junction capacitance equivalent to the capacitance replaced, and with a saturation current of ISPERL amps per meter of transmission line and an optional series resistance equivalent to RSPERL ohms per meter. @multitable @columnfractions .1 .45 .1 .15 .1 .1 @item name @tab parameter @tab units @tab default @tab example @item K @tab Propagation Constant @tab - @tab 2.0 @tab 1.2 @item FMAX @tab Maximum Frequency of interest @tab Hz @tab 1.0G @tab 6.5Meg @item RPERL @tab Resistance per unit length @tab Z/m @tab 1000 @tab 10 @item CPERL @tab Capacitance per unit length @tab F/m @tab 1.0e-15 @tab 1pF @item ISPERL @tab Saturation Current per unit length @tab A/m @tab 0 @tab - @item RSPERL @tab Diode Resistance per unit length @tab Z/m @tab 0 @tab - @end multitable @node Transistors and Diodes, , Transmission Lines, Circuit Elements and Models @section Transistors and Diodes The area factor used on the diode, BJT, JFET, and MESFET devices determines the number of equivalent parallel devices of a specified model. The affected parameters are marked with an asterisk under the heading 'area' in the model descriptions below. Several geometric factors associated with the channel and the drain and source diffusions can be specified on the MOSFET device line. Two different forms of initial conditions may be specified for some devices. The first form is included to improve the dc convergence for circuits that contain more than one stable state. If a device is specified OFF, the dc operating point is determined with the terminal voltages for that device set to zero. After convergence is obtained, the program continues to iterate to obtain the exact value for the terminal voltages. If a circuit has more than one dc stable state, the OFF option can be used to force the solution to correspond to a desired state. If a device is specified OFF when in reality the device is conducting, the program still obtains the correct solution (assuming the solutions converge) but more iterations are required since the program must independently converge to two separate solutions. The .NODESET control line serves a similar purpose as the OFF option. The .NODESET option is easier to apply and is the preferred means to aid convergence. The second form of initial conditions are specified for use with the transient analysis. These are true 'initial conditions' as opposed to the convergence aids above. See the description of the .IC control line and the .TRAN control line for a detailed explanation of initial conditions. @menu * Junction Diodes:: * Diode Model (D):: * Diode Equations:: * Bipolar Junction Transistors (BJTs):: * BJT Models (NPN/PNP):: * Junction Field-Effect Transistors (JFETs):: * JFET Models (NJF/PJF):: * MOSFETs:: * MOSFET Models (NMOS/PMOS):: * MESFETs:: * MESFET Models (NMF/PMF):: @end menu @node Junction Diodes, Diode Model (D), Transistors and Diodes, Transistors and Diodes @subsection Junction Diodes General form: @example DXXXXXXX n+ n- mname + @end example Examples: @example DBRIDGE 2 10 DIODE1 DCLMP 3 7 DMOD 3.0 IC=0.2 @end example The pn junction (diode) implemented in NGSPICE expands the original spice's implementation. Perimetral effects and high injection level have been introduced into the original model and temperature dependence of some parameters has been added. @option{n+} and @option{n-} are the positive and negative nodes, respectively. @option{mname} is the model name, @option{area} is the area factor, @option{pj} is the perimeter factor, and @option{off} indicates an (optional)starting condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification using @option{ic} is intended for use with the @option{uic} option on the @code{.tran} control line, when a transient analysis is desired starting from other than the quiescent operating point. You should supply the inital voltage across the diode there. The (optional) @option{temp} value is the temperature at which this device is to operate, and overrides the temperature specification on the @code{.option} control line. As always, instance temperature can be specified as an offset to the circuit temperature with the @option{dtemp} option. @node Diode Model (D), Diode Equations, Junction Diodes, Transistors and Diodes @subsection Diode Model (D) The dc characteristics of the diode are determined by the parameters @option{IS} and @option{N}. An ohmic resistance, @option{RS}, is included. Charge storage effects are modelled by a transit time, @option{TT}, and a nonlinear depletion layer capacitance which is determined by the parameters @option{CJO}, @option{VJ}, and @option{M}. The temperature dependence of the saturation current is defined by the parameters @option{EG}, the energy and @option{XTI}, the saturation current temperature exponent. The nominal temperature at which these parameters were measured is @option{TNOM}, which defaults to the circuit-wide value specified on the @code{.options} control line. Reverse breakdown is modelled by an exponential increase in the reverse diode current and is determined by the parameters @option{BV} and @option{IBV} (both of which are positive numbers). @sc{Junction DC parameters} @multitable @columnfractions .10 .40 .1 .15 .15 .10 @item name @tab parameter @tab units @tab default @tab example @tab scale factor @item BV @tab reverse breakdown voltage @tab V @tab infinite @tab 40.0 @item IBV @tab current at breakdown voltage @tab A @tab 1.0e-3 @tab 1.0e-4 @item IK (IKF) @tab forward knee current @tab A @tab 1.0e-3 @tab 1.0e-6 @item IK @tab reverse knee current @tab A @tab 1.0e-3 @tab 1.0e-6 @item IS (JS) @tab saturation current @tab A @tab 1.0e-14 @tab 1.0e-16 @tab area @item JSW @tab Sidewall saturation current @tab A @tab 1.0e-14 @tab 1.0e-15 @tab perim. @item N @tab emission coefficient @tab - @tab 1 @tab 1.5 @item RS @tab ohmic resistance @tab Ohm @tab 0 @tab 100 @tab 1/area @end multitable @sc{Junction capacitance parameters} @multitable @columnfractions .10 .40 .1 .15 .15 .10 @item name @tab parameter @tab units @tab default @tab example @tab scale factor @item CJO (CJ0) @tab zero-bias junction bottowall capacitance @tab F @tab 0.0 @tab 2pF @tab area @item CJP (CJSW) @tab zero-bias junction sidewall capacitance @tab F @tab 0.0 @tab .1pF @tab perim. @item FC @tab coefficient for forward-bias depletion bottomwall capacitance formula @tab - @tab 0.5 @tab - @item FCS @tab coefficient for forward-bias depletion sidewall capacitance formula @tab - @tab 0.5 @tab - @item M (MJ) @tab Area junction grading coefficient @tab - @tab 0.5 @tab 0.5 @item MJSW @tab Periphery junction grading coefficient @tab - @tab 0.33 @tab 0.5 @item VJ @tab junction potential @tab V @tab 1 @tab 0.6 @item PHP @tab Periphery junction potential @tab V @tab 1 @tab 0.6 @item TT @tab transit-time @tab sec @tab 0 @tab 0.1ns @end multitable @sc{Temperature effects} @multitable @columnfractions .10 .40 .1 .15 .15 .10 @item name @tab parameter @tab units @tab default @tab example @tab scale factor @item EG @tab activation energy @tab eV @tab 1.11 @tab 1.11 Si @item @tab @tab @tab @tab 0.69 Sbd @item @tab @tab @tab @tab 0.67 Ge @item TM1 @tab 1st order tempco for MJ @tab 1/@math{^o}C @tab 0.0 @tab - @item TM2 @tab 2nd order tempco for MJ @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab - @item TNOM @tab parameter measurement temperature @tab C @tab 27 @tab 50 @item TRS @tab 1st order tempco for RS @tab 1/@math{^o}C @tab 0.0 @tab - @item TRS2 @tab 2nd order tempco for RS @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab - @item TTT1 @tab 1st order tempco for TT @tab 1/@math{^o}C @tab 0.0 @tab - @item TTT2 @tab 2nd order tempco for TT @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab - @item XTI @tab saturation-current temp. exp @tab - @tab 3.0 @tab 3.0 pn @item @tab @tab @tab @tab 2.0 Sbd @end multitable @sc{Noise modeling} @multitable @columnfractions .10 .40 .1 .15 .15 .10 @item name @tab parameter @tab units @tab default @tab example @tab scale factor @item KF @tab flicker noise coefficient @tab - @tab 0 @item AF @tab flicker noise exponent @tab - @tab 1 @end multitable @node Diode Equations, Bipolar Junction Transistors (BJTs), Diode Model (D), Transistors and Diodes @subsection Diode Equations The junction diode is the the basic semiconductor device and the simplest one modeled in NGSPICE, but it's model is quite complex, even if not all the physical phenomena affecting a pn junction are modelled. The diode is modeled in three different regions: @itemize @bullet @item Forward bias: the anode is more positive than the cathode, the diode is "on" and can conduct large currents. To avoid convergence problems and unrealistic high current, it is better to specify a series resistance to limit current with @option{RS} model parameter. @item Reverse bias: the cathode is more positive than the anode and the diode is "off". A reverse bias diode conducts a small leakage current. @item Breakdown: the breakdown region is modelled only if the @option{BV} model parameter is given. When a diode enters breakdown the current increase exponentially (remember to limit it). @option{BV} is a positive value. @end itemize @sc{Parameters Scaling} Model parameters are scaled using the unitless parameters @option{AREA} and @option{PJ} and the multiplier @option{M} as depicted below: @tex $$AREA_{eff} = {\rm AREA}\cdot{\rm M} $$ $$PJ_{eff} = {\rm PJ}\cdot{\rm M} $$ $$IS_{eff} = {\rm IS} \cdot AREA_{eff} + {\rm JSW} * PJ_{eff} $$ $$IBV_{eff} = {\rm IBV}\cdot AREA_{eff}$$ $$IK_{eff} = {\rm IK}\cdot AREA_{eff} $$ $$IKR_{eff} = {\rm IKR}\cdot AREA_{eff} $$ $$CJ_{eff} = {\rm CJ0}\cdot AREA_{eff} $$ $$CJP_{eff} = {\rm CJP}\cdot PJ_{eff} $$ @end tex @ifnottex @example AREAeff = AREA * M PJeff = PJ * M ISeff = IS * AREAeff + JSW * PJeff IKeff = IK * AREAeff IKReff = IKR * AREAeff CJeff = CJ0 * AREAeff CJPeff = CJP * PJeff @end example @end ifnottex @sc{Diode DC, Transient and AC model equations} @tex $$ I_D= \cases{IS_{eff} ( e^{q V_D \over N k T} - 1) + V_D * GMIN, &if $V_D \geq -3{NkT \over q}$\cr -IS_{eff} [1 + ({3NkT \over q V_D e })^3] + V_D * GMIN , &if $-BV_{eff} mname + @end example Examples: @example Q23 10 24 13 QMOD IC=0.6, 5.0 Q50A 11 26 4 20 MOD1 @end example @option{nc}, @option{nb}, and @option{ne} are the collector, base, and emitter nodes, respectively. @option{ns} is the (optional) substrate node.If unspecified, ground is used. @option{mname} is the model name, @option{area}, @option{areab}, @option{areac} are the area factors, and @option{off} indicates an (optional) initial condition on the device for the dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification using @option{ic=vbe, vce} is intended for use with the @option{uic} @command{.tran} control line, when a transient analysis is desired starting from other than the quiescent operating point. See the @command{.ic} control line description for a better way to set transient initial conditions. The (optional) @option{temp} value is the temperature at which this device is to operate, and overrides the temperature specification on the @command{.option} control line. Using @option{dtemp} option you can specify instance's temperature relative to the circuit temperature. @node BJT Models (NPN/PNP), Junction Field-Effect Transistors (JFETs), Bipolar Junction Transistors (BJTs), Transistors and Diodes @subsection BJT Models (NPN/PNP) NGSPICE provides two BJT device models. The @option{level} specifies the model to be used: @itemize @bullet @item level=1 : This is the original spice BJT model, and it is the default model if the @option{level} keyword is not specified on the @command{.model} line. @item level=2 : This is a modified version of the original spice BJT that models both vertical and lateral devices and includes temperature corrections of collector, emitter and base resistors. @end itemize The bipolar junction transistor model in NGSPICE is an adaptation of the integral charge control model of Gummel and Poon. This modified Gummel-Poon model extends the original model to include several effects at high bias levels. The model automatically simplifies to the simpler Ebers-Moll model when certain parameters are not specified. The parameter names used in the modified Gummel-Poon model have been chosen to be more easily understood by the program user, and to reflect better both physical and circuit design thinking. The dc model is defined by the parameters @option{IS}, @option{BF}, @option{NF}, @option{ISE}, @option{IKF}, amd @option{NE} which determine the forward current gain characteristics, @option{IS}, @option{BR}, @option{NR}, @option{ISC}, @option{IKR}, and @option{NC} which determine the reverse current gain characteristics, and @option{VAF} and @option{VAR} which determine the output conductance for forward and reverse regions. Level 2 model includes substrate saturation current @option{ISS}. Three ohmic resistances @option{RB}, @option{RC}, and @option{RE} are included, where @option{RB} can be high current dependent. Base charge storage is modelled by forward and reverse transit times, @option{TF} and @option{TR}, the forward transit time @option{TF} being bias dependent if desired, and nonlinear depletion layer capacitances which are determined by @option{CJE}, @option{VJE}, and @option{NJE} for the B-E junction, @option{CJC}, @option{VJC}, and @option{NJC} for the B-C junction and @option{CJS}, @option{VJS}, and @option{MJS} for the C-S (Collector-Substrate) junction. Level 2 model defines a substrate capacitance that will be connected to device's base or collector, to model lateral or vertical devices. The temperature dependence of the saturation currents, @option{IS} and @option{ISS} (for level 2 model), is determined by the energy-gap, @option{EG}, and the saturation current temperature exponent, @option{XTI}. Additionally base current temperature dependence is modelled by the beta temperature exponent @option{XTB} in the new model. The values specified are assumed to have been measured at the temperature @option{TNOM}, which can be specified on the @command{.options} control line or overridden by a specification on the @command{.model} line. The BJT parameters used in the modified Gummel-Poon model are listed below. The parameter names used in earlier versions of SPICE2 are still accepted. Modified Gummel-Poon BJT Parameters: @multitable @columnfractions .1 .40 .10 .15 .15 .1 @item name @tab parameter @tab units @tab default @tab example @tab scale factor @item SUBS @tab substrate connection: 1 for vertical geometry, -1 for lateral geometry. (level 2 only) @tab 1 @tab @tab 1.0e-15 @tab @item IS @tab transport saturation current @tab A @tab 1.0e-16 @tab 1.0e-15 @tab area @item ISS @tab reverse saturation current, substrate-to-collector for vertical device or substrate-to-base for lateral (level 2 only) @tab A @tab 1.0e-16 @tab 1.0e-15 @tab area @item BF @tab ideal maximum forward beta @tab - @tab 100 @tab 100 @item NF @tab forward current emission coefficient @tab - @tab 1.0 @tab 1 @item VAF @tab forward Early voltage @tab V @tab infinite @tab 200 @item IKF @tab corner for forward beta current roll-off @tab A @tab infinite @tab 0.01 @tab area @item ISE @tab B-E leakage saturation current @tab A @tab 0 @tab 1.0e-13 @tab area @item NE @tab B-E leakage emission coefficient @tab - @tab 1.5 @tab 2 @item BR @tab ideal maximum reverse beta @tab - @tab 1 @tab 0.1 @item NR @tab reverse current emission coefficient @tab - @tab 1 @tab 1 @item VAR @tab reverse Early voltage @tab V @tab infinite @tab 200 @item IKR @tab corner for reverse beta high current roll-off @tab A @tab infinite @tab 0.01 @tab area @item ISC @tab B-C leakage saturation current (area is "areab" for vertical devices and "areac" for lateral) @tab A @tab 0 @tab 1.0e-13 @tab area @item NC @tab B-C leakage emission coefficient @tab - @tab 2 @tab 1.5 @item RB @tab zero bias base resistance @tab Z @tab 0 @tab 100 @tab area @item IRB @tab current where base resistance falls halfway to its min value @tab A @tab infinite @tab 0.1 @tab area @item RBM @tab minimum base resistance at high currents @tab Z @tab RB 10 @tab area @item RE @tab emitter resistance @tab Z @tab 0 @tab 1 @tab area @item RC @tab collector resistance @tab Z @tab 0 @tab 10 @tab area @item CJE @tab B-E zero-bias depletion capacitance @tab F @tab 0 @tab 2pF @tab area @item VJE @tab B-E built-in potential @tab V @tab 0.75 @tab 0.6 @item MJE @tab B-E junction exponential factor @tab - @tab 0.33 @tab 0.33 @item TF @tab ideal forward transit time @tab sec @tab 0 @tab 0.1ns @item XTF @tab coefficient for bias dependence of TF @tab - @tab 0 @item VTF @tab voltage describing VBC dependence of TF @tab V @tab infinite @item ITF @tab high-current parameter for effect on TF @tab A @tab 0 @tab - @tab area @item PTF @tab excess phase at freq=1.0/(TF*2PI) Hz @tab deg @tab 0 @item CJC @tab B-C zero-bias depletion capacitance (area is "areab" for vertical devices and "areac" for lateral) @tab F @tab 0 @tab 2pF @tab area @item VJC @tab B-C built-in potential @tab V @tab 0.75 @tab 0.5 @item MJC @tab B-C junction exponential factor @tab - @tab 0.33 @tab 0.5 @item XCJC @tab fraction of B-C depletion capacitance connected to internal base node @tab - @tab 1 @item TR @tab ideal reverse transit time @tab sec @tab 0 @tab 10ns @item CJS @tab zero-bias collector-substrate capacitance (area is "areac" for vertical devices and "areab" for lateral) @tab F @tab 0 @tab 2pF @tab area @item VJS @tab substrate junction built-in potential @tab V @tab 0.75 @item MJS @tab substrate junction exponential factor @tab - @tab 0 @tab 0.5 @item XTB @tab forward and reverse beta temperature exponent @tab - @tab 0 @item EG @tab energy gap for temperature effect on IS @tab eV @tab 1.11 @item XTI @tab temperature exponent for effect on IS @tab - @tab 3 @item KF @tab flicker-noise coefficient @tab - @tab 0 @item AF @tab flicker-noise exponent @tab - @tab 1 @item FC @tab coefficient for forward-bias depletion capacitance formula @tab - @tab 0.5 @tab o @item TNOM @tab Parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @item TRE1 @tab 1st order temperature coefficient for RE (level 2 only) @tab 1/@math{^o}C @tab 0.0 @tab 1e-3 @item TRE2 @tab 2nd order temperature coefficient for RE (level 2 only) @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab 1e-5 @item TRC1 @tab 1st order temperature coefficient for RC (level 2 only )@tab 1/@math{^o}C @tab 0.0 @tab 1e-3 @item TRC2 @tab 2nd order temperature coefficient for RC (level 2 only) @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab 1e-5 @item TRB1 @tab 1st order temperature coefficient for RB (level 2 only) @tab 1/@math{^o}C @tab 0.0 @tab 1e-3 @item TRB2 @tab 2nd order temperature coefficient for RB (level 2 only) @tab 1/@math{^o}C@math{^2} @tab 0.0 @tab 1e-5 @item TRB1 @tab 1st order temperature coefficient for RBM (level 2 only) @tab 1/@math{^o}C @tab TRB1 @tab 1e-3 @item TRB2 @tab 2nd order temperature coefficient for RBM (level 2 only) @tab 1/@math{^o}C@math{^2} @tab TRB2 @tab 1e-5 @end multitable @node Junction Field-Effect Transistors (JFETs), JFET Models (NJF/PJF), BJT Models (NPN/PNP), Transistors and Diodes @subsection Junction Field-Effect Transistors (JFETs) General form: @example JXXXXXXX ND NG NS MNAME @end example Examples: @example J1 7 2 3 JM1 OFF @end example ND, NG, and NS are the drain, gate, and source nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification, using IC=VDS, VGS is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better way to set initial conditions. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line. @node JFET Models (NJF/PJF), MOSFETs, Junction Field-Effect Transistors (JFETs), Transistors and Diodes @subsection JFET Models (NJF/PJF) The JFET model is derived from the FET model of Shichman and Hodges. The dc characteristics are defined by the parameters VTO and BETA, which determine the variation of drain current with gate voltage, LAMBDA, which determines the output conductance, and IS, the saturation current of the two gate junctions. Two ohmic resistances, RD and RS, are included. Charge storage is modelled by nonlinear depletion layer capacitances for both gate junctions which vary as the -1/2 power of junction voltage and are defined by the parameters CGS, CGD, and PB. Note that in Spice3f and later, a fitting parameter B has been added. For details, see [9]. @multitable @columnfractions .1 .45 .15 .15 .15 .1 @item name @tab parameter @tab units @tab default @tab example @tab area @item VTO @tab threshold voltage (@math{V_T0}) @tab V @tab -2.0 @tab -2.0 @item BETA @tab transconductance parameter (B) @tab A/V@math{^2} @tab 1.0e-4 @tab 1.0e-3 @tab * @item LAMBDA @tab channel-length modulation parameter (L) @tab 1/V @tab 0 @tab 1.0e-4 @item RD @tab drain ohmic resistance @tab Z @tab 0 @tab 100 @tab * @item RS @tab source ohmic resistance @tab Z @tab 0 @tab 100 @tab * @item CGS @tab zero-bias G-S junction capacitance (@math{C_gs}) @tab F @tab 0 @tab 5pF @tab * @item CGD @tab zero-bias G-D junction capacitance (@math{C_gs}) @tab F @tab 0 @tab 1pF @tab * @item PB @tab gate junction potential @tab V @tab 1 @tab 0.6 @item IS @tab gate junction saturation current (@math{I_S}) @tab A @tab 1.0e-14 @tab 1.0e-14 @tab * @item B @tab doping tail parameter @tab - @tab 1 @tab 1.1 @item KF @tab flicker noise coefficient @tab - @tab 0 @item AF @tab flicker noise exponent @tab - @tab 1 @item FC @tab coefficient for forward-bias depletion capacitance formula @tab - @tab 0.5 @item TNOM @tab parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @end multitable @node MOSFETs, MOSFET Models (NMOS/PMOS), JFET Models (NJF/PJF), Transistors and Diodes @subsection MOSFETs General form: @example MXXXXXXX ND NG NS NB MNAME + + @end example Examples: @example M1 24 2 0 20 TYPE1 M31 2 17 6 10 MODM L=5U W=2U M1 2 9 3 0 MOD1 L=10U W=5U AD=100P AS=100P PD=40U PS=40U @end example ND, NG, NS, and NB are the drain, gate, source, and bulk (substrate) nodes, respectively. MNAME is the model name. M is the multiplicity parameter, which simulates m paralleled devices. All MOS models support the "M" parameter. L and W are the channel length and width, in meters. AD and AS are the areas of the drain and source diffusions, in meters@math{^2}. Note that the suffix U specifies microns (1e-6 m) and P sq-microns (1e-12 m@math{^2}). If any of L, W, AD, or AS are not specified, default values are used. The use of defaults simplifies input file preparation, as well as the editing required if device geometries are to be changed. PD and PS are the perimeters of the drain and source junctions, in meters. NRD and NRS designate the equivalent number of squares of the drain and source diffusions; these values multiply the sheet resistance RSH specified on the .MODEL control line for an accurate representation of the parasitic series drain and source resistance of each transistor. PD and PS default to 0.0 while NRD and NRS to 1.0. OFF indicates an (optional) initial condition on the device for dc analysis. The (optional) initial condition specification using IC=VDS, VGS, VBS is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better and more convenient way to specify transient initial conditions. The (optional) TEMP value is the temperature at which this device is to operate, and overrides the temperature specification on the .OPTION control line. The temperature specification is ONLY valid for level 1, 2, 3, and 6 MOSFETs, not for level 4 or 5 (BSIM) devices. @node MOSFET Models (NMOS/PMOS), MESFETs, MOSFETs, Transistors and Diodes @subsection MOSFET Models (NMOS/PMOS) MOSFET models are the central part of NGSPICE, probably because they are the most widely used devices in the electronics world. NGSPICE provides all the MOSFETs implemented in the original Spice3f and adds several models developed by Berkeley's Device Group and other independent groups. Not all models below are included in the standard NGSPICE distribution because of copyright restrictions. NGSPICE provides four MOSFET device models, which differ in the formulation of the I-V characteristic. The variable LEVEL specifies the model to be used: @multitable @columnfractions .10 .33 .50 @item LEVEL @tab Model @tab Notes @item 1 @tab Shichman-Hodges @tab The classical model @item 2 @tab MOS2 @tab Described in [2] @item 3 @tab MOS3 @tab A semi-empirical model (see [1]) @item 4 @tab BSIM @tab Described in [3] @item 5 @tab BSIM2 @tab Described in [5] @item 6 @tab MOS6 @tab Described in [2] @item 8 @tab BSIM3 @tab Described in [13] @item 9 @tab MOS9 @tab n/a @item 10 @tab B3SOI @tab n/a @item 14 @tab BSIM4 @tab n/a @item 17 @tab HiSIM1 @tab n/a @item 29 @tab B3SOIPD @tab n/a @item 30 @tab B3SOIFD @tab n/a @item 31 @tab B3SOIDD @tab n/a @item 14 @tab BSIM4 @tab n/a @item 44 @tab EKV @tab n/a @item 49 @tab BSIM3v1s @tab n/a (Serban Version) @item 50 @tab BSIM3v1 @tab n/a (Berkeley Version) @item 51 @tab BSIM3v1a @tab n/a (Alan Version) @item 52 @tab BSIM3v0 @tab n/a (Berkeley Version) @item 62 @tab STAG @tab n/a @end multitable Level 44 model (EKV) is not available in the standard distribution since it is not released in source form. To obtain the code please refer to the @uref{http://legwww.epfl.ch/ekv/, EKV group home page}. The dc characteristics of the level 1 through level 3 MOSFETs are defined by the device parameters VTO, KP, LAMBDA, PHI and GAMMA. These parameters are computed by NGSPICE if process parameters (NSUB, TOX, ...) are given, but users specified values always override. VTO is positive (negative) for enhancement mode and negative (positive) for depletion mode N-channel (P-channel) devices. Charge storage is modelled by three constant capacitors, CGSO, CGDO, and CGBO which represent overlap capacitances, by the nonlinear thin-oxide capacitance which is distributed among the gate, source, drain, and bulk regions, and by the nonlinear depletion-layer capacitances for both substrate junctions divided into bottom and periphery, which vary as the MJ and MJSW power of junction voltage respectively, and are determined by the parameters CBD, CBS, CJ, CJSW, MJ, MJSW and PB. Charge storage effects are modelled by the piecewise linear voltages-dependent capacitance model proposed by Meyer. The thin-oxide charge-storage effects are treated slightly different for the LEVEL=1 model. These voltage-dependent capacitances are included only if TOX is specified in the input description and they are represented using Meyer's formulation. There is some overlap among the parameters describing the junctions, e.g. the reverse current can be input either as IS (in A) or as JS (in A/m@math{^2}). Whereas the first is an absolute value the second is multiplied by AD and AS to give the reverse current of the drain and source junctions respectively. This methodology has been chosen since there is no sense in relating always junction characteristics with AD and AS entered on the device line; the areas can be defaulted. The same idea applies also to the zero-bias junction capacitances CBD and CBS (in F) on one hand, and CJ (in F/m@math{^2}) on the other. The parasitic drain and source series resistance can be expressed as either RD and RS (in ohms) or RSH (in ohms/sq.), the latter being multiplied by the number of squares NRD and NRS input on the device line. A discontinuity in the MOS level 3 model with respect to the KAPPA parameter has been detected (see [10]). The supplied fix has been implemented in Spice3f2 and later. Since this fix may affect parameter fitting, the option "BADMOS3" may be set to use the old implementation (see the section on simulation variables and the ".OPTIONS" line). NGSPICE level 1, 2, 3 and 6 parameters: @multitable @columnfractions .1 .45 .15 .15 .15 @item name @tab parameter @tab units @tab default @tab example @item LEVEL @tab model index @tab - @tab 1 @item VTO @tab zero-bias threshold voltage (@math{V_T0}) @tab V @tab 0.0 @tab 1.0 @item KP @tab transconductance parameter @tab @math{A/V^2} @tab 2.0e-5 @tab 3.1e-5 @item GAMMA @tab bulk threshold parameter @tab @math{V^1/2} @tab 0.0 @tab 0.37 @item PHI @tab surface potential (U) @tab V @tab 0.6 @tab 0.65 @item LAMBDA @tab channel-length modulation (MOS1 and MOS2 only) (L) @tab 1/V @tab 0.0 @tab 0.02 @item RD @tab drain ohmic resistance @tab Z @tab 0.0 @tab 1.0 @item RS @tab source ohmic resistance @tab Z @tab 0.0 @tab 1.0 @item CBD @tab zero-bias B-D junction capacitance @tab F @tab 0.0 @tab 20fF @item CBS @tab zero-bias B-S junction capacitance @tab F @tab 0.0 @tab 20fF @item IS @tab bulk junction saturation current (@math{I_S}) @tab A @tab 1.0e-14 @tab 1.0e-15 @item PB @tab bulk junction potential @tab V @tab 0.8 @tab 0.87 @item CGSO @tab gate-source overlap capacitance per meter channel width @tab F/m @tab 0.0 @tab 4.0e-11 @item CGDO @tab gate-drain overlap capacitance per meter channel width @tab F/m @tab 0.0 @tab 4.0e-11 @item CGBO @tab gate-bulk overlap capacitance per meter channel length @tab F/m @tab 0.0 @tab 2.0e-10 @item RSH @tab drain and source diffusion sheet resistance @tab Z/[] @tab 0.0 @tab 10.0 @item CJ @tab zero-bias bulk junction bottom cap. per sq-meter of junction area @tab @math{F/m^2} @tab 0.0 @tab 2.0e-4 @item MJ @tab bulk junction bottom grading coeff. @tab - @tab 0.5 @tab 0.5 @item CJSW @tab zero-bias bulk junction sidewall cap. per meter of junction perimeter @tab F/m @tab 0.0 @tab 1.0e-9 @item MJSW @tab bulk junction sidewall grading coeff. @tab - @tab 0.50(level1), 0.33(level2, 3) @item JS @tab bulk junction saturation current per sq-meter of junction area @tab @math{A/m^2} @tab 1.0e-8 @item TOX @tab oxide thickness @tab meter @tab 1.0e-7 @tab 1.0e-7 @item NSUB @tab substrate doping @tab @math{1/cm^3} @tab 0.0 @tab 4.0e15 @item NSS @tab surface state density @tab @math{1/cm^2} @tab 0.0 @tab 1.0e10 @item NFS @tab fast surface state density @tab @math{1/cm^2} @tab 0.0 @tab 1.0e10 @item TPG @tab type of gate material: +1 opp. to substrate, -1 same as substrate, 0 Al gate @tab - @tab 1.0 @item XJ @tab metallurgical junction depth @tab meter @tab 0.0 @tab 1M @item LD @tab lateral diffusion @tab meter @tab 0.0 @tab 0.8M @item UO @tab surface mobility @tab @math{cm^2/Vs} @tab 600 @tab 700 @item UCRIT @tab critical field for mobility degradation (MOS2 only) @tab V/cm @tab 1.0e4 @tab 1.0e4 @item UEXP @tab critical field exponent in mobility degradation (MOS2 only) @tab - @tab 0.0 @tab 0.1 @item UTRA @tab transverse field coeff. (mobility) (deleted for MOS2) @tab - @tab 0.0 @tab 0.3 @item VMAX @tab maximum drift velocity of carriers @tab m/s @tab 0.0 @tab 5.0e4 @item NEFF @tab total channel-charge (fixed and mobile) coefficient (MOS2 only) @tab - @tab 1.0 @tab 5.0 @item KF @tab flicker noise coefficient @tab - @tab 0.0 @tab 1.0e-26 @item AF @tab flicker noise exponent @tab - @tab 1.0 @tab 1.2 @item FC @tab coefficient for forward-bias depletion capacitance formula @tab - @tab 0.5 @item DELTA @tab width effect on threshold voltage (MOS2 and MOS3) @tab - @tab 0.0 @tab 1.0 @item THETA @tab mobility modulation (MOS3 only) @tab 1/V @tab 0.0 @tab 0.1 @item ETA @tab static feedback (MOS3 only) @tab - @tab 0.0 @tab 1.0 @item KAPPA @tab saturation field factor (MOS3 only) @tab - @tab 0.2 @tab 0.5 @item TNOM @tab parameter measurement temperature @tab @math{^o}C @tab 27 @tab 50 @end multitable The level 3 model available into ngspice takes into account length and width mask adjustments (@code{xl} and @code{xw}) and device width narrowing due to diffusion (@code{wd}). The level 4 and level 5 (BSIM1 and BSIM2) parameters are all values obtained from process characterization, and can be generated automatically. J. Pierret [4] describes a means of generating a 'process' file, and the program Proc2Mod provided with NGSPICE converts this file into a sequence of BSIM1 ".MODEL" lines suitable for inclusion in a NGSPICE input file. Parameters marked below with an * in the l/w column also have corresponding parameters with a length and width dependency. For example, VFB is the basic parameter with units of Volts, and LVFB and WVFB also exist and have units of Volt-Mmeter The formula @tex $$ P = P_0 + { P_L \over L_{\rm effective} } + { P_W \over W_{\rm effective} } $$ @end tex @ifnottex @example P P L W P = P + ---------- + ---------- 0 L W effective effective @end example @end ifnottex is used to evaluate the parameter for the actual device specified with @tex $$ L_{\rm effective} = L_{\rm input} - DL $$ @end tex @ifnottex @example L = L - DL effective input @end example @end ifnottex and @tex $$ W_{\rm effective} = W_{\rm input} - DW $$ @end tex @ifnottex @example W = W - DW effective input @end example @end ifnottex Note that unlike the other models in NGSPICE, the BSIM model is designed for use with a process characterization system that provides all the parameters, thus there are no defaults for the parameters, and leaving one out is considered an error. For an example set of parameters and the format of a process file, see the SPICE2 implementation notes[3]. For more information on BSIM2, see reference [5]. NGSPICE BSIM (level 4) parameters. @multitable @columnfractions .15 .55 .20 .10 @item name @tab parameter @tab units @tab l/w @item VFB @tab flat-band voltage @tab V @tab * @item PHI @tab surface inversion potential @tab V @tab * @item K1 @tab body effect coefficient @tab V@math{^(1/2)} @tab * @item K2 @tab drain/source depletion charge-sharing coefficient @tab - @tab * @item ETA @tab zero-bias drain-induced barrier-lowering coefficient @tab - @tab * @item MUZ @tab zero-bias mobility @tab cm@math{^2}/V-s @tab @item DL @tab shortening of channel @tab Mm @tab @item DW @tab narrowing of channel @tab Mm @tab @item U0 @tab zero-bias transverse-field mobility degradation coefficient @tab V@math{^-1} @tab * @item U1 @tab zero-bias velocity saturation coefficient @tab Mm/V @tab * @item X2MZ @tab sens. of mobility to substrate bias at V_ds=0 @tab cm@math{^2}/V-s @tab * @item X2E @tab sens. of drain-induced barrier lowering effect to substrate bias @tab V@math{^-1} @tab * @item X3E @tab sens. of drain-induced barrier lowering effect to drain bias at V_ds=V_dd @tab V@math{^-1} @tab * @item X2U0 @tab sens. of transverse field mobility degradation effect to substrate bias @tab V@math{^2} @tab * @item X2U1 @tab sens. of velocity saturation effect to substrate bias @tab MmV@math{^2} @tab * @item MUS @tab mobility at zero substrate bias and at V_ds=V_dd @tab cm@math{^2}/V@math{^2}-s @tab @item X2MS @tab sens. of mobility to substrate bias at V_ds=V_dd @tab cm@math{^2}/V@math{^2}-s @tab * @item X3MS @tab sens. of mobility to drain bias at V_ds=V_dd @tab cm@math{^2}/V@math{^2}-s @tab * @item X3U1 @tab sens. of velocity saturation effect on drain bias at V_ds=V_dd @tab MmV@math{^2} @tab * @item TOX @tab gate oxide thickness @tab Mm @tab @item TEMP @tab temperature at which parameters were measured @tab C @tab @item VDD @tab measurement bias range @tab V @tab @item CGDO @tab gate-drain overlap capacitance per meter channel width @tab F/m @tab @item CGSO @tab gate-source overlap capacitance per meter channel width @tab F/m @tab @item CGBO @tab gate-bulk overlap capacitance per meter channel length @tab F/m @tab @item XPART @tab gate-oxide capacitance-charge model flag @tab - @tab @item N0 @tab zero-bias subthreshold slope coefficient @tab - @tab * @item NB @tab sens. of subthreshold slope to substrate bias @tab - @tab * @item ND @tab sens. of subthreshold slope to drain bias @tab - @tab * @item RSH @tab drain and source diffusion sheet resistance @tab Z/[] @tab @item JS @tab source drain junction current density @tab A/m@math{^2} @tab @item PB @tab built in potential of source drain junction @tab V @tab @item MJ @tab Grading coefficient of source drain junction @tab - @tab @item BSW @tab built in potential of source, drain junction sidewall @tab V @tab @item MJSW @tab grading coefficient of source drain junction sidewall @tab - @tab @item CJ @tab Source drain junction capacitance per unit area @tab F/m@math{^2} @tab @item CJSW @tab source drain junction sidewall capacitance per unit length @tab F/m @tab @item WDF @tab source drain junction default width @tab m @tab @item DELL @tab Source drain junction length reduction @tab m @tab @end multitable XPART = 0 selects a 40/60 drain/source charge partition in saturation, while XPART=1 selects a 0/100 drain/source charge partition. ND, NG, and NS are the drain, gate, and source nodes, respectively. MNAME is the model name, AREA is the area factor, and OFF indicates an (optional) initial condition on the device for dc analysis. If the area factor is omitted, a value of 1.0 is assumed. The (optional) initial condition specification, using IC=VDS, VGS is intended for use with the UIC option on the .TRAN control line, when a transient analysis is desired starting from other than the quiescent operating point. See the .IC control line for a better way to set initial conditions. @node MESFETs, MESFET Models (NMF/PMF), MOSFET Models (NMOS/PMOS), Transistors and Diodes @subsection MESFETs General form: @example ZXXXXXXX ND NG NS MNAME @end example Examples: @example Z1 7 2 3 ZM1 OFF @end example @node MESFET Models (NMF/PMF), , MESFETs, Transistors and Diodes @subsection MESFET Models (NMF/PMF) The MESFET model is derived from the GaAs FET model of Statz et al. as described in [11]. The dc characteristics are defined by the parameters VTO, B, and BETA, which determine the variation of drain current with gate voltage, ALPHA, which determines saturation voltage, and LAMBDA, which determines the output conductance. The formula are given by: @tex $$ \cases{I_d = {B (V_{gs} - V_T)^2 \over 1 + b(V_{gs} - V_T)} \left| 1 - \left| 1 - A {V_{ds} \over 3 } \right|^3 \right| (1 + L V_{ds}) & for $0 < V_{ds} < 3/A$ \cr I_d = {B (V_{gs} - V_T)^2 \over 1 + b(V_{gs} - V_T)} (1 + L V_{ds}) & for $V_{ds} > 3/A$ \cr} $$ @end tex @ifnottex @example 3 2 B (V -V ) | | V | | 3 gs T ds _ I = --------------- |1 - |1-A---| |(1 + L V ) for 0 < V < d ds ds 1 + b(V - V ) | | 3 | | A gs T 2 B (V -V ) 3 gs T _ I = ---------------(1 + L V ) for V > d ds ds 1 + b(V - V ) A gs T @end example @end ifnottex Two ohmic resistances, RD and RS, are included. Charge storage is modeled by total gate charge as a function of gate-drain and gate-source voltages and is defined by the parameters CGS, CGD, and PB. @multitable {LAMBDA} {channel-length modulation parameter} {units} {default} {example} {area} @item name @tab parameter @tab units @tab default @tab example @tab area @item VTO @tab pinch-off voltage @tab V @tab -2.0 @tab -2.0 @item BETA @tab transconductance parameter @tab A/V@math{^2} @tab 1.0e-4 @tab 1.0e-3 @tab * @item B @tab doping tail extending parameter @tab 1/V @tab 0.3 @tab 0.3 @tab * @item ALPHA @tab saturation voltage parameter @tab 1/V @tab 2 @tab 2 @tab * @item LAMBDA @tab channel-length modulation parameter @tab 1/V @tab 0 @tab 1.0e-4 @item RD @tab drain ohmic resistance @tab Z @tab 0 @tab 100 @tab * @item RS @tab source ohmic resistance @tab Z @tab 0 @tab 100 @tab * @item CGS @tab zero-bias G-S junction capacitance @tab F @tab 0 @tab 5pF @tab * @item CGD @tab zero-bias G-D junction capacitance @tab F @tab 0 @tab 1pF @tab * @item PB @tab gate junction potential @tab V @tab 1 @tab 0.6 @item KF @tab flicker noise coefficient @tab - @tab 0 @item AF @tab flicker noise exponent @tab - @tab 1 @item FC @tab coefficient for forward-bias depletion capacitance formula @tab - @tab 0.5 @end multitable @node Analyses and Output Control, Interactive Interpreter, Circuit Elements and Models, Top @chapter Analyses and Output Control The following command lines are for specifying analyses or plots within the circuit description file. Parallel commands exist in the interactive command interpreter (detailed in the following section). Specifying analyses and plots (or tables) in the input file is useful for batch runs. Batch mode is entered when either the -b option is given or when the default input source is redirected from a file. In batch mode, the analyses specified by the control lines in the input file (e.g. ".ac", ".tran", etc.) are immediately executed (unless ".control" lines exists; see the section on the interactive command interpreter). If the -r rawfile option is given then all data generated is written to a Ngspice rawfile. The rawfile may be read by either the interactive mode of Ngspice or by nutmeg; see the previous section for details. In this case, the .SAVE line (see below) may be used to record the value of internal device variables (see Appendix B). If a rawfile is not specified, then output plots (in "line-printer" form) and tables can be printed according to the .PRINT, .PLOT, and .FOUR control lines, described next. .PLOT, .PRINT, and .FOUR lines are meant for compatibility with Spice2. @menu * Simulator Variables (.OPTIONS):: * Initial Conditions:: * Analyses:: * Batch Output:: @end menu @node Simulator Variables (.OPTIONS), Initial Conditions, Analyses and Output Control, Analyses and Output Control @section Simulator Variables (.OPTIONS) Various parameters of the simulations available in Ngspice can be altered to control the accuracy, speed, or default values for some devices. These parameters may be changed via the "set" command (described later in the section on the interactive front-end) or via the ".OPTIONS" line: General form: @example .OPTIONS OPT1 OPT2 ... (or OPT=OPTVAL ...) @end example Examples: @example .OPTIONS RELTOL=.005 TRTOL=8 @end example The options line allows the user to reset program control and user options for specific simulation purposes. Additional options for Nutmeg may be specified as well and take effect when Nutmeg reads the input file. Options specified to Nutmeg via the 'set' command are also passed on to NGSPICE as if specified on a .OPTIONS line. See the following section on the interactive command interpreter for the parameters which may be set with a .OPTIONS line and the format of the 'set' command. Any combination of the following options may be included, in any order. 'x' (below) represents some positive number. @vtable @code @item ABSTOL=x resets the absolute current error tolerance of the program. The default value is 1 picoamp. @item BADMOS3 Use the older version of the MOS3 model with the "kappa" discontinuity. @item CHGTOL=x resets the charge tolerance of the program. The default value is 1.0e-14. @item DEFAD=x resets the value for MOS drain diffusion area; the default is 0.0. @item DEFAS=x resets the value for MOS source diffusion area; the default is 0.0. @item DEFL=x resets the value for MOS channel length; the default is 100.0 micrometer. @item DEFW=x resets the value for MOS channel width; the default is 100.0 micrometer. @item GMIN=x resets the value of GMIN, the minimum conductance allowed by the program. The default value is 1.0e-12. @item ITL1=x resets the dc iteration limit. The default is 100. @item ITL2=x resets the dc transfer curve iteration limit. The default is 50. @item ITL3=x resets the lower transient analysis iteration limit. the default value is 4. (Note: not implemented in Ngspice). @item ITL4=x resets the transient analysis timepoint iteration limit. the default is 10. @item ITL5=x resets the transient analysis total iteration limit. the default is 5000. Set ITL5=0 to omit this test. (Note: not implemented in Ngspice). @item KEEPOPINFO Retain the operating point information when either an AC, Distortion, or Pole-Zero analysis is run. This is particularly useful if the circuit is large and you do not want to run a (redundant) ".OP" analysis. @item METHOD=name sets the numerical integration method used by NGSPICE. Possible names are "Gear" or "trapezoidal" (or just "trap"). The default is trapezoidal. @item PIVREL=x resets the relative ratio between the largest column entry and an acceptable pivot value. The default value is 1.0e-3. In the numerical pivoting algorithm the allowed minimum pivot value is determined by EPSREL=AMAX1(PIVREL*MAXVAL, PIVTOL) where MAXVAL is the maximum element in the column where a pivot is sought (partial pivoting). @item PIVTOL=x resets the absolute minimum value for a matrix entry to be accepted as a pivot. The default value is 1.0e-13. @item RELTOL=x resets the relative error tolerance of the program. The default value is 0.001 (0.1%). @item TEMP=x Resets the operating temperature of the circuit. The default value is 27 deg C (300 deg K). TEMP can be overridden by a temperature specification on any temperature dependent instance. @item TNOM=x resets the nominal temperature at which device parameters are measured. The default value is 27 deg C (300 deg K). TNOM can be overridden by a specification on any temperature dependent device model. @item TRTOL=x resets the transient error tolerance. The default value is 7.0. This parameter is an estimate of the factor by which NGSPICE overestimates the actual truncation error. @item TRYTOCOMPACT Applicable only to the LTRA model. When specified, the simulator tries to condense LTRA transmission lines' past history of input voltages and currents. @item VNTOL=x resets the absolute voltage error tolerance of the program. The default value is 1 microvolt. @end vtable In addition, the following options have the listed effect when operating in spice2 emulation mode: @table @code @item ACCT causes accounting and run time statistics to be printed @item LIST causes the summary listing of the input data to be printed @item NOMOD suppresses the printout of the model parameters @item NOPAGE suppresses page ejects @item NODE causes the printing of the node table. @item OPTS causes the option values to be printed. @end table @node Initial Conditions, Analyses, Simulator Variables (.OPTIONS), Analyses and Output Control @section Initial Conditions @menu * Specify Initial Node Voltage Guesses:: * Set Initial Conditions:: @end menu @node Specify Initial Node Voltage Guesses, Set Initial Conditions, Initial Conditions, Initial Conditions @subsection .NODESET: Specify Initial Node Voltage Guesses General form: @example .NODESET V(NODNUM)=VAL V(NODNUM)=VAL ... @end example Examples: @example .NODESET V(12)=4.5 V(4)=2.23 @end example The Nodeset line helps the program find the dc or initial transient solution by making a preliminary pass with the specified nodes held to the given voltages. The restriction is then released and the iteration continues to the true solution. The .NODESET line may be necessary for convergence on bistable or a-stable circuits. In general, this line should not be necessary. @node Set Initial Conditions, , Specify Initial Node Voltage Guesses, Initial Conditions @subsection .IC: Set Initial Conditions General form: @example .IC V(NODNUM)=VAL V(NODNUM)=VAL ... @end example Examples: @example .IC V(11)=5 V(4)=-5 V(2)=2.2 @end example The IC line is for setting transient initial conditions. It has two different interpretations, depending on whether the UIC parameter is specified on the .TRAN control line. Also, one should not confuse this line with the .NODESET line. The .NODESET line is only to help dc convergence, and does not affect final bias solution (except for multi-stable circuits). The two interpretations of this line are as follows: @enumerate @item When the UIC parameter is specified on the .TRAN line, then the node voltages specified on the .IC control line are used to compute the capacitor, diode, BJT, JFET, and MOSFET initial conditions. This is equivalent to specifying the IC=... parameter on each device line, but is much more convenient. The IC=... parameter can still be specified and takes precedence over the .IC values. Since no dc bias (initial transient) solution is computed before the transient analysis, one should take care to specify all dc source voltages on the .IC control line if they are to be used to compute device initial conditions. @item When the UIC parameter is not specified on the .TRAN control line, the dc bias (initial transient) solution is computed before the transient analysis. In this case, the node voltages specified on the .IC control line is forced to the desired initial values during the bias solution. During transient analysis, the constraint on these node voltages is removed. This is the preferred method since it allows NGSPICE to compute a consistent dc solution. @end enumerate @node Analyses, Batch Output, Initial Conditions, Analyses and Output Control @section Analyses @menu * AC Small-Signal AC Analysis:: * DC Transfer Function:: * DISTRO Distortion Analysis:: * NOISE Noise Analysis:: * OP Operating Point Analysis:: * PZ Pole-Zero Analysis:: * SENS; DC or Small-Signal AC Sensitivity Analysis:: * TF Transfer Function Analysis:: * TRAN Transient Analysis:: @end menu @node AC Small-Signal AC Analysis, DC Transfer Function, Analyses, Analyses @subsection .AC: Small-Signal AC Analysis General form: @example .AC DEC ND FSTART FSTOP .AC OCT NO FSTART FSTOP .AC LIN NP FSTART FSTOP @end example Examples: @example .AC DEC 10 1 10K .AC DEC 10 1K 100MEG .AC LIN 100 1 100HZ @end example DEC stands for decade variation, and ND is the number of points per decade. OCT stands for octave variation, and NO is the number of points per octave. LIN stands for linear variation, and NP is the number of points. FSTART is the starting frequency, and FSTOP is the final frequency. If this line is included in the input file, NGSPICE performs an AC analysis of the circuit over the specified frequency range. Note that in order for this analysis to be meaningful, at least one independent source must have been specified with an ac value. @node DC Transfer Function, DISTRO Distortion Analysis, AC Small-Signal AC Analysis, Analyses @subsection .DC: DC Transfer Function General form: @example .DC SRCNAM VSTART VSTOP VINCR [SRC2 START2 STOP2 INCR2] @end example Examples: @example .DC VIN 0.25 5.0 0.25 .DC VDS 0 10 .5 VGS 0 5 1 .DC VCE 0 10 .25 IB 0 10U 1U .DC RLoad 1k 2k 100 .DC TEMP -15 75 5 @end example The DC line defines the dc transfer curve source and sweep limits (again with capacitors open and inductors shorted). SRCNAM is the name of an independent voltage or current source, a resistor or the circuit temperature. VSTART, VSTOP, and VINCR are the starting, final, and incrementing values respectively. The first example causes the value of the voltage source VIN to be swept from 0.25 Volts to 5.0 Volts in increments of 0.25 Volts. A second source (SRC2) may optionally be specified with associated sweep parameters. In this case, the first source is swept over its range for each value of the second source. This option can be useful for obtaining semiconductor device output characteristics. See the second example circuit description in Appendix A. @node DISTRO Distortion Analysis, NOISE Noise Analysis, DC Transfer Function, Analyses @subsection .DISTO: Distortion Analysis General form: @example .DISTO DEC ND FSTART FSTOP .DISTO OCT NO FSTART FSTOP .DISTO LIN NP FSTART FSTOP @end example Examples: @example .DISTO DEC 10 1kHz 100Mhz .DISTO DEC 10 1kHz 100Mhz 0.9 @end example The Disto line does a small-signal distortion analysis of the circuit. A multi-dimensional Volterra series analysis is done using multi-dimensional Taylor series to represent the nonlinearities at the operating point. Terms of up to third order are used in the series expansions. If the optional parameter F2OVERF1 is not specified, .DISTO does a harmonic analysis - i.e., it analyses distortion in the circuit using only a single input frequency @math{F_1}, which is swept as specified by arguments of the .DISTO command exactly as in the .AC command. Inputs at this frequency may be present at more than one input source, and their magnitudes and phases are specified by the arguments of the DISTOF1 keyword in the input file lines for the input sources (see the description for independent sources). (The arguments of the DISTOF2 keyword are not relevant in this case). The analysis produces information about the A.C. values of all node voltages and branch currents at the harmonic frequencies @math{2F_1} and @math{3F_1}, vs. the input frequency @math{F_1} as it is swept. (A value of 1 (as a complex distortion output) signifies @math{\cos(2J(2F_1)t)} at @math{2F_1} and @math{\cos(2J(3F_1)t)} at @math{3F_1}, using the convention that 1 at the input fundamental frequency is equivalent to @math{\cos(2JF_1t)}.) The distortion component desired (@math{2F_1} or @math{3F_1}) can be selected using commands in nutmeg, and then printed or plotted. (Normally, one is interested primarily in the magnitude of the harmonic components, so the magnitude of the AC distortion value is looked at). It should be noted that these are the A.C. values of the actual harmonic components, and are not equal to HD2 and HD3. To obtain HD2 and HD3, one must divide by the corresponding A.C. values at @math{F_1}, obtained from an .AC line. This division can be done using nutmeg commands. If the optional F2OVERF1 parameter is specified, it should be a real number between (and not equal to) 0.0 and 1.0; in this case, .DISTO does a spectral analysis. It considers the circuit with sinusoidal inputs at two different frequencies @math{F_1} and F_2. @math{F_1} is swept according to the .DISTO control line options exactly as in the .AC control line. @math{F_2} is kept fixed at a single frequency as @math{F_1} sweeps - the value at which it is kept fixed is equal to F2OVERF1 times FSTART. Each independent source in the circuit may potentially have two (superimposed) sinusoidal inputs for distortion, at the frequencies @math{F_1} and F_2. The magnitude and phase of the @math{F_1} component are specified by the arguments of the DISTOF1 keyword in the source's input line (see the description of independent sources); the magnitude and phase of the @math{F_2} component are specified by the arguments of the DISTOF2 keyword. The analysis produces plots of all node voltages/branch currents at the intermodulation product frequencies @math{F_1 + F_2}, @math{F_1 - F_2}, and @math{(2 F_1) - F_2}, vs the swept frequency @math{F_1}. The IM product of interest may be selected using the setplot command, and displayed with the print and plot commands. It is to be noted as in the harmonic analysis case, the results are the actual AC voltages and currents at the intermodulation frequencies, and need to be normalized with respect to .AC values to obtain the IM parameters. If the DISTOF1 or DISTOF2 keywords are missing from the description of an independent source, then that source is assumed to have no input at the corresponding frequency. The default values of the magnitude and phase are 1.0 and 0.0 respectively. The phase should be specified in degrees. It should be carefully noted that the number F2OVERF1 should ideally be an irrational number, and that since this is not possible in practice, efforts should be made to keep the denominator in its fractional representation as large as possible, certainly above 3, for accurate results (i.e., if F2OVERF1 is represented as a fraction @math{A/B}, where @math{A} and @math{B} are integers with no common factors, @math{B} should be as large as possible; note that @math{A < B} because F2OVERF1 is constrained to be @math{< 1}). To illustrate why, consider the cases where F2OVERF1 is 49/100 and 1/2. In a spectral analysis, the outputs produced are at @math{F_1 + F_2}, @math{F_1 - F_2} and @math{2 F_1 - F_2}. In the latter case, @math{F_1 - F_2 = F_2}, so the result at the @math{F_1 - F_2} component is erroneous because there is the strong fundamental @math{F_2} component at the same frequency. Also, @math{F_1 + F_2 = 2 F_1 - F_2} in the latter case, and each result is erroneous individually. This problem is not there in the case where F2OVERF1 = 49/100, because @math{F_1-F_2 = 51/100} @math{F_1 < > 49/100} @math{F_1 = F_2}. In this case, there are two very closely spaced frequency components at @math{F_2} and @math{F_1 - F_2}. One of the advantages of the Volterra series technique is that it computes distortions at mix frequencies expressed symbolically (i.e. @math{n F_1 + m F_2}), therefore one is able to obtain the strengths of distortion components accurately even if the separation between them is very small, as opposed to transient analysis for example. The disadvantage is of course that if two of the mix frequencies coincide, the results are not merged together and presented (though this could presumably be done as a postprocessing step). Currently, the interested user should keep track of the mix frequencies himself or herself and add the distortions at coinciding mix frequencies together should it be necessary. @node NOISE Noise Analysis, OP Operating Point Analysis, DISTRO Distortion Analysis, Analyses @subsection .NOISE: Noise Analysis General form: @example .NOISE V(OUTPUT <,REF>) SRC ( DEC | LIN | OCT ) PTS FSTART FSTOP + @end example Examples: @example .NOISE V(5) VIN DEC 10 1kHZ 100Mhz .NOISE V(5,3) V1 OCT 8 1.0 1.0e6 1 @end example The Noise line does a noise analysis of the circuit. OUTPUT is the node at which the total output noise is desired; if REF is specified, then the noise voltage V(OUTPUT) - V(REF) is calculated. By default, REF is assumed to be ground. SRC is the name of an independent source to which input noise is referred. PTS, FSTART and FSTOP are .AC type parameters that specify the frequency range over which plots are desired. PTS_PER_SUMMARY is an optional integer; if specified, the noise contributions of each noise generator is produced every PTS_PER_SUMMARY frequency points. The .NOISE control line produces two plots - one for the Noise Spectral Density curves and one for the total Integrated Noise over the specified frequency range. All noise voltages/currents are in squared units (V@math{^2} /Hz and A@math{^2}/Hz for spectral density, V@math{^2} and A@math{^2} for integrated noise). @node OP Operating Point Analysis, PZ Pole-Zero Analysis, NOISE Noise Analysis, Analyses @subsection .OP: Operating Point Analysis General form: @example .OP @end example The inclusion of this line in an input file directs NGSPICE to determine the dc operating point of the circuit with inductors shorted and capacitors opened. Note: a DC analysis is automatically performed prior to a transient analysis to determine the transient initial conditions, and prior to an AC small-signal, Noise, and Pole-Zero analysis to determine the linearized, small-signal models for nonlinear devices (see the KEEPOPINFO variable above). @node PZ Pole-Zero Analysis, SENS; DC or Small-Signal AC Sensitivity Analysis, OP Operating Point Analysis, Analyses @subsection .PZ: Pole-Zero Analysis General form: @example .PZ NODE1 NODE2 NODE3 NODE4 CUR POL .PZ NODE1 NODE2 NODE3 NODE4 CUR ZER .PZ NODE1 NODE2 NODE3 NODE4 CUR PZ .PZ NODE1 NODE2 NODE3 NODE4 VOL POL .PZ NODE1 NODE2 NODE3 NODE4 VOL ZER .PZ NODE1 NODE2 NODE3 NODE4 VOL PZ @end example Examples: @example .PZ 1 0 3 0 CUR POL .PZ 2 3 5 0 VOL ZER .PZ 4 1 4 1 CUR PZ @end example CUR stands for a transfer function of the type (output voltage)/(input current) while VOL stands for a transfer function of the type (output voltage)/(input voltage). POL stands for pole analysis only, ZER for zero analysis only and PZ for both. This feature is provided mainly because if there is a nonconvergence in finding poles or zeros, then, at least the other can be found. Finally, NODE1 and NODE2 are the two input nodes and NODE3 and NODE4 are the two output nodes. Thus, there is complete freedom regarding the output and input ports and the type of transfer function. In interactive mode, the command syntax is the same except that the first field is PZ instead of .PZ. To print the results, one should use the command 'print all'. @node SENS; DC or Small-Signal AC Sensitivity Analysis, TF Transfer Function Analysis, PZ Pole-Zero Analysis, Analyses @subsection .SENS: DC or Small-Signal AC Sensitivity Analysis General form: @example .SENS OUTVAR .SENS OUTVAR AC DEC ND FSTART FSTOP .SENS OUTVAR AC OCT NO FSTART FSTOP .SENS OUTVAR AC LIN NP FSTART FSTOP @end example Examples: @example .SENS V(1,OUT) .SENS V(OUT) AC DEC 10 100 100k .SENS I(VTEST) @end example The sensitivity of OUTVAR to all non-zero device parameters is calculated when the SENS analysis is specified. OUTVAR is a circuit variable (node voltage or voltage-source branch current). The first form calculates sensitivity of the DC operating-point value of OUTVAR. The second form calculates sensitivity of the AC values of OUTVAR. The parameters listed for AC sensitivity are the same as in an AC analysis (see ".AC" above). The output values are in dimensions of change in output per unit change of input (as opposed to percent change in output or per percent change of input). @node TF Transfer Function Analysis, TRAN Transient Analysis, SENS; DC or Small-Signal AC Sensitivity Analysis, Analyses @subsection .TF: Transfer Function Analysis General form: @example .TF OUTVAR INSRC @end example Examples: @example .TF V(5, 3) VIN .TF I(VLOAD) VIN @end example The TF line defines the small-signal output and input for the dc small-signal analysis. OUTVAR is the smallsignal output variable and INSRC is the small-signal input source. If this line is included, NGSPICE computes the dc small-signal value of the transfer function (output/input), input resistance, and output resistance. For the first example, NGSPICE would compute the ratio of V(5, 3) to VIN, the small-signal input resistance at VIN, and the smallsignal output resistance measured across nodes 5 and 3. @node TRAN Transient Analysis, , TF Transfer Function Analysis, Analyses @subsection .TRAN: Transient Analysis General form: @example .TRAN TSTEP TSTOP > @end example Examples: @example .TRAN 1NS 100NS .TRAN 1NS 1000NS 500NS .TRAN 10NS 1US @end example TSTEP is the printing or plotting increment for lineprinter output. For use with the post-processor, TSTEP is the suggested computing increment. TSTOP is the final time, and TSTART is the initial time. If TSTART is omitted, it is assumed to be zero. The transient analysis always begins at time zero. In the interval , the circuit is analyzed (to reach a steady state), but no outputs are stored. In the interval , the circuit is analyzed and outputs are stored. TMAX is the maximum stepsize that NGSPICE uses; for default, the program chooses either TSTEP or (TSTOP-TSTART)/50.0, whichever is smaller. TMAX is useful when one wishes to guarantee a computing interval which is smaller than the printer increment, TSTEP. UIC (use initial conditions) is an optional keyword which indicates that the user does not want NGSPICE to solve for the quiescent operating point before beginning the transient analysis. If this keyword is specified, NGSPICE uses the values specified using IC=... on the various elements as the initial transient condition and proceeds with the analysis. If the .IC control line has been specified, then the node voltages on the .IC line are used to compute the initial conditions for the devices. Look at the description on the .IC control line for its interpretation when UIC is not specified. @node Batch Output, , Analyses, Analyses and Output Control @section Batch Output @menu * SAVE:: * PRINT:: * PLOT:: * FOUR Fourier Analysis of Transient Analysis Output:: @end menu @node SAVE, PRINT, Batch Output, Batch Output @subsection .SAVE Lines General form: @example .SAVE vector vector vector ... @end example Examples: @example .SAVE i(vin) input output .SAVE @@m1[id] @end example The vectors listed on the .SAVE line are recorded in the rawfile for use later with ngspice or nutmeg (nutmeg is just the data-analysis half of ngspice, without the ability to simulate). The standard vector names are accepted. If no .SAVE line is given, then the default set of vectors are saved (node voltages and voltage source branch currents). If .SAVE lines are given, only those vectors specified are saved. For more discussion on internal device data, see Appendix B. See also the section on the interactive command interpreter for information on how to use the rawfile. @node PRINT, PLOT, SAVE, Batch Output @subsection .PRINT Lines General form: @example .PRINT PRTYPE OV1 @end example Examples: @example .PRINT TRAN V(4) I(VIN) .PRINT DC V(2) I(VSRC) V(23, 17) .PRINT AC VM(4, 2) VR(7) VP(8, 3) @end example The Print line defines the contents of a tabular listing of one to eight output variables. PRTYPE is the type of the analysis (DC, AC, TRAN, NOISE, or DISTO) for which the specified outputs are desired. The form for voltage or current output variables is the same as given in the previous section for the print command; Spice2 restricts the output variable to the following forms (though this restriction is not enforced by Ngspice): @table @code @item V(N1<,N2>) specifies the voltage difference between nodes N1 and N2. If N2 (and the preceding comma) is omitted, ground (0) is assumed. See the print command in the previous section for more details. For compatibility with spice2, the following five additional values can be accessed for the ac analysis by replacing the "V" in V(N1,N2) with: @example VR - real part VI - imaginary part VM - magnitude VP - phase VDB - 20 log10(magnitude) @end example @item I(VXXXXXXX) specifies the current flowing in the independent voltage source named VXXXXXXX. Positive current flows from the positive node, through the source, to the negative node. For the ac analysis, the corresponding replacements for the letter I may be made in the same way as described for voltage outputs. @end table Output variables for the noise and distortion analyses have a different general form from that of the other analyses. There is no limit on the number of .PRINT lines for each type of analysis. @node PLOT, FOUR Fourier Analysis of Transient Analysis Output, PRINT, Batch Output @subsection .PLOT Lines General form: @example .PLOT PLTYPE OV1 <(PLO1, PHI1)> ... OV8> @end example Examples: @example .PLOT DC V(4) V(5) V(1) .PLOT TRAN V(17, 5) (2, 5) I(VIN) V(17) (1, 9) .PLOT AC VM(5) VM(31, 24) VDB(5) VP(5) .PLOT DISTO HD2 HD3(R) SIM2 .PLOT TRAN V(5, 3) V(4) (0, 5) V(7) (0, 10) @end example The Plot line defines the contents of one plot of from one to eight output variables. PLTYPE is the type of analysis (DC, AC, TRAN, NOISE, or DISTO) for which the specified outputs are desired. The syntax for the OVI is identical to that for the .PRINT line and for the plot command in the interactive mode. The overlap of two or more traces on any plot is indicated by the letter X. When more than one output variable appears on the same plot, the first variable specified is printed as well as plotted. If a printout of all variables is desired, then a companion .PRINT line should be included. There is no limit on the number of .PLOT lines specified for each type of analysis. @node FOUR Fourier Analysis of Transient Analysis Output, , PLOT, Batch Output @subsection .FOUR: Fourier Analysis of Transient Analysis Output General form: @example .FOUR FREQ OV1 @end example Examples: @example .FOUR 100K V(5) @end example The Four (or Fourier) line controls whether NGSPICE performs a Fourier analysis as a part of the transient analysis. FREQ is the fundamental frequency, and OV1, desired. The Fourier analysis is performed over the interval , where TSTOP is the final time specified for the transient analysis, and period is one period of the fundamental frequency. The dc component and the first nine harmonics are determined. For maximum accuracy, TMAX (see the .TRAN line) should be set to period/100.0 (or less for very high-Q circuits). @node Interactive Interpreter, Bibliography, Analyses and Output Control, Top @chapter Interactive Interpreter Ngspice consists of a simulator and a front-end for data analysis and plotting. The front-end may be run as a separate "stand-alone" program under the name Nutmeg. Nutmeg will read in the "raw" data output file created by ngspice -r or with the write command in an interactive Ngspice session. Nutmeg or interactive Ngspice can plot data from a simulation on a graphics terminal or a workstation display. Most of the commands available in the interactive Ngspice front end are available in nutmeg; where this is not the case, ngspice-only commands have been marked with an asterisk ("*"). Note that the raw output file is different from the data that Spice2 writes to the standard output, which may also be produced by ngspice with the "-b" command line option. Ngspice and Nutmeg use the X Window System for plotting if they find the environment variable DISPLAY. Otherwise, a graphics-terminal independent interface (MFB) is used. If you are using X on a workstation, the DISPLAY variable should already be set; if you want to display graphics on a system different from the one you are running Ngspice or Nutmeg on, DISPLAY should be of the form "machine:0.0". See the appropriate documentation on the X Window System for more details. Command Synopsis @example ngspice [ -n ] [ -t term ] [ -r rawfile] [ -b ] [ -i ] [ input file ... ] nutmeg [ - ] [ -n ] [ -t term ] [ datafile ... ] @end example Options are: @table @code @item - Don't try to load the default data file ("rawspice.raw") if no other files are given. Nutmeg only. @item -n (or -N) Don't try to source the file ".spiceinit" upon startup. Normally ngspice and nutmeg try to find the file in the current directory, and if it is not found then in the user's home directory. @item -t term (or -T term) The program is being run on a terminal with mfb name term. @item -b (or -B) Run in batch mode. Ngspice reads the default input source (e.g. keyboard) or reads the given input file and performs the analyses specified; output is either Spice2-like line-printer plots ("ascii plots") or a ngspice rawfile. See the following section for details. Note that if the input source is not a terminal (e.g. using the IO redirection notation of "<") Ngspice defaults to batch mode (-i overrides). This option is valid for Ngspice only. @item -s (or -S) Run in server mode. This is like batch mode, except that a temporary rawfile is used and then written to the standard output, preceded by a line with a single "@@", after the simulation is done. This mode is used by the ngspice daemon. This option is valid for Ngspice only. @item -i (or -I) Run in interactive mode. This is useful if the standard input is not a terminal but interactive mode is desired. Command completion is not available unless the standard input is a terminal, however. This option is valid for Ngspice only. @item -r rawfile (or -P rawfile) Use rawfile as the default file into which the results of the simulation are saved. This option is valid for Ngspice only. @end table Further arguments to ngspice are taken to be Ngspice input files, which are read and saved (if running in batch mode then they are run immediately). Ngspice accepts most Spice2 input file, and output ascii plots, fourier analyses, and node printouts as specified in .plot, .four, and .print cards. If an out parameter is given on a .width card, the effect is the same as set width = .... Since Ngspice ascii plots do not use multiple ranges, however, if vectors together on a .plot card have different ranges they are not provide as much information as they would in Spice2. The output of Ngspice is also much less verbose than Spice2, in that the only data printed is that requested by the above cards. For nutmeg, further arguments are taken to be data files in binary or ascii format (see sconvert(1)) which are loaded into nutmeg. If the file is in binary format, it may be only partially completed (useful for examining Spice2 output before the simulation is finished). One file may contain any number of data sets from different analyses. @menu * Expressions:: * Command Interpretation:: * Commands:: * Variables:: * Bugs:: @end menu @node Expressions, Command Interpretation, Interactive Interpreter, Interactive Interpreter @section Expressions, Functions, and Constants Ngspice and Nutmeg data is in the form of vectors: time, voltage, etc. Each vector has a type, and vectors can be operated on and combined algebraically in ways consistent with their types. Vectors are normally created when a data file is read in (see the load command below), and when the initial datafile is loaded. They can also be created with the let command. An expression is an algebraic formula involving vectors and scalars (a scalar is a vector of length 1) and the following operations: @example + - * / ^ % @end example % is the modulo operator, and the comma operator has two meanings: if it is present in the argument list of a user definable function, it serves to separate the arguments. Otherwise, the term @code{x , y} is synonymous with @code{x + j(y)}. Also available are the logical operations & (and), | (or), ! (not), and the relational operations <, >, >=, <=, =, and <> (not equal). If used in an algebraic expression they work like they would in C, producing values of 0 or 1. The relational operators have the following synonyms: @example gt > lt < ge >= le <= ne <> eq = and & or | not ! @end example These are useful when < and > might be confused with IO redirection (which is almost always). The following functions are available: @ftable @code @item mag(vector) The magnitude of vector @item ph(vector) The phase of vector @item j(vector) i (sqrt(-1)) times vector @item real(vector) The real component of vector @item imag(vector) The imaginary part of vector @item db(vector) 20 log10(mag(vector)) @item log(vector) The logarithm (base 10) of vector @item ln(vector) The natural logarithm (base e) of vector @item exp(vector) e to the vector power @item abs(vector) The absolute value of vector. @item sqrt(vector) The square root of vector. @item sin(vector) The sine of vector. @item cos(vector) The cosine of vector. @item tan(vector) The tangent of vector. @item atan(vector) The inverse tangent of vector. @item norm(vector) The vector normalized to 1 (i.e, the largest magnitude of any component is 1). @item rnd(vector) A vector with each component a random integer between 0 and the absolute value of the vectors's corresponding component. @item mean(vector) The result is a scalar (a length 1 vec tor) that is the mean of the elements of vector. @item vector(number) The result is a vector of length number, with elements 0, 1, ... number - 1. If number is a vector then just the first element is taken, and if it isn't an integer then the floor of the magnitude is used. @item length(vector) The length of vector. @item interpolate(plot.vector) The result of interpolating the named vector onto the scale of the current plot. This function uses the variable polydegree to determine the degree of interpolation. @item deriv(vector) Calculates the derivative of the given vector. This uses numeric differentiation by interpolating a polynomial and may not produce satisfactory results (particularly with iterated differentiation). The implementation only calculates the derivative with respect to the real component of that vector's scale. @end ftable A vector may be either the name of a vector already defined or a floating-point number (a scalar). A number may be written in any format acceptable to NGSPICE, such as 14.6Meg or -1.231e-4. Note that you can either use scientific notation or one of the abbreviations like MEG or G, but not both. As with NGSPICE, a number may have trailing alphabetic characters after it. The notation expr [num] denotes the num'th element of expr. For multi-dimensional vectors, a vector of one less dimension is returned. Also for multi-dimensional vectors, the notation expr[m][n] will return the nth element of the mth subvector. To get a subrange of a vector, use the form expr[lower, upper]. To reference vectors in a plot that is not the current plot (see the setplot command, below), the notation plotname.vecname can be used. Either a plotname or a vector name may be the wildcard all. If the plotname is all, matching vectors from all plots are specified, and if the vector name is all, all vectors in the specified plots are referenced. Note that you may not use binary operations on expressions involving wildcards - it is not obvious what all + all should denote, for instance. Thus some (contrived) examples of expressions are: @example cos(TIME) + db(v(3)) sin(cos(log([1 2 3 4 5 6 7 8 9 10]))) TIME * rnd(v(9)) - 15 * cos(vin#branch) ^ [7.9e5 8] not ((ac3.FREQ[32] & tran1.TIME[10]) gt 3) @end example Vector names in ngspice may have a name such as @@name[param], where name is either the name of a device instance or model. This denotes the value of the param parameter of the device or model. See Appendix B for details of what parameters are available. The value is a vector of length 1. This function is also available with the show command, and is available with variables for convenience for command scripts. There are a number of pre-defined constants in nutmeg. They are: @vtable @code @item pi J (3.14159...) @item e The base of natural logarithms (2.71828...) @item c The speed of light (299,792,500 m/sec) @item i The square root of -1 @item kelvin Absolute 0 in Centigrade (-273.15 @math{^o}C) @item echarge The charge on an electron (1.6021918e-19 C) @item boltz Boltzman's constant (1.3806226e-23) @item planck Planck's constant (h = 6.626200e-34) @end vtable These are all in MKS units. If you have another variable with a name that conflicts with one of these then it takes precedence. @menu * Command Interpretation:: * Commands:: * Variables:: * Bugs:: @end menu @node Command Interpretation, Commands, Expressions, Interactive Interpreter @section Command Interpretation If a word is typed as a command, and there is no built-in command with that name, the directories in the sourcepath list are searched in order for the file. If it is found, it is read in as a command file (as if it were sourced). Before it is read, however, the variables argc and argv are set to the number of words following the filename on the command line, and a list of those words respectively. After the file is finished, these variables are unset. Note that if a command file calls another, it must save its argv and argc since they are altered. Also, command files may not be re-entrant since there are no local variables. (Of course, the procedures may explicitly manipulate a stack...) This way one can write scripts analogous to shell scripts for nutmeg and Ngspice. Note that for the script to work with Ngspice, it must begin with a blank line (or whatever else, since it is thrown away) and then a line with .control on it. This is an unfortunate result of the source command being used for both circuit input and command file execution. Note also that this allows the user to merely type the name of a circuit file as a command and it is automatically run. The commands are executed immediately, without running any analyses that may be specified in the circuit (to execute the analyses before the script executes, include a "run" command in the script). There are various command scripts installed in /usr/local/lib/spice/scripts (or whatever the path is on your machine), and the default sourcepath includes this directory, so you can use these command files (almost) like builtin commands. @node Commands, Variables, Command Interpretation, Interactive Interpreter @section Commands @menu * AC:: * Alias:: * Alter:: * Asciiplot:: * Aspice:: * Bug:: * Cd:: * Destroy:: * DC:: * Define:: * Delete:: * Diff:: * Display:: * Echo:: * Edit:: * Fourier:: * Hardcopy:: * Help:: * History:: * Iplot:: * Jobs:: * Let:: * Linearize:: * Listing:: * Load:: * Op:: * Plot:: * Print:: * Quit:: * Rehash:: * Reset:: * Reshape:: * Resume:: * Rspice:: * Run:: * Rusage:: * Save:: * Sens:: * Set:: * Setcirc:: * Setplot:: * Settype:: * Shell:: * Shift:: * Show:: * Showmod:: * Source:: * Status:: * Step:: * Stop:: * Tf:: * Trace:: * Tran:: * Transpose:: * Unalias:: * Undefine:: * Unset:: * Version:: * Where:: * Write:: * Xgraph:: * While - End:: * Repeat - End:: * Dowhile - End:: * Foreach - End:: * If - Then - Else:: * Label:: * Goto:: * Continue:: * Break:: @end menu @node AC, Alias, Commands, Commands @subsection Ac*: Perform an AC, small-signal frequency response analysis General Form: @example ac ( DEC | OCT | LIN ) N Fstart Fstop @end example Do an ac analysis. See the previous sections of this manual for more details. @node Alias, Alter, AC, Commands @subsection Alias: Create an alias for a command General Form: @example alias [word] [text ...] @end example Causes word to be aliased to text. History substitutions may be used, as in C-shell aliases. @node Alter, Asciiplot, Alias, Commands @subsection Alter*: Change a device or model parameter General Form: @example alter device value alter device parameter value [ parameter value ] @end example Alter changes the value for a device or a specified parameter of a device or model. The first form is used by simple devices which have one principal value (resistors, capacitors, etc.) where the second form is for more complex devices (bjt's, etc.). Model parameters can be changed with the second form if the name contains a "#". For specifying vectors as values, start the vector with "[", followed by the values in the vector, and end with "]". Be sure to place a space between each of the values and before and after the "[" and "]". @node Asciiplot, Aspice, Alter, Commands @subsection Asciiplot: Plot values using old-style character plots General Form: @example asciiplot plotargs @end example Produce a line printer plot of the vectors. The plot is sent to the standard output, so you can put it into a file with asciiplot args ... > file. The set options width, height, and nobreak determine the width and height of the plot, and whether there are page breaks, respectively. Note that you will have problems if you try to asciiplot something with an X-scale that isn't monotonic (i.e, something like sin(TIME) ), because asciiplot uses a simple-minded linear interpolation. @node Aspice, Bug, Asciiplot, Commands @subsection Aspice: Asynchronous ngspice run General Form: @example aspice input-file [output-file] @end example Start a NGSPICE run, and when it is finished load the resulting data. The raw data is kept in a temporary file. If output-file is specified then the diagnostic output is directed into that file, otherwise it is thrown away. @node Bug, Cd, Aspice, Commands @subsection Bug: Mail a bug report General Form: @example bug @end example Send a bug report. Please include a short summary of the problem, the version number and name of the operating system that you are running, the version of ngspice that you are running, and the relevant ngspice input file. (If you have defined BUGADDR, the mail is delivered to there.) @node Cd, Destroy, Bug, Commands @subsection Cd: Change directory General Form: @example cd [directory] @end example Change the current working directory to directory, or to the user's home directory if none is given. @node Destroy, DC, Cd, Commands @subsection Destroy: Delete a data set General Form: @example destroy [plotnames | all] @end example Release the memory holding the data for the specified runs. @node DC, Define, Destroy, Commands @subsection Dc*: Perform a DC-sweep analysis General Form: @example dc Source-Name Vstart Vstop Vincr [ Source2 Vstart2 Vstop2 Vincr2 ] @end example Do a dc transfer curve analysis. See the previous sections of this manual for more details. @node Define, Delete, DC, Commands @subsection Define: Define a function General Form: @example define function(arg1, arg2, ...) expression @end example Define the user-definable function with the name function and arguments arg1, arg2, ... to be expression, which may involve the arguments. When the function is later used, the arguments it is given are substituted for the formal arguments when it is parsed. If expression is not present, any definition for function is printed, and if there are no arguments to define then all currently active definitions are printed. Note that you may have different functions defined with the same name but different arities. Some useful definitions are: @example define max(x,y) (x > y) * x + (x <= y) * y define min(x,y) (x < y) * x + (x >= y) * y @end example @node Delete, Diff, Define, Commands @subsection Delete*: Remove a trace or breakpoint General Form: @example delete [ debug-number ... ] @end example Delete the specified breakpoints and traces. The debug numbers are those shown by the status command (unless you do status > file, in which case the debug numbers are not printed). @node Diff, Display, Delete, Commands @subsection Diff: Compare vectors General Form: @example diff plot1 plot2 [vec ...] @end example Compare all the vectors in the specified plots, or only the named vectors if any are given. There are different vectors in the two plots, or any values in the vectors differ significantly the difference is reported. The variable diff_abstol, diff_reltol, and diff_vntol are used to determine a significant difference. @node Display, Echo, Diff, Commands @subsection Display: List known vectors and types General Form: @example display [varname ...] @end example Prints a summary of currently defined vectors, or of the names specified. The vectors are sorted by name unless the variable nosort is set. The information given is the name of the vector, the length, the type of the vector, and whether it is real or complex data. Additionally, one vector is labelled [scale]. When a command such as plot is given without a vs argument, this scale is used for the X-axis. It is always the first vector in a rawfile, or the first vector defined in a new plot. If you undefine the scale (i.e, let TIME = []), one of the remaining vectors becomes the new scale (which is undetermined). @node Echo, Edit, Display, Commands @subsection Echo: Print text General Form: @example echo [text...] @end example Echos the given text to the screen. @node Edit, Fourier, Echo, Commands @subsection Edit*: Edit the current circuit General Form: @example edit [ file ] @end example Print the current Ngspice input file into a file, call up the editor on that file and allow the user to modify it, and then read it back in, replacing the original file. If a filename is given, then edit that file and load it, making the circuit the current one. @node Fourier, Hardcopy, Edit, Commands @subsection Fourier: Perform a fourier transform General Form: @example fourier fundamental_frequency [value ...] @end example Does a fourier analysis of each of the given values, using the first 10 multiples of the fundamental frequency (or the first nfreqs, if that variable is set - see below). The output is like that of the .four Ngspice line. The values may be any valid expression. The values are interpolated onto a fixed-space grid with the number of points given by the fourgridsize variable, or 200 if it is not set. The interpolation is of degree polydegree if that variable is set, or 1. If polydegree is 0, then no interpolation is done. This is likely to give erroneous results if the time scale is not monotonic, though. @node Hardcopy, Help, Fourier, Commands @subsection Hardcopy: Save a plot to a file for printing General Form: @example hardcopy file plotargs @end example Just like plot, except creates a file called file containing the plot. The file is an image in plot(5) format, and can be printed by either the plot(1) program or lpr with the -g flag. @node Help, History, Hardcopy, Commands @subsection Help: Print summaries of Ngspice commands General Form: @example help [all] [command ...] @end example Prints help. If the argument all is given, a short description of everything you could possibly type is printed. If commands are given, descriptions of those commands are printed. Otherwise help for only a few major commands is printed. @node History, Iplot, Help, Commands @subsection History: Review previous commands General Form: @example history [number] @end example Print out the history, or the last number commands typed at the keyboard. Note: in Ngspice version 3a7 and earlier, all commands (including ones read from files) were saved. @node Iplot, Jobs, History, Commands @subsection Iplot*: Incremental plot General Form: @example iplot [ node ...] @end example Incrementally plot the values of the nodes while Ngspice runs. The iplot command can be used with the where command to find trouble spots in a transient simulation. @node Jobs, Let, Iplot, Commands @subsection Jobs: List active asynchronous ngspice runs General Form: @example jobs @end example Report on the asynchronous NGSPICE jobs currently running. Nutmeg checks to see if the jobs are finished every time you execute a command. If it is done then the data is loaded and becomes available. @node Let, Linearize, Jobs, Commands @subsection Let: Assign a value to a vector General Form: @example let name = expr @end example Creates a new vector called name with the value specified by expr, an expression as described above. If expr is [] (a zero-length vector) then the vector becomes undefined. Individual elements of a vector may be modified by appending a subscript to name (ex. name[0]). If there are no arguments, let is the same as display. @node Linearize, Listing, Let, Commands @subsection Linearize*: Interpolate to a linear scale General Form: @example linearize vec ... @end example Create a new plot with all of the vectors in the current plot, or only those mentioned if arguments are given. The new vectors are interpolated onto a linear time scale, which is determined by the values of tstep, tstart, and tstop in the currently active transient analysis. The currently loaded input file must include a transient analysis (a tran command may be run interactively before the last reset, alternately), and the current plot must be from this transient analysis. This command is needed because Ngspice doesn't output the results from a transient analysis in the same manner that Spice2 did. @node Listing, Load, Linearize, Commands @subsection Listing*: Print a listing of the current circuit General Form: @example listing [logical] [physical] [deck] [expand] @end example If the logical argument is given, the listing is with all continuation lines collapsed into one line, and if the physical argument is given the lines are printed out as they were found in the file. The default is logical. A deck listing is just like the physical listing, except without the line numbers it recreates the input file verbatim (except that it does not preserve case). If the word expand is present, the circuit is printed with all subcircuits expanded. @node Load, Op, Listing, Commands @subsection Load: Load rawfile data General Form: @example load [filename] ... @end example Loads either binary or ascii format rawfile data from the files named. The default filename is rawspice.raw, or the argument to the -r flag if there was one. @node Op, Plot, Load, Commands @subsection Op*: Perform an operating point analysis General Form: @example op @end example Do an operating point analysis. See the previous sections of this manual for more details. @node Plot, Print, Op, Commands @subsection Plot: Plot values on the display General Form: @example plot exprs [ylimit ylo yhi] [xlimit xlo xhi] [xindices xilo xihi] [xcompress comp] [xdelta xdel] [ydelta ydel] [xlog] [ylog] [loglog] [vs xname] [xlabel word] [ylabel word] [title word] [samep] [linear] @end example Plot the given exprs on the screen (if you are on a graphics terminal). The xlimit and ylimit arguments determine the high and low x- and y-limits of the axes, respectively. The xindices arguments determine what range of points are to be plotted - everything between the xilo'th point and the xihi'th point is plotted. The xcompress argument specifies that only one out of every comp points should be plotted. If an xdelta or a ydelta parameter is present, it specifies the spacing between grid lines on the X- and Y-axis. These parameter names may be abbreviated to xl, yl, xind, xcomp, xdel, and ydel respectively. The xname argument is an expression to use as the scale on the x-axis. If xlog or ylog are present then the X or Y scale, respectively, is logarithmic (loglog is the same as specifying both). The xlabel and ylabel arguments cause the specified labels to be used for the X and Y axes, respectively. If samep is given, the values of the other parameters (other than xname) from the previous plot, hardcopy, or asciiplot command is used unless re-defined on the command line. The title argument is used in the place of the plot name at the bottom of the graph. The linear keyword is used to override a default logscale plot (as in the output for an AC analysis). Finally, the keyword polar to generate a polar plot. To produce a smith plot, use the keyword smith. Note that the data is transformed, so for smith plots you will see the data transformed by the function (x-1)/(x+1). To produce a polar plot with a smith grid but without performing the smith transform, use the keyword smithgrid. @node Print, Quit, Plot, Commands @subsection Print: Print values General Form: @example print [col] [line] expr ... @end example Prints the vector described by the expression expr. If the col argument is present, print the vectors named side by side. If line is given, the vectors are printed horizontally. col is the default, unless all the vectors named have a length of one, in which case line is the default. The options width, length, and nobreak are effective for this command (see asciiplot). If the expression is all, all of the vectors available are printed. Thus print col all > file prints everything in the file in SPICE2 format. The scale vector (time, frequency) is always in the first column unless the variable noprintscale is true. @node Quit, Rehash, Print, Commands @subsection Quit: Leave Ngspice or Nutmeg General Form: @example quit @end example Quit nutmeg or ngspice. @node Rehash, Reset, Quit, Commands @subsection Rehash: Reset internal hash tables General Form: @example rehash @end example Recalculate the internal hash tables used when looking up UNIX commands, and make all UNIX commands in the user's PATH available for command completion. This is useless unless you have set unixcom first (see above). @node Reset, Reshape, Rehash, Commands @subsection Reset*: Reset an analysis General Form: @example reset @end example Throw out any intermediate data in the circuit (e.g, after a breakpoint or after one or more analyses have been done already), and re-parse the input file. The circuit can then be re-run from it's initial state, overriding the affect of any set or alter commands. In Spice-3e and earlier versions this was done automatically by the run command. @node Reshape, Resume, Reset, Commands @subsection Reshape: Alter the dimensionality or dimensions of a vector General Form: @example reshape vector vector ... or reshape vector vector ... [ dimension, dimension, ... ] or reshape vector vector ... [ dimension ][ dimension ] ... @end example This command changes the dimensions of a vector or a set of vectors. The final dimension may be left off and it will be filled in automatically. If no dimensions are specified, then the dimensions of the first vector are copied to the other vectors. An error message of the form 'dimensions of x were inconsistent' can be ignored. @node Resume, Rspice, Reshape, Commands @subsection Resume*: Continue a simulation after a stop General Form: @example resume @end example Resume a simulation after a stop or interruption (control-C). @node Rspice, Run, Resume, Commands @subsection Rspice: Remote ngspice submission General Form: @example rspice input file @end example Runs a NGSPICE remotely taking the input file as a NGSPICE input file, or the current circuit if no argument is given. Nutmeg or Ngspice waits for the job to complete, and passes output from the remote job to the user's standard output. When the job is finished the data is loaded in as with aspice. If the variable rhost is set, nutmeg connects to this host instead of the default remote Ngspice server machine. This command uses the "rsh" command and thereby requires authentication via a ".rhosts" file or other equivalent method. Note that "rsh" refers to the "remote shell" program, which may be "remsh" on your system; to override the default name of "rsh", set the variable remote_shell. If the variable rprogram is set, then rspice uses this as the pathname to the program to run on the remote system. Note: rspice will not acknowledge elements that have been changed via the "alter" or "altermod" commands. @node Run, Rusage, Rspice, Commands @subsection Run*: Run analysis from the input file General Form: @example run [rawfile] @end example Run the simulation as specified in the input file. If there were any of the control lines .ac, .op, .tran, or .dc, they are executed. The output is put in rawfile if it was given, in addition to being available interactively. In Spice-3e and earlier versions, the input file would be re-read and any affects of the set or alter commands would be reversed. This is no longer the affect. @node Rusage, Save, Run, Commands @subsection Rusage: Resource usage General Form: @example rusage [resource ...] @end example Print resource usage statistics. If any resources are given, just print the usage of that resource. Most resources require that a circuit be loaded. Currently valid resources are: elapsed The amount of time elapsed since the last rusage elapsed call. faults Number of page faults and context switches (BSD only). space Data space used. time CPU time used so far. temp Operating temperature. tnom Temperature at which device parameters were measured. equations Circuit Equations time Total Analysis Time totiter Total iterations accept Accepted timepoints rejected Rejected timepoints loadtime Time spent loading the circuit matrix and RHS. reordertime Matrix reordering time lutime L-U decomposition time solvetime Matrix solve time trantime Transient analysis time tranpoints Transient timepoints traniter Transient iterations trancuriters Transient iterations for the last time point* tranlutime Transient L-U decomposition time transolvetime Transient matrix solve time everything All of the above. * listed incorrectly as "Transient iterations per point". @node Save, Sens, Rusage, Commands @subsection Save*: Save a set of outputs General Form: @example save [all | allv | alli | output ...] .save [all | allv | alli | output ...] @end example Save a set of outputs, discarding the rest. If a node has been mentioned in a save command, it appears in the working plot after a run has completed, or in the rawfile if ngspice is run in batch mode. If a node is traced or plotted (see below) it is also saved. For backward compatibility, if there are no save commands given, all outputs are saved. When the keyword "all" or the keyword "allv", appears in the save command, all node voltages, voltage source currents and inductor currents are saved in addition to any other values listed. If the keyword "alli" appears in the save command, all devices currents are saved. Note: the current implementation saves only the currents of devices which have internal nodes, i.e. MOSFETs with non zero RD and RS; BJTs with non-zero RC, RB and RE; DIODEs with non-zero RS; etc. Resistor and capacitor currents are not saved with this option. These deficiencies will be addressed in a later revision. @node Sens, Set, Save, Commands @subsection Sens*: Run a sensitivity analysis General Form: @example sens output_variable sens output_variable ac ( DEC | OCT | LIN ) N Fstart Fstop @end example Perform a Sensitivity analysis. output_variable is either a node voltage (ex. "v(1)" or "v(A,out)") or a current through a voltage source (ex. "i(vtest)"). The first form calculates DC sensitivities, the second form calculates AC sensitivies. The output values are in dimensions of change in output per unit change of input (as opposed to percent change in output or per percent change of input). @node Set, Setcirc, Sens, Commands @subsection Set: Set the value of a variable General Form: @example set [word] set [word = value] ... @end example Set the value of word to be value, if it is present. You can set any word to be any value, numeric or string. If no value is given then the value is the boolean 'true'. The value of word may be inserted into a command by writing $word. If a variable is set to a list of values that are enclosed in parentheses (which must be separated from their values by white space), the value of the variable is the list. The variables used by nutmeg are listed in the following section. @node Setcirc, Setplot, Set, Commands @subsection Setcirc*: Change the current circuit General Form: @example setcirc [circuit name] @end example The current circuit is the one that is used for the simulation commands below. When a circuit is loaded with the source command (see below) it becomes the current circuit. @node Setplot, Settype, Setcirc, Commands @subsection Setplot: Switch the current set of vectors General Form: @example setplot [plotname] @end example Set the current plot to the plot with the given name, or if no name is given, prompt the user with a menu. (Note that the plots are named as they are loaded, with names like tran1 or op2. These names are shown by the setplot and display commands and are used by diff, below.) If the "New plot" item is selected, the current plot becomes one with no vectors defined. Note that here the word "plot" refers to a group of vectors that are the result of one NGSPICE run. When more than one file is loaded in, or more than one plot is present in one file, nutmeg keeps them separate and only shows you the vectors in the current plot. @node Settype, Shell, Setplot, Commands @subsection Settype: Set the type of a vector General Form: @example settype type vector ... @end example Change the type of the named vectors to type. Type names can be found in the manual page for sconvert. @node Shell, Shift, Settype, Commands @subsection Shell: Call the command interpreter General Form: @example shell [ command ] @end example Call the operating system's command interpreter; execute the specified command or call for interactive use. @node Shift, Show, Shell, Commands @subsection Shift: Alter a list variable General Form: @example shift [varname] [number] @end example If varname is the name of a list variable, it is shifted to the left by number elements (i.e, the number leftmost elements are removed). The default varname is argv, and the default number is 1. @node Show, Showmod, Shift, Commands @subsection Show*: List device state General Form: @example show devices [ : parameters ] , ... @end example The show command prints out tables summarizing the operating condition of selected devices (much like the spice2 operation point summary). If device is missing, a default set of devices are listed, if device is a single letter, devices of that type are listed; if device is a subcircuit name (beginning and ending in ":") only devices in that subcircuit are shown (end the name in a double-":" to get devices within sub-subcircuits recursively). The second and third forms may be combined ("letter:subcircuit:") or "letter:subcircuit::") to select a specific type of device from a subcircuit. A device's full name may be specified to list only that device. Finally, devices may be selected by model by using the form "#modelname" or ":subcircuit#modelname" or "letter:subcircuit#modelname". If no parameters are specified, the values for a standard set of parameters are listed. If the list of parameters contains a "+", the default set of parameters is listed along with any other specified parameters. For both devices and parameters, the word "all" has the obvious meaning. Note: there must be spaces separating the ":" that divides the device list from the parameter list. @node Showmod, Source, Show, Commands @subsection Showmod*: List model parameter values General Form: @example showmod models [ : parameters ] , ... @end example The showmod command operates like the show command (above) but prints out model parameter values. The applicable forms for models are a single letter specifying the device type letter, "letter:subckt:", "modelname", ":subckt:modelname", or "letter:subcircuit:modelname". @node Source, Status, Showmod, Commands @subsection Source: Read a Ngspice input file General Form: @example source file @end example For Ngspice: Read the Ngspice input file file. Nutmeg and Ngspice commands may be included in the file, and must be enclosed between the lines .control and .endc. These commands are executed immediately after the circuit is loaded, so a control line of ac ... works the same as the corresponding .ac card. The first line in any input file is considered a title line and not parsed but kept as the name of the circuit. The exception to this rule is the file .spiceinit. Thus, a Ngspice command script must begin with a blank line and then with a acters *# is considered a control line. This makes it possible to imbed commands in Ngspice input files that are ignored by earlier versions of Spice2 For Nutmeg: Reads commands from the file filename. Lines beginning with the character * are considered comments and ignored. @node Status, Step, Source, Commands @subsection Status*: Display breakpoint information General Form: @example status @end example Display all of the traces and breakpoints currently in effect. @node Step, Stop, Status, Commands @subsection Step*: Run a fixed number of timepoints General Form: @example step [number] @end example Iterate number times, or once, and then stop. @node Stop, Tf, Step, Commands @subsection Stop*: Set a breakpoint General Form: @example stop [ after n] [ when value cond value ] ... @end example Set a breakpoint. The argument after n means stop after n iteration number n, and the argument when value cond value means stop when the first value is in the given relation with the second value, the possible relations being @example eq or = equal to ne or <> not equal to gt or > greater than lt or < less than ge or >= greater than or equal to le or <= less than or equal to @end example IO redirection is disabled for the stop command, since the relational operations conflict with it (it doesn't produce any output anyway). The values above may be node names in the running circuit, or real values. If more than one condition is given, e.g. stop after 4 when @math{v(1) > 4} when @math{v(2) < 2}, the conjunction of the conditions is implied. @subsection Sysinfo: Print system information General Form: @example sysinfo @end example The command prints system information useful for sending bug report to developers. Information consists of: @itemize @bullet @item Name of the operating system, @item Name of the node, @item Current release of the operating system, @item Current version of this release, @item Name of hardware type. @end itemize The example below shows the use of this command. @example ngspice 1 -> sysinfo Linux janus.wayout.net 2.4.20 #1 SMP Tue Jun 10 18:58:26 CEST 2003 i686 ngspice 2 -> @end example @quotation Note This command may not be available on your environment, if it is not available, please send analogous information when submitting bug reports. @end quotation @node Tf, Trace, Stop, Commands @subsection Tf*: Run a Transfer Function analysis General Form: @example tf output_node input_source @end example The tf command performs a transfer function analysis, returning the transfer function (output/input), output resistance, and input resistance between the given output node and the given input source. The analysis assumes a small-signal DC (slowly varying) input. @node Trace, Tran, Tf, Commands @subsection Trace*: Trace nodes General Form: @example trace [ node ...] @end example For every step of an analysis, the value of the node is printed. Several traces may be active at once. Tracing is not applicable for all analyses. To remove a trace, use the delete command. @node Tran, Transpose, Trace, Commands @subsection Tran*: Perform a transient analysis General Form: @example tran Tstep Tstop [ Tstart [ Tmax ] ] [ UIC ] @end example Perform a transient analysis. See the previous sections of this manual for more details. @node Transpose, Unalias, Tran, Commands @subsection Transpose: Swap the elements in a multi-dimensional data set General Form: @example transpose vector vector ... @end example This command transposes a multidimensional vector. No analysis in Ngspice produces multidimensional vectors, although the DC transfer curve may be run with two varying sources. You must use the "reshape" command to reform the one-dimensional vectors into two dimensional vectors. In addition, the default scale is incorrect for plotting. You must plot versus the vector corresponding to the second source, but you must also refer only to the first segment of this second source vector. For example (circuit to produce the transfer characteristic of a MOS transistor): @example ngspice > dc vgg 0 5 1 vdd 0 5 1 ngspice > plot i(vdd) ngspice > reshape all [6,6] ngspice > transpose i(vdd) v(drain) ngspice > plot i(vdd) vs v(drain)[0] @end example @node Unalias, Undefine, Transpose, Commands @subsection Unalias: Retract an alias General Form: @example unalias [word ...] @end example Removes any aliases present for the words. @node Undefine, Unset, Unalias, Commands @subsection Undefine: Retract a definition General Form: @example undefine function @end example Definitions for the named user-defined functions are deleted. @node Unset, Version, Undefine, Commands @subsection Unset: Clear a variable General Form: @example unset [word ...] @end example Clear the value of the specified variable(s) (word). @node Version, Where, Unset, Commands @subsection Version: Print the version of ngspice General Form: @example version [-s | -f | ] @end example Print out the version of @emph{nutmeg} that is running, if invoked without argument or with @code{-s} or @code{-f}. If the argument is a @code{} (any string different from @code{-s} or @code{-f} is considered a @code{} ), the command checks to make sure that the arguments match the current version of NGSPICE. (This is mainly used as a @code{Command:} line in rawfiles.) @emph{Options description} @itemize @bullet @item No option: The output of the command is the message you can see when running NGSPICE from the command line, no more no less. @item @code{-s}(hort): A shorter version of the message you see when calling NGSPICE from the command line. @item @code{-f}(ull): You may want to use this option if you want to know what extensions are included into the simulator and what compilation switches are active. A list of compilation options and included extensions is appended to the normal (not short) message. May be useful when sending bug reports. @end itemize The following example shows what the command returns is some situations: @example ngspice 10 -> version ****** ** ngspice-15 : Circuit level simulation program ** The U. C. Berkeley CAD Group ** Copyright 1985-1994, Regents of the University of California. ** Please submit bug-reports to: ngspice-devel@@lists.sourceforge.net ** Creation Date: Sun Aug 24 00:35:57 CEST 2003 ****** ngspice 11 -> version 14 Note: rawfile is version 14 (current version is 15) ngspice 12 -> version 15 ngspice 13 -> @end example @strong{Note for developers:} The option listing returned when @code{version} is called with the @code{-f} option is built at compile time using @code{#ifdef} blocks. When new compile switch are added, if you want them to appear on the list, you have to modify the code in @file{misccoms.c}. @node Where, Write, Version, Commands @subsection Where: Identify troublesome node or device General Form: @example where @end example When performing a transient or operating point analysis, the name of the last node or device to cause non-convergence is saved. The where command prints out this information so that you can examine the circuit and either correct the problem or make a bug report. You may do this either in the middle of a run or after the simulator has given up on the analysis. For transient simulation, the iplot command can be used to monitor the progress of the analysis. When the analysis slows down severly or hangs, interrupt the simulator (with control-C) and issue the where command. Note that only one node or device is printed; there may be problems with more than one node. @node Write, Xgraph, Where, Commands @subsection Write: Write data to a file General Form: @example write [file] [exprs] @end example Writes out the expressions to file. First vectors are grouped together by plots, and written out as such (i.e, if the expression list contained three vectors from one plot and two from another, then two plots are written, one with three vectors and one with two). Additionally, if the scale for a vector isn't present, it is automatically written out as well. The default format is ascii, but this can be changed with the set filetype command. The default filename is rawspice.raw, or the argument to the -r flag on the command line, if there was one, and the default expression list is all. @node Xgraph, While - End, Write, Commands @subsection Xgraph: use the xgraph(1) program for plotting. General Form: @example xgraph file [exprs] [plot options] @end example The ngspice/nutmeg xgraph command plots data like the plot command but via xgraph, a popular X11 plotting program. If file is either "temp" or "tmp" a temporary file is used to hold the data while being plotted. For available plot options, see the plot command. All options except for polar or smith plots are supported. @section Control Structures @node While - End, Repeat - End, Xgraph, Commands @subsection While - End General Form: @example while condition statement ... end @end example While condition, an arbitrary algebraic expression, is true, execute the statements. @node Repeat - End, Dowhile - End, While - End, Commands @subsection Repeat - End General Form: @example repeat [number] statement ... end @end example Execute the statements number times, or forever if no argument is given. @node Dowhile - End, Foreach - End, Repeat - End, Commands @subsection Dowhile - End General Form: @example dowhile condition statement ... end @end example The same as while, except that the condition is tested after the statements are executed. @node Foreach - End, If - Then - Else, Dowhile - End, Commands @subsection Foreach - End General Form: @example foreach var value ... statement ... end @end example The statements are executed once for each of the values, each time with the variable var set to the current one. (var can be accessed by the $var notation - see below). @node If - Then - Else, Label, Foreach - End, Commands @subsection If - Then - Else General Form: @example if condition statement ... else statement ... end @end example If the condition is non-zero then the first set of statements are executed, otherwise the second set. The else and the second set of statements may be omitted. @node Label, Goto, If - Then - Else, Commands @subsection Label General Form: @example label word @end example If a statement of the form goto word is encountered, control is transferred to this point, otherwise this is a no-op. @node Goto, Continue, Label, Commands @subsection Goto General Form: @example goto word @end example If a statement of the form label word is present in the block or an enclosing block, control is transferred there. Note that if the label is at the top level, it must be before the goto statement (i.e, a forward goto may occur only within a block). @node Continue, Break, Goto, Commands @subsection Continue General Form: @example continue @end example If there is a while, dowhile, or foreach block enclosing this statement, control passes to the test, or in the case of foreach, the next value is taken. Otherwise an error results. @node Break, , Continue, Commands @subsection Break General Form: @example break @end example If there is a while, dowhile, or foreach block enclosing this statement, control passes out of the block. Otherwise an error results. Of course, control structures may be nested. When a block is entered and the input is the terminal, the prompt becomes a number of >'s corresponding to the number of blocks the user has entered. The current control structures may be examined with the debugging command cdump. @node Variables, Bugs, Commands, Interactive Interpreter @section Variables The operation of both Nutmeg and Ngspice may be affected by setting variables with the "set" command. In addition to the variables mentioned below, the set command in Ngspice also affect the behaviour of the simulator via the options previously described under the section on ".OPTIONS". The variables meaningful to nutmeg which may be altered by the set command are: @vtable @code @item diff_abstol The absolute tolerance used by the diff command. appendwrite Append to the file when a write command is is sued, if one already exists. @item colorN These variables determine the colors used, if X is being run on a color display. N may be between 0 and 15. Color 0 is the background, color 1 is the grid and text color, and colors 2 through 15 are used in order for vectors plot ted. The value of the color variables should be names of colors, which may be found in the file /usr/lib/rgb.txt. @item combplot Plot vectors by drawing a vertical line from each point to the X-axis, as opposed to joining the points. Note that this option is subsumed in the plottype option, below. @item cpdebug Print cshpar debugging information (must be com plied with the -DCPDEBUG flag). Unsupported in the current release. @item debug If set then a lot of debugging information is printed (must be compiled with the -DFTEDEBUG flag). Unsupported in the current release. @item device The name (@code{/dev/tty??}) of the graphics device. If this variable isn't set then the user's terminal is used. To do plotting on another monitor you probably have to set both the device and term variables. (If device is set to the name of a file, nutmeg dumps the graphics control codes into this file -- this is useful for saving plots.) @item echo Print out each command before it is executed. @item filetype This can be either ascii or binary, and determines what format are. The default is ascii. @item fourgridsize How many points to use for interpolating into when doing fourier analysis. @item gridsize If this variable is set to an integer, this number is used as the number of equally spaced points to use for the Y axis when plotting. Otherwise the current scale is used (which may not have equally spaced points). If the current scale isn't strictly monotonic, then this option has no effect. @item hcopydev If this is set, when the hardcopy command is run the resulting file is automatically printed on the printer named hcopydev with the command @code{lpr -Phcopydev -g file}. @item hcopyfont This variable specifies the font name for hardcopy output plots. The value is device dependent. @item hcopyfontsize This is a scaling factor for the font used in hardcopy plots. @item hcopydevtype This variable specifies the type of the printer output to use in the hardcopy command. If hcopydevtype is not set, plot (5) format is assumed. The standard distribution currently recognizes postscript as an alternative output for mat. When used in conjunction with hcopydev, hcopydevtype should specify a format supported by the printer. @item height The length of the page for asciiplot and print col. @item history The number of events to save in the his tory list. @item lprplot5 This is a printf(3s) style format string used to specify the command to use for sending plot(5)-style plots to a printer or plotter. The first parameter sup plied is the printer name, the second parameter supplied is a file name containing the plot. Both parameters are strings. It is trivial to cause Ngspice to abort by supplying a unreasonable format string. @item lprps This is a printf(3s) style format string used to specify the command to use for sending PostScript plots to a printer or plotter. The first parameter supplied is the printer name, the second parameter supplied is a file name containing the plot. Both parameters are strings. It is trivial to cause Ngspice to abort by supplying a unreasonable format string. @item nfreqs The number of frequencies to compute in the fourier command. (Defaults to 10.) @item nobreak Don't have asciiplot and print col break between pages. @item noasciiplotvalue Don't print the first vector plotted to the left when doing an asciiplot. @item noclobber Don't overwrite existing files when do ing IO redirection. @item noglob Don't expand the global characters `*', `?', `[', and `]'. This is the default. @item nogrid Don't plot a grid when graphing curves (but do label the axes). @item nomoremode If nomoremode is not set, whenever a large amount of data is being printed to the screen (e.g, the print or asciiplot commands), the output is stopped every screenful and continues when a carriage return is typed. If nomoremode is set then data scrolls off the screen without check. @item nonomatch If noglob is unset and a global expression cannot be matched, use the global characters literally instead of complaining. @item nosort Don't have display sort the variable names. @item noprintscale Don't print the scale in the leftmost column when a print col command is given. @item numdgt The number of digits to print when printing tables of data (fourier, print col). The default precision is 6 digits. On the VAX, approximately 16 decimal digits are avail able using double precision, so numdgt should not be more than 16. If the number is negative, one fewer digit is printed to ensure constant widths in tables. @item plottype This should be one of normal, comb, or point:chars. normal, the default, causes points to be plotted as parts of connected lines. comb causes a comb plot to be done (see the description of the combplot variable above). point causes each point to be plotted separately - the chars are a list of characters that are used for each vector plotted. If they are omitted then a de fault set is used. @item polydegree The degree of the polynomial that the plot command should fit to the data. If polydegree is N, then nutmeg fits a degree N polynomial to every set of N points and draw 10 intermediate points in between each end point. If the points aren't monotonic, then it tries rotating the curve and reducing the degree until a fit is achieved. @item polysteps The number of points to interpolate between every pair of points available when doing curve fitting. The default is 10. @item program The name of the current program (argv[0]). @item prompt The prompt, with the character `!' replaced by the current event number. @item rawfile The default name for rawfiles created. @item diff_reltol The relative tolerance used by the diff command. @item remote_shell Overrides the name used for generating rspice runs (default is "rsh"). @item rhost The machine to use for remote NGSPICE runs, in stead of the default one (see the description of the rspice command, below). @item rprogram The name of the remote program to use in the rspice command. @item slowplot Stop between each graph plotted and wait for the user to type return before continuing. @item sourcepath A list of the directories to search when a source command is given. The default is the current directory and the standard ngspice library (/usr/local/lib/ngspice, or whatever LIBPATH is #defined to in the Ngspice source. @item spicepath The program to use for the aspice command. The default is /cad/bin/spice. @item term The mfb name of the current terminal. @item units If this is degrees, then all the trig functions will use degrees instead of radians. @item unixcom If a command isn't defined, try to execute it as a UNIX command. Setting this option has the effect of giving a rehash command, below. This is useful for people who want to use nutmeg as a login shell. @item verbose Be verbose. This is midway between echo and de bug / cpdebug. @item diff _vntol The absolute voltage tolerance used by the diff command. @item width The width of the page for asciiplot and print col. @item x11lineararcs Some X11 implementations have poor arc drawing. If you set this option, Ngspice will plot using an approximation to the curve using straight lines. @item xbrushheight The height of the brush to use if X is being run. @item xbrushwidth The width of the brush to use if X is being run. @item xfont The name of the X font to use when plotting data and entering labels. The plot may not look good if this is a variable-width font. @end vtable There are several set variables that Ngspice uses but Nutmeg does not. They are: @vtable @code @item editor The editor to use for the edit command. @item modelcard The name of the model card (normally @item noaskquit Do not check to make sure that there are no circuits suspended and no plots un saved. Normally Ngspice warns the user when he tries to quit if this is the case. @item nobjthack Assume that BJTs have 4 nodes. @item noparse Don't attempt to parse input files when they are read in (useful for debugging). Of course, they cannot be run if they are not parsed. nosubckt Don't expand subcircuits. @item renumber Renumber input lines when an input file has .include's. subend The card to end subcircuits (normally @item subinvoke The prefix to invoke subcircuits (nor mally x). substart The card to begin subcircuits (normally @end vtable @section INIT FILES Ngspice reads some initialization information and paths from a file called "spinit" or "tclspinit" (the latter if you have compiled tclspice). The init file is read by ngspice or ngnutmeg as they start. The init script contains spice commands (interactive commands). The following example show the standard ngspice init file. @example * Standard spice and nutmeg init file alias exit quit alias acct rusage all set x11lineararcs *unset brief strcmp __flag $program "ngspice" if $__flag = 0 *set numparams * For SPICE2 POLYs, edit the below line to point to the location * of your codemode. codemodel /usr/local/lib/spice/spice2poly.cm * The other codemodels codemodel /usr/local/lib/spice/analog.cm codemodel /usr/local/lib/spice/digital.cm codemodel /usr/local/lib/spice/xtradev.cm codemodel /usr/local/lib/spice/xtraevt.cm end unset __flag @end example The spice init file location depends of the operating system you are running and the configuration parameters. The init file is the best place to put commands you always input when the simulator starts. @section MISCELLANEOUS If there are subcircuits in the input file, Ngspice expands instances of them. A subcircuit is delimited by the cards .subckt and .ends, or whatever the value of the variables substart and subend is, respectively. An instance of a subcircuit is created by specifying a device with type 'x' - the device line is written @example xname node1 node2 ... subcktname @end example where the nodes are the node names that replace the formal parameters on the .subckt line. All nodes that are not formal parameters are prepended with the name given to the instance and a ':', as are the names of the devices in the subcircuit. If there are several nested subcircuits, node and device names look like subckt1:subckt2:...:name. If the variable subinvoke is set, then it is used as the prefix that specifies instances of subcircuits, instead of 'x'. Nutmeg occasionally checks to see if it is getting close to running out of space, and warns the user if this is the case. (This is more likely to be useful with the NGSPICE front end.) C-shell type quoting with "" and '', and backquote substitution may be used. Within single quotes, no further substitution (like history substitution) is done, and within double quotes, the words are kept together but further substitution is done. Any text between backquotes is replaced by the result of executing the text as a command to the shell. Tenex-style ('set filec' in the 4.3 C-shell) command, filename, and keyword completion is possible: If EOF (control-D) is typed after the first character on the line, a list of the commands or possible arguments is printed (If it is alone on the line it exits nutmeg). If escape is typed, then nutmeg tries to complete what the user has already typed. To get a list of all commands, the user should type ^D. The values of variables may be used in commands by writing $varname where the value of the variable is to appear. The special variables $$ and $< refer to the process ID of the program and a line of input which is read from the terminal when the variable is evaluated, respectively. If a variable has a name of the form $&word, then word is considered a vector (see above), and its value is taken to be the value of the variable. If $foo is a valid variable, and is of type list, then the expression $foo[low-high] represents a range of elements. Either the upper index or the lower may be left out, and the reverse of a list may be obtained with $foo[len-0]. Also, the notation $?foo evaluates to 1 if the variable foo is defined, 0 otherwise, and $#foo evaluates to the number of elements in foo if it is a list, 1 if it is a number or string, and 0 if it is a boolean variable. History substitutions, similar to C-shell history substitutions, are also available - see the C-shell manual page for all of the details. The characters ~, @{, and @} have the same effects as they do in the C-Shell, i.e., home directory and alternative expansion. It is possible to use the wildcard characters *, ?, [, and ] also, but only if you unset noglob first. This makes them rather useless for typing algebraic expressions, so you should set noglob again after you are done with wildcard expansion. Note that the pattern [^abc] matchs all characters except a, b, and c. IO redirection is available - the symbols >, >>, >&, >>&, and < have the same effects as in the C-shell. You may type multiple commands on one line, separated by semicolons. If you want to use a different mfbcap file than the default (usually ~cad/lib/mfbcap), you have to set the environment variable SPICE_MFBCAP before you start nutmeg or ngspice. The -m option and the mfbcap variable no longer work. If X is being used, the cursor may be positioned at any point on the screen when the window is up and characters typed at the keyboard are added to the window at that point. The window may then be sent to a printer using the xpr(1) program. Nutmeg can be run under VAX/VMS, as well as several other operating systems. Some features like command completion, expansion of *, ?, and [], backquote substitution, the shell command, and so forth do not work. On some systems you have to respond to the -moreprompt during plot with a carriage return instead of any key as you can do on UNIX. @node Bugs, , Variables, Interactive Interpreter @section Bugs The label entry facilities are primitive. You must be careful to type slowly when entering labels -- nutmeg checks for input once every second, and can get confused if characters arrive faster. If you redefine colors after creating a plot window with X, and then cause the window to be redrawn, it does not redraw in the correct colors. When defining aliases like @example alias pdb plot db( '!:1' - '!:2' ) @end example you must be careful to quote the argument list substitutions in this manner. If you quote the whole argument it might not work properly. In a user-defined function, the arguments cannot be part of a name that uses the plot.vec syntax. For example: @example define check(v(1)) cos(tran1.v(1)) @end example does not work. If you type plot all all, or otherwise use a wildcard reference for one plot twice in a command, the effect is unpredictable. The asciiplot command doesn't deal with log scales or the delta keywords. Often the names of terminals recognized by MFB are different from those in /etc/termcap. Thus you may have to reset your terminal type with the command @example set term = termname @end example where termname is the name in the mfbcap file. The hardcopy command is useless on VMS and other systems without the plot command, unless the user has a program that understands plot(5) format. Ngspice recognizes all the notations used in SPICE2 .plot cards, and translates vp(1) into ph(v(1)), and so forth. However, if there are spaces in these names it won't work. Hence v(1, 2) and (-.5, .5) aren't recognized. BJTs can have either 3 or 4 nodes, which makes it difficult for the subcircuit expansion routines to decide what to rename. If the fourth parameter has been declared as a model name, then it is assumed that there are 3 nodes, otherwise it is considered a node. To disable this, you can set the variable "nobjthack" which forces BJTs to have 4 nodes (for the purposes of subcircuit expansion, at least). The @@name[param] notation might not work with trace, iplot, etc. yet. The first line of a command file (except for the .spiceinit file) should be a comment, otherwise NGSPICE may create an empty circuit. Files specified on the command line are read before .spiceinit is read. @node Bibliography, Example Circuits, Interactive Interpreter, Top @chapter Bibliography [1] A. Vladimirescu and S. Liu, The Simulation of MOS Integrated Circuits Using SPICE2 ERL Memo No. ERL M80/7, Electronics Research Laboratory University of California, Berkeley, October 1980 [2] T. Sakurai and A. R. Newton, A Simple MOSFET Model for Circuit Analysis and its application to CMOS gate delay analysis and series-connected MOSFET Structure ERL Memo No. ERL M90/19, Electronics Research Labora tory, University of California, Berkeley, March 1990 [3] B. J. Sheu, D. L. Scharfetter, and P. K. Ko, SPICE2 Implementation of BSIM ERL Memo No. ERL M85/42, Electronics Research Labora tory University of California, Berkeley, May 1985 [4] J. R. Pierret, A MOS Parameter Extraction Program for the BSIM Model ERL Memo Nos. ERL M84/99 and M84/100, Electronics Research Laboratory University of California, Berkeley, November 1984 [5] Min-Chie Jeng, Design and Modeling of Deep Submicrometer MOSFETSs ERL Memo Nos. ERL M90/90, Electronics Research Labora tory University of California, Berkeley, October 1990 [6] Soyeon Park, Analysis and SPICE implementation of High Temperature Effects on MOSFET, Master's thesis, University of California, Berkeley, December 1986. [7] Clement Szeto, Simulator of Temperature Effects in MOS FETs (STEIM), Master's thesis, University of California, Berkeley, May 1988. [8] J.S. Roychowdhury and D.O. Pederson, Efficient Tran sient Simulation of Lossy Interconnect, Proc. of the 28th ACM/IEEE Design Automation Confer ence, June 17-21 1991, San Francisco [9] A. E. Parker and D. J. Skellern, An Improved FET Model for Computer Simulators, IEEE Trans CAD, vol. 9, no. 5, pp. 551-553, May 1990. [10] R. Saleh and A. Yang, Editors, Simulation and Modeling, IEEE Circuits and Devices, vol. 8, no. 3, pp. 7-8 and 49, May 1992 [11] H.Statz et al., GaAs FET Device and Circuit Simulation in SPICE, IEEE Transactions on Electron Devices, V34, Number 2, February, 1987 pp160-169. [12] Weidong Liu et al., BSIM3v3.2.2 MOSFET Model Users' Manual, http://www-device.eecs.berkeley.edu/~bsim3/ftpv322/Mod_doc/V322manu.tar.Z [13] Weidong Lui et al. BSIM3.v3.2.3 MOSFET Model Users' Manual, http://www-device.eecs.berkeley.edu/~bsim3/ftpv323/Mod_doc/BSIM323_manu.tar @node Example Circuits, Model and Device Parameters, Bibliography, Top @chapter Example Circuits @menu * Differential Pair:: * MOSFET Characterization:: * RTL Inverter:: * Four-Bit Binary Adder:: * Transmission-Line Inverter:: @end menu @node Differential Pair, MOSFET Characterization, Example Circuits, Example Circuits @section Differential Pair The following deck determines the dc operating point of a simple differential pair. In addition, the ac small-signal response is computed over the frequency range 1Hz to 100MEGHz. @example SIMPLE DIFFERENTIAL PAIR VCC 7 0 12 VEE 8 0 -12 VIN 1 0 AC 1 RS1 1 2 1K RS2 6 0 1K Q1 3 2 4 MOD1 Q2 5 6 4 MOD1 RC1 7 3 10K RC2 7 5 10K RE 4 8 10K .MODEL MOD1 NPN BF=50 VAF=50 IS=1.E-12 RB=100 CJC=.5PF TF=.6NS .TF V(5) VIN .AC DEC 10 1 100MEG .END @end example @node MOSFET Characterization, RTL Inverter, Differential Pair, Example Circuits @section MOSFET Characterization The following deck computes the output characteristics of a MOSFET device over the range 0-10V for VDS and 0-5V for VGS. @example MOS OUTPUT CHARACTERISTICS .OPTIONS NODE NOPAGE VDS 3 0 VGS 2 0 M1 1 2 0 0 MOD1 L=4U W=6U AD=10P AS=10P * VIDS MEASURES ID, WE COULD HAVE USED VDS, BUT ID WOULD BE NEGATIVE VIDS 3 1 .MODEL MOD1 NMOS VTO=-2 NSUB=1.0E15 UO=550 .DC VDS 0 10 .5 VGS 0 5 1 .END @end example @node RTL Inverter, Four-Bit Binary Adder, MOSFET Characterization, Example Circuits @section RTL Inverter The following deck determines the dc transfer curve and the transient pulse response of a simple RTL inverter. The input is a pulse from 0 to 5 Volts with delay, rise, and fall times of 2ns and a pulse width of 30ns. The transient interval is 0 to 100ns, with printing to be done every nanosecond. @example SIMPLE RTL INVERTER VCC 4 0 5 VIN 1 0 PULSE 0 5 2NS 2NS 2NS 30NS RB 1 2 10K Q1 3 2 0 Q1 RC 3 4 1K .MODEL Q1 NPN BF 20 RB 100 TF .1NS CJC 2PF .DC VIN 0 5 0.1 .TRAN 1NS 100NS .END @end example @node Four-Bit Binary Adder, Transmission-Line Inverter, RTL Inverter, Example Circuits @section Four-Bit Binary Adder The following deck simulates a four-bit binary adder, using several subcircuits to describe various pieces of the overall circuit. @example ADDER - 4 BIT ALL-NAND-GATE BINARY ADDER *** SUBCIRCUIT DEFINITIONS .SUBCKT NAND 1 2 3 4 * NODES: INPUT(2), OUTPUT, VCC Q1 9 5 1 QMOD D1CLAMP 0 1 DMOD Q2 9 5 2 QMOD D2CLAMP 0 2 DMOD RB 4 5 4K R1 4 6 1.6K Q3 6 9 8 QMOD R2 8 0 1K RC 4 7 130 Q4 7 6 10 QMOD DVBEDROP 10 3 DMOD Q5 3 8 0 QMOD .ENDS NAND .SUBCKT ONEBIT 1 2 3 4 5 6 * NODES: INPUT(2), CARRY-IN, OUTPUT, CARRY-OUT, VCC X1 1 2 7 6 NAND X2 1 7 8 6 NAND X3 2 7 9 6 NAND X4 8 9 10 6 NAND X5 3 10 11 6 NAND X6 3 11 12 6 NAND X7 10 11 13 6 NAND X8 12 13 4 6 NAND X9 11 7 5 6 NAND .ENDS ONEBIT .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 * NODES: INPUT - BIT0(2) / BIT1(2), OUTPUT - BIT0 / BIT1, * CARRY-IN, CARRY-OUT, VCC X1 1 2 7 5 10 9 ONEBIT X2 3 4 10 6 8 9 ONEBIT .ENDS TWOBIT .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 * NODES: INPUT - BIT0(2) / BIT1(2) / BIT2(2) / BIT3(2), * OUTPUT - BIT0 / BIT1 / BIT2 / BIT3, CARRY-IN, CARRY-OUT, VCC X1 1 2 3 4 9 10 13 16 15 TWOBIT X2 5 6 7 8 11 12 16 14 15 TWOBIT .ENDS FOURBIT *** DEFINE NOMINAL CIRCUIT .MODEL DMOD D .MODEL QMOD NPN(BF=75 RB=100 CJE=1PF CJC=3PF) VCC 99 0 DC 5V VIN1A 1 0 PULSE(0 3 0 10NS 10NS 10NS 50NS) VIN1B 2 0 PULSE(0 3 0 10NS 10NS 20NS 100NS) VIN2A 3 0 PULSE(0 3 0 10NS 10NS 40NS 200NS) VIN2B 4 0 PULSE(0 3 0 10NS 10NS 80NS 400NS) VIN3A 5 0 PULSE(0 3 0 10NS 10NS 160NS 800NS) VIN3B 6 0 PULSE(0 3 0 10NS 10NS 320NS 1600NS) VIN4A 7 0 PULSE(0 3 0 10NS 10NS 640NS 3200NS) VIN4B 8 0 PULSE(0 3 0 10NS 10NS 1280NS 6400NS) X1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT RBIT0 9 0 1K RBIT1 10 0 1K RBIT2 11 0 1K RBIT3 12 0 1K RCOUT 13 0 1K *** (FOR THOSE WITH MONEY (AND MEMORY) TO BURN) .TRAN 1NS 6400NS .END @end example @node Transmission-Line Inverter, , Four-Bit Binary Adder, Example Circuits @section Transmission-Line Inverter The following deck simulates a transmission-line inverter. Two transmission-line elements are required since two propagation modes are excited. In the case of a coaxial line, the first line (T1) models the inner conductor with respect to the shield, and the second line (T2) models the shield with respect to the outside world. @example TRANSMISSION-LINE INVERTER V1 1 0 PULSE(0 1 0 0.1N) R1 1 2 50 X1 2 0 0 4 TLINE R2 4 0 50 .SUBCKT TLINE 1 2 3 4 T1 1 2 3 4 Z0=50 TD=1.5NS T2 2 0 4 0 Z0=100 TD=1NS .ENDS TLINE .TRAN 0.1NS 20NS .END @end example @node Model and Device Parameters, , Example Circuits, Top @chapter Model and Device Parameters The following tables summarize the parameters available on each of the devices and models in (note that for some systems with limited memory, output parameters are not available). There are several tables for each type of device supported by . Input parameters to instances and models are parameters that can occur on an instance or model definition line in the form "keyword=value" where "keyword" is the parameter name as given in the tables. Default input parameters (such as the resistance of a resistor or the capacitance of a capacitor) obviously do not need the keyword specified. Output parameters are those additional parameters which are available for many types of instances for the output of operating point and debugging information. These parameters are specified as "@@device[keyword]" and are available for the most recent point computed or, if specified in a ".save" statement, for an entire simulation as a normal output vector. Thus, to monitor the gate-to-source capacitance of a MOSFET, a command @example save @@m1[cgs] @end example given before a transient simulation causes the specified capacitance value to be saved at each timepoint, and a subsequent command such as @example plot @@m1[cgs] @end example produces the desired plot. (Note that the show command does not use this format). Some variables are listed as both input and output, and their output simply returns the previously input value, or the default value after the simulation has been run. Some parameter are input only because the output system can not handle variables of the given type yet, or the need for them as output variables has not been apparent. Many such input variables are available as output variables in a different format, such as the initial condition vectors that can be retrieved as individual initial condition values. Finally, internally derived values are output only and are provided for debugging and operating point output purposes. Please note that these tables do not provide the detailed information available about the parameters provided in the section on each device and model, but are provided as a quick reference guide. @menu * Uniform RC line:: * Arbitrary Source:: * Bipolar Junction Transistor:: * BSIM1 Berkeley Short Channel IGFET Model:: * BSIM2 Berkeley Short Channel IGFET Model:: * Fixed capacitor:: * Current controlled current source:: * Linear current controlled current source:: * Current controlled ideal switch:: * Junction Diode model:: * Inductor:: * Mutual inductors:: * Independent current source:: * Junction Field effect transistor:: * Lossy transmission line:: * GaAs MESFET model:: * Level 1 MOSfet model:: * Level 2 MOSfet model:: * Level 3 MOSfet model:: * Level 6 MOSfet model:: * Simple linear resistor:: * Ideal voltage controlled switch:: * Lossless transmission line:: * Voltage controlled current source:: * Voltage controlled voltage source:: * Independent voltage source:: @end menu @node Uniform RC line, Arbitrary Source, Model and Device Parameters, Model and Device Parameters @section URC: Uniform R.C. line @example ------------------------------------------------------------ | URC - instance parameters (input-output) | |-----------------------------------------------------------+ | l Length of transmission line | | n Number of lumps | ------------------------------------------------------------ ------------------------------------------------------------ | URC - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of URC | | neg_node Negative node of URC | | gnd Ground node of URC | ------------------------------------------------------------ ------------------------------------------------------------ | URC - model parameters (input-only) | |-----------------------------------------------------------+ | urc Uniform R.C. line model | ------------------------------------------------------------ ------------------------------------------------------------ | URC - model parameters (input-output) | |-----------------------------------------------------------+ | k Propagation constant | | fmax Maximum frequency of interest | | rperl Resistance per unit length | | cperl Capacitance per unit length | | isperl Saturation current per length | | rsperl Diode resistance per length | ------------------------------------------------------------ @end example @node Arbitrary Source, Bipolar Junction Transistor, Uniform RC line, Model and Device Parameters @section ASRC: Arbitrary Source @example ------------------------------------------------------------ | ASRC - instance parameters (input-only) | |-----------------------------------------------------------+ | i Current source | | v Voltage source | ------------------------------------------------------------ ------------------------------------------------------------ | ASRC - instance parameters (output-only) | |-----------------------------------------------------------+ | i Current through source | | v Voltage across source | | pos_node Positive Node | | neg_node Negative Node | ------------------------------------------------------------ @end example @node Bipolar Junction Transistor, BSIM1 Berkeley Short Channel IGFET Model, Arbitrary Source, Model and Device Parameters @section BJT: Bipolar Junction Transistor @example ------------------------------------------------------------ | BJT - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Initial condition vector | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - instance parameters (input-output) | |-----------------------------------------------------------+ | off Device initially off | | icvbe Initial B-E voltage | | icvce Initial C-E voltage | | area Area factor | | temp instance temperature | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - instance parameters (output-only) | |-----------------------------------------------------------+ | colnode Number of collector node | | basenode Number of base node | | emitnode Number of emitter node | | substnode Number of substrate node | ------------------------------------------------------------ | colprimenode Internal collector node | | baseprimenode Internal base node | | emitprimenode Internal emitter node | | ic Current at collector node | |-----------------------------------------------------------+ ib Current at base node | ie Emitter current | | is Substrate current | | vbe B-E voltage | ------------------------------------------------------------ | vbc B-C voltage | | gm Small signal transconductance | | gpi Small signal input conductance - pi | | gmu Small signal conductance - mu | |-----------------------------------------------------------+ | gx Conductance from base to internal base | | go Small signal output conductance | | geqcb d(Ibe)/d(Vbc) | | gccs Internal C-S cap. equiv. cond. | ------------------------------------------------------------ | geqbx Internal C-B-base cap. equiv. cond. | | cpi Internal base to emitter capactance | | cmu Internal base to collector capactiance | | cbx Base to collector capacitance | |-----------------------------------------------------------+ | ccs Collector to substrate capacitance | | cqbe Cap. due to charge storage in B-E jct. | | cqbc Cap. due to charge storage in B-C jct. | | cqcs Cap. due to charge storage in C-S jct. | | cqbx Cap. due to charge storage in B-X jct. | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - instance output-only parameters - continued |-----------------------------------------------------------+ | cexbc Total Capacitance in B-X junction | | qbe Charge storage B-E junction | | qbc Charge storage B-C junction | | qcs Charge storage C-S junction | | qbx Charge storage B-X junction | | p Power dissipation | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - model parameters (input-output) | |-----------------------------------------------------------+ | npn NPN type device | | pnp PNP type device | | is Saturation Current | | bf Ideal forward beta | ------------------------------------------------------------ | nf Forward emission coefficient | | vaf Forward Early voltage | | va (null) | | ikf Forward beta roll-off corner current | |-----------------------------------------------------------+ | ik (null) | | ise B-E leakage saturation current | | ne B-E leakage emission coefficient | | br Ideal reverse beta | ------------------------------------------------------------ | nr Reverse emission coefficient | | var Reverse Early voltage | | vb (null) | | ikr reverse beta roll-off corner current | |-----------------------------------------------------------+ | isc B-C leakage saturation current | | nc B-C leakage emission coefficient | | rb Zero bias base resistance | | irb Current for base resistance=(rb+rbm)/2 | ------------------------------------------------------------ | rbm Minimum base resistance | | re Emitter resistance | | rc Collector resistance | | cje Zero bias B-E depletion capacitance | |-----------------------------------------------------------+ | vje B-E built in potential | | pe (null) | | mje B-E junction grading coefficient | | me (null) | ------------------------------------------------------------ | tf Ideal forward transit time | | xtf Coefficient for bias dependence of TF | | vtf Voltage giving VBC dependence of TF | | itf High current dependence of TF | |-----------------------------------------------------------+ | ptf Excess phase | | cjc Zero bias B-C depletion capacitance | | vjc B-C built in potential | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - model input-output parameters - continued |-----------------------------------------------------------+ | pc (null) | | mjc B-C junction grading coefficient | | mc (null) | | xcjc Fraction of B-C cap to internal base | ------------------------------------------------------------ | tr Ideal reverse transit time | | cjs Zero bias C-S capacitance | | ccs Zero bias C-S capacitance | | vjs Substrate junction built in potential | |-----------------------------------------------------------+ | ps (null) | | mjs Substrate junction grading coefficient | | ms (null) | | xtb Forward and reverse beta temp. exp. | ------------------------------------------------------------ | eg Energy gap for IS temp. dependency | | xti Temp. exponent for IS | | fc Forward bias junction fit parameter | | tnom Parameter measurement temperature | | kf Flicker Noise Coefficient | | af Flicker Noise Exponent | ------------------------------------------------------------ ------------------------------------------------------------ | BJT - model parameters (output-only) | |-----------------------------------------------------------+ | type NPN or PNP | | invearlyvoltf Inverse early voltage:forward | | invearlyvoltr Inverse early voltage:reverse | | invrollofff Inverse roll off - forward | ------------------------------------------------------------ | invrolloffr Inverse roll off - reverse | | collectorconduct Collector conductance | | emitterconduct Emitter conductance | | transtimevbcfact Transit time VBC factor | | excessphasefactor Excess phase fact. | ------------------------------------------------------------ @end example @node BSIM1 Berkeley Short Channel IGFET Model, BSIM2 Berkeley Short Channel IGFET Model, Bipolar Junction Transistor, Model and Device Parameters @section BSIM1: Berkeley Short Channel IGFET Model @example ------------------------------------------------------------ | BSIM1 - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Vector of DS,GS,BS initial voltages | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM1 - instance parameters (input-output) | |-----------------------------------------------------------+ | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------ | pd Drain perimeter | | ps Source perimeter | | nrd Number of squares in drain | | nrs Number of squares in source | |-----------------------------------------------------------+ | off Device is initially off | | vds Initial D-S voltage | | vgs Initial G-S voltage | | vbs Initial B-S voltage | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM1 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos Flag to indicate NMOS | | pmos Flag to indicate PMOS | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM1 - model parameters (input-output) | |-----------------------------------------------------------+ | vfb Flat band voltage | |lvfb Length dependence of vfb | | wvfb Width dependence of vfb | | phi Strong inversion surface potential | ------------------------------------------------------------ | lphi Length dependence of phi | | wphi Width dependence of phi | | k1 Bulk effect coefficient 1 | | lk1 Length dependence of k1 | |-----------------------------------------------------------+ | wk1 Width dependence of k1 | | k2 Bulk effect coefficient 2 | | lk2 Length dependence of k2 | | wk2 Width dependence of k2 | ------------------------------------------------------------ | eta VDS dependence of threshold voltage | | leta Length dependence of eta | | weta Width dependence of eta | | x2e VBS dependence of eta | | lx2e Length dependence of x2e | | continued | ------------------------------------------------------------ --------------------------------------------------------------------- | BSIM1 - model input-output parameters - continued | |--------------------------------------------------------------------+ |wx2e Width dependence of x2e | |x3e VDS dependence of eta | |lx3e Length dependence of x3e | |wx3e Width dependence of x3e | --------------------------------------------------------------------- |dl Channel length reduction in um | |dw Channel width reduction in um | |muz Zero field mobility at VDS=0 VGS=VTH | |x2mz VBS dependence of muz | |--------------------------------------------------------------------+ |lx2mz Length dependence of x2mz | |wx2mz Width dependence of x2mz | mus Mobility at VDS=VDD VGS=VTH, channel length modulation |lmus Length dependence of mus | --------------------------------------------------------------------- |wmus Width dependence of mus | |x2ms VBS dependence of mus | |lx2ms Length dependence of x2ms | |wx2ms Width dependence of x2ms | |--------------------------------------------------------------------+ |x3ms VDS dependence of mus | |lx3ms Length dependence of x3ms | |wx3ms Width dependence of x3ms | |u0 VGS dependence of mobility | --------------------------------------------------------------------- |lu0 Length dependence of u0 | |wu0 Width dependence of u0 | |x2u0 VBS dependence of u0 | |lx2u0 Length dependence of x2u0 | |--------------------------------------------------------------------+ |wx2u0 Width dependence of x2u0 | |u1 VDS dependece of mobility, velocity saturation | |lu1 Length dependence of u1 | |wu1 Width dependence of u1 | --------------------------------------------------------------------- |x2u1 VBS dependence of u1 | |lx2u1 Length dependence of x2u1 | |wx2u1 Width dependence of x2u1 | |x3u1 VDS dependence of u1 | |--------------------------------------------------------------------+ |lx3u1 Length dependence of x3u1 | |wx3u1 Width dependence of x3u1 | |n0 Subthreshold slope | ln0 Length dependence of n0 --------------------------------------------------------------------- |wn0 Width dependence of n0 | |nb VBS dependence of subthreshold slope | |lnb Length dependence of nb | |wnb Width dependence of nb | |--------------------------------------------------------------------+ |nd VDS dependence of subthreshold slope | |lnd Length dependence of nd | |wnd Width dependence of nd | | continued | --------------------------------------------------------------------- --------------------------------------------------------------------------- | BSIM1 - model input-output parameters - continued | |-----------------------------------------------------------------------+ |tox Gate oxide thickness in um | |temp Temperature in degree Celsius | |vdd Supply voltage to specify mus | |cgso Gate source overlap capacitance per unit channel width(m) | ------------------------------------------------------------------------ |cgdo Gate drain overlap capacitance per unit channel width(m) | |cgbo Gate bulk overlap capacitance per unit channel length(m) | |xpart Flag for channel charge partitioning | |rsh Source drain diffusion sheet resistance in ohm per square | |-----------------------------------------------------------------------+ |js Source drain junction saturation current per unit area | |pb Source drain junction built in potential | |mj Source drain bottom junction capacitance grading coefficient |pbsw Source drain side junction capacitance built in potential | ------------------------------------------------------------------------ |mjsw Source drain side junction capacitance grading coefficient | |cj Source drain bottom junction capacitance per unit area | |cjsw Source drain side junction capacitance per unit area | |wdf Default width of source drain diffusion in um | |dell Length reduction of source drain diffusion | ------------------------------------------------------------------------ @end example @node BSIM2 Berkeley Short Channel IGFET Model, Fixed capacitor, BSIM1 Berkeley Short Channel IGFET Model, Model and Device Parameters @section BSIM2: Berkeley Short Channel IGFET Model @example ------------------------------------------------------------ | BSIM2 - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Vector of DS,GS,BS initial voltages | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM2 - instance parameters (input-output) | |-----------------------------------------------------------+ | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------ | pd Drain perimeter | | ps Source perimeter | | nrd Number of squares in drain | | nrs Number of squares in source | |-----------------------------------------------------------+ | off Device is initially off | | vds Initial D-S voltage | | vgs Initial G-S voltage | | vbs Initial B-S voltage | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM2 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos Flag to indicate NMOS | | pmos Flag to indicate PMOS | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM2 - model parameters (input-output) | |-----------------------------------------------------------+ |vfb Flat band voltage | |lvfb Length dependence of vfb | |wvfb Width dependence of vfb | |phi Strong inversion surface potential | ------------------------------------------------------------ |lphi Length dependence of phi | |wphi Width dependence of phi | |k1 Bulk effect coefficient 1 | |lk1 Length dependence of k1 | |-----------------------------------------------------------+ |wk1 Width dependence of k1 | |k2 Bulk effect coefficient 2 | |lk2 Length dependence of k2 | |wk2 Width dependence of k2 | ------------------------------------------------------------ |eta0 VDS dependence of threshold voltage at VDD=0 |leta0 Length dependence of eta0 | |weta0 Width dependence of eta0 | |etab VBS dependence of eta | |-----------------------------------------------------------+ |letab Length dependence of etab | |wetab Width dependence of etab | |dl Channel length reduction in um | |dw Channel width reduction in um | ------------------------------------------------------------ |mu0 Low-field mobility, at VDS=0 VGS=VTH | |mu0b VBS dependence of low-field mobility | |lmu0b Length dependence of mu0b | |wmu0b Width dependence of mu0b | |-----------------------------------------------------------+ |mus0 Mobility at VDS=VDD VGS=VTH | |lmus0 Length dependence of mus0 | |wmus0 Width dependence of mus | |musb VBS dependence of mus | ------------------------------------------------------------ |lmusb Length dependence of musb | |wmusb Width dependence of musb | |mu20 VDS dependence of mu in tanh term | |lmu20 Length dependence of mu20 | |-----------------------------------------------------------+ |wmu20 Width dependence of mu20 | |mu2b VBS dependence of mu2 | |lmu2b Length dependence of mu2b | |wmu2b Width dependence of mu2b | ------------------------------------------------------------ |mu2g VGS dependence of mu2 | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | BSIM2 - model input-output parameters - continued |-----------------------------------------------------------+ | lmu2g Length dependence of mu2g | | wmu2g Width dependence of mu2g | | mu30 VDS dependence of mu in linear term | | lmu30 Length dependence of mu30 | ------------------------------------------------------------ | wmu30 Width dependence of mu30 | | mu3b VBS dependence of mu3 | | lmu3b Length dependence of mu3b | | wmu3b Width dependence of mu3b | |-----------------------------------------------------------+ | mu3g VGS dependence of mu3 | | lmu3g Length dependence of mu3g | | wmu3g Width dependence of mu3g | | mu40 VDS dependence of mu in linear term | ------------------------------------------------------------ | lmu40 Length dependence of mu40 | | wmu40 Width dependence of mu40 | | mu4b VBS dependence of mu4 | | lmu4b Length dependence of mu4b | |-----------------------------------------------------------+ | wmu4b Width dependence of mu4b | | mu4g VGS dependence of mu4 | | lmu4g Length dependence of mu4g | | wmu4g Width dependence of mu4g | ------------------------------------------------------------ | ua0 Linear VGS dependence of mobility | | lua0 Length dependence of ua0 | | wua0 Width dependence of ua0 | | uab VBS dependence of ua | |-----------------------------------------------------------+ | luab Length dependence of uab | | wuab Width dependence of uab | | ub0 Quadratic VGS dependence of mobility | | lub0 Length dependence of ub0 | ------------------------------------------------------------ | wub0 Width dependence of ub0 | | ubb VBS dependence of ub | | lubb Length dependence of ubb | | wubb Width dependence of ubb | |-----------------------------------------------------------+ | u10 VDS dependence of mobility | | lu10 Length dependence of u10 | wu10 Width dependence of u100 | | u1b VBS dependence of u1 | ------------------------------------------------------------ | lu1b Length dependence of u1b | | wu1b Width dependence of u1b | | u1d VDS dependence of u1 | | lu1d Length dependence of u1d | |-----------------------------------------------------------+ | wu1d Width dependence of u1d | | n0 Subthreshold slope at VDS=0 VBS=0 | | ln0 Length dependence of n0 | | continued | ------------------------------------------------------------ -------------------------------------------------------------- | BSIM2 - model input-output parameters - continued | |--------------------------------------------------------------+ |wn0 Width dependence of n0 | |nb VBS dependence of n | |lnb Length dependence of nb | |wnb Width dependence of nb | --------------------------------------------------------------+ |nd VDS dependence of n | |lnd Length dependence of nd | |wnd Width dependence of nd | |vof0 Threshold voltage offset AT VDS=0 VBS=0 | |--------------------------------------------------------------+ |lvof0 Length dependence of vof0 | |wvof0 Width dependence of vof0 | |vofb VBS dependence of vof | |lvofb Length dependence of vofb | --------------------------------------------------------------+ |wvofb Width dependence of vofb | |vofd VDS dependence of vof | |lvofd Length dependence of vofd | |wvofd Width dependence of vofd | |--------------------------------------------------------------+ |ai0 Pre-factor of hot-electron effect. | |lai0 Length dependence of ai0 | |wai0 Width dependence of ai0 | |aib VBS dependence of ai | --------------------------------------------------------------+ |laib Length dependence of aib | |waib Width dependence of aib | |bi0 Exponential factor of hot-electron effect. | |lbi0 Length dependence of bi0 | |--------------------------------------------------------------+ |wbi0 Width dependence of bi0 | |bib VBS dependence of bi | |lbib Length dependence of bib | |wbib Width dependence of bib | --------------------------------------------------------------+ |vghigh Upper bound of the cubic spline function. | |lvghigh Length dependence of vghigh | |wvghigh Width dependence of vghigh | |vglow Lower bound of the cubic spline function. | |--------------------------------------------------------------+ |lvglow Length dependence of vglow | |wvglow Width dependence of vglow | |tox Gate oxide thickness in um | |temp Temperature in degree Celcius | --------------------------------------------------------------+ |vdd Maximum Vds | |vgg Maximum Vgs | |vbb Maximum Vbs | |cgso Gate source overlap capacitance per unit | | channel width(m) | |--------------------------------------------------------------+ |cgdo Gate drain overlap capacitance | | per unit channel width(m) | |cgbo Gate bulk overlap capacitance | | per unit channel length(m) | |xpart Flag for channel charge partitioning | | continued | --------------------------------------------------------------- --------------------------------------------------------------- | BSIM2 - model input-output parameters | |--------------------------------------------------------------+ |rsh Source drain diffusion sheet resistance | | in ohm per square | |js Source drain junction saturation current | | per unit area | |pb Source drain junction built in potential | |mj Source drain bottom junction capacitance | | grading coefficient | --------------------------------------------------------------+ |pbsw Source drain side junction capacitance | | built in potential | |mjsw Source drain side junction capacitance | | grading coefficient | |cj Source drain bottom junction capacitance | | per unit area | |cjsw Source drain side junction capacitance | | per unit area | |wdf Default width of source drain diffusion in um | |dell Length reduction of source drain diffusion | --------------------------------------------------------------- @end example @node Fixed capacitor, Current controlled current source, BSIM2 Berkeley Short Channel IGFET Model, Model and Device Parameters @section Capacitor: Fixed capacitor @example ------------------------------------------------------------ | Capacitor - instance parameters (input-output) | |-----------------------------------------------------------+ | capacitance Device capacitance | | ic Initial capacitor voltage | | w Device width | | l Device length | ------------------------------------------------------------ ------------------------------------------------------------ | Capacitor - instance parameters (output-only) | |-----------------------------------------------------------+ | i Device current | | p Instantaneous device power | ------------------------------------------------------------ ------------------------------------------------------------ | Capacitor - model parameters (input-only) | |-----------------------------------------------------------+ | c Capacitor model | ------------------------------------------------------------ ------------------------------------------------------------ | Capacitor - model parameters (input-output) | |-----------------------------------------------------------+ | cj Bottom Capacitance per area | | cjsw Sidewall capacitance per meter | | defw Default width | | narrow width correction factor | ------------------------------------------------------------ @end example @node Current controlled current source, Linear current controlled current source, Fixed capacitor, Model and Device Parameters @section CCCS: Current controlled current source @example ------------------------------------------------------------ | CCCS - instance parameters (input-output) | |-----------------------------------------------------------+ | gain Gain of source | | control Name of controlling source | ------------------------------------------------------------ ------------------------------------------------------------ | CCCS - instance parameters (output-only) | |-----------------------------------------------------------+ | neg_node Negative node of source | | pos_node Positive node of source | | i CCCS output current | | v CCCS voltage at output | | p CCCS power | ------------------------------------------------------------ @end example @node Linear current controlled current source, Current controlled ideal switch, Current controlled current source, Model and Device Parameters @section CCVS: Linear current controlled current source @example ------------------------------------------------------------ | CCVS - instance parameters (input-output) | |-----------------------------------------------------------+ | gain Transresistance (gain) | | control Controlling voltage source | ------------------------------------------------------------ ------------------------------------------------------------ | CCVS - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of source | | neg_node Negative node of source | | i CCVS output current | | v CCVS output voltage | | p CCVS power | ------------------------------------------------------------ @end example @node Current controlled ideal switch, Junction Diode model, Linear current controlled current source, Model and Device Parameters @section CSwitch: Current controlled ideal switch @example ------------------------------------------------------------ | CSwitch - instance parameters (input-only) | |-----------------------------------------------------------+ | on Initially closed | | off Initially open | ------------------------------------------------------------ ------------------------------------------------------------ | CSwitch - instance parameters (input-output) | |-----------------------------------------------------------+ | control Name of controlling source | ------------------------------------------------------------ ------------------------------------------------------------ | CSwitch - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of switch | | neg_node Negative node of switch | | i Switch current | | p Instantaneous power | ------------------------------------------------------------ ------------------------------------------------------------ | CSwitch - model parameters (input-output) | |-----------------------------------------------------------+ | csw Current controlled switch model | | it Threshold current | | ih Hysteresis current | | ron Closed resistance | | roff Open resistance | ------------------------------------------------------------ ------------------------------------------------------------ | CSwitch - model parameters (output-only) | |-----------------------------------------------------------+ | gon Closed conductance | | goff Open conductance | ------------------------------------------------------------ @end example @node Junction Diode model, Inductor, Current controlled ideal switch, Model and Device Parameters @section Diode: Junction Diode model @example ------------------------------------------------------------ | Diode - instance parameters (input-output) | |-----------------------------------------------------------+ | off Initially off | | temp Instance temperature | | ic Initial device voltage | | area Area factor | ------------------------------------------------------------ ------------------------------------------------------------ | Diode - instance parameters (output-only) | |-----------------------------------------------------------+ | vd Diode voltage | | id Diode current | | c Diode current | | gd Diode conductance | ------------------------------------------------------------ | cd Diode capacitance | | charge Diode capacitor charge | | capcur Diode capacitor current | | p Diode power | ------------------------------------------------------------ ------------------------------------------------------------ | Diode - model parameters (input-only) | |-----------------------------------------------------------+ | d Diode model | ------------------------------------------------------------ ------------------------------------------------------------ | Diode - model parameters (input-output) | |-----------------------------------------------------------+ | is Saturation current | | tnom Parameter measurement temperature | | rs Ohmic resistance | | n Emission Coefficient | ------------------------------------------------------------ | tt Transit Time | | cjo Junction capacitance | | cj0 (null) | | vj Junction potential | |-----------------------------------------------------------+ | m Grading coefficient | | eg Activation energy | | xti Saturation current temperature exp. | | kf flicker noise coefficient | ------------------------------------------------------------ | af flicker noise exponent | | fc Forward bias junction fit parameter | | bv Reverse breakdown voltage | | ibv Current at reverse breakdown voltage | ------------------------------------------------------------ ------------------------------------------------------------ | Diode - model parameters (output-only) | |-----------------------------------------------------------+ | cond Ohmic conductance | ------------------------------------------------------------ @end example @node Inductor, Mutual inductors, Junction Diode model, Model and Device Parameters @section Inductor: Inductors @example ------------------------------------------------------------ | Inductor - instance parameters (input-output) | |-----------------------------------------------------------+ | inductance Inductance of inductor | | ic Initial current through inductor | ------------------------------------------------------------ ------------------------------------------------------------- | Inductor - instance parameters (output-only) | |------------------------------------------------------------+ |flux Flux through inductor | |v Terminal voltage of inductor | |volt | |i Current through the inductor | |current | p instantaneous power dissipated by the inductor | | ------------------------------------------------------------- @end example @node Mutual inductors, Independent current source, Inductor, Model and Device Parameters @section mutual: Mutual inductors @example ------------------------------------------------------------ | mutual - instance parameters (input-output) | |-----------------------------------------------------------+ | k Mutual inductance | | coefficient (null) | | inductor1 First coupled inductor | | inductor2 Second coupled inductor | ------------------------------------------------------------ @end example @node Independent current source, Junction Field effect transistor, Mutual inductors, Model and Device Parameters @section Isource: Independent current source @example ------------------------------------------------------------ | Isource - instance parameters (input-only) | |-----------------------------------------------------------+ | pulse Pulse description | | sine Sinusoidal source description | | sin Sinusoidal source description | | exp Exponential source description | ------------------------------------------------------------ | pwl Piecewise linear description | | sffm single freq. FM description | | ac AC magnitude,phase vector | | c Current through current source | | distof1 f1 input for distortion | | distof2 f2 input for distortion | ------------------------------------------------------------ ------------------------------------------------------------ | Isource - instance parameters (input-output) | |-----------------------------------------------------------+ | dc DC value of source | | acmag AC magnitude | | acphase AC phase | ------------------------------------------------------------ ------------------------------------------------------------ | Isource - instance parameters (output-only) | |-----------------------------------------------------------+ | neg_node Negative node of source | | pos_node Positive node of source | acreal AC real part | acimag AC imaginary part | ------------------------------------------------------------ | function Function of the source | | order Order of the source function | | coeffs Coefficients of the source | | v Voltage across the supply | | p Power supplied by the source | ------------------------------------------------------------ @end example @node Junction Field effect transistor, Lossy transmission line, Independent current source, Model and Device Parameters @section JFET: Junction Field effect transistor @example ------------------------------------------------------------ | JFET - instance parameters (input-output) | |-----------------------------------------------------------+ | off Device initially off | | ic Initial VDS,VGS vector | | area Area factor | | ic-vds Initial D-S voltage | | ic-vgs Initial G-S volrage | | temp Instance temperature | ------------------------------------------------------------ --------------------------------------------------------------- | JFET - instance parameters (output-only) | |--------------------------------------------------------------+ |drain-node Number of drain node | |gate-node Number of gate node | |source-node Number of source node | |drain-prime-node Internal drain node | --------------------------------------------------------------- |source-prime-nodeInternal source node | |vgs Voltage G-S | |vgd Voltage G-D | |ig Current at gate node | |--------------------------------------------------------------+ |id Current at drain node | |is Source current | |igd Current G-D | |gm Transconductance | --------------------------------------------------------------- |gds Conductance D-S | |ggs Conductance G-S | |ggd Conductance G-D | |qgs Charge storage G-S junction | |--------------------------------------------------------------+ |qgd Charge storage G-D junction | cqgs Capacitance due to charge storage G-S junction | | cqgd Capacitance due to charge storage G-D junction |p Power dissipated by the JFET | --------------------------------------------------------------- ------------------------------------------------------------ | JFET - model parameters (input-output) | |-----------------------------------------------------------+ | njf N type JFET model | | pjf P type JFET model | | vt0 Threshold voltage | | vto (null) | ------------------------------------------------------------ | beta Transconductance parameter | | lambda Channel length modulation param. | | rd Drain ohmic resistance | | rs Source ohmic resistance | | cgs G-S junction capacitance | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | JFET - model input-output parameters - continued |-----------------------------------------------------------+ | cgd G-D junction cap | | pb Gate junction potential | | is Gate junction saturation current | | fc Forward bias junction fit param. | ------------------------------------------------------------ | b Doping tail parameter | | tnom parameter measurement temperature | | kf Flicker Noise Coefficient | | af Flicker Noise Exponent | ------------------------------------------------------------ ------------------------------------------------------------ | JFET - model parameters (output-only) | |-----------------------------------------------------------+ | type N-type or P-type JFET model | | gd Drain conductance | | gs Source conductance | ------------------------------------------------------------ @end example @node Lossy transmission line, GaAs MESFET model, Junction Field effect transistor, Model and Device Parameters @section LTRA: Lossy transmission line @example ------------------------------------------------------------ | LTRA - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Initial condition vector:v1,i1,v2,i2 | ------------------------------------------------------------ ------------------------------------------------------------ | LTRA - instance parameters (input-output) | |-----------------------------------------------------------+ | v1 Initial voltage at end 1 | | v2 Initial voltage at end 2 | | i1 Initial current at end 1 | | i2 Initial current at end 2 | ------------------------------------------------------------ ------------------------------------------------------------ | LTRA - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node1 Positive node of end 1 of t-line | | neg_node1 Negative node of end 1 of t.line | | pos_node2 Positive node of end 2 of t-line | | neg_node2 Negative node of end 2 of t-line | ------------------------------------------------------------ ------------------------------------------------------------ | LTRA - model parameters (input-output) | |-----------------------------------------------------------+ |ltra LTRA model | |r Resistance per metre | |l Inductance per metre | |g (null) | ------------------------------------------------------------ |c Capacitance per metre | |len length of line | |nocontrol No timestep control | |steplimit always limit timestep to 0.8*(delay of line) | continued | ------------------------------------------------------------ --------------------------------------------------------------------- | LTRA - model input-output parameters - continued | |---------------------------------------------------------------------+ |nosteplimit don't always limit timestep to 0.8*(delay of line) | |lininterp use linear interpolation | |quadinterp use quadratic interpolation | |mixedinterp use linear interpolation if quadratic results | | look unacceptable | --------------------------------------------------------------------- |truncnr use N-R iterations for step calculation in LTRAtrunc | |truncdontcut don't limit timestep to keep impulse response | | calculation errors low | |compactrel special reltol for straight line checking | |compactabs special abstol for straight line checking | --------------------------------------------------------------------- ------------------------------------------------------------ | LTRA - model parameters (output-only) | |-----------------------------------------------------------+ | rel Rel. rate of change of deriv. for bkpt | | abs Abs. rate of change of deriv. for bkpt | ------------------------------------------------------------ @end example @node GaAs MESFET model, Level 1 MOSfet model, Lossy transmission line, Model and Device Parameters @section MES: GaAs MESFET model @example ------------------------------------------------------------ | MES - instance parameters (input-output) | |-----------------------------------------------------------+ | area Area factor | | icvds Initial D-S voltage | | icvgs Initial G-S voltage | ------------------------------------------------------------ ------------------------------------------------------------ | MES - instance parameters (output-only) | |-----------------------------------------------------------+ |off Device initially off | |dnode Number of drain node | |gnode Number of gate node | |snode Number of source node | ------------------------------------------------------------ |dprimenode Number of internal drain node | |sprimenode Number of internal source node | |vgs Gate-Source voltage | |vgd Gate-Drain voltage | |-----------------------------------------------------------+ |cg Gate capacitance | |cd Drain capacitance | |cgd Gate-Drain capacitance | |gm Transconductance | ------------------------------------------------------------ |gds Drain-Source conductance | |ggs Gate-Source conductance | |ggd Gate-Drain conductance | |cqgs Capacitance due to gate-source charge storage |-----------------------------------------------------------+ |cqgd Capacitance due to gate-drain charge storage| |qgs Gate-Source charge storage | |qgd Gate-Drain charge storage | |is Source current | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | MES - instance output-only parameters - continued |-----------------------------------------------------------+ | p Power dissipated by the mesfet | ----------------------------------------------------------- ------------------------------------------------------------ | MES - model parameters (input-only) | |-----------------------------------------------------------+ | nmf N type MESfet model | | pmf P type MESfet model | ------------------------------------------------------------ ------------------------------------------------------------ | MES - model parameters (input-output) | |-----------------------------------------------------------+ | vt0 Pinch-off voltage | | vto (null) | | alpha Saturation voltage parameter | | beta Transconductance parameter | ------------------------------------------------------------ | lambda Channel length modulation param. | | b Doping tail extending parameter | | rd Drain ohmic resistance | | rs Source ohmic resistance | |-----------------------------------------------------------+ | cgs G-S junction capacitance | | cgd G-D junction capacitance | | pb Gate junction potential | | is Junction saturation current | ------------------------------------------------------------ | fc Forward bias junction fit param. | | kf Flicker noise coefficient | | af Flicker noise exponent | ------------------------------------------------------------ ------------------------------------------------------------ | MES - model parameters (output-only) | |-----------------------------------------------------------+ | type N-type or P-type MESfet model | | gd Drain conductance | | gs Source conductance | | depl_cap Depletion capacitance | | vcrit Critical voltage | ------------------------------------------------------------ @end example @node Level 1 MOSfet model, Level 2 MOSfet model, GaAs MESFET model, Model and Device Parameters @section Mos1: Level 1 MOSfet model with Meyer capacitance model @example ------------------------------------------------------------ | Mos1 - instance parameters (input-only) | |-----------------------------------------------------------+ | off Device initially off | | ic Vector of D-S, G-S, B-S voltages | ------------------------------------------------------------ ------------------------------------------------------------ | Mos1 - instance parameters (input-output) | |-----------------------------------------------------------+ | m Multiplicity | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------ | pd Drain perimeter | | ps Source perimeter | | nrd Drain squares | | nrs Source squares | |-----------------------------------------------------------+ | icvds Initial D-S voltage | | icvgs Initial G-S voltage | | icvbs Initial B-S voltage | | temp Instance temperature | ------------------------------------------------------------ ------------------------------------------------------------ | Mos1 - instance parameters (output-only) | |-----------------------------------------------------------+ | id Drain current | | is Source current | | ig Gate current | | ib Bulk current | ------------------------------------------------------------ | ibd B-D junction current | | ibs B-S junction current | | vgs Gate-Source voltage | | vds Drain-Source voltage | |-----------------------------------------------------------+ | vbs Bulk-Source voltage | | vbd Bulk-Drain voltage | | dnode Number of the drain node | | gnode Number of the gate node | ------------------------------------------------------------ | snode Number of the source node | | bnode Number of the node | | dnodeprime Number of int. drain node | | snodeprime Number of int. source node | |-----------------------------------------------------------+ | von | | vdsat Saturation drain voltage | | sourcevcrit Critical source voltage | | drainvcrit Critical drain voltage | | rs Source resistance | | continued | ------------------------------------------------------------ -------------------------------------------------------------- | Mos1 - instance output-only parameters - continued |-------------------------------------------------------------+ |sourceconductanceConductance of source | |rd Drain conductance | |drainconductance Conductance of drain | |gm Transconductance | -------------------------------------------------------------- |gds Drain-Source conductance | |gmb Bulk-Source transconductance | |gmbs | |gbd Bulk-Drain conductance | |-------------------------------------------------------------+ |gbs Bulk-Source conductance | |cbd Bulk-Drain capacitance | |cbs Bulk-Source capacitance | |cgs Gate-Source capacitance | -------------------------------------------------------------- |cgd Gate-Drain capacitance | |cgb Gate-Bulk capacitance | |cqgs Capacitance due to gate-source charge storage |cqgd Capacitance due to gate-drain charge storage| |-------------------------------------------------------------+ |cqgb Capacitance due to gate-bulk charge storage | |cqbd Capacitance due to bulk-drain charge storage| cqbs Capacitance due to bulk-source charge storage |cbd0 Zero-Bias B-D junction capacitance | -------------------------------------------------------------- |cbdsw0 | |cbs0 Zero-Bias B-S junction capacitance | |cbssw0 | |qgs Gate-Source charge storage | |-------------------------------------------------------------+ |qgd Gate-Drain charge storage | |qgb Gate-Bulk charge storage | |qbd Bulk-Drain charge storage | |qbs Bulk-Source charge storage | |p Instaneous power | -------------------------------------------------------------- ------------------------------------------------------------ | Mos1 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos N type MOSfet model | | pmos P type MOSfet model | ------------------------------------------------------------ ------------------------------------------------------------ | Mos1 - model parameters (input-output) | |-----------------------------------------------------------+ | vto Threshold voltage | | vt0 (null) | | kp Transconductance parameter | | gamma Bulk threshold parameter | ------------------------------------------------------------ | phi Surface potential | | lambda Channel length modulation | | rd Drain ohmic resistance | | continued | ------------------------------------------------------------ ------------------------------------------------------------ | Mos1 - model input-output parameters - continued |-----------------------------------------------------------+ | rs Source ohmic resistance | | cbd B-D junction capacitance | | cbs B-S junction capacitance | | is Bulk junction sat. current | ------------------------------------------------------------ | pb Bulk junction potential | | cgso Gate-source overlap cap. | | cgdo Gate-drain overlap cap. | | cgbo Gate-bulk overlap cap. | |-----------------------------------------------------------+ | rsh Sheet resistance | | cj Bottom junction cap per area | | mj Bottom grading coefficient | | cjsw Side junction cap per area | ------------------------------------------------------------ | mjsw Side grading coefficient | | js Bulk jct. sat. current density | | tox Oxide thickness | | ld Lateral diffusion | |-----------------------------------------------------------+ | u0 Surface mobility | | uo (null) | | fc Forward bias jct. fit param. | | nsub Substrate doping | ------------------------------------------------------------ | tpg Gate type | | nss Surface state density | | tnom Parameter measurement temperature | | kf Flicker noise coefficient | | af Flicker noise exponent | ------------------------------------------------------------ ------------------------------------------------------------ | Mos1 - model parameters (output-only) | |-----------------------------------------------------------+ | type N-channel or P-channel MOS | ------------------------------------------------------------ @end example @node Level 2 MOSfet model, Level 3 MOSfet model, Level 1 MOSfet model, Model and Device Parameters @section Mos2: Level 2 MOSfet model with Meyer capacitance model @example ------------------------------------------------------------ | Mos2 - instance parameters (input-only) | |-----------------------------------------------------------+ | off Device initially off | | ic Vector of D-S, G-S, B-S voltages | ------------------------------------------------------------ ------------------------------------------------------------ | Mos2 - instance parameters (input-output) | |-----------------------------------------------------------+ | m Multiplicity | | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------ | pd Drain perimeter | | ps Source perimeter | | nrd Drain squares | | nrs Source squares | |-----------------------------------------------------------+ | icvds Initial D-S voltage | | icvgs Initial G-S voltage | | icvbs Initial B-S voltage | | temp Instance operating temperature | ------------------------------------------------------------ ------------------------------------------------------------ | Mos2 - instance parameters (output-only) | |-----------------------------------------------------------+ | id Drain current | | cd | | ibd B-D junction current | | ibs B-S junction current | ------------------------------------------------------------ | is Source current | | ig Gate current | | ib Bulk current | | vgs Gate-Source voltage | |-----------------------------------------------------------+ | vds Drain-Source voltage | | vbs Bulk-Source voltage | | vbd Bulk-Drain voltage | | dnode Number of drain node | ------------------------------------------------------------ | gnode Number of gate node | | snode Number of source node | | bnode Number of bulk node | | dnodeprime Number of internal drain node | |-----------------------------------------------------------+ | snodeprime Number of internal source node | | von | | vdsat Saturation drain voltage | | sourcevcrit Critical source voltage | | drainvcrit Critical drain voltage | | continued | ------------------------------------------------------------ -------------------------------------------------------------- | Mos2 - instance output-only parameters - continued |-------------------------------------------------------------+ |rs Source resistance | |sourceconductanceSource conductance | |rd Drain resistance | |drainconductance Drain conductance | -------------------------------------------------------------- |gm Transconductance | |gds Drain-Source conductance | |gmb Bulk-Source transconductance | |gmbs | |-------------------------------------------------------------+ |gbd Bulk-Drain conductance | |gbs Bulk-Source conductance | |cbd Bulk-Drain capacitance | |cbs Bulk-Source capacitance | -------------------------------------------------------------- |cgs Gate-Source capacitance | |cgd Gate-Drain capacitance | |cgb Gate-Bulk capacitance | |cbd0 Zero-Bias B-D junction capacitance | |-------------------------------------------------------------+ |cbdsw0 | |cbs0 Zero-Bias B-S junction capacitance | |cbssw0 | cqgs Capacitance due to gate-source charge storage | | -------------------------------------------------------------- |cqgd Capacitance due to gate-drain charge storage| |cqgb Capacitance due to gate-bulk charge storage | |cqbd Capacitance due to bulk-drain charge storage| |cqbs Capacitance due to bulk-source charge storage |-------------------------------------------------------------+ |qgs Gate-Source charge storage | |qgd Gate-Drain charge storage | |qgb Gate-Bulk charge storage | |qbd Bulk-Drain charge storage | |qbs Bulk-Source charge storage | |p Instantaneous power | -------------------------------------------------------------- ------------------------------------------------------------ | Mos2 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos N type MOSfet model | | pmos P type MOSfet model | ------------------------------------------------------------ ------------------------------------------------------------ | Mos2 - model parameters (input-output) | |-----------------------------------------------------------+ | vto Threshold voltage | | vt0 (null) | | kp Transconductance parameter | | gamma Bulk threshold parameter | ------------------------------------------------------------ | phi Surface potential | | lambda Channel length modulation | | rd Drain ohmic resistance | | rs Source ohmic resistance | |-----------------------------------------------------------+ | cbd B-D junction capacitance | | cbs B-S junction capacitance | | is Bulk junction sat. current | | pb Bulk junction potential | ------------------------------------------------------------ | cgso Gate-source overlap cap. | | cgdo Gate-drain overlap cap. | | cgbo Gate-bulk overlap cap. | | rsh Sheet resistance | |-----------------------------------------------------------+ | cj Bottom junction cap per area | | mj Bottom grading coefficient | | cjsw Side junction cap per area | | mjsw Side grading coefficient | ------------------------------------------------------------ | js Bulk jct. sat. current density | | tox Oxide thickness | | ld Lateral diffusion | | u0 Surface mobility | |-----------------------------------------------------------+ | uo (null) | | fc Forward bias jct. fit param. | | nsub Substrate doping | | tpg Gate type | ------------------------------------------------------------ | nss Surface state density | | delta Width effect on threshold | | uexp Crit. field exp for mob. deg. | | ucrit Crit. field for mob. degradation | |-----------------------------------------------------------+ | vmax Maximum carrier drift velocity | | xj Junction depth | | neff Total channel charge coeff. | | nfs Fast surface state density | ------------------------------------------------------------ | tnom Parameter measurement temperature | | kf Flicker noise coefficient | | af Flicker noise exponent | ------------------------------------------------------------ ------------------------------------------------------------ | Mos2 - model parameters (output-only) | |-----------------------------------------------------------+ | type N-channel or P-channel MOS | ------------------------------------------------------------ @end example @node Level 3 MOSfet model, Level 6 MOSfet model, Level 2 MOSfet model, Model and Device Parameters @section Mos3: Level 3 MOSfet model with Meyer capacitance model @example ------------------------------------------------------------ | Mos3 - instance parameters (input-only) | |-----------------------------------------------------------+ | off Device initially off | ------------------------------------------------------------ ------------------------------------------------------------ | Mos3 - instance parameters (input-output) | |-----------------------------------------------------------+ | m Multiplicity | | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------+ | pd Drain perimeter | | ps Source perimeter | | nrd Drain squares | | nrs Source squares | |-----------------------------------------------------------+ | icvds Initial D-S voltage | | icvgs Initial G-S voltage | | icvbs Initial B-S voltage | | ic Vector of D-S, G-S, B-S voltages | | temp Instance operating temperature | ------------------------------------------------------------ ------------------------------------------------------------ | Mos3 - instance parameters (output-only) | |-----------------------------------------------------------+ | id Drain current | | cd Drain current | | ibd B-D junction current | | ibs B-S junction current | ------------------------------------------------------------ | is Source current | | ig Gate current | | ib Bulk current | | vgs Gate-Source voltage | |-----------------------------------------------------------+ | vds Drain-Source voltage | | vbs Bulk-Source voltage | | vbd Bulk-Drain voltage | | dnode Number of drain node | ------------------------------------------------------------ | gnode Number of gate node | | snode Number of source node | | bnode Number of bulk node | | dnodeprime Number of internal drain node | | snodeprime Number of internal source node | | continued | ------------------------------------------------------------ -------------------------------------------------------------- | Mos3 - instance output-only parameters - continued |-------------------------------------------------------------+ |von Turn-on voltage | |vdsat Saturation drain voltage | |sourcevcrit Critical source voltage | |drainvcrit Critical drain voltage | -------------------------------------------------------------- |rs Source resistance | |sourceconductanceSource conductance | |rd Drain resistance | |drainconductance Drain conductance | |-------------------------------------------------------------+ |gm Transconductance | |gds Drain-Source conductance | |gmb Bulk-Source transconductance | |gmbs Bulk-Source transconductance | -------------------------------------------------------------- |gbd Bulk-Drain conductance | |gbs Bulk-Source conductance | |cbd Bulk-Drain capacitance | |cbs Bulk-Source capacitance | |-------------------------------------------------------------+ |cgs Gate-Source capacitance | |cgd Gate-Drain capacitance | |cgb Gate-Bulk capacitance | cqgs Capacitance due to gate-source charge storage | | -------------------------------------------------------------- |cqgd Capacitance due to gate-drain charge storage| |cqgb Capacitance due to gate-bulk charge storage | |cqbd Capacitance due to bulk-drain charge storage| |cqbs Capacitance due to bulk-source charge storage |-------------------------------------------------------------+ |cbd0 Zero-Bias B-D junction capacitance | |cbdsw0 Zero-Bias B-D sidewall capacitance | |cbs0 Zero-Bias B-S junction capacitance | |cbssw0 Zero-Bias B-S sidewall capacitance | -------------------------------------------------------------- |qbs Bulk-Source charge storage | |qgs Gate-Source charge storage | |qgd Gate-Drain charge storage | |qgb Gate-Bulk charge storage | |qbd Bulk-Drain charge storage | |p Instantaneous power | -------------------------------------------------------------- ------------------------------------------------------------ | Mos3 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos N type MOSfet model | | pmos P type MOSfet model | ------------------------------------------------------------ ------------------------------------------------------------ | Mos3 - model parameters (input-output) | |-----------------------------------------------------------+ | vto Threshold voltage | | vt0 (null) | | kp Transconductance parameter | | gamma Bulk threshold parameter | ------------------------------------------------------------ | phi Surface potential | | rd Drain ohmic resistance | | rs Source ohmic resistance | | cbd B-D junction capacitance | |-----------------------------------------------------------+ | cbs B-S junction capacitance | | is Bulk junction sat. current | | pb Bulk junction potential | | cgso Gate-source overlap cap. | ------------------------------------------------------------ | cgdo Gate-drain overlap cap. | | cgbo Gate-bulk overlap cap. | | rsh Sheet resistance | | cj Bottom junction cap per area | |-----------------------------------------------------------+ | mj Bottom grading coefficient | | cjsw Side junction cap per area | | mjsw Side grading coefficient | | js Bulk jct. sat. current density | ------------------------------------------------------------ | tox Oxide thickness | | xl Length mask adjustment | | wd Width Narrowing (Diffusion) | | xw Width mask adjustment | | ld Lateral diffusion | | u0 Surface mobility | | uo (null) | |-----------------------------------------------------------+ | fc Forward bias jct. fit param. | | nsub Substrate doping | | tpg Gate type | | nss Surface state density | ------------------------------------------------------------ | vmax Maximum carrier drift velocity | | xj Junction depth | | nfs Fast surface state density | | xd Depletion layer width | |-----------------------------------------------------------+ | alpha Alpha | | eta Vds dependence of threshold voltage | | delta Width effect on threshold | | input_delta (null) | ------------------------------------------------------------ | theta Vgs dependence on mobility | | kappa Kappa | | tnom Parameter measurement temperature | | kf Flicker noise coefficient | | af Flicker noise exponent | ------------------------------------------------------------ ------------------------------------------------------------ | Mos3 - model parameters (output-only) | |-----------------------------------------------------------+ | type N-channel or P-channel MOS | ------------------------------------------------------------ @end example @node Level 6 MOSfet model, Simple linear resistor, Level 3 MOSfet model, Model and Device Parameters @section Mos6: Level 6 MOSfet model with Meyer capacitance model @example ------------------------------------------------------------ | Mos6 - instance parameters (input-only) | |-----------------------------------------------------------+ | off Device initially off | | ic Vector of D-S, G-S, B-S voltages | ------------------------------------------------------------ ------------------------------------------------------------ | Mos6 - instance parameters (input-output) | |-----------------------------------------------------------+ | l Length | | w Width | | ad Drain area | | as Source area | ------------------------------------------------------------ | pd Drain perimeter | | ps Source perimeter | | nrd Drain squares | | nrs Source squares | |-----------------------------------------------------------+ | icvds Initial D-S voltage | | icvgs Initial G-S voltage | | icvbs Initial B-S voltage | | temp Instance temperature | ------------------------------------------------------------ ------------------------------------------------------------ | Mos6 - instance parameters (output-only) | |-----------------------------------------------------------+ | id Drain current | | cd Drain current | | is Source current | | ig Gate current | ------------------------------------------------------------ | ib Bulk current | | ibs B-S junction capacitance | | ibd B-D junction capacitance | | vgs Gate-Source voltage | |-----------------------------------------------------------+ | vds Drain-Source voltage | | vbs Bulk-Source voltage | | vbd Bulk-Drain voltage | | dnode Number of the drain node | ------------------------------------------------------------ | gnode Number of the gate node | | snode Number of the source node | | bnode Number of the node | | dnodeprime Number of int. drain node | | snodeprime Number of int. source node | | continued | ------------------------------------------------------------ -------------------------------------------------------------- | Mos6 - instance output-only parameters - continued |-------------------------------------------------------------+ |rs Source resistance | |sourceconductanceSource conductance | |rd Drain resistance | |drainconductance Drain conductance | -------------------------------------------------------------- |von Turn-on voltage | |vdsat Saturation drain voltage | |sourcevcrit Critical source voltage | |drainvcrit Critical drain voltage | |-------------------------------------------------------------+ |gmbs Bulk-Source transconductance | |gm Transconductance | |gds Drain-Source conductance | |gbd Bulk-Drain conductance | -------------------------------------------------------------- |gbs Bulk-Source conductance | |cgs Gate-Source capacitance | |cgd Gate-Drain capacitance | |cgb Gate-Bulk capacitance | |-------------------------------------------------------------+ |cbd Bulk-Drain capacitance | |cbs Bulk-Source capacitance | |cbd0 Zero-Bias B-D junction capacitance | |cbdsw0 | -------------------------------------------------------------- |cbs0 Zero-Bias B-S junction capacitance | |cbssw0 | |cqgs Capacitance due to gate-source charge storage |cqgd Capacitance due to gate-drain charge storage| |-------------------------------------------------------------+ |cqgb Capacitance due to gate-bulk charge storage | |cqbd Capacitance due to bulk-drain charge storage| cqbs Capacitance due to bulk-source charge storage |qgs Gate-Source charge storage | -------------------------------------------------------------- |qgd Gate-Drain charge storage | |qgb Gate-Bulk charge storage | |qbd Bulk-Drain charge storage | |qbs Bulk-Source charge storage | |p Instantaneous power | -------------------------------------------------------------- ------------------------------------------------------------ | Mos6 - model parameters (input-only) | |-----------------------------------------------------------+ | nmos N type MOSfet model | | pmos P type MOSfet model | ------------------------------------------------------------ ------------------------------------------------------------ | Mos6 - model parameters (input-output) | |-----------------------------------------------------------+ | vto Threshold voltage | | vt0 (null) | | kv Saturation voltage factor | | nv Saturation voltage coeff. | ------------------------------------------------------------ | kc Saturation current factor | | nc Saturation current coeff. | | nvth Threshold voltage coeff. | | ps Sat. current modification par. | |-----------------------------------------------------------+ | gamma Bulk threshold parameter | | gamma1 Bulk threshold parameter 1 | | sigma Static feedback effect par. | | phi Surface potential | ------------------------------------------------------------ | lambda Channel length modulation param. | | lambda0 Channel length modulation param. 0 | | lambda1 Channel length modulation param. 1 | | rd Drain ohmic resistance | |-----------------------------------------------------------+ | rs Source ohmic resistance | | cbd B-D junction capacitance | | cbs B-S junction capacitance | | is Bulk junction sat. current | ------------------------------------------------------------ | pb Bulk junction potential | | cgso Gate-source overlap cap. | | cgdo Gate-drain overlap cap. | | cgbo Gate-bulk overlap cap. | |-----------------------------------------------------------+ | rsh Sheet resistance | | cj Bottom junction cap per area | | mj Bottom grading coefficient | | cjsw Side junction cap per area | ------------------------------------------------------------ | mjsw Side grading coefficient | | js Bulk jct. sat. current density | | ld Lateral diffusion | | tox Oxide thickness | |-----------------------------------------------------------+ | u0 Surface mobility | | uo (null) | | fc Forward bias jct. fit param. | | tpg Gate type | ------------------------------------------------------------ | nsub Substrate doping | | nss Surface state density | | tnom Parameter measurement temperature | ------------------------------------------------------------ ------------------------------------------------------------ | Mos6 - model parameters (output-only) | |-----------------------------------------------------------+ | type N-channel or P-channel MOS | ------------------------------------------------------------ @end example @node Simple linear resistor, Ideal voltage controlled switch, Level 6 MOSfet model, Model and Device Parameters @section Resistor: Simple linear resistor @example ------------------------------------------------------------ | Resistor - instance parameters (input-output) | |-----------------------------------------------------------+ | resistance Resistance | | temp Instance operating temperature | | l Length | | w Width | ------------------------------------------------------------ ------------------------------------------------------------ | Resistor - instance parameters (output-only) | |-----------------------------------------------------------+ | i Current | | p Power | ------------------------------------------------------------ ------------------------------------------------------------ | Resistor - model parameters (input-only) | |-----------------------------------------------------------+ | r Device is a resistor model | ------------------------------------------------------------ ------------------------------------------------------------ | Resistor - model parameters (input-output) | |-----------------------------------------------------------+ | rsh Sheet resistance | | narrow Narrowing of resistor | | tc1 First order temp. coefficient | | tc2 Second order temp. coefficient | | defw Default device width | | tnom Parameter measurement temperature | ------------------------------------------------------------ @end example @node Ideal voltage controlled switch, Lossless transmission line, Simple linear resistor, Model and Device Parameters @section Switch: Ideal voltage controlled switch @example ------------------------------------------------------------ | Switch - instance parameters (input-only) | |-----------------------------------------------------------+ | on Switch initially closed | | off Switch initially open | ------------------------------------------------------------ ------------------------------------------------------------ | Switch - instance parameters (input-output) | |-----------------------------------------------------------+ | pos_node Positive node of switch | | neg_node Negative node of switch | ------------------------------------------------------------ ------------------------------------------------------------ | Switch - instance parameters (output-only) | |-----------------------------------------------------------+ | cont_p_node Positive contr. node of switch | | cont_n_node Positive contr. node of switch | | i Switch current | | p Switch power | ------------------------------------------------------------ ------------------------------------------------------------ | Switch - model parameters (input-output) | |-----------------------------------------------------------+ | sw Switch model | | vt Threshold voltage | | vh Hysteresis voltage | | ron Resistance when closed | | roff Resistance when open | ------------------------------------------------------------ ------------------------------------------------------------ | Switch - model parameters (output-only) | |-----------------------------------------------------------+ | gon Conductance when closed | | goff Conductance when open | ------------------------------------------------------------ @end example @node Lossless transmission line, Voltage controlled current source, Ideal voltage controlled switch, Model and Device Parameters @section Tranline: Lossless transmission line @example ------------------------------------------------------------ | Tranline - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Initial condition vector:v1,i1,v2,i2 | ------------------------------------------------------------ ------------------------------------------------------------ | Tranline - instance parameters (input-output) | |-----------------------------------------------------------+ | z0 Characteristic impedance | | zo (null) | | f Frequency | | td Transmission delay | ------------------------------------------------------------ | nl Normalized length at frequency given | | v1 Initial voltage at end 1 | | v2 Initial voltage at end 2 | | i1 Initial current at end 1 | | i2 Initial current at end 2 | ------------------------------------------------------------ ------------------------------------------------------------ | Tranline - instance parameters (output-only) | |-----------------------------------------------------------+ | rel Rel. rate of change of deriv. for bkpt | | abs Abs. rate of change of deriv. for bkpt | | pos_node1 Positive node of end 1 of t. line | | neg_node1 Negative node of end 1 of t. line | ------------------------------------------------------------ | pos_node2 Positive node of end 2 of t. line | | neg_node2 Negative node of end 2 of t. line | | delays Delayed values of excitation | ------------------------------------------------------------ @end example @node Voltage controlled current source, Voltage controlled voltage source, Lossless transmission line, Model and Device Parameters @section VCCS: Voltage controlled current source @example ------------------------------------------------------------ | VCCS - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Initial condition of controlling source | ------------------------------------------------------------ ------------------------------------------------------------ | VCCS - instance parameters (input-output) | |-----------------------------------------------------------+ | gain Transconductance of source (gain) | ------------------------------------------------------------ ------------------------------------------------------------ | VCCS - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of source | | neg_node Negative node of source | | cont_p_node Positive node of contr. source | | cont_n_node Negative node of contr. source | ------------------------------------------------------------ | i Output current | | v Voltage across output | | p Power | ------------------------------------------------------------ @end example @node Voltage controlled voltage source, Independent voltage source, Voltage controlled current source, Model and Device Parameters @section VCVS: Voltage controlled voltage source @example ------------------------------------------------------------ | VCVS - instance parameters (input-only) | |-----------------------------------------------------------+ | ic Initial condition of controlling source | ------------------------------------------------------------ ------------------------------------------------------------ | VCVS - instance parameters (input-output) | |-----------------------------------------------------------+ | gain Voltage gain | ------------------------------------------------------------ ------------------------------------------------------------ | VCVS - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of source | | neg_node Negative node of source | | cont_p_node Positive node of contr. source | cont_n_node Negative node of contr. source ------------------------------------------------------------ | i Output current | | v Output voltage | | p Power | ------------------------------------------------------------ @end example @node Independent voltage source, , Voltage controlled voltage source, Model and Device Parameters @section Vsource: Independent voltage source @example ------------------------------------------------------------ | Vsource - instance parameters (input-only) | |-----------------------------------------------------------+ | pulse Pulse description | | sine Sinusoidal source description | | sin Sinusoidal source description | | exp Exponential source description | ------------------------------------------------------------ | pwl Piecewise linear description | | sffm Single freq. FM description | | ac AC magnitude, phase vector | | distof1 f1 input for distortion | | distof2 f2 input for distortion | ------------------------------------------------------------ ------------------------------------------------------------ | Vsource - instance parameters (input-output) | |-----------------------------------------------------------+ | dc D.C. source value | | acmag A.C. Magnitude | | acphase A.C. Phase | ------------------------------------------------------------ ------------------------------------------------------------ | Vsource - instance parameters (output-only) | |-----------------------------------------------------------+ | pos_node Positive node of source | | neg_node Negative node of source | | function Function of the source | | order Order of the source function | ------------------------------------------------------------ | coeffs Coefficients for the function | | acreal AC real part | | acimag AC imaginary part | | i Voltage source current | | p Instantaneous power | ------------------------------------------------------------ @end example @chapter NGSPICE enhancements over Spice3 NGSPICE is the result of many hours of work spent in front of a screen trying to fix and enhance the original Spice3 code. Most of the work done affects simulation results in some way, so many users ask why the results obtained with Spice3 differ with the ones they get from NGSPICE. This chapter collects all the enhancements introduced into NGSPICE during its development, ordered by categories. For each improvement described here, the file(s) and function(s) affected are reported into a table, letting the experienced user to understand at what extent such improvement affects his or her simulation. @section Device models code This section collects most of the enhancements made to the code that builds up device models and device support routines. If you are concerned about discrepancies between the results you get with NGSPICE and the ones you got with a clean Spice3f, look here to see if they depend on a bug that has been fixed (or a new on introduced) @subsection Resistor Model The NGSPICE resistor model has been enhanced adding some useful features already present in other simulators: @itemize @bullet @item Different resistance value for AC analysis (Serban Popescu). @item Device Multiplicity. The "M" parameter simulates "M" paralleled resistors (Serban Popescu). @item "Short" model parameter to take into account resistor shortening due to side etching. The original spice3 implementation had only the "narrow" parameter (Alan Gillespie). @item "scale" instance parameter to scale the AC or DC value (Paolo Nenzi). @end itemize @noindent @table @asis @item Authors: Alan Gillespie, Paolo Nenzi, Serban Popescu @item File: @file{spicelib/dev/res/*} @item Function: All the functions that makes up the model. @item Affects: The resistor model only. @end table @subsection Capacitor Model In @code{CAPask()}, the power stored in a capacitor and current through it were not showed correctly during transient analysis. @noindent @table @asis @item Author: Alan Gillespie @item File: @file{spicelib/devices/cap/capask.c} @item Function: @code{CAPask()} @item Affects: The capacitor model only. @end table @subsection Diode (D) model fixes In the original implementation of the diode model, the parameter @code{DIOtBrkdwnV} was used instead of the flag @code{DIObreakdownVoltageGiven}, in the @code{DIOload()} function. In the same function the @code{DIOjunctionPot} was used instead of the temperature corrected version @code{DIOtJctPot}. In the @code{DIOtemp()} function, the @code{DIOtVcrit} was calculated without taking into account the device area. This could cause floating point overflows, especially in device models designed to be scaled by a small area, e.g. 2u by 2u diodes (area=4e-12). The flawed code was: @example here->DIOtVcrit=vte*log(vte/(CONSTroot2*here->DIOtSatCur)); @end example @example here->DIOtVcrit=vte* log(vte/(CONSTroot2*here->DIOtSatCur*here->DIOarea)); @end example @noindent @sc{Enhancement Data:} @table @asis @item Author: Alan Gillespie @item Files: @file{spicelib/devices/dioload.c} @file{spicelib/devices/diotemp.c} @item Function: @code{DIOload(), DIOtemp()} @item Affects: The pn junction diode model. @end table @subsection Level 1 MOS model The Level 1 MOS model (MOS1)now accepts the "M" device parameter (multiplicity), to simulate "M" paralleled identical devices. The "M" parameter affects the following quantities: @itemize @bullet @item In the AC load routine (@code{MOS1acLoad()}), the value assigned to the "M" (@code{MOS1m}) parameter multiplies the overlap capacitances: @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}. @item In the instance parameters ask routine (@code{MOS1ask()}), the value of gate-source, gate-drain and gate-bulk capacitances, corresponding to the parameters: @code{MOS1_CAPGS}, @code{MOS1_CAPGD}, @code{MOS1_CAPGB}, are multiplied by the value of "M". @item In the distortion analysis setup routine (@code{MOS1dset()}), the overlap capcitances (@code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}), the saturation currents (@code{DrainSatCurr}, @code{SourceSatCurr}), the "beta" (@code{Beta}) and the oxide capacitance (@code{OxideCap}) are all mutiplied by the value of "M". @item In the main load routine (@code{MOS1load()}), the value of "M" paramter multiplies:@code{DrainSatCurr}, @code{SourceSatCurr}, @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}, @code{Beta}, @code{OxideCap}. The meaning of the variables have been already explained above. @item In the noise analysis routine (in @code{MOS1noi()}), the noise densities, contained in the @code{noizDEns[]} vector are multplied by the value of "M". @item In the load routine for Pole-Zero analysis, the following quantities are multiplied by the value of "M": @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}. @item In the device "temp" routine (in @code{MOS1temp()}) the source and drain critical voltages (@code{MOS1sourceVcrit}, @code{MOS1drainVcrit}) are multiplied by the value of "M", like the zero-voltage bulk-drain and bulk-source capacitances: @code{czbd}, @code{czbdsw}, @code{czbs}, @code{czbssw}, where "sw" suffix stands for "sidewall" and means perimetral capacitsnces and the drain and sources conductances ( @code{MOS1drainConductance}. @code{MOS1sourceConductance}) @end itemize Other minor changes for "M" parameter support includes: @code{MOS1sprt()} prints the value of "M", @code{MOS1param()} sets the value of "M" and @code{MOS1ask()} returns that value. The "Gmin" implementation across the substrate diodes of MOS1 was incorrect, correcting this dramatically improved DC convergence. The original code in @code{MOS1load()} was: @example ... ... next1: if(vbs <= 0) @{ here->MOS1gbs = SourceSatCur/vt; here->MOS1cbs = here->MOS1gbs*vbs; here->MOS1gbs += ckt->CKTgmin; @} else @{ evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS1gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS1cbs = SourceSatCur * (evbs-1); @} if(vbd <= 0) @{ here->MOS1gbd = DrainSatCur/vt; here->MOS1cbd = here->MOS1gbd *vbd; here->MOS1gbd += ckt->CKTgmin; @} else @{ evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS1gbd = DrainSatCur*evbd/vt +ckt->CKTgmin; here->MOS1cbd = DrainSatCur *(evbd-1); @} ... ... @end example and the new one is: @example ... ... next1: if(vbs <= -3*vt) @{ here->MOS1gbs = ckt->CKTgmin; here->MOS1cbs = here->MOS1gbs*vbs-SourceSatCur; @} else @{ evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS1gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS1cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; @} if(vbd <= -3*vt) @{ here->MOS1gbd = ckt->CKTgmin; here->MOS1cbd = here->MOS1gbd*vbd-DrainSatCur; @} else @{ evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS1gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS1cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; @} ... ... @end example In the "load current vector" section of the @code{MOS1load()} routine, "Gmin" appeared in the calculation of @code{ceqbd} and @code{ceqbs}: @example /* * load current vector */ ceqbs = model->MOS1type * (here->MOS1cbs-(here->MOS1gbs-ckt->CKTgmin)*vbs); ceqbd = model->MOS1type * (here->MOS1cbd-(here->MOS1gbd-ckt->CKTgmin)*vbd); @end example The code has been corrected as follows: @example /* * load current vector */ ceqbs = model->MOS1type * (here->MOS1cbs-(here->MOS1gbs)*vbs); ceqbd = model->MOS1type * (here->MOS1cbd-(here->MOS1gbd)*vbd); @end example MOS1 device reported only half of the Meyer capcitance without adding the overlap capacitance contribution, when reporting to the @code{.OP} printout or in the rawfile. The routine @code{MOS1ask()} was responsible for this: @example ... ... case MOS1_CGS: value->rValue = *(ckt->CKTstate0 + here->MOS1capgs); return(OK); case MOS1_CGD: value->rValue = *(ckt->CKTstate0 + here->MOS1capgd); return(OK); ... ... case MOS1_CAPGS: value->rValue = *(ckt->CKTstate0 + here->MOS1capgs); return(OK); ... ... case MOS1_CAPGD: value->rValue = *(ckt->CKTstate0 + here->MOS1capgd); return(OK); ... ... case MOS1_CAPGB: value->rValue = *(ckt->CKTstate0 + here->MOS1capgb); return(OK); @end example The new code is: @example ... ... case MOS1_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgs); return(OK); case MOS1_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgd); return(OK); ... ... case MOS1_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgs); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateSourceOverlapCapFactor) * here->MOS1m * (here->MOS1w); return(OK); ... ... case MOS1_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgd); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateSourceOverlapCapFactor) * here->MOS1m * (here->MOS1w); return(OK); ... ... case MOS1_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS1capgb); /* add overlap capacitance */ value->rValue += (here->sMOS1modPtr->MOS1gateBulkOverlapCapFactor) * here->MOS1m * (here->MOS1l -2*(here->sMOS1modPtr->MOS1latDiff)); return(OK); @end example @subsection Level 2 MOS Model Level 2 mosfet model now accetps the "M" instance parameter (multiplicity) to simulate M paralleled identical devices. The affected quantities are: @itemize @bullet @item In the AC load routine (@code{MOS2acLoad()}, the value assigned to the "M" (@code{MOS2m}) parameter, multiplies the overlap capacitance: @code{ GateSourceOverlapCap}, @code{ GateDrainOverlapCap}, @code{ GateBulkOverlapCap}. @item In the @code{MOS2ask()} routine (instance parameters reporting) the gate-source, gate-drain and gate-bulk capacitances, corresponding to @code{MOS2_CAPGS}, @code{MOS2_CAPGD}, @code{MOS2_CAPGB} parameters, are multiplied by the value of "M". @item In the @code{MOS2dset()} function (distortion analysis setup) the overlap capcitances (@code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}), the saturation currents (@code{DrainSatCurr}, @code{SourceSatCurr}), the "beta" (@code{Beta}), the oxide capacitance (@code{OxideCap}) and and the @code{xn} quantity are all mutiplied by the value of "M". @item In the main load routine @code{MOS2load()}, the value of "M" parameter multiplies:@code{DrainSatCurr}, @code{SourceSatCurr}, @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}, @code{Beta}, @code{OxideCap}, @code{xn}. The meaning of the variables have been already explained above. @item In the noise analysis routine @code{MOS2noi()}, the noise densities, contained in the @code{noizDEns[]} vector are multplied by the value of "M". @item In the load routine for Pole-Zero analysis (@code{MOS2pzLoad()}), the following quantities are multiplied by the value of "M": @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}. @item In @code{MOS2temp()} routine the source and drain critical voltages (@code{MOS2sourceVcrit}, @code{MOS2drainVcrit}) are multiplied by the value of "M", like the zero-voltage bulk-drain and bulk-source capacitances: @code{czbd}, @code{czbdsw}, @code{czbs}, @code{czbssw}, where "sw" suffix stands for "sidewall" and means perimetral capacitances and the drain and sources conductances (@code{MOS2drainConductance}, @code{MOS2sourceConductance}). @end itemize Other minor changes for "M" parameter support includes: @code{MOS2sprt()} prints the value of "M", @code{MOS2param()} sets the value of "M" and @code{MOS2ask()} returns that value. The "Gmin" implementation across the substrate diodes of MOS2 was incorrect, correcting this dramatically improved DC convergence. The original code in @code{MOS2load()} was: @example ... ... /* bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= 0) @{ here->MOS2gbs = SourceSatCur/vt; here->MOS2cbs = here->MOS2gbs*vbs; here->MOS2gbs += ckt->CKTgmin; @} else @{ evbs = exp(vbs/vt); here->MOS2gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS2cbs = SourceSatCur * (evbs-1); @} if(vbd <= 0) @{ here->MOS2gbd = DrainSatCur/vt; here->MOS2cbd = here->MOS2gbd *vbd; here->MOS2gbd += ckt->CKTgmin; @} else @{ evbd = exp(vbd/vt); here->MOS2gbd = DrainSatCur*evbd/vt +ckt->CKTgmin; here->MOS2cbd = DrainSatCur *(evbd-1); @} ... ... @end example Then new code is: @example ... ... /* bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) @{ here->MOS2gbs = ckt->CKTgmin; here->MOS2cbs = here->MOS2gbs*vbs-SourceSatCur; @} else @{ evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS2gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS2cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; @} if(vbd <= -3*vt) @{ here->MOS2gbd = ckt->CKTgmin; here->MOS2cbd = here->MOS2gbd*vbd-DrainSatCur; @} else @{ evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS2gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS2cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; @} @end example In the "load current vector" section of the @code{MOS2load()} routine, "Gmin" appeared in the calculation of @code{ceqbd} and @code{ceqbs}: @example ... ... /* * load current vector */ ceqbs = model->MOS2type * (here->MOS2cbs-(here->MOS2gbs-ckt->CKTgmin)*vbs); ceqbd = model->MOS2type * (here->MOS2cbd-(here->MOS2gbd-ckt->CKTgmin)*vbd); ... ... @end example The correct code is: @example ... ... /* * load current vector */ ceqbs = model->MOS2type * (here->MOS2cbs-(here->MOS2gbs)*vbs); ceqbd = model->MOS2type * (here->MOS2cbd-(here->MOS2gbd)*vbd); ... ... @end example MOS2 device reported only half of the Meyer capacitance without adding the overlap capacitance contribution, when reporting to the @code{.OP} printout or in the rawfile. The routine @code{MOS2ask()} was responsible for this: @example ... ... case MOS2_CGS: value->rValue = *(ckt->CKTstate0 + here->MOS2capgs); return(OK); case MOS2_CGD: value->rValue = *(ckt->CKTstate0 + here->MOS2capgd); return(OK); ... ... case MOS2_CAPGS: value->rValue = *(ckt->CKTstate0 + here->MOS2capgs); return(OK); ... ... case MOS2_CAPGD: value->rValue = *(ckt->CKTstate0 + here->MOS2capgd); return(OK); ... ... case MOS2_CAPGB: value->rValue = *(ckt->CKTstate0 + here->MOS2capgb); return(OK); ... ... @end example The new code is: @example ... ... case MOS2_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgs); return(OK); case MOS2_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgd); return(OK); ... ... case MOS2_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgs); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateSourceOverlapCapFactor) * here->MOS2m * (here->MOS2w); return(OK); ... ... case MOS2_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgd); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateSourceOverlapCapFactor) * here->MOS2m * (here->MOS2w); return(OK); ... ... case MOS2_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS2capgb); /* add overlap capacitance */ value->rValue += (here->MOS2modPtr->MOS2gateBulkOverlapCapFactor) * here->MOS2m * (here->MOS2l -2*(here->MOS2modPtr->MOS2latDiff)); return(OK); ... ... @end example The level 2 MOSFET model seems to calculate Von and Vth values for the threshold and subthreshold values respectively, but then uses Vbin to calculate the Vdsat voltage used to find the drain current. However, a jump statement uses Von to decide that the device is in the "cutoff" region, which means that when this jump allows the drain current to be calculated, Vdsat can already be well above zero. This leads to a discontinuity of drain current with respect to gate voltage. The code is now modified to use Vbin for the jump decision. It looks like the code should actually use Vth as the threshold voltage, but since other SPICE simulators follow the original Berkeley code, this was left alone. The affected code can be found in @code{MOS2load()}: @example ... ... if ((lvds-lvbs) >= 0) @{ barg = sqrt(phiMinVbs+lvds); dbrgdb = -0.5/barg; ... ... vgst = lvgs-von; if (lvgs <= von) @{ /* * cutoff region */ ... ... if (lvgs > von) goto line900; /* * subthreshold region */ ... ... @end example and the corrected code is: @example ... ... if ((lvbs-lvds) <= 0) @{ barg = sqrt(phiMinVbs+lvds); dbrgdb = -0.5/barg; ... ... vgst = lvgs-von; if (lvgs <= vbin) @{ /* * cutoff region */ ... ... if (model->MOS2fastSurfaceStateDensity != 0 && OxideCap != 0) @{ if (lvgs > von) goto line900; @} else @{ if (lvgs > vbin) goto line900; goto doneval; @} /* * subthreshold region */ ... ... @end example @subsection Level 3 Mos Model The level 3 model has been extensively corrected since it is a de-facto standard for circuit simulation. The level 3 model supports the "M" parameter (multiplicity), which can be used to simulate M identical paralleled devices. The "M" parameter affects the quantities described in the following list: @itemize @bullet @item In the AC load routine (@code{MOS3acld()}, the value assigned to the "M" (@code{MOS3m}) parameter, multiplies the overlap capacitance: @code{ GateSourceOverlapCap}, @code{ GateDrainOverlapCap}, @code{ GateBulkOverlapCap}. @item In the @code{MOS3ask()} function (instance parameters reporting) the gate-source, gate-drain and gate-bulk capacitances, corresponding to @code{MOS3_CAPGS}, @code{MOS3_CAPGD}, @code{MOS3_CAPGB} parameters, are multiplied by the value of "M". @item In the @code{MOS3dset()} function (distorsion analysis setup) the overlap capcitances (@code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}), the saturation currents (@code{DrainSatCurr}, @code{SourceSatCurr}), the "beta" (@code{Beta}), the oxide capacitance (@code{OxideCap}) and and the @code{csonco} quantity are all mutiplied by the value of "M". @item In the main load routine @code{MOS3load()}, the value of "M" parameter multiplies:@code{DrainSatCurr}, @code{SourceSatCurr}, @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}, @code{Beta}, @code{OxideCap}, @code{csonco}. The meaning of the variables have been already explained above. @item In the noise analysis routine @code{MOS3noi()}, the noise densities, contained in the @code{noizDEns[]} vector are multplied by the value of "M". @item In the load routine for Pole-Zero analysis (@code{MOS3pzLoad()}), the following quantities are multiplied by the value of "M": @code{GateSourceOverlapCap}, @code{GateDrainOverlapCap}, @code{GateBulkOverlapCap}. @item In @code{MOS3temp()} routine the source and drain critical voltages (@code{MOS3sourceVcrit}, @code{MOS3drainVcrit}) are multiplied by the value of "M", like the zero-voltage bulk-drain and bulk-source capacitances: @code{czbd}, @code{czbdsw}, @code{czbs}, @code{czbssw}, where "sw" suffix stands for "sidewall" and means perimetral capacitances and the drain and sources conductances (@code{MOS3drainConductance}, @code{MOS3sourceConductance}). @end itemize Other minor changes for "M" parameter support includes: @code{MOS3sprt()} prints the value of "M", @code{MOS3param()} sets the value of "M" and @code{MOS3ask()} returns that value. Another important improvement over the original Spice3 code is the support for process narrowing over drawn dimensions. The three model parameters added to level 3 model are: @code{xl}, @code{wd}, @code{xw}. The changes in the code are described in depth as a reference for future model development. Adding new model parameters usually need the introduction of new variables (one for each parameter) in the model structure: @code{sMOS3model}, which can be found in @file{mos3defs.h}. In this case the new variables are: @example ... ... double MOS3lengthAdjust; /* New param: mask adjustment to length */ double MOS3widthNarrow; /* New param to reduce effective width */ double MOS3widthAdjust; /* New param: mask adjustment to width */ ... ... unsigned MOS3lengthAdjustGiven :1; unsigned MOS3widthNarrowGiven :1; unsigned MOS3widthAdjustGiven :1; ... ... #define MOS3_MOD_XL 145 #define MOS3_MOD_WD 146 #define MOS3_MOD_XW 147 ... ... @end example The single bit field that ends in "Given" are used to indicate whether the parameter has been supplied by the user or must be defaulted. The last three @code{#define} are needed as a mean to identify the parameters throughout the model, since comparing integers is faster than comparing stings. As you may have already imagined, those numbers must be unique. The association between parameter name and numerical code appears in @code{MOS3mPTable[]} in @file{mos3.c}: @example ... ... IFparm MOS3mPTable[] = @{ /* model parameters */ OP("type", MOS3_MOD_TYPE, IF_STRING ,"N-channel or P-channel MOS"), IP("nmos", MOS3_MOD_NMOS, IF_FLAG ,"N type MOSfet model"), IP("pmos", MOS3_MOD_PMOS, IF_FLAG ,"P type MOSfet model"), ... ... IOP("xl", MOS3_MOD_XL, IF_REAL ,"Length mask adjustment"), IOP("wd", MOS3_MOD_WD, IF_REAL ,"Width Narrowing (Diffusion)"), IOP("xw", MOS3_MOD_XW, IF_REAL ,"Width mask adjustment"), ... ... @end example The keyword @code{IOP} before the three parameters sets them as input/output parameters (that can be set and queried). The function used to set parameters values is @code{MOS3mParam()}, which contains the following code: @example ... ... case MOS3_MOD_XL: model->MOS3lengthAdjust = value->rValue; model->MOS3lengthAdjustGiven = TRUE; break; case MOS3_MOD_WD: model->MOS3widthNarrow = value->rValue; model->MOS3widthNarrowGiven = TRUE; break; case MOS3_MOD_XW: model->MOS3widthAdjust = value->rValue; model->MOS3widthAdjustGiven = TRUE; break; ... ... @end example The function used to query those parameters is @code{MOS3mAsk()} and the specific code is: @example ... ... case MOS3_MOD_XL: value->rValue = here->MOS3lengthAdjust; return(OK); case MOS3_MOD_WD: value->rValue = here->MOS3widthNarrow; return(OK); case MOS3_MOD_XW: value->rValue = here->MOS3widthAdjust; return(OK); ... ... @end example The code above describes the interface to the new parameters, their influence on the model behaviour is contained in the following functions: @code{MOS3acLoad()}, @code{MOS3load()}, @code{MOS3noise()}, @code{MOS3pzLoad()}, @code{MOS3setup()}, @code{MOS3sLoad()} and @code{MOS3temp()}. The @code{MOS3acLoad()} function contains the code used to represent the model for AC (small signal) analysis. The original code was: @example ... ... EffectiveLength=here->MOS3l - 2*model->MOS3latDiff; GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3w; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3w; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * EffectiveLength; ... ... @end example And the new one: @example ... ... double EffectiveWidth; ... ... EffectiveWidth = here->MOS3w - 2*model->MOS3widthNarrow + model->MOS3widthAdjust; EffectiveLength = here->MOS3l - 2*model->MOS3latDiff + model->MOS3lengthAdjust; GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; ... ... @end example A brief look at the new code shows that a new variable @code{EffectiveWidth} appears and its value depends on the newly introduced parameters @code{wd} and @code{xw}, through @code{MOS3widthNarrow} and @code{MOS3widthAdjust}, respectively. The values of @code{EffectiveLength} is trimmed with the value of @code{xl} through @code{MOS3lengthAdjust}. The overlap capacitances are multiplied by @code{EffectiveWidth} instead of @code{MOS3w}. The @code{MOS3m} value has been discussed above. The @code{MOS3pzLoad()} function is very similar to @code{MOS3acLoad()} and the code affected is almost identical to the one above. The @code{MOS3load()} function describes the model for large signals analyses. The old code is: @example ... ... EffectiveLength = here->MOS3l - 2*model->MOS3latDiff; if( (here->MOS3tSatCurDens == 0) || (here->MOS3drainArea == 0) || (here->MOS3sourceArea == 0)) @{ DrainSatCur = here->MOS3tSatCur; SourceSatCur = here->MOS3tSatCur; @} else @{ DrainSatCur = here->MOS3tSatCurDens * here->MOS3drainArea; SourceSatCur = here->MOS3tSatCurDens * here->MOS3sourceArea; @} GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3w; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3w; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * EffectiveLength; Beta = here->MOS3tTransconductance * here->MOS3w/EffectiveLength; OxideCap = model->MOS3oxideCapFactor * EffectiveLength * here->MOS3w; ... ... /* *.....body effect */ gammas = model->MOS3gamma*fshort; fbodys = 0.5*gammas/(sqphbs+sqphbs); fbody = fbodys+model->MOS3narrowFactor/here->MOS3w; onfbdy = 1.0/(1.0+fbody); dfbdvb = -fbodys*dsqdvb/sqphbs+fbodys*dfsdvb/fshort; qbonco =gammas*sqphbs+model->MOS3narrowFactor*phibs/here->MOS3w; dqbdvb = gammas*dsqdvb+model->MOS3gamma*dfsdvb*sqphbs- model->MOS3narrowFactor/here->MOS3w; ... ... /* *.....joint weak inversion and strong inversion */ von = vth; if ( model->MOS3fastSurfaceStateDensity != 0.0 ) @{ csonco = CHARGE*model->MOS3fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ * EffectiveLength*here->MOS3w/OxideCap; ... ... @end example And the new code is: @example ... ... double EffectiveWidth; ... ... EffectiveWidth = here->MOS3w - 2*model->MOS3widthNarrow + model->MOS3widthAdjust; EffectiveLength = here->MOS3l - 2*model->MOS3latDiff + model->MOS3lengthAdjust; if( (here->MOS3tSatCurDens == 0) || (here->MOS3drainArea == 0) || (here->MOS3sourceArea == 0)) @{ DrainSatCur = here->MOS3m * here->MOS3tSatCur; SourceSatCur = here->MOS3m * here->MOS3tSatCur; @} else @{ DrainSatCur = here->MOS3m * here->MOS3tSatCurDens * here->MOS3drainArea; SourceSatCur = here->MOS3m * here->MOS3tSatCurDens * here->MOS3sourceArea; @} GateSourceOverlapCap = model->MOS3gateSourceOverlapCapFactor * here->MOS3m * EffectiveWidth; GateDrainOverlapCap = model->MOS3gateDrainOverlapCapFactor * here->MOS3m * EffectiveWidth; GateBulkOverlapCap = model->MOS3gateBulkOverlapCapFactor * here->MOS3m * EffectiveLength; Beta = here->MOS3tTransconductance * here->MOS3m * EffectiveWidth/EffectiveLength; OxideCap = model->MOS3oxideCapFactor * EffectiveLength * here->MOS3m * EffectiveWidth; ... ... /* *.....body effect */ gammas = model->MOS3gamma*fshort; fbodys = 0.5*gammas/(sqphbs+sqphbs); fbody = fbodys+model->MOS3narrowFactor/EffectiveWidth; onfbdy = 1.0/(1.0+fbody); dfbdvb = -fbodys*dsqdvb/sqphbs+fbodys*dfsdvb/fshort; qbonco = gammas*sqphbs+model->MOS3narrowFactor * phibs/EffectiveWidth; dqbdvb = gammas*dsqdvb+model->MOS3gamma*dfsdvb*sqphbs - model->MOS3narrowFactor/EffectiveWidth; ... ... /* *.....joint weak inversion and strong inversion */ von = vth; if ( model->MOS3fastSurfaceStateDensity != 0.0 ) @{ csonco = CHARGE * model->MOS3fastSurfaceStateDensity * 1e4 /*(cm**2/m**2)*/ * EffectiveLength*EffectiveWidth * here->MOS3m/OxideCap; ... ... @end example The "trick" is to substitute the @code{MOS3w} with the effective width taking into account device multiplicity. Another point where device width matters is the noise routine:@code{MOS3noise()}. The oginal code computes noise densities as follows: @example ... ... noizDens[MOS3FLNOIZ] *= model->MOS3fNcoef * exp(model->MOS3fNexp * log(MAX(FABS(inst->MOS3cd),N_MINLOG))) / (data->freq * inst->MOS3w * (inst->MOS3l - 2*model->MOS3latDiff) * model->MOS3oxideCapFactor * model->MOS3oxideCapFactor); ... ... @end example The new code adds width narrowing and and multiplicity: @example ... ... noizDens[MOS3FLNOIZ] *= model->MOS3fNcoef * exp(model->MOS3fNexp * log(MAX(FABS(inst->MOS3cd),N_MINLOG))) / (data->freq * (inst->MOS3w - 2*model->MOS3widthNarrow) * inst->MOS3m * (inst->MOS3l - 2*model->MOS3latDiff) * model->MOS3oxideCapFactor * model->MOS3oxideCapFactor); ... ... @end example Another place in the code that needs changes is the device setup routine @code{MOS3setup()}. The followig code adds support for the new parameters: @example ... ... if(!model->MOS3lengthAdjustGiven) @{ model->MOS3lengthAdjust = 0; @} if(!model->MOS3widthNarrowGiven) @{ model->MOS3widthNarrow = 0; @} if(!model->MOS3widthAdjustGiven) @{ model->MOS3widthAdjust = 0; @} ... ... @end example This code sets up the default values when the parameters are not supplied by the user (since they are optional). Another function modified to support the new parameters is the @code{MOS3temp()}. The old code is: @example if(here->MOS3l - 2 * model->MOS3latDiff <=0) @{ SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel length less than zero", &(here->MOS3name)); return(E_BADPARM); @} @end example And the new one: @example ... ... if(here->MOS3l - 2 * model->MOS3latDiff + model->MOS3lengthAdjust <1e-6) @{ SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel length less than zero", &(here->MOS3name)); return(E_PARMVAL); @} if(here->MOS3w - 2 * model->MOS3widthNarrow + model->MOS3widthAdjust <1e-6) @{ SPfrontEnd->IFerror (ERR_FATAL, "%s: effective channel width less than zero", &(here->MOS3name)); return(E_PARMVAL); @} ... ... @end example The changes add a check over device width that was not present in the original code and rise an error if the result is less than one micrometer, while the old code checked against zero. The last (but not least) function that needed some care is the sensitivity load routine: @code{MOS3sLoad()}. The original code was: @example ... ... EffectiveLength = here->MOS3l - 2*model->MOS3latDiff; if(EffectiveLength == 0) @{ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; @} else @{ DqgsDp = model->MOS3type * qgs0 / EffectiveLength; DqgdDp = model->MOS3type * qgd0 / EffectiveLength; DqgbDp = model->MOS3type * qgb0 / EffectiveLength; @} @} else @{ DqgsDp = model->MOS3type * qgs0 / here->MOS3w; DqgdDp = model->MOS3type * qgd0 / here->MOS3w; DqgbDp = model->MOS3type * qgb0 / here->MOS3w; @} ... ... @end example And the modified code is: @example ... ... double EffectiveWidth; ... ... EffectiveLength = here->MOS3l - 2*model->MOS3latDiff + model->MOS3lengthAdjust; if(EffectiveLength == 0) @{ DqgsDp = 0; DqgdDp = 0; DqgbDp = 0; @} else @{ DqgsDp = model->MOS3type * qgs0 / EffectiveLength; DqgdDp = model->MOS3type * qgd0 / EffectiveLength; DqgbDp = model->MOS3type * qgb0 / EffectiveLength; @} @} else @{ EffectiveWidth = here->MOS3w - 2*model->MOS3widthNarrow + model->MOS3widthAdjust; DqgsDp = model->MOS3type * qgs0 / EffectiveWidth; DqgdDp = model->MOS3type * qgd0 / EffectiveWidth; DqgbDp = model->MOS3type * qgb0 / EffectiveWidth; @} ... ... @end example There was an error in the original implementation that did not take into account lateral diffusion @code{MOS3LatDiff}. The other changes take into account the effective (against drawn) device width. That's all folks! The changes needed to support the new parameters are (shortly and badly) described. This section on MOS3 continues with other fixes. MOS3 device reported only half of the Meyer capacitance without adding the overlap capacitance contribution, when reporting to the @code{.OP} printout or in the rawfile. The routine @code{MOS3ask()} was responsible for this: @example ... ... case MOS3_CGS: value->rValue = *(ckt->CKTstate0 + here->MOS3capgs); return(OK); case MOS3_CGD: value->rValue = *(ckt->CKTstate0 + here->MOS3capgd); return(OK); ... ... case MOS3_CAPGS: value->rValue = *(ckt->CKTstate0 + here->MOS3capgs); return(OK); ... ... case MOS3_CAPGD: value->rValue = *(ckt->CKTstate0 + here->MOS3capgd); return(OK); ... ... case MOS3_CAPGB: value->rValue = *(ckt->CKTstate0 + here->MOS3capgb); return(OK); ... ... @end example The new code is: @example ... ... case MOS3_CGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgs); return(OK); case MOS3_CGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgd); return(OK); ... ... case MOS3_CAPGS: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgs); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateSourceOverlapCapFactor) * here->MOS3m * (here->MOS3w +here->MOS3modPtr->MOS3widthAdjust -2*(here->MOS3modPtr->MOS3widthNarrow)); return(OK); ... ... case MOS3_CAPGD: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgd); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateDrainOverlapCapFactor) * here->MOS3m * (here->MOS3w +here->MOS3modPtr->MOS3widthAdjust -2*(here->MOS3modPtr->MOS3widthNarrow)); return(OK); ... ... case MOS3_CAPGB: value->rValue = 2* *(ckt->CKTstate0 + here->MOS3capgb); /* add overlap capacitance */ value->rValue += (here->MOS3modPtr->MOS3gateBulkOverlapCapFactor) * here->MOS3m * (here->MOS3l +here->MOS3modPtr->MOS3lengthAdjust -2*(here->MOS3modPtr->MOS3latDiff)); return(OK); ... ... @end example The "Gmin" implementation across the substrate diodes of MOS3 was incorrect, correcting this dramatically improved DC convergence. The original code in @code{MOS3load()} was: @example /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= 0) @{ here->MOS3gbs = SourceSatCur/vt; here->MOS3cbs = here->MOS3gbs*vbs; here->MOS3gbs += ckt->CKTgmin; @} else @{ evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS3gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS3cbs = SourceSatCur * (evbs-1); @} if(vbd <= 0) @{ here->MOS3gbd = DrainSatCur/vt; here->MOS3cbd = here->MOS3gbd *vbd; here->MOS3gbd += ckt->CKTgmin; @} else @{ evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS3gbd = DrainSatCur*evbd/vt +ckt->CKTgmin; here->MOS3cbd = DrainSatCur *(evbd-1); @} @end example The new corrected code is: @example /* * bulk-source and bulk-drain diodes * here we just evaluate the ideal diode current and the * corresponding derivative (conductance). */ next1: if(vbs <= -3*vt) @{ here->MOS3gbs = ckt->CKTgmin; here->MOS3cbs = here->MOS3gbs*vbs-SourceSatCur; @} else @{ evbs = exp(MIN(MAX_EXP_ARG,vbs/vt)); here->MOS3gbs = SourceSatCur*evbs/vt + ckt->CKTgmin; here->MOS3cbs = SourceSatCur*(evbs-1) + ckt->CKTgmin*vbs; @} if(vbd <= -3*vt) @{ here->MOS3gbd = ckt->CKTgmin; here->MOS3cbd = here->MOS3gbd*vbd-DrainSatCur; @} else @{ evbd = exp(MIN(MAX_EXP_ARG,vbd/vt)); here->MOS3gbd = DrainSatCur*evbd/vt + ckt->CKTgmin; here->MOS3cbd = DrainSatCur*(evbd-1) + ckt->CKTgmin*vbd; @} @end example In the "load current vector" section of the @code{MOS3load()} routine, "Gmin" appeared in the calculation of @code{ceqbd} and @code{ceqbs}: @example /* * load current vector */ ceqbs = model->MOS3type * (here->MOS3cbs-(here->MOS3gbs-ckt->CKTgmin)*vbs); ceqbd = model->MOS3type * (here->MOS3cbd-(here->MOS3gbd-ckt->CKTgmin)*vbd); @end example The new code is: @example /* * load current vector */ ceqbs = model->MOS3type * (here->MOS3cbs-(here->MOS3gbs)*vbs); ceqbd = model->MOS3type * (here->MOS3cbd-(here->MOS3gbd)*vbd); @end example The gm, gmb and gs calculations in them MOS3 model (in @code{MOD3load()} were all wrong: @example ... ... /* *.....normalized drain current */ cdnorm = cdo*vdsx; here->MOS3gm = vdsx; here->MOS3gds = vgsx-vth-(1.0+fbody+dvtdvd)*vdsx; here->MOS3gmbs = dcodvb*vdsx; /* *.....drain current without velocity saturation effect */ cd1 = Beta*cdnorm; Beta = Beta*fgate; cdrain = Beta*cdnorm; here->MOS3gm = Beta*here->MOS3gm+dfgdvg*cd1; here->MOS3gds = Beta*here->MOS3gds+dfgdvd*cd1; here->MOS3gmbs = Beta*here->MOS3gmbs; ... ... cdrain = cdrain*xlfact; diddl = cdrain/(EffectiveLength-delxl); here->MOS3gm = here->MOS3gm*xlfact+diddl*ddldvg; gds0 = here->MOS3gds*xlfact+diddl*ddldvd; here->MOS3gmbs = here->MOS3gmbs*xlfact+diddl*ddldvb; here->MOS3gm = here->MOS3gm+gds0*dvsdvg; here->MOS3gmbs = here->MOS3gmbs+gds0*dvsdvb; here->MOS3gds = gds0*dvsdvd+diddl*dldvd; ... ... @end example The code has been corrected as follows leading to much improved convergence: @example ... ... /* *.....normalized drain current */ cdnorm = cdo*vdsx; here->MOS3gm = vdsx; if ((here->MOS3mode*vds) > vdsat) here->MOS3gds = -dvtdvd*vdsx; else here->MOS3gds = vgsx-vth-(1.0+fbody+dvtdvd)*vdsx; here->MOS3gmbs = dcodvb*vdsx; /* *.....drain current without velocity saturation effect */ cd1 = Beta*cdnorm; Beta = Beta*fgate; cdrain = Beta*cdnorm; here->MOS3gm = Beta*here->MOS3gm+dfgdvg*cd1; here->MOS3gds = Beta*here->MOS3gds+dfgdvd*cd1; here->MOS3gmbs = Beta*here->MOS3gmbs+dfgdvb*cd1; ... ... cd1 = cdrain; cdrain = cdrain*xlfact; diddl = cdrain/(EffectiveLength-delxl); here->MOS3gm = here->MOS3gm*xlfact+diddl*ddldvg; here->MOS3gmbs = here->MOS3gmbs*xlfact+diddl*ddldvb; gds0 = diddl*ddldvd; here->MOS3gm = here->MOS3gm+gds0*dvsdvg; here->MOS3gmbs = here->MOS3gmbs+gds0*dvsdvb; here->MOS3gds = here->MOS3gds*xlfact+diddl*dldvd+gds0*dvsdvd; /* here->MOS3gds = (here->MOS3gds*xlfact)+gds0*dvsdvd- (cd1*ddldvd/(EffectiveLength*(1-2*dlonxl+dlonxl*dlonxl))); */ ... ... @end example The Spice3 "fix" for the MOS3 gds discontinuity between the linear and saturated regions works only if VMAX parameter is set to a non-zero value. A tweak has been added for the zero case. The Spice3 code (in @code{MOS3load()}) was: @example ... ... /* *.....velocity saturation factor */ if ( model->MOS3maxDriftVel != 0.0 ) @{ fdrain = 1.0/(1.0+vdsx*onvdsc); fd2 = fdrain*fdrain; arga = fd2*vdsx*onvdsc*onfg; dfddvg = -dfgdvg*arga; dfddvd = -dfgdvd*arga-fd2*onvdsc; dfddvb = -dfgdvb*arga; ... ... @end example The code in NGSPICE is: @example ... ... /* *.....velocity saturation factor */ if ( model->MOS3maxDriftVel > 0.0 ) @{ fdrain = 1.0/(1.0+vdsx*onvdsc); fd2 = fdrain*fdrain; arga = fd2*vdsx*onvdsc*onfg; dfddvg = -dfgdvg*arga; if ((here->MOS3mode*vds) > vdsat) dfddvd = -dfgdvd*arga; else dfddvd = -dfgdvd*arga-fd2*onvdsc; dfddvb = -dfgdvb*arga; ... ... @end example The critical voltages in @code{MOS3Temp()} were calculated without using temperature corrected saturation current: @example ... ... vt*log(vt/(CONSTroot2*model->MOS3jctSatCur)); @} else @{ here->MOS3drainVcrit = vt * log( vt / (CONSTroot2 * model->MOS3jctSatCurDensity * here->MOS3drainArea)); here->MOS3sourceVcrit = vt * log( vt / (CONSTroot2 * model->MOS3jctSatCurDensity * here->MOS3sourceArea)); @} ... ... @end example This have been fixed as follows: @example ... ... vt*log(vt/(CONSTroot2*here->MOS3m*here->MOS3tSatCur)); @} else @{ here->MOS3drainVcrit = vt * log( vt / (CONSTroot2 * here->MOS3m * here->MOS3tSatCurDens * here->MOS3drainArea)); here->MOS3sourceVcrit = vt * log( vt / (CONSTroot2 * here->MOS3m * here->MOS3tSatCurDens * here->MOS3sourceArea)); @} ... ... @end example In @code{MOS3temp()} some parameters were computed without taking into account temperature corrected parameters: @example ... ... here->MOS3f3d = czbd * model->MOS3bulkJctBotGradingCoeff * sarg/ arg / model->MOS3bulkJctPotential + czbdsw * model->MOS3bulkJctSideGradingCoeff * sargsw/ arg /model->MOS3bulkJctPotential; here->MOS3f4d = czbd*model->MOS3bulkJctPotential*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbdsw*model->MOS3bulkJctPotential*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3d/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2d; if(model->MOS3capBSGiven) @{ czbs=here->MOS3tCbs; @} else @{ if(model->MOS3bulkCapFactorGiven) @{ czbs=here->MOS3tCj*here->MOS3sourceArea; @} else @{ czbs=0; @} @} ... ... here->MOS3f3s = czbs * model->MOS3bulkJctBotGradingCoeff * sarg/ arg / model->MOS3bulkJctPotential + czbssw * model->MOS3bulkJctSideGradingCoeff * sargsw/ arg / model->MOS3bulkJctPotential; here->MOS3f4s = czbs*model->MOS3bulkJctPotential*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbssw*model->MOS3bulkJctPotential*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3s/2* (here->MOS3tBulkPot*here->MOS3tBulkPot) -here->MOS3tBulkPot * here->MOS3f2s; @} @} ... ... @end example The corrected code is: @example ... ... here->MOS3f3d = czbd * model->MOS3bulkJctBotGradingCoeff * sarg/ arg / here->MOS3tBulkPot + czbdsw * model->MOS3bulkJctSideGradingCoeff * sargsw/ arg / here->MOS3tBulkPot; here->MOS3f4d = czbd*here->MOS3tBulkPot*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbdsw*here->MOS3tBulkPot*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3d/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2d; if(model->MOS3capBSGiven) @{ czbs = here->MOS3tCbs * here->MOS3m; @} else @{ if(model->MOS3bulkCapFactorGiven) @{ czbs=here->MOS3tCj*here->MOS3sourceArea * here->MOS3m; @} else @{ czbs=0; @} @} ... ... here->MOS3f3s = czbs * model->MOS3bulkJctBotGradingCoeff * sarg/ arg / here->MOS3tBulkPot + czbssw * model->MOS3bulkJctSideGradingCoeff * sargsw/ arg /here->MOS3tBulkPot; here->MOS3f4s = czbs*here->MOS3tBulkPot*(1-arg*sarg)/ (1-model->MOS3bulkJctBotGradingCoeff) + czbssw*here->MOS3tBulkPot*(1-arg*sargsw)/ (1-model->MOS3bulkJctSideGradingCoeff) -here->MOS3f3s/2* (here->MOS3tDepCap*here->MOS3tDepCap) -here->MOS3tDepCap * here->MOS3f2s; @} @} @end example @subsection switch model @subsection current switch model @subsection boh @subsection PN diode voltage limiting Spice3f voltage limiting across PN junctions did not perform limiting on negative voltages, resulting in convergence problems. In NGSPICE voltage limiting for PN diodes have been modified to work for negative voltages too, improving convergence on calculations that rely on this code. @noindent @sc{Enhancement Data:} @table @asis @item Author: Alan Gillespie @item File: @file{spicelib/devices/devsup.c} @item Function: @code{DEVpnjlim()} @item Affects: All devices model that uses that function: @code{BJT1-2}, @code{BSIM3-4}, @code{DIO}, @code{EKV}, @code{HFET2}, @code{JFET1-2}, @code{MES}, @code{MESA}, @code{MOS1-9}. @end table @subsection FET voltage limiting In NGSPICE the calculation of @var{vtstlo} is done according to the formula: @example vtstlo = fabs(vold - vto) + 1; @end example While in spice3f the formula was: @example vtstlo = vtsthi/2 + 2; @end example @noindent @sc{Enhancement Data:} @table @asis @item Author: Alan Gillespie @item File: @file{spicelib/devices/devsup.c} @item Function: @code{DEVfetlim()} @item Affects: All devices model that uses that function: @code{BSIM1-4},@code{HFET1-2}, @code{JFET1-2}, @code{MES}, @code{MESA}, @code{MOS1-9}, @code{STAG}, @code{EKV}. @end table @subsection Meyer model improvement The calculation of active gate capacitance in @file{devsup.c} has been improved to achieve better convergence. @noindent @sc{Enhacement Data:} @table @asis @item Author: Alan Gillespie @item File: @file{spicelib/devices/devsup.c} @item Function: @code{DEVqmeyer()} @item Affects: All devices model that uses that function: @code{MOS1-9}. @end table @chapter The BSIM3 Model Integration BSIM3 compact model is a de-facto standard in the circuit simulation world and is extensively supported in the NGSPICE simulator. The original model dates back to the end of 1995. After almost ten years, three major revisions have been released by the Berkeley Device Group. NGSPICE supports all BSIM3 model revisions. We dedicated an entire chapter to the BSIM3 model since the procedure followed to integrate it into NGSPICE equally applies to other models from Berkeley's Device Group like BSIM4 and BSIMSOI. Most of the content of this chapter is devoted to the latest release of BSIM3 available at the time of writing: version 3.2 and its minor revisions 3.2.2, 3.2.3 and 3.2.4. It is trivial to apply the same concepts to the older ones (3.0 and 3.1). The BSIM3 integration into NGSPICE is the result of the merging of three different sources: the original Berkeley's code and two enhanced version, one supplied by Alan Gillespie and the other by Serban Popescu. Both Alan and Serban enhanced the basic model adding multiplicity support, though using two different approaches. Serban added another enhancement, the "hdif" parameter. NGSPICE provides Berkeley's, Alan's and Serban's models, using Alan's approach fot multiplicity support in Berkeley's code. @section BSIM3 Revisions As previously said, due to the importance of BSIM3, NGSPICE includes all its revisions. We have decide to assign different levels only to major revisions and use the "version" model parameter to switch among minors. The only exceptions to this rule are Serban's and Alan's model, they are a special kind of BSIM3 version 3.1 and they are kept separate from the Berkeley's model. NGSPICE has five different levels for BSIM3: @multitable @columnfractions .30 .30 .10 .30 @item Major Revision @tab Minor Revisions @tab Level @tab Notes @item BSIM3v3.2 @tab 3.2, 3.2.2, 3.2.3, 3.2.4 @tab 8 @tab The latest release @item BSIM3v1S @tab 3.1 @tab 49 @tab Serban's code @item BSIM3v1 @tab 3.1 @tab 50 @tab Berkeley's code @item BSIM3v1A @tab 3.1 @tab 51 @tab Alan's code @item BSIM3v0 @tab 3.0 @tab 52 @tab Berkeley's code @end multitable As you may see from the table above, level 8, the one officially assigned by Berkeley Device Group,is reserved to the most recent major revision of the code. All BSIM3 models support the "m" parameter (multiplicity) but only Serban's one has the support for "hdif". @section The integration process This section briefly describes how we integrated the BSIM3 model into NGSPICE. The integration process of BSIM3 model started with the download of the original code from Berkeley web site (device group). We devoted much of the work on release 3.2 and backported changes to the older ones. Our work on the BSIM model can be summarized in the following points: @itemize @bullet @item Restructuring code for spice3f interface. @item Adding minor releases switches (where necessary). @item Adding support for parallel simulation (CIDER). @item Adding support for "m" parameter. @item Restructuring code for NGSPICE integration. @end itemize The first item is a necessary step for older models, since the device interface changed between spice3e (the original interface for BSIM3 model) and spice3f and NGSPICE device interface is based on spice3f. Changes consists is a shift in the position of @code{BSIM3states} in @file{bsim3def.h} and in the addition of the @code{BSIM3unsetup()} function in @file{b3set.c}. The next step is the inclusion of runtime switches to select code for the different minor revisions that a release can have (well, this is necessary only for release 3.2). The result of the two steps is a multirevision BSIM3 model with a spice3f4/5 interface. Now we are ready to make the necessary enhancements and the changes for integrating the model into NGSPICE. The third and fourth items in the list are the model enhancements: the "parallel simulation support" is a feature inherited from the CIDER simulator (built on top of NGSPICE) that allow the simulator to use multiple processor elements to evaluate device code (making the simulation faster). The parallel simulation is not yet enabled in NGSPICE, but it will probably in the future. The "parallelization" code basically consists in a series of switches that skip device evaluation code if local processor (machine) has not been assigned to that particular device instance. Device "multiplicity" is a feature often found in commercial simulators, used to simulate many identical devices connected in parallel. This feature is important because reduces the number of nodes and equations in a circuit and makes the netlist more readable. Now we are ready to restructure the code to make it compatible with the NGSPICE device interface, which is an extended version of the spice3f4/5 one. @section The multirevision code BSIM3 release 3.2 has three minor revisions: 3.2.2, 3.2.3 and 3.2.4. Reserving a different level for each is not a good solution, it will be a waste of space and memory. The four (including 3.2) revisions differs for a few lines of code only, so the ideai is to merge the code and isolate revision dependent parts with runtime switches (the @code{switch} statement). The modifications needed are minimal, but some work is needed to avoid slow comparison between strings. As written before, the magic of revision selection is done via the "version" model parameter, which appears on the model card. In BSIM3 version 3.2 this parameter is a floating point value, since earlier releases were 3.0 and 3.1 and was easy to code revision into a real number. With the release of 3.2.2 it changed to a string, for obvious reasons (3.2.2 is not a real number). Since the "version" parameter was used only for model checking, that was not a problem. In the multirevision model, comparisons based on it appears in the device evaluation code, where speed is critical, so we added a parameter @code{BSIM3intVersion}, defined in @file{bsim3def.h} as follows: @example ... ... char *BSIM3version; /* The following field is an integer coding * of BSIM3version. */ int BSIM3intVersion; #define BSIM3V324 324 /* BSIM3 V3.2.4 */ #define BSIM3V323 323 /* BSIM3 V3.2.3 */ #define BSIM3V322 322 /* BSIM3 V3.2.2 */ #define BSIM3V32 32 /* BSIM3 V3.2 */ #define BSIM3V3OLD 0 /* Old model */ double BSIM3tox; ... ... @end example The @code{BSIM3intVersion} will be used as argument to the @code{switch} statement, because integer comparison is faster than string's one. The correct value of the parameter is assigned in @code{BSIM3setup()} by the code below: @example ... ... /* If the user does not provide the model revision, * we always choose the most recent. */ if (!model->BSIM3versionGiven) model->BSIM3version = "3.2.4"; /* I have added below the code that translate model string * into an integer. This trick is meant to speed up the * revision testing instruction, since comparing integer * is faster than comparing strings. * Paolo Nenzi 2002 */ if (!strcmp (model->BSIM3version, "3.2.4")) model->BSIM3intVersion = BSIM3V324; else if (!strcmp (model->BSIM3version, "3.2.3")) model->BSIM3intVersion = BSIM3V323; else if (!strcmp (model->BSIM3version, "3.2.2")) model->BSIM3intVersion = BSIM3V322; else if (!strcmp (model->BSIM3version, "3.2")) model->BSIM3intVersion = BSIM3V32; else model->BSIM3intVersion = BSIM3V3OLD; /* BSIM3V3OLD is a placeholder for pre 3.2 revision * This model should not be used for pre 3.2 models. */ ... ... @end example When we need to switch the code we use a @code{switch} statement like the following: @example /* Added revision dependent code */ switch (model->BSIM3intVersion) @{ case BSIM3V324: /* BSIM3v3.2.4 specific code */ break; case BSIM3V323: /* BSIM3v3.2.3 specific code */ break; case BSIM3V322: /* BSIM3v3.2.2 specific code */ break; case BSIM3V32: /* BSIM3v3.2 specific code */ break; default: /* Old code */ @} @end example The differences between minor revision fall in two categories: modification in the evaluation code and bug fixes. The idea followed in the merging was to leave out of the revision dependent code what was a mere bug fix. @section Device Multiplicity Spice3 (and thus NGSPICE) uses an approach called MNA (Modified Nodal Analysis) to solve electrical circuits. MNA represents an electrical circuits using a matrix containing devices' conductances and constraint equations (if you need to know more, get a good book on circuit theory). This matrix is built by summing the contribution of each instance (another name for "element") in the circuit. The contribution of each instance to the circuit matrix is called a "matrix stamp", which is itself a matrix containing non zero elements only at positions occupied by the device. It is very important to understand that row and column index of the stamp must be consistent with the overall circuit matrix, the elements of the stamp have the same indexes they will have in the circuit matrix. Note that all stamps are each other independent, and this property can be exploited to add parallelization to the simulator (this is not new, CIDER uses this method). All the code in the model (every spice3 model) is needed to build the matrix stamp for that particular instance of the device and for the analysis type requested. If we add many (let's say "m") device in parallel, "m" identical stamp are added to the circuit matrix. When we write "identical" we mean that the stamps contain identical values but at different locations. Each device has "external" and "internal" nodes, the former are connected to devices' terminals and the latter are internal to the device. It should be clear that nodes corresponding to terminals must have the same node number and the same indexes in the matrix, since devices appear in parallel, while other must be different because those nodes are private to each instance. If we want to simulate "m" identical devices in parallel with a single instance, its stamp must have an impact to the overall circuit matrix equal to the "superposition" of the single instances' "m" stamps. The term "superposition" is used instead of "sum" since we are interested in the external behaviour of the parallel, not in its internals. The matrix stamp of the "multiple" device is a stamp of a single device whose conductances are "adjusted" to represent the parallel situation. Doing this we discard the internal complexity of the single instance while leaving intact the influence of the parallel to the circuit. Reducing the complexity affects simulation speed, which is increased because there are less equations (not useful to our purposes) to solve and imposes less stress to simulator algorithms, resulting in less convergence problems. We may say that a "multiple" device is an external representation of many identical device connected in parallel. There are basically two approaches to build the equivalent stamp, both based on scaling the conductances of the model by the multiplicity value (the number of device to connect in parallel). The first approach (used in NGSPICE BSIM3) scales the conductances in the matrix stamp, when it is loaded into the overall matrix, and the other one scales the conductances in the entire model code. Both approaches have advantages and drawbacks, let's examine some of them. The first approach, i.e. scaling the conductances at loading time, is advantageous because the stamp "loading" code is easy to spot and because the modification consists simply in multiplying each line by the multiplicity factor "m". Another advantage is that this approach does not require a full analysis of the device code to isolate the variables (they may be currents, resistances, etc., not only conductances) that need to be scaled. The most important drawback is that the evaluation code does not know anything about "multiplicity" and then all internal computations are made for the "single" device. To correct this, without interfering with the evaluation code, you need to correct the routine that exports internal values (it is the so called DEVask, where DEV is a placeholder for device's name). The second approach, i.e. scaling the variables in the evaluation code, does not have the drawback of the previous one but require a full code analysis which, in turn, means more time to complete. @subsection Adding the "m" parameter The multiplicity parameter is an instance parameter. The first step is to modify the code adding space for it in the various structures. The structure @code{BSIM3instance} in @code{bsim3def.h} needs an entry for the new parameter, its "given" flag and a numerical ID for the entry in the @code{BSIM3pTable}: @example ... ... double BSIM3w; double BSIM3m; double BSIM3drainArea; ... ... unsigned BSIM3wGiven :1; unsigned BSIM3mGiven :1; unsigned BSIM3drainAreaGiven :1; ... ... #define BSIM3_L 2 #define BSIM3_M 15 #define BSIM3_AS 3 ... ... @end example The @code{BSIM3pTable} structure in @file{b3.c} needs an entry too: @example ... ... IOP( "w", BSIM3_W, IF_REAL , "Width"), IOP( "m", BSIM3_M, IF_REAL , "Parallel multiplier"), IOP( "ad", BSIM3_AD, IF_REAL , "Drain area"), ... ... @end example Once the entries are created, it is necessary to set up the bureaucracy needed to set and query the new parameter. In the setup routine @code{BSIM3setup()} the following code should be added: @example if (!here->BSIM3mGiven) here->BSIM3m = 1; @end example This states that if multiplicity is not given in the netlist, it must be defaulted to one. To set the "given" flag the following code should be added to @code{BSIM3param()}: @example case BSIM3_M: here->BSIM3m = value->rValue; here->BSIM3mGiven = TRUE; break; @end example The last modification nedeed by model bureaucracy must be done in @code{BSIM3ask()}. The following code should be added: @example case BSIM3_M: value->rValue = here->BSIM3m; return(OK); @end example Now the model is ready to set, query, default and use the new parameter. As discussed before, this model use the "first" approach, thus only matrix loading code is affected by the new parameter. In the @code{BSIM3load} routine the "Load Current Vector" and "Load Y Matrix" section should become: @example ... ... (*(ckt->CKTrhs + here->BSIM3gNode) -= m*ceqqg); (*(ckt->CKTrhs + here->BSIM3bNode) -= m*(ceqbs + ceqbd + ceqqb)); (*(ckt->CKTrhs + here->BSIM3dNodePrime) +=m*(ceqbd - cdreq - ceqqd)); (*(ckt->CKTrhs + here->BSIM3sNodePrime) += m*(cdreq + ceqbs + ceqqg + ceqqb + ceqqd)); if (here->BSIM3nqsMod) *(ckt->CKTrhs + here->BSIM3qNode) += m*(cqcheq - cqdef); /* * load y matrix */ T1 = qdef * here->BSIM3gtau; (*(here->BSIM3DdPtr) += m*here->BSIM3drainConductance); (*(here->BSIM3GgPtr) += m*(gcggb - ggtg)); ... ... *(here->BSIM3QspPtr) += m*(ggts - gcqsb); *(here->BSIM3QbPtr) += m*(ggtb - gcqbb); ... ... @end example The "load y matrix" is not completely shown, each line is multiplied by "m". The same method has been applied to @code{BSIM3acLoad()} routine: @example ... ... m = here->BSIM3m; *(here->BSIM3GgPtr +1) += m * xcggb; *(here->BSIM3BbPtr +1) -= M * (xcbgb + xcbdb + xcbsb); ... ... *(here->BSIM3QspPtr) += m * xgts; *(here->BSIM3QbPtr) += m * xgtb; @} ... ... @end example The pole-zero analysis uses a load routine (@code{BSIM3pzLoad()}) very similar to the one used by the AC analysis: @example ... ... m = here->BSIM3m; *(here->BSIM3GgPtr) += m * (xcggb * s->real); *(here->BSIM3GgPtr + 1) += m * (xcggb * s->imag); ... ... *(here->BSIM3QbPtr) += m * xgtb; *(here->BSIM3QspPtr) += m * xgts; @} ... ... @end example The noise analysis needs special attention, since it does not directly uses a matrix load routine. In this case was necessary to study the noise models used by BSIM3 and to scale the parameters affected by multiplicity. The following parameters were multiplied by the value of @code{BSIM3m}: @code{BSIM3cd} (drain current), @code{BSIM3weff} (effective width), @code{BSIM3drainConductance}, @code{BSIM3sourceConductance}, @code{BSIM3gm} (transconductance), @code{BSIM3gds} (drain to source conductance), @code{BSIM3gmbs} (body source transconductance), @code{BSIM3qinv} (charge in the channel). In 3.2.4 BSIM3 revision, a bugfix introduced the @code{BSIM3rds} (drain to source resistance) parameter. Since this is a resistance it has been divided by the value of @code{BSIM3m}. Now that we dealt with analyses code, the last piece of code to modify is the @code{BSIM3ask()} routine. Again we have to identify what parameters need to be scaled and multiply them by the multiplicity. If you look at the code you will clearly see the affected parameters. @section BSIM3 TNOM patch All BSIM3 models, when implemented into Spice3f (NGSPICE), shows a bug that affects simulations when the modelcard contains the TNOM keyword. If you run consecutive times a netlist without reloading the deck, you will get different answers with each run. Mike Smith discovered that the bug hides in the functions @code{BSIM3mparam()} and @code{BSIM3setup()}. The solutions (as extracted from Mike's post to @url{comp.lsi.cad}): @example In b3mpar.c look for the following code:- case BSIM3_MOD_TNOM : mod->BSIM3tnom = value->rValue; mod->BSIM3tnomGiven = TRUE; break; Change the second line so the code reads:- case BSIM3_MOD_TNOM : mod->BSIM3tnom = value->rValue + 273.15; mod->BSIM3tnomGiven = TRUE; break; In b3set.c, look for the following code:- if (!model->BSIM3tnomGiven) model->BSIM3tnom = ckt->CKTnomTemp; else model->BSIM3tnom = model->BSIM3tnom + 273.15; Delete the second and third lines to read:- if (!model->BSIM3tnomGiven) model->BSIM3tnom = ckt->CKTnomTemp; @end example @section References for BSIM3 model BSIM3 model is developed by the UC Berkeley Device Group, which maintains a web site at the URL: @url{http://www-device.eecs.berkeley.edu/} for all the model they develop. @itemize @bullet @item BSIM3 home page: @* @url{http://www-device.eecs.berkeley.edu/~bsim3/latenews.html} @item BSIM3 introduction: @* @url{http://www-device.eecs.berkeley.edu/~bsim3/intro.html} @item BSIM3 contact page: @* @url{http://www-device.eecs.berkeley.edu/~bsim3/contact.html} @end itemize @chapter EKV Model da scrivere @bye ngspice-26/doc/Makefile.am0000644000265600020320000000107712264261473015037 0ustar andreasadmin## Process this file with automake to produce Makefile.in EXTRA_DIST = ngspice.ps ngspice.pdf info_TEXINFOS = ngspice.texi CLEANFILES = *.fns *.pg *.tp *.aux *.cp *.ky *.vr *.fn *.log *.toc *.vrs DISTCLEANFILES = $(CLEANFILES) *.ps *.dvi *.info* MAINTAINERCLEANFILES = $(DISTCLEANFILES) Makefile.in # This adds the root directory of the ngspice source distribution # to be included in the search path for includes in the ngspice.texi file # (which is necessary for the AUTHORS file to be found) AM_MAKEINFOFLAGS = -I $(top_srcdir) TEXI2DVI = texi2dvi -I $(top_srcdir) ngspice-26/Makefile.am0000644000265600020320000000210012264261473014256 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = @XGRAPHDIR@ src man tests DIST_SUBDIRS = @XGRAPHDIR@ src man tests EXTRA_DIST = FAQ autogen.sh Stuarts_Poly_Notes \ ANALYSES BUGS AUTHORS ChangeLog \ DEVICES NEWS README README.tcl \ README.adms contrib \ doc examples m4 visualc visualc-shared @NOTXGRAPH@ \ xgraph/aclocal.m4 \ compile_min.sh .gitignore MAINTAINERCLEANFILES = Makefile.in aclocal.m4 ar-lib compile config.guess \ src/include/ngspice/config.h.in config.sub configure install-sh \ missing mkinstalldirs stamp-h.in ltconfig \ ltmain.sh depcomp ylwrap ACLOCAL_AMFLAGS = -I m4 dist-hook: rm -rf `find $(distdir)/xgraph -name .deps` rm -rf `find $(distdir)/xgraph -name config.status` rm -rf `find $(distdir)/xgraph -name config.log` rm -rf `find $(distdir)/xgraph -name Makefile` mrproper: maintainer-clean rm -f `find $(top_srcdir) -type f -name "*~" -print` rm -f `find $(top_srcdir) -type f -name "*.orig" -print` rm -f `find $(top_srcdir) -type f -name "*.rej" -print` maintainer-clean-local: rm -rf $(top_srcdir)/m4 ngspice-26/man/0000755000265600020320000000000012264261713013001 5ustar andreasadminngspice-26/man/man1/0000755000265600020320000000000012264261713013635 5ustar andreasadminngspice-26/man/man1/ngsconvert.10000644000265600020320000000723112264261473016115 0ustar andreasadmin.\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group .TH SCONVERT 1 "20 March 1986" .UC 4 .SH NAME sconvert \- convert spice formats .SH SYNOPSIS .B sconvert fromtype fromfile totype tofile .br .B sconvert fromtype totype .br .B sconvert .br .SH DESCRIPTION .B Sconvert translates spice output files among three formats: the old binary format, a new binary format, and a new ascii format. The formats are specified by the .B fromtype and .B totype arguments: `o' for the old format, `b' for the new binary format, and `a' for the new ascii format. .B Fromtype specifies the format to be read, and .B totype specifies the format to be written. If .B fromfile and .B tofile are given, then they are used as the input and output, otherwise standard input and output are used. (Note that this second option is only available on \s-2UNIX\s+2 systems \- on VMS and other systems you must supply the filenames.) If no arguments are given, the parameters are prompted for. .PP Binary format is the preferred format for general use, as it is the most economical in terms of space and speed of access, and ascii is provided to make it easy to modify data files and transfer them between machines with different floating-point formats. The old format is provided only for backward compatibility. The three formats are as follows: .br .nf .B Old: What Size in Bytes title 80 date 8 time 8 numoutputs 2 the integer 4 2 variable names -- char[numoutputs][8] numoutputs * 8 types of output numoutputs * 2 node index numoutputs * 2 plot title numoutputs * 24 the actual data numpoints * numoutputs * 8 .B Ascii: Title: \fITitle Card String\fR Date: \fIDate\fR [ Plotname: \fIPlot Name\fR Flags: \fIcomplex\fR or \fIreal\fR No. Variables: \fInumoutputs\fR No. Points: \fInumpoints\fR Command: \fInutmeg command\fR Variables: 0 \fIvarname1\fR \fItypename1\fR 1 \fIvarname2\fR \fItypename2\fR etc... Values: 0 n n n n ... 1 n n n n ... And so forth... ] repeated one or more times .fi .PP If one of the flags is \fIcomplex\fR, the points look like r,i where r and i are floating point (in %e format). Otherwise they are in %e format. Only one of \fIreal\fR and \fIcomplex\fR should appear. .PP The lines are guaranteed to be less than 80 columns wide (unless the plot title or variable names are very long), so this format is safe to mail between systems like CMS. .PP Any number of \fBCommand:\fR lines may appear between the \fBNo. Points:\fR and the \fBVariables:\fR lines, and whenever the plot is loaded into \fBnutmeg\fR they will be executed. .nf .B Binary: \fITitle Card\fR (a NULL terminated string) \fIDate, Time\fR (a NULL terminated string) [ \fIPlot title\fR (a NULL terminated string) \fINumber of variables\fR (an int) \fINumber of data points\fR (an int) \fIflags\fR (a short) \fIvariable header struct\fR (repeated numoutputs times) \fIvariable name\fR (a NULL terminated string) \fIvariable type\fR (an int) \fIset of outputs\fR (repeated numpoints times) ] repeated one or more times. .fi .PP A set of outputs is a vector of doubles of length numoutputs, or a vector of real-imaginary pairs of doubles if the data is complex. .SH "SEE ALSO" nutmeg(1), spice(1), writedata(3) .SH AUTHOR Wayne Christopher (faustus@cad.berkeley.edu) .SH BUGS If variable names and the title and plotname strings have trailing blanks in them they will be stripped off when the file is read, if it is in ascii format. .PP If a plot title begins with "Title:" \fBnutmeg\fR will be fooled into thinking that this is an ascii format file. \fBSconvert\fR always requires the type to be specified, however. ngspice-26/man/man1/ngnutmeg.10000644000265600020320000000512412264261473015550 0ustar andreasadmin.\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group .ig (woman-find-file buffer-file-name) (let* ((man-args (concat "-l " buffer-file-name)) (bufname (concat "*Man " man-args "*"))) (when (get-buffer bufname) (kill-buffer bufname)) (man man-args)) (compile (concat "groff -t -e -man -Tps " buffer-file-name " > /tmp/tmp.ps && gv /tmp/tmp.ps")) .. .TH NGNUTMEG 1 "6 June 2010" .ds = \-\^\- .ds ngspice \s-2NGSPICE\s+2 .SH "NAME" ngnutmeg \- ngspice post-processor .SH "SYNOPSIS" \fBngnutmeg\fP [\fIoptions\fP] [\fIdatafile\fP ...] .SH "DESCRIPTION" This man page is just a small overview. The primary documentation of ngspice is in the \*[ngspice] User's Manual, which is available as a pdf file. .br \fBngnutmeg\fP is a post processor for \*[ngspice] \- it takes the raw output file created by \fBngspice \-r\fP and plots the data on a graphics terminal or a workstation display. Note that the raw output file is different from the data that \*[ngspice] writes to the standard output. .SH "OPTIONS" .TP \fB\-\fP .br Don't try to load the default data file ("rawspice") if no other files are given. .TP \fB\-n\fP or \fB\*=no\-spiceinit\fP Don't try to source the file ".spiceinit" upon startup. Normally \fBngnutmeg\fP tries to find the file in the current directory, and if it is not found then in the user's home directory. .TP \fB\-q\fP or \fB\*=completion\fP Enable command completion. (defect) .TP \fB\-t\fP \fIterm\fP or \fB\*=term=\fP\fIterm\fP The program is being run on a terminal with \fBmfb\fP name \fIterm\fP. .TP \fB\-h\fP or \fB\*=help\fP Display a verbose help on the arguments available to the program. .TP \fB\-v\fP or \fB\*=version\fP Display a version number and copyright information of the program. .PP Further arguments are taken to be data files in binary or ascii format (see \fBsconvert\fP(1)) which are loaded into ngnutmeg. If the file is in binary format, it may be only partially completed (useful for examining \*[ngspice] output before the simulation is finished). One file may contain any number of data sets from different analyses. .SH "ENVIRONMENT" See ngspice(1) .SH "FILES" See ngspice(1) .SH "SEE ALSO" sconvert(1), ngspice(1), mfb(3), writedata(3), and .br \*[ngspice] User's Manual at \fBhttp://ngspice.sourceforge.net/docs.html\fP .SH "BUGS" Please report bugs to the ngspice project via .br \fBhttp://ngspice.sourceforge.net/bugrep.html\fP .SH "AUTHOR" Wayne Christopher (faustus@cad.berkeley.edu) .br \fBngspice\fP: various authors (see \fBhttp://sourceforge.net/projects/ngspice/\fP) .\" Local Variables: .\" mode: nroff .\" End: ngspice-26/man/man1/Makefile.am0000644000265600020320000000026512264261473015677 0ustar andreasadmin## Process this file with automake to produce Makefile.in man_MANS = ngspice.1 ngnutmeg.1 ngsconvert.1 ngmultidec.1 EXTRA_DIST = $(man_MANS) MAINTAINERCLEANFILES = Makefile.in ngspice-26/man/man1/Makefile.in0000644000265600020320000003521712264261533015712 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man/man1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 am__installdirs = "$(DESTDIR)$(man1dir)" NROFF = nroff MANS = $(man_MANS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man_MANS = ngspice.1 ngnutmeg.1 ngsconvert.1 ngmultidec.1 EXTRA_DIST = $(man_MANS) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/man1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/man1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @list='$(MANS)'; if test -n "$$list"; then \ list=`for p in $$list; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \ if test -n "$$list" && \ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \ echo " typically \`make maintainer-clean' will remove them" >&2; \ exit 1; \ else :; fi; \ else :; fi @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man1dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man1 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-man1 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-man uninstall-man1 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/man/man1/ngspice.10000644000265600020320000001111712264261473015353 0ustar andreasadmin.\" Copyright (c) 1985 Wayne A. Christopher, U. C. Berkeley CAD Group .ig (woman-find-file buffer-file-name) (let* ((man-args (concat "-l " buffer-file-name)) (bufname (concat "*Man " man-args "*"))) (when (get-buffer bufname) (kill-buffer bufname)) (man man-args)) (compile (concat "groff -t -e -man -Tps " buffer-file-name " > /tmp/tmp.ps && gv /tmp/tmp.ps")) .. .TH NGSPICE 1 "6 June 2010" .ds = \-\^\- .ds ngspice \s-2NGSPICE\s+2 .SH "NAME" ngspice \- circuit simulator derived from SPICE3f5 .SH "SYNOPSIS" \fBngspice\fP [\fIoptions\fP] [\fIfile\fP ...] .SH "DESCRIPTION" This man page is just a small overview. The primary documentation of ngspice is in the \*[ngspice] User's Manual, which is available as a pdf file. .SH "OPTIONS" .TP \fB\-n\fP or \fB\*=no\-spiceinit\fP Don't try to source the file ".spiceinit" upon startup. Normally \*[ngspice] tries to find the file in the current directory, and if it is not found then in the user's home directory. .TP \fB\-q\fP or \fB\*=completion\fP Enable command completion. (defect) .TP \fB\-t\fP \fIterm\fP or \fB\*=term=\fP\fIterm\fP The program is being run on a terminal with \fBmfb\fP name \fIterm\fP. .TP \fB\-b\fP or \fB\*=batch\fP Run in batch mode. \*[ngspice] will read the standard input or the specified input file and do the simulation. Note that if the standard input is not a terminal, \*[ngspice] will default to batch mode, unless the \-i flag is given. .TP \fB\-s\fP or \fB\*=server\fP Run in server mode. This is like batch mode, except that a temporary rawfile is used and then written to the standard output, preceded by a line with a single "@", after the simulation is done. This mode is used by the ngspice daemon. .TP \fB\-i\fP or \fB\*=interactive\fP Run in interactive mode. This is useful if the standard input is not a terminal but interactive mode is desired. Command completion is not available unless the standard input is a terminal, however. .TP \fB\-r\fP \fIrawfile\fP or \fB\*=rawfile=\fP\fIfile\fP Use \fIrawfile\fP as the default file into which the results of the simulation are saved. .TP \fB\-c\fP \fIcircuitfile\fP or \fB\*=circuitfile=\fP\fIcircuitfile\fP Use \fIcircuitfile\fP as the default input deck. .TP \fB\-h\fP or \fB\*=help\fP Display a verbose help on the arguments available to the program. .TP \fB\-v\fP or \fB\*=version\fP Display a version number and copyright information of the program. .TP \fB\-a\fP or \fB\*=autorun\fP FIXME .TP \fB\-o\fP \fIoutfile\fP or \fB\*=output=\fP\fIoutfile\fP All logs generated during a batch run (\fB\-b\fP) will be saved in \fIoutfile\fP. .TP \fB\-p\fP or \fB\*=pipe\fP Allow a program (e.g., xcircuit) to act as a GUI frontend for ngspice through a pipe. Thus ngspice will assume that the pipe is a tty and allows one to run in interactive mode. .PP Further arguments are taken to be SPICE input decks, which are read and saved. (If batch mode is requested then they are run immediately.) .SH "ENVIRONMENT" .TP \fBSPICE_LIB_DIR\fP .TP \fBSPICE_EXEC_DIR\fP .TP \fBSPICE_HOST\fP .TP \fBSPICE_BUGADDR\fP .TP \fBSPICE_EDITOR\fP .TP \fBSPICE_ASCIIRAWFILE\fP default \fI0\fP Format of the rawfile. \fI0\fP for binary, and \fI1\fP for ascii. .TP \fBSPICE_NEWS\fP default \fI$SPICE_LIB_DIR/news\fP A file which is copied verbatim to stdout when ngspice starts in interactive mode. .TP \fBSPICE_MFBCAP\fP default \fI$SPICE_LIB_DIR/mfbcap\fP .TP \fBSPICE_HELP_DIR\fP default \fI$SPICE_LIB_DIR/helpdir\fP .TP \fBSPICE_SCRIPTS\fP default \fI$SPICE_LIB_DIR/scripts\fP In this directory the \fIspinit\fP file will be searched. .TP \fBSPICE_PATH\fP default \fI$SPICE_EXEC_DIR/ngspice\fP .PP various undocumented ngspice centric environment variables : .TP \fBNGSPICE_MEAS_PRECISION\fP .TP \fBSPICE_NO_DATASEG_CHECK\fP .PP Common environment variables : .TP \fBTERM\fP \fBLINES\fP \fBCOLS\fP \fBDISPLAY\fP \fBHOME\fP \fBPATH\fP \fBEDITOR\fP \fBSHELL\fP .TP \fBPOSIXLY_CORRECT\fP .SH "FILES" .TP \fI$SPICE_LIB_DIR/scripts/spinit\fP The System's Initialisation File. .TP \fI\&.spiceinit\fP or \fI$HOME/.spiceinit\fP The User's Initialisation File. .SH "SEE ALSO" sconvert(1), ngnutmeg(1), mfb(3), writedata(3), and .br \*[ngspice] User's Manual at \fBhttp://ngspice.sourceforge.net/docs.html\fP .SH "BUGS" Please report bugs to the ngspice project via .br \fBhttp://ngspice.sourceforge.net/bugrep.html\fP .SH "AUTHORS" \fBspice3\fP: Tom Quarles (quarles@cad.berkeley.edu) .br \fBnutmeg\fP: User interface: Wayne Christopher (faustus@cad.berkeley.edu) .br \fBngspice\fP: various authors (see \fBhttp://sourceforge.net/projects/ngspice/\fP) .\" Local Variables: .\" mode: nroff .\" End: ngspice-26/man/man1/ngmultidec.10000644000265600020320000000512512264261473016060 0ustar andreasadmin.TH NGMULTIDEC 1 ngpice .SH NAME ngmultidec \- make ngpice sub-circuit for coupled transmission lines .SH SYNOPSIS .B ngmultidec [ .IR options ... ] .SH DESCRIPTION .I ngmultidec writes an ngspice input file to standard output which describes a sub-circuit for coupled lines using uncoupled simple lossy lines. .LP Each generated subcircuit models a 4-conductor transmission line with the following parameters: length .IR l , line capacitance .IR c , line resistance .IR r , line conductance .IR g , inductive_coeff_of_coupling .IR k , inter-line capacitance .IR cm , length .IR l . Derived parameters are: .IR lm , .IR ctot . The values of .IR l , .IR c , the model name, the number of conductors and the length of the line must be specified. .LP It is important to note that the model is a simplified one - the following assumptions are made: 1. The self-inductance l, the self-capacitance ctot (note: not c), the series resistance r and the parallel capacitance g are the same for all lines, and 2. Each line is coupled only to the two lines adjacent to it, with the same coupling parameters cm and lm. The first assumption implies that edge effects have to be neglected. The utility of these assumptions is that they make the sL+R and sC+G matrices symmetric, tridiagonal and Toeplitz, with useful consequences (see the paper referenced below). .LP It may be noted that a symmetric two-conductor line is represented accurately by this model. .LP Standard C language scientific (exponent) notation may be used for options' numeric values. .SH OPTIONS .TP .BI \-o "subcircuit_name" Set the subcircuit name .TP .BI \-l "line_inductance" Set the line inductance. .TP .BI \-c "line_capacitance" Set the line capacitance. .TP .BI \-r "line_resistance" Set the line resistance. .TP .BI \-g "line_conductance" Set the line conductance. .TP .BI \-k "inductive_coefficient_of_coupling" Set the value of the inductive coefficient of coupling, whose absolute value .I k must be less than 1.0. .TP .BI \-x "line-to-line-capacitance" Set the line-to-line capacitance. .TP .BI \-L "length" Set the length of the line. .TP .BI \-n "number" Set the number of conductors. .TP .B \-u Write a usage message to standard error. .SH EXAMPLE .RS .B ngmultidec -n4 -l9e9 -c20e-12 -r5.3 -x5e12 -k0.7 -otest -L5.4 > test.cir .RE .SH SEE ALSO .nf .IR "Efficient Transient Simulation of Lossy Interconnect" , J.S. Roychowdhury and D.O. Pederson, Proceedings of the Design Automation Conference, pp. 740-745. 1991. .B http://portal.acm.org/citation.cfm?doid=127601.127762 .fi .sp .IR ngnutmeg (1), .IR ngproc2mod (1), .IR ngsconvert (1), .IR ngspice (1), .IR nghelp (1). ngspice-26/man/Makefile.am0000644000265600020320000000015612264261473015042 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = man1 MAINTAINERCLEANFILES = Makefile.in ngspice-26/man/Makefile.in0000644000265600020320000004350412264261533015054 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = man1 MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/visualc/0000755000265600020320000000000012264261473013677 5ustar andreasadminngspice-26/visualc/.gitignore0000644000265600020320000000053112264261473015666 0ustar andreasadmin# NOTE! Please use 'git ls-files -i --exclude-standard' # command after changing this file, to see if there are # any tracked files which get ignored after the change. # # (compile "git ls-files -i --exclude-standard") /* !/include !/.gitignore !/how-to-ngspice-vstudio.txt !/visualc/fftw3/fftw-*/README-ngspice.txt !/*.c !/*.sln !/*.vcproj ngspice-26/visualc/how-to-ngspice-vstudio.txt0000644000265600020320000000521512264261473021001 0ustar andreasadminH. Vogt 31.10.09 (Translation of some commands from German to English is required) Many more details of ngspice usage under Windows is described in how-to-use-ngspice091031.txt from the binary distribution. This directory (visualc) with its files vngspice.sln (project starter) and vngspice.vcproj (project contents) allows to compile and link ngspice with MS Visual Studio 2008. The project is probably not compatible with Visual Studio 2005. CIDER and XSPICE are included, but the code models for XSPICE (*.cm) are not (yet) made. You may however use the code models created with MINGW (which in fact are dlls), as e.g. found in the ngspice binary distribution. There is currently no installation procedure provided, you may however install the executable manually as described in the installation tree below. /visualc/include contains a dedicated config.h file. It contains the preprocessor definitions required to properly compile the code. strings.h has been necessary during setting up the project. Install Microsoft Visual Studio 2008 C++ Goto /ng-spice-rework/visualc Start MS Visual Studio 2008 by double click onto vngspice.sln After MS Visual Studio has opened up, select debug or release version by checking 'Erstellen' , 'Konfigurations-Manager' 'Debug' or 'Release' Start making ngspice (called vngspice.exe) by selecting 'Erstellen' and 'vngspice neu erstellen'. Object files will be created and stored in visualc/debug or visualc/release. The executable will be stored to visualc/debug/bin or visualc/release/bin. Installation tree (as provided with MINGW make install) and also used by vngspice: C:\Spice\ bin\ ngspice.exe nghelp.exe ngmakeidx.exe ngnutmeg.exe cmpp.exe lib\ spice\ analog.cm digital.cm spice2poly.cm extradev.cm extravt.cm share\ info\ dir ngspice.info ngspice.info-1 .. ngspice.info-10 man\ man1\ ngmultidec.1 ngnutmeg.1 ngsconvert.1 ngspice.1 ng-spice-rework\ helpdir\ ngspice.idx ngspice.txt scripts\ ciderinit devaxis devload setplot spectrum spinit If spinit is not found in the directory cited above, vngspice.exe also searches for spinit in its own directory. If you give a relative path for the codemodel directories in spinit, you may determine your own directory tree. If you want to generate a console ngspice (without GUI, without graphics interface, but usable in batch mode (-b)), then you have to do the following before compilation: select console_debug or console_release from the configuration manager. ngspice.exe will search for spinit in the directory tree shown above, or, if not found, in its own directory. ngspice-26/visualc/vngspice.sln0000644000265600020320000000574112264261473016242 0ustar andreasadminMicrosoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vngspice", "vngspice.vcproj", "{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution console_debug|Win32 = console_debug|Win32 console_debug|x64 = console_debug|x64 console_release_omp|Win32 = console_release_omp|Win32 console_release_omp|x64 = console_release_omp|x64 console_release|Win32 = console_release|Win32 console_release|x64 = console_release|x64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 ReleaseOMP|Win32 = ReleaseOMP|Win32 ReleaseOMP|x64 = ReleaseOMP|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.ActiveCfg = console_debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.Build.0 = console_debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.ActiveCfg = console_debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.Build.0 = console_debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|Win32.ActiveCfg = console_release_omp|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|Win32.Build.0 = console_release_omp|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|x64.ActiveCfg = console_release_omp|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|x64.Build.0 = console_release_omp|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.ActiveCfg = console_release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.Build.0 = console_release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.ActiveCfg = console_release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.Build.0 = console_release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.ActiveCfg = Debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.Build.0 = Debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.Build.0 = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.ActiveCfg = Release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.Build.0 = Release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.ActiveCfg = ReleaseOMP|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.Build.0 = ReleaseOMP|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|x64.ActiveCfg = ReleaseOMP|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|x64.Build.0 = ReleaseOMP|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ngspice-26/visualc/vngspice.vcproj0000644000265600020320000057574112264261473016765 0ustar andreasadmin ngspice-26/visualc/vngspice_fftw.vcproj0000644000265600020320000060775112264261473020010 0ustar andreasadmin ngspice-26/visualc/vngspice_fftw.sln0000644000265600020320000000575312264261473017273 0ustar andreasadminMicrosoft Visual Studio Solution File, Format Version 10.00 # Visual C++ Express 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vngspice", "vngspice_fftw.vcproj", "{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution console_debug|Win32 = console_debug|Win32 console_debug|x64 = console_debug|x64 console_release_omp|Win32 = console_release_omp|Win32 console_release_omp|x64 = console_release_omp|x64 console_release|Win32 = console_release|Win32 console_release|x64 = console_release|x64 Debug|Win32 = Debug|Win32 Debug|x64 = Debug|x64 Release|Win32 = Release|Win32 Release|x64 = Release|x64 ReleaseOMP|Win32 = ReleaseOMP|Win32 ReleaseOMP|x64 = ReleaseOMP|x64 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.ActiveCfg = console_debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|Win32.Build.0 = console_debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.ActiveCfg = console_debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_debug|x64.Build.0 = console_debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|Win32.ActiveCfg = console_release_omp|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|Win32.Build.0 = console_release_omp|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|x64.ActiveCfg = console_release_omp|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release_omp|x64.Build.0 = console_release_omp|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.ActiveCfg = console_release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|Win32.Build.0 = console_release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.ActiveCfg = console_release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.console_release|x64.Build.0 = console_release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.ActiveCfg = Debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|x64.Build.0 = Debug|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.Build.0 = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.ActiveCfg = Release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|x64.Build.0 = Release|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.ActiveCfg = ReleaseOMP|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.Build.0 = ReleaseOMP|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|x64.ActiveCfg = ReleaseOMP|x64 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|x64.Build.0 = ReleaseOMP|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ngspice-26/visualc/msvc-compat.c0000644000265600020320000000142712264261473016300 0ustar andreasadmin#include /* * some rather simple minded replacements * for functions missing in most msvc incarnations */ double x_trunc(double x) { return (x < 0) ? ceil(x) : floor(x); } double x_nearbyint(double x) { /* thats grossly incorrect, anyway, don't worry, be crappy ... */ return floor(x + 0.5); } double x_asinh(double x) { return (x > 0) ? log(x + sqrt(x * x + 1.0)) : -log(-x + sqrt(x * x + 1.0)); } double x_acosh(double x) { /* domain check (HUGE_VAL like gnu libc) */ if (x < 1.0) return HUGE_VAL; else return log(x + sqrt(x * x - 1.0)); } double x_atanh(double x) { /* domain check (HUGE_VAL like gnu libc) */ if (fabs(x) >= 1.0) return HUGE_VAL; else return log((1.0 + x) / (1.0 - x)) / 2.0; } ngspice-26/visualc/include/0000755000265600020320000000000012264261473015322 5ustar andreasadminngspice-26/visualc/include/stdint.h0000644000265600020320000001706012264261473017004 0ustar andreasadmin// ISO C9x compliant stdint.h for Microsoft Visual Studio // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 // // Copyright (c) 2006-2008 Alexander Chemeris // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ #if _MSC_VER > 1000 #pragma once #endif #include // For Visual Studio 6 in C++ mode and for many Visual Studio versions when // compiling for ARM we should wrap include with 'extern "C++" {}' // or compiler give many errors like this: // error C2733: second C linkage of overloaded function 'wmemchr' not allowed #ifdef __cplusplus extern "C" { #endif # include #ifdef __cplusplus } #endif // Define _W64 macros to mark types changing their size, like intptr_t. #ifndef _W64 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 # define _W64 __w64 # else # define _W64 # endif #endif // 7.18.1 Integer types // 7.18.1.1 Exact-width integer types // Visual Studio 6 and Embedded Visual C++ 4 doesn't // realize that, e.g. char has the same size as __int8 // so we give up on __intX for them. #if (_MSC_VER < 1300) typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; // 7.18.1.2 Minimum-width integer types typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; typedef int64_t int_least64_t; typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; typedef uint64_t uint_least64_t; // 7.18.1.3 Fastest minimum-width integer types typedef int8_t int_fast8_t; typedef int16_t int_fast16_t; typedef int32_t int_fast32_t; typedef int64_t int_fast64_t; typedef uint8_t uint_fast8_t; typedef uint16_t uint_fast16_t; typedef uint32_t uint_fast32_t; typedef uint64_t uint_fast64_t; // 7.18.1.4 Integer types capable of holding object pointers #ifdef _WIN64 // [ typedef signed __int64 intptr_t; typedef unsigned __int64 uintptr_t; #else // _WIN64 ][ typedef _W64 signed int intptr_t; typedef _W64 unsigned int uintptr_t; #endif // _WIN64 ] // 7.18.1.5 Greatest-width integer types typedef int64_t intmax_t; typedef uint64_t uintmax_t; // 7.18.2 Limits of specified-width integer types #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 // 7.18.2.1 Limits of exact-width integer types #define INT8_MIN ((int8_t)_I8_MIN) #define INT8_MAX _I8_MAX #define INT16_MIN ((int16_t)_I16_MIN) #define INT16_MAX _I16_MAX #define INT32_MIN ((int32_t)_I32_MIN) #define INT32_MAX _I32_MAX #define INT64_MIN ((int64_t)_I64_MIN) #define INT64_MAX _I64_MAX #define UINT8_MAX _UI8_MAX #define UINT16_MAX _UI16_MAX #define UINT32_MAX _UI32_MAX #define UINT64_MAX _UI64_MAX // 7.18.2.2 Limits of minimum-width integer types #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define INT_LEAST64_MIN INT64_MIN #define INT_LEAST64_MAX INT64_MAX #define UINT_LEAST8_MAX UINT8_MAX #define UINT_LEAST16_MAX UINT16_MAX #define UINT_LEAST32_MAX UINT32_MAX #define UINT_LEAST64_MAX UINT64_MAX // 7.18.2.3 Limits of fastest minimum-width integer types #define INT_FAST8_MIN INT8_MIN #define INT_FAST8_MAX INT8_MAX #define INT_FAST16_MIN INT16_MIN #define INT_FAST16_MAX INT16_MAX #define INT_FAST32_MIN INT32_MIN #define INT_FAST32_MAX INT32_MAX #define INT_FAST64_MIN INT64_MIN #define INT_FAST64_MAX INT64_MAX #define UINT_FAST8_MAX UINT8_MAX #define UINT_FAST16_MAX UINT16_MAX #define UINT_FAST32_MAX UINT32_MAX #define UINT_FAST64_MAX UINT64_MAX // 7.18.2.4 Limits of integer types capable of holding object pointers #ifdef _WIN64 // [ # define INTPTR_MIN INT64_MIN # define INTPTR_MAX INT64_MAX # define UINTPTR_MAX UINT64_MAX #else // _WIN64 ][ # define INTPTR_MIN INT32_MIN # define INTPTR_MAX INT32_MAX # define UINTPTR_MAX UINT32_MAX #endif // _WIN64 ] // 7.18.2.5 Limits of greatest-width integer types #define INTMAX_MIN INT64_MIN #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX // 7.18.3 Limits of other integer types #ifdef _WIN64 // [ # define PTRDIFF_MIN _I64_MIN # define PTRDIFF_MAX _I64_MAX #else // _WIN64 ][ # define PTRDIFF_MIN _I32_MIN # define PTRDIFF_MAX _I32_MAX #endif // _WIN64 ] #define SIG_ATOMIC_MIN INT_MIN #define SIG_ATOMIC_MAX INT_MAX #ifndef SIZE_MAX // [ # ifdef _WIN64 // [ # define SIZE_MAX _UI64_MAX # else // _WIN64 ][ # define SIZE_MAX _UI32_MAX # endif // _WIN64 ] #endif // SIZE_MAX ] // WCHAR_MIN and WCHAR_MAX are also defined in #ifndef WCHAR_MIN // [ # define WCHAR_MIN 0 #endif // WCHAR_MIN ] #ifndef WCHAR_MAX // [ # define WCHAR_MAX _UI16_MAX #endif // WCHAR_MAX ] #define WINT_MIN 0 #define WINT_MAX _UI16_MAX #endif // __STDC_LIMIT_MACROS ] // 7.18.4 Limits of other integer types #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 // 7.18.4.1 Macros for minimum-width integer constants #define INT8_C(val) val##i8 #define INT16_C(val) val##i16 #define INT32_C(val) val##i32 #define INT64_C(val) val##i64 #define UINT8_C(val) val##ui8 #define UINT16_C(val) val##ui16 #define UINT32_C(val) val##ui32 #define UINT64_C(val) val##ui64 // 7.18.4.2 Macros for greatest-width integer constants #define INTMAX_C INT64_C #define UINTMAX_C UINT64_C #endif // __STDC_CONSTANT_MACROS ] #endif // _MSC_STDINT_H_ ] ngspice-26/visualc/include/ngspice/0000755000265600020320000000000012264261473016752 5ustar andreasadminngspice-26/visualc/include/ngspice/config.h0000644000265600020320000003733712264261473020405 0ustar andreasadmin/* config.h. Adoted from config which was generated by configure using MSYS and MINGW. */ /* Special consideration have been given to MS Visual Studio 2008 requirements. */ /* HVo Jan. 2014 */ /* Support for Verilog-A(MS) models */ /* #undef ADMS */ /* Define if we want debug sensitivity analysis */ /* #undef ASDEBUG */ /* Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd */ /* #undef CAPBYPASS */ /* The CIDER enhancements */ #define CIDER 1 /* Define to 1 if the `closedir' function returns void instead of `int'. */ /* #undef CLOSEDIR_VOID */ /* Spice cluster support */ /* #undef CLUSTER */ /* Define if you want to debug ngspice shell */ /* #undef CPDEBUG */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* Define if we want debug distortion analysis (BLOCKTIMES) */ /* #undef D_DBG_BLOCKTIMES */ /* Define if we want debug distortion analysis (SMALLTIMES) */ /* #undef D_DBG_SMALLTIMES */ /* Define if we want some experimental code */ /* #undef EXPERIMENTAL_CODE */ /* Define if we want to enable experimental devices */ /* #undef EXP_DEV */ /* Define if you want to debug frontend */ /* #undef FTEDEBUG */ /* CONSOLE flag set in configurations console_debug and console_release */ #ifndef CONSOLE /* define to specify MS Windows GUI executable */ #define HAS_WINGUI 1 #endif /* Define to 1 if you have the `access' function. */ #define HAVE_ACCESS 1 /* Define to 1 if you have the `acosh' function. */ /* undef HAVE_ACOSH */ /* Define to 1 if you have `alloca', as a function or macro. */ /* #undef HAVE_ALLOCA */ /* Define to 1 if you have and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARPA_INET_H */ /* Define to 1 if you have the `asinh' function. */ /* #undef HAVE_ASINH */ /* Define to 1 if you have the `asprintf' function. */ /* #undef HAVE_ASPRINTF */ /* Define to 1 if you have the `atanh' function. */ /* #undef HAVE_ATANH */ /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to 1 if you have the header file. */ /* #undef HAVE_BLT_H */ /* Define to enable BSD editline */ /* #undef HAVE_BSDEDITLINE */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 /* Define to 1 if you have the declaration of `tzname', and to 0 if you don't. */ /* #undef HAVE_DECL_TZNAME */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_DIRENT_H */ /* Define to 1 if you have the `dirname' function. */ /* #undef HAVE_DIRNAME */ /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ /* Define to 1 if you have the `endpwent' function. */ /* #undef HAVE_ENDPWENT */ /* Define to 1 if you have the `erfc' function. */ /* #undef HAVE_ERFC */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `ftime' function. */ #define HAVE_FTIME 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the `gethostbyname' function. */ /* #undef HAVE_GETHOSTBYNAME */ /* Define to 1 if you have the `getrlimit' function. */ /* #undef HAVE_GETRLIMIT */ /* Define to 1 if you have the `getrusage' function. */ /* #undef HAVE_GETRUSAGE */ /* Define to 1 if you have the `gettimeofday' function. */ /* #undef HAVE_GETTIMEOFDAY */ /* Define to 1 if you have the `getwd' function. */ /* #undef HAVE_GETWD */ /* Define if we have GNU readline */ /* #undef HAVE_GNUREADLINE */ /* Define to 1 if you have the header file. */ /* #undef HAVE_IEEEFP_H */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the header file. */ /* #undef HAVE_INTTYPES_H */ /* Define to 1 if you have the `isatty' function. */ #define HAVE_ISATTY 1 /* Define to 1 if you have the `isnan' function. */ #define HAVE_ISNAN 1 /* Define if we want garbage collection enabled */ /* #undef HAVE_LIBGC */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBGEN_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBIBERTY_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBINTL_H */ /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the `pthread' library (-lpthread). */ /* #undef HAVE_LIBPTHREAD */ /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the `localtime' function. */ #define HAVE_LOCALTIME 1 /* Define to 1 if you have the `logb' function. */ #define HAVE_LOGB 1 #ifdef _MSC_VER #define logb _logb /* needed in spsmp.c */ #endif /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ /* #undef HAVE_MALLOC */ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `modf' function. */ #define HAVE_MODF 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_NCURSES_TERMCAP_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETDB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET_IN_H */ /* Define to 1 if you have the `popen' function. */ /* undef HAVE_POPEN */ /* Define to 1 if you have the header file. */ /* #undef HAVE_PWD_H */ /* Define to 1 if you have the `qsort' function. */ #define HAVE_QSORT 1 /* Define to 1 if you have the `random' function. */ /* #undef HAVE_RANDOM */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ /* #undef HAVE_REALLOC */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `scalb' function. */ #define HAVE_SCALB 1 /* Define to 1 if you have the `scalbn' function. */ /* #undef HAVE_SCALBN */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `snprintf' function. */ /* #undef HAVE_SNPRINTF */ /* Define to 1 if you have the `socket' function. */ /* #undef HAVE_SOCKET */ /* Define to 1 if stdbool.h conforms to C99. */ /* #undef HAVE_STDBOOL_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ /* #define HAVE_STDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ /* Define to 1 if you have the header file. */ /* #undef HAVE_STROPTS_H */ /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if `tm_zone' is member of `struct tm'. */ /* #undef HAVE_STRUCT_TM_TM_ZONE */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_DIR_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_FILE_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IO_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_TIME_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ /* #undef HAVE_SYS_WAIT_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the `tcsetattr' function. */ /* #undef HAVE_TCSETATTR */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TCL_H */ /* Define if we have ncurses or termcap */ /* #undef HAVE_TERMCAP */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMCAP_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIO_H */ /* Define to 1 if you have the `time' function. */ /* #undef HAVE_TIME */ /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ /* #undef HAVE_TM_ZONE */ /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ /* #undef HAVE_TZNAME */ /* Define to 1 if you have the `ulimit' function. */ /* #undef HAVE_ULIMIT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ /* Define to 1 if you have the `utimes' function. */ /* #undef HAVE_UTIMES */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALUES_H */ /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vprintf' function. */ /* #undef HAVE_VPRINTF */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ /* Define to 1 if you have the header file. */ /* #undef HAVE__PROC_MEMINFO */ /* Client-Server only via stdio. */ #define IPC_DEBUG_VIA_STDIO 1 /* Client-Server via socket. */ /* #undef IPC_UNIX_SOCKETS */ /* The NDEV interface */ /* #undef NDEV */ /* Define if you want to discover :) */ /* #undef NEWPRED */ /* Do not trigger unwanted traps by default */ /* #undef NEWTRUNC */ /* Define the build date */ #define NGSPICEBUILDDATE "Mon Sep 06 23:06:55 GMT 2010" #ifdef CONFIG64 /* Define the directory for executables */ #define NGSPICEBINDIR "C:/Spice64/bin" /* Define the directory for architecture independent data files */ #define NGSPICEDATADIR "C:/Spice64/share/ngspice" #else /* Define the directory for executables */ #define NGSPICEBINDIR "C:/Spice/bin" /* Define the directory for architecture independent data files */ #define NGSPICEDATADIR "C:/Spice/share/ngspice" #endif /* Define if we want NOBYPASS */ /* #undef NOBYPASS */ /* Experimental code never implemented to damp Newton iterations */ /* #undef NODELIMITING */ /* Name of package */ #define PACKAGE "ngspice" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "http://ngspice.sourceforge.net/bugrep.html" /* Define to the full name of this package. */ #define PACKAGE_NAME "ngspice" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "ngspice 26" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ngspice" /* Define to the version of this package. */ #define PACKAGE_VERSION "26" /* Define if we want predictor algorithm */ /* #undef PREDICTOR */ /* Define to 1 if the C compiler supports function prototypes. */ /* #undef PROTOTYPES */ /* Define if you want to debug pole-zero analysis */ /* #undef PZDEBUG */ /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define if we want debug sensititvity analysis */ /* #undef SENSDEBUG */ /* Define to 1 if the `setvbuf' function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ /* #undef SETVBUF_REVERSED */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if we want stepdebug */ /* #undef STEPDEBUG */ /* Define to 1 if you can safely include both and . */ /* #undef TIME_WITH_SYS_TIME */ /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "26" /* Define if we want spice2 sensitivity analysis */ /* #undef WANT_SENSE2 */ /* Define if you want PSS analysis */ #define WITH_PSS /**/ /* The xspice enhancements */ #define XSPICE 1 /* Define to 1 if the X Window System is missing or not being used. */ #define X_DISPLAY_MISSING 1 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ /* #undef YYTEXT_POINTER */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to rpl_malloc if the replacement function should be used. */ /* #undef malloc */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to rpl_realloc if the replacement function should be used. */ /* #undef realloc */ /* Define to `unsigned' if does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ #define vfork fork ngspice-26/visualc/include/inttypes.h0000644000265600020320000001750412264261473017361 0ustar andreasadmin// ISO C9x compliant inttypes.h for Microsoft Visual Studio // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 // // Copyright (c) 2006 Alexander Chemeris // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] #ifndef _MSC_INTTYPES_H_ // [ #define _MSC_INTTYPES_H_ #if _MSC_VER > 1000 #pragma once #endif #include "stdint.h" // 7.8 Format conversion of integer types typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; // 7.8.1 Macros for format specifiers #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 // The fprintf macros for signed integers are: #define PRId8 "d" #define PRIi8 "i" #define PRIdLEAST8 "d" #define PRIiLEAST8 "i" #define PRIdFAST8 "d" #define PRIiFAST8 "i" #define PRId16 "hd" #define PRIi16 "hi" #define PRIdLEAST16 "hd" #define PRIiLEAST16 "hi" #define PRIdFAST16 "hd" #define PRIiFAST16 "hi" #define PRId32 "I32d" #define PRIi32 "I32i" #define PRIdLEAST32 "I32d" #define PRIiLEAST32 "I32i" #define PRIdFAST32 "I32d" #define PRIiFAST32 "I32i" #define PRId64 "I64d" #define PRIi64 "I64i" #define PRIdLEAST64 "I64d" #define PRIiLEAST64 "I64i" #define PRIdFAST64 "I64d" #define PRIiFAST64 "I64i" #define PRIdMAX "I64d" #define PRIiMAX "I64i" #define PRIdPTR "Id" #define PRIiPTR "Ii" // The fprintf macros for unsigned integers are: #define PRIo8 "o" #define PRIu8 "u" #define PRIx8 "x" #define PRIX8 "X" #define PRIoLEAST8 "o" #define PRIuLEAST8 "u" #define PRIxLEAST8 "x" #define PRIXLEAST8 "X" #define PRIoFAST8 "o" #define PRIuFAST8 "u" #define PRIxFAST8 "x" #define PRIXFAST8 "X" #define PRIo16 "ho" #define PRIu16 "hu" #define PRIx16 "hx" #define PRIX16 "hX" #define PRIoLEAST16 "ho" #define PRIuLEAST16 "hu" #define PRIxLEAST16 "hx" #define PRIXLEAST16 "hX" #define PRIoFAST16 "ho" #define PRIuFAST16 "hu" #define PRIxFAST16 "hx" #define PRIXFAST16 "hX" #define PRIo32 "I32o" #define PRIu32 "I32u" #define PRIx32 "I32x" #define PRIX32 "I32X" #define PRIoLEAST32 "I32o" #define PRIuLEAST32 "I32u" #define PRIxLEAST32 "I32x" #define PRIXLEAST32 "I32X" #define PRIoFAST32 "I32o" #define PRIuFAST32 "I32u" #define PRIxFAST32 "I32x" #define PRIXFAST32 "I32X" #define PRIo64 "I64o" #define PRIu64 "I64u" #define PRIx64 "I64x" #define PRIX64 "I64X" #define PRIoLEAST64 "I64o" #define PRIuLEAST64 "I64u" #define PRIxLEAST64 "I64x" #define PRIXLEAST64 "I64X" #define PRIoFAST64 "I64o" #define PRIuFAST64 "I64u" #define PRIxFAST64 "I64x" #define PRIXFAST64 "I64X" #define PRIoMAX "I64o" #define PRIuMAX "I64u" #define PRIxMAX "I64x" #define PRIXMAX "I64X" #define PRIoPTR "Io" #define PRIuPTR "Iu" #define PRIxPTR "Ix" #define PRIXPTR "IX" // The fscanf macros for signed integers are: #define SCNd8 "d" #define SCNi8 "i" #define SCNdLEAST8 "d" #define SCNiLEAST8 "i" #define SCNdFAST8 "d" #define SCNiFAST8 "i" #define SCNd16 "hd" #define SCNi16 "hi" #define SCNdLEAST16 "hd" #define SCNiLEAST16 "hi" #define SCNdFAST16 "hd" #define SCNiFAST16 "hi" #define SCNd32 "ld" #define SCNi32 "li" #define SCNdLEAST32 "ld" #define SCNiLEAST32 "li" #define SCNdFAST32 "ld" #define SCNiFAST32 "li" #define SCNd64 "I64d" #define SCNi64 "I64i" #define SCNdLEAST64 "I64d" #define SCNiLEAST64 "I64i" #define SCNdFAST64 "I64d" #define SCNiFAST64 "I64i" #define SCNdMAX "I64d" #define SCNiMAX "I64i" #ifdef _WIN64 // [ # define SCNdPTR "I64d" # define SCNiPTR "I64i" #else // _WIN64 ][ # define SCNdPTR "ld" # define SCNiPTR "li" #endif // _WIN64 ] // The fscanf macros for unsigned integers are: #define SCNo8 "o" #define SCNu8 "u" #define SCNx8 "x" #define SCNX8 "X" #define SCNoLEAST8 "o" #define SCNuLEAST8 "u" #define SCNxLEAST8 "x" #define SCNXLEAST8 "X" #define SCNoFAST8 "o" #define SCNuFAST8 "u" #define SCNxFAST8 "x" #define SCNXFAST8 "X" #define SCNo16 "ho" #define SCNu16 "hu" #define SCNx16 "hx" #define SCNX16 "hX" #define SCNoLEAST16 "ho" #define SCNuLEAST16 "hu" #define SCNxLEAST16 "hx" #define SCNXLEAST16 "hX" #define SCNoFAST16 "ho" #define SCNuFAST16 "hu" #define SCNxFAST16 "hx" #define SCNXFAST16 "hX" #define SCNo32 "lo" #define SCNu32 "lu" #define SCNx32 "lx" #define SCNX32 "lX" #define SCNoLEAST32 "lo" #define SCNuLEAST32 "lu" #define SCNxLEAST32 "lx" #define SCNXLEAST32 "lX" #define SCNoFAST32 "lo" #define SCNuFAST32 "lu" #define SCNxFAST32 "lx" #define SCNXFAST32 "lX" #define SCNo64 "I64o" #define SCNu64 "I64u" #define SCNx64 "I64x" #define SCNX64 "I64X" #define SCNoLEAST64 "I64o" #define SCNuLEAST64 "I64u" #define SCNxLEAST64 "I64x" #define SCNXLEAST64 "I64X" #define SCNoFAST64 "I64o" #define SCNuFAST64 "I64u" #define SCNxFAST64 "I64x" #define SCNXFAST64 "I64X" #define SCNoMAX "I64o" #define SCNuMAX "I64u" #define SCNxMAX "I64x" #define SCNXMAX "I64X" #ifdef _WIN64 // [ # define SCNoPTR "I64o" # define SCNuPTR "I64u" # define SCNxPTR "I64x" # define SCNXPTR "I64X" #else // _WIN64 ][ # define SCNoPTR "lo" # define SCNuPTR "lu" # define SCNxPTR "lx" # define SCNXPTR "lX" #endif // _WIN64 ] #endif // __STDC_FORMAT_MACROS ] // 7.8.2 Functions for greatest-width integer types // 7.8.2.1 The imaxabs function #define imaxabs _abs64 // 7.8.2.2 The imaxdiv function // This is modified version of div() function from Microsoft's div.c found // in %MSVC.NET%\crt\src\div.c #ifdef STATIC_IMAXDIV // [ static #else // STATIC_IMAXDIV ][ _inline #endif // STATIC_IMAXDIV ] imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) { imaxdiv_t result; result.quot = numer / denom; result.rem = numer % denom; if (numer < 0 && result.rem > 0) { // did division wrong; must fix up ++result.quot; result.rem -= denom; } return result; } // 7.8.2.3 The strtoimax and strtoumax functions #define strtoimax _strtoi64 #define strtoumax _strtoui64 // 7.8.2.4 The wcstoimax and wcstoumax functions #define wcstoimax _wcstoi64 #define wcstoumax _wcstoui64 #endif // _MSC_INTTYPES_H_ ] ngspice-26/visualc/fftw3/0000755000265600020320000000000012264261473014730 5ustar andreasadminngspice-26/visualc/fftw3/fftw-3.3.3-dll64/0000755000265600020320000000000012264261473017263 5ustar andreasadminngspice-26/visualc/fftw3/fftw-3.3.3-dll64/README-ngspice.txt0000644000265600020320000000075212264261473022413 0ustar andreasadminThis is the place to deploy the 64 bit version of the fftw3 library under VC++ which can be found here: http://www.fftw.org/install/windows.html More precisely, these are the files (e.g. version 3.3) fftw-3.3.3-dll64.zip which you will have to install here. At least you need the three files fftw3.h libfftw3-3.dll libfftw3-3.def If you need to distribute ngspice.exe to another directory, copy libfftw3-3.dll into the same directory or to a place which is in your PATH environment. ngspice-26/visualc/fftw3/fftw-3.3.3-dll32/0000755000265600020320000000000012264261473017256 5ustar andreasadminngspice-26/visualc/fftw3/fftw-3.3.3-dll32/README-ngspice.txt0000644000265600020320000000075212264261473022406 0ustar andreasadminThis is the place to deploy the 32 bit version of the fftw3 library under VC++ which can be found here: http://www.fftw.org/install/windows.html More precisely, these are the files (e.g. version 3.3) fftw-3.3.3-dll32.zip which you will have to install here. At least you need the three files fftw3.h libfftw3-3.dll libfftw3-3.def If you need to distribute ngspice.exe to another directory, copy libfftw3-3.dll into the same directory or to a place which is in your PATH environment. ngspice-26/INSTALL0000644000265600020320000006012712264261473013270 0ustar andreasadminNgspice installation instructions ================================= Table of contents 1 Ngspice installation (LINUX) 1.1 Prerequisites 1.2 Install from tarball (e.g. ngspice-26.tar.gz) 1.3 Install from git repository 1.4 Advanced Install 1.4.1 Most useful options 1.4.2 Options Specific to Using Ngspice 1.4.3 Options Useful for Debugging Ngspice 2 Compilers and Options 3 Compiling For Multiple Architectures 4 Installation Names 5 Optional Features 6 Specifying the System Type 7 Sharing Defaults 8 Operation Controls 9 NGSPICE COMPILATION UNDER WINDOWS OS 9.1 How to make ngspice with MINGW and MSYS 9.2 make ngspice with MS Visual Studio 2008 9.3 make ngspice with pure CYGWIN 9.4 ngspice console app with MINGW or CYGWIN This file describes the procedures to install ngspice from sources. 1 Ngspice Installation (LINUX, maybe others) ==================== 1.1 Prerequisites Ngspice is written in C and thus a complete C compilation environment is needed. Almost any LINUX offers a complete C development environment. Ngspice is developed on GNU/Linux with gcc and GNU make. The following software must be installed in your system to compile ngspice: bison, flex, and X11 headers and libs. If you want to compile the source from the git repository you need additional software: autoconf, automake, libtool, texinfo, readline. The following software may be needed when enabling additional features: editline, tcl/tk, adms Please have a look at the actual ngspice manual, downloadable at http://ngspice.sourceforge.net/docs.html, which gives you much more information on ngspice and its usage. 1.2 Install from tarball (e.g. ngspice-26.tar.gz) This covers installation from a release distribution (for example ngspice-26.tar.gz, the so called tar ball). After downloading the tar ball to a local directory unpack it using: $ tar -zxvf ngspice-26.tar.gz Now change directories in to the top-level source directory (where this INSTALL file can be found). You should be able to do: $ mkdir release $ cd release $ ../configure --with-x --with-readline=yes --disable-debug $ make $ sudo make install The default install directory for executables is /usr/local/bin. A simple ../configure might be sufficient for a basic ngspice, but the preferred arguments to ../configure are --with-x --with-readline=yes and --disable-debug providing you with a comfortably working ngspice (see section 1.4 for details). See the section titled 'Advanced Install' for instructions about additional arguments that can be passed to ../configure to customise the build and installation. Do not use the script ./autogen.sh, because it is not required for compiling and installing ngspice from the tarball. A fully featured ngspice on LINUX may be obtained with the following commands: $ mkdir release $ cd release $ ../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp $ make 2>&1 | tee make.log $ sudo make install To remove the executables and libraries from the install directory, you may call $ sudo make uninstall 1.3 Install from the git repository This section describes how to install from source code taken directly from the git repository. It is intended for those who want to use the most recent enhancements of ngspice and for developers. For user install instructions using source from a released distributions, please see the sections titled 'Install from tarball' and 'Advanced Install'. Download ngspice sources from the git repository as described on the sourceforge project page (see http://ngspice.sourceforge.net/download.html and click on the git link) Now change directories in to the top-level source directory (where this INSTALL file can be found). The project uses the GNU build process. The compile output should go into a separate directory, so to e.g. maintain separate debug and release versions. $ ./autogen.sh $ mkdir debug $ cd debug $ ../configure --with-x --with-readline=yes $ make $ sudo make install See the section titled 'Advanced Install' for instructions about arguments that can be passed to ./configure to customise the build and installation. Preferred arguments to ./configure to obtain a comfortably working ngspice may be --with-readline=yes and --disable-debug (for a smaller and speed optimized executable). A fully featured ngspice on LINUX may be obtained with the following commands: $ ./autogen.sh --adms $ mkdir release $ cd release $ ../configure --with-x --enable-xspice --disable-debug --enable-cider --with-readline=yes --enable-openmp --enable-adms $ make 2>&1 | tee make.log $ sudo make install If a problem is found with the build process, please submit a report to the ngspice development team. Please provide information about your system and any ./configure arguments you are using, together with any error messages. Ideally you would have tried to fix the problem yourself first. If you have fixed the problem then the development team will love to hear from you. 1.4 Advanced Install Some extra options can be provided to './configure'. To get all available options do: $ ./configure --help Some of these options are generic to the GNU build process that is used by Ngspice, other are specific to Ngspice. The following sections provide some guidance and descriptions for many, but not all, of these options. 1.4.1 Most useful options: --enable-adms ADMS is an experimental model compiler that translates Verilog-A compact models into C code that can be compiled into ngspice. This is (as of ngspice-26) still experimental, some features (e.g. noise) are missing. If you want to use it, please refer to the ADMS section on ngspice web site. --enable-cider Cider is a mixed-level simulator that couples Spice3 and DSIM to simulate devices from their technological parameters. --enable-xspice Enable XSpice enhancements, A mixed signal simulator built upon spice3 with codemodel dynamic loading support. See the ngspice manual for details. --with-readline=yes Enable GNU readline support for the command line interface. --enable-openmp Compile ngspice for multi-core processors. Parallelization is done by OpenMP, for MOS models in BSIM3.3.0 BSIM4.6.0 and and BSOI4 only. See the ngspice manual for details. --disable-debug This option will remove the '-g' option passed to the compiler and add -O2 optimisation (instead of default O0). This speeds up simulating significantly, and is recommended for normal use. 1.4.2 Options Specific to Using Ngspice Most of the options now following are not well maintained, are not tested or even maybe obsolete. --enable-capbypass Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd voltages are unchanged. --enable-cluster Clustering code for distributed simulation. This is a contribution never tested. This code comes from TCLspice implementation and is implemented for transient analysis only. --enable-expdevices Enable experimental devices. This option is used by developers to mask devices under development. Almost useless for users. --enable-experimental This enables some experimental code. Specifically it enables: * The ability to save and load snapshots: adds interactive keywords 'savesnap' and 'loadsnap'. --enable-help Force building nghelp. This is deprecated. --enable-ndev Enable NDEV interface, (experimental, needs updating) A TCP/IP interface to external device simulator such as GSS. For more information, please visit the homepage of GSS at http://gss-tcad.sourceforge.net --enable-newpred Enable the NEWPRED symbol in the code. --enable-newtrunc Enable the newtrunc option --enable-nodelimiting Experimental damping scheme --enable-nobypass Don't bypass recalculations of slowly changing variables --enable-predictor Enable a predictor method for convergence --enable-sense2 Use spice2 sensitivity analysis --enable-xgraph Compile the Xgraph plotting program. Xgraph is a plotting package for X11 and was once very popular. --with-editline=yes Enables the use of the BSD editline library (libedit). See http://www.thrysoee.dk/editline/ --with-tcl=tcldir When configured with this option the tcl module "tclspice" is compiled and installed instead of plain ngspice. --with-ngshared This option let you compile ngspice as a shared library or dll, allowing an application controlling ngspice. This option excludes using --with-x or --with-wingui. Useful additional options are --enable-xspice --enable-cider --enable-openmp. No graphics inetrface is provided, this has to be handled by the controlling application. 1.4.3 Options Useful for Debugging Ngspice --enable-ansi Configure will try to find an option for your compiler so that it expects ansi-C. --enable-asdebug Debug sensitivity code *ASDEBUG*. --enable-blktmsdebug Debug distortion code *BLOCKTIMES* --enable-checkergcc Option for compilation with checkergcc. --enable-cpdebug Enable ngspice shell code debug. --disable-debug This option will remove the '-g' option passed to the compiler. This speeds up compilation a *lot*, and is recommended for normal use. --enable-ftedebug Enable ngspice frontend debug. --enable-gc Enable the Boehm-Weiser Conservative Garbage Collector. --enable-pzdebug Debug pole/zero code. --enable-sensdebug Debug sensitivity code *SENSDEBUG*. --enable-smltmsdebug Debug distortion code *SMALLTIMES* --enable-smoketest Enable smoketest compile. --enable-stepdebug Turns on debugging of convergence stepping?? 2 Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. You can give `configure' initial values for variables by setting them in the environment. Using a Bourne-compatible shell, you can do that on the command line like this: CC=c89 CFLAGS=-O2 LIBS=-lposix ./configure Or on systems that have the `env' program, you can do it like this: env CPPFLAGS=-I/usr/local/include LDFLAGS=-s ./configure 3 Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not supports the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. 4 Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. When installed on MinGW with MSYS alternative paths are not fully supported. See 'How to make ngspice with MINGW and MSYS' below for details. 5 Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. 6 Specifying the System Type ========================== There may be some features `configure' can not figure out automatically, but needs to determine by the type of host the package will run on. Usually `configure' can figure that out, but if it prints a message saying it can not guess the host type, give it the `--host=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name with three fields: CPU-COMPANY-SYSTEM See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the host type. If you are building compiler tools for cross-compiling, you can also use the `--target=TYPE' option to select the type of system they will produce code for and the `--build=TYPE' option to select the type of system on which you are compiling the package. 7 Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. 8 Operation Controls ================== `configure' recognizes the following options to control how it operates. `--cache-file=FILE' Use and save the results of the tests in FILE instead of `./config.cache'. Set FILE to `/dev/null' to disable caching, for debugging `configure'. `--help' Print a summary of the options to `configure', and exit. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--version' Print the version of Autoconf used to generate the `configure' script, and exit. `configure' also accepts some other, not widely useful, options. 9 NGSPICE COMPILATION UNDER WINDOWS OS ==================================== 9.1 How to make ngspice with MINGW and MSYS Creating ngspice with MINGW is a straight forward procedure, if you have MSYS/MINGW installed properly. You will need some enhancements to the standard install (FLEX and BISON have to be made available in MSYS). Some links are given below which describe the procedures. Installing from the tarball, e.g. ngspice-26.tar.gz, is now simple: After expanding, you may just run ./compile_min.sh from the ngspice-26 directory. The default installation location of ngspice is the Windows path C:\spice. The install path can be altered by passing --prefix=NEWPATH as an argument to ./configure during the build process. Put the install path you desire inside "", e.g. "D:/NewSpice". Be careful to use forward slashes "/", not backward slashes "\" (something still to be fixed). Then add --prefix="D:/NewSpice" as an argument to ./configure in the normal way. The procedure of compiling a distribution (for example, a tarball from the ngspice website), is as follows: $ cd ngspice-26 $ mkdir release $ cd release $ ../configure --with-wingui ...and other options $ make $ make install The most useful options are: --enable-xspice --enable-cider --disable-debug (-O2 optimization, no debug information) A fully featured ngspice on Windows may be obtained with the following commands: $ ./autogen.sh --adms $ mkdir release $ cd release $ ../configure --with-wingui --enable-cider --disable-debug --enable-openmp --enable-xspice --enable-adms $ make install However, to compile code extracted from the git repository the procedure is a little different. Firstly install git, e.g. from http://git-scm.com/download/win To obtain ngspice, you may do the following: Open the git command window. Go to a directory of your choice, e.g. D:\Spice $ cd /d/Spice Issue the command for downloading ngspice: $ git clone git://ngspice.git.sourceforge.net/gitroot/ngspice/ngspice This will create directory /ngspice . Go to directory ngspice $ cd /d/Spice/ngspice Start compiling, e.g. by calling $ ./autogen.sh --adms $ ./compile_min.sh Update the ngspice files: Go to directory ngspice $ cd /d/Spice/ngspice Issue command for update $ git pull Instead of calling ./compile_min.sh, you may choose to issue individual commands like: $ cd ngspice $ ./autogen.sh $ mkdir release $ cd release $ ../configure --enable-maintainer-mode --with-wingui ...and other options $ make $ make install MINGW and MSYS can be downloaded from http://www.mingw.org/. The making of ngspice and the code models *.cm for XSpice requires installation of BISON and FLEX to MSYS. A typical installation was tested with: bison-2.0-MSYS.tar.gz flex-2.5.4a-1-bin.zip libiconv-1.9.2-1-bin.zip libintl-0.14.4-bin.zip Bison 2.0 is now superseeded by newer releases (Bison 2.3, see http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=67879) The last three are from http://sourceforge.net/project/showfiles.php?group_id=23617. Installing from git needs more packages to MSYS in advance: git, automake, autoconf, libtool You may also look at http://www.mingw.org/wiki/HOWTO_Install_the_MinGW_GCC_Compiler_Suite http://www.mingw.org/wiki/MSYS http://www.mingw.org/wiki/HOWTO_Create_an_MSYS_Build_Environment. An alternative compiler setup is available at http://tdm-gcc.tdragon.net/ 9.2 make ngspice with MS Visual Studio 2008 ngspice may be compiled with MS Visual Studio 2008 or 2010. CIDER and XSPICE are included, but the code models for XSPICE (*.cm) are not (yet) made. You may however use the code models created with MINGW (which in fact are dlls), as e.g. found in the ngspice binary distribution our made as described in 9.1. There is currently no installation procedure provided, you may however install the executable manually as described in the installation tree below. The directory (visualc) with its files vngspice.sln (project starter) and vngspice.vcproj (project contents) allows to compile and link ngspice with MS Visual Studio 2008. Newer Visual Studio versions will translate the project files into their compatible format (tested with MS Visual Studio 2010). /visualc/include contains a dedicated config.h file. It contains the preprocessor definitions required to properly compile the code. strings.h has been necessary during setting up the project. Install Microsoft Visual Studio 2008 C++ . The MS VS 2008 C++ Express Edition (which is available at no cost from http://www.microsoft.com/express/product/default.aspx) is adequate. Goto /ngspice/visualc. Start MS Visual Studio 2008 by double click onto vngspice.sln. After MS Visual Studio has opened up, select debug or release version by checking 'Erstellen' , 'Konfigurations-Manager' 'Debug' or 'Release'. Start making ngspice (called vngspice.exe) by selecting 'Erstellen' and 'vngspice neu erstellen'. Object files will be created and stored in visualc/debug or visualc/release. The executable will be stored to visualc/debug/bin or visualc/release/bin. An installation tree (as provided with MINGW make install) and also used by vngspice is (maybe created manually): C:\Spice\ bin\ ngspice.exe nghelp.exe ngmakeidx.exe ngnutmeg.exe cmpp.exe lib\ spice\ analog.cm digital.cm spice2poly.cm extradev.cm extravt.cm share\ info\ dir ngspice.info ngspice.info-1 .. ngspice.info-10 man\ man1\ ngmultidec.1 ngnutmeg.1 ngsconvert.1 ngspice.1 ngspice\ helpdir\ ngspice.idx ngspice.txt scripts\ ciderinit devaxis devload setplot spectrum spinit If you intend to install vngspice into another directory, e.g. D:\MySpice, you have to edit /visualc/include/config.h and alter the entries: #define NGSPICEBINDIR "C:/Spice/bin" #define NGSPICEDATADIR "C:/Spice/share/ngspice" to #define NGSPICEBINDIR "D:/MySpice/bin" #define NGSPICEDATADIR "D:/MySpice/share/ngspice" If the code model files *.cm are not available, you will get warning messages, but you may use ngspice in the normal way (of course without XSPICE extensions). 9.3 make ngspice with pure CYGWIN If you don't have libdl.a you may need to link libcygwin.a to libdl.a symbolically. for example: $ cd /lib $ ln -s libcygwin.a libdl.a. The procedure of compiling is the same as Linux. 9.4 ngspice console app with MINGW or CYGWIN Omitting the configure flag --with-wingui will yield a console ngspice. You then will not have any graphics interface. In CYGWIN you may add --with-x for the X11 graphics (not available in mingw). A typical configure command may look like ./configure --enable-adms --enable-xspice --enable-cider --enable-openmp --disable-debug CFLAGS=-m32 LDFLAGS=-m32 prefix=C:/Spice tested with TDM mingw. 10 NGSPICE COMPILATION UNDER MAC OS X ================================== 10.1 Use precompiled binary package 1. Install an X11 interface (like Xquartz) 2. Install the downloaded NGSPICE package 3. Open a terminal window and start using NGSPICE 10.2 Compile NGSPICE manually from a tarball 1. Install an X11 interface (like Xquartz) 2. Install MacPorts from http://www.macports.org 3. Execute this command: sudo port install bison flex ncurses xorg-libXaw 4. Configure NGSPICE invoking "./configure". A complete set of feature is: ./configure --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no 5. Compile NGSPICE invoking "make" 6. Install NGSPICE invoking "make install" or "sudo make install" 10.3 Compile NGSPICE manually from git 1. Install an X11 interface (like Xquartz) 2. Install MacPorts from http://www.macports.org 3. Execute this command: sudo port install automake autoconf libtool bison flex ncurses xorg-libXaw 4. Execute this command: ./autogen.sh or ./autogen.sh --adms (if you want to enable ADMS) 5. Configure NGSPICE invoking "./configure". A complete set of feature is: ./configure --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no ./configure --enable-adms --enable-cider --enable-xspice --enable-openmp --enable-pss --enable-debug=no (if you want to enable ADMS) 6. Compile NGSPICE invoking "make" 7. Install NGSPICE invoking "make install" or "sudo make install" ngspice-26/Makefile.in0000644000265600020320000006212412264261542014300 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(top_srcdir)/configure \ $(top_srcdir)/src/xspice/icm/GNUmakefile.in \ $(top_srcdir)/src/xspice/icm/makedefs.in AUTHORS COPYING \ ChangeLog INSTALL NEWS ar-lib compile config.guess config.sub \ depcomp install-sh ltmain.sh missing ylwrap ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = src/xspice/icm/makedefs \ src/xspice/icm/GNUmakefile CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = @XGRAPHDIR@ src man tests DIST_SUBDIRS = @XGRAPHDIR@ src man tests EXTRA_DIST = FAQ autogen.sh Stuarts_Poly_Notes \ ANALYSES BUGS AUTHORS ChangeLog \ DEVICES NEWS README README.tcl \ README.adms contrib \ doc examples m4 visualc visualc-shared @NOTXGRAPH@ \ xgraph/aclocal.m4 \ compile_min.sh .gitignore MAINTAINERCLEANFILES = Makefile.in aclocal.m4 ar-lib compile config.guess \ src/include/ngspice/config.h.in config.sub configure install-sh \ missing mkinstalldirs stamp-h.in ltconfig \ ltmain.sh depcomp ylwrap ACLOCAL_AMFLAGS = -I m4 all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): src/xspice/icm/makedefs: $(top_builddir)/config.status $(top_srcdir)/src/xspice/icm/makedefs.in cd $(top_builddir) && $(SHELL) ./config.status $@ src/xspice/icm/GNUmakefile: $(top_builddir)/config.status $(top_srcdir)/src/xspice/icm/GNUmakefile.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-libtool \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-hook dist-lzip dist-lzma dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am dist-hook: rm -rf `find $(distdir)/xgraph -name .deps` rm -rf `find $(distdir)/xgraph -name config.status` rm -rf `find $(distdir)/xgraph -name config.log` rm -rf `find $(distdir)/xgraph -name Makefile` mrproper: maintainer-clean rm -f `find $(top_srcdir) -type f -name "*~" -print` rm -f `find $(top_srcdir) -type f -name "*.orig" -print` rm -f `find $(top_srcdir) -type f -name "*.rej" -print` maintainer-clean-local: rm -rf $(top_srcdir)/m4 # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/AUTHORS0000644000265600020320000000311512264261473013301 0ustar andreasadmin@c This file will be processed with texinfo. Spice was originally written at The University of California at Berkeley (USA). Since then, there have been many people working on the software, most of them releasing patches to the original code through the Internet. The following people have contributed in some way: Vera Albrecht, Cecil Aswell, Giles C. Billingsley, Phil Barker, Steven Borley, Krzysztof Blaszkowski, Stuart Brorson, Mansun Chan, Wayne A. Christopher, Al Davis, Glao S. Dezai, Jon Engelbert, Daniele Foci, Henrik Forstén, Noah Friedman, David A. Gates, Alan Gillespie, John Heidemann, Jeffrey M. Hsu, JianHui Huang, S. Hwang, Chris Inbody, Gordon M. Jacobs, Min-Chie Jeng, Beorn Johnson, Stefan Jones, Kenneth H. Keller, Francesco Lannutti, Robert Larice, Mathew Lew, Robert Lindsell, Weidong Liu, Kartikeya Mayaram, Richard D. McRoberts, Manfred Metzger, Wolfgang Muees, Paolo Nenzi, Gary W. Ng, Hong June Park, Arno Peters, Stefano Perticaroli, Serban-Mihai Popescu, Georg Post, Thomas L. Quarles, Emmanuel Rouat, Jean-Marc Routure, Jaijeet S. Roychowdhury, Lionel Sainte Cluque, Takayasu Sakurai, AMAKAWA Shuhei, Kanwar Jit Singh, Bill Swartz, Hitoshi Tanaka, Steve Tell, Andrew Tuckey, Andreas Unger, Holger Vogt, Dietmar Warning, Michael Widlok, Charles D.H. Williams, Antony Wilson, and many others... If someone helped in the development and has not been inserted in this list then this omission was unintentional. If you feel you should be on this list then please write to . Do not be shy, we would like to make a list as complete as possible. ngspice-26/ANALYSES0000644000265600020320000001015512264261473013375 0ustar andreasadmin12345678901234567890123456789012345678901234567890123456789012345678901234567890 ANALYSES ======== This file lists the analyses currently implemented into ngspice. Table of Contents 1 Noise analysis (NOISE) 1.1 Small signal noise 1.2 Transient noise 2 Operating point analysis (OP) 3 Operating point sweep Analysis (DC) 4 Pole-zero analysis (PZ) 5 Small-Signal distortion analysis (DISTO) 6 Small Signal frequency response analysis (AC) 7 Sensitivity analysis (SENS) 8 Transfer function analysis (TF) 9 Transient analysis (TRAN) 10 Periodic steady state analysis (PSS, experimental feature) 1 Noise analysis (NOISE) 1.1 Small signal noise The noise analysis does analysis device-generated noise for the given circuit. When provided with an input source and an output port, the analysis calculates the noise contributions of each device (and each noise generator within the device) to the output port voltage. It also calculates the input noise to the circuit, equivalent to the output noise referred to the specified input source. This is done for every frequency point in a specified range - the calculated value of the noise corresponds to the spectral density of the circuit variable viewed as a stationary gaussian stochastic process. 1.2 Transient noise Time domain noise analysis during transient simulation is enabled by providing voltage (and current) source options with white, 1/f and random telegraph signal noise signals. 2 Operating point analysis (OP) The operating point analysis determines the dc operating point of the circuit with inductors shorted and capacitors opened. 3 Operating point sweep Analysis (DC) The operating point sweep analysis determines the values of output variables while one or two specified independent voltage or current source is stepped over a user-specified range and the dc output variables are stored for each sequential source value. Resistance and temperature sweep are included. 4 Pole-zero analysis (PZ) The pole-zero analysis computes the poles and/or zeros in the small-signal ac transfer function. The program first computes the dc operating point and then determines the linearized, small-signal models for all the nonlinear devices in the circuit. This circuit is then used to find the poles and zeros of the transfer function. Unfortunately this code is (since its inception in spice3) not free of bugs. 5 Small-Signal distortion analysis (DISTO) The distortion analysis computes steady-state harmonic and intermodulation products for small input signal magnitudes. Not all devices are supported. 6 Small Signal frequency response analysis (AC) The ac small-signal computes the ac output variables as a function of frequency. The program first computes the dc operating point of the circuit and determines linearized, small-signal models for all of the nonlinear devices in the circuit. The resultant linear circuit is then analyzed over a user-specified range of frequencies. 7 Sensitivity analysis (SENS) Ngspice will calculate either the DC operating-point sensitivity or the AC small-signal sensitivity of an output variable with respect to all circuit variables, including model parameters. Spice calculates the difference in an output variable (either a node voltage or a branch current) by perturbing each parameter of each device independently. 8 Transfer function analysis (TF) The (small signal) transfer function analysis computes the dc small-signal value of a transfer function (ratio of output variable to input source), input resistance, and output resistance is also computed as a part of the dc solution. 9 Transient analysis (TRAN) The transient analysis computes the transient output variables as a function of time over a user-specified time interval. The initial conditions are automatically determined by a dc analysis. All sources which are not time dependent (for example, power supplies) are set to their dc value. 10 Periodic steady state analysis (PSS) The periodic steady state analysis computes solutions for oscillating circuits. Currently only the autonomous case is implemented. ngspice-26/tests/0000755000265600020320000000000012264261715013372 5ustar andreasadminngspice-26/tests/mesa/0000755000265600020320000000000012264261714014316 5ustar andreasadminngspice-26/tests/mesa/mesa15.cir0000644000265600020320000000040212264261473016106 0ustar andreasadmin* MESA1 subtreshold characteristics (T=400) * Taken form macspice3f4 vds 1 0 dc 0.1 vids 1 2 dc 0 vgs 3 0 dc 0 z1 2 3 0 mesmod l=1u w=20u ts=400 td=400 .model mesmod nmf level=2 rd=31 rs=31 .options noacct .dc vgs -3 0 0.05 .print DC vids#branch .end ngspice-26/tests/mesa/mesa.cir0000644000265600020320000000045512264261473015750 0ustar andreasadmin* DCFL GaAs MESFET Gate\ * Taken from macspice3f4 vdd 1 0 dc 3 vin 3 0 dc 0 z1 2 3 0 enha l=1u w=10u z2 1 2 2 depl l=1u w=10u .model enha nmf level=2 rd=31 rs=31 vto=0.1 astar=0 .model depl nmf level=2 rd=31 rs=31 vto=-1.0 astar=0 .options noacct .dc vin 0 3.0 0.05 .print dc v(2) vin#branch .end ngspice-26/tests/mesa/mesosc.out0000644000265600020320000002141412264261473016344 0ustar andreasadmin Circuit: * Mesfet Ring Oscillator with ungated load Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 1.6 inv01:1 1.59501 inv01:2 0.437524 3 0.432531 2 0.432531 inv02:1 1.59501 inv02:2 0.437524 4 0.432531 inv03:1 1.59501 inv03:2 0.437524 5 0.432531 inv04:1 1.59501 inv04:2 0.437524 6 0.432531 inv05:1 1.59501 inv05:2 0.437524 7 0.432531 inv06:1 1.59501 inv06:2 0.437524 8 0.432531 inv07:1 1.59501 inv07:2 0.437524 9 0.432531 inv08:1 1.59501 inv08:2 0.437524 10 0.432531 inv09:1 1.59501 inv09:2 0.437524 11 0.432531 inv10:1 1.59501 inv10:2 0.437524 12 0.432531 inv11:1 1.59501 inv11:2 0.437524 2000 0.432531 vnoise#branch 9.80682e-06 vdd#branch -0.00274651 * Mesfet Ring Oscillator with ungated load Transient Analysis Sat Aug 27 16:30:01 2005 -------------------------------------------------------------------------------- Index time v(8) -------------------------------------------------------------------------------- 0 1.010000e-09 3.973848e-01 1 1.030000e-09 2.946213e-01 2 1.050000e-09 2.117183e-01 3 1.070000e-09 1.572352e-01 4 1.090000e-09 1.293192e-01 5 1.110000e-09 1.186605e-01 6 1.130000e-09 1.156710e-01 7 1.150000e-09 1.151043e-01 8 1.170000e-09 1.149294e-01 9 1.190000e-09 1.149571e-01 10 1.210000e-09 1.149146e-01 11 1.230000e-09 1.149612e-01 12 1.250000e-09 1.149192e-01 13 1.270000e-09 1.149617e-01 14 1.290000e-09 1.149206e-01 15 1.310000e-09 1.149627e-01 16 1.330000e-09 1.149168e-01 17 1.350000e-09 1.148248e-01 18 1.370000e-09 1.143587e-01 19 1.390000e-09 1.170171e-01 20 1.410000e-09 1.427645e-01 21 1.430000e-09 2.162080e-01 22 1.450000e-09 3.304212e-01 23 1.470000e-09 4.572213e-01 24 1.490000e-09 5.419430e-01 25 1.510000e-09 5.605499e-01 26 1.530000e-09 5.567488e-01 27 1.550000e-09 5.560529e-01 28 1.570000e-09 5.549377e-01 29 1.590000e-09 5.544867e-01 30 1.610000e-09 5.542368e-01 31 1.630000e-09 5.542268e-01 32 1.650000e-09 5.541876e-01 33 1.670000e-09 5.542118e-01 34 1.690000e-09 5.541883e-01 35 1.710000e-09 5.542116e-01 36 1.730000e-09 5.541894e-01 37 1.750000e-09 5.542108e-01 38 1.770000e-09 5.541899e-01 39 1.790000e-09 5.542212e-01 40 1.810000e-09 5.542194e-01 41 1.830000e-09 5.535081e-01 42 1.850000e-09 5.466508e-01 43 1.870000e-09 5.192679e-01 44 1.890000e-09 4.533623e-01 45 1.910000e-09 3.527150e-01 46 1.930000e-09 2.559344e-01 47 1.950000e-09 1.850210e-01 48 1.970000e-09 1.425134e-01 49 1.990000e-09 1.233454e-01 50 2.010000e-09 1.168258e-01 51 2.030000e-09 1.153294e-01 52 2.050000e-09 1.149963e-01 53 2.070000e-09 1.149410e-01 54 2.090000e-09 1.149339e-01 Index time v(8) -------------------------------------------------------------------------------- 55 2.110000e-09 1.149387e-01 56 2.130000e-09 1.149395e-01 57 2.150000e-09 1.149412e-01 58 2.170000e-09 1.149403e-01 59 2.190000e-09 1.149421e-01 60 2.210000e-09 1.149422e-01 61 2.230000e-09 1.149126e-01 62 2.250000e-09 1.146328e-01 63 2.270000e-09 1.145618e-01 64 2.290000e-09 1.230533e-01 65 2.310000e-09 1.689218e-01 66 2.330000e-09 2.619914e-01 67 2.350000e-09 3.862801e-01 68 2.370000e-09 5.027828e-01 69 2.390000e-09 5.565733e-01 70 2.410000e-09 5.584197e-01 71 2.430000e-09 5.565958e-01 72 2.450000e-09 5.554524e-01 73 2.470000e-09 5.547149e-01 74 2.490000e-09 5.543379e-01 75 2.510000e-09 5.542264e-01 76 2.530000e-09 5.542074e-01 77 2.550000e-09 5.541971e-01 78 2.570000e-09 5.542022e-01 79 2.590000e-09 5.541978e-01 80 2.610000e-09 5.542025e-01 81 2.630000e-09 5.541984e-01 82 2.650000e-09 5.542017e-01 83 2.670000e-09 5.542008e-01 84 2.690000e-09 5.542258e-01 85 2.710000e-09 5.541322e-01 86 2.730000e-09 5.518485e-01 87 2.750000e-09 5.380756e-01 88 2.770000e-09 4.951082e-01 89 2.790000e-09 4.104882e-01 90 2.810000e-09 3.069971e-01 91 2.830000e-09 2.206906e-01 92 2.850000e-09 1.625597e-01 93 2.870000e-09 1.316728e-01 94 2.890000e-09 1.194356e-01 95 2.910000e-09 1.158426e-01 96 2.930000e-09 1.151376e-01 97 2.950000e-09 1.149409e-01 98 2.970000e-09 1.149521e-01 99 2.990000e-09 1.149196e-01 100 3.010000e-09 1.149554e-01 101 3.030000e-09 1.149246e-01 102 3.050000e-09 1.149563e-01 103 3.070000e-09 1.149258e-01 104 3.090000e-09 1.149571e-01 105 3.110000e-09 1.149250e-01 106 3.130000e-09 1.148554e-01 107 3.150000e-09 1.144055e-01 108 3.170000e-09 1.160567e-01 109 3.190000e-09 1.366474e-01 110 3.210000e-09 2.038127e-01 111 3.230000e-09 3.138210e-01 112 3.250000e-09 4.413671e-01 Index time v(8) -------------------------------------------------------------------------------- 113 3.270000e-09 5.349460e-01 114 3.290000e-09 5.606761e-01 115 3.310000e-09 5.569116e-01 116 3.330000e-09 5.562200e-01 117 3.350000e-09 5.550389e-01 118 3.370000e-09 5.545266e-01 119 3.390000e-09 5.542611e-01 120 3.410000e-09 5.542180e-01 121 3.430000e-09 5.542000e-01 122 3.450000e-09 5.542001e-01 123 3.470000e-09 5.541998e-01 124 3.490000e-09 5.542002e-01 125 3.510000e-09 5.542006e-01 126 3.530000e-09 5.541999e-01 127 3.550000e-09 5.542004e-01 128 3.570000e-09 5.542078e-01 129 3.590000e-09 5.542334e-01 130 3.610000e-09 5.537349e-01 131 3.630000e-09 5.482902e-01 132 3.650000e-09 5.245726e-01 133 3.670000e-09 4.641217e-01 134 3.690000e-09 3.659878e-01 135 3.710000e-09 2.669325e-01 136 3.730000e-09 1.924121e-01 137 3.750000e-09 1.464063e-01 138 3.770000e-09 1.248475e-01 139 3.790000e-09 1.172628e-01 140 3.810000e-09 1.154039e-01 141 3.830000e-09 1.150264e-01 142 3.850000e-09 1.149325e-01 143 3.870000e-09 1.149447e-01 144 3.890000e-09 1.149275e-01 145 3.910000e-09 1.149499e-01 146 3.930000e-09 1.149307e-01 147 3.950000e-09 1.149506e-01 148 3.970000e-09 1.149318e-01 149 3.990000e-09 1.149522e-01 150 4.010000e-09 1.149130e-01 151 4.030000e-09 1.146998e-01 152 4.050000e-09 1.144243e-01 153 4.070000e-09 1.207562e-01 154 4.090000e-09 1.605792e-01 155 4.110000e-09 2.482373e-01 156 4.130000e-09 3.702713e-01 157 4.150000e-09 4.910421e-01 158 4.170000e-09 5.536346e-01 159 4.190000e-09 5.591043e-01 160 4.210000e-09 5.566311e-01 161 4.230000e-09 5.556161e-01 162 4.250000e-09 5.547671e-01 163 4.270000e-09 5.543790e-01 164 4.290000e-09 5.542225e-01 165 4.310000e-09 5.542175e-01 166 4.330000e-09 5.541894e-01 167 4.350000e-09 5.542097e-01 168 4.370000e-09 5.541904e-01 169 4.390000e-09 5.542097e-01 170 4.410000e-09 5.541913e-01 Index time v(8) -------------------------------------------------------------------------------- 171 4.430000e-09 5.542087e-01 172 4.450000e-09 5.541931e-01 173 4.470000e-09 5.542283e-01 174 4.490000e-09 5.541734e-01 175 4.510000e-09 5.524994e-01 176 4.530000e-09 5.410704e-01 177 4.550000e-09 5.030130e-01 178 4.570000e-09 4.236057e-01 179 4.590000e-09 3.200270e-01 180 4.610000e-09 2.303651e-01 181 4.630000e-09 1.685070e-01 182 4.650000e-09 1.343938e-01 183 4.670000e-09 1.203763e-01 184 4.690000e-09 1.160548e-01 185 4.710000e-09 1.151851e-01 186 4.730000e-09 1.149496e-01 187 4.750000e-09 1.149523e-01 188 4.770000e-09 1.149197e-01 189 4.790000e-09 1.149544e-01 190 4.810000e-09 1.149251e-01 191 4.830000e-09 1.149557e-01 192 4.850000e-09 1.149263e-01 193 4.870000e-09 1.149564e-01 194 4.890000e-09 1.149272e-01 195 4.910000e-09 1.148833e-01 196 4.930000e-09 1.144652e-01 197 4.950000e-09 1.153822e-01 198 4.970000e-09 1.315164e-01 199 4.990000e-09 1.923383e-01 200 5.000000e-09 2.420187e-01 CPU time since last call: 0.262 seconds. Total CPU time: 0.262 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/tests/mesa/mesa11.out0000644000265600020320000002363712264261473016153 0ustar andreasadmin Circuit: * Mesa Level 2 test Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Node Voltage ---- ------- ---- ------- V(3) 0.000000e+00 V(2) 0.000000e+00 V(1) 0.000000e+00 Source Current ------ ------- vds#branch 0.000000e+00 vids#branch 0.000000e+00 vgs#branch 0.000000e+00 MESA models (GaAs MESFET model) model mesmod type nmf vto -1.26 lambda 0.045 lambdahf 0.045 beta 0.0085 vs 150000 rd 0 rs 0 rg 0 ri 0 rf 0 rdi 0 rsi 0 phib 8.01096e-20 phib1 0 tphib 0 astar 40000 ggr 40 del 0.04 xchi 0.033 tggr 0.033 n 1 eta 1.73 m 2.5 mc 3 alpha 0 sigma0 0.081 vsigmat 1.01 vsigma 0.1 mu 0.23 theta 0 mu1 0 mu2 0 d 1.2e-07 nd 2e+23 du 3.5e-08 ndu 1e+22 th 1e-08 ndelta 6e+24 delta 5 tc 0 tvto 0 alphat 0 tlambda 1.79769e+308 teta0 1.79769e+308 teta1 0 tmu 300.15 xtm0 0 xtm1 0 xtm2 0 ks 0 vsg 0 tf 300.15 flo 0 delfo 0 ag 0 rtc1 0 rtc2 0 zeta 1 level 2 nmax 2e+16 gamma 3 epsi 1.08411e-10 cas 1 cbs 1 gd 2.51987e-312 gs 2.51987e-312 vcrit 2.51987e-312 MESA: GaAs MESFET model device z1 model mesmod off 0 l 1e-06 w 2e-05 m 1 icvds 0 icvgs 0 td 27 ts 27 dtemp 0 dnode 2 gnode 3 snode 0 dprimenode 2 sprimenode 0 gprimenode 3 vgs 0 vgd 0 cg 0 cd 0 cgd 0 gm 0 gds 0.00641271 ggs 6.40329e-09 ggd 6.40329e-09 qgs 1.52287e-14 cqgs 0 qgd 1.52287e-14 cqgd 0 cs -0 p 0 Vsource: Independent voltage source device vgs vids vds dc 0 0 0 acmag 0 0 0 i 0 0 0 p -0 -0 -0 * Mesa Level 2 test DC transfer characteristic Sat Aug 27 16:29:59 2005 -------------------------------------------------------------------------------- Index v-sweep vids#branch -------------------------------------------------------------------------------- 0 0.000000e+00 6.287335e-09 1 5.000000e-02 8.247766e-06 2 1.000000e-01 9.608412e-06 3 1.500000e-01 1.042152e-05 4 2.000000e-01 1.119220e-05 5 2.500000e-01 1.198395e-05 6 3.000000e-01 1.281268e-05 7 3.500000e-01 1.368463e-05 8 4.000000e-01 1.460330e-05 9 4.500000e-01 1.557114e-05 10 5.000000e-01 1.659018e-05 11 5.500000e-01 1.766219e-05 12 6.000000e-01 1.878878e-05 13 6.500000e-01 1.997145e-05 14 7.000000e-01 2.121159e-05 15 7.500000e-01 2.251051e-05 16 8.000000e-01 2.386942e-05 17 8.500000e-01 2.528944e-05 18 9.000000e-01 2.677159e-05 19 9.500000e-01 2.831681e-05 20 1.000000e+00 2.992592e-05 21 1.050000e+00 3.159969e-05 22 1.100000e+00 3.333876e-05 23 1.150000e+00 3.514371e-05 24 1.200000e+00 3.701500e-05 25 1.250000e+00 3.895303e-05 26 1.300000e+00 4.095811e-05 27 1.350000e+00 4.303049e-05 28 1.400000e+00 4.517034e-05 29 1.450000e+00 4.737775e-05 30 1.500000e+00 4.965278e-05 31 1.550000e+00 5.199542e-05 32 1.600000e+00 5.440564e-05 33 1.650000e+00 5.688333e-05 34 1.700000e+00 5.942841e-05 35 1.750000e+00 6.204072e-05 36 1.800000e+00 6.472013e-05 37 1.850000e+00 6.746649e-05 38 1.900000e+00 7.027964e-05 39 1.950000e+00 7.315944e-05 40 2.000000e+00 7.610576e-05 41 0.000000e+00 2.351178e-09 42 5.000000e-02 1.018087e-04 43 1.000000e-01 1.847282e-04 44 1.500000e-01 2.386501e-04 45 2.000000e-01 2.712839e-04 46 2.500000e-01 2.921130e-04 47 3.000000e-01 3.067955e-04 48 3.500000e-01 3.182098e-04 49 4.000000e-01 3.278093e-04 50 4.500000e-01 3.363569e-04 51 5.000000e-01 3.442738e-04 52 5.500000e-01 3.518038e-04 53 6.000000e-01 3.590950e-04 54 6.500000e-01 3.662405e-04 Index v-sweep vids#branch -------------------------------------------------------------------------------- 55 7.000000e-01 3.733014e-04 56 7.500000e-01 3.803188e-04 57 8.000000e-01 3.873212e-04 58 8.500000e-01 3.943289e-04 59 9.000000e-01 4.013566e-04 60 9.500000e-01 4.084152e-04 61 1.000000e+00 4.155130e-04 62 1.050000e+00 4.226565e-04 63 1.100000e+00 4.298504e-04 64 1.150000e+00 4.370990e-04 65 1.200000e+00 4.444052e-04 66 1.250000e+00 4.517719e-04 67 1.300000e+00 4.592011e-04 68 1.350000e+00 4.666948e-04 69 1.400000e+00 4.742544e-04 70 1.450000e+00 4.818814e-04 71 1.500000e+00 4.895770e-04 72 1.550000e+00 4.973421e-04 73 1.600000e+00 5.051779e-04 74 1.650000e+00 5.130851e-04 75 1.700000e+00 5.210646e-04 76 1.750000e+00 5.291171e-04 77 1.800000e+00 5.372433e-04 78 1.850000e+00 5.454439e-04 79 1.900000e+00 5.537195e-04 80 1.950000e+00 5.620708e-04 81 2.000000e+00 5.704982e-04 82 0.000000e+00 7.393328e-10 83 5.000000e-02 2.028727e-04 84 1.000000e-01 3.953294e-04 85 1.500000e-01 5.615118e-04 86 2.000000e-01 6.933551e-04 87 2.500000e-01 7.926170e-04 88 3.000000e-01 8.660732e-04 89 3.500000e-01 9.209439e-04 90 4.000000e-01 9.629829e-04 91 4.500000e-01 9.962679e-04 92 5.000000e-01 1.023556e-03 93 5.500000e-01 1.046686e-03 94 6.000000e-01 1.066890e-03 95 6.500000e-01 1.085002e-03 96 7.000000e-01 1.101595e-03 97 7.500000e-01 1.117072e-03 98 8.000000e-01 1.131718e-03 99 8.500000e-01 1.145739e-03 100 9.000000e-01 1.159289e-03 101 9.500000e-01 1.172479e-03 102 1.000000e+00 1.185396e-03 103 1.050000e+00 1.198106e-03 104 1.100000e+00 1.210659e-03 105 1.150000e+00 1.223096e-03 106 1.200000e+00 1.235447e-03 107 1.250000e+00 1.247739e-03 108 1.300000e+00 1.259991e-03 109 1.350000e+00 1.272221e-03 110 1.400000e+00 1.284441e-03 111 1.450000e+00 1.296664e-03 112 1.500000e+00 1.308898e-03 Index v-sweep vids#branch -------------------------------------------------------------------------------- 113 1.550000e+00 1.321152e-03 114 1.600000e+00 1.333432e-03 115 1.650000e+00 1.345744e-03 116 1.700000e+00 1.358093e-03 117 1.750000e+00 1.370482e-03 118 1.800000e+00 1.382916e-03 119 1.850000e+00 1.395398e-03 120 1.900000e+00 1.407930e-03 121 1.950000e+00 1.420515e-03 122 2.000000e+00 1.433155e-03 123 0.000000e+00 7.163208e-25 124 5.000000e-02 3.203183e-04 125 1.000000e-01 6.320067e-04 126 1.500000e-01 9.201977e-04 127 2.000000e-01 1.172110e-03 128 2.500000e-01 1.381625e-03 129 3.000000e-01 1.549618e-03 130 3.500000e-01 1.681428e-03 131 4.000000e-01 1.783965e-03 132 4.500000e-01 1.863838e-03 133 5.000000e-01 1.926569e-03 134 5.500000e-01 1.976453e-03 135 6.000000e-01 2.016720e-03 136 6.500000e-01 2.049754e-03 137 7.000000e-01 2.077307e-03 138 7.500000e-01 2.100670e-03 139 8.000000e-01 2.120796e-03 140 8.500000e-01 2.138397e-03 141 9.000000e-01 2.154010e-03 142 9.500000e-01 2.168042e-03 143 1.000000e+00 2.180803e-03 144 1.050000e+00 2.192537e-03 145 1.100000e+00 2.203432e-03 146 1.150000e+00 2.213637e-03 147 1.200000e+00 2.223270e-03 148 1.250000e+00 2.232427e-03 149 1.300000e+00 2.241184e-03 150 1.350000e+00 2.249604e-03 151 1.400000e+00 2.257737e-03 152 1.450000e+00 2.265627e-03 153 1.500000e+00 2.273307e-03 154 1.550000e+00 2.280808e-03 155 1.600000e+00 2.288153e-03 156 1.650000e+00 2.295363e-03 157 1.700000e+00 2.302457e-03 158 1.750000e+00 2.309448e-03 159 1.800000e+00 2.316350e-03 160 1.850000e+00 2.323173e-03 161 1.900000e+00 2.329927e-03 162 1.950000e+00 2.336620e-03 163 2.000000e+00 2.343260e-03 CPU time since last call: 0.020 seconds. Total CPU time: 0.020 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/tests/mesa/mesa.out0000644000265600020320000000616012264261473016001 0ustar andreasadmin No. of Data Rows : 61 Circuit: * DCFL GaAs MESFET Gate\ Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 * DCFL GaAs MESFET Gate\ -------------------------------------------------------------------------------- Index v-sweep v(2) vin#branch -------------------------------------------------------------------------------- 0 0.000000e+00 2.992148e+00 1.222711e-07 1 5.000000e-02 2.986117e+00 1.099223e-07 2 1.000000e-01 2.978089e+00 9.838581e-08 3 1.500000e-01 2.968344e+00 8.771709e-08 4 2.000000e-01 2.957063e+00 7.792446e-08 5 2.500000e-01 2.944276e+00 6.897685e-08 6 3.000000e-01 2.929921e+00 6.082601e-08 7 3.500000e-01 2.913878e+00 5.341906e-08 8 4.000000e-01 2.895974e+00 4.670231e-08 9 4.500000e-01 2.875963e+00 4.062162e-08 10 5.000000e-01 2.853472e+00 3.512199e-08 11 5.500000e-01 2.827936e+00 3.014710e-08 12 6.000000e-01 2.798466e+00 2.563865e-08 13 6.500000e-01 2.763633e+00 2.153539e-08 14 7.000000e-01 2.721042e+00 1.777166e-08 15 7.500000e-01 2.666534e+00 1.427672e-08 16 8.000000e-01 2.592776e+00 1.095453e-08 17 8.500000e-01 2.488055e+00 7.822913e-09 18 9.000000e-01 2.340785e+00 5.018723e-09 19 9.500000e-01 2.154051e+00 2.856783e-09 20 1.000000e+00 1.945616e+00 1.453815e-09 21 1.050000e+00 1.727796e+00 6.363649e-10 22 1.100000e+00 1.500026e+00 1.869188e-10 23 1.150000e+00 1.255138e+00 -4.361641e-11 24 1.200000e+00 9.959858e-01 -1.421819e-10 25 1.250000e+00 7.599885e-01 -1.684468e-10 26 1.300000e+00 5.955970e-01 -1.674650e-10 27 1.350000e+00 4.965957e-01 -1.608019e-10 28 1.400000e+00 4.345031e-01 -1.536029e-10 29 1.450000e+00 3.919482e-01 -1.465786e-10 30 1.500000e+00 3.604794e-01 -1.397780e-10 31 1.550000e+00 3.358282e-01 -1.333493e-10 32 1.600000e+00 3.156600e-01 -1.271415e-10 33 1.650000e+00 2.985995e-01 -1.211587e-10 34 1.700000e+00 2.837831e-01 -1.153968e-10 35 1.750000e+00 2.706382e-01 -1.098514e-10 36 1.800000e+00 2.587662e-01 -1.045190e-10 37 1.850000e+00 2.478763e-01 -9.939633e-11 38 1.900000e+00 2.377452e-01 -9.448009e-11 39 1.950000e+00 2.281901e-01 -8.976643e-11 40 2.000000e+00 2.190482e-01 -8.525076e-11 41 2.050000e+00 2.101552e-01 -8.089527e-11 42 2.100000e+00 2.013138e-01 -7.678203e-11 43 2.150000e+00 1.922195e-01 -7.285071e-11 44 2.200000e+00 1.821999e-01 -6.900423e-11 45 2.250000e+00 1.673580e-01 -6.520504e-11 46 2.300000e+00 1.621071e-01 -6.190646e-11 47 2.350000e+00 1.618962e-01 -5.892842e-11 48 2.400000e+00 1.617131e-01 -5.608609e-11 49 2.450000e+00 1.615536e-01 -5.338217e-11 50 2.500000e+00 1.614140e-01 -5.081092e-11 51 2.550000e+00 1.612915e-01 -4.836807e-11 52 2.600000e+00 1.611837e-01 -4.604928e-11 53 2.650000e+00 1.610885e-01 -4.385014e-11 54 2.700000e+00 1.610043e-01 -4.176620e-11 Index v-sweep v(2) vin#branch -------------------------------------------------------------------------------- 55 2.750000e+00 1.609295e-01 -3.979304e-11 56 2.800000e+00 1.608629e-01 -3.792624e-11 57 2.850000e+00 1.608035e-01 -3.616145e-11 58 2.900000e+00 1.607505e-01 -3.449435e-11 59 2.950000e+00 1.607029e-01 -3.292073e-11 60 3.000000e+00 1.606602e-01 -3.143645e-11 ngspice-26/tests/mesa/mesa-12.cir0000644000265600020320000000056312264261473016170 0ustar andreasadmin* MESA1 transient test - * Taken from macspice3f4 * * This netlist shows convergence problems in ngspice. * Paolo Nenzi (rework-14) rd 1 3 10k z1 3 2 0 mesa1 l=1u w=20u vgs 2 0 dc 0 pulse(-3 0 0 0.5n 0.5n 2n 4n) vdd 1 0 5v .model mesa1 nmf(level=2 rd=31 rs=31) .options noacct .dc vgs -2 0 0.02 .tran 0.1n 5n .print v(3) v(2) .end .control run plot v(2) v(3) .endc ngspice-26/tests/mesa/mesgout.out0000644000265600020320000001347512264261473016546 0ustar andreasadmin No. of Data Rows : 91 Circuit: * Simulation of MESFET output conductance Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 * Simulation of MESFET output conductance -------------------------------------------------------------------------------- Index frequency v(3) -------------------------------------------------------------------------------- 0 1.000000e-03, 0.000000e+00 -8.965836e-04, 6.902362e-19 1 1.258925e-03, 0.000000e+00 -8.966291e-04, 8.689560e-19 2 1.584893e-03, 0.000000e+00 -8.966864e-04, 1.093951e-18 3 1.995262e-03, 0.000000e+00 -8.967585e-04, 1.377203e-18 4 2.511886e-03, 0.000000e+00 -8.968492e-04, 1.733796e-18 5 3.162278e-03, 0.000000e+00 -8.969635e-04, 2.182721e-18 6 3.981072e-03, 0.000000e+00 -8.971074e-04, 2.747884e-18 7 5.011872e-03, 0.000000e+00 -8.972885e-04, 3.459383e-18 8 6.309573e-03, 0.000000e+00 -8.975165e-04, 4.355108e-18 9 7.943282e-03, 0.000000e+00 -8.978035e-04, 5.482761e-18 10 1.000000e-02, 0.000000e+00 -8.981649e-04, 6.902395e-18 11 1.258925e-02, 0.000000e+00 -8.986199e-04, 8.689612e-18 12 1.584893e-02, 0.000000e+00 -8.991926e-04, 1.093959e-17 13 1.995262e-02, 0.000000e+00 -8.999137e-04, 1.377216e-17 14 2.511886e-02, 0.000000e+00 -9.008215e-04, 1.733817e-17 15 3.162278e-02, 0.000000e+00 -9.019645e-04, 2.182754e-17 16 3.981072e-02, 0.000000e+00 -9.034034e-04, 2.747936e-17 17 5.011872e-02, 0.000000e+00 -9.052150e-04, 3.459464e-17 18 6.309573e-02, 0.000000e+00 -9.074958e-04, 4.355236e-17 19 7.943282e-02, 0.000000e+00 -9.103672e-04, 5.482962e-17 20 1.000000e-01, 0.000000e+00 -9.139824e-04, 6.902710e-17 21 1.258925e-01, 0.000000e+00 -9.185336e-04, 8.690104e-17 22 1.584893e-01, 0.000000e+00 -9.242630e-04, 1.094036e-16 23 1.995262e-01, 0.000000e+00 -9.314747e-04, 1.377335e-16 24 2.511886e-01, 0.000000e+00 -9.405505e-04, 1.733999e-16 25 3.162278e-01, 0.000000e+00 -9.519685e-04, 2.183031e-16 26 3.981072e-01, 0.000000e+00 -9.663249e-04, 2.748353e-16 27 5.011872e-01, 0.000000e+00 -9.843591e-04, 3.460081e-16 28 6.309573e-01, 0.000000e+00 -1.006979e-03, 4.356124e-16 29 7.943282e-01, 0.000000e+00 -1.035279e-03, 5.484192e-16 30 1.000000e+00, 0.000000e+00 -1.070545e-03, 6.904308e-16 31 1.258925e+00, 0.000000e+00 -1.114211e-03, 8.691951e-16 32 1.584893e+00, 0.000000e+00 -1.167731e-03, 1.094197e-15 33 1.995262e+00, 0.000000e+00 -1.232294e-03, 1.377343e-15 34 2.511886e+00, 0.000000e+00 -1.308280e-03, 1.733570e-15 35 3.162278e+00, 0.000000e+00 -1.394424e-03, 2.181614e-15 36 3.981072e+00, 0.000000e+00 -1.486819e-03, 2.745011e-15 37 5.011872e+00, 0.000000e+00 -1.578371e-03, 3.453445e-15 38 6.309573e+00, 0.000000e+00 -1.659776e-03, 4.344535e-15 39 7.943282e+00, 0.000000e+00 -1.722639e-03, 5.466032e-15 40 1.000000e+01, 0.000000e+00 -1.763385e-03, 6.878303e-15 41 1.258925e+01, 0.000000e+00 -1.784787e-03, 8.657178e-15 42 1.584893e+01, 0.000000e+00 -1.793547e-03, 1.089764e-14 43 1.995262e+01, 0.000000e+00 -1.796207e-03, 1.371889e-14 44 2.511886e+01, 0.000000e+00 -1.796769e-03, 1.727095e-14 45 3.162278e+01, 0.000000e+00 -1.796845e-03, 2.174281e-14 46 3.981072e+01, 0.000000e+00 -1.796851e-03, 2.737258e-14 47 5.011872e+01, 0.000000e+00 -1.796851e-03, 3.446003e-14 48 6.309573e+01, 0.000000e+00 -1.796851e-03, 4.338261e-14 49 7.943282e+01, 0.000000e+00 -1.796851e-03, 5.461547e-14 50 1.000000e+02, 0.000000e+00 -1.796851e-03, 6.875681e-14 51 1.258925e+02, 0.000000e+00 -1.796851e-03, 8.655969e-14 52 1.584893e+02, 0.000000e+00 -1.796851e-03, 1.089722e-13 53 1.995262e+02, 0.000000e+00 -1.796851e-03, 1.371879e-13 54 2.511886e+02, 0.000000e+00 -1.796851e-03, 1.727093e-13 Index frequency v(3) -------------------------------------------------------------------------------- 55 3.162278e+02, 0.000000e+00 -1.796851e-03, 2.174281e-13 56 3.981072e+02, 0.000000e+00 -1.796851e-03, 2.737258e-13 57 5.011872e+02, 0.000000e+00 -1.796851e-03, 3.446003e-13 58 6.309573e+02, 0.000000e+00 -1.796851e-03, 4.338261e-13 59 7.943282e+02, 0.000000e+00 -1.796851e-03, 5.461547e-13 60 1.000000e+03, 0.000000e+00 -1.796851e-03, 6.875681e-13 61 1.258925e+03, 0.000000e+00 -1.796851e-03, 8.655969e-13 62 1.584893e+03, 0.000000e+00 -1.796851e-03, 1.089722e-12 63 1.995262e+03, 0.000000e+00 -1.796851e-03, 1.371879e-12 64 2.511886e+03, 0.000000e+00 -1.796851e-03, 1.727093e-12 65 3.162278e+03, 0.000000e+00 -1.796851e-03, 2.174281e-12 66 3.981072e+03, 0.000000e+00 -1.796851e-03, 2.737258e-12 67 5.011872e+03, 0.000000e+00 -1.796851e-03, 3.446003e-12 68 6.309573e+03, 0.000000e+00 -1.796851e-03, 4.338261e-12 69 7.943282e+03, 0.000000e+00 -1.796851e-03, 5.461547e-12 70 1.000000e+04, 0.000000e+00 -1.796851e-03, 6.875681e-12 71 1.258925e+04, 0.000000e+00 -1.796851e-03, 8.655969e-12 72 1.584893e+04, 0.000000e+00 -1.796851e-03, 1.089722e-11 73 1.995262e+04, 0.000000e+00 -1.796851e-03, 1.371879e-11 74 2.511886e+04, 0.000000e+00 -1.796851e-03, 1.727093e-11 75 3.162278e+04, 0.000000e+00 -1.796851e-03, 2.174281e-11 76 3.981072e+04, 0.000000e+00 -1.796851e-03, 2.737258e-11 77 5.011872e+04, 0.000000e+00 -1.796851e-03, 3.446003e-11 78 6.309573e+04, 0.000000e+00 -1.796851e-03, 4.338261e-11 79 7.943282e+04, 0.000000e+00 -1.796851e-03, 5.461547e-11 80 1.000000e+05, 0.000000e+00 -1.796851e-03, 6.875681e-11 81 1.258925e+05, 0.000000e+00 -1.796851e-03, 8.655969e-11 82 1.584893e+05, 0.000000e+00 -1.796851e-03, 1.089722e-10 83 1.995262e+05, 0.000000e+00 -1.796851e-03, 1.371879e-10 84 2.511886e+05, 0.000000e+00 -1.796851e-03, 1.727093e-10 85 3.162278e+05, 0.000000e+00 -1.796851e-03, 2.174281e-10 86 3.981072e+05, 0.000000e+00 -1.796851e-03, 2.737258e-10 87 5.011872e+05, 0.000000e+00 -1.796851e-03, 3.446003e-10 88 6.309573e+05, 0.000000e+00 -1.796851e-03, 4.338261e-10 89 7.943282e+05, 0.000000e+00 -1.796851e-03, 5.461547e-10 90 1.000000e+06, 0.000000e+00 -1.796851e-03, 6.875681e-10 ngspice-26/tests/mesa/mesinv.out0000644000265600020320000000674412264261473016365 0ustar andreasadmin No. of Data Rows : 101 Circuit: * Mesfet Inverter with ungated load/Wload=2e-6 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 * Mesfet Inverter with ungated load/Wload=2e-6 -------------------------------------------------------------------------------- Index v-sweep v(70) -------------------------------------------------------------------------------- 0 0.000000e+00 5.924361e-01 1 1.000000e-02 5.924266e-01 2 2.000000e-02 5.924150e-01 3 3.000000e-02 5.924009e-01 4 4.000000e-02 5.923837e-01 5 5.000000e-02 5.923628e-01 6 6.000000e-02 5.923376e-01 7 7.000000e-02 5.923072e-01 8 8.000000e-02 5.922706e-01 9 9.000000e-02 5.922268e-01 10 1.000000e-01 5.921744e-01 11 1.100000e-01 5.921119e-01 12 1.200000e-01 5.920374e-01 13 1.300000e-01 5.919488e-01 14 1.400000e-01 5.918436e-01 15 1.500000e-01 5.917188e-01 16 1.600000e-01 5.915710e-01 17 1.700000e-01 5.913965e-01 18 1.800000e-01 5.911910e-01 19 1.900000e-01 5.909499e-01 20 2.000000e-01 5.906683e-01 21 2.100000e-01 5.903409e-01 22 2.200000e-01 5.899623e-01 23 2.300000e-01 5.895270e-01 24 2.400000e-01 5.890297e-01 25 2.500000e-01 5.884650e-01 26 2.600000e-01 5.878277e-01 27 2.700000e-01 5.871130e-01 28 2.800000e-01 5.863164e-01 29 2.900000e-01 5.854336e-01 30 3.000000e-01 5.844607e-01 31 3.100000e-01 5.833937e-01 32 3.200000e-01 5.822289e-01 33 3.300000e-01 5.809625e-01 34 3.400000e-01 5.795903e-01 35 3.500000e-01 5.781078e-01 36 3.600000e-01 5.765096e-01 37 3.700000e-01 5.747896e-01 38 3.800000e-01 5.729403e-01 39 3.900000e-01 5.709526e-01 40 4.000000e-01 5.688158e-01 41 4.100000e-01 5.665165e-01 42 4.200000e-01 5.640386e-01 43 4.300000e-01 5.613624e-01 44 4.400000e-01 5.584637e-01 45 4.500000e-01 5.553124e-01 46 4.600000e-01 5.518714e-01 47 4.700000e-01 5.480934e-01 48 4.800000e-01 5.439182e-01 49 4.900000e-01 5.392621e-01 50 5.000000e-01 5.340299e-01 51 5.100000e-01 5.280748e-01 52 5.200000e-01 5.211960e-01 53 5.300000e-01 5.130993e-01 54 5.400000e-01 5.033337e-01 Index v-sweep v(70) -------------------------------------------------------------------------------- 55 5.500000e-01 4.911731e-01 56 5.600000e-01 4.753954e-01 57 5.700000e-01 4.539721e-01 58 5.800000e-01 4.244146e-01 59 5.900000e-01 3.876544e-01 60 6.000000e-01 3.514842e-01 61 6.100000e-01 3.221191e-01 62 6.200000e-01 3.002657e-01 63 6.300000e-01 2.846143e-01 64 6.400000e-01 2.737513e-01 65 6.500000e-01 2.665589e-01 66 6.600000e-01 2.622081e-01 67 6.700000e-01 2.600876e-01 68 6.800000e-01 2.597415e-01 69 6.900000e-01 2.608243e-01 70 7.000000e-01 2.630617e-01 71 7.100000e-01 2.662670e-01 72 7.200000e-01 2.702653e-01 73 7.300000e-01 2.749264e-01 74 7.400000e-01 2.801461e-01 75 7.500000e-01 2.858398e-01 76 7.600000e-01 2.919383e-01 77 7.700000e-01 2.983843e-01 78 7.800000e-01 3.051304e-01 79 7.900000e-01 3.121367e-01 80 8.000000e-01 3.193695e-01 81 8.100000e-01 3.268000e-01 82 8.200000e-01 3.344035e-01 83 8.300000e-01 3.421583e-01 84 8.400000e-01 3.500453e-01 85 8.500000e-01 3.580472e-01 86 8.600000e-01 3.661485e-01 87 8.700000e-01 3.743345e-01 88 8.800000e-01 3.825912e-01 89 8.900000e-01 3.909052e-01 90 9.000000e-01 3.992629e-01 91 9.100000e-01 4.076504e-01 92 9.200000e-01 4.160534e-01 93 9.300000e-01 4.244569e-01 94 9.400000e-01 4.328449e-01 95 9.500000e-01 4.412004e-01 96 9.600000e-01 4.495055e-01 97 9.700000e-01 4.577417e-01 98 9.800000e-01 4.658899e-01 99 9.900000e-01 4.739313e-01 100 1.000000e+00 4.818480e-01 ngspice-26/tests/mesa/mesgout.cir0000644000265600020320000000063412264261473016505 0ustar andreasadmin* Simulation of MESFET output conductance * Taken from macspice3f4 * rd 1 2 20 z1 3 4 0 driver l=1u w=10u rs 5 0 20 vgs 4 0 dc 0.5 ac 0.01 vds 1 0 dc 1.0 vid 2 3 dc 0 .model driver nmf + level=2 *+ jsdf=1e-100 + n=1.44 + rd=0 + rs=0 + vs=1.5e5 + mu=0.25 + d=2e-7 + vto=0.1 + m=2 + lambda=0 + sigma0=0 + delfo=5 + flo=0.5 + tf=100000 + lambdahf=120 .options noacct .ac DEC 10 0.001 1e6 .print ac V(3) .end ngspice-26/tests/mesa/mesa11.cir0000644000265600020320000000052512264261473016110 0ustar andreasadmin* Mesa Level 2 test * Taken from macspice3f4 archive. vds 1 0 vids 1 2 dc 0 vgs 3 0 dc 0 z1 2 3 0 mesmod l=1u w=20u .options noacct .op .dc vds 0 2 0.05 vgs -1.2 0 0.4 .print DC vids#branch .model mesmod nmf level=2 *d=0.12u mu=0.23 vs=1.5e5 m=2.5 *+ vto=-1.26 eta=1.73 lambda=0.045 sigma0=0.081 vsigma=0.1 *+ vsigmat=1 rd=31 rs=31 .end ngspice-26/tests/mesa/mesa15.out0000644000265600020320000000455412264261473016154 0ustar andreasadmin No. of Data Rows : 61 Circuit: * MESA1 subtreshold characteristics (T=400) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 * MESA1 subtreshold characteristics (T=400) -------------------------------------------------------------------------------- Index v-sweep vids#branch -------------------------------------------------------------------------------- 0 -3.000000e+00 4.125058e-03 1 -2.950000e+00 3.942958e-03 2 -2.900000e+00 3.766587e-03 3 -2.850000e+00 3.596946e-03 4 -2.800000e+00 3.433522e-03 5 -2.750000e+00 3.276251e-03 6 -2.700000e+00 3.124552e-03 7 -2.650000e+00 2.978683e-03 8 -2.600000e+00 2.838366e-03 9 -2.550000e+00 2.703433e-03 10 -2.500000e+00 2.574384e-03 11 -2.450000e+00 2.449566e-03 12 -2.400000e+00 2.329928e-03 13 -2.350000e+00 2.214931e-03 14 -2.300000e+00 2.104618e-03 15 -2.250000e+00 1.998770e-03 16 -2.200000e+00 1.897275e-03 17 -2.150000e+00 1.799981e-03 18 -2.100000e+00 1.706755e-03 19 -2.050000e+00 1.617460e-03 20 -2.000000e+00 1.531966e-03 21 -1.950000e+00 1.450143e-03 22 -1.900000e+00 1.371869e-03 23 -1.850000e+00 1.297023e-03 24 -1.800000e+00 1.225492e-03 25 -1.750000e+00 1.157170e-03 26 -1.700000e+00 1.091960e-03 27 -1.650000e+00 1.029781e-03 28 -1.600000e+00 9.705674e-04 29 -1.550000e+00 9.142803e-04 30 -1.500000e+00 8.609121e-04 31 -1.450000e+00 8.104967e-04 32 -1.400000e+00 7.631213e-04 33 -1.350000e+00 7.189419e-04 34 -1.300000e+00 6.782043e-04 35 -1.250000e+00 6.412581e-04 36 -1.200000e+00 6.085381e-04 37 -1.150000e+00 5.804802e-04 38 -1.100000e+00 5.573615e-04 39 -1.050000e+00 5.391139e-04 40 -1.000000e+00 5.252192e-04 41 -9.500000e-01 5.147888e-04 42 -9.000000e-01 5.068118e-04 43 -8.500000e-01 5.004243e-04 44 -8.000000e-01 4.950491e-04 45 -7.500000e-01 4.903881e-04 46 -7.000000e-01 4.863376e-04 47 -6.500000e-01 4.828977e-04 48 -6.000000e-01 4.801090e-04 49 -5.500000e-01 4.780166e-04 50 -5.000000e-01 4.766538e-04 51 -4.500000e-01 4.760375e-04 52 -4.000000e-01 4.761694e-04 53 -3.500000e-01 4.770400e-04 54 -3.000000e-01 4.786337e-04 Index v-sweep vids#branch -------------------------------------------------------------------------------- 55 -2.500000e-01 4.809264e-04 56 -2.000000e-01 4.838645e-04 57 -1.500000e-01 4.873061e-04 58 -1.000000e-01 4.908923e-04 59 -5.000000e-02 4.937627e-04 60 -2.289835e-15 4.939069e-04 ngspice-26/tests/mesa/mesa13.out0000644000265600020320000000005012264261473016135 0ustar andreasadmin Circuit: * MESA1 - Gate Leakage Test ngspice-26/tests/mesa/mesa12.cir0000644000265600020320000000047412264261473016114 0ustar andreasadmin* MESA1 transient test * Taken from macspice3f4 * * This netlist shows convergence problems in ngspice rd 1 3 10k z1 3 2 0 mesa1 l=1u w=20u vgs 2 0 dc 0 pulse(-3 0 0 0.5n 0.5n 2n 4n) vdd 1 0 5v .model mesa1 nmf(level=2 rd=31 rs=31) .options noacct .dc vgs -2 0 0.02 .tran 0.1n 5n .print tran v(2) v(3) .print ngspice-26/tests/mesa/mesosc.cir0000644000265600020320000000140412264261473016307 0ustar andreasadmin* Mesfet Ring Oscillator with ungated load * Taken form macspice3f4 * .subckt mesinv 10 20 3 * Node 10: Power Supply * Node 20: Input * Node 30: Output rdl 10 1 20 bl1 1 2 i=0.00025*tanh(v(1,2)/0.00025/2240)*(1+v(1,2)*0.027) rsl 2 3 20 zd 3 20 0 driver l=0.7u w=20u ci 3 0 20f .ends mesinv .options noacct .model driver nmf level=2 n=1.44 rd=20 rs=20 vs=1.9e5 + mu=0.25 d=1e-7 vto=0.15 m=2 lambda=0.15 sigma0=0.02 + vsigmat=0.5 vdd 1 0 dc 1.6 xinv01 1 2 3 mesinv xinv02 1 3 4 mesinv xinv03 1 4 5 mesinv xinv04 1 5 6 mesinv xinv05 1 6 7 mesinv xinv06 1 7 8 mesinv xinv07 1 8 9 mesinv xinv08 1 9 10 mesinv xinv09 1 10 11 mesinv xinv10 1 11 12 mesinv xinv11 1 12 2000 mesinv vnoise 2000 2 dc 0 pwl(0 0 0.2n 0 0.3n 0.1 0.4n 0) .tran 1p 5n 1n 20p .print tran V(8) .end ngspice-26/tests/mesa/Makefile.am0000644000265600020320000000063512264261473016360 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ mesa11.cir \ mesa13.cir \ mesa14.cir \ mesa15.cir \ mesa21.cir \ mesa.cir \ mesgout.cir \ mesinv.cir \ mesosc.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) EXTRA_DIST += mesa12.cir mesa-12.cir MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/mesa/mesa21.out0000644000265600020320000000002712264261473016140 0ustar andreasadmin Circuit: * Mesa Test ngspice-26/tests/mesa/Makefile.in0000644000265600020320000003372412264261542016373 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/mesa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ mesa11.cir \ mesa13.cir \ mesa14.cir \ mesa15.cir \ mesa21.cir \ mesa.cir \ mesgout.cir \ mesinv.cir \ mesosc.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = $(TESTS) $(TESTS:.cir=.out) mesa12.cir mesa-12.cir MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/mesa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/mesa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/mesa/mesinv.cir0000644000265600020320000000131412264261473016317 0ustar andreasadmin* Mesfet Inverter with ungated load/Wload=2e-6 * Taken from macspice3f4 package * * Output node is 70 * bl1 10 40 i=0.0005*tanh(v(10,40)/0.0005/1120)*(1+v(10,40)*0.027) bl2 20 50 i=0.0005*tanh(v(20,50)/0.0005/1120)*(1+v(20,50)*0.027) zd1 70 2 0 driver l=0.7u w=20u zd2 80 70 0 driver l=0.7u w=20u rdl1 1 10 20 rdl2 1 20 20 rsl1 40 70 20 rsl2 50 80 20 vin 1000 0 dc 0 vdd 2000 0 dc 1.6 visrc 2000 1 dc 0 vig 1000 2 dc 0 .model driver nmf + level=2 + n=1.44 + rd=20 + rs=20 + ri=10 + rf=10 + vs=1.9e5 + mu=0.25 + d=1e-7 + vto=0.15 + m=2 + lambda=0.15 + sigma0=0.02 + vsigmat=0.5 *.nodeset v(10)=1.6 v(40)=1.6 v(70)=1.6 v(20)=0.2 v(50)=0.2 *+ v(80)=0.2 .options noacct .dc vin 0 1 0.01 .print dc v(70) .end ngspice-26/tests/mesa/mesa14.cir0000644000265600020320000000047712264261473016121 0ustar andreasadmin* MESA1 - DCFL GaAs MESFET Gate * Taken from macspice3f4 * * Removed: jsdf = 0 in modelcards vdd 1 0 dc 3 vin 3 0 dc 0 z1 2 3 0 enha l=1u w=10u z2 1 2 2 depl l=1u w=10u .model enha nmf level=2 rd=31 rs=31 vto=0.1 .model depl nmf level=2 rd=31 rs=31 vto=-1.0 .options noacct .dc vin 0 3.0 0.05 .print DC V(2) .end ngspice-26/tests/mesa/mesa14.out0000644000265600020320000000443512264261473016151 0ustar andreasadmin No. of Data Rows : 61 Circuit: * MESA1 - DCFL GaAs MESFET Gate Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 * MESA1 - DCFL GaAs MESFET Gate -------------------------------------------------------------------------------- Index v-sweep v(2) -------------------------------------------------------------------------------- 0 0.000000e+00 2.992148e+00 1 5.000000e-02 2.986117e+00 2 1.000000e-01 2.978089e+00 3 1.500000e-01 2.968344e+00 4 2.000000e-01 2.957064e+00 5 2.500000e-01 2.944286e+00 6 3.000000e-01 2.929989e+00 7 3.500000e-01 2.914359e+00 8 4.000000e-01 2.898823e+00 9 4.500000e-01 2.886783e+00 10 5.000000e-01 2.879374e+00 11 5.500000e-01 2.875031e+00 12 6.000000e-01 2.872467e+00 13 6.500000e-01 2.870977e+00 14 7.000000e-01 2.870188e+00 15 7.500000e-01 2.869878e+00 16 8.000000e-01 2.869932e+00 17 8.500000e-01 2.870249e+00 18 9.000000e-01 2.870769e+00 19 9.500000e-01 2.871450e+00 20 1.000000e+00 2.872259e+00 21 1.050000e+00 2.873172e+00 22 1.100000e+00 2.874171e+00 23 1.150000e+00 2.875241e+00 24 1.200000e+00 2.876369e+00 25 1.250000e+00 2.877545e+00 26 1.300000e+00 2.878763e+00 27 1.350000e+00 2.880015e+00 28 1.400000e+00 2.881295e+00 29 1.450000e+00 2.882599e+00 30 1.500000e+00 2.883922e+00 31 1.550000e+00 2.885262e+00 32 1.600000e+00 2.886614e+00 33 1.650000e+00 2.887978e+00 34 1.700000e+00 2.889349e+00 35 1.750000e+00 2.890728e+00 36 1.800000e+00 2.892110e+00 37 1.850000e+00 2.893497e+00 38 1.900000e+00 2.894884e+00 39 1.950000e+00 2.896273e+00 40 2.000000e+00 2.897662e+00 41 2.050000e+00 2.899049e+00 42 2.100000e+00 2.900435e+00 43 2.150000e+00 2.901819e+00 44 2.200000e+00 2.903200e+00 45 2.250000e+00 2.904578e+00 46 2.300000e+00 2.905952e+00 47 2.350000e+00 2.907324e+00 48 2.400000e+00 2.908692e+00 49 2.450000e+00 2.910057e+00 50 2.500000e+00 2.911419e+00 51 2.550000e+00 2.912780e+00 52 2.600000e+00 2.914141e+00 53 2.650000e+00 2.915503e+00 54 2.700000e+00 2.916868e+00 Index v-sweep v(2) -------------------------------------------------------------------------------- 55 2.750000e+00 2.918241e+00 56 2.800000e+00 2.919625e+00 57 2.850000e+00 2.921029e+00 58 2.900000e+00 2.922462e+00 59 2.950000e+00 2.923940e+00 60 3.000000e+00 2.925488e+00 ngspice-26/tests/mesa/mesa13.cir0000644000265600020320000000033212264261473016106 0ustar andreasadmin* MESA1 - Gate Leakage Test * Taken from macspice3f4 * z1 0 2 0 mesmod l=1u w=20u vgs 1 0 dc 0 vig 1 2 dc 0 .model mesmod nmf(level=2 rd=31 rs=31 rg=10) .options noacct .dc vgs -3 0.4 0.05 .print vig#branch .end ngspice-26/tests/mesa/mesa21.cir0000644000265600020320000000052312264261473016107 0ustar andreasadmin* Mesa Test * Taken from macspice3f4 z1 3 2 0 mesmod l=1u w=150u vgs 2 0 dc 0 vds 1 0 dc 0 vids 1 3 dc 0 .model mesmod nmf level=3 rdi=2.7 rsi=2.7 mu=0.2 m=2.2 vto=-2.04 + eta=1.5 lambda=0.04 tc=0.001 sigma0=0.02 vsigma=0.1 vsigmat=1.37 + delta=5 beta=0.0085 .options noacct .dc vds 0 4 0.05 vgs -1.5 0.5 0.5 .print vids#branch .end ngspice-26/tests/bsim3/0000755000265600020320000000000012264261714014406 5ustar andreasadminngspice-26/tests/bsim3/tran_sim/0000755000265600020320000000000012264261714016222 5ustar andreasadminngspice-26/tests/bsim3/tran_sim/comparator.cir0000644000265600020320000000207212264261473021073 0ustar andreasadmin*One Bit Comparator. Takes Two Inputs (A and B), and returns Two Ouputs - *node 8 - (high when two signalsare equal) and node 9 (high when A is Larger Then B). * Transient Analysis *circuit description M1 Anot A Vdd Vdd PMOS w=3.6u l=1.2u M2 Anot A 0 0 NMOS w=1.8u l=1.2u M3 Bnot B Vdd Vdd PMOS w=3.6u l=1.2u M4 Bnot B 0 0 NMOS w=1.8u l=1.2u M5 AorBnot 0 Vdd Vdd PMOS w=1.8u l=3.6u M6 AorBnot B 1 0 NMOS w=1.8u l=1.2u M7 1 Anot 0 0 NMOS w=1.8u l=1.2u M8 Lnot 0 Vdd Vdd PMOS w=1.8u l=3.6u M9 Lnot Bnot 2 0 NMOS w=1.8u l=1.2u M10 2 A 0 0 NMOS w=1.8u l=1.2u M11 Qnot 0 Vdd Vdd PMOS w=3.6u l=3.6u M12 Qnot AorBnot 3 0 NMOS w=1.8u l=1.2u M13 3 Lnot 0 0 NMOS w=1.8u l=1.2u MQLO 8 Qnot Vdd Vdd PMOS w=3.6u l=1.2u MQL1 8 Qnot 0 0 NMOS w=1.8u l=1.2u MLTO 9 Lnot Vdd Vdd PMOS w=3.6u l=1.2u MLT1 9 Lnot 0 0 NMOS w=1.8u l=1.2u CQ Qnot 0 30f CL Lnot 0 10f Vdd Vdd 0 5 Va A 0 pulse 0 5 10ns .1ns .1ns 15ns 30ns Vb B 0 0 .model nmos nmos level=8 version=3.2.2 .model pmos pmos level=8 version=3.2.2 * transient analysis .tran 1ns 60ns .options noacct .print tran a b v(9) v(8) .END ngspice-26/tests/bsim3/tran_sim/comparator.out0000644000265600020320000003475612264261473021143 0ustar andreasadmin Circuit: *one bit comparator. takes two inputs (a and b), and returns two ouputs - Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. No. of Data Rows : 152 *one bit comparator. takes two inputs (a and b), and returns two ouputs - Transient Analysis Sun May 20 11:17:32 2012 -------------------------------------------------------------------------------- Index time a b v(9) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1.551272e-08 1 6.000000e-12 0.000000e+00 0.000000e+00 1.551272e-08 2 1.200000e-11 0.000000e+00 0.000000e+00 1.551272e-08 3 2.400000e-11 0.000000e+00 0.000000e+00 1.551272e-08 4 4.800000e-11 0.000000e+00 0.000000e+00 1.551272e-08 5 9.600000e-11 0.000000e+00 0.000000e+00 1.551272e-08 6 1.920000e-10 0.000000e+00 0.000000e+00 1.551272e-08 7 3.840000e-10 0.000000e+00 0.000000e+00 1.551272e-08 8 7.680000e-10 0.000000e+00 0.000000e+00 1.551272e-08 9 1.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 10 2.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 11 3.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 12 4.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 13 5.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 14 6.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 15 7.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 16 8.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 17 9.536000e-09 0.000000e+00 0.000000e+00 1.551272e-08 18 1.000000e-08 0.000000e+00 0.000000e+00 1.551272e-08 19 1.001000e-08 5.000000e-01 0.000000e+00 7.358797e-05 20 1.003000e-08 1.500000e+00 0.000000e+00 1.264382e-04 21 1.005722e-08 2.861120e+00 0.000000e+00 2.399046e-04 22 1.008551e-08 4.275584e+00 0.000000e+00 -2.99918e-04 23 1.010000e-08 5.000000e+00 0.000000e+00 -6.21636e-04 24 1.010216e-08 5.000000e+00 0.000000e+00 -7.27980e-04 25 1.010648e-08 5.000000e+00 0.000000e+00 2.283707e-03 26 1.011513e-08 5.000000e+00 0.000000e+00 1.160989e-02 27 1.013241e-08 5.000000e+00 0.000000e+00 2.375281e-03 28 1.014868e-08 5.000000e+00 0.000000e+00 -1.65974e-02 29 1.018120e-08 5.000000e+00 0.000000e+00 -3.23031e-02 30 1.023339e-08 5.000000e+00 0.000000e+00 -3.88900e-02 31 1.029486e-08 5.000000e+00 0.000000e+00 -4.08840e-02 32 1.035750e-08 5.000000e+00 0.000000e+00 -4.29884e-02 33 1.042973e-08 5.000000e+00 0.000000e+00 -4.60477e-02 34 1.050759e-08 5.000000e+00 0.000000e+00 -5.14844e-02 35 1.065121e-08 5.000000e+00 0.000000e+00 -7.18839e-02 36 1.093844e-08 5.000000e+00 0.000000e+00 -1.18104e-01 37 1.119720e-08 5.000000e+00 0.000000e+00 2.878642e+00 38 1.149980e-08 5.000000e+00 0.000000e+00 4.890159e+00 39 1.182510e-08 5.000000e+00 0.000000e+00 4.970425e+00 40 1.214396e-08 5.000000e+00 0.000000e+00 4.985923e+00 41 1.259738e-08 5.000000e+00 0.000000e+00 5.000353e+00 42 1.303769e-08 5.000000e+00 0.000000e+00 4.998355e+00 43 1.351072e-08 5.000000e+00 0.000000e+00 5.001091e+00 44 1.401538e-08 5.000000e+00 0.000000e+00 4.999122e+00 45 1.452640e-08 5.000000e+00 0.000000e+00 5.000682e+00 46 1.552640e-08 5.000000e+00 0.000000e+00 4.999395e+00 47 1.652640e-08 5.000000e+00 0.000000e+00 5.000532e+00 48 1.752640e-08 5.000000e+00 0.000000e+00 4.999529e+00 49 1.852640e-08 5.000000e+00 0.000000e+00 5.000414e+00 50 1.952640e-08 5.000000e+00 0.000000e+00 4.999635e+00 51 2.052640e-08 5.000000e+00 0.000000e+00 5.000321e+00 52 2.152640e-08 5.000000e+00 0.000000e+00 4.999718e+00 53 2.252640e-08 5.000000e+00 0.000000e+00 5.000247e+00 54 2.352640e-08 5.000000e+00 0.000000e+00 4.999779e+00 Index time a b v(9) -------------------------------------------------------------------------------- 55 2.452640e-08 5.000000e+00 0.000000e+00 5.000188e+00 56 2.510000e-08 5.000000e+00 0.000000e+00 4.999851e+00 57 2.511000e-08 4.500000e+00 0.000000e+00 4.993835e+00 58 2.513000e-08 3.500000e+00 0.000000e+00 4.976332e+00 59 2.515910e-08 2.044934e+00 0.000000e+00 4.956555e+00 60 2.518814e-08 5.929105e-01 0.000000e+00 4.969687e+00 61 2.520000e-08 7.625584e-14 0.000000e+00 4.980108e+00 62 2.520270e-08 0.000000e+00 0.000000e+00 4.982421e+00 63 2.520810e-08 0.000000e+00 0.000000e+00 4.987141e+00 64 2.521890e-08 0.000000e+00 0.000000e+00 4.996046e+00 65 2.524051e-08 0.000000e+00 0.000000e+00 5.011597e+00 66 2.527521e-08 0.000000e+00 0.000000e+00 5.020863e+00 67 2.532026e-08 0.000000e+00 0.000000e+00 5.022201e+00 68 2.537818e-08 0.000000e+00 0.000000e+00 5.022652e+00 69 2.544482e-08 0.000000e+00 0.000000e+00 5.023107e+00 70 2.552015e-08 0.000000e+00 0.000000e+00 5.023644e+00 71 2.561892e-08 0.000000e+00 0.000000e+00 5.024350e+00 72 2.571477e-08 0.000000e+00 0.000000e+00 5.025083e+00 73 2.590647e-08 0.000000e+00 0.000000e+00 5.026659e+00 74 2.618401e-08 0.000000e+00 0.000000e+00 5.029323e+00 75 2.673909e-08 0.000000e+00 0.000000e+00 5.036792e+00 76 2.773909e-08 0.000000e+00 0.000000e+00 4.997663e+00 77 2.873909e-08 0.000000e+00 0.000000e+00 1.764052e-01 78 2.948638e-08 0.000000e+00 0.000000e+00 -4.04222e-02 79 3.019313e-08 0.000000e+00 0.000000e+00 5.198824e-02 80 3.108234e-08 0.000000e+00 0.000000e+00 -3.12149e-02 81 3.204346e-08 0.000000e+00 0.000000e+00 3.341410e-02 82 3.284682e-08 0.000000e+00 0.000000e+00 -2.83739e-02 83 3.364606e-08 0.000000e+00 0.000000e+00 2.763249e-02 84 3.464606e-08 0.000000e+00 0.000000e+00 -2.52487e-02 85 3.564586e-08 0.000000e+00 0.000000e+00 2.441324e-02 86 3.655268e-08 0.000000e+00 0.000000e+00 -2.26748e-02 87 3.755268e-08 0.000000e+00 0.000000e+00 2.178840e-02 88 3.855268e-08 0.000000e+00 0.000000e+00 -2.04459e-02 89 3.955268e-08 0.000000e+00 0.000000e+00 1.961104e-02 90 4.000000e-08 3.308722e-13 0.000000e+00 -1.72728e-02 91 4.001000e-08 5.000000e-01 0.000000e+00 -8.82956e-03 92 4.003000e-08 1.500000e+00 0.000000e+00 -2.02206e-04 93 4.005725e-08 2.862644e+00 0.000000e+00 2.403905e-04 94 4.008557e-08 4.278337e+00 0.000000e+00 -3.02074e-04 95 4.010000e-08 5.000000e+00 0.000000e+00 -6.05686e-04 96 4.010216e-08 5.000000e+00 0.000000e+00 -7.14622e-04 97 4.010648e-08 5.000000e+00 0.000000e+00 1.660900e-03 98 4.011512e-08 5.000000e+00 0.000000e+00 1.147421e-02 99 4.013239e-08 5.000000e+00 0.000000e+00 2.826025e-03 100 4.014816e-08 5.000000e+00 0.000000e+00 -1.57438e-02 101 4.017970e-08 5.000000e+00 0.000000e+00 -3.17704e-02 102 4.023139e-08 5.000000e+00 0.000000e+00 -3.87656e-02 103 4.029132e-08 5.000000e+00 0.000000e+00 -4.07631e-02 104 4.035227e-08 5.000000e+00 0.000000e+00 -4.27862e-02 105 4.042238e-08 5.000000e+00 0.000000e+00 -4.56552e-02 106 4.049914e-08 5.000000e+00 0.000000e+00 -5.07108e-02 107 4.063442e-08 5.000000e+00 0.000000e+00 -6.87123e-02 108 4.090498e-08 5.000000e+00 0.000000e+00 -1.27364e-01 109 4.118542e-08 5.000000e+00 0.000000e+00 2.693279e+00 110 4.150890e-08 5.000000e+00 0.000000e+00 4.886666e+00 111 4.184349e-08 5.000000e+00 0.000000e+00 4.975119e+00 112 4.217562e-08 5.000000e+00 0.000000e+00 4.985452e+00 Index time a b v(9) -------------------------------------------------------------------------------- 113 4.262513e-08 5.000000e+00 0.000000e+00 5.001810e+00 114 4.302620e-08 5.000000e+00 0.000000e+00 4.997347e+00 115 4.348234e-08 5.000000e+00 0.000000e+00 5.001819e+00 116 4.397080e-08 5.000000e+00 0.000000e+00 4.998534e+00 117 4.446383e-08 5.000000e+00 0.000000e+00 5.001145e+00 118 4.544988e-08 5.000000e+00 0.000000e+00 4.998980e+00 119 4.644988e-08 5.000000e+00 0.000000e+00 5.000905e+00 120 4.744988e-08 5.000000e+00 0.000000e+00 4.999194e+00 121 4.844988e-08 5.000000e+00 0.000000e+00 5.000715e+00 122 4.944988e-08 5.000000e+00 0.000000e+00 4.999363e+00 123 5.044988e-08 5.000000e+00 0.000000e+00 5.000564e+00 124 5.144988e-08 5.000000e+00 0.000000e+00 4.999488e+00 125 5.244988e-08 5.000000e+00 0.000000e+00 5.000442e+00 126 5.344988e-08 5.000000e+00 0.000000e+00 4.999598e+00 127 5.444988e-08 5.000000e+00 0.000000e+00 5.000346e+00 128 5.510000e-08 5.000000e+00 0.000000e+00 4.999712e+00 129 5.511000e-08 4.500000e+00 0.000000e+00 4.993730e+00 130 5.513000e-08 3.500000e+00 0.000000e+00 4.976277e+00 131 5.515910e-08 2.044934e+00 0.000000e+00 4.956534e+00 132 5.518814e-08 5.929107e-01 0.000000e+00 4.969679e+00 133 5.520000e-08 7.625584e-14 0.000000e+00 4.980102e+00 134 5.520270e-08 0.000000e+00 0.000000e+00 4.982416e+00 135 5.520810e-08 0.000000e+00 0.000000e+00 4.987137e+00 136 5.521890e-08 0.000000e+00 0.000000e+00 4.996043e+00 137 5.524051e-08 0.000000e+00 0.000000e+00 5.011595e+00 138 5.527521e-08 0.000000e+00 0.000000e+00 5.020863e+00 139 5.532026e-08 0.000000e+00 0.000000e+00 5.022201e+00 140 5.537816e-08 0.000000e+00 0.000000e+00 5.022652e+00 141 5.544474e-08 0.000000e+00 0.000000e+00 5.023107e+00 142 5.551984e-08 0.000000e+00 0.000000e+00 5.023642e+00 143 5.561814e-08 0.000000e+00 0.000000e+00 5.024344e+00 144 5.571380e-08 0.000000e+00 0.000000e+00 5.025075e+00 145 5.590513e-08 0.000000e+00 0.000000e+00 5.026647e+00 146 5.618169e-08 0.000000e+00 0.000000e+00 5.029298e+00 147 5.673482e-08 0.000000e+00 0.000000e+00 5.036719e+00 148 5.773482e-08 0.000000e+00 0.000000e+00 4.998901e+00 149 5.873482e-08 0.000000e+00 0.000000e+00 1.780918e-01 150 5.948263e-08 0.000000e+00 0.000000e+00 -4.04690e-02 151 6.000000e-08 0.000000e+00 0.000000e+00 5.392273e-02 *one bit comparator. takes two inputs (a and b), and returns two ouputs - Transient Analysis Sun May 20 11:17:32 2012 -------------------------------------------------------------------------------- Index time v(8) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 1 6.000000e-12 5.000000e+00 2 1.200000e-11 5.000000e+00 3 2.400000e-11 5.000000e+00 4 4.800000e-11 5.000000e+00 5 9.600000e-11 5.000000e+00 6 1.920000e-10 5.000000e+00 7 3.840000e-10 5.000000e+00 8 7.680000e-10 5.000000e+00 9 1.536000e-09 5.000000e+00 10 2.536000e-09 5.000000e+00 11 3.536000e-09 5.000000e+00 12 4.536000e-09 5.000000e+00 13 5.536000e-09 5.000000e+00 14 6.536000e-09 5.000000e+00 15 7.536000e-09 5.000000e+00 16 8.536000e-09 5.000000e+00 17 9.536000e-09 5.000000e+00 18 1.000000e-08 5.000000e+00 19 1.001000e-08 5.000002e+00 20 1.003000e-08 5.000004e+00 21 1.005722e-08 5.000008e+00 22 1.008551e-08 4.999998e+00 23 1.010000e-08 4.999988e+00 24 1.010216e-08 4.999986e+00 25 1.010648e-08 4.999998e+00 26 1.011513e-08 5.000171e+00 27 1.013241e-08 5.000289e+00 28 1.014868e-08 4.999888e+00 29 1.018120e-08 4.999088e+00 30 1.023339e-08 4.998666e+00 31 1.029486e-08 4.999336e+00 32 1.035750e-08 5.000525e+00 33 1.042973e-08 5.001985e+00 34 1.050759e-08 5.003394e+00 35 1.065121e-08 5.006792e+00 36 1.093844e-08 5.027076e+00 37 1.119720e-08 5.043049e+00 38 1.149980e-08 5.050849e+00 39 1.182510e-08 5.064060e+00 40 1.214396e-08 5.065838e+00 41 1.259738e-08 3.325467e+00 42 1.303769e-08 9.070650e-02 43 1.351072e-08 -9.00767e-03 44 1.401538e-08 3.039095e-02 45 1.452640e-08 -1.06601e-02 46 1.552640e-08 1.571297e-02 47 1.652640e-08 -1.28375e-02 48 1.752640e-08 1.260129e-02 49 1.852640e-08 -1.17650e-02 50 1.952640e-08 1.124273e-02 51 2.052640e-08 -1.05920e-02 52 2.152640e-08 1.010074e-02 53 2.252640e-08 -9.52688e-03 54 2.352640e-08 9.070664e-03 Index time v(8) -------------------------------------------------------------------------------- 55 2.452640e-08 -8.56775e-03 56 2.510000e-08 7.849778e-03 57 2.511000e-08 4.757718e-03 58 2.513000e-08 1.014496e-03 59 2.515910e-08 3.435330e-05 60 2.518814e-08 3.317759e-06 61 2.520000e-08 2.253207e-07 62 2.520270e-08 -3.82769e-07 63 2.520810e-08 -1.61625e-06 64 2.521890e-08 -2.95493e-06 65 2.524051e-08 -2.53001e-06 66 2.527521e-08 -1.86803e-07 67 2.532026e-08 1.346923e-06 68 2.537818e-08 2.423614e-06 69 2.544482e-08 2.341825e-06 70 2.552015e-08 2.139331e-06 71 2.561892e-08 1.708000e-06 72 2.571477e-08 1.380167e-06 73 2.590647e-08 9.062486e-07 74 2.618401e-08 5.416582e-07 75 2.673909e-08 2.270486e-07 76 2.773909e-08 -1.77029e-04 77 2.873909e-08 -4.15670e-03 78 2.948638e-08 -1.05218e-02 79 3.019313e-08 -1.79888e-02 80 3.108234e-08 -1.91535e-02 81 3.204346e-08 4.793221e+00 82 3.284682e-08 5.038579e+00 83 3.364606e-08 4.948360e+00 84 3.464606e-08 5.038930e+00 85 3.564586e-08 4.964577e+00 86 3.655268e-08 5.030146e+00 87 3.755268e-08 4.972920e+00 88 3.855268e-08 5.023492e+00 89 3.955268e-08 4.978981e+00 90 4.000000e-08 5.015534e+00 91 4.001000e-08 5.011062e+00 92 4.003000e-08 5.004729e+00 93 4.005725e-08 5.001401e+00 94 4.008557e-08 5.000376e+00 95 4.010000e-08 5.000188e+00 96 4.010216e-08 5.000168e+00 97 4.010648e-08 5.000149e+00 98 4.011512e-08 5.000268e+00 99 4.013239e-08 5.000340e+00 100 4.014816e-08 4.999925e+00 101 4.017970e-08 4.999127e+00 102 4.023139e-08 4.998653e+00 103 4.029132e-08 4.999268e+00 104 4.035227e-08 5.000394e+00 105 4.042238e-08 5.001841e+00 106 4.049914e-08 5.003221e+00 107 4.063442e-08 5.006275e+00 108 4.090498e-08 5.024054e+00 109 4.118542e-08 5.042350e+00 110 4.150890e-08 5.051370e+00 111 4.184349e-08 5.064591e+00 112 4.217562e-08 5.061041e+00 Index time v(8) -------------------------------------------------------------------------------- 113 4.262513e-08 2.956370e+00 114 4.302620e-08 8.209410e-02 115 4.348234e-08 -2.83540e-03 116 4.397080e-08 2.663778e-02 117 4.446383e-08 -6.67235e-03 118 4.544988e-08 1.263384e-02 119 4.644988e-08 -9.78705e-03 120 4.744988e-08 9.731260e-03 121 4.844988e-08 -9.06520e-03 122 4.944988e-08 8.658319e-03 123 5.044988e-08 -8.16573e-03 124 5.144988e-08 7.776513e-03 125 5.244988e-08 -7.34359e-03 126 5.344988e-08 6.997508e-03 127 5.444988e-08 -6.60400e-03 128 5.510000e-08 6.110416e-03 129 5.511000e-08 3.703014e-03 130 5.513000e-08 7.892013e-04 131 5.515910e-08 2.714494e-05 132 5.518814e-08 2.762858e-06 133 5.520000e-08 -3.03793e-07 134 5.520270e-08 -9.39245e-07 135 5.520810e-08 -2.07509e-06 136 5.521890e-08 -3.31119e-06 137 5.524051e-08 -2.82886e-06 138 5.527521e-08 -4.78225e-07 139 5.532026e-08 1.098441e-06 140 5.537816e-08 2.149154e-06 141 5.544474e-08 2.100617e-06 142 5.551984e-08 1.914634e-06 143 5.561814e-08 1.513909e-06 144 5.571380e-08 1.207091e-06 145 5.590513e-08 7.712738e-07 146 5.618169e-08 4.466122e-07 147 5.673482e-08 1.818301e-07 148 5.773482e-08 -1.69622e-04 149 5.873482e-08 -4.12166e-03 150 5.948263e-08 -1.04917e-02 151 6.000000e-08 -1.57601e-02 ngspice-26/tests/bsim3/tran_sim/one-shot.out0000644000265600020320000001361712264261473020521 0ustar andreasadmin Circuit: *one-shot trigger. Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. No. of Data Rows : 117 *one-shot trigger. Transient Analysis Sun May 20 11:17:33 2012 -------------------------------------------------------------------------------- Index time in out -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 5.291376e-01 1 1.000000e-12 0.000000e+00 5.291376e-01 2 2.000000e-12 0.000000e+00 5.291376e-01 3 4.000000e-12 0.000000e+00 5.291376e-01 4 8.000000e-12 0.000000e+00 5.291376e-01 5 1.600000e-11 0.000000e+00 5.291376e-01 6 3.200000e-11 0.000000e+00 5.291376e-01 7 6.400000e-11 0.000000e+00 5.291376e-01 8 1.280000e-10 0.000000e+00 5.291376e-01 9 2.560000e-10 0.000000e+00 5.291376e-01 10 4.560000e-10 0.000000e+00 5.291376e-01 11 6.560000e-10 0.000000e+00 5.291376e-01 12 8.560000e-10 0.000000e+00 5.291376e-01 13 1.000000e-09 0.000000e+00 5.291376e-01 14 1.010000e-09 5.000000e-01 5.405616e-01 15 1.030000e-09 1.500000e+00 5.583218e-01 16 1.059448e-09 2.972385e+00 5.898199e-01 17 1.091570e-09 4.578477e+00 5.594999e-01 18 1.100000e-09 5.000000e+00 5.293138e-01 19 1.101229e-09 5.000000e+00 5.208348e-01 20 1.103688e-09 5.000000e+00 5.044593e-01 21 1.108606e-09 5.000000e+00 4.746635e-01 22 1.118441e-09 5.000000e+00 4.349772e-01 23 1.128967e-09 5.000000e+00 4.024357e-01 24 1.150020e-09 5.000000e+00 3.556934e-01 25 1.192126e-09 5.000000e+00 3.144816e-01 26 1.249292e-09 5.000000e+00 3.086709e-01 27 1.306929e-09 5.000000e+00 2.464986e-01 28 1.376482e-09 5.000000e+00 1.392392e+00 29 1.462803e-09 5.000000e+00 3.779542e+00 30 1.550263e-09 5.000000e+00 4.161930e+00 31 1.672863e-09 5.000000e+00 4.462713e+00 32 1.797234e-09 5.000000e+00 4.656499e+00 33 1.900000e-09 5.000000e+00 4.763483e+00 34 1.903730e-09 4.813487e+00 4.765268e+00 35 1.911191e-09 4.440462e+00 4.768850e+00 36 1.926112e-09 3.694412e+00 4.776099e+00 37 1.955954e-09 2.202312e+00 4.791070e+00 38 1.984795e-09 7.602688e-01 4.810497e+00 39 2.000000e-09 0.000000e+00 4.823555e+00 40 2.003024e-09 0.000000e+00 4.825857e+00 41 2.009071e-09 0.000000e+00 4.830410e+00 42 2.021167e-09 0.000000e+00 4.839233e+00 43 2.045357e-09 0.000000e+00 4.855840e+00 44 2.071760e-09 0.000000e+00 4.872486e+00 45 2.124565e-09 0.000000e+00 4.901682e+00 46 2.205684e-09 0.000000e+00 4.937606e+00 47 2.283146e-09 0.000000e+00 4.963820e+00 48 2.373516e-09 0.000000e+00 4.988284e+00 49 2.507892e-09 0.000000e+00 4.988306e+00 50 2.707892e-09 0.000000e+00 4.746182e+00 51 2.907892e-09 0.000000e+00 4.278394e+00 52 3.107892e-09 0.000000e+00 3.348227e+00 53 3.307892e-09 0.000000e+00 7.785488e-01 54 3.507892e-09 0.000000e+00 5.924831e-01 Index time in out -------------------------------------------------------------------------------- 55 3.707892e-09 0.000000e+00 5.827168e-01 56 3.907892e-09 0.000000e+00 5.607460e-01 57 4.107892e-09 0.000000e+00 5.481847e-01 58 4.307892e-09 0.000000e+00 5.424363e-01 59 4.507892e-09 0.000000e+00 5.362662e-01 60 4.707892e-09 0.000000e+00 5.347730e-01 61 4.907892e-09 0.000000e+00 5.317214e-01 62 5.107892e-09 0.000000e+00 5.315993e-01 63 5.307892e-09 0.000000e+00 5.299793e-01 64 5.507892e-09 0.000000e+00 5.303037e-01 65 5.707892e-09 0.000000e+00 5.293378e-01 66 5.907892e-09 0.000000e+00 5.297211e-01 67 6.000000e-09 0.000000e+00 5.292125e-01 68 6.006716e-09 3.358082e-01 5.372812e-01 69 6.020148e-09 1.007425e+00 5.518192e-01 70 6.038313e-09 1.915664e+00 5.633585e-01 71 6.057628e-09 2.881398e+00 5.924524e-01 72 6.087217e-09 4.360860e+00 5.750006e-01 73 6.100000e-09 5.000000e+00 5.306883e-01 74 6.101834e-09 5.000000e+00 5.179135e-01 75 6.105502e-09 5.000000e+00 4.938070e-01 76 6.112838e-09 5.000000e+00 4.544708e-01 77 6.122920e-09 5.000000e+00 4.199652e-01 78 6.143084e-09 5.000000e+00 3.681785e-01 79 6.183412e-09 5.000000e+00 3.180646e-01 80 6.233501e-09 5.000000e+00 3.102138e-01 81 6.284641e-09 5.000000e+00 2.720592e-01 82 6.345165e-09 5.000000e+00 6.368034e-01 83 6.429289e-09 5.000000e+00 3.216275e+00 84 6.521060e-09 5.000000e+00 4.049430e+00 85 6.640930e-09 5.000000e+00 4.390475e+00 86 6.760054e-09 5.000000e+00 4.602352e+00 87 6.900000e-09 5.000000e+00 4.761280e+00 88 6.904960e-09 4.751984e+00 4.763684e+00 89 6.914881e-09 4.255952e+00 4.768518e+00 90 6.934722e-09 3.263888e+00 4.778493e+00 91 6.961647e-09 1.917632e+00 4.792740e+00 92 6.988591e-09 5.704493e-01 4.811718e+00 93 7.000000e-09 9.047450e-15 4.820931e+00 94 7.003223e-09 0.000000e+00 4.823427e+00 95 7.009670e-09 0.000000e+00 4.828348e+00 96 7.022562e-09 0.000000e+00 4.837828e+00 97 7.048348e-09 0.000000e+00 4.855580e+00 98 7.074833e-09 0.000000e+00 4.872277e+00 99 7.127805e-09 0.000000e+00 4.901553e+00 100 7.204126e-09 0.000000e+00 4.935582e+00 101 7.284639e-09 0.000000e+00 4.963150e+00 102 7.374021e-09 0.000000e+00 4.986811e+00 103 7.510962e-09 0.000000e+00 4.990312e+00 104 7.710962e-09 0.000000e+00 4.755488e+00 105 7.910962e-09 0.000000e+00 4.291547e+00 106 8.110962e-09 0.000000e+00 3.436332e+00 107 8.310962e-09 0.000000e+00 7.951471e-01 108 8.510962e-09 0.000000e+00 5.908152e-01 109 8.710962e-09 0.000000e+00 5.844877e-01 110 8.910962e-09 0.000000e+00 5.604087e-01 111 9.110962e-09 0.000000e+00 5.489690e-01 112 9.310962e-09 0.000000e+00 5.421376e-01 Index time in out -------------------------------------------------------------------------------- 113 9.510962e-09 0.000000e+00 5.367402e-01 114 9.710962e-09 0.000000e+00 5.345078e-01 115 9.910962e-09 0.000000e+00 5.320381e-01 116 1.000000e-08 0.000000e+00 5.319482e-01 ngspice-26/tests/bsim3/tran_sim/Makefile.am0000644000265600020320000000042212264261473020256 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = comparator.cir \ one-shot.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3/tran_sim/Makefile.in0000644000265600020320000003357412264261541020301 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3/tran_sim DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = comparator.cir \ one-shot.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3/tran_sim/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3/tran_sim/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3/tran_sim/one-shot.cir0000644000265600020320000000177212264261473020466 0ustar andreasadmin*One-shot Trigger. *This cicruit generates a pulse of a predetermined width *triggered by an input event. BSIM3 test. *A two-gate delay element Md1 4 in Vdd Vdd PMOS w=3.6u l=1.2u Md2 4 in 0 0 NMOS w=1.8u l=1.2u c4 4 0 30f Md3 A 4 Vdd Vdd PMOS w=3.6u l=1.2u Md4 A 4 0 0 NMOS w=1.8u l=1.2u ca a 0 30f *EXOR gate *A inverter M1 Anot A Vdd Vdd PMOS w=3.6u l=1.2u M2 Anot A 0 0 NMOS w=1.8u l=1.2u M3 Bnot in Vdd Vdd PMOS w=3.6u l=1.2u M4 Bnot in 0 0 NMOS w=1.8u l=1.2u M5 AorBnot 0 Vdd Vdd PMOS w=1.8u l=3.6u M6 AorBnot in 1 0 NMOS w=1.8u l=1.2u M7 1 Anot 0 0 NMOS w=1.8u l=1.2u M8 Lnot 0 Vdd Vdd PMOS w=1.8u l=3.6u M9 Lnot Bnot 2 0 NMOS w=1.8u l=1.2u M10 2 A 0 0 NMOS w=1.8u l=1.2u M11 out 0 Vdd Vdd PMOS w=3.6u l=3.6u M12 out AorBnot 3 0 NMOS w=1.8u l=1.2u M13 3 Lnot 0 0 NMOS w=1.8u l=1.2u *end of EXOR gate Vcc vdd 0 5 vin in 0 pulse 0 5 1ns .1ns .1ns .8ns 5ns .model nmos nmos level=8 version=3.2.2 .model pmos pmos level=8 version=3.2.2 .tran 1ns 10ns .print tran in out .options noacct .END ngspice-26/tests/bsim3/dc_sim/0000755000265600020320000000000012264261714015644 5ustar andreasadminngspice-26/tests/bsim3/dc_sim/test7.out0000644000265600020320000005474312264261473017462 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Date: Tue Apr 20 23:14:08 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** DCtransferCurve Tue Apr 20 23:14:07 1999 ------------------------------------------------------------------------------- Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e-01 -5.89916e-08 1 5.000000e-02 1.000000e-01 -1.58191e-07 2 1.000000e-01 1.000000e-01 -4.14281e-07 3 1.500000e-01 1.000000e-01 -1.05536e-06 4 2.000000e-01 1.000000e-01 -2.60619e-06 5 2.500000e-01 1.000000e-01 -6.15713e-06 6 3.000000e-01 1.000000e-01 -1.34361e-05 7 3.500000e-01 1.000000e-01 -2.58519e-05 8 4.000000e-01 1.000000e-01 -4.28220e-05 9 4.500000e-01 1.000000e-01 -6.20487e-05 10 5.000000e-01 1.000000e-01 -8.14040e-05 11 5.500000e-01 1.000000e-01 -9.97265e-05 12 6.000000e-01 1.000000e-01 -1.16613e-04 13 6.500000e-01 1.000000e-01 -1.32053e-04 14 7.000000e-01 1.000000e-01 -1.46185e-04 15 7.500000e-01 1.000000e-01 -1.59177e-04 16 8.000000e-01 1.000000e-01 -1.71184e-04 17 8.500000e-01 1.000000e-01 -1.82335e-04 18 9.000000e-01 1.000000e-01 -1.92733e-04 19 9.500000e-01 1.000000e-01 -2.02462e-04 20 1.000000e+00 1.000000e-01 -2.11589e-04 21 1.050000e+00 1.000000e-01 -2.20170e-04 22 1.100000e+00 1.000000e-01 -2.28252e-04 23 1.150000e+00 1.000000e-01 -2.35876e-04 24 1.200000e+00 1.000000e-01 -2.43077e-04 25 1.250000e+00 1.000000e-01 -2.49886e-04 26 1.300000e+00 1.000000e-01 -2.56333e-04 27 1.350000e+00 1.000000e-01 -2.62441e-04 28 1.400000e+00 1.000000e-01 -2.68235e-04 29 1.450000e+00 1.000000e-01 -2.73734e-04 30 1.500000e+00 1.000000e-01 -2.78959e-04 31 1.550000e+00 1.000000e-01 -2.83925e-04 32 1.600000e+00 1.000000e-01 -2.88651e-04 33 1.650000e+00 1.000000e-01 -2.93149e-04 34 1.700000e+00 1.000000e-01 -2.97434e-04 35 1.750000e+00 1.000000e-01 -3.01518e-04 36 1.800000e+00 1.000000e-01 -3.05412e-04 37 1.850000e+00 1.000000e-01 -3.09129e-04 38 1.900000e+00 1.000000e-01 -3.12676e-04 39 1.950000e+00 1.000000e-01 -3.16065e-04 40 2.000000e+00 1.000000e-01 -3.19303e-04 41 2.050000e+00 1.000000e-01 -3.22397e-04 42 2.100000e+00 1.000000e-01 -3.25357e-04 43 2.150000e+00 1.000000e-01 -3.28189e-04 44 2.200000e+00 1.000000e-01 -3.30898e-04 45 2.250000e+00 1.000000e-01 -3.33492e-04 46 2.300000e+00 1.000000e-01 -3.35976e-04 47 2.350000e+00 1.000000e-01 -3.38355e-04 48 2.400000e+00 1.000000e-01 -3.40634e-04 49 2.450000e+00 1.000000e-01 -3.42819e-04 50 2.500000e+00 1.000000e-01 -3.44912e-04 51 2.550000e+00 1.000000e-01 -3.46919e-04 52 2.600000e+00 1.000000e-01 -3.48844e-04 53 2.650000e+00 1.000000e-01 -3.50690e-04 54 2.700000e+00 1.000000e-01 -3.52460e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 55 2.750000e+00 1.000000e-01 -3.54159e-04 56 2.800000e+00 1.000000e-01 -3.55788e-04 57 2.850000e+00 1.000000e-01 -3.57351e-04 58 2.900000e+00 1.000000e-01 -3.58851e-04 59 2.950000e+00 1.000000e-01 -3.60290e-04 60 3.000000e+00 1.000000e-01 -3.61671e-04 61 3.050000e+00 1.000000e-01 -3.62996e-04 62 3.100000e+00 1.000000e-01 -3.64268e-04 63 3.150000e+00 1.000000e-01 -3.65488e-04 64 3.200000e+00 1.000000e-01 -3.66659e-04 65 3.250000e+00 1.000000e-01 -3.67782e-04 66 3.300000e+00 1.000000e-01 -3.68859e-04 67 3.350000e+00 1.000000e-01 -3.69893e-04 68 3.400000e+00 1.000000e-01 -3.70884e-04 69 3.450000e+00 1.000000e-01 -3.71834e-04 70 3.500000e+00 1.000000e-01 -3.72745e-04 71 0.000000e+00 1.000000e-01 -5.88943e-09 72 5.000000e-02 1.000000e-01 -1.74638e-08 73 1.000000e-01 1.000000e-01 -5.10678e-08 74 1.500000e-01 1.000000e-01 -1.46238e-07 75 2.000000e-01 1.000000e-01 -4.07021e-07 76 2.500000e-01 1.000000e-01 -1.09468e-06 77 3.000000e-01 1.000000e-01 -2.82761e-06 78 3.500000e-01 1.000000e-01 -6.87430e-06 79 4.000000e-01 1.000000e-01 -1.50254e-05 80 4.500000e-01 1.000000e-01 -2.81528e-05 81 5.000000e-01 1.000000e-01 -4.48942e-05 82 5.500000e-01 1.000000e-01 -6.29390e-05 83 6.000000e-01 1.000000e-01 -8.06505e-05 84 6.500000e-01 1.000000e-01 -9.72908e-05 85 7.000000e-01 1.000000e-01 -1.12674e-04 86 7.500000e-01 1.000000e-01 -1.26855e-04 87 8.000000e-01 1.000000e-01 -1.39965e-04 88 8.500000e-01 1.000000e-01 -1.52139e-04 89 9.000000e-01 1.000000e-01 -1.63491e-04 90 9.500000e-01 1.000000e-01 -1.74119e-04 91 1.000000e+00 1.000000e-01 -1.84096e-04 92 1.050000e+00 1.000000e-01 -1.93487e-04 93 1.100000e+00 1.000000e-01 -2.02343e-04 94 1.150000e+00 1.000000e-01 -2.10707e-04 95 1.200000e+00 1.000000e-01 -2.18617e-04 96 1.250000e+00 1.000000e-01 -2.26107e-04 97 1.300000e+00 1.000000e-01 -2.33207e-04 98 1.350000e+00 1.000000e-01 -2.39944e-04 99 1.400000e+00 1.000000e-01 -2.46341e-04 100 1.450000e+00 1.000000e-01 -2.52421e-04 101 1.500000e+00 1.000000e-01 -2.58205e-04 102 1.550000e+00 1.000000e-01 -2.63709e-04 103 1.600000e+00 1.000000e-01 -2.68953e-04 104 1.650000e+00 1.000000e-01 -2.73951e-04 105 1.700000e+00 1.000000e-01 -2.78717e-04 106 1.750000e+00 1.000000e-01 -2.83266e-04 107 1.800000e+00 1.000000e-01 -2.87609e-04 108 1.850000e+00 1.000000e-01 -2.91758e-04 109 1.900000e+00 1.000000e-01 -2.95724e-04 110 1.950000e+00 1.000000e-01 -2.99517e-04 111 2.000000e+00 1.000000e-01 -3.03146e-04 112 2.050000e+00 1.000000e-01 -3.06619e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 113 2.100000e+00 1.000000e-01 -3.09945e-04 114 2.150000e+00 1.000000e-01 -3.13130e-04 115 2.200000e+00 1.000000e-01 -3.16183e-04 116 2.250000e+00 1.000000e-01 -3.19109e-04 117 2.300000e+00 1.000000e-01 -3.21915e-04 118 2.350000e+00 1.000000e-01 -3.24607e-04 119 2.400000e+00 1.000000e-01 -3.27189e-04 120 2.450000e+00 1.000000e-01 -3.29667e-04 121 2.500000e+00 1.000000e-01 -3.32046e-04 122 2.550000e+00 1.000000e-01 -3.34331e-04 123 2.600000e+00 1.000000e-01 -3.36525e-04 124 2.650000e+00 1.000000e-01 -3.38632e-04 125 2.700000e+00 1.000000e-01 -3.40656e-04 126 2.750000e+00 1.000000e-01 -3.42602e-04 127 2.800000e+00 1.000000e-01 -3.44471e-04 128 2.850000e+00 1.000000e-01 -3.46268e-04 129 2.900000e+00 1.000000e-01 -3.47996e-04 130 2.950000e+00 1.000000e-01 -3.49656e-04 131 3.000000e+00 1.000000e-01 -3.51253e-04 132 3.050000e+00 1.000000e-01 -3.52788e-04 133 3.100000e+00 1.000000e-01 -3.54264e-04 134 3.150000e+00 1.000000e-01 -3.55684e-04 135 3.200000e+00 1.000000e-01 -3.57048e-04 136 3.250000e+00 1.000000e-01 -3.58361e-04 137 3.300000e+00 1.000000e-01 -3.59623e-04 138 3.350000e+00 1.000000e-01 -3.60836e-04 139 3.400000e+00 1.000000e-01 -3.62003e-04 140 3.450000e+00 1.000000e-01 -3.63125e-04 141 3.500000e+00 1.000000e-01 -3.64203e-04 142 0.000000e+00 1.000000e-01 -7.27591e-10 143 5.000000e-02 1.000000e-01 -2.28198e-09 144 1.000000e-01 1.000000e-01 -7.11597e-09 145 1.500000e-01 1.000000e-01 -2.19551e-08 146 2.000000e-01 1.000000e-01 -6.65729e-08 147 2.500000e-01 1.000000e-01 -1.96700e-07 148 3.000000e-01 1.000000e-01 -5.61471e-07 149 3.500000e-01 1.000000e-01 -1.53811e-06 150 4.000000e-01 1.000000e-01 -3.99717e-06 151 4.500000e-01 1.000000e-01 -9.51412e-06 152 5.000000e-01 1.000000e-01 -1.96177e-05 153 5.500000e-01 1.000000e-01 -3.39961e-05 154 6.000000e-01 1.000000e-01 -5.06012e-05 155 6.500000e-01 1.000000e-01 -6.75190e-05 156 7.000000e-01 1.000000e-01 -8.37241e-05 157 7.500000e-01 1.000000e-01 -9.88609e-05 158 8.000000e-01 1.000000e-01 -1.12903e-04 159 8.500000e-01 1.000000e-01 -1.25941e-04 160 9.000000e-01 1.000000e-01 -1.38091e-04 161 9.500000e-01 1.000000e-01 -1.49460e-04 162 1.000000e+00 1.000000e-01 -1.60133e-04 163 1.050000e+00 1.000000e-01 -1.70182e-04 164 1.100000e+00 1.000000e-01 -1.79664e-04 165 1.150000e+00 1.000000e-01 -1.88629e-04 166 1.200000e+00 1.000000e-01 -1.97115e-04 167 1.250000e+00 1.000000e-01 -2.05160e-04 168 1.300000e+00 1.000000e-01 -2.12793e-04 169 1.350000e+00 1.000000e-01 -2.20044e-04 170 1.400000e+00 1.000000e-01 -2.26937e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e-01 -2.33495e-04 172 1.500000e+00 1.000000e-01 -2.39739e-04 173 1.550000e+00 1.000000e-01 -2.45689e-04 174 1.600000e+00 1.000000e-01 -2.51363e-04 175 1.650000e+00 1.000000e-01 -2.56776e-04 176 1.700000e+00 1.000000e-01 -2.61943e-04 177 1.750000e+00 1.000000e-01 -2.66880e-04 178 1.800000e+00 1.000000e-01 -2.71598e-04 179 1.850000e+00 1.000000e-01 -2.76111e-04 180 1.900000e+00 1.000000e-01 -2.80428e-04 181 1.950000e+00 1.000000e-01 -2.84561e-04 182 2.000000e+00 1.000000e-01 -2.88519e-04 183 2.050000e+00 1.000000e-01 -2.92311e-04 184 2.100000e+00 1.000000e-01 -2.95946e-04 185 2.150000e+00 1.000000e-01 -2.99432e-04 186 2.200000e+00 1.000000e-01 -3.02775e-04 187 2.250000e+00 1.000000e-01 -3.05984e-04 188 2.300000e+00 1.000000e-01 -3.09064e-04 189 2.350000e+00 1.000000e-01 -3.12021e-04 190 2.400000e+00 1.000000e-01 -3.14862e-04 191 2.450000e+00 1.000000e-01 -3.17591e-04 192 2.500000e+00 1.000000e-01 -3.20214e-04 193 2.550000e+00 1.000000e-01 -3.22735e-04 194 2.600000e+00 1.000000e-01 -3.25159e-04 195 2.650000e+00 1.000000e-01 -3.27491e-04 196 2.700000e+00 1.000000e-01 -3.29734e-04 197 2.750000e+00 1.000000e-01 -3.31891e-04 198 2.800000e+00 1.000000e-01 -3.33968e-04 199 2.850000e+00 1.000000e-01 -3.35966e-04 200 2.900000e+00 1.000000e-01 -3.37889e-04 201 2.950000e+00 1.000000e-01 -3.39741e-04 202 3.000000e+00 1.000000e-01 -3.41524e-04 203 3.050000e+00 1.000000e-01 -3.43240e-04 204 3.100000e+00 1.000000e-01 -3.44893e-04 205 3.150000e+00 1.000000e-01 -3.46485e-04 206 3.200000e+00 1.000000e-01 -3.48018e-04 207 3.250000e+00 1.000000e-01 -3.49495e-04 208 3.300000e+00 1.000000e-01 -3.50917e-04 209 3.350000e+00 1.000000e-01 -3.52287e-04 210 3.400000e+00 1.000000e-01 -3.53606e-04 211 3.450000e+00 1.000000e-01 -3.54877e-04 212 3.500000e+00 1.000000e-01 -3.56101e-04 213 0.000000e+00 1.000000e-01 -1.08881e-10 214 5.000000e-02 1.000000e-01 -3.50900e-10 215 1.000000e-01 1.000000e-01 -1.13565e-09 216 1.500000e-01 1.000000e-01 -3.66466e-09 217 2.000000e-01 1.000000e-01 -1.17293e-08 218 2.500000e-01 1.000000e-01 -3.69972e-08 219 3.000000e-01 1.000000e-01 -1.14020e-07 220 3.500000e-01 1.000000e-01 -3.39920e-07 221 4.000000e-01 1.000000e-01 -9.71888e-07 222 4.500000e-01 1.000000e-01 -2.64123e-06 223 5.000000e-01 1.000000e-01 -6.64674e-06 224 5.500000e-01 1.000000e-01 -1.46673e-05 225 6.000000e-01 1.000000e-01 -2.71141e-05 226 6.500000e-01 1.000000e-01 -4.23692e-05 227 7.000000e-01 1.000000e-01 -5.84375e-05 228 7.500000e-01 1.000000e-01 -7.41003e-05 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 229 8.000000e-01 1.000000e-01 -8.88683e-05 230 8.500000e-01 1.000000e-01 -1.02645e-04 231 9.000000e-01 1.000000e-01 -1.15487e-04 232 9.500000e-01 1.000000e-01 -1.27492e-04 233 1.000000e+00 1.000000e-01 -1.38757e-04 234 1.050000e+00 1.000000e-01 -1.49360e-04 235 1.100000e+00 1.000000e-01 -1.59368e-04 236 1.150000e+00 1.000000e-01 -1.68834e-04 237 1.200000e+00 1.000000e-01 -1.77803e-04 238 1.250000e+00 1.000000e-01 -1.86311e-04 239 1.300000e+00 1.000000e-01 -1.94392e-04 240 1.350000e+00 1.000000e-01 -2.02075e-04 241 1.400000e+00 1.000000e-01 -2.09386e-04 242 1.450000e+00 1.000000e-01 -2.16349e-04 243 1.500000e+00 1.000000e-01 -2.22984e-04 244 1.550000e+00 1.000000e-01 -2.29313e-04 245 1.600000e+00 1.000000e-01 -2.35353e-04 246 1.650000e+00 1.000000e-01 -2.41121e-04 247 1.700000e+00 1.000000e-01 -2.46632e-04 248 1.750000e+00 1.000000e-01 -2.51902e-04 249 1.800000e+00 1.000000e-01 -2.56943e-04 250 1.850000e+00 1.000000e-01 -2.61769e-04 251 1.900000e+00 1.000000e-01 -2.66389e-04 252 1.950000e+00 1.000000e-01 -2.70816e-04 253 2.000000e+00 1.000000e-01 -2.75060e-04 254 2.050000e+00 1.000000e-01 -2.79129e-04 255 2.100000e+00 1.000000e-01 -2.83033e-04 256 2.150000e+00 1.000000e-01 -2.86780e-04 257 2.200000e+00 1.000000e-01 -2.90377e-04 258 2.250000e+00 1.000000e-01 -2.93832e-04 259 2.300000e+00 1.000000e-01 -2.97151e-04 260 2.350000e+00 1.000000e-01 -3.00342e-04 261 2.400000e+00 1.000000e-01 -3.03409e-04 262 2.450000e+00 1.000000e-01 -3.06358e-04 263 2.500000e+00 1.000000e-01 -3.09195e-04 264 2.550000e+00 1.000000e-01 -3.11925e-04 265 2.600000e+00 1.000000e-01 -3.14553e-04 266 2.650000e+00 1.000000e-01 -3.17082e-04 267 2.700000e+00 1.000000e-01 -3.19517e-04 268 2.750000e+00 1.000000e-01 -3.21862e-04 269 2.800000e+00 1.000000e-01 -3.24121e-04 270 2.850000e+00 1.000000e-01 -3.26298e-04 271 2.900000e+00 1.000000e-01 -3.28395e-04 272 2.950000e+00 1.000000e-01 -3.30416e-04 273 3.000000e+00 1.000000e-01 -3.32364e-04 274 3.050000e+00 1.000000e-01 -3.34242e-04 275 3.100000e+00 1.000000e-01 -3.36052e-04 276 3.150000e+00 1.000000e-01 -3.37797e-04 277 3.200000e+00 1.000000e-01 -3.39481e-04 278 3.250000e+00 1.000000e-01 -3.41104e-04 279 3.300000e+00 1.000000e-01 -3.42669e-04 280 3.350000e+00 1.000000e-01 -3.44178e-04 281 3.400000e+00 1.000000e-01 -3.45634e-04 282 3.450000e+00 1.000000e-01 -3.47038e-04 283 3.500000e+00 1.000000e-01 -3.48393e-04 284 0.000000e+00 1.000000e-01 -2.04246e-11 285 5.000000e-02 1.000000e-01 -6.33128e-11 286 1.000000e-01 1.000000e-01 -2.06363e-10 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 287 1.500000e-01 1.000000e-01 -6.82125e-10 288 2.000000e-01 1.000000e-01 -2.25631e-09 289 2.500000e-01 1.000000e-01 -7.41786e-09 290 3.000000e-01 1.000000e-01 -2.40810e-08 291 3.500000e-01 1.000000e-01 -7.65381e-08 292 4.000000e-01 1.000000e-01 -2.35655e-07 293 4.500000e-01 1.000000e-01 -6.95719e-07 294 5.000000e-01 1.000000e-01 -1.95202e-06 295 5.500000e-01 1.000000e-01 -5.09781e-06 296 6.000000e-01 1.000000e-01 -1.17755e-05 297 6.500000e-01 1.000000e-01 -2.27907e-05 298 7.000000e-01 1.000000e-01 -3.69083e-05 299 7.500000e-01 1.000000e-01 -5.21684e-05 300 8.000000e-01 1.000000e-01 -6.72527e-05 301 8.500000e-01 1.000000e-01 -8.15862e-05 302 9.000000e-01 1.000000e-01 -9.50219e-05 303 9.500000e-01 1.000000e-01 -1.07590e-04 304 1.000000e+00 1.000000e-01 -1.19375e-04 305 1.050000e+00 1.000000e-01 -1.30460e-04 306 1.100000e+00 1.000000e-01 -1.40920e-04 307 1.150000e+00 1.000000e-01 -1.50815e-04 308 1.200000e+00 1.000000e-01 -1.60194e-04 309 1.250000e+00 1.000000e-01 -1.69097e-04 310 1.300000e+00 1.000000e-01 -1.77560e-04 311 1.350000e+00 1.000000e-01 -1.85613e-04 312 1.400000e+00 1.000000e-01 -1.93282e-04 313 1.450000e+00 1.000000e-01 -2.00592e-04 314 1.500000e+00 1.000000e-01 -2.07566e-04 315 1.550000e+00 1.000000e-01 -2.14222e-04 316 1.600000e+00 1.000000e-01 -2.20580e-04 317 1.650000e+00 1.000000e-01 -2.26656e-04 318 1.700000e+00 1.000000e-01 -2.32467e-04 319 1.750000e+00 1.000000e-01 -2.38028e-04 320 1.800000e+00 1.000000e-01 -2.43352e-04 321 1.850000e+00 1.000000e-01 -2.48451e-04 322 1.900000e+00 1.000000e-01 -2.53339e-04 323 1.950000e+00 1.000000e-01 -2.58025e-04 324 2.000000e+00 1.000000e-01 -2.62520e-04 325 2.050000e+00 1.000000e-01 -2.66834e-04 326 2.100000e+00 1.000000e-01 -2.70976e-04 327 2.150000e+00 1.000000e-01 -2.74954e-04 328 2.200000e+00 1.000000e-01 -2.78776e-04 329 2.250000e+00 1.000000e-01 -2.82450e-04 330 2.300000e+00 1.000000e-01 -2.85982e-04 331 2.350000e+00 1.000000e-01 -2.89380e-04 332 2.400000e+00 1.000000e-01 -2.92649e-04 333 2.450000e+00 1.000000e-01 -2.95795e-04 334 2.500000e+00 1.000000e-01 -2.98824e-04 335 2.550000e+00 1.000000e-01 -3.01741e-04 336 2.600000e+00 1.000000e-01 -3.04550e-04 337 2.650000e+00 1.000000e-01 -3.07257e-04 338 2.700000e+00 1.000000e-01 -3.09865e-04 339 2.750000e+00 1.000000e-01 -3.12379e-04 340 2.800000e+00 1.000000e-01 -3.14802e-04 341 2.850000e+00 1.000000e-01 -3.17139e-04 342 2.900000e+00 1.000000e-01 -3.19393e-04 343 2.950000e+00 1.000000e-01 -3.21567e-04 344 3.000000e+00 1.000000e-01 -3.23664e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 345 3.050000e+00 1.000000e-01 -3.25688e-04 346 3.100000e+00 1.000000e-01 -3.27640e-04 347 3.150000e+00 1.000000e-01 -3.29525e-04 348 3.200000e+00 1.000000e-01 -3.31344e-04 349 3.250000e+00 1.000000e-01 -3.33100e-04 350 3.300000e+00 1.000000e-01 -3.34795e-04 351 3.350000e+00 1.000000e-01 -3.36431e-04 352 3.400000e+00 1.000000e-01 -3.38011e-04 353 3.450000e+00 1.000000e-01 -3.39537e-04 354 3.500000e+00 1.000000e-01 -3.41010e-04 355 0.000000e+00 1.000000e-01 -6.12720e-12 356 5.000000e-02 1.000000e-01 -1.46004e-11 357 1.000000e-01 1.000000e-01 -4.34602e-11 358 1.500000e-01 1.000000e-01 -1.41622e-10 359 2.000000e-01 1.000000e-01 -4.74662e-10 360 2.500000e-01 1.000000e-01 -1.59943e-09 361 3.000000e-01 1.000000e-01 -5.36706e-09 362 3.500000e-01 1.000000e-01 -1.78087e-08 363 4.000000e-01 1.000000e-01 -5.79317e-08 364 4.500000e-01 1.000000e-01 -1.82734e-07 365 5.000000e-01 1.000000e-01 -5.52602e-07 366 5.500000e-01 1.000000e-01 -1.58685e-06 367 6.000000e-01 1.000000e-01 -4.24832e-06 368 6.500000e-01 1.000000e-01 -1.01036e-05 369 7.000000e-01 1.000000e-01 -2.01344e-05 370 7.500000e-01 1.000000e-01 -3.33607e-05 371 8.000000e-01 1.000000e-01 -4.79023e-05 372 8.500000e-01 1.000000e-01 -6.24151e-05 373 9.000000e-01 1.000000e-01 -7.62855e-05 374 9.500000e-01 1.000000e-01 -8.93387e-05 375 1.000000e+00 1.000000e-01 -1.01587e-04 376 1.050000e+00 1.000000e-01 -1.13103e-04 377 1.100000e+00 1.000000e-01 -1.23961e-04 378 1.150000e+00 1.000000e-01 -1.34230e-04 379 1.200000e+00 1.000000e-01 -1.43965e-04 380 1.250000e+00 1.000000e-01 -1.53210e-04 381 1.300000e+00 1.000000e-01 -1.62002e-04 382 1.350000e+00 1.000000e-01 -1.70375e-04 383 1.400000e+00 1.000000e-01 -1.78355e-04 384 1.450000e+00 1.000000e-01 -1.85967e-04 385 1.500000e+00 1.000000e-01 -1.93234e-04 386 1.550000e+00 1.000000e-01 -2.00177e-04 387 1.600000e+00 1.000000e-01 -2.06813e-04 388 1.650000e+00 1.000000e-01 -2.13160e-04 389 1.700000e+00 1.000000e-01 -2.19236e-04 390 1.750000e+00 1.000000e-01 -2.25053e-04 391 1.800000e+00 1.000000e-01 -2.30627e-04 392 1.850000e+00 1.000000e-01 -2.35970e-04 393 1.900000e+00 1.000000e-01 -2.41094e-04 394 1.950000e+00 1.000000e-01 -2.46010e-04 395 2.000000e+00 1.000000e-01 -2.50730e-04 396 2.050000e+00 1.000000e-01 -2.55262e-04 397 2.100000e+00 1.000000e-01 -2.59617e-04 398 2.150000e+00 1.000000e-01 -2.63803e-04 399 2.200000e+00 1.000000e-01 -2.67827e-04 400 2.250000e+00 1.000000e-01 -2.71697e-04 401 2.300000e+00 1.000000e-01 -2.75422e-04 402 2.350000e+00 1.000000e-01 -2.79006e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 403 2.400000e+00 1.000000e-01 -2.82458e-04 404 2.450000e+00 1.000000e-01 -2.85782e-04 405 2.500000e+00 1.000000e-01 -2.88984e-04 406 2.550000e+00 1.000000e-01 -2.92069e-04 407 2.600000e+00 1.000000e-01 -2.95044e-04 408 2.650000e+00 1.000000e-01 -2.97911e-04 409 2.700000e+00 1.000000e-01 -3.00677e-04 410 2.750000e+00 1.000000e-01 -3.03344e-04 411 2.800000e+00 1.000000e-01 -3.05917e-04 412 2.850000e+00 1.000000e-01 -3.08400e-04 413 2.900000e+00 1.000000e-01 -3.10797e-04 414 2.950000e+00 1.000000e-01 -3.13111e-04 415 3.000000e+00 1.000000e-01 -3.15344e-04 416 3.050000e+00 1.000000e-01 -3.17501e-04 417 3.100000e+00 1.000000e-01 -3.19584e-04 418 3.150000e+00 1.000000e-01 -3.21596e-04 419 3.200000e+00 1.000000e-01 -3.23539e-04 420 3.250000e+00 1.000000e-01 -3.25417e-04 421 3.300000e+00 1.000000e-01 -3.27231e-04 422 3.350000e+00 1.000000e-01 -3.28984e-04 423 3.400000e+00 1.000000e-01 -3.30678e-04 424 3.450000e+00 1.000000e-01 -3.32315e-04 425 3.500000e+00 1.000000e-01 -3.33897e-04 426 0.000000e+00 1.000000e-01 -3.85411e-12 427 5.000000e-02 1.000000e-01 -4.77878e-12 428 1.000000e-01 1.000000e-01 -1.20382e-11 429 1.500000e-01 1.000000e-01 -3.40136e-11 430 2.000000e-01 1.000000e-01 -1.09965e-10 431 2.500000e-01 1.000000e-01 -3.71855e-10 432 3.000000e-01 1.000000e-01 -1.27104e-09 433 3.500000e-01 1.000000e-01 -4.33461e-09 434 4.000000e-01 1.000000e-01 -1.46311e-08 435 4.500000e-01 1.000000e-01 -4.84510e-08 436 5.000000e-01 1.000000e-01 -1.55635e-07 437 5.500000e-01 1.000000e-01 -4.79083e-07 438 6.000000e-01 1.000000e-01 -1.39866e-06 439 6.500000e-01 1.000000e-01 -3.80502e-06 440 7.000000e-01 1.000000e-01 -9.19971e-06 441 7.500000e-01 1.000000e-01 -1.86076e-05 442 8.000000e-01 1.000000e-01 -3.11723e-05 443 8.500000e-01 1.000000e-01 -4.50975e-05 444 9.000000e-01 1.000000e-01 -5.90666e-05 445 9.500000e-01 1.000000e-01 -7.24673e-05 446 1.000000e+00 1.000000e-01 -8.51175e-05 447 1.050000e+00 1.000000e-01 -9.70206e-05 448 1.100000e+00 1.000000e-01 -1.08239e-04 449 1.150000e+00 1.000000e-01 -1.18841e-04 450 1.200000e+00 1.000000e-01 -1.28889e-04 451 1.250000e+00 1.000000e-01 -1.38433e-04 452 1.300000e+00 1.000000e-01 -1.47513e-04 453 1.350000e+00 1.000000e-01 -1.56164e-04 454 1.400000e+00 1.000000e-01 -1.64415e-04 455 1.450000e+00 1.000000e-01 -1.72292e-04 456 1.500000e+00 1.000000e-01 -1.79816e-04 457 1.550000e+00 1.000000e-01 -1.87010e-04 458 1.600000e+00 1.000000e-01 -1.93892e-04 459 1.650000e+00 1.000000e-01 -2.00480e-04 460 1.700000e+00 1.000000e-01 -2.06789e-04 Index sweep v(2) vds#branch ------------------------------------------------------------------------------- 461 1.750000e+00 1.000000e-01 -2.12834e-04 462 1.800000e+00 1.000000e-01 -2.18631e-04 463 1.850000e+00 1.000000e-01 -2.24191e-04 464 1.900000e+00 1.000000e-01 -2.29527e-04 465 1.950000e+00 1.000000e-01 -2.34650e-04 466 2.000000e+00 1.000000e-01 -2.39571e-04 467 2.050000e+00 1.000000e-01 -2.44301e-04 468 2.100000e+00 1.000000e-01 -2.48847e-04 469 2.150000e+00 1.000000e-01 -2.53220e-04 470 2.200000e+00 1.000000e-01 -2.57427e-04 471 2.250000e+00 1.000000e-01 -2.61475e-04 472 2.300000e+00 1.000000e-01 -2.65374e-04 473 2.350000e+00 1.000000e-01 -2.69128e-04 474 2.400000e+00 1.000000e-01 -2.72745e-04 475 2.450000e+00 1.000000e-01 -2.76231e-04 476 2.500000e+00 1.000000e-01 -2.79591e-04 477 2.550000e+00 1.000000e-01 -2.82831e-04 478 2.600000e+00 1.000000e-01 -2.85956e-04 479 2.650000e+00 1.000000e-01 -2.88971e-04 480 2.700000e+00 1.000000e-01 -2.91880e-04 481 2.750000e+00 1.000000e-01 -2.94688e-04 482 2.800000e+00 1.000000e-01 -2.97399e-04 483 2.850000e+00 1.000000e-01 -3.00016e-04 484 2.900000e+00 1.000000e-01 -3.02544e-04 485 2.950000e+00 1.000000e-01 -3.04986e-04 486 3.000000e+00 1.000000e-01 -3.07345e-04 487 3.050000e+00 1.000000e-01 -3.09625e-04 488 3.100000e+00 1.000000e-01 -3.11828e-04 489 3.150000e+00 1.000000e-01 -3.13958e-04 490 3.200000e+00 1.000000e-01 -3.16016e-04 491 3.250000e+00 1.000000e-01 -3.18006e-04 492 3.300000e+00 1.000000e-01 -3.19931e-04 493 3.350000e+00 1.000000e-01 -3.21792e-04 494 3.400000e+00 1.000000e-01 -3.23592e-04 495 3.450000e+00 1.000000e-01 -3.25332e-04 496 3.500000e+00 1.000000e-01 -3.27016e-04 Total run time: 1.150 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test1.out0000644000265600020320000006316712264261473017454 0ustar andreasadmin Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Date: Tue Apr 20 23:11:39 1999 *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** DCtransferCurve Tue Apr 20 23:11:39 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 5.000000e-02 0.000000e+00 -3.05538e-09 2 1.000000e-01 0.000000e+00 -3.55020e-09 3 1.500000e-01 0.000000e+00 -3.81945e-09 4 2.000000e-01 0.000000e+00 -4.04387e-09 5 2.500000e-01 0.000000e+00 -4.24965e-09 6 3.000000e-01 0.000000e+00 -4.44577e-09 7 3.500000e-01 0.000000e+00 -4.63676e-09 8 4.000000e-01 0.000000e+00 -4.82532e-09 9 4.500000e-01 0.000000e+00 -5.01323e-09 10 5.000000e-01 0.000000e+00 -5.20174e-09 11 5.500000e-01 0.000000e+00 -5.39178e-09 12 6.000000e-01 0.000000e+00 -5.58407e-09 13 6.500000e-01 0.000000e+00 -5.77916e-09 14 7.000000e-01 0.000000e+00 -5.97752e-09 15 7.500000e-01 0.000000e+00 -6.17954e-09 16 8.000000e-01 0.000000e+00 -6.38556e-09 17 8.500000e-01 0.000000e+00 -6.59587e-09 18 9.000000e-01 0.000000e+00 -6.81076e-09 19 9.500000e-01 0.000000e+00 -7.03047e-09 20 1.000000e+00 0.000000e+00 -7.25522e-09 21 1.050000e+00 0.000000e+00 -7.48525e-09 22 1.100000e+00 0.000000e+00 -7.72075e-09 23 1.150000e+00 0.000000e+00 -7.96195e-09 24 1.200000e+00 0.000000e+00 -8.20903e-09 25 1.250000e+00 0.000000e+00 -8.46220e-09 26 1.300000e+00 0.000000e+00 -8.72164e-09 27 1.350000e+00 0.000000e+00 -8.98756e-09 28 1.400000e+00 0.000000e+00 -9.26014e-09 29 1.450000e+00 0.000000e+00 -9.53959e-09 30 1.500000e+00 0.000000e+00 -9.82609e-09 31 1.550000e+00 0.000000e+00 -1.01198e-08 32 1.600000e+00 0.000000e+00 -1.04211e-08 33 1.650000e+00 0.000000e+00 -1.07299e-08 34 1.700000e+00 0.000000e+00 -1.10466e-08 35 1.750000e+00 0.000000e+00 -1.13714e-08 36 1.800000e+00 0.000000e+00 -1.17045e-08 37 1.850000e+00 0.000000e+00 -1.20460e-08 38 1.900000e+00 0.000000e+00 -1.23963e-08 39 1.950000e+00 0.000000e+00 -1.27555e-08 40 2.000000e+00 0.000000e+00 -1.31239e-08 41 2.050000e+00 0.000000e+00 -1.35016e-08 42 2.100000e+00 0.000000e+00 -1.38890e-08 43 2.150000e+00 0.000000e+00 -1.42863e-08 44 2.200000e+00 0.000000e+00 -1.46936e-08 45 2.250000e+00 0.000000e+00 -1.51114e-08 46 2.300000e+00 0.000000e+00 -1.55397e-08 47 2.350000e+00 0.000000e+00 -1.59790e-08 48 2.400000e+00 0.000000e+00 -1.64293e-08 49 2.450000e+00 0.000000e+00 -1.68911e-08 50 2.500000e+00 0.000000e+00 -1.73647e-08 51 2.550000e+00 0.000000e+00 -1.78502e-08 52 2.600000e+00 0.000000e+00 -1.83479e-08 53 2.650000e+00 0.000000e+00 -1.88583e-08 54 2.700000e+00 0.000000e+00 -1.93815e-08 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 0.000000e+00 -1.99179e-08 56 2.800000e+00 0.000000e+00 -2.04679e-08 57 2.850000e+00 0.000000e+00 -2.10317e-08 58 2.900000e+00 0.000000e+00 -2.16096e-08 59 2.950000e+00 0.000000e+00 -2.22021e-08 60 3.000000e+00 0.000000e+00 -2.28094e-08 61 3.050000e+00 0.000000e+00 -2.34319e-08 62 3.100000e+00 0.000000e+00 -2.40700e-08 63 3.150000e+00 0.000000e+00 -2.47240e-08 64 3.200000e+00 0.000000e+00 -2.53944e-08 65 3.250000e+00 0.000000e+00 -2.60815e-08 66 3.300000e+00 0.000000e+00 -2.67856e-08 67 3.350000e+00 0.000000e+00 -2.75073e-08 68 3.400000e+00 0.000000e+00 -2.82470e-08 69 3.450000e+00 0.000000e+00 -2.90050e-08 70 3.500000e+00 0.000000e+00 -2.97817e-08 71 0.000000e+00 5.000000e-01 0.000000e+00 72 5.000000e-02 5.000000e-01 -4.45813e-05 73 1.000000e-01 5.000000e-01 -7.27490e-05 74 1.500000e-01 5.000000e-01 -8.80063e-05 75 2.000000e-01 5.000000e-01 -9.60420e-05 76 2.500000e-01 5.000000e-01 -1.01327e-04 77 3.000000e-01 5.000000e-01 -1.05464e-04 78 3.500000e-01 5.000000e-01 -1.08965e-04 79 4.000000e-01 5.000000e-01 -1.12049e-04 80 4.500000e-01 5.000000e-01 -1.14837e-04 81 5.000000e-01 5.000000e-01 -1.17408e-04 82 5.500000e-01 5.000000e-01 -1.19814e-04 83 6.000000e-01 5.000000e-01 -1.22090e-04 84 6.500000e-01 5.000000e-01 -1.24265e-04 85 7.000000e-01 5.000000e-01 -1.26359e-04 86 7.500000e-01 5.000000e-01 -1.28387e-04 87 8.000000e-01 5.000000e-01 -1.30362e-04 88 8.500000e-01 5.000000e-01 -1.32293e-04 89 9.000000e-01 5.000000e-01 -1.34188e-04 90 9.500000e-01 5.000000e-01 -1.36053e-04 91 1.000000e+00 5.000000e-01 -1.37894e-04 92 1.050000e+00 5.000000e-01 -1.39715e-04 93 1.100000e+00 5.000000e-01 -1.41520e-04 94 1.150000e+00 5.000000e-01 -1.43311e-04 95 1.200000e+00 5.000000e-01 -1.45091e-04 96 1.250000e+00 5.000000e-01 -1.46862e-04 97 1.300000e+00 5.000000e-01 -1.48626e-04 98 1.350000e+00 5.000000e-01 -1.50385e-04 99 1.400000e+00 5.000000e-01 -1.52141e-04 100 1.450000e+00 5.000000e-01 -1.53894e-04 101 1.500000e+00 5.000000e-01 -1.55645e-04 102 1.550000e+00 5.000000e-01 -1.57396e-04 103 1.600000e+00 5.000000e-01 -1.59148e-04 104 1.650000e+00 5.000000e-01 -1.60900e-04 105 1.700000e+00 5.000000e-01 -1.62654e-04 106 1.750000e+00 5.000000e-01 -1.64411e-04 107 1.800000e+00 5.000000e-01 -1.66171e-04 108 1.850000e+00 5.000000e-01 -1.67934e-04 109 1.900000e+00 5.000000e-01 -1.69701e-04 110 1.950000e+00 5.000000e-01 -1.71472e-04 111 2.000000e+00 5.000000e-01 -1.73248e-04 112 2.050000e+00 5.000000e-01 -1.75029e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 5.000000e-01 -1.76816e-04 114 2.150000e+00 5.000000e-01 -1.78607e-04 115 2.200000e+00 5.000000e-01 -1.80405e-04 116 2.250000e+00 5.000000e-01 -1.82209e-04 117 2.300000e+00 5.000000e-01 -1.84019e-04 118 2.350000e+00 5.000000e-01 -1.85835e-04 119 2.400000e+00 5.000000e-01 -1.87658e-04 120 2.450000e+00 5.000000e-01 -1.89488e-04 121 2.500000e+00 5.000000e-01 -1.91324e-04 122 2.550000e+00 5.000000e-01 -1.93168e-04 123 2.600000e+00 5.000000e-01 -1.95019e-04 124 2.650000e+00 5.000000e-01 -1.96878e-04 125 2.700000e+00 5.000000e-01 -1.98744e-04 126 2.750000e+00 5.000000e-01 -2.00617e-04 127 2.800000e+00 5.000000e-01 -2.02498e-04 128 2.850000e+00 5.000000e-01 -2.04387e-04 129 2.900000e+00 5.000000e-01 -2.06284e-04 130 2.950000e+00 5.000000e-01 -2.08189e-04 131 3.000000e+00 5.000000e-01 -2.10102e-04 132 3.050000e+00 5.000000e-01 -2.12023e-04 133 3.100000e+00 5.000000e-01 -2.13952e-04 134 3.150000e+00 5.000000e-01 -2.15889e-04 135 3.200000e+00 5.000000e-01 -2.17835e-04 136 3.250000e+00 5.000000e-01 -2.19789e-04 137 3.300000e+00 5.000000e-01 -2.21752e-04 138 3.350000e+00 5.000000e-01 -2.23723e-04 139 3.400000e+00 5.000000e-01 -2.25703e-04 140 3.450000e+00 5.000000e-01 -2.27691e-04 141 3.500000e+00 5.000000e-01 -2.29688e-04 142 0.000000e+00 1.000000e+00 0.000000e+00 143 5.000000e-02 1.000000e+00 -1.36123e-04 144 1.000000e-01 1.000000e+00 -2.54114e-04 145 1.500000e-01 1.000000e+00 -3.55231e-04 146 2.000000e-01 1.000000e+00 -4.40645e-04 147 2.500000e-01 1.000000e+00 -5.11465e-04 148 3.000000e-01 1.000000e+00 -5.68826e-04 149 3.500000e-01 1.000000e+00 -6.14054e-04 150 4.000000e-01 1.000000e+00 -6.48993e-04 151 4.500000e-01 1.000000e+00 -6.76119e-04 152 5.000000e-01 1.000000e+00 -6.97869e-04 153 5.500000e-01 1.000000e+00 -7.15960e-04 154 6.000000e-01 1.000000e+00 -7.31446e-04 155 6.500000e-01 1.000000e+00 -7.44994e-04 156 7.000000e-01 1.000000e+00 -7.57051e-04 157 7.500000e-01 1.000000e+00 -7.67937e-04 158 8.000000e-01 1.000000e+00 -7.77883e-04 159 8.500000e-01 1.000000e+00 -7.87066e-04 160 9.000000e-01 1.000000e+00 -7.95619e-04 161 9.500000e-01 1.000000e+00 -8.03648e-04 162 1.000000e+00 1.000000e+00 -8.11237e-04 163 1.050000e+00 1.000000e+00 -8.18451e-04 164 1.100000e+00 1.000000e+00 -8.25345e-04 165 1.150000e+00 1.000000e+00 -8.31963e-04 166 1.200000e+00 1.000000e+00 -8.38343e-04 167 1.250000e+00 1.000000e+00 -8.44515e-04 168 1.300000e+00 1.000000e+00 -8.50506e-04 169 1.350000e+00 1.000000e+00 -8.56336e-04 170 1.400000e+00 1.000000e+00 -8.62024e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e+00 -8.67588e-04 172 1.500000e+00 1.000000e+00 -8.73039e-04 173 1.550000e+00 1.000000e+00 -8.78392e-04 174 1.600000e+00 1.000000e+00 -8.83655e-04 175 1.650000e+00 1.000000e+00 -8.88839e-04 176 1.700000e+00 1.000000e+00 -8.93951e-04 177 1.750000e+00 1.000000e+00 -8.98999e-04 178 1.800000e+00 1.000000e+00 -9.03988e-04 179 1.850000e+00 1.000000e+00 -9.08924e-04 180 1.900000e+00 1.000000e+00 -9.13813e-04 181 1.950000e+00 1.000000e+00 -9.18659e-04 182 2.000000e+00 1.000000e+00 -9.23466e-04 183 2.050000e+00 1.000000e+00 -9.28237e-04 184 2.100000e+00 1.000000e+00 -9.32976e-04 185 2.150000e+00 1.000000e+00 -9.37686e-04 186 2.200000e+00 1.000000e+00 -9.42369e-04 187 2.250000e+00 1.000000e+00 -9.47028e-04 188 2.300000e+00 1.000000e+00 -9.51666e-04 189 2.350000e+00 1.000000e+00 -9.56283e-04 190 2.400000e+00 1.000000e+00 -9.60883e-04 191 2.450000e+00 1.000000e+00 -9.65467e-04 192 2.500000e+00 1.000000e+00 -9.70036e-04 193 2.550000e+00 1.000000e+00 -9.74591e-04 194 2.600000e+00 1.000000e+00 -9.79135e-04 195 2.650000e+00 1.000000e+00 -9.83668e-04 196 2.700000e+00 1.000000e+00 -9.88192e-04 197 2.750000e+00 1.000000e+00 -9.92707e-04 198 2.800000e+00 1.000000e+00 -9.97215e-04 199 2.850000e+00 1.000000e+00 -1.00172e-03 200 2.900000e+00 1.000000e+00 -1.00621e-03 201 2.950000e+00 1.000000e+00 -1.01070e-03 202 3.000000e+00 1.000000e+00 -1.01519e-03 203 3.050000e+00 1.000000e+00 -1.01967e-03 204 3.100000e+00 1.000000e+00 -1.02415e-03 205 3.150000e+00 1.000000e+00 -1.02863e-03 206 3.200000e+00 1.000000e+00 -1.03311e-03 207 3.250000e+00 1.000000e+00 -1.03758e-03 208 3.300000e+00 1.000000e+00 -1.04206e-03 209 3.350000e+00 1.000000e+00 -1.04653e-03 210 3.400000e+00 1.000000e+00 -1.05101e-03 211 3.450000e+00 1.000000e+00 -1.05548e-03 212 3.500000e+00 1.000000e+00 -1.05996e-03 213 0.000000e+00 1.500000e+00 0.000000e+00 214 5.000000e-02 1.500000e+00 -1.83564e-04 215 1.000000e-01 1.500000e+00 -3.51241e-04 216 1.500000e-01 1.500000e+00 -5.03865e-04 217 2.000000e-01 1.500000e+00 -6.42214e-04 218 2.500000e-01 1.500000e+00 -7.67015e-04 219 3.000000e-01 1.500000e+00 -8.78953e-04 220 3.500000e-01 1.500000e+00 -9.78672e-04 221 4.000000e-01 1.500000e+00 -1.06679e-03 222 4.500000e-01 1.500000e+00 -1.14390e-03 223 5.000000e-01 1.500000e+00 -1.21063e-03 224 5.500000e-01 1.500000e+00 -1.26766e-03 225 6.000000e-01 1.500000e+00 -1.31588e-03 226 6.500000e-01 1.500000e+00 -1.35651e-03 227 7.000000e-01 1.500000e+00 -1.39102e-03 228 7.500000e-01 1.500000e+00 -1.42077e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 1.500000e+00 -1.44682e-03 230 8.500000e-01 1.500000e+00 -1.46995e-03 231 9.000000e-01 1.500000e+00 -1.49073e-03 232 9.500000e-01 1.500000e+00 -1.50959e-03 233 1.000000e+00 1.500000e+00 -1.52688e-03 234 1.050000e+00 1.500000e+00 -1.54285e-03 235 1.100000e+00 1.500000e+00 -1.55773e-03 236 1.150000e+00 1.500000e+00 -1.57167e-03 237 1.200000e+00 1.500000e+00 -1.58481e-03 238 1.250000e+00 1.500000e+00 -1.59726e-03 239 1.300000e+00 1.500000e+00 -1.60911e-03 240 1.350000e+00 1.500000e+00 -1.62045e-03 241 1.400000e+00 1.500000e+00 -1.63133e-03 242 1.450000e+00 1.500000e+00 -1.64181e-03 243 1.500000e+00 1.500000e+00 -1.65194e-03 244 1.550000e+00 1.500000e+00 -1.66175e-03 245 1.600000e+00 1.500000e+00 -1.67128e-03 246 1.650000e+00 1.500000e+00 -1.68056e-03 247 1.700000e+00 1.500000e+00 -1.68961e-03 248 1.750000e+00 1.500000e+00 -1.69846e-03 249 1.800000e+00 1.500000e+00 -1.70713e-03 250 1.850000e+00 1.500000e+00 -1.71562e-03 251 1.900000e+00 1.500000e+00 -1.72397e-03 252 1.950000e+00 1.500000e+00 -1.73218e-03 253 2.000000e+00 1.500000e+00 -1.74027e-03 254 2.050000e+00 1.500000e+00 -1.74824e-03 255 2.100000e+00 1.500000e+00 -1.75610e-03 256 2.150000e+00 1.500000e+00 -1.76387e-03 257 2.200000e+00 1.500000e+00 -1.77155e-03 258 2.250000e+00 1.500000e+00 -1.77915e-03 259 2.300000e+00 1.500000e+00 -1.78667e-03 260 2.350000e+00 1.500000e+00 -1.79413e-03 261 2.400000e+00 1.500000e+00 -1.80152e-03 262 2.450000e+00 1.500000e+00 -1.80885e-03 263 2.500000e+00 1.500000e+00 -1.81613e-03 264 2.550000e+00 1.500000e+00 -1.82336e-03 265 2.600000e+00 1.500000e+00 -1.83054e-03 266 2.650000e+00 1.500000e+00 -1.83767e-03 267 2.700000e+00 1.500000e+00 -1.84477e-03 268 2.750000e+00 1.500000e+00 -1.85183e-03 269 2.800000e+00 1.500000e+00 -1.85886e-03 270 2.850000e+00 1.500000e+00 -1.86585e-03 271 2.900000e+00 1.500000e+00 -1.87282e-03 272 2.950000e+00 1.500000e+00 -1.87976e-03 273 3.000000e+00 1.500000e+00 -1.88667e-03 274 3.050000e+00 1.500000e+00 -1.89356e-03 275 3.100000e+00 1.500000e+00 -1.90042e-03 276 3.150000e+00 1.500000e+00 -1.90727e-03 277 3.200000e+00 1.500000e+00 -1.91409e-03 278 3.250000e+00 1.500000e+00 -1.92090e-03 279 3.300000e+00 1.500000e+00 -1.92770e-03 280 3.350000e+00 1.500000e+00 -1.93448e-03 281 3.400000e+00 1.500000e+00 -1.94124e-03 282 3.450000e+00 1.500000e+00 -1.94799e-03 283 3.500000e+00 1.500000e+00 -1.95474e-03 284 0.000000e+00 2.000000e+00 0.000000e+00 285 5.000000e-02 2.000000e+00 -2.11787e-04 286 1.000000e-01 2.000000e+00 -4.09865e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 1.500000e-01 2.000000e+00 -5.94810e-04 288 2.000000e-01 2.000000e+00 -7.67171e-04 289 2.500000e-01 2.000000e+00 -9.27464e-04 290 3.000000e-01 2.000000e+00 -1.07618e-03 291 3.500000e-01 2.000000e+00 -1.21378e-03 292 4.000000e-01 2.000000e+00 -1.34071e-03 293 4.500000e-01 2.000000e+00 -1.45738e-03 294 5.000000e-01 2.000000e+00 -1.56421e-03 295 5.500000e-01 2.000000e+00 -1.66156e-03 296 6.000000e-01 2.000000e+00 -1.74982e-03 297 6.500000e-01 2.000000e+00 -1.82934e-03 298 7.000000e-01 2.000000e+00 -1.90049e-03 299 7.500000e-01 2.000000e+00 -1.96367e-03 300 8.000000e-01 2.000000e+00 -2.01939e-03 301 8.500000e-01 2.000000e+00 -2.06838e-03 302 9.000000e-01 2.000000e+00 -2.11156e-03 303 9.500000e-01 2.000000e+00 -2.14989e-03 304 1.000000e+00 2.000000e+00 -2.18422e-03 305 1.050000e+00 2.000000e+00 -2.21523e-03 306 1.100000e+00 2.000000e+00 -2.24347e-03 307 1.150000e+00 2.000000e+00 -2.26937e-03 308 1.200000e+00 2.000000e+00 -2.29331e-03 309 1.250000e+00 2.000000e+00 -2.31556e-03 310 1.300000e+00 2.000000e+00 -2.33638e-03 311 1.350000e+00 2.000000e+00 -2.35595e-03 312 1.400000e+00 2.000000e+00 -2.37444e-03 313 1.450000e+00 2.000000e+00 -2.39199e-03 314 1.500000e+00 2.000000e+00 -2.40871e-03 315 1.550000e+00 2.000000e+00 -2.42471e-03 316 1.600000e+00 2.000000e+00 -2.44007e-03 317 1.650000e+00 2.000000e+00 -2.45485e-03 318 1.700000e+00 2.000000e+00 -2.46912e-03 319 1.750000e+00 2.000000e+00 -2.48293e-03 320 1.800000e+00 2.000000e+00 -2.49633e-03 321 1.850000e+00 2.000000e+00 -2.50936e-03 322 1.900000e+00 2.000000e+00 -2.52205e-03 323 1.950000e+00 2.000000e+00 -2.53444e-03 324 2.000000e+00 2.000000e+00 -2.54655e-03 325 2.050000e+00 2.000000e+00 -2.55841e-03 326 2.100000e+00 2.000000e+00 -2.57004e-03 327 2.150000e+00 2.000000e+00 -2.58146e-03 328 2.200000e+00 2.000000e+00 -2.59268e-03 329 2.250000e+00 2.000000e+00 -2.60372e-03 330 2.300000e+00 2.000000e+00 -2.61460e-03 331 2.350000e+00 2.000000e+00 -2.62533e-03 332 2.400000e+00 2.000000e+00 -2.63592e-03 333 2.450000e+00 2.000000e+00 -2.64638e-03 334 2.500000e+00 2.000000e+00 -2.65672e-03 335 2.550000e+00 2.000000e+00 -2.66694e-03 336 2.600000e+00 2.000000e+00 -2.67707e-03 337 2.650000e+00 2.000000e+00 -2.68709e-03 338 2.700000e+00 2.000000e+00 -2.69703e-03 339 2.750000e+00 2.000000e+00 -2.70689e-03 340 2.800000e+00 2.000000e+00 -2.71666e-03 341 2.850000e+00 2.000000e+00 -2.72636e-03 342 2.900000e+00 2.000000e+00 -2.73600e-03 343 2.950000e+00 2.000000e+00 -2.74557e-03 344 3.000000e+00 2.000000e+00 -2.75508e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 3.050000e+00 2.000000e+00 -2.76454e-03 346 3.100000e+00 2.000000e+00 -2.77394e-03 347 3.150000e+00 2.000000e+00 -2.78330e-03 348 3.200000e+00 2.000000e+00 -2.79261e-03 349 3.250000e+00 2.000000e+00 -2.80187e-03 350 3.300000e+00 2.000000e+00 -2.81110e-03 351 3.350000e+00 2.000000e+00 -2.82029e-03 352 3.400000e+00 2.000000e+00 -2.82944e-03 353 3.450000e+00 2.000000e+00 -2.83856e-03 354 3.500000e+00 2.000000e+00 -2.84765e-03 355 0.000000e+00 2.500000e+00 0.000000e+00 356 5.000000e-02 2.500000e+00 -2.29677e-04 357 1.000000e-01 2.500000e+00 -4.47460e-04 358 1.500000e-01 2.500000e+00 -6.53769e-04 359 2.000000e-01 2.500000e+00 -8.49000e-04 360 2.500000e-01 2.500000e+00 -1.03354e-03 361 3.000000e-01 2.500000e+00 -1.20774e-03 362 3.500000e-01 2.500000e+00 -1.37195e-03 363 4.000000e-01 2.500000e+00 -1.52652e-03 364 4.500000e-01 2.500000e+00 -1.67175e-03 365 5.000000e-01 2.500000e+00 -1.80794e-03 366 5.500000e-01 2.500000e+00 -1.93540e-03 367 6.000000e-01 2.500000e+00 -2.05440e-03 368 6.500000e-01 2.500000e+00 -2.16521e-03 369 7.000000e-01 2.500000e+00 -2.26808e-03 370 7.500000e-01 2.500000e+00 -2.36327e-03 371 8.000000e-01 2.500000e+00 -2.45103e-03 372 8.500000e-01 2.500000e+00 -2.53158e-03 373 9.000000e-01 2.500000e+00 -2.60516e-03 374 9.500000e-01 2.500000e+00 -2.67204e-03 375 1.000000e+00 2.500000e+00 -2.73256e-03 376 1.050000e+00 2.500000e+00 -2.78721e-03 377 1.100000e+00 2.500000e+00 -2.83662e-03 378 1.150000e+00 2.500000e+00 -2.88147e-03 379 1.200000e+00 2.500000e+00 -2.92241e-03 380 1.250000e+00 2.500000e+00 -2.95999e-03 381 1.300000e+00 2.500000e+00 -2.99465e-03 382 1.350000e+00 2.500000e+00 -3.02680e-03 383 1.400000e+00 2.500000e+00 -3.05675e-03 384 1.450000e+00 2.500000e+00 -3.08481e-03 385 1.500000e+00 2.500000e+00 -3.11119e-03 386 1.550000e+00 2.500000e+00 -3.13612e-03 387 1.600000e+00 2.500000e+00 -3.15976e-03 388 1.650000e+00 2.500000e+00 -3.18227e-03 389 1.700000e+00 2.500000e+00 -3.20377e-03 390 1.750000e+00 2.500000e+00 -3.22437e-03 391 1.800000e+00 2.500000e+00 -3.24416e-03 392 1.850000e+00 2.500000e+00 -3.26324e-03 393 1.900000e+00 2.500000e+00 -3.28166e-03 394 1.950000e+00 2.500000e+00 -3.29951e-03 395 2.000000e+00 2.500000e+00 -3.31682e-03 396 2.050000e+00 2.500000e+00 -3.33365e-03 397 2.100000e+00 2.500000e+00 -3.35004e-03 398 2.150000e+00 2.500000e+00 -3.36603e-03 399 2.200000e+00 2.500000e+00 -3.38165e-03 400 2.250000e+00 2.500000e+00 -3.39694e-03 401 2.300000e+00 2.500000e+00 -3.41193e-03 402 2.350000e+00 2.500000e+00 -3.42662e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 2.400000e+00 2.500000e+00 -3.44106e-03 404 2.450000e+00 2.500000e+00 -3.45525e-03 405 2.500000e+00 2.500000e+00 -3.46922e-03 406 2.550000e+00 2.500000e+00 -3.48298e-03 407 2.600000e+00 2.500000e+00 -3.49655e-03 408 2.650000e+00 2.500000e+00 -3.50994e-03 409 2.700000e+00 2.500000e+00 -3.52317e-03 410 2.750000e+00 2.500000e+00 -3.53624e-03 411 2.800000e+00 2.500000e+00 -3.54916e-03 412 2.850000e+00 2.500000e+00 -3.56195e-03 413 2.900000e+00 2.500000e+00 -3.57461e-03 414 2.950000e+00 2.500000e+00 -3.58715e-03 415 3.000000e+00 2.500000e+00 -3.59958e-03 416 3.050000e+00 2.500000e+00 -3.61191e-03 417 3.100000e+00 2.500000e+00 -3.62414e-03 418 3.150000e+00 2.500000e+00 -3.63628e-03 419 3.200000e+00 2.500000e+00 -3.64833e-03 420 3.250000e+00 2.500000e+00 -3.66030e-03 421 3.300000e+00 2.500000e+00 -3.67219e-03 422 3.350000e+00 2.500000e+00 -3.68401e-03 423 3.400000e+00 2.500000e+00 -3.69576e-03 424 3.450000e+00 2.500000e+00 -3.70745e-03 425 3.500000e+00 2.500000e+00 -3.71908e-03 426 0.000000e+00 3.000000e+00 0.000000e+00 427 5.000000e-02 3.000000e+00 -2.41415e-04 428 1.000000e-01 3.000000e+00 -4.72421e-04 429 1.500000e-01 3.000000e+00 -6.93329e-04 430 2.000000e-01 3.000000e+00 -9.04440e-04 431 2.500000e-01 3.000000e+00 -1.10604e-03 432 3.000000e-01 3.000000e+00 -1.29841e-03 433 3.500000e-01 3.000000e+00 -1.48181e-03 434 4.000000e-01 3.000000e+00 -1.65650e-03 435 4.500000e-01 3.000000e+00 -1.82273e-03 436 5.000000e-01 3.000000e+00 -1.98073e-03 437 5.500000e-01 3.000000e+00 -2.13074e-03 438 6.000000e-01 3.000000e+00 -2.27297e-03 439 6.500000e-01 3.000000e+00 -2.40763e-03 440 7.000000e-01 3.000000e+00 -2.53493e-03 441 7.500000e-01 3.000000e+00 -2.65508e-03 442 8.000000e-01 3.000000e+00 -2.76825e-03 443 8.500000e-01 3.000000e+00 -2.87464e-03 444 9.000000e-01 3.000000e+00 -2.97443e-03 445 9.500000e-01 3.000000e+00 -3.06778e-03 446 1.000000e+00 3.000000e+00 -3.15487e-03 447 1.050000e+00 3.000000e+00 -3.23586e-03 448 1.100000e+00 3.000000e+00 -3.31092e-03 449 1.150000e+00 3.000000e+00 -3.38024e-03 450 1.200000e+00 3.000000e+00 -3.44409e-03 451 1.250000e+00 3.000000e+00 -3.50281e-03 452 1.300000e+00 3.000000e+00 -3.55688e-03 453 1.350000e+00 3.000000e+00 -3.60683e-03 454 1.400000e+00 3.000000e+00 -3.65314e-03 455 1.450000e+00 3.000000e+00 -3.69624e-03 456 1.500000e+00 3.000000e+00 -3.73647e-03 457 1.550000e+00 3.000000e+00 -3.77416e-03 458 1.600000e+00 3.000000e+00 -3.80958e-03 459 1.650000e+00 3.000000e+00 -3.84299e-03 460 1.700000e+00 3.000000e+00 -3.87461e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 1.750000e+00 3.000000e+00 -3.90462e-03 462 1.800000e+00 3.000000e+00 -3.93321e-03 463 1.850000e+00 3.000000e+00 -3.96052e-03 464 1.900000e+00 3.000000e+00 -3.98668e-03 465 1.950000e+00 3.000000e+00 -4.01180e-03 466 2.000000e+00 3.000000e+00 -4.03600e-03 467 2.050000e+00 3.000000e+00 -4.05935e-03 468 2.100000e+00 3.000000e+00 -4.08193e-03 469 2.150000e+00 3.000000e+00 -4.10381e-03 470 2.200000e+00 3.000000e+00 -4.12506e-03 471 2.250000e+00 3.000000e+00 -4.14573e-03 472 2.300000e+00 3.000000e+00 -4.16587e-03 473 2.350000e+00 3.000000e+00 -4.18552e-03 474 2.400000e+00 3.000000e+00 -4.20472e-03 475 2.450000e+00 3.000000e+00 -4.22350e-03 476 2.500000e+00 3.000000e+00 -4.24191e-03 477 2.550000e+00 3.000000e+00 -4.25996e-03 478 2.600000e+00 3.000000e+00 -4.27768e-03 479 2.650000e+00 3.000000e+00 -4.29510e-03 480 2.700000e+00 3.000000e+00 -4.31224e-03 481 2.750000e+00 3.000000e+00 -4.32911e-03 482 2.800000e+00 3.000000e+00 -4.34574e-03 483 2.850000e+00 3.000000e+00 -4.36214e-03 484 2.900000e+00 3.000000e+00 -4.37833e-03 485 2.950000e+00 3.000000e+00 -4.39431e-03 486 3.000000e+00 3.000000e+00 -4.41011e-03 487 3.050000e+00 3.000000e+00 -4.42574e-03 488 3.100000e+00 3.000000e+00 -4.44119e-03 489 3.150000e+00 3.000000e+00 -4.45650e-03 490 3.200000e+00 3.000000e+00 -4.47166e-03 491 3.250000e+00 3.000000e+00 -4.48668e-03 492 3.300000e+00 3.000000e+00 -4.50157e-03 493 3.350000e+00 3.000000e+00 -4.51634e-03 494 3.400000e+00 3.000000e+00 -4.53100e-03 495 3.450000e+00 3.000000e+00 -4.54555e-03 496 3.500000e+00 3.000000e+00 -4.55999e-03 497 0.000000e+00 3.500000e+00 0.000000e+00 498 5.000000e-02 3.500000e+00 -2.49225e-04 499 1.000000e-01 3.500000e+00 -4.89256e-04 500 1.500000e-01 3.500000e+00 -7.20333e-04 501 2.000000e-01 3.500000e+00 -9.42687e-04 502 2.500000e-01 3.500000e+00 -1.15654e-03 503 3.000000e-01 3.500000e+00 -1.36211e-03 504 3.500000e-01 3.500000e+00 -1.55961e-03 505 4.000000e-01 3.500000e+00 -1.74923e-03 506 4.500000e-01 3.500000e+00 -1.93117e-03 507 5.000000e-01 3.500000e+00 -2.10562e-03 508 5.500000e-01 3.500000e+00 -2.27277e-03 509 6.000000e-01 3.500000e+00 -2.43278e-03 510 6.500000e-01 3.500000e+00 -2.58584e-03 511 7.000000e-01 3.500000e+00 -2.73210e-03 512 7.500000e-01 3.500000e+00 -2.87172e-03 513 8.000000e-01 3.500000e+00 -3.00487e-03 514 8.500000e-01 3.500000e+00 -3.13169e-03 515 9.000000e-01 3.500000e+00 -3.25233e-03 516 9.500000e-01 3.500000e+00 -3.36694e-03 517 1.000000e+00 3.500000e+00 -3.47564e-03 518 1.050000e+00 3.500000e+00 -3.57858e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 1.100000e+00 3.500000e+00 -3.67588e-03 520 1.150000e+00 3.500000e+00 -3.76767e-03 521 1.200000e+00 3.500000e+00 -3.85407e-03 522 1.250000e+00 3.500000e+00 -3.93521e-03 523 1.300000e+00 3.500000e+00 -4.01121e-03 524 1.350000e+00 3.500000e+00 -4.08224e-03 525 1.400000e+00 3.500000e+00 -4.14848e-03 526 1.450000e+00 3.500000e+00 -4.21024e-03 527 1.500000e+00 3.500000e+00 -4.26788e-03 528 1.550000e+00 3.500000e+00 -4.32183e-03 529 1.600000e+00 3.500000e+00 -4.37250e-03 530 1.650000e+00 3.500000e+00 -4.42020e-03 531 1.700000e+00 3.500000e+00 -4.46523e-03 532 1.750000e+00 3.500000e+00 -4.50781e-03 533 1.800000e+00 3.500000e+00 -4.54816e-03 534 1.850000e+00 3.500000e+00 -4.58648e-03 535 1.900000e+00 3.500000e+00 -4.62297e-03 536 1.950000e+00 3.500000e+00 -4.65778e-03 537 2.000000e+00 3.500000e+00 -4.69108e-03 538 2.050000e+00 3.500000e+00 -4.72301e-03 539 2.100000e+00 3.500000e+00 -4.75369e-03 540 2.150000e+00 3.500000e+00 -4.78323e-03 541 2.200000e+00 3.500000e+00 -4.81174e-03 542 2.250000e+00 3.500000e+00 -4.83931e-03 543 2.300000e+00 3.500000e+00 -4.86601e-03 544 2.350000e+00 3.500000e+00 -4.89193e-03 545 2.400000e+00 3.500000e+00 -4.91711e-03 546 2.450000e+00 3.500000e+00 -4.94163e-03 547 2.500000e+00 3.500000e+00 -4.96554e-03 548 2.550000e+00 3.500000e+00 -4.98888e-03 549 2.600000e+00 3.500000e+00 -5.01169e-03 550 2.650000e+00 3.500000e+00 -5.03402e-03 551 2.700000e+00 3.500000e+00 -5.05589e-03 552 2.750000e+00 3.500000e+00 -5.07735e-03 553 2.800000e+00 3.500000e+00 -5.09842e-03 554 2.850000e+00 3.500000e+00 -5.11912e-03 555 2.900000e+00 3.500000e+00 -5.13949e-03 556 2.950000e+00 3.500000e+00 -5.15954e-03 557 3.000000e+00 3.500000e+00 -5.17929e-03 558 3.050000e+00 3.500000e+00 -5.19877e-03 559 3.100000e+00 3.500000e+00 -5.21799e-03 560 3.150000e+00 3.500000e+00 -5.23696e-03 561 3.200000e+00 3.500000e+00 -5.25570e-03 562 3.250000e+00 3.500000e+00 -5.27423e-03 563 3.300000e+00 3.500000e+00 -5.29255e-03 564 3.350000e+00 3.500000e+00 -5.31069e-03 565 3.400000e+00 3.500000e+00 -5.32864e-03 566 3.450000e+00 3.500000e+00 -5.34642e-03 567 3.500000e+00 3.500000e+00 -5.36404e-03 Total run time: 1.110 seconds. Current data size = 249856, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test11.cir0000644000265600020320000000047212264261473017471 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -0.1 vbs 3 0 0.0 .options noacct .dc vgs 0 -3.5 -0.05 vds -0.1 -3.1 -1. .print dc v(2) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/modelcard.pmos0000644000265600020320000000156312264261473020505 0ustar andreasadmin.model P1 PMOS +Level= 8 version=3.2.2 +Tnom=27.0 +Nch= 3.533024E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=6.23e-8 Wint=1.22e-7 +Vth0=-.6732829 K1= .8362093 K2=-8.606622E-02 K3= 1.82 +Dvt0= 1.903801 Dvt1= .5333922 Dvt2=-.1862677 +Nlx= 1.28e-8 W0= 2.1e-6 +K3b= -0.24 Prwg=-0.001 Prwb=-0.323 +Vsat= 103503.2 Ua= 1.39995E-09 Ub= 1.e-19 Uc=-2.73e-11 + Rdsw= 460 U0= 138.7609 +A0= .4716551 Ags=0.12 +Keta=-1.871516E-03 A1= .3417965 A2= 0.83 +Voff=-.074182 NFactor= 1.54389 Cit=-1.015667E-03 +Cdsc= 8.937517E-04 +Cdscb= 1.45e-4 Cdscd=1.04e-4 + Dvt0w=0.232 Dvt1w=4.5e6 Dvt2w=-0.0023 +Eta0= 6.024776E-02 Etab=-4.64593E-03 +Dsub= .23222404 +Pclm= .989 Pdiblc1= 2.07418E-02 Pdiblc2= 1.33813E-3 +Drout= .3222404 Pscbe1= 118000 Pscbe2= 1E-09 +Pvag= 0 +kt1= -0.25 kt2= -0.032 prt=64.5 +At= 33000 +Ute= -1.5 +Ua1= 4.312e-9 Ub1= 6.65e-19 Uc1= 0 +Kt1l=0 ngspice-26/tests/bsim3/dc_sim/test9.out0000644000265600020320000006432312264261473017457 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Date: Tue Apr 20 23:14:45 1999 *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** DCtransferCurve Tue Apr 20 23:14:44 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 -5.00000e-02 0.000000e+00 7.765944e-14 2 -1.00000e-01 0.000000e+00 1.105368e-13 3 -1.50000e-01 0.000000e+00 1.606747e-13 4 -2.00000e-01 0.000000e+00 2.107781e-13 5 -2.50000e-01 0.000000e+00 2.608906e-13 6 -3.00000e-01 0.000000e+00 3.110173e-13 7 -3.50000e-01 0.000000e+00 3.611609e-13 8 -4.00000e-01 0.000000e+00 4.113236e-13 9 -4.50000e-01 0.000000e+00 4.615082e-13 10 -5.00000e-01 0.000000e+00 5.117175e-13 11 -5.50000e-01 0.000000e+00 5.619550e-13 12 -6.00000e-01 0.000000e+00 6.122244e-13 13 -6.50000e-01 0.000000e+00 6.625298e-13 14 -7.00000e-01 0.000000e+00 7.128762e-13 15 -7.50000e-01 0.000000e+00 7.632689e-13 16 -8.00000e-01 0.000000e+00 8.137139e-13 17 -8.50000e-01 0.000000e+00 8.642183e-13 18 -9.00000e-01 0.000000e+00 9.147897e-13 19 -9.50000e-01 0.000000e+00 9.654371e-13 20 -1.00000e+00 0.000000e+00 1.016170e-12 21 -1.05000e+00 0.000000e+00 1.067000e-12 22 -1.10000e+00 0.000000e+00 1.117940e-12 23 -1.15000e+00 0.000000e+00 1.169003e-12 24 -1.20000e+00 0.000000e+00 1.220207e-12 25 -1.25000e+00 0.000000e+00 1.271569e-12 26 -1.30000e+00 0.000000e+00 1.323109e-12 27 -1.35000e+00 0.000000e+00 1.374851e-12 28 -1.40000e+00 0.000000e+00 1.426821e-12 29 -1.45000e+00 0.000000e+00 1.479048e-12 30 -1.50000e+00 0.000000e+00 1.531565e-12 31 -1.55000e+00 0.000000e+00 1.584410e-12 32 -1.60000e+00 0.000000e+00 1.637625e-12 33 -1.65000e+00 0.000000e+00 1.691257e-12 34 -1.70000e+00 0.000000e+00 1.745359e-12 35 -1.75000e+00 0.000000e+00 1.799992e-12 36 -1.80000e+00 0.000000e+00 1.855223e-12 37 -1.85000e+00 0.000000e+00 1.911130e-12 38 -1.90000e+00 0.000000e+00 1.967796e-12 39 -1.95000e+00 0.000000e+00 2.025321e-12 40 -2.00000e+00 0.000000e+00 2.083812e-12 41 -2.05000e+00 0.000000e+00 2.143392e-12 42 -2.10000e+00 0.000000e+00 2.204200e-12 43 -2.15000e+00 0.000000e+00 2.266390e-12 44 -2.20000e+00 0.000000e+00 2.330137e-12 45 -2.25000e+00 0.000000e+00 2.395638e-12 46 -2.30000e+00 0.000000e+00 2.463115e-12 47 -2.35000e+00 0.000000e+00 2.532815e-12 48 -2.40000e+00 0.000000e+00 2.605019e-12 49 -2.45000e+00 0.000000e+00 2.680042e-12 50 -2.50000e+00 0.000000e+00 2.758237e-12 51 -2.55000e+00 0.000000e+00 2.840003e-12 52 -2.60000e+00 0.000000e+00 2.925785e-12 53 -2.65000e+00 0.000000e+00 3.016086e-12 54 -2.70000e+00 0.000000e+00 3.111472e-12 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 0.000000e+00 3.212577e-12 56 -2.80000e+00 0.000000e+00 3.320114e-12 57 -2.85000e+00 0.000000e+00 3.434883e-12 58 -2.90000e+00 0.000000e+00 3.557784e-12 59 -2.95000e+00 0.000000e+00 3.689828e-12 60 -3.00000e+00 0.000000e+00 3.832149e-12 61 -3.05000e+00 0.000000e+00 3.986022e-12 62 -3.10000e+00 0.000000e+00 4.152877e-12 63 -3.15000e+00 0.000000e+00 4.334320e-12 64 -3.20000e+00 0.000000e+00 4.532153e-12 65 -3.25000e+00 0.000000e+00 4.748401e-12 66 -3.30000e+00 0.000000e+00 4.985333e-12 67 -3.35000e+00 0.000000e+00 5.245498e-12 68 -3.40000e+00 0.000000e+00 5.531754e-12 69 -3.45000e+00 0.000000e+00 5.847308e-12 70 -3.50000e+00 0.000000e+00 6.195759e-12 71 0.000000e+00 -5.00000e-01 0.000000e+00 72 -5.00000e-02 -5.00000e-01 1.327640e-08 73 -1.00000e-01 -5.00000e-01 1.611460e-08 74 -1.50000e-01 -5.00000e-01 1.846319e-08 75 -2.00000e-01 -5.00000e-01 2.096717e-08 76 -2.50000e-01 -5.00000e-01 2.373100e-08 77 -3.00000e-01 -5.00000e-01 2.680751e-08 78 -3.50000e-01 -5.00000e-01 3.024147e-08 79 -4.00000e-01 -5.00000e-01 3.407792e-08 80 -4.50000e-01 -5.00000e-01 3.836479e-08 81 -5.00000e-01 -5.00000e-01 4.315412e-08 82 -5.50000e-01 -5.00000e-01 4.850289e-08 83 -6.00000e-01 -5.00000e-01 5.447364e-08 84 -6.50000e-01 -5.00000e-01 6.113517e-08 85 -7.00000e-01 -5.00000e-01 6.856313e-08 86 -7.50000e-01 -5.00000e-01 7.684072e-08 87 -8.00000e-01 -5.00000e-01 8.605942e-08 88 -8.50000e-01 -5.00000e-01 9.631972e-08 89 -9.00000e-01 -5.00000e-01 1.077320e-07 90 -9.50000e-01 -5.00000e-01 1.204172e-07 91 -1.00000e+00 -5.00000e-01 1.345083e-07 92 -1.05000e+00 -5.00000e-01 1.501506e-07 93 -1.10000e+00 -5.00000e-01 1.675033e-07 94 -1.15000e+00 -5.00000e-01 1.867407e-07 95 -1.20000e+00 -5.00000e-01 2.080532e-07 96 -1.25000e+00 -5.00000e-01 2.316486e-07 97 -1.30000e+00 -5.00000e-01 2.577539e-07 98 -1.35000e+00 -5.00000e-01 2.866162e-07 99 -1.40000e+00 -5.00000e-01 3.185051e-07 100 -1.45000e+00 -5.00000e-01 3.537133e-07 101 -1.50000e+00 -5.00000e-01 3.925592e-07 102 -1.55000e+00 -5.00000e-01 4.353885e-07 103 -1.60000e+00 -5.00000e-01 4.825756e-07 104 -1.65000e+00 -5.00000e-01 5.345260e-07 105 -1.70000e+00 -5.00000e-01 5.916781e-07 106 -1.75000e+00 -5.00000e-01 6.545051e-07 107 -1.80000e+00 -5.00000e-01 7.235166e-07 108 -1.85000e+00 -5.00000e-01 7.992611e-07 109 -1.90000e+00 -5.00000e-01 8.823272e-07 110 -1.95000e+00 -5.00000e-01 9.733457e-07 111 -2.00000e+00 -5.00000e-01 1.072991e-06 112 -2.05000e+00 -5.00000e-01 1.181982e-06 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -5.00000e-01 1.301085e-06 114 -2.15000e+00 -5.00000e-01 1.431111e-06 115 -2.20000e+00 -5.00000e-01 1.572920e-06 116 -2.25000e+00 -5.00000e-01 1.727421e-06 117 -2.30000e+00 -5.00000e-01 1.895568e-06 118 -2.35000e+00 -5.00000e-01 2.078363e-06 119 -2.40000e+00 -5.00000e-01 2.276854e-06 120 -2.45000e+00 -5.00000e-01 2.492134e-06 121 -2.50000e+00 -5.00000e-01 2.725339e-06 122 -2.55000e+00 -5.00000e-01 2.977642e-06 123 -2.60000e+00 -5.00000e-01 3.250256e-06 124 -2.65000e+00 -5.00000e-01 3.544428e-06 125 -2.70000e+00 -5.00000e-01 3.861431e-06 126 -2.75000e+00 -5.00000e-01 4.202568e-06 127 -2.80000e+00 -5.00000e-01 4.569160e-06 128 -2.85000e+00 -5.00000e-01 4.962543e-06 129 -2.90000e+00 -5.00000e-01 5.384067e-06 130 -2.95000e+00 -5.00000e-01 5.835083e-06 131 -3.00000e+00 -5.00000e-01 6.316943e-06 132 -3.05000e+00 -5.00000e-01 6.830992e-06 133 -3.10000e+00 -5.00000e-01 7.378563e-06 134 -3.15000e+00 -5.00000e-01 7.960971e-06 135 -3.20000e+00 -5.00000e-01 8.579507e-06 136 -3.25000e+00 -5.00000e-01 9.235431e-06 137 -3.30000e+00 -5.00000e-01 9.929973e-06 138 -3.35000e+00 -5.00000e-01 1.066432e-05 139 -3.40000e+00 -5.00000e-01 1.143962e-05 140 -3.45000e+00 -5.00000e-01 1.225696e-05 141 -3.50000e+00 -5.00000e-01 1.311739e-05 142 0.000000e+00 -1.00000e+00 0.000000e+00 143 -5.00000e-02 -1.00000e+00 4.814763e-05 144 -1.00000e-01 -1.00000e+00 8.757843e-05 145 -1.50000e-01 -1.00000e+00 1.187516e-04 146 -2.00000e-01 -1.00000e+00 1.422126e-04 147 -2.50000e-01 -1.00000e+00 1.588145e-04 148 -3.00000e-01 -1.00000e+00 1.701253e-04 149 -3.50000e-01 -1.00000e+00 1.782979e-04 150 -4.00000e-01 -1.00000e+00 1.849752e-04 151 -4.50000e-01 -1.00000e+00 1.909301e-04 152 -5.00000e-01 -1.00000e+00 1.964810e-04 153 -5.50000e-01 -1.00000e+00 2.017755e-04 154 -6.00000e-01 -1.00000e+00 2.068948e-04 155 -6.50000e-01 -1.00000e+00 2.118894e-04 156 -7.00000e-01 -1.00000e+00 2.167934e-04 157 -7.50000e-01 -1.00000e+00 2.216310e-04 158 -8.00000e-01 -1.00000e+00 2.264203e-04 159 -8.50000e-01 -1.00000e+00 2.311750e-04 160 -9.00000e-01 -1.00000e+00 2.359058e-04 161 -9.50000e-01 -1.00000e+00 2.406211e-04 162 -1.00000e+00 -1.00000e+00 2.453277e-04 163 -1.05000e+00 -1.00000e+00 2.500310e-04 164 -1.10000e+00 -1.00000e+00 2.547357e-04 165 -1.15000e+00 -1.00000e+00 2.594455e-04 166 -1.20000e+00 -1.00000e+00 2.641635e-04 167 -1.25000e+00 -1.00000e+00 2.688923e-04 168 -1.30000e+00 -1.00000e+00 2.736341e-04 169 -1.35000e+00 -1.00000e+00 2.783909e-04 170 -1.40000e+00 -1.00000e+00 2.831643e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e+00 2.879556e-04 172 -1.50000e+00 -1.00000e+00 2.927661e-04 173 -1.55000e+00 -1.00000e+00 2.975967e-04 174 -1.60000e+00 -1.00000e+00 3.024485e-04 175 -1.65000e+00 -1.00000e+00 3.073222e-04 176 -1.70000e+00 -1.00000e+00 3.122185e-04 177 -1.75000e+00 -1.00000e+00 3.171380e-04 178 -1.80000e+00 -1.00000e+00 3.220812e-04 179 -1.85000e+00 -1.00000e+00 3.270486e-04 180 -1.90000e+00 -1.00000e+00 3.320406e-04 181 -1.95000e+00 -1.00000e+00 3.370576e-04 182 -2.00000e+00 -1.00000e+00 3.420999e-04 183 -2.05000e+00 -1.00000e+00 3.471678e-04 184 -2.10000e+00 -1.00000e+00 3.522616e-04 185 -2.15000e+00 -1.00000e+00 3.573814e-04 186 -2.20000e+00 -1.00000e+00 3.625276e-04 187 -2.25000e+00 -1.00000e+00 3.677003e-04 188 -2.30000e+00 -1.00000e+00 3.728997e-04 189 -2.35000e+00 -1.00000e+00 3.781260e-04 190 -2.40000e+00 -1.00000e+00 3.833792e-04 191 -2.45000e+00 -1.00000e+00 3.886597e-04 192 -2.50000e+00 -1.00000e+00 3.939676e-04 193 -2.55000e+00 -1.00000e+00 3.993030e-04 194 -2.60000e+00 -1.00000e+00 4.046661e-04 195 -2.65000e+00 -1.00000e+00 4.100571e-04 196 -2.70000e+00 -1.00000e+00 4.154762e-04 197 -2.75000e+00 -1.00000e+00 4.209236e-04 198 -2.80000e+00 -1.00000e+00 4.263994e-04 199 -2.85000e+00 -1.00000e+00 4.319037e-04 200 -2.90000e+00 -1.00000e+00 4.374363e-04 201 -2.95000e+00 -1.00000e+00 4.429974e-04 202 -3.00000e+00 -1.00000e+00 4.485867e-04 203 -3.05000e+00 -1.00000e+00 4.542041e-04 204 -3.10000e+00 -1.00000e+00 4.598494e-04 205 -3.15000e+00 -1.00000e+00 4.655225e-04 206 -3.20000e+00 -1.00000e+00 4.712231e-04 207 -3.25000e+00 -1.00000e+00 4.769512e-04 208 -3.30000e+00 -1.00000e+00 4.827067e-04 209 -3.35000e+00 -1.00000e+00 4.884894e-04 210 -3.40000e+00 -1.00000e+00 4.942992e-04 211 -3.45000e+00 -1.00000e+00 5.001360e-04 212 -3.50000e+00 -1.00000e+00 5.059998e-04 213 0.000000e+00 -1.50000e+00 0.000000e+00 214 -5.00000e-02 -1.50000e+00 1.209108e-04 215 -1.00000e-01 -1.50000e+00 2.311201e-04 216 -1.50000e-01 -1.50000e+00 3.310929e-04 217 -2.00000e-01 -1.50000e+00 4.212699e-04 218 -2.50000e-01 -1.50000e+00 5.020694e-04 219 -3.00000e-01 -1.50000e+00 5.738920e-04 220 -3.50000e-01 -1.50000e+00 6.371259e-04 221 -4.00000e-01 -1.50000e+00 6.921579e-04 222 -4.50000e-01 -1.50000e+00 7.393952e-04 223 -5.00000e-01 -1.50000e+00 7.793122e-04 224 -5.50000e-01 -1.50000e+00 8.125425e-04 225 -6.00000e-01 -1.50000e+00 8.400027e-04 226 -6.50000e-01 -1.50000e+00 8.629007e-04 227 -7.00000e-01 -1.50000e+00 8.824759e-04 228 -7.50000e-01 -1.50000e+00 8.997036e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.50000e+00 9.152414e-04 230 -8.50000e-01 -1.50000e+00 9.295197e-04 231 -9.00000e-01 -1.50000e+00 9.428295e-04 232 -9.50000e-01 -1.50000e+00 9.553761e-04 233 -1.00000e+00 -1.50000e+00 9.673097e-04 234 -1.05000e+00 -1.50000e+00 9.787437e-04 235 -1.10000e+00 -1.50000e+00 9.897653e-04 236 -1.15000e+00 -1.50000e+00 1.000443e-03 237 -1.20000e+00 -1.50000e+00 1.010832e-03 238 -1.25000e+00 -1.50000e+00 1.020976e-03 239 -1.30000e+00 -1.50000e+00 1.030910e-03 240 -1.35000e+00 -1.50000e+00 1.040666e-03 241 -1.40000e+00 -1.50000e+00 1.050267e-03 242 -1.45000e+00 -1.50000e+00 1.059735e-03 243 -1.50000e+00 -1.50000e+00 1.069086e-03 244 -1.55000e+00 -1.50000e+00 1.078337e-03 245 -1.60000e+00 -1.50000e+00 1.087500e-03 246 -1.65000e+00 -1.50000e+00 1.096586e-03 247 -1.70000e+00 -1.50000e+00 1.105604e-03 248 -1.75000e+00 -1.50000e+00 1.114563e-03 249 -1.80000e+00 -1.50000e+00 1.123471e-03 250 -1.85000e+00 -1.50000e+00 1.132333e-03 251 -1.90000e+00 -1.50000e+00 1.141156e-03 252 -1.95000e+00 -1.50000e+00 1.149944e-03 253 -2.00000e+00 -1.50000e+00 1.158701e-03 254 -2.05000e+00 -1.50000e+00 1.167433e-03 255 -2.10000e+00 -1.50000e+00 1.176141e-03 256 -2.15000e+00 -1.50000e+00 1.184831e-03 257 -2.20000e+00 -1.50000e+00 1.193503e-03 258 -2.25000e+00 -1.50000e+00 1.202162e-03 259 -2.30000e+00 -1.50000e+00 1.210808e-03 260 -2.35000e+00 -1.50000e+00 1.219446e-03 261 -2.40000e+00 -1.50000e+00 1.228075e-03 262 -2.45000e+00 -1.50000e+00 1.236698e-03 263 -2.50000e+00 -1.50000e+00 1.245317e-03 264 -2.55000e+00 -1.50000e+00 1.253933e-03 265 -2.60000e+00 -1.50000e+00 1.262547e-03 266 -2.65000e+00 -1.50000e+00 1.271161e-03 267 -2.70000e+00 -1.50000e+00 1.279775e-03 268 -2.75000e+00 -1.50000e+00 1.288391e-03 269 -2.80000e+00 -1.50000e+00 1.297009e-03 270 -2.85000e+00 -1.50000e+00 1.305631e-03 271 -2.90000e+00 -1.50000e+00 1.314258e-03 272 -2.95000e+00 -1.50000e+00 1.322889e-03 273 -3.00000e+00 -1.50000e+00 1.331526e-03 274 -3.05000e+00 -1.50000e+00 1.340169e-03 275 -3.10000e+00 -1.50000e+00 1.348819e-03 276 -3.15000e+00 -1.50000e+00 1.357477e-03 277 -3.20000e+00 -1.50000e+00 1.366142e-03 278 -3.25000e+00 -1.50000e+00 1.374816e-03 279 -3.30000e+00 -1.50000e+00 1.383498e-03 280 -3.35000e+00 -1.50000e+00 1.392190e-03 281 -3.40000e+00 -1.50000e+00 1.400892e-03 282 -3.45000e+00 -1.50000e+00 1.409603e-03 283 -3.50000e+00 -1.50000e+00 1.418325e-03 284 0.000000e+00 -2.00000e+00 0.000000e+00 285 -5.00000e-02 -2.00000e+00 1.834077e-04 286 -1.00000e-01 -2.00000e+00 3.550706e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -2.00000e+00 5.154615e-04 288 -2.00000e-01 -2.00000e+00 6.650286e-04 289 -2.50000e-01 -2.00000e+00 8.041970e-04 290 -3.00000e-01 -2.00000e+00 9.333704e-04 291 -3.50000e-01 -2.00000e+00 1.052932e-03 292 -4.00000e-01 -2.00000e+00 1.163248e-03 293 -4.50000e-01 -2.00000e+00 1.264665e-03 294 -5.00000e-01 -2.00000e+00 1.357519e-03 295 -5.50000e-01 -2.00000e+00 1.442130e-03 296 -6.00000e-01 -2.00000e+00 1.518810e-03 297 -6.50000e-01 -2.00000e+00 1.587868e-03 298 -7.00000e-01 -2.00000e+00 1.649621e-03 299 -7.50000e-01 -2.00000e+00 1.704411e-03 300 -8.00000e-01 -2.00000e+00 1.752646e-03 301 -8.50000e-01 -2.00000e+00 1.794852e-03 302 -9.00000e-01 -2.00000e+00 1.831713e-03 303 -9.50000e-01 -2.00000e+00 1.864043e-03 304 -1.00000e+00 -2.00000e+00 1.892670e-03 305 -1.05000e+00 -2.00000e+00 1.918329e-03 306 -1.10000e+00 -2.00000e+00 1.941619e-03 307 -1.15000e+00 -2.00000e+00 1.963007e-03 308 -1.20000e+00 -2.00000e+00 1.982856e-03 309 -1.25000e+00 -2.00000e+00 2.001446e-03 310 -1.30000e+00 -2.00000e+00 2.018995e-03 311 -1.35000e+00 -2.00000e+00 2.035674e-03 312 -1.40000e+00 -2.00000e+00 2.051621e-03 313 -1.45000e+00 -2.00000e+00 2.066946e-03 314 -1.50000e+00 -2.00000e+00 2.081740e-03 315 -1.55000e+00 -2.00000e+00 2.096075e-03 316 -1.60000e+00 -2.00000e+00 2.110012e-03 317 -1.65000e+00 -2.00000e+00 2.123604e-03 318 -1.70000e+00 -2.00000e+00 2.136893e-03 319 -1.75000e+00 -2.00000e+00 2.149914e-03 320 -1.80000e+00 -2.00000e+00 2.162700e-03 321 -1.85000e+00 -2.00000e+00 2.175277e-03 322 -1.90000e+00 -2.00000e+00 2.187668e-03 323 -1.95000e+00 -2.00000e+00 2.199892e-03 324 -2.00000e+00 -2.00000e+00 2.211967e-03 325 -2.05000e+00 -2.00000e+00 2.223909e-03 326 -2.10000e+00 -2.00000e+00 2.235730e-03 327 -2.15000e+00 -2.00000e+00 2.247443e-03 328 -2.20000e+00 -2.00000e+00 2.259057e-03 329 -2.25000e+00 -2.00000e+00 2.270583e-03 330 -2.30000e+00 -2.00000e+00 2.282028e-03 331 -2.35000e+00 -2.00000e+00 2.293400e-03 332 -2.40000e+00 -2.00000e+00 2.304705e-03 333 -2.45000e+00 -2.00000e+00 2.315950e-03 334 -2.50000e+00 -2.00000e+00 2.327140e-03 335 -2.55000e+00 -2.00000e+00 2.338279e-03 336 -2.60000e+00 -2.00000e+00 2.349373e-03 337 -2.65000e+00 -2.00000e+00 2.360424e-03 338 -2.70000e+00 -2.00000e+00 2.371438e-03 339 -2.75000e+00 -2.00000e+00 2.382417e-03 340 -2.80000e+00 -2.00000e+00 2.393364e-03 341 -2.85000e+00 -2.00000e+00 2.404282e-03 342 -2.90000e+00 -2.00000e+00 2.415174e-03 343 -2.95000e+00 -2.00000e+00 2.426041e-03 344 -3.00000e+00 -2.00000e+00 2.436887e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -2.00000e+00 2.447713e-03 346 -3.10000e+00 -2.00000e+00 2.458521e-03 347 -3.15000e+00 -2.00000e+00 2.469313e-03 348 -3.20000e+00 -2.00000e+00 2.480090e-03 349 -3.25000e+00 -2.00000e+00 2.490854e-03 350 -3.30000e+00 -2.00000e+00 2.501606e-03 351 -3.35000e+00 -2.00000e+00 2.512348e-03 352 -3.40000e+00 -2.00000e+00 2.523080e-03 353 -3.45000e+00 -2.00000e+00 2.533804e-03 354 -3.50000e+00 -2.00000e+00 2.544521e-03 355 0.000000e+00 -2.50000e+00 0.000000e+00 356 -5.00000e-02 -2.50000e+00 2.376437e-04 357 -1.00000e-01 -2.50000e+00 4.629057e-04 358 -1.50000e-01 -2.50000e+00 6.762515e-04 359 -2.00000e-01 -2.50000e+00 8.781239e-04 360 -2.50000e-01 -2.50000e+00 1.068944e-03 361 -3.00000e-01 -2.50000e+00 1.249113e-03 362 -3.50000e-01 -2.50000e+00 1.419012e-03 363 -4.00000e-01 -2.50000e+00 1.579006e-03 364 -4.50000e-01 -2.50000e+00 1.729441e-03 365 -5.00000e-01 -2.50000e+00 1.870649e-03 366 -5.50000e-01 -2.50000e+00 2.002946e-03 367 -6.00000e-01 -2.50000e+00 2.126633e-03 368 -6.50000e-01 -2.50000e+00 2.242000e-03 369 -7.00000e-01 -2.50000e+00 2.349323e-03 370 -7.50000e-01 -2.50000e+00 2.448864e-03 371 -8.00000e-01 -2.50000e+00 2.540876e-03 372 -8.50000e-01 -2.50000e+00 2.625596e-03 373 -9.00000e-01 -2.50000e+00 2.703249e-03 374 -9.50000e-01 -2.50000e+00 2.774043e-03 375 -1.00000e+00 -2.50000e+00 2.838173e-03 376 -1.05000e+00 -2.50000e+00 2.895852e-03 377 -1.10000e+00 -2.50000e+00 2.947365e-03 378 -1.15000e+00 -2.50000e+00 2.993161e-03 379 -1.20000e+00 -2.50000e+00 3.033872e-03 380 -1.25000e+00 -2.50000e+00 3.070232e-03 381 -1.30000e+00 -2.50000e+00 3.102964e-03 382 -1.35000e+00 -2.50000e+00 3.132707e-03 383 -1.40000e+00 -2.50000e+00 3.159991e-03 384 -1.45000e+00 -2.50000e+00 3.185246e-03 385 -1.50000e+00 -2.50000e+00 3.208815e-03 386 -1.55000e+00 -2.50000e+00 3.230973e-03 387 -1.60000e+00 -2.50000e+00 3.251941e-03 388 -1.65000e+00 -2.50000e+00 3.271898e-03 389 -1.70000e+00 -2.50000e+00 3.290989e-03 390 -1.75000e+00 -2.50000e+00 3.309333e-03 391 -1.80000e+00 -2.50000e+00 3.327031e-03 392 -1.85000e+00 -2.50000e+00 3.344164e-03 393 -1.90000e+00 -2.50000e+00 3.360802e-03 394 -1.95000e+00 -2.50000e+00 3.377005e-03 395 -2.00000e+00 -2.50000e+00 3.392821e-03 396 -2.05000e+00 -2.50000e+00 3.408295e-03 397 -2.10000e+00 -2.50000e+00 3.423463e-03 398 -2.15000e+00 -2.50000e+00 3.438356e-03 399 -2.20000e+00 -2.50000e+00 3.453004e-03 400 -2.25000e+00 -2.50000e+00 3.467429e-03 401 -2.30000e+00 -2.50000e+00 3.481654e-03 402 -2.35000e+00 -2.50000e+00 3.495698e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -2.50000e+00 3.509576e-03 404 -2.45000e+00 -2.50000e+00 3.523305e-03 405 -2.50000e+00 -2.50000e+00 3.536896e-03 406 -2.55000e+00 -2.50000e+00 3.550362e-03 407 -2.60000e+00 -2.50000e+00 3.563714e-03 408 -2.65000e+00 -2.50000e+00 3.576960e-03 409 -2.70000e+00 -2.50000e+00 3.590110e-03 410 -2.75000e+00 -2.50000e+00 3.603170e-03 411 -2.80000e+00 -2.50000e+00 3.616149e-03 412 -2.85000e+00 -2.50000e+00 3.629052e-03 413 -2.90000e+00 -2.50000e+00 3.641886e-03 414 -2.95000e+00 -2.50000e+00 3.654655e-03 415 -3.00000e+00 -2.50000e+00 3.667364e-03 416 -3.05000e+00 -2.50000e+00 3.680019e-03 417 -3.10000e+00 -2.50000e+00 3.692622e-03 418 -3.15000e+00 -2.50000e+00 3.705177e-03 419 -3.20000e+00 -2.50000e+00 3.717689e-03 420 -3.25000e+00 -2.50000e+00 3.730160e-03 421 -3.30000e+00 -2.50000e+00 3.742593e-03 422 -3.35000e+00 -2.50000e+00 3.754990e-03 423 -3.40000e+00 -2.50000e+00 3.767355e-03 424 -3.45000e+00 -2.50000e+00 3.779690e-03 425 -3.50000e+00 -2.50000e+00 3.791996e-03 426 0.000000e+00 -3.00000e+00 0.000000e+00 427 -5.00000e-02 -3.00000e+00 2.852091e-04 428 -1.00000e-01 -3.00000e+00 5.576523e-04 429 -1.50000e-01 -3.00000e+00 8.177804e-04 430 -2.00000e-01 -3.00000e+00 1.066023e-03 431 -2.50000e-01 -3.00000e+00 1.302791e-03 432 -3.00000e-01 -3.00000e+00 1.528476e-03 433 -3.50000e-01 -3.00000e+00 1.743451e-03 434 -4.00000e-01 -3.00000e+00 1.948074e-03 435 -4.50000e-01 -3.00000e+00 2.142687e-03 436 -5.00000e-01 -3.00000e+00 2.327615e-03 437 -5.50000e-01 -3.00000e+00 2.503173e-03 438 -6.00000e-01 -3.00000e+00 2.669659e-03 439 -6.50000e-01 -3.00000e+00 2.827359e-03 440 -7.00000e-01 -3.00000e+00 2.976547e-03 441 -7.50000e-01 -3.00000e+00 3.117485e-03 442 -8.00000e-01 -3.00000e+00 3.250423e-03 443 -8.50000e-01 -3.00000e+00 3.375601e-03 444 -9.00000e-01 -3.00000e+00 3.493242e-03 445 -9.50000e-01 -3.00000e+00 3.603558e-03 446 -1.00000e+00 -3.00000e+00 3.706742e-03 447 -1.05000e+00 -3.00000e+00 3.802962e-03 448 -1.10000e+00 -3.00000e+00 3.892352e-03 449 -1.15000e+00 -3.00000e+00 3.974994e-03 450 -1.20000e+00 -3.00000e+00 4.050916e-03 451 -1.25000e+00 -3.00000e+00 4.120107e-03 452 -1.30000e+00 -3.00000e+00 4.182610e-03 453 -1.35000e+00 -3.00000e+00 4.238655e-03 454 -1.40000e+00 -3.00000e+00 4.288733e-03 455 -1.45000e+00 -3.00000e+00 4.333536e-03 456 -1.50000e+00 -3.00000e+00 4.373830e-03 457 -1.55000e+00 -3.00000e+00 4.410338e-03 458 -1.60000e+00 -3.00000e+00 4.443692e-03 459 -1.65000e+00 -3.00000e+00 4.474418e-03 460 -1.70000e+00 -3.00000e+00 4.502947e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -3.00000e+00 4.529628e-03 462 -1.80000e+00 -3.00000e+00 4.554746e-03 463 -1.85000e+00 -3.00000e+00 4.578532e-03 464 -1.90000e+00 -3.00000e+00 4.601174e-03 465 -1.95000e+00 -3.00000e+00 4.622830e-03 466 -2.00000e+00 -3.00000e+00 4.643629e-03 467 -2.05000e+00 -3.00000e+00 4.663680e-03 468 -2.10000e+00 -3.00000e+00 4.683074e-03 469 -2.15000e+00 -3.00000e+00 4.701888e-03 470 -2.20000e+00 -3.00000e+00 4.720189e-03 471 -2.25000e+00 -3.00000e+00 4.738032e-03 472 -2.30000e+00 -3.00000e+00 4.755467e-03 473 -2.35000e+00 -3.00000e+00 4.772536e-03 474 -2.40000e+00 -3.00000e+00 4.789275e-03 475 -2.45000e+00 -3.00000e+00 4.805717e-03 476 -2.50000e+00 -3.00000e+00 4.821890e-03 477 -2.55000e+00 -3.00000e+00 4.837818e-03 478 -2.60000e+00 -3.00000e+00 4.853524e-03 479 -2.65000e+00 -3.00000e+00 4.869027e-03 480 -2.70000e+00 -3.00000e+00 4.884344e-03 481 -2.75000e+00 -3.00000e+00 4.899492e-03 482 -2.80000e+00 -3.00000e+00 4.914484e-03 483 -2.85000e+00 -3.00000e+00 4.929332e-03 484 -2.90000e+00 -3.00000e+00 4.944047e-03 485 -2.95000e+00 -3.00000e+00 4.958641e-03 486 -3.00000e+00 -3.00000e+00 4.973122e-03 487 -3.05000e+00 -3.00000e+00 4.987499e-03 488 -3.10000e+00 -3.00000e+00 5.001779e-03 489 -3.15000e+00 -3.00000e+00 5.015969e-03 490 -3.20000e+00 -3.00000e+00 5.030075e-03 491 -3.25000e+00 -3.00000e+00 5.044104e-03 492 -3.30000e+00 -3.00000e+00 5.058061e-03 493 -3.35000e+00 -3.00000e+00 5.071951e-03 494 -3.40000e+00 -3.00000e+00 5.085778e-03 495 -3.45000e+00 -3.00000e+00 5.099546e-03 496 -3.50000e+00 -3.00000e+00 5.113259e-03 497 0.000000e+00 -3.50000e+00 0.000000e+00 498 -5.00000e-02 -3.50000e+00 3.273234e-04 499 -1.00000e-01 -3.50000e+00 6.416669e-04 500 -1.50000e-01 -3.50000e+00 9.434627e-04 501 -2.00000e-01 -3.50000e+00 1.233124e-03 502 -2.50000e-01 -3.50000e+00 1.511047e-03 503 -3.00000e-01 -3.50000e+00 1.777610e-03 504 -3.50000e-01 -3.50000e+00 2.033174e-03 505 -4.00000e-01 -3.50000e+00 2.278088e-03 506 -4.50000e-01 -3.50000e+00 2.512685e-03 507 -5.00000e-01 -3.50000e+00 2.737282e-03 508 -5.50000e-01 -3.50000e+00 2.952186e-03 509 -6.00000e-01 -3.50000e+00 3.157690e-03 510 -6.50000e-01 -3.50000e+00 3.354075e-03 511 -7.00000e-01 -3.50000e+00 3.541613e-03 512 -7.50000e-01 -3.50000e+00 3.720561e-03 513 -8.00000e-01 -3.50000e+00 3.891168e-03 514 -8.50000e-01 -3.50000e+00 4.053673e-03 515 -9.00000e-01 -3.50000e+00 4.208303e-03 516 -9.50000e-01 -3.50000e+00 4.355275e-03 517 -1.00000e+00 -3.50000e+00 4.494796e-03 518 -1.05000e+00 -3.50000e+00 4.627058e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 -1.10000e+00 -3.50000e+00 4.752238e-03 520 -1.15000e+00 -3.50000e+00 4.870494e-03 521 -1.20000e+00 -3.50000e+00 4.981953e-03 522 -1.25000e+00 -3.50000e+00 5.086700e-03 523 -1.30000e+00 -3.50000e+00 5.184756e-03 524 -1.35000e+00 -3.50000e+00 5.276056e-03 525 -1.40000e+00 -3.50000e+00 5.360446e-03 526 -1.45000e+00 -3.50000e+00 5.437733e-03 527 -1.50000e+00 -3.50000e+00 5.507822e-03 528 -1.55000e+00 -3.50000e+00 5.570876e-03 529 -1.60000e+00 -3.50000e+00 5.627378e-03 530 -1.65000e+00 -3.50000e+00 5.678043e-03 531 -1.70000e+00 -3.50000e+00 5.723674e-03 532 -1.75000e+00 -3.50000e+00 5.765042e-03 533 -1.80000e+00 -3.50000e+00 5.802829e-03 534 -1.85000e+00 -3.50000e+00 5.837610e-03 535 -1.90000e+00 -3.50000e+00 5.869864e-03 536 -1.95000e+00 -3.50000e+00 5.899982e-03 537 -2.00000e+00 -3.50000e+00 5.928283e-03 538 -2.05000e+00 -3.50000e+00 5.955030e-03 539 -2.10000e+00 -3.50000e+00 5.980440e-03 540 -2.15000e+00 -3.50000e+00 6.004692e-03 541 -2.20000e+00 -3.50000e+00 6.027936e-03 542 -2.25000e+00 -3.50000e+00 6.050298e-03 543 -2.30000e+00 -3.50000e+00 6.071883e-03 544 -2.35000e+00 -3.50000e+00 6.092782e-03 545 -2.40000e+00 -3.50000e+00 6.113072e-03 546 -2.45000e+00 -3.50000e+00 6.132818e-03 547 -2.50000e+00 -3.50000e+00 6.152079e-03 548 -2.55000e+00 -3.50000e+00 6.170902e-03 549 -2.60000e+00 -3.50000e+00 6.189332e-03 550 -2.65000e+00 -3.50000e+00 6.207406e-03 551 -2.70000e+00 -3.50000e+00 6.225158e-03 552 -2.75000e+00 -3.50000e+00 6.242616e-03 553 -2.80000e+00 -3.50000e+00 6.259807e-03 554 -2.85000e+00 -3.50000e+00 6.276754e-03 555 -2.90000e+00 -3.50000e+00 6.293477e-03 556 -2.95000e+00 -3.50000e+00 6.309995e-03 557 -3.00000e+00 -3.50000e+00 6.326324e-03 558 -3.05000e+00 -3.50000e+00 6.342479e-03 559 -3.10000e+00 -3.50000e+00 6.358473e-03 560 -3.15000e+00 -3.50000e+00 6.374319e-03 561 -3.20000e+00 -3.50000e+00 6.390028e-03 562 -3.25000e+00 -3.50000e+00 6.405609e-03 563 -3.30000e+00 -3.50000e+00 6.421071e-03 564 -3.35000e+00 -3.50000e+00 6.436424e-03 565 -3.40000e+00 -3.50000e+00 6.451674e-03 566 -3.45000e+00 -3.50000e+00 6.466829e-03 567 -3.50000e+00 -3.50000e+00 6.481894e-03 Total run time: 1.080 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test8.cir0000644000265600020320000000045712264261473017422 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** ****************************************** *** circuit description *** m1 2 1 0 0 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -3.5 .options noacct .dc vds 0 -3.5 -0.05 vgs 0 -3.5 -0.5 .print dc v(1) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test11.out0000644000265600020320000003251412264261473017525 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Date: Tue Apr 20 23:15:21 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** DCtransferCurve Tue Apr 20 23:15:21 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -1.00000e-01 1.019932e-12 1 -5.00000e-02 -1.00000e-01 3.294985e-12 2 -1.00000e-01 -1.00000e-01 1.125051e-11 3 -1.50000e-01 -1.00000e-01 3.903447e-11 4 -2.00000e-01 -1.00000e-01 1.358394e-10 5 -2.50000e-01 -1.00000e-01 4.716728e-10 6 -3.00000e-01 -1.00000e-01 1.627686e-09 7 -3.50000e-01 -1.00000e-01 5.552992e-09 8 -4.00000e-01 -1.00000e-01 1.858492e-08 9 -4.50000e-01 -1.00000e-01 6.043447e-08 10 -5.00000e-01 -1.00000e-01 1.894482e-07 11 -5.50000e-01 -1.00000e-01 5.709760e-07 12 -6.00000e-01 -1.00000e-01 1.634724e-06 13 -6.50000e-01 -1.00000e-01 4.224264e-06 14 -7.00000e-01 -1.00000e-01 9.149857e-06 15 -7.50000e-01 -1.00000e-01 1.618982e-05 16 -8.00000e-01 -1.00000e-01 2.438603e-05 17 -8.50000e-01 -1.00000e-01 3.297174e-05 18 -9.00000e-01 -1.00000e-01 4.155486e-05 19 -9.50000e-01 -1.00000e-01 4.998207e-05 20 -1.00000e+00 -1.00000e-01 5.821243e-05 21 -1.05000e+00 -1.00000e-01 6.624776e-05 22 -1.10000e+00 -1.00000e-01 7.410143e-05 23 -1.15000e+00 -1.00000e-01 8.178614e-05 24 -1.20000e+00 -1.00000e-01 8.931457e-05 25 -1.25000e+00 -1.00000e-01 9.669606e-05 26 -1.30000e+00 -1.00000e-01 1.039373e-04 27 -1.35000e+00 -1.00000e-01 1.110436e-04 28 -1.40000e+00 -1.00000e-01 1.180192e-04 29 -1.45000e+00 -1.00000e-01 1.248676e-04 30 -1.50000e+00 -1.00000e-01 1.315923e-04 31 -1.55000e+00 -1.00000e-01 1.381962e-04 32 -1.60000e+00 -1.00000e-01 1.446824e-04 33 -1.65000e+00 -1.00000e-01 1.510535e-04 34 -1.70000e+00 -1.00000e-01 1.573125e-04 35 -1.75000e+00 -1.00000e-01 1.634619e-04 36 -1.80000e+00 -1.00000e-01 1.695044e-04 37 -1.85000e+00 -1.00000e-01 1.754426e-04 38 -1.90000e+00 -1.00000e-01 1.812788e-04 39 -1.95000e+00 -1.00000e-01 1.870157e-04 40 -2.00000e+00 -1.00000e-01 1.926554e-04 41 -2.05000e+00 -1.00000e-01 1.982003e-04 42 -2.10000e+00 -1.00000e-01 2.036526e-04 43 -2.15000e+00 -1.00000e-01 2.090146e-04 44 -2.20000e+00 -1.00000e-01 2.142882e-04 45 -2.25000e+00 -1.00000e-01 2.194757e-04 46 -2.30000e+00 -1.00000e-01 2.245789e-04 47 -2.35000e+00 -1.00000e-01 2.295998e-04 48 -2.40000e+00 -1.00000e-01 2.345403e-04 49 -2.45000e+00 -1.00000e-01 2.394022e-04 50 -2.50000e+00 -1.00000e-01 2.441873e-04 51 -2.55000e+00 -1.00000e-01 2.488972e-04 52 -2.60000e+00 -1.00000e-01 2.535338e-04 53 -2.65000e+00 -1.00000e-01 2.580986e-04 54 -2.70000e+00 -1.00000e-01 2.625932e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 -1.00000e-01 2.670191e-04 56 -2.80000e+00 -1.00000e-01 2.713778e-04 57 -2.85000e+00 -1.00000e-01 2.756708e-04 58 -2.90000e+00 -1.00000e-01 2.798994e-04 59 -2.95000e+00 -1.00000e-01 2.840652e-04 60 -3.00000e+00 -1.00000e-01 2.881692e-04 61 -3.05000e+00 -1.00000e-01 2.922130e-04 62 -3.10000e+00 -1.00000e-01 2.961977e-04 63 -3.15000e+00 -1.00000e-01 3.001246e-04 64 -3.20000e+00 -1.00000e-01 3.039948e-04 65 -3.25000e+00 -1.00000e-01 3.078095e-04 66 -3.30000e+00 -1.00000e-01 3.115699e-04 67 -3.35000e+00 -1.00000e-01 3.152770e-04 68 -3.40000e+00 -1.00000e-01 3.189320e-04 69 -3.45000e+00 -1.00000e-01 3.225357e-04 70 -3.50000e+00 -1.00000e-01 3.260894e-04 71 0.000000e+00 -1.10000e+00 7.210163e-12 72 -5.00000e-02 -1.10000e+00 2.229777e-11 73 -1.00000e-01 -1.10000e+00 7.460862e-11 74 -1.50000e-01 -1.10000e+00 2.554762e-10 75 -2.00000e-01 -1.10000e+00 8.776853e-10 76 -2.50000e-01 -1.10000e+00 2.998911e-09 77 -3.00000e-01 -1.10000e+00 1.011862e-08 78 -3.50000e-01 -1.10000e+00 3.342119e-08 79 -4.00000e-01 -1.10000e+00 1.069957e-07 80 -4.50000e-01 -1.10000e+00 3.297006e-07 81 -5.00000e-01 -1.10000e+00 9.754117e-07 82 -5.50000e-01 -1.10000e+00 2.729091e-06 83 -6.00000e-01 -1.10000e+00 6.901305e-06 84 -6.50000e-01 -1.10000e+00 1.506939e-05 85 -7.00000e-01 -1.10000e+00 2.816876e-05 86 -7.50000e-01 -1.10000e+00 4.611748e-05 87 -8.00000e-01 -1.10000e+00 6.826554e-05 88 -8.50000e-01 -1.10000e+00 9.392638e-05 89 -9.00000e-01 -1.10000e+00 1.225915e-04 90 -9.50000e-01 -1.10000e+00 1.539275e-04 91 -1.00000e+00 -1.10000e+00 1.877167e-04 92 -1.05000e+00 -1.10000e+00 2.238674e-04 93 -1.10000e+00 -1.10000e+00 2.623783e-04 94 -1.15000e+00 -1.10000e+00 3.029940e-04 95 -1.20000e+00 -1.10000e+00 3.455631e-04 96 -1.25000e+00 -1.10000e+00 3.899567e-04 97 -1.30000e+00 -1.10000e+00 4.360493e-04 98 -1.35000e+00 -1.10000e+00 4.837177e-04 99 -1.40000e+00 -1.10000e+00 5.328411e-04 100 -1.45000e+00 -1.10000e+00 5.833013e-04 101 -1.50000e+00 -1.10000e+00 6.349824e-04 102 -1.55000e+00 -1.10000e+00 6.877702e-04 103 -1.60000e+00 -1.10000e+00 7.415518e-04 104 -1.65000e+00 -1.10000e+00 7.962148e-04 105 -1.70000e+00 -1.10000e+00 8.516461e-04 106 -1.75000e+00 -1.10000e+00 9.077303e-04 107 -1.80000e+00 -1.10000e+00 9.643489e-04 108 -1.85000e+00 -1.10000e+00 1.021378e-03 109 -1.90000e+00 -1.10000e+00 1.078687e-03 110 -1.95000e+00 -1.10000e+00 1.136140e-03 111 -2.00000e+00 -1.10000e+00 1.193595e-03 112 -2.05000e+00 -1.10000e+00 1.250910e-03 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -1.10000e+00 1.307954e-03 114 -2.15000e+00 -1.10000e+00 1.364611e-03 115 -2.20000e+00 -1.10000e+00 1.420784e-03 116 -2.25000e+00 -1.10000e+00 1.476404e-03 117 -2.30000e+00 -1.10000e+00 1.531421e-03 118 -2.35000e+00 -1.10000e+00 1.585801e-03 119 -2.40000e+00 -1.10000e+00 1.639526e-03 120 -2.45000e+00 -1.10000e+00 1.692586e-03 121 -2.50000e+00 -1.10000e+00 1.744976e-03 122 -2.55000e+00 -1.10000e+00 1.796698e-03 123 -2.60000e+00 -1.10000e+00 1.847757e-03 124 -2.65000e+00 -1.10000e+00 1.898158e-03 125 -2.70000e+00 -1.10000e+00 1.947908e-03 126 -2.75000e+00 -1.10000e+00 1.997016e-03 127 -2.80000e+00 -1.10000e+00 2.045492e-03 128 -2.85000e+00 -1.10000e+00 2.093344e-03 129 -2.90000e+00 -1.10000e+00 2.140582e-03 130 -2.95000e+00 -1.10000e+00 2.187215e-03 131 -3.00000e+00 -1.10000e+00 2.233255e-03 132 -3.05000e+00 -1.10000e+00 2.278709e-03 133 -3.10000e+00 -1.10000e+00 2.323589e-03 134 -3.15000e+00 -1.10000e+00 2.367903e-03 135 -3.20000e+00 -1.10000e+00 2.411660e-03 136 -3.25000e+00 -1.10000e+00 2.454872e-03 137 -3.30000e+00 -1.10000e+00 2.497545e-03 138 -3.35000e+00 -1.10000e+00 2.539691e-03 139 -3.40000e+00 -1.10000e+00 2.581317e-03 140 -3.45000e+00 -1.10000e+00 2.622432e-03 141 -3.50000e+00 -1.10000e+00 2.663044e-03 142 0.000000e+00 -2.10000e+00 3.943374e-11 143 -5.00000e-02 -2.10000e+00 1.306565e-10 144 -1.00000e-01 -2.10000e+00 4.436255e-10 145 -1.50000e-01 -2.10000e+00 1.511057e-09 146 -2.00000e-01 -2.10000e+00 5.113849e-09 147 -2.50000e-01 -2.10000e+00 1.705933e-08 148 -3.00000e-01 -2.10000e+00 5.556549e-08 149 -3.50000e-01 -2.10000e+00 1.749246e-07 150 -4.00000e-01 -2.10000e+00 5.285548e-07 151 -4.50000e-01 -2.10000e+00 1.524832e-06 152 -5.00000e-01 -2.10000e+00 4.105048e-06 153 -5.50000e-01 -2.10000e+00 9.842184e-06 154 -6.00000e-01 -2.10000e+00 2.030813e-05 155 -6.50000e-01 -2.10000e+00 3.615860e-05 156 -7.00000e-01 -2.10000e+00 5.704014e-05 157 -7.50000e-01 -2.10000e+00 8.218442e-05 158 -8.00000e-01 -2.10000e+00 1.108943e-04 159 -8.50000e-01 -2.10000e+00 1.426873e-04 160 -9.00000e-01 -2.10000e+00 1.772588e-04 161 -9.50000e-01 -2.10000e+00 2.144194e-04 162 -1.00000e+00 -2.10000e+00 2.541677e-04 163 -1.05000e+00 -2.10000e+00 2.964543e-04 164 -1.10000e+00 -2.10000e+00 3.410235e-04 165 -1.15000e+00 -2.10000e+00 3.877471e-04 166 -1.20000e+00 -2.10000e+00 4.365124e-04 167 -1.25000e+00 -2.10000e+00 4.872108e-04 168 -1.30000e+00 -2.10000e+00 5.397379e-04 169 -1.35000e+00 -2.10000e+00 5.939933e-04 170 -1.40000e+00 -2.10000e+00 6.498813e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -2.10000e+00 7.073106e-04 172 -1.50000e+00 -2.10000e+00 7.661950e-04 173 -1.55000e+00 -2.10000e+00 8.264523e-04 174 -1.60000e+00 -2.10000e+00 8.880048e-04 175 -1.65000e+00 -2.10000e+00 9.507790e-04 176 -1.70000e+00 -2.10000e+00 1.014705e-03 177 -1.75000e+00 -2.10000e+00 1.079716e-03 178 -1.80000e+00 -2.10000e+00 1.145749e-03 179 -1.85000e+00 -2.10000e+00 1.212745e-03 180 -1.90000e+00 -2.10000e+00 1.280646e-03 181 -1.95000e+00 -2.10000e+00 1.349396e-03 182 -2.00000e+00 -2.10000e+00 1.418945e-03 183 -2.05000e+00 -2.10000e+00 1.489242e-03 184 -2.10000e+00 -2.10000e+00 1.560238e-03 185 -2.15000e+00 -2.10000e+00 1.631887e-03 186 -2.20000e+00 -2.10000e+00 1.704145e-03 187 -2.25000e+00 -2.10000e+00 1.776969e-03 188 -2.30000e+00 -2.10000e+00 1.850316e-03 189 -2.35000e+00 -2.10000e+00 1.924147e-03 190 -2.40000e+00 -2.10000e+00 1.998421e-03 191 -2.45000e+00 -2.10000e+00 2.073101e-03 192 -2.50000e+00 -2.10000e+00 2.148149e-03 193 -2.55000e+00 -2.10000e+00 2.223528e-03 194 -2.60000e+00 -2.10000e+00 2.299202e-03 195 -2.65000e+00 -2.10000e+00 2.375135e-03 196 -2.70000e+00 -2.10000e+00 2.451292e-03 197 -2.75000e+00 -2.10000e+00 2.527639e-03 198 -2.80000e+00 -2.10000e+00 2.604140e-03 199 -2.85000e+00 -2.10000e+00 2.680762e-03 200 -2.90000e+00 -2.10000e+00 2.757469e-03 201 -2.95000e+00 -2.10000e+00 2.834227e-03 202 -3.00000e+00 -2.10000e+00 2.911002e-03 203 -3.05000e+00 -2.10000e+00 2.987758e-03 204 -3.10000e+00 -2.10000e+00 3.064460e-03 205 -3.15000e+00 -2.10000e+00 3.141073e-03 206 -3.20000e+00 -2.10000e+00 3.217560e-03 207 -3.25000e+00 -2.10000e+00 3.293886e-03 208 -3.30000e+00 -2.10000e+00 3.370012e-03 209 -3.35000e+00 -2.10000e+00 3.445902e-03 210 -3.40000e+00 -2.10000e+00 3.521518e-03 211 -3.45000e+00 -2.10000e+00 3.596820e-03 212 -3.50000e+00 -2.10000e+00 3.671772e-03 213 0.000000e+00 -3.10000e+00 2.214446e-10 214 -5.00000e-02 -3.10000e+00 7.472944e-10 215 -1.00000e-01 -3.10000e+00 2.525024e-09 216 -1.50000e-01 -3.10000e+00 8.463025e-09 217 -2.00000e-01 -3.10000e+00 2.790031e-08 218 -2.50000e-01 -3.10000e+00 8.956684e-08 219 -3.00000e-01 -3.10000e+00 2.771287e-07 220 -3.50000e-01 -3.10000e+00 8.206800e-07 221 -4.00000e-01 -3.10000e+00 2.305074e-06 222 -4.50000e-01 -3.10000e+00 5.958924e-06 223 -5.00000e-01 -3.10000e+00 1.355445e-05 224 -5.50000e-01 -3.10000e+00 2.652343e-05 225 -6.00000e-01 -3.10000e+00 4.517039e-05 226 -6.50000e-01 -3.10000e+00 6.888119e-05 227 -7.00000e-01 -3.10000e+00 9.679773e-05 228 -7.50000e-01 -3.10000e+00 1.282275e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -3.10000e+00 1.627169e-04 230 -8.50000e-01 -3.10000e+00 1.999877e-04 231 -9.00000e-01 -3.10000e+00 2.398800e-04 232 -9.50000e-01 -3.10000e+00 2.824696e-04 233 -1.00000e+00 -3.10000e+00 3.275913e-04 234 -1.05000e+00 -3.10000e+00 3.750214e-04 235 -1.10000e+00 -3.10000e+00 4.246400e-04 236 -1.15000e+00 -3.10000e+00 4.763369e-04 237 -1.20000e+00 -3.10000e+00 5.300062e-04 238 -1.25000e+00 -3.10000e+00 5.855459e-04 239 -1.30000e+00 -3.10000e+00 6.428584e-04 240 -1.35000e+00 -3.10000e+00 7.018509e-04 241 -1.40000e+00 -3.10000e+00 7.624354e-04 242 -1.45000e+00 -3.10000e+00 8.245286e-04 243 -1.50000e+00 -3.10000e+00 8.880521e-04 244 -1.55000e+00 -3.10000e+00 9.529319e-04 245 -1.60000e+00 -3.10000e+00 1.019098e-03 246 -1.65000e+00 -3.10000e+00 1.086485e-03 247 -1.70000e+00 -3.10000e+00 1.155029e-03 248 -1.75000e+00 -3.10000e+00 1.224674e-03 249 -1.80000e+00 -3.10000e+00 1.295363e-03 250 -1.85000e+00 -3.10000e+00 1.367043e-03 251 -1.90000e+00 -3.10000e+00 1.439665e-03 252 -1.95000e+00 -3.10000e+00 1.513182e-03 253 -2.00000e+00 -3.10000e+00 1.587549e-03 254 -2.05000e+00 -3.10000e+00 1.662724e-03 255 -2.10000e+00 -3.10000e+00 1.738667e-03 256 -2.15000e+00 -3.10000e+00 1.815339e-03 257 -2.20000e+00 -3.10000e+00 1.892704e-03 258 -2.25000e+00 -3.10000e+00 1.970726e-03 259 -2.30000e+00 -3.10000e+00 2.049374e-03 260 -2.35000e+00 -3.10000e+00 2.128615e-03 261 -2.40000e+00 -3.10000e+00 2.208418e-03 262 -2.45000e+00 -3.10000e+00 2.288756e-03 263 -2.50000e+00 -3.10000e+00 2.369600e-03 264 -2.55000e+00 -3.10000e+00 2.450923e-03 265 -2.60000e+00 -3.10000e+00 2.532701e-03 266 -2.65000e+00 -3.10000e+00 2.614908e-03 267 -2.70000e+00 -3.10000e+00 2.697521e-03 268 -2.75000e+00 -3.10000e+00 2.780517e-03 269 -2.80000e+00 -3.10000e+00 2.863874e-03 270 -2.85000e+00 -3.10000e+00 2.947572e-03 271 -2.90000e+00 -3.10000e+00 3.031588e-03 272 -2.95000e+00 -3.10000e+00 3.115905e-03 273 -3.00000e+00 -3.10000e+00 3.200502e-03 274 -3.05000e+00 -3.10000e+00 3.285360e-03 275 -3.10000e+00 -3.10000e+00 3.370463e-03 276 -3.15000e+00 -3.10000e+00 3.455791e-03 277 -3.20000e+00 -3.10000e+00 3.541328e-03 278 -3.25000e+00 -3.10000e+00 3.627057e-03 279 -3.30000e+00 -3.10000e+00 3.712961e-03 280 -3.35000e+00 -3.10000e+00 3.799025e-03 281 -3.40000e+00 -3.10000e+00 3.885232e-03 282 -3.45000e+00 -3.10000e+00 3.971567e-03 283 -3.50000e+00 -3.10000e+00 4.058015e-03 Total run time: 0.770 seconds. Current data size = 233472, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test14.cir0000644000265600020320000000050212264261473017466 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -0.1 vbs 3 0 0.0 .dc vgs 0 -3.5 -0.05 vbs 0 3. 0.5 .options Temp=100.0 noacct .print dc v(2) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test12.cir0000644000265600020320000000046512264261473017474 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -0.1 vbs 3 0 0.0 .options noacct .dc vgs 0 -3.5 -0.05 vbs 0 3. 0.5 .print dc v(2) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test1.cir0000644000265600020320000000041712264261473017407 0ustar andreasadmin*****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** *** circuit description *** m1 2 1 0 0 n1 L=0.35u W=10.0u vgs 1 0 3.5 vds 2 0 3.5 .options noacct .dc vds 0 3.5 0.05 vgs 0 3.5 0.5 .print dc v(1) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test13.cir0000644000265600020320000000050112264261473017464 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -0.1 vbs 3 0 0.0 .dc vgs 0 -3.5 -0.05 vbs 0 3. 0.5 .options Temp=-55.0 noacct .print dc v(2) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test13.out0000644000265600020320000005602412264261473017531 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Date: Tue Apr 20 23:15:59 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** DCtransferCurve Tue Apr 20 23:15:58 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -1.00000e-01 1.105368e-13 1 -5.00000e-02 -1.00000e-01 1.115470e-13 2 -1.00000e-01 -1.00000e-01 1.283814e-13 3 -1.50000e-01 -1.00000e-01 2.133161e-13 4 -2.00000e-01 -1.00000e-01 6.895277e-13 5 -2.50000e-01 -1.00000e-01 3.357854e-12 6 -3.00000e-01 -1.00000e-01 1.828671e-11 7 -3.50000e-01 -1.00000e-01 1.015180e-10 8 -4.00000e-01 -1.00000e-01 5.617797e-10 9 -4.50000e-01 -1.00000e-01 3.060700e-09 10 -5.00000e-01 -1.00000e-01 1.611460e-08 11 -5.50000e-01 -1.00000e-01 7.971313e-08 12 -6.00000e-01 -1.00000e-01 3.615412e-07 13 -6.50000e-01 -1.00000e-01 1.481650e-06 14 -7.00000e-01 -1.00000e-01 5.114110e-06 15 -7.50000e-01 -1.00000e-01 1.336582e-05 16 -8.00000e-01 -1.00000e-01 2.603395e-05 17 -8.50000e-01 -1.00000e-01 4.090993e-05 18 -9.00000e-01 -1.00000e-01 5.646187e-05 19 -9.50000e-01 -1.00000e-01 7.208457e-05 20 -1.00000e+00 -1.00000e-01 8.757843e-05 21 -1.05000e+00 -1.00000e-01 1.028831e-04 22 -1.10000e+00 -1.00000e-01 1.179812e-04 23 -1.15000e+00 -1.00000e-01 1.328677e-04 24 -1.20000e+00 -1.00000e-01 1.475370e-04 25 -1.25000e+00 -1.00000e-01 1.619894e-04 26 -1.30000e+00 -1.00000e-01 1.762295e-04 27 -1.35000e+00 -1.00000e-01 1.902598e-04 28 -1.40000e+00 -1.00000e-01 2.040829e-04 29 -1.45000e+00 -1.00000e-01 2.177019e-04 30 -1.50000e+00 -1.00000e-01 2.311201e-04 31 -1.55000e+00 -1.00000e-01 2.443410e-04 32 -1.60000e+00 -1.00000e-01 2.573685e-04 33 -1.65000e+00 -1.00000e-01 2.702061e-04 34 -1.70000e+00 -1.00000e-01 2.828578e-04 35 -1.75000e+00 -1.00000e-01 2.953272e-04 36 -1.80000e+00 -1.00000e-01 3.076182e-04 37 -1.85000e+00 -1.00000e-01 3.197344e-04 38 -1.90000e+00 -1.00000e-01 3.316795e-04 39 -1.95000e+00 -1.00000e-01 3.434570e-04 40 -2.00000e+00 -1.00000e-01 3.550706e-04 41 -2.05000e+00 -1.00000e-01 3.665236e-04 42 -2.10000e+00 -1.00000e-01 3.778194e-04 43 -2.15000e+00 -1.00000e-01 3.889613e-04 44 -2.20000e+00 -1.00000e-01 3.999526e-04 45 -2.25000e+00 -1.00000e-01 4.107963e-04 46 -2.30000e+00 -1.00000e-01 4.214954e-04 47 -2.35000e+00 -1.00000e-01 4.320531e-04 48 -2.40000e+00 -1.00000e-01 4.424722e-04 49 -2.45000e+00 -1.00000e-01 4.527555e-04 50 -2.50000e+00 -1.00000e-01 4.629057e-04 51 -2.55000e+00 -1.00000e-01 4.729257e-04 52 -2.60000e+00 -1.00000e-01 4.828179e-04 53 -2.65000e+00 -1.00000e-01 4.925850e-04 54 -2.70000e+00 -1.00000e-01 5.022295e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 -1.00000e-01 5.117537e-04 56 -2.80000e+00 -1.00000e-01 5.211601e-04 57 -2.85000e+00 -1.00000e-01 5.304509e-04 58 -2.90000e+00 -1.00000e-01 5.396284e-04 59 -2.95000e+00 -1.00000e-01 5.486949e-04 60 -3.00000e+00 -1.00000e-01 5.576523e-04 61 -3.05000e+00 -1.00000e-01 5.665028e-04 62 -3.10000e+00 -1.00000e-01 5.752485e-04 63 -3.15000e+00 -1.00000e-01 5.838913e-04 64 -3.20000e+00 -1.00000e-01 5.924332e-04 65 -3.25000e+00 -1.00000e-01 6.008760e-04 66 -3.30000e+00 -1.00000e-01 6.092215e-04 67 -3.35000e+00 -1.00000e-01 6.174717e-04 68 -3.40000e+00 -1.00000e-01 6.256282e-04 69 -3.45000e+00 -1.00000e-01 6.336927e-04 70 -3.50000e+00 -1.00000e-01 6.416669e-04 71 0.000000e+00 -1.00000e-01 6.100015e-13 72 -5.00000e-02 -1.00000e-01 6.100043e-13 73 -1.00000e-01 -1.00000e-01 6.100640e-13 74 -1.50000e-01 -1.00000e-01 6.104171e-13 75 -2.00000e-01 -1.00000e-01 6.127186e-13 76 -2.50000e-01 -1.00000e-01 6.277200e-13 77 -3.00000e-01 -1.00000e-01 7.254858e-13 78 -3.50000e-01 -1.00000e-01 1.362394e-12 79 -4.00000e-01 -1.00000e-01 5.507582e-12 80 -4.50000e-01 -1.00000e-01 3.241912e-11 81 -5.00000e-01 -1.00000e-01 2.060510e-10 82 -5.50000e-01 -1.00000e-01 1.309226e-09 83 -6.00000e-01 -1.00000e-01 8.069821e-09 84 -6.50000e-01 -1.00000e-01 4.650298e-08 85 -7.00000e-01 -1.00000e-01 2.400284e-07 86 -7.50000e-01 -1.00000e-01 1.084099e-06 87 -8.00000e-01 -1.00000e-01 4.069364e-06 88 -8.50000e-01 -1.00000e-01 1.143803e-05 89 -9.00000e-01 -1.00000e-01 2.344109e-05 90 -9.50000e-01 -1.00000e-01 3.794789e-05 91 -1.00000e+00 -1.00000e-01 5.329971e-05 92 -1.05000e+00 -1.00000e-01 6.882105e-05 93 -1.10000e+00 -1.00000e-01 8.427857e-05 94 -1.15000e+00 -1.00000e-01 9.959192e-05 95 -1.20000e+00 -1.00000e-01 1.147311e-04 96 -1.25000e+00 -1.00000e-01 1.296833e-04 97 -1.30000e+00 -1.00000e-01 1.444390e-04 98 -1.35000e+00 -1.00000e-01 1.589930e-04 99 -1.40000e+00 -1.00000e-01 1.733486e-04 100 -1.45000e+00 -1.00000e-01 1.875071e-04 101 -1.50000e+00 -1.00000e-01 2.014704e-04 102 -1.55000e+00 -1.00000e-01 2.152406e-04 103 -1.60000e+00 -1.00000e-01 2.288206e-04 104 -1.65000e+00 -1.00000e-01 2.422133e-04 105 -1.70000e+00 -1.00000e-01 2.554219e-04 106 -1.75000e+00 -1.00000e-01 2.684497e-04 107 -1.80000e+00 -1.00000e-01 2.812999e-04 108 -1.85000e+00 -1.00000e-01 2.939760e-04 109 -1.90000e+00 -1.00000e-01 3.064813e-04 110 -1.95000e+00 -1.00000e-01 3.188192e-04 111 -2.00000e+00 -1.00000e-01 3.309928e-04 112 -2.05000e+00 -1.00000e-01 3.430055e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -1.00000e-01 3.548605e-04 114 -2.15000e+00 -1.00000e-01 3.665608e-04 115 -2.20000e+00 -1.00000e-01 3.781096e-04 116 -2.25000e+00 -1.00000e-01 3.895098e-04 117 -2.30000e+00 -1.00000e-01 4.007644e-04 118 -2.35000e+00 -1.00000e-01 4.118762e-04 119 -2.40000e+00 -1.00000e-01 4.228481e-04 120 -2.45000e+00 -1.00000e-01 4.336828e-04 121 -2.50000e+00 -1.00000e-01 4.443830e-04 122 -2.55000e+00 -1.00000e-01 4.549513e-04 123 -2.60000e+00 -1.00000e-01 4.653902e-04 124 -2.65000e+00 -1.00000e-01 4.757022e-04 125 -2.70000e+00 -1.00000e-01 4.858898e-04 126 -2.75000e+00 -1.00000e-01 4.959553e-04 127 -2.80000e+00 -1.00000e-01 5.059011e-04 128 -2.85000e+00 -1.00000e-01 5.157294e-04 129 -2.90000e+00 -1.00000e-01 5.254424e-04 130 -2.95000e+00 -1.00000e-01 5.350423e-04 131 -3.00000e+00 -1.00000e-01 5.445311e-04 132 -3.05000e+00 -1.00000e-01 5.539110e-04 133 -3.10000e+00 -1.00000e-01 5.631838e-04 134 -3.15000e+00 -1.00000e-01 5.723517e-04 135 -3.20000e+00 -1.00000e-01 5.814164e-04 136 -3.25000e+00 -1.00000e-01 5.903799e-04 137 -3.30000e+00 -1.00000e-01 5.992439e-04 138 -3.35000e+00 -1.00000e-01 6.080103e-04 139 -3.40000e+00 -1.00000e-01 6.166807e-04 140 -3.45000e+00 -1.00000e-01 6.252570e-04 141 -3.50000e+00 -1.00000e-01 6.337406e-04 142 0.000000e+00 -1.00000e-01 1.110000e-12 143 -5.00000e-02 -1.00000e-01 1.110000e-12 144 -1.00000e-01 -1.00000e-01 1.110001e-12 145 -1.50000e-01 -1.00000e-01 1.110006e-12 146 -2.00000e-01 -1.00000e-01 1.110045e-12 147 -2.50000e-01 -1.00000e-01 1.110322e-12 148 -3.00000e-01 -1.00000e-01 1.112304e-12 149 -3.50000e-01 -1.00000e-01 1.126474e-12 150 -4.00000e-01 -1.00000e-01 1.227764e-12 151 -4.50000e-01 -1.00000e-01 1.951476e-12 152 -5.00000e-01 -1.00000e-01 7.115999e-12 153 -5.50000e-01 -1.00000e-01 4.385030e-11 154 -6.00000e-01 -1.00000e-01 3.028918e-10 155 -6.50000e-01 -1.00000e-01 2.089701e-09 156 -7.00000e-01 -1.00000e-01 1.378102e-08 157 -7.50000e-01 -1.00000e-01 8.251534e-08 158 -8.00000e-01 -1.00000e-01 4.276483e-07 159 -8.50000e-01 -1.00000e-01 1.872478e-06 160 -9.00000e-01 -1.00000e-01 6.421791e-06 161 -9.50000e-01 -1.00000e-01 1.587516e-05 162 -1.00000e+00 -1.00000e-01 2.915170e-05 163 -1.05000e+00 -1.00000e-01 4.406591e-05 164 -1.10000e+00 -1.00000e-01 5.946503e-05 165 -1.15000e+00 -1.00000e-01 7.492684e-05 166 -1.20000e+00 -1.00000e-01 9.030357e-05 167 -1.25000e+00 -1.00000e-01 1.055398e-04 168 -1.30000e+00 -1.00000e-01 1.206117e-04 169 -1.35000e+00 -1.00000e-01 1.355074e-04 170 -1.40000e+00 -1.00000e-01 1.502154e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e-01 1.647349e-04 172 -1.50000e+00 -1.00000e-01 1.790676e-04 173 -1.55000e+00 -1.00000e-01 1.932143e-04 174 -1.60000e+00 -1.00000e-01 2.071766e-04 175 -1.65000e+00 -1.00000e-01 2.209566e-04 176 -1.70000e+00 -1.00000e-01 2.345566e-04 177 -1.75000e+00 -1.00000e-01 2.479794e-04 178 -1.80000e+00 -1.00000e-01 2.612279e-04 179 -1.85000e+00 -1.00000e-01 2.743048e-04 180 -1.90000e+00 -1.00000e-01 2.872134e-04 181 -1.95000e+00 -1.00000e-01 2.999565e-04 182 -2.00000e+00 -1.00000e-01 3.125372e-04 183 -2.05000e+00 -1.00000e-01 3.249585e-04 184 -2.10000e+00 -1.00000e-01 3.372234e-04 185 -2.15000e+00 -1.00000e-01 3.493349e-04 186 -2.20000e+00 -1.00000e-01 3.612957e-04 187 -2.25000e+00 -1.00000e-01 3.731088e-04 188 -2.30000e+00 -1.00000e-01 3.847770e-04 189 -2.35000e+00 -1.00000e-01 3.963029e-04 190 -2.40000e+00 -1.00000e-01 4.076893e-04 191 -2.45000e+00 -1.00000e-01 4.189388e-04 192 -2.50000e+00 -1.00000e-01 4.300539e-04 193 -2.55000e+00 -1.00000e-01 4.410372e-04 194 -2.60000e+00 -1.00000e-01 4.518911e-04 195 -2.65000e+00 -1.00000e-01 4.626180e-04 196 -2.70000e+00 -1.00000e-01 4.732203e-04 197 -2.75000e+00 -1.00000e-01 4.837002e-04 198 -2.80000e+00 -1.00000e-01 4.940601e-04 199 -2.85000e+00 -1.00000e-01 5.043020e-04 200 -2.90000e+00 -1.00000e-01 5.144282e-04 201 -2.95000e+00 -1.00000e-01 5.244406e-04 202 -3.00000e+00 -1.00000e-01 5.343414e-04 203 -3.05000e+00 -1.00000e-01 5.441326e-04 204 -3.10000e+00 -1.00000e-01 5.538161e-04 205 -3.15000e+00 -1.00000e-01 5.633938e-04 206 -3.20000e+00 -1.00000e-01 5.728675e-04 207 -3.25000e+00 -1.00000e-01 5.822392e-04 208 -3.30000e+00 -1.00000e-01 5.915105e-04 209 -3.35000e+00 -1.00000e-01 6.006832e-04 210 -3.40000e+00 -1.00000e-01 6.097590e-04 211 -3.45000e+00 -1.00000e-01 6.187396e-04 212 -3.50000e+00 -1.00000e-01 6.276265e-04 213 0.000000e+00 -1.00000e-01 1.610000e-12 214 -5.00000e-02 -1.00000e-01 1.610000e-12 215 -1.00000e-01 -1.00000e-01 1.610000e-12 216 -1.50000e-01 -1.00000e-01 1.610000e-12 217 -2.00000e-01 -1.00000e-01 1.610002e-12 218 -2.50000e-01 -1.00000e-01 1.610013e-12 219 -3.00000e-01 -1.00000e-01 1.610096e-12 220 -3.50000e-01 -1.00000e-01 1.610732e-12 221 -4.00000e-01 -1.00000e-01 1.615601e-12 222 -4.50000e-01 -1.00000e-01 1.652845e-12 223 -5.00000e-01 -1.00000e-01 1.937644e-12 224 -5.50000e-01 -1.00000e-01 4.113556e-12 225 -6.00000e-01 -1.00000e-01 2.069764e-11 226 -6.50000e-01 -1.00000e-01 1.462615e-10 227 -7.00000e-01 -1.00000e-01 1.080220e-09 228 -7.50000e-01 -1.00000e-01 7.720812e-09 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.00000e-01 5.044093e-08 230 -8.50000e-01 -1.00000e-01 2.831635e-07 231 -9.00000e-01 -1.00000e-01 1.327550e-06 232 -9.50000e-01 -1.00000e-01 4.932179e-06 233 -1.00000e+00 -1.00000e-01 1.324675e-05 234 -1.05000e+00 -1.00000e-01 2.584206e-05 235 -1.10000e+00 -1.00000e-01 4.047243e-05 236 -1.15000e+00 -1.00000e-01 5.576007e-05 237 -1.20000e+00 -1.00000e-01 7.118350e-05 238 -1.25000e+00 -1.00000e-01 8.655889e-05 239 -1.30000e+00 -1.00000e-01 1.018168e-04 240 -1.35000e+00 -1.00000e-01 1.169272e-04 241 -1.40000e+00 -1.00000e-01 1.318753e-04 242 -1.45000e+00 -1.00000e-01 1.466489e-04 243 -1.50000e+00 -1.00000e-01 1.612432e-04 244 -1.55000e+00 -1.00000e-01 1.756602e-04 245 -1.60000e+00 -1.00000e-01 1.899001e-04 246 -1.65000e+00 -1.00000e-01 2.039640e-04 247 -1.70000e+00 -1.00000e-01 2.178535e-04 248 -1.75000e+00 -1.00000e-01 2.315706e-04 249 -1.80000e+00 -1.00000e-01 2.451176e-04 250 -1.85000e+00 -1.00000e-01 2.584970e-04 251 -1.90000e+00 -1.00000e-01 2.717115e-04 252 -1.95000e+00 -1.00000e-01 2.847638e-04 253 -2.00000e+00 -1.00000e-01 2.976566e-04 254 -2.05000e+00 -1.00000e-01 3.103926e-04 255 -2.10000e+00 -1.00000e-01 3.229746e-04 256 -2.15000e+00 -1.00000e-01 3.354054e-04 257 -2.20000e+00 -1.00000e-01 3.476876e-04 258 -2.25000e+00 -1.00000e-01 3.598239e-04 259 -2.30000e+00 -1.00000e-01 3.718170e-04 260 -2.35000e+00 -1.00000e-01 3.836694e-04 261 -2.40000e+00 -1.00000e-01 3.953836e-04 262 -2.45000e+00 -1.00000e-01 4.069623e-04 263 -2.50000e+00 -1.00000e-01 4.184077e-04 264 -2.55000e+00 -1.00000e-01 4.297224e-04 265 -2.60000e+00 -1.00000e-01 4.409086e-04 266 -2.65000e+00 -1.00000e-01 4.519687e-04 267 -2.70000e+00 -1.00000e-01 4.629049e-04 268 -2.75000e+00 -1.00000e-01 4.737194e-04 269 -2.80000e+00 -1.00000e-01 4.844144e-04 270 -2.85000e+00 -1.00000e-01 4.949920e-04 271 -2.90000e+00 -1.00000e-01 5.054542e-04 272 -2.95000e+00 -1.00000e-01 5.158030e-04 273 -3.00000e+00 -1.00000e-01 5.260404e-04 274 -3.05000e+00 -1.00000e-01 5.361684e-04 275 -3.10000e+00 -1.00000e-01 5.461889e-04 276 -3.15000e+00 -1.00000e-01 5.561036e-04 277 -3.20000e+00 -1.00000e-01 5.659144e-04 278 -3.25000e+00 -1.00000e-01 5.756231e-04 279 -3.30000e+00 -1.00000e-01 5.852313e-04 280 -3.35000e+00 -1.00000e-01 5.947408e-04 281 -3.40000e+00 -1.00000e-01 6.041533e-04 282 -3.45000e+00 -1.00000e-01 6.134702e-04 283 -3.50000e+00 -1.00000e-01 6.226933e-04 284 0.000000e+00 -1.00000e-01 2.110000e-12 285 -5.00000e-02 -1.00000e-01 2.110000e-12 286 -1.00000e-01 -1.00000e-01 2.110000e-12 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -1.00000e-01 2.110000e-12 288 -2.00000e-01 -1.00000e-01 2.110000e-12 289 -2.50000e-01 -1.00000e-01 2.110001e-12 290 -3.00000e-01 -1.00000e-01 2.110006e-12 291 -3.50000e-01 -1.00000e-01 2.110052e-12 292 -4.00000e-01 -1.00000e-01 2.110419e-12 293 -4.50000e-01 -1.00000e-01 2.113393e-12 294 -5.00000e-01 -1.00000e-01 2.137472e-12 295 -5.50000e-01 -1.00000e-01 2.332397e-12 296 -6.00000e-01 -1.00000e-01 3.909033e-12 297 -6.50000e-01 -1.00000e-01 1.663228e-11 298 -7.00000e-01 -1.00000e-01 1.186448e-10 299 -7.50000e-01 -1.00000e-01 9.220723e-10 300 -8.00000e-01 -1.00000e-01 6.960208e-09 301 -8.50000e-01 -1.00000e-01 4.773297e-08 302 -9.00000e-01 -1.00000e-01 2.772672e-07 303 -9.50000e-01 -1.00000e-01 1.323898e-06 304 -1.00000e+00 -1.00000e-01 4.958649e-06 305 -1.05000e+00 -1.00000e-01 1.333143e-05 306 -1.10000e+00 -1.00000e-01 2.594422e-05 307 -1.15000e+00 -1.00000e-01 4.054344e-05 308 -1.20000e+00 -1.00000e-01 5.578664e-05 309 -1.25000e+00 -1.00000e-01 7.117091e-05 310 -1.30000e+00 -1.00000e-01 8.651773e-05 311 -1.35000e+00 -1.00000e-01 1.017581e-04 312 -1.40000e+00 -1.00000e-01 1.168616e-04 313 -1.45000e+00 -1.00000e-01 1.318124e-04 314 -1.50000e+00 -1.00000e-01 1.465981e-04 315 -1.55000e+00 -1.00000e-01 1.612133e-04 316 -1.60000e+00 -1.00000e-01 1.756598e-04 317 -1.65000e+00 -1.00000e-01 1.899374e-04 318 -1.70000e+00 -1.00000e-01 2.040468e-04 319 -1.75000e+00 -1.00000e-01 2.179895e-04 320 -1.80000e+00 -1.00000e-01 2.317672e-04 321 -1.85000e+00 -1.00000e-01 2.453818e-04 322 -1.90000e+00 -1.00000e-01 2.588356e-04 323 -1.95000e+00 -1.00000e-01 2.721311e-04 324 -2.00000e+00 -1.00000e-01 2.852706e-04 325 -2.05000e+00 -1.00000e-01 2.982567e-04 326 -2.10000e+00 -1.00000e-01 3.110919e-04 327 -2.15000e+00 -1.00000e-01 3.237786e-04 328 -2.20000e+00 -1.00000e-01 3.363195e-04 329 -2.25000e+00 -1.00000e-01 3.487170e-04 330 -2.30000e+00 -1.00000e-01 3.609736e-04 331 -2.35000e+00 -1.00000e-01 3.730918e-04 332 -2.40000e+00 -1.00000e-01 3.850738e-04 333 -2.45000e+00 -1.00000e-01 3.969221e-04 334 -2.50000e+00 -1.00000e-01 4.086391e-04 335 -2.55000e+00 -1.00000e-01 4.202269e-04 336 -2.60000e+00 -1.00000e-01 4.316879e-04 337 -2.65000e+00 -1.00000e-01 4.430241e-04 338 -2.70000e+00 -1.00000e-01 4.542379e-04 339 -2.75000e+00 -1.00000e-01 4.653312e-04 340 -2.80000e+00 -1.00000e-01 4.763061e-04 341 -2.85000e+00 -1.00000e-01 4.871647e-04 342 -2.90000e+00 -1.00000e-01 4.979089e-04 343 -2.95000e+00 -1.00000e-01 5.085407e-04 344 -3.00000e+00 -1.00000e-01 5.190620e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -1.00000e-01 5.294745e-04 346 -3.10000e+00 -1.00000e-01 5.397802e-04 347 -3.15000e+00 -1.00000e-01 5.499809e-04 348 -3.20000e+00 -1.00000e-01 5.600782e-04 349 -3.25000e+00 -1.00000e-01 5.700738e-04 350 -3.30000e+00 -1.00000e-01 5.799695e-04 351 -3.35000e+00 -1.00000e-01 5.897668e-04 352 -3.40000e+00 -1.00000e-01 5.994675e-04 353 -3.45000e+00 -1.00000e-01 6.090729e-04 354 -3.50000e+00 -1.00000e-01 6.185847e-04 355 0.000000e+00 -1.00000e-01 2.610000e-12 356 -5.00000e-02 -1.00000e-01 2.610000e-12 357 -1.00000e-01 -1.00000e-01 2.610000e-12 358 -1.50000e-01 -1.00000e-01 2.610000e-12 359 -2.00000e-01 -1.00000e-01 2.610000e-12 360 -2.50000e-01 -1.00000e-01 2.610000e-12 361 -3.00000e-01 -1.00000e-01 2.610001e-12 362 -3.50000e-01 -1.00000e-01 2.610005e-12 363 -4.00000e-01 -1.00000e-01 2.610042e-12 364 -4.50000e-01 -1.00000e-01 2.610361e-12 365 -5.00000e-01 -1.00000e-01 2.613080e-12 366 -5.50000e-01 -1.00000e-01 2.636304e-12 367 -6.00000e-01 -1.00000e-01 2.834570e-12 368 -6.50000e-01 -1.00000e-01 4.525701e-12 369 -7.00000e-01 -1.00000e-01 1.891245e-11 370 -7.50000e-01 -1.00000e-01 1.403761e-10 371 -8.00000e-01 -1.00000e-01 1.144076e-09 372 -8.50000e-01 -1.00000e-01 8.978644e-09 373 -9.00000e-01 -1.00000e-01 6.274616e-08 374 -9.50000e-01 -1.00000e-01 3.626513e-07 375 -1.00000e+00 -1.00000e-01 1.693730e-06 376 -1.05000e+00 -1.00000e-01 6.059780e-06 377 -1.10000e+00 -1.00000e-01 1.534420e-05 378 -1.15000e+00 -1.00000e-01 2.845475e-05 379 -1.20000e+00 -1.00000e-01 4.319474e-05 380 -1.25000e+00 -1.00000e-01 5.844243e-05 381 -1.30000e+00 -1.00000e-01 7.379161e-05 382 -1.35000e+00 -1.00000e-01 8.909572e-05 383 -1.40000e+00 -1.00000e-01 1.042958e-04 384 -1.45000e+00 -1.00000e-01 1.193647e-04 385 -1.50000e+00 -1.00000e-01 1.342875e-04 386 -1.55000e+00 -1.00000e-01 1.490513e-04 387 -1.60000e+00 -1.00000e-01 1.636531e-04 388 -1.65000e+00 -1.00000e-01 1.780938e-04 389 -1.70000e+00 -1.00000e-01 1.923731e-04 390 -1.75000e+00 -1.00000e-01 2.064917e-04 391 -1.80000e+00 -1.00000e-01 2.204507e-04 392 -1.85000e+00 -1.00000e-01 2.342516e-04 393 -1.90000e+00 -1.00000e-01 2.478964e-04 394 -1.95000e+00 -1.00000e-01 2.613870e-04 395 -2.00000e+00 -1.00000e-01 2.747256e-04 396 -2.05000e+00 -1.00000e-01 2.879145e-04 397 -2.10000e+00 -1.00000e-01 3.009560e-04 398 -2.15000e+00 -1.00000e-01 3.138523e-04 399 -2.20000e+00 -1.00000e-01 3.266059e-04 400 -2.25000e+00 -1.00000e-01 3.392190e-04 401 -2.30000e+00 -1.00000e-01 3.516939e-04 402 -2.35000e+00 -1.00000e-01 3.640330e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -1.00000e-01 3.762385e-04 404 -2.45000e+00 -1.00000e-01 3.883125e-04 405 -2.50000e+00 -1.00000e-01 4.002574e-04 406 -2.55000e+00 -1.00000e-01 4.120753e-04 407 -2.60000e+00 -1.00000e-01 4.237683e-04 408 -2.65000e+00 -1.00000e-01 4.353384e-04 409 -2.70000e+00 -1.00000e-01 4.467878e-04 410 -2.75000e+00 -1.00000e-01 4.581184e-04 411 -2.80000e+00 -1.00000e-01 4.693322e-04 412 -2.85000e+00 -1.00000e-01 4.804312e-04 413 -2.90000e+00 -1.00000e-01 4.914172e-04 414 -2.95000e+00 -1.00000e-01 5.022921e-04 415 -3.00000e+00 -1.00000e-01 5.130577e-04 416 -3.05000e+00 -1.00000e-01 5.237157e-04 417 -3.10000e+00 -1.00000e-01 5.342680e-04 418 -3.15000e+00 -1.00000e-01 5.447163e-04 419 -3.20000e+00 -1.00000e-01 5.550622e-04 420 -3.25000e+00 -1.00000e-01 5.653073e-04 421 -3.30000e+00 -1.00000e-01 5.754533e-04 422 -3.35000e+00 -1.00000e-01 5.855017e-04 423 -3.40000e+00 -1.00000e-01 5.954542e-04 424 -3.45000e+00 -1.00000e-01 6.053121e-04 425 -3.50000e+00 -1.00000e-01 6.150770e-04 426 0.000000e+00 -1.00000e-01 3.110000e-12 427 -5.00000e-02 -1.00000e-01 3.110000e-12 428 -1.00000e-01 -1.00000e-01 3.110000e-12 429 -1.50000e-01 -1.00000e-01 3.110000e-12 430 -2.00000e-01 -1.00000e-01 3.110000e-12 431 -2.50000e-01 -1.00000e-01 3.110000e-12 432 -3.00000e-01 -1.00000e-01 3.110000e-12 433 -3.50000e-01 -1.00000e-01 3.110001e-12 434 -4.00000e-01 -1.00000e-01 3.110005e-12 435 -4.50000e-01 -1.00000e-01 3.110046e-12 436 -5.00000e-01 -1.00000e-01 3.110418e-12 437 -5.50000e-01 -1.00000e-01 3.113769e-12 438 -6.00000e-01 -1.00000e-01 3.143959e-12 439 -6.50000e-01 -1.00000e-01 3.415855e-12 440 -7.00000e-01 -1.00000e-01 5.861753e-12 441 -7.50000e-01 -1.00000e-01 2.778744e-11 442 -8.00000e-01 -1.00000e-01 2.223120e-10 443 -8.50000e-01 -1.00000e-01 1.897656e-09 444 -9.00000e-01 -1.00000e-01 1.524036e-08 445 -9.50000e-01 -1.00000e-01 1.051757e-07 446 -1.00000e+00 -1.00000e-01 5.834219e-07 447 -1.05000e+00 -1.00000e-01 2.567098e-06 448 -1.10000e+00 -1.00000e-01 8.355427e-06 449 -1.15000e+00 -1.00000e-01 1.907167e-05 450 -1.20000e+00 -1.00000e-01 3.285029e-05 451 -1.25000e+00 -1.00000e-01 4.777811e-05 452 -1.30000e+00 -1.00000e-01 6.304125e-05 453 -1.35000e+00 -1.00000e-01 7.835190e-05 454 -1.40000e+00 -1.00000e-01 9.360246e-05 455 -1.45000e+00 -1.00000e-01 1.087470e-04 456 -1.50000e+00 -1.00000e-01 1.237631e-04 457 -1.55000e+00 -1.00000e-01 1.386371e-04 458 -1.60000e+00 -1.00000e-01 1.533569e-04 459 -1.65000e+00 -1.00000e-01 1.679227e-04 460 -1.70000e+00 -1.00000e-01 1.823341e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -1.00000e-01 1.965912e-04 462 -1.80000e+00 -1.00000e-01 2.106943e-04 463 -1.85000e+00 -1.00000e-01 2.246446e-04 464 -1.90000e+00 -1.00000e-01 2.384436e-04 465 -1.95000e+00 -1.00000e-01 2.520928e-04 466 -2.00000e+00 -1.00000e-01 2.655944e-04 467 -2.05000e+00 -1.00000e-01 2.789501e-04 468 -2.10000e+00 -1.00000e-01 2.921621e-04 469 -2.15000e+00 -1.00000e-01 3.052325e-04 470 -2.20000e+00 -1.00000e-01 3.181635e-04 471 -2.25000e+00 -1.00000e-01 3.309573e-04 472 -2.30000e+00 -1.00000e-01 3.436158e-04 473 -2.35000e+00 -1.00000e-01 3.561414e-04 474 -2.40000e+00 -1.00000e-01 3.685361e-04 475 -2.45000e+00 -1.00000e-01 3.808021e-04 476 -2.50000e+00 -1.00000e-01 3.929413e-04 477 -2.55000e+00 -1.00000e-01 4.049559e-04 478 -2.60000e+00 -1.00000e-01 4.168478e-04 479 -2.65000e+00 -1.00000e-01 4.286191e-04 480 -2.70000e+00 -1.00000e-01 4.402716e-04 481 -2.75000e+00 -1.00000e-01 4.518074e-04 482 -2.80000e+00 -1.00000e-01 4.632282e-04 483 -2.85000e+00 -1.00000e-01 4.745359e-04 484 -2.90000e+00 -1.00000e-01 4.857323e-04 485 -2.95000e+00 -1.00000e-01 4.968192e-04 486 -3.00000e+00 -1.00000e-01 5.077983e-04 487 -3.05000e+00 -1.00000e-01 5.186714e-04 488 -3.10000e+00 -1.00000e-01 5.294401e-04 489 -3.15000e+00 -1.00000e-01 5.401061e-04 490 -3.20000e+00 -1.00000e-01 5.506709e-04 491 -3.25000e+00 -1.00000e-01 5.611361e-04 492 -3.30000e+00 -1.00000e-01 5.715034e-04 493 -3.35000e+00 -1.00000e-01 5.817741e-04 494 -3.40000e+00 -1.00000e-01 5.919498e-04 495 -3.45000e+00 -1.00000e-01 6.020320e-04 496 -3.50000e+00 -1.00000e-01 6.120220e-04 Total run time: 1.270 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test14.out0000644000265600020320000005602412264261473017532 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Date: Tue Apr 20 23:16:15 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** DCtransferCurve Tue Apr 20 23:16:14 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -1.00000e-01 4.206341e-11 1 -5.00000e-02 -1.00000e-01 1.147170e-10 2 -1.00000e-01 -1.00000e-01 3.125475e-10 3 -1.50000e-01 -1.00000e-01 8.490439e-10 4 -2.00000e-01 -1.00000e-01 2.294619e-09 5 -2.50000e-01 -1.00000e-01 6.151039e-09 6 -3.00000e-01 -1.00000e-01 1.628852e-08 7 -3.50000e-01 -1.00000e-01 4.240502e-08 8 -4.00000e-01 -1.00000e-01 1.080617e-07 9 -4.50000e-01 -1.00000e-01 2.690046e-07 10 -5.00000e-01 -1.00000e-01 6.534541e-07 11 -5.50000e-01 -1.00000e-01 1.532386e-06 12 -6.00000e-01 -1.00000e-01 3.350789e-06 13 -6.50000e-01 -1.00000e-01 6.500495e-06 14 -7.00000e-01 -1.00000e-01 1.092740e-05 15 -7.50000e-01 -1.00000e-01 1.619790e-05 16 -8.00000e-01 -1.00000e-01 2.185142e-05 17 -8.50000e-01 -1.00000e-01 2.757138e-05 18 -9.00000e-01 -1.00000e-01 3.319022e-05 19 -9.50000e-01 -1.00000e-01 3.864018e-05 20 -1.00000e+00 -1.00000e-01 4.390645e-05 21 -1.05000e+00 -1.00000e-01 4.899693e-05 22 -1.10000e+00 -1.00000e-01 5.392642e-05 23 -1.15000e+00 -1.00000e-01 5.871123e-05 24 -1.20000e+00 -1.00000e-01 6.336512e-05 25 -1.25000e+00 -1.00000e-01 6.789906e-05 26 -1.30000e+00 -1.00000e-01 7.232166e-05 27 -1.35000e+00 -1.00000e-01 7.663969e-05 28 -1.40000e+00 -1.00000e-01 8.085857e-05 29 -1.45000e+00 -1.00000e-01 8.498273e-05 30 -1.50000e+00 -1.00000e-01 8.901592e-05 31 -1.55000e+00 -1.00000e-01 9.296142e-05 32 -1.60000e+00 -1.00000e-01 9.682215e-05 33 -1.65000e+00 -1.00000e-01 1.006008e-04 34 -1.70000e+00 -1.00000e-01 1.042999e-04 35 -1.75000e+00 -1.00000e-01 1.079217e-04 36 -1.80000e+00 -1.00000e-01 1.114686e-04 37 -1.85000e+00 -1.00000e-01 1.149427e-04 38 -1.90000e+00 -1.00000e-01 1.183460e-04 39 -1.95000e+00 -1.00000e-01 1.216805e-04 40 -2.00000e+00 -1.00000e-01 1.249481e-04 41 -2.05000e+00 -1.00000e-01 1.281508e-04 42 -2.10000e+00 -1.00000e-01 1.312902e-04 43 -2.15000e+00 -1.00000e-01 1.343680e-04 44 -2.20000e+00 -1.00000e-01 1.373861e-04 45 -2.25000e+00 -1.00000e-01 1.403458e-04 46 -2.30000e+00 -1.00000e-01 1.432489e-04 47 -2.35000e+00 -1.00000e-01 1.460967e-04 48 -2.40000e+00 -1.00000e-01 1.488908e-04 49 -2.45000e+00 -1.00000e-01 1.516325e-04 50 -2.50000e+00 -1.00000e-01 1.543231e-04 51 -2.55000e+00 -1.00000e-01 1.569641e-04 52 -2.60000e+00 -1.00000e-01 1.595566e-04 53 -2.65000e+00 -1.00000e-01 1.621020e-04 54 -2.70000e+00 -1.00000e-01 1.646012e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 -1.00000e-01 1.670556e-04 56 -2.80000e+00 -1.00000e-01 1.694662e-04 57 -2.85000e+00 -1.00000e-01 1.718340e-04 58 -2.90000e+00 -1.00000e-01 1.741602e-04 59 -2.95000e+00 -1.00000e-01 1.764457e-04 60 -3.00000e+00 -1.00000e-01 1.786915e-04 61 -3.05000e+00 -1.00000e-01 1.808985e-04 62 -3.10000e+00 -1.00000e-01 1.830677e-04 63 -3.15000e+00 -1.00000e-01 1.852000e-04 64 -3.20000e+00 -1.00000e-01 1.872961e-04 65 -3.25000e+00 -1.00000e-01 1.893570e-04 66 -3.30000e+00 -1.00000e-01 1.913834e-04 67 -3.35000e+00 -1.00000e-01 1.933762e-04 68 -3.40000e+00 -1.00000e-01 1.953360e-04 69 -3.45000e+00 -1.00000e-01 1.972636e-04 70 -3.50000e+00 -1.00000e-01 1.991598e-04 71 0.000000e+00 -1.00000e-01 1.910461e-12 72 -5.00000e-02 -1.00000e-01 4.498428e-12 73 -1.00000e-01 -1.00000e-01 1.223078e-11 74 -1.50000e-01 -1.00000e-01 3.530966e-11 75 -2.00000e-01 -1.00000e-01 1.040714e-10 76 -2.50000e-01 -1.00000e-01 3.083225e-10 77 -3.00000e-01 -1.00000e-01 9.119453e-10 78 -3.50000e-01 -1.00000e-01 2.680827e-09 79 -4.00000e-01 -1.00000e-01 7.794759e-09 80 -4.50000e-01 -1.00000e-01 2.227939e-08 81 -5.00000e-01 -1.00000e-01 6.216189e-08 82 -5.50000e-01 -1.00000e-01 1.683250e-07 83 -6.00000e-01 -1.00000e-01 4.409715e-07 84 -6.50000e-01 -1.00000e-01 1.108616e-06 85 -7.00000e-01 -1.00000e-01 2.591453e-06 86 -7.50000e-01 -1.00000e-01 5.333777e-06 87 -8.00000e-01 -1.00000e-01 9.360976e-06 88 -8.50000e-01 -1.00000e-01 1.425678e-05 89 -9.00000e-01 -1.00000e-01 1.955377e-05 90 -9.50000e-01 -1.00000e-01 2.493749e-05 91 -1.00000e+00 -1.00000e-01 3.024761e-05 92 -1.05000e+00 -1.00000e-01 3.542130e-05 93 -1.10000e+00 -1.00000e-01 4.044439e-05 94 -1.15000e+00 -1.00000e-01 4.532238e-05 95 -1.20000e+00 -1.00000e-01 5.006606e-05 96 -1.25000e+00 -1.00000e-01 5.468710e-05 97 -1.30000e+00 -1.00000e-01 5.919553e-05 98 -1.35000e+00 -1.00000e-01 6.359908e-05 99 -1.40000e+00 -1.00000e-01 6.790377e-05 100 -1.45000e+00 -1.00000e-01 7.211439e-05 101 -1.50000e+00 -1.00000e-01 7.623482e-05 102 -1.55000e+00 -1.00000e-01 8.026833e-05 103 -1.60000e+00 -1.00000e-01 8.421780e-05 104 -1.65000e+00 -1.00000e-01 8.808580e-05 105 -1.70000e+00 -1.00000e-01 9.187472e-05 106 -1.75000e+00 -1.00000e-01 9.558681e-05 107 -1.80000e+00 -1.00000e-01 9.922421e-05 108 -1.85000e+00 -1.00000e-01 1.027890e-04 109 -1.90000e+00 -1.00000e-01 1.062831e-04 110 -1.95000e+00 -1.00000e-01 1.097084e-04 111 -2.00000e+00 -1.00000e-01 1.130668e-04 112 -2.05000e+00 -1.00000e-01 1.163600e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -1.00000e-01 1.195899e-04 114 -2.15000e+00 -1.00000e-01 1.227579e-04 115 -2.20000e+00 -1.00000e-01 1.258659e-04 116 -2.25000e+00 -1.00000e-01 1.289153e-04 117 -2.30000e+00 -1.00000e-01 1.319076e-04 118 -2.35000e+00 -1.00000e-01 1.348443e-04 119 -2.40000e+00 -1.00000e-01 1.377269e-04 120 -2.45000e+00 -1.00000e-01 1.405566e-04 121 -2.50000e+00 -1.00000e-01 1.433349e-04 122 -2.55000e+00 -1.00000e-01 1.460630e-04 123 -2.60000e+00 -1.00000e-01 1.487421e-04 124 -2.65000e+00 -1.00000e-01 1.513736e-04 125 -2.70000e+00 -1.00000e-01 1.539584e-04 126 -2.75000e+00 -1.00000e-01 1.564978e-04 127 -2.80000e+00 -1.00000e-01 1.589929e-04 128 -2.85000e+00 -1.00000e-01 1.614447e-04 129 -2.90000e+00 -1.00000e-01 1.638543e-04 130 -2.95000e+00 -1.00000e-01 1.662226e-04 131 -3.00000e+00 -1.00000e-01 1.685506e-04 132 -3.05000e+00 -1.00000e-01 1.708392e-04 133 -3.10000e+00 -1.00000e-01 1.730895e-04 134 -3.15000e+00 -1.00000e-01 1.753022e-04 135 -3.20000e+00 -1.00000e-01 1.774781e-04 136 -3.25000e+00 -1.00000e-01 1.796182e-04 137 -3.30000e+00 -1.00000e-01 1.817232e-04 138 -3.35000e+00 -1.00000e-01 1.837940e-04 139 -3.40000e+00 -1.00000e-01 1.858312e-04 140 -3.45000e+00 -1.00000e-01 1.878356e-04 141 -3.50000e+00 -1.00000e-01 1.898080e-04 142 0.000000e+00 -1.00000e-01 1.197442e-12 143 -5.00000e-02 -1.00000e-01 1.297989e-12 144 -1.00000e-01 -1.00000e-01 1.981725e-12 145 -1.50000e-01 -1.00000e-01 3.861421e-12 146 -2.00000e-01 -1.00000e-01 9.790071e-12 147 -2.50000e-01 -1.00000e-01 2.846995e-11 148 -3.00000e-01 -1.00000e-01 8.721870e-11 149 -3.50000e-01 -1.00000e-01 2.713945e-10 150 -4.00000e-01 -1.00000e-01 8.455845e-10 151 -4.50000e-01 -1.00000e-01 2.618866e-09 152 -5.00000e-01 -1.00000e-01 8.010968e-09 153 -5.50000e-01 -1.00000e-01 2.401758e-08 154 -6.00000e-01 -1.00000e-01 6.996176e-08 155 -6.50000e-01 -1.00000e-01 1.965877e-07 156 -7.00000e-01 -1.00000e-01 5.302930e-07 157 -7.50000e-01 -1.00000e-01 1.353741e-06 158 -8.00000e-01 -1.00000e-01 3.132475e-06 159 -8.50000e-01 -1.00000e-01 6.214760e-06 160 -9.00000e-01 -1.00000e-01 1.043401e-05 161 -9.50000e-01 -1.00000e-01 1.531544e-05 162 -1.00000e+00 -1.00000e-01 2.045096e-05 163 -1.05000e+00 -1.00000e-01 2.560328e-05 164 -1.10000e+00 -1.00000e-01 3.066519e-05 165 -1.15000e+00 -1.00000e-01 3.560065e-05 166 -1.20000e+00 -1.00000e-01 4.040530e-05 167 -1.25000e+00 -1.00000e-01 4.508588e-05 168 -1.30000e+00 -1.00000e-01 4.965110e-05 169 -1.35000e+00 -1.00000e-01 5.410987e-05 170 -1.40000e+00 -1.00000e-01 5.846927e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e-01 6.273473e-05 172 -1.50000e+00 -1.00000e-01 6.691054e-05 173 -1.55000e+00 -1.00000e-01 7.100016e-05 174 -1.60000e+00 -1.00000e-01 7.500653e-05 175 -1.65000e+00 -1.00000e-01 7.893221e-05 176 -1.70000e+00 -1.00000e-01 8.277952e-05 177 -1.75000e+00 -1.00000e-01 8.655063e-05 178 -1.80000e+00 -1.00000e-01 9.024758e-05 179 -1.85000e+00 -1.00000e-01 9.387235e-05 180 -1.90000e+00 -1.00000e-01 9.742682e-05 181 -1.95000e+00 -1.00000e-01 1.009128e-04 182 -2.00000e+00 -1.00000e-01 1.043321e-04 183 -2.05000e+00 -1.00000e-01 1.076865e-04 184 -2.10000e+00 -1.00000e-01 1.109775e-04 185 -2.15000e+00 -1.00000e-01 1.142068e-04 186 -2.20000e+00 -1.00000e-01 1.173761e-04 187 -2.25000e+00 -1.00000e-01 1.204867e-04 188 -2.30000e+00 -1.00000e-01 1.235402e-04 189 -2.35000e+00 -1.00000e-01 1.265381e-04 190 -2.40000e+00 -1.00000e-01 1.294817e-04 191 -2.45000e+00 -1.00000e-01 1.323723e-04 192 -2.50000e+00 -1.00000e-01 1.352113e-04 193 -2.55000e+00 -1.00000e-01 1.379999e-04 194 -2.60000e+00 -1.00000e-01 1.407394e-04 195 -2.65000e+00 -1.00000e-01 1.434309e-04 196 -2.70000e+00 -1.00000e-01 1.460756e-04 197 -2.75000e+00 -1.00000e-01 1.486746e-04 198 -2.80000e+00 -1.00000e-01 1.512290e-04 199 -2.85000e+00 -1.00000e-01 1.537398e-04 200 -2.90000e+00 -1.00000e-01 1.562081e-04 201 -2.95000e+00 -1.00000e-01 1.586349e-04 202 -3.00000e+00 -1.00000e-01 1.610210e-04 203 -3.05000e+00 -1.00000e-01 1.633675e-04 204 -3.10000e+00 -1.00000e-01 1.656752e-04 205 -3.15000e+00 -1.00000e-01 1.679450e-04 206 -3.20000e+00 -1.00000e-01 1.701777e-04 207 -3.25000e+00 -1.00000e-01 1.723743e-04 208 -3.30000e+00 -1.00000e-01 1.745354e-04 209 -3.35000e+00 -1.00000e-01 1.766619e-04 210 -3.40000e+00 -1.00000e-01 1.787544e-04 211 -3.45000e+00 -1.00000e-01 1.808139e-04 212 -3.50000e+00 -1.00000e-01 1.828408e-04 213 0.000000e+00 -1.00000e-01 1.619435e-12 214 -5.00000e-02 -1.00000e-01 1.630658e-12 215 -1.00000e-01 -1.00000e-01 1.711838e-12 216 -1.50000e-01 -1.00000e-01 1.944530e-12 217 -2.00000e-01 -1.00000e-01 2.708696e-12 218 -2.50000e-01 -1.00000e-01 5.217200e-12 219 -3.00000e-01 -1.00000e-01 1.344565e-11 220 -3.50000e-01 -1.00000e-01 4.040058e-11 221 -4.00000e-01 -1.00000e-01 1.284873e-10 222 -4.50000e-01 -1.00000e-01 4.151133e-10 223 -5.00000e-01 -1.00000e-01 1.340754e-09 224 -5.50000e-01 -1.00000e-01 4.291653e-09 225 -6.00000e-01 -1.00000e-01 1.350211e-08 226 -6.50000e-01 -1.00000e-01 4.134655e-08 227 -7.00000e-01 -1.00000e-01 1.220319e-07 228 -7.50000e-01 -1.00000e-01 3.447472e-07 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.00000e-01 9.234713e-07 230 -8.50000e-01 -1.00000e-01 2.269418e-06 231 -9.00000e-01 -1.00000e-01 4.825535e-06 232 -9.50000e-01 -1.00000e-01 8.602480e-06 233 -1.00000e+00 -1.00000e-01 1.317621e-05 234 -1.05000e+00 -1.00000e-01 1.810334e-05 235 -1.10000e+00 -1.00000e-01 2.310571e-05 236 -1.15000e+00 -1.00000e-01 2.805038e-05 237 -1.20000e+00 -1.00000e-01 3.288793e-05 238 -1.25000e+00 -1.00000e-01 3.760737e-05 239 -1.30000e+00 -1.00000e-01 4.221219e-05 240 -1.35000e+00 -1.00000e-01 4.670927e-05 241 -1.40000e+00 -1.00000e-01 5.110586e-05 242 -1.45000e+00 -1.00000e-01 5.540834e-05 243 -1.50000e+00 -1.00000e-01 5.962152e-05 244 -1.55000e+00 -1.00000e-01 6.374917e-05 245 -1.60000e+00 -1.00000e-01 6.779436e-05 246 -1.65000e+00 -1.00000e-01 7.175968e-05 247 -1.70000e+00 -1.00000e-01 7.564745e-05 248 -1.75000e+00 -1.00000e-01 7.945976e-05 249 -1.80000e+00 -1.00000e-01 8.319858e-05 250 -1.85000e+00 -1.00000e-01 8.686581e-05 251 -1.90000e+00 -1.00000e-01 9.046325e-05 252 -1.95000e+00 -1.00000e-01 9.399267e-05 253 -2.00000e+00 -1.00000e-01 9.745577e-05 254 -2.05000e+00 -1.00000e-01 1.008542e-04 255 -2.10000e+00 -1.00000e-01 1.041896e-04 256 -2.15000e+00 -1.00000e-01 1.074636e-04 257 -2.20000e+00 -1.00000e-01 1.106776e-04 258 -2.25000e+00 -1.00000e-01 1.138331e-04 259 -2.30000e+00 -1.00000e-01 1.169316e-04 260 -2.35000e+00 -1.00000e-01 1.199746e-04 261 -2.40000e+00 -1.00000e-01 1.229633e-04 262 -2.45000e+00 -1.00000e-01 1.258990e-04 263 -2.50000e+00 -1.00000e-01 1.287831e-04 264 -2.55000e+00 -1.00000e-01 1.316168e-04 265 -2.60000e+00 -1.00000e-01 1.344013e-04 266 -2.65000e+00 -1.00000e-01 1.371378e-04 267 -2.70000e+00 -1.00000e-01 1.398273e-04 268 -2.75000e+00 -1.00000e-01 1.424711e-04 269 -2.80000e+00 -1.00000e-01 1.450701e-04 270 -2.85000e+00 -1.00000e-01 1.476255e-04 271 -2.90000e+00 -1.00000e-01 1.501381e-04 272 -2.95000e+00 -1.00000e-01 1.526091e-04 273 -3.00000e+00 -1.00000e-01 1.550393e-04 274 -3.05000e+00 -1.00000e-01 1.574296e-04 275 -3.10000e+00 -1.00000e-01 1.597809e-04 276 -3.15000e+00 -1.00000e-01 1.620942e-04 277 -3.20000e+00 -1.00000e-01 1.643703e-04 278 -3.25000e+00 -1.00000e-01 1.666099e-04 279 -3.30000e+00 -1.00000e-01 1.688138e-04 280 -3.35000e+00 -1.00000e-01 1.709829e-04 281 -3.40000e+00 -1.00000e-01 1.731179e-04 282 -3.45000e+00 -1.00000e-01 1.752195e-04 283 -3.50000e+00 -1.00000e-01 1.772884e-04 284 0.000000e+00 -1.00000e-01 2.111366e-12 285 -5.00000e-02 -1.00000e-01 2.113036e-12 286 -1.00000e-01 -1.00000e-01 2.125757e-12 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -1.00000e-01 2.163520e-12 288 -2.00000e-01 -1.00000e-01 2.291763e-12 289 -2.50000e-01 -1.00000e-01 2.727205e-12 290 -3.00000e-01 -1.00000e-01 4.205223e-12 291 -3.50000e-01 -1.00000e-01 9.218936e-12 292 -4.00000e-01 -1.00000e-01 2.620698e-11 293 -4.50000e-01 -1.00000e-01 8.364786e-11 294 -5.00000e-01 -1.00000e-01 2.771350e-10 295 -5.50000e-01 -1.00000e-01 9.244663e-10 296 -6.00000e-01 -1.00000e-01 3.064443e-09 297 -6.50000e-01 -1.00000e-01 9.997609e-09 298 -7.00000e-01 -1.00000e-01 3.175956e-08 299 -7.50000e-01 -1.00000e-01 9.711826e-08 300 -8.00000e-01 -1.00000e-01 2.833366e-07 301 -8.50000e-01 -1.00000e-01 7.814404e-07 302 -9.00000e-01 -1.00000e-01 1.977498e-06 303 -9.50000e-01 -1.00000e-01 4.330188e-06 304 -1.00000e+00 -1.00000e-01 7.906466e-06 305 -1.05000e+00 -1.00000e-01 1.230791e-05 306 -1.10000e+00 -1.00000e-01 1.708803e-05 307 -1.15000e+00 -1.00000e-01 2.196233e-05 308 -1.20000e+00 -1.00000e-01 2.679383e-05 309 -1.25000e+00 -1.00000e-01 3.153053e-05 310 -1.30000e+00 -1.00000e-01 3.615947e-05 311 -1.35000e+00 -1.00000e-01 4.068242e-05 312 -1.40000e+00 -1.00000e-01 4.510496e-05 313 -1.45000e+00 -1.00000e-01 4.943296e-05 314 -1.50000e+00 -1.00000e-01 5.367194e-05 315 -1.55000e+00 -1.00000e-01 5.782601e-05 316 -1.60000e+00 -1.00000e-01 6.189843e-05 317 -1.65000e+00 -1.00000e-01 6.589184e-05 318 -1.70000e+00 -1.00000e-01 6.980855e-05 319 -1.75000e+00 -1.00000e-01 7.365062e-05 320 -1.80000e+00 -1.00000e-01 7.741994e-05 321 -1.85000e+00 -1.00000e-01 8.111834e-05 322 -1.90000e+00 -1.00000e-01 8.474754e-05 323 -1.95000e+00 -1.00000e-01 8.830924e-05 324 -2.00000e+00 -1.00000e-01 9.180508e-05 325 -2.05000e+00 -1.00000e-01 9.523667e-05 326 -2.10000e+00 -1.00000e-01 9.860557e-05 327 -2.15000e+00 -1.00000e-01 1.019133e-04 328 -2.20000e+00 -1.00000e-01 1.051614e-04 329 -2.25000e+00 -1.00000e-01 1.083512e-04 330 -2.30000e+00 -1.00000e-01 1.114842e-04 331 -2.35000e+00 -1.00000e-01 1.145618e-04 332 -2.40000e+00 -1.00000e-01 1.175852e-04 333 -2.45000e+00 -1.00000e-01 1.205558e-04 334 -2.50000e+00 -1.00000e-01 1.234749e-04 335 -2.55000e+00 -1.00000e-01 1.263436e-04 336 -2.60000e+00 -1.00000e-01 1.291631e-04 337 -2.65000e+00 -1.00000e-01 1.319346e-04 338 -2.70000e+00 -1.00000e-01 1.346593e-04 339 -2.75000e+00 -1.00000e-01 1.373381e-04 340 -2.80000e+00 -1.00000e-01 1.399721e-04 341 -2.85000e+00 -1.00000e-01 1.425625e-04 342 -2.90000e+00 -1.00000e-01 1.451100e-04 343 -2.95000e+00 -1.00000e-01 1.476158e-04 344 -3.00000e+00 -1.00000e-01 1.500808e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -1.00000e-01 1.525058e-04 346 -3.10000e+00 -1.00000e-01 1.548918e-04 347 -3.15000e+00 -1.00000e-01 1.572395e-04 348 -3.20000e+00 -1.00000e-01 1.595499e-04 349 -3.25000e+00 -1.00000e-01 1.618238e-04 350 -3.30000e+00 -1.00000e-01 1.640619e-04 351 -3.35000e+00 -1.00000e-01 1.662650e-04 352 -3.40000e+00 -1.00000e-01 1.684338e-04 353 -3.45000e+00 -1.00000e-01 1.705691e-04 354 -3.50000e+00 -1.00000e-01 1.726716e-04 355 0.000000e+00 -1.00000e-01 2.610237e-12 356 -5.00000e-02 -1.00000e-01 2.610533e-12 357 -1.00000e-01 -1.00000e-01 2.612905e-12 358 -1.50000e-01 -1.00000e-01 2.620178e-12 359 -2.00000e-01 -1.00000e-01 2.645663e-12 360 -2.50000e-01 -1.00000e-01 2.734950e-12 361 -3.00000e-01 -1.00000e-01 3.047717e-12 362 -3.50000e-01 -1.00000e-01 4.142980e-12 363 -4.00000e-01 -1.00000e-01 7.976212e-12 364 -4.50000e-01 -1.00000e-01 2.137742e-11 365 -5.00000e-01 -1.00000e-01 6.813507e-11 366 -5.50000e-01 -1.00000e-01 2.306728e-10 367 -6.00000e-01 -1.00000e-01 7.918757e-10 368 -6.50000e-01 -1.00000e-01 2.706284e-09 369 -7.00000e-01 -1.00000e-01 9.102436e-09 370 -7.50000e-01 -1.00000e-01 2.977213e-08 371 -8.00000e-01 -1.00000e-01 9.347874e-08 372 -8.50000e-01 -1.00000e-01 2.788417e-07 373 -9.00000e-01 -1.00000e-01 7.819540e-07 374 -9.50000e-01 -1.00000e-01 1.996477e-06 375 -1.00000e+00 -1.00000e-01 4.370386e-06 376 -1.05000e+00 -1.00000e-01 7.933936e-06 377 -1.10000e+00 -1.00000e-01 1.227409e-05 378 -1.15000e+00 -1.00000e-01 1.695979e-05 379 -1.20000e+00 -1.00000e-01 2.172687e-05 380 -1.25000e+00 -1.00000e-01 2.645171e-05 381 -1.30000e+00 -1.00000e-01 3.108836e-05 382 -1.35000e+00 -1.00000e-01 3.562547e-05 383 -1.40000e+00 -1.00000e-01 4.006444e-05 384 -1.45000e+00 -1.00000e-01 4.440978e-05 385 -1.50000e+00 -1.00000e-01 4.866635e-05 386 -1.55000e+00 -1.00000e-01 5.283870e-05 387 -1.60000e+00 -1.00000e-01 5.693026e-05 388 -1.65000e+00 -1.00000e-01 6.094373e-05 389 -1.70000e+00 -1.00000e-01 6.488141e-05 390 -1.75000e+00 -1.00000e-01 6.874531e-05 391 -1.80000e+00 -1.00000e-01 7.253725e-05 392 -1.85000e+00 -1.00000e-01 7.625899e-05 393 -1.90000e+00 -1.00000e-01 7.991217e-05 394 -1.95000e+00 -1.00000e-01 8.349843e-05 395 -2.00000e+00 -1.00000e-01 8.701934e-05 396 -2.05000e+00 -1.00000e-01 9.047645e-05 397 -2.10000e+00 -1.00000e-01 9.387128e-05 398 -2.15000e+00 -1.00000e-01 9.720529e-05 399 -2.20000e+00 -1.00000e-01 1.004799e-04 400 -2.25000e+00 -1.00000e-01 1.036967e-04 401 -2.30000e+00 -1.00000e-01 1.068568e-04 402 -2.35000e+00 -1.00000e-01 1.099617e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -1.00000e-01 1.130126e-04 404 -2.45000e+00 -1.00000e-01 1.160109e-04 405 -2.50000e+00 -1.00000e-01 1.189578e-04 406 -2.55000e+00 -1.00000e-01 1.218544e-04 407 -2.60000e+00 -1.00000e-01 1.247020e-04 408 -2.65000e+00 -1.00000e-01 1.275016e-04 409 -2.70000e+00 -1.00000e-01 1.302544e-04 410 -2.75000e+00 -1.00000e-01 1.329614e-04 411 -2.80000e+00 -1.00000e-01 1.356237e-04 412 -2.85000e+00 -1.00000e-01 1.382423e-04 413 -2.90000e+00 -1.00000e-01 1.408182e-04 414 -2.95000e+00 -1.00000e-01 1.433522e-04 415 -3.00000e+00 -1.00000e-01 1.458454e-04 416 -3.05000e+00 -1.00000e-01 1.482987e-04 417 -3.10000e+00 -1.00000e-01 1.507128e-04 418 -3.15000e+00 -1.00000e-01 1.530887e-04 419 -3.20000e+00 -1.00000e-01 1.554272e-04 420 -3.25000e+00 -1.00000e-01 1.577291e-04 421 -3.30000e+00 -1.00000e-01 1.599951e-04 422 -3.35000e+00 -1.00000e-01 1.622261e-04 423 -3.40000e+00 -1.00000e-01 1.644228e-04 424 -3.45000e+00 -1.00000e-01 1.665858e-04 425 -3.50000e+00 -1.00000e-01 1.687159e-04 426 0.000000e+00 -1.00000e-01 3.110045e-12 427 -5.00000e-02 -1.00000e-01 3.110104e-12 428 -1.00000e-01 -1.00000e-01 3.110593e-12 429 -1.50000e-01 -1.00000e-01 3.112145e-12 430 -2.00000e-01 -1.00000e-01 3.117756e-12 431 -2.50000e-01 -1.00000e-01 3.138040e-12 432 -3.00000e-01 -1.00000e-01 3.211368e-12 433 -3.50000e-01 -1.00000e-01 3.476411e-12 434 -4.00000e-01 -1.00000e-01 4.434106e-12 435 -4.50000e-01 -1.00000e-01 7.892580e-12 436 -5.00000e-01 -1.00000e-01 2.036821e-11 437 -5.50000e-01 -1.00000e-01 6.527739e-11 438 -6.00000e-01 -1.00000e-01 2.263079e-10 439 -6.50000e-01 -1.00000e-01 7.995380e-10 440 -7.00000e-01 -1.00000e-01 2.813402e-09 441 -7.50000e-01 -1.00000e-01 9.728133e-09 442 -8.00000e-01 -1.00000e-01 3.260777e-08 443 -8.50000e-01 -1.00000e-01 1.044329e-07 444 -9.00000e-01 -1.00000e-01 3.159409e-07 445 -9.50000e-01 -1.00000e-01 8.910675e-07 446 -1.00000e+00 -1.00000e-01 2.254188e-06 447 -1.05000e+00 -1.00000e-01 4.811312e-06 448 -1.10000e+00 -1.00000e-01 8.485516e-06 449 -1.15000e+00 -1.00000e-01 1.283190e-05 450 -1.20000e+00 -1.00000e-01 1.745409e-05 451 -1.25000e+00 -1.00000e-01 2.212698e-05 452 -1.30000e+00 -1.00000e-01 2.675064e-05 453 -1.35000e+00 -1.00000e-01 3.128967e-05 454 -1.40000e+00 -1.00000e-01 3.573606e-05 455 -1.45000e+00 -1.00000e-01 4.009140e-05 456 -1.50000e+00 -1.00000e-01 4.435930e-05 457 -1.55000e+00 -1.00000e-01 4.854376e-05 458 -1.60000e+00 -1.00000e-01 5.264842e-05 459 -1.65000e+00 -1.00000e-01 5.667602e-05 460 -1.70000e+00 -1.00000e-01 6.062881e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -1.00000e-01 6.450873e-05 462 -1.80000e+00 -1.00000e-01 6.831755e-05 463 -1.85000e+00 -1.00000e-01 7.205690e-05 464 -1.90000e+00 -1.00000e-01 7.572839e-05 465 -1.95000e+00 -1.00000e-01 7.933356e-05 466 -2.00000e+00 -1.00000e-01 8.287393e-05 467 -2.05000e+00 -1.00000e-01 8.635098e-05 468 -2.10000e+00 -1.00000e-01 8.976618e-05 469 -2.15000e+00 -1.00000e-01 9.312096e-05 470 -2.20000e+00 -1.00000e-01 9.641673e-05 471 -2.25000e+00 -1.00000e-01 9.965487e-05 472 -2.30000e+00 -1.00000e-01 1.028367e-04 473 -2.35000e+00 -1.00000e-01 1.059636e-04 474 -2.40000e+00 -1.00000e-01 1.090367e-04 475 -2.45000e+00 -1.00000e-01 1.120574e-04 476 -2.50000e+00 -1.00000e-01 1.150268e-04 477 -2.55000e+00 -1.00000e-01 1.179461e-04 478 -2.60000e+00 -1.00000e-01 1.208165e-04 479 -2.65000e+00 -1.00000e-01 1.236391e-04 480 -2.70000e+00 -1.00000e-01 1.264150e-04 481 -2.75000e+00 -1.00000e-01 1.291452e-04 482 -2.80000e+00 -1.00000e-01 1.318307e-04 483 -2.85000e+00 -1.00000e-01 1.344726e-04 484 -2.90000e+00 -1.00000e-01 1.370718e-04 485 -2.95000e+00 -1.00000e-01 1.396292e-04 486 -3.00000e+00 -1.00000e-01 1.421458e-04 487 -3.05000e+00 -1.00000e-01 1.446225e-04 488 -3.10000e+00 -1.00000e-01 1.470601e-04 489 -3.15000e+00 -1.00000e-01 1.494594e-04 490 -3.20000e+00 -1.00000e-01 1.518213e-04 491 -3.25000e+00 -1.00000e-01 1.541466e-04 492 -3.30000e+00 -1.00000e-01 1.564360e-04 493 -3.35000e+00 -1.00000e-01 1.586903e-04 494 -3.40000e+00 -1.00000e-01 1.609102e-04 495 -3.45000e+00 -1.00000e-01 1.630965e-04 496 -3.50000e+00 -1.00000e-01 1.652497e-04 Total run time: 1.220 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test3.out0000644000265600020320000006316712264261473017456 0ustar andreasadmin Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Date: Tue Apr 20 23:12:20 1999 *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** DCtransferCurve Tue Apr 20 23:12:19 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 5.000000e-02 0.000000e+00 -4.98011e-08 2 1.000000e-01 0.000000e+00 -5.89916e-08 3 1.500000e-01 0.000000e+00 -6.32817e-08 4 2.000000e-01 0.000000e+00 -6.67039e-08 5 2.500000e-01 0.000000e+00 -6.97752e-08 6 3.000000e-01 0.000000e+00 -7.26533e-08 7 3.500000e-01 0.000000e+00 -7.54143e-08 8 4.000000e-01 0.000000e+00 -7.81031e-08 9 4.500000e-01 0.000000e+00 -8.07492e-08 10 5.000000e-01 0.000000e+00 -8.33734e-08 11 5.500000e-01 0.000000e+00 -8.59909e-08 12 6.000000e-01 0.000000e+00 -8.86130e-08 13 6.500000e-01 0.000000e+00 -9.12490e-08 14 7.000000e-01 0.000000e+00 -9.39058e-08 15 7.500000e-01 0.000000e+00 -9.65895e-08 16 8.000000e-01 0.000000e+00 -9.93049e-08 17 8.500000e-01 0.000000e+00 -1.02056e-07 18 9.000000e-01 0.000000e+00 -1.04847e-07 19 9.500000e-01 0.000000e+00 -1.07681e-07 20 1.000000e+00 0.000000e+00 -1.10560e-07 21 1.050000e+00 0.000000e+00 -1.13488e-07 22 1.100000e+00 0.000000e+00 -1.16467e-07 23 1.150000e+00 0.000000e+00 -1.19498e-07 24 1.200000e+00 0.000000e+00 -1.22585e-07 25 1.250000e+00 0.000000e+00 -1.25729e-07 26 1.300000e+00 0.000000e+00 -1.28932e-07 27 1.350000e+00 0.000000e+00 -1.32196e-07 28 1.400000e+00 0.000000e+00 -1.35523e-07 29 1.450000e+00 0.000000e+00 -1.38914e-07 30 1.500000e+00 0.000000e+00 -1.42371e-07 31 1.550000e+00 0.000000e+00 -1.45897e-07 32 1.600000e+00 0.000000e+00 -1.49492e-07 33 1.650000e+00 0.000000e+00 -1.53159e-07 34 1.700000e+00 0.000000e+00 -1.56899e-07 35 1.750000e+00 0.000000e+00 -1.60714e-07 36 1.800000e+00 0.000000e+00 -1.64606e-07 37 1.850000e+00 0.000000e+00 -1.68575e-07 38 1.900000e+00 0.000000e+00 -1.72625e-07 39 1.950000e+00 0.000000e+00 -1.76756e-07 40 2.000000e+00 0.000000e+00 -1.80971e-07 41 2.050000e+00 0.000000e+00 -1.85271e-07 42 2.100000e+00 0.000000e+00 -1.89659e-07 43 2.150000e+00 0.000000e+00 -1.94135e-07 44 2.200000e+00 0.000000e+00 -1.98701e-07 45 2.250000e+00 0.000000e+00 -2.03360e-07 46 2.300000e+00 0.000000e+00 -2.08114e-07 47 2.350000e+00 0.000000e+00 -2.12964e-07 48 2.400000e+00 0.000000e+00 -2.17912e-07 49 2.450000e+00 0.000000e+00 -2.22960e-07 50 2.500000e+00 0.000000e+00 -2.28110e-07 51 2.550000e+00 0.000000e+00 -2.33365e-07 52 2.600000e+00 0.000000e+00 -2.38725e-07 53 2.650000e+00 0.000000e+00 -2.44194e-07 54 2.700000e+00 0.000000e+00 -2.49773e-07 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 0.000000e+00 -2.55465e-07 56 2.800000e+00 0.000000e+00 -2.61271e-07 57 2.850000e+00 0.000000e+00 -2.67194e-07 58 2.900000e+00 0.000000e+00 -2.73236e-07 59 2.950000e+00 0.000000e+00 -2.79400e-07 60 3.000000e+00 0.000000e+00 -2.85687e-07 61 3.050000e+00 0.000000e+00 -2.92101e-07 62 3.100000e+00 0.000000e+00 -2.98642e-07 63 3.150000e+00 0.000000e+00 -3.05315e-07 64 3.200000e+00 0.000000e+00 -3.12121e-07 65 3.250000e+00 0.000000e+00 -3.19062e-07 66 3.300000e+00 0.000000e+00 -3.26142e-07 67 3.350000e+00 0.000000e+00 -3.33363e-07 68 3.400000e+00 0.000000e+00 -3.40728e-07 69 3.450000e+00 0.000000e+00 -3.48239e-07 70 3.500000e+00 0.000000e+00 -3.55899e-07 71 0.000000e+00 5.000000e-01 0.000000e+00 72 5.000000e-02 5.000000e-01 -4.71556e-05 73 1.000000e-01 5.000000e-01 -8.14040e-05 74 1.500000e-01 5.000000e-01 -1.04167e-04 75 2.000000e-01 5.000000e-01 -1.17803e-04 76 2.500000e-01 5.000000e-01 -1.26039e-04 77 3.000000e-01 5.000000e-01 -1.31889e-04 78 3.500000e-01 5.000000e-01 -1.36616e-04 79 4.000000e-01 5.000000e-01 -1.40675e-04 80 4.500000e-01 5.000000e-01 -1.44277e-04 81 5.000000e-01 5.000000e-01 -1.47544e-04 82 5.500000e-01 5.000000e-01 -1.50555e-04 83 6.000000e-01 5.000000e-01 -1.53365e-04 84 6.500000e-01 5.000000e-01 -1.56014e-04 85 7.000000e-01 5.000000e-01 -1.58534e-04 86 7.500000e-01 5.000000e-01 -1.60948e-04 87 8.000000e-01 5.000000e-01 -1.63274e-04 88 8.500000e-01 5.000000e-01 -1.65527e-04 89 9.000000e-01 5.000000e-01 -1.67719e-04 90 9.500000e-01 5.000000e-01 -1.69858e-04 91 1.000000e+00 5.000000e-01 -1.71954e-04 92 1.050000e+00 5.000000e-01 -1.74012e-04 93 1.100000e+00 5.000000e-01 -1.76039e-04 94 1.150000e+00 5.000000e-01 -1.78038e-04 95 1.200000e+00 5.000000e-01 -1.80014e-04 96 1.250000e+00 5.000000e-01 -1.81970e-04 97 1.300000e+00 5.000000e-01 -1.83909e-04 98 1.350000e+00 5.000000e-01 -1.85834e-04 99 1.400000e+00 5.000000e-01 -1.87747e-04 100 1.450000e+00 5.000000e-01 -1.89649e-04 101 1.500000e+00 5.000000e-01 -1.91543e-04 102 1.550000e+00 5.000000e-01 -1.93429e-04 103 1.600000e+00 5.000000e-01 -1.95310e-04 104 1.650000e+00 5.000000e-01 -1.97186e-04 105 1.700000e+00 5.000000e-01 -1.99058e-04 106 1.750000e+00 5.000000e-01 -2.00928e-04 107 1.800000e+00 5.000000e-01 -2.02796e-04 108 1.850000e+00 5.000000e-01 -2.04662e-04 109 1.900000e+00 5.000000e-01 -2.06529e-04 110 1.950000e+00 5.000000e-01 -2.08395e-04 111 2.000000e+00 5.000000e-01 -2.10262e-04 112 2.050000e+00 5.000000e-01 -2.12131e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 5.000000e-01 -2.14001e-04 114 2.150000e+00 5.000000e-01 -2.15874e-04 115 2.200000e+00 5.000000e-01 -2.17749e-04 116 2.250000e+00 5.000000e-01 -2.19627e-04 117 2.300000e+00 5.000000e-01 -2.21508e-04 118 2.350000e+00 5.000000e-01 -2.23393e-04 119 2.400000e+00 5.000000e-01 -2.25281e-04 120 2.450000e+00 5.000000e-01 -2.27174e-04 121 2.500000e+00 5.000000e-01 -2.29070e-04 122 2.550000e+00 5.000000e-01 -2.30972e-04 123 2.600000e+00 5.000000e-01 -2.32878e-04 124 2.650000e+00 5.000000e-01 -2.34789e-04 125 2.700000e+00 5.000000e-01 -2.36705e-04 126 2.750000e+00 5.000000e-01 -2.38627e-04 127 2.800000e+00 5.000000e-01 -2.40554e-04 128 2.850000e+00 5.000000e-01 -2.42486e-04 129 2.900000e+00 5.000000e-01 -2.44425e-04 130 2.950000e+00 5.000000e-01 -2.46369e-04 131 3.000000e+00 5.000000e-01 -2.48319e-04 132 3.050000e+00 5.000000e-01 -2.50275e-04 133 3.100000e+00 5.000000e-01 -2.52237e-04 134 3.150000e+00 5.000000e-01 -2.54206e-04 135 3.200000e+00 5.000000e-01 -2.56181e-04 136 3.250000e+00 5.000000e-01 -2.58162e-04 137 3.300000e+00 5.000000e-01 -2.60150e-04 138 3.350000e+00 5.000000e-01 -2.62145e-04 139 3.400000e+00 5.000000e-01 -2.64146e-04 140 3.450000e+00 5.000000e-01 -2.66154e-04 141 3.500000e+00 5.000000e-01 -2.68170e-04 142 0.000000e+00 1.000000e+00 0.000000e+00 143 5.000000e-02 1.000000e+00 -1.12090e-04 144 1.000000e-01 1.000000e+00 -2.11589e-04 145 1.500000e-01 1.000000e+00 -2.99148e-04 146 2.000000e-01 1.000000e+00 -3.75379e-04 147 2.500000e-01 1.000000e+00 -4.40874e-04 148 3.000000e-01 1.000000e+00 -4.96215e-04 149 3.500000e-01 1.000000e+00 -5.42030e-04 150 4.000000e-01 1.000000e+00 -5.79096e-04 151 4.500000e-01 1.000000e+00 -6.08545e-04 152 5.000000e-01 1.000000e+00 -6.32001e-04 153 5.500000e-01 1.000000e+00 -6.51220e-04 154 6.000000e-01 1.000000e+00 -6.67528e-04 155 6.500000e-01 1.000000e+00 -6.81741e-04 156 7.000000e-01 1.000000e+00 -6.94362e-04 157 7.500000e-01 1.000000e+00 -7.05730e-04 158 8.000000e-01 1.000000e+00 -7.16089e-04 159 8.500000e-01 1.000000e+00 -7.25620e-04 160 9.000000e-01 1.000000e+00 -7.34466e-04 161 9.500000e-01 1.000000e+00 -7.42735e-04 162 1.000000e+00 1.000000e+00 -7.50516e-04 163 1.050000e+00 1.000000e+00 -7.57882e-04 164 1.100000e+00 1.000000e+00 -7.64889e-04 165 1.150000e+00 1.000000e+00 -7.71587e-04 166 1.200000e+00 1.000000e+00 -7.78015e-04 167 1.250000e+00 1.000000e+00 -7.84207e-04 168 1.300000e+00 1.000000e+00 -7.90191e-04 169 1.350000e+00 1.000000e+00 -7.95991e-04 170 1.400000e+00 1.000000e+00 -8.01629e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e+00 -8.07122e-04 172 1.500000e+00 1.000000e+00 -8.12486e-04 173 1.550000e+00 1.000000e+00 -8.17734e-04 174 1.600000e+00 1.000000e+00 -8.22877e-04 175 1.650000e+00 1.000000e+00 -8.27926e-04 176 1.700000e+00 1.000000e+00 -8.32891e-04 177 1.750000e+00 1.000000e+00 -8.37779e-04 178 1.800000e+00 1.000000e+00 -8.42597e-04 179 1.850000e+00 1.000000e+00 -8.47352e-04 180 1.900000e+00 1.000000e+00 -8.52049e-04 181 1.950000e+00 1.000000e+00 -8.56694e-04 182 2.000000e+00 1.000000e+00 -8.61291e-04 183 2.050000e+00 1.000000e+00 -8.65844e-04 184 2.100000e+00 1.000000e+00 -8.70357e-04 185 2.150000e+00 1.000000e+00 -8.74834e-04 186 2.200000e+00 1.000000e+00 -8.79277e-04 187 2.250000e+00 1.000000e+00 -8.83690e-04 188 2.300000e+00 1.000000e+00 -8.88074e-04 189 2.350000e+00 1.000000e+00 -8.92433e-04 190 2.400000e+00 1.000000e+00 -8.96768e-04 191 2.450000e+00 1.000000e+00 -9.01081e-04 192 2.500000e+00 1.000000e+00 -9.05375e-04 193 2.550000e+00 1.000000e+00 -9.09651e-04 194 2.600000e+00 1.000000e+00 -9.13909e-04 195 2.650000e+00 1.000000e+00 -9.18153e-04 196 2.700000e+00 1.000000e+00 -9.22383e-04 197 2.750000e+00 1.000000e+00 -9.26600e-04 198 2.800000e+00 1.000000e+00 -9.30806e-04 199 2.850000e+00 1.000000e+00 -9.35001e-04 200 2.900000e+00 1.000000e+00 -9.39187e-04 201 2.950000e+00 1.000000e+00 -9.43364e-04 202 3.000000e+00 1.000000e+00 -9.47534e-04 203 3.050000e+00 1.000000e+00 -9.51696e-04 204 3.100000e+00 1.000000e+00 -9.55853e-04 205 3.150000e+00 1.000000e+00 -9.60004e-04 206 3.200000e+00 1.000000e+00 -9.64151e-04 207 3.250000e+00 1.000000e+00 -9.68293e-04 208 3.300000e+00 1.000000e+00 -9.72432e-04 209 3.350000e+00 1.000000e+00 -9.76567e-04 210 3.400000e+00 1.000000e+00 -9.80700e-04 211 3.450000e+00 1.000000e+00 -9.84831e-04 212 3.500000e+00 1.000000e+00 -9.88961e-04 213 0.000000e+00 1.500000e+00 0.000000e+00 214 5.000000e-02 1.500000e+00 -1.44845e-04 215 1.000000e-01 1.500000e+00 -2.78959e-04 216 1.500000e-01 1.500000e+00 -4.02757e-04 217 2.000000e-01 1.500000e+00 -5.16638e-04 218 2.500000e-01 1.500000e+00 -6.20978e-04 219 3.000000e-01 1.500000e+00 -7.16139e-04 220 3.500000e-01 1.500000e+00 -8.02465e-04 221 4.000000e-01 1.500000e+00 -8.80292e-04 222 4.500000e-01 1.500000e+00 -9.49946e-04 223 5.000000e-01 1.500000e+00 -1.01175e-03 224 5.500000e-01 1.500000e+00 -1.06606e-03 225 6.000000e-01 1.500000e+00 -1.11327e-03 226 6.500000e-01 1.500000e+00 -1.15391e-03 227 7.000000e-01 1.500000e+00 -1.18873e-03 228 7.500000e-01 1.500000e+00 -1.21876e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 1.500000e+00 -1.24502e-03 230 8.500000e-01 1.500000e+00 -1.26836e-03 231 9.000000e-01 1.500000e+00 -1.28936e-03 232 9.500000e-01 1.500000e+00 -1.30845e-03 233 1.000000e+00 1.500000e+00 -1.32596e-03 234 1.050000e+00 1.500000e+00 -1.34213e-03 235 1.100000e+00 1.500000e+00 -1.35717e-03 236 1.150000e+00 1.500000e+00 -1.37124e-03 237 1.200000e+00 1.500000e+00 -1.38447e-03 238 1.250000e+00 1.500000e+00 -1.39697e-03 239 1.300000e+00 1.500000e+00 -1.40885e-03 240 1.350000e+00 1.500000e+00 -1.42016e-03 241 1.400000e+00 1.500000e+00 -1.43099e-03 242 1.450000e+00 1.500000e+00 -1.44138e-03 243 1.500000e+00 1.500000e+00 -1.45139e-03 244 1.550000e+00 1.500000e+00 -1.46106e-03 245 1.600000e+00 1.500000e+00 -1.47042e-03 246 1.650000e+00 1.500000e+00 -1.47950e-03 247 1.700000e+00 1.500000e+00 -1.48833e-03 248 1.750000e+00 1.500000e+00 -1.49694e-03 249 1.800000e+00 1.500000e+00 -1.50534e-03 250 1.850000e+00 1.500000e+00 -1.51355e-03 251 1.900000e+00 1.500000e+00 -1.52160e-03 252 1.950000e+00 1.500000e+00 -1.52949e-03 253 2.000000e+00 1.500000e+00 -1.53724e-03 254 2.050000e+00 1.500000e+00 -1.54486e-03 255 2.100000e+00 1.500000e+00 -1.55236e-03 256 2.150000e+00 1.500000e+00 -1.55975e-03 257 2.200000e+00 1.500000e+00 -1.56704e-03 258 2.250000e+00 1.500000e+00 -1.57424e-03 259 2.300000e+00 1.500000e+00 -1.58135e-03 260 2.350000e+00 1.500000e+00 -1.58838e-03 261 2.400000e+00 1.500000e+00 -1.59534e-03 262 2.450000e+00 1.500000e+00 -1.60223e-03 263 2.500000e+00 1.500000e+00 -1.60905e-03 264 2.550000e+00 1.500000e+00 -1.61582e-03 265 2.600000e+00 1.500000e+00 -1.62253e-03 266 2.650000e+00 1.500000e+00 -1.62919e-03 267 2.700000e+00 1.500000e+00 -1.63580e-03 268 2.750000e+00 1.500000e+00 -1.64237e-03 269 2.800000e+00 1.500000e+00 -1.64889e-03 270 2.850000e+00 1.500000e+00 -1.65538e-03 271 2.900000e+00 1.500000e+00 -1.66183e-03 272 2.950000e+00 1.500000e+00 -1.66825e-03 273 3.000000e+00 1.500000e+00 -1.67463e-03 274 3.050000e+00 1.500000e+00 -1.68099e-03 275 3.100000e+00 1.500000e+00 -1.68732e-03 276 3.150000e+00 1.500000e+00 -1.69362e-03 277 3.200000e+00 1.500000e+00 -1.69990e-03 278 3.250000e+00 1.500000e+00 -1.70616e-03 279 3.300000e+00 1.500000e+00 -1.71239e-03 280 3.350000e+00 1.500000e+00 -1.71861e-03 281 3.400000e+00 1.500000e+00 -1.72481e-03 282 3.450000e+00 1.500000e+00 -1.73099e-03 283 3.500000e+00 1.500000e+00 -1.73716e-03 284 0.000000e+00 2.000000e+00 0.000000e+00 285 5.000000e-02 2.000000e+00 -1.64218e-04 286 1.000000e-01 2.000000e+00 -3.19303e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 1.500000e-01 2.000000e+00 -4.65539e-04 288 2.000000e-01 2.000000e+00 -6.03200e-04 289 2.500000e-01 2.000000e+00 -7.32548e-04 290 3.000000e-01 2.000000e+00 -8.53835e-04 291 3.500000e-01 2.000000e+00 -9.67304e-04 292 4.000000e-01 2.000000e+00 -1.07319e-03 293 4.500000e-01 2.000000e+00 -1.17171e-03 294 5.000000e-01 2.000000e+00 -1.26309e-03 295 5.500000e-01 2.000000e+00 -1.34753e-03 296 6.000000e-01 2.000000e+00 -1.42525e-03 297 6.500000e-01 2.000000e+00 -1.49645e-03 298 7.000000e-01 2.000000e+00 -1.56132e-03 299 7.500000e-01 2.000000e+00 -1.62009e-03 300 8.000000e-01 2.000000e+00 -1.67298e-03 301 8.500000e-01 2.000000e+00 -1.72031e-03 302 9.000000e-01 2.000000e+00 -1.76247e-03 303 9.500000e-01 2.000000e+00 -1.80008e-03 304 1.000000e+00 2.000000e+00 -1.83384e-03 305 1.050000e+00 2.000000e+00 -1.86444e-03 306 1.100000e+00 2.000000e+00 -1.89242e-03 307 1.150000e+00 2.000000e+00 -1.91818e-03 308 1.200000e+00 2.000000e+00 -1.94205e-03 309 1.250000e+00 2.000000e+00 -1.96428e-03 310 1.300000e+00 2.000000e+00 -1.98509e-03 311 1.350000e+00 2.000000e+00 -2.00465e-03 312 1.400000e+00 2.000000e+00 -2.02311e-03 313 1.450000e+00 2.000000e+00 -2.04061e-03 314 1.500000e+00 2.000000e+00 -2.05726e-03 315 1.550000e+00 2.000000e+00 -2.07315e-03 316 1.600000e+00 2.000000e+00 -2.08837e-03 317 1.650000e+00 2.000000e+00 -2.10298e-03 318 1.700000e+00 2.000000e+00 -2.11705e-03 319 1.750000e+00 2.000000e+00 -2.13062e-03 320 1.800000e+00 2.000000e+00 -2.14376e-03 321 1.850000e+00 2.000000e+00 -2.15650e-03 322 1.900000e+00 2.000000e+00 -2.16887e-03 323 1.950000e+00 2.000000e+00 -2.18092e-03 324 2.000000e+00 2.000000e+00 -2.19266e-03 325 2.050000e+00 2.000000e+00 -2.20412e-03 326 2.100000e+00 2.000000e+00 -2.21533e-03 327 2.150000e+00 2.000000e+00 -2.22631e-03 328 2.200000e+00 2.000000e+00 -2.23707e-03 329 2.250000e+00 2.000000e+00 -2.24764e-03 330 2.300000e+00 2.000000e+00 -2.25802e-03 331 2.350000e+00 2.000000e+00 -2.26824e-03 332 2.400000e+00 2.000000e+00 -2.27829e-03 333 2.450000e+00 2.000000e+00 -2.28820e-03 334 2.500000e+00 2.000000e+00 -2.29798e-03 335 2.550000e+00 2.000000e+00 -2.30763e-03 336 2.600000e+00 2.000000e+00 -2.31716e-03 337 2.650000e+00 2.000000e+00 -2.32659e-03 338 2.700000e+00 2.000000e+00 -2.33591e-03 339 2.750000e+00 2.000000e+00 -2.34513e-03 340 2.800000e+00 2.000000e+00 -2.35427e-03 341 2.850000e+00 2.000000e+00 -2.36332e-03 342 2.900000e+00 2.000000e+00 -2.37230e-03 343 2.950000e+00 2.000000e+00 -2.38120e-03 344 3.000000e+00 2.000000e+00 -2.39003e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 3.050000e+00 2.000000e+00 -2.39879e-03 346 3.100000e+00 2.000000e+00 -2.40750e-03 347 3.150000e+00 2.000000e+00 -2.41615e-03 348 3.200000e+00 2.000000e+00 -2.42474e-03 349 3.250000e+00 2.000000e+00 -2.43328e-03 350 3.300000e+00 2.000000e+00 -2.44178e-03 351 3.350000e+00 2.000000e+00 -2.45023e-03 352 3.400000e+00 2.000000e+00 -2.45864e-03 353 3.450000e+00 2.000000e+00 -2.46700e-03 354 3.500000e+00 2.000000e+00 -2.47533e-03 355 0.000000e+00 2.500000e+00 0.000000e+00 356 5.000000e-02 2.500000e+00 -1.76384e-04 357 1.000000e-01 2.500000e+00 -3.44912e-04 358 1.500000e-01 2.500000e+00 -5.05789e-04 359 2.000000e-01 2.500000e+00 -6.59211e-04 360 2.500000e-01 2.500000e+00 -8.05367e-04 361 3.000000e-01 2.500000e+00 -9.44441e-04 362 3.500000e-01 2.500000e+00 -1.07661e-03 363 4.000000e-01 2.500000e+00 -1.20205e-03 364 4.500000e-01 2.500000e+00 -1.32092e-03 365 5.000000e-01 2.500000e+00 -1.43339e-03 366 5.500000e-01 2.500000e+00 -1.53960e-03 367 6.000000e-01 2.500000e+00 -1.63972e-03 368 6.500000e-01 2.500000e+00 -1.73389e-03 369 7.000000e-01 2.500000e+00 -1.82226e-03 370 7.500000e-01 2.500000e+00 -1.90495e-03 371 8.000000e-01 2.500000e+00 -1.98212e-03 372 8.500000e-01 2.500000e+00 -2.05389e-03 373 9.000000e-01 2.500000e+00 -2.12041e-03 374 9.500000e-01 2.500000e+00 -2.18181e-03 375 1.000000e+00 2.500000e+00 -2.23825e-03 376 1.050000e+00 2.500000e+00 -2.28992e-03 377 1.100000e+00 2.500000e+00 -2.33707e-03 378 1.150000e+00 2.500000e+00 -2.38009e-03 379 1.200000e+00 2.500000e+00 -2.41946e-03 380 1.250000e+00 2.500000e+00 -2.45573e-03 381 1.300000e+00 2.500000e+00 -2.48936e-03 382 1.350000e+00 2.500000e+00 -2.52073e-03 383 1.400000e+00 2.500000e+00 -2.55010e-03 384 1.450000e+00 2.500000e+00 -2.57772e-03 385 1.500000e+00 2.500000e+00 -2.60376e-03 386 1.550000e+00 2.500000e+00 -2.62839e-03 387 1.600000e+00 2.500000e+00 -2.65177e-03 388 1.650000e+00 2.500000e+00 -2.67403e-03 389 1.700000e+00 2.500000e+00 -2.69527e-03 390 1.750000e+00 2.500000e+00 -2.71560e-03 391 1.800000e+00 2.500000e+00 -2.73511e-03 392 1.850000e+00 2.500000e+00 -2.75388e-03 393 1.900000e+00 2.500000e+00 -2.77198e-03 394 1.950000e+00 2.500000e+00 -2.78946e-03 395 2.000000e+00 2.500000e+00 -2.80639e-03 396 2.050000e+00 2.500000e+00 -2.82280e-03 397 2.100000e+00 2.500000e+00 -2.83876e-03 398 2.150000e+00 2.500000e+00 -2.85428e-03 399 2.200000e+00 2.500000e+00 -2.86941e-03 400 2.250000e+00 2.500000e+00 -2.88419e-03 401 2.300000e+00 2.500000e+00 -2.89862e-03 402 2.350000e+00 2.500000e+00 -2.91276e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 2.400000e+00 2.500000e+00 -2.92660e-03 404 2.450000e+00 2.500000e+00 -2.94019e-03 405 2.500000e+00 2.500000e+00 -2.95352e-03 406 2.550000e+00 2.500000e+00 -2.96663e-03 407 2.600000e+00 2.500000e+00 -2.97953e-03 408 2.650000e+00 2.500000e+00 -2.99223e-03 409 2.700000e+00 2.500000e+00 -3.00475e-03 410 2.750000e+00 2.500000e+00 -3.01709e-03 411 2.800000e+00 2.500000e+00 -3.02927e-03 412 2.850000e+00 2.500000e+00 -3.04130e-03 413 2.900000e+00 2.500000e+00 -3.05319e-03 414 2.950000e+00 2.500000e+00 -3.06494e-03 415 3.000000e+00 2.500000e+00 -3.07657e-03 416 3.050000e+00 2.500000e+00 -3.08809e-03 417 3.100000e+00 2.500000e+00 -3.09949e-03 418 3.150000e+00 2.500000e+00 -3.11078e-03 419 3.200000e+00 2.500000e+00 -3.12198e-03 420 3.250000e+00 2.500000e+00 -3.13309e-03 421 3.300000e+00 2.500000e+00 -3.14411e-03 422 3.350000e+00 2.500000e+00 -3.15504e-03 423 3.400000e+00 2.500000e+00 -3.16590e-03 424 3.450000e+00 2.500000e+00 -3.17668e-03 425 3.500000e+00 2.500000e+00 -3.18739e-03 426 0.000000e+00 3.000000e+00 0.000000e+00 427 5.000000e-02 3.000000e+00 -1.84253e-04 428 1.000000e-01 3.000000e+00 -3.61671e-04 429 1.500000e-01 3.000000e+00 -5.32404e-04 430 2.000000e-01 3.000000e+00 -6.96599e-04 431 2.500000e-01 3.000000e+00 -8.54397e-04 432 3.000000e-01 3.000000e+00 -1.00594e-03 433 3.500000e-01 3.000000e+00 -1.15135e-03 434 4.000000e-01 3.000000e+00 -1.29077e-03 435 4.500000e-01 3.000000e+00 -1.42433e-03 436 5.000000e-01 3.000000e+00 -1.55214e-03 437 5.500000e-01 3.000000e+00 -1.67433e-03 438 6.000000e-01 3.000000e+00 -1.79100e-03 439 6.500000e-01 3.000000e+00 -1.90229e-03 440 7.000000e-01 3.000000e+00 -2.00829e-03 441 7.500000e-01 3.000000e+00 -2.10912e-03 442 8.000000e-01 3.000000e+00 -2.20488e-03 443 8.500000e-01 3.000000e+00 -2.29567e-03 444 9.000000e-01 3.000000e+00 -2.38160e-03 445 9.500000e-01 3.000000e+00 -2.46275e-03 446 1.000000e+00 3.000000e+00 -2.53924e-03 447 1.050000e+00 3.000000e+00 -2.61115e-03 448 1.100000e+00 3.000000e+00 -2.67859e-03 449 1.150000e+00 3.000000e+00 -2.74164e-03 450 1.200000e+00 3.000000e+00 -2.80043e-03 451 1.250000e+00 3.000000e+00 -2.85508e-03 452 1.300000e+00 3.000000e+00 -2.90577e-03 453 1.350000e+00 3.000000e+00 -2.95273e-03 454 1.400000e+00 3.000000e+00 -2.99634e-03 455 1.450000e+00 3.000000e+00 -3.03699e-03 456 1.500000e+00 3.000000e+00 -3.07513e-03 457 1.550000e+00 3.000000e+00 -3.11107e-03 458 1.600000e+00 3.000000e+00 -3.14508e-03 459 1.650000e+00 3.000000e+00 -3.17735e-03 460 1.700000e+00 3.000000e+00 -3.20803e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 1.750000e+00 3.000000e+00 -3.23725e-03 462 1.800000e+00 3.000000e+00 -3.26515e-03 463 1.850000e+00 3.000000e+00 -3.29184e-03 464 1.900000e+00 3.000000e+00 -3.31742e-03 465 1.950000e+00 3.000000e+00 -3.34199e-03 466 2.000000e+00 3.000000e+00 -3.36564e-03 467 2.050000e+00 3.000000e+00 -3.38845e-03 468 2.100000e+00 3.000000e+00 -3.41048e-03 469 2.150000e+00 3.000000e+00 -3.43180e-03 470 2.200000e+00 3.000000e+00 -3.45247e-03 471 2.250000e+00 3.000000e+00 -3.47254e-03 472 2.300000e+00 3.000000e+00 -3.49206e-03 473 2.350000e+00 3.000000e+00 -3.51107e-03 474 2.400000e+00 3.000000e+00 -3.52961e-03 475 2.450000e+00 3.000000e+00 -3.54771e-03 476 2.500000e+00 3.000000e+00 -3.56541e-03 477 2.550000e+00 3.000000e+00 -3.58273e-03 478 2.600000e+00 3.000000e+00 -3.59970e-03 479 2.650000e+00 3.000000e+00 -3.61635e-03 480 2.700000e+00 3.000000e+00 -3.63269e-03 481 2.750000e+00 3.000000e+00 -3.64875e-03 482 2.800000e+00 3.000000e+00 -3.66455e-03 483 2.850000e+00 3.000000e+00 -3.68010e-03 484 2.900000e+00 3.000000e+00 -3.69541e-03 485 2.950000e+00 3.000000e+00 -3.71051e-03 486 3.000000e+00 3.000000e+00 -3.72540e-03 487 3.050000e+00 3.000000e+00 -3.74010e-03 488 3.100000e+00 3.000000e+00 -3.75461e-03 489 3.150000e+00 3.000000e+00 -3.76896e-03 490 3.200000e+00 3.000000e+00 -3.78314e-03 491 3.250000e+00 3.000000e+00 -3.79718e-03 492 3.300000e+00 3.000000e+00 -3.81107e-03 493 3.350000e+00 3.000000e+00 -3.82482e-03 494 3.400000e+00 3.000000e+00 -3.83844e-03 495 3.450000e+00 3.000000e+00 -3.85195e-03 496 3.500000e+00 3.000000e+00 -3.86533e-03 497 0.000000e+00 3.500000e+00 0.000000e+00 498 5.000000e-02 3.500000e+00 -1.89379e-04 499 1.000000e-01 3.500000e+00 -3.72745e-04 500 1.500000e-01 3.500000e+00 -5.50214e-04 501 2.000000e-01 3.500000e+00 -7.21898e-04 502 2.500000e-01 3.500000e+00 -8.87905e-04 503 3.000000e-01 3.500000e+00 -1.04834e-03 504 3.500000e-01 3.500000e+00 -1.20332e-03 505 4.000000e-01 3.500000e+00 -1.35292e-03 506 4.500000e-01 3.500000e+00 -1.49727e-03 507 5.000000e-01 3.500000e+00 -1.63644e-03 508 5.500000e-01 3.500000e+00 -1.77054e-03 509 6.000000e-01 3.500000e+00 -1.89966e-03 510 6.500000e-01 3.500000e+00 -2.02388e-03 511 7.000000e-01 3.500000e+00 -2.14330e-03 512 7.500000e-01 3.500000e+00 -2.25799e-03 513 8.000000e-01 3.500000e+00 -2.36806e-03 514 8.500000e-01 3.500000e+00 -2.47356e-03 515 9.000000e-01 3.500000e+00 -2.57459e-03 516 9.500000e-01 3.500000e+00 -2.67123e-03 517 1.000000e+00 3.500000e+00 -2.76355e-03 518 1.050000e+00 3.500000e+00 -2.85162e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 1.100000e+00 3.500000e+00 -2.93552e-03 520 1.150000e+00 3.500000e+00 -3.01533e-03 521 1.200000e+00 3.500000e+00 -3.09111e-03 522 1.250000e+00 3.500000e+00 -3.16293e-03 523 1.300000e+00 3.500000e+00 -3.23087e-03 524 1.350000e+00 3.500000e+00 -3.29501e-03 525 1.400000e+00 3.500000e+00 -3.35541e-03 526 1.450000e+00 3.500000e+00 -3.41218e-03 527 1.500000e+00 3.500000e+00 -3.46543e-03 528 1.550000e+00 3.500000e+00 -3.51534e-03 529 1.600000e+00 3.500000e+00 -3.56216e-03 530 1.650000e+00 3.500000e+00 -3.60621e-03 531 1.700000e+00 3.500000e+00 -3.64786e-03 532 1.750000e+00 3.500000e+00 -3.68745e-03 533 1.800000e+00 3.500000e+00 -3.72522e-03 534 1.850000e+00 3.500000e+00 -3.76138e-03 535 1.900000e+00 3.500000e+00 -3.79603e-03 536 1.950000e+00 3.500000e+00 -3.82928e-03 537 2.000000e+00 3.500000e+00 -3.86123e-03 538 2.050000e+00 3.500000e+00 -3.89195e-03 539 2.100000e+00 3.500000e+00 -3.92154e-03 540 2.150000e+00 3.500000e+00 -3.95007e-03 541 2.200000e+00 3.500000e+00 -3.97763e-03 542 2.250000e+00 3.500000e+00 -4.00428e-03 543 2.300000e+00 3.500000e+00 -4.03009e-03 544 2.350000e+00 3.500000e+00 -4.05512e-03 545 2.400000e+00 3.500000e+00 -4.07944e-03 546 2.450000e+00 3.500000e+00 -4.10308e-03 547 2.500000e+00 3.500000e+00 -4.12610e-03 548 2.550000e+00 3.500000e+00 -4.14855e-03 549 2.600000e+00 3.500000e+00 -4.17046e-03 550 2.650000e+00 3.500000e+00 -4.19187e-03 551 2.700000e+00 3.500000e+00 -4.21281e-03 552 2.750000e+00 3.500000e+00 -4.23332e-03 553 2.800000e+00 3.500000e+00 -4.25342e-03 554 2.850000e+00 3.500000e+00 -4.27315e-03 555 2.900000e+00 3.500000e+00 -4.29251e-03 556 2.950000e+00 3.500000e+00 -4.31154e-03 557 3.000000e+00 3.500000e+00 -4.33026e-03 558 3.050000e+00 3.500000e+00 -4.34868e-03 559 3.100000e+00 3.500000e+00 -4.36683e-03 560 3.150000e+00 3.500000e+00 -4.38471e-03 561 3.200000e+00 3.500000e+00 -4.40235e-03 562 3.250000e+00 3.500000e+00 -4.41976e-03 563 3.300000e+00 3.500000e+00 -4.43694e-03 564 3.350000e+00 3.500000e+00 -4.45392e-03 565 3.400000e+00 3.500000e+00 -4.47070e-03 566 3.450000e+00 3.500000e+00 -4.48730e-03 567 3.500000e+00 3.500000e+00 -4.50372e-03 Total run time: 1.120 seconds. Current data size = 249856, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test2.out0000644000265600020320000006316712264261473017455 0ustar andreasadmin Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** Date: Tue Apr 20 23:12:04 1999 *****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** DCtransferCurve Tue Apr 20 23:12:03 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 5.000000e-02 0.000000e+00 -1.41387e-11 2 1.000000e-01 0.000000e+00 -1.63421e-11 3 1.500000e-01 0.000000e+00 -1.77717e-11 4 2.000000e-01 0.000000e+00 -1.90249e-11 5 2.500000e-01 0.000000e+00 -2.02098e-11 6 3.000000e-01 0.000000e+00 -2.13679e-11 7 3.500000e-01 0.000000e+00 -2.25207e-11 8 4.000000e-01 0.000000e+00 -2.36811e-11 9 4.500000e-01 0.000000e+00 -2.48579e-11 10 5.000000e-01 0.000000e+00 -2.60574e-11 11 5.500000e-01 0.000000e+00 -2.72841e-11 12 6.000000e-01 0.000000e+00 -2.85421e-11 13 6.500000e-01 0.000000e+00 -2.98345e-11 14 7.000000e-01 0.000000e+00 -3.11641e-11 15 7.500000e-01 0.000000e+00 -3.25335e-11 16 8.000000e-01 0.000000e+00 -3.39451e-11 17 8.500000e-01 0.000000e+00 -3.54010e-11 18 9.000000e-01 0.000000e+00 -3.69035e-11 19 9.500000e-01 0.000000e+00 -3.84546e-11 20 1.000000e+00 0.000000e+00 -4.00565e-11 21 1.050000e+00 0.000000e+00 -4.17111e-11 22 1.100000e+00 0.000000e+00 -4.34208e-11 23 1.150000e+00 0.000000e+00 -4.51874e-11 24 1.200000e+00 0.000000e+00 -4.70133e-11 25 1.250000e+00 0.000000e+00 -4.89005e-11 26 1.300000e+00 0.000000e+00 -5.08513e-11 27 1.350000e+00 0.000000e+00 -5.28680e-11 28 1.400000e+00 0.000000e+00 -5.49529e-11 29 1.450000e+00 0.000000e+00 -5.71084e-11 30 1.500000e+00 0.000000e+00 -5.93370e-11 31 1.550000e+00 0.000000e+00 -6.16412e-11 32 1.600000e+00 0.000000e+00 -6.40235e-11 33 1.650000e+00 0.000000e+00 -6.64866e-11 34 1.700000e+00 0.000000e+00 -6.90334e-11 35 1.750000e+00 0.000000e+00 -7.16666e-11 36 1.800000e+00 0.000000e+00 -7.43890e-11 37 1.850000e+00 0.000000e+00 -7.72039e-11 38 1.900000e+00 0.000000e+00 -8.01141e-11 39 1.950000e+00 0.000000e+00 -8.31229e-11 40 2.000000e+00 0.000000e+00 -8.62336e-11 41 2.050000e+00 0.000000e+00 -8.94496e-11 42 2.100000e+00 0.000000e+00 -9.27743e-11 43 2.150000e+00 0.000000e+00 -9.62114e-11 44 2.200000e+00 0.000000e+00 -9.97646e-11 45 2.250000e+00 0.000000e+00 -1.03438e-10 46 2.300000e+00 0.000000e+00 -1.07234e-10 47 2.350000e+00 0.000000e+00 -1.11159e-10 48 2.400000e+00 0.000000e+00 -1.15216e-10 49 2.450000e+00 0.000000e+00 -1.19409e-10 50 2.500000e+00 0.000000e+00 -1.23744e-10 51 2.550000e+00 0.000000e+00 -1.28223e-10 52 2.600000e+00 0.000000e+00 -1.32853e-10 53 2.650000e+00 0.000000e+00 -1.37638e-10 54 2.700000e+00 0.000000e+00 -1.42583e-10 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 0.000000e+00 -1.47693e-10 56 2.800000e+00 0.000000e+00 -1.52975e-10 57 2.850000e+00 0.000000e+00 -1.58432e-10 58 2.900000e+00 0.000000e+00 -1.64071e-10 59 2.950000e+00 0.000000e+00 -1.69899e-10 60 3.000000e+00 0.000000e+00 -1.75920e-10 61 3.050000e+00 0.000000e+00 -1.82141e-10 62 3.100000e+00 0.000000e+00 -1.88569e-10 63 3.150000e+00 0.000000e+00 -1.95210e-10 64 3.200000e+00 0.000000e+00 -2.02071e-10 65 3.250000e+00 0.000000e+00 -2.09160e-10 66 3.300000e+00 0.000000e+00 -2.16483e-10 67 3.350000e+00 0.000000e+00 -2.24047e-10 68 3.400000e+00 0.000000e+00 -2.31862e-10 69 3.450000e+00 0.000000e+00 -2.39935e-10 70 3.500000e+00 0.000000e+00 -2.48273e-10 71 0.000000e+00 5.000000e-01 0.000000e+00 72 5.000000e-02 5.000000e-01 -3.68557e-05 73 1.000000e-01 5.000000e-01 -5.31381e-05 74 1.500000e-01 5.000000e-01 -5.98227e-05 75 2.000000e-01 5.000000e-01 -6.38278e-05 76 2.500000e-01 5.000000e-01 -6.68810e-05 77 3.000000e-01 5.000000e-01 -6.94419e-05 78 3.500000e-01 5.000000e-01 -7.17010e-05 79 4.000000e-01 5.000000e-01 -7.37589e-05 80 4.500000e-01 5.000000e-01 -7.56763e-05 81 5.000000e-01 5.000000e-01 -7.74921e-05 82 5.500000e-01 5.000000e-01 -7.92330e-05 83 6.000000e-01 5.000000e-01 -8.09178e-05 84 6.500000e-01 5.000000e-01 -8.25601e-05 85 7.000000e-01 5.000000e-01 -8.41701e-05 86 7.500000e-01 5.000000e-01 -8.57556e-05 87 8.000000e-01 5.000000e-01 -8.73226e-05 88 8.500000e-01 5.000000e-01 -8.88759e-05 89 9.000000e-01 5.000000e-01 -9.04193e-05 90 9.500000e-01 5.000000e-01 -9.19558e-05 91 1.000000e+00 5.000000e-01 -9.34880e-05 92 1.050000e+00 5.000000e-01 -9.50179e-05 93 1.100000e+00 5.000000e-01 -9.65472e-05 94 1.150000e+00 5.000000e-01 -9.80775e-05 95 1.200000e+00 5.000000e-01 -9.96099e-05 96 1.250000e+00 5.000000e-01 -1.01146e-04 97 1.300000e+00 5.000000e-01 -1.02685e-04 98 1.350000e+00 5.000000e-01 -1.04230e-04 99 1.400000e+00 5.000000e-01 -1.05780e-04 100 1.450000e+00 5.000000e-01 -1.07337e-04 101 1.500000e+00 5.000000e-01 -1.08900e-04 102 1.550000e+00 5.000000e-01 -1.10470e-04 103 1.600000e+00 5.000000e-01 -1.12048e-04 104 1.650000e+00 5.000000e-01 -1.13633e-04 105 1.700000e+00 5.000000e-01 -1.15227e-04 106 1.750000e+00 5.000000e-01 -1.16830e-04 107 1.800000e+00 5.000000e-01 -1.18441e-04 108 1.850000e+00 5.000000e-01 -1.20061e-04 109 1.900000e+00 5.000000e-01 -1.21691e-04 110 1.950000e+00 5.000000e-01 -1.23330e-04 111 2.000000e+00 5.000000e-01 -1.24978e-04 112 2.050000e+00 5.000000e-01 -1.26637e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 5.000000e-01 -1.28305e-04 114 2.150000e+00 5.000000e-01 -1.29983e-04 115 2.200000e+00 5.000000e-01 -1.31672e-04 116 2.250000e+00 5.000000e-01 -1.33370e-04 117 2.300000e+00 5.000000e-01 -1.35079e-04 118 2.350000e+00 5.000000e-01 -1.36799e-04 119 2.400000e+00 5.000000e-01 -1.38529e-04 120 2.450000e+00 5.000000e-01 -1.40270e-04 121 2.500000e+00 5.000000e-01 -1.42022e-04 122 2.550000e+00 5.000000e-01 -1.43784e-04 123 2.600000e+00 5.000000e-01 -1.45558e-04 124 2.650000e+00 5.000000e-01 -1.47342e-04 125 2.700000e+00 5.000000e-01 -1.49137e-04 126 2.750000e+00 5.000000e-01 -1.50944e-04 127 2.800000e+00 5.000000e-01 -1.52761e-04 128 2.850000e+00 5.000000e-01 -1.54590e-04 129 2.900000e+00 5.000000e-01 -1.56430e-04 130 2.950000e+00 5.000000e-01 -1.58281e-04 131 3.000000e+00 5.000000e-01 -1.60143e-04 132 3.050000e+00 5.000000e-01 -1.62017e-04 133 3.100000e+00 5.000000e-01 -1.63903e-04 134 3.150000e+00 5.000000e-01 -1.65799e-04 135 3.200000e+00 5.000000e-01 -1.67707e-04 136 3.250000e+00 5.000000e-01 -1.69627e-04 137 3.300000e+00 5.000000e-01 -1.71558e-04 138 3.350000e+00 5.000000e-01 -1.73501e-04 139 3.400000e+00 5.000000e-01 -1.75456e-04 140 3.450000e+00 5.000000e-01 -1.77422e-04 141 3.500000e+00 5.000000e-01 -1.79399e-04 142 0.000000e+00 1.000000e+00 0.000000e+00 143 5.000000e-02 1.000000e+00 -1.84865e-04 144 1.000000e-01 1.000000e+00 -3.38001e-04 145 1.500000e-01 1.000000e+00 -4.62827e-04 146 2.000000e-01 1.000000e+00 -5.62378e-04 147 2.500000e-01 1.000000e+00 -6.39510e-04 148 3.000000e-01 1.000000e+00 -6.97313e-04 149 3.500000e-01 1.000000e+00 -7.39700e-04 150 4.000000e-01 1.000000e+00 -7.71190e-04 151 4.500000e-01 1.000000e+00 -7.95539e-04 152 5.000000e-01 1.000000e+00 -8.15173e-04 153 5.500000e-01 1.000000e+00 -8.31569e-04 154 6.000000e-01 1.000000e+00 -8.45651e-04 155 6.500000e-01 1.000000e+00 -8.58024e-04 156 7.000000e-01 1.000000e+00 -8.69102e-04 157 7.500000e-01 1.000000e+00 -8.79174e-04 158 8.000000e-01 1.000000e+00 -8.88451e-04 159 8.500000e-01 1.000000e+00 -8.97089e-04 160 9.000000e-01 1.000000e+00 -9.05208e-04 161 9.500000e-01 1.000000e+00 -9.12897e-04 162 1.000000e+00 1.000000e+00 -9.20229e-04 163 1.050000e+00 1.000000e+00 -9.27260e-04 164 1.100000e+00 1.000000e+00 -9.34036e-04 165 1.150000e+00 1.000000e+00 -9.40595e-04 166 1.200000e+00 1.000000e+00 -9.46966e-04 167 1.250000e+00 1.000000e+00 -9.53176e-04 168 1.300000e+00 1.000000e+00 -9.59245e-04 169 1.350000e+00 1.000000e+00 -9.65191e-04 170 1.400000e+00 1.000000e+00 -9.71031e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e+00 -9.76775e-04 172 1.500000e+00 1.000000e+00 -9.82437e-04 173 1.550000e+00 1.000000e+00 -9.88024e-04 174 1.600000e+00 1.000000e+00 -9.93547e-04 175 1.650000e+00 1.000000e+00 -9.99011e-04 176 1.700000e+00 1.000000e+00 -1.00442e-03 177 1.750000e+00 1.000000e+00 -1.00979e-03 178 1.800000e+00 1.000000e+00 -1.01512e-03 179 1.850000e+00 1.000000e+00 -1.02041e-03 180 1.900000e+00 1.000000e+00 -1.02566e-03 181 1.950000e+00 1.000000e+00 -1.03089e-03 182 2.000000e+00 1.000000e+00 -1.03609e-03 183 2.050000e+00 1.000000e+00 -1.04127e-03 184 2.100000e+00 1.000000e+00 -1.04643e-03 185 2.150000e+00 1.000000e+00 -1.05157e-03 186 2.200000e+00 1.000000e+00 -1.05669e-03 187 2.250000e+00 1.000000e+00 -1.06180e-03 188 2.300000e+00 1.000000e+00 -1.06690e-03 189 2.350000e+00 1.000000e+00 -1.07198e-03 190 2.400000e+00 1.000000e+00 -1.07706e-03 191 2.450000e+00 1.000000e+00 -1.08212e-03 192 2.500000e+00 1.000000e+00 -1.08719e-03 193 2.550000e+00 1.000000e+00 -1.09224e-03 194 2.600000e+00 1.000000e+00 -1.09729e-03 195 2.650000e+00 1.000000e+00 -1.10234e-03 196 2.700000e+00 1.000000e+00 -1.10738e-03 197 2.750000e+00 1.000000e+00 -1.11242e-03 198 2.800000e+00 1.000000e+00 -1.11746e-03 199 2.850000e+00 1.000000e+00 -1.12250e-03 200 2.900000e+00 1.000000e+00 -1.12754e-03 201 2.950000e+00 1.000000e+00 -1.13258e-03 202 3.000000e+00 1.000000e+00 -1.13762e-03 203 3.050000e+00 1.000000e+00 -1.14266e-03 204 3.100000e+00 1.000000e+00 -1.14770e-03 205 3.150000e+00 1.000000e+00 -1.15275e-03 206 3.200000e+00 1.000000e+00 -1.15779e-03 207 3.250000e+00 1.000000e+00 -1.16285e-03 208 3.300000e+00 1.000000e+00 -1.16790e-03 209 3.350000e+00 1.000000e+00 -1.17296e-03 210 3.400000e+00 1.000000e+00 -1.17803e-03 211 3.450000e+00 1.000000e+00 -1.18310e-03 212 3.500000e+00 1.000000e+00 -1.18817e-03 213 0.000000e+00 1.500000e+00 0.000000e+00 214 5.000000e-02 1.500000e+00 -2.64494e-04 215 1.000000e-01 1.500000e+00 -4.99687e-04 216 1.500000e-01 1.500000e+00 -7.07978e-04 217 2.000000e-01 1.500000e+00 -8.91512e-04 218 2.500000e-01 1.500000e+00 -1.05222e-03 219 3.000000e-01 1.500000e+00 -1.19184e-03 220 3.500000e-01 1.500000e+00 -1.31195e-03 221 4.000000e-01 1.500000e+00 -1.41398e-03 222 4.500000e-01 1.500000e+00 -1.49928e-03 223 5.000000e-01 1.500000e+00 -1.56925e-03 224 5.500000e-01 1.500000e+00 -1.62583e-03 225 6.000000e-01 1.500000e+00 -1.67161e-03 226 6.500000e-01 1.500000e+00 -1.70923e-03 227 7.000000e-01 1.500000e+00 -1.74082e-03 228 7.500000e-01 1.500000e+00 -1.76790e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 1.500000e+00 -1.79156e-03 230 8.500000e-01 1.500000e+00 -1.81259e-03 231 9.000000e-01 1.500000e+00 -1.83153e-03 232 9.500000e-01 1.500000e+00 -1.84882e-03 233 1.000000e+00 1.500000e+00 -1.86476e-03 234 1.050000e+00 1.500000e+00 -1.87959e-03 235 1.100000e+00 1.500000e+00 -1.89350e-03 236 1.150000e+00 1.500000e+00 -1.90665e-03 237 1.200000e+00 1.500000e+00 -1.91914e-03 238 1.250000e+00 1.500000e+00 -1.93107e-03 239 1.300000e+00 1.500000e+00 -1.94252e-03 240 1.350000e+00 1.500000e+00 -1.95356e-03 241 1.400000e+00 1.500000e+00 -1.96424e-03 242 1.450000e+00 1.500000e+00 -1.97461e-03 243 1.500000e+00 1.500000e+00 -1.98469e-03 244 1.550000e+00 1.500000e+00 -1.99453e-03 245 1.600000e+00 1.500000e+00 -2.00416e-03 246 1.650000e+00 1.500000e+00 -2.01359e-03 247 1.700000e+00 1.500000e+00 -2.02285e-03 248 1.750000e+00 1.500000e+00 -2.03195e-03 249 1.800000e+00 1.500000e+00 -2.04091e-03 250 1.850000e+00 1.500000e+00 -2.04975e-03 251 1.900000e+00 1.500000e+00 -2.05848e-03 252 1.950000e+00 1.500000e+00 -2.06710e-03 253 2.000000e+00 1.500000e+00 -2.07563e-03 254 2.050000e+00 1.500000e+00 -2.08408e-03 255 2.100000e+00 1.500000e+00 -2.09245e-03 256 2.150000e+00 1.500000e+00 -2.10075e-03 257 2.200000e+00 1.500000e+00 -2.10899e-03 258 2.250000e+00 1.500000e+00 -2.11717e-03 259 2.300000e+00 1.500000e+00 -2.12529e-03 260 2.350000e+00 1.500000e+00 -2.13337e-03 261 2.400000e+00 1.500000e+00 -2.14140e-03 262 2.450000e+00 1.500000e+00 -2.14940e-03 263 2.500000e+00 1.500000e+00 -2.15735e-03 264 2.550000e+00 1.500000e+00 -2.16527e-03 265 2.600000e+00 1.500000e+00 -2.17316e-03 266 2.650000e+00 1.500000e+00 -2.18102e-03 267 2.700000e+00 1.500000e+00 -2.18886e-03 268 2.750000e+00 1.500000e+00 -2.19667e-03 269 2.800000e+00 1.500000e+00 -2.20446e-03 270 2.850000e+00 1.500000e+00 -2.21223e-03 271 2.900000e+00 1.500000e+00 -2.21998e-03 272 2.950000e+00 1.500000e+00 -2.22772e-03 273 3.000000e+00 1.500000e+00 -2.23544e-03 274 3.050000e+00 1.500000e+00 -2.24314e-03 275 3.100000e+00 1.500000e+00 -2.25084e-03 276 3.150000e+00 1.500000e+00 -2.25852e-03 277 3.200000e+00 1.500000e+00 -2.26620e-03 278 3.250000e+00 1.500000e+00 -2.27386e-03 279 3.300000e+00 1.500000e+00 -2.28152e-03 280 3.350000e+00 1.500000e+00 -2.28917e-03 281 3.400000e+00 1.500000e+00 -2.29681e-03 282 3.450000e+00 1.500000e+00 -2.30445e-03 283 3.500000e+00 1.500000e+00 -2.31208e-03 284 0.000000e+00 2.000000e+00 0.000000e+00 285 5.000000e-02 2.000000e+00 -3.12149e-04 286 1.000000e-01 2.000000e+00 -5.98348e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 1.500000e-01 2.000000e+00 -8.60313e-04 288 2.000000e-01 2.000000e+00 -1.09961e-03 289 2.500000e-01 2.000000e+00 -1.31769e-03 290 3.000000e-01 2.000000e+00 -1.51585e-03 291 3.500000e-01 2.000000e+00 -1.69532e-03 292 4.000000e-01 2.000000e+00 -1.85720e-03 293 4.500000e-01 2.000000e+00 -2.00251e-03 294 5.000000e-01 2.000000e+00 -2.13218e-03 295 5.500000e-01 2.000000e+00 -2.24702e-03 296 6.000000e-01 2.000000e+00 -2.34773e-03 297 6.500000e-01 2.000000e+00 -2.43490e-03 298 7.000000e-01 2.000000e+00 -2.50930e-03 299 7.500000e-01 2.000000e+00 -2.57224e-03 300 8.000000e-01 2.000000e+00 -2.62555e-03 301 8.500000e-01 2.000000e+00 -2.67116e-03 302 9.000000e-01 2.000000e+00 -2.71071e-03 303 9.500000e-01 2.000000e+00 -2.74548e-03 304 1.000000e+00 2.000000e+00 -2.77647e-03 305 1.050000e+00 2.000000e+00 -2.80442e-03 306 1.100000e+00 2.000000e+00 -2.82991e-03 307 1.150000e+00 2.000000e+00 -2.85337e-03 308 1.200000e+00 2.000000e+00 -2.87516e-03 309 1.250000e+00 2.000000e+00 -2.89554e-03 310 1.300000e+00 2.000000e+00 -2.91472e-03 311 1.350000e+00 2.000000e+00 -2.93290e-03 312 1.400000e+00 2.000000e+00 -2.95020e-03 313 1.450000e+00 2.000000e+00 -2.96675e-03 314 1.500000e+00 2.000000e+00 -2.98265e-03 315 1.550000e+00 2.000000e+00 -2.99797e-03 316 1.600000e+00 2.000000e+00 -3.01279e-03 317 1.650000e+00 2.000000e+00 -3.02716e-03 318 1.700000e+00 2.000000e+00 -3.04114e-03 319 1.750000e+00 2.000000e+00 -3.05477e-03 320 1.800000e+00 2.000000e+00 -3.06808e-03 321 1.850000e+00 2.000000e+00 -3.08111e-03 322 1.900000e+00 2.000000e+00 -3.09388e-03 323 1.950000e+00 2.000000e+00 -3.10642e-03 324 2.000000e+00 2.000000e+00 -3.11876e-03 325 2.050000e+00 2.000000e+00 -3.13091e-03 326 2.100000e+00 2.000000e+00 -3.14289e-03 327 2.150000e+00 2.000000e+00 -3.15471e-03 328 2.200000e+00 2.000000e+00 -3.16639e-03 329 2.250000e+00 2.000000e+00 -3.17793e-03 330 2.300000e+00 2.000000e+00 -3.18936e-03 331 2.350000e+00 2.000000e+00 -3.20068e-03 332 2.400000e+00 2.000000e+00 -3.21190e-03 333 2.450000e+00 2.000000e+00 -3.22302e-03 334 2.500000e+00 2.000000e+00 -3.23406e-03 335 2.550000e+00 2.000000e+00 -3.24501e-03 336 2.600000e+00 2.000000e+00 -3.25590e-03 337 2.650000e+00 2.000000e+00 -3.26672e-03 338 2.700000e+00 2.000000e+00 -3.27747e-03 339 2.750000e+00 2.000000e+00 -3.28817e-03 340 2.800000e+00 2.000000e+00 -3.29881e-03 341 2.850000e+00 2.000000e+00 -3.30941e-03 342 2.900000e+00 2.000000e+00 -3.31996e-03 343 2.950000e+00 2.000000e+00 -3.33046e-03 344 3.000000e+00 2.000000e+00 -3.34093e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 3.050000e+00 2.000000e+00 -3.35135e-03 346 3.100000e+00 2.000000e+00 -3.36175e-03 347 3.150000e+00 2.000000e+00 -3.37211e-03 348 3.200000e+00 2.000000e+00 -3.38244e-03 349 3.250000e+00 2.000000e+00 -3.39275e-03 350 3.300000e+00 2.000000e+00 -3.40303e-03 351 3.350000e+00 2.000000e+00 -3.41329e-03 352 3.400000e+00 2.000000e+00 -3.42352e-03 353 3.450000e+00 2.000000e+00 -3.43374e-03 354 3.500000e+00 2.000000e+00 -3.44393e-03 355 0.000000e+00 2.500000e+00 0.000000e+00 356 5.000000e-02 2.500000e+00 -3.42646e-04 357 1.000000e-01 2.500000e+00 -6.62427e-04 358 1.500000e-01 2.500000e+00 -9.60610e-04 359 2.000000e-01 2.500000e+00 -1.23837e-03 360 2.500000e-01 2.500000e+00 -1.49679e-03 361 3.000000e-01 2.500000e+00 -1.73689e-03 362 3.500000e-01 2.500000e+00 -1.95961e-03 363 4.000000e-01 2.500000e+00 -2.16584e-03 364 4.500000e-01 2.500000e+00 -2.35638e-03 365 5.000000e-01 2.500000e+00 -2.53202e-03 366 5.500000e-01 2.500000e+00 -2.69345e-03 367 6.000000e-01 2.500000e+00 -2.84133e-03 368 6.500000e-01 2.500000e+00 -2.97626e-03 369 7.000000e-01 2.500000e+00 -3.09875e-03 370 7.500000e-01 2.500000e+00 -3.20921e-03 371 8.000000e-01 2.500000e+00 -3.30798e-03 372 8.500000e-01 2.500000e+00 -3.39536e-03 373 9.000000e-01 2.500000e+00 -3.47194e-03 374 9.500000e-01 2.500000e+00 -3.53876e-03 375 1.000000e+00 2.500000e+00 -3.59717e-03 376 1.050000e+00 2.500000e+00 -3.64858e-03 377 1.100000e+00 2.500000e+00 -3.69425e-03 378 1.150000e+00 2.500000e+00 -3.73523e-03 379 1.200000e+00 2.500000e+00 -3.77236e-03 380 1.250000e+00 2.500000e+00 -3.80630e-03 381 1.300000e+00 2.500000e+00 -3.83759e-03 382 1.350000e+00 2.500000e+00 -3.86665e-03 383 1.400000e+00 2.500000e+00 -3.89383e-03 384 1.450000e+00 2.500000e+00 -3.91939e-03 385 1.500000e+00 2.500000e+00 -3.94358e-03 386 1.550000e+00 2.500000e+00 -3.96657e-03 387 1.600000e+00 2.500000e+00 -3.98853e-03 388 1.650000e+00 2.500000e+00 -4.00958e-03 389 1.700000e+00 2.500000e+00 -4.02983e-03 390 1.750000e+00 2.500000e+00 -4.04937e-03 391 1.800000e+00 2.500000e+00 -4.06829e-03 392 1.850000e+00 2.500000e+00 -4.08664e-03 393 1.900000e+00 2.500000e+00 -4.10450e-03 394 1.950000e+00 2.500000e+00 -4.12192e-03 395 2.000000e+00 2.500000e+00 -4.13892e-03 396 2.050000e+00 2.500000e+00 -4.15557e-03 397 2.100000e+00 2.500000e+00 -4.17188e-03 398 2.150000e+00 2.500000e+00 -4.18790e-03 399 2.200000e+00 2.500000e+00 -4.20364e-03 400 2.250000e+00 2.500000e+00 -4.21913e-03 401 2.300000e+00 2.500000e+00 -4.23439e-03 402 2.350000e+00 2.500000e+00 -4.24944e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 2.400000e+00 2.500000e+00 -4.26431e-03 404 2.450000e+00 2.500000e+00 -4.27899e-03 405 2.500000e+00 2.500000e+00 -4.29351e-03 406 2.550000e+00 2.500000e+00 -4.30788e-03 407 2.600000e+00 2.500000e+00 -4.32212e-03 408 2.650000e+00 2.500000e+00 -4.33622e-03 409 2.700000e+00 2.500000e+00 -4.35020e-03 410 2.750000e+00 2.500000e+00 -4.36408e-03 411 2.800000e+00 2.500000e+00 -4.37785e-03 412 2.850000e+00 2.500000e+00 -4.39152e-03 413 2.900000e+00 2.500000e+00 -4.40511e-03 414 2.950000e+00 2.500000e+00 -4.41861e-03 415 3.000000e+00 2.500000e+00 -4.43204e-03 416 3.050000e+00 2.500000e+00 -4.44540e-03 417 3.100000e+00 2.500000e+00 -4.45868e-03 418 3.150000e+00 2.500000e+00 -4.47191e-03 419 3.200000e+00 2.500000e+00 -4.48507e-03 420 3.250000e+00 2.500000e+00 -4.49818e-03 421 3.300000e+00 2.500000e+00 -4.51124e-03 422 3.350000e+00 2.500000e+00 -4.52425e-03 423 3.400000e+00 2.500000e+00 -4.53722e-03 424 3.450000e+00 2.500000e+00 -4.55014e-03 425 3.500000e+00 2.500000e+00 -4.56302e-03 426 0.000000e+00 3.000000e+00 0.000000e+00 427 5.000000e-02 3.000000e+00 -3.62939e-04 428 1.000000e-01 3.000000e+00 -7.05660e-04 429 1.500000e-01 3.000000e+00 -1.02912e-03 430 2.000000e-01 3.000000e+00 -1.33421e-03 431 2.500000e-01 3.000000e+00 -1.62179e-03 432 3.000000e-01 3.000000e+00 -1.89264e-03 433 3.500000e-01 3.000000e+00 -2.14750e-03 434 4.000000e-01 3.000000e+00 -2.38709e-03 435 4.500000e-01 3.000000e+00 -2.61205e-03 436 5.000000e-01 3.000000e+00 -2.82301e-03 437 5.500000e-01 3.000000e+00 -3.02056e-03 438 6.000000e-01 3.000000e+00 -3.20526e-03 439 6.500000e-01 3.000000e+00 -3.37761e-03 440 7.000000e-01 3.000000e+00 -3.53812e-03 441 7.500000e-01 3.000000e+00 -3.68723e-03 442 8.000000e-01 3.000000e+00 -3.82534e-03 443 8.500000e-01 3.000000e+00 -3.95283e-03 444 9.000000e-01 3.000000e+00 -4.06999e-03 445 9.500000e-01 3.000000e+00 -4.17703e-03 446 1.000000e+00 3.000000e+00 -4.27412e-03 447 1.050000e+00 3.000000e+00 -4.36154e-03 448 1.100000e+00 3.000000e+00 -4.43980e-03 449 1.150000e+00 3.000000e+00 -4.50972e-03 450 1.200000e+00 3.000000e+00 -4.57229e-03 451 1.250000e+00 3.000000e+00 -4.62857e-03 452 1.300000e+00 3.000000e+00 -4.67951e-03 453 1.350000e+00 3.000000e+00 -4.72595e-03 454 1.400000e+00 3.000000e+00 -4.76859e-03 455 1.450000e+00 3.000000e+00 -4.80801e-03 456 1.500000e+00 3.000000e+00 -4.84468e-03 457 1.550000e+00 3.000000e+00 -4.87902e-03 458 1.600000e+00 3.000000e+00 -4.91133e-03 459 1.650000e+00 3.000000e+00 -4.94190e-03 460 1.700000e+00 3.000000e+00 -4.97094e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 1.750000e+00 3.000000e+00 -4.99865e-03 462 1.800000e+00 3.000000e+00 -5.02519e-03 463 1.850000e+00 3.000000e+00 -5.05069e-03 464 1.900000e+00 3.000000e+00 -5.07528e-03 465 1.950000e+00 3.000000e+00 -5.09904e-03 466 2.000000e+00 3.000000e+00 -5.12207e-03 467 2.050000e+00 3.000000e+00 -5.14444e-03 468 2.100000e+00 3.000000e+00 -5.16622e-03 469 2.150000e+00 3.000000e+00 -5.18746e-03 470 2.200000e+00 3.000000e+00 -5.20822e-03 471 2.250000e+00 3.000000e+00 -5.22853e-03 472 2.300000e+00 3.000000e+00 -5.24845e-03 473 2.350000e+00 3.000000e+00 -5.26799e-03 474 2.400000e+00 3.000000e+00 -5.28720e-03 475 2.450000e+00 3.000000e+00 -5.30610e-03 476 2.500000e+00 3.000000e+00 -5.32471e-03 477 2.550000e+00 3.000000e+00 -5.34307e-03 478 2.600000e+00 3.000000e+00 -5.36118e-03 479 2.650000e+00 3.000000e+00 -5.37907e-03 480 2.700000e+00 3.000000e+00 -5.39676e-03 481 2.750000e+00 3.000000e+00 -5.41425e-03 482 2.800000e+00 3.000000e+00 -5.43156e-03 483 2.850000e+00 3.000000e+00 -5.44871e-03 484 2.900000e+00 3.000000e+00 -5.46571e-03 485 2.950000e+00 3.000000e+00 -5.48256e-03 486 3.000000e+00 3.000000e+00 -5.49928e-03 487 3.050000e+00 3.000000e+00 -5.51588e-03 488 3.100000e+00 3.000000e+00 -5.53235e-03 489 3.150000e+00 3.000000e+00 -5.54872e-03 490 3.200000e+00 3.000000e+00 -5.56499e-03 491 3.250000e+00 3.000000e+00 -5.58116e-03 492 3.300000e+00 3.000000e+00 -5.59724e-03 493 3.350000e+00 3.000000e+00 -5.61324e-03 494 3.400000e+00 3.000000e+00 -5.62915e-03 495 3.450000e+00 3.000000e+00 -5.64500e-03 496 3.500000e+00 3.000000e+00 -5.66077e-03 497 0.000000e+00 3.500000e+00 0.000000e+00 498 5.000000e-02 3.500000e+00 -3.76714e-04 499 1.000000e-01 3.500000e+00 -7.35441e-04 500 1.500000e-01 3.500000e+00 -1.07692e-03 501 2.000000e-01 3.500000e+00 -1.40186e-03 502 2.500000e-01 3.500000e+00 -1.71091e-03 503 3.000000e-01 3.500000e+00 -2.00472e-03 504 3.500000e-01 3.500000e+00 -2.28387e-03 505 4.000000e-01 3.500000e+00 -2.54893e-03 506 4.500000e-01 3.500000e+00 -2.80044e-03 507 5.000000e-01 3.500000e+00 -3.03891e-03 508 5.500000e-01 3.500000e+00 -3.26481e-03 509 6.000000e-01 3.500000e+00 -3.47862e-03 510 6.500000e-01 3.500000e+00 -3.68077e-03 511 7.000000e-01 3.500000e+00 -3.87167e-03 512 7.500000e-01 3.500000e+00 -4.05172e-03 513 8.000000e-01 3.500000e+00 -4.22130e-03 514 8.500000e-01 3.500000e+00 -4.38075e-03 515 9.000000e-01 3.500000e+00 -4.53040e-03 516 9.500000e-01 3.500000e+00 -4.67057e-03 517 1.000000e+00 3.500000e+00 -4.80152e-03 518 1.050000e+00 3.500000e+00 -4.92347e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 1.100000e+00 3.500000e+00 -5.03660e-03 520 1.150000e+00 3.500000e+00 -5.14106e-03 521 1.200000e+00 3.500000e+00 -5.23701e-03 522 1.250000e+00 3.500000e+00 -5.32471e-03 523 1.300000e+00 3.500000e+00 -5.40463e-03 524 1.350000e+00 3.500000e+00 -5.47738e-03 525 1.400000e+00 3.500000e+00 -5.54370e-03 526 1.450000e+00 3.500000e+00 -5.60437e-03 527 1.500000e+00 3.500000e+00 -5.66010e-03 528 1.550000e+00 3.500000e+00 -5.71157e-03 529 1.600000e+00 3.500000e+00 -5.75934e-03 530 1.650000e+00 3.500000e+00 -5.80392e-03 531 1.700000e+00 3.500000e+00 -5.84574e-03 532 1.750000e+00 3.500000e+00 -5.88514e-03 533 1.800000e+00 3.500000e+00 -5.92243e-03 534 1.850000e+00 3.500000e+00 -5.95788e-03 535 1.900000e+00 3.500000e+00 -5.99169e-03 536 1.950000e+00 3.500000e+00 -6.02406e-03 537 2.000000e+00 3.500000e+00 -6.05516e-03 538 2.050000e+00 3.500000e+00 -6.08510e-03 539 2.100000e+00 3.500000e+00 -6.11403e-03 540 2.150000e+00 3.500000e+00 -6.14203e-03 541 2.200000e+00 3.500000e+00 -6.16921e-03 542 2.250000e+00 3.500000e+00 -6.19564e-03 543 2.300000e+00 3.500000e+00 -6.22138e-03 544 2.350000e+00 3.500000e+00 -6.24651e-03 545 2.400000e+00 3.500000e+00 -6.27108e-03 546 2.450000e+00 3.500000e+00 -6.29513e-03 547 2.500000e+00 3.500000e+00 -6.31871e-03 548 2.550000e+00 3.500000e+00 -6.34186e-03 549 2.600000e+00 3.500000e+00 -6.36461e-03 550 2.650000e+00 3.500000e+00 -6.38699e-03 551 2.700000e+00 3.500000e+00 -6.40904e-03 552 2.750000e+00 3.500000e+00 -6.43077e-03 553 2.800000e+00 3.500000e+00 -6.45221e-03 554 2.850000e+00 3.500000e+00 -6.47338e-03 555 2.900000e+00 3.500000e+00 -6.49430e-03 556 2.950000e+00 3.500000e+00 -6.51499e-03 557 3.000000e+00 3.500000e+00 -6.53546e-03 558 3.050000e+00 3.500000e+00 -6.55573e-03 559 3.100000e+00 3.500000e+00 -6.57581e-03 560 3.150000e+00 3.500000e+00 -6.59572e-03 561 3.200000e+00 3.500000e+00 -6.61545e-03 562 3.250000e+00 3.500000e+00 -6.63504e-03 563 3.300000e+00 3.500000e+00 -6.65447e-03 564 3.350000e+00 3.500000e+00 -6.67377e-03 565 3.400000e+00 3.500000e+00 -6.69295e-03 566 3.450000e+00 3.500000e+00 -6.71200e-03 567 3.500000e+00 3.500000e+00 -6.73093e-03 Total run time: 1.110 seconds. Current data size = 249856, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test5.out0000644000265600020320000005475512264261473017463 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Date: Tue Apr 20 23:13:25 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** DCtransferCurve Tue Apr 20 23:13:25 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e-01 -3.55020e-09 1 5.000000e-02 1.000000e-01 -1.26313e-08 2 1.000000e-01 1.000000e-01 -4.41784e-08 3 1.500000e-01 1.000000e-01 -1.50335e-07 4 2.000000e-01 1.000000e-01 -4.92357e-07 5 2.500000e-01 1.000000e-01 -1.54093e-06 6 3.000000e-01 1.000000e-01 -4.54986e-06 7 3.500000e-01 1.000000e-01 -1.20751e-05 8 4.000000e-01 1.000000e-01 -2.68042e-05 9 4.500000e-01 1.000000e-01 -4.82454e-05 10 5.000000e-01 1.000000e-01 -7.27490e-05 11 5.500000e-01 1.000000e-01 -9.72007e-05 12 6.000000e-01 1.000000e-01 -1.20247e-04 13 6.500000e-01 1.000000e-01 -1.41575e-04 14 7.000000e-01 1.000000e-01 -1.61267e-04 15 7.500000e-01 1.000000e-01 -1.79505e-04 16 8.000000e-01 1.000000e-01 -1.96466e-04 17 8.500000e-01 1.000000e-01 -2.12297e-04 18 9.000000e-01 1.000000e-01 -2.27120e-04 19 9.500000e-01 1.000000e-01 -2.41032e-04 20 1.000000e+00 1.000000e-01 -2.54114e-04 21 1.050000e+00 1.000000e-01 -2.66435e-04 22 1.100000e+00 1.000000e-01 -2.78057e-04 23 1.150000e+00 1.000000e-01 -2.89032e-04 24 1.200000e+00 1.000000e-01 -2.99408e-04 25 1.250000e+00 1.000000e-01 -3.09228e-04 26 1.300000e+00 1.000000e-01 -3.18532e-04 27 1.350000e+00 1.000000e-01 -3.27354e-04 28 1.400000e+00 1.000000e-01 -3.35727e-04 29 1.450000e+00 1.000000e-01 -3.43680e-04 30 1.500000e+00 1.000000e-01 -3.51241e-04 31 1.550000e+00 1.000000e-01 -3.58434e-04 32 1.600000e+00 1.000000e-01 -3.65282e-04 33 1.650000e+00 1.000000e-01 -3.71807e-04 34 1.700000e+00 1.000000e-01 -3.78026e-04 35 1.750000e+00 1.000000e-01 -3.83960e-04 36 1.800000e+00 1.000000e-01 -3.89623e-04 37 1.850000e+00 1.000000e-01 -3.95031e-04 38 1.900000e+00 1.000000e-01 -4.00199e-04 39 1.950000e+00 1.000000e-01 -4.05139e-04 40 2.000000e+00 1.000000e-01 -4.09865e-04 41 2.050000e+00 1.000000e-01 -4.14386e-04 42 2.100000e+00 1.000000e-01 -4.18715e-04 43 2.150000e+00 1.000000e-01 -4.22861e-04 44 2.200000e+00 1.000000e-01 -4.26832e-04 45 2.250000e+00 1.000000e-01 -4.30639e-04 46 2.300000e+00 1.000000e-01 -4.34288e-04 47 2.350000e+00 1.000000e-01 -4.37788e-04 48 2.400000e+00 1.000000e-01 -4.41146e-04 49 2.450000e+00 1.000000e-01 -4.44368e-04 50 2.500000e+00 1.000000e-01 -4.47460e-04 51 2.550000e+00 1.000000e-01 -4.50430e-04 52 2.600000e+00 1.000000e-01 -4.53281e-04 53 2.650000e+00 1.000000e-01 -4.56020e-04 54 2.700000e+00 1.000000e-01 -4.58651e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 1.000000e-01 -4.61179e-04 56 2.800000e+00 1.000000e-01 -4.63608e-04 57 2.850000e+00 1.000000e-01 -4.65943e-04 58 2.900000e+00 1.000000e-01 -4.68188e-04 59 2.950000e+00 1.000000e-01 -4.70346e-04 60 3.000000e+00 1.000000e-01 -4.72421e-04 61 3.050000e+00 1.000000e-01 -4.74416e-04 62 3.100000e+00 1.000000e-01 -4.76334e-04 63 3.150000e+00 1.000000e-01 -4.78179e-04 64 3.200000e+00 1.000000e-01 -4.79953e-04 65 3.250000e+00 1.000000e-01 -4.81659e-04 66 3.300000e+00 1.000000e-01 -4.83300e-04 67 3.350000e+00 1.000000e-01 -4.84877e-04 68 3.400000e+00 1.000000e-01 -4.86394e-04 69 3.450000e+00 1.000000e-01 -4.87853e-04 70 3.500000e+00 1.000000e-01 -4.89256e-04 71 0.000000e+00 1.000000e-01 -2.06426e-10 72 5.000000e-02 1.000000e-01 -8.12114e-10 73 1.000000e-01 1.000000e-01 -3.18080e-09 74 1.500000e-01 1.000000e-01 -1.23201e-08 75 2.000000e-01 1.000000e-01 -4.67372e-08 76 2.500000e-01 1.000000e-01 -1.71295e-07 77 3.000000e-01 1.000000e-01 -5.97852e-07 78 3.500000e-01 1.000000e-01 -1.96592e-06 79 4.000000e-01 1.000000e-01 -5.94195e-06 80 4.500000e-01 1.000000e-01 -1.54220e-05 81 5.000000e-01 1.000000e-01 -3.21252e-05 82 5.500000e-01 1.000000e-01 -5.38404e-05 83 6.000000e-01 1.000000e-01 -7.69626e-05 84 6.500000e-01 1.000000e-01 -9.94128e-05 85 7.000000e-01 1.000000e-01 -1.20495e-04 86 7.500000e-01 1.000000e-01 -1.40128e-04 87 8.000000e-01 1.000000e-01 -1.58419e-04 88 8.500000e-01 1.000000e-01 -1.75512e-04 89 9.000000e-01 1.000000e-01 -1.91532e-04 90 9.500000e-01 1.000000e-01 -2.06587e-04 91 1.000000e+00 1.000000e-01 -2.20763e-04 92 1.050000e+00 1.000000e-01 -2.34134e-04 93 1.100000e+00 1.000000e-01 -2.46763e-04 94 1.150000e+00 1.000000e-01 -2.58706e-04 95 1.200000e+00 1.000000e-01 -2.70011e-04 96 1.250000e+00 1.000000e-01 -2.80725e-04 97 1.300000e+00 1.000000e-01 -2.90887e-04 98 1.350000e+00 1.000000e-01 -3.00535e-04 99 1.400000e+00 1.000000e-01 -3.09703e-04 100 1.450000e+00 1.000000e-01 -3.18420e-04 101 1.500000e+00 1.000000e-01 -3.26717e-04 102 1.550000e+00 1.000000e-01 -3.34618e-04 103 1.600000e+00 1.000000e-01 -3.42149e-04 104 1.650000e+00 1.000000e-01 -3.49331e-04 105 1.700000e+00 1.000000e-01 -3.56185e-04 106 1.750000e+00 1.000000e-01 -3.62731e-04 107 1.800000e+00 1.000000e-01 -3.68984e-04 108 1.850000e+00 1.000000e-01 -3.74963e-04 109 1.900000e+00 1.000000e-01 -3.80682e-04 110 1.950000e+00 1.000000e-01 -3.86154e-04 111 2.000000e+00 1.000000e-01 -3.91394e-04 112 2.050000e+00 1.000000e-01 -3.96413e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 1.000000e-01 -4.01224e-04 114 2.150000e+00 1.000000e-01 -4.05835e-04 115 2.200000e+00 1.000000e-01 -4.10258e-04 116 2.250000e+00 1.000000e-01 -4.14501e-04 117 2.300000e+00 1.000000e-01 -4.18574e-04 118 2.350000e+00 1.000000e-01 -4.22485e-04 119 2.400000e+00 1.000000e-01 -4.26240e-04 120 2.450000e+00 1.000000e-01 -4.29848e-04 121 2.500000e+00 1.000000e-01 -4.33315e-04 122 2.550000e+00 1.000000e-01 -4.36648e-04 123 2.600000e+00 1.000000e-01 -4.39852e-04 124 2.650000e+00 1.000000e-01 -4.42934e-04 125 2.700000e+00 1.000000e-01 -4.45898e-04 126 2.750000e+00 1.000000e-01 -4.48749e-04 127 2.800000e+00 1.000000e-01 -4.51493e-04 128 2.850000e+00 1.000000e-01 -4.54134e-04 129 2.900000e+00 1.000000e-01 -4.56676e-04 130 2.950000e+00 1.000000e-01 -4.59123e-04 131 3.000000e+00 1.000000e-01 -4.61480e-04 132 3.050000e+00 1.000000e-01 -4.63749e-04 133 3.100000e+00 1.000000e-01 -4.65934e-04 134 3.150000e+00 1.000000e-01 -4.68038e-04 135 3.200000e+00 1.000000e-01 -4.70065e-04 136 3.250000e+00 1.000000e-01 -4.72018e-04 137 3.300000e+00 1.000000e-01 -4.73899e-04 138 3.350000e+00 1.000000e-01 -4.75710e-04 139 3.400000e+00 1.000000e-01 -4.77456e-04 140 3.450000e+00 1.000000e-01 -4.79137e-04 141 3.500000e+00 1.000000e-01 -4.80757e-04 142 0.000000e+00 1.000000e-01 -1.81344e-11 143 5.000000e-02 1.000000e-01 -7.23314e-11 144 1.000000e-01 1.000000e-01 -2.98430e-10 145 1.500000e-01 1.000000e-01 -1.23697e-09 146 2.000000e-01 1.000000e-01 -5.09452e-09 147 2.500000e-01 1.000000e-01 -2.06524e-08 148 3.000000e-01 1.000000e-01 -8.13095e-08 149 3.500000e-01 1.000000e-01 -3.05530e-07 150 4.000000e-01 1.000000e-01 -1.07888e-06 151 4.500000e-01 1.000000e-01 -3.52134e-06 152 5.000000e-01 1.000000e-01 -1.00827e-05 153 5.500000e-01 1.000000e-01 -2.33477e-05 154 6.000000e-01 1.000000e-01 -4.25674e-05 155 6.500000e-01 1.000000e-01 -6.42852e-05 156 7.000000e-01 1.000000e-01 -8.59567e-05 157 7.500000e-01 1.000000e-01 -1.06573e-04 158 8.000000e-01 1.000000e-01 -1.25910e-04 159 8.500000e-01 1.000000e-01 -1.44013e-04 160 9.000000e-01 1.000000e-01 -1.60995e-04 161 9.500000e-01 1.000000e-01 -1.76966e-04 162 1.000000e+00 1.000000e-01 -1.92018e-04 163 1.050000e+00 1.000000e-01 -2.06231e-04 164 1.100000e+00 1.000000e-01 -2.19671e-04 165 1.150000e+00 1.000000e-01 -2.32396e-04 166 1.200000e+00 1.000000e-01 -2.44456e-04 167 1.250000e+00 1.000000e-01 -2.55897e-04 168 1.300000e+00 1.000000e-01 -2.66761e-04 169 1.350000e+00 1.000000e-01 -2.77087e-04 170 1.400000e+00 1.000000e-01 -2.86907e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e-01 -2.96256e-04 172 1.500000e+00 1.000000e-01 -3.05161e-04 173 1.550000e+00 1.000000e-01 -3.13650e-04 174 1.600000e+00 1.000000e-01 -3.21749e-04 175 1.650000e+00 1.000000e-01 -3.29479e-04 176 1.700000e+00 1.000000e-01 -3.36863e-04 177 1.750000e+00 1.000000e-01 -3.43920e-04 178 1.800000e+00 1.000000e-01 -3.50669e-04 179 1.850000e+00 1.000000e-01 -3.57127e-04 180 1.900000e+00 1.000000e-01 -3.63309e-04 181 1.950000e+00 1.000000e-01 -3.69230e-04 182 2.000000e+00 1.000000e-01 -3.74904e-04 183 2.050000e+00 1.000000e-01 -3.80344e-04 184 2.100000e+00 1.000000e-01 -3.85561e-04 185 2.150000e+00 1.000000e-01 -3.90568e-04 186 2.200000e+00 1.000000e-01 -3.95373e-04 187 2.250000e+00 1.000000e-01 -3.99988e-04 188 2.300000e+00 1.000000e-01 -4.04421e-04 189 2.350000e+00 1.000000e-01 -4.08681e-04 190 2.400000e+00 1.000000e-01 -4.12776e-04 191 2.450000e+00 1.000000e-01 -4.16714e-04 192 2.500000e+00 1.000000e-01 -4.20501e-04 193 2.550000e+00 1.000000e-01 -4.24144e-04 194 2.600000e+00 1.000000e-01 -4.27651e-04 195 2.650000e+00 1.000000e-01 -4.31026e-04 196 2.700000e+00 1.000000e-01 -4.34276e-04 197 2.750000e+00 1.000000e-01 -4.37405e-04 198 2.800000e+00 1.000000e-01 -4.40420e-04 199 2.850000e+00 1.000000e-01 -4.43324e-04 200 2.900000e+00 1.000000e-01 -4.46122e-04 201 2.950000e+00 1.000000e-01 -4.48818e-04 202 3.000000e+00 1.000000e-01 -4.51418e-04 203 3.050000e+00 1.000000e-01 -4.53923e-04 204 3.100000e+00 1.000000e-01 -4.56339e-04 205 3.150000e+00 1.000000e-01 -4.58668e-04 206 3.200000e+00 1.000000e-01 -4.60914e-04 207 3.250000e+00 1.000000e-01 -4.63080e-04 208 3.300000e+00 1.000000e-01 -4.65169e-04 209 3.350000e+00 1.000000e-01 -4.67183e-04 210 3.400000e+00 1.000000e-01 -4.69127e-04 211 3.450000e+00 1.000000e-01 -4.71001e-04 212 3.500000e+00 1.000000e-01 -4.72810e-04 213 0.000000e+00 1.000000e-01 -3.44406e-12 214 5.000000e-02 1.000000e-01 -9.59861e-12 215 1.000000e-01 1.000000e-01 -3.63782e-11 216 1.500000e-01 1.000000e-01 -1.52679e-10 217 2.000000e-01 1.000000e-01 -6.55777e-10 218 2.500000e-01 1.000000e-01 -2.81470e-09 219 3.000000e-01 1.000000e-01 -1.19330e-08 220 3.500000e-01 1.000000e-01 -4.93103e-08 221 4.000000e-01 1.000000e-01 -1.94992e-07 222 4.500000e-01 1.000000e-01 -7.23860e-07 223 5.000000e-01 1.000000e-01 -2.48204e-06 224 5.500000e-01 1.000000e-01 -7.54059e-06 225 6.000000e-01 1.000000e-01 -1.86777e-05 226 6.500000e-01 1.000000e-01 -3.60416e-05 227 7.000000e-01 1.000000e-01 -5.65208e-05 228 7.500000e-01 1.000000e-01 -7.73775e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 1.000000e-01 -9.74190e-05 230 8.500000e-01 1.000000e-01 -1.16326e-04 231 9.000000e-01 1.000000e-01 -1.34100e-04 232 9.500000e-01 1.000000e-01 -1.50828e-04 233 1.000000e+00 1.000000e-01 -1.66606e-04 234 1.050000e+00 1.000000e-01 -1.81517e-04 235 1.100000e+00 1.000000e-01 -1.95630e-04 236 1.150000e+00 1.000000e-01 -2.09005e-04 237 1.200000e+00 1.000000e-01 -2.21696e-04 238 1.250000e+00 1.000000e-01 -2.33748e-04 239 1.300000e+00 1.000000e-01 -2.45204e-04 240 1.350000e+00 1.000000e-01 -2.56101e-04 241 1.400000e+00 1.000000e-01 -2.66476e-04 242 1.450000e+00 1.000000e-01 -2.76361e-04 243 1.500000e+00 1.000000e-01 -2.85786e-04 244 1.550000e+00 1.000000e-01 -2.94778e-04 245 1.600000e+00 1.000000e-01 -3.03363e-04 246 1.650000e+00 1.000000e-01 -3.11565e-04 247 1.700000e+00 1.000000e-01 -3.19405e-04 248 1.750000e+00 1.000000e-01 -3.26904e-04 249 1.800000e+00 1.000000e-01 -3.34081e-04 250 1.850000e+00 1.000000e-01 -3.40953e-04 251 1.900000e+00 1.000000e-01 -3.47537e-04 252 1.950000e+00 1.000000e-01 -3.53848e-04 253 2.000000e+00 1.000000e-01 -3.59900e-04 254 2.050000e+00 1.000000e-01 -3.65707e-04 255 2.100000e+00 1.000000e-01 -3.71280e-04 256 2.150000e+00 1.000000e-01 -3.76632e-04 257 2.200000e+00 1.000000e-01 -3.81773e-04 258 2.250000e+00 1.000000e-01 -3.86713e-04 259 2.300000e+00 1.000000e-01 -3.91462e-04 260 2.350000e+00 1.000000e-01 -3.96029e-04 261 2.400000e+00 1.000000e-01 -4.00422e-04 262 2.450000e+00 1.000000e-01 -4.04650e-04 263 2.500000e+00 1.000000e-01 -4.08719e-04 264 2.550000e+00 1.000000e-01 -4.12637e-04 265 2.600000e+00 1.000000e-01 -4.16411e-04 266 2.650000e+00 1.000000e-01 -4.20045e-04 267 2.700000e+00 1.000000e-01 -4.23548e-04 268 2.750000e+00 1.000000e-01 -4.26923e-04 269 2.800000e+00 1.000000e-01 -4.30177e-04 270 2.850000e+00 1.000000e-01 -4.33315e-04 271 2.900000e+00 1.000000e-01 -4.36340e-04 272 2.950000e+00 1.000000e-01 -4.39258e-04 273 3.000000e+00 1.000000e-01 -4.42073e-04 274 3.050000e+00 1.000000e-01 -4.44789e-04 275 3.100000e+00 1.000000e-01 -4.47410e-04 276 3.150000e+00 1.000000e-01 -4.49939e-04 277 3.200000e+00 1.000000e-01 -4.52380e-04 278 3.250000e+00 1.000000e-01 -4.54737e-04 279 3.300000e+00 1.000000e-01 -4.57012e-04 280 3.350000e+00 1.000000e-01 -4.59208e-04 281 3.400000e+00 1.000000e-01 -4.61328e-04 282 3.450000e+00 1.000000e-01 -4.63376e-04 283 3.500000e+00 1.000000e-01 -4.65353e-04 284 0.000000e+00 1.000000e-01 -2.35172e-12 285 5.000000e-02 1.000000e-01 -2.71473e-12 286 1.000000e-01 1.000000e-01 -6.97967e-12 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 287 1.500000e-01 1.000000e-01 -2.39489e-11 288 2.000000e-01 1.000000e-01 -9.99117e-11 289 2.500000e-01 1.000000e-01 -4.38798e-10 290 3.000000e-01 1.000000e-01 -1.93994e-09 291 3.500000e-01 1.000000e-01 -8.49431e-09 292 4.000000e-01 1.000000e-01 -3.63261e-08 293 4.500000e-01 1.000000e-01 -1.48866e-07 294 5.000000e-01 1.000000e-01 -5.72145e-07 295 5.500000e-01 1.000000e-01 -2.02596e-06 296 6.000000e-01 1.000000e-01 -6.36863e-06 297 6.500000e-01 1.000000e-01 -1.63632e-05 298 7.000000e-01 1.000000e-01 -3.25418e-05 299 7.500000e-01 1.000000e-01 -5.20495e-05 300 8.000000e-01 1.000000e-01 -7.21415e-05 301 8.500000e-01 1.000000e-01 -9.15710e-05 302 9.000000e-01 1.000000e-01 -1.09980e-04 303 9.500000e-01 1.000000e-01 -1.27345e-04 304 1.000000e+00 1.000000e-01 -1.43737e-04 305 1.050000e+00 1.000000e-01 -1.59237e-04 306 1.100000e+00 1.000000e-01 -1.73920e-04 307 1.150000e+00 1.000000e-01 -1.87848e-04 308 1.200000e+00 1.000000e-01 -2.01076e-04 309 1.250000e+00 1.000000e-01 -2.13650e-04 310 1.300000e+00 1.000000e-01 -2.25613e-04 311 1.350000e+00 1.000000e-01 -2.37004e-04 312 1.400000e+00 1.000000e-01 -2.47858e-04 313 1.450000e+00 1.000000e-01 -2.58208e-04 314 1.500000e+00 1.000000e-01 -2.68085e-04 315 1.550000e+00 1.000000e-01 -2.77515e-04 316 1.600000e+00 1.000000e-01 -2.86526e-04 317 1.650000e+00 1.000000e-01 -2.95140e-04 318 1.700000e+00 1.000000e-01 -3.03381e-04 319 1.750000e+00 1.000000e-01 -3.11269e-04 320 1.800000e+00 1.000000e-01 -3.18823e-04 321 1.850000e+00 1.000000e-01 -3.26062e-04 322 1.900000e+00 1.000000e-01 -3.33002e-04 323 1.950000e+00 1.000000e-01 -3.39658e-04 324 2.000000e+00 1.000000e-01 -3.46046e-04 325 2.050000e+00 1.000000e-01 -3.52178e-04 326 2.100000e+00 1.000000e-01 -3.58068e-04 327 2.150000e+00 1.000000e-01 -3.63727e-04 328 2.200000e+00 1.000000e-01 -3.69167e-04 329 2.250000e+00 1.000000e-01 -3.74398e-04 330 2.300000e+00 1.000000e-01 -3.79430e-04 331 2.350000e+00 1.000000e-01 -3.84272e-04 332 2.400000e+00 1.000000e-01 -3.88933e-04 333 2.450000e+00 1.000000e-01 -3.93421e-04 334 2.500000e+00 1.000000e-01 -3.97744e-04 335 2.550000e+00 1.000000e-01 -4.01909e-04 336 2.600000e+00 1.000000e-01 -4.05922e-04 337 2.650000e+00 1.000000e-01 -4.09791e-04 338 2.700000e+00 1.000000e-01 -4.13522e-04 339 2.750000e+00 1.000000e-01 -4.17119e-04 340 2.800000e+00 1.000000e-01 -4.20590e-04 341 2.850000e+00 1.000000e-01 -4.23938e-04 342 2.900000e+00 1.000000e-01 -4.27169e-04 343 2.950000e+00 1.000000e-01 -4.30288e-04 344 3.000000e+00 1.000000e-01 -4.33299e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 345 3.050000e+00 1.000000e-01 -4.36205e-04 346 3.100000e+00 1.000000e-01 -4.39012e-04 347 3.150000e+00 1.000000e-01 -4.41723e-04 348 3.200000e+00 1.000000e-01 -4.44342e-04 349 3.250000e+00 1.000000e-01 -4.46872e-04 350 3.300000e+00 1.000000e-01 -4.49315e-04 351 3.350000e+00 1.000000e-01 -4.51677e-04 352 3.400000e+00 1.000000e-01 -4.53959e-04 353 3.450000e+00 1.000000e-01 -4.56164e-04 354 3.500000e+00 1.000000e-01 -4.58295e-04 355 0.000000e+00 1.000000e-01 -2.64734e-12 356 5.000000e-02 1.000000e-01 -2.70431e-12 357 1.000000e-01 1.000000e-01 -3.39922e-12 358 1.500000e-01 1.000000e-01 -6.23699e-12 359 2.000000e-01 1.000000e-01 -1.92681e-11 360 2.500000e-01 1.000000e-01 -7.90169e-11 361 3.000000e-01 1.000000e-01 -3.52090e-10 362 3.500000e-01 1.000000e-01 -1.59172e-09 363 4.000000e-01 1.000000e-01 -7.14121e-09 364 4.500000e-01 1.000000e-01 -3.13130e-08 365 5.000000e-01 1.000000e-01 -1.31545e-07 366 5.500000e-01 1.000000e-01 -5.17302e-07 367 6.000000e-01 1.000000e-01 -1.86771e-06 368 6.500000e-01 1.000000e-01 -5.96729e-06 369 7.000000e-01 1.000000e-01 -1.55209e-05 370 7.500000e-01 1.000000e-01 -3.10753e-05 371 8.000000e-01 1.000000e-01 -4.98722e-05 372 8.500000e-01 1.000000e-01 -6.92765e-05 373 9.000000e-01 1.000000e-01 -8.80934e-05 374 9.500000e-01 1.000000e-01 -1.05974e-04 375 1.000000e+00 1.000000e-01 -1.22889e-04 376 1.050000e+00 1.000000e-01 -1.38896e-04 377 1.100000e+00 1.000000e-01 -1.54069e-04 378 1.150000e+00 1.000000e-01 -1.68473e-04 379 1.200000e+00 1.000000e-01 -1.82163e-04 380 1.250000e+00 1.000000e-01 -1.95189e-04 381 1.300000e+00 1.000000e-01 -2.07593e-04 382 1.350000e+00 1.000000e-01 -2.19413e-04 383 1.400000e+00 1.000000e-01 -2.30687e-04 384 1.450000e+00 1.000000e-01 -2.41445e-04 385 1.500000e+00 1.000000e-01 -2.51719e-04 386 1.550000e+00 1.000000e-01 -2.61537e-04 387 1.600000e+00 1.000000e-01 -2.70924e-04 388 1.650000e+00 1.000000e-01 -2.79905e-04 389 1.700000e+00 1.000000e-01 -2.88502e-04 390 1.750000e+00 1.000000e-01 -2.96737e-04 391 1.800000e+00 1.000000e-01 -3.04628e-04 392 1.850000e+00 1.000000e-01 -3.12195e-04 393 1.900000e+00 1.000000e-01 -3.19454e-04 394 1.950000e+00 1.000000e-01 -3.26420e-04 395 2.000000e+00 1.000000e-01 -3.33109e-04 396 2.050000e+00 1.000000e-01 -3.39535e-04 397 2.100000e+00 1.000000e-01 -3.45711e-04 398 2.150000e+00 1.000000e-01 -3.51648e-04 399 2.200000e+00 1.000000e-01 -3.57358e-04 400 2.250000e+00 1.000000e-01 -3.62853e-04 401 2.300000e+00 1.000000e-01 -3.68141e-04 402 2.350000e+00 1.000000e-01 -3.73233e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 403 2.400000e+00 1.000000e-01 -3.78137e-04 404 2.450000e+00 1.000000e-01 -3.82862e-04 405 2.500000e+00 1.000000e-01 -3.87415e-04 406 2.550000e+00 1.000000e-01 -3.91805e-04 407 2.600000e+00 1.000000e-01 -3.96038e-04 408 2.650000e+00 1.000000e-01 -4.00120e-04 409 2.700000e+00 1.000000e-01 -4.04059e-04 410 2.750000e+00 1.000000e-01 -4.07860e-04 411 2.800000e+00 1.000000e-01 -4.11529e-04 412 2.850000e+00 1.000000e-01 -4.15070e-04 413 2.900000e+00 1.000000e-01 -4.18490e-04 414 2.950000e+00 1.000000e-01 -4.21793e-04 415 3.000000e+00 1.000000e-01 -4.24983e-04 416 3.050000e+00 1.000000e-01 -4.28065e-04 417 3.100000e+00 1.000000e-01 -4.31044e-04 418 3.150000e+00 1.000000e-01 -4.33922e-04 419 3.200000e+00 1.000000e-01 -4.36704e-04 420 3.250000e+00 1.000000e-01 -4.39393e-04 421 3.300000e+00 1.000000e-01 -4.41993e-04 422 3.350000e+00 1.000000e-01 -4.44507e-04 423 3.400000e+00 1.000000e-01 -4.46937e-04 424 3.450000e+00 1.000000e-01 -4.49288e-04 425 3.500000e+00 1.000000e-01 -4.51561e-04 426 0.000000e+00 1.000000e-01 -3.11656e-12 427 5.000000e-02 1.000000e-01 -3.12670e-12 428 1.000000e-01 1.000000e-01 -3.25422e-12 429 1.500000e-01 1.000000e-01 -3.78607e-12 430 2.000000e-01 1.000000e-01 -6.27835e-12 431 2.500000e-01 1.000000e-01 -1.79492e-11 432 3.000000e-01 1.000000e-01 -7.25192e-11 433 3.500000e-01 1.000000e-01 -3.26855e-10 434 4.000000e-01 1.000000e-01 -1.50415e-09 435 4.500000e-01 1.000000e-01 -6.87667e-09 436 5.000000e-01 1.000000e-01 -3.07096e-08 437 5.500000e-01 1.000000e-01 -1.31158e-07 438 6.000000e-01 1.000000e-01 -5.22724e-07 439 6.500000e-01 1.000000e-01 -1.90422e-06 440 7.000000e-01 1.000000e-01 -6.09394e-06 441 7.500000e-01 1.000000e-01 -1.57206e-05 442 8.000000e-01 1.000000e-01 -3.10677e-05 443 8.500000e-01 1.000000e-01 -4.93545e-05 444 9.000000e-01 1.000000e-01 -6.81415e-05 445 9.500000e-01 1.000000e-01 -8.63598e-05 446 1.000000e+00 1.000000e-01 -1.03703e-04 447 1.050000e+00 1.000000e-01 -1.20148e-04 448 1.100000e+00 1.000000e-01 -1.35747e-04 449 1.150000e+00 1.000000e-01 -1.50564e-04 450 1.200000e+00 1.000000e-01 -1.64657e-04 451 1.250000e+00 1.000000e-01 -1.78077e-04 452 1.300000e+00 1.000000e-01 -1.90866e-04 453 1.350000e+00 1.000000e-01 -2.03065e-04 454 1.400000e+00 1.000000e-01 -2.14708e-04 455 1.450000e+00 1.000000e-01 -2.25828e-04 456 1.500000e+00 1.000000e-01 -2.36456e-04 457 1.550000e+00 1.000000e-01 -2.46618e-04 458 1.600000e+00 1.000000e-01 -2.56342e-04 459 1.650000e+00 1.000000e-01 -2.65651e-04 460 1.700000e+00 1.000000e-01 -2.74568e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 461 1.750000e+00 1.000000e-01 -2.83114e-04 462 1.800000e+00 1.000000e-01 -2.91310e-04 463 1.850000e+00 1.000000e-01 -2.99173e-04 464 1.900000e+00 1.000000e-01 -3.06720e-04 465 1.950000e+00 1.000000e-01 -3.13967e-04 466 2.000000e+00 1.000000e-01 -3.20930e-04 467 2.050000e+00 1.000000e-01 -3.27623e-04 468 2.100000e+00 1.000000e-01 -3.34059e-04 469 2.150000e+00 1.000000e-01 -3.40249e-04 470 2.200000e+00 1.000000e-01 -3.46207e-04 471 2.250000e+00 1.000000e-01 -3.51942e-04 472 2.300000e+00 1.000000e-01 -3.57465e-04 473 2.350000e+00 1.000000e-01 -3.62785e-04 474 2.400000e+00 1.000000e-01 -3.67912e-04 475 2.450000e+00 1.000000e-01 -3.72855e-04 476 2.500000e+00 1.000000e-01 -3.77620e-04 477 2.550000e+00 1.000000e-01 -3.82217e-04 478 2.600000e+00 1.000000e-01 -3.86651e-04 479 2.650000e+00 1.000000e-01 -3.90931e-04 480 2.700000e+00 1.000000e-01 -3.95062e-04 481 2.750000e+00 1.000000e-01 -3.99050e-04 482 2.800000e+00 1.000000e-01 -4.02902e-04 483 2.850000e+00 1.000000e-01 -4.06622e-04 484 2.900000e+00 1.000000e-01 -4.10217e-04 485 2.950000e+00 1.000000e-01 -4.13690e-04 486 3.000000e+00 1.000000e-01 -4.17047e-04 487 3.050000e+00 1.000000e-01 -4.20292e-04 488 3.100000e+00 1.000000e-01 -4.23429e-04 489 3.150000e+00 1.000000e-01 -4.26463e-04 490 3.200000e+00 1.000000e-01 -4.29397e-04 491 3.250000e+00 1.000000e-01 -4.32234e-04 492 3.300000e+00 1.000000e-01 -4.34979e-04 493 3.350000e+00 1.000000e-01 -4.37635e-04 494 3.400000e+00 1.000000e-01 -4.40204e-04 495 3.450000e+00 1.000000e-01 -4.42690e-04 496 3.500000e+00 1.000000e-01 -4.45096e-04 Total run time: 1.120 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test7.cir0000644000265600020320000000050412264261473017412 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 n1 L=0.35u W=10.0u vgs 1 0 3.5 vbs 3 0 0 vds 2 0 0.1 .dc vgs 0 3.5 0.05 vbs 0.0 -3. -0.5 .options Temp=100.0 noacct .print dc v(2) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test8.out0000644000265600020320000006432312264261473017456 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Date: Tue Apr 20 23:14:28 1999 *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** DCtransferCurve Tue Apr 20 23:14:28 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 -5.00000e-02 0.000000e+00 1.459692e-12 2 -1.00000e-01 0.000000e+00 1.019932e-12 3 -1.50000e-01 0.000000e+00 1.177357e-12 4 -2.00000e-01 0.000000e+00 1.335553e-12 5 -2.50000e-01 0.000000e+00 1.501507e-12 6 -3.00000e-01 0.000000e+00 1.677499e-12 7 -3.50000e-01 0.000000e+00 1.865014e-12 8 -4.00000e-01 0.000000e+00 2.065386e-12 9 -4.50000e-01 0.000000e+00 2.279965e-12 10 -5.00000e-01 0.000000e+00 2.510172e-12 11 -5.50000e-01 0.000000e+00 2.757536e-12 12 -6.00000e-01 0.000000e+00 3.023715e-12 13 -6.50000e-01 0.000000e+00 3.310507e-12 14 -7.00000e-01 0.000000e+00 3.619874e-12 15 -7.50000e-01 0.000000e+00 3.953955e-12 16 -8.00000e-01 0.000000e+00 4.315083e-12 17 -8.50000e-01 0.000000e+00 4.705807e-12 18 -9.00000e-01 0.000000e+00 5.128908e-12 19 -9.50000e-01 0.000000e+00 5.587422e-12 20 -1.00000e+00 0.000000e+00 6.084667e-12 21 -1.05000e+00 0.000000e+00 6.624263e-12 22 -1.10000e+00 0.000000e+00 7.210163e-12 23 -1.15000e+00 0.000000e+00 7.846684e-12 24 -1.20000e+00 0.000000e+00 8.538537e-12 25 -1.25000e+00 0.000000e+00 9.290866e-12 26 -1.30000e+00 0.000000e+00 1.010929e-11 27 -1.35000e+00 0.000000e+00 1.099992e-11 28 -1.40000e+00 0.000000e+00 1.196946e-11 29 -1.45000e+00 0.000000e+00 1.302521e-11 30 -1.50000e+00 0.000000e+00 1.417511e-11 31 -1.55000e+00 0.000000e+00 1.542787e-11 32 -1.60000e+00 0.000000e+00 1.679295e-11 33 -1.65000e+00 0.000000e+00 1.828070e-11 34 -1.70000e+00 0.000000e+00 1.990238e-11 35 -1.75000e+00 0.000000e+00 2.167030e-11 36 -1.80000e+00 0.000000e+00 2.359786e-11 37 -1.85000e+00 0.000000e+00 2.569968e-11 38 -1.90000e+00 0.000000e+00 2.799171e-11 39 -1.95000e+00 0.000000e+00 3.049132e-11 40 -2.00000e+00 0.000000e+00 3.321745e-11 41 -2.05000e+00 0.000000e+00 3.619076e-11 42 -2.10000e+00 0.000000e+00 3.943374e-11 43 -2.15000e+00 0.000000e+00 4.297093e-11 44 -2.20000e+00 0.000000e+00 4.682904e-11 45 -2.25000e+00 0.000000e+00 5.103719e-11 46 -2.30000e+00 0.000000e+00 5.562710e-11 47 -2.35000e+00 0.000000e+00 6.063332e-11 48 -2.40000e+00 0.000000e+00 6.609349e-11 49 -2.45000e+00 0.000000e+00 7.204861e-11 50 -2.50000e+00 0.000000e+00 7.854330e-11 51 -2.55000e+00 0.000000e+00 8.562619e-11 52 -2.60000e+00 0.000000e+00 9.335018e-11 53 -2.65000e+00 0.000000e+00 1.017729e-10 54 -2.70000e+00 0.000000e+00 1.109571e-10 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 0.000000e+00 1.209710e-10 56 -2.80000e+00 0.000000e+00 1.318890e-10 57 -2.85000e+00 0.000000e+00 1.437918e-10 58 -2.90000e+00 0.000000e+00 1.567676e-10 59 -2.95000e+00 0.000000e+00 1.709119e-10 60 -3.00000e+00 0.000000e+00 1.863290e-10 61 -3.05000e+00 0.000000e+00 2.031322e-10 62 -3.10000e+00 0.000000e+00 2.214446e-10 63 -3.15000e+00 0.000000e+00 2.414004e-10 64 -3.20000e+00 0.000000e+00 2.631452e-10 65 -3.25000e+00 0.000000e+00 2.868374e-10 66 -3.30000e+00 0.000000e+00 3.126494e-10 67 -3.35000e+00 0.000000e+00 3.407685e-10 68 -3.40000e+00 0.000000e+00 3.713982e-10 69 -3.45000e+00 0.000000e+00 4.047597e-10 70 -3.50000e+00 0.000000e+00 4.410934e-10 71 0.000000e+00 -5.00000e-01 0.000000e+00 72 -5.00000e-02 -5.00000e-01 1.555742e-07 73 -1.00000e-01 -5.00000e-01 1.894482e-07 74 -1.50000e-01 -5.00000e-01 2.096176e-07 75 -2.00000e-01 -5.00000e-01 2.292847e-07 76 -2.50000e-01 -5.00000e-01 2.499570e-07 77 -3.00000e-01 -5.00000e-01 2.720491e-07 78 -3.50000e-01 -5.00000e-01 2.957846e-07 79 -4.00000e-01 -5.00000e-01 3.213398e-07 80 -4.50000e-01 -5.00000e-01 3.488795e-07 81 -5.00000e-01 -5.00000e-01 3.785692e-07 82 -5.50000e-01 -5.00000e-01 4.105797e-07 83 -6.00000e-01 -5.00000e-01 4.450902e-07 84 -6.50000e-01 -5.00000e-01 4.822897e-07 85 -7.00000e-01 -5.00000e-01 5.223784e-07 86 -7.50000e-01 -5.00000e-01 5.655683e-07 87 -8.00000e-01 -5.00000e-01 6.120843e-07 88 -8.50000e-01 -5.00000e-01 6.621649e-07 89 -9.00000e-01 -5.00000e-01 7.160626e-07 90 -9.50000e-01 -5.00000e-01 7.740452e-07 91 -1.00000e+00 -5.00000e-01 8.363954e-07 92 -1.05000e+00 -5.00000e-01 9.034124e-07 93 -1.10000e+00 -5.00000e-01 9.754117e-07 94 -1.15000e+00 -5.00000e-01 1.052726e-06 95 -1.20000e+00 -5.00000e-01 1.135705e-06 96 -1.25000e+00 -5.00000e-01 1.224716e-06 97 -1.30000e+00 -5.00000e-01 1.320147e-06 98 -1.35000e+00 -5.00000e-01 1.422400e-06 99 -1.40000e+00 -5.00000e-01 1.531898e-06 100 -1.45000e+00 -5.00000e-01 1.649083e-06 101 -1.50000e+00 -5.00000e-01 1.774415e-06 102 -1.55000e+00 -5.00000e-01 1.908372e-06 103 -1.60000e+00 -5.00000e-01 2.051449e-06 104 -1.65000e+00 -5.00000e-01 2.204162e-06 105 -1.70000e+00 -5.00000e-01 2.367042e-06 106 -1.75000e+00 -5.00000e-01 2.540637e-06 107 -1.80000e+00 -5.00000e-01 2.725511e-06 108 -1.85000e+00 -5.00000e-01 2.922245e-06 109 -1.90000e+00 -5.00000e-01 3.131432e-06 110 -1.95000e+00 -5.00000e-01 3.353681e-06 111 -2.00000e+00 -5.00000e-01 3.589611e-06 112 -2.05000e+00 -5.00000e-01 3.839853e-06 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -5.00000e-01 4.105048e-06 114 -2.15000e+00 -5.00000e-01 4.385846e-06 115 -2.20000e+00 -5.00000e-01 4.682901e-06 116 -2.25000e+00 -5.00000e-01 4.996875e-06 117 -2.30000e+00 -5.00000e-01 5.328432e-06 118 -2.35000e+00 -5.00000e-01 5.678240e-06 119 -2.40000e+00 -5.00000e-01 6.046964e-06 120 -2.45000e+00 -5.00000e-01 6.435270e-06 121 -2.50000e+00 -5.00000e-01 6.843820e-06 122 -2.55000e+00 -5.00000e-01 7.273271e-06 123 -2.60000e+00 -5.00000e-01 7.724272e-06 124 -2.65000e+00 -5.00000e-01 8.197465e-06 125 -2.70000e+00 -5.00000e-01 8.693482e-06 126 -2.75000e+00 -5.00000e-01 9.212942e-06 127 -2.80000e+00 -5.00000e-01 9.756452e-06 128 -2.85000e+00 -5.00000e-01 1.032460e-05 129 -2.90000e+00 -5.00000e-01 1.091797e-05 130 -2.95000e+00 -5.00000e-01 1.153711e-05 131 -3.00000e+00 -5.00000e-01 1.218256e-05 132 -3.05000e+00 -5.00000e-01 1.285484e-05 133 -3.10000e+00 -5.00000e-01 1.355445e-05 134 -3.15000e+00 -5.00000e-01 1.428187e-05 135 -3.20000e+00 -5.00000e-01 1.503754e-05 136 -3.25000e+00 -5.00000e-01 1.582191e-05 137 -3.30000e+00 -5.00000e-01 1.663537e-05 138 -3.35000e+00 -5.00000e-01 1.747832e-05 139 -3.40000e+00 -5.00000e-01 1.835110e-05 140 -3.45000e+00 -5.00000e-01 1.925405e-05 141 -3.50000e+00 -5.00000e-01 2.018749e-05 142 0.000000e+00 -1.00000e+00 0.000000e+00 143 -5.00000e-02 -1.00000e+00 3.126645e-05 144 -1.00000e-01 -1.00000e+00 5.821243e-05 145 -1.50000e-01 -1.00000e+00 8.095648e-05 146 -2.00000e-01 -1.00000e+00 9.962868e-05 147 -2.50000e-01 -1.00000e+00 1.143948e-04 148 -3.00000e-01 -1.00000e+00 1.255224e-04 149 -3.50000e-01 -1.00000e+00 1.335271e-04 150 -4.00000e-01 -1.00000e+00 1.392970e-04 151 -4.50000e-01 -1.00000e+00 1.438264e-04 152 -5.00000e-01 -1.00000e+00 1.477740e-04 153 -5.50000e-01 -1.00000e+00 1.514429e-04 154 -6.00000e-01 -1.00000e+00 1.549598e-04 155 -6.50000e-01 -1.00000e+00 1.583826e-04 156 -7.00000e-01 -1.00000e+00 1.617418e-04 157 -7.50000e-01 -1.00000e+00 1.650558e-04 158 -8.00000e-01 -1.00000e+00 1.683370e-04 159 -8.50000e-01 -1.00000e+00 1.715943e-04 160 -9.00000e-01 -1.00000e+00 1.748345e-04 161 -9.50000e-01 -1.00000e+00 1.780629e-04 162 -1.00000e+00 -1.00000e+00 1.812838e-04 163 -1.05000e+00 -1.00000e+00 1.845008e-04 164 -1.10000e+00 -1.00000e+00 1.877167e-04 165 -1.15000e+00 -1.00000e+00 1.909342e-04 166 -1.20000e+00 -1.00000e+00 1.941554e-04 167 -1.25000e+00 -1.00000e+00 1.973821e-04 168 -1.30000e+00 -1.00000e+00 2.006159e-04 169 -1.35000e+00 -1.00000e+00 2.038583e-04 170 -1.40000e+00 -1.00000e+00 2.071105e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e+00 2.103738e-04 172 -1.50000e+00 -1.00000e+00 2.136491e-04 173 -1.55000e+00 -1.00000e+00 2.169375e-04 174 -1.60000e+00 -1.00000e+00 2.202399e-04 175 -1.65000e+00 -1.00000e+00 2.235570e-04 176 -1.70000e+00 -1.00000e+00 2.268897e-04 177 -1.75000e+00 -1.00000e+00 2.302387e-04 178 -1.80000e+00 -1.00000e+00 2.336043e-04 179 -1.85000e+00 -1.00000e+00 2.369872e-04 180 -1.90000e+00 -1.00000e+00 2.403875e-04 181 -1.95000e+00 -1.00000e+00 2.438055e-04 182 -2.00000e+00 -1.00000e+00 2.472415e-04 183 -2.05000e+00 -1.00000e+00 2.506955e-04 184 -2.10000e+00 -1.00000e+00 2.541677e-04 185 -2.15000e+00 -1.00000e+00 2.576582e-04 186 -2.20000e+00 -1.00000e+00 2.611671e-04 187 -2.25000e+00 -1.00000e+00 2.646945e-04 188 -2.30000e+00 -1.00000e+00 2.682406e-04 189 -2.35000e+00 -1.00000e+00 2.718055e-04 190 -2.40000e+00 -1.00000e+00 2.753893e-04 191 -2.45000e+00 -1.00000e+00 2.789920e-04 192 -2.50000e+00 -1.00000e+00 2.826138e-04 193 -2.55000e+00 -1.00000e+00 2.862547e-04 194 -2.60000e+00 -1.00000e+00 2.899149e-04 195 -2.65000e+00 -1.00000e+00 2.935944e-04 196 -2.70000e+00 -1.00000e+00 2.972934e-04 197 -2.75000e+00 -1.00000e+00 3.010118e-04 198 -2.80000e+00 -1.00000e+00 3.047497e-04 199 -2.85000e+00 -1.00000e+00 3.085073e-04 200 -2.90000e+00 -1.00000e+00 3.122846e-04 201 -2.95000e+00 -1.00000e+00 3.160815e-04 202 -3.00000e+00 -1.00000e+00 3.198983e-04 203 -3.05000e+00 -1.00000e+00 3.237349e-04 204 -3.10000e+00 -1.00000e+00 3.275913e-04 205 -3.15000e+00 -1.00000e+00 3.314677e-04 206 -3.20000e+00 -1.00000e+00 3.353640e-04 207 -3.25000e+00 -1.00000e+00 3.392803e-04 208 -3.30000e+00 -1.00000e+00 3.432166e-04 209 -3.35000e+00 -1.00000e+00 3.471729e-04 210 -3.40000e+00 -1.00000e+00 3.511494e-04 211 -3.45000e+00 -1.00000e+00 3.551459e-04 212 -3.50000e+00 -1.00000e+00 3.591625e-04 213 0.000000e+00 -1.50000e+00 0.000000e+00 214 -5.00000e-02 -1.50000e+00 6.819391e-05 215 -1.00000e-01 -1.50000e+00 1.315923e-04 216 -1.50000e-01 -1.50000e+00 1.903101e-04 217 -2.00000e-01 -1.50000e+00 2.444592e-04 218 -2.50000e-01 -1.50000e+00 2.941485e-04 219 -3.00000e-01 -1.50000e+00 3.394845e-04 220 -3.50000e-01 -1.50000e+00 3.805723e-04 221 -4.00000e-01 -1.50000e+00 4.175167e-04 222 -4.50000e-01 -1.50000e+00 4.504251e-04 223 -5.00000e-01 -1.50000e+00 4.794122e-04 224 -5.50000e-01 -1.50000e+00 5.046103e-04 225 -6.00000e-01 -1.50000e+00 5.261906e-04 226 -6.50000e-01 -1.50000e+00 5.444033e-04 227 -7.00000e-01 -1.50000e+00 5.596390e-04 228 -7.50000e-01 -1.50000e+00 5.724654e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.50000e+00 5.835457e-04 230 -8.50000e-01 -1.50000e+00 5.934607e-04 231 -9.00000e-01 -1.50000e+00 6.026055e-04 232 -9.50000e-01 -1.50000e+00 6.112154e-04 233 -1.00000e+00 -1.50000e+00 6.194288e-04 234 -1.05000e+00 -1.50000e+00 6.273318e-04 235 -1.10000e+00 -1.50000e+00 6.349824e-04 236 -1.15000e+00 -1.50000e+00 6.424226e-04 237 -1.20000e+00 -1.50000e+00 6.496844e-04 238 -1.25000e+00 -1.50000e+00 6.567933e-04 239 -1.30000e+00 -1.50000e+00 6.637699e-04 240 -1.35000e+00 -1.50000e+00 6.706313e-04 241 -1.40000e+00 -1.50000e+00 6.773920e-04 242 -1.45000e+00 -1.50000e+00 6.840644e-04 243 -1.50000e+00 -1.50000e+00 6.906591e-04 244 -1.55000e+00 -1.50000e+00 6.971853e-04 245 -1.60000e+00 -1.50000e+00 7.036510e-04 246 -1.65000e+00 -1.50000e+00 7.100632e-04 247 -1.70000e+00 -1.50000e+00 7.164281e-04 248 -1.75000e+00 -1.50000e+00 7.227513e-04 249 -1.80000e+00 -1.50000e+00 7.290376e-04 250 -1.85000e+00 -1.50000e+00 7.352913e-04 251 -1.90000e+00 -1.50000e+00 7.415163e-04 252 -1.95000e+00 -1.50000e+00 7.477162e-04 253 -2.00000e+00 -1.50000e+00 7.538941e-04 254 -2.05000e+00 -1.50000e+00 7.600529e-04 255 -2.10000e+00 -1.50000e+00 7.661950e-04 256 -2.15000e+00 -1.50000e+00 7.723229e-04 257 -2.20000e+00 -1.50000e+00 7.784386e-04 258 -2.25000e+00 -1.50000e+00 7.845441e-04 259 -2.30000e+00 -1.50000e+00 7.906413e-04 260 -2.35000e+00 -1.50000e+00 7.967316e-04 261 -2.40000e+00 -1.50000e+00 8.028166e-04 262 -2.45000e+00 -1.50000e+00 8.088976e-04 263 -2.50000e+00 -1.50000e+00 8.149760e-04 264 -2.55000e+00 -1.50000e+00 8.210528e-04 265 -2.60000e+00 -1.50000e+00 8.271291e-04 266 -2.65000e+00 -1.50000e+00 8.332059e-04 267 -2.70000e+00 -1.50000e+00 8.392842e-04 268 -2.75000e+00 -1.50000e+00 8.453648e-04 269 -2.80000e+00 -1.50000e+00 8.514484e-04 270 -2.85000e+00 -1.50000e+00 8.575358e-04 271 -2.90000e+00 -1.50000e+00 8.636277e-04 272 -2.95000e+00 -1.50000e+00 8.697247e-04 273 -3.00000e+00 -1.50000e+00 8.758274e-04 274 -3.05000e+00 -1.50000e+00 8.819364e-04 275 -3.10000e+00 -1.50000e+00 8.880521e-04 276 -3.15000e+00 -1.50000e+00 8.941751e-04 277 -3.20000e+00 -1.50000e+00 9.003059e-04 278 -3.25000e+00 -1.50000e+00 9.064447e-04 279 -3.30000e+00 -1.50000e+00 9.125921e-04 280 -3.35000e+00 -1.50000e+00 9.187484e-04 281 -3.40000e+00 -1.50000e+00 9.249140e-04 282 -3.45000e+00 -1.50000e+00 9.310892e-04 283 -3.50000e+00 -1.50000e+00 9.372742e-04 284 0.000000e+00 -2.00000e+00 0.000000e+00 285 -5.00000e-02 -2.00000e+00 9.878105e-05 286 -1.00000e-01 -2.00000e+00 1.926554e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -2.00000e+00 2.817307e-04 288 -2.00000e-01 -2.00000e+00 3.661118e-04 289 -2.50000e-01 -2.00000e+00 4.459006e-04 290 -3.00000e-01 -2.00000e+00 5.211961e-04 291 -3.50000e-01 -2.00000e+00 5.920947e-04 292 -4.00000e-01 -2.00000e+00 6.586903e-04 293 -4.50000e-01 -2.00000e+00 7.210746e-04 294 -5.00000e-01 -2.00000e+00 7.793372e-04 295 -5.50000e-01 -2.00000e+00 8.335660e-04 296 -6.00000e-01 -2.00000e+00 8.838476e-04 297 -6.50000e-01 -2.00000e+00 9.302685e-04 298 -7.00000e-01 -2.00000e+00 9.729158e-04 299 -7.50000e-01 -2.00000e+00 1.011879e-03 300 -8.00000e-01 -2.00000e+00 1.047257e-03 301 -8.50000e-01 -2.00000e+00 1.079158e-03 302 -9.00000e-01 -2.00000e+00 1.107722e-03 303 -9.50000e-01 -2.00000e+00 1.133135e-03 304 -1.00000e+00 -2.00000e+00 1.155660e-03 305 -1.05000e+00 -2.00000e+00 1.175664e-03 306 -1.10000e+00 -2.00000e+00 1.193595e-03 307 -1.15000e+00 -2.00000e+00 1.209906e-03 308 -1.20000e+00 -2.00000e+00 1.224981e-03 309 -1.25000e+00 -2.00000e+00 1.239100e-03 310 -1.30000e+00 -2.00000e+00 1.252459e-03 311 -1.35000e+00 -2.00000e+00 1.265195e-03 312 -1.40000e+00 -2.00000e+00 1.277407e-03 313 -1.45000e+00 -2.00000e+00 1.289172e-03 314 -1.50000e+00 -2.00000e+00 1.300549e-03 315 -1.55000e+00 -2.00000e+00 1.311588e-03 316 -1.60000e+00 -2.00000e+00 1.322329e-03 317 -1.65000e+00 -2.00000e+00 1.332805e-03 318 -1.70000e+00 -2.00000e+00 1.343047e-03 319 -1.75000e+00 -2.00000e+00 1.353079e-03 320 -1.80000e+00 -2.00000e+00 1.362922e-03 321 -1.85000e+00 -2.00000e+00 1.372596e-03 322 -1.90000e+00 -2.00000e+00 1.382118e-03 323 -1.95000e+00 -2.00000e+00 1.391501e-03 324 -2.00000e+00 -2.00000e+00 1.400759e-03 325 -2.05000e+00 -2.00000e+00 1.409904e-03 326 -2.10000e+00 -2.00000e+00 1.418945e-03 327 -2.15000e+00 -2.00000e+00 1.427892e-03 328 -2.20000e+00 -2.00000e+00 1.436754e-03 329 -2.25000e+00 -2.00000e+00 1.445537e-03 330 -2.30000e+00 -2.00000e+00 1.454248e-03 331 -2.35000e+00 -2.00000e+00 1.462893e-03 332 -2.40000e+00 -2.00000e+00 1.471479e-03 333 -2.45000e+00 -2.00000e+00 1.480010e-03 334 -2.50000e+00 -2.00000e+00 1.488490e-03 335 -2.55000e+00 -2.00000e+00 1.496924e-03 336 -2.60000e+00 -2.00000e+00 1.505315e-03 337 -2.65000e+00 -2.00000e+00 1.513667e-03 338 -2.70000e+00 -2.00000e+00 1.521984e-03 339 -2.75000e+00 -2.00000e+00 1.530269e-03 340 -2.80000e+00 -2.00000e+00 1.538523e-03 341 -2.85000e+00 -2.00000e+00 1.546750e-03 342 -2.90000e+00 -2.00000e+00 1.554951e-03 343 -2.95000e+00 -2.00000e+00 1.563130e-03 344 -3.00000e+00 -2.00000e+00 1.571288e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -2.00000e+00 1.579427e-03 346 -3.10000e+00 -2.00000e+00 1.587549e-03 347 -3.15000e+00 -2.00000e+00 1.595656e-03 348 -3.20000e+00 -2.00000e+00 1.603748e-03 349 -3.25000e+00 -2.00000e+00 1.611827e-03 350 -3.30000e+00 -2.00000e+00 1.619895e-03 351 -3.35000e+00 -2.00000e+00 1.627953e-03 352 -3.40000e+00 -2.00000e+00 1.636002e-03 353 -3.45000e+00 -2.00000e+00 1.644043e-03 354 -3.50000e+00 -2.00000e+00 1.652078e-03 355 0.000000e+00 -2.50000e+00 0.000000e+00 356 -5.00000e-02 -2.50000e+00 1.245419e-04 357 -1.00000e-01 -2.50000e+00 2.441873e-04 358 -1.50000e-01 -2.50000e+00 3.590353e-04 359 -2.00000e-01 -2.50000e+00 4.691825e-04 360 -2.50000e-01 -2.50000e+00 5.747229e-04 361 -3.00000e-01 -2.50000e+00 6.757483e-04 362 -3.50000e-01 -2.50000e+00 7.723478e-04 363 -4.00000e-01 -2.50000e+00 8.646084e-04 364 -4.50000e-01 -2.50000e+00 9.526149e-04 365 -5.00000e-01 -2.50000e+00 1.036450e-03 366 -5.50000e-01 -2.50000e+00 1.116194e-03 367 -6.00000e-01 -2.50000e+00 1.191926e-03 368 -6.50000e-01 -2.50000e+00 1.263724e-03 369 -7.00000e-01 -2.50000e+00 1.331661e-03 370 -7.50000e-01 -2.50000e+00 1.395813e-03 371 -8.00000e-01 -2.50000e+00 1.456252e-03 372 -8.50000e-01 -2.50000e+00 1.513050e-03 373 -9.00000e-01 -2.50000e+00 1.566279e-03 374 -9.50000e-01 -2.50000e+00 1.616010e-03 375 -1.00000e+00 -2.50000e+00 1.662317e-03 376 -1.05000e+00 -2.50000e+00 1.705278e-03 377 -1.10000e+00 -2.50000e+00 1.744976e-03 378 -1.15000e+00 -2.50000e+00 1.781510e-03 379 -1.20000e+00 -2.50000e+00 1.814999e-03 380 -1.25000e+00 -2.50000e+00 1.845601e-03 381 -1.30000e+00 -2.50000e+00 1.873526e-03 382 -1.35000e+00 -2.50000e+00 1.899049e-03 383 -1.40000e+00 -2.50000e+00 1.922492e-03 384 -1.45000e+00 -2.50000e+00 1.944187e-03 385 -1.50000e+00 -2.50000e+00 1.964433e-03 386 -1.55000e+00 -2.50000e+00 1.983475e-03 387 -1.60000e+00 -2.50000e+00 2.001502e-03 388 -1.65000e+00 -2.50000e+00 2.018663e-03 389 -1.70000e+00 -2.50000e+00 2.035077e-03 390 -1.75000e+00 -2.50000e+00 2.050837e-03 391 -1.80000e+00 -2.50000e+00 2.066022e-03 392 -1.85000e+00 -2.50000e+00 2.080699e-03 393 -1.90000e+00 -2.50000e+00 2.094922e-03 394 -1.95000e+00 -2.50000e+00 2.108740e-03 395 -2.00000e+00 -2.50000e+00 2.122194e-03 396 -2.05000e+00 -2.50000e+00 2.135320e-03 397 -2.10000e+00 -2.50000e+00 2.148149e-03 398 -2.15000e+00 -2.50000e+00 2.160709e-03 399 -2.20000e+00 -2.50000e+00 2.173025e-03 400 -2.25000e+00 -2.50000e+00 2.185117e-03 401 -2.30000e+00 -2.50000e+00 2.197006e-03 402 -2.35000e+00 -2.50000e+00 2.208709e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -2.50000e+00 2.220241e-03 404 -2.45000e+00 -2.50000e+00 2.231616e-03 405 -2.50000e+00 -2.50000e+00 2.242847e-03 406 -2.55000e+00 -2.50000e+00 2.253944e-03 407 -2.60000e+00 -2.50000e+00 2.264918e-03 408 -2.65000e+00 -2.50000e+00 2.275779e-03 409 -2.70000e+00 -2.50000e+00 2.286535e-03 410 -2.75000e+00 -2.50000e+00 2.297193e-03 411 -2.80000e+00 -2.50000e+00 2.307761e-03 412 -2.85000e+00 -2.50000e+00 2.318245e-03 413 -2.90000e+00 -2.50000e+00 2.328651e-03 414 -2.95000e+00 -2.50000e+00 2.338985e-03 415 -3.00000e+00 -2.50000e+00 2.349251e-03 416 -3.05000e+00 -2.50000e+00 2.359455e-03 417 -3.10000e+00 -2.50000e+00 2.369600e-03 418 -3.15000e+00 -2.50000e+00 2.379691e-03 419 -3.20000e+00 -2.50000e+00 2.389731e-03 420 -3.25000e+00 -2.50000e+00 2.399723e-03 421 -3.30000e+00 -2.50000e+00 2.409672e-03 422 -3.35000e+00 -2.50000e+00 2.419579e-03 423 -3.40000e+00 -2.50000e+00 2.429448e-03 424 -3.45000e+00 -2.50000e+00 2.439280e-03 425 -3.50000e+00 -2.50000e+00 2.449080e-03 426 0.000000e+00 -3.00000e+00 0.000000e+00 427 -5.00000e-02 -3.00000e+00 1.464974e-04 428 -1.00000e-01 -3.00000e+00 2.881692e-04 429 -1.50000e-01 -3.00000e+00 4.251063e-04 430 -2.00000e-01 -3.00000e+00 5.573969e-04 431 -2.50000e-01 -3.00000e+00 6.851273e-04 432 -3.00000e-01 -3.00000e+00 8.083818e-04 433 -3.50000e-01 -3.00000e+00 9.272425e-04 434 -4.00000e-01 -3.00000e+00 1.041790e-03 435 -4.50000e-01 -3.00000e+00 1.152101e-03 436 -5.00000e-01 -3.00000e+00 1.258254e-03 437 -5.50000e-01 -3.00000e+00 1.360322e-03 438 -6.00000e-01 -3.00000e+00 1.458379e-03 439 -6.50000e-01 -3.00000e+00 1.552496e-03 440 -7.00000e-01 -3.00000e+00 1.642742e-03 441 -7.50000e-01 -3.00000e+00 1.729185e-03 442 -8.00000e-01 -3.00000e+00 1.811893e-03 443 -8.50000e-01 -3.00000e+00 1.890929e-03 444 -9.00000e-01 -3.00000e+00 1.966360e-03 445 -9.50000e-01 -3.00000e+00 2.038246e-03 446 -1.00000e+00 -3.00000e+00 2.106650e-03 447 -1.05000e+00 -3.00000e+00 2.171633e-03 448 -1.10000e+00 -3.00000e+00 2.233255e-03 449 -1.15000e+00 -3.00000e+00 2.291575e-03 450 -1.20000e+00 -3.00000e+00 2.346656e-03 451 -1.25000e+00 -3.00000e+00 2.398556e-03 452 -1.30000e+00 -3.00000e+00 2.447342e-03 453 -1.35000e+00 -3.00000e+00 2.493079e-03 454 -1.40000e+00 -3.00000e+00 2.535844e-03 455 -1.45000e+00 -3.00000e+00 2.575726e-03 456 -1.50000e+00 -3.00000e+00 2.612831e-03 457 -1.55000e+00 -3.00000e+00 2.647298e-03 458 -1.60000e+00 -3.00000e+00 2.679303e-03 459 -1.65000e+00 -3.00000e+00 2.709060e-03 460 -1.70000e+00 -3.00000e+00 2.736810e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -3.00000e+00 2.762799e-03 462 -1.80000e+00 -3.00000e+00 2.787253e-03 463 -1.85000e+00 -3.00000e+00 2.810372e-03 464 -1.90000e+00 -3.00000e+00 2.832325e-03 465 -1.95000e+00 -3.00000e+00 2.853254e-03 466 -2.00000e+00 -3.00000e+00 2.873277e-03 467 -2.05000e+00 -3.00000e+00 2.892497e-03 468 -2.10000e+00 -3.00000e+00 2.911002e-03 469 -2.15000e+00 -3.00000e+00 2.928865e-03 470 -2.20000e+00 -3.00000e+00 2.946151e-03 471 -2.25000e+00 -3.00000e+00 2.962918e-03 472 -2.30000e+00 -3.00000e+00 2.979215e-03 473 -2.35000e+00 -3.00000e+00 2.995085e-03 474 -2.40000e+00 -3.00000e+00 3.010567e-03 475 -2.45000e+00 -3.00000e+00 3.025695e-03 476 -2.50000e+00 -3.00000e+00 3.040500e-03 477 -2.55000e+00 -3.00000e+00 3.055007e-03 478 -2.60000e+00 -3.00000e+00 3.069242e-03 479 -2.65000e+00 -3.00000e+00 3.083227e-03 480 -2.70000e+00 -3.00000e+00 3.096980e-03 481 -2.75000e+00 -3.00000e+00 3.110520e-03 482 -2.80000e+00 -3.00000e+00 3.123862e-03 483 -2.85000e+00 -3.00000e+00 3.137022e-03 484 -2.90000e+00 -3.00000e+00 3.150012e-03 485 -2.95000e+00 -3.00000e+00 3.162845e-03 486 -3.00000e+00 -3.00000e+00 3.175530e-03 487 -3.05000e+00 -3.00000e+00 3.188080e-03 488 -3.10000e+00 -3.00000e+00 3.200502e-03 489 -3.15000e+00 -3.00000e+00 3.212805e-03 490 -3.20000e+00 -3.00000e+00 3.224997e-03 491 -3.25000e+00 -3.00000e+00 3.237085e-03 492 -3.30000e+00 -3.00000e+00 3.249077e-03 493 -3.35000e+00 -3.00000e+00 3.260977e-03 494 -3.40000e+00 -3.00000e+00 3.272791e-03 495 -3.45000e+00 -3.00000e+00 3.284526e-03 496 -3.50000e+00 -3.00000e+00 3.296185e-03 497 0.000000e+00 -3.50000e+00 0.000000e+00 498 -5.00000e-02 -3.50000e+00 1.654053e-04 499 -1.00000e-01 -3.50000e+00 3.260894e-04 500 -1.50000e-01 -3.50000e+00 4.821349e-04 501 -2.00000e-01 -3.50000e+00 6.336226e-04 502 -2.50000e-01 -3.50000e+00 7.806314e-04 503 -3.00000e-01 -3.50000e+00 9.232384e-04 504 -3.50000e-01 -3.50000e+00 1.061519e-03 505 -4.00000e-01 -3.50000e+00 1.195547e-03 506 -4.50000e-01 -3.50000e+00 1.325395e-03 507 -5.00000e-01 -3.50000e+00 1.451132e-03 508 -5.50000e-01 -3.50000e+00 1.572828e-03 509 -6.00000e-01 -3.50000e+00 1.690551e-03 510 -6.50000e-01 -3.50000e+00 1.804365e-03 511 -7.00000e-01 -3.50000e+00 1.914336e-03 512 -7.50000e-01 -3.50000e+00 2.020527e-03 513 -8.00000e-01 -3.50000e+00 2.122999e-03 514 -8.50000e-01 -3.50000e+00 2.221813e-03 515 -9.00000e-01 -3.50000e+00 2.317028e-03 516 -9.50000e-01 -3.50000e+00 2.408702e-03 517 -1.00000e+00 -3.50000e+00 2.496893e-03 518 -1.05000e+00 -3.50000e+00 2.581655e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 -1.10000e+00 -3.50000e+00 2.663044e-03 520 -1.15000e+00 -3.50000e+00 2.741114e-03 521 -1.20000e+00 -3.50000e+00 2.815917e-03 522 -1.25000e+00 -3.50000e+00 2.887506e-03 523 -1.30000e+00 -3.50000e+00 2.955932e-03 524 -1.35000e+00 -3.50000e+00 3.021247e-03 525 -1.40000e+00 -3.50000e+00 3.083501e-03 526 -1.45000e+00 -3.50000e+00 3.142745e-03 527 -1.50000e+00 -3.50000e+00 3.199032e-03 528 -1.55000e+00 -3.50000e+00 3.252414e-03 529 -1.60000e+00 -3.50000e+00 3.302948e-03 530 -1.65000e+00 -3.50000e+00 3.350695e-03 531 -1.70000e+00 -3.50000e+00 3.395722e-03 532 -1.75000e+00 -3.50000e+00 3.438109e-03 533 -1.80000e+00 -3.50000e+00 3.477953e-03 534 -1.85000e+00 -3.50000e+00 3.515372e-03 535 -1.90000e+00 -3.50000e+00 3.550510e-03 536 -1.95000e+00 -3.50000e+00 3.583536e-03 537 -2.00000e+00 -3.50000e+00 3.614631e-03 538 -2.05000e+00 -3.50000e+00 3.643984e-03 539 -2.10000e+00 -3.50000e+00 3.671772e-03 540 -2.15000e+00 -3.50000e+00 3.698161e-03 541 -2.20000e+00 -3.50000e+00 3.723300e-03 542 -2.25000e+00 -3.50000e+00 3.747319e-03 543 -2.30000e+00 -3.50000e+00 3.770336e-03 544 -2.35000e+00 -3.50000e+00 3.792452e-03 545 -2.40000e+00 -3.50000e+00 3.813756e-03 546 -2.45000e+00 -3.50000e+00 3.834326e-03 547 -2.50000e+00 -3.50000e+00 3.854232e-03 548 -2.55000e+00 -3.50000e+00 3.873535e-03 549 -2.60000e+00 -3.50000e+00 3.892288e-03 550 -2.65000e+00 -3.50000e+00 3.910540e-03 551 -2.70000e+00 -3.50000e+00 3.928333e-03 552 -2.75000e+00 -3.50000e+00 3.945706e-03 553 -2.80000e+00 -3.50000e+00 3.962692e-03 554 -2.85000e+00 -3.50000e+00 3.979322e-03 555 -2.90000e+00 -3.50000e+00 3.995624e-03 556 -2.95000e+00 -3.50000e+00 4.011623e-03 557 -3.00000e+00 -3.50000e+00 4.027341e-03 558 -3.05000e+00 -3.50000e+00 4.042799e-03 559 -3.10000e+00 -3.50000e+00 4.058015e-03 560 -3.15000e+00 -3.50000e+00 4.073007e-03 561 -3.20000e+00 -3.50000e+00 4.087788e-03 562 -3.25000e+00 -3.50000e+00 4.102375e-03 563 -3.30000e+00 -3.50000e+00 4.116779e-03 564 -3.35000e+00 -3.50000e+00 4.131013e-03 565 -3.40000e+00 -3.50000e+00 4.145088e-03 566 -3.45000e+00 -3.50000e+00 4.159013e-03 567 -3.50000e+00 -3.50000e+00 4.172798e-03 Total run time: 1.110 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test12.out0000644000265600020320000005602412264261473017530 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** Date: Tue Apr 20 23:15:37 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Pmosfet*** DCtransferCurve Tue Apr 20 23:15:37 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -1.00000e-01 1.019932e-12 1 -5.00000e-02 -1.00000e-01 3.294985e-12 2 -1.00000e-01 -1.00000e-01 1.125051e-11 3 -1.50000e-01 -1.00000e-01 3.903447e-11 4 -2.00000e-01 -1.00000e-01 1.358394e-10 5 -2.50000e-01 -1.00000e-01 4.716728e-10 6 -3.00000e-01 -1.00000e-01 1.627686e-09 7 -3.50000e-01 -1.00000e-01 5.552992e-09 8 -4.00000e-01 -1.00000e-01 1.858492e-08 9 -4.50000e-01 -1.00000e-01 6.043447e-08 10 -5.00000e-01 -1.00000e-01 1.894482e-07 11 -5.50000e-01 -1.00000e-01 5.709760e-07 12 -6.00000e-01 -1.00000e-01 1.634724e-06 13 -6.50000e-01 -1.00000e-01 4.224264e-06 14 -7.00000e-01 -1.00000e-01 9.149857e-06 15 -7.50000e-01 -1.00000e-01 1.618982e-05 16 -8.00000e-01 -1.00000e-01 2.438603e-05 17 -8.50000e-01 -1.00000e-01 3.297174e-05 18 -9.00000e-01 -1.00000e-01 4.155486e-05 19 -9.50000e-01 -1.00000e-01 4.998207e-05 20 -1.00000e+00 -1.00000e-01 5.821243e-05 21 -1.05000e+00 -1.00000e-01 6.624776e-05 22 -1.10000e+00 -1.00000e-01 7.410143e-05 23 -1.15000e+00 -1.00000e-01 8.178614e-05 24 -1.20000e+00 -1.00000e-01 8.931457e-05 25 -1.25000e+00 -1.00000e-01 9.669606e-05 26 -1.30000e+00 -1.00000e-01 1.039373e-04 27 -1.35000e+00 -1.00000e-01 1.110436e-04 28 -1.40000e+00 -1.00000e-01 1.180192e-04 29 -1.45000e+00 -1.00000e-01 1.248676e-04 30 -1.50000e+00 -1.00000e-01 1.315923e-04 31 -1.55000e+00 -1.00000e-01 1.381962e-04 32 -1.60000e+00 -1.00000e-01 1.446824e-04 33 -1.65000e+00 -1.00000e-01 1.510535e-04 34 -1.70000e+00 -1.00000e-01 1.573125e-04 35 -1.75000e+00 -1.00000e-01 1.634619e-04 36 -1.80000e+00 -1.00000e-01 1.695044e-04 37 -1.85000e+00 -1.00000e-01 1.754426e-04 38 -1.90000e+00 -1.00000e-01 1.812788e-04 39 -1.95000e+00 -1.00000e-01 1.870157e-04 40 -2.00000e+00 -1.00000e-01 1.926554e-04 41 -2.05000e+00 -1.00000e-01 1.982003e-04 42 -2.10000e+00 -1.00000e-01 2.036526e-04 43 -2.15000e+00 -1.00000e-01 2.090146e-04 44 -2.20000e+00 -1.00000e-01 2.142882e-04 45 -2.25000e+00 -1.00000e-01 2.194757e-04 46 -2.30000e+00 -1.00000e-01 2.245789e-04 47 -2.35000e+00 -1.00000e-01 2.295998e-04 48 -2.40000e+00 -1.00000e-01 2.345403e-04 49 -2.45000e+00 -1.00000e-01 2.394022e-04 50 -2.50000e+00 -1.00000e-01 2.441873e-04 51 -2.55000e+00 -1.00000e-01 2.488972e-04 52 -2.60000e+00 -1.00000e-01 2.535338e-04 53 -2.65000e+00 -1.00000e-01 2.580986e-04 54 -2.70000e+00 -1.00000e-01 2.625932e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 -1.00000e-01 2.670191e-04 56 -2.80000e+00 -1.00000e-01 2.713778e-04 57 -2.85000e+00 -1.00000e-01 2.756708e-04 58 -2.90000e+00 -1.00000e-01 2.798994e-04 59 -2.95000e+00 -1.00000e-01 2.840652e-04 60 -3.00000e+00 -1.00000e-01 2.881692e-04 61 -3.05000e+00 -1.00000e-01 2.922130e-04 62 -3.10000e+00 -1.00000e-01 2.961977e-04 63 -3.15000e+00 -1.00000e-01 3.001246e-04 64 -3.20000e+00 -1.00000e-01 3.039948e-04 65 -3.25000e+00 -1.00000e-01 3.078095e-04 66 -3.30000e+00 -1.00000e-01 3.115699e-04 67 -3.35000e+00 -1.00000e-01 3.152770e-04 68 -3.40000e+00 -1.00000e-01 3.189320e-04 69 -3.45000e+00 -1.00000e-01 3.225357e-04 70 -3.50000e+00 -1.00000e-01 3.260894e-04 71 0.000000e+00 -1.00000e-01 6.220581e-13 72 -5.00000e-02 -1.00000e-01 6.384867e-13 73 -1.00000e-01 -1.00000e-01 7.939199e-13 74 -1.50000e-01 -1.00000e-01 1.328134e-12 75 -2.00000e-01 -1.00000e-01 3.413024e-12 76 -2.50000e-01 -1.00000e-01 1.154308e-11 77 -3.00000e-01 -1.00000e-01 4.319509e-11 78 -3.50000e-01 -1.00000e-01 1.660338e-10 79 -4.00000e-01 -1.00000e-01 6.398542e-10 80 -4.50000e-01 -1.00000e-01 2.446482e-09 81 -5.00000e-01 -1.00000e-01 9.191972e-09 82 -5.50000e-01 -1.00000e-01 3.351070e-08 83 -6.00000e-01 -1.00000e-01 1.168780e-07 84 -6.50000e-01 -1.00000e-01 3.864005e-07 85 -7.00000e-01 -1.00000e-01 1.198670e-06 86 -7.50000e-01 -1.00000e-01 3.335032e-06 87 -8.00000e-01 -1.00000e-01 7.693082e-06 88 -8.50000e-01 -1.00000e-01 1.421360e-05 89 -9.00000e-01 -1.00000e-01 2.196585e-05 90 -9.50000e-01 -1.00000e-01 3.016514e-05 91 -1.00000e+00 -1.00000e-01 3.841445e-05 92 -1.05000e+00 -1.00000e-01 4.655817e-05 93 -1.10000e+00 -1.00000e-01 5.454999e-05 94 -1.15000e+00 -1.00000e-01 6.238423e-05 95 -1.20000e+00 -1.00000e-01 7.006690e-05 96 -1.25000e+00 -1.00000e-01 7.760449e-05 97 -1.30000e+00 -1.00000e-01 8.500376e-05 98 -1.35000e+00 -1.00000e-01 9.227073e-05 99 -1.40000e+00 -1.00000e-01 9.940955e-05 100 -1.45000e+00 -1.00000e-01 1.064236e-04 101 -1.50000e+00 -1.00000e-01 1.133158e-04 102 -1.55000e+00 -1.00000e-01 1.200889e-04 103 -1.60000e+00 -1.00000e-01 1.267454e-04 104 -1.65000e+00 -1.00000e-01 1.332880e-04 105 -1.70000e+00 -1.00000e-01 1.397191e-04 106 -1.75000e+00 -1.00000e-01 1.460412e-04 107 -1.80000e+00 -1.00000e-01 1.522567e-04 108 -1.85000e+00 -1.00000e-01 1.583679e-04 109 -1.90000e+00 -1.00000e-01 1.643773e-04 110 -1.95000e+00 -1.00000e-01 1.702872e-04 111 -2.00000e+00 -1.00000e-01 1.760998e-04 112 -2.05000e+00 -1.00000e-01 1.818173e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -1.00000e-01 1.874419e-04 114 -2.15000e+00 -1.00000e-01 1.929756e-04 115 -2.20000e+00 -1.00000e-01 1.984205e-04 116 -2.25000e+00 -1.00000e-01 2.037787e-04 117 -2.30000e+00 -1.00000e-01 2.090520e-04 118 -2.35000e+00 -1.00000e-01 2.142423e-04 119 -2.40000e+00 -1.00000e-01 2.193516e-04 120 -2.45000e+00 -1.00000e-01 2.243815e-04 121 -2.50000e+00 -1.00000e-01 2.293338e-04 122 -2.55000e+00 -1.00000e-01 2.342102e-04 123 -2.60000e+00 -1.00000e-01 2.390124e-04 124 -2.65000e+00 -1.00000e-01 2.437419e-04 125 -2.70000e+00 -1.00000e-01 2.484004e-04 126 -2.75000e+00 -1.00000e-01 2.529892e-04 127 -2.80000e+00 -1.00000e-01 2.575100e-04 128 -2.85000e+00 -1.00000e-01 2.619641e-04 129 -2.90000e+00 -1.00000e-01 2.663530e-04 130 -2.95000e+00 -1.00000e-01 2.706779e-04 131 -3.00000e+00 -1.00000e-01 2.749403e-04 132 -3.05000e+00 -1.00000e-01 2.791413e-04 133 -3.10000e+00 -1.00000e-01 2.832823e-04 134 -3.15000e+00 -1.00000e-01 2.873645e-04 135 -3.20000e+00 -1.00000e-01 2.913890e-04 136 -3.25000e+00 -1.00000e-01 2.953570e-04 137 -3.30000e+00 -1.00000e-01 2.992697e-04 138 -3.35000e+00 -1.00000e-01 3.031281e-04 139 -3.40000e+00 -1.00000e-01 3.069333e-04 140 -3.45000e+00 -1.00000e-01 3.106863e-04 141 -3.50000e+00 -1.00000e-01 3.143881e-04 142 0.000000e+00 -1.00000e-01 1.110443e-12 143 -5.00000e-02 -1.00000e-01 1.111078e-12 144 -1.00000e-01 -1.00000e-01 1.117739e-12 145 -1.50000e-01 -1.00000e-01 1.142328e-12 146 -2.00000e-01 -1.00000e-01 1.245030e-12 147 -2.50000e-01 -1.00000e-01 1.673894e-12 148 -3.00000e-01 -1.00000e-01 3.463982e-12 149 -3.50000e-01 -1.00000e-01 1.092927e-11 150 -4.00000e-01 -1.00000e-01 4.200639e-11 151 -4.50000e-01 -1.00000e-01 1.709092e-10 152 -5.00000e-01 -1.00000e-01 7.017248e-10 153 -5.50000e-01 -1.00000e-01 2.857006e-09 154 -6.00000e-01 -1.00000e-01 1.138208e-08 155 -6.50000e-01 -1.00000e-01 4.364584e-08 156 -7.00000e-01 -1.00000e-01 1.583240e-07 157 -7.50000e-01 -1.00000e-01 5.373098e-07 158 -8.00000e-01 -1.00000e-01 1.672722e-06 159 -8.50000e-01 -1.00000e-01 4.481448e-06 160 -9.00000e-01 -1.00000e-01 9.607334e-06 161 -9.50000e-01 -1.00000e-01 1.652778e-05 162 -1.00000e+00 -1.00000e-01 2.429819e-05 163 -1.05000e+00 -1.00000e-01 3.232075e-05 164 -1.10000e+00 -1.00000e-01 4.033016e-05 165 -1.15000e+00 -1.00000e-01 4.823126e-05 166 -1.20000e+00 -1.00000e-01 5.599803e-05 167 -1.25000e+00 -1.00000e-01 6.362803e-05 168 -1.30000e+00 -1.00000e-01 7.112479e-05 169 -1.35000e+00 -1.00000e-01 7.849131e-05 170 -1.40000e+00 -1.00000e-01 8.573236e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e-01 9.285146e-05 172 -1.50000e+00 -1.00000e-01 9.985131e-05 173 -1.55000e+00 -1.00000e-01 1.067343e-04 174 -1.60000e+00 -1.00000e-01 1.135027e-04 175 -1.65000e+00 -1.00000e-01 1.201588e-04 176 -1.70000e+00 -1.00000e-01 1.267048e-04 177 -1.75000e+00 -1.00000e-01 1.331429e-04 178 -1.80000e+00 -1.00000e-01 1.394754e-04 179 -1.85000e+00 -1.00000e-01 1.457044e-04 180 -1.90000e+00 -1.00000e-01 1.518322e-04 181 -1.95000e+00 -1.00000e-01 1.578610e-04 182 -2.00000e+00 -1.00000e-01 1.637929e-04 183 -2.05000e+00 -1.00000e-01 1.696299e-04 184 -2.10000e+00 -1.00000e-01 1.753743e-04 185 -2.15000e+00 -1.00000e-01 1.810280e-04 186 -2.20000e+00 -1.00000e-01 1.865929e-04 187 -2.25000e+00 -1.00000e-01 1.920711e-04 188 -2.30000e+00 -1.00000e-01 1.974643e-04 189 -2.35000e+00 -1.00000e-01 2.027745e-04 190 -2.40000e+00 -1.00000e-01 2.080034e-04 191 -2.45000e+00 -1.00000e-01 2.131528e-04 192 -2.50000e+00 -1.00000e-01 2.182244e-04 193 -2.55000e+00 -1.00000e-01 2.232199e-04 194 -2.60000e+00 -1.00000e-01 2.281407e-04 195 -2.65000e+00 -1.00000e-01 2.329886e-04 196 -2.70000e+00 -1.00000e-01 2.377651e-04 197 -2.75000e+00 -1.00000e-01 2.424716e-04 198 -2.80000e+00 -1.00000e-01 2.471095e-04 199 -2.85000e+00 -1.00000e-01 2.516804e-04 200 -2.90000e+00 -1.00000e-01 2.561856e-04 201 -2.95000e+00 -1.00000e-01 2.606264e-04 202 -3.00000e+00 -1.00000e-01 2.650041e-04 203 -3.05000e+00 -1.00000e-01 2.693200e-04 204 -3.10000e+00 -1.00000e-01 2.735753e-04 205 -3.15000e+00 -1.00000e-01 2.777713e-04 206 -3.20000e+00 -1.00000e-01 2.819090e-04 207 -3.25000e+00 -1.00000e-01 2.859897e-04 208 -3.30000e+00 -1.00000e-01 2.900145e-04 209 -3.35000e+00 -1.00000e-01 2.939844e-04 210 -3.40000e+00 -1.00000e-01 2.979006e-04 211 -3.45000e+00 -1.00000e-01 3.017640e-04 212 -3.50000e+00 -1.00000e-01 3.055756e-04 213 0.000000e+00 -1.00000e-01 1.610030e-12 214 -5.00000e-02 -1.00000e-01 1.610075e-12 215 -1.00000e-01 -1.00000e-01 1.610580e-12 216 -1.50000e-01 -1.00000e-01 1.612543e-12 217 -2.00000e-01 -1.00000e-01 1.621159e-12 218 -2.50000e-01 -1.00000e-01 1.658961e-12 219 -3.00000e-01 -1.00000e-01 1.824794e-12 220 -3.50000e-01 -1.00000e-01 2.552073e-12 221 -4.00000e-01 -1.00000e-01 5.739620e-12 222 -4.50000e-01 -1.00000e-01 1.969192e-11 223 -5.00000e-01 -1.00000e-01 8.059728e-11 224 -5.50000e-01 -1.00000e-01 3.449816e-10 225 -6.00000e-01 -1.00000e-01 1.479723e-09 226 -6.50000e-01 -1.00000e-01 6.243590e-09 227 -7.00000e-01 -1.00000e-01 2.545868e-08 228 -7.50000e-01 -1.00000e-01 9.824361e-08 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.00000e-01 3.528768e-07 230 -8.50000e-01 -1.00000e-01 1.162475e-06 231 -9.00000e-01 -1.00000e-01 3.339969e-06 232 -9.50000e-01 -1.00000e-01 7.728842e-06 233 -1.00000e+00 -1.00000e-01 1.411790e-05 234 -1.05000e+00 -1.00000e-01 2.156965e-05 235 -1.10000e+00 -1.00000e-01 2.939295e-05 236 -1.15000e+00 -1.00000e-01 3.726281e-05 237 -1.20000e+00 -1.00000e-01 4.505582e-05 238 -1.25000e+00 -1.00000e-01 5.273329e-05 239 -1.30000e+00 -1.00000e-01 6.028680e-05 240 -1.35000e+00 -1.00000e-01 6.771687e-05 241 -1.40000e+00 -1.00000e-01 7.502490e-05 242 -1.45000e+00 -1.00000e-01 8.221354e-05 243 -1.50000e+00 -1.00000e-01 8.928586e-05 244 -1.55000e+00 -1.00000e-01 9.624398e-05 245 -1.60000e+00 -1.00000e-01 1.030898e-04 246 -1.65000e+00 -1.00000e-01 1.098254e-04 247 -1.70000e+00 -1.00000e-01 1.164526e-04 248 -1.75000e+00 -1.00000e-01 1.229733e-04 249 -1.80000e+00 -1.00000e-01 1.293898e-04 250 -1.85000e+00 -1.00000e-01 1.357039e-04 251 -1.90000e+00 -1.00000e-01 1.419177e-04 252 -1.95000e+00 -1.00000e-01 1.480333e-04 253 -2.00000e+00 -1.00000e-01 1.540528e-04 254 -2.05000e+00 -1.00000e-01 1.599780e-04 255 -2.10000e+00 -1.00000e-01 1.658111e-04 256 -2.15000e+00 -1.00000e-01 1.715539e-04 257 -2.20000e+00 -1.00000e-01 1.772083e-04 258 -2.25000e+00 -1.00000e-01 1.827763e-04 259 -2.30000e+00 -1.00000e-01 1.882596e-04 260 -2.35000e+00 -1.00000e-01 1.936600e-04 261 -2.40000e+00 -1.00000e-01 1.989793e-04 262 -2.45000e+00 -1.00000e-01 2.042192e-04 263 -2.50000e+00 -1.00000e-01 2.093814e-04 264 -2.55000e+00 -1.00000e-01 2.144674e-04 265 -2.60000e+00 -1.00000e-01 2.194788e-04 266 -2.65000e+00 -1.00000e-01 2.244173e-04 267 -2.70000e+00 -1.00000e-01 2.292842e-04 268 -2.75000e+00 -1.00000e-01 2.340810e-04 269 -2.80000e+00 -1.00000e-01 2.388092e-04 270 -2.85000e+00 -1.00000e-01 2.434702e-04 271 -2.90000e+00 -1.00000e-01 2.480652e-04 272 -2.95000e+00 -1.00000e-01 2.525957e-04 273 -3.00000e+00 -1.00000e-01 2.570629e-04 274 -3.05000e+00 -1.00000e-01 2.614681e-04 275 -3.10000e+00 -1.00000e-01 2.658124e-04 276 -3.15000e+00 -1.00000e-01 2.700971e-04 277 -3.20000e+00 -1.00000e-01 2.743233e-04 278 -3.25000e+00 -1.00000e-01 2.784921e-04 279 -3.30000e+00 -1.00000e-01 2.826047e-04 280 -3.35000e+00 -1.00000e-01 2.866621e-04 281 -3.40000e+00 -1.00000e-01 2.906655e-04 282 -3.45000e+00 -1.00000e-01 2.946157e-04 283 -3.50000e+00 -1.00000e-01 2.985137e-04 284 0.000000e+00 -1.00000e-01 2.110003e-12 285 -5.00000e-02 -1.00000e-01 2.110008e-12 286 -1.00000e-01 -1.00000e-01 2.110062e-12 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -1.00000e-01 2.110285e-12 288 -2.00000e-01 -1.00000e-01 2.111303e-12 289 -2.50000e-01 -1.00000e-01 2.115961e-12 290 -3.00000e-01 -1.00000e-01 2.137258e-12 291 -3.50000e-01 -1.00000e-01 2.234637e-12 292 -4.00000e-01 -1.00000e-01 2.679772e-12 293 -4.50000e-01 -1.00000e-01 4.713478e-12 294 -5.00000e-01 -1.00000e-01 1.399433e-11 295 -5.50000e-01 -1.00000e-01 5.624503e-11 296 -6.00000e-01 -1.00000e-01 2.476074e-10 297 -6.50000e-01 -1.00000e-01 1.105168e-09 298 -7.00000e-01 -1.00000e-01 4.867057e-09 299 -7.50000e-01 -1.00000e-01 2.072253e-08 300 -8.00000e-01 -1.00000e-01 8.331261e-08 301 -8.50000e-01 -1.00000e-01 3.099160e-07 302 -9.00000e-01 -1.00000e-01 1.050132e-06 303 -9.50000e-01 -1.00000e-01 3.090715e-06 304 -1.00000e+00 -1.00000e-01 7.295320e-06 305 -1.05000e+00 -1.00000e-01 1.350541e-05 306 -1.10000e+00 -1.00000e-01 2.079813e-05 307 -1.15000e+00 -1.00000e-01 2.848034e-05 308 -1.20000e+00 -1.00000e-01 3.622547e-05 309 -1.25000e+00 -1.00000e-01 4.390836e-05 310 -1.30000e+00 -1.00000e-01 5.148804e-05 311 -1.35000e+00 -1.00000e-01 5.895381e-05 312 -1.40000e+00 -1.00000e-01 6.630435e-05 313 -1.45000e+00 -1.00000e-01 7.353975e-05 314 -1.50000e+00 -1.00000e-01 8.066142e-05 315 -1.55000e+00 -1.00000e-01 8.767179e-05 316 -1.60000e+00 -1.00000e-01 9.457249e-05 317 -1.65000e+00 -1.00000e-01 1.013651e-04 318 -1.70000e+00 -1.00000e-01 1.080513e-04 319 -1.75000e+00 -1.00000e-01 1.146329e-04 320 -1.80000e+00 -1.00000e-01 1.211115e-04 321 -1.85000e+00 -1.00000e-01 1.274891e-04 322 -1.90000e+00 -1.00000e-01 1.337676e-04 323 -1.95000e+00 -1.00000e-01 1.399489e-04 324 -2.00000e+00 -1.00000e-01 1.460349e-04 325 -2.05000e+00 -1.00000e-01 1.520275e-04 326 -2.10000e+00 -1.00000e-01 1.579286e-04 327 -2.15000e+00 -1.00000e-01 1.637401e-04 328 -2.20000e+00 -1.00000e-01 1.694637e-04 329 -2.25000e+00 -1.00000e-01 1.751014e-04 330 -2.30000e+00 -1.00000e-01 1.806548e-04 331 -2.35000e+00 -1.00000e-01 1.861258e-04 332 -2.40000e+00 -1.00000e-01 1.915160e-04 333 -2.45000e+00 -1.00000e-01 1.968270e-04 334 -2.50000e+00 -1.00000e-01 2.020605e-04 335 -2.55000e+00 -1.00000e-01 2.072181e-04 336 -2.60000e+00 -1.00000e-01 2.123013e-04 337 -2.65000e+00 -1.00000e-01 2.173116e-04 338 -2.70000e+00 -1.00000e-01 2.222504e-04 339 -2.75000e+00 -1.00000e-01 2.271193e-04 340 -2.80000e+00 -1.00000e-01 2.319196e-04 341 -2.85000e+00 -1.00000e-01 2.366527e-04 342 -2.90000e+00 -1.00000e-01 2.413199e-04 343 -2.95000e+00 -1.00000e-01 2.459225e-04 344 -3.00000e+00 -1.00000e-01 2.504617e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -1.00000e-01 2.549388e-04 346 -3.10000e+00 -1.00000e-01 2.593550e-04 347 -3.15000e+00 -1.00000e-01 2.637115e-04 348 -3.20000e+00 -1.00000e-01 2.680094e-04 349 -3.25000e+00 -1.00000e-01 2.722498e-04 350 -3.30000e+00 -1.00000e-01 2.764338e-04 351 -3.35000e+00 -1.00000e-01 2.805625e-04 352 -3.40000e+00 -1.00000e-01 2.846368e-04 353 -3.45000e+00 -1.00000e-01 2.886579e-04 354 -3.50000e+00 -1.00000e-01 2.926266e-04 355 0.000000e+00 -1.00000e-01 2.610000e-12 356 -5.00000e-02 -1.00000e-01 2.610001e-12 357 -1.00000e-01 -1.00000e-01 2.610008e-12 358 -1.50000e-01 -1.00000e-01 2.610040e-12 359 -2.00000e-01 -1.00000e-01 2.610190e-12 360 -2.50000e-01 -1.00000e-01 2.610901e-12 361 -3.00000e-01 -1.00000e-01 2.614283e-12 362 -3.50000e-01 -1.00000e-01 2.630361e-12 363 -4.00000e-01 -1.00000e-01 2.706772e-12 364 -4.50000e-01 -1.00000e-01 3.069848e-12 365 -5.00000e-01 -1.00000e-01 4.794143e-12 366 -5.50000e-01 -1.00000e-01 1.297367e-11 367 -6.00000e-01 -1.00000e-01 5.167879e-11 368 -6.50000e-01 -1.00000e-01 2.338558e-10 369 -7.00000e-01 -1.00000e-01 1.081705e-09 370 -7.50000e-01 -1.00000e-01 4.937581e-09 371 -8.00000e-01 -1.00000e-01 2.172021e-08 372 -8.50000e-01 -1.00000e-01 8.965859e-08 373 -9.00000e-01 -1.00000e-01 3.395670e-07 374 -9.50000e-01 -1.00000e-01 1.158757e-06 375 -1.00000e+00 -1.00000e-01 3.379161e-06 376 -1.05000e+00 -1.00000e-01 7.792409e-06 377 -1.10000e+00 -1.00000e-01 1.409005e-05 378 -1.15000e+00 -1.00000e-01 2.134820e-05 379 -1.20000e+00 -1.00000e-01 2.893781e-05 380 -1.25000e+00 -1.00000e-01 3.657428e-05 381 -1.30000e+00 -1.00000e-01 4.415019e-05 382 -1.35000e+00 -1.00000e-01 5.162988e-05 383 -1.40000e+00 -1.00000e-01 5.900317e-05 384 -1.45000e+00 -1.00000e-01 6.626787e-05 385 -1.50000e+00 -1.00000e-01 7.342301e-05 386 -1.55000e+00 -1.00000e-01 8.046949e-05 387 -1.60000e+00 -1.00000e-01 8.740910e-05 388 -1.65000e+00 -1.00000e-01 9.424306e-05 389 -1.70000e+00 -1.00000e-01 1.009727e-04 390 -1.75000e+00 -1.00000e-01 1.075995e-04 391 -1.80000e+00 -1.00000e-01 1.141251e-04 392 -1.85000e+00 -1.00000e-01 1.205510e-04 393 -1.90000e+00 -1.00000e-01 1.268791e-04 394 -1.95000e+00 -1.00000e-01 1.331111e-04 395 -2.00000e+00 -1.00000e-01 1.392488e-04 396 -2.05000e+00 -1.00000e-01 1.452939e-04 397 -2.10000e+00 -1.00000e-01 1.512484e-04 398 -2.15000e+00 -1.00000e-01 1.571140e-04 399 -2.20000e+00 -1.00000e-01 1.628925e-04 400 -2.25000e+00 -1.00000e-01 1.685855e-04 401 -2.30000e+00 -1.00000e-01 1.741949e-04 402 -2.35000e+00 -1.00000e-01 1.797223e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -1.00000e-01 1.851693e-04 404 -2.45000e+00 -1.00000e-01 1.905376e-04 405 -2.50000e+00 -1.00000e-01 1.958288e-04 406 -2.55000e+00 -1.00000e-01 2.010443e-04 407 -2.60000e+00 -1.00000e-01 2.061857e-04 408 -2.65000e+00 -1.00000e-01 2.112545e-04 409 -2.70000e+00 -1.00000e-01 2.162521e-04 410 -2.75000e+00 -1.00000e-01 2.211799e-04 411 -2.80000e+00 -1.00000e-01 2.260392e-04 412 -2.85000e+00 -1.00000e-01 2.308315e-04 413 -2.90000e+00 -1.00000e-01 2.355580e-04 414 -2.95000e+00 -1.00000e-01 2.402199e-04 415 -3.00000e+00 -1.00000e-01 2.448186e-04 416 -3.05000e+00 -1.00000e-01 2.493553e-04 417 -3.10000e+00 -1.00000e-01 2.538310e-04 418 -3.15000e+00 -1.00000e-01 2.582471e-04 419 -3.20000e+00 -1.00000e-01 2.626045e-04 420 -3.25000e+00 -1.00000e-01 2.669044e-04 421 -3.30000e+00 -1.00000e-01 2.711479e-04 422 -3.35000e+00 -1.00000e-01 2.753360e-04 423 -3.40000e+00 -1.00000e-01 2.794698e-04 424 -3.45000e+00 -1.00000e-01 2.835501e-04 425 -3.50000e+00 -1.00000e-01 2.875781e-04 426 0.000000e+00 -1.00000e-01 3.110000e-12 427 -5.00000e-02 -1.00000e-01 3.110000e-12 428 -1.00000e-01 -1.00000e-01 3.110001e-12 429 -1.50000e-01 -1.00000e-01 3.110006e-12 430 -2.00000e-01 -1.00000e-01 3.110031e-12 431 -2.50000e-01 -1.00000e-01 3.110156e-12 432 -3.00000e-01 -1.00000e-01 3.110769e-12 433 -3.50000e-01 -1.00000e-01 3.113800e-12 434 -4.00000e-01 -1.00000e-01 3.128779e-12 435 -4.50000e-01 -1.00000e-01 3.202798e-12 436 -5.00000e-01 -1.00000e-01 3.568471e-12 437 -5.50000e-01 -1.00000e-01 5.373939e-12 438 -6.00000e-01 -1.00000e-01 1.427690e-11 439 -6.50000e-01 -1.00000e-01 5.805519e-11 440 -7.00000e-01 -1.00000e-01 2.720042e-10 441 -7.50000e-01 -1.00000e-01 1.303844e-09 442 -8.00000e-01 -1.00000e-01 6.145838e-09 443 -8.50000e-01 -1.00000e-01 2.771395e-08 444 -9.00000e-01 -1.00000e-01 1.160182e-07 445 -9.50000e-01 -1.00000e-01 4.405389e-07 446 -1.00000e+00 -1.00000e-01 1.483054e-06 447 -1.05000e+00 -1.00000e-01 4.153308e-06 448 -1.10000e+00 -1.00000e-01 9.039477e-06 449 -1.15000e+00 -1.00000e-01 1.556848e-05 450 -1.20000e+00 -1.00000e-01 2.285290e-05 451 -1.25000e+00 -1.00000e-01 3.037432e-05 452 -1.30000e+00 -1.00000e-01 3.791203e-05 453 -1.35000e+00 -1.00000e-01 4.538465e-05 454 -1.40000e+00 -1.00000e-01 5.276489e-05 455 -1.45000e+00 -1.00000e-01 6.004428e-05 456 -1.50000e+00 -1.00000e-01 6.722029e-05 457 -1.55000e+00 -1.00000e-01 7.429116e-05 458 -1.60000e+00 -1.00000e-01 8.125786e-05 459 -1.65000e+00 -1.00000e-01 8.812153e-05 460 -1.70000e+00 -1.00000e-01 9.488313e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -1.00000e-01 1.015438e-04 462 -1.80000e+00 -1.00000e-01 1.081049e-04 463 -1.85000e+00 -1.00000e-01 1.145680e-04 464 -1.90000e+00 -1.00000e-01 1.209344e-04 465 -1.95000e+00 -1.00000e-01 1.272060e-04 466 -2.00000e+00 -1.00000e-01 1.333843e-04 467 -2.05000e+00 -1.00000e-01 1.394711e-04 468 -2.10000e+00 -1.00000e-01 1.454681e-04 469 -2.15000e+00 -1.00000e-01 1.513769e-04 470 -2.20000e+00 -1.00000e-01 1.571994e-04 471 -2.25000e+00 -1.00000e-01 1.629372e-04 472 -2.30000e+00 -1.00000e-01 1.685919e-04 473 -2.35000e+00 -1.00000e-01 1.741652e-04 474 -2.40000e+00 -1.00000e-01 1.796586e-04 475 -2.45000e+00 -1.00000e-01 1.850738e-04 476 -2.50000e+00 -1.00000e-01 1.904122e-04 477 -2.55000e+00 -1.00000e-01 1.956755e-04 478 -2.60000e+00 -1.00000e-01 2.008649e-04 479 -2.65000e+00 -1.00000e-01 2.059821e-04 480 -2.70000e+00 -1.00000e-01 2.110284e-04 481 -2.75000e+00 -1.00000e-01 2.160052e-04 482 -2.80000e+00 -1.00000e-01 2.209138e-04 483 -2.85000e+00 -1.00000e-01 2.257555e-04 484 -2.90000e+00 -1.00000e-01 2.305316e-04 485 -2.95000e+00 -1.00000e-01 2.352434e-04 486 -3.00000e+00 -1.00000e-01 2.398920e-04 487 -3.05000e+00 -1.00000e-01 2.444787e-04 488 -3.10000e+00 -1.00000e-01 2.490047e-04 489 -3.15000e+00 -1.00000e-01 2.534710e-04 490 -3.20000e+00 -1.00000e-01 2.578788e-04 491 -3.25000e+00 -1.00000e-01 2.622291e-04 492 -3.30000e+00 -1.00000e-01 2.665231e-04 493 -3.35000e+00 -1.00000e-01 2.707616e-04 494 -3.40000e+00 -1.00000e-01 2.749459e-04 495 -3.45000e+00 -1.00000e-01 2.790767e-04 496 -3.50000e+00 -1.00000e-01 2.831552e-04 Total run time: 1.180 seconds. Current data size = 241664, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/modelcard.nmos0000644000265600020320000000224512264261473020501 0ustar andreasadmin*model = bsim3v3 *Berkeley Spice Compatibility * Lmin= .35 Lmax= 20 Wmin= .6 Wmax= 20 .model N1 NMOS +Level= 8 version=3.2.2 +Tnom=27.0 +Nch= 2.498E+17 Tox=9E-09 Xj=1.00000E-07 +Lint=9.36e-8 Wint=1.47e-7 +Vth0= .6322 K1= .756 K2= -3.83e-2 K3= -2.612 +Dvt0= 2.812 Dvt1= 0.462 Dvt2=-9.17e-2 +Nlx= 3.52291E-08 W0= 1.163e-6 +K3b= 2.233 +Vsat= 86301.58 Ua= 6.47e-9 Ub= 4.23e-18 Uc=-4.706281E-11 +Rdsw= 650 U0= 388.3203 wr=1 +A0= .3496967 Ags=.1 B0=0.546 B1= 1 + Dwg = -6.0E-09 Dwb = -3.56E-09 Prwb = -.213 +Keta=-3.605872E-02 A1= 2.778747E-02 A2= .9 +Voff=-6.735529E-02 NFactor= 1.139926 Cit= 1.622527E-04 +Cdsc=-2.147181E-05 +Cdscb= 0 Dvt0w = 0 Dvt1w = 0 Dvt2w = 0 + Cdscd = 0 Prwg = 0 +Eta0= 1.0281729E-02 Etab=-5.042203E-03 +Dsub= .31871233 +Pclm= 1.114846 Pdiblc1= 2.45357E-03 Pdiblc2= 6.406289E-03 +Drout= .31871233 Pscbe1= 5000000 Pscbe2= 5E-09 Pdiblcb = -.234 +Pvag= 0 delta=0.01 + Wl = 0 Ww = -1.420242E-09 Wwl = 0 + Wln = 0 Wwn = .2613948 Ll = 1.300902E-10 + Lw = 0 Lwl = 0 Lln = .316394 + Lwn = 0 +kt1=-.3 kt2=-.051 +At= 22400 +Ute=-1.48 +Ua1= 3.31E-10 Ub1= 2.61E-19 Uc1= -3.42e-10 +Kt1l=0 Prt=764.3 ngspice-26/tests/bsim3/dc_sim/Makefile.am0000644000265600020320000000075512264261473017711 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ test1.cir \ test2.cir \ test3.cir \ test4.cir \ test5.cir \ test6.cir \ test7.cir \ test8.cir \ test9.cir \ test10.cir \ test11.cir \ test12.cir \ test13.cir \ test14.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ modelcard.nmos \ modelcard.pmos \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3/dc_sim/test9.cir0000644000265600020320000000047012264261473017416 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** ****************************************** *** circuit description *** m1 2 1 0 0 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -3.5 .dc vds 0 -3.5 -0.05 vgs 0 -3.5 -0.5 .options Temp=-55 noacct .print dc v(1) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test2.cir0000644000265600020320000000043212264261473017405 0ustar andreasadmin*****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** *** circuit description *** m1 2 1 0 0 n1 L=0.35u W=10.0u vgs 1 0 3.5 vds 2 0 3.5 .dc vds 0 3.5 0.05 vgs 0 3.5 0.5 .options Temp=-55.0 noacct .print dc v(1) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test6.out0000644000265600020320000005475512264261473017464 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Date: Tue Apr 20 23:13:45 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** DCtransferCurve Tue Apr 20 23:13:44 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e-01 -1.63421e-11 1 5.000000e-02 1.000000e-01 -9.56793e-11 2 1.000000e-01 1.000000e-01 -5.60403e-10 3 1.500000e-01 1.000000e-01 -3.25214e-09 4 2.000000e-01 1.000000e-01 -1.84515e-08 5 2.500000e-01 1.000000e-01 -9.99106e-08 6 3.000000e-01 1.000000e-01 -5.00074e-07 7 3.500000e-01 1.000000e-01 -2.25866e-06 8 4.000000e-01 1.000000e-01 -8.70351e-06 9 4.500000e-01 1.000000e-01 -2.52818e-05 10 5.000000e-01 1.000000e-01 -5.31381e-05 11 5.500000e-01 1.000000e-01 -8.69595e-05 12 6.000000e-01 1.000000e-01 -1.21579e-04 13 6.500000e-01 1.000000e-01 -1.54817e-04 14 7.000000e-01 1.000000e-01 -1.86139e-04 15 7.500000e-01 1.000000e-01 -2.15535e-04 16 8.000000e-01 1.000000e-01 -2.43125e-04 17 8.500000e-01 1.000000e-01 -2.69043e-04 18 9.000000e-01 1.000000e-01 -2.93418e-04 19 9.500000e-01 1.000000e-01 -3.16369e-04 20 1.000000e+00 1.000000e-01 -3.38001e-04 21 1.050000e+00 1.000000e-01 -3.58413e-04 22 1.100000e+00 1.000000e-01 -3.77694e-04 23 1.150000e+00 1.000000e-01 -3.95925e-04 24 1.200000e+00 1.000000e-01 -4.13181e-04 25 1.250000e+00 1.000000e-01 -4.29531e-04 26 1.300000e+00 1.000000e-01 -4.45037e-04 27 1.350000e+00 1.000000e-01 -4.59755e-04 28 1.400000e+00 1.000000e-01 -4.73738e-04 29 1.450000e+00 1.000000e-01 -4.87034e-04 30 1.500000e+00 1.000000e-01 -4.99687e-04 31 1.550000e+00 1.000000e-01 -5.11737e-04 32 1.600000e+00 1.000000e-01 -5.23222e-04 33 1.650000e+00 1.000000e-01 -5.34175e-04 34 1.700000e+00 1.000000e-01 -5.44629e-04 35 1.750000e+00 1.000000e-01 -5.54612e-04 36 1.800000e+00 1.000000e-01 -5.64151e-04 37 1.850000e+00 1.000000e-01 -5.73272e-04 38 1.900000e+00 1.000000e-01 -5.81998e-04 39 1.950000e+00 1.000000e-01 -5.90350e-04 40 2.000000e+00 1.000000e-01 -5.98348e-04 41 2.050000e+00 1.000000e-01 -6.06011e-04 42 2.100000e+00 1.000000e-01 -6.13356e-04 43 2.150000e+00 1.000000e-01 -6.20400e-04 44 2.200000e+00 1.000000e-01 -6.27158e-04 45 2.250000e+00 1.000000e-01 -6.33643e-04 46 2.300000e+00 1.000000e-01 -6.39870e-04 47 2.350000e+00 1.000000e-01 -6.45851e-04 48 2.400000e+00 1.000000e-01 -6.51596e-04 49 2.450000e+00 1.000000e-01 -6.57118e-04 50 2.500000e+00 1.000000e-01 -6.62427e-04 51 2.550000e+00 1.000000e-01 -6.67532e-04 52 2.600000e+00 1.000000e-01 -6.72443e-04 53 2.650000e+00 1.000000e-01 -6.77167e-04 54 2.700000e+00 1.000000e-01 -6.81714e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 1.000000e-01 -6.86090e-04 56 2.800000e+00 1.000000e-01 -6.90304e-04 57 2.850000e+00 1.000000e-01 -6.94361e-04 58 2.900000e+00 1.000000e-01 -6.98269e-04 59 2.950000e+00 1.000000e-01 -7.02033e-04 60 3.000000e+00 1.000000e-01 -7.05660e-04 61 3.050000e+00 1.000000e-01 -7.09154e-04 62 3.100000e+00 1.000000e-01 -7.12522e-04 63 3.150000e+00 1.000000e-01 -7.15768e-04 64 3.200000e+00 1.000000e-01 -7.18896e-04 65 3.250000e+00 1.000000e-01 -7.21912e-04 66 3.300000e+00 1.000000e-01 -7.24819e-04 67 3.350000e+00 1.000000e-01 -7.27622e-04 68 3.400000e+00 1.000000e-01 -7.30324e-04 69 3.450000e+00 1.000000e-01 -7.32929e-04 70 3.500000e+00 1.000000e-01 -7.35441e-04 71 0.000000e+00 1.000000e-01 -9.56648e-13 72 5.000000e-02 1.000000e-01 -2.91793e-12 73 1.000000e-01 1.000000e-01 -1.59627e-11 74 1.500000e-01 1.000000e-01 -1.02514e-10 75 2.000000e-01 1.000000e-01 -6.73227e-10 76 2.500000e-01 1.000000e-01 -4.37874e-09 77 3.000000e-01 1.000000e-01 -2.75746e-08 78 3.500000e-01 1.000000e-01 -1.62160e-07 79 4.000000e-01 1.000000e-01 -8.53523e-07 80 4.500000e-01 1.000000e-01 -3.88187e-06 81 5.000000e-01 1.000000e-01 -1.38737e-05 82 5.500000e-01 1.000000e-01 -3.51491e-05 83 6.000000e-01 1.000000e-01 -6.51879e-05 84 6.500000e-01 1.000000e-01 -9.81391e-05 85 7.000000e-01 1.000000e-01 -1.30651e-04 86 7.500000e-01 1.000000e-01 -1.61661e-04 87 8.000000e-01 1.000000e-01 -1.90968e-04 88 8.500000e-01 1.000000e-01 -2.18607e-04 89 9.000000e-01 1.000000e-01 -2.44674e-04 90 9.500000e-01 1.000000e-01 -2.69274e-04 91 1.000000e+00 1.000000e-01 -2.92505e-04 92 1.050000e+00 1.000000e-01 -3.14463e-04 93 1.100000e+00 1.000000e-01 -3.35236e-04 94 1.150000e+00 1.000000e-01 -3.54905e-04 95 1.200000e+00 1.000000e-01 -3.73547e-04 96 1.250000e+00 1.000000e-01 -3.91230e-04 97 1.300000e+00 1.000000e-01 -4.08020e-04 98 1.350000e+00 1.000000e-01 -4.23974e-04 99 1.400000e+00 1.000000e-01 -4.39147e-04 100 1.450000e+00 1.000000e-01 -4.53590e-04 101 1.500000e+00 1.000000e-01 -4.67347e-04 102 1.550000e+00 1.000000e-01 -4.80462e-04 103 1.600000e+00 1.000000e-01 -4.92972e-04 104 1.650000e+00 1.000000e-01 -5.04915e-04 105 1.700000e+00 1.000000e-01 -5.16323e-04 106 1.750000e+00 1.000000e-01 -5.27227e-04 107 1.800000e+00 1.000000e-01 -5.37656e-04 108 1.850000e+00 1.000000e-01 -5.47635e-04 109 1.900000e+00 1.000000e-01 -5.57191e-04 110 1.950000e+00 1.000000e-01 -5.66345e-04 111 2.000000e+00 1.000000e-01 -5.75118e-04 112 2.050000e+00 1.000000e-01 -5.83531e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 1.000000e-01 -5.91603e-04 114 2.150000e+00 1.000000e-01 -5.99349e-04 115 2.200000e+00 1.000000e-01 -6.06787e-04 116 2.250000e+00 1.000000e-01 -6.13931e-04 117 2.300000e+00 1.000000e-01 -6.20796e-04 118 2.350000e+00 1.000000e-01 -6.27396e-04 119 2.400000e+00 1.000000e-01 -6.33741e-04 120 2.450000e+00 1.000000e-01 -6.39845e-04 121 2.500000e+00 1.000000e-01 -6.45718e-04 122 2.550000e+00 1.000000e-01 -6.51371e-04 123 2.600000e+00 1.000000e-01 -6.56813e-04 124 2.650000e+00 1.000000e-01 -6.62054e-04 125 2.700000e+00 1.000000e-01 -6.67102e-04 126 2.750000e+00 1.000000e-01 -6.71965e-04 127 2.800000e+00 1.000000e-01 -6.76652e-04 128 2.850000e+00 1.000000e-01 -6.81169e-04 129 2.900000e+00 1.000000e-01 -6.85524e-04 130 2.950000e+00 1.000000e-01 -6.89724e-04 131 3.000000e+00 1.000000e-01 -6.93774e-04 132 3.050000e+00 1.000000e-01 -6.97680e-04 133 3.100000e+00 1.000000e-01 -7.01448e-04 134 3.150000e+00 1.000000e-01 -7.05084e-04 135 3.200000e+00 1.000000e-01 -7.08592e-04 136 3.250000e+00 1.000000e-01 -7.11977e-04 137 3.300000e+00 1.000000e-01 -7.15244e-04 138 3.350000e+00 1.000000e-01 -7.18398e-04 139 3.400000e+00 1.000000e-01 -7.21442e-04 140 3.450000e+00 1.000000e-01 -7.24380e-04 141 3.500000e+00 1.000000e-01 -7.27217e-04 142 0.000000e+00 1.000000e-01 -1.12347e-12 143 5.000000e-02 1.000000e-01 -1.15004e-12 144 1.000000e-01 1.000000e-01 -1.80516e-12 145 1.500000e-01 1.000000e-01 -6.10003e-12 146 2.000000e-01 1.000000e-01 -3.68771e-11 147 2.500000e-01 1.000000e-01 -2.56480e-10 148 3.000000e-01 1.000000e-01 -1.80585e-09 149 3.500000e-01 1.000000e-01 -1.24307e-08 150 4.000000e-01 1.000000e-01 -8.06851e-08 151 4.500000e-01 1.000000e-01 -4.69205e-07 152 5.000000e-01 1.000000e-01 -2.34343e-06 153 5.500000e-01 1.000000e-01 -9.37727e-06 154 6.000000e-01 1.000000e-01 -2.66971e-05 155 6.500000e-01 1.000000e-01 -5.38589e-05 156 7.000000e-01 1.000000e-01 -8.52358e-05 157 7.500000e-01 1.000000e-01 -1.16838e-04 158 8.000000e-01 1.000000e-01 -1.47255e-04 159 8.500000e-01 1.000000e-01 -1.76151e-04 160 9.000000e-01 1.000000e-01 -2.03509e-04 161 9.500000e-01 1.000000e-01 -2.29393e-04 162 1.000000e+00 1.000000e-01 -2.53888e-04 163 1.050000e+00 1.000000e-01 -2.77080e-04 164 1.100000e+00 1.000000e-01 -2.99053e-04 165 1.150000e+00 1.000000e-01 -3.19887e-04 166 1.200000e+00 1.000000e-01 -3.39656e-04 167 1.250000e+00 1.000000e-01 -3.58429e-04 168 1.300000e+00 1.000000e-01 -3.76273e-04 169 1.350000e+00 1.000000e-01 -3.93245e-04 170 1.400000e+00 1.000000e-01 -4.09402e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 1.000000e-01 -4.24794e-04 172 1.500000e+00 1.000000e-01 -4.39468e-04 173 1.550000e+00 1.000000e-01 -4.53469e-04 174 1.600000e+00 1.000000e-01 -4.66835e-04 175 1.650000e+00 1.000000e-01 -4.79605e-04 176 1.700000e+00 1.000000e-01 -4.91813e-04 177 1.750000e+00 1.000000e-01 -5.03490e-04 178 1.800000e+00 1.000000e-01 -5.14666e-04 179 1.850000e+00 1.000000e-01 -5.25369e-04 180 1.900000e+00 1.000000e-01 -5.35625e-04 181 1.950000e+00 1.000000e-01 -5.45456e-04 182 2.000000e+00 1.000000e-01 -5.54886e-04 183 2.050000e+00 1.000000e-01 -5.63934e-04 184 2.100000e+00 1.000000e-01 -5.72621e-04 185 2.150000e+00 1.000000e-01 -5.80964e-04 186 2.200000e+00 1.000000e-01 -5.88980e-04 187 2.250000e+00 1.000000e-01 -5.96685e-04 188 2.300000e+00 1.000000e-01 -6.04094e-04 189 2.350000e+00 1.000000e-01 -6.11221e-04 190 2.400000e+00 1.000000e-01 -6.18079e-04 191 2.450000e+00 1.000000e-01 -6.24680e-04 192 2.500000e+00 1.000000e-01 -6.31036e-04 193 2.550000e+00 1.000000e-01 -6.37158e-04 194 2.600000e+00 1.000000e-01 -6.43055e-04 195 2.650000e+00 1.000000e-01 -6.48739e-04 196 2.700000e+00 1.000000e-01 -6.54217e-04 197 2.750000e+00 1.000000e-01 -6.59499e-04 198 2.800000e+00 1.000000e-01 -6.64592e-04 199 2.850000e+00 1.000000e-01 -6.69506e-04 200 2.900000e+00 1.000000e-01 -6.74246e-04 201 2.950000e+00 1.000000e-01 -6.78820e-04 202 3.000000e+00 1.000000e-01 -6.83234e-04 203 3.050000e+00 1.000000e-01 -6.87496e-04 204 3.100000e+00 1.000000e-01 -6.91610e-04 205 3.150000e+00 1.000000e-01 -6.95582e-04 206 3.200000e+00 1.000000e-01 -6.99418e-04 207 3.250000e+00 1.000000e-01 -7.03123e-04 208 3.300000e+00 1.000000e-01 -7.06702e-04 209 3.350000e+00 1.000000e-01 -7.10159e-04 210 3.400000e+00 1.000000e-01 -7.13499e-04 211 3.450000e+00 1.000000e-01 -7.16726e-04 212 3.500000e+00 1.000000e-01 -7.19845e-04 213 0.000000e+00 1.000000e-01 -1.61079e-12 214 5.000000e-02 1.000000e-01 -1.61239e-12 215 1.000000e-01 1.000000e-01 -1.65548e-12 216 1.500000e-01 1.000000e-01 -1.95469e-12 217 2.000000e-01 1.000000e-01 -4.22125e-12 218 2.500000e-01 1.000000e-01 -2.13682e-11 219 3.000000e-01 1.000000e-01 -1.50626e-10 220 3.500000e-01 1.000000e-01 -1.11565e-09 221 4.000000e-01 1.000000e-01 -8.14050e-09 222 4.500000e-01 1.000000e-01 -5.62492e-08 223 5.000000e-01 1.000000e-01 -3.48063e-07 224 5.500000e-01 1.000000e-01 -1.83379e-06 225 6.000000e-01 1.000000e-01 -7.74205e-06 226 6.500000e-01 1.000000e-01 -2.32697e-05 227 7.000000e-01 1.000000e-01 -4.88108e-05 228 7.500000e-01 1.000000e-01 -7.90092e-05 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 1.000000e-01 -1.09722e-04 230 8.500000e-01 1.000000e-01 -1.39437e-04 231 9.000000e-01 1.000000e-01 -1.67768e-04 232 9.500000e-01 1.000000e-01 -1.94669e-04 233 1.000000e+00 1.000000e-01 -2.20187e-04 234 1.050000e+00 1.000000e-01 -2.44392e-04 235 1.100000e+00 1.000000e-01 -2.67361e-04 236 1.150000e+00 1.000000e-01 -2.89168e-04 237 1.200000e+00 1.000000e-01 -3.09884e-04 238 1.250000e+00 1.000000e-01 -3.29580e-04 239 1.300000e+00 1.000000e-01 -3.48317e-04 240 1.350000e+00 1.000000e-01 -3.66157e-04 241 1.400000e+00 1.000000e-01 -3.83154e-04 242 1.450000e+00 1.000000e-01 -3.99360e-04 243 1.500000e+00 1.000000e-01 -4.14822e-04 244 1.550000e+00 1.000000e-01 -4.29586e-04 245 1.600000e+00 1.000000e-01 -4.43692e-04 246 1.650000e+00 1.000000e-01 -4.57177e-04 247 1.700000e+00 1.000000e-01 -4.70078e-04 248 1.750000e+00 1.000000e-01 -4.82426e-04 249 1.800000e+00 1.000000e-01 -4.94253e-04 250 1.850000e+00 1.000000e-01 -5.05586e-04 251 1.900000e+00 1.000000e-01 -5.16453e-04 252 1.950000e+00 1.000000e-01 -5.26876e-04 253 2.000000e+00 1.000000e-01 -5.36880e-04 254 2.050000e+00 1.000000e-01 -5.46485e-04 255 2.100000e+00 1.000000e-01 -5.55712e-04 256 2.150000e+00 1.000000e-01 -5.64579e-04 257 2.200000e+00 1.000000e-01 -5.73103e-04 258 2.250000e+00 1.000000e-01 -5.81302e-04 259 2.300000e+00 1.000000e-01 -5.89191e-04 260 2.350000e+00 1.000000e-01 -5.96783e-04 261 2.400000e+00 1.000000e-01 -6.04093e-04 262 2.450000e+00 1.000000e-01 -6.11134e-04 263 2.500000e+00 1.000000e-01 -6.17917e-04 264 2.550000e+00 1.000000e-01 -6.24453e-04 265 2.600000e+00 1.000000e-01 -6.30755e-04 266 2.650000e+00 1.000000e-01 -6.36831e-04 267 2.700000e+00 1.000000e-01 -6.42691e-04 268 2.750000e+00 1.000000e-01 -6.48344e-04 269 2.800000e+00 1.000000e-01 -6.53800e-04 270 2.850000e+00 1.000000e-01 -6.59065e-04 271 2.900000e+00 1.000000e-01 -6.64148e-04 272 2.950000e+00 1.000000e-01 -6.69055e-04 273 3.000000e+00 1.000000e-01 -6.73795e-04 274 3.050000e+00 1.000000e-01 -6.78373e-04 275 3.100000e+00 1.000000e-01 -6.82795e-04 276 3.150000e+00 1.000000e-01 -6.87068e-04 277 3.200000e+00 1.000000e-01 -6.91197e-04 278 3.250000e+00 1.000000e-01 -6.95188e-04 279 3.300000e+00 1.000000e-01 -6.99045e-04 280 3.350000e+00 1.000000e-01 -7.02774e-04 281 3.400000e+00 1.000000e-01 -7.06378e-04 282 3.450000e+00 1.000000e-01 -7.09864e-04 283 3.500000e+00 1.000000e-01 -7.13234e-04 284 0.000000e+00 1.000000e-01 -2.11006e-12 285 5.000000e-02 1.000000e-01 -2.11019e-12 286 1.000000e-01 1.000000e-01 -2.11393e-12 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 287 1.500000e-01 1.000000e-01 -2.14107e-12 288 2.000000e-01 1.000000e-01 -2.35532e-12 289 2.500000e-01 1.000000e-01 -4.04616e-12 290 3.000000e-01 1.000000e-01 -1.73737e-11 291 3.500000e-01 1.000000e-01 -1.22066e-10 292 4.000000e-01 1.000000e-01 -9.36760e-10 293 4.500000e-01 1.000000e-01 -7.11843e-09 294 5.000000e-01 1.000000e-01 -5.11820e-08 295 5.500000e-01 1.000000e-01 -3.27712e-07 296 6.000000e-01 1.000000e-01 -1.76758e-06 297 6.500000e-01 1.000000e-01 -7.56011e-06 298 7.000000e-01 1.000000e-01 -2.28280e-05 299 7.500000e-01 1.000000e-01 -4.78355e-05 300 8.000000e-01 1.000000e-01 -7.72638e-05 301 8.500000e-01 1.000000e-01 -1.07172e-04 302 9.000000e-01 1.000000e-01 -1.36152e-04 303 9.500000e-01 1.000000e-01 -1.63843e-04 304 1.000000e+00 1.000000e-01 -1.90194e-04 305 1.050000e+00 1.000000e-01 -2.15244e-04 306 1.100000e+00 1.000000e-01 -2.39053e-04 307 1.150000e+00 1.000000e-01 -2.61690e-04 308 1.200000e+00 1.000000e-01 -2.83220e-04 309 1.250000e+00 1.000000e-01 -3.03710e-04 310 1.300000e+00 1.000000e-01 -3.23223e-04 311 1.350000e+00 1.000000e-01 -3.41818e-04 312 1.400000e+00 1.000000e-01 -3.59549e-04 313 1.450000e+00 1.000000e-01 -3.76468e-04 314 1.500000e+00 1.000000e-01 -3.92623e-04 315 1.550000e+00 1.000000e-01 -4.08059e-04 316 1.600000e+00 1.000000e-01 -4.22817e-04 317 1.650000e+00 1.000000e-01 -4.36935e-04 318 1.700000e+00 1.000000e-01 -4.50450e-04 319 1.750000e+00 1.000000e-01 -4.63395e-04 320 1.800000e+00 1.000000e-01 -4.75800e-04 321 1.850000e+00 1.000000e-01 -4.87694e-04 322 1.900000e+00 1.000000e-01 -4.99105e-04 323 1.950000e+00 1.000000e-01 -5.10057e-04 324 2.000000e+00 1.000000e-01 -5.20575e-04 325 2.050000e+00 1.000000e-01 -5.30678e-04 326 2.100000e+00 1.000000e-01 -5.40389e-04 327 2.150000e+00 1.000000e-01 -5.49727e-04 328 2.200000e+00 1.000000e-01 -5.58709e-04 329 2.250000e+00 1.000000e-01 -5.67352e-04 330 2.300000e+00 1.000000e-01 -5.75672e-04 331 2.350000e+00 1.000000e-01 -5.83684e-04 332 2.400000e+00 1.000000e-01 -5.91402e-04 333 2.450000e+00 1.000000e-01 -5.98839e-04 334 2.500000e+00 1.000000e-01 -6.06008e-04 335 2.550000e+00 1.000000e-01 -6.12921e-04 336 2.600000e+00 1.000000e-01 -6.19587e-04 337 2.650000e+00 1.000000e-01 -6.26019e-04 338 2.700000e+00 1.000000e-01 -6.32225e-04 339 2.750000e+00 1.000000e-01 -6.38216e-04 340 2.800000e+00 1.000000e-01 -6.44000e-04 341 2.850000e+00 1.000000e-01 -6.49584e-04 342 2.900000e+00 1.000000e-01 -6.54979e-04 343 2.950000e+00 1.000000e-01 -6.60190e-04 344 3.000000e+00 1.000000e-01 -6.65225e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 345 3.050000e+00 1.000000e-01 -6.70091e-04 346 3.100000e+00 1.000000e-01 -6.74795e-04 347 3.150000e+00 1.000000e-01 -6.79341e-04 348 3.200000e+00 1.000000e-01 -6.83738e-04 349 3.250000e+00 1.000000e-01 -6.87989e-04 350 3.300000e+00 1.000000e-01 -6.92100e-04 351 3.350000e+00 1.000000e-01 -6.96077e-04 352 3.400000e+00 1.000000e-01 -6.99924e-04 353 3.450000e+00 1.000000e-01 -7.03646e-04 354 3.500000e+00 1.000000e-01 -7.07246e-04 355 0.000000e+00 1.000000e-01 -2.61001e-12 356 5.000000e-02 1.000000e-01 -2.61002e-12 357 1.000000e-01 1.000000e-01 -2.61042e-12 358 1.500000e-01 1.000000e-01 -2.61346e-12 359 2.000000e-01 1.000000e-01 -2.63823e-12 360 2.500000e-01 1.000000e-01 -2.84027e-12 361 3.000000e-01 1.000000e-01 -4.48763e-12 362 3.500000e-01 1.000000e-01 -1.79019e-11 363 4.000000e-01 1.000000e-01 -1.26736e-10 364 4.500000e-01 1.000000e-01 -1.00076e-09 365 5.000000e-01 1.000000e-01 -7.82769e-09 366 5.500000e-01 1.000000e-01 -5.75876e-08 367 6.000000e-01 1.000000e-01 -3.72971e-07 368 6.500000e-01 1.000000e-01 -2.00813e-06 369 7.000000e-01 1.000000e-01 -8.41881e-06 370 7.500000e-01 1.000000e-01 -2.45380e-05 371 8.000000e-01 1.000000e-01 -4.97602e-05 372 8.500000e-01 1.000000e-01 -7.86938e-05 373 9.000000e-01 1.000000e-01 -1.07867e-04 374 9.500000e-01 1.000000e-01 -1.36110e-04 375 1.000000e+00 1.000000e-01 -1.63128e-04 376 1.050000e+00 1.000000e-01 -1.88882e-04 377 1.100000e+00 1.000000e-01 -2.13407e-04 378 1.150000e+00 1.000000e-01 -2.36759e-04 379 1.200000e+00 1.000000e-01 -2.58997e-04 380 1.250000e+00 1.000000e-01 -2.80183e-04 381 1.300000e+00 1.000000e-01 -3.00379e-04 382 1.350000e+00 1.000000e-01 -3.19640e-04 383 1.400000e+00 1.000000e-01 -3.38022e-04 384 1.450000e+00 1.000000e-01 -3.55575e-04 385 1.500000e+00 1.000000e-01 -3.72348e-04 386 1.550000e+00 1.000000e-01 -3.88385e-04 387 1.600000e+00 1.000000e-01 -4.03727e-04 388 1.650000e+00 1.000000e-01 -4.18414e-04 389 1.700000e+00 1.000000e-01 -4.32482e-04 390 1.750000e+00 1.000000e-01 -4.45964e-04 391 1.800000e+00 1.000000e-01 -4.58891e-04 392 1.850000e+00 1.000000e-01 -4.71293e-04 393 1.900000e+00 1.000000e-01 -4.83198e-04 394 1.950000e+00 1.000000e-01 -4.94630e-04 395 2.000000e+00 1.000000e-01 -5.05613e-04 396 2.050000e+00 1.000000e-01 -5.16170e-04 397 2.100000e+00 1.000000e-01 -5.26322e-04 398 2.150000e+00 1.000000e-01 -5.36089e-04 399 2.200000e+00 1.000000e-01 -5.45487e-04 400 2.250000e+00 1.000000e-01 -5.54536e-04 401 2.300000e+00 1.000000e-01 -5.63251e-04 402 2.350000e+00 1.000000e-01 -5.71647e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 403 2.400000e+00 1.000000e-01 -5.79739e-04 404 2.450000e+00 1.000000e-01 -5.87540e-04 405 2.500000e+00 1.000000e-01 -5.95063e-04 406 2.550000e+00 1.000000e-01 -6.02320e-04 407 2.600000e+00 1.000000e-01 -6.09323e-04 408 2.650000e+00 1.000000e-01 -6.16081e-04 409 2.700000e+00 1.000000e-01 -6.22606e-04 410 2.750000e+00 1.000000e-01 -6.28907e-04 411 2.800000e+00 1.000000e-01 -6.34993e-04 412 2.850000e+00 1.000000e-01 -6.40873e-04 413 2.900000e+00 1.000000e-01 -6.46555e-04 414 2.950000e+00 1.000000e-01 -6.52046e-04 415 3.000000e+00 1.000000e-01 -6.57354e-04 416 3.050000e+00 1.000000e-01 -6.62487e-04 417 3.100000e+00 1.000000e-01 -6.67450e-04 418 3.150000e+00 1.000000e-01 -6.72250e-04 419 3.200000e+00 1.000000e-01 -6.76894e-04 420 3.250000e+00 1.000000e-01 -6.81386e-04 421 3.300000e+00 1.000000e-01 -6.85733e-04 422 3.350000e+00 1.000000e-01 -6.89940e-04 423 3.400000e+00 1.000000e-01 -6.94011e-04 424 3.450000e+00 1.000000e-01 -6.97952e-04 425 3.500000e+00 1.000000e-01 -7.01766e-04 426 0.000000e+00 1.000000e-01 -3.11000e-12 427 5.000000e-02 1.000000e-01 -3.11000e-12 428 1.000000e-01 1.000000e-01 -3.11005e-12 429 1.500000e-01 1.000000e-01 -3.11046e-12 430 2.000000e-01 1.000000e-01 -3.11384e-12 431 2.500000e-01 1.000000e-01 -3.14215e-12 432 3.000000e-01 1.000000e-01 -3.37941e-12 433 3.500000e-01 1.000000e-01 -5.36638e-12 434 4.000000e-01 1.000000e-01 -2.19821e-11 435 4.500000e-01 1.000000e-01 -1.60337e-10 436 5.000000e-01 1.000000e-01 -1.29853e-09 437 5.500000e-01 1.000000e-01 -1.03576e-08 438 6.000000e-01 1.000000e-01 -7.68170e-08 439 6.500000e-01 1.000000e-01 -4.93035e-07 440 7.000000e-01 1.000000e-01 -2.58978e-06 441 7.500000e-01 1.000000e-01 -1.03200e-05 442 8.000000e-01 1.000000e-01 -2.81004e-05 443 8.500000e-01 1.000000e-01 -5.39172e-05 444 9.000000e-01 1.000000e-01 -8.24709e-05 445 9.500000e-01 1.000000e-01 -1.10944e-04 446 1.000000e+00 1.000000e-01 -1.38455e-04 447 1.050000e+00 1.000000e-01 -1.64789e-04 448 1.100000e+00 1.000000e-01 -1.89924e-04 449 1.150000e+00 1.000000e-01 -2.13896e-04 450 1.200000e+00 1.000000e-01 -2.36754e-04 451 1.250000e+00 1.000000e-01 -2.58556e-04 452 1.300000e+00 1.000000e-01 -2.79358e-04 453 1.350000e+00 1.000000e-01 -2.99215e-04 454 1.400000e+00 1.000000e-01 -3.18180e-04 455 1.450000e+00 1.000000e-01 -3.36304e-04 456 1.500000e+00 1.000000e-01 -3.53634e-04 457 1.550000e+00 1.000000e-01 -3.70215e-04 458 1.600000e+00 1.000000e-01 -3.86087e-04 459 1.650000e+00 1.000000e-01 -4.01291e-04 460 1.700000e+00 1.000000e-01 -4.15861e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 461 1.750000e+00 1.000000e-01 -4.29833e-04 462 1.800000e+00 1.000000e-01 -4.43237e-04 463 1.850000e+00 1.000000e-01 -4.56104e-04 464 1.900000e+00 1.000000e-01 -4.68460e-04 465 1.950000e+00 1.000000e-01 -4.80332e-04 466 2.000000e+00 1.000000e-01 -4.91744e-04 467 2.050000e+00 1.000000e-01 -5.02718e-04 468 2.100000e+00 1.000000e-01 -5.13276e-04 469 2.150000e+00 1.000000e-01 -5.23437e-04 470 2.200000e+00 1.000000e-01 -5.33221e-04 471 2.250000e+00 1.000000e-01 -5.42644e-04 472 2.300000e+00 1.000000e-01 -5.51724e-04 473 2.350000e+00 1.000000e-01 -5.60475e-04 474 2.400000e+00 1.000000e-01 -5.68913e-04 475 2.450000e+00 1.000000e-01 -5.77052e-04 476 2.500000e+00 1.000000e-01 -5.84903e-04 477 2.550000e+00 1.000000e-01 -5.92481e-04 478 2.600000e+00 1.000000e-01 -5.99795e-04 479 2.650000e+00 1.000000e-01 -6.06858e-04 480 2.700000e+00 1.000000e-01 -6.13679e-04 481 2.750000e+00 1.000000e-01 -6.20269e-04 482 2.800000e+00 1.000000e-01 -6.26637e-04 483 2.850000e+00 1.000000e-01 -6.32791e-04 484 2.900000e+00 1.000000e-01 -6.38741e-04 485 2.950000e+00 1.000000e-01 -6.44494e-04 486 3.000000e+00 1.000000e-01 -6.50057e-04 487 3.050000e+00 1.000000e-01 -6.55438e-04 488 3.100000e+00 1.000000e-01 -6.60644e-04 489 3.150000e+00 1.000000e-01 -6.65682e-04 490 3.200000e+00 1.000000e-01 -6.70557e-04 491 3.250000e+00 1.000000e-01 -6.75275e-04 492 3.300000e+00 1.000000e-01 -6.79842e-04 493 3.350000e+00 1.000000e-01 -6.84264e-04 494 3.400000e+00 1.000000e-01 -6.88545e-04 495 3.450000e+00 1.000000e-01 -6.92691e-04 496 3.500000e+00 1.000000e-01 -6.96706e-04 Total run time: 0.940 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/Makefile.in0000644000265600020320000003412112264261541017710 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3/dc_sim DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ test1.cir \ test2.cir \ test3.cir \ test4.cir \ test5.cir \ test6.cir \ test7.cir \ test8.cir \ test9.cir \ test10.cir \ test11.cir \ test12.cir \ test13.cir \ test14.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ modelcard.nmos \ modelcard.pmos \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3/dc_sim/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3/dc_sim/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3/dc_sim/test4.cir0000644000265600020320000000045312264261473017412 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** ****************************************** *** circuit description *** m1 2 1 0 0 n1 L=0.35u W=10.0u vgs 1 0 3.5 vds 2 0 3.5 .options noacct .dc vgs 0 3.5 0.05 vds 0.1 3.1 1 .print dc v(2) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test5.cir0000644000265600020320000000047312264261473017415 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 n1 L=0.35u W=10.0u vgs 1 0 3.5 vbs 3 0 0 vds 2 0 0.1 .dc vgs 0 3.5 0.05 vbs 0.0 -3. -0.5 .options noacct .print dc v(2) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test6.cir0000644000265600020320000000050112264261473017406 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** ****************************************** *** circuit description *** m1 2 1 0 3 n1 L=0.35u W=10.0u vgs 1 0 3.5 vbs 3 0 0 vds 2 0 0.1 .dc vgs 0 3.5 0.05 vbs 0.0 -3. -0.5 .options Temp=-55.0 noacct .print dc v(2) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test10.out0000644000265600020320000006432312264261473017527 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** Date: Tue Apr 20 23:15:04 1999 *** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** DCtransferCurve Tue Apr 20 23:15:03 1999 -------------------------------------------------------------------------------- Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 -5.00000e-02 0.000000e+00 3.381671e-11 2 -1.00000e-01 0.000000e+00 4.206341e-11 3 -1.50000e-01 0.000000e+00 4.634567e-11 4 -2.00000e-01 0.000000e+00 5.037270e-11 5 -2.50000e-01 0.000000e+00 5.456218e-11 6 -3.00000e-01 0.000000e+00 5.901344e-11 7 -3.50000e-01 0.000000e+00 6.377363e-11 8 -4.00000e-01 0.000000e+00 6.887756e-11 9 -4.50000e-01 0.000000e+00 7.435695e-11 10 -5.00000e-01 0.000000e+00 8.024347e-11 11 -5.50000e-01 0.000000e+00 8.656988e-11 12 -6.00000e-01 0.000000e+00 9.337071e-11 13 -6.50000e-01 0.000000e+00 1.006826e-10 14 -7.00000e-01 0.000000e+00 1.085447e-10 15 -7.50000e-01 0.000000e+00 1.169987e-10 16 -8.00000e-01 0.000000e+00 1.260894e-10 17 -8.50000e-01 0.000000e+00 1.358648e-10 18 -9.00000e-01 0.000000e+00 1.463762e-10 19 -9.50000e-01 0.000000e+00 1.576788e-10 20 -1.00000e+00 0.000000e+00 1.698317e-10 21 -1.05000e+00 0.000000e+00 1.828982e-10 22 -1.10000e+00 0.000000e+00 1.969465e-10 23 -1.15000e+00 0.000000e+00 2.120493e-10 24 -1.20000e+00 0.000000e+00 2.282851e-10 25 -1.25000e+00 0.000000e+00 2.457376e-10 26 -1.30000e+00 0.000000e+00 2.644970e-10 27 -1.35000e+00 0.000000e+00 2.846597e-10 28 -1.40000e+00 0.000000e+00 3.063293e-10 29 -1.45000e+00 0.000000e+00 3.296168e-10 30 -1.50000e+00 0.000000e+00 3.546412e-10 31 -1.55000e+00 0.000000e+00 3.815301e-10 32 -1.60000e+00 0.000000e+00 4.104203e-10 33 -1.65000e+00 0.000000e+00 4.414584e-10 34 -1.70000e+00 0.000000e+00 4.748017e-10 35 -1.75000e+00 0.000000e+00 5.106186e-10 36 -1.80000e+00 0.000000e+00 5.490897e-10 37 -1.85000e+00 0.000000e+00 5.904083e-10 38 -1.90000e+00 0.000000e+00 6.347817e-10 39 -1.95000e+00 0.000000e+00 6.824321e-10 40 -2.00000e+00 0.000000e+00 7.335972e-10 41 -2.05000e+00 0.000000e+00 7.885319e-10 42 -2.10000e+00 0.000000e+00 8.475091e-10 43 -2.15000e+00 0.000000e+00 9.108210e-10 44 -2.20000e+00 0.000000e+00 9.787806e-10 45 -2.25000e+00 0.000000e+00 1.051723e-09 46 -2.30000e+00 0.000000e+00 1.130007e-09 47 -2.35000e+00 0.000000e+00 1.214016e-09 48 -2.40000e+00 0.000000e+00 1.304162e-09 49 -2.45000e+00 0.000000e+00 1.400884e-09 50 -2.50000e+00 0.000000e+00 1.504653e-09 51 -2.55000e+00 0.000000e+00 1.615974e-09 52 -2.60000e+00 0.000000e+00 1.735383e-09 53 -2.65000e+00 0.000000e+00 1.863460e-09 54 -2.70000e+00 0.000000e+00 2.000819e-09 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 55 -2.75000e+00 0.000000e+00 2.148120e-09 56 -2.80000e+00 0.000000e+00 2.306070e-09 57 -2.85000e+00 0.000000e+00 2.475421e-09 58 -2.90000e+00 0.000000e+00 2.656980e-09 59 -2.95000e+00 0.000000e+00 2.851610e-09 60 -3.00000e+00 0.000000e+00 3.060230e-09 61 -3.05000e+00 0.000000e+00 3.283827e-09 62 -3.10000e+00 0.000000e+00 3.523452e-09 63 -3.15000e+00 0.000000e+00 3.780229e-09 64 -3.20000e+00 0.000000e+00 4.055360e-09 65 -3.25000e+00 0.000000e+00 4.350127e-09 66 -3.30000e+00 0.000000e+00 4.665901e-09 67 -3.35000e+00 0.000000e+00 5.004144e-09 68 -3.40000e+00 0.000000e+00 5.366419e-09 69 -3.45000e+00 0.000000e+00 5.754395e-09 70 -3.50000e+00 0.000000e+00 6.169851e-09 71 0.000000e+00 -5.00000e-01 0.000000e+00 72 -5.00000e-02 -5.00000e-01 5.047917e-07 73 -1.00000e-01 -5.00000e-01 6.534541e-07 74 -1.50000e-01 -5.00000e-01 7.171716e-07 75 -2.00000e-01 -5.00000e-01 7.718087e-07 76 -2.50000e-01 -5.00000e-01 8.269116e-07 77 -3.00000e-01 -5.00000e-01 8.843611e-07 78 -3.50000e-01 -5.00000e-01 9.448315e-07 79 -4.00000e-01 -5.00000e-01 1.008707e-06 80 -4.50000e-01 -5.00000e-01 1.076283e-06 81 -5.00000e-01 -5.00000e-01 1.147819e-06 82 -5.50000e-01 -5.00000e-01 1.223569e-06 83 -6.00000e-01 -5.00000e-01 1.303780e-06 84 -6.50000e-01 -5.00000e-01 1.388707e-06 85 -7.00000e-01 -5.00000e-01 1.478608e-06 86 -7.50000e-01 -5.00000e-01 1.573747e-06 87 -8.00000e-01 -5.00000e-01 1.674397e-06 88 -8.50000e-01 -5.00000e-01 1.780839e-06 89 -9.00000e-01 -5.00000e-01 1.893361e-06 90 -9.50000e-01 -5.00000e-01 2.012261e-06 91 -1.00000e+00 -5.00000e-01 2.137843e-06 92 -1.05000e+00 -5.00000e-01 2.270423e-06 93 -1.10000e+00 -5.00000e-01 2.410323e-06 94 -1.15000e+00 -5.00000e-01 2.557873e-06 95 -1.20000e+00 -5.00000e-01 2.713412e-06 96 -1.25000e+00 -5.00000e-01 2.877286e-06 97 -1.30000e+00 -5.00000e-01 3.049848e-06 98 -1.35000e+00 -5.00000e-01 3.231460e-06 99 -1.40000e+00 -5.00000e-01 3.422487e-06 100 -1.45000e+00 -5.00000e-01 3.623303e-06 101 -1.50000e+00 -5.00000e-01 3.834287e-06 102 -1.55000e+00 -5.00000e-01 4.055822e-06 103 -1.60000e+00 -5.00000e-01 4.288298e-06 104 -1.65000e+00 -5.00000e-01 4.532105e-06 105 -1.70000e+00 -5.00000e-01 4.787641e-06 106 -1.75000e+00 -5.00000e-01 5.055302e-06 107 -1.80000e+00 -5.00000e-01 5.335491e-06 108 -1.85000e+00 -5.00000e-01 5.628607e-06 109 -1.90000e+00 -5.00000e-01 5.935055e-06 110 -1.95000e+00 -5.00000e-01 6.255236e-06 111 -2.00000e+00 -5.00000e-01 6.589552e-06 112 -2.05000e+00 -5.00000e-01 6.938404e-06 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 113 -2.10000e+00 -5.00000e-01 7.302189e-06 114 -2.15000e+00 -5.00000e-01 7.681303e-06 115 -2.20000e+00 -5.00000e-01 8.076137e-06 116 -2.25000e+00 -5.00000e-01 8.487079e-06 117 -2.30000e+00 -5.00000e-01 8.914512e-06 118 -2.35000e+00 -5.00000e-01 9.358811e-06 119 -2.40000e+00 -5.00000e-01 9.820348e-06 120 -2.45000e+00 -5.00000e-01 1.029949e-05 121 -2.50000e+00 -5.00000e-01 1.079658e-05 122 -2.55000e+00 -5.00000e-01 1.131199e-05 123 -2.60000e+00 -5.00000e-01 1.184603e-05 124 -2.65000e+00 -5.00000e-01 1.239906e-05 125 -2.70000e+00 -5.00000e-01 1.297138e-05 126 -2.75000e+00 -5.00000e-01 1.356331e-05 127 -2.80000e+00 -5.00000e-01 1.417515e-05 128 -2.85000e+00 -5.00000e-01 1.480718e-05 129 -2.90000e+00 -5.00000e-01 1.545970e-05 130 -2.95000e+00 -5.00000e-01 1.613296e-05 131 -3.00000e+00 -5.00000e-01 1.682722e-05 132 -3.05000e+00 -5.00000e-01 1.754273e-05 133 -3.10000e+00 -5.00000e-01 1.827972e-05 134 -3.15000e+00 -5.00000e-01 1.903841e-05 135 -3.20000e+00 -5.00000e-01 1.981900e-05 136 -3.25000e+00 -5.00000e-01 2.062170e-05 137 -3.30000e+00 -5.00000e-01 2.144669e-05 138 -3.35000e+00 -5.00000e-01 2.229414e-05 139 -3.40000e+00 -5.00000e-01 2.316422e-05 140 -3.45000e+00 -5.00000e-01 2.405706e-05 141 -3.50000e+00 -5.00000e-01 2.497280e-05 142 0.000000e+00 -1.00000e+00 0.000000e+00 143 -5.00000e-02 -1.00000e+00 2.328635e-05 144 -1.00000e-01 -1.00000e+00 4.390645e-05 145 -1.50000e-01 -1.00000e+00 6.190604e-05 146 -2.00000e-01 -1.00000e+00 7.733394e-05 147 -2.50000e-01 -1.00000e+00 9.024689e-05 148 -3.00000e-01 -1.00000e+00 1.007217e-04 149 -3.50000e-01 -1.00000e+00 1.088866e-04 150 -4.00000e-01 -1.00000e+00 1.149897e-04 151 -4.50000e-01 -1.00000e+00 1.194848e-04 152 -5.00000e-01 -1.00000e+00 1.229718e-04 153 -5.50000e-01 -1.00000e+00 1.259470e-04 154 -6.00000e-01 -1.00000e+00 1.286830e-04 155 -6.50000e-01 -1.00000e+00 1.313017e-04 156 -7.00000e-01 -1.00000e+00 1.338565e-04 157 -7.50000e-01 -1.00000e+00 1.363731e-04 158 -8.00000e-01 -1.00000e+00 1.388654e-04 159 -8.50000e-01 -1.00000e+00 1.413419e-04 160 -9.00000e-01 -1.00000e+00 1.438082e-04 161 -9.50000e-01 -1.00000e+00 1.462683e-04 162 -1.00000e+00 -1.00000e+00 1.487253e-04 163 -1.05000e+00 -1.00000e+00 1.511816e-04 164 -1.10000e+00 -1.00000e+00 1.536390e-04 165 -1.15000e+00 -1.00000e+00 1.560992e-04 166 -1.20000e+00 -1.00000e+00 1.585635e-04 167 -1.25000e+00 -1.00000e+00 1.610329e-04 168 -1.30000e+00 -1.00000e+00 1.635085e-04 169 -1.35000e+00 -1.00000e+00 1.659912e-04 170 -1.40000e+00 -1.00000e+00 1.684816e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 171 -1.45000e+00 -1.00000e+00 1.709805e-04 172 -1.50000e+00 -1.00000e+00 1.734885e-04 173 -1.55000e+00 -1.00000e+00 1.760060e-04 174 -1.60000e+00 -1.00000e+00 1.785336e-04 175 -1.65000e+00 -1.00000e+00 1.810718e-04 176 -1.70000e+00 -1.00000e+00 1.836208e-04 177 -1.75000e+00 -1.00000e+00 1.861812e-04 178 -1.80000e+00 -1.00000e+00 1.887531e-04 179 -1.85000e+00 -1.00000e+00 1.913370e-04 180 -1.90000e+00 -1.00000e+00 1.939331e-04 181 -1.95000e+00 -1.00000e+00 1.965416e-04 182 -2.00000e+00 -1.00000e+00 1.991628e-04 183 -2.05000e+00 -1.00000e+00 2.017969e-04 184 -2.10000e+00 -1.00000e+00 2.044442e-04 185 -2.15000e+00 -1.00000e+00 2.071047e-04 186 -2.20000e+00 -1.00000e+00 2.097787e-04 187 -2.25000e+00 -1.00000e+00 2.124663e-04 188 -2.30000e+00 -1.00000e+00 2.151677e-04 189 -2.35000e+00 -1.00000e+00 2.178830e-04 190 -2.40000e+00 -1.00000e+00 2.206124e-04 191 -2.45000e+00 -1.00000e+00 2.233560e-04 192 -2.50000e+00 -1.00000e+00 2.261139e-04 193 -2.55000e+00 -1.00000e+00 2.288862e-04 194 -2.60000e+00 -1.00000e+00 2.316729e-04 195 -2.65000e+00 -1.00000e+00 2.344744e-04 196 -2.70000e+00 -1.00000e+00 2.372905e-04 197 -2.75000e+00 -1.00000e+00 2.401214e-04 198 -2.80000e+00 -1.00000e+00 2.429672e-04 199 -2.85000e+00 -1.00000e+00 2.458279e-04 200 -2.90000e+00 -1.00000e+00 2.487036e-04 201 -2.95000e+00 -1.00000e+00 2.515945e-04 202 -3.00000e+00 -1.00000e+00 2.545005e-04 203 -3.05000e+00 -1.00000e+00 2.574218e-04 204 -3.10000e+00 -1.00000e+00 2.603583e-04 205 -3.15000e+00 -1.00000e+00 2.633102e-04 206 -3.20000e+00 -1.00000e+00 2.662775e-04 207 -3.25000e+00 -1.00000e+00 2.692603e-04 208 -3.30000e+00 -1.00000e+00 2.722586e-04 209 -3.35000e+00 -1.00000e+00 2.752724e-04 210 -3.40000e+00 -1.00000e+00 2.783019e-04 211 -3.45000e+00 -1.00000e+00 2.813470e-04 212 -3.50000e+00 -1.00000e+00 2.844078e-04 213 0.000000e+00 -1.50000e+00 0.000000e+00 214 -5.00000e-02 -1.50000e+00 4.590228e-05 215 -1.00000e-01 -1.50000e+00 8.901592e-05 216 -1.50000e-01 -1.50000e+00 1.293842e-04 217 -2.00000e-01 -1.50000e+00 1.670497e-04 218 -2.50000e-01 -1.50000e+00 2.020544e-04 219 -3.00000e-01 -1.50000e+00 2.344398e-04 220 -3.50000e-01 -1.50000e+00 2.642468e-04 221 -4.00000e-01 -1.50000e+00 2.915169e-04 222 -4.50000e-01 -1.50000e+00 3.162918e-04 223 -5.00000e-01 -1.50000e+00 3.386153e-04 224 -5.50000e-01 -1.50000e+00 3.585346e-04 225 -6.00000e-01 -1.50000e+00 3.761052e-04 226 -6.50000e-01 -1.50000e+00 3.913980e-04 227 -7.00000e-01 -1.50000e+00 4.045152e-04 228 -7.50000e-01 -1.50000e+00 4.156179e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 229 -8.00000e-01 -1.50000e+00 4.249618e-04 230 -8.50000e-01 -1.50000e+00 4.329088e-04 231 -9.00000e-01 -1.50000e+00 4.398674e-04 232 -9.50000e-01 -1.50000e+00 4.461877e-04 233 -1.00000e+00 -1.50000e+00 4.521058e-04 234 -1.05000e+00 -1.50000e+00 4.577603e-04 235 -1.10000e+00 -1.50000e+00 4.632294e-04 236 -1.15000e+00 -1.50000e+00 4.685587e-04 237 -1.20000e+00 -1.50000e+00 4.737770e-04 238 -1.25000e+00 -1.50000e+00 4.789036e-04 239 -1.30000e+00 -1.50000e+00 4.839528e-04 240 -1.35000e+00 -1.50000e+00 4.889352e-04 241 -1.40000e+00 -1.50000e+00 4.938597e-04 242 -1.45000e+00 -1.50000e+00 4.987333e-04 243 -1.50000e+00 -1.50000e+00 5.035623e-04 244 -1.55000e+00 -1.50000e+00 5.083517e-04 245 -1.60000e+00 -1.50000e+00 5.131063e-04 246 -1.65000e+00 -1.50000e+00 5.178300e-04 247 -1.70000e+00 -1.50000e+00 5.225263e-04 248 -1.75000e+00 -1.50000e+00 5.271985e-04 249 -1.80000e+00 -1.50000e+00 5.318495e-04 250 -1.85000e+00 -1.50000e+00 5.364817e-04 251 -1.90000e+00 -1.50000e+00 5.410976e-04 252 -1.95000e+00 -1.50000e+00 5.456991e-04 253 -2.00000e+00 -1.50000e+00 5.502884e-04 254 -2.05000e+00 -1.50000e+00 5.548670e-04 255 -2.10000e+00 -1.50000e+00 5.594366e-04 256 -2.15000e+00 -1.50000e+00 5.639987e-04 257 -2.20000e+00 -1.50000e+00 5.685546e-04 258 -2.25000e+00 -1.50000e+00 5.731056e-04 259 -2.30000e+00 -1.50000e+00 5.776528e-04 260 -2.35000e+00 -1.50000e+00 5.821972e-04 261 -2.40000e+00 -1.50000e+00 5.867399e-04 262 -2.45000e+00 -1.50000e+00 5.912818e-04 263 -2.50000e+00 -1.50000e+00 5.958237e-04 264 -2.55000e+00 -1.50000e+00 6.003663e-04 265 -2.60000e+00 -1.50000e+00 6.049105e-04 266 -2.65000e+00 -1.50000e+00 6.094569e-04 267 -2.70000e+00 -1.50000e+00 6.140061e-04 268 -2.75000e+00 -1.50000e+00 6.185587e-04 269 -2.80000e+00 -1.50000e+00 6.231153e-04 270 -2.85000e+00 -1.50000e+00 6.276764e-04 271 -2.90000e+00 -1.50000e+00 6.322425e-04 272 -2.95000e+00 -1.50000e+00 6.368141e-04 273 -3.00000e+00 -1.50000e+00 6.413916e-04 274 -3.05000e+00 -1.50000e+00 6.459753e-04 275 -3.10000e+00 -1.50000e+00 6.505658e-04 276 -3.15000e+00 -1.50000e+00 6.551632e-04 277 -3.20000e+00 -1.50000e+00 6.597681e-04 278 -3.25000e+00 -1.50000e+00 6.643806e-04 279 -3.30000e+00 -1.50000e+00 6.690012e-04 280 -3.35000e+00 -1.50000e+00 6.736300e-04 281 -3.40000e+00 -1.50000e+00 6.782674e-04 282 -3.45000e+00 -1.50000e+00 6.829136e-04 283 -3.50000e+00 -1.50000e+00 6.875689e-04 284 0.000000e+00 -2.00000e+00 0.000000e+00 285 -5.00000e-02 -2.00000e+00 6.383768e-05 286 -1.00000e-01 -2.00000e+00 1.249481e-04 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 287 -1.50000e-01 -2.00000e+00 1.833697e-04 288 -2.00000e-01 -2.00000e+00 2.391402e-04 289 -2.50000e-01 -2.00000e+00 2.922966e-04 290 -3.00000e-01 -2.00000e+00 3.428754e-04 291 -3.50000e-01 -2.00000e+00 3.909124e-04 292 -4.00000e-01 -2.00000e+00 4.364428e-04 293 -4.50000e-01 -2.00000e+00 4.795014e-04 294 -5.00000e-01 -2.00000e+00 5.201225e-04 295 -5.50000e-01 -2.00000e+00 5.583398e-04 296 -6.00000e-01 -2.00000e+00 5.941870e-04 297 -6.50000e-01 -2.00000e+00 6.276976e-04 298 -7.00000e-01 -2.00000e+00 6.589053e-04 299 -7.50000e-01 -2.00000e+00 6.878445e-04 300 -8.00000e-01 -2.00000e+00 7.145508e-04 301 -8.50000e-01 -2.00000e+00 7.390624e-04 302 -9.00000e-01 -2.00000e+00 7.614219e-04 303 -9.50000e-01 -2.00000e+00 7.816807e-04 304 -1.00000e+00 -2.00000e+00 7.999048e-04 305 -1.05000e+00 -2.00000e+00 8.161866e-04 306 -1.10000e+00 -2.00000e+00 8.306612e-04 307 -1.15000e+00 -2.00000e+00 8.435250e-04 308 -1.20000e+00 -2.00000e+00 8.550390e-04 309 -1.25000e+00 -2.00000e+00 8.655003e-04 310 -1.30000e+00 -2.00000e+00 8.751866e-04 311 -1.35000e+00 -2.00000e+00 8.843143e-04 312 -1.40000e+00 -2.00000e+00 8.930318e-04 313 -1.45000e+00 -2.00000e+00 9.014352e-04 314 -1.50000e+00 -2.00000e+00 9.095869e-04 315 -1.55000e+00 -2.00000e+00 9.175291e-04 316 -1.60000e+00 -2.00000e+00 9.252920e-04 317 -1.65000e+00 -2.00000e+00 9.328983e-04 318 -1.70000e+00 -2.00000e+00 9.403660e-04 319 -1.75000e+00 -2.00000e+00 9.477099e-04 320 -1.80000e+00 -2.00000e+00 9.549422e-04 321 -1.85000e+00 -2.00000e+00 9.620737e-04 322 -1.90000e+00 -2.00000e+00 9.691136e-04 323 -1.95000e+00 -2.00000e+00 9.760702e-04 324 -2.00000e+00 -2.00000e+00 9.829506e-04 325 -2.05000e+00 -2.00000e+00 9.897614e-04 326 -2.10000e+00 -2.00000e+00 9.965084e-04 327 -2.15000e+00 -2.00000e+00 1.003197e-03 328 -2.20000e+00 -2.00000e+00 1.009832e-03 329 -2.25000e+00 -2.00000e+00 1.016417e-03 330 -2.30000e+00 -2.00000e+00 1.022957e-03 331 -2.35000e+00 -2.00000e+00 1.029456e-03 332 -2.40000e+00 -2.00000e+00 1.035916e-03 333 -2.45000e+00 -2.00000e+00 1.042341e-03 334 -2.50000e+00 -2.00000e+00 1.048734e-03 335 -2.55000e+00 -2.00000e+00 1.055096e-03 336 -2.60000e+00 -2.00000e+00 1.061432e-03 337 -2.65000e+00 -2.00000e+00 1.067742e-03 338 -2.70000e+00 -2.00000e+00 1.074029e-03 339 -2.75000e+00 -2.00000e+00 1.080295e-03 340 -2.80000e+00 -2.00000e+00 1.086542e-03 341 -2.85000e+00 -2.00000e+00 1.092771e-03 342 -2.90000e+00 -2.00000e+00 1.098984e-03 343 -2.95000e+00 -2.00000e+00 1.105182e-03 344 -3.00000e+00 -2.00000e+00 1.111367e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 345 -3.05000e+00 -2.00000e+00 1.117540e-03 346 -3.10000e+00 -2.00000e+00 1.123703e-03 347 -3.15000e+00 -2.00000e+00 1.129856e-03 348 -3.20000e+00 -2.00000e+00 1.136000e-03 349 -3.25000e+00 -2.00000e+00 1.142136e-03 350 -3.30000e+00 -2.00000e+00 1.148266e-03 351 -3.35000e+00 -2.00000e+00 1.154390e-03 352 -3.40000e+00 -2.00000e+00 1.160509e-03 353 -3.45000e+00 -2.00000e+00 1.166624e-03 354 -3.50000e+00 -2.00000e+00 1.172736e-03 355 0.000000e+00 -2.50000e+00 0.000000e+00 356 -5.00000e-02 -2.50000e+00 7.847279e-05 357 -1.00000e-01 -2.50000e+00 1.543231e-04 358 -1.50000e-01 -2.50000e+00 2.275847e-04 359 -2.00000e-01 -2.50000e+00 2.982904e-04 360 -2.50000e-01 -2.50000e+00 3.664729e-04 361 -3.00000e-01 -2.50000e+00 4.321642e-04 362 -3.50000e-01 -2.50000e+00 4.953958e-04 363 -4.00000e-01 -2.50000e+00 5.561987e-04 364 -4.50000e-01 -2.50000e+00 6.146033e-04 365 -5.00000e-01 -2.50000e+00 6.706396e-04 366 -5.50000e-01 -2.50000e+00 7.243372e-04 367 -6.00000e-01 -2.50000e+00 7.757253e-04 368 -6.50000e-01 -2.50000e+00 8.248325e-04 369 -7.00000e-01 -2.50000e+00 8.716872e-04 370 -7.50000e-01 -2.50000e+00 9.163174e-04 371 -8.00000e-01 -2.50000e+00 9.587508e-04 372 -8.50000e-01 -2.50000e+00 9.990150e-04 373 -9.00000e-01 -2.50000e+00 1.037137e-03 374 -9.50000e-01 -2.50000e+00 1.073145e-03 375 -1.00000e+00 -2.50000e+00 1.107066e-03 376 -1.05000e+00 -2.50000e+00 1.138929e-03 377 -1.10000e+00 -2.50000e+00 1.168763e-03 378 -1.15000e+00 -2.50000e+00 1.196599e-03 379 -1.20000e+00 -2.50000e+00 1.222473e-03 380 -1.25000e+00 -2.50000e+00 1.246423e-03 381 -1.30000e+00 -2.50000e+00 1.268500e-03 382 -1.35000e+00 -2.50000e+00 1.288769e-03 383 -1.40000e+00 -2.50000e+00 1.307318e-03 384 -1.45000e+00 -2.50000e+00 1.324272e-03 385 -1.50000e+00 -2.50000e+00 1.339798e-03 386 -1.55000e+00 -2.50000e+00 1.354105e-03 387 -1.60000e+00 -2.50000e+00 1.367420e-03 388 -1.65000e+00 -2.50000e+00 1.379953e-03 389 -1.70000e+00 -2.50000e+00 1.391878e-03 390 -1.75000e+00 -2.50000e+00 1.403320e-03 391 -1.80000e+00 -2.50000e+00 1.414369e-03 392 -1.85000e+00 -2.50000e+00 1.425087e-03 393 -1.90000e+00 -2.50000e+00 1.435521e-03 394 -1.95000e+00 -2.50000e+00 1.445704e-03 395 -2.00000e+00 -2.50000e+00 1.455664e-03 396 -2.05000e+00 -2.50000e+00 1.465423e-03 397 -2.10000e+00 -2.50000e+00 1.475000e-03 398 -2.15000e+00 -2.50000e+00 1.484410e-03 399 -2.20000e+00 -2.50000e+00 1.493668e-03 400 -2.25000e+00 -2.50000e+00 1.502786e-03 401 -2.30000e+00 -2.50000e+00 1.511775e-03 402 -2.35000e+00 -2.50000e+00 1.520645e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 403 -2.40000e+00 -2.50000e+00 1.529405e-03 404 -2.45000e+00 -2.50000e+00 1.538062e-03 405 -2.50000e+00 -2.50000e+00 1.546625e-03 406 -2.55000e+00 -2.50000e+00 1.555100e-03 407 -2.60000e+00 -2.50000e+00 1.563493e-03 408 -2.65000e+00 -2.50000e+00 1.571809e-03 409 -2.70000e+00 -2.50000e+00 1.580054e-03 410 -2.75000e+00 -2.50000e+00 1.588233e-03 411 -2.80000e+00 -2.50000e+00 1.596351e-03 412 -2.85000e+00 -2.50000e+00 1.604410e-03 413 -2.90000e+00 -2.50000e+00 1.612416e-03 414 -2.95000e+00 -2.50000e+00 1.620371e-03 415 -3.00000e+00 -2.50000e+00 1.628279e-03 416 -3.05000e+00 -2.50000e+00 1.636143e-03 417 -3.10000e+00 -2.50000e+00 1.643965e-03 418 -3.15000e+00 -2.50000e+00 1.651750e-03 419 -3.20000e+00 -2.50000e+00 1.659498e-03 420 -3.25000e+00 -2.50000e+00 1.667212e-03 421 -3.30000e+00 -2.50000e+00 1.674895e-03 422 -3.35000e+00 -2.50000e+00 1.682548e-03 423 -3.40000e+00 -2.50000e+00 1.690174e-03 424 -3.45000e+00 -2.50000e+00 1.697773e-03 425 -3.50000e+00 -2.50000e+00 1.705349e-03 426 0.000000e+00 -3.00000e+00 0.000000e+00 427 -5.00000e-02 -3.00000e+00 9.059813e-05 428 -1.00000e-01 -3.00000e+00 1.786915e-04 429 -1.50000e-01 -3.00000e+00 2.643095e-04 430 -2.00000e-01 -3.00000e+00 3.474812e-04 431 -2.50000e-01 -3.00000e+00 4.282351e-04 432 -3.00000e-01 -3.00000e+00 5.065993e-04 433 -3.50000e-01 -3.00000e+00 5.826016e-04 434 -4.00000e-01 -3.00000e+00 6.562691e-04 435 -4.50000e-01 -3.00000e+00 7.276289e-04 436 -5.00000e-01 -3.00000e+00 7.967073e-04 437 -5.50000e-01 -3.00000e+00 8.635304e-04 438 -6.00000e-01 -3.00000e+00 9.281240e-04 439 -6.50000e-01 -3.00000e+00 9.905134e-04 440 -7.00000e-01 -3.00000e+00 1.050724e-03 441 -7.50000e-01 -3.00000e+00 1.108779e-03 442 -8.00000e-01 -3.00000e+00 1.164704e-03 443 -8.50000e-01 -3.00000e+00 1.218523e-03 444 -9.00000e-01 -3.00000e+00 1.270259e-03 445 -9.50000e-01 -3.00000e+00 1.319936e-03 446 -1.00000e+00 -3.00000e+00 1.367577e-03 447 -1.05000e+00 -3.00000e+00 1.413205e-03 448 -1.10000e+00 -3.00000e+00 1.456843e-03 449 -1.15000e+00 -3.00000e+00 1.498513e-03 450 -1.20000e+00 -3.00000e+00 1.538239e-03 451 -1.25000e+00 -3.00000e+00 1.576042e-03 452 -1.30000e+00 -3.00000e+00 1.611946e-03 453 -1.35000e+00 -3.00000e+00 1.645976e-03 454 -1.40000e+00 -3.00000e+00 1.678155e-03 455 -1.45000e+00 -3.00000e+00 1.708510e-03 456 -1.50000e+00 -3.00000e+00 1.737069e-03 457 -1.55000e+00 -3.00000e+00 1.763867e-03 458 -1.60000e+00 -3.00000e+00 1.788942e-03 459 -1.65000e+00 -3.00000e+00 1.812345e-03 460 -1.70000e+00 -3.00000e+00 1.834142e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 461 -1.75000e+00 -3.00000e+00 1.854420e-03 462 -1.80000e+00 -3.00000e+00 1.873298e-03 463 -1.85000e+00 -3.00000e+00 1.890925e-03 464 -1.90000e+00 -3.00000e+00 1.907472e-03 465 -1.95000e+00 -3.00000e+00 1.923116e-03 466 -2.00000e+00 -3.00000e+00 1.938018e-03 467 -2.05000e+00 -3.00000e+00 1.952310e-03 468 -2.10000e+00 -3.00000e+00 1.966091e-03 469 -2.15000e+00 -3.00000e+00 1.979438e-03 470 -2.20000e+00 -3.00000e+00 1.992406e-03 471 -2.25000e+00 -3.00000e+00 2.005038e-03 472 -2.30000e+00 -3.00000e+00 2.017369e-03 473 -2.35000e+00 -3.00000e+00 2.029428e-03 474 -2.40000e+00 -3.00000e+00 2.041238e-03 475 -2.45000e+00 -3.00000e+00 2.052820e-03 476 -2.50000e+00 -3.00000e+00 2.064191e-03 477 -2.55000e+00 -3.00000e+00 2.075368e-03 478 -2.60000e+00 -3.00000e+00 2.086364e-03 479 -2.65000e+00 -3.00000e+00 2.097193e-03 480 -2.70000e+00 -3.00000e+00 2.107867e-03 481 -2.75000e+00 -3.00000e+00 2.118395e-03 482 -2.80000e+00 -3.00000e+00 2.128788e-03 483 -2.85000e+00 -3.00000e+00 2.139054e-03 484 -2.90000e+00 -3.00000e+00 2.149202e-03 485 -2.95000e+00 -3.00000e+00 2.159239e-03 486 -3.00000e+00 -3.00000e+00 2.169172e-03 487 -3.05000e+00 -3.00000e+00 2.179008e-03 488 -3.10000e+00 -3.00000e+00 2.188751e-03 489 -3.15000e+00 -3.00000e+00 2.198409e-03 490 -3.20000e+00 -3.00000e+00 2.207986e-03 491 -3.25000e+00 -3.00000e+00 2.217486e-03 492 -3.30000e+00 -3.00000e+00 2.226915e-03 493 -3.35000e+00 -3.00000e+00 2.236276e-03 494 -3.40000e+00 -3.00000e+00 2.245573e-03 495 -3.45000e+00 -3.00000e+00 2.254810e-03 496 -3.50000e+00 -3.00000e+00 2.263991e-03 497 0.000000e+00 -3.50000e+00 0.000000e+00 498 -5.00000e-02 -3.50000e+00 1.007727e-04 499 -1.00000e-01 -3.50000e+00 1.991598e-04 500 -1.50000e-01 -3.50000e+00 2.951873e-04 501 -2.00000e-01 -3.50000e+00 3.888806e-04 502 -2.50000e-01 -3.50000e+00 4.802648e-04 503 -3.00000e-01 -3.50000e+00 5.693647e-04 504 -3.50000e-01 -3.50000e+00 6.562047e-04 505 -4.00000e-01 -3.50000e+00 7.408090e-04 506 -4.50000e-01 -3.50000e+00 8.232012e-04 507 -5.00000e-01 -3.50000e+00 9.034049e-04 508 -5.50000e-01 -3.50000e+00 9.814431e-04 509 -6.00000e-01 -3.50000e+00 1.057339e-03 510 -6.50000e-01 -3.50000e+00 1.131114e-03 511 -7.00000e-01 -3.50000e+00 1.202791e-03 512 -7.50000e-01 -3.50000e+00 1.272392e-03 513 -8.00000e-01 -3.50000e+00 1.339939e-03 514 -8.50000e-01 -3.50000e+00 1.405452e-03 515 -9.00000e-01 -3.50000e+00 1.468953e-03 516 -9.50000e-01 -3.50000e+00 1.530463e-03 517 -1.00000e+00 -3.50000e+00 1.590001e-03 518 -1.05000e+00 -3.50000e+00 1.647589e-03 Index sweep v(1) vds#branch -------------------------------------------------------------------------------- 519 -1.10000e+00 -3.50000e+00 1.703246e-03 520 -1.15000e+00 -3.50000e+00 1.756992e-03 521 -1.20000e+00 -3.50000e+00 1.808847e-03 522 -1.25000e+00 -3.50000e+00 1.858830e-03 523 -1.30000e+00 -3.50000e+00 1.906961e-03 524 -1.35000e+00 -3.50000e+00 1.953258e-03 525 -1.40000e+00 -3.50000e+00 1.997741e-03 526 -1.45000e+00 -3.50000e+00 2.040429e-03 527 -1.50000e+00 -3.50000e+00 2.081340e-03 528 -1.55000e+00 -3.50000e+00 2.120495e-03 529 -1.60000e+00 -3.50000e+00 2.157912e-03 530 -1.65000e+00 -3.50000e+00 2.193613e-03 531 -1.70000e+00 -3.50000e+00 2.227618e-03 532 -1.75000e+00 -3.50000e+00 2.259949e-03 533 -1.80000e+00 -3.50000e+00 2.290632e-03 534 -1.85000e+00 -3.50000e+00 2.319694e-03 535 -1.90000e+00 -3.50000e+00 2.347169e-03 536 -1.95000e+00 -3.50000e+00 2.373098e-03 537 -2.00000e+00 -3.50000e+00 2.397532e-03 538 -2.05000e+00 -3.50000e+00 2.420540e-03 539 -2.10000e+00 -3.50000e+00 2.442209e-03 540 -2.15000e+00 -3.50000e+00 2.462651e-03 541 -2.20000e+00 -3.50000e+00 2.481999e-03 542 -2.25000e+00 -3.50000e+00 2.500393e-03 543 -2.30000e+00 -3.50000e+00 2.517971e-03 544 -2.35000e+00 -3.50000e+00 2.534856e-03 545 -2.40000e+00 -3.50000e+00 2.551146e-03 546 -2.45000e+00 -3.50000e+00 2.566921e-03 547 -2.50000e+00 -3.50000e+00 2.582241e-03 548 -2.55000e+00 -3.50000e+00 2.597156e-03 549 -2.60000e+00 -3.50000e+00 2.611704e-03 550 -2.65000e+00 -3.50000e+00 2.625917e-03 551 -2.70000e+00 -3.50000e+00 2.639823e-03 552 -2.75000e+00 -3.50000e+00 2.653445e-03 553 -2.80000e+00 -3.50000e+00 2.666806e-03 554 -2.85000e+00 -3.50000e+00 2.679923e-03 555 -2.90000e+00 -3.50000e+00 2.692813e-03 556 -2.95000e+00 -3.50000e+00 2.705492e-03 557 -3.00000e+00 -3.50000e+00 2.717974e-03 558 -3.05000e+00 -3.50000e+00 2.730270e-03 559 -3.10000e+00 -3.50000e+00 2.742393e-03 560 -3.15000e+00 -3.50000e+00 2.754353e-03 561 -3.20000e+00 -3.50000e+00 2.766161e-03 562 -3.25000e+00 -3.50000e+00 2.777824e-03 563 -3.30000e+00 -3.50000e+00 2.789353e-03 564 -3.35000e+00 -3.50000e+00 2.800754e-03 565 -3.40000e+00 -3.50000e+00 2.812035e-03 566 -3.45000e+00 -3.50000e+00 2.823202e-03 567 -3.50000e+00 -3.50000e+00 2.834263e-03 Total run time: 1.070 seconds. Current data size = 245760, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/dc_sim/test3.cir0000644000265600020320000000043212264261473017406 0ustar andreasadmin*****Single NMOS Transistor For BSIM3V3 general purpose check (Id-Vd) *** *** circuit description *** m1 2 1 0 0 n1 L=0.35u W=10.0u vgs 1 0 3.5 vds 2 0 3.5 .dc vds 0 3.5 0.05 vgs 0 3.5 0.5 .options Temp=100.0 noacct .print dc v(1) i(vds) .include modelcard.nmos .end ngspice-26/tests/bsim3/dc_sim/test10.cir0000644000265600020320000000047212264261473017470 0ustar andreasadmin*** For BSIM3V3 general purpose check (Id-Vd) for Pmosfet *** ****************************************** *** circuit description *** m1 2 1 0 0 p1 L=0.35u W=10.0u vgs 1 0 -3.5 vds 2 0 -3.5 .dc vds 0 -3.5 -0.05 vgs 0 -3.5 -0.5 .options Temp=100.0 noacct .print dc v(1) i(vds) .include modelcard.pmos .end ngspice-26/tests/bsim3/dc_sim/test4.out0000644000265600020320000003202212264261473017441 0ustar andreasadmin Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** Date: Tue Apr 20 23:13:10 1999 *** For BSIM3V3 general purpose check (Id-Vg) for Nmosfet*** DCtransferCurve Tue Apr 20 23:13:09 1999 -------------------------------------------------------------------------------- Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.000000e-01 -3.55020e-09 1 5.000000e-02 1.000000e-01 -1.26313e-08 2 1.000000e-01 1.000000e-01 -4.41784e-08 3 1.500000e-01 1.000000e-01 -1.50335e-07 4 2.000000e-01 1.000000e-01 -4.92357e-07 5 2.500000e-01 1.000000e-01 -1.54093e-06 6 3.000000e-01 1.000000e-01 -4.54986e-06 7 3.500000e-01 1.000000e-01 -1.20751e-05 8 4.000000e-01 1.000000e-01 -2.68042e-05 9 4.500000e-01 1.000000e-01 -4.82454e-05 10 5.000000e-01 1.000000e-01 -7.27490e-05 11 5.500000e-01 1.000000e-01 -9.72007e-05 12 6.000000e-01 1.000000e-01 -1.20247e-04 13 6.500000e-01 1.000000e-01 -1.41575e-04 14 7.000000e-01 1.000000e-01 -1.61267e-04 15 7.500000e-01 1.000000e-01 -1.79505e-04 16 8.000000e-01 1.000000e-01 -1.96466e-04 17 8.500000e-01 1.000000e-01 -2.12297e-04 18 9.000000e-01 1.000000e-01 -2.27120e-04 19 9.500000e-01 1.000000e-01 -2.41032e-04 20 1.000000e+00 1.000000e-01 -2.54114e-04 21 1.050000e+00 1.000000e-01 -2.66435e-04 22 1.100000e+00 1.000000e-01 -2.78057e-04 23 1.150000e+00 1.000000e-01 -2.89032e-04 24 1.200000e+00 1.000000e-01 -2.99408e-04 25 1.250000e+00 1.000000e-01 -3.09228e-04 26 1.300000e+00 1.000000e-01 -3.18532e-04 27 1.350000e+00 1.000000e-01 -3.27354e-04 28 1.400000e+00 1.000000e-01 -3.35727e-04 29 1.450000e+00 1.000000e-01 -3.43680e-04 30 1.500000e+00 1.000000e-01 -3.51241e-04 31 1.550000e+00 1.000000e-01 -3.58434e-04 32 1.600000e+00 1.000000e-01 -3.65282e-04 33 1.650000e+00 1.000000e-01 -3.71807e-04 34 1.700000e+00 1.000000e-01 -3.78026e-04 35 1.750000e+00 1.000000e-01 -3.83960e-04 36 1.800000e+00 1.000000e-01 -3.89623e-04 37 1.850000e+00 1.000000e-01 -3.95031e-04 38 1.900000e+00 1.000000e-01 -4.00199e-04 39 1.950000e+00 1.000000e-01 -4.05139e-04 40 2.000000e+00 1.000000e-01 -4.09865e-04 41 2.050000e+00 1.000000e-01 -4.14386e-04 42 2.100000e+00 1.000000e-01 -4.18715e-04 43 2.150000e+00 1.000000e-01 -4.22861e-04 44 2.200000e+00 1.000000e-01 -4.26832e-04 45 2.250000e+00 1.000000e-01 -4.30639e-04 46 2.300000e+00 1.000000e-01 -4.34288e-04 47 2.350000e+00 1.000000e-01 -4.37788e-04 48 2.400000e+00 1.000000e-01 -4.41146e-04 49 2.450000e+00 1.000000e-01 -4.44368e-04 50 2.500000e+00 1.000000e-01 -4.47460e-04 51 2.550000e+00 1.000000e-01 -4.50430e-04 52 2.600000e+00 1.000000e-01 -4.53281e-04 53 2.650000e+00 1.000000e-01 -4.56020e-04 54 2.700000e+00 1.000000e-01 -4.58651e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 55 2.750000e+00 1.000000e-01 -4.61179e-04 56 2.800000e+00 1.000000e-01 -4.63608e-04 57 2.850000e+00 1.000000e-01 -4.65943e-04 58 2.900000e+00 1.000000e-01 -4.68188e-04 59 2.950000e+00 1.000000e-01 -4.70346e-04 60 3.000000e+00 1.000000e-01 -4.72421e-04 61 3.050000e+00 1.000000e-01 -4.74416e-04 62 3.100000e+00 1.000000e-01 -4.76334e-04 63 3.150000e+00 1.000000e-01 -4.78179e-04 64 3.200000e+00 1.000000e-01 -4.79953e-04 65 3.250000e+00 1.000000e-01 -4.81659e-04 66 3.300000e+00 1.000000e-01 -4.83300e-04 67 3.350000e+00 1.000000e-01 -4.84877e-04 68 3.400000e+00 1.000000e-01 -4.86394e-04 69 3.450000e+00 1.000000e-01 -4.87853e-04 70 3.500000e+00 1.000000e-01 -4.89256e-04 71 0.000000e+00 1.100000e+00 -7.72075e-09 72 5.000000e-02 1.100000e+00 -2.73583e-08 73 1.000000e-01 1.100000e+00 -9.50276e-08 74 1.500000e-01 1.100000e+00 -3.19811e-07 75 2.000000e-01 1.100000e+00 -1.03065e-06 76 2.500000e-01 1.100000e+00 -3.15412e-06 77 3.000000e-01 1.100000e+00 -9.01511e-06 78 3.500000e-01 1.100000e+00 -2.29753e-05 79 4.000000e-01 1.100000e+00 -4.96254e-05 80 4.500000e-01 1.100000e+00 -9.00697e-05 81 5.000000e-01 1.100000e+00 -1.41520e-04 82 5.500000e-01 1.100000e+00 -2.00170e-04 83 6.000000e-01 1.100000e+00 -2.63197e-04 84 6.500000e-01 1.100000e+00 -3.28981e-04 85 7.000000e-01 1.100000e+00 -3.96680e-04 86 7.500000e-01 1.100000e+00 -4.65838e-04 87 8.000000e-01 1.100000e+00 -5.36171e-04 88 8.500000e-01 1.100000e+00 -6.07463e-04 89 9.000000e-01 1.100000e+00 -6.79530e-04 90 9.500000e-01 1.100000e+00 -7.52208e-04 91 1.000000e+00 1.100000e+00 -8.25345e-04 92 1.050000e+00 1.100000e+00 -8.98805e-04 93 1.100000e+00 1.100000e+00 -9.72465e-04 94 1.150000e+00 1.100000e+00 -1.04621e-03 95 1.200000e+00 1.100000e+00 -1.11995e-03 96 1.250000e+00 1.100000e+00 -1.19359e-03 97 1.300000e+00 1.100000e+00 -1.26705e-03 98 1.350000e+00 1.100000e+00 -1.34026e-03 99 1.400000e+00 1.100000e+00 -1.41315e-03 100 1.450000e+00 1.100000e+00 -1.48566e-03 101 1.500000e+00 1.100000e+00 -1.55773e-03 102 1.550000e+00 1.100000e+00 -1.62930e-03 103 1.600000e+00 1.100000e+00 -1.70034e-03 104 1.650000e+00 1.100000e+00 -1.77078e-03 105 1.700000e+00 1.100000e+00 -1.84058e-03 106 1.750000e+00 1.100000e+00 -1.90969e-03 107 1.800000e+00 1.100000e+00 -1.97807e-03 108 1.850000e+00 1.100000e+00 -2.04569e-03 109 1.900000e+00 1.100000e+00 -2.11248e-03 110 1.950000e+00 1.100000e+00 -2.17842e-03 111 2.000000e+00 1.100000e+00 -2.24347e-03 112 2.050000e+00 1.100000e+00 -2.30757e-03 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 113 2.100000e+00 1.100000e+00 -2.37070e-03 114 2.150000e+00 1.100000e+00 -2.43282e-03 115 2.200000e+00 1.100000e+00 -2.49389e-03 116 2.250000e+00 1.100000e+00 -2.55388e-03 117 2.300000e+00 1.100000e+00 -2.61276e-03 118 2.350000e+00 1.100000e+00 -2.67050e-03 119 2.400000e+00 1.100000e+00 -2.72707e-03 120 2.450000e+00 1.100000e+00 -2.78244e-03 121 2.500000e+00 1.100000e+00 -2.83662e-03 122 2.550000e+00 1.100000e+00 -2.88956e-03 123 2.600000e+00 1.100000e+00 -2.94127e-03 124 2.650000e+00 1.100000e+00 -2.99174e-03 125 2.700000e+00 1.100000e+00 -3.04097e-03 126 2.750000e+00 1.100000e+00 -3.08896e-03 127 2.800000e+00 1.100000e+00 -3.13572e-03 128 2.850000e+00 1.100000e+00 -3.18127e-03 129 2.900000e+00 1.100000e+00 -3.22564e-03 130 2.950000e+00 1.100000e+00 -3.26885e-03 131 3.000000e+00 1.100000e+00 -3.31092e-03 132 3.050000e+00 1.100000e+00 -3.35189e-03 133 3.100000e+00 1.100000e+00 -3.39178e-03 134 3.150000e+00 1.100000e+00 -3.43064e-03 135 3.200000e+00 1.100000e+00 -3.46848e-03 136 3.250000e+00 1.100000e+00 -3.50534e-03 137 3.300000e+00 1.100000e+00 -3.54124e-03 138 3.350000e+00 1.100000e+00 -3.57622e-03 139 3.400000e+00 1.100000e+00 -3.61030e-03 140 3.450000e+00 1.100000e+00 -3.64351e-03 141 3.500000e+00 1.100000e+00 -3.67588e-03 142 0.000000e+00 2.100000e+00 -1.38890e-08 143 5.000000e-02 2.100000e+00 -4.89813e-08 144 1.000000e-01 2.100000e+00 -1.68733e-07 145 1.500000e-01 2.100000e+00 -5.60265e-07 146 2.000000e-01 2.100000e+00 -1.76874e-06 147 2.500000e-01 2.100000e+00 -5.24483e-06 148 3.000000e-01 2.100000e+00 -1.42668e-05 149 3.500000e-01 2.100000e+00 -3.40010e-05 150 4.000000e-01 2.100000e+00 -6.85067e-05 151 4.500000e-01 2.100000e+00 -1.17371e-04 152 5.000000e-01 2.100000e+00 -1.76816e-04 153 5.500000e-01 2.100000e+00 -2.42902e-04 154 6.000000e-01 2.100000e+00 -3.13015e-04 155 6.500000e-01 2.100000e+00 -3.85742e-04 156 7.000000e-01 2.100000e+00 -4.60371e-04 157 7.500000e-01 2.100000e+00 -5.36522e-04 158 8.000000e-01 2.100000e+00 -6.13950e-04 159 8.500000e-01 2.100000e+00 -6.92466e-04 160 9.000000e-01 2.100000e+00 -7.71906e-04 161 9.500000e-01 2.100000e+00 -8.52120e-04 162 1.000000e+00 2.100000e+00 -9.32976e-04 163 1.050000e+00 2.100000e+00 -1.01435e-03 164 1.100000e+00 2.100000e+00 -1.09614e-03 165 1.150000e+00 2.100000e+00 -1.17825e-03 166 1.200000e+00 2.100000e+00 -1.26059e-03 167 1.250000e+00 2.100000e+00 -1.34310e-03 168 1.300000e+00 2.100000e+00 -1.42570e-03 169 1.350000e+00 2.100000e+00 -1.50835e-03 170 1.400000e+00 2.100000e+00 -1.59100e-03 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 171 1.450000e+00 2.100000e+00 -1.67359e-03 172 1.500000e+00 2.100000e+00 -1.75610e-03 173 1.550000e+00 2.100000e+00 -1.83849e-03 174 1.600000e+00 2.100000e+00 -1.92072e-03 175 1.650000e+00 2.100000e+00 -2.00277e-03 176 1.700000e+00 2.100000e+00 -2.08461e-03 177 1.750000e+00 2.100000e+00 -2.16621e-03 178 1.800000e+00 2.100000e+00 -2.24757e-03 179 1.850000e+00 2.100000e+00 -2.32864e-03 180 1.900000e+00 2.100000e+00 -2.40943e-03 181 1.950000e+00 2.100000e+00 -2.48990e-03 182 2.000000e+00 2.100000e+00 -2.57004e-03 183 2.050000e+00 2.100000e+00 -2.64984e-03 184 2.100000e+00 2.100000e+00 -2.72927e-03 185 2.150000e+00 2.100000e+00 -2.80833e-03 186 2.200000e+00 2.100000e+00 -2.88700e-03 187 2.250000e+00 2.100000e+00 -2.96526e-03 188 2.300000e+00 2.100000e+00 -3.04311e-03 189 2.350000e+00 2.100000e+00 -3.12052e-03 190 2.400000e+00 2.100000e+00 -3.19749e-03 191 2.450000e+00 2.100000e+00 -3.27400e-03 192 2.500000e+00 2.100000e+00 -3.35004e-03 193 2.550000e+00 2.100000e+00 -3.42560e-03 194 2.600000e+00 2.100000e+00 -3.50066e-03 195 2.650000e+00 2.100000e+00 -3.57522e-03 196 2.700000e+00 2.100000e+00 -3.64926e-03 197 2.750000e+00 2.100000e+00 -3.72276e-03 198 2.800000e+00 2.100000e+00 -3.79573e-03 199 2.850000e+00 2.100000e+00 -3.86814e-03 200 2.900000e+00 2.100000e+00 -3.93998e-03 201 2.950000e+00 2.100000e+00 -4.01125e-03 202 3.000000e+00 2.100000e+00 -4.08193e-03 203 3.050000e+00 2.100000e+00 -4.15200e-03 204 3.100000e+00 2.100000e+00 -4.22146e-03 205 3.150000e+00 2.100000e+00 -4.29030e-03 206 3.200000e+00 2.100000e+00 -4.35850e-03 207 3.250000e+00 2.100000e+00 -4.42605e-03 208 3.300000e+00 2.100000e+00 -4.49294e-03 209 3.350000e+00 2.100000e+00 -4.55917e-03 210 3.400000e+00 2.100000e+00 -4.62470e-03 211 3.450000e+00 2.100000e+00 -4.68955e-03 212 3.500000e+00 2.100000e+00 -4.75369e-03 213 0.000000e+00 3.100000e+00 -2.40700e-08 214 5.000000e-02 3.100000e+00 -8.44140e-08 215 1.000000e-01 3.100000e+00 -2.88025e-07 216 1.500000e-01 3.100000e+00 -9.41850e-07 217 2.000000e-01 3.100000e+00 -2.90583e-06 218 2.500000e-01 3.100000e+00 -8.32243e-06 219 3.000000e-01 3.100000e+00 -2.14873e-05 220 3.500000e-01 3.100000e+00 -4.79531e-05 221 4.000000e-01 3.100000e+00 -9.06131e-05 222 4.500000e-01 3.100000e+00 -1.47436e-04 223 5.000000e-01 3.100000e+00 -2.13952e-04 224 5.500000e-01 3.100000e+00 -2.86316e-04 225 6.000000e-01 3.100000e+00 -3.62205e-04 226 6.500000e-01 3.100000e+00 -4.40432e-04 227 7.000000e-01 3.100000e+00 -5.20412e-04 228 7.500000e-01 3.100000e+00 -6.01828e-04 Index sweep v(2) vds#branch -------------------------------------------------------------------------------- 229 8.000000e-01 3.100000e+00 -6.84470e-04 230 8.500000e-01 3.100000e+00 -7.68168e-04 231 9.000000e-01 3.100000e+00 -8.52772e-04 232 9.500000e-01 3.100000e+00 -9.38142e-04 233 1.000000e+00 3.100000e+00 -1.02415e-03 234 1.050000e+00 3.100000e+00 -1.11069e-03 235 1.100000e+00 3.100000e+00 -1.19767e-03 236 1.150000e+00 3.100000e+00 -1.28498e-03 237 1.200000e+00 3.100000e+00 -1.37256e-03 238 1.250000e+00 3.100000e+00 -1.46033e-03 239 1.300000e+00 3.100000e+00 -1.54825e-03 240 1.350000e+00 3.100000e+00 -1.63626e-03 241 1.400000e+00 3.100000e+00 -1.72432e-03 242 1.450000e+00 3.100000e+00 -1.81238e-03 243 1.500000e+00 3.100000e+00 -1.90042e-03 244 1.550000e+00 3.100000e+00 -1.98840e-03 245 1.600000e+00 3.100000e+00 -2.07630e-03 246 1.650000e+00 3.100000e+00 -2.16409e-03 247 1.700000e+00 3.100000e+00 -2.25174e-03 248 1.750000e+00 3.100000e+00 -2.33925e-03 249 1.800000e+00 3.100000e+00 -2.42659e-03 250 1.850000e+00 3.100000e+00 -2.51374e-03 251 1.900000e+00 3.100000e+00 -2.60069e-03 252 1.950000e+00 3.100000e+00 -2.68743e-03 253 2.000000e+00 3.100000e+00 -2.77394e-03 254 2.050000e+00 3.100000e+00 -2.86021e-03 255 2.100000e+00 3.100000e+00 -2.94623e-03 256 2.150000e+00 3.100000e+00 -3.03199e-03 257 2.200000e+00 3.100000e+00 -3.11747e-03 258 2.250000e+00 3.100000e+00 -3.20268e-03 259 2.300000e+00 3.100000e+00 -3.28759e-03 260 2.350000e+00 3.100000e+00 -3.37220e-03 261 2.400000e+00 3.100000e+00 -3.45650e-03 262 2.450000e+00 3.100000e+00 -3.54048e-03 263 2.500000e+00 3.100000e+00 -3.62414e-03 264 2.550000e+00 3.100000e+00 -3.70746e-03 265 2.600000e+00 3.100000e+00 -3.79045e-03 266 2.650000e+00 3.100000e+00 -3.87308e-03 267 2.700000e+00 3.100000e+00 -3.95536e-03 268 2.750000e+00 3.100000e+00 -4.03728e-03 269 2.800000e+00 3.100000e+00 -4.11883e-03 270 2.850000e+00 3.100000e+00 -4.20000e-03 271 2.900000e+00 3.100000e+00 -4.28079e-03 272 2.950000e+00 3.100000e+00 -4.36119e-03 273 3.000000e+00 3.100000e+00 -4.44119e-03 274 3.050000e+00 3.100000e+00 -4.52080e-03 275 3.100000e+00 3.100000e+00 -4.59999e-03 276 3.150000e+00 3.100000e+00 -4.67876e-03 277 3.200000e+00 3.100000e+00 -4.75711e-03 278 3.250000e+00 3.100000e+00 -4.83504e-03 279 3.300000e+00 3.100000e+00 -4.91253e-03 280 3.350000e+00 3.100000e+00 -4.98957e-03 281 3.400000e+00 3.100000e+00 -5.06617e-03 282 3.450000e+00 3.100000e+00 -5.14231e-03 283 3.500000e+00 3.100000e+00 -5.21799e-03 Total run time: 0.750 seconds. Current data size = 233472, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/Makefile.am0000644000265600020320000000020012264261473016434 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = ac_sim dc_sim tran_sim MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3/ac_sim/0000755000265600020320000000000012264261713015640 5ustar andreasadminngspice-26/tests/bsim3/ac_sim/gain-stage.cir0000644000265600020320000000036112264261473020361 0ustar andreasadmin*A Simple MOSFET Gain Stage. AC Analysis. M1 3 2 0 0 nmos w=4u l=1u Rsource 1 2 100k Rload 3 vdd 25k Vdd vdd 0 5 Vin 1 0 1.44 ac .1 .options noacct .ac dec 10 100 1000Meg .print ac vdb(3) .model nmos nmos level=8 version=3.2.2 .end ngspice-26/tests/bsim3/ac_sim/op-amp.cir0000644000265600020320000000120512264261473017531 0ustar andreasadmin* Operational Amplifier. AC Analysis. * BSIM3 testing, 3/16/96. *Operational Amplifier M1 bias1 1 cm cm nmos w=10u l=1u M2 bias2 in2 cm cm nmos w=10u l=1u M3 vdd bias1 bias1 vdd pmos w=2u l=1u M4 bias2 bias1 vdd vdd pmos w=2u l=1u m5 cm bias vss vss nmos w=2u l=1u mbias bias bias vss vss nmos w=2u l=1u rbias 0 bias 195k m6 8 bias vss vss nmos w=2u l=1u m7 8 bias2 vdd out nmos w=2u l=1u Cfb bias2 8 2p Vid 1 c 0 ac 0.1 eid in2 c 1 c -1 vic c 0 dc 0 vss vss 0 -5 Vdd vdd 0 5 *AC analysis .options noacct .ac dec 10 100 100Meg .print ac vdb(8) .model nmos nmos level=8 version=3.2.2 .model pmos pmos level=8 version=3.2.2 .end ngspice-26/tests/bsim3/ac_sim/op-amp.out0000644000265600020320000000503612264261473017571 0ustar andreasadmin Circuit: * operational amplifier. ac analysis. Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. No. of Data Rows : 61 * operational amplifier. ac analysis. AC Analysis Sun May 20 13:01:15 2012 -------------------------------------------------------------------------------- Index frequency vdb(8) -------------------------------------------------------------------------------- 0 1.000000e+02 2.479354e+01 1 1.258925e+02 2.479355e+01 2 1.584893e+02 2.479355e+01 3 1.995262e+02 2.479356e+01 4 2.511886e+02 2.479358e+01 5 3.162278e+02 2.479360e+01 6 3.981072e+02 2.479364e+01 7 5.011872e+02 2.479370e+01 8 6.309573e+02 2.479379e+01 9 7.943282e+02 2.479394e+01 10 1.000000e+03 2.479417e+01 11 1.258925e+03 2.479453e+01 12 1.584893e+03 2.479511e+01 13 1.995262e+03 2.479599e+01 14 2.511886e+03 2.479736e+01 15 3.162278e+03 2.479942e+01 16 3.981072e+03 2.480244e+01 17 5.011872e+03 2.480672e+01 18 6.309573e+03 2.481245e+01 19 7.943282e+03 2.481960e+01 20 1.000000e+04 2.482775e+01 21 1.258925e+04 2.483612e+01 22 1.584893e+04 2.484383e+01 23 1.995262e+04 2.485019e+01 24 2.511886e+04 2.485485e+01 25 3.162278e+04 2.485776e+01 26 3.981072e+04 2.485896e+01 27 5.011872e+04 2.485845e+01 28 6.309573e+04 2.485597e+01 29 7.943282e+04 2.485096e+01 30 1.000000e+05 2.484230e+01 31 1.258925e+05 2.482816e+01 32 1.584893e+05 2.480557e+01 33 1.995262e+05 2.476986e+01 34 2.511886e+05 2.471382e+01 35 3.162278e+05 2.462662e+01 36 3.981072e+05 2.449238e+01 37 5.011872e+05 2.428903e+01 38 6.309573e+05 2.398799e+01 39 7.943282e+05 2.355642e+01 40 1.000000e+06 2.296362e+01 41 1.258925e+06 2.219158e+01 42 1.584893e+06 2.124631e+01 43 1.995262e+06 2.016387e+01 44 2.511886e+06 1.900695e+01 45 3.162278e+06 1.785317e+01 46 3.981072e+06 1.677926e+01 47 5.011872e+06 1.584539e+01 48 6.309573e+06 1.508401e+01 49 7.943282e+06 1.449715e+01 50 1.000000e+07 1.406295e+01 51 1.258925e+07 1.374667e+01 52 1.584893e+07 1.351035e+01 53 1.995262e+07 1.331769e+01 54 2.511886e+07 1.313467e+01 Index frequency vdb(8) -------------------------------------------------------------------------------- 55 3.162278e+07 1.292734e+01 56 3.981072e+07 1.265867e+01 57 5.011872e+07 1.228587e+01 58 6.309573e+07 1.175993e+01 59 7.943282e+07 1.102905e+01 60 1.000000e+08 1.004653e+01 ngspice-26/tests/bsim3/ac_sim/Makefile.am0000644000265600020320000000042012264261473017673 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = gain-stage.cir \ op-amp.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3/ac_sim/Makefile.in0000644000265600020320000003356412264261541017717 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3/ac_sim DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = gain-stage.cir \ op-amp.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3/ac_sim/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3/ac_sim/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3/ac_sim/gain-stage.out0000644000265600020320000000547312264261473020424 0ustar andreasadmin Circuit: *A Simple MOSFET Gain Stage. AC Analysis. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Circuit: *A Simple MOSFET Gain Stage. AC Analysis. Date: Tue Apr 20 23:17:11 1999 *A Simple MOSFET Gain Stage. AC Analysis. acan Tue Apr 20 23:17:11 1999 -------------------------------------------------------------------------------- Index frequency db(v(3)) -------------------------------------------------------------------------------- 0 1.000000e+02 -1.19663e+02 1 1.258925e+02 -1.19663e+02 2 1.584893e+02 -1.19663e+02 3 1.995262e+02 -1.19663e+02 4 2.511886e+02 -1.19663e+02 5 3.162278e+02 -1.19663e+02 6 3.981072e+02 -1.19663e+02 7 5.011872e+02 -1.19663e+02 8 6.309573e+02 -1.19663e+02 9 7.943282e+02 -1.19662e+02 10 1.000000e+03 -1.19662e+02 11 1.258925e+03 -1.19661e+02 12 1.584893e+03 -1.19660e+02 13 1.995262e+03 -1.19658e+02 14 2.511886e+03 -1.19655e+02 15 3.162278e+03 -1.19651e+02 16 3.981072e+03 -1.19643e+02 17 5.011872e+03 -1.19632e+02 18 6.309573e+03 -1.19614e+02 19 7.943282e+03 -1.19585e+02 20 1.000000e+04 -1.19540e+02 21 1.258925e+04 -1.19470e+02 22 1.584893e+04 -1.19361e+02 23 1.995262e+04 -1.19194e+02 24 2.511886e+04 -1.18941e+02 25 3.162278e+04 -1.18568e+02 26 3.981072e+04 -1.18036e+02 27 5.011872e+04 -1.17307e+02 28 6.309573e+04 -1.16355e+02 29 7.943282e+04 -1.15177e+02 30 1.000000e+05 -1.13788e+02 31 1.258925e+05 -1.12224e+02 32 1.584893e+05 -1.10523e+02 33 1.995262e+05 -1.08723e+02 34 2.511886e+05 -1.06854e+02 35 3.162278e+05 -1.04939e+02 36 3.981072e+05 -1.02993e+02 37 5.011872e+05 -1.01028e+02 38 6.309573e+05 -9.90496e+01 39 7.943282e+05 -9.70636e+01 40 1.000000e+06 -9.50724e+01 41 1.258925e+06 -9.30780e+01 42 1.584893e+06 -9.10816e+01 43 1.995262e+06 -8.90840e+01 44 2.511886e+06 -8.70856e+01 45 3.162278e+06 -8.50868e+01 46 3.981072e+06 -8.30878e+01 47 5.011872e+06 -8.10890e+01 48 6.309573e+06 -7.90904e+01 49 7.943282e+06 -7.70925e+01 50 1.000000e+07 -7.50957e+01 51 1.258925e+07 -7.31006e+01 52 1.584893e+07 -7.11084e+01 53 1.995262e+07 -6.91206e+01 54 2.511886e+07 -6.71399e+01 Index frequency db(v(3)) ---------------------------------------------------------------- 55 3.162278e+07 -6.51703e+01 56 3.981072e+07 -6.32180e+01 57 5.011872e+07 -6.12926e+01 58 6.309573e+07 -5.94082e+01 59 7.943282e+07 -5.75855e+01 60 1.000000e+08 -5.58524e+01 61 1.258925e+08 -5.42445e+01 62 1.584893e+08 -5.28015e+01 63 1.995262e+08 -5.15603e+01 64 2.511886e+08 -5.05442e+01 65 3.162278e+08 -4.97555e+01 66 3.981072e+08 -4.91749e+01 67 5.011872e+08 -4.87684e+01 68 6.309573e+08 -4.84980e+01 69 7.943282e+08 -4.83303e+01 70 1.000000e+09 -4.82404e+01 Total run time: 0.280 seconds. Current data size = 217088, Data limits: hard = 2147483647, soft = 2147483647. ngspice-26/tests/bsim3/Makefile.in0000644000265600020320000004355612264261541016466 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = ac_sim dc_sim tran_sim MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/transmission/0000755000265600020320000000000012264261715016123 5ustar andreasadminngspice-26/tests/transmission/cpl_ibm2.cir0000644000265600020320000000055712264261473020321 0ustar andreasadminSimple coupled transmissionlines VES IN 0 PULSE (0 1 0N 1.5N 1.5N 4.5N 200N) R1 IN V1 50 R2 V2 0 10 p1 V1 V2 0 V3 V4 0 cpl1 .model cpl1 cpl +R = 0.5 0 0.5 +L = 247.3e-9 31.65e-9 + 247.3e-9 +C = 31.4e-12 -2.45e-12 + 31.4e-12 +G = 0 0 0 +length = 0.3048 R3 V3 0 100 R4 V4 0 100 .OPTION NOACCT .TRAN 0.1N 20N .PRINT TRAN V(V1) V(V3) .END ngspice-26/tests/transmission/txl1_1_line.cir0000644000265600020320000000120512264261473020740 0ustar andreasadminMOSdriver -- lossy line TXL model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 y1 2 0 3 0 ymod vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .OPTION NOACCT .TRAN 0.2N 47N 0 0.1N .PRINT TRAN V(2) V(3) .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL ymod txl R=12.45 L=8.972e-9 G=0 C=0.468e-12 length=16 .end ngspice-26/tests/transmission/txl1_1_line.out0000644000265600020320000005531112264261473021001 0ustar andreasadminCircuit: mosdriver -- lossy line txl model -- c load Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vs: no DC value, transient time 0 value used No. of Data Rows : 493 mosdriver -- lossy line txl model -- c load Transient Analysis Sun Feb 07 19:00:56 2010 -------------------------------------------------------------------------------- Index time v(2) v(3) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 5.000000e+00 1 2.000000e-12 5.000000e+00 5.000000e+00 2 4.000000e-12 5.000000e+00 5.000000e+00 3 8.000000e-12 5.000000e+00 5.000000e+00 4 1.600000e-11 5.000000e+00 5.000000e+00 5 3.200000e-11 5.000001e+00 5.000001e+00 6 6.400000e-11 5.000005e+00 5.000008e+00 7 1.280000e-10 5.000041e+00 5.000062e+00 8 2.280000e-10 5.000154e+00 5.000229e+00 9 3.280000e-10 5.000118e+00 5.000174e+00 10 4.280000e-10 5.000068e+00 5.000110e+00 11 5.280000e-10 5.000035e+00 5.000059e+00 12 6.280000e-10 4.999991e+00 5.000000e+00 13 7.280000e-10 4.999962e+00 4.999953e+00 14 8.280000e-10 4.999924e+00 4.999900e+00 15 9.280000e-10 4.999898e+00 4.999857e+00 16 1.028000e-09 4.999866e+00 4.999808e+00 17 1.128000e-09 4.999852e+00 4.999772e+00 18 1.228000e-09 4.999868e+00 4.999750e+00 19 1.328000e-09 4.999860e+00 4.999721e+00 20 1.428000e-09 4.999813e+00 4.999665e+00 21 1.528000e-09 4.999776e+00 4.999620e+00 22 1.628000e-09 4.999734e+00 4.999569e+00 23 1.728000e-09 4.999700e+00 4.999528e+00 24 1.828000e-09 4.999662e+00 4.999481e+00 25 1.928000e-09 4.999631e+00 4.999444e+00 26 2.028000e-09 4.999596e+00 4.999401e+00 27 2.128000e-09 4.999569e+00 4.999368e+00 28 2.228000e-09 4.999542e+00 4.999337e+00 29 2.328000e-09 4.999521e+00 4.999312e+00 30 2.428000e-09 4.999491e+00 4.999274e+00 31 2.528000e-09 4.999462e+00 4.999239e+00 32 2.628000e-09 4.999432e+00 4.999201e+00 33 2.728000e-09 4.999406e+00 4.999168e+00 34 2.828000e-09 4.999378e+00 4.999133e+00 35 2.928000e-09 4.999354e+00 4.999103e+00 36 3.028000e-09 4.999330e+00 4.999071e+00 37 3.128000e-09 4.999308e+00 4.999043e+00 38 3.228000e-09 4.999287e+00 4.999015e+00 39 3.328000e-09 4.999269e+00 4.998990e+00 40 3.428000e-09 4.999249e+00 4.998964e+00 41 3.528000e-09 4.999228e+00 4.998939e+00 42 3.628000e-09 4.999208e+00 4.998913e+00 43 3.728000e-09 4.999188e+00 4.998890e+00 44 3.828000e-09 4.999169e+00 4.998866e+00 45 3.928000e-09 4.999152e+00 4.998845e+00 46 4.028000e-09 4.999134e+00 4.998823e+00 47 4.128000e-09 4.999118e+00 4.998803e+00 48 4.228000e-09 4.999102e+00 4.998783e+00 49 4.328000e-09 4.999087e+00 4.998766e+00 50 4.428000e-09 4.999073e+00 4.998747e+00 51 4.528000e-09 4.999059e+00 4.998731e+00 52 4.628000e-09 4.999045e+00 4.998713e+00 53 4.728000e-09 4.999032e+00 4.998697e+00 54 4.828000e-09 4.999019e+00 4.998681e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 55 4.928000e-09 4.999007e+00 4.998666e+00 56 5.028000e-09 4.998995e+00 4.998651e+00 57 5.128000e-09 4.998984e+00 4.998638e+00 58 5.228000e-09 4.998973e+00 4.998624e+00 59 5.328000e-09 4.998963e+00 4.998612e+00 60 5.428000e-09 4.998953e+00 4.998599e+00 61 5.528000e-09 4.998944e+00 4.998588e+00 62 5.628000e-09 4.998935e+00 4.998576e+00 63 5.728000e-09 4.998926e+00 4.998565e+00 64 5.828000e-09 4.998917e+00 4.998554e+00 65 5.928000e-09 4.998909e+00 4.998545e+00 66 6.028000e-09 4.998901e+00 4.998535e+00 67 6.128000e-09 4.998894e+00 4.998526e+00 68 6.228000e-09 4.998887e+00 4.998516e+00 69 6.328000e-09 4.998880e+00 4.998508e+00 70 6.428000e-09 4.998873e+00 4.998500e+00 71 6.528000e-09 4.998867e+00 4.998492e+00 72 6.628000e-09 4.998860e+00 4.998484e+00 73 6.728000e-09 4.998855e+00 4.998477e+00 74 6.828000e-09 4.998849e+00 4.998470e+00 75 6.928000e-09 4.998843e+00 4.998463e+00 76 7.028000e-09 4.998838e+00 4.998456e+00 77 7.128000e-09 4.998833e+00 4.998450e+00 78 7.228000e-09 4.998829e+00 4.998444e+00 79 7.328000e-09 4.998824e+00 4.998438e+00 80 7.428000e-09 4.998820e+00 4.998433e+00 81 7.528000e-09 4.998815e+00 4.998428e+00 82 7.628000e-09 4.998811e+00 4.998422e+00 83 7.728000e-09 4.998807e+00 4.998418e+00 84 7.828000e-09 4.998804e+00 4.998413e+00 85 7.928000e-09 4.998800e+00 4.998408e+00 86 8.028000e-09 4.998797e+00 4.998404e+00 87 8.128000e-09 4.998793e+00 4.998400e+00 88 8.228000e-09 4.998790e+00 4.998395e+00 89 8.328000e-09 4.998787e+00 4.998392e+00 90 8.428000e-09 4.998784e+00 4.998388e+00 91 8.528000e-09 4.998781e+00 4.998384e+00 92 8.628000e-09 4.998779e+00 4.998381e+00 93 8.728000e-09 4.998776e+00 4.998377e+00 94 8.828000e-09 4.998773e+00 4.998374e+00 95 8.928000e-09 4.998771e+00 4.998371e+00 96 9.028000e-09 4.998769e+00 4.998368e+00 97 9.128000e-09 4.998766e+00 4.998365e+00 98 9.228000e-09 4.998764e+00 4.998362e+00 99 9.328000e-09 4.998762e+00 4.998359e+00 100 9.428000e-09 4.998760e+00 4.998357e+00 101 9.528000e-09 4.998758e+00 4.998354e+00 102 9.628000e-09 4.998757e+00 4.998352e+00 103 9.728000e-09 4.998755e+00 4.998349e+00 104 9.828000e-09 4.998753e+00 4.998347e+00 105 9.928000e-09 4.998751e+00 4.998345e+00 106 1.002800e-08 4.998750e+00 4.998343e+00 107 1.012800e-08 4.998748e+00 4.998341e+00 108 1.022800e-08 4.998747e+00 4.998338e+00 109 1.032800e-08 4.998746e+00 4.998337e+00 110 1.042800e-08 4.998744e+00 4.998335e+00 111 1.052800e-08 4.998743e+00 4.998333e+00 112 1.062800e-08 4.998742e+00 4.998331e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 113 1.072800e-08 4.998740e+00 4.998329e+00 114 1.082800e-08 4.998739e+00 4.998327e+00 115 1.092800e-08 4.998738e+00 4.998326e+00 116 1.102800e-08 4.998737e+00 4.998324e+00 117 1.112800e-08 4.998736e+00 4.998323e+00 118 1.122800e-08 4.998735e+00 4.998321e+00 119 1.132800e-08 4.998734e+00 4.998320e+00 120 1.142800e-08 4.998733e+00 4.998318e+00 121 1.152800e-08 4.998732e+00 4.998317e+00 122 1.162800e-08 4.998731e+00 4.998315e+00 123 1.172800e-08 4.998730e+00 4.998314e+00 124 1.182800e-08 4.998730e+00 4.998313e+00 125 1.192800e-08 4.998729e+00 4.998312e+00 126 1.202800e-08 4.998728e+00 4.998310e+00 127 1.212800e-08 4.998727e+00 4.998309e+00 128 1.222800e-08 4.998726e+00 4.998308e+00 129 1.232800e-08 4.998726e+00 4.998307e+00 130 1.242800e-08 4.998725e+00 4.998306e+00 131 1.252800e-08 4.998724e+00 4.998305e+00 132 1.262800e-08 4.998724e+00 4.998303e+00 133 1.272800e-08 4.998723e+00 4.998302e+00 134 1.282800e-08 4.998723e+00 4.998301e+00 135 1.292800e-08 4.998722e+00 4.998300e+00 136 1.302800e-08 4.998721e+00 4.998299e+00 137 1.312800e-08 4.998721e+00 4.998298e+00 138 1.322800e-08 4.998720e+00 4.998297e+00 139 1.332800e-08 4.998720e+00 4.998297e+00 140 1.342800e-08 4.998719e+00 4.998296e+00 141 1.352800e-08 4.998719e+00 4.998295e+00 142 1.362800e-08 4.998718e+00 4.998294e+00 143 1.372800e-08 4.998718e+00 4.998293e+00 144 1.382800e-08 4.998717e+00 4.998292e+00 145 1.392800e-08 4.998717e+00 4.998291e+00 146 1.402800e-08 4.998717e+00 4.998290e+00 147 1.412800e-08 4.998716e+00 4.998290e+00 148 1.422800e-08 4.998716e+00 4.998289e+00 149 1.432800e-08 4.998715e+00 4.998288e+00 150 1.442800e-08 4.998715e+00 4.998287e+00 151 1.452800e-08 4.998715e+00 4.998287e+00 152 1.462800e-08 4.998714e+00 4.998286e+00 153 1.472800e-08 4.998714e+00 4.998285e+00 154 1.482800e-08 4.998714e+00 4.998285e+00 155 1.492800e-08 4.998713e+00 4.998284e+00 156 1.502800e-08 4.998713e+00 4.998283e+00 157 1.512800e-08 4.998713e+00 4.998283e+00 158 1.522800e-08 4.998713e+00 4.998282e+00 159 1.532800e-08 4.998712e+00 4.998281e+00 160 1.542800e-08 4.998712e+00 4.998281e+00 161 1.552800e-08 4.998712e+00 4.998280e+00 162 1.562800e-08 4.998712e+00 4.998280e+00 163 1.572800e-08 4.998711e+00 4.998279e+00 164 1.582800e-08 4.998711e+00 4.998278e+00 165 1.590000e-08 4.998596e+00 4.998106e+00 166 1.591000e-08 4.998571e+00 4.997993e+00 167 1.593000e-08 4.998526e+00 4.997985e+00 168 1.597000e-08 4.956088e+00 4.998043e+00 169 1.605000e-08 4.450282e+00 4.998182e+00 170 1.610000e-08 3.834131e+00 4.998106e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 171 1.611000e-08 3.793436e+00 4.998060e+00 172 1.613000e-08 3.761934e+00 4.998064e+00 173 1.617000e-08 3.741943e+00 4.998110e+00 174 1.625000e-08 3.677501e+00 4.998256e+00 175 1.635000e-08 3.614440e+00 4.998413e+00 176 1.645000e-08 3.542730e+00 4.998401e+00 177 1.655000e-08 3.483939e+00 4.998401e+00 178 1.665000e-08 3.419033e+00 4.998389e+00 179 1.675000e-08 3.364326e+00 4.998389e+00 180 1.685000e-08 3.305242e+00 4.998378e+00 181 1.695000e-08 3.254163e+00 4.998379e+00 182 1.705000e-08 3.200134e+00 4.692574e+00 183 1.715000e-08 3.152585e+00 3.804416e+00 184 1.725000e-08 3.102921e+00 3.667061e+00 185 1.735000e-08 3.058587e+00 3.589511e+00 186 1.745000e-08 3.012721e+00 3.474512e+00 187 1.755000e-08 2.971158e+00 3.401226e+00 188 1.765000e-08 2.928632e+00 3.293487e+00 189 1.775000e-08 2.889663e+00 3.223734e+00 190 1.785000e-08 2.850117e+00 3.122570e+00 191 1.795000e-08 2.813517e+00 3.056029e+00 192 1.805000e-08 2.703343e+00 2.960812e+00 193 1.815000e-08 2.406653e+00 2.897285e+00 194 1.825000e-08 2.190892e+00 2.807513e+00 195 1.835000e-08 2.120388e+00 2.746754e+00 196 1.845000e-08 2.042130e+00 2.661951e+00 197 1.855000e-08 1.978664e+00 2.603705e+00 198 1.865000e-08 1.907248e+00 2.523425e+00 199 1.875000e-08 1.847291e+00 2.467524e+00 200 1.885000e-08 1.781786e+00 2.391414e+00 201 1.895000e-08 1.725219e+00 2.337694e+00 202 1.905000e-08 1.664915e+00 2.249172e+00 203 1.915000e-08 1.611600e+00 2.128120e+00 204 1.925000e-08 1.555923e+00 1.977521e+00 205 1.935000e-08 1.505698e+00 1.893028e+00 206 1.945000e-08 1.454141e+00 1.812968e+00 207 1.955000e-08 1.406822e+00 1.753242e+00 208 1.965000e-08 1.358940e+00 1.679627e+00 209 1.975000e-08 1.314353e+00 1.623596e+00 210 1.985000e-08 1.269781e+00 1.555188e+00 211 1.995000e-08 1.227758e+00 1.502637e+00 212 2.005000e-08 1.182839e+00 1.439010e+00 213 2.015000e-08 1.126634e+00 1.389745e+00 214 2.025000e-08 1.061012e+00 1.330521e+00 215 2.035000e-08 1.005025e+00 1.284353e+00 216 2.045000e-08 9.608308e-01 1.229189e+00 217 2.055000e-08 9.211590e-01 1.185928e+00 218 2.065000e-08 8.832356e-01 1.134508e+00 219 2.075000e-08 8.465324e-01 1.093972e+00 220 2.085000e-08 8.115204e-01 1.046013e+00 221 2.095000e-08 7.774503e-01 1.008032e+00 222 2.105000e-08 7.450903e-01 9.627555e-01 223 2.115000e-08 7.134598e-01 9.241539e-01 224 2.125000e-08 6.835235e-01 8.761683e-01 225 2.135000e-08 6.541516e-01 8.369078e-01 226 2.145000e-08 6.264320e-01 7.949794e-01 227 2.155000e-08 5.991475e-01 7.628226e-01 228 2.165000e-08 5.734561e-01 7.260597e-01 Index time v(2) v(3) -------------------------------------------------------------------------------- 229 2.175000e-08 5.480986e-01 6.966752e-01 230 2.185000e-08 5.242655e-01 6.626785e-01 231 2.195000e-08 5.006874e-01 6.354747e-01 232 2.205000e-08 4.784580e-01 6.040056e-01 233 2.215000e-08 4.558712e-01 5.788129e-01 234 2.225000e-08 4.337050e-01 5.496701e-01 235 2.235000e-08 4.113183e-01 5.263311e-01 236 2.245000e-08 3.908536e-01 4.993288e-01 237 2.255000e-08 3.712845e-01 4.776962e-01 238 2.265000e-08 3.533138e-01 4.526622e-01 239 2.275000e-08 3.355437e-01 4.325988e-01 240 2.285000e-08 3.189772e-01 4.093745e-01 241 2.295000e-08 3.025228e-01 3.907533e-01 242 2.305000e-08 2.871863e-01 3.691798e-01 243 2.315000e-08 2.719348e-01 3.517898e-01 244 2.325000e-08 2.577226e-01 3.314864e-01 245 2.335000e-08 2.435732e-01 3.149983e-01 246 2.345000e-08 2.303888e-01 2.960309e-01 247 2.355000e-08 2.172486e-01 2.809184e-01 248 2.365000e-08 2.050034e-01 2.635800e-01 249 2.375000e-08 1.927870e-01 2.496989e-01 250 2.385000e-08 1.814001e-01 2.336319e-01 251 2.395000e-08 1.700292e-01 2.207282e-01 252 2.405000e-08 1.594243e-01 2.057782e-01 253 2.415000e-08 1.488081e-01 1.937585e-01 254 2.425000e-08 1.388593e-01 1.798286e-01 255 2.435000e-08 1.288585e-01 1.686136e-01 256 2.445000e-08 1.195115e-01 1.556154e-01 257 2.455000e-08 1.101997e-01 1.451329e-01 258 2.465000e-08 1.015497e-01 1.329854e-01 259 2.475000e-08 9.291457e-02 1.231692e-01 260 2.485000e-08 8.485580e-02 1.117985e-01 261 2.495000e-08 7.678282e-02 1.025885e-01 262 2.505000e-08 6.923591e-02 9.192681e-02 263 2.515000e-08 6.166898e-02 8.326580e-02 264 2.525000e-08 5.458779e-02 7.324310e-02 265 2.535000e-08 4.748277e-02 6.506755e-02 266 2.545000e-08 4.082635e-02 5.562279e-02 267 2.555000e-08 3.414315e-02 4.790603e-02 268 2.565000e-08 2.787431e-02 3.902051e-02 269 2.575000e-08 2.157653e-02 3.174086e-02 270 2.585000e-08 1.566157e-02 2.336378e-02 271 2.595000e-08 9.716179e-03 1.646913e-02 272 2.605000e-08 4.124555e-03 8.546938e-03 273 2.615000e-08 -1.49882e-03 1.998779e-03 274 2.625000e-08 -6.79585e-03 -5.50848e-03 275 2.635000e-08 -1.21262e-02 -1.17412e-02 276 2.645000e-08 -1.71551e-02 -1.88688e-02 277 2.655000e-08 -2.22140e-02 -2.48140e-02 278 2.665000e-08 -2.69890e-02 -3.15938e-02 279 2.675000e-08 -3.17910e-02 -3.72763e-02 280 2.685000e-08 -3.63309e-02 -4.37372e-02 281 2.695000e-08 -4.08996e-02 -4.91794e-02 282 2.705000e-08 -4.52269e-02 -5.53472e-02 283 2.715000e-08 -4.95828e-02 -6.05691e-02 284 2.725000e-08 -5.37151e-02 -6.64670e-02 285 2.735000e-08 -5.78750e-02 -7.14857e-02 286 2.745000e-08 -6.18275e-02 -7.71337e-02 Index time v(2) v(3) -------------------------------------------------------------------------------- 287 2.755000e-08 -6.58063e-02 -8.19644e-02 288 2.765000e-08 -6.95925e-02 -8.73801e-02 289 2.775000e-08 -7.34038e-02 -9.20353e-02 290 2.785000e-08 -7.70359e-02 -9.72348e-02 291 2.795000e-08 -8.06916e-02 -1.01728e-01 292 2.805000e-08 -8.41807e-02 -1.06727e-01 293 2.815000e-08 -8.76917e-02 -1.11069e-01 294 2.825000e-08 -9.10473e-02 -1.15883e-01 295 2.835000e-08 -9.44231e-02 -1.20085e-01 296 2.845000e-08 -9.76539e-02 -1.24724e-01 297 2.855000e-08 -1.00903e-01 -1.28795e-01 298 2.865000e-08 -1.04016e-01 -1.33272e-01 299 2.875000e-08 -1.07146e-01 -1.37219e-01 300 2.885000e-08 -1.10148e-01 -1.41543e-01 301 2.895000e-08 -1.13165e-01 -1.45373e-01 302 2.905000e-08 -1.16064e-01 -1.49553e-01 303 2.915000e-08 -1.18975e-01 -1.53272e-01 304 2.925000e-08 -1.21774e-01 -1.57316e-01 305 2.935000e-08 -1.24585e-01 -1.60930e-01 306 2.945000e-08 -1.27291e-01 -1.64844e-01 307 2.955000e-08 -1.30007e-01 -1.68357e-01 308 2.965000e-08 -1.32624e-01 -1.72148e-01 309 2.975000e-08 -1.35249e-01 -1.75564e-01 310 2.985000e-08 -1.37781e-01 -1.79238e-01 311 2.995000e-08 -1.40319e-01 -1.82561e-01 312 3.005000e-08 -1.42770e-01 -1.86122e-01 313 3.015000e-08 -1.45225e-01 -1.89355e-01 314 3.025000e-08 -1.47598e-01 -1.92808e-01 315 3.035000e-08 -1.49973e-01 -1.95954e-01 316 3.045000e-08 -1.52270e-01 -1.99303e-01 317 3.055000e-08 -1.54569e-01 -2.02364e-01 318 3.065000e-08 -1.56793e-01 -2.05612e-01 319 3.075000e-08 -1.59017e-01 -2.08592e-01 320 3.085000e-08 -1.61171e-01 -2.11742e-01 321 3.095000e-08 -1.63323e-01 -2.14641e-01 322 3.105000e-08 -1.65409e-01 -2.17697e-01 323 3.115000e-08 -1.67491e-01 -2.20517e-01 324 3.125000e-08 -1.69510e-01 -2.23482e-01 325 3.135000e-08 -1.71525e-01 -2.26224e-01 326 3.145000e-08 -1.73480e-01 -2.29099e-01 327 3.155000e-08 -1.75429e-01 -2.31766e-01 328 3.165000e-08 -1.77320e-01 -2.34554e-01 329 3.175000e-08 -1.79205e-01 -2.37146e-01 330 3.185000e-08 -1.81035e-01 -2.39849e-01 331 3.190000e-08 -1.81987e-01 -2.41064e-01 332 3.191000e-08 -1.85346e-01 -2.41351e-01 333 3.193000e-08 -1.93715e-01 -2.41885e-01 334 3.197000e-08 -1.82850e-01 -2.42916e-01 335 3.203372e-08 2.930167e-02 -2.44513e-01 336 3.209349e-08 5.451883e-01 -2.46002e-01 337 3.210000e-08 6.218717e-01 -2.46172e-01 338 3.210179e-08 6.355696e-01 -2.46216e-01 339 3.210537e-08 6.545462e-01 -2.46306e-01 340 3.211253e-08 6.672464e-01 -2.46490e-01 341 3.212685e-08 6.750693e-01 -2.46847e-01 342 3.214598e-08 6.848948e-01 -2.47323e-01 343 3.218423e-08 7.047906e-01 -2.48281e-01 344 3.226074e-08 7.437148e-01 -2.50139e-01 Index time v(2) v(3) -------------------------------------------------------------------------------- 345 3.236074e-08 7.933228e-01 -2.52576e-01 346 3.246074e-08 8.413111e-01 -2.54960e-01 347 3.256074e-08 8.876989e-01 -2.57327e-01 348 3.266074e-08 9.322713e-01 -2.59639e-01 349 3.276074e-08 9.753935e-01 -2.61930e-01 350 3.286074e-08 1.016930e+00 -2.64170e-01 351 3.296074e-08 1.057143e+00 -2.74673e-01 352 3.306074e-08 1.096000e+00 -9.32541e-02 353 3.316074e-08 1.133632e+00 5.705877e-01 354 3.324123e-08 1.163080e+00 6.517344e-01 355 3.332580e-08 1.193202e+00 6.945873e-01 356 3.342580e-08 1.227693e+00 7.782361e-01 357 3.352580e-08 1.261289e+00 8.303386e-01 358 3.362580e-08 1.293926e+00 9.099424e-01 359 3.372580e-08 1.325630e+00 9.600411e-01 360 3.382580e-08 1.356467e+00 1.035487e+00 361 3.392580e-08 1.385466e+00 1.083753e+00 362 3.402580e-08 1.433897e+00 1.155387e+00 363 3.412580e-08 1.600149e+00 1.201988e+00 364 3.422580e-08 1.859180e+00 1.270114e+00 365 3.432580e-08 1.940568e+00 1.315174e+00 366 3.442580e-08 1.997020e+00 1.380073e+00 367 3.452580e-08 2.063946e+00 1.423684e+00 368 3.462580e-08 2.119255e+00 1.485625e+00 369 3.472580e-08 2.182057e+00 1.527946e+00 370 3.482580e-08 2.235102e+00 1.587141e+00 371 3.492580e-08 2.294113e+00 1.627977e+00 372 3.502580e-08 2.344918e+00 1.689460e+00 373 3.512580e-08 2.400507e+00 1.769210e+00 374 3.522580e-08 2.449126e+00 1.910549e+00 375 3.532580e-08 2.501602e+00 2.009290e+00 376 3.542580e-08 2.548104e+00 2.079976e+00 377 3.552580e-08 2.597732e+00 2.137241e+00 378 3.562580e-08 2.642203e+00 2.203109e+00 379 3.572580e-08 2.689236e+00 2.257941e+00 380 3.582580e-08 2.731771e+00 2.320927e+00 381 3.592580e-08 2.776346e+00 2.373282e+00 382 3.602580e-08 2.818129e+00 2.433461e+00 383 3.612580e-08 2.870777e+00 2.483478e+00 384 3.622580e-08 2.937062e+00 2.540954e+00 385 3.632580e-08 3.006378e+00 2.588760e+00 386 3.642580e-08 3.058234e+00 2.643640e+00 387 3.652580e-08 3.104831e+00 2.689351e+00 388 3.662580e-08 3.147858e+00 2.741746e+00 389 3.672580e-08 3.191688e+00 2.785476e+00 390 3.682580e-08 3.232663e+00 2.835501e+00 391 3.692580e-08 3.274182e+00 2.877339e+00 392 3.702580e-08 3.313152e+00 2.925328e+00 393 3.712580e-08 3.352496e+00 2.967790e+00 394 3.722580e-08 3.389546e+00 3.021023e+00 395 3.732580e-08 3.426845e+00 3.070169e+00 396 3.742580e-08 3.462064e+00 3.121504e+00 397 3.752580e-08 3.497437e+00 3.162241e+00 398 3.762580e-08 3.530914e+00 3.206571e+00 399 3.772580e-08 3.564476e+00 3.244264e+00 400 3.782580e-08 3.596302e+00 3.286320e+00 401 3.792580e-08 3.628158e+00 3.322197e+00 402 3.802580e-08 3.658465e+00 3.362130e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 403 3.812580e-08 3.689286e+00 3.396270e+00 404 3.822580e-08 3.720127e+00 3.434179e+00 405 3.832580e-08 3.752458e+00 3.466663e+00 406 3.842580e-08 3.783250e+00 3.502647e+00 407 3.852580e-08 3.812690e+00 3.533557e+00 408 3.862580e-08 3.840002e+00 3.567713e+00 409 3.872580e-08 3.866992e+00 3.597127e+00 410 3.882580e-08 3.892716e+00 3.629553e+00 411 3.892580e-08 3.918290e+00 3.657547e+00 412 3.902580e-08 3.942688e+00 3.688343e+00 413 3.912580e-08 3.966931e+00 3.715106e+00 414 3.922580e-08 3.990072e+00 3.744817e+00 415 3.932580e-08 4.013059e+00 3.771175e+00 416 3.942580e-08 4.035014e+00 3.800106e+00 417 3.952580e-08 4.056817e+00 3.825142e+00 418 3.962580e-08 4.077653e+00 3.852030e+00 419 3.972580e-08 4.098340e+00 3.875373e+00 420 3.982580e-08 4.118122e+00 3.900710e+00 421 3.992580e-08 4.137759e+00 3.922878e+00 422 4.002580e-08 4.156550e+00 3.946917e+00 423 4.012580e-08 4.175225e+00 3.968002e+00 424 4.022580e-08 4.193199e+00 3.990819e+00 425 4.032580e-08 4.211201e+00 4.010882e+00 426 4.042580e-08 4.228574e+00 4.032548e+00 427 4.052580e-08 4.245783e+00 4.051647e+00 428 4.062580e-08 4.262173e+00 4.072231e+00 429 4.072580e-08 4.278347e+00 4.090423e+00 430 4.082580e-08 4.293828e+00 4.109990e+00 431 4.092580e-08 4.309174e+00 4.127328e+00 432 4.102580e-08 4.323896e+00 4.145940e+00 433 4.112580e-08 4.338494e+00 4.162480e+00 434 4.122580e-08 4.352509e+00 4.180219e+00 435 4.132580e-08 4.366404e+00 4.196065e+00 436 4.142580e-08 4.379754e+00 4.213046e+00 437 4.152580e-08 4.392990e+00 4.228232e+00 438 4.162580e-08 4.405716e+00 4.244403e+00 439 4.172580e-08 4.418335e+00 4.258861e+00 440 4.182580e-08 4.430475e+00 4.274236e+00 441 4.192580e-08 4.442514e+00 4.288039e+00 442 4.202580e-08 4.454106e+00 4.302706e+00 443 4.212580e-08 4.465603e+00 4.315913e+00 444 4.222580e-08 4.476686e+00 4.329922e+00 445 4.232580e-08 4.487690e+00 4.342570e+00 446 4.242580e-08 4.498317e+00 4.355962e+00 447 4.252580e-08 4.508865e+00 4.368087e+00 448 4.262580e-08 4.519042e+00 4.380901e+00 449 4.272580e-08 4.529127e+00 4.392535e+00 450 4.282580e-08 4.538859e+00 4.404809e+00 451 4.292580e-08 4.548509e+00 4.415983e+00 452 4.302580e-08 4.557837e+00 4.427750e+00 453 4.312580e-08 4.567088e+00 4.438493e+00 454 4.322580e-08 4.576039e+00 4.449786e+00 455 4.332580e-08 4.584918e+00 4.460128e+00 456 4.342580e-08 4.593515e+00 4.470982e+00 457 4.352580e-08 4.602045e+00 4.480952e+00 458 4.362580e-08 4.610310e+00 4.491393e+00 459 4.372580e-08 4.618511e+00 4.501003e+00 460 4.382580e-08 4.626466e+00 4.511047e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 461 4.392580e-08 4.634358e+00 4.520317e+00 462 4.402580e-08 4.642020e+00 4.529991e+00 463 4.412580e-08 4.649623e+00 4.538945e+00 464 4.422580e-08 4.657009e+00 4.548274e+00 465 4.432580e-08 4.664340e+00 4.556931e+00 466 4.442580e-08 4.671470e+00 4.565935e+00 467 4.452580e-08 4.678547e+00 4.574313e+00 468 4.462580e-08 4.685434e+00 4.583011e+00 469 4.472580e-08 4.692269e+00 4.591126e+00 470 4.482580e-08 4.698924e+00 4.599538e+00 471 4.492580e-08 4.705530e+00 4.607405e+00 472 4.502580e-08 4.711967e+00 4.615546e+00 473 4.512580e-08 4.718356e+00 4.623179e+00 474 4.522580e-08 4.724588e+00 4.631064e+00 475 4.532580e-08 4.730774e+00 4.638476e+00 476 4.542580e-08 4.736811e+00 4.646121e+00 477 4.552580e-08 4.742804e+00 4.653324e+00 478 4.562580e-08 4.748657e+00 4.660742e+00 479 4.572580e-08 4.754468e+00 4.667747e+00 480 4.582580e-08 4.760147e+00 4.674949e+00 481 4.592580e-08 4.765784e+00 4.681764e+00 482 4.602580e-08 4.771297e+00 4.688762e+00 483 4.612580e-08 4.776770e+00 4.695397e+00 484 4.622580e-08 4.782126e+00 4.702200e+00 485 4.632580e-08 4.787443e+00 4.708665e+00 486 4.642580e-08 4.792649e+00 4.715284e+00 487 4.652580e-08 4.797817e+00 4.721586e+00 488 4.662580e-08 4.802881e+00 4.728028e+00 489 4.672580e-08 4.807907e+00 4.734174e+00 490 4.682580e-08 4.812833e+00 4.740449e+00 491 4.692580e-08 4.817724e+00 4.746446e+00 492 4.700000e-08 4.821159e+00 4.750884e+00 ngspice-26/tests/transmission/ltra2_2_line.cir0000644000265600020320000000156612264261473021107 0ustar andreasadminMOSdriver -- 2 lossy lines LTRA model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u m1 0 3 4 0 mn0p9 w = 18.0u l=0.9u m2 1 3 4 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 CN4 4 0 0.025398e-12 CN5 5 0 0.007398e-12 o1 2 0 3 0 lline o2 4 0 5 0 lline vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .OPTION NOACCT .TRAN 0.2N 47N 0 0.1N .PRINT TRAN V(2) V(3) V(4) V(5) .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .model lline ltra rel=1 r=12.45 g=0 l=8.972e-9 c=0.468e-12 +len=16 steplimit compactrel=1.0e-3 compactabs=1.0e-14 .end ngspice-26/tests/transmission/cpl3_4_line.cir0000644000265600020320000000176412264261473020726 0ustar andreasadmin6.3inch 4 lossy lines CPL model -- R load Ra 1 2 1K Rb 0 3 1K Rc 0 4 1K Rd 0 5 1K Re 6 0 1Meg Rf 7 0 1Meg Rg 8 0 1Meg Rh 9 0 1Meg * P1 2 3 4 5 0 6 7 8 9 0 LOSSYMODE * * VS1 1 0 PWL(15.9NS 0.0 16.1Ns 5.0 31.9Ns 5.0 32.1Ns 0.0) * .OPTION NOACCT .TRAN 0.2NS 50NS 0 0.05N .PRINT TRAN V(2) V(7) V(9) .MODEL LOSSYMODE CPL +R=0.3 0 0 0 + 0.3 0 0 + 0.3 0 + 0.3 +L=9e-9 5.4e-9 0 0 + 9e-9 5.4e-9 0 + 9e-9 5.4e-9 + 9e-9 +G=0 0 0 0 0 0 0 0 0 0 +C=3.5e-13 -3e-14 0 0 + 3.5e-13 -3e-14 0 + 3.5e-13 -3e-14 + 3.5e-13 +length=6.3 .END ngspice-26/tests/transmission/txl2_3_line.cir0000644000265600020320000000161212264261473020745 0ustar andreasadminMOSdriver -- 3 lossy lines TXL model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u m1 0 3 4 0 mn0p9 w = 18.0u l=0.9u m2 1 3 4 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 CN4 4 0 0.025398e-12 CN5 5 0 0.007398e-12 CN6 6 0 0.007398e-12 CN7 168 0 0.007398e-12 y1 2 0 3 0 ymod y2 4 0 5 0 ymod y3 6 0 168 0 ymod vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .OPTION NOACCT .TRAN 0.2N 47N 0 0.1N .PRINT TRAN V(2) V(3) V(4) V(5) V(6) .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL ymod txl R=12.45 L=8.972e-9 G=0 C=0.468e-12 length=16 .end ngspice-26/tests/transmission/cpl_ibm2.out0000644000265600020320000002422212264261473020346 0ustar andreasadminCircuit: simple coupled transmissionlines Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: ves: no DC value, transient time 0 value used No. of Data Rows : 217 simple coupled transmissionlines Transient Analysis Sun Feb 07 19:00:52 2010 -------------------------------------------------------------------------------- Index time v(v1) v(v3) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 1.000000e-12 4.253641e-04 -1.99874e-15 2 2.000000e-12 8.508862e-04 -3.99915e-15 3 4.000000e-12 1.701772e-03 -7.99831e-15 4 8.000000e-12 3.403562e-03 -1.59974e-14 5 1.600000e-11 6.806254e-03 -3.19847e-14 6 3.200000e-11 1.361164e-02 -6.39593e-14 7 6.400000e-11 2.722330e-02 -1.27919e-13 8 1.280000e-10 5.444661e-02 -2.55839e-13 9 2.280000e-10 9.698304e-02 -4.55713e-13 10 3.280000e-10 1.395193e-01 -6.55586e-13 11 4.280000e-10 1.820555e-01 -8.55458e-13 12 5.280000e-10 2.245917e-01 -1.05533e-12 13 6.280000e-10 2.670837e-01 -1.25469e-12 14 7.280000e-10 3.096200e-01 -1.45456e-12 15 8.280000e-10 3.521562e-01 8.165704e-04 16 9.280000e-10 3.946924e-01 3.741859e-02 17 1.028000e-09 4.372287e-01 8.251621e-02 18 1.128000e-09 4.798082e-01 1.281325e-01 19 1.228000e-09 5.223445e-01 1.732303e-01 20 1.328000e-09 5.648807e-01 2.185829e-01 21 1.428000e-09 6.074169e-01 2.638859e-01 22 1.500000e-09 6.380430e-01 2.959141e-01 23 1.510000e-09 6.379982e-01 3.003551e-01 24 1.530000e-09 6.379982e-01 3.093746e-01 25 1.570000e-09 6.380102e-01 3.274134e-01 26 1.650000e-09 6.380624e-01 3.634912e-01 27 1.750000e-09 6.399480e-01 4.085892e-01 28 1.850000e-09 6.419275e-01 4.538528e-01 29 1.950000e-09 6.439479e-01 4.988394e-01 30 2.050000e-09 6.459482e-01 5.439321e-01 31 2.150000e-09 6.479620e-01 5.890298e-01 32 2.250000e-09 6.499669e-01 6.341275e-01 33 2.350000e-09 6.519641e-01 6.732024e-01 34 2.450000e-09 6.539632e-01 6.765236e-01 35 2.550000e-09 6.559478e-01 6.757760e-01 36 2.650000e-09 6.579445e-01 6.751314e-01 37 2.750000e-09 6.599443e-01 6.744503e-01 38 2.850000e-09 6.619430e-01 6.737685e-01 39 2.950000e-09 6.639423e-01 6.730791e-01 40 3.050000e-09 6.659417e-01 6.723949e-01 41 3.150000e-09 6.675632e-01 6.717128e-01 42 3.250000e-09 6.679784e-01 6.710292e-01 43 3.350000e-09 6.679316e-01 6.703519e-01 44 3.450000e-09 6.678385e-01 6.696686e-01 45 3.550000e-09 6.677413e-01 6.689855e-01 46 3.650000e-09 6.676444e-01 6.683022e-01 47 3.750000e-09 6.675474e-01 6.676192e-01 48 3.850000e-09 6.674505e-01 6.669359e-01 49 3.950000e-09 6.673540e-01 6.664076e-01 50 4.050000e-09 6.672576e-01 6.663285e-01 51 4.150000e-09 6.671616e-01 6.663320e-01 52 4.250000e-09 6.670654e-01 6.663595e-01 53 4.350000e-09 6.669690e-01 6.663923e-01 54 4.450000e-09 6.668725e-01 6.664237e-01 Index time v(v1) v(v3) -------------------------------------------------------------------------------- 55 4.550000e-09 6.667761e-01 6.664552e-01 56 4.650000e-09 6.666796e-01 6.664868e-01 57 4.750000e-09 6.665953e-01 6.665182e-01 58 4.850000e-09 6.665554e-01 6.665496e-01 59 4.950000e-09 6.665492e-01 6.665808e-01 60 5.050000e-09 6.665528e-01 6.666121e-01 61 5.150000e-09 6.665581e-01 6.666435e-01 62 5.250000e-09 6.665636e-01 6.666749e-01 63 5.350000e-09 6.665690e-01 6.667063e-01 64 5.450000e-09 6.665745e-01 6.667378e-01 65 5.550000e-09 6.665799e-01 6.667641e-01 66 5.650000e-09 6.665854e-01 6.667731e-01 67 5.750000e-09 6.665908e-01 6.667715e-01 68 5.850000e-09 6.665962e-01 6.667688e-01 69 5.950000e-09 6.666016e-01 6.667668e-01 70 6.000000e-09 6.666043e-01 6.667659e-01 71 6.010000e-09 6.623512e-01 6.667658e-01 72 6.030000e-09 6.538053e-01 6.667654e-01 73 6.070000e-09 6.368394e-01 6.667647e-01 74 6.150000e-09 6.028150e-01 6.667633e-01 75 6.250000e-09 5.602840e-01 6.667615e-01 76 6.350000e-09 5.177528e-01 6.667597e-01 77 6.450000e-09 4.752200e-01 6.667580e-01 78 6.550000e-09 4.326850e-01 6.667562e-01 79 6.650000e-09 3.901489e-01 6.667545e-01 80 6.750000e-09 3.475691e-01 6.667527e-01 81 6.850000e-09 3.050326e-01 6.603526e-01 82 6.950000e-09 2.624960e-01 6.185044e-01 83 7.050000e-09 2.199595e-01 5.734047e-01 84 7.150000e-09 1.774230e-01 5.283054e-01 85 7.250000e-09 1.348864e-01 4.832067e-01 86 7.350000e-09 9.234988e-02 4.381088e-01 87 7.450000e-09 4.981334e-02 3.932656e-01 88 7.500000e-09 2.854517e-02 3.713293e-01 89 7.510000e-09 2.858946e-02 3.669088e-01 90 7.530000e-09 2.858939e-02 3.579076e-01 91 7.570000e-09 2.858927e-02 3.398758e-01 92 7.650000e-09 2.820347e-02 3.038038e-01 93 7.750000e-09 2.662883e-02 2.587058e-01 94 7.850000e-09 2.464179e-02 2.136082e-01 95 7.950000e-09 2.264214e-02 1.685106e-01 96 8.050000e-09 2.064256e-02 1.234130e-01 97 8.150000e-09 1.864307e-02 7.831535e-02 98 8.250000e-09 1.665465e-02 3.321773e-02 99 8.350000e-09 1.466686e-02 -6.06555e-03 100 8.450000e-09 1.266845e-02 -9.49006e-03 101 8.550000e-09 1.066913e-02 -8.89781e-03 102 8.650000e-09 8.669789e-03 -8.23487e-03 103 8.750000e-09 6.670455e-03 -7.55819e-03 104 8.850000e-09 4.671120e-03 -6.87489e-03 105 8.950000e-09 2.671785e-03 -6.19163e-03 106 9.050000e-09 6.724503e-04 -5.51284e-03 107 9.150000e-09 -9.63311e-04 -4.83328e-03 108 9.250000e-09 -1.37374e-03 -4.14968e-03 109 9.350000e-09 -1.33094e-03 -3.46676e-03 110 9.450000e-09 -1.24263e-03 -2.78356e-03 111 9.550000e-09 -1.14676e-03 -2.10034e-03 112 9.650000e-09 -1.05027e-03 -1.41712e-03 Index time v(v1) v(v3) -------------------------------------------------------------------------------- 113 9.750000e-09 -9.53785e-04 -7.33903e-04 114 9.850000e-09 -8.57650e-04 -5.06836e-05 115 9.950000e-09 -7.61713e-04 4.834588e-04 116 1.005000e-08 -6.65454e-04 5.593809e-04 117 1.015000e-08 -5.68998e-04 5.575726e-04 118 1.025000e-08 -4.72521e-04 5.324044e-04 119 1.035000e-08 -3.76044e-04 4.999795e-04 120 1.045000e-08 -2.79567e-04 4.684646e-04 121 1.055000e-08 -1.83090e-04 4.370662e-04 122 1.065000e-08 -8.66135e-05 4.057951e-04 123 1.075000e-08 -1.90554e-06 3.745803e-04 124 1.085000e-08 3.809786e-05 3.432148e-04 125 1.095000e-08 4.437435e-05 3.117856e-04 126 1.105000e-08 4.089016e-05 2.803661e-04 127 1.115000e-08 3.576288e-05 2.489538e-04 128 1.125000e-08 3.036042e-05 2.175408e-04 129 1.135000e-08 2.492757e-05 1.861277e-04 130 1.145000e-08 1.950567e-05 1.547147e-04 131 1.155000e-08 1.409754e-05 1.281614e-04 132 1.165000e-08 8.684139e-06 1.192114e-04 133 1.175000e-08 3.258276e-06 1.208217e-04 134 1.185000e-08 -2.17344e-06 1.234484e-04 135 1.195000e-08 -7.60616e-06 1.253448e-04 136 1.205000e-08 -1.30389e-05 1.271274e-04 137 1.215000e-08 -1.84716e-05 1.288982e-04 138 1.225000e-08 -2.39044e-05 1.306558e-04 139 1.235000e-08 -2.89520e-05 1.324079e-04 140 1.245000e-08 -3.22956e-05 1.341633e-04 141 1.255000e-08 -3.35802e-05 1.359238e-04 142 1.265000e-08 -3.37078e-05 1.376858e-04 143 1.275000e-08 -3.34791e-05 1.394476e-04 144 1.285000e-08 -3.31820e-05 1.412092e-04 145 1.295000e-08 -3.28741e-05 1.429707e-04 146 1.305000e-08 -3.25649e-05 1.447323e-04 147 1.315000e-08 -3.22563e-05 1.463348e-04 148 1.325000e-08 -3.19479e-05 1.472613e-04 149 1.335000e-08 -3.16390e-05 1.474635e-04 150 1.345000e-08 -3.13297e-05 1.473559e-04 151 1.355000e-08 -3.10201e-05 1.472216e-04 152 1.365000e-08 -3.07105e-05 1.471105e-04 153 1.375000e-08 -3.04009e-05 1.470083e-04 154 1.385000e-08 -3.00913e-05 1.469077e-04 155 1.395000e-08 -2.97943e-05 1.468077e-04 156 1.405000e-08 -2.95610e-05 1.467078e-04 157 1.415000e-08 -2.94316e-05 1.466076e-04 158 1.425000e-08 -2.93888e-05 1.465073e-04 159 1.435000e-08 -2.93890e-05 1.464069e-04 160 1.445000e-08 -2.94030e-05 1.463066e-04 161 1.455000e-08 -2.94200e-05 1.462062e-04 162 1.465000e-08 -2.94376e-05 1.461058e-04 163 1.475000e-08 -2.94552e-05 1.460107e-04 164 1.485000e-08 -2.94728e-05 1.459409e-04 165 1.495000e-08 -2.94904e-05 1.459094e-04 166 1.505000e-08 -2.95080e-05 1.459054e-04 167 1.515000e-08 -2.95257e-05 1.459113e-04 168 1.525000e-08 -2.95433e-05 1.459182e-04 169 1.535000e-08 -2.95610e-05 1.459244e-04 170 1.545000e-08 -2.95787e-05 1.459302e-04 Index time v(v1) v(v3) -------------------------------------------------------------------------------- 171 1.555000e-08 -2.95959e-05 1.459359e-04 172 1.565000e-08 -2.96108e-05 1.459416e-04 173 1.575000e-08 -2.96209e-05 1.459473e-04 174 1.585000e-08 -2.96259e-05 1.459530e-04 175 1.595000e-08 -2.96272e-05 1.459587e-04 176 1.605000e-08 -2.96269e-05 1.459645e-04 177 1.615000e-08 -2.96261e-05 1.459702e-04 178 1.625000e-08 -2.96251e-05 1.459759e-04 179 1.635000e-08 -2.96241e-05 1.459815e-04 180 1.645000e-08 -2.96231e-05 1.459861e-04 181 1.655000e-08 -2.96221e-05 1.459889e-04 182 1.665000e-08 -2.96211e-05 1.459899e-04 183 1.675000e-08 -2.96201e-05 1.459900e-04 184 1.685000e-08 -2.96191e-05 1.459896e-04 185 1.695000e-08 -2.96181e-05 1.459893e-04 186 1.705000e-08 -2.96171e-05 1.459889e-04 187 1.715000e-08 -2.96161e-05 1.459886e-04 188 1.725000e-08 -2.96152e-05 1.459883e-04 189 1.735000e-08 -2.96145e-05 1.459879e-04 190 1.745000e-08 -2.96140e-05 1.459876e-04 191 1.755000e-08 -2.96139e-05 1.459873e-04 192 1.765000e-08 -2.96138e-05 1.459870e-04 193 1.775000e-08 -2.96139e-05 1.459866e-04 194 1.785000e-08 -2.96139e-05 1.459863e-04 195 1.795000e-08 -2.96140e-05 1.459860e-04 196 1.805000e-08 -2.96140e-05 1.459857e-04 197 1.815000e-08 -2.96141e-05 1.459855e-04 198 1.825000e-08 -2.96141e-05 1.459854e-04 199 1.835000e-08 -2.96142e-05 1.459853e-04 200 1.845000e-08 -2.96142e-05 1.459853e-04 201 1.855000e-08 -2.96143e-05 1.459854e-04 202 1.865000e-08 -2.96144e-05 1.459854e-04 203 1.875000e-08 -2.96144e-05 1.459854e-04 204 1.885000e-08 -2.96145e-05 1.459854e-04 205 1.895000e-08 -2.96145e-05 1.459854e-04 206 1.905000e-08 -2.96145e-05 1.459855e-04 207 1.915000e-08 -2.96146e-05 1.459855e-04 208 1.925000e-08 -2.96146e-05 1.459855e-04 209 1.935000e-08 -2.96146e-05 1.459855e-04 210 1.945000e-08 -2.96146e-05 1.459855e-04 211 1.955000e-08 -2.96146e-05 1.459856e-04 212 1.965000e-08 -2.96146e-05 1.459856e-04 213 1.975000e-08 -2.96146e-05 1.459856e-04 214 1.985000e-08 -2.96146e-05 1.459856e-04 215 1.995000e-08 -2.96146e-05 1.459856e-04 216 2.000000e-08 -2.96146e-05 1.459856e-04 ngspice-26/tests/transmission/ltra2_2_line.out0000644000265600020320000013523612264261473021143 0ustar andreasadminCircuit: mosdriver -- 2 lossy lines ltra model -- c load Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vs: no DC value, transient time 0 value used No. of Data Rows : 510 mosdriver -- 2 lossy lines ltra model -- c load Transient Analysis Sat Jan 16 17:43:34 2010 -------------------------------------------------------------------------------- Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 5.000000e+00 1.242558e-09 1 2.000000e-12 5.000000e+00 5.000000e+00 1.242558e-09 2 4.000000e-12 5.000000e+00 5.000000e+00 1.242558e-09 3 8.000000e-12 5.000000e+00 5.000000e+00 1.242558e-09 4 1.600000e-11 5.000000e+00 5.000000e+00 1.242558e-09 5 3.200000e-11 5.000000e+00 5.000000e+00 1.242558e-09 6 6.400000e-11 5.000000e+00 5.000000e+00 1.242558e-09 7 1.280000e-10 5.000000e+00 5.000000e+00 1.242558e-09 8 2.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 9 3.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 10 4.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 11 5.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 12 6.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 13 7.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 14 8.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 15 9.280000e-10 5.000000e+00 5.000000e+00 1.242559e-09 16 1.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 17 1.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 18 1.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 19 1.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 20 1.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 21 1.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 22 1.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 23 1.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 24 1.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 25 1.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 26 2.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 27 2.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 28 2.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 29 2.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 30 2.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 31 2.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 32 2.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 33 2.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 34 2.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 35 2.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 36 3.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 37 3.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 38 3.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 39 3.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 40 3.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 41 3.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 42 3.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 43 3.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 44 3.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 45 3.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 46 4.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 47 4.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 48 4.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 49 4.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 50 4.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 51 4.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 52 4.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 53 4.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 54 4.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 55 4.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 56 5.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 57 5.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 58 5.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 59 5.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 60 5.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 61 5.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 62 5.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 63 5.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 64 5.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 65 5.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 66 6.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 67 6.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 68 6.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 69 6.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 70 6.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 71 6.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 72 6.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 73 6.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 74 6.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 75 6.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 76 7.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 77 7.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 78 7.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 79 7.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 80 7.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 81 7.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 82 7.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 83 7.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 84 7.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 85 7.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 86 8.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 87 8.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 88 8.228000e-09 5.000000e+00 5.000000e+00 1.242559e-09 89 8.328000e-09 5.000000e+00 5.000000e+00 1.242559e-09 90 8.428000e-09 5.000000e+00 5.000000e+00 1.242559e-09 91 8.528000e-09 5.000000e+00 5.000000e+00 1.242559e-09 92 8.628000e-09 5.000000e+00 5.000000e+00 1.242559e-09 93 8.728000e-09 5.000000e+00 5.000000e+00 1.242559e-09 94 8.828000e-09 5.000000e+00 5.000000e+00 1.242559e-09 95 8.928000e-09 5.000000e+00 5.000000e+00 1.242559e-09 96 9.028000e-09 5.000000e+00 5.000000e+00 1.242559e-09 97 9.128000e-09 5.000000e+00 5.000000e+00 1.242559e-09 98 9.228000e-09 5.000000e+00 5.000000e+00 1.242560e-09 99 9.328000e-09 5.000000e+00 5.000000e+00 1.242560e-09 100 9.428000e-09 5.000000e+00 5.000000e+00 1.242560e-09 101 9.528000e-09 5.000000e+00 5.000000e+00 1.242560e-09 102 9.628000e-09 5.000000e+00 5.000000e+00 1.242560e-09 103 9.728000e-09 5.000000e+00 5.000000e+00 1.242560e-09 104 9.828000e-09 5.000000e+00 5.000000e+00 1.242560e-09 105 9.928000e-09 5.000000e+00 5.000000e+00 1.242560e-09 106 1.002800e-08 5.000000e+00 5.000000e+00 1.242560e-09 107 1.012800e-08 5.000000e+00 5.000000e+00 1.242560e-09 108 1.022800e-08 5.000000e+00 5.000000e+00 1.242560e-09 109 1.032800e-08 5.000000e+00 5.000000e+00 1.242560e-09 110 1.042800e-08 5.000000e+00 5.000000e+00 1.242560e-09 111 1.052800e-08 5.000000e+00 5.000000e+00 1.242560e-09 112 1.062800e-08 5.000000e+00 5.000000e+00 1.242560e-09 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 113 1.072800e-08 5.000000e+00 5.000000e+00 1.242560e-09 114 1.082800e-08 5.000000e+00 5.000000e+00 1.242560e-09 115 1.092800e-08 5.000000e+00 5.000000e+00 1.242560e-09 116 1.102800e-08 5.000000e+00 5.000000e+00 1.242560e-09 117 1.112800e-08 5.000000e+00 5.000000e+00 1.242560e-09 118 1.122800e-08 5.000000e+00 5.000000e+00 1.242560e-09 119 1.132800e-08 5.000000e+00 5.000000e+00 1.242560e-09 120 1.142800e-08 5.000000e+00 5.000000e+00 1.242560e-09 121 1.152800e-08 5.000000e+00 5.000000e+00 1.242560e-09 122 1.162800e-08 5.000000e+00 5.000000e+00 1.242560e-09 123 1.172800e-08 5.000000e+00 5.000000e+00 1.242560e-09 124 1.182800e-08 5.000000e+00 5.000000e+00 1.242560e-09 125 1.192800e-08 5.000000e+00 5.000000e+00 1.242560e-09 126 1.202800e-08 5.000000e+00 5.000000e+00 1.242560e-09 127 1.212800e-08 5.000000e+00 5.000000e+00 1.242560e-09 128 1.222800e-08 5.000000e+00 5.000000e+00 1.242560e-09 129 1.232800e-08 5.000000e+00 5.000000e+00 1.242560e-09 130 1.242800e-08 5.000000e+00 5.000000e+00 1.242560e-09 131 1.252800e-08 5.000000e+00 5.000000e+00 1.242560e-09 132 1.262800e-08 5.000000e+00 5.000000e+00 1.242560e-09 133 1.272800e-08 5.000000e+00 5.000000e+00 1.242560e-09 134 1.282800e-08 5.000000e+00 5.000000e+00 1.242560e-09 135 1.292800e-08 5.000000e+00 5.000000e+00 1.242560e-09 136 1.302800e-08 5.000000e+00 5.000000e+00 1.242560e-09 137 1.312800e-08 5.000000e+00 5.000000e+00 1.242560e-09 138 1.322800e-08 5.000000e+00 5.000000e+00 1.242560e-09 139 1.332800e-08 5.000000e+00 5.000000e+00 1.242560e-09 140 1.342800e-08 5.000000e+00 5.000000e+00 1.242560e-09 141 1.352800e-08 5.000000e+00 5.000000e+00 1.242560e-09 142 1.362800e-08 5.000000e+00 5.000000e+00 1.242560e-09 143 1.372800e-08 5.000000e+00 5.000000e+00 1.242560e-09 144 1.382800e-08 5.000000e+00 5.000000e+00 1.242560e-09 145 1.392800e-08 5.000000e+00 5.000000e+00 1.242560e-09 146 1.402800e-08 5.000000e+00 5.000000e+00 1.242560e-09 147 1.412800e-08 5.000000e+00 5.000000e+00 1.242560e-09 148 1.422800e-08 5.000000e+00 5.000000e+00 1.242560e-09 149 1.432800e-08 5.000000e+00 5.000000e+00 1.242560e-09 150 1.442800e-08 5.000000e+00 5.000000e+00 1.242560e-09 151 1.452800e-08 5.000000e+00 5.000000e+00 1.242560e-09 152 1.462800e-08 5.000000e+00 5.000000e+00 1.242560e-09 153 1.472800e-08 5.000000e+00 5.000000e+00 1.242560e-09 154 1.482800e-08 5.000000e+00 5.000000e+00 1.242560e-09 155 1.492800e-08 5.000000e+00 5.000000e+00 1.242560e-09 156 1.502800e-08 5.000000e+00 5.000000e+00 1.242560e-09 157 1.512800e-08 5.000000e+00 5.000000e+00 1.242560e-09 158 1.522800e-08 5.000000e+00 5.000000e+00 1.242560e-09 159 1.532800e-08 5.000000e+00 5.000000e+00 1.242560e-09 160 1.542800e-08 5.000000e+00 5.000000e+00 1.242560e-09 161 1.552800e-08 5.000000e+00 5.000000e+00 1.242560e-09 162 1.562800e-08 5.000000e+00 5.000000e+00 1.242560e-09 163 1.572800e-08 5.000000e+00 5.000000e+00 1.242560e-09 164 1.582800e-08 5.000000e+00 5.000000e+00 1.242560e-09 165 1.590000e-08 5.000000e+00 5.000000e+00 1.242560e-09 166 1.591000e-08 5.000068e+00 5.000000e+00 1.242560e-09 167 1.593000e-08 5.000098e+00 5.000000e+00 1.242560e-09 168 1.597000e-08 4.957752e+00 5.000000e+00 1.242560e-09 169 1.605000e-08 4.452793e+00 5.000000e+00 1.242560e-09 170 1.610000e-08 3.840812e+00 5.000000e+00 1.242560e-09 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 171 1.611000e-08 3.800302e+00 5.000000e+00 1.242560e-09 172 1.613000e-08 3.768943e+00 5.000000e+00 1.242560e-09 173 1.617000e-08 3.749050e+00 5.000000e+00 1.242560e-09 174 1.625000e-08 3.684821e+00 5.000000e+00 1.242560e-09 175 1.635000e-08 3.622577e+00 5.000000e+00 1.242560e-09 176 1.645000e-08 3.551765e+00 5.000000e+00 1.242560e-09 177 1.655000e-08 3.493778e+00 5.000000e+00 1.242560e-09 178 1.665000e-08 3.429632e+00 5.000000e+00 1.242560e-09 179 1.675000e-08 3.375582e+00 5.000000e+00 1.242560e-09 180 1.685000e-08 3.317137e+00 5.000000e+00 1.242560e-09 181 1.695000e-08 3.266708e+00 5.000081e+00 3.428422e-09 182 1.705000e-08 3.213179e+00 4.761608e+00 -6.56423e-06 183 1.715000e-08 3.166070e+00 3.813996e+00 5.402796e-03 184 1.725000e-08 3.116815e+00 3.685654e+00 1.054458e-02 185 1.735000e-08 3.072745e+00 3.609212e+00 1.413978e-02 186 1.745000e-08 3.027231e+00 3.492732e+00 2.097697e-02 187 1.755000e-08 2.985940e+00 3.424017e+00 2.606797e-02 188 1.765000e-08 2.943725e+00 3.313896e+00 3.459857e-02 189 1.775000e-08 2.904977e+00 3.248827e+00 4.135562e-02 190 1.785000e-08 2.865685e+00 3.144964e+00 5.147593e-02 191 1.795000e-08 2.829281e+00 3.083104e+00 5.991372e-02 192 1.798678e-08 2.815298e+00 3.041072e+00 6.416284e-02 193 1.799678e-08 2.807819e+00 3.030518e+00 6.573328e-02 194 1.801678e-08 2.788513e+00 3.016477e+00 6.793103e-02 195 1.805678e-08 2.736764e+00 2.990156e+00 7.156512e-02 196 1.808678e-08 2.688938e+00 2.969077e+00 7.471027e-02 197 1.809478e-08 2.668503e+00 2.952252e+00 7.642816e-02 198 1.811078e-08 2.620369e+00 2.939422e+00 7.871033e-02 199 1.814278e-08 2.499805e+00 2.921825e+00 8.152840e-02 200 1.820678e-08 2.244920e+00 2.868259e+00 8.964434e-02 201 1.830678e-08 2.159673e+00 2.793489e+00 1.024589e-01 202 1.840678e-08 2.118471e+00 2.720970e+00 1.157798e-01 203 1.850678e-08 2.021139e+00 2.650238e+00 1.301197e-01 204 1.860678e-08 1.978566e+00 2.580881e+00 1.451117e-01 205 1.870678e-08 1.892691e+00 2.513781e+00 1.610012e-01 206 1.880678e-08 1.848777e+00 2.447417e+00 1.776556e-01 207 1.890678e-08 1.772667e+00 2.383606e+00 1.951250e-01 208 1.900678e-08 1.723702e+00 2.327920e+00 2.119892e-01 209 1.902356e-08 1.709355e+00 2.319509e+00 2.147778e-01 210 1.903356e-08 1.704430e+00 2.311049e+00 2.169205e-01 211 1.905356e-08 1.693768e+00 2.292426e+00 2.217638e-01 212 1.909356e-08 1.673250e+00 2.254851e+00 2.321770e-01 213 1.912356e-08 1.657704e+00 2.225861e+00 2.402399e-01 214 1.913156e-08 1.650820e+00 2.214889e+00 2.430187e-01 215 1.914756e-08 1.639985e+00 2.189073e+00 2.495497e-01 216 1.917956e-08 1.625758e+00 2.126051e+00 2.662245e-01 217 1.924356e-08 1.590171e+00 1.998619e+00 3.036745e-01 218 1.934356e-08 1.537789e+00 1.909686e+00 3.409614e-01 219 1.944356e-08 1.488092e+00 1.860750e+00 3.671625e-01 220 1.954356e-08 1.439324e+00 1.775758e+00 4.069418e-01 221 1.964356e-08 1.392678e+00 1.723660e+00 4.396744e-01 222 1.974356e-08 1.347154e+00 1.650172e+00 4.803571e-01 223 1.984356e-08 1.303376e+00 1.596365e+00 5.190690e-01 224 1.994356e-08 1.260784e+00 1.532198e+00 5.616026e-01 225 2.004356e-08 1.222244e+00 1.484630e+00 6.033946e-01 226 2.014356e-08 1.174196e+00 1.431068e+00 6.466266e-01 227 2.024356e-08 1.099342e+00 1.374412e+00 6.963561e-01 228 2.034356e-08 1.030204e+00 1.323995e+00 7.429353e-01 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 229 2.044356e-08 9.952955e-01 1.272673e+00 7.926836e-01 230 2.054356e-08 9.581854e-01 1.226234e+00 8.402723e-01 231 2.064356e-08 9.183604e-01 1.178297e+00 8.909324e-01 232 2.074356e-08 8.833440e-01 1.134852e+00 9.401499e-01 233 2.084356e-08 8.474144e-01 1.090111e+00 9.916835e-01 234 2.094356e-08 8.142429e-01 1.049481e+00 1.042366e+00 235 2.104356e-08 7.826774e-01 1.008051e+00 1.094028e+00 236 2.114356e-08 7.533278e-01 9.694631e-01 1.146317e+00 237 2.124356e-08 7.234202e-01 9.243253e-01 1.209069e+00 238 2.134356e-08 6.934234e-01 8.787023e-01 1.280170e+00 239 2.144356e-08 6.662792e-01 8.383137e-01 1.345819e+00 240 2.154356e-08 6.390573e-01 8.068873e-01 1.403617e+00 241 2.164356e-08 6.139189e-01 7.727446e-01 1.465634e+00 242 2.174356e-08 5.887546e-01 7.412722e-01 1.529422e+00 243 2.184356e-08 5.654009e-01 7.099292e-01 1.593102e+00 244 2.194356e-08 5.421630e-01 6.810196e-01 1.657631e+00 245 2.204356e-08 5.205274e-01 6.520826e-01 1.721612e+00 246 2.214356e-08 4.990310e-01 6.258789e-01 1.785346e+00 247 2.224356e-08 4.777908e-01 5.992432e-01 1.849185e+00 248 2.234356e-08 4.551312e-01 5.745744e-01 1.913921e+00 249 2.244356e-08 4.339746e-01 5.495933e-01 1.978134e+00 250 2.254356e-08 4.154577e-01 5.270664e-01 2.041350e+00 251 2.264356e-08 3.986134e-01 5.041308e-01 2.104144e+00 252 2.274356e-08 3.815007e-01 4.833215e-01 2.166326e+00 253 2.284356e-08 3.653891e-01 4.621932e-01 2.227958e+00 254 2.294356e-08 3.498264e-01 4.429859e-01 2.289002e+00 255 2.304356e-08 3.350242e-01 4.235403e-01 2.349339e+00 256 2.314356e-08 3.207998e-01 4.058252e-01 2.409081e+00 257 2.324356e-08 3.072883e-01 3.877989e-01 2.468785e+00 258 2.334356e-08 2.941488e-01 3.710019e-01 2.530072e+00 259 2.344356e-08 2.815550e-01 3.538902e-01 2.592230e+00 260 2.354356e-08 2.694615e-01 3.385647e-01 2.652653e+00 261 2.364356e-08 2.579554e-01 3.235779e-01 2.710373e+00 262 2.374356e-08 2.468618e-01 3.098631e-01 2.767798e+00 263 2.384356e-08 2.362727e-01 2.959624e-01 2.825183e+00 264 2.394356e-08 2.260913e-01 2.832885e-01 2.881853e+00 265 2.404356e-08 2.163556e-01 2.705867e-01 2.937491e+00 266 2.414356e-08 2.070150e-01 2.589644e-01 2.992307e+00 267 2.424356e-08 1.980469e-01 2.473365e-01 3.045971e+00 268 2.434356e-08 1.893799e-01 2.366815e-01 3.098880e+00 269 2.444356e-08 1.809716e-01 2.259889e-01 3.150865e+00 270 2.454356e-08 1.729558e-01 2.161922e-01 3.201968e+00 271 2.464356e-08 1.653968e-01 2.063996e-01 3.251859e+00 272 2.474356e-08 1.582508e-01 1.974329e-01 3.300792e+00 273 2.484356e-08 1.513459e-01 1.884578e-01 3.348643e+00 274 2.494356e-08 1.447466e-01 1.802387e-01 3.395541e+00 275 2.504356e-08 1.384146e-01 1.720164e-01 3.441357e+00 276 2.514356e-08 1.323869e-01 1.644864e-01 3.486220e+00 277 2.524356e-08 1.265887e-01 1.569535e-01 3.530044e+00 278 2.534356e-08 1.210753e-01 1.500448e-01 3.573084e+00 279 2.544356e-08 1.157600e-01 1.431179e-01 3.615401e+00 280 2.554356e-08 1.107029e-01 1.367667e-01 3.657003e+00 281 2.564356e-08 1.058325e-01 1.304386e-01 3.697431e+00 282 2.574356e-08 1.012088e-01 1.246736e-01 3.736667e+00 283 2.584356e-08 9.675178e-02 1.189117e-01 3.774905e+00 284 2.594356e-08 9.251961e-02 1.136320e-01 3.812374e+00 285 2.604356e-08 8.843920e-02 1.083509e-01 3.848898e+00 286 2.614356e-08 8.456699e-02 1.035251e-01 3.884496e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 287 2.624356e-08 8.083201e-02 9.869702e-02 3.919135e+00 288 2.634356e-08 7.728730e-02 9.428536e-02 3.952885e+00 289 2.644356e-08 7.386265e-02 8.986967e-02 3.985719e+00 290 2.654356e-08 7.061103e-02 8.583531e-02 4.017711e+00 291 2.664356e-08 6.747568e-02 8.179550e-02 4.048811e+00 292 2.674356e-08 6.451264e-02 7.810880e-02 4.079061e+00 293 2.684356e-08 6.165813e-02 7.441595e-02 4.108441e+00 294 2.694356e-08 5.895214e-02 7.104737e-02 4.137013e+00 295 2.704356e-08 5.633803e-02 6.767092e-02 4.164759e+00 296 2.714356e-08 5.386288e-02 6.459340e-02 4.191725e+00 297 2.724356e-08 5.147390e-02 6.150688e-02 4.217899e+00 298 2.734356e-08 4.921188e-02 5.869549e-02 4.243331e+00 299 2.744356e-08 4.702774e-02 5.587347e-02 4.268029e+00 300 2.754356e-08 4.495991e-02 5.330419e-02 4.292046e+00 301 2.764356e-08 4.296264e-02 5.072402e-02 4.315362e+00 302 2.774356e-08 4.107248e-02 4.837906e-02 4.337976e+00 303 2.784356e-08 3.924709e-02 4.602436e-02 4.359871e+00 304 2.794356e-08 3.751989e-02 4.388545e-02 4.381108e+00 305 2.804356e-08 3.585140e-02 4.173384e-02 4.401706e+00 306 2.814356e-08 3.427296e-02 3.978057e-02 4.421686e+00 307 2.824356e-08 3.274806e-02 3.781497e-02 4.441040e+00 308 2.834356e-08 3.130570e-02 3.603243e-02 4.459796e+00 309 2.844356e-08 2.991193e-02 3.423699e-02 4.477962e+00 310 2.854356e-08 2.859362e-02 3.261017e-02 4.495564e+00 311 2.864356e-08 2.731950e-02 3.097017e-02 4.512607e+00 312 2.874356e-08 2.611504e-02 2.948560e-02 4.529115e+00 313 2.884356e-08 2.495153e-02 2.798784e-02 4.545091e+00 314 2.894356e-08 2.385202e-02 2.663340e-02 4.560559e+00 315 2.904356e-08 2.278919e-02 2.526569e-02 4.575526e+00 316 2.914356e-08 2.178453e-02 2.403005e-02 4.590014e+00 317 2.924356e-08 2.081333e-02 2.278120e-02 4.604030e+00 318 2.934356e-08 1.989567e-02 2.165410e-02 4.617593e+00 319 2.944356e-08 1.900843e-02 2.051389e-02 4.630712e+00 320 2.954356e-08 1.817020e-02 1.948587e-02 4.643406e+00 321 2.964356e-08 1.735962e-02 1.844488e-02 4.655685e+00 322 2.974356e-08 1.659394e-02 1.750737e-02 4.667563e+00 323 2.984356e-08 1.585342e-02 1.655725e-02 4.679045e+00 324 2.994356e-08 1.515408e-02 1.570262e-02 4.690145e+00 325 3.004356e-08 1.447763e-02 1.483558e-02 4.700874e+00 326 3.014356e-08 1.383890e-02 1.405643e-02 4.711248e+00 327 3.024356e-08 1.322095e-02 1.326512e-02 4.721275e+00 328 3.034356e-08 1.263760e-02 1.255489e-02 4.730966e+00 329 3.044356e-08 1.207312e-02 1.183285e-02 4.740330e+00 330 3.054356e-08 1.154034e-02 1.118554e-02 4.749380e+00 331 3.064356e-08 1.102471e-02 1.052677e-02 4.758123e+00 332 3.074356e-08 1.053812e-02 9.936892e-03 4.766571e+00 333 3.084356e-08 1.006713e-02 9.335919e-03 4.774731e+00 334 3.094356e-08 9.622818e-03 8.798468e-03 4.782615e+00 335 3.104356e-08 9.192675e-03 8.250305e-03 4.790228e+00 336 3.114356e-08 8.786942e-03 7.760707e-03 4.797583e+00 337 3.124356e-08 8.394042e-03 7.260782e-03 4.804686e+00 338 3.134356e-08 8.023520e-03 6.814854e-03 4.811546e+00 339 3.144356e-08 7.664662e-03 6.358991e-03 4.818169e+00 340 3.154356e-08 7.326319e-03 5.952916e-03 4.824566e+00 341 3.164356e-08 6.998554e-03 5.537296e-03 4.830742e+00 342 3.174356e-08 6.689594e-03 5.167584e-03 4.836706e+00 343 3.184356e-08 6.390230e-03 4.788723e-03 4.842463e+00 344 3.190000e-08 6.226121e-03 4.571132e-03 4.845625e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 345 3.191000e-08 6.277436e-03 4.535586e-03 4.846178e+00 346 3.193000e-08 6.482896e-03 4.479275e-03 4.847280e+00 347 3.197000e-08 3.884237e-02 4.374363e-03 4.849460e+00 348 3.203637e-08 3.222579e-01 4.133161e-03 4.853009e+00 349 3.209825e-08 9.041895e-01 3.905349e-03 4.856244e+00 350 3.210000e-08 9.246849e-01 3.900219e-03 4.856334e+00 351 3.210349e-08 9.459073e-01 3.891286e-03 4.856515e+00 352 3.211048e-08 9.691540e-01 3.873580e-03 4.856875e+00 353 3.212369e-08 9.770694e-01 3.840559e-03 4.857554e+00 354 3.215010e-08 9.931278e-01 3.775876e-03 4.858901e+00 355 3.218309e-08 1.012845e+00 3.641025e-03 4.860566e+00 356 3.224908e-08 1.051564e+00 3.472095e-03 4.863840e+00 357 3.234908e-08 1.108268e+00 3.190403e-03 4.868656e+00 358 3.244908e-08 1.162845e+00 2.908493e-03 4.873305e+00 359 3.254908e-08 1.215343e+00 2.652169e-03 4.877791e+00 360 3.264908e-08 1.265957e+00 2.395480e-03 4.882121e+00 361 3.274908e-08 1.314737e+00 2.162303e-03 4.886300e+00 362 3.284908e-08 1.361842e+00 1.928639e-03 4.890332e+00 363 3.293678e-08 1.401804e+00 1.753489e-03 4.893908e+00 364 3.294678e-08 1.406286e+00 1.796144e-03 4.894281e+00 365 3.296678e-08 1.415214e+00 1.989958e-03 4.894979e+00 366 3.300678e-08 1.432891e+00 3.237717e-02 4.896118e+00 367 3.308678e-08 1.467508e+00 4.071212e-01 4.896425e+00 368 3.318595e-08 1.509182e+00 9.748660e-01 4.893753e+00 369 3.328254e-08 1.548518e+00 1.058609e+00 4.894185e+00 370 3.338254e-08 1.588003e+00 1.131777e+00 4.894524e+00 371 3.348254e-08 1.626286e+00 1.213487e+00 4.893437e+00 372 3.358254e-08 1.663430e+00 1.283153e+00 4.892266e+00 373 3.368254e-08 1.699492e+00 1.360694e+00 4.889651e+00 374 3.378254e-08 1.734523e+00 1.427175e+00 4.886949e+00 375 3.388254e-08 1.768572e+00 1.500910e+00 4.882859e+00 376 3.397356e-08 1.798754e+00 1.559213e+00 4.878952e+00 377 3.398356e-08 1.802043e+00 1.568775e+00 4.878308e+00 378 3.400356e-08 1.808643e+00 1.584699e+00 4.877111e+00 379 3.404356e-08 1.832576e+00 1.615506e+00 4.874706e+00 380 3.412356e-08 2.010589e+00 1.670887e+00 4.869740e+00 381 3.422356e-08 2.294921e+00 1.734972e+00 4.863204e+00 382 3.432356e-08 2.375984e+00 1.798673e+00 4.855952e+00 383 3.442356e-08 2.432366e+00 1.860382e+00 4.848070e+00 384 3.452356e-08 2.507097e+00 1.921401e+00 4.839378e+00 385 3.462356e-08 2.562411e+00 1.980570e+00 4.830056e+00 386 3.472356e-08 2.631086e+00 2.039097e+00 4.819950e+00 387 3.482356e-08 2.684938e+00 2.095910e+00 4.809205e+00 388 3.492356e-08 2.748384e+00 2.151159e+00 4.797853e+00 389 3.502356e-08 2.803044e+00 2.198207e+00 4.787078e+00 390 3.512356e-08 2.862342e+00 2.281382e+00 4.768872e+00 391 3.522356e-08 2.915806e+00 2.434235e+00 4.732327e+00 392 3.532356e-08 2.968444e+00 2.557307e+00 4.696068e+00 393 3.542356e-08 3.018968e+00 2.615969e+00 4.673463e+00 394 3.552356e-08 3.068985e+00 2.679378e+00 4.648448e+00 395 3.562356e-08 3.116904e+00 2.745528e+00 4.620175e+00 396 3.572356e-08 3.164245e+00 2.806514e+00 4.591740e+00 397 3.582356e-08 3.209733e+00 2.868735e+00 4.560698e+00 398 3.592356e-08 3.254410e+00 2.927246e+00 4.528870e+00 399 3.602356e-08 3.295967e+00 2.986350e+00 4.494699e+00 400 3.612356e-08 3.342141e+00 3.043037e+00 4.459039e+00 401 3.622356e-08 3.409003e+00 3.099007e+00 4.421458e+00 402 3.632356e-08 3.485512e+00 3.152821e+00 4.382498e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 403 3.642356e-08 3.539386e+00 3.204981e+00 4.342122e+00 404 3.652356e-08 3.579262e+00 3.256280e+00 4.299674e+00 405 3.662356e-08 3.622569e+00 3.305876e+00 4.255707e+00 406 3.672356e-08 3.665178e+00 3.354609e+00 4.209688e+00 407 3.682356e-08 3.705687e+00 3.401705e+00 4.162087e+00 408 3.692356e-08 3.745706e+00 3.447978e+00 4.113199e+00 409 3.702356e-08 3.784104e+00 3.492386e+00 4.063894e+00 410 3.712356e-08 3.821951e+00 3.536610e+00 4.012973e+00 411 3.722356e-08 3.858401e+00 3.584153e+00 3.955573e+00 412 3.732356e-08 3.893955e+00 3.637399e+00 3.888235e+00 413 3.742356e-08 3.928145e+00 3.687159e+00 3.820130e+00 414 3.752356e-08 3.961441e+00 3.728794e+00 3.759023e+00 415 3.762356e-08 3.993753e+00 3.767425e+00 3.699024e+00 416 3.772356e-08 4.025134e+00 3.807012e+00 3.635594e+00 417 3.782356e-08 4.055578e+00 3.844888e+00 3.571258e+00 418 3.792356e-08 4.085142e+00 3.881900e+00 3.505930e+00 419 3.802356e-08 4.113767e+00 3.917591e+00 3.439296e+00 420 3.812356e-08 4.141601e+00 3.952539e+00 3.371524e+00 421 3.822356e-08 4.169580e+00 3.986205e+00 3.302445e+00 422 3.832356e-08 4.198960e+00 4.019148e+00 3.232242e+00 423 3.842356e-08 4.228466e+00 4.050778e+00 3.161447e+00 424 3.852356e-08 4.255251e+00 4.081722e+00 3.090981e+00 425 3.862356e-08 4.279393e+00 4.111459e+00 3.020789e+00 426 3.872356e-08 4.303033e+00 4.140599e+00 2.950879e+00 427 3.882356e-08 4.326334e+00 4.168571e+00 2.881321e+00 428 3.892356e-08 4.348783e+00 4.195971e+00 2.812190e+00 429 3.902356e-08 4.370503e+00 4.222265e+00 2.743726e+00 430 3.912356e-08 4.391575e+00 4.248007e+00 2.676051e+00 431 3.922356e-08 4.411963e+00 4.272865e+00 2.608611e+00 432 3.932356e-08 4.431729e+00 4.297700e+00 2.540132e+00 433 3.942356e-08 4.450830e+00 4.322083e+00 2.470254e+00 434 3.952356e-08 4.469324e+00 4.345778e+00 2.401264e+00 435 3.962356e-08 4.487204e+00 4.367844e+00 2.335101e+00 436 3.972356e-08 4.504530e+00 4.389130e+00 2.270696e+00 437 3.982356e-08 4.521283e+00 4.409711e+00 2.206495e+00 438 3.992356e-08 4.537508e+00 4.429876e+00 2.142878e+00 439 4.002356e-08 4.553192e+00 4.449167e+00 2.080155e+00 440 4.012356e-08 4.568380e+00 4.468010e+00 2.018209e+00 441 4.022356e-08 4.583084e+00 4.486082e+00 1.956974e+00 442 4.032356e-08 4.597441e+00 4.503721e+00 1.896517e+00 443 4.042356e-08 4.611511e+00 4.520633e+00 1.836828e+00 444 4.052356e-08 4.625211e+00 4.537130e+00 1.778180e+00 445 4.062356e-08 4.638281e+00 4.552942e+00 1.720773e+00 446 4.072356e-08 4.650743e+00 4.568367e+00 1.664720e+00 447 4.082356e-08 4.662767e+00 4.583156e+00 1.609928e+00 448 4.092356e-08 4.674461e+00 4.597578e+00 1.556451e+00 449 4.102356e-08 4.685748e+00 4.611402e+00 1.504260e+00 450 4.112356e-08 4.696658e+00 4.624880e+00 1.453410e+00 451 4.122356e-08 4.707192e+00 4.637802e+00 1.403843e+00 452 4.132356e-08 4.717383e+00 4.650418e+00 1.355469e+00 453 4.142356e-08 4.727217e+00 4.662556e+00 1.308062e+00 454 4.152356e-08 4.736730e+00 4.674425e+00 1.261653e+00 455 4.162356e-08 4.745905e+00 4.685786e+00 1.216525e+00 456 4.172356e-08 4.754781e+00 4.696793e+00 1.172967e+00 457 4.182356e-08 4.763343e+00 4.707308e+00 1.130798e+00 458 4.192356e-08 4.771624e+00 4.717561e+00 1.089786e+00 459 4.202356e-08 4.779612e+00 4.727395e+00 1.049885e+00 460 4.212356e-08 4.787338e+00 4.736967e+00 1.011179e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 461 4.222356e-08 4.794789e+00 4.746136e+00 9.736140e-01 462 4.232356e-08 4.801998e+00 4.755063e+00 9.371747e-01 463 4.242356e-08 4.808963e+00 4.763614e+00 9.018247e-01 464 4.252356e-08 4.815713e+00 4.771938e+00 8.675725e-01 465 4.262356e-08 4.822227e+00 4.779910e+00 8.344013e-01 466 4.272356e-08 4.828510e+00 4.787669e+00 8.023332e-01 467 4.282356e-08 4.834550e+00 4.795101e+00 7.713351e-01 468 4.292356e-08 4.840386e+00 4.802333e+00 7.413930e-01 469 4.302356e-08 4.846017e+00 4.809260e+00 7.124650e-01 470 4.312356e-08 4.851461e+00 4.816000e+00 6.845431e-01 471 4.322356e-08 4.856708e+00 4.822455e+00 6.575895e-01 472 4.332356e-08 4.861778e+00 4.828735e+00 6.315876e-01 473 4.342356e-08 4.866666e+00 4.834752e+00 6.064871e-01 474 4.352356e-08 4.871389e+00 4.840608e+00 5.822588e-01 475 4.362356e-08 4.875941e+00 4.846220e+00 5.588731e-01 476 4.372356e-08 4.880339e+00 4.851676e+00 5.363467e-01 477 4.382356e-08 4.884578e+00 4.856896e+00 5.146707e-01 478 4.392356e-08 4.888674e+00 4.861969e+00 4.938173e-01 479 4.402356e-08 4.892621e+00 4.866827e+00 4.737297e-01 480 4.412356e-08 4.896435e+00 4.871553e+00 4.543878e-01 481 4.422356e-08 4.900110e+00 4.876078e+00 4.357696e-01 482 4.432356e-08 4.903661e+00 4.880477e+00 4.178599e-01 483 4.442356e-08 4.907083e+00 4.884688e+00 4.006276e-01 484 4.452356e-08 4.910390e+00 4.888783e+00 3.840563e-01 485 4.462356e-08 4.913578e+00 4.892704e+00 3.681206e-01 486 4.472356e-08 4.916657e+00 4.896515e+00 3.528062e-01 487 4.482356e-08 4.919623e+00 4.900164e+00 3.380896e-01 488 4.492356e-08 4.922487e+00 4.903711e+00 3.239553e-01 489 4.502356e-08 4.925245e+00 4.907107e+00 3.103785e-01 490 4.512356e-08 4.927910e+00 4.910408e+00 2.973431e-01 491 4.522356e-08 4.930477e+00 4.913568e+00 2.848264e-01 492 4.532356e-08 4.932957e+00 4.916639e+00 2.728133e-01 493 4.542356e-08 4.935346e+00 4.919579e+00 2.612817e-01 494 4.552356e-08 4.937653e+00 4.922437e+00 2.502162e-01 495 4.562356e-08 4.939875e+00 4.925174e+00 2.395956e-01 496 4.572356e-08 4.942022e+00 4.927833e+00 2.294069e-01 497 4.582356e-08 4.944090e+00 4.930379e+00 2.196338e-01 498 4.592356e-08 4.946087e+00 4.932852e+00 2.102646e-01 499 4.602356e-08 4.948010e+00 4.935219e+00 2.012812e-01 500 4.612356e-08 4.949868e+00 4.937520e+00 1.926689e-01 501 4.622356e-08 4.951657e+00 4.939722e+00 1.844111e-01 502 4.632356e-08 4.953386e+00 4.941861e+00 1.764964e-01 503 4.642356e-08 4.955050e+00 4.943910e+00 1.689101e-01 504 4.652356e-08 4.956657e+00 4.945900e+00 1.616409e-01 505 4.662356e-08 4.958206e+00 4.947805e+00 1.546746e-01 506 4.672356e-08 4.959701e+00 4.949655e+00 1.480009e-01 507 4.682356e-08 4.961141e+00 4.951427e+00 1.416071e-01 508 4.692356e-08 4.962532e+00 4.953148e+00 1.354833e-01 509 4.700000e-08 4.963561e+00 4.954478e+00 1.309763e-01 mosdriver -- 2 lossy lines ltra model -- c load Transient Analysis Sat Jan 16 17:43:34 2010 -------------------------------------------------------------------------------- Index time v(5) -------------------------------------------------------------------------------- 0 0.000000e+00 1.242558e-09 1 2.000000e-12 1.242558e-09 2 4.000000e-12 1.242558e-09 3 8.000000e-12 1.242558e-09 4 1.600000e-11 1.242558e-09 5 3.200000e-11 1.242558e-09 6 6.400000e-11 1.242558e-09 7 1.280000e-10 1.242558e-09 8 2.280000e-10 1.242558e-09 9 3.280000e-10 1.242558e-09 10 4.280000e-10 1.242558e-09 11 5.280000e-10 1.242558e-09 12 6.280000e-10 1.242558e-09 13 7.280000e-10 1.242558e-09 14 8.280000e-10 1.242558e-09 15 9.280000e-10 1.242558e-09 16 1.028000e-09 1.242558e-09 17 1.128000e-09 1.242558e-09 18 1.228000e-09 1.242559e-09 19 1.328000e-09 1.242559e-09 20 1.428000e-09 1.242559e-09 21 1.528000e-09 1.242559e-09 22 1.628000e-09 1.242559e-09 23 1.728000e-09 1.242559e-09 24 1.828000e-09 1.242559e-09 25 1.928000e-09 1.242559e-09 26 2.028000e-09 1.242559e-09 27 2.128000e-09 1.242559e-09 28 2.228000e-09 1.242559e-09 29 2.328000e-09 1.242559e-09 30 2.428000e-09 1.242559e-09 31 2.528000e-09 1.242559e-09 32 2.628000e-09 1.242559e-09 33 2.728000e-09 1.242559e-09 34 2.828000e-09 1.242559e-09 35 2.928000e-09 1.242559e-09 36 3.028000e-09 1.242559e-09 37 3.128000e-09 1.242559e-09 38 3.228000e-09 1.242559e-09 39 3.328000e-09 1.242559e-09 40 3.428000e-09 1.242559e-09 41 3.528000e-09 1.242559e-09 42 3.628000e-09 1.242559e-09 43 3.728000e-09 1.242559e-09 44 3.828000e-09 1.242559e-09 45 3.928000e-09 1.242559e-09 46 4.028000e-09 1.242559e-09 47 4.128000e-09 1.242559e-09 48 4.228000e-09 1.242559e-09 49 4.328000e-09 1.242559e-09 50 4.428000e-09 1.242559e-09 51 4.528000e-09 1.242559e-09 52 4.628000e-09 1.242559e-09 53 4.728000e-09 1.242559e-09 54 4.828000e-09 1.242559e-09 Index time v(5) -------------------------------------------------------------------------------- 55 4.928000e-09 1.242559e-09 56 5.028000e-09 1.242559e-09 57 5.128000e-09 1.242559e-09 58 5.228000e-09 1.242559e-09 59 5.328000e-09 1.242559e-09 60 5.428000e-09 1.242559e-09 61 5.528000e-09 1.242559e-09 62 5.628000e-09 1.242559e-09 63 5.728000e-09 1.242559e-09 64 5.828000e-09 1.242559e-09 65 5.928000e-09 1.242559e-09 66 6.028000e-09 1.242559e-09 67 6.128000e-09 1.242559e-09 68 6.228000e-09 1.242559e-09 69 6.328000e-09 1.242559e-09 70 6.428000e-09 1.242559e-09 71 6.528000e-09 1.242559e-09 72 6.628000e-09 1.242559e-09 73 6.728000e-09 1.242559e-09 74 6.828000e-09 1.242559e-09 75 6.928000e-09 1.242559e-09 76 7.028000e-09 1.242559e-09 77 7.128000e-09 1.242559e-09 78 7.228000e-09 1.242559e-09 79 7.328000e-09 1.242559e-09 80 7.428000e-09 1.242559e-09 81 7.528000e-09 1.242559e-09 82 7.628000e-09 1.242559e-09 83 7.728000e-09 1.242559e-09 84 7.828000e-09 1.242559e-09 85 7.928000e-09 1.242559e-09 86 8.028000e-09 1.242559e-09 87 8.128000e-09 1.242559e-09 88 8.228000e-09 1.242559e-09 89 8.328000e-09 1.242559e-09 90 8.428000e-09 1.242559e-09 91 8.528000e-09 1.242559e-09 92 8.628000e-09 1.242559e-09 93 8.728000e-09 1.242559e-09 94 8.828000e-09 1.242559e-09 95 8.928000e-09 1.242559e-09 96 9.028000e-09 1.242559e-09 97 9.128000e-09 1.242559e-09 98 9.228000e-09 1.242559e-09 99 9.328000e-09 1.242559e-09 100 9.428000e-09 1.242559e-09 101 9.528000e-09 1.242559e-09 102 9.628000e-09 1.242559e-09 103 9.728000e-09 1.242559e-09 104 9.828000e-09 1.242560e-09 105 9.928000e-09 1.242560e-09 106 1.002800e-08 1.242560e-09 107 1.012800e-08 1.242560e-09 108 1.022800e-08 1.242560e-09 109 1.032800e-08 1.242560e-09 110 1.042800e-08 1.242560e-09 111 1.052800e-08 1.242560e-09 112 1.062800e-08 1.242560e-09 Index time v(5) -------------------------------------------------------------------------------- 113 1.072800e-08 1.242560e-09 114 1.082800e-08 1.242560e-09 115 1.092800e-08 1.242560e-09 116 1.102800e-08 1.242560e-09 117 1.112800e-08 1.242560e-09 118 1.122800e-08 1.242560e-09 119 1.132800e-08 1.242560e-09 120 1.142800e-08 1.242560e-09 121 1.152800e-08 1.242560e-09 122 1.162800e-08 1.242560e-09 123 1.172800e-08 1.242560e-09 124 1.182800e-08 1.242560e-09 125 1.192800e-08 1.242560e-09 126 1.202800e-08 1.242560e-09 127 1.212800e-08 1.242560e-09 128 1.222800e-08 1.242560e-09 129 1.232800e-08 1.242560e-09 130 1.242800e-08 1.242560e-09 131 1.252800e-08 1.242560e-09 132 1.262800e-08 1.242560e-09 133 1.272800e-08 1.242560e-09 134 1.282800e-08 1.242560e-09 135 1.292800e-08 1.242560e-09 136 1.302800e-08 1.242560e-09 137 1.312800e-08 1.242560e-09 138 1.322800e-08 1.242560e-09 139 1.332800e-08 1.242560e-09 140 1.342800e-08 1.242560e-09 141 1.352800e-08 1.242560e-09 142 1.362800e-08 1.242560e-09 143 1.372800e-08 1.242560e-09 144 1.382800e-08 1.242560e-09 145 1.392800e-08 1.242560e-09 146 1.402800e-08 1.242560e-09 147 1.412800e-08 1.242560e-09 148 1.422800e-08 1.242560e-09 149 1.432800e-08 1.242560e-09 150 1.442800e-08 1.242560e-09 151 1.452800e-08 1.242560e-09 152 1.462800e-08 1.242560e-09 153 1.472800e-08 1.242560e-09 154 1.482800e-08 1.242560e-09 155 1.492800e-08 1.242560e-09 156 1.502800e-08 1.242560e-09 157 1.512800e-08 1.242560e-09 158 1.522800e-08 1.242560e-09 159 1.532800e-08 1.242560e-09 160 1.542800e-08 1.242560e-09 161 1.552800e-08 1.242560e-09 162 1.562800e-08 1.242560e-09 163 1.572800e-08 1.242560e-09 164 1.582800e-08 1.242560e-09 165 1.590000e-08 1.242560e-09 166 1.591000e-08 1.242560e-09 167 1.593000e-08 1.242560e-09 168 1.597000e-08 1.242560e-09 169 1.605000e-08 1.242560e-09 170 1.610000e-08 1.242560e-09 Index time v(5) -------------------------------------------------------------------------------- 171 1.611000e-08 1.242560e-09 172 1.613000e-08 1.242560e-09 173 1.617000e-08 1.242560e-09 174 1.625000e-08 1.242560e-09 175 1.635000e-08 1.242560e-09 176 1.645000e-08 1.242560e-09 177 1.655000e-08 1.242560e-09 178 1.665000e-08 1.242560e-09 179 1.675000e-08 1.242560e-09 180 1.685000e-08 1.242560e-09 181 1.695000e-08 1.242560e-09 182 1.705000e-08 1.242560e-09 183 1.715000e-08 1.242560e-09 184 1.725000e-08 1.242560e-09 185 1.735000e-08 1.242560e-09 186 1.745000e-08 1.242560e-09 187 1.755000e-08 1.242560e-09 188 1.765000e-08 1.242560e-09 189 1.775000e-08 1.242560e-09 190 1.785000e-08 1.242560e-09 191 1.795000e-08 2.333566e-09 192 1.798678e-08 3.366564e-09 193 1.799678e-08 -3.11149e-07 194 1.801678e-08 -1.17611e-06 195 1.805678e-08 -3.72991e-06 196 1.808678e-08 -6.33261e-06 197 1.809478e-08 1.921160e-04 198 1.811078e-08 7.256608e-04 199 1.814278e-08 2.233893e-03 200 1.820678e-08 6.318454e-03 201 1.830678e-08 1.142934e-02 202 1.840678e-08 1.549704e-02 203 1.850678e-08 2.264305e-02 204 1.860678e-08 2.851276e-02 205 1.870678e-08 3.750607e-02 206 1.880678e-08 4.537657e-02 207 1.890678e-08 5.616557e-02 208 1.900678e-08 6.588348e-02 209 1.902356e-08 6.776177e-02 210 1.903356e-08 6.954557e-02 211 1.905356e-08 7.218019e-02 212 1.909356e-08 7.618411e-02 213 1.912356e-08 7.953585e-02 214 1.913156e-08 8.127388e-02 215 1.914756e-08 8.396133e-02 216 1.917956e-08 8.747642e-02 217 1.924356e-08 9.671129e-02 218 1.934356e-08 1.112604e-01 219 1.944356e-08 1.263421e-01 220 1.954356e-08 1.428187e-01 221 1.964356e-08 1.600199e-01 222 1.974356e-08 1.784877e-01 223 1.984356e-08 1.978262e-01 224 1.994356e-08 2.183510e-01 225 2.004356e-08 2.369701e-01 226 2.014356e-08 2.637721e-01 227 2.024356e-08 3.122120e-01 228 2.034356e-08 3.639116e-01 Index time v(5) -------------------------------------------------------------------------------- 229 2.044356e-08 3.968699e-01 230 2.054356e-08 4.327724e-01 231 2.064356e-08 4.747823e-01 232 2.074356e-08 5.153272e-01 233 2.084356e-08 5.604909e-01 234 2.094356e-08 6.059530e-01 235 2.104356e-08 6.535793e-01 236 2.114356e-08 7.016178e-01 237 2.124356e-08 7.536682e-01 238 2.134356e-08 8.081448e-01 239 2.144356e-08 8.618081e-01 240 2.154356e-08 9.170860e-01 241 2.164356e-08 9.723732e-01 242 2.174356e-08 1.029204e+00 243 2.184356e-08 1.086169e+00 244 2.194356e-08 1.144362e+00 245 2.204356e-08 1.202633e+00 246 2.214356e-08 1.261936e+00 247 2.224356e-08 1.324732e+00 248 2.234356e-08 1.394179e+00 249 2.244356e-08 1.464842e+00 250 2.254356e-08 1.530803e+00 251 2.264356e-08 1.595539e+00 252 2.274356e-08 1.663128e+00 253 2.284356e-08 1.731345e+00 254 2.294356e-08 1.799490e+00 255 2.304356e-08 1.867675e+00 256 2.314356e-08 1.935245e+00 257 2.324356e-08 2.002588e+00 258 2.334356e-08 2.069851e+00 259 2.344356e-08 2.137022e+00 260 2.354356e-08 2.203325e+00 261 2.364356e-08 2.268897e+00 262 2.374356e-08 2.333781e+00 263 2.384356e-08 2.397978e+00 264 2.394356e-08 2.461375e+00 265 2.404356e-08 2.524022e+00 266 2.414356e-08 2.585778e+00 267 2.424356e-08 2.646895e+00 268 2.434356e-08 2.707727e+00 269 2.444356e-08 2.768640e+00 270 2.454356e-08 2.828687e+00 271 2.464356e-08 2.887069e+00 272 2.474356e-08 2.944021e+00 273 2.484356e-08 3.000399e+00 274 2.494356e-08 3.055937e+00 275 2.504356e-08 3.110444e+00 276 2.514356e-08 3.163833e+00 277 2.524356e-08 3.216183e+00 278 2.534356e-08 3.267403e+00 279 2.544356e-08 3.317643e+00 280 2.554356e-08 3.366794e+00 281 2.564356e-08 3.414871e+00 282 2.574356e-08 3.461788e+00 283 2.584356e-08 3.507653e+00 284 2.594356e-08 3.552412e+00 285 2.604356e-08 3.596123e+00 286 2.614356e-08 3.638746e+00 Index time v(5) -------------------------------------------------------------------------------- 287 2.624356e-08 3.680341e+00 288 2.634356e-08 3.720906e+00 289 2.644356e-08 3.760548e+00 290 2.654356e-08 3.799255e+00 291 2.664356e-08 3.836984e+00 292 2.674356e-08 3.873618e+00 293 2.684356e-08 3.909232e+00 294 2.694356e-08 3.943903e+00 295 2.704356e-08 3.977675e+00 296 2.714356e-08 4.010499e+00 297 2.724356e-08 4.042406e+00 298 2.734356e-08 4.073402e+00 299 2.744356e-08 4.103520e+00 300 2.754356e-08 4.132769e+00 301 2.764356e-08 4.161178e+00 302 2.774356e-08 4.188746e+00 303 2.784356e-08 4.215500e+00 304 2.794356e-08 4.241451e+00 305 2.804356e-08 4.266629e+00 306 2.814356e-08 4.291042e+00 307 2.824356e-08 4.314716e+00 308 2.834356e-08 4.337664e+00 309 2.844356e-08 4.359912e+00 310 2.854356e-08 4.381479e+00 311 2.864356e-08 4.402386e+00 312 2.874356e-08 4.422638e+00 313 2.884356e-08 4.442246e+00 314 2.894356e-08 4.461227e+00 315 2.904356e-08 4.479608e+00 316 2.914356e-08 4.497405e+00 317 2.924356e-08 4.514632e+00 318 2.934356e-08 4.531302e+00 319 2.944356e-08 4.547432e+00 320 2.954356e-08 4.563039e+00 321 2.964356e-08 4.578136e+00 322 2.974356e-08 4.592740e+00 323 2.984356e-08 4.606863e+00 324 2.994356e-08 4.620520e+00 325 3.004356e-08 4.633725e+00 326 3.014356e-08 4.646492e+00 327 3.024356e-08 4.658834e+00 328 3.034356e-08 4.670764e+00 329 3.044356e-08 4.682294e+00 330 3.054356e-08 4.693438e+00 331 3.064356e-08 4.704207e+00 332 3.074356e-08 4.714614e+00 333 3.084356e-08 4.724669e+00 334 3.094356e-08 4.734383e+00 335 3.104356e-08 4.743765e+00 336 3.114356e-08 4.752829e+00 337 3.124356e-08 4.761583e+00 338 3.134356e-08 4.770038e+00 339 3.144356e-08 4.778203e+00 340 3.154356e-08 4.786088e+00 341 3.164356e-08 4.793701e+00 342 3.174356e-08 4.801053e+00 343 3.184356e-08 4.808151e+00 344 3.190000e-08 4.812543e+00 Index time v(5) -------------------------------------------------------------------------------- 345 3.191000e-08 4.813139e+00 346 3.193000e-08 4.814274e+00 347 3.197000e-08 4.816501e+00 348 3.203637e-08 4.821220e+00 349 3.209825e-08 4.825656e+00 350 3.210000e-08 4.825754e+00 351 3.210349e-08 4.825939e+00 352 3.211048e-08 4.826310e+00 353 3.212369e-08 4.827006e+00 354 3.215010e-08 4.828386e+00 355 3.218309e-08 4.831086e+00 356 3.224908e-08 4.834563e+00 357 3.234908e-08 4.840364e+00 358 3.244908e-08 4.846220e+00 359 3.254908e-08 4.851625e+00 360 3.264908e-08 4.857080e+00 361 3.274908e-08 4.862116e+00 362 3.284908e-08 4.867194e+00 363 3.293678e-08 4.871131e+00 364 3.294678e-08 4.871718e+00 365 3.296678e-08 4.872825e+00 366 3.300678e-08 4.874894e+00 367 3.308678e-08 4.878413e+00 368 3.318595e-08 4.882413e+00 369 3.328254e-08 4.886534e+00 370 3.338254e-08 4.890634e+00 371 3.348254e-08 4.894593e+00 372 3.358254e-08 4.898410e+00 373 3.368254e-08 4.902095e+00 374 3.378254e-08 4.905648e+00 375 3.388254e-08 4.909078e+00 376 3.397356e-08 4.912166e+00 377 3.398356e-08 4.912548e+00 378 3.400356e-08 4.913297e+00 379 3.404356e-08 4.914560e+00 380 3.412356e-08 4.914499e+00 381 3.422356e-08 4.911271e+00 382 3.432356e-08 4.910902e+00 383 3.442356e-08 4.910604e+00 384 3.452356e-08 4.908610e+00 385 3.462356e-08 4.906634e+00 386 3.472356e-08 4.903027e+00 387 3.482356e-08 4.899335e+00 388 3.492356e-08 4.894114e+00 389 3.502356e-08 4.888421e+00 390 3.512356e-08 4.881080e+00 391 3.522356e-08 4.873338e+00 392 3.532356e-08 4.864990e+00 393 3.542356e-08 4.855633e+00 394 3.552356e-08 4.845529e+00 395 3.562356e-08 4.834448e+00 396 3.572356e-08 4.822605e+00 397 3.582356e-08 4.809791e+00 398 3.592356e-08 4.796276e+00 399 3.602356e-08 4.782482e+00 400 3.612356e-08 4.765395e+00 401 3.622356e-08 4.734994e+00 402 3.632356e-08 4.694645e+00 Index time v(5) -------------------------------------------------------------------------------- 403 3.642356e-08 4.662182e+00 404 3.652356e-08 4.636176e+00 405 3.662356e-08 4.605539e+00 406 3.672356e-08 4.572958e+00 407 3.682356e-08 4.539117e+00 408 3.692356e-08 4.503183e+00 409 3.702356e-08 4.465657e+00 410 3.712356e-08 4.425965e+00 411 3.722356e-08 4.384452e+00 412 3.732356e-08 4.341062e+00 413 3.742356e-08 4.295980e+00 414 3.752356e-08 4.248988e+00 415 3.762356e-08 4.199860e+00 416 3.772356e-08 4.148800e+00 417 3.782356e-08 4.095581e+00 418 3.792356e-08 4.040743e+00 419 3.802356e-08 3.984737e+00 420 3.812356e-08 3.927626e+00 421 3.822356e-08 3.867181e+00 422 3.832356e-08 3.800411e+00 423 3.842356e-08 3.729166e+00 424 3.852356e-08 3.660124e+00 425 3.862356e-08 3.593960e+00 426 3.872356e-08 3.526265e+00 427 3.882356e-08 3.456335e+00 428 3.892356e-08 3.385602e+00 429 3.902356e-08 3.313743e+00 430 3.912356e-08 3.240723e+00 431 3.922356e-08 3.166585e+00 432 3.932356e-08 3.091339e+00 433 3.942356e-08 3.015325e+00 434 3.952356e-08 2.939341e+00 435 3.962356e-08 2.863904e+00 436 3.972356e-08 2.788988e+00 437 3.982356e-08 2.714648e+00 438 3.992356e-08 2.641002e+00 439 4.002356e-08 2.568140e+00 440 4.012356e-08 2.496200e+00 441 4.022356e-08 2.425088e+00 442 4.032356e-08 2.354402e+00 443 4.042356e-08 2.283748e+00 444 4.052356e-08 2.213661e+00 445 4.062356e-08 2.145285e+00 446 4.072356e-08 2.078865e+00 447 4.082356e-08 2.013658e+00 448 4.092356e-08 1.949376e+00 449 4.102356e-08 1.886282e+00 450 4.112356e-08 1.824452e+00 451 4.122356e-08 1.763826e+00 452 4.132356e-08 1.704428e+00 453 4.142356e-08 1.646279e+00 454 4.152356e-08 1.589434e+00 455 4.162356e-08 1.533986e+00 456 4.172356e-08 1.479995e+00 457 4.182356e-08 1.427451e+00 458 4.192356e-08 1.376336e+00 459 4.202356e-08 1.326645e+00 460 4.212356e-08 1.278375e+00 Index time v(5) -------------------------------------------------------------------------------- 461 4.222356e-08 1.231509e+00 462 4.232356e-08 1.186014e+00 463 4.242356e-08 1.141813e+00 464 4.252356e-08 1.098865e+00 465 4.262356e-08 1.057204e+00 466 4.272356e-08 1.016924e+00 467 4.282356e-08 9.780195e-01 468 4.292356e-08 9.403954e-01 469 4.302356e-08 9.039738e-01 470 4.312356e-08 8.687547e-01 471 4.322356e-08 8.347214e-01 472 4.332356e-08 8.018456e-01 473 4.342356e-08 7.700915e-01 474 4.352356e-08 7.394412e-01 475 4.362356e-08 7.098658e-01 476 4.372356e-08 6.813507e-01 477 4.382356e-08 6.538665e-01 478 4.392356e-08 6.273904e-01 479 4.402356e-08 6.018860e-01 480 4.412356e-08 5.773309e-01 481 4.422356e-08 5.536915e-01 482 4.432356e-08 5.309453e-01 483 4.442356e-08 5.090564e-01 484 4.452356e-08 4.879996e-01 485 4.462356e-08 4.677412e-01 486 4.472356e-08 4.482660e-01 487 4.482356e-08 4.295506e-01 488 4.492356e-08 4.115769e-01 489 4.502356e-08 3.943088e-01 490 4.512356e-08 3.777228e-01 491 4.522356e-08 3.617911e-01 492 4.532356e-08 3.464975e-01 493 4.542356e-08 3.318140e-01 494 4.552356e-08 3.177232e-01 495 4.562356e-08 3.041991e-01 496 4.572356e-08 2.912260e-01 497 4.582356e-08 2.787798e-01 498 4.592356e-08 2.668453e-01 499 4.602356e-08 2.553992e-01 500 4.612356e-08 2.444270e-01 501 4.622356e-08 2.339064e-01 502 4.632356e-08 2.238241e-01 503 4.642356e-08 2.141592e-01 504 4.652356e-08 2.048991e-01 505 4.662356e-08 1.960240e-01 506 4.672356e-08 1.875223e-01 507 4.682356e-08 1.793763e-01 508 4.692356e-08 1.715755e-01 509 4.700000e-08 1.655183e-01 ngspice-26/tests/transmission/Makefile.am0000644000265600020320000000054712264261473020166 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ cpl_ibm2.cir \ cpl3_4_line.cir \ ltra1_1_line.cir \ ltra2_2_line.cir \ txl1_1_line.cir \ txl2_3_line.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/transmission/Makefile.in0000644000265600020320000003371312264261542020175 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/transmission DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ cpl_ibm2.cir \ cpl3_4_line.cir \ ltra1_1_line.cir \ ltra2_2_line.cir \ txl1_1_line.cir \ txl2_3_line.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/transmission/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/transmission/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/transmission/ltra1_1_line.cir0000644000265600020320000000127512264261473021102 0ustar andreasadminMOSdriver -- lossy line LTRA model -- C load m5 0 168 2 0 mn0p9 w = 18.0u l=0.9u m6 1 168 2 1 mp1p0 w = 36.0u l=1.0u CN2 2 0 0.025398e-12 CN3 3 0 0.007398e-12 o1 2 0 3 0 lline vdd 1 0 dc 5.0 VS 168 0 PULSE (0 5 15.9NS 0.2NS 0.2NS 15.8NS 32NS ) .OPTION NOACCT .TRAN 0.2N 47N 0 0.1N .PRINT TRAN V(2) V(3) .MODEL mn0p9 NMOS VTO=0.8 KP=48U GAMMA=0.30 PHI=0.55 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .MODEL mp1p0 PMOS VTO=-0.8 KP=21U GAMMA=0.45 PHI=0.61 +LAMBDA=0.00 CGSO=0 CGDO=0 CJ=0 CJSW=0 TOX=18000N LD=0.0U .model lline ltra rel=1 r=12.45 g=0 l=8.972e-9 c=0.468e-12 +len=16 steplimit compactrel=1.0e-3 compactabs=1.0e-14 .end ngspice-26/tests/transmission/ltra1_1_line.out0000644000265600020320000005563512264261473021145 0ustar andreasadminCircuit: mosdriver -- lossy line ltra model -- c load Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vs: no DC value, transient time 0 value used No. of Data Rows : 498 mosdriver -- lossy line ltra model -- c load Transient Analysis Sat Jan 16 17:42:59 2010 -------------------------------------------------------------------------------- Index time v(2) v(3) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 5.000000e+00 1 2.000000e-12 5.000000e+00 5.000000e+00 2 4.000000e-12 5.000000e+00 5.000000e+00 3 8.000000e-12 5.000000e+00 5.000000e+00 4 1.600000e-11 5.000000e+00 5.000000e+00 5 3.200000e-11 5.000000e+00 5.000000e+00 6 6.400000e-11 5.000000e+00 5.000000e+00 7 1.280000e-10 5.000000e+00 5.000000e+00 8 2.280000e-10 5.000000e+00 5.000000e+00 9 3.280000e-10 5.000000e+00 5.000000e+00 10 4.280000e-10 5.000000e+00 5.000000e+00 11 5.280000e-10 5.000000e+00 5.000000e+00 12 6.280000e-10 5.000000e+00 5.000000e+00 13 7.280000e-10 5.000000e+00 5.000000e+00 14 8.280000e-10 5.000000e+00 5.000000e+00 15 9.280000e-10 5.000000e+00 5.000000e+00 16 1.028000e-09 5.000000e+00 5.000000e+00 17 1.128000e-09 5.000000e+00 5.000000e+00 18 1.228000e-09 5.000000e+00 5.000000e+00 19 1.328000e-09 5.000000e+00 5.000000e+00 20 1.428000e-09 5.000000e+00 5.000000e+00 21 1.528000e-09 5.000000e+00 5.000000e+00 22 1.628000e-09 5.000000e+00 5.000000e+00 23 1.728000e-09 5.000000e+00 5.000000e+00 24 1.828000e-09 5.000000e+00 5.000000e+00 25 1.928000e-09 5.000000e+00 5.000000e+00 26 2.028000e-09 5.000000e+00 5.000000e+00 27 2.128000e-09 5.000000e+00 5.000000e+00 28 2.228000e-09 5.000000e+00 5.000000e+00 29 2.328000e-09 5.000000e+00 5.000000e+00 30 2.428000e-09 5.000000e+00 5.000000e+00 31 2.528000e-09 5.000000e+00 5.000000e+00 32 2.628000e-09 5.000000e+00 5.000000e+00 33 2.728000e-09 5.000000e+00 5.000000e+00 34 2.828000e-09 5.000000e+00 5.000000e+00 35 2.928000e-09 5.000000e+00 5.000000e+00 36 3.028000e-09 5.000000e+00 5.000000e+00 37 3.128000e-09 5.000000e+00 5.000000e+00 38 3.228000e-09 5.000000e+00 5.000000e+00 39 3.328000e-09 5.000000e+00 5.000000e+00 40 3.428000e-09 5.000000e+00 5.000000e+00 41 3.528000e-09 5.000000e+00 5.000000e+00 42 3.628000e-09 5.000000e+00 5.000000e+00 43 3.728000e-09 5.000000e+00 5.000000e+00 44 3.828000e-09 5.000000e+00 5.000000e+00 45 3.928000e-09 5.000000e+00 5.000000e+00 46 4.028000e-09 5.000000e+00 5.000000e+00 47 4.128000e-09 5.000000e+00 5.000000e+00 48 4.228000e-09 5.000000e+00 5.000000e+00 49 4.328000e-09 5.000000e+00 5.000000e+00 50 4.428000e-09 5.000000e+00 5.000000e+00 51 4.528000e-09 5.000000e+00 5.000000e+00 52 4.628000e-09 5.000000e+00 5.000000e+00 53 4.728000e-09 5.000000e+00 5.000000e+00 54 4.828000e-09 5.000000e+00 5.000000e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 55 4.928000e-09 5.000000e+00 5.000000e+00 56 5.028000e-09 5.000000e+00 5.000000e+00 57 5.128000e-09 5.000000e+00 5.000000e+00 58 5.228000e-09 5.000000e+00 5.000000e+00 59 5.328000e-09 5.000000e+00 5.000000e+00 60 5.428000e-09 5.000000e+00 5.000000e+00 61 5.528000e-09 5.000000e+00 5.000000e+00 62 5.628000e-09 5.000000e+00 5.000000e+00 63 5.728000e-09 5.000000e+00 5.000000e+00 64 5.828000e-09 5.000000e+00 5.000000e+00 65 5.928000e-09 5.000000e+00 5.000000e+00 66 6.028000e-09 5.000000e+00 5.000000e+00 67 6.128000e-09 5.000000e+00 5.000000e+00 68 6.228000e-09 5.000000e+00 5.000000e+00 69 6.328000e-09 5.000000e+00 5.000000e+00 70 6.428000e-09 5.000000e+00 5.000000e+00 71 6.528000e-09 5.000000e+00 5.000000e+00 72 6.628000e-09 5.000000e+00 5.000000e+00 73 6.728000e-09 5.000000e+00 5.000000e+00 74 6.828000e-09 5.000000e+00 5.000000e+00 75 6.928000e-09 5.000000e+00 5.000000e+00 76 7.028000e-09 5.000000e+00 5.000000e+00 77 7.128000e-09 5.000000e+00 5.000000e+00 78 7.228000e-09 5.000000e+00 5.000000e+00 79 7.328000e-09 5.000000e+00 5.000000e+00 80 7.428000e-09 5.000000e+00 5.000000e+00 81 7.528000e-09 5.000000e+00 5.000000e+00 82 7.628000e-09 5.000000e+00 5.000000e+00 83 7.728000e-09 5.000000e+00 5.000000e+00 84 7.828000e-09 5.000000e+00 5.000000e+00 85 7.928000e-09 5.000000e+00 5.000000e+00 86 8.028000e-09 5.000000e+00 5.000000e+00 87 8.128000e-09 5.000000e+00 5.000000e+00 88 8.228000e-09 5.000000e+00 5.000000e+00 89 8.328000e-09 5.000000e+00 5.000000e+00 90 8.428000e-09 5.000000e+00 5.000000e+00 91 8.528000e-09 5.000000e+00 5.000000e+00 92 8.628000e-09 5.000000e+00 5.000000e+00 93 8.728000e-09 5.000000e+00 5.000000e+00 94 8.828000e-09 5.000000e+00 5.000000e+00 95 8.928000e-09 5.000000e+00 5.000000e+00 96 9.028000e-09 5.000000e+00 5.000000e+00 97 9.128000e-09 5.000000e+00 5.000000e+00 98 9.228000e-09 5.000000e+00 5.000000e+00 99 9.328000e-09 5.000000e+00 5.000000e+00 100 9.428000e-09 5.000000e+00 5.000000e+00 101 9.528000e-09 5.000000e+00 5.000000e+00 102 9.628000e-09 5.000000e+00 5.000000e+00 103 9.728000e-09 5.000000e+00 5.000000e+00 104 9.828000e-09 5.000000e+00 5.000000e+00 105 9.928000e-09 5.000000e+00 5.000000e+00 106 1.002800e-08 5.000000e+00 5.000000e+00 107 1.012800e-08 5.000000e+00 5.000000e+00 108 1.022800e-08 5.000000e+00 5.000000e+00 109 1.032800e-08 5.000000e+00 5.000000e+00 110 1.042800e-08 5.000000e+00 5.000000e+00 111 1.052800e-08 5.000000e+00 5.000000e+00 112 1.062800e-08 5.000000e+00 5.000000e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 113 1.072800e-08 5.000000e+00 5.000000e+00 114 1.082800e-08 5.000000e+00 5.000000e+00 115 1.092800e-08 5.000000e+00 5.000000e+00 116 1.102800e-08 5.000000e+00 5.000000e+00 117 1.112800e-08 5.000000e+00 5.000000e+00 118 1.122800e-08 5.000000e+00 5.000000e+00 119 1.132800e-08 5.000000e+00 5.000000e+00 120 1.142800e-08 5.000000e+00 5.000000e+00 121 1.152800e-08 5.000000e+00 5.000000e+00 122 1.162800e-08 5.000000e+00 5.000000e+00 123 1.172800e-08 5.000000e+00 5.000000e+00 124 1.182800e-08 5.000000e+00 5.000000e+00 125 1.192800e-08 5.000000e+00 5.000000e+00 126 1.202800e-08 5.000000e+00 5.000000e+00 127 1.212800e-08 5.000000e+00 5.000000e+00 128 1.222800e-08 5.000000e+00 5.000000e+00 129 1.232800e-08 5.000000e+00 5.000000e+00 130 1.242800e-08 5.000000e+00 5.000000e+00 131 1.252800e-08 5.000000e+00 5.000000e+00 132 1.262800e-08 5.000000e+00 5.000000e+00 133 1.272800e-08 5.000000e+00 5.000000e+00 134 1.282800e-08 5.000000e+00 5.000000e+00 135 1.292800e-08 5.000000e+00 5.000000e+00 136 1.302800e-08 5.000000e+00 5.000000e+00 137 1.312800e-08 5.000000e+00 5.000000e+00 138 1.322800e-08 5.000000e+00 5.000000e+00 139 1.332800e-08 5.000000e+00 5.000000e+00 140 1.342800e-08 5.000000e+00 5.000000e+00 141 1.352800e-08 5.000000e+00 5.000000e+00 142 1.362800e-08 5.000000e+00 5.000000e+00 143 1.372800e-08 5.000000e+00 5.000000e+00 144 1.382800e-08 5.000000e+00 5.000000e+00 145 1.392800e-08 5.000000e+00 5.000000e+00 146 1.402800e-08 5.000000e+00 5.000000e+00 147 1.412800e-08 5.000000e+00 5.000000e+00 148 1.422800e-08 5.000000e+00 5.000000e+00 149 1.432800e-08 5.000000e+00 5.000000e+00 150 1.442800e-08 5.000000e+00 5.000000e+00 151 1.452800e-08 5.000000e+00 5.000000e+00 152 1.462800e-08 5.000000e+00 5.000000e+00 153 1.472800e-08 5.000000e+00 5.000000e+00 154 1.482800e-08 5.000000e+00 5.000000e+00 155 1.492800e-08 5.000000e+00 5.000000e+00 156 1.502800e-08 5.000000e+00 5.000000e+00 157 1.512800e-08 5.000000e+00 5.000000e+00 158 1.522800e-08 5.000000e+00 5.000000e+00 159 1.532800e-08 5.000000e+00 5.000000e+00 160 1.542800e-08 5.000000e+00 5.000000e+00 161 1.552800e-08 5.000000e+00 5.000000e+00 162 1.562800e-08 5.000000e+00 5.000000e+00 163 1.572800e-08 5.000000e+00 5.000000e+00 164 1.582800e-08 5.000000e+00 5.000000e+00 165 1.590000e-08 5.000000e+00 5.000000e+00 166 1.591000e-08 5.000068e+00 5.000000e+00 167 1.593000e-08 5.000098e+00 5.000000e+00 168 1.597000e-08 4.957752e+00 5.000000e+00 169 1.605000e-08 4.452793e+00 5.000000e+00 170 1.610000e-08 3.840812e+00 5.000000e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 171 1.611000e-08 3.800302e+00 5.000000e+00 172 1.613000e-08 3.768943e+00 5.000000e+00 173 1.617000e-08 3.749050e+00 5.000000e+00 174 1.625000e-08 3.684821e+00 5.000000e+00 175 1.635000e-08 3.622577e+00 5.000000e+00 176 1.645000e-08 3.551765e+00 5.000000e+00 177 1.655000e-08 3.493778e+00 5.000000e+00 178 1.665000e-08 3.429632e+00 5.000000e+00 179 1.675000e-08 3.375582e+00 5.000000e+00 180 1.685000e-08 3.317137e+00 5.000000e+00 181 1.695000e-08 3.266708e+00 5.000081e+00 182 1.705000e-08 3.213179e+00 4.761543e+00 183 1.715000e-08 3.166070e+00 3.813826e+00 184 1.725000e-08 3.116815e+00 3.685771e+00 185 1.735000e-08 3.072745e+00 3.609063e+00 186 1.745000e-08 3.027231e+00 3.492829e+00 187 1.755000e-08 2.985940e+00 3.423888e+00 188 1.765000e-08 2.943725e+00 3.313974e+00 189 1.775000e-08 2.904977e+00 3.248715e+00 190 1.785000e-08 2.865685e+00 3.145026e+00 191 1.795000e-08 2.829281e+00 3.083008e+00 192 1.805000e-08 2.745441e+00 2.985080e+00 193 1.815000e-08 2.467167e+00 2.925945e+00 194 1.825000e-08 2.184420e+00 2.833351e+00 195 1.835000e-08 2.138410e+00 2.776803e+00 196 1.845000e-08 2.076543e+00 2.689151e+00 197 1.855000e-08 1.999946e+00 2.634943e+00 198 1.865000e-08 1.941457e+00 2.551872e+00 199 1.875000e-08 1.871365e+00 2.499796e+00 200 1.885000e-08 1.815714e+00 2.420975e+00 201 1.895000e-08 1.751531e+00 2.370858e+00 202 1.905000e-08 1.698686e+00 2.287300e+00 203 1.915000e-08 1.639700e+00 2.183808e+00 204 1.925000e-08 1.589604e+00 2.013480e+00 205 1.935000e-08 1.535214e+00 1.915992e+00 206 1.945000e-08 1.487782e+00 1.851520e+00 207 1.955000e-08 1.437480e+00 1.795313e+00 208 1.965000e-08 1.392605e+00 1.718031e+00 209 1.975000e-08 1.345959e+00 1.666496e+00 210 1.985000e-08 1.303527e+00 1.594857e+00 211 1.995000e-08 1.260163e+00 1.546162e+00 212 2.005000e-08 1.218582e+00 1.479736e+00 213 2.015000e-08 1.167007e+00 1.433792e+00 214 2.025000e-08 1.100930e+00 1.372130e+00 215 2.035000e-08 1.035422e+00 1.328842e+00 216 2.045000e-08 9.928653e-01 1.271548e+00 217 2.055000e-08 9.585804e-01 1.230811e+00 218 2.065000e-08 9.202834e-01 1.177534e+00 219 2.075000e-08 8.837107e-01 1.139236e+00 220 2.085000e-08 8.490898e-01 1.089663e+00 221 2.095000e-08 8.153770e-01 1.053689e+00 222 2.105000e-08 7.831429e-01 1.007345e+00 223 2.115000e-08 7.521002e-01 9.718657e-01 224 2.125000e-08 7.221120e-01 9.233550e-01 225 2.135000e-08 6.934968e-01 8.836538e-01 226 2.145000e-08 6.656197e-01 8.391150e-01 227 2.155000e-08 6.392182e-01 8.099281e-01 228 2.165000e-08 6.133193e-01 7.733211e-01 Index time v(2) v(3) -------------------------------------------------------------------------------- 229 2.175000e-08 5.889412e-01 7.450936e-01 230 2.185000e-08 5.648919e-01 7.104092e-01 231 2.195000e-08 5.423680e-01 6.846665e-01 232 2.205000e-08 5.200144e-01 6.526315e-01 233 2.215000e-08 4.988823e-01 6.288350e-01 234 2.225000e-08 4.769541e-01 5.992924e-01 235 2.235000e-08 4.553717e-01 5.773100e-01 236 2.245000e-08 4.340156e-01 5.500659e-01 237 2.255000e-08 4.156583e-01 5.297755e-01 238 2.265000e-08 3.982273e-01 5.046524e-01 239 2.275000e-08 3.818241e-01 4.859360e-01 240 2.285000e-08 3.652181e-01 4.627709e-01 241 2.295000e-08 3.500607e-01 4.455180e-01 242 2.305000e-08 3.348808e-01 4.241580e-01 243 2.315000e-08 3.209373e-01 4.082261e-01 244 2.325000e-08 3.069708e-01 3.883669e-01 245 2.335000e-08 2.941662e-01 3.733201e-01 246 2.345000e-08 2.813182e-01 3.546588e-01 247 2.355000e-08 2.695600e-01 3.409249e-01 248 2.365000e-08 2.577450e-01 3.243021e-01 249 2.375000e-08 2.469482e-01 3.120866e-01 250 2.385000e-08 2.360860e-01 2.967668e-01 251 2.395000e-08 2.261730e-01 2.854593e-01 252 2.405000e-08 2.161891e-01 2.713974e-01 253 2.415000e-08 2.070823e-01 2.610597e-01 254 2.425000e-08 1.978748e-01 2.481380e-01 255 2.435000e-08 1.894251e-01 2.386746e-01 256 2.445000e-08 1.808426e-01 2.268092e-01 257 2.455000e-08 1.730470e-01 2.181484e-01 258 2.465000e-08 1.652874e-01 2.072550e-01 259 2.475000e-08 1.583082e-01 1.993318e-01 260 2.485000e-08 1.512457e-01 1.893322e-01 261 2.495000e-08 1.448150e-01 1.820864e-01 262 2.505000e-08 1.383233e-01 1.729090e-01 263 2.515000e-08 1.324454e-01 1.662842e-01 264 2.525000e-08 1.265002e-01 1.578588e-01 265 2.535000e-08 1.211181e-01 1.517915e-01 266 2.545000e-08 1.156725e-01 1.440387e-01 267 2.555000e-08 1.107468e-01 1.384788e-01 268 2.565000e-08 1.057592e-01 1.313797e-01 269 2.575000e-08 1.012520e-01 1.263404e-01 270 2.585000e-08 9.668450e-02 1.198592e-01 271 2.595000e-08 9.256073e-02 1.152605e-01 272 2.605000e-08 8.837856e-02 1.093104e-01 273 2.615000e-08 8.460613e-02 1.051144e-01 274 2.625000e-08 8.077652e-02 9.966354e-02 275 2.635000e-08 7.732335e-02 9.583696e-02 276 2.645000e-08 7.381186e-02 9.084150e-02 277 2.655000e-08 7.064729e-02 8.735275e-02 278 2.665000e-08 6.743265e-02 8.277540e-02 279 2.675000e-08 6.454798e-02 7.959526e-02 280 2.685000e-08 6.161777e-02 7.540144e-02 281 2.695000e-08 5.898538e-02 7.250325e-02 282 2.705000e-08 5.630242e-02 6.866114e-02 283 2.715000e-08 5.389491e-02 6.602048e-02 284 2.725000e-08 5.144130e-02 6.250082e-02 285 2.735000e-08 4.924202e-02 6.009499e-02 286 2.745000e-08 4.699778e-02 5.687017e-02 Index time v(2) v(3) -------------------------------------------------------------------------------- 287 2.755000e-08 4.498843e-02 5.467783e-02 288 2.765000e-08 4.293599e-02 5.172351e-02 289 2.775000e-08 4.110036e-02 4.972840e-02 290 2.785000e-08 3.922341e-02 4.702522e-02 291 2.795000e-08 3.754665e-02 4.521093e-02 292 2.805000e-08 3.583029e-02 4.273560e-02 293 2.815000e-08 3.429876e-02 4.108380e-02 294 2.825000e-08 3.272933e-02 3.881699e-02 295 2.835000e-08 3.133051e-02 3.731419e-02 296 2.845000e-08 2.989532e-02 3.523865e-02 297 2.855000e-08 2.861752e-02 3.387150e-02 298 2.865000e-08 2.730502e-02 3.197113e-02 299 2.875000e-08 2.613826e-02 3.072766e-02 300 2.885000e-08 2.493894e-02 2.898775e-02 301 2.895000e-08 2.387432e-02 2.785699e-02 302 2.905000e-08 2.277822e-02 2.626405e-02 303 2.915000e-08 2.180608e-02 2.523600e-02 304 2.925000e-08 2.080394e-02 2.377767e-02 305 2.935000e-08 1.991644e-02 2.284318e-02 306 2.945000e-08 1.900042e-02 2.150812e-02 307 2.955000e-08 1.819023e-02 2.065881e-02 308 2.965000e-08 1.735290e-02 1.943659e-02 309 2.975000e-08 1.661331e-02 1.866491e-02 310 2.985000e-08 1.584794e-02 1.754619e-02 311 2.995000e-08 1.517283e-02 1.684536e-02 312 3.005000e-08 1.447325e-02 1.582145e-02 313 3.015000e-08 1.385703e-02 1.518499e-02 314 3.025000e-08 1.321759e-02 1.424774e-02 315 3.035000e-08 1.265515e-02 1.366984e-02 316 3.045000e-08 1.207069e-02 1.281199e-02 317 3.055000e-08 1.155734e-02 1.228742e-02 318 3.065000e-08 1.102312e-02 1.150227e-02 319 3.075000e-08 1.055460e-02 1.102622e-02 320 3.085000e-08 1.006633e-02 1.030764e-02 321 3.095000e-08 9.638793e-03 9.875731e-03 322 3.105000e-08 9.192576e-03 9.218101e-03 323 3.115000e-08 8.802430e-03 8.826355e-03 324 3.125000e-08 8.394591e-03 8.224531e-03 325 3.135000e-08 8.038550e-03 7.869316e-03 326 3.145000e-08 7.665798e-03 7.318588e-03 327 3.155000e-08 7.340905e-03 6.996596e-03 328 3.165000e-08 7.000225e-03 6.492650e-03 329 3.175000e-08 6.703760e-03 6.200867e-03 330 3.185000e-08 6.392391e-03 5.739757e-03 331 3.190000e-08 6.231698e-03 5.599711e-03 332 3.191000e-08 6.271794e-03 5.527927e-03 333 3.193000e-08 6.480360e-03 5.467952e-03 334 3.197000e-08 3.888365e-02 5.384217e-03 335 3.203644e-08 3.228266e-01 5.139705e-03 336 3.209839e-08 9.056803e-01 4.887744e-03 337 3.210000e-08 9.246154e-01 4.880404e-03 338 3.210323e-08 9.449448e-01 4.871957e-03 339 3.210968e-08 9.678754e-01 4.855817e-03 340 3.212258e-08 9.766354e-01 4.825172e-03 341 3.214839e-08 9.919844e-01 4.768340e-03 342 3.217995e-08 1.011137e+00 4.707713e-03 343 3.224307e-08 1.048086e+00 4.491166e-03 344 3.234307e-08 1.105006e+00 4.178933e-03 Index time v(2) v(3) -------------------------------------------------------------------------------- 345 3.244307e-08 1.159637e+00 3.915540e-03 346 3.254307e-08 1.212316e+00 3.631884e-03 347 3.264307e-08 1.262985e+00 3.391166e-03 348 3.274307e-08 1.311920e+00 3.133543e-03 349 3.284307e-08 1.359079e+00 2.913569e-03 350 3.294307e-08 1.404705e+00 2.750685e-03 351 3.304307e-08 1.448724e+00 1.508475e-01 352 3.314307e-08 1.491365e+00 9.348311e-01 353 3.321536e-08 1.521308e+00 1.024389e+00 354 3.329346e-08 1.552950e+00 1.074053e+00 355 3.339346e-08 1.592249e+00 1.174263e+00 356 3.349346e-08 1.630447e+00 1.230165e+00 357 3.359346e-08 1.667433e+00 1.324731e+00 358 3.369346e-08 1.703410e+00 1.378530e+00 359 3.379346e-08 1.738305e+00 1.467951e+00 360 3.389346e-08 1.772274e+00 1.519843e+00 361 3.397985e-08 1.800855e+00 1.596892e+00 362 3.398985e-08 1.806796e+00 1.595244e+00 363 3.400985e-08 1.821390e+00 1.605058e+00 364 3.404985e-08 1.859309e+00 1.628316e+00 365 3.412985e-08 2.038220e+00 1.681377e+00 366 3.422985e-08 2.322609e+00 1.743778e+00 367 3.432985e-08 2.378201e+00 1.802541e+00 368 3.442985e-08 2.451833e+00 1.864787e+00 369 3.452985e-08 2.512315e+00 1.923402e+00 370 3.462985e-08 2.579523e+00 1.983080e+00 371 3.472985e-08 2.638565e+00 2.039385e+00 372 3.482985e-08 2.700292e+00 2.096675e+00 373 3.492985e-08 2.757560e+00 2.150832e+00 374 3.501664e-08 2.807822e+00 2.199834e+00 375 3.502664e-08 2.813595e+00 2.206400e+00 376 3.504664e-08 2.823292e+00 2.222032e+00 377 3.508664e-08 2.843812e+00 2.258220e+00 378 3.516664e-08 2.887457e+00 2.363493e+00 379 3.526664e-08 2.939867e+00 2.524183e+00 380 3.536664e-08 2.989747e+00 2.594930e+00 381 3.546664e-08 3.040121e+00 2.656514e+00 382 3.556664e-08 3.088471e+00 2.728137e+00 383 3.566664e-08 3.136093e+00 2.785106e+00 384 3.576664e-08 3.182050e+00 2.854337e+00 385 3.586664e-08 3.227127e+00 2.907539e+00 386 3.596664e-08 3.270825e+00 2.972773e+00 387 3.606664e-08 3.314300e+00 3.021574e+00 388 3.616664e-08 3.374001e+00 3.076418e+00 389 3.626664e-08 3.451705e+00 3.131477e+00 390 3.636664e-08 3.518606e+00 3.183576e+00 391 3.646664e-08 3.559757e+00 3.235239e+00 392 3.656664e-08 3.603529e+00 3.285211e+00 393 3.666664e-08 3.647057e+00 3.334530e+00 394 3.676664e-08 3.688153e+00 3.381950e+00 395 3.686664e-08 3.729181e+00 3.428827e+00 396 3.696664e-08 3.767726e+00 3.473874e+00 397 3.706664e-08 3.805831e+00 3.518547e+00 398 3.716664e-08 3.840643e+00 3.564490e+00 399 3.726664e-08 3.876393e+00 3.616856e+00 400 3.736664e-08 3.911530e+00 3.669535e+00 401 3.746664e-08 3.944792e+00 3.714671e+00 402 3.756664e-08 3.977781e+00 3.753485e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 403 3.766664e-08 4.009352e+00 3.793508e+00 404 3.776664e-08 4.040426e+00 3.832018e+00 405 3.786664e-08 4.070195e+00 3.869517e+00 406 3.796664e-08 4.099453e+00 3.905760e+00 407 3.806664e-08 4.127558e+00 3.940978e+00 408 3.816664e-08 4.155686e+00 3.974752e+00 409 3.826664e-08 4.184627e+00 4.007616e+00 410 3.836664e-08 4.214806e+00 4.039765e+00 411 3.846664e-08 4.242992e+00 4.071162e+00 412 3.856664e-08 4.268124e+00 4.101226e+00 413 3.866664e-08 4.291856e+00 4.130775e+00 414 3.876664e-08 4.315596e+00 4.159124e+00 415 3.886664e-08 4.338378e+00 4.186897e+00 416 3.896664e-08 4.360494e+00 4.213567e+00 417 3.906664e-08 4.381839e+00 4.239673e+00 418 3.916664e-08 4.402482e+00 4.264846e+00 419 3.926664e-08 4.422365e+00 4.289831e+00 420 3.936664e-08 4.441714e+00 4.314473e+00 421 3.946664e-08 4.460515e+00 4.338694e+00 422 3.956664e-08 4.478698e+00 4.361403e+00 423 3.966664e-08 4.496255e+00 4.383016e+00 424 3.976664e-08 4.513303e+00 4.403868e+00 425 3.986664e-08 4.529762e+00 4.424311e+00 426 3.996664e-08 4.545718e+00 4.443926e+00 427 4.006664e-08 4.561135e+00 4.463010e+00 428 4.016664e-08 4.576086e+00 4.481364e+00 429 4.026664e-08 4.590620e+00 4.499190e+00 430 4.036664e-08 4.604874e+00 4.516345e+00 431 4.046664e-08 4.618803e+00 4.533049e+00 432 4.056664e-08 4.632196e+00 4.549139e+00 433 4.066664e-08 4.644919e+00 4.564759e+00 434 4.076664e-08 4.657138e+00 4.579795e+00 435 4.086664e-08 4.669006e+00 4.594405e+00 436 4.096664e-08 4.680493e+00 4.608463e+00 437 4.106664e-08 4.691580e+00 4.622117e+00 438 4.116664e-08 4.702289e+00 4.635259e+00 439 4.126664e-08 4.712635e+00 4.648032e+00 440 4.136664e-08 4.722622e+00 4.660363e+00 441 4.146664e-08 4.732282e+00 4.672380e+00 442 4.156664e-08 4.741616e+00 4.683955e+00 443 4.166664e-08 4.750639e+00 4.695132e+00 444 4.176664e-08 4.759346e+00 4.705836e+00 445 4.186664e-08 4.767764e+00 4.716215e+00 446 4.196664e-08 4.775889e+00 4.726217e+00 447 4.206664e-08 4.783742e+00 4.735914e+00 448 4.216664e-08 4.791321e+00 4.745240e+00 449 4.226664e-08 4.798649e+00 4.754280e+00 450 4.236664e-08 4.805730e+00 4.762974e+00 451 4.246664e-08 4.812588e+00 4.771401e+00 452 4.256664e-08 4.819217e+00 4.779510e+00 453 4.266664e-08 4.825614e+00 4.787369e+00 454 4.276664e-08 4.831764e+00 4.794929e+00 455 4.286664e-08 4.837697e+00 4.802253e+00 456 4.296664e-08 4.843424e+00 4.809298e+00 457 4.306664e-08 4.848960e+00 4.816123e+00 458 4.316664e-08 4.854298e+00 4.822688e+00 459 4.326664e-08 4.859453e+00 4.829048e+00 460 4.336664e-08 4.864424e+00 4.835165e+00 Index time v(2) v(3) -------------------------------------------------------------------------------- 461 4.346664e-08 4.869225e+00 4.841095e+00 462 4.356664e-08 4.873855e+00 4.846801e+00 463 4.366664e-08 4.878328e+00 4.852327e+00 464 4.376664e-08 4.882641e+00 4.857637e+00 465 4.386664e-08 4.886806e+00 4.862774e+00 466 4.396664e-08 4.890822e+00 4.867713e+00 467 4.406664e-08 4.894700e+00 4.872496e+00 468 4.416664e-08 4.898439e+00 4.877096e+00 469 4.426664e-08 4.902049e+00 4.881549e+00 470 4.436664e-08 4.905531e+00 4.885829e+00 471 4.446664e-08 4.908893e+00 4.889974e+00 472 4.456664e-08 4.912136e+00 4.893958e+00 473 4.466664e-08 4.915268e+00 4.897815e+00 474 4.476664e-08 4.918287e+00 4.901523e+00 475 4.486664e-08 4.921199e+00 4.905112e+00 476 4.496664e-08 4.924005e+00 4.908562e+00 477 4.506664e-08 4.926715e+00 4.911901e+00 478 4.516664e-08 4.929327e+00 4.915111e+00 479 4.526664e-08 4.931849e+00 4.918218e+00 480 4.536664e-08 4.934279e+00 4.921205e+00 481 4.546664e-08 4.936625e+00 4.924095e+00 482 4.556664e-08 4.938886e+00 4.926874e+00 483 4.566664e-08 4.941069e+00 4.929563e+00 484 4.576664e-08 4.943173e+00 4.932147e+00 485 4.586664e-08 4.945203e+00 4.934648e+00 486 4.596664e-08 4.947161e+00 4.937051e+00 487 4.606664e-08 4.949050e+00 4.939376e+00 488 4.616664e-08 4.950870e+00 4.941611e+00 489 4.626664e-08 4.952627e+00 4.943774e+00 490 4.636664e-08 4.954321e+00 4.945852e+00 491 4.646664e-08 4.955955e+00 4.947862e+00 492 4.656664e-08 4.957531e+00 4.949794e+00 493 4.666664e-08 4.959051e+00 4.951664e+00 494 4.676664e-08 4.960516e+00 4.953460e+00 495 4.686664e-08 4.961930e+00 4.955198e+00 496 4.696664e-08 4.963293e+00 4.956868e+00 497 4.700000e-08 4.963736e+00 4.957326e+00 ngspice-26/tests/transmission/cpl3_4_line.out0000644000265600020320000016732512264261473020766 0ustar andreasadminCircuit: 6.3inch 4 lossy lines cpl model -- r load Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vs1: no DC value, transient time 0 value used No. of Data Rows : 1018 6.3inch 4 lossy lines cpl model -- r load Transient Analysis Sun Feb 07 19:00:53 2010 -------------------------------------------------------------------------------- Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 1 2.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 2 4.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 3 8.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 4 1.600000e-11 0.000000e+00 0.000000e+00 0.000000e+00 5 3.200000e-11 0.000000e+00 0.000000e+00 0.000000e+00 6 6.400000e-11 0.000000e+00 0.000000e+00 0.000000e+00 7 1.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 8 1.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 9 2.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 10 2.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 11 3.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 12 3.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 13 4.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 14 4.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 15 5.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 16 5.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 17 6.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 18 6.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 19 7.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 20 7.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 21 8.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 22 8.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 23 9.140000e-10 0.000000e+00 0.000000e+00 0.000000e+00 24 9.640000e-10 0.000000e+00 0.000000e+00 0.000000e+00 25 1.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 26 1.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 27 1.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 28 1.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 29 1.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 30 1.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 31 1.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 32 1.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 33 1.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 34 1.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 35 1.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 36 1.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 37 1.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 38 1.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 39 1.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 40 1.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 41 1.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 42 1.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 43 1.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 44 1.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 45 2.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 46 2.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 47 2.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 48 2.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 49 2.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 50 2.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 51 2.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 52 2.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 53 2.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 54 2.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 55 2.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 56 2.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 57 2.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 58 2.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 59 2.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 60 2.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 61 2.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 62 2.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 63 2.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 64 2.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 65 3.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 66 3.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 67 3.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 68 3.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 69 3.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 70 3.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 71 3.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 72 3.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 73 3.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 74 3.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 75 3.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 76 3.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 77 3.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 78 3.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 79 3.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 80 3.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 81 3.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 82 3.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 83 3.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 84 3.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 85 4.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 86 4.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 87 4.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 88 4.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 89 4.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 90 4.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 91 4.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 92 4.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 93 4.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 94 4.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 95 4.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 96 4.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 97 4.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 98 4.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 99 4.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 100 4.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 101 4.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 102 4.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 103 4.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 104 4.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 105 5.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 106 5.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 107 5.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 108 5.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 109 5.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 110 5.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 111 5.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 112 5.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 113 5.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 114 5.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 115 5.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 116 5.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 117 5.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 118 5.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 119 5.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 120 5.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 121 5.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 122 5.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 123 5.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 124 5.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 125 6.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 126 6.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 127 6.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 128 6.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 129 6.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 130 6.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 131 6.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 132 6.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 133 6.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 134 6.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 135 6.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 136 6.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 137 6.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 138 6.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 139 6.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 140 6.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 141 6.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 142 6.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 143 6.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 144 6.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 145 7.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 146 7.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 147 7.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 148 7.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 149 7.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 150 7.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 151 7.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 152 7.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 153 7.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 154 7.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 155 7.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 156 7.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 157 7.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 158 7.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 159 7.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 160 7.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 161 7.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 162 7.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 163 7.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 164 7.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 165 8.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 166 8.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 167 8.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 168 8.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 169 8.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 170 8.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 171 8.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 172 8.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 173 8.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 174 8.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 175 8.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 176 8.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 177 8.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 178 8.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 179 8.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 180 8.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 181 8.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 182 8.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 183 8.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 184 8.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 185 9.014000e-09 0.000000e+00 0.000000e+00 0.000000e+00 186 9.064000e-09 0.000000e+00 0.000000e+00 0.000000e+00 187 9.114000e-09 0.000000e+00 0.000000e+00 0.000000e+00 188 9.164000e-09 0.000000e+00 0.000000e+00 0.000000e+00 189 9.214000e-09 0.000000e+00 0.000000e+00 0.000000e+00 190 9.264000e-09 0.000000e+00 0.000000e+00 0.000000e+00 191 9.314000e-09 0.000000e+00 0.000000e+00 0.000000e+00 192 9.364000e-09 0.000000e+00 0.000000e+00 0.000000e+00 193 9.414000e-09 0.000000e+00 0.000000e+00 0.000000e+00 194 9.464000e-09 0.000000e+00 0.000000e+00 0.000000e+00 195 9.514000e-09 0.000000e+00 0.000000e+00 0.000000e+00 196 9.564000e-09 0.000000e+00 0.000000e+00 0.000000e+00 197 9.614000e-09 0.000000e+00 0.000000e+00 0.000000e+00 198 9.664000e-09 0.000000e+00 0.000000e+00 0.000000e+00 199 9.714000e-09 0.000000e+00 0.000000e+00 0.000000e+00 200 9.764000e-09 0.000000e+00 0.000000e+00 0.000000e+00 201 9.814000e-09 0.000000e+00 0.000000e+00 0.000000e+00 202 9.864000e-09 0.000000e+00 0.000000e+00 0.000000e+00 203 9.914000e-09 0.000000e+00 0.000000e+00 0.000000e+00 204 9.964000e-09 0.000000e+00 0.000000e+00 0.000000e+00 205 1.001400e-08 0.000000e+00 0.000000e+00 0.000000e+00 206 1.006400e-08 0.000000e+00 0.000000e+00 0.000000e+00 207 1.011400e-08 0.000000e+00 0.000000e+00 0.000000e+00 208 1.016400e-08 0.000000e+00 0.000000e+00 0.000000e+00 209 1.021400e-08 0.000000e+00 0.000000e+00 0.000000e+00 210 1.026400e-08 0.000000e+00 0.000000e+00 0.000000e+00 211 1.031400e-08 0.000000e+00 0.000000e+00 0.000000e+00 212 1.036400e-08 0.000000e+00 0.000000e+00 0.000000e+00 213 1.041400e-08 0.000000e+00 0.000000e+00 0.000000e+00 214 1.046400e-08 0.000000e+00 0.000000e+00 0.000000e+00 215 1.051400e-08 0.000000e+00 0.000000e+00 0.000000e+00 216 1.056400e-08 0.000000e+00 0.000000e+00 0.000000e+00 217 1.061400e-08 0.000000e+00 0.000000e+00 0.000000e+00 218 1.066400e-08 0.000000e+00 0.000000e+00 0.000000e+00 219 1.071400e-08 0.000000e+00 0.000000e+00 0.000000e+00 220 1.076400e-08 0.000000e+00 0.000000e+00 0.000000e+00 221 1.081400e-08 0.000000e+00 0.000000e+00 0.000000e+00 222 1.086400e-08 0.000000e+00 0.000000e+00 0.000000e+00 223 1.091400e-08 0.000000e+00 0.000000e+00 0.000000e+00 224 1.096400e-08 0.000000e+00 0.000000e+00 0.000000e+00 225 1.101400e-08 0.000000e+00 0.000000e+00 0.000000e+00 226 1.106400e-08 0.000000e+00 0.000000e+00 0.000000e+00 227 1.111400e-08 0.000000e+00 0.000000e+00 0.000000e+00 228 1.116400e-08 0.000000e+00 0.000000e+00 0.000000e+00 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 229 1.121400e-08 0.000000e+00 0.000000e+00 0.000000e+00 230 1.126400e-08 0.000000e+00 0.000000e+00 0.000000e+00 231 1.131400e-08 0.000000e+00 0.000000e+00 0.000000e+00 232 1.136400e-08 0.000000e+00 0.000000e+00 0.000000e+00 233 1.141400e-08 0.000000e+00 0.000000e+00 0.000000e+00 234 1.146400e-08 0.000000e+00 0.000000e+00 0.000000e+00 235 1.151400e-08 0.000000e+00 0.000000e+00 0.000000e+00 236 1.156400e-08 0.000000e+00 0.000000e+00 0.000000e+00 237 1.161400e-08 0.000000e+00 0.000000e+00 0.000000e+00 238 1.166400e-08 0.000000e+00 0.000000e+00 0.000000e+00 239 1.171400e-08 0.000000e+00 0.000000e+00 0.000000e+00 240 1.176400e-08 0.000000e+00 0.000000e+00 0.000000e+00 241 1.181400e-08 0.000000e+00 0.000000e+00 0.000000e+00 242 1.186400e-08 0.000000e+00 0.000000e+00 0.000000e+00 243 1.191400e-08 0.000000e+00 0.000000e+00 0.000000e+00 244 1.196400e-08 0.000000e+00 0.000000e+00 0.000000e+00 245 1.201400e-08 0.000000e+00 0.000000e+00 0.000000e+00 246 1.206400e-08 0.000000e+00 0.000000e+00 0.000000e+00 247 1.211400e-08 0.000000e+00 0.000000e+00 0.000000e+00 248 1.216400e-08 0.000000e+00 0.000000e+00 0.000000e+00 249 1.221400e-08 0.000000e+00 0.000000e+00 0.000000e+00 250 1.226400e-08 0.000000e+00 0.000000e+00 0.000000e+00 251 1.231400e-08 0.000000e+00 0.000000e+00 0.000000e+00 252 1.236400e-08 0.000000e+00 0.000000e+00 0.000000e+00 253 1.241400e-08 0.000000e+00 0.000000e+00 0.000000e+00 254 1.246400e-08 0.000000e+00 0.000000e+00 0.000000e+00 255 1.251400e-08 0.000000e+00 0.000000e+00 0.000000e+00 256 1.256400e-08 0.000000e+00 0.000000e+00 0.000000e+00 257 1.261400e-08 0.000000e+00 0.000000e+00 0.000000e+00 258 1.266400e-08 0.000000e+00 0.000000e+00 0.000000e+00 259 1.271400e-08 0.000000e+00 0.000000e+00 0.000000e+00 260 1.276400e-08 0.000000e+00 0.000000e+00 0.000000e+00 261 1.281400e-08 0.000000e+00 0.000000e+00 0.000000e+00 262 1.286400e-08 0.000000e+00 0.000000e+00 0.000000e+00 263 1.291400e-08 0.000000e+00 0.000000e+00 0.000000e+00 264 1.296400e-08 0.000000e+00 0.000000e+00 0.000000e+00 265 1.301400e-08 0.000000e+00 0.000000e+00 0.000000e+00 266 1.306400e-08 0.000000e+00 0.000000e+00 0.000000e+00 267 1.311400e-08 0.000000e+00 0.000000e+00 0.000000e+00 268 1.316400e-08 0.000000e+00 0.000000e+00 0.000000e+00 269 1.321400e-08 0.000000e+00 0.000000e+00 0.000000e+00 270 1.326400e-08 0.000000e+00 0.000000e+00 0.000000e+00 271 1.331400e-08 0.000000e+00 0.000000e+00 0.000000e+00 272 1.336400e-08 0.000000e+00 0.000000e+00 0.000000e+00 273 1.341400e-08 0.000000e+00 0.000000e+00 0.000000e+00 274 1.346400e-08 0.000000e+00 0.000000e+00 0.000000e+00 275 1.351400e-08 0.000000e+00 0.000000e+00 0.000000e+00 276 1.356400e-08 0.000000e+00 0.000000e+00 0.000000e+00 277 1.361400e-08 0.000000e+00 0.000000e+00 0.000000e+00 278 1.366400e-08 0.000000e+00 0.000000e+00 0.000000e+00 279 1.371400e-08 0.000000e+00 0.000000e+00 0.000000e+00 280 1.376400e-08 0.000000e+00 0.000000e+00 0.000000e+00 281 1.381400e-08 0.000000e+00 0.000000e+00 0.000000e+00 282 1.386400e-08 0.000000e+00 0.000000e+00 0.000000e+00 283 1.391400e-08 0.000000e+00 0.000000e+00 0.000000e+00 284 1.396400e-08 0.000000e+00 0.000000e+00 0.000000e+00 285 1.401400e-08 0.000000e+00 0.000000e+00 0.000000e+00 286 1.406400e-08 0.000000e+00 0.000000e+00 0.000000e+00 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 287 1.411400e-08 0.000000e+00 0.000000e+00 0.000000e+00 288 1.416400e-08 0.000000e+00 0.000000e+00 0.000000e+00 289 1.421400e-08 0.000000e+00 0.000000e+00 0.000000e+00 290 1.426400e-08 0.000000e+00 0.000000e+00 0.000000e+00 291 1.431400e-08 0.000000e+00 0.000000e+00 0.000000e+00 292 1.436400e-08 0.000000e+00 0.000000e+00 0.000000e+00 293 1.441400e-08 0.000000e+00 0.000000e+00 0.000000e+00 294 1.446400e-08 0.000000e+00 0.000000e+00 0.000000e+00 295 1.451400e-08 0.000000e+00 0.000000e+00 0.000000e+00 296 1.456400e-08 0.000000e+00 0.000000e+00 0.000000e+00 297 1.461400e-08 0.000000e+00 0.000000e+00 0.000000e+00 298 1.466400e-08 0.000000e+00 0.000000e+00 0.000000e+00 299 1.471400e-08 0.000000e+00 0.000000e+00 0.000000e+00 300 1.476400e-08 0.000000e+00 0.000000e+00 0.000000e+00 301 1.481400e-08 0.000000e+00 0.000000e+00 0.000000e+00 302 1.486400e-08 0.000000e+00 0.000000e+00 0.000000e+00 303 1.491400e-08 0.000000e+00 0.000000e+00 0.000000e+00 304 1.496400e-08 0.000000e+00 0.000000e+00 0.000000e+00 305 1.501400e-08 0.000000e+00 0.000000e+00 0.000000e+00 306 1.506400e-08 0.000000e+00 0.000000e+00 0.000000e+00 307 1.511400e-08 0.000000e+00 0.000000e+00 0.000000e+00 308 1.516400e-08 0.000000e+00 0.000000e+00 0.000000e+00 309 1.521400e-08 0.000000e+00 0.000000e+00 0.000000e+00 310 1.526400e-08 0.000000e+00 0.000000e+00 0.000000e+00 311 1.531400e-08 0.000000e+00 0.000000e+00 0.000000e+00 312 1.536400e-08 0.000000e+00 0.000000e+00 0.000000e+00 313 1.541400e-08 0.000000e+00 0.000000e+00 0.000000e+00 314 1.546400e-08 0.000000e+00 0.000000e+00 0.000000e+00 315 1.551400e-08 0.000000e+00 0.000000e+00 0.000000e+00 316 1.556400e-08 0.000000e+00 0.000000e+00 0.000000e+00 317 1.561400e-08 0.000000e+00 0.000000e+00 0.000000e+00 318 1.566400e-08 0.000000e+00 0.000000e+00 0.000000e+00 319 1.571400e-08 0.000000e+00 0.000000e+00 0.000000e+00 320 1.576400e-08 0.000000e+00 0.000000e+00 0.000000e+00 321 1.581400e-08 0.000000e+00 0.000000e+00 0.000000e+00 322 1.586400e-08 0.000000e+00 0.000000e+00 0.000000e+00 323 1.590000e-08 0.000000e+00 0.000000e+00 0.000000e+00 324 1.590500e-08 1.610643e-02 -1.79516e-13 -1.40305e-15 325 1.591500e-08 5.591464e-02 -7.30431e-13 -5.68374e-15 326 1.593500e-08 1.204085e-01 -1.45120e-12 -1.30006e-14 327 1.597500e-08 2.395031e-01 -2.76036e-03 -1.70599e-03 328 1.602500e-08 4.018330e-01 -1.69811e-02 -1.04958e-02 329 1.607500e-08 5.789948e-01 -3.25443e-02 -2.02304e-02 330 1.610000e-08 6.639681e-01 -4.17321e-02 -2.59366e-02 331 1.610500e-08 6.547115e-01 -4.36839e-02 -2.70106e-02 332 1.611500e-08 6.566876e-01 -4.86910e-02 -3.00583e-02 333 1.613500e-08 6.604582e-01 -5.86484e-02 -3.62343e-02 334 1.617500e-08 6.698495e-01 -7.74639e-02 -4.79030e-02 335 1.622500e-08 6.844447e-01 -1.41206e-01 1.789425e-02 336 1.627500e-08 6.957245e-01 -2.22634e-01 1.013900e-01 337 1.632500e-08 7.079473e-01 -2.62334e-01 1.228789e-01 338 1.637500e-08 7.200002e-01 -2.24183e-01 8.811304e-02 339 1.642500e-08 7.314385e-01 -5.95076e-02 2.481736e-02 340 1.647500e-08 7.613273e-01 1.368278e-01 -7.52941e-02 341 1.652500e-08 8.453092e-01 2.773426e-01 -9.65504e-02 342 1.657500e-08 9.433235e-01 3.350071e-01 -6.09638e-02 343 1.662500e-08 1.043384e+00 3.172132e-01 -7.19163e-02 344 1.667500e-08 1.127175e+00 2.997849e-01 -8.27464e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 345 1.672500e-08 1.207156e+00 2.803354e-01 -8.95400e-02 346 1.677500e-08 1.338024e+00 2.466900e-01 -7.25811e-02 347 1.682500e-08 1.478888e+00 1.891277e-01 -1.61309e-02 348 1.687500e-08 1.670146e+00 1.259162e-01 5.029616e-02 349 1.692500e-08 1.806794e+00 6.412297e-02 1.151590e-01 350 1.697500e-08 1.876835e+00 1.672713e-02 1.574219e-01 351 1.702500e-08 1.936271e+00 -5.22843e-03 1.592224e-01 352 1.707500e-08 1.986523e+00 -2.05778e-02 1.509182e-01 353 1.712500e-08 2.057081e+00 -1.02635e-02 1.017175e-01 354 1.717500e-08 2.133701e+00 3.299456e-02 -8.72584e-05 355 1.722500e-08 2.203933e+00 7.792676e-02 -1.04010e-01 356 1.727500e-08 2.249980e+00 1.415214e-01 -2.11000e-01 357 1.732500e-08 2.266151e+00 2.046424e-01 -2.36620e-01 358 1.737500e-08 2.275101e+00 2.406524e-01 -1.74763e-01 359 1.742500e-08 2.283318e+00 2.622016e-01 -8.54526e-02 360 1.747500e-08 2.291425e+00 2.681600e-01 -1.64519e-03 361 1.752500e-08 2.331739e+00 2.442623e-01 5.088590e-02 362 1.757500e-08 2.419269e+00 2.179206e-01 7.105093e-02 363 1.762500e-08 2.522950e+00 2.027691e-01 6.890543e-02 364 1.767500e-08 2.656051e+00 1.908591e-01 6.198525e-02 365 1.772500e-08 2.769988e+00 1.793528e-01 5.492904e-02 366 1.777500e-08 2.854552e+00 1.680044e-01 4.813538e-02 367 1.782500e-08 2.931826e+00 1.561381e-01 4.265928e-02 368 1.787500e-08 2.991559e+00 1.414265e-01 4.227724e-02 369 1.792500e-08 3.030539e+00 1.345084e-01 2.978887e-02 370 1.797500e-08 3.050519e+00 1.394413e-01 -1.40353e-03 371 1.802500e-08 3.059880e+00 1.421625e-01 -2.85420e-02 372 1.807500e-08 3.066936e+00 1.515317e-01 -6.59350e-02 373 1.812500e-08 3.075439e+00 1.506938e-01 -8.63641e-02 374 1.817500e-08 3.089775e+00 1.425966e-01 -8.46236e-02 375 1.822500e-08 3.115477e+00 1.525236e-01 -7.60632e-02 376 1.827500e-08 3.153809e+00 1.784995e-01 -5.97645e-02 377 1.832500e-08 3.216954e+00 2.101894e-01 -3.99915e-02 378 1.837500e-08 3.304473e+00 2.372286e-01 -2.22160e-02 379 1.842500e-08 3.386646e+00 2.465541e-01 -1.19303e-02 380 1.847500e-08 3.461973e+00 2.381954e-01 -3.82540e-03 381 1.852500e-08 3.507382e+00 2.184357e-01 1.155871e-02 382 1.857500e-08 3.521677e+00 1.919784e-01 3.616674e-02 383 1.862500e-08 3.529865e+00 1.637964e-01 6.382513e-02 384 1.867500e-08 3.544693e+00 1.389692e-01 8.644409e-02 385 1.872500e-08 3.569950e+00 1.296534e-01 8.431730e-02 386 1.877500e-08 3.605379e+00 1.409642e-01 4.914098e-02 387 1.882500e-08 3.648617e+00 1.594929e-01 2.602292e-03 388 1.887500e-08 3.692104e+00 1.820449e-01 -5.01350e-02 389 1.892500e-08 3.729167e+00 1.944113e-01 -8.60871e-02 390 1.897500e-08 3.756947e+00 1.916246e-01 -9.72020e-02 391 1.902500e-08 3.774521e+00 1.823145e-01 -9.74434e-02 392 1.907500e-08 3.783642e+00 1.702937e-01 -8.92207e-02 393 1.912500e-08 3.800222e+00 1.606136e-01 -6.90235e-02 394 1.917500e-08 3.834705e+00 1.570063e-01 -3.82331e-02 395 1.922500e-08 3.875372e+00 1.594844e-01 -4.54225e-03 396 1.927500e-08 3.922039e+00 1.655238e-01 2.337781e-02 397 1.932500e-08 3.959571e+00 1.696213e-01 3.925232e-02 398 1.937500e-08 3.983550e+00 1.690172e-01 4.348810e-02 399 1.942500e-08 4.006645e+00 1.649684e-01 4.180000e-02 400 1.947500e-08 4.031660e+00 1.594509e-01 3.875895e-02 401 1.952500e-08 4.055479e+00 1.586907e-01 2.749391e-02 402 1.957500e-08 4.076528e+00 1.659395e-01 3.437348e-03 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 403 1.962500e-08 4.095091e+00 1.742923e-01 -2.21648e-02 404 1.967500e-08 4.111892e+00 1.818125e-01 -4.61761e-02 405 1.972500e-08 4.127230e+00 1.806506e-01 -5.58978e-02 406 1.977500e-08 4.139712e+00 1.690511e-01 -4.84892e-02 407 1.982500e-08 4.148821e+00 1.551394e-01 -3.71054e-02 408 1.987500e-08 4.156930e+00 1.437193e-01 -2.95295e-02 409 1.992500e-08 4.174218e+00 1.356739e-01 -2.71984e-02 410 1.997500e-08 4.207681e+00 1.305868e-01 -2.80269e-02 411 2.002500e-08 4.249522e+00 1.293329e-01 -2.82645e-02 412 2.007500e-08 4.295153e+00 1.329445e-01 -2.53339e-02 413 2.012500e-08 4.330777e+00 1.401497e-01 -1.87873e-02 414 2.017500e-08 4.349169e+00 1.474671e-01 -9.23244e-03 415 2.022500e-08 4.357401e+00 1.503227e-01 2.199118e-03 416 2.027500e-08 4.361569e+00 1.462369e-01 1.453918e-02 417 2.032500e-08 4.364663e+00 1.399640e-01 2.176381e-02 418 2.037500e-08 4.367990e+00 1.377115e-01 1.822279e-02 419 2.042500e-08 4.372645e+00 1.392489e-01 7.293225e-03 420 2.047500e-08 4.380640e+00 1.448400e-01 -1.03235e-02 421 2.052500e-08 4.393862e+00 1.493332e-01 -2.60387e-02 422 2.057500e-08 4.412250e+00 1.490115e-01 -3.38041e-02 423 2.062500e-08 4.433234e+00 1.460460e-01 -3.71305e-02 424 2.067500e-08 4.452680e+00 1.421069e-01 -3.87232e-02 425 2.072500e-08 4.471401e+00 1.373669e-01 -3.88635e-02 426 2.077500e-08 4.492299e+00 1.313926e-01 -3.68508e-02 427 2.082500e-08 4.512997e+00 1.238201e-01 -3.20962e-02 428 2.087500e-08 4.534036e+00 1.150763e-01 -2.47576e-02 429 2.092500e-08 4.550535e+00 1.070367e-01 -1.56331e-02 430 2.097500e-08 4.559455e+00 1.021415e-01 -5.97625e-03 431 2.102500e-08 4.565257e+00 1.015121e-01 2.801207e-03 432 2.107500e-08 4.571784e+00 1.042229e-01 9.630616e-03 433 2.112500e-08 4.580393e+00 1.097385e-01 1.083644e-02 434 2.117500e-08 4.590765e+00 1.174532e-01 3.597609e-03 435 2.122500e-08 4.601531e+00 1.247640e-01 -8.50411e-03 436 2.127500e-08 4.611029e+00 1.312330e-01 -2.28997e-02 437 2.132500e-08 4.618238e+00 1.343370e-01 -3.34256e-02 438 2.137500e-08 4.623497e+00 1.322188e-01 -3.59087e-02 439 2.142500e-08 4.628129e+00 1.266283e-01 -3.27650e-02 440 2.147500e-08 4.633328e+00 1.195761e-01 -2.71512e-02 441 2.152500e-08 4.641955e+00 1.124248e-01 -2.12590e-02 442 2.157500e-08 4.656161e+00 1.061224e-01 -1.66252e-02 443 2.162500e-08 4.673549e+00 1.011464e-01 -1.40283e-02 444 2.167500e-08 4.693006e+00 9.743557e-02 -1.33744e-02 445 2.172500e-08 4.710784e+00 9.454783e-02 -1.39503e-02 446 2.177500e-08 4.723784e+00 9.206153e-02 -1.48736e-02 447 2.182500e-08 4.733090e+00 8.999719e-02 -1.52248e-02 448 2.187500e-08 4.739905e+00 8.870697e-02 -1.40832e-02 449 2.192500e-08 4.744631e+00 8.942997e-02 -1.26859e-02 450 2.197500e-08 4.747693e+00 9.288358e-02 -1.30016e-02 451 2.202500e-08 4.749780e+00 9.729418e-02 -1.43846e-02 452 2.207500e-08 4.751601e+00 1.013812e-01 -1.71952e-02 453 2.212500e-08 4.753703e+00 1.033370e-01 -1.96512e-02 454 2.217500e-08 4.756527e+00 1.024158e-01 -2.00814e-02 455 2.222500e-08 4.760465e+00 1.001241e-01 -1.97777e-02 456 2.227500e-08 4.765823e+00 9.775686e-02 -1.99207e-02 457 2.232500e-08 4.774120e+00 9.561522e-02 -2.05464e-02 458 2.237500e-08 4.786538e+00 9.352471e-02 -2.12191e-02 459 2.242500e-08 4.801081e+00 9.123730e-02 -2.15011e-02 460 2.247500e-08 4.815836e+00 8.853318e-02 -2.10317e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 461 2.252500e-08 4.827659e+00 8.524764e-02 -1.95444e-02 462 2.257500e-08 4.834542e+00 8.136536e-02 -1.70152e-02 463 2.262500e-08 4.837975e+00 7.709385e-02 -1.37801e-02 464 2.267500e-08 4.840096e+00 7.286337e-02 -1.04600e-02 465 2.272500e-08 4.842185e+00 6.998062e-02 -8.77107e-03 466 2.277500e-08 4.844855e+00 6.987783e-02 -1.02716e-02 467 2.282500e-08 4.848372e+00 7.239594e-02 -1.40862e-02 468 2.287500e-08 4.852704e+00 7.684287e-02 -1.92019e-02 469 2.292500e-08 4.857487e+00 8.130427e-02 -2.35038e-02 470 2.297500e-08 4.862139e+00 8.388625e-02 -2.53212e-02 471 2.302500e-08 4.866106e+00 8.433028e-02 -2.52244e-02 472 2.307500e-08 4.869097e+00 8.312876e-02 -2.41356e-02 473 2.312500e-08 4.872086e+00 8.079395e-02 -2.23876e-02 474 2.317500e-08 4.876576e+00 7.776913e-02 -2.01043e-02 475 2.322500e-08 4.882610e+00 7.447639e-02 -1.75795e-02 476 2.327500e-08 4.890076e+00 7.130973e-02 -1.52763e-02 477 2.332500e-08 4.897690e+00 6.855930e-02 -1.36078e-02 478 2.337500e-08 4.904065e+00 6.634178e-02 -1.27506e-02 479 2.342500e-08 4.909370e+00 6.459148e-02 -1.25974e-02 480 2.347500e-08 4.914130e+00 6.312778e-02 -1.28564e-02 481 2.352500e-08 4.918433e+00 6.216668e-02 -1.38777e-02 482 2.357500e-08 4.922094e+00 6.209351e-02 -1.62567e-02 483 2.362500e-08 4.924948e+00 6.264437e-02 -1.94008e-02 484 2.367500e-08 4.927000e+00 6.360445e-02 -2.25914e-02 485 2.372500e-08 4.928436e+00 6.440018e-02 -2.45000e-02 486 2.377500e-08 4.929544e+00 6.448947e-02 -2.41411e-02 487 2.382500e-08 4.930615e+00 6.405930e-02 -2.21918e-02 488 2.387500e-08 4.931893e+00 6.344881e-02 -1.99310e-02 489 2.392500e-08 4.934094e+00 6.276645e-02 -1.82208e-02 490 2.397500e-08 4.938044e+00 6.199769e-02 -1.73273e-02 491 2.402500e-08 4.943493e+00 6.113295e-02 -1.71023e-02 492 2.407500e-08 4.949884e+00 6.017227e-02 -1.72249e-02 493 2.412500e-08 4.956004e+00 5.909190e-02 -1.73749e-02 494 2.417500e-08 4.960691e+00 5.784261e-02 -1.73102e-02 495 2.422500e-08 4.963955e+00 5.637136e-02 -1.68762e-02 496 2.427500e-08 4.966322e+00 5.465670e-02 -1.60160e-02 497 2.432500e-08 4.968177e+00 5.299626e-02 -1.52061e-02 498 2.437500e-08 4.969718e+00 5.187021e-02 -1.52231e-02 499 2.442500e-08 4.971103e+00 5.135893e-02 -1.61982e-02 500 2.447500e-08 4.972513e+00 5.141585e-02 -1.80462e-02 501 2.452500e-08 4.974112e+00 5.166390e-02 -2.00897e-02 502 2.457500e-08 4.975987e+00 5.167953e-02 -2.14695e-02 503 2.462500e-08 4.978092e+00 5.151326e-02 -2.20360e-02 504 2.467500e-08 4.980263e+00 5.138674e-02 -2.20150e-02 505 2.472500e-08 4.982607e+00 5.134036e-02 -2.15798e-02 506 2.477500e-08 4.985429e+00 5.121500e-02 -2.08213e-02 507 2.482500e-08 4.988591e+00 5.079993e-02 -1.98167e-02 508 2.487500e-08 4.991895e+00 4.998260e-02 -1.86533e-02 509 2.492500e-08 4.994861e+00 4.881058e-02 -1.74362e-02 510 2.497500e-08 4.997013e+00 4.745197e-02 -1.62973e-02 511 2.502500e-08 4.998538e+00 4.610110e-02 -1.53757e-02 512 2.507500e-08 4.999945e+00 4.489699e-02 -1.47690e-02 513 2.512500e-08 5.001586e+00 4.404146e-02 -1.47372e-02 514 2.517500e-08 5.003538e+00 4.374118e-02 -1.55887e-02 515 2.522500e-08 5.005666e+00 4.390111e-02 -1.71618e-02 516 2.527500e-08 5.007731e+00 4.431571e-02 -1.91221e-02 517 2.532500e-08 5.009513e+00 4.461259e-02 -2.08670e-02 518 2.537500e-08 5.010898e+00 4.442190e-02 -2.17941e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 519 2.542500e-08 5.011903e+00 4.372556e-02 -2.18461e-02 520 2.547500e-08 5.012638e+00 4.275089e-02 -2.13109e-02 521 2.552500e-08 5.013443e+00 4.175341e-02 -2.04774e-02 522 2.557500e-08 5.014769e+00 4.092413e-02 -1.95526e-02 523 2.562500e-08 5.016713e+00 4.035458e-02 -1.86922e-02 524 2.567500e-08 5.019179e+00 4.002245e-02 -1.80102e-02 525 2.572500e-08 5.021784e+00 3.981764e-02 -1.75609e-02 526 2.577500e-08 5.024046e+00 3.960723e-02 -1.73263e-02 527 2.582500e-08 5.025822e+00 3.929404e-02 -1.72265e-02 528 2.587500e-08 5.027213e+00 3.883481e-02 -1.71517e-02 529 2.592500e-08 5.028327e+00 3.831631e-02 -1.71483e-02 530 2.597500e-08 5.029237e+00 3.790605e-02 -1.73991e-02 531 2.602500e-08 5.030017e+00 3.763714e-02 -1.79017e-02 532 2.607500e-08 5.030751e+00 3.748038e-02 -1.85816e-02 533 2.612500e-08 5.031502e+00 3.730648e-02 -1.92195e-02 534 2.617500e-08 5.032307e+00 3.696128e-02 -1.95630e-02 535 2.622500e-08 5.033179e+00 3.645686e-02 -1.96313e-02 536 2.627500e-08 5.034124e+00 3.590692e-02 -1.96071e-02 537 2.632500e-08 5.035247e+00 3.539262e-02 -1.96107e-02 538 2.637500e-08 5.036716e+00 3.493648e-02 -1.96429e-02 539 2.642500e-08 5.038488e+00 3.453554e-02 -1.96349e-02 540 2.647500e-08 5.040400e+00 3.418168e-02 -1.95073e-02 541 2.652500e-08 5.042159e+00 3.385716e-02 -1.92097e-02 542 2.657500e-08 5.043465e+00 3.352836e-02 -1.87427e-02 543 2.662500e-08 5.044297e+00 3.315541e-02 -1.81602e-02 544 2.667500e-08 5.044838e+00 3.271534e-02 -1.75507e-02 545 2.672500e-08 5.045286e+00 3.227377e-02 -1.70965e-02 546 2.677500e-08 5.045766e+00 3.196780e-02 -1.70260e-02 547 2.682500e-08 5.046344e+00 3.185424e-02 -1.73899e-02 548 2.687500e-08 5.047044e+00 3.191239e-02 -1.81017e-02 549 2.692500e-08 5.047857e+00 3.201927e-02 -1.89205e-02 550 2.697500e-08 5.048738e+00 3.200723e-02 -1.95511e-02 551 2.702500e-08 5.049616e+00 3.180989e-02 -1.98750e-02 552 2.707500e-08 5.050415e+00 3.145836e-02 -1.99384e-02 553 2.712500e-08 5.051152e+00 3.100296e-02 -1.98216e-02 554 2.717500e-08 5.051949e+00 3.048100e-02 -1.95842e-02 555 2.722500e-08 5.052862e+00 2.992532e-02 -1.92749e-02 556 2.727500e-08 5.053895e+00 2.937634e-02 -1.89434e-02 557 2.732500e-08 5.054951e+00 2.888174e-02 -1.86352e-02 558 2.737500e-08 5.055879e+00 2.848404e-02 -1.83803e-02 559 2.742500e-08 5.056643e+00 2.820286e-02 -1.81870e-02 560 2.747500e-08 5.057309e+00 2.802330e-02 -1.80458e-02 561 2.752500e-08 5.057935e+00 2.793241e-02 -1.79911e-02 562 2.757500e-08 5.058529e+00 2.793466e-02 -1.81034e-02 563 2.762500e-08 5.059067e+00 2.799678e-02 -1.83863e-02 564 2.767500e-08 5.059525e+00 2.806810e-02 -1.87795e-02 565 2.772500e-08 5.059901e+00 2.807382e-02 -1.91498e-02 566 2.777500e-08 5.060217e+00 2.793773e-02 -1.93453e-02 567 2.782500e-08 5.060514e+00 2.765697e-02 -1.93338e-02 568 2.787500e-08 5.060837e+00 2.729472e-02 -1.91982e-02 569 2.792500e-08 5.061257e+00 2.692057e-02 -1.90411e-02 570 2.797500e-08 5.061868e+00 2.657629e-02 -1.89257e-02 571 2.802500e-08 5.062684e+00 2.627409e-02 -1.88705e-02 572 2.807500e-08 5.063648e+00 2.600649e-02 -1.88628e-02 573 2.812500e-08 5.064627e+00 2.575688e-02 -1.88739e-02 574 2.817500e-08 5.065462e+00 2.550903e-02 -1.88708e-02 575 2.822500e-08 5.066078e+00 2.525420e-02 -1.88239e-02 576 2.827500e-08 5.066504e+00 2.499358e-02 -1.87134e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 577 2.832500e-08 5.066805e+00 2.475539e-02 -1.85674e-02 578 2.837500e-08 5.067040e+00 2.458974e-02 -1.84665e-02 579 2.842500e-08 5.067252e+00 2.451679e-02 -1.84664e-02 580 2.847500e-08 5.067474e+00 2.452304e-02 -1.85848e-02 581 2.852500e-08 5.067727e+00 2.455841e-02 -1.87790e-02 582 2.857500e-08 5.068021e+00 2.455551e-02 -1.89620e-02 583 2.862500e-08 5.068355e+00 2.448280e-02 -1.90841e-02 584 2.867500e-08 5.068714e+00 2.435069e-02 -1.91498e-02 585 2.872500e-08 5.069107e+00 2.418010e-02 -1.91761e-02 586 2.877500e-08 5.069566e+00 2.398272e-02 -1.91685e-02 587 2.882500e-08 5.070098e+00 2.376155e-02 -1.91231e-02 588 2.887500e-08 5.070677e+00 2.351817e-02 -1.90383e-02 589 2.892500e-08 5.071244e+00 2.325767e-02 -1.89205e-02 590 2.897500e-08 5.071721e+00 2.298996e-02 -1.87852e-02 591 2.902500e-08 5.072084e+00 2.272821e-02 -1.86530e-02 592 2.907500e-08 5.072368e+00 2.248585e-02 -1.85424e-02 593 2.912500e-08 5.072624e+00 2.228568e-02 -1.84834e-02 594 2.917500e-08 5.072883e+00 2.215965e-02 -1.85162e-02 595 2.922500e-08 5.073156e+00 2.211931e-02 -1.86480e-02 596 2.927500e-08 5.073433e+00 2.214995e-02 -1.88507e-02 597 2.932500e-08 5.073698e+00 2.220807e-02 -1.90621e-02 598 2.937500e-08 5.073938e+00 2.223451e-02 -1.92059e-02 599 2.942500e-08 5.074142e+00 2.219285e-02 -1.92464e-02 600 2.947500e-08 5.074313e+00 2.208277e-02 -1.92002e-02 601 2.952500e-08 5.074476e+00 2.192435e-02 -1.91058e-02 602 2.957500e-08 5.074680e+00 2.174138e-02 -1.89981e-02 603 2.962500e-08 5.074960e+00 2.155397e-02 -1.89008e-02 604 2.967500e-08 5.075323e+00 2.137615e-02 -1.88277e-02 605 2.972500e-08 5.075736e+00 2.121490e-02 -1.87837e-02 606 2.977500e-08 5.076143e+00 2.107043e-02 -1.87655e-02 607 2.982500e-08 5.076501e+00 2.093779e-02 -1.87634e-02 608 2.987500e-08 5.076800e+00 2.080944e-02 -1.87645e-02 609 2.992500e-08 5.077045e+00 2.068520e-02 -1.87678e-02 610 2.997500e-08 5.077246e+00 2.057669e-02 -1.87910e-02 611 3.002500e-08 5.077408e+00 2.049252e-02 -1.88446e-02 612 3.007500e-08 5.077541e+00 2.043391e-02 -1.89248e-02 613 3.012500e-08 5.077657e+00 2.039105e-02 -1.90087e-02 614 3.017500e-08 5.077768e+00 2.034562e-02 -1.90625e-02 615 3.022500e-08 5.077887e+00 2.028753e-02 -1.90717e-02 616 3.027500e-08 5.078020e+00 2.021987e-02 -1.90503e-02 617 3.032500e-08 5.078178e+00 2.014889e-02 -1.90214e-02 618 3.037500e-08 5.078379e+00 2.007613e-02 -1.89992e-02 619 3.042500e-08 5.078629e+00 1.999857e-02 -1.89853e-02 620 3.047500e-08 5.078915e+00 1.991212e-02 -1.89735e-02 621 3.052500e-08 5.079206e+00 1.981410e-02 -1.89554e-02 622 3.057500e-08 5.079463e+00 1.970409e-02 -1.89252e-02 623 3.062500e-08 5.079664e+00 1.958400e-02 -1.88814e-02 624 3.067500e-08 5.079817e+00 1.945773e-02 -1.88274e-02 625 3.072500e-08 5.079942e+00 1.933487e-02 -1.87771e-02 626 3.077500e-08 5.080058e+00 1.923131e-02 -1.87555e-02 627 3.082500e-08 5.080176e+00 1.915817e-02 -1.87803e-02 628 3.087500e-08 5.080300e+00 1.911653e-02 -1.88526e-02 629 3.092500e-08 5.080431e+00 1.909541e-02 -1.89531e-02 630 3.097500e-08 5.080564e+00 1.907549e-02 -1.90478e-02 631 3.102500e-08 5.080695e+00 1.904267e-02 -1.91098e-02 632 3.107500e-08 5.080817e+00 1.899455e-02 -1.91321e-02 633 3.112500e-08 5.080931e+00 1.893513e-02 -1.91209e-02 634 3.117500e-08 5.081049e+00 1.886812e-02 -1.90857e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 635 3.122500e-08 5.081183e+00 1.879519e-02 -1.90360e-02 636 3.127500e-08 5.081337e+00 1.871732e-02 -1.89807e-02 637 3.132500e-08 5.081502e+00 1.863644e-02 -1.89282e-02 638 3.137500e-08 5.081661e+00 1.855548e-02 -1.88850e-02 639 3.142500e-08 5.081803e+00 1.847749e-02 -1.88549e-02 640 3.147500e-08 5.081928e+00 1.840427e-02 -1.88380e-02 641 3.152500e-08 5.082046e+00 1.833835e-02 -1.88355e-02 642 3.157500e-08 5.082160e+00 1.828455e-02 -1.88530e-02 643 3.162500e-08 5.082269e+00 1.824500e-02 -1.88928e-02 644 3.167500e-08 5.082372e+00 1.821698e-02 -1.89497e-02 645 3.172500e-08 5.082462e+00 1.819225e-02 -1.90099e-02 646 3.177500e-08 5.082540e+00 1.815937e-02 -1.90548e-02 647 3.182500e-08 5.082608e+00 1.811170e-02 -1.90729e-02 648 3.187500e-08 5.082665e+00 1.805312e-02 -1.90665e-02 649 3.190000e-08 5.082697e+00 1.801929e-02 -1.90562e-02 650 3.190500e-08 5.066600e+00 1.801076e-02 -1.90519e-02 651 3.191500e-08 5.046241e+00 1.800251e-02 -1.90524e-02 652 3.193500e-08 4.976481e+00 1.797527e-02 -1.90438e-02 653 3.197500e-08 4.847652e+00 2.079300e-02 -1.72538e-02 654 3.202500e-08 4.694909e+00 3.445427e-02 -8.78484e-03 655 3.207500e-08 4.527276e+00 4.953481e-02 6.032849e-04 656 3.210000e-08 4.442119e+00 5.957219e-02 6.853044e-03 657 3.210500e-08 4.432100e+00 6.253816e-02 8.819579e-03 658 3.211500e-08 4.430431e+00 6.741855e-02 1.176556e-02 659 3.213500e-08 4.426830e+00 7.709699e-02 1.778043e-02 660 3.217500e-08 4.416778e+00 9.649542e-02 2.983306e-02 661 3.222500e-08 4.402834e+00 1.564015e-01 -3.06699e-02 662 3.227500e-08 4.391563e+00 2.405114e-01 -1.18398e-01 663 3.232500e-08 4.379444e+00 2.840613e-01 -1.46472e-01 664 3.237500e-08 4.367490e+00 2.441166e-01 -1.00006e-01 665 3.242500e-08 4.356141e+00 8.091240e-02 -4.26693e-02 666 3.247500e-08 4.329440e+00 -9.90304e-02 4.813828e-02 667 3.252500e-08 4.248910e+00 -2.42149e-01 7.705307e-02 668 3.257500e-08 4.148637e+00 -3.04718e-01 3.842701e-02 669 3.262500e-08 4.050585e+00 -2.87392e-01 4.898967e-02 670 3.267500e-08 3.967157e+00 -2.70469e-01 5.950776e-02 671 3.272500e-08 3.891372e+00 -2.51869e-01 6.655390e-02 672 3.277500e-08 3.759474e+00 -2.20204e-01 5.170690e-02 673 3.282500e-08 3.618370e+00 -1.64100e-01 -3.44662e-03 674 3.287500e-08 3.439636e+00 -1.00439e-01 -7.16425e-02 675 3.292500e-08 3.301769e+00 -3.98166e-02 -1.35636e-01 676 3.297500e-08 3.233540e+00 7.538062e-03 -1.78825e-01 677 3.302500e-08 3.173880e+00 3.023262e-02 -1.82789e-01 678 3.307500e-08 3.125436e+00 4.464055e-02 -1.73924e-01 679 3.312500e-08 3.055933e+00 3.719579e-02 -1.30301e-01 680 3.317500e-08 2.978879e+00 -7.49823e-03 -2.70862e-02 681 3.322500e-08 2.909481e+00 -5.40876e-02 7.860581e-02 682 3.327500e-08 2.862928e+00 -1.10691e-01 1.773949e-01 683 3.332500e-08 2.845890e+00 -1.76335e-01 2.067763e-01 684 3.337500e-08 2.837743e+00 -2.11122e-01 1.483094e-01 685 3.342500e-08 2.829852e+00 -2.30857e-01 6.056722e-02 686 3.347500e-08 2.822021e+00 -2.37959e-01 -2.44472e-02 687 3.352500e-08 2.786258e+00 -2.15375e-01 -7.75295e-02 688 3.357500e-08 2.698340e+00 -1.89025e-01 -9.87707e-02 689 3.362500e-08 2.594253e+00 -1.73866e-01 -9.74214e-02 690 3.367500e-08 2.469730e+00 -1.62500e-01 -9.03917e-02 691 3.372500e-08 2.355108e+00 -1.51372e-01 -8.34687e-02 692 3.377500e-08 2.270376e+00 -1.40381e-01 -7.68317e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 693 3.382500e-08 2.194399e+00 -1.28903e-01 -7.14482e-02 694 3.387500e-08 2.135469e+00 -1.14801e-01 -7.07790e-02 695 3.392500e-08 2.096255e+00 -1.06754e-01 -6.07970e-02 696 3.397500e-08 2.076300e+00 -1.12811e-01 -2.84570e-02 697 3.402500e-08 2.067022e+00 -1.16674e-01 -1.26443e-04 698 3.407500e-08 2.060243e+00 -1.22871e-01 3.149146e-02 699 3.412500e-08 2.052091e+00 -1.22839e-01 5.258694e-02 700 3.417500e-08 2.038449e+00 -1.14318e-01 5.104562e-02 701 3.422500e-08 2.013723e+00 -1.23978e-01 4.246766e-02 702 3.427500e-08 1.976094e+00 -1.49175e-01 2.687568e-02 703 3.432500e-08 1.915684e+00 -1.79665e-01 7.875217e-03 704 3.437500e-08 1.827903e+00 -2.06822e-01 -9.86293e-03 705 3.442500e-08 1.744624e+00 -2.17006e-01 -2.03409e-02 706 3.447500e-08 1.673350e+00 -2.09434e-01 -2.82751e-02 707 3.452500e-08 1.627512e+00 -1.90364e-01 -4.31959e-02 708 3.457500e-08 1.613095e+00 -1.64372e-01 -6.75960e-02 709 3.462500e-08 1.605328e+00 -1.36403e-01 -9.54356e-02 710 3.467500e-08 1.591020e+00 -1.11719e-01 -1.18335e-01 711 3.472500e-08 1.566690e+00 -1.01297e-01 -1.18503e-01 712 3.477500e-08 1.532585e+00 -1.12741e-01 -8.36037e-02 713 3.482500e-08 1.490214e+00 -1.31981e-01 -3.63947e-02 714 3.487500e-08 1.446969e+00 -1.52830e-01 1.311710e-02 715 3.492500e-08 1.409842e+00 -1.65557e-01 4.918970e-02 716 3.497500e-08 1.382005e+00 -1.63259e-01 6.064302e-02 717 3.502500e-08 1.364368e+00 -1.54351e-01 6.109123e-02 718 3.507500e-08 1.355209e+00 -1.42529e-01 5.332024e-02 719 3.512500e-08 1.340292e+00 -1.32959e-01 3.356869e-02 720 3.517500e-08 1.306007e+00 -1.29083e-01 3.144254e-03 721 3.522500e-08 1.264870e+00 -1.30907e-01 -3.02186e-02 722 3.527500e-08 1.220950e+00 -1.36626e-01 -5.81547e-02 723 3.532500e-08 1.183816e+00 -1.40894e-01 -7.43550e-02 724 3.537500e-08 1.160045e+00 -1.40579e-01 -7.89150e-02 725 3.542500e-08 1.137297e+00 -1.36787e-01 -7.73746e-02 726 3.547500e-08 1.112483e+00 -1.31488e-01 -7.43964e-02 727 3.552500e-08 1.088810e+00 -1.30221e-01 -6.43244e-02 728 3.557500e-08 1.067889e+00 -1.37684e-01 -4.02831e-02 729 3.562500e-08 1.049538e+00 -1.46665e-01 -1.40182e-02 730 3.567500e-08 1.033156e+00 -1.53381e-01 8.347621e-03 731 3.572500e-08 1.018180e+00 -1.52428e-01 1.806906e-02 732 3.577500e-08 1.005852e+00 -1.41131e-01 1.081998e-02 733 3.582500e-08 9.968515e-01 -1.27352e-01 -6.71968e-04 734 3.587500e-08 9.889574e-01 -1.16003e-01 -8.44985e-03 735 3.592500e-08 9.729086e-01 -1.08028e-01 -1.09787e-02 736 3.597500e-08 9.398982e-01 -1.02956e-01 -1.02185e-02 737 3.602500e-08 8.979075e-01 -1.01685e-01 -9.93080e-03 738 3.607500e-08 8.538182e-01 -1.05178e-01 -1.27305e-02 739 3.612500e-08 8.183880e-01 -1.12149e-01 -1.89986e-02 740 3.617500e-08 7.998208e-01 -1.19365e-01 -2.82583e-02 741 3.622500e-08 7.915388e-01 -1.22402e-01 -3.95148e-02 742 3.627500e-08 7.874274e-01 -1.18632e-01 -5.17852e-02 743 3.632500e-08 7.844469e-01 -1.12179e-01 -5.97238e-02 744 3.637500e-08 7.812546e-01 -1.09988e-01 -5.64109e-02 745 3.642500e-08 7.768113e-01 -1.11783e-01 -4.53376e-02 746 3.647500e-08 7.691331e-01 -1.16770e-01 -2.89526e-02 747 3.652500e-08 7.562939e-01 -1.21211e-01 -1.35707e-02 748 3.657500e-08 7.383215e-01 -1.21062e-01 -5.76854e-03 749 3.662500e-08 7.176563e-01 -1.18251e-01 -2.42852e-03 750 3.667500e-08 6.983276e-01 -1.14455e-01 -8.37663e-04 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 751 3.672500e-08 6.801397e-01 -1.09875e-01 -6.64706e-04 752 3.677500e-08 6.593413e-01 -1.04088e-01 -2.59640e-03 753 3.682500e-08 6.384258e-01 -9.67102e-02 -7.25491e-03 754 3.687500e-08 6.182835e-01 -8.80934e-02 -1.45216e-02 755 3.692500e-08 6.020954e-01 -8.00914e-02 -2.36093e-02 756 3.697500e-08 5.932177e-01 -7.51334e-02 -3.32582e-02 757 3.702500e-08 5.875310e-01 -7.43357e-02 -4.20173e-02 758 3.707500e-08 5.811874e-01 -7.68794e-02 -4.88248e-02 759 3.712500e-08 5.727692e-01 -8.20992e-02 -5.04660e-02 760 3.717500e-08 5.625420e-01 -8.98284e-02 -4.34053e-02 761 3.722500e-08 5.518545e-01 -9.73850e-02 -3.11823e-02 762 3.727500e-08 5.423870e-01 -1.03614e-01 -1.74199e-02 763 3.732500e-08 5.351924e-01 -1.06740e-01 -7.06151e-03 764 3.737500e-08 5.299764e-01 -1.04805e-01 -4.46528e-03 765 3.742500e-08 5.254470e-01 -9.93798e-02 -7.51612e-03 766 3.747500e-08 5.204167e-01 -9.24462e-02 -1.31080e-02 767 3.752500e-08 5.123178e-01 -8.53738e-02 -1.90388e-02 768 3.757500e-08 4.984101e-01 -7.91246e-02 -2.37492e-02 769 3.762500e-08 4.810443e-01 -7.41929e-02 -2.64339e-02 770 3.767500e-08 4.622043e-01 -7.05292e-02 -2.71678e-02 771 3.772500e-08 4.447325e-01 -6.77057e-02 -2.66412e-02 772 3.777500e-08 4.317849e-01 -6.52852e-02 -2.57315e-02 773 3.782500e-08 4.224891e-01 -6.32700e-02 -2.53617e-02 774 3.787500e-08 4.156795e-01 -6.20079e-02 -2.64433e-02 775 3.792500e-08 4.109602e-01 -6.25724e-02 -2.79831e-02 776 3.797500e-08 4.079162e-01 -6.59406e-02 -2.76501e-02 777 3.802500e-08 4.058688e-01 -7.04149e-02 -2.60963e-02 778 3.807500e-08 4.041114e-01 -7.43282e-02 -2.36420e-02 779 3.812500e-08 4.020861e-01 -7.62473e-02 -2.14058e-02 780 3.817500e-08 3.993543e-01 -7.53931e-02 -2.10375e-02 781 3.822500e-08 3.955323e-01 -7.31658e-02 -2.13871e-02 782 3.827500e-08 3.903016e-01 -7.08522e-02 -2.12902e-02 783 3.832500e-08 3.823225e-01 -6.87680e-02 -2.06955e-02 784 3.837500e-08 3.701096e-01 -6.67437e-02 -2.00353e-02 785 3.842500e-08 3.555910e-01 -6.45312e-02 -1.97488e-02 786 3.847500e-08 3.411784e-01 -6.19089e-02 -2.02001e-02 787 3.852500e-08 3.295373e-01 -5.87121e-02 -2.16555e-02 788 3.857500e-08 3.226722e-01 -5.49155e-02 -2.41556e-02 789 3.862500e-08 3.192499e-01 -5.07143e-02 -2.73843e-02 790 3.867500e-08 3.171695e-01 -4.65306e-02 -3.07225e-02 791 3.872500e-08 3.151448e-01 -4.35749e-02 -3.25939e-02 792 3.877500e-08 3.125537e-01 -4.34165e-02 -3.12061e-02 793 3.882500e-08 3.091205e-01 -4.59364e-02 -2.73569e-02 794 3.887500e-08 3.048669e-01 -5.02172e-02 -2.24397e-02 795 3.892500e-08 3.001404e-01 -5.45835e-02 -1.82431e-02 796 3.897500e-08 2.955185e-01 -5.71857e-02 -1.64149e-02 797 3.902500e-08 2.915669e-01 -5.76987e-02 -1.64854e-02 798 3.907500e-08 2.885858e-01 -5.65772e-02 -1.75548e-02 799 3.912500e-08 2.857328e-01 -5.43191e-02 -1.92854e-02 800 3.917500e-08 2.813491e-01 -5.13599e-02 -2.15586e-02 801 3.922500e-08 2.753371e-01 -4.81181e-02 -2.40894e-02 802 3.927500e-08 2.681114e-01 -4.49878e-02 -2.64182e-02 803 3.932500e-08 2.607020e-01 -4.22662e-02 -2.81220e-02 804 3.937500e-08 2.544344e-01 -4.00759e-02 -2.90152e-02 805 3.942500e-08 2.491999e-01 -3.83549e-02 -2.91995e-02 806 3.947500e-08 2.444911e-01 -3.69257e-02 -2.89615e-02 807 3.952500e-08 2.402186e-01 -3.59492e-02 -2.80405e-02 808 3.957500e-08 2.365728e-01 -3.58822e-02 -2.57211e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 809 3.962500e-08 2.337271e-01 -3.64885e-02 -2.25428e-02 810 3.967500e-08 2.316843e-01 -3.74077e-02 -1.94514e-02 811 3.972500e-08 2.302632e-01 -3.81674e-02 -1.76041e-02 812 3.977500e-08 2.291789e-01 -3.82512e-02 -1.79479e-02 813 3.982500e-08 2.281408e-01 -3.78196e-02 -1.98741e-02 814 3.987500e-08 2.269049e-01 -3.72111e-02 -2.21360e-02 815 3.992500e-08 2.248239e-01 -3.65423e-02 -2.38676e-02 816 3.997500e-08 2.209767e-01 -3.57979e-02 -2.47889e-02 817 4.002500e-08 2.155608e-01 -3.49638e-02 -2.50373e-02 818 4.007500e-08 2.093057e-01 -3.40362e-02 -2.49298e-02 819 4.012500e-08 2.032949e-01 -3.29921e-02 -2.47844e-02 820 4.017500e-08 1.986481e-01 -3.17823e-02 -2.48449e-02 821 4.022500e-08 1.954061e-01 -3.03521e-02 -2.52702e-02 822 4.027500e-08 1.930652e-01 -2.86781e-02 -2.61209e-02 823 4.032500e-08 1.912403e-01 -2.70211e-02 -2.69801e-02 824 4.037500e-08 1.897286e-01 -2.58990e-02 -2.70105e-02 825 4.042500e-08 1.883728e-01 -2.54165e-02 -2.60417e-02 826 4.047500e-08 1.869964e-01 -2.54469e-02 -2.42866e-02 827 4.052500e-08 1.854326e-01 -2.56698e-02 -2.23273e-02 828 4.057500e-08 1.835934e-01 -2.56874e-02 -2.09764e-02 829 4.062500e-08 1.815193e-01 -2.55308e-02 -2.04097e-02 830 4.067500e-08 1.793713e-01 -2.54100e-02 -2.04199e-02 831 4.072500e-08 1.770852e-01 -2.53682e-02 -2.08390e-02 832 4.077500e-08 1.743093e-01 -2.52542e-02 -2.15805e-02 833 4.082500e-08 1.711521e-01 -2.48610e-02 -2.25719e-02 834 4.087500e-08 1.679154e-01 -2.40721e-02 -2.37289e-02 835 4.092500e-08 1.650200e-01 -2.29292e-02 -2.49467e-02 836 4.097500e-08 1.629049e-01 -2.15956e-02 -2.60930e-02 837 4.102500e-08 1.614059e-01 -2.02641e-02 -2.70283e-02 838 4.107500e-08 1.600309e-01 -1.90757e-02 -2.76520e-02 839 4.112500e-08 1.584281e-01 -1.82150e-02 -2.77327e-02 840 4.117500e-08 1.565149e-01 -1.79124e-02 -2.69245e-02 841 4.122500e-08 1.544195e-01 -1.80918e-02 -2.53587e-02 842 4.127500e-08 1.523756e-01 -1.85008e-02 -2.34451e-02 843 4.132500e-08 1.506049e-01 -1.87939e-02 -2.17433e-02 844 4.137500e-08 1.492257e-01 -1.86192e-02 -2.08261e-02 845 4.142500e-08 1.482271e-01 -1.79469e-02 -2.07675e-02 846 4.147500e-08 1.475021e-01 -1.69929e-02 -2.12958e-02 847 4.152500e-08 1.467366e-01 -1.60084e-02 -2.21262e-02 848 4.157500e-08 1.454538e-01 -1.51837e-02 -2.30511e-02 849 4.162500e-08 1.435320e-01 -1.46132e-02 -2.39140e-02 850 4.167500e-08 1.411229e-01 -1.42798e-02 -2.46007e-02 851 4.172500e-08 1.385763e-01 -1.40789e-02 -2.50559e-02 852 4.177500e-08 1.363474e-01 -1.38793e-02 -2.52964e-02 853 4.182500e-08 1.345857e-01 -1.35822e-02 -2.54007e-02 854 4.187500e-08 1.332028e-01 -1.31419e-02 -2.54774e-02 855 4.192500e-08 1.320965e-01 -1.26314e-02 -2.54996e-02 856 4.197500e-08 1.311960e-01 -1.22284e-02 -2.52670e-02 857 4.202500e-08 1.304276e-01 -1.19774e-02 -2.47642e-02 858 4.207500e-08 1.297104e-01 -1.18214e-02 -2.41108e-02 859 4.212500e-08 1.289783e-01 -1.16434e-02 -2.35067e-02 860 4.217500e-08 1.281935e-01 -1.13027e-02 -2.31824e-02 861 4.222500e-08 1.273402e-01 -1.08082e-02 -2.31239e-02 862 4.227500e-08 1.264136e-01 -1.02690e-02 -2.31559e-02 863 4.232500e-08 1.253218e-01 -9.76520e-03 -2.31589e-02 864 4.237500e-08 1.238832e-01 -9.31942e-03 -2.31306e-02 865 4.242500e-08 1.221234e-01 -8.92829e-03 -2.31388e-02 866 4.247500e-08 1.202383e-01 -8.58289e-03 -2.32628e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 867 4.252500e-08 1.185098e-01 -8.26560e-03 -2.35539e-02 868 4.257500e-08 1.172189e-01 -7.94381e-03 -2.40137e-02 869 4.262500e-08 1.163951e-01 -7.57864e-03 -2.45916e-02 870 4.267500e-08 1.158613e-01 -7.14747e-03 -2.52007e-02 871 4.272500e-08 1.154238e-01 -6.70803e-03 -2.56707e-02 872 4.277500e-08 1.149563e-01 -6.40266e-03 -2.57620e-02 873 4.282500e-08 1.143929e-01 -6.29619e-03 -2.54085e-02 874 4.287500e-08 1.137076e-01 -6.35317e-03 -2.47199e-02 875 4.292500e-08 1.129090e-01 -6.45697e-03 -2.39262e-02 876 4.297500e-08 1.120405e-01 -6.44925e-03 -2.33082e-02 877 4.302500e-08 1.111731e-01 -6.26221e-03 -2.29867e-02 878 4.307500e-08 1.103825e-01 -5.92295e-03 -2.29220e-02 879 4.312500e-08 1.096609e-01 -5.47985e-03 -2.30370e-02 880 4.317500e-08 1.088818e-01 -4.96950e-03 -2.32733e-02 881 4.322500e-08 1.079769e-01 -4.42410e-03 -2.35829e-02 882 4.327500e-08 1.069639e-01 -3.88338e-03 -2.39165e-02 883 4.332500e-08 1.059341e-01 -3.39478e-03 -2.42279e-02 884 4.337500e-08 1.050244e-01 -3.00093e-03 -2.44863e-02 885 4.342500e-08 1.042717e-01 -2.72199e-03 -2.46824e-02 886 4.347500e-08 1.036149e-01 -2.54435e-03 -2.48254e-02 887 4.352500e-08 1.029965e-01 -2.45225e-03 -2.48879e-02 888 4.357500e-08 1.024085e-01 -2.45425e-03 -2.47850e-02 889 4.362500e-08 1.018753e-01 -2.52245e-03 -2.45044e-02 890 4.367500e-08 1.014212e-01 -2.59689e-03 -2.41204e-02 891 4.372500e-08 1.010498e-01 -2.60405e-03 -2.37628e-02 892 4.377500e-08 1.007387e-01 -2.47259e-03 -2.35746e-02 893 4.382500e-08 1.004478e-01 -2.19891e-03 -2.35890e-02 894 4.387500e-08 1.001341e-01 -1.84372e-03 -2.37269e-02 895 4.392500e-08 9.972960e-02 -1.47569e-03 -2.38874e-02 896 4.397500e-08 9.913657e-02 -1.13688e-03 -2.40070e-02 897 4.402500e-08 9.833249e-02 -8.40058e-04 -2.40662e-02 898 4.407500e-08 9.738453e-02 -5.78120e-04 -2.40772e-02 899 4.412500e-08 9.642182e-02 -3.34658e-04 -2.40681e-02 900 4.417500e-08 9.559797e-02 -9.33409e-05 -2.40719e-02 901 4.422500e-08 9.498653e-02 1.550478e-04 -2.41184e-02 902 4.427500e-08 9.456297e-02 4.098530e-04 -2.42276e-02 903 4.432500e-08 9.426456e-02 6.459030e-04 -2.43763e-02 904 4.437500e-08 9.403365e-02 8.116067e-04 -2.44821e-02 905 4.442500e-08 9.382636e-02 8.829778e-04 -2.44843e-02 906 4.447500e-08 9.361018e-02 8.775790e-04 -2.43733e-02 907 4.452500e-08 9.336316e-02 8.442349e-04 -2.41902e-02 908 4.457500e-08 9.307505e-02 8.465075e-04 -2.40157e-02 909 4.462500e-08 9.274776e-02 9.156522e-04 -2.38979e-02 910 4.467500e-08 9.239354e-02 1.042758e-03 -2.38344e-02 911 4.472500e-08 9.200905e-02 1.207844e-03 -2.38092e-02 912 4.477500e-08 9.155904e-02 1.399503e-03 -2.38172e-02 913 4.482500e-08 9.103327e-02 1.614850e-03 -2.38626e-02 914 4.487500e-08 9.046264e-02 1.852529e-03 -2.39473e-02 915 4.492500e-08 8.990750e-02 2.107643e-03 -2.40653e-02 916 4.497500e-08 8.943913e-02 2.370447e-03 -2.42013e-02 917 4.502500e-08 8.908179e-02 2.627923e-03 -2.43352e-02 918 4.507500e-08 8.880232e-02 2.866637e-03 -2.44478e-02 919 4.512500e-08 8.855123e-02 3.065282e-03 -2.45118e-02 920 4.517500e-08 8.829602e-02 3.191051e-03 -2.44850e-02 921 4.522500e-08 8.802780e-02 3.230099e-03 -2.43563e-02 922 4.527500e-08 8.775450e-02 3.199487e-03 -2.41579e-02 923 4.532500e-08 8.749175e-02 3.142297e-03 -2.39519e-02 924 4.537500e-08 8.725474e-02 3.115188e-03 -2.38113e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 925 4.542500e-08 8.705221e-02 3.154065e-03 -2.37715e-02 926 4.547500e-08 8.688343e-02 3.260236e-03 -2.38176e-02 927 4.552500e-08 8.672542e-02 3.414571e-03 -2.39121e-02 928 4.557500e-08 8.652769e-02 3.593759e-03 -2.40208e-02 929 4.562500e-08 8.625288e-02 3.777818e-03 -2.41197e-02 930 4.567500e-08 8.589781e-02 3.952649e-03 -2.41948e-02 931 4.572500e-08 8.549317e-02 4.111069e-03 -2.42407e-02 932 4.577500e-08 8.509394e-02 4.252675e-03 -2.42607e-02 933 4.582500e-08 8.474137e-02 4.382291e-03 -2.42641e-02 934 4.587500e-08 8.444596e-02 4.507398e-03 -2.42640e-02 935 4.592500e-08 8.420228e-02 4.629181e-03 -2.42626e-02 936 4.597500e-08 8.400340e-02 4.735818e-03 -2.42421e-02 937 4.602500e-08 8.384286e-02 4.817524e-03 -2.41899e-02 938 4.607500e-08 8.371180e-02 4.874672e-03 -2.41122e-02 939 4.612500e-08 8.359826e-02 4.917360e-03 -2.40322e-02 940 4.617500e-08 8.348921e-02 4.962597e-03 -2.39816e-02 941 4.622500e-08 8.337337e-02 5.019872e-03 -2.39742e-02 942 4.627500e-08 8.324346e-02 5.086259e-03 -2.39967e-02 943 4.632500e-08 8.308952e-02 5.155627e-03 -2.40266e-02 944 4.637500e-08 8.289302e-02 5.226419e-03 -2.40497e-02 945 4.642500e-08 8.264676e-02 5.301638e-03 -2.40644e-02 946 4.647500e-08 8.236486e-02 5.385452e-03 -2.40768e-02 947 4.652500e-08 8.207842e-02 5.480671e-03 -2.40952e-02 948 4.657500e-08 8.182549e-02 5.587834e-03 -2.41256e-02 949 4.662500e-08 8.162682e-02 5.705173e-03 -2.41695e-02 950 4.667500e-08 8.147612e-02 5.828878e-03 -2.42239e-02 951 4.672500e-08 8.135327e-02 5.950004e-03 -2.42757e-02 952 4.677500e-08 8.123976e-02 6.052518e-03 -2.42999e-02 953 4.682500e-08 8.112438e-02 6.124419e-03 -2.42773e-02 954 4.687500e-08 8.100251e-02 6.165261e-03 -2.42078e-02 955 4.692500e-08 8.087415e-02 6.186127e-03 -2.41107e-02 956 4.697500e-08 8.074267e-02 6.205502e-03 -2.40187e-02 957 4.702500e-08 8.061361e-02 6.237134e-03 -2.39580e-02 958 4.707500e-08 8.049308e-02 6.283685e-03 -2.39359e-02 959 4.712500e-08 8.038095e-02 6.341458e-03 -2.39469e-02 960 4.717500e-08 8.026513e-02 6.406828e-03 -2.39819e-02 961 4.722500e-08 8.013327e-02 6.478147e-03 -2.40315e-02 962 4.727500e-08 7.998247e-02 6.554401e-03 -2.40869e-02 963 4.732500e-08 7.982092e-02 6.633703e-03 -2.41400e-02 964 4.737500e-08 7.966499e-02 6.713111e-03 -2.41839e-02 965 4.742500e-08 7.952588e-02 6.789609e-03 -2.42150e-02 966 4.747500e-08 7.940230e-02 6.861350e-03 -2.42328e-02 967 4.752500e-08 7.928681e-02 6.926105e-03 -2.42367e-02 968 4.757500e-08 7.917457e-02 6.979002e-03 -2.42208e-02 969 4.762500e-08 7.906610e-02 7.017362e-03 -2.41822e-02 970 4.767500e-08 7.896520e-02 7.044317e-03 -2.41266e-02 971 4.772500e-08 7.887556e-02 7.068294e-03 -2.40680e-02 972 4.777500e-08 7.879844e-02 7.100331e-03 -2.40246e-02 973 4.782500e-08 7.873203e-02 7.146858e-03 -2.40075e-02 974 4.787500e-08 7.867210e-02 7.205626e-03 -2.40143e-02 975 4.792500e-08 7.861069e-02 7.268947e-03 -2.40347e-02 976 4.797500e-08 7.853480e-02 7.329171e-03 -2.40583e-02 977 4.802500e-08 7.843457e-02 7.381891e-03 -2.40790e-02 978 4.807500e-08 7.831016e-02 7.426553e-03 -2.40946e-02 979 4.812500e-08 7.817240e-02 7.465618e-03 -2.41061e-02 980 4.817500e-08 7.803933e-02 7.503083e-03 -2.41156e-02 981 4.822500e-08 7.792586e-02 7.542896e-03 -2.41261e-02 982 4.827500e-08 7.783651e-02 7.587725e-03 -2.41398e-02 Index time v(2) v(7) v(9) -------------------------------------------------------------------------------- 983 4.832500e-08 7.776725e-02 7.637050e-03 -2.41558e-02 984 4.837500e-08 7.771103e-02 7.685822e-03 -2.41672e-02 985 4.842500e-08 7.766106e-02 7.728210e-03 -2.41660e-02 986 4.847500e-08 7.761196e-02 7.761506e-03 -2.41494e-02 987 4.852500e-08 7.755999e-02 7.787397e-03 -2.41211e-02 988 4.857500e-08 7.750329e-02 7.811307e-03 -2.40905e-02 989 4.862500e-08 7.744197e-02 7.838324e-03 -2.40661e-02 990 4.867500e-08 7.737774e-02 7.870073e-03 -2.40507e-02 991 4.872500e-08 7.731158e-02 7.905533e-03 -2.40430e-02 992 4.877500e-08 7.724108e-02 7.943266e-03 -2.40413e-02 993 4.882500e-08 7.716361e-02 7.982409e-03 -2.40453e-02 994 4.887500e-08 7.708015e-02 8.022454e-03 -2.40555e-02 995 4.892500e-08 7.699587e-02 8.062839e-03 -2.40716e-02 996 4.897500e-08 7.691871e-02 8.102863e-03 -2.40924e-02 997 4.902500e-08 7.685413e-02 8.141834e-03 -2.41155e-02 998 4.907500e-08 7.680136e-02 8.179224e-03 -2.41376e-02 999 4.912500e-08 7.675538e-02 8.213936e-03 -2.41547e-02 1000 4.917500e-08 7.671103e-02 8.243376e-03 -2.41610e-02 1001 4.922500e-08 7.666545e-02 8.265311e-03 -2.41523e-02 1002 4.927500e-08 7.661818e-02 8.280026e-03 -2.41295e-02 1003 4.932500e-08 7.657033e-02 8.290837e-03 -2.40988e-02 1004 4.937500e-08 7.652363e-02 8.303202e-03 -2.40698e-02 1005 4.942500e-08 7.647971e-02 8.321740e-03 -2.40509e-02 1006 4.947500e-08 7.643959e-02 8.347801e-03 -2.40446e-02 1007 4.952500e-08 7.640233e-02 8.379804e-03 -2.40487e-02 1008 4.957500e-08 7.636380e-02 8.415024e-03 -2.40589e-02 1009 4.962500e-08 7.631914e-02 8.450894e-03 -2.40713e-02 1010 4.967500e-08 7.626612e-02 8.485444e-03 -2.40829e-02 1011 4.972500e-08 7.620656e-02 8.517338e-03 -2.40921e-02 1012 4.977500e-08 7.614587e-02 8.545896e-03 -2.40985e-02 1013 4.982500e-08 7.608966e-02 8.571133e-03 -2.41028e-02 1014 4.987500e-08 7.604064e-02 8.593740e-03 -2.41061e-02 1015 4.992500e-08 7.599867e-02 8.614437e-03 -2.41092e-02 1016 4.997500e-08 7.596259e-02 8.633010e-03 -2.41104e-02 1017 5.000000e-08 7.594647e-02 8.640902e-03 -2.41089e-02 ngspice-26/tests/transmission/txl2_3_line.out0000644000265600020320000015000112264261473020774 0ustar andreasadminCircuit: mosdriver -- 3 lossy lines txl model -- c load Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 Warning: vs: no DC value, transient time 0 value used No. of Data Rows : 497 mosdriver -- 3 lossy lines txl model -- c load Transient Analysis Sun Feb 07 19:00:58 2010 -------------------------------------------------------------------------------- Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 5.000000e+00 1.242558e-09 1 2.000000e-12 5.000000e+00 5.000000e+00 1.242558e-09 2 4.000000e-12 5.000000e+00 5.000000e+00 1.242543e-09 3 8.000000e-12 5.000000e+00 5.000000e+00 1.245466e-09 4 1.600000e-11 5.000000e+00 5.000000e+00 1.262555e-09 5 3.200000e-11 5.000001e+00 5.000001e+00 1.340474e-09 6 6.400000e-11 5.000005e+00 5.000008e+00 1.679891e-09 7 1.280000e-10 5.000041e+00 5.000062e+00 3.094346e-09 8 2.280000e-10 5.000154e+00 5.000229e+00 4.125711e-09 9 3.280000e-10 5.000118e+00 5.000174e+00 -2.58962e-09 10 4.280000e-10 5.000068e+00 5.000110e+00 3.170042e-09 11 5.280000e-10 5.000035e+00 5.000059e+00 -1.84303e-09 12 6.280000e-10 4.999991e+00 5.000000e+00 2.511713e-09 13 7.280000e-10 4.999962e+00 4.999953e+00 -1.22743e-09 14 8.280000e-10 4.999924e+00 4.999900e+00 1.970489e-09 15 9.280000e-10 4.999898e+00 4.999857e+00 -7.32261e-10 16 1.028000e-09 4.999866e+00 4.999808e+00 1.538286e-09 17 1.128000e-09 4.999852e+00 4.999772e+00 -2.10601e-10 18 1.228000e-09 4.999868e+00 4.999750e+00 1.721858e-09 19 1.328000e-09 4.999860e+00 4.999721e+00 -2.22888e-10 20 1.428000e-09 4.999813e+00 4.999665e+00 7.786944e-10 21 1.528000e-09 4.999777e+00 4.999620e+00 1.276023e-10 22 1.628000e-09 4.999734e+00 4.999569e+00 5.065352e-10 23 1.728000e-09 4.999700e+00 4.999528e+00 4.127559e-10 24 1.828000e-09 4.999662e+00 4.999481e+00 3.116747e-10 25 1.928000e-09 4.999631e+00 4.999444e+00 6.262388e-10 26 2.028000e-09 4.999596e+00 4.999401e+00 1.823706e-10 27 2.128000e-09 4.999569e+00 4.999368e+00 1.005133e-09 28 2.228000e-09 4.999542e+00 4.999337e+00 8.705708e-10 29 2.328000e-09 4.999521e+00 4.999312e+00 1.055088e-09 30 2.428000e-09 4.999491e+00 4.999274e+00 -2.47565e-10 31 2.528000e-09 4.999462e+00 4.999239e+00 7.072365e-10 32 2.628000e-09 4.999432e+00 4.999201e+00 -3.00623e-10 33 2.728000e-09 4.999406e+00 4.999168e+00 7.730868e-10 34 2.828000e-09 4.999378e+00 4.999133e+00 -3.12858e-10 35 2.928000e-09 4.999354e+00 4.999103e+00 8.101524e-10 36 3.028000e-09 4.999330e+00 4.999071e+00 -3.00812e-10 37 3.128000e-09 4.999308e+00 4.999043e+00 8.486718e-10 38 3.228000e-09 4.999287e+00 4.999015e+00 -1.69307e-10 39 3.328000e-09 4.999269e+00 4.998990e+00 9.213174e-10 40 3.428000e-09 4.999249e+00 4.998964e+00 -2.54060e-10 41 3.528000e-09 4.999228e+00 4.998939e+00 7.827906e-10 42 3.628000e-09 4.999208e+00 4.998913e+00 -2.37817e-10 43 3.728000e-09 4.999188e+00 4.998890e+00 7.811733e-10 44 3.828000e-09 4.999169e+00 4.998866e+00 -1.76162e-10 45 3.928000e-09 4.999152e+00 4.998845e+00 7.786272e-10 46 4.028000e-09 4.999134e+00 4.998823e+00 -1.11990e-10 47 4.128000e-09 4.999118e+00 4.998803e+00 7.844326e-10 48 4.228000e-09 4.999102e+00 4.998783e+00 2.507934e-12 49 4.328000e-09 4.999087e+00 4.998766e+00 8.405882e-10 50 4.428000e-09 4.999073e+00 4.998747e+00 2.750005e-11 51 4.528000e-09 4.999059e+00 4.998731e+00 7.357245e-10 52 4.628000e-09 4.999045e+00 4.998713e+00 3.050852e-11 53 4.728000e-09 4.999032e+00 4.998697e+00 7.237099e-10 54 4.828000e-09 4.999019e+00 4.998681e+00 9.207653e-11 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 55 4.928000e-09 4.999007e+00 4.998666e+00 7.265572e-10 56 5.028000e-09 4.998995e+00 4.998651e+00 1.519375e-10 57 5.128000e-09 4.998984e+00 4.998638e+00 7.324520e-10 58 5.228000e-09 4.998973e+00 4.998624e+00 2.150942e-10 59 5.328000e-09 4.998963e+00 4.998612e+00 7.498723e-10 60 5.428000e-09 4.998953e+00 4.998599e+00 2.707076e-10 61 5.528000e-09 4.998944e+00 4.998588e+00 7.440876e-10 62 5.628000e-09 4.998935e+00 4.998576e+00 3.080677e-10 63 5.728000e-09 4.998926e+00 4.998565e+00 7.490067e-10 64 5.828000e-09 4.998917e+00 4.998554e+00 3.578036e-10 65 5.928000e-09 4.998909e+00 4.998545e+00 7.620180e-10 66 6.028000e-09 4.998901e+00 4.998535e+00 4.061682e-10 67 6.128000e-09 4.998894e+00 4.998526e+00 7.764535e-10 68 6.228000e-09 4.998887e+00 4.998516e+00 4.542915e-10 69 6.328000e-09 4.998880e+00 4.998508e+00 7.965215e-10 70 6.428000e-09 4.998873e+00 4.998500e+00 5.004937e-10 71 6.528000e-09 4.998867e+00 4.998492e+00 8.066942e-10 72 6.628000e-09 4.998860e+00 4.998484e+00 5.322892e-10 73 6.728000e-09 4.998855e+00 4.998477e+00 8.165741e-10 74 6.828000e-09 4.998849e+00 4.998470e+00 5.695229e-10 75 6.928000e-09 4.998843e+00 4.998463e+00 8.327985e-10 76 7.028000e-09 4.998838e+00 4.998456e+00 6.067761e-10 77 7.128000e-09 4.998833e+00 4.998450e+00 8.494474e-10 78 7.228000e-09 4.998829e+00 4.998444e+00 6.423110e-10 79 7.328000e-09 4.998824e+00 4.998438e+00 8.666926e-10 80 7.428000e-09 4.998820e+00 4.998433e+00 6.763910e-10 81 7.528000e-09 4.998815e+00 4.998428e+00 8.826651e-10 82 7.628000e-09 4.998811e+00 4.998422e+00 7.064945e-10 83 7.728000e-09 4.998807e+00 4.998418e+00 8.973049e-10 84 7.828000e-09 4.998804e+00 4.998413e+00 7.357214e-10 85 7.928000e-09 4.998800e+00 4.998408e+00 9.141890e-10 86 8.028000e-09 4.998797e+00 4.998404e+00 7.633493e-10 87 8.128000e-09 4.998793e+00 4.998400e+00 9.293863e-10 88 8.228000e-09 4.998790e+00 4.998395e+00 7.902937e-10 89 8.328000e-09 4.998787e+00 4.998392e+00 9.443821e-10 90 8.428000e-09 4.998784e+00 4.998388e+00 8.160159e-10 91 8.528000e-09 4.998781e+00 4.998384e+00 9.585922e-10 92 8.628000e-09 4.998779e+00 4.998381e+00 8.393134e-10 93 8.728000e-09 4.998776e+00 4.998377e+00 9.713821e-10 94 8.828000e-09 4.998773e+00 4.998374e+00 8.613221e-10 95 8.928000e-09 4.998771e+00 4.998371e+00 9.836152e-10 96 9.028000e-09 4.998769e+00 4.998368e+00 8.828005e-10 97 9.128000e-09 4.998766e+00 4.998365e+00 9.963367e-10 98 9.228000e-09 4.998764e+00 4.998362e+00 9.027781e-10 99 9.328000e-09 4.998762e+00 4.998359e+00 1.008340e-09 100 9.428000e-09 4.998760e+00 4.998357e+00 9.216000e-10 101 9.528000e-09 4.998758e+00 4.998354e+00 1.019755e-09 102 9.628000e-09 4.998757e+00 4.998352e+00 9.391561e-10 103 9.728000e-09 4.998755e+00 4.998349e+00 1.030418e-09 104 9.828000e-09 4.998753e+00 4.998347e+00 9.553296e-10 105 9.928000e-09 4.998751e+00 4.998345e+00 1.040844e-09 106 1.002800e-08 4.998750e+00 4.998343e+00 9.711099e-10 107 1.012800e-08 4.998748e+00 4.998341e+00 1.050329e-09 108 1.022800e-08 4.998747e+00 4.998338e+00 9.856694e-10 109 1.032800e-08 4.998746e+00 4.998337e+00 1.059444e-09 110 1.042800e-08 4.998744e+00 4.998335e+00 9.993870e-10 111 1.052800e-08 4.998743e+00 4.998333e+00 1.068055e-09 112 1.062800e-08 4.998742e+00 4.998331e+00 1.012196e-09 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 113 1.072800e-08 4.998740e+00 4.998329e+00 1.076087e-09 114 1.082800e-08 4.998739e+00 4.998327e+00 1.024113e-09 115 1.092800e-08 4.998738e+00 4.998326e+00 1.083632e-09 116 1.102800e-08 4.998737e+00 4.998324e+00 1.035358e-09 117 1.112800e-08 4.998736e+00 4.998323e+00 1.090818e-09 118 1.122800e-08 4.998735e+00 4.998321e+00 1.045883e-09 119 1.132800e-08 4.998734e+00 4.998320e+00 1.097557e-09 120 1.142800e-08 4.998733e+00 4.998318e+00 1.055740e-09 121 1.152800e-08 4.998732e+00 4.998317e+00 1.103894e-09 122 1.162800e-08 4.998731e+00 4.998315e+00 1.064962e-09 123 1.172800e-08 4.998730e+00 4.998314e+00 1.109833e-09 124 1.182800e-08 4.998730e+00 4.998313e+00 1.073569e-09 125 1.192800e-08 4.998729e+00 4.998312e+00 1.115397e-09 126 1.202800e-08 4.998728e+00 4.998310e+00 1.081659e-09 127 1.212800e-08 4.998727e+00 4.998309e+00 1.120655e-09 128 1.222800e-08 4.998726e+00 4.998308e+00 1.089219e-09 129 1.232800e-08 4.998726e+00 4.998307e+00 1.125575e-09 130 1.242800e-08 4.998725e+00 4.998306e+00 1.096303e-09 131 1.252800e-08 4.998724e+00 4.998305e+00 1.130205e-09 132 1.262800e-08 4.998724e+00 4.998303e+00 1.102942e-09 133 1.272800e-08 4.998723e+00 4.998302e+00 1.134553e-09 134 1.282800e-08 4.998723e+00 4.998301e+00 1.109157e-09 135 1.292800e-08 4.998722e+00 4.998300e+00 1.138638e-09 136 1.302800e-08 4.998721e+00 4.998299e+00 1.114989e-09 137 1.312800e-08 4.998721e+00 4.998298e+00 1.142494e-09 138 1.322800e-08 4.998720e+00 4.998297e+00 1.120470e-09 139 1.332800e-08 4.998720e+00 4.998297e+00 1.146127e-09 140 1.342800e-08 4.998719e+00 4.998296e+00 1.125619e-09 141 1.352800e-08 4.998719e+00 4.998295e+00 1.149558e-09 142 1.362800e-08 4.998718e+00 4.998294e+00 1.130463e-09 143 1.372800e-08 4.998718e+00 4.998293e+00 1.152800e-09 144 1.382800e-08 4.998717e+00 4.998292e+00 1.135021e-09 145 1.392800e-08 4.998717e+00 4.998291e+00 1.155868e-09 146 1.402800e-08 4.998717e+00 4.998290e+00 1.139319e-09 147 1.412800e-08 4.998716e+00 4.998290e+00 1.158779e-09 148 1.422800e-08 4.998716e+00 4.998289e+00 1.143378e-09 149 1.432800e-08 4.998715e+00 4.998288e+00 1.161545e-09 150 1.442800e-08 4.998715e+00 4.998287e+00 1.147214e-09 151 1.452800e-08 4.998715e+00 4.998287e+00 1.164177e-09 152 1.462800e-08 4.998714e+00 4.998286e+00 1.150845e-09 153 1.472800e-08 4.998714e+00 4.998285e+00 1.166688e-09 154 1.482800e-08 4.998714e+00 4.998285e+00 1.154288e-09 155 1.492800e-08 4.998713e+00 4.998284e+00 1.169087e-09 156 1.502800e-08 4.998713e+00 4.998283e+00 1.157558e-09 157 1.512800e-08 4.998713e+00 4.998283e+00 1.171386e-09 158 1.522800e-08 4.998713e+00 4.998282e+00 1.160670e-09 159 1.532800e-08 4.998712e+00 4.998281e+00 1.173594e-09 160 1.542800e-08 4.998712e+00 4.998281e+00 1.163637e-09 161 1.552800e-08 4.998712e+00 4.998280e+00 1.175717e-09 162 1.562800e-08 4.998712e+00 4.998280e+00 1.166469e-09 163 1.572800e-08 4.998711e+00 4.998279e+00 1.177765e-09 164 1.582800e-08 4.998711e+00 4.998278e+00 1.169178e-09 165 1.590000e-08 4.998596e+00 4.998106e+00 -5.13567e-09 166 1.590621e-08 4.998579e+00 4.997997e+00 -1.83926e-08 167 1.591862e-08 4.998550e+00 4.997974e+00 6.346984e-09 168 1.594345e-08 4.995095e+00 4.998019e+00 1.472412e-09 169 1.599311e-08 4.879178e+00 4.998054e+00 2.266807e-09 170 1.609242e-08 3.937755e+00 4.998339e+00 7.504918e-09 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 171 1.610000e-08 3.827512e+00 4.998084e+00 -5.86240e-08 172 1.610492e-08 3.860707e+00 4.998157e+00 -6.10953e-08 173 1.611477e-08 3.879622e+00 4.998179e+00 -8.41332e-08 174 1.613386e-08 3.853706e+00 4.998171e+00 -7.67199e-08 175 1.617205e-08 3.828861e+00 4.998220e+00 -7.42199e-08 176 1.623935e-08 3.771815e+00 4.998299e+00 -7.02048e-08 177 1.633935e-08 3.699970e+00 4.998518e+00 -6.13310e-08 178 1.643935e-08 3.624656e+00 4.998498e+00 -6.50394e-08 179 1.653935e-08 3.558276e+00 4.998495e+00 -5.16514e-08 180 1.663935e-08 3.490207e+00 4.998476e+00 -5.55976e-08 181 1.673935e-08 3.429310e+00 4.998474e+00 -4.35959e-08 182 1.683935e-08 3.367460e+00 4.998457e+00 -4.77477e-08 183 1.693935e-08 3.311334e+00 4.998448e+00 -3.71909e-08 184 1.703935e-08 3.254840e+00 4.797835e+00 -5.54993e-06 185 1.713935e-08 3.203127e+00 3.826105e+00 5.064420e-03 186 1.723935e-08 3.151372e+00 3.713212e+00 9.502307e-03 187 1.733935e-08 3.103560e+00 3.641266e+00 1.268004e-02 188 1.743935e-08 3.055858e+00 3.515604e+00 1.964915e-02 189 1.753935e-08 3.011387e+00 3.447536e+00 2.458117e-02 190 1.763935e-08 2.967239e+00 3.329946e+00 3.334942e-02 191 1.773935e-08 2.925829e+00 3.265227e+00 4.006438e-02 192 1.783935e-08 2.884857e+00 3.155053e+00 5.051478e-02 193 1.793935e-08 2.846196e+00 3.093333e+00 5.902981e-02 194 1.803935e-08 2.759757e+00 2.989863e+00 7.108756e-02 195 1.813935e-08 2.458805e+00 2.930902e+00 8.140762e-02 196 1.823935e-08 2.231108e+00 2.833589e+00 9.494365e-02 197 1.833935e-08 2.166411e+00 2.777145e+00 1.071323e-01 198 1.843935e-08 2.083595e+00 2.685425e+00 1.222198e-01 199 1.853935e-08 2.019836e+00 2.631232e+00 1.361435e-01 200 1.863935e-08 1.944661e+00 2.544606e+00 1.528258e-01 201 1.873935e-08 1.884177e+00 2.492496e+00 1.685821e-01 202 1.883935e-08 1.815614e+00 2.410566e+00 1.867917e-01 203 1.893935e-08 1.758381e+00 2.360384e+00 2.043896e-01 204 1.903935e-08 1.695579e+00 2.271978e+00 2.261858e-01 205 1.913935e-08 1.641507e+00 2.157617e+00 2.604277e-01 206 1.923935e-08 1.583784e+00 1.998137e+00 3.064034e-01 207 1.933935e-08 1.532757e+00 1.916456e+00 3.434411e-01 208 1.943935e-08 1.479515e+00 1.831939e+00 3.781630e-01 209 1.953935e-08 1.431367e+00 1.774557e+00 4.134740e-01 210 1.963935e-08 1.382096e+00 1.696126e+00 4.517174e-01 211 1.973935e-08 1.336676e+00 1.642180e+00 4.911377e-01 212 1.983935e-08 1.290953e+00 1.569437e+00 5.331126e-01 213 1.993935e-08 1.248108e+00 1.518768e+00 5.767541e-01 214 2.003935e-08 1.203348e+00 1.451225e+00 6.227303e-01 215 2.013935e-08 1.147816e+00 1.403667e+00 6.705404e-01 216 2.023935e-08 1.080997e+00 1.340897e+00 7.189791e-01 217 2.033935e-08 1.023582e+00 1.296286e+00 7.685504e-01 218 2.043935e-08 9.786948e-01 1.237902e+00 8.181474e-01 219 2.053935e-08 9.381659e-01 1.196063e+00 8.692346e-01 220 2.063935e-08 8.994869e-01 1.141711e+00 9.199837e-01 221 2.073935e-08 8.618515e-01 1.102481e+00 9.724574e-01 222 2.083935e-08 8.261949e-01 1.051847e+00 1.024375e+00 223 2.093935e-08 7.912536e-01 1.015067e+00 1.078123e+00 224 2.103935e-08 7.583450e-01 9.675177e-01 1.131683e+00 225 2.113935e-08 7.259043e-01 9.303876e-01 1.190582e+00 226 2.123935e-08 6.954989e-01 8.802364e-01 1.255018e+00 227 2.133935e-08 6.653763e-01 8.417874e-01 1.323514e+00 228 2.143935e-08 6.372551e-01 7.976866e-01 1.388578e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 229 2.153935e-08 6.092764e-01 7.664294e-01 1.453448e+00 230 2.163935e-08 5.832392e-01 7.277166e-01 1.517766e+00 231 2.173935e-08 5.572414e-01 6.991309e-01 1.584090e+00 232 2.183935e-08 5.331100e-01 6.633304e-01 1.649486e+00 233 2.193935e-08 5.089422e-01 6.368757e-01 1.716198e+00 234 2.203935e-08 4.864882e-01 6.037533e-01 1.781962e+00 235 2.213935e-08 4.634523e-01 5.792649e-01 1.848989e+00 236 2.223935e-08 4.411249e-01 5.486057e-01 1.914800e+00 237 2.233935e-08 4.182061e-01 5.259294e-01 1.981303e+00 238 2.243935e-08 3.974951e-01 4.975357e-01 2.046219e+00 239 2.253935e-08 3.774426e-01 4.765269e-01 2.111598e+00 240 2.263935e-08 3.592840e-01 4.502158e-01 2.175396e+00 241 2.273935e-08 3.410692e-01 4.307398e-01 2.239541e+00 242 2.283935e-08 3.243316e-01 4.063429e-01 2.302140e+00 243 2.293935e-08 3.074692e-01 3.882750e-01 2.364984e+00 244 2.303935e-08 2.919848e-01 3.656289e-01 2.426375e+00 245 2.313935e-08 2.763615e-01 3.487754e-01 2.488316e+00 246 2.323935e-08 2.620218e-01 3.275000e-01 2.549896e+00 247 2.333935e-08 2.475337e-01 3.115020e-01 2.612742e+00 248 2.343935e-08 2.342395e-01 2.916126e-01 2.674496e+00 249 2.353935e-08 2.207909e-01 2.769511e-01 2.735785e+00 250 2.363935e-08 2.084516e-01 2.587715e-01 2.795372e+00 251 2.373935e-08 1.959544e-01 2.453191e-01 2.854835e+00 252 2.383935e-08 1.844871e-01 2.284788e-01 2.912958e+00 253 2.393935e-08 1.728606e-01 2.159786e-01 2.970772e+00 254 2.403935e-08 1.621880e-01 2.003190e-01 3.027119e+00 255 2.413935e-08 1.513426e-01 1.886802e-01 3.083042e+00 256 2.423935e-08 1.413410e-01 1.740994e-01 3.137516e+00 257 2.433935e-08 1.311306e-01 1.632439e-01 3.191452e+00 258 2.443935e-08 1.217322e-01 1.496484e-01 3.243901e+00 259 2.453935e-08 1.122238e-01 1.395050e-01 3.295705e+00 260 2.463935e-08 1.035303e-01 1.268095e-01 3.346041e+00 261 2.473935e-08 9.471782e-02 1.173130e-01 3.395691e+00 262 2.483935e-08 8.662314e-02 1.054394e-01 3.443919e+00 263 2.493935e-08 7.838867e-02 9.653069e-02 3.491434e+00 264 2.503935e-08 7.081219e-02 8.540747e-02 3.537581e+00 265 2.513935e-08 6.309859e-02 7.703071e-02 3.583025e+00 266 2.523935e-08 5.599355e-02 6.658513e-02 3.627247e+00 267 2.533935e-08 4.875536e-02 5.867738e-02 3.670899e+00 268 2.543935e-08 4.208000e-02 4.884319e-02 3.713427e+00 269 2.553935e-08 3.527588e-02 4.137685e-02 3.755237e+00 270 2.563935e-08 2.899231e-02 3.213308e-02 3.795777e+00 271 2.573935e-08 2.258470e-02 2.508912e-02 3.835523e+00 272 2.583935e-08 1.665862e-02 1.638318e-02 3.874084e+00 273 2.593935e-08 1.061343e-02 9.710064e-03 3.911890e+00 274 2.603935e-08 5.013742e-03 1.485719e-03 3.948555e+00 275 2.613935e-08 -7.00270e-04 -4.85432e-03 3.984457e+00 276 2.623935e-08 -6.00274e-03 -1.26392e-02 4.019261e+00 277 2.633935e-08 -1.14155e-02 -1.86766e-02 4.053309e+00 278 2.643935e-08 -1.64478e-02 -2.60594e-02 4.086300e+00 279 2.653935e-08 -2.15821e-02 -3.18213e-02 4.118544e+00 280 2.663935e-08 -2.63591e-02 -3.88359e-02 4.149775e+00 281 2.673935e-08 -3.12298e-02 -4.43465e-02 4.180276e+00 282 2.683935e-08 -3.57701e-02 -5.10234e-02 4.209813e+00 283 2.693935e-08 -4.04014e-02 -5.63046e-02 4.238641e+00 284 2.703935e-08 -4.47279e-02 -6.26713e-02 4.266556e+00 285 2.713935e-08 -4.91408e-02 -6.77426e-02 4.293789e+00 286 2.723935e-08 -5.32714e-02 -7.38237e-02 4.320163e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 287 2.733935e-08 -5.74834e-02 -7.87017e-02 4.345894e+00 288 2.743935e-08 -6.14334e-02 -8.45187e-02 4.370824e+00 289 2.753935e-08 -6.54598e-02 -8.92179e-02 4.395137e+00 290 2.763935e-08 -6.92431e-02 -9.47895e-02 4.418679e+00 291 2.773935e-08 -7.30979e-02 -9.93221e-02 4.441613e+00 292 2.783935e-08 -7.67267e-02 -1.04665e-01 4.463812e+00 293 2.793935e-08 -8.04223e-02 -1.09044e-01 4.485432e+00 294 2.803935e-08 -8.39078e-02 -1.14176e-01 4.506363e+00 295 2.813935e-08 -8.74554e-02 -1.18412e-01 4.526741e+00 296 2.823935e-08 -9.08074e-02 -1.23348e-01 4.546470e+00 297 2.833935e-08 -9.42170e-02 -1.27451e-01 4.565673e+00 298 2.843935e-08 -9.74441e-02 -1.32204e-01 4.584265e+00 299 2.853935e-08 -1.00724e-01 -1.36182e-01 4.602357e+00 300 2.863935e-08 -1.03834e-01 -1.40765e-01 4.619874e+00 301 2.873935e-08 -1.06993e-01 -1.44626e-01 4.636918e+00 302 2.883935e-08 -1.09992e-01 -1.49047e-01 4.653423e+00 303 2.893935e-08 -1.13035e-01 -1.52798e-01 4.669480e+00 304 2.903935e-08 -1.15931e-01 -1.57068e-01 4.685032e+00 305 2.913935e-08 -1.18866e-01 -1.60714e-01 4.700161e+00 306 2.923935e-08 -1.21663e-01 -1.64842e-01 4.714819e+00 307 2.933935e-08 -1.24497e-01 -1.68387e-01 4.729079e+00 308 2.943935e-08 -1.27201e-01 -1.72380e-01 4.742899e+00 309 2.953935e-08 -1.29938e-01 -1.75830e-01 4.756345e+00 310 2.963935e-08 -1.32553e-01 -1.79694e-01 4.769380e+00 311 2.973935e-08 -1.35198e-01 -1.83052e-01 4.782063e+00 312 2.983935e-08 -1.37728e-01 -1.86793e-01 4.794360e+00 313 2.993935e-08 -1.40285e-01 -1.90063e-01 4.806326e+00 314 3.003935e-08 -1.42734e-01 -1.93687e-01 4.817931e+00 315 3.013935e-08 -1.45207e-01 -1.96871e-01 4.829226e+00 316 3.023935e-08 -1.47578e-01 -2.00383e-01 4.840184e+00 317 3.033935e-08 -1.49970e-01 -2.03484e-01 4.850852e+00 318 3.043935e-08 -1.52266e-01 -2.06887e-01 4.861205e+00 319 3.053935e-08 -1.54581e-01 -2.09907e-01 4.871286e+00 320 3.063935e-08 -1.56804e-01 -2.13207e-01 4.881074e+00 321 3.073935e-08 -1.59044e-01 -2.16148e-01 4.890606e+00 322 3.083935e-08 -1.61197e-01 -2.19347e-01 4.899866e+00 323 3.093935e-08 -1.63364e-01 -2.22211e-01 4.908886e+00 324 3.103935e-08 -1.65450e-01 -2.25313e-01 4.917653e+00 325 3.113935e-08 -1.67546e-01 -2.28101e-01 4.926195e+00 326 3.123935e-08 -1.69565e-01 -2.31108e-01 4.934500e+00 327 3.133935e-08 -1.71593e-01 -2.33822e-01 4.942597e+00 328 3.143935e-08 -1.73548e-01 -2.36737e-01 4.950472e+00 329 3.153935e-08 -1.75510e-01 -2.39378e-01 4.958152e+00 330 3.163935e-08 -1.77402e-01 -2.42204e-01 4.965626e+00 331 3.173935e-08 -1.79299e-01 -2.44772e-01 4.972917e+00 332 3.183935e-08 -1.81130e-01 -2.47510e-01 4.980016e+00 333 3.190000e-08 -1.82289e-01 -2.48974e-01 4.984137e+00 334 3.191000e-08 -1.85649e-01 -2.49280e-01 4.984752e+00 335 3.193000e-08 -1.94025e-01 -2.49822e-01 4.986135e+00 336 3.197000e-08 -1.83181e-01 -2.50858e-01 4.988910e+00 337 3.203371e-08 2.884582e-02 -2.52452e-01 4.993175e+00 338 3.209348e-08 5.436334e-01 -2.53934e-01 4.997160e+00 339 3.210000e-08 6.203501e-01 -2.54108e-01 4.997549e+00 340 3.210125e-08 6.309529e-01 -2.54139e-01 4.997631e+00 341 3.210375e-08 6.472974e-01 -2.54203e-01 4.997792e+00 342 3.210875e-08 6.612459e-01 -2.54326e-01 4.998106e+00 343 3.211876e-08 6.684241e-01 -2.54576e-01 4.998752e+00 344 3.213525e-08 6.767259e-01 -2.54997e-01 4.999842e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 345 3.216415e-08 6.920924e-01 -2.55728e-01 5.001736e+00 346 3.222196e-08 7.217340e-01 -2.57136e-01 5.005443e+00 347 3.232196e-08 7.718774e-01 -2.59566e-01 5.011858e+00 348 3.242196e-08 8.206479e-01 -2.61985e-01 5.018005e+00 349 3.252196e-08 8.677878e-01 -2.64353e-01 5.023983e+00 350 3.262196e-08 9.130801e-01 -2.66697e-01 5.029838e+00 351 3.272196e-08 9.568678e-01 -2.68991e-01 5.035537e+00 352 3.282196e-08 9.990343e-01 -2.71262e-01 5.041118e+00 353 3.292196e-08 1.039879e+00 -2.73501e-01 5.046534e+00 354 3.302196e-08 1.079237e+00 -2.28453e-01 5.051992e+00 355 3.312196e-08 1.117432e+00 3.593319e-01 5.059704e+00 356 3.317320e-08 1.136576e+00 5.898828e-01 5.063545e+00 357 3.323667e-08 1.159761e+00 6.317097e-01 5.067313e+00 358 3.330065e-08 1.182495e+00 6.810272e-01 5.071174e+00 359 3.337230e-08 1.207534e+00 7.256570e-01 5.075414e+00 360 3.347230e-08 1.241588e+00 7.974353e-01 5.081440e+00 361 3.357230e-08 1.274778e+00 8.593577e-01 5.087056e+00 362 3.367230e-08 1.306987e+00 9.278660e-01 5.092232e+00 363 3.377230e-08 1.338320e+00 9.870126e-01 5.096966e+00 364 3.387230e-08 1.368770e+00 1.052258e+00 5.101193e+00 365 3.397230e-08 1.401268e+00 1.108877e+00 5.105054e+00 366 3.407230e-08 1.483282e+00 1.171118e+00 5.108361e+00 367 3.417230e-08 1.757918e+00 1.225402e+00 5.111341e+00 368 3.427230e-08 1.905600e+00 1.284950e+00 5.113718e+00 369 3.437230e-08 1.960800e+00 1.336898e+00 5.115898e+00 370 3.447230e-08 2.033160e+00 1.393742e+00 5.117534e+00 371 3.457230e-08 2.084375e+00 1.443888e+00 5.118885e+00 372 3.467230e-08 2.152114e+00 1.498498e+00 5.119647e+00 373 3.477230e-08 2.202438e+00 1.546843e+00 5.120154e+00 374 3.487230e-08 2.265152e+00 1.599276e+00 5.120113e+00 375 3.497230e-08 2.314218e+00 1.646679e+00 5.119766e+00 376 3.507230e-08 2.372570e+00 1.711633e+00 5.117869e+00 377 3.517230e-08 2.420166e+00 1.830932e+00 5.110316e+00 378 3.527230e-08 2.474714e+00 1.960389e+00 5.099277e+00 379 3.537230e-08 2.520698e+00 2.033864e+00 5.092102e+00 380 3.547230e-08 2.571786e+00 2.101227e+00 5.085222e+00 381 3.557230e-08 2.616148e+00 2.159058e+00 5.078200e+00 382 3.567230e-08 2.664275e+00 2.222552e+00 5.070048e+00 383 3.577230e-08 2.707006e+00 2.278637e+00 5.061360e+00 384 3.587230e-08 2.752429e+00 2.338826e+00 5.051684e+00 385 3.597230e-08 2.793691e+00 2.392832e+00 5.041320e+00 386 3.607230e-08 2.840231e+00 2.449963e+00 5.030096e+00 387 3.617230e-08 2.899698e+00 2.501883e+00 5.018077e+00 388 3.627230e-08 2.972269e+00 2.556177e+00 5.005291e+00 389 3.637230e-08 3.030898e+00 2.606036e+00 4.991637e+00 390 3.647230e-08 3.079820e+00 2.657663e+00 4.977306e+00 391 3.657230e-08 3.123761e+00 2.705495e+00 4.962064e+00 392 3.667230e-08 3.167794e+00 2.754668e+00 4.946176e+00 393 3.677230e-08 3.209701e+00 2.800551e+00 4.929340e+00 394 3.687230e-08 3.251393e+00 2.847415e+00 4.911887e+00 395 3.697230e-08 3.291306e+00 2.891436e+00 4.893453e+00 396 3.707230e-08 3.330772e+00 2.936930e+00 4.874034e+00 397 3.717230e-08 3.368754e+00 2.983995e+00 4.851347e+00 398 3.727230e-08 3.406139e+00 3.036878e+00 4.824420e+00 399 3.737230e-08 3.442266e+00 3.086917e+00 4.795654e+00 400 3.747230e-08 3.477697e+00 3.133078e+00 4.767889e+00 401 3.757230e-08 3.512044e+00 3.174917e+00 4.740064e+00 402 3.767230e-08 3.545652e+00 3.216360e+00 4.711565e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 403 3.777230e-08 3.578314e+00 3.255829e+00 4.681749e+00 404 3.787230e-08 3.610213e+00 3.295199e+00 4.650949e+00 405 3.797230e-08 3.641278e+00 3.332759e+00 4.618807e+00 406 3.807230e-08 3.671752e+00 3.370150e+00 4.585635e+00 407 3.817230e-08 3.702497e+00 3.405873e+00 4.551104e+00 408 3.827230e-08 3.734316e+00 3.441387e+00 4.515483e+00 409 3.837230e-08 3.766153e+00 3.475355e+00 4.478479e+00 410 3.847230e-08 3.796236e+00 3.509087e+00 4.440322e+00 411 3.857230e-08 3.824539e+00 3.541382e+00 4.400752e+00 412 3.867230e-08 3.851646e+00 3.573426e+00 4.359967e+00 413 3.877230e-08 3.878040e+00 3.604132e+00 4.318083e+00 414 3.887230e-08 3.903683e+00 3.634579e+00 4.275520e+00 415 3.897230e-08 3.928712e+00 3.663779e+00 4.232096e+00 416 3.907230e-08 3.953026e+00 3.692751e+00 4.187951e+00 417 3.917230e-08 3.976762e+00 3.720775e+00 4.142537e+00 418 3.927230e-08 3.999819e+00 3.749038e+00 4.095366e+00 419 3.937230e-08 4.022334e+00 3.776603e+00 4.046273e+00 420 3.947230e-08 4.044206e+00 3.803802e+00 3.996319e+00 421 3.957230e-08 4.065567e+00 3.829589e+00 3.946016e+00 422 3.967230e-08 4.086322e+00 3.854854e+00 3.895391e+00 423 3.977230e-08 4.106596e+00 3.879052e+00 3.844023e+00 424 3.987230e-08 4.126300e+00 3.902965e+00 3.791903e+00 425 3.997230e-08 4.145552e+00 3.925944e+00 3.738896e+00 426 4.007230e-08 4.164274e+00 3.948656e+00 3.685102e+00 427 4.017230e-08 4.182623e+00 3.970493e+00 3.630417e+00 428 4.027230e-08 4.200607e+00 3.992073e+00 3.574926e+00 429 4.037230e-08 4.218350e+00 4.012831e+00 3.518530e+00 430 4.047230e-08 4.235656e+00 4.033345e+00 3.461303e+00 431 4.057230e-08 4.252486e+00 4.053089e+00 3.403150e+00 432 4.067230e-08 4.268757e+00 4.072599e+00 3.344135e+00 433 4.077230e-08 4.284609e+00 4.091388e+00 3.284232e+00 434 4.087230e-08 4.300020e+00 4.109954e+00 3.224092e+00 435 4.097230e-08 4.315083e+00 4.127846e+00 3.164135e+00 436 4.107230e-08 4.329742e+00 4.145527e+00 3.104482e+00 437 4.117230e-08 4.344075e+00 4.162587e+00 3.045063e+00 438 4.127230e-08 4.358029e+00 4.179477e+00 2.985848e+00 439 4.137230e-08 4.371677e+00 4.195823e+00 2.926688e+00 440 4.147230e-08 4.384970e+00 4.212006e+00 2.867728e+00 441 4.157230e-08 4.397976e+00 4.227621e+00 2.809115e+00 442 4.167230e-08 4.410648e+00 4.243020e+00 2.751056e+00 443 4.177230e-08 4.423050e+00 4.257873e+00 2.693496e+00 444 4.187230e-08 4.435141e+00 4.272543e+00 2.636450e+00 445 4.197230e-08 4.446978e+00 4.286721e+00 2.579840e+00 446 4.207230e-08 4.458523e+00 4.300734e+00 2.523722e+00 447 4.217230e-08 4.469832e+00 4.314290e+00 2.468050e+00 448 4.227230e-08 4.480876e+00 4.327689e+00 2.412879e+00 449 4.237230e-08 4.491711e+00 4.340661e+00 2.358164e+00 450 4.247230e-08 4.502302e+00 4.353486e+00 2.303953e+00 451 4.257230e-08 4.512684e+00 4.365911e+00 2.250201e+00 452 4.267230e-08 4.522817e+00 4.378197e+00 2.196948e+00 453 4.277230e-08 4.532741e+00 4.390110e+00 2.144155e+00 454 4.287230e-08 4.542434e+00 4.401892e+00 2.091940e+00 455 4.297230e-08 4.551939e+00 4.413324e+00 2.040434e+00 456 4.307230e-08 4.561230e+00 4.424633e+00 1.989798e+00 457 4.317230e-08 4.570347e+00 4.435616e+00 1.940038e+00 458 4.327230e-08 4.579264e+00 4.446484e+00 1.891187e+00 459 4.337230e-08 4.588017e+00 4.457051e+00 1.843199e+00 460 4.347230e-08 4.596582e+00 4.467510e+00 1.796101e+00 Index time v(2) v(3) v(4) -------------------------------------------------------------------------------- 461 4.357230e-08 4.604993e+00 4.477687e+00 1.749881e+00 462 4.367230e-08 4.613229e+00 4.487757e+00 1.704596e+00 463 4.377230e-08 4.621320e+00 4.497557e+00 1.660237e+00 464 4.387230e-08 4.629246e+00 4.507255e+00 1.616825e+00 465 4.397230e-08 4.637035e+00 4.516702e+00 1.574325e+00 466 4.407230e-08 4.644670e+00 4.526055e+00 1.532750e+00 467 4.417230e-08 4.652176e+00 4.535173e+00 1.492070e+00 468 4.427230e-08 4.659538e+00 4.544202e+00 1.452297e+00 469 4.437230e-08 4.666779e+00 4.553012e+00 1.413403e+00 470 4.447230e-08 4.673886e+00 4.561737e+00 1.375398e+00 471 4.457230e-08 4.680878e+00 4.570256e+00 1.338253e+00 472 4.467230e-08 4.687743e+00 4.578695e+00 1.301974e+00 473 4.477230e-08 4.694498e+00 4.586940e+00 1.266534e+00 474 4.487230e-08 4.701131e+00 4.595109e+00 1.231941e+00 475 4.497230e-08 4.707662e+00 4.603097e+00 1.198180e+00 476 4.507230e-08 4.714079e+00 4.611012e+00 1.165273e+00 477 4.517230e-08 4.720398e+00 4.618757e+00 1.133208e+00 478 4.527230e-08 4.726610e+00 4.626432e+00 1.101988e+00 479 4.537230e-08 4.732731e+00 4.633948e+00 1.071587e+00 480 4.547230e-08 4.738749e+00 4.641396e+00 1.041999e+00 481 4.557230e-08 4.744681e+00 4.648695e+00 1.013200e+00 482 4.567230e-08 4.750516e+00 4.655930e+00 9.851862e-01 483 4.577230e-08 4.756269e+00 4.663022e+00 9.579351e-01 484 4.587230e-08 4.761930e+00 4.670053e+00 9.314422e-01 485 4.597230e-08 4.767513e+00 4.676949e+00 9.056824e-01 486 4.607230e-08 4.773010e+00 4.683787e+00 8.806470e-01 487 4.617230e-08 4.778432e+00 4.690497e+00 8.563108e-01 488 4.627230e-08 4.783771e+00 4.697151e+00 8.326648e-01 489 4.637230e-08 4.789040e+00 4.703684e+00 8.096851e-01 490 4.647230e-08 4.794230e+00 4.710163e+00 7.873620e-01 491 4.657230e-08 4.799353e+00 4.716528e+00 7.656726e-01 492 4.667230e-08 4.804401e+00 4.722840e+00 7.446066e-01 493 4.677230e-08 4.809385e+00 4.729044e+00 7.241418e-01 494 4.687230e-08 4.814296e+00 4.735196e+00 7.042679e-01 495 4.697230e-08 4.819146e+00 4.741246e+00 6.849645e-01 496 4.700000e-08 4.820309e+00 4.742699e+00 6.796605e-01 mosdriver -- 3 lossy lines txl model -- c load Transient Analysis Sun Feb 07 19:00:58 2010 -------------------------------------------------------------------------------- Index time v(5) v(6) -------------------------------------------------------------------------------- 0 0.000000e+00 1.242558e-09 0.000000e+00 1 2.000000e-12 1.242558e-09 0.000000e+00 2 4.000000e-12 1.242558e-09 0.000000e+00 3 8.000000e-12 1.242558e-09 0.000000e+00 4 1.600000e-11 1.242558e-09 0.000000e+00 5 3.200000e-11 1.242558e-09 0.000000e+00 6 6.400000e-11 1.242560e-09 0.000000e+00 7 1.280000e-10 1.242573e-09 0.000000e+00 8 2.280000e-10 1.242615e-09 0.000000e+00 9 3.280000e-10 1.242601e-09 0.000000e+00 10 4.280000e-10 1.242585e-09 0.000000e+00 11 5.280000e-10 1.242572e-09 0.000000e+00 12 6.280000e-10 1.242558e-09 0.000000e+00 13 7.280000e-10 1.242546e-09 0.000000e+00 14 8.280000e-10 1.242533e-09 0.000000e+00 15 9.280000e-10 1.242522e-09 0.000000e+00 16 1.028000e-09 1.242510e-09 0.000000e+00 17 1.128000e-09 2.249830e-09 0.000000e+00 18 1.228000e-09 3.732011e-09 0.000000e+00 19 1.328000e-09 8.245883e-11 0.000000e+00 20 1.428000e-09 9.939216e-10 0.000000e+00 21 1.528000e-09 1.472417e-10 0.000000e+00 22 1.628000e-09 8.242704e-10 0.000000e+00 23 1.728000e-09 2.667727e-10 0.000000e+00 24 1.828000e-09 6.455068e-10 0.000000e+00 25 1.928000e-09 3.683496e-10 0.000000e+00 26 2.028000e-09 4.954720e-10 0.000000e+00 27 2.128000e-09 5.321980e-10 0.000000e+00 28 2.228000e-09 7.610725e-10 0.000000e+00 29 2.328000e-09 5.840404e-10 0.000000e+00 30 2.428000e-09 1.607054e-10 0.000000e+00 31 2.528000e-09 4.164933e-10 0.000000e+00 32 2.628000e-09 1.005225e-10 0.000000e+00 33 2.728000e-09 4.535245e-10 0.000000e+00 34 2.828000e-09 7.281951e-11 0.000000e+00 35 2.928000e-09 4.756486e-10 0.000000e+00 36 3.028000e-09 6.477825e-11 0.000000e+00 37 3.128000e-09 5.304343e-10 0.000000e+00 38 3.228000e-09 2.733845e-10 0.000000e+00 39 3.328000e-09 6.623541e-10 0.000000e+00 40 3.428000e-09 2.177413e-11 0.000000e+00 41 3.528000e-09 3.827402e-10 0.000000e+00 42 3.628000e-09 -3.19834e-11 0.000000e+00 43 3.728000e-09 3.827615e-10 0.000000e+00 44 3.828000e-09 8.545861e-13 0.000000e+00 45 3.928000e-09 3.845928e-10 0.000000e+00 46 4.028000e-09 3.881923e-11 0.000000e+00 47 4.128000e-09 3.914262e-10 0.000000e+00 48 4.228000e-09 1.041219e-10 0.000000e+00 49 4.328000e-09 4.270767e-10 0.000000e+00 50 4.428000e-09 1.289197e-10 0.000000e+00 51 4.528000e-09 3.797781e-10 0.000000e+00 52 4.628000e-09 1.425974e-10 0.000000e+00 53 4.728000e-09 3.844497e-10 0.000000e+00 54 4.828000e-09 1.901817e-10 0.000000e+00 Index time v(5) v(6) -------------------------------------------------------------------------------- 55 4.928000e-09 3.987883e-10 0.000000e+00 56 5.028000e-09 2.376020e-10 0.000000e+00 57 5.128000e-09 4.168316e-10 0.000000e+00 58 5.228000e-09 2.940001e-10 0.000000e+00 59 5.328000e-09 4.529616e-10 0.000000e+00 60 5.428000e-09 3.400793e-10 0.000000e+00 61 5.528000e-09 4.474202e-10 0.000000e+00 62 5.628000e-09 3.578912e-10 0.000000e+00 63 5.728000e-09 4.588383e-10 0.000000e+00 64 5.828000e-09 3.995872e-10 0.000000e+00 65 5.928000e-09 4.829197e-10 0.000000e+00 66 6.028000e-09 4.417896e-10 0.000000e+00 67 6.128000e-09 5.082584e-10 0.000000e+00 68 6.228000e-09 4.835323e-10 0.000000e+00 69 6.328000e-09 5.367709e-10 0.000000e+00 70 6.428000e-09 5.240673e-10 0.000000e+00 71 6.528000e-09 5.603457e-10 0.000000e+00 72 6.628000e-09 5.564994e-10 0.000000e+00 73 6.728000e-09 5.837660e-10 0.000000e+00 74 6.828000e-09 5.916242e-10 0.000000e+00 75 6.928000e-09 6.106816e-10 0.000000e+00 76 7.028000e-09 6.263440e-10 0.000000e+00 77 7.128000e-09 6.376103e-10 0.000000e+00 78 7.228000e-09 6.598589e-10 0.000000e+00 79 7.328000e-09 6.652342e-10 0.000000e+00 80 7.428000e-09 6.924907e-10 0.000000e+00 81 7.528000e-09 6.905901e-10 0.000000e+00 82 7.628000e-09 7.200820e-10 0.000000e+00 83 7.728000e-09 7.136485e-10 0.000000e+00 84 7.828000e-09 7.475128e-10 0.000000e+00 85 7.928000e-09 7.355153e-10 0.000000e+00 86 8.028000e-09 7.766546e-10 0.000000e+00 87 8.128000e-09 7.600012e-10 0.000000e+00 88 8.228000e-09 8.021805e-10 0.000000e+00 89 8.328000e-09 7.837121e-10 0.000000e+00 90 8.428000e-09 8.265170e-10 0.000000e+00 91 8.528000e-09 8.063706e-10 0.000000e+00 92 8.628000e-09 8.490337e-10 0.000000e+00 93 8.728000e-09 8.276174e-10 0.000000e+00 94 8.828000e-09 8.692260e-10 0.000000e+00 95 8.928000e-09 8.504125e-10 0.000000e+00 96 9.028000e-09 8.891721e-10 0.000000e+00 97 9.128000e-09 8.696284e-10 0.000000e+00 98 9.228000e-09 9.086561e-10 0.000000e+00 99 9.328000e-09 8.882867e-10 0.000000e+00 100 9.428000e-09 9.270634e-10 0.000000e+00 101 9.528000e-09 9.060216e-10 0.000000e+00 102 9.628000e-09 9.441623e-10 0.000000e+00 103 9.728000e-09 9.225885e-10 0.000000e+00 104 9.828000e-09 9.600273e-10 0.000000e+00 105 9.928000e-09 9.383511e-10 0.000000e+00 106 1.002800e-08 9.752307e-10 0.000000e+00 107 1.012800e-08 9.534474e-10 0.000000e+00 108 1.022800e-08 9.894080e-10 0.000000e+00 109 1.032800e-08 9.677010e-10 0.000000e+00 110 1.042800e-08 1.002697e-09 0.000000e+00 111 1.052800e-08 9.811582e-10 0.000000e+00 112 1.062800e-08 1.015101e-09 0.000000e+00 Index time v(5) v(6) -------------------------------------------------------------------------------- 113 1.072800e-08 9.937999e-10 0.000000e+00 114 1.082800e-08 1.026611e-09 0.000000e+00 115 1.092800e-08 1.005703e-09 0.000000e+00 116 1.102800e-08 1.037520e-09 0.000000e+00 117 1.112800e-08 1.016944e-09 0.000000e+00 118 1.122800e-08 1.047606e-09 0.000000e+00 119 1.132800e-08 1.027500e-09 0.000000e+00 120 1.142800e-08 1.057046e-09 0.000000e+00 121 1.152800e-08 1.037434e-09 0.000000e+00 122 1.162800e-08 1.065845e-09 0.000000e+00 123 1.172800e-08 1.046748e-09 0.000000e+00 124 1.182800e-08 1.074025e-09 0.000000e+00 125 1.192800e-08 1.055483e-09 0.000000e+00 126 1.202800e-08 1.081671e-09 0.000000e+00 127 1.212800e-08 1.063717e-09 0.000000e+00 128 1.222800e-08 1.088809e-09 0.000000e+00 129 1.232800e-08 1.071442e-09 0.000000e+00 130 1.242800e-08 1.095467e-09 0.000000e+00 131 1.252800e-08 1.078699e-09 0.000000e+00 132 1.262800e-08 1.101681e-09 0.000000e+00 133 1.272800e-08 1.085514e-09 0.000000e+00 134 1.282800e-08 1.107477e-09 0.000000e+00 135 1.292800e-08 1.091913e-09 0.000000e+00 136 1.302800e-08 1.112896e-09 0.000000e+00 137 1.312800e-08 1.097941e-09 0.000000e+00 138 1.322800e-08 1.117967e-09 0.000000e+00 139 1.332800e-08 1.103607e-09 0.000000e+00 140 1.342800e-08 1.122711e-09 0.000000e+00 141 1.352800e-08 1.108944e-09 0.000000e+00 142 1.362800e-08 1.127160e-09 0.000000e+00 143 1.372800e-08 1.113974e-09 0.000000e+00 144 1.382800e-08 1.131333e-09 0.000000e+00 145 1.392800e-08 1.118719e-09 0.000000e+00 146 1.402800e-08 1.135255e-09 0.000000e+00 147 1.412800e-08 1.123203e-09 0.000000e+00 148 1.422800e-08 1.138951e-09 0.000000e+00 149 1.432800e-08 1.127447e-09 0.000000e+00 150 1.442800e-08 1.142437e-09 0.000000e+00 151 1.452800e-08 1.131467e-09 0.000000e+00 152 1.462800e-08 1.145733e-09 0.000000e+00 153 1.472800e-08 1.135282e-09 0.000000e+00 154 1.482800e-08 1.148855e-09 0.000000e+00 155 1.492800e-08 1.138909e-09 0.000000e+00 156 1.502800e-08 1.151818e-09 0.000000e+00 157 1.512800e-08 1.142362e-09 0.000000e+00 158 1.522800e-08 1.154640e-09 0.000000e+00 159 1.532800e-08 1.145657e-09 0.000000e+00 160 1.542800e-08 1.157331e-09 0.000000e+00 161 1.552800e-08 1.148806e-09 0.000000e+00 162 1.562800e-08 1.159904e-09 0.000000e+00 163 1.572800e-08 1.151822e-09 0.000000e+00 164 1.582800e-08 1.162372e-09 0.000000e+00 165 1.590000e-08 1.150272e-09 0.000000e+00 166 1.590621e-08 1.156274e-09 -1.84764e-12 167 1.591862e-08 1.159634e-09 -6.07201e-12 168 1.594345e-08 1.162682e-09 -1.48638e-11 169 1.599311e-08 1.163660e-09 -3.28249e-11 170 1.609242e-08 1.157357e-09 -7.07355e-11 Index time v(5) v(6) -------------------------------------------------------------------------------- 171 1.610000e-08 1.158914e-09 -7.39669e-11 172 1.610492e-08 1.156347e-09 -7.29254e-11 173 1.611477e-08 1.157009e-09 -7.30697e-11 174 1.613386e-08 1.160954e-09 -7.43320e-11 175 1.617205e-08 1.164229e-09 -7.58201e-11 176 1.623935e-08 1.157066e-09 -7.92145e-11 177 1.633935e-08 1.163685e-09 -8.34553e-11 178 1.643935e-08 1.160299e-09 -8.80928e-11 179 1.653935e-08 1.165982e-09 -9.21047e-11 180 1.663935e-08 1.163299e-09 -9.64614e-11 181 1.673935e-08 1.168198e-09 -1.00247e-10 182 1.683935e-08 1.166141e-09 -1.04355e-10 183 1.693935e-08 -9.75340e-09 5.634229e-02 184 1.703935e-08 1.729773e-09 2.474978e+00 185 1.713935e-08 -3.68152e-09 4.983509e+00 186 1.723935e-08 -1.29895e-08 5.127177e+00 187 1.733935e-08 -8.31155e-09 5.232606e+00 188 1.743935e-08 -1.10917e-08 5.336078e+00 189 1.753935e-08 -6.75164e-09 5.429987e+00 190 1.763935e-08 -7.25838e-09 5.523228e+00 191 1.773935e-08 -3.49374e-09 5.607924e+00 192 1.783935e-08 -3.97121e-09 5.692274e+00 193 1.793935e-08 -8.96729e-10 5.768988e+00 194 1.803935e-08 -3.36542e-06 5.845604e+00 195 1.813935e-08 3.090634e-03 5.915376e+00 196 1.823935e-08 7.815423e-03 5.985237e+00 197 1.833935e-08 1.159793e-02 6.048950e+00 198 1.843935e-08 1.733686e-02 6.112892e+00 199 1.853935e-08 2.335953e-02 6.171295e+00 200 1.863935e-08 3.106628e-02 6.230029e+00 201 1.873935e-08 3.914611e-02 6.283764e+00 202 1.883935e-08 4.881836e-02 6.337901e+00 203 1.893935e-08 5.897282e-02 6.382266e+00 204 1.903935e-08 7.062454e-02 6.200083e+00 205 1.913935e-08 8.287233e-02 5.716003e+00 206 1.923935e-08 9.647455e-02 5.337090e+00 207 1.933935e-08 1.108425e-01 5.211663e+00 208 1.943935e-08 1.265074e-01 5.171740e+00 209 1.953935e-08 1.429763e-01 5.133100e+00 210 1.963935e-08 1.607195e-01 5.096968e+00 211 1.973935e-08 1.793968e-01 5.060234e+00 212 1.983935e-08 1.992513e-01 5.025774e+00 213 1.993935e-08 2.201472e-01 4.990749e+00 214 2.003935e-08 2.434092e-01 4.957829e+00 215 2.013935e-08 2.761209e-01 4.924380e+00 216 2.023935e-08 3.204963e-01 4.892884e+00 217 2.033935e-08 3.645794e-01 4.860897e+00 218 2.043935e-08 4.041342e-01 4.830722e+00 219 2.053935e-08 4.437257e-01 4.800093e+00 220 2.063935e-08 4.852529e-01 4.771148e+00 221 2.073935e-08 5.291027e-01 4.741785e+00 222 2.083935e-08 5.749263e-01 4.713989e+00 223 2.093935e-08 6.232421e-01 4.686299e+00 224 2.103935e-08 6.736183e-01 4.681861e+00 225 2.113935e-08 7.265146e-01 4.732630e+00 226 2.123935e-08 7.805357e-01 4.821241e+00 227 2.133935e-08 8.359776e-01 4.888816e+00 228 2.143935e-08 8.919003e-01 4.919752e+00 Index time v(5) v(6) -------------------------------------------------------------------------------- 229 2.153935e-08 9.491666e-01 4.932364e+00 230 2.163935e-08 1.006818e+00 4.942799e+00 231 2.173935e-08 1.065742e+00 4.952598e+00 232 2.183935e-08 1.124998e+00 4.963243e+00 233 2.193935e-08 1.185439e+00 4.973381e+00 234 2.203935e-08 1.246359e+00 4.984293e+00 235 2.213935e-08 1.309759e+00 4.994723e+00 236 2.223935e-08 1.376596e+00 5.005858e+00 237 2.233935e-08 1.446810e+00 5.016535e+00 238 2.243935e-08 1.516842e+00 5.027853e+00 239 2.253935e-08 1.586400e+00 5.038737e+00 240 2.263935e-08 1.655837e+00 5.050205e+00 241 2.273935e-08 1.726183e+00 5.061259e+00 242 2.283935e-08 1.796499e+00 5.072845e+00 243 2.293935e-08 1.866991e+00 5.083992e+00 244 2.303935e-08 1.937111e+00 5.093531e+00 245 2.313935e-08 2.007264e+00 5.094850e+00 246 2.323935e-08 2.076898e+00 5.085493e+00 247 2.333935e-08 2.146246e+00 5.070559e+00 248 2.343935e-08 2.214810e+00 5.059568e+00 249 2.353935e-08 2.282860e+00 5.054219e+00 250 2.363935e-08 2.350044e+00 5.052511e+00 251 2.373935e-08 2.416600e+00 5.051273e+00 252 2.383935e-08 2.482247e+00 5.050325e+00 253 2.393935e-08 2.547177e+00 5.048928e+00 254 2.403935e-08 2.611179e+00 5.047686e+00 255 2.413935e-08 2.674501e+00 5.046023e+00 256 2.423935e-08 2.737213e+00 5.044502e+00 257 2.433935e-08 2.799574e+00 5.042591e+00 258 2.443935e-08 2.861242e+00 5.040811e+00 259 2.453935e-08 2.921926e+00 5.038668e+00 260 2.463935e-08 2.981430e+00 5.036646e+00 261 2.473935e-08 3.039896e+00 5.034288e+00 262 2.483935e-08 3.097335e+00 5.032041e+00 263 2.493935e-08 3.153739e+00 5.029486e+00 264 2.503935e-08 3.209058e+00 5.027235e+00 265 2.513935e-08 3.263280e+00 5.025680e+00 266 2.523935e-08 3.316409e+00 5.026302e+00 267 2.533935e-08 3.368411e+00 5.028863e+00 268 2.543935e-08 3.419303e+00 5.032422e+00 269 2.553935e-08 3.469039e+00 5.035208e+00 270 2.563935e-08 3.517667e+00 5.037159e+00 271 2.573935e-08 3.565141e+00 5.038361e+00 272 2.583935e-08 3.611528e+00 5.039543e+00 273 2.593935e-08 3.656774e+00 5.040597e+00 274 2.603935e-08 3.700962e+00 5.041846e+00 275 2.613935e-08 3.744034e+00 5.043023e+00 276 2.623935e-08 3.786103e+00 5.044387e+00 277 2.633935e-08 3.827122e+00 5.045686e+00 278 2.643935e-08 3.867201e+00 5.047161e+00 279 2.653935e-08 3.906236e+00 5.048577e+00 280 2.663935e-08 3.944302e+00 5.050158e+00 281 2.673935e-08 3.981310e+00 5.051685e+00 282 2.683935e-08 4.017383e+00 5.053367e+00 283 2.693935e-08 4.052445e+00 5.055001e+00 284 2.703935e-08 4.086612e+00 5.056759e+00 285 2.713935e-08 4.119801e+00 5.058358e+00 286 2.723935e-08 4.152131e+00 5.059770e+00 Index time v(5) v(6) -------------------------------------------------------------------------------- 287 2.733935e-08 4.183518e+00 5.060638e+00 288 2.743935e-08 4.214084e+00 5.061173e+00 289 2.753935e-08 4.243744e+00 5.061478e+00 290 2.763935e-08 4.272619e+00 5.061950e+00 291 2.773935e-08 4.300628e+00 5.062508e+00 292 2.783935e-08 4.327891e+00 5.063232e+00 293 2.793935e-08 4.354330e+00 5.063910e+00 294 2.803935e-08 4.380061e+00 5.064637e+00 295 2.813935e-08 4.405009e+00 5.065272e+00 296 2.823935e-08 4.429290e+00 5.065936e+00 297 2.833935e-08 4.452830e+00 5.066511e+00 298 2.843935e-08 4.475745e+00 5.067110e+00 299 2.853935e-08 4.497960e+00 5.067624e+00 300 2.863935e-08 4.519583e+00 5.068157e+00 301 2.873935e-08 4.540539e+00 5.068609e+00 302 2.883935e-08 4.560934e+00 5.069075e+00 303 2.893935e-08 4.580700e+00 5.069464e+00 304 2.903935e-08 4.599939e+00 5.069866e+00 305 2.913935e-08 4.618586e+00 5.070206e+00 306 2.923935e-08 4.636738e+00 5.070600e+00 307 2.933935e-08 4.654333e+00 5.071014e+00 308 2.943935e-08 4.671463e+00 5.071553e+00 309 2.953935e-08 4.688069e+00 5.072124e+00 310 2.963935e-08 4.704240e+00 5.072749e+00 311 2.973935e-08 4.719920e+00 5.073314e+00 312 2.983935e-08 4.735192e+00 5.073875e+00 313 2.993935e-08 4.750003e+00 5.074377e+00 314 3.003935e-08 4.764433e+00 5.074895e+00 315 3.013935e-08 4.778432e+00 5.075378e+00 316 3.023935e-08 4.792075e+00 5.075885e+00 317 3.033935e-08 4.805314e+00 5.076364e+00 318 3.043935e-08 4.818221e+00 5.076867e+00 319 3.053935e-08 4.830751e+00 5.077344e+00 320 3.063935e-08 4.842971e+00 5.077843e+00 321 3.073935e-08 4.854838e+00 5.078318e+00 322 3.083935e-08 4.866417e+00 5.078815e+00 323 3.093935e-08 4.877664e+00 5.079290e+00 324 3.103935e-08 4.888642e+00 5.079786e+00 325 3.113935e-08 4.899312e+00 5.080260e+00 326 3.123935e-08 4.909730e+00 5.080747e+00 327 3.133935e-08 4.919860e+00 5.081202e+00 328 3.143935e-08 4.929756e+00 5.081651e+00 329 3.153935e-08 4.939382e+00 5.082055e+00 330 3.163935e-08 4.948790e+00 5.082452e+00 331 3.173935e-08 4.957947e+00 5.082821e+00 332 3.183935e-08 4.966900e+00 5.083199e+00 333 3.190000e-08 4.972036e+00 5.083195e+00 334 3.191000e-08 4.972830e+00 5.083168e+00 335 3.193000e-08 4.974588e+00 5.083240e+00 336 3.197000e-08 4.978058e+00 5.083435e+00 337 3.203371e-08 4.983461e+00 5.083742e+00 338 3.209348e-08 4.988455e+00 5.083972e+00 339 3.210000e-08 4.988949e+00 5.083937e+00 340 3.210125e-08 4.989051e+00 5.083935e+00 341 3.210375e-08 4.989257e+00 5.083938e+00 342 3.210875e-08 4.989657e+00 5.083961e+00 343 3.211876e-08 4.990472e+00 5.084001e+00 344 3.213525e-08 4.991844e+00 5.084070e+00 Index time v(5) v(6) -------------------------------------------------------------------------------- 345 3.216415e-08 4.994228e+00 5.084193e+00 346 3.222196e-08 4.998929e+00 5.084470e+00 347 3.232196e-08 5.007055e+00 5.085056e+00 348 3.242196e-08 5.014846e+00 5.085391e+00 349 3.252196e-08 5.022436e+00 5.085700e+00 350 3.262196e-08 5.029877e+00 5.086014e+00 351 3.272196e-08 5.037133e+00 5.086306e+00 352 3.282196e-08 5.044249e+00 5.086600e+00 353 3.292196e-08 5.051191e+00 5.086954e+00 354 3.302196e-08 5.057979e+00 3.050621e+00 355 3.312196e-08 5.064636e+00 4.786518e-01 356 3.317320e-08 5.067778e+00 2.414706e-02 357 3.323667e-08 5.071910e+00 -6.29462e-02 358 3.330065e-08 5.076031e+00 -1.21422e-01 359 3.337230e-08 5.080569e+00 -2.04259e-01 360 3.347230e-08 5.086950e+00 -2.93358e-01 361 3.357230e-08 5.092973e+00 -3.96579e-01 362 3.367230e-08 5.098921e+00 -4.77050e-01 363 3.377230e-08 5.104703e+00 -5.70413e-01 364 3.387230e-08 5.110413e+00 -6.43052e-01 365 3.397230e-08 5.115988e+00 -7.27788e-01 366 3.407230e-08 5.121956e+00 -7.93657e-01 367 3.417230e-08 5.129772e+00 -8.70878e-01 368 3.427230e-08 5.136657e+00 -9.30862e-01 369 3.437230e-08 5.142863e+00 -1.00194e+00 370 3.447230e-08 5.149143e+00 -1.05716e+00 371 3.457230e-08 5.155198e+00 -1.12199e+00 372 3.467230e-08 5.160975e+00 -1.17242e+00 373 3.477230e-08 5.166249e+00 -1.23210e+00 374 3.487230e-08 5.171134e+00 -1.27860e+00 375 3.497230e-08 5.175525e+00 -1.29105e+00 376 3.507230e-08 5.179508e+00 -9.91833e-01 377 3.517230e-08 5.182997e+00 -4.72230e-01 378 3.527230e-08 5.186061e+00 -1.81697e-01 379 3.537230e-08 5.188651e+00 -1.18167e-01 380 3.547230e-08 5.190838e+00 -7.58924e-02 381 3.557230e-08 5.192534e+00 -4.22508e-02 382 3.567230e-08 5.193795e+00 -1.21837e-03 383 3.577230e-08 5.194563e+00 3.085452e-02 384 3.587230e-08 5.194904e+00 6.986891e-02 385 3.597230e-08 5.194722e+00 1.005688e-01 386 3.607230e-08 5.193422e+00 1.377039e-01 387 3.617230e-08 5.187684e+00 1.671380e-01 388 3.627230e-08 5.177357e+00 2.025364e-01 389 3.637230e-08 5.167820e+00 2.308391e-01 390 3.647230e-08 5.159817e+00 2.647133e-01 391 3.657230e-08 5.151595e+00 2.919478e-01 392 3.667230e-08 5.142551e+00 3.242611e-01 393 3.677230e-08 5.132559e+00 3.504257e-01 394 3.687230e-08 5.121726e+00 3.813268e-01 395 3.697230e-08 5.109918e+00 4.025578e-01 396 3.707230e-08 5.097284e+00 3.950689e-01 397 3.717230e-08 5.083658e+00 3.227423e-01 398 3.727230e-08 5.069211e+00 2.353806e-01 399 3.737230e-08 5.053760e+00 1.785891e-01 400 3.747230e-08 5.037501e+00 1.596139e-01 401 3.757230e-08 5.020243e+00 1.468821e-01 402 3.767230e-08 5.002172e+00 1.388173e-01 Index time v(5) v(6) -------------------------------------------------------------------------------- 403 3.777230e-08 4.983098e+00 1.268106e-01 404 3.787230e-08 4.963203e+00 1.182474e-01 405 3.797230e-08 4.942299e+00 1.060576e-01 406 3.807230e-08 4.920393e+00 9.707057e-02 407 3.817230e-08 4.896388e+00 8.473499e-02 408 3.827230e-08 4.869297e+00 7.537882e-02 409 3.837230e-08 4.839755e+00 6.292668e-02 410 3.847230e-08 4.809765e+00 5.323713e-02 411 3.857230e-08 4.779590e+00 4.068732e-02 412 3.867230e-08 4.748751e+00 3.072038e-02 413 3.877230e-08 4.716729e+00 1.812357e-02 414 3.887230e-08 4.683545e+00 7.929253e-03 415 3.897230e-08 4.649075e+00 -4.32694e-03 416 3.907230e-08 4.613397e+00 -1.07815e-02 417 3.917230e-08 4.576402e+00 -9.73515e-03 418 3.927230e-08 4.538147e+00 3.910746e-03 419 3.937230e-08 4.498534e+00 1.756723e-02 420 3.947230e-08 4.457600e+00 2.760666e-02 421 3.957230e-08 4.415259e+00 3.022306e-02 422 3.967230e-08 4.371535e+00 3.244244e-02 423 3.977230e-08 4.326564e+00 3.259090e-02 424 3.987230e-08 4.280651e+00 3.453639e-02 425 3.997230e-08 4.233847e+00 3.499973e-02 426 4.007230e-08 4.186194e+00 3.716134e-02 427 4.017230e-08 4.137524e+00 3.794978e-02 428 4.027230e-08 4.087556e+00 4.031235e-02 429 4.037230e-08 4.036103e+00 4.140321e-02 430 4.047230e-08 3.983524e+00 4.395458e-02 431 4.057230e-08 3.930264e+00 4.532939e-02 432 4.067230e-08 3.876477e+00 4.805756e-02 433 4.077230e-08 3.822029e+00 4.969358e-02 434 4.087230e-08 3.766829e+00 5.258255e-02 435 4.097230e-08 3.710835e+00 5.442543e-02 436 4.107230e-08 3.654060e+00 5.705299e-02 437 4.117230e-08 3.596498e+00 5.738594e-02 438 4.127230e-08 3.538163e+00 5.647028e-02 439 4.137230e-08 3.479050e+00 5.273817e-02 440 4.147230e-08 3.419165e+00 4.964790e-02 441 4.157230e-08 3.358503e+00 4.658621e-02 442 4.167230e-08 3.297067e+00 4.530259e-02 443 4.177230e-08 3.234868e+00 4.362243e-02 444 4.187230e-08 3.172243e+00 4.279866e-02 445 4.197230e-08 3.109675e+00 4.117161e-02 446 4.207230e-08 3.047382e+00 4.021100e-02 447 4.217230e-08 2.985414e+00 3.848481e-02 448 4.227230e-08 2.923780e+00 3.737292e-02 449 4.237230e-08 2.862470e+00 3.554960e-02 450 4.247230e-08 2.801523e+00 3.429351e-02 451 4.257230e-08 2.741041e+00 3.237604e-02 452 4.267230e-08 2.681136e+00 3.098231e-02 453 4.277230e-08 2.621863e+00 2.897421e-02 454 4.287230e-08 2.563236e+00 2.745027e-02 455 4.297230e-08 2.505264e+00 2.535896e-02 456 4.307230e-08 2.447962e+00 2.375420e-02 457 4.317230e-08 2.391355e+00 2.179310e-02 458 4.327230e-08 2.335461e+00 2.064375e-02 459 4.337230e-08 2.280302e+00 1.953065e-02 460 4.347230e-08 2.225891e+00 1.919215e-02 Index time v(5) v(6) -------------------------------------------------------------------------------- 461 4.357230e-08 2.172247e+00 1.849345e-02 462 4.367230e-08 2.119379e+00 1.804681e-02 463 4.377230e-08 2.067301e+00 1.706648e-02 464 4.387230e-08 2.016040e+00 1.638381e-02 465 4.397230e-08 1.965659e+00 1.534227e-02 466 4.407230e-08 1.916218e+00 1.466319e-02 467 4.417230e-08 1.867754e+00 1.368442e-02 468 4.427230e-08 1.820271e+00 1.305088e-02 469 4.437230e-08 1.773772e+00 1.214318e-02 470 4.447230e-08 1.728249e+00 1.155815e-02 471 4.457230e-08 1.683707e+00 1.072176e-02 472 4.467230e-08 1.640149e+00 1.018707e-02 473 4.477230e-08 1.597584e+00 9.422020e-03 474 4.487230e-08 1.556004e+00 8.939031e-03 475 4.497230e-08 1.515405e+00 8.244698e-03 476 4.507230e-08 1.475771e+00 7.810089e-03 477 4.517230e-08 1.437097e+00 7.161190e-03 478 4.527230e-08 1.399365e+00 6.699068e-03 479 4.537230e-08 1.362570e+00 5.954390e-03 480 4.547230e-08 1.326694e+00 5.319757e-03 481 4.557230e-08 1.291729e+00 4.436533e-03 482 4.567230e-08 1.257656e+00 3.737263e-03 483 4.577230e-08 1.224464e+00 2.892438e-03 484 4.587230e-08 1.192136e+00 2.254146e-03 485 4.597230e-08 1.160663e+00 1.471753e-03 486 4.607230e-08 1.130029e+00 8.575954e-04 487 4.617230e-08 1.100229e+00 9.351648e-05 488 4.627230e-08 1.071244e+00 -5.21764e-04 489 4.637230e-08 1.043061e+00 -1.27824e-03 490 4.647230e-08 1.015658e+00 -1.89761e-03 491 4.657230e-08 9.890217e-01 -2.64832e-03 492 4.667230e-08 9.631291e-01 -3.27243e-03 493 4.677230e-08 9.379683e-01 -4.01872e-03 494 4.687230e-08 9.135169e-01 -4.64816e-03 495 4.697230e-08 8.897618e-01 -5.39124e-03 496 4.700000e-08 8.831034e-01 -5.53139e-03 ngspice-26/tests/mes/0000755000265600020320000000000012264261714014155 5ustar andreasadminngspice-26/tests/mes/subth.out0000644000265600020320000000455212264261473016043 0ustar andreasadmin No. of Data Rows : 61 Circuit: Mesfet level 1 subthreshold characteristics Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Mesfet level 1 subthreshold characteristics -------------------------------------------------------------------------------- Index v-sweep vids#branch -------------------------------------------------------------------------------- 0 -3.000000e+00 3.114000e-12 1 -2.950000e+00 3.064000e-12 2 -2.900000e+00 3.014000e-12 3 -2.850000e+00 2.964000e-12 4 -2.800000e+00 2.914001e-12 5 -2.750000e+00 2.864000e-12 6 -2.700000e+00 2.814000e-12 7 -2.650000e+00 2.764000e-12 8 -2.600000e+00 2.714000e-12 9 -2.550000e+00 2.664000e-12 10 -2.500000e+00 2.614001e-12 11 -2.450000e+00 2.564000e-12 12 -2.400000e+00 2.514000e-12 13 -2.350000e+00 2.464000e-12 14 -2.300000e+00 2.414000e-12 15 -2.250000e+00 2.364000e-12 16 -2.200000e+00 2.314000e-12 17 -2.150000e+00 2.264000e-12 18 -2.100000e+00 2.214000e-12 19 -2.050000e+00 2.164000e-12 20 -2.000000e+00 2.114000e-12 21 -1.950000e+00 2.064000e-12 22 -1.900000e+00 2.014000e-12 23 -1.850000e+00 1.964000e-12 24 -1.800000e+00 1.914000e-12 25 -1.750000e+00 1.864001e-12 26 -1.700000e+00 1.814000e-12 27 -1.650000e+00 1.764000e-12 28 -1.600000e+00 1.714000e-12 29 -1.550000e+00 1.664000e-12 30 -1.500000e+00 1.614000e-12 31 -1.450000e+00 1.564000e-12 32 -1.400000e+00 1.514000e-12 33 -1.350000e+00 1.464000e-12 34 -1.300000e+00 1.414000e-12 35 -1.250000e+00 1.308946e-06 36 -1.200000e+00 5.139480e-06 37 -1.150000e+00 1.133848e-05 38 -1.100000e+00 1.974383e-05 39 -1.050000e+00 3.018749e-05 40 -1.000000e+00 4.249832e-05 41 -9.500000e-01 5.650452e-05 42 -9.000000e-01 7.203585e-05 43 -8.500000e-01 8.892547e-05 44 -8.000000e-01 1.070115e-04 45 -7.500000e-01 1.261384e-04 46 -7.000000e-01 1.461577e-04 47 -6.500000e-01 1.669292e-04 48 -6.000000e-01 1.883212e-04 49 -5.500000e-01 2.102107e-04 50 -5.000000e-01 2.324840e-04 51 -4.500000e-01 2.550366e-04 52 -4.000000e-01 2.777728e-04 53 -3.500000e-01 3.006058e-04 54 -3.000000e-01 3.234572e-04 Index v-sweep vids#branch -------------------------------------------------------------------------------- 55 -2.500000e-01 3.462568e-04 56 -2.000000e-01 3.689422e-04 57 -1.500000e-01 3.914582e-04 58 -1.000000e-01 4.137564e-04 59 -5.000000e-02 4.357948e-04 60 -2.289835e-15 4.575371e-04 ngspice-26/tests/mes/Makefile.am0000644000265600020320000000037512264261473016220 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = subth.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/mes/subth.cir0000644000265600020320000000040312264261473016000 0ustar andreasadminMesfet level 1 subthreshold characteristics Vds 1 0 dc 0.1 vids 1 2 dc 0 Vgs 3 0 dc 0 z1 2 3 0 mesmod area=1.4 .model mesmod nmf level=1 rd=46 rs=46 vt0=-1.3 + lambda=0.03 alpha=3 beta=1.4e-3 .options noacct .dc vgs -3 0 0.05 .print DC vids#branch .end ngspice-26/tests/mes/Makefile.in0000644000265600020320000003350512264261542016227 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/mes DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = subth.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/mes/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/mes/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/vbic/0000755000265600020320000000000012264261715014315 5ustar andreasadminngspice-26/tests/vbic/FO.out0000644000265600020320000013412112264261473015355 0ustar andreasadmin No. of Data Rows : 707 Circuit: VBIC Output Test Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 VBIC Output Test -------------------------------------------------------------------------------- Index v-sweep -i(vc) -------------------------------------------------------------------------------- 0 0.000000e+00 -9.59413e-06 1 5.000000e-02 3.223394e-05 2 1.000000e-01 4.087358e-05 3 1.500000e-01 4.247839e-05 4 2.000000e-01 4.292372e-05 5 2.500000e-01 4.317855e-05 6 3.000000e-01 4.339787e-05 7 3.500000e-01 4.360545e-05 8 4.000000e-01 4.380588e-05 9 4.500000e-01 4.400068e-05 10 5.000000e-01 4.419072e-05 11 5.500000e-01 4.437666e-05 12 6.000000e-01 4.455900e-05 13 6.500000e-01 4.473817e-05 14 7.000000e-01 4.491451e-05 15 7.500000e-01 4.508833e-05 16 8.000000e-01 4.525988e-05 17 8.500000e-01 4.542936e-05 18 9.000000e-01 4.559698e-05 19 9.500000e-01 4.576289e-05 20 1.000000e+00 4.592724e-05 21 1.050000e+00 4.609017e-05 22 1.100000e+00 4.625180e-05 23 1.150000e+00 4.641224e-05 24 1.200000e+00 4.657158e-05 25 1.250000e+00 4.672992e-05 26 1.300000e+00 4.688735e-05 27 1.350000e+00 4.704395e-05 28 1.400000e+00 4.719980e-05 29 1.450000e+00 4.735498e-05 30 1.500000e+00 4.750956e-05 31 1.550000e+00 4.766361e-05 32 1.600000e+00 4.781721e-05 33 1.650000e+00 4.797042e-05 34 1.700000e+00 4.812332e-05 35 1.750000e+00 4.827598e-05 36 1.800000e+00 4.842847e-05 37 1.850000e+00 4.858086e-05 38 1.900000e+00 4.873323e-05 39 1.950000e+00 4.888565e-05 40 2.000000e+00 4.903819e-05 41 2.050000e+00 4.919094e-05 42 2.100000e+00 4.934396e-05 43 2.150000e+00 4.949734e-05 44 2.200000e+00 4.965117e-05 45 2.250000e+00 4.980551e-05 46 2.300000e+00 4.996046e-05 47 2.350000e+00 5.011610e-05 48 2.400000e+00 5.027252e-05 49 2.450000e+00 5.042981e-05 50 2.500000e+00 5.058805e-05 51 2.550000e+00 5.074734e-05 52 2.600000e+00 5.090776e-05 53 2.650000e+00 5.106943e-05 54 2.700000e+00 5.123242e-05 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 55 2.750000e+00 5.139683e-05 56 2.800000e+00 5.156277e-05 57 2.850000e+00 5.173034e-05 58 2.900000e+00 5.189962e-05 59 2.950000e+00 5.207074e-05 60 3.000000e+00 5.224377e-05 61 3.050000e+00 5.241884e-05 62 3.100000e+00 5.259604e-05 63 3.150000e+00 5.277549e-05 64 3.200000e+00 5.295727e-05 65 3.250000e+00 5.314152e-05 66 3.300000e+00 5.332832e-05 67 3.350000e+00 5.351779e-05 68 3.400000e+00 5.371004e-05 69 3.450000e+00 5.390518e-05 70 3.500000e+00 5.410332e-05 71 3.550000e+00 5.430458e-05 72 3.600000e+00 5.450905e-05 73 3.650000e+00 5.471686e-05 74 3.700000e+00 5.492812e-05 75 3.750000e+00 5.514294e-05 76 3.800000e+00 5.536144e-05 77 3.850000e+00 5.558373e-05 78 3.900000e+00 5.580992e-05 79 3.950000e+00 5.604014e-05 80 4.000000e+00 5.627450e-05 81 4.050000e+00 5.651311e-05 82 4.100000e+00 5.675609e-05 83 4.150000e+00 5.700356e-05 84 4.200000e+00 5.725564e-05 85 4.250000e+00 5.751244e-05 86 4.300000e+00 5.777409e-05 87 4.350000e+00 5.804071e-05 88 4.400000e+00 5.831240e-05 89 4.450000e+00 5.858930e-05 90 4.500000e+00 5.887153e-05 91 4.550000e+00 5.915920e-05 92 4.600000e+00 5.945244e-05 93 4.650000e+00 5.975138e-05 94 4.700000e+00 6.005612e-05 95 4.750000e+00 6.036680e-05 96 4.800000e+00 6.068355e-05 97 4.850000e+00 6.100648e-05 98 4.900000e+00 6.133572e-05 99 4.950000e+00 6.167140e-05 100 5.000000e+00 6.201365e-05 101 0.000000e+00 -4.83286e-05 102 5.000000e-02 1.575417e-04 103 1.000000e-01 2.341276e-04 104 1.500000e-01 2.549434e-04 105 2.000000e-01 2.599039e-04 106 2.500000e-01 2.617231e-04 107 3.000000e-01 2.629601e-04 108 3.500000e-01 2.640671e-04 109 4.000000e-01 2.651181e-04 110 4.500000e-01 2.661304e-04 111 5.000000e-01 2.671112e-04 112 5.500000e-01 2.680652e-04 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 113 6.000000e-01 2.689960e-04 114 6.500000e-01 2.699066e-04 115 7.000000e-01 2.707990e-04 116 7.500000e-01 2.716754e-04 117 8.000000e-01 2.725373e-04 118 8.500000e-01 2.733860e-04 119 9.000000e-01 2.742228e-04 120 9.500000e-01 2.750487e-04 121 1.000000e+00 2.758645e-04 122 1.050000e+00 2.766711e-04 123 1.100000e+00 2.774692e-04 124 1.150000e+00 2.782595e-04 125 1.200000e+00 2.790425e-04 126 1.250000e+00 2.798188e-04 127 1.300000e+00 2.805889e-04 128 1.350000e+00 2.813533e-04 129 1.400000e+00 2.821125e-04 130 1.450000e+00 2.828669e-04 131 1.500000e+00 2.836169e-04 132 1.550000e+00 2.843631e-04 133 1.600000e+00 2.851057e-04 134 1.650000e+00 2.858453e-04 135 1.700000e+00 2.865823e-04 136 1.750000e+00 2.873172e-04 137 1.800000e+00 2.880503e-04 138 1.850000e+00 2.887821e-04 139 1.900000e+00 2.895132e-04 140 1.950000e+00 2.902439e-04 141 2.000000e+00 2.909748e-04 142 2.050000e+00 2.917063e-04 143 2.100000e+00 2.924390e-04 144 2.150000e+00 2.931735e-04 145 2.200000e+00 2.939101e-04 146 2.250000e+00 2.946496e-04 147 2.300000e+00 2.953924e-04 148 2.350000e+00 2.961393e-04 149 2.400000e+00 2.968906e-04 150 2.450000e+00 2.976472e-04 151 2.500000e+00 2.984095e-04 152 2.550000e+00 2.991783e-04 153 2.600000e+00 2.999542e-04 154 2.650000e+00 3.007378e-04 155 2.700000e+00 3.015299e-04 156 2.750000e+00 3.023311e-04 157 2.800000e+00 3.031422e-04 158 2.850000e+00 3.039638e-04 159 2.900000e+00 3.047967e-04 160 2.950000e+00 3.056416e-04 161 3.000000e+00 3.064993e-04 162 3.050000e+00 3.073705e-04 163 3.100000e+00 3.082561e-04 164 3.150000e+00 3.091567e-04 165 3.200000e+00 3.100731e-04 166 3.250000e+00 3.110063e-04 167 3.300000e+00 3.119569e-04 168 3.350000e+00 3.129259e-04 169 3.400000e+00 3.139139e-04 170 3.450000e+00 3.149219e-04 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 171 3.500000e+00 3.159508e-04 172 3.550000e+00 3.170013e-04 173 3.600000e+00 3.180743e-04 174 3.650000e+00 3.191708e-04 175 3.700000e+00 3.202916e-04 176 3.750000e+00 3.214375e-04 177 3.800000e+00 3.226095e-04 178 3.850000e+00 3.238085e-04 179 3.900000e+00 3.250355e-04 180 3.950000e+00 3.262913e-04 181 4.000000e+00 3.275769e-04 182 4.050000e+00 3.288933e-04 183 4.100000e+00 3.302414e-04 184 4.150000e+00 3.316222e-04 185 4.200000e+00 3.330367e-04 186 4.250000e+00 3.344859e-04 187 4.300000e+00 3.359707e-04 188 4.350000e+00 3.374924e-04 189 4.400000e+00 3.390518e-04 190 4.450000e+00 3.406500e-04 191 4.500000e+00 3.422882e-04 192 4.550000e+00 3.439673e-04 193 4.600000e+00 3.456886e-04 194 4.650000e+00 3.474531e-04 195 4.700000e+00 3.492619e-04 196 4.750000e+00 3.511164e-04 197 4.800000e+00 3.530175e-04 198 4.850000e+00 3.549666e-04 199 4.900000e+00 3.569648e-04 200 4.950000e+00 3.590135e-04 201 5.000000e+00 3.611139e-04 202 0.000000e+00 -1.78156e-04 203 5.000000e-02 4.603447e-04 204 1.000000e-01 8.779874e-04 205 1.500000e-01 1.083308e-03 206 2.000000e-01 1.167765e-03 207 2.500000e-01 1.198463e-03 208 3.000000e-01 1.208579e-03 209 3.500000e-01 1.212988e-03 210 4.000000e-01 1.216303e-03 211 4.500000e-01 1.219301e-03 212 5.000000e-01 1.222137e-03 213 5.500000e-01 1.224856e-03 214 6.000000e-01 1.227478e-03 215 6.500000e-01 1.230017e-03 216 7.000000e-01 1.232484e-03 217 7.500000e-01 1.234887e-03 218 8.000000e-01 1.237235e-03 219 8.500000e-01 1.239532e-03 220 9.000000e-01 1.241783e-03 221 9.500000e-01 1.243992e-03 222 1.000000e+00 1.246163e-03 223 1.050000e+00 1.248300e-03 224 1.100000e+00 1.250403e-03 225 1.150000e+00 1.252478e-03 226 1.200000e+00 1.254524e-03 227 1.250000e+00 1.256545e-03 228 1.300000e+00 1.258542e-03 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 229 1.350000e+00 1.260517e-03 230 1.400000e+00 1.262472e-03 231 1.450000e+00 1.264408e-03 232 1.500000e+00 1.266328e-03 233 1.550000e+00 1.268233e-03 234 1.600000e+00 1.270124e-03 235 1.650000e+00 1.272003e-03 236 1.700000e+00 1.273873e-03 237 1.750000e+00 1.275734e-03 238 1.800000e+00 1.277590e-03 239 1.850000e+00 1.279441e-03 240 1.900000e+00 1.281291e-03 241 1.950000e+00 1.283141e-03 242 2.000000e+00 1.284993e-03 243 2.050000e+00 1.286851e-03 244 2.100000e+00 1.288716e-03 245 2.150000e+00 1.290591e-03 246 2.200000e+00 1.292479e-03 247 2.250000e+00 1.294383e-03 248 2.300000e+00 1.296305e-03 249 2.350000e+00 1.298249e-03 250 2.400000e+00 1.300218e-03 251 2.450000e+00 1.302215e-03 252 2.500000e+00 1.304243e-03 253 2.550000e+00 1.306307e-03 254 2.600000e+00 1.308408e-03 255 2.650000e+00 1.310551e-03 256 2.700000e+00 1.312740e-03 257 2.750000e+00 1.314978e-03 258 2.800000e+00 1.317269e-03 259 2.850000e+00 1.319618e-03 260 2.900000e+00 1.322028e-03 261 2.950000e+00 1.324503e-03 262 3.000000e+00 1.327047e-03 263 3.050000e+00 1.329665e-03 264 3.100000e+00 1.332361e-03 265 3.150000e+00 1.335139e-03 266 3.200000e+00 1.338004e-03 267 3.250000e+00 1.340960e-03 268 3.300000e+00 1.344012e-03 269 3.350000e+00 1.347164e-03 270 3.400000e+00 1.350421e-03 271 3.450000e+00 1.353787e-03 272 3.500000e+00 1.357269e-03 273 3.550000e+00 1.360870e-03 274 3.600000e+00 1.364595e-03 275 3.650000e+00 1.368449e-03 276 3.700000e+00 1.372438e-03 277 3.750000e+00 1.376567e-03 278 3.800000e+00 1.380840e-03 279 3.850000e+00 1.385263e-03 280 3.900000e+00 1.389842e-03 281 3.950000e+00 1.394581e-03 282 4.000000e+00 1.399487e-03 283 4.050000e+00 1.404565e-03 284 4.100000e+00 1.409821e-03 285 4.150000e+00 1.415260e-03 286 4.200000e+00 1.420889e-03 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 287 4.250000e+00 1.426713e-03 288 4.300000e+00 1.432738e-03 289 4.350000e+00 1.438972e-03 290 4.400000e+00 1.445420e-03 291 4.450000e+00 1.452088e-03 292 4.500000e+00 1.458984e-03 293 4.550000e+00 1.466115e-03 294 4.600000e+00 1.473486e-03 295 4.650000e+00 1.481106e-03 296 4.700000e+00 1.488981e-03 297 4.750000e+00 1.497119e-03 298 4.800000e+00 1.505528e-03 299 4.850000e+00 1.514216e-03 300 4.900000e+00 1.523190e-03 301 4.950000e+00 1.532460e-03 302 5.000000e+00 1.542033e-03 303 0.000000e+00 -4.53981e-04 304 5.000000e-02 7.917497e-04 305 1.000000e-01 1.900450e-03 306 1.500000e-01 2.695620e-03 307 2.000000e-01 3.160991e-03 308 2.500000e-01 3.408652e-03 309 3.000000e-01 3.551886e-03 310 3.500000e-01 3.649750e-03 311 4.000000e-01 3.714913e-03 312 4.500000e-01 3.752032e-03 313 5.000000e-01 3.768584e-03 314 5.500000e-01 3.775571e-03 315 6.000000e-01 3.780471e-03 316 6.500000e-01 3.784779e-03 317 7.000000e-01 3.788810e-03 318 7.500000e-01 3.792648e-03 319 8.000000e-01 3.796330e-03 320 8.500000e-01 3.799882e-03 321 9.000000e-01 3.803320e-03 322 9.500000e-01 3.806659e-03 323 1.000000e+00 3.809910e-03 324 1.050000e+00 3.813082e-03 325 1.100000e+00 3.816183e-03 326 1.150000e+00 3.819219e-03 327 1.200000e+00 3.822196e-03 328 1.250000e+00 3.825118e-03 329 1.300000e+00 3.827991e-03 330 1.350000e+00 3.830817e-03 331 1.400000e+00 3.833602e-03 332 1.450000e+00 3.836347e-03 333 1.500000e+00 3.839057e-03 334 1.550000e+00 3.841735e-03 335 1.600000e+00 3.844385e-03 336 1.650000e+00 3.847009e-03 337 1.700000e+00 3.849612e-03 338 1.750000e+00 3.852197e-03 339 1.800000e+00 3.854768e-03 340 1.850000e+00 3.857331e-03 341 1.900000e+00 3.859890e-03 342 1.950000e+00 3.862450e-03 343 2.000000e+00 3.865017e-03 344 2.050000e+00 3.867596e-03 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 345 2.100000e+00 3.870194e-03 346 2.150000e+00 3.872818e-03 347 2.200000e+00 3.875474e-03 348 2.250000e+00 3.878172e-03 349 2.300000e+00 3.880918e-03 350 2.350000e+00 3.883721e-03 351 2.400000e+00 3.886591e-03 352 2.450000e+00 3.889536e-03 353 2.500000e+00 3.892567e-03 354 2.550000e+00 3.895693e-03 355 2.600000e+00 3.898925e-03 356 2.650000e+00 3.902274e-03 357 2.700000e+00 3.905751e-03 358 2.750000e+00 3.909368e-03 359 2.800000e+00 3.913136e-03 360 2.850000e+00 3.917069e-03 361 2.900000e+00 3.921178e-03 362 2.950000e+00 3.925477e-03 363 3.000000e+00 3.929978e-03 364 3.050000e+00 3.934696e-03 365 3.100000e+00 3.939642e-03 366 3.150000e+00 3.944832e-03 367 3.200000e+00 3.950280e-03 368 3.250000e+00 3.955999e-03 369 3.300000e+00 3.962004e-03 370 3.350000e+00 3.968310e-03 371 3.400000e+00 3.974932e-03 372 3.450000e+00 3.981885e-03 373 3.500000e+00 3.989184e-03 374 3.550000e+00 3.996844e-03 375 3.600000e+00 4.004881e-03 376 3.650000e+00 4.013312e-03 377 3.700000e+00 4.022151e-03 378 3.750000e+00 4.031414e-03 379 3.800000e+00 4.041120e-03 380 3.850000e+00 4.051283e-03 381 3.900000e+00 4.061920e-03 382 3.950000e+00 4.073048e-03 383 4.000000e+00 4.084685e-03 384 4.050000e+00 4.096848e-03 385 4.100000e+00 4.109553e-03 386 4.150000e+00 4.122820e-03 387 4.200000e+00 4.136665e-03 388 4.250000e+00 4.151107e-03 389 4.300000e+00 4.166165e-03 390 4.350000e+00 4.181857e-03 391 4.400000e+00 4.198202e-03 392 4.450000e+00 4.215220e-03 393 4.500000e+00 4.232931e-03 394 4.550000e+00 4.251353e-03 395 4.600000e+00 4.270509e-03 396 4.650000e+00 4.290418e-03 397 4.700000e+00 4.311102e-03 398 4.750000e+00 4.332582e-03 399 4.800000e+00 4.354881e-03 400 4.850000e+00 4.378021e-03 401 4.900000e+00 4.402025e-03 402 4.950000e+00 4.426916e-03 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 403 5.000000e+00 4.452719e-03 404 0.000000e+00 -8.55566e-04 405 5.000000e-02 9.351060e-04 406 1.000000e-01 2.735866e-03 407 1.500000e-01 4.344452e-03 408 2.000000e-01 5.597086e-03 409 2.500000e-01 6.432215e-03 410 3.000000e-01 6.924348e-03 411 3.500000e-01 7.216682e-03 412 4.000000e-01 7.427107e-03 413 4.500000e-01 7.609227e-03 414 5.000000e-01 7.775036e-03 415 5.500000e-01 7.925264e-03 416 6.000000e-01 8.058304e-03 417 6.500000e-01 8.172002e-03 418 7.000000e-01 8.264090e-03 419 7.500000e-01 8.332623e-03 420 8.000000e-01 8.376230e-03 421 8.500000e-01 8.399366e-03 422 9.000000e-01 8.409827e-03 423 9.500000e-01 8.415617e-03 424 1.000000e+00 8.420355e-03 425 1.050000e+00 8.424692e-03 426 1.100000e+00 8.428789e-03 427 1.150000e+00 8.432700e-03 428 1.200000e+00 8.436457e-03 429 1.250000e+00 8.440084e-03 430 1.300000e+00 8.443597e-03 431 1.350000e+00 8.447009e-03 432 1.400000e+00 8.450332e-03 433 1.450000e+00 8.453575e-03 434 1.500000e+00 8.456744e-03 435 1.550000e+00 8.459848e-03 436 1.600000e+00 8.462891e-03 437 1.650000e+00 8.465879e-03 438 1.700000e+00 8.468816e-03 439 1.750000e+00 8.471707e-03 440 1.800000e+00 8.474557e-03 441 1.850000e+00 8.477371e-03 442 1.900000e+00 8.480152e-03 443 1.950000e+00 8.482906e-03 444 2.000000e+00 8.485640e-03 445 2.050000e+00 8.488358e-03 446 2.100000e+00 8.491069e-03 447 2.150000e+00 8.493779e-03 448 2.200000e+00 8.496497e-03 449 2.250000e+00 8.499233e-03 450 2.300000e+00 8.501997e-03 451 2.350000e+00 8.504800e-03 452 2.400000e+00 8.507655e-03 453 2.450000e+00 8.510574e-03 454 2.500000e+00 8.513573e-03 455 2.550000e+00 8.516667e-03 456 2.600000e+00 8.519873e-03 457 2.650000e+00 8.523208e-03 458 2.700000e+00 8.526691e-03 459 2.750000e+00 8.530343e-03 460 2.800000e+00 8.534183e-03 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 461 2.850000e+00 8.538234e-03 462 2.900000e+00 8.542518e-03 463 2.950000e+00 8.547058e-03 464 3.000000e+00 8.551880e-03 465 3.050000e+00 8.557009e-03 466 3.100000e+00 8.562470e-03 467 3.150000e+00 8.568290e-03 468 3.200000e+00 8.574497e-03 469 3.250000e+00 8.581119e-03 470 3.300000e+00 8.588184e-03 471 3.350000e+00 8.595721e-03 472 3.400000e+00 8.603760e-03 473 3.450000e+00 8.612331e-03 474 3.500000e+00 8.621464e-03 475 3.550000e+00 8.631191e-03 476 3.600000e+00 8.641541e-03 477 3.650000e+00 8.652548e-03 478 3.700000e+00 8.664242e-03 479 3.750000e+00 8.676655e-03 480 3.800000e+00 8.689819e-03 481 3.850000e+00 8.703767e-03 482 3.900000e+00 8.718532e-03 483 3.950000e+00 8.734145e-03 484 4.000000e+00 8.750639e-03 485 4.050000e+00 8.768048e-03 486 4.100000e+00 8.786404e-03 487 4.150000e+00 8.805740e-03 488 4.200000e+00 8.826090e-03 489 4.250000e+00 8.847486e-03 490 4.300000e+00 8.869962e-03 491 4.350000e+00 8.893551e-03 492 4.400000e+00 8.918287e-03 493 4.450000e+00 8.944202e-03 494 4.500000e+00 8.971332e-03 495 4.550000e+00 8.999708e-03 496 4.600000e+00 9.029366e-03 497 4.650000e+00 9.060339e-03 498 4.700000e+00 9.092661e-03 499 4.750000e+00 9.126365e-03 500 4.800000e+00 9.161487e-03 501 4.850000e+00 9.198061e-03 502 4.900000e+00 9.236121e-03 503 4.950000e+00 9.275701e-03 504 5.000000e+00 9.316838e-03 505 0.000000e+00 -1.32424e-03 506 5.000000e-02 8.711061e-04 507 1.000000e-01 3.147055e-03 508 1.500000e-01 5.352020e-03 509 2.000000e-01 7.339342e-03 510 2.500000e-01 8.976337e-03 511 3.000000e-01 1.016910e-02 512 3.500000e-01 1.093140e-02 513 4.000000e-01 1.138927e-02 514 4.500000e-01 1.169491e-02 515 5.000000e-01 1.194852e-02 516 5.500000e-01 1.218634e-02 517 6.000000e-01 1.241589e-02 518 6.500000e-01 1.263810e-02 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 519 7.000000e-01 1.285268e-02 520 7.500000e-01 1.305909e-02 521 8.000000e-01 1.325670e-02 522 8.500000e-01 1.344476e-02 523 9.000000e-01 1.362245e-02 524 9.500000e-01 1.378881e-02 525 1.000000e+00 1.394275e-02 526 1.050000e+00 1.408304e-02 527 1.100000e+00 1.420829e-02 528 1.150000e+00 1.431697e-02 529 1.200000e+00 1.440746e-02 530 1.250000e+00 1.447827e-02 531 1.300000e+00 1.452845e-02 532 1.350000e+00 1.455814e-02 533 1.400000e+00 1.457338e-02 534 1.450000e+00 1.458058e-02 535 1.500000e+00 1.458571e-02 536 1.550000e+00 1.459022e-02 537 1.600000e+00 1.459443e-02 538 1.650000e+00 1.459842e-02 539 1.700000e+00 1.460224e-02 540 1.750000e+00 1.460591e-02 541 1.800000e+00 1.460947e-02 542 1.850000e+00 1.461291e-02 543 1.900000e+00 1.461626e-02 544 1.950000e+00 1.461952e-02 545 2.000000e+00 1.462270e-02 546 2.050000e+00 1.462581e-02 547 2.100000e+00 1.462886e-02 548 2.150000e+00 1.463186e-02 549 2.200000e+00 1.463480e-02 550 2.250000e+00 1.463769e-02 551 2.300000e+00 1.464054e-02 552 2.350000e+00 1.464335e-02 553 2.400000e+00 1.464613e-02 554 2.450000e+00 1.464889e-02 555 2.500000e+00 1.465163e-02 556 2.550000e+00 1.465437e-02 557 2.600000e+00 1.465711e-02 558 2.650000e+00 1.465986e-02 559 2.700000e+00 1.466264e-02 560 2.750000e+00 1.466545e-02 561 2.800000e+00 1.466832e-02 562 2.850000e+00 1.467127e-02 563 2.900000e+00 1.467431e-02 564 2.950000e+00 1.467746e-02 565 3.000000e+00 1.468075e-02 566 3.050000e+00 1.468420e-02 567 3.100000e+00 1.468784e-02 568 3.150000e+00 1.469169e-02 569 3.200000e+00 1.469579e-02 570 3.250000e+00 1.470017e-02 571 3.300000e+00 1.470486e-02 572 3.350000e+00 1.470990e-02 573 3.400000e+00 1.471532e-02 574 3.450000e+00 1.472116e-02 575 3.500000e+00 1.472747e-02 576 3.550000e+00 1.473428e-02 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 577 3.600000e+00 1.474163e-02 578 3.650000e+00 1.474957e-02 579 3.700000e+00 1.475814e-02 580 3.750000e+00 1.476739e-02 581 3.800000e+00 1.477736e-02 582 3.850000e+00 1.478809e-02 583 3.900000e+00 1.479964e-02 584 3.950000e+00 1.481205e-02 585 4.000000e+00 1.482536e-02 586 4.050000e+00 1.483964e-02 587 4.100000e+00 1.485491e-02 588 4.150000e+00 1.487123e-02 589 4.200000e+00 1.488866e-02 590 4.250000e+00 1.490723e-02 591 4.300000e+00 1.492699e-02 592 4.350000e+00 1.494799e-02 593 4.400000e+00 1.497027e-02 594 4.450000e+00 1.499389e-02 595 4.500000e+00 1.501889e-02 596 4.550000e+00 1.504531e-02 597 4.600000e+00 1.507320e-02 598 4.650000e+00 1.510261e-02 599 4.700000e+00 1.513357e-02 600 4.750000e+00 1.516613e-02 601 4.800000e+00 1.520033e-02 602 4.850000e+00 1.523622e-02 603 4.900000e+00 1.527383e-02 604 4.950000e+00 1.531320e-02 605 5.000000e+00 1.535438e-02 606 0.000000e+00 -1.81663e-03 607 5.000000e-02 6.700150e-04 608 1.000000e-01 3.253324e-03 609 1.500000e-01 5.819300e-03 610 2.000000e-01 8.266816e-03 611 2.500000e-01 1.048359e-02 612 3.000000e-01 1.234002e-02 613 3.500000e-01 1.375164e-02 614 4.000000e-01 1.469364e-02 615 4.500000e-01 1.527001e-02 616 5.000000e-01 1.564200e-02 617 5.500000e-01 1.593530e-02 618 6.000000e-01 1.620678e-02 619 6.500000e-01 1.647120e-02 620 7.000000e-01 1.673121e-02 621 7.500000e-01 1.698714e-02 622 8.000000e-01 1.723895e-02 623 8.500000e-01 1.748652e-02 624 9.000000e-01 1.772970e-02 625 9.500000e-01 1.796834e-02 626 1.000000e+00 1.820225e-02 627 1.050000e+00 1.843125e-02 628 1.100000e+00 1.865511e-02 629 1.150000e+00 1.887359e-02 630 1.200000e+00 1.908641e-02 631 1.250000e+00 1.929326e-02 632 1.300000e+00 1.949378e-02 633 1.350000e+00 1.968756e-02 634 1.400000e+00 1.987417e-02 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 635 1.450000e+00 2.005305e-02 636 1.500000e+00 2.022363e-02 637 1.550000e+00 2.038519e-02 638 1.600000e+00 2.053696e-02 639 1.650000e+00 2.067800e-02 640 1.700000e+00 2.080727e-02 641 1.750000e+00 2.092356e-02 642 1.800000e+00 2.102552e-02 643 1.850000e+00 2.111169e-02 644 1.900000e+00 2.118062e-02 645 1.950000e+00 2.123123e-02 646 2.000000e+00 2.126304e-02 647 2.050000e+00 2.128047e-02 648 2.100000e+00 2.128870e-02 649 2.150000e+00 2.129418e-02 650 2.200000e+00 2.129888e-02 651 2.250000e+00 2.130323e-02 652 2.300000e+00 2.130735e-02 653 2.350000e+00 2.131128e-02 654 2.400000e+00 2.131505e-02 655 2.450000e+00 2.131870e-02 656 2.500000e+00 2.132223e-02 657 2.550000e+00 2.132566e-02 658 2.600000e+00 2.132900e-02 659 2.650000e+00 2.133225e-02 660 2.700000e+00 2.133544e-02 661 2.750000e+00 2.133856e-02 662 2.800000e+00 2.134161e-02 663 2.850000e+00 2.134461e-02 664 2.900000e+00 2.134757e-02 665 2.950000e+00 2.135048e-02 666 3.000000e+00 2.135335e-02 667 3.050000e+00 2.135619e-02 668 3.100000e+00 2.135902e-02 669 3.150000e+00 2.136183e-02 670 3.200000e+00 2.136464e-02 671 3.250000e+00 2.136746e-02 672 3.300000e+00 2.137030e-02 673 3.350000e+00 2.137319e-02 674 3.400000e+00 2.137613e-02 675 3.450000e+00 2.137916e-02 676 3.500000e+00 2.138229e-02 677 3.550000e+00 2.138554e-02 678 3.600000e+00 2.138895e-02 679 3.650000e+00 2.139255e-02 680 3.700000e+00 2.139637e-02 681 3.750000e+00 2.140044e-02 682 3.800000e+00 2.140480e-02 683 3.850000e+00 2.140950e-02 684 3.900000e+00 2.141457e-02 685 3.950000e+00 2.142006e-02 686 4.000000e+00 2.142601e-02 687 4.050000e+00 2.143248e-02 688 4.100000e+00 2.143951e-02 689 4.150000e+00 2.144716e-02 690 4.200000e+00 2.145548e-02 691 4.250000e+00 2.146452e-02 692 4.300000e+00 2.147435e-02 Index v-sweep -i(vc) -------------------------------------------------------------------------------- 693 4.350000e+00 2.148501e-02 694 4.400000e+00 2.149656e-02 695 4.450000e+00 2.150907e-02 696 4.500000e+00 2.152258e-02 697 4.550000e+00 2.153716e-02 698 4.600000e+00 2.155287e-02 699 4.650000e+00 2.156976e-02 700 4.700000e+00 2.158790e-02 701 4.750000e+00 2.160733e-02 702 4.800000e+00 2.162812e-02 703 4.850000e+00 2.165031e-02 704 4.900000e+00 2.167398e-02 705 4.950000e+00 2.169916e-02 706 5.000000e+00 2.172591e-02 VBIC Output Test -------------------------------------------------------------------------------- Index v-sweep -i(vb) -------------------------------------------------------------------------------- 0 0.000000e+00 2.463096e-04 1 5.000000e-02 6.409446e-05 2 1.000000e-01 1.218731e-05 3 1.500000e-01 2.335858e-06 4 2.000000e-01 8.262651e-07 5 2.500000e-01 6.057296e-07 6 3.000000e-01 5.737509e-07 7 3.500000e-01 5.691084e-07 8 4.000000e-01 5.684258e-07 9 4.500000e-01 5.683175e-07 10 5.000000e-01 5.682930e-07 11 5.500000e-01 5.682809e-07 12 6.000000e-01 5.682707e-07 13 6.500000e-01 5.682609e-07 14 7.000000e-01 5.682510e-07 15 7.500000e-01 5.682407e-07 16 8.000000e-01 5.682293e-07 17 8.500000e-01 5.682162e-07 18 9.000000e-01 5.682000e-07 19 9.500000e-01 5.681790e-07 20 1.000000e+00 5.681507e-07 21 1.050000e+00 5.681117e-07 22 1.100000e+00 5.680576e-07 23 1.150000e+00 5.679830e-07 24 1.200000e+00 5.678808e-07 25 1.250000e+00 5.677426e-07 26 1.300000e+00 5.675581e-07 27 1.350000e+00 5.673154e-07 28 1.400000e+00 5.670005e-07 29 1.450000e+00 5.665971e-07 30 1.500000e+00 5.660869e-07 31 1.550000e+00 5.654491e-07 32 1.600000e+00 5.646607e-07 33 1.650000e+00 5.636960e-07 34 1.700000e+00 5.625269e-07 35 1.750000e+00 5.611226e-07 36 1.800000e+00 5.594498e-07 37 1.850000e+00 5.574728e-07 38 1.900000e+00 5.551529e-07 39 1.950000e+00 5.524490e-07 40 2.000000e+00 5.493177e-07 41 2.050000e+00 5.457126e-07 42 2.100000e+00 5.415853e-07 43 2.150000e+00 5.368846e-07 44 2.200000e+00 5.315571e-07 45 2.250000e+00 5.255471e-07 46 2.300000e+00 5.187967e-07 47 2.350000e+00 5.112457e-07 48 2.400000e+00 5.028318e-07 49 2.450000e+00 4.934908e-07 50 2.500000e+00 4.831565e-07 51 2.550000e+00 4.717609e-07 52 2.600000e+00 4.592339e-07 53 2.650000e+00 4.455041e-07 54 2.700000e+00 4.304983e-07 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 55 2.750000e+00 4.141416e-07 56 2.800000e+00 3.963579e-07 57 2.850000e+00 3.770693e-07 58 2.900000e+00 3.561971e-07 59 2.950000e+00 3.336608e-07 60 3.000000e+00 3.093790e-07 61 3.050000e+00 2.832692e-07 62 3.100000e+00 2.552476e-07 63 3.150000e+00 2.252298e-07 64 3.200000e+00 1.931299e-07 65 3.250000e+00 1.588617e-07 66 3.300000e+00 1.223377e-07 67 3.350000e+00 8.346998e-08 68 3.400000e+00 4.216958e-08 69 3.450000e+00 -1.65294e-09 70 3.500000e+00 -4.80877e-08 71 3.550000e+00 -9.72255e-08 72 3.600000e+00 -1.49158e-07 73 3.650000e+00 -2.03976e-07 74 3.700000e+00 -2.61773e-07 75 3.750000e+00 -3.22641e-07 76 3.800000e+00 -3.86673e-07 77 3.850000e+00 -4.53964e-07 78 3.900000e+00 -5.24607e-07 79 3.950000e+00 -5.98696e-07 80 4.000000e+00 -6.76327e-07 81 4.050000e+00 -7.57594e-07 82 4.100000e+00 -8.42594e-07 83 4.150000e+00 -9.31420e-07 84 4.200000e+00 -1.02417e-06 85 4.250000e+00 -1.12094e-06 86 4.300000e+00 -1.22183e-06 87 4.350000e+00 -1.32693e-06 88 4.400000e+00 -1.43634e-06 89 4.450000e+00 -1.55016e-06 90 4.500000e+00 -1.66848e-06 91 4.550000e+00 -1.79141e-06 92 4.600000e+00 -1.91904e-06 93 4.650000e+00 -2.05147e-06 94 4.700000e+00 -2.18880e-06 95 4.750000e+00 -2.33113e-06 96 4.800000e+00 -2.47856e-06 97 4.850000e+00 -2.63119e-06 98 4.900000e+00 -2.78912e-06 99 4.950000e+00 -2.95245e-06 100 5.000000e+00 -3.12128e-06 101 0.000000e+00 7.258447e-04 102 5.000000e-02 2.609579e-04 103 1.000000e-01 7.203906e-05 104 1.500000e-01 1.652363e-05 105 2.000000e-01 5.769433e-06 106 2.500000e-01 4.111341e-06 107 3.000000e-01 3.868238e-06 108 3.500000e-01 3.832641e-06 109 4.000000e-01 3.827165e-06 110 4.500000e-01 3.826065e-06 111 5.000000e-01 3.825610e-06 112 5.500000e-01 3.825256e-06 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 113 6.000000e-01 3.824923e-06 114 6.500000e-01 3.824600e-06 115 7.000000e-01 3.824283e-06 116 7.500000e-01 3.823971e-06 117 8.000000e-01 3.823660e-06 118 8.500000e-01 3.823349e-06 119 9.000000e-01 3.823032e-06 120 9.500000e-01 3.822703e-06 121 1.000000e+00 3.822352e-06 122 1.050000e+00 3.821966e-06 123 1.100000e+00 3.821525e-06 124 1.150000e+00 3.821006e-06 125 1.200000e+00 3.820378e-06 126 1.250000e+00 3.819602e-06 127 1.300000e+00 3.818631e-06 128 1.350000e+00 3.817408e-06 129 1.400000e+00 3.815866e-06 130 1.450000e+00 3.813924e-06 131 1.500000e+00 3.811492e-06 132 1.550000e+00 3.808466e-06 133 1.600000e+00 3.804729e-06 134 1.650000e+00 3.800148e-06 135 1.700000e+00 3.794578e-06 136 1.750000e+00 3.787859e-06 137 1.800000e+00 3.779816e-06 138 1.850000e+00 3.770260e-06 139 1.900000e+00 3.758985e-06 140 1.950000e+00 3.745771e-06 141 2.000000e+00 3.730385e-06 142 2.050000e+00 3.712578e-06 143 2.100000e+00 3.692085e-06 144 2.150000e+00 3.668630e-06 145 2.200000e+00 3.641921e-06 146 2.250000e+00 3.611654e-06 147 2.300000e+00 3.577510e-06 148 2.350000e+00 3.539159e-06 149 2.400000e+00 3.496259e-06 150 2.450000e+00 3.448454e-06 151 2.500000e+00 3.395378e-06 152 2.550000e+00 3.336656e-06 153 2.600000e+00 3.271898e-06 154 2.650000e+00 3.200707e-06 155 2.700000e+00 3.122677e-06 156 2.750000e+00 3.037390e-06 157 2.800000e+00 2.944421e-06 158 2.850000e+00 2.843338e-06 159 2.900000e+00 2.733697e-06 160 2.950000e+00 2.615050e-06 161 3.000000e+00 2.486940e-06 162 3.050000e+00 2.348904e-06 163 3.100000e+00 2.200471e-06 164 3.150000e+00 2.041166e-06 165 3.200000e+00 1.870505e-06 166 3.250000e+00 1.688001e-06 167 3.300000e+00 1.493159e-06 168 3.350000e+00 1.285480e-06 169 3.400000e+00 1.064461e-06 170 3.450000e+00 8.295904e-07 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 171 3.500000e+00 5.803551e-07 172 3.550000e+00 3.162357e-07 173 3.600000e+00 3.670834e-08 174 3.650000e+00 -2.58756e-07 175 3.700000e+00 -5.70689e-07 176 3.750000e+00 -8.99630e-07 177 3.800000e+00 -1.24612e-06 178 3.850000e+00 -1.61071e-06 179 3.900000e+00 -1.99394e-06 180 3.950000e+00 -2.39638e-06 181 4.000000e+00 -2.81859e-06 182 4.050000e+00 -3.26113e-06 183 4.100000e+00 -3.72458e-06 184 4.150000e+00 -4.20950e-06 185 4.200000e+00 -4.71649e-06 186 4.250000e+00 -5.24614e-06 187 4.300000e+00 -5.79903e-06 188 4.350000e+00 -6.37577e-06 189 4.400000e+00 -6.97697e-06 190 4.450000e+00 -7.60323e-06 191 4.500000e+00 -8.25519e-06 192 4.550000e+00 -8.93347e-06 193 4.600000e+00 -9.63871e-06 194 4.650000e+00 -1.03715e-05 195 4.700000e+00 -1.11327e-05 196 4.750000e+00 -1.19227e-05 197 4.800000e+00 -1.27423e-05 198 4.850000e+00 -1.35922e-05 199 4.900000e+00 -1.44731e-05 200 4.950000e+00 -1.53857e-05 201 5.000000e+00 -1.63307e-05 202 0.000000e+00 1.740943e-03 203 5.000000e-02 8.284244e-04 204 1.000000e-01 3.365795e-04 205 1.500000e-01 1.170881e-04 206 2.000000e-01 4.387160e-05 207 2.500000e-01 2.733915e-05 208 3.000000e-01 2.446640e-05 209 3.500000e-01 2.402947e-05 210 4.000000e-01 2.395864e-05 211 4.500000e-01 2.394277e-05 212 5.000000e-01 2.393518e-05 213 5.500000e-01 2.392902e-05 214 6.000000e-01 2.392323e-05 215 6.500000e-01 2.391765e-05 216 7.000000e-01 2.391224e-05 217 7.500000e-01 2.390697e-05 218 8.000000e-01 2.390181e-05 219 8.500000e-01 2.389677e-05 220 9.000000e-01 2.389182e-05 221 9.500000e-01 2.388694e-05 222 1.000000e+00 2.388211e-05 223 1.050000e+00 2.387729e-05 224 1.100000e+00 2.387246e-05 225 1.150000e+00 2.386754e-05 226 1.200000e+00 2.386246e-05 227 1.250000e+00 2.385713e-05 228 1.300000e+00 2.385141e-05 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 229 1.350000e+00 2.384515e-05 230 1.400000e+00 2.383816e-05 231 1.450000e+00 2.383020e-05 232 1.500000e+00 2.382099e-05 233 1.550000e+00 2.381022e-05 234 1.600000e+00 2.379750e-05 235 1.650000e+00 2.378240e-05 236 1.700000e+00 2.376445e-05 237 1.750000e+00 2.374311e-05 238 1.800000e+00 2.371777e-05 239 1.850000e+00 2.368777e-05 240 1.900000e+00 2.365239e-05 241 1.950000e+00 2.361086e-05 242 2.000000e+00 2.356232e-05 243 2.050000e+00 2.350587e-05 244 2.100000e+00 2.344056e-05 245 2.150000e+00 2.336535e-05 246 2.200000e+00 2.327917e-05 247 2.250000e+00 2.318087e-05 248 2.300000e+00 2.306927e-05 249 2.350000e+00 2.294310e-05 250 2.400000e+00 2.280108e-05 251 2.450000e+00 2.264186e-05 252 2.500000e+00 2.246402e-05 253 2.550000e+00 2.226614e-05 254 2.600000e+00 2.204671e-05 255 2.650000e+00 2.180419e-05 256 2.700000e+00 2.153703e-05 257 2.750000e+00 2.124359e-05 258 2.800000e+00 2.092223e-05 259 2.850000e+00 2.057126e-05 260 2.900000e+00 2.018895e-05 261 2.950000e+00 1.977355e-05 262 3.000000e+00 1.932327e-05 263 3.050000e+00 1.883629e-05 264 3.100000e+00 1.831076e-05 265 3.150000e+00 1.774480e-05 266 3.200000e+00 1.713651e-05 267 3.250000e+00 1.648396e-05 268 3.300000e+00 1.578519e-05 269 3.350000e+00 1.503822e-05 270 3.400000e+00 1.424104e-05 271 3.450000e+00 1.339161e-05 272 3.500000e+00 1.248788e-05 273 3.550000e+00 1.152776e-05 274 3.600000e+00 1.050914e-05 275 3.650000e+00 9.429886e-06 276 3.700000e+00 8.287836e-06 277 3.750000e+00 7.080800e-06 278 3.800000e+00 5.806561e-06 279 3.850000e+00 4.462870e-06 280 3.900000e+00 3.047453e-06 281 3.950000e+00 1.558000e-06 282 4.000000e+00 -7.82896e-09 283 4.050000e+00 -1.65241e-06 284 4.100000e+00 -3.37816e-06 285 4.150000e+00 -5.18751e-06 286 4.200000e+00 -7.08298e-06 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 287 4.250000e+00 -9.06707e-06 288 4.300000e+00 -1.11424e-05 289 4.350000e+00 -1.33115e-05 290 4.400000e+00 -1.55772e-05 291 4.450000e+00 -1.79421e-05 292 4.500000e+00 -2.04090e-05 293 4.550000e+00 -2.29808e-05 294 4.600000e+00 -2.56603e-05 295 4.650000e+00 -2.84506e-05 296 4.700000e+00 -3.13546e-05 297 4.750000e+00 -3.43755e-05 298 4.800000e+00 -3.75165e-05 299 4.850000e+00 -4.07809e-05 300 4.900000e+00 -4.41719e-05 301 4.950000e+00 -4.76931e-05 302 5.000000e+00 -5.13480e-05 303 0.000000e+00 3.444223e-03 304 5.000000e-02 2.112135e-03 305 1.000000e-01 1.194955e-03 306 1.500000e-01 6.249858e-04 307 2.000000e-01 3.250190e-04 308 2.500000e-01 1.981412e-04 309 3.000000e-01 1.548921e-04 310 3.500000e-01 1.385804e-04 311 4.000000e-01 1.303892e-04 312 4.500000e-01 1.263212e-04 313 5.000000e-01 1.248589e-04 314 5.500000e-01 1.245459e-04 315 6.000000e-01 1.244517e-04 316 6.500000e-01 1.243983e-04 317 7.000000e-01 1.243534e-04 318 7.500000e-01 1.243114e-04 319 8.000000e-01 1.242712e-04 320 8.500000e-01 1.242325e-04 321 9.000000e-01 1.241950e-04 322 9.500000e-01 1.241587e-04 323 1.000000e+00 1.241233e-04 324 1.050000e+00 1.240887e-04 325 1.100000e+00 1.240549e-04 326 1.150000e+00 1.240218e-04 327 1.200000e+00 1.239893e-04 328 1.250000e+00 1.239573e-04 329 1.300000e+00 1.239256e-04 330 1.350000e+00 1.238940e-04 331 1.400000e+00 1.238625e-04 332 1.450000e+00 1.238307e-04 333 1.500000e+00 1.237983e-04 334 1.550000e+00 1.237648e-04 335 1.600000e+00 1.237299e-04 336 1.650000e+00 1.236928e-04 337 1.700000e+00 1.236529e-04 338 1.750000e+00 1.236093e-04 339 1.800000e+00 1.235611e-04 340 1.850000e+00 1.235070e-04 341 1.900000e+00 1.234459e-04 342 1.950000e+00 1.233764e-04 343 2.000000e+00 1.232967e-04 344 2.050000e+00 1.232053e-04 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 345 2.100000e+00 1.231001e-04 346 2.150000e+00 1.229790e-04 347 2.200000e+00 1.228400e-04 348 2.250000e+00 1.226804e-04 349 2.300000e+00 1.224978e-04 350 2.350000e+00 1.222894e-04 351 2.400000e+00 1.220523e-04 352 2.450000e+00 1.217836e-04 353 2.500000e+00 1.214799e-04 354 2.550000e+00 1.211379e-04 355 2.600000e+00 1.207542e-04 356 2.650000e+00 1.203252e-04 357 2.700000e+00 1.198471e-04 358 2.750000e+00 1.193161e-04 359 2.800000e+00 1.187281e-04 360 2.850000e+00 1.180792e-04 361 2.900000e+00 1.173651e-04 362 2.950000e+00 1.165815e-04 363 3.000000e+00 1.157240e-04 364 3.050000e+00 1.147882e-04 365 3.100000e+00 1.137695e-04 366 3.150000e+00 1.126633e-04 367 3.200000e+00 1.114648e-04 368 3.250000e+00 1.101693e-04 369 3.300000e+00 1.087719e-04 370 3.350000e+00 1.072677e-04 371 3.400000e+00 1.056516e-04 372 3.450000e+00 1.039186e-04 373 3.500000e+00 1.020637e-04 374 3.550000e+00 1.000816e-04 375 3.600000e+00 9.796712e-05 376 3.650000e+00 9.571495e-05 377 3.700000e+00 9.331975e-05 378 3.750000e+00 9.077611e-05 379 3.800000e+00 8.807856e-05 380 3.850000e+00 8.522158e-05 381 3.900000e+00 8.219958e-05 382 3.950000e+00 7.900691e-05 383 4.000000e+00 7.563784e-05 384 4.050000e+00 7.208659e-05 385 4.100000e+00 6.834729e-05 386 4.150000e+00 6.441401e-05 387 4.200000e+00 6.028073e-05 388 4.250000e+00 5.594134e-05 389 4.300000e+00 5.138966e-05 390 4.350000e+00 4.661941e-05 391 4.400000e+00 4.162418e-05 392 4.450000e+00 3.639751e-05 393 4.500000e+00 3.093279e-05 394 4.550000e+00 2.522331e-05 395 4.600000e+00 1.926223e-05 396 4.650000e+00 1.304259e-05 397 4.700000e+00 6.557271e-06 398 4.750000e+00 -2.00957e-07 399 4.800000e+00 -7.23950e-06 400 4.850000e+00 -1.45659e-05 401 4.900000e+00 -2.21879e-05 402 4.950000e+00 -3.01134e-05 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 403 5.000000e+00 -3.83505e-05 404 0.000000e+00 5.774025e-03 405 5.000000e-02 4.230122e-03 406 1.000000e-01 3.014145e-03 407 1.500000e-01 2.076428e-03 408 2.000000e-01 1.405804e-03 409 2.500000e-01 9.883110e-04 410 3.000000e-01 7.700755e-04 411 3.500000e-01 6.728677e-04 412 4.000000e-01 6.270260e-04 413 4.500000e-01 5.958865e-04 414 5.000000e-01 5.694908e-04 415 5.500000e-01 5.462222e-04 416 6.000000e-01 5.259914e-04 417 6.500000e-01 5.089844e-04 418 7.000000e-01 4.954405e-04 419 7.500000e-01 4.855695e-04 420 8.000000e-01 4.795216e-04 421 8.500000e-01 4.765981e-04 422 9.000000e-01 4.756053e-04 423 9.500000e-01 4.752941e-04 424 1.000000e+00 4.751059e-04 425 1.050000e+00 4.749467e-04 426 1.100000e+00 4.747984e-04 427 1.150000e+00 4.746571e-04 428 1.200000e+00 4.745215e-04 429 1.250000e+00 4.743907e-04 430 1.300000e+00 4.742639e-04 431 1.350000e+00 4.741409e-04 432 1.400000e+00 4.740210e-04 433 1.450000e+00 4.739041e-04 434 1.500000e+00 4.737898e-04 435 1.550000e+00 4.736778e-04 436 1.600000e+00 4.735679e-04 437 1.650000e+00 4.734597e-04 438 1.700000e+00 4.733529e-04 439 1.750000e+00 4.732472e-04 440 1.800000e+00 4.731419e-04 441 1.850000e+00 4.730367e-04 442 1.900000e+00 4.729306e-04 443 1.950000e+00 4.728229e-04 444 2.000000e+00 4.727124e-04 445 2.050000e+00 4.725979e-04 446 2.100000e+00 4.724779e-04 447 2.150000e+00 4.723506e-04 448 2.200000e+00 4.722139e-04 449 2.250000e+00 4.720657e-04 450 2.300000e+00 4.719034e-04 451 2.350000e+00 4.717240e-04 452 2.400000e+00 4.715243e-04 453 2.450000e+00 4.713009e-04 454 2.500000e+00 4.710500e-04 455 2.550000e+00 4.707674e-04 456 2.600000e+00 4.704487e-04 457 2.650000e+00 4.700891e-04 458 2.700000e+00 4.696837e-04 459 2.750000e+00 4.692270e-04 460 2.800000e+00 4.687134e-04 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 461 2.850000e+00 4.681371e-04 462 2.900000e+00 4.674919e-04 463 2.950000e+00 4.667713e-04 464 3.000000e+00 4.659687e-04 465 3.050000e+00 4.650773e-04 466 3.100000e+00 4.640898e-04 467 3.150000e+00 4.629991e-04 468 3.200000e+00 4.617976e-04 469 3.250000e+00 4.604777e-04 470 3.300000e+00 4.590315e-04 471 3.350000e+00 4.574512e-04 472 3.400000e+00 4.557284e-04 473 3.450000e+00 4.538552e-04 474 3.500000e+00 4.518230e-04 475 3.550000e+00 4.496235e-04 476 3.600000e+00 4.472481e-04 477 3.650000e+00 4.446883e-04 478 3.700000e+00 4.419353e-04 479 3.750000e+00 4.389804e-04 480 3.800000e+00 4.358147e-04 481 3.850000e+00 4.324295e-04 482 3.900000e+00 4.288159e-04 483 3.950000e+00 4.249648e-04 484 4.000000e+00 4.208674e-04 485 4.050000e+00 4.165145e-04 486 4.100000e+00 4.118973e-04 487 4.150000e+00 4.070066e-04 488 4.200000e+00 4.018333e-04 489 4.250000e+00 3.963685e-04 490 4.300000e+00 3.906028e-04 491 4.350000e+00 3.845273e-04 492 4.400000e+00 3.781327e-04 493 4.450000e+00 3.714099e-04 494 4.500000e+00 3.643497e-04 495 4.550000e+00 3.569428e-04 496 4.600000e+00 3.491800e-04 497 4.650000e+00 3.410521e-04 498 4.700000e+00 3.325496e-04 499 4.750000e+00 3.236633e-04 500 4.800000e+00 3.143839e-04 501 4.850000e+00 3.047018e-04 502 4.900000e+00 2.946077e-04 503 4.950000e+00 2.840921e-04 504 5.000000e+00 2.731454e-04 505 0.000000e+00 8.578039e-03 506 5.000000e-02 6.983028e-03 507 1.000000e-01 5.648473e-03 508 1.500000e-01 4.514638e-03 509 2.000000e-01 3.578508e-03 510 2.500000e-01 2.843112e-03 511 3.000000e-01 2.329399e-03 512 3.500000e-01 2.021602e-03 513 4.000000e-01 1.862416e-03 514 4.500000e-01 1.782892e-03 515 5.000000e-01 1.732026e-03 516 5.500000e-01 1.688351e-03 517 6.000000e-01 1.647181e-03 518 6.500000e-01 1.607738e-03 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 519 7.000000e-01 1.569947e-03 520 7.500000e-01 1.533854e-03 521 8.000000e-01 1.499541e-03 522 8.500000e-01 1.467101e-03 523 9.000000e-01 1.436648e-03 524 9.500000e-01 1.408313e-03 525 1.000000e+00 1.382249e-03 526 1.050000e+00 1.358636e-03 527 1.100000e+00 1.337677e-03 528 1.150000e+00 1.319601e-03 529 1.200000e+00 1.304655e-03 530 1.250000e+00 1.293071e-03 531 1.300000e+00 1.284997e-03 532 1.350000e+00 1.280414e-03 533 1.400000e+00 1.278303e-03 534 1.450000e+00 1.277560e-03 535 1.500000e+00 1.277142e-03 536 1.550000e+00 1.276800e-03 537 1.600000e+00 1.276487e-03 538 1.650000e+00 1.276190e-03 539 1.700000e+00 1.275906e-03 540 1.750000e+00 1.275632e-03 541 1.800000e+00 1.275368e-03 542 1.850000e+00 1.275112e-03 543 1.900000e+00 1.274863e-03 544 1.950000e+00 1.274621e-03 545 2.000000e+00 1.274384e-03 546 2.050000e+00 1.274153e-03 547 2.100000e+00 1.273926e-03 548 2.150000e+00 1.273703e-03 549 2.200000e+00 1.273484e-03 550 2.250000e+00 1.273268e-03 551 2.300000e+00 1.273054e-03 552 2.350000e+00 1.272842e-03 553 2.400000e+00 1.272630e-03 554 2.450000e+00 1.272417e-03 555 2.500000e+00 1.272202e-03 556 2.550000e+00 1.271983e-03 557 2.600000e+00 1.271759e-03 558 2.650000e+00 1.271526e-03 559 2.700000e+00 1.271282e-03 560 2.750000e+00 1.271024e-03 561 2.800000e+00 1.270748e-03 562 2.850000e+00 1.270451e-03 563 2.900000e+00 1.270128e-03 564 2.950000e+00 1.269774e-03 565 3.000000e+00 1.269384e-03 566 3.050000e+00 1.268952e-03 567 3.100000e+00 1.268473e-03 568 3.150000e+00 1.267939e-03 569 3.200000e+00 1.267343e-03 570 3.250000e+00 1.266678e-03 571 3.300000e+00 1.265937e-03 572 3.350000e+00 1.265111e-03 573 3.400000e+00 1.264191e-03 574 3.450000e+00 1.263169e-03 575 3.500000e+00 1.262034e-03 576 3.550000e+00 1.260779e-03 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 577 3.600000e+00 1.259393e-03 578 3.650000e+00 1.257865e-03 579 3.700000e+00 1.256186e-03 580 3.750000e+00 1.254345e-03 581 3.800000e+00 1.252331e-03 582 3.850000e+00 1.250134e-03 583 3.900000e+00 1.247743e-03 584 3.950000e+00 1.245147e-03 585 4.000000e+00 1.242334e-03 586 4.050000e+00 1.239294e-03 587 4.100000e+00 1.236016e-03 588 4.150000e+00 1.232487e-03 589 4.200000e+00 1.228697e-03 590 4.250000e+00 1.224636e-03 591 4.300000e+00 1.220291e-03 592 4.350000e+00 1.215652e-03 593 4.400000e+00 1.210708e-03 594 4.450000e+00 1.205447e-03 595 4.500000e+00 1.199860e-03 596 4.550000e+00 1.193936e-03 597 4.600000e+00 1.187664e-03 598 4.650000e+00 1.181033e-03 599 4.700000e+00 1.174034e-03 600 4.750000e+00 1.166656e-03 601 4.800000e+00 1.158890e-03 602 4.850000e+00 1.150725e-03 603 4.900000e+00 1.142153e-03 604 4.950000e+00 1.133163e-03 605 5.000000e+00 1.123747e-03 606 0.000000e+00 1.172460e-02 607 5.000000e-02 1.014950e-02 608 1.000000e-01 8.786389e-03 609 1.500000e-01 7.579108e-03 610 2.000000e-01 6.511864e-03 611 2.500000e-01 5.586141e-03 612 3.000000e-01 4.831320e-03 613 3.500000e-01 4.270284e-03 614 4.000000e-01 3.910522e-03 615 4.500000e-01 3.710919e-03 616 5.000000e-01 3.607193e-03 617 5.500000e-01 3.543931e-03 618 6.000000e-01 3.491912e-03 619 6.500000e-01 3.442681e-03 620 7.000000e-01 3.394671e-03 621 7.500000e-01 3.347629e-03 622 8.000000e-01 3.301523e-03 623 8.500000e-01 3.256361e-03 624 9.000000e-01 3.212158e-03 625 9.500000e-01 3.168932e-03 626 1.000000e+00 3.126707e-03 627 1.050000e+00 3.085507e-03 628 1.100000e+00 3.045363e-03 629 1.150000e+00 3.006309e-03 630 1.200000e+00 2.968385e-03 631 1.250000e+00 2.931637e-03 632 1.300000e+00 2.896118e-03 633 1.350000e+00 2.861889e-03 634 1.400000e+00 2.829022e-03 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 635 1.450000e+00 2.797599e-03 636 1.500000e+00 2.767714e-03 637 1.550000e+00 2.739481e-03 638 1.600000e+00 2.713027e-03 639 1.650000e+00 2.688503e-03 640 1.700000e+00 2.666082e-03 641 1.750000e+00 2.645966e-03 642 1.800000e+00 2.628380e-03 643 1.850000e+00 2.613572e-03 644 1.900000e+00 2.601789e-03 645 1.950000e+00 2.593221e-03 646 2.000000e+00 2.587957e-03 647 2.050000e+00 2.585229e-03 648 2.100000e+00 2.584126e-03 649 2.150000e+00 2.583492e-03 650 2.200000e+00 2.582973e-03 651 2.250000e+00 2.582498e-03 652 2.300000e+00 2.582049e-03 653 2.350000e+00 2.581621e-03 654 2.400000e+00 2.581209e-03 655 2.450000e+00 2.580812e-03 656 2.500000e+00 2.580427e-03 657 2.550000e+00 2.580053e-03 658 2.600000e+00 2.579690e-03 659 2.650000e+00 2.579335e-03 660 2.700000e+00 2.578988e-03 661 2.750000e+00 2.578648e-03 662 2.800000e+00 2.578315e-03 663 2.850000e+00 2.577987e-03 664 2.900000e+00 2.577664e-03 665 2.950000e+00 2.577346e-03 666 3.000000e+00 2.577030e-03 667 3.050000e+00 2.576716e-03 668 3.100000e+00 2.576403e-03 669 3.150000e+00 2.576088e-03 670 3.200000e+00 2.575770e-03 671 3.250000e+00 2.575445e-03 672 3.300000e+00 2.575113e-03 673 3.350000e+00 2.574768e-03 674 3.400000e+00 2.574408e-03 675 3.450000e+00 2.574027e-03 676 3.500000e+00 2.573623e-03 677 3.550000e+00 2.573188e-03 678 3.600000e+00 2.572718e-03 679 3.650000e+00 2.572206e-03 680 3.700000e+00 2.571646e-03 681 3.750000e+00 2.571029e-03 682 3.800000e+00 2.570348e-03 683 3.850000e+00 2.569595e-03 684 3.900000e+00 2.568760e-03 685 3.950000e+00 2.567835e-03 686 4.000000e+00 2.566809e-03 687 4.050000e+00 2.565673e-03 688 4.100000e+00 2.564415e-03 689 4.150000e+00 2.563025e-03 690 4.200000e+00 2.561491e-03 691 4.250000e+00 2.559803e-03 692 4.300000e+00 2.557948e-03 Index v-sweep -i(vb) -------------------------------------------------------------------------------- 693 4.350000e+00 2.555914e-03 694 4.400000e+00 2.553690e-03 695 4.450000e+00 2.551263e-03 696 4.500000e+00 2.548620e-03 697 4.550000e+00 2.545751e-03 698 4.600000e+00 2.542642e-03 699 4.650000e+00 2.539281e-03 700 4.700000e+00 2.535656e-03 701 4.750000e+00 2.531755e-03 702 4.800000e+00 2.527566e-03 703 4.850000e+00 2.523078e-03 704 4.900000e+00 2.518279e-03 705 4.950000e+00 2.513156e-03 706 5.000000e+00 2.507701e-03 ngspice-26/tests/vbic/FO.cir0000644000265600020320000000075512264261473015330 0ustar andreasadminVBIC Output Test V1 V1_P V1_N 0.0 VB V1_N 0 0.5 VC Q1_C 0 0.0 Q1 Q1_C V1_P 0 N1 .OPTIONS NOACCT .DC VC 0 5 50M VB 700M 1 50M .print dc -i(vc) .print dc -i(vb) .MODEL N1 NPN LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .END ngspice-26/tests/vbic/temp.out0000644000265600020320000001136512264261473016022 0ustar andreasadmin No. of Data Rows : 101 Circuit: VBIC Temp test Doing analysis at TEMP = 423.150000 and TNOM = 300.150000 VBIC Temp test -------------------------------------------------------------------------------- Index v-sweep vc#branch vb#branch -------------------------------------------------------------------------------- 0 2.000000e-01 1.868249e-08 1.079689e-09 1 2.100000e-01 2.453418e-08 1.153221e-09 2 2.200000e-01 3.221038e-08 1.247754e-09 3 2.300000e-01 4.227973e-08 1.369766e-09 4 2.400000e-01 5.548800e-08 1.527717e-09 5 2.500000e-01 7.281323e-08 1.732674e-09 6 2.600000e-01 9.553798e-08 1.999129e-09 7 2.700000e-01 1.253441e-07 2.346079e-09 8 2.800000e-01 1.644367e-07 2.798443e-09 9 2.900000e-01 2.157072e-07 3.388919e-09 10 3.000000e-01 2.829459e-07 4.160429e-09 11 3.100000e-01 3.711216e-07 5.169337e-09 12 3.200000e-01 4.867465e-07 6.489673e-09 13 3.300000e-01 6.383548e-07 8.218687e-09 14 3.400000e-01 8.371283e-07 1.048415e-08 15 3.500000e-01 1.097714e-06 1.345398e-08 16 3.600000e-01 1.439291e-06 1.734884e-08 17 3.700000e-01 1.886967e-06 2.245873e-08 18 3.800000e-01 2.473592e-06 2.916484e-08 19 3.900000e-01 3.242119e-06 3.796820e-08 20 4.000000e-01 4.248673e-06 4.952732e-08 21 4.100000e-01 5.566512e-06 6.470771e-08 22 4.200000e-01 7.291143e-06 8.464678e-08 23 4.300000e-01 9.546875e-06 1.108391e-07 24 4.400000e-01 1.249517e-05 1.452480e-07 25 4.500000e-01 1.634521e-05 1.904521e-07 26 4.600000e-01 2.136704e-05 2.498366e-07 27 4.700000e-01 2.790785e-05 3.278434e-07 28 4.800000e-01 3.641147e-05 4.302969e-07 29 4.900000e-01 4.744139e-05 5.648281e-07 30 5.000000e-01 6.170667e-05 7.414238e-07 31 5.100000e-01 8.008980e-05 9.731369e-07 32 5.200000e-01 1.036773e-04 1.276999e-06 33 5.300000e-01 1.337890e-04 1.675189e-06 34 5.400000e-01 1.719999e-04 2.196519e-06 35 5.500000e-01 2.201527e-04 2.878315e-06 36 5.600000e-01 2.803579e-04 3.768776e-06 37 5.700000e-01 3.549791e-04 4.929914e-06 38 5.800000e-01 4.466032e-04 6.441185e-06 39 5.900000e-01 5.580024e-04 8.403926e-06 40 6.000000e-01 6.920914e-04 1.094672e-05 41 6.100000e-01 8.518886e-04 1.423179e-05 42 6.200000e-01 1.040483e-03 1.846243e-05 43 6.300000e-01 1.261007e-03 2.389158e-05 44 6.400000e-01 1.516613e-03 3.083127e-05 45 6.500000e-01 1.810446e-03 3.966278e-05 46 6.600000e-01 2.145602e-03 5.084699e-05 47 6.700000e-01 2.525072e-03 6.493424e-05 48 6.800000e-01 2.951665e-03 8.257291e-05 49 6.900000e-01 3.427908e-03 1.045161e-04 50 7.000000e-01 3.955907e-03 1.316270e-04 51 7.100000e-01 4.537133e-03 1.648896e-04 52 7.200000e-01 5.171970e-03 2.054502e-04 53 7.300000e-01 5.858746e-03 2.547448e-04 54 7.400000e-01 6.592797e-03 3.146449e-04 Index v-sweep vc#branch vb#branch -------------------------------------------------------------------------------- 55 7.500000e-01 7.367415e-03 3.873157e-04 56 7.600000e-01 8.175267e-03 4.749688e-04 57 7.700000e-01 9.009833e-03 5.795844e-04 58 7.800000e-01 9.865982e-03 7.027482e-04 59 7.900000e-01 1.073875e-02 8.457598e-04 60 8.000000e-01 1.162295e-02 1.009677e-03 61 8.100000e-01 1.251340e-02 1.195290e-03 62 8.200000e-01 1.340500e-02 1.403121e-03 63 8.300000e-01 1.429291e-02 1.633450e-03 64 8.400000e-01 1.517255e-02 1.886337e-03 65 8.500000e-01 1.603975e-02 2.161654e-03 66 8.600000e-01 1.689074e-02 2.459116e-03 67 8.700000e-01 1.772222e-02 2.778308e-03 68 8.800000e-01 1.853135e-02 3.118714e-03 69 8.900000e-01 1.931576e-02 3.479738e-03 70 9.000000e-01 2.007353e-02 3.860724e-03 71 9.100000e-01 2.080318e-02 4.260973e-03 72 9.200000e-01 2.150364e-02 4.679752e-03 73 9.300000e-01 2.217421e-02 5.116308e-03 74 9.400000e-01 2.281456e-02 5.569875e-03 75 9.500000e-01 2.342467e-02 6.039681e-03 76 9.600000e-01 2.400479e-02 6.524953e-03 77 9.700000e-01 2.455544e-02 7.024925e-03 78 9.800000e-01 2.507733e-02 7.538840e-03 79 9.900000e-01 2.557136e-02 8.065956e-03 80 1.000000e+00 2.603855e-02 8.605550e-03 81 1.010000e+00 2.648003e-02 9.156921e-03 82 1.020000e+00 2.689700e-02 9.719393e-03 83 1.030000e+00 2.729072e-02 1.029232e-02 84 1.040000e+00 2.766244e-02 1.087508e-02 85 1.050000e+00 2.801343e-02 1.146708e-02 86 1.060000e+00 2.834495e-02 1.206777e-02 87 1.070000e+00 2.865820e-02 1.267662e-02 88 1.080000e+00 2.895436e-02 1.329314e-02 89 1.090000e+00 2.923457e-02 1.391687e-02 90 1.100000e+00 2.949988e-02 1.454736e-02 91 1.110000e+00 2.975132e-02 1.518422e-02 92 1.120000e+00 2.998984e-02 1.582707e-02 93 1.130000e+00 3.021634e-02 1.647555e-02 94 1.140000e+00 3.043165e-02 1.712934e-02 95 1.150000e+00 3.063654e-02 1.778813e-02 96 1.160000e+00 3.083176e-02 1.845164e-02 97 1.170000e+00 3.101797e-02 1.911962e-02 98 1.180000e+00 3.119579e-02 1.979180e-02 99 1.190000e+00 3.136580e-02 2.046798e-02 100 1.200000e+00 3.152854e-02 2.114793e-02 ngspice-26/tests/vbic/CEamp.out0000644000265600020320000010517712264261473016047 0ustar andreasadmin Circuit: VBIC Pole Zero Test Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 VBIC Pole Zero Test AC Analysis Sat Aug 27 16:37:48 2005 ---------------------------------------------------------------- Index frequency db(i(vmeas)) ---------------------------------------------------------------- 0 1.000000e+05 3.267930e+01 1 1.023293e+05 3.267947e+01 2 1.047129e+05 3.267963e+01 3 1.071519e+05 3.267979e+01 4 1.096478e+05 3.267994e+01 5 1.122018e+05 3.268008e+01 6 1.148154e+05 3.268022e+01 7 1.174898e+05 3.268035e+01 8 1.202264e+05 3.268047e+01 9 1.230269e+05 3.268059e+01 10 1.258925e+05 3.268070e+01 11 1.288250e+05 3.268081e+01 12 1.318257e+05 3.268092e+01 13 1.348963e+05 3.268101e+01 14 1.380384e+05 3.268111e+01 15 1.412538e+05 3.268120e+01 16 1.445440e+05 3.268128e+01 17 1.479108e+05 3.268137e+01 18 1.513561e+05 3.268145e+01 19 1.548817e+05 3.268152e+01 20 1.584893e+05 3.268159e+01 21 1.621810e+05 3.268166e+01 22 1.659587e+05 3.268172e+01 23 1.698244e+05 3.268179e+01 24 1.737801e+05 3.268185e+01 25 1.778279e+05 3.268190e+01 26 1.819701e+05 3.268196e+01 27 1.862087e+05 3.268201e+01 28 1.905461e+05 3.268206e+01 29 1.949845e+05 3.268210e+01 30 1.995262e+05 3.268215e+01 31 2.041738e+05 3.268219e+01 32 2.089296e+05 3.268223e+01 33 2.137962e+05 3.268227e+01 34 2.187762e+05 3.268231e+01 35 2.238721e+05 3.268234e+01 36 2.290868e+05 3.268238e+01 37 2.344229e+05 3.268241e+01 38 2.398833e+05 3.268244e+01 39 2.454709e+05 3.268247e+01 40 2.511886e+05 3.268250e+01 41 2.570396e+05 3.268253e+01 42 2.630268e+05 3.268255e+01 43 2.691535e+05 3.268258e+01 44 2.754229e+05 3.268260e+01 45 2.818383e+05 3.268262e+01 46 2.884032e+05 3.268264e+01 47 2.951209e+05 3.268266e+01 48 3.019952e+05 3.268268e+01 49 3.090295e+05 3.268270e+01 50 3.162278e+05 3.268272e+01 51 3.235937e+05 3.268273e+01 52 3.311311e+05 3.268275e+01 53 3.388442e+05 3.268276e+01 54 3.467369e+05 3.268278e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 55 3.548134e+05 3.268279e+01 56 3.630781e+05 3.268280e+01 57 3.715352e+05 3.268282e+01 58 3.801894e+05 3.268283e+01 59 3.890451e+05 3.268284e+01 60 3.981072e+05 3.268285e+01 61 4.073803e+05 3.268286e+01 62 4.168694e+05 3.268287e+01 63 4.265795e+05 3.268288e+01 64 4.365158e+05 3.268288e+01 65 4.466836e+05 3.268289e+01 66 4.570882e+05 3.268290e+01 67 4.677351e+05 3.268291e+01 68 4.786301e+05 3.268291e+01 69 4.897788e+05 3.268292e+01 70 5.011872e+05 3.268292e+01 71 5.128614e+05 3.268293e+01 72 5.248075e+05 3.268293e+01 73 5.370318e+05 3.268294e+01 74 5.495409e+05 3.268294e+01 75 5.623413e+05 3.268294e+01 76 5.754399e+05 3.268295e+01 77 5.888437e+05 3.268295e+01 78 6.025596e+05 3.268295e+01 79 6.165950e+05 3.268295e+01 80 6.309573e+05 3.268296e+01 81 6.456542e+05 3.268296e+01 82 6.606934e+05 3.268296e+01 83 6.760830e+05 3.268296e+01 84 6.918310e+05 3.268296e+01 85 7.079458e+05 3.268296e+01 86 7.244360e+05 3.268296e+01 87 7.413102e+05 3.268296e+01 88 7.585776e+05 3.268296e+01 89 7.762471e+05 3.268296e+01 90 7.943282e+05 3.268296e+01 91 8.128305e+05 3.268295e+01 92 8.317638e+05 3.268295e+01 93 8.511380e+05 3.268295e+01 94 8.709636e+05 3.268295e+01 95 8.912509e+05 3.268294e+01 96 9.120108e+05 3.268294e+01 97 9.332543e+05 3.268294e+01 98 9.549926e+05 3.268293e+01 99 9.772372e+05 3.268293e+01 100 1.000000e+06 3.268292e+01 101 1.023293e+06 3.268292e+01 102 1.047129e+06 3.268291e+01 103 1.071519e+06 3.268290e+01 104 1.096478e+06 3.268290e+01 105 1.122018e+06 3.268289e+01 106 1.148154e+06 3.268288e+01 107 1.174898e+06 3.268287e+01 108 1.202264e+06 3.268286e+01 109 1.230269e+06 3.268285e+01 110 1.258925e+06 3.268285e+01 111 1.288250e+06 3.268283e+01 112 1.318257e+06 3.268282e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 113 1.348963e+06 3.268281e+01 114 1.380384e+06 3.268280e+01 115 1.412538e+06 3.268279e+01 116 1.445440e+06 3.268277e+01 117 1.479108e+06 3.268276e+01 118 1.513561e+06 3.268274e+01 119 1.548817e+06 3.268273e+01 120 1.584893e+06 3.268271e+01 121 1.621810e+06 3.268269e+01 122 1.659587e+06 3.268268e+01 123 1.698244e+06 3.268266e+01 124 1.737801e+06 3.268264e+01 125 1.778279e+06 3.268261e+01 126 1.819701e+06 3.268259e+01 127 1.862087e+06 3.268257e+01 128 1.905461e+06 3.268254e+01 129 1.949845e+06 3.268252e+01 130 1.995262e+06 3.268249e+01 131 2.041738e+06 3.268246e+01 132 2.089296e+06 3.268243e+01 133 2.137962e+06 3.268240e+01 134 2.187762e+06 3.268237e+01 135 2.238721e+06 3.268233e+01 136 2.290868e+06 3.268230e+01 137 2.344229e+06 3.268226e+01 138 2.398833e+06 3.268222e+01 139 2.454709e+06 3.268218e+01 140 2.511886e+06 3.268214e+01 141 2.570396e+06 3.268209e+01 142 2.630268e+06 3.268204e+01 143 2.691535e+06 3.268199e+01 144 2.754229e+06 3.268194e+01 145 2.818383e+06 3.268189e+01 146 2.884032e+06 3.268183e+01 147 2.951209e+06 3.268177e+01 148 3.019952e+06 3.268170e+01 149 3.090295e+06 3.268164e+01 150 3.162278e+06 3.268157e+01 151 3.235937e+06 3.268150e+01 152 3.311311e+06 3.268142e+01 153 3.388442e+06 3.268134e+01 154 3.467369e+06 3.268126e+01 155 3.548134e+06 3.268117e+01 156 3.630781e+06 3.268108e+01 157 3.715352e+06 3.268099e+01 158 3.801894e+06 3.268089e+01 159 3.890451e+06 3.268078e+01 160 3.981072e+06 3.268067e+01 161 4.073803e+06 3.268056e+01 162 4.168694e+06 3.268044e+01 163 4.265795e+06 3.268031e+01 164 4.365158e+06 3.268018e+01 165 4.466836e+06 3.268004e+01 166 4.570882e+06 3.267989e+01 167 4.677351e+06 3.267974e+01 168 4.786301e+06 3.267958e+01 169 4.897788e+06 3.267942e+01 170 5.011872e+06 3.267924e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 171 5.128614e+06 3.267906e+01 172 5.248075e+06 3.267887e+01 173 5.370318e+06 3.267867e+01 174 5.495409e+06 3.267846e+01 175 5.623413e+06 3.267824e+01 176 5.754399e+06 3.267802e+01 177 5.888437e+06 3.267778e+01 178 6.025596e+06 3.267752e+01 179 6.165950e+06 3.267726e+01 180 6.309573e+06 3.267699e+01 181 6.456542e+06 3.267670e+01 182 6.606934e+06 3.267639e+01 183 6.760830e+06 3.267608e+01 184 6.918310e+06 3.267575e+01 185 7.079458e+06 3.267540e+01 186 7.244360e+06 3.267504e+01 187 7.413102e+06 3.267466e+01 188 7.585776e+06 3.267426e+01 189 7.762471e+06 3.267384e+01 190 7.943282e+06 3.267341e+01 191 8.128305e+06 3.267295e+01 192 8.317638e+06 3.267247e+01 193 8.511380e+06 3.267197e+01 194 8.709636e+06 3.267145e+01 195 8.912509e+06 3.267090e+01 196 9.120108e+06 3.267032e+01 197 9.332543e+06 3.266972e+01 198 9.549926e+06 3.266909e+01 199 9.772372e+06 3.266843e+01 200 1.000000e+07 3.266774e+01 201 1.023293e+07 3.266702e+01 202 1.047129e+07 3.266626e+01 203 1.071519e+07 3.266547e+01 204 1.096478e+07 3.266464e+01 205 1.122018e+07 3.266377e+01 206 1.148154e+07 3.266286e+01 207 1.174898e+07 3.266191e+01 208 1.202264e+07 3.266091e+01 209 1.230269e+07 3.265987e+01 210 1.258925e+07 3.265877e+01 211 1.288250e+07 3.265763e+01 212 1.318257e+07 3.265643e+01 213 1.348963e+07 3.265518e+01 214 1.380384e+07 3.265387e+01 215 1.412538e+07 3.265249e+01 216 1.445440e+07 3.265106e+01 217 1.479108e+07 3.264955e+01 218 1.513561e+07 3.264798e+01 219 1.548817e+07 3.264633e+01 220 1.584893e+07 3.264460e+01 221 1.621810e+07 3.264279e+01 222 1.659587e+07 3.264090e+01 223 1.698244e+07 3.263892e+01 224 1.737801e+07 3.263685e+01 225 1.778279e+07 3.263468e+01 226 1.819701e+07 3.263241e+01 227 1.862087e+07 3.263004e+01 228 1.905461e+07 3.262755e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 229 1.949845e+07 3.262495e+01 230 1.995262e+07 3.262223e+01 231 2.041738e+07 3.261938e+01 232 2.089296e+07 3.261640e+01 233 2.137962e+07 3.261328e+01 234 2.187762e+07 3.261002e+01 235 2.238721e+07 3.260661e+01 236 2.290868e+07 3.260303e+01 237 2.344229e+07 3.259930e+01 238 2.398833e+07 3.259538e+01 239 2.454709e+07 3.259129e+01 240 2.511886e+07 3.258701e+01 241 2.570396e+07 3.258254e+01 242 2.630268e+07 3.257785e+01 243 2.691535e+07 3.257296e+01 244 2.754229e+07 3.256783e+01 245 2.818383e+07 3.256247e+01 246 2.884032e+07 3.255687e+01 247 2.951209e+07 3.255101e+01 248 3.019952e+07 3.254488e+01 249 3.090295e+07 3.253848e+01 250 3.162278e+07 3.253178e+01 251 3.235937e+07 3.252477e+01 252 3.311311e+07 3.251745e+01 253 3.388442e+07 3.250980e+01 254 3.467369e+07 3.250180e+01 255 3.548134e+07 3.249344e+01 256 3.630781e+07 3.248470e+01 257 3.715352e+07 3.247557e+01 258 3.801894e+07 3.246603e+01 259 3.890451e+07 3.245606e+01 260 3.981072e+07 3.244564e+01 261 4.073803e+07 3.243477e+01 262 4.168694e+07 3.242341e+01 263 4.265795e+07 3.241154e+01 264 4.365158e+07 3.239915e+01 265 4.466836e+07 3.238622e+01 266 4.570882e+07 3.237271e+01 267 4.677351e+07 3.235862e+01 268 4.786301e+07 3.234391e+01 269 4.897788e+07 3.232856e+01 270 5.011872e+07 3.231254e+01 271 5.128614e+07 3.229583e+01 272 5.248075e+07 3.227840e+01 273 5.370318e+07 3.226023e+01 274 5.495409e+07 3.224128e+01 275 5.623413e+07 3.222153e+01 276 5.754399e+07 3.220094e+01 277 5.888437e+07 3.217948e+01 278 6.025596e+07 3.215713e+01 279 6.165950e+07 3.213385e+01 280 6.309573e+07 3.210960e+01 281 6.456542e+07 3.208435e+01 282 6.606934e+07 3.205807e+01 283 6.760830e+07 3.203072e+01 284 6.918310e+07 3.200226e+01 285 7.079458e+07 3.197267e+01 286 7.244360e+07 3.194189e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 287 7.413102e+07 3.190989e+01 288 7.585776e+07 3.187664e+01 289 7.762471e+07 3.184209e+01 290 7.943282e+07 3.180620e+01 291 8.128305e+07 3.176894e+01 292 8.317638e+07 3.173026e+01 293 8.511380e+07 3.169012e+01 294 8.709636e+07 3.164849e+01 295 8.912509e+07 3.160532e+01 296 9.120108e+07 3.156056e+01 297 9.332543e+07 3.151419e+01 298 9.549926e+07 3.146616e+01 299 9.772372e+07 3.141642e+01 300 1.000000e+08 3.136495e+01 301 1.023293e+08 3.131170e+01 302 1.047129e+08 3.125662e+01 303 1.071519e+08 3.119969e+01 304 1.096478e+08 3.114087e+01 305 1.122018e+08 3.108011e+01 306 1.148154e+08 3.101739e+01 307 1.174898e+08 3.095268e+01 308 1.202264e+08 3.088592e+01 309 1.230269e+08 3.081711e+01 310 1.258925e+08 3.074620e+01 311 1.288250e+08 3.067317e+01 312 1.318257e+08 3.059799e+01 313 1.348963e+08 3.052064e+01 314 1.380384e+08 3.044109e+01 315 1.412538e+08 3.035933e+01 316 1.445440e+08 3.027533e+01 317 1.479108e+08 3.018908e+01 318 1.513561e+08 3.010057e+01 319 1.548817e+08 3.000977e+01 320 1.584893e+08 2.991669e+01 321 1.621810e+08 2.982131e+01 322 1.659587e+08 2.972363e+01 323 1.698244e+08 2.962365e+01 324 1.737801e+08 2.952137e+01 325 1.778279e+08 2.941678e+01 326 1.819701e+08 2.930990e+01 327 1.862087e+08 2.920074e+01 328 1.905461e+08 2.908929e+01 329 1.949845e+08 2.897558e+01 330 1.995262e+08 2.885961e+01 331 2.041738e+08 2.874141e+01 332 2.089296e+08 2.862099e+01 333 2.137962e+08 2.849838e+01 334 2.187762e+08 2.837358e+01 335 2.238721e+08 2.824664e+01 336 2.290868e+08 2.811758e+01 337 2.344229e+08 2.798642e+01 338 2.398833e+08 2.785320e+01 339 2.454709e+08 2.771794e+01 340 2.511886e+08 2.758068e+01 341 2.570396e+08 2.744146e+01 342 2.630268e+08 2.730030e+01 343 2.691535e+08 2.715724e+01 344 2.754229e+08 2.701233e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 345 2.818383e+08 2.686559e+01 346 2.884032e+08 2.671708e+01 347 2.951209e+08 2.656682e+01 348 3.019952e+08 2.641485e+01 349 3.090295e+08 2.626122e+01 350 3.162278e+08 2.610597e+01 351 3.235937e+08 2.594914e+01 352 3.311311e+08 2.579076e+01 353 3.388442e+08 2.563089e+01 354 3.467369e+08 2.546955e+01 355 3.548134e+08 2.530679e+01 356 3.630781e+08 2.514266e+01 357 3.715352e+08 2.497718e+01 358 3.801894e+08 2.481040e+01 359 3.890451e+08 2.464237e+01 360 3.981072e+08 2.447310e+01 361 4.073803e+08 2.430266e+01 362 4.168694e+08 2.413107e+01 363 4.265795e+08 2.395837e+01 364 4.365158e+08 2.378459e+01 365 4.466836e+08 2.360977e+01 366 4.570882e+08 2.343396e+01 367 4.677351e+08 2.325717e+01 368 4.786301e+08 2.307945e+01 369 4.897788e+08 2.290082e+01 370 5.011872e+08 2.272132e+01 371 5.128614e+08 2.254098e+01 372 5.248075e+08 2.235983e+01 373 5.370318e+08 2.217789e+01 374 5.495409e+08 2.199521e+01 375 5.623413e+08 2.181180e+01 376 5.754399e+08 2.162768e+01 377 5.888437e+08 2.144290e+01 378 6.025596e+08 2.125747e+01 379 6.165950e+08 2.107141e+01 380 6.309573e+08 2.088476e+01 381 6.456542e+08 2.069753e+01 382 6.606934e+08 2.050974e+01 383 6.760830e+08 2.032142e+01 384 6.918310e+08 2.013258e+01 385 7.079458e+08 1.994325e+01 386 7.244360e+08 1.975345e+01 387 7.413102e+08 1.956319e+01 388 7.585776e+08 1.937249e+01 389 7.762471e+08 1.918137e+01 390 7.943282e+08 1.898984e+01 391 8.128305e+08 1.879793e+01 392 8.317638e+08 1.860563e+01 393 8.511380e+08 1.841298e+01 394 8.709636e+08 1.821998e+01 395 8.912509e+08 1.802665e+01 396 9.120108e+08 1.783300e+01 397 9.332543e+08 1.763904e+01 398 9.549926e+08 1.744478e+01 399 9.772372e+08 1.725023e+01 400 1.000000e+09 1.705541e+01 401 1.023293e+09 1.686033e+01 402 1.047129e+09 1.666498e+01 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 403 1.071519e+09 1.646940e+01 404 1.096478e+09 1.627357e+01 405 1.122018e+09 1.607751e+01 406 1.148154e+09 1.588124e+01 407 1.174898e+09 1.568474e+01 408 1.202264e+09 1.548804e+01 409 1.230269e+09 1.529114e+01 410 1.258925e+09 1.509405e+01 411 1.288250e+09 1.489676e+01 412 1.318257e+09 1.469930e+01 413 1.348963e+09 1.450165e+01 414 1.380384e+09 1.430384e+01 415 1.412538e+09 1.410585e+01 416 1.445440e+09 1.390770e+01 417 1.479108e+09 1.370940e+01 418 1.513561e+09 1.351093e+01 419 1.548817e+09 1.331232e+01 420 1.584893e+09 1.311355e+01 421 1.621810e+09 1.291464e+01 422 1.659587e+09 1.271558e+01 423 1.698244e+09 1.251638e+01 424 1.737801e+09 1.231705e+01 425 1.778279e+09 1.211757e+01 426 1.819701e+09 1.191796e+01 427 1.862087e+09 1.171822e+01 428 1.905461e+09 1.151834e+01 429 1.949845e+09 1.131833e+01 430 1.995262e+09 1.111819e+01 431 2.041738e+09 1.091792e+01 432 2.089296e+09 1.071752e+01 433 2.137962e+09 1.051699e+01 434 2.187762e+09 1.031634e+01 435 2.238721e+09 1.011555e+01 436 2.290868e+09 9.914631e+00 437 2.344229e+09 9.713585e+00 438 2.398833e+09 9.512408e+00 439 2.454709e+09 9.311102e+00 440 2.511886e+09 9.109664e+00 441 2.570396e+09 8.908095e+00 442 2.630268e+09 8.706393e+00 443 2.691535e+09 8.504558e+00 444 2.754229e+09 8.302589e+00 445 2.818383e+09 8.100485e+00 446 2.884032e+09 7.898245e+00 447 2.951209e+09 7.695869e+00 448 3.019952e+09 7.493355e+00 449 3.090295e+09 7.290702e+00 450 3.162278e+09 7.087910e+00 451 3.235937e+09 6.884978e+00 452 3.311311e+09 6.681906e+00 453 3.388442e+09 6.478692e+00 454 3.467369e+09 6.275337e+00 455 3.548134e+09 6.071840e+00 456 3.630781e+09 5.868202e+00 457 3.715352e+09 5.664422e+00 458 3.801894e+09 5.460502e+00 459 3.890451e+09 5.256441e+00 460 3.981072e+09 5.052242e+00 Index frequency db(i(vmeas)) ---------------------------------------------------------------- 461 4.073803e+09 4.847906e+00 462 4.168694e+09 4.643434e+00 463 4.265795e+09 4.438830e+00 464 4.365158e+09 4.234096e+00 465 4.466836e+09 4.029234e+00 466 4.570882e+09 3.824251e+00 467 4.677351e+09 3.619149e+00 468 4.786301e+09 3.413934e+00 469 4.897788e+09 3.208612e+00 470 5.011872e+09 3.003189e+00 471 5.128614e+09 2.797673e+00 472 5.248075e+09 2.592072e+00 473 5.370318e+09 2.386395e+00 474 5.495409e+09 2.180651e+00 475 5.623413e+09 1.974852e+00 476 5.754399e+09 1.769009e+00 477 5.888437e+09 1.563134e+00 478 6.025596e+09 1.357241e+00 479 6.165950e+09 1.151346e+00 480 6.309573e+09 9.454625e-01 481 6.456542e+09 7.396088e-01 482 6.606934e+09 5.338023e-01 483 6.760830e+09 3.280619e-01 484 6.918310e+09 1.224078e-01 485 7.079458e+09 -8.31388e-02 486 7.244360e+09 -2.88556e-01 487 7.413102e+09 -4.93820e-01 488 7.585776e+09 -6.98906e-01 489 7.762471e+09 -9.03789e-01 490 7.943282e+09 -1.10844e+00 491 8.128305e+09 -1.31284e+00 492 8.317638e+09 -1.51695e+00 493 8.511380e+09 -1.72074e+00 494 8.709636e+09 -1.92418e+00 495 8.912509e+09 -2.12725e+00 496 9.120108e+09 -2.32991e+00 497 9.332543e+09 -2.53212e+00 498 9.549926e+09 -2.73385e+00 499 9.772372e+09 -2.93507e+00 500 1.000000e+10 -3.13573e+00 VBIC Pole Zero Test AC Analysis Sat Aug 27 16:37:48 2005 ---------------------------------------------------------------- Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 0 1.000000e+05 2.902630e-02 1 1.023293e+05 2.833836e-02 2 1.047129e+05 2.766541e-02 3 1.071519e+05 2.700710e-02 4 1.096478e+05 2.636307e-02 5 1.122018e+05 2.573300e-02 6 1.148154e+05 2.511655e-02 7 1.174898e+05 2.451338e-02 8 1.202264e+05 2.392319e-02 9 1.230269e+05 2.334567e-02 10 1.258925e+05 2.278050e-02 11 1.288250e+05 2.222740e-02 12 1.318257e+05 2.168606e-02 13 1.348963e+05 2.115620e-02 14 1.380384e+05 2.063755e-02 15 1.412538e+05 2.012982e-02 16 1.445440e+05 1.963275e-02 17 1.479108e+05 1.914609e-02 18 1.513561e+05 1.866956e-02 19 1.548817e+05 1.820292e-02 20 1.584893e+05 1.774592e-02 21 1.621810e+05 1.729832e-02 22 1.659587e+05 1.685989e-02 23 1.698244e+05 1.643038e-02 24 1.737801e+05 1.600958e-02 25 1.778279e+05 1.559726e-02 26 1.819701e+05 1.519321e-02 27 1.862087e+05 1.479720e-02 28 1.905461e+05 1.440904e-02 29 1.949845e+05 1.402851e-02 30 1.995262e+05 1.365541e-02 31 2.041738e+05 1.328954e-02 32 2.089296e+05 1.293072e-02 33 2.137962e+05 1.257876e-02 34 2.187762e+05 1.223345e-02 35 2.238721e+05 1.189463e-02 36 2.290868e+05 1.156212e-02 37 2.344229e+05 1.123573e-02 38 2.398833e+05 1.091529e-02 39 2.454709e+05 1.060064e-02 40 2.511886e+05 1.029161e-02 41 2.570396e+05 9.988034e-03 42 2.630268e+05 9.689751e-03 43 2.691535e+05 9.396603e-03 44 2.754229e+05 9.108435e-03 45 2.818383e+05 8.825095e-03 46 2.884032e+05 8.546432e-03 47 2.951209e+05 8.272300e-03 48 3.019952e+05 8.002552e-03 49 3.090295e+05 7.737045e-03 50 3.162278e+05 7.475640e-03 51 3.235937e+05 7.218197e-03 52 3.311311e+05 6.964581e-03 53 3.388442e+05 6.714656e-03 54 3.467369e+05 6.468290e-03 Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 55 3.548134e+05 6.225353e-03 56 3.630781e+05 5.985716e-03 57 3.715352e+05 5.749252e-03 58 3.801894e+05 5.515836e-03 59 3.890451e+05 5.285344e-03 60 3.981072e+05 5.057653e-03 61 4.073803e+05 4.832643e-03 62 4.168694e+05 4.610195e-03 63 4.265795e+05 4.390191e-03 64 4.365158e+05 4.172515e-03 65 4.466836e+05 3.957050e-03 66 4.570882e+05 3.743683e-03 67 4.677351e+05 3.532301e-03 68 4.786301e+05 3.322791e-03 69 4.897788e+05 3.115042e-03 70 5.011872e+05 2.908945e-03 71 5.128614e+05 2.704390e-03 72 5.248075e+05 2.501269e-03 73 5.370318e+05 2.299474e-03 74 5.495409e+05 2.098897e-03 75 5.623413e+05 1.899434e-03 76 5.754399e+05 1.700977e-03 77 5.888437e+05 1.503422e-03 78 6.025596e+05 1.306664e-03 79 6.165950e+05 1.110599e-03 80 6.309573e+05 9.151228e-04 81 6.456542e+05 7.201316e-04 82 6.606934e+05 5.255221e-04 83 6.760830e+05 3.311912e-04 84 6.918310e+05 1.370359e-04 85 7.079458e+05 -5.70468e-05 86 7.244360e+05 -2.51160e-04 87 7.413102e+05 -4.45406e-04 88 7.585776e+05 -6.39888e-04 89 7.762471e+05 -8.34709e-04 90 7.943282e+05 -1.02997e-03 91 8.128305e+05 -1.22578e-03 92 8.317638e+05 -1.42224e-03 93 8.511380e+05 -1.61946e-03 94 8.709636e+05 -1.81753e-03 95 8.912509e+05 -2.01657e-03 96 9.120108e+05 -2.21667e-03 97 9.332543e+05 -2.41795e-03 98 9.549926e+05 -2.62051e-03 99 9.772372e+05 -2.82446e-03 100 1.000000e+06 -3.02991e-03 101 1.023293e+06 -3.23697e-03 102 1.047129e+06 -3.44574e-03 103 1.071519e+06 -3.65633e-03 104 1.096478e+06 -3.86887e-03 105 1.122018e+06 -4.08346e-03 106 1.148154e+06 -4.30021e-03 107 1.174898e+06 -4.51924e-03 108 1.202264e+06 -4.74066e-03 109 1.230269e+06 -4.96460e-03 110 1.258925e+06 -5.19118e-03 111 1.288250e+06 -5.42050e-03 112 1.318257e+06 -5.65270e-03 Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 113 1.348963e+06 -5.88789e-03 114 1.380384e+06 -6.12620e-03 115 1.412538e+06 -6.36776e-03 116 1.445440e+06 -6.61270e-03 117 1.479108e+06 -6.86114e-03 118 1.513561e+06 -7.11322e-03 119 1.548817e+06 -7.36907e-03 120 1.584893e+06 -7.62883e-03 121 1.621810e+06 -7.89263e-03 122 1.659587e+06 -8.16061e-03 123 1.698244e+06 -8.43292e-03 124 1.737801e+06 -8.70970e-03 125 1.778279e+06 -8.99109e-03 126 1.819701e+06 -9.27725e-03 127 1.862087e+06 -9.56833e-03 128 1.905461e+06 -9.86448e-03 129 1.949845e+06 -1.01659e-02 130 1.995262e+06 -1.04726e-02 131 2.041738e+06 -1.07849e-02 132 2.089296e+06 -1.11030e-02 133 2.137962e+06 -1.14269e-02 134 2.187762e+06 -1.17569e-02 135 2.238721e+06 -1.20931e-02 136 2.290868e+06 -1.24357e-02 137 2.344229e+06 -1.27849e-02 138 2.398833e+06 -1.31408e-02 139 2.454709e+06 -1.35038e-02 140 2.511886e+06 -1.38739e-02 141 2.570396e+06 -1.42513e-02 142 2.630268e+06 -1.46363e-02 143 2.691535e+06 -1.50291e-02 144 2.754229e+06 -1.54298e-02 145 2.818383e+06 -1.58387e-02 146 2.884032e+06 -1.62559e-02 147 2.951209e+06 -1.66818e-02 148 3.019952e+06 -1.71166e-02 149 3.090295e+06 -1.75604e-02 150 3.162278e+06 -1.80135e-02 151 3.235937e+06 -1.84761e-02 152 3.311311e+06 -1.89485e-02 153 3.388442e+06 -1.94310e-02 154 3.467369e+06 -1.99237e-02 155 3.548134e+06 -2.04271e-02 156 3.630781e+06 -2.09412e-02 157 3.715352e+06 -2.14664e-02 158 3.801894e+06 -2.20030e-02 159 3.890451e+06 -2.25512e-02 160 3.981072e+06 -2.31114e-02 161 4.073803e+06 -2.36838e-02 162 4.168694e+06 -2.42687e-02 163 4.265795e+06 -2.48665e-02 164 4.365158e+06 -2.54774e-02 165 4.466836e+06 -2.61019e-02 166 4.570882e+06 -2.67401e-02 167 4.677351e+06 -2.73925e-02 168 4.786301e+06 -2.80594e-02 169 4.897788e+06 -2.87411e-02 170 5.011872e+06 -2.94380e-02 Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 171 5.128614e+06 -3.01505e-02 172 5.248075e+06 -3.08790e-02 173 5.370318e+06 -3.16238e-02 174 5.495409e+06 -3.23853e-02 175 5.623413e+06 -3.31639e-02 176 5.754399e+06 -3.39601e-02 177 5.888437e+06 -3.47742e-02 178 6.025596e+06 -3.56066e-02 179 6.165950e+06 -3.64579e-02 180 6.309573e+06 -3.73285e-02 181 6.456542e+06 -3.82188e-02 182 6.606934e+06 -3.91292e-02 183 6.760830e+06 -4.00603e-02 184 6.918310e+06 -4.10126e-02 185 7.079458e+06 -4.19865e-02 186 7.244360e+06 -4.29826e-02 187 7.413102e+06 -4.40013e-02 188 7.585776e+06 -4.50433e-02 189 7.762471e+06 -4.61090e-02 190 7.943282e+06 -4.71990e-02 191 8.128305e+06 -4.83139e-02 192 8.317638e+06 -4.94542e-02 193 8.511380e+06 -5.06206e-02 194 8.709636e+06 -5.18137e-02 195 8.912509e+06 -5.30340e-02 196 9.120108e+06 -5.42823e-02 197 9.332543e+06 -5.55591e-02 198 9.549926e+06 -5.68651e-02 199 9.772372e+06 -5.82010e-02 200 1.000000e+07 -5.95675e-02 201 1.023293e+07 -6.09652e-02 202 1.047129e+07 -6.23950e-02 203 1.071519e+07 -6.38575e-02 204 1.096478e+07 -6.53536e-02 205 1.122018e+07 -6.68838e-02 206 1.148154e+07 -6.84492e-02 207 1.174898e+07 -7.00503e-02 208 1.202264e+07 -7.16881e-02 209 1.230269e+07 -7.33635e-02 210 1.258925e+07 -7.50771e-02 211 1.288250e+07 -7.68300e-02 212 1.318257e+07 -7.86230e-02 213 1.348963e+07 -8.04570e-02 214 1.380384e+07 -8.23330e-02 215 1.412538e+07 -8.42518e-02 216 1.445440e+07 -8.62144e-02 217 1.479108e+07 -8.82219e-02 218 1.513561e+07 -9.02752e-02 219 1.548817e+07 -9.23753e-02 220 1.584893e+07 -9.45234e-02 221 1.621810e+07 -9.67204e-02 222 1.659587e+07 -9.89674e-02 223 1.698244e+07 -1.01265e-01 224 1.737801e+07 -1.03616e-01 225 1.778279e+07 -1.06020e-01 226 1.819701e+07 -1.08478e-01 227 1.862087e+07 -1.10992e-01 228 1.905461e+07 -1.13563e-01 Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 229 1.949845e+07 -1.16193e-01 230 1.995262e+07 -1.18881e-01 231 2.041738e+07 -1.21631e-01 232 2.089296e+07 -1.24442e-01 233 2.137962e+07 -1.27317e-01 234 2.187762e+07 -1.30256e-01 235 2.238721e+07 -1.33262e-01 236 2.290868e+07 -1.36335e-01 237 2.344229e+07 -1.39476e-01 238 2.398833e+07 -1.42688e-01 239 2.454709e+07 -1.45972e-01 240 2.511886e+07 -1.49329e-01 241 2.570396e+07 -1.52760e-01 242 2.630268e+07 -1.56268e-01 243 2.691535e+07 -1.59853e-01 244 2.754229e+07 -1.63517e-01 245 2.818383e+07 -1.67262e-01 246 2.884032e+07 -1.71090e-01 247 2.951209e+07 -1.75001e-01 248 3.019952e+07 -1.78998e-01 249 3.090295e+07 -1.83082e-01 250 3.162278e+07 -1.87255e-01 251 3.235937e+07 -1.91518e-01 252 3.311311e+07 -1.95873e-01 253 3.388442e+07 -2.00322e-01 254 3.467369e+07 -2.04867e-01 255 3.548134e+07 -2.09508e-01 256 3.630781e+07 -2.14248e-01 257 3.715352e+07 -2.19089e-01 258 3.801894e+07 -2.24032e-01 259 3.890451e+07 -2.29078e-01 260 3.981072e+07 -2.34230e-01 261 4.073803e+07 -2.39490e-01 262 4.168694e+07 -2.44857e-01 263 4.265795e+07 -2.50336e-01 264 4.365158e+07 -2.55926e-01 265 4.466836e+07 -2.61630e-01 266 4.570882e+07 -2.67449e-01 267 4.677351e+07 -2.73385e-01 268 4.786301e+07 -2.79439e-01 269 4.897788e+07 -2.85613e-01 270 5.011872e+07 -2.91907e-01 271 5.128614e+07 -2.98325e-01 272 5.248075e+07 -3.04866e-01 273 5.370318e+07 -3.11532e-01 274 5.495409e+07 -3.18325e-01 275 5.623413e+07 -3.25245e-01 276 5.754399e+07 -3.32294e-01 277 5.888437e+07 -3.39472e-01 278 6.025596e+07 -3.46781e-01 279 6.165950e+07 -3.54221e-01 280 6.309573e+07 -3.61793e-01 281 6.456542e+07 -3.69498e-01 282 6.606934e+07 -3.77336e-01 283 6.760830e+07 -3.85307e-01 284 6.918310e+07 -3.93413e-01 285 7.079458e+07 -4.01652e-01 286 7.244360e+07 -4.10025e-01 Index frequency ph(i(vmeas)) ---------------------------------------------------------------- 287 7.413102e+07 -4.18532e-01 288 7.585776e+07 -4.27172e-01 289 7.762471e+07 -4.35945e-01 290 7.943282e+07 -4.44851e-01 291 8.128305e+07 -4.53888e-01 292 8.317638e+07 -4.63056e-01 293 8.511380e+07 -4.72354e-01 294 8.709636e+07 -4.81779e-01 295 8.912509e+07 -4.91331e-01 296 9.120108e+07 -5.01008e-01 297 9.332543e+07 -5.10808e-01 298 9.549926e+07 -5.20729e-01 299 9.772372e+07 -5.30768e-01 300 1.000000e+08 -5.40922e-01 301 1.023293e+08 -5.51190e-01 302 1.047129e+08 -5.61568e-01 303 1.071519e+08 -5.72053e-01 304 1.096478e+08 -5.82641e-01 305 1.122018e+08 -5.93330e-01 306 1.148154e+08 -6.04114e-01 307 1.174898e+08 -6.14990e-01 308 1.202264e+08 -6.25954e-01 309 1.230269e+08 -6.37001e-01 310 1.258925e+08 -6.48127e-01 311 1.288250e+08 -6.59327e-01 312 1.318257e+08 -6.70595e-01 313 1.348963e+08 -6.81928e-01 314 1.380384e+08 -6.93319e-01 315 1.412538e+08 -7.04763e-01 316 1.445440e+08 -7.16255e-01 317 1.479108e+08 -7.27789e-01 318 1.513561e+08 -7.39359e-01 319 1.548817e+08 -7.50960e-01 320 1.584893e+08 -7.62585e-01 321 1.621810e+08 -7.74228e-01 322 1.659587e+08 -7.85884e-01 323 1.698244e+08 -7.97547e-01 324 1.737801e+08 -8.09210e-01 325 1.778279e+08 -8.20868e-01 326 1.819701e+08 -8.32514e-01 327 1.862087e+08 -8.44143e-01 328 1.905461e+08 -8.55748e-01 329 1.949845e+08 -8.67324e-01 330 1.995262e+08 -8.78865e-01 331 2.041738e+08 -8.90366e-01 332 2.089296e+08 -9.01821e-01 333 2.137962e+08 -9.13225e-01 334 2.187762e+08 -9.24571e-01 335 2.238721e+08 -9.35856e-01 336 2.290868e+08 -9.47075e-01 337 2.344229e+08 -9.58222e-01 338 2.398833e+08 -9.69293e-01 339 2.454709e+08 -9.80284e-01 340 2.511886e+08 -9.91190e-01 341 2.570396e+08 -1.00201e+00 342 2.630268e+08 -1.01273e+00 343 2.691535e+08 -1.02336e+00 344 2.754229e+08 -1.03389e+00 Index frequency ph(i(vmeas)) -------------------------------------------------------------------------------- 345 2.818383e+08 -1.04432e+00 346 2.884032e+08 -1.05465e+00 347 2.951209e+08 -1.06486e+00 348 3.019952e+08 -1.07497e+00 349 3.090295e+08 -1.08496e+00 350 3.162278e+08 -1.09484e+00 351 3.235937e+08 -1.10460e+00 352 3.311311e+08 -1.11424e+00 353 3.388442e+08 -1.12376e+00 354 3.467369e+08 -1.13317e+00 355 3.548134e+08 -1.14245e+00 356 3.630781e+08 -1.15161e+00 357 3.715352e+08 -1.16064e+00 358 3.801894e+08 -1.16955e+00 359 3.890451e+08 -1.17834e+00 360 3.981072e+08 -1.18700e+00 361 4.073803e+08 -1.19554e+00 362 4.168694e+08 -1.20395e+00 363 4.265795e+08 -1.21224e+00 364 4.365158e+08 -1.22041e+00 365 4.466836e+08 -1.22845e+00 366 4.570882e+08 -1.23637e+00 367 4.677351e+08 -1.24417e+00 368 4.786301e+08 -1.25185e+00 369 4.897788e+08 -1.25941e+00 370 5.011872e+08 -1.26685e+00 371 5.128614e+08 -1.27417e+00 372 5.248075e+08 -1.28138e+00 373 5.370318e+08 -1.28847e+00 374 5.495409e+08 -1.29545e+00 375 5.623413e+08 -1.30232e+00 376 5.754399e+08 -1.30908e+00 377 5.888437e+08 -1.31573e+00 378 6.025596e+08 -1.32227e+00 379 6.165950e+08 -1.32870e+00 380 6.309573e+08 -1.33504e+00 381 6.456542e+08 -1.34127e+00 382 6.606934e+08 -1.34740e+00 383 6.760830e+08 -1.35344e+00 384 6.918310e+08 -1.35938e+00 385 7.079458e+08 -1.36522e+00 386 7.244360e+08 -1.37097e+00 387 7.413102e+08 -1.37663e+00 388 7.585776e+08 -1.38221e+00 389 7.762471e+08 -1.38770e+00 390 7.943282e+08 -1.39310e+00 391 8.128305e+08 -1.39842e+00 392 8.317638e+08 -1.40366e+00 393 8.511380e+08 -1.40883e+00 394 8.709636e+08 -1.41391e+00 395 8.912509e+08 -1.41892e+00 396 9.120108e+08 -1.42387e+00 397 9.332543e+08 -1.42874e+00 398 9.549926e+08 -1.43354e+00 399 9.772372e+08 -1.43827e+00 400 1.000000e+09 -1.44295e+00 401 1.023293e+09 -1.44756e+00 402 1.047129e+09 -1.45211e+00 Index frequency ph(i(vmeas)) -------------------------------------------------------------------------------- 403 1.071519e+09 -1.45660e+00 404 1.096478e+09 -1.46104e+00 405 1.122018e+09 -1.46542e+00 406 1.148154e+09 -1.46975e+00 407 1.174898e+09 -1.47403e+00 408 1.202264e+09 -1.47826e+00 409 1.230269e+09 -1.48244e+00 410 1.258925e+09 -1.48658e+00 411 1.288250e+09 -1.49068e+00 412 1.318257e+09 -1.49473e+00 413 1.348963e+09 -1.49875e+00 414 1.380384e+09 -1.50273e+00 415 1.412538e+09 -1.50668e+00 416 1.445440e+09 -1.51059e+00 417 1.479108e+09 -1.51447e+00 418 1.513561e+09 -1.51832e+00 419 1.548817e+09 -1.52214e+00 420 1.584893e+09 -1.52593e+00 421 1.621810e+09 -1.52970e+00 422 1.659587e+09 -1.53345e+00 423 1.698244e+09 -1.53718e+00 424 1.737801e+09 -1.54088e+00 425 1.778279e+09 -1.54457e+00 426 1.819701e+09 -1.54825e+00 427 1.862087e+09 -1.55190e+00 428 1.905461e+09 -1.55555e+00 429 1.949845e+09 -1.55918e+00 430 1.995262e+09 -1.56281e+00 431 2.041738e+09 -1.56642e+00 432 2.089296e+09 -1.57003e+00 433 2.137962e+09 -1.57364e+00 434 2.187762e+09 -1.57724e+00 435 2.238721e+09 -1.58084e+00 436 2.290868e+09 -1.58443e+00 437 2.344229e+09 -1.58803e+00 438 2.398833e+09 -1.59163e+00 439 2.454709e+09 -1.59524e+00 440 2.511886e+09 -1.59885e+00 441 2.570396e+09 -1.60247e+00 442 2.630268e+09 -1.60609e+00 443 2.691535e+09 -1.60972e+00 444 2.754229e+09 -1.61337e+00 445 2.818383e+09 -1.61702e+00 446 2.884032e+09 -1.62069e+00 447 2.951209e+09 -1.62437e+00 448 3.019952e+09 -1.62807e+00 449 3.090295e+09 -1.63178e+00 450 3.162278e+09 -1.63551e+00 451 3.235937e+09 -1.63926e+00 452 3.311311e+09 -1.64303e+00 453 3.388442e+09 -1.64682e+00 454 3.467369e+09 -1.65063e+00 455 3.548134e+09 -1.65447e+00 456 3.630781e+09 -1.65832e+00 457 3.715352e+09 -1.66221e+00 458 3.801894e+09 -1.66611e+00 459 3.890451e+09 -1.67005e+00 460 3.981072e+09 -1.67401e+00 Index frequency ph(i(vmeas)) -------------------------------------------------------------------------------- 461 4.073803e+09 -1.67800e+00 462 4.168694e+09 -1.68202e+00 463 4.265795e+09 -1.68606e+00 464 4.365158e+09 -1.69014e+00 465 4.466836e+09 -1.69425e+00 466 4.570882e+09 -1.69839e+00 467 4.677351e+09 -1.70256e+00 468 4.786301e+09 -1.70676e+00 469 4.897788e+09 -1.71099e+00 470 5.011872e+09 -1.71526e+00 471 5.128614e+09 -1.71957e+00 472 5.248075e+09 -1.72391e+00 473 5.370318e+09 -1.72828e+00 474 5.495409e+09 -1.73269e+00 475 5.623413e+09 -1.73713e+00 476 5.754399e+09 -1.74162e+00 477 5.888437e+09 -1.74614e+00 478 6.025596e+09 -1.75069e+00 479 6.165950e+09 -1.75529e+00 480 6.309573e+09 -1.75992e+00 481 6.456542e+09 -1.76459e+00 482 6.606934e+09 -1.76931e+00 483 6.760830e+09 -1.77406e+00 484 6.918310e+09 -1.77886e+00 485 7.079458e+09 -1.78369e+00 486 7.244360e+09 -1.78857e+00 487 7.413102e+09 -1.79350e+00 488 7.585776e+09 -1.79847e+00 489 7.762471e+09 -1.80348e+00 490 7.943282e+09 -1.80854e+00 491 8.128305e+09 -1.81365e+00 492 8.317638e+09 -1.81881e+00 493 8.511380e+09 -1.82402e+00 494 8.709636e+09 -1.82928e+00 495 8.912509e+09 -1.83459e+00 496 9.120108e+09 -1.83996e+00 497 9.332543e+09 -1.84538e+00 498 9.549926e+09 -1.85086e+00 499 9.772372e+09 -1.85640e+00 500 1.000000e+10 -1.86201e+00 VBIC Pole Zero Test Pole-Zero Analysis Sat Aug 27 16:37:49 2005 -------------------------------------------------------------------------------- Index pole(1) pole(2) -------------------------------------------------------------------------------- 0 -1.21476e+12, 0.000000e+00 -5.49313e+11, 0.000000e+00 VBIC Pole Zero Test Pole-Zero Analysis Sat Aug 27 16:37:49 2005 -------------------------------------------------------------------------------- Index pole(3) pole(4) -------------------------------------------------------------------------------- 0 -5.61225e+10, 0.000000e+00 -1.05516e+09, 0.000000e+00 VBIC Pole Zero Test Pole-Zero Analysis Sat Aug 27 16:37:49 2005 -------------------------------------------------------------------------------- Index pole(5) zero(1) -------------------------------------------------------------------------------- 0 -1.86198e+04, 0.000000e+00 -1.37017e+12, 0.000000e+00 VBIC Pole Zero Test Pole-Zero Analysis Sat Aug 27 16:37:49 2005 -------------------------------------------------------------------------------- Index zero(2) zero(3) -------------------------------------------------------------------------------- 0 -4.81757e+11, 0.000000e+00 -6.42036e+10, 0.000000e+00 VBIC Pole Zero Test Pole-Zero Analysis Sat Aug 27 16:37:49 2005 -------------------------------------------------------------------------------- Index zero(4) -------------------------------------------------------------------------------- 0 2.452403e+11, 0.000000e+00 CPU time since last call: 0.039 seconds. Total CPU time: 0.039 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/tests/vbic/noise_scale_test.cir0000644000265600020320000000116312264261473020341 0ustar andreasadminVBIC Noise Scale Test V1 R3_P 0 5 V2 V2_P 0 5 AC 1 C1 R3_N V2_P 1n R4 R3_N 0 100k Q1 VOUT R3_N Q1_E N1 M=2 *Q2 VOUT R3_N Q1_E N1 R1 R3_P VOUT 100k R2 Q1_E 0 10k R3 R3_P R3_N 500k .OPTIONS NOACCT .NOISE v(vout) V2 DEC 25 1k 100Meg .print noise v(inoise_spectrum) .MODEL N1 NPN LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 + RTH=300 KFN=10e-15 AFN=1 BFN=1 .END ngspice-26/tests/vbic/FG.cir0000644000265600020320000000075412264261473015317 0ustar andreasadminVBIC Gummel Test V1 Q1_E 0 5.0 VC Q1_C 0 0.0 VB Q1_B 0 0.0 Q1 Q1_C Q1_B Q1_E P1 .DC V1 0.2 1.2 10m .OPTIONS GMIN=1e-13 NOACCT .print dc abs(i(vc)) abs(i(vb)) .MODEL P1 PNP LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .END ngspice-26/tests/vbic/FG.out0000644000265600020320000001137012264261473015345 0ustar andreasadmin No. of Data Rows : 101 Circuit: VBIC Gummel Test Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 VBIC Gummel Test -------------------------------------------------------------------------------- Index v-sweep abs(i(vc)) abs(i(vb)) -------------------------------------------------------------------------------- 0 2.000000e-01 2.166461e-13 2.760909e-13 1 2.100000e-01 2.998733e-13 3.251377e-13 2 2.200000e-01 4.670645e-13 3.954716e-13 3 2.300000e-01 6.857418e-13 4.747722e-13 4 2.400000e-01 1.006772e-12 5.711617e-13 5 2.500000e-01 1.478056e-12 6.885693e-13 6 2.600000e-01 2.169912e-12 8.318968e-13 7 2.700000e-01 3.185560e-12 1.007289e-12 8 2.800000e-01 4.676518e-12 1.222494e-12 9 2.900000e-01 6.865197e-12 1.487339e-12 10 3.000000e-01 1.007807e-11 1.814379e-12 11 3.100000e-01 1.479434e-11 2.219777e-12 12 3.200000e-01 2.171739e-11 2.724510e-12 13 3.300000e-01 3.187965e-11 3.356044e-12 14 3.400000e-01 4.679648e-11 4.150665e-12 15 3.500000e-01 6.869202e-11 5.156762e-12 16 3.600000e-01 1.008307e-10 6.439466e-12 17 3.700000e-01 1.480035e-10 8.087255e-12 18 3.800000e-01 2.172422e-10 1.022139e-11 19 3.900000e-01 3.188665e-10 1.300949e-11 20 4.000000e-01 4.680213e-10 1.668506e-11 21 4.100000e-01 6.869325e-10 2.157582e-11 22 4.200000e-01 1.008217e-09 2.814469e-11 23 4.300000e-01 1.479738e-09 3.704953e-11 24 4.400000e-01 2.171731e-09 4.923009e-11 25 4.500000e-01 3.187259e-09 6.603491e-11 26 4.600000e-01 4.677547e-09 8.940696e-11 27 4.700000e-01 6.864483e-09 1.221551e-10 28 4.800000e-01 1.007362e-08 1.683521e-10 29 4.900000e-01 1.478260e-08 2.339177e-10 30 5.000000e-01 2.169216e-08 3.274743e-10 31 5.100000e-01 3.183025e-08 4.616036e-10 32 5.200000e-01 4.670483e-08 6.546910e-10 33 5.300000e-01 6.852774e-08 9.336370e-10 34 5.400000e-01 1.005431e-07 1.337840e-09 35 5.500000e-01 1.475084e-07 1.925055e-09 36 5.600000e-01 2.164000e-07 2.780000e-09 37 5.700000e-01 3.174460e-07 4.027026e-09 38 5.800000e-01 4.656395e-07 5.848731e-09 39 5.900000e-01 6.829517e-07 8.513358e-09 40 6.000000e-01 1.001570e-06 1.241507e-08 41 6.100000e-01 1.468623e-06 1.813318e-08 42 6.200000e-01 2.153075e-06 2.651926e-08 43 6.300000e-01 3.155745e-06 3.882508e-08 44 6.400000e-01 4.623832e-06 5.689068e-08 45 6.500000e-01 6.771854e-06 8.342025e-08 46 6.600000e-01 9.911619e-06 1.223866e-07 47 6.700000e-01 1.449465e-05 1.796231e-07 48 6.800000e-01 2.117135e-05 2.636875e-07 49 6.900000e-01 3.087205e-05 3.871177e-07 50 7.000000e-01 4.491451e-05 5.682497e-07 51 7.100000e-01 6.513891e-05 8.338272e-07 52 7.200000e-01 9.406600e-05 1.222716e-06 53 7.300000e-01 1.350610e-04 1.791123e-06 54 7.400000e-01 1.924693e-04 2.619821e-06 Index v-sweep abs(i(vc)) abs(i(vb)) -------------------------------------------------------------------------------- 55 7.500000e-01 2.716749e-04 3.823960e-06 56 7.600000e-01 3.790340e-04 5.566125e-06 57 7.700000e-01 5.216676e-04 8.073288e-06 58 7.800000e-01 7.071489e-04 1.165820e-05 59 7.900000e-01 9.431650e-04 1.674542e-05 60 8.000000e-01 1.237225e-03 2.390139e-05 61 8.100000e-01 1.596430e-03 3.386679e-05 62 8.200000e-01 2.027266e-03 4.758760e-05 63 8.300000e-01 2.535370e-03 6.623937e-05 64 8.400000e-01 3.125228e-03 9.123753e-05 65 8.500000e-01 3.799832e-03 1.242260e-04 66 8.600000e-01 4.560345e-03 1.670382e-04 67 8.700000e-01 5.405842e-03 2.216290e-04 68 8.800000e-01 6.333207e-03 2.899816e-04 69 8.900000e-01 7.337161e-03 3.740089e-04 70 9.000000e-01 8.409662e-03 4.755838e-04 71 9.100000e-01 9.530275e-03 5.981207e-04 72 9.200000e-01 1.065019e-02 7.494897e-04 73 9.300000e-01 1.173652e-02 9.348061e-04 74 9.400000e-01 1.278289e-02 1.154720e-03 75 9.500000e-01 1.379386e-02 1.407320e-03 76 9.600000e-01 1.475701e-02 1.693557e-03 77 9.700000e-01 1.567850e-02 2.010583e-03 78 9.800000e-01 1.656023e-02 2.356226e-03 79 9.900000e-01 1.740153e-02 2.728815e-03 80 1.000000e+00 1.820273e-02 3.126576e-03 81 1.010000e+00 1.896466e-02 3.547751e-03 82 1.020000e+00 1.968840e-02 3.990671e-03 83 1.030000e+00 2.037519e-02 4.453766e-03 84 1.040000e+00 2.102645e-02 4.935571e-03 85 1.050000e+00 2.164369e-02 5.434724e-03 86 1.060000e+00 2.222849e-02 5.949968e-03 87 1.070000e+00 2.278245e-02 6.480140e-03 88 1.080000e+00 2.330717e-02 7.024169e-03 89 1.090000e+00 2.380426e-02 7.581071e-03 90 1.100000e+00 2.427528e-02 8.149937e-03 91 1.110000e+00 2.472175e-02 8.729934e-03 92 1.120000e+00 2.514512e-02 9.320294e-03 93 1.130000e+00 2.554680e-02 9.920312e-03 94 1.140000e+00 2.592813e-02 1.052934e-02 95 1.150000e+00 2.629037e-02 1.114678e-02 96 1.160000e+00 2.663473e-02 1.177207e-02 97 1.170000e+00 2.696233e-02 1.240473e-02 98 1.180000e+00 2.727425e-02 1.304427e-02 99 1.190000e+00 2.757147e-02 1.369026e-02 100 1.200000e+00 2.785494e-02 1.434232e-02 ngspice-26/tests/vbic/temp.cir0000644000265600020320000000073012264261473015762 0ustar andreasadminVBIC Temp test V1 1 0 1.0 VC 1 Q1_C 0.0 VB 1 Q1_B 0.0 Q1 Q1_C Q1_B 0 N1 .OPTIONS TEMP=150 NOACCT .DC V1 0.2 1.2 10m .print dc i(vc) i(vb) .MODEL N1 NPN LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .END ngspice-26/tests/vbic/diffamp.cir0000644000265600020320000000235212264261473016425 0ustar andreasadminVBIC DiffAmp Test V1 VCC 0 3.3 V2 V2_P R3_N AC 1 DC 0 Sine(0 10m 10Meg 0 0) R1 Q3_C 0 100k R2 Q4_C 0 100k R3 VCC R3_N 1K R4 R3_N 0 1K Q10 Q1_E I1_N 0 0 N1 Q11 I1_N I1_N 0 0 N1 Q12 Q9_B I1_N 0 0 N1 M=2 Q13 Q5_B I1_N 0 0 N1 M=2 Q1 Q5_C V2_P Q1_E 0 N1 Q2 Q6_C R3_N Q1_E 0 N1 Q3 Q3_C Q9_B Q5_C Q3_C P1 Q4 Q4_C Q9_B Q6_C Q4_C P1 I1 VCC I1_N 10u Q5 Q5_C Q5_B VCC Q5_C P1 Q6 Q6_C Q5_B VCC Q6_C P1 E1 E1_P 0 Q3_C Q4_C 1 RH E1_P 0 1G Q7 Q5_B Q5_B VCC Q5_B P1 Q8 Q8_B Q8_B VCC Q8_B P1 Q9 Q9_B Q9_B Q8_B Q9_B P1 .OPTIONS NOACCT .OP .TRAN 1n 1u 0 10n .AC DEC 25 100k 1G .print ac v(e1_p) .print tran v(e1_p) .MODEL N1 NPN LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .MODEL P1 PNP LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .END ngspice-26/tests/vbic/CEamp.cir0000644000265600020320000000111012264261473015773 0ustar andreasadminVBIC Pole Zero Test Vcc 3 0 5 Rc 2 3 1k Rb 3 1 200k I1 0 1 AC 1 DC 0 Vmeas 4 2 DC 0 Cshunt 4 0 .1u Q1 2 1 0 0 N1 .OPTIONS NOACCT .ac dec 100 0.1Meg 10G .print ac db(i(vmeas)) .print ac ph(i(vmeas)) .pz 1 0 4 0 cur pz .print pz all .MODEL N1 NPN LEVEL=4 + IS=1e-16 IBEI=1e-18 IBEN=5e-15 IBCI=2e-17 IBCN=5e-15 ISP=1e-15 RCX=10 + RCI=60 RBX=10 RBI=40 RE=2 RS=20 RBP=40 VEF=10 VER=4 IKF=2e-3 ITF=8e-2 + XTF=20 IKR=2e-4 IKP=2e-4 CJE=1e-13 CJC=2e-14 CJEP=1e-13 CJCP=4e-13 VO=2 + GAMM=2e-11 HRCF=2 QCO=1e-12 AVC1=2 AVC2=15 TF=10e-12 TR=100e-12 TD=2e-11 RTH=300 .END ngspice-26/tests/vbic/Makefile.am0000644000265600020320000000053212264261473016352 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = CEamp.cir \ FG.cir \ FO.cir \ diffamp.cir \ noise_scale_test.cir \ temp.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/vbic/noise_scale_test.out0000644000265600020320000001047712264261473020403 0ustar andreasadmin No. of Data Rows : 126 Circuit: VBIC Noise Scale Test Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 VBIC Noise Scale Test -------------------------------------------------------------------------------- Index frequency v(inoise_spectr -------------------------------------------------------------------------------- 0 1.000000e+03 6.606383e-14 1 1.096478e+03 5.075630e-14 2 1.202264e+03 3.904714e-14 3 1.318257e+03 3.008379e-14 4 1.445440e+03 2.321679e-14 5 1.584893e+03 1.795125e-14 6 1.737801e+03 1.390987e-14 7 1.905461e+03 1.080490e-14 8 2.089296e+03 8.416738e-15 9 2.290868e+03 6.577742e-15 10 2.511886e+03 5.159834e-15 11 2.754229e+03 4.065107e-15 12 3.019952e+03 3.218671e-15 13 3.311311e+03 2.563196e-15 14 3.630781e+03 2.054758e-15 15 3.981072e+03 1.659680e-15 16 4.365158e+03 1.352114e-15 17 4.786301e+03 1.112200e-15 18 5.248075e+03 9.246675e-16 19 5.754399e+03 7.777558e-16 20 6.309573e+03 6.623996e-16 21 6.918310e+03 5.716009e-16 22 7.585776e+03 4.999503e-16 23 8.317638e+03 4.432598e-16 24 9.120108e+03 3.982822e-16 25 1.000000e+04 3.624956e-16 26 1.096478e+04 3.339377e-16 27 1.202264e+04 3.110787e-16 28 1.318257e+04 2.927242e-16 29 1.445440e+04 2.779390e-16 30 1.584893e+04 2.659898e-16 31 1.737801e+04 2.563004e-16 32 1.905461e+04 2.484164e-16 33 2.089296e+04 2.419792e-16 34 2.290868e+04 2.367050e-16 35 2.511886e+04 2.323682e-16 36 2.754229e+04 2.287896e-16 37 3.019952e+04 2.258260e-16 38 3.311311e+04 2.233628e-16 39 3.630781e+04 2.213082e-16 40 3.981072e+04 2.195883e-16 41 4.365158e+04 2.181434e-16 42 4.786301e+04 2.169251e-16 43 5.248075e+04 2.158944e-16 44 5.754399e+04 2.150193e-16 45 6.309573e+04 2.142738e-16 46 6.918310e+04 2.136365e-16 47 7.585776e+04 2.130898e-16 48 8.317638e+04 2.126195e-16 49 9.120108e+04 2.122135e-16 50 1.000000e+05 2.118620e-16 51 1.096478e+05 2.115567e-16 52 1.202264e+05 2.112908e-16 53 1.318257e+05 2.110585e-16 54 1.445440e+05 2.108550e-16 Index frequency v(inoise_spectr -------------------------------------------------------------------------------- 55 1.584893e+05 2.106764e-16 56 1.737801e+05 2.105191e-16 57 1.905461e+05 2.103803e-16 58 2.089296e+05 2.102574e-16 59 2.290868e+05 2.101485e-16 60 2.511886e+05 2.100517e-16 61 2.754229e+05 2.099655e-16 62 3.019952e+05 2.098886e-16 63 3.311311e+05 2.098197e-16 64 3.630781e+05 2.097580e-16 65 3.981072e+05 2.097025e-16 66 4.365158e+05 2.096524e-16 67 4.786301e+05 2.096072e-16 68 5.248075e+05 2.095662e-16 69 5.754399e+05 2.095288e-16 70 6.309573e+05 2.094946e-16 71 6.918310e+05 2.094632e-16 72 7.585776e+05 2.094340e-16 73 8.317638e+05 2.094068e-16 74 9.120108e+05 2.093811e-16 75 1.000000e+06 2.093566e-16 76 1.096478e+06 2.093328e-16 77 1.202264e+06 2.093094e-16 78 1.318257e+06 2.092859e-16 79 1.445440e+06 2.092620e-16 80 1.584893e+06 2.092371e-16 81 1.737801e+06 2.092106e-16 82 1.905461e+06 2.091819e-16 83 2.089296e+06 2.091502e-16 84 2.290868e+06 2.091148e-16 85 2.511886e+06 2.090746e-16 86 2.754229e+06 2.090284e-16 87 3.019952e+06 2.089748e-16 88 3.311311e+06 2.089122e-16 89 3.630781e+06 2.088386e-16 90 3.981072e+06 2.087516e-16 91 4.365158e+06 2.086485e-16 92 4.786301e+06 2.085259e-16 93 5.248075e+06 2.083798e-16 94 5.754399e+06 2.082055e-16 95 6.309573e+06 2.079973e-16 96 6.918310e+06 2.077484e-16 97 7.585776e+06 2.074510e-16 98 8.317638e+06 2.070954e-16 99 9.120108e+06 2.066704e-16 100 1.000000e+07 2.061628e-16 101 1.096478e+07 2.055571e-16 102 1.202264e+07 2.048350e-16 103 1.318257e+07 2.039754e-16 104 1.445440e+07 2.029538e-16 105 1.584893e+07 2.017424e-16 106 1.737801e+07 2.003094e-16 107 1.905461e+07 1.986194e-16 108 2.089296e+07 1.966335e-16 109 2.290868e+07 1.943096e-16 110 2.511886e+07 1.916037e-16 111 2.754229e+07 1.884710e-16 112 3.019952e+07 1.848682e-16 Index frequency v(inoise_spectr -------------------------------------------------------------------------------- 113 3.311311e+07 1.807564e-16 114 3.630781e+07 1.761043e-16 115 3.981072e+07 1.708924e-16 116 4.365158e+07 1.651171e-16 117 4.786301e+07 1.587944e-16 118 5.248075e+07 1.519630e-16 119 5.754399e+07 1.446857e-16 120 6.309573e+07 1.370480e-16 121 6.918310e+07 1.291552e-16 122 7.585776e+07 1.211260e-16 123 8.317638e+07 1.130848e-16 124 9.120108e+07 1.051532e-16 125 1.000000e+08 9.744108e-17 ngspice-26/tests/vbic/Makefile.in0000644000265600020320000003364412264261542016372 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/vbic DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = CEamp.cir \ FG.cir \ FO.cir \ diffamp.cir \ noise_scale_test.cir \ temp.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/vbic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/vbic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/vbic/diffamp.out0000644000265600020320000006711012264261473016462 0ustar andreasadmin Circuit: vbic diffamp test Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 101 No. of Data Rows : 1 No. of Data Rows : 111 Node Voltage ---- ------- ---- ------- q10#collCI 1.010381e+00 q10#substrate 2.021916e-11 q11#collCI 6.578599e-01 q11#substrate 1.318851e-11 q12#collCI 1.942528e+00 q12#substrate 1.943144e-11 q13#collCI 2.619850e+00 q13#substrate 2.620494e-11 q1#collCI 2.614371e+00 q1#substrate 5.229312e-11 q2#collCI 2.614371e+00 q2#substrate 5.229312e-11 q3#collCI 1.576554e+00 q3#substrate 1.575451e+00 q4#collCI 1.576554e+00 q4#substrate 1.575451e+00 q5#collCI 2.616153e+00 q5#substrate 2.614704e+00 q6#collCI 2.616153e+00 q6#substrate 2.614704e+00 q7#collCI 2.622050e+00 q7#substrate 2.620602e+00 q8#collCI 2.623017e+00 q8#substrate 2.621623e+00 q9#collCI 1.944640e+00 q9#substrate 1.943247e+00 q8_b 2.621623e+00 e1_p 2.402856e-11 q6_c 2.614704e+00 q5_c 2.614704e+00 q5_b 2.620602e+00 q9_b 1.943247e+00 i1_n 6.585156e-01 q1_e 1.011054e+00 q4_c 1.575451e+00 q3_c 1.575451e+00 r3_n 1.649946e+00 v2_p 1.649946e+00 vcc 3.300000e+00 Source Current ------ ------- v1#branch -1.74308e-03 v2#branch -5.40529e-08 e1#branch -2.40286e-20 Resistor models (Simple linear resistor) model R rsh 0 narrow 0 short 0 tc1 0 tc2 0 defw 1e-05 kf 0 af 0 VBIC models (Vertical Bipolar Inter-Company Model) model p1 n1 type pnp npn tnom 27 27 rcx 10 10 rci 60 60 vo 2 2 gamm 2e-11 2e-11 hrcf 2 2 rbx 10 10 rbi 40 40 re 2 2 rs 20 20 rbp 40 40 is 1e-16 1e-16 nf 1 1 nr 1 1 fc 0.9 0.9 cbeo 0 0 cje 1e-13 1e-13 pe 0.75 0.75 me 0.33 0.33 aje -0.5 -0.5 cbco 0 0 cjc 2e-14 2e-14 qco 1e-12 1e-12 cjep 1e-13 1e-13 pc 0.75 0.75 mc 0.33 0.33 ajc -0.5 -0.5 cjcp 4e-13 4e-13 ps 0.75 0.75 ms 0.33 0.33 ajs -0.5 -0.5 ibei 1e-18 1e-18 wbe 1 1 nei 1 1 iben 5e-15 5e-15 nen 2 2 ibci 2e-17 2e-17 nci 1 1 ibcn 5e-15 5e-15 ncn 2 2 avc1 2 2 avc2 15 15 isp 1e-15 1e-15 wsp 1 1 nfp 1 1 ibeip 0 0 ibenp 0 0 ibcip 0 0 ncip 1 1 ibcnp 0 0 ncnp 2 2 vef 10 10 ver 4 4 ikf 0.002 0.002 ikr 0.0002 0.0002 ikp 0.0002 0.0002 tf 1e-11 1e-11 qtf 0 0 xtf 20 20 vtf 0 0 itf 0.08 0.08 tr 1e-10 1e-10 td 2e-11 2e-11 kfn 0 0 afn 1 1 bfn 1 1 xre 0 0 xrb 0 0 xrbi 0 0 xrc 0 0 xrci 0 0 xrs 0 0 xvo 0 0 ea 1.12 1.12 eaie 1.12 1.12 eaic 1.12 1.12 eais 1.12 1.12 eane 1.12 1.12 eanc 1.12 1.12 eans 1.12 1.12 xis 3 3 xii 3 3 xin 3 3 tnf 0 0 tavc 0 0 rth 300 300 cth 0 0 vrt 0 0 art 0.1 0.1 ccso 0 0 qbm 0 0 nkf 0.5 0.5 xikf 0 0 xrcx 0 0 xrbx 0 0 xrbp 0 0 isrr 1 1 xisr 0 0 dear 0 0 eap 1.12 1.12 vbbe 0 0 nbbe 1 1 ibbe 1e-06 1e-06 tvbbe1 0 0 tvbbe2 0 0 tnbbe 0 0 ebbe 0 0 dtemp 0 0 vers 1.2 1.2 vref 0 0 Isource: Independent current source device i1 dc 1e-05 acmag 0 pulse - sine - sin - exp - pwl - sffm - am - v -2.64142 p 2.64142e-05 Resistor: Simple linear resistor device rh r4 r3 model R R R resistance 1e+09 1000 1000 ac 1e+09 1000 1000 dtemp 0 0 0 noisy 1 1 1 i 9.48543e-11 0.00164991 0.00165009 p 8.99735e-12 0.00272221 0.00272279 Resistor: Simple linear resistor device r2 r1 model R R resistance 100000 100000 ac 100000 100000 dtemp 0 0 noisy 1 1 i 1.52842e-05 1.62327e-05 p 2.33606e-05 2.63501e-05 VBIC: Vertical Bipolar Inter-Company Model device q9 q8 q7 model p1 p1 p1 vbe 0.678348 0.678348 0.679406 vbc 0.00138433 0.00138433 0.00144097 ic 1.99274e-05 1.99274e-05 2.07423e-05 ib 2.49337e-07 2.49337e-07 2.58995e-07 ie -2.01767e-05 -2.01767e-05 -2.10013e-05 is -1.72796e-12 -1.72801e-12 -5.37674e-12 gm 0.000755557 0.000755557 0.000786168 go -1.60559e-06 -1.60559e-06 -1.66941e-06 gpi 5.55436e-05 5.55436e-05 5.62072e-05 gmu 4.10087e-06 4.10087e-06 4.10097e-06 gx 0.0307981 0.0307981 0.0308228 cbe 2.24502e-13 2.24502e-13 2.25802e-13 cbex 0 0 0 cbc 2.00122e-14 2.00122e-14 2.00127e-14 cbcx 3.89454e-22 3.89454e-22 3.89571e-22 cbep 1.00009e-13 1.00009e-13 1.00009e-13 cbcp 4.00035e-13 4.00035e-13 4.00037e-13 p 1.36592e-05 1.36592e-05 1.42385e-05 VBIC: Vertical Bipolar Inter-Company Model device q6 q5 q4 model p1 p1 p1 vbe 0.679406 0.679406 0.671179 vbc -0.0046728 -0.00417458 -0.413711 ic 2.07505e-05 2.07541e-05 1.5604e-05 ib 2.70491e-07 2.45601e-07 5.94526e-07 ie -2.10114e-05 -2.10109e-05 -1.58787e-05 is -1.20867e-11 -4.21673e-12 1.26423e-10 gm 0.000786538 0.000786519 0.000594898 go -1.66655e-06 -1.6668e-06 -1.13386e-06 gpi 5.62078e-05 5.6208e-05 5.15524e-05 gmu 4.08998e-06 4.09087e-06 3.54571e-06 gx 0.0308077 0.0308089 0.029688 cbe 2.25806e-13 2.25806e-13 2.16268e-13 cbex 0 0 0 cbc 1.9959e-14 1.99634e-14 1.7301e-14 cbcx 3.07555e-22 3.13534e-22 4.21718e-29 cbep 9.97413e-14 9.9763e-14 8.6482e-14 cbcp 4.00036e-13 4.00037e-13 4.00025e-13 p 1.43722e-05 1.43615e-05 1.71659e-05 VBIC: Vertical Bipolar Inter-Company Model device q3 q2 q1 model p1 n1 n1 vbe 0.671689 0.639269 0.639262 vbc -0.318814 -0.964177 -0.964683 ic 1.59257e-05 4.83217e-06 4.81776e-06 ib -1.98661e-07 -1.28929e-08 1.90204e-07 ie -1.60341e-05 -4.8265e-06 -4.94959e-06 is -1.85939e-10 2.2784e-08 -2.81806e-08 gm 0.000602367 0.000184325 0.000184281 go -1.17213e-06 -3.27084e-07 -3.26987e-07 gpi 5.18041e-05 4.102e-05 4.10185e-05 gmu 3.64642e-06 3.12218e-06 3.12188e-06 gx 0.0299053 0.0280441 0.028043 cbe 2.16794e-13 1.89845e-13 1.8984e-13 cbex 0 0 0 cbc 1.77935e-14 1.52252e-14 1.52237e-14 cbcx 1.65231e-27 2.47219e-38 2.42433e-38 cbep 8.89419e-14 7.61216e-14 7.61142e-14 cbcp 4.00031e-13 2.43754e-13 2.43742e-13 p 1.58473e-05 7.80877e-06 7.90711e-06 VBIC: Vertical Bipolar Inter-Company Model device q13 q12 q11 model n1 n1 n1 vbe 0.658555 0.658555 0.658557 vbc -1.96121 -1.28391 0.000652342 ic 2.15197e-05 2.0581e-05 9.39039e-06 ib 1.80371e-07 2.27861e-07 1.16442e-07 ie -2.16994e-05 -2.08068e-05 -9.50683e-06 is -1.56164e-09 -6.32007e-09 8.49745e-10 gm 0.00081573 0.000782531 0.000357808 go -1.31356e-06 -1.32719e-06 -7.69309e-07 gpi 9.26402e-05 9.25721e-05 4.62181e-05 gmu 5.48806e-06 5.92463e-06 4.09954e-06 gx 0.0532015 0.0555096 0.030407 cbe 4.08671e-13 4.08339e-13 2.03836e-13 cbex 0 0 0 cbc 2.6175e-14 2.87794e-14 2.00057e-14 cbcx 8.85305e-55 2.08978e-43 3.87955e-22 cbep 1.30865e-13 1.43882e-13 1.00004e-13 cbcp 4.87219e-13 5.24659e-13 3.24894e-13 p 5.64991e-05 4.01387e-05 6.25522e-06 VBIC: Vertical Bipolar Inter-Company Model device q10 model n1 vbe 0.658557 vbc -0.35138 ic 9.65603e-06 ib 8.40913e-08 ie -9.76707e-06 is 9.31075e-08 gm 0.000367535 go -7.15416e-07 gpi 4.6238e-05 gmu 3.61044e-06 gx 0.029587 cbe 2.03933e-13 cbex 0 cbc 1.76182e-14 cbcx 4.75995e-28 cbep 8.80758e-14 cbcp 3.01834e-13 p 9.91919e-06 VCVS: Voltage controlled voltage source device e1 i -9.48543e-11 v 0.0948543 p -8.99735e-12 Vsource: Independent voltage source device v2 v1 dc 0 3.3 acmag 1 0 pulse 0 - 0.01 1e+07 0 0 sine 0 - 0.01 1e+07 0 0 sin 0 - 0.01 1e+07 0 0 exp 0 - 0.01 1e+07 0 0 pwl 0 - 0.01 1e+07 0 0 sffm 0 - 0.01 1e+07 0 0 am 0 - 0.01 1e+07 0 0 i -1.90204e-07 -0.00174329 p 0 0.00575285 vbic diffamp test AC Analysis Sun Mar 8 16:34:50 2009 -------------------------------------------------------------------------------- Index frequency v(e1_p) -------------------------------------------------------------------------------- 0 1.000000e+05 -1.78122e+01, 1.371675e-01 1 1.096478e+05 -1.78120e+01, 1.503998e-01 2 1.202264e+05 -1.78117e+01, 1.649082e-01 3 1.318257e+05 -1.78115e+01, 1.808159e-01 4 1.445440e+05 -1.78111e+01, 1.982575e-01 5 1.584893e+05 -1.78108e+01, 2.173809e-01 6 1.737801e+05 -1.78103e+01, 2.383479e-01 7 1.905461e+05 -1.78097e+01, 2.613360e-01 8 2.089296e+05 -1.78090e+01, 2.865397e-01 9 2.290868e+05 -1.78082e+01, 3.141720e-01 10 2.511886e+05 -1.78072e+01, 3.444661e-01 11 2.754229e+05 -1.78060e+01, 3.776777e-01 12 3.019952e+05 -1.78046e+01, 4.140866e-01 13 3.311311e+05 -1.78029e+01, 4.539990e-01 14 3.630781e+05 -1.78008e+01, 4.977499e-01 15 3.981072e+05 -1.77984e+01, 5.457060e-01 16 4.365158e+05 -1.77954e+01, 5.982678e-01 17 4.786301e+05 -1.77918e+01, 6.558730e-01 18 5.248075e+05 -1.77875e+01, 7.189995e-01 19 5.754399e+05 -1.77824e+01, 7.881683e-01 20 6.309573e+05 -1.77761e+01, 8.639473e-01 21 6.918310e+05 -1.77687e+01, 9.469541e-01 22 7.585776e+05 -1.77597e+01, 1.037860e+00 23 8.317638e+05 -1.77490e+01, 1.137392e+00 24 9.120108e+05 -1.77361e+01, 1.246336e+00 25 1.000000e+06 -1.77205e+01, 1.365543e+00 26 1.096478e+06 -1.77019e+01, 1.495921e+00 27 1.202264e+06 -1.76796e+01, 1.638447e+00 28 1.318257e+06 -1.76528e+01, 1.794157e+00 29 1.445440e+06 -1.76207e+01, 1.964147e+00 30 1.584893e+06 -1.75822e+01, 2.149561e+00 31 1.737801e+06 -1.75361e+01, 2.351587e+00 32 1.905461e+06 -1.74810e+01, 2.571432e+00 33 2.089296e+06 -1.74151e+01, 2.810305e+00 34 2.290868e+06 -1.73365e+01, 3.069377e+00 35 2.511886e+06 -1.72427e+01, 3.349740e+00 36 2.754229e+06 -1.71311e+01, 3.652344e+00 37 3.019952e+06 -1.69986e+01, 3.977922e+00 38 3.311311e+06 -1.68416e+01, 4.326893e+00 39 3.630781e+06 -1.66560e+01, 4.699240e+00 40 3.981072e+06 -1.64375e+01, 5.094368e+00 41 4.365158e+06 -1.61811e+01, 5.510936e+00 42 4.786301e+06 -1.58817e+01, 5.946675e+00 43 5.248075e+06 -1.55339e+01, 6.398188e+00 44 5.754399e+06 -1.51324e+01, 6.860769e+00 45 6.309573e+06 -1.46722e+01, 7.328235e+00 46 6.918310e+06 -1.41491e+01, 7.792837e+00 47 7.585776e+06 -1.35598e+01, 8.245259e+00 48 8.317638e+06 -1.29031e+01, 8.674765e+00 49 9.120108e+06 -1.21796e+01, 9.069526e+00 50 1.000000e+07 -1.13928e+01, 9.417139e+00 51 1.096478e+07 -1.05490e+01, 9.705335e+00 52 1.202264e+07 -9.65760e+00, 9.922829e+00 53 1.318257e+07 -8.73084e+00, 1.006022e+01 54 1.445440e+07 -7.78314e+00, 1.011080e+01 Index frequency v(e1_p) -------------------------------------------------------------------------------- 55 1.584893e+07 -6.83041e+00, 1.007121e+01 56 1.737801e+07 -5.88896e+00, 9.941739e+00 57 1.905461e+07 -4.97449e+00, 9.726286e+00 58 2.089296e+07 -4.10109e+00, 9.431959e+00 59 2.290868e+07 -3.28048e+00, 9.068395e+00 60 2.511886e+07 -2.52156e+00, 8.646907e+00 61 2.754229e+07 -1.83028e+00, 8.179607e+00 62 3.019952e+07 -1.20977e+00, 7.678589e+00 63 3.311311e+07 -6.60683e-01, 7.155287e+00 64 3.630781e+07 -1.81694e-01, 6.620020e+00 65 3.981072e+07 2.300105e-01, 6.081735e+00 66 4.365158e+07 5.782313e-01, 5.547931e+00 67 4.786301e+07 8.673330e-01, 5.024706e+00 68 5.248075e+07 1.101910e+00, 4.516904e+00 69 5.754399e+07 1.286547e+00, 4.028308e+00 70 6.309573e+07 1.425678e+00, 3.561854e+00 71 6.918310e+07 1.523515e+00, 3.119830e+00 72 7.585776e+07 1.584052e+00, 2.704047e+00 73 8.317638e+07 1.611108e+00, 2.315972e+00 74 9.120108e+07 1.608400e+00, 1.956802e+00 75 1.000000e+08 1.579619e+00, 1.627491e+00 76 1.096478e+08 1.528490e+00, 1.328728e+00 77 1.202264e+08 1.458804e+00, 1.060881e+00 78 1.318257e+08 1.374403e+00, 8.239259e-01 79 1.445440e+08 1.279122e+00, 6.173743e-01 80 1.584893e+08 1.176692e+00, 4.402349e-01 81 1.737801e+08 1.070619e+00, 2.910099e-01 82 1.905461e+08 9.640633e-01, 1.677399e-01 83 2.089296e+08 8.597353e-01, 6.809260e-02 84 2.290868e+08 7.598256e-01, -1.05190e-02 85 2.511886e+08 6.659789e-01, -7.08039e-02 86 2.754229e+08 5.793090e-01, -1.15465e-01 87 3.019952e+08 5.004486e-01, -1.47089e-01 88 3.311311e+08 4.296214e-01, -1.68063e-01 89 3.630781e+08 3.667266e-01, -1.80522e-01 90 3.981072e+08 3.114226e-01, -1.86321e-01 91 4.365158e+08 2.632052e-01, -1.87033e-01 92 4.786301e+08 2.214725e-01, -1.83961e-01 93 5.248075e+08 1.855782e-01, -1.78163e-01 94 5.754399e+08 1.548704e-01, -1.70483e-01 95 6.309573e+08 1.287193e-01, -1.61581e-01 96 6.918310e+08 1.065355e-01, -1.51963e-01 97 7.585776e+08 8.777952e-02, -1.42010e-01 98 8.317638e+08 7.196718e-02, -1.32004e-01 99 9.120108e+08 5.866969e-02, -1.22147e-01 100 1.000000e+09 4.751187e-02, -1.12577e-01 vbic diffamp test Transient Analysis Sun Mar 8 16:34:50 2009 -------------------------------------------------------------------------------- Index time v(e1_p) -------------------------------------------------------------------------------- 0 0.000000e+00 2.402856e-11 1 1.000000e-11 1.377181e-07 2 2.000000e-11 2.571477e-07 3 4.000000e-11 5.104832e-07 4 8.000000e-11 1.342960e-06 5 1.600000e-10 4.687225e-06 6 3.200000e-10 1.590975e-05 7 6.400000e-10 4.054293e-05 8 1.280000e-09 6.771908e-06 9 2.560000e-09 -7.88582e-04 10 5.120000e-09 -6.13186e-03 11 1.024000e-08 -2.93223e-02 12 2.024000e-08 -9.24343e-02 13 3.024000e-08 -1.40407e-01 14 4.024000e-08 -1.42218e-01 15 5.024000e-08 -9.31278e-02 16 6.024000e-08 -1.00588e-02 17 7.024000e-08 7.634006e-02 18 8.024000e-08 1.336656e-01 19 9.024000e-08 1.404278e-01 20 1.002400e-07 9.323793e-02 21 1.102400e-07 9.243606e-03 22 1.202400e-07 -7.85336e-02 23 1.302400e-07 -1.35431e-01 24 1.402400e-07 -1.40413e-01 25 1.502400e-07 -9.24959e-02 26 1.602400e-07 -9.82027e-03 27 1.702400e-07 7.642091e-02 28 1.802400e-07 1.336985e-01 29 1.902400e-07 1.404375e-01 30 2.002400e-07 9.324286e-02 31 2.102400e-07 9.244434e-03 32 2.202400e-07 -7.85326e-02 33 2.302400e-07 -1.35432e-01 34 2.402400e-07 -1.40413e-01 35 2.502400e-07 -9.24960e-02 36 2.602400e-07 -9.82016e-03 37 2.702400e-07 7.642091e-02 38 2.802400e-07 1.336985e-01 39 2.902400e-07 1.404375e-01 40 3.002400e-07 9.324281e-02 41 3.102400e-07 9.244454e-03 42 3.202400e-07 -7.85325e-02 43 3.302400e-07 -1.35432e-01 44 3.402400e-07 -1.40413e-01 45 3.502400e-07 -9.24961e-02 46 3.602400e-07 -9.82014e-03 47 3.702400e-07 7.642092e-02 48 3.802400e-07 1.336985e-01 49 3.902400e-07 1.404376e-01 50 4.002400e-07 9.324278e-02 51 4.102400e-07 9.244469e-03 52 4.202400e-07 -7.85325e-02 53 4.302400e-07 -1.35432e-01 54 4.402400e-07 -1.40413e-01 Index time v(e1_p) -------------------------------------------------------------------------------- 55 4.502400e-07 -9.24961e-02 56 4.602400e-07 -9.82013e-03 57 4.702400e-07 7.642092e-02 58 4.802400e-07 1.336985e-01 59 4.902400e-07 1.404376e-01 60 5.002400e-07 9.324277e-02 61 5.102400e-07 9.244477e-03 62 5.202400e-07 -7.85325e-02 63 5.302400e-07 -1.35432e-01 64 5.402400e-07 -1.40413e-01 65 5.502400e-07 -9.24961e-02 66 5.602400e-07 -9.82013e-03 67 5.702400e-07 7.642092e-02 68 5.802400e-07 1.336985e-01 69 5.902400e-07 1.404376e-01 70 6.002400e-07 9.324276e-02 71 6.102400e-07 9.244480e-03 72 6.202400e-07 -7.85325e-02 73 6.302400e-07 -1.35432e-01 74 6.402400e-07 -1.40413e-01 75 6.502400e-07 -9.24961e-02 76 6.602400e-07 -9.82012e-03 77 6.702400e-07 7.642093e-02 78 6.802400e-07 1.336984e-01 79 6.902400e-07 1.404376e-01 80 7.002400e-07 9.324276e-02 81 7.102400e-07 9.244482e-03 82 7.202400e-07 -7.85325e-02 83 7.302400e-07 -1.35432e-01 84 7.402400e-07 -1.40413e-01 85 7.502400e-07 -9.24961e-02 86 7.602400e-07 -9.82012e-03 87 7.702400e-07 7.642093e-02 88 7.802400e-07 1.336984e-01 89 7.902400e-07 1.404376e-01 90 8.002400e-07 9.324275e-02 91 8.102400e-07 9.244483e-03 92 8.202400e-07 -7.85325e-02 93 8.302400e-07 -1.35432e-01 94 8.402400e-07 -1.40413e-01 95 8.502400e-07 -9.24961e-02 96 8.602400e-07 -9.82012e-03 97 8.702400e-07 7.642093e-02 98 8.802400e-07 1.336984e-01 99 8.902400e-07 1.404376e-01 100 9.002400e-07 9.324275e-02 101 9.102400e-07 9.244483e-03 102 9.202400e-07 -7.85325e-02 103 9.302400e-07 -1.35432e-01 104 9.402400e-07 -1.40413e-01 105 9.502400e-07 -9.24961e-02 106 9.602400e-07 -9.82012e-03 107 9.702400e-07 7.642093e-02 108 9.802400e-07 1.336984e-01 109 9.902400e-07 1.404376e-01 110 1.000000e-06 9.485434e-02 Total elapsed time: 0.180 seconds. Total DRAM available = 255.484375 MB. DRAM currently available = 133.890625 MB. Total ngspice program size = 14.214844 MB. ngspice-26/tests/.gitignore0000644000265600020320000000007312264261473015363 0ustar andreasadmin*.test *.log ngspiceCkt /xspice/digital/spinit results/ ngspice-26/tests/sensitivity/0000755000265600020320000000000012264261715015764 5ustar andreasadminngspice-26/tests/sensitivity/diffpair.out0000644000265600020320000002516412264261473020312 0ustar andreasadmin Circuit: simple differential pair - CM and DM dc sensitivity Warning -- Level not specified on line "(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50)" Using level 1. Warning -- Level not specified on line "(bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50)" Using level 1. Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Transfer function information: transfer_function = -1.10341e-01 output_impedance_at_v(5) = 9.446843e+03 vcm#input_impedance = 1.793366e+06 Transfer function information: transfer_function = -8.78493e+01 output_impedance_at_v(5) = 9.446843e+03 vdm#input_impedance = 8.940897e+03 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q1:bf q1:br q1:eg q1:fc -------------------------------------------------------------------------------- 0 1.851978e-02 -1.909518e-08 -1.720287e-08 -3.819037e-08 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q1:is q1:nc q1:ne q1:nf -------------------------------------------------------------------------------- 0 4.549980e+16 -9.547591e-09 -1.273012e-08 -1.339677e+02 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q1:nr q1:rb q1:rbm q1:tnom -------------------------------------------------------------------------------- 0 -1.909518e-08 -1.487980e-03 1.410876e-04 -6.960475e-01 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q1:vaf q1:xti q1_area q1_areab -------------------------------------------------------------------------------- 0 -1.143803e-02 -6.365061e-09 4.684669e+00 -1.909518e-08 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q1_areac q1_m q1_temp q2:bf -------------------------------------------------------------------------------- 0 -1.909518e-08 4.684670e+00 2.497064e-01 -1.851978e-02 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q2:br q2:eg q2:fc q2:is -------------------------------------------------------------------------------- 0 6.546832e-09 5.898047e-09 1.309366e-08 -4.549980e+16 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q2:nc q2:ne q2:nf q2:nr -------------------------------------------------------------------------------- 0 3.273416e-09 4.364555e-09 1.339677e+02 6.546832e-09 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q2:rb q2:rbm q2:tnom q2:vaf -------------------------------------------------------------------------------- 0 1.487980e-03 -1.410877e-04 6.960475e-01 1.143803e-02 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q2:xti q2_area q2_areab q2_areac -------------------------------------------------------------------------------- 0 2.182277e-09 -4.684669e+00 6.546832e-09 6.546832e-09 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q2_m q2_temp q3:bf q3:br -------------------------------------------------------------------------------- 0 -4.684670e+00 -2.497064e-01 3.308722e-18 3.534097e-22 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q3:eg q3:fc q3:is q3:nc -------------------------------------------------------------------------------- 0 2.729032e-22 6.058452e-22 6.776264e+01 1.514613e-22 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q3:ne q3:nf q3:nr q3:rb -------------------------------------------------------------------------------- 0 2.019484e-22 -2.168404e-13 3.534097e-22 -3.705769e-18 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q3:rbm q3:tnom q3:vaf q3:xti -------------------------------------------------------------------------------- 0 9.693523e-23 -1.003891e-15 -4.135903e-21 1.009742e-22 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q3_area q3_areab q3_areac q3_m -------------------------------------------------------------------------------- 0 7.623297e-15 3.029226e-22 3.029226e-22 7.623297e-15 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q3_temp q4:bf q4:br q4:eg -------------------------------------------------------------------------------- 0 3.764591e-16 -5.955700e-18 1.135960e-22 1.023387e-22 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q4:fc q4:is q4:nc q4:ne -------------------------------------------------------------------------------- 0 2.271919e-22 -6.776264e+01 5.679799e-23 7.573065e-23 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q4:nf q4:nr q4:rb q4:rbm -------------------------------------------------------------------------------- 0 2.168404e-13 1.135960e-22 3.705769e-18 -7.940934e-19 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q4:tnom q4:vaf q4:xti q4_area -------------------------------------------------------------------------------- 0 1.129377e-15 2.541099e-17 3.786532e-23 -7.623297e-15 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index q4_areab q4_areac q4_m q4_temp -------------------------------------------------------------------------------- 0 1.135960e-22 1.135960e-22 -7.623297e-15 -3.764591e-16 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index rbias rbias_m rbias_scale rc1 -------------------------------------------------------------------------------- 0 3.811648e-19 -6.776264e-15 7.623297e-15 6.031558e-04 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index rc1_m rc1_scale rc2 rc2_m -------------------------------------------------------------------------------- 0 -6.031564e+00 6.031558e+00 -6.031558e-04 6.031564e+00 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index rc2_scale rs1 rs1_m rs1_scale -------------------------------------------------------------------------------- 0 -6.031558e+00 -1.346892e-03 1.346894e+00 -1.346892e+00 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index rs2 rs2_m rs2_scale vcc -------------------------------------------------------------------------------- 0 1.346892e-03 -1.346894e+00 1.346892e+00 0.000000e+00 simple differential pair - CM and DM dc sensitivity Sensitivity Analysis Sat Aug 27 16:36:03 2005 -------------------------------------------------------------------------------- Index vcm vdm vee -------------------------------------------------------------------------------- 0 1.290931e-13 -1.758090e+02 4.235165e-16 CPU time since last call: 0.015 seconds. Total CPU time: 0.015 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/tests/sensitivity/diffpair.cir0000644000265600020320000000107212264261473020250 0ustar andreasadminsimple differential pair - CM and DM dc sensitivity * Models: .model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) .model qnr npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) * Circuit description: q1 4 2 6 qnr q2 5 3 6 qnl rs1 11 2 1k rs2 3 1 1k rc1 4 8 10k rc2 5 8 10k q3 7 7 9 qnl q4 6 7 9 qnr rbias 7 8 20k * Inputs/Supplies: vcm 1 0 dc 0 sin(0 0.1 5meg) ac 1 vdm 1 11 dc 0 sin(0 0.1 5meg) ac 1 vcc 8 0 12 vee 9 0 -12 .options noacct * Analyses: .tf v(5) vcm .tf v(5) vdm .sens v(5,4) .print SENS all .end ngspice-26/tests/sensitivity/Makefile.am0000644000265600020320000000040012264261473020013 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = diffpair.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/sensitivity/Makefile.in0000644000265600020320000003354012264261542020034 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/sensitivity DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = diffpair.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/sensitivity/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/sensitivity/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/regression/0000755000265600020320000000000012264261715015552 5ustar andreasadminngspice-26/tests/regression/Makefile.am0000644000265600020320000000022112264261473017602 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = lib-processing parser subckt-processing MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/regression/Makefile.in0000644000265600020320000004361612264261542017627 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/regression DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = lib-processing parser subckt-processing MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/regression/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/regression/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/regression/lib-processing/0000755000265600020320000000000012264261715020472 5ustar andreasadminngspice-26/tests/regression/lib-processing/ex1b.out0000644000265600020320000000021512264261473022061 0ustar andreasadmin Circuit: ex1b lib problem Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 v(check0) = 0.000000e+00 INFO: ok ngspice-26/tests/regression/lib-processing/ex2a.cir0000644000265600020320000000051412264261473022031 0ustar andreasadminex2a, check lib processing I1 7 0 -1mA X1 7 0 sub1_in_lib Vcheck1 7 check1 1.0V I2 9 0 -1mA X2 9 0 sub2_in_lib Vcheck2 9 check2 2.0V .lib 'ex2.lib' MOS .control op print v(check1) v(check2) if abs(v(check1)) > 1e-9 quit 1 end if abs(v(check2)) > 1e-9 quit 1 end echo "INFO: ok" quit 0 .endc .end ngspice-26/tests/regression/lib-processing/ex1b.cir0000644000265600020320000000053012264261473022027 0ustar andreasadminex1b, check lib processing I1 9 0 -1mA X1 9 0 sub1 R2 9 0 4k X3 9 0 sub_in_lib Vcheck 9 check0 1.0V .subckt sub1 n1 n2 .lib 'ex1.lib' RES X1 n1 n2 sub_in_lib .ends .subckt sub_in_lib n1 n2 R4 n1 n2 4k .ends .control op print v(check0) if abs(v(check0)) > 1e-9 quit 1 end echo "INFO: ok" quit 0 .endc .end ngspice-26/tests/regression/lib-processing/ex1.lib0000644000265600020320000000012712264261473021660 0ustar andreasadmin* -*- spice -*- .LIB RES .subckt sub_in_lib n1 n2 R3 n1 n2 2k .ends .ENDL RES ngspice-26/tests/regression/lib-processing/ex1a.cir0000644000265600020320000000042312264261473022027 0ustar andreasadminex1a, check lib processing I1 9 0 -1mA X1 9 0 sub1 Vcheck 9 check0 1.0V .lib 'ex1.lib' RES .subckt sub1 n1 n2 X2 n1 n2 sub_in_lib R2 n1 n2 2k .ends .control op print v(check0) if abs(v(check0)) > 1e-9 quit 1 end echo "INFO: ok" quit 0 .endc .end ngspice-26/tests/regression/lib-processing/ex2a.out0000644000265600020320000000024612264261473022065 0ustar andreasadmin Circuit: ex2a lib problem Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 v(check1) = 0.000000e+00 v(check2) = 0.000000e+00 INFO: ok ngspice-26/tests/regression/lib-processing/ex2.lib0000644000265600020320000000050212264261473021656 0ustar andreasadmin* -*- spice -*- .LIB MOS .subckt sub1_in_lib n1 n2 .LIB 'ex2.lib' RES Xsub1 n1 n2 sub3_in_lib R1a n1 n2 4k R1b n1 n2 2k .ends .subckt sub2_in_lib n1 n2 .LIB 'ex2.lib' RES Xsub2 n1 n2 sub3_in_lib R2 n1 n2 4k .ends .ENDL MOS .LIB RES .subckt sub3_in_lib n1 n2 R3 n1 n2 4k .ends .ENDL RES ngspice-26/tests/regression/lib-processing/extra3.lib0000644000265600020320000000013012264261473022363 0ustar andreasadmin* -*- spice -*- .LIB RES .subckt sub3_in_lib n1 n2 R3 n1 n2 4k .ends .ENDL RES ngspice-26/tests/regression/lib-processing/ex3.lib0000644000265600020320000000037612264261473021670 0ustar andreasadmin* -*- spice -*- .LIB MOS .subckt sub1_in_lib n1 n2 .LIB 'extra3.lib' RES Xsub1 n1 n2 sub3_in_lib R1a n1 n2 4k R1b n1 n2 2k .ends .subckt sub2_in_lib n1 n2 .LIB 'extra3.lib' RES Xsub2 n1 n2 sub3_in_lib R2 n1 n2 4k .ends .ENDL MOS ngspice-26/tests/regression/lib-processing/ex1a.out0000644000265600020320000000021512264261473022060 0ustar andreasadmin Circuit: ex1a lib problem Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 v(check0) = 0.000000e+00 INFO: ok ngspice-26/tests/regression/lib-processing/Makefile.am0000644000265600020320000000052512264261473022531 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = ex1a.cir ex1b.cir ex2a.cir ex3a.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ ex1.lib ex2.lib ex3.lib extra3.lib \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/regression/lib-processing/Makefile.in0000644000265600020320000003373712264261542022552 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/regression/lib-processing DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = ex1a.cir ex1b.cir ex2a.cir ex3a.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ ex1.lib ex2.lib ex3.lib extra3.lib \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/regression/lib-processing/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/regression/lib-processing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/regression/lib-processing/ex3a.cir0000644000265600020320000000051412264261473022032 0ustar andreasadminex3a, check lib processing I1 7 0 -1mA X1 7 0 sub1_in_lib Vcheck1 7 check1 1.0V I2 9 0 -1mA X2 9 0 sub2_in_lib Vcheck2 9 check2 2.0V .lib 'ex3.lib' MOS .control op print v(check1) v(check2) if abs(v(check1)) > 1e-9 quit 1 end if abs(v(check2)) > 1e-9 quit 1 end echo "INFO: ok" quit 0 .endc .end ngspice-26/tests/regression/lib-processing/ex3a.out0000644000265600020320000000024612264261473022066 0ustar andreasadmin Circuit: ex3a lib problem Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 v(check1) = 0.000000e+00 v(check2) = 0.000000e+00 INFO: ok ngspice-26/tests/regression/parser/0000755000265600020320000000000012264261715017046 5ustar andreasadminngspice-26/tests/regression/parser/minus-minus.cir0000644000265600020320000000074212264261473022035 0ustar andreasadmintest dash dash * (exec-spice "ngspice -b %s") v1 1 0 '2--3' b2 2 0 v = 2--3 .control define mismatch(a,b,err) abs(a-b)>err op let foo = 2--3 if mismatch(v(1), 5.0, 1e-9) echo "ERROR: v(1) failed" end if mismatch(v(2), 5.0, 1e-9) echo "ERROR: v(2) failed" end if mismatch(foo, 5.0, 1e-9) echo "ERROR: foo failed" end print v(1) v(2) foo echo "INFO: -- yes we can, print dash dash --" echo "INFO: -- yes we can, print upper and lower case --" quit 0 .endc .end ngspice-26/tests/regression/parser/xpressn-2.out0000644000265600020320000000017512264261473021444 0ustar andreasadmin Circuit: check precision of some functions Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 ngspice-26/tests/regression/parser/xpressn-1.out0000644000265600020320000000023312264261473021436 0ustar andreasadmin Circuit: * 'xpressn-1' check xpressn.c parser Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 INFO: 0 of 97 tests failed ngspice-26/tests/regression/parser/xpressn-1.cir0000644000265600020320000002150312264261473021407 0ustar andreasadmin* 'xpressn-1' check xpressn.c parser * (exec-spice "ngspice -b %s") * (tests-aux-renumber) * ---------------------------------------- * arbitrary tests v1001_t n1001_t 0 '1+2' v1002_t n1002_t 0 '1 + 2 ' v1003_t n1003_t 0 '1+2*3' v1004_t n1004_t 0 '(1?2:3)+100' v1005_t n1005_t 0 '(1>2?2*4:1+2*3)+100' v1001_g n1001_g 0 '3' v1002_g n1002_g 0 '3' v1003_g n1003_g 0 '7' v1004_g n1004_g 0 '102' v1005_g n1005_g 0 '107' v1006_t n1006_t 0 '1-2.1' v1007_t n1007_t 0 '1--1' v1008_t n1008_t 0 '5+2/-4' v1006_g n1006_g 0 '-1.1' v1007_g n1007_g 0 '2' v1008_g n1008_g 0 '4.5' * ---------------------------------------- * boolean operators '&&' '||' '!' * output: 0.0 or 1.0 * input: 0.0 is 'false', everything else is 'true' * --------------- * `&&' operator v1009_t n1009_t 0 '0 && 0' v1010_t n1010_t 0 '0 && 1' v1011_t n1011_t 0 '1 && 0' v1012_t n1012_t 0 '0.1 && 0.2' v1013_t n1013_t 0 '-0.1 && 0.2' v1009_g n1009_g 0 '0' v1010_g n1010_g 0 '0' v1011_g n1011_g 0 '0' v1012_g n1012_g 0 '1' v1013_g n1013_g 0 '1' * --------------- * `||' operator v1014_t n1014_t 0 '0 || 0' v1015_t n1015_t 0 '0 || 0.1' v1016_t n1016_t 0 '-0.1 || 0' v1017_t n1017_t 0 '0.1 || -0.2' v1014_g n1014_g 0 '0' v1015_g n1015_g 0 '1' v1016_g n1016_g 0 '1' v1017_g n1017_g 0 '1' * --------------- * `!' operator v1018_t n1018_t 0 '! 0.0' v1019_t n1019_t 0 '! 0.1' v1020_t n1020_t 0 '! (-0.1)' v1018_g n1018_g 0 '1' v1019_g n1019_g 0 '0' v1020_g n1020_g 0 '0' * ---------------------------------------- * comparison operators * output: 0.0 or 1.0 * ---------- * `>' v1021_t n1021_t 0 '3 > 2' v1022_t n1022_t 0 '2 > 3' v1023_t n1023_t 0 '2 > 2' v1021_g n1021_g 0 '1' v1022_g n1022_g 0 '0' v1023_g n1023_g 0 '0' * ---------- * '<' v1024_t n1024_t 0 '3 < 2' v1025_t n1025_t 0 '2 < 3' v1026_t n1026_t 0 '2 < 2' v1024_g n1024_g 0 '0' v1025_g n1025_g 0 '1' v1026_g n1026_g 0 '0' * ---------- * '<=' v1027_t n1027_t 0 '3 >= 2' v1028_t n1028_t 0 '2 >= 3' v1029_t n1029_t 0 '2 >= 2' v1027_g n1027_g 0 '1' v1028_g n1028_g 0 '0' v1029_g n1029_g 0 '1' * ---------- * '>=' v1030_t n1030_t 0 '3 <= 2' v1031_t n1031_t 0 '2 <= 3' v1032_t n1032_t 0 '2 <= 2' v1030_g n1030_g 0 '0' v1031_g n1031_g 0 '1' v1032_g n1032_g 0 '1' * ---------- * '==' v1033_t n1033_t 0 '3 == 2' v1034_t n1034_t 0 '2 == 3' v1035_t n1035_t 0 '2 == 2' v1033_g n1033_g 0 '0' v1034_g n1034_g 0 '0' v1035_g n1035_g 0 '1' * ---------- * '!=' v1036_t n1036_t 0 '3 != 2' v1037_t n1037_t 0 '2 != 3' v1038_t n1038_t 0 '2 != 2' v1036_g n1036_g 0 '1' v1037_g n1037_g 0 '1' v1038_g n1038_g 0 '0' * ---------------------------------------- * four variants of exponentiation v1039_t n1039_t 0 '2 ^ 3' v1039_g n1039_g 0 '8' v1040_t n1040_t 0 '2 ** 3' v1040_g n1040_g 0 '8' v1041_t n1041_t 0 'pwr(2,3)' v1041_g n1041_g 0 '8' v1042_t n1042_t 0 'pow(2,3)' v1042_g n1042_g 0 '8' * ---------------------------------------- * ternary 'c ? x : y' operator * input: 0.0 is false, everything else is true v1043_t n1043_t 0 ' 0.1 ? 42 : 43' v1044_t n1044_t 0 '-0.1 ? 42 : 43' v1045_t n1045_t 0 ' 0.0 ? 42 : 43' v1043_g n1043_g 0 '42' v1044_g n1044_g 0 '42' v1045_g n1045_g 0 '43' * assoziativity v1046_t n1046_t 0 '1 ? 42 : 1 ? 41 : 40' v1047_t n1047_t 0 '1 ? 42 : 0 ? 41 : 40' v1048_t n1048_t 0 '0 ? 42 : 1 ? 41 : 40' v1049_t n1049_t 0 '0 ? 42 : 0 ? 41 : 40' v1046_g n1046_g 0 '42' v1047_g n1047_g 0 '42' v1048_g n1048_g 0 '41' v1049_g n1049_g 0 '40' * -------------------- * regression tests * these failed in the past, due to incorrect transformations in inpcom.c * was incorrectly transformed --> (3>2)||ternary_fcn((1<4),0.2,0.3) v1050_t n1050_t 0 '(3>2)||(1<4) ? 0.2 : 0.3' v1050_g n1050_g 0 '0.2' * was incorrectly transformed --> controlled_exit() v1051_t n1051_t 0 '(3>2) ? (3+2)*((2>1)?1:1) : 42' v1051_g n1051_g 0 '5' * was incorrectly transformed --> ternary_fcn((3>2),42,(2*2))3 v1052_t n1052_t 0 '(3>2) ? 42 : (2*2)+3' v1052_g n1052_g 0 '42' * ---------------------------------------- * functions v1053_t n1053_t 0 'sin(0.3)' v1054_t n1054_t 0 'cos(0.3)' v1055_t n1055_t 0 'tan(0.3)' v1056_t n1056_t 0 'asin(0.3)' v1057_t n1057_t 0 'acos(0.3)' v1058_t n1058_t 0 'atan(0.3)' v1059_t n1059_t 0 'arctan(0.3)' v1060_t n1060_t 0 'sinh(0.3)' v1061_t n1061_t 0 'cosh(0.3)' v1062_t n1062_t 0 'tanh(0.3)' v1063_t n1063_t 0 'asinh(0.3)' v1064_t n1064_t 0 'acosh(1.3)' v1065_t n1065_t 0 'atanh(0.3)' v1053_g n1053_g 0 '0.29552020666133955' v1054_g n1054_g 0 '0.955336489125606' v1055_g n1055_g 0 '0.30933624960962325' v1056_g n1056_g 0 '0.3046926540153975' v1057_g n1057_g 0 '1.266103672779499' v1058_g n1058_g 0 '0.29145679447786704' v1059_g n1059_g 0 '0.29145679447786704' v1060_g n1060_g 0 '0.3045202934471426' v1061_g n1061_g 0 '1.0453385141288605' v1062_g n1062_g 0 '0.2913126124515909' v1063_g n1063_g 0 '0.2956730475634223' v1064_g n1064_g 0 '0.7564329108569595' v1065_g n1065_g 0 '0.3095196042031116' * ---------- v1066_t n1066_t 0 'exp(2.0)' v1067_t n1067_t 0 'exp(-2.0)' v1066_g n1066_g 0 '7.38905609893065' v1067_g n1067_g 0 '0.1353352832366127' * ---------- v1068_t n1068_t 0 'log(2.0)' v1069_t n1069_t 0 'log(0.5)' v1068_g n1068_g 0 '0.6931471805599453' v1069_g n1069_g 0 '-0.6931471805599453' v1070_t n1070_t 0 'ln(2.0)' v1071_t n1071_t 0 'ln(0.5)' v1070_g n1070_g 0 '0.6931471805599453' v1071_g n1071_g 0 '-0.6931471805599453' * ---------- v1072_t n1072_t 0 'sqrt(2.0)' v1072_g n1072_g 0 '1.4142135623730951' v1073_t n1073_t 0 'sqr(2.0)' v1073_g n1073_g 0 '4.0' * ---------------------------------------- * functions v1074_t n1074_t 0 'abs(2.0)' v1075_t n1075_t 0 'abs(-2.0)' v1074_g n1074_g 0 '2' v1075_g n1075_g 0 '2' v1076_t n1076_t 0 'sgn(2.0)' v1077_t n1077_t 0 'sgn(0.0)' v1078_t n1078_t 0 'sgn(-2.0)' v1076_g n1076_g 0 '1' v1077_g n1077_g 0 '0' v1078_g n1078_g 0 '-1' v1079_t n1079_t 0 'int(2.1)' v1080_t n1080_t 0 'int(1.9)' v1081_t n1081_t 0 'int(0)' v1082_t n1082_t 0 'int(-1.9)' v1083_t n1083_t 0 'int(-2.1)' v1079_g n1079_g 0 '2' v1080_g n1080_g 0 '1' v1081_g n1081_g 0 '0' v1082_g n1082_g 0 '-1' v1083_g n1083_g 0 '-2' v1084_t n1084_t 0 'nint(2.6)' v1085_t n1085_t 0 'nint(2.5)' v1086_t n1086_t 0 'nint(2.4)' v1087_t n1087_t 0 'nint(1.6)' v1088_t n1088_t 0 'nint(1.5)' v1089_t n1089_t 0 'nint(1.4)' v1090_t n1090_t 0 'nint(0.6)' v1091_t n1091_t 0 'nint(0.5)' v1092_t n1092_t 0 'nint(0.4)' v1093_t n1093_t 0 'nint(0)' v1094_t n1094_t 0 'nint(-0.4)' v1095_t n1095_t 0 'nint(-0.5)' v1096_t n1096_t 0 'nint(-0.6)' v1097_t n1097_t 0 'nint(-1.4)' v1098_t n1098_t 0 'nint(-1.5)' v1099_t n1099_t 0 'nint(-1.6)' v1100_t n1100_t 0 'nint(-2.4)' v1101_t n1101_t 0 'nint(-2.5)' v1102_t n1102_t 0 'nint(-2.6)' v1084_g n1084_g 0 '3' v1085_g n1085_g 0 '2' v1086_g n1086_g 0 '2' v1087_g n1087_g 0 '2' v1088_g n1088_g 0 '2' v1089_g n1089_g 0 '1' v1090_g n1090_g 0 '1' v1091_g n1091_g 0 '0' v1092_g n1092_g 0 '0' v1093_g n1093_g 0 '0' v1094_g n1094_g 0 '0' v1095_g n1095_g 0 '0' v1096_g n1096_g 0 '-1' v1097_g n1097_g 0 '-1' v1098_g n1098_g 0 '-2' v1099_g n1099_g 0 '-2' v1100_g n1100_g 0 '-2' v1101_g n1101_g 0 '-2' v1102_g n1102_g 0 '-3' v1103_t n1103_t 0 'floor(2.1)' v1104_t n1104_t 0 'floor(1.9)' v1105_t n1105_t 0 'floor(0)' v1106_t n1106_t 0 'floor(-1.9)' v1107_t n1107_t 0 'floor(-2.1)' v1103_g n1103_g 0 '2' v1104_g n1104_g 0 '1' v1105_g n1105_g 0 '0' v1106_g n1106_g 0 '-2' v1107_g n1107_g 0 '-3' v1108_t n1108_t 0 'ceil(2.1)' v1109_t n1109_t 0 'ceil(1.9)' v1110_t n1110_t 0 'ceil(0)' v1111_t n1111_t 0 'ceil(-1.9)' v1112_t n1112_t 0 'ceil(-2.1)' v1108_g n1108_g 0 '3' v1109_g n1109_g 0 '2' v1110_g n1110_g 0 '0' v1111_g n1111_g 0 '-1' v1112_g n1112_g 0 '-2' * ---------------------------------------- * min(a,b) max(a,b) v1113_t n1113_t 0 'min(1.1, 2.1)' v1114_t n1114_t 0 'min(2.1, 1.1)' v1113_g n1113_g 0 '1.1' v1114_g n1114_g 0 '1.1' v1115_t n1115_t 0 'max(1.1, 2.1)' v1116_t n1116_t 0 'max(2.1, 1.1)' v1115_g n1115_g 0 '2.1' v1116_g n1116_g 0 '2.1' * ---------------------------------------- .control define mismatch(a,b,err) abs(a-b)>err op let total_count = 0 let fail_count = 0 let tests = 1001 + vector(116) foreach n $&tests set n_test = "n{$n}_t" set n_gold = "n{$n}_g" if mismatch(v($n_test), v($n_gold), 1e-9) let v_test = v($n_test) let v_gold = v($n_gold) echo "ERROR, test failure, v($n_test) = $&v_test but should be $&v_gold" let fail_count = fail_count + 1 end let total_count = total_count + 1 end if fail_count > 0 echo "ERROR: $&fail_count of $&total_count tests failed" quit 1 else echo "INFO: $&fail_count of $&total_count tests failed" quit 0 end .endc .end ngspice-26/tests/regression/parser/minus-minus.out0000644000265600020320000000037712264261473022073 0ustar andreasadmin Circuit: test dash dash Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 v(1) = 5.000000e+00 v(2) = 5.000000e+00 foo = 5.000000e+00 INFO: -- yes we can, print dash dash -- INFO: -- yes we can, print upper and lower case -- ngspice-26/tests/regression/parser/Makefile.am0000644000265600020320000000046712264261473021112 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = minus-minus.cir xpressn-1.cir xpressn-2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/regression/parser/Makefile.in0000644000265600020320000003365112264261542021121 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/regression/parser DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = minus-minus.cir xpressn-1.cir xpressn-2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/regression/parser/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/regression/parser/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/regression/parser/xpressn-2.cir0000644000265600020320000001567212264261473021422 0ustar andreasadmincheck precision of some functions * do not change this file, its generated * (exec-spice "ngspice -b %s") v0 n0 0 'sin(1.0e-9)' v1 n1 0 'sin(1.0e-1)' v2 n2 0 'sin(7.0e-1)' v3 n3 0 'cos(1.0e-9)' v4 n4 0 'cos(1.0e-1)' v5 n5 0 'cos(7.0e-1)' v6 n6 0 'tan(1.0e-9)' v7 n7 0 'tan(1.0e-1)' v8 n8 0 'tan(7.0e-1)' v9 n9 0 'asin(1.0e-9)' v10 n10 0 'asin(1.0e-1)' v11 n11 0 'asin(7.0e-1)' v12 n12 0 'acos(1.0e-9)' v13 n13 0 'acos(1.0e-1)' v14 n14 0 'acos(7.0e-1)' v15 n15 0 'atan(1.0e-9)' v16 n16 0 'atan(1.0e-1)' v17 n17 0 'atan(7.0e-1)' v18 n18 0 'sinh(1.0e-9)' v19 n19 0 'sinh(1.0e-1)' v20 n20 0 'sinh(7.0e-1)' v21 n21 0 'cosh(1.0e-9)' v22 n22 0 'cosh(1.0e-1)' v23 n23 0 'cosh(7.0e-1)' v24 n24 0 'tanh(1.0e-9)' v25 n25 0 'tanh(1.0e-1)' v26 n26 0 'tanh(7.0e-1)' v27 n27 0 'asinh(1.0e-9)' v28 n28 0 'asinh(1.0e-1)' v29 n29 0 'asinh(7.0e-1)' v30 n30 0 'acosh(1.2e+0)' v31 n31 0 'atanh(1.0e-9)' v32 n32 0 'atanh(1.0e-1)' v33 n33 0 'atanh(7.0e-1)' .control op let eps = 1.1102230246251568e-16 define mismatch(y,gold,err) abs(y-gold)>(err*gold) define relerr_(y,gold) (y-gold)/(gold*eps) if mismatch(v(n0), 1.0e-9, 10*eps) let relerr = relerr_(v(n0), 1.0e-9) echo "ERROR, sin(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n1), 9.983341664682815e-2, 10*eps) let relerr = relerr_(v(n1), 9.983341664682815e-2) echo "ERROR, sin(1.0e-1) versus 9.983341664682815e-2 mismatch" print relerr end if mismatch(v(n2), 6.44217687237691e-1, 10*eps) let relerr = relerr_(v(n2), 6.44217687237691e-1) echo "ERROR, sin(7.0e-1) versus 6.44217687237691e-1 mismatch" print relerr end if mismatch(v(n3), 1.0e+0, 10*eps) let relerr = relerr_(v(n3), 1.0e+0) echo "ERROR, cos(1.0e-9) versus 1.0e+0 mismatch" print relerr end if mismatch(v(n4), 9.950041652780258e-1, 10*eps) let relerr = relerr_(v(n4), 9.950041652780258e-1) echo "ERROR, cos(1.0e-1) versus 9.950041652780258e-1 mismatch" print relerr end if mismatch(v(n5), 7.648421872844885e-1, 10*eps) let relerr = relerr_(v(n5), 7.648421872844885e-1) echo "ERROR, cos(7.0e-1) versus 7.648421872844885e-1 mismatch" print relerr end if mismatch(v(n6), 1.0e-9, 10*eps) let relerr = relerr_(v(n6), 1.0e-9) echo "ERROR, tan(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n7), 1.0033467208545055e-1, 10*eps) let relerr = relerr_(v(n7), 1.0033467208545055e-1) echo "ERROR, tan(1.0e-1) versus 1.0033467208545055e-1 mismatch" print relerr end if mismatch(v(n8), 8.422883804630794e-1, 10*eps) let relerr = relerr_(v(n8), 8.422883804630794e-1) echo "ERROR, tan(7.0e-1) versus 8.422883804630794e-1 mismatch" print relerr end if mismatch(v(n9), 1.0e-9, 10*eps) let relerr = relerr_(v(n9), 1.0e-9) echo "ERROR, asin(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n10), 1.0016742116155979e-1, 10*eps) let relerr = relerr_(v(n10), 1.0016742116155979e-1) echo "ERROR, asin(1.0e-1) versus 1.0016742116155979e-1 mismatch" print relerr end if mismatch(v(n11), 7.753974966107529e-1, 10*eps) let relerr = relerr_(v(n11), 7.753974966107529e-1) echo "ERROR, asin(7.0e-1) versus 7.753974966107529e-1 mismatch" print relerr end if mismatch(v(n12), 1.5707963257948965e+0, 10*eps) let relerr = relerr_(v(n12), 1.5707963257948965e+0) echo "ERROR, acos(1.0e-9) versus 1.5707963257948965e+0 mismatch" print relerr end if mismatch(v(n13), 1.470628905633337e+0, 10*eps) let relerr = relerr_(v(n13), 1.470628905633337e+0) echo "ERROR, acos(1.0e-1) versus 1.470628905633337e+0 mismatch" print relerr end if mismatch(v(n14), 7.953988301841437e-1, 10*eps) let relerr = relerr_(v(n14), 7.953988301841437e-1) echo "ERROR, acos(7.0e-1) versus 7.953988301841437e-1 mismatch" print relerr end if mismatch(v(n15), 1.0e-9, 10*eps) let relerr = relerr_(v(n15), 1.0e-9) echo "ERROR, atan(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n16), 9.966865249116206e-2, 10*eps) let relerr = relerr_(v(n16), 9.966865249116206e-2) echo "ERROR, atan(1.0e-1) versus 9.966865249116206e-2 mismatch" print relerr end if mismatch(v(n17), 6.107259643892086e-1, 10*eps) let relerr = relerr_(v(n17), 6.107259643892086e-1) echo "ERROR, atan(7.0e-1) versus 6.107259643892086e-1 mismatch" print relerr end if mismatch(v(n18), 1.0e-9, 10*eps) let relerr = relerr_(v(n18), 1.0e-9) echo "ERROR, sinh(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n19), 1.0016675001984403e-1, 10*eps) let relerr = relerr_(v(n19), 1.0016675001984403e-1) echo "ERROR, sinh(1.0e-1) versus 1.0016675001984403e-1 mismatch" print relerr end if mismatch(v(n20), 7.585837018395335e-1, 10*eps) let relerr = relerr_(v(n20), 7.585837018395335e-1) echo "ERROR, sinh(7.0e-1) versus 7.585837018395335e-1 mismatch" print relerr end if mismatch(v(n21), 1.0e+0, 10*eps) let relerr = relerr_(v(n21), 1.0e+0) echo "ERROR, cosh(1.0e-9) versus 1.0e+0 mismatch" print relerr end if mismatch(v(n22), 1.0050041680558035e+0, 10*eps) let relerr = relerr_(v(n22), 1.0050041680558035e+0) echo "ERROR, cosh(1.0e-1) versus 1.0050041680558035e+0 mismatch" print relerr end if mismatch(v(n23), 1.255169005630943e+0, 10*eps) let relerr = relerr_(v(n23), 1.255169005630943e+0) echo "ERROR, cosh(7.0e-1) versus 1.255169005630943e+0 mismatch" print relerr end if mismatch(v(n24), 1.0e-9, 10*eps) let relerr = relerr_(v(n24), 1.0e-9) echo "ERROR, tanh(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n25), 9.966799462495581e-2, 10*eps) let relerr = relerr_(v(n25), 9.966799462495581e-2) echo "ERROR, tanh(1.0e-1) versus 9.966799462495581e-2 mismatch" print relerr end if mismatch(v(n26), 6.043677771171635e-1, 10*eps) let relerr = relerr_(v(n26), 6.043677771171635e-1) echo "ERROR, tanh(7.0e-1) versus 6.043677771171635e-1 mismatch" print relerr end if mismatch(v(n27), 1.0e-9, 10*eps) let relerr = relerr_(v(n27), 1.0e-9) echo "ERROR, asinh(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n28), 9.983407889920759e-2, 10*eps) let relerr = relerr_(v(n28), 9.983407889920759e-2) echo "ERROR, asinh(1.0e-1) versus 9.983407889920759e-2 mismatch" print relerr end if mismatch(v(n29), 6.526665660823557e-1, 10*eps) let relerr = relerr_(v(n29), 6.526665660823557e-1) echo "ERROR, asinh(7.0e-1) versus 6.526665660823557e-1 mismatch" print relerr end if mismatch(v(n30), 6.223625037147784e-1, 10*eps) let relerr = relerr_(v(n30), 6.223625037147784e-1) echo "ERROR, acosh(1.2e+0) versus 6.223625037147784e-1 mismatch" print relerr end if mismatch(v(n31), 1.0e-9, 10*eps) let relerr = relerr_(v(n31), 1.0e-9) echo "ERROR, atanh(1.0e-9) versus 1.0e-9 mismatch" print relerr end if mismatch(v(n32), 1.0033534773107558e-1, 10*eps) let relerr = relerr_(v(n32), 1.0033534773107558e-1) echo "ERROR, atanh(1.0e-1) versus 1.0033534773107558e-1 mismatch" print relerr end if mismatch(v(n33), 8.673005276940532e-1, 10*eps) let relerr = relerr_(v(n33), 8.673005276940532e-1) echo "ERROR, atanh(7.0e-1) versus 8.673005276940532e-1 mismatch" print relerr end quit 0 .endc ngspice-26/tests/regression/subckt-processing/0000755000265600020320000000000012264261715021217 5ustar andreasadminngspice-26/tests/regression/subckt-processing/model-scope-5.out0000644000265600020320000000025712264261473024326 0ustar andreasadmin Circuit: check scoping of nested .model definitions Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 1 INFO: 0 of 7 tests failed ngspice-25 done ngspice-26/tests/regression/subckt-processing/model-scope-5.cir0000644000265600020320000000260212264261473024270 0ustar andreasadmincheck scoping of nested .model definitions * (exec-spice "ngspice -b %s") * (tests-aux-renumber) i1 n1001_t 0 dc=-1 i2 n1002_t 0 dc=-1 i3 n1003_t 0 dc=-1 i4 n1004_t 0 dc=-1 i5 n1005_t 0 dc=-1 i6 n1006_t 0 dc=-1 i7 n1007_t 0 dc=-1 x1 n1001_t sub1 v1_g n1001_g 0 2k x2 n1002_t n1003_t n1004_t n1005_t n1006_t n1007_t sub2 v2_g n1002_g 0 4k v3_g n1003_g 0 1k v4_g n1004_g 0 8k v5_g n1005_g 0 1k v6_g n1006_g 0 8k v7_g n1007_g 0 43 .subckt sub1 2 .model my r r=2k r1 2 0 my .ends .subckt sub2 3 41a 41b 42a 42b 5 r2 3 0 my x31 41a 41b sub3 x32 42a 42b sub3 .subckt sub3 4 5 .model my r r=8k .model any r r=42 r5 4 0 1k r6 5 0 my .ends .model just r r=43 r5 5 0 just .ends .model my r r=4k .control define mismatch(a,b,err) abs(a-b)>err op let total_count = 0 let fail_count = 0 let tests = 1001 + vector(7) foreach n $&tests set n_test = "n{$n}_t" set n_gold = "n{$n}_g" if mismatch(v($n_test), v($n_gold), 1e-9) let v_test = v($n_test) let v_gold = v($n_gold) echo "ERROR, test failure, v($n_test) = $&v_test but should be $&v_gold" let fail_count = fail_count + 1 end let total_count = total_count + 1 end if fail_count > 0 echo "ERROR: $&fail_count of $&total_count tests failed" quit 1 else echo "INFO: $&fail_count of $&total_count tests failed" quit 0 end .endc .end ngspice-26/tests/regression/subckt-processing/Makefile.am0000644000265600020320000000043512264261473023256 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = model-scope-5.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/regression/subckt-processing/Makefile.in0000644000265600020320000003366012264261542023272 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/regression/subckt-processing DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = model-scope-5.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/regression/subckt-processing/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/regression/subckt-processing/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsimsoi/0000755000265600020320000000000012264261714015036 5ustar andreasadminngspice-26/tests/bsimsoi/pmos/0000755000265600020320000000000012264261473016016 5ustar andreasadminngspice-26/tests/bsimsoi/pmos/reference/0000755000265600020320000000000012264261473017754 5ustar andreasadminngspice-26/tests/bsimsoi/pmos/reference/acFreq02.standard0000644000265600020320000000710512264261473023044 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.7988153217581e-16 1.38428354007981e-16 4.1453130421346e-17 1258.925 1.79881589846049e-16 1.38428422759048e-16 4.14531418027401e-17 1584.893 1.79881529113301e-16 1.38428357070489e-16 4.14531318748149e-17 1995.262 1.7988153417013e-16 1.3842835201366e-16 4.14531342966069e-17 2511.886 1.79881570072246e-16 1.3842837947228e-16 4.14531335753039e-17 3162.278 1.79881466664194e-16 1.38428318861183e-16 4.14531226384072e-17 3981.072 1.79881491178942e-16 1.38428355026938e-16 4.14531361520036e-17 5011.872 1.79881529677026e-16 1.38428356506765e-16 4.14531414146733e-17 6309.573 1.7988152253463e-16 1.3842836364916e-16 4.14531336611098e-17 7943.282 1.79881498683369e-16 1.38428367464001e-16 4.14531312193686e-17 10000 1.7988153217581e-16 1.38428354007981e-16 4.14531145058516e-17 12589.25 1.79881589846049e-16 1.38428422759048e-16 4.14531291606095e-17 15848.93 1.79881529113301e-16 1.38428357070489e-16 4.14531117908164e-17 19952.62 1.79881454403692e-16 1.3842835201366e-16 4.14530944133878e-17 25118.86 1.79881443350776e-16 1.3842837947228e-16 4.14530765506425e-17 31622.78 1.79881366005781e-16 1.38428318861183e-16 4.14530270129145e-17 39810.72 1.79881251311474e-16 1.38428275071115e-16 4.14529762403586e-17 50118.72 1.79881148609968e-16 1.3842826124e-16 4.14528873699681e-17 63095.73 1.79880967598702e-16 1.38428187078638e-16 4.1452730071344e-17 79432.82 1.79880617080841e-16 1.38428066917684e-16 4.14525100903144e-17 100000 1.79880099781322e-16 1.38427876543152e-16 4.14521436606988e-17 125892.5 1.79879314262535e-16 1.3842766423121e-16 4.14515741785414e-17 158489.3 1.79877913993573e-16 1.3842715203058e-16 4.14506414590022e-17 199526.2 1.79875870753015e-16 1.38426437619143e-16 4.14491858579141e-17 251188.6 1.79872572847881e-16 1.38425338157002e-16 4.1446886206837e-17 316227.8 1.79867324157112e-16 1.38423537586547e-16 4.14432379822121e-17 398107.2 1.79859063570731e-16 1.38420799201712e-16 4.14375047887053e-17 501187.2 1.79846122196239e-16 1.3841641640562e-16 4.14284673226808e-17 630957.3 1.79825801922587e-16 1.38409546276329e-16 4.141428814615e-17 794328.2 1.79794099814518e-16 1.38398853815716e-16 4.13922004627943e-17 1000000 1.7974513638958e-16 1.38382326398439e-16 4.13580990048258e-17 1258925 1.79670719107064e-16 1.38357247563575e-16 4.13062023183739e-17 1584893 1.79559883877488e-16 1.38319803058652e-16 4.12289643256718e-17 1995262 1.7940030324824e-16 1.38265947545408e-16 4.11177164238156e-17 2511886 1.79180927065075e-16 1.3819185384868e-16 4.0964812390979e-17 3162278 1.78897983636149e-16 1.38096297084611e-16 4.07676388432091e-17 3981072 1.78561780350701e-16 1.37982801206068e-16 4.05333243699865e-17 5011872 1.78198896327729e-16 1.3786031254594e-16 4.02803757887102e-17 6309573 1.77845664409691e-16 1.37741075502336e-16 4.00341877175811e-17 7943282 1.77534813007364e-16 1.37636127373588e-16 3.98175381283094e-17 10000000 1.77284600969379e-16 1.37551664919453e-16 3.96431567465277e-17 12589250 1.77097413416387e-16 1.37488480346364e-16 3.95126506031097e-17 15848930 1.76964629592646e-16 1.37443638624538e-16 3.94201291276923e-17 19952620 1.76874179915676e-16 1.37413084787765e-16 3.9357087669092e-17 25118860 1.76814150171436e-16 1.37392874980854e-16 3.93152536727762e-17 31622780 1.76774997039303e-16 1.37379609181261e-16 3.92879802980323e-17 39810720 1.76749821501251e-16 1.37371099186047e-16 3.92704181558394e-17 50118720 1.76733725246081e-16 1.37365687504917e-16 3.92592113405747e-17 63095730 1.76723483065839e-16 1.37362230834036e-16 3.92520559757896e-17 79432820 1.76716966370782e-16 1.37360025490788e-16 3.92475219843501e-17 100000000 1.76712916413793e-16 1.37358625888977e-16 3.92446486845199e-17 ngspice-26/tests/bsimsoi/pmos/reference/acVd01.standard0000644000265600020320000000335612264261473022523 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.1 -3.784770e-05 3.042694e-04 1.51603841047401e-16 5.90699259934402e-17 0.2 -6.441850e-05 2.931023e-04 1.32994136008743e-16 7.24576896182356e-17 0.3 -8.351476e-05 2.802468e-04 1.13801830812342e-16 8.52417430795739e-17 0.4 -9.737521e-05 2.665477e-04 9.49671757127772e-17 9.71088262926385e-17 0.5 -1.088064e-04 2.533665e-04 7.80045511200726e-17 1.07190629022331e-16 0.6 -1.187798e-04 2.420734e-04 6.45443774756718e-17 1.14624331035038e-16 0.7 -1.263466e-04 2.344094e-04 5.5355694987796e-17 1.19266032291799e-16 0.8 -1.314696e-04 2.312224e-04 5.00711835569914e-17 1.21492132894525e-16 0.9 -1.347149e-04 2.312080e-04 4.75403028717445e-17 1.22094133057519e-16 1 -1.368245e-04 2.322485e-04 4.64687225816094e-17 1.21885333000986e-16 1.1 -1.383271e-04 2.321062e-04 4.58058024021209e-17 1.21593932922088e-16 1.2 -1.394190e-04 2.308895e-04 4.52576522537068e-17 1.21361432859138e-16 0.1 -1.711294e-05 2.545691e-04 1.52877141392153e-16 5.7819145654786e-17 0.2 -3.085515e-05 2.383249e-04 1.3840803747458e-16 6.86651585913913e-17 0.3 -4.211016e-05 2.251054e-04 1.22307633115325e-16 7.9882841628628e-17 0.4 -5.142137e-05 2.139760e-04 1.05608128593862e-16 9.07006845576061e-17 0.5 -5.917567e-05 2.044110e-04 8.92523441654616e-17 1.00631527246425e-16 0.6 -6.567588e-05 1.959933e-04 7.44988001708752e-17 1.09080929534138e-16 0.7 -7.119267e-05 1.883134e-04 6.25400069329798e-17 1.15553431286596e-16 0.8 -7.588823e-05 1.811701e-04 5.38822645888583e-17 1.19954332478159e-16 0.9 -7.970494e-05 1.748474e-04 4.81754330437087e-17 1.22620133199936e-16 1 -8.254585e-05 1.699069e-04 4.46596320917903e-17 1.2403903358411e-16 1.1 -8.440738e-05 1.670649e-04 4.2655951549285e-17 1.24591833733783e-16 1.2 -8.533282e-05 1.670362e-04 4.17242112970123e-17 1.2449583370779e-16 ngspice-26/tests/bsimsoi/pmos/reference/dcSweep02.standard0000644000265600020320000000771212264261473023241 0ustar andreasadminV(d) I(d) -1.000000e-01 -1.789307e-13 -2.000000e-01 -2.899054e-13 -3.000000e-01 -4.310319e-13 -4.000000e-01 -6.042802e-13 -5.000000e-01 -8.130389e-13 -6.000000e-01 -1.062778e-12 -7.000000e-01 -1.360203e-12 -8.000000e-01 -1.712858e-12 -9.000000e-01 -2.129013e-12 -1.000000e+00 -2.617708e-12 -1.100000e+00 -3.188947e-12 -1.200000e+00 -3.854294e-12 -1.300000e+00 -4.629387e-12 -1.400000e+00 -5.545876e-12 -1.500000e+00 -6.701330e-12 -1.600000e+00 -8.368640e-12 -1.000000e-01 -3.057304e-08 -2.000000e-01 -5.341968e-08 -3.000000e-01 -8.578265e-08 -4.000000e-01 -1.317897e-07 -5.000000e-01 -1.956043e-07 -6.000000e-01 -2.819067e-07 -7.000000e-01 -3.961964e-07 -8.000000e-01 -5.457322e-07 -9.000000e-01 -7.421982e-07 -1.000000e+00 -1.007997e-06 -1.100000e+00 -1.386266e-06 -1.200000e+00 -1.936295e-06 -1.300000e+00 -2.721749e-06 -1.400000e+00 -3.781212e-06 -1.500000e+00 -5.145451e-06 -1.600000e+00 -6.843670e-06 -1.000000e-01 -6.523317e-05 -2.000000e-01 -1.123510e-04 -3.000000e-01 -1.457251e-04 -4.000000e-01 -1.669823e-04 -5.000000e-01 -1.793040e-04 -6.000000e-01 -1.873231e-04 -7.000000e-01 -1.935049e-04 -8.000000e-01 -1.989933e-04 -9.000000e-01 -2.043676e-04 -1.000000e+00 -2.097029e-04 -1.100000e+00 -2.149605e-04 -1.200000e+00 -2.201088e-04 -1.300000e+00 -2.251752e-04 -1.400000e+00 -2.301837e-04 -1.500000e+00 -2.351614e-04 -1.600000e+00 -2.401340e-04 -1.000000e-01 -1.527918e-13 -2.000000e-01 -2.464246e-13 -3.000000e-01 -3.665628e-13 -4.000000e-01 -5.147983e-13 -5.000000e-01 -6.936413e-13 -6.000000e-01 -9.071297e-13 -7.000000e-01 -1.160350e-12 -8.000000e-01 -1.459125e-12 -9.000000e-01 -1.809871e-12 -1.000000e+00 -2.219563e-12 -1.100000e+00 -2.695772e-12 -1.200000e+00 -3.246762e-12 -1.300000e+00 -3.881744e-12 -1.400000e+00 -4.611579e-12 -1.500000e+00 -5.450975e-12 -1.600000e+00 -6.424920e-12 -1.000000e-01 -1.908610e-10 -2.000000e-01 -3.874885e-10 -3.000000e-01 -7.261183e-10 -4.000000e-01 -1.304306e-09 -5.000000e-01 -2.264571e-09 -6.000000e-01 -3.814859e-09 -7.000000e-01 -6.250729e-09 -8.000000e-01 -9.981612e-09 -9.000000e-01 -1.556340e-08 -1.000000e+00 -2.374604e-08 -1.100000e+00 -3.557069e-08 -1.200000e+00 -5.265120e-08 -1.300000e+00 -7.817441e-08 -1.400000e+00 -1.207195e-07 -1.500000e+00 -2.093818e-07 -1.600000e+00 -4.348790e-07 -1.000000e-01 -8.188961e-05 -2.000000e-01 -1.338936e-04 -3.000000e-01 -1.620568e-04 -4.000000e-01 -1.748698e-04 -5.000000e-01 -1.821380e-04 -6.000000e-01 -1.873677e-04 -7.000000e-01 -1.918575e-04 -8.000000e-01 -1.962996e-04 -9.000000e-01 -2.011708e-04 -1.000000e+00 -2.065496e-04 -1.100000e+00 -2.123284e-04 -1.200000e+00 -2.183131e-04 -1.300000e+00 -2.245161e-04 -1.400000e+00 -2.309119e-04 -1.500000e+00 -2.375159e-04 -1.600000e+00 -2.443420e-04 -1.000000e-01 -1.246568e-10 -2.000000e-01 -1.404667e-10 -3.000000e-01 -1.415609e-10 -4.000000e-01 -1.416631e-10 -5.000000e-01 -1.417491e-10 -6.000000e-01 -1.419310e-10 -7.000000e-01 -1.422955e-10 -8.000000e-01 -1.429657e-10 -9.000000e-01 -1.441117e-10 -1.000000e+00 -1.459540e-10 -1.100000e+00 -1.487642e-10 -1.200000e+00 -1.528621e-10 -1.300000e+00 -1.586097e-10 -1.400000e+00 -1.664029e-10 -1.500000e+00 -1.766625e-10 -1.600000e+00 -1.898250e-10 -1.000000e-01 -1.739663e-06 -2.000000e-01 -2.271515e-06 -3.000000e-01 -2.658914e-06 -4.000000e-01 -3.016874e-06 -5.000000e-01 -3.370998e-06 -6.000000e-01 -3.731594e-06 -7.000000e-01 -4.104225e-06 -8.000000e-01 -4.492897e-06 -9.000000e-01 -4.902036e-06 -1.000000e+00 -5.339689e-06 -1.100000e+00 -5.825991e-06 -1.200000e+00 -6.413703e-06 -1.300000e+00 -7.234006e-06 -1.400000e+00 -8.509082e-06 -1.500000e+00 -1.040334e-05 -1.600000e+00 -1.288300e-05 -1.000000e-01 -4.074150e-05 -2.000000e-01 -7.406657e-05 -3.000000e-01 -1.010768e-04 -4.000000e-01 -1.226715e-04 -5.000000e-01 -1.394550e-04 -6.000000e-01 -1.517552e-04 -7.000000e-01 -1.605021e-04 -8.000000e-01 -1.670024e-04 -9.000000e-01 -1.721530e-04 -1.000000e+00 -1.765128e-04 -1.100000e+00 -1.805142e-04 -1.200000e+00 -1.845583e-04 -1.300000e+00 -1.889092e-04 -1.400000e+00 -1.935564e-04 -1.500000e+00 -1.983603e-04 -1.600000e+00 -2.032220e-04 ngspice-26/tests/bsimsoi/pmos/reference/dcSweep01.standard0000644000265600020320000000771212264261473023240 0ustar andreasadminV(d) I(d) -1.000000e-01 -1.789308e-13 -2.000000e-01 -2.899051e-13 -3.000000e-01 -4.310282e-13 -4.000000e-01 -6.042801e-13 -5.000000e-01 -8.130390e-13 -6.000000e-01 -1.062778e-12 -7.000000e-01 -1.360203e-12 -8.000000e-01 -1.712858e-12 -9.000000e-01 -2.129013e-12 -1.000000e+00 -2.617708e-12 -1.100000e+00 -3.188947e-12 -1.200000e+00 -3.854294e-12 -1.300000e+00 -4.629387e-12 -1.400000e+00 -5.545876e-12 -1.500000e+00 -6.701330e-12 -1.600000e+00 -8.368640e-12 -1.000000e-01 -1.260908e-08 -2.000000e-01 -2.123638e-08 -3.000000e-01 -3.383739e-08 -4.000000e-01 -5.207216e-08 -5.000000e-01 -7.773994e-08 -6.000000e-01 -1.129282e-07 -7.000000e-01 -1.600570e-07 -8.000000e-01 -2.220518e-07 -9.000000e-01 -3.029209e-07 -1.000000e+00 -4.093930e-07 -1.100000e+00 -5.550268e-07 -1.200000e+00 -7.668972e-07 -1.300000e+00 -1.090293e-06 -1.400000e+00 -1.574731e-06 -1.500000e+00 -2.261906e-06 -1.600000e+00 -3.190900e-06 -1.000000e-01 -4.002699e-05 -2.000000e-01 -7.197073e-05 -3.000000e-01 -9.710855e-05 -4.000000e-01 -1.165604e-04 -5.000000e-01 -1.312070e-04 -6.000000e-01 -1.420461e-04 -7.000000e-01 -1.505450e-04 -8.000000e-01 -1.579522e-04 -9.000000e-01 -1.650652e-04 -1.000000e+00 -1.720647e-04 -1.100000e+00 -1.789170e-04 -1.200000e+00 -1.855652e-04 -1.300000e+00 -1.920581e-04 -1.400000e+00 -1.984317e-04 -1.500000e+00 -2.047289e-04 -1.600000e+00 -2.109910e-04 -1.000000e-01 -1.527918e-13 -2.000000e-01 -2.464243e-13 -3.000000e-01 -3.665583e-13 -4.000000e-01 -5.147983e-13 -5.000000e-01 -6.936413e-13 -6.000000e-01 -9.071297e-13 -7.000000e-01 -1.160350e-12 -8.000000e-01 -1.459125e-12 -9.000000e-01 -1.809871e-12 -1.000000e+00 -2.219563e-12 -1.100000e+00 -2.695772e-12 -1.200000e+00 -3.246762e-12 -1.300000e+00 -3.881744e-12 -1.400000e+00 -4.611579e-12 -1.500000e+00 -5.450975e-12 -1.600000e+00 -6.424920e-12 -1.000000e-01 -6.533852e-11 -2.000000e-01 -1.268863e-10 -3.000000e-01 -2.341749e-10 -4.000000e-01 -4.181669e-10 -5.000000e-01 -7.250477e-10 -6.000000e-01 -1.223151e-09 -7.000000e-01 -2.010886e-09 -8.000000e-01 -3.226296e-09 -9.000000e-01 -5.058596e-09 -1.000000e+00 -7.762676e-09 -1.100000e+00 -1.168059e-08 -1.200000e+00 -1.728578e-08 -1.300000e+00 -2.531133e-08 -1.400000e+00 -3.720775e-08 -1.500000e+00 -5.692191e-08 -1.600000e+00 -9.827980e-08 -1.000000e-01 -4.377955e-05 -2.000000e-01 -7.715505e-05 -3.000000e-01 -1.020519e-04 -4.000000e-01 -1.200370e-04 -5.000000e-01 -1.324365e-04 -6.000000e-01 -1.412528e-04 -7.000000e-01 -1.482596e-04 -8.000000e-01 -1.545886e-04 -9.000000e-01 -1.610377e-04 -1.000000e+00 -1.679176e-04 -1.100000e+00 -1.751708e-04 -1.200000e+00 -1.826787e-04 -1.300000e+00 -1.903605e-04 -1.400000e+00 -1.982473e-04 -1.500000e+00 -2.063660e-04 -1.600000e+00 -2.147520e-04 -1.000000e-01 -1.246568e-10 -2.000000e-01 -1.404667e-10 -3.000000e-01 -1.415609e-10 -4.000000e-01 -1.416631e-10 -5.000000e-01 -1.417491e-10 -6.000000e-01 -1.419310e-10 -7.000000e-01 -1.422955e-10 -8.000000e-01 -1.429657e-10 -9.000000e-01 -1.441117e-10 -1.000000e+00 -1.459540e-10 -1.100000e+00 -1.487642e-10 -1.200000e+00 -1.528621e-10 -1.300000e+00 -1.586097e-10 -1.400000e+00 -1.664029e-10 -1.500000e+00 -1.766625e-10 -1.600000e+00 -1.898250e-10 -1.000000e-01 -1.001632e-06 -2.000000e-01 -1.276656e-06 -3.000000e-01 -1.482664e-06 -4.000000e-01 -1.683528e-06 -5.000000e-01 -1.888976e-06 -6.000000e-01 -2.103076e-06 -7.000000e-01 -2.328366e-06 -8.000000e-01 -2.566941e-06 -9.000000e-01 -2.821189e-06 -1.000000e+00 -3.095096e-06 -1.100000e+00 -3.397862e-06 -1.200000e+00 -3.753902e-06 -1.300000e+00 -4.229740e-06 -1.400000e+00 -4.973596e-06 -1.500000e+00 -6.187299e-06 -1.600000e+00 -7.976300e-06 -1.000000e-01 -3.047115e-05 -2.000000e-01 -5.633043e-05 -3.000000e-01 -7.801510e-05 -4.000000e-01 -9.598978e-05 -5.000000e-01 -1.106507e-04 -6.000000e-01 -1.223639e-04 -7.000000e-01 -1.315448e-04 -8.000000e-01 -1.387880e-04 -9.000000e-01 -1.447182e-04 -1.000000e+00 -1.498351e-04 -1.100000e+00 -1.545914e-04 -1.200000e+00 -1.594670e-04 -1.300000e+00 -1.648264e-04 -1.400000e+00 -1.706749e-04 -1.500000e+00 -1.768033e-04 -1.600000e+00 -1.830470e-04 ngspice-26/tests/bsimsoi/pmos/reference/noise02.standard0000644000265600020320000000634412264261473022764 0ustar andreasadminFreq N(d) 1000 2.65462e-19 1258.925 2.641403e-19 1584.893 2.631122e-19 1995.262 2.623071e-19 2511.886 2.616682e-19 3162.278 2.61148e-19 3981.072 2.60704e-19 5011.872 2.602945e-19 6309.573 2.598732e-19 7943.282 2.593817e-19 10000 2.587402e-19 12589.25 2.578325e-19 15848.93 2.564853e-19 19952.62 2.544382e-19 25118.86 2.513047e-19 31622.78 2.465266e-19 39810.72 2.393389e-19 50118.72 2.287844e-19 63095.73 2.138499e-19 79432.82 1.938066e-19 100000 1.687447e-19 125892.5 1.400453e-19 158489.3 1.10312e-19 199526.2 8.253931e-20 251188.6 5.899867e-20 316227.8 4.063282e-20 398107.2 2.720953e-20 501187.2 1.785954e-20 630957.3 1.156298e-20 794328.2 7.418492e-21 1000000 4.731398e-21 1258925 3.006214e-21 1584893 1.905559e-21 1995262 1.206163e-21 2511886 7.628712e-22 3162278 4.82353e-22 3981072 3.050162e-22 5011872 1.92977e-22 6309573 1.222179e-22 7943282 7.753858e-23 10000000 4.932954e-23 12589250 3.151963e-23 15848930 2.027486e-23 19952620 1.317458e-23 25118860 8.69069e-24 31622780 5.85859e-24 39810720 4.069402e-24 50118720 2.938771e-24 63095730 2.224058e-24 79432820 1.772077e-24 100000000 1.486103e-24 1000 3.557247e-19 1258.925 3.343928e-19 1584.893 3.179053e-19 1995.262 3.051612e-19 2511.886 2.953095e-19 3162.278 2.876917e-19 3981.072 2.817982e-19 5011.872 2.772338e-19 6309.573 2.73691e-19 7943.282 2.70929e-19 10000 2.687564e-19 12589.25 2.670171e-19 15848.93 2.655778e-19 19952.62 2.64315e-19 25118.86 2.631017e-19 31622.78 2.6179e-19 39810.72 2.601893e-19 50118.72 2.580364e-19 63095.73 2.549562e-19 79432.82 2.504153e-19 100000 2.436812e-19 125892.5 2.338185e-19 158489.3 2.197903e-19 199526.2 2.007474e-19 251188.6 1.76534e-19 316227.8 1.482163e-19 398107.2 1.181804e-19 501187.2 8.945542e-20 630957.3 6.458185e-20 794328.2 4.483021e-20 1000000 3.019717e-20 1258925 1.990407e-20 1584893 1.292492e-20 1995262 8.30977e-21 2511886 5.308134e-21 3162278 3.376875e-21 3981072 2.142878e-21 5011872 1.357855e-21 6309573 8.598218e-22 7943282 5.443896e-22 10000000 3.448063e-22 12589250 2.185914e-22 15848930 1.38792e-22 19952620 8.83391e-23 25118860 5.64352e-23 31622780 3.625459e-23 39810720 2.348383e-23 50118720 1.539751e-23 63095730 1.027358e-23 79432820 7.023846e-24 100000000 4.960484e-24 1000 5.666183e-19 1258.925 4.91467e-19 1584.893 4.333852e-19 1995.262 3.884955e-19 2511.886 3.53801e-19 3162.278 3.269854e-19 3981.072 3.062579e-19 5011.872 2.902341e-19 6309.573 2.778431e-19 7943.282 2.682556e-19 10000 2.608284e-19 12589.25 2.550606e-19 15848.93 2.505593e-19 19952.62 2.470113e-19 25118.86 2.441598e-19 31622.78 2.417833e-19 39810.72 2.396742e-19 50118.72 2.376159e-19 63095.73 2.353548e-19 79432.82 2.325656e-19 100000 2.288096e-19 125892.5 2.23491e-19 158489.3 2.158309e-19 199526.2 2.049039e-19 251188.6 1.898094e-19 316227.8 1.700416e-19 398107.2 1.459938e-19 501187.2 1.192855e-19 630957.3 9.248689e-20 794328.2 6.821188e-20 1000000 4.818038e-20 1258925 3.288483e-20 1584893 2.188335e-20 1995262 1.430596e-20 2511886 9.241186e-21 3162278 5.92319e-21 3981072 3.777896e-21 5011872 2.402467e-21 6309573 1.525294e-21 7943282 9.677054e-22 10000000 6.139466e-22 12589250 3.897399e-22 15848930 2.477035e-22 19952620 1.577232e-22 25118860 1.007025e-22 31622780 6.454665e-23 39810720 4.160128e-23 50118720 2.702331e-23 63095730 1.774841e-23 79432820 1.183731e-23 100000000 8.062159e-24 ngspice-26/tests/bsimsoi/pmos/reference/acFreq01.standard0000644000265600020320000000712112264261473023041 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.69864797522435e-16 1.27288224188792e-16 4.25766369956203e-17 1258.925 1.69864976901627e-16 1.27288303665127e-16 4.25766479522388e-17 1584.893 1.69864936126527e-16 1.272882652082e-16 4.25766407923295e-17 1995.262 1.69864863688377e-16 1.27288251015761e-16 4.25766366025472e-17 2511.886 1.69864871482661e-16 1.27288231691147e-16 4.25766397915141e-17 3162.278 1.69864847289163e-16 1.2728820060508e-16 4.25766265524005e-17 3981.072 1.69864865603859e-16 1.27288190234113e-16 4.25766353918344e-17 5011.872 1.69864864506911e-16 1.27288242139083e-16 4.25766223678278e-17 6309.573 1.69864878585558e-16 1.27288226689497e-16 4.25766266717007e-17 7943.282 1.69864871009135e-16 1.27288217512837e-16 4.25766334598772e-17 10000 1.69864797522435e-16 1.27288208273298e-16 4.25766210801259e-17 12589.25 1.6986485048032e-16 1.27288303665127e-16 4.25766226679776e-17 15848.93 1.69864835706535e-16 1.27288164788208e-16 4.25766006243325e-17 19952.62 1.69864783921938e-16 1.27288171249323e-16 4.25765807660404e-17 25118.86 1.69864744761191e-16 1.27288168330412e-16 4.25765447504116e-17 31622.78 1.69864595643129e-16 1.27288099946666e-16 4.25764755647804e-17 39810.72 1.69864425846835e-16 1.27288030322468e-16 4.25763955243669e-17 50118.72 1.69864229395148e-16 1.27287924583201e-16 4.257624130077e-17 63095.73 1.69863819162423e-16 1.2728774742665e-16 4.25760465114124e-17 79432.82 1.69863187949763e-16 1.27287436092414e-16 4.25756717116642e-17 100000 1.69862251043346e-16 1.27286982780236e-16 4.25751250236609e-17 125892.5 1.69860678577211e-16 1.27286280924225e-16 4.25742585895489e-17 158489.3 1.69858207987033e-16 1.27285152188434e-16 4.25728449166149e-17 199526.2 1.69854254752091e-16 1.2728330549659e-16 4.25706381663917e-17 251188.6 1.69848080887897e-16 1.27280438320747e-16 4.25671420173438e-17 316227.8 1.69838273468027e-16 1.27275869949439e-16 4.25615982512811e-17 398107.2 1.69822848819136e-16 1.27268720991335e-16 4.25528885125525e-17 501187.2 1.69798590594442e-16 1.27257470974166e-16 4.25391507738109e-17 630957.3 1.69760525406735e-16 1.27239795917599e-16 4.25176521171708e-17 794328.2 1.6970129366725e-16 1.27212319549699e-16 4.24841653764868e-17 1000000 1.69609990458545e-16 1.27169972066075e-16 4.24325699411335e-17 1258925 1.69471680217584e-16 1.27105751298763e-16 4.23543234428984e-17 1584893 1.69266432971533e-16 1.27010503509087e-16 4.22383559637677e-17 1995262 1.68972915375998e-16 1.26874342967743e-16 4.20724169931563e-17 2511886 1.68573136179062e-16 1.2668883913844e-16 4.18464263293382e-17 3162278 1.68063766298343e-16 1.26452433798687e-16 4.15584868326251e-17 3981072 1.67467270332522e-16 1.26175644941964e-16 4.12213042446707e-17 5011872 1.66833920640358e-16 1.25881755384337e-16 4.08632496092012e-17 6309573 1.66227651942942e-16 1.25600439513214e-16 4.052053860975e-17 7943282 1.65702324561408e-16 1.25356666445665e-16 4.02235762019617e-17 10000000 1.65284954880023e-16 1.25162980487203e-16 3.99876476208501e-17 12589250 1.64975759299994e-16 1.25019496332915e-16 3.98128127107675e-17 15848930 1.64758077410552e-16 1.24918453806405e-16 3.96897869334146e-17 19952620 1.64610488868754e-16 1.24850030298136e-16 3.96063737418738e-17 25118860 1.64512916922189e-16 1.24804744323714e-16 3.9551215385835e-17 31622780 1.64449424648684e-16 1.24775263314753e-16 3.95153324234397e-17 39810720 1.64408600320772e-16 1.24756309158891e-16 3.94922635809423e-17 50118720 1.64382548013128e-16 1.2474423846122e-16 3.9477531009105e-17 63095730 1.64365968026312e-16 1.24736555619485e-16 3.94681530710239e-17 79432820 1.64355456298443e-16 1.24731670362199e-16 3.94622122364688e-17 100000000 1.64348805504756e-16 1.24728582985528e-16 3.94584574350695e-17 ngspice-26/tests/bsimsoi/pmos/reference/dcSweep03.standard0000644000265600020320000000771212264261473023242 0ustar andreasadminV(d) I(d) -1.000000e-01 -1.789308e-13 -2.000000e-01 -2.899051e-13 -3.000000e-01 -4.310282e-13 -4.000000e-01 -6.042801e-13 -5.000000e-01 -8.130390e-13 -6.000000e-01 -1.062778e-12 -7.000000e-01 -1.360203e-12 -8.000000e-01 -1.712858e-12 -9.000000e-01 -2.129013e-12 -1.000000e+00 -2.617708e-12 -1.100000e+00 -3.188947e-12 -1.200000e+00 -3.854294e-12 -1.300000e+00 -4.629387e-12 -1.400000e+00 -5.545876e-12 -1.500000e+00 -6.701330e-12 -1.600000e+00 -8.368640e-12 -1.000000e-01 -1.261281e-08 -2.000000e-01 -2.124881e-08 -3.000000e-01 -3.386676e-08 -4.000000e-01 -5.213124e-08 -5.000000e-01 -7.784738e-08 -6.000000e-01 -1.131100e-07 -7.000000e-01 -1.603481e-07 -8.000000e-01 -2.224989e-07 -9.000000e-01 -3.035888e-07 -1.000000e+00 -4.103807e-07 -1.100000e+00 -5.565090e-07 -1.200000e+00 -7.691980e-07 -1.300000e+00 -1.093960e-06 -1.400000e+00 -1.580498e-06 -1.500000e+00 -2.270648e-06 -1.600000e+00 -3.203670e-06 -1.000000e-01 -4.011359e-05 -2.000000e-01 -7.211780e-05 -3.000000e-01 -9.729560e-05 -4.000000e-01 -1.167723e-04 -5.000000e-01 -1.314305e-04 -6.000000e-01 -1.422725e-04 -7.000000e-01 -1.507743e-04 -8.000000e-01 -1.581891e-04 -9.000000e-01 -1.653156e-04 -1.000000e+00 -1.723325e-04 -1.100000e+00 -1.792036e-04 -1.200000e+00 -1.858705e-04 -1.300000e+00 -1.923819e-04 -1.400000e+00 -1.987735e-04 -1.500000e+00 -2.050884e-04 -1.600000e+00 -2.113670e-04 -1.000000e-01 -1.527918e-13 -2.000000e-01 -2.464243e-13 -3.000000e-01 -3.665583e-13 -4.000000e-01 -5.147983e-13 -5.000000e-01 -6.936413e-13 -6.000000e-01 -9.071297e-13 -7.000000e-01 -1.160350e-12 -8.000000e-01 -1.459125e-12 -9.000000e-01 -1.809871e-12 -1.000000e+00 -2.219563e-12 -1.100000e+00 -2.695772e-12 -1.200000e+00 -3.246762e-12 -1.300000e+00 -3.881744e-12 -1.400000e+00 -4.611579e-12 -1.500000e+00 -5.450975e-12 -1.600000e+00 -6.424920e-12 -1.000000e-01 -6.537081e-11 -2.000000e-01 -1.270125e-10 -3.000000e-01 -2.345242e-10 -4.000000e-01 -4.189926e-10 -5.000000e-01 -7.268139e-10 -6.000000e-01 -1.226666e-09 -7.000000e-01 -2.017492e-09 -8.000000e-01 -3.238141e-09 -9.000000e-01 -5.078992e-09 -1.000000e+00 -7.796593e-09 -1.100000e+00 -1.173536e-08 -1.200000e+00 -1.737227e-08 -1.300000e+00 -2.544673e-08 -1.400000e+00 -3.742458e-08 -1.500000e+00 -5.730328e-08 -1.600000e+00 -9.911540e-08 -1.000000e-01 -4.393320e-05 -2.000000e-01 -7.740888e-05 -3.000000e-01 -1.023643e-04 -4.000000e-01 -1.203743e-04 -5.000000e-01 -1.327731e-04 -6.000000e-01 -1.415840e-04 -7.000000e-01 -1.485898e-04 -8.000000e-01 -1.549263e-04 -9.000000e-01 -1.613944e-04 -1.000000e+00 -1.683035e-04 -1.100000e+00 -1.755916e-04 -1.200000e+00 -1.831367e-04 -1.300000e+00 -1.908560e-04 -1.400000e+00 -1.987802e-04 -1.500000e+00 -2.069354e-04 -1.600000e+00 -2.153570e-04 -1.000000e-01 -1.246568e-10 -2.000000e-01 -1.404667e-10 -3.000000e-01 -1.415609e-10 -4.000000e-01 -1.416631e-10 -5.000000e-01 -1.417491e-10 -6.000000e-01 -1.419310e-10 -7.000000e-01 -1.422955e-10 -8.000000e-01 -1.429657e-10 -9.000000e-01 -1.441117e-10 -1.000000e+00 -1.459540e-10 -1.100000e+00 -1.487642e-10 -1.200000e+00 -1.528621e-10 -1.300000e+00 -1.586097e-10 -1.400000e+00 -1.664029e-10 -1.500000e+00 -1.766625e-10 -1.60000e+00 -1.898250e-10 -1.0000000e-01 -1.001653e-06 -2.000000e-01 -1.276685e-06 -3.000000e-01 -1.482700e-06 -4.000000e-01 -1.683569e-06 -5.000000e-01 -1.889022e-06 -6.000000e-01 -2.103127e-06 -7.000000e-01 -2.328423e-06 -8.000000e-01 -2.567004e-06 -9.000000e-01 -2.821259e-06 -1.000000e+00 -3.095173e-06 -1.100000e+00 -3.397951e-06 -1.200000e+00 -3.754010e-06 -1.300000e+00 -4.229895e-06 -1.400000e+00 -4.973865e-06 -1.500000e+00 -6.187820e-06 -1.600000e+00 -7.977260e-06 -1.000000e-01 -3.047187e-05 -2.000000e-01 -5.633183e-05 -3.000000e-01 -7.801696e-05 -4.000000e-01 -9.599200e-05 -5.000000e-01 -1.106532e-04 -6.000000e-01 -1.223665e-04 -7.000000e-01 -1.315475e-04 -8.000000e-01 -1.387908e-04 -9.000000e-01 -1.447210e-04 -1.000000e+00 -1.498382e-04 -1.100000e+00 -1.545951e-04 -1.200000e+00 -1.594721e-04 -1.300000e+00 -1.648340e-04 -1.400000e+00 -1.706858e-04 -1.500000e+00 -1.768178e-04 -1.600000e+00 -1.830650e-04 ngspice-26/tests/bsimsoi/pmos/reference/acVd02.standard0000644000265600020320000000335612264261473022524 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.1 -3.800295e-05 3.021800e-04 9.23616650073238e-17 1.06171628746432e-16 0.2 -6.470374e-05 2.916716e-04 8.22209322616762e-17 1.13797930811286e-16 0.3 -8.386716e-05 2.792674e-04 7.19222394732602e-17 1.20916932738787e-16 0.4 -9.774242e-05 2.658812e-04 6.22012068412482e-17 1.27267734458294e-16 0.5 -1.090090e-04 2.527817e-04 5.40794746422537e-17 1.32280935815641e-16 0.6 -1.188563e-04 2.415800e-04 4.82922130753274e-17 1.35578136708372e-16 0.7 -1.263652e-04 2.340112e-04 4.48082621320325e-17 1.37360737191019e-16 0.8 -1.314660e-04 2.308803e-04 4.31304416777553e-17 1.37991137361703e-16 0.9 -1.347064e-04 2.308839e-04 4.26085815364594e-17 1.37900637337199e-16 1 -1.368185e-04 2.319217e-04 4.26289115419638e-17 1.37468237220125e-16 1.1 -1.383251e-04 2.317767e-04 4.26796215556938e-17 1.37069837112257e-16 1.2 -1.394204e-04 2.305600e-04 4.26647215516595e-17 1.36754937026996e-16 0.1 -1.718912e-05 2.532298e-04 9.18153948594188e-17 1.06116528731513e-16 0.2 -3.098364e-05 2.372523e-04 8.40449527555377e-17 1.1220543038011e-16 0.3 -4.227527e-05 2.242315e-04 7.53839504105335e-17 1.18425932064338e-16 0.4 -5.161207e-05 2.132550e-04 6.6534998014641e-17 1.242879336515e-16 0.5 -5.938383e-05 2.038117e-04 5.82807757797744e-17 1.29383535031157e-16 0.6 -6.589387e-05 1.954953e-04 5.1481943938961e-17 1.33319936096954e-16 0.7 -7.141145e-05 1.879046e-04 4.66040626182533e-17 1.35962836812531e-16 0.8 -7.609750e-05 1.808442e-04 4.34798217723515e-17 1.375176372335e-16 0.9 -7.989784e-05 1.745961e-04 4.16079512655344e-17 1.38328837453136e-16 1 -8.272172e-05 1.697163e-04 4.05278409730898e-17 1.38677037547413e-16 1.1 -8.456918e-05 1.669188e-04 3.99539608177092e-17 1.38719237558839e-16 1.2 -8.548453e-05 1.669173e-04 3.97474207617876e-17 1.38519137504661e-16 ngspice-26/tests/bsimsoi/pmos/reference/noise03.standard0000644000265600020320000000635012264261473022762 0ustar andreasadminFreq N(d) 1000 2.729064e-19 1258.925 2.714765e-19 1584.893 2.703649e-19 1995.262 2.694955e-19 2511.886 2.688073e-19 3162.278 2.682496e-19 3981.072 2.677776e-19 5011.872 2.67348e-19 6309.573 2.669135e-19 7943.282 2.664157e-19 10000 2.657751e-19 12589.25 2.648773e-19 15848.93 2.635519e-19 19952.62 2.615427e-19 25118.86 2.584689e-19 31622.78 2.537786e-19 39810.72 2.4671e-19 50118.72 2.362977e-19 63095.73 2.214949e-19 79432.82 2.014976e-19 100000 1.762789e-19 125892.5 1.471027e-19 158489.3 1.165352e-19 199526.2 8.766516e-20 251188.6 6.294995e-20 316227.8 4.350985e-20 398107.2 2.921292e-20 501187.2 1.92099e-20 630957.3 1.245285e-20 794328.2 7.996125e-21 1000000 5.10271e-21 1258925 3.243449e-21 1584893 2.056594e-21 1995262 1.302156e-21 2511886 8.238702e-22 3162278 5.211639e-22 3981072 3.297831e-22 5011872 2.088641e-22 6309573 1.324941e-22 7943282 8.42708e-23 10000000 5.382372e-23 12589250 3.460062e-23 15848930 2.24635e-23 19952620 1.479972e-23 25118860 9.959946e-24 31622780 6.903054e-24 39810720 4.971845e-24 50118720 3.75146e-24 63095730 2.980007e-24 79432820 2.49214e-24 100000000 2.183458e-24 1000 3.619615e-19 1258.925 3.399332e-19 1584.893 3.229074e-19 1995.262 3.097474e-19 2511.886 2.995742e-19 3162.278 2.917079e-19 3981.072 2.856225e-19 5011.872 2.809097e-19 6309.573 2.772524e-19 7943.282 2.74402e-19 10000 2.721612e-19 12589.25 2.703696e-19 15848.93 2.688903e-19 19952.62 2.675973e-19 25118.86 2.663618e-19 31622.78 2.650347e-19 39810.72 2.634249e-19 50118.72 2.612688e-19 63095.73 2.581917e-19 79432.82 2.536603e-19 100000 2.469409e-19 125892.5 2.370936e-19 158489.3 2.230686e-19 199526.2 2.039914e-19 251188.6 1.796677e-19 316227.8 1.511247e-19 398107.2 1.207352e-19 501187.2 9.156087e-20 630957.3 6.620971e-20 794328.2 4.602005e-20 1000000 3.10288e-20 1258925 2.04665e-20 1584893 1.329671e-20 1995262 8.551888e-21 2511886 5.464369e-21 3162278 3.47721e-21 3981072 2.207229e-21 5011872 1.399207e-21 6309573 8.865388e-22 7943282 5.618196e-22 10000000 3.563526e-22 12589250 2.264138e-22 15848930 1.442585e-22 19952620 9.231539e-23 25118860 5.946881e-23 31622780 3.86917e-23 39810720 2.554332e-23 50118720 1.72178e-23 63095730 1.194223e-23 79432820 8.596265e-24 100000000 6.471765e-24 1000 5.757758e-19 1258.925 4.992921e-19 1584.893 4.401806e-19 1995.262 3.944951e-19 2511.886 3.591855e-19 3162.278 3.318945e-19 3981.072 3.107995e-19 5011.872 2.944917e-19 6309.573 2.818811e-19 7943.282 2.721238e-19 10000 2.645651e-19 12589.25 2.586955e-19 15848.93 2.54115e-19 19952.62 2.505051e-19 25118.86 2.476046e-19 31622.78 2.451885e-19 39810.72 2.430458e-19 50118.72 2.409571e-19 63095.73 2.386653e-19 79432.82 2.358414e-19 100000 2.320415e-19 125892.5 2.266625e-19 158489.3 2.189161e-19 199526.2 2.078646e-19 251188.6 1.925935e-19 316227.8 1.725851e-19 398107.2 1.482296e-19 501187.2 1.211598e-19 630957.3 9.397723e-20 794328.2 6.933611e-20 1000000 4.898933e-20 1258925 3.344502e-20 1584893 2.226031e-20 1995262 1.455462e-20 2511886 9.403141e-21 3162278 6.027929e-21 3981072 3.845466e-21 5011872 2.446134e-21 6309573 1.553688e-21 7943282 9.863786e-22 10000000 6.264477e-22 12589250 3.983272e-22 15848930 2.538104e-22 19952620 1.622585e-22 25118860 1.042416e-22 31622780 6.745408e-23 39810720 4.410775e-23 50118720 2.9275e-23 63095730 1.983799e-23 79432820 1.382356e-23 100000000 9.982395e-24 ngspice-26/tests/bsimsoi/pmos/reference/noise01.standard0000644000265600020320000000634412264261473022763 0ustar andreasadminFreq N(d) 1000 3.886811e-19 1258.925 3.609539e-19 1584.893 3.395181e-19 1995.262 3.229411e-19 2511.886 3.101131e-19 3162.278 3.00173e-19 3981.072 2.924498e-19 5011.872 2.86416e-19 6309.573 2.816503e-19 7943.282 2.77805e-19 10000 2.745773e-19 12589.25 2.716801e-19 15848.93 2.688093e-19 19952.62 2.656058e-19 25118.86 2.616091e-19 31622.78 2.562054e-19 39810.72 2.485854e-19 50118.72 2.377471e-19 63095.73 2.22615e-19 79432.82 2.023631e-19 100000 1.769477e-19 125892.5 1.476195e-19 158489.3 1.169345e-19 199526.2 8.797367e-20 251188.6 6.318828e-20 316227.8 4.369394e-20 398107.2 2.93551e-20 501187.2 1.931967e-20 630957.3 1.253758e-20 794328.2 8.061509e-21 1000000 5.153138e-21 1258925 3.282319e-21 1584893 2.08653e-21 1995262 1.325188e-21 2511886 8.415663e-22 3162278 5.347361e-22 3981072 3.401681e-22 5011872 2.167858e-22 6309573 1.38512e-22 7943282 8.881736e-23 10000000 5.723314e-23 12589250 3.713119e-23 15848930 2.431485e-23 19952620 1.612613e-23 25118860 1.088065e-23 31622780 7.510207e-24 39810720 5.336665e-24 50118720 3.928992e-24 63095730 3.012791e-24 79432820 2.413055e-24 100000000 2.017913e-24 1000 2.426038e-18 1258.925 1.935172e-18 1584.893 1.555802e-18 1995.262 1.2626e-18 2511.886 1.035995e-18 3162.278 8.608567e-19 3981.072 7.254939e-19 5011.872 6.208681e-19 6309.573 5.399921e-19 7943.282 4.774626e-19 10000 4.290983e-19 12589.25 3.916597e-19 15848.93 3.626304e-19 19952.62 3.400451e-19 25118.86 3.223537e-19 31622.78 3.083085e-19 39810.72 2.968694e-19 50118.72 2.871167e-19 63095.73 2.781684e-19 79432.82 2.690994e-19 100000 2.588731e-19 125892.5 2.463155e-19 158489.3 2.301958e-19 199526.2 2.094997e-19 251188.6 1.839248e-19 316227.8 1.544149e-19 398107.2 1.23278e-19 501187.2 9.352606e-20 630957.3 6.77285e-20 794328.2 4.719383e-20 1000000 3.193595e-20 1258925 2.116758e-20 1584893 1.383852e-20 1995262 8.970605e-21 2511886 5.787955e-21 3162278 3.727273e-21 3981072 2.40047e-21 5011872 1.548532e-21 6309573 1.001922e-21 7943282 6.509718e-22 10000000 4.252316e-22 12589250 2.796244e-22 15848930 1.853597e-22 19952620 1.240578e-22 25118860 8.397817e-23 31622780 5.761092e-23 39810720 4.014216e-23 50118720 2.84776e-23 63095730 2.062142e-23 79432820 1.528101e-23 100000000 1.161508e-23 1000 8.323392e-18 1258.925 6.487104e-18 1584.893 5.067912e-18 1995.262 3.971077e-18 2511.886 3.123377e-18 3162.278 2.468224e-18 3981.072 1.96188e-18 5011.872 1.570544e-18 6309.573 1.268089e-18 7943.282 1.034323e-18 10000 8.536375e-19 12589.25 7.139653e-19 15848.93 6.059743e-19 19952.62 5.224427e-19 25118.86 4.577741e-19 31622.78 4.076199e-19 39810.72 3.685825e-19 50118.72 3.379794e-19 63095.73 3.1365e-19 79432.82 2.937941e-19 100000 2.768309e-19 125892.5 2.612785e-19 158489.3 2.456695e-19 199526.2 2.285414e-19 251188.6 2.08574e-19 316227.8 1.849359e-19 398107.2 1.577752e-19 501187.2 1.285373e-19 630957.3 9.96792e-20 794328.2 7.374309e-20 1000000 5.239548e-20 1258925 3.607766e-20 1584893 2.429513e-20 1995262 1.612743e-20 2511886 1.061886e-20 3162278 6.96768e-21 3981072 4.57193e-21 5011872 3.007758e-21 6309573 1.987913e-21 7943282 1.322143e-21 10000000 8.861153e-22 12589250 5.99183e-22 15848930 4.09213e-22 19952620 2.825322e-22 25118860 1.973656e-22 31622780 1.395952e-22 39810720 1.000321e-22 50118720 7.266612e-23 63095730 5.354266e-23 79432820 4.004197e-23 100000000 3.041499e-23 ngspice-26/tests/bsimsoi/pmos/parameters/0000755000265600020320000000000012264261473020161 5ustar andreasadminngspice-26/tests/bsimsoi/pmos/parameters/pmosParameters0000644000265600020320000001176012264261473023113 0ustar andreasadmin+ binunit = (1) + mobmod = (1) + capmod = (3) + shmod = (0) + paramchk= (0) + soimod = (0) + igcmod = (1) + igbmod = (1) + tsi = (9e-008) + tox = (2e-009) + toxref = (2e-009) + tbox = (4e-007) + toxqm = (2e-009) + tnom = (27) + rbody = (0) + rbsh = (0) + rsh = (0) + dtoxcv = (0) + xj = (7e-008) + rhalo = (0) + nch = (1e+019) + ngate = (3e+020) + wint = (5.5544e-009) + lint = (2e-009) + xpart = (1) + toxm = (2e-009) + k1 = (0.6) + k2 = (1e-010) + k3 = (0.231) + k3b = (0) + kb1 = (1) + w0 = (0) + dvt0 = (2.2) + dvt1 = (0.53) + dvt2 = (0.127) + dvt0w = (0) + dvt1w = (0) + dvt2w = (0) + eta0 = (1.7958) + etab = (-0.07) + dsub = (1.7577) + voff = (-0.10382) + nfactor = (1) + cdsc = (0.00024) + cdscb = (0) + cdscd = (0) + cit = (0) + u0 = (200) + ua = (2.25e-009) + ub = (5.9e-019) + uc = (2.9e-011) + prwg = (2.5) + prwb = (0.76) + wr = (1) + rdsw = (0.695) + a0 = (0) + ags = (0) + a1 = (0) + a2 = (0.7) + b0 = (0) + b1 = (0) + vsat = (99820) + keta = (0) + ketas = (0) + dwg = (0) + dwb = (0) + dwbc = (0) + pclm = (1.3) + pdiblc1 = (0.39) + pdiblc2 = (0.05) + pdiblcb = (0.89459) + drout = (2) + pvag = (0.116) + delta = (0.01) + vevb = (0.075) + vecb = (0.026) + alpha0 = (5.0707e-009) + beta0 = (0.0007605) + beta1 = (0.0002767) + beta2 = (0.094512) + alphagb1= (0.35) + alphagb2= (0.43) + betagb1 = (0.03) + betagb2 = (0.05) + fbjtii = (0) + vdsatii0= (0.72051) + tii = (-0.5062) + lii = (2.835e-009) + esatii = (2213500) + sii0 = (2.0387) + sii1 = (0.04093) + sii2 = (9.8e-011) + siid = (0.008025) + aigc = (1) + bigc = (0.05022) + cigc = (0.075) + aigsd = (0.43) + bigsd = (0.054) + cigsd = (0.075) + nigc = (1) + poxedge = (1) + pigcd = (1) + agidl = (0) + bgidl = (0) + ebg = (1.2) + vgb1 = (300) + vgb2 = (17) + voxh = (1.5) + deltavox= (0.004) + ntox = (1) + ntun = (1) + ndiode = (1) + nrecf0 = (1.5) + nrecr0 = (2) + isbjt = (1e-006) + isdif = (0.0001) + isrec = (0.01) + istun = (5e-005) + vrec0 = (1) + vtun0 = (0) + nbjt = (0.7888) + lbjt0 = (1.4381e-006) + vabjt = (0.001) + aely = (1.0819e+010) + ahli = (0) + lpe0 = (3e-009) + cjswg = (1e-010) + mjswg = (0.5) + pbswg = (0.7) + tt = (4e-010) + ldif0 = (1) + cgso = (5e-011) + cgdo = (5e-011) + dlc = (0) + dwc = (0) + dlcb = (0) + dlbg = (0) + fbody = (1) + clc = (1e-008) + cle = (0) + cf = (0) + csdmin = (0) + asd = (0.3) + csdesw = (8.73e-011) + delvt = (-0.031456) + acde = (1) + moin = (25) + ckappa = (3.2309) + cgdl = (1.5533e-010) + cgsl = (1.5533e-010) + ndif = (-1) + kt1 = (-0.11573) + kt1l = (-4e-010) + kt2 = (-0.25) + ute = (-1.2189) + ua1 = (5.005e-012) + ub1 = (-8.835e-019) + uc1 = (-6e-011) + prt = (51.149) + rth0 = (0.02) + cth0 = (1e-005) + at = (8479) + tpbswg = (5.86e-005) + tcjswg = (0.00092578) + ntrecf = (-0.55338) + ntrecr = (-0.15688) + xbjt = (1.0968) + xdif = (1.4551) + xrec = (2.6e-011) + xtun = (25.308) + fnoimod = (0) + tnoimod = (2) + af = (2.15) + ef = (1.119) + kf = (1.67e-026) + w0flk = (0.001) ngspice-26/tests/bsimsoi/pmos/qaSpec0000644000265600020320000001100312264261473017150 0ustar andreasadmin // // CMC test specification for bsimsoi (version 4.4) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments pmos level=10 pTypeSelectionArguments pmos level=10 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 checkPolarity no symmetricPins d s scaleParameters m // // Specific tests // test dcSweep01 biases V(s)=0 V(b)=0 biasList V(g)=1.6,-0.4,-1.6 biasSweep V(d)=-0.1,-1.6,-0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=0 mobmod=1 test dcSweep02 biases V(s)=0 V(b)=0 biasList V(g)=1.6,-0.4,-1.6 biasSweep V(d)=-0.1,-1.6,-0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=1 mobmod=2 test dcSweep03 biases V(s)=0 V(b)=0 biasList V(g)=1.6,-0.4,-1.6 biasSweep V(d)=-0.1,-1.6,-0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=3 mobmod=3 test acVd01 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-1.2 biasSweep V(d)=0.1,1.2,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=0 capmod=2 test acVd02 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-1.2 biasSweep V(d)=0.1,1.2,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=1 capmod=3 test acFreq01 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=0 capmod=2 test acFreq02 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=3 capmod=3 test noise01 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=0 fnoimod=0 tnoimod=0 test noise02 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=1 fnoimod=1 tnoimod=1 test noise03 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/pmosParameters modelParameters soimod=3 fnoimod=1 tnoimod=2 ngspice-26/tests/bsimsoi/Makefile.am0000644000265600020320000000053012264261473017072 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in clean-local: rm -rf nmos/results pmos/results ngspiceCkt b4soiv1check.log ngspice-26/tests/bsimsoi/nmos/0000755000265600020320000000000012264261473016014 5ustar andreasadminngspice-26/tests/bsimsoi/nmos/reference/0000755000265600020320000000000012264261473017752 5ustar andreasadminngspice-26/tests/bsimsoi/nmos/reference/acFreq02.standard0000644000265600020320000000710512264261473023042 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.7988153217581e-16 1.38428354007981e-16 4.1453130421346e-17 1258.925 1.79881589846049e-16 1.38428422759048e-16 4.14531418027401e-17 1584.893 1.79881529113301e-16 1.38428357070489e-16 4.14531318748149e-17 1995.262 1.7988153417013e-16 1.3842835201366e-16 4.14531342966069e-17 2511.886 1.79881570072246e-16 1.3842837947228e-16 4.14531335753039e-17 3162.278 1.79881466664194e-16 1.38428318861183e-16 4.14531226384072e-17 3981.072 1.79881491178942e-16 1.38428355026938e-16 4.14531361520036e-17 5011.872 1.79881529677026e-16 1.38428356506765e-16 4.14531414146733e-17 6309.573 1.7988152253463e-16 1.3842836364916e-16 4.14531336611098e-17 7943.282 1.79881498683369e-16 1.38428367464001e-16 4.14531312193686e-17 10000 1.7988153217581e-16 1.38428354007981e-16 4.14531145058516e-17 12589.25 1.79881589846049e-16 1.38428422759048e-16 4.14531291606095e-17 15848.93 1.79881529113301e-16 1.38428357070489e-16 4.14531117908164e-17 19952.62 1.79881454403692e-16 1.3842835201366e-16 4.14530944133878e-17 25118.86 1.79881443350776e-16 1.3842837947228e-16 4.14530765506425e-17 31622.78 1.79881366005781e-16 1.38428318861183e-16 4.14530270129145e-17 39810.72 1.79881251311474e-16 1.38428275071115e-16 4.14529762403586e-17 50118.72 1.79881148609968e-16 1.3842826124e-16 4.14528873699681e-17 63095.73 1.79880967598702e-16 1.38428187078638e-16 4.1452730071344e-17 79432.82 1.79880617080841e-16 1.38428066917684e-16 4.14525100903144e-17 100000 1.79880099781322e-16 1.38427876543152e-16 4.14521436606988e-17 125892.5 1.79879314262535e-16 1.3842766423121e-16 4.14515741785414e-17 158489.3 1.79877913993573e-16 1.3842715203058e-16 4.14506414590022e-17 199526.2 1.79875870753015e-16 1.38426437619143e-16 4.14491858579141e-17 251188.6 1.79872572847881e-16 1.38425338157002e-16 4.1446886206837e-17 316227.8 1.79867324157112e-16 1.38423537586547e-16 4.14432379822121e-17 398107.2 1.79859063570731e-16 1.38420799201712e-16 4.14375047887053e-17 501187.2 1.79846122196239e-16 1.3841641640562e-16 4.14284673226808e-17 630957.3 1.79825801922587e-16 1.38409546276329e-16 4.141428814615e-17 794328.2 1.79794099814518e-16 1.38398853815716e-16 4.13922004627943e-17 1000000 1.7974513638958e-16 1.38382326398439e-16 4.13580990048258e-17 1258925 1.79670719107064e-16 1.38357247563575e-16 4.13062023183739e-17 1584893 1.79559883877488e-16 1.38319803058652e-16 4.12289643256718e-17 1995262 1.7940030324824e-16 1.38265947545408e-16 4.11177164238156e-17 2511886 1.79180927065075e-16 1.3819185384868e-16 4.0964812390979e-17 3162278 1.78897983636149e-16 1.38096297084611e-16 4.07676388432091e-17 3981072 1.78561780350701e-16 1.37982801206068e-16 4.05333243699865e-17 5011872 1.78198896327729e-16 1.3786031254594e-16 4.02803757887102e-17 6309573 1.77845664409691e-16 1.37741075502336e-16 4.00341877175811e-17 7943282 1.77534813007364e-16 1.37636127373588e-16 3.98175381283094e-17 10000000 1.77284600969379e-16 1.37551664919453e-16 3.96431567465277e-17 12589250 1.77097413416387e-16 1.37488480346364e-16 3.95126506031097e-17 15848930 1.76964629592646e-16 1.37443638624538e-16 3.94201291276923e-17 19952620 1.76874179915676e-16 1.37413084787765e-16 3.9357087669092e-17 25118860 1.76814150171436e-16 1.37392874980854e-16 3.93152536727762e-17 31622780 1.76774997039303e-16 1.37379609181261e-16 3.92879802980323e-17 39810720 1.76749821501251e-16 1.37371099186047e-16 3.92704181558394e-17 50118720 1.76733725246081e-16 1.37365687504917e-16 3.92592113405747e-17 63095730 1.76723483065839e-16 1.37362230834036e-16 3.92520559757896e-17 79432820 1.76716966370782e-16 1.37360025490788e-16 3.92475219843501e-17 100000000 1.76712916413793e-16 1.37358625888977e-16 3.92446486845199e-17 ngspice-26/tests/bsimsoi/nmos/reference/acVd01.standard0000644000265600020320000000333012264261473022511 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.1 4.256531e-05 2.280443e-04 6.39209673068808e-17 1.46536539675408e-16 0.2 8.071046e-05 1.623635e-04 8.75467137036548e-17 1.12277430399604e-16 0.3 1.133566e-04 1.120913e-04 1.1030702986611e-16 7.22669395665892e-17 0.4 1.361569e-04 8.071918e-05 1.21450132883153e-16 4.9801823484061e-17 0.5 1.470479e-04 6.758203e-05 1.24686533759423e-16 4.40607519296409e-17 0.6 1.518340e-04 6.328112e-05 1.25851434074825e-16 4.34204917562876e-17 0.7 1.555805e-04 6.145814e-05 1.26392834221411e-16 4.36471618176595e-17 0.8 1.595673e-04 5.994295e-05 1.26691134302177e-16 4.37565918472882e-17 0.9 1.634965e-04 5.852821e-05 1.26899834358684e-16 4.36846718278155e-17 1 1.670521e-04 5.723482e-05 1.2710443441408e-16 4.34550717656503e-17 1.1 1.701518e-04 5.654639e-05 1.27214034443755e-16 4.31422616809556e-17 1.2 1.728251e-04 5.623839e-05 1.27288234463845e-16 4.25766415278115e-17 0.1 1.966259e-05 2.186862e-04 6.10635565332244e-17 1.49950440599736e-16 0.2 3.983789e-05 1.709235e-04 7.92661114616456e-17 1.26301034196556e-16 0.3 6.002787e-05 1.301579e-04 1.0143662746441e-16 9.34229552946728e-17 0.4 7.946084e-05 9.587285e-05 1.20272832564394e-16 6.16061266801276e-17 0.5 9.616649e-05 7.016245e-05 1.28724434852702e-16 4.56001523464402e-17 0.6 1.084092e-04 5.385525e-05 1.31159335511962e-16 4.04668109565656e-17 0.7 1.170742e-04 4.380305e-05 1.31855035700326e-16 3.88147805092712e-17 0.8 1.234285e-04 3.748273e-05 1.32065735757374e-16 3.8193190340973e-17 0.9 1.282798e-04 3.377229e-05 1.32081435761625e-16 3.79423002730434e-17 1 1.321108e-04 3.267038e-05 1.31920135717952e-16 3.78926102595896e-17 1.1 1.352172e-04 3.509282e-05 1.31485835600364e-16 3.80175602934203e-17 1.2 1.377816e-04 4.137063e-05 1.30736335397433e-16 3.82095303453971e-17 ngspice-26/tests/bsimsoi/nmos/reference/dcSweep02.standard0000644000265600020320000000725212264261473023236 0ustar andreasadminV(d) I(d) 1.000000e-01 1.789307e-13 2.000000e-01 2.899054e-13 3.000000e-01 4.310319e-13 4.000000e-01 6.042802e-13 5.000000e-01 8.130389e-13 6.000000e-01 1.062778e-12 7.000000e-01 1.360203e-12 8.000000e-01 1.712858e-12 9.000000e-01 2.129013e-12 1.000000e+00 2.617708e-12 1.100000e+00 3.188947e-12 1.200000e+00 3.854294e-12 1.300000e+00 4.629387e-12 1.400000e+00 5.545876e-12 1.500000e+00 6.701330e-12 1.600000e+00 8.368638e-12 1.000000e-01 3.057304e-08 2.000000e-01 5.341968e-08 3.000000e-01 8.578265e-08 4.000000e-01 1.317897e-07 5.000000e-01 1.956043e-07 6.000000e-01 2.819067e-07 7.000000e-01 3.961964e-07 8.000000e-01 5.457322e-07 9.000000e-01 7.421982e-07 1.000000e+00 1.007997e-06 1.100000e+00 1.386266e-06 1.200000e+00 1.936295e-06 1.300000e+00 2.721749e-06 1.400000e+00 3.781212e-06 1.500000e+00 5.145451e-06 1.600000e+00 6.843668e-06 1.000000e-01 6.523317e-05 2.000000e-01 1.123510e-04 3.000000e-01 1.457251e-04 4.000000e-01 1.669823e-04 5.000000e-01 1.793040e-04 6.000000e-01 1.873231e-04 7.000000e-01 1.935049e-04 8.000000e-01 1.989933e-04 9.000000e-01 2.043676e-04 1.000000e+00 2.097029e-04 1.100000e+00 2.149605e-04 1.200000e+00 2.201088e-04 1.300000e+00 2.251752e-04 1.400000e+00 2.301837e-04 1.500000e+00 2.351614e-04 1.600000e+00 2.401335e-04 1.000000e-01 1.527918e-13 2.000000e-01 2.464246e-13 3.000000e-01 3.665628e-13 4.000000e-01 5.147983e-13 5.000000e-01 6.936413e-13 6.000000e-01 9.071297e-13 7.000000e-01 1.160350e-12 8.000000e-01 1.459125e-12 9.000000e-01 1.809871e-12 1.000000e+00 2.219563e-12 1.100000e+00 2.695772e-12 1.200000e+00 3.246762e-12 1.300000e+00 3.881744e-12 1.400000e+00 4.611579e-12 1.500000e+00 5.450975e-12 1.600000e+00 6.424923e-12 1.000000e-01 1.908610e-10 2.000000e-01 3.874885e-10 3.000000e-01 7.261183e-10 4.000000e-01 1.304306e-09 5.000000e-01 2.264571e-09 6.000000e-01 3.814859e-09 7.000000e-01 6.250729e-09 8.000000e-01 9.981612e-09 9.000000e-01 1.556340e-08 1.000000e+00 2.374604e-08 1.100000e+00 3.557069e-08 1.200000e+00 5.265120e-08 1.300000e+00 7.817441e-08 1.400000e+00 1.207195e-07 1.500000e+00 2.093818e-07 1.600000e+00 4.348789e-07 1.000000e-01 8.188961e-05 2.000000e-01 1.338936e-04 3.000000e-01 1.620568e-04 4.000000e-01 1.748698e-04 5.000000e-01 1.821380e-04 6.000000e-01 1.873677e-04 7.000000e-01 1.918575e-04 8.000000e-01 1.962996e-04 9.000000e-01 2.011708e-04 1.000000e+00 2.065496e-04 1.100000e+00 2.123284e-04 1.200000e+00 2.183131e-04 1.300000e+00 2.245161e-04 1.400000e+00 2.309119e-04 1.500000e+00 2.375159e-04 1.600000e+00 2.443424e-04 1.000000e-01 1.246568e-10 2.000000e-01 1.404667e-10 3.000000e-01 1.415609e-10 4.000000e-01 1.416631e-10 5.000000e-01 1.417491e-10 6.000000e-01 1.419310e-10 7.000000e-01 1.422955e-10 8.000000e-01 1.429657e-10 9.000000e-01 1.441117e-10 1.000000e+00 1.459540e-10 1.100000e+00 1.487642e-10 1.200000e+00 1.528621e-10 1.300000e+00 1.586097e-10 1.400000e+00 1.664029e-10 1.500000e+00 1.766625e-10 1.600000e+00 1.898246e-10 1.000000e-01 1.739663e-06 2.000000e-01 2.271515e-06 3.000000e-01 2.658914e-06 4.000000e-01 3.016874e-06 5.000000e-01 3.370998e-06 6.000000e-01 3.731594e-06 7.000000e-01 4.104225e-06 8.000000e-01 4.492897e-06 9.000000e-01 4.902036e-06 1.000000e+00 5.339689e-06 1.100000e+00 5.825991e-06 1.200000e+00 6.413703e-06 1.300000e+00 7.234006e-06 1.400000e+00 8.509082e-06 1.500000e+00 1.040334e-05 1.600000e+00 1.288300e-05 1.000000e-01 4.074150e-05 2.000000e-01 7.406657e-05 3.000000e-01 1.010768e-04 4.000000e-01 1.226715e-04 5.000000e-01 1.394550e-04 6.000000e-01 1.517552e-04 7.000000e-01 1.605021e-04 8.000000e-01 1.670024e-04 9.000000e-01 1.721530e-04 1.000000e+00 1.765128e-04 1.100000e+00 1.805142e-04 1.200000e+00 1.845583e-04 1.300000e+00 1.889092e-04 1.400000e+00 1.935564e-04 1.500000e+00 1.983603e-04 1.600000e+00 2.032222e-04 ngspice-26/tests/bsimsoi/nmos/reference/dcSweep01.standard0000644000265600020320000000725212264261473023235 0ustar andreasadminV(d) I(d) 1.000000e-01 1.789308e-13 2.000000e-01 2.899051e-13 3.000000e-01 4.310282e-13 4.000000e-01 6.042801e-13 5.000000e-01 8.130390e-13 6.000000e-01 1.062778e-12 7.000000e-01 1.360203e-12 8.000000e-01 1.712858e-12 9.000000e-01 2.129013e-12 1.000000e+00 2.617708e-12 1.100000e+00 3.188947e-12 1.200000e+00 3.854294e-12 1.300000e+00 4.629387e-12 1.400000e+00 5.545876e-12 1.500000e+00 6.701330e-12 1.600000e+00 8.368638e-12 1.000000e-01 1.260908e-08 2.000000e-01 2.123638e-08 3.000000e-01 3.383739e-08 4.000000e-01 5.207216e-08 5.000000e-01 7.773994e-08 6.000000e-01 1.129282e-07 7.000000e-01 1.600570e-07 8.000000e-01 2.220518e-07 9.000000e-01 3.029209e-07 1.000000e+00 4.093930e-07 1.100000e+00 5.550268e-07 1.200000e+00 7.668972e-07 1.300000e+00 1.090293e-06 1.400000e+00 1.574731e-06 1.500000e+00 2.261906e-06 1.600000e+00 3.190903e-06 1.000000e-01 4.002699e-05 2.000000e-01 7.197073e-05 3.000000e-01 9.710855e-05 4.000000e-01 1.165604e-04 5.000000e-01 1.312070e-04 6.000000e-01 1.420461e-04 7.000000e-01 1.505450e-04 8.000000e-01 1.579522e-04 9.000000e-01 1.650652e-04 1.000000e+00 1.720647e-04 1.100000e+00 1.789170e-04 1.200000e+00 1.855652e-04 1.300000e+00 1.920581e-04 1.400000e+00 1.984317e-04 1.500000e+00 2.047289e-04 1.600000e+00 2.109907e-04 1.000000e-01 1.527918e-13 2.000000e-01 2.464243e-13 3.000000e-01 3.665583e-13 4.000000e-01 5.147983e-13 5.000000e-01 6.936413e-13 6.000000e-01 9.071297e-13 7.000000e-01 1.160350e-12 8.000000e-01 1.459125e-12 9.000000e-01 1.809871e-12 1.000000e+00 2.219563e-12 1.100000e+00 2.695772e-12 1.200000e+00 3.246762e-12 1.300000e+00 3.881744e-12 1.400000e+00 4.611579e-12 1.500000e+00 5.450975e-12 1.600000e+00 6.424923e-12 1.000000e-01 6.533852e-11 2.000000e-01 1.268863e-10 3.000000e-01 2.341749e-10 4.000000e-01 4.181669e-10 5.000000e-01 7.250477e-10 6.000000e-01 1.223151e-09 7.000000e-01 2.010886e-09 8.000000e-01 3.226296e-09 9.000000e-01 5.058596e-09 1.000000e+00 7.762676e-09 1.100000e+00 1.168059e-08 1.200000e+00 1.728578e-08 1.300000e+00 2.531133e-08 1.400000e+00 3.720775e-08 1.500000e+00 5.692191e-08 1.600000e+00 9.827982e-08 1.000000e-01 4.377955e-05 2.000000e-01 7.715505e-05 3.000000e-01 1.020519e-04 4.000000e-01 1.200370e-04 5.000000e-01 1.324365e-04 6.000000e-01 1.412528e-04 7.000000e-01 1.482596e-04 8.000000e-01 1.545886e-04 9.000000e-01 1.610377e-04 1.000000e+00 1.679176e-04 1.100000e+00 1.751708e-04 1.200000e+00 1.826787e-04 1.300000e+00 1.903605e-04 1.400000e+00 1.982473e-04 1.500000e+00 2.063660e-04 1.600000e+00 2.147523e-04 1.000000e-01 1.246568e-10 2.000000e-01 1.404667e-10 3.000000e-01 1.415609e-10 4.000000e-01 1.416631e-10 5.000000e-01 1.417491e-10 6.000000e-01 1.419310e-10 7.000000e-01 1.422955e-10 8.000000e-01 1.429657e-10 9.000000e-01 1.441117e-10 1.000000e+00 1.459540e-10 1.100000e+00 1.487642e-10 1.200000e+00 1.528621e-10 1.300000e+00 1.586097e-10 1.400000e+00 1.664029e-10 1.500000e+00 1.766625e-10 1.600000e+00 1.898246e-10 1.000000e-01 1.001632e-06 2.000000e-01 1.276656e-06 3.000000e-01 1.482664e-06 4.000000e-01 1.683528e-06 5.000000e-01 1.888976e-06 6.000000e-01 2.103076e-06 7.000000e-01 2.328366e-06 8.000000e-01 2.566941e-06 9.000000e-01 2.821189e-06 1.000000e+00 3.095096e-06 1.100000e+00 3.397862e-06 1.200000e+00 3.753902e-06 1.300000e+00 4.229740e-06 1.400000e+00 4.973596e-06 1.500000e+00 6.187299e-06 1.600000e+00 7.976295e-06 1.000000e-01 3.047115e-05 2.000000e-01 5.633043e-05 3.000000e-01 7.801510e-05 4.000000e-01 9.598978e-05 5.000000e-01 1.106507e-04 6.000000e-01 1.223639e-04 7.000000e-01 1.315448e-04 8.000000e-01 1.387880e-04 9.000000e-01 1.447182e-04 1.000000e+00 1.498351e-04 1.100000e+00 1.545914e-04 1.200000e+00 1.594670e-04 1.300000e+00 1.648264e-04 1.400000e+00 1.706749e-04 1.500000e+00 1.768033e-04 1.600000e+00 1.830468e-04 ngspice-26/tests/bsimsoi/nmos/reference/noise02.standard0000644000265600020320000000635212264261473022761 0ustar andreasadminFreq N(d) 1000 3.093528e-19 1258.925 2.980617e-19 1584.893 2.893287e-19 1995.262 2.825687e-19 2511.886 2.773275e-19 3162.278 2.732504e-19 3981.072 2.700575e-19 5011.872 2.675235e-19 6309.573 2.654601e-19 7943.282 2.636996e-19 10000 2.620773e-19 12589.25 2.604116e-19 15848.93 2.584786e-19 19952.62 2.559788e-19 25118.86 2.524953e-19 31622.78 2.474468e-19 39810.72 2.400501e-19 50118.72 2.293341e-19 63095.73 2.142747e-19 79432.82 1.941349e-19 100000 1.689984e-19 125892.5 1.402414e-19 158489.3 1.104635e-19 199526.2 8.265644e-20 251188.6 5.90892e-20 316227.8 4.070279e-20 398107.2 2.72636e-20 501187.2 1.790133e-20 630957.3 1.159528e-20 794328.2 7.443454e-21 1000000 4.750689e-21 1258925 3.021124e-21 1584893 1.917082e-21 1995262 1.215069e-21 2511886 7.697542e-22 3162278 4.876725e-22 3981072 3.091274e-22 5011872 1.961544e-22 6309573 1.246736e-22 7943282 7.943648e-23 10000000 5.079635e-23 12589250 3.265327e-23 15848930 2.1151e-23 19952620 1.385172e-23 25118860 9.214017e-24 31622780 6.263048e-24 39810720 4.381991e-24 50118720 3.180358e-24 63095730 2.410771e-24 79432820 1.91638e-24 100000000 1.597628e-24 1000 8.643494e-19 1258.925 7.274877e-19 1584.893 6.21712e-19 1995.262 5.399609e-19 2511.886 4.767764e-19 3162.278 4.279399e-19 3981.072 3.901902e-19 5011.872 3.610055e-19 6309.573 3.384347e-19 7943.282 3.209667e-19 10000 3.074284e-19 12589.25 2.969052e-19 15848.93 2.88677e-19 19952.62 2.821675e-19 25118.86 2.768991e-19 31622.78 2.724534e-19 39810.72 2.684306e-19 50118.72 2.644058e-19 63095.73 2.598788e-19 79432.82 2.542198e-19 100000 2.466215e-19 125892.5 2.36091e-19 158489.3 2.215466e-19 199526.2 2.021048e-19 251188.6 1.775831e-19 316227.8 1.490271e-19 398107.2 1.18807e-19 501187.2 8.99397e-20 630957.3 6.495613e-20 794328.2 4.511948e-20 1000000 3.042073e-20 1258925 2.007685e-20 1584893 1.305845e-20 1995262 8.412974e-21 2511886 5.387896e-21 3162278 3.43852e-21 3981072 2.190521e-21 5011872 1.394677e-21 6309573 8.882793e-22 7943282 5.663833e-22 10000000 3.618043e-22 12589250 2.317284e-22 15848930 1.489451e-22 19952620 9.618599e-23 25118860 6.249974e-23 31622780 4.094162e-23 39810720 2.710624e-23 50118720 1.819712e-23 63095730 1.243729e-23 79432820 8.696081e-24 100000000 6.252885e-24 1000 2.056529e-18 1258.925 1.642957e-18 1584.893 1.323324e-18 1995.262 1.076292e-18 2511.886 8.853708e-19 3162.278 7.378136e-19 3981.072 6.2377e-19 5011.872 5.35626e-19 6309.573 4.674963e-19 7943.282 4.148307e-19 10000 3.741102e-19 12589.25 3.426114e-19 15848.93 3.182237e-19 19952.62 2.993063e-19 25118.86 2.845765e-19 31622.78 2.730197e-19 39810.72 2.638155e-19 50118.72 2.562737e-19 63095.73 2.497746e-19 79432.82 2.437101e-19 100000 2.374228e-19 125892.5 2.301478e-19 158489.3 2.209756e-19 199526.2 2.0888e-19 251188.6 1.928824e-19 316227.8 1.724166e-19 398107.2 1.478293e-19 501187.2 1.207041e-19 630957.3 9.358327e-20 794328.2 6.905922e-20 1000000 4.883526e-20 1258925 3.339096e-20 1584893 2.227452e-20 1995262 1.460828e-20 2511886 9.474833e-21 3162278 6.103766e-21 3981072 3.917456e-21 5011872 2.510327e-21 6309573 1.608655e-21 7943282 1.032131e-21 10000000 6.637387e-22 12589250 4.282222e-22 15848930 2.774448e-22 19952620 1.807091e-22 25118860 1.184673e-22 31622780 7.827632e-23 39810720 5.221238e-23 50118720 3.522418e-23 63095730 2.408653e-23 79432820 1.673578e-23 100000000 1.184798e-23 ngspice-26/tests/bsimsoi/nmos/reference/acFreq01.standard0000644000265600020320000000712112264261473023037 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.69864797522435e-16 1.27288224188792e-16 4.25766369956203e-17 1258.925 1.69864976901627e-16 1.27288303665127e-16 4.25766479522388e-17 1584.893 1.69864936126527e-16 1.272882652082e-16 4.25766407923295e-17 1995.262 1.69864863688377e-16 1.27288251015761e-16 4.25766366025472e-17 2511.886 1.69864871482661e-16 1.27288231691147e-16 4.25766397915141e-17 3162.278 1.69864847289163e-16 1.2728820060508e-16 4.25766265524005e-17 3981.072 1.69864865603859e-16 1.27288190234113e-16 4.25766353918344e-17 5011.872 1.69864864506911e-16 1.27288242139083e-16 4.25766223678278e-17 6309.573 1.69864878585558e-16 1.27288226689497e-16 4.25766266717007e-17 7943.282 1.69864871009135e-16 1.27288217512837e-16 4.25766334598772e-17 10000 1.69864797522435e-16 1.27288208273298e-16 4.25766210801259e-17 12589.25 1.6986485048032e-16 1.27288303665127e-16 4.25766226679776e-17 15848.93 1.69864835706535e-16 1.27288164788208e-16 4.25766006243325e-17 19952.62 1.69864783921938e-16 1.27288171249323e-16 4.25765807660404e-17 25118.86 1.69864744761191e-16 1.27288168330412e-16 4.25765447504116e-17 31622.78 1.69864595643129e-16 1.27288099946666e-16 4.25764755647804e-17 39810.72 1.69864425846835e-16 1.27288030322468e-16 4.25763955243669e-17 50118.72 1.69864229395148e-16 1.27287924583201e-16 4.257624130077e-17 63095.73 1.69863819162423e-16 1.2728774742665e-16 4.25760465114124e-17 79432.82 1.69863187949763e-16 1.27287436092414e-16 4.25756717116642e-17 100000 1.69862251043346e-16 1.27286982780236e-16 4.25751250236609e-17 125892.5 1.69860678577211e-16 1.27286280924225e-16 4.25742585895489e-17 158489.3 1.69858207987033e-16 1.27285152188434e-16 4.25728449166149e-17 199526.2 1.69854254752091e-16 1.2728330549659e-16 4.25706381663917e-17 251188.6 1.69848080887897e-16 1.27280438320747e-16 4.25671420173438e-17 316227.8 1.69838273468027e-16 1.27275869949439e-16 4.25615982512811e-17 398107.2 1.69822848819136e-16 1.27268720991335e-16 4.25528885125525e-17 501187.2 1.69798590594442e-16 1.27257470974166e-16 4.25391507738109e-17 630957.3 1.69760525406735e-16 1.27239795917599e-16 4.25176521171708e-17 794328.2 1.6970129366725e-16 1.27212319549699e-16 4.24841653764868e-17 1000000 1.69609990458545e-16 1.27169972066075e-16 4.24325699411335e-17 1258925 1.69471680217584e-16 1.27105751298763e-16 4.23543234428984e-17 1584893 1.69266432971533e-16 1.27010503509087e-16 4.22383559637677e-17 1995262 1.68972915375998e-16 1.26874342967743e-16 4.20724169931563e-17 2511886 1.68573136179062e-16 1.2668883913844e-16 4.18464263293382e-17 3162278 1.68063766298343e-16 1.26452433798687e-16 4.15584868326251e-17 3981072 1.67467270332522e-16 1.26175644941964e-16 4.12213042446707e-17 5011872 1.66833920640358e-16 1.25881755384337e-16 4.08632496092012e-17 6309573 1.66227651942942e-16 1.25600439513214e-16 4.052053860975e-17 7943282 1.65702324561408e-16 1.25356666445665e-16 4.02235762019617e-17 10000000 1.65284954880023e-16 1.25162980487203e-16 3.99876476208501e-17 12589250 1.64975759299994e-16 1.25019496332915e-16 3.98128127107675e-17 15848930 1.64758077410552e-16 1.24918453806405e-16 3.96897869334146e-17 19952620 1.64610488868754e-16 1.24850030298136e-16 3.96063737418738e-17 25118860 1.64512916922189e-16 1.24804744323714e-16 3.9551215385835e-17 31622780 1.64449424648684e-16 1.24775263314753e-16 3.95153324234397e-17 39810720 1.64408600320772e-16 1.24756309158891e-16 3.94922635809423e-17 50118720 1.64382548013128e-16 1.2474423846122e-16 3.9477531009105e-17 63095730 1.64365968026312e-16 1.24736555619485e-16 3.94681530710239e-17 79432820 1.64355456298443e-16 1.24731670362199e-16 3.94622122364688e-17 100000000 1.64348805504756e-16 1.24728582985528e-16 3.94584574350695e-17 ngspice-26/tests/bsimsoi/nmos/reference/dcSweep03.standard0000644000265600020320000000725212264261473023237 0ustar andreasadminV(d) I(d) 1.000000e-01 1.789308e-13 2.000000e-01 2.899051e-13 3.000000e-01 4.310282e-13 4.000000e-01 6.042801e-13 5.000000e-01 8.130390e-13 6.000000e-01 1.062778e-12 7.000000e-01 1.360203e-12 8.000000e-01 1.712858e-12 9.000000e-01 2.129013e-12 1.000000e+00 2.617708e-12 1.100000e+00 3.188947e-12 1.200000e+00 3.854294e-12 1.300000e+00 4.629387e-12 1.400000e+00 5.545876e-12 1.500000e+00 6.701330e-12 1.600000e+00 8.368638e-12 1.000000e-01 1.261281e-08 2.000000e-01 2.124881e-08 3.000000e-01 3.386676e-08 4.000000e-01 5.213124e-08 5.000000e-01 7.784738e-08 6.000000e-01 1.131100e-07 7.000000e-01 1.603481e-07 8.000000e-01 2.224989e-07 9.000000e-01 3.035888e-07 1.000000e+00 4.103807e-07 1.100000e+00 5.565090e-07 1.200000e+00 7.691980e-07 1.300000e+00 1.093960e-06 1.400000e+00 1.580498e-06 1.500000e+00 2.270648e-06 1.600000e+00 3.203666e-06 1.000000e-01 4.011359e-05 2.000000e-01 7.211780e-05 3.000000e-01 9.729560e-05 4.000000e-01 1.167723e-04 5.000000e-01 1.314305e-04 6.000000e-01 1.422725e-04 7.000000e-01 1.507743e-04 8.000000e-01 1.581891e-04 9.000000e-01 1.653156e-04 1.000000e+00 1.723325e-04 1.100000e+00 1.792036e-04 1.200000e+00 1.858705e-04 1.300000e+00 1.923819e-04 1.400000e+00 1.987735e-04 1.500000e+00 2.050884e-04 1.600000e+00 2.113675e-04 1.000000e-01 1.527918e-13 2.000000e-01 2.464243e-13 3.000000e-01 3.665583e-13 4.000000e-01 5.147983e-13 5.000000e-01 6.936413e-13 6.000000e-01 9.071297e-13 7.000000e-01 1.160350e-12 8.000000e-01 1.459125e-12 9.000000e-01 1.809871e-12 1.000000e+00 2.219563e-12 1.100000e+00 2.695772e-12 1.200000e+00 3.246762e-12 1.300000e+00 3.881744e-12 1.400000e+00 4.611579e-12 1.500000e+00 5.450975e-12 1.600000e+00 6.424923e-12 1.000000e-01 6.537081e-11 2.000000e-01 1.270125e-10 3.000000e-01 2.345242e-10 4.000000e-01 4.189926e-10 5.000000e-01 7.268139e-10 6.000000e-01 1.226666e-09 7.000000e-01 2.017492e-09 8.000000e-01 3.238141e-09 9.000000e-01 5.078992e-09 1.000000e+00 7.796593e-09 1.100000e+00 1.173536e-08 1.200000e+00 1.737227e-08 1.300000e+00 2.544673e-08 1.400000e+00 3.742458e-08 1.500000e+00 5.730328e-08 1.600000e+00 9.911536e-08 1.000000e-01 4.393320e-05 2.000000e-01 7.740888e-05 3.000000e-01 1.023643e-04 4.000000e-01 1.203743e-04 5.000000e-01 1.327731e-04 6.000000e-01 1.415840e-04 7.000000e-01 1.485898e-04 8.000000e-01 1.549263e-04 9.000000e-01 1.613944e-04 1.000000e+00 1.683035e-04 1.100000e+00 1.755916e-04 1.200000e+00 1.831367e-04 1.300000e+00 1.908560e-04 1.400000e+00 1.987802e-04 1.500000e+00 2.069354e-04 1.600000e+00 2.153570e-04 1.000000e-01 1.246568e-10 2.000000e-01 1.404667e-10 3.000000e-01 1.415609e-10 4.000000e-01 1.416631e-10 5.000000e-01 1.417491e-10 6.000000e-01 1.419310e-10 7.000000e-01 1.422955e-10 8.000000e-01 1.429657e-10 9.000000e-01 1.441117e-10 1.000000e+00 1.459540e-10 1.100000e+00 1.487642e-10 1.200000e+00 1.528621e-10 1.300000e+00 1.586097e-10 1.400000e+00 1.664029e-10 1.500000e+00 1.766625e-10 1.600000e+00 1.898246e-10 1.000000e-01 1.001653e-06 2.000000e-01 1.276685e-06 3.000000e-01 1.482700e-06 4.000000e-01 1.683569e-06 5.000000e-01 1.889022e-06 6.000000e-01 2.103127e-06 7.000000e-01 2.328423e-06 8.000000e-01 2.567004e-06 9.000000e-01 2.821259e-06 1.000000e+00 3.095173e-06 1.100000e+00 3.397951e-06 1.200000e+00 3.754010e-06 1.300000e+00 4.229895e-06 1.400000e+00 4.973865e-06 1.500000e+00 6.187820e-06 1.600000e+00 7.977258e-06 1.000000e-01 3.047187e-05 2.000000e-01 5.633183e-05 3.000000e-01 7.801696e-05 4.000000e-01 9.599200e-05 5.000000e-01 1.106532e-04 6.000000e-01 1.223665e-04 7.000000e-01 1.315475e-04 8.000000e-01 1.387908e-04 9.000000e-01 1.447210e-04 1.000000e+00 1.498382e-04 1.100000e+00 1.545951e-04 1.200000e+00 1.594721e-04 1.300000e+00 1.648340e-04 1.400000e+00 1.706858e-04 1.500000e+00 1.768178e-04 1.600000e+00 1.830652e-04 ngspice-26/tests/bsimsoi/nmos/reference/acVd02.standard0000644000265600020320000000332412264261473022515 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.1 4.264037e-05 2.257028e-04 1.08292829320756e-16 8.95884842564731e-17 0.2 8.079254e-05 1.605346e-04 1.21039832772063e-16 7.09067491983118e-17 0.3 1.132572e-04 1.108388e-04 1.32008635741914e-16 5.15411439549896e-17 0.4 1.356023e-04 8.023475e-05 1.36298336903369e-16 4.30990916692671e-17 0.5 1.461278e-04 6.754099e-05 1.37500637228898e-16 4.14624012261261e-17 0.6 1.510933e-04 6.328222e-05 1.37974437357181e-16 4.16129812668963e-17 0.7 1.551108e-04 6.127224e-05 1.3821143742135e-16 4.19533113590421e-17 0.8 1.592797e-04 5.963311e-05 1.3832903745319e-16 4.2135771408444e-17 0.9 1.632949e-04 5.816691e-05 1.3839983747236e-16 4.21721114182832e-17 1 1.668892e-04 5.685556e-05 1.3846993749134e-16 4.20770113925344e-17 1.1 1.700095e-04 5.616502e-05 1.38477737493452e-16 4.18729213372762e-17 1.2 1.726973e-04 5.585255e-05 1.38460037488659e-16 4.14049412105685e-17 0.1 1.974074e-05 2.172062e-04 1.07511129109107e-16 9.01798544165891e-17 0.2 3.996884e-05 1.696340e-04 1.17378031780614e-16 7.72644109196764e-17 0.3 6.019029e-05 1.290328e-04 1.2894473491235e-16 6.00110362482499e-17 0.4 7.962655e-05 9.491892e-05 1.37104637121679e-16 4.62592625248972e-17 0.5 9.628051e-05 6.944631e-05 1.39975537898988e-16 4.08774810677564e-17 0.6 1.084545e-04 5.335814e-05 1.40740238106034e-16 3.92958406395203e-17 0.7 1.170749e-04 4.344342e-05 1.40968638167874e-16 3.87703604972443e-17 0.8 1.234045e-04 3.720460e-05 1.41043138188045e-16 3.855502043894e-17 0.9 1.282430e-04 3.354116e-05 1.41046338188912e-16 3.84479304099449e-17 1 1.320696e-04 3.245978e-05 1.40969838168199e-16 3.83876203936157e-17 1.1 1.351792e-04 3.487628e-05 1.4075473810996e-16 3.83407203809173e-17 1.2 1.377541e-04 4.112760e-05 1.40359938003066e-16 3.82116503459711e-17 ngspice-26/tests/bsimsoi/nmos/reference/noise03.standard0000644000265600020320000000634712264261473022766 0ustar andreasadminFreq N(d) 1000 3.201132e-19 1258.925 3.079607e-19 1584.893 2.98562e-19 1995.262 2.912879e-19 2511.886 2.856497e-19 3162.278 2.812664e-19 3981.072 2.778378e-19 5011.872 2.751231e-19 6309.573 2.729226e-19 7943.282 2.710598e-19 10000 2.693644e-19 12589.25 2.676513e-19 15848.93 2.656958e-19 19952.62 2.631996e-19 25118.86 2.597495e-19 31622.78 2.547683e-19 39810.72 2.474749e-19 50118.72 2.368889e-19 63095.73 2.219518e-19 79432.82 2.018507e-19 100000 1.765518e-19 125892.5 1.473136e-19 158489.3 1.166982e-19 199526.2 8.779114e-20 251188.6 6.304732e-20 316227.8 4.35851e-20 398107.2 2.927108e-20 501187.2 1.925484e-20 630957.3 1.248759e-20 794328.2 8.022973e-21 1000000 5.123459e-21 1258925 3.259486e-21 1584893 2.068988e-21 1995262 1.311735e-21 2511886 8.312731e-22 3162278 5.268854e-22 3981072 3.34205e-22 5011872 2.122816e-22 6309573 1.351353e-22 7943282 8.631209e-23 10000000 5.540135e-23 12589250 3.58199e-23 15848930 2.340583e-23 19952620 1.552801e-23 25118860 1.052281e-23 31622780 7.33807e-24 39810720 5.30805e-24 50118720 4.011299e-24 63095730 3.180826e-24 79432820 2.647345e-24 100000000 2.303409e-24 1000 8.85887e-19 1258.925 7.448534e-19 1584.893 6.358535e-19 1995.262 5.516104e-19 2511.886 4.865001e-19 3162.278 4.361752e-19 3981.072 3.972752e-19 5011.872 3.672015e-19 6309.573 3.439438e-19 7943.282 3.25945e-19 10000 3.119966e-19 12589.25 3.011567e-19 15848.93 2.926844e-19 19952.62 2.859868e-19 25118.86 2.805742e-19 31622.78 2.760189e-19 39810.72 2.719141e-19 50118.72 2.678298e-19 63095.73 2.632624e-19 79432.82 2.575792e-19 100000 2.499697e-19 125892.5 2.394344e-19 158489.3 2.248777e-19 199526.2 2.053896e-19 251188.6 1.807483e-19 316227.8 1.519599e-19 398107.2 1.213807e-19 501187.2 9.205972e-20 630957.3 6.659525e-20 794328.2 4.631802e-20 1000000 3.125909e-20 1258925 2.064448e-20 1584893 1.343426e-20 1995262 8.658196e-21 2511886 5.546531e-21 3162278 3.54071e-21 3981072 2.256305e-21 5011872 1.437136e-21 6309573 9.158525e-22 7943282 5.844749e-22 10000000 3.73862e-22 12589250 2.39946e-22 15848930 1.54717e-22 19952620 1.003983e-22 25118860 6.571578e-23 31622780 4.351972e-23 39810720 2.92747e-23 50118720 2.010163e-23 63095730 1.417102e-23 79432820 1.031881e-23 100000000 7.803046e-24 1000 2.09251e-18 1258.925 1.671513e-18 1584.893 1.346142e-18 1995.262 1.094675e-18 2511.886 9.003254e-19 3162.278 7.501191e-19 3981.072 6.34028e-19 5011.872 5.443016e-19 6309.573 4.749488e-19 7943.282 4.213378e-19 10000 3.798865e-19 12589.25 3.478226e-19 15848.93 3.229976e-19 19952.62 3.037416e-19 25118.86 2.887489e-19 31622.78 2.769872e-19 39810.72 2.676217e-19 50118.72 2.599508e-19 63095.73 2.533448e-19 79432.82 2.471866e-19 100000 2.408096e-19 125892.5 2.33439e-19 158489.3 2.241534e-19 199526.2 2.119123e-19 251188.6 1.957218e-19 316227.8 1.750029e-19 398107.2 1.500982e-19 501187.2 1.226039e-19 630957.3 9.509335e-20 794328.2 7.019871e-20 1000000 4.9656e-20 1258925 3.396026e-20 1584893 2.265852e-20 1995262 1.486238e-20 2511886 9.640995e-21 3162278 6.211756e-21 3981072 3.987538e-21 5011872 2.555936e-21 6309573 1.63855e-21 7943282 1.051964e-21 10000000 6.771362e-22 12589250 4.375022e-22 15848930 2.840872e-22 19952620 1.856582e-22 25118860 1.223262e-22 31622780 8.143093e-23 39810720 5.490989e-23 50118720 3.762352e-23 63095730 2.629022e-23 79432820 1.881022e-23 100000000 1.383638e-23 ngspice-26/tests/bsimsoi/nmos/reference/noise01.standard0000644000265600020320000000634412264261473022761 0ustar andreasadminFreq N(d) 1000 3.886811e-19 1258.925 3.609539e-19 1584.893 3.395181e-19 1995.262 3.229411e-19 2511.886 3.101131e-19 3162.278 3.00173e-19 3981.072 2.924498e-19 5011.872 2.86416e-19 6309.573 2.816503e-19 7943.282 2.77805e-19 10000 2.745773e-19 12589.25 2.716801e-19 15848.93 2.688093e-19 19952.62 2.656058e-19 25118.86 2.616091e-19 31622.78 2.562054e-19 39810.72 2.485854e-19 50118.72 2.377471e-19 63095.73 2.22615e-19 79432.82 2.023631e-19 100000 1.769477e-19 125892.5 1.476195e-19 158489.3 1.169345e-19 199526.2 8.797367e-20 251188.6 6.318828e-20 316227.8 4.369394e-20 398107.2 2.93551e-20 501187.2 1.931967e-20 630957.3 1.253758e-20 794328.2 8.061509e-21 1000000 5.153138e-21 1258925 3.282319e-21 1584893 2.08653e-21 1995262 1.325188e-21 2511886 8.415663e-22 3162278 5.347361e-22 3981072 3.401681e-22 5011872 2.167858e-22 6309573 1.38512e-22 7943282 8.881736e-23 10000000 5.723314e-23 12589250 3.713119e-23 15848930 2.431485e-23 19952620 1.612613e-23 25118860 1.088065e-23 31622780 7.510207e-24 39810720 5.336665e-24 50118720 3.928992e-24 63095730 3.012791e-24 79432820 2.413055e-24 100000000 2.017913e-24 1000 2.426038e-18 1258.925 1.935172e-18 1584.893 1.555802e-18 1995.262 1.2626e-18 2511.886 1.035995e-18 3162.278 8.608567e-19 3981.072 7.254939e-19 5011.872 6.208681e-19 6309.573 5.399921e-19 7943.282 4.774626e-19 10000 4.290983e-19 12589.25 3.916597e-19 15848.93 3.626304e-19 19952.62 3.400451e-19 25118.86 3.223537e-19 31622.78 3.083085e-19 39810.72 2.968694e-19 50118.72 2.871167e-19 63095.73 2.781684e-19 79432.82 2.690994e-19 100000 2.588731e-19 125892.5 2.463155e-19 158489.3 2.301958e-19 199526.2 2.094997e-19 251188.6 1.839248e-19 316227.8 1.544149e-19 398107.2 1.23278e-19 501187.2 9.352606e-20 630957.3 6.77285e-20 794328.2 4.719383e-20 1000000 3.193595e-20 1258925 2.116758e-20 1584893 1.383852e-20 1995262 8.970605e-21 2511886 5.787955e-21 3162278 3.727273e-21 3981072 2.40047e-21 5011872 1.548532e-21 6309573 1.001922e-21 7943282 6.509718e-22 10000000 4.252316e-22 12589250 2.796244e-22 15848930 1.853597e-22 19952620 1.240578e-22 25118860 8.397817e-23 31622780 5.761092e-23 39810720 4.014216e-23 50118720 2.84776e-23 63095730 2.062142e-23 79432820 1.528101e-23 100000000 1.161508e-23 1000 8.323392e-18 1258.925 6.487104e-18 1584.893 5.067912e-18 1995.262 3.971077e-18 2511.886 3.123377e-18 3162.278 2.468224e-18 3981.072 1.96188e-18 5011.872 1.570544e-18 6309.573 1.268089e-18 7943.282 1.034323e-18 10000 8.536375e-19 12589.25 7.139653e-19 15848.93 6.059743e-19 19952.62 5.224427e-19 25118.86 4.577741e-19 31622.78 4.076199e-19 39810.72 3.685825e-19 50118.72 3.379794e-19 63095.73 3.1365e-19 79432.82 2.937941e-19 100000 2.768309e-19 125892.5 2.612785e-19 158489.3 2.456695e-19 199526.2 2.285414e-19 251188.6 2.08574e-19 316227.8 1.849359e-19 398107.2 1.577752e-19 501187.2 1.285373e-19 630957.3 9.96792e-20 794328.2 7.374309e-20 1000000 5.239548e-20 1258925 3.607766e-20 1584893 2.429513e-20 1995262 1.612743e-20 2511886 1.061886e-20 3162278 6.96768e-21 3981072 4.57193e-21 5011872 3.007758e-21 6309573 1.987913e-21 7943282 1.322143e-21 10000000 8.861153e-22 12589250 5.99183e-22 15848930 4.09213e-22 19952620 2.825322e-22 25118860 1.973656e-22 31622780 1.395952e-22 39810720 1.000321e-22 50118720 7.266612e-23 63095730 5.354266e-23 79432820 4.004197e-23 100000000 3.041499e-23 ngspice-26/tests/bsimsoi/nmos/parameters/0000755000265600020320000000000012264261473020157 5ustar andreasadminngspice-26/tests/bsimsoi/nmos/parameters/nmosParameters0000644000265600020320000001176012264261473023107 0ustar andreasadmin+ binunit = (1) + mobmod = (1) + capmod = (3) + shmod = (0) + paramchk= (0) + soimod = (0) + igcmod = (1) + igbmod = (1) + tsi = (9e-008) + tox = (2e-009) + toxref = (2e-009) + tbox = (4e-007) + toxqm = (2e-009) + tnom = (27) + rbody = (0) + rbsh = (0) + rsh = (0) + dtoxcv = (0) + xj = (7e-008) + rhalo = (0) + nch = (1e+019) + ngate = (3e+020) + wint = (5.5544e-009) + lint = (2e-009) + xpart = (1) + toxm = (2e-009) + k1 = (0.6) + k2 = (1e-010) + k3 = (0.231) + k3b = (0) + kb1 = (1) + w0 = (0) + dvt0 = (2.2) + dvt1 = (0.53) + dvt2 = (0.127) + dvt0w = (0) + dvt1w = (0) + dvt2w = (0) + eta0 = (1.7958) + etab = (-0.07) + dsub = (1.7577) + voff = (-0.10382) + nfactor = (1) + cdsc = (0.00024) + cdscb = (0) + cdscd = (0) + cit = (0) + u0 = (200) + ua = (2.25e-009) + ub = (5.9e-019) + uc = (2.9e-011) + prwg = (2.5) + prwb = (0.76) + wr = (1) + rdsw = (0.695) + a0 = (0) + ags = (0) + a1 = (0) + a2 = (0.7) + b0 = (0) + b1 = (0) + vsat = (99820) + keta = (0) + ketas = (0) + dwg = (0) + dwb = (0) + dwbc = (0) + pclm = (1.3) + pdiblc1 = (0.39) + pdiblc2 = (0.05) + pdiblcb = (0.89459) + drout = (2) + pvag = (0.116) + delta = (0.01) + vevb = (0.075) + vecb = (0.026) + alpha0 = (5.0707e-009) + beta0 = (0.0007605) + beta1 = (0.0002767) + beta2 = (0.094512) + alphagb1= (0.35) + alphagb2= (0.43) + betagb1 = (0.03) + betagb2 = (0.05) + fbjtii = (0) + vdsatii0= (0.72051) + tii = (-0.5062) + lii = (2.835e-009) + esatii = (2213500) + sii0 = (2.0387) + sii1 = (0.04093) + sii2 = (9.8e-011) + siid = (0.008025) + aigc = (1) + bigc = (0.05022) + cigc = (0.075) + aigsd = (0.43) + bigsd = (0.054) + cigsd = (0.075) + nigc = (1) + poxedge = (1) + pigcd = (1) + agidl = (0) + bgidl = (0) + ebg = (1.2) + vgb1 = (300) + vgb2 = (17) + voxh = (1.5) + deltavox= (0.004) + ntox = (1) + ntun = (1) + ndiode = (1) + nrecf0 = (1.5) + nrecr0 = (2) + isbjt = (1e-006) + isdif = (0.0001) + isrec = (0.01) + istun = (5e-005) + vrec0 = (1) + vtun0 = (0) + nbjt = (0.7888) + lbjt0 = (1.4381e-006) + vabjt = (0.001) + aely = (1.0819e+010) + ahli = (0) + lpe0 = (3e-009) + cjswg = (1e-010) + mjswg = (0.5) + pbswg = (0.7) + tt = (4e-010) + ldif0 = (1) + cgso = (5e-011) + cgdo = (5e-011) + dlc = (0) + dwc = (0) + dlcb = (0) + dlbg = (0) + fbody = (1) + clc = (1e-008) + cle = (0) + cf = (0) + csdmin = (0) + asd = (0.3) + csdesw = (8.73e-011) + delvt = (-0.031456) + acde = (1) + moin = (25) + ckappa = (3.2309) + cgdl = (1.5533e-010) + cgsl = (1.5533e-010) + ndif = (-1) + kt1 = (-0.11573) + kt1l = (-4e-010) + kt2 = (-0.25) + ute = (-1.2189) + ua1 = (5.005e-012) + ub1 = (-8.835e-019) + uc1 = (-6e-011) + prt = (51.149) + rth0 = (0.02) + cth0 = (1e-005) + at = (8479) + tpbswg = (5.86e-005) + tcjswg = (0.00092578) + ntrecf = (-0.55338) + ntrecr = (-0.15688) + xbjt = (1.0968) + xdif = (1.4551) + xrec = (2.6e-011) + xtun = (25.308) + fnoimod = (0) + tnoimod = (2) + af = (2.15) + ef = (1.119) + kf = (1.67e-026) + w0flk = (0.001) ngspice-26/tests/bsimsoi/nmos/qaSpec0000644000265600020320000001074512264261473017162 0ustar andreasadmin // // CMC test specification for bsimsoi (version 4.4) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments nmos level=10 pTypeSelectionArguments pmos level=10 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 checkPolarity no symmetricPins d s scaleParameters m // // Specific tests // test dcSweep01 biases V(s)=0 V(b)=0 biasList V(g)=-1.6,0.4,1.6 biasSweep V(d)=0.1,1.6,0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=0 mobmod=1 test dcSweep02 biases V(s)=0 V(b)=0 biasList V(g)=-1.6,0.4,1.6 biasSweep V(d)=0.1,1.6,0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=1 mobmod=2 test dcSweep03 biases V(s)=0 V(b)=0 biasList V(g)=-1.6,0.4,1.6 biasSweep V(d)=0.1,1.6,0.1 outputs I(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=3 mobmod=3 test acVd01 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=1.2 biasSweep V(d)=0.1,1.2,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=0 capmod=2 test acVd02 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=1.2 biasSweep V(d)=0.1,1.2,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=1 capmod=3 test acFreq01 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=0 capmod=2 test acFreq02 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=3 capmod=3 test noise01 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=0 fnoimod=0 tnoimod=0 test noise02 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=1 fnoimod=1 tnoimod=1 test noise03 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=0.2e-6 l=0.04e-6 modelParameters parameters/nmosParameters modelParameters soimod=3 fnoimod=1 tnoimod=2 ngspice-26/tests/bsimsoi/Makefile.in0000644000265600020320000003370512264261541017111 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsimsoi DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsimsoi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsimsoi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: rm -rf nmos/results pmos/results ngspiceCkt b4soiv1check.log # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soipd/0000755000265600020320000000000012264261714015445 5ustar andreasadminngspice-26/tests/bsim3soipd/t3.cir0000644000265600020320000000043412264261473016475 0ustar andreasadmin*model = BSIMSOI (PD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 1.5 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vd 0 3 0.01 vg 0.5 3 0.5 .print dc v(g), i(vs) .include nmospd.mod ngspice-26/tests/bsim3soipd/lib.h0000644000265600020320000001042512264261473016370 0ustar andreasadmin .subckt dum ss mn1 ss ss ss ss ss n1 w=4u l=0.15u debug=1 AS=6p AD=6p PS=7u PD=7u .ends dum * XOR2 .subckt xnor2 dd ss sub A B out mn1 T1 A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out A C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn5 C2 T1 ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 T1 A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 T1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out A C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp5 out T1 dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends xnor2 .subckt nor2 dd ss sub A B out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor2 .subckt nand2 dd ss sub A B out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand2 .subckt nor3 dd ss sub A B C out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor3 .subckt nand3 dd ss sub A B C out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand3 .subckt nor4 dd ss sub A B C D out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor4 .subckt nand4 dd ss sub A B C D out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C C3 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 C3 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand4 .subckt inv1 dd ss sub in out mn1 out in ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out in dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends inv1 .subckt inv5 dd ss sub in out xinv1 dd ss sub in 1 inv1 xinv2 dd ss sub 1 2 inv1 xinv3 dd ss sub 2 3 inv1 xinv4 dd ss sub 3 4 inv1 xinv5 dd ss sub 4 out inv1 .ends inv5 .subckt inv25 dd ss sub in out xinv1 dd ss sub in 1 inv5 xinv2 dd ss sub 1 2 inv5 xinv3 dd ss sub 2 3 inv5 xinv4 dd ss sub 3 4 inv5 xinv5 dd ss sub 4 out inv5 .ends inv25 .subckt inv125 dd ss sub in out xinv1 dd ss sub in 1 inv25 xinv2 dd ss sub 1 2 inv25 xinv3 dd ss sub 2 3 inv25 xinv4 dd ss sub 3 4 inv25 xinv5 dd ss sub 4 out inv25 .ends inv125 .subckt inv625 dd ss sub in out xinv1 dd ss sub in 1 inv125 xinv2 dd ss sub 1 2 inv125 xinv3 dd ss sub 2 3 inv125 xinv4 dd ss sub 3 4 inv125 xinv5 dd ss sub 4 out inv125 .ends inv625 ngspice-26/tests/bsim3soipd/t5.out0000644000265600020320000013114412264261473016534 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (PD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (PD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.412965e-11 1 1.000000e-02 1.868439e-11 2 2.000000e-02 2.691900e-11 3 3.000000e-02 3.714787e-11 4 4.000000e-02 5.125290e-11 5 5.000000e-02 7.069545e-11 6 6.000000e-02 9.748369e-11 7 7.000000e-02 1.343749e-10 8 8.000000e-02 1.851513e-10 9 9.000000e-02 2.549952e-10 10 1.000000e-01 3.509984e-10 11 1.100000e-01 4.828510e-10 12 1.200000e-01 6.637719e-10 13 1.300000e-01 9.117578e-10 14 1.400000e-01 1.251256e-09 15 1.500000e-01 1.715390e-09 16 1.600000e-01 2.348907e-09 17 1.700000e-01 3.212054e-09 18 1.800000e-01 4.385633e-09 19 1.900000e-01 5.977539e-09 20 2.000000e-01 8.131134e-09 21 2.100000e-01 1.103584e-08 22 2.200000e-01 1.494041e-08 23 2.300000e-01 2.016920e-08 24 2.400000e-01 2.714203e-08 25 2.500000e-01 3.639779e-08 26 2.600000e-01 4.862215e-08 27 2.700000e-01 6.467955e-08 28 2.800000e-01 8.564949e-08 29 2.900000e-01 1.128671e-07 30 3.000000e-01 1.479685e-07 31 3.100000e-01 1.929409e-07 32 3.200000e-01 2.501785e-07 33 3.300000e-01 3.225462e-07 34 3.400000e-01 4.134518e-07 35 3.500000e-01 5.269298e-07 36 3.600000e-01 6.677368e-07 37 3.700000e-01 8.414599e-07 38 3.800000e-01 1.054632e-06 39 3.900000e-01 1.314850e-06 40 4.000000e-01 1.630874e-06 41 4.100000e-01 2.012700e-06 42 4.200000e-01 2.471565e-06 43 4.300000e-01 3.019864e-06 44 4.400000e-01 3.670941e-06 45 4.500000e-01 4.438738e-06 46 4.600000e-01 5.337287e-06 47 4.700000e-01 6.380076e-06 48 4.800000e-01 7.579326e-06 49 4.900000e-01 8.945277e-06 50 5.000000e-01 1.048555e-05 51 5.100000e-01 1.220469e-05 52 5.200000e-01 1.410395e-05 53 5.300000e-01 1.618128e-05 54 5.400000e-01 1.843163e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 2.084730e-05 56 5.600000e-01 2.341855e-05 57 5.700000e-01 2.613410e-05 58 5.800000e-01 2.898174e-05 59 5.900000e-01 3.194880e-05 60 6.000000e-01 3.502262e-05 61 6.100000e-01 3.819081e-05 62 6.200000e-01 4.144161e-05 63 6.300000e-01 4.476398e-05 64 6.400000e-01 4.814773e-05 65 6.500000e-01 5.158359e-05 66 6.600000e-01 5.506319e-05 67 6.700000e-01 5.857906e-05 68 6.800000e-01 6.212456e-05 69 6.900000e-01 6.569384e-05 70 7.000000e-01 6.928175e-05 71 7.100000e-01 7.288380e-05 72 7.200000e-01 7.649608e-05 73 7.300000e-01 8.011519e-05 74 7.400000e-01 8.373817e-05 75 7.500000e-01 8.736247e-05 76 7.600000e-01 9.098586e-05 77 7.700000e-01 9.460644e-05 78 7.800000e-01 9.822255e-05 79 7.900000e-01 1.018327e-04 80 8.000000e-01 1.054358e-04 81 8.100000e-01 1.090306e-04 82 8.200000e-01 1.126162e-04 83 8.300000e-01 1.161919e-04 84 8.400000e-01 1.197568e-04 85 8.500000e-01 1.233105e-04 86 8.600000e-01 1.268522e-04 87 8.700000e-01 1.303816e-04 88 8.800000e-01 1.338983e-04 89 8.900000e-01 1.374018e-04 90 9.000000e-01 1.408919e-04 91 9.100000e-01 1.443682e-04 92 9.200000e-01 1.478305e-04 93 9.300000e-01 1.512785e-04 94 9.400000e-01 1.547121e-04 95 9.500000e-01 1.581310e-04 96 9.600000e-01 1.615351e-04 97 9.700000e-01 1.649242e-04 98 9.800000e-01 1.682983e-04 99 9.900000e-01 1.716570e-04 100 1.000000e+00 1.750005e-04 101 1.010000e+00 1.783285e-04 102 1.020000e+00 1.816409e-04 103 1.030000e+00 1.849377e-04 104 1.040000e+00 1.882188e-04 105 1.050000e+00 1.914840e-04 106 1.060000e+00 1.947335e-04 107 1.070000e+00 1.979670e-04 108 1.080000e+00 2.011845e-04 109 1.090000e+00 2.043860e-04 110 1.100000e+00 2.075714e-04 111 1.110000e+00 2.107407e-04 112 1.120000e+00 2.138938e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 2.170307e-04 114 1.140000e+00 2.201514e-04 115 1.150000e+00 2.232559e-04 116 1.160000e+00 2.263440e-04 117 1.170000e+00 2.294159e-04 118 1.180000e+00 2.324714e-04 119 1.190000e+00 2.355106e-04 120 1.200000e+00 2.385334e-04 121 1.210000e+00 2.415398e-04 122 1.220000e+00 2.445298e-04 123 1.230000e+00 2.475035e-04 124 1.240000e+00 2.504607e-04 125 1.250000e+00 2.534016e-04 126 1.260000e+00 2.563260e-04 127 1.270000e+00 2.592340e-04 128 1.280000e+00 2.621256e-04 129 1.290000e+00 2.650008e-04 130 1.300000e+00 2.678596e-04 131 1.310000e+00 2.707020e-04 132 1.320000e+00 2.735280e-04 133 1.330000e+00 2.763376e-04 134 1.340000e+00 2.791308e-04 135 1.350000e+00 2.819077e-04 136 1.360000e+00 2.846683e-04 137 1.370000e+00 2.874125e-04 138 1.380000e+00 2.901404e-04 139 1.390000e+00 2.928520e-04 140 1.400000e+00 2.955474e-04 141 1.410000e+00 2.982264e-04 142 1.420000e+00 3.008893e-04 143 1.430000e+00 3.035359e-04 144 1.440000e+00 3.061664e-04 145 1.450000e+00 3.087807e-04 146 1.460000e+00 3.113788e-04 147 1.470000e+00 3.139608e-04 148 1.480000e+00 3.165268e-04 149 1.490000e+00 3.190767e-04 150 1.500000e+00 3.216106e-04 151 0.000000e+00 1.412965e-11 152 1.000000e-02 1.868439e-11 153 2.000000e-02 2.691900e-11 154 3.000000e-02 3.714787e-11 155 4.000000e-02 5.125290e-11 156 5.000000e-02 7.069545e-11 157 6.000000e-02 9.748369e-11 158 7.000000e-02 1.343749e-10 159 8.000000e-02 1.851513e-10 160 9.000000e-02 2.549952e-10 161 1.000000e-01 3.509984e-10 162 1.100000e-01 4.828510e-10 163 1.200000e-01 6.637719e-10 164 1.300000e-01 9.117578e-10 165 1.400000e-01 1.251256e-09 166 1.500000e-01 1.715390e-09 167 1.600000e-01 2.348907e-09 168 1.700000e-01 3.212054e-09 169 1.800000e-01 4.385633e-09 170 1.900000e-01 5.977539e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 8.131134e-09 172 2.100000e-01 1.103584e-08 173 2.200000e-01 1.494041e-08 174 2.300000e-01 2.016920e-08 175 2.400000e-01 2.714203e-08 176 2.500000e-01 3.639779e-08 177 2.600000e-01 4.862215e-08 178 2.700000e-01 6.467955e-08 179 2.800000e-01 8.564949e-08 180 2.900000e-01 1.128671e-07 181 3.000000e-01 1.479685e-07 182 3.100000e-01 1.929409e-07 183 3.200000e-01 2.501785e-07 184 3.300000e-01 3.225462e-07 185 3.400000e-01 4.134518e-07 186 3.500000e-01 5.269298e-07 187 3.600000e-01 6.677368e-07 188 3.700000e-01 8.414599e-07 189 3.800000e-01 1.054632e-06 190 3.900000e-01 1.314850e-06 191 4.000000e-01 1.630874e-06 192 4.100000e-01 2.012700e-06 193 4.200000e-01 2.471565e-06 194 4.300000e-01 3.019864e-06 195 4.400000e-01 3.670941e-06 196 4.500000e-01 4.438738e-06 197 4.600000e-01 5.337287e-06 198 4.700000e-01 6.380076e-06 199 4.800000e-01 7.579326e-06 200 4.900000e-01 8.945277e-06 201 5.000000e-01 1.048555e-05 202 5.100000e-01 1.220469e-05 203 5.200000e-01 1.410395e-05 204 5.300000e-01 1.618128e-05 205 5.400000e-01 1.843163e-05 206 5.500000e-01 2.084730e-05 207 5.600000e-01 2.341855e-05 208 5.700000e-01 2.613410e-05 209 5.800000e-01 2.898174e-05 210 5.900000e-01 3.194880e-05 211 6.000000e-01 3.502262e-05 212 6.100000e-01 3.819081e-05 213 6.200000e-01 4.144161e-05 214 6.300000e-01 4.476398e-05 215 6.400000e-01 4.814773e-05 216 6.500000e-01 5.158359e-05 217 6.600000e-01 5.506319e-05 218 6.700000e-01 5.857906e-05 219 6.800000e-01 6.212456e-05 220 6.900000e-01 6.569384e-05 221 7.000000e-01 6.928175e-05 222 7.100000e-01 7.288380e-05 223 7.200000e-01 7.649608e-05 224 7.300000e-01 8.011519e-05 225 7.400000e-01 8.373817e-05 226 7.500000e-01 8.736247e-05 227 7.600000e-01 9.098586e-05 228 7.700000e-01 9.460644e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 9.822255e-05 230 7.900000e-01 1.018327e-04 231 8.000000e-01 1.054358e-04 232 8.100000e-01 1.090306e-04 233 8.200000e-01 1.126162e-04 234 8.300000e-01 1.161919e-04 235 8.400000e-01 1.197568e-04 236 8.500000e-01 1.233105e-04 237 8.600000e-01 1.268522e-04 238 8.700000e-01 1.303816e-04 239 8.800000e-01 1.338983e-04 240 8.900000e-01 1.374018e-04 241 9.000000e-01 1.408919e-04 242 9.100000e-01 1.443682e-04 243 9.200000e-01 1.478305e-04 244 9.300000e-01 1.512785e-04 245 9.400000e-01 1.547121e-04 246 9.500000e-01 1.581310e-04 247 9.600000e-01 1.615351e-04 248 9.700000e-01 1.649242e-04 249 9.800000e-01 1.682983e-04 250 9.900000e-01 1.716570e-04 251 1.000000e+00 1.750005e-04 252 1.010000e+00 1.783285e-04 253 1.020000e+00 1.816409e-04 254 1.030000e+00 1.849377e-04 255 1.040000e+00 1.882188e-04 256 1.050000e+00 1.914840e-04 257 1.060000e+00 1.947335e-04 258 1.070000e+00 1.979670e-04 259 1.080000e+00 2.011845e-04 260 1.090000e+00 2.043860e-04 261 1.100000e+00 2.075714e-04 262 1.110000e+00 2.107407e-04 263 1.120000e+00 2.138938e-04 264 1.130000e+00 2.170307e-04 265 1.140000e+00 2.201514e-04 266 1.150000e+00 2.232559e-04 267 1.160000e+00 2.263440e-04 268 1.170000e+00 2.294159e-04 269 1.180000e+00 2.324714e-04 270 1.190000e+00 2.355106e-04 271 1.200000e+00 2.385334e-04 272 1.210000e+00 2.415398e-04 273 1.220000e+00 2.445298e-04 274 1.230000e+00 2.475035e-04 275 1.240000e+00 2.504607e-04 276 1.250000e+00 2.534016e-04 277 1.260000e+00 2.563260e-04 278 1.270000e+00 2.592340e-04 279 1.280000e+00 2.621256e-04 280 1.290000e+00 2.650008e-04 281 1.300000e+00 2.678596e-04 282 1.310000e+00 2.707020e-04 283 1.320000e+00 2.735280e-04 284 1.330000e+00 2.763376e-04 285 1.340000e+00 2.791308e-04 286 1.350000e+00 2.819077e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 2.846683e-04 288 1.370000e+00 2.874125e-04 289 1.380000e+00 2.901404e-04 290 1.390000e+00 2.928520e-04 291 1.400000e+00 2.955474e-04 292 1.410000e+00 2.982264e-04 293 1.420000e+00 3.008893e-04 294 1.430000e+00 3.035359e-04 295 1.440000e+00 3.061664e-04 296 1.450000e+00 3.087807e-04 297 1.460000e+00 3.113788e-04 298 1.470000e+00 3.139608e-04 299 1.480000e+00 3.165268e-04 300 1.490000e+00 3.190767e-04 301 1.500000e+00 3.216106e-04 302 0.000000e+00 1.412965e-11 303 1.000000e-02 1.868439e-11 304 2.000000e-02 2.691900e-11 305 3.000000e-02 3.714787e-11 306 4.000000e-02 5.125290e-11 307 5.000000e-02 7.069545e-11 308 6.000000e-02 9.748369e-11 309 7.000000e-02 1.343749e-10 310 8.000000e-02 1.851513e-10 311 9.000000e-02 2.549952e-10 312 1.000000e-01 3.509984e-10 313 1.100000e-01 4.828510e-10 314 1.200000e-01 6.637719e-10 315 1.300000e-01 9.117578e-10 316 1.400000e-01 1.251256e-09 317 1.500000e-01 1.715390e-09 318 1.600000e-01 2.348907e-09 319 1.700000e-01 3.212054e-09 320 1.800000e-01 4.385633e-09 321 1.900000e-01 5.977539e-09 322 2.000000e-01 8.131134e-09 323 2.100000e-01 1.103584e-08 324 2.200000e-01 1.494041e-08 325 2.300000e-01 2.016920e-08 326 2.400000e-01 2.714203e-08 327 2.500000e-01 3.639779e-08 328 2.600000e-01 4.862215e-08 329 2.700000e-01 6.467955e-08 330 2.800000e-01 8.564949e-08 331 2.900000e-01 1.128671e-07 332 3.000000e-01 1.479685e-07 333 3.100000e-01 1.929409e-07 334 3.200000e-01 2.501785e-07 335 3.300000e-01 3.225462e-07 336 3.400000e-01 4.134518e-07 337 3.500000e-01 5.269298e-07 338 3.600000e-01 6.677368e-07 339 3.700000e-01 8.414599e-07 340 3.800000e-01 1.054632e-06 341 3.900000e-01 1.314850e-06 342 4.000000e-01 1.630874e-06 343 4.100000e-01 2.012700e-06 344 4.200000e-01 2.471565e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 3.019864e-06 346 4.400000e-01 3.670941e-06 347 4.500000e-01 4.438738e-06 348 4.600000e-01 5.337287e-06 349 4.700000e-01 6.380076e-06 350 4.800000e-01 7.579326e-06 351 4.900000e-01 8.945277e-06 352 5.000000e-01 1.048555e-05 353 5.100000e-01 1.220469e-05 354 5.200000e-01 1.410395e-05 355 5.300000e-01 1.618128e-05 356 5.400000e-01 1.843163e-05 357 5.500000e-01 2.084730e-05 358 5.600000e-01 2.341855e-05 359 5.700000e-01 2.613410e-05 360 5.800000e-01 2.898174e-05 361 5.900000e-01 3.194880e-05 362 6.000000e-01 3.502262e-05 363 6.100000e-01 3.819081e-05 364 6.200000e-01 4.144161e-05 365 6.300000e-01 4.476398e-05 366 6.400000e-01 4.814773e-05 367 6.500000e-01 5.158359e-05 368 6.600000e-01 5.506319e-05 369 6.700000e-01 5.857906e-05 370 6.800000e-01 6.212456e-05 371 6.900000e-01 6.569384e-05 372 7.000000e-01 6.928175e-05 373 7.100000e-01 7.288380e-05 374 7.200000e-01 7.649608e-05 375 7.300000e-01 8.011519e-05 376 7.400000e-01 8.373817e-05 377 7.500000e-01 8.736247e-05 378 7.600000e-01 9.098586e-05 379 7.700000e-01 9.460644e-05 380 7.800000e-01 9.822255e-05 381 7.900000e-01 1.018327e-04 382 8.000000e-01 1.054358e-04 383 8.100000e-01 1.090306e-04 384 8.200000e-01 1.126162e-04 385 8.300000e-01 1.161919e-04 386 8.400000e-01 1.197568e-04 387 8.500000e-01 1.233105e-04 388 8.600000e-01 1.268522e-04 389 8.700000e-01 1.303816e-04 390 8.800000e-01 1.338983e-04 391 8.900000e-01 1.374018e-04 392 9.000000e-01 1.408919e-04 393 9.100000e-01 1.443682e-04 394 9.200000e-01 1.478305e-04 395 9.300000e-01 1.512785e-04 396 9.400000e-01 1.547121e-04 397 9.500000e-01 1.581310e-04 398 9.600000e-01 1.615351e-04 399 9.700000e-01 1.649242e-04 400 9.800000e-01 1.682983e-04 401 9.900000e-01 1.716570e-04 402 1.000000e+00 1.750005e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.783285e-04 404 1.020000e+00 1.816409e-04 405 1.030000e+00 1.849377e-04 406 1.040000e+00 1.882188e-04 407 1.050000e+00 1.914840e-04 408 1.060000e+00 1.947335e-04 409 1.070000e+00 1.979670e-04 410 1.080000e+00 2.011845e-04 411 1.090000e+00 2.043860e-04 412 1.100000e+00 2.075714e-04 413 1.110000e+00 2.107407e-04 414 1.120000e+00 2.138938e-04 415 1.130000e+00 2.170307e-04 416 1.140000e+00 2.201514e-04 417 1.150000e+00 2.232559e-04 418 1.160000e+00 2.263440e-04 419 1.170000e+00 2.294159e-04 420 1.180000e+00 2.324714e-04 421 1.190000e+00 2.355106e-04 422 1.200000e+00 2.385334e-04 423 1.210000e+00 2.415398e-04 424 1.220000e+00 2.445298e-04 425 1.230000e+00 2.475035e-04 426 1.240000e+00 2.504607e-04 427 1.250000e+00 2.534016e-04 428 1.260000e+00 2.563260e-04 429 1.270000e+00 2.592340e-04 430 1.280000e+00 2.621256e-04 431 1.290000e+00 2.650008e-04 432 1.300000e+00 2.678596e-04 433 1.310000e+00 2.707020e-04 434 1.320000e+00 2.735280e-04 435 1.330000e+00 2.763376e-04 436 1.340000e+00 2.791308e-04 437 1.350000e+00 2.819077e-04 438 1.360000e+00 2.846683e-04 439 1.370000e+00 2.874125e-04 440 1.380000e+00 2.901404e-04 441 1.390000e+00 2.928520e-04 442 1.400000e+00 2.955474e-04 443 1.410000e+00 2.982264e-04 444 1.420000e+00 3.008893e-04 445 1.430000e+00 3.035359e-04 446 1.440000e+00 3.061664e-04 447 1.450000e+00 3.087807e-04 448 1.460000e+00 3.113788e-04 449 1.470000e+00 3.139608e-04 450 1.480000e+00 3.165268e-04 451 1.490000e+00 3.190767e-04 452 1.500000e+00 3.216106e-04 453 0.000000e+00 1.412965e-11 454 1.000000e-02 1.868439e-11 455 2.000000e-02 2.691900e-11 456 3.000000e-02 3.714787e-11 457 4.000000e-02 5.125290e-11 458 5.000000e-02 7.069545e-11 459 6.000000e-02 9.748369e-11 460 7.000000e-02 1.343749e-10 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 1.851513e-10 462 9.000000e-02 2.549952e-10 463 1.000000e-01 3.509984e-10 464 1.100000e-01 4.828510e-10 465 1.200000e-01 6.637719e-10 466 1.300000e-01 9.117578e-10 467 1.400000e-01 1.251256e-09 468 1.500000e-01 1.715390e-09 469 1.600000e-01 2.348907e-09 470 1.700000e-01 3.212054e-09 471 1.800000e-01 4.385633e-09 472 1.900000e-01 5.977539e-09 473 2.000000e-01 8.131134e-09 474 2.100000e-01 1.103584e-08 475 2.200000e-01 1.494041e-08 476 2.300000e-01 2.016920e-08 477 2.400000e-01 2.714203e-08 478 2.500000e-01 3.639779e-08 479 2.600000e-01 4.862215e-08 480 2.700000e-01 6.467955e-08 481 2.800000e-01 8.564949e-08 482 2.900000e-01 1.128671e-07 483 3.000000e-01 1.479685e-07 484 3.100000e-01 1.929409e-07 485 3.200000e-01 2.501785e-07 486 3.300000e-01 3.225462e-07 487 3.400000e-01 4.134518e-07 488 3.500000e-01 5.269298e-07 489 3.600000e-01 6.677368e-07 490 3.700000e-01 8.414599e-07 491 3.800000e-01 1.054632e-06 492 3.900000e-01 1.314850e-06 493 4.000000e-01 1.630874e-06 494 4.100000e-01 2.012700e-06 495 4.200000e-01 2.471565e-06 496 4.300000e-01 3.019864e-06 497 4.400000e-01 3.670941e-06 498 4.500000e-01 4.438738e-06 499 4.600000e-01 5.337287e-06 500 4.700000e-01 6.380076e-06 501 4.800000e-01 7.579326e-06 502 4.900000e-01 8.945277e-06 503 5.000000e-01 1.048555e-05 504 5.100000e-01 1.220469e-05 505 5.200000e-01 1.410395e-05 506 5.300000e-01 1.618128e-05 507 5.400000e-01 1.843163e-05 508 5.500000e-01 2.084730e-05 509 5.600000e-01 2.341855e-05 510 5.700000e-01 2.613410e-05 511 5.800000e-01 2.898174e-05 512 5.900000e-01 3.194880e-05 513 6.000000e-01 3.502262e-05 514 6.100000e-01 3.819081e-05 515 6.200000e-01 4.144161e-05 516 6.300000e-01 4.476398e-05 517 6.400000e-01 4.814773e-05 518 6.500000e-01 5.158359e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 5.506319e-05 520 6.700000e-01 5.857906e-05 521 6.800000e-01 6.212456e-05 522 6.900000e-01 6.569384e-05 523 7.000000e-01 6.928175e-05 524 7.100000e-01 7.288380e-05 525 7.200000e-01 7.649608e-05 526 7.300000e-01 8.011519e-05 527 7.400000e-01 8.373817e-05 528 7.500000e-01 8.736247e-05 529 7.600000e-01 9.098586e-05 530 7.700000e-01 9.460644e-05 531 7.800000e-01 9.822255e-05 532 7.900000e-01 1.018327e-04 533 8.000000e-01 1.054358e-04 534 8.100000e-01 1.090306e-04 535 8.200000e-01 1.126162e-04 536 8.300000e-01 1.161919e-04 537 8.400000e-01 1.197568e-04 538 8.500000e-01 1.233105e-04 539 8.600000e-01 1.268522e-04 540 8.700000e-01 1.303816e-04 541 8.800000e-01 1.338983e-04 542 8.900000e-01 1.374018e-04 543 9.000000e-01 1.408919e-04 544 9.100000e-01 1.443682e-04 545 9.200000e-01 1.478305e-04 546 9.300000e-01 1.512785e-04 547 9.400000e-01 1.547121e-04 548 9.500000e-01 1.581310e-04 549 9.600000e-01 1.615351e-04 550 9.700000e-01 1.649242e-04 551 9.800000e-01 1.682983e-04 552 9.900000e-01 1.716570e-04 553 1.000000e+00 1.750005e-04 554 1.010000e+00 1.783285e-04 555 1.020000e+00 1.816409e-04 556 1.030000e+00 1.849377e-04 557 1.040000e+00 1.882188e-04 558 1.050000e+00 1.914840e-04 559 1.060000e+00 1.947335e-04 560 1.070000e+00 1.979670e-04 561 1.080000e+00 2.011845e-04 562 1.090000e+00 2.043860e-04 563 1.100000e+00 2.075714e-04 564 1.110000e+00 2.107407e-04 565 1.120000e+00 2.138938e-04 566 1.130000e+00 2.170307e-04 567 1.140000e+00 2.201514e-04 568 1.150000e+00 2.232559e-04 569 1.160000e+00 2.263440e-04 570 1.170000e+00 2.294159e-04 571 1.180000e+00 2.324714e-04 572 1.190000e+00 2.355106e-04 573 1.200000e+00 2.385334e-04 574 1.210000e+00 2.415398e-04 575 1.220000e+00 2.445298e-04 576 1.230000e+00 2.475035e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 2.504607e-04 578 1.250000e+00 2.534016e-04 579 1.260000e+00 2.563260e-04 580 1.270000e+00 2.592340e-04 581 1.280000e+00 2.621256e-04 582 1.290000e+00 2.650008e-04 583 1.300000e+00 2.678596e-04 584 1.310000e+00 2.707020e-04 585 1.320000e+00 2.735280e-04 586 1.330000e+00 2.763376e-04 587 1.340000e+00 2.791308e-04 588 1.350000e+00 2.819077e-04 589 1.360000e+00 2.846683e-04 590 1.370000e+00 2.874125e-04 591 1.380000e+00 2.901404e-04 592 1.390000e+00 2.928520e-04 593 1.400000e+00 2.955474e-04 594 1.410000e+00 2.982264e-04 595 1.420000e+00 3.008893e-04 596 1.430000e+00 3.035359e-04 597 1.440000e+00 3.061664e-04 598 1.450000e+00 3.087807e-04 599 1.460000e+00 3.113788e-04 600 1.470000e+00 3.139608e-04 601 1.480000e+00 3.165268e-04 602 1.490000e+00 3.190767e-04 603 1.500000e+00 3.216106e-04 604 0.000000e+00 1.412965e-11 605 1.000000e-02 1.868439e-11 606 2.000000e-02 2.691900e-11 607 3.000000e-02 3.714787e-11 608 4.000000e-02 5.125290e-11 609 5.000000e-02 7.069545e-11 610 6.000000e-02 9.748369e-11 611 7.000000e-02 1.343749e-10 612 8.000000e-02 1.851513e-10 613 9.000000e-02 2.549952e-10 614 1.000000e-01 3.509984e-10 615 1.100000e-01 4.828510e-10 616 1.200000e-01 6.637719e-10 617 1.300000e-01 9.117578e-10 618 1.400000e-01 1.251256e-09 619 1.500000e-01 1.715390e-09 620 1.600000e-01 2.348907e-09 621 1.700000e-01 3.212054e-09 622 1.800000e-01 4.385633e-09 623 1.900000e-01 5.977539e-09 624 2.000000e-01 8.131134e-09 625 2.100000e-01 1.103584e-08 626 2.200000e-01 1.494041e-08 627 2.300000e-01 2.016920e-08 628 2.400000e-01 2.714203e-08 629 2.500000e-01 3.639779e-08 630 2.600000e-01 4.862215e-08 631 2.700000e-01 6.467955e-08 632 2.800000e-01 8.564949e-08 633 2.900000e-01 1.128671e-07 634 3.000000e-01 1.479685e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 1.929409e-07 636 3.200000e-01 2.501785e-07 637 3.300000e-01 3.225462e-07 638 3.400000e-01 4.134518e-07 639 3.500000e-01 5.269298e-07 640 3.600000e-01 6.677368e-07 641 3.700000e-01 8.414599e-07 642 3.800000e-01 1.054632e-06 643 3.900000e-01 1.314850e-06 644 4.000000e-01 1.630874e-06 645 4.100000e-01 2.012700e-06 646 4.200000e-01 2.471565e-06 647 4.300000e-01 3.019864e-06 648 4.400000e-01 3.670941e-06 649 4.500000e-01 4.438738e-06 650 4.600000e-01 5.337287e-06 651 4.700000e-01 6.380076e-06 652 4.800000e-01 7.579326e-06 653 4.900000e-01 8.945277e-06 654 5.000000e-01 1.048555e-05 655 5.100000e-01 1.220469e-05 656 5.200000e-01 1.410395e-05 657 5.300000e-01 1.618128e-05 658 5.400000e-01 1.843163e-05 659 5.500000e-01 2.084730e-05 660 5.600000e-01 2.341855e-05 661 5.700000e-01 2.613410e-05 662 5.800000e-01 2.898174e-05 663 5.900000e-01 3.194880e-05 664 6.000000e-01 3.502262e-05 665 6.100000e-01 3.819081e-05 666 6.200000e-01 4.144161e-05 667 6.300000e-01 4.476398e-05 668 6.400000e-01 4.814773e-05 669 6.500000e-01 5.158359e-05 670 6.600000e-01 5.506319e-05 671 6.700000e-01 5.857906e-05 672 6.800000e-01 6.212456e-05 673 6.900000e-01 6.569384e-05 674 7.000000e-01 6.928175e-05 675 7.100000e-01 7.288380e-05 676 7.200000e-01 7.649608e-05 677 7.300000e-01 8.011519e-05 678 7.400000e-01 8.373817e-05 679 7.500000e-01 8.736247e-05 680 7.600000e-01 9.098586e-05 681 7.700000e-01 9.460644e-05 682 7.800000e-01 9.822255e-05 683 7.900000e-01 1.018327e-04 684 8.000000e-01 1.054358e-04 685 8.100000e-01 1.090306e-04 686 8.200000e-01 1.126162e-04 687 8.300000e-01 1.161919e-04 688 8.400000e-01 1.197568e-04 689 8.500000e-01 1.233105e-04 690 8.600000e-01 1.268522e-04 691 8.700000e-01 1.303816e-04 692 8.800000e-01 1.338983e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.374018e-04 694 9.000000e-01 1.408919e-04 695 9.100000e-01 1.443682e-04 696 9.200000e-01 1.478305e-04 697 9.300000e-01 1.512785e-04 698 9.400000e-01 1.547121e-04 699 9.500000e-01 1.581310e-04 700 9.600000e-01 1.615351e-04 701 9.700000e-01 1.649242e-04 702 9.800000e-01 1.682983e-04 703 9.900000e-01 1.716570e-04 704 1.000000e+00 1.750005e-04 705 1.010000e+00 1.783285e-04 706 1.020000e+00 1.816409e-04 707 1.030000e+00 1.849377e-04 708 1.040000e+00 1.882188e-04 709 1.050000e+00 1.914840e-04 710 1.060000e+00 1.947335e-04 711 1.070000e+00 1.979670e-04 712 1.080000e+00 2.011845e-04 713 1.090000e+00 2.043860e-04 714 1.100000e+00 2.075714e-04 715 1.110000e+00 2.107407e-04 716 1.120000e+00 2.138938e-04 717 1.130000e+00 2.170307e-04 718 1.140000e+00 2.201514e-04 719 1.150000e+00 2.232559e-04 720 1.160000e+00 2.263440e-04 721 1.170000e+00 2.294159e-04 722 1.180000e+00 2.324714e-04 723 1.190000e+00 2.355106e-04 724 1.200000e+00 2.385334e-04 725 1.210000e+00 2.415398e-04 726 1.220000e+00 2.445298e-04 727 1.230000e+00 2.475035e-04 728 1.240000e+00 2.504607e-04 729 1.250000e+00 2.534016e-04 730 1.260000e+00 2.563260e-04 731 1.270000e+00 2.592340e-04 732 1.280000e+00 2.621256e-04 733 1.290000e+00 2.650008e-04 734 1.300000e+00 2.678596e-04 735 1.310000e+00 2.707020e-04 736 1.320000e+00 2.735280e-04 737 1.330000e+00 2.763376e-04 738 1.340000e+00 2.791308e-04 739 1.350000e+00 2.819077e-04 740 1.360000e+00 2.846683e-04 741 1.370000e+00 2.874125e-04 742 1.380000e+00 2.901404e-04 743 1.390000e+00 2.928520e-04 744 1.400000e+00 2.955474e-04 745 1.410000e+00 2.982264e-04 746 1.420000e+00 3.008893e-04 747 1.430000e+00 3.035359e-04 748 1.440000e+00 3.061664e-04 749 1.450000e+00 3.087807e-04 750 1.460000e+00 3.113788e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 3.139608e-04 752 1.480000e+00 3.165268e-04 753 1.490000e+00 3.190767e-04 754 1.500000e+00 3.216106e-04 755 0.000000e+00 1.412965e-11 756 1.000000e-02 1.868439e-11 757 2.000000e-02 2.691900e-11 758 3.000000e-02 3.714787e-11 759 4.000000e-02 5.125290e-11 760 5.000000e-02 7.069545e-11 761 6.000000e-02 9.748369e-11 762 7.000000e-02 1.343749e-10 763 8.000000e-02 1.851513e-10 764 9.000000e-02 2.549952e-10 765 1.000000e-01 3.509984e-10 766 1.100000e-01 4.828510e-10 767 1.200000e-01 6.637719e-10 768 1.300000e-01 9.117578e-10 769 1.400000e-01 1.251256e-09 770 1.500000e-01 1.715390e-09 771 1.600000e-01 2.348907e-09 772 1.700000e-01 3.212054e-09 773 1.800000e-01 4.385633e-09 774 1.900000e-01 5.977539e-09 775 2.000000e-01 8.131134e-09 776 2.100000e-01 1.103584e-08 777 2.200000e-01 1.494041e-08 778 2.300000e-01 2.016920e-08 779 2.400000e-01 2.714203e-08 780 2.500000e-01 3.639779e-08 781 2.600000e-01 4.862215e-08 782 2.700000e-01 6.467955e-08 783 2.800000e-01 8.564949e-08 784 2.900000e-01 1.128671e-07 785 3.000000e-01 1.479685e-07 786 3.100000e-01 1.929409e-07 787 3.200000e-01 2.501785e-07 788 3.300000e-01 3.225462e-07 789 3.400000e-01 4.134518e-07 790 3.500000e-01 5.269298e-07 791 3.600000e-01 6.677368e-07 792 3.700000e-01 8.414599e-07 793 3.800000e-01 1.054632e-06 794 3.900000e-01 1.314850e-06 795 4.000000e-01 1.630874e-06 796 4.100000e-01 2.012700e-06 797 4.200000e-01 2.471565e-06 798 4.300000e-01 3.019864e-06 799 4.400000e-01 3.670941e-06 800 4.500000e-01 4.438738e-06 801 4.600000e-01 5.337287e-06 802 4.700000e-01 6.380076e-06 803 4.800000e-01 7.579326e-06 804 4.900000e-01 8.945277e-06 805 5.000000e-01 1.048555e-05 806 5.100000e-01 1.220469e-05 807 5.200000e-01 1.410395e-05 808 5.300000e-01 1.618128e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 1.843163e-05 810 5.500000e-01 2.084730e-05 811 5.600000e-01 2.341855e-05 812 5.700000e-01 2.613410e-05 813 5.800000e-01 2.898174e-05 814 5.900000e-01 3.194880e-05 815 6.000000e-01 3.502262e-05 816 6.100000e-01 3.819081e-05 817 6.200000e-01 4.144161e-05 818 6.300000e-01 4.476398e-05 819 6.400000e-01 4.814773e-05 820 6.500000e-01 5.158359e-05 821 6.600000e-01 5.506319e-05 822 6.700000e-01 5.857906e-05 823 6.800000e-01 6.212456e-05 824 6.900000e-01 6.569384e-05 825 7.000000e-01 6.928175e-05 826 7.100000e-01 7.288380e-05 827 7.200000e-01 7.649608e-05 828 7.300000e-01 8.011519e-05 829 7.400000e-01 8.373817e-05 830 7.500000e-01 8.736247e-05 831 7.600000e-01 9.098586e-05 832 7.700000e-01 9.460644e-05 833 7.800000e-01 9.822255e-05 834 7.900000e-01 1.018327e-04 835 8.000000e-01 1.054358e-04 836 8.100000e-01 1.090306e-04 837 8.200000e-01 1.126162e-04 838 8.300000e-01 1.161919e-04 839 8.400000e-01 1.197568e-04 840 8.500000e-01 1.233105e-04 841 8.600000e-01 1.268522e-04 842 8.700000e-01 1.303816e-04 843 8.800000e-01 1.338983e-04 844 8.900000e-01 1.374018e-04 845 9.000000e-01 1.408919e-04 846 9.100000e-01 1.443682e-04 847 9.200000e-01 1.478305e-04 848 9.300000e-01 1.512785e-04 849 9.400000e-01 1.547121e-04 850 9.500000e-01 1.581310e-04 851 9.600000e-01 1.615351e-04 852 9.700000e-01 1.649242e-04 853 9.800000e-01 1.682983e-04 854 9.900000e-01 1.716570e-04 855 1.000000e+00 1.750005e-04 856 1.010000e+00 1.783285e-04 857 1.020000e+00 1.816409e-04 858 1.030000e+00 1.849377e-04 859 1.040000e+00 1.882188e-04 860 1.050000e+00 1.914840e-04 861 1.060000e+00 1.947335e-04 862 1.070000e+00 1.979670e-04 863 1.080000e+00 2.011845e-04 864 1.090000e+00 2.043860e-04 865 1.100000e+00 2.075714e-04 866 1.110000e+00 2.107407e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 2.138938e-04 868 1.130000e+00 2.170307e-04 869 1.140000e+00 2.201514e-04 870 1.150000e+00 2.232559e-04 871 1.160000e+00 2.263440e-04 872 1.170000e+00 2.294159e-04 873 1.180000e+00 2.324714e-04 874 1.190000e+00 2.355106e-04 875 1.200000e+00 2.385334e-04 876 1.210000e+00 2.415398e-04 877 1.220000e+00 2.445298e-04 878 1.230000e+00 2.475035e-04 879 1.240000e+00 2.504607e-04 880 1.250000e+00 2.534016e-04 881 1.260000e+00 2.563260e-04 882 1.270000e+00 2.592340e-04 883 1.280000e+00 2.621256e-04 884 1.290000e+00 2.650008e-04 885 1.300000e+00 2.678596e-04 886 1.310000e+00 2.707020e-04 887 1.320000e+00 2.735280e-04 888 1.330000e+00 2.763376e-04 889 1.340000e+00 2.791308e-04 890 1.350000e+00 2.819077e-04 891 1.360000e+00 2.846683e-04 892 1.370000e+00 2.874125e-04 893 1.380000e+00 2.901404e-04 894 1.390000e+00 2.928520e-04 895 1.400000e+00 2.955474e-04 896 1.410000e+00 2.982264e-04 897 1.420000e+00 3.008893e-04 898 1.430000e+00 3.035359e-04 899 1.440000e+00 3.061664e-04 900 1.450000e+00 3.087807e-04 901 1.460000e+00 3.113788e-04 902 1.470000e+00 3.139608e-04 903 1.480000e+00 3.165268e-04 904 1.490000e+00 3.190767e-04 905 1.500000e+00 3.216106e-04 906 0.000000e+00 1.412965e-11 907 1.000000e-02 1.868439e-11 908 2.000000e-02 2.691900e-11 909 3.000000e-02 3.714787e-11 910 4.000000e-02 5.125290e-11 911 5.000000e-02 7.069545e-11 912 6.000000e-02 9.748369e-11 913 7.000000e-02 1.343749e-10 914 8.000000e-02 1.851513e-10 915 9.000000e-02 2.549952e-10 916 1.000000e-01 3.509984e-10 917 1.100000e-01 4.828510e-10 918 1.200000e-01 6.637719e-10 919 1.300000e-01 9.117578e-10 920 1.400000e-01 1.251256e-09 921 1.500000e-01 1.715390e-09 922 1.600000e-01 2.348907e-09 923 1.700000e-01 3.212054e-09 924 1.800000e-01 4.385633e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 5.977539e-09 926 2.000000e-01 8.131134e-09 927 2.100000e-01 1.103584e-08 928 2.200000e-01 1.494041e-08 929 2.300000e-01 2.016920e-08 930 2.400000e-01 2.714203e-08 931 2.500000e-01 3.639779e-08 932 2.600000e-01 4.862215e-08 933 2.700000e-01 6.467955e-08 934 2.800000e-01 8.564949e-08 935 2.900000e-01 1.128671e-07 936 3.000000e-01 1.479685e-07 937 3.100000e-01 1.929409e-07 938 3.200000e-01 2.501785e-07 939 3.300000e-01 3.225462e-07 940 3.400000e-01 4.134518e-07 941 3.500000e-01 5.269298e-07 942 3.600000e-01 6.677368e-07 943 3.700000e-01 8.414599e-07 944 3.800000e-01 1.054632e-06 945 3.900000e-01 1.314850e-06 946 4.000000e-01 1.630874e-06 947 4.100000e-01 2.012700e-06 948 4.200000e-01 2.471565e-06 949 4.300000e-01 3.019864e-06 950 4.400000e-01 3.670941e-06 951 4.500000e-01 4.438738e-06 952 4.600000e-01 5.337287e-06 953 4.700000e-01 6.380076e-06 954 4.800000e-01 7.579326e-06 955 4.900000e-01 8.945277e-06 956 5.000000e-01 1.048555e-05 957 5.100000e-01 1.220469e-05 958 5.200000e-01 1.410395e-05 959 5.300000e-01 1.618128e-05 960 5.400000e-01 1.843163e-05 961 5.500000e-01 2.084730e-05 962 5.600000e-01 2.341855e-05 963 5.700000e-01 2.613410e-05 964 5.800000e-01 2.898174e-05 965 5.900000e-01 3.194880e-05 966 6.000000e-01 3.502262e-05 967 6.100000e-01 3.819081e-05 968 6.200000e-01 4.144161e-05 969 6.300000e-01 4.476398e-05 970 6.400000e-01 4.814773e-05 971 6.500000e-01 5.158359e-05 972 6.600000e-01 5.506319e-05 973 6.700000e-01 5.857906e-05 974 6.800000e-01 6.212456e-05 975 6.900000e-01 6.569384e-05 976 7.000000e-01 6.928175e-05 977 7.100000e-01 7.288380e-05 978 7.200000e-01 7.649608e-05 979 7.300000e-01 8.011519e-05 980 7.400000e-01 8.373817e-05 981 7.500000e-01 8.736247e-05 982 7.600000e-01 9.098586e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 9.460644e-05 984 7.800000e-01 9.822255e-05 985 7.900000e-01 1.018327e-04 986 8.000000e-01 1.054358e-04 987 8.100000e-01 1.090306e-04 988 8.200000e-01 1.126162e-04 989 8.300000e-01 1.161919e-04 990 8.400000e-01 1.197568e-04 991 8.500000e-01 1.233105e-04 992 8.600000e-01 1.268522e-04 993 8.700000e-01 1.303816e-04 994 8.800000e-01 1.338983e-04 995 8.900000e-01 1.374018e-04 996 9.000000e-01 1.408919e-04 997 9.100000e-01 1.443682e-04 998 9.200000e-01 1.478305e-04 999 9.300000e-01 1.512785e-04 1000 9.400000e-01 1.547121e-04 1001 9.500000e-01 1.581310e-04 1002 9.600000e-01 1.615351e-04 1003 9.700000e-01 1.649242e-04 1004 9.800000e-01 1.682983e-04 1005 9.900000e-01 1.716570e-04 1006 1.000000e+00 1.750005e-04 1007 1.010000e+00 1.783285e-04 1008 1.020000e+00 1.816409e-04 1009 1.030000e+00 1.849377e-04 1010 1.040000e+00 1.882188e-04 1011 1.050000e+00 1.914840e-04 1012 1.060000e+00 1.947335e-04 1013 1.070000e+00 1.979670e-04 1014 1.080000e+00 2.011845e-04 1015 1.090000e+00 2.043860e-04 1016 1.100000e+00 2.075714e-04 1017 1.110000e+00 2.107407e-04 1018 1.120000e+00 2.138938e-04 1019 1.130000e+00 2.170307e-04 1020 1.140000e+00 2.201514e-04 1021 1.150000e+00 2.232559e-04 1022 1.160000e+00 2.263440e-04 1023 1.170000e+00 2.294159e-04 1024 1.180000e+00 2.324714e-04 1025 1.190000e+00 2.355106e-04 1026 1.200000e+00 2.385334e-04 1027 1.210000e+00 2.415398e-04 1028 1.220000e+00 2.445298e-04 1029 1.230000e+00 2.475035e-04 1030 1.240000e+00 2.504607e-04 1031 1.250000e+00 2.534016e-04 1032 1.260000e+00 2.563260e-04 1033 1.270000e+00 2.592340e-04 1034 1.280000e+00 2.621256e-04 1035 1.290000e+00 2.650008e-04 1036 1.300000e+00 2.678596e-04 1037 1.310000e+00 2.707020e-04 1038 1.320000e+00 2.735280e-04 1039 1.330000e+00 2.763376e-04 1040 1.340000e+00 2.791308e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 2.819077e-04 1042 1.360000e+00 2.846683e-04 1043 1.370000e+00 2.874125e-04 1044 1.380000e+00 2.901404e-04 1045 1.390000e+00 2.928520e-04 1046 1.400000e+00 2.955474e-04 1047 1.410000e+00 2.982264e-04 1048 1.420000e+00 3.008893e-04 1049 1.430000e+00 3.035359e-04 1050 1.440000e+00 3.061664e-04 1051 1.450000e+00 3.087807e-04 1052 1.460000e+00 3.113788e-04 1053 1.470000e+00 3.139608e-04 1054 1.480000e+00 3.165268e-04 1055 1.490000e+00 3.190767e-04 1056 1.500000e+00 3.216106e-04 1057 0.000000e+00 1.412965e-11 1058 1.000000e-02 1.868439e-11 1059 2.000000e-02 2.691900e-11 1060 3.000000e-02 3.714787e-11 1061 4.000000e-02 5.125290e-11 1062 5.000000e-02 7.069545e-11 1063 6.000000e-02 9.748369e-11 1064 7.000000e-02 1.343749e-10 1065 8.000000e-02 1.851513e-10 1066 9.000000e-02 2.549952e-10 1067 1.000000e-01 3.509984e-10 1068 1.100000e-01 4.828510e-10 1069 1.200000e-01 6.637719e-10 1070 1.300000e-01 9.117578e-10 1071 1.400000e-01 1.251256e-09 1072 1.500000e-01 1.715390e-09 1073 1.600000e-01 2.348907e-09 1074 1.700000e-01 3.212054e-09 1075 1.800000e-01 4.385633e-09 1076 1.900000e-01 5.977539e-09 1077 2.000000e-01 8.131134e-09 1078 2.100000e-01 1.103584e-08 1079 2.200000e-01 1.494041e-08 1080 2.300000e-01 2.016920e-08 1081 2.400000e-01 2.714203e-08 1082 2.500000e-01 3.639779e-08 1083 2.600000e-01 4.862215e-08 1084 2.700000e-01 6.467955e-08 1085 2.800000e-01 8.564949e-08 1086 2.900000e-01 1.128671e-07 1087 3.000000e-01 1.479685e-07 1088 3.100000e-01 1.929409e-07 1089 3.200000e-01 2.501785e-07 1090 3.300000e-01 3.225462e-07 1091 3.400000e-01 4.134518e-07 1092 3.500000e-01 5.269298e-07 1093 3.600000e-01 6.677368e-07 1094 3.700000e-01 8.414599e-07 1095 3.800000e-01 1.054632e-06 1096 3.900000e-01 1.314850e-06 1097 4.000000e-01 1.630874e-06 1098 4.100000e-01 2.012700e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 2.471565e-06 1100 4.300000e-01 3.019864e-06 1101 4.400000e-01 3.670941e-06 1102 4.500000e-01 4.438738e-06 1103 4.600000e-01 5.337287e-06 1104 4.700000e-01 6.380076e-06 1105 4.800000e-01 7.579326e-06 1106 4.900000e-01 8.945277e-06 1107 5.000000e-01 1.048555e-05 1108 5.100000e-01 1.220469e-05 1109 5.200000e-01 1.410395e-05 1110 5.300000e-01 1.618128e-05 1111 5.400000e-01 1.843163e-05 1112 5.500000e-01 2.084730e-05 1113 5.600000e-01 2.341855e-05 1114 5.700000e-01 2.613410e-05 1115 5.800000e-01 2.898174e-05 1116 5.900000e-01 3.194880e-05 1117 6.000000e-01 3.502262e-05 1118 6.100000e-01 3.819081e-05 1119 6.200000e-01 4.144161e-05 1120 6.300000e-01 4.476398e-05 1121 6.400000e-01 4.814773e-05 1122 6.500000e-01 5.158359e-05 1123 6.600000e-01 5.506319e-05 1124 6.700000e-01 5.857906e-05 1125 6.800000e-01 6.212456e-05 1126 6.900000e-01 6.569384e-05 1127 7.000000e-01 6.928175e-05 1128 7.100000e-01 7.288380e-05 1129 7.200000e-01 7.649608e-05 1130 7.300000e-01 8.011519e-05 1131 7.400000e-01 8.373817e-05 1132 7.500000e-01 8.736247e-05 1133 7.600000e-01 9.098586e-05 1134 7.700000e-01 9.460644e-05 1135 7.800000e-01 9.822255e-05 1136 7.900000e-01 1.018327e-04 1137 8.000000e-01 1.054358e-04 1138 8.100000e-01 1.090306e-04 1139 8.200000e-01 1.126162e-04 1140 8.300000e-01 1.161919e-04 1141 8.400000e-01 1.197568e-04 1142 8.500000e-01 1.233105e-04 1143 8.600000e-01 1.268522e-04 1144 8.700000e-01 1.303816e-04 1145 8.800000e-01 1.338983e-04 1146 8.900000e-01 1.374018e-04 1147 9.000000e-01 1.408919e-04 1148 9.100000e-01 1.443682e-04 1149 9.200000e-01 1.478305e-04 1150 9.300000e-01 1.512785e-04 1151 9.400000e-01 1.547121e-04 1152 9.500000e-01 1.581310e-04 1153 9.600000e-01 1.615351e-04 1154 9.700000e-01 1.649242e-04 1155 9.800000e-01 1.682983e-04 1156 9.900000e-01 1.716570e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 1.750005e-04 1158 1.010000e+00 1.783285e-04 1159 1.020000e+00 1.816409e-04 1160 1.030000e+00 1.849377e-04 1161 1.040000e+00 1.882188e-04 1162 1.050000e+00 1.914840e-04 1163 1.060000e+00 1.947335e-04 1164 1.070000e+00 1.979670e-04 1165 1.080000e+00 2.011845e-04 1166 1.090000e+00 2.043860e-04 1167 1.100000e+00 2.075714e-04 1168 1.110000e+00 2.107407e-04 1169 1.120000e+00 2.138938e-04 1170 1.130000e+00 2.170307e-04 1171 1.140000e+00 2.201514e-04 1172 1.150000e+00 2.232559e-04 1173 1.160000e+00 2.263440e-04 1174 1.170000e+00 2.294159e-04 1175 1.180000e+00 2.324714e-04 1176 1.190000e+00 2.355106e-04 1177 1.200000e+00 2.385334e-04 1178 1.210000e+00 2.415398e-04 1179 1.220000e+00 2.445298e-04 1180 1.230000e+00 2.475035e-04 1181 1.240000e+00 2.504607e-04 1182 1.250000e+00 2.534016e-04 1183 1.260000e+00 2.563260e-04 1184 1.270000e+00 2.592340e-04 1185 1.280000e+00 2.621256e-04 1186 1.290000e+00 2.650008e-04 1187 1.300000e+00 2.678596e-04 1188 1.310000e+00 2.707020e-04 1189 1.320000e+00 2.735280e-04 1190 1.330000e+00 2.763376e-04 1191 1.340000e+00 2.791308e-04 1192 1.350000e+00 2.819077e-04 1193 1.360000e+00 2.846683e-04 1194 1.370000e+00 2.874125e-04 1195 1.380000e+00 2.901404e-04 1196 1.390000e+00 2.928520e-04 1197 1.400000e+00 2.955474e-04 1198 1.410000e+00 2.982264e-04 1199 1.420000e+00 3.008893e-04 1200 1.430000e+00 3.035359e-04 1201 1.440000e+00 3.061664e-04 1202 1.450000e+00 3.087807e-04 1203 1.460000e+00 3.113788e-04 1204 1.470000e+00 3.139608e-04 1205 1.480000e+00 3.165268e-04 1206 1.490000e+00 3.190767e-04 1207 1.500000e+00 3.216106e-04 1208 0.000000e+00 1.412965e-11 1209 1.000000e-02 1.868439e-11 1210 2.000000e-02 2.691900e-11 1211 3.000000e-02 3.714787e-11 1212 4.000000e-02 5.125290e-11 1213 5.000000e-02 7.069545e-11 1214 6.000000e-02 9.748369e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 1.343749e-10 1216 8.000000e-02 1.851513e-10 1217 9.000000e-02 2.549952e-10 1218 1.000000e-01 3.509984e-10 1219 1.100000e-01 4.828510e-10 1220 1.200000e-01 6.637719e-10 1221 1.300000e-01 9.117578e-10 1222 1.400000e-01 1.251256e-09 1223 1.500000e-01 1.715390e-09 1224 1.600000e-01 2.348907e-09 1225 1.700000e-01 3.212054e-09 1226 1.800000e-01 4.385633e-09 1227 1.900000e-01 5.977539e-09 1228 2.000000e-01 8.131134e-09 1229 2.100000e-01 1.103584e-08 1230 2.200000e-01 1.494041e-08 1231 2.300000e-01 2.016920e-08 1232 2.400000e-01 2.714203e-08 1233 2.500000e-01 3.639779e-08 1234 2.600000e-01 4.862215e-08 1235 2.700000e-01 6.467955e-08 1236 2.800000e-01 8.564949e-08 1237 2.900000e-01 1.128671e-07 1238 3.000000e-01 1.479685e-07 1239 3.100000e-01 1.929409e-07 1240 3.200000e-01 2.501785e-07 1241 3.300000e-01 3.225462e-07 1242 3.400000e-01 4.134518e-07 1243 3.500000e-01 5.269298e-07 1244 3.600000e-01 6.677368e-07 1245 3.700000e-01 8.414599e-07 1246 3.800000e-01 1.054632e-06 1247 3.900000e-01 1.314850e-06 1248 4.000000e-01 1.630874e-06 1249 4.100000e-01 2.012700e-06 1250 4.200000e-01 2.471565e-06 1251 4.300000e-01 3.019864e-06 1252 4.400000e-01 3.670941e-06 1253 4.500000e-01 4.438738e-06 1254 4.600000e-01 5.337287e-06 1255 4.700000e-01 6.380076e-06 1256 4.800000e-01 7.579326e-06 1257 4.900000e-01 8.945277e-06 1258 5.000000e-01 1.048555e-05 1259 5.100000e-01 1.220469e-05 1260 5.200000e-01 1.410395e-05 1261 5.300000e-01 1.618128e-05 1262 5.400000e-01 1.843163e-05 1263 5.500000e-01 2.084730e-05 1264 5.600000e-01 2.341855e-05 1265 5.700000e-01 2.613410e-05 1266 5.800000e-01 2.898174e-05 1267 5.900000e-01 3.194880e-05 1268 6.000000e-01 3.502262e-05 1269 6.100000e-01 3.819081e-05 1270 6.200000e-01 4.144161e-05 1271 6.300000e-01 4.476398e-05 1272 6.400000e-01 4.814773e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 5.158359e-05 1274 6.600000e-01 5.506319e-05 1275 6.700000e-01 5.857906e-05 1276 6.800000e-01 6.212456e-05 1277 6.900000e-01 6.569384e-05 1278 7.000000e-01 6.928175e-05 1279 7.100000e-01 7.288380e-05 1280 7.200000e-01 7.649608e-05 1281 7.300000e-01 8.011519e-05 1282 7.400000e-01 8.373817e-05 1283 7.500000e-01 8.736247e-05 1284 7.600000e-01 9.098586e-05 1285 7.700000e-01 9.460644e-05 1286 7.800000e-01 9.822255e-05 1287 7.900000e-01 1.018327e-04 1288 8.000000e-01 1.054358e-04 1289 8.100000e-01 1.090306e-04 1290 8.200000e-01 1.126162e-04 1291 8.300000e-01 1.161919e-04 1292 8.400000e-01 1.197568e-04 1293 8.500000e-01 1.233105e-04 1294 8.600000e-01 1.268522e-04 1295 8.700000e-01 1.303816e-04 1296 8.800000e-01 1.338983e-04 1297 8.900000e-01 1.374018e-04 1298 9.000000e-01 1.408919e-04 1299 9.100000e-01 1.443682e-04 1300 9.200000e-01 1.478305e-04 1301 9.300000e-01 1.512785e-04 1302 9.400000e-01 1.547121e-04 1303 9.500000e-01 1.581310e-04 1304 9.600000e-01 1.615351e-04 1305 9.700000e-01 1.649242e-04 1306 9.800000e-01 1.682983e-04 1307 9.900000e-01 1.716570e-04 1308 1.000000e+00 1.750005e-04 1309 1.010000e+00 1.783285e-04 1310 1.020000e+00 1.816409e-04 1311 1.030000e+00 1.849377e-04 1312 1.040000e+00 1.882188e-04 1313 1.050000e+00 1.914840e-04 1314 1.060000e+00 1.947335e-04 1315 1.070000e+00 1.979670e-04 1316 1.080000e+00 2.011845e-04 1317 1.090000e+00 2.043860e-04 1318 1.100000e+00 2.075714e-04 1319 1.110000e+00 2.107407e-04 1320 1.120000e+00 2.138938e-04 1321 1.130000e+00 2.170307e-04 1322 1.140000e+00 2.201514e-04 1323 1.150000e+00 2.232559e-04 1324 1.160000e+00 2.263440e-04 1325 1.170000e+00 2.294159e-04 1326 1.180000e+00 2.324714e-04 1327 1.190000e+00 2.355106e-04 1328 1.200000e+00 2.385334e-04 1329 1.210000e+00 2.415398e-04 1330 1.220000e+00 2.445298e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 2.475035e-04 1332 1.240000e+00 2.504607e-04 1333 1.250000e+00 2.534016e-04 1334 1.260000e+00 2.563260e-04 1335 1.270000e+00 2.592340e-04 1336 1.280000e+00 2.621256e-04 1337 1.290000e+00 2.650008e-04 1338 1.300000e+00 2.678596e-04 1339 1.310000e+00 2.707020e-04 1340 1.320000e+00 2.735280e-04 1341 1.330000e+00 2.763376e-04 1342 1.340000e+00 2.791308e-04 1343 1.350000e+00 2.819077e-04 1344 1.360000e+00 2.846683e-04 1345 1.370000e+00 2.874125e-04 1346 1.380000e+00 2.901404e-04 1347 1.390000e+00 2.928520e-04 1348 1.400000e+00 2.955474e-04 1349 1.410000e+00 2.982264e-04 1350 1.420000e+00 3.008893e-04 1351 1.430000e+00 3.035359e-04 1352 1.440000e+00 3.061664e-04 1353 1.450000e+00 3.087807e-04 1354 1.460000e+00 3.113788e-04 1355 1.470000e+00 3.139608e-04 1356 1.480000e+00 3.165268e-04 1357 1.490000e+00 3.190767e-04 1358 1.500000e+00 3.216106e-04 ngspice-26/tests/bsim3soipd/nmospd.mod0000644000265600020320000000410612264261473017451 0ustar andreasadmin*Model Card for BSIMPD2.0 * Lmin= .2 Lmax= .8 Wmin= 2.8 Wmax= 2.8 .Model N1 NMOS Level= 57 +TNOM = 27 TOX = 4.5E-09 TSI = .0000001 TBOX = 8E-08 +MOBMOD = 0 CAPMOD = 2 SHMOD =0 +PARAMCHK=0 WINT = 0 LINT = -2E-08 +VTH0 = .42 K1 = .49 K2 = .1 K3 = 0 +K3B = 2.2 NLX = 2E-7 +DVT0 = 10 DVT1 = .55 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 4.7E+17 NSUB = -1E+15 NGATE = 1E+20 +AGIDL=1e-15 BGIDL=1e9 NGIDL=1.1 +NDIODE = 1.13 NTUN = 14.0 NRECF0=2.5 NRECR0=4 +VREC0=1.2 NTRECF=.1 NTRECR=.2 +ISBJT = 1e-4 ISDIF = 1e-5 ISTUN = 2e-5 ISREC = 4e-2 +XBJT = .9 XDIF = .9 XREC = .9 XTUN = 0.01 +AHLI=1e-9 LBJT0=0.2e-6 LN=2e-6 +NBJT=.8 NDIF=-1 AELY=1e8 VABJT=0 +U0 = 352 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 0 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 1e0 RBSH = 0.0 +A0 = 1.4 KETA = 0.1 KETAS = 0.2 VSAT = 135000 +DWG = 0 DWB = 0 +ALPHA0 = 1e-8 BETA0 = 0 BETA1 = 0.05 BETA2 = 0.07 +VDSATII0 = .8 ESATII = 1e7 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .05 ETAB = 0 +DSUB = .2 RTH0 = .005 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 1e-12 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 +TCJSWG=1e-4 MJSWG=.5 PBSWG=1 ngspice-26/tests/bsim3soipd/t4.out0000644000265600020320000013114412264261473016533 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (PD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (PD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 8.433234e-11 1 1.000000e-02 1.173853e-10 2 2.000000e-02 1.632588e-10 3 3.000000e-02 2.268841e-10 4 4.000000e-02 3.150653e-10 5 5.000000e-02 4.371752e-10 6 6.000000e-02 6.061032e-10 7 7.000000e-02 8.395378e-10 8 8.000000e-02 1.161696e-09 9 9.000000e-02 1.605642e-09 10 1.000000e-01 2.216377e-09 11 1.100000e-01 3.054930e-09 12 1.200000e-01 4.203719e-09 13 1.300000e-01 5.773527e-09 14 1.400000e-01 7.912466e-09 15 1.500000e-01 1.081736e-08 16 1.600000e-01 1.474798e-08 17 1.700000e-01 2.004465e-08 18 1.800000e-01 2.714951e-08 19 1.900000e-01 3.663184e-08 20 2.000000e-01 4.921768e-08 21 2.100000e-01 6.582364e-08 22 2.200000e-01 8.759512e-08 23 2.300000e-01 1.159487e-07 24 2.400000e-01 1.526188e-07 25 2.500000e-01 1.997099e-07 26 2.600000e-01 2.597536e-07 27 2.700000e-01 3.357750e-07 28 2.800000e-01 4.313687e-07 29 2.900000e-01 5.507868e-07 30 3.000000e-01 6.990425e-07 31 3.100000e-01 8.820264e-07 32 3.200000e-01 1.106633e-06 33 3.300000e-01 1.380887e-06 34 3.400000e-01 1.714056e-06 35 3.500000e-01 2.116720e-06 36 3.600000e-01 2.600778e-06 37 3.700000e-01 3.179341e-06 38 3.800000e-01 3.866500e-06 39 3.900000e-01 4.676920e-06 40 4.000000e-01 5.625275e-06 41 4.100000e-01 6.725549e-06 42 4.200000e-01 7.990251e-06 43 4.300000e-01 9.429650e-06 44 4.400000e-01 1.105112e-05 45 4.500000e-01 1.285872e-05 46 4.600000e-01 1.485294e-05 47 4.700000e-01 1.703086e-05 48 4.800000e-01 1.938642e-05 49 4.900000e-01 2.191092e-05 50 5.000000e-01 2.459361e-05 51 5.100000e-01 2.742233e-05 52 5.200000e-01 3.038407e-05 53 5.300000e-01 3.346549e-05 54 5.400000e-01 3.665341e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 3.993505e-05 56 5.600000e-01 4.329836e-05 57 5.700000e-01 4.673214e-05 58 5.800000e-01 5.022610e-05 59 5.900000e-01 5.377097e-05 60 6.000000e-01 5.735840e-05 61 6.100000e-01 6.098099e-05 62 6.200000e-01 6.463219e-05 63 6.300000e-01 6.830625e-05 64 6.400000e-01 7.199816e-05 65 6.500000e-01 7.570353e-05 66 6.600000e-01 7.941857e-05 67 6.700000e-01 8.313998e-05 68 6.800000e-01 8.686491e-05 69 6.900000e-01 9.059089e-05 70 7.000000e-01 9.431579e-05 71 7.100000e-01 9.803777e-05 72 7.200000e-01 1.017552e-04 73 7.300000e-01 1.054668e-04 74 7.400000e-01 1.091713e-04 75 7.500000e-01 1.128676e-04 76 7.600000e-01 1.165549e-04 77 7.700000e-01 1.202323e-04 78 7.800000e-01 1.238993e-04 79 7.900000e-01 1.275551e-04 80 8.000000e-01 1.311992e-04 81 8.100000e-01 1.348313e-04 82 8.200000e-01 1.384508e-04 83 8.300000e-01 1.420573e-04 84 8.400000e-01 1.456507e-04 85 8.500000e-01 1.492305e-04 86 8.600000e-01 1.527965e-04 87 8.700000e-01 1.563485e-04 88 8.800000e-01 1.598862e-04 89 8.900000e-01 1.634095e-04 90 9.000000e-01 1.669181e-04 91 9.100000e-01 1.704120e-04 92 9.200000e-01 1.738909e-04 93 9.300000e-01 1.773548e-04 94 9.400000e-01 1.808034e-04 95 9.500000e-01 1.842368e-04 96 9.600000e-01 1.876547e-04 97 9.700000e-01 1.910572e-04 98 9.800000e-01 1.944440e-04 99 9.900000e-01 1.978151e-04 100 1.000000e+00 2.011704e-04 101 1.010000e+00 2.045099e-04 102 1.020000e+00 2.078335e-04 103 1.030000e+00 2.111411e-04 104 1.040000e+00 2.144326e-04 105 1.050000e+00 2.177081e-04 106 1.060000e+00 2.209674e-04 107 1.070000e+00 2.242105e-04 108 1.080000e+00 2.274374e-04 109 1.090000e+00 2.306480e-04 110 1.100000e+00 2.338423e-04 111 1.110000e+00 2.370202e-04 112 1.120000e+00 2.401818e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 2.433269e-04 114 1.140000e+00 2.464556e-04 115 1.150000e+00 2.495678e-04 116 1.160000e+00 2.526636e-04 117 1.170000e+00 2.557428e-04 118 1.180000e+00 2.588055e-04 119 1.190000e+00 2.618517e-04 120 1.200000e+00 2.648813e-04 121 1.210000e+00 2.678943e-04 122 1.220000e+00 2.708908e-04 123 1.230000e+00 2.738707e-04 124 1.240000e+00 2.768340e-04 125 1.250000e+00 2.797807e-04 126 1.260000e+00 2.827108e-04 127 1.270000e+00 2.856243e-04 128 1.280000e+00 2.885213e-04 129 1.290000e+00 2.914016e-04 130 1.300000e+00 2.942654e-04 131 1.310000e+00 2.971126e-04 132 1.320000e+00 2.999432e-04 133 1.330000e+00 3.027572e-04 134 1.340000e+00 3.055548e-04 135 1.350000e+00 3.083357e-04 136 1.360000e+00 3.111002e-04 137 1.370000e+00 3.138481e-04 138 1.380000e+00 3.165795e-04 139 1.390000e+00 3.192945e-04 140 1.400000e+00 3.219930e-04 141 1.410000e+00 3.246751e-04 142 1.420000e+00 3.273407e-04 143 1.430000e+00 3.299900e-04 144 1.440000e+00 3.326229e-04 145 1.450000e+00 3.352394e-04 146 1.460000e+00 3.378396e-04 147 1.470000e+00 3.404235e-04 148 1.480000e+00 3.429912e-04 149 1.490000e+00 3.455426e-04 150 1.500000e+00 3.480777e-04 151 0.000000e+00 3.189255e-11 152 1.000000e-02 4.435540e-11 153 2.000000e-02 6.163784e-11 154 3.000000e-02 8.559318e-11 155 4.000000e-02 1.187814e-10 156 5.000000e-02 1.647354e-10 157 6.000000e-02 2.283245e-10 158 7.000000e-02 3.162525e-10 159 8.000000e-02 4.377338e-10 160 9.000000e-02 6.054119e-10 161 1.000000e-01 8.366013e-10 162 1.100000e-01 1.154958e-09 163 1.200000e-01 1.592716e-09 164 1.300000e-01 2.193662e-09 165 1.400000e-01 3.017072e-09 166 1.500000e-01 4.142860e-09 167 1.600000e-01 5.678277e-09 168 1.700000e-01 7.766511e-09 169 1.800000e-01 1.059761e-08 170 1.900000e-01 1.442217e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 1.956821e-08 172 2.100000e-01 2.646166e-08 173 2.200000e-01 3.565081e-08 174 2.300000e-01 4.783488e-08 175 2.400000e-01 6.389687e-08 176 2.500000e-01 8.494072e-08 177 2.600000e-01 1.123326e-07 178 2.700000e-01 1.477468e-07 179 2.800000e-01 1.932161e-07 180 2.900000e-01 2.511888e-07 181 3.000000e-01 3.245919e-07 182 3.100000e-01 4.169056e-07 183 3.200000e-01 5.322484e-07 184 3.300000e-01 6.754765e-07 185 3.400000e-01 8.522962e-07 186 3.500000e-01 1.069386e-06 187 3.600000e-01 1.334520e-06 188 3.700000e-01 1.656678e-06 189 3.800000e-01 2.046121e-06 190 3.900000e-01 2.514397e-06 191 4.000000e-01 3.074263e-06 192 4.100000e-01 3.739458e-06 193 4.200000e-01 4.524337e-06 194 4.300000e-01 5.443337e-06 195 4.400000e-01 6.510303e-06 196 4.500000e-01 7.737734e-06 197 4.600000e-01 9.136030e-06 198 4.700000e-01 1.071284e-05 199 4.800000e-01 1.247258e-05 200 4.900000e-01 1.441625e-05 201 5.000000e-01 1.654142e-05 202 5.100000e-01 1.884257e-05 203 5.200000e-01 2.131151e-05 204 5.300000e-01 2.393794e-05 205 5.400000e-01 2.671009e-05 206 5.500000e-01 2.961528e-05 207 5.600000e-01 3.264041e-05 208 5.700000e-01 3.577248e-05 209 5.800000e-01 3.899883e-05 210 5.900000e-01 4.230747e-05 211 6.000000e-01 4.568721e-05 212 6.100000e-01 4.912779e-05 213 6.200000e-01 5.261986e-05 214 6.300000e-01 5.615504e-05 215 6.400000e-01 5.972587e-05 216 6.500000e-01 6.332573e-05 217 6.600000e-01 6.694883e-05 218 6.700000e-01 7.059006e-05 219 6.800000e-01 7.424499e-05 220 6.900000e-01 7.790976e-05 221 7.000000e-01 8.158104e-05 222 7.100000e-01 8.525591e-05 223 7.200000e-01 8.893187e-05 224 7.300000e-01 9.260676e-05 225 7.400000e-01 9.627870e-05 226 7.500000e-01 9.994606e-05 227 7.600000e-01 1.036075e-04 228 7.700000e-01 1.072616e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 1.109076e-04 230 7.900000e-01 1.145444e-04 231 8.000000e-01 1.181712e-04 232 8.100000e-01 1.217874e-04 233 8.200000e-01 1.253923e-04 234 8.300000e-01 1.289854e-04 235 8.400000e-01 1.325663e-04 236 8.500000e-01 1.361344e-04 237 8.600000e-01 1.396895e-04 238 8.700000e-01 1.432312e-04 239 8.800000e-01 1.467592e-04 240 8.900000e-01 1.502733e-04 241 9.000000e-01 1.537732e-04 242 9.100000e-01 1.572588e-04 243 9.200000e-01 1.607297e-04 244 9.300000e-01 1.641860e-04 245 9.400000e-01 1.676273e-04 246 9.500000e-01 1.710536e-04 247 9.600000e-01 1.744647e-04 248 9.700000e-01 1.778605e-04 249 9.800000e-01 1.812409e-04 250 9.900000e-01 1.846058e-04 251 1.000000e+00 1.879551e-04 252 1.010000e+00 1.912887e-04 253 1.020000e+00 1.946066e-04 254 1.030000e+00 1.979086e-04 255 1.040000e+00 2.011947e-04 256 1.050000e+00 2.044649e-04 257 1.060000e+00 2.077190e-04 258 1.070000e+00 2.109571e-04 259 1.080000e+00 2.141790e-04 260 1.090000e+00 2.173848e-04 261 1.100000e+00 2.205744e-04 262 1.110000e+00 2.237477e-04 263 1.120000e+00 2.269047e-04 264 1.130000e+00 2.300454e-04 265 1.140000e+00 2.331698e-04 266 1.150000e+00 2.362778e-04 267 1.160000e+00 2.393694e-04 268 1.170000e+00 2.424446e-04 269 1.180000e+00 2.455034e-04 270 1.190000e+00 2.485457e-04 271 1.200000e+00 2.515715e-04 272 1.210000e+00 2.545809e-04 273 1.220000e+00 2.575738e-04 274 1.230000e+00 2.605502e-04 275 1.240000e+00 2.635100e-04 276 1.250000e+00 2.664534e-04 277 1.260000e+00 2.693803e-04 278 1.270000e+00 2.722907e-04 279 1.280000e+00 2.751846e-04 280 1.290000e+00 2.780619e-04 281 1.300000e+00 2.809228e-04 282 1.310000e+00 2.837672e-04 283 1.320000e+00 2.865951e-04 284 1.330000e+00 2.894066e-04 285 1.340000e+00 2.922015e-04 286 1.350000e+00 2.949801e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 2.977422e-04 288 1.370000e+00 3.004878e-04 289 1.380000e+00 3.032171e-04 290 1.390000e+00 3.059300e-04 291 1.400000e+00 3.086265e-04 292 1.410000e+00 3.113067e-04 293 1.420000e+00 3.139705e-04 294 1.430000e+00 3.166180e-04 295 1.440000e+00 3.192493e-04 296 1.450000e+00 3.218643e-04 297 1.460000e+00 3.244631e-04 298 1.470000e+00 3.270456e-04 299 1.480000e+00 3.296120e-04 300 1.490000e+00 3.321623e-04 301 1.500000e+00 3.346964e-04 302 0.000000e+00 1.721668e-11 303 1.000000e-02 2.388772e-11 304 2.000000e-02 3.312193e-11 305 3.000000e-02 4.589976e-11 306 4.000000e-02 6.357426e-11 307 5.000000e-02 8.801134e-11 308 6.000000e-02 1.217820e-10 309 7.000000e-02 1.684254e-10 310 8.000000e-02 2.328078e-10 311 9.000000e-02 3.216122e-10 312 1.000000e-01 4.440024e-10 313 1.100000e-01 6.125230e-10 314 1.200000e-01 8.443127e-10 315 1.300000e-01 1.162735e-09 316 1.400000e-01 1.599553e-09 317 1.500000e-01 2.197827e-09 318 1.600000e-01 3.015724e-09 319 1.700000e-01 4.131521e-09 320 1.800000e-01 5.650076e-09 321 1.900000e-01 7.711158e-09 322 2.000000e-01 1.050001e-08 323 2.100000e-01 1.426057e-08 324 2.200000e-01 1.931181e-08 325 2.300000e-01 2.606762e-08 326 2.400000e-01 3.506045e-08 327 2.500000e-01 4.696916e-08 328 2.600000e-01 6.265104e-08 329 2.700000e-01 8.317815e-08 330 2.800000e-01 1.098779e-07 331 2.900000e-01 1.443779e-07 332 3.000000e-01 1.886563e-07 333 3.100000e-01 2.450966e-07 334 3.200000e-01 3.165513e-07 335 3.300000e-01 4.064134e-07 336 3.400000e-01 5.187001e-07 337 3.500000e-01 6.581490e-07 338 3.600000e-01 8.303274e-07 339 3.700000e-01 1.041750e-06 340 3.800000e-01 1.300001e-06 341 3.900000e-01 1.613841e-06 342 4.000000e-01 1.993282e-06 343 4.100000e-01 2.449604e-06 344 4.200000e-01 2.995279e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 3.643767e-06 346 4.400000e-01 4.409168e-06 347 4.500000e-01 5.305717e-06 348 4.600000e-01 6.347133e-06 349 4.700000e-01 7.545891e-06 350 4.800000e-01 8.912481e-06 351 4.900000e-01 1.045475e-05 352 5.000000e-01 1.217743e-05 353 5.100000e-01 1.408188e-05 354 5.200000e-01 1.616612e-05 355 5.300000e-01 1.842507e-05 356 5.400000e-01 2.085096e-05 357 5.500000e-01 2.343390e-05 358 5.600000e-01 2.616247e-05 359 5.700000e-01 2.902425e-05 360 5.800000e-01 3.200641e-05 361 5.900000e-01 3.509606e-05 362 6.000000e-01 3.828069e-05 363 6.100000e-01 4.154835e-05 364 6.200000e-01 4.488789e-05 365 6.300000e-01 4.828902e-05 366 6.400000e-01 5.174237e-05 367 6.500000e-01 5.523952e-05 368 6.600000e-01 5.877293e-05 369 6.700000e-01 6.233595e-05 370 6.800000e-01 6.592270e-05 371 6.900000e-01 6.952801e-05 372 7.000000e-01 7.314740e-05 373 7.100000e-01 7.677695e-05 374 7.200000e-01 8.041326e-05 375 7.300000e-01 8.405338e-05 376 7.400000e-01 8.769476e-05 377 7.500000e-01 9.133519e-05 378 7.600000e-01 9.497278e-05 379 7.700000e-01 9.860585e-05 380 7.800000e-01 1.022330e-04 381 7.900000e-01 1.058530e-04 382 8.000000e-01 1.094647e-04 383 8.100000e-01 1.130673e-04 384 8.200000e-01 1.166599e-04 385 8.300000e-01 1.202417e-04 386 8.400000e-01 1.238123e-04 387 8.500000e-01 1.273711e-04 388 8.600000e-01 1.309175e-04 389 8.700000e-01 1.344511e-04 390 8.800000e-01 1.379716e-04 391 8.900000e-01 1.414787e-04 392 9.000000e-01 1.449721e-04 393 9.100000e-01 1.484515e-04 394 9.200000e-01 1.519166e-04 395 9.300000e-01 1.553673e-04 396 9.400000e-01 1.588033e-04 397 9.500000e-01 1.622246e-04 398 9.600000e-01 1.656309e-04 399 9.700000e-01 1.690221e-04 400 9.800000e-01 1.723981e-04 401 9.900000e-01 1.757588e-04 402 1.000000e+00 1.791040e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.824336e-04 404 1.020000e+00 1.857477e-04 405 1.030000e+00 1.890460e-04 406 1.040000e+00 1.923286e-04 407 1.050000e+00 1.955952e-04 408 1.060000e+00 1.988460e-04 409 1.070000e+00 2.020808e-04 410 1.080000e+00 2.052996e-04 411 1.090000e+00 2.085022e-04 412 1.100000e+00 2.116888e-04 413 1.110000e+00 2.148592e-04 414 1.120000e+00 2.180134e-04 415 1.130000e+00 2.211513e-04 416 1.140000e+00 2.242730e-04 417 1.150000e+00 2.273783e-04 418 1.160000e+00 2.304674e-04 419 1.170000e+00 2.335401e-04 420 1.180000e+00 2.365964e-04 421 1.190000e+00 2.396364e-04 422 1.200000e+00 2.426599e-04 423 1.210000e+00 2.456671e-04 424 1.220000e+00 2.486578e-04 425 1.230000e+00 2.516321e-04 426 1.240000e+00 2.545899e-04 427 1.250000e+00 2.575314e-04 428 1.260000e+00 2.604563e-04 429 1.270000e+00 2.633649e-04 430 1.280000e+00 2.662570e-04 431 1.290000e+00 2.691326e-04 432 1.300000e+00 2.719918e-04 433 1.310000e+00 2.748346e-04 434 1.320000e+00 2.776610e-04 435 1.330000e+00 2.804709e-04 436 1.340000e+00 2.832645e-04 437 1.350000e+00 2.860417e-04 438 1.360000e+00 2.888025e-04 439 1.370000e+00 2.915469e-04 440 1.380000e+00 2.942750e-04 441 1.390000e+00 2.969868e-04 442 1.400000e+00 2.996822e-04 443 1.410000e+00 3.023614e-04 444 1.420000e+00 3.050243e-04 445 1.430000e+00 3.076710e-04 446 1.440000e+00 3.103015e-04 447 1.450000e+00 3.129157e-04 448 1.460000e+00 3.155138e-04 449 1.470000e+00 3.180958e-04 450 1.480000e+00 3.206617e-04 451 1.490000e+00 3.232114e-04 452 1.500000e+00 3.257452e-04 453 0.000000e+00 1.394691e-11 454 1.000000e-02 1.846015e-11 455 2.000000e-02 2.662913e-11 456 3.000000e-02 3.678196e-11 457 4.000000e-02 5.079150e-11 458 5.000000e-02 7.011527e-11 459 6.000000e-02 9.675755e-11 460 7.000000e-02 1.334720e-10 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 1.840385e-10 462 9.000000e-02 2.536393e-10 463 1.000000e-01 3.493704e-10 464 1.100000e-01 4.809346e-10 465 1.200000e-01 6.615750e-10 466 1.300000e-01 9.093331e-10 467 1.400000e-01 1.248731e-09 468 1.500000e-01 1.713011e-09 469 1.600000e-01 2.347109e-09 470 1.700000e-01 3.211553e-09 471 1.800000e-01 4.387562e-09 472 1.900000e-01 5.983636e-09 473 2.000000e-01 8.143998e-09 474 2.100000e-01 1.105928e-08 475 2.200000e-01 1.497988e-08 476 2.300000e-01 2.023239e-08 477 2.400000e-01 2.723958e-08 478 2.500000e-01 3.654419e-08 479 2.600000e-01 4.883680e-08 480 2.700000e-01 6.498795e-08 481 2.800000e-01 8.608465e-08 482 2.900000e-01 1.134711e-07 483 3.000000e-01 1.487940e-07 484 3.100000e-01 1.940529e-07 485 3.200000e-01 2.516566e-07 486 3.300000e-01 3.244861e-07 487 3.400000e-01 4.159679e-07 488 3.500000e-01 5.301580e-07 489 3.600000e-01 6.718379e-07 490 3.700000e-01 8.466230e-07 491 3.800000e-01 1.061080e-06 492 3.900000e-01 1.322842e-06 493 4.000000e-01 1.640714e-06 494 4.100000e-01 2.024740e-06 495 4.200000e-01 2.486206e-06 496 4.300000e-01 3.037558e-06 497 4.400000e-01 3.692188e-06 498 4.500000e-01 4.464072e-06 499 4.600000e-01 5.367267e-06 500 4.700000e-01 6.415259e-06 501 4.800000e-01 7.620246e-06 502 4.900000e-01 8.992417e-06 503 5.000000e-01 1.053931e-05 504 5.100000e-01 1.226539e-05 505 5.200000e-01 1.417177e-05 506 5.300000e-01 1.625631e-05 507 5.400000e-01 1.851382e-05 508 5.500000e-01 2.093652e-05 509 5.600000e-01 2.351455e-05 510 5.700000e-01 2.623658e-05 511 5.800000e-01 2.909032e-05 512 5.900000e-01 3.206308e-05 513 6.000000e-01 3.514216e-05 514 6.100000e-01 3.831518e-05 515 6.200000e-01 4.157036e-05 516 6.300000e-01 4.489669e-05 517 6.400000e-01 4.828400e-05 518 6.500000e-01 5.172305e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 5.520548e-05 520 6.700000e-01 5.872386e-05 521 6.800000e-01 6.227158e-05 522 6.900000e-01 6.584281e-05 523 7.000000e-01 6.943244e-05 524 7.100000e-01 7.303600e-05 525 7.200000e-01 7.664961e-05 526 7.300000e-01 8.026988e-05 527 7.400000e-01 8.389387e-05 528 7.500000e-01 8.751905e-05 529 7.600000e-01 9.114323e-05 530 7.700000e-01 9.476449e-05 531 7.800000e-01 9.838119e-05 532 7.900000e-01 1.019919e-04 533 8.000000e-01 1.055954e-04 534 8.100000e-01 1.091906e-04 535 8.200000e-01 1.127766e-04 536 8.300000e-01 1.163526e-04 537 8.400000e-01 1.199178e-04 538 8.500000e-01 1.234716e-04 539 8.600000e-01 1.270136e-04 540 8.700000e-01 1.305432e-04 541 8.800000e-01 1.340600e-04 542 8.900000e-01 1.375637e-04 543 9.000000e-01 1.410539e-04 544 9.100000e-01 1.445303e-04 545 9.200000e-01 1.479927e-04 546 9.300000e-01 1.514408e-04 547 9.400000e-01 1.548744e-04 548 9.500000e-01 1.582934e-04 549 9.600000e-01 1.616976e-04 550 9.700000e-01 1.650868e-04 551 9.800000e-01 1.684608e-04 552 9.900000e-01 1.718197e-04 553 1.000000e+00 1.751631e-04 554 1.010000e+00 1.784911e-04 555 1.020000e+00 1.818036e-04 556 1.030000e+00 1.851004e-04 557 1.040000e+00 1.883815e-04 558 1.050000e+00 1.916467e-04 559 1.060000e+00 1.948962e-04 560 1.070000e+00 1.981296e-04 561 1.080000e+00 2.013472e-04 562 1.090000e+00 2.045486e-04 563 1.100000e+00 2.077340e-04 564 1.110000e+00 2.109033e-04 565 1.120000e+00 2.140564e-04 566 1.130000e+00 2.171933e-04 567 1.140000e+00 2.203140e-04 568 1.150000e+00 2.234184e-04 569 1.160000e+00 2.265065e-04 570 1.170000e+00 2.295783e-04 571 1.180000e+00 2.326338e-04 572 1.190000e+00 2.356730e-04 573 1.200000e+00 2.386957e-04 574 1.210000e+00 2.417021e-04 575 1.220000e+00 2.446921e-04 576 1.230000e+00 2.476657e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 2.506229e-04 578 1.250000e+00 2.535637e-04 579 1.260000e+00 2.564881e-04 580 1.270000e+00 2.593960e-04 581 1.280000e+00 2.622876e-04 582 1.290000e+00 2.651627e-04 583 1.300000e+00 2.680214e-04 584 1.310000e+00 2.708638e-04 585 1.320000e+00 2.736897e-04 586 1.330000e+00 2.764993e-04 587 1.340000e+00 2.792925e-04 588 1.350000e+00 2.820693e-04 589 1.360000e+00 2.848298e-04 590 1.370000e+00 2.875739e-04 591 1.380000e+00 2.903018e-04 592 1.390000e+00 2.930133e-04 593 1.400000e+00 2.957086e-04 594 1.410000e+00 2.983876e-04 595 1.420000e+00 3.010503e-04 596 1.430000e+00 3.036969e-04 597 1.440000e+00 3.063273e-04 598 1.450000e+00 3.089415e-04 599 1.460000e+00 3.115396e-04 600 1.470000e+00 3.141215e-04 601 1.480000e+00 3.166874e-04 602 1.490000e+00 3.192372e-04 603 1.500000e+00 3.217710e-04 604 0.000000e+00 1.754769e-11 605 1.000000e-02 2.311481e-11 606 2.000000e-02 3.313622e-11 607 3.000000e-02 4.555909e-11 608 4.000000e-02 6.264591e-11 609 5.000000e-02 8.613817e-11 610 6.000000e-02 1.184225e-10 611 7.000000e-02 1.627667e-10 612 8.000000e-02 2.236405e-10 613 9.000000e-02 3.071507e-10 614 1.000000e-01 4.216291e-10 615 1.100000e-01 5.784260e-10 616 1.200000e-01 7.929764e-10 617 1.300000e-01 1.086227e-09 618 1.400000e-01 1.486537e-09 619 1.500000e-01 2.032200e-09 620 1.600000e-01 2.774763e-09 621 1.700000e-01 3.783370e-09 622 1.800000e-01 5.150401e-09 623 1.900000e-01 6.998722e-09 624 2.000000e-01 9.490909e-09 625 2.100000e-01 1.284086e-08 626 2.200000e-01 1.732819e-08 627 2.300000e-01 2.331591e-08 628 2.400000e-01 3.127163e-08 629 2.500000e-01 4.179280e-08 630 2.600000e-01 5.563606e-08 631 2.700000e-01 7.375095e-08 632 2.800000e-01 9.731799e-08 633 2.900000e-01 1.277913e-07 634 3.000000e-01 1.669460e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 2.169310e-07 636 3.200000e-01 2.803284e-07 637 3.300000e-01 3.602206e-07 638 3.400000e-01 4.602673e-07 639 3.500000e-01 5.847947e-07 640 3.600000e-01 7.388948e-07 641 3.700000e-01 9.285377e-07 642 3.800000e-01 1.160686e-06 643 3.900000e-01 1.443408e-06 644 4.000000e-01 1.785962e-06 645 4.100000e-01 2.198846e-06 646 4.200000e-01 2.693765e-06 647 4.300000e-01 3.283499e-06 648 4.400000e-01 3.981636e-06 649 4.500000e-01 4.802161e-06 650 4.600000e-01 5.758892e-06 651 4.700000e-01 6.864813e-06 652 4.800000e-01 8.131351e-06 653 4.900000e-01 9.567693e-06 654 5.000000e-01 1.118022e-05 655 5.100000e-01 1.297214e-05 656 5.200000e-01 1.494337e-05 657 5.300000e-01 1.709066e-05 658 5.400000e-01 1.940791e-05 659 5.500000e-01 2.188661e-05 660 5.600000e-01 2.451644e-05 661 5.700000e-01 2.728577e-05 662 5.800000e-01 3.018226e-05 663 5.900000e-01 3.319328e-05 664 6.000000e-01 3.630632e-05 665 6.100000e-01 3.950927e-05 666 6.200000e-01 4.279069e-05 667 6.300000e-01 4.613990e-05 668 6.400000e-01 4.954709e-05 669 6.500000e-01 5.300336e-05 670 6.600000e-01 5.650069e-05 671 6.700000e-01 6.003195e-05 672 6.800000e-01 6.359079e-05 673 6.900000e-01 6.717163e-05 674 7.000000e-01 7.076958e-05 675 7.100000e-01 7.438036e-05 676 7.200000e-01 7.800024e-05 677 7.300000e-01 8.162598e-05 678 7.400000e-01 8.525477e-05 679 7.500000e-01 8.888417e-05 680 7.600000e-01 9.251208e-05 681 7.700000e-01 9.613665e-05 682 7.800000e-01 9.975632e-05 683 7.900000e-01 1.033697e-04 684 8.000000e-01 1.069756e-04 685 8.100000e-01 1.105730e-04 686 8.200000e-01 1.141610e-04 687 8.300000e-01 1.177388e-04 688 8.400000e-01 1.213058e-04 689 8.500000e-01 1.248613e-04 690 8.600000e-01 1.284048e-04 691 8.700000e-01 1.319358e-04 692 8.800000e-01 1.354540e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.389590e-04 694 9.000000e-01 1.424504e-04 695 9.100000e-01 1.459280e-04 696 9.200000e-01 1.493916e-04 697 9.300000e-01 1.528408e-04 698 9.400000e-01 1.562756e-04 699 9.500000e-01 1.596956e-04 700 9.600000e-01 1.631008e-04 701 9.700000e-01 1.664910e-04 702 9.800000e-01 1.698661e-04 703 9.900000e-01 1.732259e-04 704 1.000000e+00 1.765704e-04 705 1.010000e+00 1.798993e-04 706 1.020000e+00 1.832127e-04 707 1.030000e+00 1.865105e-04 708 1.040000e+00 1.897925e-04 709 1.050000e+00 1.930587e-04 710 1.060000e+00 1.963090e-04 711 1.070000e+00 1.995434e-04 712 1.080000e+00 2.027618e-04 713 1.090000e+00 2.059642e-04 714 1.100000e+00 2.091504e-04 715 1.110000e+00 2.123206e-04 716 1.120000e+00 2.154745e-04 717 1.130000e+00 2.186123e-04 718 1.140000e+00 2.217338e-04 719 1.150000e+00 2.248391e-04 720 1.160000e+00 2.279280e-04 721 1.170000e+00 2.310007e-04 722 1.180000e+00 2.340570e-04 723 1.190000e+00 2.370969e-04 724 1.200000e+00 2.401205e-04 725 1.210000e+00 2.431277e-04 726 1.220000e+00 2.461184e-04 727 1.230000e+00 2.490928e-04 728 1.240000e+00 2.520508e-04 729 1.250000e+00 2.549923e-04 730 1.260000e+00 2.579175e-04 731 1.270000e+00 2.608262e-04 732 1.280000e+00 2.637185e-04 733 1.290000e+00 2.665944e-04 734 1.300000e+00 2.694538e-04 735 1.310000e+00 2.722969e-04 736 1.320000e+00 2.751235e-04 737 1.330000e+00 2.779338e-04 738 1.340000e+00 2.807277e-04 739 1.350000e+00 2.835052e-04 740 1.360000e+00 2.862663e-04 741 1.370000e+00 2.890112e-04 742 1.380000e+00 2.917397e-04 743 1.390000e+00 2.944519e-04 744 1.400000e+00 2.971478e-04 745 1.410000e+00 2.998274e-04 746 1.420000e+00 3.024908e-04 747 1.430000e+00 3.051380e-04 748 1.440000e+00 3.077690e-04 749 1.450000e+00 3.103838e-04 750 1.460000e+00 3.129824e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 3.155650e-04 752 1.480000e+00 3.181314e-04 753 1.490000e+00 3.206818e-04 754 1.500000e+00 3.232161e-04 755 0.000000e+00 3.463674e-11 756 1.000000e-02 4.717950e-11 757 2.000000e-02 6.437258e-11 758 3.000000e-02 8.793096e-11 759 4.000000e-02 1.201972e-10 760 5.000000e-02 1.643681e-10 761 6.000000e-02 2.248026e-10 762 7.000000e-02 3.074369e-10 763 8.000000e-02 4.203452e-10 764 9.000000e-02 5.744935e-10 765 1.000000e-01 7.847505e-10 766 1.100000e-01 1.071237e-09 767 1.200000e-01 1.461121e-09 768 1.300000e-01 1.990993e-09 769 1.400000e-01 2.709990e-09 770 1.500000e-01 3.683879e-09 771 1.600000e-01 5.000357e-09 772 1.700000e-01 6.775862e-09 773 1.800000e-01 9.164250e-09 774 1.900000e-01 1.236773e-08 775 2.000000e-01 1.665046e-08 776 2.100000e-01 2.235526e-08 777 2.200000e-01 2.992382e-08 778 2.300000e-01 3.992077e-08 779 2.400000e-01 5.306190e-08 780 2.500000e-01 7.024675e-08 781 2.600000e-01 9.259568e-08 782 2.700000e-01 1.214916e-07 783 2.800000e-01 1.586265e-07 784 2.900000e-01 2.060534e-07 785 3.000000e-01 2.662449e-07 786 3.100000e-01 3.421587e-07 787 3.200000e-01 4.373131e-07 788 3.300000e-01 5.558728e-07 789 3.400000e-01 7.027467e-07 790 3.500000e-01 8.836952e-07 791 3.600000e-01 1.105445e-06 792 3.700000e-01 1.375800e-06 793 3.800000e-01 1.703734e-06 794 3.900000e-01 2.099446e-06 795 4.000000e-01 2.574350e-06 796 4.100000e-01 3.140969e-06 797 4.200000e-01 3.812702e-06 798 4.300000e-01 4.603452e-06 799 4.400000e-01 5.527108e-06 800 4.500000e-01 6.596900e-06 801 4.600000e-01 7.824699e-06 802 4.700000e-01 9.220318e-06 803 4.800000e-01 1.079092e-05 804 4.900000e-01 1.254061e-05 805 5.000000e-01 1.447022e-05 806 5.100000e-01 1.657740e-05 807 5.200000e-01 1.885687e-05 808 5.300000e-01 2.130084e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 2.389954e-05 810 5.500000e-01 2.664175e-05 811 5.600000e-01 2.951538e-05 812 5.700000e-01 3.250792e-05 813 5.800000e-01 3.560688e-05 814 5.900000e-01 3.880005e-05 815 6.000000e-01 4.207581e-05 816 6.100000e-01 4.542328e-05 817 6.200000e-01 4.883239e-05 818 6.300000e-01 5.229396e-05 819 6.400000e-01 5.579969e-05 820 6.500000e-01 5.934216e-05 821 6.600000e-01 6.291476e-05 822 6.700000e-01 6.651166e-05 823 6.800000e-01 7.012772e-05 824 6.900000e-01 7.375843e-05 825 7.000000e-01 7.739988e-05 826 7.100000e-01 8.104863e-05 827 7.200000e-01 8.470172e-05 828 7.300000e-01 8.835657e-05 829 7.400000e-01 9.201093e-05 830 7.500000e-01 9.566286e-05 831 7.600000e-01 9.931068e-05 832 7.700000e-01 1.029529e-04 833 7.800000e-01 1.065884e-04 834 7.900000e-01 1.102158e-04 835 8.000000e-01 1.138344e-04 836 8.100000e-01 1.174433e-04 837 8.200000e-01 1.210417e-04 838 8.300000e-01 1.246290e-04 839 8.400000e-01 1.282046e-04 840 8.500000e-01 1.317681e-04 841 8.600000e-01 1.353190e-04 842 8.700000e-01 1.388570e-04 843 8.800000e-01 1.423816e-04 844 8.900000e-01 1.458927e-04 845 9.000000e-01 1.493898e-04 846 9.100000e-01 1.528729e-04 847 9.200000e-01 1.563416e-04 848 9.300000e-01 1.597957e-04 849 9.400000e-01 1.632352e-04 850 9.500000e-01 1.666598e-04 851 9.600000e-01 1.700693e-04 852 9.700000e-01 1.734637e-04 853 9.800000e-01 1.768429e-04 854 9.900000e-01 1.802066e-04 855 1.000000e+00 1.835549e-04 856 1.010000e+00 1.868876e-04 857 1.020000e+00 1.902046e-04 858 1.030000e+00 1.935058e-04 859 1.040000e+00 1.967913e-04 860 1.050000e+00 2.000609e-04 861 1.060000e+00 2.033145e-04 862 1.070000e+00 2.065521e-04 863 1.080000e+00 2.097737e-04 864 1.090000e+00 2.129791e-04 865 1.100000e+00 2.161684e-04 866 1.110000e+00 2.193415e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 2.224984e-04 868 1.130000e+00 2.256391e-04 869 1.140000e+00 2.287634e-04 870 1.150000e+00 2.318714e-04 871 1.160000e+00 2.349631e-04 872 1.170000e+00 2.380384e-04 873 1.180000e+00 2.410973e-04 874 1.190000e+00 2.441398e-04 875 1.200000e+00 2.471659e-04 876 1.210000e+00 2.501756e-04 877 1.220000e+00 2.531688e-04 878 1.230000e+00 2.561455e-04 879 1.240000e+00 2.591058e-04 880 1.250000e+00 2.620497e-04 881 1.260000e+00 2.649771e-04 882 1.270000e+00 2.678880e-04 883 1.280000e+00 2.707824e-04 884 1.290000e+00 2.736604e-04 885 1.300000e+00 2.765219e-04 886 1.310000e+00 2.793670e-04 887 1.320000e+00 2.821956e-04 888 1.330000e+00 2.850078e-04 889 1.340000e+00 2.878035e-04 890 1.350000e+00 2.905828e-04 891 1.360000e+00 2.933458e-04 892 1.370000e+00 2.960923e-04 893 1.380000e+00 2.988225e-04 894 1.390000e+00 3.015363e-04 895 1.400000e+00 3.042338e-04 896 1.410000e+00 3.069150e-04 897 1.420000e+00 3.095799e-04 898 1.430000e+00 3.122285e-04 899 1.440000e+00 3.148609e-04 900 1.450000e+00 3.174770e-04 901 1.460000e+00 3.200770e-04 902 1.470000e+00 3.226608e-04 903 1.480000e+00 3.252284e-04 904 1.490000e+00 3.277799e-04 905 1.500000e+00 3.303154e-04 906 0.000000e+00 1.045384e-10 907 1.000000e-02 1.404399e-10 908 2.000000e-02 1.893844e-10 909 3.000000e-02 2.560736e-10 910 4.000000e-02 3.468845e-10 911 5.000000e-02 4.704551e-10 912 6.000000e-02 6.384687e-10 913 7.000000e-02 8.667021e-10 914 8.000000e-02 1.176419e-09 915 9.000000e-02 1.596215e-09 916 1.000000e-01 2.164452e-09 917 1.100000e-01 2.932448e-09 918 1.200000e-01 3.968627e-09 919 1.300000e-01 5.363896e-09 920 1.400000e-01 7.238524e-09 921 1.500000e-01 9.750897e-09 922 1.600000e-01 1.310851e-08 923 1.700000e-01 1.758161e-08 924 1.800000e-01 2.352000e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 3.137322e-08 926 2.000000e-01 4.171477e-08 927 2.100000e-01 5.527041e-08 928 2.200000e-01 7.295098e-08 929 2.300000e-01 9.588982e-08 930 2.400000e-01 1.254851e-07 931 2.500000e-01 1.634470e-07 932 2.600000e-01 2.118512e-07 933 2.700000e-01 2.731982e-07 934 2.800000e-01 3.504810e-07 935 2.900000e-01 4.472614e-07 936 3.000000e-01 5.677581e-07 937 3.100000e-01 7.169442e-07 938 3.200000e-01 9.006563e-07 939 3.300000e-01 1.125706e-06 940 3.400000e-01 1.399992e-06 941 3.500000e-01 1.732584e-06 942 3.600000e-01 2.133780e-06 943 3.700000e-01 2.615081e-06 944 3.800000e-01 3.189086e-06 945 3.900000e-01 3.869251e-06 946 4.000000e-01 4.669510e-06 947 4.100000e-01 5.603758e-06 948 4.200000e-01 6.685210e-06 949 4.300000e-01 7.925707e-06 950 4.400000e-01 9.335025e-06 951 4.500000e-01 1.092030e-05 952 4.600000e-01 1.268561e-05 953 4.700000e-01 1.463182e-05 954 4.800000e-01 1.675661e-05 955 4.900000e-01 1.905474e-05 956 5.000000e-01 2.151851e-05 957 5.100000e-01 2.413824e-05 958 5.200000e-01 2.690280e-05 959 5.300000e-01 2.980018e-05 960 5.400000e-01 3.281794e-05 961 5.500000e-01 3.594363e-05 962 5.600000e-01 3.916507e-05 963 5.700000e-01 4.247066e-05 964 5.800000e-01 4.584949e-05 965 5.900000e-01 4.929145e-05 966 6.000000e-01 5.278732e-05 967 6.100000e-01 5.632874e-05 968 6.200000e-01 5.990821e-05 969 6.300000e-01 6.351906e-05 970 6.400000e-01 6.715537e-05 971 6.500000e-01 7.081191e-05 972 6.600000e-01 7.448413e-05 973 6.700000e-01 7.816801e-05 974 6.800000e-01 8.186006e-05 975 6.900000e-01 8.555725e-05 976 7.000000e-01 8.925692e-05 977 7.100000e-01 9.295679e-05 978 7.200000e-01 9.665486e-05 979 7.300000e-01 1.003494e-04 980 7.400000e-01 1.040389e-04 981 7.500000e-01 1.077221e-04 982 7.600000e-01 1.113977e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 1.150650e-04 984 7.800000e-01 1.187228e-04 985 7.900000e-01 1.223706e-04 986 8.000000e-01 1.260077e-04 987 8.100000e-01 1.296334e-04 988 8.200000e-01 1.332472e-04 989 8.300000e-01 1.368488e-04 990 8.400000e-01 1.404377e-04 991 8.500000e-01 1.440135e-04 992 8.600000e-01 1.475759e-04 993 8.700000e-01 1.511247e-04 994 8.800000e-01 1.546595e-04 995 8.900000e-01 1.581802e-04 996 9.000000e-01 1.616866e-04 997 9.100000e-01 1.651784e-04 998 9.200000e-01 1.686555e-04 999 9.300000e-01 1.721177e-04 1000 9.400000e-01 1.755649e-04 1001 9.500000e-01 1.789970e-04 1002 9.600000e-01 1.824138e-04 1003 9.700000e-01 1.858152e-04 1004 9.800000e-01 1.892012e-04 1005 9.900000e-01 1.925716e-04 1006 1.000000e+00 1.959263e-04 1007 1.010000e+00 1.992653e-04 1008 1.020000e+00 2.025885e-04 1009 1.030000e+00 2.058958e-04 1010 1.040000e+00 2.091871e-04 1011 1.050000e+00 2.124624e-04 1012 1.060000e+00 2.157217e-04 1013 1.070000e+00 2.189649e-04 1014 1.080000e+00 2.221918e-04 1015 1.090000e+00 2.254026e-04 1016 1.100000e+00 2.285972e-04 1017 1.110000e+00 2.317754e-04 1018 1.120000e+00 2.349373e-04 1019 1.130000e+00 2.380829e-04 1020 1.140000e+00 2.412121e-04 1021 1.150000e+00 2.443249e-04 1022 1.160000e+00 2.474213e-04 1023 1.170000e+00 2.505012e-04 1024 1.180000e+00 2.535646e-04 1025 1.190000e+00 2.566115e-04 1026 1.200000e+00 2.596420e-04 1027 1.210000e+00 2.626559e-04 1028 1.220000e+00 2.656533e-04 1029 1.230000e+00 2.686342e-04 1030 1.240000e+00 2.715985e-04 1031 1.250000e+00 2.745463e-04 1032 1.260000e+00 2.774776e-04 1033 1.270000e+00 2.803922e-04 1034 1.280000e+00 2.832904e-04 1035 1.290000e+00 2.861720e-04 1036 1.300000e+00 2.890371e-04 1037 1.310000e+00 2.918856e-04 1038 1.320000e+00 2.947176e-04 1039 1.330000e+00 2.975331e-04 1040 1.340000e+00 3.003320e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 3.031145e-04 1042 1.360000e+00 3.058805e-04 1043 1.370000e+00 3.086300e-04 1044 1.380000e+00 3.113631e-04 1045 1.390000e+00 3.140797e-04 1046 1.400000e+00 3.167799e-04 1047 1.410000e+00 3.194637e-04 1048 1.420000e+00 3.221311e-04 1049 1.430000e+00 3.247822e-04 1050 1.440000e+00 3.274169e-04 1051 1.450000e+00 3.300354e-04 1052 1.460000e+00 3.326375e-04 1053 1.470000e+00 3.352234e-04 1054 1.480000e+00 3.377930e-04 1055 1.490000e+00 3.403465e-04 1056 1.500000e+00 3.428837e-04 1057 0.000000e+00 4.795506e-10 1058 1.000000e-02 6.196464e-10 1059 2.000000e-02 8.091557e-10 1060 3.000000e-02 1.065278e-09 1061 4.000000e-02 1.411076e-09 1062 5.000000e-02 1.877411e-09 1063 6.000000e-02 2.505474e-09 1064 7.000000e-02 3.350099e-09 1065 8.000000e-02 4.484049e-09 1066 9.000000e-02 6.003532e-09 1067 1.000000e-01 8.035260e-09 1068 1.100000e-01 1.074536e-08 1069 1.200000e-01 1.435056e-08 1070 1.300000e-01 1.913204e-08 1071 1.400000e-01 2.545238e-08 1072 1.500000e-01 3.377604e-08 1073 1.600000e-01 4.469378e-08 1074 1.700000e-01 5.895133e-08 1075 1.800000e-01 7.748264e-08 1076 1.900000e-01 1.014480e-07 1077 2.000000e-01 1.322771e-07 1078 2.100000e-01 1.717180e-07 1079 2.200000e-01 2.218914e-07 1080 2.300000e-01 2.853528e-07 1081 2.400000e-01 3.651618e-07 1082 2.500000e-01 4.649620e-07 1083 2.600000e-01 5.890700e-07 1084 2.700000e-01 7.425761e-07 1085 2.800000e-01 9.314530e-07 1086 2.900000e-01 1.162668e-06 1087 3.000000e-01 1.444289e-06 1088 3.100000e-01 1.785569e-06 1089 3.200000e-01 2.196987e-06 1090 3.300000e-01 2.690219e-06 1091 3.400000e-01 3.278015e-06 1092 3.500000e-01 3.973945e-06 1093 3.600000e-01 4.792012e-06 1094 3.700000e-01 5.746120e-06 1095 3.800000e-01 6.849443e-06 1096 3.900000e-01 8.113722e-06 1097 4.000000e-01 9.548603e-06 1098 4.100000e-01 1.116107e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 1.295505e-05 1100 4.300000e-01 1.493128e-05 1101 4.400000e-01 1.708735e-05 1102 4.500000e-01 1.941797e-05 1103 4.600000e-01 2.191543e-05 1104 4.700000e-01 2.457007e-05 1105 4.800000e-01 2.737081e-05 1106 4.900000e-01 3.030571e-05 1107 5.000000e-01 3.336239e-05 1108 5.100000e-01 3.652846e-05 1109 5.200000e-01 3.979178e-05 1110 5.300000e-01 4.314078e-05 1111 5.400000e-01 4.656455e-05 1112 5.500000e-01 5.005299e-05 1113 5.600000e-01 5.359684e-05 1114 5.700000e-01 5.718771e-05 1115 5.800000e-01 6.081804e-05 1116 5.900000e-01 6.448109e-05 1117 6.000000e-01 6.817088e-05 1118 6.100000e-01 7.188214e-05 1119 6.200000e-01 7.561020e-05 1120 6.300000e-01 7.935101e-05 1121 6.400000e-01 8.310101e-05 1122 6.500000e-01 8.685708e-05 1123 6.600000e-01 9.061652e-05 1124 6.700000e-01 9.437698e-05 1125 6.800000e-01 9.813641e-05 1126 6.900000e-01 1.018930e-04 1127 7.000000e-01 1.056453e-04 1128 7.100000e-01 1.093918e-04 1129 7.200000e-01 1.131315e-04 1130 7.300000e-01 1.168633e-04 1131 7.400000e-01 1.205862e-04 1132 7.500000e-01 1.242996e-04 1133 7.600000e-01 1.280027e-04 1134 7.700000e-01 1.316948e-04 1135 7.800000e-01 1.353756e-04 1136 7.900000e-01 1.390444e-04 1137 8.000000e-01 1.427010e-04 1138 8.100000e-01 1.463448e-04 1139 8.200000e-01 1.499756e-04 1140 8.300000e-01 1.535930e-04 1141 8.400000e-01 1.571969e-04 1142 8.500000e-01 1.607868e-04 1143 8.600000e-01 1.643627e-04 1144 8.700000e-01 1.679244e-04 1145 8.800000e-01 1.714715e-04 1146 8.900000e-01 1.750041e-04 1147 9.000000e-01 1.785218e-04 1148 9.100000e-01 1.820246e-04 1149 9.200000e-01 1.855123e-04 1150 9.300000e-01 1.889849e-04 1151 9.400000e-01 1.924421e-04 1152 9.500000e-01 1.958840e-04 1153 9.600000e-01 1.993103e-04 1154 9.700000e-01 2.027210e-04 1155 9.800000e-01 2.061161e-04 1156 9.900000e-01 2.094954e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 2.128588e-04 1158 1.010000e+00 2.162064e-04 1159 1.020000e+00 2.195379e-04 1160 1.030000e+00 2.228535e-04 1161 1.040000e+00 2.261529e-04 1162 1.050000e+00 2.294362e-04 1163 1.060000e+00 2.327033e-04 1164 1.070000e+00 2.359541e-04 1165 1.080000e+00 2.391887e-04 1166 1.090000e+00 2.424070e-04 1167 1.100000e+00 2.456088e-04 1168 1.110000e+00 2.487943e-04 1169 1.120000e+00 2.519633e-04 1170 1.130000e+00 2.551159e-04 1171 1.140000e+00 2.582520e-04 1172 1.150000e+00 2.613716e-04 1173 1.160000e+00 2.644746e-04 1174 1.170000e+00 2.675611e-04 1175 1.180000e+00 2.706310e-04 1176 1.190000e+00 2.736843e-04 1177 1.200000e+00 2.767210e-04 1178 1.210000e+00 2.797411e-04 1179 1.220000e+00 2.827445e-04 1180 1.230000e+00 2.857313e-04 1181 1.240000e+00 2.887015e-04 1182 1.250000e+00 2.916550e-04 1183 1.260000e+00 2.945919e-04 1184 1.270000e+00 2.975121e-04 1185 1.280000e+00 3.004156e-04 1186 1.290000e+00 3.033025e-04 1187 1.300000e+00 3.061728e-04 1188 1.310000e+00 3.090264e-04 1189 1.320000e+00 3.118634e-04 1190 1.330000e+00 3.146837e-04 1191 1.340000e+00 3.174874e-04 1192 1.350000e+00 3.202745e-04 1193 1.360000e+00 3.230451e-04 1194 1.370000e+00 3.257990e-04 1195 1.380000e+00 3.285363e-04 1196 1.390000e+00 3.312571e-04 1197 1.400000e+00 3.339614e-04 1198 1.410000e+00 3.366492e-04 1199 1.420000e+00 3.393204e-04 1200 1.430000e+00 3.419752e-04 1201 1.440000e+00 3.446135e-04 1202 1.450000e+00 3.472354e-04 1203 1.460000e+00 3.498409e-04 1204 1.470000e+00 3.524300e-04 1205 1.480000e+00 3.550027e-04 1206 1.490000e+00 3.575591e-04 1207 1.500000e+00 3.600992e-04 1208 0.000000e+00 3.964428e-09 1209 1.000000e-02 4.609593e-09 1210 2.000000e-02 5.472023e-09 1211 3.000000e-02 6.623095e-09 1212 4.000000e-02 8.156726e-09 1213 5.000000e-02 1.019603e-08 1214 6.000000e-02 1.290176e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 1.648280e-08 1216 8.000000e-02 2.120931e-08 1217 9.000000e-02 2.742865e-08 1218 1.000000e-01 3.558485e-08 1219 1.100000e-01 4.624181e-08 1220 1.200000e-01 6.011071e-08 1221 1.300000e-01 7.808208e-08 1222 1.400000e-01 1.012627e-07 1223 1.500000e-01 1.310179e-07 1224 1.600000e-01 1.690196e-07 1225 1.700000e-01 2.173002e-07 1226 1.800000e-01 2.783144e-07 1227 1.900000e-01 3.550087e-07 1228 2.000000e-01 4.508997e-07 1229 2.100000e-01 5.701636e-07 1230 2.200000e-01 7.177351e-07 1231 2.300000e-01 8.994153e-07 1232 2.400000e-01 1.121983e-06 1233 2.500000e-01 1.393303e-06 1234 2.600000e-01 1.722410e-06 1235 2.700000e-01 2.119565e-06 1236 2.800000e-01 2.596235e-06 1237 2.900000e-01 3.164994e-06 1238 3.000000e-01 3.839298e-06 1239 3.100000e-01 4.633133e-06 1240 3.200000e-01 5.560519e-06 1241 3.300000e-01 6.634904e-06 1242 3.400000e-01 7.868491e-06 1243 3.500000e-01 9.271556e-06 1244 3.600000e-01 1.085187e-05 1245 3.700000e-01 1.261427e-05 1246 3.800000e-01 1.456043e-05 1247 3.900000e-01 1.668888e-05 1248 4.000000e-01 1.899525e-05 1249 4.100000e-01 2.147258e-05 1250 4.200000e-01 2.411187e-05 1251 4.300000e-01 2.690254e-05 1252 4.400000e-01 2.983300e-05 1253 4.500000e-01 3.289107e-05 1254 4.600000e-01 3.606442e-05 1255 4.700000e-01 3.934088e-05 1256 4.800000e-01 4.270873e-05 1257 4.900000e-01 4.615685e-05 1258 5.000000e-01 4.967486e-05 1259 5.100000e-01 5.325320e-05 1260 5.200000e-01 5.688315e-05 1261 5.300000e-01 6.055682e-05 1262 5.400000e-01 6.426712e-05 1263 5.500000e-01 6.800776e-05 1264 5.600000e-01 7.177314e-05 1265 5.700000e-01 7.555832e-05 1266 5.800000e-01 7.935896e-05 1267 5.900000e-01 8.317123e-05 1268 6.000000e-01 8.699182e-05 1269 6.100000e-01 9.081781e-05 1270 6.200000e-01 9.464666e-05 1271 6.300000e-01 9.847615e-05 1272 6.400000e-01 1.023043e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 1.061296e-04 1274 6.600000e-01 1.099504e-04 1275 6.700000e-01 1.137654e-04 1276 6.800000e-01 1.175737e-04 1277 6.900000e-01 1.213741e-04 1278 7.000000e-01 1.251658e-04 1279 7.100000e-01 1.289481e-04 1280 7.200000e-01 1.327204e-04 1281 7.300000e-01 1.364819e-04 1282 7.400000e-01 1.402322e-04 1283 7.500000e-01 1.439708e-04 1284 7.600000e-01 1.476974e-04 1285 7.700000e-01 1.514114e-04 1286 7.800000e-01 1.551127e-04 1287 7.900000e-01 1.588009e-04 1288 8.000000e-01 1.624758e-04 1289 8.100000e-01 1.661370e-04 1290 8.200000e-01 1.697844e-04 1291 8.300000e-01 1.734177e-04 1292 8.400000e-01 1.770368e-04 1293 8.500000e-01 1.806415e-04 1294 8.600000e-01 1.842316e-04 1295 8.700000e-01 1.878070e-04 1296 8.800000e-01 1.913676e-04 1297 8.900000e-01 1.949131e-04 1298 9.000000e-01 1.984436e-04 1299 9.100000e-01 2.019588e-04 1300 9.200000e-01 2.054586e-04 1301 9.300000e-01 2.089431e-04 1302 9.400000e-01 2.124120e-04 1303 9.500000e-01 2.158652e-04 1304 9.600000e-01 2.193028e-04 1305 9.700000e-01 2.227246e-04 1306 9.800000e-01 2.261306e-04 1307 9.900000e-01 2.295206e-04 1308 1.000000e+00 2.328946e-04 1309 1.010000e+00 2.362526e-04 1310 1.020000e+00 2.395944e-04 1311 1.030000e+00 2.429201e-04 1312 1.040000e+00 2.462296e-04 1313 1.050000e+00 2.495227e-04 1314 1.060000e+00 2.527996e-04 1315 1.070000e+00 2.560601e-04 1316 1.080000e+00 2.593041e-04 1317 1.090000e+00 2.625318e-04 1318 1.100000e+00 2.657429e-04 1319 1.110000e+00 2.689375e-04 1320 1.120000e+00 2.721156e-04 1321 1.130000e+00 2.752771e-04 1322 1.140000e+00 2.784220e-04 1323 1.150000e+00 2.815503e-04 1324 1.160000e+00 2.846619e-04 1325 1.170000e+00 2.877568e-04 1326 1.180000e+00 2.908351e-04 1327 1.190000e+00 2.938966e-04 1328 1.200000e+00 2.969414e-04 1329 1.210000e+00 2.999695e-04 1330 1.220000e+00 3.029808e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 3.059754e-04 1332 1.240000e+00 3.089532e-04 1333 1.250000e+00 3.119142e-04 1334 1.260000e+00 3.148585e-04 1335 1.270000e+00 3.177860e-04 1336 1.280000e+00 3.206967e-04 1337 1.290000e+00 3.235906e-04 1338 1.300000e+00 3.264678e-04 1339 1.310000e+00 3.293282e-04 1340 1.320000e+00 3.321718e-04 1341 1.330000e+00 3.349986e-04 1342 1.340000e+00 3.378087e-04 1343 1.350000e+00 3.406021e-04 1344 1.360000e+00 3.433787e-04 1345 1.370000e+00 3.461387e-04 1346 1.380000e+00 3.488819e-04 1347 1.390000e+00 3.516084e-04 1348 1.400000e+00 3.543182e-04 1349 1.410000e+00 3.570114e-04 1350 1.420000e+00 3.596880e-04 1351 1.430000e+00 3.623479e-04 1352 1.440000e+00 3.649912e-04 1353 1.450000e+00 3.676180e-04 1354 1.460000e+00 3.702282e-04 1355 1.470000e+00 3.728219e-04 1356 1.480000e+00 3.753991e-04 1357 1.490000e+00 3.779598e-04 1358 1.500000e+00 3.805040e-04 ngspice-26/tests/bsim3soipd/inv2.out0000644000265600020320000002735512264261473017072 0ustar andreasadmin No. of Data Rows : 251 Circuit: * model = BSIMSOI (PD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. * model = BSIMSOI (PD) -------------------------------------------------------------------------------- Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 2.499999e+00 1 1.000000e-02 1.000000e-02 2.499998e+00 2 2.000000e-02 2.000000e-02 2.499998e+00 3 3.000000e-02 3.000000e-02 2.499997e+00 4 4.000000e-02 4.000000e-02 2.499996e+00 5 5.000000e-02 5.000000e-02 2.499994e+00 6 6.000000e-02 6.000000e-02 2.499991e+00 7 7.000000e-02 7.000000e-02 2.499986e+00 8 8.000000e-02 8.000000e-02 2.499980e+00 9 9.000000e-02 9.000000e-02 2.499970e+00 10 1.000000e-01 1.000000e-01 2.499955e+00 11 1.100000e-01 1.100000e-01 2.499934e+00 12 1.200000e-01 1.200000e-01 2.499903e+00 13 1.300000e-01 1.300000e-01 2.499859e+00 14 1.400000e-01 1.400000e-01 2.499799e+00 15 1.500000e-01 1.500000e-01 2.499717e+00 16 1.600000e-01 1.600000e-01 2.499607e+00 17 1.700000e-01 1.700000e-01 2.499461e+00 18 1.800000e-01 1.800000e-01 2.499270e+00 19 1.900000e-01 1.900000e-01 2.499024e+00 20 2.000000e-01 2.000000e-01 2.498710e+00 21 2.100000e-01 2.100000e-01 2.498318e+00 22 2.200000e-01 2.200000e-01 2.497835e+00 23 2.300000e-01 2.300000e-01 2.497253e+00 24 2.400000e-01 2.400000e-01 2.496561e+00 25 2.500000e-01 2.500000e-01 2.495756e+00 26 2.600000e-01 2.600000e-01 2.494833e+00 27 2.700000e-01 2.700000e-01 2.493792e+00 28 2.800000e-01 2.800000e-01 2.492633e+00 29 2.900000e-01 2.900000e-01 2.491358e+00 30 3.000000e-01 3.000000e-01 2.489971e+00 31 3.100000e-01 3.100000e-01 2.488475e+00 32 3.200000e-01 3.200000e-01 2.486875e+00 33 3.300000e-01 3.300000e-01 2.485175e+00 34 3.400000e-01 3.400000e-01 2.483378e+00 35 3.500000e-01 3.500000e-01 2.481488e+00 36 3.600000e-01 3.600000e-01 2.479508e+00 37 3.700000e-01 3.700000e-01 2.477441e+00 38 3.800000e-01 3.800000e-01 2.475290e+00 39 3.900000e-01 3.900000e-01 2.473056e+00 40 4.000000e-01 4.000000e-01 2.470741e+00 41 4.100000e-01 4.100000e-01 2.468347e+00 42 4.200000e-01 4.200000e-01 2.465873e+00 43 4.300000e-01 4.300000e-01 2.463322e+00 44 4.400000e-01 4.400000e-01 2.460692e+00 45 4.500000e-01 4.500000e-01 2.457984e+00 46 4.600000e-01 4.600000e-01 2.455198e+00 47 4.700000e-01 4.700000e-01 2.452333e+00 48 4.800000e-01 4.800000e-01 2.449390e+00 49 4.900000e-01 4.900000e-01 2.446366e+00 50 5.000000e-01 5.000000e-01 2.443261e+00 51 5.100000e-01 5.100000e-01 2.440073e+00 52 5.200000e-01 5.200000e-01 2.436803e+00 53 5.300000e-01 5.300000e-01 2.433447e+00 54 5.400000e-01 5.400000e-01 2.430005e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 55 5.500000e-01 5.500000e-01 2.426475e+00 56 5.600000e-01 5.600000e-01 2.422854e+00 57 5.700000e-01 5.700000e-01 2.419142e+00 58 5.800000e-01 5.800000e-01 2.415335e+00 59 5.900000e-01 5.900000e-01 2.411431e+00 60 6.000000e-01 6.000000e-01 2.407429e+00 61 6.100000e-01 6.100000e-01 2.403324e+00 62 6.200000e-01 6.200000e-01 2.399115e+00 63 6.300000e-01 6.300000e-01 2.394799e+00 64 6.400000e-01 6.400000e-01 2.390372e+00 65 6.500000e-01 6.500000e-01 2.385830e+00 66 6.600000e-01 6.600000e-01 2.381171e+00 67 6.700000e-01 6.700000e-01 2.376391e+00 68 6.800000e-01 6.800000e-01 2.371484e+00 69 6.900000e-01 6.900000e-01 2.366448e+00 70 7.000000e-01 7.000000e-01 2.361277e+00 71 7.100000e-01 7.100000e-01 2.355966e+00 72 7.200000e-01 7.200000e-01 2.350511e+00 73 7.300000e-01 7.300000e-01 2.344905e+00 74 7.400000e-01 7.400000e-01 2.339142e+00 75 7.500000e-01 7.500000e-01 2.333216e+00 76 7.600000e-01 7.600000e-01 2.327120e+00 77 7.700000e-01 7.700000e-01 2.320847e+00 78 7.800000e-01 7.800000e-01 2.314387e+00 79 7.900000e-01 7.900000e-01 2.307733e+00 80 8.000000e-01 8.000000e-01 2.300875e+00 81 8.100000e-01 8.100000e-01 2.293803e+00 82 8.200000e-01 8.200000e-01 2.286505e+00 83 8.300000e-01 8.300000e-01 2.278969e+00 84 8.400000e-01 8.400000e-01 2.271182e+00 85 8.500000e-01 8.500000e-01 2.263129e+00 86 8.600000e-01 8.600000e-01 2.254795e+00 87 8.700000e-01 8.700000e-01 2.246161e+00 88 8.800000e-01 8.800000e-01 2.237209e+00 89 8.900000e-01 8.900000e-01 2.227915e+00 90 9.000000e-01 9.000000e-01 2.218257e+00 91 9.100000e-01 9.100000e-01 2.208207e+00 92 9.200000e-01 9.200000e-01 2.197734e+00 93 9.300000e-01 9.300000e-01 2.186805e+00 94 9.400000e-01 9.400000e-01 2.175378e+00 95 9.500000e-01 9.500000e-01 2.163411e+00 96 9.600000e-01 9.600000e-01 2.150849e+00 97 9.700000e-01 9.700000e-01 2.137634e+00 98 9.800000e-01 9.800000e-01 2.123693e+00 99 9.900000e-01 9.900000e-01 2.108943e+00 100 1.000000e+00 1.000000e+00 2.093282e+00 101 1.010000e+00 1.010000e+00 2.076587e+00 102 1.020000e+00 1.020000e+00 2.058705e+00 103 1.030000e+00 1.030000e+00 2.039446e+00 104 1.040000e+00 1.040000e+00 2.018564e+00 105 1.050000e+00 1.050000e+00 1.995738e+00 106 1.060000e+00 1.060000e+00 1.970541e+00 107 1.070000e+00 1.070000e+00 1.942391e+00 108 1.080000e+00 1.080000e+00 1.910503e+00 109 1.090000e+00 1.090000e+00 1.873883e+00 110 1.100000e+00 1.100000e+00 1.831549e+00 111 1.110000e+00 1.110000e+00 1.783134e+00 112 1.120000e+00 1.120000e+00 1.729441e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 113 1.130000e+00 1.130000e+00 1.672066e+00 114 1.140000e+00 1.140000e+00 1.612596e+00 115 1.150000e+00 1.150000e+00 1.552253e+00 116 1.160000e+00 1.160000e+00 1.491924e+00 117 1.170000e+00 1.170000e+00 1.432276e+00 118 1.180000e+00 1.180000e+00 1.373853e+00 119 1.190000e+00 1.190000e+00 1.317137e+00 120 1.200000e+00 1.200000e+00 1.262570e+00 121 1.210000e+00 1.210000e+00 1.210544e+00 122 1.220000e+00 1.220000e+00 1.161304e+00 123 1.230000e+00 1.230000e+00 1.114785e+00 124 1.240000e+00 1.240000e+00 1.070343e+00 125 1.250000e+00 1.250000e+00 1.026292e+00 126 1.260000e+00 1.260000e+00 9.804266e-01 127 1.270000e+00 1.270000e+00 9.295075e-01 128 1.280000e+00 1.280000e+00 8.696202e-01 129 1.290000e+00 1.290000e+00 8.003151e-01 130 1.300000e+00 1.300000e+00 7.294616e-01 131 1.310000e+00 1.310000e+00 6.656461e-01 132 1.320000e+00 1.320000e+00 6.121224e-01 133 1.330000e+00 1.330000e+00 5.684470e-01 134 1.340000e+00 1.340000e+00 5.324476e-01 135 1.350000e+00 1.350000e+00 5.019354e-01 136 1.360000e+00 1.360000e+00 4.753944e-01 137 1.370000e+00 1.370000e+00 4.518481e-01 138 1.380000e+00 1.380000e+00 4.306409e-01 139 1.390000e+00 1.390000e+00 4.113161e-01 140 1.400000e+00 1.400000e+00 3.935456e-01 141 1.410000e+00 1.410000e+00 3.770853e-01 142 1.420000e+00 1.420000e+00 3.617485e-01 143 1.430000e+00 1.430000e+00 3.473885e-01 144 1.440000e+00 1.440000e+00 3.338875e-01 145 1.450000e+00 1.450000e+00 3.211495e-01 146 1.460000e+00 1.460000e+00 3.090944e-01 147 1.470000e+00 1.470000e+00 2.976552e-01 148 1.480000e+00 1.480000e+00 2.867746e-01 149 1.490000e+00 1.490000e+00 2.764037e-01 150 1.500000e+00 1.500000e+00 2.664997e-01 151 1.510000e+00 1.510000e+00 2.570257e-01 152 1.520000e+00 1.520000e+00 2.479489e-01 153 1.530000e+00 1.530000e+00 2.392404e-01 154 1.540000e+00 1.540000e+00 2.308746e-01 155 1.550000e+00 1.550000e+00 2.228285e-01 156 1.560000e+00 1.560000e+00 2.150814e-01 157 1.570000e+00 1.570000e+00 2.076149e-01 158 1.580000e+00 1.580000e+00 2.004121e-01 159 1.590000e+00 1.590000e+00 1.934577e-01 160 1.600000e+00 1.600000e+00 1.867378e-01 161 1.610000e+00 1.610000e+00 1.802398e-01 162 1.620000e+00 1.620000e+00 1.739519e-01 163 1.630000e+00 1.630000e+00 1.678637e-01 164 1.640000e+00 1.640000e+00 1.619651e-01 165 1.650000e+00 1.650000e+00 1.562471e-01 166 1.660000e+00 1.660000e+00 1.507015e-01 167 1.670000e+00 1.670000e+00 1.453203e-01 168 1.680000e+00 1.680000e+00 1.400964e-01 169 1.690000e+00 1.690000e+00 1.350231e-01 170 1.700000e+00 1.700000e+00 1.300941e-01 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 171 1.710000e+00 1.710000e+00 1.253037e-01 172 1.720000e+00 1.720000e+00 1.206465e-01 173 1.730000e+00 1.730000e+00 1.161173e-01 174 1.740000e+00 1.740000e+00 1.117114e-01 175 1.750000e+00 1.750000e+00 1.074244e-01 176 1.760000e+00 1.760000e+00 1.032521e-01 177 1.770000e+00 1.770000e+00 9.919058e-02 178 1.780000e+00 1.780000e+00 9.523620e-02 179 1.790000e+00 1.790000e+00 9.138549e-02 180 1.800000e+00 1.800000e+00 8.763520e-02 181 1.810000e+00 1.810000e+00 8.398230e-02 182 1.820000e+00 1.820000e+00 8.042391e-02 183 1.830000e+00 1.830000e+00 7.695732e-02 184 1.840000e+00 1.840000e+00 7.358002e-02 185 1.850000e+00 1.850000e+00 7.028961e-02 186 1.860000e+00 1.860000e+00 6.708387e-02 187 1.870000e+00 1.870000e+00 6.396071e-02 188 1.880000e+00 1.880000e+00 6.091816e-02 189 1.890000e+00 1.890000e+00 5.795442e-02 190 1.900000e+00 1.900000e+00 5.506780e-02 191 1.910000e+00 1.910000e+00 5.225675e-02 192 1.920000e+00 1.920000e+00 4.951983e-02 193 1.930000e+00 1.930000e+00 4.685577e-02 194 1.940000e+00 1.940000e+00 4.426340e-02 195 1.950000e+00 1.950000e+00 4.174171e-02 196 1.960000e+00 1.960000e+00 3.928984e-02 197 1.970000e+00 1.970000e+00 3.690705e-02 198 1.980000e+00 1.980000e+00 3.459280e-02 199 1.990000e+00 1.990000e+00 3.234670e-02 200 2.000000e+00 2.000000e+00 3.016854e-02 201 2.010000e+00 2.010000e+00 2.805832e-02 202 2.020000e+00 2.020000e+00 2.601624e-02 203 2.030000e+00 2.030000e+00 2.404274e-02 204 2.040000e+00 2.040000e+00 2.213848e-02 205 2.050000e+00 2.050000e+00 2.030441e-02 206 2.060000e+00 2.060000e+00 1.854171e-02 207 2.070000e+00 2.070000e+00 1.685188e-02 208 2.080000e+00 2.080000e+00 1.523666e-02 209 2.090000e+00 2.090000e+00 1.369810e-02 210 2.100000e+00 2.100000e+00 1.223847e-02 211 2.110000e+00 2.110000e+00 1.086027e-02 212 2.120000e+00 2.120000e+00 9.566105e-03 213 2.130000e+00 2.130000e+00 8.358633e-03 214 2.140000e+00 2.140000e+00 7.240385e-03 215 2.150000e+00 2.150000e+00 6.213586e-03 216 2.160000e+00 2.160000e+00 5.279925e-03 217 2.170000e+00 2.170000e+00 4.440283e-03 218 2.180000e+00 2.180000e+00 3.694453e-03 219 2.190000e+00 2.190000e+00 3.040875e-03 220 2.200000e+00 2.200000e+00 2.476437e-03 221 2.210000e+00 2.210000e+00 1.996396e-03 222 2.220000e+00 2.220000e+00 1.594448e-03 223 2.230000e+00 2.230000e+00 1.262996e-03 224 2.240000e+00 2.240000e+00 9.935696e-04 225 2.250000e+00 2.250000e+00 7.773428e-04 226 2.260000e+00 2.260000e+00 6.056656e-04 227 2.270000e+00 2.270000e+00 4.705061e-04 228 2.280000e+00 2.280000e+00 3.647509e-04 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 229 2.290000e+00 2.290000e+00 2.823449e-04 230 2.300000e+00 2.300000e+00 2.182957e-04 231 2.310000e+00 2.310000e+00 1.685850e-04 232 2.320000e+00 2.320000e+00 1.300336e-04 233 2.330000e+00 2.330000e+00 1.001532e-04 234 2.340000e+00 2.340000e+00 7.700818e-05 235 2.350000e+00 2.350000e+00 5.909654e-05 236 2.360000e+00 2.360000e+00 4.525270e-05 237 2.370000e+00 2.370000e+00 3.457091e-05 238 2.380000e+00 2.380000e+00 2.634603e-05 239 2.390000e+00 2.390000e+00 2.002819e-05 240 2.400000e+00 2.400000e+00 1.518816e-05 241 2.410000e+00 2.410000e+00 1.149080e-05 242 2.420000e+00 2.420000e+00 8.674639e-06 243 2.430000e+00 2.430000e+00 6.536017e-06 244 2.440000e+00 2.440000e+00 4.916670e-06 245 2.450000e+00 2.450000e+00 3.693988e-06 246 2.460000e+00 2.460000e+00 2.773298e-06 247 2.470000e+00 2.470000e+00 2.081773e-06 248 2.480000e+00 2.480000e+00 1.563599e-06 249 2.490000e+00 2.490000e+00 1.176165e-06 250 2.500000e+00 2.500000e+00 8.870574e-07 ngspice-26/tests/bsim3soipd/RampVg2.cir0000644000265600020320000000050612264261473017425 0ustar andreasadmin* BSIMSOI (PD) example * * SOI, Ramp Vg Vd d 0 1.5 Vg g 0 0.0 PULSE 0V 2V .02n .1n .1n .2n .6n Ve e 0 0.0 Vs s 0 0.0 Vb b 0 0.0 m1 d g s e n1 w=10u l=0.25u debug=-1 .option gmin=1e-20 itl1=200 itl2=200 abstol=1e-9 noacct .tran 1p 1.0ns .save @m1[Vbs], V(g)/10 .print tran v(g)/10 .include nmospd.mod .end ngspice-26/tests/bsim3soipd/inv2.cir0000644000265600020320000000046312264261473017027 0ustar andreasadmin* model = BSIMSOI (PD) * * * SOI Inverter - floating body vin in 0 dc 2.5 vdd dd 0 dc 2.5 vss ss 0 dc 0 ve e 0 dc 1.25 m1 out in dd e p1 w=20u l=0.25u m2 out in ss e n1 w=10u l=0.25u .option itl1=500 gmin=1e-25 noacct .dc vin 0 2.5 0.01 .print dc v(in), v(out) .include nmospd.mod .include pmospd.mod ngspice-26/tests/bsim3soipd/ring51.cir0000644000265600020320000000071612264261473017257 0ustar andreasadmin* 51 stage Ring-Osc. (PD) vin in out 2 pulse 2 0 0.1n 5n 1 1 1 vdd dd 0 dc 0 pulse 0 2 0 1n 1 1 1 vss ss 0 dc 0 ve sub 0 dc 0 xinv1 dd ss sub in out25 inv25 xinv2 dd ss sub out25 out50 inv25 xinv5 dd ss sub out50 out inv1 xinv11 dd ss sub out buf inv1 cout buf ss 1pF xdum ss dum .option itl1=500 gmin=1e-15 itl4=10 noacct .dc vdd 0 2 0.01 .tran 0.2n 50n .print dc v(out) .print tran v(out) .include nmospd.mod .include pmospd.mod .include lib.h .end ngspice-26/tests/bsim3soipd/RampVg2.out0000644000265600020320000010425312264261473017463 0ustar andreasadmin Circuit: * BSIMSOI (PD) example Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Initial Transient Solution -------------------------- Node Voltage ---- ------- d 1.5 g 0 e 0 s 0 b 0 vb#branch 0 vs#branch 1.17881e-09 ve#branch 0 vg#branch 1.5e-20 vd#branch -1.17881e-09 No. of Data Rows : 1029 * BSIMSOI (PD) example -------------------------------------------------------------------------------- Index time v(g)/10 -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 1 1.000000e-14 0.000000e+00 2 2.000000e-14 0.000000e+00 3 4.000000e-14 0.000000e+00 4 8.000000e-14 0.000000e+00 5 1.600000e-13 0.000000e+00 6 3.200000e-13 0.000000e+00 7 6.400000e-13 0.000000e+00 8 1.280000e-12 0.000000e+00 9 2.280000e-12 0.000000e+00 10 3.280000e-12 0.000000e+00 11 4.280000e-12 0.000000e+00 12 5.280000e-12 0.000000e+00 13 6.280000e-12 0.000000e+00 14 7.280000e-12 0.000000e+00 15 8.280000e-12 0.000000e+00 16 9.280000e-12 0.000000e+00 17 1.028000e-11 0.000000e+00 18 1.128000e-11 0.000000e+00 19 1.228000e-11 0.000000e+00 20 1.328000e-11 0.000000e+00 21 1.428000e-11 0.000000e+00 22 1.528000e-11 0.000000e+00 23 1.628000e-11 0.000000e+00 24 1.728000e-11 0.000000e+00 25 1.828000e-11 0.000000e+00 26 1.928000e-11 0.000000e+00 27 2.000000e-11 0.000000e+00 28 2.010000e-11 2.000000e-04 29 2.030000e-11 6.000000e-04 30 2.070000e-11 1.400000e-03 31 2.150000e-11 3.000000e-03 32 2.250000e-11 5.000000e-03 33 2.350000e-11 7.000000e-03 34 2.450000e-11 9.000000e-03 35 2.550000e-11 1.100000e-02 36 2.650000e-11 1.300000e-02 37 2.750000e-11 1.500000e-02 38 2.850000e-11 1.700000e-02 39 2.950000e-11 1.900000e-02 40 3.050000e-11 2.100000e-02 41 3.150000e-11 2.300000e-02 42 3.250000e-11 2.500000e-02 43 3.350000e-11 2.700000e-02 44 3.450000e-11 2.900000e-02 45 3.550000e-11 3.100000e-02 46 3.650000e-11 3.300000e-02 47 3.750000e-11 3.500000e-02 48 3.850000e-11 3.700000e-02 49 3.950000e-11 3.900000e-02 50 4.050000e-11 4.100000e-02 51 4.150000e-11 4.300000e-02 52 4.250000e-11 4.500000e-02 53 4.350000e-11 4.700000e-02 54 4.450000e-11 4.900000e-02 Index time v(g)/10 -------------------------------------------------------------------------------- 55 4.550000e-11 5.100000e-02 56 4.650000e-11 5.300000e-02 57 4.750000e-11 5.500000e-02 58 4.850000e-11 5.700000e-02 59 4.950000e-11 5.900000e-02 60 5.050000e-11 6.100000e-02 61 5.150000e-11 6.300000e-02 62 5.250000e-11 6.500000e-02 63 5.350000e-11 6.700000e-02 64 5.450000e-11 6.900000e-02 65 5.550000e-11 7.100000e-02 66 5.650000e-11 7.300000e-02 67 5.750000e-11 7.500000e-02 68 5.850000e-11 7.700000e-02 69 5.950000e-11 7.900000e-02 70 6.050000e-11 8.100000e-02 71 6.150000e-11 8.300000e-02 72 6.250000e-11 8.500000e-02 73 6.350000e-11 8.700000e-02 74 6.450000e-11 8.900000e-02 75 6.550000e-11 9.100000e-02 76 6.650000e-11 9.300000e-02 77 6.750000e-11 9.500000e-02 78 6.850000e-11 9.700000e-02 79 6.950000e-11 9.900000e-02 80 7.050000e-11 1.010000e-01 81 7.150000e-11 1.030000e-01 82 7.250000e-11 1.050000e-01 83 7.350000e-11 1.070000e-01 84 7.450000e-11 1.090000e-01 85 7.550000e-11 1.110000e-01 86 7.650000e-11 1.130000e-01 87 7.750000e-11 1.150000e-01 88 7.850000e-11 1.170000e-01 89 7.950000e-11 1.190000e-01 90 8.050000e-11 1.210000e-01 91 8.150000e-11 1.230000e-01 92 8.250000e-11 1.250000e-01 93 8.350000e-11 1.270000e-01 94 8.450000e-11 1.290000e-01 95 8.550000e-11 1.310000e-01 96 8.650000e-11 1.330000e-01 97 8.750000e-11 1.350000e-01 98 8.850000e-11 1.370000e-01 99 8.950000e-11 1.390000e-01 100 9.050000e-11 1.410000e-01 101 9.150000e-11 1.430000e-01 102 9.250000e-11 1.450000e-01 103 9.350000e-11 1.470000e-01 104 9.450000e-11 1.490000e-01 105 9.550000e-11 1.510000e-01 106 9.650000e-11 1.530000e-01 107 9.750000e-11 1.550000e-01 108 9.850000e-11 1.570000e-01 109 9.950000e-11 1.590000e-01 110 1.005000e-10 1.610000e-01 111 1.015000e-10 1.630000e-01 112 1.025000e-10 1.650000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 113 1.035000e-10 1.670000e-01 114 1.045000e-10 1.690000e-01 115 1.055000e-10 1.710000e-01 116 1.065000e-10 1.730000e-01 117 1.075000e-10 1.750000e-01 118 1.085000e-10 1.770000e-01 119 1.095000e-10 1.790000e-01 120 1.105000e-10 1.810000e-01 121 1.115000e-10 1.830000e-01 122 1.125000e-10 1.850000e-01 123 1.135000e-10 1.870000e-01 124 1.145000e-10 1.890000e-01 125 1.155000e-10 1.910000e-01 126 1.165000e-10 1.930000e-01 127 1.175000e-10 1.950000e-01 128 1.185000e-10 1.970000e-01 129 1.195000e-10 1.990000e-01 130 1.200000e-10 2.000000e-01 131 1.201000e-10 2.000000e-01 132 1.203000e-10 2.000000e-01 133 1.207000e-10 2.000000e-01 134 1.215000e-10 2.000000e-01 135 1.225000e-10 2.000000e-01 136 1.235000e-10 2.000000e-01 137 1.245000e-10 2.000000e-01 138 1.255000e-10 2.000000e-01 139 1.265000e-10 2.000000e-01 140 1.275000e-10 2.000000e-01 141 1.285000e-10 2.000000e-01 142 1.295000e-10 2.000000e-01 143 1.305000e-10 2.000000e-01 144 1.315000e-10 2.000000e-01 145 1.325000e-10 2.000000e-01 146 1.335000e-10 2.000000e-01 147 1.345000e-10 2.000000e-01 148 1.355000e-10 2.000000e-01 149 1.365000e-10 2.000000e-01 150 1.375000e-10 2.000000e-01 151 1.385000e-10 2.000000e-01 152 1.395000e-10 2.000000e-01 153 1.405000e-10 2.000000e-01 154 1.415000e-10 2.000000e-01 155 1.425000e-10 2.000000e-01 156 1.435000e-10 2.000000e-01 157 1.445000e-10 2.000000e-01 158 1.455000e-10 2.000000e-01 159 1.465000e-10 2.000000e-01 160 1.475000e-10 2.000000e-01 161 1.485000e-10 2.000000e-01 162 1.495000e-10 2.000000e-01 163 1.505000e-10 2.000000e-01 164 1.515000e-10 2.000000e-01 165 1.525000e-10 2.000000e-01 166 1.535000e-10 2.000000e-01 167 1.545000e-10 2.000000e-01 168 1.555000e-10 2.000000e-01 169 1.565000e-10 2.000000e-01 170 1.575000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 171 1.585000e-10 2.000000e-01 172 1.595000e-10 2.000000e-01 173 1.605000e-10 2.000000e-01 174 1.615000e-10 2.000000e-01 175 1.625000e-10 2.000000e-01 176 1.635000e-10 2.000000e-01 177 1.645000e-10 2.000000e-01 178 1.655000e-10 2.000000e-01 179 1.665000e-10 2.000000e-01 180 1.675000e-10 2.000000e-01 181 1.685000e-10 2.000000e-01 182 1.695000e-10 2.000000e-01 183 1.705000e-10 2.000000e-01 184 1.715000e-10 2.000000e-01 185 1.725000e-10 2.000000e-01 186 1.735000e-10 2.000000e-01 187 1.745000e-10 2.000000e-01 188 1.755000e-10 2.000000e-01 189 1.765000e-10 2.000000e-01 190 1.775000e-10 2.000000e-01 191 1.785000e-10 2.000000e-01 192 1.795000e-10 2.000000e-01 193 1.805000e-10 2.000000e-01 194 1.815000e-10 2.000000e-01 195 1.825000e-10 2.000000e-01 196 1.835000e-10 2.000000e-01 197 1.845000e-10 2.000000e-01 198 1.855000e-10 2.000000e-01 199 1.865000e-10 2.000000e-01 200 1.875000e-10 2.000000e-01 201 1.885000e-10 2.000000e-01 202 1.895000e-10 2.000000e-01 203 1.905000e-10 2.000000e-01 204 1.915000e-10 2.000000e-01 205 1.925000e-10 2.000000e-01 206 1.935000e-10 2.000000e-01 207 1.945000e-10 2.000000e-01 208 1.955000e-10 2.000000e-01 209 1.965000e-10 2.000000e-01 210 1.975000e-10 2.000000e-01 211 1.985000e-10 2.000000e-01 212 1.995000e-10 2.000000e-01 213 2.005000e-10 2.000000e-01 214 2.015000e-10 2.000000e-01 215 2.025000e-10 2.000000e-01 216 2.035000e-10 2.000000e-01 217 2.045000e-10 2.000000e-01 218 2.055000e-10 2.000000e-01 219 2.065000e-10 2.000000e-01 220 2.075000e-10 2.000000e-01 221 2.085000e-10 2.000000e-01 222 2.095000e-10 2.000000e-01 223 2.105000e-10 2.000000e-01 224 2.115000e-10 2.000000e-01 225 2.125000e-10 2.000000e-01 226 2.135000e-10 2.000000e-01 227 2.145000e-10 2.000000e-01 228 2.155000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 229 2.165000e-10 2.000000e-01 230 2.175000e-10 2.000000e-01 231 2.185000e-10 2.000000e-01 232 2.195000e-10 2.000000e-01 233 2.205000e-10 2.000000e-01 234 2.215000e-10 2.000000e-01 235 2.225000e-10 2.000000e-01 236 2.235000e-10 2.000000e-01 237 2.245000e-10 2.000000e-01 238 2.255000e-10 2.000000e-01 239 2.265000e-10 2.000000e-01 240 2.275000e-10 2.000000e-01 241 2.285000e-10 2.000000e-01 242 2.295000e-10 2.000000e-01 243 2.305000e-10 2.000000e-01 244 2.315000e-10 2.000000e-01 245 2.325000e-10 2.000000e-01 246 2.335000e-10 2.000000e-01 247 2.345000e-10 2.000000e-01 248 2.355000e-10 2.000000e-01 249 2.365000e-10 2.000000e-01 250 2.375000e-10 2.000000e-01 251 2.385000e-10 2.000000e-01 252 2.395000e-10 2.000000e-01 253 2.405000e-10 2.000000e-01 254 2.415000e-10 2.000000e-01 255 2.425000e-10 2.000000e-01 256 2.435000e-10 2.000000e-01 257 2.445000e-10 2.000000e-01 258 2.455000e-10 2.000000e-01 259 2.465000e-10 2.000000e-01 260 2.475000e-10 2.000000e-01 261 2.485000e-10 2.000000e-01 262 2.495000e-10 2.000000e-01 263 2.505000e-10 2.000000e-01 264 2.515000e-10 2.000000e-01 265 2.525000e-10 2.000000e-01 266 2.535000e-10 2.000000e-01 267 2.545000e-10 2.000000e-01 268 2.555000e-10 2.000000e-01 269 2.565000e-10 2.000000e-01 270 2.575000e-10 2.000000e-01 271 2.585000e-10 2.000000e-01 272 2.595000e-10 2.000000e-01 273 2.605000e-10 2.000000e-01 274 2.615000e-10 2.000000e-01 275 2.625000e-10 2.000000e-01 276 2.635000e-10 2.000000e-01 277 2.645000e-10 2.000000e-01 278 2.655000e-10 2.000000e-01 279 2.665000e-10 2.000000e-01 280 2.675000e-10 2.000000e-01 281 2.685000e-10 2.000000e-01 282 2.695000e-10 2.000000e-01 283 2.705000e-10 2.000000e-01 284 2.715000e-10 2.000000e-01 285 2.725000e-10 2.000000e-01 286 2.735000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 287 2.745000e-10 2.000000e-01 288 2.755000e-10 2.000000e-01 289 2.765000e-10 2.000000e-01 290 2.775000e-10 2.000000e-01 291 2.785000e-10 2.000000e-01 292 2.795000e-10 2.000000e-01 293 2.805000e-10 2.000000e-01 294 2.815000e-10 2.000000e-01 295 2.825000e-10 2.000000e-01 296 2.835000e-10 2.000000e-01 297 2.845000e-10 2.000000e-01 298 2.855000e-10 2.000000e-01 299 2.865000e-10 2.000000e-01 300 2.875000e-10 2.000000e-01 301 2.885000e-10 2.000000e-01 302 2.895000e-10 2.000000e-01 303 2.905000e-10 2.000000e-01 304 2.915000e-10 2.000000e-01 305 2.925000e-10 2.000000e-01 306 2.935000e-10 2.000000e-01 307 2.945000e-10 2.000000e-01 308 2.955000e-10 2.000000e-01 309 2.965000e-10 2.000000e-01 310 2.975000e-10 2.000000e-01 311 2.985000e-10 2.000000e-01 312 2.995000e-10 2.000000e-01 313 3.005000e-10 2.000000e-01 314 3.015000e-10 2.000000e-01 315 3.025000e-10 2.000000e-01 316 3.035000e-10 2.000000e-01 317 3.045000e-10 2.000000e-01 318 3.055000e-10 2.000000e-01 319 3.065000e-10 2.000000e-01 320 3.075000e-10 2.000000e-01 321 3.085000e-10 2.000000e-01 322 3.095000e-10 2.000000e-01 323 3.105000e-10 2.000000e-01 324 3.115000e-10 2.000000e-01 325 3.125000e-10 2.000000e-01 326 3.135000e-10 2.000000e-01 327 3.145000e-10 2.000000e-01 328 3.155000e-10 2.000000e-01 329 3.165000e-10 2.000000e-01 330 3.175000e-10 2.000000e-01 331 3.185000e-10 2.000000e-01 332 3.195000e-10 2.000000e-01 333 3.200000e-10 2.000000e-01 334 3.201000e-10 1.998000e-01 335 3.203000e-10 1.994000e-01 336 3.207000e-10 1.986000e-01 337 3.215000e-10 1.970000e-01 338 3.225000e-10 1.950000e-01 339 3.235000e-10 1.930000e-01 340 3.245000e-10 1.910000e-01 341 3.255000e-10 1.890000e-01 342 3.265000e-10 1.870000e-01 343 3.275000e-10 1.850000e-01 344 3.285000e-10 1.830000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 345 3.295000e-10 1.810000e-01 346 3.305000e-10 1.790000e-01 347 3.315000e-10 1.770000e-01 348 3.325000e-10 1.750000e-01 349 3.335000e-10 1.730000e-01 350 3.345000e-10 1.710000e-01 351 3.355000e-10 1.690000e-01 352 3.365000e-10 1.670000e-01 353 3.375000e-10 1.650000e-01 354 3.385000e-10 1.630000e-01 355 3.395000e-10 1.610000e-01 356 3.405000e-10 1.590000e-01 357 3.415000e-10 1.570000e-01 358 3.425000e-10 1.550000e-01 359 3.435000e-10 1.530000e-01 360 3.445000e-10 1.510000e-01 361 3.455000e-10 1.490000e-01 362 3.465000e-10 1.470000e-01 363 3.475000e-10 1.450000e-01 364 3.485000e-10 1.430000e-01 365 3.495000e-10 1.410000e-01 366 3.505000e-10 1.390000e-01 367 3.515000e-10 1.370000e-01 368 3.525000e-10 1.350000e-01 369 3.535000e-10 1.330000e-01 370 3.545000e-10 1.310000e-01 371 3.555000e-10 1.290000e-01 372 3.565000e-10 1.270000e-01 373 3.575000e-10 1.250000e-01 374 3.585000e-10 1.230000e-01 375 3.595000e-10 1.210000e-01 376 3.605000e-10 1.190000e-01 377 3.615000e-10 1.170000e-01 378 3.625000e-10 1.150000e-01 379 3.635000e-10 1.130000e-01 380 3.645000e-10 1.110000e-01 381 3.655000e-10 1.090000e-01 382 3.665000e-10 1.070000e-01 383 3.675000e-10 1.050000e-01 384 3.685000e-10 1.030000e-01 385 3.695000e-10 1.010000e-01 386 3.705000e-10 9.900000e-02 387 3.715000e-10 9.700000e-02 388 3.725000e-10 9.500000e-02 389 3.735000e-10 9.300000e-02 390 3.745000e-10 9.100000e-02 391 3.755000e-10 8.900000e-02 392 3.765000e-10 8.700000e-02 393 3.775000e-10 8.500000e-02 394 3.785000e-10 8.300000e-02 395 3.795000e-10 8.100000e-02 396 3.805000e-10 7.900000e-02 397 3.815000e-10 7.700000e-02 398 3.825000e-10 7.500000e-02 399 3.835000e-10 7.300000e-02 400 3.845000e-10 7.100000e-02 401 3.855000e-10 6.900000e-02 402 3.865000e-10 6.700000e-02 Index time v(g)/10 -------------------------------------------------------------------------------- 403 3.875000e-10 6.500000e-02 404 3.885000e-10 6.300000e-02 405 3.895000e-10 6.100000e-02 406 3.905000e-10 5.900000e-02 407 3.915000e-10 5.700000e-02 408 3.925000e-10 5.500000e-02 409 3.935000e-10 5.300000e-02 410 3.945000e-10 5.100000e-02 411 3.955000e-10 4.900000e-02 412 3.965000e-10 4.700000e-02 413 3.975000e-10 4.500000e-02 414 3.985000e-10 4.300000e-02 415 3.995000e-10 4.100000e-02 416 4.005000e-10 3.900000e-02 417 4.015000e-10 3.700000e-02 418 4.025000e-10 3.500000e-02 419 4.035000e-10 3.300000e-02 420 4.045000e-10 3.100000e-02 421 4.055000e-10 2.900000e-02 422 4.065000e-10 2.700000e-02 423 4.075000e-10 2.500000e-02 424 4.085000e-10 2.300000e-02 425 4.095000e-10 2.100000e-02 426 4.105000e-10 1.900000e-02 427 4.115000e-10 1.700000e-02 428 4.125000e-10 1.500000e-02 429 4.135000e-10 1.300000e-02 430 4.145000e-10 1.100000e-02 431 4.155000e-10 9.000000e-03 432 4.165000e-10 7.000000e-03 433 4.175000e-10 5.000000e-03 434 4.185000e-10 3.000000e-03 435 4.195000e-10 1.000000e-03 436 4.200000e-10 3.230922e-17 437 4.201000e-10 0.000000e+00 438 4.203000e-10 0.000000e+00 439 4.207000e-10 0.000000e+00 440 4.215000e-10 0.000000e+00 441 4.225000e-10 0.000000e+00 442 4.235000e-10 0.000000e+00 443 4.245000e-10 0.000000e+00 444 4.255000e-10 0.000000e+00 445 4.265000e-10 0.000000e+00 446 4.275000e-10 0.000000e+00 447 4.285000e-10 0.000000e+00 448 4.295000e-10 0.000000e+00 449 4.305000e-10 0.000000e+00 450 4.315000e-10 0.000000e+00 451 4.325000e-10 0.000000e+00 452 4.335000e-10 0.000000e+00 453 4.345000e-10 0.000000e+00 454 4.355000e-10 0.000000e+00 455 4.365000e-10 0.000000e+00 456 4.375000e-10 0.000000e+00 457 4.385000e-10 0.000000e+00 458 4.395000e-10 0.000000e+00 459 4.405000e-10 0.000000e+00 460 4.415000e-10 0.000000e+00 Index time v(g)/10 -------------------------------------------------------------------------------- 461 4.425000e-10 0.000000e+00 462 4.435000e-10 0.000000e+00 463 4.445000e-10 0.000000e+00 464 4.455000e-10 0.000000e+00 465 4.465000e-10 0.000000e+00 466 4.475000e-10 0.000000e+00 467 4.485000e-10 0.000000e+00 468 4.495000e-10 0.000000e+00 469 4.505000e-10 0.000000e+00 470 4.515000e-10 0.000000e+00 471 4.525000e-10 0.000000e+00 472 4.535000e-10 0.000000e+00 473 4.545000e-10 0.000000e+00 474 4.555000e-10 0.000000e+00 475 4.565000e-10 0.000000e+00 476 4.575000e-10 0.000000e+00 477 4.585000e-10 0.000000e+00 478 4.595000e-10 0.000000e+00 479 4.605000e-10 0.000000e+00 480 4.615000e-10 0.000000e+00 481 4.625000e-10 0.000000e+00 482 4.635000e-10 0.000000e+00 483 4.645000e-10 0.000000e+00 484 4.655000e-10 0.000000e+00 485 4.665000e-10 0.000000e+00 486 4.675000e-10 0.000000e+00 487 4.685000e-10 0.000000e+00 488 4.695000e-10 0.000000e+00 489 4.705000e-10 0.000000e+00 490 4.715000e-10 0.000000e+00 491 4.725000e-10 0.000000e+00 492 4.735000e-10 0.000000e+00 493 4.745000e-10 0.000000e+00 494 4.755000e-10 0.000000e+00 495 4.765000e-10 0.000000e+00 496 4.775000e-10 0.000000e+00 497 4.785000e-10 0.000000e+00 498 4.795000e-10 0.000000e+00 499 4.805000e-10 0.000000e+00 500 4.815000e-10 0.000000e+00 501 4.825000e-10 0.000000e+00 502 4.835000e-10 0.000000e+00 503 4.845000e-10 0.000000e+00 504 4.855000e-10 0.000000e+00 505 4.865000e-10 0.000000e+00 506 4.875000e-10 0.000000e+00 507 4.885000e-10 0.000000e+00 508 4.895000e-10 0.000000e+00 509 4.905000e-10 0.000000e+00 510 4.915000e-10 0.000000e+00 511 4.925000e-10 0.000000e+00 512 4.935000e-10 0.000000e+00 513 4.945000e-10 0.000000e+00 514 4.955000e-10 0.000000e+00 515 4.965000e-10 0.000000e+00 516 4.975000e-10 0.000000e+00 517 4.985000e-10 0.000000e+00 518 4.995000e-10 0.000000e+00 Index time v(g)/10 -------------------------------------------------------------------------------- 519 5.005000e-10 0.000000e+00 520 5.015000e-10 0.000000e+00 521 5.025000e-10 0.000000e+00 522 5.035000e-10 0.000000e+00 523 5.045000e-10 0.000000e+00 524 5.055000e-10 0.000000e+00 525 5.065000e-10 0.000000e+00 526 5.075000e-10 0.000000e+00 527 5.085000e-10 0.000000e+00 528 5.095000e-10 0.000000e+00 529 5.105000e-10 0.000000e+00 530 5.115000e-10 0.000000e+00 531 5.125000e-10 0.000000e+00 532 5.135000e-10 0.000000e+00 533 5.145000e-10 0.000000e+00 534 5.155000e-10 0.000000e+00 535 5.165000e-10 0.000000e+00 536 5.175000e-10 0.000000e+00 537 5.185000e-10 0.000000e+00 538 5.195000e-10 0.000000e+00 539 5.205000e-10 0.000000e+00 540 5.215000e-10 0.000000e+00 541 5.225000e-10 0.000000e+00 542 5.235000e-10 0.000000e+00 543 5.245000e-10 0.000000e+00 544 5.255000e-10 0.000000e+00 545 5.265000e-10 0.000000e+00 546 5.275000e-10 0.000000e+00 547 5.285000e-10 0.000000e+00 548 5.295000e-10 0.000000e+00 549 5.305000e-10 0.000000e+00 550 5.315000e-10 0.000000e+00 551 5.325000e-10 0.000000e+00 552 5.335000e-10 0.000000e+00 553 5.345000e-10 0.000000e+00 554 5.355000e-10 0.000000e+00 555 5.365000e-10 0.000000e+00 556 5.375000e-10 0.000000e+00 557 5.385000e-10 0.000000e+00 558 5.395000e-10 0.000000e+00 559 5.405000e-10 0.000000e+00 560 5.415000e-10 0.000000e+00 561 5.425000e-10 0.000000e+00 562 5.435000e-10 0.000000e+00 563 5.445000e-10 0.000000e+00 564 5.455000e-10 0.000000e+00 565 5.465000e-10 0.000000e+00 566 5.475000e-10 0.000000e+00 567 5.485000e-10 0.000000e+00 568 5.495000e-10 0.000000e+00 569 5.505000e-10 0.000000e+00 570 5.515000e-10 0.000000e+00 571 5.525000e-10 0.000000e+00 572 5.535000e-10 0.000000e+00 573 5.545000e-10 0.000000e+00 574 5.555000e-10 0.000000e+00 575 5.565000e-10 0.000000e+00 576 5.575000e-10 0.000000e+00 Index time v(g)/10 -------------------------------------------------------------------------------- 577 5.585000e-10 0.000000e+00 578 5.595000e-10 0.000000e+00 579 5.605000e-10 0.000000e+00 580 5.615000e-10 0.000000e+00 581 5.625000e-10 0.000000e+00 582 5.635000e-10 0.000000e+00 583 5.645000e-10 0.000000e+00 584 5.655000e-10 0.000000e+00 585 5.665000e-10 0.000000e+00 586 5.675000e-10 0.000000e+00 587 5.685000e-10 0.000000e+00 588 5.695000e-10 0.000000e+00 589 5.705000e-10 0.000000e+00 590 5.715000e-10 0.000000e+00 591 5.725000e-10 0.000000e+00 592 5.735000e-10 0.000000e+00 593 5.745000e-10 0.000000e+00 594 5.755000e-10 0.000000e+00 595 5.765000e-10 0.000000e+00 596 5.775000e-10 0.000000e+00 597 5.785000e-10 0.000000e+00 598 5.795000e-10 0.000000e+00 599 5.805000e-10 0.000000e+00 600 5.815000e-10 0.000000e+00 601 5.825000e-10 0.000000e+00 602 5.835000e-10 0.000000e+00 603 5.845000e-10 0.000000e+00 604 5.855000e-10 0.000000e+00 605 5.865000e-10 0.000000e+00 606 5.875000e-10 0.000000e+00 607 5.885000e-10 0.000000e+00 608 5.895000e-10 0.000000e+00 609 5.905000e-10 0.000000e+00 610 5.915000e-10 0.000000e+00 611 5.925000e-10 0.000000e+00 612 5.935000e-10 0.000000e+00 613 5.945000e-10 0.000000e+00 614 5.955000e-10 0.000000e+00 615 5.965000e-10 0.000000e+00 616 5.975000e-10 0.000000e+00 617 5.985000e-10 0.000000e+00 618 5.995000e-10 0.000000e+00 619 6.005000e-10 0.000000e+00 620 6.015000e-10 0.000000e+00 621 6.025000e-10 0.000000e+00 622 6.035000e-10 0.000000e+00 623 6.045000e-10 0.000000e+00 624 6.055000e-10 0.000000e+00 625 6.065000e-10 0.000000e+00 626 6.075000e-10 0.000000e+00 627 6.085000e-10 0.000000e+00 628 6.095000e-10 0.000000e+00 629 6.105000e-10 0.000000e+00 630 6.115000e-10 0.000000e+00 631 6.125000e-10 0.000000e+00 632 6.135000e-10 0.000000e+00 633 6.145000e-10 0.000000e+00 634 6.155000e-10 0.000000e+00 Index time v(g)/10 -------------------------------------------------------------------------------- 635 6.165000e-10 0.000000e+00 636 6.175000e-10 0.000000e+00 637 6.185000e-10 0.000000e+00 638 6.195000e-10 0.000000e+00 639 6.200000e-10 7.108583e-17 640 6.201000e-10 2.000000e-04 641 6.203000e-10 6.000000e-04 642 6.207000e-10 1.400000e-03 643 6.215000e-10 3.000000e-03 644 6.225000e-10 5.000000e-03 645 6.235000e-10 7.000000e-03 646 6.245000e-10 9.000000e-03 647 6.255000e-10 1.100000e-02 648 6.265000e-10 1.300000e-02 649 6.275000e-10 1.500000e-02 650 6.285000e-10 1.700000e-02 651 6.295000e-10 1.900000e-02 652 6.305000e-10 2.100000e-02 653 6.315000e-10 2.300000e-02 654 6.325000e-10 2.500000e-02 655 6.335000e-10 2.700000e-02 656 6.345000e-10 2.900000e-02 657 6.355000e-10 3.100000e-02 658 6.365000e-10 3.300000e-02 659 6.375000e-10 3.500000e-02 660 6.385000e-10 3.700000e-02 661 6.395000e-10 3.900000e-02 662 6.405000e-10 4.100000e-02 663 6.415000e-10 4.300000e-02 664 6.425000e-10 4.500000e-02 665 6.435000e-10 4.700000e-02 666 6.445000e-10 4.900000e-02 667 6.455000e-10 5.100000e-02 668 6.465000e-10 5.300000e-02 669 6.475000e-10 5.500000e-02 670 6.485000e-10 5.700000e-02 671 6.495000e-10 5.900000e-02 672 6.505000e-10 6.100000e-02 673 6.515000e-10 6.300000e-02 674 6.525000e-10 6.500000e-02 675 6.535000e-10 6.700000e-02 676 6.545000e-10 6.900000e-02 677 6.555000e-10 7.100000e-02 678 6.565000e-10 7.300000e-02 679 6.575000e-10 7.500000e-02 680 6.585000e-10 7.700000e-02 681 6.595000e-10 7.900000e-02 682 6.605000e-10 8.100000e-02 683 6.615000e-10 8.300000e-02 684 6.625000e-10 8.500000e-02 685 6.635000e-10 8.700000e-02 686 6.645000e-10 8.900000e-02 687 6.655000e-10 9.100000e-02 688 6.665000e-10 9.300000e-02 689 6.675000e-10 9.500000e-02 690 6.685000e-10 9.700000e-02 691 6.695000e-10 9.900000e-02 692 6.705000e-10 1.010000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 693 6.715000e-10 1.030000e-01 694 6.725000e-10 1.050000e-01 695 6.735000e-10 1.070000e-01 696 6.745000e-10 1.090000e-01 697 6.755000e-10 1.110000e-01 698 6.765000e-10 1.130000e-01 699 6.775000e-10 1.150000e-01 700 6.785000e-10 1.170000e-01 701 6.795000e-10 1.190000e-01 702 6.805000e-10 1.210000e-01 703 6.815000e-10 1.230000e-01 704 6.825000e-10 1.250000e-01 705 6.835000e-10 1.270000e-01 706 6.845000e-10 1.290000e-01 707 6.855000e-10 1.310000e-01 708 6.865000e-10 1.330000e-01 709 6.875000e-10 1.350000e-01 710 6.885000e-10 1.370000e-01 711 6.895000e-10 1.390000e-01 712 6.905000e-10 1.410000e-01 713 6.915000e-10 1.430000e-01 714 6.925000e-10 1.450000e-01 715 6.935000e-10 1.470000e-01 716 6.945000e-10 1.490000e-01 717 6.955000e-10 1.510000e-01 718 6.965000e-10 1.530000e-01 719 6.975000e-10 1.550000e-01 720 6.985000e-10 1.570000e-01 721 6.995000e-10 1.590000e-01 722 7.005000e-10 1.610000e-01 723 7.015000e-10 1.630000e-01 724 7.025000e-10 1.650000e-01 725 7.035000e-10 1.670000e-01 726 7.045000e-10 1.690000e-01 727 7.055000e-10 1.710000e-01 728 7.065000e-10 1.730000e-01 729 7.075000e-10 1.750000e-01 730 7.085000e-10 1.770000e-01 731 7.095000e-10 1.790000e-01 732 7.105000e-10 1.810000e-01 733 7.115000e-10 1.830000e-01 734 7.125000e-10 1.850000e-01 735 7.135000e-10 1.870000e-01 736 7.145000e-10 1.890000e-01 737 7.155000e-10 1.910000e-01 738 7.165000e-10 1.930000e-01 739 7.175000e-10 1.950000e-01 740 7.185000e-10 1.970000e-01 741 7.195000e-10 1.990000e-01 742 7.200000e-10 2.000000e-01 743 7.201000e-10 2.000000e-01 744 7.203000e-10 2.000000e-01 745 7.207000e-10 2.000000e-01 746 7.215000e-10 2.000000e-01 747 7.225000e-10 2.000000e-01 748 7.235000e-10 2.000000e-01 749 7.245000e-10 2.000000e-01 750 7.255000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 751 7.265000e-10 2.000000e-01 752 7.275000e-10 2.000000e-01 753 7.285000e-10 2.000000e-01 754 7.295000e-10 2.000000e-01 755 7.305000e-10 2.000000e-01 756 7.315000e-10 2.000000e-01 757 7.325000e-10 2.000000e-01 758 7.335000e-10 2.000000e-01 759 7.345000e-10 2.000000e-01 760 7.355000e-10 2.000000e-01 761 7.365000e-10 2.000000e-01 762 7.375000e-10 2.000000e-01 763 7.385000e-10 2.000000e-01 764 7.395000e-10 2.000000e-01 765 7.405000e-10 2.000000e-01 766 7.415000e-10 2.000000e-01 767 7.425000e-10 2.000000e-01 768 7.435000e-10 2.000000e-01 769 7.445000e-10 2.000000e-01 770 7.455000e-10 2.000000e-01 771 7.465000e-10 2.000000e-01 772 7.475000e-10 2.000000e-01 773 7.485000e-10 2.000000e-01 774 7.495000e-10 2.000000e-01 775 7.505000e-10 2.000000e-01 776 7.515000e-10 2.000000e-01 777 7.525000e-10 2.000000e-01 778 7.535000e-10 2.000000e-01 779 7.545000e-10 2.000000e-01 780 7.555000e-10 2.000000e-01 781 7.565000e-10 2.000000e-01 782 7.575000e-10 2.000000e-01 783 7.585000e-10 2.000000e-01 784 7.595000e-10 2.000000e-01 785 7.605000e-10 2.000000e-01 786 7.615000e-10 2.000000e-01 787 7.625000e-10 2.000000e-01 788 7.635000e-10 2.000000e-01 789 7.645000e-10 2.000000e-01 790 7.655000e-10 2.000000e-01 791 7.665000e-10 2.000000e-01 792 7.675000e-10 2.000000e-01 793 7.685000e-10 2.000000e-01 794 7.695000e-10 2.000000e-01 795 7.705000e-10 2.000000e-01 796 7.715000e-10 2.000000e-01 797 7.725000e-10 2.000000e-01 798 7.735000e-10 2.000000e-01 799 7.745000e-10 2.000000e-01 800 7.755000e-10 2.000000e-01 801 7.765000e-10 2.000000e-01 802 7.775000e-10 2.000000e-01 803 7.785000e-10 2.000000e-01 804 7.795000e-10 2.000000e-01 805 7.805000e-10 2.000000e-01 806 7.815000e-10 2.000000e-01 807 7.825000e-10 2.000000e-01 808 7.835000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 809 7.845000e-10 2.000000e-01 810 7.855000e-10 2.000000e-01 811 7.865000e-10 2.000000e-01 812 7.875000e-10 2.000000e-01 813 7.885000e-10 2.000000e-01 814 7.895000e-10 2.000000e-01 815 7.905000e-10 2.000000e-01 816 7.915000e-10 2.000000e-01 817 7.925000e-10 2.000000e-01 818 7.935000e-10 2.000000e-01 819 7.945000e-10 2.000000e-01 820 7.955000e-10 2.000000e-01 821 7.965000e-10 2.000000e-01 822 7.975000e-10 2.000000e-01 823 7.985000e-10 2.000000e-01 824 7.995000e-10 2.000000e-01 825 8.005000e-10 2.000000e-01 826 8.015000e-10 2.000000e-01 827 8.025000e-10 2.000000e-01 828 8.035000e-10 2.000000e-01 829 8.045000e-10 2.000000e-01 830 8.055000e-10 2.000000e-01 831 8.065000e-10 2.000000e-01 832 8.075000e-10 2.000000e-01 833 8.085000e-10 2.000000e-01 834 8.095000e-10 2.000000e-01 835 8.105000e-10 2.000000e-01 836 8.115000e-10 2.000000e-01 837 8.125000e-10 2.000000e-01 838 8.135000e-10 2.000000e-01 839 8.145000e-10 2.000000e-01 840 8.155000e-10 2.000000e-01 841 8.165000e-10 2.000000e-01 842 8.175000e-10 2.000000e-01 843 8.185000e-10 2.000000e-01 844 8.195000e-10 2.000000e-01 845 8.205000e-10 2.000000e-01 846 8.215000e-10 2.000000e-01 847 8.225000e-10 2.000000e-01 848 8.235000e-10 2.000000e-01 849 8.245000e-10 2.000000e-01 850 8.255000e-10 2.000000e-01 851 8.265000e-10 2.000000e-01 852 8.275000e-10 2.000000e-01 853 8.285000e-10 2.000000e-01 854 8.295000e-10 2.000000e-01 855 8.305000e-10 2.000000e-01 856 8.315000e-10 2.000000e-01 857 8.325000e-10 2.000000e-01 858 8.335000e-10 2.000000e-01 859 8.345000e-10 2.000000e-01 860 8.355000e-10 2.000000e-01 861 8.365000e-10 2.000000e-01 862 8.375000e-10 2.000000e-01 863 8.385000e-10 2.000000e-01 864 8.395000e-10 2.000000e-01 865 8.405000e-10 2.000000e-01 866 8.415000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 867 8.425000e-10 2.000000e-01 868 8.435000e-10 2.000000e-01 869 8.445000e-10 2.000000e-01 870 8.455000e-10 2.000000e-01 871 8.465000e-10 2.000000e-01 872 8.475000e-10 2.000000e-01 873 8.485000e-10 2.000000e-01 874 8.495000e-10 2.000000e-01 875 8.505000e-10 2.000000e-01 876 8.515000e-10 2.000000e-01 877 8.525000e-10 2.000000e-01 878 8.535000e-10 2.000000e-01 879 8.545000e-10 2.000000e-01 880 8.555000e-10 2.000000e-01 881 8.565000e-10 2.000000e-01 882 8.575000e-10 2.000000e-01 883 8.585000e-10 2.000000e-01 884 8.595000e-10 2.000000e-01 885 8.605000e-10 2.000000e-01 886 8.615000e-10 2.000000e-01 887 8.625000e-10 2.000000e-01 888 8.635000e-10 2.000000e-01 889 8.645000e-10 2.000000e-01 890 8.655000e-10 2.000000e-01 891 8.665000e-10 2.000000e-01 892 8.675000e-10 2.000000e-01 893 8.685000e-10 2.000000e-01 894 8.695000e-10 2.000000e-01 895 8.705000e-10 2.000000e-01 896 8.715000e-10 2.000000e-01 897 8.725000e-10 2.000000e-01 898 8.735000e-10 2.000000e-01 899 8.745000e-10 2.000000e-01 900 8.755000e-10 2.000000e-01 901 8.765000e-10 2.000000e-01 902 8.775000e-10 2.000000e-01 903 8.785000e-10 2.000000e-01 904 8.795000e-10 2.000000e-01 905 8.805000e-10 2.000000e-01 906 8.815000e-10 2.000000e-01 907 8.825000e-10 2.000000e-01 908 8.835000e-10 2.000000e-01 909 8.845000e-10 2.000000e-01 910 8.855000e-10 2.000000e-01 911 8.865000e-10 2.000000e-01 912 8.875000e-10 2.000000e-01 913 8.885000e-10 2.000000e-01 914 8.895000e-10 2.000000e-01 915 8.905000e-10 2.000000e-01 916 8.915000e-10 2.000000e-01 917 8.925000e-10 2.000000e-01 918 8.935000e-10 2.000000e-01 919 8.945000e-10 2.000000e-01 920 8.955000e-10 2.000000e-01 921 8.965000e-10 2.000000e-01 922 8.975000e-10 2.000000e-01 923 8.985000e-10 2.000000e-01 924 8.995000e-10 2.000000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 925 9.005000e-10 2.000000e-01 926 9.015000e-10 2.000000e-01 927 9.025000e-10 2.000000e-01 928 9.035000e-10 2.000000e-01 929 9.045000e-10 2.000000e-01 930 9.055000e-10 2.000000e-01 931 9.065000e-10 2.000000e-01 932 9.075000e-10 2.000000e-01 933 9.085000e-10 2.000000e-01 934 9.095000e-10 2.000000e-01 935 9.105000e-10 2.000000e-01 936 9.115000e-10 2.000000e-01 937 9.125000e-10 2.000000e-01 938 9.135000e-10 2.000000e-01 939 9.145000e-10 2.000000e-01 940 9.155000e-10 2.000000e-01 941 9.165000e-10 2.000000e-01 942 9.175000e-10 2.000000e-01 943 9.185000e-10 2.000000e-01 944 9.195000e-10 2.000000e-01 945 9.200000e-10 2.000000e-01 946 9.201000e-10 1.998000e-01 947 9.203000e-10 1.994000e-01 948 9.207000e-10 1.986000e-01 949 9.215000e-10 1.970000e-01 950 9.225000e-10 1.950000e-01 951 9.235000e-10 1.930000e-01 952 9.245000e-10 1.910000e-01 953 9.255000e-10 1.890000e-01 954 9.265000e-10 1.870000e-01 955 9.275000e-10 1.850000e-01 956 9.285000e-10 1.830000e-01 957 9.295000e-10 1.810000e-01 958 9.305000e-10 1.790000e-01 959 9.315000e-10 1.770000e-01 960 9.325000e-10 1.750000e-01 961 9.335000e-10 1.730000e-01 962 9.345000e-10 1.710000e-01 963 9.355000e-10 1.690000e-01 964 9.365000e-10 1.670000e-01 965 9.375000e-10 1.650000e-01 966 9.385000e-10 1.630000e-01 967 9.395000e-10 1.610000e-01 968 9.405000e-10 1.590000e-01 969 9.415000e-10 1.570000e-01 970 9.425000e-10 1.550000e-01 971 9.435000e-10 1.530000e-01 972 9.445000e-10 1.510000e-01 973 9.455000e-10 1.490000e-01 974 9.465000e-10 1.470000e-01 975 9.475000e-10 1.450000e-01 976 9.485000e-10 1.430000e-01 977 9.495000e-10 1.410000e-01 978 9.505000e-10 1.390000e-01 979 9.515000e-10 1.370000e-01 980 9.525000e-10 1.350000e-01 981 9.535000e-10 1.330000e-01 982 9.545000e-10 1.310000e-01 Index time v(g)/10 -------------------------------------------------------------------------------- 983 9.555000e-10 1.290000e-01 984 9.565000e-10 1.270000e-01 985 9.575000e-10 1.250000e-01 986 9.585000e-10 1.230000e-01 987 9.595000e-10 1.210000e-01 988 9.605000e-10 1.190000e-01 989 9.615000e-10 1.170000e-01 990 9.625000e-10 1.150000e-01 991 9.635000e-10 1.130000e-01 992 9.645000e-10 1.110000e-01 993 9.655000e-10 1.090000e-01 994 9.665000e-10 1.070000e-01 995 9.675000e-10 1.050000e-01 996 9.685000e-10 1.030000e-01 997 9.695000e-10 1.010000e-01 998 9.705000e-10 9.900000e-02 999 9.715000e-10 9.700000e-02 1000 9.725000e-10 9.500000e-02 1001 9.735000e-10 9.300000e-02 1002 9.745000e-10 9.100000e-02 1003 9.755000e-10 8.900000e-02 1004 9.765000e-10 8.700000e-02 1005 9.775000e-10 8.500000e-02 1006 9.785000e-10 8.300000e-02 1007 9.795000e-10 8.100000e-02 1008 9.805000e-10 7.900000e-02 1009 9.815000e-10 7.700000e-02 1010 9.825000e-10 7.500000e-02 1011 9.835000e-10 7.300000e-02 1012 9.845000e-10 7.100000e-02 1013 9.855000e-10 6.900000e-02 1014 9.865000e-10 6.700000e-02 1015 9.875000e-10 6.500000e-02 1016 9.885000e-10 6.300000e-02 1017 9.895000e-10 6.100000e-02 1018 9.905000e-10 5.900000e-02 1019 9.915000e-10 5.700000e-02 1020 9.925000e-10 5.500000e-02 1021 9.935000e-10 5.300000e-02 1022 9.945000e-10 5.100000e-02 1023 9.955000e-10 4.900000e-02 1024 9.965000e-10 4.700000e-02 1025 9.975000e-10 4.500000e-02 1026 9.985000e-10 4.300000e-02 1027 9.995000e-10 4.100000e-02 1028 1.000000e-09 4.000000e-02 ngspice-26/tests/bsim3soipd/Makefile.am0000644000265600020320000000060512264261473017504 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ nmospd.mod \ pmospd.mod \ $(TESTS) \ $(TESTS:.cir=.out) EXTRA_DIST += ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3soipd/Makefile.in0000644000265600020320000003371012264261541017514 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3soipd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = nmospd.mod pmospd.mod $(TESTS) $(TESTS:.cir=.out) \ ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3soipd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3soipd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soipd/pmospd.mod0000644000265600020320000000403212264261473017451 0ustar andreasadmin*Model Card for BSIMPD2.0 * Lmin= .2 Lmax= .8 Wmin= 2.8 Wmax= 2.8 .Model P1 PMOS Level= 57 +TNOM = 27 TOX = 4.5E-09 TSI = .0000001 TBOX = 8E-08 +MOBMOD = 2 CAPMOD = 2 SHMOD = 0 +WINT = 0 LINT = -2E-08 +VTH0 = -.42 K1 = .49 K2 = .1 K3 = 0 +K3B = 2.2 NLX = 2E-07 +DVT0 = 10 DVT1 = .55 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 4.7E+17 NSUB = -1E+15 NGATE = 1E+20 +AGIDL=1e-16 BGIDL=1e9 NGIDL=1.1 +NDIODE = 1.13 NTUN = 14.0 NRECF0=2.5 NRECR0=4 +VREC0=1.2 NTRECF=.1 NTRECR=.2 +ISBJT = 1e-4 ISDIF = 1e-5 ISTUN = 2e-5 ISREC = 4e-2 +XBJT = .9 XDIF = .9 XREC = .9 XTUN = 0.01 +AHLI=1e-9 LBJT0=0.2e-6 LN=2e-6 +NBJT=.8 NDIF=-1 AELY=1e8 VABJT=0 +U0 = 145 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 350 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 1e0 RBSH = 0.0 +A0 = 1.4 KETA = 0.1 KETAS = 0.2 VSAT = 75000 +DWG = 0 DWB = 0 +ALPHA0 = 1e-8 BETA0 = 0 BETA1 = 0.05 BETA2 = 0.07 +VDSATII0 = 1.6 ESATII = 1e7 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .05 ETAB = 0 +DSUB = .2 RTH0 = .005 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 1e-12 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 +TCJSWG=1e-4 MJSWG=.5 PBSWG=1 ngspice-26/tests/bsim3soipd/t3.out0000644000265600020320000024573312264261473016544 0ustar andreasadmin No. of Data Rows : 1806 Circuit: *model = BSIMSOI (PD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (PD) -------------------------------------------------------------------------------- Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e-01 0.000000e+00 1 1.000000e-02 5.000000e-01 2.933649e-06 2 2.000000e-02 5.000000e-01 5.424817e-06 3 3.000000e-02 5.000000e-01 7.494119e-06 4 4.000000e-02 5.000000e-01 9.168761e-06 5 5.000000e-02 5.000000e-01 1.048555e-05 6 6.000000e-02 5.000000e-01 1.149269e-05 7 7.000000e-02 5.000000e-01 1.224807e-05 8 8.000000e-02 5.000000e-01 1.281282e-05 9 9.000000e-02 5.000000e-01 1.324287e-05 10 1.000000e-01 5.000000e-01 1.358286e-05 11 1.100000e-01 5.000000e-01 1.386487e-05 12 1.200000e-01 5.000000e-01 1.411044e-05 13 1.300000e-01 5.000000e-01 1.433348e-05 14 1.400000e-01 5.000000e-01 1.454291e-05 15 1.500000e-01 5.000000e-01 1.474448e-05 16 1.600000e-01 5.000000e-01 1.494196e-05 17 1.700000e-01 5.000000e-01 1.513789e-05 18 1.800000e-01 5.000000e-01 1.533400e-05 19 1.900000e-01 5.000000e-01 1.553154e-05 20 2.000000e-01 5.000000e-01 1.573140e-05 21 2.100000e-01 5.000000e-01 1.593428e-05 22 2.200000e-01 5.000000e-01 1.614070e-05 23 2.300000e-01 5.000000e-01 1.635107e-05 24 2.400000e-01 5.000000e-01 1.656575e-05 25 2.500000e-01 5.000000e-01 1.678500e-05 26 2.600000e-01 5.000000e-01 1.700908e-05 27 2.700000e-01 5.000000e-01 1.723820e-05 28 2.800000e-01 5.000000e-01 1.747254e-05 29 2.900000e-01 5.000000e-01 1.771227e-05 30 3.000000e-01 5.000000e-01 1.795755e-05 31 3.100000e-01 5.000000e-01 1.820849e-05 32 3.200000e-01 5.000000e-01 1.846525e-05 33 3.300000e-01 5.000000e-01 1.872792e-05 34 3.400000e-01 5.000000e-01 1.899663e-05 35 3.500000e-01 5.000000e-01 1.927147e-05 36 3.600000e-01 5.000000e-01 1.955254e-05 37 3.700000e-01 5.000000e-01 1.983995e-05 38 3.800000e-01 5.000000e-01 2.013377e-05 39 3.900000e-01 5.000000e-01 2.043409e-05 40 4.000000e-01 5.000000e-01 2.074100e-05 41 4.100000e-01 5.000000e-01 2.105459e-05 42 4.200000e-01 5.000000e-01 2.137492e-05 43 4.300000e-01 5.000000e-01 2.170208e-05 44 4.400000e-01 5.000000e-01 2.203615e-05 45 4.500000e-01 5.000000e-01 2.237720e-05 46 4.600000e-01 5.000000e-01 2.272532e-05 47 4.700000e-01 5.000000e-01 2.308059e-05 48 4.800000e-01 5.000000e-01 2.344310e-05 49 4.900000e-01 5.000000e-01 2.381293e-05 50 5.000000e-01 5.000000e-01 2.419018e-05 51 5.100000e-01 5.000000e-01 2.457494e-05 52 5.200000e-01 5.000000e-01 2.496733e-05 53 5.300000e-01 5.000000e-01 2.536747e-05 54 5.400000e-01 5.000000e-01 2.577548e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 5.000000e-01 2.619150e-05 56 5.600000e-01 5.000000e-01 2.661571e-05 57 5.700000e-01 5.000000e-01 2.704827e-05 58 5.800000e-01 5.000000e-01 2.748939e-05 59 5.900000e-01 5.000000e-01 2.793930e-05 60 6.000000e-01 5.000000e-01 2.839824e-05 61 6.100000e-01 5.000000e-01 2.886653e-05 62 6.200000e-01 5.000000e-01 2.934448e-05 63 6.300000e-01 5.000000e-01 2.983247e-05 64 6.400000e-01 5.000000e-01 3.033093e-05 65 6.500000e-01 5.000000e-01 3.084035e-05 66 6.600000e-01 5.000000e-01 3.136126e-05 67 6.700000e-01 5.000000e-01 3.189431e-05 68 6.800000e-01 5.000000e-01 3.244018e-05 69 6.900000e-01 5.000000e-01 3.299967e-05 70 7.000000e-01 5.000000e-01 3.357368e-05 71 7.100000e-01 5.000000e-01 3.416322e-05 72 7.200000e-01 5.000000e-01 3.476942e-05 73 7.300000e-01 5.000000e-01 3.539354e-05 74 7.400000e-01 5.000000e-01 3.603701e-05 75 7.500000e-01 5.000000e-01 3.670140e-05 76 7.600000e-01 5.000000e-01 3.738846e-05 77 7.700000e-01 5.000000e-01 3.810015e-05 78 7.800000e-01 5.000000e-01 3.883862e-05 79 7.900000e-01 5.000000e-01 3.960622e-05 80 8.000000e-01 5.000000e-01 4.040557e-05 81 8.100000e-01 5.000000e-01 4.123949e-05 82 8.200000e-01 5.000000e-01 4.211107e-05 83 8.300000e-01 5.000000e-01 4.302364e-05 84 8.400000e-01 5.000000e-01 4.398079e-05 85 8.500000e-01 5.000000e-01 4.498631e-05 86 8.600000e-01 5.000000e-01 4.604425e-05 87 8.700000e-01 5.000000e-01 4.715883e-05 88 8.800000e-01 5.000000e-01 4.833441e-05 89 8.900000e-01 5.000000e-01 4.957543e-05 90 9.000000e-01 5.000000e-01 5.088635e-05 91 9.100000e-01 5.000000e-01 5.227152e-05 92 9.200000e-01 5.000000e-01 5.373510e-05 93 9.300000e-01 5.000000e-01 5.528089e-05 94 9.400000e-01 5.000000e-01 5.691223e-05 95 9.500000e-01 5.000000e-01 5.863178e-05 96 9.600000e-01 5.000000e-01 6.044143e-05 97 9.700000e-01 5.000000e-01 6.234212e-05 98 9.800000e-01 5.000000e-01 6.433373e-05 99 9.900000e-01 5.000000e-01 6.641501e-05 100 1.000000e+00 5.000000e-01 6.858353e-05 101 1.010000e+00 5.000000e-01 7.083574e-05 102 1.020000e+00 5.000000e-01 7.316702e-05 103 1.030000e+00 5.000000e-01 7.557184e-05 104 1.040000e+00 5.000000e-01 7.804393e-05 105 1.050000e+00 5.000000e-01 8.058231e-05 106 1.060000e+00 5.000000e-01 8.318687e-05 107 1.070000e+00 5.000000e-01 8.584557e-05 108 1.080000e+00 5.000000e-01 8.854770e-05 109 1.090000e+00 5.000000e-01 9.128396e-05 110 1.100000e+00 5.000000e-01 9.404628e-05 111 1.110000e+00 5.000000e-01 9.682776e-05 112 1.120000e+00 5.000000e-01 9.962253e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 5.000000e-01 1.024256e-04 114 1.140000e+00 5.000000e-01 1.052330e-04 115 1.150000e+00 5.000000e-01 1.080412e-04 116 1.160000e+00 5.000000e-01 1.108476e-04 117 1.170000e+00 5.000000e-01 1.136500e-04 118 1.180000e+00 5.000000e-01 1.164468e-04 119 1.190000e+00 5.000000e-01 1.192366e-04 120 1.200000e+00 5.000000e-01 1.220186e-04 121 1.210000e+00 5.000000e-01 1.247920e-04 122 1.220000e+00 5.000000e-01 1.275565e-04 123 1.230000e+00 5.000000e-01 1.303118e-04 124 1.240000e+00 5.000000e-01 1.330578e-04 125 1.250000e+00 5.000000e-01 1.357945e-04 126 1.260000e+00 5.000000e-01 1.385220e-04 127 1.270000e+00 5.000000e-01 1.412405e-04 128 1.280000e+00 5.000000e-01 1.439502e-04 129 1.290000e+00 5.000000e-01 1.466515e-04 130 1.300000e+00 5.000000e-01 1.493446e-04 131 1.310000e+00 5.000000e-01 1.520297e-04 132 1.320000e+00 5.000000e-01 1.547074e-04 133 1.330000e+00 5.000000e-01 1.573778e-04 134 1.340000e+00 5.000000e-01 1.600413e-04 135 1.350000e+00 5.000000e-01 1.626982e-04 136 1.360000e+00 5.000000e-01 1.653488e-04 137 1.370000e+00 5.000000e-01 1.679935e-04 138 1.380000e+00 5.000000e-01 1.706326e-04 139 1.390000e+00 5.000000e-01 1.732663e-04 140 1.400000e+00 5.000000e-01 1.758949e-04 141 1.410000e+00 5.000000e-01 1.785186e-04 142 1.420000e+00 5.000000e-01 1.811378e-04 143 1.430000e+00 5.000000e-01 1.837527e-04 144 1.440000e+00 5.000000e-01 1.863635e-04 145 1.450000e+00 5.000000e-01 1.889703e-04 146 1.460000e+00 5.000000e-01 1.915735e-04 147 1.470000e+00 5.000000e-01 1.941732e-04 148 1.480000e+00 5.000000e-01 1.967696e-04 149 1.490000e+00 5.000000e-01 1.993629e-04 150 1.500000e+00 5.000000e-01 2.019532e-04 151 1.510000e+00 5.000000e-01 2.045407e-04 152 1.520000e+00 5.000000e-01 2.071256e-04 153 1.530000e+00 5.000000e-01 2.097079e-04 154 1.540000e+00 5.000000e-01 2.122879e-04 155 1.550000e+00 5.000000e-01 2.148655e-04 156 1.560000e+00 5.000000e-01 2.174410e-04 157 1.570000e+00 5.000000e-01 2.200145e-04 158 1.580000e+00 5.000000e-01 2.225860e-04 159 1.590000e+00 5.000000e-01 2.251557e-04 160 1.600000e+00 5.000000e-01 2.277237e-04 161 1.610000e+00 5.000000e-01 2.302899e-04 162 1.620000e+00 5.000000e-01 2.328546e-04 163 1.630000e+00 5.000000e-01 2.354177e-04 164 1.640000e+00 5.000000e-01 2.379794e-04 165 1.650000e+00 5.000000e-01 2.405397e-04 166 1.660000e+00 5.000000e-01 2.430987e-04 167 1.670000e+00 5.000000e-01 2.456564e-04 168 1.680000e+00 5.000000e-01 2.482128e-04 169 1.690000e+00 5.000000e-01 2.507681e-04 170 1.700000e+00 5.000000e-01 2.533222e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 171 1.710000e+00 5.000000e-01 2.558751e-04 172 1.720000e+00 5.000000e-01 2.584270e-04 173 1.730000e+00 5.000000e-01 2.609777e-04 174 1.740000e+00 5.000000e-01 2.635274e-04 175 1.750000e+00 5.000000e-01 2.660761e-04 176 1.760000e+00 5.000000e-01 2.686237e-04 177 1.770000e+00 5.000000e-01 2.711703e-04 178 1.780000e+00 5.000000e-01 2.737158e-04 179 1.790000e+00 5.000000e-01 2.762603e-04 180 1.800000e+00 5.000000e-01 2.788038e-04 181 1.810000e+00 5.000000e-01 2.813462e-04 182 1.820000e+00 5.000000e-01 2.838875e-04 183 1.830000e+00 5.000000e-01 2.864278e-04 184 1.840000e+00 5.000000e-01 2.889670e-04 185 1.850000e+00 5.000000e-01 2.915051e-04 186 1.860000e+00 5.000000e-01 2.940420e-04 187 1.870000e+00 5.000000e-01 2.965778e-04 188 1.880000e+00 5.000000e-01 2.991125e-04 189 1.890000e+00 5.000000e-01 3.016459e-04 190 1.900000e+00 5.000000e-01 3.041781e-04 191 1.910000e+00 5.000000e-01 3.067091e-04 192 1.920000e+00 5.000000e-01 3.092388e-04 193 1.930000e+00 5.000000e-01 3.117672e-04 194 1.940000e+00 5.000000e-01 3.142942e-04 195 1.950000e+00 5.000000e-01 3.168199e-04 196 1.960000e+00 5.000000e-01 3.193443e-04 197 1.970000e+00 5.000000e-01 3.218672e-04 198 1.980000e+00 5.000000e-01 3.243886e-04 199 1.990000e+00 5.000000e-01 3.269087e-04 200 2.000000e+00 5.000000e-01 3.294272e-04 201 2.010000e+00 5.000000e-01 3.319443e-04 202 2.020000e+00 5.000000e-01 3.344598e-04 203 2.030000e+00 5.000000e-01 3.369738e-04 204 2.040000e+00 5.000000e-01 3.394862e-04 205 2.050000e+00 5.000000e-01 3.419970e-04 206 2.060000e+00 5.000000e-01 3.445063e-04 207 2.070000e+00 5.000000e-01 3.470139e-04 208 2.080000e+00 5.000000e-01 3.495199e-04 209 2.090000e+00 5.000000e-01 3.520243e-04 210 2.100000e+00 5.000000e-01 3.545270e-04 211 2.110000e+00 5.000000e-01 3.570280e-04 212 2.120000e+00 5.000000e-01 3.595274e-04 213 2.130000e+00 5.000000e-01 3.620251e-04 214 2.140000e+00 5.000000e-01 3.645212e-04 215 2.150000e+00 5.000000e-01 3.670155e-04 216 2.160000e+00 5.000000e-01 3.695081e-04 217 2.170000e+00 5.000000e-01 3.719991e-04 218 2.180000e+00 5.000000e-01 3.744883e-04 219 2.190000e+00 5.000000e-01 3.769759e-04 220 2.200000e+00 5.000000e-01 3.794618e-04 221 2.210000e+00 5.000000e-01 3.819459e-04 222 2.220000e+00 5.000000e-01 3.844284e-04 223 2.230000e+00 5.000000e-01 3.869091e-04 224 2.240000e+00 5.000000e-01 3.893882e-04 225 2.250000e+00 5.000000e-01 3.918656e-04 226 2.260000e+00 5.000000e-01 3.943413e-04 227 2.270000e+00 5.000000e-01 3.968154e-04 228 2.280000e+00 5.000000e-01 3.992877e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 229 2.290000e+00 5.000000e-01 4.017584e-04 230 2.300000e+00 5.000000e-01 4.042275e-04 231 2.310000e+00 5.000000e-01 4.066948e-04 232 2.320000e+00 5.000000e-01 4.091606e-04 233 2.330000e+00 5.000000e-01 4.116247e-04 234 2.340000e+00 5.000000e-01 4.140872e-04 235 2.350000e+00 5.000000e-01 4.165481e-04 236 2.360000e+00 5.000000e-01 4.190074e-04 237 2.370000e+00 5.000000e-01 4.214651e-04 238 2.380000e+00 5.000000e-01 4.239212e-04 239 2.390000e+00 5.000000e-01 4.263757e-04 240 2.400000e+00 5.000000e-01 4.288287e-04 241 2.410000e+00 5.000000e-01 4.312801e-04 242 2.420000e+00 5.000000e-01 4.337300e-04 243 2.430000e+00 5.000000e-01 4.361783e-04 244 2.440000e+00 5.000000e-01 4.386252e-04 245 2.450000e+00 5.000000e-01 4.410705e-04 246 2.460000e+00 5.000000e-01 4.435144e-04 247 2.470000e+00 5.000000e-01 4.459567e-04 248 2.480000e+00 5.000000e-01 4.483977e-04 249 2.490000e+00 5.000000e-01 4.508371e-04 250 2.500000e+00 5.000000e-01 4.532752e-04 251 2.510000e+00 5.000000e-01 4.557118e-04 252 2.520000e+00 5.000000e-01 4.581470e-04 253 2.530000e+00 5.000000e-01 4.605808e-04 254 2.540000e+00 5.000000e-01 4.630132e-04 255 2.550000e+00 5.000000e-01 4.654442e-04 256 2.560000e+00 5.000000e-01 4.678739e-04 257 2.570000e+00 5.000000e-01 4.703023e-04 258 2.580000e+00 5.000000e-01 4.727293e-04 259 2.590000e+00 5.000000e-01 4.751551e-04 260 2.600000e+00 5.000000e-01 4.775795e-04 261 2.610000e+00 5.000000e-01 4.800026e-04 262 2.620000e+00 5.000000e-01 4.824245e-04 263 2.630000e+00 5.000000e-01 4.848452e-04 264 2.640000e+00 5.000000e-01 4.872645e-04 265 2.650000e+00 5.000000e-01 4.896827e-04 266 2.660000e+00 5.000000e-01 4.920997e-04 267 2.670000e+00 5.000000e-01 4.945154e-04 268 2.680000e+00 5.000000e-01 4.969300e-04 269 2.690000e+00 5.000000e-01 4.993434e-04 270 2.700000e+00 5.000000e-01 5.017557e-04 271 2.710000e+00 5.000000e-01 5.041668e-04 272 2.720000e+00 5.000000e-01 5.065768e-04 273 2.730000e+00 5.000000e-01 5.089857e-04 274 2.740000e+00 5.000000e-01 5.113935e-04 275 2.750000e+00 5.000000e-01 5.138003e-04 276 2.760000e+00 5.000000e-01 5.162060e-04 277 2.770000e+00 5.000000e-01 5.186106e-04 278 2.780000e+00 5.000000e-01 5.210142e-04 279 2.790000e+00 5.000000e-01 5.234168e-04 280 2.800000e+00 5.000000e-01 5.258184e-04 281 2.810000e+00 5.000000e-01 5.282190e-04 282 2.820000e+00 5.000000e-01 5.306187e-04 283 2.830000e+00 5.000000e-01 5.330174e-04 284 2.840000e+00 5.000000e-01 5.354151e-04 285 2.850000e+00 5.000000e-01 5.378119e-04 286 2.860000e+00 5.000000e-01 5.402079e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 287 2.870000e+00 5.000000e-01 5.426029e-04 288 2.880000e+00 5.000000e-01 5.449971e-04 289 2.890000e+00 5.000000e-01 5.473904e-04 290 2.900000e+00 5.000000e-01 5.497828e-04 291 2.910000e+00 5.000000e-01 5.521744e-04 292 2.920000e+00 5.000000e-01 5.545652e-04 293 2.930000e+00 5.000000e-01 5.569552e-04 294 2.940000e+00 5.000000e-01 5.593445e-04 295 2.950000e+00 5.000000e-01 5.617329e-04 296 2.960000e+00 5.000000e-01 5.641206e-04 297 2.970000e+00 5.000000e-01 5.665076e-04 298 2.980000e+00 5.000000e-01 5.688938e-04 299 2.990000e+00 5.000000e-01 5.712793e-04 300 3.000000e+00 5.000000e-01 5.736642e-04 301 0.000000e+00 1.000000e+00 0.000000e+00 302 1.000000e-02 1.000000e+00 3.715408e-05 303 2.000000e-02 1.000000e+00 7.321271e-05 304 3.000000e-02 1.000000e+00 1.081949e-04 305 4.000000e-02 1.000000e+00 1.421186e-04 306 5.000000e-02 1.000000e+00 1.750005e-04 307 6.000000e-02 1.000000e+00 2.068564e-04 308 7.000000e-02 1.000000e+00 2.377013e-04 309 8.000000e-02 1.000000e+00 2.675495e-04 310 9.000000e-02 1.000000e+00 2.964147e-04 311 1.000000e-01 1.000000e+00 3.243101e-04 312 1.100000e-01 1.000000e+00 3.512487e-04 313 1.200000e-01 1.000000e+00 3.772430e-04 314 1.300000e-01 1.000000e+00 4.023054e-04 315 1.400000e-01 1.000000e+00 4.264481e-04 316 1.500000e-01 1.000000e+00 4.496832e-04 317 1.600000e-01 1.000000e+00 4.720227e-04 318 1.700000e-01 1.000000e+00 4.934786e-04 319 1.800000e-01 1.000000e+00 5.140630e-04 320 1.900000e-01 1.000000e+00 5.337879e-04 321 2.000000e-01 1.000000e+00 5.526656e-04 322 2.100000e-01 1.000000e+00 5.707084e-04 323 2.200000e-01 1.000000e+00 5.879290e-04 324 2.300000e-01 1.000000e+00 6.043404e-04 325 2.400000e-01 1.000000e+00 6.199559e-04 326 2.500000e-01 1.000000e+00 6.347896e-04 327 2.600000e-01 1.000000e+00 6.488563e-04 328 2.700000e-01 1.000000e+00 6.621718e-04 329 2.800000e-01 1.000000e+00 6.747529e-04 330 2.900000e-01 1.000000e+00 6.866183e-04 331 3.000000e-01 1.000000e+00 6.977880e-04 332 3.100000e-01 1.000000e+00 7.082847e-04 333 3.200000e-01 1.000000e+00 7.181329e-04 334 3.300000e-01 1.000000e+00 7.273605e-04 335 3.400000e-01 1.000000e+00 7.359979e-04 336 3.500000e-01 1.000000e+00 7.440786e-04 337 3.600000e-01 1.000000e+00 7.516390e-04 338 3.700000e-01 1.000000e+00 7.587180e-04 339 3.800000e-01 1.000000e+00 7.653560e-04 340 3.900000e-01 1.000000e+00 7.715946e-04 341 4.000000e-01 1.000000e+00 7.774752e-04 342 4.100000e-01 1.000000e+00 7.830380e-04 343 4.200000e-01 1.000000e+00 7.883212e-04 344 4.300000e-01 1.000000e+00 7.933605e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 345 4.400000e-01 1.000000e+00 7.981881e-04 346 4.500000e-01 1.000000e+00 8.028328e-04 347 4.600000e-01 1.000000e+00 8.073203e-04 348 4.700000e-01 1.000000e+00 8.116726e-04 349 4.800000e-01 1.000000e+00 8.159089e-04 350 4.900000e-01 1.000000e+00 8.200459e-04 351 5.000000e-01 1.000000e+00 8.240975e-04 352 5.100000e-01 1.000000e+00 8.280761e-04 353 5.200000e-01 1.000000e+00 8.319920e-04 354 5.300000e-01 1.000000e+00 8.358543e-04 355 5.400000e-01 1.000000e+00 8.396708e-04 356 5.500000e-01 1.000000e+00 8.434483e-04 357 5.600000e-01 1.000000e+00 8.471929e-04 358 5.700000e-01 1.000000e+00 8.509100e-04 359 5.800000e-01 1.000000e+00 8.546047e-04 360 5.900000e-01 1.000000e+00 8.582814e-04 361 6.000000e-01 1.000000e+00 8.619447e-04 362 6.100000e-01 1.000000e+00 8.655988e-04 363 6.200000e-01 1.000000e+00 8.692478e-04 364 6.300000e-01 1.000000e+00 8.728962e-04 365 6.400000e-01 1.000000e+00 8.765484e-04 366 6.500000e-01 1.000000e+00 8.802092e-04 367 6.600000e-01 1.000000e+00 8.838836e-04 368 6.700000e-01 1.000000e+00 8.875774e-04 369 6.800000e-01 1.000000e+00 8.912966e-04 370 6.900000e-01 1.000000e+00 8.950480e-04 371 7.000000e-01 1.000000e+00 8.988392e-04 372 7.100000e-01 1.000000e+00 9.026785e-04 373 7.200000e-01 1.000000e+00 9.065754e-04 374 7.300000e-01 1.000000e+00 9.105399e-04 375 7.400000e-01 1.000000e+00 9.145835e-04 376 7.500000e-01 1.000000e+00 9.187186e-04 377 7.600000e-01 1.000000e+00 9.229585e-04 378 7.700000e-01 1.000000e+00 9.273179e-04 379 7.800000e-01 1.000000e+00 9.318122e-04 380 7.900000e-01 1.000000e+00 9.364577e-04 381 8.000000e-01 1.000000e+00 9.412713e-04 382 8.100000e-01 1.000000e+00 9.462701e-04 383 8.200000e-01 1.000000e+00 9.514714e-04 384 8.300000e-01 1.000000e+00 9.568920e-04 385 8.400000e-01 1.000000e+00 9.625477e-04 386 8.500000e-01 1.000000e+00 9.684529e-04 387 8.600000e-01 1.000000e+00 9.746199e-04 388 8.700000e-01 1.000000e+00 9.810583e-04 389 8.800000e-01 1.000000e+00 9.877746e-04 390 8.900000e-01 1.000000e+00 9.947716e-04 391 9.000000e-01 1.000000e+00 1.002048e-03 392 9.100000e-01 1.000000e+00 1.009598e-03 393 9.200000e-01 1.000000e+00 1.017412e-03 394 9.300000e-01 1.000000e+00 1.025476e-03 395 9.400000e-01 1.000000e+00 1.033770e-03 396 9.500000e-01 1.000000e+00 1.042275e-03 397 9.600000e-01 1.000000e+00 1.050964e-03 398 9.700000e-01 1.000000e+00 1.059812e-03 399 9.800000e-01 1.000000e+00 1.068790e-03 400 9.900000e-01 1.000000e+00 1.077870e-03 401 1.000000e+00 1.000000e+00 1.087023e-03 402 1.010000e+00 1.000000e+00 1.096235e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 403 1.020000e+00 1.000000e+00 1.105510e-03 404 1.030000e+00 1.000000e+00 1.114806e-03 405 1.040000e+00 1.000000e+00 1.124089e-03 406 1.050000e+00 1.000000e+00 1.133328e-03 407 1.060000e+00 1.000000e+00 1.142505e-03 408 1.070000e+00 1.000000e+00 1.151600e-03 409 1.080000e+00 1.000000e+00 1.160604e-03 410 1.090000e+00 1.000000e+00 1.169505e-03 411 1.100000e+00 1.000000e+00 1.178298e-03 412 1.110000e+00 1.000000e+00 1.186980e-03 413 1.120000e+00 1.000000e+00 1.195547e-03 414 1.130000e+00 1.000000e+00 1.203999e-03 415 1.140000e+00 1.000000e+00 1.212338e-03 416 1.150000e+00 1.000000e+00 1.220563e-03 417 1.160000e+00 1.000000e+00 1.228678e-03 418 1.170000e+00 1.000000e+00 1.236685e-03 419 1.180000e+00 1.000000e+00 1.244587e-03 420 1.190000e+00 1.000000e+00 1.252387e-03 421 1.200000e+00 1.000000e+00 1.260089e-03 422 1.210000e+00 1.000000e+00 1.267696e-03 423 1.220000e+00 1.000000e+00 1.275211e-03 424 1.230000e+00 1.000000e+00 1.282639e-03 425 1.240000e+00 1.000000e+00 1.289982e-03 426 1.250000e+00 1.000000e+00 1.297245e-03 427 1.260000e+00 1.000000e+00 1.304429e-03 428 1.270000e+00 1.000000e+00 1.311538e-03 429 1.280000e+00 1.000000e+00 1.318575e-03 430 1.290000e+00 1.000000e+00 1.325543e-03 431 1.300000e+00 1.000000e+00 1.332444e-03 432 1.310000e+00 1.000000e+00 1.339281e-03 433 1.320000e+00 1.000000e+00 1.346057e-03 434 1.330000e+00 1.000000e+00 1.352774e-03 435 1.340000e+00 1.000000e+00 1.359434e-03 436 1.350000e+00 1.000000e+00 1.366039e-03 437 1.360000e+00 1.000000e+00 1.372591e-03 438 1.370000e+00 1.000000e+00 1.379092e-03 439 1.380000e+00 1.000000e+00 1.385543e-03 440 1.390000e+00 1.000000e+00 1.391947e-03 441 1.400000e+00 1.000000e+00 1.398305e-03 442 1.410000e+00 1.000000e+00 1.404619e-03 443 1.420000e+00 1.000000e+00 1.410889e-03 444 1.430000e+00 1.000000e+00 1.417118e-03 445 1.440000e+00 1.000000e+00 1.423307e-03 446 1.450000e+00 1.000000e+00 1.429456e-03 447 1.460000e+00 1.000000e+00 1.435567e-03 448 1.470000e+00 1.000000e+00 1.441642e-03 449 1.480000e+00 1.000000e+00 1.447681e-03 450 1.490000e+00 1.000000e+00 1.453685e-03 451 1.500000e+00 1.000000e+00 1.459655e-03 452 1.510000e+00 1.000000e+00 1.465593e-03 453 1.520000e+00 1.000000e+00 1.471498e-03 454 1.530000e+00 1.000000e+00 1.477373e-03 455 1.540000e+00 1.000000e+00 1.483217e-03 456 1.550000e+00 1.000000e+00 1.489031e-03 457 1.560000e+00 1.000000e+00 1.494816e-03 458 1.570000e+00 1.000000e+00 1.500574e-03 459 1.580000e+00 1.000000e+00 1.506303e-03 460 1.590000e+00 1.000000e+00 1.512006e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 461 1.600000e+00 1.000000e+00 1.517683e-03 462 1.610000e+00 1.000000e+00 1.523333e-03 463 1.620000e+00 1.000000e+00 1.528959e-03 464 1.630000e+00 1.000000e+00 1.534559e-03 465 1.640000e+00 1.000000e+00 1.540135e-03 466 1.650000e+00 1.000000e+00 1.545688e-03 467 1.660000e+00 1.000000e+00 1.551217e-03 468 1.670000e+00 1.000000e+00 1.556722e-03 469 1.680000e+00 1.000000e+00 1.562206e-03 470 1.690000e+00 1.000000e+00 1.567666e-03 471 1.700000e+00 1.000000e+00 1.573105e-03 472 1.710000e+00 1.000000e+00 1.578522e-03 473 1.720000e+00 1.000000e+00 1.583918e-03 474 1.730000e+00 1.000000e+00 1.589292e-03 475 1.740000e+00 1.000000e+00 1.594646e-03 476 1.750000e+00 1.000000e+00 1.599979e-03 477 1.760000e+00 1.000000e+00 1.605292e-03 478 1.770000e+00 1.000000e+00 1.610585e-03 479 1.780000e+00 1.000000e+00 1.615858e-03 480 1.790000e+00 1.000000e+00 1.621111e-03 481 1.800000e+00 1.000000e+00 1.626345e-03 482 1.810000e+00 1.000000e+00 1.631560e-03 483 1.820000e+00 1.000000e+00 1.636755e-03 484 1.830000e+00 1.000000e+00 1.641932e-03 485 1.840000e+00 1.000000e+00 1.647090e-03 486 1.850000e+00 1.000000e+00 1.652230e-03 487 1.860000e+00 1.000000e+00 1.657351e-03 488 1.870000e+00 1.000000e+00 1.662455e-03 489 1.880000e+00 1.000000e+00 1.667541e-03 490 1.890000e+00 1.000000e+00 1.672608e-03 491 1.900000e+00 1.000000e+00 1.677659e-03 492 1.910000e+00 1.000000e+00 1.682692e-03 493 1.920000e+00 1.000000e+00 1.687708e-03 494 1.930000e+00 1.000000e+00 1.692707e-03 495 1.940000e+00 1.000000e+00 1.697689e-03 496 1.950000e+00 1.000000e+00 1.702655e-03 497 1.960000e+00 1.000000e+00 1.707605e-03 498 1.970000e+00 1.000000e+00 1.712538e-03 499 1.980000e+00 1.000000e+00 1.717455e-03 500 1.990000e+00 1.000000e+00 1.722356e-03 501 2.000000e+00 1.000000e+00 1.727241e-03 502 2.010000e+00 1.000000e+00 1.732111e-03 503 2.020000e+00 1.000000e+00 1.736966e-03 504 2.030000e+00 1.000000e+00 1.741805e-03 505 2.040000e+00 1.000000e+00 1.746630e-03 506 2.050000e+00 1.000000e+00 1.751439e-03 507 2.060000e+00 1.000000e+00 1.756234e-03 508 2.070000e+00 1.000000e+00 1.761015e-03 509 2.080000e+00 1.000000e+00 1.765781e-03 510 2.090000e+00 1.000000e+00 1.770533e-03 511 2.100000e+00 1.000000e+00 1.775271e-03 512 2.110000e+00 1.000000e+00 1.779995e-03 513 2.120000e+00 1.000000e+00 1.784706e-03 514 2.130000e+00 1.000000e+00 1.789403e-03 515 2.140000e+00 1.000000e+00 1.794087e-03 516 2.150000e+00 1.000000e+00 1.798757e-03 517 2.160000e+00 1.000000e+00 1.803415e-03 518 2.170000e+00 1.000000e+00 1.808059e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 519 2.180000e+00 1.000000e+00 1.812691e-03 520 2.190000e+00 1.000000e+00 1.817311e-03 521 2.200000e+00 1.000000e+00 1.821918e-03 522 2.210000e+00 1.000000e+00 1.826512e-03 523 2.220000e+00 1.000000e+00 1.831095e-03 524 2.230000e+00 1.000000e+00 1.835666e-03 525 2.240000e+00 1.000000e+00 1.840225e-03 526 2.250000e+00 1.000000e+00 1.844772e-03 527 2.260000e+00 1.000000e+00 1.849307e-03 528 2.270000e+00 1.000000e+00 1.853832e-03 529 2.280000e+00 1.000000e+00 1.858345e-03 530 2.290000e+00 1.000000e+00 1.862846e-03 531 2.300000e+00 1.000000e+00 1.867337e-03 532 2.310000e+00 1.000000e+00 1.871817e-03 533 2.320000e+00 1.000000e+00 1.876286e-03 534 2.330000e+00 1.000000e+00 1.880745e-03 535 2.340000e+00 1.000000e+00 1.885193e-03 536 2.350000e+00 1.000000e+00 1.889631e-03 537 2.360000e+00 1.000000e+00 1.894059e-03 538 2.370000e+00 1.000000e+00 1.898476e-03 539 2.380000e+00 1.000000e+00 1.902884e-03 540 2.390000e+00 1.000000e+00 1.907281e-03 541 2.400000e+00 1.000000e+00 1.911669e-03 542 2.410000e+00 1.000000e+00 1.916047e-03 543 2.420000e+00 1.000000e+00 1.920416e-03 544 2.430000e+00 1.000000e+00 1.924776e-03 545 2.440000e+00 1.000000e+00 1.929126e-03 546 2.450000e+00 1.000000e+00 1.933467e-03 547 2.460000e+00 1.000000e+00 1.937798e-03 548 2.470000e+00 1.000000e+00 1.942121e-03 549 2.480000e+00 1.000000e+00 1.946435e-03 550 2.490000e+00 1.000000e+00 1.950741e-03 551 2.500000e+00 1.000000e+00 1.955037e-03 552 2.510000e+00 1.000000e+00 1.959326e-03 553 2.520000e+00 1.000000e+00 1.963605e-03 554 2.530000e+00 1.000000e+00 1.967877e-03 555 2.540000e+00 1.000000e+00 1.972140e-03 556 2.550000e+00 1.000000e+00 1.976395e-03 557 2.560000e+00 1.000000e+00 1.980642e-03 558 2.570000e+00 1.000000e+00 1.984881e-03 559 2.580000e+00 1.000000e+00 1.989113e-03 560 2.590000e+00 1.000000e+00 1.993336e-03 561 2.600000e+00 1.000000e+00 1.997552e-03 562 2.610000e+00 1.000000e+00 2.001761e-03 563 2.620000e+00 1.000000e+00 2.005962e-03 564 2.630000e+00 1.000000e+00 2.010156e-03 565 2.640000e+00 1.000000e+00 2.014342e-03 566 2.650000e+00 1.000000e+00 2.018521e-03 567 2.660000e+00 1.000000e+00 2.022693e-03 568 2.670000e+00 1.000000e+00 2.026859e-03 569 2.680000e+00 1.000000e+00 2.031017e-03 570 2.690000e+00 1.000000e+00 2.035168e-03 571 2.700000e+00 1.000000e+00 2.039313e-03 572 2.710000e+00 1.000000e+00 2.043451e-03 573 2.720000e+00 1.000000e+00 2.047582e-03 574 2.730000e+00 1.000000e+00 2.051707e-03 575 2.740000e+00 1.000000e+00 2.055826e-03 576 2.750000e+00 1.000000e+00 2.059938e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 577 2.760000e+00 1.000000e+00 2.064044e-03 578 2.770000e+00 1.000000e+00 2.068144e-03 579 2.780000e+00 1.000000e+00 2.072238e-03 580 2.790000e+00 1.000000e+00 2.076326e-03 581 2.800000e+00 1.000000e+00 2.080407e-03 582 2.810000e+00 1.000000e+00 2.084483e-03 583 2.820000e+00 1.000000e+00 2.088554e-03 584 2.830000e+00 1.000000e+00 2.092618e-03 585 2.840000e+00 1.000000e+00 2.096677e-03 586 2.850000e+00 1.000000e+00 2.100730e-03 587 2.860000e+00 1.000000e+00 2.104778e-03 588 2.870000e+00 1.000000e+00 2.108821e-03 589 2.880000e+00 1.000000e+00 2.112858e-03 590 2.890000e+00 1.000000e+00 2.116890e-03 591 2.900000e+00 1.000000e+00 2.120917e-03 592 2.910000e+00 1.000000e+00 2.124938e-03 593 2.920000e+00 1.000000e+00 2.128955e-03 594 2.930000e+00 1.000000e+00 2.132966e-03 595 2.940000e+00 1.000000e+00 2.136973e-03 596 2.950000e+00 1.000000e+00 2.140975e-03 597 2.960000e+00 1.000000e+00 2.144972e-03 598 2.970000e+00 1.000000e+00 2.148964e-03 599 2.980000e+00 1.000000e+00 2.152952e-03 600 2.990000e+00 1.000000e+00 2.156935e-03 601 3.000000e+00 1.000000e+00 2.160913e-03 602 0.000000e+00 1.500000e+00 0.000000e+00 603 1.000000e-02 1.500000e+00 6.670045e-05 604 2.000000e-02 1.500000e+00 1.321933e-04 605 3.000000e-02 1.500000e+00 1.964976e-04 606 4.000000e-02 1.500000e+00 2.596311e-04 607 5.000000e-02 1.500000e+00 3.216106e-04 608 6.000000e-02 1.500000e+00 3.824518e-04 609 7.000000e-02 1.500000e+00 4.421697e-04 610 8.000000e-02 1.500000e+00 5.007785e-04 611 9.000000e-02 1.500000e+00 5.582918e-04 612 1.000000e-01 1.500000e+00 6.147226e-04 613 1.100000e-01 1.500000e+00 6.700838e-04 614 1.200000e-01 1.500000e+00 7.243877e-04 615 1.300000e-01 1.500000e+00 7.776464e-04 616 1.400000e-01 1.500000e+00 8.298717e-04 617 1.500000e-01 1.500000e+00 8.810753e-04 618 1.600000e-01 1.500000e+00 9.312687e-04 619 1.700000e-01 1.500000e+00 9.804632e-04 620 1.800000e-01 1.500000e+00 1.028670e-03 621 1.900000e-01 1.500000e+00 1.075900e-03 622 2.000000e-01 1.500000e+00 1.122164e-03 623 2.100000e-01 1.500000e+00 1.167473e-03 624 2.200000e-01 1.500000e+00 1.211838e-03 625 2.300000e-01 1.500000e+00 1.255268e-03 626 2.400000e-01 1.500000e+00 1.297774e-03 627 2.500000e-01 1.500000e+00 1.339366e-03 628 2.600000e-01 1.500000e+00 1.380055e-03 629 2.700000e-01 1.500000e+00 1.419849e-03 630 2.800000e-01 1.500000e+00 1.458758e-03 631 2.900000e-01 1.500000e+00 1.496792e-03 632 3.000000e-01 1.500000e+00 1.533960e-03 633 3.100000e-01 1.500000e+00 1.570271e-03 634 3.200000e-01 1.500000e+00 1.605734e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 635 3.300000e-01 1.500000e+00 1.640358e-03 636 3.400000e-01 1.500000e+00 1.674151e-03 637 3.500000e-01 1.500000e+00 1.707121e-03 638 3.600000e-01 1.500000e+00 1.739278e-03 639 3.700000e-01 1.500000e+00 1.770629e-03 640 3.800000e-01 1.500000e+00 1.801181e-03 641 3.900000e-01 1.500000e+00 1.830945e-03 642 4.000000e-01 1.500000e+00 1.859926e-03 643 4.100000e-01 1.500000e+00 1.888133e-03 644 4.200000e-01 1.500000e+00 1.915573e-03 645 4.300000e-01 1.500000e+00 1.942254e-03 646 4.400000e-01 1.500000e+00 1.968183e-03 647 4.500000e-01 1.500000e+00 1.993369e-03 648 4.600000e-01 1.500000e+00 2.017818e-03 649 4.700000e-01 1.500000e+00 2.041537e-03 650 4.800000e-01 1.500000e+00 2.064536e-03 651 4.900000e-01 1.500000e+00 2.086820e-03 652 5.000000e-01 1.500000e+00 2.108399e-03 653 5.100000e-01 1.500000e+00 2.129280e-03 654 5.200000e-01 1.500000e+00 2.149471e-03 655 5.300000e-01 1.500000e+00 2.168980e-03 656 5.400000e-01 1.500000e+00 2.187818e-03 657 5.500000e-01 1.500000e+00 2.205994e-03 658 5.600000e-01 1.500000e+00 2.223517e-03 659 5.700000e-01 1.500000e+00 2.240398e-03 660 5.800000e-01 1.500000e+00 2.256651e-03 661 5.900000e-01 1.500000e+00 2.272286e-03 662 6.000000e-01 1.500000e+00 2.287319e-03 663 6.100000e-01 1.500000e+00 2.301764e-03 664 6.200000e-01 1.500000e+00 2.315639e-03 665 6.300000e-01 1.500000e+00 2.328962e-03 666 6.400000e-01 1.500000e+00 2.341751e-03 667 6.500000e-01 1.500000e+00 2.354030e-03 668 6.600000e-01 1.500000e+00 2.365820e-03 669 6.700000e-01 1.500000e+00 2.377145e-03 670 6.800000e-01 1.500000e+00 2.388030e-03 671 6.900000e-01 1.500000e+00 2.398501e-03 672 7.000000e-01 1.500000e+00 2.408585e-03 673 7.100000e-01 1.500000e+00 2.418308e-03 674 7.200000e-01 1.500000e+00 2.427696e-03 675 7.300000e-01 1.500000e+00 2.436777e-03 676 7.400000e-01 1.500000e+00 2.445575e-03 677 7.500000e-01 1.500000e+00 2.454117e-03 678 7.600000e-01 1.500000e+00 2.462427e-03 679 7.700000e-01 1.500000e+00 2.470529e-03 680 7.800000e-01 1.500000e+00 2.478448e-03 681 7.900000e-01 1.500000e+00 2.486207e-03 682 8.000000e-01 1.500000e+00 2.493829e-03 683 8.100000e-01 1.500000e+00 2.501339e-03 684 8.200000e-01 1.500000e+00 2.508758e-03 685 8.300000e-01 1.500000e+00 2.516112e-03 686 8.400000e-01 1.500000e+00 2.523425e-03 687 8.500000e-01 1.500000e+00 2.530722e-03 688 8.600000e-01 1.500000e+00 2.538031e-03 689 8.700000e-01 1.500000e+00 2.545378e-03 690 8.800000e-01 1.500000e+00 2.552793e-03 691 8.900000e-01 1.500000e+00 2.560307e-03 692 9.000000e-01 1.500000e+00 2.567949e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 693 9.100000e-01 1.500000e+00 2.575752e-03 694 9.200000e-01 1.500000e+00 2.583749e-03 695 9.300000e-01 1.500000e+00 2.591973e-03 696 9.400000e-01 1.500000e+00 2.600454e-03 697 9.500000e-01 1.500000e+00 2.609223e-03 698 9.600000e-01 1.500000e+00 2.618309e-03 699 9.700000e-01 1.500000e+00 2.627734e-03 700 9.800000e-01 1.500000e+00 2.637519e-03 701 9.900000e-01 1.500000e+00 2.647677e-03 702 1.000000e+00 1.500000e+00 2.658216e-03 703 1.010000e+00 1.500000e+00 2.669135e-03 704 1.020000e+00 1.500000e+00 2.680429e-03 705 1.030000e+00 1.500000e+00 2.692080e-03 706 1.040000e+00 1.500000e+00 2.704067e-03 707 1.050000e+00 1.500000e+00 2.716360e-03 708 1.060000e+00 1.500000e+00 2.728925e-03 709 1.070000e+00 1.500000e+00 2.741721e-03 710 1.080000e+00 1.500000e+00 2.754706e-03 711 1.090000e+00 1.500000e+00 2.767839e-03 712 1.100000e+00 1.500000e+00 2.781123e-03 713 1.110000e+00 1.500000e+00 2.794518e-03 714 1.120000e+00 1.500000e+00 2.807957e-03 715 1.130000e+00 1.500000e+00 2.821388e-03 716 1.140000e+00 1.500000e+00 2.834765e-03 717 1.150000e+00 1.500000e+00 2.848055e-03 718 1.160000e+00 1.500000e+00 2.861230e-03 719 1.170000e+00 1.500000e+00 2.874267e-03 720 1.180000e+00 1.500000e+00 2.887153e-03 721 1.190000e+00 1.500000e+00 2.899873e-03 722 1.200000e+00 1.500000e+00 2.912422e-03 723 1.210000e+00 1.500000e+00 2.924795e-03 724 1.220000e+00 1.500000e+00 2.936989e-03 725 1.230000e+00 1.500000e+00 2.949005e-03 726 1.240000e+00 1.500000e+00 2.960845e-03 727 1.250000e+00 1.500000e+00 2.972510e-03 728 1.260000e+00 1.500000e+00 2.984006e-03 729 1.270000e+00 1.500000e+00 2.995337e-03 730 1.280000e+00 1.500000e+00 3.006507e-03 731 1.290000e+00 1.500000e+00 3.017522e-03 732 1.300000e+00 1.500000e+00 3.028386e-03 733 1.310000e+00 1.500000e+00 3.039107e-03 734 1.320000e+00 1.500000e+00 3.049688e-03 735 1.330000e+00 1.500000e+00 3.060135e-03 736 1.340000e+00 1.500000e+00 3.070454e-03 737 1.350000e+00 1.500000e+00 3.080649e-03 738 1.360000e+00 1.500000e+00 3.090725e-03 739 1.370000e+00 1.500000e+00 3.100686e-03 740 1.380000e+00 1.500000e+00 3.110538e-03 741 1.390000e+00 1.500000e+00 3.120284e-03 742 1.400000e+00 1.500000e+00 3.129929e-03 743 1.410000e+00 1.500000e+00 3.139475e-03 744 1.420000e+00 1.500000e+00 3.148928e-03 745 1.430000e+00 1.500000e+00 3.158290e-03 746 1.440000e+00 1.500000e+00 3.167564e-03 747 1.450000e+00 1.500000e+00 3.176754e-03 748 1.460000e+00 1.500000e+00 3.185863e-03 749 1.470000e+00 1.500000e+00 3.194893e-03 750 1.480000e+00 1.500000e+00 3.203847e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 751 1.490000e+00 1.500000e+00 3.212728e-03 752 1.500000e+00 1.500000e+00 3.221538e-03 753 1.510000e+00 1.500000e+00 3.230279e-03 754 1.520000e+00 1.500000e+00 3.238954e-03 755 1.530000e+00 1.500000e+00 3.247565e-03 756 1.540000e+00 1.500000e+00 3.256113e-03 757 1.550000e+00 1.500000e+00 3.264600e-03 758 1.560000e+00 1.500000e+00 3.273029e-03 759 1.570000e+00 1.500000e+00 3.281400e-03 760 1.580000e+00 1.500000e+00 3.289716e-03 761 1.590000e+00 1.500000e+00 3.297978e-03 762 1.600000e+00 1.500000e+00 3.306187e-03 763 1.610000e+00 1.500000e+00 3.314345e-03 764 1.620000e+00 1.500000e+00 3.322454e-03 765 1.630000e+00 1.500000e+00 3.330513e-03 766 1.640000e+00 1.500000e+00 3.338525e-03 767 1.650000e+00 1.500000e+00 3.346491e-03 768 1.660000e+00 1.500000e+00 3.354412e-03 769 1.670000e+00 1.500000e+00 3.362288e-03 770 1.680000e+00 1.500000e+00 3.370121e-03 771 1.690000e+00 1.500000e+00 3.377912e-03 772 1.700000e+00 1.500000e+00 3.385661e-03 773 1.710000e+00 1.500000e+00 3.393369e-03 774 1.720000e+00 1.500000e+00 3.401037e-03 775 1.730000e+00 1.500000e+00 3.408665e-03 776 1.740000e+00 1.500000e+00 3.416255e-03 777 1.750000e+00 1.500000e+00 3.423807e-03 778 1.760000e+00 1.500000e+00 3.431322e-03 779 1.770000e+00 1.500000e+00 3.438799e-03 780 1.780000e+00 1.500000e+00 3.446241e-03 781 1.790000e+00 1.500000e+00 3.453646e-03 782 1.800000e+00 1.500000e+00 3.461017e-03 783 1.810000e+00 1.500000e+00 3.468352e-03 784 1.820000e+00 1.500000e+00 3.475653e-03 785 1.830000e+00 1.500000e+00 3.482920e-03 786 1.840000e+00 1.500000e+00 3.490154e-03 787 1.850000e+00 1.500000e+00 3.497355e-03 788 1.860000e+00 1.500000e+00 3.504523e-03 789 1.870000e+00 1.500000e+00 3.511659e-03 790 1.880000e+00 1.500000e+00 3.518763e-03 791 1.890000e+00 1.500000e+00 3.525836e-03 792 1.900000e+00 1.500000e+00 3.532878e-03 793 1.910000e+00 1.500000e+00 3.539889e-03 794 1.920000e+00 1.500000e+00 3.546869e-03 795 1.930000e+00 1.500000e+00 3.553820e-03 796 1.940000e+00 1.500000e+00 3.560741e-03 797 1.950000e+00 1.500000e+00 3.567634e-03 798 1.960000e+00 1.500000e+00 3.574497e-03 799 1.970000e+00 1.500000e+00 3.581332e-03 800 1.980000e+00 1.500000e+00 3.588139e-03 801 1.990000e+00 1.500000e+00 3.594918e-03 802 2.000000e+00 1.500000e+00 3.601670e-03 803 2.010000e+00 1.500000e+00 3.608394e-03 804 2.020000e+00 1.500000e+00 3.615093e-03 805 2.030000e+00 1.500000e+00 3.621764e-03 806 2.040000e+00 1.500000e+00 3.628410e-03 807 2.050000e+00 1.500000e+00 3.635030e-03 808 2.060000e+00 1.500000e+00 3.641625e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 809 2.070000e+00 1.500000e+00 3.648195e-03 810 2.080000e+00 1.500000e+00 3.654740e-03 811 2.090000e+00 1.500000e+00 3.661261e-03 812 2.100000e+00 1.500000e+00 3.667758e-03 813 2.110000e+00 1.500000e+00 3.674232e-03 814 2.120000e+00 1.500000e+00 3.680682e-03 815 2.130000e+00 1.500000e+00 3.687109e-03 816 2.140000e+00 1.500000e+00 3.693513e-03 817 2.150000e+00 1.500000e+00 3.699895e-03 818 2.160000e+00 1.500000e+00 3.706254e-03 819 2.170000e+00 1.500000e+00 3.712592e-03 820 2.180000e+00 1.500000e+00 3.718909e-03 821 2.190000e+00 1.500000e+00 3.725204e-03 822 2.200000e+00 1.500000e+00 3.731478e-03 823 2.210000e+00 1.500000e+00 3.737731e-03 824 2.220000e+00 1.500000e+00 3.743965e-03 825 2.230000e+00 1.500000e+00 3.750178e-03 826 2.240000e+00 1.500000e+00 3.756371e-03 827 2.250000e+00 1.500000e+00 3.762544e-03 828 2.260000e+00 1.500000e+00 3.768698e-03 829 2.270000e+00 1.500000e+00 3.774834e-03 830 2.280000e+00 1.500000e+00 3.780950e-03 831 2.290000e+00 1.500000e+00 3.787048e-03 832 2.300000e+00 1.500000e+00 3.793127e-03 833 2.310000e+00 1.500000e+00 3.799189e-03 834 2.320000e+00 1.500000e+00 3.805232e-03 835 2.330000e+00 1.500000e+00 3.811258e-03 836 2.340000e+00 1.500000e+00 3.817267e-03 837 2.350000e+00 1.500000e+00 3.823259e-03 838 2.360000e+00 1.500000e+00 3.829233e-03 839 2.370000e+00 1.500000e+00 3.835191e-03 840 2.380000e+00 1.500000e+00 3.841133e-03 841 2.390000e+00 1.500000e+00 3.847058e-03 842 2.400000e+00 1.500000e+00 3.852967e-03 843 2.410000e+00 1.500000e+00 3.858861e-03 844 2.420000e+00 1.500000e+00 3.864739e-03 845 2.430000e+00 1.500000e+00 3.870601e-03 846 2.440000e+00 1.500000e+00 3.876449e-03 847 2.450000e+00 1.500000e+00 3.882281e-03 848 2.460000e+00 1.500000e+00 3.888098e-03 849 2.470000e+00 1.500000e+00 3.893901e-03 850 2.480000e+00 1.500000e+00 3.899690e-03 851 2.490000e+00 1.500000e+00 3.905464e-03 852 2.500000e+00 1.500000e+00 3.911224e-03 853 2.510000e+00 1.500000e+00 3.916971e-03 854 2.520000e+00 1.500000e+00 3.922704e-03 855 2.530000e+00 1.500000e+00 3.928423e-03 856 2.540000e+00 1.500000e+00 3.934129e-03 857 2.550000e+00 1.500000e+00 3.939822e-03 858 2.560000e+00 1.500000e+00 3.945502e-03 859 2.570000e+00 1.500000e+00 3.951169e-03 860 2.580000e+00 1.500000e+00 3.956824e-03 861 2.590000e+00 1.500000e+00 3.962466e-03 862 2.600000e+00 1.500000e+00 3.968095e-03 863 2.610000e+00 1.500000e+00 3.973713e-03 864 2.620000e+00 1.500000e+00 3.979319e-03 865 2.630000e+00 1.500000e+00 3.984913e-03 866 2.640000e+00 1.500000e+00 3.990495e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 867 2.650000e+00 1.500000e+00 3.996066e-03 868 2.660000e+00 1.500000e+00 4.001625e-03 869 2.670000e+00 1.500000e+00 4.007174e-03 870 2.680000e+00 1.500000e+00 4.012711e-03 871 2.690000e+00 1.500000e+00 4.018237e-03 872 2.700000e+00 1.500000e+00 4.023753e-03 873 2.710000e+00 1.500000e+00 4.029258e-03 874 2.720000e+00 1.500000e+00 4.034752e-03 875 2.730000e+00 1.500000e+00 4.040236e-03 876 2.740000e+00 1.500000e+00 4.045710e-03 877 2.750000e+00 1.500000e+00 4.051174e-03 878 2.760000e+00 1.500000e+00 4.056629e-03 879 2.770000e+00 1.500000e+00 4.062073e-03 880 2.780000e+00 1.500000e+00 4.067508e-03 881 2.790000e+00 1.500000e+00 4.072933e-03 882 2.800000e+00 1.500000e+00 4.078348e-03 883 2.810000e+00 1.500000e+00 4.083755e-03 884 2.820000e+00 1.500000e+00 4.089152e-03 885 2.830000e+00 1.500000e+00 4.094541e-03 886 2.840000e+00 1.500000e+00 4.099920e-03 887 2.850000e+00 1.500000e+00 4.105291e-03 888 2.860000e+00 1.500000e+00 4.110653e-03 889 2.870000e+00 1.500000e+00 4.116007e-03 890 2.880000e+00 1.500000e+00 4.121352e-03 891 2.890000e+00 1.500000e+00 4.126689e-03 892 2.900000e+00 1.500000e+00 4.132018e-03 893 2.910000e+00 1.500000e+00 4.137338e-03 894 2.920000e+00 1.500000e+00 4.142651e-03 895 2.930000e+00 1.500000e+00 4.147956e-03 896 2.940000e+00 1.500000e+00 4.153253e-03 897 2.950000e+00 1.500000e+00 4.158543e-03 898 2.960000e+00 1.500000e+00 4.163825e-03 899 2.970000e+00 1.500000e+00 4.169100e-03 900 2.980000e+00 1.500000e+00 4.174368e-03 901 2.990000e+00 1.500000e+00 4.179628e-03 902 3.000000e+00 1.500000e+00 4.184881e-03 903 0.000000e+00 2.000000e+00 0.000000e+00 904 1.000000e-02 2.000000e+00 8.811602e-05 905 2.000000e-02 2.000000e+00 1.750348e-04 906 3.000000e-02 2.000000e+00 2.607739e-04 907 4.000000e-02 2.000000e+00 3.453498e-04 908 5.000000e-02 2.000000e+00 4.287780e-04 909 6.000000e-02 2.000000e+00 5.110728e-04 910 7.000000e-02 2.000000e+00 5.922480e-04 911 8.000000e-02 2.000000e+00 6.723166e-04 912 9.000000e-02 2.000000e+00 7.512910e-04 913 1.000000e-01 2.000000e+00 8.291832e-04 914 1.100000e-01 2.000000e+00 9.060046e-04 915 1.200000e-01 2.000000e+00 9.817667e-04 916 1.300000e-01 2.000000e+00 1.056480e-03 917 1.400000e-01 2.000000e+00 1.130157e-03 918 1.500000e-01 2.000000e+00 1.202806e-03 919 1.600000e-01 2.000000e+00 1.274439e-03 920 1.700000e-01 2.000000e+00 1.345065e-03 921 1.800000e-01 2.000000e+00 1.414696e-03 922 1.900000e-01 2.000000e+00 1.483341e-03 923 2.000000e-01 2.000000e+00 1.551011e-03 924 2.100000e-01 2.000000e+00 1.617714e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 925 2.200000e-01 2.000000e+00 1.683461e-03 926 2.300000e-01 2.000000e+00 1.748261e-03 927 2.400000e-01 2.000000e+00 1.812124e-03 928 2.500000e-01 2.000000e+00 1.875059e-03 929 2.600000e-01 2.000000e+00 1.937075e-03 930 2.700000e-01 2.000000e+00 1.998180e-03 931 2.800000e-01 2.000000e+00 2.058385e-03 932 2.900000e-01 2.000000e+00 2.117697e-03 933 3.000000e-01 2.000000e+00 2.176124e-03 934 3.100000e-01 2.000000e+00 2.233676e-03 935 3.200000e-01 2.000000e+00 2.290360e-03 936 3.300000e-01 2.000000e+00 2.346185e-03 937 3.400000e-01 2.000000e+00 2.401157e-03 938 3.500000e-01 2.000000e+00 2.455285e-03 939 3.600000e-01 2.000000e+00 2.508577e-03 940 3.700000e-01 2.000000e+00 2.561039e-03 941 3.800000e-01 2.000000e+00 2.612678e-03 942 3.900000e-01 2.000000e+00 2.663503e-03 943 4.000000e-01 2.000000e+00 2.713519e-03 944 4.100000e-01 2.000000e+00 2.762734e-03 945 4.200000e-01 2.000000e+00 2.811154e-03 946 4.300000e-01 2.000000e+00 2.858786e-03 947 4.400000e-01 2.000000e+00 2.905635e-03 948 4.500000e-01 2.000000e+00 2.951709e-03 949 4.600000e-01 2.000000e+00 2.997013e-03 950 4.700000e-01 2.000000e+00 3.041553e-03 951 4.800000e-01 2.000000e+00 3.085335e-03 952 4.900000e-01 2.000000e+00 3.128365e-03 953 5.000000e-01 2.000000e+00 3.170649e-03 954 5.100000e-01 2.000000e+00 3.212191e-03 955 5.200000e-01 2.000000e+00 3.252997e-03 956 5.300000e-01 2.000000e+00 3.293073e-03 957 5.400000e-01 2.000000e+00 3.332424e-03 958 5.500000e-01 2.000000e+00 3.371054e-03 959 5.600000e-01 2.000000e+00 3.408969e-03 960 5.700000e-01 2.000000e+00 3.446173e-03 961 5.800000e-01 2.000000e+00 3.482672e-03 962 5.900000e-01 2.000000e+00 3.518469e-03 963 6.000000e-01 2.000000e+00 3.553569e-03 964 6.100000e-01 2.000000e+00 3.587978e-03 965 6.200000e-01 2.000000e+00 3.621698e-03 966 6.300000e-01 2.000000e+00 3.654735e-03 967 6.400000e-01 2.000000e+00 3.687092e-03 968 6.500000e-01 2.000000e+00 3.718773e-03 969 6.600000e-01 2.000000e+00 3.749783e-03 970 6.700000e-01 2.000000e+00 3.780125e-03 971 6.800000e-01 2.000000e+00 3.809803e-03 972 6.900000e-01 2.000000e+00 3.838821e-03 973 7.000000e-01 2.000000e+00 3.867182e-03 974 7.100000e-01 2.000000e+00 3.894890e-03 975 7.200000e-01 2.000000e+00 3.921949e-03 976 7.300000e-01 2.000000e+00 3.948361e-03 977 7.400000e-01 2.000000e+00 3.974130e-03 978 7.500000e-01 2.000000e+00 3.999259e-03 979 7.600000e-01 2.000000e+00 4.023753e-03 980 7.700000e-01 2.000000e+00 4.047614e-03 981 7.800000e-01 2.000000e+00 4.070846e-03 982 7.900000e-01 2.000000e+00 4.093454e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 983 8.000000e-01 2.000000e+00 4.115442e-03 984 8.100000e-01 2.000000e+00 4.136813e-03 985 8.200000e-01 2.000000e+00 4.157574e-03 986 8.300000e-01 2.000000e+00 4.177731e-03 987 8.400000e-01 2.000000e+00 4.197290e-03 988 8.500000e-01 2.000000e+00 4.216260e-03 989 8.600000e-01 2.000000e+00 4.234650e-03 990 8.700000e-01 2.000000e+00 4.252471e-03 991 8.800000e-01 2.000000e+00 4.269737e-03 992 8.900000e-01 2.000000e+00 4.286461e-03 993 9.000000e-01 2.000000e+00 4.302662e-03 994 9.100000e-01 2.000000e+00 4.318359e-03 995 9.200000e-01 2.000000e+00 4.333575e-03 996 9.300000e-01 2.000000e+00 4.348336e-03 997 9.400000e-01 2.000000e+00 4.362669e-03 998 9.500000e-01 2.000000e+00 4.376606e-03 999 9.600000e-01 2.000000e+00 4.390182e-03 1000 9.700000e-01 2.000000e+00 4.403433e-03 1001 9.800000e-01 2.000000e+00 4.416400e-03 1002 9.900000e-01 2.000000e+00 4.429127e-03 1003 1.000000e+00 2.000000e+00 4.441657e-03 1004 1.010000e+00 2.000000e+00 4.454040e-03 1005 1.020000e+00 2.000000e+00 4.466324e-03 1006 1.030000e+00 2.000000e+00 4.478563e-03 1007 1.040000e+00 2.000000e+00 4.490806e-03 1008 1.050000e+00 2.000000e+00 4.503109e-03 1009 1.060000e+00 2.000000e+00 4.515522e-03 1010 1.070000e+00 2.000000e+00 4.528096e-03 1011 1.080000e+00 2.000000e+00 4.540879e-03 1012 1.090000e+00 2.000000e+00 4.553913e-03 1013 1.100000e+00 2.000000e+00 4.567237e-03 1014 1.110000e+00 2.000000e+00 4.580880e-03 1015 1.120000e+00 2.000000e+00 4.594864e-03 1016 1.130000e+00 2.000000e+00 4.609202e-03 1017 1.140000e+00 2.000000e+00 4.623895e-03 1018 1.150000e+00 2.000000e+00 4.638935e-03 1019 1.160000e+00 2.000000e+00 4.654304e-03 1020 1.170000e+00 2.000000e+00 4.669973e-03 1021 1.180000e+00 2.000000e+00 4.685906e-03 1022 1.190000e+00 2.000000e+00 4.702072e-03 1023 1.200000e+00 2.000000e+00 4.718482e-03 1024 1.210000e+00 2.000000e+00 4.735067e-03 1025 1.220000e+00 2.000000e+00 4.751754e-03 1026 1.230000e+00 2.000000e+00 4.768478e-03 1027 1.240000e+00 2.000000e+00 4.785182e-03 1028 1.250000e+00 2.000000e+00 4.801818e-03 1029 1.260000e+00 2.000000e+00 4.818345e-03 1030 1.270000e+00 2.000000e+00 4.834730e-03 1031 1.280000e+00 2.000000e+00 4.850945e-03 1032 1.290000e+00 2.000000e+00 4.866970e-03 1033 1.300000e+00 2.000000e+00 4.882791e-03 1034 1.310000e+00 2.000000e+00 4.898397e-03 1035 1.320000e+00 2.000000e+00 4.913780e-03 1036 1.330000e+00 2.000000e+00 4.928938e-03 1037 1.340000e+00 2.000000e+00 4.943871e-03 1038 1.350000e+00 2.000000e+00 4.958579e-03 1039 1.360000e+00 2.000000e+00 4.973065e-03 1040 1.370000e+00 2.000000e+00 4.987334e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1041 1.380000e+00 2.000000e+00 5.001392e-03 1042 1.390000e+00 2.000000e+00 5.015243e-03 1043 1.400000e+00 2.000000e+00 5.028894e-03 1044 1.410000e+00 2.000000e+00 5.042353e-03 1045 1.420000e+00 2.000000e+00 5.055624e-03 1046 1.430000e+00 2.000000e+00 5.068716e-03 1047 1.440000e+00 2.000000e+00 5.081634e-03 1048 1.450000e+00 2.000000e+00 5.094386e-03 1049 1.460000e+00 2.000000e+00 5.106977e-03 1050 1.470000e+00 2.000000e+00 5.119414e-03 1051 1.480000e+00 2.000000e+00 5.131702e-03 1052 1.490000e+00 2.000000e+00 5.143847e-03 1053 1.500000e+00 2.000000e+00 5.155855e-03 1054 1.510000e+00 2.000000e+00 5.167730e-03 1055 1.520000e+00 2.000000e+00 5.179478e-03 1056 1.530000e+00 2.000000e+00 5.191103e-03 1057 1.540000e+00 2.000000e+00 5.202610e-03 1058 1.550000e+00 2.000000e+00 5.214003e-03 1059 1.560000e+00 2.000000e+00 5.225285e-03 1060 1.570000e+00 2.000000e+00 5.236462e-03 1061 1.580000e+00 2.000000e+00 5.247536e-03 1062 1.590000e+00 2.000000e+00 5.258511e-03 1063 1.600000e+00 2.000000e+00 5.269391e-03 1064 1.610000e+00 2.000000e+00 5.280178e-03 1065 1.620000e+00 2.000000e+00 5.290875e-03 1066 1.630000e+00 2.000000e+00 5.301486e-03 1067 1.640000e+00 2.000000e+00 5.312012e-03 1068 1.650000e+00 2.000000e+00 5.322458e-03 1069 1.660000e+00 2.000000e+00 5.332824e-03 1070 1.670000e+00 2.000000e+00 5.343114e-03 1071 1.680000e+00 2.000000e+00 5.353329e-03 1072 1.690000e+00 2.000000e+00 5.363472e-03 1073 1.700000e+00 2.000000e+00 5.373544e-03 1074 1.710000e+00 2.000000e+00 5.383548e-03 1075 1.720000e+00 2.000000e+00 5.393486e-03 1076 1.730000e+00 2.000000e+00 5.403358e-03 1077 1.740000e+00 2.000000e+00 5.413167e-03 1078 1.750000e+00 2.000000e+00 5.422914e-03 1079 1.760000e+00 2.000000e+00 5.432601e-03 1080 1.770000e+00 2.000000e+00 5.442229e-03 1081 1.780000e+00 2.000000e+00 5.451798e-03 1082 1.790000e+00 2.000000e+00 5.461312e-03 1083 1.800000e+00 2.000000e+00 5.470769e-03 1084 1.810000e+00 2.000000e+00 5.480173e-03 1085 1.820000e+00 2.000000e+00 5.489523e-03 1086 1.830000e+00 2.000000e+00 5.498820e-03 1087 1.840000e+00 2.000000e+00 5.508066e-03 1088 1.850000e+00 2.000000e+00 5.517262e-03 1089 1.860000e+00 2.000000e+00 5.526407e-03 1090 1.870000e+00 2.000000e+00 5.535504e-03 1091 1.880000e+00 2.000000e+00 5.544552e-03 1092 1.890000e+00 2.000000e+00 5.553553e-03 1093 1.900000e+00 2.000000e+00 5.562507e-03 1094 1.910000e+00 2.000000e+00 5.571415e-03 1095 1.920000e+00 2.000000e+00 5.580277e-03 1096 1.930000e+00 2.000000e+00 5.589095e-03 1097 1.940000e+00 2.000000e+00 5.597868e-03 1098 1.950000e+00 2.000000e+00 5.606598e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1099 1.960000e+00 2.000000e+00 5.615285e-03 1100 1.970000e+00 2.000000e+00 5.623930e-03 1101 1.980000e+00 2.000000e+00 5.632533e-03 1102 1.990000e+00 2.000000e+00 5.641094e-03 1103 2.000000e+00 2.000000e+00 5.649615e-03 1104 2.010000e+00 2.000000e+00 5.658096e-03 1105 2.020000e+00 2.000000e+00 5.666538e-03 1106 2.030000e+00 2.000000e+00 5.674940e-03 1107 2.040000e+00 2.000000e+00 5.683305e-03 1108 2.050000e+00 2.000000e+00 5.691631e-03 1109 2.060000e+00 2.000000e+00 5.699920e-03 1110 2.070000e+00 2.000000e+00 5.708172e-03 1111 2.080000e+00 2.000000e+00 5.716389e-03 1112 2.090000e+00 2.000000e+00 5.724569e-03 1113 2.100000e+00 2.000000e+00 5.732714e-03 1114 2.110000e+00 2.000000e+00 5.740825e-03 1115 2.120000e+00 2.000000e+00 5.748901e-03 1116 2.130000e+00 2.000000e+00 5.756944e-03 1117 2.140000e+00 2.000000e+00 5.764954e-03 1118 2.150000e+00 2.000000e+00 5.772931e-03 1119 2.160000e+00 2.000000e+00 5.780875e-03 1120 2.170000e+00 2.000000e+00 5.788788e-03 1121 2.180000e+00 2.000000e+00 5.796670e-03 1122 2.190000e+00 2.000000e+00 5.804521e-03 1123 2.200000e+00 2.000000e+00 5.812342e-03 1124 2.210000e+00 2.000000e+00 5.820132e-03 1125 2.220000e+00 2.000000e+00 5.827894e-03 1126 2.230000e+00 2.000000e+00 5.835626e-03 1127 2.240000e+00 2.000000e+00 5.843329e-03 1128 2.250000e+00 2.000000e+00 5.851005e-03 1129 2.260000e+00 2.000000e+00 5.858652e-03 1130 2.270000e+00 2.000000e+00 5.866273e-03 1131 2.280000e+00 2.000000e+00 5.873866e-03 1132 2.290000e+00 2.000000e+00 5.881433e-03 1133 2.300000e+00 2.000000e+00 5.888973e-03 1134 2.310000e+00 2.000000e+00 5.896488e-03 1135 2.320000e+00 2.000000e+00 5.903978e-03 1136 2.330000e+00 2.000000e+00 5.911442e-03 1137 2.340000e+00 2.000000e+00 5.918882e-03 1138 2.350000e+00 2.000000e+00 5.926297e-03 1139 2.360000e+00 2.000000e+00 5.933688e-03 1140 2.370000e+00 2.000000e+00 5.941056e-03 1141 2.380000e+00 2.000000e+00 5.948400e-03 1142 2.390000e+00 2.000000e+00 5.955722e-03 1143 2.400000e+00 2.000000e+00 5.963021e-03 1144 2.410000e+00 2.000000e+00 5.970297e-03 1145 2.420000e+00 2.000000e+00 5.977552e-03 1146 2.430000e+00 2.000000e+00 5.984785e-03 1147 2.440000e+00 2.000000e+00 5.991997e-03 1148 2.450000e+00 2.000000e+00 5.999187e-03 1149 2.460000e+00 2.000000e+00 6.006357e-03 1150 2.470000e+00 2.000000e+00 6.013507e-03 1151 2.480000e+00 2.000000e+00 6.020636e-03 1152 2.490000e+00 2.000000e+00 6.027745e-03 1153 2.500000e+00 2.000000e+00 6.034835e-03 1154 2.510000e+00 2.000000e+00 6.041905e-03 1155 2.520000e+00 2.000000e+00 6.048957e-03 1156 2.530000e+00 2.000000e+00 6.055990e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1157 2.540000e+00 2.000000e+00 6.063004e-03 1158 2.550000e+00 2.000000e+00 6.070000e-03 1159 2.560000e+00 2.000000e+00 6.076978e-03 1160 2.570000e+00 2.000000e+00 6.083938e-03 1161 2.580000e+00 2.000000e+00 6.090881e-03 1162 2.590000e+00 2.000000e+00 6.097806e-03 1163 2.600000e+00 2.000000e+00 6.104715e-03 1164 2.610000e+00 2.000000e+00 6.111606e-03 1165 2.620000e+00 2.000000e+00 6.118482e-03 1166 2.630000e+00 2.000000e+00 6.125341e-03 1167 2.640000e+00 2.000000e+00 6.132184e-03 1168 2.650000e+00 2.000000e+00 6.139011e-03 1169 2.660000e+00 2.000000e+00 6.145822e-03 1170 2.670000e+00 2.000000e+00 6.152619e-03 1171 2.680000e+00 2.000000e+00 6.159400e-03 1172 2.690000e+00 2.000000e+00 6.166166e-03 1173 2.700000e+00 2.000000e+00 6.172917e-03 1174 2.710000e+00 2.000000e+00 6.179654e-03 1175 2.720000e+00 2.000000e+00 6.186376e-03 1176 2.730000e+00 2.000000e+00 6.193085e-03 1177 2.740000e+00 2.000000e+00 6.199779e-03 1178 2.750000e+00 2.000000e+00 6.206460e-03 1179 2.760000e+00 2.000000e+00 6.213127e-03 1180 2.770000e+00 2.000000e+00 6.219781e-03 1181 2.780000e+00 2.000000e+00 6.226422e-03 1182 2.790000e+00 2.000000e+00 6.233050e-03 1183 2.800000e+00 2.000000e+00 6.239665e-03 1184 2.810000e+00 2.000000e+00 6.246267e-03 1185 2.820000e+00 2.000000e+00 6.252857e-03 1186 2.830000e+00 2.000000e+00 6.259435e-03 1187 2.840000e+00 2.000000e+00 6.266000e-03 1188 2.850000e+00 2.000000e+00 6.272554e-03 1189 2.860000e+00 2.000000e+00 6.279096e-03 1190 2.870000e+00 2.000000e+00 6.285627e-03 1191 2.880000e+00 2.000000e+00 6.292146e-03 1192 2.890000e+00 2.000000e+00 6.298654e-03 1193 2.900000e+00 2.000000e+00 6.305151e-03 1194 2.910000e+00 2.000000e+00 6.311637e-03 1195 2.920000e+00 2.000000e+00 6.318112e-03 1196 2.930000e+00 2.000000e+00 6.324577e-03 1197 2.940000e+00 2.000000e+00 6.331031e-03 1198 2.950000e+00 2.000000e+00 6.337475e-03 1199 2.960000e+00 2.000000e+00 6.343909e-03 1200 2.970000e+00 2.000000e+00 6.350332e-03 1201 2.980000e+00 2.000000e+00 6.356746e-03 1202 2.990000e+00 2.000000e+00 6.363151e-03 1203 3.000000e+00 2.000000e+00 6.369546e-03 1204 0.000000e+00 2.500000e+00 0.000000e+00 1205 1.000000e-02 2.500000e+00 1.026370e-04 1206 2.000000e-02 2.500000e+00 2.041497e-04 1207 3.000000e-02 2.500000e+00 3.045539e-04 1208 4.000000e-02 2.500000e+00 4.038641e-04 1209 5.000000e-02 2.500000e+00 5.020939e-04 1210 6.000000e-02 2.500000e+00 5.992561e-04 1211 7.000000e-02 2.500000e+00 6.953627e-04 1212 8.000000e-02 2.500000e+00 7.904251e-04 1213 9.000000e-02 2.500000e+00 8.844539e-04 1214 1.000000e-01 2.500000e+00 9.774597e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1215 1.100000e-01 2.500000e+00 1.069453e-03 1216 1.200000e-01 2.500000e+00 1.160442e-03 1217 1.300000e-01 2.500000e+00 1.250438e-03 1218 1.400000e-01 2.500000e+00 1.339450e-03 1219 1.500000e-01 2.500000e+00 1.427486e-03 1220 1.600000e-01 2.500000e+00 1.514557e-03 1221 1.700000e-01 2.500000e+00 1.600670e-03 1222 1.800000e-01 2.500000e+00 1.685836e-03 1223 1.900000e-01 2.500000e+00 1.770063e-03 1224 2.000000e-01 2.500000e+00 1.853359e-03 1225 2.100000e-01 2.500000e+00 1.935733e-03 1226 2.200000e-01 2.500000e+00 2.017193e-03 1227 2.300000e-01 2.500000e+00 2.097749e-03 1228 2.400000e-01 2.500000e+00 2.177407e-03 1229 2.500000e-01 2.500000e+00 2.256177e-03 1230 2.600000e-01 2.500000e+00 2.334066e-03 1231 2.700000e-01 2.500000e+00 2.411083e-03 1232 2.800000e-01 2.500000e+00 2.487234e-03 1233 2.900000e-01 2.500000e+00 2.562527e-03 1234 3.000000e-01 2.500000e+00 2.636971e-03 1235 3.100000e-01 2.500000e+00 2.710572e-03 1236 3.200000e-01 2.500000e+00 2.783337e-03 1237 3.300000e-01 2.500000e+00 2.855273e-03 1238 3.400000e-01 2.500000e+00 2.926387e-03 1239 3.500000e-01 2.500000e+00 2.996687e-03 1240 3.600000e-01 2.500000e+00 3.066178e-03 1241 3.700000e-01 2.500000e+00 3.134867e-03 1242 3.800000e-01 2.500000e+00 3.202761e-03 1243 3.900000e-01 2.500000e+00 3.269865e-03 1244 4.000000e-01 2.500000e+00 3.336185e-03 1245 4.100000e-01 2.500000e+00 3.401729e-03 1246 4.200000e-01 2.500000e+00 3.466500e-03 1247 4.300000e-01 2.500000e+00 3.530506e-03 1248 4.400000e-01 2.500000e+00 3.593752e-03 1249 4.500000e-01 2.500000e+00 3.656242e-03 1250 4.600000e-01 2.500000e+00 3.717983e-03 1251 4.700000e-01 2.500000e+00 3.778980e-03 1252 4.800000e-01 2.500000e+00 3.839238e-03 1253 4.900000e-01 2.500000e+00 3.898761e-03 1254 5.000000e-01 2.500000e+00 3.957555e-03 1255 5.100000e-01 2.500000e+00 4.015625e-03 1256 5.200000e-01 2.500000e+00 4.072976e-03 1257 5.300000e-01 2.500000e+00 4.129611e-03 1258 5.400000e-01 2.500000e+00 4.185536e-03 1259 5.500000e-01 2.500000e+00 4.240755e-03 1260 5.600000e-01 2.500000e+00 4.295272e-03 1261 5.700000e-01 2.500000e+00 4.349092e-03 1262 5.800000e-01 2.500000e+00 4.402218e-03 1263 5.900000e-01 2.500000e+00 4.454656e-03 1264 6.000000e-01 2.500000e+00 4.506408e-03 1265 6.100000e-01 2.500000e+00 4.557480e-03 1266 6.200000e-01 2.500000e+00 4.607874e-03 1267 6.300000e-01 2.500000e+00 4.657595e-03 1268 6.400000e-01 2.500000e+00 4.706646e-03 1269 6.500000e-01 2.500000e+00 4.755031e-03 1270 6.600000e-01 2.500000e+00 4.802753e-03 1271 6.700000e-01 2.500000e+00 4.849817e-03 1272 6.800000e-01 2.500000e+00 4.896225e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1273 6.900000e-01 2.500000e+00 4.941980e-03 1274 7.000000e-01 2.500000e+00 4.987087e-03 1275 7.100000e-01 2.500000e+00 5.031548e-03 1276 7.200000e-01 2.500000e+00 5.075366e-03 1277 7.300000e-01 2.500000e+00 5.118545e-03 1278 7.400000e-01 2.500000e+00 5.161087e-03 1279 7.500000e-01 2.500000e+00 5.202995e-03 1280 7.600000e-01 2.500000e+00 5.244273e-03 1281 7.700000e-01 2.500000e+00 5.284923e-03 1282 7.800000e-01 2.500000e+00 5.324947e-03 1283 7.900000e-01 2.500000e+00 5.364349e-03 1284 8.000000e-01 2.500000e+00 5.403130e-03 1285 8.100000e-01 2.500000e+00 5.441294e-03 1286 8.200000e-01 2.500000e+00 5.478842e-03 1287 8.300000e-01 2.500000e+00 5.515777e-03 1288 8.400000e-01 2.500000e+00 5.552102e-03 1289 8.500000e-01 2.500000e+00 5.587817e-03 1290 8.600000e-01 2.500000e+00 5.622926e-03 1291 8.700000e-01 2.500000e+00 5.657431e-03 1292 8.800000e-01 2.500000e+00 5.691333e-03 1293 8.900000e-01 2.500000e+00 5.724633e-03 1294 9.000000e-01 2.500000e+00 5.757335e-03 1295 9.100000e-01 2.500000e+00 5.789440e-03 1296 9.200000e-01 2.500000e+00 5.820949e-03 1297 9.300000e-01 2.500000e+00 5.851865e-03 1298 9.400000e-01 2.500000e+00 5.882189e-03 1299 9.500000e-01 2.500000e+00 5.911924e-03 1300 9.600000e-01 2.500000e+00 5.941071e-03 1301 9.700000e-01 2.500000e+00 5.969633e-03 1302 9.800000e-01 2.500000e+00 5.997613e-03 1303 9.900000e-01 2.500000e+00 6.025014e-03 1304 1.000000e+00 2.500000e+00 6.051840e-03 1305 1.010000e+00 2.500000e+00 6.078096e-03 1306 1.020000e+00 2.500000e+00 6.103787e-03 1307 1.030000e+00 2.500000e+00 6.128919e-03 1308 1.040000e+00 2.500000e+00 6.153502e-03 1309 1.050000e+00 2.500000e+00 6.177545e-03 1310 1.060000e+00 2.500000e+00 6.201060e-03 1311 1.070000e+00 2.500000e+00 6.224060e-03 1312 1.080000e+00 2.500000e+00 6.246564e-03 1313 1.090000e+00 2.500000e+00 6.268590e-03 1314 1.100000e+00 2.500000e+00 6.290163e-03 1315 1.110000e+00 2.500000e+00 6.311308e-03 1316 1.120000e+00 2.500000e+00 6.332059e-03 1317 1.130000e+00 2.500000e+00 6.352449e-03 1318 1.140000e+00 2.500000e+00 6.372518e-03 1319 1.150000e+00 2.500000e+00 6.392310e-03 1320 1.160000e+00 2.500000e+00 6.411871e-03 1321 1.170000e+00 2.500000e+00 6.431253e-03 1322 1.180000e+00 2.500000e+00 6.450507e-03 1323 1.190000e+00 2.500000e+00 6.469687e-03 1324 1.200000e+00 2.500000e+00 6.488845e-03 1325 1.210000e+00 2.500000e+00 6.508032e-03 1326 1.220000e+00 2.500000e+00 6.527293e-03 1327 1.230000e+00 2.500000e+00 6.546669e-03 1328 1.240000e+00 2.500000e+00 6.566191e-03 1329 1.250000e+00 2.500000e+00 6.585882e-03 1330 1.260000e+00 2.500000e+00 6.605754e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1331 1.270000e+00 2.500000e+00 6.625807e-03 1332 1.280000e+00 2.500000e+00 6.646033e-03 1333 1.290000e+00 2.500000e+00 6.666461e-03 1334 1.300000e+00 2.500000e+00 6.687067e-03 1335 1.310000e+00 2.500000e+00 6.707794e-03 1336 1.320000e+00 2.500000e+00 6.728582e-03 1337 1.330000e+00 2.500000e+00 6.749372e-03 1338 1.340000e+00 2.500000e+00 6.770109e-03 1339 1.350000e+00 2.500000e+00 6.790743e-03 1340 1.360000e+00 2.500000e+00 6.811229e-03 1341 1.370000e+00 2.500000e+00 6.831526e-03 1342 1.380000e+00 2.500000e+00 6.851602e-03 1343 1.390000e+00 2.500000e+00 6.871430e-03 1344 1.400000e+00 2.500000e+00 6.890991e-03 1345 1.410000e+00 2.500000e+00 6.910267e-03 1346 1.420000e+00 2.500000e+00 6.929251e-03 1347 1.430000e+00 2.500000e+00 6.947935e-03 1348 1.440000e+00 2.500000e+00 6.966317e-03 1349 1.450000e+00 2.500000e+00 6.984399e-03 1350 1.460000e+00 2.500000e+00 7.002182e-03 1351 1.470000e+00 2.500000e+00 7.019672e-03 1352 1.480000e+00 2.500000e+00 7.036875e-03 1353 1.490000e+00 2.500000e+00 7.053799e-03 1354 1.500000e+00 2.500000e+00 7.070451e-03 1355 1.510000e+00 2.500000e+00 7.086840e-03 1356 1.520000e+00 2.500000e+00 7.102975e-03 1357 1.530000e+00 2.500000e+00 7.118866e-03 1358 1.540000e+00 2.500000e+00 7.134520e-03 1359 1.550000e+00 2.500000e+00 7.149947e-03 1360 1.560000e+00 2.500000e+00 7.165155e-03 1361 1.570000e+00 2.500000e+00 7.180154e-03 1362 1.580000e+00 2.500000e+00 7.194950e-03 1363 1.590000e+00 2.500000e+00 7.209552e-03 1364 1.600000e+00 2.500000e+00 7.223968e-03 1365 1.610000e+00 2.500000e+00 7.238204e-03 1366 1.620000e+00 2.500000e+00 7.252268e-03 1367 1.630000e+00 2.500000e+00 7.266166e-03 1368 1.640000e+00 2.500000e+00 7.279905e-03 1369 1.650000e+00 2.500000e+00 7.293490e-03 1370 1.660000e+00 2.500000e+00 7.306928e-03 1371 1.670000e+00 2.500000e+00 7.320223e-03 1372 1.680000e+00 2.500000e+00 7.333381e-03 1373 1.690000e+00 2.500000e+00 7.346407e-03 1374 1.700000e+00 2.500000e+00 7.359305e-03 1375 1.710000e+00 2.500000e+00 7.372080e-03 1376 1.720000e+00 2.500000e+00 7.384736e-03 1377 1.730000e+00 2.500000e+00 7.397278e-03 1378 1.740000e+00 2.500000e+00 7.409708e-03 1379 1.750000e+00 2.500000e+00 7.422031e-03 1380 1.760000e+00 2.500000e+00 7.434251e-03 1381 1.770000e+00 2.500000e+00 7.446369e-03 1382 1.780000e+00 2.500000e+00 7.458390e-03 1383 1.790000e+00 2.500000e+00 7.470317e-03 1384 1.800000e+00 2.500000e+00 7.482151e-03 1385 1.810000e+00 2.500000e+00 7.493896e-03 1386 1.820000e+00 2.500000e+00 7.505555e-03 1387 1.830000e+00 2.500000e+00 7.517129e-03 1388 1.840000e+00 2.500000e+00 7.528621e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1389 1.850000e+00 2.500000e+00 7.540034e-03 1390 1.860000e+00 2.500000e+00 7.551368e-03 1391 1.870000e+00 2.500000e+00 7.562626e-03 1392 1.880000e+00 2.500000e+00 7.573809e-03 1393 1.890000e+00 2.500000e+00 7.584920e-03 1394 1.900000e+00 2.500000e+00 7.595960e-03 1395 1.910000e+00 2.500000e+00 7.606930e-03 1396 1.920000e+00 2.500000e+00 7.617832e-03 1397 1.930000e+00 2.500000e+00 7.628666e-03 1398 1.940000e+00 2.500000e+00 7.639436e-03 1399 1.950000e+00 2.500000e+00 7.650141e-03 1400 1.960000e+00 2.500000e+00 7.660783e-03 1401 1.970000e+00 2.500000e+00 7.671362e-03 1402 1.980000e+00 2.500000e+00 7.681881e-03 1403 1.990000e+00 2.500000e+00 7.692340e-03 1404 2.000000e+00 2.500000e+00 7.702739e-03 1405 2.010000e+00 2.500000e+00 7.713081e-03 1406 2.020000e+00 2.500000e+00 7.723366e-03 1407 2.030000e+00 2.500000e+00 7.733595e-03 1408 2.040000e+00 2.500000e+00 7.743768e-03 1409 2.050000e+00 2.500000e+00 7.753887e-03 1410 2.060000e+00 2.500000e+00 7.763953e-03 1411 2.070000e+00 2.500000e+00 7.773966e-03 1412 2.080000e+00 2.500000e+00 7.783928e-03 1413 2.090000e+00 2.500000e+00 7.793838e-03 1414 2.100000e+00 2.500000e+00 7.803698e-03 1415 2.110000e+00 2.500000e+00 7.813510e-03 1416 2.120000e+00 2.500000e+00 7.823272e-03 1417 2.130000e+00 2.500000e+00 7.832987e-03 1418 2.140000e+00 2.500000e+00 7.842655e-03 1419 2.150000e+00 2.500000e+00 7.852277e-03 1420 2.160000e+00 2.500000e+00 7.861853e-03 1421 2.170000e+00 2.500000e+00 7.871385e-03 1422 2.180000e+00 2.500000e+00 7.880873e-03 1423 2.190000e+00 2.500000e+00 7.890317e-03 1424 2.200000e+00 2.500000e+00 7.899719e-03 1425 2.210000e+00 2.500000e+00 7.909079e-03 1426 2.220000e+00 2.500000e+00 7.918398e-03 1427 2.230000e+00 2.500000e+00 7.927676e-03 1428 2.240000e+00 2.500000e+00 7.936915e-03 1429 2.250000e+00 2.500000e+00 7.946114e-03 1430 2.260000e+00 2.500000e+00 7.955275e-03 1431 2.270000e+00 2.500000e+00 7.964397e-03 1432 2.280000e+00 2.500000e+00 7.973483e-03 1433 2.290000e+00 2.500000e+00 7.982531e-03 1434 2.300000e+00 2.500000e+00 7.991544e-03 1435 2.310000e+00 2.500000e+00 8.000521e-03 1436 2.320000e+00 2.500000e+00 8.009463e-03 1437 2.330000e+00 2.500000e+00 8.018370e-03 1438 2.340000e+00 2.500000e+00 8.027244e-03 1439 2.350000e+00 2.500000e+00 8.036085e-03 1440 2.360000e+00 2.500000e+00 8.044892e-03 1441 2.370000e+00 2.500000e+00 8.053668e-03 1442 2.380000e+00 2.500000e+00 8.062411e-03 1443 2.390000e+00 2.500000e+00 8.071123e-03 1444 2.400000e+00 2.500000e+00 8.079805e-03 1445 2.410000e+00 2.500000e+00 8.088456e-03 1446 2.420000e+00 2.500000e+00 8.097078e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1447 2.430000e+00 2.500000e+00 8.105670e-03 1448 2.440000e+00 2.500000e+00 8.114233e-03 1449 2.450000e+00 2.500000e+00 8.122768e-03 1450 2.460000e+00 2.500000e+00 8.131275e-03 1451 2.470000e+00 2.500000e+00 8.139755e-03 1452 2.480000e+00 2.500000e+00 8.148207e-03 1453 2.490000e+00 2.500000e+00 8.156632e-03 1454 2.500000e+00 2.500000e+00 8.165032e-03 1455 2.510000e+00 2.500000e+00 8.173405e-03 1456 2.520000e+00 2.500000e+00 8.181753e-03 1457 2.530000e+00 2.500000e+00 8.190076e-03 1458 2.540000e+00 2.500000e+00 8.198374e-03 1459 2.550000e+00 2.500000e+00 8.206648e-03 1460 2.560000e+00 2.500000e+00 8.214898e-03 1461 2.570000e+00 2.500000e+00 8.223124e-03 1462 2.580000e+00 2.500000e+00 8.231327e-03 1463 2.590000e+00 2.500000e+00 8.239507e-03 1464 2.600000e+00 2.500000e+00 8.247665e-03 1465 2.610000e+00 2.500000e+00 8.255800e-03 1466 2.620000e+00 2.500000e+00 8.263914e-03 1467 2.630000e+00 2.500000e+00 8.272006e-03 1468 2.640000e+00 2.500000e+00 8.280076e-03 1469 2.650000e+00 2.500000e+00 8.288126e-03 1470 2.660000e+00 2.500000e+00 8.296156e-03 1471 2.670000e+00 2.500000e+00 8.304165e-03 1472 2.680000e+00 2.500000e+00 8.312154e-03 1473 2.690000e+00 2.500000e+00 8.320123e-03 1474 2.700000e+00 2.500000e+00 8.328073e-03 1475 2.710000e+00 2.500000e+00 8.336004e-03 1476 2.720000e+00 2.500000e+00 8.343917e-03 1477 2.730000e+00 2.500000e+00 8.351810e-03 1478 2.740000e+00 2.500000e+00 8.359686e-03 1479 2.750000e+00 2.500000e+00 8.367543e-03 1480 2.760000e+00 2.500000e+00 8.375383e-03 1481 2.770000e+00 2.500000e+00 8.383205e-03 1482 2.780000e+00 2.500000e+00 8.391011e-03 1483 2.790000e+00 2.500000e+00 8.398799e-03 1484 2.800000e+00 2.500000e+00 8.406570e-03 1485 2.810000e+00 2.500000e+00 8.414326e-03 1486 2.820000e+00 2.500000e+00 8.422064e-03 1487 2.830000e+00 2.500000e+00 8.429788e-03 1488 2.840000e+00 2.500000e+00 8.437495e-03 1489 2.850000e+00 2.500000e+00 8.445187e-03 1490 2.860000e+00 2.500000e+00 8.452863e-03 1491 2.870000e+00 2.500000e+00 8.460525e-03 1492 2.880000e+00 2.500000e+00 8.468172e-03 1493 2.890000e+00 2.500000e+00 8.475804e-03 1494 2.900000e+00 2.500000e+00 8.483422e-03 1495 2.910000e+00 2.500000e+00 8.491026e-03 1496 2.920000e+00 2.500000e+00 8.498615e-03 1497 2.930000e+00 2.500000e+00 8.506192e-03 1498 2.940000e+00 2.500000e+00 8.513754e-03 1499 2.950000e+00 2.500000e+00 8.521303e-03 1500 2.960000e+00 2.500000e+00 8.528839e-03 1501 2.970000e+00 2.500000e+00 8.536363e-03 1502 2.980000e+00 2.500000e+00 8.543873e-03 1503 2.990000e+00 2.500000e+00 8.551371e-03 1504 3.000000e+00 2.500000e+00 8.558856e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1505 0.000000e+00 3.000000e+00 0.000000e+00 1506 1.000000e-02 3.000000e+00 1.118014e-04 1507 2.000000e-02 3.000000e+00 2.225797e-04 1508 3.000000e-02 3.000000e+00 3.323487e-04 1509 4.000000e-02 3.000000e+00 4.411212e-04 1510 5.000000e-02 3.000000e+00 5.489088e-04 1511 6.000000e-02 3.000000e+00 6.557227e-04 1512 7.000000e-02 3.000000e+00 7.615730e-04 1513 8.000000e-02 3.000000e+00 8.664696e-04 1514 9.000000e-02 3.000000e+00 9.704215e-04 1515 1.000000e-01 3.000000e+00 1.073438e-03 1516 1.100000e-01 3.000000e+00 1.175526e-03 1517 1.200000e-01 3.000000e+00 1.276696e-03 1518 1.300000e-01 3.000000e+00 1.376955e-03 1519 1.400000e-01 3.000000e+00 1.476311e-03 1520 1.500000e-01 3.000000e+00 1.574772e-03 1521 1.600000e-01 3.000000e+00 1.672345e-03 1522 1.700000e-01 3.000000e+00 1.769039e-03 1523 1.800000e-01 3.000000e+00 1.864860e-03 1524 1.900000e-01 3.000000e+00 1.959816e-03 1525 2.000000e-01 3.000000e+00 2.053916e-03 1526 2.100000e-01 3.000000e+00 2.147165e-03 1527 2.200000e-01 3.000000e+00 2.239571e-03 1528 2.300000e-01 3.000000e+00 2.331142e-03 1529 2.400000e-01 3.000000e+00 2.421884e-03 1530 2.500000e-01 3.000000e+00 2.511804e-03 1531 2.600000e-01 3.000000e+00 2.600910e-03 1532 2.700000e-01 3.000000e+00 2.689207e-03 1533 2.800000e-01 3.000000e+00 2.776703e-03 1534 2.900000e-01 3.000000e+00 2.863404e-03 1535 3.000000e-01 3.000000e+00 2.949316e-03 1536 3.100000e-01 3.000000e+00 3.034446e-03 1537 3.200000e-01 3.000000e+00 3.118799e-03 1538 3.300000e-01 3.000000e+00 3.202382e-03 1539 3.400000e-01 3.000000e+00 3.285200e-03 1540 3.500000e-01 3.000000e+00 3.367260e-03 1541 3.600000e-01 3.000000e+00 3.448567e-03 1542 3.700000e-01 3.000000e+00 3.529126e-03 1543 3.800000e-01 3.000000e+00 3.608943e-03 1544 3.900000e-01 3.000000e+00 3.688023e-03 1545 4.000000e-01 3.000000e+00 3.766371e-03 1546 4.100000e-01 3.000000e+00 3.843993e-03 1547 4.200000e-01 3.000000e+00 3.920893e-03 1548 4.300000e-01 3.000000e+00 3.997076e-03 1549 4.400000e-01 3.000000e+00 4.072547e-03 1550 4.500000e-01 3.000000e+00 4.147311e-03 1551 4.600000e-01 3.000000e+00 4.221372e-03 1552 4.700000e-01 3.000000e+00 4.294734e-03 1553 4.800000e-01 3.000000e+00 4.367402e-03 1554 4.900000e-01 3.000000e+00 4.439380e-03 1555 5.000000e-01 3.000000e+00 4.510673e-03 1556 5.100000e-01 3.000000e+00 4.581284e-03 1557 5.200000e-01 3.000000e+00 4.651217e-03 1558 5.300000e-01 3.000000e+00 4.720477e-03 1559 5.400000e-01 3.000000e+00 4.789066e-03 1560 5.500000e-01 3.000000e+00 4.856990e-03 1561 5.600000e-01 3.000000e+00 4.924252e-03 1562 5.700000e-01 3.000000e+00 4.990854e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1563 5.800000e-01 3.000000e+00 5.056802e-03 1564 5.900000e-01 3.000000e+00 5.122097e-03 1565 6.000000e-01 3.000000e+00 5.186745e-03 1566 6.100000e-01 3.000000e+00 5.250747e-03 1567 6.200000e-01 3.000000e+00 5.314108e-03 1568 6.300000e-01 3.000000e+00 5.376830e-03 1569 6.400000e-01 3.000000e+00 5.438918e-03 1570 6.500000e-01 3.000000e+00 5.500372e-03 1571 6.600000e-01 3.000000e+00 5.561198e-03 1572 6.700000e-01 3.000000e+00 5.621398e-03 1573 6.800000e-01 3.000000e+00 5.680974e-03 1574 6.900000e-01 3.000000e+00 5.739930e-03 1575 7.000000e-01 3.000000e+00 5.798268e-03 1576 7.100000e-01 3.000000e+00 5.855992e-03 1577 7.200000e-01 3.000000e+00 5.913104e-03 1578 7.300000e-01 3.000000e+00 5.969606e-03 1579 7.400000e-01 3.000000e+00 6.025502e-03 1580 7.500000e-01 3.000000e+00 6.080794e-03 1581 7.600000e-01 3.000000e+00 6.135483e-03 1582 7.700000e-01 3.000000e+00 6.189574e-03 1583 7.800000e-01 3.000000e+00 6.243069e-03 1584 7.900000e-01 3.000000e+00 6.295968e-03 1585 8.000000e-01 3.000000e+00 6.348276e-03 1586 8.100000e-01 3.000000e+00 6.399995e-03 1587 8.200000e-01 3.000000e+00 6.451126e-03 1588 8.300000e-01 3.000000e+00 6.501672e-03 1589 8.400000e-01 3.000000e+00 6.551635e-03 1590 8.500000e-01 3.000000e+00 6.601018e-03 1591 8.600000e-01 3.000000e+00 6.649821e-03 1592 8.700000e-01 3.000000e+00 6.698048e-03 1593 8.800000e-01 3.000000e+00 6.745701e-03 1594 8.900000e-01 3.000000e+00 6.792781e-03 1595 9.000000e-01 3.000000e+00 6.839290e-03 1596 9.100000e-01 3.000000e+00 6.885231e-03 1597 9.200000e-01 3.000000e+00 6.930604e-03 1598 9.300000e-01 3.000000e+00 6.975413e-03 1599 9.400000e-01 3.000000e+00 7.019658e-03 1600 9.500000e-01 3.000000e+00 7.063342e-03 1601 9.600000e-01 3.000000e+00 7.106466e-03 1602 9.700000e-01 3.000000e+00 7.149032e-03 1603 9.800000e-01 3.000000e+00 7.191041e-03 1604 9.900000e-01 3.000000e+00 7.232495e-03 1605 1.000000e+00 3.000000e+00 7.273397e-03 1606 1.010000e+00 3.000000e+00 7.313747e-03 1607 1.020000e+00 3.000000e+00 7.353547e-03 1608 1.030000e+00 3.000000e+00 7.392799e-03 1609 1.040000e+00 3.000000e+00 7.431505e-03 1610 1.050000e+00 3.000000e+00 7.469666e-03 1611 1.060000e+00 3.000000e+00 7.507286e-03 1612 1.070000e+00 3.000000e+00 7.544365e-03 1613 1.080000e+00 3.000000e+00 7.580908e-03 1614 1.090000e+00 3.000000e+00 7.616916e-03 1615 1.100000e+00 3.000000e+00 7.652393e-03 1616 1.110000e+00 3.000000e+00 7.687344e-03 1617 1.120000e+00 3.000000e+00 7.721772e-03 1618 1.130000e+00 3.000000e+00 7.755683e-03 1619 1.140000e+00 3.000000e+00 7.789083e-03 1620 1.150000e+00 3.000000e+00 7.821981e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1621 1.160000e+00 3.000000e+00 7.854384e-03 1622 1.170000e+00 3.000000e+00 7.886304e-03 1623 1.180000e+00 3.000000e+00 7.917753e-03 1624 1.190000e+00 3.000000e+00 7.948745e-03 1625 1.200000e+00 3.000000e+00 7.979297e-03 1626 1.210000e+00 3.000000e+00 8.009428e-03 1627 1.220000e+00 3.000000e+00 8.039160e-03 1628 1.230000e+00 3.000000e+00 8.068519e-03 1629 1.240000e+00 3.000000e+00 8.097533e-03 1630 1.250000e+00 3.000000e+00 8.126234e-03 1631 1.260000e+00 3.000000e+00 8.154655e-03 1632 1.270000e+00 3.000000e+00 8.182834e-03 1633 1.280000e+00 3.000000e+00 8.210811e-03 1634 1.290000e+00 3.000000e+00 8.238627e-03 1635 1.300000e+00 3.000000e+00 8.266323e-03 1636 1.310000e+00 3.000000e+00 8.293940e-03 1637 1.320000e+00 3.000000e+00 8.321518e-03 1638 1.330000e+00 3.000000e+00 8.349090e-03 1639 1.340000e+00 3.000000e+00 8.376687e-03 1640 1.350000e+00 3.000000e+00 8.404329e-03 1641 1.360000e+00 3.000000e+00 8.432030e-03 1642 1.370000e+00 3.000000e+00 8.459809e-03 1643 1.380000e+00 3.000000e+00 8.487694e-03 1644 1.390000e+00 3.000000e+00 8.515658e-03 1645 1.400000e+00 3.000000e+00 8.543657e-03 1646 1.410000e+00 3.000000e+00 8.571644e-03 1647 1.420000e+00 3.000000e+00 8.599564e-03 1648 1.430000e+00 3.000000e+00 8.627359e-03 1649 1.440000e+00 3.000000e+00 8.654973e-03 1650 1.450000e+00 3.000000e+00 8.682349e-03 1651 1.460000e+00 3.000000e+00 8.709436e-03 1652 1.470000e+00 3.000000e+00 8.736188e-03 1653 1.480000e+00 3.000000e+00 8.762564e-03 1654 1.490000e+00 3.000000e+00 8.788531e-03 1655 1.500000e+00 3.000000e+00 8.814065e-03 1656 1.510000e+00 3.000000e+00 8.839145e-03 1657 1.520000e+00 3.000000e+00 8.863759e-03 1658 1.530000e+00 3.000000e+00 8.887900e-03 1659 1.540000e+00 3.000000e+00 8.911566e-03 1660 1.550000e+00 3.000000e+00 8.934759e-03 1661 1.560000e+00 3.000000e+00 8.957485e-03 1662 1.570000e+00 3.000000e+00 8.979752e-03 1663 1.580000e+00 3.000000e+00 9.001571e-03 1664 1.590000e+00 3.000000e+00 9.022954e-03 1665 1.600000e+00 3.000000e+00 9.043915e-03 1666 1.610000e+00 3.000000e+00 9.064467e-03 1667 1.620000e+00 3.000000e+00 9.084625e-03 1668 1.630000e+00 3.000000e+00 9.104404e-03 1669 1.640000e+00 3.000000e+00 9.123820e-03 1670 1.650000e+00 3.000000e+00 9.142886e-03 1671 1.660000e+00 3.000000e+00 9.161617e-03 1672 1.670000e+00 3.000000e+00 9.180027e-03 1673 1.680000e+00 3.000000e+00 9.198130e-03 1674 1.690000e+00 3.000000e+00 9.215938e-03 1675 1.700000e+00 3.000000e+00 9.233464e-03 1676 1.710000e+00 3.000000e+00 9.250721e-03 1677 1.720000e+00 3.000000e+00 9.267719e-03 1678 1.730000e+00 3.000000e+00 9.284470e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1679 1.740000e+00 3.000000e+00 9.300984e-03 1680 1.750000e+00 3.000000e+00 9.317271e-03 1681 1.760000e+00 3.000000e+00 9.333340e-03 1682 1.770000e+00 3.000000e+00 9.349201e-03 1683 1.780000e+00 3.000000e+00 9.364862e-03 1684 1.790000e+00 3.000000e+00 9.380330e-03 1685 1.800000e+00 3.000000e+00 9.395615e-03 1686 1.810000e+00 3.000000e+00 9.410722e-03 1687 1.820000e+00 3.000000e+00 9.425659e-03 1688 1.830000e+00 3.000000e+00 9.440432e-03 1689 1.840000e+00 3.000000e+00 9.455048e-03 1690 1.850000e+00 3.000000e+00 9.469511e-03 1691 1.860000e+00 3.000000e+00 9.483829e-03 1692 1.870000e+00 3.000000e+00 9.498006e-03 1693 1.880000e+00 3.000000e+00 9.512046e-03 1694 1.890000e+00 3.000000e+00 9.525956e-03 1695 1.900000e+00 3.000000e+00 9.539738e-03 1696 1.910000e+00 3.000000e+00 9.553397e-03 1697 1.920000e+00 3.000000e+00 9.566938e-03 1698 1.930000e+00 3.000000e+00 9.580363e-03 1699 1.940000e+00 3.000000e+00 9.593677e-03 1700 1.950000e+00 3.000000e+00 9.606882e-03 1701 1.960000e+00 3.000000e+00 9.619982e-03 1702 1.970000e+00 3.000000e+00 9.632979e-03 1703 1.980000e+00 3.000000e+00 9.645877e-03 1704 1.990000e+00 3.000000e+00 9.658678e-03 1705 2.000000e+00 3.000000e+00 9.671385e-03 1706 2.010000e+00 3.000000e+00 9.683999e-03 1707 2.020000e+00 3.000000e+00 9.696523e-03 1708 2.030000e+00 3.000000e+00 9.708960e-03 1709 2.040000e+00 3.000000e+00 9.721310e-03 1710 2.050000e+00 3.000000e+00 9.733577e-03 1711 2.060000e+00 3.000000e+00 9.745761e-03 1712 2.070000e+00 3.000000e+00 9.757866e-03 1713 2.080000e+00 3.000000e+00 9.769891e-03 1714 2.090000e+00 3.000000e+00 9.781840e-03 1715 2.100000e+00 3.000000e+00 9.793713e-03 1716 2.110000e+00 3.000000e+00 9.805512e-03 1717 2.120000e+00 3.000000e+00 9.817239e-03 1718 2.130000e+00 3.000000e+00 9.828895e-03 1719 2.140000e+00 3.000000e+00 9.840481e-03 1720 2.150000e+00 3.000000e+00 9.851999e-03 1721 2.160000e+00 3.000000e+00 9.863450e-03 1722 2.170000e+00 3.000000e+00 9.874835e-03 1723 2.180000e+00 3.000000e+00 9.886156e-03 1724 2.190000e+00 3.000000e+00 9.897414e-03 1725 2.200000e+00 3.000000e+00 9.908610e-03 1726 2.210000e+00 3.000000e+00 9.919745e-03 1727 2.220000e+00 3.000000e+00 9.930820e-03 1728 2.230000e+00 3.000000e+00 9.941837e-03 1729 2.240000e+00 3.000000e+00 9.952797e-03 1730 2.250000e+00 3.000000e+00 9.963700e-03 1731 2.260000e+00 3.000000e+00 9.974548e-03 1732 2.270000e+00 3.000000e+00 9.985342e-03 1733 2.280000e+00 3.000000e+00 9.996083e-03 1734 2.290000e+00 3.000000e+00 1.000677e-02 1735 2.300000e+00 3.000000e+00 1.001741e-02 1736 2.310000e+00 3.000000e+00 1.002800e-02 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1737 2.320000e+00 3.000000e+00 1.003853e-02 1738 2.330000e+00 3.000000e+00 1.004902e-02 1739 2.340000e+00 3.000000e+00 1.005947e-02 1740 2.350000e+00 3.000000e+00 1.006986e-02 1741 2.360000e+00 3.000000e+00 1.008021e-02 1742 2.370000e+00 3.000000e+00 1.009051e-02 1743 2.380000e+00 3.000000e+00 1.010077e-02 1744 2.390000e+00 3.000000e+00 1.011099e-02 1745 2.400000e+00 3.000000e+00 1.012117e-02 1746 2.410000e+00 3.000000e+00 1.013130e-02 1747 2.420000e+00 3.000000e+00 1.014139e-02 1748 2.430000e+00 3.000000e+00 1.015144e-02 1749 2.440000e+00 3.000000e+00 1.016145e-02 1750 2.450000e+00 3.000000e+00 1.017143e-02 1751 2.460000e+00 3.000000e+00 1.018136e-02 1752 2.470000e+00 3.000000e+00 1.019126e-02 1753 2.480000e+00 3.000000e+00 1.020112e-02 1754 2.490000e+00 3.000000e+00 1.021094e-02 1755 2.500000e+00 3.000000e+00 1.022073e-02 1756 2.510000e+00 3.000000e+00 1.023048e-02 1757 2.520000e+00 3.000000e+00 1.024020e-02 1758 2.530000e+00 3.000000e+00 1.024989e-02 1759 2.540000e+00 3.000000e+00 1.025954e-02 1760 2.550000e+00 3.000000e+00 1.026916e-02 1761 2.560000e+00 3.000000e+00 1.027874e-02 1762 2.570000e+00 3.000000e+00 1.028830e-02 1763 2.580000e+00 3.000000e+00 1.029782e-02 1764 2.590000e+00 3.000000e+00 1.030731e-02 1765 2.600000e+00 3.000000e+00 1.031678e-02 1766 2.610000e+00 3.000000e+00 1.032621e-02 1767 2.620000e+00 3.000000e+00 1.033562e-02 1768 2.630000e+00 3.000000e+00 1.034499e-02 1769 2.640000e+00 3.000000e+00 1.035434e-02 1770 2.650000e+00 3.000000e+00 1.036366e-02 1771 2.660000e+00 3.000000e+00 1.037295e-02 1772 2.670000e+00 3.000000e+00 1.038222e-02 1773 2.680000e+00 3.000000e+00 1.039146e-02 1774 2.690000e+00 3.000000e+00 1.040068e-02 1775 2.700000e+00 3.000000e+00 1.040986e-02 1776 2.710000e+00 3.000000e+00 1.041903e-02 1777 2.720000e+00 3.000000e+00 1.042817e-02 1778 2.730000e+00 3.000000e+00 1.043728e-02 1779 2.740000e+00 3.000000e+00 1.044637e-02 1780 2.750000e+00 3.000000e+00 1.045544e-02 1781 2.760000e+00 3.000000e+00 1.046448e-02 1782 2.770000e+00 3.000000e+00 1.047351e-02 1783 2.780000e+00 3.000000e+00 1.048251e-02 1784 2.790000e+00 3.000000e+00 1.049148e-02 1785 2.800000e+00 3.000000e+00 1.050044e-02 1786 2.810000e+00 3.000000e+00 1.050937e-02 1787 2.820000e+00 3.000000e+00 1.051828e-02 1788 2.830000e+00 3.000000e+00 1.052718e-02 1789 2.840000e+00 3.000000e+00 1.053605e-02 1790 2.850000e+00 3.000000e+00 1.054490e-02 1791 2.860000e+00 3.000000e+00 1.055373e-02 1792 2.870000e+00 3.000000e+00 1.056255e-02 1793 2.880000e+00 3.000000e+00 1.057134e-02 1794 2.890000e+00 3.000000e+00 1.058011e-02 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1795 2.900000e+00 3.000000e+00 1.058887e-02 1796 2.910000e+00 3.000000e+00 1.059761e-02 1797 2.920000e+00 3.000000e+00 1.060633e-02 1798 2.930000e+00 3.000000e+00 1.061503e-02 1799 2.940000e+00 3.000000e+00 1.062372e-02 1800 2.950000e+00 3.000000e+00 1.063238e-02 1801 2.960000e+00 3.000000e+00 1.064104e-02 1802 2.970000e+00 3.000000e+00 1.064967e-02 1803 2.980000e+00 3.000000e+00 1.065829e-02 1804 2.990000e+00 3.000000e+00 1.066689e-02 1805 3.000000e+00 3.000000e+00 1.067547e-02 ngspice-26/tests/bsim3soipd/t5.cir0000644000265600020320000000042412264261473016476 0ustar andreasadmin*model = BSIMSOI (PD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 ve -4 4 1 .print dc i(vs) .include nmospd.mod ngspice-26/tests/bsim3soipd/t4.cir0000644000265600020320000000044512264261473016500 0ustar andreasadmin*model = BSIMSOI (PD) *Berkeley Spice Compatibility * * SOI NMOSFET, tied body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 vb b 0 dc 0 m1 d g s e b n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 vb -0.3 0.5 0.1 .print dc i(vs) .include nmospd.mod ngspice-26/tests/hisimhv1/0000755000265600020320000000000012264261714015121 5ustar andreasadminngspice-26/tests/hisimhv1/pmos/0000755000265600020320000000000012264261473016101 5ustar andreasadminngspice-26/tests/hisimhv1/pmos/reference/0000755000265600020320000000000012264261473020037 5ustar andreasadminngspice-26/tests/hisimhv1/pmos/reference/dcSw_corsrd2.standard0000644000265600020320000010243012264261473024117 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.131867807790e-05 0.000000000000e+00 2.131867807690e-05 1.000000000000e-15 -1.500000000000e+00 -2.142315313831e-05 0.000000000000e+00 2.142315313681e-05 1.500000000000e-15 -2.000000000000e+00 -2.151322541259e-05 0.000000000000e+00 2.151322541059e-05 2.000000000000e-15 -2.500000000000e+00 -2.159595113723e-05 0.000000000000e+00 2.159595113473e-05 2.500000000000e-15 -3.000000000000e+00 -2.167401787125e-05 0.000000000000e+00 2.167401786825e-05 3.000000000000e-15 -3.500000000000e+00 -2.174878261025e-05 0.000000000000e+00 2.174878260675e-05 3.500000000000e-15 -4.000000000000e+00 -2.182104912001e-05 0.000000000000e+00 2.182104911601e-05 4.000000000000e-15 -4.500000000000e+00 -2.189134260260e-05 0.000000000000e+00 2.189134259810e-05 4.500000000000e-15 -5.000000000000e+00 -2.196002962624e-05 0.000000000000e+00 2.196002962124e-05 5.000000000000e-15 -5.500000000000e+00 -2.202737845550e-05 0.000000000000e+00 2.202737845000e-05 5.500000000000e-15 -6.000000000000e+00 -2.209359257579e-05 0.000000000000e+00 2.209359256979e-05 6.000000000000e-15 -6.500000000000e+00 -2.215883074040e-05 0.000000000000e+00 2.215883073390e-05 6.500000000000e-15 -7.000000000000e+00 -2.222321965251e-05 0.000000000000e+00 2.222321964551e-05 7.000000000000e-15 -7.500000000000e+00 -2.228686235426e-05 0.000000000000e+00 2.228686234676e-05 7.500000000000e-15 -8.000000000000e+00 -2.234984398134e-05 0.000000000000e+00 2.234984397334e-05 8.000000000000e-15 -8.500000000000e+00 -2.241223583142e-05 0.000000000000e+00 2.241223582292e-05 8.500000000000e-15 -9.000000000000e+00 -2.247409831499e-05 0.000000000000e+00 2.247409830599e-05 9.000000000000e-15 -9.500000000000e+00 -2.253548314289e-05 0.000000000000e+00 2.253548313339e-05 9.500000000000e-15 -1.000000000000e+01 -2.259643497919e-05 0.000000000000e+00 2.259643496919e-05 1.000000000000e-14 -1.050000000000e+01 -2.265699271115e-05 0.000000000000e+00 2.265699270065e-05 1.050000000000e-14 -1.100000000000e+01 -2.271719043937e-05 0.000000000000e+00 2.271719042837e-05 1.100000000000e-14 -1.150000000000e+01 -2.277705826009e-05 0.000000000000e+00 2.277705824859e-05 1.150000000000e-14 -1.200000000000e+01 -2.283662289061e-05 0.000000000000e+00 2.283662287861e-05 1.200000000000e-14 -1.250000000000e+01 -2.289590817460e-05 0.000000000000e+00 2.289590816210e-05 1.250000000000e-14 -1.300000000000e+01 -2.295493549440e-05 0.000000000000e+00 2.295493548140e-05 1.300000000000e-14 -1.350000000000e+01 -2.301372411038e-05 0.000000000000e+00 2.301372409688e-05 1.350000000000e-14 -1.400000000000e+01 -2.307229144251e-05 0.000000000000e+00 2.307229142851e-05 1.400000000000e-14 -1.450000000000e+01 -2.313065330574e-05 0.000000000000e+00 2.313065329124e-05 1.450000000000e-14 -1.500000000000e+01 -2.318882410818e-05 0.000000000000e+00 2.318882409318e-05 1.500000000000e-14 -1.550000000000e+01 -2.324681701889e-05 0.000000000000e+00 2.324681700339e-05 1.550000000000e-14 -1.600000000000e+01 -2.330464411090e-05 0.000000000000e+00 2.330464409490e-05 1.600000000000e-14 -1.650000000000e+01 -2.336231648372e-05 0.000000000000e+00 2.336231646722e-05 1.650000000000e-14 -1.700000000000e+01 -2.341984436886e-05 0.000000000000e+00 2.341984435186e-05 1.700000000000e-14 -1.750000000000e+01 -2.347723722110e-05 0.000000000000e+00 2.347723720360e-05 1.750000000000e-14 -1.800000000000e+01 -2.353450379785e-05 0.000000000000e+00 2.353450377985e-05 1.800000000000e-14 -1.850000000000e+01 -2.359165222838e-05 0.000000000000e+00 2.359165220988e-05 1.850000000000e-14 -1.900000000000e+01 -2.364869007454e-05 0.000000000000e+00 2.364869005554e-05 1.900000000000e-14 -1.950000000000e+01 -2.370562438409e-05 0.000000000000e+00 2.370562436459e-05 1.950000000000e-14 -2.000000000000e+01 -2.376246173784e-05 0.000000000000e+00 2.376246171784e-05 2.000000000000e-14 -1.000000000000e+00 -4.117745755738e-04 0.000000000000e+00 4.117745755728e-04 1.000000000000e-15 -1.500000000000e+00 -4.954541105623e-04 0.000000000000e+00 4.954541105608e-04 1.500000000000e-15 -2.000000000000e+00 -5.388819798229e-04 0.000000000000e+00 5.388819798209e-04 2.000000000000e-15 -2.500000000000e+00 -5.597702041483e-04 0.000000000000e+00 5.597702041458e-04 2.500000000000e-15 -3.000000000000e+00 -5.685539493216e-04 0.000000000000e+00 5.685539493186e-04 3.000000000000e-15 -3.500000000000e+00 -5.714045667872e-04 0.000000000000e+00 5.714045667837e-04 3.500000000000e-15 -4.000000000000e+00 -5.724331566239e-04 0.000000000000e+00 5.724331566199e-04 4.000000000000e-15 -4.500000000000e+00 -5.732870095410e-04 0.000000000000e+00 5.732870095365e-04 4.500000000000e-15 -5.000000000000e+00 -5.740692443921e-04 0.000000000000e+00 5.740692443871e-04 5.000000000000e-15 -5.500000000000e+00 -5.747947743770e-04 0.000000000000e+00 5.747947743715e-04 5.500000000000e-15 -6.000000000000e+00 -5.754748343913e-04 0.000000000000e+00 5.754748343853e-04 6.000000000000e-15 -6.500000000000e+00 -5.761180477241e-04 0.000000000000e+00 5.761180477176e-04 6.500000000000e-15 -7.000000000000e+00 -5.767309962387e-04 0.000000000000e+00 5.767309962317e-04 7.000000000000e-15 -7.500000000000e+00 -5.773187249068e-04 0.000000000000e+00 5.773187248993e-04 7.500000000000e-15 -8.000000000000e+00 -5.778851383252e-04 0.000000000000e+00 5.778851383172e-04 8.000000000000e-15 -8.500000000000e+00 -5.784332959421e-04 0.000000000000e+00 5.784332959336e-04 8.500000000000e-15 -9.000000000000e+00 -5.789656271632e-04 0.000000000000e+00 5.789656271542e-04 9.000000000000e-15 -9.500000000000e+00 -5.794840871818e-04 0.000000000000e+00 5.794840871723e-04 9.500000000000e-15 -1.000000000000e+01 -5.799902701643e-04 0.000000000000e+00 5.799902701543e-04 1.000000000000e-14 -1.050000000000e+01 -5.804854920461e-04 0.000000000000e+00 5.804854920356e-04 1.050000000000e-14 -1.100000000000e+01 -5.809708516806e-04 0.000000000000e+00 5.809708516696e-04 1.100000000000e-14 -1.150000000000e+01 -5.814472764883e-04 0.000000000000e+00 5.814472764768e-04 1.150000000000e-14 -1.200000000000e+01 -5.819155569224e-04 0.000000000000e+00 5.819155569104e-04 1.200000000000e-14 -1.250000000000e+01 -5.823763727877e-04 0.000000000000e+00 5.823763727752e-04 1.250000000000e-14 -1.300000000000e+01 -5.828303135651e-04 0.000000000000e+00 5.828303135521e-04 1.300000000000e-14 -1.350000000000e+01 -5.832778942769e-04 0.000000000000e+00 5.832778942634e-04 1.350000000000e-14 -1.400000000000e+01 -5.837195680019e-04 0.000000000000e+00 5.837195679879e-04 1.400000000000e-14 -1.450000000000e+01 -5.841557358449e-04 0.000000000000e+00 5.841557358304e-04 1.450000000000e-14 -1.500000000000e+01 -5.845867549550e-04 0.000000000000e+00 5.845867549400e-04 1.500000000000e-14 -1.550000000000e+01 -5.850129450305e-04 0.000000000000e+00 5.850129450150e-04 1.550000000000e-14 -1.600000000000e+01 -5.854345936419e-04 0.000000000000e+00 5.854345936259e-04 1.600000000000e-14 -1.650000000000e+01 -5.858519606214e-04 0.000000000000e+00 5.858519606049e-04 1.650000000000e-14 -1.700000000000e+01 -5.862652817107e-04 0.000000000000e+00 5.862652816937e-04 1.700000000000e-14 -1.750000000000e+01 -5.866747716120e-04 0.000000000000e+00 5.866747715945e-04 1.750000000000e-14 -1.800000000000e+01 -5.870806265588e-04 0.000000000000e+00 5.870806265408e-04 1.800000000000e-14 -1.850000000000e+01 -5.874830264941e-04 0.000000000000e+00 5.874830264756e-04 1.850000000000e-14 -1.900000000000e+01 -5.878821369266e-04 0.000000000000e+00 5.878821369076e-04 1.900000000000e-14 -1.950000000000e+01 -5.882781105224e-04 0.000000000000e+00 5.882781105029e-04 1.950000000000e-14 -2.000000000000e+01 -5.886710884758e-04 0.000000000000e+00 5.886710884558e-04 2.000000000000e-14 -1.000000000000e+00 -1.046254537678e-03 0.000000000000e+00 1.046254537677e-03 1.000000000000e-15 -1.500000000000e+00 -1.374074078320e-03 0.000000000000e+00 1.374074078319e-03 1.500000000000e-15 -2.000000000000e+00 -1.615412547274e-03 0.000000000000e+00 1.615412547272e-03 2.000000000000e-15 -2.500000000000e+00 -1.795326677612e-03 0.000000000000e+00 1.795326677609e-03 2.500000000000e-15 -3.000000000000e+00 -1.930823077965e-03 0.000000000000e+00 1.930823077962e-03 3.000000000000e-15 -3.500000000000e+00 -2.033659137498e-03 0.000000000000e+00 2.033659137494e-03 3.500000000000e-15 -4.000000000000e+00 -2.112161394347e-03 0.000000000000e+00 2.112161394343e-03 4.000000000000e-15 -4.500000000000e+00 -2.172351800386e-03 0.000000000000e+00 2.172351800382e-03 4.500000000000e-15 -5.000000000000e+00 -2.218660442430e-03 0.000000000000e+00 2.218660442425e-03 5.000000000000e-15 -5.500000000000e+00 -2.254390285437e-03 0.000000000000e+00 2.254390285432e-03 5.500000000000e-15 -6.000000000000e+00 -2.282028612250e-03 0.000000000000e+00 2.282028612244e-03 6.000000000000e-15 -6.500000000000e+00 -2.303461260132e-03 0.000000000000e+00 2.303461260126e-03 6.500000000000e-15 -7.000000000000e+00 -2.320124156727e-03 0.000000000000e+00 2.320124156720e-03 7.000000000000e-15 -7.500000000000e+00 -2.333113536108e-03 0.000000000000e+00 2.333113536100e-03 7.500000000000e-15 -8.000000000000e+00 -2.343267937531e-03 0.000000000000e+00 2.343267937523e-03 8.000000000000e-15 -8.500000000000e+00 -2.351230061723e-03 0.000000000000e+00 2.351230061715e-03 8.500000000000e-15 -9.000000000000e+00 -2.357493701324e-03 0.000000000000e+00 2.357493701315e-03 9.000000000000e-15 -9.500000000000e+00 -2.362439380556e-03 0.000000000000e+00 2.362439380546e-03 9.500000000000e-15 -1.000000000000e+01 -2.366361409944e-03 0.000000000000e+00 2.366361409934e-03 1.000000000000e-14 -1.050000000000e+01 -2.369488444552e-03 0.000000000000e+00 2.369488444542e-03 1.050000000000e-14 -1.100000000000e+01 -2.371999184933e-03 0.000000000000e+00 2.371999184922e-03 1.100000000000e-14 -1.150000000000e+01 -2.374034540081e-03 0.000000000000e+00 2.374034540070e-03 1.150000000000e-14 -1.200000000000e+01 -2.375707400626e-03 0.000000000000e+00 2.375707400614e-03 1.200000000000e-14 -1.250000000000e+01 -2.377111202827e-03 0.000000000000e+00 2.377111202815e-03 1.250000000000e-14 -1.300000000000e+01 -2.378328345278e-03 0.000000000000e+00 2.378328345265e-03 1.300000000000e-14 -1.350000000000e+01 -2.379434916474e-03 0.000000000000e+00 2.379434916461e-03 1.350000000000e-14 -1.400000000000e+01 -2.380487177271e-03 0.000000000000e+00 2.380487177257e-03 1.400000000000e-14 -1.450000000000e+01 -2.381508628896e-03 0.000000000000e+00 2.381508628882e-03 1.450000000000e-14 -1.500000000000e+01 -2.382505839851e-03 0.000000000000e+00 2.382505839836e-03 1.500000000000e-14 -1.550000000000e+01 -2.383481358591e-03 0.000000000000e+00 2.383481358575e-03 1.550000000000e-14 -1.600000000000e+01 -2.384436904452e-03 0.000000000000e+00 2.384436904436e-03 1.600000000000e-14 -1.650000000000e+01 -2.385373930737e-03 0.000000000000e+00 2.385373930721e-03 1.650000000000e-14 -1.700000000000e+01 -2.386293734035e-03 0.000000000000e+00 2.386293734018e-03 1.700000000000e-14 -1.750000000000e+01 -2.387197485402e-03 0.000000000000e+00 2.387197485384e-03 1.750000000000e-14 -1.800000000000e+01 -2.388086246227e-03 0.000000000000e+00 2.388086246209e-03 1.800000000000e-14 -1.850000000000e+01 -2.388960980170e-03 0.000000000000e+00 2.388960980152e-03 1.850000000000e-14 -1.900000000000e+01 -2.389822563430e-03 0.000000000000e+00 2.389822563411e-03 1.900000000000e-14 -1.950000000000e+01 -2.390671793885e-03 0.000000000000e+00 2.390671793866e-03 1.950000000000e-14 -2.000000000000e+01 -2.391509399261e-03 0.000000000000e+00 2.391509399241e-03 2.000000000000e-14 -1.000000000000e+00 -1.703689034270e-05 0.000000000000e+00 1.703689034170e-05 1.000000000000e-15 -1.500000000000e+00 -1.713255025397e-05 0.000000000000e+00 1.713255025247e-05 1.500000000000e-15 -2.000000000000e+00 -1.721720641497e-05 0.000000000000e+00 1.721720641297e-05 2.000000000000e-15 -2.500000000000e+00 -1.729623504245e-05 0.000000000000e+00 1.729623503995e-05 2.500000000000e-15 -3.000000000000e+00 -1.737167686758e-05 0.000000000000e+00 1.737167686458e-05 3.000000000000e-15 -3.500000000000e+00 -1.744456945852e-05 0.000000000000e+00 1.744456945502e-05 3.500000000000e-15 -4.000000000000e+00 -1.751553250184e-05 0.000000000000e+00 1.751553249784e-05 4.000000000000e-15 -4.500000000000e+00 -1.758497389324e-05 0.000000000000e+00 1.758497388874e-05 4.500000000000e-15 -5.000000000000e+00 -1.765318004022e-05 0.000000000000e+00 1.765318003522e-05 5.000000000000e-15 -5.500000000000e+00 -1.772036155888e-05 0.000000000000e+00 1.772036155338e-05 5.500000000000e-15 -6.000000000000e+00 -1.778667882896e-05 0.000000000000e+00 1.778667882296e-05 6.000000000000e-15 -6.500000000000e+00 -1.785225736779e-05 0.000000000000e+00 1.785225736129e-05 6.500000000000e-15 -7.000000000000e+00 -1.791719760890e-05 0.000000000000e+00 1.791719760190e-05 7.000000000000e-15 -7.500000000000e+00 -1.798158140157e-05 0.000000000000e+00 1.798158139407e-05 7.500000000000e-15 -8.000000000000e+00 -1.804547648793e-05 0.000000000000e+00 1.804547647993e-05 8.000000000000e-15 -8.500000000000e+00 -1.810893967994e-05 0.000000000000e+00 1.810893967144e-05 8.500000000000e-15 -9.000000000000e+00 -1.817201917089e-05 0.000000000000e+00 1.817201916189e-05 9.000000000000e-15 -9.500000000000e+00 -1.823475625393e-05 0.000000000000e+00 1.823475624443e-05 9.500000000000e-15 -1.000000000000e+01 -1.829718662375e-05 0.000000000000e+00 1.829718661375e-05 1.000000000000e-14 -1.050000000000e+01 -1.835934137883e-05 0.000000000000e+00 1.835934136833e-05 1.050000000000e-14 -1.100000000000e+01 -1.842124780445e-05 0.000000000000e+00 1.842124779345e-05 1.100000000000e-14 -1.150000000000e+01 -1.848292999239e-05 0.000000000000e+00 1.848292998089e-05 1.150000000000e-14 -1.200000000000e+01 -1.854440933708e-05 0.000000000000e+00 1.854440932508e-05 1.200000000000e-14 -1.250000000000e+01 -1.860570493707e-05 0.000000000000e+00 1.860570492457e-05 1.250000000000e-14 -1.300000000000e+01 -1.866683392295e-05 0.000000000000e+00 1.866683390995e-05 1.300000000000e-14 -1.350000000000e+01 -1.872781172759e-05 0.000000000000e+00 1.872781171409e-05 1.350000000000e-14 -1.400000000000e+01 -1.878865231058e-05 0.000000000000e+00 1.878865229658e-05 1.400000000000e-14 -1.450000000000e+01 -1.884936834606e-05 0.000000000000e+00 1.884936833156e-05 1.450000000000e-14 -1.500000000000e+01 -1.890997138087e-05 0.000000000000e+00 1.890997136587e-05 1.500000000000e-14 -1.550000000000e+01 -1.897047196872e-05 0.000000000000e+00 1.897047195322e-05 1.550000000000e-14 -1.600000000000e+01 -1.903087978447e-05 0.000000000000e+00 1.903087976847e-05 1.600000000000e-14 -1.650000000000e+01 -1.909120372219e-05 0.000000000000e+00 1.909120370569e-05 1.650000000000e-14 -1.700000000000e+01 -1.915145197961e-05 0.000000000000e+00 1.915145196261e-05 1.700000000000e-14 -1.750000000000e+01 -1.921163213121e-05 0.000000000000e+00 1.921163211371e-05 1.750000000000e-14 -1.800000000000e+01 -1.927175119183e-05 0.000000000000e+00 1.927175117383e-05 1.800000000000e-14 -1.850000000000e+01 -1.933181567212e-05 0.000000000000e+00 1.933181565362e-05 1.850000000000e-14 -1.900000000000e+01 -1.939183162728e-05 0.000000000000e+00 1.939183160828e-05 1.900000000000e-14 -1.950000000000e+01 -1.945180469980e-05 0.000000000000e+00 1.945180468030e-05 1.950000000000e-14 -2.000000000000e+01 -1.951174015730e-05 0.000000000000e+00 1.951174013730e-05 2.000000000000e-14 -1.000000000000e+00 -5.773616198689e-04 0.000000000000e+00 5.773616198679e-04 1.000000000000e-15 -1.500000000000e+00 -6.776049684474e-04 0.000000000000e+00 6.776049684459e-04 1.500000000000e-15 -2.000000000000e+00 -7.262033611684e-04 0.000000000000e+00 7.262033611664e-04 2.000000000000e-15 -2.500000000000e+00 -7.475465202777e-04 0.000000000000e+00 7.475465202752e-04 2.500000000000e-15 -3.000000000000e+00 -7.549012459549e-04 0.000000000000e+00 7.549012459519e-04 3.000000000000e-15 -3.500000000000e+00 -7.566232473187e-04 0.000000000000e+00 7.566232473152e-04 3.500000000000e-15 -4.000000000000e+00 -7.577618516801e-04 0.000000000000e+00 7.577618516761e-04 4.000000000000e-15 -4.500000000000e+00 -7.587968086505e-04 0.000000000000e+00 7.587968086460e-04 4.500000000000e-15 -5.000000000000e+00 -7.597482125014e-04 0.000000000000e+00 7.597482124964e-04 5.000000000000e-15 -5.500000000000e+00 -7.606327636675e-04 0.000000000000e+00 7.606327636620e-04 5.500000000000e-15 -6.000000000000e+00 -7.614636888858e-04 0.000000000000e+00 7.614636888798e-04 6.000000000000e-15 -6.500000000000e+00 -7.622511599250e-04 0.000000000000e+00 7.622511599185e-04 6.500000000000e-15 -7.000000000000e+00 -7.630029405788e-04 0.000000000000e+00 7.630029405718e-04 7.000000000000e-15 -7.500000000000e+00 -7.637249795220e-04 0.000000000000e+00 7.637249795145e-04 7.500000000000e-15 -8.000000000000e+00 -7.644218787065e-04 0.000000000000e+00 7.644218786985e-04 8.000000000000e-15 -8.500000000000e+00 -7.650972425039e-04 0.000000000000e+00 7.650972424954e-04 8.500000000000e-15 -9.000000000000e+00 -7.657539320683e-04 0.000000000000e+00 7.657539320593e-04 9.000000000000e-15 -9.500000000000e+00 -7.663942495073e-04 0.000000000000e+00 7.663942494978e-04 9.500000000000e-15 -1.000000000000e+01 -7.670200715565e-04 0.000000000000e+00 7.670200715465e-04 1.000000000000e-14 -1.050000000000e+01 -7.676329472957e-04 0.000000000000e+00 7.676329472852e-04 1.050000000000e-14 -1.100000000000e+01 -7.682341702655e-04 0.000000000000e+00 7.682341702545e-04 1.100000000000e-14 -1.150000000000e+01 -7.688248322706e-04 0.000000000000e+00 7.688248322591e-04 1.150000000000e-14 -1.200000000000e+01 -7.694058639789e-04 0.000000000000e+00 7.694058639669e-04 1.200000000000e-14 -1.250000000000e+01 -7.699780659087e-04 0.000000000000e+00 7.699780658962e-04 1.250000000000e-14 -1.300000000000e+01 -7.705421323475e-04 0.000000000000e+00 7.705421323345e-04 1.300000000000e-14 -1.350000000000e+01 -7.710986700171e-04 0.000000000000e+00 7.710986700036e-04 1.350000000000e-14 -1.400000000000e+01 -7.716482127921e-04 0.000000000000e+00 7.716482127781e-04 1.400000000000e-14 -1.450000000000e+01 -7.721912334228e-04 0.000000000000e+00 7.721912334083e-04 1.450000000000e-14 -1.500000000000e+01 -7.727281529611e-04 0.000000000000e+00 7.727281529461e-04 1.500000000000e-14 -1.550000000000e+01 -7.732593484064e-04 0.000000000000e+00 7.732593483909e-04 1.550000000000e-14 -1.600000000000e+01 -7.737851589628e-04 0.000000000000e+00 7.737851589468e-04 1.600000000000e-14 -1.650000000000e+01 -7.743058911974e-04 0.000000000000e+00 7.743058911809e-04 1.650000000000e-14 -1.700000000000e+01 -7.748218233274e-04 0.000000000000e+00 7.748218233104e-04 1.700000000000e-14 -1.750000000000e+01 -7.753332088065e-04 0.000000000000e+00 7.753332087890e-04 1.750000000000e-14 -1.800000000000e+01 -7.758402793463e-04 0.000000000000e+00 7.758402793283e-04 1.800000000000e-14 -1.850000000000e+01 -7.763432474760e-04 0.000000000000e+00 7.763432474575e-04 1.850000000000e-14 -1.900000000000e+01 -7.768423087256e-04 0.000000000000e+00 7.768423087066e-04 1.900000000000e-14 -1.950000000000e+01 -7.773376434965e-04 0.000000000000e+00 7.773376434770e-04 1.950000000000e-14 -2.000000000000e+01 -7.778294186734e-04 0.000000000000e+00 7.778294186534e-04 2.000000000000e-14 -1.000000000000e+00 -1.531734187885e-03 0.000000000000e+00 1.531734187884e-03 1.000000000000e-15 -1.500000000000e+00 -1.944068393182e-03 0.000000000000e+00 1.944068393180e-03 1.500000000000e-15 -2.000000000000e+00 -2.231081449494e-03 0.000000000000e+00 2.231081449492e-03 2.000000000000e-15 -2.500000000000e+00 -2.436637786406e-03 0.000000000000e+00 2.436637786404e-03 2.500000000000e-15 -3.000000000000e+00 -2.586877317042e-03 0.000000000000e+00 2.586877317039e-03 3.000000000000e-15 -3.500000000000e+00 -2.698293871778e-03 0.000000000000e+00 2.698293871774e-03 3.500000000000e-15 -4.000000000000e+00 -2.781792008625e-03 0.000000000000e+00 2.781792008621e-03 4.000000000000e-15 -4.500000000000e+00 -2.844849222895e-03 0.000000000000e+00 2.844849222890e-03 4.500000000000e-15 -5.000000000000e+00 -2.892741123233e-03 0.000000000000e+00 2.892741123228e-03 5.000000000000e-15 -5.500000000000e+00 -2.929272919672e-03 0.000000000000e+00 2.929272919666e-03 5.500000000000e-15 -6.000000000000e+00 -2.957235453840e-03 0.000000000000e+00 2.957235453834e-03 6.000000000000e-15 -6.500000000000e+00 -2.978700514276e-03 0.000000000000e+00 2.978700514270e-03 6.500000000000e-15 -7.000000000000e+00 -2.995219171079e-03 0.000000000000e+00 2.995219171072e-03 7.000000000000e-15 -7.500000000000e+00 -3.007959643741e-03 0.000000000000e+00 3.007959643733e-03 7.500000000000e-15 -8.000000000000e+00 -3.017805916013e-03 0.000000000000e+00 3.017805916005e-03 8.000000000000e-15 -8.500000000000e+00 -3.025429688552e-03 0.000000000000e+00 3.025429688544e-03 8.500000000000e-15 -9.000000000000e+00 -3.031343500794e-03 0.000000000000e+00 3.031343500785e-03 9.000000000000e-15 -9.500000000000e+00 -3.035940223384e-03 0.000000000000e+00 3.035940223374e-03 9.500000000000e-15 -1.000000000000e+01 -3.039522598390e-03 0.000000000000e+00 3.039522598380e-03 1.000000000000e-14 -1.050000000000e+01 -3.042325572179e-03 0.000000000000e+00 3.042325572169e-03 1.050000000000e-14 -1.100000000000e+01 -3.044533658614e-03 0.000000000000e+00 3.044533658603e-03 1.100000000000e-14 -1.150000000000e+01 -3.046295702365e-03 0.000000000000e+00 3.046295702354e-03 1.150000000000e-14 -1.200000000000e+01 -3.047741393892e-03 0.000000000000e+00 3.047741393880e-03 1.200000000000e-14 -1.250000000000e+01 -3.049004334039e-03 0.000000000000e+00 3.049004334026e-03 1.250000000000e-14 -1.300000000000e+01 -3.050198052096e-03 0.000000000000e+00 3.050198052083e-03 1.300000000000e-14 -1.350000000000e+01 -3.051358013729e-03 0.000000000000e+00 3.051358013716e-03 1.350000000000e-14 -1.400000000000e+01 -3.052489489740e-03 0.000000000000e+00 3.052489489726e-03 1.400000000000e-14 -1.450000000000e+01 -3.053594826898e-03 0.000000000000e+00 3.053594826883e-03 1.450000000000e-14 -1.500000000000e+01 -3.054676015850e-03 0.000000000000e+00 3.054676015835e-03 1.500000000000e-14 -1.550000000000e+01 -3.055734856211e-03 0.000000000000e+00 3.055734856195e-03 1.550000000000e-14 -1.600000000000e+01 -3.056772980276e-03 0.000000000000e+00 3.056772980260e-03 1.600000000000e-14 -1.650000000000e+01 -3.057791867743e-03 0.000000000000e+00 3.057791867727e-03 1.650000000000e-14 -1.700000000000e+01 -3.058792859614e-03 0.000000000000e+00 3.058792859597e-03 1.700000000000e-14 -1.750000000000e+01 -3.059777171499e-03 0.000000000000e+00 3.059777171481e-03 1.750000000000e-14 -1.800000000000e+01 -3.060745906088e-03 0.000000000000e+00 3.060745906070e-03 1.800000000000e-14 -1.850000000000e+01 -3.061700064651e-03 0.000000000000e+00 3.061700064633e-03 1.850000000000e-14 -1.900000000000e+01 -3.062640557522e-03 0.000000000000e+00 3.062640557503e-03 1.900000000000e-14 -1.950000000000e+01 -3.063568213560e-03 0.000000000000e+00 3.063568213541e-03 1.950000000000e-14 -2.000000000000e+01 -3.064483788653e-03 0.000000000000e+00 3.064483788633e-03 2.000000000000e-14 -1.000000000000e+00 -2.748244339158e-05 0.000000000000e+00 2.748244339058e-05 1.000000000000e-15 -1.500000000000e+00 -2.760243988496e-05 0.000000000000e+00 2.760243988346e-05 1.500000000000e-15 -2.000000000000e+00 -2.770065031288e-05 0.000000000000e+00 2.770065031088e-05 2.000000000000e-15 -2.500000000000e+00 -2.778867051088e-05 0.000000000000e+00 2.778867050838e-05 2.500000000000e-15 -3.000000000000e+00 -2.787036425956e-05 0.000000000000e+00 2.787036425656e-05 3.000000000000e-15 -3.500000000000e+00 -2.794763438259e-05 0.000000000000e+00 2.794763437909e-05 3.500000000000e-15 -4.000000000000e+00 -2.802158612912e-05 0.000000000000e+00 2.802158612512e-05 4.000000000000e-15 -4.500000000000e+00 -2.809293059486e-05 0.000000000000e+00 2.809293059036e-05 4.500000000000e-15 -5.000000000000e+00 -2.816215806945e-05 0.000000000000e+00 2.816215806445e-05 5.000000000000e-15 -5.500000000000e+00 -2.822962389871e-05 0.000000000000e+00 2.822962389321e-05 5.500000000000e-15 -6.000000000000e+00 -2.829559553051e-05 0.000000000000e+00 2.829559552451e-05 6.000000000000e-15 -6.500000000000e+00 -2.836028030190e-05 0.000000000000e+00 2.836028029540e-05 6.500000000000e-15 -7.000000000000e+00 -2.842384283033e-05 0.000000000000e+00 2.842384282333e-05 7.000000000000e-15 -7.500000000000e+00 -2.848641641186e-05 0.000000000000e+00 2.848641640436e-05 7.500000000000e-15 -8.000000000000e+00 -2.854811077754e-05 0.000000000000e+00 2.854811076954e-05 8.000000000000e-15 -8.500000000000e+00 -2.860901753915e-05 0.000000000000e+00 2.860901753065e-05 8.500000000000e-15 -9.000000000000e+00 -2.866921411502e-05 0.000000000000e+00 2.866921410602e-05 9.000000000000e-15 -9.500000000000e+00 -2.872876662494e-05 0.000000000000e+00 2.872876661544e-05 9.500000000000e-15 -1.000000000000e+01 -2.878773206730e-05 0.000000000000e+00 2.878773205730e-05 1.000000000000e-14 -1.050000000000e+01 -2.884615998478e-05 0.000000000000e+00 2.884615997428e-05 1.050000000000e-14 -1.100000000000e+01 -2.890409375839e-05 0.000000000000e+00 2.890409374739e-05 1.100000000000e-14 -1.150000000000e+01 -2.896157162633e-05 0.000000000000e+00 2.896157161483e-05 1.150000000000e-14 -1.200000000000e+01 -2.901862749624e-05 0.000000000000e+00 2.901862748424e-05 1.200000000000e-14 -1.250000000000e+01 -2.907529159955e-05 0.000000000000e+00 2.907529158705e-05 1.250000000000e-14 -1.300000000000e+01 -2.913159102422e-05 0.000000000000e+00 2.913159101122e-05 1.300000000000e-14 -1.350000000000e+01 -2.918755015216e-05 0.000000000000e+00 2.918755013866e-05 1.350000000000e-14 -1.400000000000e+01 -2.924319102147e-05 0.000000000000e+00 2.924319100747e-05 1.400000000000e-14 -1.450000000000e+01 -2.929853362877e-05 0.000000000000e+00 2.929853361427e-05 1.450000000000e-14 -1.500000000000e+01 -2.935359618314e-05 0.000000000000e+00 2.935359616814e-05 1.500000000000e-14 -1.550000000000e+01 -2.940839532098e-05 0.000000000000e+00 2.940839530548e-05 1.550000000000e-14 -1.600000000000e+01 -2.946294628880e-05 0.000000000000e+00 2.946294627280e-05 1.600000000000e-14 -1.650000000000e+01 -2.951726309958e-05 0.000000000000e+00 2.951726308308e-05 1.650000000000e-14 -1.700000000000e+01 -2.957135866729e-05 0.000000000000e+00 2.957135865029e-05 1.700000000000e-14 -1.750000000000e+01 -2.962524492316e-05 0.000000000000e+00 2.962524490566e-05 1.750000000000e-14 -1.800000000000e+01 -2.967893291662e-05 0.000000000000e+00 2.967893289862e-05 1.800000000000e-14 -1.850000000000e+01 -2.973243290330e-05 0.000000000000e+00 2.973243288480e-05 1.850000000000e-14 -1.900000000000e+01 -2.978575442212e-05 0.000000000000e+00 2.978575440312e-05 1.900000000000e-14 -1.950000000000e+01 -2.983890636298e-05 0.000000000000e+00 2.983890634348e-05 1.950000000000e-14 -2.000000000000e+01 -2.989189702650e-05 0.000000000000e+00 2.989189700650e-05 2.000000000000e-14 -1.000000000000e+00 -2.703526464943e-04 0.000000000000e+00 2.703526464933e-04 1.000000000000e-15 -1.500000000000e+00 -3.338341250635e-04 0.000000000000e+00 3.338341250620e-04 1.500000000000e-15 -2.000000000000e+00 -3.695937988119e-04 0.000000000000e+00 3.695937988099e-04 2.000000000000e-15 -2.500000000000e+00 -3.887346490608e-04 0.000000000000e+00 3.887346490583e-04 2.500000000000e-15 -3.000000000000e+00 -3.984014253571e-04 0.000000000000e+00 3.984014253541e-04 3.000000000000e-15 -3.500000000000e+00 -4.029275702233e-04 0.000000000000e+00 4.029275702198e-04 3.500000000000e-15 -4.000000000000e+00 -4.048597187239e-04 0.000000000000e+00 4.048597187199e-04 4.000000000000e-15 -4.500000000000e+00 -4.057308589355e-04 0.000000000000e+00 4.057308589310e-04 4.500000000000e-15 -5.000000000000e+00 -4.063400826593e-04 0.000000000000e+00 4.063400826543e-04 5.000000000000e-15 -5.500000000000e+00 -4.068855005967e-04 0.000000000000e+00 4.068855005912e-04 5.500000000000e-15 -6.000000000000e+00 -4.073937544237e-04 0.000000000000e+00 4.073937544177e-04 6.000000000000e-15 -6.500000000000e+00 -4.078731158157e-04 0.000000000000e+00 4.078731158092e-04 6.500000000000e-15 -7.000000000000e+00 -4.083288977870e-04 0.000000000000e+00 4.083288977800e-04 7.000000000000e-15 -7.500000000000e+00 -4.087650601532e-04 0.000000000000e+00 4.087650601457e-04 7.500000000000e-15 -8.000000000000e+00 -4.091846510539e-04 0.000000000000e+00 4.091846510459e-04 8.000000000000e-15 -8.500000000000e+00 -4.095900561457e-04 0.000000000000e+00 4.095900561372e-04 8.500000000000e-15 -9.000000000000e+00 -4.099831694623e-04 0.000000000000e+00 4.099831694533e-04 9.000000000000e-15 -9.500000000000e+00 -4.103655153611e-04 0.000000000000e+00 4.103655153516e-04 9.500000000000e-15 -1.000000000000e+01 -4.107383367447e-04 0.000000000000e+00 4.107383367347e-04 1.000000000000e-14 -1.050000000000e+01 -4.111026595388e-04 0.000000000000e+00 4.111026595283e-04 1.050000000000e-14 -1.100000000000e+01 -4.114593403164e-04 0.000000000000e+00 4.114593403054e-04 1.100000000000e-14 -1.150000000000e+01 -4.118091018675e-04 0.000000000000e+00 4.118091018560e-04 1.150000000000e-14 -1.200000000000e+01 -4.121525600688e-04 0.000000000000e+00 4.121525600568e-04 1.200000000000e-14 -1.250000000000e+01 -4.124902444130e-04 0.000000000000e+00 4.124902444005e-04 1.250000000000e-14 -1.300000000000e+01 -4.128226138703e-04 0.000000000000e+00 4.128226138573e-04 1.300000000000e-14 -1.350000000000e+01 -4.131500692755e-04 0.000000000000e+00 4.131500692620e-04 1.350000000000e-14 -1.400000000000e+01 -4.134729631020e-04 0.000000000000e+00 4.134729630880e-04 1.400000000000e-14 -1.450000000000e+01 -4.137916072510e-04 0.000000000000e+00 4.137916072365e-04 1.450000000000e-14 -1.500000000000e+01 -4.141062793162e-04 0.000000000000e+00 4.141062793012e-04 1.500000000000e-14 -1.550000000000e+01 -4.144172276677e-04 0.000000000000e+00 4.144172276522e-04 1.550000000000e-14 -1.600000000000e+01 -4.147246756121e-04 0.000000000000e+00 4.147246755961e-04 1.600000000000e-14 -1.650000000000e+01 -4.150288248234e-04 0.000000000000e+00 4.150288248069e-04 1.650000000000e-14 -1.700000000000e+01 -4.153298581934e-04 0.000000000000e+00 4.153298581764e-04 1.700000000000e-14 -1.750000000000e+01 -4.156279422164e-04 0.000000000000e+00 4.156279421989e-04 1.750000000000e-14 -1.800000000000e+01 -4.159232289977e-04 0.000000000000e+00 4.159232289797e-04 1.800000000000e-14 -1.850000000000e+01 -4.162158579551e-04 0.000000000000e+00 4.162158579366e-04 1.850000000000e-14 -1.900000000000e+01 -4.165059572692e-04 0.000000000000e+00 4.165059572502e-04 1.900000000000e-14 -1.950000000000e+01 -4.167936451258e-04 0.000000000000e+00 4.167936451063e-04 1.950000000000e-14 -2.000000000000e+01 -4.170790307866e-04 0.000000000000e+00 4.170790307666e-04 2.000000000000e-14 -1.000000000000e+00 -6.438073477994e-04 0.000000000000e+00 6.438073477984e-04 1.000000000000e-15 -1.500000000000e+00 -8.716029861789e-04 0.000000000000e+00 8.716029861774e-04 1.500000000000e-15 -2.000000000000e+00 -1.048865641819e-03 0.000000000000e+00 1.048865641817e-03 2.000000000000e-15 -2.500000000000e+00 -1.186603059474e-03 0.000000000000e+00 1.186603059472e-03 2.500000000000e-15 -3.000000000000e+00 -1.293719421259e-03 0.000000000000e+00 1.293719421256e-03 3.000000000000e-15 -3.500000000000e+00 -1.377135294727e-03 0.000000000000e+00 1.377135294724e-03 3.500000000000e-15 -4.000000000000e+00 -1.442186519111e-03 0.000000000000e+00 1.442186519107e-03 4.000000000000e-15 -4.500000000000e+00 -1.492987867607e-03 0.000000000000e+00 1.492987867603e-03 4.500000000000e-15 -5.000000000000e+00 -1.532719762280e-03 0.000000000000e+00 1.532719762275e-03 5.000000000000e-15 -5.500000000000e+00 -1.563846561399e-03 0.000000000000e+00 1.563846561393e-03 5.500000000000e-15 -6.000000000000e+00 -1.588281205868e-03 0.000000000000e+00 1.588281205862e-03 6.000000000000e-15 -6.500000000000e+00 -1.607509621247e-03 0.000000000000e+00 1.607509621241e-03 6.500000000000e-15 -7.000000000000e+00 -1.622685661973e-03 0.000000000000e+00 1.622685661966e-03 7.000000000000e-15 -7.500000000000e+00 -1.634704572896e-03 0.000000000000e+00 1.634704572888e-03 7.500000000000e-15 -8.000000000000e+00 -1.644260447271e-03 0.000000000000e+00 1.644260447263e-03 8.000000000000e-15 -8.500000000000e+00 -1.651891351336e-03 0.000000000000e+00 1.651891351327e-03 8.500000000000e-15 -9.000000000000e+00 -1.658014685652e-03 0.000000000000e+00 1.658014685643e-03 9.000000000000e-15 -9.500000000000e+00 -1.662954741027e-03 0.000000000000e+00 1.662954741018e-03 9.500000000000e-15 -1.000000000000e+01 -1.666964040027e-03 0.000000000000e+00 1.666964040017e-03 1.000000000000e-14 -1.050000000000e+01 -1.670239784209e-03 0.000000000000e+00 1.670239784198e-03 1.050000000000e-14 -1.100000000000e+01 -1.672936492471e-03 0.000000000000e+00 1.672936492460e-03 1.100000000000e-14 -1.150000000000e+01 -1.675175705396e-03 0.000000000000e+00 1.675175705384e-03 1.150000000000e-14 -1.200000000000e+01 -1.677053447435e-03 0.000000000000e+00 1.677053447423e-03 1.200000000000e-14 -1.250000000000e+01 -1.678645986260e-03 0.000000000000e+00 1.678645986247e-03 1.250000000000e-14 -1.300000000000e+01 -1.680014305664e-03 0.000000000000e+00 1.680014305651e-03 1.300000000000e-14 -1.350000000000e+01 -1.681207608717e-03 0.000000000000e+00 1.681207608704e-03 1.350000000000e-14 -1.400000000000e+01 -1.682266076176e-03 0.000000000000e+00 1.682266076162e-03 1.400000000000e-14 -1.450000000000e+01 -1.683222986347e-03 0.000000000000e+00 1.683222986333e-03 1.450000000000e-14 -1.500000000000e+01 -1.684106099835e-03 0.000000000000e+00 1.684106099820e-03 1.500000000000e-14 -1.550000000000e+01 -1.684937987111e-03 0.000000000000e+00 1.684937987095e-03 1.550000000000e-14 -1.600000000000e+01 -1.685735346076e-03 0.000000000000e+00 1.685735346060e-03 1.600000000000e-14 -1.650000000000e+01 -1.686508721238e-03 0.000000000000e+00 1.686508721221e-03 1.650000000000e-14 -1.700000000000e+01 -1.687263887833e-03 0.000000000000e+00 1.687263887816e-03 1.700000000000e-14 -1.750000000000e+01 -1.688003900712e-03 0.000000000000e+00 1.688003900694e-03 1.750000000000e-14 -1.800000000000e+01 -1.688730525220e-03 0.000000000000e+00 1.688730525202e-03 1.800000000000e-14 -1.850000000000e+01 -1.689444943228e-03 0.000000000000e+00 1.689444943209e-03 1.850000000000e-14 -1.900000000000e+01 -1.690148056254e-03 0.000000000000e+00 1.690148056235e-03 1.900000000000e-14 -1.950000000000e+01 -1.690840612783e-03 0.000000000000e+00 1.690840612763e-03 1.950000000000e-14 -2.000000000000e+01 -1.691523264163e-03 0.000000000000e+00 1.691523264143e-03 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_isub.standard0000644000265600020320000010243012264261473023503 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -5.193472182379e-06 0.000000000000e+00 5.193472181367e-06 1.012500000000e-15 -1.500000000000e+00 -5.198987305783e-06 0.000000000000e+00 5.198987304270e-06 1.512500000000e-15 -2.000000000000e+00 -5.203594382392e-06 0.000000000000e+00 5.203594380380e-06 2.012500000000e-15 -2.500000000000e+00 -5.207739397528e-06 0.000000000000e+00 5.207739395015e-06 2.512500001550e-15 -3.000000000000e+00 -5.211590198049e-06 0.000000000000e+00 5.211590195036e-06 3.012500809035e-15 -3.500000000000e+00 -5.215231175500e-06 0.000000000000e+00 5.215231171988e-06 3.512588871031e-15 -4.000000000000e+00 -5.218712251266e-06 0.000000000000e+00 5.218712247249e-06 4.015959274185e-15 -4.500000000000e+00 -5.222066042661e-06 0.000000000000e+00 5.222066038083e-06 4.577672150220e-15 -5.000000000000e+00 -5.225315326581e-06 0.000000000000e+00 5.225315320844e-06 5.736925474087e-15 -5.500000000000e+00 -5.228476787659e-06 0.000000000000e+00 5.228476776727e-06 1.093296756091e-14 -6.000000000000e+00 -5.231563106587e-06 0.000000000000e+00 5.231563070667e-06 3.592105793853e-14 -6.500000000000e+00 -5.234584230105e-06 0.000000000000e+00 5.234584093712e-06 1.363929791941e-13 -7.000000000000e+00 -5.237548221352e-06 0.000000000000e+00 5.237547748741e-06 4.726105212532e-13 -7.500000000000e+00 -5.240461905760e-06 0.000000000000e+00 5.240460470197e-06 1.435563154602e-12 -8.000000000000e+00 -5.243331440153e-06 0.000000000000e+00 5.243327580626e-06 3.859526595052e-12 -8.500000000000e+00 -5.246162882252e-06 0.000000000000e+00 5.246153542802e-06 9.339450429018e-12 -9.000000000000e+00 -5.248962802169e-06 0.000000000000e+00 5.248942142635e-06 2.065953441376e-11 -9.500000000000e+00 -5.251738949517e-06 0.000000000000e+00 5.251696624805e-06 4.232471246652e-11 -1.000000000000e+01 -5.254500968282e-06 0.000000000000e+00 5.254419795287e-06 8.117299603849e-11 -1.050000000000e+01 -5.257261136525e-06 0.000000000000e+00 5.257114100137e-06 1.470363868521e-10 -1.100000000000e+01 -5.260035099637e-06 0.000000000000e+00 5.259781686955e-06 2.534126798737e-10 -1.150000000000e+01 -5.262842563458e-06 0.000000000000e+00 5.262424453459e-06 4.181099986875e-10 -1.200000000000e+01 -5.265707915834e-06 0.000000000000e+00 5.265044086329e-06 6.638295055761e-10 -1.250000000000e+01 -5.268660750748e-06 0.000000000000e+00 5.267642092608e-06 1.018658139922e-09 -1.300000000000e+01 -5.271736276471e-06 0.000000000000e+00 5.270219825338e-06 1.516451131641e-09 -1.350000000000e+01 -5.274975596916e-06 0.000000000000e+00 5.272778504656e-06 2.197092260428e-09 -1.400000000000e+01 -5.278425862850e-06 0.000000000000e+00 5.275319235324e-06 3.106627526922e-09 -1.450000000000e+01 -5.282140295897e-06 0.000000000000e+00 5.277843021378e-06 4.297274518960e-09 -1.500000000000e+01 -5.286178093493e-06 0.000000000000e+00 5.280350778474e-06 5.827315018197e-09 -1.550000000000e+01 -5.290604226579e-06 0.000000000000e+00 5.282843344344e-06 7.760882234495e-09 -1.600000000000e+01 -5.295489144277e-06 0.000000000000e+00 5.285321487719e-06 1.016765655771e-08 -1.650000000000e+01 -5.300908401023e-06 0.000000000000e+00 5.287785915975e-06 1.312248504642e-08 -1.700000000000e+01 -5.306942221959e-06 0.000000000000e+00 5.290237281720e-06 1.670494023915e-08 -1.750000000000e+01 -5.313675021998e-06 0.000000000000e+00 5.292676188504e-06 2.099883349329e-08 -1.800000000000e+01 -5.321194892917e-06 0.000000000000e+00 5.295103195781e-06 2.609169713381e-08 -1.850000000000e+01 -5.329593071655e-06 0.000000000000e+00 5.297518823247e-06 3.207424840880e-08 -1.900000000000e+01 -5.338963401392e-06 0.000000000000e+00 5.299923554642e-06 3.903984675006e-08 -1.950000000000e+01 -5.349401795347e-06 0.000000000000e+00 5.302317841102e-06 4.708395424521e-08 -2.000000000000e+01 -5.361005711745e-06 0.000000000000e+00 5.304702104113e-06 5.630360763119e-08 -1.000000000000e+00 -1.015125599410e-04 0.000000000000e+00 1.015125599400e-04 1.012500000000e-15 -1.500000000000e+00 -1.299779394283e-04 0.000000000000e+00 1.299779394268e-04 1.512500000000e-15 -2.000000000000e+00 -1.471105241735e-04 0.000000000000e+00 1.471105241715e-04 2.012500000000e-15 -2.500000000000e+00 -1.563368275935e-04 0.000000000000e+00 1.563368275910e-04 2.512500000000e-15 -3.000000000000e+00 -1.606159870770e-04 0.000000000000e+00 1.606159870740e-04 3.012500000000e-15 -3.500000000000e+00 -1.621237738572e-04 0.000000000000e+00 1.621237738537e-04 3.512500000004e-15 -4.000000000000e+00 -1.624049861278e-04 0.000000000000e+00 1.624049861238e-04 4.012500025365e-15 -4.500000000000e+00 -1.624824747538e-04 0.000000000000e+00 1.624824747493e-04 4.512513909559e-15 -5.000000000000e+00 -1.625489589716e-04 0.000000000000e+00 1.625489589666e-04 5.014098910224e-15 -5.500000000000e+00 -1.626092882799e-04 0.000000000000e+00 1.626092882743e-04 5.577303876735e-15 -6.000000000000e+00 -1.626647901558e-04 0.000000000000e+00 1.626647901485e-04 7.277529849411e-15 -6.500000000000e+00 -1.627164427755e-04 0.000000000000e+00 1.627164427545e-04 2.101867834987e-14 -7.000000000000e+00 -1.627649805615e-04 0.000000000000e+00 1.627649804429e-04 1.185639435505e-13 -7.500000000000e+00 -1.628109582346e-04 0.000000000000e+00 1.628109575965e-04 6.380542304397e-13 -8.000000000000e+00 -1.628547998954e-04 0.000000000000e+00 1.628547970900e-04 2.805399662821e-12 -8.500000000000e+00 -1.628968359498e-04 0.000000000000e+00 1.628968257202e-04 1.022959784770e-11 -9.000000000000e+00 -1.629373315291e-04 0.000000000000e+00 1.629372996311e-04 3.189797892358e-11 -9.500000000000e+00 -1.629765098231e-04 0.000000000000e+00 1.629764224772e-04 8.734584757440e-11 -1.000000000000e+01 -1.630145729950e-04 0.000000000000e+00 1.630143584429e-04 2.145520934193e-10 -1.050000000000e+01 -1.630517224789e-04 0.000000000000e+00 1.630512416472e-04 4.808316616822e-10 -1.100000000000e+01 -1.630881796307e-04 0.000000000000e+00 1.630871830063e-04 9.966243969429e-10 -1.150000000000e+01 -1.631242070026e-04 0.000000000000e+00 1.631222752979e-04 1.931704739606e-09 -1.200000000000e+01 -1.631601299759e-04 0.000000000000e+00 1.631565969430e-04 3.533032919438e-09 -1.250000000000e+01 -1.631963581430e-04 0.000000000000e+00 1.631902148626e-04 6.143280364924e-09 -1.300000000000e+01 -1.632334056640e-04 0.000000000000e+00 1.632231866621e-04 1.021900190543e-08 -1.350000000000e+01 -1.632719098009e-04 0.000000000000e+00 1.632555623197e-04 1.634748122694e-08 -1.400000000000e+01 -1.633126469213e-04 0.000000000000e+00 1.632873855059e-04 2.526141538174e-08 -1.450000000000e+01 -1.633565454220e-04 0.000000000000e+00 1.633186946265e-04 3.785079557167e-08 -1.500000000000e+01 -1.634046952073e-04 0.000000000000e+00 1.633495236534e-04 5.517155386671e-08 -1.550000000000e+01 -1.634583535494e-04 0.000000000000e+00 1.633799027952e-04 7.845075416783e-08 -1.600000000000e+01 -1.635189473347e-04 0.000000000000e+00 1.634098590413e-04 1.090882933291e-07 -1.650000000000e+01 -1.635880718435e-04 0.000000000000e+00 1.634394166086e-04 1.486552348595e-07 -1.700000000000e+01 -1.636674863294e-04 0.000000000000e+00 1.634685973106e-04 1.988890188845e-07 -1.750000000000e+01 -1.637591067434e-04 0.000000000000e+00 1.634974208652e-04 2.616858782510e-07 -1.800000000000e+01 -1.638649959981e-04 0.000000000000e+00 1.635259051533e-04 3.390908448225e-07 -1.850000000000e+01 -1.639873521936e-04 0.000000000000e+00 1.635540664369e-04 4.332857567304e-07 -1.900000000000e+01 -1.641284952274e-04 0.000000000000e+00 1.635819195456e-04 5.465756818119e-07 -1.950000000000e+01 -1.642908521958e-04 0.000000000000e+00 1.636094780359e-04 6.813741598828e-07 -2.000000000000e+01 -1.644769419700e-04 0.000000000000e+00 1.636367543284e-04 8.401876415904e-07 -1.000000000000e+00 -2.196590614833e-04 0.000000000000e+00 2.196590614822e-04 1.012500000000e-15 -1.500000000000e+00 -3.120423465437e-04 0.000000000000e+00 3.120423465422e-04 1.512500000000e-15 -2.000000000000e+00 -3.934344538019e-04 0.000000000000e+00 3.934344537998e-04 2.012500000000e-15 -2.500000000000e+00 -4.645681128334e-04 0.000000000000e+00 4.645681128309e-04 2.512500000000e-15 -3.000000000000e+00 -5.262715272235e-04 0.000000000000e+00 5.262715272205e-04 3.012500000000e-15 -3.500000000000e+00 -5.794113665687e-04 0.000000000000e+00 5.794113665652e-04 3.512500000000e-15 -4.000000000000e+00 -6.248562736580e-04 0.000000000000e+00 6.248562736540e-04 4.012500000000e-15 -4.500000000000e+00 -6.634534312106e-04 0.000000000000e+00 6.634534312061e-04 4.512500000000e-15 -5.000000000000e+00 -6.960130181175e-04 0.000000000000e+00 6.960130181125e-04 5.012500000000e-15 -5.500000000000e+00 -7.232975912906e-04 0.000000000000e+00 7.232975912851e-04 5.512500000000e-15 -6.000000000000e+00 -7.460148236163e-04 0.000000000000e+00 7.460148236103e-04 6.012500000000e-15 -6.500000000000e+00 -7.648127351484e-04 0.000000000000e+00 7.648127351419e-04 6.512500000000e-15 -7.000000000000e+00 -7.802769083028e-04 0.000000000000e+00 7.802769082958e-04 7.012500000000e-15 -7.500000000000e+00 -7.929294167815e-04 0.000000000000e+00 7.929294167740e-04 7.512500000000e-15 -8.000000000000e+00 -8.032293748123e-04 0.000000000000e+00 8.032293748043e-04 8.012500000058e-15 -8.500000000000e+00 -8.115750733100e-04 0.000000000000e+00 8.115750733015e-04 8.512500110107e-15 -9.000000000000e+00 -8.183075870732e-04 0.000000000000e+00 8.183075870642e-04 9.012531901028e-15 -9.500000000000e+00 -8.237155757987e-04 0.000000000000e+00 8.237155757892e-04 9.515137140590e-15 -1.000000000000e+01 -8.280408740161e-04 0.000000000000e+00 8.280408740060e-04 1.010297584124e-14 -1.050000000000e+01 -8.314843637235e-04 0.000000000000e+00 8.314843637113e-04 1.214888686869e-14 -1.100000000000e+01 -8.342118652746e-04 0.000000000000e+00 8.342118652453e-04 2.931244470230e-14 -1.150000000000e+01 -8.363595560100e-04 0.000000000000e+00 8.363595558571e-04 1.528632072525e-13 -1.200000000000e+01 -8.380389062701e-04 0.000000000000e+00 8.380389054418e-04 8.282471994285e-13 -1.250000000000e+01 -8.393409920287e-04 0.000000000000e+00 8.393409882816e-04 3.747112703176e-12 -1.300000000000e+01 -8.403402033836e-04 0.000000000000e+00 8.403401892278e-04 1.415576656336e-11 -1.350000000000e+01 -8.410974055221e-04 0.000000000000e+00 8.410973596750e-04 4.584712857801e-11 -1.400000000000e+01 -8.416626449201e-04 0.000000000000e+00 8.416625144464e-04 1.304737035225e-10 -1.450000000000e+01 -8.420775303913e-04 0.000000000000e+00 8.420771974730e-04 3.329182552966e-10 -1.500000000000e+01 -8.423774772080e-04 0.000000000000e+00 8.423767030227e-04 7.741852330891e-10 -1.550000000000e+01 -8.425940809900e-04 0.000000000000e+00 8.425924183486e-04 1.662641470549e-09 -1.600000000000e+01 -8.427575253172e-04 0.000000000000e+00 8.427541917693e-04 3.333547925904e-09 -1.650000000000e+01 -8.428953714113e-04 0.000000000000e+00 8.428890754955e-04 6.295915798564e-09 -1.700000000000e+01 -8.430246822182e-04 0.000000000000e+00 8.430133970588e-04 1.128515933942e-08 -1.750000000000e+01 -8.431520089492e-04 0.000000000000e+00 8.431326895414e-04 1.931940781632e-08 -1.800000000000e+01 -8.432801549608e-04 0.000000000000e+00 8.432483982502e-04 3.175671056410e-08 -1.850000000000e+01 -8.434113607617e-04 0.000000000000e+00 8.433610102766e-04 5.035048503894e-08 -1.900000000000e+01 -8.435480960845e-04 0.000000000000e+00 8.434707953336e-04 7.730075084234e-08 -1.950000000000e+01 -8.436932582972e-04 0.000000000000e+00 8.435779593270e-04 1.152989702010e-07 -2.000000000000e+01 -8.438502434421e-04 0.000000000000e+00 8.436826787096e-04 1.675647324964e-07 -1.000000000000e+00 -4.138938879528e-06 0.000000000000e+00 4.138938878528e-06 1.000000000938e-15 -1.500000000000e+00 -4.143807087967e-06 0.000000000000e+00 4.143807086467e-06 1.500000000938e-15 -2.000000000000e+00 -4.147981191834e-06 0.000000000000e+00 4.147981189834e-06 2.000000000940e-15 -2.500000000000e+00 -4.151798587606e-06 0.000000000000e+00 4.151798585106e-06 2.500000006935e-15 -3.000000000000e+00 -4.155386318867e-06 0.000000000000e+00 4.155386315867e-06 3.000002076239e-15 -3.500000000000e+00 -4.158808854788e-06 0.000000000000e+00 4.158808851288e-06 3.500174337612e-15 -4.000000000000e+00 -4.162104709880e-06 0.000000000000e+00 4.162104705874e-06 4.005641726524e-15 -4.500000000000e+00 -4.165299263316e-06 0.000000000000e+00 4.165299258723e-06 4.593090806533e-15 -5.000000000000e+00 -4.168410361575e-06 0.000000000000e+00 4.168410355638e-06 5.937759516412e-15 -5.500000000000e+00 -4.171451152925e-06 0.000000000000e+00 4.171451140916e-06 1.200913467518e-14 -6.000000000000e+00 -4.174431680378e-06 0.000000000000e+00 4.174431640508e-06 3.987133709647e-14 -6.500000000000e+00 -4.177359861423e-06 0.000000000000e+00 4.177359714533e-06 1.468898699168e-13 -7.000000000000e+00 -4.180242155009e-06 0.000000000000e+00 4.180241663355e-06 4.916542990129e-13 -7.500000000000e+00 -4.183084079342e-06 0.000000000000e+00 4.183082630601e-06 1.448742889637e-12 -8.000000000000e+00 -4.185890677504e-06 0.000000000000e+00 4.185886880940e-06 3.796564307099e-12 -8.500000000000e+00 -4.188666988524e-06 0.000000000000e+00 4.188657997314e-06 8.991209004065e-12 -9.000000000000e+00 -4.191418553430e-06 0.000000000000e+00 4.191399024531e-06 1.952890061098e-11 -9.500000000000e+00 -4.194151963958e-06 0.000000000000e+00 4.194112576095e-06 3.938786309304e-11 -1.000000000000e+01 -4.196875445068e-06 0.000000000000e+00 4.196800915178e-06 7.452988934483e-11 -1.050000000000e+01 -4.199599451519e-06 0.000000000000e+00 4.199466017005e-06 1.334345124283e-10 -1.100000000000e+01 -4.202337252891e-06 0.000000000000e+00 4.202109617629e-06 2.276352607204e-10 -1.150000000000e+01 -4.205105480441e-06 0.000000000000e+00 4.204733252560e-06 3.722278814033e-10 -1.200000000000e+01 -4.207924611583e-06 0.000000000000e+00 4.207338287711e-06 5.863238723702e-10 -1.250000000000e+01 -4.210819372581e-06 0.000000000000e+00 4.209925944455e-06 8.934281260266e-10 -1.300000000000e+01 -4.213819046034e-06 0.000000000000e+00 4.212497320115e-06 1.321725917543e-09 -1.350000000000e+01 -4.216957675843e-06 0.000000000000e+00 4.215053404850e-06 1.904270992898e-09 -1.400000000000e+01 -4.220274168198e-06 0.000000000000e+00 4.217595095699e-06 2.679072497476e-09 -1.450000000000e+01 -4.223812291886e-06 0.000000000000e+00 4.220123208338e-06 3.689083546580e-09 -1.500000000000e+01 -4.227620585192e-06 0.000000000000e+00 4.222638486995e-06 4.982098195565e-09 -1.550000000000e+01 -4.231752179253e-06 0.000000000000e+00 4.225141612856e-06 6.610566396830e-09 -1.600000000000e+01 -4.236264549564e-06 0.000000000000e+00 4.227633211246e-06 8.631338316255e-09 -1.650000000000e+01 -4.241219208053e-06 0.000000000000e+00 4.230113857788e-06 1.110535026601e-08 -1.700000000000e+01 -4.246681348374e-06 0.000000000000e+00 4.232584083711e-06 1.409726466373e-08 -1.750000000000e+01 -4.252719456482e-06 0.000000000000e+00 4.235044380460e-06 1.767507602166e-08 -1.800000000000e+01 -4.259404897860e-06 0.000000000000e+00 4.237495203697e-06 2.190969416295e-08 -1.850000000000e+01 -4.266811491605e-06 0.000000000000e+00 4.239936976811e-06 2.687451479389e-08 -1.900000000000e+01 -4.275015080328e-06 0.000000000000e+00 4.242370093983e-06 3.264498634479e-08 -1.950000000000e+01 -4.284093103625e-06 0.000000000000e+00 4.244794922906e-06 3.929818071795e-08 -2.000000000000e+01 -4.294124181486e-06 0.000000000000e+00 4.247211807168e-06 4.691237431626e-08 -1.000000000000e+00 -1.463239791206e-04 0.000000000000e+00 1.463239791196e-04 1.000000000938e-15 -1.500000000000e+00 -1.877403647010e-04 0.000000000000e+00 1.877403646995e-04 1.500000000938e-15 -2.000000000000e+00 -2.126275494897e-04 0.000000000000e+00 2.126275494876e-04 2.000000000938e-15 -2.500000000000e+00 -2.257773334512e-04 0.000000000000e+00 2.257773334487e-04 2.500000000938e-15 -3.000000000000e+00 -2.314768435905e-04 0.000000000000e+00 2.314768435875e-04 3.000000000938e-15 -3.500000000000e+00 -2.330260200944e-04 0.000000000000e+00 2.330260200909e-04 3.500000000943e-15 -4.000000000000e+00 -2.331934546603e-04 0.000000000000e+00 2.331934546563e-04 4.000000030515e-15 -4.500000000000e+00 -2.333011669956e-04 0.000000000000e+00 2.333011669911e-04 4.500016208211e-15 -5.000000000000e+00 -2.333974224807e-04 0.000000000000e+00 2.333974224757e-04 5.001873728536e-15 -5.500000000000e+00 -2.334846675861e-04 0.000000000000e+00 2.334846675805e-04 5.576570334416e-15 -6.000000000000e+00 -2.335648001041e-04 0.000000000000e+00 2.335648000966e-04 7.508187401222e-15 -6.500000000000e+00 -2.336392658679e-04 0.000000000000e+00 2.336392658440e-04 2.394924018563e-14 -7.000000000000e+00 -2.337091553737e-04 0.000000000000e+00 2.337091552314e-04 1.423291030867e-13 -7.500000000000e+00 -2.337752930574e-04 0.000000000000e+00 2.337752922789e-04 7.785568750767e-13 -8.000000000000e+00 -2.338383086017e-04 0.000000000000e+00 2.338383051476e-04 3.454116781517e-12 -8.500000000000e+00 -2.338986912266e-04 0.000000000000e+00 2.338986785407e-04 1.268596741492e-11 -9.000000000000e+00 -2.339568314142e-04 0.000000000000e+00 2.339567916035e-04 3.981070243429e-11 -9.500000000000e+00 -2.340130547523e-04 0.000000000000e+00 2.340129451031e-04 1.096491433409e-10 -1.000000000000e+01 -2.340676517213e-04 0.000000000000e+00 2.340673809408e-04 2.707804049744e-10 -1.050000000000e+01 -2.341209060947e-04 0.000000000000e+00 2.341202962508e-04 6.098438756632e-10 -1.100000000000e+01 -2.341731234856e-04 0.000000000000e+00 2.341718536811e-04 1.269804528618e-09 -1.150000000000e+01 -2.342246605854e-04 0.000000000000e+00 2.342221889714e-04 2.471613957608e-09 -1.200000000000e+01 -2.342759548807e-04 0.000000000000e+00 2.342714166029e-04 4.538277798796e-09 -1.250000000000e+01 -2.343275541233e-04 0.000000000000e+00 2.343196340591e-04 7.920064226089e-09 -1.300000000000e+01 -2.343801445562e-04 0.000000000000e+00 2.343669250765e-04 1.321947971075e-08 -1.350000000000e+01 -2.344345768371e-04 0.000000000000e+00 2.344133621531e-04 2.121468399955e-08 -1.400000000000e+01 -2.344918886857e-04 0.000000000000e+00 2.344590085041e-04 3.288018164192e-08 -1.450000000000e+01 -2.345533234743e-04 0.000000000000e+00 2.345039196048e-04 4.940386950140e-08 -1.500000000000e+01 -2.346203442149e-04 0.000000000000e+00 2.345481444177e-04 7.219979721442e-08 -1.550000000000e+01 -2.346946426570e-04 0.000000000000e+00 2.345917263805e-04 1.029162765164e-07 -1.600000000000e+01 -2.347781434380e-04 0.000000000000e+00 2.346347042067e-04 1.434392313137e-07 -1.650000000000e+01 -2.348730034409e-04 0.000000000000e+00 2.346771125426e-04 1.958908983526e-07 -1.700000000000e+01 -2.349816066698e-04 0.000000000000e+00 2.347189825084e-04 2.626241613279e-07 -1.750000000000e+01 -2.351065550790e-04 0.000000000000e+00 2.347603421507e-04 3.462129282978e-07 -1.800000000000e+01 -2.352506558666e-04 0.000000000000e+00 2.348012168202e-04 4.494390464123e-07 -1.850000000000e+01 -2.354169057880e-04 0.000000000000e+00 2.348416294933e-04 5.752762946563e-07 -1.900000000000e+01 -2.356084730552e-04 0.000000000000e+00 2.348816010441e-04 7.268720110860e-07 -1.950000000000e+01 -2.358286773816e-04 0.000000000000e+00 2.349211504791e-04 9.075269025643e-07 -2.000000000000e+01 -2.360809686969e-04 0.000000000000e+00 2.349602951384e-04 1.120673558536e-06 -1.000000000000e+00 -3.070286702272e-04 0.000000000000e+00 3.070286702262e-04 1.000000000938e-15 -1.500000000000e+00 -4.363382792342e-04 0.000000000000e+00 4.363382792327e-04 1.500000000938e-15 -2.000000000000e+00 -5.506850061722e-04 0.000000000000e+00 5.506850061702e-04 2.000000000938e-15 -2.500000000000e+00 -6.512762915162e-04 0.000000000000e+00 6.512762915137e-04 2.500000000938e-15 -3.000000000000e+00 -7.393665613641e-04 0.000000000000e+00 7.393665613611e-04 3.000000000938e-15 -3.500000000000e+00 -8.161743015666e-04 0.000000000000e+00 8.161743015631e-04 3.500000000938e-15 -4.000000000000e+00 -8.828474531565e-04 0.000000000000e+00 8.828474531525e-04 4.000000000938e-15 -4.500000000000e+00 -9.404534281445e-04 0.000000000000e+00 9.404534281400e-04 4.500000000938e-15 -5.000000000000e+00 -9.899798212591e-04 0.000000000000e+00 9.899798212541e-04 5.000000000938e-15 -5.500000000000e+00 -1.032338701895e-03 0.000000000000e+00 1.032338701890e-03 5.500000000938e-15 -6.000000000000e+00 -1.068371276215e-03 0.000000000000e+00 1.068371276209e-03 6.000000000938e-15 -6.500000000000e+00 -1.098851724384e-03 0.000000000000e+00 1.098851724378e-03 6.500000000938e-15 -7.000000000000e+00 -1.124489963199e-03 0.000000000000e+00 1.124489963192e-03 7.000000000938e-15 -7.500000000000e+00 -1.145933491041e-03 0.000000000000e+00 1.145933491034e-03 7.500000000938e-15 -8.000000000000e+00 -1.163768651055e-03 0.000000000000e+00 1.163768651047e-03 8.000000000938e-15 -8.500000000000e+00 -1.178521739660e-03 0.000000000000e+00 1.178521739651e-03 8.500000000938e-15 -9.000000000000e+00 -1.190660409543e-03 0.000000000000e+00 1.190660409534e-03 9.000000001582e-15 -9.500000000000e+00 -1.200595742035e-03 0.000000000000e+00 1.200595742025e-03 9.500000454607e-15 -1.000000000000e+01 -1.208685194322e-03 0.000000000000e+00 1.208685194312e-03 1.000007271852e-14 -1.050000000000e+01 -1.215236415450e-03 0.000000000000e+00 1.215236415439e-03 1.050415628595e-14 -1.100000000000e+01 -1.220511745179e-03 0.000000000000e+00 1.220511745167e-03 1.111257583782e-14 -1.150000000000e+01 -1.224733121525e-03 0.000000000000e+00 1.224733121512e-03 1.324494136868e-14 -1.200000000000e+01 -1.228087029203e-03 0.000000000000e+00 1.228087029174e-03 2.963258803198e-14 -1.250000000000e+01 -1.230729427296e-03 0.000000000000e+00 1.230729427156e-03 1.399245901856e-13 -1.300000000000e+01 -1.232790215254e-03 0.000000000000e+00 1.232790214536e-03 7.177573140828e-13 -1.350000000000e+01 -1.234377364984e-03 0.000000000000e+00 1.234377361832e-03 3.151899108028e-12 -1.400000000000e+01 -1.235580605718e-03 0.000000000000e+00 1.235580594007e-03 1.171088765820e-11 -1.450000000000e+01 -1.236474734935e-03 0.000000000000e+00 1.236474697322e-03 3.761320431076e-11 -1.500000000000e+01 -1.237122714101e-03 0.000000000000e+00 1.237122607354e-03 1.067464762598e-10 -1.550000000000e+01 -1.237578943329e-03 0.000000000000e+00 1.237578670649e-03 2.726803714066e-10 -1.600000000000e+01 -1.237893797220e-03 0.000000000000e+00 1.237893160705e-03 6.365145043868e-10 -1.650000000000e+01 -1.238121325025e-03 0.000000000000e+00 1.238119950408e-03 1.374616925318e-09 -1.700000000000e+01 -1.238315423767e-03 0.000000000000e+00 1.238312649188e-03 2.774578972499e-09 -1.750000000000e+01 -1.238500321653e-03 0.000000000000e+00 1.238495042226e-03 5.279427487878e-09 -1.800000000000e+01 -1.238680695964e-03 0.000000000000e+00 1.238671156897e-03 9.539066795428e-09 -1.850000000000e+01 -1.238858250522e-03 0.000000000000e+00 1.238841783551e-03 1.646697056986e-08 -1.900000000000e+01 -1.239034660738e-03 0.000000000000e+00 1.239007360678e-03 2.730006040864e-08 -1.950000000000e+01 -1.239211915073e-03 0.000000000000e+00 1.239168255746e-03 4.365932721562e-08 -2.000000000000e+01 -1.239392405081e-03 0.000000000000e+00 1.239324796406e-03 6.760867501313e-08 -1.000000000000e+00 -6.714210159799e-06 0.000000000000e+00 6.714193966620e-06 1.619317952605e-11 -1.500000000000e+00 -6.721092119165e-06 0.000000000000e+00 6.721075925486e-06 1.619367952607e-11 -2.000000000000e+00 -6.726336774163e-06 0.000000000000e+00 6.726320579983e-06 1.619417952607e-11 -2.500000000000e+00 -6.730940349466e-06 0.000000000000e+00 6.730924154786e-06 1.619467952607e-11 -3.000000000000e+00 -6.735147402281e-06 0.000000000000e+00 6.735131207101e-06 1.619517952619e-11 -3.500000000000e+00 -6.739076773903e-06 0.000000000000e+00 6.739060578224e-06 1.619567954760e-11 -4.000000000000e+00 -6.742797231373e-06 0.000000000000e+00 6.742781035193e-06 1.619618072144e-11 -4.500000000000e+00 -6.746352945487e-06 0.000000000000e+00 6.746336748778e-06 1.619670850509e-11 -5.000000000000e+00 -6.749774350209e-06 0.000000000000e+00 6.749758152642e-06 1.619756726727e-11 -5.500000000000e+00 -6.753083500611e-06 0.000000000000e+00 6.753067299594e-06 1.620101797913e-11 -6.000000000000e+00 -6.756297007703e-06 0.000000000000e+00 6.756280788985e-06 1.621871824468e-11 -6.500000000000e+00 -6.759427788824e-06 0.000000000000e+00 6.759411492932e-06 1.629589213738e-11 -7.000000000000e+00 -6.762486208219e-06 0.000000000000e+00 6.762469635534e-06 1.657268458921e-11 -7.500000000000e+00 -6.765480911706e-06 0.000000000000e+00 6.765463499680e-06 1.741202606574e-11 -8.000000000000e+00 -6.768419534644e-06 0.000000000000e+00 6.768399907785e-06 1.962685964784e-11 -8.500000000000e+00 -6.771309393852e-06 0.000000000000e+00 6.771284559196e-06 2.483465545346e-11 -9.000000000000e+00 -6.774158227382e-06 0.000000000000e+00 6.774122273378e-06 3.595400165077e-11 -9.500000000000e+00 -6.776975009152e-06 0.000000000000e+00 6.776917169219e-06 5.783993225774e-11 -1.000000000000e+01 -6.779770835852e-06 0.000000000000e+00 6.779672799859e-06 9.803599316230e-11 -1.050000000000e+01 -6.782559861657e-06 0.000000000000e+00 6.782392255854e-06 1.676058034679e-10 -1.100000000000e+01 -6.785360242748e-06 0.000000000000e+00 6.785078245311e-06 2.819974350067e-10 -1.150000000000e+01 -6.788195047966e-06 0.000000000000e+00 6.787733156997e-06 4.618909696453e-10 -1.200000000000e+01 -6.791093093038e-06 0.000000000000e+00 6.790359110637e-06 7.339824003951e-10 -1.250000000000e+01 -6.794089661589e-06 0.000000000000e+00 6.792957997456e-06 1.131664133622e-09 -1.300000000000e+01 -6.797227085170e-06 0.000000000000e+00 6.795531513175e-06 1.695571994641e-09 -1.350000000000e+01 -6.800555164358e-06 0.000000000000e+00 6.798081185119e-06 2.473979238915e-09 -1.400000000000e+01 -6.804131423027e-06 0.000000000000e+00 6.800608394662e-06 3.523028364221e-09 -1.450000000000e+01 -6.808021196611e-06 0.000000000000e+00 6.803114395965e-06 4.906800645750e-09 -1.500000000000e+01 -6.812297562520e-06 0.000000000000e+00 6.805600331727e-06 6.697230792893e-09 -1.550000000000e+01 -6.817041126286e-06 0.000000000000e+00 6.808067246509e-06 8.973879775321e-09 -1.600000000000e+01 -6.822339680802e-06 0.000000000000e+00 6.810516098074e-06 1.182358272861e-08 -1.650000000000e+01 -6.828287758201e-06 0.000000000000e+00 6.812947767094e-06 1.533999110731e-08 -1.700000000000e+01 -6.834986094672e-06 0.000000000000e+00 6.815363065510e-06 1.962302916130e-08 -1.750000000000e+01 -6.842541028397e-06 0.000000000000e+00 6.817762743748e-06 2.477828464939e-08 -1.800000000000e+01 -6.851063849751e-06 0.000000000000e+00 6.820147497005e-06 3.091635274563e-08 -1.850000000000e+01 -6.860670121300e-06 0.000000000000e+00 6.822517970717e-06 3.815215058348e-08 -1.900000000000e+01 -6.871478983394e-06 0.000000000000e+00 6.824874765365e-06 4.660421802963e-08 -1.950000000000e+01 -6.883612458942e-06 0.000000000000e+00 6.827218440690e-06 5.639401825148e-08 -2.000000000000e+01 -6.897194768987e-06 0.000000000000e+00 6.829549519419e-06 6.764524956977e-08 -1.000000000000e+00 -6.554845495392e-05 0.000000000000e+00 6.554843876074e-05 1.619317952605e-11 -1.500000000000e+00 -8.407823596969e-05 0.000000000000e+00 8.407821977601e-05 1.619367952607e-11 -2.000000000000e+00 -9.550516723092e-05 0.000000000000e+00 9.550515103674e-05 1.619417952607e-11 -2.500000000000e+00 -1.020087165764e-04 0.000000000000e+00 1.020087003817e-04 1.619467952607e-11 -3.000000000000e+00 -1.054087404707e-04 0.000000000000e+00 1.054087242755e-04 1.619517952607e-11 -3.500000000000e+00 -1.070059433246e-04 0.000000000000e+00 1.070059271289e-04 1.619567952607e-11 -4.000000000000e+00 -1.076379101651e-04 0.000000000000e+00 1.076378939689e-04 1.619617952608e-11 -4.500000000000e+00 -1.078276862733e-04 0.000000000000e+00 1.078276700766e-04 1.619667952966e-11 -5.000000000000e+00 -1.078880863876e-04 0.000000000000e+00 1.078880701904e-04 1.619718005812e-11 -5.500000000000e+00 -1.079289215390e-04 0.000000000000e+00 1.079289053413e-04 1.619770511748e-11 -6.000000000000e+00 -1.079652585656e-04 0.000000000000e+00 1.079652423669e-04 1.619874260900e-11 -6.500000000000e+00 -1.079989330071e-04 0.000000000000e+00 1.079989168013e-04 1.620572042128e-11 -7.000000000000e+00 -1.080305508581e-04 0.000000000000e+00 1.080305346011e-04 1.625692602409e-11 -7.500000000000e+00 -1.080604910776e-04 0.000000000000e+00 1.080604745351e-04 1.654249826727e-11 -8.000000000000e+00 -1.080890323989e-04 0.000000000000e+00 1.080890146188e-04 1.778011571666e-11 -8.500000000000e+00 -1.081163900348e-04 0.000000000000e+00 1.081163678852e-04 2.214957067771e-11 -9.000000000000e+00 -1.081427362792e-04 0.000000000000e+00 1.081427010660e-04 3.521324112563e-11 -9.500000000000e+00 -1.081682160923e-04 0.000000000000e+00 1.081681467956e-04 6.929675136814e-11 -1.000000000000e+01 -1.081929608583e-04 0.000000000000e+00 1.081928121266e-04 1.487316968665e-10 -1.050000000000e+01 -1.082171018011e-04 0.000000000000e+00 1.082167846266e-04 3.171744519571e-10 -1.100000000000e+01 -1.082407837705e-04 0.000000000000e+00 1.082401368139e-04 6.469566778163e-10 -1.150000000000e+01 -1.082641795856e-04 0.000000000000e+00 1.082629294293e-04 1.250156267646e-09 -1.200000000000e+01 -1.082875047384e-04 0.000000000000e+00 1.082852138811e-04 2.290857292466e-09 -1.250000000000e+01 -1.083110320217e-04 0.000000000000e+00 1.083070340935e-04 3.997928171100e-09 -1.300000000000e+01 -1.083351055212e-04 0.000000000000e+00 1.083284279222e-04 6.677599022815e-09 -1.350000000000e+01 -1.083601534031e-04 0.000000000000e+00 1.083494282500e-04 1.072515315411e-08 -1.400000000000e+01 -1.083866989883e-04 0.000000000000e+00 1.083700638445e-04 1.663514381270e-08 -1.450000000000e+01 -1.084153697186e-04 0.000000000000e+00 1.083903600369e-04 2.500968177229e-08 -1.500000000000e+01 -1.084469037528e-04 0.000000000000e+00 1.084103392633e-04 3.656448950633e-08 -1.550000000000e+01 -1.084821540681e-04 0.000000000000e+00 1.084300215025e-04 5.213256561304e-08 -1.600000000000e+01 -1.085220900675e-04 0.000000000000e+00 1.084494246313e-04 7.266543617987e-08 -1.650000000000e+01 -1.085677967971e-04 0.000000000000e+00 1.084685647165e-04 9.923208057096e-08 -1.700000000000e+01 -1.086204719610e-04 0.000000000000e+00 1.084874562564e-04 1.330157046451e-07 -1.750000000000e+01 -1.086814209770e-04 0.000000000000e+00 1.085061123822e-04 1.753085947948e-07 -1.800000000000e+01 -1.087520503506e-04 0.000000000000e+00 1.085245450270e-04 2.275053236346e-07 -1.850000000000e+01 -1.088338596648e-04 0.000000000000e+00 1.085427650688e-04 2.910945959938e-07 -1.900000000000e+01 -1.089284324780e-04 0.000000000000e+00 1.085607824521e-04 3.676500258808e-07 -1.950000000000e+01 -1.090374264171e-04 0.000000000000e+00 1.085786062921e-04 4.588201250325e-07 -2.000000000000e+01 -1.091625627293e-04 0.000000000000e+00 1.085962449643e-04 5.663177649982e-07 -1.000000000000e+00 -1.415229106041e-04 0.000000000000e+00 1.415228944109e-04 1.619317952605e-11 -1.500000000000e+00 -2.007623549463e-04 0.000000000000e+00 2.007623387527e-04 1.619367952607e-11 -2.000000000000e+00 -2.526645040776e-04 0.000000000000e+00 2.526644878834e-04 1.619417952607e-11 -2.500000000000e+00 -2.976686798259e-04 0.000000000000e+00 2.976686636313e-04 1.619467952607e-11 -3.000000000000e+00 -3.363126965936e-04 0.000000000000e+00 3.363126803985e-04 1.619517952607e-11 -3.500000000000e+00 -3.691935610895e-04 0.000000000000e+00 3.691935448939e-04 1.619567952607e-11 -4.000000000000e+00 -3.969334494913e-04 0.000000000000e+00 3.969334332951e-04 1.619617952607e-11 -4.500000000000e+00 -4.201521317938e-04 0.000000000000e+00 4.201521155971e-04 1.619667952607e-11 -5.000000000000e+00 -4.394459755772e-04 0.000000000000e+00 4.394459593800e-04 1.619717952607e-11 -5.500000000000e+00 -4.553730920067e-04 0.000000000000e+00 4.553730758090e-04 1.619767952607e-11 -6.000000000000e+00 -4.684437866565e-04 0.000000000000e+00 4.684437704583e-04 1.619817952607e-11 -6.500000000000e+00 -4.791153071399e-04 0.000000000000e+00 4.791152909412e-04 1.619867952607e-11 -7.000000000000e+00 -4.877899529439e-04 0.000000000000e+00 4.877899367447e-04 1.619917952607e-11 -7.500000000000e+00 -4.948158021137e-04 0.000000000000e+00 4.948157859140e-04 1.619967952607e-11 -8.000000000000e+00 -5.004894563880e-04 0.000000000000e+00 5.004894401878e-04 1.620017952624e-11 -8.500000000000e+00 -5.050602531673e-04 0.000000000000e+00 5.050602369666e-04 1.620067957792e-11 -9.000000000000e+00 -5.087353943071e-04 0.000000000000e+00 5.087353781059e-04 1.620118390808e-11 -9.500000000000e+00 -5.116854438214e-04 0.000000000000e+00 5.116854276195e-04 1.620182817463e-11 -1.000000000000e+01 -5.140498109949e-04 0.000000000000e+00 5.140497947901e-04 1.620479459007e-11 -1.050000000000e+01 -5.159418240148e-04 0.000000000000e+00 5.159418077839e-04 1.623091756328e-11 -1.100000000000e+01 -5.174532811567e-04 0.000000000000e+00 5.174532647435e-04 1.641323338366e-11 -1.150000000000e+01 -5.186583787147e-04 0.000000000000e+00 5.186583613430e-04 1.737166835235e-11 -1.200000000000e+01 -5.196170263174e-04 0.000000000000e+00 5.196170049613e-04 2.135608746926e-11 -1.250000000000e+01 -5.203775995231e-04 0.000000000000e+00 5.203775644755e-04 3.504760519081e-11 -1.300000000000e+01 -5.209792008836e-04 0.000000000000e+00 5.209791255768e-04 7.530687582042e-11 -1.350000000000e+01 -5.214535065388e-04 0.000000000000e+00 5.214533271643e-04 1.793744310243e-10 -1.400000000000e+01 -5.218262723135e-04 0.000000000000e+00 5.218258513904e-04 4.209231323231e-10 -1.450000000000e+01 -5.221185656428e-04 0.000000000000e+00 5.221176327348e-04 9.329080158211e-10 -1.500000000000e+01 -5.223477798333e-04 0.000000000000e+00 5.223458423911e-04 1.937442243051e-09 -1.550000000000e+01 -5.225284753722e-04 0.000000000000e+00 5.225246932650e-04 3.782107200228e-09 -1.600000000000e+01 -5.226730755200e-04 0.000000000000e+00 5.226660941749e-04 6.981345029185e-09 -1.650000000000e+01 -5.227924077824e-04 0.000000000000e+00 5.227801467735e-04 1.226100889356e-08 -1.700000000000e+01 -5.228960066594e-04 0.000000000000e+00 5.228754028306e-04 2.060382881734e-08 -1.750000000000e+01 -5.229920371893e-04 0.000000000000e+00 5.229587436852e-04 3.329350408038e-08 -1.800000000000e+01 -5.230869883475e-04 0.000000000000e+00 5.230350330385e-04 5.195530904100e-08 -1.850000000000e+01 -5.231857435169e-04 0.000000000000e+00 5.231071521313e-04 7.859138566881e-08 -1.900000000000e+01 -5.232921915183e-04 0.000000000000e+00 5.231765822694e-04 1.156092488514e-07 -1.950000000000e+01 -5.234098885969e-04 0.000000000000e+00 5.232440461214e-04 1.658424755127e-07 -2.000000000000e+01 -5.235424729894e-04 0.000000000000e+00 5.233099099802e-04 2.325630091983e-07 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_cosym.standard0000644000265600020320000000753512264261473024206 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 7.4415968748753e-14 7.37118661909875e-14 5.83306292699835e-15 1258.925411794 7.44159687487515e-14 7.37118661909863e-14 5.83306292699655e-15 1584.893192461 7.44159687487271e-14 7.37118661909466e-14 5.83306292699306e-15 1995.262314969 7.44159687486847e-14 7.37118661908944e-14 5.83306292698712e-15 2511.88643151 7.44159687486274e-14 7.37118661908379e-14 5.83306292697853e-15 3162.277660168 7.44159687485394e-14 7.37118661907028e-14 5.83306292696804e-15 3981.071705535 7.44159687484183e-14 7.37118661905132e-14 5.83306292694727e-15 5011.872336273 7.44159687481867e-14 7.37118661902448e-14 5.83306292691523e-15 6309.573444802 7.44159687478491e-14 7.37118661897872e-14 5.83306292686709e-15 7943.282347243 7.44159687472881e-14 7.37118661890524e-14 5.83306292678778e-15 10000 7.44159687464134e-14 7.37118661878998e-14 5.83306292666254e-15 12589.25411794 7.44159687450473e-14 7.37118661860938e-14 5.83306292646431e-15 15848.93192461 7.44159687428425e-14 7.37118661832042e-14 5.83306292614953e-15 19952.62314969 7.441596873936e-14 7.37118661786184e-14 5.83306292565023e-15 25118.8643151 7.44159687338644e-14 7.37118661713861e-14 5.83306292485911e-15 31622.77660168 7.44159687251363e-14 7.37118661599013e-14 5.83306292361108e-15 39810.71705535 7.44159687112788e-14 7.37118661416601e-14 5.83306292162221e-15 50118.72336273 7.44159686893436e-14 7.37118661127929e-14 5.83306291847778e-15 63095.73444802 7.44159686545695e-14 7.37118660670203e-14 5.83306291349314e-15 79432.82347243 7.44159685994594e-14 7.37118659944987e-14 5.83306290559125e-15 100000 7.44159685121373e-14 7.37118658795531e-14 5.8330628930697e-15 125892.5411794 7.44159683737355e-14 7.37118656973871e-14 5.83306287322453e-15 158489.3192461 7.44159681543614e-14 7.37118654086649e-14 5.83306284177064e-15 199526.2314969 7.44159678066751e-14 7.3711864951053e-14 5.83306279191943e-15 251188.643151 7.44159672556587e-14 7.37118642257684e-14 5.83306271290989e-15 316227.7660168 7.44159663823618e-14 7.37118630763814e-14 5.83306258769379e-15 398107.1705535 7.44159649982101e-14 7.371186125464e-14 5.83306238923233e-15 501187.2336273 7.44159628045254e-14 7.37118583673515e-14 5.83306207469375e-15 630957.3444802 7.4415959327762e-14 7.37118537913592e-14 5.83306157618341e-15 794328.2347243 7.44159538174702e-14 7.37118465388943e-14 5.83306078610065e-15 1000000 7.44159450842432e-14 7.37118350445083e-14 5.8330595339025e-15 1258925.411794 7.44159312430387e-14 7.37118168271485e-14 5.83305754930521e-15 1584893.192461 7.44159093062044e-14 7.37117879545936e-14 5.83305440393058e-15 1995262.314969 7.4415874538721e-14 7.37117421947436e-14 5.83304941885642e-15 2511886.43151 7.44158194361032e-14 7.37116696704558e-14 5.83304151806592e-15 3162277.660168 7.44157321047111e-14 7.3711554727669e-14 5.83302899620604e-15 3981071.705535 7.44155936945767e-14 7.37113725566611e-14 5.83300915051205e-15 5011872.336273 7.44153743313769e-14 7.37110838378433e-14 5.83297769750727e-15 6309573.444802 7.4415026669438e-14 7.37106262562726e-14 5.83292784860819e-15 7943282.347243 7.44144756755297e-14 7.3709901055727e-14 5.83284884531561e-15 10000000 7.44136024421787e-14 7.37087517338859e-14 5.83272363828478e-15 12589254.11794 7.44122185437579e-14 7.37069302909988e-14 5.83252521043907e-15 15848931.92461 7.44100254214481e-14 7.37040437735155e-14 5.83221075344951e-15 19952623.14969 7.44065500814743e-14 7.3699469642107e-14 5.83171244793173e-15 25118864.3151 7.44010433562473e-14 7.36922218663509e-14 5.8309228758083e-15 31622776.60168 7.43923190926891e-14 7.36807392694126e-14 5.82967196259703e-15 39810717.05535 7.437850036906e-14 7.36625515070442e-14 5.82769058918263e-15 50118723.36273 7.43566199980478e-14 7.36337532619104e-14 5.82455331061279e-15 63095734.44802 7.43219941713873e-14 7.3588179855423e-14 5.8195885472708e-15 79432823.47243 7.4267246727299e-14 7.35161230190577e-14 5.81173868115076e-15 100000000 7.41808048723173e-14 7.34023510119623e-14 5.7993443675922e-15 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Id1_vb0_jd.standard0000644000265600020320000010243012264261473024402 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.131291551496e-05 0.000000000000e+00 2.131291551395e-05 1.010000000000e-15 -1.500000000000e+00 -2.141817876378e-05 0.000000000000e+00 2.141817876227e-05 1.510000000000e-15 -2.000000000000e+00 -2.150848642946e-05 0.000000000000e+00 2.150848642745e-05 2.010000000000e-15 -2.500000000000e+00 -2.159127235587e-05 0.000000000000e+00 2.159127235336e-05 2.510000000000e-15 -3.000000000000e+00 -2.166932108003e-05 0.000000000000e+00 2.166932107702e-05 3.010000000000e-15 -3.500000000000e+00 -2.174402503530e-05 0.000000000000e+00 2.174402503179e-05 3.510000000000e-15 -4.000000000000e+00 -2.181620424661e-05 0.000000000000e+00 2.181620424260e-05 4.010000000000e-15 -4.500000000000e+00 -2.188639255234e-05 0.000000000000e+00 2.188639254783e-05 4.510000000000e-15 -5.000000000000e+00 -2.195496158728e-05 0.000000000000e+00 2.195496158227e-05 5.010000000000e-15 -5.500000000000e+00 -2.202218280767e-05 0.000000000000e+00 2.202218280216e-05 5.510000000000e-15 -6.000000000000e+00 -2.208826181972e-05 0.000000000000e+00 2.208826181371e-05 6.010000000000e-15 -6.500000000000e+00 -2.215335884562e-05 0.000000000000e+00 2.215335883911e-05 6.510000000000e-15 -7.000000000000e+00 -2.221760164035e-05 0.000000000000e+00 2.221760163334e-05 7.010000000000e-15 -7.500000000000e+00 -2.228109401994e-05 0.000000000000e+00 2.228109401243e-05 7.510000000000e-15 -8.000000000000e+00 -2.234392170256e-05 0.000000000000e+00 2.234392169455e-05 8.010000000000e-15 -8.500000000000e+00 -2.240615643284e-05 0.000000000000e+00 2.240615642433e-05 8.510000000000e-15 -9.000000000000e+00 -2.246785896989e-05 0.000000000000e+00 2.246785896088e-05 9.010000000000e-15 -9.500000000000e+00 -2.252908130038e-05 0.000000000000e+00 2.252908129087e-05 9.510000000000e-15 -1.000000000000e+01 -2.258986830941e-05 0.000000000000e+00 2.258986829940e-05 1.001000000000e-14 -1.050000000000e+01 -2.265025906320e-05 0.000000000000e+00 2.265025905269e-05 1.051000000000e-14 -1.100000000000e+01 -2.271028780873e-05 0.000000000000e+00 2.271028779772e-05 1.101000000000e-14 -1.150000000000e+01 -2.276998476298e-05 0.000000000000e+00 2.276998475147e-05 1.151000000000e-14 -1.200000000000e+01 -2.282937674357e-05 0.000000000000e+00 2.282937673156e-05 1.201000000000e-14 -1.250000000000e+01 -2.288848767813e-05 0.000000000000e+00 2.288848766562e-05 1.251000000000e-14 -1.300000000000e+01 -2.294733901966e-05 0.000000000000e+00 2.294733900665e-05 1.301000000000e-14 -1.350000000000e+01 -2.300595008832e-05 0.000000000000e+00 2.300595007481e-05 1.351000000000e-14 -1.400000000000e+01 -2.306433835491e-05 0.000000000000e+00 2.306433834090e-05 1.401000000000e-14 -1.450000000000e+01 -2.312251967779e-05 0.000000000000e+00 2.312251966328e-05 1.451000000000e-14 -1.500000000000e+01 -2.318050850224e-05 0.000000000000e+00 2.318050848723e-05 1.501000000000e-14 -1.550000000000e+01 -2.323831802928e-05 0.000000000000e+00 2.323831801377e-05 1.551000000000e-14 -1.600000000000e+01 -2.329596035948e-05 0.000000000000e+00 2.329596034347e-05 1.601000000000e-14 -1.650000000000e+01 -2.335344661612e-05 0.000000000000e+00 2.335344659961e-05 1.651000000000e-14 -1.700000000000e+01 -2.341078705127e-05 0.000000000000e+00 2.341078703426e-05 1.701000000000e-14 -1.750000000000e+01 -2.346799113753e-05 0.000000000000e+00 2.346799112002e-05 1.751000000000e-14 -1.800000000000e+01 -2.352506764773e-05 0.000000000000e+00 2.352506762972e-05 1.801000000000e-14 -1.850000000000e+01 -2.358202472451e-05 0.000000000000e+00 2.358202470600e-05 1.851000000000e-14 -1.900000000000e+01 -2.363886994130e-05 0.000000000000e+00 2.363886992229e-05 1.901000000000e-14 -1.950000000000e+01 -2.369561035586e-05 0.000000000000e+00 2.369561033635e-05 1.951000000000e-14 -2.000000000000e+01 -2.375225255768e-05 0.000000000000e+00 2.375225253767e-05 2.001000000000e-14 -1.000000000000e+00 -3.124511566870e-04 0.000000000000e+00 3.124511566859e-04 1.010000000000e-15 -1.500000000000e+00 -4.122393106696e-04 0.000000000000e+00 4.122393106681e-04 1.510000000000e-15 -2.000000000000e+00 -4.805607795687e-04 0.000000000000e+00 4.805607795667e-04 2.010000000000e-15 -2.500000000000e+00 -5.241688429084e-04 0.000000000000e+00 5.241688429059e-04 2.510000000000e-15 -3.000000000000e+00 -5.497343764047e-04 0.000000000000e+00 5.497343764017e-04 3.010000000000e-15 -3.500000000000e+00 -5.631550759090e-04 0.000000000000e+00 5.631550759055e-04 3.510000000000e-15 -4.000000000000e+00 -5.691216500222e-04 0.000000000000e+00 5.691216500182e-04 4.010000000000e-15 -4.500000000000e+00 -5.711710278195e-04 0.000000000000e+00 5.711710278150e-04 4.510000000000e-15 -5.000000000000e+00 -5.720991042402e-04 0.000000000000e+00 5.720991042352e-04 5.010000000000e-15 -5.500000000000e+00 -5.729045883799e-04 0.000000000000e+00 5.729045883743e-04 5.510000000000e-15 -6.000000000000e+00 -5.736452204736e-04 0.000000000000e+00 5.736452204676e-04 6.010000000000e-15 -6.500000000000e+00 -5.743337345107e-04 0.000000000000e+00 5.743337345042e-04 6.510000000000e-15 -7.000000000000e+00 -5.749798835438e-04 0.000000000000e+00 5.749798835368e-04 7.010000000000e-15 -7.500000000000e+00 -5.755912759013e-04 0.000000000000e+00 5.755912758938e-04 7.510000000000e-15 -8.000000000000e+00 -5.761738237705e-04 0.000000000000e+00 5.761738237625e-04 8.010000000000e-15 -8.500000000000e+00 -5.767321365431e-04 0.000000000000e+00 5.767321365346e-04 8.510000000000e-15 -9.000000000000e+00 -5.772698359866e-04 0.000000000000e+00 5.772698359776e-04 9.010000000000e-15 -9.500000000000e+00 -5.777897968481e-04 0.000000000000e+00 5.777897968386e-04 9.510000000000e-15 -1.000000000000e+01 -5.782943266142e-04 0.000000000000e+00 5.782943266042e-04 1.001000000000e-14 -1.050000000000e+01 -5.787852988174e-04 0.000000000000e+00 5.787852988069e-04 1.051000000000e-14 -1.100000000000e+01 -5.792642519278e-04 0.000000000000e+00 5.792642519168e-04 1.101000000000e-14 -1.150000000000e+01 -5.797324630650e-04 0.000000000000e+00 5.797324630535e-04 1.151000000000e-14 -1.200000000000e+01 -5.801910033451e-04 0.000000000000e+00 5.801910033331e-04 1.201000000000e-14 -1.250000000000e+01 -5.806407797999e-04 0.000000000000e+00 5.806407797873e-04 1.251000000000e-14 -1.300000000000e+01 -5.810825674263e-04 0.000000000000e+00 5.810825674133e-04 1.301000000000e-14 -1.350000000000e+01 -5.815170339285e-04 0.000000000000e+00 5.815170339150e-04 1.351000000000e-14 -1.400000000000e+01 -5.819447590032e-04 0.000000000000e+00 5.819447589892e-04 1.401000000000e-14 -1.450000000000e+01 -5.823662495168e-04 0.000000000000e+00 5.823662495022e-04 1.451000000000e-14 -1.500000000000e+01 -5.827819515578e-04 0.000000000000e+00 5.827819515428e-04 1.501000000000e-14 -1.550000000000e+01 -5.831922600963e-04 0.000000000000e+00 5.831922600807e-04 1.551000000000e-14 -1.600000000000e+01 -5.835975267883e-04 0.000000000000e+00 5.835975267723e-04 1.601000000000e-14 -1.650000000000e+01 -5.839980663356e-04 0.000000000000e+00 5.839980663191e-04 1.651000000000e-14 -1.700000000000e+01 -5.843941617060e-04 0.000000000000e+00 5.843941616890e-04 1.701000000000e-14 -1.750000000000e+01 -5.847860684512e-04 0.000000000000e+00 5.847860684337e-04 1.751000000000e-14 -1.800000000000e+01 -5.851740183027e-04 0.000000000000e+00 5.851740182847e-04 1.801000000000e-14 -1.850000000000e+01 -5.855582221856e-04 0.000000000000e+00 5.855582221671e-04 1.851000000000e-14 -1.900000000000e+01 -5.859388727608e-04 0.000000000000e+00 5.859388727418e-04 1.901000000000e-14 -1.950000000000e+01 -5.863161465817e-04 0.000000000000e+00 5.863161465622e-04 1.951000000000e-14 -2.000000000000e+01 -5.866902059340e-04 0.000000000000e+00 5.866902059140e-04 2.001000000000e-14 -1.000000000000e+00 -5.105119247563e-04 0.000000000000e+00 5.105119247553e-04 1.010000000000e-15 -1.500000000000e+00 -7.233916278997e-04 0.000000000000e+00 7.233916278981e-04 1.510000000000e-15 -2.000000000000e+00 -9.115217003198e-04 0.000000000000e+00 9.115217003178e-04 2.010000000000e-15 -2.500000000000e+00 -1.077926093746e-03 0.000000000000e+00 1.077926093744e-03 2.510000000000e-15 -3.000000000000e+00 -1.225358437873e-03 0.000000000000e+00 1.225358437870e-03 3.010000000000e-15 -3.500000000000e+00 -1.356203959495e-03 0.000000000000e+00 1.356203959492e-03 3.510000000000e-15 -4.000000000000e+00 -1.472493954239e-03 0.000000000000e+00 1.472493954235e-03 4.010000000000e-15 -4.500000000000e+00 -1.575953041373e-03 0.000000000000e+00 1.575953041368e-03 4.510000000000e-15 -5.000000000000e+00 -1.668050277114e-03 0.000000000000e+00 1.668050277109e-03 5.010000000000e-15 -5.500000000000e+00 -1.750044954664e-03 0.000000000000e+00 1.750044954658e-03 5.510000000000e-15 -6.000000000000e+00 -1.823025006705e-03 0.000000000000e+00 1.823025006699e-03 6.010000000000e-15 -6.500000000000e+00 -1.887938298957e-03 0.000000000000e+00 1.887938298950e-03 6.510000000000e-15 -7.000000000000e+00 -1.945617776796e-03 0.000000000000e+00 1.945617776789e-03 7.010000000000e-15 -7.500000000000e+00 -1.996801510492e-03 0.000000000000e+00 1.996801510484e-03 7.510000000000e-15 -8.000000000000e+00 -2.042148582463e-03 0.000000000000e+00 2.042148582455e-03 8.010000000000e-15 -8.500000000000e+00 -2.082251615162e-03 0.000000000000e+00 2.082251615154e-03 8.510000000000e-15 -9.000000000000e+00 -2.117646597760e-03 0.000000000000e+00 2.117646597751e-03 9.010000000000e-15 -9.500000000000e+00 -2.148820547130e-03 0.000000000000e+00 2.148820547121e-03 9.510000000000e-15 -1.000000000000e+01 -2.176217437302e-03 0.000000000000e+00 2.176217437292e-03 1.001000000000e-14 -1.050000000000e+01 -2.200242753028e-03 0.000000000000e+00 2.200242753017e-03 1.051000000000e-14 -1.100000000000e+01 -2.221266967071e-03 0.000000000000e+00 2.221266967060e-03 1.101000000000e-14 -1.150000000000e+01 -2.239628203556e-03 0.000000000000e+00 2.239628203545e-03 1.151000000000e-14 -1.200000000000e+01 -2.255634323416e-03 0.000000000000e+00 2.255634323404e-03 1.201000000000e-14 -1.250000000000e+01 -2.269564642779e-03 0.000000000000e+00 2.269564642767e-03 1.251000000000e-14 -1.300000000000e+01 -2.281671463077e-03 0.000000000000e+00 2.281671463064e-03 1.301000000000e-14 -1.350000000000e+01 -2.292181550053e-03 0.000000000000e+00 2.292181550039e-03 1.351000000000e-14 -1.400000000000e+01 -2.301297650956e-03 0.000000000000e+00 2.301297650942e-03 1.401000000000e-14 -1.450000000000e+01 -2.309200091986e-03 0.000000000000e+00 2.309200091972e-03 1.451000000000e-14 -1.500000000000e+01 -2.316048481289e-03 0.000000000000e+00 2.316048481274e-03 1.501000000000e-14 -1.550000000000e+01 -2.321983349799e-03 0.000000000000e+00 2.321983349783e-03 1.551000000000e-14 -1.600000000000e+01 -2.327128067722e-03 0.000000000000e+00 2.327128067706e-03 1.601000000000e-14 -1.650000000000e+01 -2.331590463188e-03 0.000000000000e+00 2.331590463171e-03 1.651000000000e-14 -1.700000000000e+01 -2.335464528145e-03 0.000000000000e+00 2.335464528128e-03 1.701000000000e-14 -1.750000000000e+01 -2.338832001476e-03 0.000000000000e+00 2.338832001458e-03 1.751000000000e-14 -1.800000000000e+01 -2.341763841957e-03 0.000000000000e+00 2.341763841939e-03 1.801000000000e-14 -1.850000000000e+01 -2.344321580969e-03 0.000000000000e+00 2.344321580950e-03 1.851000000000e-14 -1.900000000000e+01 -2.346558553250e-03 0.000000000000e+00 2.346558553231e-03 1.901000000000e-14 -1.950000000000e+01 -2.348521011328e-03 0.000000000000e+00 2.348521011308e-03 1.951000000000e-14 -2.000000000000e+01 -2.350249135940e-03 0.000000000000e+00 2.350249135920e-03 2.001000000000e-14 -1.000000000000e+00 -1.703276951058e-05 0.000000000000e+00 1.703276950958e-05 1.000000000751e-15 -1.500000000000e+00 -1.712886427078e-05 0.000000000000e+00 1.712886426928e-05 1.500000000751e-15 -2.000000000000e+00 -1.721361927462e-05 0.000000000000e+00 1.721361927262e-05 2.000000000751e-15 -2.500000000000e+00 -1.729264152510e-05 0.000000000000e+00 1.729264152260e-05 2.500000000751e-15 -3.000000000000e+00 -1.736802961540e-05 0.000000000000e+00 1.736802961240e-05 3.000000000751e-15 -3.500000000000e+00 -1.744084214026e-05 0.000000000000e+00 1.744084213676e-05 3.500000000751e-15 -4.000000000000e+00 -1.751170845579e-05 0.000000000000e+00 1.751170845179e-05 4.000000000751e-15 -4.500000000000e+00 -1.758104161926e-05 0.000000000000e+00 1.758104161476e-05 4.500000000751e-15 -5.000000000000e+00 -1.764913108254e-05 0.000000000000e+00 1.764913107754e-05 5.000000000751e-15 -5.500000000000e+00 -1.771618938884e-05 0.000000000000e+00 1.771618938334e-05 5.500000000751e-15 -6.000000000000e+00 -1.778237820383e-05 0.000000000000e+00 1.778237819783e-05 6.000000000751e-15 -6.500000000000e+00 -1.784782393848e-05 0.000000000000e+00 1.784782393198e-05 6.500000000751e-15 -7.000000000000e+00 -1.791262766781e-05 0.000000000000e+00 1.791262766081e-05 7.000000000751e-15 -7.500000000000e+00 -1.797687171394e-05 0.000000000000e+00 1.797687170644e-05 7.500000000751e-15 -8.000000000000e+00 -1.804062417523e-05 0.000000000000e+00 1.804062416723e-05 8.000000000751e-15 -8.500000000000e+00 -1.810394213700e-05 0.000000000000e+00 1.810394212850e-05 8.500000000751e-15 -9.000000000000e+00 -1.816687400565e-05 0.000000000000e+00 1.816687399665e-05 9.000000000751e-15 -9.500000000000e+00 -1.822946124267e-05 0.000000000000e+00 1.822946123317e-05 9.500000000751e-15 -1.000000000000e+01 -1.829173967728e-05 0.000000000000e+00 1.829173966728e-05 1.000000000075e-14 -1.050000000000e+01 -1.835374051654e-05 0.000000000000e+00 1.835374050604e-05 1.050000000075e-14 -1.100000000000e+01 -1.841549113410e-05 0.000000000000e+00 1.841549112310e-05 1.100000000075e-14 -1.150000000000e+01 -1.847701569422e-05 0.000000000000e+00 1.847701568272e-05 1.150000000075e-14 -1.200000000000e+01 -1.853833565111e-05 0.000000000000e+00 1.853833563911e-05 1.200000000075e-14 -1.250000000000e+01 -1.859947015288e-05 0.000000000000e+00 1.859947014038e-05 1.250000000075e-14 -1.300000000000e+01 -1.866043637141e-05 0.000000000000e+00 1.866043635841e-05 1.300000000075e-14 -1.350000000000e+01 -1.872124977405e-05 0.000000000000e+00 1.872124976055e-05 1.350000000075e-14 -1.400000000000e+01 -1.878192434927e-05 0.000000000000e+00 1.878192433527e-05 1.400000000075e-14 -1.450000000000e+01 -1.884247279540e-05 0.000000000000e+00 1.884247278090e-05 1.450000000075e-14 -1.500000000000e+01 -1.890290667959e-05 0.000000000000e+00 1.890290666459e-05 1.500000000075e-14 -1.550000000000e+01 -1.896323657252e-05 0.000000000000e+00 1.896323655703e-05 1.550000000075e-14 -1.600000000000e+01 -1.902347216330e-05 0.000000000000e+00 1.902347214730e-05 1.600000000075e-14 -1.650000000000e+01 -1.908362235782e-05 0.000000000000e+00 1.908362234132e-05 1.650000000075e-14 -1.700000000000e+01 -1.914369536360e-05 0.000000000000e+00 1.914369534660e-05 1.700000000075e-14 -1.750000000000e+01 -1.920369876318e-05 0.000000000000e+00 1.920369874568e-05 1.750000000075e-14 -1.800000000000e+01 -1.926363957792e-05 0.000000000000e+00 1.926363955992e-05 1.800000000075e-14 -1.850000000000e+01 -1.932352432372e-05 0.000000000000e+00 1.932352430522e-05 1.850000000075e-14 -1.900000000000e+01 -1.938335905983e-05 0.000000000000e+00 1.938335904083e-05 1.900000000075e-14 -1.950000000000e+01 -1.944314943183e-05 0.000000000000e+00 1.944314941233e-05 1.950000000075e-14 -2.000000000000e+01 -1.950290070954e-05 0.000000000000e+00 1.950290068954e-05 2.000000000075e-14 -1.000000000000e+00 -4.014942345805e-04 0.000000000000e+00 4.014942345795e-04 1.000000000751e-15 -1.500000000000e+00 -5.329739479647e-04 0.000000000000e+00 5.329739479632e-04 1.500000000751e-15 -2.000000000000e+00 -6.254672582555e-04 0.000000000000e+00 6.254672582535e-04 2.000000000751e-15 -2.500000000000e+00 -6.864547870933e-04 0.000000000000e+00 6.864547870908e-04 2.500000000751e-15 -3.000000000000e+00 -7.234390715391e-04 0.000000000000e+00 7.234390715361e-04 3.000000000751e-15 -3.500000000000e+00 -7.433975775222e-04 0.000000000000e+00 7.433975775187e-04 3.500000000751e-15 -4.000000000000e+00 -7.522777143309e-04 0.000000000000e+00 7.522777143269e-04 4.000000000751e-15 -4.500000000000e+00 -7.549933905648e-04 0.000000000000e+00 7.549933905603e-04 4.500000000751e-15 -5.000000000000e+00 -7.561590245118e-04 0.000000000000e+00 7.561590245068e-04 5.000000000751e-15 -5.500000000000e+00 -7.572003747507e-04 0.000000000000e+00 7.572003747452e-04 5.500000000751e-15 -6.000000000000e+00 -7.581526366109e-04 0.000000000000e+00 7.581526366049e-04 6.000000000751e-15 -6.500000000000e+00 -7.590325526035e-04 0.000000000000e+00 7.590325525970e-04 6.500000000751e-15 -7.000000000000e+00 -7.598537356070e-04 0.000000000000e+00 7.598537356000e-04 7.000000000751e-15 -7.500000000000e+00 -7.606269445335e-04 0.000000000000e+00 7.606269445260e-04 7.500000000751e-15 -8.000000000000e+00 -7.613605817400e-04 0.000000000000e+00 7.613605817320e-04 8.000000000751e-15 -8.500000000000e+00 -7.620612012040e-04 0.000000000000e+00 7.620612011955e-04 8.500000000751e-15 -9.000000000000e+00 -7.627339406889e-04 0.000000000000e+00 7.627339406799e-04 9.000000000751e-15 -9.500000000000e+00 -7.633828617698e-04 0.000000000000e+00 7.633828617603e-04 9.500000000751e-15 -1.000000000000e+01 -7.640112080131e-04 0.000000000000e+00 7.640112080031e-04 1.000000000075e-14 -1.050000000000e+01 -7.646215980573e-04 0.000000000000e+00 7.646215980468e-04 1.050000000075e-14 -1.100000000000e+01 -7.652161693962e-04 0.000000000000e+00 7.652161693852e-04 1.100000000075e-14 -1.150000000000e+01 -7.657966856529e-04 0.000000000000e+00 7.657966856414e-04 1.150000000075e-14 -1.200000000000e+01 -7.663646170512e-04 0.000000000000e+00 7.663646170392e-04 1.200000000075e-14 -1.250000000000e+01 -7.669212012316e-04 0.000000000000e+00 7.669212012191e-04 1.250000000075e-14 -1.300000000000e+01 -7.674674896104e-04 0.000000000000e+00 7.674674895974e-04 1.300000000075e-14 -1.350000000000e+01 -7.680043830412e-04 0.000000000000e+00 7.680043830277e-04 1.350000000075e-14 -1.400000000000e+01 -7.685326595038e-04 0.000000000000e+00 7.685326594898e-04 1.400000000075e-14 -1.450000000000e+01 -7.690529958045e-04 0.000000000000e+00 7.690529957900e-04 1.450000000075e-14 -1.500000000000e+01 -7.695659847368e-04 0.000000000000e+00 7.695659847218e-04 1.500000000075e-14 -1.550000000000e+01 -7.700721487728e-04 0.000000000000e+00 7.700721487573e-04 1.550000000075e-14 -1.600000000000e+01 -7.705719510805e-04 0.000000000000e+00 7.705719510645e-04 1.600000000075e-14 -1.650000000000e+01 -7.710658044602e-04 0.000000000000e+00 7.710658044437e-04 1.650000000075e-14 -1.700000000000e+01 -7.715540786500e-04 0.000000000000e+00 7.715540786330e-04 1.700000000075e-14 -1.750000000000e+01 -7.720371063432e-04 0.000000000000e+00 7.720371063257e-04 1.750000000075e-14 -1.800000000000e+01 -7.725151881774e-04 0.000000000000e+00 7.725151881594e-04 1.800000000075e-14 -1.850000000000e+01 -7.729885969005e-04 0.000000000000e+00 7.729885968820e-04 1.850000000075e-14 -1.900000000000e+01 -7.734575808708e-04 0.000000000000e+00 7.734575808518e-04 1.900000000075e-14 -1.950000000000e+01 -7.739223670143e-04 0.000000000000e+00 7.739223669948e-04 1.950000000075e-14 -2.000000000000e+01 -7.743831633388e-04 0.000000000000e+00 7.743831633188e-04 2.000000000075e-14 -1.000000000000e+00 -6.065436261274e-04 0.000000000000e+00 6.065436261264e-04 1.000000000751e-15 -1.500000000000e+00 -8.583891596197e-04 0.000000000000e+00 8.583891596182e-04 1.500000000751e-15 -2.000000000000e+00 -1.081068110972e-03 0.000000000000e+00 1.081068110970e-03 2.000000000751e-15 -2.500000000000e+00 -1.278509218709e-03 0.000000000000e+00 1.278509218707e-03 2.500000000751e-15 -3.000000000000e+00 -1.454149853900e-03 0.000000000000e+00 1.454149853897e-03 3.000000000751e-15 -3.500000000000e+00 -1.610897747296e-03 0.000000000000e+00 1.610897747293e-03 3.500000000751e-15 -4.000000000000e+00 -1.751189408455e-03 0.000000000000e+00 1.751189408451e-03 4.000000000751e-15 -4.500000000000e+00 -1.877066741622e-03 0.000000000000e+00 1.877066741617e-03 4.500000000751e-15 -5.000000000000e+00 -1.990247971218e-03 0.000000000000e+00 1.990247971213e-03 5.000000000751e-15 -5.500000000000e+00 -2.092187336821e-03 0.000000000000e+00 2.092187336815e-03 5.500000000751e-15 -6.000000000000e+00 -2.184123690452e-03 0.000000000000e+00 2.184123690446e-03 6.000000000751e-15 -6.500000000000e+00 -2.267119618618e-03 0.000000000000e+00 2.267119618611e-03 6.500000000751e-15 -7.000000000000e+00 -2.342092869560e-03 0.000000000000e+00 2.342092869553e-03 7.000000000751e-15 -7.500000000000e+00 -2.409841642032e-03 0.000000000000e+00 2.409841642024e-03 7.500000000751e-15 -8.000000000000e+00 -2.471064998074e-03 0.000000000000e+00 2.471064998066e-03 8.000000000751e-15 -8.500000000000e+00 -2.526379394861e-03 0.000000000000e+00 2.526379394852e-03 8.500000000751e-15 -9.000000000000e+00 -2.576332112414e-03 0.000000000000e+00 2.576332112405e-03 9.000000000751e-15 -9.500000000000e+00 -2.621412183454e-03 0.000000000000e+00 2.621412183445e-03 9.500000000751e-15 -1.000000000000e+01 -2.662059300844e-03 0.000000000000e+00 2.662059300834e-03 1.000000000075e-14 -1.050000000000e+01 -2.698671078052e-03 0.000000000000e+00 2.698671078041e-03 1.050000000075e-14 -1.100000000000e+01 -2.731608961372e-03 0.000000000000e+00 2.731608961361e-03 1.100000000075e-14 -1.150000000000e+01 -2.761203033320e-03 0.000000000000e+00 2.761203033309e-03 1.150000000075e-14 -1.200000000000e+01 -2.787755900740e-03 0.000000000000e+00 2.787755900728e-03 1.200000000075e-14 -1.250000000000e+01 -2.811545826003e-03 0.000000000000e+00 2.811545825991e-03 1.250000000075e-14 -1.300000000000e+01 -2.832829233570e-03 0.000000000000e+00 2.832829233557e-03 1.300000000075e-14 -1.350000000000e+01 -2.851842705632e-03 0.000000000000e+00 2.851842705619e-03 1.350000000075e-14 -1.400000000000e+01 -2.868804567843e-03 0.000000000000e+00 2.868804567829e-03 1.400000000075e-14 -1.450000000000e+01 -2.883916157018e-03 0.000000000000e+00 2.883916157003e-03 1.450000000075e-14 -1.500000000000e+01 -2.897362854783e-03 0.000000000000e+00 2.897362854768e-03 1.500000000075e-14 -1.550000000000e+01 -2.909314962150e-03 0.000000000000e+00 2.909314962134e-03 1.550000000075e-14 -1.600000000000e+01 -2.919928478865e-03 0.000000000000e+00 2.919928478849e-03 1.600000000075e-14 -1.650000000000e+01 -2.929345837848e-03 0.000000000000e+00 2.929345837831e-03 1.650000000075e-14 -1.700000000000e+01 -2.937696630284e-03 0.000000000000e+00 2.937696630267e-03 1.700000000075e-14 -1.750000000000e+01 -2.945098371434e-03 0.000000000000e+00 2.945098371416e-03 1.750000000075e-14 -1.800000000000e+01 -2.951657134390e-03 0.000000000000e+00 2.951657134372e-03 1.800000000075e-14 -1.850000000000e+01 -2.957468523513e-03 0.000000000000e+00 2.957468523494e-03 1.850000000075e-14 -1.900000000000e+01 -2.962618319977e-03 0.000000000000e+00 2.962618319958e-03 1.900000000075e-14 -1.950000000000e+01 -2.967183307685e-03 0.000000000000e+00 2.967183307666e-03 1.950000000075e-14 -2.000000000000e+01 -2.971232049410e-03 0.000000000000e+00 2.971232049390e-03 2.000000000075e-14 -1.000000000000e+00 -2.747305760643e-05 0.000000000000e+00 2.747304465169e-05 1.295474362084e-11 -1.500000000000e+00 -2.759530377041e-05 0.000000000000e+00 2.759529081517e-05 1.295524362086e-11 -2.000000000000e+00 -2.769406987815e-05 0.000000000000e+00 2.769405692240e-05 1.295574362086e-11 -2.500000000000e+00 -2.778230879139e-05 0.000000000000e+00 2.778229583515e-05 1.295624362086e-11 -3.000000000000e+00 -2.786407527320e-05 0.000000000000e+00 2.786406231645e-05 1.295674362086e-11 -3.500000000000e+00 -2.794134023852e-05 0.000000000000e+00 2.794132728128e-05 1.295724362086e-11 -4.000000000000e+00 -2.801523969201e-05 0.000000000000e+00 2.801522673427e-05 1.295774362086e-11 -4.500000000000e+00 -2.808650082995e-05 0.000000000000e+00 2.808648787170e-05 1.295824362086e-11 -5.000000000000e+00 -2.815562326673e-05 0.000000000000e+00 2.815561030798e-05 1.295874362086e-11 -5.500000000000e+00 -2.822296815767e-05 0.000000000000e+00 2.822295519843e-05 1.295924362086e-11 -6.000000000000e+00 -2.828880677498e-05 0.000000000000e+00 2.828879381524e-05 1.295974362086e-11 -6.500000000000e+00 -2.835334908378e-05 0.000000000000e+00 2.835333612353e-05 1.296024362086e-11 -7.000000000000e+00 -2.841676157088e-05 0.000000000000e+00 2.841674861014e-05 1.296074362086e-11 -7.500000000000e+00 -2.847917890021e-05 0.000000000000e+00 2.847916593897e-05 1.296124362086e-11 -8.000000000000e+00 -2.854071182763e-05 0.000000000000e+00 2.854069886589e-05 1.296174362086e-11 -8.500000000000e+00 -2.860145274830e-05 0.000000000000e+00 2.860143978606e-05 1.296224362086e-11 -9.000000000000e+00 -2.866147968975e-05 0.000000000000e+00 2.866146672701e-05 1.296274362086e-11 -9.500000000000e+00 -2.872085925266e-05 0.000000000000e+00 2.872084628941e-05 1.296324362086e-11 -1.000000000000e+01 -2.877964882000e-05 0.000000000000e+00 2.877963585626e-05 1.296374362086e-11 -1.050000000000e+01 -2.883789824565e-05 0.000000000000e+00 2.883788528141e-05 1.296424362086e-11 -1.100000000000e+01 -2.889565116494e-05 0.000000000000e+00 2.889563820019e-05 1.296474362086e-11 -1.150000000000e+01 -2.895294602592e-05 0.000000000000e+00 2.895293306067e-05 1.296524362086e-11 -1.200000000000e+01 -2.900981691072e-05 0.000000000000e+00 2.900980394498e-05 1.296574362086e-11 -1.250000000000e+01 -2.906629419705e-05 0.000000000000e+00 2.906628123081e-05 1.296624362086e-11 -1.300000000000e+01 -2.912240509622e-05 0.000000000000e+00 2.912239212948e-05 1.296674362086e-11 -1.350000000000e+01 -2.917817409485e-05 0.000000000000e+00 2.917816112761e-05 1.296724362086e-11 -1.400000000000e+01 -2.923362332042e-05 0.000000000000e+00 2.923361035268e-05 1.296774362086e-11 -1.450000000000e+01 -2.928877284620e-05 0.000000000000e+00 2.928875987795e-05 1.296824362086e-11 -1.500000000000e+01 -2.934364094733e-05 0.000000000000e+00 2.934362797859e-05 1.296874362086e-11 -1.550000000000e+01 -2.939824431740e-05 0.000000000000e+00 2.939823134816e-05 1.296924362086e-11 -1.600000000000e+01 -2.945259825257e-05 0.000000000000e+00 2.945258528282e-05 1.296974362086e-11 -1.650000000000e+01 -2.950671680911e-05 0.000000000000e+00 2.950670383887e-05 1.297024362086e-11 -1.700000000000e+01 -2.956061293887e-05 0.000000000000e+00 2.956059996813e-05 1.297074362086e-11 -1.750000000000e+01 -2.961429860630e-05 0.000000000000e+00 2.961428563506e-05 1.297124362086e-11 -1.800000000000e+01 -2.966778489002e-05 0.000000000000e+00 2.966777191828e-05 1.297174362086e-11 -1.850000000000e+01 -2.972108207142e-05 0.000000000000e+00 2.972106909918e-05 1.297224362086e-11 -1.900000000000e+01 -2.977419971216e-05 0.000000000000e+00 2.977418673942e-05 1.297274362086e-11 -1.950000000000e+01 -2.982714672227e-05 0.000000000000e+00 2.982713374902e-05 1.297324362086e-11 -2.000000000000e+01 -2.987993142022e-05 0.000000000000e+00 2.987991844647e-05 1.297374362086e-11 -1.000000000000e+00 -2.228517434653e-04 0.000000000000e+00 2.228517305106e-04 1.295474362084e-11 -1.500000000000e+00 -2.927122359228e-04 0.000000000000e+00 2.927122229675e-04 1.295524362086e-11 -2.000000000000e+00 -3.398225090081e-04 0.000000000000e+00 3.398224960524e-04 1.295574362086e-11 -2.500000000000e+00 -3.696201207881e-04 0.000000000000e+00 3.696201078318e-04 1.295624362086e-11 -3.000000000000e+00 -3.872620908230e-04 0.000000000000e+00 3.872620778663e-04 1.295674362086e-11 -3.500000000000e+00 -3.970044283723e-04 0.000000000000e+00 3.970044154151e-04 1.295724362086e-11 -4.000000000000e+00 -4.019773043626e-04 0.000000000000e+00 4.019772914048e-04 1.295774362086e-11 -4.500000000000e+00 -4.042911793013e-04 0.000000000000e+00 4.042911663431e-04 1.295824362086e-11 -5.000000000000e+00 -4.053336913266e-04 0.000000000000e+00 4.053336783679e-04 1.295874362086e-11 -5.500000000000e+00 -4.059670827562e-04 0.000000000000e+00 4.059670697970e-04 1.295924362086e-11 -6.000000000000e+00 -4.065079860996e-04 0.000000000000e+00 4.065079731399e-04 1.295974362086e-11 -6.500000000000e+00 -4.070083438043e-04 0.000000000000e+00 4.070083308440e-04 1.296024362086e-11 -7.000000000000e+00 -4.074788905896e-04 0.000000000000e+00 4.074788776288e-04 1.296074362086e-11 -7.500000000000e+00 -4.079252551753e-04 0.000000000000e+00 4.079252422140e-04 1.296124362086e-11 -8.000000000000e+00 -4.083515050697e-04 0.000000000000e+00 4.083514921080e-04 1.296174362086e-11 -8.500000000000e+00 -4.087607698763e-04 0.000000000000e+00 4.087607569141e-04 1.296224362086e-11 -9.000000000000e+00 -4.091555070185e-04 0.000000000000e+00 4.091554940558e-04 1.296274362086e-11 -9.500000000000e+00 -4.095376728895e-04 0.000000000000e+00 4.095376599262e-04 1.296324362086e-11 -1.000000000000e+01 -4.099088446885e-04 0.000000000000e+00 4.099088317247e-04 1.296374362086e-11 -1.050000000000e+01 -4.102703093110e-04 0.000000000000e+00 4.102702963468e-04 1.296424362086e-11 -1.100000000000e+01 -4.106231289139e-04 0.000000000000e+00 4.106231159491e-04 1.296474362086e-11 -1.150000000000e+01 -4.109681897249e-04 0.000000000000e+00 4.109681767596e-04 1.296524362086e-11 -1.200000000000e+01 -4.113062387274e-04 0.000000000000e+00 4.113062257617e-04 1.296574362086e-11 -1.250000000000e+01 -4.116379115089e-04 0.000000000000e+00 4.116378985426e-04 1.296624362086e-11 -1.300000000000e+01 -4.119637536162e-04 0.000000000000e+00 4.119637406495e-04 1.296674362086e-11 -1.350000000000e+01 -4.122842371002e-04 0.000000000000e+00 4.122842241329e-04 1.296724362086e-11 -1.400000000000e+01 -4.125997734596e-04 0.000000000000e+00 4.125997604918e-04 1.296774362086e-11 -1.450000000000e+01 -4.129107238676e-04 0.000000000000e+00 4.129107108993e-04 1.296824362086e-11 -1.500000000000e+01 -4.132174073255e-04 0.000000000000e+00 4.132173943567e-04 1.296874362086e-11 -1.550000000000e+01 -4.135201072226e-04 0.000000000000e+00 4.135200942533e-04 1.296924362086e-11 -1.600000000000e+01 -4.138190766580e-04 0.000000000000e+00 4.138190636883e-04 1.296974362086e-11 -1.650000000000e+01 -4.141145427934e-04 0.000000000000e+00 4.141145298231e-04 1.297024362086e-11 -1.700000000000e+01 -4.144067104393e-04 0.000000000000e+00 4.144066974685e-04 1.297074362086e-11 -1.750000000000e+01 -4.146957650327e-04 0.000000000000e+00 4.146957520615e-04 1.297124362086e-11 -1.800000000000e+01 -4.149818751251e-04 0.000000000000e+00 4.149818621533e-04 1.297174362086e-11 -1.850000000000e+01 -4.152651944747e-04 0.000000000000e+00 4.152651815025e-04 1.297224362086e-11 -1.900000000000e+01 -4.155458638178e-04 0.000000000000e+00 4.155458508450e-04 1.297274362086e-11 -1.950000000000e+01 -4.158240123750e-04 0.000000000000e+00 4.158239994017e-04 1.297324362086e-11 -2.000000000000e+01 -4.160997591413e-04 0.000000000000e+00 4.160997461676e-04 1.297374362086e-11 -1.000000000000e+00 -3.902646009726e-04 0.000000000000e+00 3.902645880178e-04 1.295474362084e-11 -1.500000000000e+00 -5.536270898176e-04 0.000000000000e+00 5.536270768624e-04 1.295524362086e-11 -2.000000000000e+00 -6.977848227062e-04 0.000000000000e+00 6.977848097505e-04 1.295574362086e-11 -2.500000000000e+00 -8.247139224255e-04 0.000000000000e+00 8.247139094693e-04 1.295624362086e-11 -3.000000000000e+00 -9.363362292791e-04 0.000000000000e+00 9.363362163223e-04 1.295674362086e-11 -3.500000000000e+00 -1.034398891719e-03 0.000000000000e+00 1.034398878762e-03 1.295724362086e-11 -4.000000000000e+00 -1.120450120033e-03 0.000000000000e+00 1.120450107075e-03 1.295774362086e-11 -4.500000000000e+00 -1.195852262209e-03 0.000000000000e+00 1.195852249251e-03 1.295824362086e-11 -5.000000000000e+00 -1.261805905731e-03 0.000000000000e+00 1.261805892772e-03 1.295874362086e-11 -5.500000000000e+00 -1.319374474305e-03 0.000000000000e+00 1.319374461345e-03 1.295924362086e-11 -6.000000000000e+00 -1.369505630954e-03 0.000000000000e+00 1.369505617995e-03 1.295974362086e-11 -6.500000000000e+00 -1.413048631885e-03 0.000000000000e+00 1.413048618925e-03 1.296024362086e-11 -7.000000000000e+00 -1.450767885393e-03 0.000000000000e+00 1.450767872432e-03 1.296074362086e-11 -7.500000000000e+00 -1.483353339456e-03 0.000000000000e+00 1.483353326494e-03 1.296124362086e-11 -8.000000000000e+00 -1.511428375654e-03 0.000000000000e+00 1.511428362692e-03 1.296174362086e-11 -8.500000000000e+00 -1.535555822262e-03 0.000000000000e+00 1.535555809300e-03 1.296224362086e-11 -9.000000000000e+00 -1.556242610662e-03 0.000000000000e+00 1.556242597699e-03 1.296274362086e-11 -9.500000000000e+00 -1.573943523532e-03 0.000000000000e+00 1.573943510569e-03 1.296324362086e-11 -1.000000000000e+01 -1.589064419648e-03 0.000000000000e+00 1.589064406685e-03 1.296374362086e-11 -1.050000000000e+01 -1.601965250934e-03 0.000000000000e+00 1.601965237970e-03 1.296424362086e-11 -1.100000000000e+01 -1.612963099888e-03 0.000000000000e+00 1.612963086924e-03 1.296474362086e-11 -1.150000000000e+01 -1.622335363462e-03 0.000000000000e+00 1.622335350497e-03 1.296524362086e-11 -1.200000000000e+01 -1.630323110395e-03 0.000000000000e+00 1.630323097429e-03 1.296574362086e-11 -1.250000000000e+01 -1.637134562174e-03 0.000000000000e+00 1.637134549207e-03 1.296624362086e-11 -1.300000000000e+01 -1.642948614928e-03 0.000000000000e+00 1.642948601961e-03 1.296674362086e-11 -1.350000000000e+01 -1.647918226633e-03 0.000000000000e+00 1.647918213666e-03 1.296724362086e-11 -1.400000000000e+01 -1.652173762535e-03 0.000000000000e+00 1.652173749567e-03 1.296774362086e-11 -1.450000000000e+01 -1.655825963739e-03 0.000000000000e+00 1.655825950770e-03 1.296824362086e-11 -1.500000000000e+01 -1.658968711199e-03 0.000000000000e+00 1.658968698230e-03 1.296874362086e-11 -1.550000000000e+01 -1.661681475054e-03 0.000000000000e+00 1.661681462085e-03 1.296924362086e-11 -1.600000000000e+01 -1.664031468105e-03 0.000000000000e+00 1.664031455135e-03 1.296974362086e-11 -1.650000000000e+01 -1.666075518562e-03 0.000000000000e+00 1.666075505592e-03 1.297024362086e-11 -1.700000000000e+01 -1.667861685227e-03 0.000000000000e+00 1.667861672256e-03 1.297074362086e-11 -1.750000000000e+01 -1.669430642306e-03 0.000000000000e+00 1.669430629335e-03 1.297124362086e-11 -1.800000000000e+01 -1.670816862291e-03 0.000000000000e+00 1.670816849319e-03 1.297174362086e-11 -1.850000000000e+01 -1.672049624691e-03 0.000000000000e+00 1.672049611718e-03 1.297224362086e-11 -1.900000000000e+01 -1.673153876552e-03 0.000000000000e+00 1.673153863579e-03 1.297274362086e-11 -1.950000000000e+01 -1.674150967665e-03 0.000000000000e+00 1.674150954692e-03 1.297324362086e-11 -2.000000000000e+01 -1.675059278550e-03 0.000000000000e+00 1.675059265576e-03 1.297374362086e-11 ngspice-26/tests/hisimhv1/pmos/reference/acFreq.standard0000644000265600020320000000754212264261473022772 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 3.04276469685753e-14 2.83238072675251e-14 7.7436692453211e-15 1258.925411794 3.04276469685712e-14 2.83238072675319e-14 7.7436692453217e-15 1584.893192461 3.04276469685691e-14 2.83238072675228e-14 7.74366924532049e-15 1995.262314969 3.04276469685695e-14 2.83238072675253e-14 7.74366924531943e-15 2511.88643151 3.04276469685625e-14 2.83238072675189e-14 7.74366924531896e-15 3162.277660168 3.04276469685694e-14 2.8323807267526e-14 7.7436692453197e-15 3981.071705535 3.04276469685637e-14 2.83238072675179e-14 7.74366924531645e-15 5011.872336273 3.04276469685585e-14 2.83238072675092e-14 7.74366924531435e-15 6309.573444802 3.0427646968548e-14 2.83238072675016e-14 7.74366924531332e-15 7943.282347243 3.04276469685452e-14 2.83238072674845e-14 7.74366924530966e-15 10000 3.04276469685117e-14 2.83238072674614e-14 7.7436692453036e-15 12589.25411794 3.04276469684828e-14 2.83238072674307e-14 7.74366924529388e-15 15848.93192461 3.04276469684286e-14 2.83238072673822e-14 7.7436692452763e-15 19952.62314969 3.04276469683381e-14 2.8323807267286e-14 7.74366924524923e-15 25118.8643151 3.04276469682014e-14 2.83238072671514e-14 7.74366924520491e-15 31622.77660168 3.04276469680007e-14 2.83238072669371e-14 7.74366924514355e-15 39810.71705535 3.04276469676602e-14 2.83238072665904e-14 7.74366924503661e-15 50118.72336273 3.04276469671232e-14 2.83238072660421e-14 7.74366924486977e-15 63095.73444802 3.04276469662778e-14 2.83238072651809e-14 7.74366924460704e-15 79432.82347243 3.04276469649386e-14 2.83238072637978e-14 7.74366924418962e-15 100000 3.0427646962798e-14 2.83238072616204e-14 7.74366924352743e-15 125892.5411794 3.0427646959431e-14 2.83238072581767e-14 7.74366924247848e-15 158489.3192461 3.04276469540886e-14 2.83238072527008e-14 7.74366924081565e-15 199526.2314969 3.04276469456127e-14 2.83238072440261e-14 7.74366923817873e-15 251188.643151 3.04276469321745e-14 2.83238072302755e-14 7.74366923400273e-15 316227.7660168 3.04276469108972e-14 2.83238072084999e-14 7.74366922738237e-15 398107.1705535 3.04276468771582e-14 2.83238071739696e-14 7.74366921689216e-15 501187.2336273 3.04276468236864e-14 2.83238071192455e-14 7.7436692002627e-15 630957.3444802 3.04276467389559e-14 2.83238070325114e-14 7.7436691739082e-15 794328.2347243 3.04276466046437e-14 2.83238068950676e-14 7.74366913213794e-15 1000000 3.04276463917819e-14 2.83238066772194e-14 7.74366906593916e-15 1258925.411794 3.04276460544191e-14 2.83238063319639e-14 7.74366896102176e-15 1584893.192461 3.04276455197398e-14 2.83238057847515e-14 7.74366879473503e-15 1995262.314969 3.04276446723174e-14 2.83238049174708e-14 7.74366853118976e-15 2511886.43151 3.04276433292556e-14 2.83238035429411e-14 7.74366811350001e-15 3162277.660168 3.04276412006505e-14 2.83238013644731e-14 7.74366745150605e-15 3981071.705535 3.04276378270299e-14 2.83237979118105e-14 7.74366640231906e-15 5011872.336273 3.04276324802058e-14 2.83237924397178e-14 7.74366473946344e-15 6309573.444802 3.04276240060576e-14 2.83237837670513e-14 7.74366210402245e-15 7943282.347243 3.04276105754734e-14 2.8323770021783e-14 7.74365792713459e-15 10000000 3.04275892894552e-14 2.83237482370681e-14 7.74365130721893e-15 12589254.11794 3.04275555534683e-14 2.83237137106883e-14 7.74364081538778e-15 15848931.92461 3.04275020857246e-14 2.83236589902721e-14 7.74362418701594e-15 19952623.14969 3.04274173455502e-14 2.83235722647552e-14 7.74359783297671e-15 25118864.3151 3.04272830426909e-14 2.83234348153721e-14 7.7435560650333e-15 31622776.60168 3.04270701901669e-14 2.83232169760068e-14 7.74348986827836e-15 39810717.05535 3.04267328495446e-14 2.83228717319584e-14 7.74338495595607e-15 50118723.36273 3.0426198220564e-14 2.8322324577366e-14 7.74321868731094e-15 63095734.44802 3.04253509406548e-14 2.83214574468728e-14 7.74295518478955e-15 79432823.47243 3.04240082178433e-14 2.83200832659221e-14 7.74253760042528e-15 100000000 3.04218804604543e-14 2.83179056581523e-14 7.74187587172808e-15 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_she.standard0000644000265600020320000003334212264261473023325 0ustar andreasadminV(d) I(d) -1.000000000000e+00 -2.131302661862e-05 -1.500000000000e+00 -2.141834730871e-05 -2.000000000000e+00 -2.150871286237e-05 -2.500000000000e+00 -2.159155708068e-05 -3.000000000000e+00 -2.166966446899e-05 -3.500000000000e+00 -2.174442743631e-05 -4.000000000000e+00 -2.181666598821e-05 -4.500000000000e+00 -2.188691394728e-05 -5.000000000000e+00 -2.195554293505e-05 -5.500000000000e+00 -2.202282439641e-05 -6.000000000000e+00 -2.208896392769e-05 -6.500000000000e+00 -2.215412174236e-05 -7.000000000000e+00 -2.221842558759e-05 -7.500000000000e+00 -2.228197927235e-05 -8.000000000000e+00 -2.234486850835e-05 -8.500000000000e+00 -2.240716503430e-05 -9.000000000000e+00 -2.246892960380e-05 -9.500000000000e+00 -2.253021419841e-05 -1.000000000000e+01 -2.259106369839e-05 -1.050000000000e+01 -2.265151716546e-05 -1.100000000000e+01 -2.271160884230e-05 -1.150000000000e+01 -2.277136894180e-05 -1.200000000000e+01 -2.283082427768e-05 -1.250000000000e+01 -2.288999877386e-05 -1.300000000000e+01 -2.294891387974e-05 -1.350000000000e+01 -2.300758891204e-05 -1.400000000000e+01 -2.306604133821e-05 -1.450000000000e+01 -2.312428701339e-05 -1.500000000000e+01 -2.318234037973e-05 -1.550000000000e+01 -2.324021463519e-05 -1.600000000000e+01 -2.329792187739e-05 -1.650000000000e+01 -2.335547322669e-05 -1.700000000000e+01 -2.341287893236e-05 -1.750000000000e+01 -2.347014846420e-05 -1.800000000000e+01 -2.352729059233e-05 -1.850000000000e+01 -2.358431345672e-05 -1.900000000000e+01 -2.364122462817e-05 -1.950000000000e+01 -2.369803116186e-05 -2.000000000000e+01 -2.375473964473e-05 -1.000000000000e+00 -3.124274526500e-04 -1.500000000000e+00 -4.121751261521e-04 -2.000000000000e+00 -4.804400522922e-04 -2.500000000000e+00 -5.239831834010e-04 -3.000000000000e+00 -5.494827379021e-04 -3.500000000000e+00 -5.628412286838e-04 -4.000000000000e+00 -5.687511269206e-04 -4.500000000000e+00 -5.707481944196e-04 -5.000000000000e+00 -5.716242957145e-04 -5.500000000000e+00 -5.723774880199e-04 -6.000000000000e+00 -5.730656986726e-04 -6.500000000000e+00 -5.737016758870e-04 -7.000000000000e+00 -5.742951782221e-04 -7.500000000000e+00 -5.748538172843e-04 -8.000000000000e+00 -5.753835074524e-04 -8.500000000000e+00 -5.758888597584e-04 -9.000000000000e+00 -5.763734973302e-04 -9.500000000000e+00 -5.768402961315e-04 -1.000000000000e+01 -5.772915647870e-04 -1.050000000000e+01 -5.777291779193e-04 -1.100000000000e+01 -5.781546750532e-04 -1.150000000000e+01 -5.785693343330e-04 -1.200000000000e+01 -5.789742278698e-04 -1.250000000000e+01 -5.793702636605e-04 -1.300000000000e+01 -5.797582176369e-04 -1.350000000000e+01 -5.801387584069e-04 -1.400000000000e+01 -5.805124665400e-04 -1.450000000000e+01 -5.808798497437e-04 -1.500000000000e+01 -5.812413549179e-04 -1.550000000000e+01 -5.815973778135e-04 -1.600000000000e+01 -5.819482708384e-04 -1.650000000000e+01 -5.822943494181e-04 -1.700000000000e+01 -5.826358972173e-04 -1.750000000000e+01 -5.829731704586e-04 -1.800000000000e+01 -5.833064015194e-04 -1.850000000000e+01 -5.836358019474e-04 -1.900000000000e+01 -5.839615650033e-04 -1.950000000000e+01 -5.842838678190e-04 -2.000000000000e+01 -5.846028732382e-04 -1.000000000000e+00 -5.104732708156e-04 -1.500000000000e+00 -7.232760853403e-04 -2.000000000000e+00 -9.112776266929e-04 -2.500000000000e+00 -1.077498538673e-03 -3.000000000000e+00 -1.224691744697e-03 -3.500000000000e+00 -1.355243230014e-03 -4.000000000000e+00 -1.471185873164e-03 -4.500000000000e+00 -1.574246347880e-03 -5.000000000000e+00 -1.665896053145e-03 -5.500000000000e+00 -1.747396829346e-03 -6.000000000000e+00 -1.819839332227e-03 -6.500000000000e+00 -1.884174324653e-03 -7.000000000000e+00 -1.941237829432e-03 -7.500000000000e+00 -1.991771176738e-03 -8.000000000000e+00 -2.036436882362e-03 -8.500000000000e+00 -2.075831151902e-03 -9.000000000000e+00 -2.110493668169e-03 -9.500000000000e+00 -2.140915198260e-03 -1.000000000000e+01 -2.167543456822e-03 -1.050000000000e+01 -2.190787584787e-03 -1.100000000000e+01 -2.211021548203e-03 -1.150000000000e+01 -2.228586725735e-03 -1.200000000000e+01 -2.243793927717e-03 -1.250000000000e+01 -2.256925063855e-03 -1.300000000000e+01 -2.268234642686e-03 -1.350000000000e+01 -2.277951241473e-03 -1.400000000000e+01 -2.286279034353e-03 -1.450000000000e+01 -2.293399416984e-03 -1.500000000000e+01 -2.299472725302e-03 -1.550000000000e+01 -2.304640035220e-03 -1.600000000000e+01 -2.309024894753e-03 -1.650000000000e+01 -2.312735220048e-03 -1.700000000000e+01 -2.315864924437e-03 -1.750000000000e+01 -2.318495561341e-03 -1.800000000000e+01 -2.320697828039e-03 -1.850000000000e+01 -2.322532944268e-03 -1.900000000000e+01 -2.324053904611e-03 -1.950000000000e+01 -2.325306611214e-03 -2.000000000000e+01 -2.326330900383e-03 -1.000000000000e+00 -1.703286845150e-05 -1.500000000000e+00 -1.712901432975e-05 -2.000000000000e+00 -1.721382094243e-05 -2.500000000000e+00 -1.729289525307e-05 -3.000000000000e+00 -1.736833582550e-05 -3.500000000000e+00 -1.744120123181e-05 -4.000000000000e+00 -1.751212081012e-05 -4.500000000000e+00 -1.758150760296e-05 -5.000000000000e+00 -1.764965104980e-05 -5.500000000000e+00 -1.771676368325e-05 -6.000000000000e+00 -1.778300715966e-05 -6.500000000000e+00 -1.784850788178e-05 -7.000000000000e+00 -1.791336691724e-05 -7.500000000000e+00 -1.797766658143e-05 -8.000000000000e+00 -1.804147496654e-05 -8.500000000000e+00 -1.810484915219e-05 -9.000000000000e+00 -1.816783753947e-05 -9.500000000000e+00 -1.823048158490e-05 -1.000000000000e+01 -1.829281711300e-05 -1.050000000000e+01 -1.835487532635e-05 -1.100000000000e+01 -1.841668359440e-05 -1.150000000000e+01 -1.847826607732e-05 -1.200000000000e+01 -1.853964422543e-05 -1.250000000000e+01 -1.860083718309e-05 -1.300000000000e+01 -1.866186211853e-05 -1.350000000000e+01 -1.872273449560e-05 -1.400000000000e+01 -1.878346829933e-05 -1.450000000000e+01 -1.884407622471e-05 -1.500000000000e+01 -1.890456983564e-05 -1.550000000000e+01 -1.896495969961e-05 -1.600000000000e+01 -1.902525550258e-05 -1.650000000000e+01 -1.908546614737e-05 -1.700000000000e+01 -1.914559983848e-05 -1.750000000000e+01 -1.920566415545e-05 -1.800000000000e+01 -1.926566611672e-05 -1.850000000000e+01 -1.932561223525e-05 -1.900000000000e+01 -1.938550856743e-05 -1.950000000000e+01 -1.944536075597e-05 -2.000000000000e+01 -1.950517406786e-05 -1.000000000000e+00 -4.014536480028e-04 -1.500000000000e+00 -5.328610631982e-04 -2.000000000000e+00 -6.252484327046e-04 -2.500000000000e+00 -6.861077871203e-04 -3.000000000000e+00 -7.229551317434e-04 -3.500000000000e+00 -7.427792656683e-04 -4.000000000000e+00 -7.515345215719e-04 -4.500000000000e+00 -7.541369279307e-04 -5.000000000000e+00 -7.551939392797e-04 -5.500000000000e+00 -7.561264486102e-04 -6.000000000000e+00 -7.569696638910e-04 -6.500000000000e+00 -7.577403516496e-04 -7.000000000000e+00 -7.584521382241e-04 -7.500000000000e+00 -7.591157900812e-04 -8.000000000000e+00 -7.597397140063e-04 -8.500000000000e+00 -7.603304668250e-04 -9.000000000000e+00 -7.608931883835e-04 -9.500000000000e+00 -7.614319419888e-04 -1.000000000000e+01 -7.619499727891e-04 -1.050000000000e+01 -7.624499009476e-04 -1.100000000000e+01 -7.629338654626e-04 -1.150000000000e+01 -7.634036314541e-04 -1.200000000000e+01 -7.638606706333e-04 -1.250000000000e+01 -7.643062221149e-04 -1.300000000000e+01 -7.647413387692e-04 -1.350000000000e+01 -7.651669228780e-04 -1.400000000000e+01 -7.655837538192e-04 -1.450000000000e+01 -7.659925097630e-04 -1.500000000000e+01 -7.663937848304e-04 -1.550000000000e+01 -7.667881027836e-04 -1.600000000000e+01 -7.671759280415e-04 -1.650000000000e+01 -7.675576746168e-04 -1.700000000000e+01 -7.679337134219e-04 -1.750000000000e+01 -7.683043782861e-04 -1.800000000000e+01 -7.686699709465e-04 -1.850000000000e+01 -7.690307652149e-04 -1.900000000000e+01 -7.693870104784e-04 -1.950000000000e+01 -7.697389346591e-04 -2.000000000000e+01 -7.700867467284e-04 -1.000000000000e+00 -6.064951103116e-04 -1.500000000000e+00 -8.582447826800e-04 -2.000000000000e+00 -1.080763792520e-03 -2.500000000000e+00 -1.277976624858e-03 -3.000000000000e+00 -1.453319540760e-03 -3.500000000000e+00 -1.609700916471e-03 -4.000000000000e+00 -1.749558840089e-03 -4.500000000000e+00 -1.874937242363e-03 -5.000000000000e+00 -1.987556545806e-03 -5.500000000000e+00 -2.088873214644e-03 -6.000000000000e+00 -2.180128290104e-03 -6.500000000000e+00 -2.262386502470e-03 -7.000000000000e+00 -2.336567719789e-03 -7.500000000000e+00 -2.403472275501e-03 -8.000000000000e+00 -2.463801427523e-03 -8.500000000000e+00 -2.518173936642e-03 -9.000000000000e+00 -2.567139535731e-03 -9.500000000000e+00 -2.611189892242e-03 -1.000000000000e+01 -2.650767536785e-03 -1.050000000000e+01 -2.686273131545e-03 -1.100000000000e+01 -2.718071376363e-03 -1.150000000000e+01 -2.746495791597e-03 -1.200000000000e+01 -2.771852571612e-03 -1.250000000000e+01 -2.794423668258e-03 -1.300000000000e+01 -2.814469238486e-03 -1.350000000000e+01 -2.832229572835e-03 -1.400000000000e+01 -2.847926609946e-03 -1.450000000000e+01 -2.861765134031e-03 -1.500000000000e+01 -2.873933744566e-03 -1.550000000000e+01 -2.884605677991e-03 -1.600000000000e+01 -2.893939548686e-03 -1.650000000000e+01 -2.902080061236e-03 -1.700000000000e+01 -2.909158729323e-03 -1.750000000000e+01 -2.915294620563e-03 -1.800000000000e+01 -2.920595156821e-03 -1.850000000000e+01 -2.925156816176e-03 -1.900000000000e+01 -2.929066115729e-03 -1.950000000000e+01 -2.932400317324e-03 -2.000000000000e+01 -2.935228270957e-03 -1.000000000000e+00 -2.747317383188e-05 -1.500000000000e+00 -2.759548745088e-05 -2.000000000000e+00 -2.769432113879e-05 -2.500000000000e+00 -2.778262799785e-05 -3.000000000000e+00 -2.786446276333e-05 -3.500000000000e+00 -2.794179632554e-05 -4.000000000000e+00 -2.801576466915e-05 -4.500000000000e+00 -2.808709497400e-05 -5.000000000000e+00 -2.815628684074e-05 -5.500000000000e+00 -2.822370141295e-05 -6.000000000000e+00 -2.828960995263e-05 -6.500000000000e+00 -2.835422241594e-05 -7.000000000000e+00 -2.841770528173e-05 -7.500000000000e+00 -2.848019320675e-05 -8.000000000000e+00 -2.854179694037e-05 -8.500000000000e+00 -2.860260887181e-05 -9.000000000000e+00 -2.866270702311e-05 -9.500000000000e+00 -2.872215798990e-05 -1.000000000000e+01 -2.878101915043e-05 -1.050000000000e+01 -2.883934035415e-05 -1.100000000000e+01 -2.889716523226e-05 -1.150000000000e+01 -2.895453222889e-05 -1.200000000000e+01 -2.901147542246e-05 -1.250000000000e+01 -2.906802518715e-05 -1.300000000000e+01 -2.912420873092e-05 -1.350000000000e+01 -2.918005053716e-05 -1.400000000000e+01 -2.923557273028e-05 -1.450000000000e+01 -2.929079538060e-05 -1.500000000000e+01 -2.934573676041e-05 -1.550000000000e+01 -2.940041356054e-05 -1.600000000000e+01 -2.945484107450e-05 -1.650000000000e+01 -2.950903335600e-05 -1.700000000000e+01 -2.956300335437e-05 -1.750000000000e+01 -2.961676303165e-05 -1.800000000000e+01 -2.967032346409e-05 -1.850000000000e+01 -2.972369493079e-05 -1.900000000000e+01 -2.977688699115e-05 -1.950000000000e+01 -2.982990855301e-05 -2.000000000000e+01 -2.988276793271e-05 -1.000000000000e+00 -2.228413959692e-04 -1.500000000000e+00 -2.926849560339e-04 -2.000000000000e+00 -3.397726610348e-04 -2.500000000000e+00 -3.695455307618e-04 -3.000000000000e+00 -3.871632483558e-04 -3.500000000000e+00 -3.968831235503e-04 -4.000000000000e+00 -4.018354988282e-04 -4.500000000000e+00 -4.041303184755e-04 -5.000000000000e+00 -4.051541921504e-04 -5.500000000000e+00 -4.057684801029e-04 -6.000000000000e+00 -4.062900111394e-04 -6.500000000000e+00 -4.067709104941e-04 -7.000000000000e+00 -4.072219430941e-04 -7.500000000000e+00 -4.076487430340e-04 -8.000000000000e+00 -4.080553794717e-04 -8.500000000000e+00 -4.084449829030e-04 -9.000000000000e+00 -4.088200114263e-04 -9.500000000000e+00 -4.091824220237e-04 -1.000000000000e+01 -4.095337924393e-04 -1.050000000000e+01 -4.098754100836e-04 -1.100000000000e+01 -4.102083376053e-04 -1.150000000000e+01 -4.105334617036e-04 -1.200000000000e+01 -4.108515298140e-04 -1.250000000000e+01 -4.111631779575e-04 -1.300000000000e+01 -4.114689520969e-04 -1.350000000000e+01 -4.117693246815e-04 -1.400000000000e+01 -4.120647075920e-04 -1.450000000000e+01 -4.123554623669e-04 -1.500000000000e+01 -4.126419083579e-04 -1.550000000000e+01 -4.129243292897e-04 -1.600000000000e+01 -4.132029785828e-04 -1.650000000000e+01 -4.134780837065e-04 -1.700000000000e+01 -4.137498497669e-04 -1.750000000000e+01 -4.140184624839e-04 -1.800000000000e+01 -4.142840906807e-04 -1.850000000000e+01 -4.145468883766e-04 -1.900000000000e+01 -4.148069965581e-04 -1.950000000000e+01 -4.150645446872e-04 -2.000000000000e+01 -4.153196519904e-04 -1.000000000000e+00 -3.902409161746e-04 -1.500000000000e+00 -5.535558960762e-04 -2.000000000000e+00 -6.976340192161e-04 -2.500000000000e+00 -8.244496307698e-04 -3.000000000000e+00 -9.359246425011e-04 -3.500000000000e+00 -1.033807387143e-03 -4.000000000000e+00 -1.119647949613e-03 -4.500000000000e+00 -1.194811002949e-03 -5.000000000000e+00 -1.260499766042e-03 -5.500000000000e+00 -1.317780503146e-03 -6.000000000000e+00 -1.367603849100e-03 -6.500000000000e+00 -1.410822090787e-03 -7.000000000000e+00 -1.448202653901e-03 -7.500000000000e+00 -1.480438418543e-03 -8.000000000000e+00 -1.508155543866e-03 -8.500000000000e+00 -1.531919418277e-03 -9.000000000000e+00 -1.552239263386e-03 -9.500000000000e+00 -1.569571844011e-03 -1.000000000000e+01 -1.584324672069e-03 -1.050000000000e+01 -1.596859021205e-03 -1.100000000000e+01 -1.607492979186e-03 -1.150000000000e+01 -1.616504660777e-03 -1.200000000000e+01 -1.624135603325e-03 -1.250000000000e+01 -1.630594290164e-03 -1.300000000000e+01 -1.636059715096e-03 -1.350000000000e+01 -1.640684807337e-03 -1.400000000000e+01 -1.644599812870e-03 -1.450000000000e+01 -1.647915289724e-03 -1.500000000000e+01 -1.650724894814e-03 -1.550000000000e+01 -1.653107850563e-03 -1.600000000000e+01 -1.655131111256e-03 -1.650000000000e+01 -1.656851245006e-03 -1.700000000000e+01 -1.658316055207e-03 -1.750000000000e+01 -1.659565969282e-03 -1.800000000000e+01 -1.660635223594e-03 -1.850000000000e+01 -1.661552872656e-03 -1.900000000000e+01 -1.662343648700e-03 -1.950000000000e+01 -1.663028694564e-03 -2.000000000000e+01 -1.663626187891e-03 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_corsrd0.standard0000644000265600020320000010243012264261473024115 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.132095075041e-05 0.000000000000e+00 2.132095074941e-05 1.000000000000e-15 -1.500000000000e+00 -2.142544814169e-05 0.000000000000e+00 2.142544814019e-05 1.500000000000e-15 -2.000000000000e+00 -2.151553975596e-05 0.000000000000e+00 2.151553975396e-05 2.000000000000e-15 -2.500000000000e+00 -2.159828331468e-05 0.000000000000e+00 2.159828331218e-05 2.500000000000e-15 -3.000000000000e+00 -2.167636694117e-05 0.000000000000e+00 2.167636693817e-05 3.000000000000e-15 -3.500000000000e+00 -2.175114791528e-05 0.000000000000e+00 2.175114791178e-05 3.500000000000e-15 -4.000000000000e+00 -2.182343017081e-05 0.000000000000e+00 2.182343016681e-05 4.000000000000e-15 -4.500000000000e+00 -2.189373901941e-05 0.000000000000e+00 2.189373901491e-05 4.500000000000e-15 -5.000000000000e+00 -2.196244110562e-05 0.000000000000e+00 2.196244110062e-05 5.000000000000e-15 -5.500000000000e+00 -2.202980474982e-05 0.000000000000e+00 2.202980474432e-05 5.500000000000e-15 -6.000000000000e+00 -2.209603347969e-05 0.000000000000e+00 2.209603347369e-05 6.000000000000e-15 -6.500000000000e+00 -2.216128608143e-05 0.000000000000e+00 2.216128607493e-05 6.500000000000e-15 -7.000000000000e+00 -2.222568928448e-05 0.000000000000e+00 2.222568927748e-05 7.000000000000e-15 -7.500000000000e+00 -2.228934615231e-05 0.000000000000e+00 2.228934614481e-05 7.500000000000e-15 -8.000000000000e+00 -2.235234183820e-05 0.000000000000e+00 2.235234183020e-05 8.000000000000e-15 -8.500000000000e+00 -2.241474765457e-05 0.000000000000e+00 2.241474764607e-05 8.500000000000e-15 -9.000000000000e+00 -2.247662402438e-05 0.000000000000e+00 2.247662401538e-05 9.000000000000e-15 -9.500000000000e+00 -2.253802266914e-05 0.000000000000e+00 2.253802265964e-05 9.500000000000e-15 -1.000000000000e+01 -2.259898826213e-05 0.000000000000e+00 2.259898825213e-05 1.000000000000e-14 -1.050000000000e+01 -2.265955969865e-05 0.000000000000e+00 2.265955968815e-05 1.050000000000e-14 -1.100000000000e+01 -2.271977108631e-05 0.000000000000e+00 2.271977107531e-05 1.100000000000e-14 -1.150000000000e+01 -2.277965252756e-05 0.000000000000e+00 2.277965251606e-05 1.150000000000e-14 -1.200000000000e+01 -2.283923074521e-05 0.000000000000e+00 2.283923073321e-05 1.200000000000e-14 -1.250000000000e+01 -2.289852958785e-05 0.000000000000e+00 2.289852957535e-05 1.250000000000e-14 -1.300000000000e+01 -2.295757044225e-05 0.000000000000e+00 2.295757042925e-05 1.300000000000e-14 -1.350000000000e+01 -2.301637257273e-05 0.000000000000e+00 2.301637255923e-05 1.350000000000e-14 -1.400000000000e+01 -2.307495340286e-05 0.000000000000e+00 2.307495338886e-05 1.400000000000e-14 -1.450000000000e+01 -2.313332875088e-05 0.000000000000e+00 2.313332873638e-05 1.450000000000e-14 -1.500000000000e+01 -2.319151302787e-05 0.000000000000e+00 2.319151301287e-05 1.500000000000e-14 -1.550000000000e+01 -2.324951940561e-05 0.000000000000e+00 2.324951939011e-05 1.550000000000e-14 -1.600000000000e+01 -2.330735995965e-05 0.000000000000e+00 2.330735994365e-05 1.600000000000e-14 -1.650000000000e+01 -2.336504579179e-05 0.000000000000e+00 2.336504577529e-05 1.650000000000e-14 -1.700000000000e+01 -2.342258713569e-05 0.000000000000e+00 2.342258711869e-05 1.700000000000e-14 -1.750000000000e+01 -2.347999344808e-05 0.000000000000e+00 2.347999343058e-05 1.750000000000e-14 -1.800000000000e+01 -2.353727348822e-05 0.000000000000e+00 2.353727347022e-05 1.800000000000e-14 -1.850000000000e+01 -2.359443538706e-05 0.000000000000e+00 2.359443536856e-05 1.850000000000e-14 -1.900000000000e+01 -2.365148670804e-05 0.000000000000e+00 2.365148668904e-05 1.900000000000e-14 -1.950000000000e+01 -2.370843450041e-05 0.000000000000e+00 2.370843448091e-05 1.950000000000e-14 -2.000000000000e+01 -2.376528534637e-05 0.000000000000e+00 2.376528532637e-05 2.000000000000e-14 -1.000000000000e+00 -4.126241162094e-04 0.000000000000e+00 4.126241162084e-04 1.000000000000e-15 -1.500000000000e+00 -4.966845325781e-04 0.000000000000e+00 4.966845325766e-04 1.500000000000e-15 -2.000000000000e+00 -5.403378715912e-04 0.000000000000e+00 5.403378715892e-04 2.000000000000e-15 -2.500000000000e+00 -5.613413149234e-04 0.000000000000e+00 5.613413149209e-04 2.500000000000e-15 -3.000000000000e+00 -5.701748251296e-04 0.000000000000e+00 5.701748251266e-04 3.000000000000e-15 -3.500000000000e+00 -5.730417602465e-04 0.000000000000e+00 5.730417602430e-04 3.500000000000e-15 -4.000000000000e+00 -5.740762581125e-04 0.000000000000e+00 5.740762581085e-04 4.000000000000e-15 -4.500000000000e+00 -5.749350235085e-04 0.000000000000e+00 5.749350235040e-04 4.500000000000e-15 -5.000000000000e+00 -5.757217652520e-04 0.000000000000e+00 5.757217652470e-04 5.000000000000e-15 -5.500000000000e+00 -5.764514809379e-04 0.000000000000e+00 5.764514809324e-04 5.500000000000e-15 -6.000000000000e+00 -5.771354691503e-04 0.000000000000e+00 5.771354691443e-04 6.000000000000e-15 -6.500000000000e+00 -5.777824021383e-04 0.000000000000e+00 5.777824021318e-04 6.500000000000e-15 -7.000000000000e+00 -5.783988991721e-04 0.000000000000e+00 5.783988991651e-04 7.000000000000e-15 -7.500000000000e+00 -5.789900339142e-04 0.000000000000e+00 5.789900339067e-04 7.500000000000e-15 -8.000000000000e+00 -5.795597331750e-04 0.000000000000e+00 5.795597331670e-04 8.000000000000e-15 -8.500000000000e+00 -5.801110738114e-04 0.000000000000e+00 5.801110738029e-04 8.500000000000e-15 -9.000000000000e+00 -5.806464990528e-04 0.000000000000e+00 5.806464990438e-04 9.000000000000e-15 -9.500000000000e+00 -5.811679752172e-04 0.000000000000e+00 5.811679752077e-04 9.500000000000e-15 -1.000000000000e+01 -5.816771055396e-04 0.000000000000e+00 5.816771055296e-04 1.000000000000e-14 -1.050000000000e+01 -5.821752134398e-04 0.000000000000e+00 5.821752134293e-04 1.050000000000e-14 -1.100000000000e+01 -5.826634040186e-04 0.000000000000e+00 5.826634040076e-04 1.100000000000e-14 -1.150000000000e+01 -5.831426099679e-04 0.000000000000e+00 5.831426099564e-04 1.150000000000e-14 -1.200000000000e+01 -5.836136262319e-04 0.000000000000e+00 5.836136262199e-04 1.200000000000e-14 -1.250000000000e+01 -5.840771364765e-04 0.000000000000e+00 5.840771364640e-04 1.250000000000e-14 -1.300000000000e+01 -5.845337335292e-04 0.000000000000e+00 5.845337335162e-04 1.300000000000e-14 -1.350000000000e+01 -5.849839353350e-04 0.000000000000e+00 5.849839353215e-04 1.350000000000e-14 -1.400000000000e+01 -5.854281975430e-04 0.000000000000e+00 5.854281975290e-04 1.400000000000e-14 -1.450000000000e+01 -5.858669235324e-04 0.000000000000e+00 5.858669235179e-04 1.450000000000e-14 -1.500000000000e+01 -5.863004724766e-04 0.000000000000e+00 5.863004724616e-04 1.500000000000e-14 -1.550000000000e+01 -5.867291658854e-04 0.000000000000e+00 5.867291658699e-04 1.550000000000e-14 -1.600000000000e+01 -5.871532929579e-04 0.000000000000e+00 5.871532929419e-04 1.600000000000e-14 -1.650000000000e+01 -5.875731149973e-04 0.000000000000e+00 5.875731149808e-04 1.650000000000e-14 -1.700000000000e+01 -5.879888690794e-04 0.000000000000e+00 5.879888690624e-04 1.700000000000e-14 -1.750000000000e+01 -5.884007711210e-04 0.000000000000e+00 5.884007711035e-04 1.750000000000e-14 -1.800000000000e+01 -5.888090184653e-04 0.000000000000e+00 5.888090184473e-04 1.800000000000e-14 -1.850000000000e+01 -5.892137920723e-04 0.000000000000e+00 5.892137920538e-04 1.850000000000e-14 -1.900000000000e+01 -5.896152583861e-04 0.000000000000e+00 5.896152583671e-04 1.900000000000e-14 -1.950000000000e+01 -5.900135709351e-04 0.000000000000e+00 5.900135709156e-04 1.950000000000e-14 -2.000000000000e+01 -5.904088717109e-04 0.000000000000e+00 5.904088716909e-04 2.000000000000e-14 -1.000000000000e+00 -1.051756563282e-03 0.000000000000e+00 1.051756563281e-03 1.000000000000e-15 -1.500000000000e+00 -1.383579784285e-03 0.000000000000e+00 1.383579784283e-03 1.500000000000e-15 -2.000000000000e+00 -1.628566582255e-03 0.000000000000e+00 1.628566582253e-03 2.000000000000e-15 -2.500000000000e+00 -1.811588645382e-03 0.000000000000e+00 1.811588645379e-03 2.500000000000e-15 -3.000000000000e+00 -1.949645178237e-03 0.000000000000e+00 1.949645178234e-03 3.000000000000e-15 -3.500000000000e+00 -2.054550414452e-03 0.000000000000e+00 2.054550414449e-03 3.500000000000e-15 -4.000000000000e+00 -2.134705609128e-03 0.000000000000e+00 2.134705609124e-03 4.000000000000e-15 -4.500000000000e+00 -2.196206466700e-03 0.000000000000e+00 2.196206466696e-03 4.500000000000e-15 -5.000000000000e+00 -2.243548808385e-03 0.000000000000e+00 2.243548808380e-03 5.000000000000e-15 -5.500000000000e+00 -2.280091365588e-03 0.000000000000e+00 2.280091365582e-03 5.500000000000e-15 -6.000000000000e+00 -2.308367415755e-03 0.000000000000e+00 2.308367415749e-03 6.000000000000e-15 -6.500000000000e+00 -2.330300040545e-03 0.000000000000e+00 2.330300040538e-03 6.500000000000e-15 -7.000000000000e+00 -2.347354932230e-03 0.000000000000e+00 2.347354932223e-03 7.000000000000e-15 -7.500000000000e+00 -2.360651881503e-03 0.000000000000e+00 2.360651881496e-03 7.500000000000e-15 -8.000000000000e+00 -2.371047941743e-03 0.000000000000e+00 2.371047941735e-03 8.000000000000e-15 -8.500000000000e+00 -2.379200299173e-03 0.000000000000e+00 2.379200299165e-03 8.500000000000e-15 -9.000000000000e+00 -2.385614052967e-03 0.000000000000e+00 2.385614052958e-03 9.000000000000e-15 -9.500000000000e+00 -2.390678547418e-03 0.000000000000e+00 2.390678547409e-03 9.500000000000e-15 -1.000000000000e+01 -2.394694980024e-03 0.000000000000e+00 2.394694980014e-03 1.000000000000e-14 -1.050000000000e+01 -2.397897396550e-03 0.000000000000e+00 2.397897396540e-03 1.050000000000e-14 -1.100000000000e+01 -2.400468735492e-03 0.000000000000e+00 2.400468735481e-03 1.100000000000e-14 -1.150000000000e+01 -2.402553263380e-03 0.000000000000e+00 2.402553263368e-03 1.150000000000e-14 -1.200000000000e+01 -2.404266571199e-03 0.000000000000e+00 2.404266571187e-03 1.200000000000e-14 -1.250000000000e+01 -2.405704337629e-03 0.000000000000e+00 2.405704337617e-03 1.250000000000e-14 -1.300000000000e+01 -2.406950944710e-03 0.000000000000e+00 2.406950944697e-03 1.300000000000e-14 -1.350000000000e+01 -2.408084317150e-03 0.000000000000e+00 2.408084317137e-03 1.350000000000e-14 -1.400000000000e+01 -2.409162075562e-03 0.000000000000e+00 2.409162075548e-03 1.400000000000e-14 -1.450000000000e+01 -2.410208289235e-03 0.000000000000e+00 2.410208289221e-03 1.450000000000e-14 -1.500000000000e+01 -2.411229685029e-03 0.000000000000e+00 2.411229685014e-03 1.500000000000e-14 -1.550000000000e+01 -2.412228872491e-03 0.000000000000e+00 2.412228872476e-03 1.550000000000e-14 -1.600000000000e+01 -2.413207612043e-03 0.000000000000e+00 2.413207612027e-03 1.600000000000e-14 -1.650000000000e+01 -2.414167391692e-03 0.000000000000e+00 2.414167391675e-03 1.650000000000e-14 -1.700000000000e+01 -2.415109538987e-03 0.000000000000e+00 2.415109538970e-03 1.700000000000e-14 -1.750000000000e+01 -2.416035252957e-03 0.000000000000e+00 2.416035252940e-03 1.750000000000e-14 -1.800000000000e+01 -2.416945620350e-03 0.000000000000e+00 2.416945620332e-03 1.800000000000e-14 -1.850000000000e+01 -2.417841627851e-03 0.000000000000e+00 2.417841627832e-03 1.850000000000e-14 -1.900000000000e+01 -2.418724172598e-03 0.000000000000e+00 2.418724172579e-03 1.900000000000e-14 -1.950000000000e+01 -2.419594071539e-03 0.000000000000e+00 2.419594071520e-03 1.950000000000e-14 -2.000000000000e+01 -2.420452069795e-03 0.000000000000e+00 2.420452069775e-03 2.000000000000e-14 -1.000000000000e+00 -1.703834174455e-05 0.000000000000e+00 1.703834174355e-05 1.000000000000e-15 -1.500000000000e+00 -1.713401800115e-05 0.000000000000e+00 1.713401799965e-05 1.500000000000e-15 -2.000000000000e+00 -1.721868870362e-05 0.000000000000e+00 1.721868870162e-05 2.000000000000e-15 -2.500000000000e+00 -1.729773097061e-05 0.000000000000e+00 1.729773096811e-05 2.500000000000e-15 -3.000000000000e+00 -1.737318587449e-05 0.000000000000e+00 1.737318587149e-05 3.000000000000e-15 -3.500000000000e+00 -1.744609115633e-05 0.000000000000e+00 1.744609115283e-05 3.500000000000e-15 -4.000000000000e+00 -1.751706660565e-05 0.000000000000e+00 1.751706660165e-05 4.000000000000e-15 -4.500000000000e+00 -1.758652018579e-05 0.000000000000e+00 1.758652018129e-05 4.500000000000e-15 -5.000000000000e+00 -1.765473835166e-05 0.000000000000e+00 1.765473834666e-05 5.000000000000e-15 -5.500000000000e+00 -1.772193175413e-05 0.000000000000e+00 1.772193174863e-05 5.500000000000e-15 -6.000000000000e+00 -1.778826079943e-05 0.000000000000e+00 1.778826079343e-05 6.000000000000e-15 -6.500000000000e+00 -1.785385102557e-05 0.000000000000e+00 1.785385101907e-05 6.500000000000e-15 -7.000000000000e+00 -1.791880288263e-05 0.000000000000e+00 1.791880287563e-05 7.000000000000e-15 -7.500000000000e+00 -1.798319823335e-05 0.000000000000e+00 1.798319822585e-05 7.500000000000e-15 -8.000000000000e+00 -1.804710483103e-05 0.000000000000e+00 1.804710482303e-05 8.000000000000e-15 -8.500000000000e+00 -1.811057949696e-05 0.000000000000e+00 1.811057948846e-05 8.500000000000e-15 -9.000000000000e+00 -1.817367043239e-05 0.000000000000e+00 1.817367042339e-05 9.000000000000e-15 -9.500000000000e+00 -1.823641893727e-05 0.000000000000e+00 1.823641892777e-05 9.500000000000e-15 -1.000000000000e+01 -1.829886071217e-05 0.000000000000e+00 1.829886070217e-05 1.000000000000e-14 -1.050000000000e+01 -1.836102686070e-05 0.000000000000e+00 1.836102685020e-05 1.050000000000e-14 -1.100000000000e+01 -1.842294467266e-05 0.000000000000e+00 1.842294466166e-05 1.100000000000e-14 -1.150000000000e+01 -1.848463824383e-05 0.000000000000e+00 1.848463823233e-05 1.150000000000e-14 -1.200000000000e+01 -1.854612897219e-05 0.000000000000e+00 1.854612896019e-05 1.200000000000e-14 -1.250000000000e+01 -1.860743595946e-05 0.000000000000e+00 1.860743594696e-05 1.250000000000e-14 -1.300000000000e+01 -1.866857633909e-05 0.000000000000e+00 1.866857632609e-05 1.300000000000e-14 -1.350000000000e+01 -1.872956554654e-05 0.000000000000e+00 1.872956553304e-05 1.350000000000e-14 -1.400000000000e+01 -1.879041754376e-05 0.000000000000e+00 1.879041752976e-05 1.400000000000e-14 -1.450000000000e+01 -1.885114500701e-05 0.000000000000e+00 1.885114499251e-05 1.450000000000e-14 -1.500000000000e+01 -1.891175948510e-05 0.000000000000e+00 1.891175947010e-05 1.500000000000e-14 -1.550000000000e+01 -1.897227153352e-05 0.000000000000e+00 1.897227151802e-05 1.550000000000e-14 -1.600000000000e+01 -1.903269082880e-05 0.000000000000e+00 1.903269081280e-05 1.600000000000e-14 -1.650000000000e+01 -1.909302626653e-05 0.000000000000e+00 1.909302625003e-05 1.650000000000e-14 -1.700000000000e+01 -1.915328604587e-05 0.000000000000e+00 1.915328602887e-05 1.700000000000e-14 -1.750000000000e+01 -1.921347774262e-05 0.000000000000e+00 1.921347772512e-05 1.750000000000e-14 -1.800000000000e+01 -1.927360837282e-05 0.000000000000e+00 1.927360835482e-05 1.800000000000e-14 -1.850000000000e+01 -1.933368444831e-05 0.000000000000e+00 1.933368442981e-05 1.850000000000e-14 -1.900000000000e+01 -1.939371202534e-05 0.000000000000e+00 1.939371200634e-05 1.900000000000e-14 -1.950000000000e+01 -1.945369674742e-05 0.000000000000e+00 1.945369672792e-05 1.950000000000e-14 -2.000000000000e+01 -1.951364388312e-05 0.000000000000e+00 1.951364386312e-05 2.000000000000e-14 -1.000000000000e+00 -5.790331776026e-04 0.000000000000e+00 5.790331776016e-04 1.000000000000e-15 -1.500000000000e+00 -6.799085154804e-04 0.000000000000e+00 6.799085154789e-04 1.500000000000e-15 -2.000000000000e+00 -7.288498272459e-04 0.000000000000e+00 7.288498272439e-04 2.000000000000e-15 -2.500000000000e+00 -7.503511322795e-04 0.000000000000e+00 7.503511322770e-04 2.500000000000e-15 -3.000000000000e+00 -7.577614212746e-04 0.000000000000e+00 7.577614212716e-04 3.000000000000e-15 -3.500000000000e+00 -7.594965110161e-04 0.000000000000e+00 7.594965110126e-04 3.500000000000e-15 -4.000000000000e+00 -7.606437860141e-04 0.000000000000e+00 7.606437860101e-04 4.000000000000e-15 -4.500000000000e+00 -7.616866357079e-04 0.000000000000e+00 7.616866357034e-04 4.500000000000e-15 -5.000000000000e+00 -7.626453046521e-04 0.000000000000e+00 7.626453046471e-04 5.000000000000e-15 -5.500000000000e+00 -7.635366186255e-04 0.000000000000e+00 7.635366186200e-04 5.500000000000e-15 -6.000000000000e+00 -7.643739038648e-04 0.000000000000e+00 7.643739038588e-04 6.000000000000e-15 -6.500000000000e+00 -7.651674087660e-04 0.000000000000e+00 7.651674087595e-04 6.500000000000e-15 -7.000000000000e+00 -7.659249556628e-04 0.000000000000e+00 7.659249556558e-04 7.000000000000e-15 -7.500000000000e+00 -7.666525381089e-04 0.000000000000e+00 7.666525381014e-04 7.500000000000e-15 -8.000000000000e+00 -7.673547927854e-04 0.000000000000e+00 7.673547927774e-04 8.000000000000e-15 -8.500000000000e+00 -7.680353512683e-04 0.000000000000e+00 7.680353512598e-04 8.500000000000e-15 -9.000000000000e+00 -7.686970963063e-04 0.000000000000e+00 7.686970962973e-04 9.000000000000e-15 -9.500000000000e+00 -7.693423473798e-04 0.000000000000e+00 7.693423473703e-04 9.500000000000e-15 -1.000000000000e+01 -7.699729953846e-04 0.000000000000e+00 7.699729953746e-04 1.000000000000e-14 -1.050000000000e+01 -7.705906010853e-04 0.000000000000e+00 7.705906010748e-04 1.050000000000e-14 -1.100000000000e+01 -7.711964677766e-04 0.000000000000e+00 7.711964677656e-04 1.100000000000e-14 -1.150000000000e+01 -7.717916954934e-04 0.000000000000e+00 7.717916954819e-04 1.150000000000e-14 -1.200000000000e+01 -7.723772219164e-04 0.000000000000e+00 7.723772219044e-04 1.200000000000e-14 -1.250000000000e+01 -7.729538535938e-04 0.000000000000e+00 7.729538535813e-04 1.250000000000e-14 -1.300000000000e+01 -7.735222900406e-04 0.000000000000e+00 7.735222900276e-04 1.300000000000e-14 -1.350000000000e+01 -7.740831425449e-04 0.000000000000e+00 7.740831425314e-04 1.350000000000e-14 -1.400000000000e+01 -7.746369489978e-04 0.000000000000e+00 7.746369489838e-04 1.400000000000e-14 -1.450000000000e+01 -7.751841857049e-04 0.000000000000e+00 7.751841856904e-04 1.450000000000e-14 -1.500000000000e+01 -7.757252768829e-04 0.000000000000e+00 7.757252768679e-04 1.500000000000e-14 -1.550000000000e+01 -7.762606023642e-04 0.000000000000e+00 7.762606023487e-04 1.550000000000e-14 -1.600000000000e+01 -7.767905039006e-04 0.000000000000e+00 7.767905038846e-04 1.600000000000e-14 -1.650000000000e+01 -7.773152903609e-04 0.000000000000e+00 7.773152903444e-04 1.650000000000e-14 -1.700000000000e+01 -7.778352420502e-04 0.000000000000e+00 7.778352420332e-04 1.700000000000e-14 -1.750000000000e+01 -7.783506143240e-04 0.000000000000e+00 7.783506143065e-04 1.750000000000e-14 -1.800000000000e+01 -7.788616406312e-04 0.000000000000e+00 7.788616406132e-04 1.800000000000e-14 -1.850000000000e+01 -7.793685350945e-04 0.000000000000e+00 7.793685350760e-04 1.850000000000e-14 -1.900000000000e+01 -7.798714947090e-04 0.000000000000e+00 7.798714946900e-04 1.900000000000e-14 -1.950000000000e+01 -7.803707012274e-04 0.000000000000e+00 7.803707012079e-04 1.950000000000e-14 -2.000000000000e+01 -7.808663227843e-04 0.000000000000e+00 7.808663227643e-04 2.000000000000e-14 -1.000000000000e+00 -1.543555774108e-03 0.000000000000e+00 1.543555774107e-03 1.000000000000e-15 -1.500000000000e+00 -1.963150891946e-03 0.000000000000e+00 1.963150891944e-03 1.500000000000e-15 -2.000000000000e+00 -2.256250847558e-03 0.000000000000e+00 2.256250847556e-03 2.000000000000e-15 -2.500000000000e+00 -2.466689937149e-03 0.000000000000e+00 2.466689937147e-03 2.500000000000e-15 -3.000000000000e+00 -2.620775441106e-03 0.000000000000e+00 2.620775441103e-03 3.000000000000e-15 -3.500000000000e+00 -2.735195681988e-03 0.000000000000e+00 2.735195681985e-03 3.500000000000e-15 -4.000000000000e+00 -2.821029598156e-03 0.000000000000e+00 2.821029598152e-03 4.000000000000e-15 -4.500000000000e+00 -2.885898961628e-03 0.000000000000e+00 2.885898961624e-03 4.500000000000e-15 -5.000000000000e+00 -2.935194920183e-03 0.000000000000e+00 2.935194920178e-03 5.000000000000e-15 -5.500000000000e+00 -2.972813836749e-03 0.000000000000e+00 2.972813836744e-03 5.500000000000e-15 -6.000000000000e+00 -3.001617910129e-03 0.000000000000e+00 3.001617910123e-03 6.000000000000e-15 -6.500000000000e+00 -3.023734513834e-03 0.000000000000e+00 3.023734513828e-03 6.500000000000e-15 -7.000000000000e+00 -3.040757853995e-03 0.000000000000e+00 3.040757853988e-03 7.000000000000e-15 -7.500000000000e+00 -3.053889527859e-03 0.000000000000e+00 3.053889527852e-03 7.500000000000e-15 -8.000000000000e+00 -3.064039297456e-03 0.000000000000e+00 3.064039297448e-03 8.000000000000e-15 -8.500000000000e+00 -3.071898758938e-03 0.000000000000e+00 3.071898758930e-03 8.500000000000e-15 -9.000000000000e+00 -3.077995815717e-03 0.000000000000e+00 3.077995815708e-03 9.000000000000e-15 -9.500000000000e+00 -3.082735224587e-03 0.000000000000e+00 3.082735224578e-03 9.500000000000e-15 -1.000000000000e+01 -3.086428953021e-03 0.000000000000e+00 3.086428953011e-03 1.000000000000e-14 -1.050000000000e+01 -3.089319147270e-03 0.000000000000e+00 3.089319147260e-03 1.050000000000e-14 -1.100000000000e+01 -3.091596000914e-03 0.000000000000e+00 3.091596000903e-03 1.100000000000e-14 -1.150000000000e+01 -3.093412957236e-03 0.000000000000e+00 3.093412957224e-03 1.150000000000e-14 -1.200000000000e+01 -3.094903726769e-03 0.000000000000e+00 3.094903726757e-03 1.200000000000e-14 -1.250000000000e+01 -3.096206064475e-03 0.000000000000e+00 3.096206064462e-03 1.250000000000e-14 -1.300000000000e+01 -3.097437036054e-03 0.000000000000e+00 3.097437036041e-03 1.300000000000e-14 -1.350000000000e+01 -3.098633212036e-03 0.000000000000e+00 3.098633212022e-03 1.350000000000e-14 -1.400000000000e+01 -3.099800026640e-03 0.000000000000e+00 3.099800026626e-03 1.400000000000e-14 -1.450000000000e+01 -3.100939898961e-03 0.000000000000e+00 3.100939898946e-03 1.450000000000e-14 -1.500000000000e+01 -3.102054880968e-03 0.000000000000e+00 3.102054880953e-03 1.500000000000e-14 -1.550000000000e+01 -3.103146827734e-03 0.000000000000e+00 3.103146827718e-03 1.550000000000e-14 -1.600000000000e+01 -3.104217421874e-03 0.000000000000e+00 3.104217421858e-03 1.600000000000e-14 -1.650000000000e+01 -3.105268188715e-03 0.000000000000e+00 3.105268188698e-03 1.650000000000e-14 -1.700000000000e+01 -3.106300510622e-03 0.000000000000e+00 3.106300510605e-03 1.700000000000e-14 -1.750000000000e+01 -3.107315640710e-03 0.000000000000e+00 3.107315640693e-03 1.750000000000e-14 -1.800000000000e+01 -3.108314715694e-03 0.000000000000e+00 3.108314715676e-03 1.800000000000e-14 -1.850000000000e+01 -3.109298767746e-03 0.000000000000e+00 3.109298767727e-03 1.850000000000e-14 -1.900000000000e+01 -3.110268735294e-03 0.000000000000e+00 3.110268735275e-03 1.900000000000e-14 -1.950000000000e+01 -3.111225472784e-03 0.000000000000e+00 3.111225472765e-03 1.950000000000e-14 -2.000000000000e+01 -3.112169759437e-03 0.000000000000e+00 3.112169759417e-03 2.000000000000e-14 -1.000000000000e+00 -2.748622033420e-05 0.000000000000e+00 2.748622033320e-05 1.000000000000e-15 -1.500000000000e+00 -2.760624988438e-05 0.000000000000e+00 2.760624988288e-05 1.500000000000e-15 -2.000000000000e+00 -2.770448747463e-05 0.000000000000e+00 2.770448747263e-05 2.000000000000e-15 -2.500000000000e+00 -2.779253209862e-05 0.000000000000e+00 2.779253209612e-05 2.500000000000e-15 -3.000000000000e+00 -2.787424858703e-05 0.000000000000e+00 2.787424858403e-05 3.000000000000e-15 -3.500000000000e+00 -2.795154027989e-05 0.000000000000e+00 2.795154027639e-05 3.500000000000e-15 -4.000000000000e+00 -2.802551272587e-05 0.000000000000e+00 2.802551272187e-05 4.000000000000e-15 -4.500000000000e+00 -2.809687721312e-05 0.000000000000e+00 2.809687720862e-05 4.500000000000e-15 -5.000000000000e+00 -2.816612416381e-05 0.000000000000e+00 2.816612415881e-05 5.000000000000e-15 -5.500000000000e+00 -2.823360901969e-05 0.000000000000e+00 2.823360901419e-05 5.500000000000e-15 -6.000000000000e+00 -2.829959930075e-05 0.000000000000e+00 2.829959929475e-05 6.000000000000e-15 -6.500000000000e+00 -2.836430239989e-05 0.000000000000e+00 2.836430239339e-05 6.500000000000e-15 -7.000000000000e+00 -2.842788297888e-05 0.000000000000e+00 2.842788297188e-05 7.000000000000e-15 -7.500000000000e+00 -2.849047436961e-05 0.000000000000e+00 2.849047436211e-05 7.500000000000e-15 -8.000000000000e+00 -2.855218633259e-05 0.000000000000e+00 2.855218632459e-05 8.000000000000e-15 -8.500000000000e+00 -2.861311050421e-05 0.000000000000e+00 2.861311049571e-05 8.500000000000e-15 -9.000000000000e+00 -2.867332432355e-05 0.000000000000e+00 2.867332431455e-05 9.000000000000e-15 -9.500000000000e+00 -2.873289392813e-05 0.000000000000e+00 2.873289391863e-05 9.500000000000e-15 -1.000000000000e+01 -2.879187633157e-05 0.000000000000e+00 2.879187632157e-05 1.000000000000e-14 -1.050000000000e+01 -2.885032108984e-05 0.000000000000e+00 2.885032107934e-05 1.050000000000e-14 -1.100000000000e+01 -2.890827159551e-05 0.000000000000e+00 2.890827158451e-05 1.100000000000e-14 -1.150000000000e+01 -2.896576609705e-05 0.000000000000e+00 2.896576608555e-05 1.150000000000e-14 -1.200000000000e+01 -2.902283851110e-05 0.000000000000e+00 2.902283849910e-05 1.200000000000e-14 -1.250000000000e+01 -2.907951907720e-05 0.000000000000e+00 2.907951906470e-05 1.250000000000e-14 -1.300000000000e+01 -2.913583489052e-05 0.000000000000e+00 2.913583487752e-05 1.300000000000e-14 -1.350000000000e+01 -2.919181033947e-05 0.000000000000e+00 2.919181032597e-05 1.350000000000e-14 -1.400000000000e+01 -2.924746746803e-05 0.000000000000e+00 2.924746745403e-05 1.400000000000e-14 -1.450000000000e+01 -2.930282627814e-05 0.000000000000e+00 2.930282626364e-05 1.450000000000e-14 -1.500000000000e+01 -2.935790498374e-05 0.000000000000e+00 2.935790496874e-05 1.500000000000e-14 -1.550000000000e+01 -2.941272022567e-05 0.000000000000e+00 2.941272021017e-05 1.550000000000e-14 -1.600000000000e+01 -2.946728725448e-05 0.000000000000e+00 2.946728723848e-05 1.600000000000e-14 -1.650000000000e+01 -2.952162008688e-05 0.000000000000e+00 2.952162007038e-05 1.650000000000e-14 -1.700000000000e+01 -2.957573164030e-05 0.000000000000e+00 2.957573162330e-05 1.700000000000e-14 -1.750000000000e+01 -2.962963384913e-05 0.000000000000e+00 2.962963383163e-05 1.750000000000e-14 -1.800000000000e+01 -2.968333776574e-05 0.000000000000e+00 2.968333774774e-05 1.800000000000e-14 -1.850000000000e+01 -2.973685364850e-05 0.000000000000e+00 2.973685363000e-05 1.850000000000e-14 -1.900000000000e+01 -2.979019103887e-05 0.000000000000e+00 2.979019101987e-05 1.900000000000e-14 -1.950000000000e+01 -2.984335882910e-05 0.000000000000e+00 2.984335880960e-05 1.950000000000e-14 -2.000000000000e+01 -2.989636532204e-05 0.000000000000e+00 2.989636530204e-05 2.000000000000e-14 -1.000000000000e+00 -2.707185939506e-04 0.000000000000e+00 2.707185939496e-04 1.000000000000e-15 -1.500000000000e+00 -3.343922828617e-04 0.000000000000e+00 3.343922828602e-04 1.500000000000e-15 -2.000000000000e+00 -3.702780612155e-04 0.000000000000e+00 3.702780612135e-04 2.000000000000e-15 -2.500000000000e+00 -3.894916936753e-04 0.000000000000e+00 3.894916936728e-04 2.500000000000e-15 -3.000000000000e+00 -3.991966279167e-04 0.000000000000e+00 3.991966279137e-04 3.000000000000e-15 -3.500000000000e+00 -4.037409620801e-04 0.000000000000e+00 4.037409620766e-04 3.500000000000e-15 -4.000000000000e+00 -4.056809381092e-04 0.000000000000e+00 4.056809381052e-04 4.000000000000e-15 -4.500000000000e+00 -4.065556197725e-04 0.000000000000e+00 4.065556197680e-04 4.500000000000e-15 -5.000000000000e+00 -4.071673247143e-04 0.000000000000e+00 4.071673247093e-04 5.000000000000e-15 -5.500000000000e+00 -4.077149671725e-04 0.000000000000e+00 4.077149671670e-04 5.500000000000e-15 -6.000000000000e+00 -4.082252966382e-04 0.000000000000e+00 4.082252966322e-04 6.000000000000e-15 -6.500000000000e+00 -4.087066180578e-04 0.000000000000e+00 4.087066180513e-04 6.500000000000e-15 -7.000000000000e+00 -4.091642657887e-04 0.000000000000e+00 4.091642657817e-04 7.000000000000e-15 -7.500000000000e+00 -4.096022155581e-04 0.000000000000e+00 4.096022155506e-04 7.500000000000e-15 -8.000000000000e+00 -4.100235277581e-04 0.000000000000e+00 4.100235277501e-04 8.000000000000e-15 -8.500000000000e+00 -4.104305976370e-04 0.000000000000e+00 4.104305976285e-04 8.500000000000e-15 -9.000000000000e+00 -4.108253268439e-04 0.000000000000e+00 4.108253268349e-04 9.000000000000e-15 -9.500000000000e+00 -4.112092458653e-04 0.000000000000e+00 4.112092458558e-04 9.500000000000e-15 -1.000000000000e+01 -4.115836026003e-04 0.000000000000e+00 4.115836025903e-04 1.000000000000e-14 -1.050000000000e+01 -4.119494270980e-04 0.000000000000e+00 4.119494270875e-04 1.050000000000e-14 -1.100000000000e+01 -4.123075793733e-04 0.000000000000e+00 4.123075793623e-04 1.100000000000e-14 -1.150000000000e+01 -4.126587851199e-04 0.000000000000e+00 4.126587851084e-04 1.150000000000e-14 -1.200000000000e+01 -4.130036626873e-04 0.000000000000e+00 4.130036626753e-04 1.200000000000e-14 -1.250000000000e+01 -4.133427436939e-04 0.000000000000e+00 4.133427436814e-04 1.250000000000e-14 -1.300000000000e+01 -4.136764889517e-04 0.000000000000e+00 4.136764889387e-04 1.300000000000e-14 -1.350000000000e+01 -4.140053009034e-04 0.000000000000e+00 4.140053008899e-04 1.350000000000e-14 -1.400000000000e+01 -4.143295334357e-04 0.000000000000e+00 4.143295334217e-04 1.400000000000e-14 -1.450000000000e+01 -4.146494996999e-04 0.000000000000e+00 4.146494996854e-04 1.450000000000e-14 -1.500000000000e+01 -4.149654784020e-04 0.000000000000e+00 4.149654783870e-04 1.500000000000e-14 -1.550000000000e+01 -4.152777189069e-04 0.000000000000e+00 4.152777188914e-04 1.550000000000e-14 -1.600000000000e+01 -4.155864454153e-04 0.000000000000e+00 4.155864453993e-04 1.600000000000e-14 -1.650000000000e+01 -4.158918604082e-04 0.000000000000e+00 4.158918603917e-04 1.650000000000e-14 -1.700000000000e+01 -4.161941475092e-04 0.000000000000e+00 4.161941474922e-04 1.700000000000e-14 -1.750000000000e+01 -4.164934738784e-04 0.000000000000e+00 4.164934738609e-04 1.750000000000e-14 -1.800000000000e+01 -4.167899922292e-04 0.000000000000e+00 4.167899922112e-04 1.800000000000e-14 -1.850000000000e+01 -4.170838425366e-04 0.000000000000e+00 4.170838425181e-04 1.850000000000e-14 -1.900000000000e+01 -4.173751534931e-04 0.000000000000e+00 4.173751534741e-04 1.900000000000e-14 -1.950000000000e+01 -4.176640437567e-04 0.000000000000e+00 4.176640437372e-04 1.950000000000e-14 -2.000000000000e+01 -4.179506230252e-04 0.000000000000e+00 4.179506230052e-04 2.000000000000e-14 -1.000000000000e+00 -6.458864801915e-04 0.000000000000e+00 6.458864801905e-04 1.000000000000e-15 -1.500000000000e+00 -8.754180713573e-04 0.000000000000e+00 8.754180713558e-04 1.500000000000e-15 -2.000000000000e+00 -1.054395236724e-03 0.000000000000e+00 1.054395236722e-03 2.000000000000e-15 -2.500000000000e+00 -1.193685212383e-03 0.000000000000e+00 1.193685212380e-03 2.500000000000e-15 -3.000000000000e+00 -1.302142456522e-03 0.000000000000e+00 1.302142456519e-03 3.000000000000e-15 -3.500000000000e+00 -1.386683549402e-03 0.000000000000e+00 1.386683549398e-03 3.500000000000e-15 -4.000000000000e+00 -1.452661564153e-03 0.000000000000e+00 1.452661564149e-03 4.000000000000e-15 -4.500000000000e+00 -1.504216754883e-03 0.000000000000e+00 1.504216754878e-03 4.500000000000e-15 -5.000000000000e+00 -1.544556625069e-03 0.000000000000e+00 1.544556625064e-03 5.000000000000e-15 -5.500000000000e+00 -1.576171009962e-03 0.000000000000e+00 1.576171009957e-03 5.500000000000e-15 -6.000000000000e+00 -1.600995360586e-03 0.000000000000e+00 1.600995360580e-03 6.000000000000e-15 -6.500000000000e+00 -1.620534747761e-03 0.000000000000e+00 1.620534747755e-03 6.500000000000e-15 -7.000000000000e+00 -1.635958897738e-03 0.000000000000e+00 1.635958897731e-03 7.000000000000e-15 -7.500000000000e+00 -1.648175977471e-03 0.000000000000e+00 1.648175977464e-03 7.500000000000e-15 -8.000000000000e+00 -1.657890466415e-03 0.000000000000e+00 1.657890466407e-03 8.000000000000e-15 -8.500000000000e+00 -1.665648705340e-03 0.000000000000e+00 1.665648705331e-03 8.500000000000e-15 -9.000000000000e+00 -1.671874649816e-03 0.000000000000e+00 1.671874649807e-03 9.000000000000e-15 -9.500000000000e+00 -1.676897767045e-03 0.000000000000e+00 1.676897767035e-03 9.500000000000e-15 -1.000000000000e+01 -1.680974662157e-03 0.000000000000e+00 1.680974662147e-03 1.000000000000e-14 -1.050000000000e+01 -1.684305757194e-03 0.000000000000e+00 1.684305757183e-03 1.050000000000e-14 -1.100000000000e+01 -1.687048114814e-03 0.000000000000e+00 1.687048114803e-03 1.100000000000e-14 -1.150000000000e+01 -1.689325289378e-03 0.000000000000e+00 1.689325289367e-03 1.150000000000e-14 -1.200000000000e+01 -1.691234904638e-03 0.000000000000e+00 1.691234904626e-03 1.200000000000e-14 -1.250000000000e+01 -1.692854503919e-03 0.000000000000e+00 1.692854503907e-03 1.250000000000e-14 -1.300000000000e+01 -1.694246094615e-03 0.000000000000e+00 1.694246094602e-03 1.300000000000e-14 -1.350000000000e+01 -1.695459708095e-03 0.000000000000e+00 1.695459708081e-03 1.350000000000e-14 -1.400000000000e+01 -1.696536203255e-03 0.000000000000e+00 1.696536203241e-03 1.400000000000e-14 -1.450000000000e+01 -1.697509421306e-03 0.000000000000e+00 1.697509421291e-03 1.450000000000e-14 -1.500000000000e+01 -1.698407593347e-03 0.000000000000e+00 1.698407593332e-03 1.500000000000e-14 -1.550000000000e+01 -1.699253673000e-03 0.000000000000e+00 1.699253672985e-03 1.550000000000e-14 -1.600000000000e+01 -1.700064641936e-03 0.000000000000e+00 1.700064641920e-03 1.600000000000e-14 -1.650000000000e+01 -1.700851223925e-03 0.000000000000e+00 1.700851223908e-03 1.650000000000e-14 -1.700000000000e+01 -1.701619292321e-03 0.000000000000e+00 1.701619292304e-03 1.700000000000e-14 -1.750000000000e+01 -1.702371953778e-03 0.000000000000e+00 1.702371953761e-03 1.750000000000e-14 -1.800000000000e+01 -1.703111003492e-03 0.000000000000e+00 1.703111003474e-03 1.800000000000e-14 -1.850000000000e+01 -1.703837643256e-03 0.000000000000e+00 1.703837643237e-03 1.850000000000e-14 -1.900000000000e+01 -1.704552789752e-03 0.000000000000e+00 1.704552789733e-03 1.900000000000e-14 -1.950000000000e+01 -1.705257204038e-03 0.000000000000e+00 1.705257204019e-03 1.950000000000e-14 -2.000000000000e+01 -1.705951548398e-03 0.000000000000e+00 1.705951548378e-03 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0.standard0000644000265600020320000010243012264261473023730 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -4.426305730363e-10 0.000000000000e+00 4.426285730315e-10 2.000000000000e-15 -1.500000000000e+00 -1.045835378120e-06 0.000000000000e+00 1.045835376120e-06 2.000000000000e-15 -2.000000000000e+00 -1.075424321572e-05 0.000000000000e+00 1.075424321372e-05 2.000000000000e-15 -2.500000000000e+00 -3.224821476713e-05 0.000000000000e+00 3.224821476513e-05 2.000000000000e-15 -3.000000000000e+00 -6.493525409131e-05 0.000000000000e+00 6.493525408931e-05 2.000000000000e-15 -3.500000000000e+00 -1.075135259372e-04 0.000000000000e+00 1.075135259352e-04 2.000000000000e-15 -4.000000000000e+00 -1.549540899400e-04 0.000000000000e+00 1.549540899380e-04 2.000000000000e-15 -4.500000000000e+00 -1.998680783237e-04 0.000000000000e+00 1.998680783217e-04 2.000000000000e-15 -5.000000000000e+00 -2.402803896219e-04 0.000000000000e+00 2.402803896199e-04 2.000000000000e-15 -5.500000000000e+00 -2.759018292818e-04 0.000000000000e+00 2.759018292798e-04 2.000000000000e-15 -6.000000000000e+00 -3.070720919927e-04 0.000000000000e+00 3.070720919907e-04 2.000000000000e-15 -6.500000000000e+00 -3.343409577657e-04 0.000000000000e+00 3.343409577637e-04 2.000000000000e-15 -7.000000000000e+00 -3.582781586319e-04 0.000000000000e+00 3.582781586299e-04 2.000000000000e-15 -7.500000000000e+00 -3.793986597804e-04 0.000000000000e+00 3.793986597784e-04 2.000000000000e-15 -8.000000000000e+00 -3.981420215903e-04 0.000000000000e+00 3.981420215883e-04 2.000000000000e-15 -8.500000000000e+00 -4.148741243924e-04 0.000000000000e+00 4.148741243904e-04 2.000000000000e-15 -9.000000000000e+00 -4.298965309103e-04 0.000000000000e+00 4.298965309083e-04 2.000000000000e-15 -9.500000000000e+00 -4.434572876614e-04 0.000000000000e+00 4.434572876594e-04 2.000000000000e-15 -1.000000000000e+01 -4.557608501611e-04 0.000000000000e+00 4.557608501591e-04 2.000000000000e-15 -1.050000000000e+01 -4.669764647811e-04 0.000000000000e+00 4.669764647791e-04 2.000000000000e-15 -1.100000000000e+01 -4.772449865338e-04 0.000000000000e+00 4.772449865318e-04 2.000000000000e-15 -1.150000000000e+01 -4.866843311512e-04 0.000000000000e+00 4.866843311492e-04 2.000000000000e-15 -1.200000000000e+01 -4.953938059813e-04 0.000000000000e+00 4.953938059793e-04 2.000000000000e-15 -1.250000000000e+01 -5.034575464780e-04 0.000000000000e+00 5.034575464760e-04 2.000000000000e-15 -1.300000000000e+01 -5.109472485640e-04 0.000000000000e+00 5.109472485620e-04 2.000000000000e-15 -1.350000000000e+01 -5.179243494658e-04 0.000000000000e+00 5.179243494638e-04 2.000000000000e-15 -1.400000000000e+01 -5.244417767623e-04 0.000000000000e+00 5.244417767603e-04 2.000000000000e-15 -1.450000000000e+01 -5.305453586648e-04 0.000000000000e+00 5.305453586628e-04 2.000000000000e-15 -1.500000000000e+01 -5.362749675118e-04 0.000000000000e+00 5.362749675098e-04 2.000000000000e-15 -1.550000000000e+01 -5.416654521995e-04 0.000000000000e+00 5.416654521975e-04 2.000000000000e-15 -1.600000000000e+01 -5.467474027674e-04 0.000000000000e+00 5.467474027654e-04 2.000000000000e-15 -1.650000000000e+01 -5.515477807955e-04 0.000000000000e+00 5.515477807935e-04 2.000000000000e-15 -1.700000000000e+01 -5.560904419304e-04 0.000000000000e+00 5.560904419284e-04 2.000000000000e-15 -1.750000000000e+01 -5.603965712271e-04 0.000000000000e+00 5.603965712251e-04 2.000000000000e-15 -1.800000000000e+01 -5.644850476471e-04 0.000000000000e+00 5.644850476451e-04 2.000000000000e-15 -1.850000000000e+01 -5.683727506902e-04 0.000000000000e+00 5.683727506882e-04 2.000000000000e-15 -1.900000000000e+01 -5.720748195223e-04 0.000000000000e+00 5.720748195203e-04 2.000000000000e-15 -1.950000000000e+01 -5.756048729105e-04 0.000000000000e+00 5.756048729085e-04 2.000000000000e-15 -2.000000000000e+01 -5.789751966756e-04 0.000000000000e+00 5.789751966736e-04 2.000000000000e-15 -1.000000000000e+00 -4.812529478659e-10 0.000000000000e+00 4.812479478646e-10 5.000000000000e-15 -1.500000000000e+00 -1.088538206458e-06 0.000000000000e+00 1.088538201459e-06 5.000000000000e-15 -2.000000000000e+00 -1.097748079614e-05 0.000000000000e+00 1.097748079114e-05 5.000000000000e-15 -2.500000000000e+00 -3.275527023033e-05 0.000000000000e+00 3.275527022533e-05 5.000000000000e-15 -3.000000000000e+00 -6.583141848532e-05 0.000000000000e+00 6.583141848032e-05 5.000000000000e-15 -3.500000000000e+00 -1.089600005448e-04 0.000000000000e+00 1.089600005398e-04 5.000000000000e-15 -4.000000000000e+00 -1.608218382751e-04 0.000000000000e+00 1.608218382701e-04 5.000000000000e-15 -4.500000000000e+00 -2.202055437683e-04 0.000000000000e+00 2.202055437633e-04 5.000000000000e-15 -5.000000000000e+00 -2.860495517129e-04 0.000000000000e+00 2.860495517079e-04 5.000000000000e-15 -5.500000000000e+00 -3.569679017447e-04 0.000000000000e+00 3.569679017397e-04 5.000000000000e-15 -6.000000000000e+00 -4.284786036775e-04 0.000000000000e+00 4.284786036725e-04 5.000000000000e-15 -6.500000000000e+00 -4.972104103581e-04 0.000000000000e+00 4.972104103531e-04 5.000000000000e-15 -7.000000000000e+00 -5.613786001565e-04 0.000000000000e+00 5.613786001515e-04 5.000000000000e-15 -7.500000000000e+00 -6.200532261164e-04 0.000000000000e+00 6.200532261114e-04 5.000000000000e-15 -8.000000000000e+00 -6.729821593481e-04 0.000000000000e+00 6.729821593431e-04 5.000000000000e-15 -8.500000000000e+00 -7.203625168579e-04 0.000000000000e+00 7.203625168529e-04 5.000000000000e-15 -9.000000000000e+00 -7.626352580461e-04 0.000000000000e+00 7.626352580411e-04 5.000000000000e-15 -9.500000000000e+00 -8.003396209908e-04 0.000000000000e+00 8.003396209858e-04 5.000000000000e-15 -1.000000000000e+01 -8.340251385728e-04 0.000000000000e+00 8.340251385678e-04 5.000000000000e-15 -1.050000000000e+01 -8.642059378115e-04 0.000000000000e+00 8.642059378065e-04 5.000000000000e-15 -1.100000000000e+01 -8.913415575936e-04 0.000000000000e+00 8.913415575886e-04 5.000000000000e-15 -1.150000000000e+01 -9.158325081893e-04 0.000000000000e+00 9.158325081843e-04 5.000000000000e-15 -1.200000000000e+01 -9.380231158226e-04 0.000000000000e+00 9.380231158176e-04 5.000000000000e-15 -1.250000000000e+01 -9.582074108535e-04 0.000000000000e+00 9.582074108485e-04 5.000000000000e-15 -1.300000000000e+01 -9.766358430092e-04 0.000000000000e+00 9.766358430042e-04 5.000000000000e-15 -1.350000000000e+01 -9.935217650646e-04 0.000000000000e+00 9.935217650596e-04 5.000000000000e-15 -1.400000000000e+01 -1.009047245815e-03 0.000000000000e+00 1.009047245810e-03 5.000000000000e-15 -1.450000000000e+01 -1.023368085458e-03 0.000000000000e+00 1.023368085453e-03 5.000000000000e-15 -1.500000000000e+01 -1.036618052860e-03 0.000000000000e+00 1.036618052855e-03 5.000000000000e-15 -1.550000000000e+01 -1.048912424654e-03 0.000000000000e+00 1.048912424649e-03 5.000000000000e-15 -1.600000000000e+01 -1.060350924108e-03 0.000000000000e+00 1.060350924103e-03 5.000000000000e-15 -1.650000000000e+01 -1.071020155928e-03 0.000000000000e+00 1.071020155923e-03 5.000000000000e-15 -1.700000000000e+01 -1.080995623308e-03 0.000000000000e+00 1.080995623303e-03 5.000000000000e-15 -1.750000000000e+01 -1.090343401153e-03 0.000000000000e+00 1.090343401148e-03 5.000000000000e-15 -1.800000000000e+01 -1.099121527282e-03 0.000000000000e+00 1.099121527277e-03 5.000000000000e-15 -1.850000000000e+01 -1.107381162472e-03 0.000000000000e+00 1.107381162467e-03 5.000000000000e-15 -1.900000000000e+01 -1.115167560922e-03 0.000000000000e+00 1.115167560917e-03 5.000000000000e-15 -1.950000000000e+01 -1.122520884943e-03 0.000000000000e+00 1.122520884938e-03 5.000000000000e-15 -2.000000000000e+01 -1.129476891344e-03 0.000000000000e+00 1.129476891339e-03 5.000000000000e-15 -1.000000000000e+00 -5.501073346847e-10 0.000000000000e+00 5.500973353280e-10 1.000000000000e-14 -1.500000000000e+00 -1.156146111601e-06 0.000000000000e+00 1.156146101601e-06 1.000000000000e-14 -2.000000000000e+00 -1.129493415970e-05 0.000000000000e+00 1.129493414970e-05 1.000000000000e-14 -2.500000000000e+00 -3.341743532436e-05 0.000000000000e+00 3.341743531436e-05 1.000000000000e-14 -3.000000000000e+00 -6.689126592846e-05 0.000000000000e+00 6.689126591846e-05 1.000000000000e-14 -3.500000000000e+00 -1.104531829802e-04 0.000000000000e+00 1.104531829702e-04 1.000000000000e-14 -4.000000000000e+00 -1.627865514844e-04 0.000000000000e+00 1.627865514744e-04 1.000000000000e-14 -4.500000000000e+00 -2.226970690102e-04 0.000000000000e+00 2.226970690002e-04 1.000000000000e-14 -5.000000000000e+00 -2.891471633120e-04 0.000000000000e+00 2.891471633020e-04 1.000000000000e-14 -5.500000000000e+00 -3.612436482790e-04 0.000000000000e+00 3.612436482690e-04 1.000000000000e-14 -6.000000000000e+00 -4.382135426671e-04 0.000000000000e+00 4.382135426571e-04 1.000000000000e-14 -6.500000000000e+00 -5.193798936692e-04 0.000000000000e+00 5.193798936592e-04 1.000000000000e-14 -7.000000000000e+00 -6.041387329432e-04 0.000000000000e+00 6.041387329332e-04 1.000000000000e-14 -7.500000000000e+00 -6.913476308938e-04 0.000000000000e+00 6.913476308838e-04 1.000000000000e-14 -8.000000000000e+00 -7.782565534369e-04 0.000000000000e+00 7.782565534269e-04 1.000000000000e-14 -8.500000000000e+00 -8.628250837783e-04 0.000000000000e+00 8.628250837683e-04 1.000000000000e-14 -9.000000000000e+00 -9.434259667445e-04 0.000000000000e+00 9.434259667345e-04 1.000000000000e-14 -9.500000000000e+00 -1.018785915702e-03 0.000000000000e+00 1.018785915692e-03 1.000000000000e-14 -1.000000000000e+01 -1.088108718671e-03 0.000000000000e+00 1.088108718661e-03 1.000000000000e-14 -1.050000000000e+01 -1.151092237530e-03 0.000000000000e+00 1.151092237520e-03 1.000000000000e-14 -1.100000000000e+01 -1.207838433099e-03 0.000000000000e+00 1.207838433089e-03 1.000000000000e-14 -1.150000000000e+01 -1.258719336258e-03 0.000000000000e+00 1.258719336248e-03 1.000000000000e-14 -1.200000000000e+01 -1.304251787793e-03 0.000000000000e+00 1.304251787783e-03 1.000000000000e-14 -1.250000000000e+01 -1.345004116390e-03 0.000000000000e+00 1.345004116380e-03 1.000000000000e-14 -1.300000000000e+01 -1.381536907529e-03 0.000000000000e+00 1.381536907519e-03 1.000000000000e-14 -1.350000000000e+01 -1.414370787045e-03 0.000000000000e+00 1.414370787035e-03 1.000000000000e-14 -1.400000000000e+01 -1.443972383344e-03 0.000000000000e+00 1.443972383334e-03 1.000000000000e-14 -1.450000000000e+01 -1.470751138815e-03 0.000000000000e+00 1.470751138805e-03 1.000000000000e-14 -1.500000000000e+01 -1.495061897328e-03 0.000000000000e+00 1.495061897318e-03 1.000000000000e-14 -1.550000000000e+01 -1.517210128998e-03 0.000000000000e+00 1.517210128988e-03 1.000000000000e-14 -1.600000000000e+01 -1.537458010162e-03 0.000000000000e+00 1.537458010152e-03 1.000000000000e-14 -1.650000000000e+01 -1.556030429024e-03 0.000000000000e+00 1.556030429014e-03 1.000000000000e-14 -1.700000000000e+01 -1.573120484933e-03 0.000000000000e+00 1.573120484923e-03 1.000000000000e-14 -1.750000000000e+01 -1.588894322540e-03 0.000000000000e+00 1.588894322530e-03 1.000000000000e-14 -1.800000000000e+01 -1.603495282916e-03 0.000000000000e+00 1.603495282906e-03 1.000000000000e-14 -1.850000000000e+01 -1.617047419833e-03 0.000000000000e+00 1.617047419823e-03 1.000000000000e-14 -1.900000000000e+01 -1.629658455467e-03 0.000000000000e+00 1.629658455457e-03 1.000000000000e-14 -1.950000000000e+01 -1.641422255136e-03 0.000000000000e+00 1.641422255126e-03 1.000000000000e-14 -2.000000000000e+01 -1.652420896310e-03 0.000000000000e+00 1.652420896300e-03 1.000000000000e-14 -1.000000000000e+00 -1.995775506664e-13 0.000000000000e+00 1.975774957398e-13 2.000000000000e-15 -1.500000000000e+00 -1.047392721439e-07 0.000000000000e+00 1.047392701440e-07 2.000000000000e-15 -2.000000000000e+00 -8.606809638312e-06 0.000000000000e+00 8.606809636311e-06 2.000000000000e-15 -2.500000000000e+00 -3.511156102829e-05 0.000000000000e+00 3.511156102629e-05 2.000000000000e-15 -3.000000000000e+00 -7.874886622083e-05 0.000000000000e+00 7.874886621883e-05 2.000000000000e-15 -3.500000000000e+00 -1.368423102713e-04 0.000000000000e+00 1.368423102693e-04 2.000000000000e-15 -4.000000000000e+00 -2.025558671519e-04 0.000000000000e+00 2.025558671499e-04 2.000000000000e-15 -4.500000000000e+00 -2.620271152275e-04 0.000000000000e+00 2.620271152255e-04 2.000000000000e-15 -5.000000000000e+00 -3.127336282177e-04 0.000000000000e+00 3.127336282157e-04 2.000000000000e-15 -5.500000000000e+00 -3.552269394909e-04 0.000000000000e+00 3.552269394889e-04 2.000000000000e-15 -6.000000000000e+00 -3.907585785533e-04 0.000000000000e+00 3.907585785513e-04 2.000000000000e-15 -6.500000000000e+00 -4.206174198113e-04 0.000000000000e+00 4.206174198093e-04 2.000000000000e-15 -7.000000000000e+00 -4.459130672226e-04 0.000000000000e+00 4.459130672206e-04 2.000000000000e-15 -7.500000000000e+00 -4.675397642210e-04 0.000000000000e+00 4.675397642190e-04 2.000000000000e-15 -8.000000000000e+00 -4.862005267696e-04 0.000000000000e+00 4.862005267676e-04 2.000000000000e-15 -8.500000000000e+00 -5.024443547921e-04 0.000000000000e+00 5.024443547901e-04 2.000000000000e-15 -9.000000000000e+00 -5.167007886426e-04 0.000000000000e+00 5.167007886406e-04 2.000000000000e-15 -9.500000000000e+00 -5.293079355252e-04 0.000000000000e+00 5.293079355232e-04 2.000000000000e-15 -1.000000000000e+01 -5.405340554879e-04 0.000000000000e+00 5.405340554859e-04 2.000000000000e-15 -1.050000000000e+01 -5.505938538384e-04 0.000000000000e+00 5.505938538364e-04 2.000000000000e-15 -1.100000000000e+01 -5.596607050953e-04 0.000000000000e+00 5.596607050933e-04 2.000000000000e-15 -1.150000000000e+01 -5.678758351542e-04 0.000000000000e+00 5.678758351522e-04 2.000000000000e-15 -1.200000000000e+01 -5.753552522497e-04 0.000000000000e+00 5.753552522477e-04 2.000000000000e-15 -1.250000000000e+01 -5.821950142871e-04 0.000000000000e+00 5.821950142851e-04 2.000000000000e-15 -1.300000000000e+01 -5.884752629307e-04 0.000000000000e+00 5.884752629287e-04 2.000000000000e-15 -1.350000000000e+01 -5.942633383703e-04 0.000000000000e+00 5.942633383683e-04 2.000000000000e-15 -1.400000000000e+01 -5.996162040215e-04 0.000000000000e+00 5.996162040195e-04 2.000000000000e-15 -1.450000000000e+01 -6.045823493142e-04 0.000000000000e+00 6.045823493122e-04 2.000000000000e-15 -1.500000000000e+01 -6.092032946398e-04 0.000000000000e+00 6.092032946378e-04 2.000000000000e-15 -1.550000000000e+01 -6.135147906487e-04 0.000000000000e+00 6.135147906467e-04 2.000000000000e-15 -1.600000000000e+01 -6.175477808992e-04 0.000000000000e+00 6.175477808972e-04 2.000000000000e-15 -1.650000000000e+01 -6.213291798992e-04 0.000000000000e+00 6.213291798972e-04 2.000000000000e-15 -1.700000000000e+01 -6.248825060867e-04 0.000000000000e+00 6.248825060847e-04 2.000000000000e-15 -1.750000000000e+01 -6.282284000231e-04 0.000000000000e+00 6.282284000211e-04 2.000000000000e-15 -1.800000000000e+01 -6.313850511426e-04 0.000000000000e+00 6.313850511406e-04 2.000000000000e-15 -1.850000000000e+01 -6.343685511880e-04 0.000000000000e+00 6.343685511860e-04 2.000000000000e-15 -1.900000000000e+01 -6.371931885027e-04 0.000000000000e+00 6.371931885007e-04 2.000000000000e-15 -1.950000000000e+01 -6.398716943336e-04 0.000000000000e+00 6.398716943316e-04 2.000000000000e-15 -2.000000000000e+01 -6.424154499750e-04 0.000000000000e+00 6.424154499730e-04 2.000000000000e-15 -1.000000000000e+00 -2.254967046422e-13 0.000000000000e+00 2.204968259733e-13 5.000000000000e-15 -1.500000000000e+00 -1.142990938541e-07 0.000000000000e+00 1.142990888541e-07 5.000000000000e-15 -2.000000000000e+00 -8.824565543768e-06 0.000000000000e+00 8.824565538768e-06 5.000000000000e-15 -2.500000000000e+00 -3.570621308578e-05 0.000000000000e+00 3.570621308078e-05 5.000000000000e-15 -3.000000000000e+00 -7.985695330936e-05 0.000000000000e+00 7.985695330436e-05 5.000000000000e-15 -3.500000000000e+00 -1.386235911312e-04 0.000000000000e+00 1.386235911262e-04 5.000000000000e-15 -4.000000000000e+00 -2.093599794188e-04 0.000000000000e+00 2.093599794138e-04 5.000000000000e-15 -4.500000000000e+00 -2.898015849077e-04 0.000000000000e+00 2.898015849027e-04 5.000000000000e-15 -5.000000000000e+00 -3.780795110067e-04 0.000000000000e+00 3.780795110017e-04 5.000000000000e-15 -5.500000000000e+00 -4.718415655984e-04 0.000000000000e+00 4.718415655934e-04 5.000000000000e-15 -6.000000000000e+00 -5.628163824802e-04 0.000000000000e+00 5.628163824752e-04 5.000000000000e-15 -6.500000000000e+00 -6.460958786933e-04 0.000000000000e+00 6.460958786883e-04 5.000000000000e-15 -7.000000000000e+00 -7.199971649255e-04 0.000000000000e+00 7.199971649205e-04 5.000000000000e-15 -7.500000000000e+00 -7.843324346099e-04 0.000000000000e+00 7.843324346049e-04 5.000000000000e-15 -8.000000000000e+00 -8.398107688100e-04 0.000000000000e+00 8.398107688050e-04 5.000000000000e-15 -8.500000000000e+00 -8.875245316811e-04 0.000000000000e+00 8.875245316761e-04 5.000000000000e-15 -9.000000000000e+00 -9.286296880942e-04 0.000000000000e+00 9.286296880892e-04 5.000000000000e-15 -9.500000000000e+00 -9.641904216691e-04 0.000000000000e+00 9.641904216641e-04 5.000000000000e-15 -1.000000000000e+01 -9.951239857045e-04 0.000000000000e+00 9.951239856995e-04 5.000000000000e-15 -1.050000000000e+01 -1.022195556412e-03 0.000000000000e+00 1.022195556407e-03 5.000000000000e-15 -1.100000000000e+01 -1.046033632550e-03 0.000000000000e+00 1.046033632545e-03 5.000000000000e-15 -1.150000000000e+01 -1.067151360517e-03 0.000000000000e+00 1.067151360512e-03 5.000000000000e-15 -1.200000000000e+01 -1.085967450634e-03 0.000000000000e+00 1.085967450629e-03 5.000000000000e-15 -1.250000000000e+01 -1.102824405173e-03 0.000000000000e+00 1.102824405168e-03 5.000000000000e-15 -1.300000000000e+01 -1.118003577350e-03 0.000000000000e+00 1.118003577345e-03 5.000000000000e-15 -1.350000000000e+01 -1.131737291484e-03 0.000000000000e+00 1.131737291479e-03 5.000000000000e-15 -1.400000000000e+01 -1.144218477014e-03 0.000000000000e+00 1.144218477009e-03 5.000000000000e-15 -1.450000000000e+01 -1.155608288381e-03 0.000000000000e+00 1.155608288376e-03 5.000000000000e-15 -1.500000000000e+01 -1.166042128123e-03 0.000000000000e+00 1.166042128118e-03 5.000000000000e-15 -1.550000000000e+01 -1.175634417134e-03 0.000000000000e+00 1.175634417129e-03 5.000000000000e-15 -1.600000000000e+01 -1.184482386052e-03 0.000000000000e+00 1.184482386047e-03 5.000000000000e-15 -1.650000000000e+01 -1.192669102087e-03 0.000000000000e+00 1.192669102082e-03 5.000000000000e-15 -1.700000000000e+01 -1.200265897558e-03 0.000000000000e+00 1.200265897553e-03 5.000000000000e-15 -1.750000000000e+01 -1.207334328678e-03 0.000000000000e+00 1.207334328673e-03 5.000000000000e-15 -1.800000000000e+01 -1.213927763982e-03 0.000000000000e+00 1.213927763977e-03 5.000000000000e-15 -1.850000000000e+01 -1.220092679361e-03 0.000000000000e+00 1.220092679356e-03 5.000000000000e-15 -1.900000000000e+01 -1.225869719531e-03 0.000000000000e+00 1.225869719526e-03 5.000000000000e-15 -1.950000000000e+01 -1.231294572586e-03 0.000000000000e+00 1.231294572581e-03 5.000000000000e-15 -2.000000000000e+01 -1.236398694205e-03 0.000000000000e+00 1.236398694200e-03 5.000000000000e-15 -1.000000000000e+00 -2.732640502767e-13 0.000000000000e+00 2.632642442266e-13 1.000000000000e-14 -1.500000000000e+00 -1.310719981726e-07 0.000000000000e+00 1.310719881728e-07 1.000000000000e-14 -2.000000000000e+00 -9.145869843641e-06 0.000000000000e+00 9.145869833642e-06 1.000000000000e-14 -2.500000000000e+00 -3.650296683071e-05 0.000000000000e+00 3.650296682071e-05 1.000000000000e-14 -3.000000000000e+00 -8.119076845006e-05 0.000000000000e+00 8.119076844006e-05 1.000000000000e-14 -3.500000000000e+00 -1.405176931307e-04 0.000000000000e+00 1.405176931207e-04 1.000000000000e-14 -4.000000000000e+00 -2.118449918084e-04 0.000000000000e+00 2.118449917984e-04 1.000000000000e-14 -4.500000000000e+00 -2.929459608956e-04 0.000000000000e+00 2.929459608856e-04 1.000000000000e-14 -5.000000000000e+00 -3.820056040115e-04 0.000000000000e+00 3.820056040015e-04 1.000000000000e-14 -5.500000000000e+00 -4.775419128059e-04 0.000000000000e+00 4.775419127959e-04 1.000000000000e-14 -6.000000000000e+00 -5.783228627168e-04 0.000000000000e+00 5.783228627068e-04 1.000000000000e-14 -6.500000000000e+00 -6.832960267303e-04 0.000000000000e+00 6.832960267203e-04 1.000000000000e-14 -7.000000000000e+00 -7.915189426437e-04 0.000000000000e+00 7.915189426337e-04 1.000000000000e-14 -7.500000000000e+00 -8.999519715060e-04 0.000000000000e+00 8.999519714960e-04 1.000000000000e-14 -8.000000000000e+00 -1.003659831151e-03 0.000000000000e+00 1.003659831141e-03 1.000000000000e-14 -8.500000000000e+00 -1.099885789587e-03 0.000000000000e+00 1.099885789577e-03 1.000000000000e-14 -9.000000000000e+00 -1.186841664084e-03 0.000000000000e+00 1.186841664074e-03 1.000000000000e-14 -9.500000000000e+00 -1.263813880299e-03 0.000000000000e+00 1.263813880289e-03 1.000000000000e-14 -1.000000000000e+01 -1.331029651038e-03 0.000000000000e+00 1.331029651028e-03 1.000000000000e-14 -1.050000000000e+01 -1.389312732568e-03 0.000000000000e+00 1.389312732558e-03 1.000000000000e-14 -1.100000000000e+01 -1.439748638681e-03 0.000000000000e+00 1.439748638671e-03 1.000000000000e-14 -1.150000000000e+01 -1.483457392374e-03 0.000000000000e+00 1.483457392364e-03 1.000000000000e-14 -1.200000000000e+01 -1.521473232623e-03 0.000000000000e+00 1.521473232613e-03 1.000000000000e-14 -1.250000000000e+01 -1.554697302872e-03 0.000000000000e+00 1.554697302862e-03 1.000000000000e-14 -1.300000000000e+01 -1.583890645871e-03 0.000000000000e+00 1.583890645861e-03 1.000000000000e-14 -1.350000000000e+01 -1.609685708908e-03 0.000000000000e+00 1.609685708898e-03 1.000000000000e-14 -1.400000000000e+01 -1.632604283998e-03 0.000000000000e+00 1.632604283988e-03 1.000000000000e-14 -1.450000000000e+01 -1.653076048348e-03 0.000000000000e+00 1.653076048338e-03 1.000000000000e-14 -1.500000000000e+01 -1.671455287621e-03 0.000000000000e+00 1.671455287611e-03 1.000000000000e-14 -1.550000000000e+01 -1.688035067238e-03 0.000000000000e+00 1.688035067228e-03 1.000000000000e-14 -1.600000000000e+01 -1.703058865555e-03 0.000000000000e+00 1.703058865545e-03 1.000000000000e-14 -1.650000000000e+01 -1.716729968503e-03 0.000000000000e+00 1.716729968493e-03 1.000000000000e-14 -1.700000000000e+01 -1.729218997563e-03 0.000000000000e+00 1.729218997553e-03 1.000000000000e-14 -1.750000000000e+01 -1.740669925475e-03 0.000000000000e+00 1.740669925465e-03 1.000000000000e-14 -1.800000000000e+01 -1.751204885141e-03 0.000000000000e+00 1.751204885131e-03 1.000000000000e-14 -1.850000000000e+01 -1.760928022522e-03 0.000000000000e+00 1.760928022512e-03 1.000000000000e-14 -1.900000000000e+01 -1.769928594221e-03 0.000000000000e+00 1.769928594211e-03 1.000000000000e-14 -1.950000000000e+01 -1.778283468259e-03 0.000000000000e+00 1.778283468249e-03 1.000000000000e-14 -2.000000000000e+01 -1.786059152299e-03 0.000000000000e+00 1.786059152289e-03 1.000000000000e-14 -1.000000000000e+00 -2.394635508528e-07 0.000000000000e+00 2.394635488528e-07 2.000000000000e-15 -1.500000000000e+00 -3.880194845156e-06 0.000000000000e+00 3.880194843156e-06 2.000000000000e-15 -2.000000000000e+00 -1.384702846320e-05 0.000000000000e+00 1.384702846120e-05 2.000000000000e-15 -2.500000000000e+00 -3.049617071761e-05 0.000000000000e+00 3.049617071561e-05 2.000000000000e-15 -3.000000000000e+00 -5.354201428022e-05 0.000000000000e+00 5.354201427822e-05 2.000000000000e-15 -3.500000000000e+00 -8.194348823564e-05 0.000000000000e+00 8.194348823364e-05 2.000000000000e-15 -4.000000000000e+00 -1.122283199278e-04 0.000000000000e+00 1.122283199258e-04 2.000000000000e-15 -4.500000000000e+00 -1.419112369642e-04 0.000000000000e+00 1.419112369622e-04 2.000000000000e-15 -5.000000000000e+00 -1.699112480172e-04 0.000000000000e+00 1.699112480152e-04 2.000000000000e-15 -5.500000000000e+00 -1.957984466370e-04 0.000000000000e+00 1.957984466350e-04 2.000000000000e-15 -6.000000000000e+00 -2.194936089211e-04 0.000000000000e+00 2.194936089191e-04 2.000000000000e-15 -6.500000000000e+00 -2.410950347724e-04 0.000000000000e+00 2.410950347704e-04 2.000000000000e-15 -7.000000000000e+00 -2.607781032845e-04 0.000000000000e+00 2.607781032825e-04 2.000000000000e-15 -7.500000000000e+00 -2.787406861497e-04 0.000000000000e+00 2.787406861477e-04 2.000000000000e-15 -8.000000000000e+00 -2.951761462368e-04 0.000000000000e+00 2.951761462348e-04 2.000000000000e-15 -8.500000000000e+00 -3.102616587110e-04 0.000000000000e+00 3.102616587090e-04 2.000000000000e-15 -9.000000000000e+00 -3.241544335461e-04 0.000000000000e+00 3.241544335441e-04 2.000000000000e-15 -9.500000000000e+00 -3.369917155349e-04 0.000000000000e+00 3.369917155329e-04 2.000000000000e-15 -1.000000000000e+01 -3.488924048772e-04 0.000000000000e+00 3.488924048752e-04 2.000000000000e-15 -1.050000000000e+01 -3.599592251281e-04 0.000000000000e+00 3.599592251261e-04 2.000000000000e-15 -1.100000000000e+01 -3.702809340491e-04 0.000000000000e+00 3.702809340471e-04 2.000000000000e-15 -1.150000000000e+01 -3.799343612090e-04 0.000000000000e+00 3.799343612070e-04 2.000000000000e-15 -1.200000000000e+01 -3.889861974497e-04 0.000000000000e+00 3.889861974477e-04 2.000000000000e-15 -1.250000000000e+01 -3.974945273817e-04 0.000000000000e+00 3.974945273797e-04 2.000000000000e-15 -1.300000000000e+01 -4.055101244565e-04 0.000000000000e+00 4.055101244545e-04 2.000000000000e-15 -1.350000000000e+01 -4.130775381638e-04 0.000000000000e+00 4.130775381618e-04 2.000000000000e-15 -1.400000000000e+01 -4.202360043029e-04 0.000000000000e+00 4.202360043009e-04 2.000000000000e-15 -1.450000000000e+01 -4.270202069756e-04 0.000000000000e+00 4.270202069736e-04 2.000000000000e-15 -1.500000000000e+01 -4.334609173160e-04 0.000000000000e+00 4.334609173140e-04 2.000000000000e-15 -1.550000000000e+01 -4.395855301448e-04 0.000000000000e+00 4.395855301428e-04 2.000000000000e-15 -1.600000000000e+01 -4.454185161841e-04 0.000000000000e+00 4.454185161821e-04 2.000000000000e-15 -1.650000000000e+01 -4.509818043792e-04 0.000000000000e+00 4.509818043772e-04 2.000000000000e-15 -1.700000000000e+01 -4.562951062622e-04 0.000000000000e+00 4.562951062602e-04 2.000000000000e-15 -1.750000000000e+01 -4.613761921371e-04 0.000000000000e+00 4.613761921351e-04 2.000000000000e-15 -1.800000000000e+01 -4.662411270953e-04 0.000000000000e+00 4.662411270933e-04 2.000000000000e-15 -1.850000000000e+01 -4.709044734296e-04 0.000000000000e+00 4.709044734276e-04 2.000000000000e-15 -1.900000000000e+01 -4.753794648469e-04 0.000000000000e+00 4.753794648449e-04 2.000000000000e-15 -1.950000000000e+01 -4.796781569257e-04 0.000000000000e+00 4.796781569237e-04 2.000000000000e-15 -2.000000000000e+01 -4.838115574967e-04 0.000000000000e+00 4.838115574947e-04 2.000000000000e-15 -1.000000000000e+00 -2.503516419953e-07 0.000000000000e+00 2.503516369954e-07 5.000000000000e-15 -1.500000000000e+00 -3.969291805184e-06 0.000000000000e+00 3.969291800184e-06 5.000000000000e-15 -2.000000000000e+00 -1.407780515899e-05 0.000000000000e+00 1.407780515399e-05 5.000000000000e-15 -2.500000000000e+00 -3.092815836740e-05 0.000000000000e+00 3.092815836240e-05 5.000000000000e-15 -3.000000000000e+00 -5.425214224038e-05 0.000000000000e+00 5.425214223538e-05 5.000000000000e-15 -3.500000000000e+00 -8.359428512605e-05 0.000000000000e+00 8.359428512105e-05 5.000000000000e-15 -4.000000000000e+00 -1.184463659379e-04 0.000000000000e+00 1.184463659329e-04 5.000000000000e-15 -4.500000000000e+00 -1.583045995777e-04 0.000000000000e+00 1.583045995727e-04 5.000000000000e-15 -5.000000000000e+00 -2.026668377784e-04 0.000000000000e+00 2.026668377734e-04 5.000000000000e-15 -5.500000000000e+00 -2.503979385154e-04 0.000000000000e+00 2.503979385104e-04 5.000000000000e-15 -6.000000000000e+00 -2.995259293350e-04 0.000000000000e+00 2.995259293300e-04 5.000000000000e-15 -6.500000000000e+00 -3.485820170744e-04 0.000000000000e+00 3.485820170694e-04 5.000000000000e-15 -7.000000000000e+00 -3.964519626740e-04 0.000000000000e+00 3.964519626690e-04 5.000000000000e-15 -7.500000000000e+00 -4.423171437847e-04 0.000000000000e+00 4.423171437797e-04 5.000000000000e-15 -8.000000000000e+00 -4.856530230011e-04 0.000000000000e+00 4.856530229961e-04 5.000000000000e-15 -8.500000000000e+00 -5.261908531895e-04 0.000000000000e+00 5.261908531845e-04 5.000000000000e-15 -9.000000000000e+00 -5.638574283677e-04 0.000000000000e+00 5.638574283627e-04 5.000000000000e-15 -9.500000000000e+00 -5.987136784313e-04 0.000000000000e+00 5.987136784263e-04 5.000000000000e-15 -1.000000000000e+01 -6.309029463913e-04 0.000000000000e+00 6.309029463863e-04 5.000000000000e-15 -1.050000000000e+01 -6.606122252224e-04 0.000000000000e+00 6.606122252174e-04 5.000000000000e-15 -1.100000000000e+01 -6.880456121798e-04 0.000000000000e+00 6.880456121748e-04 5.000000000000e-15 -1.150000000000e+01 -7.134075560978e-04 0.000000000000e+00 7.134075560928e-04 5.000000000000e-15 -1.200000000000e+01 -7.368931775007e-04 0.000000000000e+00 7.368931774957e-04 5.000000000000e-15 -1.250000000000e+01 -7.586833198196e-04 0.000000000000e+00 7.586833198146e-04 5.000000000000e-15 -1.300000000000e+01 -7.789425718730e-04 0.000000000000e+00 7.789425718680e-04 5.000000000000e-15 -1.350000000000e+01 -7.978190467739e-04 0.000000000000e+00 7.978190467689e-04 5.000000000000e-15 -1.400000000000e+01 -8.154451269601e-04 0.000000000000e+00 8.154451269551e-04 5.000000000000e-15 -1.450000000000e+01 -8.319386845211e-04 0.000000000000e+00 8.319386845161e-04 5.000000000000e-15 -1.500000000000e+01 -8.474044846386e-04 0.000000000000e+00 8.474044846336e-04 5.000000000000e-15 -1.550000000000e+01 -8.619356062136e-04 0.000000000000e+00 8.619356062086e-04 5.000000000000e-15 -1.600000000000e+01 -8.756147914203e-04 0.000000000000e+00 8.756147914153e-04 5.000000000000e-15 -1.650000000000e+01 -8.885156822971e-04 0.000000000000e+00 8.885156822921e-04 5.000000000000e-15 -1.700000000000e+01 -9.007039292924e-04 0.000000000000e+00 9.007039292874e-04 5.000000000000e-15 -1.750000000000e+01 -9.122381715392e-04 0.000000000000e+00 9.122381715342e-04 5.000000000000e-15 -1.800000000000e+01 -9.231708963291e-04 0.000000000000e+00 9.231708963241e-04 5.000000000000e-15 -1.850000000000e+01 -9.335491887728e-04 0.000000000000e+00 9.335491887678e-04 5.000000000000e-15 -1.900000000000e+01 -9.434153837645e-04 0.000000000000e+00 9.434153837595e-04 5.000000000000e-15 -1.950000000000e+01 -9.528076322109e-04 0.000000000000e+00 9.528076322059e-04 5.000000000000e-15 -2.000000000000e+01 -9.617603926679e-04 0.000000000000e+00 9.617603926629e-04 5.000000000000e-15 -1.000000000000e+00 -2.679027742559e-07 0.000000000000e+00 2.679027642556e-07 1.000000000000e-14 -1.500000000000e+00 -4.098944617844e-06 0.000000000000e+00 4.098944607843e-06 1.000000000000e-14 -2.000000000000e+00 -1.438981793813e-05 0.000000000000e+00 1.438981792813e-05 1.000000000000e-14 -2.500000000000e+00 -3.147057725722e-05 0.000000000000e+00 3.147057724722e-05 1.000000000000e-14 -3.000000000000e+00 -5.506183800344e-05 0.000000000000e+00 5.506183799344e-05 1.000000000000e-14 -3.500000000000e+00 -8.470414537999e-05 0.000000000000e+00 8.470414536999e-05 1.000000000000e-14 -4.000000000000e+00 -1.198920383958e-04 0.000000000000e+00 1.198920383858e-04 1.000000000000e-14 -4.500000000000e+00 -1.601299682547e-04 0.000000000000e+00 1.601299682447e-04 1.000000000000e-14 -5.000000000000e+00 -2.049544158724e-04 0.000000000000e+00 2.049544158624e-04 1.000000000000e-14 -5.500000000000e+00 -2.539402441449e-04 0.000000000000e+00 2.539402441349e-04 1.000000000000e-14 -6.000000000000e+00 -3.067000673646e-04 0.000000000000e+00 3.067000673546e-04 1.000000000000e-14 -6.500000000000e+00 -3.628805737408e-04 0.000000000000e+00 3.628805737308e-04 1.000000000000e-14 -7.000000000000e+00 -4.221353091499e-04 0.000000000000e+00 4.221353091399e-04 1.000000000000e-14 -7.500000000000e+00 -4.837979033237e-04 0.000000000000e+00 4.837979033137e-04 1.000000000000e-14 -8.000000000000e+00 -5.467990689898e-04 0.000000000000e+00 5.467990689798e-04 1.000000000000e-14 -8.500000000000e+00 -6.102085111601e-04 0.000000000000e+00 6.102085111501e-04 1.000000000000e-14 -9.000000000000e+00 -6.731646691227e-04 0.000000000000e+00 6.731646691127e-04 1.000000000000e-14 -9.500000000000e+00 -7.348497882651e-04 0.000000000000e+00 7.348497882551e-04 1.000000000000e-14 -1.000000000000e+01 -7.945322033524e-04 0.000000000000e+00 7.945322033424e-04 1.000000000000e-14 -1.050000000000e+01 -8.516159515351e-04 0.000000000000e+00 8.516159515251e-04 1.000000000000e-14 -1.100000000000e+01 -9.056731345244e-04 0.000000000000e+00 9.056731345144e-04 1.000000000000e-14 -1.150000000000e+01 -9.564497085811e-04 0.000000000000e+00 9.564497085711e-04 1.000000000000e-14 -1.200000000000e+01 -1.003848066165e-03 0.000000000000e+00 1.003848066155e-03 1.000000000000e-14 -1.250000000000e+01 -1.047896116351e-03 0.000000000000e+00 1.047896116341e-03 1.000000000000e-14 -1.300000000000e+01 -1.088712502499e-03 0.000000000000e+00 1.088712502489e-03 1.000000000000e-14 -1.350000000000e+01 -1.126474510046e-03 0.000000000000e+00 1.126474510036e-03 1.000000000000e-14 -1.400000000000e+01 -1.161391890863e-03 0.000000000000e+00 1.161391890853e-03 1.000000000000e-14 -1.450000000000e+01 -1.193687396439e-03 0.000000000000e+00 1.193687396429e-03 1.000000000000e-14 -1.500000000000e+01 -1.223583415621e-03 0.000000000000e+00 1.223583415611e-03 1.000000000000e-14 -1.550000000000e+01 -1.251293523747e-03 0.000000000000e+00 1.251293523737e-03 1.000000000000e-14 -1.600000000000e+01 -1.277017663590e-03 0.000000000000e+00 1.277017663580e-03 1.000000000000e-14 -1.650000000000e+01 -1.300939840705e-03 0.000000000000e+00 1.300939840695e-03 1.000000000000e-14 -1.700000000000e+01 -1.323227460717e-03 0.000000000000e+00 1.323227460707e-03 1.000000000000e-14 -1.750000000000e+01 -1.344031675280e-03 0.000000000000e+00 1.344031675270e-03 1.000000000000e-14 -1.800000000000e+01 -1.363488301262e-03 0.000000000000e+00 1.363488301252e-03 1.000000000000e-14 -1.850000000000e+01 -1.381719026637e-03 0.000000000000e+00 1.381719026627e-03 1.000000000000e-14 -1.900000000000e+01 -1.398832722371e-03 0.000000000000e+00 1.398832722361e-03 1.000000000000e-14 -1.950000000000e+01 -1.414926751507e-03 0.000000000000e+00 1.414926751497e-03 1.000000000000e-14 -2.000000000000e+01 -1.430088213945e-03 0.000000000000e+00 1.430088213935e-03 1.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_ld2.standard0000644000265600020320000010243012264261473023222 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.596736091696e-06 0.000000000000e+00 2.596736090683e-06 1.012500000000e-15 -1.500000000000e+00 -2.599493653648e-06 0.000000000000e+00 2.599493652135e-06 1.512500000000e-15 -2.000000000000e+00 -2.601797192202e-06 0.000000000000e+00 2.601797190190e-06 2.012500000000e-15 -2.500000000000e+00 -2.603869700020e-06 0.000000000000e+00 2.603869697508e-06 2.512500000000e-15 -3.000000000000e+00 -2.605795100531e-06 0.000000000000e+00 2.605795097518e-06 3.012500000000e-15 -3.500000000000e+00 -2.607615589507e-06 0.000000000000e+00 2.607615585994e-06 3.512500000000e-15 -4.000000000000e+00 -2.609356127637e-06 0.000000000000e+00 2.609356123625e-06 4.012500000000e-15 -4.500000000000e+00 -2.611033023554e-06 0.000000000000e+00 2.611033019042e-06 4.512500000000e-15 -5.000000000000e+00 -2.612657665435e-06 0.000000000000e+00 2.612657660422e-06 5.012500000000e-15 -5.500000000000e+00 -2.614238393876e-06 0.000000000000e+00 2.614238388363e-06 5.512500000000e-15 -6.000000000000e+00 -2.615781541346e-06 0.000000000000e+00 2.615781535334e-06 6.012500000000e-15 -6.500000000000e+00 -2.617292053369e-06 0.000000000000e+00 2.617292046857e-06 6.512500000000e-15 -7.000000000000e+00 -2.618773881386e-06 0.000000000000e+00 2.618773874373e-06 7.012500000000e-15 -7.500000000000e+00 -2.620230242619e-06 0.000000000000e+00 2.620230235107e-06 7.512500000000e-15 -8.000000000000e+00 -2.621663798349e-06 0.000000000000e+00 2.621663790336e-06 8.012500000000e-15 -8.500000000000e+00 -2.623076779971e-06 0.000000000000e+00 2.623076771458e-06 8.512500000000e-15 -9.000000000000e+00 -2.624471080459e-06 0.000000000000e+00 2.624471071446e-06 9.012500000000e-15 -9.500000000000e+00 -2.625848322184e-06 0.000000000000e+00 2.625848312672e-06 9.512500000000e-15 -1.000000000000e+01 -2.627209908182e-06 0.000000000000e+00 2.627209898170e-06 1.001250000000e-14 -1.050000000000e+01 -2.628557061552e-06 0.000000000000e+00 2.628557051040e-06 1.051250000000e-14 -1.100000000000e+01 -2.629890856194e-06 0.000000000000e+00 2.629890845182e-06 1.101250000000e-14 -1.150000000000e+01 -2.631212241105e-06 0.000000000000e+00 2.631212229593e-06 1.151250000000e-14 -1.200000000000e+01 -2.632522059805e-06 0.000000000000e+00 2.632522047793e-06 1.201250000000e-14 -1.250000000000e+01 -2.633821066047e-06 0.000000000000e+00 2.633821053534e-06 1.251250000000e-14 -1.300000000000e+01 -2.635109936633e-06 0.000000000000e+00 2.635109923621e-06 1.301250000000e-14 -1.350000000000e+01 -2.636389281984e-06 0.000000000000e+00 2.636389268471e-06 1.351250000000e-14 -1.400000000000e+01 -2.637659654891e-06 0.000000000000e+00 2.637659640880e-06 1.401250000000e-14 -1.450000000000e+01 -2.638921557861e-06 0.000000000000e+00 2.638921543349e-06 1.451250000000e-14 -1.500000000000e+01 -2.640175449277e-06 0.000000000000e+00 2.640175434266e-06 1.501250000000e-14 -1.550000000000e+01 -2.641421748643e-06 0.000000000000e+00 2.641421733131e-06 1.551250000000e-14 -1.600000000000e+01 -2.642660841033e-06 0.000000000000e+00 2.642660825021e-06 1.601250000000e-14 -1.650000000000e+01 -2.643893080927e-06 0.000000000000e+00 2.643893064415e-06 1.651250000000e-14 -1.700000000000e+01 -2.645118795497e-06 0.000000000000e+00 2.645118778485e-06 1.701250000000e-14 -1.750000000000e+01 -2.646338287463e-06 0.000000000000e+00 2.646338269951e-06 1.751250000000e-14 -1.800000000000e+01 -2.647551837573e-06 0.000000000000e+00 2.647551819561e-06 1.801250000000e-14 -1.850000000000e+01 -2.648759706767e-06 0.000000000000e+00 2.648759688254e-06 1.851250000000e-14 -1.900000000000e+01 -2.649962138079e-06 0.000000000000e+00 2.649962119066e-06 1.901250000000e-14 -1.950000000000e+01 -2.651159358308e-06 0.000000000000e+00 2.651159338796e-06 1.951250000000e-14 -2.000000000000e+01 -2.652351579494e-06 0.000000000000e+00 2.652351559482e-06 2.001250000000e-14 -1.000000000000e+00 -5.075627997100e-05 0.000000000000e+00 5.075627996999e-05 1.012500000000e-15 -1.500000000000e+00 -6.498896971489e-05 0.000000000000e+00 6.498896971338e-05 1.512500000000e-15 -2.000000000000e+00 -7.355526208777e-05 0.000000000000e+00 7.355526208576e-05 2.012500000000e-15 -2.500000000000e+00 -7.816841379800e-05 0.000000000000e+00 7.816841379549e-05 2.512500000000e-15 -3.000000000000e+00 -8.030799354001e-05 0.000000000000e+00 8.030799353700e-05 3.012500000000e-15 -3.500000000000e+00 -8.106188693038e-05 0.000000000000e+00 8.106188692687e-05 3.512500000000e-15 -4.000000000000e+00 -8.120249306589e-05 0.000000000000e+00 8.120249306188e-05 4.012500000000e-15 -4.500000000000e+00 -8.124123737914e-05 0.000000000000e+00 8.124123737463e-05 4.512500000000e-15 -5.000000000000e+00 -8.127447948830e-05 0.000000000000e+00 8.127447948329e-05 5.012500000000e-15 -5.500000000000e+00 -8.130464414267e-05 0.000000000000e+00 8.130464413716e-05 5.512500000000e-15 -6.000000000000e+00 -8.133239508028e-05 0.000000000000e+00 8.133239507426e-05 6.012500000000e-15 -6.500000000000e+00 -8.135822138378e-05 0.000000000000e+00 8.135822137727e-05 6.512500000000e-15 -7.000000000000e+00 -8.138249022850e-05 0.000000000000e+00 8.138249022148e-05 7.012500000000e-15 -7.500000000000e+00 -8.140547880586e-05 0.000000000000e+00 8.140547879835e-05 7.512500000000e-15 -8.000000000000e+00 -8.142739855334e-05 0.000000000000e+00 8.142739854532e-05 8.012500000000e-15 -8.500000000000e+00 -8.144841286973e-05 0.000000000000e+00 8.144841286122e-05 8.512500000000e-15 -9.000000000000e+00 -8.146864982803e-05 0.000000000000e+00 8.146864981902e-05 9.012500000000e-15 -9.500000000000e+00 -8.148821125760e-05 0.000000000000e+00 8.148821124808e-05 9.512500000000e-15 -1.000000000000e+01 -8.150717925468e-05 0.000000000000e+00 8.150717924467e-05 1.001250000000e-14 -1.050000000000e+01 -8.152562088604e-05 0.000000000000e+00 8.152562087553e-05 1.051250000000e-14 -1.100000000000e+01 -8.154359162176e-05 0.000000000000e+00 8.154359161075e-05 1.101250000000e-14 -1.150000000000e+01 -8.156113786926e-05 0.000000000000e+00 8.156113785775e-05 1.151250000000e-14 -1.200000000000e+01 -8.157829886614e-05 0.000000000000e+00 8.157829885413e-05 1.201250000000e-14 -1.250000000000e+01 -8.159510811099e-05 0.000000000000e+00 8.159510809847e-05 1.251250000000e-14 -1.300000000000e+01 -8.161159445771e-05 0.000000000000e+00 8.161159444470e-05 1.301250000000e-14 -1.350000000000e+01 -8.162778296206e-05 0.000000000000e+00 8.162778294855e-05 1.351250000000e-14 -1.400000000000e+01 -8.164369554362e-05 0.000000000000e+00 8.164369552961e-05 1.401250000000e-14 -1.450000000000e+01 -8.165935150891e-05 0.000000000000e+00 8.165935149440e-05 1.451250000000e-14 -1.500000000000e+01 -8.167476796881e-05 0.000000000000e+00 8.167476795380e-05 1.501250000000e-14 -1.550000000000e+01 -8.168996017482e-05 0.000000000000e+00 8.168996015931e-05 1.551250000000e-14 -1.600000000000e+01 -8.170494179232e-05 0.000000000000e+00 8.170494177631e-05 1.601250000000e-14 -1.650000000000e+01 -8.171972512443e-05 0.000000000000e+00 8.171972510792e-05 1.651250000000e-14 -1.700000000000e+01 -8.173432129691e-05 0.000000000000e+00 8.173432127990e-05 1.701250000000e-14 -1.750000000000e+01 -8.174874041200e-05 0.000000000000e+00 8.174874039448e-05 1.751250000000e-14 -1.800000000000e+01 -8.176299167723e-05 0.000000000000e+00 8.176299165922e-05 1.801250000000e-14 -1.850000000000e+01 -8.177708351410e-05 0.000000000000e+00 8.177708349559e-05 1.851250000000e-14 -1.900000000000e+01 -8.179102365019e-05 0.000000000000e+00 8.179102363118e-05 1.901250000000e-14 -1.950000000000e+01 -8.180481919782e-05 0.000000000000e+00 8.180481917831e-05 1.951250000000e-14 -2.000000000000e+01 -8.181847672147e-05 0.000000000000e+00 8.181847670146e-05 2.001250000000e-14 -1.000000000000e+00 -1.098295307421e-04 0.000000000000e+00 1.098295307411e-04 1.012500000000e-15 -1.500000000000e+00 -1.560211732726e-04 0.000000000000e+00 1.560211732711e-04 1.512500000000e-15 -2.000000000000e+00 -1.967172269019e-04 0.000000000000e+00 1.967172268999e-04 2.012500000000e-15 -2.500000000000e+00 -2.322840564180e-04 0.000000000000e+00 2.322840564155e-04 2.512500000000e-15 -3.000000000000e+00 -2.631357636133e-04 0.000000000000e+00 2.631357636103e-04 3.012500000000e-15 -3.500000000000e+00 -2.897056832861e-04 0.000000000000e+00 2.897056832826e-04 3.512500000000e-15 -4.000000000000e+00 -3.124281368310e-04 0.000000000000e+00 3.124281368270e-04 4.012500000000e-15 -4.500000000000e+00 -3.317267156075e-04 0.000000000000e+00 3.317267156030e-04 4.512500000000e-15 -5.000000000000e+00 -3.480065090613e-04 0.000000000000e+00 3.480065090562e-04 5.012500000000e-15 -5.500000000000e+00 -3.616487956481e-04 0.000000000000e+00 3.616487956426e-04 5.512500000000e-15 -6.000000000000e+00 -3.730074118112e-04 0.000000000000e+00 3.730074118052e-04 6.012500000000e-15 -6.500000000000e+00 -3.824063675775e-04 0.000000000000e+00 3.824063675709e-04 6.512500000000e-15 -7.000000000000e+00 -3.901384541549e-04 0.000000000000e+00 3.901384541479e-04 7.012500000000e-15 -7.500000000000e+00 -3.964647083945e-04 0.000000000000e+00 3.964647083870e-04 7.512500000000e-15 -8.000000000000e+00 -4.016146874102e-04 0.000000000000e+00 4.016146874022e-04 8.012500000000e-15 -8.500000000000e+00 -4.057875366593e-04 0.000000000000e+00 4.057875366507e-04 8.512500000000e-15 -9.000000000000e+00 -4.091537935411e-04 0.000000000000e+00 4.091537935321e-04 9.012500000000e-15 -9.500000000000e+00 -4.118577879041e-04 0.000000000000e+00 4.118577878946e-04 9.512500000000e-15 -1.000000000000e+01 -4.140204370130e-04 0.000000000000e+00 4.140204370030e-04 1.001250000000e-14 -1.050000000000e+01 -4.157421818662e-04 0.000000000000e+00 4.157421818557e-04 1.051250000000e-14 -1.100000000000e+01 -4.171059326338e-04 0.000000000000e+00 4.171059326228e-04 1.101250000000e-14 -1.150000000000e+01 -4.181797779409e-04 0.000000000000e+00 4.181797779294e-04 1.151250000000e-14 -1.200000000000e+01 -4.190194527370e-04 0.000000000000e+00 4.190194527250e-04 1.201250000000e-14 -1.250000000000e+01 -4.196704941685e-04 0.000000000000e+00 4.196704941560e-04 1.251250000000e-14 -1.300000000000e+01 -4.201700946734e-04 0.000000000000e+00 4.201700946603e-04 1.301250000000e-14 -1.350000000000e+01 -4.205486799722e-04 0.000000000000e+00 4.205486799587e-04 1.351250000000e-14 -1.400000000000e+01 -4.208312575142e-04 0.000000000000e+00 4.208312575002e-04 1.401250000000e-14 -1.450000000000e+01 -4.210385993185e-04 0.000000000000e+00 4.210385993039e-04 1.451250000000e-14 -1.500000000000e+01 -4.211883525950e-04 0.000000000000e+00 4.211883525800e-04 1.501250000000e-14 -1.550000000000e+01 -4.212962111001e-04 0.000000000000e+00 4.212962110845e-04 1.551250000000e-14 -1.600000000000e+01 -4.213770992815e-04 0.000000000000e+00 4.213770992655e-04 1.601250000000e-14 -1.650000000000e+01 -4.214445438029e-04 0.000000000000e+00 4.214445437864e-04 1.651250000000e-14 -1.700000000000e+01 -4.215067091441e-04 0.000000000000e+00 4.215067091271e-04 1.701250000000e-14 -1.750000000000e+01 -4.215663627247e-04 0.000000000000e+00 4.215663627072e-04 1.751250000000e-14 -1.800000000000e+01 -4.216242283702e-04 0.000000000000e+00 4.216242283521e-04 1.801250000000e-14 -1.850000000000e+01 -4.216805511447e-04 0.000000000000e+00 4.216805511262e-04 1.851250000000e-14 -1.900000000000e+01 -4.217354678047e-04 0.000000000000e+00 4.217354677857e-04 1.901250000000e-14 -1.950000000000e+01 -4.217890836171e-04 0.000000000000e+00 4.217890835976e-04 1.951250000000e-14 -2.000000000000e+01 -4.218414895641e-04 0.000000000000e+00 4.218414895441e-04 2.001250000000e-14 -1.000000000000e+00 -2.069469440264e-06 0.000000000000e+00 2.069469439264e-06 1.000000000938e-15 -1.500000000000e+00 -2.071903544733e-06 0.000000000000e+00 2.071903543234e-06 1.500000000938e-15 -2.000000000000e+00 -2.073990596917e-06 0.000000000000e+00 2.073990594917e-06 2.000000000938e-15 -2.500000000000e+00 -2.075899295053e-06 0.000000000000e+00 2.075899292553e-06 2.500000000938e-15 -3.000000000000e+00 -2.077693160933e-06 0.000000000000e+00 2.077693157933e-06 3.000000000938e-15 -3.500000000000e+00 -2.079404429144e-06 0.000000000000e+00 2.079404425644e-06 3.500000000938e-15 -4.000000000000e+00 -2.081052356937e-06 0.000000000000e+00 2.081052352937e-06 4.000000000938e-15 -4.500000000000e+00 -2.082649633862e-06 0.000000000000e+00 2.082649629362e-06 4.500000000938e-15 -5.000000000000e+00 -2.084205182819e-06 0.000000000000e+00 2.084205177819e-06 5.000000000938e-15 -5.500000000000e+00 -2.085725575958e-06 0.000000000000e+00 2.085725570458e-06 5.500000000938e-15 -6.000000000000e+00 -2.087215826254e-06 0.000000000000e+00 2.087215820254e-06 6.000000000938e-15 -6.500000000000e+00 -2.088679863768e-06 0.000000000000e+00 2.088679857267e-06 6.500000000938e-15 -7.000000000000e+00 -2.090120838680e-06 0.000000000000e+00 2.090120831680e-06 7.000000000938e-15 -7.500000000000e+00 -2.091541322809e-06 0.000000000000e+00 2.091541315309e-06 7.500000000938e-15 -8.000000000000e+00 -2.092943448492e-06 0.000000000000e+00 2.092943440492e-06 8.000000000938e-15 -8.500000000000e+00 -2.094329007211e-06 0.000000000000e+00 2.094328998711e-06 8.500000000938e-15 -9.000000000000e+00 -2.095699521385e-06 0.000000000000e+00 2.095699512385e-06 9.000000000938e-15 -9.500000000000e+00 -2.097056297795e-06 0.000000000000e+00 2.097056288295e-06 9.500000000938e-15 -1.000000000000e+01 -2.098400468066e-06 0.000000000000e+00 2.098400458066e-06 1.000000000094e-14 -1.050000000000e+01 -2.099733019874e-06 0.000000000000e+00 2.099733009374e-06 1.050000000094e-14 -1.100000000000e+01 -2.101054821332e-06 0.000000000000e+00 2.101054810332e-06 1.100000000094e-14 -1.150000000000e+01 -2.102366640310e-06 0.000000000000e+00 2.102366628811e-06 1.150000000094e-14 -1.200000000000e+01 -2.103669159920e-06 0.000000000000e+00 2.103669147920e-06 1.200000000094e-14 -1.250000000000e+01 -2.104962991042e-06 0.000000000000e+00 2.104962978542e-06 1.250000000094e-14 -1.300000000000e+01 -2.106248682578e-06 0.000000000000e+00 2.106248669578e-06 1.300000000094e-14 -1.350000000000e+01 -2.107526729900e-06 0.000000000000e+00 2.107526716400e-06 1.350000000094e-14 -1.400000000000e+01 -2.108797581876e-06 0.000000000000e+00 2.108797567876e-06 1.400000000094e-14 -1.450000000000e+01 -2.110061646749e-06 0.000000000000e+00 2.110061632250e-06 1.450000000094e-14 -1.500000000000e+01 -2.111319297103e-06 0.000000000000e+00 2.111319282103e-06 1.500000000094e-14 -1.550000000000e+01 -2.112570874061e-06 0.000000000000e+00 2.112570858561e-06 1.550000000094e-14 -1.600000000000e+01 -2.113816690880e-06 0.000000000000e+00 2.113816674881e-06 1.600000000094e-14 -1.650000000000e+01 -2.115057036035e-06 0.000000000000e+00 2.115057019535e-06 1.650000000094e-14 -1.700000000000e+01 -2.116292175864e-06 0.000000000000e+00 2.116292158864e-06 1.700000000094e-14 -1.750000000000e+01 -2.117522356882e-06 0.000000000000e+00 2.117522339381e-06 1.750000000094e-14 -1.800000000000e+01 -2.118747807771e-06 0.000000000000e+00 2.118747789771e-06 1.800000000094e-14 -1.850000000000e+01 -2.119968741141e-06 0.000000000000e+00 2.119968722642e-06 1.850000000094e-14 -1.900000000000e+01 -2.121185355059e-06 0.000000000000e+00 2.121185336060e-06 1.900000000094e-14 -1.950000000000e+01 -2.122397834401e-06 0.000000000000e+00 2.122397814901e-06 1.950000000094e-14 -2.000000000000e+01 -2.123606352047e-06 0.000000000000e+00 2.123606332047e-06 2.000000000094e-14 -1.000000000000e+00 -7.316198956081e-05 0.000000000000e+00 7.316198955981e-05 1.000000000938e-15 -1.500000000000e+00 -9.387018235124e-05 0.000000000000e+00 9.387018234974e-05 1.500000000938e-15 -2.000000000000e+00 -1.063137747458e-04 0.000000000000e+00 1.063137747438e-04 2.000000000938e-15 -2.500000000000e+00 -1.128886667268e-04 0.000000000000e+00 1.128886667243e-04 2.500000000938e-15 -3.000000000000e+00 -1.157384217967e-04 0.000000000000e+00 1.157384217937e-04 3.000000000938e-15 -3.500000000000e+00 -1.165130100490e-04 0.000000000000e+00 1.165130100455e-04 3.500000000938e-15 -4.000000000000e+00 -1.165967273321e-04 0.000000000000e+00 1.165967273281e-04 4.000000000938e-15 -4.500000000000e+00 -1.166505835001e-04 0.000000000000e+00 1.166505834956e-04 4.500000000938e-15 -5.000000000000e+00 -1.166987112428e-04 0.000000000000e+00 1.166987112378e-04 5.000000000938e-15 -5.500000000000e+00 -1.167423337958e-04 0.000000000000e+00 1.167423337903e-04 5.500000000938e-15 -6.000000000000e+00 -1.167824000543e-04 0.000000000000e+00 1.167824000483e-04 6.000000000938e-15 -6.500000000000e+00 -1.168196329285e-04 0.000000000000e+00 1.168196329220e-04 6.500000000938e-15 -7.000000000000e+00 -1.168545776227e-04 0.000000000000e+00 1.168545776157e-04 7.000000000938e-15 -7.500000000000e+00 -1.168876461471e-04 0.000000000000e+00 1.168876461396e-04 7.500000000938e-15 -8.000000000000e+00 -1.169191525824e-04 0.000000000000e+00 1.169191525744e-04 8.000000000938e-15 -8.500000000000e+00 -1.169493392810e-04 0.000000000000e+00 1.169493392725e-04 8.500000000938e-15 -9.000000000000e+00 -1.169783958175e-04 0.000000000000e+00 1.169783958085e-04 9.000000000938e-15 -9.500000000000e+00 -1.170064725796e-04 0.000000000000e+00 1.170064725701e-04 9.500000000938e-15 -1.000000000000e+01 -1.170336905259e-04 0.000000000000e+00 1.170336905159e-04 1.000000000094e-14 -1.050000000000e+01 -1.170601482381e-04 0.000000000000e+00 1.170601482276e-04 1.050000000094e-14 -1.100000000000e+01 -1.170859270640e-04 0.000000000000e+00 1.170859270530e-04 1.100000000094e-14 -1.150000000000e+01 -1.171110949107e-04 0.000000000000e+00 1.171110948992e-04 1.150000000094e-14 -1.200000000000e+01 -1.171357090732e-04 0.000000000000e+00 1.171357090612e-04 1.200000000094e-14 -1.250000000000e+01 -1.171598183701e-04 0.000000000000e+00 1.171598183576e-04 1.250000000094e-14 -1.300000000000e+01 -1.171834647731e-04 0.000000000000e+00 1.171834647601e-04 1.300000000094e-14 -1.350000000000e+01 -1.172066846663e-04 0.000000000000e+00 1.172066846528e-04 1.350000000094e-14 -1.400000000000e+01 -1.172295098286e-04 0.000000000000e+00 1.172295098146e-04 1.400000000094e-14 -1.450000000000e+01 -1.172519682086e-04 0.000000000000e+00 1.172519681941e-04 1.450000000094e-14 -1.500000000000e+01 -1.172740845421e-04 0.000000000000e+00 1.172740845271e-04 1.500000000094e-14 -1.550000000000e+01 -1.172958808488e-04 0.000000000000e+00 1.172958808333e-04 1.550000000094e-14 -1.600000000000e+01 -1.173173768347e-04 0.000000000000e+00 1.173173768187e-04 1.600000000094e-14 -1.650000000000e+01 -1.173385902218e-04 0.000000000000e+00 1.173385902053e-04 1.650000000094e-14 -1.700000000000e+01 -1.173595370196e-04 0.000000000000e+00 1.173595370026e-04 1.700000000094e-14 -1.750000000000e+01 -1.173802317511e-04 0.000000000000e+00 1.173802317336e-04 1.750000000094e-14 -1.800000000000e+01 -1.174006876409e-04 0.000000000000e+00 1.174006876229e-04 1.800000000094e-14 -1.850000000000e+01 -1.174209167750e-04 0.000000000000e+00 1.174209167565e-04 1.850000000094e-14 -1.900000000000e+01 -1.174409302347e-04 0.000000000000e+00 1.174409302157e-04 1.900000000094e-14 -1.950000000000e+01 -1.174607382117e-04 0.000000000000e+00 1.174607381922e-04 1.950000000094e-14 -2.000000000000e+01 -1.174803501062e-04 0.000000000000e+00 1.174803500862e-04 2.000000000094e-14 -1.000000000000e+00 -1.535143351141e-04 0.000000000000e+00 1.535143351131e-04 1.000000000938e-15 -1.500000000000e+00 -2.181691396178e-04 0.000000000000e+00 2.181691396163e-04 1.500000000938e-15 -2.000000000000e+00 -2.753425030871e-04 0.000000000000e+00 2.753425030851e-04 2.000000000938e-15 -2.500000000000e+00 -3.256381457593e-04 0.000000000000e+00 3.256381457568e-04 2.500000000938e-15 -3.000000000000e+00 -3.696832806836e-04 0.000000000000e+00 3.696832806806e-04 3.000000000938e-15 -3.500000000000e+00 -4.080871507850e-04 0.000000000000e+00 4.080871507815e-04 3.500000000938e-15 -4.000000000000e+00 -4.414237265802e-04 0.000000000000e+00 4.414237265762e-04 4.000000000938e-15 -4.500000000000e+00 -4.702267140745e-04 0.000000000000e+00 4.702267140700e-04 4.500000000938e-15 -5.000000000000e+00 -4.949899106321e-04 0.000000000000e+00 4.949899106271e-04 5.000000000938e-15 -5.500000000000e+00 -5.161693509505e-04 0.000000000000e+00 5.161693509450e-04 5.500000000938e-15 -6.000000000000e+00 -5.341856381106e-04 0.000000000000e+00 5.341856381046e-04 6.000000000938e-15 -6.500000000000e+00 -5.494258621954e-04 0.000000000000e+00 5.494258621889e-04 6.500000000938e-15 -7.000000000000e+00 -5.622449816032e-04 0.000000000000e+00 5.622449815962e-04 7.000000000938e-15 -7.500000000000e+00 -5.729667455244e-04 0.000000000000e+00 5.729667455169e-04 7.500000000938e-15 -8.000000000000e+00 -5.818843255314e-04 0.000000000000e+00 5.818843255234e-04 8.000000000938e-15 -8.500000000000e+00 -5.892608698342e-04 0.000000000000e+00 5.892608698257e-04 8.500000000938e-15 -9.000000000000e+00 -5.953302047761e-04 0.000000000000e+00 5.953302047671e-04 9.000000000938e-15 -9.500000000000e+00 -6.002978710220e-04 0.000000000000e+00 6.002978710125e-04 9.500000000938e-15 -1.000000000000e+01 -6.043425971659e-04 0.000000000000e+00 6.043425971559e-04 1.000000000094e-14 -1.050000000000e+01 -6.076182077301e-04 0.000000000000e+00 6.076182077196e-04 1.050000000094e-14 -1.100000000000e+01 -6.102558725947e-04 0.000000000000e+00 6.102558725837e-04 1.100000000094e-14 -1.150000000000e+01 -6.123665607673e-04 0.000000000000e+00 6.123665607558e-04 1.150000000094e-14 -1.200000000000e+01 -6.140435145991e-04 0.000000000000e+00 6.140435145871e-04 1.200000000094e-14 -1.250000000000e+01 -6.153647135919e-04 0.000000000000e+00 6.153647135794e-04 1.250000000094e-14 -1.300000000000e+01 -6.163951072862e-04 0.000000000000e+00 6.163951072732e-04 1.300000000094e-14 -1.350000000000e+01 -6.171886809487e-04 0.000000000000e+00 6.171886809352e-04 1.350000000094e-14 -1.400000000000e+01 -6.177902970760e-04 0.000000000000e+00 6.177902970620e-04 1.400000000094e-14 -1.450000000000e+01 -6.182373488279e-04 0.000000000000e+00 6.182373488134e-04 1.450000000094e-14 -1.500000000000e+01 -6.185613040433e-04 0.000000000000e+00 6.185613040283e-04 1.500000000094e-14 -1.550000000000e+01 -6.187893360725e-04 0.000000000000e+00 6.187893360570e-04 1.550000000094e-14 -1.600000000000e+01 -6.189465818021e-04 0.000000000000e+00 6.189465817861e-04 1.600000000094e-14 -1.650000000000e+01 -6.190599780080e-04 0.000000000000e+00 6.190599779915e-04 1.650000000094e-14 -1.700000000000e+01 -6.191563300611e-04 0.000000000000e+00 6.191563300441e-04 1.700000000094e-14 -1.750000000000e+01 -6.192475313589e-04 0.000000000000e+00 6.192475313414e-04 1.750000000094e-14 -1.800000000000e+01 -6.193355967433e-04 0.000000000000e+00 6.193355967253e-04 1.800000000094e-14 -1.850000000000e+01 -6.194209230240e-04 0.000000000000e+00 6.194209230055e-04 1.850000000094e-14 -1.900000000000e+01 -6.195037316428e-04 0.000000000000e+00 6.195037316238e-04 1.900000000094e-14 -1.950000000000e+01 -6.195842091848e-04 0.000000000000e+00 6.195842091653e-04 1.950000000094e-14 -2.000000000000e+01 -6.196625230714e-04 0.000000000000e+00 6.196625230514e-04 2.000000000094e-14 -1.000000000000e+00 -3.357113176489e-06 0.000000000000e+00 3.357096983310e-06 1.619317952605e-11 -1.500000000000e+00 -3.360554156423e-06 0.000000000000e+00 3.360537962743e-06 1.619367952607e-11 -2.000000000000e+00 -3.363176484171e-06 0.000000000000e+00 3.363160289992e-06 1.619417952607e-11 -2.500000000000e+00 -3.365478272073e-06 0.000000000000e+00 3.365462077393e-06 1.619467952607e-11 -3.000000000000e+00 -3.367581798730e-06 0.000000000000e+00 3.367565603551e-06 1.619517952607e-11 -3.500000000000e+00 -3.369546484791e-06 0.000000000000e+00 3.369530289112e-06 1.619567952607e-11 -4.000000000000e+00 -3.371406713776e-06 0.000000000000e+00 3.371390517596e-06 1.619617952607e-11 -4.500000000000e+00 -3.373184571069e-06 0.000000000000e+00 3.373168374389e-06 1.619667952607e-11 -5.000000000000e+00 -3.374895273501e-06 0.000000000000e+00 3.374879076321e-06 1.619717952607e-11 -5.500000000000e+00 -3.376549847476e-06 0.000000000000e+00 3.376533649797e-06 1.619767952607e-11 -6.000000000000e+00 -3.378156592672e-06 0.000000000000e+00 3.378140394493e-06 1.619817952607e-11 -6.500000000000e+00 -3.379721945146e-06 0.000000000000e+00 3.379705746466e-06 1.619867952607e-11 -7.000000000000e+00 -3.381251016949e-06 0.000000000000e+00 3.381234817769e-06 1.619917952607e-11 -7.500000000000e+00 -3.382747949527e-06 0.000000000000e+00 3.382731749847e-06 1.619967952607e-11 -8.000000000000e+00 -3.384216154093e-06 0.000000000000e+00 3.384199953914e-06 1.620017952607e-11 -8.500000000000e+00 -3.385658480331e-06 0.000000000000e+00 3.385642279652e-06 1.620067952607e-11 -9.000000000000e+00 -3.387077337994e-06 0.000000000000e+00 3.387061136815e-06 1.620117952607e-11 -9.500000000000e+00 -3.388474786558e-06 0.000000000000e+00 3.388458584879e-06 1.620167952607e-11 -1.000000000000e+01 -3.389852602646e-06 0.000000000000e+00 3.389836400467e-06 1.620217952607e-11 -1.050000000000e+01 -3.391212331616e-06 0.000000000000e+00 3.391196128937e-06 1.620267952607e-11 -1.100000000000e+01 -3.392555327636e-06 0.000000000000e+00 3.392539124457e-06 1.620317952607e-11 -1.150000000000e+01 -3.393882785247e-06 0.000000000000e+00 3.393866581567e-06 1.620367952607e-11 -1.200000000000e+01 -3.395195764518e-06 0.000000000000e+00 3.395179560338e-06 1.620417952607e-11 -1.250000000000e+01 -3.396495211331e-06 0.000000000000e+00 3.396479006652e-06 1.620467952607e-11 -1.300000000000e+01 -3.397781973883e-06 0.000000000000e+00 3.397765768704e-06 1.620517952607e-11 -1.350000000000e+01 -3.399056816246e-06 0.000000000000e+00 3.399040610566e-06 1.620567952607e-11 -1.400000000000e+01 -3.400320429596e-06 0.000000000000e+00 3.400304223417e-06 1.620617952607e-11 -1.450000000000e+01 -3.401573441594e-06 0.000000000000e+00 3.401557234914e-06 1.620667952607e-11 -1.500000000000e+01 -3.402816424253e-06 0.000000000000e+00 3.402800217074e-06 1.620717952607e-11 -1.550000000000e+01 -3.404049900615e-06 0.000000000000e+00 3.404033692936e-06 1.620767952607e-11 -1.600000000000e+01 -3.405274350415e-06 0.000000000000e+00 3.405258142235e-06 1.620817952607e-11 -1.650000000000e+01 -3.406490214937e-06 0.000000000000e+00 3.406474006258e-06 1.620867952607e-11 -1.700000000000e+01 -3.407697901197e-06 0.000000000000e+00 3.407681692017e-06 1.620917952607e-11 -1.750000000000e+01 -3.408897785544e-06 0.000000000000e+00 3.408881575865e-06 1.620967952607e-11 -1.800000000000e+01 -3.410090216806e-06 0.000000000000e+00 3.410074006626e-06 1.621017952607e-11 -1.850000000000e+01 -3.411275519018e-06 0.000000000000e+00 3.411259308338e-06 1.621067952607e-11 -1.900000000000e+01 -3.412453993821e-06 0.000000000000e+00 3.412437782642e-06 1.621117952607e-11 -1.950000000000e+01 -3.413625922570e-06 0.000000000000e+00 3.413609710891e-06 1.621167952607e-11 -2.000000000000e+01 -3.414791568189e-06 0.000000000000e+00 3.414775356009e-06 1.621217952607e-11 -1.000000000000e+00 -3.277423557355e-05 0.000000000000e+00 3.277421938037e-05 1.619317952605e-11 -1.500000000000e+00 -4.203912608169e-05 0.000000000000e+00 4.203910988801e-05 1.619367952607e-11 -2.000000000000e+00 -4.775259171255e-05 0.000000000000e+00 4.775257551837e-05 1.619417952607e-11 -2.500000000000e+00 -5.100436638554e-05 0.000000000000e+00 5.100435019086e-05 1.619467952607e-11 -3.000000000000e+00 -5.270437833292e-05 0.000000000000e+00 5.270436213774e-05 1.619517952607e-11 -3.500000000000e+00 -5.350297976014e-05 0.000000000000e+00 5.350296356446e-05 1.619567952607e-11 -4.000000000000e+00 -5.381896318062e-05 0.000000000000e+00 5.381894698444e-05 1.619617952607e-11 -4.500000000000e+00 -5.391385123499e-05 0.000000000000e+00 5.391383503831e-05 1.619667952607e-11 -5.000000000000e+00 -5.394405129238e-05 0.000000000000e+00 5.394403509520e-05 1.619717952607e-11 -5.500000000000e+00 -5.396446886832e-05 0.000000000000e+00 5.396445267064e-05 1.619767952607e-11 -6.000000000000e+00 -5.398263738161e-05 0.000000000000e+00 5.398262118343e-05 1.619817952607e-11 -6.500000000000e+00 -5.399947459935e-05 0.000000000000e+00 5.399945840067e-05 1.619867952607e-11 -7.000000000000e+00 -5.401528349975e-05 0.000000000000e+00 5.401526730057e-05 1.619917952607e-11 -7.500000000000e+00 -5.403025346728e-05 0.000000000000e+00 5.403023726760e-05 1.619967952607e-11 -8.000000000000e+00 -5.404452350970e-05 0.000000000000e+00 5.404450730952e-05 1.620017952607e-11 -8.500000000000e+00 -5.405820014368e-05 0.000000000000e+00 5.405818394300e-05 1.620067952607e-11 -9.000000000000e+00 -5.407136673543e-05 0.000000000000e+00 5.407135053425e-05 1.620117952607e-11 -9.500000000000e+00 -5.408408960299e-05 0.000000000000e+00 5.408407340131e-05 1.620167952607e-11 -1.000000000000e+01 -5.409642227426e-05 0.000000000000e+00 5.409640607208e-05 1.620217952607e-11 -1.050000000000e+01 -5.410840853589e-05 0.000000000000e+00 5.410839233321e-05 1.620267952607e-11 -1.100000000000e+01 -5.412008465183e-05 0.000000000000e+00 5.412006844866e-05 1.620317952607e-11 -1.150000000000e+01 -5.413148100009e-05 0.000000000000e+00 5.413146479641e-05 1.620367952607e-11 -1.200000000000e+01 -5.414262329582e-05 0.000000000000e+00 5.414260709164e-05 1.620417952607e-11 -1.250000000000e+01 -5.415353351681e-05 0.000000000000e+00 5.415351731213e-05 1.620467952607e-11 -1.300000000000e+01 -5.416423061205e-05 0.000000000000e+00 5.416421440687e-05 1.620517952607e-11 -1.350000000000e+01 -5.417473105060e-05 0.000000000000e+00 5.417471484492e-05 1.620567952607e-11 -1.400000000000e+01 -5.418504925139e-05 0.000000000000e+00 5.418503304521e-05 1.620617952607e-11 -1.450000000000e+01 -5.419519792320e-05 0.000000000000e+00 5.419518171652e-05 1.620667952607e-11 -1.500000000000e+01 -5.420518833645e-05 0.000000000000e+00 5.420517212927e-05 1.620717952607e-11 -1.550000000000e+01 -5.421503054225e-05 0.000000000000e+00 5.421501433457e-05 1.620767952607e-11 -1.600000000000e+01 -5.422473355073e-05 0.000000000000e+00 5.422471734255e-05 1.620817952607e-11 -1.650000000000e+01 -5.423430547723e-05 0.000000000000e+00 5.423428926855e-05 1.620867952607e-11 -1.700000000000e+01 -5.424375366323e-05 0.000000000000e+00 5.424373745405e-05 1.620917952607e-11 -1.750000000000e+01 -5.425308477697e-05 0.000000000000e+00 5.425306856729e-05 1.620967952607e-11 -1.800000000000e+01 -5.426230489787e-05 0.000000000000e+00 5.426228868769e-05 1.621017952607e-11 -1.850000000000e+01 -5.427141958777e-05 0.000000000000e+00 5.427140337709e-05 1.621067952607e-11 -1.900000000000e+01 -5.428043395134e-05 0.000000000000e+00 5.428041774016e-05 1.621117952607e-11 -1.950000000000e+01 -5.428935268775e-05 0.000000000000e+00 5.428933647607e-05 1.621167952607e-11 -2.000000000000e+01 -5.429818013496e-05 0.000000000000e+00 5.429816392278e-05 1.621217952607e-11 -1.000000000000e+00 -7.076146339865e-05 0.000000000000e+00 7.076144720547e-05 1.619317952605e-11 -1.500000000000e+00 -1.003811855700e-04 0.000000000000e+00 1.003811693763e-04 1.619367952607e-11 -2.000000000000e+00 -1.263322601359e-04 0.000000000000e+00 1.263322439417e-04 1.619417952607e-11 -2.500000000000e+00 -1.488343480103e-04 0.000000000000e+00 1.488343318156e-04 1.619467952607e-11 -3.000000000000e+00 -1.681563563944e-04 0.000000000000e+00 1.681563401992e-04 1.619517952607e-11 -3.500000000000e+00 -1.845967886426e-04 0.000000000000e+00 1.845967724469e-04 1.619567952607e-11 -4.000000000000e+00 -1.984667328437e-04 0.000000000000e+00 1.984667166476e-04 1.619617952607e-11 -4.500000000000e+00 -2.100760739952e-04 0.000000000000e+00 2.100760577986e-04 1.619667952607e-11 -5.000000000000e+00 -2.197229958872e-04 0.000000000000e+00 2.197229796900e-04 1.619717952607e-11 -5.500000000000e+00 -2.276865541022e-04 0.000000000000e+00 2.276865379045e-04 1.619767952607e-11 -6.000000000000e+00 -2.342219014273e-04 0.000000000000e+00 2.342218852291e-04 1.619817952607e-11 -6.500000000000e+00 -2.395576616693e-04 0.000000000000e+00 2.395576454706e-04 1.619867952607e-11 -7.000000000000e+00 -2.438949845715e-04 0.000000000000e+00 2.438949683723e-04 1.619917952607e-11 -7.500000000000e+00 -2.474079091567e-04 0.000000000000e+00 2.474078929570e-04 1.619967952607e-11 -8.000000000000e+00 -2.502447362941e-04 0.000000000000e+00 2.502447200939e-04 1.620017952607e-11 -8.500000000000e+00 -2.525301346840e-04 0.000000000000e+00 2.525301184833e-04 1.620067952607e-11 -9.000000000000e+00 -2.543677052541e-04 0.000000000000e+00 2.543676890530e-04 1.620117952607e-11 -9.500000000000e+00 -2.558427300115e-04 0.000000000000e+00 2.558427138098e-04 1.620167952607e-11 -1.000000000000e+01 -2.570249135972e-04 0.000000000000e+00 2.570248973950e-04 1.620217952607e-11 -1.050000000000e+01 -2.579709200948e-04 0.000000000000e+00 2.579709038921e-04 1.620267952607e-11 -1.100000000000e+01 -2.587266485757e-04 0.000000000000e+00 2.587266323725e-04 1.620317952607e-11 -1.150000000000e+01 -2.593291968789e-04 0.000000000000e+00 2.593291806752e-04 1.620367952607e-11 -1.200000000000e+01 -2.598085186984e-04 0.000000000000e+00 2.598085024942e-04 1.620417952607e-11 -1.250000000000e+01 -2.601887984833e-04 0.000000000000e+00 2.601887822786e-04 1.620467952607e-11 -1.300000000000e+01 -2.604895790993e-04 0.000000000000e+00 2.604895628941e-04 1.620517952607e-11 -1.350000000000e+01 -2.607266800285e-04 0.000000000000e+00 2.607266638229e-04 1.620567952607e-11 -1.400000000000e+01 -2.609129423940e-04 0.000000000000e+00 2.609129261879e-04 1.620617952607e-11 -1.450000000000e+01 -2.610588334976e-04 0.000000000000e+00 2.610588172909e-04 1.620667952607e-11 -1.500000000000e+01 -2.611729390138e-04 0.000000000000e+00 2.611729228067e-04 1.620717952607e-11 -1.550000000000e+01 -2.612623654971e-04 0.000000000000e+00 2.612623492894e-04 1.620767952607e-11 -1.600000000000e+01 -2.613330675029e-04 0.000000000000e+00 2.613330512947e-04 1.620817952607e-11 -1.650000000000e+01 -2.613900960961e-04 0.000000000000e+00 2.613900798875e-04 1.620867952607e-11 -1.700000000000e+01 -2.614377275596e-04 0.000000000000e+00 2.614377113504e-04 1.620917952607e-11 -1.750000000000e+01 -2.614794031598e-04 0.000000000000e+00 2.614793869501e-04 1.620967952607e-11 -1.800000000000e+01 -2.615175555047e-04 0.000000000000e+00 2.615175392945e-04 1.621017952607e-11 -1.850000000000e+01 -2.615536260817e-04 0.000000000000e+00 2.615536098710e-04 1.621067952607e-11 -1.900000000000e+01 -2.615883565339e-04 0.000000000000e+00 2.615883403227e-04 1.621117952607e-11 -1.950000000000e+01 -2.616221093438e-04 0.000000000000e+00 2.616220931321e-04 1.621167952607e-11 -2.000000000000e+01 -2.616550689846e-04 0.000000000000e+00 2.616550527725e-04 1.621217952607e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb1.standard0000644000265600020320000010250212264261473024257 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.585602309173e-14 0.000000000000e+00 -4.143624097605e-15 2.000000000000e-14 -3.500000000000e+00 -1.567191200598e-09 0.000000000000e+00 1.567171201009e-09 2.000000000000e-14 -4.000000000000e+00 -5.627844850754e-06 0.000000000000e+00 5.627844830754e-06 2.000000000000e-14 -4.500000000000e+00 -3.566346124241e-05 0.000000000000e+00 3.566346122241e-05 2.000000000000e-14 -5.000000000000e+00 -9.207810549082e-05 0.000000000000e+00 9.207810547082e-05 2.000000000000e-14 -5.500000000000e+00 -1.719970947280e-04 0.000000000000e+00 1.719970947080e-04 2.000000000000e-14 -6.000000000000e+00 -2.720123133080e-04 0.000000000000e+00 2.720123132880e-04 2.000000000000e-14 -6.500000000000e+00 -3.889683698553e-04 0.000000000000e+00 3.889683698353e-04 2.000000000000e-14 -7.000000000000e+00 -5.201032745350e-04 0.000000000000e+00 5.201032745150e-04 2.000000000000e-14 -7.500000000000e+00 -6.629792877835e-04 0.000000000000e+00 6.629792877635e-04 2.000000000000e-14 -8.000000000000e+00 -8.152964242005e-04 0.000000000000e+00 8.152964241805e-04 2.000000000000e-14 -8.500000000000e+00 -9.676954635932e-04 0.000000000000e+00 9.676954635732e-04 2.000000000000e-14 -9.000000000000e+00 -1.103085874817e-03 0.000000000000e+00 1.103085874797e-03 2.000000000000e-14 -9.500000000000e+00 -1.213405632530e-03 0.000000000000e+00 1.213405632510e-03 2.000000000000e-14 -1.000000000000e+01 -1.299175886112e-03 0.000000000000e+00 1.299175886092e-03 2.000000000000e-14 -1.050000000000e+01 -1.365276808838e-03 0.000000000000e+00 1.365276808818e-03 2.000000000000e-14 -1.100000000000e+01 -1.416857155470e-03 0.000000000000e+00 1.416857155450e-03 2.000000000000e-14 -1.150000000000e+01 -1.457915137253e-03 0.000000000000e+00 1.457915137233e-03 2.000000000000e-14 -1.200000000000e+01 -1.491277377130e-03 0.000000000000e+00 1.491277377110e-03 2.000000000000e-14 -1.250000000000e+01 -1.518902144010e-03 0.000000000000e+00 1.518902143990e-03 2.000000000000e-14 -1.300000000000e+01 -1.542156823241e-03 0.000000000000e+00 1.542156823221e-03 2.000000000000e-14 -1.350000000000e+01 -1.562013680946e-03 0.000000000000e+00 1.562013680926e-03 2.000000000000e-14 -1.400000000000e+01 -1.579178680971e-03 0.000000000000e+00 1.579178680951e-03 2.000000000000e-14 -1.450000000000e+01 -1.594175186565e-03 0.000000000000e+00 1.594175186545e-03 2.000000000000e-14 -1.500000000000e+01 -1.607398803230e-03 0.000000000000e+00 1.607398803210e-03 2.000000000000e-14 -1.550000000000e+01 -1.619153911788e-03 0.000000000000e+00 1.619153911768e-03 2.000000000000e-14 -1.600000000000e+01 -1.629678479132e-03 0.000000000000e+00 1.629678479112e-03 2.000000000000e-14 -1.650000000000e+01 -1.639161243155e-03 0.000000000000e+00 1.639161243135e-03 2.000000000000e-14 -1.700000000000e+01 -1.647753844126e-03 0.000000000000e+00 1.647753844106e-03 2.000000000000e-14 -1.750000000000e+01 -1.655579543012e-03 0.000000000000e+00 1.655579542992e-03 2.000000000000e-14 -1.800000000000e+01 -1.662739591754e-03 0.000000000000e+00 1.662739591734e-03 2.000000000000e-14 -1.850000000000e+01 -1.669317959579e-03 0.000000000000e+00 1.669317959559e-03 2.000000000000e-14 -1.900000000000e+01 -1.675384889276e-03 0.000000000000e+00 1.675384889256e-03 2.000000000000e-14 -1.950000000000e+01 -1.680999607867e-03 0.000000000000e+00 1.680999607847e-03 2.000000000000e-14 -2.000000000000e+01 -1.686212417449e-03 0.000000000000e+00 1.686212417429e-03 2.000000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.585602309173e-14 0.000000000000e+00 -4.143624097605e-15 2.000000000000e-14 -3.500000000000e+00 -1.567191184118e-09 0.000000000000e+00 1.567171184121e-09 2.000000000000e-14 -4.000000000000e+00 -5.627797147193e-06 0.000000000000e+00 5.627797127193e-06 2.000000000000e-14 -4.500000000000e+00 -3.566256477288e-05 0.000000000000e+00 3.566256475288e-05 2.000000000000e-14 -5.000000000000e+00 -9.207405501822e-05 0.000000000000e+00 9.207405499822e-05 2.000000000000e-14 -5.500000000000e+00 -1.719860568703e-04 0.000000000000e+00 1.719860568503e-04 2.000000000000e-14 -6.000000000000e+00 -2.719888407923e-04 0.000000000000e+00 2.719888407723e-04 2.000000000000e-14 -6.500000000000e+00 -3.889246879389e-04 0.000000000000e+00 3.889246879189e-04 2.000000000000e-14 -7.000000000000e+00 -5.200273392753e-04 0.000000000000e+00 5.200273392553e-04 2.000000000000e-14 -7.500000000000e+00 -6.628507225278e-04 0.000000000000e+00 6.628507225078e-04 2.000000000000e-14 -8.000000000000e+00 -8.150555370370e-04 0.000000000000e+00 8.150555370170e-04 2.000000000000e-14 -8.500000000000e+00 -9.666207853991e-04 0.000000000000e+00 9.666207853791e-04 2.000000000000e-14 -9.000000000000e+00 -1.100271524172e-03 0.000000000000e+00 1.100271524152e-03 2.000000000000e-14 -9.500000000000e+00 -1.208320316853e-03 0.000000000000e+00 1.208320316833e-03 2.000000000000e-14 -1.000000000000e+01 -1.291835121002e-03 0.000000000000e+00 1.291835120982e-03 2.000000000000e-14 -1.050000000000e+01 -1.355983468314e-03 0.000000000000e+00 1.355983468294e-03 2.000000000000e-14 -1.100000000000e+01 -1.405960617691e-03 0.000000000000e+00 1.405960617671e-03 2.000000000000e-14 -1.150000000000e+01 -1.445717673398e-03 0.000000000000e+00 1.445717673378e-03 2.000000000000e-14 -1.200000000000e+01 -1.478018459444e-03 0.000000000000e+00 1.478018459424e-03 2.000000000000e-14 -1.250000000000e+01 -1.504766978611e-03 0.000000000000e+00 1.504766978591e-03 2.000000000000e-14 -1.300000000000e+01 -1.527288689981e-03 0.000000000000e+00 1.527288689961e-03 2.000000000000e-14 -1.350000000000e+01 -1.546524508248e-03 0.000000000000e+00 1.546524508228e-03 2.000000000000e-14 -1.400000000000e+01 -1.563157050004e-03 0.000000000000e+00 1.563157049984e-03 2.000000000000e-14 -1.450000000000e+01 -1.577692164204e-03 0.000000000000e+00 1.577692164184e-03 2.000000000000e-14 -1.500000000000e+01 -1.590512161189e-03 0.000000000000e+00 1.590512161169e-03 2.000000000000e-14 -1.550000000000e+01 -1.601911194019e-03 0.000000000000e+00 1.601911193999e-03 2.000000000000e-14 -1.600000000000e+01 -1.612119255318e-03 0.000000000000e+00 1.612119255298e-03 2.000000000000e-14 -1.650000000000e+01 -1.621318785158e-03 0.000000000000e+00 1.621318785138e-03 2.000000000000e-14 -1.700000000000e+01 -1.629656389592e-03 0.000000000000e+00 1.629656389572e-03 2.000000000000e-14 -1.750000000000e+01 -1.637251260175e-03 0.000000000000e+00 1.637251260155e-03 2.000000000000e-14 -1.800000000000e+01 -1.644201325225e-03 0.000000000000e+00 1.644201325205e-03 2.000000000000e-14 -1.850000000000e+01 -1.650587813594e-03 0.000000000000e+00 1.650587813574e-03 2.000000000000e-14 -1.900000000000e+01 -1.656478688797e-03 0.000000000000e+00 1.656478688777e-03 2.000000000000e-14 -1.950000000000e+01 -1.661931266824e-03 0.000000000000e+00 1.661931266804e-03 2.000000000000e-14 -2.000000000000e+01 -1.666994235600e-03 0.000000000000e+00 1.666994235580e-03 2.000000000000e-14 -1.000000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.585623993217e-14 0.000000000000e+00 -4.143624097605e-15 2.000000000000e-14 -3.500000000000e+00 -1.567191162651e-09 0.000000000000e+00 1.567171162720e-09 2.000000000000e-14 -4.000000000000e+00 -5.627736697017e-06 0.000000000000e+00 5.627736677017e-06 2.000000000000e-14 -4.500000000000e+00 -3.566142878846e-05 0.000000000000e+00 3.566142876846e-05 2.000000000000e-14 -5.000000000000e+00 -9.206892217721e-05 0.000000000000e+00 9.206892215721e-05 2.000000000000e-14 -5.500000000000e+00 -1.719720672792e-04 0.000000000000e+00 1.719720672592e-04 2.000000000000e-14 -6.000000000000e+00 -2.719590795702e-04 0.000000000000e+00 2.719590795502e-04 2.000000000000e-14 -6.500000000000e+00 -3.888692560040e-04 0.000000000000e+00 3.888692559840e-04 2.000000000000e-14 -7.000000000000e+00 -5.199308199558e-04 0.000000000000e+00 5.199308199358e-04 2.000000000000e-14 -7.500000000000e+00 -6.626868506374e-04 0.000000000000e+00 6.626868506174e-04 2.000000000000e-14 -8.000000000000e+00 -8.147370335163e-04 0.000000000000e+00 8.147370334963e-04 2.000000000000e-14 -8.500000000000e+00 -9.651885309888e-04 0.000000000000e+00 9.651885309688e-04 2.000000000000e-14 -9.000000000000e+00 -1.096582818400e-03 0.000000000000e+00 1.096582818380e-03 2.000000000000e-14 -9.500000000000e+00 -1.201757670363e-03 0.000000000000e+00 1.201757670343e-03 2.000000000000e-14 -1.000000000000e+01 -1.282474049018e-03 0.000000000000e+00 1.282474048998e-03 2.000000000000e-14 -1.050000000000e+01 -1.344230301700e-03 0.000000000000e+00 1.344230301680e-03 2.000000000000e-14 -1.100000000000e+01 -1.392257663690e-03 0.000000000000e+00 1.392257663670e-03 2.000000000000e-14 -1.150000000000e+01 -1.430438929315e-03 0.000000000000e+00 1.430438929295e-03 2.000000000000e-14 -1.200000000000e+01 -1.461456841423e-03 0.000000000000e+00 1.461456841403e-03 2.000000000000e-14 -1.250000000000e+01 -1.487147608470e-03 0.000000000000e+00 1.487147608450e-03 2.000000000000e-14 -1.300000000000e+01 -1.508785099372e-03 0.000000000000e+00 1.508785099352e-03 2.000000000000e-14 -1.350000000000e+01 -1.527271966800e-03 0.000000000000e+00 1.527271966780e-03 2.000000000000e-14 -1.400000000000e+01 -1.543262471592e-03 0.000000000000e+00 1.543262471572e-03 2.000000000000e-14 -1.450000000000e+01 -1.557241255096e-03 0.000000000000e+00 1.557241255076e-03 2.000000000000e-14 -1.500000000000e+01 -1.569574559927e-03 0.000000000000e+00 1.569574559907e-03 2.000000000000e-14 -1.550000000000e+01 -1.580544194137e-03 0.000000000000e+00 1.580544194117e-03 2.000000000000e-14 -1.600000000000e+01 -1.590370533415e-03 0.000000000000e+00 1.590370533395e-03 2.000000000000e-14 -1.650000000000e+01 -1.599228426938e-03 0.000000000000e+00 1.599228426918e-03 2.000000000000e-14 -1.700000000000e+01 -1.607258415166e-03 0.000000000000e+00 1.607258415146e-03 2.000000000000e-14 -1.750000000000e+01 -1.614574787694e-03 0.000000000000e+00 1.614574787674e-03 2.000000000000e-14 -1.800000000000e+01 -1.621271469846e-03 0.000000000000e+00 1.621271469826e-03 2.000000000000e-14 -1.850000000000e+01 -1.627426390220e-03 0.000000000000e+00 1.627426390200e-03 2.000000000000e-14 -1.900000000000e+01 -1.633104767481e-03 0.000000000000e+00 1.633104767461e-03 2.000000000000e-14 -1.950000000000e+01 -1.638361616244e-03 0.000000000000e+00 1.638361616224e-03 2.000000000000e-14 -2.000000000000e+01 -1.643243680510e-03 0.000000000000e+00 1.643243680490e-03 2.000000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.500000000000e+00 -1.520611544667e-12 0.000000000000e+00 1.500611900473e-12 2.000000000000e-14 -4.000000000000e+00 -3.211952976639e-06 0.000000000000e+00 3.211952956639e-06 2.000000000000e-14 -4.500000000000e+00 -3.892557688647e-05 0.000000000000e+00 3.892557686647e-05 2.000000000000e-14 -5.000000000000e+00 -1.147151894519e-04 0.000000000000e+00 1.147151894319e-04 2.000000000000e-14 -5.500000000000e+00 -2.244609702008e-04 0.000000000000e+00 2.244609701808e-04 2.000000000000e-14 -6.000000000000e+00 -3.614256221410e-04 0.000000000000e+00 3.614256221210e-04 2.000000000000e-14 -6.500000000000e+00 -5.198632617953e-04 0.000000000000e+00 5.198632617753e-04 2.000000000000e-14 -7.000000000000e+00 -6.949988877926e-04 0.000000000000e+00 6.949988877726e-04 2.000000000000e-14 -7.500000000000e+00 -8.826296365026e-04 0.000000000000e+00 8.826296364826e-04 2.000000000000e-14 -8.000000000000e+00 -1.074931471286e-03 0.000000000000e+00 1.074931471266e-03 2.000000000000e-14 -8.500000000000e+00 -1.237613147205e-03 0.000000000000e+00 1.237613147185e-03 2.000000000000e-14 -9.000000000000e+00 -1.356287557441e-03 0.000000000000e+00 1.356287557421e-03 2.000000000000e-14 -9.500000000000e+00 -1.439372204290e-03 0.000000000000e+00 1.439372204270e-03 2.000000000000e-14 -1.000000000000e+01 -1.498693953481e-03 0.000000000000e+00 1.498693953461e-03 2.000000000000e-14 -1.050000000000e+01 -1.542636470132e-03 0.000000000000e+00 1.542636470112e-03 2.000000000000e-14 -1.100000000000e+01 -1.576367300164e-03 0.000000000000e+00 1.576367300144e-03 2.000000000000e-14 -1.150000000000e+01 -1.603053893209e-03 0.000000000000e+00 1.603053893189e-03 2.000000000000e-14 -1.200000000000e+01 -1.624698809756e-03 0.000000000000e+00 1.624698809736e-03 2.000000000000e-14 -1.250000000000e+01 -1.642617171708e-03 0.000000000000e+00 1.642617171688e-03 2.000000000000e-14 -1.300000000000e+01 -1.657704451335e-03 0.000000000000e+00 1.657704451315e-03 2.000000000000e-14 -1.350000000000e+01 -1.670590332622e-03 0.000000000000e+00 1.670590332602e-03 2.000000000000e-14 -1.400000000000e+01 -1.681730181355e-03 0.000000000000e+00 1.681730181335e-03 2.000000000000e-14 -1.450000000000e+01 -1.691461396237e-03 0.000000000000e+00 1.691461396217e-03 2.000000000000e-14 -1.500000000000e+01 -1.700039299357e-03 0.000000000000e+00 1.700039299337e-03 2.000000000000e-14 -1.550000000000e+01 -1.707660695379e-03 0.000000000000e+00 1.707660695359e-03 2.000000000000e-14 -1.600000000000e+01 -1.714479759710e-03 0.000000000000e+00 1.714479759690e-03 2.000000000000e-14 -1.650000000000e+01 -1.720619014802e-03 0.000000000000e+00 1.720619014782e-03 2.000000000000e-14 -1.700000000000e+01 -1.726177078055e-03 0.000000000000e+00 1.726177078035e-03 2.000000000000e-14 -1.750000000000e+01 -1.731234237278e-03 0.000000000000e+00 1.731234237258e-03 2.000000000000e-14 -1.800000000000e+01 -1.735856532896e-03 0.000000000000e+00 1.735856532876e-03 2.000000000000e-14 -1.850000000000e+01 -1.740098793892e-03 0.000000000000e+00 1.740098793872e-03 2.000000000000e-14 -1.900000000000e+01 -1.744006927795e-03 0.000000000000e+00 1.744006927775e-03 2.000000000000e-14 -1.950000000000e+01 -1.747619670385e-03 0.000000000000e+00 1.747619670365e-03 2.000000000000e-14 -2.000000000000e+01 -1.750969938368e-03 0.000000000000e+00 1.750969938348e-03 2.000000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.500000000000e+00 -1.520611761507e-12 0.000000000000e+00 1.500611900452e-12 2.000000000000e-14 -4.000000000000e+00 -3.211929061480e-06 0.000000000000e+00 3.211929041480e-06 2.000000000000e-14 -4.500000000000e+00 -3.892434700757e-05 0.000000000000e+00 3.892434698757e-05 2.000000000000e-14 -5.000000000000e+00 -1.147084883633e-04 0.000000000000e+00 1.147084883433e-04 2.000000000000e-14 -5.500000000000e+00 -2.244416266969e-04 0.000000000000e+00 2.244416266769e-04 2.000000000000e-14 -6.000000000000e+00 -3.613834293311e-04 0.000000000000e+00 3.613834293111e-04 2.000000000000e-14 -6.500000000000e+00 -5.197825534187e-04 0.000000000000e+00 5.197825533987e-04 2.000000000000e-14 -7.000000000000e+00 -6.948512457235e-04 0.000000000000e+00 6.948512457035e-04 2.000000000000e-14 -7.500000000000e+00 -8.823566492910e-04 0.000000000000e+00 8.823566492710e-04 2.000000000000e-14 -8.000000000000e+00 -1.073739141898e-03 0.000000000000e+00 1.073739141878e-03 2.000000000000e-14 -8.500000000000e+00 -1.233537120170e-03 0.000000000000e+00 1.233537120150e-03 2.000000000000e-14 -9.000000000000e+00 -1.348840081096e-03 0.000000000000e+00 1.348840081076e-03 2.000000000000e-14 -9.500000000000e+00 -1.429109241996e-03 0.000000000000e+00 1.429109241976e-03 2.000000000000e-14 -1.000000000000e+01 -1.486313739624e-03 0.000000000000e+00 1.486313739604e-03 2.000000000000e-14 -1.050000000000e+01 -1.528678629051e-03 0.000000000000e+00 1.528678629031e-03 2.000000000000e-14 -1.100000000000e+01 -1.561210712972e-03 0.000000000000e+00 1.561210712952e-03 2.000000000000e-14 -1.150000000000e+01 -1.586963276757e-03 0.000000000000e+00 1.586963276737e-03 2.000000000000e-14 -1.200000000000e+01 -1.607862862763e-03 0.000000000000e+00 1.607862862743e-03 2.000000000000e-14 -1.250000000000e+01 -1.625173881732e-03 0.000000000000e+00 1.625173881712e-03 2.000000000000e-14 -1.300000000000e+01 -1.639757275020e-03 0.000000000000e+00 1.639757275000e-03 2.000000000000e-14 -1.350000000000e+01 -1.652218615012e-03 0.000000000000e+00 1.652218614992e-03 2.000000000000e-14 -1.400000000000e+01 -1.662996008175e-03 0.000000000000e+00 1.662996008155e-03 2.000000000000e-14 -1.450000000000e+01 -1.672414211623e-03 0.000000000000e+00 1.672414211603e-03 2.000000000000e-14 -1.500000000000e+01 -1.680719093974e-03 0.000000000000e+00 1.680719093954e-03 2.000000000000e-14 -1.550000000000e+01 -1.688100258037e-03 0.000000000000e+00 1.688100258017e-03 2.000000000000e-14 -1.600000000000e+01 -1.694706300971e-03 0.000000000000e+00 1.694706300951e-03 2.000000000000e-14 -1.650000000000e+01 -1.700655360027e-03 0.000000000000e+00 1.700655360007e-03 2.000000000000e-14 -1.700000000000e+01 -1.706042559162e-03 0.000000000000e+00 1.706042559142e-03 2.000000000000e-14 -1.750000000000e+01 -1.710945369658e-03 0.000000000000e+00 1.710945369638e-03 2.000000000000e-14 -1.800000000000e+01 -1.715427536485e-03 0.000000000000e+00 1.715427536465e-03 2.000000000000e-14 -1.850000000000e+01 -1.719541999402e-03 0.000000000000e+00 1.719541999382e-03 2.000000000000e-14 -1.900000000000e+01 -1.723333097114e-03 0.000000000000e+00 1.723333097094e-03 2.000000000000e-14 -1.950000000000e+01 -1.726838251954e-03 0.000000000000e+00 1.726838251934e-03 2.000000000000e-14 -2.000000000000e+01 -1.730089272727e-03 0.000000000000e+00 1.730089272707e-03 2.000000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.500000000000e+00 -1.520611761507e-12 0.000000000000e+00 1.500611900425e-12 2.000000000000e-14 -4.000000000000e+00 -3.211898756024e-06 0.000000000000e+00 3.211898736024e-06 2.000000000000e-14 -4.500000000000e+00 -3.892278856660e-05 0.000000000000e+00 3.892278854660e-05 2.000000000000e-14 -5.000000000000e+00 -1.146999967784e-04 0.000000000000e+00 1.146999967584e-04 2.000000000000e-14 -5.500000000000e+00 -2.244171090701e-04 0.000000000000e+00 2.244171090501e-04 2.000000000000e-14 -6.000000000000e+00 -3.613299151168e-04 0.000000000000e+00 3.613299150968e-04 2.000000000000e-14 -6.500000000000e+00 -5.196800251395e-04 0.000000000000e+00 5.196800251195e-04 2.000000000000e-14 -7.000000000000e+00 -6.946630532982e-04 0.000000000000e+00 6.946630532782e-04 2.000000000000e-14 -7.500000000000e+00 -8.820066599388e-04 0.000000000000e+00 8.820066599188e-04 2.000000000000e-14 -8.000000000000e+00 -1.072112482288e-03 0.000000000000e+00 1.072112482268e-03 2.000000000000e-14 -8.500000000000e+00 -1.228177791477e-03 0.000000000000e+00 1.228177791457e-03 2.000000000000e-14 -9.000000000000e+00 -1.339275760881e-03 0.000000000000e+00 1.339275760861e-03 2.000000000000e-14 -9.500000000000e+00 -1.416110320323e-03 0.000000000000e+00 1.416110320303e-03 2.000000000000e-14 -1.000000000000e+01 -1.470758261023e-03 0.000000000000e+00 1.470758261003e-03 2.000000000000e-14 -1.050000000000e+01 -1.511226301190e-03 0.000000000000e+00 1.511226301170e-03 2.000000000000e-14 -1.100000000000e+01 -1.542319475016e-03 0.000000000000e+00 1.542319474996e-03 2.000000000000e-14 -1.150000000000e+01 -1.566951468516e-03 0.000000000000e+00 1.566951468496e-03 2.000000000000e-14 -1.200000000000e+01 -1.586956883600e-03 0.000000000000e+00 1.586956883580e-03 2.000000000000e-14 -1.250000000000e+01 -1.603539119275e-03 0.000000000000e+00 1.603539119255e-03 2.000000000000e-14 -1.300000000000e+01 -1.617517682317e-03 0.000000000000e+00 1.617517682297e-03 2.000000000000e-14 -1.350000000000e+01 -1.629469252349e-03 0.000000000000e+00 1.629469252329e-03 2.000000000000e-14 -1.400000000000e+01 -1.639811267887e-03 0.000000000000e+00 1.639811267867e-03 2.000000000000e-14 -1.450000000000e+01 -1.648853351964e-03 0.000000000000e+00 1.648853351944e-03 2.000000000000e-14 -1.500000000000e+01 -1.656830056356e-03 0.000000000000e+00 1.656830056336e-03 2.000000000000e-14 -1.550000000000e+01 -1.663922361710e-03 0.000000000000e+00 1.663922361690e-03 2.000000000000e-14 -1.600000000000e+01 -1.670272185711e-03 0.000000000000e+00 1.670272185691e-03 2.000000000000e-14 -1.650000000000e+01 -1.675992413599e-03 0.000000000000e+00 1.675992413579e-03 2.000000000000e-14 -1.700000000000e+01 -1.681173984345e-03 0.000000000000e+00 1.681173984325e-03 2.000000000000e-14 -1.750000000000e+01 -1.685890994311e-03 0.000000000000e+00 1.685890994291e-03 2.000000000000e-14 -1.800000000000e+01 -1.690204437222e-03 0.000000000000e+00 1.690204437202e-03 2.000000000000e-14 -1.850000000000e+01 -1.694164987916e-03 0.000000000000e+00 1.694164987896e-03 2.000000000000e-14 -1.900000000000e+01 -1.697815103811e-03 0.000000000000e+00 1.697815103791e-03 2.000000000000e-14 -1.950000000000e+01 -1.701190631816e-03 0.000000000000e+00 1.701190631796e-03 2.000000000000e-14 -2.000000000000e+01 -1.704322051537e-03 0.000000000000e+00 1.704322051517e-03 2.000000000000e-14 -1.000000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499993705634e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.540087501972e-14 0.000000000000e+00 -4.598730743565e-15 2.000000000000e-14 -3.000000000000e+00 -2.906808951528e-11 0.000000000000e+00 2.904808969824e-11 2.000000000000e-14 -3.500000000000e+00 -3.600917296302e-07 0.000000000000e+00 3.600917096305e-07 2.000000000000e-14 -4.000000000000e+00 -9.320898621455e-06 0.000000000000e+00 9.320898601455e-06 2.000000000000e-14 -4.500000000000e+00 -3.372019138184e-05 0.000000000000e+00 3.372019136184e-05 2.000000000000e-14 -5.000000000000e+00 -7.351956662039e-05 0.000000000000e+00 7.351956660039e-05 2.000000000000e-14 -5.500000000000e+00 -1.275752848752e-04 0.000000000000e+00 1.275752848552e-04 2.000000000000e-14 -6.000000000000e+00 -1.944961898757e-04 0.000000000000e+00 1.944961898557e-04 2.000000000000e-14 -6.500000000000e+00 -2.728964967564e-04 0.000000000000e+00 2.728964967364e-04 2.000000000000e-14 -7.000000000000e+00 -3.614826285912e-04 0.000000000000e+00 3.614826285712e-04 2.000000000000e-14 -7.500000000000e+00 -4.590690377337e-04 0.000000000000e+00 4.590690377137e-04 2.000000000000e-14 -8.000000000000e+00 -5.645442409981e-04 0.000000000000e+00 5.645442409781e-04 2.000000000000e-14 -8.500000000000e+00 -6.756100609985e-04 0.000000000000e+00 6.756100609785e-04 2.000000000000e-14 -9.000000000000e+00 -7.868340194468e-04 0.000000000000e+00 7.868340194268e-04 2.000000000000e-14 -9.500000000000e+00 -8.928223697593e-04 0.000000000000e+00 8.928223697393e-04 2.000000000000e-14 -1.000000000000e+01 -9.891277744920e-04 0.000000000000e+00 9.891277744720e-04 2.000000000000e-14 -1.050000000000e+01 -1.073236253282e-03 0.000000000000e+00 1.073236253262e-03 2.000000000000e-14 -1.100000000000e+01 -1.144830315985e-03 0.000000000000e+00 1.144830315965e-03 2.000000000000e-14 -1.150000000000e+01 -1.205077195682e-03 0.000000000000e+00 1.205077195662e-03 2.000000000000e-14 -1.200000000000e+01 -1.255730767564e-03 0.000000000000e+00 1.255730767544e-03 2.000000000000e-14 -1.250000000000e+01 -1.298550540015e-03 0.000000000000e+00 1.298550539995e-03 2.000000000000e-14 -1.300000000000e+01 -1.335056767941e-03 0.000000000000e+00 1.335056767921e-03 2.000000000000e-14 -1.350000000000e+01 -1.366479241779e-03 0.000000000000e+00 1.366479241759e-03 2.000000000000e-14 -1.400000000000e+01 -1.393785494995e-03 0.000000000000e+00 1.393785494975e-03 2.000000000000e-14 -1.450000000000e+01 -1.417730167066e-03 0.000000000000e+00 1.417730167046e-03 2.000000000000e-14 -1.500000000000e+01 -1.438902567630e-03 0.000000000000e+00 1.438902567610e-03 2.000000000000e-14 -1.550000000000e+01 -1.457765782194e-03 0.000000000000e+00 1.457765782174e-03 2.000000000000e-14 -1.600000000000e+01 -1.474686871932e-03 0.000000000000e+00 1.474686871912e-03 2.000000000000e-14 -1.650000000000e+01 -1.489959602339e-03 0.000000000000e+00 1.489959602319e-03 2.000000000000e-14 -1.700000000000e+01 -1.503821403390e-03 0.000000000000e+00 1.503821403370e-03 2.000000000000e-14 -1.750000000000e+01 -1.516466028483e-03 0.000000000000e+00 1.516466028463e-03 2.000000000000e-14 -1.800000000000e+01 -1.528053049553e-03 0.000000000000e+00 1.528053049533e-03 2.000000000000e-14 -1.850000000000e+01 -1.538715031750e-03 0.000000000000e+00 1.538715031730e-03 2.000000000000e-14 -1.900000000000e+01 -1.548563001499e-03 0.000000000000e+00 1.548563001479e-03 2.000000000000e-14 -1.950000000000e+01 -1.557690651930e-03 0.000000000000e+00 1.557690651910e-03 2.000000000000e-14 -2.000000000000e+01 -1.566177607015e-03 0.000000000000e+00 1.566177606995e-03 2.000000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.540065817929e-14 0.000000000000e+00 -4.598730743565e-15 2.000000000000e-14 -3.000000000000e+00 -2.906808973212e-11 0.000000000000e+00 2.904808969411e-11 2.000000000000e-14 -3.500000000000e+00 -3.600913334129e-07 0.000000000000e+00 3.600913134130e-07 2.000000000000e-14 -4.000000000000e+00 -9.320814781821e-06 0.000000000000e+00 9.320814761821e-06 2.000000000000e-14 -4.500000000000e+00 -3.371953176372e-05 0.000000000000e+00 3.371953174372e-05 2.000000000000e-14 -5.000000000000e+00 -7.351724571319e-05 0.000000000000e+00 7.351724569319e-05 2.000000000000e-14 -5.500000000000e+00 -1.275695786626e-04 0.000000000000e+00 1.275695786426e-04 2.000000000000e-14 -6.000000000000e+00 -1.944846729942e-04 0.000000000000e+00 1.944846729742e-04 2.000000000000e-14 -6.500000000000e+00 -2.728758498012e-04 0.000000000000e+00 2.728758497812e-04 2.000000000000e-14 -7.000000000000e+00 -3.614482034327e-04 0.000000000000e+00 3.614482034127e-04 2.000000000000e-14 -7.500000000000e+00 -4.590140542911e-04 0.000000000000e+00 4.590140542711e-04 2.000000000000e-14 -8.000000000000e+00 -5.644554518146e-04 0.000000000000e+00 5.644554517946e-04 2.000000000000e-14 -8.500000000000e+00 -6.753721923907e-04 0.000000000000e+00 6.753721923707e-04 2.000000000000e-14 -9.000000000000e+00 -7.861904599521e-04 0.000000000000e+00 7.861904599321e-04 2.000000000000e-14 -9.500000000000e+00 -8.914285395360e-04 0.000000000000e+00 8.914285395160e-04 2.000000000000e-14 -1.000000000000e+01 -9.866337453455e-04 0.000000000000e+00 9.866337453255e-04 2.000000000000e-14 -1.050000000000e+01 -1.069406297647e-03 0.000000000000e+00 1.069406297627e-03 2.000000000000e-14 -1.100000000000e+01 -1.139589401652e-03 0.000000000000e+00 1.139589401632e-03 2.000000000000e-14 -1.150000000000e+01 -1.198475740264e-03 0.000000000000e+00 1.198475740244e-03 2.000000000000e-14 -1.200000000000e+01 -1.247885128270e-03 0.000000000000e+00 1.247885128250e-03 2.000000000000e-14 -1.250000000000e+01 -1.289597912572e-03 0.000000000000e+00 1.289597912552e-03 2.000000000000e-14 -1.300000000000e+01 -1.325130834820e-03 0.000000000000e+00 1.325130834800e-03 2.000000000000e-14 -1.350000000000e+01 -1.355700115174e-03 0.000000000000e+00 1.355700115154e-03 2.000000000000e-14 -1.400000000000e+01 -1.382257155021e-03 0.000000000000e+00 1.382257155001e-03 2.000000000000e-14 -1.450000000000e+01 -1.405541184978e-03 0.000000000000e+00 1.405541184958e-03 2.000000000000e-14 -1.500000000000e+01 -1.426127987080e-03 0.000000000000e+00 1.426127987060e-03 2.000000000000e-14 -1.550000000000e+01 -1.444469209631e-03 0.000000000000e+00 1.444469209611e-03 2.000000000000e-14 -1.600000000000e+01 -1.460922403627e-03 0.000000000000e+00 1.460922403607e-03 2.000000000000e-14 -1.650000000000e+01 -1.475773474188e-03 0.000000000000e+00 1.475773474168e-03 2.000000000000e-14 -1.700000000000e+01 -1.489253356636e-03 0.000000000000e+00 1.489253356616e-03 2.000000000000e-14 -1.750000000000e+01 -1.501550423123e-03 0.000000000000e+00 1.501550423103e-03 2.000000000000e-14 -1.800000000000e+01 -1.512819766821e-03 0.000000000000e+00 1.512819766801e-03 2.000000000000e-14 -1.850000000000e+01 -1.523190205230e-03 0.000000000000e+00 1.523190205210e-03 2.000000000000e-14 -1.900000000000e+01 -1.532769610821e-03 0.000000000000e+00 1.532769610801e-03 2.000000000000e-14 -1.950000000000e+01 -1.541649006859e-03 0.000000000000e+00 1.541649006839e-03 2.000000000000e-14 -2.000000000000e+01 -1.549905744148e-03 0.000000000000e+00 1.549905744128e-03 2.000000000000e-14 -1.000000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.540109186016e-14 0.000000000000e+00 -4.598730743565e-15 2.000000000000e-14 -3.000000000000e+00 -2.906808973212e-11 0.000000000000e+00 2.904808968887e-11 2.000000000000e-14 -3.500000000000e+00 -3.600908313136e-07 0.000000000000e+00 3.600908113140e-07 2.000000000000e-14 -4.000000000000e+00 -9.320708539675e-06 0.000000000000e+00 9.320708519675e-06 2.000000000000e-14 -4.500000000000e+00 -3.371869589430e-05 0.000000000000e+00 3.371869587430e-05 2.000000000000e-14 -5.000000000000e+00 -7.351430454720e-05 0.000000000000e+00 7.351430452721e-05 2.000000000000e-14 -5.500000000000e+00 -1.275623466874e-04 0.000000000000e+00 1.275623466674e-04 2.000000000000e-14 -6.000000000000e+00 -1.944700732689e-04 0.000000000000e+00 1.944700732489e-04 2.000000000000e-14 -6.500000000000e+00 -2.728496645604e-04 0.000000000000e+00 2.728496645404e-04 2.000000000000e-14 -7.000000000000e+00 -3.614045106647e-04 0.000000000000e+00 3.614045106447e-04 2.000000000000e-14 -7.500000000000e+00 -4.589441820968e-04 0.000000000000e+00 4.589441820768e-04 2.000000000000e-14 -8.000000000000e+00 -5.643417920880e-04 0.000000000000e+00 5.643417920680e-04 2.000000000000e-14 -8.500000000000e+00 -6.750607655465e-04 0.000000000000e+00 6.750607655265e-04 2.000000000000e-14 -9.000000000000e+00 -7.853476761652e-04 0.000000000000e+00 7.853476761452e-04 2.000000000000e-14 -9.500000000000e+00 -8.896110310201e-04 0.000000000000e+00 8.896110310001e-04 2.000000000000e-14 -1.000000000000e+01 -9.834031167239e-04 0.000000000000e+00 9.834031167039e-04 2.000000000000e-14 -1.050000000000e+01 -1.064481741313e-03 0.000000000000e+00 1.064481741293e-03 2.000000000000e-14 -1.100000000000e+01 -1.132896862487e-03 0.000000000000e+00 1.132896862467e-03 2.000000000000e-14 -1.150000000000e+01 -1.190094555628e-03 0.000000000000e+00 1.190094555608e-03 2.000000000000e-14 -1.200000000000e+01 -1.237970570671e-03 0.000000000000e+00 1.237970570651e-03 2.000000000000e-14 -1.250000000000e+01 -1.278325876930e-03 0.000000000000e+00 1.278325876910e-03 2.000000000000e-14 -1.300000000000e+01 -1.312669411865e-03 0.000000000000e+00 1.312669411845e-03 2.000000000000e-14 -1.350000000000e+01 -1.342198614427e-03 0.000000000000e+00 1.342198614407e-03 2.000000000000e-14 -1.400000000000e+01 -1.367843888746e-03 0.000000000000e+00 1.367843888726e-03 2.000000000000e-14 -1.450000000000e+01 -1.390324913263e-03 0.000000000000e+00 1.390324913243e-03 2.000000000000e-14 -1.500000000000e+01 -1.410200543162e-03 0.000000000000e+00 1.410200543142e-03 2.000000000000e-14 -1.550000000000e+01 -1.427908239814e-03 0.000000000000e+00 1.427908239794e-03 2.000000000000e-14 -1.600000000000e+01 -1.443793826370e-03 0.000000000000e+00 1.443793826350e-03 2.000000000000e-14 -1.650000000000e+01 -1.458133554406e-03 0.000000000000e+00 1.458133554386e-03 2.000000000000e-14 -1.700000000000e+01 -1.471150406782e-03 0.000000000000e+00 1.471150406762e-03 2.000000000000e-14 -1.750000000000e+01 -1.483026181211e-03 0.000000000000e+00 1.483026181191e-03 2.000000000000e-14 -1.800000000000e+01 -1.493910508325e-03 0.000000000000e+00 1.493910508305e-03 2.000000000000e-14 -1.850000000000e+01 -1.503927640810e-03 0.000000000000e+00 1.503927640790e-03 2.000000000000e-14 -1.900000000000e+01 -1.513181613478e-03 0.000000000000e+00 1.513181613458e-03 2.000000000000e-14 -1.950000000000e+01 -1.521760203651e-03 0.000000000000e+00 1.521760203631e-03 2.000000000000e-14 -2.000000000000e+01 -1.529738000341e-03 0.000000000000e+00 1.529738000321e-03 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Ig1_vb1.standard0000644000265600020320000010250212264261473023731 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -1.500000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -3.000000000000e+00 -7.193898254876e-15 0.000000000000e+00 -4.806086948470e-15 1.200000000000e-14 -3.500000000000e+00 -3.535271952569e-10 0.000000000000e+00 3.535151953102e-10 1.200000000000e-14 -4.000000000000e+00 -2.339962485088e-06 0.000000000000e+00 2.339962473087e-06 1.200000000000e-14 -4.500000000000e+00 -1.634276574282e-05 0.000000000000e+00 1.634276573082e-05 1.200000000000e-14 -5.000000000000e+00 -4.336208606012e-05 0.000000000000e+00 4.336208604812e-05 1.200000000000e-14 -5.500000000000e+00 -8.199937595302e-05 0.000000000000e+00 8.199937594102e-05 1.200000000000e-14 -6.000000000000e+00 -1.266291885533e-04 0.000000000000e+00 1.266291885413e-04 1.200000000000e-14 -6.500000000000e+00 -1.698251423245e-04 0.000000000000e+00 1.698251423125e-04 1.200000000000e-14 -7.000000000000e+00 -2.094905886622e-04 0.000000000000e+00 2.094905886502e-04 1.200000000000e-14 -7.500000000000e+00 -2.450846923952e-04 0.000000000000e+00 2.450846923832e-04 1.200000000000e-14 -8.000000000000e+00 -2.767204319513e-04 0.000000000000e+00 2.767204319393e-04 1.200000000000e-14 -8.500000000000e+00 -3.047714922788e-04 0.000000000000e+00 3.047714922668e-04 1.200000000000e-14 -9.000000000000e+00 -3.296799086079e-04 0.000000000000e+00 3.296799085959e-04 1.200000000000e-14 -9.500000000000e+00 -3.518720547066e-04 0.000000000000e+00 3.518720546946e-04 1.200000000000e-14 -1.000000000000e+01 -3.717279815507e-04 0.000000000000e+00 3.717279815387e-04 1.200000000000e-14 -1.050000000000e+01 -3.895746870150e-04 0.000000000000e+00 3.895746870030e-04 1.200000000000e-14 -1.100000000000e+01 -4.056890791402e-04 0.000000000000e+00 4.056890791282e-04 1.200000000000e-14 -1.150000000000e+01 -4.203041953571e-04 0.000000000000e+00 4.203041953451e-04 1.200000000000e-14 -1.200000000000e+01 -4.336159414605e-04 0.000000000000e+00 4.336159414485e-04 1.200000000000e-14 -1.250000000000e+01 -4.457892922211e-04 0.000000000000e+00 4.457892922091e-04 1.200000000000e-14 -1.300000000000e+01 -4.569636283076e-04 0.000000000000e+00 4.569636282956e-04 1.200000000000e-14 -1.350000000000e+01 -4.672571877459e-04 0.000000000000e+00 4.672571877339e-04 1.200000000000e-14 -1.400000000000e+01 -4.767707229928e-04 0.000000000000e+00 4.767707229808e-04 1.200000000000e-14 -1.450000000000e+01 -4.855904853378e-04 0.000000000000e+00 4.855904853258e-04 1.200000000000e-14 -1.500000000000e+01 -4.937906555370e-04 0.000000000000e+00 4.937906555250e-04 1.200000000000e-14 -1.550000000000e+01 -5.014353249229e-04 0.000000000000e+00 5.014353249109e-04 1.200000000000e-14 -1.600000000000e+01 -5.085801139604e-04 0.000000000000e+00 5.085801139484e-04 1.200000000000e-14 -1.650000000000e+01 -5.152734990111e-04 0.000000000000e+00 5.152734989991e-04 1.200000000000e-14 -1.700000000000e+01 -5.215579041415e-04 0.000000000000e+00 5.215579041295e-04 1.200000000000e-14 -1.750000000000e+01 -5.274706033562e-04 0.000000000000e+00 5.274706033442e-04 1.200000000000e-14 -1.800000000000e+01 -5.330444694031e-04 0.000000000000e+00 5.330444693911e-04 1.200000000000e-14 -1.850000000000e+01 -5.383085979601e-04 0.000000000000e+00 5.383085979481e-04 1.200000000000e-14 -1.900000000000e+01 -5.432888302019e-04 0.000000000000e+00 5.432888301899e-04 1.200000000000e-14 -1.950000000000e+01 -5.480081921569e-04 0.000000000000e+00 5.480081921449e-04 1.200000000000e-14 -2.000000000000e+01 -5.524872656432e-04 0.000000000000e+00 5.524872656312e-04 1.200000000000e-14 -1.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -1.500000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.500000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -3.000000000000e+00 -1.026153988171e-14 0.000000000000e+00 -4.738455492451e-15 1.500000000000e-14 -3.500000000000e+00 -4.776283587388e-10 0.000000000000e+00 4.776133584541e-10 1.500000000000e-14 -4.000000000000e+00 -2.517014646278e-06 0.000000000000e+00 2.517014631278e-06 1.500000000000e-14 -4.500000000000e+00 -1.693949455895e-05 0.000000000000e+00 1.693949454395e-05 1.500000000000e-14 -5.000000000000e+00 -4.451714579877e-05 0.000000000000e+00 4.451714578377e-05 1.500000000000e-14 -5.500000000000e+00 -8.389908054961e-05 0.000000000000e+00 8.389908053461e-05 1.500000000000e-14 -6.000000000000e+00 -1.334217262757e-04 0.000000000000e+00 1.334217262607e-04 1.500000000000e-14 -6.500000000000e+00 -1.915310422834e-04 0.000000000000e+00 1.915310422684e-04 1.500000000000e-14 -7.000000000000e+00 -2.568819184564e-04 0.000000000000e+00 2.568819184414e-04 1.500000000000e-14 -7.500000000000e+00 -3.268936246147e-04 0.000000000000e+00 3.268936245997e-04 1.500000000000e-14 -8.000000000000e+00 -3.967651489559e-04 0.000000000000e+00 3.967651489409e-04 1.500000000000e-14 -8.500000000000e+00 -4.639299117370e-04 0.000000000000e+00 4.639299117220e-04 1.500000000000e-14 -9.000000000000e+00 -5.268637493754e-04 0.000000000000e+00 5.268637493604e-04 1.500000000000e-14 -9.500000000000e+00 -5.847679729617e-04 0.000000000000e+00 5.847679729467e-04 1.500000000000e-14 -1.000000000000e+01 -6.374069805213e-04 0.000000000000e+00 6.374069805064e-04 1.500000000000e-14 -1.050000000000e+01 -6.849225621708e-04 0.000000000000e+00 6.849225621558e-04 1.500000000000e-14 -1.100000000000e+01 -7.276704324152e-04 0.000000000000e+00 7.276704324002e-04 1.500000000000e-14 -1.150000000000e+01 -7.661013920018e-04 0.000000000000e+00 7.661013919868e-04 1.500000000000e-14 -1.200000000000e+01 -8.006867003603e-04 0.000000000000e+00 8.006867003453e-04 1.500000000000e-14 -1.250000000000e+01 -8.318770452824e-04 0.000000000000e+00 8.318770452674e-04 1.500000000000e-14 -1.300000000000e+01 -8.600833606032e-04 0.000000000000e+00 8.600833605882e-04 1.500000000000e-14 -1.350000000000e+01 -8.856703768202e-04 0.000000000000e+00 8.856703768052e-04 1.500000000000e-14 -1.400000000000e+01 -9.089569188511e-04 0.000000000000e+00 9.089569188361e-04 1.500000000000e-14 -1.450000000000e+01 -9.302193919526e-04 0.000000000000e+00 9.302193919376e-04 1.500000000000e-14 -1.500000000000e+01 -9.496964851530e-04 0.000000000000e+00 9.496964851380e-04 1.500000000000e-14 -1.550000000000e+01 -9.675940705595e-04 0.000000000000e+00 9.675940705445e-04 1.500000000000e-14 -1.600000000000e+01 -9.840898119005e-04 0.000000000000e+00 9.840898118855e-04 1.500000000000e-14 -1.650000000000e+01 -9.993372838848e-04 0.000000000000e+00 9.993372838698e-04 1.500000000000e-14 -1.700000000000e+01 -1.013469552068e-03 0.000000000000e+00 1.013469552053e-03 1.500000000000e-14 -1.750000000000e+01 -1.026602234186e-03 0.000000000000e+00 1.026602234171e-03 1.500000000000e-14 -1.800000000000e+01 -1.038836094288e-03 0.000000000000e+00 1.038836094273e-03 1.500000000000e-14 -1.850000000000e+01 -1.050259230343e-03 0.000000000000e+00 1.050259230328e-03 1.500000000000e-14 -1.900000000000e+01 -1.060948915162e-03 0.000000000000e+00 1.060948915147e-03 1.500000000000e-14 -1.950000000000e+01 -1.070973145094e-03 0.000000000000e+00 1.070973145079e-03 1.500000000000e-14 -2.000000000000e+01 -1.080391944027e-03 0.000000000000e+00 1.080391944012e-03 1.500000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.542776323360e-14 0.000000000000e+00 -4.571812048802e-15 2.000000000000e-14 -3.500000000000e+00 -7.836034542595e-10 0.000000000000e+00 7.835834547596e-10 2.000000000000e-14 -4.000000000000e+00 -2.814923564484e-06 0.000000000000e+00 2.814923544484e-06 2.000000000000e-14 -4.500000000000e+00 -1.785055260187e-05 0.000000000000e+00 1.785055258187e-05 2.000000000000e-14 -5.000000000000e+00 -4.612404081784e-05 0.000000000000e+00 4.612404079784e-05 2.000000000000e-14 -5.500000000000e+00 -8.622949525536e-05 0.000000000000e+00 8.622949523536e-05 2.000000000000e-14 -6.000000000000e+00 -1.364939372372e-04 0.000000000000e+00 1.364939372172e-04 2.000000000000e-14 -6.500000000000e+00 -1.953793268303e-04 0.000000000000e+00 1.953793268103e-04 2.000000000000e-14 -7.000000000000e+00 -2.615680981418e-04 0.000000000000e+00 2.615680981218e-04 2.000000000000e-14 -7.500000000000e+00 -3.339508891062e-04 0.000000000000e+00 3.339508890862e-04 2.000000000000e-14 -8.000000000000e+00 -4.115914831340e-04 0.000000000000e+00 4.115914831140e-04 2.000000000000e-14 -8.500000000000e+00 -4.936920942800e-04 0.000000000000e+00 4.936920942600e-04 2.000000000000e-14 -9.000000000000e+00 -5.794327968282e-04 0.000000000000e+00 5.794327968082e-04 2.000000000000e-14 -9.500000000000e+00 -6.665045461337e-04 0.000000000000e+00 6.665045461137e-04 2.000000000000e-14 -1.000000000000e+01 -7.525476456513e-04 0.000000000000e+00 7.525476456313e-04 2.000000000000e-14 -1.050000000000e+01 -8.358763926594e-04 0.000000000000e+00 8.358763926394e-04 2.000000000000e-14 -1.100000000000e+01 -9.150865417484e-04 0.000000000000e+00 9.150865417284e-04 2.000000000000e-14 -1.150000000000e+01 -9.891409104172e-04 0.000000000000e+00 9.891409103972e-04 2.000000000000e-14 -1.200000000000e+01 -1.057429853444e-03 0.000000000000e+00 1.057429853424e-03 2.000000000000e-14 -1.250000000000e+01 -1.119748885363e-03 0.000000000000e+00 1.119748885343e-03 2.000000000000e-14 -1.300000000000e+01 -1.176215333924e-03 0.000000000000e+00 1.176215333904e-03 2.000000000000e-14 -1.350000000000e+01 -1.227163171937e-03 0.000000000000e+00 1.227163171917e-03 2.000000000000e-14 -1.400000000000e+01 -1.273046377755e-03 0.000000000000e+00 1.273046377735e-03 2.000000000000e-14 -1.450000000000e+01 -1.314365405431e-03 0.000000000000e+00 1.314365405411e-03 2.000000000000e-14 -1.500000000000e+01 -1.351618773643e-03 0.000000000000e+00 1.351618773623e-03 2.000000000000e-14 -1.550000000000e+01 -1.385275295669e-03 0.000000000000e+00 1.385275295649e-03 2.000000000000e-14 -1.600000000000e+01 -1.415760782351e-03 0.000000000000e+00 1.415760782331e-03 2.000000000000e-14 -1.650000000000e+01 -1.443453807266e-03 0.000000000000e+00 1.443453807246e-03 2.000000000000e-14 -1.700000000000e+01 -1.468686606573e-03 0.000000000000e+00 1.468686606553e-03 2.000000000000e-14 -1.750000000000e+01 -1.491748563831e-03 0.000000000000e+00 1.491748563811e-03 2.000000000000e-14 -1.800000000000e+01 -1.512890751779e-03 0.000000000000e+00 1.512890751759e-03 2.000000000000e-14 -1.850000000000e+01 -1.532330678085e-03 0.000000000000e+00 1.532330678065e-03 2.000000000000e-14 -1.900000000000e+01 -1.550256796833e-03 0.000000000000e+00 1.550256796813e-03 2.000000000000e-14 -1.950000000000e+01 -1.566832588868e-03 0.000000000000e+00 1.566832588848e-03 2.000000000000e-14 -2.000000000000e+01 -1.582200147600e-03 0.000000000000e+00 1.582200147580e-03 2.000000000000e-14 -1.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -1.500000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -3.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -3.500000000000e+00 -2.658465895339e-13 0.000000000000e+00 2.538465102920e-13 1.200000000000e-14 -4.000000000000e+00 -1.206206927490e-06 0.000000000000e+00 1.206206915490e-06 1.200000000000e-14 -4.500000000000e+00 -1.762083105279e-05 0.000000000000e+00 1.762083104079e-05 1.200000000000e-14 -5.000000000000e+00 -5.388786522910e-05 0.000000000000e+00 5.388786521710e-05 1.200000000000e-14 -5.500000000000e+00 -1.071388392262e-04 0.000000000000e+00 1.071388392142e-04 1.200000000000e-14 -6.000000000000e+00 -1.695057851334e-04 0.000000000000e+00 1.695057851214e-04 1.200000000000e-14 -6.500000000000e+00 -2.273638916808e-04 0.000000000000e+00 2.273638916688e-04 1.200000000000e-14 -7.000000000000e+00 -2.779733840839e-04 0.000000000000e+00 2.779733840719e-04 1.200000000000e-14 -7.500000000000e+00 -3.213357526034e-04 0.000000000000e+00 3.213357525914e-04 1.200000000000e-14 -8.000000000000e+00 -3.582751235004e-04 0.000000000000e+00 3.582751234884e-04 1.200000000000e-14 -8.500000000000e+00 -3.897960819266e-04 0.000000000000e+00 3.897960819146e-04 1.200000000000e-14 -9.000000000000e+00 -4.168341329499e-04 0.000000000000e+00 4.168341329379e-04 1.200000000000e-14 -9.500000000000e+00 -4.401832054947e-04 0.000000000000e+00 4.401832054827e-04 1.200000000000e-14 -1.000000000000e+01 -4.604921838570e-04 0.000000000000e+00 4.604921838450e-04 1.200000000000e-14 -1.050000000000e+01 -4.782837437275e-04 0.000000000000e+00 4.782837437155e-04 1.200000000000e-14 -1.100000000000e+01 -4.939773702338e-04 0.000000000000e+00 4.939773702218e-04 1.200000000000e-14 -1.150000000000e+01 -5.079103475441e-04 0.000000000000e+00 5.079103475321e-04 1.200000000000e-14 -1.200000000000e+01 -5.203551246423e-04 0.000000000000e+00 5.203551246303e-04 1.200000000000e-14 -1.250000000000e+01 -5.315331089825e-04 0.000000000000e+00 5.315331089705e-04 1.200000000000e-14 -1.300000000000e+01 -5.416254322326e-04 0.000000000000e+00 5.416254322206e-04 1.200000000000e-14 -1.350000000000e+01 -5.507812995572e-04 0.000000000000e+00 5.507812995452e-04 1.200000000000e-14 -1.400000000000e+01 -5.591244617606e-04 0.000000000000e+00 5.591244617486e-04 1.200000000000e-14 -1.450000000000e+01 -5.667582461774e-04 0.000000000000e+00 5.667582461654e-04 1.200000000000e-14 -1.500000000000e+01 -5.737694851416e-04 0.000000000000e+00 5.737694851296e-04 1.200000000000e-14 -1.550000000000e+01 -5.802316007010e-04 0.000000000000e+00 5.802316006890e-04 1.200000000000e-14 -1.600000000000e+01 -5.862070415393e-04 0.000000000000e+00 5.862070415273e-04 1.200000000000e-14 -1.650000000000e+01 -5.917492202854e-04 0.000000000000e+00 5.917492202734e-04 1.200000000000e-14 -1.700000000000e+01 -5.969040634142e-04 0.000000000000e+00 5.969040634022e-04 1.200000000000e-14 -1.750000000000e+01 -6.017112589907e-04 0.000000000000e+00 6.017112589787e-04 1.200000000000e-14 -1.800000000000e+01 -6.062052673234e-04 0.000000000000e+00 6.062052673114e-04 1.200000000000e-14 -1.850000000000e+01 -6.104161444501e-04 0.000000000000e+00 6.104161444381e-04 1.200000000000e-14 -1.900000000000e+01 -6.143702169741e-04 0.000000000000e+00 6.143702169621e-04 1.200000000000e-14 -1.950000000000e+01 -6.180906381403e-04 0.000000000000e+00 6.180906381283e-04 1.200000000000e-14 -2.000000000000e+01 -6.215978484850e-04 0.000000000000e+00 6.215978484730e-04 1.200000000000e-14 -1.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -1.500000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.500000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -3.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -3.500000000000e+00 -3.971068265884e-13 0.000000000000e+00 3.821064664801e-13 1.500000000000e-14 -4.000000000000e+00 -1.350782584390e-06 0.000000000000e+00 1.350782569389e-06 1.500000000000e-14 -4.500000000000e+00 -1.835099360051e-05 0.000000000000e+00 1.835099358551e-05 1.500000000000e-14 -5.000000000000e+00 -5.538339692038e-05 0.000000000000e+00 5.538339690538e-05 1.500000000000e-14 -5.500000000000e+00 -1.095642743488e-04 0.000000000000e+00 1.095642743338e-04 1.500000000000e-14 -6.000000000000e+00 -1.775865961914e-04 0.000000000000e+00 1.775865961764e-04 1.500000000000e-14 -6.500000000000e+00 -2.566174683425e-04 0.000000000000e+00 2.566174683275e-04 1.500000000000e-14 -7.000000000000e+00 -3.443794712325e-04 0.000000000000e+00 3.443794712175e-04 1.500000000000e-14 -7.500000000000e+00 -4.367044903763e-04 0.000000000000e+00 4.367044903613e-04 1.500000000000e-14 -8.000000000000e+00 -5.253571926977e-04 0.000000000000e+00 5.253571926827e-04 1.500000000000e-14 -8.500000000000e+00 -6.069851772628e-04 0.000000000000e+00 6.069851772478e-04 1.500000000000e-14 -9.000000000000e+00 -6.801526595058e-04 0.000000000000e+00 6.801526594908e-04 1.500000000000e-14 -9.500000000000e+00 -7.446235385957e-04 0.000000000000e+00 7.446235385807e-04 1.500000000000e-14 -1.000000000000e+01 -8.009136539550e-04 0.000000000000e+00 8.009136539400e-04 1.500000000000e-14 -1.050000000000e+01 -8.498959991253e-04 0.000000000000e+00 8.498959991103e-04 1.500000000000e-14 -1.100000000000e+01 -8.925392034171e-04 0.000000000000e+00 8.925392034021e-04 1.500000000000e-14 -1.150000000000e+01 -9.297680999296e-04 0.000000000000e+00 9.297680999146e-04 1.500000000000e-14 -1.200000000000e+01 -9.624047705370e-04 0.000000000000e+00 9.624047705220e-04 1.500000000000e-14 -1.250000000000e+01 -9.911534791221e-04 0.000000000000e+00 9.911534791071e-04 1.500000000000e-14 -1.300000000000e+01 -1.016606169211e-03 0.000000000000e+00 1.016606169196e-03 1.500000000000e-14 -1.350000000000e+01 -1.039255875862e-03 0.000000000000e+00 1.039255875847e-03 1.500000000000e-14 -1.400000000000e+01 -1.059511905339e-03 0.000000000000e+00 1.059511905324e-03 1.500000000000e-14 -1.450000000000e+01 -1.077714113206e-03 0.000000000000e+00 1.077714113191e-03 1.500000000000e-14 -1.500000000000e+01 -1.094145325217e-03 0.000000000000e+00 1.094145325202e-03 1.500000000000e-14 -1.550000000000e+01 -1.109041731247e-03 0.000000000000e+00 1.109041731232e-03 1.500000000000e-14 -1.600000000000e+01 -1.122601408216e-03 0.000000000000e+00 1.122601408201e-03 1.500000000000e-14 -1.650000000000e+01 -1.134991236693e-03 0.000000000000e+00 1.134991236678e-03 1.500000000000e-14 -1.700000000000e+01 -1.146352488000e-03 0.000000000000e+00 1.146352487985e-03 1.500000000000e-14 -1.750000000000e+01 -1.156805332218e-03 0.000000000000e+00 1.156805332203e-03 1.500000000000e-14 -1.800000000000e+01 -1.166452479298e-03 0.000000000000e+00 1.166452479283e-03 1.500000000000e-14 -1.850000000000e+01 -1.175382127111e-03 0.000000000000e+00 1.175382127096e-03 1.500000000000e-14 -1.900000000000e+01 -1.183670356213e-03 0.000000000000e+00 1.183670356198e-03 1.500000000000e-14 -1.950000000000e+01 -1.191383082652e-03 0.000000000000e+00 1.191383082637e-03 1.500000000000e-14 -2.000000000000e+01 -1.198577657017e-03 0.000000000000e+00 1.198577657002e-03 1.500000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -3.500000000000e+00 -7.678059577021e-13 0.000000000000e+00 7.478059506765e-13 2.000000000000e-14 -4.000000000000e+00 -1.606478374275e-06 0.000000000000e+00 1.606478354276e-06 2.000000000000e-14 -4.500000000000e+00 -1.948862054148e-05 0.000000000000e+00 1.948862052148e-05 2.000000000000e-14 -5.000000000000e+00 -5.749825437510e-05 0.000000000000e+00 5.749825435510e-05 2.000000000000e-14 -5.500000000000e+00 -1.126348713856e-04 0.000000000000e+00 1.126348713656e-04 2.000000000000e-14 -6.000000000000e+00 -1.815851247672e-04 0.000000000000e+00 1.815851247472e-04 2.000000000000e-14 -6.500000000000e+00 -2.615588744353e-04 0.000000000000e+00 2.615588744153e-04 2.000000000000e-14 -7.000000000000e+00 -3.503319516951e-04 0.000000000000e+00 3.503319516751e-04 2.000000000000e-14 -7.500000000000e+00 -4.461357166036e-04 0.000000000000e+00 4.461357165836e-04 2.000000000000e-14 -8.000000000000e+00 -5.475412228348e-04 0.000000000000e+00 5.475412228148e-04 2.000000000000e-14 -8.500000000000e+00 -6.533661708691e-04 0.000000000000e+00 6.533661708491e-04 2.000000000000e-14 -9.000000000000e+00 -7.621173559049e-04 0.000000000000e+00 7.621173558849e-04 2.000000000000e-14 -9.500000000000e+00 -8.691444685856e-04 0.000000000000e+00 8.691444685656e-04 2.000000000000e-14 -1.000000000000e+01 -9.710431957060e-04 0.000000000000e+00 9.710431956860e-04 2.000000000000e-14 -1.050000000000e+01 -1.065594822269e-03 0.000000000000e+00 1.065594822249e-03 2.000000000000e-14 -1.100000000000e+01 -1.151382337882e-03 0.000000000000e+00 1.151382337862e-03 2.000000000000e-14 -1.150000000000e+01 -1.227870659328e-03 0.000000000000e+00 1.227870659308e-03 2.000000000000e-14 -1.200000000000e+01 -1.295267928614e-03 0.000000000000e+00 1.295267928594e-03 2.000000000000e-14 -1.250000000000e+01 -1.354266106222e-03 0.000000000000e+00 1.354266106202e-03 2.000000000000e-14 -1.300000000000e+01 -1.405789141728e-03 0.000000000000e+00 1.405789141708e-03 2.000000000000e-14 -1.350000000000e+01 -1.450812202720e-03 0.000000000000e+00 1.450812202700e-03 2.000000000000e-14 -1.400000000000e+01 -1.490257617411e-03 0.000000000000e+00 1.490257617391e-03 2.000000000000e-14 -1.450000000000e+01 -1.524947603560e-03 0.000000000000e+00 1.524947603540e-03 2.000000000000e-14 -1.500000000000e+01 -1.555591178585e-03 0.000000000000e+00 1.555591178565e-03 2.000000000000e-14 -1.550000000000e+01 -1.582788600125e-03 0.000000000000e+00 1.582788600105e-03 2.000000000000e-14 -1.600000000000e+01 -1.607043253673e-03 0.000000000000e+00 1.607043253653e-03 2.000000000000e-14 -1.650000000000e+01 -1.628775608025e-03 0.000000000000e+00 1.628775608005e-03 2.000000000000e-14 -1.700000000000e+01 -1.648336680392e-03 0.000000000000e+00 1.648336680372e-03 2.000000000000e-14 -1.750000000000e+01 -1.666019977813e-03 0.000000000000e+00 1.666019977793e-03 2.000000000000e-14 -1.800000000000e+01 -1.682071641224e-03 0.000000000000e+00 1.682071641204e-03 2.000000000000e-14 -1.850000000000e+01 -1.696698863945e-03 0.000000000000e+00 1.696698863925e-03 2.000000000000e-14 -1.900000000000e+01 -1.710076790504e-03 0.000000000000e+00 1.710076790484e-03 2.000000000000e-14 -1.950000000000e+01 -1.722354134540e-03 0.000000000000e+00 1.722354134520e-03 2.000000000000e-14 -2.000000000000e+01 -1.733657742502e-03 0.000000000000e+00 1.733657742482e-03 2.000000000000e-14 -1.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -1.500000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.000000000000e+00 -7.000042906435e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.049916206370e-15 0.000000000000e+00 -4.950050735608e-15 1.200000000000e-14 -3.000000000000e+00 -8.240855263811e-12 0.000000000000e+00 8.228855128894e-12 1.200000000000e-14 -3.500000000000e+00 -1.240159972886e-07 0.000000000000e+00 1.240159852885e-07 1.200000000000e-14 -4.000000000000e+00 -4.138241901303e-06 0.000000000000e+00 4.138241889303e-06 1.200000000000e-14 -4.500000000000e+00 -1.567368936754e-05 0.000000000000e+00 1.567368935554e-05 1.200000000000e-14 -5.000000000000e+00 -3.477915311623e-05 0.000000000000e+00 3.477915310423e-05 1.200000000000e-14 -5.500000000000e+00 -6.040675534642e-05 0.000000000000e+00 6.040675533442e-05 1.200000000000e-14 -6.000000000000e+00 -8.876864046934e-05 0.000000000000e+00 8.876864045734e-05 1.200000000000e-14 -6.500000000000e+00 -1.171394652870e-04 0.000000000000e+00 1.171394652750e-04 1.200000000000e-14 -7.000000000000e+00 -1.443311874025e-04 0.000000000000e+00 1.443311873905e-04 1.200000000000e-14 -7.500000000000e+00 -1.698140615891e-04 0.000000000000e+00 1.698140615771e-04 1.200000000000e-14 -8.000000000000e+00 -1.934198513945e-04 0.000000000000e+00 1.934198513825e-04 1.200000000000e-14 -8.500000000000e+00 -2.151708926954e-04 0.000000000000e+00 2.151708926834e-04 1.200000000000e-14 -9.000000000000e+00 -2.351797207202e-04 0.000000000000e+00 2.351797207082e-04 1.200000000000e-14 -9.500000000000e+00 -2.535938099865e-04 0.000000000000e+00 2.535938099745e-04 1.200000000000e-14 -1.000000000000e+01 -2.705671969161e-04 0.000000000000e+00 2.705671969041e-04 1.200000000000e-14 -1.050000000000e+01 -2.862470252957e-04 0.000000000000e+00 2.862470252837e-04 1.200000000000e-14 -1.100000000000e+01 -3.007679532579e-04 0.000000000000e+00 3.007679532459e-04 1.200000000000e-14 -1.150000000000e+01 -3.142505214383e-04 0.000000000000e+00 3.142505214263e-04 1.200000000000e-14 -1.200000000000e+01 -3.268014122713e-04 0.000000000000e+00 3.268014122593e-04 1.200000000000e-14 -1.250000000000e+01 -3.385145316797e-04 0.000000000000e+00 3.385145316677e-04 1.200000000000e-14 -1.300000000000e+01 -3.494723760203e-04 0.000000000000e+00 3.494723760083e-04 1.200000000000e-14 -1.350000000000e+01 -3.597474245271e-04 0.000000000000e+00 3.597474245151e-04 1.200000000000e-14 -1.400000000000e+01 -3.694034402221e-04 0.000000000000e+00 3.694034402101e-04 1.200000000000e-14 -1.450000000000e+01 -3.784966344391e-04 0.000000000000e+00 3.784966344271e-04 1.200000000000e-14 -1.500000000000e+01 -3.870766855439e-04 0.000000000000e+00 3.870766855319e-04 1.200000000000e-14 -1.550000000000e+01 -3.951876188743e-04 0.000000000000e+00 3.951876188623e-04 1.200000000000e-14 -1.600000000000e+01 -4.028685616724e-04 0.000000000000e+00 4.028685616604e-04 1.200000000000e-14 -1.650000000000e+01 -4.101543886884e-04 0.000000000000e+00 4.101543886764e-04 1.200000000000e-14 -1.700000000000e+01 -4.170762737478e-04 0.000000000000e+00 4.170762737358e-04 1.200000000000e-14 -1.750000000000e+01 -4.236621611866e-04 0.000000000000e+00 4.236621611746e-04 1.200000000000e-14 -1.800000000000e+01 -4.299371693489e-04 0.000000000000e+00 4.299371693369e-04 1.200000000000e-14 -1.850000000000e+01 -4.359239366149e-04 0.000000000000e+00 4.359239366029e-04 1.200000000000e-14 -1.900000000000e+01 -4.416429188405e-04 0.000000000000e+00 4.416429188285e-04 1.200000000000e-14 -1.950000000000e+01 -4.471126456902e-04 0.000000000000e+00 4.471126456782e-04 1.200000000000e-14 -2.000000000000e+01 -4.523499421437e-04 0.000000000000e+00 4.523499421317e-04 1.200000000000e-14 -1.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -1.500000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.000000000000e+00 -1.000003031770e-14 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -2.500000000000e+00 -1.008481492759e-14 0.000000000000e+00 -4.915310204187e-15 1.500000000000e-14 -3.000000000000e+00 -1.021937894551e-11 0.000000000000e+00 1.020437884631e-11 1.500000000000e-14 -3.500000000000e+00 -1.434876481514e-07 0.000000000000e+00 1.434876331515e-07 1.500000000000e-14 -4.000000000000e+00 -4.339718927122e-06 0.000000000000e+00 4.339718912122e-06 1.500000000000e-14 -4.500000000000e+00 -1.615803479958e-05 0.000000000000e+00 1.615803478458e-05 1.500000000000e-14 -5.000000000000e+00 -3.564260027313e-05 0.000000000000e+00 3.564260025813e-05 1.500000000000e-14 -5.500000000000e+00 -6.225268792653e-05 0.000000000000e+00 6.225268791153e-05 1.500000000000e-14 -6.000000000000e+00 -9.530974148733e-05 0.000000000000e+00 9.530974147233e-05 1.500000000000e-14 -6.500000000000e+00 -1.341305171313e-04 0.000000000000e+00 1.341305171163e-04 1.500000000000e-14 -7.000000000000e+00 -1.779590591896e-04 0.000000000000e+00 1.779590591746e-04 1.500000000000e-14 -7.500000000000e+00 -2.249954371056e-04 0.000000000000e+00 2.249954370906e-04 1.500000000000e-14 -8.000000000000e+00 -2.732591342986e-04 0.000000000000e+00 2.732591342836e-04 1.500000000000e-14 -8.500000000000e+00 -3.213817616744e-04 0.000000000000e+00 3.213817616594e-04 1.500000000000e-14 -9.000000000000e+00 -3.683312759714e-04 0.000000000000e+00 3.683312759564e-04 1.500000000000e-14 -9.500000000000e+00 -4.133757941363e-04 0.000000000000e+00 4.133757941213e-04 1.500000000000e-14 -1.000000000000e+01 -4.560555312456e-04 0.000000000000e+00 4.560555312306e-04 1.500000000000e-14 -1.050000000000e+01 -4.961350693968e-04 0.000000000000e+00 4.961350693818e-04 1.500000000000e-14 -1.100000000000e+01 -5.335475297377e-04 0.000000000000e+00 5.335475297227e-04 1.500000000000e-14 -1.150000000000e+01 -5.683416937364e-04 0.000000000000e+00 5.683416937214e-04 1.500000000000e-14 -1.200000000000e+01 -6.006382783029e-04 0.000000000000e+00 6.006382782879e-04 1.500000000000e-14 -1.250000000000e+01 -6.305972607621e-04 0.000000000000e+00 6.305972607471e-04 1.500000000000e-14 -1.300000000000e+01 -6.583953794922e-04 0.000000000000e+00 6.583953794772e-04 1.500000000000e-14 -1.350000000000e+01 -6.842117240611e-04 0.000000000000e+00 6.842117240461e-04 1.500000000000e-14 -1.400000000000e+01 -7.082191711649e-04 0.000000000000e+00 7.082191711499e-04 1.500000000000e-14 -1.450000000000e+01 -7.305797666844e-04 0.000000000000e+00 7.305797666694e-04 1.500000000000e-14 -1.500000000000e+01 -7.514426317102e-04 0.000000000000e+00 7.514426316952e-04 1.500000000000e-14 -1.550000000000e+01 -7.709434050937e-04 0.000000000000e+00 7.709434050787e-04 1.500000000000e-14 -1.600000000000e+01 -7.892045710320e-04 0.000000000000e+00 7.892045710170e-04 1.500000000000e-14 -1.650000000000e+01 -8.063362580922e-04 0.000000000000e+00 8.063362580772e-04 1.500000000000e-14 -1.700000000000e+01 -8.224372557534e-04 0.000000000000e+00 8.224372557384e-04 1.500000000000e-14 -1.750000000000e+01 -8.375960979393e-04 0.000000000000e+00 8.375960979243e-04 1.500000000000e-14 -1.800000000000e+01 -8.518921281983e-04 0.000000000000e+00 8.518921281833e-04 1.500000000000e-14 -1.850000000000e+01 -8.653965013564e-04 0.000000000000e+00 8.653965013414e-04 1.500000000000e-14 -1.900000000000e+01 -8.781731006659e-04 0.000000000000e+00 8.781731006509e-04 1.500000000000e-14 -1.950000000000e+01 -8.902793636343e-04 0.000000000000e+00 8.902793636193e-04 1.500000000000e-14 -2.000000000000e+01 -9.017670177005e-04 0.000000000000e+00 9.017670176855e-04 1.500000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -2.500000000000e+00 -1.520051445825e-14 0.000000000000e+00 -4.799365371782e-15 2.000000000000e-14 -3.000000000000e+00 -1.454154461775e-11 0.000000000000e+00 1.452154493661e-11 2.000000000000e-14 -3.500000000000e+00 -1.800541842858e-07 0.000000000000e+00 1.800541642859e-07 2.000000000000e-14 -4.000000000000e+00 -4.662208745269e-06 0.000000000000e+00 4.662208725269e-06 2.000000000000e-14 -4.500000000000e+00 -1.687393936860e-05 0.000000000000e+00 1.687393934860e-05 2.000000000000e-14 -5.000000000000e+00 -3.680846025096e-05 0.000000000000e+00 3.680846023096e-05 2.000000000000e-14 -5.500000000000e+00 -6.390708332053e-05 0.000000000000e+00 6.390708330053e-05 2.000000000000e-14 -6.000000000000e+00 -9.748816856126e-05 0.000000000000e+00 9.748816854126e-05 2.000000000000e-14 -6.500000000000e+00 -1.368753879902e-04 0.000000000000e+00 1.368753879702e-04 2.000000000000e-14 -7.000000000000e+00 -1.814444314260e-04 0.000000000000e+00 1.814444314060e-04 2.000000000000e-14 -7.500000000000e+00 -2.306353387858e-04 0.000000000000e+00 2.306353387658e-04 2.000000000000e-14 -8.000000000000e+00 -2.839508330759e-04 0.000000000000e+00 2.839508330559e-04 2.000000000000e-14 -8.500000000000e+00 -3.409454548436e-04 0.000000000000e+00 3.409454548236e-04 2.000000000000e-14 -9.000000000000e+00 -4.010465990726e-04 0.000000000000e+00 4.010465990526e-04 2.000000000000e-14 -9.500000000000e+00 -4.631649512953e-04 0.000000000000e+00 4.631649512753e-04 2.000000000000e-14 -1.000000000000e+01 -5.262674341278e-04 0.000000000000e+00 5.262674341078e-04 2.000000000000e-14 -1.050000000000e+01 -5.894605683843e-04 0.000000000000e+00 5.894605683644e-04 2.000000000000e-14 -1.100000000000e+01 -6.519086725045e-04 0.000000000000e+00 6.519086724845e-04 2.000000000000e-14 -1.150000000000e+01 -7.128546082752e-04 0.000000000000e+00 7.128546082552e-04 2.000000000000e-14 -1.200000000000e+01 -7.716577642732e-04 0.000000000000e+00 7.716577642532e-04 2.000000000000e-14 -1.250000000000e+01 -8.278233758821e-04 0.000000000000e+00 8.278233758621e-04 2.000000000000e-14 -1.300000000000e+01 -8.810137964329e-04 0.000000000000e+00 8.810137964129e-04 2.000000000000e-14 -1.350000000000e+01 -9.310413980433e-04 0.000000000000e+00 9.310413980233e-04 2.000000000000e-14 -1.400000000000e+01 -9.778479788276e-04 0.000000000000e+00 9.778479788076e-04 2.000000000000e-14 -1.450000000000e+01 -1.021477215948e-03 0.000000000000e+00 1.021477215928e-03 2.000000000000e-14 -1.500000000000e+01 -1.062045985903e-03 0.000000000000e+00 1.062045985883e-03 2.000000000000e-14 -1.550000000000e+01 -1.099718535783e-03 0.000000000000e+00 1.099718535763e-03 2.000000000000e-14 -1.600000000000e+01 -1.134685503802e-03 0.000000000000e+00 1.134685503782e-03 2.000000000000e-14 -1.650000000000e+01 -1.167148230169e-03 0.000000000000e+00 1.167148230149e-03 2.000000000000e-14 -1.700000000000e+01 -1.197307855530e-03 0.000000000000e+00 1.197307855510e-03 2.000000000000e-14 -1.750000000000e+01 -1.225358292861e-03 0.000000000000e+00 1.225358292841e-03 2.000000000000e-14 -1.800000000000e+01 -1.251482097470e-03 0.000000000000e+00 1.251482097450e-03 2.000000000000e-14 -1.850000000000e+01 -1.275848377496e-03 0.000000000000e+00 1.275848377476e-03 2.000000000000e-14 -1.900000000000e+01 -1.298612066867e-03 0.000000000000e+00 1.298612066847e-03 2.000000000000e-14 -1.950000000000e+01 -1.319914060532e-03 0.000000000000e+00 1.319914060512e-03 2.000000000000e-14 -2.000000000000e+01 -1.339881861021e-03 0.000000000000e+00 1.339881861001e-03 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/noise2.standard0000644000265600020320000001167012264261473022765 0ustar andreasadminFreq N(d) 1000 1.542081284695e-35 1258.925411794 1.169788281442e-35 1584.893192461 8.873751578335e-36 1995.262314969 6.731428953704e-36 2511.88643151 5.106311052182e-36 3162.277660168 3.873533055309e-36 3981.071705535 2.938375311892e-36 5011.872336273 2.22898561862e-36 6309.573444802 1.690858505348e-36 7943.282347243 1.282647344704e-36 10000 9.729875123634e-37 12589.25411794 7.380865076623e-37 15848.93192461 5.598958731442e-37 19952.62314969 4.247244537185e-37 25118.8643151 3.221864461573e-37 31622.77660168 2.444034130332e-37 39810.71705535 1.853989483875e-37 50118.72336273 1.406394846807e-37 63095.73444802 1.066859592423e-37 79432.82347243 8.092957625157e-38 100000 6.13913617009e-38 125892.5411794 4.657011028662e-38 158489.3192461 3.532704132983e-38 199526.2314969 2.679830134467e-38 251188.643151 2.032859044861e-38 316227.7660168 1.542081284587e-38 398107.1705535 1.169788281312e-38 501187.2336273 8.873751576777e-39 630957.3444802 6.731428951831e-39 794328.2347243 5.10631104993e-39 1000000 3.873533052602e-39 1258925.411794 2.938375308637e-39 1584893.192461 2.228985614707e-39 1995262.314969 1.690858500643e-39 2511886.43151 1.282647339048e-39 3162277.660168 9.729875055626e-40 3981071.705535 7.380864994859e-40 5011872.336273 5.598958633141e-40 6309573.444802 4.247244419001e-40 7943282.347243 3.221864319485e-40 10000000 2.444033959504e-40 12589254.11794 1.853989278495e-40 15848931.92461 1.406394599885e-40 19952623.14969 1.066859295558e-40 25118864.3151 8.092954056052e-41 31622776.60168 6.139131879083e-41 39810717.05535 4.657005869739e-41 50118723.36273 3.532697930598e-41 63095734.44802 2.679822677567e-41 79432823.47243 2.03285007971e-41 100000000 1.542070506133e-41 1000 1.101061658109e-22 1258.925411794 8.352406825658e-23 1584.893192461 6.335948515465e-23 1995.262314969 4.806308460371e-23 2511.88643151 3.645957816711e-23 3162.277660168 2.765741839259e-23 3981.071705535 2.098029737582e-23 5011.872336273 1.591518310674e-23 6309.573444802 1.207290100726e-23 7943.282347243 9.158231969651e-24 10000 6.947229399092e-24 12589.25411794 5.270012430735e-24 15848.93192461 3.99771325008e-24 19952.62314969 3.032575622908e-24 25118.8643151 2.300443862117e-24 31622.77660168 1.745065126415e-24 39810.71705535 1.323767271864e-24 50118.72336273 1.004180166993e-24 63095.73444802 7.617485559688e-25 79432.82347243 5.778453723678e-25 100000 4.383405413114e-25 125892.5411794 3.325153048635e-25 158489.3192461 2.522386536217e-25 199526.2314969 1.913425861909e-25 251188.643151 1.451481950299e-25 316227.7660168 1.101061658026e-25 398107.1705535 8.352406824665e-26 501187.2336273 6.335948514271e-26 630957.3444802 4.806308458936e-26 794328.2347243 3.645957814986e-26 1000000 2.765741837185e-26 1258925.411794 2.098029735089e-26 1584893.192461 1.591518307676e-26 1995262.314969 1.207290097122e-26 2511886.43151 9.158231926322e-27 3162277.660168 6.947229347e-27 3981071.705535 5.270012368106e-27 5011872.336273 3.997713174784e-27 6309573.444802 3.032575532381e-27 7943282.347243 2.300443753281e-27 10000000 1.745064995565e-27 12589254.11794 1.323767114547e-27 15848931.92461 1.004179977856e-27 19952623.14969 7.61748328577e-28 25118864.3151 5.778450989828e-28 31622776.60168 4.383402126305e-28 39810717.05535 3.325149097023e-28 50118723.36273 2.522381785338e-28 63095734.44802 1.913420150102e-28 79432823.47243 1.45147508321e-28 100000000 1.101053401992e-28 1000 4.33419657538e-21 1258.925411794 3.287824327852e-21 1584.893192461 2.494069805744e-21 1995.262314969 1.891945425194e-21 2511.88643151 1.435187372732e-21 3162.277660168 1.088700956919e-21 3981.071705535 8.258641318317e-22 5011.872336273 6.264820104285e-22 6309.573444802 4.752352042703e-22 7943.282347243 3.605027688238e-22 10000 2.734693161657e-22 12589.25411794 2.074476907018e-22 15848.93192461 1.57365166158e-22 19952.62314969 1.193736861382e-22 25118.8643151 9.055420135297e-23 31622.77660168 6.869238647102e-23 39810.71705535 5.210850395212e-23 50118.72336273 3.952834256637e-23 63095.73444802 2.998531424888e-23 79432.82347243 2.274618696935e-23 100000 1.725474735231e-23 125892.5411794 1.308906440419e-23 158489.3192461 9.929070735047e-24 199526.2314969 7.531970400384e-24 251188.643151 5.713583841394e-24 316227.7660168 4.334196574984e-24 398107.1705535 3.287824327376e-24 501187.2336273 2.494069805171e-24 630957.3444802 1.891945424506e-24 794328.2347243 1.435187371904e-24 1000000 1.088700955925e-24 1258925.411794 8.25864130636e-25 1584893.192461 6.264820089909e-25 1995262.314969 4.752352025418e-25 2511886.43151 3.605027667458e-25 3162277.660168 2.734693136673e-25 3981071.705535 2.074476876982e-25 5011872.336273 1.573651625468e-25 6309573.444802 1.193736817965e-25 7943282.347243 9.055419613319e-26 10000000 6.869238019546e-26 12589254.11794 5.210849640724e-26 15848931.92461 3.952833349543e-26 19952623.14969 2.998530334321e-26 25118864.3151 2.274617385786e-26 31622776.60168 1.725473158884e-26 39810717.05535 1.308904545233e-26 50118723.36273 9.929047949921e-27 63095734.44802 7.531943006674e-27 79432823.47243 5.71355090698e-27 100000000 4.334156979244e-27 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_coiigs.standard0000644000265600020320000000753312264261473024327 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 4.39112399541257e-13 2.3372594792548e-13 4.49333908187296e-15 1258.925411794 4.39112399541261e-13 2.33725947925551e-13 4.49333908187247e-15 1584.893192461 4.39112399541185e-13 2.33725947925523e-13 4.49333908187235e-15 1995.262314969 4.39112399541146e-13 2.3372594792549e-13 4.49333908187219e-15 2511.88643151 4.39112399541137e-13 2.33725947925433e-13 4.49333908187158e-15 3162.277660168 4.39112399541245e-13 2.33725947925504e-13 4.49333908187268e-15 3981.071705535 4.39112399541161e-13 2.33725947925487e-13 4.49333908187117e-15 5011.872336273 4.39112399541143e-13 2.33725947925484e-13 4.49333908187279e-15 6309.573444802 4.3911239954119e-13 2.33725947925478e-13 4.4933390818724e-15 7943.282347243 4.39112399541101e-13 2.33725947925499e-13 4.4933390818726e-15 10000 4.39112399541257e-13 2.3372594792548e-13 4.49333908187296e-15 12589.25411794 4.39112399541261e-13 2.33725947925551e-13 4.49333908187247e-15 15848.93192461 4.39112399541185e-13 2.33725947925523e-13 4.49333908187235e-15 19952.62314969 4.39112399541146e-13 2.3372594792549e-13 4.49333908187219e-15 25118.8643151 4.39112399541137e-13 2.33725947925433e-13 4.49333908187158e-15 31622.77660168 4.39112399541245e-13 2.33725947925504e-13 4.49333908187268e-15 39810.71705535 4.39112399541161e-13 2.33725947925487e-13 4.49333908187117e-15 50118.72336273 4.39112399541143e-13 2.33725947925484e-13 4.49333908187278e-15 63095.73444802 4.3911239954119e-13 2.33725947925478e-13 4.4933390818724e-15 79432.82347243 4.39112399541101e-13 2.33725947925499e-13 4.4933390818726e-15 100000 4.39112399541257e-13 2.3372594792548e-13 4.49333908187296e-15 125892.5411794 4.39112399541261e-13 2.33725947925551e-13 4.49333908187247e-15 158489.3192461 4.39112399541185e-13 2.33725947925523e-13 4.49333908187235e-15 199526.2314969 4.39112399541146e-13 2.3372594792549e-13 4.49333908187219e-15 251188.643151 4.39112399541137e-13 2.33725947925433e-13 4.49333908187158e-15 316227.7660168 4.39112399541245e-13 2.33725947925504e-13 4.49333908187268e-15 398107.1705535 4.39112399541161e-13 2.33725947925487e-13 4.49333908187117e-15 501187.2336273 4.39112399541143e-13 2.33725947925484e-13 4.49333908187278e-15 630957.3444802 4.3911239954119e-13 2.33725947925478e-13 4.4933390818724e-15 794328.2347243 4.39112399541101e-13 2.33725947925499e-13 4.4933390818726e-15 1000000 4.39112399541257e-13 2.3372594792548e-13 4.49333908187296e-15 1258925.411794 4.39112399541261e-13 2.33725947925551e-13 4.49333908187247e-15 1584893.192461 4.39112399541185e-13 2.33725947925523e-13 4.49333908187235e-15 1995262.314969 4.39112399541146e-13 2.3372594792541e-13 4.49333908187219e-15 2511886.43151 4.39112399541074e-13 2.3372594792537e-13 4.49333908187158e-15 3162277.660168 4.39112399541195e-13 2.33725947925403e-13 4.49333908187268e-15 3981071.705535 4.39112399541161e-13 2.33725947925287e-13 4.49333908187117e-15 5011872.336273 4.39112399541143e-13 2.33725947925198e-13 4.49333908187279e-15 6309573.444802 4.39112399540938e-13 2.33725947925024e-13 4.4933390818724e-15 7943282.347243 4.391123995407e-13 2.33725947924698e-13 4.4933390818706e-15 10000000 4.39112399540621e-13 2.33725947924366e-13 4.49333908186978e-15 12589254.11794 4.39112399540249e-13 2.33725947923655e-13 4.49333908186994e-15 15848931.92461 4.39112399539578e-13 2.33725947922611e-13 4.49333908186833e-15 19952623.14969 4.39112399538593e-13 2.33725947920864e-13 4.49333908186421e-15 25118864.3151 4.39112399537019e-13 2.33725947918083e-13 4.49333908185954e-15 31622776.60168 4.39112399534753e-13 2.33725947913827e-13 4.49333908185355e-15 39810717.05535 4.39112399530767e-13 2.33725947906977e-13 4.49333908184319e-15 50118723.36273 4.39112399524948e-13 2.3372594789611e-13 4.49333908182515e-15 63095734.44802 4.39112399515462e-13 2.33725947878965e-13 4.49333908179673e-15 79432823.47243 4.39112399500427e-13 2.33725947851765e-13 4.49333908175038e-15 100000000 4.39112399476481e-13 2.33725947808661e-13 4.49333908168038e-15 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Id1_vb2.standard0000644000265600020320000010243012264261473024255 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.068269277566e-04 0.000000000000e+00 1.068269277356e-04 2.100000000000e-14 -1.500000000000e+00 -1.499613264760e-04 0.000000000000e+00 1.499613264545e-04 2.150000000000e-14 -2.000000000000e+00 -1.864303883315e-04 0.000000000000e+00 1.864303883095e-04 2.200000000000e-14 -2.500000000000e+00 -2.166544436727e-04 0.000000000000e+00 2.166544436502e-04 2.250000000000e-14 -3.000000000000e+00 -2.411974681266e-04 0.000000000000e+00 2.411974681036e-04 2.300000000000e-14 -3.500000000000e+00 -2.607163847322e-04 0.000000000000e+00 2.607163847087e-04 2.350000000000e-14 -4.000000000000e+00 -2.759144661929e-04 0.000000000000e+00 2.759144661689e-04 2.400000000000e-14 -4.500000000000e+00 -2.874976704097e-04 0.000000000000e+00 2.874976703852e-04 2.450000000000e-14 -5.000000000000e+00 -2.961366638663e-04 0.000000000000e+00 2.961366638413e-04 2.500000000000e-14 -5.500000000000e+00 -3.024380310912e-04 0.000000000000e+00 3.024380310657e-04 2.550000000000e-14 -6.000000000000e+00 -3.069267625343e-04 0.000000000000e+00 3.069267625083e-04 2.600000000000e-14 -6.500000000000e+00 -3.100400159472e-04 0.000000000000e+00 3.100400159207e-04 2.650000000000e-14 -7.000000000000e+00 -3.121302685419e-04 0.000000000000e+00 3.121302685149e-04 2.700000000000e-14 -7.500000000000e+00 -3.134749032900e-04 0.000000000000e+00 3.134749032625e-04 2.750000000000e-14 -8.000000000000e+00 -3.142894153040e-04 0.000000000000e+00 3.142894152760e-04 2.800000000000e-14 -8.500000000000e+00 -3.147430270121e-04 0.000000000000e+00 3.147430269836e-04 2.850000000000e-14 -9.000000000000e+00 -3.149787305094e-04 0.000000000000e+00 3.149787304804e-04 2.900000000000e-14 -9.500000000000e+00 -3.151257541650e-04 0.000000000000e+00 3.151257541355e-04 2.950000000000e-14 -1.000000000000e+01 -3.152540160577e-04 0.000000000000e+00 3.152540160277e-04 3.000000000000e-14 -1.050000000000e+01 -3.153762857015e-04 0.000000000000e+00 3.153762856710e-04 3.050000000000e-14 -1.100000000000e+01 -3.154941115560e-04 0.000000000000e+00 3.154941115250e-04 3.100000000000e-14 -1.150000000000e+01 -3.156080807365e-04 0.000000000000e+00 3.156080807050e-04 3.150000000000e-14 -1.200000000000e+01 -3.157186389525e-04 0.000000000000e+00 3.157186389205e-04 3.200000000000e-14 -1.250000000000e+01 -3.158261629861e-04 0.000000000000e+00 3.158261629536e-04 3.250000000000e-14 -1.300000000000e+01 -3.159309757700e-04 0.000000000000e+00 3.159309757370e-04 3.300000000000e-14 -1.350000000000e+01 -3.160333550993e-04 0.000000000000e+00 3.160333550658e-04 3.350000000000e-14 -1.400000000000e+01 -3.161335406438e-04 0.000000000000e+00 3.161335406098e-04 3.400000000000e-14 -1.450000000000e+01 -3.162317398528e-04 0.000000000000e+00 3.162317398183e-04 3.450000000000e-14 -1.500000000000e+01 -3.163281329297e-04 0.000000000000e+00 3.163281328947e-04 3.500000000000e-14 -1.550000000000e+01 -3.164228770072e-04 0.000000000000e+00 3.164228769717e-04 3.550000000000e-14 -1.600000000000e+01 -3.165161096425e-04 0.000000000000e+00 3.165161096065e-04 3.600000000000e-14 -1.650000000000e+01 -3.166079517384e-04 0.000000000000e+00 3.166079517019e-04 3.650000000000e-14 -1.700000000000e+01 -3.166985099867e-04 0.000000000000e+00 3.166985099497e-04 3.700000000000e-14 -1.750000000000e+01 -3.167878789124e-04 0.000000000000e+00 3.167878788749e-04 3.750000000000e-14 -1.800000000000e+01 -3.168761425880e-04 0.000000000000e+00 3.168761425500e-04 3.800000000000e-14 -1.850000000000e+01 -3.169633760742e-04 0.000000000000e+00 3.169633760357e-04 3.850000000000e-14 -1.900000000000e+01 -3.170496466332e-04 0.000000000000e+00 3.170496465942e-04 3.900000000000e-14 -1.950000000000e+01 -3.171350147549e-04 0.000000000000e+00 3.171350147154e-04 3.950000000000e-14 -2.000000000000e+01 -3.172195350260e-04 0.000000000000e+00 3.172195349860e-04 4.000000000000e-14 -1.000000000000e+00 -1.064623978048e-04 0.000000000000e+00 1.064623977838e-04 2.100000000000e-14 -1.500000000000e+00 -1.494922934616e-04 0.000000000000e+00 1.494922934401e-04 2.150000000000e-14 -2.000000000000e+00 -1.859091852196e-04 0.000000000000e+00 1.859091851976e-04 2.200000000000e-14 -2.500000000000e+00 -2.161264103060e-04 0.000000000000e+00 2.161264102835e-04 2.250000000000e-14 -3.000000000000e+00 -2.406976736206e-04 0.000000000000e+00 2.406976735976e-04 2.300000000000e-14 -3.500000000000e+00 -2.602684113115e-04 0.000000000000e+00 2.602684112880e-04 2.350000000000e-14 -4.000000000000e+00 -2.755309815712e-04 0.000000000000e+00 2.755309815472e-04 2.400000000000e-14 -4.500000000000e+00 -2.871822859444e-04 0.000000000000e+00 2.871822859199e-04 2.450000000000e-14 -5.000000000000e+00 -2.958864369800e-04 0.000000000000e+00 2.958864369550e-04 2.500000000000e-14 -5.500000000000e+00 -3.022460067298e-04 0.000000000000e+00 3.022460067043e-04 2.550000000000e-14 -6.000000000000e+00 -3.067841222943e-04 0.000000000000e+00 3.067841222683e-04 2.600000000000e-14 -6.500000000000e+00 -3.099376260689e-04 0.000000000000e+00 3.099376260424e-04 2.650000000000e-14 -7.000000000000e+00 -3.120596132635e-04 0.000000000000e+00 3.120596132365e-04 2.700000000000e-14 -7.500000000000e+00 -3.134285087773e-04 0.000000000000e+00 3.134285087498e-04 2.750000000000e-14 -8.000000000000e+00 -3.142608908412e-04 0.000000000000e+00 3.142608908132e-04 2.800000000000e-14 -8.500000000000e+00 -3.147267602676e-04 0.000000000000e+00 3.147267602391e-04 2.850000000000e-14 -9.000000000000e+00 -3.149691349166e-04 0.000000000000e+00 3.149691348876e-04 2.900000000000e-14 -9.500000000000e+00 -3.151179320994e-04 0.000000000000e+00 3.151179320699e-04 2.950000000000e-14 -1.000000000000e+01 -3.152464817579e-04 0.000000000000e+00 3.152464817279e-04 3.000000000000e-14 -1.050000000000e+01 -3.153688823134e-04 0.000000000000e+00 3.153688822829e-04 3.050000000000e-14 -1.100000000000e+01 -3.154868098951e-04 0.000000000000e+00 3.154868098641e-04 3.100000000000e-14 -1.150000000000e+01 -3.156008635151e-04 0.000000000000e+00 3.156008634836e-04 3.150000000000e-14 -1.200000000000e+01 -3.157114919212e-04 0.000000000000e+00 3.157114918892e-04 3.200000000000e-14 -1.250000000000e+01 -3.158190739068e-04 0.000000000000e+00 3.158190738743e-04 3.250000000000e-14 -1.300000000000e+01 -3.159239340942e-04 0.000000000000e+00 3.159239340612e-04 3.300000000000e-14 -1.350000000000e+01 -3.160263517389e-04 0.000000000000e+00 3.160263517054e-04 3.350000000000e-14 -1.400000000000e+01 -3.161265677735e-04 0.000000000000e+00 3.161265677395e-04 3.400000000000e-14 -1.450000000000e+01 -3.162247907367e-04 0.000000000000e+00 3.162247907022e-04 3.450000000000e-14 -1.500000000000e+01 -3.163212017706e-04 0.000000000000e+00 3.163212017356e-04 3.500000000000e-14 -1.550000000000e+01 -3.164159588166e-04 0.000000000000e+00 3.164159587811e-04 3.550000000000e-14 -1.600000000000e+01 -3.165092001286e-04 0.000000000000e+00 3.165092000926e-04 3.600000000000e-14 -1.650000000000e+01 -3.166010472107e-04 0.000000000000e+00 3.166010471742e-04 3.650000000000e-14 -1.700000000000e+01 -3.166916072742e-04 0.000000000000e+00 3.166916072372e-04 3.700000000000e-14 -1.750000000000e+01 -3.167809752937e-04 0.000000000000e+00 3.167809752562e-04 3.750000000000e-14 -1.800000000000e+01 -3.168692357318e-04 0.000000000000e+00 3.168692356938e-04 3.800000000000e-14 -1.850000000000e+01 -3.169564639883e-04 0.000000000000e+00 3.169564639498e-04 3.850000000000e-14 -1.900000000000e+01 -3.170427276209e-04 0.000000000000e+00 3.170427275819e-04 3.900000000000e-14 -1.950000000000e+01 -3.171280873776e-04 0.000000000000e+00 3.171280873381e-04 3.950000000000e-14 -2.000000000000e+01 -3.172125980707e-04 0.000000000000e+00 3.172125980307e-04 4.000000000000e-14 -1.000000000000e+00 -1.060165630333e-04 0.000000000000e+00 1.060165630123e-04 2.100000000000e-14 -1.500000000000e+00 -1.489169290033e-04 0.000000000000e+00 1.489169289818e-04 2.150000000000e-14 -2.000000000000e+00 -1.852677100609e-04 0.000000000000e+00 1.852677100389e-04 2.200000000000e-14 -2.500000000000e+00 -2.154742222721e-04 0.000000000000e+00 2.154742222496e-04 2.250000000000e-14 -3.000000000000e+00 -2.400780674741e-04 0.000000000000e+00 2.400780674511e-04 2.300000000000e-14 -3.500000000000e+00 -2.597109279190e-04 0.000000000000e+00 2.597109278955e-04 2.350000000000e-14 -4.000000000000e+00 -2.750519129680e-04 0.000000000000e+00 2.750519129440e-04 2.400000000000e-14 -4.500000000000e+00 -2.867867787183e-04 0.000000000000e+00 2.867867786938e-04 2.450000000000e-14 -5.000000000000e+00 -2.955714458447e-04 0.000000000000e+00 2.955714458197e-04 2.500000000000e-14 -5.500000000000e+00 -3.020033655862e-04 0.000000000000e+00 3.020033655607e-04 2.550000000000e-14 -6.000000000000e+00 -3.066031900805e-04 0.000000000000e+00 3.066031900545e-04 2.600000000000e-14 -6.500000000000e+00 -3.098072271256e-04 0.000000000000e+00 3.098072270991e-04 2.650000000000e-14 -7.000000000000e+00 -3.119692327246e-04 0.000000000000e+00 3.119692326976e-04 2.700000000000e-14 -7.500000000000e+00 -3.133688573301e-04 0.000000000000e+00 3.133688573026e-04 2.750000000000e-14 -8.000000000000e+00 -3.142239893328e-04 0.000000000000e+00 3.142239893048e-04 2.800000000000e-14 -8.500000000000e+00 -3.147055934198e-04 0.000000000000e+00 3.147055933913e-04 2.850000000000e-14 -9.000000000000e+00 -3.149567332940e-04 0.000000000000e+00 3.149567332650e-04 2.900000000000e-14 -9.500000000000e+00 -3.151079763294e-04 0.000000000000e+00 3.151079762999e-04 2.950000000000e-14 -1.000000000000e+01 -3.152369043593e-04 0.000000000000e+00 3.152369043293e-04 3.000000000000e-14 -1.050000000000e+01 -3.153594591715e-04 0.000000000000e+00 3.153594591410e-04 3.050000000000e-14 -1.100000000000e+01 -3.154775022760e-04 0.000000000000e+00 3.154775022450e-04 3.100000000000e-14 -1.150000000000e+01 -3.155916494554e-04 0.000000000000e+00 3.155916494239e-04 3.150000000000e-14 -1.200000000000e+01 -3.157023533968e-04 0.000000000000e+00 3.157023533648e-04 3.200000000000e-14 -1.250000000000e+01 -3.158099954101e-04 0.000000000000e+00 3.158099953776e-04 3.250000000000e-14 -1.300000000000e+01 -3.159149022227e-04 0.000000000000e+00 3.159149021897e-04 3.300000000000e-14 -1.350000000000e+01 -3.160173549137e-04 0.000000000000e+00 3.160173548802e-04 3.350000000000e-14 -1.400000000000e+01 -3.161175959960e-04 0.000000000000e+00 3.161175959620e-04 3.400000000000e-14 -1.450000000000e+01 -3.162158353752e-04 0.000000000000e+00 3.162158353407e-04 3.450000000000e-14 -1.500000000000e+01 -3.163122553745e-04 0.000000000000e+00 3.163122553395e-04 3.500000000000e-14 -1.550000000000e+01 -3.164070149547e-04 0.000000000000e+00 3.164070149192e-04 3.550000000000e-14 -1.600000000000e+01 -3.165002532509e-04 0.000000000000e+00 3.165002532149e-04 3.600000000000e-14 -1.650000000000e+01 -3.165920925295e-04 0.000000000000e+00 3.165920924930e-04 3.650000000000e-14 -1.700000000000e+01 -3.166826406621e-04 0.000000000000e+00 3.166826406251e-04 3.700000000000e-14 -1.750000000000e+01 -3.167719931971e-04 0.000000000000e+00 3.167719931596e-04 3.750000000000e-14 -1.800000000000e+01 -3.168602350966e-04 0.000000000000e+00 3.168602350586e-04 3.800000000000e-14 -1.850000000000e+01 -3.169474421960e-04 0.000000000000e+00 3.169474421575e-04 3.850000000000e-14 -1.900000000000e+01 -3.170336824347e-04 0.000000000000e+00 3.170336823957e-04 3.900000000000e-14 -1.950000000000e+01 -3.171190168949e-04 0.000000000000e+00 3.171190168554e-04 3.950000000000e-14 -2.000000000000e+01 -3.172035006834e-04 0.000000000000e+00 3.172035006434e-04 4.000000000000e-14 -1.000000000000e+00 -1.469064343527e-04 0.000000000000e+00 1.469064343317e-04 2.100000000000e-14 -1.500000000000e+00 -2.072308058726e-04 0.000000000000e+00 2.072308058511e-04 2.150000000000e-14 -2.000000000000e+00 -2.592316576903e-04 0.000000000000e+00 2.592316576683e-04 2.200000000000e-14 -2.500000000000e+00 -3.034421601315e-04 0.000000000000e+00 3.034421601090e-04 2.250000000000e-14 -3.000000000000e+00 -3.404778918227e-04 0.000000000000e+00 3.404778917997e-04 2.300000000000e-14 -3.500000000000e+00 -3.710059127653e-04 0.000000000000e+00 3.710059127418e-04 2.350000000000e-14 -4.000000000000e+00 -3.957280806984e-04 0.000000000000e+00 3.957280806744e-04 2.400000000000e-14 -4.500000000000e+00 -4.153665781030e-04 0.000000000000e+00 4.153665780785e-04 2.450000000000e-14 -5.000000000000e+00 -4.306458319654e-04 0.000000000000e+00 4.306458319404e-04 2.500000000000e-14 -5.500000000000e+00 -4.422703059739e-04 0.000000000000e+00 4.422703059484e-04 2.550000000000e-14 -6.000000000000e+00 -4.509011981846e-04 0.000000000000e+00 4.509011981586e-04 2.600000000000e-14 -6.500000000000e+00 -4.571363994391e-04 0.000000000000e+00 4.571363994126e-04 2.650000000000e-14 -7.000000000000e+00 -4.614972917189e-04 0.000000000000e+00 4.614972916919e-04 2.700000000000e-14 -7.500000000000e+00 -4.644239423258e-04 0.000000000000e+00 4.644239422983e-04 2.750000000000e-14 -8.000000000000e+00 -4.662782692482e-04 0.000000000000e+00 4.662782692202e-04 2.800000000000e-14 -8.500000000000e+00 -4.673542037566e-04 0.000000000000e+00 4.673542037281e-04 2.850000000000e-14 -9.000000000000e+00 -4.678977387884e-04 0.000000000000e+00 4.678977387594e-04 2.900000000000e-14 -9.500000000000e+00 -4.681559553812e-04 0.000000000000e+00 4.681559553517e-04 2.950000000000e-14 -1.000000000000e+01 -4.683509047046e-04 0.000000000000e+00 4.683509046746e-04 3.000000000000e-14 -1.050000000000e+01 -4.685354977550e-04 0.000000000000e+00 4.685354977245e-04 3.050000000000e-14 -1.100000000000e+01 -4.687125353270e-04 0.000000000000e+00 4.687125352960e-04 3.100000000000e-14 -1.150000000000e+01 -4.688829350997e-04 0.000000000000e+00 4.688829350682e-04 3.150000000000e-14 -1.200000000000e+01 -4.690474616198e-04 0.000000000000e+00 4.690474615878e-04 3.200000000000e-14 -1.250000000000e+01 -4.692067751451e-04 0.000000000000e+00 4.692067751126e-04 3.250000000000e-14 -1.300000000000e+01 -4.693614458018e-04 0.000000000000e+00 4.693614457688e-04 3.300000000000e-14 -1.350000000000e+01 -4.695119658846e-04 0.000000000000e+00 4.695119658511e-04 3.350000000000e-14 -1.400000000000e+01 -4.696587609226e-04 0.000000000000e+00 4.696587608886e-04 3.400000000000e-14 -1.450000000000e+01 -4.698021994238e-04 0.000000000000e+00 4.698021993893e-04 3.450000000000e-14 -1.500000000000e+01 -4.699426013139e-04 0.000000000000e+00 4.699426012789e-04 3.500000000000e-14 -1.550000000000e+01 -4.700802451592e-04 0.000000000000e+00 4.700802451237e-04 3.550000000000e-14 -1.600000000000e+01 -4.702153743037e-04 0.000000000000e+00 4.702153742677e-04 3.600000000000e-14 -1.650000000000e+01 -4.703482020571e-04 0.000000000000e+00 4.703482020206e-04 3.650000000000e-14 -1.700000000000e+01 -4.704789160706e-04 0.000000000000e+00 4.704789160336e-04 3.700000000000e-14 -1.750000000000e+01 -4.706076820222e-04 0.000000000000e+00 4.706076819847e-04 3.750000000000e-14 -1.800000000000e+01 -4.707346467224e-04 0.000000000000e+00 4.707346466844e-04 3.800000000000e-14 -1.850000000000e+01 -4.708599407316e-04 0.000000000000e+00 4.708599406931e-04 3.850000000000e-14 -1.900000000000e+01 -4.709836805710e-04 0.000000000000e+00 4.709836805320e-04 3.900000000000e-14 -1.950000000000e+01 -4.711059705939e-04 0.000000000000e+00 4.711059705544e-04 3.950000000000e-14 -2.000000000000e+01 -4.712269045717e-04 0.000000000000e+00 4.712269045317e-04 4.000000000000e-14 -1.000000000000e+00 -1.462022743616e-04 0.000000000000e+00 1.462022743406e-04 2.100000000000e-14 -1.500000000000e+00 -2.062997591206e-04 0.000000000000e+00 2.062997590991e-04 2.150000000000e-14 -2.000000000000e+00 -2.581607324836e-04 0.000000000000e+00 2.581607324616e-04 2.200000000000e-14 -2.500000000000e+00 -3.023116809375e-04 0.000000000000e+00 3.023116809150e-04 2.250000000000e-14 -3.000000000000e+00 -3.393568929753e-04 0.000000000000e+00 3.393568929523e-04 2.300000000000e-14 -3.500000000000e+00 -3.699491564428e-04 0.000000000000e+00 3.699491564193e-04 2.350000000000e-14 -4.000000000000e+00 -3.947745700061e-04 0.000000000000e+00 3.947745699821e-04 2.400000000000e-14 -4.500000000000e+00 -4.145396153649e-04 0.000000000000e+00 4.145396153404e-04 2.450000000000e-14 -5.000000000000e+00 -4.299545652784e-04 0.000000000000e+00 4.299545652534e-04 2.500000000000e-14 -5.500000000000e+00 -4.417124458988e-04 0.000000000000e+00 4.417124458733e-04 2.550000000000e-14 -6.000000000000e+00 -4.504663516108e-04 0.000000000000e+00 4.504663515848e-04 2.600000000000e-14 -6.500000000000e+00 -4.568093947618e-04 0.000000000000e+00 4.568093947353e-04 2.650000000000e-14 -7.000000000000e+00 -4.612609873761e-04 0.000000000000e+00 4.612609873491e-04 2.700000000000e-14 -7.500000000000e+00 -4.642612419963e-04 0.000000000000e+00 4.642612419688e-04 2.750000000000e-14 -8.000000000000e+00 -4.661732810197e-04 0.000000000000e+00 4.661732809917e-04 2.800000000000e-14 -8.500000000000e+00 -4.672925257825e-04 0.000000000000e+00 4.672925257540e-04 2.850000000000e-14 -9.000000000000e+00 -4.678652812975e-04 0.000000000000e+00 4.678652812685e-04 2.900000000000e-14 -9.500000000000e+00 -4.681348333935e-04 0.000000000000e+00 4.681348333640e-04 2.950000000000e-14 -1.000000000000e+01 -4.683309097542e-04 0.000000000000e+00 4.683309097242e-04 3.000000000000e-14 -1.050000000000e+01 -4.685159468972e-04 0.000000000000e+00 4.685159468667e-04 3.050000000000e-14 -1.100000000000e+01 -4.686933594185e-04 0.000000000000e+00 4.686933593875e-04 3.100000000000e-14 -1.150000000000e+01 -4.688640837820e-04 0.000000000000e+00 4.688640837505e-04 3.150000000000e-14 -1.200000000000e+01 -4.690288909103e-04 0.000000000000e+00 4.690288908783e-04 3.200000000000e-14 -1.250000000000e+01 -4.691884465597e-04 0.000000000000e+00 4.691884465272e-04 3.250000000000e-14 -1.300000000000e+01 -4.693433257653e-04 0.000000000000e+00 4.693433257323e-04 3.300000000000e-14 -1.350000000000e+01 -4.694940251623e-04 0.000000000000e+00 4.694940251288e-04 3.350000000000e-14 -1.400000000000e+01 -4.696409740869e-04 0.000000000000e+00 4.696409740529e-04 3.400000000000e-14 -1.450000000000e+01 -4.697845443679e-04 0.000000000000e+00 4.697845443334e-04 3.450000000000e-14 -1.500000000000e+01 -4.699250588176e-04 0.000000000000e+00 4.699250587826e-04 3.500000000000e-14 -1.550000000000e+01 -4.700627985065e-04 0.000000000000e+00 4.700627984710e-04 3.550000000000e-14 -1.600000000000e+01 -4.701980089493e-04 0.000000000000e+00 4.701980089133e-04 3.600000000000e-14 -1.650000000000e+01 -4.703309053378e-04 0.000000000000e+00 4.703309053013e-04 3.650000000000e-14 -1.700000000000e+01 -4.704616769559e-04 0.000000000000e+00 4.704616769189e-04 3.700000000000e-14 -1.750000000000e+01 -4.705904909006e-04 0.000000000000e+00 4.705904908631e-04 3.750000000000e-14 -1.800000000000e+01 -4.707174952168e-04 0.000000000000e+00 4.707174951788e-04 3.800000000000e-14 -1.850000000000e+01 -4.708428215409e-04 0.000000000000e+00 4.708428215024e-04 3.850000000000e-14 -1.900000000000e+01 -4.709665873345e-04 0.000000000000e+00 4.709665872955e-04 3.900000000000e-14 -1.950000000000e+01 -4.710888977734e-04 0.000000000000e+00 4.710888977339e-04 3.950000000000e-14 -2.000000000000e+01 -4.712098473512e-04 0.000000000000e+00 4.712098473112e-04 4.000000000000e-14 -1.000000000000e+00 -1.453436327854e-04 0.000000000000e+00 1.453436327644e-04 2.100000000000e-14 -1.500000000000e+00 -2.051609229633e-04 0.000000000000e+00 2.051609229418e-04 2.150000000000e-14 -2.000000000000e+00 -2.568462216171e-04 0.000000000000e+00 2.568462215951e-04 2.200000000000e-14 -2.500000000000e+00 -3.009187343936e-04 0.000000000000e+00 3.009187343711e-04 2.250000000000e-14 -3.000000000000e+00 -3.379698800089e-04 0.000000000000e+00 3.379698799859e-04 2.300000000000e-14 -3.500000000000e+00 -3.686358322635e-04 0.000000000000e+00 3.686358322400e-04 2.350000000000e-14 -4.000000000000e+00 -3.935840402368e-04 0.000000000000e+00 3.935840402128e-04 2.400000000000e-14 -4.500000000000e+00 -4.135021101143e-04 0.000000000000e+00 4.135021100898e-04 2.450000000000e-14 -5.000000000000e+00 -4.290830159360e-04 0.000000000000e+00 4.290830159110e-04 2.500000000000e-14 -5.500000000000e+00 -4.410055453108e-04 0.000000000000e+00 4.410055452853e-04 2.550000000000e-14 -6.000000000000e+00 -4.499124717928e-04 0.000000000000e+00 4.499124717668e-04 2.600000000000e-14 -6.500000000000e+00 -4.563906098098e-04 0.000000000000e+00 4.563906097833e-04 2.650000000000e-14 -7.000000000000e+00 -4.609565574071e-04 0.000000000000e+00 4.609565573801e-04 2.700000000000e-14 -7.500000000000e+00 -4.640501785495e-04 0.000000000000e+00 4.640501785220e-04 2.750000000000e-14 -8.000000000000e+00 -4.660358802329e-04 0.000000000000e+00 4.660358802049e-04 2.800000000000e-14 -8.500000000000e+00 -4.672108375115e-04 0.000000000000e+00 4.672108374830e-04 2.850000000000e-14 -9.000000000000e+00 -4.678218818046e-04 0.000000000000e+00 4.678218817756e-04 2.900000000000e-14 -9.500000000000e+00 -4.681076530475e-04 0.000000000000e+00 4.681076530180e-04 2.950000000000e-14 -1.000000000000e+01 -4.683054267665e-04 0.000000000000e+00 4.683054267365e-04 3.000000000000e-14 -1.050000000000e+01 -4.684910008868e-04 0.000000000000e+00 4.684910008563e-04 3.050000000000e-14 -1.100000000000e+01 -4.686688571408e-04 0.000000000000e+00 4.686688571098e-04 3.100000000000e-14 -1.150000000000e+01 -4.688399616623e-04 0.000000000000e+00 4.688399616308e-04 3.150000000000e-14 -1.200000000000e+01 -4.690050934118e-04 0.000000000000e+00 4.690050933798e-04 3.200000000000e-14 -1.250000000000e+01 -4.691649249718e-04 0.000000000000e+00 4.691649249393e-04 3.250000000000e-14 -1.300000000000e+01 -4.693200374895e-04 0.000000000000e+00 4.693200374565e-04 3.300000000000e-14 -1.350000000000e+01 -4.694709330230e-04 0.000000000000e+00 4.694709329895e-04 3.350000000000e-14 -1.400000000000e+01 -4.696180456796e-04 0.000000000000e+00 4.696180456456e-04 3.400000000000e-14 -1.450000000000e+01 -4.697617514611e-04 0.000000000000e+00 4.697617514266e-04 3.450000000000e-14 -1.500000000000e+01 -4.699023768162e-04 0.000000000000e+00 4.699023767812e-04 3.500000000000e-14 -1.550000000000e+01 -4.700402059779e-04 0.000000000000e+00 4.700402059424e-04 3.550000000000e-14 -1.600000000000e+01 -4.701754872088e-04 0.000000000000e+00 4.701754871728e-04 3.600000000000e-14 -1.650000000000e+01 -4.703084380889e-04 0.000000000000e+00 4.703084380524e-04 3.650000000000e-14 -1.700000000000e+01 -4.704392499797e-04 0.000000000000e+00 4.704392499427e-04 3.700000000000e-14 -1.750000000000e+01 -4.705680917874e-04 0.000000000000e+00 4.705680917499e-04 3.750000000000e-14 -1.800000000000e+01 -4.706951131356e-04 0.000000000000e+00 4.706951130976e-04 3.800000000000e-14 -1.850000000000e+01 -4.708204470412e-04 0.000000000000e+00 4.708204470027e-04 3.850000000000e-14 -1.900000000000e+01 -4.709442121752e-04 0.000000000000e+00 4.709442121362e-04 3.900000000000e-14 -1.950000000000e+01 -4.710665147759e-04 0.000000000000e+00 4.710665147364e-04 3.950000000000e-14 -2.000000000000e+01 -4.711874502719e-04 0.000000000000e+00 4.711874502319e-04 4.000000000000e-14 -1.000000000000e+00 -7.002892530444e-05 0.000000000000e+00 7.002892528344e-05 2.100000000000e-14 -1.500000000000e+00 -9.779474427071e-05 0.000000000000e+00 9.779474424921e-05 2.150000000000e-14 -2.000000000000e+00 -1.208197000920e-04 0.000000000000e+00 1.208197000700e-04 2.200000000000e-14 -2.500000000000e+00 -1.394603362664e-04 0.000000000000e+00 1.394603362439e-04 2.250000000000e-14 -3.000000000000e+00 -1.542128511994e-04 0.000000000000e+00 1.542128511764e-04 2.300000000000e-14 -3.500000000000e+00 -1.656435302101e-04 0.000000000000e+00 1.656435301866e-04 2.350000000000e-14 -4.000000000000e+00 -1.743290623037e-04 0.000000000000e+00 1.743290622797e-04 2.400000000000e-14 -4.500000000000e+00 -1.808117845915e-04 0.000000000000e+00 1.808117845670e-04 2.450000000000e-14 -5.000000000000e+00 -1.855716847195e-04 0.000000000000e+00 1.855716846945e-04 2.500000000000e-14 -5.500000000000e+00 -1.890135286324e-04 0.000000000000e+00 1.890135286069e-04 2.550000000000e-14 -6.000000000000e+00 -1.914655608137e-04 0.000000000000e+00 1.914655607877e-04 2.600000000000e-14 -6.500000000000e+00 -1.931857819621e-04 0.000000000000e+00 1.931857819356e-04 2.650000000000e-14 -7.000000000000e+00 -1.943721913116e-04 0.000000000000e+00 1.943721912846e-04 2.700000000000e-14 -7.500000000000e+00 -1.951742114877e-04 0.000000000000e+00 1.951742114602e-04 2.750000000000e-14 -8.000000000000e+00 -1.957035305929e-04 0.000000000000e+00 1.957035305649e-04 2.800000000000e-14 -8.500000000000e+00 -1.960435719796e-04 0.000000000000e+00 1.960435719511e-04 2.850000000000e-14 -9.000000000000e+00 -1.962573916984e-04 0.000000000000e+00 1.962573916694e-04 2.900000000000e-14 -9.500000000000e+00 -1.963938764893e-04 0.000000000000e+00 1.963938764598e-04 2.950000000000e-14 -1.000000000000e+01 -1.964905053503e-04 0.000000000000e+00 1.964905053203e-04 3.000000000000e-14 -1.050000000000e+01 -1.965709292698e-04 0.000000000000e+00 1.965709292393e-04 3.050000000000e-14 -1.100000000000e+01 -1.966451607880e-04 0.000000000000e+00 1.966451607570e-04 3.100000000000e-14 -1.150000000000e+01 -1.967162533833e-04 0.000000000000e+00 1.967162533518e-04 3.150000000000e-14 -1.200000000000e+01 -1.967851433368e-04 0.000000000000e+00 1.967851433048e-04 3.200000000000e-14 -1.250000000000e+01 -1.968522200081e-04 0.000000000000e+00 1.968522199756e-04 3.250000000000e-14 -1.300000000000e+01 -1.969177145723e-04 0.000000000000e+00 1.969177145393e-04 3.300000000000e-14 -1.350000000000e+01 -1.969817979339e-04 0.000000000000e+00 1.969817979004e-04 3.350000000000e-14 -1.400000000000e+01 -1.970446092285e-04 0.000000000000e+00 1.970446091945e-04 3.400000000000e-14 -1.450000000000e+01 -1.971062662551e-04 0.000000000000e+00 1.971062662206e-04 3.450000000000e-14 -1.500000000000e+01 -1.971668705132e-04 0.000000000000e+00 1.971668704782e-04 3.500000000000e-14 -1.550000000000e+01 -1.972265103024e-04 0.000000000000e+00 1.972265102669e-04 3.550000000000e-14 -1.600000000000e+01 -1.972852629444e-04 0.000000000000e+00 1.972852629084e-04 3.600000000000e-14 -1.650000000000e+01 -1.973431965068e-04 0.000000000000e+00 1.973431964703e-04 3.650000000000e-14 -1.700000000000e+01 -1.974003711931e-04 0.000000000000e+00 1.974003711561e-04 3.700000000000e-14 -1.750000000000e+01 -1.974568404835e-04 0.000000000000e+00 1.974568404460e-04 3.750000000000e-14 -1.800000000000e+01 -1.975126520824e-04 0.000000000000e+00 1.975126520444e-04 3.800000000000e-14 -1.850000000000e+01 -1.975678487101e-04 0.000000000000e+00 1.975678486716e-04 3.850000000000e-14 -1.900000000000e+01 -1.976224687674e-04 0.000000000000e+00 1.976224687284e-04 3.900000000000e-14 -1.950000000000e+01 -1.976765468975e-04 0.000000000000e+00 1.976765468580e-04 3.950000000000e-14 -2.000000000000e+01 -1.977301144609e-04 0.000000000000e+00 1.977301144209e-04 4.000000000000e-14 -1.000000000000e+00 -6.987556742440e-05 0.000000000000e+00 6.987556740340e-05 2.100000000000e-14 -1.500000000000e+00 -9.760278111889e-05 0.000000000000e+00 9.760278109738e-05 2.150000000000e-14 -2.000000000000e+00 -1.206132817844e-04 0.000000000000e+00 1.206132817624e-04 2.200000000000e-14 -2.500000000000e+00 -1.392586278398e-04 0.000000000000e+00 1.392586278173e-04 2.250000000000e-14 -3.000000000000e+00 -1.540288514284e-04 0.000000000000e+00 1.540288514054e-04 2.300000000000e-14 -3.500000000000e+00 -1.654843302698e-04 0.000000000000e+00 1.654843302463e-04 2.350000000000e-14 -4.000000000000e+00 -1.741970010710e-04 0.000000000000e+00 1.741970010470e-04 2.400000000000e-14 -4.500000000000e+00 -1.807059300238e-04 0.000000000000e+00 1.807059299993e-04 2.450000000000e-14 -5.000000000000e+00 -1.854892213978e-04 0.000000000000e+00 1.854892213728e-04 2.500000000000e-14 -5.500000000000e+00 -1.889508357939e-04 0.000000000000e+00 1.889508357684e-04 2.550000000000e-14 -6.000000000000e+00 -1.914189291666e-04 0.000000000000e+00 1.914189291406e-04 2.600000000000e-14 -6.500000000000e+00 -1.931518149559e-04 0.000000000000e+00 1.931518149294e-04 2.650000000000e-14 -7.000000000000e+00 -1.943479766762e-04 0.000000000000e+00 1.943479766492e-04 2.700000000000e-14 -7.500000000000e+00 -1.951573494303e-04 0.000000000000e+00 1.951573494028e-04 2.750000000000e-14 -8.000000000000e+00 -1.956920844623e-04 0.000000000000e+00 1.956920844343e-04 2.800000000000e-14 -8.500000000000e+00 -1.960359835451e-04 0.000000000000e+00 1.960359835166e-04 2.850000000000e-14 -9.000000000000e+00 -1.962523832331e-04 0.000000000000e+00 1.962523832041e-04 2.900000000000e-14 -9.500000000000e+00 -1.963903735431e-04 0.000000000000e+00 1.963903735136e-04 2.950000000000e-14 -1.000000000000e+01 -1.964876794616e-04 0.000000000000e+00 1.964876794316e-04 3.000000000000e-14 -1.050000000000e+01 -1.965683337413e-04 0.000000000000e+00 1.965683337108e-04 3.050000000000e-14 -1.100000000000e+01 -1.966426426712e-04 0.000000000000e+00 1.966426426402e-04 3.100000000000e-14 -1.150000000000e+01 -1.967137693781e-04 0.000000000000e+00 1.967137693466e-04 3.150000000000e-14 -1.200000000000e+01 -1.967826793003e-04 0.000000000000e+00 1.967826792683e-04 3.200000000000e-14 -1.250000000000e+01 -1.968497695222e-04 0.000000000000e+00 1.968497694897e-04 3.250000000000e-14 -1.300000000000e+01 -1.969152736560e-04 0.000000000000e+00 1.969152736230e-04 3.300000000000e-14 -1.350000000000e+01 -1.969793636240e-04 0.000000000000e+00 1.969793635905e-04 3.350000000000e-14 -1.400000000000e+01 -1.970421791349e-04 0.000000000000e+00 1.970421791009e-04 3.400000000000e-14 -1.450000000000e+01 -1.971038383865e-04 0.000000000000e+00 1.971038383520e-04 3.450000000000e-14 -1.500000000000e+01 -1.971644431899e-04 0.000000000000e+00 1.971644431549e-04 3.500000000000e-14 -1.550000000000e+01 -1.972240821009e-04 0.000000000000e+00 1.972240820654e-04 3.550000000000e-14 -1.600000000000e+01 -1.972828326564e-04 0.000000000000e+00 1.972828326204e-04 3.600000000000e-14 -1.650000000000e+01 -1.973407631079e-04 0.000000000000e+00 1.973407630714e-04 3.650000000000e-14 -1.700000000000e+01 -1.973979338161e-04 0.000000000000e+00 1.973979337791e-04 3.700000000000e-14 -1.750000000000e+01 -1.974543983970e-04 0.000000000000e+00 1.974543983595e-04 3.750000000000e-14 -1.800000000000e+01 -1.975102046721e-04 0.000000000000e+00 1.975102046341e-04 3.800000000000e-14 -1.850000000000e+01 -1.975653954631e-04 0.000000000000e+00 1.975653954246e-04 3.850000000000e-14 -1.900000000000e+01 -1.976200092593e-04 0.000000000000e+00 1.976200092203e-04 3.900000000000e-14 -1.950000000000e+01 -1.976740807807e-04 0.000000000000e+00 1.976740807412e-04 3.950000000000e-14 -2.000000000000e+01 -1.977276414551e-04 0.000000000000e+00 1.977276414151e-04 4.000000000000e-14 -1.000000000000e+00 -6.968753249988e-05 0.000000000000e+00 6.968753247888e-05 2.100000000000e-14 -1.500000000000e+00 -9.736678206335e-05 0.000000000000e+00 9.736678204185e-05 2.150000000000e-14 -2.000000000000e+00 -1.203587851334e-04 0.000000000000e+00 1.203587851114e-04 2.200000000000e-14 -2.500000000000e+00 -1.390091992327e-04 0.000000000000e+00 1.390091992102e-04 2.250000000000e-14 -3.000000000000e+00 -1.538006372651e-04 0.000000000000e+00 1.538006372421e-04 2.300000000000e-14 -3.500000000000e+00 -1.652862870636e-04 0.000000000000e+00 1.652862870401e-04 2.350000000000e-14 -4.000000000000e+00 -1.740322398595e-04 0.000000000000e+00 1.740322398355e-04 2.400000000000e-14 -4.500000000000e+00 -1.805734917151e-04 0.000000000000e+00 1.805734916906e-04 2.450000000000e-14 -5.000000000000e+00 -1.853857666732e-04 0.000000000000e+00 1.853857666482e-04 2.500000000000e-14 -5.500000000000e+00 -1.888719750581e-04 0.000000000000e+00 1.888719750326e-04 2.550000000000e-14 -6.000000000000e+00 -1.913601182148e-04 0.000000000000e+00 1.913601181888e-04 2.600000000000e-14 -6.500000000000e+00 -1.931088644204e-04 0.000000000000e+00 1.931088643939e-04 2.650000000000e-14 -7.000000000000e+00 -1.943172763566e-04 0.000000000000e+00 1.943172763296e-04 2.700000000000e-14 -7.500000000000e+00 -1.951359123441e-04 0.000000000000e+00 1.951359123166e-04 2.750000000000e-14 -8.000000000000e+00 -1.956774918453e-04 0.000000000000e+00 1.956774918173e-04 2.800000000000e-14 -8.500000000000e+00 -1.960262835375e-04 0.000000000000e+00 1.960262835090e-04 2.850000000000e-14 -9.000000000000e+00 -1.962459711262e-04 0.000000000000e+00 1.962459710973e-04 2.900000000000e-14 -9.500000000000e+00 -1.963858946924e-04 0.000000000000e+00 1.963858946629e-04 2.950000000000e-14 -1.000000000000e+01 -1.964840782810e-04 0.000000000000e+00 1.964840782510e-04 3.000000000000e-14 -1.050000000000e+01 -1.965650304473e-04 0.000000000000e+00 1.965650304168e-04 3.050000000000e-14 -1.100000000000e+01 -1.966394357500e-04 0.000000000000e+00 1.966394357190e-04 3.100000000000e-14 -1.150000000000e+01 -1.967106016399e-04 0.000000000000e+00 1.967106016084e-04 3.150000000000e-14 -1.200000000000e+01 -1.967795322171e-04 0.000000000000e+00 1.967795321851e-04 3.200000000000e-14 -1.250000000000e+01 -1.968466347855e-04 0.000000000000e+00 1.968466347530e-04 3.250000000000e-14 -1.300000000000e+01 -1.969121461512e-04 0.000000000000e+00 1.969121461182e-04 3.300000000000e-14 -1.350000000000e+01 -1.969762395513e-04 0.000000000000e+00 1.969762395178e-04 3.350000000000e-14 -1.400000000000e+01 -1.970390554242e-04 0.000000000000e+00 1.970390553902e-04 3.400000000000e-14 -1.450000000000e+01 -1.971007124730e-04 0.000000000000e+00 1.971007124385e-04 3.450000000000e-14 -1.500000000000e+01 -1.971613129018e-04 0.000000000000e+00 1.971613128668e-04 3.500000000000e-14 -1.550000000000e+01 -1.972209455895e-04 0.000000000000e+00 1.972209455540e-04 3.550000000000e-14 -1.600000000000e+01 -1.972796883458e-04 0.000000000000e+00 1.972796883098e-04 3.600000000000e-14 -1.650000000000e+01 -1.973376096550e-04 0.000000000000e+00 1.973376096185e-04 3.650000000000e-14 -1.700000000000e+01 -1.973947700783e-04 0.000000000000e+00 1.973947700413e-04 3.700000000000e-14 -1.750000000000e+01 -1.974512234048e-04 0.000000000000e+00 1.974512233673e-04 3.750000000000e-14 -1.800000000000e+01 -1.975070176063e-04 0.000000000000e+00 1.975070175683e-04 3.800000000000e-14 -1.850000000000e+01 -1.975621956355e-04 0.000000000000e+00 1.975621955970e-04 3.850000000000e-14 -1.900000000000e+01 -1.976167960960e-04 0.000000000000e+00 1.976167960570e-04 3.900000000000e-14 -1.950000000000e+01 -1.976708538080e-04 0.000000000000e+00 1.976708537685e-04 3.950000000000e-14 -2.000000000000e+01 -1.977244002875e-04 0.000000000000e+00 1.977244002475e-04 4.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Ig1_vb2.standard0000644000265600020320000010253512264261473023740 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -1.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -4.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -4.500000000000e+00 -1.433488744373e-14 0.000000000000e+00 -7.665515474381e-15 2.200000000000e-14 -5.000000000000e+00 -1.229677263747e-08 0.000000000000e+00 1.229675063768e-08 2.200000000000e-14 -5.500000000000e+00 -8.513383970537e-06 0.000000000000e+00 8.513383948537e-06 2.200000000000e-14 -6.000000000000e+00 -4.230055966269e-05 0.000000000000e+00 4.230055964069e-05 2.200000000000e-14 -6.500000000000e+00 -1.015564407494e-04 0.000000000000e+00 1.015564407274e-04 2.200000000000e-14 -7.000000000000e+00 -1.820912413819e-04 0.000000000000e+00 1.820912413599e-04 2.200000000000e-14 -7.500000000000e+00 -2.680423807293e-04 0.000000000000e+00 2.680423807073e-04 2.200000000000e-14 -8.000000000000e+00 -3.497562006205e-04 0.000000000000e+00 3.497562005985e-04 2.200000000000e-14 -8.500000000000e+00 -4.245427361426e-04 0.000000000000e+00 4.245427361206e-04 2.200000000000e-14 -9.000000000000e+00 -4.918018242854e-04 0.000000000000e+00 4.918018242634e-04 2.200000000000e-14 -9.500000000000e+00 -5.518735572682e-04 0.000000000000e+00 5.518735572462e-04 2.200000000000e-14 -1.000000000000e+01 -6.054582090466e-04 0.000000000000e+00 6.054582090246e-04 2.200000000000e-14 -1.050000000000e+01 -6.533374921878e-04 0.000000000000e+00 6.533374921658e-04 2.200000000000e-14 -1.100000000000e+01 -6.962549849105e-04 0.000000000000e+00 6.962549848885e-04 2.200000000000e-14 -1.150000000000e+01 -7.348733437881e-04 0.000000000000e+00 7.348733437661e-04 2.200000000000e-14 -1.200000000000e+01 -7.697657616639e-04 0.000000000000e+00 7.697657616419e-04 2.200000000000e-14 -1.250000000000e+01 -8.014213560399e-04 0.000000000000e+00 8.014213560179e-04 2.200000000000e-14 -1.300000000000e+01 -8.302552782553e-04 0.000000000000e+00 8.302552782333e-04 2.200000000000e-14 -1.350000000000e+01 -8.566195771578e-04 0.000000000000e+00 8.566195771358e-04 2.200000000000e-14 -1.400000000000e+01 -8.808132479130e-04 0.000000000000e+00 8.808132478910e-04 2.200000000000e-14 -1.450000000000e+01 -9.030909614554e-04 0.000000000000e+00 9.030909614334e-04 2.200000000000e-14 -1.500000000000e+01 -9.236704228501e-04 0.000000000000e+00 9.236704228281e-04 2.200000000000e-14 -1.550000000000e+01 -9.427384824068e-04 0.000000000000e+00 9.427384823848e-04 2.200000000000e-14 -1.600000000000e+01 -9.604561762532e-04 0.000000000000e+00 9.604561762312e-04 2.200000000000e-14 -1.650000000000e+01 -9.769628740967e-04 0.000000000000e+00 9.769628740747e-04 2.200000000000e-14 -1.700000000000e+01 -9.923796932522e-04 0.000000000000e+00 9.923796932302e-04 2.200000000000e-14 -1.750000000000e+01 -1.006812313951e-03 0.000000000000e+00 1.006812313929e-03 2.200000000000e-14 -1.800000000000e+01 -1.020353307453e-03 0.000000000000e+00 1.020353307431e-03 2.200000000000e-14 -1.850000000000e+01 -1.033084067786e-03 0.000000000000e+00 1.033084067764e-03 2.200000000000e-14 -1.900000000000e+01 -1.045076420514e-03 0.000000000000e+00 1.045076420492e-03 2.200000000000e-14 -1.950000000000e+01 -1.056393967734e-03 0.000000000000e+00 1.056393967712e-03 2.200000000000e-14 -2.000000000000e+01 -1.067093216956e-03 0.000000000000e+00 1.067093216934e-03 2.200000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -4.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -4.500000000000e+00 -1.860621032246e-14 0.000000000000e+00 -6.392754385252e-15 2.500000000000e-14 -5.000000000000e+00 -1.858037997461e-08 0.000000000000e+00 1.858035497457e-08 2.500000000000e-14 -5.500000000000e+00 -9.182502746982e-06 0.000000000000e+00 9.182502721983e-06 2.500000000000e-14 -6.000000000000e+00 -4.407839493439e-05 0.000000000000e+00 4.407839490939e-05 2.500000000000e-14 -6.500000000000e+00 -1.047359542541e-04 0.000000000000e+00 1.047359542291e-04 2.500000000000e-14 -7.000000000000e+00 -1.882258408330e-04 0.000000000000e+00 1.882258408080e-04 2.500000000000e-14 -7.500000000000e+00 -2.912770749133e-04 0.000000000000e+00 2.912770748883e-04 2.500000000000e-14 -8.000000000000e+00 -4.108985569863e-04 0.000000000000e+00 4.108985569613e-04 2.500000000000e-14 -8.500000000000e+00 -5.440191879166e-04 0.000000000000e+00 5.440191878916e-04 2.500000000000e-14 -9.000000000000e+00 -6.820449284779e-04 0.000000000000e+00 6.820449284529e-04 2.500000000000e-14 -9.500000000000e+00 -8.176444206440e-04 0.000000000000e+00 8.176444206190e-04 2.500000000000e-14 -1.000000000000e+01 -9.469022158727e-04 0.000000000000e+00 9.469022158477e-04 2.500000000000e-14 -1.050000000000e+01 -1.067451524574e-03 0.000000000000e+00 1.067451524549e-03 2.500000000000e-14 -1.100000000000e+01 -1.178181168339e-03 0.000000000000e+00 1.178181168314e-03 2.500000000000e-14 -1.150000000000e+01 -1.278906329419e-03 0.000000000000e+00 1.278906329394e-03 2.500000000000e-14 -1.200000000000e+01 -1.370032581133e-03 0.000000000000e+00 1.370032581108e-03 2.500000000000e-14 -1.250000000000e+01 -1.452282700385e-03 0.000000000000e+00 1.452282700360e-03 2.500000000000e-14 -1.300000000000e+01 -1.526508006216e-03 0.000000000000e+00 1.526508006191e-03 2.500000000000e-14 -1.350000000000e+01 -1.593574011184e-03 0.000000000000e+00 1.593574011159e-03 2.500000000000e-14 -1.400000000000e+01 -1.654299282436e-03 0.000000000000e+00 1.654299282411e-03 2.500000000000e-14 -1.450000000000e+01 -1.709427820282e-03 0.000000000000e+00 1.709427820257e-03 2.500000000000e-14 -1.500000000000e+01 -1.759620653945e-03 0.000000000000e+00 1.759620653920e-03 2.500000000000e-14 -1.550000000000e+01 -1.805457535765e-03 0.000000000000e+00 1.805457535740e-03 2.500000000000e-14 -1.600000000000e+01 -1.847443372764e-03 0.000000000000e+00 1.847443372739e-03 2.500000000000e-14 -1.650000000000e+01 -1.886016430467e-03 0.000000000000e+00 1.886016430442e-03 2.500000000000e-14 -1.700000000000e+01 -1.921556764534e-03 0.000000000000e+00 1.921556764509e-03 2.500000000000e-14 -1.750000000000e+01 -1.954394138462e-03 0.000000000000e+00 1.954394138437e-03 2.500000000000e-14 -1.800000000000e+01 -1.984815121663e-03 0.000000000000e+00 1.984815121638e-03 2.500000000000e-14 -1.850000000000e+01 -2.013069289254e-03 0.000000000000e+00 2.013069289229e-03 2.500000000000e-14 -1.900000000000e+01 -2.039374556027e-03 0.000000000000e+00 2.039374556002e-03 2.500000000000e-14 -1.950000000000e+01 -2.063921725765e-03 0.000000000000e+00 2.063921725740e-03 2.500000000000e-14 -2.000000000000e+01 -2.086878353012e-03 0.000000000000e+00 2.086878352987e-03 2.500000000000e-14 -1.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -2.740689619696e-14 0.000000000000e+00 -2.592520583629e-15 3.000000000000e-14 -5.000000000000e+00 -3.590422977592e-08 0.000000000000e+00 3.590419977504e-08 3.000000000000e-14 -5.500000000000e+00 -1.030869894593e-05 0.000000000000e+00 1.030869891593e-05 3.000000000000e-14 -6.000000000000e+00 -4.681769026487e-05 0.000000000000e+00 4.681769023487e-05 3.000000000000e-14 -6.500000000000e+00 -1.092030472347e-04 0.000000000000e+00 1.092030472047e-04 3.000000000000e-14 -7.000000000000e+00 -1.944449693596e-04 0.000000000000e+00 1.944449693296e-04 3.000000000000e-14 -7.500000000000e+00 -2.992735748272e-04 0.000000000000e+00 2.992735747972e-04 3.000000000000e-14 -8.000000000000e+00 -4.207391069623e-04 0.000000000000e+00 4.207391069323e-04 3.000000000000e-14 -8.500000000000e+00 -5.563175072388e-04 0.000000000000e+00 5.563175072088e-04 3.000000000000e-14 -9.000000000000e+00 -7.038743607103e-04 0.000000000000e+00 7.038743606803e-04 3.000000000000e-14 -9.500000000000e+00 -8.615990567464e-04 0.000000000000e+00 8.615990567163e-04 3.000000000000e-14 -1.000000000000e+01 -1.027927547846e-03 0.000000000000e+00 1.027927547816e-03 3.000000000000e-14 -1.050000000000e+01 -1.199789900109e-03 0.000000000000e+00 1.199789900079e-03 3.000000000000e-14 -1.100000000000e+01 -1.371834266339e-03 0.000000000000e+00 1.371834266309e-03 3.000000000000e-14 -1.150000000000e+01 -1.540407625237e-03 0.000000000000e+00 1.540407625207e-03 3.000000000000e-14 -1.200000000000e+01 -1.702489991494e-03 0.000000000000e+00 1.702489991464e-03 3.000000000000e-14 -1.250000000000e+01 -1.855669069367e-03 0.000000000000e+00 1.855669069337e-03 3.000000000000e-14 -1.300000000000e+01 -1.998300726648e-03 0.000000000000e+00 1.998300726618e-03 3.000000000000e-14 -1.350000000000e+01 -2.129544068503e-03 0.000000000000e+00 2.129544068473e-03 3.000000000000e-14 -1.400000000000e+01 -2.249261446315e-03 0.000000000000e+00 2.249261446285e-03 3.000000000000e-14 -1.450000000000e+01 -2.357841030880e-03 0.000000000000e+00 2.357841030850e-03 3.000000000000e-14 -1.500000000000e+01 -2.456005692609e-03 0.000000000000e+00 2.456005692579e-03 3.000000000000e-14 -1.550000000000e+01 -2.544650312252e-03 0.000000000000e+00 2.544650312222e-03 3.000000000000e-14 -1.600000000000e+01 -2.624723747937e-03 0.000000000000e+00 2.624723747907e-03 3.000000000000e-14 -1.650000000000e+01 -2.697153767326e-03 0.000000000000e+00 2.697153767296e-03 3.000000000000e-14 -1.700000000000e+01 -2.762805361036e-03 0.000000000000e+00 2.762805361006e-03 3.000000000000e-14 -1.750000000000e+01 -2.822461761832e-03 0.000000000000e+00 2.822461761802e-03 3.000000000000e-14 -1.800000000000e+01 -2.876819432473e-03 0.000000000000e+00 2.876819432443e-03 3.000000000000e-14 -1.850000000000e+01 -2.926490871850e-03 0.000000000000e+00 2.926490871820e-03 3.000000000000e-14 -1.900000000000e+01 -2.972011300039e-03 0.000000000000e+00 2.972011300009e-03 3.000000000000e-14 -1.950000000000e+01 -3.013846871920e-03 0.000000000000e+00 3.013846871890e-03 3.000000000000e-14 -2.000000000000e+01 -3.052403107054e-03 0.000000000000e+00 3.052403107024e-03 3.000000000000e-14 -1.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -1.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -4.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -4.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -5.000000000000e+00 -3.030755681144e-11 0.000000000000e+00 3.028555688778e-11 2.200000000000e-14 -5.500000000000e+00 -6.611224051918e-06 0.000000000000e+00 6.611224029918e-06 2.200000000000e-14 -6.000000000000e+00 -4.934538010686e-05 0.000000000000e+00 4.934538008486e-05 2.200000000000e-14 -6.500000000000e+00 -1.305486494172e-04 0.000000000000e+00 1.305486493952e-04 2.200000000000e-14 -7.000000000000e+00 -2.432639030754e-04 0.000000000000e+00 2.432639030534e-04 2.200000000000e-14 -7.500000000000e+00 -3.624325198975e-04 0.000000000000e+00 3.624325198755e-04 2.200000000000e-14 -8.000000000000e+00 -4.705352753163e-04 0.000000000000e+00 4.705352752943e-04 2.200000000000e-14 -8.500000000000e+00 -5.649748413366e-04 0.000000000000e+00 5.649748413146e-04 2.200000000000e-14 -9.000000000000e+00 -6.462820662888e-04 0.000000000000e+00 6.462820662668e-04 2.200000000000e-14 -9.500000000000e+00 -7.160583758365e-04 0.000000000000e+00 7.160583758145e-04 2.200000000000e-14 -1.000000000000e+01 -7.760846373970e-04 0.000000000000e+00 7.760846373750e-04 2.200000000000e-14 -1.050000000000e+01 -8.279861663317e-04 0.000000000000e+00 8.279861663097e-04 2.200000000000e-14 -1.100000000000e+01 -8.731414562755e-04 0.000000000000e+00 8.731414562535e-04 2.200000000000e-14 -1.150000000000e+01 -9.126846171525e-04 0.000000000000e+00 9.126846171305e-04 2.200000000000e-14 -1.200000000000e+01 -9.475377586658e-04 0.000000000000e+00 9.475377586438e-04 2.200000000000e-14 -1.250000000000e+01 -9.784485358708e-04 0.000000000000e+00 9.784485358488e-04 2.200000000000e-14 -1.300000000000e+01 -1.006024258274e-03 0.000000000000e+00 1.006024258252e-03 2.200000000000e-14 -1.350000000000e+01 -1.030760319010e-03 0.000000000000e+00 1.030760318988e-03 2.200000000000e-14 -1.400000000000e+01 -1.053063024357e-03 0.000000000000e+00 1.053063024335e-03 2.200000000000e-14 -1.450000000000e+01 -1.073267626738e-03 0.000000000000e+00 1.073267626716e-03 2.200000000000e-14 -1.500000000000e+01 -1.091652479391e-03 0.000000000000e+00 1.091652479369e-03 2.200000000000e-14 -1.550000000000e+01 -1.108450137108e-03 0.000000000000e+00 1.108450137086e-03 2.200000000000e-14 -1.600000000000e+01 -1.123856080804e-03 0.000000000000e+00 1.123856080782e-03 2.200000000000e-14 -1.650000000000e+01 -1.138035601319e-03 0.000000000000e+00 1.138035601297e-03 2.200000000000e-14 -1.700000000000e+01 -1.151129257354e-03 0.000000000000e+00 1.151129257332e-03 2.200000000000e-14 -1.750000000000e+01 -1.163257226372e-03 0.000000000000e+00 1.163257226350e-03 2.200000000000e-14 -1.800000000000e+01 -1.174522792656e-03 0.000000000000e+00 1.174522792634e-03 2.200000000000e-14 -1.850000000000e+01 -1.185015159761e-03 0.000000000000e+00 1.185015159739e-03 2.200000000000e-14 -1.900000000000e+01 -1.194811731175e-03 0.000000000000e+00 1.194811731153e-03 2.200000000000e-14 -1.950000000000e+01 -1.203979970182e-03 0.000000000000e+00 1.203979970160e-03 2.200000000000e-14 -2.000000000000e+01 -1.212578924853e-03 0.000000000000e+00 1.212578924831e-03 2.200000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -4.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -4.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -5.000000000000e+00 -5.433504427638e-11 0.000000000000e+00 5.431004440954e-11 2.500000000000e-14 -5.500000000000e+00 -7.313337798874e-06 0.000000000000e+00 7.313337773875e-06 2.500000000000e-14 -6.000000000000e+00 -5.163081219424e-05 0.000000000000e+00 5.163081216924e-05 2.500000000000e-14 -6.500000000000e+00 -1.347522952629e-04 0.000000000000e+00 1.347522952379e-04 2.500000000000e-14 -7.000000000000e+00 -2.503645429750e-04 0.000000000000e+00 2.503645429500e-04 2.500000000000e-14 -7.500000000000e+00 -3.920895643897e-04 0.000000000000e+00 3.920895643647e-04 2.500000000000e-14 -8.000000000000e+00 -5.545901363018e-04 0.000000000000e+00 5.545901362768e-04 2.500000000000e-14 -8.500000000000e+00 -7.330064706400e-04 0.000000000000e+00 7.330064706151e-04 2.500000000000e-14 -9.000000000000e+00 -9.127691801329e-04 0.000000000000e+00 9.127691801079e-04 2.500000000000e-14 -9.500000000000e+00 -1.082455967598e-03 0.000000000000e+00 1.082455967573e-03 2.500000000000e-14 -1.000000000000e+01 -1.237519606099e-03 0.000000000000e+00 1.237519606074e-03 2.500000000000e-14 -1.050000000000e+01 -1.376123186634e-03 0.000000000000e+00 1.376123186609e-03 2.500000000000e-14 -1.100000000000e+01 -1.498358690909e-03 0.000000000000e+00 1.498358690884e-03 2.500000000000e-14 -1.150000000000e+01 -1.605437826879e-03 0.000000000000e+00 1.605437826854e-03 2.500000000000e-14 -1.200000000000e+01 -1.699054359189e-03 0.000000000000e+00 1.699054359164e-03 2.500000000000e-14 -1.250000000000e+01 -1.780989690883e-03 0.000000000000e+00 1.780989690858e-03 2.500000000000e-14 -1.300000000000e+01 -1.852912276576e-03 0.000000000000e+00 1.852912276551e-03 2.500000000000e-14 -1.350000000000e+01 -1.916297319170e-03 0.000000000000e+00 1.916297319145e-03 2.500000000000e-14 -1.400000000000e+01 -1.972410205543e-03 0.000000000000e+00 1.972410205518e-03 2.500000000000e-14 -1.450000000000e+01 -2.022319338627e-03 0.000000000000e+00 2.022319338602e-03 2.500000000000e-14 -1.500000000000e+01 -2.066920035102e-03 0.000000000000e+00 2.066920035077e-03 2.500000000000e-14 -1.550000000000e+01 -2.106960589637e-03 0.000000000000e+00 2.106960589612e-03 2.500000000000e-14 -1.600000000000e+01 -2.143066619128e-03 0.000000000000e+00 2.143066619103e-03 2.500000000000e-14 -1.650000000000e+01 -2.175762289320e-03 0.000000000000e+00 2.175762289295e-03 2.500000000000e-14 -1.700000000000e+01 -2.205488184565e-03 0.000000000000e+00 2.205488184540e-03 2.500000000000e-14 -1.750000000000e+01 -2.232616072010e-03 0.000000000000e+00 2.232616071985e-03 2.500000000000e-14 -1.800000000000e+01 -2.257460980760e-03 0.000000000000e+00 2.257460980735e-03 2.500000000000e-14 -1.850000000000e+01 -2.280291039365e-03 0.000000000000e+00 2.280291039340e-03 2.500000000000e-14 -1.900000000000e+01 -2.301335477041e-03 0.000000000000e+00 2.301335477016e-03 2.500000000000e-14 -1.950000000000e+01 -2.320791136122e-03 0.000000000000e+00 2.320791136097e-03 2.500000000000e-14 -2.000000000000e+01 -2.338827783599e-03 0.000000000000e+00 2.338827783574e-03 2.500000000000e-14 -1.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -5.000000000000e+00 -1.429177566223e-10 0.000000000000e+00 1.428877566903e-10 3.000000000000e-14 -5.500000000000e+00 -8.532924735604e-06 0.000000000000e+00 8.532924705605e-06 3.000000000000e-14 -6.000000000000e+00 -5.520928440164e-05 0.000000000000e+00 5.520928437164e-05 3.000000000000e-14 -6.500000000000e+00 -1.407355627384e-04 0.000000000000e+00 1.407355627084e-04 3.000000000000e-14 -7.000000000000e+00 -2.586289329808e-04 0.000000000000e+00 2.586289329508e-04 3.000000000000e-14 -7.500000000000e+00 -4.025477214960e-04 0.000000000000e+00 4.025477214660e-04 3.000000000000e-14 -8.000000000000e+00 -5.672629404624e-04 0.000000000000e+00 5.672629404324e-04 3.000000000000e-14 -8.500000000000e+00 -7.486050945560e-04 0.000000000000e+00 7.486050945260e-04 3.000000000000e-14 -9.000000000000e+00 -9.432367577435e-04 0.000000000000e+00 9.432367577135e-04 3.000000000000e-14 -9.500000000000e+00 -1.148440499154e-03 0.000000000000e+00 1.148440499124e-03 3.000000000000e-14 -1.000000000000e+01 -1.361906453344e-03 0.000000000000e+00 1.361906453314e-03 3.000000000000e-14 -1.050000000000e+01 -1.577211427595e-03 0.000000000000e+00 1.577211427565e-03 3.000000000000e-14 -1.100000000000e+01 -1.785664703828e-03 0.000000000000e+00 1.785664703798e-03 3.000000000000e-14 -1.150000000000e+01 -1.982254345364e-03 0.000000000000e+00 1.982254345334e-03 3.000000000000e-14 -1.200000000000e+01 -2.163358564993e-03 0.000000000000e+00 2.163358564963e-03 3.000000000000e-14 -1.250000000000e+01 -2.326959150146e-03 0.000000000000e+00 2.326959150116e-03 3.000000000000e-14 -1.300000000000e+01 -2.472612720403e-03 0.000000000000e+00 2.472612720373e-03 3.000000000000e-14 -1.350000000000e+01 -2.601081683953e-03 0.000000000000e+00 2.601081683923e-03 3.000000000000e-14 -1.400000000000e+01 -2.713850234015e-03 0.000000000000e+00 2.713850233985e-03 3.000000000000e-14 -1.450000000000e+01 -2.812708261529e-03 0.000000000000e+00 2.812708261499e-03 3.000000000000e-14 -1.500000000000e+01 -2.899472044335e-03 0.000000000000e+00 2.899472044305e-03 3.000000000000e-14 -1.550000000000e+01 -2.975831186417e-03 0.000000000000e+00 2.975831186387e-03 3.000000000000e-14 -1.600000000000e+01 -3.043283250563e-03 0.000000000000e+00 3.043283250533e-03 3.000000000000e-14 -1.650000000000e+01 -3.103119515003e-03 0.000000000000e+00 3.103119514973e-03 3.000000000000e-14 -1.700000000000e+01 -3.156436425281e-03 0.000000000000e+00 3.156436425251e-03 3.000000000000e-14 -1.750000000000e+01 -3.204157671860e-03 0.000000000000e+00 3.204157671830e-03 3.000000000000e-14 -1.800000000000e+01 -3.247058903569e-03 0.000000000000e+00 3.247058903539e-03 3.000000000000e-14 -1.850000000000e+01 -3.285791278084e-03 0.000000000000e+00 3.285791278054e-03 3.000000000000e-14 -1.900000000000e+01 -3.320902319660e-03 0.000000000000e+00 3.320902319630e-03 3.000000000000e-14 -1.950000000000e+01 -3.352853695177e-03 0.000000000000e+00 3.352853695147e-03 3.000000000000e-14 -2.000000000000e+01 -3.382036044925e-03 0.000000000000e+00 3.382036044895e-03 3.000000000000e-14 -1.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -1.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -3.500000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -4.000000000000e+00 -1.238115512892e-14 0.000000000000e+00 -9.618766184430e-15 2.200000000000e-14 -4.500000000000e+00 -5.090557554481e-11 0.000000000000e+00 5.088357576888e-11 2.200000000000e-14 -5.000000000000e+00 -6.820113645951e-07 0.000000000000e+00 6.820113425951e-07 2.200000000000e-14 -5.500000000000e+00 -1.123290401895e-05 0.000000000000e+00 1.123290399695e-05 2.200000000000e-14 -6.000000000000e+00 -3.703329869212e-05 0.000000000000e+00 3.703329867012e-05 2.200000000000e-14 -6.500000000000e+00 -7.774865710135e-05 0.000000000000e+00 7.774865707935e-05 2.200000000000e-14 -7.000000000000e+00 -1.294853021664e-04 0.000000000000e+00 1.294853021444e-04 2.200000000000e-14 -7.500000000000e+00 -1.844079819272e-04 0.000000000000e+00 1.844079819052e-04 2.200000000000e-14 -8.000000000000e+00 -2.386564736105e-04 0.000000000000e+00 2.386564735885e-04 2.200000000000e-14 -8.500000000000e+00 -2.904391593315e-04 0.000000000000e+00 2.904391593095e-04 2.200000000000e-14 -9.000000000000e+00 -3.389803849036e-04 0.000000000000e+00 3.389803848816e-04 2.200000000000e-14 -9.500000000000e+00 -3.840653643355e-04 0.000000000000e+00 3.840653643135e-04 2.200000000000e-14 -1.000000000000e+01 -4.257695297085e-04 0.000000000000e+00 4.257695296865e-04 2.200000000000e-14 -1.050000000000e+01 -4.643029900021e-04 0.000000000000e+00 4.643029899801e-04 2.200000000000e-14 -1.100000000000e+01 -4.999264838717e-04 0.000000000000e+00 4.999264838497e-04 2.200000000000e-14 -1.150000000000e+01 -5.329085886871e-04 0.000000000000e+00 5.329085886651e-04 2.200000000000e-14 -1.200000000000e+01 -5.635054350879e-04 0.000000000000e+00 5.635054350659e-04 2.200000000000e-14 -1.250000000000e+01 -5.919522232220e-04 0.000000000000e+00 5.919522232000e-04 2.200000000000e-14 -1.300000000000e+01 -6.184607148027e-04 0.000000000000e+00 6.184607147807e-04 2.200000000000e-14 -1.350000000000e+01 -6.432196155285e-04 0.000000000000e+00 6.432196155065e-04 2.200000000000e-14 -1.400000000000e+01 -6.663962444659e-04 0.000000000000e+00 6.663962444439e-04 2.200000000000e-14 -1.450000000000e+01 -6.881386736798e-04 0.000000000000e+00 6.881386736578e-04 2.200000000000e-14 -1.500000000000e+01 -7.085779348130e-04 0.000000000000e+00 7.085779347910e-04 2.200000000000e-14 -1.550000000000e+01 -7.278301047986e-04 0.000000000000e+00 7.278301047766e-04 2.200000000000e-14 -1.600000000000e+01 -7.459981938745e-04 0.000000000000e+00 7.459981938525e-04 2.200000000000e-14 -1.650000000000e+01 -7.631738149700e-04 0.000000000000e+00 7.631738149480e-04 2.200000000000e-14 -1.700000000000e+01 -7.794386405000e-04 0.000000000000e+00 7.794386404780e-04 2.200000000000e-14 -1.750000000000e+01 -7.948656644576e-04 0.000000000000e+00 7.948656644356e-04 2.200000000000e-14 -1.800000000000e+01 -8.095202918161e-04 0.000000000000e+00 8.095202917941e-04 2.200000000000e-14 -1.850000000000e+01 -8.234612775183e-04 0.000000000000e+00 8.234612774963e-04 2.200000000000e-14 -1.900000000000e+01 -8.367415358257e-04 0.000000000000e+00 8.367415358037e-04 2.200000000000e-14 -1.950000000000e+01 -8.494088385849e-04 0.000000000000e+00 8.494088385629e-04 2.200000000000e-14 -2.000000000000e+01 -8.615064185956e-04 0.000000000000e+00 8.615064185736e-04 2.200000000000e-14 -1.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -1.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -2.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -3.500000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -4.000000000000e+00 -1.567582869066e-14 0.000000000000e+00 -9.324239227910e-15 2.500000000000e-14 -4.500000000000e+00 -6.950942035497e-11 0.000000000000e+00 6.948442083084e-11 2.500000000000e-14 -5.000000000000e+00 -7.916918995654e-07 0.000000000000e+00 7.916918745661e-07 2.500000000000e-14 -5.500000000000e+00 -1.186230927733e-05 0.000000000000e+00 1.186230925233e-05 2.500000000000e-14 -6.000000000000e+00 -3.838787021233e-05 0.000000000000e+00 3.838787018733e-05 2.500000000000e-14 -6.500000000000e+00 -8.007681481757e-05 0.000000000000e+00 8.007681479257e-05 2.500000000000e-14 -7.000000000000e+00 -1.357965746165e-04 0.000000000000e+00 1.357965745915e-04 2.500000000000e-14 -7.500000000000e+00 -2.042000501048e-04 0.000000000000e+00 2.042000500798e-04 2.500000000000e-14 -8.000000000000e+00 -2.839295993700e-04 0.000000000000e+00 2.839295993450e-04 2.500000000000e-14 -8.500000000000e+00 -3.726725278509e-04 0.000000000000e+00 3.726725278259e-04 2.500000000000e-14 -9.000000000000e+00 -4.660708202159e-04 0.000000000000e+00 4.660708201909e-04 2.500000000000e-14 -9.500000000000e+00 -5.608666771937e-04 0.000000000000e+00 5.608666771687e-04 2.500000000000e-14 -1.000000000000e+01 -6.546747062966e-04 0.000000000000e+00 6.546747062716e-04 2.500000000000e-14 -1.050000000000e+01 -7.457215859947e-04 0.000000000000e+00 7.457215859697e-04 2.500000000000e-14 -1.100000000000e+01 -8.327987115802e-04 0.000000000000e+00 8.327987115552e-04 2.500000000000e-14 -1.150000000000e+01 -9.151862413507e-04 0.000000000000e+00 9.151862413257e-04 2.500000000000e-14 -1.200000000000e+01 -9.925510835977e-04 0.000000000000e+00 9.925510835727e-04 2.500000000000e-14 -1.250000000000e+01 -1.064840906838e-03 0.000000000000e+00 1.064840906813e-03 2.500000000000e-14 -1.300000000000e+01 -1.132190287942e-03 0.000000000000e+00 1.132190287917e-03 2.500000000000e-14 -1.350000000000e+01 -1.194846547671e-03 0.000000000000e+00 1.194846547646e-03 2.500000000000e-14 -1.400000000000e+01 -1.253116074381e-03 0.000000000000e+00 1.253116074356e-03 2.500000000000e-14 -1.450000000000e+01 -1.307328188399e-03 0.000000000000e+00 1.307328188374e-03 2.500000000000e-14 -1.500000000000e+01 -1.357812371190e-03 0.000000000000e+00 1.357812371165e-03 2.500000000000e-14 -1.550000000000e+01 -1.404884910467e-03 0.000000000000e+00 1.404884910442e-03 2.500000000000e-14 -1.600000000000e+01 -1.448841809419e-03 0.000000000000e+00 1.448841809394e-03 2.500000000000e-14 -1.650000000000e+01 -1.489955672536e-03 0.000000000000e+00 1.489955672511e-03 2.500000000000e-14 -1.700000000000e+01 -1.528475005157e-03 0.000000000000e+00 1.528475005132e-03 2.500000000000e-14 -1.750000000000e+01 -1.564624902953e-03 0.000000000000e+00 1.564624902928e-03 2.500000000000e-14 -1.800000000000e+01 -1.598608482276e-03 0.000000000000e+00 1.598608482251e-03 2.500000000000e-14 -1.850000000000e+01 -1.630608651812e-03 0.000000000000e+00 1.630608651787e-03 2.500000000000e-14 -1.900000000000e+01 -1.660789987319e-03 0.000000000000e+00 1.660789987294e-03 2.500000000000e-14 -1.950000000000e+01 -1.689300573236e-03 0.000000000000e+00 1.689300573211e-03 2.500000000000e-14 -2.000000000000e+01 -1.716273738162e-03 0.000000000000e+00 1.716273738137e-03 2.500000000000e-14 -1.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -2.145592731262e-14 0.000000000000e+00 -8.544172727729e-15 3.000000000000e-14 -4.500000000000e+00 -1.161408356640e-10 0.000000000000e+00 1.161108356112e-10 3.000000000000e-14 -5.000000000000e+00 -9.948386963977e-07 0.000000000000e+00 9.948386663977e-07 3.000000000000e-14 -5.500000000000e+00 -1.288184089297e-05 0.000000000000e+00 1.288184086297e-05 3.000000000000e-14 -6.000000000000e+00 -4.041927297629e-05 0.000000000000e+00 4.041927294629e-05 3.000000000000e-14 -6.500000000000e+00 -8.322512792804e-05 0.000000000000e+00 8.322512789804e-05 3.000000000000e-14 -7.000000000000e+00 -1.401365504281e-04 0.000000000000e+00 1.401365503981e-04 3.000000000000e-14 -7.500000000000e+00 -2.098067259106e-04 0.000000000000e+00 2.098067258806e-04 3.000000000000e-14 -8.000000000000e+00 -2.909123923032e-04 0.000000000000e+00 2.909123922732e-04 3.000000000000e-14 -8.500000000000e+00 -3.822317676470e-04 0.000000000000e+00 3.822317676170e-04 3.000000000000e-14 -9.000000000000e+00 -4.826653634010e-04 0.000000000000e+00 4.826653633710e-04 3.000000000000e-14 -9.500000000000e+00 -5.912321007849e-04 0.000000000000e+00 5.912321007549e-04 3.000000000000e-14 -1.000000000000e+01 -7.069585537624e-04 0.000000000000e+00 7.069585537324e-04 3.000000000000e-14 -1.050000000000e+01 -8.280104469038e-04 0.000000000000e+00 8.280104468738e-04 3.000000000000e-14 -1.100000000000e+01 -9.521214345825e-04 0.000000000000e+00 9.521214345525e-04 3.000000000000e-14 -1.150000000000e+01 -1.077424317012e-03 0.000000000000e+00 1.077424316982e-03 3.000000000000e-14 -1.200000000000e+01 -1.202201795353e-03 0.000000000000e+00 1.202201795323e-03 3.000000000000e-14 -1.250000000000e+01 -1.324872631289e-03 0.000000000000e+00 1.324872631259e-03 3.000000000000e-14 -1.300000000000e+01 -1.444055512585e-03 0.000000000000e+00 1.444055512555e-03 3.000000000000e-14 -1.350000000000e+01 -1.558631183738e-03 0.000000000000e+00 1.558631183708e-03 3.000000000000e-14 -1.400000000000e+01 -1.667777433898e-03 0.000000000000e+00 1.667777433868e-03 3.000000000000e-14 -1.450000000000e+01 -1.770970176201e-03 0.000000000000e+00 1.770970176171e-03 3.000000000000e-14 -1.500000000000e+01 -1.867955565856e-03 0.000000000000e+00 1.867955565826e-03 3.000000000000e-14 -1.550000000000e+01 -1.958703608379e-03 0.000000000000e+00 1.958703608349e-03 3.000000000000e-14 -1.600000000000e+01 -2.043354491687e-03 0.000000000000e+00 2.043354491657e-03 3.000000000000e-14 -1.650000000000e+01 -2.122166636604e-03 0.000000000000e+00 2.122166636574e-03 3.000000000000e-14 -1.700000000000e+01 -2.195472001739e-03 0.000000000000e+00 2.195472001709e-03 3.000000000000e-14 -1.750000000000e+01 -2.263640916313e-03 0.000000000000e+00 2.263640916283e-03 3.000000000000e-14 -1.800000000000e+01 -2.327056395333e-03 0.000000000000e+00 2.327056395303e-03 3.000000000000e-14 -1.850000000000e+01 -2.386096631067e-03 0.000000000000e+00 2.386096631037e-03 3.000000000000e-14 -1.900000000000e+01 -2.441123911011e-03 0.000000000000e+00 2.441123910981e-03 3.000000000000e-14 -1.950000000000e+01 -2.492478257893e-03 0.000000000000e+00 2.492478257863e-03 3.000000000000e-14 -2.000000000000e+01 -2.540474356226e-03 0.000000000000e+00 2.540474356196e-03 3.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/acVd_cosym.standard0000644000265600020320000000644312264261473023657 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -1 9.069946568916e-07 4.574364992365e-05 3.3640939792199e-14 1.73749110951095e-15 -2 1.934498485213e-06 4.493625103187e-05 3.4279187131819e-14 1.78937237908195e-15 -3 3.134489238854e-06 4.409188784505e-05 3.4992257559719e-14 1.85666090726395e-15 -4 4.571117410606e-06 4.320411640545e-05 3.5810822371159e-14 1.94085974714094e-15 -5 6.327437720782e-06 4.226339962784e-05 3.67722531578689e-14 2.04416428708994e-15 -6 8.516438977029e-06 4.125538160585e-05 3.79244588685089e-14 2.16987077782094e-15 -7 1.129925569516e-05 4.015827873957e-05 3.93321206830988e-14 2.32295402927593e-15 -8 1.491615654638e-05 3.893863806120e-05 4.10868620460088e-14 2.51093695615293e-15 -9 1.974174834178e-05 3.754393857742e-05 4.33242795088787e-14 2.74529702309292e-15 -10 2.638872947019e-05 3.588889751237e-05 4.62535735187186e-14 3.04387397110091e-15 -11 3.591420669756e-05 3.382874543554e-05 5.02119046201985e-14 3.4352606972769e-15 -12 5.025092112962e-05 3.110488896119e-05 5.57735728529284e-14 3.96770018187188e-15 -13 7.311382214094e-05 2.723608300245e-05 6.40052833080481e-14 4.73025916215586e-15 -14 1.115216879525e-04 2.136007930012e-05 7.71036123378777e-14 5.90436258470883e-15 -15 1.743721633373e-04 1.254973132238e-05 9.86663095824871e-14 7.76313958025077e-15 -16 2.430256962534e-04 3.654083588184e-06 1.21652416953496e-13 9.61629658941372e-15 -17 2.545652854957e-04 2.323237379584e-06 1.15183202164797e-13 8.91738431822374e-15 -18 2.588402333810e-04 1.892653884038e-06 7.29508801562579e-14 5.09948996702385e-15 -19 2.618314499091e-04 1.610741945978e-06 5.81063559777383e-14 3.75742204290989e-15 -20 2.640220011737e-04 1.417440941111e-06 5.15249468442785e-14 3.15824742622491e-15 -1 1.236182475837e-06 4.352964269183e-05 3.3042288050569e-14 2.46574143323993e-15 -2 2.730033694672e-06 4.252784185026e-05 3.3945374095289e-14 2.57690671098492e-15 -3 4.609804155305e-06 4.141202938199e-05 3.4997079242839e-14 2.72228480305792e-15 -4 7.058370189873e-06 4.014767181234e-05 3.62698269493089e-14 2.90938811403892e-15 -5 1.035186105133e-05 3.868039817732e-05 3.78642484901989e-14 3.14960523837091e-15 -6 1.493007205587e-05 3.692240726234e-05 3.99283516645288e-14 3.4605609639589e-15 -7 2.152877378920e-05 3.472800704521e-05 4.26894119607787e-14 3.86971807341089e-15 -8 3.143080838880e-05 3.184958329364e-05 4.65043349120786e-14 4.41964028371887e-15 -9 4.690670070992e-05 2.786765113532e-05 5.19328072185285e-14 5.17529220230785e-15 -10 7.162944364831e-05 2.215774692408e-05 5.98265864075682e-14 6.23275538530482e-15 -11 1.087496113878e-04 1.436156168435e-05 7.10927322245279e-14 7.67966204872377e-15 -12 1.508923212205e-04 6.246957199750e-06 8.35694134171076e-14 9.17861951398273e-15 -13 1.757211762340e-04 1.863014989217e-06 8.53529565604075e-14 9.21364301263573e-15 -14 1.797233539779e-04 1.245266166467e-06 5.85848844907583e-14 5.54442913539784e-15 -15 1.811100772303e-04 1.067461711241e-06 4.67800546327286e-14 3.93658353514288e-15 -16 1.821162829854e-04 9.498728163990e-07 4.19052209410888e-14 3.2680912662009e-15 -17 1.828960887294e-04 8.662870875353e-07 3.90790038878389e-14 2.87827102489992e-15 -18 1.835260610698e-04 8.041461314033e-07 3.71812500417789e-14 2.61512155264392e-15 -19 1.840523358557e-04 7.561969839394e-07 3.5796227917109e-14 2.42210178599893e-15 -20 1.845040014948e-04 7.180427327027e-07 3.4729403725009e-14 2.27270272301593e-15 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_coovlp.standard0000644000265600020320000000754512264261473024357 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.34146859862771e-14 1.14532288003985e-14 1.27310530801417e-14 1258.925411794 2.34146859862806e-14 1.14532288004002e-14 1.27310530801376e-14 1584.893192461 2.34146859862808e-14 1.14532288003953e-14 1.27310530801445e-14 1995.262314969 2.34146859862826e-14 1.14532288003951e-14 1.27310530801405e-14 2511.88643151 2.34146859862756e-14 1.14532288003966e-14 1.27310530801387e-14 3162.277660168 2.3414685986283e-14 1.14532288003982e-14 1.27310530801429e-14 3981.071705535 2.34146859862817e-14 1.14532288003986e-14 1.27310530801422e-14 5011.872336273 2.34146859862798e-14 1.14532288003965e-14 1.27310530801403e-14 6309.573444802 2.34146859862813e-14 1.14532288003982e-14 1.27310530801419e-14 7943.282347243 2.34146859862875e-14 1.14532288003971e-14 1.27310530801422e-14 10000 2.34146859862771e-14 1.14532288003985e-14 1.27310530801417e-14 12589.25411794 2.34146859862806e-14 1.14532288003989e-14 1.27310530801376e-14 15848.93192461 2.34146859862808e-14 1.14532288003953e-14 1.27310530801445e-14 19952.62314969 2.34146859862826e-14 1.14532288003951e-14 1.27310530801405e-14 25118.8643151 2.34146859862756e-14 1.14532288003966e-14 1.27310530801387e-14 31622.77660168 2.3414685986283e-14 1.14532288003982e-14 1.27310530801429e-14 39810.71705535 2.34146859862777e-14 1.14532288003946e-14 1.27310530801422e-14 50118.72336273 2.34146859862766e-14 1.14532288003934e-14 1.27310530801403e-14 63095.73444802 2.34146859862737e-14 1.14532288003881e-14 1.27310530801394e-14 79432.82347243 2.34146859862675e-14 1.14532288003831e-14 1.27310530801402e-14 100000 2.34146859862612e-14 1.14532288003746e-14 1.27310530801386e-14 125892.5411794 2.34146859862553e-14 1.14532288003635e-14 1.27310530801376e-14 158489.3192461 2.34146859862407e-14 1.14532288003451e-14 1.27310530801345e-14 199526.2314969 2.34146859862188e-14 1.14532288003074e-14 1.27310530801325e-14 251188.643151 2.34146859861743e-14 1.14532288002509e-14 1.27310530801197e-14 316227.7660168 2.3414685986122e-14 1.14532288001667e-14 1.27310530801178e-14 398107.1705535 2.34146859860218e-14 1.14532288000308e-14 1.27310530800983e-14 501187.2336273 2.34146859858701e-14 1.14532287998186e-14 1.27310530800736e-14 630957.3444802 2.3414685985633e-14 1.145322879948e-14 1.27310530800334e-14 794328.2347243 2.34146859852456e-14 1.14532287989405e-14 1.27310530799699e-14 1000000 2.34146859846537e-14 1.14532287980892e-14 1.27310530798696e-14 1258925.411794 2.34146859837016e-14 1.1453228796739e-14 1.27310530797078e-14 1584893.192461 2.34146859821837e-14 1.14532287946011e-14 1.27310530794617e-14 1995262.314969 2.34146859797896e-14 1.1453228791206e-14 1.27310530790557e-14 2511886.43151 2.34146859759922e-14 1.14532287858237e-14 1.27310530784153e-14 3162277.660168 2.34146859699814e-14 1.14532287773021e-14 1.27310530774151e-14 3981071.705535 2.34146859604439e-14 1.14532287637948e-14 1.27310530758166e-14 5011872.336273 2.34146859453278e-14 1.14532287423822e-14 1.27310530732874e-14 6309573.444802 2.3414685921379e-14 1.14532287084503e-14 1.27310530692803e-14 7943282.347243 2.34146858834205e-14 1.14532286546722e-14 1.27310530629269e-14 10000000 2.34146858232547e-14 1.14532285694392e-14 1.27310530528594e-14 12589254.11794 2.34146857279008e-14 1.14532284343537e-14 1.27310530369016e-14 15848931.92461 2.34146855767682e-14 1.1453228220259e-14 1.27310530116179e-14 19952623.14969 2.34146853372472e-14 1.14532278809275e-14 1.27310529715305e-14 25118864.3151 2.34146849576333e-14 1.1453227343138e-14 1.27310529080003e-14 31622776.60168 2.3414684355989e-14 1.14532264908057e-14 1.27310528073234e-14 39810717.05535 2.34146834024411e-14 1.14532251399368e-14 1.27310526477491e-14 50118723.36273 2.34146818911683e-14 1.14532229989558e-14 1.27310523948484e-14 63095734.44802 2.34146794959706e-14 1.14532196057386e-14 1.27310519940264e-14 79432823.47243 2.34146756998498e-14 1.14532142278566e-14 1.27310513587653e-14 100000000 2.34146696833997e-14 1.1453205704508e-14 1.27310503519475e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb0.standard0000644000265600020320000024357112264261473024272 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.100204577399e-09 0.000000000000e+00 1.100194577132e-09 1.000000000000e-14 -1.200000000000e+00 -5.114657011850e-08 0.000000000000e+00 5.114656011878e-08 1.000000000000e-14 -1.400000000000e+00 -9.455713661432e-07 0.000000000000e+00 9.455713561431e-07 1.000000000000e-14 -1.600000000000e+00 -4.505544944242e-06 0.000000000000e+00 4.505544934242e-06 1.000000000000e-14 -1.800000000000e+00 -1.162914770739e-05 0.000000000000e+00 1.162914769739e-05 1.000000000000e-14 -2.000000000000e+00 -2.258181433483e-05 0.000000000000e+00 2.258181432483e-05 1.000000000000e-14 -2.200000000000e+00 -3.741172488469e-05 0.000000000000e+00 3.741172487469e-05 1.000000000000e-14 -2.400000000000e+00 -5.606231207683e-05 0.000000000000e+00 5.606231206683e-05 1.000000000000e-14 -2.600000000000e+00 -7.841757737902e-05 0.000000000000e+00 7.841757736902e-05 1.000000000000e-14 -2.800000000000e+00 -1.043274432545e-04 0.000000000000e+00 1.043274432445e-04 1.000000000000e-14 -3.000000000000e+00 -1.336239016818e-04 0.000000000000e+00 1.336239016718e-04 1.000000000000e-14 -3.200000000000e+00 -1.661315586740e-04 0.000000000000e+00 1.661315586640e-04 1.000000000000e-14 -3.400000000000e+00 -2.016743774294e-04 0.000000000000e+00 2.016743774194e-04 1.000000000000e-14 -3.600000000000e+00 -2.400797930053e-04 0.000000000000e+00 2.400797929953e-04 1.000000000000e-14 -3.800000000000e+00 -2.811810286234e-04 0.000000000000e+00 2.811810286134e-04 1.000000000000e-14 -4.000000000000e+00 -3.248181995247e-04 0.000000000000e+00 3.248181995147e-04 1.000000000000e-14 -4.200000000000e+00 -3.708386063178e-04 0.000000000000e+00 3.708386063078e-04 1.000000000000e-14 -4.400000000000e+00 -4.190964843941e-04 0.000000000000e+00 4.190964843841e-04 1.000000000000e-14 -4.600000000000e+00 -4.694523800159e-04 0.000000000000e+00 4.694523800059e-04 1.000000000000e-14 -4.800000000000e+00 -5.217722583194e-04 0.000000000000e+00 5.217722583094e-04 1.000000000000e-14 -5.000000000000e+00 -5.759264066260e-04 0.000000000000e+00 5.759264066160e-04 1.000000000000e-14 -5.200000000000e+00 -6.317881734772e-04 0.000000000000e+00 6.317881734672e-04 1.000000000000e-14 -5.400000000000e+00 -6.892325770410e-04 0.000000000000e+00 6.892325770310e-04 1.000000000000e-14 -5.600000000000e+00 -7.481348225183e-04 0.000000000000e+00 7.481348225083e-04 1.000000000000e-14 -5.800000000000e+00 -8.083687467018e-04 0.000000000000e+00 8.083687466918e-04 1.000000000000e-14 -6.000000000000e+00 -8.698014655742e-04 0.000000000000e+00 8.698014655642e-04 1.000000000000e-14 -6.200000000000e+00 -9.320103273125e-04 0.000000000000e+00 9.320103273025e-04 1.000000000000e-14 -6.400000000000e+00 -9.933030803611e-04 0.000000000000e+00 9.933030803511e-04 1.000000000000e-14 -6.600000000000e+00 -1.052130507631e-03 0.000000000000e+00 1.052130507621e-03 1.000000000000e-14 -6.800000000000e+00 -1.107467104119e-03 0.000000000000e+00 1.107467104109e-03 1.000000000000e-14 -7.000000000000e+00 -1.158601429366e-03 0.000000000000e+00 1.158601429356e-03 1.000000000000e-14 -7.200000000000e+00 -1.205158637115e-03 0.000000000000e+00 1.205158637105e-03 1.000000000000e-14 -7.400000000000e+00 -1.247089310471e-03 0.000000000000e+00 1.247089310461e-03 1.000000000000e-14 -7.600000000000e+00 -1.284596953119e-03 0.000000000000e+00 1.284596953109e-03 1.000000000000e-14 -7.800000000000e+00 -1.318040259151e-03 0.000000000000e+00 1.318040259141e-03 1.000000000000e-14 -8.000000000000e+00 -1.347846583978e-03 0.000000000000e+00 1.347846583968e-03 1.000000000000e-14 -8.200000000000e+00 -1.374451984610e-03 0.000000000000e+00 1.374451984600e-03 1.000000000000e-14 -8.400000000000e+00 -1.398266828176e-03 0.000000000000e+00 1.398266828166e-03 1.000000000000e-14 -8.600000000000e+00 -1.419659845824e-03 0.000000000000e+00 1.419659845814e-03 1.000000000000e-14 -8.800000000000e+00 -1.438953479970e-03 0.000000000000e+00 1.438953479960e-03 1.000000000000e-14 -9.000000000000e+00 -1.456425305723e-03 0.000000000000e+00 1.456425305713e-03 1.000000000000e-14 -9.200000000000e+00 -1.472312255929e-03 0.000000000000e+00 1.472312255919e-03 1.000000000000e-14 -9.400000000000e+00 -1.486815797287e-03 0.000000000000e+00 1.486815797277e-03 1.000000000000e-14 -9.600000000000e+00 -1.500107100190e-03 0.000000000000e+00 1.500107100180e-03 1.000000000000e-14 -9.800000000000e+00 -1.512331763572e-03 0.000000000000e+00 1.512331763562e-03 1.000000000000e-14 -1.000000000000e+01 -1.523613936931e-03 0.000000000000e+00 1.523613936921e-03 1.000000000000e-14 -1.020000000000e+01 -1.534059823498e-03 0.000000000000e+00 1.534059823488e-03 1.000000000000e-14 -1.040000000000e+01 -1.543760613158e-03 0.000000000000e+00 1.543760613148e-03 1.000000000000e-14 -1.060000000000e+01 -1.552794917711e-03 0.000000000000e+00 1.552794917701e-03 1.000000000000e-14 -1.080000000000e+01 -1.561230784747e-03 0.000000000000e+00 1.561230784737e-03 1.000000000000e-14 -1.100000000000e+01 -1.569127360915e-03 0.000000000000e+00 1.569127360905e-03 1.000000000000e-14 -1.120000000000e+01 -1.576536266370e-03 0.000000000000e+00 1.576536266360e-03 1.000000000000e-14 -1.140000000000e+01 -1.583502732572e-03 0.000000000000e+00 1.583502732562e-03 1.000000000000e-14 -1.160000000000e+01 -1.590066546615e-03 0.000000000000e+00 1.590066546605e-03 1.000000000000e-14 -1.180000000000e+01 -1.596262837452e-03 0.000000000000e+00 1.596262837442e-03 1.000000000000e-14 -1.200000000000e+01 -1.602122732748e-03 0.000000000000e+00 1.602122732738e-03 1.000000000000e-14 -1.220000000000e+01 -1.607673909681e-03 0.000000000000e+00 1.607673909671e-03 1.000000000000e-14 -1.240000000000e+01 -1.612941058562e-03 0.000000000000e+00 1.612941058552e-03 1.000000000000e-14 -1.260000000000e+01 -1.617946274566e-03 0.000000000000e+00 1.617946274556e-03 1.000000000000e-14 -1.280000000000e+01 -1.622709389991e-03 0.000000000000e+00 1.622709389981e-03 1.000000000000e-14 -1.300000000000e+01 -1.627248257133e-03 0.000000000000e+00 1.627248257123e-03 1.000000000000e-14 -1.320000000000e+01 -1.631578990010e-03 0.000000000000e+00 1.631578990000e-03 1.000000000000e-14 -1.340000000000e+01 -1.635716171676e-03 0.000000000000e+00 1.635716171666e-03 1.000000000000e-14 -1.360000000000e+01 -1.639673032637e-03 0.000000000000e+00 1.639673032627e-03 1.000000000000e-14 -1.380000000000e+01 -1.643461604937e-03 0.000000000000e+00 1.643461604927e-03 1.000000000000e-14 -1.400000000000e+01 -1.647092855657e-03 0.000000000000e+00 1.647092855647e-03 1.000000000000e-14 -1.420000000000e+01 -1.650576802965e-03 0.000000000000e+00 1.650576802955e-03 1.000000000000e-14 -1.440000000000e+01 -1.653922617293e-03 0.000000000000e+00 1.653922617283e-03 1.000000000000e-14 -1.460000000000e+01 -1.657138709820e-03 0.000000000000e+00 1.657138709810e-03 1.000000000000e-14 -1.480000000000e+01 -1.660232825536e-03 0.000000000000e+00 1.660232825526e-03 1.000000000000e-14 -1.500000000000e+01 -1.663212047858e-03 0.000000000000e+00 1.663212047848e-03 1.000000000000e-14 -1.520000000000e+01 -1.666082957180e-03 0.000000000000e+00 1.666082957170e-03 1.000000000000e-14 -1.540000000000e+01 -1.668851616384e-03 0.000000000000e+00 1.668851616374e-03 1.000000000000e-14 -1.560000000000e+01 -1.671523635490e-03 0.000000000000e+00 1.671523635480e-03 1.000000000000e-14 -1.580000000000e+01 -1.674104213572e-03 0.000000000000e+00 1.674104213562e-03 1.000000000000e-14 -1.600000000000e+01 -1.676598176059e-03 0.000000000000e+00 1.676598176049e-03 1.000000000000e-14 -1.620000000000e+01 -1.679010008035e-03 0.000000000000e+00 1.679010008025e-03 1.000000000000e-14 -1.640000000000e+01 -1.681343884013e-03 0.000000000000e+00 1.681343884003e-03 1.000000000000e-14 -1.660000000000e+01 -1.683603694628e-03 0.000000000000e+00 1.683603694618e-03 1.000000000000e-14 -1.680000000000e+01 -1.685793070606e-03 0.000000000000e+00 1.685793070596e-03 1.000000000000e-14 -1.700000000000e+01 -1.687915404325e-03 0.000000000000e+00 1.687915404315e-03 1.000000000000e-14 -1.720000000000e+01 -1.689973869262e-03 0.000000000000e+00 1.689973869252e-03 1.000000000000e-14 -1.740000000000e+01 -1.691971437552e-03 0.000000000000e+00 1.691971437542e-03 1.000000000000e-14 -1.760000000000e+01 -1.693910895865e-03 0.000000000000e+00 1.693910895855e-03 1.000000000000e-14 -1.780000000000e+01 -1.695794859809e-03 0.000000000000e+00 1.695794859799e-03 1.000000000000e-14 -1.800000000000e+01 -1.697625786990e-03 0.000000000000e+00 1.697625786980e-03 1.000000000000e-14 -1.820000000000e+01 -1.699405988896e-03 0.000000000000e+00 1.699405988886e-03 1.000000000000e-14 -1.840000000000e+01 -1.701137641710e-03 0.000000000000e+00 1.701137641700e-03 1.000000000000e-14 -1.860000000000e+01 -1.702822796172e-03 0.000000000000e+00 1.702822796162e-03 1.000000000000e-14 -1.880000000000e+01 -1.704463386594e-03 0.000000000000e+00 1.704463386584e-03 1.000000000000e-14 -1.900000000000e+01 -1.706061239086e-03 0.000000000000e+00 1.706061239076e-03 1.000000000000e-14 -1.920000000000e+01 -1.707618079109e-03 0.000000000000e+00 1.707618079099e-03 1.000000000000e-14 -1.940000000000e+01 -1.709135538386e-03 0.000000000000e+00 1.709135538376e-03 1.000000000000e-14 -1.960000000000e+01 -1.710615161255e-03 0.000000000000e+00 1.710615161245e-03 1.000000000000e-14 -1.980000000000e+01 -1.712058410502e-03 0.000000000000e+00 1.712058410492e-03 1.000000000000e-14 -2.000000000000e+01 -1.713466672740e-03 0.000000000000e+00 1.713466672730e-03 1.000000000000e-14 -1.000000000000e+00 -1.100204575014e-09 0.000000000000e+00 1.100194574899e-09 1.000000000000e-14 -1.200000000000e+00 -5.114656550891e-08 0.000000000000e+00 5.114655550920e-08 1.000000000000e-14 -1.400000000000e+00 -9.455704146053e-07 0.000000000000e+00 9.455704046054e-07 1.000000000000e-14 -1.600000000000e+00 -4.505531739566e-06 0.000000000000e+00 4.505531729566e-06 1.000000000000e-14 -1.800000000000e+00 -1.162908395474e-05 0.000000000000e+00 1.162908394474e-05 1.000000000000e-14 -2.000000000000e+00 -2.258162234837e-05 0.000000000000e+00 2.258162233837e-05 1.000000000000e-14 -2.200000000000e+00 -3.741127965250e-05 0.000000000000e+00 3.741127964250e-05 1.000000000000e-14 -2.400000000000e+00 -5.606143636491e-05 0.000000000000e+00 5.606143635491e-05 1.000000000000e-14 -2.600000000000e+00 -7.841603851410e-05 0.000000000000e+00 7.841603850410e-05 1.000000000000e-14 -2.800000000000e+00 -1.043249501995e-04 0.000000000000e+00 1.043249501895e-04 1.000000000000e-14 -3.000000000000e+00 -1.336201011028e-04 0.000000000000e+00 1.336201010928e-04 1.000000000000e-14 -3.200000000000e+00 -1.661260288009e-04 0.000000000000e+00 1.661260287909e-04 1.000000000000e-14 -3.400000000000e+00 -2.016666185297e-04 0.000000000000e+00 2.016666185197e-04 1.000000000000e-14 -3.600000000000e+00 -2.400692131632e-04 0.000000000000e+00 2.400692131532e-04 1.000000000000e-14 -3.800000000000e+00 -2.811669232162e-04 0.000000000000e+00 2.811669232062e-04 1.000000000000e-14 -4.000000000000e+00 -3.247997222981e-04 0.000000000000e+00 3.247997222881e-04 1.000000000000e-14 -4.200000000000e+00 -3.708147292559e-04 0.000000000000e+00 3.708147292459e-04 1.000000000000e-14 -4.400000000000e+00 -4.190659426391e-04 0.000000000000e+00 4.190659426291e-04 1.000000000000e-14 -4.600000000000e+00 -4.694135969078e-04 0.000000000000e+00 4.694135968978e-04 1.000000000000e-14 -4.800000000000e+00 -5.217232442528e-04 0.000000000000e+00 5.217232442428e-04 1.000000000000e-14 -5.000000000000e+00 -5.758646240288e-04 0.000000000000e+00 5.758646240188e-04 1.000000000000e-14 -5.200000000000e+00 -6.317103591783e-04 0.000000000000e+00 6.317103591683e-04 1.000000000000e-14 -5.400000000000e+00 -6.891345132152e-04 0.000000000000e+00 6.891345132052e-04 1.000000000000e-14 -5.600000000000e+00 -7.480110486930e-04 0.000000000000e+00 7.480110486830e-04 1.000000000000e-14 -5.800000000000e+00 -8.082121934316e-04 0.000000000000e+00 8.082121934216e-04 1.000000000000e-14 -6.000000000000e+00 -8.696008126209e-04 0.000000000000e+00 8.696008126109e-04 1.000000000000e-14 -6.200000000000e+00 -9.316580743359e-04 0.000000000000e+00 9.316580743259e-04 1.000000000000e-14 -6.400000000000e+00 -9.925695141523e-04 0.000000000000e+00 9.925695141423e-04 1.000000000000e-14 -6.600000000000e+00 -1.050817724253e-03 0.000000000000e+00 1.050817724243e-03 1.000000000000e-14 -6.800000000000e+00 -1.105392363705e-03 0.000000000000e+00 1.105392363695e-03 1.000000000000e-14 -7.000000000000e+00 -1.155615393855e-03 0.000000000000e+00 1.155615393845e-03 1.000000000000e-14 -7.200000000000e+00 -1.201164177628e-03 0.000000000000e+00 1.201164177618e-03 1.000000000000e-14 -7.400000000000e+00 -1.242046290778e-03 0.000000000000e+00 1.242046290768e-03 1.000000000000e-14 -7.600000000000e+00 -1.278513750865e-03 0.000000000000e+00 1.278513750855e-03 1.000000000000e-14 -7.800000000000e+00 -1.310959238906e-03 0.000000000000e+00 1.310959238896e-03 1.000000000000e-14 -8.000000000000e+00 -1.339829899772e-03 0.000000000000e+00 1.339829899762e-03 1.000000000000e-14 -8.200000000000e+00 -1.365570660881e-03 0.000000000000e+00 1.365570660871e-03 1.000000000000e-14 -8.400000000000e+00 -1.388593513011e-03 0.000000000000e+00 1.388593513001e-03 1.000000000000e-14 -8.600000000000e+00 -1.409264533660e-03 0.000000000000e+00 1.409264533650e-03 1.000000000000e-14 -8.800000000000e+00 -1.427901295720e-03 0.000000000000e+00 1.427901295710e-03 1.000000000000e-14 -9.000000000000e+00 -1.444775589738e-03 0.000000000000e+00 1.444775589728e-03 1.000000000000e-14 -9.200000000000e+00 -1.460118409726e-03 0.000000000000e+00 1.460118409716e-03 1.000000000000e-14 -9.400000000000e+00 -1.474125539708e-03 0.000000000000e+00 1.474125539698e-03 1.000000000000e-14 -9.600000000000e+00 -1.486962920163e-03 0.000000000000e+00 1.486962920153e-03 1.000000000000e-14 -9.800000000000e+00 -1.498771445431e-03 0.000000000000e+00 1.498771445421e-03 1.000000000000e-14 -1.000000000000e+01 -1.509671090107e-03 0.000000000000e+00 1.509671090097e-03 1.000000000000e-14 -1.020000000000e+01 -1.519764381803e-03 0.000000000000e+00 1.519764381793e-03 1.000000000000e-14 -1.040000000000e+01 -1.529139288196e-03 0.000000000000e+00 1.529139288186e-03 1.000000000000e-14 -1.060000000000e+01 -1.537871601666e-03 0.000000000000e+00 1.537871601656e-03 1.000000000000e-14 -1.080000000000e+01 -1.546026903498e-03 0.000000000000e+00 1.546026903488e-03 1.000000000000e-14 -1.100000000000e+01 -1.553662181162e-03 0.000000000000e+00 1.553662181152e-03 1.000000000000e-14 -1.120000000000e+01 -1.560827161585e-03 0.000000000000e+00 1.560827161575e-03 1.000000000000e-14 -1.140000000000e+01 -1.567565412793e-03 0.000000000000e+00 1.567565412783e-03 1.000000000000e-14 -1.160000000000e+01 -1.573915256897e-03 0.000000000000e+00 1.573915256887e-03 1.000000000000e-14 -1.180000000000e+01 -1.579910529331e-03 0.000000000000e+00 1.579910529321e-03 1.000000000000e-14 -1.200000000000e+01 -1.585581212570e-03 0.000000000000e+00 1.585581212560e-03 1.000000000000e-14 -1.220000000000e+01 -1.590953967157e-03 0.000000000000e+00 1.590953967147e-03 1.000000000000e-14 -1.240000000000e+01 -1.596052578411e-03 0.000000000000e+00 1.596052578401e-03 1.000000000000e-14 -1.260000000000e+01 -1.600898333707e-03 0.000000000000e+00 1.600898333697e-03 1.000000000000e-14 -1.280000000000e+01 -1.605510342359e-03 0.000000000000e+00 1.605510342349e-03 1.000000000000e-14 -1.300000000000e+01 -1.609905807898e-03 0.000000000000e+00 1.609905807888e-03 1.000000000000e-14 -1.320000000000e+01 -1.614100260690e-03 0.000000000000e+00 1.614100260680e-03 1.000000000000e-14 -1.340000000000e+01 -1.618107757407e-03 0.000000000000e+00 1.618107757397e-03 1.000000000000e-14 -1.360000000000e+01 -1.621941052687e-03 0.000000000000e+00 1.621941052677e-03 1.000000000000e-14 -1.380000000000e+01 -1.625611747371e-03 0.000000000000e+00 1.625611747361e-03 1.000000000000e-14 -1.400000000000e+01 -1.629130416936e-03 0.000000000000e+00 1.629130416926e-03 1.000000000000e-14 -1.420000000000e+01 -1.632506723135e-03 0.000000000000e+00 1.632506723125e-03 1.000000000000e-14 -1.440000000000e+01 -1.635749511337e-03 0.000000000000e+00 1.635749511327e-03 1.000000000000e-14 -1.460000000000e+01 -1.638866895656e-03 0.000000000000e+00 1.638866895646e-03 1.000000000000e-14 -1.480000000000e+01 -1.641866348320e-03 0.000000000000e+00 1.641866348310e-03 1.000000000000e-14 -1.500000000000e+01 -1.644754704830e-03 0.000000000000e+00 1.644754704820e-03 1.000000000000e-14 -1.520000000000e+01 -1.647538315408e-03 0.000000000000e+00 1.647538315398e-03 1.000000000000e-14 -1.540000000000e+01 -1.650223031841e-03 0.000000000000e+00 1.650223031831e-03 1.000000000000e-14 -1.560000000000e+01 -1.652814269489e-03 0.000000000000e+00 1.652814269479e-03 1.000000000000e-14 -1.580000000000e+01 -1.655317047637e-03 0.000000000000e+00 1.655317047627e-03 1.000000000000e-14 -1.600000000000e+01 -1.657736025406e-03 0.000000000000e+00 1.657736025396e-03 1.000000000000e-14 -1.620000000000e+01 -1.660075533805e-03 0.000000000000e+00 1.660075533795e-03 1.000000000000e-14 -1.640000000000e+01 -1.662339604406e-03 0.000000000000e+00 1.662339604396e-03 1.000000000000e-14 -1.660000000000e+01 -1.664531995042e-03 0.000000000000e+00 1.664531995032e-03 1.000000000000e-14 -1.680000000000e+01 -1.666656212897e-03 0.000000000000e+00 1.666656212887e-03 1.000000000000e-14 -1.700000000000e+01 -1.668715535267e-03 0.000000000000e+00 1.668715535257e-03 1.000000000000e-14 -1.720000000000e+01 -1.670713028298e-03 0.000000000000e+00 1.670713028288e-03 1.000000000000e-14 -1.740000000000e+01 -1.672651563895e-03 0.000000000000e+00 1.672651563885e-03 1.000000000000e-14 -1.760000000000e+01 -1.674533835029e-03 0.000000000000e+00 1.674533835019e-03 1.000000000000e-14 -1.780000000000e+01 -1.676362369606e-03 0.000000000000e+00 1.676362369596e-03 1.000000000000e-14 -1.800000000000e+01 -1.678139543059e-03 0.000000000000e+00 1.678139543049e-03 1.000000000000e-14 -1.820000000000e+01 -1.679867589797e-03 0.000000000000e+00 1.679867589787e-03 1.000000000000e-14 -1.840000000000e+01 -1.681548613633e-03 0.000000000000e+00 1.681548613623e-03 1.000000000000e-14 -1.860000000000e+01 -1.683184597287e-03 0.000000000000e+00 1.683184597277e-03 1.000000000000e-14 -1.880000000000e+01 -1.684777411076e-03 0.000000000000e+00 1.684777411066e-03 1.000000000000e-14 -1.900000000000e+01 -1.686328820852e-03 0.000000000000e+00 1.686328820842e-03 1.000000000000e-14 -1.920000000000e+01 -1.687840495280e-03 0.000000000000e+00 1.687840495270e-03 1.000000000000e-14 -1.940000000000e+01 -1.689314012501e-03 0.000000000000e+00 1.689314012491e-03 1.000000000000e-14 -1.960000000000e+01 -1.690750866264e-03 0.000000000000e+00 1.690750866254e-03 1.000000000000e-14 -1.980000000000e+01 -1.692152471554e-03 0.000000000000e+00 1.692152471544e-03 1.000000000000e-14 -2.000000000000e+01 -1.693520169771e-03 0.000000000000e+00 1.693520169761e-03 1.000000000000e-14 -1.000000000000e+00 -1.100204571978e-09 0.000000000000e+00 1.100194572077e-09 1.000000000000e-14 -1.200000000000e+00 -5.114655966787e-08 0.000000000000e+00 5.114654966779e-08 1.000000000000e-14 -1.400000000000e+00 -9.455692087865e-07 0.000000000000e+00 9.455691987873e-07 1.000000000000e-14 -1.600000000000e+00 -4.505515006249e-06 0.000000000000e+00 4.505514996249e-06 1.000000000000e-14 -1.800000000000e+00 -1.162900316554e-05 0.000000000000e+00 1.162900315554e-05 1.000000000000e-14 -2.000000000000e+00 -2.258137905539e-05 0.000000000000e+00 2.258137904539e-05 1.000000000000e-14 -2.200000000000e+00 -3.741071542533e-05 0.000000000000e+00 3.741071541534e-05 1.000000000000e-14 -2.400000000000e+00 -5.606032656901e-05 0.000000000000e+00 5.606032655901e-05 1.000000000000e-14 -2.600000000000e+00 -7.841408820102e-05 0.000000000000e+00 7.841408819102e-05 1.000000000000e-14 -2.800000000000e+00 -1.043217903447e-04 0.000000000000e+00 1.043217903347e-04 1.000000000000e-14 -3.000000000000e+00 -1.336152835293e-04 0.000000000000e+00 1.336152835193e-04 1.000000000000e-14 -3.200000000000e+00 -1.661190182525e-04 0.000000000000e+00 1.661190182425e-04 1.000000000000e-14 -3.400000000000e+00 -2.016567803664e-04 0.000000000000e+00 2.016567803564e-04 1.000000000000e-14 -3.600000000000e+00 -2.400557949750e-04 0.000000000000e+00 2.400557949650e-04 1.000000000000e-14 -3.800000000000e+00 -2.811490282457e-04 0.000000000000e+00 2.811490282357e-04 1.000000000000e-14 -4.000000000000e+00 -3.247762719011e-04 0.000000000000e+00 3.247762718911e-04 1.000000000000e-14 -4.200000000000e+00 -3.707844106822e-04 0.000000000000e+00 3.707844106722e-04 1.000000000000e-14 -4.400000000000e+00 -4.190271371411e-04 0.000000000000e+00 4.190271371311e-04 1.000000000000e-14 -4.600000000000e+00 -4.693642815786e-04 0.000000000000e+00 4.693642815686e-04 1.000000000000e-14 -4.800000000000e+00 -5.216608591219e-04 0.000000000000e+00 5.216608591119e-04 1.000000000000e-14 -5.000000000000e+00 -5.757858940361e-04 0.000000000000e+00 5.757858940261e-04 1.000000000000e-14 -5.200000000000e+00 -6.316110592248e-04 0.000000000000e+00 6.316110592148e-04 1.000000000000e-14 -5.400000000000e+00 -6.890091643956e-04 0.000000000000e+00 6.890091643856e-04 1.000000000000e-14 -5.600000000000e+00 -7.478525355285e-04 0.000000000000e+00 7.478525355185e-04 1.000000000000e-14 -5.800000000000e+00 -8.080112668501e-04 0.000000000000e+00 8.080112668401e-04 1.000000000000e-14 -6.000000000000e+00 -8.693407687690e-04 0.000000000000e+00 8.693407687590e-04 1.000000000000e-14 -6.200000000000e+00 -9.311740413594e-04 0.000000000000e+00 9.311740413494e-04 1.000000000000e-14 -6.400000000000e+00 -9.915677538243e-04 0.000000000000e+00 9.915677538143e-04 1.000000000000e-14 -6.600000000000e+00 -1.049046488353e-03 0.000000000000e+00 1.049046488343e-03 1.000000000000e-14 -6.800000000000e+00 -1.102623128617e-03 0.000000000000e+00 1.102623128607e-03 1.000000000000e-14 -7.000000000000e+00 -1.151669074202e-03 0.000000000000e+00 1.151669074192e-03 1.000000000000e-14 -7.200000000000e+00 -1.195932802110e-03 0.000000000000e+00 1.195932802100e-03 1.000000000000e-14 -7.400000000000e+00 -1.235494918109e-03 0.000000000000e+00 1.235494918099e-03 1.000000000000e-14 -7.600000000000e+00 -1.270666386362e-03 0.000000000000e+00 1.270666386352e-03 1.000000000000e-14 -7.800000000000e+00 -1.301879017745e-03 0.000000000000e+00 1.301879017735e-03 1.000000000000e-14 -8.000000000000e+00 -1.329601193525e-03 0.000000000000e+00 1.329601193515e-03 1.000000000000e-14 -8.200000000000e+00 -1.354286027353e-03 0.000000000000e+00 1.354286027343e-03 1.000000000000e-14 -8.400000000000e+00 -1.376345421153e-03 0.000000000000e+00 1.376345421143e-03 1.000000000000e-14 -8.600000000000e+00 -1.396140717046e-03 0.000000000000e+00 1.396140717036e-03 1.000000000000e-14 -8.800000000000e+00 -1.413982518361e-03 0.000000000000e+00 1.413982518351e-03 1.000000000000e-14 -9.000000000000e+00 -1.430134878294e-03 0.000000000000e+00 1.430134878284e-03 1.000000000000e-14 -9.200000000000e+00 -1.444821110052e-03 0.000000000000e+00 1.444821110042e-03 1.000000000000e-14 -9.400000000000e+00 -1.458229795273e-03 0.000000000000e+00 1.458229795263e-03 1.000000000000e-14 -9.600000000000e+00 -1.470520334225e-03 0.000000000000e+00 1.470520334215e-03 1.000000000000e-14 -9.800000000000e+00 -1.481827793256e-03 0.000000000000e+00 1.481827793246e-03 1.000000000000e-14 -1.000000000000e+01 -1.492267010752e-03 0.000000000000e+00 1.492267010742e-03 1.000000000000e-14 -1.020000000000e+01 -1.501936015787e-03 0.000000000000e+00 1.501936015777e-03 1.000000000000e-14 -1.040000000000e+01 -1.510918848086e-03 0.000000000000e+00 1.510918848076e-03 1.000000000000e-14 -1.060000000000e+01 -1.519287873724e-03 0.000000000000e+00 1.519287873714e-03 1.000000000000e-14 -1.080000000000e+01 -1.527105684101e-03 0.000000000000e+00 1.527105684091e-03 1.000000000000e-14 -1.100000000000e+01 -1.534426654197e-03 0.000000000000e+00 1.534426654187e-03 1.000000000000e-14 -1.120000000000e+01 -1.541298223780e-03 0.000000000000e+00 1.541298223770e-03 1.000000000000e-14 -1.140000000000e+01 -1.547761953831e-03 0.000000000000e+00 1.547761953821e-03 1.000000000000e-14 -1.160000000000e+01 -1.553854400641e-03 0.000000000000e+00 1.553854400631e-03 1.000000000000e-14 -1.180000000000e+01 -1.559607841760e-03 0.000000000000e+00 1.559607841750e-03 1.000000000000e-14 -1.200000000000e+01 -1.565050881346e-03 0.000000000000e+00 1.565050881336e-03 1.000000000000e-14 -1.220000000000e+01 -1.570208956996e-03 0.000000000000e+00 1.570208956986e-03 1.000000000000e-14 -1.240000000000e+01 -1.575104765859e-03 0.000000000000e+00 1.575104765849e-03 1.000000000000e-14 -1.260000000000e+01 -1.579758624340e-03 0.000000000000e+00 1.579758624330e-03 1.000000000000e-14 -1.280000000000e+01 -1.584188772984e-03 0.000000000000e+00 1.584188772974e-03 1.000000000000e-14 -1.300000000000e+01 -1.588411635908e-03 0.000000000000e+00 1.588411635898e-03 1.000000000000e-14 -1.320000000000e+01 -1.592442042408e-03 0.000000000000e+00 1.592442042398e-03 1.000000000000e-14 -1.340000000000e+01 -1.596293416973e-03 0.000000000000e+00 1.596293416963e-03 1.000000000000e-14 -1.360000000000e+01 -1.599977942781e-03 0.000000000000e+00 1.599977942771e-03 1.000000000000e-14 -1.380000000000e+01 -1.603506702892e-03 0.000000000000e+00 1.603506702882e-03 1.000000000000e-14 -1.400000000000e+01 -1.606889802574e-03 0.000000000000e+00 1.606889802564e-03 1.000000000000e-14 -1.420000000000e+01 -1.610136475639e-03 0.000000000000e+00 1.610136475629e-03 1.000000000000e-14 -1.440000000000e+01 -1.613255177166e-03 0.000000000000e+00 1.613255177156e-03 1.000000000000e-14 -1.460000000000e+01 -1.616253680257e-03 0.000000000000e+00 1.616253680247e-03 1.000000000000e-14 -1.480000000000e+01 -1.619139082685e-03 0.000000000000e+00 1.619139082675e-03 1.000000000000e-14 -1.500000000000e+01 -1.621917969205e-03 0.000000000000e+00 1.621917969195e-03 1.000000000000e-14 -1.520000000000e+01 -1.624596398062e-03 0.000000000000e+00 1.624596398052e-03 1.000000000000e-14 -1.540000000000e+01 -1.627179967544e-03 0.000000000000e+00 1.627179967534e-03 1.000000000000e-14 -1.560000000000e+01 -1.629673859271e-03 0.000000000000e+00 1.629673859261e-03 1.000000000000e-14 -1.580000000000e+01 -1.632082876627e-03 0.000000000000e+00 1.632082876617e-03 1.000000000000e-14 -1.600000000000e+01 -1.634411479009e-03 0.000000000000e+00 1.634411478999e-03 1.000000000000e-14 -1.620000000000e+01 -1.636663812388e-03 0.000000000000e+00 1.636663812378e-03 1.000000000000e-14 -1.640000000000e+01 -1.638843736656e-03 0.000000000000e+00 1.638843736646e-03 1.000000000000e-14 -1.660000000000e+01 -1.640954850140e-03 0.000000000000e+00 1.640954850130e-03 1.000000000000e-14 -1.680000000000e+01 -1.643000511624e-03 0.000000000000e+00 1.643000511614e-03 1.000000000000e-14 -1.700000000000e+01 -1.644983860167e-03 0.000000000000e+00 1.644983860157e-03 1.000000000000e-14 -1.720000000000e+01 -1.646907832972e-03 0.000000000000e+00 1.646907832962e-03 1.000000000000e-14 -1.740000000000e+01 -1.648775181532e-03 0.000000000000e+00 1.648775181522e-03 1.000000000000e-14 -1.760000000000e+01 -1.650588486238e-03 0.000000000000e+00 1.650588486228e-03 1.000000000000e-14 -1.780000000000e+01 -1.652350169621e-03 0.000000000000e+00 1.652350169611e-03 1.000000000000e-14 -1.800000000000e+01 -1.654062508371e-03 0.000000000000e+00 1.654062508361e-03 1.000000000000e-14 -1.820000000000e+01 -1.655727644275e-03 0.000000000000e+00 1.655727644265e-03 1.000000000000e-14 -1.840000000000e+01 -1.657347594170e-03 0.000000000000e+00 1.657347594160e-03 1.000000000000e-14 -1.860000000000e+01 -1.658924259029e-03 0.000000000000e+00 1.658924259019e-03 1.000000000000e-14 -1.880000000000e+01 -1.660459432254e-03 0.000000000000e+00 1.660459432244e-03 1.000000000000e-14 -1.900000000000e+01 -1.661954807266e-03 0.000000000000e+00 1.661954807256e-03 1.000000000000e-14 -1.920000000000e+01 -1.663411984454e-03 0.000000000000e+00 1.663411984444e-03 1.000000000000e-14 -1.940000000000e+01 -1.664832477549e-03 0.000000000000e+00 1.664832477539e-03 1.000000000000e-14 -1.960000000000e+01 -1.666217719483e-03 0.000000000000e+00 1.666217719473e-03 1.000000000000e-14 -1.980000000000e+01 -1.667569067765e-03 0.000000000000e+00 1.667569067755e-03 1.000000000000e-14 -2.000000000000e+01 -1.668887809440e-03 0.000000000000e+00 1.668887809430e-03 1.000000000000e-14 -1.000000000000e+00 -5.365282870762e-13 0.000000000000e+00 5.265284871786e-13 1.000000000000e-14 -1.200000000000e+00 -1.082389735566e-10 0.000000000000e+00 1.082289739310e-10 1.000000000000e-14 -1.400000000000e+00 -2.514327297688e-08 0.000000000000e+00 2.514326297716e-08 1.000000000000e-14 -1.600000000000e+00 -1.239013869350e-06 0.000000000000e+00 1.239013859350e-06 1.000000000000e-14 -1.800000000000e+00 -6.882448007713e-06 0.000000000000e+00 6.882447997713e-06 1.000000000000e-14 -2.000000000000e+00 -1.828506155899e-05 0.000000000000e+00 1.828506154899e-05 1.000000000000e-14 -2.200000000000e+00 -3.571274917674e-05 0.000000000000e+00 3.571274916674e-05 1.000000000000e-14 -2.400000000000e+00 -5.909137904924e-05 0.000000000000e+00 5.909137903924e-05 1.000000000000e-14 -2.600000000000e+00 -8.817887896890e-05 0.000000000000e+00 8.817887895890e-05 1.000000000000e-14 -2.800000000000e+00 -1.226479656027e-04 0.000000000000e+00 1.226479655927e-04 1.000000000000e-14 -3.000000000000e+00 -1.621355278656e-04 0.000000000000e+00 1.621355278556e-04 1.000000000000e-14 -3.200000000000e+00 -2.062718154336e-04 0.000000000000e+00 2.062718154236e-04 1.000000000000e-14 -3.400000000000e+00 -2.546965762327e-04 0.000000000000e+00 2.546965762227e-04 1.000000000000e-14 -3.600000000000e+00 -3.070670684753e-04 0.000000000000e+00 3.070670684653e-04 1.000000000000e-14 -3.800000000000e+00 -3.630611955685e-04 0.000000000000e+00 3.630611955585e-04 1.000000000000e-14 -4.000000000000e+00 -4.223777608826e-04 0.000000000000e+00 4.223777608726e-04 1.000000000000e-14 -4.200000000000e+00 -4.847349998950e-04 0.000000000000e+00 4.847349998850e-04 1.000000000000e-14 -4.400000000000e+00 -5.498680176862e-04 0.000000000000e+00 5.498680176762e-04 1.000000000000e-14 -4.600000000000e+00 -6.175254322612e-04 0.000000000000e+00 6.175254322512e-04 1.000000000000e-14 -4.800000000000e+00 -6.874653224197e-04 0.000000000000e+00 6.874653224097e-04 1.000000000000e-14 -5.000000000000e+00 -7.594504618921e-04 0.000000000000e+00 7.594504618821e-04 1.000000000000e-14 -5.200000000000e+00 -8.332427757397e-04 0.000000000000e+00 8.332427757297e-04 1.000000000000e-14 -5.400000000000e+00 -9.085969713700e-04 0.000000000000e+00 9.085969713600e-04 1.000000000000e-14 -5.600000000000e+00 -9.852532791925e-04 0.000000000000e+00 9.852532791825e-04 1.000000000000e-14 -5.800000000000e+00 -1.062906280679e-03 0.000000000000e+00 1.062906280669e-03 1.000000000000e-14 -6.000000000000e+00 -1.139093350221e-03 0.000000000000e+00 1.139093350211e-03 1.000000000000e-14 -6.200000000000e+00 -1.209202717229e-03 0.000000000000e+00 1.209202717219e-03 1.000000000000e-14 -6.400000000000e+00 -1.271438857231e-03 0.000000000000e+00 1.271438857221e-03 1.000000000000e-14 -6.600000000000e+00 -1.325383889724e-03 0.000000000000e+00 1.325383889714e-03 1.000000000000e-14 -6.800000000000e+00 -1.371520297453e-03 0.000000000000e+00 1.371520297443e-03 1.000000000000e-14 -7.000000000000e+00 -1.410804483026e-03 0.000000000000e+00 1.410804483016e-03 1.000000000000e-14 -7.200000000000e+00 -1.444314127769e-03 0.000000000000e+00 1.444314127759e-03 1.000000000000e-14 -7.400000000000e+00 -1.473052556977e-03 0.000000000000e+00 1.473052556967e-03 1.000000000000e-14 -7.600000000000e+00 -1.497875689466e-03 0.000000000000e+00 1.497875689456e-03 1.000000000000e-14 -7.800000000000e+00 -1.519483819776e-03 0.000000000000e+00 1.519483819766e-03 1.000000000000e-14 -8.000000000000e+00 -1.538439380963e-03 0.000000000000e+00 1.538439380953e-03 1.000000000000e-14 -8.200000000000e+00 -1.555191362342e-03 0.000000000000e+00 1.555191362332e-03 1.000000000000e-14 -8.400000000000e+00 -1.570098490006e-03 0.000000000000e+00 1.570098489996e-03 1.000000000000e-14 -8.600000000000e+00 -1.583448691100e-03 0.000000000000e+00 1.583448691090e-03 1.000000000000e-14 -8.800000000000e+00 -1.595474587922e-03 0.000000000000e+00 1.595474587912e-03 1.000000000000e-14 -9.000000000000e+00 -1.606365535129e-03 0.000000000000e+00 1.606365535119e-03 1.000000000000e-14 -9.200000000000e+00 -1.616276879113e-03 0.000000000000e+00 1.616276879103e-03 1.000000000000e-14 -9.400000000000e+00 -1.625337065601e-03 0.000000000000e+00 1.625337065591e-03 1.000000000000e-14 -9.600000000000e+00 -1.633653108038e-03 0.000000000000e+00 1.633653108028e-03 1.000000000000e-14 -9.800000000000e+00 -1.641314815015e-03 0.000000000000e+00 1.641314815005e-03 1.000000000000e-14 -1.000000000000e+01 -1.648398078653e-03 0.000000000000e+00 1.648398078643e-03 1.000000000000e-14 -1.020000000000e+01 -1.654967450298e-03 0.000000000000e+00 1.654967450288e-03 1.000000000000e-14 -1.040000000000e+01 -1.661078172658e-03 0.000000000000e+00 1.661078172648e-03 1.000000000000e-14 -1.060000000000e+01 -1.666777794837e-03 0.000000000000e+00 1.666777794827e-03 1.000000000000e-14 -1.080000000000e+01 -1.672107465184e-03 0.000000000000e+00 1.672107465174e-03 1.000000000000e-14 -1.100000000000e+01 -1.677102973513e-03 0.000000000000e+00 1.677102973503e-03 1.000000000000e-14 -1.120000000000e+01 -1.681795597019e-03 0.000000000000e+00 1.681795597009e-03 1.000000000000e-14 -1.140000000000e+01 -1.686212791325e-03 0.000000000000e+00 1.686212791315e-03 1.000000000000e-14 -1.160000000000e+01 -1.690378758562e-03 0.000000000000e+00 1.690378758552e-03 1.000000000000e-14 -1.180000000000e+01 -1.694314917122e-03 0.000000000000e+00 1.694314917112e-03 1.000000000000e-14 -1.200000000000e+01 -1.698040292312e-03 0.000000000000e+00 1.698040292302e-03 1.000000000000e-14 -1.220000000000e+01 -1.701571842981e-03 0.000000000000e+00 1.701571842971e-03 1.000000000000e-14 -1.240000000000e+01 -1.704924736009e-03 0.000000000000e+00 1.704924735999e-03 1.000000000000e-14 -1.260000000000e+01 -1.708112578096e-03 0.000000000000e+00 1.708112578086e-03 1.000000000000e-14 -1.280000000000e+01 -1.711147612416e-03 0.000000000000e+00 1.711147612406e-03 1.000000000000e-14 -1.300000000000e+01 -1.714040886180e-03 0.000000000000e+00 1.714040886170e-03 1.000000000000e-14 -1.320000000000e+01 -1.716802394015e-03 0.000000000000e+00 1.716802394005e-03 1.000000000000e-14 -1.340000000000e+01 -1.719441201142e-03 0.000000000000e+00 1.719441201132e-03 1.000000000000e-14 -1.360000000000e+01 -1.721965549593e-03 0.000000000000e+00 1.721965549583e-03 1.000000000000e-14 -1.380000000000e+01 -1.724382967242e-03 0.000000000000e+00 1.724382967232e-03 1.000000000000e-14 -1.400000000000e+01 -1.726700277086e-03 0.000000000000e+00 1.726700277076e-03 1.000000000000e-14 -1.420000000000e+01 -1.728923776176e-03 0.000000000000e+00 1.728923776166e-03 1.000000000000e-14 -1.440000000000e+01 -1.731059220924e-03 0.000000000000e+00 1.731059220914e-03 1.000000000000e-14 -1.460000000000e+01 -1.733111899974e-03 0.000000000000e+00 1.733111899964e-03 1.000000000000e-14 -1.480000000000e+01 -1.735086681098e-03 0.000000000000e+00 1.735086681088e-03 1.000000000000e-14 -1.500000000000e+01 -1.736988052517e-03 0.000000000000e+00 1.736988052507e-03 1.000000000000e-14 -1.520000000000e+01 -1.738820159421e-03 0.000000000000e+00 1.738820159411e-03 1.000000000000e-14 -1.540000000000e+01 -1.740586836341e-03 0.000000000000e+00 1.740586836331e-03 1.000000000000e-14 -1.560000000000e+01 -1.742291635914e-03 0.000000000000e+00 1.742291635904e-03 1.000000000000e-14 -1.580000000000e+01 -1.743937854483e-03 0.000000000000e+00 1.743937854473e-03 1.000000000000e-14 -1.600000000000e+01 -1.745528554960e-03 0.000000000000e+00 1.745528554950e-03 1.000000000000e-14 -1.620000000000e+01 -1.747066587265e-03 0.000000000000e+00 1.747066587255e-03 1.000000000000e-14 -1.640000000000e+01 -1.748554606651e-03 0.000000000000e+00 1.748554606641e-03 1.000000000000e-14 -1.660000000000e+01 -1.749995090158e-03 0.000000000000e+00 1.749995090148e-03 1.000000000000e-14 -1.680000000000e+01 -1.751390351420e-03 0.000000000000e+00 1.751390351410e-03 1.000000000000e-14 -1.700000000000e+01 -1.752742554016e-03 0.000000000000e+00 1.752742554006e-03 1.000000000000e-14 -1.720000000000e+01 -1.754053723523e-03 0.000000000000e+00 1.754053723513e-03 1.000000000000e-14 -1.740000000000e+01 -1.755325758425e-03 0.000000000000e+00 1.755325758415e-03 1.000000000000e-14 -1.760000000000e+01 -1.756560439998e-03 0.000000000000e+00 1.756560439988e-03 1.000000000000e-14 -1.780000000000e+01 -1.757759441280e-03 0.000000000000e+00 1.757759441270e-03 1.000000000000e-14 -1.800000000000e+01 -1.758924335232e-03 0.000000000000e+00 1.758924335222e-03 1.000000000000e-14 -1.820000000000e+01 -1.760056602160e-03 0.000000000000e+00 1.760056602150e-03 1.000000000000e-14 -1.840000000000e+01 -1.761157636492e-03 0.000000000000e+00 1.761157636482e-03 1.000000000000e-14 -1.860000000000e+01 -1.762228752963e-03 0.000000000000e+00 1.762228752953e-03 1.000000000000e-14 -1.880000000000e+01 -1.763271192267e-03 0.000000000000e+00 1.763271192257e-03 1.000000000000e-14 -1.900000000000e+01 -1.764286126238e-03 0.000000000000e+00 1.764286126228e-03 1.000000000000e-14 -1.920000000000e+01 -1.765274662598e-03 0.000000000000e+00 1.765274662588e-03 1.000000000000e-14 -1.940000000000e+01 -1.766237849318e-03 0.000000000000e+00 1.766237849308e-03 1.000000000000e-14 -1.960000000000e+01 -1.767176678619e-03 0.000000000000e+00 1.767176678609e-03 1.000000000000e-14 -1.980000000000e+01 -1.768092090666e-03 0.000000000000e+00 1.768092090656e-03 1.000000000000e-14 -2.000000000000e+01 -1.768984976960e-03 0.000000000000e+00 1.768984976950e-03 1.000000000000e-14 -1.000000000000e+00 -5.365287207570e-13 0.000000000000e+00 5.265284871786e-13 1.000000000000e-14 -1.200000000000e+00 -1.082389737735e-10 0.000000000000e+00 1.082289739021e-10 1.000000000000e-14 -1.400000000000e+00 -2.514327141303e-08 0.000000000000e+00 2.514326141368e-08 1.000000000000e-14 -1.600000000000e+00 -1.239012000128e-06 0.000000000000e+00 1.239011990127e-06 1.000000000000e-14 -1.800000000000e+00 -6.882416040990e-06 0.000000000000e+00 6.882416030990e-06 1.000000000000e-14 -2.000000000000e+00 -1.828490240360e-05 0.000000000000e+00 1.828490239360e-05 1.000000000000e-14 -2.200000000000e+00 -3.571227017068e-05 0.000000000000e+00 3.571227016068e-05 1.000000000000e-14 -2.400000000000e+00 -5.909027957737e-05 0.000000000000e+00 5.909027956737e-05 1.000000000000e-14 -2.600000000000e+00 -8.817674636732e-05 0.000000000000e+00 8.817674635732e-05 1.000000000000e-14 -2.800000000000e+00 -1.226442730648e-04 0.000000000000e+00 1.226442730548e-04 1.000000000000e-14 -3.000000000000e+00 -1.621296289163e-04 0.000000000000e+00 1.621296289063e-04 1.000000000000e-14 -3.200000000000e+00 -2.062629306217e-04 0.000000000000e+00 2.062629306117e-04 1.000000000000e-14 -3.400000000000e+00 -2.546837680395e-04 0.000000000000e+00 2.546837680295e-04 1.000000000000e-14 -3.600000000000e+00 -3.070491997706e-04 0.000000000000e+00 3.070491997606e-04 1.000000000000e-14 -3.800000000000e+00 -3.630368652198e-04 0.000000000000e+00 3.630368652098e-04 1.000000000000e-14 -4.000000000000e+00 -4.223452071707e-04 0.000000000000e+00 4.223452071607e-04 1.000000000000e-14 -4.200000000000e+00 -4.846919578683e-04 0.000000000000e+00 4.846919578583e-04 1.000000000000e-14 -4.400000000000e+00 -5.498115099730e-04 0.000000000000e+00 5.498115099630e-04 1.000000000000e-14 -4.600000000000e+00 -6.174514636315e-04 0.000000000000e+00 6.174514636215e-04 1.000000000000e-14 -4.800000000000e+00 -6.873684363721e-04 0.000000000000e+00 6.873684363621e-04 1.000000000000e-14 -5.000000000000e+00 -7.593231037467e-04 0.000000000000e+00 7.593231037367e-04 1.000000000000e-14 -5.200000000000e+00 -8.330743941423e-04 0.000000000000e+00 8.330743941323e-04 1.000000000000e-14 -5.400000000000e+00 -9.083727815228e-04 0.000000000000e+00 9.083727815128e-04 1.000000000000e-14 -5.600000000000e+00 -9.849525858278e-04 0.000000000000e+00 9.849525858178e-04 1.000000000000e-14 -5.800000000000e+00 -1.062470802933e-03 0.000000000000e+00 1.062470802923e-03 1.000000000000e-14 -6.000000000000e+00 -1.137927809639e-03 0.000000000000e+00 1.137927809629e-03 1.000000000000e-14 -6.200000000000e+00 -1.206837207025e-03 0.000000000000e+00 1.206837207015e-03 1.000000000000e-14 -6.400000000000e+00 -1.267598999151e-03 0.000000000000e+00 1.267598999141e-03 1.000000000000e-14 -6.600000000000e+00 -1.319965509675e-03 0.000000000000e+00 1.319965509665e-03 1.000000000000e-14 -6.800000000000e+00 -1.364561099195e-03 0.000000000000e+00 1.364561099185e-03 1.000000000000e-14 -7.000000000000e+00 -1.402425480675e-03 0.000000000000e+00 1.402425480665e-03 1.000000000000e-14 -7.200000000000e+00 -1.434668578056e-03 0.000000000000e+00 1.434668578046e-03 1.000000000000e-14 -7.400000000000e+00 -1.462295209675e-03 0.000000000000e+00 1.462295209665e-03 1.000000000000e-14 -7.600000000000e+00 -1.486148420097e-03 0.000000000000e+00 1.486148420087e-03 1.000000000000e-14 -7.800000000000e+00 -1.506910800304e-03 0.000000000000e+00 1.506910800294e-03 1.000000000000e-14 -8.000000000000e+00 -1.525126887279e-03 0.000000000000e+00 1.525126887269e-03 1.000000000000e-14 -8.200000000000e+00 -1.541229482520e-03 0.000000000000e+00 1.541229482510e-03 1.000000000000e-14 -8.400000000000e+00 -1.555563392522e-03 0.000000000000e+00 1.555563392512e-03 1.000000000000e-14 -8.600000000000e+00 -1.568404863047e-03 0.000000000000e+00 1.568404863037e-03 1.000000000000e-14 -8.800000000000e+00 -1.579976820835e-03 0.000000000000e+00 1.579976820825e-03 1.000000000000e-14 -9.000000000000e+00 -1.590460603255e-03 0.000000000000e+00 1.590460603245e-03 1.000000000000e-14 -9.200000000000e+00 -1.600004924450e-03 0.000000000000e+00 1.600004924440e-03 1.000000000000e-14 -9.400000000000e+00 -1.608732728255e-03 0.000000000000e+00 1.608732728245e-03 1.000000000000e-14 -9.600000000000e+00 -1.616746444850e-03 0.000000000000e+00 1.616746444840e-03 1.000000000000e-14 -9.800000000000e+00 -1.624132046011e-03 0.000000000000e+00 1.624132046001e-03 1.000000000000e-14 -1.000000000000e+01 -1.630962194943e-03 0.000000000000e+00 1.630962194933e-03 1.000000000000e-14 -1.020000000000e+01 -1.637298710962e-03 0.000000000000e+00 1.637298710952e-03 1.000000000000e-14 -1.040000000000e+01 -1.643194512725e-03 0.000000000000e+00 1.643194512715e-03 1.000000000000e-14 -1.060000000000e+01 -1.648695161922e-03 0.000000000000e+00 1.648695161912e-03 1.000000000000e-14 -1.080000000000e+01 -1.653840098705e-03 0.000000000000e+00 1.653840098695e-03 1.000000000000e-14 -1.100000000000e+01 -1.658663637486e-03 0.000000000000e+00 1.658663637476e-03 1.000000000000e-14 -1.120000000000e+01 -1.663195775161e-03 0.000000000000e+00 1.663195775151e-03 1.000000000000e-14 -1.140000000000e+01 -1.667462851399e-03 0.000000000000e+00 1.667462851389e-03 1.000000000000e-14 -1.160000000000e+01 -1.671488091491e-03 0.000000000000e+00 1.671488091481e-03 1.000000000000e-14 -1.180000000000e+01 -1.675292055310e-03 0.000000000000e+00 1.675292055300e-03 1.000000000000e-14 -1.200000000000e+01 -1.678893010747e-03 0.000000000000e+00 1.678893010737e-03 1.000000000000e-14 -1.220000000000e+01 -1.682307245993e-03 0.000000000000e+00 1.682307245983e-03 1.000000000000e-14 -1.240000000000e+01 -1.685549332037e-03 0.000000000000e+00 1.685549332027e-03 1.000000000000e-14 -1.260000000000e+01 -1.688632344390e-03 0.000000000000e+00 1.688632344380e-03 1.000000000000e-14 -1.280000000000e+01 -1.691568051225e-03 0.000000000000e+00 1.691568051215e-03 1.000000000000e-14 -1.300000000000e+01 -1.694367073743e-03 0.000000000000e+00 1.694367073733e-03 1.000000000000e-14 -1.320000000000e+01 -1.697039023419e-03 0.000000000000e+00 1.697039023409e-03 1.000000000000e-14 -1.340000000000e+01 -1.699592619938e-03 0.000000000000e+00 1.699592619928e-03 1.000000000000e-14 -1.360000000000e+01 -1.702035792924e-03 0.000000000000e+00 1.702035792914e-03 1.000000000000e-14 -1.380000000000e+01 -1.704375786198e-03 0.000000000000e+00 1.704375786188e-03 1.000000000000e-14 -1.400000000000e+01 -1.706619167454e-03 0.000000000000e+00 1.706619167444e-03 1.000000000000e-14 -1.420000000000e+01 -1.708771998503e-03 0.000000000000e+00 1.708771998493e-03 1.000000000000e-14 -1.440000000000e+01 -1.710839822065e-03 0.000000000000e+00 1.710839822055e-03 1.000000000000e-14 -1.460000000000e+01 -1.712827731412e-03 0.000000000000e+00 1.712827731402e-03 1.000000000000e-14 -1.480000000000e+01 -1.714740415338e-03 0.000000000000e+00 1.714740415328e-03 1.000000000000e-14 -1.500000000000e+01 -1.716582197798e-03 0.000000000000e+00 1.716582197788e-03 1.000000000000e-14 -1.520000000000e+01 -1.718357072951e-03 0.000000000000e+00 1.718357072941e-03 1.000000000000e-14 -1.540000000000e+01 -1.720068736226e-03 0.000000000000e+00 1.720068736216e-03 1.000000000000e-14 -1.560000000000e+01 -1.721720611925e-03 0.000000000000e+00 1.721720611915e-03 1.000000000000e-14 -1.580000000000e+01 -1.723315877812e-03 0.000000000000e+00 1.723315877802e-03 1.000000000000e-14 -1.600000000000e+01 -1.724857487058e-03 0.000000000000e+00 1.724857487048e-03 1.000000000000e-14 -1.620000000000e+01 -1.726348187875e-03 0.000000000000e+00 1.726348187865e-03 1.000000000000e-14 -1.640000000000e+01 -1.727790541120e-03 0.000000000000e+00 1.727790541110e-03 1.000000000000e-14 -1.660000000000e+01 -1.729186936100e-03 0.000000000000e+00 1.729186936090e-03 1.000000000000e-14 -1.680000000000e+01 -1.730539604802e-03 0.000000000000e+00 1.730539604792e-03 1.000000000000e-14 -1.700000000000e+01 -1.731850634727e-03 0.000000000000e+00 1.731850634717e-03 1.000000000000e-14 -1.720000000000e+01 -1.733121980475e-03 0.000000000000e+00 1.733121980465e-03 1.000000000000e-14 -1.740000000000e+01 -1.734355474231e-03 0.000000000000e+00 1.734355474221e-03 1.000000000000e-14 -1.760000000000e+01 -1.735552835273e-03 0.000000000000e+00 1.735552835263e-03 1.000000000000e-14 -1.780000000000e+01 -1.736715678597e-03 0.000000000000e+00 1.736715678587e-03 1.000000000000e-14 -1.800000000000e+01 -1.737845522767e-03 0.000000000000e+00 1.737845522757e-03 1.000000000000e-14 -1.820000000000e+01 -1.738943797058e-03 0.000000000000e+00 1.738943797048e-03 1.000000000000e-14 -1.840000000000e+01 -1.740011847972e-03 0.000000000000e+00 1.740011847962e-03 1.000000000000e-14 -1.860000000000e+01 -1.741050945191e-03 0.000000000000e+00 1.741050945181e-03 1.000000000000e-14 -1.880000000000e+01 -1.742062287018e-03 0.000000000000e+00 1.742062287008e-03 1.000000000000e-14 -1.900000000000e+01 -1.743047005364e-03 0.000000000000e+00 1.743047005354e-03 1.000000000000e-14 -1.920000000000e+01 -1.744006170319e-03 0.000000000000e+00 1.744006170309e-03 1.000000000000e-14 -1.940000000000e+01 -1.744940794347e-03 0.000000000000e+00 1.744940794337e-03 1.000000000000e-14 -1.960000000000e+01 -1.745851836145e-03 0.000000000000e+00 1.745851836135e-03 1.000000000000e-14 -1.980000000000e+01 -1.746740204193e-03 0.000000000000e+00 1.746740204183e-03 1.000000000000e-14 -2.000000000000e+01 -1.747606760028e-03 0.000000000000e+00 1.747606760018e-03 1.000000000000e-14 -1.000000000000e+00 -5.365285039166e-13 0.000000000000e+00 5.265284871785e-13 1.000000000000e-14 -1.200000000000e+00 -1.082389739903e-10 0.000000000000e+00 1.082289738644e-10 1.000000000000e-14 -1.400000000000e+00 -2.514326943219e-08 0.000000000000e+00 2.514325943238e-08 1.000000000000e-14 -1.600000000000e+00 -1.239009631393e-06 0.000000000000e+00 1.239009621393e-06 1.000000000000e-14 -1.800000000000e+00 -6.882375532055e-06 0.000000000000e+00 6.882375522055e-06 1.000000000000e-14 -2.000000000000e+00 -1.828470071777e-05 0.000000000000e+00 1.828470070777e-05 1.000000000000e-14 -2.200000000000e+00 -3.571166315255e-05 0.000000000000e+00 3.571166314256e-05 1.000000000000e-14 -2.400000000000e+00 -5.908888622995e-05 0.000000000000e+00 5.908888621995e-05 1.000000000000e-14 -2.600000000000e+00 -8.817404358866e-05 0.000000000000e+00 8.817404357866e-05 1.000000000000e-14 -2.800000000000e+00 -1.226395928533e-04 0.000000000000e+00 1.226395928433e-04 1.000000000000e-14 -3.000000000000e+00 -1.621221511157e-04 0.000000000000e+00 1.621221511057e-04 1.000000000000e-14 -3.200000000000e+00 -2.062516656204e-04 0.000000000000e+00 2.062516656104e-04 1.000000000000e-14 -3.400000000000e+00 -2.546675242244e-04 0.000000000000e+00 2.546675242144e-04 1.000000000000e-14 -3.600000000000e+00 -3.070265296082e-04 0.000000000000e+00 3.070265295982e-04 1.000000000000e-14 -3.800000000000e+00 -3.630059814995e-04 0.000000000000e+00 3.630059814895e-04 1.000000000000e-14 -4.000000000000e+00 -4.223038569664e-04 0.000000000000e+00 4.223038569564e-04 1.000000000000e-14 -4.200000000000e+00 -4.846372356463e-04 0.000000000000e+00 4.846372356363e-04 1.000000000000e-14 -4.400000000000e+00 -5.497395822661e-04 0.000000000000e+00 5.497395822561e-04 1.000000000000e-14 -4.600000000000e+00 -6.173571650441e-04 0.000000000000e+00 6.173571650341e-04 1.000000000000e-14 -4.800000000000e+00 -6.872446801392e-04 0.000000000000e+00 6.872446801292e-04 1.000000000000e-14 -5.000000000000e+00 -7.591600310368e-04 0.000000000000e+00 7.591600310268e-04 1.000000000000e-14 -5.200000000000e+00 -8.328581690295e-04 0.000000000000e+00 8.328581690195e-04 1.000000000000e-14 -5.400000000000e+00 -9.080839264475e-04 0.000000000000e+00 9.080839264375e-04 1.000000000000e-14 -5.600000000000e+00 -9.845637055398e-04 0.000000000000e+00 9.845637055298e-04 1.000000000000e-14 -5.800000000000e+00 -1.061866752697e-03 0.000000000000e+00 1.061866752687e-03 1.000000000000e-14 -6.000000000000e+00 -1.136292379839e-03 0.000000000000e+00 1.136292379829e-03 1.000000000000e-14 -6.200000000000e+00 -1.203615391325e-03 0.000000000000e+00 1.203615391315e-03 1.000000000000e-14 -6.400000000000e+00 -1.262478186586e-03 0.000000000000e+00 1.262478186576e-03 1.000000000000e-14 -6.600000000000e+00 -1.312855054190e-03 0.000000000000e+00 1.312855054180e-03 1.000000000000e-14 -6.800000000000e+00 -1.355541130549e-03 0.000000000000e+00 1.355541130539e-03 1.000000000000e-14 -7.000000000000e+00 -1.391667369079e-03 0.000000000000e+00 1.391667369069e-03 1.000000000000e-14 -7.200000000000e+00 -1.422372950212e-03 0.000000000000e+00 1.422372950202e-03 1.000000000000e-14 -7.400000000000e+00 -1.448657525792e-03 0.000000000000e+00 1.448657525782e-03 1.000000000000e-14 -7.600000000000e+00 -1.471344293358e-03 0.000000000000e+00 1.471344293348e-03 1.000000000000e-14 -7.800000000000e+00 -1.491092022426e-03 0.000000000000e+00 1.491092022416e-03 1.000000000000e-14 -8.000000000000e+00 -1.508422327071e-03 0.000000000000e+00 1.508422327061e-03 1.000000000000e-14 -8.200000000000e+00 -1.523747794103e-03 0.000000000000e+00 1.523747794093e-03 1.000000000000e-14 -8.400000000000e+00 -1.537396109016e-03 0.000000000000e+00 1.537396109006e-03 1.000000000000e-14 -8.600000000000e+00 -1.549629288758e-03 0.000000000000e+00 1.549629288748e-03 1.000000000000e-14 -8.800000000000e+00 -1.560658527200e-03 0.000000000000e+00 1.560658527190e-03 1.000000000000e-14 -9.000000000000e+00 -1.570655503606e-03 0.000000000000e+00 1.570655503596e-03 1.000000000000e-14 -9.200000000000e+00 -1.579760967978e-03 0.000000000000e+00 1.579760967968e-03 1.000000000000e-14 -9.400000000000e+00 -1.588091272371e-03 0.000000000000e+00 1.588091272361e-03 1.000000000000e-14 -9.600000000000e+00 -1.595743364730e-03 0.000000000000e+00 1.595743364720e-03 1.000000000000e-14 -9.800000000000e+00 -1.602798632805e-03 0.000000000000e+00 1.602798632795e-03 1.000000000000e-14 -1.000000000000e+01 -1.609325885252e-03 0.000000000000e+00 1.609325885242e-03 1.000000000000e-14 -1.020000000000e+01 -1.615383681896e-03 0.000000000000e+00 1.615383681886e-03 1.000000000000e-14 -1.040000000000e+01 -1.621022169730e-03 0.000000000000e+00 1.621022169720e-03 1.000000000000e-14 -1.060000000000e+01 -1.626284540863e-03 0.000000000000e+00 1.626284540853e-03 1.000000000000e-14 -1.080000000000e+01 -1.631208199065e-03 0.000000000000e+00 1.631208199055e-03 1.000000000000e-14 -1.100000000000e+01 -1.635825700008e-03 0.000000000000e+00 1.635825699998e-03 1.000000000000e-14 -1.120000000000e+01 -1.640165514422e-03 0.000000000000e+00 1.640165514412e-03 1.000000000000e-14 -1.140000000000e+01 -1.644252651659e-03 0.000000000000e+00 1.644252651649e-03 1.000000000000e-14 -1.160000000000e+01 -1.648109172436e-03 0.000000000000e+00 1.648109172426e-03 1.000000000000e-14 -1.180000000000e+01 -1.651754613007e-03 0.000000000000e+00 1.651754612997e-03 1.000000000000e-14 -1.200000000000e+01 -1.655206338067e-03 0.000000000000e+00 1.655206338057e-03 1.000000000000e-14 -1.220000000000e+01 -1.658479835957e-03 0.000000000000e+00 1.658479835947e-03 1.000000000000e-14 -1.240000000000e+01 -1.661588966878e-03 0.000000000000e+00 1.661588966868e-03 1.000000000000e-14 -1.260000000000e+01 -1.664546172619e-03 0.000000000000e+00 1.664546172609e-03 1.000000000000e-14 -1.280000000000e+01 -1.667362654575e-03 0.000000000000e+00 1.667362654565e-03 1.000000000000e-14 -1.300000000000e+01 -1.670048525535e-03 0.000000000000e+00 1.670048525525e-03 1.000000000000e-14 -1.320000000000e+01 -1.672612939626e-03 0.000000000000e+00 1.672612939616e-03 1.000000000000e-14 -1.340000000000e+01 -1.675064204018e-03 0.000000000000e+00 1.675064204008e-03 1.000000000000e-14 -1.360000000000e+01 -1.677409875301e-03 0.000000000000e+00 1.677409875291e-03 1.000000000000e-14 -1.380000000000e+01 -1.679656858073e-03 0.000000000000e+00 1.679656858063e-03 1.000000000000e-14 -1.400000000000e+01 -1.681811415039e-03 0.000000000000e+00 1.681811415029e-03 1.000000000000e-14 -1.420000000000e+01 -1.683879326989e-03 0.000000000000e+00 1.683879326979e-03 1.000000000000e-14 -1.440000000000e+01 -1.685865881307e-03 0.000000000000e+00 1.685865881297e-03 1.000000000000e-14 -1.460000000000e+01 -1.687775937771e-03 0.000000000000e+00 1.687775937761e-03 1.000000000000e-14 -1.480000000000e+01 -1.689613971246e-03 0.000000000000e+00 1.689613971236e-03 1.000000000000e-14 -1.500000000000e+01 -1.691384109310e-03 0.000000000000e+00 1.691384109300e-03 1.000000000000e-14 -1.520000000000e+01 -1.693090165535e-03 0.000000000000e+00 1.693090165525e-03 1.000000000000e-14 -1.540000000000e+01 -1.694735668998e-03 0.000000000000e+00 1.694735668988e-03 1.000000000000e-14 -1.560000000000e+01 -1.696323890510e-03 0.000000000000e+00 1.696323890500e-03 1.000000000000e-14 -1.580000000000e+01 -1.697857865983e-03 0.000000000000e+00 1.697857865973e-03 1.000000000000e-14 -1.600000000000e+01 -1.699340417294e-03 0.000000000000e+00 1.699340417284e-03 1.000000000000e-14 -1.620000000000e+01 -1.700774170951e-03 0.000000000000e+00 1.700774170941e-03 1.000000000000e-14 -1.640000000000e+01 -1.702161574839e-03 0.000000000000e+00 1.702161574829e-03 1.000000000000e-14 -1.660000000000e+01 -1.703504913256e-03 0.000000000000e+00 1.703504913246e-03 1.000000000000e-14 -1.680000000000e+01 -1.704806320452e-03 0.000000000000e+00 1.704806320442e-03 1.000000000000e-14 -1.700000000000e+01 -1.706067792843e-03 0.000000000000e+00 1.706067792833e-03 1.000000000000e-14 -1.720000000000e+01 -1.707291200037e-03 0.000000000000e+00 1.707291200027e-03 1.000000000000e-14 -1.740000000000e+01 -1.708478294825e-03 0.000000000000e+00 1.708478294815e-03 1.000000000000e-14 -1.760000000000e+01 -1.709630722227e-03 0.000000000000e+00 1.709630722217e-03 1.000000000000e-14 -1.780000000000e+01 -1.710750027715e-03 0.000000000000e+00 1.710750027705e-03 1.000000000000e-14 -1.800000000000e+01 -1.711837664685e-03 0.000000000000e+00 1.711837664675e-03 1.000000000000e-14 -1.820000000000e+01 -1.712895001267e-03 0.000000000000e+00 1.712895001257e-03 1.000000000000e-14 -1.840000000000e+01 -1.713923326534e-03 0.000000000000e+00 1.713923326524e-03 1.000000000000e-14 -1.860000000000e+01 -1.714923856178e-03 0.000000000000e+00 1.714923856168e-03 1.000000000000e-14 -1.880000000000e+01 -1.715897737694e-03 0.000000000000e+00 1.715897737684e-03 1.000000000000e-14 -1.900000000000e+01 -1.716846055138e-03 0.000000000000e+00 1.716846055128e-03 1.000000000000e-14 -1.920000000000e+01 -1.717769833485e-03 0.000000000000e+00 1.717769833475e-03 1.000000000000e-14 -1.940000000000e+01 -1.718670042629e-03 0.000000000000e+00 1.718670042619e-03 1.000000000000e-14 -1.960000000000e+01 -1.719547601069e-03 0.000000000000e+00 1.719547601059e-03 1.000000000000e-14 -1.980000000000e+01 -1.720403379292e-03 0.000000000000e+00 1.720403379282e-03 1.000000000000e-14 -2.000000000000e+01 -1.721238202897e-03 0.000000000000e+00 1.721238202887e-03 1.000000000000e-14 -1.000000000000e+00 -5.357945089160e-07 0.000000000000e+00 5.357944989161e-07 1.000000000000e-14 -1.200000000000e+00 -2.218783774902e-06 0.000000000000e+00 2.218783764902e-06 1.000000000000e-14 -1.400000000000e+00 -5.697625581108e-06 0.000000000000e+00 5.697625571108e-06 1.000000000000e-14 -1.600000000000e+00 -1.122524283726e-05 0.000000000000e+00 1.122524282726e-05 1.000000000000e-14 -1.800000000000e+00 -1.890479295028e-05 0.000000000000e+00 1.890479294028e-05 1.000000000000e-14 -2.000000000000e+00 -2.876969939016e-05 0.000000000000e+00 2.876969938016e-05 1.000000000000e-14 -2.200000000000e+00 -4.081490472781e-05 0.000000000000e+00 4.081490471781e-05 1.000000000000e-14 -2.400000000000e+00 -5.501170072140e-05 0.000000000000e+00 5.501170071140e-05 1.000000000000e-14 -2.600000000000e+00 -7.131609763068e-05 0.000000000000e+00 7.131609762068e-05 1.000000000000e-14 -2.800000000000e+00 -8.967413744959e-05 0.000000000000e+00 8.967413743959e-05 1.000000000000e-14 -3.000000000000e+00 -1.100255099686e-04 0.000000000000e+00 1.100255099586e-04 1.000000000000e-14 -3.200000000000e+00 -1.323061011615e-04 0.000000000000e+00 1.323061011515e-04 1.000000000000e-14 -3.400000000000e+00 -1.564498100768e-04 0.000000000000e+00 1.564498100668e-04 1.000000000000e-14 -3.600000000000e+00 -1.823898381733e-04 0.000000000000e+00 1.823898381633e-04 1.000000000000e-14 -3.800000000000e+00 -2.100595876457e-04 0.000000000000e+00 2.100595876357e-04 1.000000000000e-14 -4.000000000000e+00 -2.393932661905e-04 0.000000000000e+00 2.393932661805e-04 1.000000000000e-14 -4.200000000000e+00 -2.703262701966e-04 0.000000000000e+00 2.703262701866e-04 1.000000000000e-14 -4.400000000000e+00 -3.027954003526e-04 0.000000000000e+00 3.027954003426e-04 1.000000000000e-14 -4.600000000000e+00 -3.367389503996e-04 0.000000000000e+00 3.367389503896e-04 1.000000000000e-14 -4.800000000000e+00 -3.720966998928e-04 0.000000000000e+00 3.720966998828e-04 1.000000000000e-14 -5.000000000000e+00 -4.088098346058e-04 0.000000000000e+00 4.088098345958e-04 1.000000000000e-14 -5.200000000000e+00 -4.468208128758e-04 0.000000000000e+00 4.468208128658e-04 1.000000000000e-14 -5.400000000000e+00 -4.860731905910e-04 0.000000000000e+00 4.860731905810e-04 1.000000000000e-14 -5.600000000000e+00 -5.265113979405e-04 0.000000000000e+00 5.265113979305e-04 1.000000000000e-14 -5.800000000000e+00 -5.680803113220e-04 0.000000000000e+00 5.680803113120e-04 1.000000000000e-14 -6.000000000000e+00 -6.107229991333e-04 0.000000000000e+00 6.107229991233e-04 1.000000000000e-14 -6.200000000000e+00 -6.543604584356e-04 0.000000000000e+00 6.543604584256e-04 1.000000000000e-14 -6.400000000000e+00 -6.987850895276e-04 0.000000000000e+00 6.987850895176e-04 1.000000000000e-14 -6.600000000000e+00 -7.435938489822e-04 0.000000000000e+00 7.435938489722e-04 1.000000000000e-14 -6.800000000000e+00 -7.883646706265e-04 0.000000000000e+00 7.883646706165e-04 1.000000000000e-14 -7.000000000000e+00 -8.327099287884e-04 0.000000000000e+00 8.327099287784e-04 1.000000000000e-14 -7.200000000000e+00 -8.762555675722e-04 0.000000000000e+00 8.762555675622e-04 1.000000000000e-14 -7.400000000000e+00 -9.186421962722e-04 0.000000000000e+00 9.186421962622e-04 1.000000000000e-14 -7.600000000000e+00 -9.595404249648e-04 0.000000000000e+00 9.595404249548e-04 1.000000000000e-14 -7.800000000000e+00 -9.986703466724e-04 0.000000000000e+00 9.986703466624e-04 1.000000000000e-14 -8.000000000000e+00 -1.035818135988e-03 0.000000000000e+00 1.035818135978e-03 1.000000000000e-14 -8.200000000000e+00 -1.070845035754e-03 0.000000000000e+00 1.070845035744e-03 1.000000000000e-14 -8.400000000000e+00 -1.103687033933e-03 0.000000000000e+00 1.103687033923e-03 1.000000000000e-14 -8.600000000000e+00 -1.134346556383e-03 0.000000000000e+00 1.134346556373e-03 1.000000000000e-14 -8.800000000000e+00 -1.162879295908e-03 0.000000000000e+00 1.162879295898e-03 1.000000000000e-14 -9.000000000000e+00 -1.189379504304e-03 0.000000000000e+00 1.189379504294e-03 1.000000000000e-14 -9.200000000000e+00 -1.213966230537e-03 0.000000000000e+00 1.213966230527e-03 1.000000000000e-14 -9.400000000000e+00 -1.236771856760e-03 0.000000000000e+00 1.236771856750e-03 1.000000000000e-14 -9.600000000000e+00 -1.257933354232e-03 0.000000000000e+00 1.257933354222e-03 1.000000000000e-14 -9.800000000000e+00 -1.277586104190e-03 0.000000000000e+00 1.277586104180e-03 1.000000000000e-14 -1.000000000000e+01 -1.295859858327e-03 0.000000000000e+00 1.295859858317e-03 1.000000000000e-14 -1.020000000000e+01 -1.312876344509e-03 0.000000000000e+00 1.312876344499e-03 1.000000000000e-14 -1.040000000000e+01 -1.328748061329e-03 0.000000000000e+00 1.328748061319e-03 1.000000000000e-14 -1.060000000000e+01 -1.343577886373e-03 0.000000000000e+00 1.343577886363e-03 1.000000000000e-14 -1.080000000000e+01 -1.357459211562e-03 0.000000000000e+00 1.357459211552e-03 1.000000000000e-14 -1.100000000000e+01 -1.370476397822e-03 0.000000000000e+00 1.370476397812e-03 1.000000000000e-14 -1.120000000000e+01 -1.382705404764e-03 0.000000000000e+00 1.382705404754e-03 1.000000000000e-14 -1.140000000000e+01 -1.394214498967e-03 0.000000000000e+00 1.394214498957e-03 1.000000000000e-14 -1.160000000000e+01 -1.405064979015e-03 0.000000000000e+00 1.405064979005e-03 1.000000000000e-14 -1.180000000000e+01 -1.415311879531e-03 0.000000000000e+00 1.415311879521e-03 1.000000000000e-14 -1.200000000000e+01 -1.425004632780e-03 0.000000000000e+00 1.425004632770e-03 1.000000000000e-14 -1.220000000000e+01 -1.434187677118e-03 0.000000000000e+00 1.434187677108e-03 1.000000000000e-14 -1.240000000000e+01 -1.442901008405e-03 0.000000000000e+00 1.442901008395e-03 1.000000000000e-14 -1.260000000000e+01 -1.451180674692e-03 0.000000000000e+00 1.451180674682e-03 1.000000000000e-14 -1.280000000000e+01 -1.459059216922e-03 0.000000000000e+00 1.459059216912e-03 1.000000000000e-14 -1.300000000000e+01 -1.466566059655e-03 0.000000000000e+00 1.466566059645e-03 1.000000000000e-14 -1.320000000000e+01 -1.473727856407e-03 0.000000000000e+00 1.473727856397e-03 1.000000000000e-14 -1.340000000000e+01 -1.480568794264e-03 0.000000000000e+00 1.480568794254e-03 1.000000000000e-14 -1.360000000000e+01 -1.487110862297e-03 0.000000000000e+00 1.487110862287e-03 1.000000000000e-14 -1.380000000000e+01 -1.493374087995e-03 0.000000000000e+00 1.493374087985e-03 1.000000000000e-14 -1.400000000000e+01 -1.499376745562e-03 0.000000000000e+00 1.499376745552e-03 1.000000000000e-14 -1.420000000000e+01 -1.505135539521e-03 0.000000000000e+00 1.505135539511e-03 1.000000000000e-14 -1.440000000000e+01 -1.510665766705e-03 0.000000000000e+00 1.510665766695e-03 1.000000000000e-14 -1.460000000000e+01 -1.515981459329e-03 0.000000000000e+00 1.515981459319e-03 1.000000000000e-14 -1.480000000000e+01 -1.521095511520e-03 0.000000000000e+00 1.521095511510e-03 1.000000000000e-14 -1.500000000000e+01 -1.526019791373e-03 0.000000000000e+00 1.526019791363e-03 1.000000000000e-14 -1.520000000000e+01 -1.530765240342e-03 0.000000000000e+00 1.530765240332e-03 1.000000000000e-14 -1.540000000000e+01 -1.535341961539e-03 0.000000000000e+00 1.535341961529e-03 1.000000000000e-14 -1.560000000000e+01 -1.539759298304e-03 0.000000000000e+00 1.539759298294e-03 1.000000000000e-14 -1.580000000000e+01 -1.544025904241e-03 0.000000000000e+00 1.544025904231e-03 1.000000000000e-14 -1.600000000000e+01 -1.548149819694e-03 0.000000000000e+00 1.548149819684e-03 1.000000000000e-14 -1.620000000000e+01 -1.552138470403e-03 0.000000000000e+00 1.552138470393e-03 1.000000000000e-14 -1.640000000000e+01 -1.555998805863e-03 0.000000000000e+00 1.555998805853e-03 1.000000000000e-14 -1.660000000000e+01 -1.559737283746e-03 0.000000000000e+00 1.559737283736e-03 1.000000000000e-14 -1.680000000000e+01 -1.563359925893e-03 0.000000000000e+00 1.563359925883e-03 1.000000000000e-14 -1.700000000000e+01 -1.566872354713e-03 0.000000000000e+00 1.566872354703e-03 1.000000000000e-14 -1.720000000000e+01 -1.570279825994e-03 0.000000000000e+00 1.570279825984e-03 1.000000000000e-14 -1.740000000000e+01 -1.573587258537e-03 0.000000000000e+00 1.573587258527e-03 1.000000000000e-14 -1.760000000000e+01 -1.576799260968e-03 0.000000000000e+00 1.576799260958e-03 1.000000000000e-14 -1.780000000000e+01 -1.579920156035e-03 0.000000000000e+00 1.579920156025e-03 1.000000000000e-14 -1.800000000000e+01 -1.582954002643e-03 0.000000000000e+00 1.582954002633e-03 1.000000000000e-14 -1.820000000000e+01 -1.585904615895e-03 0.000000000000e+00 1.585904615885e-03 1.000000000000e-14 -1.840000000000e+01 -1.588775585319e-03 0.000000000000e+00 1.588775585309e-03 1.000000000000e-14 -1.860000000000e+01 -1.591570291483e-03 0.000000000000e+00 1.591570291473e-03 1.000000000000e-14 -1.880000000000e+01 -1.594291921159e-03 0.000000000000e+00 1.594291921149e-03 1.000000000000e-14 -1.900000000000e+01 -1.596943481179e-03 0.000000000000e+00 1.596943481169e-03 1.000000000000e-14 -1.920000000000e+01 -1.599527811117e-03 0.000000000000e+00 1.599527811107e-03 1.000000000000e-14 -1.940000000000e+01 -1.602047594902e-03 0.000000000000e+00 1.602047594892e-03 1.000000000000e-14 -1.960000000000e+01 -1.604505371478e-03 0.000000000000e+00 1.604505371468e-03 1.000000000000e-14 -1.980000000000e+01 -1.606903544592e-03 0.000000000000e+00 1.606903544582e-03 1.000000000000e-14 -2.000000000000e+01 -1.609244391796e-03 0.000000000000e+00 1.609244391786e-03 1.000000000000e-14 -1.000000000000e+00 -5.357942460286e-07 0.000000000000e+00 5.357942360289e-07 1.000000000000e-14 -1.200000000000e+00 -2.218780642620e-06 0.000000000000e+00 2.218780632620e-06 1.000000000000e-14 -1.400000000000e+00 -5.697610098855e-06 0.000000000000e+00 5.697610088855e-06 1.000000000000e-14 -1.600000000000e+00 -1.122519435755e-05 0.000000000000e+00 1.122519434755e-05 1.000000000000e-14 -1.800000000000e+00 -1.890467633683e-05 0.000000000000e+00 1.890467632684e-05 1.000000000000e-14 -2.000000000000e+00 -2.876946243925e-05 0.000000000000e+00 2.876946242925e-05 1.000000000000e-14 -2.200000000000e+00 -4.081447611100e-05 0.000000000000e+00 4.081447610100e-05 1.000000000000e-14 -2.400000000000e+00 -5.501098824849e-05 0.000000000000e+00 5.501098823849e-05 1.000000000000e-14 -2.600000000000e+00 -7.131498663132e-05 0.000000000000e+00 7.131498662132e-05 1.000000000000e-14 -2.800000000000e+00 -8.967248906789e-05 0.000000000000e+00 8.967248905789e-05 1.000000000000e-14 -3.000000000000e+00 -1.100231591593e-04 0.000000000000e+00 1.100231591493e-04 1.000000000000e-14 -3.200000000000e+00 -1.323028541665e-04 0.000000000000e+00 1.323028541565e-04 1.000000000000e-14 -3.400000000000e+00 -1.564454411419e-04 0.000000000000e+00 1.564454411319e-04 1.000000000000e-14 -3.600000000000e+00 -1.823840852376e-04 0.000000000000e+00 1.823840852276e-04 1.000000000000e-14 -3.800000000000e+00 -2.100521466912e-04 0.000000000000e+00 2.100521466812e-04 1.000000000000e-14 -4.000000000000e+00 -2.393837838813e-04 0.000000000000e+00 2.393837838713e-04 1.000000000000e-14 -4.200000000000e+00 -2.703143343664e-04 0.000000000000e+00 2.703143343564e-04 1.000000000000e-14 -4.400000000000e+00 -3.027805278126e-04 0.000000000000e+00 3.027805278026e-04 1.000000000000e-14 -4.600000000000e+00 -3.367205714489e-04 0.000000000000e+00 3.367205714389e-04 1.000000000000e-14 -4.800000000000e+00 -3.720741388265e-04 0.000000000000e+00 3.720741388165e-04 1.000000000000e-14 -5.000000000000e+00 -4.087822854523e-04 0.000000000000e+00 4.087822854423e-04 1.000000000000e-14 -5.200000000000e+00 -4.467873095384e-04 0.000000000000e+00 4.467873095284e-04 1.000000000000e-14 -5.400000000000e+00 -4.860325703188e-04 0.000000000000e+00 4.860325703088e-04 1.000000000000e-14 -5.600000000000e+00 -5.264622545012e-04 0.000000000000e+00 5.264622544912e-04 1.000000000000e-14 -5.800000000000e+00 -5.680209080512e-04 0.000000000000e+00 5.680209080412e-04 1.000000000000e-14 -6.000000000000e+00 -6.106508132854e-04 0.000000000000e+00 6.106508132754e-04 1.000000000000e-14 -6.200000000000e+00 -6.542680945317e-04 0.000000000000e+00 6.542680945217e-04 1.000000000000e-14 -6.400000000000e+00 -6.986459875914e-04 0.000000000000e+00 6.986459875814e-04 1.000000000000e-14 -6.600000000000e+00 -7.433645153293e-04 0.000000000000e+00 7.433645153193e-04 1.000000000000e-14 -6.800000000000e+00 -7.879952289118e-04 0.000000000000e+00 7.879952289018e-04 1.000000000000e-14 -7.000000000000e+00 -8.321431488672e-04 0.000000000000e+00 8.321431488572e-04 1.000000000000e-14 -7.200000000000e+00 -8.754267724534e-04 0.000000000000e+00 8.754267724434e-04 1.000000000000e-14 -7.400000000000e+00 -9.174816564829e-04 0.000000000000e+00 9.174816564729e-04 1.000000000000e-14 -7.600000000000e+00 -9.579775648411e-04 0.000000000000e+00 9.579775648311e-04 1.000000000000e-14 -7.800000000000e+00 -9.966388359696e-04 0.000000000000e+00 9.966388359596e-04 1.000000000000e-14 -8.000000000000e+00 -1.033260717111e-03 0.000000000000e+00 1.033260717101e-03 1.000000000000e-14 -8.200000000000e+00 -1.067717044584e-03 0.000000000000e+00 1.067717044574e-03 1.000000000000e-14 -8.400000000000e+00 -1.099958060404e-03 0.000000000000e+00 1.099958060394e-03 1.000000000000e-14 -8.600000000000e+00 -1.130000293325e-03 0.000000000000e+00 1.130000293315e-03 1.000000000000e-14 -8.800000000000e+00 -1.157912046552e-03 0.000000000000e+00 1.157912046542e-03 1.000000000000e-14 -9.000000000000e+00 -1.183797953141e-03 0.000000000000e+00 1.183797953131e-03 1.000000000000e-14 -9.200000000000e+00 -1.207785001188e-03 0.000000000000e+00 1.207785001178e-03 1.000000000000e-14 -9.400000000000e+00 -1.230011210566e-03 0.000000000000e+00 1.230011210556e-03 1.000000000000e-14 -9.600000000000e+00 -1.250617216663e-03 0.000000000000e+00 1.250617216653e-03 1.000000000000e-14 -9.800000000000e+00 -1.269740482789e-03 0.000000000000e+00 1.269740482779e-03 1.000000000000e-14 -1.000000000000e+01 -1.287511640567e-03 0.000000000000e+00 1.287511640557e-03 1.000000000000e-14 -1.020000000000e+01 -1.304052426441e-03 0.000000000000e+00 1.304052426431e-03 1.000000000000e-14 -1.040000000000e+01 -1.319474745157e-03 0.000000000000e+00 1.319474745147e-03 1.000000000000e-14 -1.060000000000e+01 -1.333880486272e-03 0.000000000000e+00 1.333880486262e-03 1.000000000000e-14 -1.080000000000e+01 -1.347361814774e-03 0.000000000000e+00 1.347361814764e-03 1.000000000000e-14 -1.100000000000e+01 -1.360001737897e-03 0.000000000000e+00 1.360001737887e-03 1.000000000000e-14 -1.120000000000e+01 -1.371874813365e-03 0.000000000000e+00 1.371874813355e-03 1.000000000000e-14 -1.140000000000e+01 -1.383047910992e-03 0.000000000000e+00 1.383047910982e-03 1.000000000000e-14 -1.160000000000e+01 -1.393580972507e-03 0.000000000000e+00 1.393580972497e-03 1.000000000000e-14 -1.180000000000e+01 -1.403527737101e-03 0.000000000000e+00 1.403527737091e-03 1.000000000000e-14 -1.200000000000e+01 -1.412936415195e-03 0.000000000000e+00 1.412936415185e-03 1.000000000000e-14 -1.220000000000e+01 -1.421850302629e-03 0.000000000000e+00 1.421850302619e-03 1.000000000000e-14 -1.240000000000e+01 -1.430308333484e-03 0.000000000000e+00 1.430308333474e-03 1.000000000000e-14 -1.260000000000e+01 -1.438345573365e-03 0.000000000000e+00 1.438345573355e-03 1.000000000000e-14 -1.280000000000e+01 -1.445993656924e-03 0.000000000000e+00 1.445993656914e-03 1.000000000000e-14 -1.300000000000e+01 -1.453281174384e-03 0.000000000000e+00 1.453281174374e-03 1.000000000000e-14 -1.320000000000e+01 -1.460234012137e-03 0.000000000000e+00 1.460234012127e-03 1.000000000000e-14 -1.340000000000e+01 -1.466875652434e-03 0.000000000000e+00 1.466875652424e-03 1.000000000000e-14 -1.360000000000e+01 -1.473227436900e-03 0.000000000000e+00 1.473227436890e-03 1.000000000000e-14 -1.380000000000e+01 -1.479308798231e-03 0.000000000000e+00 1.479308798221e-03 1.000000000000e-14 -1.400000000000e+01 -1.485137464003e-03 0.000000000000e+00 1.485137463993e-03 1.000000000000e-14 -1.420000000000e+01 -1.490729636091e-03 0.000000000000e+00 1.490729636081e-03 1.000000000000e-14 -1.440000000000e+01 -1.496100148771e-03 0.000000000000e+00 1.496100148761e-03 1.000000000000e-14 -1.460000000000e+01 -1.501262608231e-03 0.000000000000e+00 1.501262608221e-03 1.000000000000e-14 -1.480000000000e+01 -1.506229515842e-03 0.000000000000e+00 1.506229515832e-03 1.000000000000e-14 -1.500000000000e+01 -1.511012377245e-03 0.000000000000e+00 1.511012377235e-03 1.000000000000e-14 -1.520000000000e+01 -1.515621799042e-03 0.000000000000e+00 1.515621799032e-03 1.000000000000e-14 -1.540000000000e+01 -1.520067574656e-03 0.000000000000e+00 1.520067574646e-03 1.000000000000e-14 -1.560000000000e+01 -1.524358760685e-03 0.000000000000e+00 1.524358760675e-03 1.000000000000e-14 -1.580000000000e+01 -1.528503759895e-03 0.000000000000e+00 1.528503759885e-03 1.000000000000e-14 -1.600000000000e+01 -1.532510320488e-03 0.000000000000e+00 1.532510320478e-03 1.000000000000e-14 -1.620000000000e+01 -1.536385685137e-03 0.000000000000e+00 1.536385685127e-03 1.000000000000e-14 -1.640000000000e+01 -1.540136574579e-03 0.000000000000e+00 1.540136574569e-03 1.000000000000e-14 -1.660000000000e+01 -1.543769247978e-03 0.000000000000e+00 1.543769247968e-03 1.000000000000e-14 -1.680000000000e+01 -1.547289542134e-03 0.000000000000e+00 1.547289542124e-03 1.000000000000e-14 -1.700000000000e+01 -1.550702906772e-03 0.000000000000e+00 1.550702906762e-03 1.000000000000e-14 -1.720000000000e+01 -1.554014436346e-03 0.000000000000e+00 1.554014436336e-03 1.000000000000e-14 -1.740000000000e+01 -1.557228898773e-03 0.000000000000e+00 1.557228898763e-03 1.000000000000e-14 -1.760000000000e+01 -1.560350761426e-03 0.000000000000e+00 1.560350761416e-03 1.000000000000e-14 -1.780000000000e+01 -1.563384214669e-03 0.000000000000e+00 1.563384214659e-03 1.000000000000e-14 -1.800000000000e+01 -1.566333193228e-03 0.000000000000e+00 1.566333193218e-03 1.000000000000e-14 -1.820000000000e+01 -1.569201395598e-03 0.000000000000e+00 1.569201395588e-03 1.000000000000e-14 -1.840000000000e+01 -1.571992301710e-03 0.000000000000e+00 1.571992301700e-03 1.000000000000e-14 -1.860000000000e+01 -1.574709189028e-03 0.000000000000e+00 1.574709189018e-03 1.000000000000e-14 -1.880000000000e+01 -1.577355147242e-03 0.000000000000e+00 1.577355147232e-03 1.000000000000e-14 -1.900000000000e+01 -1.579933091689e-03 0.000000000000e+00 1.579933091679e-03 1.000000000000e-14 -1.920000000000e+01 -1.582445775639e-03 0.000000000000e+00 1.582445775629e-03 1.000000000000e-14 -1.940000000000e+01 -1.584895801546e-03 0.000000000000e+00 1.584895801536e-03 1.000000000000e-14 -1.960000000000e+01 -1.587285631377e-03 0.000000000000e+00 1.587285631367e-03 1.000000000000e-14 -1.980000000000e+01 -1.589617596089e-03 0.000000000000e+00 1.589617596079e-03 1.000000000000e-14 -2.000000000000e+01 -1.591893904352e-03 0.000000000000e+00 1.591893904342e-03 1.000000000000e-14 -1.000000000000e+00 -5.357939128897e-07 0.000000000000e+00 5.357939028897e-07 1.000000000000e-14 -1.200000000000e+00 -2.218776673295e-06 0.000000000000e+00 2.218776663295e-06 1.000000000000e-14 -1.400000000000e+00 -5.697590479269e-06 0.000000000000e+00 5.697590469269e-06 1.000000000000e-14 -1.600000000000e+00 -1.122513292234e-05 0.000000000000e+00 1.122513291234e-05 1.000000000000e-14 -1.800000000000e+00 -1.890452855885e-05 0.000000000000e+00 1.890452854885e-05 1.000000000000e-14 -2.000000000000e+00 -2.876916215949e-05 0.000000000000e+00 2.876916214949e-05 1.000000000000e-14 -2.200000000000e+00 -4.081393292720e-05 0.000000000000e+00 4.081393291720e-05 1.000000000000e-14 -2.400000000000e+00 -5.501008530627e-05 0.000000000000e+00 5.501008529627e-05 1.000000000000e-14 -2.600000000000e+00 -7.131357856129e-05 0.000000000000e+00 7.131357855129e-05 1.000000000000e-14 -2.800000000000e+00 -8.967039980618e-05 0.000000000000e+00 8.967039979618e-05 1.000000000000e-14 -3.000000000000e+00 -1.100201793809e-04 0.000000000000e+00 1.100201793709e-04 1.000000000000e-14 -3.200000000000e+00 -1.322987380468e-04 0.000000000000e+00 1.322987380368e-04 1.000000000000e-14 -3.400000000000e+00 -1.564399021382e-04 0.000000000000e+00 1.564399021282e-04 1.000000000000e-14 -3.600000000000e+00 -1.823767905415e-04 0.000000000000e+00 1.823767905315e-04 1.000000000000e-14 -3.800000000000e+00 -2.100427099457e-04 0.000000000000e+00 2.100427099357e-04 1.000000000000e-14 -4.000000000000e+00 -2.393717556794e-04 0.000000000000e+00 2.393717556694e-04 1.000000000000e-14 -4.200000000000e+00 -2.702991899486e-04 0.000000000000e+00 2.702991899386e-04 1.000000000000e-14 -4.400000000000e+00 -3.027616512687e-04 0.000000000000e+00 3.027616512587e-04 1.000000000000e-14 -4.600000000000e+00 -3.366972356037e-04 0.000000000000e+00 3.366972355937e-04 1.000000000000e-14 -4.800000000000e+00 -3.720454798758e-04 0.000000000000e+00 3.720454798658e-04 1.000000000000e-14 -5.000000000000e+00 -4.087472713174e-04 0.000000000000e+00 4.087472713074e-04 1.000000000000e-14 -5.200000000000e+00 -4.467447008360e-04 0.000000000000e+00 4.467447008260e-04 1.000000000000e-14 -5.400000000000e+00 -4.859808724638e-04 0.000000000000e+00 4.859808724538e-04 1.000000000000e-14 -5.600000000000e+00 -5.263996556853e-04 0.000000000000e+00 5.263996556753e-04 1.000000000000e-14 -5.800000000000e+00 -5.679451582988e-04 0.000000000000e+00 5.679451582888e-04 1.000000000000e-14 -6.000000000000e+00 -6.105585384320e-04 0.000000000000e+00 6.105585384220e-04 1.000000000000e-14 -6.200000000000e+00 -6.541486584379e-04 0.000000000000e+00 6.541486584279e-04 1.000000000000e-14 -6.400000000000e+00 -6.984627267056e-04 0.000000000000e+00 6.984627266956e-04 1.000000000000e-14 -6.600000000000e+00 -7.430605001953e-04 0.000000000000e+00 7.430605001853e-04 1.000000000000e-14 -6.800000000000e+00 -7.875054566096e-04 0.000000000000e+00 7.875054565996e-04 1.000000000000e-14 -7.000000000000e+00 -8.313930072946e-04 0.000000000000e+00 8.313930072846e-04 1.000000000000e-14 -7.200000000000e+00 -8.743324038954e-04 0.000000000000e+00 8.743324038854e-04 1.000000000000e-14 -7.400000000000e+00 -9.159535314757e-04 0.000000000000e+00 9.159535314657e-04 1.000000000000e-14 -7.600000000000e+00 -9.559263033847e-04 0.000000000000e+00 9.559263033747e-04 1.000000000000e-14 -7.800000000000e+00 -9.939819415139e-04 0.000000000000e+00 9.939819415039e-04 1.000000000000e-14 -8.000000000000e+00 -1.029928651271e-03 0.000000000000e+00 1.029928651261e-03 1.000000000000e-14 -8.200000000000e+00 -1.063657334142e-03 0.000000000000e+00 1.063657334132e-03 1.000000000000e-14 -8.400000000000e+00 -1.095136868589e-03 0.000000000000e+00 1.095136868579e-03 1.000000000000e-14 -8.600000000000e+00 -1.124401687584e-03 0.000000000000e+00 1.124401687574e-03 1.000000000000e-14 -8.800000000000e+00 -1.151535682591e-03 0.000000000000e+00 1.151535682581e-03 1.000000000000e-14 -9.000000000000e+00 -1.176655989032e-03 0.000000000000e+00 1.176655989022e-03 1.000000000000e-14 -9.200000000000e+00 -1.199898893436e-03 0.000000000000e+00 1.199898893426e-03 1.000000000000e-14 -9.400000000000e+00 -1.221408800673e-03 0.000000000000e+00 1.221408800663e-03 1.000000000000e-14 -9.600000000000e+00 -1.241330301528e-03 0.000000000000e+00 1.241330301518e-03 1.000000000000e-14 -9.800000000000e+00 -1.259802913888e-03 0.000000000000e+00 1.259802913878e-03 1.000000000000e-14 -1.000000000000e+01 -1.276957912655e-03 0.000000000000e+00 1.276957912645e-03 1.000000000000e-14 -1.020000000000e+01 -1.292916679024e-03 0.000000000000e+00 1.292916679014e-03 1.000000000000e-14 -1.040000000000e+01 -1.307790091273e-03 0.000000000000e+00 1.307790091263e-03 1.000000000000e-14 -1.060000000000e+01 -1.321678589383e-03 0.000000000000e+00 1.321678589373e-03 1.000000000000e-14 -1.080000000000e+01 -1.334672647056e-03 0.000000000000e+00 1.334672647046e-03 1.000000000000e-14 -1.100000000000e+01 -1.346853466981e-03 0.000000000000e+00 1.346853466971e-03 1.000000000000e-14 -1.120000000000e+01 -1.358293777211e-03 0.000000000000e+00 1.358293777201e-03 1.000000000000e-14 -1.140000000000e+01 -1.369058651070e-03 0.000000000000e+00 1.369058651060e-03 1.000000000000e-14 -1.160000000000e+01 -1.379206303797e-03 0.000000000000e+00 1.379206303787e-03 1.000000000000e-14 -1.180000000000e+01 -1.388788839741e-03 0.000000000000e+00 1.388788839731e-03 1.000000000000e-14 -1.200000000000e+01 -1.397852937306e-03 0.000000000000e+00 1.397852937296e-03 1.000000000000e-14 -1.220000000000e+01 -1.406440467217e-03 0.000000000000e+00 1.406440467207e-03 1.000000000000e-14 -1.240000000000e+01 -1.414589044790e-03 0.000000000000e+00 1.414589044780e-03 1.000000000000e-14 -1.260000000000e+01 -1.422332519701e-03 0.000000000000e+00 1.422332519691e-03 1.000000000000e-14 -1.280000000000e+01 -1.429701408252e-03 0.000000000000e+00 1.429701408242e-03 1.000000000000e-14 -1.300000000000e+01 -1.436723273682e-03 0.000000000000e+00 1.436723273672e-03 1.000000000000e-14 -1.320000000000e+01 -1.443423060157e-03 0.000000000000e+00 1.443423060147e-03 1.000000000000e-14 -1.340000000000e+01 -1.449823385798e-03 0.000000000000e+00 1.449823385788e-03 1.000000000000e-14 -1.360000000000e+01 -1.455944799717e-03 0.000000000000e+00 1.455944799707e-03 1.000000000000e-14 -1.380000000000e+01 -1.461806007553e-03 0.000000000000e+00 1.461806007543e-03 1.000000000000e-14 -1.400000000000e+01 -1.467424069506e-03 0.000000000000e+00 1.467424069496e-03 1.000000000000e-14 -1.420000000000e+01 -1.472814574406e-03 0.000000000000e+00 1.472814574396e-03 1.000000000000e-14 -1.440000000000e+01 -1.477991792910e-03 0.000000000000e+00 1.477991792900e-03 1.000000000000e-14 -1.460000000000e+01 -1.482968812523e-03 0.000000000000e+00 1.482968812513e-03 1.000000000000e-14 -1.480000000000e+01 -1.487757656780e-03 0.000000000000e+00 1.487757656770e-03 1.000000000000e-14 -1.500000000000e+01 -1.492369390634e-03 0.000000000000e+00 1.492369390624e-03 1.000000000000e-14 -1.520000000000e+01 -1.496814213797e-03 0.000000000000e+00 1.496814213787e-03 1.000000000000e-14 -1.540000000000e+01 -1.501101543563e-03 0.000000000000e+00 1.501101543553e-03 1.000000000000e-14 -1.560000000000e+01 -1.505240088429e-03 0.000000000000e+00 1.505240088419e-03 1.000000000000e-14 -1.580000000000e+01 -1.509237927831e-03 0.000000000000e+00 1.509237927821e-03 1.000000000000e-14 -1.600000000000e+01 -1.513102512405e-03 0.000000000000e+00 1.513102512395e-03 1.000000000000e-14 -1.620000000000e+01 -1.516840806037e-03 0.000000000000e+00 1.516840806027e-03 1.000000000000e-14 -1.640000000000e+01 -1.520459271048e-03 0.000000000000e+00 1.520459271038e-03 1.000000000000e-14 -1.660000000000e+01 -1.523963926029e-03 0.000000000000e+00 1.523963926019e-03 1.000000000000e-14 -1.680000000000e+01 -1.527360383574e-03 0.000000000000e+00 1.527360383564e-03 1.000000000000e-14 -1.700000000000e+01 -1.530653884209e-03 0.000000000000e+00 1.530653884199e-03 1.000000000000e-14 -1.720000000000e+01 -1.533849326985e-03 0.000000000000e+00 1.533849326975e-03 1.000000000000e-14 -1.740000000000e+01 -1.536951297107e-03 0.000000000000e+00 1.536951297097e-03 1.000000000000e-14 -1.760000000000e+01 -1.539964090917e-03 0.000000000000e+00 1.539964090907e-03 1.000000000000e-14 -1.780000000000e+01 -1.542891738522e-03 0.000000000000e+00 1.542891738512e-03 1.000000000000e-14 -1.800000000000e+01 -1.545738024333e-03 0.000000000000e+00 1.545738024323e-03 1.000000000000e-14 -1.820000000000e+01 -1.548506505718e-03 0.000000000000e+00 1.548506505708e-03 1.000000000000e-14 -1.840000000000e+01 -1.551200529980e-03 0.000000000000e+00 1.551200529970e-03 1.000000000000e-14 -1.860000000000e+01 -1.553823249823e-03 0.000000000000e+00 1.553823249813e-03 1.000000000000e-14 -1.880000000000e+01 -1.556377637475e-03 0.000000000000e+00 1.556377637465e-03 1.000000000000e-14 -1.900000000000e+01 -1.558866497579e-03 0.000000000000e+00 1.558866497569e-03 1.000000000000e-14 -1.920000000000e+01 -1.561292479002e-03 0.000000000000e+00 1.561292478992e-03 1.000000000000e-14 -1.940000000000e+01 -1.563658085644e-03 0.000000000000e+00 1.563658085634e-03 1.000000000000e-14 -1.960000000000e+01 -1.565965686360e-03 0.000000000000e+00 1.565965686350e-03 1.000000000000e-14 -1.980000000000e+01 -1.568217524069e-03 0.000000000000e+00 1.568217524059e-03 1.000000000000e-14 -2.000000000000e+01 -1.570415724135e-03 0.000000000000e+00 1.570415724125e-03 1.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_conqs.standard0000644000265600020320000000754412264261473024177 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 3.98797884724456e-14 3.56552536555798e-14 2.56292058605836e-15 1258.925411794 3.98797884724531e-14 3.5655253655588e-14 2.56292058605871e-15 1584.893192461 3.98797884724457e-14 3.56552536555673e-14 2.56292058605901e-15 1995.262314969 3.98797884724309e-14 3.56552536555515e-14 2.56292058605876e-15 2511.88643151 3.98797884724135e-14 3.56552536555218e-14 2.56292058605817e-15 3162.277660168 3.98797884724062e-14 3.56552536554979e-14 2.5629205860589e-15 3981.071705535 3.98797884723668e-14 3.56552536554312e-14 2.56292058605868e-15 5011.872336273 3.98797884723183e-14 3.56552536553405e-14 2.56292058605843e-15 6309.573444802 3.98797884722252e-14 3.56552536551915e-14 2.56292058605748e-15 7943.282347243 3.98797884721085e-14 3.56552536549574e-14 2.5629205860583e-15 10000 3.98797884718886e-14 3.56552536545771e-14 2.56292058605836e-15 12589.25411794 3.98797884715682e-14 3.56552536539698e-14 2.56292058605871e-15 15848.93192461 3.98797884710398e-14 3.56552536530267e-14 2.562920586058e-15 19952.62314969 3.98797884702054e-14 3.56552536515153e-14 2.56292058605796e-15 25118.8643151 3.98797884688843e-14 3.56552536491224e-14 2.56292058605754e-15 31622.77660168 3.98797884668146e-14 3.56552536453515e-14 2.5629205860579e-15 39810.71705535 3.98797884635037e-14 3.56552536393521e-14 2.56292058605668e-15 50118.72336273 3.98797884582506e-14 3.56552536298408e-14 2.56292058605588e-15 63095.73444802 3.98797884499773e-14 3.56552536148073e-14 2.56292058605496e-15 79432.82347243 3.98797884368043e-14 3.56552535909411e-14 2.56292058605228e-15 100000 3.98797884159615e-14 3.56552535531158e-14 2.56292058604881e-15 125892.5411794 3.98797883829216e-14 3.56552534931746e-14 2.56292058604228e-15 158489.3192461 3.98797883305522e-14 3.56552533981809e-14 2.5629205860319e-15 199526.2314969 3.98797882475374e-14 3.565525324761e-14 2.56292058601649e-15 251188.643151 3.9879788115984e-14 3.56552530089826e-14 2.56292058599164e-15 316227.7660168 3.98797879075061e-14 3.56552526308001e-14 2.56292058595422e-15 398107.1705535 3.98797875770574e-14 3.56552520314004e-14 2.56292058589237e-15 501187.2336273 3.98797870533517e-14 3.56552510814233e-14 2.56292058579485e-15 630957.3444802 3.98797862233223e-14 3.56552495758073e-14 2.56292058564128e-15 794328.2347243 3.98797849078096e-14 3.56552471895452e-14 2.56292058539709e-15 1000000 3.98797828228748e-14 3.56552434076089e-14 2.56292058500953e-15 1258925.411794 3.98797795184774e-14 3.56552374136413e-14 2.56292058439627e-15 1584893.192461 3.98797742813451e-14 3.56552279138393e-14 2.56292058342399e-15 1995262.314969 3.98797659810508e-14 3.5655212857665e-14 2.56292058188299e-15 2511886.43151 3.98797528259996e-14 3.56551889952629e-14 2.56292057944078e-15 3162277.660168 3.98797319766779e-14 3.56551511759564e-14 2.5629205755713e-15 3981071.705535 3.98796989327729e-14 3.56550912364836e-14 2.56292056943666e-15 5011872.336273 3.98796465618441e-14 3.56549962390983e-14 2.56292055971463e-15 6309573.444802 3.98795635599129e-14 3.56548456790138e-14 2.56292054430612e-15 7943282.347243 3.98794320116298e-14 3.56546070590392e-14 2.56292051988601e-15 10000000 3.98792235239161e-14 3.56542288760157e-14 2.56292048118003e-15 12589254.11794 3.98788930989133e-14 3.56536295067674e-14 2.56292041983624e-15 15848931.92461 3.98783694250216e-14 3.56526795967207e-14 2.5629203226092e-15 19952623.14969 3.98775394941062e-14 3.56511741566022e-14 2.56292016850625e-15 25118864.3151 3.98762242333969e-14 3.56487883601912e-14 2.56291992425034e-15 31622776.60168 3.98741399145547e-14 3.56450075430645e-14 2.56291953708438e-15 39810717.05535 3.98708370665939e-14 3.56390163948199e-14 2.56291892334524e-15 50118723.36273 3.98656038486992e-14 3.56295236839883e-14 2.56291795033113e-15 63095734.44802 3.98573133809052e-14 3.56144853269175e-14 2.56291640744573e-15 79432823.47243 3.98441829691394e-14 3.55906676402144e-14 2.5629139602225e-15 100000000 3.98233954813468e-14 3.55529605480909e-14 2.56291007683624e-15 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_nover.standard0000644000265600020320000000754712264261473024210 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 5.21886152951445e-14 3.95899259661593e-14 1.27848932886954e-14 1258.925411794 5.21886152951497e-14 3.95899259661683e-14 1.27848932887014e-14 1584.893192461 5.21886152951452e-14 3.95899259661664e-14 1.27848932886989e-14 1995.262314969 5.21886152951292e-14 3.95899259661619e-14 1.27848932886933e-14 2511.88643151 5.21886152951221e-14 3.95899259661562e-14 1.27848932886905e-14 3162.277660168 5.21886152951216e-14 3.95899259661598e-14 1.27848932886941e-14 3981.071705535 5.21886152951271e-14 3.95899259661501e-14 1.27848932886894e-14 5011.872336273 5.21886152951097e-14 3.95899259661358e-14 1.27848932886851e-14 6309.573444802 5.21886152951038e-14 3.9589925966124e-14 1.27848932886784e-14 7943.282347243 5.21886152950719e-14 3.95899259661144e-14 1.27848932886673e-14 10000 5.2188615295049e-14 3.95899259660639e-14 1.27848932886525e-14 12589.25411794 5.2188615294998e-14 3.95899259660166e-14 1.27848932886255e-14 15848.93192461 5.21886152949042e-14 3.95899259659254e-14 1.27848932885885e-14 19952.62314969 5.21886152947544e-14 3.9589925965787e-14 1.27848932885178e-14 25118.8643151 5.21886152945202e-14 3.95899259655606e-14 1.27848932884181e-14 31622.77660168 5.21886152941654e-14 3.95899259652186e-14 1.27848932882562e-14 39810.71705535 5.21886152936079e-14 3.95899259646589e-14 1.27848932879938e-14 50118.72336273 5.21886152926963e-14 3.95899259637859e-14 1.27848932875831e-14 63095.73444802 5.21886152912949e-14 3.95899259623908e-14 1.27848932869354e-14 79432.82347243 5.21886152890409e-14 3.95899259601635e-14 1.27848932859042e-14 100000 5.21886152854679e-14 3.95899259566578e-14 1.27848932842725e-14 125892.5411794 5.21886152798274e-14 3.95899259510989e-14 1.2784893281685e-14 158489.3192461 5.21886152708637e-14 3.95899259422865e-14 1.27848932775825e-14 199526.2314969 5.21886152566579e-14 3.95899259283127e-14 1.27848932710808e-14 251188.643151 5.21886152341501e-14 3.95899259061726e-14 1.27848932607801e-14 316227.7660168 5.21886151984895e-14 3.9589925871098e-14 1.27848932444547e-14 398107.1705535 5.21886151419717e-14 3.95899258154854e-14 1.27848932185761e-14 501187.2336273 5.218861505237e-14 3.95899257273656e-14 1.27848931775659e-14 630957.3444802 5.21886149103819e-14 3.95899255876829e-14 1.27848931125644e-14 794328.2347243 5.21886146853436e-14 3.95899253663041e-14 1.27848930095459e-14 1000000 5.21886143286761e-14 3.95899250154473e-14 1.27848928462749e-14 1258925.411794 5.21886137634044e-14 3.95899244593785e-14 1.27848925875058e-14 1584893.192461 5.21886128675022e-14 3.95899235780588e-14 1.27848921773812e-14 1995262.314969 5.21886114475798e-14 3.95899221812689e-14 1.27848915273868e-14 2511886.43151 5.21886091971656e-14 3.95899199674986e-14 1.27848904972008e-14 3162277.660168 5.21886056305037e-14 3.95899164589414e-14 1.27848888644795e-14 3981071.705535 5.21885999777491e-14 3.95899108982224e-14 1.27848862767871e-14 5011872.336273 5.21885910187263e-14 3.95899020850778e-14 1.27848821755732e-14 6309573.444802 5.21885768196581e-14 3.95898881172262e-14 1.27848756755934e-14 7943282.347243 5.21885543156495e-14 3.9589865979697e-14 1.27848653738324e-14 10000000 5.21885186492762e-14 3.95898308941583e-14 1.27848490466786e-14 12589254.11794 5.21884621221084e-14 3.9589775287507e-14 1.27848231699685e-14 15848931.92461 5.21883725330463e-14 3.95896871573712e-14 1.27847821583755e-14 19952623.14969 5.21882305451652e-14 3.95895474817149e-14 1.27847171599346e-14 25118864.3151 5.21880055126098e-14 3.95893261137393e-14 1.27846141457468e-14 31622776.60168 5.21876488677526e-14 3.95889752767354e-14 1.27844508827953e-14 39810717.05535 5.2187083643088e-14 3.95884192565517e-14 1.27841921373004e-14 50118723.36273 5.21861878709316e-14 3.95875380717241e-14 1.27837820755618e-14 63095734.44802 5.21847682896836e-14 3.95861416078955e-14 1.27831322273415e-14 79432823.47243 5.21825187113838e-14 3.95839286632291e-14 1.27821024275534e-14 100000000 5.21789541393562e-14 3.95804221390429e-14 1.27804706570378e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Id1_vb0.standard0000644000265600020320000024357112264261473024267 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.700338152218e-04 0.000000000000e+00 1.700338152208e-04 1.000000000000e-15 -1.200000000000e+00 -2.002449295933e-04 0.000000000000e+00 2.002449295921e-04 1.200000000000e-15 -1.400000000000e+00 -2.292889362665e-04 0.000000000000e+00 2.292889362651e-04 1.400000000000e-15 -1.600000000000e+00 -2.572064231495e-04 0.000000000000e+00 2.572064231479e-04 1.600000000000e-15 -1.800000000000e+00 -2.840369441377e-04 0.000000000000e+00 2.840369441359e-04 1.800000000000e-15 -2.000000000000e+00 -3.098189162758e-04 0.000000000000e+00 3.098189162738e-04 2.000000000000e-15 -2.200000000000e+00 -3.345895332168e-04 0.000000000000e+00 3.345895332146e-04 2.200000000000e-15 -2.400000000000e+00 -3.583847358318e-04 0.000000000000e+00 3.583847358294e-04 2.400000000000e-15 -2.600000000000e+00 -3.812391719848e-04 0.000000000000e+00 3.812391719822e-04 2.600000000000e-15 -2.800000000000e+00 -4.031861945801e-04 0.000000000000e+00 4.031861945773e-04 2.800000000000e-15 -3.000000000000e+00 -4.242578714327e-04 0.000000000000e+00 4.242578714297e-04 3.000000000000e-15 -3.200000000000e+00 -4.444850081007e-04 0.000000000000e+00 4.444850080975e-04 3.200000000000e-15 -3.400000000000e+00 -4.638971809323e-04 0.000000000000e+00 4.638971809289e-04 3.400000000000e-15 -3.600000000000e+00 -4.825227779285e-04 0.000000000000e+00 4.825227779249e-04 3.600000000000e-15 -3.800000000000e+00 -5.003890453719e-04 0.000000000000e+00 5.003890453681e-04 3.800000000000e-15 -4.000000000000e+00 -5.175221384880e-04 0.000000000000e+00 5.175221384840e-04 4.000000000000e-15 -4.200000000000e+00 -5.339471746949e-04 0.000000000000e+00 5.339471746907e-04 4.200000000000e-15 -4.400000000000e+00 -5.496882882548e-04 0.000000000000e+00 5.496882882504e-04 4.400000000000e-15 -4.600000000000e+00 -5.647686853559e-04 0.000000000000e+00 5.647686853513e-04 4.600000000000e-15 -4.800000000000e+00 -5.792106988433e-04 0.000000000000e+00 5.792106988385e-04 4.800000000000e-15 -5.000000000000e+00 -5.930358419738e-04 0.000000000000e+00 5.930358419688e-04 5.000000000000e-15 -5.200000000000e+00 -6.062648543899e-04 0.000000000000e+00 6.062648543847e-04 5.200000000000e-15 -5.400000000000e+00 -6.189177772934e-04 0.000000000000e+00 6.189177772880e-04 5.400000000000e-15 -5.600000000000e+00 -6.310139653940e-04 0.000000000000e+00 6.310139653884e-04 5.600000000000e-15 -5.800000000000e+00 -6.425721564349e-04 0.000000000000e+00 6.425721564291e-04 5.800000000000e-15 -6.000000000000e+00 -6.536105087527e-04 0.000000000000e+00 6.536105087467e-04 6.000000000000e-15 -6.200000000000e+00 -6.641466419087e-04 0.000000000000e+00 6.641466419025e-04 6.200000000000e-15 -6.400000000000e+00 -6.741976745373e-04 0.000000000000e+00 6.741976745309e-04 6.400000000000e-15 -6.600000000000e+00 -6.837802593410e-04 0.000000000000e+00 6.837802593344e-04 6.600000000000e-15 -6.800000000000e+00 -6.929106151855e-04 0.000000000000e+00 6.929106151787e-04 6.800000000000e-15 -7.000000000000e+00 -7.016045562654e-04 0.000000000000e+00 7.016045562584e-04 7.000000000000e-15 -7.200000000000e+00 -7.098775183222e-04 0.000000000000e+00 7.098775183150e-04 7.200000000000e-15 -7.400000000000e+00 -7.177445819122e-04 0.000000000000e+00 7.177445819048e-04 7.400000000000e-15 -7.600000000000e+00 -7.252204927356e-04 0.000000000000e+00 7.252204927280e-04 7.600000000000e-15 -7.800000000000e+00 -7.323196790495e-04 0.000000000000e+00 7.323196790417e-04 7.800000000000e-15 -8.000000000000e+00 -7.390562662112e-04 0.000000000000e+00 7.390562662032e-04 8.000000000000e-15 -8.200000000000e+00 -7.454440955302e-04 0.000000000000e+00 7.454440955220e-04 8.200000000000e-15 -8.400000000000e+00 -7.514967044839e-04 0.000000000000e+00 7.514967044755e-04 8.400000000000e-15 -8.600000000000e+00 -7.572273768310e-04 0.000000000000e+00 7.572273768224e-04 8.600000000000e-15 -8.800000000000e+00 -7.626491171501e-04 0.000000000000e+00 7.626491171413e-04 8.800000000000e-15 -9.000000000000e+00 -7.677746599610e-04 0.000000000000e+00 7.677746599520e-04 9.000000000000e-15 -9.200000000000e+00 -7.726164693737e-04 0.000000000000e+00 7.726164693645e-04 9.200000000000e-15 -9.400000000000e+00 -7.771867369218e-04 0.000000000000e+00 7.771867369124e-04 9.400000000000e-15 -9.600000000000e+00 -7.814973778609e-04 0.000000000000e+00 7.814973778513e-04 9.600000000000e-15 -9.800000000000e+00 -7.855600262255e-04 0.000000000000e+00 7.855600262157e-04 9.800000000000e-15 -1.000000000000e+01 -7.893860289549e-04 0.000000000000e+00 7.893860289449e-04 1.000000000000e-14 -1.020000000000e+01 -7.929864394060e-04 0.000000000000e+00 7.929864393958e-04 1.020000000000e-14 -1.040000000000e+01 -7.963720105699e-04 0.000000000000e+00 7.963720105595e-04 1.040000000000e-14 -1.060000000000e+01 -7.995531882948e-04 0.000000000000e+00 7.995531882842e-04 1.060000000000e-14 -1.080000000000e+01 -8.025401048019e-04 0.000000000000e+00 8.025401047911e-04 1.080000000000e-14 -1.100000000000e+01 -8.053425727518e-04 0.000000000000e+00 8.053425727408e-04 1.100000000000e-14 -1.120000000000e+01 -8.079700800840e-04 0.000000000000e+00 8.079700800728e-04 1.120000000000e-14 -1.140000000000e+01 -8.104317858174e-04 0.000000000000e+00 8.104317858060e-04 1.140000000000e-14 -1.160000000000e+01 -8.127365169545e-04 0.000000000000e+00 8.127365169429e-04 1.160000000000e-14 -1.180000000000e+01 -8.148927665944e-04 0.000000000000e+00 8.148927665826e-04 1.180000000000e-14 -1.200000000000e+01 -8.169086933161e-04 0.000000000000e+00 8.169086933041e-04 1.200000000000e-14 -1.220000000000e+01 -8.187921218577e-04 0.000000000000e+00 8.187921218455e-04 1.220000000000e-14 -1.240000000000e+01 -8.205505450804e-04 0.000000000000e+00 8.205505450680e-04 1.240000000000e-14 -1.260000000000e+01 -8.221911271774e-04 0.000000000000e+00 8.221911271648e-04 1.260000000000e-14 -1.280000000000e+01 -8.237207080629e-04 0.000000000000e+00 8.237207080501e-04 1.280000000000e-14 -1.300000000000e+01 -8.251458088562e-04 0.000000000000e+00 8.251458088432e-04 1.300000000000e-14 -1.320000000000e+01 -8.264726383597e-04 0.000000000000e+00 8.264726383465e-04 1.320000000000e-14 -1.340000000000e+01 -8.277071004234e-04 0.000000000000e+00 8.277071004100e-04 1.340000000000e-14 -1.360000000000e+01 -8.288548020775e-04 0.000000000000e+00 8.288548020639e-04 1.360000000000e-14 -1.380000000000e+01 -8.299210623189e-04 0.000000000000e+00 8.299210623051e-04 1.380000000000e-14 -1.400000000000e+01 -8.309109214340e-04 0.000000000000e+00 8.309109214200e-04 1.400000000000e-14 -1.420000000000e+01 -8.318291507463e-04 0.000000000000e+00 8.318291507321e-04 1.420000000000e-14 -1.440000000000e+01 -8.326802626849e-04 0.000000000000e+00 8.326802626705e-04 1.440000000000e-14 -1.460000000000e+01 -8.334685210737e-04 0.000000000000e+00 8.334685210591e-04 1.460000000000e-14 -1.480000000000e+01 -8.341979515540e-04 0.000000000000e+00 8.341979515392e-04 1.480000000000e-14 -1.500000000000e+01 -8.348723520593e-04 0.000000000000e+00 8.348723520443e-04 1.500000000000e-14 -1.520000000000e+01 -8.354953032733e-04 0.000000000000e+00 8.354953032581e-04 1.520000000000e-14 -1.540000000000e+01 -8.360701790083e-04 0.000000000000e+00 8.360701789929e-04 1.540000000000e-14 -1.560000000000e+01 -8.366001564546e-04 0.000000000000e+00 8.366001564390e-04 1.560000000000e-14 -1.580000000000e+01 -8.370882262588e-04 0.000000000000e+00 8.370882262430e-04 1.580000000000e-14 -1.600000000000e+01 -8.375372023964e-04 0.000000000000e+00 8.375372023804e-04 1.600000000000e-14 -1.620000000000e+01 -8.379497318166e-04 0.000000000000e+00 8.379497318004e-04 1.620000000000e-14 -1.640000000000e+01 -8.383283038411e-04 0.000000000000e+00 8.383283038247e-04 1.640000000000e-14 -1.660000000000e+01 -8.386752593106e-04 0.000000000000e+00 8.386752592940e-04 1.660000000000e-14 -1.680000000000e+01 -8.389927994793e-04 0.000000000000e+00 8.389927994625e-04 1.680000000000e-14 -1.700000000000e+01 -8.392829946651e-04 0.000000000000e+00 8.392829946481e-04 1.700000000000e-14 -1.720000000000e+01 -8.395477926744e-04 0.000000000000e+00 8.395477926572e-04 1.720000000000e-14 -1.740000000000e+01 -8.397890270294e-04 0.000000000000e+00 8.397890270120e-04 1.740000000000e-14 -1.760000000000e+01 -8.400084250358e-04 0.000000000000e+00 8.400084250182e-04 1.760000000000e-14 -1.780000000000e+01 -8.402076157440e-04 0.000000000000e+00 8.402076157262e-04 1.780000000000e-14 -1.800000000000e+01 -8.403881378719e-04 0.000000000000e+00 8.403881378539e-04 1.800000000000e-14 -1.820000000000e+01 -8.405514477759e-04 0.000000000000e+00 8.405514477577e-04 1.820000000000e-14 -1.840000000000e+01 -8.406989275807e-04 0.000000000000e+00 8.406989275623e-04 1.840000000000e-14 -1.860000000000e+01 -8.408318936013e-04 0.000000000000e+00 8.408318935827e-04 1.860000000000e-14 -1.880000000000e+01 -8.409516052188e-04 0.000000000000e+00 8.409516052000e-04 1.880000000000e-14 -1.900000000000e+01 -8.410592743826e-04 0.000000000000e+00 8.410592743636e-04 1.900000000000e-14 -1.920000000000e+01 -8.411560758953e-04 0.000000000000e+00 8.411560758761e-04 1.920000000000e-14 -1.940000000000e+01 -8.412431585244e-04 0.000000000000e+00 8.412431585050e-04 1.940000000000e-14 -1.960000000000e+01 -8.413216566196e-04 0.000000000000e+00 8.413216566000e-04 1.960000000000e-14 -1.980000000000e+01 -8.413927008951e-04 0.000000000000e+00 8.413927008753e-04 1.980000000000e-14 -2.000000000000e+01 -8.414574245562e-04 0.000000000000e+00 8.414574245362e-04 2.000000000000e-14 -1.000000000000e+00 -1.690562704907e-04 0.000000000000e+00 1.690562704897e-04 1.000000000000e-15 -1.200000000000e+00 -1.991007760484e-04 0.000000000000e+00 1.991007760472e-04 1.200000000000e-15 -1.400000000000e+00 -2.279882272534e-04 0.000000000000e+00 2.279882272520e-04 1.400000000000e-15 -1.600000000000e+00 -2.557592404941e-04 0.000000000000e+00 2.557592404925e-04 1.600000000000e-15 -1.800000000000e+00 -2.824533423519e-04 0.000000000000e+00 2.824533423501e-04 1.800000000000e-15 -2.000000000000e+00 -3.081088759929e-04 0.000000000000e+00 3.081088759909e-04 2.000000000000e-15 -2.200000000000e+00 -3.327629216033e-04 0.000000000000e+00 3.327629216011e-04 2.200000000000e-15 -2.400000000000e+00 -3.564512749179e-04 0.000000000000e+00 3.564512749155e-04 2.400000000000e-15 -2.600000000000e+00 -3.792084116335e-04 0.000000000000e+00 3.792084116309e-04 2.600000000000e-15 -2.800000000000e+00 -4.010674902789e-04 0.000000000000e+00 4.010674902761e-04 2.800000000000e-15 -3.000000000000e+00 -4.220603658359e-04 0.000000000000e+00 4.220603658329e-04 3.000000000000e-15 -3.200000000000e+00 -4.422176156113e-04 0.000000000000e+00 4.422176156081e-04 3.200000000000e-15 -3.400000000000e+00 -4.615685747227e-04 0.000000000000e+00 4.615685747193e-04 3.400000000000e-15 -3.600000000000e+00 -4.801413789074e-04 0.000000000000e+00 4.801413789038e-04 3.600000000000e-15 -3.800000000000e+00 -4.979630126944e-04 0.000000000000e+00 4.979630126906e-04 3.800000000000e-15 -4.000000000000e+00 -5.150593612884e-04 0.000000000000e+00 5.150593612844e-04 4.000000000000e-15 -4.200000000000e+00 -5.314552647926e-04 0.000000000000e+00 5.314552647884e-04 4.200000000000e-15 -4.400000000000e+00 -5.471745736414e-04 0.000000000000e+00 5.471745736370e-04 4.400000000000e-15 -4.600000000000e+00 -5.622402043244e-04 0.000000000000e+00 5.622402043198e-04 4.600000000000e-15 -4.800000000000e+00 -5.766741946614e-04 0.000000000000e+00 5.766741946566e-04 4.800000000000e-15 -5.000000000000e+00 -5.904977580403e-04 0.000000000000e+00 5.904977580353e-04 5.000000000000e-15 -5.200000000000e+00 -6.037313300913e-04 0.000000000000e+00 6.037313300861e-04 5.200000000000e-15 -5.400000000000e+00 -6.163946432931e-04 0.000000000000e+00 6.163946432877e-04 5.400000000000e-15 -5.600000000000e+00 -6.285067408988e-04 0.000000000000e+00 6.285067408932e-04 5.600000000000e-15 -5.800000000000e+00 -6.400860459234e-04 0.000000000000e+00 6.400860459176e-04 5.800000000000e-15 -6.000000000000e+00 -6.511503994785e-04 0.000000000000e+00 6.511503994725e-04 6.000000000000e-15 -6.200000000000e+00 -6.617171019745e-04 0.000000000000e+00 6.617171019683e-04 6.200000000000e-15 -6.400000000000e+00 -6.718029515954e-04 0.000000000000e+00 6.718029515890e-04 6.400000000000e-15 -6.600000000000e+00 -6.814242799829e-04 0.000000000000e+00 6.814242799763e-04 6.600000000000e-15 -6.800000000000e+00 -6.905969850866e-04 0.000000000000e+00 6.905969850798e-04 6.800000000000e-15 -7.000000000000e+00 -6.993365611495e-04 0.000000000000e+00 6.993365611425e-04 7.000000000000e-15 -7.200000000000e+00 -7.076581258136e-04 0.000000000000e+00 7.076581258064e-04 7.200000000000e-15 -7.400000000000e+00 -7.155764443385e-04 0.000000000000e+00 7.155764443311e-04 7.400000000000e-15 -7.600000000000e+00 -7.231059509384e-04 0.000000000000e+00 7.231059509308e-04 7.600000000000e-15 -7.800000000000e+00 -7.302607672565e-04 0.000000000000e+00 7.302607672487e-04 7.800000000000e-15 -8.000000000000e+00 -7.370547180102e-04 0.000000000000e+00 7.370547180022e-04 8.000000000000e-15 -8.200000000000e+00 -7.435013510597e-04 0.000000000000e+00 7.435013510515e-04 8.200000000000e-15 -8.400000000000e+00 -7.496139184490e-04 0.000000000000e+00 7.496139184406e-04 8.400000000000e-15 -8.600000000000e+00 -7.554054281132e-04 0.000000000000e+00 7.554054281046e-04 8.600000000000e-15 -8.800000000000e+00 -7.608886192589e-04 0.000000000000e+00 7.608886192501e-04 8.800000000000e-15 -9.000000000000e+00 -7.660759726260e-04 0.000000000000e+00 7.660759726170e-04 9.000000000000e-15 -9.200000000000e+00 -7.709797111460e-04 0.000000000000e+00 7.709797111368e-04 9.200000000000e-15 -9.400000000000e+00 -7.756117986976e-04 0.000000000000e+00 7.756117986882e-04 9.400000000000e-15 -9.600000000000e+00 -7.799839372157e-04 0.000000000000e+00 7.799839372061e-04 9.600000000000e-15 -9.800000000000e+00 -7.841075624305e-04 0.000000000000e+00 7.841075624207e-04 9.800000000000e-15 -1.000000000000e+01 -7.879938385298e-04 0.000000000000e+00 7.879938385198e-04 1.000000000000e-14 -1.020000000000e+01 -7.916536520507e-04 0.000000000000e+00 7.916536520405e-04 1.020000000000e-14 -1.040000000000e+01 -7.950976053074e-04 0.000000000000e+00 7.950976052970e-04 1.040000000000e-14 -1.060000000000e+01 -7.983360096583e-04 0.000000000000e+00 7.983360096477e-04 1.060000000000e-14 -1.080000000000e+01 -8.013788788974e-04 0.000000000000e+00 8.013788788866e-04 1.080000000000e-14 -1.100000000000e+01 -8.042359230357e-04 0.000000000000e+00 8.042359230247e-04 1.100000000000e-14 -1.120000000000e+01 -8.069165427076e-04 0.000000000000e+00 8.069165426964e-04 1.120000000000e-14 -1.140000000000e+01 -8.094298244012e-04 0.000000000000e+00 8.094298243898e-04 1.140000000000e-14 -1.160000000000e+01 -8.117845366774e-04 0.000000000000e+00 8.117845366658e-04 1.160000000000e-14 -1.180000000000e+01 -8.139891274981e-04 0.000000000000e+00 8.139891274863e-04 1.180000000000e-14 -1.200000000000e+01 -8.160517227487e-04 0.000000000000e+00 8.160517227367e-04 1.200000000000e-14 -1.220000000000e+01 -8.179801259989e-04 0.000000000000e+00 8.179801259867e-04 1.220000000000e-14 -1.240000000000e+01 -8.197818195124e-04 0.000000000000e+00 8.197818195000e-04 1.240000000000e-14 -1.260000000000e+01 -8.214639664832e-04 0.000000000000e+00 8.214639664706e-04 1.260000000000e-14 -1.280000000000e+01 -8.230334144522e-04 0.000000000000e+00 8.230334144394e-04 1.280000000000e-14 -1.300000000000e+01 -8.244966998317e-04 0.000000000000e+00 8.244966998187e-04 1.300000000000e-14 -1.320000000000e+01 -8.258600534530e-04 0.000000000000e+00 8.258600534398e-04 1.320000000000e-14 -1.340000000000e+01 -8.271294070362e-04 0.000000000000e+00 8.271294070228e-04 1.340000000000e-14 -1.360000000000e+01 -8.283104004748e-04 0.000000000000e+00 8.283104004612e-04 1.360000000000e-14 -1.380000000000e+01 -8.294083898265e-04 0.000000000000e+00 8.294083898127e-04 1.380000000000e-14 -1.400000000000e+01 -8.304284558942e-04 0.000000000000e+00 8.304284558802e-04 1.400000000000e-14 -1.420000000000e+01 -8.313754132929e-04 0.000000000000e+00 8.313754132787e-04 1.420000000000e-14 -1.440000000000e+01 -8.322538198930e-04 0.000000000000e+00 8.322538198786e-04 1.440000000000e-14 -1.460000000000e+01 -8.330679865459e-04 0.000000000000e+00 8.330679865313e-04 1.460000000000e-14 -1.480000000000e+01 -8.338219869973e-04 0.000000000000e+00 8.338219869825e-04 1.480000000000e-14 -1.500000000000e+01 -8.345196679090e-04 0.000000000000e+00 8.345196678940e-04 1.500000000000e-14 -1.520000000000e+01 -8.351646589137e-04 0.000000000000e+00 8.351646588985e-04 1.520000000000e-14 -1.540000000000e+01 -8.357603826393e-04 0.000000000000e+00 8.357603826239e-04 1.540000000000e-14 -1.560000000000e+01 -8.363100646481e-04 0.000000000000e+00 8.363100646325e-04 1.560000000000e-14 -1.580000000000e+01 -8.368167432434e-04 0.000000000000e+00 8.368167432276e-04 1.580000000000e-14 -1.600000000000e+01 -8.372832791077e-04 0.000000000000e+00 8.372832790917e-04 1.600000000000e-14 -1.620000000000e+01 -8.377123647424e-04 0.000000000000e+00 8.377123647262e-04 1.620000000000e-14 -1.640000000000e+01 -8.381065336895e-04 0.000000000000e+00 8.381065336731e-04 1.640000000000e-14 -1.660000000000e+01 -8.384681695212e-04 0.000000000000e+00 8.384681695046e-04 1.660000000000e-14 -1.680000000000e+01 -8.387995145949e-04 0.000000000000e+00 8.387995145781e-04 1.680000000000e-14 -1.700000000000e+01 -8.391026785745e-04 0.000000000000e+00 8.391026785575e-04 1.700000000000e-14 -1.720000000000e+01 -8.393796467326e-04 0.000000000000e+00 8.393796467154e-04 1.720000000000e-14 -1.740000000000e+01 -8.396322880527e-04 0.000000000000e+00 8.396322880353e-04 1.740000000000e-14 -1.760000000000e+01 -8.398623631639e-04 0.000000000000e+00 8.398623631463e-04 1.760000000000e-14 -1.780000000000e+01 -8.400715321510e-04 0.000000000000e+00 8.400715321332e-04 1.780000000000e-14 -1.800000000000e+01 -8.402613622980e-04 0.000000000000e+00 8.402613622800e-04 1.800000000000e-14 -1.820000000000e+01 -8.404333358386e-04 0.000000000000e+00 8.404333358204e-04 1.820000000000e-14 -1.840000000000e+01 -8.405888578092e-04 0.000000000000e+00 8.405888577908e-04 1.840000000000e-14 -1.860000000000e+01 -8.407292641220e-04 0.000000000000e+00 8.407292641034e-04 1.860000000000e-14 -1.880000000000e+01 -8.408558300021e-04 0.000000000000e+00 8.408558299833e-04 1.880000000000e-14 -1.900000000000e+01 -8.409697789525e-04 0.000000000000e+00 8.409697789335e-04 1.900000000000e-14 -1.920000000000e+01 -8.410722924162e-04 0.000000000000e+00 8.410722923970e-04 1.920000000000e-14 -1.940000000000e+01 -8.411645202554e-04 0.000000000000e+00 8.411645202360e-04 1.940000000000e-14 -1.960000000000e+01 -8.412475919752e-04 0.000000000000e+00 8.412475919556e-04 1.960000000000e-14 -1.980000000000e+01 -8.413226280476e-04 0.000000000000e+00 8.413226280278e-04 1.980000000000e-14 -2.000000000000e+01 -8.413907491763e-04 0.000000000000e+00 8.413907491563e-04 2.000000000000e-14 -1.000000000000e+00 -1.678673419746e-04 0.000000000000e+00 1.678673419736e-04 1.000000000000e-15 -1.200000000000e+00 -1.977080132770e-04 0.000000000000e+00 1.977080132758e-04 1.200000000000e-15 -1.400000000000e+00 -2.264034839815e-04 0.000000000000e+00 2.264034839801e-04 1.400000000000e-15 -1.600000000000e+00 -2.539944228223e-04 0.000000000000e+00 2.539944228207e-04 1.600000000000e-15 -1.800000000000e+00 -2.805203432036e-04 0.000000000000e+00 2.805203432018e-04 1.800000000000e-15 -2.000000000000e+00 -3.060195203907e-04 0.000000000000e+00 3.060195203887e-04 2.000000000000e-15 -2.200000000000e+00 -3.305289199241e-04 0.000000000000e+00 3.305289199219e-04 2.200000000000e-15 -2.400000000000e+00 -3.540841856248e-04 0.000000000000e+00 3.540841856224e-04 2.400000000000e-15 -2.600000000000e+00 -3.767196092488e-04 0.000000000000e+00 3.767196092462e-04 2.600000000000e-15 -2.800000000000e+00 -3.984681390186e-04 0.000000000000e+00 3.984681390158e-04 2.800000000000e-15 -3.000000000000e+00 -4.193613976109e-04 0.000000000000e+00 4.193613976079e-04 3.000000000000e-15 -3.200000000000e+00 -4.394297115563e-04 0.000000000000e+00 4.394297115531e-04 3.200000000000e-15 -3.400000000000e+00 -4.587021495502e-04 0.000000000000e+00 4.587021495468e-04 3.400000000000e-15 -3.600000000000e+00 -4.772065675014e-04 0.000000000000e+00 4.772065674978e-04 3.600000000000e-15 -3.800000000000e+00 -4.949696584676e-04 0.000000000000e+00 4.949696584638e-04 3.800000000000e-15 -4.000000000000e+00 -5.120170059219e-04 0.000000000000e+00 5.120170059179e-04 4.000000000000e-15 -4.200000000000e+00 -5.283731390574e-04 0.000000000000e+00 5.283731390532e-04 4.200000000000e-15 -4.400000000000e+00 -5.440615890723e-04 0.000000000000e+00 5.440615890679e-04 4.400000000000e-15 -4.600000000000e+00 -5.591049455766e-04 0.000000000000e+00 5.591049455720e-04 4.600000000000e-15 -4.800000000000e+00 -5.735249124309e-04 0.000000000000e+00 5.735249124261e-04 4.800000000000e-15 -5.000000000000e+00 -5.873423624699e-04 0.000000000000e+00 5.873423624649e-04 5.000000000000e-15 -5.200000000000e+00 -6.005773906829e-04 0.000000000000e+00 6.005773906777e-04 5.200000000000e-15 -5.400000000000e+00 -6.132493592910e-04 0.000000000000e+00 6.132493592856e-04 5.400000000000e-15 -5.600000000000e+00 -6.253769713542e-04 0.000000000000e+00 6.253769713486e-04 5.600000000000e-15 -5.800000000000e+00 -6.369782816973e-04 0.000000000000e+00 6.369782816915e-04 5.800000000000e-15 -6.000000000000e+00 -6.480707646923e-04 0.000000000000e+00 6.480707646863e-04 6.000000000000e-15 -6.200000000000e+00 -6.586713503342e-04 0.000000000000e+00 6.586713503280e-04 6.200000000000e-15 -6.400000000000e+00 -6.687964633751e-04 0.000000000000e+00 6.687964633687e-04 6.400000000000e-15 -6.600000000000e+00 -6.784620597476e-04 0.000000000000e+00 6.784620597410e-04 6.600000000000e-15 -6.800000000000e+00 -6.876836602381e-04 0.000000000000e+00 6.876836602313e-04 6.800000000000e-15 -7.000000000000e+00 -6.964763813853e-04 0.000000000000e+00 6.964763813783e-04 7.000000000000e-15 -7.200000000000e+00 -7.048549635857e-04 0.000000000000e+00 7.048549635785e-04 7.200000000000e-15 -7.400000000000e+00 -7.128337964010e-04 0.000000000000e+00 7.128337963936e-04 7.400000000000e-15 -7.600000000000e+00 -7.204269410676e-04 0.000000000000e+00 7.204269410600e-04 7.600000000000e-15 -7.800000000000e+00 -7.276481502201e-04 0.000000000000e+00 7.276481502123e-04 7.800000000000e-15 -8.000000000000e+00 -7.345108848538e-04 0.000000000000e+00 7.345108848458e-04 8.000000000000e-15 -8.200000000000e+00 -7.410283358217e-04 0.000000000000e+00 7.410283358135e-04 8.200000000000e-15 -8.400000000000e+00 -7.472134060807e-04 0.000000000000e+00 7.472134060723e-04 8.400000000000e-15 -8.600000000000e+00 -7.530787640901e-04 0.000000000000e+00 7.530787640815e-04 8.600000000000e-15 -8.800000000000e+00 -7.586368204679e-04 0.000000000000e+00 7.586368204591e-04 8.800000000000e-15 -9.000000000000e+00 -7.638997396742e-04 0.000000000000e+00 7.638997396652e-04 9.000000000000e-15 -9.200000000000e+00 -7.688794420051e-04 0.000000000000e+00 7.688794419959e-04 9.200000000000e-15 -9.400000000000e+00 -7.735876035977e-04 0.000000000000e+00 7.735876035883e-04 9.400000000000e-15 -9.600000000000e+00 -7.780356546778e-04 0.000000000000e+00 7.780356546682e-04 9.600000000000e-15 -9.800000000000e+00 -7.822347762972e-04 0.000000000000e+00 7.822347762874e-04 9.800000000000e-15 -1.000000000000e+01 -7.861958958336e-04 0.000000000000e+00 7.861958958236e-04 1.000000000000e-14 -1.020000000000e+01 -7.899296815391e-04 0.000000000000e+00 7.899296815289e-04 1.020000000000e-14 -1.040000000000e+01 -7.934465364296e-04 0.000000000000e+00 7.934465364192e-04 1.040000000000e-14 -1.060000000000e+01 -7.967565918103e-04 0.000000000000e+00 7.967565917997e-04 1.060000000000e-14 -1.080000000000e+01 -7.998697007207e-04 0.000000000000e+00 7.998697007099e-04 1.080000000000e-14 -1.100000000000e+01 -8.027954315660e-04 0.000000000000e+00 8.027954315550e-04 1.100000000000e-14 -1.120000000000e+01 -8.055430621820e-04 0.000000000000e+00 8.055430621708e-04 1.120000000000e-14 -1.140000000000e+01 -8.081215745445e-04 0.000000000000e+00 8.081215745331e-04 1.140000000000e-14 -1.160000000000e+01 -8.105396503074e-04 0.000000000000e+00 8.105396502958e-04 1.160000000000e-14 -1.180000000000e+01 -8.128056673117e-04 0.000000000000e+00 8.128056672999e-04 1.180000000000e-14 -1.200000000000e+01 -8.149276971735e-04 0.000000000000e+00 8.149276971615e-04 1.200000000000e-14 -1.220000000000e+01 -8.169135040196e-04 0.000000000000e+00 8.169135040074e-04 1.220000000000e-14 -1.240000000000e+01 -8.187705444067e-04 0.000000000000e+00 8.187705443943e-04 1.240000000000e-14 -1.260000000000e+01 -8.205059684254e-04 0.000000000000e+00 8.205059684128e-04 1.260000000000e-14 -1.280000000000e+01 -8.221266219634e-04 0.000000000000e+00 8.221266219506e-04 1.280000000000e-14 -1.300000000000e+01 -8.236390500779e-04 0.000000000000e+00 8.236390500649e-04 1.300000000000e-14 -1.320000000000e+01 -8.250495014075e-04 0.000000000000e+00 8.250495013943e-04 1.320000000000e-14 -1.340000000000e+01 -8.263639335394e-04 0.000000000000e+00 8.263639335260e-04 1.340000000000e-14 -1.360000000000e+01 -8.275880192360e-04 0.000000000000e+00 8.275880192224e-04 1.360000000000e-14 -1.380000000000e+01 -8.287271534201e-04 0.000000000000e+00 8.287271534063e-04 1.380000000000e-14 -1.400000000000e+01 -8.297864608135e-04 0.000000000000e+00 8.297864607995e-04 1.400000000000e-14 -1.420000000000e+01 -8.307708041241e-04 0.000000000000e+00 8.307708041099e-04 1.420000000000e-14 -1.440000000000e+01 -8.316847926797e-04 0.000000000000e+00 8.316847926653e-04 1.440000000000e-14 -1.460000000000e+01 -8.325327914118e-04 0.000000000000e+00 8.325327913972e-04 1.460000000000e-14 -1.480000000000e+01 -8.333189300957e-04 0.000000000000e+00 8.333189300809e-04 1.480000000000e-14 -1.500000000000e+01 -8.340471127651e-04 0.000000000000e+00 8.340471127501e-04 1.500000000000e-14 -1.520000000000e+01 -8.347210272239e-04 0.000000000000e+00 8.347210272087e-04 1.520000000000e-14 -1.540000000000e+01 -8.353441545871e-04 0.000000000000e+00 8.353441545717e-04 1.540000000000e-14 -1.560000000000e+01 -8.359197787917e-04 0.000000000000e+00 8.359197787761e-04 1.560000000000e-14 -1.580000000000e+01 -8.364509960279e-04 0.000000000000e+00 8.364509960121e-04 1.580000000000e-14 -1.600000000000e+01 -8.369407240464e-04 0.000000000000e+00 8.369407240304e-04 1.600000000000e-14 -1.620000000000e+01 -8.373917113093e-04 0.000000000000e+00 8.373917112931e-04 1.620000000000e-14 -1.640000000000e+01 -8.378065459577e-04 0.000000000000e+00 8.378065459413e-04 1.640000000000e-14 -1.660000000000e+01 -8.381876645785e-04 0.000000000000e+00 8.381876645619e-04 1.660000000000e-14 -1.680000000000e+01 -8.385373607588e-04 0.000000000000e+00 8.385373607420e-04 1.680000000000e-14 -1.700000000000e+01 -8.388577934257e-04 0.000000000000e+00 8.388577934087e-04 1.700000000000e-14 -1.720000000000e+01 -8.391509949767e-04 0.000000000000e+00 8.391509949595e-04 1.720000000000e-14 -1.740000000000e+01 -8.394188792141e-04 0.000000000000e+00 8.394188791967e-04 1.740000000000e-14 -1.760000000000e+01 -8.396632491046e-04 0.000000000000e+00 8.396632490870e-04 1.760000000000e-14 -1.780000000000e+01 -8.398858044002e-04 0.000000000000e+00 8.398858043824e-04 1.780000000000e-14 -1.800000000000e+01 -8.400881491625e-04 0.000000000000e+00 8.400881491445e-04 1.800000000000e-14 -1.820000000000e+01 -8.402717992522e-04 0.000000000000e+00 8.402717992340e-04 1.820000000000e-14 -1.840000000000e+01 -8.404381898600e-04 0.000000000000e+00 8.404381898416e-04 1.840000000000e-14 -1.860000000000e+01 -8.405886831772e-04 0.000000000000e+00 8.405886831586e-04 1.860000000000e-14 -1.880000000000e+01 -8.407245763269e-04 0.000000000000e+00 8.407245763081e-04 1.880000000000e-14 -1.900000000000e+01 -8.408471097017e-04 0.000000000000e+00 8.408471096827e-04 1.900000000000e-14 -1.920000000000e+01 -8.409574758706e-04 0.000000000000e+00 8.409574758514e-04 1.920000000000e-14 -1.940000000000e+01 -8.410568292130e-04 0.000000000000e+00 8.410568291936e-04 1.940000000000e-14 -1.960000000000e+01 -8.411462963631e-04 0.000000000000e+00 8.411462963435e-04 1.960000000000e-14 -1.980000000000e+01 -8.412269872948e-04 0.000000000000e+00 8.412269872750e-04 1.980000000000e-14 -2.000000000000e+01 -8.413000061442e-04 0.000000000000e+00 8.413000061242e-04 2.000000000000e-14 -1.000000000000e+00 -2.171043080276e-04 0.000000000000e+00 2.171043080266e-04 1.000000000000e-15 -1.200000000000e+00 -2.556417701162e-04 0.000000000000e+00 2.556417701150e-04 1.200000000000e-15 -1.400000000000e+00 -2.927103244660e-04 0.000000000000e+00 2.927103244646e-04 1.400000000000e-15 -1.600000000000e+00 -3.283738842500e-04 0.000000000000e+00 3.283738842484e-04 1.600000000000e-15 -1.800000000000e+00 -3.626938774197e-04 0.000000000000e+00 3.626938774179e-04 1.800000000000e-15 -2.000000000000e+00 -3.957291456694e-04 0.000000000000e+00 3.957291456674e-04 2.000000000000e-15 -2.200000000000e+00 -4.275358951102e-04 0.000000000000e+00 4.275358951080e-04 2.200000000000e-15 -2.400000000000e+00 -4.581676892835e-04 0.000000000000e+00 4.581676892811e-04 2.400000000000e-15 -2.600000000000e+00 -4.876754805332e-04 0.000000000000e+00 4.876754805306e-04 2.600000000000e-15 -2.800000000000e+00 -5.161076437800e-04 0.000000000000e+00 5.161076437772e-04 2.800000000000e-15 -3.000000000000e+00 -5.435100811419e-04 0.000000000000e+00 5.435100811389e-04 3.000000000000e-15 -3.200000000000e+00 -5.699262863846e-04 0.000000000000e+00 5.699262863814e-04 3.200000000000e-15 -3.400000000000e+00 -5.953974484840e-04 0.000000000000e+00 5.953974484806e-04 3.400000000000e-15 -3.600000000000e+00 -6.199625550447e-04 0.000000000000e+00 6.199625550411e-04 3.600000000000e-15 -3.800000000000e+00 -6.436584989837e-04 0.000000000000e+00 6.436584989799e-04 3.800000000000e-15 -4.000000000000e+00 -6.665201862065e-04 0.000000000000e+00 6.665201862025e-04 4.000000000000e-15 -4.200000000000e+00 -6.885806425426e-04 0.000000000000e+00 6.885806425384e-04 4.200000000000e-15 -4.400000000000e+00 -7.098711186496e-04 0.000000000000e+00 7.098711186452e-04 4.400000000000e-15 -4.600000000000e+00 -7.304211919513e-04 0.000000000000e+00 7.304211919467e-04 4.600000000000e-15 -4.800000000000e+00 -7.502588649583e-04 0.000000000000e+00 7.502588649535e-04 4.800000000000e-15 -5.000000000000e+00 -7.694106595458e-04 0.000000000000e+00 7.694106595408e-04 5.000000000000e-15 -5.200000000000e+00 -7.879017069366e-04 0.000000000000e+00 7.879017069314e-04 5.200000000000e-15 -5.400000000000e+00 -8.057558332701e-04 0.000000000000e+00 8.057558332647e-04 5.400000000000e-15 -5.600000000000e+00 -8.229956407399e-04 0.000000000000e+00 8.229956407343e-04 5.600000000000e-15 -5.800000000000e+00 -8.396425843549e-04 0.000000000000e+00 8.396425843491e-04 5.800000000000e-15 -6.000000000000e+00 -8.557170444350e-04 0.000000000000e+00 8.557170444290e-04 6.000000000000e-15 -6.200000000000e+00 -8.712383949865e-04 0.000000000000e+00 8.712383949803e-04 6.200000000000e-15 -6.400000000000e+00 -8.862250681304e-04 0.000000000000e+00 8.862250681240e-04 6.400000000000e-15 -6.600000000000e+00 -9.006946147676e-04 0.000000000000e+00 9.006946147610e-04 6.600000000000e-15 -6.800000000000e+00 -9.146637616766e-04 0.000000000000e+00 9.146637616698e-04 6.800000000000e-15 -7.000000000000e+00 -9.281484652360e-04 0.000000000000e+00 9.281484652290e-04 7.000000000000e-15 -7.200000000000e+00 -9.411639619666e-04 0.000000000000e+00 9.411639619594e-04 7.200000000000e-15 -7.400000000000e+00 -9.537248160774e-04 0.000000000000e+00 9.537248160700e-04 7.400000000000e-15 -7.600000000000e+00 -9.658449641954e-04 0.000000000000e+00 9.658449641878e-04 7.600000000000e-15 -7.800000000000e+00 -9.775377574463e-04 0.000000000000e+00 9.775377574385e-04 7.800000000000e-15 -8.000000000000e+00 -9.888160010451e-04 0.000000000000e+00 9.888160010371e-04 8.000000000000e-15 -8.200000000000e+00 -9.996919915429e-04 0.000000000000e+00 9.996919915347e-04 8.200000000000e-15 -8.400000000000e+00 -1.010177551864e-03 0.000000000000e+00 1.010177551856e-03 8.400000000000e-15 -8.600000000000e+00 -1.020284064255e-03 0.000000000000e+00 1.020284064247e-03 8.600000000000e-15 -8.800000000000e+00 -1.030022501260e-03 0.000000000000e+00 1.030022501252e-03 8.800000000000e-15 -9.000000000000e+00 -1.039403454816e-03 0.000000000000e+00 1.039403454807e-03 9.000000000000e-15 -9.200000000000e+00 -1.048437163558e-03 0.000000000000e+00 1.048437163549e-03 9.200000000000e-15 -9.400000000000e+00 -1.057133538416e-03 0.000000000000e+00 1.057133538407e-03 9.400000000000e-15 -9.600000000000e+00 -1.065502186558e-03 0.000000000000e+00 1.065502186549e-03 9.600000000000e-15 -9.800000000000e+00 -1.073552433753e-03 0.000000000000e+00 1.073552433743e-03 9.800000000000e-15 -1.000000000000e+01 -1.081293345184e-03 0.000000000000e+00 1.081293345174e-03 1.000000000000e-14 -1.020000000000e+01 -1.088733744773e-03 0.000000000000e+00 1.088733744763e-03 1.020000000000e-14 -1.040000000000e+01 -1.095882233031e-03 0.000000000000e+00 1.095882233020e-03 1.040000000000e-14 -1.060000000000e+01 -1.102747203485e-03 0.000000000000e+00 1.102747203474e-03 1.060000000000e-14 -1.080000000000e+01 -1.109336857692e-03 0.000000000000e+00 1.109336857681e-03 1.080000000000e-14 -1.100000000000e+01 -1.115659218873e-03 0.000000000000e+00 1.115659218862e-03 1.100000000000e-14 -1.120000000000e+01 -1.121722144187e-03 0.000000000000e+00 1.121722144176e-03 1.120000000000e-14 -1.140000000000e+01 -1.127533335678e-03 0.000000000000e+00 1.127533335666e-03 1.140000000000e-14 -1.160000000000e+01 -1.133100349908e-03 0.000000000000e+00 1.133100349897e-03 1.160000000000e-14 -1.180000000000e+01 -1.138430606327e-03 0.000000000000e+00 1.138430606315e-03 1.180000000000e-14 -1.200000000000e+01 -1.143531394395e-03 0.000000000000e+00 1.143531394383e-03 1.200000000000e-14 -1.220000000000e+01 -1.148409879522e-03 0.000000000000e+00 1.148409879510e-03 1.220000000000e-14 -1.240000000000e+01 -1.153073107854e-03 0.000000000000e+00 1.153073107841e-03 1.240000000000e-14 -1.260000000000e+01 -1.157528009984e-03 0.000000000000e+00 1.157528009972e-03 1.260000000000e-14 -1.280000000000e+01 -1.161781403638e-03 0.000000000000e+00 1.161781403625e-03 1.280000000000e-14 -1.300000000000e+01 -1.165839995412e-03 0.000000000000e+00 1.165839995399e-03 1.300000000000e-14 -1.320000000000e+01 -1.169710381650e-03 0.000000000000e+00 1.169710381637e-03 1.320000000000e-14 -1.340000000000e+01 -1.173399048541e-03 0.000000000000e+00 1.173399048527e-03 1.340000000000e-14 -1.360000000000e+01 -1.176912371524e-03 0.000000000000e+00 1.176912371510e-03 1.360000000000e-14 -1.380000000000e+01 -1.180256614110e-03 0.000000000000e+00 1.180256614096e-03 1.380000000000e-14 -1.400000000000e+01 -1.183437926207e-03 0.000000000000e+00 1.183437926193e-03 1.400000000000e-14 -1.420000000000e+01 -1.186462342051e-03 0.000000000000e+00 1.186462342037e-03 1.420000000000e-14 -1.440000000000e+01 -1.189335777844e-03 0.000000000000e+00 1.189335777830e-03 1.440000000000e-14 -1.460000000000e+01 -1.192064029187e-03 0.000000000000e+00 1.192064029173e-03 1.460000000000e-14 -1.480000000000e+01 -1.194652768409e-03 0.000000000000e+00 1.194652768395e-03 1.480000000000e-14 -1.500000000000e+01 -1.197107541869e-03 0.000000000000e+00 1.197107541854e-03 1.500000000000e-14 -1.520000000000e+01 -1.199433767310e-03 0.000000000000e+00 1.199433767295e-03 1.520000000000e-14 -1.540000000000e+01 -1.201636731350e-03 0.000000000000e+00 1.201636731335e-03 1.540000000000e-14 -1.560000000000e+01 -1.203721587146e-03 0.000000000000e+00 1.203721587131e-03 1.560000000000e-14 -1.580000000000e+01 -1.205693352311e-03 0.000000000000e+00 1.205693352295e-03 1.580000000000e-14 -1.600000000000e+01 -1.207556907115e-03 0.000000000000e+00 1.207556907099e-03 1.600000000000e-14 -1.620000000000e+01 -1.209316993007e-03 0.000000000000e+00 1.209316992991e-03 1.620000000000e-14 -1.640000000000e+01 -1.210978211488e-03 0.000000000000e+00 1.210978211471e-03 1.640000000000e-14 -1.660000000000e+01 -1.212545023350e-03 0.000000000000e+00 1.212545023334e-03 1.660000000000e-14 -1.680000000000e+01 -1.214021748296e-03 0.000000000000e+00 1.214021748279e-03 1.680000000000e-14 -1.700000000000e+01 -1.215412564935e-03 0.000000000000e+00 1.215412564918e-03 1.700000000000e-14 -1.720000000000e+01 -1.216721511170e-03 0.000000000000e+00 1.216721511153e-03 1.720000000000e-14 -1.740000000000e+01 -1.217952484942e-03 0.000000000000e+00 1.217952484925e-03 1.740000000000e-14 -1.760000000000e+01 -1.219109245345e-03 0.000000000000e+00 1.219109245328e-03 1.760000000000e-14 -1.780000000000e+01 -1.220195414075e-03 0.000000000000e+00 1.220195414058e-03 1.780000000000e-14 -1.800000000000e+01 -1.221214477210e-03 0.000000000000e+00 1.221214477192e-03 1.800000000000e-14 -1.820000000000e+01 -1.222169787282e-03 0.000000000000e+00 1.222169787263e-03 1.820000000000e-14 -1.840000000000e+01 -1.223064565638e-03 0.000000000000e+00 1.223064565620e-03 1.840000000000e-14 -1.860000000000e+01 -1.223901905050e-03 0.000000000000e+00 1.223901905031e-03 1.860000000000e-14 -1.880000000000e+01 -1.224684772554e-03 0.000000000000e+00 1.224684772535e-03 1.880000000000e-14 -1.900000000000e+01 -1.225416012503e-03 0.000000000000e+00 1.225416012484e-03 1.900000000000e-14 -1.920000000000e+01 -1.226098349801e-03 0.000000000000e+00 1.226098349782e-03 1.920000000000e-14 -1.940000000000e+01 -1.226734393302e-03 0.000000000000e+00 1.226734393283e-03 1.940000000000e-14 -1.960000000000e+01 -1.227326639357e-03 0.000000000000e+00 1.227326639338e-03 1.960000000000e-14 -1.980000000000e+01 -1.227877475491e-03 0.000000000000e+00 1.227877475471e-03 1.980000000000e-14 -2.000000000000e+01 -1.228389184191e-03 0.000000000000e+00 1.228389184171e-03 2.000000000000e-14 -1.000000000000e+00 -2.154898342417e-04 0.000000000000e+00 2.154898342407e-04 1.000000000000e-15 -1.200000000000e+00 -2.537461011532e-04 0.000000000000e+00 2.537461011520e-04 1.200000000000e-15 -1.400000000000e+00 -2.905474362069e-04 0.000000000000e+00 2.905474362055e-04 1.400000000000e-15 -1.600000000000e+00 -3.259575885254e-04 0.000000000000e+00 3.259575885238e-04 1.600000000000e-15 -1.800000000000e+00 -3.600377618662e-04 0.000000000000e+00 3.600377618644e-04 1.800000000000e-15 -2.000000000000e+00 -3.928465293748e-04 0.000000000000e+00 3.928465293728e-04 2.000000000000e-15 -2.200000000000e+00 -4.244397971986e-04 0.000000000000e+00 4.244397971964e-04 2.200000000000e-15 -2.400000000000e+00 -4.548708079245e-04 0.000000000000e+00 4.548708079221e-04 2.400000000000e-15 -2.600000000000e+00 -4.841901805211e-04 0.000000000000e+00 4.841901805185e-04 2.600000000000e-15 -2.800000000000e+00 -5.124459492425e-04 0.000000000000e+00 5.124459492397e-04 2.800000000000e-15 -3.000000000000e+00 -5.396836751638e-04 0.000000000000e+00 5.396836751608e-04 3.000000000000e-15 -3.200000000000e+00 -5.659465129321e-04 0.000000000000e+00 5.659465129289e-04 3.200000000000e-15 -3.400000000000e+00 -5.912753173540e-04 0.000000000000e+00 5.912753173506e-04 3.400000000000e-15 -3.600000000000e+00 -6.157087486909e-04 0.000000000000e+00 6.157087486873e-04 3.600000000000e-15 -3.800000000000e+00 -6.392833805906e-04 0.000000000000e+00 6.392833805868e-04 3.800000000000e-15 -4.000000000000e+00 -6.620338085190e-04 0.000000000000e+00 6.620338085150e-04 4.000000000000e-15 -4.200000000000e+00 -6.839927570697e-04 0.000000000000e+00 6.839927570655e-04 4.200000000000e-15 -4.400000000000e+00 -7.051911849503e-04 0.000000000000e+00 7.051911849459e-04 4.400000000000e-15 -4.600000000000e+00 -7.256583867806e-04 0.000000000000e+00 7.256583867760e-04 4.600000000000e-15 -4.800000000000e+00 -7.454220911081e-04 0.000000000000e+00 7.454220911033e-04 4.800000000000e-15 -5.000000000000e+00 -7.645085542595e-04 0.000000000000e+00 7.645085542545e-04 5.000000000000e-15 -5.200000000000e+00 -7.829426498100e-04 0.000000000000e+00 7.829426498048e-04 5.200000000000e-15 -5.400000000000e+00 -8.007479535795e-04 0.000000000000e+00 8.007479535741e-04 5.400000000000e-15 -5.600000000000e+00 -8.179468241575e-04 0.000000000000e+00 8.179468241519e-04 5.600000000000e-15 -5.800000000000e+00 -8.345604790299e-04 0.000000000000e+00 8.345604790241e-04 5.800000000000e-15 -6.000000000000e+00 -8.506090664295e-04 0.000000000000e+00 8.506090664235e-04 6.000000000000e-15 -6.200000000000e+00 -8.661117330675e-04 0.000000000000e+00 8.661117330613e-04 6.200000000000e-15 -6.400000000000e+00 -8.810866879238e-04 0.000000000000e+00 8.810866879174e-04 6.400000000000e-15 -6.600000000000e+00 -8.955512622898e-04 0.000000000000e+00 8.955512622832e-04 6.600000000000e-15 -6.800000000000e+00 -9.095219662607e-04 0.000000000000e+00 9.095219662539e-04 6.800000000000e-15 -7.000000000000e+00 -9.230145418768e-04 0.000000000000e+00 9.230145418698e-04 7.000000000000e-15 -7.200000000000e+00 -9.360440131088e-04 0.000000000000e+00 9.360440131016e-04 7.200000000000e-15 -7.400000000000e+00 -9.486247328775e-04 0.000000000000e+00 9.486247328701e-04 7.400000000000e-15 -7.600000000000e+00 -9.607704272873e-04 0.000000000000e+00 9.607704272797e-04 7.600000000000e-15 -7.800000000000e+00 -9.724942372470e-04 0.000000000000e+00 9.724942372392e-04 7.800000000000e-15 -8.000000000000e+00 -9.838087576353e-04 0.000000000000e+00 9.838087576273e-04 8.000000000000e-15 -8.200000000000e+00 -9.947260741632e-04 0.000000000000e+00 9.947260741550e-04 8.200000000000e-15 -8.400000000000e+00 -1.005257798068e-03 0.000000000000e+00 1.005257798059e-03 8.400000000000e-15 -8.600000000000e+00 -1.015415098765e-03 0.000000000000e+00 1.015415098756e-03 8.600000000000e-15 -8.800000000000e+00 -1.025208734571e-03 0.000000000000e+00 1.025208734562e-03 8.800000000000e-15 -9.000000000000e+00 -1.034649081604e-03 0.000000000000e+00 1.034649081595e-03 9.000000000000e-15 -9.200000000000e+00 -1.043746160940e-03 0.000000000000e+00 1.043746160931e-03 9.200000000000e-15 -9.400000000000e+00 -1.052509664120e-03 0.000000000000e+00 1.052509664110e-03 9.400000000000e-15 -9.600000000000e+00 -1.060948977068e-03 0.000000000000e+00 1.060948977059e-03 9.600000000000e-15 -9.800000000000e+00 -1.069073202486e-03 0.000000000000e+00 1.069073202476e-03 9.800000000000e-15 -1.000000000000e+01 -1.076891180766e-03 0.000000000000e+00 1.076891180756e-03 1.000000000000e-14 -1.020000000000e+01 -1.084411509478e-03 0.000000000000e+00 1.084411509468e-03 1.020000000000e-14 -1.040000000000e+01 -1.091642561460e-03 0.000000000000e+00 1.091642561450e-03 1.040000000000e-14 -1.060000000000e+01 -1.098592501543e-03 0.000000000000e+00 1.098592501532e-03 1.060000000000e-14 -1.080000000000e+01 -1.105269301936e-03 0.000000000000e+00 1.105269301925e-03 1.080000000000e-14 -1.100000000000e+01 -1.111680756301e-03 0.000000000000e+00 1.111680756290e-03 1.100000000000e-14 -1.120000000000e+01 -1.117834492529e-03 0.000000000000e+00 1.117834492518e-03 1.120000000000e-14 -1.140000000000e+01 -1.123737984249e-03 0.000000000000e+00 1.123737984237e-03 1.140000000000e-14 -1.160000000000e+01 -1.129398561076e-03 0.000000000000e+00 1.129398561064e-03 1.160000000000e-14 -1.180000000000e+01 -1.134823417648e-03 0.000000000000e+00 1.134823417637e-03 1.180000000000e-14 -1.200000000000e+01 -1.140019621457e-03 0.000000000000e+00 1.140019621445e-03 1.200000000000e-14 -1.220000000000e+01 -1.144994119514e-03 0.000000000000e+00 1.144994119502e-03 1.220000000000e-14 -1.240000000000e+01 -1.149753743901e-03 0.000000000000e+00 1.149753743889e-03 1.240000000000e-14 -1.260000000000e+01 -1.154305216234e-03 0.000000000000e+00 1.154305216221e-03 1.260000000000e-14 -1.280000000000e+01 -1.158655151112e-03 0.000000000000e+00 1.158655151099e-03 1.280000000000e-14 -1.300000000000e+01 -1.162810058598e-03 0.000000000000e+00 1.162810058585e-03 1.300000000000e-14 -1.320000000000e+01 -1.166776345806e-03 0.000000000000e+00 1.166776345792e-03 1.320000000000e-14 -1.340000000000e+01 -1.170560317671e-03 0.000000000000e+00 1.170560317658e-03 1.340000000000e-14 -1.360000000000e+01 -1.174168176981e-03 0.000000000000e+00 1.174168176967e-03 1.360000000000e-14 -1.380000000000e+01 -1.177606023749e-03 0.000000000000e+00 1.177606023735e-03 1.380000000000e-14 -1.400000000000e+01 -1.180879854031e-03 0.000000000000e+00 1.180879854017e-03 1.400000000000e-14 -1.420000000000e+01 -1.183995558270e-03 0.000000000000e+00 1.183995558256e-03 1.420000000000e-14 -1.440000000000e+01 -1.186958919255e-03 0.000000000000e+00 1.186958919240e-03 1.440000000000e-14 -1.460000000000e+01 -1.189775609803e-03 0.000000000000e+00 1.189775609788e-03 1.460000000000e-14 -1.480000000000e+01 -1.192451190236e-03 0.000000000000e+00 1.192451190221e-03 1.480000000000e-14 -1.500000000000e+01 -1.194991105748e-03 0.000000000000e+00 1.194991105733e-03 1.500000000000e-14 -1.520000000000e+01 -1.197400683745e-03 0.000000000000e+00 1.197400683729e-03 1.520000000000e-14 -1.540000000000e+01 -1.199685131219e-03 0.000000000000e+00 1.199685131204e-03 1.540000000000e-14 -1.560000000000e+01 -1.201849532245e-03 0.000000000000e+00 1.201849532230e-03 1.560000000000e-14 -1.580000000000e+01 -1.203898845638e-03 0.000000000000e+00 1.203898845622e-03 1.580000000000e-14 -1.600000000000e+01 -1.205837902836e-03 0.000000000000e+00 1.205837902820e-03 1.600000000000e-14 -1.620000000000e+01 -1.207671406052e-03 0.000000000000e+00 1.207671406036e-03 1.620000000000e-14 -1.640000000000e+01 -1.209403926720e-03 0.000000000000e+00 1.209403926703e-03 1.640000000000e-14 -1.660000000000e+01 -1.211039904268e-03 0.000000000000e+00 1.211039904252e-03 1.660000000000e-14 -1.680000000000e+01 -1.212583645246e-03 0.000000000000e+00 1.212583645229e-03 1.680000000000e-14 -1.700000000000e+01 -1.214039322795e-03 0.000000000000e+00 1.214039322778e-03 1.700000000000e-14 -1.720000000000e+01 -1.215410976494e-03 0.000000000000e+00 1.215410976477e-03 1.720000000000e-14 -1.740000000000e+01 -1.216702512558e-03 0.000000000000e+00 1.216702512541e-03 1.740000000000e-14 -1.760000000000e+01 -1.217917704393e-03 0.000000000000e+00 1.217917704376e-03 1.760000000000e-14 -1.780000000000e+01 -1.219060193501e-03 0.000000000000e+00 1.219060193483e-03 1.780000000000e-14 -1.800000000000e+01 -1.220133490702e-03 0.000000000000e+00 1.220133490684e-03 1.800000000000e-14 -1.820000000000e+01 -1.221140977686e-03 0.000000000000e+00 1.221140977668e-03 1.820000000000e-14 -1.840000000000e+01 -1.222085908842e-03 0.000000000000e+00 1.222085908824e-03 1.840000000000e-14 -1.860000000000e+01 -1.222971413369e-03 0.000000000000e+00 1.222971413350e-03 1.860000000000e-14 -1.880000000000e+01 -1.223800497632e-03 0.000000000000e+00 1.223800497613e-03 1.880000000000e-14 -1.900000000000e+01 -1.224576047755e-03 0.000000000000e+00 1.224576047736e-03 1.900000000000e-14 -1.920000000000e+01 -1.225300832409e-03 0.000000000000e+00 1.225300832390e-03 1.920000000000e-14 -1.940000000000e+01 -1.225977505795e-03 0.000000000000e+00 1.225977505775e-03 1.940000000000e-14 -1.960000000000e+01 -1.226608610788e-03 0.000000000000e+00 1.226608610769e-03 1.960000000000e-14 -1.980000000000e+01 -1.227196582239e-03 0.000000000000e+00 1.227196582220e-03 1.980000000000e-14 -2.000000000000e+01 -1.227743750397e-03 0.000000000000e+00 1.227743750377e-03 2.000000000000e-14 -1.000000000000e+00 -2.135337954620e-04 0.000000000000e+00 2.135337954610e-04 1.000000000000e-15 -1.200000000000e+00 -2.514475312227e-04 0.000000000000e+00 2.514475312215e-04 1.200000000000e-15 -1.400000000000e+00 -2.879226837587e-04 0.000000000000e+00 2.879226837573e-04 1.400000000000e-15 -1.600000000000e+00 -3.230228255341e-04 0.000000000000e+00 3.230228255325e-04 1.600000000000e-15 -1.800000000000e+00 -3.568089132640e-04 0.000000000000e+00 3.568089132622e-04 1.800000000000e-15 -2.000000000000e+00 -3.893392210123e-04 0.000000000000e+00 3.893392210103e-04 2.000000000000e-15 -2.200000000000e+00 -4.206693188595e-04 0.000000000000e+00 4.206693188573e-04 2.200000000000e-15 -2.400000000000e+00 -4.508520884867e-04 0.000000000000e+00 4.508520884843e-04 2.400000000000e-15 -2.600000000000e+00 -4.799377679360e-04 0.000000000000e+00 4.799377679334e-04 2.600000000000e-15 -2.800000000000e+00 -5.079740225116e-04 0.000000000000e+00 5.079740225088e-04 2.800000000000e-15 -3.000000000000e+00 -5.350060123356e-04 0.000000000000e+00 5.350060123326e-04 3.000000000000e-15 -3.200000000000e+00 -5.610765140173e-04 0.000000000000e+00 5.610765140141e-04 3.200000000000e-15 -3.400000000000e+00 -5.862260046571e-04 0.000000000000e+00 5.862260046537e-04 3.400000000000e-15 -3.600000000000e+00 -6.104927746224e-04 0.000000000000e+00 6.104927746188e-04 3.600000000000e-15 -3.800000000000e+00 -6.339130369742e-04 0.000000000000e+00 6.339130369704e-04 3.800000000000e-15 -4.000000000000e+00 -6.565210368186e-04 0.000000000000e+00 6.565210368146e-04 4.000000000000e-15 -4.200000000000e+00 -6.783491590871e-04 0.000000000000e+00 6.783491590829e-04 4.200000000000e-15 -4.400000000000e+00 -6.994280336479e-04 0.000000000000e+00 6.994280336435e-04 4.400000000000e-15 -4.600000000000e+00 -7.197866369643e-04 0.000000000000e+00 7.197866369597e-04 4.600000000000e-15 -4.800000000000e+00 -7.394523897745e-04 0.000000000000e+00 7.394523897697e-04 4.800000000000e-15 -5.000000000000e+00 -7.584512504586e-04 0.000000000000e+00 7.584512504536e-04 5.000000000000e-15 -5.200000000000e+00 -7.768078039184e-04 0.000000000000e+00 7.768078039132e-04 5.200000000000e-15 -5.400000000000e+00 -7.945453459087e-04 0.000000000000e+00 7.945453459033e-04 5.400000000000e-15 -5.600000000000e+00 -8.116859628478e-04 0.000000000000e+00 8.116859628422e-04 5.600000000000e-15 -5.800000000000e+00 -8.282506071977e-04 0.000000000000e+00 8.282506071919e-04 5.800000000000e-15 -6.000000000000e+00 -8.442591685535e-04 0.000000000000e+00 8.442591685475e-04 6.000000000000e-15 -6.200000000000e+00 -8.597305406074e-04 0.000000000000e+00 8.597305406012e-04 6.200000000000e-15 -6.400000000000e+00 -8.746826841772e-04 0.000000000000e+00 8.746826841708e-04 6.400000000000e-15 -6.600000000000e+00 -8.891326864984e-04 0.000000000000e+00 8.891326864918e-04 6.600000000000e-15 -6.800000000000e+00 -9.030968169827e-04 0.000000000000e+00 9.030968169759e-04 6.800000000000e-15 -7.000000000000e+00 -9.165905796473e-04 0.000000000000e+00 9.165905796403e-04 7.000000000000e-15 -7.200000000000e+00 -9.296287624151e-04 0.000000000000e+00 9.296287624079e-04 7.200000000000e-15 -7.400000000000e+00 -9.422254834760e-04 0.000000000000e+00 9.422254834686e-04 7.400000000000e-15 -7.600000000000e+00 -9.543942348975e-04 0.000000000000e+00 9.543942348899e-04 7.600000000000e-15 -7.800000000000e+00 -9.661479236542e-04 0.000000000000e+00 9.661479236464e-04 7.800000000000e-15 -8.000000000000e+00 -9.774989102435e-04 0.000000000000e+00 9.774989102355e-04 8.000000000000e-15 -8.200000000000e+00 -9.884590450369e-04 0.000000000000e+00 9.884590450287e-04 8.200000000000e-15 -8.400000000000e+00 -9.990397025091e-04 0.000000000000e+00 9.990397025007e-04 8.400000000000e-15 -8.600000000000e+00 -1.009251813472e-03 0.000000000000e+00 1.009251813463e-03 8.600000000000e-15 -8.800000000000e+00 -1.019105895431e-03 0.000000000000e+00 1.019105895422e-03 8.800000000000e-15 -9.000000000000e+00 -1.028612081171e-03 0.000000000000e+00 1.028612081162e-03 9.000000000000e-15 -9.200000000000e+00 -1.037780145668e-03 0.000000000000e+00 1.037780145659e-03 9.200000000000e-15 -9.400000000000e+00 -1.046619531398e-03 0.000000000000e+00 1.046619531388e-03 9.400000000000e-15 -9.600000000000e+00 -1.055139372138e-03 0.000000000000e+00 1.055139372128e-03 9.600000000000e-15 -9.800000000000e+00 -1.063348515305e-03 0.000000000000e+00 1.063348515295e-03 9.800000000000e-15 -1.000000000000e+01 -1.071255542897e-03 0.000000000000e+00 1.071255542887e-03 1.000000000000e-14 -1.020000000000e+01 -1.078868791077e-03 0.000000000000e+00 1.078868791067e-03 1.020000000000e-14 -1.040000000000e+01 -1.086196368449e-03 0.000000000000e+00 1.086196368438e-03 1.040000000000e-14 -1.060000000000e+01 -1.093246173043e-03 0.000000000000e+00 1.093246173032e-03 1.060000000000e-14 -1.080000000000e+01 -1.100025908056e-03 0.000000000000e+00 1.100025908045e-03 1.080000000000e-14 -1.100000000000e+01 -1.106543096357e-03 0.000000000000e+00 1.106543096346e-03 1.100000000000e-14 -1.120000000000e+01 -1.112805093781e-03 0.000000000000e+00 1.112805093770e-03 1.120000000000e-14 -1.140000000000e+01 -1.118819101231e-03 0.000000000000e+00 1.118819101219e-03 1.140000000000e-14 -1.160000000000e+01 -1.124592175607e-03 0.000000000000e+00 1.124592175596e-03 1.160000000000e-14 -1.180000000000e+01 -1.130131239581e-03 0.000000000000e+00 1.130131239570e-03 1.180000000000e-14 -1.200000000000e+01 -1.135443090232e-03 0.000000000000e+00 1.135443090220e-03 1.200000000000e-14 -1.220000000000e+01 -1.140534406572e-03 0.000000000000e+00 1.140534406560e-03 1.220000000000e-14 -1.240000000000e+01 -1.145411755997e-03 0.000000000000e+00 1.145411755985e-03 1.240000000000e-14 -1.260000000000e+01 -1.150081599681e-03 0.000000000000e+00 1.150081599668e-03 1.260000000000e-14 -1.280000000000e+01 -1.154550296965e-03 0.000000000000e+00 1.154550296952e-03 1.280000000000e-14 -1.300000000000e+01 -1.158824108792e-03 0.000000000000e+00 1.158824108779e-03 1.300000000000e-14 -1.320000000000e+01 -1.162909200222e-03 0.000000000000e+00 1.162909200209e-03 1.320000000000e-14 -1.340000000000e+01 -1.166811642112e-03 0.000000000000e+00 1.166811642099e-03 1.340000000000e-14 -1.360000000000e+01 -1.170537412004e-03 0.000000000000e+00 1.170537411990e-03 1.360000000000e-14 -1.380000000000e+01 -1.174092394311e-03 0.000000000000e+00 1.174092394297e-03 1.380000000000e-14 -1.400000000000e+01 -1.177482379871e-03 0.000000000000e+00 1.177482379857e-03 1.400000000000e-14 -1.420000000000e+01 -1.180713064944e-03 0.000000000000e+00 1.180713064929e-03 1.420000000000e-14 -1.440000000000e+01 -1.183790049742e-03 0.000000000000e+00 1.183790049728e-03 1.440000000000e-14 -1.460000000000e+01 -1.186718836586e-03 0.000000000000e+00 1.186718836571e-03 1.460000000000e-14 -1.480000000000e+01 -1.189504827743e-03 0.000000000000e+00 1.189504827728e-03 1.480000000000e-14 -1.500000000000e+01 -1.192153323066e-03 0.000000000000e+00 1.192153323051e-03 1.500000000000e-14 -1.520000000000e+01 -1.194669517488e-03 0.000000000000e+00 1.194669517473e-03 1.520000000000e-14 -1.540000000000e+01 -1.197058498453e-03 0.000000000000e+00 1.197058498437e-03 1.540000000000e-14 -1.560000000000e+01 -1.199325243359e-03 0.000000000000e+00 1.199325243343e-03 1.560000000000e-14 -1.580000000000e+01 -1.201474617080e-03 0.000000000000e+00 1.201474617064e-03 1.580000000000e-14 -1.600000000000e+01 -1.203511369612e-03 0.000000000000e+00 1.203511369596e-03 1.600000000000e-14 -1.620000000000e+01 -1.205440133905e-03 0.000000000000e+00 1.205440133888e-03 1.620000000000e-14 -1.640000000000e+01 -1.207265423923e-03 0.000000000000e+00 1.207265423907e-03 1.640000000000e-14 -1.660000000000e+01 -1.208991632966e-03 0.000000000000e+00 1.208991632949e-03 1.660000000000e-14 -1.680000000000e+01 -1.210623032276e-03 0.000000000000e+00 1.210623032259e-03 1.680000000000e-14 -1.700000000000e+01 -1.212163769963e-03 0.000000000000e+00 1.212163769946e-03 1.700000000000e-14 -1.720000000000e+01 -1.213617870249e-03 0.000000000000e+00 1.213617870232e-03 1.720000000000e-14 -1.740000000000e+01 -1.214989233053e-03 0.000000000000e+00 1.214989233035e-03 1.740000000000e-14 -1.760000000000e+01 -1.216281633903e-03 0.000000000000e+00 1.216281633886e-03 1.760000000000e-14 -1.780000000000e+01 -1.217498724191e-03 0.000000000000e+00 1.217498724174e-03 1.780000000000e-14 -1.800000000000e+01 -1.218644031747e-03 0.000000000000e+00 1.218644031729e-03 1.800000000000e-14 -1.820000000000e+01 -1.219720961727e-03 0.000000000000e+00 1.219720961708e-03 1.820000000000e-14 -1.840000000000e+01 -1.220732797812e-03 0.000000000000e+00 1.220732797794e-03 1.840000000000e-14 -1.860000000000e+01 -1.221682703683e-03 0.000000000000e+00 1.221682703665e-03 1.860000000000e-14 -1.880000000000e+01 -1.222573724765e-03 0.000000000000e+00 1.222573724746e-03 1.880000000000e-14 -1.900000000000e+01 -1.223408790222e-03 0.000000000000e+00 1.223408790203e-03 1.900000000000e-14 -1.920000000000e+01 -1.224190715177e-03 0.000000000000e+00 1.224190715158e-03 1.920000000000e-14 -1.940000000000e+01 -1.224922203144e-03 0.000000000000e+00 1.224922203125e-03 1.940000000000e-14 -1.960000000000e+01 -1.225605848648e-03 0.000000000000e+00 1.225605848629e-03 1.960000000000e-14 -1.980000000000e+01 -1.226244140018e-03 0.000000000000e+00 1.226244139999e-03 1.980000000000e-14 -2.000000000000e+01 -1.226839462332e-03 0.000000000000e+00 1.226839462312e-03 2.000000000000e-14 -1.000000000000e+00 -1.194653541021e-04 0.000000000000e+00 1.194653541011e-04 1.000000000000e-15 -1.200000000000e+00 -1.406034477456e-04 0.000000000000e+00 1.406034477444e-04 1.200000000000e-15 -1.400000000000e+00 -1.608734719817e-04 0.000000000000e+00 1.608734719803e-04 1.400000000000e-15 -1.600000000000e+00 -1.802972980749e-04 0.000000000000e+00 1.802972980733e-04 1.600000000000e-15 -1.800000000000e+00 -1.988969266397e-04 0.000000000000e+00 1.988969266379e-04 1.800000000000e-15 -2.000000000000e+00 -2.166944347254e-04 0.000000000000e+00 2.166944347234e-04 2.000000000000e-15 -2.200000000000e+00 -2.337119298235e-04 0.000000000000e+00 2.337119298213e-04 2.200000000000e-15 -2.400000000000e+00 -2.499715045511e-04 0.000000000000e+00 2.499715045487e-04 2.400000000000e-15 -2.600000000000e+00 -2.654951961219e-04 0.000000000000e+00 2.654951961193e-04 2.600000000000e-15 -2.800000000000e+00 -2.803049513326e-04 0.000000000000e+00 2.803049513298e-04 2.800000000000e-15 -3.000000000000e+00 -2.944225969936e-04 0.000000000000e+00 2.944225969906e-04 3.000000000000e-15 -3.200000000000e+00 -3.078698152718e-04 0.000000000000e+00 3.078698152686e-04 3.200000000000e-15 -3.400000000000e+00 -3.206681231865e-04 0.000000000000e+00 3.206681231831e-04 3.400000000000e-15 -3.600000000000e+00 -3.328388517922e-04 0.000000000000e+00 3.328388517886e-04 3.600000000000e-15 -3.800000000000e+00 -3.444031454255e-04 0.000000000000e+00 3.444031454217e-04 3.800000000000e-15 -4.000000000000e+00 -3.553819285750e-04 0.000000000000e+00 3.553819285710e-04 4.000000000000e-15 -4.200000000000e+00 -3.657959067523e-04 0.000000000000e+00 3.657959067481e-04 4.200000000000e-15 -4.400000000000e+00 -3.756655519779e-04 0.000000000000e+00 3.756655519735e-04 4.400000000000e-15 -4.600000000000e+00 -3.850110913958e-04 0.000000000000e+00 3.850110913912e-04 4.600000000000e-15 -4.800000000000e+00 -3.938524956290e-04 0.000000000000e+00 3.938524956242e-04 4.800000000000e-15 -5.000000000000e+00 -4.022094666464e-04 0.000000000000e+00 4.022094666414e-04 5.000000000000e-15 -5.200000000000e+00 -4.101014249894e-04 0.000000000000e+00 4.101014249842e-04 5.200000000000e-15 -5.400000000000e+00 -4.175474962767e-04 0.000000000000e+00 4.175474962713e-04 5.400000000000e-15 -5.600000000000e+00 -4.245664969547e-04 0.000000000000e+00 4.245664969491e-04 5.600000000000e-15 -5.800000000000e+00 -4.311769193107e-04 0.000000000000e+00 4.311769193049e-04 5.800000000000e-15 -6.000000000000e+00 -4.373969157959e-04 0.000000000000e+00 4.373969157899e-04 6.000000000000e-15 -6.200000000000e+00 -4.432442827422e-04 0.000000000000e+00 4.432442827360e-04 6.200000000000e-15 -6.400000000000e+00 -4.487364479586e-04 0.000000000000e+00 4.487364479522e-04 6.400000000000e-15 -6.600000000000e+00 -4.538904358132e-04 0.000000000000e+00 4.538904358066e-04 6.600000000000e-15 -6.800000000000e+00 -4.587228771026e-04 0.000000000000e+00 4.587228770958e-04 6.800000000000e-15 -7.000000000000e+00 -4.632499734317e-04 0.000000000000e+00 4.632499734247e-04 7.000000000000e-15 -7.200000000000e+00 -4.674874849587e-04 0.000000000000e+00 4.674874849515e-04 7.200000000000e-15 -7.400000000000e+00 -4.714507140716e-04 0.000000000000e+00 4.714507140642e-04 7.400000000000e-15 -7.600000000000e+00 -4.751544899670e-04 0.000000000000e+00 4.751544899594e-04 7.600000000000e-15 -7.800000000000e+00 -4.786131544529e-04 0.000000000000e+00 4.786131544451e-04 7.800000000000e-15 -8.000000000000e+00 -4.818405492981e-04 0.000000000000e+00 4.818405492901e-04 8.000000000000e-15 -8.200000000000e+00 -4.848500054323e-04 0.000000000000e+00 4.848500054241e-04 8.200000000000e-15 -8.400000000000e+00 -4.876543342681e-04 0.000000000000e+00 4.876543342597e-04 8.400000000000e-15 -8.600000000000e+00 -4.902658213730e-04 0.000000000000e+00 4.902658213644e-04 8.600000000000e-15 -8.800000000000e+00 -4.926962226573e-04 0.000000000000e+00 4.926962226485e-04 8.800000000000e-15 -9.000000000000e+00 -4.949567631809e-04 0.000000000000e+00 4.949567631719e-04 9.000000000000e-15 -9.200000000000e+00 -4.970581386106e-04 0.000000000000e+00 4.970581386014e-04 9.200000000000e-15 -9.400000000000e+00 -4.990105192917e-04 0.000000000000e+00 4.990105192823e-04 9.400000000000e-15 -9.600000000000e+00 -5.008235568319e-04 0.000000000000e+00 5.008235568223e-04 9.600000000000e-15 -9.800000000000e+00 -5.025063930407e-04 0.000000000000e+00 5.025063930309e-04 9.800000000000e-15 -1.000000000000e+01 -5.040676710207e-04 0.000000000000e+00 5.040676710107e-04 1.000000000000e-14 -1.020000000000e+01 -5.055155481723e-04 0.000000000000e+00 5.055155481621e-04 1.020000000000e-14 -1.040000000000e+01 -5.068577108500e-04 0.000000000000e+00 5.068577108396e-04 1.040000000000e-14 -1.060000000000e+01 -5.081013903977e-04 0.000000000000e+00 5.081013903871e-04 1.060000000000e-14 -1.080000000000e+01 -5.092533802873e-04 0.000000000000e+00 5.092533802765e-04 1.080000000000e-14 -1.100000000000e+01 -5.103200540948e-04 0.000000000000e+00 5.103200540838e-04 1.100000000000e-14 -1.120000000000e+01 -5.113073840578e-04 0.000000000000e+00 5.113073840466e-04 1.120000000000e-14 -1.140000000000e+01 -5.122209599816e-04 0.000000000000e+00 5.122209599702e-04 1.140000000000e-14 -1.160000000000e+01 -5.130660082814e-04 0.000000000000e+00 5.130660082698e-04 1.160000000000e-14 -1.180000000000e+01 -5.138474109735e-04 0.000000000000e+00 5.138474109617e-04 1.180000000000e-14 -1.200000000000e+01 -5.145697244538e-04 0.000000000000e+00 5.145697244418e-04 1.200000000000e-14 -1.220000000000e+01 -5.152371979262e-04 0.000000000000e+00 5.152371979140e-04 1.220000000000e-14 -1.240000000000e+01 -5.158537913692e-04 0.000000000000e+00 5.158537913568e-04 1.240000000000e-14 -1.260000000000e+01 -5.164231929492e-04 0.000000000000e+00 5.164231929366e-04 1.260000000000e-14 -1.280000000000e+01 -5.169488358122e-04 0.000000000000e+00 5.169488357994e-04 1.280000000000e-14 -1.300000000000e+01 -5.174339142011e-04 0.000000000000e+00 5.174339141881e-04 1.300000000000e-14 -1.320000000000e+01 -5.178813988635e-04 0.000000000000e+00 5.178813988503e-04 1.320000000000e-14 -1.340000000000e+01 -5.182940517288e-04 0.000000000000e+00 5.182940517154e-04 1.340000000000e-14 -1.360000000000e+01 -5.186744398457e-04 0.000000000000e+00 5.186744398321e-04 1.360000000000e-14 -1.380000000000e+01 -5.190249485781e-04 0.000000000000e+00 5.190249485643e-04 1.380000000000e-14 -1.400000000000e+01 -5.193477940714e-04 0.000000000000e+00 5.193477940574e-04 1.400000000000e-14 -1.420000000000e+01 -5.196450350006e-04 0.000000000000e+00 5.196450349864e-04 1.420000000000e-14 -1.440000000000e+01 -5.199185836233e-04 0.000000000000e+00 5.199185836089e-04 1.440000000000e-14 -1.460000000000e+01 -5.201702161612e-04 0.000000000000e+00 5.201702161466e-04 1.460000000000e-14 -1.480000000000e+01 -5.204015825363e-04 0.000000000000e+00 5.204015825215e-04 1.480000000000e-14 -1.500000000000e+01 -5.206142154936e-04 0.000000000000e+00 5.206142154786e-04 1.500000000000e-14 -1.520000000000e+01 -5.208095391389e-04 0.000000000000e+00 5.208095391237e-04 1.520000000000e-14 -1.540000000000e+01 -5.209888769256e-04 0.000000000000e+00 5.209888769102e-04 1.540000000000e-14 -1.560000000000e+01 -5.211534591213e-04 0.000000000000e+00 5.211534591057e-04 1.560000000000e-14 -1.580000000000e+01 -5.213044297866e-04 0.000000000000e+00 5.213044297708e-04 1.580000000000e-14 -1.600000000000e+01 -5.214428532977e-04 0.000000000000e+00 5.214428532817e-04 1.600000000000e-14 -1.620000000000e+01 -5.215697204441e-04 0.000000000000e+00 5.215697204279e-04 1.620000000000e-14 -1.640000000000e+01 -5.216859541296e-04 0.000000000000e+00 5.216859541132e-04 1.640000000000e-14 -1.660000000000e+01 -5.217924147067e-04 0.000000000000e+00 5.217924146901e-04 1.660000000000e-14 -1.680000000000e+01 -5.218899049680e-04 0.000000000000e+00 5.218899049512e-04 1.680000000000e-14 -1.700000000000e+01 -5.219791748201e-04 0.000000000000e+00 5.219791748031e-04 1.700000000000e-14 -1.720000000000e+01 -5.220609256575e-04 0.000000000000e+00 5.220609256403e-04 1.720000000000e-14 -1.740000000000e+01 -5.221358144513e-04 0.000000000000e+00 5.221358144339e-04 1.740000000000e-14 -1.760000000000e+01 -5.222044575596e-04 0.000000000000e+00 5.222044575420e-04 1.760000000000e-14 -1.780000000000e+01 -5.222674342536e-04 0.000000000000e+00 5.222674342358e-04 1.780000000000e-14 -1.800000000000e+01 -5.223252899415e-04 0.000000000000e+00 5.223252899235e-04 1.800000000000e-14 -1.820000000000e+01 -5.223785390447e-04 0.000000000000e+00 5.223785390265e-04 1.820000000000e-14 -1.840000000000e+01 -5.224276674527e-04 0.000000000000e+00 5.224276674343e-04 1.840000000000e-14 -1.860000000000e+01 -5.224731344382e-04 0.000000000000e+00 5.224731344196e-04 1.860000000000e-14 -1.880000000000e+01 -5.225153738619e-04 0.000000000000e+00 5.225153738431e-04 1.880000000000e-14 -1.900000000000e+01 -5.225547944599e-04 0.000000000000e+00 5.225547944409e-04 1.900000000000e-14 -1.920000000000e+01 -5.225917790187e-04 0.000000000000e+00 5.225917789995e-04 1.920000000000e-14 -1.940000000000e+01 -5.226266823722e-04 0.000000000000e+00 5.226266823528e-04 1.940000000000e-14 -1.960000000000e+01 -5.226598284476e-04 0.000000000000e+00 5.226598284280e-04 1.960000000000e-14 -1.980000000000e+01 -5.226915069833e-04 0.000000000000e+00 5.226915069635e-04 1.980000000000e-14 -2.000000000000e+01 -5.227219708568e-04 0.000000000000e+00 5.227219708368e-04 2.000000000000e-14 -1.000000000000e+00 -1.189914012888e-04 0.000000000000e+00 1.189914012878e-04 1.000000000000e-15 -1.200000000000e+00 -1.400520617865e-04 0.000000000000e+00 1.400520617853e-04 1.200000000000e-15 -1.400000000000e+00 -1.602508091550e-04 0.000000000000e+00 1.602508091536e-04 1.400000000000e-15 -1.600000000000e+00 -1.796095675863e-04 0.000000000000e+00 1.796095675847e-04 1.600000000000e-15 -1.800000000000e+00 -1.981503437025e-04 0.000000000000e+00 1.981503437007e-04 1.800000000000e-15 -2.000000000000e+00 -2.158951772067e-04 0.000000000000e+00 2.158951772047e-04 2.000000000000e-15 -2.200000000000e+00 -2.328660988321e-04 0.000000000000e+00 2.328660988299e-04 2.200000000000e-15 -2.400000000000e+00 -2.490850887933e-04 0.000000000000e+00 2.490850887909e-04 2.400000000000e-15 -2.600000000000e+00 -2.645740398838e-04 0.000000000000e+00 2.645740398812e-04 2.600000000000e-15 -2.800000000000e+00 -2.793547259301e-04 0.000000000000e+00 2.793547259273e-04 2.800000000000e-15 -3.000000000000e+00 -2.934487755304e-04 0.000000000000e+00 2.934487755274e-04 3.000000000000e-15 -3.200000000000e+00 -3.068776505578e-04 0.000000000000e+00 3.068776505546e-04 3.200000000000e-15 -3.400000000000e+00 -3.196626286819e-04 0.000000000000e+00 3.196626286785e-04 3.400000000000e-15 -3.600000000000e+00 -3.318247855292e-04 0.000000000000e+00 3.318247855256e-04 3.600000000000e-15 -3.800000000000e+00 -3.433849964339e-04 0.000000000000e+00 3.433849964301e-04 3.800000000000e-15 -4.000000000000e+00 -3.543639064510e-04 0.000000000000e+00 3.543639064470e-04 4.000000000000e-15 -4.200000000000e+00 -3.647819335232e-04 0.000000000000e+00 3.647819335190e-04 4.200000000000e-15 -4.400000000000e+00 -3.746592565415e-04 0.000000000000e+00 3.746592565371e-04 4.400000000000e-15 -4.600000000000e+00 -3.840158063551e-04 0.000000000000e+00 3.840158063505e-04 4.600000000000e-15 -4.800000000000e+00 -3.928712564156e-04 0.000000000000e+00 3.928712564108e-04 4.800000000000e-15 -5.000000000000e+00 -4.012450128141e-04 0.000000000000e+00 4.012450128091e-04 5.000000000000e-15 -5.200000000000e+00 -4.091562035560e-04 0.000000000000e+00 4.091562035508e-04 5.200000000000e-15 -5.400000000000e+00 -4.166236669792e-04 0.000000000000e+00 4.166236669738e-04 5.400000000000e-15 -5.600000000000e+00 -4.236659392813e-04 0.000000000000e+00 4.236659392757e-04 5.600000000000e-15 -5.800000000000e+00 -4.303012411609e-04 0.000000000000e+00 4.303012411551e-04 5.800000000000e-15 -6.000000000000e+00 -4.365474636191e-04 0.000000000000e+00 4.365474636131e-04 6.000000000000e-15 -6.200000000000e+00 -4.424221529967e-04 0.000000000000e+00 4.424221529905e-04 6.200000000000e-15 -6.400000000000e+00 -4.479424998210e-04 0.000000000000e+00 4.479424998146e-04 6.400000000000e-15 -6.600000000000e+00 -4.531253045279e-04 0.000000000000e+00 4.531253045213e-04 6.600000000000e-15 -6.800000000000e+00 -4.579869886802e-04 0.000000000000e+00 4.579869886734e-04 6.800000000000e-15 -7.000000000000e+00 -4.625435596560e-04 0.000000000000e+00 4.625435596490e-04 7.000000000000e-15 -7.200000000000e+00 -4.668105989514e-04 0.000000000000e+00 4.668105989442e-04 7.200000000000e-15 -7.400000000000e+00 -4.708032461529e-04 0.000000000000e+00 4.708032461455e-04 7.400000000000e-15 -7.600000000000e+00 -4.745361836303e-04 0.000000000000e+00 4.745361836227e-04 7.600000000000e-15 -7.800000000000e+00 -4.780236222779e-04 0.000000000000e+00 4.780236222701e-04 7.800000000000e-15 -8.000000000000e+00 -4.812792886292e-04 0.000000000000e+00 4.812792886212e-04 8.000000000000e-15 -8.200000000000e+00 -4.843164136589e-04 0.000000000000e+00 4.843164136507e-04 8.200000000000e-15 -8.400000000000e+00 -4.871477235573e-04 0.000000000000e+00 4.871477235489e-04 8.400000000000e-15 -8.600000000000e+00 -4.897854327204e-04 0.000000000000e+00 4.897854327118e-04 8.600000000000e-15 -8.800000000000e+00 -4.922412391419e-04 0.000000000000e+00 4.922412391331e-04 8.800000000000e-15 -9.000000000000e+00 -4.945263223321e-04 0.000000000000e+00 4.945263223231e-04 9.000000000000e-15 -9.200000000000e+00 -4.966513438187e-04 0.000000000000e+00 4.966513438095e-04 9.200000000000e-15 -9.400000000000e+00 -4.986264502158e-04 0.000000000000e+00 4.986264502064e-04 9.400000000000e-15 -9.600000000000e+00 -5.004612787847e-04 0.000000000000e+00 5.004612787751e-04 9.600000000000e-15 -9.800000000000e+00 -5.021649653480e-04 0.000000000000e+00 5.021649653382e-04 9.800000000000e-15 -1.000000000000e+01 -5.037461543747e-04 0.000000000000e+00 5.037461543647e-04 1.000000000000e-14 -1.020000000000e+01 -5.052130110134e-04 0.000000000000e+00 5.052130110032e-04 1.020000000000e-14 -1.040000000000e+01 -5.065732348243e-04 0.000000000000e+00 5.065732348139e-04 1.040000000000e-14 -1.060000000000e+01 -5.078340749494e-04 0.000000000000e+00 5.078340749388e-04 1.060000000000e-14 -1.080000000000e+01 -5.090023464504e-04 0.000000000000e+00 5.090023464396e-04 1.080000000000e-14 -1.100000000000e+01 -5.100844475531e-04 0.000000000000e+00 5.100844475421e-04 1.100000000000e-14 -1.120000000000e+01 -5.110863775457e-04 0.000000000000e+00 5.110863775345e-04 1.120000000000e-14 -1.140000000000e+01 -5.120137550958e-04 0.000000000000e+00 5.120137550844e-04 1.140000000000e-14 -1.160000000000e+01 -5.128718367736e-04 0.000000000000e+00 5.128718367620e-04 1.160000000000e-14 -1.180000000000e+01 -5.136655355894e-04 0.000000000000e+00 5.136655355776e-04 1.180000000000e-14 -1.200000000000e+01 -5.143994393811e-04 0.000000000000e+00 5.143994393691e-04 1.200000000000e-14 -1.220000000000e+01 -5.150778289089e-04 0.000000000000e+00 5.150778288967e-04 1.220000000000e-14 -1.240000000000e+01 -5.157046955407e-04 0.000000000000e+00 5.157046955283e-04 1.240000000000e-14 -1.260000000000e+01 -5.162837584318e-04 0.000000000000e+00 5.162837584192e-04 1.260000000000e-14 -1.280000000000e+01 -5.168184811246e-04 0.000000000000e+00 5.168184811118e-04 1.280000000000e-14 -1.300000000000e+01 -5.173120875119e-04 0.000000000000e+00 5.173120874989e-04 1.300000000000e-14 -1.320000000000e+01 -5.177675771231e-04 0.000000000000e+00 5.177675771099e-04 1.320000000000e-14 -1.340000000000e+01 -5.181877397086e-04 0.000000000000e+00 5.181877396952e-04 1.340000000000e-14 -1.360000000000e+01 -5.185751691082e-04 0.000000000000e+00 5.185751690946e-04 1.360000000000e-14 -1.380000000000e+01 -5.189322763995e-04 0.000000000000e+00 5.189322763857e-04 1.380000000000e-14 -1.400000000000e+01 -5.192613023331e-04 0.000000000000e+00 5.192613023191e-04 1.400000000000e-14 -1.420000000000e+01 -5.195643290658e-04 0.000000000000e+00 5.195643290516e-04 1.420000000000e-14 -1.440000000000e+01 -5.198432912095e-04 0.000000000000e+00 5.198432911951e-04 1.440000000000e-14 -1.460000000000e+01 -5.200999862184e-04 0.000000000000e+00 5.200999862038e-04 1.460000000000e-14 -1.480000000000e+01 -5.203360841397e-04 0.000000000000e+00 5.203360841249e-04 1.480000000000e-14 -1.500000000000e+01 -5.205531367556e-04 0.000000000000e+00 5.205531367406e-04 1.500000000000e-14 -1.520000000000e+01 -5.207525861460e-04 0.000000000000e+00 5.207525861308e-04 1.520000000000e-14 -1.540000000000e+01 -5.209357727030e-04 0.000000000000e+00 5.209357726876e-04 1.540000000000e-14 -1.560000000000e+01 -5.211039426271e-04 0.000000000000e+00 5.211039426115e-04 1.560000000000e-14 -1.580000000000e+01 -5.212582549380e-04 0.000000000000e+00 5.212582549222e-04 1.580000000000e-14 -1.600000000000e+01 -5.213997880287e-04 0.000000000000e+00 5.213997880127e-04 1.600000000000e-14 -1.620000000000e+01 -5.215295457947e-04 0.000000000000e+00 5.215295457785e-04 1.620000000000e-14 -1.640000000000e+01 -5.216484633672e-04 0.000000000000e+00 5.216484633508e-04 1.640000000000e-14 -1.660000000000e+01 -5.217574124771e-04 0.000000000000e+00 5.217574124605e-04 1.660000000000e-14 -1.680000000000e+01 -5.218572064772e-04 0.000000000000e+00 5.218572064604e-04 1.680000000000e-14 -1.700000000000e+01 -5.219486050446e-04 0.000000000000e+00 5.219486050276e-04 1.700000000000e-14 -1.720000000000e+01 -5.220323185851e-04 0.000000000000e+00 5.220323185679e-04 1.720000000000e-14 -1.740000000000e+01 -5.221090123524e-04 0.000000000000e+00 5.221090123350e-04 1.740000000000e-14 -1.760000000000e+01 -5.221793102934e-04 0.000000000000e+00 5.221793102758e-04 1.760000000000e-14 -1.780000000000e+01 -5.222437986169e-04 0.000000000000e+00 5.222437985991e-04 1.780000000000e-14 -1.800000000000e+01 -5.223030290699e-04 0.000000000000e+00 5.223030290519e-04 1.800000000000e-14 -1.820000000000e+01 -5.223575218891e-04 0.000000000000e+00 5.223575218709e-04 1.820000000000e-14 -1.840000000000e+01 -5.224077683604e-04 0.000000000000e+00 5.224077683420e-04 1.840000000000e-14 -1.860000000000e+01 -5.224542328845e-04 0.000000000000e+00 5.224542328659e-04 1.860000000000e-14 -1.880000000000e+01 -5.224973543959e-04 0.000000000000e+00 5.224973543771e-04 1.880000000000e-14 -1.900000000000e+01 -5.225375469367e-04 0.000000000000e+00 5.225375469177e-04 1.900000000000e-14 -1.920000000000e+01 -5.225751991812e-04 0.000000000000e+00 5.225751991620e-04 1.920000000000e-14 -1.940000000000e+01 -5.226106727901e-04 0.000000000000e+00 5.226106727707e-04 1.940000000000e-14 -1.960000000000e+01 -5.226442997162e-04 0.000000000000e+00 5.226442996966e-04 1.960000000000e-14 -1.980000000000e+01 -5.226763789550e-04 0.000000000000e+00 5.226763789352e-04 1.980000000000e-14 -2.000000000000e+01 -5.227071735985e-04 0.000000000000e+00 5.227071735785e-04 2.000000000000e-14 -1.000000000000e+00 -1.184126635389e-04 0.000000000000e+00 1.184126635379e-04 1.000000000000e-15 -1.200000000000e+00 -1.393781744964e-04 0.000000000000e+00 1.393781744952e-04 1.200000000000e-15 -1.400000000000e+00 -1.594891117518e-04 0.000000000000e+00 1.594891117504e-04 1.400000000000e-15 -1.600000000000e+00 -1.787674827594e-04 0.000000000000e+00 1.787674827578e-04 1.600000000000e-15 -1.800000000000e+00 -1.972353120393e-04 0.000000000000e+00 1.972353120375e-04 1.800000000000e-15 -2.000000000000e+00 -2.149146119670e-04 0.000000000000e+00 2.149146119650e-04 2.000000000000e-15 -2.200000000000e+00 -2.318273371995e-04 0.000000000000e+00 2.318273371973e-04 2.200000000000e-15 -2.400000000000e+00 -2.479953490582e-04 0.000000000000e+00 2.479953490558e-04 2.400000000000e-15 -2.600000000000e+00 -2.634403827846e-04 0.000000000000e+00 2.634403827820e-04 2.600000000000e-15 -2.800000000000e+00 -2.781840199683e-04 0.000000000000e+00 2.781840199655e-04 2.800000000000e-15 -3.000000000000e+00 -2.922476660797e-04 0.000000000000e+00 2.922476660767e-04 3.000000000000e-15 -3.200000000000e+00 -3.056525325998e-04 0.000000000000e+00 3.056525325966e-04 3.200000000000e-15 -3.400000000000e+00 -3.184196230199e-04 0.000000000000e+00 3.184196230165e-04 3.400000000000e-15 -3.600000000000e+00 -3.305697184567e-04 0.000000000000e+00 3.305697184531e-04 3.600000000000e-15 -3.800000000000e+00 -3.421233822003e-04 0.000000000000e+00 3.421233821965e-04 3.800000000000e-15 -4.000000000000e+00 -3.531009335141e-04 0.000000000000e+00 3.531009335101e-04 4.000000000000e-15 -4.200000000000e+00 -3.635224533896e-04 0.000000000000e+00 3.635224533854e-04 4.200000000000e-15 -4.400000000000e+00 -3.734077756462e-04 0.000000000000e+00 3.734077756418e-04 4.400000000000e-15 -4.600000000000e+00 -3.827764807689e-04 0.000000000000e+00 3.827764807643e-04 4.600000000000e-15 -4.800000000000e+00 -3.916478892693e-04 0.000000000000e+00 3.916478892645e-04 4.800000000000e-15 -5.000000000000e+00 -4.000410543241e-04 0.000000000000e+00 4.000410543191e-04 5.000000000000e-15 -5.200000000000e+00 -4.079747535210e-04 0.000000000000e+00 4.079747535158e-04 5.200000000000e-15 -5.400000000000e+00 -4.154674796109e-04 0.000000000000e+00 4.154674796055e-04 5.400000000000e-15 -5.600000000000e+00 -4.225374302208e-04 0.000000000000e+00 4.225374302152e-04 5.600000000000e-15 -5.800000000000e+00 -4.292024965234e-04 0.000000000000e+00 4.292024965176e-04 5.800000000000e-15 -6.000000000000e+00 -4.354802509016e-04 0.000000000000e+00 4.354802508956e-04 6.000000000000e-15 -6.200000000000e+00 -4.413879336756e-04 0.000000000000e+00 4.413879336694e-04 6.200000000000e-15 -6.400000000000e+00 -4.469424389970e-04 0.000000000000e+00 4.469424389906e-04 6.400000000000e-15 -6.600000000000e+00 -4.521603043004e-04 0.000000000000e+00 4.521603042938e-04 6.600000000000e-15 -6.800000000000e+00 -4.570576776358e-04 0.000000000000e+00 4.570576776290e-04 6.800000000000e-15 -7.000000000000e+00 -4.616503284819e-04 0.000000000000e+00 4.616503284749e-04 7.000000000000e-15 -7.200000000000e+00 -4.659536140762e-04 0.000000000000e+00 4.659536140690e-04 7.200000000000e-15 -7.400000000000e+00 -4.699824684402e-04 0.000000000000e+00 4.699824684328e-04 7.400000000000e-15 -7.600000000000e+00 -4.737513873586e-04 0.000000000000e+00 4.737513873510e-04 7.600000000000e-15 -7.800000000000e+00 -4.772744141864e-04 0.000000000000e+00 4.772744141786e-04 7.800000000000e-15 -8.000000000000e+00 -4.805651268171e-04 0.000000000000e+00 4.805651268091e-04 8.000000000000e-15 -8.200000000000e+00 -4.836366261321e-04 0.000000000000e+00 4.836366261239e-04 8.200000000000e-15 -8.400000000000e+00 -4.865015262304e-04 0.000000000000e+00 4.865015262220e-04 8.400000000000e-15 -8.600000000000e+00 -4.891719466991e-04 0.000000000000e+00 4.891719466905e-04 8.600000000000e-15 -8.800000000000e+00 -4.916595071345e-04 0.000000000000e+00 4.916595071257e-04 8.800000000000e-15 -9.000000000000e+00 -4.939753240619e-04 0.000000000000e+00 4.939753240529e-04 9.000000000000e-15 -9.200000000000e+00 -4.961300103389e-04 0.000000000000e+00 4.961300103297e-04 9.200000000000e-15 -9.400000000000e+00 -4.981336770565e-04 0.000000000000e+00 4.981336770471e-04 9.400000000000e-15 -9.600000000000e+00 -4.999959378896e-04 0.000000000000e+00 4.999959378800e-04 9.600000000000e-15 -9.800000000000e+00 -5.017259157859e-04 0.000000000000e+00 5.017259157761e-04 9.800000000000e-15 -1.000000000000e+01 -5.033322518357e-04 0.000000000000e+00 5.033322518257e-04 1.000000000000e-14 -1.020000000000e+01 -5.048231161194e-04 0.000000000000e+00 5.048231161092e-04 1.020000000000e-14 -1.040000000000e+01 -5.062062203050e-04 0.000000000000e+00 5.062062202946e-04 1.040000000000e-14 -1.060000000000e+01 -5.074888317433e-04 0.000000000000e+00 5.074888317327e-04 1.060000000000e-14 -1.080000000000e+01 -5.086777888069e-04 0.000000000000e+00 5.086777887961e-04 1.080000000000e-14 -1.100000000000e+01 -5.097795172146e-04 0.000000000000e+00 5.097795172036e-04 1.100000000000e-14 -1.120000000000e+01 -5.108000470926e-04 0.000000000000e+00 5.108000470814e-04 1.120000000000e-14 -1.140000000000e+01 -5.117450305409e-04 0.000000000000e+00 5.117450305295e-04 1.140000000000e-14 -1.160000000000e+01 -5.126197594882e-04 0.000000000000e+00 5.126197594766e-04 1.160000000000e-14 -1.180000000000e+01 -5.134291836428e-04 0.000000000000e+00 5.134291836310e-04 1.180000000000e-14 -1.200000000000e+01 -5.141779283694e-04 0.000000000000e+00 5.141779283574e-04 1.200000000000e-14 -1.220000000000e+01 -5.148703123450e-04 0.000000000000e+00 5.148703123328e-04 1.220000000000e-14 -1.240000000000e+01 -5.155103648706e-04 0.000000000000e+00 5.155103648582e-04 1.240000000000e-14 -1.260000000000e+01 -5.161018427376e-04 0.000000000000e+00 5.161018427250e-04 1.260000000000e-14 -1.280000000000e+01 -5.166482465677e-04 0.000000000000e+00 5.166482465549e-04 1.280000000000e-14 -1.300000000000e+01 -5.171528365636e-04 0.000000000000e+00 5.171528365506e-04 1.300000000000e-14 -1.320000000000e+01 -5.176186476261e-04 0.000000000000e+00 5.176186476129e-04 1.320000000000e-14 -1.340000000000e+01 -5.180485038045e-04 0.000000000000e+00 5.180485037911e-04 1.340000000000e-14 -1.360000000000e+01 -5.184450320637e-04 0.000000000000e+00 5.184450320501e-04 1.360000000000e-14 -1.380000000000e+01 -5.188106753589e-04 0.000000000000e+00 5.188106753451e-04 1.380000000000e-14 -1.400000000000e+01 -5.191477050199e-04 0.000000000000e+00 5.191477050059e-04 1.400000000000e-14 -1.420000000000e+01 -5.194582324524e-04 0.000000000000e+00 5.194582324382e-04 1.420000000000e-14 -1.440000000000e+01 -5.197442201725e-04 0.000000000000e+00 5.197442201581e-04 1.440000000000e-14 -1.460000000000e+01 -5.200074921911e-04 0.000000000000e+00 5.200074921765e-04 1.460000000000e-14 -1.480000000000e+01 -5.202497437742e-04 0.000000000000e+00 5.202497437594e-04 1.480000000000e-14 -1.500000000000e+01 -5.204725506022e-04 0.000000000000e+00 5.204725505872e-04 1.500000000000e-14 -1.520000000000e+01 -5.206773773563e-04 0.000000000000e+00 5.206773773411e-04 1.520000000000e-14 -1.540000000000e+01 -5.208655857621e-04 0.000000000000e+00 5.208655857467e-04 1.540000000000e-14 -1.560000000000e+01 -5.210384421182e-04 0.000000000000e+00 5.210384421026e-04 1.560000000000e-14 -1.580000000000e+01 -5.211971243413e-04 0.000000000000e+00 5.211971243255e-04 1.580000000000e-14 -1.600000000000e+01 -5.213427285565e-04 0.000000000000e+00 5.213427285405e-04 1.600000000000e-14 -1.620000000000e+01 -5.214762752624e-04 0.000000000000e+00 5.214762752462e-04 1.620000000000e-14 -1.640000000000e+01 -5.215987151005e-04 0.000000000000e+00 5.215987150841e-04 1.640000000000e-14 -1.660000000000e+01 -5.217109342541e-04 0.000000000000e+00 5.217109342375e-04 1.660000000000e-14 -1.680000000000e+01 -5.218137595054e-04 0.000000000000e+00 5.218137594886e-04 1.680000000000e-14 -1.700000000000e+01 -5.219079629721e-04 0.000000000000e+00 5.219079629551e-04 1.700000000000e-14 -1.720000000000e+01 -5.219942665451e-04 0.000000000000e+00 5.219942665279e-04 1.720000000000e-14 -1.740000000000e+01 -5.220733460445e-04 0.000000000000e+00 5.220733460271e-04 1.740000000000e-14 -1.760000000000e+01 -5.221458351033e-04 0.000000000000e+00 5.221458350857e-04 1.760000000000e-14 -1.780000000000e+01 -5.222123287837e-04 0.000000000000e+00 5.222123287659e-04 1.780000000000e-14 -1.800000000000e+01 -5.222733869139e-04 0.000000000000e+00 5.222733868959e-04 1.800000000000e-14 -1.820000000000e+01 -5.223295371218e-04 0.000000000000e+00 5.223295371036e-04 1.820000000000e-14 -1.840000000000e+01 -5.223812775125e-04 0.000000000000e+00 5.223812774941e-04 1.840000000000e-14 -1.860000000000e+01 -5.224290789042e-04 0.000000000000e+00 5.224290788856e-04 1.860000000000e-14 -1.880000000000e+01 -5.224733864923e-04 0.000000000000e+00 5.224733864735e-04 1.880000000000e-14 -1.900000000000e+01 -5.225146207609e-04 0.000000000000e+00 5.225146207419e-04 1.900000000000e-14 -1.920000000000e+01 -5.225531774362e-04 0.000000000000e+00 5.225531774170e-04 1.920000000000e-14 -1.940000000000e+01 -5.225894263152e-04 0.000000000000e+00 5.225894262958e-04 1.940000000000e-14 -1.960000000000e+01 -5.226237089742e-04 0.000000000000e+00 5.226237089546e-04 1.960000000000e-14 -1.980000000000e+01 -5.226563356878e-04 0.000000000000e+00 5.226563356680e-04 1.980000000000e-14 -2.000000000000e+01 -5.226875822760e-04 0.000000000000e+00 5.226875822560e-04 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/acFreq_coadov.standard0000644000265600020320000000762512264261473024327 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 8.79111946347236e-15 8.26412201976711e-15 -1.02027329126229e-17 1258.925411794 8.79111946347398e-15 8.26412201976701e-15 -1.02027329126246e-17 1584.893192461 8.79111946347244e-15 8.26412201976733e-15 -1.02027329126246e-17 1995.262314969 8.79111946347063e-15 8.2641220197651e-15 -1.02027329126223e-17 2511.88643151 8.79111946347244e-15 8.26412201976196e-15 -1.02027329126197e-17 3162.277660168 8.79111946347098e-15 8.26412201976956e-15 -1.02027329126246e-17 3981.071705535 8.7911194634712e-15 8.26412201976671e-15 -1.0202732912624e-17 5011.872336273 8.79111946347288e-15 8.26412201976684e-15 -1.02027329126219e-17 6309.573444802 8.79111946347293e-15 8.26412201976681e-15 -1.02027329126237e-17 7943.282347243 8.79111946347139e-15 8.26412201976662e-15 -1.02027329126237e-17 10000 8.79111946347236e-15 8.26412201976711e-15 -1.02027329126229e-17 12589.25411794 8.79111946347398e-15 8.26412201976701e-15 -1.02027329126246e-17 15848.93192461 8.79111946347244e-15 8.26412201976734e-15 -1.02027329126246e-17 19952.62314969 8.79111946347063e-15 8.2641220197651e-15 -1.02027329126223e-17 25118.8643151 8.79111946347244e-15 8.26412201976196e-15 -1.02027329126197e-17 31622.77660168 8.79111946347098e-15 8.26412201976956e-15 -1.02027329126246e-17 39810.71705535 8.7911194634712e-15 8.26412201976671e-15 -1.0202732912624e-17 50118.72336273 8.79111946347288e-15 8.26412201976684e-15 -1.02027329126219e-17 63095.73444802 8.79111946347293e-15 8.26412201976681e-15 -1.02027329126237e-17 79432.82347243 8.79111946347139e-15 8.26412201976662e-15 -1.02027329126237e-17 100000 8.79111946347236e-15 8.26412201976711e-15 -1.02027329126229e-17 125892.5411794 8.79111946347398e-15 8.26412201976701e-15 -1.02027329126246e-17 158489.3192461 8.79111946347244e-15 8.26412201976734e-15 -1.02027329126246e-17 199526.2314969 8.79111946347063e-15 8.2641220197651e-15 -1.02027329126223e-17 251188.643151 8.79111946347244e-15 8.26412201976196e-15 -1.02027329126197e-17 316227.7660168 8.79111946347098e-15 8.26412201976956e-15 -1.02027329126246e-17 398107.1705535 8.7911194634712e-15 8.26412201976671e-15 -1.0202732912624e-17 501187.2336273 8.79111946347288e-15 8.26412201976684e-15 -1.02027329126219e-17 630957.3444802 8.79111946347293e-15 8.26412201976681e-15 -1.02027329126237e-17 794328.2347243 8.79111946347139e-15 8.26412201976662e-15 -1.02027329126237e-17 1000000 8.79111946347236e-15 8.26412201976711e-15 -1.02027329126229e-17 1258925.411794 8.79111946347398e-15 8.26412201976701e-15 -1.02027329126246e-17 1584893.192461 8.79111946347244e-15 8.26412201976734e-15 -1.02027329126246e-17 1995262.314969 8.79111946347063e-15 8.2641220197651e-15 -1.02027329126223e-17 2511886.43151 8.79111946347244e-15 8.26412201976196e-15 -1.02027329126197e-17 3162277.660168 8.79111946347098e-15 8.26412201976453e-15 -1.02027329126246e-17 3981071.705535 8.7911194634712e-15 8.2641220197667e-15 -1.0202732912624e-17 5011872.336273 8.79111946346971e-15 8.26412201976367e-15 -1.02027329126219e-17 6309573.444802 8.79111946347041e-15 8.26412201976429e-15 -1.02027329126211e-17 7943282.347243 8.79111946346939e-15 8.26412201976262e-15 -1.02027329126217e-17 10000000 8.79111946346917e-15 8.26412201976234e-15 -1.02027329126197e-17 12589254.11794 8.79111946346892e-15 8.26412201975942e-15 -1.02027329126196e-17 15848931.92461 8.79111946346642e-15 8.26412201975428e-15 -1.02027329126146e-17 19952623.14969 8.79111946346265e-15 8.26412201974914e-15 -1.02027329126063e-17 25118864.3151 8.79111946345343e-15 8.26412201973661e-15 -1.02027329126007e-17 31622776.60168 8.79111946344581e-15 8.26412201971923e-15 -1.02027329125944e-17 39810717.05535 8.79111946343123e-15 8.26412201969075e-15 -1.02027329125721e-17 50118723.36273 8.79111946340302e-15 8.264122019643e-15 -1.02027329125425e-17 63095734.44802 8.79111946336447e-15 8.26412201957259e-15 -1.02027329124975e-17 79432823.47243 8.79111946330108e-15 8.26412201945806e-15 -1.02027329124253e-17 100000000 8.7911194632018e-15 8.26412201927692e-15 -1.02027329123078e-17 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Ig1_vb0_jd.standard0000644000265600020320000010243012264261473024405 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -4.426305830110e-10 0.000000000000e+00 4.426285730315e-10 2.010000000000e-15 -1.500000000000e+00 -1.045835378130e-06 0.000000000000e+00 1.045835376120e-06 2.010000000000e-15 -2.000000000000e+00 -1.075424321573e-05 0.000000000000e+00 1.075424321372e-05 2.010000000000e-15 -2.500000000000e+00 -3.224821476714e-05 0.000000000000e+00 3.224821476513e-05 2.010000000000e-15 -3.000000000000e+00 -6.493525409132e-05 0.000000000000e+00 6.493525408931e-05 2.010000000000e-15 -3.500000000000e+00 -1.075135259372e-04 0.000000000000e+00 1.075135259352e-04 2.010000000000e-15 -4.000000000000e+00 -1.549540899400e-04 0.000000000000e+00 1.549540899380e-04 2.010000000000e-15 -4.500000000000e+00 -1.998680783237e-04 0.000000000000e+00 1.998680783217e-04 2.010000000000e-15 -5.000000000000e+00 -2.402803896219e-04 0.000000000000e+00 2.402803896199e-04 2.010000000000e-15 -5.500000000000e+00 -2.759018292818e-04 0.000000000000e+00 2.759018292798e-04 2.010000000000e-15 -6.000000000000e+00 -3.070720919927e-04 0.000000000000e+00 3.070720919907e-04 2.010000000000e-15 -6.500000000000e+00 -3.343409577657e-04 0.000000000000e+00 3.343409577637e-04 2.010000000000e-15 -7.000000000000e+00 -3.582781586319e-04 0.000000000000e+00 3.582781586299e-04 2.010000000000e-15 -7.500000000000e+00 -3.793986597804e-04 0.000000000000e+00 3.793986597784e-04 2.010000000000e-15 -8.000000000000e+00 -3.981420215903e-04 0.000000000000e+00 3.981420215883e-04 2.010000000000e-15 -8.500000000000e+00 -4.148741243924e-04 0.000000000000e+00 4.148741243904e-04 2.010000000000e-15 -9.000000000000e+00 -4.298965309103e-04 0.000000000000e+00 4.298965309083e-04 2.010000000000e-15 -9.500000000000e+00 -4.434572876614e-04 0.000000000000e+00 4.434572876594e-04 2.010000000000e-15 -1.000000000000e+01 -4.557608501611e-04 0.000000000000e+00 4.557608501591e-04 2.010000000000e-15 -1.050000000000e+01 -4.669764647811e-04 0.000000000000e+00 4.669764647791e-04 2.010000000000e-15 -1.100000000000e+01 -4.772449865338e-04 0.000000000000e+00 4.772449865318e-04 2.010000000000e-15 -1.150000000000e+01 -4.866843311512e-04 0.000000000000e+00 4.866843311492e-04 2.010000000000e-15 -1.200000000000e+01 -4.953938059813e-04 0.000000000000e+00 4.953938059793e-04 2.010000000000e-15 -1.250000000000e+01 -5.034575464780e-04 0.000000000000e+00 5.034575464760e-04 2.010000000000e-15 -1.300000000000e+01 -5.109472485641e-04 0.000000000000e+00 5.109472485620e-04 2.010000000000e-15 -1.350000000000e+01 -5.179243494658e-04 0.000000000000e+00 5.179243494638e-04 2.010000000000e-15 -1.400000000000e+01 -5.244417767624e-04 0.000000000000e+00 5.244417767603e-04 2.010000000000e-15 -1.450000000000e+01 -5.305453586648e-04 0.000000000000e+00 5.305453586628e-04 2.010000000000e-15 -1.500000000000e+01 -5.362749675118e-04 0.000000000000e+00 5.362749675098e-04 2.010000000000e-15 -1.550000000000e+01 -5.416654521995e-04 0.000000000000e+00 5.416654521975e-04 2.010000000000e-15 -1.600000000000e+01 -5.467474027674e-04 0.000000000000e+00 5.467474027654e-04 2.010000000000e-15 -1.650000000000e+01 -5.515477807955e-04 0.000000000000e+00 5.515477807935e-04 2.010000000000e-15 -1.700000000000e+01 -5.560904419304e-04 0.000000000000e+00 5.560904419284e-04 2.010000000000e-15 -1.750000000000e+01 -5.603965712271e-04 0.000000000000e+00 5.603965712251e-04 2.010000000000e-15 -1.800000000000e+01 -5.644850476471e-04 0.000000000000e+00 5.644850476451e-04 2.010000000000e-15 -1.850000000000e+01 -5.683727506902e-04 0.000000000000e+00 5.683727506882e-04 2.010000000000e-15 -1.900000000000e+01 -5.720748195223e-04 0.000000000000e+00 5.720748195203e-04 2.010000000000e-15 -1.950000000000e+01 -5.756048729105e-04 0.000000000000e+00 5.756048729085e-04 2.010000000000e-15 -2.000000000000e+01 -5.789751966756e-04 0.000000000000e+00 5.789751966736e-04 2.010000000000e-15 -1.000000000000e+00 -4.812529578405e-10 0.000000000000e+00 4.812479478646e-10 5.010000000000e-15 -1.500000000000e+00 -1.088538206468e-06 0.000000000000e+00 1.088538201459e-06 5.010000000000e-15 -2.000000000000e+00 -1.097748079615e-05 0.000000000000e+00 1.097748079114e-05 5.010000000000e-15 -2.500000000000e+00 -3.275527023034e-05 0.000000000000e+00 3.275527022533e-05 5.010000000000e-15 -3.000000000000e+00 -6.583141848533e-05 0.000000000000e+00 6.583141848032e-05 5.010000000000e-15 -3.500000000000e+00 -1.089600005448e-04 0.000000000000e+00 1.089600005398e-04 5.010000000000e-15 -4.000000000000e+00 -1.608218382751e-04 0.000000000000e+00 1.608218382701e-04 5.010000000000e-15 -4.500000000000e+00 -2.202055437683e-04 0.000000000000e+00 2.202055437633e-04 5.010000000000e-15 -5.000000000000e+00 -2.860495517129e-04 0.000000000000e+00 2.860495517079e-04 5.010000000000e-15 -5.500000000000e+00 -3.569679017447e-04 0.000000000000e+00 3.569679017397e-04 5.010000000000e-15 -6.000000000000e+00 -4.284786036775e-04 0.000000000000e+00 4.284786036725e-04 5.010000000000e-15 -6.500000000000e+00 -4.972104103581e-04 0.000000000000e+00 4.972104103531e-04 5.010000000000e-15 -7.000000000000e+00 -5.613786001565e-04 0.000000000000e+00 5.613786001515e-04 5.010000000000e-15 -7.500000000000e+00 -6.200532261164e-04 0.000000000000e+00 6.200532261114e-04 5.010000000000e-15 -8.000000000000e+00 -6.729821593481e-04 0.000000000000e+00 6.729821593431e-04 5.010000000000e-15 -8.500000000000e+00 -7.203625168579e-04 0.000000000000e+00 7.203625168529e-04 5.010000000000e-15 -9.000000000000e+00 -7.626352580461e-04 0.000000000000e+00 7.626352580411e-04 5.010000000000e-15 -9.500000000000e+00 -8.003396209908e-04 0.000000000000e+00 8.003396209858e-04 5.010000000000e-15 -1.000000000000e+01 -8.340251385728e-04 0.000000000000e+00 8.340251385678e-04 5.010000000000e-15 -1.050000000000e+01 -8.642059378115e-04 0.000000000000e+00 8.642059378065e-04 5.010000000000e-15 -1.100000000000e+01 -8.913415575936e-04 0.000000000000e+00 8.913415575886e-04 5.010000000000e-15 -1.150000000000e+01 -9.158325081893e-04 0.000000000000e+00 9.158325081843e-04 5.010000000000e-15 -1.200000000000e+01 -9.380231158226e-04 0.000000000000e+00 9.380231158176e-04 5.010000000000e-15 -1.250000000000e+01 -9.582074108535e-04 0.000000000000e+00 9.582074108485e-04 5.010000000000e-15 -1.300000000000e+01 -9.766358430092e-04 0.000000000000e+00 9.766358430042e-04 5.010000000000e-15 -1.350000000000e+01 -9.935217650646e-04 0.000000000000e+00 9.935217650596e-04 5.010000000000e-15 -1.400000000000e+01 -1.009047245815e-03 0.000000000000e+00 1.009047245810e-03 5.010000000000e-15 -1.450000000000e+01 -1.023368085458e-03 0.000000000000e+00 1.023368085453e-03 5.010000000000e-15 -1.500000000000e+01 -1.036618052860e-03 0.000000000000e+00 1.036618052855e-03 5.010000000000e-15 -1.550000000000e+01 -1.048912424654e-03 0.000000000000e+00 1.048912424649e-03 5.010000000000e-15 -1.600000000000e+01 -1.060350924108e-03 0.000000000000e+00 1.060350924103e-03 5.010000000000e-15 -1.650000000000e+01 -1.071020155928e-03 0.000000000000e+00 1.071020155923e-03 5.010000000000e-15 -1.700000000000e+01 -1.080995623308e-03 0.000000000000e+00 1.080995623303e-03 5.010000000000e-15 -1.750000000000e+01 -1.090343401153e-03 0.000000000000e+00 1.090343401148e-03 5.010000000000e-15 -1.800000000000e+01 -1.099121527282e-03 0.000000000000e+00 1.099121527277e-03 5.010000000000e-15 -1.850000000000e+01 -1.107381162472e-03 0.000000000000e+00 1.107381162467e-03 5.010000000000e-15 -1.900000000000e+01 -1.115167560922e-03 0.000000000000e+00 1.115167560917e-03 5.010000000000e-15 -1.950000000000e+01 -1.122520884943e-03 0.000000000000e+00 1.122520884938e-03 5.010000000000e-15 -2.000000000000e+01 -1.129476891344e-03 0.000000000000e+00 1.129476891339e-03 5.010000000000e-15 -1.000000000000e+00 -5.501073446594e-10 0.000000000000e+00 5.500973353280e-10 1.001000000000e-14 -1.500000000000e+00 -1.156146111611e-06 0.000000000000e+00 1.156146101601e-06 1.001000000000e-14 -2.000000000000e+00 -1.129493415971e-05 0.000000000000e+00 1.129493414970e-05 1.001000000000e-14 -2.500000000000e+00 -3.341743532437e-05 0.000000000000e+00 3.341743531436e-05 1.001000000000e-14 -3.000000000000e+00 -6.689126592847e-05 0.000000000000e+00 6.689126591846e-05 1.001000000000e-14 -3.500000000000e+00 -1.104531829802e-04 0.000000000000e+00 1.104531829702e-04 1.001000000000e-14 -4.000000000000e+00 -1.627865514844e-04 0.000000000000e+00 1.627865514744e-04 1.001000000000e-14 -4.500000000000e+00 -2.226970690102e-04 0.000000000000e+00 2.226970690002e-04 1.001000000000e-14 -5.000000000000e+00 -2.891471633121e-04 0.000000000000e+00 2.891471633020e-04 1.001000000000e-14 -5.500000000000e+00 -3.612436482790e-04 0.000000000000e+00 3.612436482690e-04 1.001000000000e-14 -6.000000000000e+00 -4.382135426671e-04 0.000000000000e+00 4.382135426571e-04 1.001000000000e-14 -6.500000000000e+00 -5.193798936692e-04 0.000000000000e+00 5.193798936592e-04 1.001000000000e-14 -7.000000000000e+00 -6.041387329433e-04 0.000000000000e+00 6.041387329332e-04 1.001000000000e-14 -7.500000000000e+00 -6.913476308938e-04 0.000000000000e+00 6.913476308838e-04 1.001000000000e-14 -8.000000000000e+00 -7.782565534369e-04 0.000000000000e+00 7.782565534269e-04 1.001000000000e-14 -8.500000000000e+00 -8.628250837783e-04 0.000000000000e+00 8.628250837683e-04 1.001000000000e-14 -9.000000000000e+00 -9.434259667445e-04 0.000000000000e+00 9.434259667345e-04 1.001000000000e-14 -9.500000000000e+00 -1.018785915702e-03 0.000000000000e+00 1.018785915692e-03 1.001000000000e-14 -1.000000000000e+01 -1.088108718671e-03 0.000000000000e+00 1.088108718661e-03 1.001000000000e-14 -1.050000000000e+01 -1.151092237530e-03 0.000000000000e+00 1.151092237520e-03 1.001000000000e-14 -1.100000000000e+01 -1.207838433099e-03 0.000000000000e+00 1.207838433089e-03 1.001000000000e-14 -1.150000000000e+01 -1.258719336258e-03 0.000000000000e+00 1.258719336248e-03 1.001000000000e-14 -1.200000000000e+01 -1.304251787793e-03 0.000000000000e+00 1.304251787783e-03 1.001000000000e-14 -1.250000000000e+01 -1.345004116390e-03 0.000000000000e+00 1.345004116380e-03 1.001000000000e-14 -1.300000000000e+01 -1.381536907529e-03 0.000000000000e+00 1.381536907519e-03 1.001000000000e-14 -1.350000000000e+01 -1.414370787045e-03 0.000000000000e+00 1.414370787035e-03 1.001000000000e-14 -1.400000000000e+01 -1.443972383344e-03 0.000000000000e+00 1.443972383334e-03 1.001000000000e-14 -1.450000000000e+01 -1.470751138815e-03 0.000000000000e+00 1.470751138805e-03 1.001000000000e-14 -1.500000000000e+01 -1.495061897328e-03 0.000000000000e+00 1.495061897318e-03 1.001000000000e-14 -1.550000000000e+01 -1.517210128998e-03 0.000000000000e+00 1.517210128988e-03 1.001000000000e-14 -1.600000000000e+01 -1.537458010162e-03 0.000000000000e+00 1.537458010152e-03 1.001000000000e-14 -1.650000000000e+01 -1.556030429024e-03 0.000000000000e+00 1.556030429014e-03 1.001000000000e-14 -1.700000000000e+01 -1.573120484933e-03 0.000000000000e+00 1.573120484923e-03 1.001000000000e-14 -1.750000000000e+01 -1.588894322540e-03 0.000000000000e+00 1.588894322530e-03 1.001000000000e-14 -1.800000000000e+01 -1.603495282916e-03 0.000000000000e+00 1.603495282906e-03 1.001000000000e-14 -1.850000000000e+01 -1.617047419833e-03 0.000000000000e+00 1.617047419823e-03 1.001000000000e-14 -1.900000000000e+01 -1.629658455467e-03 0.000000000000e+00 1.629658455457e-03 1.001000000000e-14 -1.950000000000e+01 -1.641422255136e-03 0.000000000000e+00 1.641422255126e-03 1.001000000000e-14 -2.000000000000e+01 -1.652420896310e-03 0.000000000000e+00 1.652420896300e-03 1.001000000000e-14 -1.000000000000e+00 -1.995775506664e-13 0.000000000000e+00 1.975774957398e-13 2.000000000751e-15 -1.500000000000e+00 -1.047392721439e-07 0.000000000000e+00 1.047392701440e-07 2.000000000751e-15 -2.000000000000e+00 -8.606809638312e-06 0.000000000000e+00 8.606809636311e-06 2.000000000751e-15 -2.500000000000e+00 -3.511156102829e-05 0.000000000000e+00 3.511156102629e-05 2.000000000751e-15 -3.000000000000e+00 -7.874886622083e-05 0.000000000000e+00 7.874886621883e-05 2.000000000751e-15 -3.500000000000e+00 -1.368423102713e-04 0.000000000000e+00 1.368423102693e-04 2.000000000751e-15 -4.000000000000e+00 -2.025558671519e-04 0.000000000000e+00 2.025558671499e-04 2.000000000751e-15 -4.500000000000e+00 -2.620271152275e-04 0.000000000000e+00 2.620271152255e-04 2.000000000751e-15 -5.000000000000e+00 -3.127336282177e-04 0.000000000000e+00 3.127336282157e-04 2.000000000751e-15 -5.500000000000e+00 -3.552269394909e-04 0.000000000000e+00 3.552269394889e-04 2.000000000751e-15 -6.000000000000e+00 -3.907585785533e-04 0.000000000000e+00 3.907585785513e-04 2.000000000751e-15 -6.500000000000e+00 -4.206174198113e-04 0.000000000000e+00 4.206174198093e-04 2.000000000751e-15 -7.000000000000e+00 -4.459130672226e-04 0.000000000000e+00 4.459130672206e-04 2.000000000751e-15 -7.500000000000e+00 -4.675397642210e-04 0.000000000000e+00 4.675397642190e-04 2.000000000751e-15 -8.000000000000e+00 -4.862005267696e-04 0.000000000000e+00 4.862005267676e-04 2.000000000751e-15 -8.500000000000e+00 -5.024443547921e-04 0.000000000000e+00 5.024443547901e-04 2.000000000751e-15 -9.000000000000e+00 -5.167007886426e-04 0.000000000000e+00 5.167007886406e-04 2.000000000751e-15 -9.500000000000e+00 -5.293079355252e-04 0.000000000000e+00 5.293079355232e-04 2.000000000751e-15 -1.000000000000e+01 -5.405340554879e-04 0.000000000000e+00 5.405340554859e-04 2.000000000751e-15 -1.050000000000e+01 -5.505938538384e-04 0.000000000000e+00 5.505938538364e-04 2.000000000751e-15 -1.100000000000e+01 -5.596607050953e-04 0.000000000000e+00 5.596607050933e-04 2.000000000751e-15 -1.150000000000e+01 -5.678758351542e-04 0.000000000000e+00 5.678758351522e-04 2.000000000751e-15 -1.200000000000e+01 -5.753552522497e-04 0.000000000000e+00 5.753552522477e-04 2.000000000751e-15 -1.250000000000e+01 -5.821950142871e-04 0.000000000000e+00 5.821950142851e-04 2.000000000751e-15 -1.300000000000e+01 -5.884752629307e-04 0.000000000000e+00 5.884752629287e-04 2.000000000751e-15 -1.350000000000e+01 -5.942633383703e-04 0.000000000000e+00 5.942633383683e-04 2.000000000751e-15 -1.400000000000e+01 -5.996162040215e-04 0.000000000000e+00 5.996162040195e-04 2.000000000751e-15 -1.450000000000e+01 -6.045823493142e-04 0.000000000000e+00 6.045823493122e-04 2.000000000751e-15 -1.500000000000e+01 -6.092032946398e-04 0.000000000000e+00 6.092032946378e-04 2.000000000751e-15 -1.550000000000e+01 -6.135147906487e-04 0.000000000000e+00 6.135147906467e-04 2.000000000751e-15 -1.600000000000e+01 -6.175477808992e-04 0.000000000000e+00 6.175477808972e-04 2.000000000751e-15 -1.650000000000e+01 -6.213291798992e-04 0.000000000000e+00 6.213291798972e-04 2.000000000751e-15 -1.700000000000e+01 -6.248825060867e-04 0.000000000000e+00 6.248825060847e-04 2.000000000751e-15 -1.750000000000e+01 -6.282284000231e-04 0.000000000000e+00 6.282284000211e-04 2.000000000751e-15 -1.800000000000e+01 -6.313850511426e-04 0.000000000000e+00 6.313850511406e-04 2.000000000751e-15 -1.850000000000e+01 -6.343685511880e-04 0.000000000000e+00 6.343685511860e-04 2.000000000751e-15 -1.900000000000e+01 -6.371931885027e-04 0.000000000000e+00 6.371931885007e-04 2.000000000751e-15 -1.950000000000e+01 -6.398716943336e-04 0.000000000000e+00 6.398716943316e-04 2.000000000751e-15 -2.000000000000e+01 -6.424154499750e-04 0.000000000000e+00 6.424154499730e-04 2.000000000751e-15 -1.000000000000e+00 -2.254967046422e-13 0.000000000000e+00 2.204968259733e-13 5.000000000751e-15 -1.500000000000e+00 -1.142990938541e-07 0.000000000000e+00 1.142990888541e-07 5.000000000751e-15 -2.000000000000e+00 -8.824565543768e-06 0.000000000000e+00 8.824565538768e-06 5.000000000751e-15 -2.500000000000e+00 -3.570621308578e-05 0.000000000000e+00 3.570621308078e-05 5.000000000751e-15 -3.000000000000e+00 -7.985695330936e-05 0.000000000000e+00 7.985695330436e-05 5.000000000751e-15 -3.500000000000e+00 -1.386235911312e-04 0.000000000000e+00 1.386235911262e-04 5.000000000751e-15 -4.000000000000e+00 -2.093599794188e-04 0.000000000000e+00 2.093599794138e-04 5.000000000751e-15 -4.500000000000e+00 -2.898015849077e-04 0.000000000000e+00 2.898015849027e-04 5.000000000751e-15 -5.000000000000e+00 -3.780795110067e-04 0.000000000000e+00 3.780795110017e-04 5.000000000751e-15 -5.500000000000e+00 -4.718415655984e-04 0.000000000000e+00 4.718415655934e-04 5.000000000751e-15 -6.000000000000e+00 -5.628163824802e-04 0.000000000000e+00 5.628163824752e-04 5.000000000751e-15 -6.500000000000e+00 -6.460958786933e-04 0.000000000000e+00 6.460958786883e-04 5.000000000751e-15 -7.000000000000e+00 -7.199971649255e-04 0.000000000000e+00 7.199971649205e-04 5.000000000751e-15 -7.500000000000e+00 -7.843324346099e-04 0.000000000000e+00 7.843324346049e-04 5.000000000751e-15 -8.000000000000e+00 -8.398107688100e-04 0.000000000000e+00 8.398107688050e-04 5.000000000751e-15 -8.500000000000e+00 -8.875245316811e-04 0.000000000000e+00 8.875245316761e-04 5.000000000751e-15 -9.000000000000e+00 -9.286296880942e-04 0.000000000000e+00 9.286296880892e-04 5.000000000751e-15 -9.500000000000e+00 -9.641904216691e-04 0.000000000000e+00 9.641904216641e-04 5.000000000751e-15 -1.000000000000e+01 -9.951239857045e-04 0.000000000000e+00 9.951239856995e-04 5.000000000751e-15 -1.050000000000e+01 -1.022195556412e-03 0.000000000000e+00 1.022195556407e-03 5.000000000751e-15 -1.100000000000e+01 -1.046033632550e-03 0.000000000000e+00 1.046033632545e-03 5.000000000751e-15 -1.150000000000e+01 -1.067151360517e-03 0.000000000000e+00 1.067151360512e-03 5.000000000751e-15 -1.200000000000e+01 -1.085967450634e-03 0.000000000000e+00 1.085967450629e-03 5.000000000751e-15 -1.250000000000e+01 -1.102824405173e-03 0.000000000000e+00 1.102824405168e-03 5.000000000751e-15 -1.300000000000e+01 -1.118003577350e-03 0.000000000000e+00 1.118003577345e-03 5.000000000751e-15 -1.350000000000e+01 -1.131737291484e-03 0.000000000000e+00 1.131737291479e-03 5.000000000751e-15 -1.400000000000e+01 -1.144218477014e-03 0.000000000000e+00 1.144218477009e-03 5.000000000751e-15 -1.450000000000e+01 -1.155608288381e-03 0.000000000000e+00 1.155608288376e-03 5.000000000751e-15 -1.500000000000e+01 -1.166042128123e-03 0.000000000000e+00 1.166042128118e-03 5.000000000751e-15 -1.550000000000e+01 -1.175634417134e-03 0.000000000000e+00 1.175634417129e-03 5.000000000751e-15 -1.600000000000e+01 -1.184482386052e-03 0.000000000000e+00 1.184482386047e-03 5.000000000751e-15 -1.650000000000e+01 -1.192669102087e-03 0.000000000000e+00 1.192669102082e-03 5.000000000751e-15 -1.700000000000e+01 -1.200265897558e-03 0.000000000000e+00 1.200265897553e-03 5.000000000751e-15 -1.750000000000e+01 -1.207334328678e-03 0.000000000000e+00 1.207334328673e-03 5.000000000751e-15 -1.800000000000e+01 -1.213927763982e-03 0.000000000000e+00 1.213927763977e-03 5.000000000751e-15 -1.850000000000e+01 -1.220092679361e-03 0.000000000000e+00 1.220092679356e-03 5.000000000751e-15 -1.900000000000e+01 -1.225869719531e-03 0.000000000000e+00 1.225869719526e-03 5.000000000751e-15 -1.950000000000e+01 -1.231294572586e-03 0.000000000000e+00 1.231294572581e-03 5.000000000751e-15 -2.000000000000e+01 -1.236398694205e-03 0.000000000000e+00 1.236398694200e-03 5.000000000751e-15 -1.000000000000e+00 -2.732640502767e-13 0.000000000000e+00 2.632642442266e-13 1.000000000075e-14 -1.500000000000e+00 -1.310719981726e-07 0.000000000000e+00 1.310719881728e-07 1.000000000075e-14 -2.000000000000e+00 -9.145869843641e-06 0.000000000000e+00 9.145869833642e-06 1.000000000075e-14 -2.500000000000e+00 -3.650296683071e-05 0.000000000000e+00 3.650296682071e-05 1.000000000075e-14 -3.000000000000e+00 -8.119076845006e-05 0.000000000000e+00 8.119076844006e-05 1.000000000075e-14 -3.500000000000e+00 -1.405176931307e-04 0.000000000000e+00 1.405176931207e-04 1.000000000075e-14 -4.000000000000e+00 -2.118449918084e-04 0.000000000000e+00 2.118449917984e-04 1.000000000075e-14 -4.500000000000e+00 -2.929459608956e-04 0.000000000000e+00 2.929459608856e-04 1.000000000075e-14 -5.000000000000e+00 -3.820056040115e-04 0.000000000000e+00 3.820056040015e-04 1.000000000075e-14 -5.500000000000e+00 -4.775419128059e-04 0.000000000000e+00 4.775419127959e-04 1.000000000075e-14 -6.000000000000e+00 -5.783228627168e-04 0.000000000000e+00 5.783228627068e-04 1.000000000075e-14 -6.500000000000e+00 -6.832960267303e-04 0.000000000000e+00 6.832960267203e-04 1.000000000075e-14 -7.000000000000e+00 -7.915189426437e-04 0.000000000000e+00 7.915189426337e-04 1.000000000075e-14 -7.500000000000e+00 -8.999519715060e-04 0.000000000000e+00 8.999519714960e-04 1.000000000075e-14 -8.000000000000e+00 -1.003659831151e-03 0.000000000000e+00 1.003659831141e-03 1.000000000075e-14 -8.500000000000e+00 -1.099885789587e-03 0.000000000000e+00 1.099885789577e-03 1.000000000075e-14 -9.000000000000e+00 -1.186841664084e-03 0.000000000000e+00 1.186841664074e-03 1.000000000075e-14 -9.500000000000e+00 -1.263813880299e-03 0.000000000000e+00 1.263813880289e-03 1.000000000075e-14 -1.000000000000e+01 -1.331029651038e-03 0.000000000000e+00 1.331029651028e-03 1.000000000075e-14 -1.050000000000e+01 -1.389312732568e-03 0.000000000000e+00 1.389312732558e-03 1.000000000075e-14 -1.100000000000e+01 -1.439748638681e-03 0.000000000000e+00 1.439748638671e-03 1.000000000075e-14 -1.150000000000e+01 -1.483457392374e-03 0.000000000000e+00 1.483457392364e-03 1.000000000075e-14 -1.200000000000e+01 -1.521473232623e-03 0.000000000000e+00 1.521473232613e-03 1.000000000075e-14 -1.250000000000e+01 -1.554697302872e-03 0.000000000000e+00 1.554697302862e-03 1.000000000075e-14 -1.300000000000e+01 -1.583890645871e-03 0.000000000000e+00 1.583890645861e-03 1.000000000075e-14 -1.350000000000e+01 -1.609685708908e-03 0.000000000000e+00 1.609685708898e-03 1.000000000075e-14 -1.400000000000e+01 -1.632604283998e-03 0.000000000000e+00 1.632604283988e-03 1.000000000075e-14 -1.450000000000e+01 -1.653076048348e-03 0.000000000000e+00 1.653076048338e-03 1.000000000075e-14 -1.500000000000e+01 -1.671455287621e-03 0.000000000000e+00 1.671455287611e-03 1.000000000075e-14 -1.550000000000e+01 -1.688035067238e-03 0.000000000000e+00 1.688035067228e-03 1.000000000075e-14 -1.600000000000e+01 -1.703058865555e-03 0.000000000000e+00 1.703058865545e-03 1.000000000075e-14 -1.650000000000e+01 -1.716729968503e-03 0.000000000000e+00 1.716729968493e-03 1.000000000075e-14 -1.700000000000e+01 -1.729218997563e-03 0.000000000000e+00 1.729218997553e-03 1.000000000075e-14 -1.750000000000e+01 -1.740669925475e-03 0.000000000000e+00 1.740669925465e-03 1.000000000075e-14 -1.800000000000e+01 -1.751204885141e-03 0.000000000000e+00 1.751204885131e-03 1.000000000075e-14 -1.850000000000e+01 -1.760928022522e-03 0.000000000000e+00 1.760928022512e-03 1.000000000075e-14 -1.900000000000e+01 -1.769928594221e-03 0.000000000000e+00 1.769928594211e-03 1.000000000075e-14 -1.950000000000e+01 -1.778283468259e-03 0.000000000000e+00 1.778283468249e-03 1.000000000075e-14 -2.000000000000e+01 -1.786059152299e-03 0.000000000000e+00 1.786059152289e-03 1.000000000075e-14 -1.000000000000e+00 -2.394765045965e-07 0.000000000000e+00 2.394635488528e-07 1.295574362086e-11 -1.500000000000e+00 -3.880207798900e-06 0.000000000000e+00 3.880194843156e-06 1.295574362086e-11 -2.000000000000e+00 -1.384704141694e-05 0.000000000000e+00 1.384702846120e-05 1.295574362086e-11 -2.500000000000e+00 -3.049618367135e-05 0.000000000000e+00 3.049617071561e-05 1.295574362086e-11 -3.000000000000e+00 -5.354202723396e-05 0.000000000000e+00 5.354201427822e-05 1.295574362086e-11 -3.500000000000e+00 -8.194350118939e-05 0.000000000000e+00 8.194348823364e-05 1.295574362086e-11 -4.000000000000e+00 -1.122283328815e-04 0.000000000000e+00 1.122283199258e-04 1.295574362086e-11 -4.500000000000e+00 -1.419112499179e-04 0.000000000000e+00 1.419112369622e-04 1.295574362086e-11 -5.000000000000e+00 -1.699112609710e-04 0.000000000000e+00 1.699112480152e-04 1.295574362086e-11 -5.500000000000e+00 -1.957984595907e-04 0.000000000000e+00 1.957984466350e-04 1.295574362086e-11 -6.000000000000e+00 -2.194936218749e-04 0.000000000000e+00 2.194936089191e-04 1.295574362086e-11 -6.500000000000e+00 -2.410950477262e-04 0.000000000000e+00 2.410950347704e-04 1.295574362086e-11 -7.000000000000e+00 -2.607781162383e-04 0.000000000000e+00 2.607781032825e-04 1.295574362086e-11 -7.500000000000e+00 -2.787406991034e-04 0.000000000000e+00 2.787406861477e-04 1.295574362086e-11 -8.000000000000e+00 -2.951761591906e-04 0.000000000000e+00 2.951761462348e-04 1.295574362086e-11 -8.500000000000e+00 -3.102616716648e-04 0.000000000000e+00 3.102616587090e-04 1.295574362086e-11 -9.000000000000e+00 -3.241544464999e-04 0.000000000000e+00 3.241544335441e-04 1.295574362086e-11 -9.500000000000e+00 -3.369917284886e-04 0.000000000000e+00 3.369917155329e-04 1.295574362086e-11 -1.000000000000e+01 -3.488924178310e-04 0.000000000000e+00 3.488924048752e-04 1.295574362086e-11 -1.050000000000e+01 -3.599592380819e-04 0.000000000000e+00 3.599592251261e-04 1.295574362086e-11 -1.100000000000e+01 -3.702809470028e-04 0.000000000000e+00 3.702809340471e-04 1.295574362086e-11 -1.150000000000e+01 -3.799343741627e-04 0.000000000000e+00 3.799343612070e-04 1.295574362086e-11 -1.200000000000e+01 -3.889862104035e-04 0.000000000000e+00 3.889861974477e-04 1.295574362086e-11 -1.250000000000e+01 -3.974945403355e-04 0.000000000000e+00 3.974945273797e-04 1.295574362086e-11 -1.300000000000e+01 -4.055101374103e-04 0.000000000000e+00 4.055101244545e-04 1.295574362086e-11 -1.350000000000e+01 -4.130775511175e-04 0.000000000000e+00 4.130775381618e-04 1.295574362086e-11 -1.400000000000e+01 -4.202360172567e-04 0.000000000000e+00 4.202360043009e-04 1.295574362086e-11 -1.450000000000e+01 -4.270202199294e-04 0.000000000000e+00 4.270202069736e-04 1.295574362086e-11 -1.500000000000e+01 -4.334609302698e-04 0.000000000000e+00 4.334609173140e-04 1.295574362086e-11 -1.550000000000e+01 -4.395855430985e-04 0.000000000000e+00 4.395855301428e-04 1.295574362086e-11 -1.600000000000e+01 -4.454185291379e-04 0.000000000000e+00 4.454185161821e-04 1.295574362086e-11 -1.650000000000e+01 -4.509818173330e-04 0.000000000000e+00 4.509818043772e-04 1.295574362086e-11 -1.700000000000e+01 -4.562951192160e-04 0.000000000000e+00 4.562951062602e-04 1.295574362086e-11 -1.750000000000e+01 -4.613762050909e-04 0.000000000000e+00 4.613761921351e-04 1.295574362086e-11 -1.800000000000e+01 -4.662411400490e-04 0.000000000000e+00 4.662411270933e-04 1.295574362086e-11 -1.850000000000e+01 -4.709044863833e-04 0.000000000000e+00 4.709044734276e-04 1.295574362086e-11 -1.900000000000e+01 -4.753794778006e-04 0.000000000000e+00 4.753794648449e-04 1.295574362086e-11 -1.950000000000e+01 -4.796781698794e-04 0.000000000000e+00 4.796781569237e-04 1.295574362086e-11 -2.000000000000e+01 -4.838115704504e-04 0.000000000000e+00 4.838115574947e-04 1.295574362086e-11 -1.000000000000e+00 -2.503645957390e-07 0.000000000000e+00 2.503516369954e-07 1.295874362086e-11 -1.500000000000e+00 -3.969304758928e-06 0.000000000000e+00 3.969291800184e-06 1.295874362086e-11 -2.000000000000e+00 -1.407781811273e-05 0.000000000000e+00 1.407780515399e-05 1.295874362086e-11 -2.500000000000e+00 -3.092817132115e-05 0.000000000000e+00 3.092815836240e-05 1.295874362086e-11 -3.000000000000e+00 -5.425215519412e-05 0.000000000000e+00 5.425214223538e-05 1.295874362086e-11 -3.500000000000e+00 -8.359429807980e-05 0.000000000000e+00 8.359428512105e-05 1.295874362086e-11 -4.000000000000e+00 -1.184463788917e-04 0.000000000000e+00 1.184463659329e-04 1.295874362086e-11 -4.500000000000e+00 -1.583046125314e-04 0.000000000000e+00 1.583045995727e-04 1.295874362086e-11 -5.000000000000e+00 -2.026668507322e-04 0.000000000000e+00 2.026668377734e-04 1.295874362086e-11 -5.500000000000e+00 -2.503979514692e-04 0.000000000000e+00 2.503979385104e-04 1.295874362086e-11 -6.000000000000e+00 -2.995259422887e-04 0.000000000000e+00 2.995259293300e-04 1.295874362086e-11 -6.500000000000e+00 -3.485820300281e-04 0.000000000000e+00 3.485820170694e-04 1.295874362086e-11 -7.000000000000e+00 -3.964519756277e-04 0.000000000000e+00 3.964519626690e-04 1.295874362086e-11 -7.500000000000e+00 -4.423171567384e-04 0.000000000000e+00 4.423171437797e-04 1.295874362086e-11 -8.000000000000e+00 -4.856530359549e-04 0.000000000000e+00 4.856530229961e-04 1.295874362086e-11 -8.500000000000e+00 -5.261908661433e-04 0.000000000000e+00 5.261908531845e-04 1.295874362086e-11 -9.000000000000e+00 -5.638574413214e-04 0.000000000000e+00 5.638574283627e-04 1.295874362086e-11 -9.500000000000e+00 -5.987136913850e-04 0.000000000000e+00 5.987136784263e-04 1.295874362086e-11 -1.000000000000e+01 -6.309029593451e-04 0.000000000000e+00 6.309029463863e-04 1.295874362086e-11 -1.050000000000e+01 -6.606122381762e-04 0.000000000000e+00 6.606122252174e-04 1.295874362086e-11 -1.100000000000e+01 -6.880456251335e-04 0.000000000000e+00 6.880456121748e-04 1.295874362086e-11 -1.150000000000e+01 -7.134075690515e-04 0.000000000000e+00 7.134075560928e-04 1.295874362086e-11 -1.200000000000e+01 -7.368931904544e-04 0.000000000000e+00 7.368931774957e-04 1.295874362086e-11 -1.250000000000e+01 -7.586833327734e-04 0.000000000000e+00 7.586833198146e-04 1.295874362086e-11 -1.300000000000e+01 -7.789425848267e-04 0.000000000000e+00 7.789425718680e-04 1.295874362086e-11 -1.350000000000e+01 -7.978190597277e-04 0.000000000000e+00 7.978190467689e-04 1.295874362086e-11 -1.400000000000e+01 -8.154451399138e-04 0.000000000000e+00 8.154451269551e-04 1.295874362086e-11 -1.450000000000e+01 -8.319386974748e-04 0.000000000000e+00 8.319386845161e-04 1.295874362086e-11 -1.500000000000e+01 -8.474044975924e-04 0.000000000000e+00 8.474044846336e-04 1.295874362086e-11 -1.550000000000e+01 -8.619356191673e-04 0.000000000000e+00 8.619356062086e-04 1.295874362086e-11 -1.600000000000e+01 -8.756148043741e-04 0.000000000000e+00 8.756147914153e-04 1.295874362086e-11 -1.650000000000e+01 -8.885156952509e-04 0.000000000000e+00 8.885156822921e-04 1.295874362086e-11 -1.700000000000e+01 -9.007039422462e-04 0.000000000000e+00 9.007039292874e-04 1.295874362086e-11 -1.750000000000e+01 -9.122381844929e-04 0.000000000000e+00 9.122381715342e-04 1.295874362086e-11 -1.800000000000e+01 -9.231709092829e-04 0.000000000000e+00 9.231708963241e-04 1.295874362086e-11 -1.850000000000e+01 -9.335492017266e-04 0.000000000000e+00 9.335491887678e-04 1.295874362086e-11 -1.900000000000e+01 -9.434153967183e-04 0.000000000000e+00 9.434153837595e-04 1.295874362086e-11 -1.950000000000e+01 -9.528076451647e-04 0.000000000000e+00 9.528076322059e-04 1.295874362086e-11 -2.000000000000e+01 -9.617604056216e-04 0.000000000000e+00 9.617603926629e-04 1.295874362086e-11 -1.000000000000e+00 -2.679157279995e-07 0.000000000000e+00 2.679027642556e-07 1.296374362086e-11 -1.500000000000e+00 -4.098957571587e-06 0.000000000000e+00 4.098944607843e-06 1.296374362086e-11 -2.000000000000e+00 -1.438983089187e-05 0.000000000000e+00 1.438981792813e-05 1.296374362086e-11 -2.500000000000e+00 -3.147059021097e-05 0.000000000000e+00 3.147057724722e-05 1.296374362086e-11 -3.000000000000e+00 -5.506185095719e-05 0.000000000000e+00 5.506183799344e-05 1.296374362086e-11 -3.500000000000e+00 -8.470415833373e-05 0.000000000000e+00 8.470414536999e-05 1.296374362086e-11 -4.000000000000e+00 -1.198920513495e-04 0.000000000000e+00 1.198920383858e-04 1.296374362086e-11 -4.500000000000e+00 -1.601299812084e-04 0.000000000000e+00 1.601299682447e-04 1.296374362086e-11 -5.000000000000e+00 -2.049544288261e-04 0.000000000000e+00 2.049544158624e-04 1.296374362086e-11 -5.500000000000e+00 -2.539402570986e-04 0.000000000000e+00 2.539402441349e-04 1.296374362086e-11 -6.000000000000e+00 -3.067000803184e-04 0.000000000000e+00 3.067000673546e-04 1.296374362086e-11 -6.500000000000e+00 -3.628805866945e-04 0.000000000000e+00 3.628805737308e-04 1.296374362086e-11 -7.000000000000e+00 -4.221353221037e-04 0.000000000000e+00 4.221353091399e-04 1.296374362086e-11 -7.500000000000e+00 -4.837979162774e-04 0.000000000000e+00 4.837979033137e-04 1.296374362086e-11 -8.000000000000e+00 -5.467990819436e-04 0.000000000000e+00 5.467990689798e-04 1.296374362086e-11 -8.500000000000e+00 -6.102085241139e-04 0.000000000000e+00 6.102085111501e-04 1.296374362086e-11 -9.000000000000e+00 -6.731646820765e-04 0.000000000000e+00 6.731646691127e-04 1.296374362086e-11 -9.500000000000e+00 -7.348498012188e-04 0.000000000000e+00 7.348497882551e-04 1.296374362086e-11 -1.000000000000e+01 -7.945322163061e-04 0.000000000000e+00 7.945322033424e-04 1.296374362086e-11 -1.050000000000e+01 -8.516159644888e-04 0.000000000000e+00 8.516159515251e-04 1.296374362086e-11 -1.100000000000e+01 -9.056731474782e-04 0.000000000000e+00 9.056731345144e-04 1.296374362086e-11 -1.150000000000e+01 -9.564497215349e-04 0.000000000000e+00 9.564497085711e-04 1.296374362086e-11 -1.200000000000e+01 -1.003848079119e-03 0.000000000000e+00 1.003848066155e-03 1.296374362086e-11 -1.250000000000e+01 -1.047896129305e-03 0.000000000000e+00 1.047896116341e-03 1.296374362086e-11 -1.300000000000e+01 -1.088712515453e-03 0.000000000000e+00 1.088712502489e-03 1.296374362086e-11 -1.350000000000e+01 -1.126474523000e-03 0.000000000000e+00 1.126474510036e-03 1.296374362086e-11 -1.400000000000e+01 -1.161391903817e-03 0.000000000000e+00 1.161391890853e-03 1.296374362086e-11 -1.450000000000e+01 -1.193687409393e-03 0.000000000000e+00 1.193687396429e-03 1.296374362086e-11 -1.500000000000e+01 -1.223583428574e-03 0.000000000000e+00 1.223583415611e-03 1.296374362086e-11 -1.550000000000e+01 -1.251293536701e-03 0.000000000000e+00 1.251293523737e-03 1.296374362086e-11 -1.600000000000e+01 -1.277017676543e-03 0.000000000000e+00 1.277017663580e-03 1.296374362086e-11 -1.650000000000e+01 -1.300939853659e-03 0.000000000000e+00 1.300939840695e-03 1.296374362086e-11 -1.700000000000e+01 -1.323227473670e-03 0.000000000000e+00 1.323227460707e-03 1.296374362086e-11 -1.750000000000e+01 -1.344031688234e-03 0.000000000000e+00 1.344031675270e-03 1.296374362086e-11 -1.800000000000e+01 -1.363488314216e-03 0.000000000000e+00 1.363488301252e-03 1.296374362086e-11 -1.850000000000e+01 -1.381719039591e-03 0.000000000000e+00 1.381719026627e-03 1.296374362086e-11 -1.900000000000e+01 -1.398832735325e-03 0.000000000000e+00 1.398832722361e-03 1.296374362086e-11 -1.950000000000e+01 -1.414926764461e-03 0.000000000000e+00 1.414926751497e-03 1.296374362086e-11 -2.000000000000e+01 -1.430088226899e-03 0.000000000000e+00 1.430088213935e-03 1.296374362086e-11 ngspice-26/tests/hisimhv1/pmos/reference/acVd.standard0000644000265600020320000000644112264261473022443 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -1 3.144031259584e-05 7.048475704377e-05 3.3384604552829e-14 2.48332828025793e-14 -2 6.191781042322e-05 2.525740356879e-05 3.75261124168689e-14 1.66922691164995e-14 -3 8.108998943700e-05 5.192347693522e-06 3.79085436745889e-14 1.20390865561596e-14 -4 8.766973021056e-05 1.895875331175e-07 3.76072306833289e-14 1.09364910837397e-14 -5 8.780793181625e-05 1.262920750176e-07 3.69610343334589e-14 7.97497235382377e-15 -6 8.787574821937e-05 1.068738619550e-07 3.61075057153689e-14 4.61307037910987e-15 -7 8.793064867153e-05 9.435472098876e-08 3.58744075166989e-14 3.62554090836789e-15 -8 8.797695307436e-05 8.577238756790e-08 3.5763111608879e-14 3.11584527700291e-15 -9 8.801740312786e-05 7.953619566919e-08 3.5697792035599e-14 2.79195895729392e-15 -10 8.805370374338e-05 7.477879934703e-08 3.5655253655589e-14 2.56292058605893e-15 -11 8.808693845710e-05 7.100563445322e-08 3.5625782012819e-14 2.38995651918893e-15 -12 8.811782068677e-05 6.791982555147e-08 3.5604530840039e-14 2.25338048094493e-15 -13 8.814683821969e-05 6.533412061171e-08 3.5588792173919e-14 2.14199589252094e-15 -14 8.817433675593e-05 6.312500321976e-08 3.5576926848249e-14 2.04890297290594e-15 -15 8.820056940086e-05 6.120772467311e-08 3.5567881675639e-14 1.96958739786994e-15 -16 8.822572689080e-05 5.952211095994e-08 3.5560947944899e-14 1.90095494677194e-15 -17 8.824995664378e-05 5.802415325897e-08 3.5555630816559e-14 1.84080435073195e-15 -18 8.827337513905e-05 5.668083150095e-08 3.5551574205309e-14 1.78752113526795e-15 -19 8.829607619562e-05 5.546681582395e-08 3.5548515364389e-14 1.73989070024895e-15 -20 8.831813665679e-05 5.436229809575e-08 3.5546256268769e-14 1.69697937519195e-15 -1 1.887412895756e-05 4.562313027364e-05 3.18802130992291e-14 2.53816956393293e-14 -2 3.668872387618e-05 1.724385407932e-05 3.65358024886389e-14 1.70323183633495e-14 -3 4.780298987052e-05 4.649481281734e-06 3.75239995227589e-14 1.21474183714596e-14 -4 5.261942179185e-05 6.846525056595e-07 3.75691101432589e-14 1.08657458822897e-14 -5 5.356472667565e-05 9.018386234647e-08 3.68917748962389e-14 7.40425353013378e-15 -6 5.362064170215e-05 6.974078938578e-08 3.64269035730189e-14 4.51449090872887e-15 -7 5.365450881465e-05 6.145165942122e-08 3.62907038272489e-14 3.58594012585389e-15 -8 5.368292047713e-05 5.583102833160e-08 3.62234450817389e-14 3.09522804779691e-15 -9 5.370776395408e-05 5.173944279784e-08 3.61829160456389e-14 2.77996743617692e-15 -10 5.373007954426e-05 4.861143258007e-08 3.61558228516789e-14 2.55560314902793e-15 -11 5.375052343691e-05 4.612637017362e-08 3.61365041352589e-14 2.38545927522993e-15 -12 5.376952813087e-05 4.409147266000e-08 3.61221054356289e-14 2.25071256765093e-15 -13 5.378738995954e-05 4.238482121088e-08 3.61110200105489e-14 2.14057775149094e-15 -14 5.380431937893e-05 4.092578346500e-08 3.61022700377489e-14 2.04837242266294e-15 -15 5.382047076777e-05 3.965890476535e-08 3.60952246679789e-14 1.96970633464494e-15 -16 5.383596065717e-05 3.854473133572e-08 3.60894580126989e-14 1.90156044202494e-15 -17 5.385087924276e-05 3.755435954258e-08 3.60846719260789e-14 1.84178124358495e-15 -18 5.386529787977e-05 3.666607252312e-08 3.60806513989489e-14 1.78878582155395e-15 -19 5.387927410405e-05 3.586319206303e-08 3.60772374935689e-14 1.74138110956995e-15 -20 5.389285508545e-05 3.513266346957e-08 3.60743102384689e-14 1.69864853951295e-15 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Id1_vb0.standard0000644000265600020320000010243012264261473023725 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.131291551495e-05 0.000000000000e+00 2.131291551395e-05 1.000000000000e-15 -1.500000000000e+00 -2.141817876377e-05 0.000000000000e+00 2.141817876227e-05 1.500000000000e-15 -2.000000000000e+00 -2.150848642945e-05 0.000000000000e+00 2.150848642745e-05 2.000000000000e-15 -2.500000000000e+00 -2.159127235586e-05 0.000000000000e+00 2.159127235336e-05 2.500000000000e-15 -3.000000000000e+00 -2.166932108002e-05 0.000000000000e+00 2.166932107702e-05 3.000000000000e-15 -3.500000000000e+00 -2.174402503529e-05 0.000000000000e+00 2.174402503179e-05 3.500000000000e-15 -4.000000000000e+00 -2.181620424660e-05 0.000000000000e+00 2.181620424260e-05 4.000000000000e-15 -4.500000000000e+00 -2.188639255233e-05 0.000000000000e+00 2.188639254783e-05 4.500000000000e-15 -5.000000000000e+00 -2.195496158727e-05 0.000000000000e+00 2.195496158227e-05 5.000000000000e-15 -5.500000000000e+00 -2.202218280766e-05 0.000000000000e+00 2.202218280216e-05 5.500000000000e-15 -6.000000000000e+00 -2.208826181971e-05 0.000000000000e+00 2.208826181371e-05 6.000000000000e-15 -6.500000000000e+00 -2.215335884561e-05 0.000000000000e+00 2.215335883911e-05 6.500000000000e-15 -7.000000000000e+00 -2.221760164034e-05 0.000000000000e+00 2.221760163334e-05 7.000000000000e-15 -7.500000000000e+00 -2.228109401993e-05 0.000000000000e+00 2.228109401243e-05 7.500000000000e-15 -8.000000000000e+00 -2.234392170255e-05 0.000000000000e+00 2.234392169455e-05 8.000000000000e-15 -8.500000000000e+00 -2.240615643283e-05 0.000000000000e+00 2.240615642433e-05 8.500000000000e-15 -9.000000000000e+00 -2.246785896988e-05 0.000000000000e+00 2.246785896088e-05 9.000000000000e-15 -9.500000000000e+00 -2.252908130037e-05 0.000000000000e+00 2.252908129087e-05 9.500000000000e-15 -1.000000000000e+01 -2.258986830940e-05 0.000000000000e+00 2.258986829940e-05 1.000000000000e-14 -1.050000000000e+01 -2.265025906319e-05 0.000000000000e+00 2.265025905269e-05 1.050000000000e-14 -1.100000000000e+01 -2.271028780872e-05 0.000000000000e+00 2.271028779772e-05 1.100000000000e-14 -1.150000000000e+01 -2.276998476297e-05 0.000000000000e+00 2.276998475147e-05 1.150000000000e-14 -1.200000000000e+01 -2.282937674356e-05 0.000000000000e+00 2.282937673156e-05 1.200000000000e-14 -1.250000000000e+01 -2.288848767812e-05 0.000000000000e+00 2.288848766562e-05 1.250000000000e-14 -1.300000000000e+01 -2.294733901965e-05 0.000000000000e+00 2.294733900665e-05 1.300000000000e-14 -1.350000000000e+01 -2.300595008831e-05 0.000000000000e+00 2.300595007481e-05 1.350000000000e-14 -1.400000000000e+01 -2.306433835490e-05 0.000000000000e+00 2.306433834090e-05 1.400000000000e-14 -1.450000000000e+01 -2.312251967778e-05 0.000000000000e+00 2.312251966328e-05 1.450000000000e-14 -1.500000000000e+01 -2.318050850223e-05 0.000000000000e+00 2.318050848723e-05 1.500000000000e-14 -1.550000000000e+01 -2.323831802927e-05 0.000000000000e+00 2.323831801377e-05 1.550000000000e-14 -1.600000000000e+01 -2.329596035947e-05 0.000000000000e+00 2.329596034347e-05 1.600000000000e-14 -1.650000000000e+01 -2.335344661611e-05 0.000000000000e+00 2.335344659961e-05 1.650000000000e-14 -1.700000000000e+01 -2.341078705126e-05 0.000000000000e+00 2.341078703426e-05 1.700000000000e-14 -1.750000000000e+01 -2.346799113752e-05 0.000000000000e+00 2.346799112002e-05 1.750000000000e-14 -1.800000000000e+01 -2.352506764772e-05 0.000000000000e+00 2.352506762972e-05 1.800000000000e-14 -1.850000000000e+01 -2.358202472450e-05 0.000000000000e+00 2.358202470600e-05 1.850000000000e-14 -1.900000000000e+01 -2.363886994129e-05 0.000000000000e+00 2.363886992229e-05 1.900000000000e-14 -1.950000000000e+01 -2.369561035585e-05 0.000000000000e+00 2.369561033635e-05 1.950000000000e-14 -2.000000000000e+01 -2.375225255767e-05 0.000000000000e+00 2.375225253767e-05 2.000000000000e-14 -1.000000000000e+00 -3.124511566869e-04 0.000000000000e+00 3.124511566859e-04 1.000000000000e-15 -1.500000000000e+00 -4.122393106696e-04 0.000000000000e+00 4.122393106681e-04 1.500000000000e-15 -2.000000000000e+00 -4.805607795687e-04 0.000000000000e+00 4.805607795667e-04 2.000000000000e-15 -2.500000000000e+00 -5.241688429084e-04 0.000000000000e+00 5.241688429059e-04 2.500000000000e-15 -3.000000000000e+00 -5.497343764047e-04 0.000000000000e+00 5.497343764017e-04 3.000000000000e-15 -3.500000000000e+00 -5.631550759090e-04 0.000000000000e+00 5.631550759055e-04 3.500000000000e-15 -4.000000000000e+00 -5.691216500222e-04 0.000000000000e+00 5.691216500182e-04 4.000000000000e-15 -4.500000000000e+00 -5.711710278195e-04 0.000000000000e+00 5.711710278150e-04 4.500000000000e-15 -5.000000000000e+00 -5.720991042402e-04 0.000000000000e+00 5.720991042352e-04 5.000000000000e-15 -5.500000000000e+00 -5.729045883798e-04 0.000000000000e+00 5.729045883743e-04 5.500000000000e-15 -6.000000000000e+00 -5.736452204736e-04 0.000000000000e+00 5.736452204676e-04 6.000000000000e-15 -6.500000000000e+00 -5.743337345107e-04 0.000000000000e+00 5.743337345042e-04 6.500000000000e-15 -7.000000000000e+00 -5.749798835438e-04 0.000000000000e+00 5.749798835368e-04 7.000000000000e-15 -7.500000000000e+00 -5.755912759013e-04 0.000000000000e+00 5.755912758938e-04 7.500000000000e-15 -8.000000000000e+00 -5.761738237705e-04 0.000000000000e+00 5.761738237625e-04 8.000000000000e-15 -8.500000000000e+00 -5.767321365431e-04 0.000000000000e+00 5.767321365346e-04 8.500000000000e-15 -9.000000000000e+00 -5.772698359866e-04 0.000000000000e+00 5.772698359776e-04 9.000000000000e-15 -9.500000000000e+00 -5.777897968481e-04 0.000000000000e+00 5.777897968386e-04 9.500000000000e-15 -1.000000000000e+01 -5.782943266142e-04 0.000000000000e+00 5.782943266042e-04 1.000000000000e-14 -1.050000000000e+01 -5.787852988174e-04 0.000000000000e+00 5.787852988069e-04 1.050000000000e-14 -1.100000000000e+01 -5.792642519278e-04 0.000000000000e+00 5.792642519168e-04 1.100000000000e-14 -1.150000000000e+01 -5.797324630650e-04 0.000000000000e+00 5.797324630535e-04 1.150000000000e-14 -1.200000000000e+01 -5.801910033451e-04 0.000000000000e+00 5.801910033331e-04 1.200000000000e-14 -1.250000000000e+01 -5.806407797998e-04 0.000000000000e+00 5.806407797873e-04 1.250000000000e-14 -1.300000000000e+01 -5.810825674263e-04 0.000000000000e+00 5.810825674133e-04 1.300000000000e-14 -1.350000000000e+01 -5.815170339285e-04 0.000000000000e+00 5.815170339150e-04 1.350000000000e-14 -1.400000000000e+01 -5.819447590032e-04 0.000000000000e+00 5.819447589892e-04 1.400000000000e-14 -1.450000000000e+01 -5.823662495167e-04 0.000000000000e+00 5.823662495022e-04 1.450000000000e-14 -1.500000000000e+01 -5.827819515578e-04 0.000000000000e+00 5.827819515428e-04 1.500000000000e-14 -1.550000000000e+01 -5.831922600962e-04 0.000000000000e+00 5.831922600807e-04 1.550000000000e-14 -1.600000000000e+01 -5.835975267883e-04 0.000000000000e+00 5.835975267723e-04 1.600000000000e-14 -1.650000000000e+01 -5.839980663356e-04 0.000000000000e+00 5.839980663191e-04 1.650000000000e-14 -1.700000000000e+01 -5.843941617060e-04 0.000000000000e+00 5.843941616890e-04 1.700000000000e-14 -1.750000000000e+01 -5.847860684512e-04 0.000000000000e+00 5.847860684337e-04 1.750000000000e-14 -1.800000000000e+01 -5.851740183027e-04 0.000000000000e+00 5.851740182847e-04 1.800000000000e-14 -1.850000000000e+01 -5.855582221856e-04 0.000000000000e+00 5.855582221671e-04 1.850000000000e-14 -1.900000000000e+01 -5.859388727608e-04 0.000000000000e+00 5.859388727418e-04 1.900000000000e-14 -1.950000000000e+01 -5.863161465817e-04 0.000000000000e+00 5.863161465622e-04 1.950000000000e-14 -2.000000000000e+01 -5.866902059340e-04 0.000000000000e+00 5.866902059140e-04 2.000000000000e-14 -1.000000000000e+00 -5.105119247563e-04 0.000000000000e+00 5.105119247553e-04 1.000000000000e-15 -1.500000000000e+00 -7.233916278996e-04 0.000000000000e+00 7.233916278981e-04 1.500000000000e-15 -2.000000000000e+00 -9.115217003198e-04 0.000000000000e+00 9.115217003178e-04 2.000000000000e-15 -2.500000000000e+00 -1.077926093746e-03 0.000000000000e+00 1.077926093744e-03 2.500000000000e-15 -3.000000000000e+00 -1.225358437873e-03 0.000000000000e+00 1.225358437870e-03 3.000000000000e-15 -3.500000000000e+00 -1.356203959495e-03 0.000000000000e+00 1.356203959492e-03 3.500000000000e-15 -4.000000000000e+00 -1.472493954239e-03 0.000000000000e+00 1.472493954235e-03 4.000000000000e-15 -4.500000000000e+00 -1.575953041373e-03 0.000000000000e+00 1.575953041368e-03 4.500000000000e-15 -5.000000000000e+00 -1.668050277114e-03 0.000000000000e+00 1.668050277109e-03 5.000000000000e-15 -5.500000000000e+00 -1.750044954664e-03 0.000000000000e+00 1.750044954658e-03 5.500000000000e-15 -6.000000000000e+00 -1.823025006705e-03 0.000000000000e+00 1.823025006699e-03 6.000000000000e-15 -6.500000000000e+00 -1.887938298957e-03 0.000000000000e+00 1.887938298950e-03 6.500000000000e-15 -7.000000000000e+00 -1.945617776796e-03 0.000000000000e+00 1.945617776789e-03 7.000000000000e-15 -7.500000000000e+00 -1.996801510492e-03 0.000000000000e+00 1.996801510484e-03 7.500000000000e-15 -8.000000000000e+00 -2.042148582463e-03 0.000000000000e+00 2.042148582455e-03 8.000000000000e-15 -8.500000000000e+00 -2.082251615162e-03 0.000000000000e+00 2.082251615154e-03 8.500000000000e-15 -9.000000000000e+00 -2.117646597760e-03 0.000000000000e+00 2.117646597751e-03 9.000000000000e-15 -9.500000000000e+00 -2.148820547130e-03 0.000000000000e+00 2.148820547121e-03 9.500000000000e-15 -1.000000000000e+01 -2.176217437302e-03 0.000000000000e+00 2.176217437292e-03 1.000000000000e-14 -1.050000000000e+01 -2.200242753028e-03 0.000000000000e+00 2.200242753017e-03 1.050000000000e-14 -1.100000000000e+01 -2.221266967071e-03 0.000000000000e+00 2.221266967060e-03 1.100000000000e-14 -1.150000000000e+01 -2.239628203556e-03 0.000000000000e+00 2.239628203545e-03 1.150000000000e-14 -1.200000000000e+01 -2.255634323416e-03 0.000000000000e+00 2.255634323404e-03 1.200000000000e-14 -1.250000000000e+01 -2.269564642779e-03 0.000000000000e+00 2.269564642767e-03 1.250000000000e-14 -1.300000000000e+01 -2.281671463077e-03 0.000000000000e+00 2.281671463064e-03 1.300000000000e-14 -1.350000000000e+01 -2.292181550053e-03 0.000000000000e+00 2.292181550039e-03 1.350000000000e-14 -1.400000000000e+01 -2.301297650956e-03 0.000000000000e+00 2.301297650942e-03 1.400000000000e-14 -1.450000000000e+01 -2.309200091986e-03 0.000000000000e+00 2.309200091972e-03 1.450000000000e-14 -1.500000000000e+01 -2.316048481289e-03 0.000000000000e+00 2.316048481274e-03 1.500000000000e-14 -1.550000000000e+01 -2.321983349799e-03 0.000000000000e+00 2.321983349783e-03 1.550000000000e-14 -1.600000000000e+01 -2.327128067722e-03 0.000000000000e+00 2.327128067706e-03 1.600000000000e-14 -1.650000000000e+01 -2.331590463188e-03 0.000000000000e+00 2.331590463171e-03 1.650000000000e-14 -1.700000000000e+01 -2.335464528145e-03 0.000000000000e+00 2.335464528128e-03 1.700000000000e-14 -1.750000000000e+01 -2.338832001476e-03 0.000000000000e+00 2.338832001458e-03 1.750000000000e-14 -1.800000000000e+01 -2.341763841957e-03 0.000000000000e+00 2.341763841939e-03 1.800000000000e-14 -1.850000000000e+01 -2.344321580969e-03 0.000000000000e+00 2.344321580950e-03 1.850000000000e-14 -1.900000000000e+01 -2.346558553250e-03 0.000000000000e+00 2.346558553231e-03 1.900000000000e-14 -1.950000000000e+01 -2.348521011328e-03 0.000000000000e+00 2.348521011308e-03 1.950000000000e-14 -2.000000000000e+01 -2.350249135940e-03 0.000000000000e+00 2.350249135920e-03 2.000000000000e-14 -1.000000000000e+00 -1.703276951058e-05 0.000000000000e+00 1.703276950958e-05 1.000000000000e-15 -1.500000000000e+00 -1.712886427078e-05 0.000000000000e+00 1.712886426928e-05 1.500000000000e-15 -2.000000000000e+00 -1.721361927462e-05 0.000000000000e+00 1.721361927262e-05 2.000000000000e-15 -2.500000000000e+00 -1.729264152510e-05 0.000000000000e+00 1.729264152260e-05 2.500000000000e-15 -3.000000000000e+00 -1.736802961540e-05 0.000000000000e+00 1.736802961240e-05 3.000000000000e-15 -3.500000000000e+00 -1.744084214026e-05 0.000000000000e+00 1.744084213676e-05 3.500000000000e-15 -4.000000000000e+00 -1.751170845579e-05 0.000000000000e+00 1.751170845179e-05 4.000000000000e-15 -4.500000000000e+00 -1.758104161926e-05 0.000000000000e+00 1.758104161476e-05 4.500000000000e-15 -5.000000000000e+00 -1.764913108254e-05 0.000000000000e+00 1.764913107754e-05 5.000000000000e-15 -5.500000000000e+00 -1.771618938884e-05 0.000000000000e+00 1.771618938334e-05 5.500000000000e-15 -6.000000000000e+00 -1.778237820383e-05 0.000000000000e+00 1.778237819783e-05 6.000000000000e-15 -6.500000000000e+00 -1.784782393848e-05 0.000000000000e+00 1.784782393198e-05 6.500000000000e-15 -7.000000000000e+00 -1.791262766781e-05 0.000000000000e+00 1.791262766081e-05 7.000000000000e-15 -7.500000000000e+00 -1.797687171394e-05 0.000000000000e+00 1.797687170644e-05 7.500000000000e-15 -8.000000000000e+00 -1.804062417523e-05 0.000000000000e+00 1.804062416723e-05 8.000000000000e-15 -8.500000000000e+00 -1.810394213700e-05 0.000000000000e+00 1.810394212850e-05 8.500000000000e-15 -9.000000000000e+00 -1.816687400565e-05 0.000000000000e+00 1.816687399665e-05 9.000000000000e-15 -9.500000000000e+00 -1.822946124267e-05 0.000000000000e+00 1.822946123317e-05 9.500000000000e-15 -1.000000000000e+01 -1.829173967728e-05 0.000000000000e+00 1.829173966728e-05 1.000000000000e-14 -1.050000000000e+01 -1.835374051654e-05 0.000000000000e+00 1.835374050604e-05 1.050000000000e-14 -1.100000000000e+01 -1.841549113410e-05 0.000000000000e+00 1.841549112310e-05 1.100000000000e-14 -1.150000000000e+01 -1.847701569422e-05 0.000000000000e+00 1.847701568272e-05 1.150000000000e-14 -1.200000000000e+01 -1.853833565111e-05 0.000000000000e+00 1.853833563911e-05 1.200000000000e-14 -1.250000000000e+01 -1.859947015288e-05 0.000000000000e+00 1.859947014038e-05 1.250000000000e-14 -1.300000000000e+01 -1.866043637141e-05 0.000000000000e+00 1.866043635841e-05 1.300000000000e-14 -1.350000000000e+01 -1.872124977405e-05 0.000000000000e+00 1.872124976055e-05 1.350000000000e-14 -1.400000000000e+01 -1.878192434927e-05 0.000000000000e+00 1.878192433527e-05 1.400000000000e-14 -1.450000000000e+01 -1.884247279540e-05 0.000000000000e+00 1.884247278090e-05 1.450000000000e-14 -1.500000000000e+01 -1.890290667959e-05 0.000000000000e+00 1.890290666459e-05 1.500000000000e-14 -1.550000000000e+01 -1.896323657252e-05 0.000000000000e+00 1.896323655703e-05 1.550000000000e-14 -1.600000000000e+01 -1.902347216330e-05 0.000000000000e+00 1.902347214730e-05 1.600000000000e-14 -1.650000000000e+01 -1.908362235782e-05 0.000000000000e+00 1.908362234132e-05 1.650000000000e-14 -1.700000000000e+01 -1.914369536360e-05 0.000000000000e+00 1.914369534660e-05 1.700000000000e-14 -1.750000000000e+01 -1.920369876318e-05 0.000000000000e+00 1.920369874568e-05 1.750000000000e-14 -1.800000000000e+01 -1.926363957792e-05 0.000000000000e+00 1.926363955992e-05 1.800000000000e-14 -1.850000000000e+01 -1.932352432372e-05 0.000000000000e+00 1.932352430522e-05 1.850000000000e-14 -1.900000000000e+01 -1.938335905983e-05 0.000000000000e+00 1.938335904083e-05 1.900000000000e-14 -1.950000000000e+01 -1.944314943183e-05 0.000000000000e+00 1.944314941233e-05 1.950000000000e-14 -2.000000000000e+01 -1.950290070954e-05 0.000000000000e+00 1.950290068954e-05 2.000000000000e-14 -1.000000000000e+00 -4.014942345805e-04 0.000000000000e+00 4.014942345795e-04 1.000000000000e-15 -1.500000000000e+00 -5.329739479647e-04 0.000000000000e+00 5.329739479632e-04 1.500000000000e-15 -2.000000000000e+00 -6.254672582555e-04 0.000000000000e+00 6.254672582535e-04 2.000000000000e-15 -2.500000000000e+00 -6.864547870933e-04 0.000000000000e+00 6.864547870908e-04 2.500000000000e-15 -3.000000000000e+00 -7.234390715391e-04 0.000000000000e+00 7.234390715361e-04 3.000000000000e-15 -3.500000000000e+00 -7.433975775222e-04 0.000000000000e+00 7.433975775187e-04 3.500000000000e-15 -4.000000000000e+00 -7.522777143309e-04 0.000000000000e+00 7.522777143269e-04 4.000000000000e-15 -4.500000000000e+00 -7.549933905648e-04 0.000000000000e+00 7.549933905603e-04 4.500000000000e-15 -5.000000000000e+00 -7.561590245118e-04 0.000000000000e+00 7.561590245068e-04 5.000000000000e-15 -5.500000000000e+00 -7.572003747507e-04 0.000000000000e+00 7.572003747452e-04 5.500000000000e-15 -6.000000000000e+00 -7.581526366109e-04 0.000000000000e+00 7.581526366049e-04 6.000000000000e-15 -6.500000000000e+00 -7.590325526035e-04 0.000000000000e+00 7.590325525970e-04 6.500000000000e-15 -7.000000000000e+00 -7.598537356070e-04 0.000000000000e+00 7.598537356000e-04 7.000000000000e-15 -7.500000000000e+00 -7.606269445335e-04 0.000000000000e+00 7.606269445260e-04 7.500000000000e-15 -8.000000000000e+00 -7.613605817400e-04 0.000000000000e+00 7.613605817320e-04 8.000000000000e-15 -8.500000000000e+00 -7.620612012040e-04 0.000000000000e+00 7.620612011955e-04 8.500000000000e-15 -9.000000000000e+00 -7.627339406889e-04 0.000000000000e+00 7.627339406799e-04 9.000000000000e-15 -9.500000000000e+00 -7.633828617698e-04 0.000000000000e+00 7.633828617603e-04 9.500000000000e-15 -1.000000000000e+01 -7.640112080131e-04 0.000000000000e+00 7.640112080031e-04 1.000000000000e-14 -1.050000000000e+01 -7.646215980573e-04 0.000000000000e+00 7.646215980468e-04 1.050000000000e-14 -1.100000000000e+01 -7.652161693962e-04 0.000000000000e+00 7.652161693852e-04 1.100000000000e-14 -1.150000000000e+01 -7.657966856529e-04 0.000000000000e+00 7.657966856414e-04 1.150000000000e-14 -1.200000000000e+01 -7.663646170512e-04 0.000000000000e+00 7.663646170392e-04 1.200000000000e-14 -1.250000000000e+01 -7.669212012316e-04 0.000000000000e+00 7.669212012191e-04 1.250000000000e-14 -1.300000000000e+01 -7.674674896104e-04 0.000000000000e+00 7.674674895974e-04 1.300000000000e-14 -1.350000000000e+01 -7.680043830412e-04 0.000000000000e+00 7.680043830277e-04 1.350000000000e-14 -1.400000000000e+01 -7.685326595038e-04 0.000000000000e+00 7.685326594898e-04 1.400000000000e-14 -1.450000000000e+01 -7.690529958045e-04 0.000000000000e+00 7.690529957900e-04 1.450000000000e-14 -1.500000000000e+01 -7.695659847368e-04 0.000000000000e+00 7.695659847218e-04 1.500000000000e-14 -1.550000000000e+01 -7.700721487728e-04 0.000000000000e+00 7.700721487573e-04 1.550000000000e-14 -1.600000000000e+01 -7.705719510805e-04 0.000000000000e+00 7.705719510645e-04 1.600000000000e-14 -1.650000000000e+01 -7.710658044602e-04 0.000000000000e+00 7.710658044437e-04 1.650000000000e-14 -1.700000000000e+01 -7.715540786500e-04 0.000000000000e+00 7.715540786330e-04 1.700000000000e-14 -1.750000000000e+01 -7.720371063432e-04 0.000000000000e+00 7.720371063257e-04 1.750000000000e-14 -1.800000000000e+01 -7.725151881774e-04 0.000000000000e+00 7.725151881594e-04 1.800000000000e-14 -1.850000000000e+01 -7.729885969005e-04 0.000000000000e+00 7.729885968820e-04 1.850000000000e-14 -1.900000000000e+01 -7.734575808708e-04 0.000000000000e+00 7.734575808518e-04 1.900000000000e-14 -1.950000000000e+01 -7.739223670143e-04 0.000000000000e+00 7.739223669948e-04 1.950000000000e-14 -2.000000000000e+01 -7.743831633388e-04 0.000000000000e+00 7.743831633188e-04 2.000000000000e-14 -1.000000000000e+00 -6.065436261274e-04 0.000000000000e+00 6.065436261264e-04 1.000000000000e-15 -1.500000000000e+00 -8.583891596197e-04 0.000000000000e+00 8.583891596182e-04 1.500000000000e-15 -2.000000000000e+00 -1.081068110972e-03 0.000000000000e+00 1.081068110970e-03 2.000000000000e-15 -2.500000000000e+00 -1.278509218709e-03 0.000000000000e+00 1.278509218707e-03 2.500000000000e-15 -3.000000000000e+00 -1.454149853900e-03 0.000000000000e+00 1.454149853897e-03 3.000000000000e-15 -3.500000000000e+00 -1.610897747296e-03 0.000000000000e+00 1.610897747293e-03 3.500000000000e-15 -4.000000000000e+00 -1.751189408455e-03 0.000000000000e+00 1.751189408451e-03 4.000000000000e-15 -4.500000000000e+00 -1.877066741622e-03 0.000000000000e+00 1.877066741617e-03 4.500000000000e-15 -5.000000000000e+00 -1.990247971218e-03 0.000000000000e+00 1.990247971213e-03 5.000000000000e-15 -5.500000000000e+00 -2.092187336821e-03 0.000000000000e+00 2.092187336815e-03 5.500000000000e-15 -6.000000000000e+00 -2.184123690452e-03 0.000000000000e+00 2.184123690446e-03 6.000000000000e-15 -6.500000000000e+00 -2.267119618618e-03 0.000000000000e+00 2.267119618611e-03 6.500000000000e-15 -7.000000000000e+00 -2.342092869560e-03 0.000000000000e+00 2.342092869553e-03 7.000000000000e-15 -7.500000000000e+00 -2.409841642032e-03 0.000000000000e+00 2.409841642024e-03 7.500000000000e-15 -8.000000000000e+00 -2.471064998074e-03 0.000000000000e+00 2.471064998066e-03 8.000000000000e-15 -8.500000000000e+00 -2.526379394861e-03 0.000000000000e+00 2.526379394852e-03 8.500000000000e-15 -9.000000000000e+00 -2.576332112414e-03 0.000000000000e+00 2.576332112405e-03 9.000000000000e-15 -9.500000000000e+00 -2.621412183454e-03 0.000000000000e+00 2.621412183445e-03 9.500000000000e-15 -1.000000000000e+01 -2.662059300844e-03 0.000000000000e+00 2.662059300834e-03 1.000000000000e-14 -1.050000000000e+01 -2.698671078052e-03 0.000000000000e+00 2.698671078041e-03 1.050000000000e-14 -1.100000000000e+01 -2.731608961372e-03 0.000000000000e+00 2.731608961361e-03 1.100000000000e-14 -1.150000000000e+01 -2.761203033320e-03 0.000000000000e+00 2.761203033309e-03 1.150000000000e-14 -1.200000000000e+01 -2.787755900740e-03 0.000000000000e+00 2.787755900728e-03 1.200000000000e-14 -1.250000000000e+01 -2.811545826003e-03 0.000000000000e+00 2.811545825991e-03 1.250000000000e-14 -1.300000000000e+01 -2.832829233570e-03 0.000000000000e+00 2.832829233557e-03 1.300000000000e-14 -1.350000000000e+01 -2.851842705632e-03 0.000000000000e+00 2.851842705619e-03 1.350000000000e-14 -1.400000000000e+01 -2.868804567843e-03 0.000000000000e+00 2.868804567829e-03 1.400000000000e-14 -1.450000000000e+01 -2.883916157018e-03 0.000000000000e+00 2.883916157003e-03 1.450000000000e-14 -1.500000000000e+01 -2.897362854783e-03 0.000000000000e+00 2.897362854768e-03 1.500000000000e-14 -1.550000000000e+01 -2.909314962150e-03 0.000000000000e+00 2.909314962134e-03 1.550000000000e-14 -1.600000000000e+01 -2.919928478865e-03 0.000000000000e+00 2.919928478849e-03 1.600000000000e-14 -1.650000000000e+01 -2.929345837848e-03 0.000000000000e+00 2.929345837831e-03 1.650000000000e-14 -1.700000000000e+01 -2.937696630284e-03 0.000000000000e+00 2.937696630267e-03 1.700000000000e-14 -1.750000000000e+01 -2.945098371434e-03 0.000000000000e+00 2.945098371416e-03 1.750000000000e-14 -1.800000000000e+01 -2.951657134390e-03 0.000000000000e+00 2.951657134372e-03 1.800000000000e-14 -1.850000000000e+01 -2.957468523513e-03 0.000000000000e+00 2.957468523494e-03 1.850000000000e-14 -1.900000000000e+01 -2.962618319977e-03 0.000000000000e+00 2.962618319958e-03 1.900000000000e-14 -1.950000000000e+01 -2.967183307685e-03 0.000000000000e+00 2.967183307666e-03 1.950000000000e-14 -2.000000000000e+01 -2.971232049410e-03 0.000000000000e+00 2.971232049390e-03 2.000000000000e-14 -1.000000000000e+00 -2.747304465269e-05 0.000000000000e+00 2.747304465169e-05 1.000000000000e-15 -1.500000000000e+00 -2.759529081667e-05 0.000000000000e+00 2.759529081517e-05 1.500000000000e-15 -2.000000000000e+00 -2.769405692440e-05 0.000000000000e+00 2.769405692240e-05 2.000000000000e-15 -2.500000000000e+00 -2.778229583765e-05 0.000000000000e+00 2.778229583515e-05 2.500000000000e-15 -3.000000000000e+00 -2.786406231945e-05 0.000000000000e+00 2.786406231645e-05 3.000000000000e-15 -3.500000000000e+00 -2.794132728478e-05 0.000000000000e+00 2.794132728128e-05 3.500000000000e-15 -4.000000000000e+00 -2.801522673827e-05 0.000000000000e+00 2.801522673427e-05 4.000000000000e-15 -4.500000000000e+00 -2.808648787620e-05 0.000000000000e+00 2.808648787170e-05 4.500000000000e-15 -5.000000000000e+00 -2.815561031298e-05 0.000000000000e+00 2.815561030798e-05 5.000000000000e-15 -5.500000000000e+00 -2.822295520393e-05 0.000000000000e+00 2.822295519843e-05 5.500000000000e-15 -6.000000000000e+00 -2.828879382124e-05 0.000000000000e+00 2.828879381524e-05 6.000000000000e-15 -6.500000000000e+00 -2.835333613003e-05 0.000000000000e+00 2.835333612353e-05 6.500000000000e-15 -7.000000000000e+00 -2.841674861714e-05 0.000000000000e+00 2.841674861014e-05 7.000000000000e-15 -7.500000000000e+00 -2.847916594647e-05 0.000000000000e+00 2.847916593897e-05 7.500000000000e-15 -8.000000000000e+00 -2.854069887389e-05 0.000000000000e+00 2.854069886589e-05 8.000000000000e-15 -8.500000000000e+00 -2.860143979456e-05 0.000000000000e+00 2.860143978606e-05 8.500000000000e-15 -9.000000000000e+00 -2.866146673601e-05 0.000000000000e+00 2.866146672701e-05 9.000000000000e-15 -9.500000000000e+00 -2.872084629891e-05 0.000000000000e+00 2.872084628941e-05 9.500000000000e-15 -1.000000000000e+01 -2.877963586626e-05 0.000000000000e+00 2.877963585626e-05 1.000000000000e-14 -1.050000000000e+01 -2.883788529191e-05 0.000000000000e+00 2.883788528141e-05 1.050000000000e-14 -1.100000000000e+01 -2.889563821119e-05 0.000000000000e+00 2.889563820019e-05 1.100000000000e-14 -1.150000000000e+01 -2.895293307217e-05 0.000000000000e+00 2.895293306067e-05 1.150000000000e-14 -1.200000000000e+01 -2.900980395698e-05 0.000000000000e+00 2.900980394498e-05 1.200000000000e-14 -1.250000000000e+01 -2.906628124331e-05 0.000000000000e+00 2.906628123081e-05 1.250000000000e-14 -1.300000000000e+01 -2.912239214248e-05 0.000000000000e+00 2.912239212948e-05 1.300000000000e-14 -1.350000000000e+01 -2.917816114111e-05 0.000000000000e+00 2.917816112761e-05 1.350000000000e-14 -1.400000000000e+01 -2.923361036668e-05 0.000000000000e+00 2.923361035268e-05 1.400000000000e-14 -1.450000000000e+01 -2.928875989246e-05 0.000000000000e+00 2.928875987795e-05 1.450000000000e-14 -1.500000000000e+01 -2.934362799359e-05 0.000000000000e+00 2.934362797859e-05 1.500000000000e-14 -1.550000000000e+01 -2.939823136366e-05 0.000000000000e+00 2.939823134816e-05 1.550000000000e-14 -1.600000000000e+01 -2.945258529882e-05 0.000000000000e+00 2.945258528282e-05 1.600000000000e-14 -1.650000000000e+01 -2.950670385537e-05 0.000000000000e+00 2.950670383887e-05 1.650000000000e-14 -1.700000000000e+01 -2.956059998513e-05 0.000000000000e+00 2.956059996813e-05 1.700000000000e-14 -1.750000000000e+01 -2.961428565256e-05 0.000000000000e+00 2.961428563506e-05 1.750000000000e-14 -1.800000000000e+01 -2.966777193628e-05 0.000000000000e+00 2.966777191828e-05 1.800000000000e-14 -1.850000000000e+01 -2.972106911768e-05 0.000000000000e+00 2.972106909918e-05 1.850000000000e-14 -1.900000000000e+01 -2.977418675842e-05 0.000000000000e+00 2.977418673942e-05 1.900000000000e-14 -1.950000000000e+01 -2.982713376852e-05 0.000000000000e+00 2.982713374902e-05 1.950000000000e-14 -2.000000000000e+01 -2.987991846647e-05 0.000000000000e+00 2.987991844647e-05 2.000000000000e-14 -1.000000000000e+00 -2.228517305116e-04 0.000000000000e+00 2.228517305106e-04 1.000000000000e-15 -1.500000000000e+00 -2.927122229690e-04 0.000000000000e+00 2.927122229675e-04 1.500000000000e-15 -2.000000000000e+00 -3.398224960544e-04 0.000000000000e+00 3.398224960524e-04 2.000000000000e-15 -2.500000000000e+00 -3.696201078343e-04 0.000000000000e+00 3.696201078318e-04 2.500000000000e-15 -3.000000000000e+00 -3.872620778693e-04 0.000000000000e+00 3.872620778663e-04 3.000000000000e-15 -3.500000000000e+00 -3.970044154186e-04 0.000000000000e+00 3.970044154151e-04 3.500000000000e-15 -4.000000000000e+00 -4.019772914088e-04 0.000000000000e+00 4.019772914048e-04 4.000000000000e-15 -4.500000000000e+00 -4.042911663476e-04 0.000000000000e+00 4.042911663431e-04 4.500000000000e-15 -5.000000000000e+00 -4.053336783729e-04 0.000000000000e+00 4.053336783679e-04 5.000000000000e-15 -5.500000000000e+00 -4.059670698025e-04 0.000000000000e+00 4.059670697970e-04 5.500000000000e-15 -6.000000000000e+00 -4.065079731459e-04 0.000000000000e+00 4.065079731399e-04 6.000000000000e-15 -6.500000000000e+00 -4.070083308505e-04 0.000000000000e+00 4.070083308440e-04 6.500000000000e-15 -7.000000000000e+00 -4.074788776358e-04 0.000000000000e+00 4.074788776288e-04 7.000000000000e-15 -7.500000000000e+00 -4.079252422215e-04 0.000000000000e+00 4.079252422140e-04 7.500000000000e-15 -8.000000000000e+00 -4.083514921160e-04 0.000000000000e+00 4.083514921080e-04 8.000000000000e-15 -8.500000000000e+00 -4.087607569226e-04 0.000000000000e+00 4.087607569141e-04 8.500000000000e-15 -9.000000000000e+00 -4.091554940648e-04 0.000000000000e+00 4.091554940558e-04 9.000000000000e-15 -9.500000000000e+00 -4.095376599357e-04 0.000000000000e+00 4.095376599262e-04 9.500000000000e-15 -1.000000000000e+01 -4.099088317347e-04 0.000000000000e+00 4.099088317247e-04 1.000000000000e-14 -1.050000000000e+01 -4.102702963573e-04 0.000000000000e+00 4.102702963468e-04 1.050000000000e-14 -1.100000000000e+01 -4.106231159601e-04 0.000000000000e+00 4.106231159491e-04 1.100000000000e-14 -1.150000000000e+01 -4.109681767711e-04 0.000000000000e+00 4.109681767596e-04 1.150000000000e-14 -1.200000000000e+01 -4.113062257737e-04 0.000000000000e+00 4.113062257617e-04 1.200000000000e-14 -1.250000000000e+01 -4.116378985551e-04 0.000000000000e+00 4.116378985426e-04 1.250000000000e-14 -1.300000000000e+01 -4.119637406625e-04 0.000000000000e+00 4.119637406495e-04 1.300000000000e-14 -1.350000000000e+01 -4.122842241464e-04 0.000000000000e+00 4.122842241329e-04 1.350000000000e-14 -1.400000000000e+01 -4.125997605058e-04 0.000000000000e+00 4.125997604918e-04 1.400000000000e-14 -1.450000000000e+01 -4.129107109138e-04 0.000000000000e+00 4.129107108993e-04 1.450000000000e-14 -1.500000000000e+01 -4.132173943717e-04 0.000000000000e+00 4.132173943567e-04 1.500000000000e-14 -1.550000000000e+01 -4.135200942688e-04 0.000000000000e+00 4.135200942533e-04 1.550000000000e-14 -1.600000000000e+01 -4.138190637043e-04 0.000000000000e+00 4.138190636883e-04 1.600000000000e-14 -1.650000000000e+01 -4.141145298396e-04 0.000000000000e+00 4.141145298231e-04 1.650000000000e-14 -1.700000000000e+01 -4.144066974855e-04 0.000000000000e+00 4.144066974685e-04 1.700000000000e-14 -1.750000000000e+01 -4.146957520790e-04 0.000000000000e+00 4.146957520615e-04 1.750000000000e-14 -1.800000000000e+01 -4.149818621713e-04 0.000000000000e+00 4.149818621533e-04 1.800000000000e-14 -1.850000000000e+01 -4.152651815210e-04 0.000000000000e+00 4.152651815025e-04 1.850000000000e-14 -1.900000000000e+01 -4.155458508640e-04 0.000000000000e+00 4.155458508450e-04 1.900000000000e-14 -1.950000000000e+01 -4.158239994212e-04 0.000000000000e+00 4.158239994017e-04 1.950000000000e-14 -2.000000000000e+01 -4.160997461876e-04 0.000000000000e+00 4.160997461676e-04 2.000000000000e-14 -1.000000000000e+00 -3.902645880188e-04 0.000000000000e+00 3.902645880178e-04 1.000000000000e-15 -1.500000000000e+00 -5.536270768639e-04 0.000000000000e+00 5.536270768624e-04 1.500000000000e-15 -2.000000000000e+00 -6.977848097525e-04 0.000000000000e+00 6.977848097505e-04 2.000000000000e-15 -2.500000000000e+00 -8.247139094718e-04 0.000000000000e+00 8.247139094693e-04 2.500000000000e-15 -3.000000000000e+00 -9.363362163253e-04 0.000000000000e+00 9.363362163223e-04 3.000000000000e-15 -3.500000000000e+00 -1.034398878766e-03 0.000000000000e+00 1.034398878762e-03 3.500000000000e-15 -4.000000000000e+00 -1.120450107079e-03 0.000000000000e+00 1.120450107075e-03 4.000000000000e-15 -4.500000000000e+00 -1.195852249256e-03 0.000000000000e+00 1.195852249251e-03 4.500000000000e-15 -5.000000000000e+00 -1.261805892777e-03 0.000000000000e+00 1.261805892772e-03 5.000000000000e-15 -5.500000000000e+00 -1.319374461351e-03 0.000000000000e+00 1.319374461345e-03 5.500000000000e-15 -6.000000000000e+00 -1.369505618001e-03 0.000000000000e+00 1.369505617995e-03 6.000000000000e-15 -6.500000000000e+00 -1.413048618931e-03 0.000000000000e+00 1.413048618925e-03 6.500000000000e-15 -7.000000000000e+00 -1.450767872439e-03 0.000000000000e+00 1.450767872432e-03 7.000000000000e-15 -7.500000000000e+00 -1.483353326502e-03 0.000000000000e+00 1.483353326494e-03 7.500000000000e-15 -8.000000000000e+00 -1.511428362700e-03 0.000000000000e+00 1.511428362692e-03 8.000000000000e-15 -8.500000000000e+00 -1.535555809309e-03 0.000000000000e+00 1.535555809300e-03 8.500000000000e-15 -9.000000000000e+00 -1.556242597708e-03 0.000000000000e+00 1.556242597699e-03 9.000000000000e-15 -9.500000000000e+00 -1.573943510578e-03 0.000000000000e+00 1.573943510569e-03 9.500000000000e-15 -1.000000000000e+01 -1.589064406695e-03 0.000000000000e+00 1.589064406685e-03 1.000000000000e-14 -1.050000000000e+01 -1.601965237981e-03 0.000000000000e+00 1.601965237970e-03 1.050000000000e-14 -1.100000000000e+01 -1.612963086935e-03 0.000000000000e+00 1.612963086924e-03 1.100000000000e-14 -1.150000000000e+01 -1.622335350508e-03 0.000000000000e+00 1.622335350497e-03 1.150000000000e-14 -1.200000000000e+01 -1.630323097441e-03 0.000000000000e+00 1.630323097429e-03 1.200000000000e-14 -1.250000000000e+01 -1.637134549220e-03 0.000000000000e+00 1.637134549207e-03 1.250000000000e-14 -1.300000000000e+01 -1.642948601974e-03 0.000000000000e+00 1.642948601961e-03 1.300000000000e-14 -1.350000000000e+01 -1.647918213679e-03 0.000000000000e+00 1.647918213666e-03 1.350000000000e-14 -1.400000000000e+01 -1.652173749581e-03 0.000000000000e+00 1.652173749567e-03 1.400000000000e-14 -1.450000000000e+01 -1.655825950785e-03 0.000000000000e+00 1.655825950770e-03 1.450000000000e-14 -1.500000000000e+01 -1.658968698245e-03 0.000000000000e+00 1.658968698230e-03 1.500000000000e-14 -1.550000000000e+01 -1.661681462100e-03 0.000000000000e+00 1.661681462085e-03 1.550000000000e-14 -1.600000000000e+01 -1.664031455151e-03 0.000000000000e+00 1.664031455135e-03 1.600000000000e-14 -1.650000000000e+01 -1.666075505608e-03 0.000000000000e+00 1.666075505592e-03 1.650000000000e-14 -1.700000000000e+01 -1.667861672273e-03 0.000000000000e+00 1.667861672256e-03 1.700000000000e-14 -1.750000000000e+01 -1.669430629353e-03 0.000000000000e+00 1.669430629335e-03 1.750000000000e-14 -1.800000000000e+01 -1.670816849337e-03 0.000000000000e+00 1.670816849319e-03 1.800000000000e-14 -1.850000000000e+01 -1.672049611737e-03 0.000000000000e+00 1.672049611718e-03 1.850000000000e-14 -1.900000000000e+01 -1.673153863598e-03 0.000000000000e+00 1.673153863579e-03 1.900000000000e-14 -1.950000000000e+01 -1.674150954711e-03 0.000000000000e+00 1.674150954692e-03 1.950000000000e-14 -2.000000000000e+01 -1.675059265596e-03 0.000000000000e+00 1.675059265576e-03 2.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/acVd_corsrd1.standard0000644000265600020320000000645512264261473024105 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -1 1.784495277193e-05 1.966168793010e-04 3.4806584072819e-14 2.45656287085893e-14 -2 3.720403863887e-05 1.529260561285e-04 3.77554426253189e-14 2.27020205637293e-14 -3 5.780752081525e-05 1.152665795792e-04 4.04144873218488e-14 2.07319900998494e-14 -4 7.869357067616e-05 8.442454342710e-05 4.26220260242387e-14 1.86801848546995e-14 -5 9.869197756325e-05 6.014906394362e-05 4.42786938103687e-14 1.66270884096095e-14 -6 1.167640531681e-04 4.173374762887e-05 4.53745893537587e-14 1.47211005605096e-14 -7 1.322187247939e-04 2.825926606318e-05 4.60163032039887e-14 1.31393730402696e-14 -8 1.447937468005e-04 1.873069440973e-05 4.63943416372786e-14 1.19834471935596e-14 -9 1.546119386006e-04 1.218605734019e-05 4.66788685870186e-14 1.12164230013897e-14 -10 1.620435203453e-04 7.788664439170e-06 4.69309798538986e-14 1.06899331305697e-14 -11 1.675480250849e-04 4.878847843285e-06 4.69971483385586e-14 1.01053418147997e-14 -12 1.715627144559e-04 2.975063897819e-06 4.48369891199087e-14 7.31557556766979e-15 -13 1.744504669601e-04 1.743971516787e-06 4.23591331330288e-14 4.51080939841587e-15 -14 1.764845502624e-04 9.637741154521e-07 4.15789463787288e-14 3.58617709642889e-15 -15 1.778382390551e-04 4.961409605771e-07 4.11078861647488e-14 3.07017159518491e-15 -16 1.785385809259e-04 2.765646475752e-07 4.06269445595888e-14 2.68981831477792e-15 -17 1.786995083399e-04 2.306933853923e-07 4.03605557217388e-14 2.44658588189193e-15 -18 1.787523104603e-04 2.175641186151e-07 4.02377924640188e-14 2.28327711344193e-15 -19 1.787959828998e-04 2.075668737612e-07 4.01503302550388e-14 2.15530674892594e-15 -20 1.788361883170e-04 1.989599227907e-07 4.00830703466588e-14 2.05082039906194e-15 -1 1.232755590310e-05 1.262269693202e-04 3.16549726343991e-14 2.71766809435292e-14 -2 2.576339879306e-05 9.700264447198e-05 3.4729091948299e-14 2.47227855726193e-14 -3 3.985992640802e-05 7.158780492287e-05 3.75356610877789e-14 2.20612047939094e-14 -4 5.368543596548e-05 5.098877906120e-05 3.98297365105788e-14 1.93791864526194e-14 -5 6.631668768924e-05 3.522673580161e-05 4.15221695059788e-14 1.68695097609795e-14 -6 7.713209499799e-05 2.373362772144e-05 4.26419487925787e-14 1.47431465411996e-14 -7 8.589037941556e-05 1.568629447856e-05 4.33219396695887e-14 1.31430585341096e-14 -8 9.267177376949e-05 1.023015318304e-05 4.37361328866487e-14 1.20505009848596e-14 -9 9.775399668688e-05 6.612965037108e-06 4.40040692726187e-14 1.12951040953597e-14 -10 1.014828287079e-04 4.246427038192e-06 4.40957636373787e-14 1.05348871215697e-14 -11 1.041840262045e-04 2.708393873924e-06 4.30963699703387e-14 7.95260992446177e-15 -12 1.061253101643e-04 1.712324803114e-06 4.15727636079888e-14 4.77766608883786e-15 -13 1.075107925606e-04 1.069786748323e-06 4.11129309610088e-14 3.73730463518089e-15 -14 1.084889665505e-04 6.589770066637e-07 4.08825564599288e-14 3.19466026963791e-15 -15 1.091632143674e-04 4.021994647707e-07 4.07189973082688e-14 2.84243544053692e-15 -16 1.096003831069e-04 2.509675661871e-07 4.05589713258988e-14 2.58112112542092e-15 -17 1.098421138930e-04 1.748750405860e-07 4.03883310626588e-14 2.37337647754093e-15 -18 1.099443099363e-04 1.460026706227e-07 4.02697197586788e-14 2.21833410105394e-15 -19 1.099889416595e-04 1.352105843267e-07 4.02097725590888e-14 2.10343746032594e-15 -20 1.100186778695e-04 1.290073065475e-07 4.01731269042288e-14 2.01095781570994e-15 ngspice-26/tests/hisimhv1/pmos/reference/noise1.standard0000644000265600020320000001166212264261473022765 0ustar andreasadminFreq N(d) 1000 2.974370277289e-31 1258.925411794 2.974370456611e-31 1584.893192461 2.974370740818e-31 1995.262314969 2.974371191254e-31 2511.88643151 2.974371905147e-31 3162.277660168 2.974373036592e-31 3981.071705535 2.974374829812e-31 5011.872336273 2.974377671873e-31 6309.573444802 2.974382176237e-31 7943.282347243 2.974389315172e-31 10000 2.974400629622e-31 12589.25411794 2.974418561817e-31 15848.93192461 2.974446982431e-31 19952.62314969 2.974492026068e-31 25118.8643151 2.974563415422e-31 31622.77660168 2.974676559922e-31 39810.71705535 2.974855881871e-31 50118.72336273 2.975140088007e-31 63095.73444802 2.975590524377e-31 79432.82347243 2.976304417914e-31 100000 2.97743586292e-31 125892.5411794 2.979229082408e-31 158489.3192461 2.982071143768e-31 199526.2314969 2.986575507469e-31 251188.643151 2.993714442835e-31 316227.7660168 3.005028892897e-31 398107.1705535 3.022961087776e-31 501187.2336273 3.051381701363e-31 630957.3444802 3.096425338355e-31 794328.2347243 3.167814691968e-31 1000000 3.280959192476e-31 1258925.411794 3.460281140975e-31 1584893.192461 3.744487276111e-31 1995262.314969 4.194923644189e-31 2511886.43151 4.908817175698e-31 3162277.660168 6.040262169168e-31 3981071.705535 7.833481625007e-31 5011872.336273 1.067554290312e-30 6309573.444802 1.517990639992e-30 7943282.347243 2.231884125286e-30 10000000 3.363329002672e-30 12589254.11794 5.156548166919e-30 15848931.92461 7.998608712587e-30 19952623.14969 1.250297036957e-29 25118864.3151 1.96419006011e-29 31622776.60168 3.095633776649e-29 39810717.05535 4.888850024983e-29 50118723.36273 7.730903246218e-29 63095734.44802 1.223524650508e-28 79432823.47243 1.937413052272e-28 100000000 3.068845160448e-28 1000 1.617918927229e-24 1258.925411794 1.617918927229e-24 1584.893192461 1.61791892723e-24 1995.262314969 1.61791892723e-24 2511.88643151 1.61791892723e-24 3162.277660168 1.617918927231e-24 3981.071705535 1.617918927231e-24 5011.872336273 1.617918927232e-24 6309.573444802 1.617918927234e-24 7943.282347243 1.617918927237e-24 10000 1.617918927242e-24 12589.25411794 1.617918927249e-24 15848.93192461 1.617918927261e-24 19952.62314969 1.617918927279e-24 25118.8643151 1.617918927308e-24 31622.77660168 1.617918927354e-24 39810.71705535 1.617918927427e-24 50118.72336273 1.617918927542e-24 63095.73444802 1.617918927725e-24 79432.82347243 1.617918928015e-24 100000 1.617918928475e-24 125892.5411794 1.617918929204e-24 158489.3192461 1.617918930359e-24 199526.2314969 1.61791893219e-24 251188.643151 1.617918935091e-24 316227.7660168 1.617918939689e-24 398107.1705535 1.617918946976e-24 501187.2336273 1.617918958526e-24 630957.3444802 1.617918976832e-24 794328.2347243 1.617919005844e-24 1000000 1.617919051825e-24 1258925.411794 1.6179191247e-24 1584893.192461 1.617919240199e-24 1995262.314969 1.617919423252e-24 2511886.43151 1.617919713373e-24 3162277.660168 1.617920173183e-24 3981071.705535 1.617920901933e-24 5011872.336273 1.617922056923e-24 6309573.444802 1.61792388746e-24 7943282.347243 1.617926788665e-24 10000000 1.617931386764e-24 12589254.11794 1.61793867426e-24 15848931.92461 1.617950224162e-24 19952623.14969 1.61796852952e-24 25118864.3151 1.617997541548e-24 31622776.60168 1.618043522494e-24 39810717.05535 1.618116397329e-24 50118723.36273 1.618231896029e-24 63095734.44802 1.618414948802e-24 79432823.47243 1.618705067071e-24 100000000 1.619164871465e-24 1000 8.771626113551e-24 1258.925411794 8.771626113551e-24 1584.893192461 8.771626113551e-24 1995.262314969 8.771626113552e-24 2511.88643151 8.771626113552e-24 3162.277660168 8.771626113552e-24 3981.071705535 8.771626113552e-24 5011.872336273 8.771626113553e-24 6309.573444802 8.771626113553e-24 7943.282347243 8.771626113555e-24 10000 8.771626113557e-24 12589.25411794 8.77162611356e-24 15848.93192461 8.771626113565e-24 19952.62314969 8.771626113572e-24 25118.8643151 8.771626113585e-24 31622.77660168 8.771626113604e-24 39810.71705535 8.771626113635e-24 50118.72336273 8.771626113684e-24 63095.73444802 8.771626113761e-24 79432.82347243 8.771626113884e-24 100000 8.771626114078e-24 125892.5411794 8.771626114387e-24 158489.3192461 8.771626114875e-24 199526.2314969 8.77162611565e-24 251188.643151 8.771626116877e-24 316227.7660168 8.771626118823e-24 398107.1705535 8.771626121906e-24 501187.2336273 8.771626126792e-24 630957.3444802 8.771626134536e-24 794328.2347243 8.77162614681e-24 1000000 8.771626166263e-24 1258925.411794 8.771626197094e-24 1584893.192461 8.771626245958e-24 1995262.314969 8.771626323401e-24 2511886.43151 8.771626446141e-24 3162277.660168 8.771626640671e-24 3981071.705535 8.771626948979e-24 5011872.336273 8.771627437615e-24 6309573.444802 8.771628212051e-24 7943282.347243 8.771629439449e-24 10000000 8.771631384744e-24 12589254.11794 8.771634467827e-24 15848931.92461 8.771639354186e-24 19952623.14969 8.77164709854e-24 25118864.3151 8.771659372509e-24 31622776.60168 8.77167882543e-24 39810717.05535 8.771709656204e-24 50118723.36273 8.77175851962e-24 63095734.44802 8.771835962747e-24 79432823.47243 8.771958701405e-24 100000000 8.772153228e-24 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Id1_vb0_jd.standard0000644000265600020320000024357112264261473024744 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.700338152218e-04 0.000000000000e+00 1.700338152208e-04 1.010000000000e-15 -1.200000000000e+00 -2.002449295934e-04 0.000000000000e+00 2.002449295921e-04 1.210000000000e-15 -1.400000000000e+00 -2.292889362665e-04 0.000000000000e+00 2.292889362651e-04 1.410000000000e-15 -1.600000000000e+00 -2.572064231495e-04 0.000000000000e+00 2.572064231479e-04 1.610000000000e-15 -1.800000000000e+00 -2.840369441377e-04 0.000000000000e+00 2.840369441359e-04 1.810000000000e-15 -2.000000000000e+00 -3.098189162759e-04 0.000000000000e+00 3.098189162738e-04 2.010000000000e-15 -2.200000000000e+00 -3.345895332168e-04 0.000000000000e+00 3.345895332146e-04 2.210000000000e-15 -2.400000000000e+00 -3.583847358318e-04 0.000000000000e+00 3.583847358294e-04 2.410000000000e-15 -2.600000000000e+00 -3.812391719848e-04 0.000000000000e+00 3.812391719822e-04 2.610000000000e-15 -2.800000000000e+00 -4.031861945802e-04 0.000000000000e+00 4.031861945773e-04 2.810000000000e-15 -3.000000000000e+00 -4.242578714327e-04 0.000000000000e+00 4.242578714297e-04 3.010000000000e-15 -3.200000000000e+00 -4.444850081008e-04 0.000000000000e+00 4.444850080975e-04 3.210000000000e-15 -3.400000000000e+00 -4.638971809323e-04 0.000000000000e+00 4.638971809289e-04 3.410000000000e-15 -3.600000000000e+00 -4.825227779285e-04 0.000000000000e+00 4.825227779249e-04 3.610000000000e-15 -3.800000000000e+00 -5.003890453720e-04 0.000000000000e+00 5.003890453681e-04 3.810000000000e-15 -4.000000000000e+00 -5.175221384880e-04 0.000000000000e+00 5.175221384840e-04 4.010000000000e-15 -4.200000000000e+00 -5.339471746949e-04 0.000000000000e+00 5.339471746907e-04 4.210000000000e-15 -4.400000000000e+00 -5.496882882548e-04 0.000000000000e+00 5.496882882504e-04 4.410000000000e-15 -4.600000000000e+00 -5.647686853559e-04 0.000000000000e+00 5.647686853513e-04 4.610000000000e-15 -4.800000000000e+00 -5.792106988434e-04 0.000000000000e+00 5.792106988385e-04 4.810000000000e-15 -5.000000000000e+00 -5.930358419738e-04 0.000000000000e+00 5.930358419688e-04 5.010000000000e-15 -5.200000000000e+00 -6.062648543899e-04 0.000000000000e+00 6.062648543847e-04 5.210000000000e-15 -5.400000000000e+00 -6.189177772934e-04 0.000000000000e+00 6.189177772880e-04 5.410000000000e-15 -5.600000000000e+00 -6.310139653940e-04 0.000000000000e+00 6.310139653884e-04 5.610000000000e-15 -5.800000000000e+00 -6.425721564350e-04 0.000000000000e+00 6.425721564291e-04 5.810000000000e-15 -6.000000000000e+00 -6.536105087527e-04 0.000000000000e+00 6.536105087467e-04 6.010000000000e-15 -6.200000000000e+00 -6.641466419087e-04 0.000000000000e+00 6.641466419025e-04 6.210000000000e-15 -6.400000000000e+00 -6.741976745374e-04 0.000000000000e+00 6.741976745309e-04 6.410000000000e-15 -6.600000000000e+00 -6.837802593410e-04 0.000000000000e+00 6.837802593344e-04 6.610000000000e-15 -6.800000000000e+00 -6.929106151855e-04 0.000000000000e+00 6.929106151787e-04 6.810000000000e-15 -7.000000000000e+00 -7.016045562654e-04 0.000000000000e+00 7.016045562584e-04 7.010000000000e-15 -7.200000000000e+00 -7.098775183222e-04 0.000000000000e+00 7.098775183150e-04 7.210000000000e-15 -7.400000000000e+00 -7.177445819123e-04 0.000000000000e+00 7.177445819048e-04 7.410000000000e-15 -7.600000000000e+00 -7.252204927356e-04 0.000000000000e+00 7.252204927280e-04 7.610000000000e-15 -7.800000000000e+00 -7.323196790495e-04 0.000000000000e+00 7.323196790417e-04 7.810000000000e-15 -8.000000000000e+00 -7.390562662112e-04 0.000000000000e+00 7.390562662032e-04 8.010000000000e-15 -8.200000000000e+00 -7.454440955302e-04 0.000000000000e+00 7.454440955220e-04 8.210000000000e-15 -8.400000000000e+00 -7.514967044839e-04 0.000000000000e+00 7.514967044755e-04 8.410000000000e-15 -8.600000000000e+00 -7.572273768310e-04 0.000000000000e+00 7.572273768224e-04 8.610000000000e-15 -8.800000000000e+00 -7.626491171501e-04 0.000000000000e+00 7.626491171413e-04 8.810000000000e-15 -9.000000000000e+00 -7.677746599610e-04 0.000000000000e+00 7.677746599520e-04 9.010000000000e-15 -9.200000000000e+00 -7.726164693737e-04 0.000000000000e+00 7.726164693645e-04 9.210000000000e-15 -9.400000000000e+00 -7.771867369218e-04 0.000000000000e+00 7.771867369124e-04 9.410000000000e-15 -9.600000000000e+00 -7.814973778609e-04 0.000000000000e+00 7.814973778513e-04 9.610000000000e-15 -9.800000000000e+00 -7.855600262256e-04 0.000000000000e+00 7.855600262157e-04 9.810000000000e-15 -1.000000000000e+01 -7.893860289549e-04 0.000000000000e+00 7.893860289449e-04 1.001000000000e-14 -1.020000000000e+01 -7.929864394060e-04 0.000000000000e+00 7.929864393958e-04 1.021000000000e-14 -1.040000000000e+01 -7.963720105700e-04 0.000000000000e+00 7.963720105595e-04 1.041000000000e-14 -1.060000000000e+01 -7.995531882948e-04 0.000000000000e+00 7.995531882842e-04 1.061000000000e-14 -1.080000000000e+01 -8.025401048019e-04 0.000000000000e+00 8.025401047911e-04 1.081000000000e-14 -1.100000000000e+01 -8.053425727518e-04 0.000000000000e+00 8.053425727408e-04 1.101000000000e-14 -1.120000000000e+01 -8.079700800840e-04 0.000000000000e+00 8.079700800728e-04 1.121000000000e-14 -1.140000000000e+01 -8.104317858174e-04 0.000000000000e+00 8.104317858060e-04 1.141000000000e-14 -1.160000000000e+01 -8.127365169545e-04 0.000000000000e+00 8.127365169429e-04 1.161000000000e-14 -1.180000000000e+01 -8.148927665944e-04 0.000000000000e+00 8.148927665826e-04 1.181000000000e-14 -1.200000000000e+01 -8.169086933161e-04 0.000000000000e+00 8.169086933041e-04 1.201000000000e-14 -1.220000000000e+01 -8.187921218577e-04 0.000000000000e+00 8.187921218455e-04 1.221000000000e-14 -1.240000000000e+01 -8.205505450804e-04 0.000000000000e+00 8.205505450680e-04 1.241000000000e-14 -1.260000000000e+01 -8.221911271774e-04 0.000000000000e+00 8.221911271648e-04 1.261000000000e-14 -1.280000000000e+01 -8.237207080629e-04 0.000000000000e+00 8.237207080501e-04 1.281000000000e-14 -1.300000000000e+01 -8.251458088562e-04 0.000000000000e+00 8.251458088432e-04 1.301000000000e-14 -1.320000000000e+01 -8.264726383597e-04 0.000000000000e+00 8.264726383465e-04 1.321000000000e-14 -1.340000000000e+01 -8.277071004234e-04 0.000000000000e+00 8.277071004100e-04 1.341000000000e-14 -1.360000000000e+01 -8.288548020775e-04 0.000000000000e+00 8.288548020639e-04 1.361000000000e-14 -1.380000000000e+01 -8.299210623189e-04 0.000000000000e+00 8.299210623051e-04 1.381000000000e-14 -1.400000000000e+01 -8.309109214340e-04 0.000000000000e+00 8.309109214200e-04 1.401000000000e-14 -1.420000000000e+01 -8.318291507463e-04 0.000000000000e+00 8.318291507321e-04 1.421000000000e-14 -1.440000000000e+01 -8.326802626849e-04 0.000000000000e+00 8.326802626705e-04 1.441000000000e-14 -1.460000000000e+01 -8.334685210737e-04 0.000000000000e+00 8.334685210591e-04 1.461000000000e-14 -1.480000000000e+01 -8.341979515540e-04 0.000000000000e+00 8.341979515392e-04 1.481000000000e-14 -1.500000000000e+01 -8.348723520593e-04 0.000000000000e+00 8.348723520443e-04 1.501000000000e-14 -1.520000000000e+01 -8.354953032734e-04 0.000000000000e+00 8.354953032581e-04 1.521000000000e-14 -1.540000000000e+01 -8.360701790083e-04 0.000000000000e+00 8.360701789929e-04 1.541000000000e-14 -1.560000000000e+01 -8.366001564546e-04 0.000000000000e+00 8.366001564390e-04 1.561000000000e-14 -1.580000000000e+01 -8.370882262588e-04 0.000000000000e+00 8.370882262430e-04 1.581000000000e-14 -1.600000000000e+01 -8.375372023964e-04 0.000000000000e+00 8.375372023804e-04 1.601000000000e-14 -1.620000000000e+01 -8.379497318166e-04 0.000000000000e+00 8.379497318004e-04 1.621000000000e-14 -1.640000000000e+01 -8.383283038411e-04 0.000000000000e+00 8.383283038247e-04 1.641000000000e-14 -1.660000000000e+01 -8.386752593106e-04 0.000000000000e+00 8.386752592940e-04 1.661000000000e-14 -1.680000000000e+01 -8.389927994794e-04 0.000000000000e+00 8.389927994625e-04 1.681000000000e-14 -1.700000000000e+01 -8.392829946651e-04 0.000000000000e+00 8.392829946481e-04 1.701000000000e-14 -1.720000000000e+01 -8.395477926744e-04 0.000000000000e+00 8.395477926572e-04 1.721000000000e-14 -1.740000000000e+01 -8.397890270294e-04 0.000000000000e+00 8.397890270120e-04 1.741000000000e-14 -1.760000000000e+01 -8.400084250358e-04 0.000000000000e+00 8.400084250182e-04 1.761000000000e-14 -1.780000000000e+01 -8.402076157440e-04 0.000000000000e+00 8.402076157262e-04 1.781000000000e-14 -1.800000000000e+01 -8.403881378719e-04 0.000000000000e+00 8.403881378539e-04 1.801000000000e-14 -1.820000000000e+01 -8.405514477759e-04 0.000000000000e+00 8.405514477577e-04 1.821000000000e-14 -1.840000000000e+01 -8.406989275807e-04 0.000000000000e+00 8.406989275623e-04 1.841000000000e-14 -1.860000000000e+01 -8.408318936013e-04 0.000000000000e+00 8.408318935827e-04 1.861000000000e-14 -1.880000000000e+01 -8.409516052188e-04 0.000000000000e+00 8.409516052000e-04 1.881000000000e-14 -1.900000000000e+01 -8.410592743826e-04 0.000000000000e+00 8.410592743636e-04 1.901000000000e-14 -1.920000000000e+01 -8.411560758953e-04 0.000000000000e+00 8.411560758761e-04 1.921000000000e-14 -1.940000000000e+01 -8.412431585244e-04 0.000000000000e+00 8.412431585050e-04 1.941000000000e-14 -1.960000000000e+01 -8.413216566196e-04 0.000000000000e+00 8.413216566000e-04 1.961000000000e-14 -1.980000000000e+01 -8.413927008951e-04 0.000000000000e+00 8.413927008753e-04 1.981000000000e-14 -2.000000000000e+01 -8.414574245562e-04 0.000000000000e+00 8.414574245362e-04 2.001000000000e-14 -1.000000000000e+00 -1.690562704907e-04 0.000000000000e+00 1.690562704897e-04 1.010000000000e-15 -1.200000000000e+00 -1.991007760484e-04 0.000000000000e+00 1.991007760472e-04 1.210000000000e-15 -1.400000000000e+00 -2.279882272534e-04 0.000000000000e+00 2.279882272520e-04 1.410000000000e-15 -1.600000000000e+00 -2.557592404941e-04 0.000000000000e+00 2.557592404925e-04 1.610000000000e-15 -1.800000000000e+00 -2.824533423519e-04 0.000000000000e+00 2.824533423501e-04 1.810000000000e-15 -2.000000000000e+00 -3.081088759929e-04 0.000000000000e+00 3.081088759909e-04 2.010000000000e-15 -2.200000000000e+00 -3.327629216033e-04 0.000000000000e+00 3.327629216011e-04 2.210000000000e-15 -2.400000000000e+00 -3.564512749179e-04 0.000000000000e+00 3.564512749155e-04 2.410000000000e-15 -2.600000000000e+00 -3.792084116335e-04 0.000000000000e+00 3.792084116309e-04 2.610000000000e-15 -2.800000000000e+00 -4.010674902789e-04 0.000000000000e+00 4.010674902761e-04 2.810000000000e-15 -3.000000000000e+00 -4.220603658359e-04 0.000000000000e+00 4.220603658329e-04 3.010000000000e-15 -3.200000000000e+00 -4.422176156113e-04 0.000000000000e+00 4.422176156081e-04 3.210000000000e-15 -3.400000000000e+00 -4.615685747227e-04 0.000000000000e+00 4.615685747193e-04 3.410000000000e-15 -3.600000000000e+00 -4.801413789074e-04 0.000000000000e+00 4.801413789038e-04 3.610000000000e-15 -3.800000000000e+00 -4.979630126944e-04 0.000000000000e+00 4.979630126906e-04 3.810000000000e-15 -4.000000000000e+00 -5.150593612884e-04 0.000000000000e+00 5.150593612844e-04 4.010000000000e-15 -4.200000000000e+00 -5.314552647926e-04 0.000000000000e+00 5.314552647884e-04 4.210000000000e-15 -4.400000000000e+00 -5.471745736414e-04 0.000000000000e+00 5.471745736370e-04 4.410000000000e-15 -4.600000000000e+00 -5.622402043244e-04 0.000000000000e+00 5.622402043198e-04 4.610000000000e-15 -4.800000000000e+00 -5.766741946615e-04 0.000000000000e+00 5.766741946566e-04 4.810000000000e-15 -5.000000000000e+00 -5.904977580403e-04 0.000000000000e+00 5.904977580353e-04 5.010000000000e-15 -5.200000000000e+00 -6.037313300913e-04 0.000000000000e+00 6.037313300861e-04 5.210000000000e-15 -5.400000000000e+00 -6.163946432931e-04 0.000000000000e+00 6.163946432877e-04 5.410000000000e-15 -5.600000000000e+00 -6.285067408988e-04 0.000000000000e+00 6.285067408932e-04 5.610000000000e-15 -5.800000000000e+00 -6.400860459234e-04 0.000000000000e+00 6.400860459176e-04 5.810000000000e-15 -6.000000000000e+00 -6.511503994785e-04 0.000000000000e+00 6.511503994725e-04 6.010000000000e-15 -6.200000000000e+00 -6.617171019745e-04 0.000000000000e+00 6.617171019683e-04 6.210000000000e-15 -6.400000000000e+00 -6.718029515954e-04 0.000000000000e+00 6.718029515890e-04 6.410000000000e-15 -6.600000000000e+00 -6.814242799829e-04 0.000000000000e+00 6.814242799763e-04 6.610000000000e-15 -6.800000000000e+00 -6.905969850866e-04 0.000000000000e+00 6.905969850798e-04 6.810000000000e-15 -7.000000000000e+00 -6.993365611495e-04 0.000000000000e+00 6.993365611425e-04 7.010000000000e-15 -7.200000000000e+00 -7.076581258136e-04 0.000000000000e+00 7.076581258064e-04 7.210000000000e-15 -7.400000000000e+00 -7.155764443385e-04 0.000000000000e+00 7.155764443311e-04 7.410000000000e-15 -7.600000000000e+00 -7.231059509384e-04 0.000000000000e+00 7.231059509308e-04 7.610000000000e-15 -7.800000000000e+00 -7.302607672565e-04 0.000000000000e+00 7.302607672487e-04 7.810000000000e-15 -8.000000000000e+00 -7.370547180102e-04 0.000000000000e+00 7.370547180022e-04 8.010000000000e-15 -8.200000000000e+00 -7.435013510598e-04 0.000000000000e+00 7.435013510515e-04 8.210000000000e-15 -8.400000000000e+00 -7.496139184490e-04 0.000000000000e+00 7.496139184406e-04 8.410000000000e-15 -8.600000000000e+00 -7.554054281132e-04 0.000000000000e+00 7.554054281046e-04 8.610000000000e-15 -8.800000000000e+00 -7.608886192589e-04 0.000000000000e+00 7.608886192501e-04 8.810000000000e-15 -9.000000000000e+00 -7.660759726260e-04 0.000000000000e+00 7.660759726170e-04 9.010000000000e-15 -9.200000000000e+00 -7.709797111460e-04 0.000000000000e+00 7.709797111368e-04 9.210000000000e-15 -9.400000000000e+00 -7.756117986976e-04 0.000000000000e+00 7.756117986882e-04 9.410000000000e-15 -9.600000000000e+00 -7.799839372157e-04 0.000000000000e+00 7.799839372061e-04 9.610000000000e-15 -9.800000000000e+00 -7.841075624305e-04 0.000000000000e+00 7.841075624207e-04 9.810000000000e-15 -1.000000000000e+01 -7.879938385298e-04 0.000000000000e+00 7.879938385198e-04 1.001000000000e-14 -1.020000000000e+01 -7.916536520507e-04 0.000000000000e+00 7.916536520405e-04 1.021000000000e-14 -1.040000000000e+01 -7.950976053074e-04 0.000000000000e+00 7.950976052970e-04 1.041000000000e-14 -1.060000000000e+01 -7.983360096583e-04 0.000000000000e+00 7.983360096477e-04 1.061000000000e-14 -1.080000000000e+01 -8.013788788974e-04 0.000000000000e+00 8.013788788866e-04 1.081000000000e-14 -1.100000000000e+01 -8.042359230357e-04 0.000000000000e+00 8.042359230247e-04 1.101000000000e-14 -1.120000000000e+01 -8.069165427076e-04 0.000000000000e+00 8.069165426964e-04 1.121000000000e-14 -1.140000000000e+01 -8.094298244012e-04 0.000000000000e+00 8.094298243898e-04 1.141000000000e-14 -1.160000000000e+01 -8.117845366774e-04 0.000000000000e+00 8.117845366658e-04 1.161000000000e-14 -1.180000000000e+01 -8.139891274981e-04 0.000000000000e+00 8.139891274863e-04 1.181000000000e-14 -1.200000000000e+01 -8.160517227487e-04 0.000000000000e+00 8.160517227367e-04 1.201000000000e-14 -1.220000000000e+01 -8.179801259989e-04 0.000000000000e+00 8.179801259867e-04 1.221000000000e-14 -1.240000000000e+01 -8.197818195124e-04 0.000000000000e+00 8.197818195000e-04 1.241000000000e-14 -1.260000000000e+01 -8.214639664832e-04 0.000000000000e+00 8.214639664706e-04 1.261000000000e-14 -1.280000000000e+01 -8.230334144522e-04 0.000000000000e+00 8.230334144394e-04 1.281000000000e-14 -1.300000000000e+01 -8.244966998317e-04 0.000000000000e+00 8.244966998187e-04 1.301000000000e-14 -1.320000000000e+01 -8.258600534531e-04 0.000000000000e+00 8.258600534398e-04 1.321000000000e-14 -1.340000000000e+01 -8.271294070362e-04 0.000000000000e+00 8.271294070228e-04 1.341000000000e-14 -1.360000000000e+01 -8.283104004748e-04 0.000000000000e+00 8.283104004612e-04 1.361000000000e-14 -1.380000000000e+01 -8.294083898265e-04 0.000000000000e+00 8.294083898127e-04 1.381000000000e-14 -1.400000000000e+01 -8.304284558942e-04 0.000000000000e+00 8.304284558802e-04 1.401000000000e-14 -1.420000000000e+01 -8.313754132929e-04 0.000000000000e+00 8.313754132787e-04 1.421000000000e-14 -1.440000000000e+01 -8.322538198930e-04 0.000000000000e+00 8.322538198786e-04 1.441000000000e-14 -1.460000000000e+01 -8.330679865459e-04 0.000000000000e+00 8.330679865313e-04 1.461000000000e-14 -1.480000000000e+01 -8.338219869973e-04 0.000000000000e+00 8.338219869825e-04 1.481000000000e-14 -1.500000000000e+01 -8.345196679090e-04 0.000000000000e+00 8.345196678940e-04 1.501000000000e-14 -1.520000000000e+01 -8.351646589137e-04 0.000000000000e+00 8.351646588985e-04 1.521000000000e-14 -1.540000000000e+01 -8.357603826393e-04 0.000000000000e+00 8.357603826239e-04 1.541000000000e-14 -1.560000000000e+01 -8.363100646481e-04 0.000000000000e+00 8.363100646325e-04 1.561000000000e-14 -1.580000000000e+01 -8.368167432435e-04 0.000000000000e+00 8.368167432276e-04 1.581000000000e-14 -1.600000000000e+01 -8.372832791077e-04 0.000000000000e+00 8.372832790917e-04 1.601000000000e-14 -1.620000000000e+01 -8.377123647424e-04 0.000000000000e+00 8.377123647262e-04 1.621000000000e-14 -1.640000000000e+01 -8.381065336895e-04 0.000000000000e+00 8.381065336731e-04 1.641000000000e-14 -1.660000000000e+01 -8.384681695212e-04 0.000000000000e+00 8.384681695046e-04 1.661000000000e-14 -1.680000000000e+01 -8.387995145949e-04 0.000000000000e+00 8.387995145781e-04 1.681000000000e-14 -1.700000000000e+01 -8.391026785745e-04 0.000000000000e+00 8.391026785575e-04 1.701000000000e-14 -1.720000000000e+01 -8.393796467326e-04 0.000000000000e+00 8.393796467154e-04 1.721000000000e-14 -1.740000000000e+01 -8.396322880528e-04 0.000000000000e+00 8.396322880353e-04 1.741000000000e-14 -1.760000000000e+01 -8.398623631639e-04 0.000000000000e+00 8.398623631463e-04 1.761000000000e-14 -1.780000000000e+01 -8.400715321510e-04 0.000000000000e+00 8.400715321332e-04 1.781000000000e-14 -1.800000000000e+01 -8.402613622980e-04 0.000000000000e+00 8.402613622800e-04 1.801000000000e-14 -1.820000000000e+01 -8.404333358386e-04 0.000000000000e+00 8.404333358204e-04 1.821000000000e-14 -1.840000000000e+01 -8.405888578092e-04 0.000000000000e+00 8.405888577908e-04 1.841000000000e-14 -1.860000000000e+01 -8.407292641221e-04 0.000000000000e+00 8.407292641034e-04 1.861000000000e-14 -1.880000000000e+01 -8.408558300022e-04 0.000000000000e+00 8.408558299833e-04 1.881000000000e-14 -1.900000000000e+01 -8.409697789525e-04 0.000000000000e+00 8.409697789335e-04 1.901000000000e-14 -1.920000000000e+01 -8.410722924162e-04 0.000000000000e+00 8.410722923970e-04 1.921000000000e-14 -1.940000000000e+01 -8.411645202554e-04 0.000000000000e+00 8.411645202360e-04 1.941000000000e-14 -1.960000000000e+01 -8.412475919752e-04 0.000000000000e+00 8.412475919556e-04 1.961000000000e-14 -1.980000000000e+01 -8.413226280476e-04 0.000000000000e+00 8.413226280278e-04 1.981000000000e-14 -2.000000000000e+01 -8.413907491763e-04 0.000000000000e+00 8.413907491563e-04 2.001000000000e-14 -1.000000000000e+00 -1.678673419746e-04 0.000000000000e+00 1.678673419736e-04 1.010000000000e-15 -1.200000000000e+00 -1.977080132770e-04 0.000000000000e+00 1.977080132758e-04 1.210000000000e-15 -1.400000000000e+00 -2.264034839815e-04 0.000000000000e+00 2.264034839801e-04 1.410000000000e-15 -1.600000000000e+00 -2.539944228223e-04 0.000000000000e+00 2.539944228207e-04 1.610000000000e-15 -1.800000000000e+00 -2.805203432037e-04 0.000000000000e+00 2.805203432018e-04 1.810000000000e-15 -2.000000000000e+00 -3.060195203907e-04 0.000000000000e+00 3.060195203887e-04 2.010000000000e-15 -2.200000000000e+00 -3.305289199241e-04 0.000000000000e+00 3.305289199219e-04 2.210000000000e-15 -2.400000000000e+00 -3.540841856248e-04 0.000000000000e+00 3.540841856224e-04 2.410000000000e-15 -2.600000000000e+00 -3.767196092488e-04 0.000000000000e+00 3.767196092462e-04 2.610000000000e-15 -2.800000000000e+00 -3.984681390187e-04 0.000000000000e+00 3.984681390158e-04 2.810000000000e-15 -3.000000000000e+00 -4.193613976109e-04 0.000000000000e+00 4.193613976079e-04 3.010000000000e-15 -3.200000000000e+00 -4.394297115563e-04 0.000000000000e+00 4.394297115531e-04 3.210000000000e-15 -3.400000000000e+00 -4.587021495503e-04 0.000000000000e+00 4.587021495468e-04 3.410000000000e-15 -3.600000000000e+00 -4.772065675014e-04 0.000000000000e+00 4.772065674978e-04 3.610000000000e-15 -3.800000000000e+00 -4.949696584676e-04 0.000000000000e+00 4.949696584638e-04 3.810000000000e-15 -4.000000000000e+00 -5.120170059219e-04 0.000000000000e+00 5.120170059179e-04 4.010000000000e-15 -4.200000000000e+00 -5.283731390574e-04 0.000000000000e+00 5.283731390532e-04 4.210000000000e-15 -4.400000000000e+00 -5.440615890723e-04 0.000000000000e+00 5.440615890679e-04 4.410000000000e-15 -4.600000000000e+00 -5.591049455767e-04 0.000000000000e+00 5.591049455720e-04 4.610000000000e-15 -4.800000000000e+00 -5.735249124309e-04 0.000000000000e+00 5.735249124261e-04 4.810000000000e-15 -5.000000000000e+00 -5.873423624699e-04 0.000000000000e+00 5.873423624649e-04 5.010000000000e-15 -5.200000000000e+00 -6.005773906829e-04 0.000000000000e+00 6.005773906777e-04 5.210000000000e-15 -5.400000000000e+00 -6.132493592910e-04 0.000000000000e+00 6.132493592856e-04 5.410000000000e-15 -5.600000000000e+00 -6.253769713542e-04 0.000000000000e+00 6.253769713486e-04 5.610000000000e-15 -5.800000000000e+00 -6.369782816973e-04 0.000000000000e+00 6.369782816915e-04 5.810000000000e-15 -6.000000000000e+00 -6.480707646923e-04 0.000000000000e+00 6.480707646863e-04 6.010000000000e-15 -6.200000000000e+00 -6.586713503342e-04 0.000000000000e+00 6.586713503280e-04 6.210000000000e-15 -6.400000000000e+00 -6.687964633752e-04 0.000000000000e+00 6.687964633687e-04 6.410000000000e-15 -6.600000000000e+00 -6.784620597476e-04 0.000000000000e+00 6.784620597410e-04 6.610000000000e-15 -6.800000000000e+00 -6.876836602381e-04 0.000000000000e+00 6.876836602313e-04 6.810000000000e-15 -7.000000000000e+00 -6.964763813853e-04 0.000000000000e+00 6.964763813783e-04 7.010000000000e-15 -7.200000000000e+00 -7.048549635857e-04 0.000000000000e+00 7.048549635785e-04 7.210000000000e-15 -7.400000000000e+00 -7.128337964010e-04 0.000000000000e+00 7.128337963936e-04 7.410000000000e-15 -7.600000000000e+00 -7.204269410676e-04 0.000000000000e+00 7.204269410600e-04 7.610000000000e-15 -7.800000000000e+00 -7.276481502201e-04 0.000000000000e+00 7.276481502123e-04 7.810000000000e-15 -8.000000000000e+00 -7.345108848538e-04 0.000000000000e+00 7.345108848458e-04 8.010000000000e-15 -8.200000000000e+00 -7.410283358217e-04 0.000000000000e+00 7.410283358135e-04 8.210000000000e-15 -8.400000000000e+00 -7.472134060808e-04 0.000000000000e+00 7.472134060723e-04 8.410000000000e-15 -8.600000000000e+00 -7.530787640901e-04 0.000000000000e+00 7.530787640815e-04 8.610000000000e-15 -8.800000000000e+00 -7.586368204679e-04 0.000000000000e+00 7.586368204591e-04 8.810000000000e-15 -9.000000000000e+00 -7.638997396742e-04 0.000000000000e+00 7.638997396652e-04 9.010000000000e-15 -9.200000000000e+00 -7.688794420051e-04 0.000000000000e+00 7.688794419959e-04 9.210000000000e-15 -9.400000000000e+00 -7.735876035977e-04 0.000000000000e+00 7.735876035883e-04 9.410000000000e-15 -9.600000000000e+00 -7.780356546778e-04 0.000000000000e+00 7.780356546682e-04 9.610000000000e-15 -9.800000000000e+00 -7.822347762972e-04 0.000000000000e+00 7.822347762874e-04 9.810000000000e-15 -1.000000000000e+01 -7.861958958336e-04 0.000000000000e+00 7.861958958236e-04 1.001000000000e-14 -1.020000000000e+01 -7.899296815391e-04 0.000000000000e+00 7.899296815289e-04 1.021000000000e-14 -1.040000000000e+01 -7.934465364296e-04 0.000000000000e+00 7.934465364192e-04 1.041000000000e-14 -1.060000000000e+01 -7.967565918103e-04 0.000000000000e+00 7.967565917997e-04 1.061000000000e-14 -1.080000000000e+01 -7.998697007207e-04 0.000000000000e+00 7.998697007099e-04 1.081000000000e-14 -1.100000000000e+01 -8.027954315660e-04 0.000000000000e+00 8.027954315550e-04 1.101000000000e-14 -1.120000000000e+01 -8.055430621820e-04 0.000000000000e+00 8.055430621708e-04 1.121000000000e-14 -1.140000000000e+01 -8.081215745445e-04 0.000000000000e+00 8.081215745331e-04 1.141000000000e-14 -1.160000000000e+01 -8.105396503074e-04 0.000000000000e+00 8.105396502958e-04 1.161000000000e-14 -1.180000000000e+01 -8.128056673118e-04 0.000000000000e+00 8.128056672999e-04 1.181000000000e-14 -1.200000000000e+01 -8.149276971735e-04 0.000000000000e+00 8.149276971615e-04 1.201000000000e-14 -1.220000000000e+01 -8.169135040196e-04 0.000000000000e+00 8.169135040074e-04 1.221000000000e-14 -1.240000000000e+01 -8.187705444067e-04 0.000000000000e+00 8.187705443943e-04 1.241000000000e-14 -1.260000000000e+01 -8.205059684255e-04 0.000000000000e+00 8.205059684128e-04 1.261000000000e-14 -1.280000000000e+01 -8.221266219635e-04 0.000000000000e+00 8.221266219506e-04 1.281000000000e-14 -1.300000000000e+01 -8.236390500779e-04 0.000000000000e+00 8.236390500649e-04 1.301000000000e-14 -1.320000000000e+01 -8.250495014075e-04 0.000000000000e+00 8.250495013943e-04 1.321000000000e-14 -1.340000000000e+01 -8.263639335394e-04 0.000000000000e+00 8.263639335260e-04 1.341000000000e-14 -1.360000000000e+01 -8.275880192360e-04 0.000000000000e+00 8.275880192224e-04 1.361000000000e-14 -1.380000000000e+01 -8.287271534201e-04 0.000000000000e+00 8.287271534063e-04 1.381000000000e-14 -1.400000000000e+01 -8.297864608136e-04 0.000000000000e+00 8.297864607995e-04 1.401000000000e-14 -1.420000000000e+01 -8.307708041241e-04 0.000000000000e+00 8.307708041099e-04 1.421000000000e-14 -1.440000000000e+01 -8.316847926797e-04 0.000000000000e+00 8.316847926653e-04 1.441000000000e-14 -1.460000000000e+01 -8.325327914118e-04 0.000000000000e+00 8.325327913972e-04 1.461000000000e-14 -1.480000000000e+01 -8.333189300957e-04 0.000000000000e+00 8.333189300809e-04 1.481000000000e-14 -1.500000000000e+01 -8.340471127651e-04 0.000000000000e+00 8.340471127501e-04 1.501000000000e-14 -1.520000000000e+01 -8.347210272240e-04 0.000000000000e+00 8.347210272087e-04 1.521000000000e-14 -1.540000000000e+01 -8.353441545871e-04 0.000000000000e+00 8.353441545717e-04 1.541000000000e-14 -1.560000000000e+01 -8.359197787917e-04 0.000000000000e+00 8.359197787761e-04 1.561000000000e-14 -1.580000000000e+01 -8.364509960279e-04 0.000000000000e+00 8.364509960121e-04 1.581000000000e-14 -1.600000000000e+01 -8.369407240464e-04 0.000000000000e+00 8.369407240304e-04 1.601000000000e-14 -1.620000000000e+01 -8.373917113093e-04 0.000000000000e+00 8.373917112931e-04 1.621000000000e-14 -1.640000000000e+01 -8.378065459577e-04 0.000000000000e+00 8.378065459413e-04 1.641000000000e-14 -1.660000000000e+01 -8.381876645785e-04 0.000000000000e+00 8.381876645619e-04 1.661000000000e-14 -1.680000000000e+01 -8.385373607588e-04 0.000000000000e+00 8.385373607420e-04 1.681000000000e-14 -1.700000000000e+01 -8.388577934257e-04 0.000000000000e+00 8.388577934087e-04 1.701000000000e-14 -1.720000000000e+01 -8.391509949768e-04 0.000000000000e+00 8.391509949595e-04 1.721000000000e-14 -1.740000000000e+01 -8.394188792141e-04 0.000000000000e+00 8.394188791967e-04 1.741000000000e-14 -1.760000000000e+01 -8.396632491046e-04 0.000000000000e+00 8.396632490870e-04 1.761000000000e-14 -1.780000000000e+01 -8.398858044002e-04 0.000000000000e+00 8.398858043824e-04 1.781000000000e-14 -1.800000000000e+01 -8.400881491625e-04 0.000000000000e+00 8.400881491445e-04 1.801000000000e-14 -1.820000000000e+01 -8.402717992522e-04 0.000000000000e+00 8.402717992340e-04 1.821000000000e-14 -1.840000000000e+01 -8.404381898600e-04 0.000000000000e+00 8.404381898416e-04 1.841000000000e-14 -1.860000000000e+01 -8.405886831772e-04 0.000000000000e+00 8.405886831586e-04 1.861000000000e-14 -1.880000000000e+01 -8.407245763269e-04 0.000000000000e+00 8.407245763081e-04 1.881000000000e-14 -1.900000000000e+01 -8.408471097017e-04 0.000000000000e+00 8.408471096827e-04 1.901000000000e-14 -1.920000000000e+01 -8.409574758706e-04 0.000000000000e+00 8.409574758514e-04 1.921000000000e-14 -1.940000000000e+01 -8.410568292130e-04 0.000000000000e+00 8.410568291936e-04 1.941000000000e-14 -1.960000000000e+01 -8.411462963631e-04 0.000000000000e+00 8.411462963435e-04 1.961000000000e-14 -1.980000000000e+01 -8.412269872948e-04 0.000000000000e+00 8.412269872750e-04 1.981000000000e-14 -2.000000000000e+01 -8.413000061442e-04 0.000000000000e+00 8.413000061242e-04 2.001000000000e-14 -1.000000000000e+00 -2.171043080276e-04 0.000000000000e+00 2.171043080266e-04 1.000000000751e-15 -1.200000000000e+00 -2.556417701162e-04 0.000000000000e+00 2.556417701150e-04 1.200000000751e-15 -1.400000000000e+00 -2.927103244660e-04 0.000000000000e+00 2.927103244646e-04 1.400000000751e-15 -1.600000000000e+00 -3.283738842500e-04 0.000000000000e+00 3.283738842484e-04 1.600000000751e-15 -1.800000000000e+00 -3.626938774197e-04 0.000000000000e+00 3.626938774179e-04 1.800000000751e-15 -2.000000000000e+00 -3.957291456694e-04 0.000000000000e+00 3.957291456674e-04 2.000000000751e-15 -2.200000000000e+00 -4.275358951102e-04 0.000000000000e+00 4.275358951080e-04 2.200000000751e-15 -2.400000000000e+00 -4.581676892835e-04 0.000000000000e+00 4.581676892811e-04 2.400000000751e-15 -2.600000000000e+00 -4.876754805332e-04 0.000000000000e+00 4.876754805306e-04 2.600000000751e-15 -2.800000000000e+00 -5.161076437800e-04 0.000000000000e+00 5.161076437772e-04 2.800000000751e-15 -3.000000000000e+00 -5.435100811419e-04 0.000000000000e+00 5.435100811389e-04 3.000000000751e-15 -3.200000000000e+00 -5.699262863846e-04 0.000000000000e+00 5.699262863814e-04 3.200000000751e-15 -3.400000000000e+00 -5.953974484840e-04 0.000000000000e+00 5.953974484806e-04 3.400000000751e-15 -3.600000000000e+00 -6.199625550447e-04 0.000000000000e+00 6.199625550411e-04 3.600000000751e-15 -3.800000000000e+00 -6.436584989837e-04 0.000000000000e+00 6.436584989799e-04 3.800000000751e-15 -4.000000000000e+00 -6.665201862065e-04 0.000000000000e+00 6.665201862025e-04 4.000000000751e-15 -4.200000000000e+00 -6.885806425426e-04 0.000000000000e+00 6.885806425384e-04 4.200000000751e-15 -4.400000000000e+00 -7.098711186496e-04 0.000000000000e+00 7.098711186452e-04 4.400000000751e-15 -4.600000000000e+00 -7.304211919513e-04 0.000000000000e+00 7.304211919467e-04 4.600000000751e-15 -4.800000000000e+00 -7.502588649583e-04 0.000000000000e+00 7.502588649535e-04 4.800000000751e-15 -5.000000000000e+00 -7.694106595458e-04 0.000000000000e+00 7.694106595408e-04 5.000000000751e-15 -5.200000000000e+00 -7.879017069366e-04 0.000000000000e+00 7.879017069314e-04 5.200000000751e-15 -5.400000000000e+00 -8.057558332701e-04 0.000000000000e+00 8.057558332647e-04 5.400000000751e-15 -5.600000000000e+00 -8.229956407399e-04 0.000000000000e+00 8.229956407343e-04 5.600000000751e-15 -5.800000000000e+00 -8.396425843549e-04 0.000000000000e+00 8.396425843491e-04 5.800000000751e-15 -6.000000000000e+00 -8.557170444350e-04 0.000000000000e+00 8.557170444290e-04 6.000000000751e-15 -6.200000000000e+00 -8.712383949865e-04 0.000000000000e+00 8.712383949803e-04 6.200000000751e-15 -6.400000000000e+00 -8.862250681304e-04 0.000000000000e+00 8.862250681240e-04 6.400000000751e-15 -6.600000000000e+00 -9.006946147676e-04 0.000000000000e+00 9.006946147610e-04 6.600000000751e-15 -6.800000000000e+00 -9.146637616766e-04 0.000000000000e+00 9.146637616698e-04 6.800000000751e-15 -7.000000000000e+00 -9.281484652360e-04 0.000000000000e+00 9.281484652290e-04 7.000000000751e-15 -7.200000000000e+00 -9.411639619666e-04 0.000000000000e+00 9.411639619594e-04 7.200000000751e-15 -7.400000000000e+00 -9.537248160774e-04 0.000000000000e+00 9.537248160700e-04 7.400000000751e-15 -7.600000000000e+00 -9.658449641954e-04 0.000000000000e+00 9.658449641878e-04 7.600000000751e-15 -7.800000000000e+00 -9.775377574463e-04 0.000000000000e+00 9.775377574385e-04 7.800000000751e-15 -8.000000000000e+00 -9.888160010451e-04 0.000000000000e+00 9.888160010371e-04 8.000000000751e-15 -8.200000000000e+00 -9.996919915429e-04 0.000000000000e+00 9.996919915347e-04 8.200000000751e-15 -8.400000000000e+00 -1.010177551864e-03 0.000000000000e+00 1.010177551856e-03 8.400000000751e-15 -8.600000000000e+00 -1.020284064255e-03 0.000000000000e+00 1.020284064247e-03 8.600000000751e-15 -8.800000000000e+00 -1.030022501260e-03 0.000000000000e+00 1.030022501252e-03 8.800000000751e-15 -9.000000000000e+00 -1.039403454816e-03 0.000000000000e+00 1.039403454807e-03 9.000000000751e-15 -9.200000000000e+00 -1.048437163558e-03 0.000000000000e+00 1.048437163549e-03 9.200000000751e-15 -9.400000000000e+00 -1.057133538416e-03 0.000000000000e+00 1.057133538407e-03 9.400000000751e-15 -9.600000000000e+00 -1.065502186558e-03 0.000000000000e+00 1.065502186549e-03 9.600000000751e-15 -9.800000000000e+00 -1.073552433753e-03 0.000000000000e+00 1.073552433743e-03 9.800000000751e-15 -1.000000000000e+01 -1.081293345184e-03 0.000000000000e+00 1.081293345174e-03 1.000000000075e-14 -1.020000000000e+01 -1.088733744773e-03 0.000000000000e+00 1.088733744763e-03 1.020000000075e-14 -1.040000000000e+01 -1.095882233031e-03 0.000000000000e+00 1.095882233020e-03 1.040000000075e-14 -1.060000000000e+01 -1.102747203485e-03 0.000000000000e+00 1.102747203474e-03 1.060000000075e-14 -1.080000000000e+01 -1.109336857692e-03 0.000000000000e+00 1.109336857681e-03 1.080000000075e-14 -1.100000000000e+01 -1.115659218873e-03 0.000000000000e+00 1.115659218862e-03 1.100000000075e-14 -1.120000000000e+01 -1.121722144187e-03 0.000000000000e+00 1.121722144176e-03 1.120000000075e-14 -1.140000000000e+01 -1.127533335678e-03 0.000000000000e+00 1.127533335666e-03 1.140000000075e-14 -1.160000000000e+01 -1.133100349908e-03 0.000000000000e+00 1.133100349897e-03 1.160000000075e-14 -1.180000000000e+01 -1.138430606327e-03 0.000000000000e+00 1.138430606315e-03 1.180000000075e-14 -1.200000000000e+01 -1.143531394395e-03 0.000000000000e+00 1.143531394383e-03 1.200000000075e-14 -1.220000000000e+01 -1.148409879522e-03 0.000000000000e+00 1.148409879510e-03 1.220000000075e-14 -1.240000000000e+01 -1.153073107854e-03 0.000000000000e+00 1.153073107841e-03 1.240000000075e-14 -1.260000000000e+01 -1.157528009984e-03 0.000000000000e+00 1.157528009972e-03 1.260000000075e-14 -1.280000000000e+01 -1.161781403638e-03 0.000000000000e+00 1.161781403625e-03 1.280000000075e-14 -1.300000000000e+01 -1.165839995412e-03 0.000000000000e+00 1.165839995399e-03 1.300000000075e-14 -1.320000000000e+01 -1.169710381650e-03 0.000000000000e+00 1.169710381637e-03 1.320000000075e-14 -1.340000000000e+01 -1.173399048541e-03 0.000000000000e+00 1.173399048527e-03 1.340000000075e-14 -1.360000000000e+01 -1.176912371524e-03 0.000000000000e+00 1.176912371510e-03 1.360000000075e-14 -1.380000000000e+01 -1.180256614110e-03 0.000000000000e+00 1.180256614096e-03 1.380000000075e-14 -1.400000000000e+01 -1.183437926207e-03 0.000000000000e+00 1.183437926193e-03 1.400000000075e-14 -1.420000000000e+01 -1.186462342051e-03 0.000000000000e+00 1.186462342037e-03 1.420000000075e-14 -1.440000000000e+01 -1.189335777844e-03 0.000000000000e+00 1.189335777830e-03 1.440000000075e-14 -1.460000000000e+01 -1.192064029187e-03 0.000000000000e+00 1.192064029173e-03 1.460000000075e-14 -1.480000000000e+01 -1.194652768409e-03 0.000000000000e+00 1.194652768395e-03 1.480000000075e-14 -1.500000000000e+01 -1.197107541869e-03 0.000000000000e+00 1.197107541854e-03 1.500000000075e-14 -1.520000000000e+01 -1.199433767310e-03 0.000000000000e+00 1.199433767295e-03 1.520000000075e-14 -1.540000000000e+01 -1.201636731350e-03 0.000000000000e+00 1.201636731335e-03 1.540000000075e-14 -1.560000000000e+01 -1.203721587146e-03 0.000000000000e+00 1.203721587131e-03 1.560000000075e-14 -1.580000000000e+01 -1.205693352311e-03 0.000000000000e+00 1.205693352295e-03 1.580000000075e-14 -1.600000000000e+01 -1.207556907115e-03 0.000000000000e+00 1.207556907099e-03 1.600000000075e-14 -1.620000000000e+01 -1.209316993007e-03 0.000000000000e+00 1.209316992991e-03 1.620000000075e-14 -1.640000000000e+01 -1.210978211488e-03 0.000000000000e+00 1.210978211471e-03 1.640000000075e-14 -1.660000000000e+01 -1.212545023350e-03 0.000000000000e+00 1.212545023334e-03 1.660000000075e-14 -1.680000000000e+01 -1.214021748296e-03 0.000000000000e+00 1.214021748279e-03 1.680000000075e-14 -1.700000000000e+01 -1.215412564935e-03 0.000000000000e+00 1.215412564918e-03 1.700000000075e-14 -1.720000000000e+01 -1.216721511170e-03 0.000000000000e+00 1.216721511153e-03 1.720000000075e-14 -1.740000000000e+01 -1.217952484942e-03 0.000000000000e+00 1.217952484925e-03 1.740000000075e-14 -1.760000000000e+01 -1.219109245345e-03 0.000000000000e+00 1.219109245328e-03 1.760000000075e-14 -1.780000000000e+01 -1.220195414075e-03 0.000000000000e+00 1.220195414058e-03 1.780000000075e-14 -1.800000000000e+01 -1.221214477210e-03 0.000000000000e+00 1.221214477192e-03 1.800000000075e-14 -1.820000000000e+01 -1.222169787282e-03 0.000000000000e+00 1.222169787263e-03 1.820000000075e-14 -1.840000000000e+01 -1.223064565638e-03 0.000000000000e+00 1.223064565620e-03 1.840000000075e-14 -1.860000000000e+01 -1.223901905050e-03 0.000000000000e+00 1.223901905031e-03 1.860000000075e-14 -1.880000000000e+01 -1.224684772554e-03 0.000000000000e+00 1.224684772535e-03 1.880000000075e-14 -1.900000000000e+01 -1.225416012503e-03 0.000000000000e+00 1.225416012484e-03 1.900000000075e-14 -1.920000000000e+01 -1.226098349801e-03 0.000000000000e+00 1.226098349782e-03 1.920000000075e-14 -1.940000000000e+01 -1.226734393302e-03 0.000000000000e+00 1.226734393283e-03 1.940000000075e-14 -1.960000000000e+01 -1.227326639357e-03 0.000000000000e+00 1.227326639338e-03 1.960000000075e-14 -1.980000000000e+01 -1.227877475491e-03 0.000000000000e+00 1.227877475471e-03 1.980000000075e-14 -2.000000000000e+01 -1.228389184191e-03 0.000000000000e+00 1.228389184171e-03 2.000000000075e-14 -1.000000000000e+00 -2.154898342417e-04 0.000000000000e+00 2.154898342407e-04 1.000000000751e-15 -1.200000000000e+00 -2.537461011532e-04 0.000000000000e+00 2.537461011520e-04 1.200000000751e-15 -1.400000000000e+00 -2.905474362069e-04 0.000000000000e+00 2.905474362055e-04 1.400000000751e-15 -1.600000000000e+00 -3.259575885254e-04 0.000000000000e+00 3.259575885238e-04 1.600000000751e-15 -1.800000000000e+00 -3.600377618662e-04 0.000000000000e+00 3.600377618644e-04 1.800000000751e-15 -2.000000000000e+00 -3.928465293748e-04 0.000000000000e+00 3.928465293728e-04 2.000000000751e-15 -2.200000000000e+00 -4.244397971986e-04 0.000000000000e+00 4.244397971964e-04 2.200000000751e-15 -2.400000000000e+00 -4.548708079245e-04 0.000000000000e+00 4.548708079221e-04 2.400000000751e-15 -2.600000000000e+00 -4.841901805211e-04 0.000000000000e+00 4.841901805185e-04 2.600000000751e-15 -2.800000000000e+00 -5.124459492425e-04 0.000000000000e+00 5.124459492397e-04 2.800000000751e-15 -3.000000000000e+00 -5.396836751638e-04 0.000000000000e+00 5.396836751608e-04 3.000000000751e-15 -3.200000000000e+00 -5.659465129321e-04 0.000000000000e+00 5.659465129289e-04 3.200000000751e-15 -3.400000000000e+00 -5.912753173540e-04 0.000000000000e+00 5.912753173506e-04 3.400000000751e-15 -3.600000000000e+00 -6.157087486909e-04 0.000000000000e+00 6.157087486873e-04 3.600000000751e-15 -3.800000000000e+00 -6.392833805906e-04 0.000000000000e+00 6.392833805868e-04 3.800000000751e-15 -4.000000000000e+00 -6.620338085190e-04 0.000000000000e+00 6.620338085150e-04 4.000000000751e-15 -4.200000000000e+00 -6.839927570697e-04 0.000000000000e+00 6.839927570655e-04 4.200000000751e-15 -4.400000000000e+00 -7.051911849503e-04 0.000000000000e+00 7.051911849459e-04 4.400000000751e-15 -4.600000000000e+00 -7.256583867806e-04 0.000000000000e+00 7.256583867760e-04 4.600000000751e-15 -4.800000000000e+00 -7.454220911081e-04 0.000000000000e+00 7.454220911033e-04 4.800000000751e-15 -5.000000000000e+00 -7.645085542595e-04 0.000000000000e+00 7.645085542545e-04 5.000000000751e-15 -5.200000000000e+00 -7.829426498100e-04 0.000000000000e+00 7.829426498048e-04 5.200000000751e-15 -5.400000000000e+00 -8.007479535795e-04 0.000000000000e+00 8.007479535741e-04 5.400000000751e-15 -5.600000000000e+00 -8.179468241575e-04 0.000000000000e+00 8.179468241519e-04 5.600000000751e-15 -5.800000000000e+00 -8.345604790299e-04 0.000000000000e+00 8.345604790241e-04 5.800000000751e-15 -6.000000000000e+00 -8.506090664295e-04 0.000000000000e+00 8.506090664235e-04 6.000000000751e-15 -6.200000000000e+00 -8.661117330675e-04 0.000000000000e+00 8.661117330613e-04 6.200000000751e-15 -6.400000000000e+00 -8.810866879238e-04 0.000000000000e+00 8.810866879174e-04 6.400000000751e-15 -6.600000000000e+00 -8.955512622898e-04 0.000000000000e+00 8.955512622832e-04 6.600000000751e-15 -6.800000000000e+00 -9.095219662607e-04 0.000000000000e+00 9.095219662539e-04 6.800000000751e-15 -7.000000000000e+00 -9.230145418768e-04 0.000000000000e+00 9.230145418698e-04 7.000000000751e-15 -7.200000000000e+00 -9.360440131088e-04 0.000000000000e+00 9.360440131016e-04 7.200000000751e-15 -7.400000000000e+00 -9.486247328775e-04 0.000000000000e+00 9.486247328701e-04 7.400000000751e-15 -7.600000000000e+00 -9.607704272873e-04 0.000000000000e+00 9.607704272797e-04 7.600000000751e-15 -7.800000000000e+00 -9.724942372470e-04 0.000000000000e+00 9.724942372392e-04 7.800000000751e-15 -8.000000000000e+00 -9.838087576353e-04 0.000000000000e+00 9.838087576273e-04 8.000000000751e-15 -8.200000000000e+00 -9.947260741632e-04 0.000000000000e+00 9.947260741550e-04 8.200000000751e-15 -8.400000000000e+00 -1.005257798068e-03 0.000000000000e+00 1.005257798059e-03 8.400000000751e-15 -8.600000000000e+00 -1.015415098765e-03 0.000000000000e+00 1.015415098756e-03 8.600000000751e-15 -8.800000000000e+00 -1.025208734571e-03 0.000000000000e+00 1.025208734562e-03 8.800000000751e-15 -9.000000000000e+00 -1.034649081604e-03 0.000000000000e+00 1.034649081595e-03 9.000000000751e-15 -9.200000000000e+00 -1.043746160940e-03 0.000000000000e+00 1.043746160931e-03 9.200000000751e-15 -9.400000000000e+00 -1.052509664120e-03 0.000000000000e+00 1.052509664110e-03 9.400000000751e-15 -9.600000000000e+00 -1.060948977068e-03 0.000000000000e+00 1.060948977059e-03 9.600000000751e-15 -9.800000000000e+00 -1.069073202486e-03 0.000000000000e+00 1.069073202476e-03 9.800000000751e-15 -1.000000000000e+01 -1.076891180766e-03 0.000000000000e+00 1.076891180756e-03 1.000000000075e-14 -1.020000000000e+01 -1.084411509478e-03 0.000000000000e+00 1.084411509468e-03 1.020000000075e-14 -1.040000000000e+01 -1.091642561460e-03 0.000000000000e+00 1.091642561450e-03 1.040000000075e-14 -1.060000000000e+01 -1.098592501543e-03 0.000000000000e+00 1.098592501532e-03 1.060000000075e-14 -1.080000000000e+01 -1.105269301936e-03 0.000000000000e+00 1.105269301925e-03 1.080000000075e-14 -1.100000000000e+01 -1.111680756301e-03 0.000000000000e+00 1.111680756290e-03 1.100000000075e-14 -1.120000000000e+01 -1.117834492529e-03 0.000000000000e+00 1.117834492518e-03 1.120000000075e-14 -1.140000000000e+01 -1.123737984249e-03 0.000000000000e+00 1.123737984237e-03 1.140000000075e-14 -1.160000000000e+01 -1.129398561076e-03 0.000000000000e+00 1.129398561064e-03 1.160000000075e-14 -1.180000000000e+01 -1.134823417648e-03 0.000000000000e+00 1.134823417637e-03 1.180000000075e-14 -1.200000000000e+01 -1.140019621457e-03 0.000000000000e+00 1.140019621445e-03 1.200000000075e-14 -1.220000000000e+01 -1.144994119514e-03 0.000000000000e+00 1.144994119502e-03 1.220000000075e-14 -1.240000000000e+01 -1.149753743901e-03 0.000000000000e+00 1.149753743889e-03 1.240000000075e-14 -1.260000000000e+01 -1.154305216234e-03 0.000000000000e+00 1.154305216221e-03 1.260000000075e-14 -1.280000000000e+01 -1.158655151112e-03 0.000000000000e+00 1.158655151099e-03 1.280000000075e-14 -1.300000000000e+01 -1.162810058598e-03 0.000000000000e+00 1.162810058585e-03 1.300000000075e-14 -1.320000000000e+01 -1.166776345806e-03 0.000000000000e+00 1.166776345792e-03 1.320000000075e-14 -1.340000000000e+01 -1.170560317671e-03 0.000000000000e+00 1.170560317658e-03 1.340000000075e-14 -1.360000000000e+01 -1.174168176981e-03 0.000000000000e+00 1.174168176967e-03 1.360000000075e-14 -1.380000000000e+01 -1.177606023749e-03 0.000000000000e+00 1.177606023735e-03 1.380000000075e-14 -1.400000000000e+01 -1.180879854031e-03 0.000000000000e+00 1.180879854017e-03 1.400000000075e-14 -1.420000000000e+01 -1.183995558270e-03 0.000000000000e+00 1.183995558256e-03 1.420000000075e-14 -1.440000000000e+01 -1.186958919255e-03 0.000000000000e+00 1.186958919240e-03 1.440000000075e-14 -1.460000000000e+01 -1.189775609803e-03 0.000000000000e+00 1.189775609788e-03 1.460000000075e-14 -1.480000000000e+01 -1.192451190236e-03 0.000000000000e+00 1.192451190221e-03 1.480000000075e-14 -1.500000000000e+01 -1.194991105748e-03 0.000000000000e+00 1.194991105733e-03 1.500000000075e-14 -1.520000000000e+01 -1.197400683745e-03 0.000000000000e+00 1.197400683729e-03 1.520000000075e-14 -1.540000000000e+01 -1.199685131219e-03 0.000000000000e+00 1.199685131204e-03 1.540000000075e-14 -1.560000000000e+01 -1.201849532245e-03 0.000000000000e+00 1.201849532230e-03 1.560000000075e-14 -1.580000000000e+01 -1.203898845638e-03 0.000000000000e+00 1.203898845622e-03 1.580000000075e-14 -1.600000000000e+01 -1.205837902836e-03 0.000000000000e+00 1.205837902820e-03 1.600000000075e-14 -1.620000000000e+01 -1.207671406052e-03 0.000000000000e+00 1.207671406036e-03 1.620000000075e-14 -1.640000000000e+01 -1.209403926720e-03 0.000000000000e+00 1.209403926703e-03 1.640000000075e-14 -1.660000000000e+01 -1.211039904268e-03 0.000000000000e+00 1.211039904252e-03 1.660000000075e-14 -1.680000000000e+01 -1.212583645246e-03 0.000000000000e+00 1.212583645229e-03 1.680000000075e-14 -1.700000000000e+01 -1.214039322795e-03 0.000000000000e+00 1.214039322778e-03 1.700000000075e-14 -1.720000000000e+01 -1.215410976494e-03 0.000000000000e+00 1.215410976477e-03 1.720000000075e-14 -1.740000000000e+01 -1.216702512558e-03 0.000000000000e+00 1.216702512541e-03 1.740000000075e-14 -1.760000000000e+01 -1.217917704393e-03 0.000000000000e+00 1.217917704376e-03 1.760000000075e-14 -1.780000000000e+01 -1.219060193501e-03 0.000000000000e+00 1.219060193483e-03 1.780000000075e-14 -1.800000000000e+01 -1.220133490702e-03 0.000000000000e+00 1.220133490684e-03 1.800000000075e-14 -1.820000000000e+01 -1.221140977686e-03 0.000000000000e+00 1.221140977668e-03 1.820000000075e-14 -1.840000000000e+01 -1.222085908842e-03 0.000000000000e+00 1.222085908824e-03 1.840000000075e-14 -1.860000000000e+01 -1.222971413369e-03 0.000000000000e+00 1.222971413350e-03 1.860000000075e-14 -1.880000000000e+01 -1.223800497632e-03 0.000000000000e+00 1.223800497613e-03 1.880000000075e-14 -1.900000000000e+01 -1.224576047755e-03 0.000000000000e+00 1.224576047736e-03 1.900000000075e-14 -1.920000000000e+01 -1.225300832409e-03 0.000000000000e+00 1.225300832390e-03 1.920000000075e-14 -1.940000000000e+01 -1.225977505795e-03 0.000000000000e+00 1.225977505775e-03 1.940000000075e-14 -1.960000000000e+01 -1.226608610788e-03 0.000000000000e+00 1.226608610769e-03 1.960000000075e-14 -1.980000000000e+01 -1.227196582239e-03 0.000000000000e+00 1.227196582220e-03 1.980000000075e-14 -2.000000000000e+01 -1.227743750397e-03 0.000000000000e+00 1.227743750377e-03 2.000000000075e-14 -1.000000000000e+00 -2.135337954620e-04 0.000000000000e+00 2.135337954610e-04 1.000000000751e-15 -1.200000000000e+00 -2.514475312227e-04 0.000000000000e+00 2.514475312215e-04 1.200000000751e-15 -1.400000000000e+00 -2.879226837587e-04 0.000000000000e+00 2.879226837573e-04 1.400000000751e-15 -1.600000000000e+00 -3.230228255341e-04 0.000000000000e+00 3.230228255325e-04 1.600000000751e-15 -1.800000000000e+00 -3.568089132640e-04 0.000000000000e+00 3.568089132622e-04 1.800000000751e-15 -2.000000000000e+00 -3.893392210123e-04 0.000000000000e+00 3.893392210103e-04 2.000000000751e-15 -2.200000000000e+00 -4.206693188595e-04 0.000000000000e+00 4.206693188573e-04 2.200000000751e-15 -2.400000000000e+00 -4.508520884867e-04 0.000000000000e+00 4.508520884843e-04 2.400000000751e-15 -2.600000000000e+00 -4.799377679360e-04 0.000000000000e+00 4.799377679334e-04 2.600000000751e-15 -2.800000000000e+00 -5.079740225116e-04 0.000000000000e+00 5.079740225088e-04 2.800000000751e-15 -3.000000000000e+00 -5.350060123356e-04 0.000000000000e+00 5.350060123326e-04 3.000000000751e-15 -3.200000000000e+00 -5.610765140173e-04 0.000000000000e+00 5.610765140141e-04 3.200000000751e-15 -3.400000000000e+00 -5.862260046571e-04 0.000000000000e+00 5.862260046537e-04 3.400000000751e-15 -3.600000000000e+00 -6.104927746224e-04 0.000000000000e+00 6.104927746188e-04 3.600000000751e-15 -3.800000000000e+00 -6.339130369742e-04 0.000000000000e+00 6.339130369704e-04 3.800000000751e-15 -4.000000000000e+00 -6.565210368186e-04 0.000000000000e+00 6.565210368146e-04 4.000000000751e-15 -4.200000000000e+00 -6.783491590871e-04 0.000000000000e+00 6.783491590829e-04 4.200000000751e-15 -4.400000000000e+00 -6.994280336479e-04 0.000000000000e+00 6.994280336435e-04 4.400000000751e-15 -4.600000000000e+00 -7.197866369643e-04 0.000000000000e+00 7.197866369597e-04 4.600000000751e-15 -4.800000000000e+00 -7.394523897745e-04 0.000000000000e+00 7.394523897697e-04 4.800000000751e-15 -5.000000000000e+00 -7.584512504586e-04 0.000000000000e+00 7.584512504536e-04 5.000000000751e-15 -5.200000000000e+00 -7.768078039184e-04 0.000000000000e+00 7.768078039132e-04 5.200000000751e-15 -5.400000000000e+00 -7.945453459087e-04 0.000000000000e+00 7.945453459033e-04 5.400000000751e-15 -5.600000000000e+00 -8.116859628478e-04 0.000000000000e+00 8.116859628422e-04 5.600000000751e-15 -5.800000000000e+00 -8.282506071977e-04 0.000000000000e+00 8.282506071919e-04 5.800000000751e-15 -6.000000000000e+00 -8.442591685535e-04 0.000000000000e+00 8.442591685475e-04 6.000000000751e-15 -6.200000000000e+00 -8.597305406074e-04 0.000000000000e+00 8.597305406012e-04 6.200000000751e-15 -6.400000000000e+00 -8.746826841772e-04 0.000000000000e+00 8.746826841708e-04 6.400000000751e-15 -6.600000000000e+00 -8.891326864984e-04 0.000000000000e+00 8.891326864918e-04 6.600000000751e-15 -6.800000000000e+00 -9.030968169827e-04 0.000000000000e+00 9.030968169759e-04 6.800000000751e-15 -7.000000000000e+00 -9.165905796473e-04 0.000000000000e+00 9.165905796403e-04 7.000000000751e-15 -7.200000000000e+00 -9.296287624151e-04 0.000000000000e+00 9.296287624079e-04 7.200000000751e-15 -7.400000000000e+00 -9.422254834760e-04 0.000000000000e+00 9.422254834686e-04 7.400000000751e-15 -7.600000000000e+00 -9.543942348975e-04 0.000000000000e+00 9.543942348899e-04 7.600000000751e-15 -7.800000000000e+00 -9.661479236542e-04 0.000000000000e+00 9.661479236464e-04 7.800000000751e-15 -8.000000000000e+00 -9.774989102435e-04 0.000000000000e+00 9.774989102355e-04 8.000000000751e-15 -8.200000000000e+00 -9.884590450369e-04 0.000000000000e+00 9.884590450287e-04 8.200000000751e-15 -8.400000000000e+00 -9.990397025091e-04 0.000000000000e+00 9.990397025007e-04 8.400000000751e-15 -8.600000000000e+00 -1.009251813472e-03 0.000000000000e+00 1.009251813463e-03 8.600000000751e-15 -8.800000000000e+00 -1.019105895431e-03 0.000000000000e+00 1.019105895422e-03 8.800000000751e-15 -9.000000000000e+00 -1.028612081171e-03 0.000000000000e+00 1.028612081162e-03 9.000000000751e-15 -9.200000000000e+00 -1.037780145668e-03 0.000000000000e+00 1.037780145659e-03 9.200000000751e-15 -9.400000000000e+00 -1.046619531398e-03 0.000000000000e+00 1.046619531388e-03 9.400000000751e-15 -9.600000000000e+00 -1.055139372138e-03 0.000000000000e+00 1.055139372128e-03 9.600000000751e-15 -9.800000000000e+00 -1.063348515305e-03 0.000000000000e+00 1.063348515295e-03 9.800000000751e-15 -1.000000000000e+01 -1.071255542897e-03 0.000000000000e+00 1.071255542887e-03 1.000000000075e-14 -1.020000000000e+01 -1.078868791077e-03 0.000000000000e+00 1.078868791067e-03 1.020000000075e-14 -1.040000000000e+01 -1.086196368449e-03 0.000000000000e+00 1.086196368438e-03 1.040000000075e-14 -1.060000000000e+01 -1.093246173043e-03 0.000000000000e+00 1.093246173032e-03 1.060000000075e-14 -1.080000000000e+01 -1.100025908056e-03 0.000000000000e+00 1.100025908045e-03 1.080000000075e-14 -1.100000000000e+01 -1.106543096357e-03 0.000000000000e+00 1.106543096346e-03 1.100000000075e-14 -1.120000000000e+01 -1.112805093781e-03 0.000000000000e+00 1.112805093770e-03 1.120000000075e-14 -1.140000000000e+01 -1.118819101231e-03 0.000000000000e+00 1.118819101219e-03 1.140000000075e-14 -1.160000000000e+01 -1.124592175607e-03 0.000000000000e+00 1.124592175596e-03 1.160000000075e-14 -1.180000000000e+01 -1.130131239581e-03 0.000000000000e+00 1.130131239570e-03 1.180000000075e-14 -1.200000000000e+01 -1.135443090232e-03 0.000000000000e+00 1.135443090220e-03 1.200000000075e-14 -1.220000000000e+01 -1.140534406572e-03 0.000000000000e+00 1.140534406560e-03 1.220000000075e-14 -1.240000000000e+01 -1.145411755997e-03 0.000000000000e+00 1.145411755985e-03 1.240000000075e-14 -1.260000000000e+01 -1.150081599681e-03 0.000000000000e+00 1.150081599668e-03 1.260000000075e-14 -1.280000000000e+01 -1.154550296965e-03 0.000000000000e+00 1.154550296952e-03 1.280000000075e-14 -1.300000000000e+01 -1.158824108792e-03 0.000000000000e+00 1.158824108779e-03 1.300000000075e-14 -1.320000000000e+01 -1.162909200222e-03 0.000000000000e+00 1.162909200209e-03 1.320000000075e-14 -1.340000000000e+01 -1.166811642112e-03 0.000000000000e+00 1.166811642099e-03 1.340000000075e-14 -1.360000000000e+01 -1.170537412004e-03 0.000000000000e+00 1.170537411990e-03 1.360000000075e-14 -1.380000000000e+01 -1.174092394311e-03 0.000000000000e+00 1.174092394297e-03 1.380000000075e-14 -1.400000000000e+01 -1.177482379871e-03 0.000000000000e+00 1.177482379857e-03 1.400000000075e-14 -1.420000000000e+01 -1.180713064944e-03 0.000000000000e+00 1.180713064929e-03 1.420000000075e-14 -1.440000000000e+01 -1.183790049742e-03 0.000000000000e+00 1.183790049728e-03 1.440000000075e-14 -1.460000000000e+01 -1.186718836586e-03 0.000000000000e+00 1.186718836571e-03 1.460000000075e-14 -1.480000000000e+01 -1.189504827743e-03 0.000000000000e+00 1.189504827728e-03 1.480000000075e-14 -1.500000000000e+01 -1.192153323066e-03 0.000000000000e+00 1.192153323051e-03 1.500000000075e-14 -1.520000000000e+01 -1.194669517488e-03 0.000000000000e+00 1.194669517473e-03 1.520000000075e-14 -1.540000000000e+01 -1.197058498453e-03 0.000000000000e+00 1.197058498437e-03 1.540000000075e-14 -1.560000000000e+01 -1.199325243359e-03 0.000000000000e+00 1.199325243343e-03 1.560000000075e-14 -1.580000000000e+01 -1.201474617080e-03 0.000000000000e+00 1.201474617064e-03 1.580000000075e-14 -1.600000000000e+01 -1.203511369612e-03 0.000000000000e+00 1.203511369596e-03 1.600000000075e-14 -1.620000000000e+01 -1.205440133905e-03 0.000000000000e+00 1.205440133888e-03 1.620000000075e-14 -1.640000000000e+01 -1.207265423923e-03 0.000000000000e+00 1.207265423907e-03 1.640000000075e-14 -1.660000000000e+01 -1.208991632966e-03 0.000000000000e+00 1.208991632949e-03 1.660000000075e-14 -1.680000000000e+01 -1.210623032276e-03 0.000000000000e+00 1.210623032259e-03 1.680000000075e-14 -1.700000000000e+01 -1.212163769963e-03 0.000000000000e+00 1.212163769946e-03 1.700000000075e-14 -1.720000000000e+01 -1.213617870249e-03 0.000000000000e+00 1.213617870232e-03 1.720000000075e-14 -1.740000000000e+01 -1.214989233053e-03 0.000000000000e+00 1.214989233035e-03 1.740000000075e-14 -1.760000000000e+01 -1.216281633903e-03 0.000000000000e+00 1.216281633886e-03 1.760000000075e-14 -1.780000000000e+01 -1.217498724191e-03 0.000000000000e+00 1.217498724174e-03 1.780000000075e-14 -1.800000000000e+01 -1.218644031747e-03 0.000000000000e+00 1.218644031729e-03 1.800000000075e-14 -1.820000000000e+01 -1.219720961727e-03 0.000000000000e+00 1.219720961708e-03 1.820000000075e-14 -1.840000000000e+01 -1.220732797812e-03 0.000000000000e+00 1.220732797794e-03 1.840000000075e-14 -1.860000000000e+01 -1.221682703683e-03 0.000000000000e+00 1.221682703665e-03 1.860000000075e-14 -1.880000000000e+01 -1.222573724765e-03 0.000000000000e+00 1.222573724746e-03 1.880000000075e-14 -1.900000000000e+01 -1.223408790222e-03 0.000000000000e+00 1.223408790203e-03 1.900000000075e-14 -1.920000000000e+01 -1.224190715177e-03 0.000000000000e+00 1.224190715158e-03 1.920000000075e-14 -1.940000000000e+01 -1.224922203144e-03 0.000000000000e+00 1.224922203125e-03 1.940000000075e-14 -1.960000000000e+01 -1.225605848648e-03 0.000000000000e+00 1.225605848629e-03 1.960000000075e-14 -1.980000000000e+01 -1.226244140018e-03 0.000000000000e+00 1.226244139999e-03 1.980000000075e-14 -2.000000000000e+01 -1.226839462332e-03 0.000000000000e+00 1.226839462312e-03 2.000000000075e-14 -1.000000000000e+00 -1.194653670559e-04 0.000000000000e+00 1.194653541011e-04 1.295474362084e-11 -1.200000000000e+00 -1.406034606993e-04 0.000000000000e+00 1.406034477444e-04 1.295494362086e-11 -1.400000000000e+00 -1.608734849355e-04 0.000000000000e+00 1.608734719803e-04 1.295514362086e-11 -1.600000000000e+00 -1.802973110287e-04 0.000000000000e+00 1.802972980733e-04 1.295534362086e-11 -1.800000000000e+00 -1.988969395935e-04 0.000000000000e+00 1.988969266379e-04 1.295554362086e-11 -2.000000000000e+00 -2.166944476791e-04 0.000000000000e+00 2.166944347234e-04 1.295574362086e-11 -2.200000000000e+00 -2.337119427772e-04 0.000000000000e+00 2.337119298213e-04 1.295594362086e-11 -2.400000000000e+00 -2.499715175049e-04 0.000000000000e+00 2.499715045487e-04 1.295614362086e-11 -2.600000000000e+00 -2.654952090756e-04 0.000000000000e+00 2.654951961193e-04 1.295634362086e-11 -2.800000000000e+00 -2.803049642864e-04 0.000000000000e+00 2.803049513298e-04 1.295654362086e-11 -3.000000000000e+00 -2.944226099473e-04 0.000000000000e+00 2.944225969906e-04 1.295674362086e-11 -3.200000000000e+00 -3.078698282255e-04 0.000000000000e+00 3.078698152686e-04 1.295694362086e-11 -3.400000000000e+00 -3.206681361403e-04 0.000000000000e+00 3.206681231831e-04 1.295714362086e-11 -3.600000000000e+00 -3.328388647460e-04 0.000000000000e+00 3.328388517886e-04 1.295734362086e-11 -3.800000000000e+00 -3.444031583792e-04 0.000000000000e+00 3.444031454217e-04 1.295754362086e-11 -4.000000000000e+00 -3.553819415288e-04 0.000000000000e+00 3.553819285710e-04 1.295774362086e-11 -4.200000000000e+00 -3.657959197060e-04 0.000000000000e+00 3.657959067481e-04 1.295794362086e-11 -4.400000000000e+00 -3.756655649317e-04 0.000000000000e+00 3.756655519735e-04 1.295814362086e-11 -4.600000000000e+00 -3.850111043496e-04 0.000000000000e+00 3.850110913912e-04 1.295834362086e-11 -4.800000000000e+00 -3.938525085828e-04 0.000000000000e+00 3.938524956242e-04 1.295854362086e-11 -5.000000000000e+00 -4.022094796001e-04 0.000000000000e+00 4.022094666414e-04 1.295874362086e-11 -5.200000000000e+00 -4.101014379432e-04 0.000000000000e+00 4.101014249842e-04 1.295894362086e-11 -5.400000000000e+00 -4.175475092304e-04 0.000000000000e+00 4.175474962713e-04 1.295914362086e-11 -5.600000000000e+00 -4.245665099084e-04 0.000000000000e+00 4.245664969491e-04 1.295934362086e-11 -5.800000000000e+00 -4.311769322644e-04 0.000000000000e+00 4.311769193049e-04 1.295954362086e-11 -6.000000000000e+00 -4.373969287497e-04 0.000000000000e+00 4.373969157899e-04 1.295974362086e-11 -6.200000000000e+00 -4.432442956960e-04 0.000000000000e+00 4.432442827360e-04 1.295994362086e-11 -6.400000000000e+00 -4.487364609124e-04 0.000000000000e+00 4.487364479522e-04 1.296014362086e-11 -6.600000000000e+00 -4.538904487669e-04 0.000000000000e+00 4.538904358066e-04 1.296034362086e-11 -6.800000000000e+00 -4.587228900564e-04 0.000000000000e+00 4.587228770958e-04 1.296054362086e-11 -7.000000000000e+00 -4.632499863855e-04 0.000000000000e+00 4.632499734247e-04 1.296074362086e-11 -7.200000000000e+00 -4.674874979124e-04 0.000000000000e+00 4.674874849515e-04 1.296094362086e-11 -7.400000000000e+00 -4.714507270254e-04 0.000000000000e+00 4.714507140642e-04 1.296114362086e-11 -7.600000000000e+00 -4.751545029208e-04 0.000000000000e+00 4.751544899594e-04 1.296134362086e-11 -7.800000000000e+00 -4.786131674066e-04 0.000000000000e+00 4.786131544451e-04 1.296154362086e-11 -8.000000000000e+00 -4.818405622519e-04 0.000000000000e+00 4.818405492901e-04 1.296174362086e-11 -8.200000000000e+00 -4.848500183860e-04 0.000000000000e+00 4.848500054241e-04 1.296194362086e-11 -8.400000000000e+00 -4.876543472219e-04 0.000000000000e+00 4.876543342597e-04 1.296214362086e-11 -8.600000000000e+00 -4.902658343268e-04 0.000000000000e+00 4.902658213644e-04 1.296234362086e-11 -8.800000000000e+00 -4.926962356111e-04 0.000000000000e+00 4.926962226485e-04 1.296254362086e-11 -9.000000000000e+00 -4.949567761346e-04 0.000000000000e+00 4.949567631719e-04 1.296274362086e-11 -9.200000000000e+00 -4.970581515643e-04 0.000000000000e+00 4.970581386014e-04 1.296294362086e-11 -9.400000000000e+00 -4.990105322455e-04 0.000000000000e+00 4.990105192823e-04 1.296314362086e-11 -9.600000000000e+00 -5.008235697857e-04 0.000000000000e+00 5.008235568223e-04 1.296334362086e-11 -9.800000000000e+00 -5.025064059944e-04 0.000000000000e+00 5.025063930309e-04 1.296354362086e-11 -1.000000000000e+01 -5.040676839744e-04 0.000000000000e+00 5.040676710107e-04 1.296374362086e-11 -1.020000000000e+01 -5.055155611261e-04 0.000000000000e+00 5.055155481621e-04 1.296394362086e-11 -1.040000000000e+01 -5.068577238038e-04 0.000000000000e+00 5.068577108396e-04 1.296414362086e-11 -1.060000000000e+01 -5.081014033514e-04 0.000000000000e+00 5.081013903871e-04 1.296434362086e-11 -1.080000000000e+01 -5.092533932410e-04 0.000000000000e+00 5.092533802765e-04 1.296454362086e-11 -1.100000000000e+01 -5.103200670486e-04 0.000000000000e+00 5.103200540838e-04 1.296474362086e-11 -1.120000000000e+01 -5.113073970116e-04 0.000000000000e+00 5.113073840466e-04 1.296494362086e-11 -1.140000000000e+01 -5.122209729353e-04 0.000000000000e+00 5.122209599702e-04 1.296514362086e-11 -1.160000000000e+01 -5.130660212351e-04 0.000000000000e+00 5.130660082698e-04 1.296534362086e-11 -1.180000000000e+01 -5.138474239272e-04 0.000000000000e+00 5.138474109617e-04 1.296554362086e-11 -1.200000000000e+01 -5.145697374076e-04 0.000000000000e+00 5.145697244418e-04 1.296574362086e-11 -1.220000000000e+01 -5.152372108800e-04 0.000000000000e+00 5.152371979140e-04 1.296594362086e-11 -1.240000000000e+01 -5.158538043229e-04 0.000000000000e+00 5.158537913568e-04 1.296614362086e-11 -1.260000000000e+01 -5.164232059029e-04 0.000000000000e+00 5.164231929366e-04 1.296634362086e-11 -1.280000000000e+01 -5.169488487660e-04 0.000000000000e+00 5.169488357994e-04 1.296654362086e-11 -1.300000000000e+01 -5.174339271549e-04 0.000000000000e+00 5.174339141881e-04 1.296674362086e-11 -1.320000000000e+01 -5.178814118172e-04 0.000000000000e+00 5.178813988503e-04 1.296694362086e-11 -1.340000000000e+01 -5.182940646826e-04 0.000000000000e+00 5.182940517154e-04 1.296714362086e-11 -1.360000000000e+01 -5.186744527994e-04 0.000000000000e+00 5.186744398321e-04 1.296734362086e-11 -1.380000000000e+01 -5.190249615319e-04 0.000000000000e+00 5.190249485643e-04 1.296754362086e-11 -1.400000000000e+01 -5.193478070252e-04 0.000000000000e+00 5.193477940574e-04 1.296774362086e-11 -1.420000000000e+01 -5.196450479543e-04 0.000000000000e+00 5.196450349864e-04 1.296794362086e-11 -1.440000000000e+01 -5.199185965771e-04 0.000000000000e+00 5.199185836089e-04 1.296814362086e-11 -1.460000000000e+01 -5.201702291150e-04 0.000000000000e+00 5.201702161466e-04 1.296834362086e-11 -1.480000000000e+01 -5.204015954901e-04 0.000000000000e+00 5.204015825215e-04 1.296854362086e-11 -1.500000000000e+01 -5.206142284473e-04 0.000000000000e+00 5.206142154786e-04 1.296874362086e-11 -1.520000000000e+01 -5.208095520926e-04 0.000000000000e+00 5.208095391237e-04 1.296894362086e-11 -1.540000000000e+01 -5.209888898793e-04 0.000000000000e+00 5.209888769102e-04 1.296914362086e-11 -1.560000000000e+01 -5.211534720750e-04 0.000000000000e+00 5.211534591057e-04 1.296934362086e-11 -1.580000000000e+01 -5.213044427403e-04 0.000000000000e+00 5.213044297708e-04 1.296954362086e-11 -1.600000000000e+01 -5.214428662515e-04 0.000000000000e+00 5.214428532817e-04 1.296974362086e-11 -1.620000000000e+01 -5.215697333978e-04 0.000000000000e+00 5.215697204279e-04 1.296994362086e-11 -1.640000000000e+01 -5.216859670834e-04 0.000000000000e+00 5.216859541132e-04 1.297014362086e-11 -1.660000000000e+01 -5.217924276604e-04 0.000000000000e+00 5.217924146901e-04 1.297034362086e-11 -1.680000000000e+01 -5.218899179218e-04 0.000000000000e+00 5.218899049512e-04 1.297054362086e-11 -1.700000000000e+01 -5.219791877739e-04 0.000000000000e+00 5.219791748031e-04 1.297074362086e-11 -1.720000000000e+01 -5.220609386112e-04 0.000000000000e+00 5.220609256403e-04 1.297094362086e-11 -1.740000000000e+01 -5.221358274050e-04 0.000000000000e+00 5.221358144339e-04 1.297114362086e-11 -1.760000000000e+01 -5.222044705133e-04 0.000000000000e+00 5.222044575420e-04 1.297134362086e-11 -1.780000000000e+01 -5.222674472074e-04 0.000000000000e+00 5.222674342358e-04 1.297154362086e-11 -1.800000000000e+01 -5.223253028953e-04 0.000000000000e+00 5.223252899235e-04 1.297174362086e-11 -1.820000000000e+01 -5.223785519984e-04 0.000000000000e+00 5.223785390265e-04 1.297194362086e-11 -1.840000000000e+01 -5.224276804064e-04 0.000000000000e+00 5.224276674343e-04 1.297214362086e-11 -1.860000000000e+01 -5.224731473920e-04 0.000000000000e+00 5.224731344196e-04 1.297234362086e-11 -1.880000000000e+01 -5.225153868157e-04 0.000000000000e+00 5.225153738431e-04 1.297254362086e-11 -1.900000000000e+01 -5.225548074137e-04 0.000000000000e+00 5.225547944409e-04 1.297274362086e-11 -1.920000000000e+01 -5.225917919724e-04 0.000000000000e+00 5.225917789995e-04 1.297294362086e-11 -1.940000000000e+01 -5.226266953260e-04 0.000000000000e+00 5.226266823528e-04 1.297314362086e-11 -1.960000000000e+01 -5.226598414014e-04 0.000000000000e+00 5.226598284280e-04 1.297334362086e-11 -1.980000000000e+01 -5.226915199371e-04 0.000000000000e+00 5.226915069635e-04 1.297354362086e-11 -2.000000000000e+01 -5.227219838106e-04 0.000000000000e+00 5.227219708368e-04 1.297374362086e-11 -1.000000000000e+00 -1.189914142425e-04 0.000000000000e+00 1.189914012878e-04 1.295474362084e-11 -1.200000000000e+00 -1.400520747402e-04 0.000000000000e+00 1.400520617853e-04 1.295494362086e-11 -1.400000000000e+00 -1.602508221088e-04 0.000000000000e+00 1.602508091536e-04 1.295514362086e-11 -1.600000000000e+00 -1.796095805400e-04 0.000000000000e+00 1.796095675847e-04 1.295534362086e-11 -1.800000000000e+00 -1.981503566562e-04 0.000000000000e+00 1.981503437007e-04 1.295554362086e-11 -2.000000000000e+00 -2.158951901604e-04 0.000000000000e+00 2.158951772047e-04 1.295574362086e-11 -2.200000000000e+00 -2.328661117859e-04 0.000000000000e+00 2.328660988299e-04 1.295594362086e-11 -2.400000000000e+00 -2.490851017470e-04 0.000000000000e+00 2.490850887909e-04 1.295614362086e-11 -2.600000000000e+00 -2.645740528375e-04 0.000000000000e+00 2.645740398812e-04 1.295634362086e-11 -2.800000000000e+00 -2.793547388839e-04 0.000000000000e+00 2.793547259273e-04 1.295654362086e-11 -3.000000000000e+00 -2.934487884841e-04 0.000000000000e+00 2.934487755274e-04 1.295674362086e-11 -3.200000000000e+00 -3.068776635115e-04 0.000000000000e+00 3.068776505546e-04 1.295694362086e-11 -3.400000000000e+00 -3.196626416356e-04 0.000000000000e+00 3.196626286785e-04 1.295714362086e-11 -3.600000000000e+00 -3.318247984830e-04 0.000000000000e+00 3.318247855256e-04 1.295734362086e-11 -3.800000000000e+00 -3.433850093877e-04 0.000000000000e+00 3.433849964301e-04 1.295754362086e-11 -4.000000000000e+00 -3.543639194048e-04 0.000000000000e+00 3.543639064470e-04 1.295774362086e-11 -4.200000000000e+00 -3.647819464770e-04 0.000000000000e+00 3.647819335190e-04 1.295794362086e-11 -4.400000000000e+00 -3.746592694952e-04 0.000000000000e+00 3.746592565371e-04 1.295814362086e-11 -4.600000000000e+00 -3.840158193088e-04 0.000000000000e+00 3.840158063505e-04 1.295834362086e-11 -4.800000000000e+00 -3.928712693693e-04 0.000000000000e+00 3.928712564108e-04 1.295854362086e-11 -5.000000000000e+00 -4.012450257679e-04 0.000000000000e+00 4.012450128091e-04 1.295874362086e-11 -5.200000000000e+00 -4.091562165097e-04 0.000000000000e+00 4.091562035508e-04 1.295894362086e-11 -5.400000000000e+00 -4.166236799329e-04 0.000000000000e+00 4.166236669738e-04 1.295914362086e-11 -5.600000000000e+00 -4.236659522350e-04 0.000000000000e+00 4.236659392757e-04 1.295934362086e-11 -5.800000000000e+00 -4.303012541147e-04 0.000000000000e+00 4.303012411551e-04 1.295954362086e-11 -6.000000000000e+00 -4.365474765728e-04 0.000000000000e+00 4.365474636131e-04 1.295974362086e-11 -6.200000000000e+00 -4.424221659504e-04 0.000000000000e+00 4.424221529905e-04 1.295994362086e-11 -6.400000000000e+00 -4.479425127747e-04 0.000000000000e+00 4.479424998146e-04 1.296014362086e-11 -6.600000000000e+00 -4.531253174816e-04 0.000000000000e+00 4.531253045213e-04 1.296034362086e-11 -6.800000000000e+00 -4.579870016340e-04 0.000000000000e+00 4.579869886734e-04 1.296054362086e-11 -7.000000000000e+00 -4.625435726097e-04 0.000000000000e+00 4.625435596490e-04 1.296074362086e-11 -7.200000000000e+00 -4.668106119052e-04 0.000000000000e+00 4.668105989442e-04 1.296094362086e-11 -7.400000000000e+00 -4.708032591067e-04 0.000000000000e+00 4.708032461455e-04 1.296114362086e-11 -7.600000000000e+00 -4.745361965840e-04 0.000000000000e+00 4.745361836227e-04 1.296134362086e-11 -7.800000000000e+00 -4.780236352316e-04 0.000000000000e+00 4.780236222701e-04 1.296154362086e-11 -8.000000000000e+00 -4.812793015829e-04 0.000000000000e+00 4.812792886212e-04 1.296174362086e-11 -8.200000000000e+00 -4.843164266126e-04 0.000000000000e+00 4.843164136507e-04 1.296194362086e-11 -8.400000000000e+00 -4.871477365110e-04 0.000000000000e+00 4.871477235489e-04 1.296214362086e-11 -8.600000000000e+00 -4.897854456742e-04 0.000000000000e+00 4.897854327118e-04 1.296234362086e-11 -8.800000000000e+00 -4.922412520956e-04 0.000000000000e+00 4.922412391331e-04 1.296254362086e-11 -9.000000000000e+00 -4.945263352859e-04 0.000000000000e+00 4.945263223231e-04 1.296274362086e-11 -9.200000000000e+00 -4.966513567724e-04 0.000000000000e+00 4.966513438095e-04 1.296294362086e-11 -9.400000000000e+00 -4.986264631696e-04 0.000000000000e+00 4.986264502064e-04 1.296314362086e-11 -9.600000000000e+00 -5.004612917384e-04 0.000000000000e+00 5.004612787751e-04 1.296334362086e-11 -9.800000000000e+00 -5.021649783017e-04 0.000000000000e+00 5.021649653382e-04 1.296354362086e-11 -1.000000000000e+01 -5.037461673284e-04 0.000000000000e+00 5.037461543647e-04 1.296374362086e-11 -1.020000000000e+01 -5.052130239671e-04 0.000000000000e+00 5.052130110032e-04 1.296394362086e-11 -1.040000000000e+01 -5.065732477781e-04 0.000000000000e+00 5.065732348139e-04 1.296414362086e-11 -1.060000000000e+01 -5.078340879032e-04 0.000000000000e+00 5.078340749388e-04 1.296434362086e-11 -1.080000000000e+01 -5.090023594041e-04 0.000000000000e+00 5.090023464396e-04 1.296454362086e-11 -1.100000000000e+01 -5.100844605069e-04 0.000000000000e+00 5.100844475421e-04 1.296474362086e-11 -1.120000000000e+01 -5.110863904994e-04 0.000000000000e+00 5.110863775345e-04 1.296494362086e-11 -1.140000000000e+01 -5.120137680495e-04 0.000000000000e+00 5.120137550844e-04 1.296514362086e-11 -1.160000000000e+01 -5.128718497273e-04 0.000000000000e+00 5.128718367620e-04 1.296534362086e-11 -1.180000000000e+01 -5.136655485431e-04 0.000000000000e+00 5.136655355776e-04 1.296554362086e-11 -1.200000000000e+01 -5.143994523348e-04 0.000000000000e+00 5.143994393691e-04 1.296574362086e-11 -1.220000000000e+01 -5.150778418626e-04 0.000000000000e+00 5.150778288967e-04 1.296594362086e-11 -1.240000000000e+01 -5.157047084944e-04 0.000000000000e+00 5.157046955283e-04 1.296614362086e-11 -1.260000000000e+01 -5.162837713855e-04 0.000000000000e+00 5.162837584192e-04 1.296634362086e-11 -1.280000000000e+01 -5.168184940784e-04 0.000000000000e+00 5.168184811118e-04 1.296654362086e-11 -1.300000000000e+01 -5.173121004656e-04 0.000000000000e+00 5.173120874989e-04 1.296674362086e-11 -1.320000000000e+01 -5.177675900768e-04 0.000000000000e+00 5.177675771099e-04 1.296694362086e-11 -1.340000000000e+01 -5.181877526624e-04 0.000000000000e+00 5.181877396952e-04 1.296714362086e-11 -1.360000000000e+01 -5.185751820620e-04 0.000000000000e+00 5.185751690946e-04 1.296734362086e-11 -1.380000000000e+01 -5.189322893532e-04 0.000000000000e+00 5.189322763857e-04 1.296754362086e-11 -1.400000000000e+01 -5.192613152868e-04 0.000000000000e+00 5.192613023191e-04 1.296774362086e-11 -1.420000000000e+01 -5.195643420195e-04 0.000000000000e+00 5.195643290516e-04 1.296794362086e-11 -1.440000000000e+01 -5.198433041632e-04 0.000000000000e+00 5.198432911951e-04 1.296814362086e-11 -1.460000000000e+01 -5.200999991721e-04 0.000000000000e+00 5.200999862038e-04 1.296834362086e-11 -1.480000000000e+01 -5.203360970935e-04 0.000000000000e+00 5.203360841249e-04 1.296854362086e-11 -1.500000000000e+01 -5.205531497094e-04 0.000000000000e+00 5.205531367406e-04 1.296874362086e-11 -1.520000000000e+01 -5.207525990998e-04 0.000000000000e+00 5.207525861308e-04 1.296894362086e-11 -1.540000000000e+01 -5.209357856567e-04 0.000000000000e+00 5.209357726876e-04 1.296914362086e-11 -1.560000000000e+01 -5.211039555809e-04 0.000000000000e+00 5.211039426115e-04 1.296934362086e-11 -1.580000000000e+01 -5.212582678918e-04 0.000000000000e+00 5.212582549222e-04 1.296954362086e-11 -1.600000000000e+01 -5.213998009824e-04 0.000000000000e+00 5.213997880127e-04 1.296974362086e-11 -1.620000000000e+01 -5.215295587484e-04 0.000000000000e+00 5.215295457785e-04 1.296994362086e-11 -1.640000000000e+01 -5.216484763209e-04 0.000000000000e+00 5.216484633508e-04 1.297014362086e-11 -1.660000000000e+01 -5.217574254309e-04 0.000000000000e+00 5.217574124605e-04 1.297034362086e-11 -1.680000000000e+01 -5.218572194309e-04 0.000000000000e+00 5.218572064604e-04 1.297054362086e-11 -1.700000000000e+01 -5.219486179984e-04 0.000000000000e+00 5.219486050276e-04 1.297074362086e-11 -1.720000000000e+01 -5.220323315388e-04 0.000000000000e+00 5.220323185679e-04 1.297094362086e-11 -1.740000000000e+01 -5.221090253061e-04 0.000000000000e+00 5.221090123350e-04 1.297114362086e-11 -1.760000000000e+01 -5.221793232472e-04 0.000000000000e+00 5.221793102758e-04 1.297134362086e-11 -1.780000000000e+01 -5.222438115706e-04 0.000000000000e+00 5.222437985991e-04 1.297154362086e-11 -1.800000000000e+01 -5.223030420236e-04 0.000000000000e+00 5.223030290519e-04 1.297174362086e-11 -1.820000000000e+01 -5.223575348428e-04 0.000000000000e+00 5.223575218709e-04 1.297194362086e-11 -1.840000000000e+01 -5.224077813141e-04 0.000000000000e+00 5.224077683420e-04 1.297214362086e-11 -1.860000000000e+01 -5.224542458383e-04 0.000000000000e+00 5.224542328659e-04 1.297234362086e-11 -1.880000000000e+01 -5.224973673496e-04 0.000000000000e+00 5.224973543771e-04 1.297254362086e-11 -1.900000000000e+01 -5.225375598905e-04 0.000000000000e+00 5.225375469177e-04 1.297274362086e-11 -1.920000000000e+01 -5.225752121349e-04 0.000000000000e+00 5.225751991620e-04 1.297294362086e-11 -1.940000000000e+01 -5.226106857438e-04 0.000000000000e+00 5.226106727707e-04 1.297314362086e-11 -1.960000000000e+01 -5.226443126699e-04 0.000000000000e+00 5.226442996966e-04 1.297334362086e-11 -1.980000000000e+01 -5.226763919088e-04 0.000000000000e+00 5.226763789352e-04 1.297354362086e-11 -2.000000000000e+01 -5.227071865523e-04 0.000000000000e+00 5.227071735785e-04 1.297374362086e-11 -1.000000000000e+00 -1.184126764927e-04 0.000000000000e+00 1.184126635379e-04 1.295474362084e-11 -1.200000000000e+00 -1.393781874502e-04 0.000000000000e+00 1.393781744952e-04 1.295494362086e-11 -1.400000000000e+00 -1.594891247056e-04 0.000000000000e+00 1.594891117504e-04 1.295514362086e-11 -1.600000000000e+00 -1.787674957132e-04 0.000000000000e+00 1.787674827578e-04 1.295534362086e-11 -1.800000000000e+00 -1.972353249930e-04 0.000000000000e+00 1.972353120375e-04 1.295554362086e-11 -2.000000000000e+00 -2.149146249207e-04 0.000000000000e+00 2.149146119650e-04 1.295574362086e-11 -2.200000000000e+00 -2.318273501532e-04 0.000000000000e+00 2.318273371973e-04 1.295594362086e-11 -2.400000000000e+00 -2.479953620120e-04 0.000000000000e+00 2.479953490558e-04 1.295614362086e-11 -2.600000000000e+00 -2.634403957383e-04 0.000000000000e+00 2.634403827820e-04 1.295634362086e-11 -2.800000000000e+00 -2.781840329221e-04 0.000000000000e+00 2.781840199655e-04 1.295654362086e-11 -3.000000000000e+00 -2.922476790334e-04 0.000000000000e+00 2.922476660767e-04 1.295674362086e-11 -3.200000000000e+00 -3.056525455535e-04 0.000000000000e+00 3.056525325966e-04 1.295694362086e-11 -3.400000000000e+00 -3.184196359737e-04 0.000000000000e+00 3.184196230165e-04 1.295714362086e-11 -3.600000000000e+00 -3.305697314105e-04 0.000000000000e+00 3.305697184531e-04 1.295734362086e-11 -3.800000000000e+00 -3.421233951541e-04 0.000000000000e+00 3.421233821965e-04 1.295754362086e-11 -4.000000000000e+00 -3.531009464678e-04 0.000000000000e+00 3.531009335101e-04 1.295774362086e-11 -4.200000000000e+00 -3.635224663433e-04 0.000000000000e+00 3.635224533854e-04 1.295794362086e-11 -4.400000000000e+00 -3.734077886000e-04 0.000000000000e+00 3.734077756418e-04 1.295814362086e-11 -4.600000000000e+00 -3.827764937226e-04 0.000000000000e+00 3.827764807643e-04 1.295834362086e-11 -4.800000000000e+00 -3.916479022230e-04 0.000000000000e+00 3.916478892645e-04 1.295854362086e-11 -5.000000000000e+00 -4.000410672779e-04 0.000000000000e+00 4.000410543191e-04 1.295874362086e-11 -5.200000000000e+00 -4.079747664747e-04 0.000000000000e+00 4.079747535158e-04 1.295894362086e-11 -5.400000000000e+00 -4.154674925646e-04 0.000000000000e+00 4.154674796055e-04 1.295914362086e-11 -5.600000000000e+00 -4.225374431745e-04 0.000000000000e+00 4.225374302152e-04 1.295934362086e-11 -5.800000000000e+00 -4.292025094772e-04 0.000000000000e+00 4.292024965176e-04 1.295954362086e-11 -6.000000000000e+00 -4.354802638554e-04 0.000000000000e+00 4.354802508956e-04 1.295974362086e-11 -6.200000000000e+00 -4.413879466293e-04 0.000000000000e+00 4.413879336694e-04 1.295994362086e-11 -6.400000000000e+00 -4.469424519508e-04 0.000000000000e+00 4.469424389906e-04 1.296014362086e-11 -6.600000000000e+00 -4.521603172541e-04 0.000000000000e+00 4.521603042938e-04 1.296034362086e-11 -6.800000000000e+00 -4.570576905895e-04 0.000000000000e+00 4.570576776290e-04 1.296054362086e-11 -7.000000000000e+00 -4.616503414356e-04 0.000000000000e+00 4.616503284749e-04 1.296074362086e-11 -7.200000000000e+00 -4.659536270299e-04 0.000000000000e+00 4.659536140690e-04 1.296094362086e-11 -7.400000000000e+00 -4.699824813940e-04 0.000000000000e+00 4.699824684328e-04 1.296114362086e-11 -7.600000000000e+00 -4.737514003123e-04 0.000000000000e+00 4.737513873510e-04 1.296134362086e-11 -7.800000000000e+00 -4.772744271401e-04 0.000000000000e+00 4.772744141786e-04 1.296154362086e-11 -8.000000000000e+00 -4.805651397709e-04 0.000000000000e+00 4.805651268091e-04 1.296174362086e-11 -8.200000000000e+00 -4.836366390859e-04 0.000000000000e+00 4.836366261239e-04 1.296194362086e-11 -8.400000000000e+00 -4.865015391841e-04 0.000000000000e+00 4.865015262220e-04 1.296214362086e-11 -8.600000000000e+00 -4.891719596529e-04 0.000000000000e+00 4.891719466905e-04 1.296234362086e-11 -8.800000000000e+00 -4.916595200882e-04 0.000000000000e+00 4.916595071257e-04 1.296254362086e-11 -9.000000000000e+00 -4.939753370156e-04 0.000000000000e+00 4.939753240529e-04 1.296274362086e-11 -9.200000000000e+00 -4.961300232926e-04 0.000000000000e+00 4.961300103297e-04 1.296294362086e-11 -9.400000000000e+00 -4.981336900103e-04 0.000000000000e+00 4.981336770471e-04 1.296314362086e-11 -9.600000000000e+00 -4.999959508434e-04 0.000000000000e+00 4.999959378800e-04 1.296334362086e-11 -9.800000000000e+00 -5.017259287397e-04 0.000000000000e+00 5.017259157761e-04 1.296354362086e-11 -1.000000000000e+01 -5.033322647894e-04 0.000000000000e+00 5.033322518257e-04 1.296374362086e-11 -1.020000000000e+01 -5.048231290732e-04 0.000000000000e+00 5.048231161092e-04 1.296394362086e-11 -1.040000000000e+01 -5.062062332587e-04 0.000000000000e+00 5.062062202946e-04 1.296414362086e-11 -1.060000000000e+01 -5.074888446970e-04 0.000000000000e+00 5.074888317327e-04 1.296434362086e-11 -1.080000000000e+01 -5.086778017607e-04 0.000000000000e+00 5.086777887961e-04 1.296454362086e-11 -1.100000000000e+01 -5.097795301684e-04 0.000000000000e+00 5.097795172036e-04 1.296474362086e-11 -1.120000000000e+01 -5.108000600464e-04 0.000000000000e+00 5.108000470814e-04 1.296494362086e-11 -1.140000000000e+01 -5.117450434946e-04 0.000000000000e+00 5.117450305295e-04 1.296514362086e-11 -1.160000000000e+01 -5.126197724419e-04 0.000000000000e+00 5.126197594766e-04 1.296534362086e-11 -1.180000000000e+01 -5.134291965966e-04 0.000000000000e+00 5.134291836310e-04 1.296554362086e-11 -1.200000000000e+01 -5.141779413232e-04 0.000000000000e+00 5.141779283574e-04 1.296574362086e-11 -1.220000000000e+01 -5.148703252987e-04 0.000000000000e+00 5.148703123328e-04 1.296594362086e-11 -1.240000000000e+01 -5.155103778243e-04 0.000000000000e+00 5.155103648582e-04 1.296614362086e-11 -1.260000000000e+01 -5.161018556913e-04 0.000000000000e+00 5.161018427250e-04 1.296634362086e-11 -1.280000000000e+01 -5.166482595214e-04 0.000000000000e+00 5.166482465549e-04 1.296654362086e-11 -1.300000000000e+01 -5.171528495174e-04 0.000000000000e+00 5.171528365506e-04 1.296674362086e-11 -1.320000000000e+01 -5.176186605799e-04 0.000000000000e+00 5.176186476129e-04 1.296694362086e-11 -1.340000000000e+01 -5.180485167583e-04 0.000000000000e+00 5.180485037911e-04 1.296714362086e-11 -1.360000000000e+01 -5.184450450174e-04 0.000000000000e+00 5.184450320501e-04 1.296734362086e-11 -1.380000000000e+01 -5.188106883126e-04 0.000000000000e+00 5.188106753451e-04 1.296754362086e-11 -1.400000000000e+01 -5.191477179736e-04 0.000000000000e+00 5.191477050059e-04 1.296774362086e-11 -1.420000000000e+01 -5.194582454062e-04 0.000000000000e+00 5.194582324382e-04 1.296794362086e-11 -1.440000000000e+01 -5.197442331262e-04 0.000000000000e+00 5.197442201581e-04 1.296814362086e-11 -1.460000000000e+01 -5.200075051448e-04 0.000000000000e+00 5.200074921765e-04 1.296834362086e-11 -1.480000000000e+01 -5.202497567280e-04 0.000000000000e+00 5.202497437594e-04 1.296854362086e-11 -1.500000000000e+01 -5.204725635560e-04 0.000000000000e+00 5.204725505872e-04 1.296874362086e-11 -1.520000000000e+01 -5.206773903101e-04 0.000000000000e+00 5.206773773411e-04 1.296894362086e-11 -1.540000000000e+01 -5.208655987158e-04 0.000000000000e+00 5.208655857467e-04 1.296914362086e-11 -1.560000000000e+01 -5.210384550719e-04 0.000000000000e+00 5.210384421026e-04 1.296934362086e-11 -1.580000000000e+01 -5.211971372950e-04 0.000000000000e+00 5.211971243255e-04 1.296954362086e-11 -1.600000000000e+01 -5.213427415102e-04 0.000000000000e+00 5.213427285405e-04 1.296974362086e-11 -1.620000000000e+01 -5.214762882162e-04 0.000000000000e+00 5.214762752462e-04 1.296994362086e-11 -1.640000000000e+01 -5.215987280542e-04 0.000000000000e+00 5.215987150841e-04 1.297014362086e-11 -1.660000000000e+01 -5.217109472078e-04 0.000000000000e+00 5.217109342375e-04 1.297034362086e-11 -1.680000000000e+01 -5.218137724592e-04 0.000000000000e+00 5.218137594886e-04 1.297054362086e-11 -1.700000000000e+01 -5.219079759259e-04 0.000000000000e+00 5.219079629551e-04 1.297074362086e-11 -1.720000000000e+01 -5.219942794989e-04 0.000000000000e+00 5.219942665279e-04 1.297094362086e-11 -1.740000000000e+01 -5.220733589982e-04 0.000000000000e+00 5.220733460271e-04 1.297114362086e-11 -1.760000000000e+01 -5.221458480571e-04 0.000000000000e+00 5.221458350857e-04 1.297134362086e-11 -1.780000000000e+01 -5.222123417375e-04 0.000000000000e+00 5.222123287659e-04 1.297154362086e-11 -1.800000000000e+01 -5.222733998677e-04 0.000000000000e+00 5.222733868959e-04 1.297174362086e-11 -1.820000000000e+01 -5.223295500756e-04 0.000000000000e+00 5.223295371036e-04 1.297194362086e-11 -1.840000000000e+01 -5.223812904662e-04 0.000000000000e+00 5.223812774941e-04 1.297214362086e-11 -1.860000000000e+01 -5.224290918580e-04 0.000000000000e+00 5.224290788856e-04 1.297234362086e-11 -1.880000000000e+01 -5.224733994460e-04 0.000000000000e+00 5.224733864735e-04 1.297254362086e-11 -1.900000000000e+01 -5.225146337146e-04 0.000000000000e+00 5.225146207419e-04 1.297274362086e-11 -1.920000000000e+01 -5.225531903899e-04 0.000000000000e+00 5.225531774170e-04 1.297294362086e-11 -1.940000000000e+01 -5.225894392690e-04 0.000000000000e+00 5.225894262958e-04 1.297314362086e-11 -1.960000000000e+01 -5.226237219279e-04 0.000000000000e+00 5.226237089546e-04 1.297334362086e-11 -1.980000000000e+01 -5.226563486415e-04 0.000000000000e+00 5.226563356680e-04 1.297354362086e-11 -2.000000000000e+01 -5.226875952297e-04 0.000000000000e+00 5.226875822560e-04 1.297374362086e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Id1_vb2.standard0000644000265600020320000010261512264261473023734 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.099998998139e-14 0.000000000000e+00 -1.000000000000e-14 2.100000000000e-14 -1.500000000000e+00 -1.149991560312e-14 0.000000000000e+00 -1.000000000000e-14 2.150000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.249976684659e-14 0.000000000000e+00 -1.000000000000e-14 2.250000000000e-14 -3.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -1.000000000000e-14 2.300000000000e-14 -3.500000000000e+00 -1.349961809005e-14 0.000000000000e+00 -1.000000000000e-14 2.350000000000e-14 -4.000000000000e+00 -1.399965213200e-14 0.000000000000e+00 -1.000000000000e-14 2.400000000000e-14 -4.500000000000e+00 -1.449968617395e-14 0.000000000000e+00 -1.000000000000e-14 2.450000000000e-14 -5.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -5.500000000000e+00 -1.549975425785e-14 0.000000000000e+00 -1.000000000000e-14 2.550000000000e-14 -6.000000000000e+00 -1.599978829980e-14 0.000000000000e+00 -1.000000000000e-14 2.600000000000e-14 -6.500000000000e+00 -1.649938866088e-14 0.000000000000e+00 -1.000000000000e-14 2.650000000000e-14 -7.000000000000e+00 -1.699942270283e-14 0.000000000000e+00 -1.000000000000e-14 2.700000000000e-14 -7.500000000000e+00 -1.750032410652e-14 0.000000000000e+00 -1.000000000000e-14 2.750000000000e-14 -8.000000000000e+00 -1.799992446760e-14 0.000000000000e+00 -1.000000000000e-14 2.800000000000e-14 -8.500000000000e+00 -1.849995850955e-14 0.000000000000e+00 -1.000000000000e-14 2.850000000000e-14 -9.000000000000e+00 -1.899955887064e-14 0.000000000000e+00 -1.000000000000e-14 2.900000000000e-14 -9.500000000000e+00 -1.950002659346e-14 0.000000000000e+00 -1.000000000000e-14 2.950000000000e-14 -1.000000000000e+01 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.050000000000e+01 -2.050009467736e-14 0.000000000000e+00 -1.000000000000e-14 3.050000000000e-14 -1.100000000000e+01 -2.099969503844e-14 0.000000000000e+00 -1.000000000000e-14 3.100000000000e-14 -1.150000000000e+01 -2.149929539952e-14 0.000000000000e+00 -1.000000000000e-14 3.150000000000e-14 -1.200000000000e+01 -2.200063048408e-14 0.000000000000e+00 -1.000000000000e-14 3.200000000000e-14 -1.250000000000e+01 -2.250023084516e-14 0.000000000000e+00 -1.000000000000e-14 3.250000000000e-14 -1.300000000000e+01 -2.299983120624e-14 0.000000000000e+00 -1.000000000000e-14 3.300000000000e-14 -1.350000000000e+01 -2.349943156732e-14 0.000000000000e+00 -1.000000000000e-14 3.350000000000e-14 -1.400000000000e+01 -2.399989929014e-14 0.000000000000e+00 -1.000000000000e-14 3.400000000000e-14 -1.450000000000e+01 -2.450036701296e-14 0.000000000000e+00 -1.000000000000e-14 3.450000000000e-14 -1.500000000000e+01 -2.499996737404e-14 0.000000000000e+00 -1.000000000000e-14 3.500000000000e-14 -1.550000000000e+01 -2.549956773512e-14 0.000000000000e+00 -1.000000000000e-14 3.550000000000e-14 -1.600000000000e+01 -2.600003545794e-14 0.000000000000e+00 -1.000000000000e-14 3.600000000000e-14 -1.650000000000e+01 -2.649963581902e-14 0.000000000000e+00 -1.000000000000e-14 3.650000000000e-14 -1.700000000000e+01 -2.700010354184e-14 0.000000000000e+00 -1.000000000000e-14 3.700000000000e-14 -1.750000000000e+01 -2.750057126466e-14 0.000000000000e+00 -1.000000000000e-14 3.750000000000e-14 -1.800000000000e+01 -2.800017162574e-14 0.000000000000e+00 -1.000000000000e-14 3.800000000000e-14 -1.850000000000e+01 -2.849977198682e-14 0.000000000000e+00 -1.000000000000e-14 3.850000000000e-14 -1.900000000000e+01 -2.900110707138e-14 0.000000000000e+00 -1.000000000000e-14 3.900000000000e-14 -1.950000000000e+01 -2.949984007072e-14 0.000000000000e+00 -1.000000000000e-14 3.950000000000e-14 -2.000000000000e+01 -3.000030779354e-14 0.000000000000e+00 -1.000000000000e-14 4.000000000000e-14 -1.000000000000e+00 -1.067766281263e-08 0.000000000000e+00 1.067764181253e-08 2.100000000000e-14 -1.500000000000e+00 -1.146243131704e-08 0.000000000000e+00 1.146240981691e-08 2.150000000000e-14 -2.000000000000e+00 -1.229677263769e-08 0.000000000000e+00 1.229675063770e-08 2.200000000000e-14 -2.500000000000e+00 -1.318525546081e-08 0.000000000000e+00 1.318523296084e-08 2.250000000000e-14 -3.000000000000e+00 -1.413193363589e-08 0.000000000000e+00 1.413191063600e-08 2.300000000000e-14 -3.500000000000e+00 -1.514075324317e-08 0.000000000000e+00 1.514072974321e-08 2.350000000000e-14 -4.000000000000e+00 -1.621569474487e-08 0.000000000000e+00 1.621567074511e-08 2.400000000000e-14 -4.500000000000e+00 -1.736083527154e-08 0.000000000000e+00 1.736081077254e-08 2.450000000000e-14 -5.000000000000e+00 -1.858037997461e-08 0.000000000000e+00 1.858035497473e-08 2.500000000000e-14 -5.500000000000e+00 -1.987867923395e-08 0.000000000000e+00 1.987865373408e-08 2.550000000000e-14 -6.000000000000e+00 -2.126023852540e-08 0.000000000000e+00 2.126021252571e-08 2.600000000000e-14 -6.500000000000e+00 -2.272972398319e-08 0.000000000000e+00 2.272969748486e-08 2.650000000000e-14 -7.000000000000e+00 -2.429196518635e-08 0.000000000000e+00 2.429193818690e-08 2.700000000000e-14 -7.500000000000e+00 -2.595195592930e-08 0.000000000000e+00 2.595192842978e-08 2.750000000000e-14 -8.000000000000e+00 -2.771485345778e-08 0.000000000000e+00 2.771482545812e-08 2.800000000000e-14 -8.500000000000e+00 -2.958597638799e-08 0.000000000000e+00 2.958594788783e-08 2.850000000000e-14 -9.000000000000e+00 -3.157080149391e-08 0.000000000000e+00 3.157077249397e-08 2.900000000000e-14 -9.500000000000e+00 -3.367495947284e-08 0.000000000000e+00 3.367492997473e-08 2.950000000000e-14 -1.000000000000e+01 -3.590422977852e-08 0.000000000000e+00 3.590419977696e-08 3.000000000000e-14 -1.050000000000e+01 -3.826453455827e-08 0.000000000000e+00 3.826450405739e-08 3.050000000000e-14 -1.100000000000e+01 -4.076193184897e-08 0.000000000000e+00 4.076190084842e-08 3.100000000000e-14 -1.150000000000e+01 -4.340260799807e-08 0.000000000000e+00 4.340257649815e-08 3.150000000000e-14 -1.200000000000e+01 -4.619286945659e-08 0.000000000000e+00 4.619283745631e-08 3.200000000000e-14 -1.250000000000e+01 -4.913913398148e-08 0.000000000000e+00 4.913910148173e-08 3.250000000000e-14 -1.300000000000e+01 -5.224792135137e-08 0.000000000000e+00 5.224788835033e-08 3.300000000000e-14 -1.350000000000e+01 -5.552584364694e-08 0.000000000000e+00 5.552581014621e-08 3.350000000000e-14 -1.400000000000e+01 -5.897959522074e-08 0.000000000000e+00 5.897956122070e-08 3.400000000000e-14 -1.450000000000e+01 -6.261594240504e-08 0.000000000000e+00 6.261590790554e-08 3.450000000000e-14 -1.500000000000e+01 -6.644171306625e-08 0.000000000000e+00 6.644167806641e-08 3.500000000000e-14 -1.550000000000e+01 -7.046378608204e-08 0.000000000000e+00 7.046375058227e-08 3.550000000000e-14 -1.600000000000e+01 -7.468908083327e-08 0.000000000000e+00 7.468904483281e-08 3.600000000000e-14 -1.650000000000e+01 -7.912454677399e-08 0.000000000000e+00 7.912451027328e-08 3.650000000000e-14 -1.700000000000e+01 -8.377715317049e-08 0.000000000000e+00 8.377711617094e-08 3.700000000000e-14 -1.750000000000e+01 -8.865387907120e-08 0.000000000000e+00 8.865384157175e-08 3.750000000000e-14 -1.800000000000e+01 -9.376170356009e-08 0.000000000000e+00 9.376166555965e-08 3.800000000000e-14 -1.850000000000e+01 -9.910759636404e-08 0.000000000000e+00 9.910755786344e-08 3.850000000000e-14 -1.900000000000e+01 -1.046985088592e-07 0.000000000000e+00 1.046984698595e-07 3.900000000000e-14 -1.950000000000e+01 -1.105413655108e-07 0.000000000000e+00 1.105413260105e-07 3.950000000000e-14 -2.000000000000e+01 -1.166430557715e-07 0.000000000000e+00 1.166430157730e-07 4.000000000000e-14 -1.000000000000e+00 -3.538053832960e-04 0.000000000000e+00 3.538053832750e-04 2.100000000000e-14 -1.500000000000e+00 -4.915350205871e-04 0.000000000000e+00 4.915350205656e-04 2.150000000000e-14 -2.000000000000e+00 -6.054582090562e-04 0.000000000000e+00 6.054582090342e-04 2.200000000000e-14 -2.500000000000e+00 -6.985678535308e-04 0.000000000000e+00 6.985678535083e-04 2.250000000000e-14 -3.000000000000e+00 -7.738099746083e-04 0.000000000000e+00 7.738099745853e-04 2.300000000000e-14 -3.500000000000e+00 -8.339138341292e-04 0.000000000000e+00 8.339138341057e-04 2.350000000000e-14 -4.000000000000e+00 -8.813588799099e-04 0.000000000000e+00 8.813588798859e-04 2.400000000000e-14 -4.500000000000e+00 -9.183679017469e-04 0.000000000000e+00 9.183679017224e-04 2.450000000000e-14 -5.000000000000e+00 -9.469022158726e-04 0.000000000000e+00 9.469022158476e-04 2.500000000000e-14 -5.500000000000e+00 -9.686595314759e-04 0.000000000000e+00 9.686595314504e-04 2.550000000000e-14 -6.000000000000e+00 -9.850787770956e-04 0.000000000000e+00 9.850787770696e-04 2.600000000000e-14 -6.500000000000e+00 -9.973537242028e-04 0.000000000000e+00 9.973537241763e-04 2.650000000000e-14 -7.000000000000e+00 -1.006454645765e-03 0.000000000000e+00 1.006454645738e-03 2.700000000000e-14 -7.500000000000e+00 -1.013155793156e-03 0.000000000000e+00 1.013155793129e-03 2.750000000000e-14 -8.000000000000e+00 -1.018065924792e-03 0.000000000000e+00 1.018065924764e-03 2.800000000000e-14 -8.500000000000e+00 -1.021659414025e-03 0.000000000000e+00 1.021659413997e-03 2.850000000000e-14 -9.000000000000e+00 -1.024306858473e-03 0.000000000000e+00 1.024306858444e-03 2.900000000000e-14 -9.500000000000e+00 -1.026307347003e-03 0.000000000000e+00 1.026307346973e-03 2.950000000000e-14 -1.000000000000e+01 -1.027927548034e-03 0.000000000000e+00 1.027927548004e-03 3.000000000000e-14 -1.050000000000e+01 -1.029396873795e-03 0.000000000000e+00 1.029396873765e-03 3.050000000000e-14 -1.100000000000e+01 -1.030812080029e-03 0.000000000000e+00 1.030812079998e-03 3.100000000000e-14 -1.150000000000e+01 -1.032189625226e-03 0.000000000000e+00 1.032189625195e-03 3.150000000000e-14 -1.200000000000e+01 -1.033534296241e-03 0.000000000000e+00 1.033534296209e-03 3.200000000000e-14 -1.250000000000e+01 -1.034849528393e-03 0.000000000000e+00 1.034849528360e-03 3.250000000000e-14 -1.300000000000e+01 -1.036138272619e-03 0.000000000000e+00 1.036138272586e-03 3.300000000000e-14 -1.350000000000e+01 -1.037403112463e-03 0.000000000000e+00 1.037403112430e-03 3.350000000000e-14 -1.400000000000e+01 -1.038646313452e-03 0.000000000000e+00 1.038646313418e-03 3.400000000000e-14 -1.450000000000e+01 -1.039869863217e-03 0.000000000000e+00 1.039869863182e-03 3.450000000000e-14 -1.500000000000e+01 -1.041075507498e-03 0.000000000000e+00 1.041075507463e-03 3.500000000000e-14 -1.550000000000e+01 -1.042264782261e-03 0.000000000000e+00 1.042264782226e-03 3.550000000000e-14 -1.600000000000e+01 -1.043439041926e-03 0.000000000000e+00 1.043439041890e-03 3.600000000000e-14 -1.650000000000e+01 -1.044599483927e-03 0.000000000000e+00 1.044599483891e-03 3.650000000000e-14 -1.700000000000e+01 -1.045747169904e-03 0.000000000000e+00 1.045747169867e-03 3.700000000000e-14 -1.750000000000e+01 -1.046883043914e-03 0.000000000000e+00 1.046883043877e-03 3.750000000000e-14 -1.800000000000e+01 -1.048007948032e-03 0.000000000000e+00 1.048007947994e-03 3.800000000000e-14 -1.850000000000e+01 -1.049122635701e-03 0.000000000000e+00 1.049122635663e-03 3.850000000000e-14 -1.900000000000e+01 -1.050227783158e-03 0.000000000000e+00 1.050227783119e-03 3.900000000000e-14 -1.950000000000e+01 -1.051323999206e-03 0.000000000000e+00 1.051323999167e-03 3.950000000000e-14 -2.000000000000e+01 -1.052411833601e-03 0.000000000000e+00 1.052411833561e-03 4.000000000000e-14 -1.000000000000e+00 -1.099998998139e-14 0.000000000000e+00 -1.000000000000e-14 2.100000000000e-14 -1.500000000000e+00 -1.149991560312e-14 0.000000000000e+00 -1.000000000000e-14 2.150000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.249976684659e-14 0.000000000000e+00 -1.000000000000e-14 2.250000000000e-14 -3.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -1.000000000000e-14 2.300000000000e-14 -3.500000000000e+00 -1.349961809005e-14 0.000000000000e+00 -1.000000000000e-14 2.350000000000e-14 -4.000000000000e+00 -1.399965213200e-14 0.000000000000e+00 -1.000000000000e-14 2.400000000000e-14 -4.500000000000e+00 -1.449968617395e-14 0.000000000000e+00 -1.000000000000e-14 2.450000000000e-14 -5.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -5.500000000000e+00 -1.549975425785e-14 0.000000000000e+00 -1.000000000000e-14 2.550000000000e-14 -6.000000000000e+00 -1.599978829980e-14 0.000000000000e+00 -1.000000000000e-14 2.600000000000e-14 -6.500000000000e+00 -1.649938866088e-14 0.000000000000e+00 -1.000000000000e-14 2.650000000000e-14 -7.000000000000e+00 -1.699942270283e-14 0.000000000000e+00 -1.000000000000e-14 2.700000000000e-14 -7.500000000000e+00 -1.750032410652e-14 0.000000000000e+00 -1.000000000000e-14 2.750000000000e-14 -8.000000000000e+00 -1.799992446760e-14 0.000000000000e+00 -1.000000000000e-14 2.800000000000e-14 -8.500000000000e+00 -1.849995850955e-14 0.000000000000e+00 -1.000000000000e-14 2.850000000000e-14 -9.000000000000e+00 -1.899955887064e-14 0.000000000000e+00 -1.000000000000e-14 2.900000000000e-14 -9.500000000000e+00 -1.950002659346e-14 0.000000000000e+00 -1.000000000000e-14 2.950000000000e-14 -1.000000000000e+01 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.050000000000e+01 -2.050009467736e-14 0.000000000000e+00 -1.000000000000e-14 3.050000000000e-14 -1.100000000000e+01 -2.099969503844e-14 0.000000000000e+00 -1.000000000000e-14 3.100000000000e-14 -1.150000000000e+01 -2.149929539952e-14 0.000000000000e+00 -1.000000000000e-14 3.150000000000e-14 -1.200000000000e+01 -2.200063048408e-14 0.000000000000e+00 -1.000000000000e-14 3.200000000000e-14 -1.250000000000e+01 -2.250023084516e-14 0.000000000000e+00 -1.000000000000e-14 3.250000000000e-14 -1.300000000000e+01 -2.299983120624e-14 0.000000000000e+00 -1.000000000000e-14 3.300000000000e-14 -1.350000000000e+01 -2.349943156732e-14 0.000000000000e+00 -1.000000000000e-14 3.350000000000e-14 -1.400000000000e+01 -2.399989929014e-14 0.000000000000e+00 -1.000000000000e-14 3.400000000000e-14 -1.450000000000e+01 -2.450036701296e-14 0.000000000000e+00 -1.000000000000e-14 3.450000000000e-14 -1.500000000000e+01 -2.499996737404e-14 0.000000000000e+00 -1.000000000000e-14 3.500000000000e-14 -1.550000000000e+01 -2.549956773512e-14 0.000000000000e+00 -1.000000000000e-14 3.550000000000e-14 -1.600000000000e+01 -2.600003545794e-14 0.000000000000e+00 -1.000000000000e-14 3.600000000000e-14 -1.650000000000e+01 -2.649963581902e-14 0.000000000000e+00 -1.000000000000e-14 3.650000000000e-14 -1.700000000000e+01 -2.700010354184e-14 0.000000000000e+00 -1.000000000000e-14 3.700000000000e-14 -1.750000000000e+01 -2.750057126466e-14 0.000000000000e+00 -1.000000000000e-14 3.750000000000e-14 -1.800000000000e+01 -2.800017162574e-14 0.000000000000e+00 -1.000000000000e-14 3.800000000000e-14 -1.850000000000e+01 -2.849977198682e-14 0.000000000000e+00 -1.000000000000e-14 3.850000000000e-14 -1.900000000000e+01 -2.900110707138e-14 0.000000000000e+00 -1.000000000000e-14 3.900000000000e-14 -1.950000000000e+01 -2.949984007072e-14 0.000000000000e+00 -1.000000000000e-14 3.950000000000e-14 -2.000000000000e+01 -3.000030779354e-14 0.000000000000e+00 -1.000000000000e-14 4.000000000000e-14 -1.000000000000e+00 -2.490254833939e-11 0.000000000000e+00 2.488154858331e-11 2.100000000000e-14 -1.500000000000e+00 -2.747882715641e-11 0.000000000000e+00 2.745732685526e-11 2.150000000000e-14 -2.000000000000e+00 -3.030755681144e-11 0.000000000000e+00 3.028555689026e-11 2.200000000000e-14 -2.500000000000e+00 -3.341762305244e-11 0.000000000000e+00 3.339512346490e-11 2.250000000000e-14 -3.000000000000e+00 -3.683912983693e-11 0.000000000000e+00 3.681613080601e-11 2.300000000000e-14 -3.500000000000e+00 -4.060452451701e-11 0.000000000000e+00 4.058102484157e-11 2.350000000000e-14 -4.000000000000e+00 -4.474917788752e-11 0.000000000000e+00 4.472517860831e-11 2.400000000000e-14 -4.500000000000e+00 -4.931183933410e-11 0.000000000000e+00 4.928733936202e-11 2.450000000000e-14 -5.000000000000e+00 -5.433504384270e-11 0.000000000000e+00 5.431004440663e-11 2.500000000000e-14 -5.500000000000e+00 -5.986554394571e-11 0.000000000000e+00 5.984004428196e-11 2.550000000000e-14 -6.000000000000e+00 -6.595475077545e-11 0.000000000000e+00 6.592875119894e-11 2.600000000000e-14 -6.500000000000e+00 -7.265922195507e-11 0.000000000000e+00 7.263272307469e-11 2.650000000000e-14 -7.000000000000e+00 -8.004119068927e-11 0.000000000000e+00 8.001419059837e-11 2.700000000000e-14 -7.500000000000e+00 -8.816913258519e-11 0.000000000000e+00 8.814163366429e-11 2.750000000000e-14 -8.000000000000e+00 -9.711841357160e-11 0.000000000000e+00 9.709041325683e-11 2.800000000000e-14 -8.500000000000e+00 -1.069719651400e-10 0.000000000000e+00 1.069434650385e-10 2.850000000000e-14 -9.000000000000e+00 -1.178210601999e-10 0.000000000000e+00 1.177920609211e-10 2.900000000000e-14 -9.500000000000e+00 -1.297661466129e-10 0.000000000000e+00 1.297366457879e-10 2.950000000000e-14 -1.000000000000e+01 -1.429177566223e-10 0.000000000000e+00 1.428877566875e-10 3.000000000000e-14 -1.050000000000e+01 -1.573975333749e-10 0.000000000000e+00 1.573670327887e-10 3.050000000000e-14 -1.100000000000e+01 -1.733393246647e-10 0.000000000000e+00 1.733083248853e-10 3.100000000000e-14 -1.150000000000e+01 -1.908904145864e-10 0.000000000000e+00 1.908589141066e-10 3.150000000000e-14 -1.200000000000e+01 -2.102128505987e-10 0.000000000000e+00 2.101808504269e-10 3.200000000000e-14 -1.250000000000e+01 -2.314849223764e-10 0.000000000000e+00 2.314524223775e-10 3.250000000000e-14 -1.300000000000e+01 -2.549027707660e-10 0.000000000000e+00 2.548697704131e-10 3.300000000000e-14 -1.350000000000e+01 -2.806821563367e-10 0.000000000000e+00 2.806486576243e-10 3.350000000000e-14 -1.400000000000e+01 -3.090604109440e-10 0.000000000000e+00 3.090264124124e-10 3.400000000000e-14 -1.450000000000e+01 -3.402985584294e-10 0.000000000000e+00 3.402640591041e-10 3.450000000000e-14 -1.500000000000e+01 -3.746836530275e-10 0.000000000000e+00 3.746486539490e-10 3.500000000000e-14 -1.550000000000e+01 -4.125313458891e-10 0.000000000000e+00 4.124958450729e-10 3.550000000000e-14 -1.600000000000e+01 -4.541886762521e-10 0.000000000000e+00 4.541526766586e-10 3.600000000000e-14 -1.650000000000e+01 -5.000371601158e-10 0.000000000000e+00 5.000006590796e-10 3.650000000000e-14 -1.700000000000e+01 -5.504961278491e-10 0.000000000000e+00 5.504591283288e-10 3.700000000000e-14 -1.750000000000e+01 -6.060264208865e-10 0.000000000000e+00 6.059889197466e-10 3.750000000000e-14 -1.800000000000e+01 -6.671343833267e-10 0.000000000000e+00 6.670963827318e-10 3.800000000000e-14 -1.850000000000e+01 -7.343762655279e-10 0.000000000000e+00 7.343377648376e-10 3.850000000000e-14 -1.900000000000e+01 -8.083629954650e-10 0.000000000000e+00 8.083239952763e-10 3.900000000000e-14 -1.950000000000e+01 -8.897653993797e-10 0.000000000000e+00 8.897258994751e-10 3.950000000000e-14 -2.000000000000e+01 -9.793198769287e-10 0.000000000000e+00 9.792798779492e-10 4.000000000000e-14 -1.000000000000e+00 -4.527648125170e-04 0.000000000000e+00 4.527648124960e-04 2.100000000000e-14 -1.500000000000e+00 -6.291405703600e-04 0.000000000000e+00 6.291405703385e-04 2.150000000000e-14 -2.000000000000e+00 -7.760846374112e-04 0.000000000000e+00 7.760846373892e-04 2.200000000000e-14 -2.500000000000e+00 -8.976047203318e-04 0.000000000000e+00 8.976047203093e-04 2.250000000000e-14 -3.000000000000e+00 -9.973524722454e-04 0.000000000000e+00 9.973524722224e-04 2.300000000000e-14 -3.500000000000e+00 -1.078544832964e-03 0.000000000000e+00 1.078544832940e-03 2.350000000000e-14 -4.000000000000e+00 -1.144014101001e-03 0.000000000000e+00 1.144014100977e-03 2.400000000000e-14 -4.500000000000e+00 -1.196265979006e-03 0.000000000000e+00 1.196265978982e-03 2.450000000000e-14 -5.000000000000e+00 -1.237519606054e-03 0.000000000000e+00 1.237519606029e-03 2.500000000000e-14 -5.500000000000e+00 -1.269729946363e-03 0.000000000000e+00 1.269729946338e-03 2.550000000000e-14 -6.000000000000e+00 -1.294600112965e-03 0.000000000000e+00 1.294600112939e-03 2.600000000000e-14 -6.500000000000e+00 -1.313591379911e-03 0.000000000000e+00 1.313591379885e-03 2.650000000000e-14 -7.000000000000e+00 -1.327936027302e-03 0.000000000000e+00 1.327936027275e-03 2.700000000000e-14 -7.500000000000e+00 -1.338655116933e-03 0.000000000000e+00 1.338655116905e-03 2.750000000000e-14 -8.000000000000e+00 -1.346580987862e-03 0.000000000000e+00 1.346580987834e-03 2.800000000000e-14 -8.500000000000e+00 -1.352383054996e-03 0.000000000000e+00 1.352383054968e-03 2.850000000000e-14 -9.000000000000e+00 -1.356595521683e-03 0.000000000000e+00 1.356595521654e-03 2.900000000000e-14 -9.500000000000e+00 -1.359647642491e-03 0.000000000000e+00 1.359647642462e-03 2.950000000000e-14 -1.000000000000e+01 -1.361906456595e-03 0.000000000000e+00 1.361906456565e-03 3.000000000000e-14 -1.050000000000e+01 -1.363760245045e-03 0.000000000000e+00 1.363760245015e-03 3.050000000000e-14 -1.100000000000e+01 -1.365510128612e-03 0.000000000000e+00 1.365510128581e-03 3.100000000000e-14 -1.150000000000e+01 -1.367207452364e-03 0.000000000000e+00 1.367207452332e-03 3.150000000000e-14 -1.200000000000e+01 -1.368858436129e-03 0.000000000000e+00 1.368858436097e-03 3.200000000000e-14 -1.250000000000e+01 -1.370467808988e-03 0.000000000000e+00 1.370467808956e-03 3.250000000000e-14 -1.300000000000e+01 -1.372039757816e-03 0.000000000000e+00 1.372039757783e-03 3.300000000000e-14 -1.350000000000e+01 -1.373577988394e-03 0.000000000000e+00 1.373577988360e-03 3.350000000000e-14 -1.400000000000e+01 -1.375085770285e-03 0.000000000000e+00 1.375085770251e-03 3.400000000000e-14 -1.450000000000e+01 -1.376565983157e-03 0.000000000000e+00 1.376565983122e-03 3.450000000000e-14 -1.500000000000e+01 -1.378021162064e-03 0.000000000000e+00 1.378021162029e-03 3.500000000000e-14 -1.550000000000e+01 -1.379453539788e-03 0.000000000000e+00 1.379453539753e-03 3.550000000000e-14 -1.600000000000e+01 -1.380865085289e-03 0.000000000000e+00 1.380865085253e-03 3.600000000000e-14 -1.650000000000e+01 -1.382257537938e-03 0.000000000000e+00 1.382257537902e-03 3.650000000000e-14 -1.700000000000e+01 -1.383632437608e-03 0.000000000000e+00 1.383632437571e-03 3.700000000000e-14 -1.750000000000e+01 -1.384991150878e-03 0.000000000000e+00 1.384991150841e-03 3.750000000000e-14 -1.800000000000e+01 -1.386334893724e-03 0.000000000000e+00 1.386334893686e-03 3.800000000000e-14 -1.850000000000e+01 -1.387664751094e-03 0.000000000000e+00 1.387664751055e-03 3.850000000000e-14 -1.900000000000e+01 -1.388981693761e-03 0.000000000000e+00 1.388981693722e-03 3.900000000000e-14 -1.950000000000e+01 -1.390286592816e-03 0.000000000000e+00 1.390286592776e-03 3.950000000000e-14 -2.000000000000e+01 -1.391580232132e-03 0.000000000000e+00 1.391580232092e-03 4.000000000000e-14 -1.000000000000e+00 -1.099998998139e-14 0.000000000000e+00 -1.000000000000e-14 2.100000000000e-14 -1.500000000000e+00 -1.149991560312e-14 0.000000000000e+00 -1.000000000000e-14 2.150000000000e-14 -2.000000000000e+00 -1.199994964507e-14 0.000000000000e+00 -1.000000000000e-14 2.200000000000e-14 -2.500000000000e+00 -1.249976684659e-14 0.000000000000e+00 -1.000000000000e-14 2.250000000000e-14 -3.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -1.000000000000e-14 2.300000000000e-14 -3.500000000000e+00 -1.349961809005e-14 0.000000000000e+00 -1.000000000000e-14 2.350000000000e-14 -4.000000000000e+00 -1.399965213200e-14 0.000000000000e+00 -1.000000000000e-14 2.400000000000e-14 -4.500000000000e+00 -1.449968617395e-14 0.000000000000e+00 -1.000000000000e-14 2.450000000000e-14 -5.000000000000e+00 -1.499972021590e-14 0.000000000000e+00 -1.000000000000e-14 2.500000000000e-14 -5.500000000000e+00 -1.549975425785e-14 0.000000000000e+00 -1.000000000000e-14 2.550000000000e-14 -6.000000000000e+00 -1.599978829980e-14 0.000000000000e+00 -1.000000000000e-14 2.600000000000e-14 -6.500000000000e+00 -1.649938866088e-14 0.000000000000e+00 -1.000000000000e-14 2.650000000000e-14 -7.000000000000e+00 -1.699942270283e-14 0.000000000000e+00 -1.000000000000e-14 2.700000000000e-14 -7.500000000000e+00 -1.750032410652e-14 0.000000000000e+00 -1.000000000000e-14 2.750000000000e-14 -8.000000000000e+00 -1.799992446760e-14 0.000000000000e+00 -1.000000000000e-14 2.800000000000e-14 -8.500000000000e+00 -1.849995850955e-14 0.000000000000e+00 -1.000000000000e-14 2.850000000000e-14 -9.000000000000e+00 -1.899955887064e-14 0.000000000000e+00 -1.000000000000e-14 2.900000000000e-14 -9.500000000000e+00 -1.950002659346e-14 0.000000000000e+00 -1.000000000000e-14 2.950000000000e-14 -1.000000000000e+01 -1.999962695454e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.050000000000e+01 -2.050009467736e-14 0.000000000000e+00 -1.000000000000e-14 3.050000000000e-14 -1.100000000000e+01 -2.099969503844e-14 0.000000000000e+00 -1.000000000000e-14 3.100000000000e-14 -1.150000000000e+01 -2.149929539952e-14 0.000000000000e+00 -1.000000000000e-14 3.150000000000e-14 -1.200000000000e+01 -2.200063048408e-14 0.000000000000e+00 -1.000000000000e-14 3.200000000000e-14 -1.250000000000e+01 -2.250023084516e-14 0.000000000000e+00 -1.000000000000e-14 3.250000000000e-14 -1.300000000000e+01 -2.299983120624e-14 0.000000000000e+00 -1.000000000000e-14 3.300000000000e-14 -1.350000000000e+01 -2.349943156732e-14 0.000000000000e+00 -1.000000000000e-14 3.350000000000e-14 -1.400000000000e+01 -2.399989929014e-14 0.000000000000e+00 -1.000000000000e-14 3.400000000000e-14 -1.450000000000e+01 -2.450036701296e-14 0.000000000000e+00 -1.000000000000e-14 3.450000000000e-14 -1.500000000000e+01 -2.499996737404e-14 0.000000000000e+00 -1.000000000000e-14 3.500000000000e-14 -1.550000000000e+01 -2.549956773512e-14 0.000000000000e+00 -1.000000000000e-14 3.550000000000e-14 -1.600000000000e+01 -2.600003545794e-14 0.000000000000e+00 -1.000000000000e-14 3.600000000000e-14 -1.650000000000e+01 -2.649963581902e-14 0.000000000000e+00 -1.000000000000e-14 3.650000000000e-14 -1.700000000000e+01 -2.700010354184e-14 0.000000000000e+00 -1.000000000000e-14 3.700000000000e-14 -1.750000000000e+01 -2.750057126466e-14 0.000000000000e+00 -1.000000000000e-14 3.750000000000e-14 -1.800000000000e+01 -2.800017162574e-14 0.000000000000e+00 -1.000000000000e-14 3.800000000000e-14 -1.850000000000e+01 -2.849977198682e-14 0.000000000000e+00 -1.000000000000e-14 3.850000000000e-14 -1.900000000000e+01 -2.900110707138e-14 0.000000000000e+00 -1.000000000000e-14 3.900000000000e-14 -1.950000000000e+01 -2.949984007072e-14 0.000000000000e+00 -1.000000000000e-14 3.950000000000e-14 -2.000000000000e+01 -3.000030779354e-14 0.000000000000e+00 -1.000000000000e-14 4.000000000000e-14 -1.000000000000e+00 -6.466979038821e-07 0.000000000000e+00 6.466978828822e-07 2.100000000000e-14 -1.500000000000e+00 -6.643512371746e-07 0.000000000000e+00 6.643512156745e-07 2.150000000000e-14 -2.000000000000e+00 -6.820113647760e-07 0.000000000000e+00 6.820113427758e-07 2.200000000000e-14 -2.500000000000e+00 -6.997875345858e-07 0.000000000000e+00 6.997875120857e-07 2.250000000000e-14 -3.000000000000e+00 -7.177330866109e-07 0.000000000000e+00 7.177330636112e-07 2.300000000000e-14 -3.500000000000e+00 -7.358790257103e-07 0.000000000000e+00 7.358790022111e-07 2.350000000000e-14 -4.000000000000e+00 -7.542454181809e-07 0.000000000000e+00 7.542453941815e-07 2.400000000000e-14 -4.500000000000e+00 -7.728462645129e-07 0.000000000000e+00 7.728462400134e-07 2.450000000000e-14 -5.000000000000e+00 -7.916919004722e-07 0.000000000000e+00 7.916918754724e-07 2.500000000000e-14 -5.500000000000e+00 -8.107903028340e-07 0.000000000000e+00 8.107902773347e-07 2.550000000000e-14 -6.000000000000e+00 -8.301478534099e-07 0.000000000000e+00 8.301478274104e-07 2.600000000000e-14 -6.500000000000e+00 -8.497698122437e-07 0.000000000000e+00 8.497697857445e-07 2.650000000000e-14 -7.000000000000e+00 -8.696606243540e-07 0.000000000000e+00 8.696605973552e-07 2.700000000000e-14 -7.500000000000e+00 -8.898241261480e-07 0.000000000000e+00 8.898240986481e-07 2.750000000000e-14 -8.000000000000e+00 -9.102636887373e-07 0.000000000000e+00 9.102636607380e-07 2.800000000000e-14 -8.500000000000e+00 -9.309823201529e-07 0.000000000000e+00 9.309822916529e-07 2.850000000000e-14 -9.000000000000e+00 -9.519827399119e-07 0.000000000000e+00 9.519827109110e-07 2.900000000000e-14 -9.500000000000e+00 -9.732674345411e-07 0.000000000000e+00 9.732674050411e-07 2.950000000000e-14 -1.000000000000e+01 -9.948386996530e-07 0.000000000000e+00 9.948386696547e-07 3.000000000000e-14 -1.050000000000e+01 -1.016698672331e-06 0.000000000000e+00 1.016698641831e-06 3.050000000000e-14 -1.100000000000e+01 -1.038849356402e-06 0.000000000000e+00 1.038849325401e-06 3.100000000000e-14 -1.150000000000e+01 -1.061292642440e-06 0.000000000000e+00 1.061292610939e-06 3.150000000000e-14 -1.200000000000e+01 -1.084030323759e-06 0.000000000000e+00 1.084030291759e-06 3.200000000000e-14 -1.250000000000e+01 -1.107064109338e-06 0.000000000000e+00 1.107064076838e-06 3.250000000000e-14 -1.300000000000e+01 -1.130395634377e-06 0.000000000000e+00 1.130395601378e-06 3.300000000000e-14 -1.350000000000e+01 -1.154026468999e-06 0.000000000000e+00 1.154026435498e-06 3.350000000000e-14 -1.400000000000e+01 -1.177958125458e-06 0.000000000000e+00 1.177958091458e-06 3.400000000000e-14 -1.450000000000e+01 -1.202192064207e-06 0.000000000000e+00 1.202192029708e-06 3.450000000000e-14 -1.500000000000e+01 -1.226729698990e-06 0.000000000000e+00 1.226729663989e-06 3.500000000000e-14 -1.550000000000e+01 -1.251572401163e-06 0.000000000000e+00 1.251572365663e-06 3.550000000000e-14 -1.600000000000e+01 -1.276721503420e-06 0.000000000000e+00 1.276721467420e-06 3.600000000000e-14 -1.650000000000e+01 -1.302178302960e-06 0.000000000000e+00 1.302178266461e-06 3.650000000000e-14 -1.700000000000e+01 -1.327944064254e-06 0.000000000000e+00 1.327944027253e-06 3.700000000000e-14 -1.750000000000e+01 -1.354020021428e-06 0.000000000000e+00 1.354019983929e-06 3.750000000000e-14 -1.800000000000e+01 -1.380407380383e-06 0.000000000000e+00 1.380407342383e-06 3.800000000000e-14 -1.850000000000e+01 -1.407107320617e-06 0.000000000000e+00 1.407107282117e-06 3.850000000000e-14 -1.900000000000e+01 -1.434120996866e-06 0.000000000000e+00 1.434120957865e-06 3.900000000000e-14 -1.950000000000e+01 -1.461449540545e-06 0.000000000000e+00 1.461449501045e-06 3.950000000000e-14 -2.000000000000e+01 -1.489094061040e-06 0.000000000000e+00 1.489094021041e-06 4.000000000000e-14 -1.000000000000e+00 -2.490682573478e-04 0.000000000000e+00 2.490682573268e-04 2.100000000000e-14 -1.500000000000e+00 -3.460727142489e-04 0.000000000000e+00 3.460727142274e-04 2.150000000000e-14 -2.000000000000e+00 -4.257695297094e-04 0.000000000000e+00 4.257695296874e-04 2.200000000000e-14 -2.500000000000e+00 -4.901299880744e-04 0.000000000000e+00 4.901299880519e-04 2.250000000000e-14 -3.000000000000e+00 -5.413285647177e-04 0.000000000000e+00 5.413285646947e-04 2.300000000000e-14 -3.500000000000e+00 -5.815050132776e-04 0.000000000000e+00 5.815050132541e-04 2.350000000000e-14 -4.000000000000e+00 -6.126472072051e-04 0.000000000000e+00 6.126472071811e-04 2.400000000000e-14 -4.500000000000e+00 -6.365278676272e-04 0.000000000000e+00 6.365278676027e-04 2.450000000000e-14 -5.000000000000e+00 -6.546747062966e-04 0.000000000000e+00 6.546747062716e-04 2.500000000000e-14 -5.500000000000e+00 -6.683656771715e-04 0.000000000000e+00 6.683656771460e-04 2.550000000000e-14 -6.000000000000e+00 -6.786423034604e-04 0.000000000000e+00 6.786423034344e-04 2.600000000000e-14 -6.500000000000e+00 -6.863343780993e-04 0.000000000000e+00 6.863343780728e-04 2.650000000000e-14 -7.000000000000e+00 -6.920904257085e-04 0.000000000000e+00 6.920904256815e-04 2.700000000000e-14 -7.500000000000e+00 -6.964095801155e-04 0.000000000000e+00 6.964095800880e-04 2.750000000000e-14 -8.000000000000e+00 -6.996717844765e-04 0.000000000000e+00 6.996717844485e-04 2.800000000000e-14 -8.500000000000e+00 -7.021644609802e-04 0.000000000000e+00 7.021644609517e-04 2.850000000000e-14 -9.000000000000e+00 -7.041051052949e-04 0.000000000000e+00 7.041051052659e-04 2.900000000000e-14 -9.500000000000e+00 -7.056598702017e-04 0.000000000000e+00 7.056598701722e-04 2.950000000000e-14 -1.000000000000e+01 -7.069585538266e-04 0.000000000000e+00 7.069585537966e-04 3.000000000000e-14 -1.050000000000e+01 -7.081038981690e-04 0.000000000000e+00 7.081038981385e-04 3.050000000000e-14 -1.100000000000e+01 -7.091693842225e-04 0.000000000000e+00 7.091693841915e-04 3.100000000000e-14 -1.150000000000e+01 -7.101936665029e-04 0.000000000000e+00 7.101936664714e-04 3.150000000000e-14 -1.200000000000e+01 -7.111914394191e-04 0.000000000000e+00 7.111914393871e-04 3.200000000000e-14 -1.250000000000e+01 -7.121682344956e-04 0.000000000000e+00 7.121682344631e-04 3.250000000000e-14 -1.300000000000e+01 -7.131268840775e-04 0.000000000000e+00 7.131268840445e-04 3.300000000000e-14 -1.350000000000e+01 -7.140693440629e-04 0.000000000000e+00 7.140693440294e-04 3.350000000000e-14 -1.400000000000e+01 -7.149971816500e-04 0.000000000000e+00 7.149971816160e-04 3.400000000000e-14 -1.450000000000e+01 -7.159117262519e-04 0.000000000000e+00 7.159117262174e-04 3.450000000000e-14 -1.500000000000e+01 -7.168141305060e-04 0.000000000000e+00 7.168141304710e-04 3.500000000000e-14 -1.550000000000e+01 -7.177054037162e-04 0.000000000000e+00 7.177054036807e-04 3.550000000000e-14 -1.600000000000e+01 -7.185864348263e-04 0.000000000000e+00 7.185864347903e-04 3.600000000000e-14 -1.650000000000e+01 -7.194580102015e-04 0.000000000000e+00 7.194580101650e-04 3.650000000000e-14 -1.700000000000e+01 -7.203208281354e-04 0.000000000000e+00 7.203208280984e-04 3.700000000000e-14 -1.750000000000e+01 -7.211755109527e-04 0.000000000000e+00 7.211755109152e-04 3.750000000000e-14 -1.800000000000e+01 -7.220226152076e-04 0.000000000000e+00 7.220226151696e-04 3.800000000000e-14 -1.850000000000e+01 -7.228626403249e-04 0.000000000000e+00 7.228626402864e-04 3.850000000000e-14 -1.900000000000e+01 -7.236960359452e-04 0.000000000000e+00 7.236960359062e-04 3.900000000000e-14 -1.950000000000e+01 -7.245232081877e-04 0.000000000000e+00 7.245232081482e-04 3.950000000000e-14 -2.000000000000e+01 -7.253445250045e-04 0.000000000000e+00 7.253445249645e-04 4.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/acVd_cvdsover.standard0000644000265600020320000000645412264261473024362 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -1 1.780526186415e-05 1.961666306553e-04 3.4786553454769e-14 2.45825838833393e-14 -2 3.705226870372e-05 1.522609672921e-04 3.77180747154089e-14 2.27274489023593e-14 -3 5.748104366497e-05 1.145521297832e-04 4.03632150755388e-14 2.07575006387794e-14 -4 7.814419686093e-05 8.376499533361e-05 4.25595591566887e-14 1.87001577781295e-14 -5 9.789261980102e-05 5.959872994511e-05 4.42072620125287e-14 1.66395279355395e-14 -6 1.157122037122e-04 4.130941725536e-05 4.52963391153587e-14 1.47273296663496e-14 -7 1.309341138754e-04 2.795324047866e-05 4.59332815428587e-14 1.31424957908096e-14 -8 1.433111593524e-04 1.852271435013e-05 4.63080153917886e-14 1.19861227672596e-14 -9 1.529722402698e-04 1.205247748252e-05 4.65896912670586e-14 1.12195986506197e-14 -10 1.602860886652e-04 7.708044846530e-06 4.68384252525986e-14 1.06927083840897e-14 -11 1.657063926185e-04 4.834228787058e-06 4.68979803135886e-14 1.01017110295997e-14 -12 1.696632479028e-04 2.954084617684e-06 4.47075114780087e-14 7.25557103806279e-15 -13 1.725128651675e-04 1.738060837737e-06 4.22982148784888e-14 4.49494548991387e-15 -14 1.745230216460e-04 9.671802218246e-07 4.15345158813688e-14 3.5789234399709e-15 -15 1.758625845838e-04 5.051570182080e-07 4.10691703031788e-14 3.06540166536691e-15 -16 1.765553693934e-04 2.888884697900e-07 4.05917719552488e-14 2.68621926003292e-15 -17 1.767204058564e-04 2.428234586410e-07 4.03317666493388e-14 2.44476522289393e-15 -18 1.767815353099e-04 2.282676378852e-07 4.02111206761488e-14 2.28201885815593e-15 -19 1.768328491488e-04 2.170005109197e-07 4.01249703006488e-14 2.15437102094594e-15 -20 1.768798582476e-04 2.073153403412e-07 4.00586836907288e-14 2.05010793587094e-15 -1 1.230992555900e-05 1.260432678968e-04 3.16468115304991e-14 2.71834711370692e-14 -2 2.569646314855e-05 9.674071650354e-05 3.4714462675629e-14 2.47323198317293e-14 -3 3.971873960317e-05 7.131962411334e-05 3.75165220098789e-14 2.20699202461294e-14 -4 5.345492060017e-05 5.075469577950e-05 3.98075276156188e-14 1.93852326752794e-14 -5 6.599330556602e-05 3.504241190160e-05 4.14978647478988e-14 1.68727842679795e-14 -6 7.672240560829e-05 2.359892777253e-05 4.26161718121487e-14 1.47446774421396e-14 -7 8.540735983528e-05 1.559328812456e-05 4.32950341773987e-14 1.31440239021296e-14 -8 9.213074122763e-05 1.016872341402e-05 4.37082114874987e-14 1.20514928975296e-14 -9 9.716951422263e-05 6.573881249316e-06 4.39750966266487e-14 1.12959362283997e-14 -10 1.008670930292e-04 4.222476475179e-06 4.40655129677587e-14 1.05336924455197e-14 -11 1.035464795191e-04 2.694404683689e-06 4.30627665571787e-14 7.93384796641377e-15 -12 1.054729218801e-04 1.704762880860e-06 4.15550958661288e-14 4.77183747166686e-15 -13 1.068485665879e-04 1.066298693765e-06 4.10999062162988e-14 3.73481820502789e-15 -14 1.078204436156e-04 6.580150476138e-07 4.08714655394288e-14 3.19323294663691e-15 -15 1.084908887130e-04 4.027491414624e-07 4.07089113079888e-14 2.84146454228592e-15 -16 1.089260308143e-04 2.523583984488e-07 4.05494286289988e-14 2.58036225472892e-15 -17 1.091670963312e-04 1.766362149741e-07 4.03793595317988e-14 2.37279767202493e-15 -18 1.092697951509e-04 1.477666465079e-07 4.02615132241288e-14 2.21797259170794e-15 -19 1.093155109654e-04 1.368025862222e-07 4.02020144715988e-14 2.10319743111694e-15 -20 1.093463834685e-04 1.304072294804e-07 4.01656163557388e-14 2.01078257938794e-15 ngspice-26/tests/hisimhv1/pmos/reference/acVd_corsrd2.standard0000644000265600020320000000644712264261473024107 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -1 2.328325948932e-05 5.126426049612e-04 2.45841887430693e-14 3.3729044563539e-14 -2 4.689529971173e-05 4.341625415703e-04 2.59588337965792e-14 3.2401708231459e-14 -3 7.013471289449e-05 3.596612016162e-04 2.75328133220292e-14 3.08276745661491e-14 -4 9.239224021615e-05 2.947078183748e-04 2.91786442688391e-14 2.90950477099191e-14 -5 1.132780595100e-04 2.401578072801e-04 3.08013708760391e-14 2.72844649436392e-14 -6 1.325708737123e-04 1.951327622034e-04 3.23361697706191e-14 2.54643983056193e-14 -7 1.501653280342e-04 1.582987967299e-04 3.3743721527219e-14 2.36894291010593e-14 -8 1.660385818520e-04 1.283180029967e-04 3.5003556864389e-14 2.20017129631394e-14 -9 1.802272062585e-04 1.039918494840e-04 3.61077721916489e-14 2.04334085396594e-14 -10 1.928090960572e-04 8.429507654799e-05 3.70566823201789e-14 1.90081956162994e-14 -11 2.038890142010e-04 6.837028096874e-05 3.78564670676589e-14 1.77413990183595e-14 -12 2.135875141547e-04 5.550895245195e-05 3.85179356918789e-14 1.66394110208995e-14 -13 2.220327958894e-04 4.512933685996e-05 3.90554756320389e-14 1.56994319432395e-14 -14 2.293547621521e-04 3.675551533099e-05 3.94857329711088e-14 1.49100738172096e-14 -15 2.356805832260e-04 2.999928111166e-05 3.98260901025588e-14 1.42525164396696e-14 -16 2.411313495397e-04 2.454498328563e-05 4.00932533882888e-14 1.37008769578396e-14 -17 2.458196487334e-04 2.013692378339e-05 4.03022241589688e-14 1.32181019529096e-14 -18 2.498480162198e-04 1.656879957819e-05 4.04657526238988e-14 1.27305988304596e-14 -19 2.533081937368e-04 1.367479340798e-05 4.05942161824788e-14 1.19101301965697e-14 -20 2.562810692777e-04 1.132205137717e-05 4.06957864086388e-14 7.38545417325478e-15 -1 1.324204703201e-05 2.969624046580e-04 2.45819048163893e-14 3.3672746775969e-14 -2 2.691984704305e-05 2.595494971041e-04 2.59929083895492e-14 3.23389425036991e-14 -3 4.082580197345e-05 2.225000516655e-04 2.76082032351392e-14 3.07634056727591e-14 -4 5.464877753283e-05 1.880369727669e-04 2.92978989411591e-14 2.90325416251692e-14 -5 6.807995346442e-05 1.572874206928e-04 3.09661845294591e-14 2.72259156696792e-14 -6 8.086369533856e-05 1.305957134382e-04 3.2547931147669e-14 2.54113133276193e-14 -7 9.281398287595e-05 1.078565092232e-04 3.4003740112209e-14 2.36428251105293e-14 -8 1.038137980785e-04 8.873890096420e-05 3.5313140203869e-14 2.19621142135694e-14 -9 1.138063453117e-04 7.281964549058e-05 3.64681788098989e-14 2.04006836168794e-14 -10 1.227829565855e-04 5.965796421558e-05 3.74689450290089e-14 1.89813459564994e-14 -11 1.307707295326e-04 4.883487257090e-05 3.83211188396589e-14 1.77184307815195e-14 -12 1.378216094751e-04 3.997148534001e-05 3.90347227199689e-14 1.66173552945795e-14 -13 1.440035116519e-04 3.273538621118e-05 3.96231606780688e-14 1.56744650306095e-14 -14 1.493933788883e-04 2.684069797320e-05 4.01020590076688e-14 1.48775844962396e-14 -15 1.540718277706e-04 2.204513376710e-05 4.04879108894188e-14 1.42068778036696e-14 -16 1.581190811950e-04 1.814576391845e-05 4.07967818119688e-14 1.36344964165696e-14 -17 1.616119988293e-04 1.497434200375e-05 4.10433255416588e-14 1.31185978961096e-14 -18 1.646220771805e-04 1.239260156748e-05 4.12402188078088e-14 1.25714797188796e-14 -19 1.672142870284e-04 1.028775362534e-05 4.13979816230988e-14 1.16125880939197e-14 -20 1.694465885279e-04 8.568334083130e-06 4.15250736849188e-14 7.45723621915978e-15 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_corsrd1.standard0000644000265600020320000010243012264261473024116 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.131524258000e-05 0.000000000000e+00 2.131524257899e-05 1.010000000000e-15 -1.500000000000e+00 -2.142051226926e-05 0.000000000000e+00 2.142051226775e-05 1.510000000000e-15 -2.000000000000e+00 -2.151083134964e-05 0.000000000000e+00 2.151083134763e-05 2.010000000000e-15 -2.500000000000e+00 -2.159363036329e-05 0.000000000000e+00 2.159363036078e-05 2.510000000000e-15 -3.000000000000e+00 -2.167169281934e-05 0.000000000000e+00 2.167169281633e-05 3.010000000000e-15 -3.500000000000e+00 -2.174641075414e-05 0.000000000000e+00 2.174641075063e-05 3.510000000000e-15 -4.000000000000e+00 -2.181860402047e-05 0.000000000000e+00 2.181860401646e-05 4.010000000000e-15 -4.500000000000e+00 -2.188880637755e-05 0.000000000000e+00 2.188880637304e-05 4.510000000000e-15 -5.000000000000e+00 -2.195738942340e-05 0.000000000000e+00 2.195738941839e-05 5.010000000000e-15 -5.500000000000e+00 -2.202462459812e-05 0.000000000000e+00 2.202462459261e-05 5.510000000000e-15 -6.000000000000e+00 -2.209071750224e-05 0.000000000000e+00 2.209071749623e-05 6.010000000000e-15 -6.500000000000e+00 -2.215582835774e-05 0.000000000000e+00 2.215582835123e-05 6.510000000000e-15 -7.000000000000e+00 -2.222008492217e-05 0.000000000000e+00 2.222008491516e-05 7.010000000000e-15 -7.500000000000e+00 -2.228359101554e-05 0.000000000000e+00 2.228359100803e-05 7.510000000000e-15 -8.000000000000e+00 -2.234643236060e-05 0.000000000000e+00 2.234643235259e-05 8.010000000000e-15 -8.500000000000e+00 -2.240868070678e-05 0.000000000000e+00 2.240868069827e-05 8.510000000000e-15 -9.000000000000e+00 -2.247039681792e-05 0.000000000000e+00 2.247039680891e-05 9.010000000000e-15 -9.500000000000e+00 -2.253163268526e-05 0.000000000000e+00 2.253163267575e-05 9.510000000000e-15 -1.000000000000e+01 -2.259243319822e-05 0.000000000000e+00 2.259243318821e-05 1.001000000000e-14 -1.050000000000e+01 -2.265283742711e-05 0.000000000000e+00 2.265283741660e-05 1.051000000000e-14 -1.100000000000e+01 -2.271287962269e-05 0.000000000000e+00 2.271287961168e-05 1.101000000000e-14 -1.150000000000e+01 -2.277259000547e-05 0.000000000000e+00 2.277258999396e-05 1.151000000000e-14 -1.200000000000e+01 -2.283199539636e-05 0.000000000000e+00 2.283199538435e-05 1.201000000000e-14 -1.250000000000e+01 -2.289111972605e-05 0.000000000000e+00 2.289111971354e-05 1.251000000000e-14 -1.300000000000e+01 -2.294998445035e-05 0.000000000000e+00 2.294998443734e-05 1.301000000000e-14 -1.350000000000e+01 -2.300860889206e-05 0.000000000000e+00 2.300860887855e-05 1.351000000000e-14 -1.400000000000e+01 -2.306701052442e-05 0.000000000000e+00 2.306701051041e-05 1.401000000000e-14 -1.450000000000e+01 -2.312520520806e-05 0.000000000000e+00 2.312520519355e-05 1.451000000000e-14 -1.500000000000e+01 -2.318320739039e-05 0.000000000000e+00 2.318320737538e-05 1.501000000000e-14 -1.550000000000e+01 -2.324103027438e-05 0.000000000000e+00 2.324103025887e-05 1.551000000000e-14 -1.600000000000e+01 -2.329868596247e-05 0.000000000000e+00 2.329868594646e-05 1.601000000000e-14 -1.650000000000e+01 -2.335618557965e-05 0.000000000000e+00 2.335618556314e-05 1.651000000000e-14 -1.700000000000e+01 -2.341353937963e-05 0.000000000000e+00 2.341353936262e-05 1.701000000000e-14 -1.750000000000e+01 -2.347075683651e-05 0.000000000000e+00 2.347075681900e-05 1.751000000000e-14 -1.800000000000e+01 -2.352784672455e-05 0.000000000000e+00 2.352784670654e-05 1.801000000000e-14 -1.850000000000e+01 -2.358481718774e-05 0.000000000000e+00 2.358481716923e-05 1.851000000000e-14 -1.900000000000e+01 -2.364167580075e-05 0.000000000000e+00 2.364167578174e-05 1.901000000000e-14 -1.950000000000e+01 -2.369842962256e-05 0.000000000000e+00 2.369842960305e-05 1.951000000000e-14 -2.000000000000e+01 -2.375508524377e-05 0.000000000000e+00 2.375508522376e-05 2.001000000000e-14 -1.000000000000e+00 -3.129968823493e-04 0.000000000000e+00 3.129968823483e-04 1.010000000000e-15 -1.500000000000e+00 -4.132416788805e-04 0.000000000000e+00 4.132416788790e-04 1.510000000000e-15 -2.000000000000e+00 -4.819788816545e-04 0.000000000000e+00 4.819788816525e-04 2.010000000000e-15 -2.500000000000e+00 -5.259002962700e-04 0.000000000000e+00 5.259002962675e-04 2.510000000000e-15 -3.000000000000e+00 -5.516634056933e-04 0.000000000000e+00 5.516634056903e-04 3.010000000000e-15 -3.500000000000e+00 -5.651840451193e-04 0.000000000000e+00 5.651840451158e-04 3.510000000000e-15 -4.000000000000e+00 -5.711830113311e-04 0.000000000000e+00 5.711830113271e-04 4.010000000000e-15 -4.500000000000e+00 -5.732241882214e-04 0.000000000000e+00 5.732241882168e-04 4.510000000000e-15 -5.000000000000e+00 -5.741291336459e-04 0.000000000000e+00 5.741291336409e-04 5.010000000000e-15 -5.500000000000e+00 -5.749153953289e-04 0.000000000000e+00 5.749153953234e-04 5.510000000000e-15 -6.000000000000e+00 -5.756408300009e-04 0.000000000000e+00 5.756408299948e-04 6.010000000000e-15 -6.500000000000e+00 -5.763171412821e-04 0.000000000000e+00 5.763171412756e-04 6.510000000000e-15 -7.000000000000e+00 -5.769533708057e-04 0.000000000000e+00 5.769533707987e-04 7.010000000000e-15 -7.500000000000e+00 -5.775566260871e-04 0.000000000000e+00 5.775566260796e-04 7.510000000000e-15 -8.000000000000e+00 -5.781324557250e-04 0.000000000000e+00 5.781324557170e-04 8.010000000000e-15 -8.500000000000e+00 -5.786851982046e-04 0.000000000000e+00 5.786851981961e-04 8.510000000000e-15 -9.000000000000e+00 -5.792182690076e-04 0.000000000000e+00 5.792182689986e-04 9.010000000000e-15 -9.500000000000e+00 -5.797343828846e-04 0.000000000000e+00 5.797343828751e-04 9.510000000000e-15 -1.000000000000e+01 -5.802357212546e-04 0.000000000000e+00 5.802357212446e-04 1.001000000000e-14 -1.050000000000e+01 -5.807240569462e-04 0.000000000000e+00 5.807240569357e-04 1.051000000000e-14 -1.100000000000e+01 -5.812008470132e-04 0.000000000000e+00 5.812008470021e-04 1.101000000000e-14 -1.150000000000e+01 -5.816673020466e-04 0.000000000000e+00 5.816673020351e-04 1.151000000000e-14 -1.200000000000e+01 -5.821244382781e-04 0.000000000000e+00 5.821244382660e-04 1.201000000000e-14 -1.250000000000e+01 -5.825731170703e-04 0.000000000000e+00 5.825731170578e-04 1.251000000000e-14 -1.300000000000e+01 -5.830140751218e-04 0.000000000000e+00 5.830140751088e-04 1.301000000000e-14 -1.350000000000e+01 -5.834479477903e-04 0.000000000000e+00 5.834479477767e-04 1.351000000000e-14 -1.400000000000e+01 -5.838752872745e-04 0.000000000000e+00 5.838752872605e-04 1.401000000000e-14 -1.450000000000e+01 -5.842965769237e-04 0.000000000000e+00 5.842965769092e-04 1.451000000000e-14 -1.500000000000e+01 -5.847122426032e-04 0.000000000000e+00 5.847122425882e-04 1.501000000000e-14 -1.550000000000e+01 -5.851226618015e-04 0.000000000000e+00 5.851226617860e-04 1.551000000000e-14 -1.600000000000e+01 -5.855281709922e-04 0.000000000000e+00 5.855281709762e-04 1.601000000000e-14 -1.650000000000e+01 -5.859290716314e-04 0.000000000000e+00 5.859290716149e-04 1.651000000000e-14 -1.700000000000e+01 -5.863256350837e-04 0.000000000000e+00 5.863256350667e-04 1.701000000000e-14 -1.750000000000e+01 -5.867181066967e-04 0.000000000000e+00 5.867181066792e-04 1.751000000000e-14 -1.800000000000e+01 -5.871067091947e-04 0.000000000000e+00 5.871067091767e-04 1.801000000000e-14 -1.850000000000e+01 -5.874916455257e-04 0.000000000000e+00 5.874916455072e-04 1.851000000000e-14 -1.900000000000e+01 -5.878731012621e-04 0.000000000000e+00 5.878731012430e-04 1.901000000000e-14 -1.950000000000e+01 -5.882512466396e-04 0.000000000000e+00 5.882512466201e-04 1.951000000000e-14 -2.000000000000e+01 -5.886262382970e-04 0.000000000000e+00 5.886262382770e-04 2.001000000000e-14 -1.000000000000e+00 -5.118956332217e-04 0.000000000000e+00 5.118956332207e-04 1.010000000000e-15 -1.500000000000e+00 -7.262857244049e-04 0.000000000000e+00 7.262857244034e-04 1.510000000000e-15 -2.000000000000e+00 -9.163096678910e-04 0.000000000000e+00 9.163096678890e-04 2.010000000000e-15 -2.500000000000e+00 -1.084892658405e-03 0.000000000000e+00 1.084892658402e-03 2.510000000000e-15 -3.000000000000e+00 -1.234706667447e-03 0.000000000000e+00 1.234706667444e-03 3.010000000000e-15 -3.500000000000e+00 -1.368070240037e-03 0.000000000000e+00 1.368070240033e-03 3.510000000000e-15 -4.000000000000e+00 -1.486960198777e-03 0.000000000000e+00 1.486960198773e-03 4.010000000000e-15 -4.500000000000e+00 -1.593056332197e-03 0.000000000000e+00 1.593056332192e-03 4.510000000000e-15 -5.000000000000e+00 -1.687790426071e-03 0.000000000000e+00 1.687790426066e-03 5.010000000000e-15 -5.500000000000e+00 -1.772390482729e-03 0.000000000000e+00 1.772390482723e-03 5.510000000000e-15 -6.000000000000e+00 -1.847917975892e-03 0.000000000000e+00 1.847917975886e-03 6.010000000000e-15 -6.500000000000e+00 -1.915298344961e-03 0.000000000000e+00 1.915298344955e-03 6.510000000000e-15 -7.000000000000e+00 -1.975345610086e-03 0.000000000000e+00 1.975345610079e-03 7.010000000000e-15 -7.500000000000e+00 -2.028782081405e-03 0.000000000000e+00 2.028782081398e-03 7.510000000000e-15 -8.000000000000e+00 -2.076254042916e-03 0.000000000000e+00 2.076254042908e-03 8.010000000000e-15 -8.500000000000e+00 -2.118344156332e-03 0.000000000000e+00 2.118344156323e-03 8.510000000000e-15 -9.000000000000e+00 -2.155581200370e-03 0.000000000000e+00 2.155581200361e-03 9.010000000000e-15 -9.500000000000e+00 -2.188447648877e-03 0.000000000000e+00 2.188447648867e-03 9.510000000000e-15 -1.000000000000e+01 -2.217385499497e-03 0.000000000000e+00 2.217385499487e-03 1.001000000000e-14 -1.050000000000e+01 -2.242800693507e-03 0.000000000000e+00 2.242800693497e-03 1.051000000000e-14 -1.100000000000e+01 -2.265066416524e-03 0.000000000000e+00 2.265066416513e-03 1.101000000000e-14 -1.150000000000e+01 -2.284525536620e-03 0.000000000000e+00 2.284525536609e-03 1.151000000000e-14 -1.200000000000e+01 -2.301492414812e-03 0.000000000000e+00 2.301492414800e-03 1.201000000000e-14 -1.250000000000e+01 -2.316254304135e-03 0.000000000000e+00 2.316254304123e-03 1.251000000000e-14 -1.300000000000e+01 -2.329072528965e-03 0.000000000000e+00 2.329072528952e-03 1.301000000000e-14 -1.350000000000e+01 -2.340183601106e-03 0.000000000000e+00 2.340183601092e-03 1.351000000000e-14 -1.400000000000e+01 -2.349800384508e-03 0.000000000000e+00 2.349800384494e-03 1.401000000000e-14 -1.450000000000e+01 -2.358113372066e-03 0.000000000000e+00 2.358113372052e-03 1.451000000000e-14 -1.500000000000e+01 -2.365292093472e-03 0.000000000000e+00 2.365292093457e-03 1.501000000000e-14 -1.550000000000e+01 -2.371486657115e-03 0.000000000000e+00 2.371486657099e-03 1.551000000000e-14 -1.600000000000e+01 -2.376829272508e-03 0.000000000000e+00 2.376829272492e-03 1.601000000000e-14 -1.650000000000e+01 -2.381436014486e-03 0.000000000000e+00 2.381436014470e-03 1.651000000000e-14 -1.700000000000e+01 -2.385408349099e-03 0.000000000000e+00 2.385408349082e-03 1.701000000000e-14 -1.750000000000e+01 -2.388834728828e-03 0.000000000000e+00 2.388834728810e-03 1.751000000000e-14 -1.800000000000e+01 -2.391792079332e-03 0.000000000000e+00 2.391792079314e-03 1.801000000000e-14 -1.850000000000e+01 -2.394347185179e-03 0.000000000000e+00 2.394347185160e-03 1.851000000000e-14 -1.900000000000e+01 -2.396557965015e-03 0.000000000000e+00 2.396557964996e-03 1.901000000000e-14 -1.950000000000e+01 -2.398474635055e-03 0.000000000000e+00 2.398474635035e-03 1.951000000000e-14 -2.000000000000e+01 -2.400140767239e-03 0.000000000000e+00 2.400140767219e-03 2.001000000000e-14 -1.000000000000e+00 -1.703424842042e-05 0.000000000000e+00 1.703424841942e-05 1.000000000751e-15 -1.500000000000e+00 -1.713035150953e-05 0.000000000000e+00 1.713035150803e-05 1.500000000751e-15 -2.000000000000e+00 -1.721511704856e-05 0.000000000000e+00 1.721511704656e-05 2.000000000751e-15 -2.500000000000e+00 -1.729415053628e-05 0.000000000000e+00 1.729415053378e-05 2.500000000751e-15 -3.000000000000e+00 -1.736955010439e-05 0.000000000000e+00 1.736955010139e-05 3.000000000751e-15 -3.500000000000e+00 -1.744237417662e-05 0.000000000000e+00 1.744237417312e-05 3.500000000751e-15 -4.000000000000e+00 -1.751325204018e-05 0.000000000000e+00 1.751325203618e-05 4.000000000751e-15 -4.500000000000e+00 -1.758259672459e-05 0.000000000000e+00 1.758259672009e-05 4.500000000751e-15 -5.000000000000e+00 -1.765069767189e-05 0.000000000000e+00 1.765069766690e-05 5.000000000751e-15 -5.500000000000e+00 -1.771776742373e-05 0.000000000000e+00 1.771776741823e-05 5.500000000751e-15 -6.000000000000e+00 -1.778396764796e-05 0.000000000000e+00 1.778396764196e-05 6.000000000751e-15 -6.500000000000e+00 -1.784942475947e-05 0.000000000000e+00 1.784942475297e-05 6.500000000751e-15 -7.000000000000e+00 -1.791423983786e-05 0.000000000000e+00 1.791423983086e-05 7.000000000751e-15 -7.500000000000e+00 -1.797849520991e-05 0.000000000000e+00 1.797849520241e-05 7.500000000751e-15 -8.000000000000e+00 -1.804225897856e-05 0.000000000000e+00 1.804225897056e-05 8.000000000751e-15 -8.500000000000e+00 -1.810558823344e-05 0.000000000000e+00 1.810558822494e-05 8.500000000751e-15 -9.000000000000e+00 -1.816853138496e-05 0.000000000000e+00 1.816853137596e-05 9.000000000751e-15 -9.500000000000e+00 -1.823112989833e-05 0.000000000000e+00 1.823112988883e-05 9.500000000751e-15 -1.000000000000e+01 -1.829341960618e-05 0.000000000000e+00 1.829341959618e-05 1.000000000075e-14 -1.050000000000e+01 -1.835543171869e-05 0.000000000000e+00 1.835543170819e-05 1.050000000075e-14 -1.100000000000e+01 -1.841719361240e-05 0.000000000000e+00 1.841719360140e-05 1.100000000075e-14 -1.150000000000e+01 -1.847872945419e-05 0.000000000000e+00 1.847872944269e-05 1.150000000075e-14 -1.200000000000e+01 -1.854006070070e-05 0.000000000000e+00 1.854006068870e-05 1.200000000075e-14 -1.250000000000e+01 -1.860120650228e-05 0.000000000000e+00 1.860120648977e-05 1.250000000075e-14 -1.300000000000e+01 -1.866218403285e-05 0.000000000000e+00 1.866218401985e-05 1.300000000075e-14 -1.350000000000e+01 -1.872300876167e-05 0.000000000000e+00 1.872300874816e-05 1.350000000075e-14 -1.400000000000e+01 -1.878369467896e-05 0.000000000000e+00 1.878369466496e-05 1.400000000075e-14 -1.450000000000e+01 -1.884425448468e-05 0.000000000000e+00 1.884425447019e-05 1.450000000075e-14 -1.500000000000e+01 -1.890469974752e-05 0.000000000000e+00 1.890469973252e-05 1.500000000075e-14 -1.550000000000e+01 -1.896504103956e-05 0.000000000000e+00 1.896504102406e-05 1.550000000075e-14 -1.600000000000e+01 -1.902528805121e-05 0.000000000000e+00 1.902528803521e-05 1.600000000075e-14 -1.650000000000e+01 -1.908544968962e-05 0.000000000000e+00 1.908544967312e-05 1.650000000075e-14 -1.700000000000e+01 -1.914553416346e-05 0.000000000000e+00 1.914553414646e-05 1.700000000075e-14 -1.750000000000e+01 -1.920554905635e-05 0.000000000000e+00 1.920554903886e-05 1.750000000075e-14 -1.800000000000e+01 -1.926550139069e-05 0.000000000000e+00 1.926550137269e-05 1.800000000075e-14 -1.850000000000e+01 -1.932539768332e-05 0.000000000000e+00 1.932539766482e-05 1.850000000075e-14 -1.900000000000e+01 -1.938524399442e-05 0.000000000000e+00 1.938524397542e-05 1.900000000075e-14 -1.950000000000e+01 -1.944504597042e-05 0.000000000000e+00 1.944504595092e-05 1.950000000075e-14 -2.000000000000e+01 -1.950480888196e-05 0.000000000000e+00 1.950480886196e-05 2.000000000075e-14 -1.000000000000e+00 -4.024296273160e-04 0.000000000000e+00 4.024296273150e-04 1.000000000751e-15 -1.500000000000e+00 -5.347439704713e-04 0.000000000000e+00 5.347439704698e-04 1.500000000751e-15 -2.000000000000e+00 -6.280406405959e-04 0.000000000000e+00 6.280406405939e-04 2.000000000751e-15 -2.500000000000e+00 -6.896701201267e-04 0.000000000000e+00 6.896701201242e-04 2.500000000751e-15 -3.000000000000e+00 -7.270830300837e-04 0.000000000000e+00 7.270830300807e-04 3.000000000751e-15 -3.500000000000e+00 -7.472694378733e-04 0.000000000000e+00 7.472694378698e-04 3.500000000751e-15 -4.000000000000e+00 -7.562247794997e-04 0.000000000000e+00 7.562247794957e-04 4.000000000751e-15 -4.500000000000e+00 -7.589107876979e-04 0.000000000000e+00 7.589107876934e-04 4.500000000751e-15 -5.000000000000e+00 -7.600045115953e-04 0.000000000000e+00 7.600045115903e-04 5.000000000751e-15 -5.500000000000e+00 -7.609889147953e-04 0.000000000000e+00 7.609889147898e-04 5.500000000751e-15 -6.000000000000e+00 -7.618960564549e-04 0.000000000000e+00 7.618960564489e-04 6.000000000751e-15 -6.500000000000e+00 -7.627395015028e-04 0.000000000000e+00 7.627395014963e-04 6.500000000751e-15 -7.000000000000e+00 -7.635307401473e-04 0.000000000000e+00 7.635307401403e-04 7.000000000751e-15 -7.500000000000e+00 -7.642790576370e-04 0.000000000000e+00 7.642790576295e-04 7.500000000751e-15 -8.000000000000e+00 -7.649917986889e-04 0.000000000000e+00 7.649917986809e-04 8.000000000751e-15 -8.500000000000e+00 -7.656747369087e-04 0.000000000000e+00 7.656747369002e-04 8.500000000751e-15 -9.000000000000e+00 -7.663324207670e-04 0.000000000000e+00 7.663324207580e-04 9.000000000751e-15 -9.500000000000e+00 -7.669684580305e-04 0.000000000000e+00 7.669684580210e-04 9.500000000751e-15 -1.000000000000e+01 -7.675857368789e-04 0.000000000000e+00 7.675857368689e-04 1.000000000075e-14 -1.050000000000e+01 -7.681865935644e-04 0.000000000000e+00 7.681865935539e-04 1.050000000075e-14 -1.100000000000e+01 -7.687729383235e-04 0.000000000000e+00 7.687729383125e-04 1.100000000075e-14 -1.150000000000e+01 -7.693463498144e-04 0.000000000000e+00 7.693463498029e-04 1.150000000075e-14 -1.200000000000e+01 -7.699081461946e-04 0.000000000000e+00 7.699081461826e-04 1.200000000075e-14 -1.250000000000e+01 -7.704594389489e-04 0.000000000000e+00 7.704594389364e-04 1.250000000075e-14 -1.300000000000e+01 -7.710011739717e-04 0.000000000000e+00 7.710011739587e-04 1.300000000075e-14 -1.350000000000e+01 -7.715341631920e-04 0.000000000000e+00 7.715341631785e-04 1.350000000075e-14 -1.400000000000e+01 -7.720591091386e-04 0.000000000000e+00 7.720591091246e-04 1.400000000075e-14 -1.450000000000e+01 -7.725766241951e-04 0.000000000000e+00 7.725766241806e-04 1.450000000075e-14 -1.500000000000e+01 -7.730872458292e-04 0.000000000000e+00 7.730872458142e-04 1.500000000075e-14 -1.550000000000e+01 -7.735914487445e-04 0.000000000000e+00 7.735914487290e-04 1.550000000075e-14 -1.600000000000e+01 -7.740896546584e-04 0.000000000000e+00 7.740896546424e-04 1.600000000075e-14 -1.650000000000e+01 -7.745822402365e-04 0.000000000000e+00 7.745822402200e-04 1.650000000075e-14 -1.700000000000e+01 -7.750695435793e-04 0.000000000000e+00 7.750695435623e-04 1.700000000075e-14 -1.750000000000e+01 -7.755518695668e-04 0.000000000000e+00 7.755518695493e-04 1.750000000075e-14 -1.800000000000e+01 -7.760294942928e-04 0.000000000000e+00 7.760294942748e-04 1.800000000075e-14 -1.850000000000e+01 -7.765026687686e-04 0.000000000000e+00 7.765026687501e-04 1.850000000075e-14 -1.900000000000e+01 -7.769716220369e-04 0.000000000000e+00 7.769716220179e-04 1.900000000075e-14 -1.950000000000e+01 -7.774365638053e-04 0.000000000000e+00 7.774365637858e-04 1.950000000075e-14 -2.000000000000e+01 -7.778976866859e-04 0.000000000000e+00 7.778976866659e-04 2.000000000075e-14 -1.000000000000e+00 -6.085190858813e-04 0.000000000000e+00 6.085190858803e-04 1.000000000751e-15 -1.500000000000e+00 -8.625470313954e-04 0.000000000000e+00 8.625470313939e-04 1.500000000751e-15 -2.000000000000e+00 -1.087995844746e-03 0.000000000000e+00 1.087995844744e-03 2.000000000751e-15 -2.500000000000e+00 -1.288663984923e-03 0.000000000000e+00 1.288663984920e-03 2.500000000751e-15 -3.000000000000e+00 -1.467879882500e-03 0.000000000000e+00 1.467879882497e-03 3.000000000751e-15 -3.500000000000e+00 -1.628461806701e-03 0.000000000000e+00 1.628461806697e-03 3.500000000751e-15 -4.000000000000e+00 -1.772773011920e-03 0.000000000000e+00 1.772773011916e-03 4.000000000751e-15 -4.500000000000e+00 -1.902795115188e-03 0.000000000000e+00 1.902795115184e-03 4.500000000751e-15 -5.000000000000e+00 -2.020196278208e-03 0.000000000000e+00 2.020196278203e-03 5.000000000751e-15 -5.500000000000e+00 -2.126388705077e-03 0.000000000000e+00 2.126388705071e-03 5.500000000751e-15 -6.000000000000e+00 -2.222575521253e-03 0.000000000000e+00 2.222575521247e-03 6.000000000751e-15 -6.500000000000e+00 -2.309788570694e-03 0.000000000000e+00 2.309788570688e-03 6.500000000751e-15 -7.000000000000e+00 -2.388918835932e-03 0.000000000000e+00 2.388918835925e-03 7.000000000751e-15 -7.500000000000e+00 -2.460740976242e-03 0.000000000000e+00 2.460740976235e-03 7.500000000751e-15 -8.000000000000e+00 -2.525933197701e-03 0.000000000000e+00 2.525933197693e-03 8.000000000751e-15 -8.500000000000e+00 -2.585093410569e-03 0.000000000000e+00 2.585093410561e-03 8.500000000751e-15 -9.000000000000e+00 -2.638752417345e-03 0.000000000000e+00 2.638752417336e-03 9.000000000751e-15 -9.500000000000e+00 -2.687384708382e-03 0.000000000000e+00 2.687384708372e-03 9.500000000751e-15 -1.000000000000e+01 -2.731417314079e-03 0.000000000000e+00 2.731417314069e-03 1.000000000075e-14 -1.050000000000e+01 -2.771237065250e-03 0.000000000000e+00 2.771237065240e-03 1.050000000075e-14 -1.100000000000e+01 -2.807196539252e-03 0.000000000000e+00 2.807196539241e-03 1.100000000075e-14 -1.150000000000e+01 -2.839618913063e-03 0.000000000000e+00 2.839618913051e-03 1.150000000075e-14 -1.200000000000e+01 -2.868801901457e-03 0.000000000000e+00 2.868801901445e-03 1.200000000075e-14 -1.250000000000e+01 -2.895020925781e-03 0.000000000000e+00 2.895020925769e-03 1.250000000075e-14 -1.300000000000e+01 -2.918531634499e-03 0.000000000000e+00 2.918531634486e-03 1.300000000075e-14 -1.350000000000e+01 -2.939571879401e-03 0.000000000000e+00 2.939571879387e-03 1.350000000075e-14 -1.400000000000e+01 -2.958363239917e-03 0.000000000000e+00 2.958363239903e-03 1.400000000075e-14 -1.450000000000e+01 -2.975112180920e-03 0.000000000000e+00 2.975112180906e-03 1.450000000075e-14 -1.500000000000e+01 -2.990010924916e-03 0.000000000000e+00 2.990010924901e-03 1.500000000075e-14 -1.550000000000e+01 -3.003238115470e-03 0.000000000000e+00 3.003238115455e-03 1.550000000075e-14 -1.600000000000e+01 -3.014959343184e-03 0.000000000000e+00 3.014959343168e-03 1.600000000075e-14 -1.650000000000e+01 -3.025327597180e-03 0.000000000000e+00 3.025327597163e-03 1.650000000075e-14 -1.700000000000e+01 -3.034483693790e-03 0.000000000000e+00 3.034483693773e-03 1.700000000075e-14 -1.750000000000e+01 -3.042556720653e-03 0.000000000000e+00 3.042556720635e-03 1.750000000075e-14 -1.800000000000e+01 -3.049664550710e-03 0.000000000000e+00 3.049664550692e-03 1.800000000075e-14 -1.850000000000e+01 -3.055914246747e-03 0.000000000000e+00 3.055914246728e-03 1.850000000075e-14 -1.900000000000e+01 -3.061402853856e-03 0.000000000000e+00 3.061402853837e-03 1.900000000075e-14 -1.950000000000e+01 -3.066217877565e-03 0.000000000000e+00 3.066217877546e-03 1.950000000075e-14 -2.000000000000e+01 -3.070437982391e-03 0.000000000000e+00 3.070437982371e-03 2.000000000075e-14 -1.000000000000e+00 -2.747695196818e-05 0.000000000000e+00 2.747693901344e-05 1.295474362084e-11 -1.500000000000e+00 -2.759919701301e-05 0.000000000000e+00 2.759918405776e-05 1.295524362086e-11 -2.000000000000e+00 -2.769797311489e-05 0.000000000000e+00 2.769796015915e-05 1.295574362086e-11 -2.500000000000e+00 -2.778622618082e-05 0.000000000000e+00 2.778621322457e-05 1.295624362086e-11 -3.000000000000e+00 -2.786800856739e-05 0.000000000000e+00 2.786799561064e-05 1.295674362086e-11 -3.500000000000e+00 -2.794529022809e-05 0.000000000000e+00 2.794527727085e-05 1.295724362086e-11 -4.000000000000e+00 -2.801920672978e-05 0.000000000000e+00 2.801919377203e-05 1.295774362086e-11 -4.500000000000e+00 -2.809048505229e-05 0.000000000000e+00 2.809047209404e-05 1.295824362086e-11 -5.000000000000e+00 -2.815962469757e-05 0.000000000000e+00 2.815961173882e-05 1.295874362086e-11 -5.500000000000e+00 -2.822698676116e-05 0.000000000000e+00 2.822697380191e-05 1.295924362086e-11 -6.000000000000e+00 -2.829284248367e-05 0.000000000000e+00 2.829282952393e-05 1.295974362086e-11 -6.500000000000e+00 -2.835740181434e-05 0.000000000000e+00 2.835738885410e-05 1.296024362086e-11 -7.000000000000e+00 -2.842083123308e-05 0.000000000000e+00 2.842081827234e-05 1.296074362086e-11 -7.500000000000e+00 -2.848326540210e-05 0.000000000000e+00 2.848325244085e-05 1.296124362086e-11 -8.000000000000e+00 -2.854481507861e-05 0.000000000000e+00 2.854480211687e-05 1.296174362086e-11 -8.500000000000e+00 -2.860557266085e-05 0.000000000000e+00 2.860555969861e-05 1.296224362086e-11 -9.000000000000e+00 -2.866561618038e-05 0.000000000000e+00 2.866560321764e-05 1.296274362086e-11 -9.500000000000e+00 -2.872501224241e-05 0.000000000000e+00 2.872499927917e-05 1.296324362086e-11 -1.000000000000e+01 -2.878381823461e-05 0.000000000000e+00 2.878380527087e-05 1.296374362086e-11 -1.050000000000e+01 -2.884208401557e-05 0.000000000000e+00 2.884207105133e-05 1.296424362086e-11 -1.100000000000e+01 -2.889985322524e-05 0.000000000000e+00 2.889984026050e-05 1.296474362086e-11 -1.150000000000e+01 -2.895716431611e-05 0.000000000000e+00 2.895715135086e-05 1.296524362086e-11 -1.200000000000e+01 -2.901405137456e-05 0.000000000000e+00 2.901403840882e-05 1.296574362086e-11 -1.250000000000e+01 -2.907054478232e-05 0.000000000000e+00 2.907053181608e-05 1.296624362086e-11 -1.300000000000e+01 -2.912667175453e-05 0.000000000000e+00 2.912665878779e-05 1.296674362086e-11 -1.350000000000e+01 -2.918245678139e-05 0.000000000000e+00 2.918244381414e-05 1.296724362086e-11 -1.400000000000e+01 -2.923792199375e-05 0.000000000000e+00 2.923790902601e-05 1.296774362086e-11 -1.450000000000e+01 -2.929308746808e-05 0.000000000000e+00 2.929307449983e-05 1.296824362086e-11 -1.500000000000e+01 -2.934797148250e-05 0.000000000000e+00 2.934795851376e-05 1.296874362086e-11 -1.550000000000e+01 -2.940259073341e-05 0.000000000000e+00 2.940257776416e-05 1.296924362086e-11 -1.600000000000e+01 -2.945696051960e-05 0.000000000000e+00 2.945694754986e-05 1.296974362086e-11 -1.650000000000e+01 -2.951109489984e-05 0.000000000000e+00 2.951108192960e-05 1.297024362086e-11 -1.700000000000e+01 -2.956500682832e-05 0.000000000000e+00 2.956499385757e-05 1.297074362086e-11 -1.750000000000e+01 -2.961870827166e-05 0.000000000000e+00 2.961869530042e-05 1.297124362086e-11 -1.800000000000e+01 -2.967221031059e-05 0.000000000000e+00 2.967219733885e-05 1.297174362086e-11 -1.850000000000e+01 -2.972552322845e-05 0.000000000000e+00 2.972551025621e-05 1.297224362086e-11 -1.900000000000e+01 -2.977865658874e-05 0.000000000000e+00 2.977864361599e-05 1.297274362086e-11 -1.950000000000e+01 -2.983161930323e-05 0.000000000000e+00 2.983160632999e-05 1.297324362086e-11 -2.000000000000e+01 -2.988441969207e-05 0.000000000000e+00 2.988440671832e-05 1.297374362086e-11 -1.000000000000e+00 -2.231197851255e-04 0.000000000000e+00 2.231197721707e-04 1.295474362084e-11 -1.500000000000e+00 -2.931918398459e-04 0.000000000000e+00 2.931918268907e-04 1.295524362086e-11 -2.000000000000e+00 -3.404864859991e-04 0.000000000000e+00 3.404864730433e-04 1.295574362086e-11 -2.500000000000e+00 -3.704186905070e-04 0.000000000000e+00 3.704186775508e-04 1.295624362086e-11 -3.000000000000e+00 -3.881452642043e-04 0.000000000000e+00 3.881452512475e-04 1.295674362086e-11 -3.500000000000e+00 -3.979332568302e-04 0.000000000000e+00 3.979332438730e-04 1.295724362086e-11 -4.000000000000e+00 -4.029261123330e-04 0.000000000000e+00 4.029260993753e-04 1.295774362086e-11 -4.500000000000e+00 -4.052451026078e-04 0.000000000000e+00 4.052450896495e-04 1.295824362086e-11 -5.000000000000e+00 -4.062853516687e-04 0.000000000000e+00 4.062853387100e-04 1.295874362086e-11 -5.500000000000e+00 -4.069143915402e-04 0.000000000000e+00 4.069143785810e-04 1.295924362086e-11 -6.000000000000e+00 -4.074514623850e-04 0.000000000000e+00 4.074514494253e-04 1.295974362086e-11 -6.500000000000e+00 -4.079487806094e-04 0.000000000000e+00 4.079487676492e-04 1.296024362086e-11 -7.000000000000e+00 -4.084169359232e-04 0.000000000000e+00 4.084169229624e-04 1.296074362086e-11 -7.500000000000e+00 -4.088614217651e-04 0.000000000000e+00 4.088614088038e-04 1.296124362086e-11 -8.000000000000e+00 -4.092862032290e-04 0.000000000000e+00 4.092861902673e-04 1.296174362086e-11 -8.500000000000e+00 -4.096943325998e-04 0.000000000000e+00 4.096943196375e-04 1.296224362086e-11 -9.000000000000e+00 -4.100882079855e-04 0.000000000000e+00 4.100881950227e-04 1.296274362086e-11 -9.500000000000e+00 -4.104697395191e-04 0.000000000000e+00 4.104697265559e-04 1.296324362086e-11 -1.000000000000e+01 -4.108404677866e-04 0.000000000000e+00 4.108404548228e-04 1.296374362086e-11 -1.050000000000e+01 -4.112016503276e-04 0.000000000000e+00 4.112016373633e-04 1.296424362086e-11 -1.100000000000e+01 -4.115543254928e-04 0.000000000000e+00 4.115543125281e-04 1.296474362086e-11 -1.150000000000e+01 -4.118993600081e-04 0.000000000000e+00 4.118993470429e-04 1.296524362086e-11 -1.200000000000e+01 -4.122374847359e-04 0.000000000000e+00 4.122374717701e-04 1.296574362086e-11 -1.250000000000e+01 -4.125693218276e-04 0.000000000000e+00 4.125693088614e-04 1.296624362086e-11 -1.300000000000e+01 -4.128954055497e-04 0.000000000000e+00 4.128953925830e-04 1.296674362086e-11 -1.350000000000e+01 -4.132161984174e-04 0.000000000000e+00 4.132161854502e-04 1.296724362086e-11 -1.400000000000e+01 -4.135321038193e-04 0.000000000000e+00 4.135320908515e-04 1.296774362086e-11 -1.450000000000e+01 -4.138434759909e-04 0.000000000000e+00 4.138434630227e-04 1.296824362086e-11 -1.500000000000e+01 -4.141506279680e-04 0.000000000000e+00 4.141506149993e-04 1.296874362086e-11 -1.550000000000e+01 -4.144538379851e-04 0.000000000000e+00 4.144538250158e-04 1.296924362086e-11 -1.600000000000e+01 -4.147533546667e-04 0.000000000000e+00 4.147533416969e-04 1.296974362086e-11 -1.650000000000e+01 -4.150494012739e-04 0.000000000000e+00 4.150493883036e-04 1.297024362086e-11 -1.700000000000e+01 -4.153421792039e-04 0.000000000000e+00 4.153421662331e-04 1.297074362086e-11 -1.750000000000e+01 -4.156318708955e-04 0.000000000000e+00 4.156318579242e-04 1.297124362086e-11 -1.800000000000e+01 -4.159186422573e-04 0.000000000000e+00 4.159186292856e-04 1.297174362086e-11 -1.850000000000e+01 -4.162026447109e-04 0.000000000000e+00 4.162026317386e-04 1.297224362086e-11 -1.900000000000e+01 -4.164840169194e-04 0.000000000000e+00 4.164840039467e-04 1.297274362086e-11 -1.950000000000e+01 -4.167628862599e-04 0.000000000000e+00 4.167628732866e-04 1.297324362086e-11 -2.000000000000e+01 -4.170393700826e-04 0.000000000000e+00 4.170393571088e-04 1.297374362086e-11 -1.000000000000e+00 -3.910623748466e-04 0.000000000000e+00 3.910623618918e-04 1.295474362084e-11 -1.500000000000e+00 -5.552822660171e-04 0.000000000000e+00 5.552822530618e-04 1.295524362086e-11 -2.000000000000e+00 -7.004977451531e-04 0.000000000000e+00 7.004977321974e-04 1.295574362086e-11 -2.500000000000e+00 -8.286216457125e-04 0.000000000000e+00 8.286216327562e-04 1.295624362086e-11 -3.000000000000e+00 -9.415238358304e-04 0.000000000000e+00 9.415238228736e-04 1.295674362086e-11 -3.500000000000e+00 -1.040909223553e-03 0.000000000000e+00 1.040909210595e-03 1.295724362086e-11 -4.000000000000e+00 -1.128291839747e-03 0.000000000000e+00 1.128291826789e-03 1.295774362086e-11 -4.500000000000e+00 -1.205006473349e-03 0.000000000000e+00 1.205006460391e-03 1.295824362086e-11 -5.000000000000e+00 -1.272231665881e-03 0.000000000000e+00 1.272231652922e-03 1.295874362086e-11 -5.500000000000e+00 -1.331013501900e-03 0.000000000000e+00 1.331013488940e-03 1.295924362086e-11 -6.000000000000e+00 -1.382286427925e-03 0.000000000000e+00 1.382286414966e-03 1.295974362086e-11 -6.500000000000e+00 -1.426890160997e-03 0.000000000000e+00 1.426890148037e-03 1.296024362086e-11 -7.000000000000e+00 -1.465582872257e-03 0.000000000000e+00 1.465582859296e-03 1.296074362086e-11 -7.500000000000e+00 -1.499051221716e-03 0.000000000000e+00 1.499051208755e-03 1.296124362086e-11 -8.000000000000e+00 -1.527917895549e-03 0.000000000000e+00 1.527917882588e-03 1.296174362086e-11 -8.500000000000e+00 -1.552747248848e-03 0.000000000000e+00 1.552747235886e-03 1.296224362086e-11 -9.000000000000e+00 -1.574049578321e-03 0.000000000000e+00 1.574049565358e-03 1.296274362086e-11 -9.500000000000e+00 -1.592284479371e-03 0.000000000000e+00 1.592284466407e-03 1.296324362086e-11 -1.000000000000e+01 -1.607863682106e-03 0.000000000000e+00 1.607863669143e-03 1.296374362086e-11 -1.050000000000e+01 -1.621153694952e-03 0.000000000000e+00 1.621153681987e-03 1.296424362086e-11 -1.100000000000e+01 -1.632478499261e-03 0.000000000000e+00 1.632478486296e-03 1.296474362086e-11 -1.150000000000e+01 -1.642122435936e-03 0.000000000000e+00 1.642122422971e-03 1.296524362086e-11 -1.200000000000e+01 -1.650333322220e-03 0.000000000000e+00 1.650333309254e-03 1.296574362086e-11 -1.250000000000e+01 -1.657325753819e-03 0.000000000000e+00 1.657325740853e-03 1.296624362086e-11 -1.300000000000e+01 -1.663284508660e-03 0.000000000000e+00 1.663284495693e-03 1.296674362086e-11 -1.350000000000e+01 -1.668367865034e-03 0.000000000000e+00 1.668367852066e-03 1.296724362086e-11 -1.400000000000e+01 -1.672710929070e-03 0.000000000000e+00 1.672710916102e-03 1.296774362086e-11 -1.450000000000e+01 -1.676428607882e-03 0.000000000000e+00 1.676428594914e-03 1.296824362086e-11 -1.500000000000e+01 -1.679618404742e-03 0.000000000000e+00 1.679618391774e-03 1.296874362086e-11 -1.550000000000e+01 -1.682362911387e-03 0.000000000000e+00 1.682362898418e-03 1.296924362086e-11 -1.600000000000e+01 -1.684732010873e-03 0.000000000000e+00 1.684731997903e-03 1.296974362086e-11 -1.650000000000e+01 -1.686784801423e-03 0.000000000000e+00 1.686784788453e-03 1.297024362086e-11 -1.700000000000e+01 -1.688571261299e-03 0.000000000000e+00 1.688571248328e-03 1.297074362086e-11 -1.750000000000e+01 -1.690133680006e-03 0.000000000000e+00 1.690133667034e-03 1.297124362086e-11 -1.800000000000e+01 -1.691507883201e-03 0.000000000000e+00 1.691507870230e-03 1.297174362086e-11 -1.850000000000e+01 -1.692724278704e-03 0.000000000000e+00 1.692724265732e-03 1.297224362086e-11 -1.900000000000e+01 -1.693808749520e-03 0.000000000000e+00 1.693808736547e-03 1.297274362086e-11 -1.950000000000e+01 -1.694783417243e-03 0.000000000000e+00 1.694783404270e-03 1.297324362086e-11 -2.000000000000e+01 -1.695667294895e-03 0.000000000000e+00 1.695667281921e-03 1.297374362086e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_cosym.standard0000644000265600020320000015003612264261473023700 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e-01 -3.437394968472e-06 0.000000000000e+00 3.437394968372e-06 1.000000000000e-16 -6.000000000000e-01 -1.785332483673e-05 0.000000000000e+00 1.785332483613e-05 6.000000000000e-16 -1.100000000000e+00 -2.123033337056e-05 0.000000000000e+00 2.123033336946e-05 1.100000000000e-15 -1.600000000000e+00 -2.135593225074e-05 0.000000000000e+00 2.135593224914e-05 1.600000000000e-15 -2.100000000000e+00 -2.145370332072e-05 0.000000000000e+00 2.145370331862e-05 2.100000000000e-15 -2.600000000000e+00 -2.154045883377e-05 0.000000000000e+00 2.154045883117e-05 2.600000000000e-15 -3.100000000000e+00 -2.162104341010e-05 0.000000000000e+00 2.162104340700e-05 3.100000000000e-15 -3.600000000000e+00 -2.169753238544e-05 0.000000000000e+00 2.169753238184e-05 3.600000000000e-15 -4.100000000000e+00 -2.177104340623e-05 0.000000000000e+00 2.177104340213e-05 4.100000000000e-15 -4.600000000000e+00 -2.184226421033e-05 0.000000000000e+00 2.184226420573e-05 4.600000000000e-15 -5.100000000000e+00 -2.191165549173e-05 0.000000000000e+00 2.191165548663e-05 5.100000000000e-15 -5.600000000000e+00 -2.197954446530e-05 0.000000000000e+00 2.197954445970e-05 5.600000000000e-15 -6.100000000000e+00 -2.204617373385e-05 0.000000000000e+00 2.204617372775e-05 6.100000000000e-15 -6.600000000000e+00 -2.211172918819e-05 0.000000000000e+00 2.211172918159e-05 6.600000000000e-15 -7.100000000000e+00 -2.217635703572e-05 0.000000000000e+00 2.217635702862e-05 7.100000000000e-15 -7.600000000000e+00 -2.224017474686e-05 0.000000000000e+00 2.224017473926e-05 7.600000000000e-15 -8.100000000000e+00 -2.230327839004e-05 0.000000000000e+00 2.230327838194e-05 8.100000000000e-15 -8.600000000000e+00 -2.236574771728e-05 0.000000000000e+00 2.236574770868e-05 8.600000000000e-15 -9.100000000000e+00 -2.242764979193e-05 0.000000000000e+00 2.242764978283e-05 9.100000000000e-15 -9.600000000000e+00 -2.248904164008e-05 0.000000000000e+00 2.248904163048e-05 9.600000000000e-15 -1.010000000000e+01 -2.254997222925e-05 0.000000000000e+00 2.254997221915e-05 1.010000000000e-14 -1.060000000000e+01 -2.261048397215e-05 0.000000000000e+00 2.261048396155e-05 1.060000000000e-14 -1.110000000000e+01 -2.267061388790e-05 0.000000000000e+00 2.267061387680e-05 1.110000000000e-14 -1.160000000000e+01 -2.273039451170e-05 0.000000000000e+00 2.273039450010e-05 1.160000000000e-14 -1.210000000000e+01 -2.278985461634e-05 0.000000000000e+00 2.278985460424e-05 1.210000000000e-14 -1.260000000000e+01 -2.284901979120e-05 0.000000000000e+00 2.284901977860e-05 1.260000000000e-14 -1.310000000000e+01 -2.290791291168e-05 0.000000000000e+00 2.290791289858e-05 1.310000000000e-14 -1.360000000000e+01 -2.296655452328e-05 0.000000000000e+00 2.296655450968e-05 1.360000000000e-14 -1.410000000000e+01 -2.302496315865e-05 0.000000000000e+00 2.302496314455e-05 1.410000000000e-14 -1.460000000000e+01 -2.308315560142e-05 0.000000000000e+00 2.308315558682e-05 1.460000000000e-14 -1.510000000000e+01 -2.314114710714e-05 0.000000000000e+00 2.314114709204e-05 1.510000000000e-14 -1.560000000000e+01 -2.319895158975e-05 0.000000000000e+00 2.319895157415e-05 1.560000000000e-14 -1.610000000000e+01 -2.325658177985e-05 0.000000000000e+00 2.325658176375e-05 1.610000000000e-14 -1.660000000000e+01 -2.331404935974e-05 0.000000000000e+00 2.331404934314e-05 1.660000000000e-14 -1.710000000000e+01 -2.337136507937e-05 0.000000000000e+00 2.337136506227e-05 1.710000000000e-14 -1.760000000000e+01 -2.342853885639e-05 0.000000000000e+00 2.342853883879e-05 1.760000000000e-14 -1.810000000000e+01 -2.348557986277e-05 0.000000000000e+00 2.348557984467e-05 1.810000000000e-14 -1.860000000000e+01 -2.354249660025e-05 0.000000000000e+00 2.354249658165e-05 1.860000000000e-14 -1.910000000000e+01 -2.359929696626e-05 0.000000000000e+00 2.359929694716e-05 1.910000000000e-14 -1.960000000000e+01 -2.365598831177e-05 0.000000000000e+00 2.365598829217e-05 1.960000000000e-14 -2.010000000000e+01 -2.371257749225e-05 0.000000000000e+00 2.371257747215e-05 2.010000000000e-14 -2.060000000000e+01 -2.376907091268e-05 0.000000000000e+00 2.376907089208e-05 2.060000000000e-14 -2.110000000000e+01 -2.382547456742e-05 0.000000000000e+00 2.382547454632e-05 2.110000000000e-14 -2.160000000000e+01 -2.388179407578e-05 0.000000000000e+00 2.388179405418e-05 2.160000000000e-14 -2.210000000000e+01 -2.393803471362e-05 0.000000000000e+00 2.393803469152e-05 2.210000000000e-14 -2.260000000000e+01 -2.399420144170e-05 0.000000000000e+00 2.399420141910e-05 2.260000000000e-14 -2.310000000000e+01 -2.405029893106e-05 0.000000000000e+00 2.405029890796e-05 2.310000000000e-14 -2.360000000000e+01 -2.410633158588e-05 0.000000000000e+00 2.410633156228e-05 2.360000000000e-14 -2.410000000000e+01 -2.416230356405e-05 0.000000000000e+00 2.416230353995e-05 2.410000000000e-14 -2.460000000000e+01 -2.421821879577e-05 0.000000000000e+00 2.421821877117e-05 2.460000000000e-14 -2.510000000000e+01 -2.427408100038e-05 0.000000000000e+00 2.427408097528e-05 2.510000000000e-14 -2.560000000000e+01 -2.432989370166e-05 0.000000000000e+00 2.432989367606e-05 2.560000000000e-14 -2.610000000000e+01 -2.438566024169e-05 0.000000000000e+00 2.438566021559e-05 2.610000000000e-14 -2.660000000000e+01 -2.444138379355e-05 0.000000000000e+00 2.444138376695e-05 2.660000000000e-14 -2.710000000000e+01 -2.449706737280e-05 0.000000000000e+00 2.449706734570e-05 2.710000000000e-14 -2.760000000000e+01 -2.455271384810e-05 0.000000000000e+00 2.455271382050e-05 2.760000000000e-14 -2.810000000000e+01 -2.460832595085e-05 0.000000000000e+00 2.460832592275e-05 2.810000000000e-14 -2.860000000000e+01 -2.466390628409e-05 0.000000000000e+00 2.466390625549e-05 2.860000000000e-14 -2.910000000000e+01 -2.471945733061e-05 0.000000000000e+00 2.471945730151e-05 2.910000000000e-14 -2.960000000000e+01 -2.477498146047e-05 0.000000000000e+00 2.477498143087e-05 2.960000000000e-14 -3.010000000000e+01 -2.483048093796e-05 0.000000000000e+00 2.483048090786e-05 3.010000000000e-14 -1.000000000000e-01 -4.648050463658e-06 0.000000000000e+00 4.648050463558e-06 1.000000000000e-16 -6.000000000000e-01 -2.777330317881e-05 0.000000000000e+00 2.777330317821e-05 6.000000000000e-16 -1.100000000000e+00 -5.070407152837e-05 0.000000000000e+00 5.070407152727e-05 1.100000000000e-15 -1.600000000000e+00 -7.343637161698e-05 0.000000000000e+00 7.343637161538e-05 1.600000000000e-15 -2.100000000000e+00 -9.596597870530e-05 0.000000000000e+00 9.596597870320e-05 2.100000000000e-15 -2.600000000000e+00 -1.182883809059e-04 0.000000000000e+00 1.182883809033e-04 2.600000000000e-15 -3.100000000000e+00 -1.403987238588e-04 0.000000000000e+00 1.403987238557e-04 3.100000000000e-15 -3.600000000000e+00 -1.622917411427e-04 0.000000000000e+00 1.622917411391e-04 3.600000000000e-15 -4.100000000000e+00 -1.839616659152e-04 0.000000000000e+00 1.839616659111e-04 4.100000000000e-15 -4.600000000000e+00 -2.054021198024e-04 0.000000000000e+00 2.054021197978e-04 4.600000000000e-15 -5.100000000000e+00 -2.266059744950e-04 0.000000000000e+00 2.266059744899e-04 5.100000000000e-15 -5.600000000000e+00 -2.475651802368e-04 0.000000000000e+00 2.475651802312e-04 5.600000000000e-15 -6.100000000000e+00 -2.682705533855e-04 0.000000000000e+00 2.682705533794e-04 6.100000000000e-15 -6.600000000000e+00 -2.887115123300e-04 0.000000000000e+00 2.887115123234e-04 6.600000000000e-15 -7.100000000000e+00 -3.088757469680e-04 0.000000000000e+00 3.088757469609e-04 7.100000000000e-15 -7.600000000000e+00 -3.287488012004e-04 0.000000000000e+00 3.287488011928e-04 7.600000000000e-15 -8.100000000000e+00 -3.483135397688e-04 0.000000000000e+00 3.483135397607e-04 8.100000000000e-15 -8.600000000000e+00 -3.675494590899e-04 0.000000000000e+00 3.675494590813e-04 8.600000000000e-15 -9.100000000000e+00 -3.864317847873e-04 0.000000000000e+00 3.864317847782e-04 9.100000000000e-15 -9.600000000000e+00 -4.049302736919e-04 0.000000000000e+00 4.049302736823e-04 9.600000000000e-15 -1.010000000000e+01 -4.230076010997e-04 0.000000000000e+00 4.230076010896e-04 1.010000000000e-14 -1.060000000000e+01 -4.406171590414e-04 0.000000000000e+00 4.406171590308e-04 1.060000000000e-14 -1.110000000000e+01 -4.577000100741e-04 0.000000000000e+00 4.577000100630e-04 1.110000000000e-14 -1.160000000000e+01 -4.741806248978e-04 0.000000000000e+00 4.741806248862e-04 1.160000000000e-14 -1.210000000000e+01 -4.899608799641e-04 0.000000000000e+00 4.899608799520e-04 1.210000000000e-14 -1.260000000000e+01 -5.049116413662e-04 0.000000000000e+00 5.049116413536e-04 1.260000000000e-14 -1.310000000000e+01 -5.188612922153e-04 0.000000000000e+00 5.188612922022e-04 1.310000000000e-14 -1.360000000000e+01 -5.315813861150e-04 0.000000000000e+00 5.315813861014e-04 1.360000000000e-14 -1.410000000000e+01 -5.427730119380e-04 0.000000000000e+00 5.427730119239e-04 1.410000000000e-14 -1.460000000000e+01 -5.520676539413e-04 0.000000000000e+00 5.520676539267e-04 1.460000000000e-14 -1.510000000000e+01 -5.590796867046e-04 0.000000000000e+00 5.590796866895e-04 1.510000000000e-14 -1.560000000000e+01 -5.635822570992e-04 0.000000000000e+00 5.635822570836e-04 1.560000000000e-14 -1.610000000000e+01 -5.659112556303e-04 0.000000000000e+00 5.659112556142e-04 1.610000000000e-14 -1.660000000000e+01 -5.673189779987e-04 0.000000000000e+00 5.673189779821e-04 1.660000000000e-14 -1.710000000000e+01 -5.685240473976e-04 0.000000000000e+00 5.685240473805e-04 1.710000000000e-14 -1.760000000000e+01 -5.696002082035e-04 0.000000000000e+00 5.696002081859e-04 1.760000000000e-14 -1.810000000000e+01 -5.705739254296e-04 0.000000000000e+00 5.705739254115e-04 1.810000000000e-14 -1.860000000000e+01 -5.714649979061e-04 0.000000000000e+00 5.714649978875e-04 1.860000000000e-14 -1.910000000000e+01 -5.722886268493e-04 0.000000000000e+00 5.722886268302e-04 1.910000000000e-14 -1.960000000000e+01 -5.730565776192e-04 0.000000000000e+00 5.730565775996e-04 1.960000000000e-14 -2.010000000000e+01 -5.737780373806e-04 0.000000000000e+00 5.737780373605e-04 2.010000000000e-14 -2.060000000000e+01 -5.744602515893e-04 0.000000000000e+00 5.744602515687e-04 2.060000000000e-14 -2.110000000000e+01 -5.751089942059e-04 0.000000000000e+00 5.751089941848e-04 2.110000000000e-14 -2.160000000000e+01 -5.757289150459e-04 0.000000000000e+00 5.757289150243e-04 2.160000000000e-14 -2.210000000000e+01 -5.763237972930e-04 0.000000000000e+00 5.763237972709e-04 2.210000000000e-14 -2.260000000000e+01 -5.768967495785e-04 0.000000000000e+00 5.768967495559e-04 2.260000000000e-14 -2.310000000000e+01 -5.774503503544e-04 0.000000000000e+00 5.774503503313e-04 2.310000000000e-14 -2.360000000000e+01 -5.779867573411e-04 0.000000000000e+00 5.779867573175e-04 2.360000000000e-14 -2.410000000000e+01 -5.785077912472e-04 0.000000000000e+00 5.785077912231e-04 2.410000000000e-14 -2.460000000000e+01 -5.790150003957e-04 0.000000000000e+00 5.790150003711e-04 2.460000000000e-14 -2.510000000000e+01 -5.795097110635e-04 0.000000000000e+00 5.795097110384e-04 2.510000000000e-14 -2.560000000000e+01 -5.799930670404e-04 0.000000000000e+00 5.799930670148e-04 2.560000000000e-14 -2.610000000000e+01 -5.804660609832e-04 0.000000000000e+00 5.804660609571e-04 2.610000000000e-14 -2.660000000000e+01 -5.809295594711e-04 0.000000000000e+00 5.809295594445e-04 2.660000000000e-14 -2.710000000000e+01 -5.813843231852e-04 0.000000000000e+00 5.813843231581e-04 2.710000000000e-14 -2.760000000000e+01 -5.818310232839e-04 0.000000000000e+00 5.818310232563e-04 2.760000000000e-14 -2.810000000000e+01 -5.822702547848e-04 0.000000000000e+00 5.822702547567e-04 2.810000000000e-14 -2.860000000000e+01 -5.827025475760e-04 0.000000000000e+00 5.827025475474e-04 2.860000000000e-14 -2.910000000000e+01 -5.831283755332e-04 0.000000000000e+00 5.831283755041e-04 2.910000000000e-14 -2.960000000000e+01 -5.835481641164e-04 0.000000000000e+00 5.835481640868e-04 2.960000000000e-14 -3.010000000000e+01 -5.839622967346e-04 0.000000000000e+00 5.839622967045e-04 3.010000000000e-14 -1.000000000000e-01 -4.836956889047e-06 0.000000000000e+00 4.836956888947e-06 1.000000000000e-16 -6.000000000000e-01 -2.891868201921e-05 0.000000000000e+00 2.891868201861e-05 6.000000000000e-16 -1.100000000000e+00 -5.282967770679e-05 0.000000000000e+00 5.282967770569e-05 1.100000000000e-15 -1.600000000000e+00 -7.657136353225e-05 0.000000000000e+00 7.657136353065e-05 1.600000000000e-15 -2.100000000000e+00 -1.001451396522e-04 0.000000000000e+00 1.001451396501e-04 2.100000000000e-15 -2.600000000000e+00 -1.235523889026e-04 0.000000000000e+00 1.235523889000e-04 2.600000000000e-15 -3.100000000000e+00 -1.467944774097e-04 0.000000000000e+00 1.467944774066e-04 3.100000000000e-15 -3.600000000000e+00 -1.698727551510e-04 0.000000000000e+00 1.698727551474e-04 3.600000000000e-15 -4.100000000000e+00 -1.927885565253e-04 0.000000000000e+00 1.927885565212e-04 4.100000000000e-15 -4.600000000000e+00 -2.155432009082e-04 0.000000000000e+00 2.155432009036e-04 4.600000000000e-15 -5.100000000000e+00 -2.381379931762e-04 0.000000000000e+00 2.381379931711e-04 5.100000000000e-15 -5.600000000000e+00 -2.605742241919e-04 0.000000000000e+00 2.605742241863e-04 5.600000000000e-15 -6.100000000000e+00 -2.828531712441e-04 0.000000000000e+00 2.828531712380e-04 6.100000000000e-15 -6.600000000000e+00 -3.049760984396e-04 0.000000000000e+00 3.049760984330e-04 6.600000000000e-15 -7.100000000000e+00 -3.269442570476e-04 0.000000000000e+00 3.269442570405e-04 7.100000000000e-15 -7.600000000000e+00 -3.487588857941e-04 0.000000000000e+00 3.487588857865e-04 7.600000000000e-15 -8.100000000000e+00 -3.704212111094e-04 0.000000000000e+00 3.704212111013e-04 8.100000000000e-15 -8.600000000000e+00 -3.919324473281e-04 0.000000000000e+00 3.919324473195e-04 8.600000000000e-15 -9.100000000000e+00 -4.132937968465e-04 0.000000000000e+00 4.132937968374e-04 9.100000000000e-15 -9.600000000000e+00 -4.345064502379e-04 0.000000000000e+00 4.345064502283e-04 9.600000000000e-15 -1.010000000000e+01 -4.555715863302e-04 0.000000000000e+00 4.555715863201e-04 1.010000000000e-14 -1.060000000000e+01 -4.764903722483e-04 0.000000000000e+00 4.764903722377e-04 1.060000000000e-14 -1.110000000000e+01 -4.972639634254e-04 0.000000000000e+00 4.972639634143e-04 1.110000000000e-14 -1.160000000000e+01 -5.178935035863e-04 0.000000000000e+00 5.178935035747e-04 1.160000000000e-14 -1.210000000000e+01 -5.383801247061e-04 0.000000000000e+00 5.383801246940e-04 1.210000000000e-14 -1.260000000000e+01 -5.587249469476e-04 0.000000000000e+00 5.587249469350e-04 1.260000000000e-14 -1.310000000000e+01 -5.789290785812e-04 0.000000000000e+00 5.789290785681e-04 1.310000000000e-14 -1.360000000000e+01 -5.989936158891e-04 0.000000000000e+00 5.989936158755e-04 1.360000000000e-14 -1.410000000000e+01 -6.189196430576e-04 0.000000000000e+00 6.189196430435e-04 1.410000000000e-14 -1.460000000000e+01 -6.387082320591e-04 0.000000000000e+00 6.387082320445e-04 1.460000000000e-14 -1.510000000000e+01 -6.583604425272e-04 0.000000000000e+00 6.583604425121e-04 1.510000000000e-14 -1.560000000000e+01 -6.778773216256e-04 0.000000000000e+00 6.778773216100e-04 1.560000000000e-14 -1.610000000000e+01 -6.972599039126e-04 0.000000000000e+00 6.972599038965e-04 1.610000000000e-14 -1.660000000000e+01 -7.165092112044e-04 0.000000000000e+00 7.165092111878e-04 1.660000000000e-14 -1.710000000000e+01 -7.356262524354e-04 0.000000000000e+00 7.356262524183e-04 1.710000000000e-14 -1.760000000000e+01 -7.546120235196e-04 0.000000000000e+00 7.546120235020e-04 1.760000000000e-14 -1.810000000000e+01 -7.734675072111e-04 0.000000000000e+00 7.734675071930e-04 1.810000000000e-14 -1.860000000000e+01 -7.921936729664e-04 0.000000000000e+00 7.921936729478e-04 1.860000000000e-14 -1.910000000000e+01 -8.107914768077e-04 0.000000000000e+00 8.107914767886e-04 1.910000000000e-14 -1.960000000000e+01 -8.292618611874e-04 0.000000000000e+00 8.292618611678e-04 1.960000000000e-14 -2.010000000000e+01 -8.476057548548e-04 0.000000000000e+00 8.476057548347e-04 2.010000000000e-14 -2.060000000000e+01 -8.658240727235e-04 0.000000000000e+00 8.658240727029e-04 2.060000000000e-14 -2.110000000000e+01 -8.839177157408e-04 0.000000000000e+00 8.839177157197e-04 2.110000000000e-14 -2.160000000000e+01 -9.018875707582e-04 0.000000000000e+00 9.018875707366e-04 2.160000000000e-14 -2.210000000000e+01 -9.197345104019e-04 0.000000000000e+00 9.197345103798e-04 2.210000000000e-14 -2.260000000000e+01 -9.374593929446e-04 0.000000000000e+00 9.374593929220e-04 2.260000000000e-14 -2.310000000000e+01 -9.550630621762e-04 0.000000000000e+00 9.550630621531e-04 2.310000000000e-14 -2.360000000000e+01 -9.725463472746e-04 0.000000000000e+00 9.725463472510e-04 2.360000000000e-14 -2.410000000000e+01 -9.899100626744e-04 0.000000000000e+00 9.899100626503e-04 2.410000000000e-14 -2.460000000000e+01 -1.007155007935e-03 0.000000000000e+00 1.007155007910e-03 2.460000000000e-14 -2.510000000000e+01 -1.024281967603e-03 0.000000000000e+00 1.024281967578e-03 2.510000000000e-14 -2.560000000000e+01 -1.041291711078e-03 0.000000000000e+00 1.041291711053e-03 2.560000000000e-14 -2.610000000000e+01 -1.058184992466e-03 0.000000000000e+00 1.058184992440e-03 2.610000000000e-14 -2.660000000000e+01 -1.074962550433e-03 0.000000000000e+00 1.074962550406e-03 2.660000000000e-14 -2.710000000000e+01 -1.091625108054e-03 0.000000000000e+00 1.091625108027e-03 2.710000000000e-14 -2.760000000000e+01 -1.108173372653e-03 0.000000000000e+00 1.108173372625e-03 2.760000000000e-14 -2.810000000000e+01 -1.124608035639e-03 0.000000000000e+00 1.124608035611e-03 2.810000000000e-14 -2.860000000000e+01 -1.140929772330e-03 0.000000000000e+00 1.140929772301e-03 2.860000000000e-14 -2.910000000000e+01 -1.157139241773e-03 0.000000000000e+00 1.157139241744e-03 2.910000000000e-14 -2.960000000000e+01 -1.173237086552e-03 0.000000000000e+00 1.173237086522e-03 2.960000000000e-14 -3.010000000000e+01 -1.189223932587e-03 0.000000000000e+00 1.189223932557e-03 3.010000000000e-14 -1.000000000000e-01 -3.507490858250e-06 0.000000000000e+00 3.507490858150e-06 1.000000000000e-16 -6.000000000000e-01 -1.648097979924e-05 0.000000000000e+00 1.648097979864e-05 6.000000000000e-16 -1.100000000000e+00 -1.698149449924e-05 0.000000000000e+00 1.698149449814e-05 1.100000000000e-15 -1.600000000000e+00 -1.708751593846e-05 0.000000000000e+00 1.708751593686e-05 1.600000000000e-15 -2.100000000000e+00 -1.717603485685e-05 0.000000000000e+00 1.717603485475e-05 2.100000000000e-15 -2.600000000000e+00 -1.725708826731e-05 0.000000000000e+00 1.725708826471e-05 2.600000000000e-15 -3.100000000000e+00 -1.733377277755e-05 0.000000000000e+00 1.733377277445e-05 3.100000000000e-15 -3.600000000000e+00 -1.740748739265e-05 0.000000000000e+00 1.740748738905e-05 3.600000000000e-15 -4.100000000000e+00 -1.747901347591e-05 0.000000000000e+00 1.747901347181e-05 4.100000000000e-15 -4.600000000000e+00 -1.754884422122e-05 0.000000000000e+00 1.754884421662e-05 4.600000000000e-15 -5.100000000000e+00 -1.761731616496e-05 0.000000000000e+00 1.761731615986e-05 5.100000000000e-15 -5.600000000000e+00 -1.768467168605e-05 0.000000000000e+00 1.768467168045e-05 5.600000000000e-15 -6.100000000000e+00 -1.775109243753e-05 0.000000000000e+00 1.775109243143e-05 6.100000000000e-15 -6.600000000000e+00 -1.781671880578e-05 0.000000000000e+00 1.781671879918e-05 6.600000000000e-15 -7.100000000000e+00 -1.788166197605e-05 0.000000000000e+00 1.788166196895e-05 7.100000000000e-15 -7.600000000000e+00 -1.794601179075e-05 0.000000000000e+00 1.794601178315e-05 7.600000000000e-15 -8.100000000000e+00 -1.800984207339e-05 0.000000000000e+00 1.800984206529e-05 8.100000000000e-15 -8.600000000000e+00 -1.807321435441e-05 0.000000000000e+00 1.807321434581e-05 8.600000000000e-15 -9.100000000000e+00 -1.813618055037e-05 0.000000000000e+00 1.813618054127e-05 9.100000000000e-15 -9.600000000000e+00 -1.819878493573e-05 0.000000000000e+00 1.819878492613e-05 9.600000000000e-15 -1.010000000000e+01 -1.826106562333e-05 0.000000000000e+00 1.826106561323e-05 1.010000000000e-14 -1.060000000000e+01 -1.832305569544e-05 0.000000000000e+00 1.832305568484e-05 1.060000000000e-14 -1.110000000000e+01 -1.838478408142e-05 0.000000000000e+00 1.838478407032e-05 1.110000000000e-14 -1.160000000000e+01 -1.844627624805e-05 0.000000000000e+00 1.844627623645e-05 1.160000000000e-14 -1.210000000000e+01 -1.850755474919e-05 0.000000000000e+00 1.850755473709e-05 1.210000000000e-14 -1.260000000000e+01 -1.856863966835e-05 0.000000000000e+00 1.856863965575e-05 1.260000000000e-14 -1.310000000000e+01 -1.862954897853e-05 0.000000000000e+00 1.862954896543e-05 1.310000000000e-14 -1.360000000000e+01 -1.869029883762e-05 0.000000000000e+00 1.869029882402e-05 1.360000000000e-14 -1.410000000000e+01 -1.875090383266e-05 0.000000000000e+00 1.875090381856e-05 1.410000000000e-14 -1.460000000000e+01 -1.881137718369e-05 0.000000000000e+00 1.881137716909e-05 1.460000000000e-14 -1.510000000000e+01 -1.887173091480e-05 0.000000000000e+00 1.887173089970e-05 1.510000000000e-14 -1.560000000000e+01 -1.893197599873e-05 0.000000000000e+00 1.893197598313e-05 1.560000000000e-14 -1.610000000000e+01 -1.899212247981e-05 0.000000000000e+00 1.899212246371e-05 1.610000000000e-14 -1.660000000000e+01 -1.905217957913e-05 0.000000000000e+00 1.905217956253e-05 1.660000000000e-14 -1.710000000000e+01 -1.911215578486e-05 0.000000000000e+00 1.911215576776e-05 1.710000000000e-14 -1.760000000000e+01 -1.917205893031e-05 0.000000000000e+00 1.917205891271e-05 1.760000000000e-14 -1.810000000000e+01 -1.923189626169e-05 0.000000000000e+00 1.923189624359e-05 1.810000000000e-14 -1.860000000000e+01 -1.929167449705e-05 0.000000000000e+00 1.929167447845e-05 1.860000000000e-14 -1.910000000000e+01 -1.935139987800e-05 0.000000000000e+00 1.935139985890e-05 1.910000000000e-14 -1.960000000000e+01 -1.941107821500e-05 0.000000000000e+00 1.941107819540e-05 1.960000000000e-14 -2.010000000000e+01 -1.947071492740e-05 0.000000000000e+00 1.947071490730e-05 2.010000000000e-14 -2.060000000000e+01 -1.953031507871e-05 0.000000000000e+00 1.953031505811e-05 2.060000000000e-14 -2.110000000000e+01 -1.958988340808e-05 0.000000000000e+00 1.958988338698e-05 2.110000000000e-14 -2.160000000000e+01 -1.964942435812e-05 0.000000000000e+00 1.964942433652e-05 2.160000000000e-14 -2.210000000000e+01 -1.970894209992e-05 0.000000000000e+00 1.970894207782e-05 2.210000000000e-14 -2.260000000000e+01 -1.976844055528e-05 0.000000000000e+00 1.976844053268e-05 2.260000000000e-14 -2.310000000000e+01 -1.982792341678e-05 0.000000000000e+00 1.982792339368e-05 2.310000000000e-14 -2.360000000000e+01 -1.988739416577e-05 0.000000000000e+00 1.988739414217e-05 2.360000000000e-14 -2.410000000000e+01 -1.994685608862e-05 0.000000000000e+00 1.994685606452e-05 2.410000000000e-14 -2.460000000000e+01 -2.000631229140e-05 0.000000000000e+00 2.000631226680e-05 2.460000000000e-14 -2.510000000000e+01 -2.006576571319e-05 0.000000000000e+00 2.006576568809e-05 2.510000000000e-14 -2.560000000000e+01 -2.012521913813e-05 0.000000000000e+00 2.012521911253e-05 2.560000000000e-14 -2.610000000000e+01 -2.018467520643e-05 0.000000000000e+00 2.018467518033e-05 2.610000000000e-14 -2.660000000000e+01 -2.024413642436e-05 0.000000000000e+00 2.024413639776e-05 2.660000000000e-14 -2.710000000000e+01 -2.030360517337e-05 0.000000000000e+00 2.030360514626e-05 2.710000000000e-14 -2.760000000000e+01 -2.036308371847e-05 0.000000000000e+00 2.036308369087e-05 2.760000000000e-14 -2.810000000000e+01 -2.042257421590e-05 0.000000000000e+00 2.042257418780e-05 2.810000000000e-14 -2.860000000000e+01 -2.048207872010e-05 0.000000000000e+00 2.048207869150e-05 2.860000000000e-14 -2.910000000000e+01 -2.054159919023e-05 0.000000000000e+00 2.054159916113e-05 2.910000000000e-14 -2.960000000000e+01 -2.060113749607e-05 0.000000000000e+00 2.060113746647e-05 2.960000000000e-14 -3.010000000000e+01 -2.066069542350e-05 0.000000000000e+00 2.066069539340e-05 3.010000000000e-14 -1.000000000000e-01 -4.771531088931e-06 0.000000000000e+00 4.771531088831e-06 1.000000000000e-16 -6.000000000000e-01 -2.852036718968e-05 0.000000000000e+00 2.852036718908e-05 6.000000000000e-16 -1.100000000000e+00 -5.208686991786e-05 0.000000000000e+00 5.208686991676e-05 1.100000000000e-15 -1.600000000000e+00 -7.546969431010e-05 0.000000000000e+00 7.546969430850e-05 1.600000000000e-15 -2.100000000000e+00 -9.866743604876e-05 0.000000000000e+00 9.866743604666e-05 2.100000000000e-15 -2.600000000000e+00 -1.216786316720e-04 0.000000000000e+00 1.216786316694e-04 2.600000000000e-15 -3.100000000000e+00 -1.445017530331e-04 0.000000000000e+00 1.445017530300e-04 3.100000000000e-15 -3.600000000000e+00 -1.671351970525e-04 0.000000000000e+00 1.671351970489e-04 3.600000000000e-15 -4.100000000000e+00 -1.895772698748e-04 0.000000000000e+00 1.895772698707e-04 4.100000000000e-15 -4.600000000000e+00 -2.118261649687e-04 0.000000000000e+00 2.118261649641e-04 4.600000000000e-15 -5.100000000000e+00 -2.338799349274e-04 0.000000000000e+00 2.338799349223e-04 5.100000000000e-15 -5.600000000000e+00 -2.557364567642e-04 0.000000000000e+00 2.557364567586e-04 5.600000000000e-15 -6.100000000000e+00 -2.773933903803e-04 0.000000000000e+00 2.773933903742e-04 6.100000000000e-15 -6.600000000000e+00 -2.988481296477e-04 0.000000000000e+00 2.988481296411e-04 6.600000000000e-15 -7.100000000000e+00 -3.200977452086e-04 0.000000000000e+00 3.200977452015e-04 7.100000000000e-15 -7.600000000000e+00 -3.411389176431e-04 0.000000000000e+00 3.411389176355e-04 7.600000000000e-15 -8.100000000000e+00 -3.619678590952e-04 0.000000000000e+00 3.619678590871e-04 8.100000000000e-15 -8.600000000000e+00 -3.825802207376e-04 0.000000000000e+00 3.825802207290e-04 8.600000000000e-15 -9.100000000000e+00 -4.029709825545e-04 0.000000000000e+00 4.029709825454e-04 9.100000000000e-15 -9.600000000000e+00 -4.231343207514e-04 0.000000000000e+00 4.231343207418e-04 9.600000000000e-15 -1.010000000000e+01 -4.430634465494e-04 0.000000000000e+00 4.430634465393e-04 1.010000000000e-14 -1.060000000000e+01 -4.627504080223e-04 0.000000000000e+00 4.627504080117e-04 1.060000000000e-14 -1.110000000000e+01 -4.821858437482e-04 0.000000000000e+00 4.821858437371e-04 1.110000000000e-14 -1.160000000000e+01 -5.013586730049e-04 0.000000000000e+00 5.013586729933e-04 1.160000000000e-14 -1.210000000000e+01 -5.202557015072e-04 0.000000000000e+00 5.202557014951e-04 1.210000000000e-14 -1.260000000000e+01 -5.388611134180e-04 0.000000000000e+00 5.388611134054e-04 1.260000000000e-14 -1.310000000000e+01 -5.571558082865e-04 0.000000000000e+00 5.571558082734e-04 1.310000000000e-14 -1.360000000000e+01 -5.751165236469e-04 0.000000000000e+00 5.751165236333e-04 1.360000000000e-14 -1.410000000000e+01 -5.927146570592e-04 0.000000000000e+00 5.927146570451e-04 1.410000000000e-14 -1.460000000000e+01 -6.099146602864e-04 0.000000000000e+00 6.099146602718e-04 1.460000000000e-14 -1.510000000000e+01 -6.266718150246e-04 0.000000000000e+00 6.266718150095e-04 1.510000000000e-14 -1.560000000000e+01 -6.429291016137e-04 0.000000000000e+00 6.429291015981e-04 1.560000000000e-14 -1.610000000000e+01 -6.586127213132e-04 0.000000000000e+00 6.586127212971e-04 1.610000000000e-14 -1.660000000000e+01 -6.736256074381e-04 0.000000000000e+00 6.736256074215e-04 1.660000000000e-14 -1.710000000000e+01 -6.878379540461e-04 0.000000000000e+00 6.878379540290e-04 1.710000000000e-14 -1.760000000000e+01 -7.010734908200e-04 0.000000000000e+00 7.010734908024e-04 1.760000000000e-14 -1.810000000000e+01 -7.130904271814e-04 0.000000000000e+00 7.130904271633e-04 1.810000000000e-14 -1.860000000000e+01 -7.235586650232e-04 0.000000000000e+00 7.235586650046e-04 1.860000000000e-14 -1.910000000000e+01 -7.320473547433e-04 0.000000000000e+00 7.320473547242e-04 1.910000000000e-14 -1.960000000000e+01 -7.380859278178e-04 0.000000000000e+00 7.380859277982e-04 1.960000000000e-14 -2.010000000000e+01 -7.415989365181e-04 0.000000000000e+00 7.415989364980e-04 2.010000000000e-14 -2.060000000000e+01 -7.439817432806e-04 0.000000000000e+00 7.439817432600e-04 2.060000000000e-14 -2.110000000000e+01 -7.460447631145e-04 0.000000000000e+00 7.460447630934e-04 2.110000000000e-14 -2.160000000000e+01 -7.478633902594e-04 0.000000000000e+00 7.478633902378e-04 2.160000000000e-14 -2.210000000000e+01 -7.494848738843e-04 0.000000000000e+00 7.494848738622e-04 2.210000000000e-14 -2.260000000000e+01 -7.509460995363e-04 0.000000000000e+00 7.509460995137e-04 2.260000000000e-14 -2.310000000000e+01 -7.522759389732e-04 0.000000000000e+00 7.522759389501e-04 2.310000000000e-14 -2.360000000000e+01 -7.534971134932e-04 0.000000000000e+00 7.534971134696e-04 2.360000000000e-14 -2.410000000000e+01 -7.546275785090e-04 0.000000000000e+00 7.546275784849e-04 2.410000000000e-14 -2.460000000000e+01 -7.556816283965e-04 0.000000000000e+00 7.556816283719e-04 2.460000000000e-14 -2.510000000000e+01 -7.566707323953e-04 0.000000000000e+00 7.566707323702e-04 2.510000000000e-14 -2.560000000000e+01 -7.576041697395e-04 0.000000000000e+00 7.576041697139e-04 2.560000000000e-14 -2.610000000000e+01 -7.584895115944e-04 0.000000000000e+00 7.584895115683e-04 2.610000000000e-14 -2.660000000000e+01 -7.593329874402e-04 0.000000000000e+00 7.593329874136e-04 2.660000000000e-14 -2.710000000000e+01 -7.601397647708e-04 0.000000000000e+00 7.601397647437e-04 2.710000000000e-14 -2.760000000000e+01 -7.609141638326e-04 0.000000000000e+00 7.609141638050e-04 2.760000000000e-14 -2.810000000000e+01 -7.616598235835e-04 0.000000000000e+00 7.616598235554e-04 2.810000000000e-14 -2.860000000000e+01 -7.623798308736e-04 0.000000000000e+00 7.623798308450e-04 2.860000000000e-14 -2.910000000000e+01 -7.630768217452e-04 0.000000000000e+00 7.630768217161e-04 2.910000000000e-14 -2.960000000000e+01 -7.637530614636e-04 0.000000000000e+00 7.637530614340e-04 2.960000000000e-14 -3.010000000000e+01 -7.644105082143e-04 0.000000000000e+00 7.644105081842e-04 3.010000000000e-14 -1.000000000000e-01 -4.904803371405e-06 0.000000000000e+00 4.904803371305e-06 1.000000000000e-16 -6.000000000000e-01 -2.932418371491e-05 0.000000000000e+00 2.932418371431e-05 6.000000000000e-16 -1.100000000000e+00 -5.357034797860e-05 0.000000000000e+00 5.357034797750e-05 1.100000000000e-15 -1.600000000000e+00 -7.764490563200e-05 0.000000000000e+00 7.764490563040e-05 1.600000000000e-15 -2.100000000000e+00 -1.015494413293e-04 0.000000000000e+00 1.015494413272e-04 2.100000000000e-15 -2.600000000000e+00 -1.252855169493e-04 0.000000000000e+00 1.252855169467e-04 2.600000000000e-15 -3.100000000000e+00 -1.488546724033e-04 0.000000000000e+00 1.488546724002e-04 3.100000000000e-15 -3.600000000000e+00 -1.722584263727e-04 0.000000000000e+00 1.722584263691e-04 3.600000000000e-15 -4.100000000000e+00 -1.954982770130e-04 0.000000000000e+00 1.954982770089e-04 4.100000000000e-15 -4.600000000000e+00 -2.185757026393e-04 0.000000000000e+00 2.185757026347e-04 4.600000000000e-15 -5.100000000000e+00 -2.414921623894e-04 0.000000000000e+00 2.414921623843e-04 5.100000000000e-15 -5.600000000000e+00 -2.642490968648e-04 0.000000000000e+00 2.642490968592e-04 5.600000000000e-15 -6.100000000000e+00 -2.868479287405e-04 0.000000000000e+00 2.868479287344e-04 6.100000000000e-15 -6.600000000000e+00 -3.092900633448e-04 0.000000000000e+00 3.092900633382e-04 6.600000000000e-15 -7.100000000000e+00 -3.315768892033e-04 0.000000000000e+00 3.315768891962e-04 7.100000000000e-15 -7.600000000000e+00 -3.537097785480e-04 0.000000000000e+00 3.537097785404e-04 7.600000000000e-15 -8.100000000000e+00 -3.756900877882e-04 0.000000000000e+00 3.756900877801e-04 8.100000000000e-15 -8.600000000000e+00 -3.975191579448e-04 0.000000000000e+00 3.975191579362e-04 8.600000000000e-15 -9.100000000000e+00 -4.191983150472e-04 0.000000000000e+00 4.191983150381e-04 9.100000000000e-15 -9.600000000000e+00 -4.407288704931e-04 0.000000000000e+00 4.407288704835e-04 9.600000000000e-15 -1.010000000000e+01 -4.621121213733e-04 0.000000000000e+00 4.621121213632e-04 1.010000000000e-14 -1.060000000000e+01 -4.833493507629e-04 0.000000000000e+00 4.833493507523e-04 1.060000000000e-14 -1.110000000000e+01 -5.044418279800e-04 0.000000000000e+00 5.044418279689e-04 1.110000000000e-14 -1.160000000000e+01 -5.253908088146e-04 0.000000000000e+00 5.253908088030e-04 1.160000000000e-14 -1.210000000000e+01 -5.461975357302e-04 0.000000000000e+00 5.461975357181e-04 1.210000000000e-14 -1.260000000000e+01 -5.668632380397e-04 0.000000000000e+00 5.668632380271e-04 1.260000000000e-14 -1.310000000000e+01 -5.873891320592e-04 0.000000000000e+00 5.873891320461e-04 1.310000000000e-14 -1.360000000000e+01 -6.077764212407e-04 0.000000000000e+00 6.077764212271e-04 1.360000000000e-14 -1.410000000000e+01 -6.280262962880e-04 0.000000000000e+00 6.280262962739e-04 1.410000000000e-14 -1.460000000000e+01 -6.481399352557e-04 0.000000000000e+00 6.481399352411e-04 1.460000000000e-14 -1.510000000000e+01 -6.681185036368e-04 0.000000000000e+00 6.681185036217e-04 1.510000000000e-14 -1.560000000000e+01 -6.879631544368e-04 0.000000000000e+00 6.879631544212e-04 1.560000000000e-14 -1.610000000000e+01 -7.076750282406e-04 0.000000000000e+00 7.076750282245e-04 1.610000000000e-14 -1.660000000000e+01 -7.272552532710e-04 0.000000000000e+00 7.272552532544e-04 1.660000000000e-14 -1.710000000000e+01 -7.467049454406e-04 0.000000000000e+00 7.467049454235e-04 1.710000000000e-14 -1.760000000000e+01 -7.660252084009e-04 0.000000000000e+00 7.660252083833e-04 1.760000000000e-14 -1.810000000000e+01 -7.852171335864e-04 0.000000000000e+00 7.852171335683e-04 1.810000000000e-14 -1.860000000000e+01 -8.042818002576e-04 0.000000000000e+00 8.042818002390e-04 1.860000000000e-14 -1.910000000000e+01 -8.232202755423e-04 0.000000000000e+00 8.232202755232e-04 1.910000000000e-14 -1.960000000000e+01 -8.420336144769e-04 0.000000000000e+00 8.420336144573e-04 1.960000000000e-14 -2.010000000000e+01 -8.607228600470e-04 0.000000000000e+00 8.607228600269e-04 2.010000000000e-14 -2.060000000000e+01 -8.792890432296e-04 0.000000000000e+00 8.792890432090e-04 2.060000000000e-14 -2.110000000000e+01 -8.977331830356e-04 0.000000000000e+00 8.977331830145e-04 2.110000000000e-14 -2.160000000000e+01 -9.160562865543e-04 0.000000000000e+00 9.160562865327e-04 2.160000000000e-14 -2.210000000000e+01 -9.342593489994e-04 0.000000000000e+00 9.342593489773e-04 2.210000000000e-14 -2.260000000000e+01 -9.523433537561e-04 0.000000000000e+00 9.523433537335e-04 2.260000000000e-14 -2.310000000000e+01 -9.703092724309e-04 0.000000000000e+00 9.703092724078e-04 2.310000000000e-14 -2.360000000000e+01 -9.881580649026e-04 0.000000000000e+00 9.881580648790e-04 2.360000000000e-14 -2.410000000000e+01 -1.005890679375e-03 0.000000000000e+00 1.005890679351e-03 2.410000000000e-14 -2.460000000000e+01 -1.023508052434e-03 0.000000000000e+00 1.023508052409e-03 2.460000000000e-14 -2.510000000000e+01 -1.041011109099e-03 0.000000000000e+00 1.041011109074e-03 2.510000000000e-14 -2.560000000000e+01 -1.058400762887e-03 0.000000000000e+00 1.058400762861e-03 2.560000000000e-14 -2.610000000000e+01 -1.075677915866e-03 0.000000000000e+00 1.075677915839e-03 2.610000000000e-14 -2.660000000000e+01 -1.092843458719e-03 0.000000000000e+00 1.092843458692e-03 2.660000000000e-14 -2.710000000000e+01 -1.109898270806e-03 0.000000000000e+00 1.109898270778e-03 2.710000000000e-14 -2.760000000000e+01 -1.126843220222e-03 0.000000000000e+00 1.126843220194e-03 2.760000000000e-14 -2.810000000000e+01 -1.143679163865e-03 0.000000000000e+00 1.143679163837e-03 2.810000000000e-14 -2.860000000000e+01 -1.160406947497e-03 0.000000000000e+00 1.160406947469e-03 2.860000000000e-14 -2.910000000000e+01 -1.177027405806e-03 0.000000000000e+00 1.177027405777e-03 2.910000000000e-14 -2.960000000000e+01 -1.193541362472e-03 0.000000000000e+00 1.193541362442e-03 2.960000000000e-14 -3.010000000000e+01 -1.209949630229e-03 0.000000000000e+00 1.209949630199e-03 3.010000000000e-14 -1.000000000000e-01 -3.326601609589e-06 0.000000000000e+00 3.326601609489e-06 1.000000000000e-16 -6.000000000000e-01 -1.812812808862e-05 0.000000000000e+00 1.812812808802e-05 6.000000000000e-16 -1.100000000000e+00 -2.670219158026e-05 0.000000000000e+00 2.670219157916e-05 1.100000000000e-15 -1.600000000000e+00 -2.749362385539e-05 0.000000000000e+00 2.749362385379e-05 1.600000000000e-15 -2.100000000000e+00 -2.760998987933e-05 0.000000000000e+00 2.760998987723e-05 2.100000000000e-15 -2.600000000000e+00 -2.770669316775e-05 0.000000000000e+00 2.770669316515e-05 2.600000000000e-15 -3.100000000000e+00 -2.779369911983e-05 0.000000000000e+00 2.779369911673e-05 3.100000000000e-15 -3.600000000000e+00 -2.787460052242e-05 0.000000000000e+00 2.787460051882e-05 3.600000000000e-15 -4.100000000000e+00 -2.795120232630e-05 0.000000000000e+00 2.795120232220e-05 4.100000000000e-15 -4.600000000000e+00 -2.802456443260e-05 0.000000000000e+00 2.802456442800e-05 4.600000000000e-15 -5.100000000000e+00 -2.809537338752e-05 0.000000000000e+00 2.809537338242e-05 5.100000000000e-15 -5.600000000000e+00 -2.816410472340e-05 0.000000000000e+00 2.816410471780e-05 5.600000000000e-15 -6.100000000000e+00 -2.823110423039e-05 0.000000000000e+00 2.823110422429e-05 6.100000000000e-15 -6.600000000000e+00 -2.829663281755e-05 0.000000000000e+00 2.829663281095e-05 6.600000000000e-15 -7.100000000000e+00 -2.836089315290e-05 0.000000000000e+00 2.836089314580e-05 7.100000000000e-15 -7.600000000000e+00 -2.842404640524e-05 0.000000000000e+00 2.842404639764e-05 7.600000000000e-15 -8.100000000000e+00 -2.848622325213e-05 0.000000000000e+00 2.848622324403e-05 8.100000000000e-15 -8.600000000000e+00 -2.854753139043e-05 0.000000000000e+00 2.854753138183e-05 8.600000000000e-15 -9.100000000000e+00 -2.860806082079e-05 0.000000000000e+00 2.860806081169e-05 9.100000000000e-15 -9.600000000000e+00 -2.866788766409e-05 0.000000000000e+00 2.866788765449e-05 9.600000000000e-15 -1.010000000000e+01 -2.872707698020e-05 0.000000000000e+00 2.872707697010e-05 1.010000000000e-14 -1.060000000000e+01 -2.878568489065e-05 0.000000000000e+00 2.878568488005e-05 1.060000000000e-14 -1.110000000000e+01 -2.884376020460e-05 0.000000000000e+00 2.884376019350e-05 1.110000000000e-14 -1.160000000000e+01 -2.890134568335e-05 0.000000000000e+00 2.890134567175e-05 1.160000000000e-14 -1.210000000000e+01 -2.895847903688e-05 0.000000000000e+00 2.895847902478e-05 1.210000000000e-14 -1.260000000000e+01 -2.901519371894e-05 0.000000000000e+00 2.901519370634e-05 1.260000000000e-14 -1.310000000000e+01 -2.907151956819e-05 0.000000000000e+00 2.907151955509e-05 1.310000000000e-14 -1.360000000000e+01 -2.912748333035e-05 0.000000000000e+00 2.912748331675e-05 1.360000000000e-14 -1.410000000000e+01 -2.918310908740e-05 0.000000000000e+00 2.918310907330e-05 1.410000000000e-14 -1.460000000000e+01 -2.923841861307e-05 0.000000000000e+00 2.923841859847e-05 1.460000000000e-14 -1.510000000000e+01 -2.929343166980e-05 0.000000000000e+00 2.929343165470e-05 1.510000000000e-14 -1.560000000000e+01 -2.934816625822e-05 0.000000000000e+00 2.934816624262e-05 1.560000000000e-14 -1.610000000000e+01 -2.940263882837e-05 0.000000000000e+00 2.940263881227e-05 1.610000000000e-14 -1.660000000000e+01 -2.945686445948e-05 0.000000000000e+00 2.945686444288e-05 1.660000000000e-14 -1.710000000000e+01 -2.951085701378e-05 0.000000000000e+00 2.951085699668e-05 1.710000000000e-14 -1.760000000000e+01 -2.956462926892e-05 0.000000000000e+00 2.956462925132e-05 1.760000000000e-14 -1.810000000000e+01 -2.961819303243e-05 0.000000000000e+00 2.961819301433e-05 1.810000000000e-14 -1.860000000000e+01 -2.967155924116e-05 0.000000000000e+00 2.967155922256e-05 1.860000000000e-14 -1.910000000000e+01 -2.972473804794e-05 0.000000000000e+00 2.972473802884e-05 1.910000000000e-14 -1.960000000000e+01 -2.977773889758e-05 0.000000000000e+00 2.977773887798e-05 1.960000000000e-14 -2.010000000000e+01 -2.983057059359e-05 0.000000000000e+00 2.983057057349e-05 2.010000000000e-14 -2.060000000000e+01 -2.988324135710e-05 0.000000000000e+00 2.988324133650e-05 2.060000000000e-14 -2.110000000000e+01 -2.993575887901e-05 0.000000000000e+00 2.993575885791e-05 2.110000000000e-14 -2.160000000000e+01 -2.998813036625e-05 0.000000000000e+00 2.998813034465e-05 2.160000000000e-14 -2.210000000000e+01 -3.004036258305e-05 0.000000000000e+00 3.004036256095e-05 2.210000000000e-14 -2.260000000000e+01 -3.009246188779e-05 0.000000000000e+00 3.009246186519e-05 2.260000000000e-14 -2.310000000000e+01 -3.014443426599e-05 0.000000000000e+00 3.014443424289e-05 2.310000000000e-14 -2.360000000000e+01 -3.019628535994e-05 0.000000000000e+00 3.019628533634e-05 2.360000000000e-14 -2.410000000000e+01 -3.024802049542e-05 0.000000000000e+00 3.024802047132e-05 2.410000000000e-14 -2.460000000000e+01 -3.029964470576e-05 0.000000000000e+00 3.029964468116e-05 2.460000000000e-14 -2.510000000000e+01 -3.035116275362e-05 0.000000000000e+00 3.035116272852e-05 2.510000000000e-14 -2.560000000000e+01 -3.040257915077e-05 0.000000000000e+00 3.040257912517e-05 2.560000000000e-14 -2.610000000000e+01 -3.045389817600e-05 0.000000000000e+00 3.045389814990e-05 2.610000000000e-14 -2.660000000000e+01 -3.050512389148e-05 0.000000000000e+00 3.050512386488e-05 2.660000000000e-14 -2.710000000000e+01 -3.055626015761e-05 0.000000000000e+00 3.055626013051e-05 2.710000000000e-14 -2.760000000000e+01 -3.060731064668e-05 0.000000000000e+00 3.060731061908e-05 2.760000000000e-14 -2.810000000000e+01 -3.065827885528e-05 0.000000000000e+00 3.065827882718e-05 2.810000000000e-14 -2.860000000000e+01 -3.070916811573e-05 0.000000000000e+00 3.070916808713e-05 2.860000000000e-14 -2.910000000000e+01 -3.075998160656e-05 0.000000000000e+00 3.075998157746e-05 2.910000000000e-14 -2.960000000000e+01 -3.081072236216e-05 0.000000000000e+00 3.081072233256e-05 2.960000000000e-14 -3.010000000000e+01 -3.086139328168e-05 0.000000000000e+00 3.086139325157e-05 3.010000000000e-14 -1.000000000000e-01 -4.439601160350e-06 0.000000000000e+00 4.439601160250e-06 1.000000000000e-16 -6.000000000000e-01 -2.650446779416e-05 0.000000000000e+00 2.650446779356e-05 6.000000000000e-16 -1.100000000000e+00 -4.833979562585e-05 0.000000000000e+00 4.833979562475e-05 1.100000000000e-15 -1.600000000000e+00 -6.993447885950e-05 0.000000000000e+00 6.993447885790e-05 1.600000000000e-15 -2.100000000000e+00 -9.127627190955e-05 0.000000000000e+00 9.127627190745e-05 2.100000000000e-15 -2.600000000000e+00 -1.123514945704e-04 0.000000000000e+00 1.123514945678e-04 2.600000000000e-15 -3.100000000000e+00 -1.331446858302e-04 0.000000000000e+00 1.331446858271e-04 3.100000000000e-15 -3.600000000000e+00 -1.536381690127e-04 0.000000000000e+00 1.536381690091e-04 3.600000000000e-15 -4.100000000000e+00 -1.738114954755e-04 0.000000000000e+00 1.738114954714e-04 4.100000000000e-15 -4.600000000000e+00 -1.936407272368e-04 0.000000000000e+00 1.936407272322e-04 4.600000000000e-15 -5.100000000000e+00 -2.130975059395e-04 0.000000000000e+00 2.130975059344e-04 5.100000000000e-15 -5.600000000000e+00 -2.321478363187e-04 0.000000000000e+00 2.321478363131e-04 5.600000000000e-15 -6.100000000000e+00 -2.507504852885e-04 0.000000000000e+00 2.507504852824e-04 6.100000000000e-15 -6.600000000000e+00 -2.688548612571e-04 0.000000000000e+00 2.688548612505e-04 6.600000000000e-15 -7.100000000000e+00 -2.863981921860e-04 0.000000000000e+00 2.863981921789e-04 7.100000000000e-15 -7.600000000000e+00 -3.033017715253e-04 0.000000000000e+00 3.033017715177e-04 7.600000000000e-15 -8.100000000000e+00 -3.194660148809e-04 0.000000000000e+00 3.194660148728e-04 8.100000000000e-15 -8.600000000000e+00 -3.347641501603e-04 0.000000000000e+00 3.347641501517e-04 8.600000000000e-15 -9.100000000000e+00 -3.490347804781e-04 0.000000000000e+00 3.490347804690e-04 9.100000000000e-15 -9.600000000000e+00 -3.620748812952e-04 0.000000000000e+00 3.620748812856e-04 9.600000000000e-15 -1.010000000000e+01 -3.736381702891e-04 0.000000000000e+00 3.736381702790e-04 1.010000000000e-14 -1.060000000000e+01 -3.834505157759e-04 0.000000000000e+00 3.834505157653e-04 1.060000000000e-14 -1.110000000000e+01 -3.912617863023e-04 0.000000000000e+00 3.912617862912e-04 1.110000000000e-14 -1.160000000000e+01 -3.969470862647e-04 0.000000000000e+00 3.969470862531e-04 1.160000000000e-14 -1.210000000000e+01 -4.006256203908e-04 0.000000000000e+00 4.006256203787e-04 1.210000000000e-14 -1.260000000000e+01 -4.027093318881e-04 0.000000000000e+00 4.027093318755e-04 1.260000000000e-14 -1.310000000000e+01 -4.038254778446e-04 0.000000000000e+00 4.038254778315e-04 1.310000000000e-14 -1.360000000000e+01 -4.045740769738e-04 0.000000000000e+00 4.045740769602e-04 1.360000000000e-14 -1.410000000000e+01 -4.052165443532e-04 0.000000000000e+00 4.052165443391e-04 1.410000000000e-14 -1.460000000000e+01 -4.058034773885e-04 0.000000000000e+00 4.058034773739e-04 1.460000000000e-14 -1.510000000000e+01 -4.063484318456e-04 0.000000000000e+00 4.063484318305e-04 1.510000000000e-14 -1.560000000000e+01 -4.068593219529e-04 0.000000000000e+00 4.068593219373e-04 1.560000000000e-14 -1.610000000000e+01 -4.073419750267e-04 0.000000000000e+00 4.073419750106e-04 1.610000000000e-14 -1.660000000000e+01 -4.078008945101e-04 0.000000000000e+00 4.078008944935e-04 1.660000000000e-14 -1.710000000000e+01 -4.082396252824e-04 0.000000000000e+00 4.082396252653e-04 1.710000000000e-14 -1.760000000000e+01 -4.086609946841e-04 0.000000000000e+00 4.086609946665e-04 1.760000000000e-14 -1.810000000000e+01 -4.090672847232e-04 0.000000000000e+00 4.090672847051e-04 1.810000000000e-14 -1.860000000000e+01 -4.094603580340e-04 0.000000000000e+00 4.094603580154e-04 1.860000000000e-14 -1.910000000000e+01 -4.098417511524e-04 0.000000000000e+00 4.098417511333e-04 1.910000000000e-14 -1.960000000000e+01 -4.102127443055e-04 0.000000000000e+00 4.102127442859e-04 1.960000000000e-14 -2.010000000000e+01 -4.105744141564e-04 0.000000000000e+00 4.105744141363e-04 2.010000000000e-14 -2.060000000000e+01 -4.109276740705e-04 0.000000000000e+00 4.109276740499e-04 2.060000000000e-14 -2.110000000000e+01 -4.112733051610e-04 0.000000000000e+00 4.112733051399e-04 2.110000000000e-14 -2.160000000000e+01 -4.116119804597e-04 0.000000000000e+00 4.116119804381e-04 2.160000000000e-14 -2.210000000000e+01 -4.119442839133e-04 0.000000000000e+00 4.119442838912e-04 2.210000000000e-14 -2.260000000000e+01 -4.122707254476e-04 0.000000000000e+00 4.122707254250e-04 2.260000000000e-14 -2.310000000000e+01 -4.125917530179e-04 0.000000000000e+00 4.125917529948e-04 2.310000000000e-14 -2.360000000000e+01 -4.129077623285e-04 0.000000000000e+00 4.129077623049e-04 2.360000000000e-14 -2.410000000000e+01 -4.132191047327e-04 0.000000000000e+00 4.132191047086e-04 2.410000000000e-14 -2.460000000000e+01 -4.135260937028e-04 0.000000000000e+00 4.135260936782e-04 2.460000000000e-14 -2.510000000000e+01 -4.138290101655e-04 0.000000000000e+00 4.138290101404e-04 2.510000000000e-14 -2.560000000000e+01 -4.141281069312e-04 0.000000000000e+00 4.141281069056e-04 2.560000000000e-14 -2.610000000000e+01 -4.144236123945e-04 0.000000000000e+00 4.144236123684e-04 2.610000000000e-14 -2.660000000000e+01 -4.147157336446e-04 0.000000000000e+00 4.147157336180e-04 2.660000000000e-14 -2.710000000000e+01 -4.150046590930e-04 0.000000000000e+00 4.150046590659e-04 2.710000000000e-14 -2.760000000000e+01 -4.152905607070e-04 0.000000000000e+00 4.152905606794e-04 2.760000000000e-14 -2.810000000000e+01 -4.155735959170e-04 0.000000000000e+00 4.155735958889e-04 2.810000000000e-14 -2.860000000000e+01 -4.158539092528e-04 0.000000000000e+00 4.158539092242e-04 2.860000000000e-14 -2.910000000000e+01 -4.161316337540e-04 0.000000000000e+00 4.161316337249e-04 2.910000000000e-14 -2.960000000000e+01 -4.164068921915e-04 0.000000000000e+00 4.164068921619e-04 2.960000000000e-14 -3.010000000000e+01 -4.166797981287e-04 0.000000000000e+00 4.166797980986e-04 3.010000000000e-14 -1.000000000000e-01 -4.711232516052e-06 0.000000000000e+00 4.711232515952e-06 1.000000000000e-16 -6.000000000000e-01 -2.816574924707e-05 0.000000000000e+00 2.816574924647e-05 6.000000000000e-16 -1.100000000000e+00 -5.145159388476e-05 0.000000000000e+00 5.145159388366e-05 1.100000000000e-15 -1.600000000000e+00 -7.456978381131e-05 0.000000000000e+00 7.456978380971e-05 1.600000000000e-15 -2.100000000000e+00 -9.752132421757e-05 0.000000000000e+00 9.752132421547e-05 2.100000000000e-15 -2.600000000000e+00 -1.203072086666e-04 0.000000000000e+00 1.203072086640e-04 2.600000000000e-15 -3.100000000000e+00 -1.429284189739e-04 0.000000000000e+00 1.429284189708e-04 3.100000000000e-15 -3.600000000000e+00 -1.653859253744e-04 0.000000000000e+00 1.653859253708e-04 3.600000000000e-15 -4.100000000000e+00 -1.876806867627e-04 0.000000000000e+00 1.876806867586e-04 4.100000000000e-15 -4.600000000000e+00 -2.098136509120e-04 0.000000000000e+00 2.098136509074e-04 4.600000000000e-15 -5.100000000000e+00 -2.317857546289e-04 0.000000000000e+00 2.317857546238e-04 5.100000000000e-15 -5.600000000000e+00 -2.535979238249e-04 0.000000000000e+00 2.535979238193e-04 5.600000000000e-15 -6.100000000000e+00 -2.752510734922e-04 0.000000000000e+00 2.752510734861e-04 6.100000000000e-15 -6.600000000000e+00 -2.967461075822e-04 0.000000000000e+00 2.967461075756e-04 6.600000000000e-15 -7.100000000000e+00 -3.180839187845e-04 0.000000000000e+00 3.180839187774e-04 7.100000000000e-15 -7.600000000000e+00 -3.392653882099e-04 0.000000000000e+00 3.392653882023e-04 7.600000000000e-15 -8.100000000000e+00 -3.602913849802e-04 0.000000000000e+00 3.602913849721e-04 8.100000000000e-15 -8.600000000000e+00 -3.811627657306e-04 0.000000000000e+00 3.811627657220e-04 8.600000000000e-15 -9.100000000000e+00 -4.018803740296e-04 0.000000000000e+00 4.018803740205e-04 9.100000000000e-15 -9.600000000000e+00 -4.224450397227e-04 0.000000000000e+00 4.224450397131e-04 9.600000000000e-15 -1.010000000000e+01 -4.428575782048e-04 0.000000000000e+00 4.428575781947e-04 1.010000000000e-14 -1.060000000000e+01 -4.631187896286e-04 0.000000000000e+00 4.631187896180e-04 1.060000000000e-14 -1.110000000000e+01 -4.832294580519e-04 0.000000000000e+00 4.832294580408e-04 1.110000000000e-14 -1.160000000000e+01 -5.031903505304e-04 0.000000000000e+00 5.031903505188e-04 1.160000000000e-14 -1.210000000000e+01 -5.230022161594e-04 0.000000000000e+00 5.230022161473e-04 1.210000000000e-14 -1.260000000000e+01 -5.426657850677e-04 0.000000000000e+00 5.426657850551e-04 1.260000000000e-14 -1.310000000000e+01 -5.621817673654e-04 0.000000000000e+00 5.621817673523e-04 1.310000000000e-14 -1.360000000000e+01 -5.815508520499e-04 0.000000000000e+00 5.815508520363e-04 1.360000000000e-14 -1.410000000000e+01 -6.007737058684e-04 0.000000000000e+00 6.007737058543e-04 1.410000000000e-14 -1.460000000000e+01 -6.198509721389e-04 0.000000000000e+00 6.198509721243e-04 1.460000000000e-14 -1.510000000000e+01 -6.387832695283e-04 0.000000000000e+00 6.387832695132e-04 1.510000000000e-14 -1.560000000000e+01 -6.575711907874e-04 0.000000000000e+00 6.575711907718e-04 1.560000000000e-14 -1.610000000000e+01 -6.762153014392e-04 0.000000000000e+00 6.762153014231e-04 1.610000000000e-14 -1.660000000000e+01 -6.947161384190e-04 0.000000000000e+00 6.947161384024e-04 1.660000000000e-14 -1.710000000000e+01 -7.130742086633e-04 0.000000000000e+00 7.130742086462e-04 1.710000000000e-14 -1.760000000000e+01 -7.312899876409e-04 0.000000000000e+00 7.312899876233e-04 1.760000000000e-14 -1.810000000000e+01 -7.493639178249e-04 0.000000000000e+00 7.493639178068e-04 1.810000000000e-14 -1.860000000000e+01 -7.672964070972e-04 0.000000000000e+00 7.672964070786e-04 1.860000000000e-14 -1.910000000000e+01 -7.850878270812e-04 0.000000000000e+00 7.850878270621e-04 1.910000000000e-14 -1.960000000000e+01 -8.027385113946e-04 0.000000000000e+00 8.027385113750e-04 1.960000000000e-14 -2.010000000000e+01 -8.202487538164e-04 0.000000000000e+00 8.202487537963e-04 2.010000000000e-14 -2.060000000000e+01 -8.376188063588e-04 0.000000000000e+00 8.376188063382e-04 2.060000000000e-14 -2.110000000000e+01 -8.548488772352e-04 0.000000000000e+00 8.548488772141e-04 2.110000000000e-14 -2.160000000000e+01 -8.719391287155e-04 0.000000000000e+00 8.719391286939e-04 2.160000000000e-14 -2.210000000000e+01 -8.888896748587e-04 0.000000000000e+00 8.888896748366e-04 2.210000000000e-14 -2.260000000000e+01 -9.057005791095e-04 0.000000000000e+00 9.057005790869e-04 2.260000000000e-14 -2.310000000000e+01 -9.223718517506e-04 0.000000000000e+00 9.223718517275e-04 2.310000000000e-14 -2.360000000000e+01 -9.389034471945e-04 0.000000000000e+00 9.389034471709e-04 2.360000000000e-14 -2.410000000000e+01 -9.552952611040e-04 0.000000000000e+00 9.552952610799e-04 2.410000000000e-14 -2.460000000000e+01 -9.715471273243e-04 0.000000000000e+00 9.715471272997e-04 2.460000000000e-14 -2.510000000000e+01 -9.876588146140e-04 0.000000000000e+00 9.876588145889e-04 2.510000000000e-14 -2.560000000000e+01 -1.003630023155e-03 0.000000000000e+00 1.003630023129e-03 2.560000000000e-14 -2.610000000000e+01 -1.019460370546e-03 0.000000000000e+00 1.019460370520e-03 2.610000000000e-14 -2.660000000000e+01 -1.035149428259e-03 0.000000000000e+00 1.035149428232e-03 2.660000000000e-14 -2.710000000000e+01 -1.050696657700e-03 0.000000000000e+00 1.050696657673e-03 2.710000000000e-14 -2.760000000000e+01 -1.066101444824e-03 0.000000000000e+00 1.066101444796e-03 2.760000000000e-14 -2.810000000000e+01 -1.081363085621e-03 0.000000000000e+00 1.081363085593e-03 2.810000000000e-14 -2.860000000000e+01 -1.096480780899e-03 0.000000000000e+00 1.096480780870e-03 2.860000000000e-14 -2.910000000000e+01 -1.111453630708e-03 0.000000000000e+00 1.111453630679e-03 2.910000000000e-14 -2.960000000000e+01 -1.126280628374e-03 0.000000000000e+00 1.126280628345e-03 2.960000000000e-14 -3.010000000000e+01 -1.140960654112e-03 0.000000000000e+00 1.140960654082e-03 3.010000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_lg2.standard0000644000265600020320000010243012264261473023225 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.003387929384e-10 0.000000000000e+00 1.003367804110e-10 2.012500000000e-15 -1.500000000000e+00 -2.463157607966e-07 0.000000000000e+00 2.463157587840e-07 2.012500000000e-15 -2.000000000000e+00 -2.601797205481e-06 0.000000000000e+00 2.601797203468e-06 2.012500000000e-15 -2.500000000000e+00 -7.982802780642e-06 0.000000000000e+00 7.982802778630e-06 2.012500000000e-15 -3.000000000000e+00 -1.650934606093e-05 0.000000000000e+00 1.650934605892e-05 2.012500000000e-15 -3.500000000000e+00 -2.815883793121e-05 0.000000000000e+00 2.815883792920e-05 2.012500000000e-15 -4.000000000000e+00 -4.253031962223e-05 0.000000000000e+00 4.253031962022e-05 2.012500000000e-15 -4.500000000000e+00 -5.797497916710e-05 0.000000000000e+00 5.797497916509e-05 2.012500000000e-15 -5.000000000000e+00 -7.355526208772e-05 0.000000000000e+00 7.355526208571e-05 2.012500000000e-15 -5.500000000000e+00 -8.882477960889e-05 0.000000000000e+00 8.882477960687e-05 2.012500000000e-15 -6.000000000000e+00 -1.035367101174e-04 0.000000000000e+00 1.035367101154e-04 2.012500000000e-15 -6.500000000000e+00 -1.175685052703e-04 0.000000000000e+00 1.175685052683e-04 2.012500000000e-15 -7.000000000000e+00 -1.308747546462e-04 0.000000000000e+00 1.308747546442e-04 2.012500000000e-15 -7.500000000000e+00 -1.434559417229e-04 0.000000000000e+00 1.434559417209e-04 2.012500000000e-15 -8.000000000000e+00 -1.553382036983e-04 0.000000000000e+00 1.553382036963e-04 2.012500000000e-15 -8.500000000000e+00 -1.665606819740e-04 0.000000000000e+00 1.665606819720e-04 2.012500000000e-15 -9.000000000000e+00 -1.771679071349e-04 0.000000000000e+00 1.771679071329e-04 2.012500000000e-15 -9.500000000000e+00 -1.872053950095e-04 0.000000000000e+00 1.872053950075e-04 2.012500000000e-15 -1.000000000000e+01 -1.967172269019e-04 0.000000000000e+00 1.967172268999e-04 2.012500000000e-15 -1.050000000000e+01 -2.057448240513e-04 0.000000000000e+00 2.057448240493e-04 2.012500000000e-15 -1.100000000000e+01 -2.143264229339e-04 0.000000000000e+00 2.143264229319e-04 2.012500000000e-15 -1.150000000000e+01 -2.224969497368e-04 0.000000000000e+00 2.224969497348e-04 2.012500000000e-15 -1.200000000000e+01 -2.302881125713e-04 0.000000000000e+00 2.302881125693e-04 2.012500000000e-15 -1.250000000000e+01 -2.377286039831e-04 0.000000000000e+00 2.377286039810e-04 2.012500000000e-15 -1.300000000000e+01 -2.448443512676e-04 0.000000000000e+00 2.448443512656e-04 2.012500000000e-15 -1.350000000000e+01 -2.516587791554e-04 0.000000000000e+00 2.516587791534e-04 2.012500000000e-15 -1.400000000000e+01 -2.581930655648e-04 0.000000000000e+00 2.581930655628e-04 2.012500000000e-15 -1.450000000000e+01 -2.644663806435e-04 0.000000000000e+00 2.644663806415e-04 2.012500000000e-15 -1.500000000000e+01 -2.704961048478e-04 0.000000000000e+00 2.704961048458e-04 2.012500000000e-15 -1.550000000000e+01 -2.762980249463e-04 0.000000000000e+00 2.762980249443e-04 2.012500000000e-15 -1.600000000000e+01 -2.818865085452e-04 0.000000000000e+00 2.818865085432e-04 2.012500000000e-15 -1.650000000000e+01 -2.872746585948e-04 0.000000000000e+00 2.872746585928e-04 2.012500000000e-15 -1.700000000000e+01 -2.924744525977e-04 0.000000000000e+00 2.924744525957e-04 2.012500000000e-15 -1.750000000000e+01 -2.974968507885e-04 0.000000000000e+00 2.974968507865e-04 2.012500000000e-15 -1.800000000000e+01 -3.023519202715e-04 0.000000000000e+00 3.023519202695e-04 2.012500000000e-15 -1.850000000000e+01 -3.070489153509e-04 0.000000000000e+00 3.070489153488e-04 2.012500000000e-15 -1.900000000000e+01 -3.115963628447e-04 0.000000000000e+00 3.115963628427e-04 2.012500000000e-15 -1.950000000000e+01 -3.160021344347e-04 0.000000000000e+00 3.160021344327e-04 2.012500000000e-15 -2.000000000000e+01 -3.202735105909e-04 0.000000000000e+00 3.202735105889e-04 2.012500000000e-15 -1.000000000000e+00 -1.017781299777e-10 0.000000000000e+00 1.017731171459e-10 5.012500000000e-15 -1.500000000000e+00 -2.481289676916e-07 0.000000000000e+00 2.481289626790e-07 5.012500000000e-15 -2.000000000000e+00 -2.612657670054e-06 0.000000000000e+00 2.612657665041e-06 5.012500000000e-15 -2.500000000000e+00 -8.010059723517e-06 0.000000000000e+00 8.010059718505e-06 5.012500000000e-15 -3.000000000000e+00 -1.656196924917e-05 0.000000000000e+00 1.656196924416e-05 5.012500000000e-15 -3.500000000000e+00 -2.824900480753e-05 0.000000000000e+00 2.824900480252e-05 5.012500000000e-15 -4.000000000000e+00 -4.299792060984e-05 0.000000000000e+00 4.299792060483e-05 5.012500000000e-15 -4.500000000000e+00 -6.071007222980e-05 0.000000000000e+00 6.071007222479e-05 5.012500000000e-15 -5.000000000000e+00 -8.127447948830e-05 0.000000000000e+00 8.127447948329e-05 5.012500000000e-15 -5.500000000000e+00 -1.045744476156e-04 0.000000000000e+00 1.045744476106e-04 5.012500000000e-15 -6.000000000000e+00 -1.303395795409e-04 0.000000000000e+00 1.303395795359e-04 5.012500000000e-15 -6.500000000000e+00 -1.576248306789e-04 0.000000000000e+00 1.576248306738e-04 5.012500000000e-15 -7.000000000000e+00 -1.857013101155e-04 0.000000000000e+00 1.857013101105e-04 5.012500000000e-15 -7.500000000000e+00 -2.140558396713e-04 0.000000000000e+00 2.140558396663e-04 5.012500000000e-15 -8.000000000000e+00 -2.422615028187e-04 0.000000000000e+00 2.422615028137e-04 5.012500000000e-15 -8.500000000000e+00 -2.699769490636e-04 0.000000000000e+00 2.699769490585e-04 5.012500000000e-15 -9.000000000000e+00 -2.969466335868e-04 0.000000000000e+00 2.969466335818e-04 5.012500000000e-15 -9.500000000000e+00 -3.229934255708e-04 0.000000000000e+00 3.229934255658e-04 5.012500000000e-15 -1.000000000000e+01 -3.480065090613e-04 0.000000000000e+00 3.480065090562e-04 5.012500000000e-15 -1.050000000000e+01 -3.719278594640e-04 0.000000000000e+00 3.719278594590e-04 5.012500000000e-15 -1.100000000000e+01 -3.947393940699e-04 0.000000000000e+00 3.947393940648e-04 5.012500000000e-15 -1.150000000000e+01 -4.164518309216e-04 0.000000000000e+00 4.164518309165e-04 5.012500000000e-15 -1.200000000000e+01 -4.370956117359e-04 0.000000000000e+00 4.370956117309e-04 5.012500000000e-15 -1.250000000000e+01 -4.567138506962e-04 0.000000000000e+00 4.567138506912e-04 5.012500000000e-15 -1.300000000000e+01 -4.753570698981e-04 0.000000000000e+00 4.753570698931e-04 5.012500000000e-15 -1.350000000000e+01 -4.930794058977e-04 0.000000000000e+00 4.930794058927e-04 5.012500000000e-15 -1.400000000000e+01 -5.099359695132e-04 0.000000000000e+00 5.099359695082e-04 5.012500000000e-15 -1.450000000000e+01 -5.259810764706e-04 0.000000000000e+00 5.259810764656e-04 5.012500000000e-15 -1.500000000000e+01 -5.412671160828e-04 0.000000000000e+00 5.412671160778e-04 5.012500000000e-15 -1.550000000000e+01 -5.558438754170e-04 0.000000000000e+00 5.558438754120e-04 5.012500000000e-15 -1.600000000000e+01 -5.697581808694e-04 0.000000000000e+00 5.697581808644e-04 5.012500000000e-15 -1.650000000000e+01 -5.830537554833e-04 0.000000000000e+00 5.830537554782e-04 5.012500000000e-15 -1.700000000000e+01 -5.957712187496e-04 0.000000000000e+00 5.957712187446e-04 5.012500000000e-15 -1.750000000000e+01 -6.079481770532e-04 0.000000000000e+00 6.079481770482e-04 5.012500000000e-15 -1.800000000000e+01 -6.196193686901e-04 0.000000000000e+00 6.196193686850e-04 5.012500000000e-15 -1.850000000000e+01 -6.308168387743e-04 0.000000000000e+00 6.308168387693e-04 5.012500000000e-15 -1.900000000000e+01 -6.415701274664e-04 0.000000000000e+00 6.415701274614e-04 5.012500000000e-15 -1.950000000000e+01 -6.519064606569e-04 0.000000000000e+00 6.519064606519e-04 5.012500000000e-15 -2.000000000000e+01 -6.618509362062e-04 0.000000000000e+00 6.618509362012e-04 5.012500000000e-15 -1.000000000000e+00 -1.040752779097e-10 0.000000000000e+00 1.040652652349e-10 1.001250000000e-14 -1.500000000000e+00 -2.508259862271e-07 0.000000000000e+00 2.508259762146e-07 1.001250000000e-14 -2.000000000000e+00 -2.627209911222e-06 0.000000000000e+00 2.627209901210e-06 1.001250000000e-14 -2.500000000000e+00 -8.043676389408e-06 0.000000000000e+00 8.043676379395e-06 1.001250000000e-14 -3.000000000000e+00 -1.662109547182e-05 0.000000000000e+00 1.662109546181e-05 1.001250000000e-14 -3.500000000000e+00 -2.834000975884e-05 0.000000000000e+00 2.834000974883e-05 1.001250000000e-14 -4.000000000000e+00 -4.312769433975e-05 0.000000000000e+00 4.312769432974e-05 1.001250000000e-14 -4.500000000000e+00 -6.088658518908e-05 0.000000000000e+00 6.088658517906e-05 1.001250000000e-14 -5.000000000000e+00 -8.150717959509e-05 0.000000000000e+00 8.150717958508e-05 1.001250000000e-14 -5.500000000000e+00 -1.048747956322e-04 0.000000000000e+00 1.048747956222e-04 1.001250000000e-14 -6.000000000000e+00 -1.308734153821e-04 0.000000000000e+00 1.308734153721e-04 1.001250000000e-14 -6.500000000000e+00 -1.593879659981e-04 0.000000000000e+00 1.593879659881e-04 1.001250000000e-14 -7.000000000000e+00 -1.903056897216e-04 0.000000000000e+00 1.903056897116e-04 1.001250000000e-14 -7.500000000000e+00 -2.235169333610e-04 0.000000000000e+00 2.235169333509e-04 1.001250000000e-14 -8.000000000000e+00 -2.589083667543e-04 0.000000000000e+00 2.589083667443e-04 1.001250000000e-14 -8.500000000000e+00 -2.961476421441e-04 0.000000000000e+00 2.961476421341e-04 1.001250000000e-14 -9.000000000000e+00 -3.346752431910e-04 0.000000000000e+00 3.346752431810e-04 1.001250000000e-14 -9.500000000000e+00 -3.740882870981e-04 0.000000000000e+00 3.740882870881e-04 1.001250000000e-14 -1.000000000000e+01 -4.140204330238e-04 0.000000000000e+00 4.140204330138e-04 1.001250000000e-14 -1.050000000000e+01 -4.541137999721e-04 0.000000000000e+00 4.541137999621e-04 1.001250000000e-14 -1.100000000000e+01 -4.940254531917e-04 0.000000000000e+00 4.940254531817e-04 1.001250000000e-14 -1.150000000000e+01 -5.334392030910e-04 0.000000000000e+00 5.334392030810e-04 1.001250000000e-14 -1.200000000000e+01 -5.720769285432e-04 0.000000000000e+00 5.720769285332e-04 1.001250000000e-14 -1.250000000000e+01 -6.097067205682e-04 0.000000000000e+00 6.097067205582e-04 1.001250000000e-14 -1.300000000000e+01 -6.461467306731e-04 0.000000000000e+00 6.461467306631e-04 1.001250000000e-14 -1.350000000000e+01 -6.812647916738e-04 0.000000000000e+00 6.812647916638e-04 1.001250000000e-14 -1.400000000000e+01 -7.149747176189e-04 0.000000000000e+00 7.149747176088e-04 1.001250000000e-14 -1.450000000000e+01 -7.472304803125e-04 0.000000000000e+00 7.472304803025e-04 1.001250000000e-14 -1.500000000000e+01 -7.780193933028e-04 0.000000000000e+00 7.780193932928e-04 1.001250000000e-14 -1.550000000000e+01 -8.073551830083e-04 0.000000000000e+00 8.073551829983e-04 1.001250000000e-14 -1.600000000000e+01 -8.352715339558e-04 0.000000000000e+00 8.352715339458e-04 1.001250000000e-14 -1.650000000000e+01 -8.618164366067e-04 0.000000000000e+00 8.618164365967e-04 1.001250000000e-14 -1.700000000000e+01 -8.870474698630e-04 0.000000000000e+00 8.870474698529e-04 1.001250000000e-14 -1.750000000000e+01 -9.110280178053e-04 0.000000000000e+00 9.110280177953e-04 1.001250000000e-14 -1.800000000000e+01 -9.338243415532e-04 0.000000000000e+00 9.338243415432e-04 1.001250000000e-14 -1.850000000000e+01 -9.555033887757e-04 0.000000000000e+00 9.555033887657e-04 1.001250000000e-14 -1.900000000000e+01 -9.761312122239e-04 0.000000000000e+00 9.761312122139e-04 1.001250000000e-14 -1.950000000000e+01 -9.957718739846e-04 0.000000000000e+00 9.957718739746e-04 1.001250000000e-14 -2.000000000000e+01 -1.014486726064e-03 0.000000000000e+00 1.014486726054e-03 1.001250000000e-14 -1.000000000000e+00 -4.581545646337e-14 0.000000000000e+00 4.381546044125e-14 2.000000000938e-15 -1.500000000000e+00 -2.365125929902e-08 0.000000000000e+00 2.365125729905e-08 2.000000000938e-15 -2.000000000000e+00 -2.073990606328e-06 0.000000000000e+00 2.073990604328e-06 2.000000000938e-15 -2.500000000000e+00 -8.768612162296e-06 0.000000000000e+00 8.768612160296e-06 2.000000000938e-15 -3.000000000000e+00 -2.052052084908e-05 0.000000000000e+00 2.052052084708e-05 2.000000000938e-15 -3.500000000000e+00 -3.733299638180e-05 0.000000000000e+00 3.733299637980e-05 2.000000000938e-15 -4.000000000000e+00 -5.892426204053e-05 0.000000000000e+00 5.892426203853e-05 2.000000000938e-15 -4.500000000000e+00 -8.265980635737e-05 0.000000000000e+00 8.265980635537e-05 2.000000000938e-15 -5.000000000000e+00 -1.063137753312e-04 0.000000000000e+00 1.063137753292e-04 2.000000000938e-15 -5.500000000000e+00 -1.290742437429e-04 0.000000000000e+00 1.290742437409e-04 2.000000000938e-15 -6.000000000000e+00 -1.505433189910e-04 0.000000000000e+00 1.505433189890e-04 2.000000000938e-15 -6.500000000000e+00 -1.705710186610e-04 0.000000000000e+00 1.705710186590e-04 2.000000000938e-15 -7.000000000000e+00 -1.891501082001e-04 0.000000000000e+00 1.891501081981e-04 2.000000000938e-15 -7.500000000000e+00 -2.063481379899e-04 0.000000000000e+00 2.063481379879e-04 2.000000000938e-15 -8.000000000000e+00 -2.222665902707e-04 0.000000000000e+00 2.222665902687e-04 2.000000000938e-15 -8.500000000000e+00 -2.370178557220e-04 0.000000000000e+00 2.370178557200e-04 2.000000000938e-15 -9.000000000000e+00 -2.507130994388e-04 0.000000000000e+00 2.507130994368e-04 2.000000000938e-15 -9.500000000000e+00 -2.634564224804e-04 0.000000000000e+00 2.634564224784e-04 2.000000000938e-15 -1.000000000000e+01 -2.753425030871e-04 0.000000000000e+00 2.753425030851e-04 2.000000000938e-15 -1.050000000000e+01 -2.864560753195e-04 0.000000000000e+00 2.864560753175e-04 2.000000000938e-15 -1.100000000000e+01 -2.968723200440e-04 0.000000000000e+00 2.968723200420e-04 2.000000000938e-15 -1.150000000000e+01 -3.066576619347e-04 0.000000000000e+00 3.066576619327e-04 2.000000000938e-15 -1.200000000000e+01 -3.158707038164e-04 0.000000000000e+00 3.158707038144e-04 2.000000000938e-15 -1.250000000000e+01 -3.245631618589e-04 0.000000000000e+00 3.245631618569e-04 2.000000000938e-15 -1.300000000000e+01 -3.327807373330e-04 0.000000000000e+00 3.327807373310e-04 2.000000000938e-15 -1.350000000000e+01 -3.405638992453e-04 0.000000000000e+00 3.405638992433e-04 2.000000000938e-15 -1.400000000000e+01 -3.479485721460e-04 0.000000000000e+00 3.479485721440e-04 2.000000000938e-15 -1.450000000000e+01 -3.549667331944e-04 0.000000000000e+00 3.549667331924e-04 2.000000000938e-15 -1.500000000000e+01 -3.616469268549e-04 0.000000000000e+00 3.616469268529e-04 2.000000000938e-15 -1.550000000000e+01 -3.680147069915e-04 0.000000000000e+00 3.680147069895e-04 2.000000000938e-15 -1.600000000000e+01 -3.740930160650e-04 0.000000000000e+00 3.740930160630e-04 2.000000000938e-15 -1.650000000000e+01 -3.799025103935e-04 0.000000000000e+00 3.799025103915e-04 2.000000000938e-15 -1.700000000000e+01 -3.854618394327e-04 0.000000000000e+00 3.854618394307e-04 2.000000000938e-15 -1.750000000000e+01 -3.907878859761e-04 0.000000000000e+00 3.907878859741e-04 2.000000000938e-15 -1.800000000000e+01 -3.958959731829e-04 0.000000000000e+00 3.958959731809e-04 2.000000000938e-15 -1.850000000000e+01 -4.008000434426e-04 0.000000000000e+00 4.008000434406e-04 2.000000000938e-15 -1.900000000000e+01 -4.055128133088e-04 0.000000000000e+00 4.055128133068e-04 2.000000000938e-15 -1.950000000000e+01 -4.100459119928e-04 0.000000000000e+00 4.100459119908e-04 2.000000000938e-15 -2.000000000000e+01 -4.144099823541e-04 0.000000000000e+00 4.144099823521e-04 2.000000000938e-15 -1.000000000000e+00 -4.962761972205e-14 0.000000000000e+00 4.462731515469e-14 5.000000000938e-15 -1.500000000000e+00 -2.401031779778e-08 0.000000000000e+00 2.401031279770e-08 5.000000000938e-15 -2.000000000000e+00 -2.084205186220e-06 0.000000000000e+00 2.084205181219e-06 5.000000000938e-15 -2.500000000000e+00 -8.800735440459e-06 0.000000000000e+00 8.800735435459e-06 5.000000000938e-15 -3.000000000000e+00 -2.058838907499e-05 0.000000000000e+00 2.058838906999e-05 5.000000000938e-15 -3.500000000000e+00 -3.745445267317e-05 0.000000000000e+00 3.745445266817e-05 5.000000000938e-15 -4.000000000000e+00 -5.925059557170e-05 0.000000000000e+00 5.925059556670e-05 5.000000000938e-15 -4.500000000000e+00 -8.575206046753e-05 0.000000000000e+00 8.575206046253e-05 5.000000000938e-15 -5.000000000000e+00 -1.166987112428e-04 0.000000000000e+00 1.166987112378e-04 5.000000000938e-15 -5.500000000000e+00 -1.518186318389e-04 0.000000000000e+00 1.518186318339e-04 5.000000000938e-15 -6.000000000000e+00 -1.907489064535e-04 0.000000000000e+00 1.907489064485e-04 5.000000000938e-15 -6.500000000000e+00 -2.317711978966e-04 0.000000000000e+00 2.317711978916e-04 5.000000000938e-15 -7.000000000000e+00 -2.732825335606e-04 0.000000000000e+00 2.732825335556e-04 5.000000000938e-15 -7.500000000000e+00 -3.143545095809e-04 0.000000000000e+00 3.143545095759e-04 5.000000000938e-15 -8.000000000000e+00 -3.542742910902e-04 0.000000000000e+00 3.542742910852e-04 5.000000000938e-15 -8.500000000000e+00 -3.925357482151e-04 0.000000000000e+00 3.925357482101e-04 5.000000000938e-15 -9.000000000000e+00 -4.288253491160e-04 0.000000000000e+00 4.288253491110e-04 5.000000000938e-15 -9.500000000000e+00 -4.629886159033e-04 0.000000000000e+00 4.629886158983e-04 5.000000000938e-15 -1.000000000000e+01 -4.949899106321e-04 0.000000000000e+00 4.949899106271e-04 5.000000000938e-15 -1.050000000000e+01 -5.248749780563e-04 0.000000000000e+00 5.248749780513e-04 5.000000000938e-15 -1.100000000000e+01 -5.527404384535e-04 0.000000000000e+00 5.527404384485e-04 5.000000000938e-15 -1.150000000000e+01 -5.787110598163e-04 0.000000000000e+00 5.787110598113e-04 5.000000000938e-15 -1.200000000000e+01 -6.029239623068e-04 0.000000000000e+00 6.029239623018e-04 5.000000000938e-15 -1.250000000000e+01 -6.255183040730e-04 0.000000000000e+00 6.255183040680e-04 5.000000000938e-15 -1.300000000000e+01 -6.466289756907e-04 0.000000000000e+00 6.466289756857e-04 5.000000000938e-15 -1.350000000000e+01 -6.663830621900e-04 0.000000000000e+00 6.663830621850e-04 5.000000000938e-15 -1.400000000000e+01 -6.848981276676e-04 0.000000000000e+00 6.848981276626e-04 5.000000000938e-15 -1.450000000000e+01 -7.022816482279e-04 0.000000000000e+00 7.022816482229e-04 5.000000000938e-15 -1.500000000000e+01 -7.186311338442e-04 0.000000000000e+00 7.186311338392e-04 5.000000000938e-15 -1.550000000000e+01 -7.340346371649e-04 0.000000000000e+00 7.340346371599e-04 5.000000000938e-15 -1.600000000000e+01 -7.485714569166e-04 0.000000000000e+00 7.485714569116e-04 5.000000000938e-15 -1.650000000000e+01 -7.623129172402e-04 0.000000000000e+00 7.623129172352e-04 5.000000000938e-15 -1.700000000000e+01 -7.753231524990e-04 0.000000000000e+00 7.753231524940e-04 5.000000000938e-15 -1.750000000000e+01 -7.876598579358e-04 0.000000000000e+00 7.876598579308e-04 5.000000000938e-15 -1.800000000000e+01 -7.993749858456e-04 0.000000000000e+00 7.993749858406e-04 5.000000000938e-15 -1.850000000000e+01 -8.105153787110e-04 0.000000000000e+00 8.105153787060e-04 5.000000000938e-15 -1.900000000000e+01 -8.211233377115e-04 0.000000000000e+00 8.211233377065e-04 5.000000000938e-15 -1.950000000000e+01 -8.312371289460e-04 0.000000000000e+00 8.312371289410e-04 5.000000000938e-15 -2.000000000000e+01 -8.408914317507e-04 0.000000000000e+00 8.408914317457e-04 5.000000000938e-15 -1.000000000000e+00 -5.594830154720e-14 0.000000000000e+00 4.594887402834e-14 1.000000000094e-14 -1.500000000000e+00 -2.458430209363e-08 0.000000000000e+00 2.458429209418e-08 1.000000000094e-14 -2.000000000000e+00 -2.098400470329e-06 0.000000000000e+00 2.098400460329e-06 1.000000000094e-14 -2.500000000000e+00 -8.841334386478e-06 0.000000000000e+00 8.841334376479e-06 1.000000000094e-14 -3.000000000000e+00 -2.066607047510e-05 0.000000000000e+00 2.066607046510e-05 1.000000000094e-14 -3.500000000000e+00 -3.757920441780e-05 0.000000000000e+00 3.757920440780e-05 1.000000000094e-14 -4.000000000000e+00 -5.943276566945e-05 0.000000000000e+00 5.943276565945e-05 1.000000000094e-14 -4.500000000000e+00 -8.600348469156e-05 0.000000000000e+00 8.600348468156e-05 1.000000000094e-14 -5.000000000000e+00 -1.170336905259e-04 0.000000000000e+00 1.170336905159e-04 1.000000000094e-14 -5.500000000000e+00 -1.522544261324e-04 0.000000000000e+00 1.522544261224e-04 1.000000000094e-14 -6.000000000000e+00 -1.913985042117e-04 0.000000000000e+00 1.913985042017e-04 1.000000000094e-14 -6.500000000000e+00 -2.342074805760e-04 0.000000000000e+00 2.342074805660e-04 1.000000000094e-14 -7.000000000000e+00 -2.804349408635e-04 0.000000000000e+00 2.804349408535e-04 1.000000000094e-14 -7.500000000000e+00 -3.298476018207e-04 0.000000000000e+00 3.298476018107e-04 1.000000000094e-14 -8.000000000000e+00 -3.822220342327e-04 0.000000000000e+00 3.822220342227e-04 1.000000000094e-14 -8.500000000000e+00 -4.369073618576e-04 0.000000000000e+00 4.369073618476e-04 1.000000000094e-14 -9.000000000000e+00 -4.926708344874e-04 0.000000000000e+00 4.926708344774e-04 1.000000000094e-14 -9.500000000000e+00 -5.487188167776e-04 0.000000000000e+00 5.487188167676e-04 1.000000000094e-14 -1.000000000000e+01 -6.043425971659e-04 0.000000000000e+00 6.043425971559e-04 1.000000000094e-14 -1.050000000000e+01 -6.588826968641e-04 0.000000000000e+00 6.588826968541e-04 1.000000000094e-14 -1.100000000000e+01 -7.117621787310e-04 0.000000000000e+00 7.117621787210e-04 1.000000000094e-14 -1.150000000000e+01 -7.625185885607e-04 0.000000000000e+00 7.625185885507e-04 1.000000000094e-14 -1.200000000000e+01 -8.108208735881e-04 0.000000000000e+00 8.108208735781e-04 1.000000000094e-14 -1.250000000000e+01 -8.564684510936e-04 0.000000000000e+00 8.564684510836e-04 1.000000000094e-14 -1.300000000000e+01 -8.993762451622e-04 0.000000000000e+00 8.993762451522e-04 1.000000000094e-14 -1.350000000000e+01 -9.395521014231e-04 0.000000000000e+00 9.395521014131e-04 1.000000000094e-14 -1.400000000000e+01 -9.770723740944e-04 0.000000000000e+00 9.770723740844e-04 1.000000000094e-14 -1.450000000000e+01 -1.012059522351e-03 0.000000000000e+00 1.012059522341e-03 1.000000000094e-14 -1.500000000000e+01 -1.044663599769e-03 0.000000000000e+00 1.044663599759e-03 1.000000000094e-14 -1.550000000000e+01 -1.075048112124e-03 0.000000000000e+00 1.075048112114e-03 1.000000000094e-14 -1.600000000000e+01 -1.103379904657e-03 0.000000000000e+00 1.103379904647e-03 1.000000000094e-14 -1.650000000000e+01 -1.129822379938e-03 0.000000000000e+00 1.129822379928e-03 1.000000000094e-14 -1.700000000000e+01 -1.154531272025e-03 0.000000000000e+00 1.154531272015e-03 1.000000000094e-14 -1.750000000000e+01 -1.177652274914e-03 0.000000000000e+00 1.177652274904e-03 1.000000000094e-14 -1.800000000000e+01 -1.199319953038e-03 0.000000000000e+00 1.199319953028e-03 1.000000000094e-14 -1.850000000000e+01 -1.219657498141e-03 0.000000000000e+00 1.219657498131e-03 1.000000000094e-14 -1.900000000000e+01 -1.238777016711e-03 0.000000000000e+00 1.238777016701e-03 1.000000000094e-14 -1.950000000000e+01 -1.256780127752e-03 0.000000000000e+00 1.256780127742e-03 1.000000000094e-14 -2.000000000000e+01 -1.273758722472e-03 0.000000000000e+00 1.273758722462e-03 1.000000000094e-14 -1.000000000000e+00 -5.613614501509e-08 0.000000000000e+00 5.611995083543e-08 1.619417952607e-11 -1.500000000000e+00 -9.301345224827e-07 0.000000000000e+00 9.301183283032e-07 1.619417952607e-11 -2.000000000000e+00 -3.363176494271e-06 0.000000000000e+00 3.363160300092e-06 1.619417952607e-11 -2.500000000000e+00 -7.508040316735e-06 0.000000000000e+00 7.508024122556e-06 1.619417952607e-11 -3.000000000000e+00 -1.338660031432e-05 0.000000000000e+00 1.338658412014e-05 1.619417952607e-11 -3.500000000000e+00 -2.091771868513e-05 0.000000000000e+00 2.091770249095e-05 1.619417952607e-11 -4.000000000000e+00 -2.951432778950e-05 0.000000000000e+00 2.951431159532e-05 1.619417952607e-11 -4.500000000000e+00 -3.856924737271e-05 0.000000000000e+00 3.856923117853e-05 1.619417952607e-11 -5.000000000000e+00 -4.775259171255e-05 0.000000000000e+00 4.775257551837e-05 1.619417952607e-11 -5.500000000000e+00 -5.686136835655e-05 0.000000000000e+00 5.686135216237e-05 1.619417952607e-11 -6.000000000000e+00 -6.577217294373e-05 0.000000000000e+00 6.577215674955e-05 1.619417952607e-11 -6.500000000000e+00 -7.441444576483e-05 0.000000000000e+00 7.441442957065e-05 1.619417952607e-11 -7.000000000000e+00 -8.275236338789e-05 0.000000000000e+00 8.275234719371e-05 1.619417952607e-11 -7.500000000000e+00 -9.077237905071e-05 0.000000000000e+00 9.077236285653e-05 1.619417952607e-11 -8.000000000000e+00 -9.847475777161e-05 0.000000000000e+00 9.847474157743e-05 1.619417952607e-11 -8.500000000000e+00 -1.058679562405e-04 0.000000000000e+00 1.058679400464e-04 1.619417952607e-11 -9.000000000000e+00 -1.129649782485e-04 0.000000000000e+00 1.129649620543e-04 1.619417952607e-11 -9.500000000000e+00 -1.197810640967e-04 0.000000000000e+00 1.197810479025e-04 1.619417952607e-11 -1.000000000000e+01 -1.263322601359e-04 0.000000000000e+00 1.263322439417e-04 1.619417952607e-11 -1.050000000000e+01 -1.326345586912e-04 0.000000000000e+00 1.326345424970e-04 1.619417952607e-11 -1.100000000000e+01 -1.387034023037e-04 0.000000000000e+00 1.387033861095e-04 1.619417952607e-11 -1.150000000000e+01 -1.445534175492e-04 0.000000000000e+00 1.445534013550e-04 1.619417952607e-11 -1.200000000000e+01 -1.501982913660e-04 0.000000000000e+00 1.501982751718e-04 1.619417952607e-11 -1.250000000000e+01 -1.556507341165e-04 0.000000000000e+00 1.556507179223e-04 1.619417952607e-11 -1.300000000000e+01 -1.609224939126e-04 0.000000000000e+00 1.609224777184e-04 1.619417952607e-11 -1.350000000000e+01 -1.660244013426e-04 0.000000000000e+00 1.660243851484e-04 1.619417952607e-11 -1.400000000000e+01 -1.709664213217e-04 0.000000000000e+00 1.709664051275e-04 1.619417952607e-11 -1.450000000000e+01 -1.757577271983e-04 0.000000000000e+00 1.757577110042e-04 1.619417952607e-11 -1.500000000000e+01 -1.804067595471e-04 0.000000000000e+00 1.804067433529e-04 1.619417952607e-11 -1.550000000000e+01 -1.849212914798e-04 0.000000000000e+00 1.849212752856e-04 1.619417952607e-11 -1.600000000000e+01 -1.893084886334e-04 0.000000000000e+00 1.893084724392e-04 1.619417952607e-11 -1.650000000000e+01 -1.935749647707e-04 0.000000000000e+00 1.935749485765e-04 1.619417952607e-11 -1.700000000000e+01 -1.977268327113e-04 0.000000000000e+00 1.977268165171e-04 1.619417952607e-11 -1.750000000000e+01 -2.017697506208e-04 0.000000000000e+00 2.017697344266e-04 1.619417952607e-11 -1.800000000000e+01 -2.057089638643e-04 0.000000000000e+00 2.057089476702e-04 1.619417952607e-11 -1.850000000000e+01 -2.095493427235e-04 0.000000000000e+00 2.095493265294e-04 1.619417952607e-11 -1.900000000000e+01 -2.132954163171e-04 0.000000000000e+00 2.132954001229e-04 1.619417952607e-11 -1.950000000000e+01 -2.169514030754e-04 0.000000000000e+00 2.169513868812e-04 1.619417952607e-11 -2.000000000000e+01 -2.205212381085e-04 0.000000000000e+00 2.205212219144e-04 1.619417952607e-11 -1.000000000000e+00 -5.658878346709e-08 0.000000000000e+00 5.657258628753e-08 1.619717952607e-11 -1.500000000000e+00 -9.343144717628e-07 0.000000000000e+00 9.342982745829e-07 1.619717952607e-11 -2.000000000000e+00 -3.374895276751e-06 0.000000000000e+00 3.374879079572e-06 1.619717952607e-11 -2.500000000000e+00 -7.531427326353e-06 0.000000000000e+00 7.531411129174e-06 1.619717952607e-11 -3.000000000000e+00 -1.342752443046e-05 0.000000000000e+00 1.342750823328e-05 1.619717952607e-11 -3.500000000000e+00 -2.104935813907e-05 0.000000000000e+00 2.104934194189e-05 1.619717952607e-11 -4.000000000000e+00 -3.036775427458e-05 0.000000000000e+00 3.036773807740e-05 1.619717952607e-11 -4.500000000000e+00 -4.134627092605e-05 0.000000000000e+00 4.134625472887e-05 1.619717952607e-11 -5.000000000000e+00 -5.394405174138e-05 0.000000000000e+00 5.394403554420e-05 1.619717952607e-11 -5.500000000000e+00 -6.807870068594e-05 0.000000000000e+00 6.807868448877e-05 1.619717952607e-11 -6.000000000000e+00 -8.344645706708e-05 0.000000000000e+00 8.344644086990e-05 1.619717952607e-11 -6.500000000000e+00 -9.970001059486e-05 0.000000000000e+00 9.969999439768e-05 1.619717952607e-11 -7.000000000000e+00 -1.165725229233e-04 0.000000000000e+00 1.165725067262e-04 1.619717952607e-11 -7.500000000000e+00 -1.338298268244e-04 0.000000000000e+00 1.338298106272e-04 1.619717952607e-11 -8.000000000000e+00 -1.512650474085e-04 0.000000000000e+00 1.512650312113e-04 1.619717952607e-11 -8.500000000000e+00 -1.687016054967e-04 0.000000000000e+00 1.687015892995e-04 1.619717952607e-11 -9.000000000000e+00 -1.859947584409e-04 0.000000000000e+00 1.859947422438e-04 1.619717952607e-11 -9.500000000000e+00 -2.030305577233e-04 0.000000000000e+00 2.030305415261e-04 1.619717952607e-11 -1.000000000000e+01 -2.197229958872e-04 0.000000000000e+00 2.197229796900e-04 1.619717952607e-11 -1.050000000000e+01 -2.360102091043e-04 0.000000000000e+00 2.360101929071e-04 1.619717952607e-11 -1.100000000000e+01 -2.518504453353e-04 0.000000000000e+00 2.518504291381e-04 1.619717952607e-11 -1.150000000000e+01 -2.672181952137e-04 0.000000000000e+00 2.672181790165e-04 1.619717952607e-11 -1.200000000000e+01 -2.821007132268e-04 0.000000000000e+00 2.821006970296e-04 1.619717952607e-11 -1.250000000000e+01 -2.964950241842e-04 0.000000000000e+00 2.964950079870e-04 1.619717952607e-11 -1.300000000000e+01 -3.104054320227e-04 0.000000000000e+00 3.104054158255e-04 1.619717952607e-11 -1.350000000000e+01 -3.238415017971e-04 0.000000000000e+00 3.238414856000e-04 1.619717952607e-11 -1.400000000000e+01 -3.368164617110e-04 0.000000000000e+00 3.368164455138e-04 1.619717952607e-11 -1.450000000000e+01 -3.493459627734e-04 0.000000000000e+00 3.493459465762e-04 1.619717952607e-11 -1.500000000000e+01 -3.614471335923e-04 0.000000000000e+00 3.614471173951e-04 1.619717952607e-11 -1.550000000000e+01 -3.731378728911e-04 0.000000000000e+00 3.731378566939e-04 1.619717952607e-11 -1.600000000000e+01 -3.844363298048e-04 0.000000000000e+00 3.844363136076e-04 1.619717952607e-11 -1.650000000000e+01 -3.953605301256e-04 0.000000000000e+00 3.953605139284e-04 1.619717952607e-11 -1.700000000000e+01 -4.059281144173e-04 0.000000000000e+00 4.059280982201e-04 1.619717952607e-11 -1.750000000000e+01 -4.161561608061e-04 0.000000000000e+00 4.161561446089e-04 1.619717952607e-11 -1.800000000000e+01 -4.260610711028e-04 0.000000000000e+00 4.260610549056e-04 1.619717952607e-11 -1.850000000000e+01 -4.356585037133e-04 0.000000000000e+00 4.356584875161e-04 1.619717952607e-11 -1.900000000000e+01 -4.449633406589e-04 0.000000000000e+00 4.449633244617e-04 1.619717952607e-11 -1.950000000000e+01 -4.539896790730e-04 0.000000000000e+00 4.539896628758e-04 1.619717952607e-11 -2.000000000000e+01 -4.627508399194e-04 0.000000000000e+00 4.627508237223e-04 1.619717952607e-11 -1.000000000000e+00 -5.727013882963e-08 0.000000000000e+00 5.725393665037e-08 1.620217952607e-11 -1.500000000000e+00 -9.400446676850e-07 0.000000000000e+00 9.400284655057e-07 1.620217952607e-11 -2.000000000000e+00 -3.389852604735e-06 0.000000000000e+00 3.389836402555e-06 1.620217952607e-11 -2.500000000000e+00 -7.559218757768e-06 0.000000000000e+00 7.559202555589e-06 1.620217952607e-11 -3.000000000000e+00 -1.347162594746e-05 0.000000000000e+00 1.347160974528e-05 1.620217952607e-11 -3.500000000000e+00 -2.111341188967e-05 0.000000000000e+00 2.111339568749e-05 1.620217952607e-11 -4.000000000000e+00 -3.045585868931e-05 0.000000000000e+00 3.045584248713e-05 1.620217952607e-11 -4.500000000000e+00 -4.146325192289e-05 0.000000000000e+00 4.146323572071e-05 1.620217952607e-11 -5.000000000000e+00 -5.409642233579e-05 0.000000000000e+00 5.409640613361e-05 1.620217952607e-11 -5.500000000000e+00 -6.831449169959e-05 0.000000000000e+00 6.831447549741e-05 1.620217952607e-11 -6.000000000000e+00 -8.407581385490e-05 0.000000000000e+00 8.407579765272e-05 1.620217952607e-11 -6.500000000000e+00 -1.013385188482e-04 0.000000000000e+00 1.013385026461e-04 1.620217952607e-11 -7.000000000000e+00 -1.200607178629e-04 0.000000000000e+00 1.200607016607e-04 1.620217952607e-11 -7.500000000000e+00 -1.401967339662e-04 0.000000000000e+00 1.401967177640e-04 1.620217952607e-11 -8.000000000000e+00 -1.616483008953e-04 0.000000000000e+00 1.616482846931e-04 1.620217952607e-11 -8.500000000000e+00 -1.842259629151e-04 0.000000000000e+00 1.842259467130e-04 1.620217952607e-11 -9.000000000000e+00 -2.077535720281e-04 0.000000000000e+00 2.077535558259e-04 1.620217952607e-11 -9.500000000000e+00 -2.320723389428e-04 0.000000000000e+00 2.320723227406e-04 1.620217952607e-11 -1.000000000000e+01 -2.570249130475e-04 0.000000000000e+00 2.570248968453e-04 1.620217952607e-11 -1.050000000000e+01 -2.824531764553e-04 0.000000000000e+00 2.824531602532e-04 1.620217952607e-11 -1.100000000000e+01 -3.082001195054e-04 0.000000000000e+00 3.082001033032e-04 1.620217952607e-11 -1.150000000000e+01 -3.341130021578e-04 0.000000000000e+00 3.341129859556e-04 1.620217952607e-11 -1.200000000000e+01 -3.600468473542e-04 0.000000000000e+00 3.600468311520e-04 1.620217952607e-11 -1.250000000000e+01 -3.858676333378e-04 0.000000000000e+00 3.858676171356e-04 1.620217952607e-11 -1.300000000000e+01 -4.114548578043e-04 0.000000000000e+00 4.114548416021e-04 1.620217952607e-11 -1.350000000000e+01 -4.367032418821e-04 0.000000000000e+00 4.367032256799e-04 1.620217952607e-11 -1.400000000000e+01 -4.615235617241e-04 0.000000000000e+00 4.615235455219e-04 1.620217952607e-11 -1.450000000000e+01 -4.858426244744e-04 0.000000000000e+00 4.858426082722e-04 1.620217952607e-11 -1.500000000000e+01 -5.096026138952e-04 0.000000000000e+00 5.096025976930e-04 1.620217952607e-11 -1.550000000000e+01 -5.327599421281e-04 0.000000000000e+00 5.327599259259e-04 1.620217952607e-11 -1.600000000000e+01 -5.552837999984e-04 0.000000000000e+00 5.552837837962e-04 1.620217952607e-11 -1.650000000000e+01 -5.771545552608e-04 0.000000000000e+00 5.771545390586e-04 1.620217952607e-11 -1.700000000000e+01 -5.983621181838e-04 0.000000000000e+00 5.983621019816e-04 1.620217952607e-11 -1.750000000000e+01 -6.189043612837e-04 0.000000000000e+00 6.189043450815e-04 1.620217952607e-11 -1.800000000000e+01 -6.387856510314e-04 0.000000000000e+00 6.387856348292e-04 1.620217952607e-11 -1.850000000000e+01 -6.580155255285e-04 0.000000000000e+00 6.580155093263e-04 1.620217952607e-11 -1.900000000000e+01 -6.766075337613e-04 0.000000000000e+00 6.766075175592e-04 1.620217952607e-11 -1.950000000000e+01 -6.945782386739e-04 0.000000000000e+00 6.945782224717e-04 1.620217952607e-11 -2.000000000000e+01 -7.119463772291e-04 0.000000000000e+00 7.119463610269e-04 1.620217952607e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Id1_vb1.standard0000644000265600020320000010243012264261473024254 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.333247159119e-04 0.000000000000e+00 1.333247159009e-04 1.100000000000e-14 -1.500000000000e+00 -1.897545683747e-04 0.000000000000e+00 1.897545683632e-04 1.150000000000e-14 -2.000000000000e+00 -2.397056372759e-04 0.000000000000e+00 2.397056372639e-04 1.200000000000e-14 -2.500000000000e+00 -2.835558174886e-04 0.000000000000e+00 2.835558174761e-04 1.250000000000e-14 -3.000000000000e+00 -3.217282296923e-04 0.000000000000e+00 3.217282296793e-04 1.300000000000e-14 -3.500000000000e+00 -3.546695099086e-04 0.000000000000e+00 3.546695098951e-04 1.350000000000e-14 -4.000000000000e+00 -3.828375328541e-04 0.000000000000e+00 3.828375328401e-04 1.400000000000e-14 -4.500000000000e+00 -4.066937178492e-04 0.000000000000e+00 4.066937178347e-04 1.450000000000e-14 -5.000000000000e+00 -4.266968847602e-04 0.000000000000e+00 4.266968847452e-04 1.500000000000e-14 -5.500000000000e+00 -4.432971219245e-04 0.000000000000e+00 4.432971219090e-04 1.550000000000e-14 -6.000000000000e+00 -4.569292184126e-04 0.000000000000e+00 4.569292183966e-04 1.600000000000e-14 -6.500000000000e+00 -4.680058952461e-04 0.000000000000e+00 4.680058952296e-04 1.650000000000e-14 -7.000000000000e+00 -4.769114112829e-04 0.000000000000e+00 4.769114112659e-04 1.700000000000e-14 -7.500000000000e+00 -4.839962164628e-04 0.000000000000e+00 4.839962164453e-04 1.750000000000e-14 -8.000000000000e+00 -4.895732442460e-04 0.000000000000e+00 4.895732442280e-04 1.800000000000e-14 -8.500000000000e+00 -4.939162067784e-04 0.000000000000e+00 4.939162067599e-04 1.850000000000e-14 -9.000000000000e+00 -4.972599314801e-04 0.000000000000e+00 4.972599314611e-04 1.900000000000e-14 -9.500000000000e+00 -4.998024581383e-04 0.000000000000e+00 4.998024581188e-04 1.950000000000e-14 -1.000000000000e+01 -5.017084076428e-04 0.000000000000e+00 5.017084076228e-04 2.000000000000e-14 -1.050000000000e+01 -5.031130840016e-04 0.000000000000e+00 5.031130839811e-04 2.050000000000e-14 -1.100000000000e+01 -5.041268601411e-04 0.000000000000e+00 5.041268601201e-04 2.100000000000e-14 -1.150000000000e+01 -5.048395481901e-04 0.000000000000e+00 5.048395481686e-04 2.150000000000e-14 -1.200000000000e+01 -5.053247655031e-04 0.000000000000e+00 5.053247654811e-04 2.200000000000e-14 -1.250000000000e+01 -5.056445399026e-04 0.000000000000e+00 5.056445398801e-04 2.250000000000e-14 -1.300000000000e+01 -5.058548285801e-04 0.000000000000e+00 5.058548285571e-04 2.300000000000e-14 -1.350000000000e+01 -5.060085916373e-04 0.000000000000e+00 5.060085916138e-04 2.350000000000e-14 -1.400000000000e+01 -5.061429496531e-04 0.000000000000e+00 5.061429496291e-04 2.400000000000e-14 -1.450000000000e+01 -5.062706114426e-04 0.000000000000e+00 5.062706114181e-04 2.450000000000e-14 -1.500000000000e+01 -5.063941168102e-04 0.000000000000e+00 5.063941167852e-04 2.500000000000e-14 -1.550000000000e+01 -5.065141256573e-04 0.000000000000e+00 5.065141256318e-04 2.550000000000e-14 -1.600000000000e+01 -5.066309916981e-04 0.000000000000e+00 5.066309916721e-04 2.600000000000e-14 -1.650000000000e+01 -5.067449928403e-04 0.000000000000e+00 5.067449928138e-04 2.650000000000e-14 -1.700000000000e+01 -5.068563697771e-04 0.000000000000e+00 5.068563697501e-04 2.700000000000e-14 -1.750000000000e+01 -5.069653355303e-04 0.000000000000e+00 5.069653355028e-04 2.750000000000e-14 -1.800000000000e+01 -5.070720797841e-04 0.000000000000e+00 5.070720797561e-04 2.800000000000e-14 -1.850000000000e+01 -5.071767719367e-04 0.000000000000e+00 5.071767719082e-04 2.850000000000e-14 -1.900000000000e+01 -5.072795636198e-04 0.000000000000e+00 5.072795635908e-04 2.900000000000e-14 -1.950000000000e+01 -5.073805908655e-04 0.000000000000e+00 5.073805908360e-04 2.950000000000e-14 -2.000000000000e+01 -5.074799759898e-04 0.000000000000e+00 5.074799759598e-04 3.000000000000e-14 -1.000000000000e+00 -1.327361781292e-04 0.000000000000e+00 1.327361781182e-04 1.100000000000e-14 -1.500000000000e+00 -1.889516814725e-04 0.000000000000e+00 1.889516814610e-04 1.150000000000e-14 -2.000000000000e+00 -2.387465001258e-04 0.000000000000e+00 2.387465001138e-04 1.200000000000e-14 -2.500000000000e+00 -2.824967531220e-04 0.000000000000e+00 2.824967531095e-04 1.250000000000e-14 -3.000000000000e+00 -3.206209514648e-04 0.000000000000e+00 3.206209514518e-04 1.300000000000e-14 -3.500000000000e+00 -3.535591620839e-04 0.000000000000e+00 3.535591620704e-04 1.350000000000e-14 -4.000000000000e+00 -3.817614406059e-04 0.000000000000e+00 3.817614405919e-04 1.400000000000e-14 -4.500000000000e+00 -4.056807724820e-04 0.000000000000e+00 4.056807724675e-04 1.450000000000e-14 -5.000000000000e+00 -4.257675206324e-04 0.000000000000e+00 4.257675206174e-04 1.500000000000e-14 -5.500000000000e+00 -4.424638257950e-04 0.000000000000e+00 4.424638257795e-04 1.550000000000e-14 -6.000000000000e+00 -4.561974737369e-04 0.000000000000e+00 4.561974737209e-04 1.600000000000e-14 -6.500000000000e+00 -4.673754275023e-04 0.000000000000e+00 4.673754274858e-04 1.650000000000e-14 -7.000000000000e+00 -4.763775805011e-04 0.000000000000e+00 4.763775804841e-04 1.700000000000e-14 -7.500000000000e+00 -4.835514047046e-04 0.000000000000e+00 4.835514046871e-04 1.750000000000e-14 -8.000000000000e+00 -4.892081085462e-04 0.000000000000e+00 4.892081085282e-04 1.800000000000e-14 -8.500000000000e+00 -4.936207084081e-04 0.000000000000e+00 4.936207083896e-04 1.850000000000e-14 -9.000000000000e+00 -4.970241016652e-04 0.000000000000e+00 4.970241016462e-04 1.900000000000e-14 -9.500000000000e+00 -4.996169059648e-04 0.000000000000e+00 4.996169059453e-04 1.950000000000e-14 -1.000000000000e+01 -5.015646071170e-04 0.000000000000e+00 5.015646070970e-04 2.000000000000e-14 -1.050000000000e+01 -5.030034903186e-04 0.000000000000e+00 5.030034902981e-04 2.050000000000e-14 -1.100000000000e+01 -5.040449029101e-04 0.000000000000e+00 5.040449028891e-04 2.100000000000e-14 -1.150000000000e+01 -5.047795333992e-04 0.000000000000e+00 5.047795333777e-04 2.150000000000e-14 -1.200000000000e+01 -5.052816966270e-04 0.000000000000e+00 5.052816966050e-04 2.200000000000e-14 -1.250000000000e+01 -5.056138164875e-04 0.000000000000e+00 5.056138164650e-04 2.250000000000e-14 -1.300000000000e+01 -5.058317963295e-04 0.000000000000e+00 5.058317963065e-04 2.300000000000e-14 -1.350000000000e+01 -5.059887874402e-04 0.000000000000e+00 5.059887874167e-04 2.350000000000e-14 -1.400000000000e+01 -5.061240469936e-04 0.000000000000e+00 5.061240469696e-04 2.400000000000e-14 -1.450000000000e+01 -5.062520740030e-04 0.000000000000e+00 5.062520739785e-04 2.450000000000e-14 -1.500000000000e+01 -5.063758411945e-04 0.000000000000e+00 5.063758411695e-04 2.500000000000e-14 -1.550000000000e+01 -5.064960762029e-04 0.000000000000e+00 5.064960761774e-04 2.550000000000e-14 -1.600000000000e+01 -5.066131451553e-04 0.000000000000e+00 5.066131451293e-04 2.600000000000e-14 -1.650000000000e+01 -5.067273298970e-04 0.000000000000e+00 5.067273298705e-04 2.650000000000e-14 -1.700000000000e+01 -5.068388734592e-04 0.000000000000e+00 5.068388734322e-04 2.700000000000e-14 -1.750000000000e+01 -5.069479907363e-04 0.000000000000e+00 5.069479907088e-04 2.750000000000e-14 -1.800000000000e+01 -5.070548730409e-04 0.000000000000e+00 5.070548730129e-04 2.800000000000e-14 -1.850000000000e+01 -5.071596912144e-04 0.000000000000e+00 5.071596911859e-04 2.850000000000e-14 -1.900000000000e+01 -5.072625981736e-04 0.000000000000e+00 5.072625981446e-04 2.900000000000e-14 -1.950000000000e+01 -5.073637310955e-04 0.000000000000e+00 5.073637310660e-04 2.950000000000e-14 -2.000000000000e+01 -5.074632133165e-04 0.000000000000e+00 5.074632132865e-04 3.000000000000e-14 -1.000000000000e+00 -1.320181330716e-04 0.000000000000e+00 1.320181330606e-04 1.100000000000e-14 -1.500000000000e+00 -1.879696000304e-04 0.000000000000e+00 1.879696000189e-04 1.150000000000e-14 -2.000000000000e+00 -2.375699748304e-04 0.000000000000e+00 2.375699748184e-04 1.200000000000e-14 -2.500000000000e+00 -2.811936660680e-04 0.000000000000e+00 2.811936660555e-04 1.250000000000e-14 -3.000000000000e+00 -3.192540725720e-04 0.000000000000e+00 3.192540725590e-04 1.300000000000e-14 -3.500000000000e+00 -3.521837436160e-04 0.000000000000e+00 3.521837436025e-04 1.350000000000e-14 -4.000000000000e+00 -3.804236279213e-04 0.000000000000e+00 3.804236279073e-04 1.400000000000e-14 -4.500000000000e+00 -4.044167498783e-04 0.000000000000e+00 4.044167498638e-04 1.450000000000e-14 -5.000000000000e+00 -4.246033541239e-04 0.000000000000e+00 4.246033541089e-04 1.500000000000e-14 -5.500000000000e+00 -4.414159487687e-04 0.000000000000e+00 4.414159487532e-04 1.550000000000e-14 -6.000000000000e+00 -4.552737152049e-04 0.000000000000e+00 4.552737151889e-04 1.600000000000e-14 -6.500000000000e+00 -4.665764347632e-04 0.000000000000e+00 4.665764347467e-04 1.650000000000e-14 -7.000000000000e+00 -4.756984574972e-04 0.000000000000e+00 4.756984574802e-04 1.700000000000e-14 -7.500000000000e+00 -4.829833819916e-04 0.000000000000e+00 4.829833819741e-04 1.750000000000e-14 -8.000000000000e+00 -4.887400818834e-04 0.000000000000e+00 4.887400818654e-04 1.800000000000e-14 -8.500000000000e+00 -4.932405275185e-04 0.000000000000e+00 4.932405275000e-04 1.850000000000e-14 -9.000000000000e+00 -4.967195491532e-04 0.000000000000e+00 4.967195491342e-04 1.900000000000e-14 -9.500000000000e+00 -4.993763633430e-04 0.000000000000e+00 4.993763633235e-04 1.950000000000e-14 -1.000000000000e+01 -5.013774462387e-04 0.000000000000e+00 5.013774462187e-04 2.000000000000e-14 -1.050000000000e+01 -5.028602480564e-04 0.000000000000e+00 5.028602480359e-04 2.050000000000e-14 -1.100000000000e+01 -5.039372969870e-04 0.000000000000e+00 5.039372969660e-04 2.100000000000e-14 -1.150000000000e+01 -5.047003595812e-04 0.000000000000e+00 5.047003595597e-04 2.150000000000e-14 -1.200000000000e+01 -5.052246234266e-04 0.000000000000e+00 5.052246234046e-04 2.200000000000e-14 -1.250000000000e+01 -5.055730303110e-04 0.000000000000e+00 5.055730302885e-04 2.250000000000e-14 -1.300000000000e+01 -5.058014420751e-04 0.000000000000e+00 5.058014420521e-04 2.300000000000e-14 -1.350000000000e+01 -5.059630595161e-04 0.000000000000e+00 5.059630594926e-04 2.350000000000e-14 -1.400000000000e+01 -5.060996119263e-04 0.000000000000e+00 5.060996119023e-04 2.400000000000e-14 -1.450000000000e+01 -5.062281023966e-04 0.000000000000e+00 5.062281023721e-04 2.450000000000e-14 -1.500000000000e+01 -5.063521769365e-04 0.000000000000e+00 5.063521769115e-04 2.500000000000e-14 -1.550000000000e+01 -5.064726703501e-04 0.000000000000e+00 5.064726703246e-04 2.550000000000e-14 -1.600000000000e+01 -5.065899676473e-04 0.000000000000e+00 5.065899676213e-04 2.600000000000e-14 -1.650000000000e+01 -5.067043561550e-04 0.000000000000e+00 5.067043561285e-04 2.650000000000e-14 -1.700000000000e+01 -5.068160819433e-04 0.000000000000e+00 5.068160819163e-04 2.700000000000e-14 -1.750000000000e+01 -5.069253622865e-04 0.000000000000e+00 5.069253622590e-04 2.750000000000e-14 -1.800000000000e+01 -5.070323905595e-04 0.000000000000e+00 5.070323905315e-04 2.800000000000e-14 -1.850000000000e+01 -5.071373394341e-04 0.000000000000e+00 5.071373394056e-04 2.850000000000e-14 -1.900000000000e+01 -5.072403634595e-04 0.000000000000e+00 5.072403634305e-04 2.900000000000e-14 -1.950000000000e+01 -5.073416012715e-04 0.000000000000e+00 5.073416012420e-04 2.950000000000e-14 -2.000000000000e+01 -5.074411775100e-04 0.000000000000e+00 5.074411774800e-04 3.000000000000e-14 -1.000000000000e+00 -1.778608617513e-04 0.000000000000e+00 1.778608617403e-04 1.100000000000e-14 -1.500000000000e+00 -2.536375912369e-04 0.000000000000e+00 2.536375912254e-04 1.150000000000e-14 -2.000000000000e+00 -3.214035565239e-04 0.000000000000e+00 3.214035565119e-04 1.200000000000e-14 -2.500000000000e+00 -3.817838297588e-04 0.000000000000e+00 3.817838297463e-04 1.250000000000e-14 -3.000000000000e+00 -4.353869919515e-04 0.000000000000e+00 4.353869919385e-04 1.300000000000e-14 -3.500000000000e+00 -4.827849569244e-04 0.000000000000e+00 4.827849569109e-04 1.350000000000e-14 -4.000000000000e+00 -5.245074060865e-04 0.000000000000e+00 5.245074060725e-04 1.400000000000e-14 -4.500000000000e+00 -5.610439729079e-04 0.000000000000e+00 5.610439728934e-04 1.450000000000e-14 -5.000000000000e+00 -5.928498551440e-04 0.000000000000e+00 5.928498551290e-04 1.500000000000e-14 -5.500000000000e+00 -6.203522577295e-04 0.000000000000e+00 6.203522577140e-04 1.550000000000e-14 -6.000000000000e+00 -6.439561511636e-04 0.000000000000e+00 6.439561511476e-04 1.600000000000e-14 -6.500000000000e+00 -6.640485100953e-04 0.000000000000e+00 6.640485100788e-04 1.650000000000e-14 -7.000000000000e+00 -6.810006571096e-04 0.000000000000e+00 6.810006570926e-04 1.700000000000e-14 -7.500000000000e+00 -6.951686845072e-04 0.000000000000e+00 6.951686844897e-04 1.750000000000e-14 -8.000000000000e+00 -7.068922111548e-04 0.000000000000e+00 7.068922111368e-04 1.800000000000e-14 -8.500000000000e+00 -7.164919600926e-04 0.000000000000e+00 7.164919600741e-04 1.850000000000e-14 -9.000000000000e+00 -7.242667931159e-04 0.000000000000e+00 7.242667930969e-04 1.900000000000e-14 -9.500000000000e+00 -7.304908748638e-04 0.000000000000e+00 7.304908748443e-04 1.950000000000e-14 -1.000000000000e+01 -7.354115411982e-04 0.000000000000e+00 7.354115411782e-04 2.000000000000e-14 -1.050000000000e+01 -7.392482393603e-04 0.000000000000e+00 7.392482393398e-04 2.050000000000e-14 -1.100000000000e+01 -7.421926588404e-04 0.000000000000e+00 7.421926588194e-04 2.100000000000e-14 -1.150000000000e+01 -7.444099617636e-04 0.000000000000e+00 7.444099617421e-04 2.150000000000e-14 -1.200000000000e+01 -7.460409065221e-04 0.000000000000e+00 7.460409065001e-04 2.200000000000e-14 -1.250000000000e+01 -7.472046683292e-04 0.000000000000e+00 7.472046683067e-04 2.250000000000e-14 -1.300000000000e+01 -7.480023534309e-04 0.000000000000e+00 7.480023534079e-04 2.300000000000e-14 -1.350000000000e+01 -7.485218096454e-04 0.000000000000e+00 7.485218096219e-04 2.350000000000e-14 -1.400000000000e+01 -7.488465831925e-04 0.000000000000e+00 7.488465831685e-04 2.400000000000e-14 -1.450000000000e+01 -7.490699738330e-04 0.000000000000e+00 7.490699738085e-04 2.450000000000e-14 -1.500000000000e+01 -7.492659872257e-04 0.000000000000e+00 7.492659872007e-04 2.500000000000e-14 -1.550000000000e+01 -7.494535935792e-04 0.000000000000e+00 7.494535935537e-04 2.550000000000e-14 -1.600000000000e+01 -7.496348672817e-04 0.000000000000e+00 7.496348672557e-04 2.600000000000e-14 -1.650000000000e+01 -7.498104525497e-04 0.000000000000e+00 7.498104525232e-04 2.650000000000e-14 -1.700000000000e+01 -7.499808499226e-04 0.000000000000e+00 7.499808498956e-04 2.700000000000e-14 -1.750000000000e+01 -7.501465010799e-04 0.000000000000e+00 7.501465010524e-04 2.750000000000e-14 -1.800000000000e+01 -7.503078003210e-04 0.000000000000e+00 7.503078002930e-04 2.800000000000e-14 -1.850000000000e+01 -7.504651003362e-04 0.000000000000e+00 7.504651003077e-04 2.850000000000e-14 -1.900000000000e+01 -7.506187170004e-04 0.000000000000e+00 7.506187169714e-04 2.900000000000e-14 -1.950000000000e+01 -7.507689336090e-04 0.000000000000e+00 7.507689335795e-04 2.950000000000e-14 -2.000000000000e+01 -7.509160046362e-04 0.000000000000e+00 7.509160046062e-04 3.000000000000e-14 -1.000000000000e+00 -1.767963405328e-04 0.000000000000e+00 1.767963405218e-04 1.100000000000e-14 -1.500000000000e+00 -2.521607232178e-04 0.000000000000e+00 2.521607232063e-04 1.150000000000e-14 -2.000000000000e+00 -3.195995706277e-04 0.000000000000e+00 3.195995706157e-04 1.200000000000e-14 -2.500000000000e+00 -3.797358308513e-04 0.000000000000e+00 3.797358308388e-04 1.250000000000e-14 -3.000000000000e+00 -4.331734617847e-04 0.000000000000e+00 4.331734617717e-04 1.300000000000e-14 -3.500000000000e+00 -4.804782435636e-04 0.000000000000e+00 4.804782435501e-04 1.350000000000e-14 -4.000000000000e+00 -5.221727079629e-04 0.000000000000e+00 5.221727079489e-04 1.400000000000e-14 -4.500000000000e+00 -5.587385679912e-04 0.000000000000e+00 5.587385679767e-04 1.450000000000e-14 -5.000000000000e+00 -5.906224870931e-04 0.000000000000e+00 5.906224870781e-04 1.500000000000e-14 -5.500000000000e+00 -6.182426868248e-04 0.000000000000e+00 6.182426868093e-04 1.550000000000e-14 -6.000000000000e+00 -6.419949259979e-04 0.000000000000e+00 6.419949259819e-04 1.600000000000e-14 -6.500000000000e+00 -6.622570279237e-04 0.000000000000e+00 6.622570279072e-04 1.650000000000e-14 -7.000000000000e+00 -6.793915644728e-04 0.000000000000e+00 6.793915644558e-04 1.700000000000e-14 -7.500000000000e+00 -6.937466329578e-04 0.000000000000e+00 6.937466329403e-04 1.750000000000e-14 -8.000000000000e+00 -7.056549346905e-04 0.000000000000e+00 7.056549346725e-04 1.800000000000e-14 -8.500000000000e+00 -7.154315920968e-04 0.000000000000e+00 7.154315920783e-04 1.850000000000e-14 -9.000000000000e+00 -7.233713034380e-04 0.000000000000e+00 7.233713034190e-04 1.900000000000e-14 -9.500000000000e+00 -7.297454929869e-04 0.000000000000e+00 7.297454929674e-04 1.950000000000e-14 -1.000000000000e+01 -7.348000440142e-04 0.000000000000e+00 7.348000439942e-04 2.000000000000e-14 -1.050000000000e+01 -7.387540170483e-04 0.000000000000e+00 7.387540170278e-04 2.050000000000e-14 -1.100000000000e+01 -7.417995169736e-04 0.000000000000e+00 7.417995169526e-04 2.100000000000e-14 -1.150000000000e+01 -7.441026575672e-04 0.000000000000e+00 7.441026575457e-04 2.150000000000e-14 -1.200000000000e+01 -7.458054413382e-04 0.000000000000e+00 7.458054413162e-04 2.200000000000e-14 -1.250000000000e+01 -7.470283589094e-04 0.000000000000e+00 7.470283588869e-04 2.250000000000e-14 -1.300000000000e+01 -7.478736645926e-04 0.000000000000e+00 7.478736645696e-04 2.300000000000e-14 -1.350000000000e+01 -7.484297659449e-04 0.000000000000e+00 7.484297659214e-04 2.350000000000e-14 -1.400000000000e+01 -7.487790520925e-04 0.000000000000e+00 7.487790520685e-04 2.400000000000e-14 -1.450000000000e+01 -7.490121835766e-04 0.000000000000e+00 7.490121835521e-04 2.450000000000e-14 -1.500000000000e+01 -7.492102621293e-04 0.000000000000e+00 7.492102621043e-04 2.500000000000e-14 -1.550000000000e+01 -7.493989535408e-04 0.000000000000e+00 7.493989535153e-04 2.550000000000e-14 -1.600000000000e+01 -7.495811726525e-04 0.000000000000e+00 7.495811726265e-04 2.600000000000e-14 -1.650000000000e+01 -7.497576236523e-04 0.000000000000e+00 7.497576236258e-04 2.650000000000e-14 -1.700000000000e+01 -7.499288180414e-04 0.000000000000e+00 7.499288180144e-04 2.700000000000e-14 -1.750000000000e+01 -7.500952044770e-04 0.000000000000e+00 7.500952044495e-04 2.750000000000e-14 -1.800000000000e+01 -7.502571833223e-04 0.000000000000e+00 7.502571832943e-04 2.800000000000e-14 -1.850000000000e+01 -7.504151127114e-04 0.000000000000e+00 7.504151126829e-04 2.850000000000e-14 -1.900000000000e+01 -7.505693134149e-04 0.000000000000e+00 7.505693133859e-04 2.900000000000e-14 -1.950000000000e+01 -7.507200731286e-04 0.000000000000e+00 7.507200730991e-04 2.950000000000e-14 -2.000000000000e+01 -7.508676502778e-04 0.000000000000e+00 7.508676502478e-04 3.000000000000e-14 -1.000000000000e+00 -1.755021288671e-04 0.000000000000e+00 1.755021288561e-04 1.100000000000e-14 -1.500000000000e+00 -2.503606888094e-04 0.000000000000e+00 2.503606887979e-04 1.150000000000e-14 -2.000000000000e+00 -3.173947612671e-04 0.000000000000e+00 3.173947612551e-04 1.200000000000e-14 -2.500000000000e+00 -3.772252785254e-04 0.000000000000e+00 3.772252785129e-04 1.250000000000e-14 -3.000000000000e+00 -4.304512247588e-04 0.000000000000e+00 4.304512247458e-04 1.300000000000e-14 -3.500000000000e+00 -4.776316010096e-04 0.000000000000e+00 4.776316009961e-04 1.350000000000e-14 -4.000000000000e+00 -5.192809241743e-04 0.000000000000e+00 5.192809241603e-04 1.400000000000e-14 -4.500000000000e+00 -5.558719269961e-04 0.000000000000e+00 5.558719269816e-04 1.450000000000e-14 -5.000000000000e+00 -5.878414882327e-04 0.000000000000e+00 5.878414882177e-04 1.500000000000e-14 -5.500000000000e+00 -6.155974075644e-04 0.000000000000e+00 6.155974075489e-04 1.550000000000e-14 -6.000000000000e+00 -6.395246198692e-04 0.000000000000e+00 6.395246198532e-04 1.600000000000e-14 -6.500000000000e+00 -6.599900455598e-04 0.000000000000e+00 6.599900455433e-04 1.650000000000e-14 -7.000000000000e+00 -6.773456721959e-04 0.000000000000e+00 6.773456721789e-04 1.700000000000e-14 -7.500000000000e+00 -6.919297637912e-04 0.000000000000e+00 6.919297637737e-04 1.750000000000e-14 -8.000000000000e+00 -7.040663502676e-04 0.000000000000e+00 7.040663502496e-04 1.800000000000e-14 -8.500000000000e+00 -7.140633728341e-04 0.000000000000e+00 7.140633728156e-04 1.850000000000e-14 -9.000000000000e+00 -7.222100332029e-04 0.000000000000e+00 7.222100331839e-04 1.900000000000e-14 -9.500000000000e+00 -7.287739777831e-04 0.000000000000e+00 7.287739777636e-04 1.950000000000e-14 -1.000000000000e+01 -7.339989103062e-04 0.000000000000e+00 7.339989102862e-04 2.000000000000e-14 -1.050000000000e+01 -7.381030713182e-04 0.000000000000e+00 7.381030712977e-04 2.050000000000e-14 -1.100000000000e+01 -7.412788001948e-04 0.000000000000e+00 7.412788001738e-04 2.100000000000e-14 -1.150000000000e+01 -7.436931787020e-04 0.000000000000e+00 7.436931786805e-04 2.150000000000e-14 -1.200000000000e+01 -7.454896081005e-04 0.000000000000e+00 7.454896080785e-04 2.200000000000e-14 -1.250000000000e+01 -7.467901313735e-04 0.000000000000e+00 7.467901313510e-04 2.250000000000e-14 -1.300000000000e+01 -7.476984200942e-04 0.000000000000e+00 7.476984200712e-04 2.300000000000e-14 -1.350000000000e+01 -7.483036979031e-04 0.000000000000e+00 7.483036978796e-04 2.350000000000e-14 -1.400000000000e+01 -7.486873623695e-04 0.000000000000e+00 7.486873623455e-04 2.400000000000e-14 -1.450000000000e+01 -7.489362411485e-04 0.000000000000e+00 7.489362411240e-04 2.450000000000e-14 -1.500000000000e+01 -7.491376782081e-04 0.000000000000e+00 7.491376781831e-04 2.500000000000e-14 -1.550000000000e+01 -7.493277372408e-04 0.000000000000e+00 7.493277372153e-04 2.550000000000e-14 -1.600000000000e+01 -7.495110950349e-04 0.000000000000e+00 7.495110950089e-04 2.600000000000e-14 -1.650000000000e+01 -7.496885801223e-04 0.000000000000e+00 7.496885800958e-04 2.650000000000e-14 -1.700000000000e+01 -7.498607210028e-04 0.000000000000e+00 7.498607209758e-04 2.700000000000e-14 -1.750000000000e+01 -7.500279753924e-04 0.000000000000e+00 7.500279753649e-04 2.750000000000e-14 -1.800000000000e+01 -7.501907513537e-04 0.000000000000e+00 7.501907513257e-04 2.800000000000e-14 -1.850000000000e+01 -7.503494139320e-04 0.000000000000e+00 7.503494139035e-04 2.850000000000e-14 -1.900000000000e+01 -7.505042901275e-04 0.000000000000e+00 7.505042900985e-04 2.900000000000e-14 -1.950000000000e+01 -7.506556732479e-04 0.000000000000e+00 7.506556732184e-04 2.950000000000e-14 -2.000000000000e+01 -7.508038267694e-04 0.000000000000e+00 7.508038267394e-04 3.000000000000e-14 -1.000000000000e+00 -8.962774286818e-05 0.000000000000e+00 8.962774285718e-05 1.100000000000e-14 -1.500000000000e+00 -1.271368463863e-04 0.000000000000e+00 1.271368463748e-04 1.150000000000e-14 -2.000000000000e+00 -1.598680021654e-04 0.000000000000e+00 1.598680021534e-04 1.200000000000e-14 -2.500000000000e+00 -1.880569896994e-04 0.000000000000e+00 1.880569896869e-04 1.250000000000e-14 -3.000000000000e+00 -2.120265456108e-04 0.000000000000e+00 2.120265455978e-04 1.300000000000e-14 -3.500000000000e+00 -2.321572909092e-04 0.000000000000e+00 2.321572908957e-04 1.350000000000e-14 -4.000000000000e+00 -2.488628930111e-04 0.000000000000e+00 2.488628929971e-04 1.400000000000e-14 -4.500000000000e+00 -2.625683791683e-04 0.000000000000e+00 2.625683791538e-04 1.450000000000e-14 -5.000000000000e+00 -2.736916756322e-04 0.000000000000e+00 2.736916756172e-04 1.500000000000e-14 -5.500000000000e+00 -2.826288591753e-04 0.000000000000e+00 2.826288591598e-04 1.550000000000e-14 -6.000000000000e+00 -2.897434548682e-04 0.000000000000e+00 2.897434548522e-04 1.600000000000e-14 -6.500000000000e+00 -2.953597424177e-04 0.000000000000e+00 2.953597424012e-04 1.650000000000e-14 -7.000000000000e+00 -2.997597044833e-04 0.000000000000e+00 2.997597044663e-04 1.700000000000e-14 -7.500000000000e+00 -3.031830325516e-04 0.000000000000e+00 3.031830325341e-04 1.750000000000e-14 -8.000000000000e+00 -3.058294695818e-04 0.000000000000e+00 3.058294695638e-04 1.800000000000e-14 -8.500000000000e+00 -3.078627066142e-04 0.000000000000e+00 3.078627065957e-04 1.850000000000e-14 -9.000000000000e+00 -3.094150858906e-04 0.000000000000e+00 3.094150858716e-04 1.900000000000e-14 -9.500000000000e+00 -3.105924964231e-04 0.000000000000e+00 3.105924964036e-04 1.950000000000e-14 -1.000000000000e+01 -3.114790214992e-04 0.000000000000e+00 3.114790214792e-04 2.000000000000e-14 -1.050000000000e+01 -3.121411224411e-04 0.000000000000e+00 3.121411224206e-04 2.050000000000e-14 -1.100000000000e+01 -3.126312201066e-04 0.000000000000e+00 3.126312200856e-04 2.100000000000e-14 -1.150000000000e+01 -3.129907139205e-04 0.000000000000e+00 3.129907138990e-04 2.150000000000e-14 -1.200000000000e+01 -3.132524835782e-04 0.000000000000e+00 3.132524835562e-04 2.200000000000e-14 -1.250000000000e+01 -3.134429524723e-04 0.000000000000e+00 3.134429524498e-04 2.250000000000e-14 -1.300000000000e+01 -3.135837288717e-04 0.000000000000e+00 3.135837288487e-04 2.300000000000e-14 -1.350000000000e+01 -3.136926058294e-04 0.000000000000e+00 3.136926058059e-04 2.350000000000e-14 -1.400000000000e+01 -3.137834126909e-04 0.000000000000e+00 3.137834126669e-04 2.400000000000e-14 -1.450000000000e+01 -3.138651109397e-04 0.000000000000e+00 3.138651109152e-04 2.450000000000e-14 -1.500000000000e+01 -3.139421867239e-04 0.000000000000e+00 3.139421866989e-04 2.500000000000e-14 -1.550000000000e+01 -3.140165028491e-04 0.000000000000e+00 3.140165028236e-04 2.550000000000e-14 -1.600000000000e+01 -3.140888173337e-04 0.000000000000e+00 3.140888173077e-04 2.600000000000e-14 -1.650000000000e+01 -3.141594822223e-04 0.000000000000e+00 3.141594821958e-04 2.650000000000e-14 -1.700000000000e+01 -3.142286987147e-04 0.000000000000e+00 3.142286986877e-04 2.700000000000e-14 -1.750000000000e+01 -3.142966058943e-04 0.000000000000e+00 3.142966058668e-04 2.750000000000e-14 -1.800000000000e+01 -3.143633127593e-04 0.000000000000e+00 3.143633127313e-04 2.800000000000e-14 -1.850000000000e+01 -3.144289107833e-04 0.000000000000e+00 3.144289107548e-04 2.850000000000e-14 -1.900000000000e+01 -3.144934794572e-04 0.000000000000e+00 3.144934794282e-04 2.900000000000e-14 -1.950000000000e+01 -3.145570891206e-04 0.000000000000e+00 3.145570890911e-04 2.950000000000e-14 -2.000000000000e+01 -3.146198026510e-04 0.000000000000e+00 3.146198026210e-04 3.000000000000e-14 -1.000000000000e+00 -8.936670951478e-05 0.000000000000e+00 8.936670950378e-05 1.100000000000e-14 -1.500000000000e+00 -1.267884036694e-04 0.000000000000e+00 1.267884036579e-04 1.150000000000e-14 -2.000000000000e+00 -1.594630864832e-04 0.000000000000e+00 1.594630864712e-04 1.200000000000e-14 -2.500000000000e+00 -1.876243447824e-04 0.000000000000e+00 1.876243447699e-04 1.250000000000e-14 -3.000000000000e+00 -2.115907513589e-04 0.000000000000e+00 2.115907513459e-04 1.300000000000e-14 -3.500000000000e+00 -2.317376748748e-04 0.000000000000e+00 2.317376748613e-04 1.350000000000e-14 -4.000000000000e+00 -2.484732292477e-04 0.000000000000e+00 2.484732292337e-04 1.400000000000e-14 -4.500000000000e+00 -2.622172153091e-04 0.000000000000e+00 2.622172152946e-04 1.450000000000e-14 -5.000000000000e+00 -2.733830853643e-04 0.000000000000e+00 2.733830853493e-04 1.500000000000e-14 -5.500000000000e+00 -2.823634115615e-04 0.000000000000e+00 2.823634115460e-04 1.550000000000e-14 -6.000000000000e+00 -2.895192227713e-04 0.000000000000e+00 2.895192227553e-04 1.600000000000e-14 -6.500000000000e+00 -2.951732229191e-04 0.000000000000e+00 2.951732229026e-04 1.650000000000e-14 -7.000000000000e+00 -2.996065771741e-04 0.000000000000e+00 2.996065771571e-04 1.700000000000e-14 -7.500000000000e+00 -3.030587271955e-04 0.000000000000e+00 3.030587271780e-04 1.750000000000e-14 -8.000000000000e+00 -3.057295493058e-04 0.000000000000e+00 3.057295492878e-04 1.800000000000e-14 -8.500000000000e+00 -3.077830949605e-04 0.000000000000e+00 3.077830949420e-04 1.850000000000e-14 -9.000000000000e+00 -3.093521757546e-04 0.000000000000e+00 3.093521757356e-04 1.900000000000e-14 -9.500000000000e+00 -3.105431785929e-04 0.000000000000e+00 3.105431785734e-04 1.950000000000e-14 -1.000000000000e+01 -3.114406634369e-04 0.000000000000e+00 3.114406634169e-04 2.000000000000e-14 -1.050000000000e+01 -3.121115212811e-04 0.000000000000e+00 3.121115212606e-04 2.050000000000e-14 -1.100000000000e+01 -3.126085432951e-04 0.000000000000e+00 3.126085432741e-04 2.100000000000e-14 -1.150000000000e+01 -3.129734368091e-04 0.000000000000e+00 3.129734367876e-04 2.150000000000e-14 -1.200000000000e+01 -3.132393280142e-04 0.000000000000e+00 3.132393279922e-04 2.200000000000e-14 -1.250000000000e+01 -3.134328291100e-04 0.000000000000e+00 3.134328290875e-04 2.250000000000e-14 -1.300000000000e+01 -3.135756911149e-04 0.000000000000e+00 3.135756910919e-04 2.300000000000e-14 -1.350000000000e+01 -3.136858423272e-04 0.000000000000e+00 3.136858423037e-04 2.350000000000e-14 -1.400000000000e+01 -3.137773093843e-04 0.000000000000e+00 3.137773093603e-04 2.400000000000e-14 -1.450000000000e+01 -3.138593093723e-04 0.000000000000e+00 3.138593093478e-04 2.450000000000e-14 -1.500000000000e+01 -3.139365264580e-04 0.000000000000e+00 3.139365264330e-04 2.500000000000e-14 -1.550000000000e+01 -3.140109205279e-04 0.000000000000e+00 3.140109205024e-04 2.550000000000e-14 -1.600000000000e+01 -3.140832870372e-04 0.000000000000e+00 3.140832870112e-04 2.600000000000e-14 -1.650000000000e+01 -3.141539916725e-04 0.000000000000e+00 3.141539916460e-04 2.650000000000e-14 -1.700000000000e+01 -3.142232408514e-04 0.000000000000e+00 3.142232408244e-04 2.700000000000e-14 -1.750000000000e+01 -3.142911758892e-04 0.000000000000e+00 3.142911758617e-04 2.750000000000e-14 -1.800000000000e+01 -3.143579068993e-04 0.000000000000e+00 3.143579068713e-04 2.800000000000e-14 -1.850000000000e+01 -3.144235260178e-04 0.000000000000e+00 3.144235259893e-04 2.850000000000e-14 -1.900000000000e+01 -3.144881131927e-04 0.000000000000e+00 3.144881131637e-04 2.900000000000e-14 -1.950000000000e+01 -3.145517391149e-04 0.000000000000e+00 3.145517390854e-04 2.950000000000e-14 -2.000000000000e+01 -3.146144669491e-04 0.000000000000e+00 3.146144669191e-04 3.000000000000e-14 -1.000000000000e+00 -8.904720042565e-05 0.000000000000e+00 8.904720041465e-05 1.100000000000e-14 -1.500000000000e+00 -1.263608541419e-04 0.000000000000e+00 1.263608541304e-04 1.150000000000e-14 -2.000000000000e+00 -1.589649172166e-04 0.000000000000e+00 1.589649172046e-04 1.200000000000e-14 -2.500000000000e+00 -1.870905518040e-04 0.000000000000e+00 1.870905517915e-04 1.250000000000e-14 -3.000000000000e+00 -2.110514835809e-04 0.000000000000e+00 2.110514835679e-04 1.300000000000e-14 -3.500000000000e+00 -2.312168514913e-04 0.000000000000e+00 2.312168514778e-04 1.350000000000e-14 -4.000000000000e+00 -2.479880980382e-04 0.000000000000e+00 2.479880980242e-04 1.400000000000e-14 -4.500000000000e+00 -2.617786758370e-04 0.000000000000e+00 2.617786758225e-04 1.450000000000e-14 -5.000000000000e+00 -2.729965440868e-04 0.000000000000e+00 2.729965440718e-04 1.500000000000e-14 -5.500000000000e+00 -2.820299223774e-04 0.000000000000e+00 2.820299223619e-04 1.550000000000e-14 -6.000000000000e+00 -2.892366974375e-04 0.000000000000e+00 2.892366974215e-04 1.600000000000e-14 -6.500000000000e+00 -2.949375527704e-04 0.000000000000e+00 2.949375527539e-04 1.650000000000e-14 -7.000000000000e+00 -2.994125698990e-04 0.000000000000e+00 2.994125698820e-04 1.700000000000e-14 -7.500000000000e+00 -3.029008177412e-04 0.000000000000e+00 3.029008177237e-04 1.750000000000e-14 -8.000000000000e+00 -3.056022872592e-04 0.000000000000e+00 3.056022872412e-04 1.800000000000e-14 -8.500000000000e+00 -3.076814394930e-04 0.000000000000e+00 3.076814394745e-04 1.850000000000e-14 -9.000000000000e+00 -3.092716427968e-04 0.000000000000e+00 3.092716427778e-04 1.900000000000e-14 -9.500000000000e+00 -3.104798859111e-04 0.000000000000e+00 3.104798858916e-04 1.950000000000e-14 -1.000000000000e+01 -3.113913114269e-04 0.000000000000e+00 3.113913114069e-04 2.000000000000e-14 -1.050000000000e+01 -3.120733395601e-04 0.000000000000e+00 3.120733395396e-04 2.050000000000e-14 -1.100000000000e+01 -3.125792201927e-04 0.000000000000e+00 3.125792201717e-04 2.100000000000e-14 -1.150000000000e+01 -3.129510437868e-04 0.000000000000e+00 3.129510437653e-04 2.150000000000e-14 -1.200000000000e+01 -3.132222443637e-04 0.000000000000e+00 3.132222443417e-04 2.200000000000e-14 -1.250000000000e+01 -3.134196703848e-04 0.000000000000e+00 3.134196703623e-04 2.250000000000e-14 -1.300000000000e+01 -3.135652506010e-04 0.000000000000e+00 3.135652505780e-04 2.300000000000e-14 -1.350000000000e+01 -3.136770781280e-04 0.000000000000e+00 3.136770781045e-04 2.350000000000e-14 -1.400000000000e+01 -3.137694199956e-04 0.000000000000e+00 3.137694199716e-04 2.400000000000e-14 -1.450000000000e+01 -3.138518163722e-04 0.000000000000e+00 3.138518163477e-04 2.450000000000e-14 -1.500000000000e+01 -3.139292120661e-04 0.000000000000e+00 3.139292120411e-04 2.500000000000e-14 -1.550000000000e+01 -3.140036983252e-04 0.000000000000e+00 3.140036982997e-04 2.550000000000e-14 -1.600000000000e+01 -3.140761218886e-04 0.000000000000e+00 3.140761218626e-04 2.600000000000e-14 -1.650000000000e+01 -3.141468671668e-04 0.000000000000e+00 3.141468671403e-04 2.650000000000e-14 -1.700000000000e+01 -3.142161477062e-04 0.000000000000e+00 3.142161476792e-04 2.700000000000e-14 -1.750000000000e+01 -3.142841078399e-04 0.000000000000e+00 3.142841078124e-04 2.750000000000e-14 -1.800000000000e+01 -3.143508591692e-04 0.000000000000e+00 3.143508591412e-04 2.800000000000e-14 -1.850000000000e+01 -3.144164947002e-04 0.000000000000e+00 3.144164946717e-04 2.850000000000e-14 -1.900000000000e+01 -3.144810949751e-04 0.000000000000e+00 3.144810949461e-04 2.900000000000e-14 -1.950000000000e+01 -3.145447311382e-04 0.000000000000e+00 3.145447311087e-04 2.950000000000e-14 -2.000000000000e+01 -3.146074667246e-04 0.000000000000e+00 3.146074666946e-04 3.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_rs2m.standard0000644000265600020320000010243012264261473023424 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -4.196271187578e-07 0.000000000000e+00 4.196271177453e-07 1.012500000000e-15 -1.500000000000e+00 -4.196543618405e-07 0.000000000000e+00 4.196543603282e-07 1.512500000000e-15 -2.000000000000e+00 -4.196756620209e-07 0.000000000000e+00 4.196756600084e-07 2.012500000000e-15 -2.500000000000e+00 -4.196939308615e-07 0.000000000000e+00 4.196939283490e-07 2.512500000000e-15 -3.000000000000e+00 -4.197102649712e-07 0.000000000000e+00 4.197102619581e-07 3.012500000000e-15 -3.500000000000e+00 -4.197252165944e-07 0.000000000000e+00 4.197252130827e-07 3.512500000000e-15 -4.000000000000e+00 -4.197391128284e-07 0.000000000000e+00 4.197391088161e-07 4.012500000000e-15 -4.500000000000e+00 -4.197521675975e-07 0.000000000000e+00 4.197521630856e-07 4.512500000000e-15 -5.000000000000e+00 -4.197645304084e-07 0.000000000000e+00 4.197645253964e-07 5.012500000000e-15 -5.500000000000e+00 -4.197763108322e-07 0.000000000000e+00 4.197763053201e-07 5.512500000000e-15 -6.000000000000e+00 -4.197875921089e-07 0.000000000000e+00 4.197875860972e-07 6.012500000000e-15 -6.500000000000e+00 -4.197984392836e-07 0.000000000000e+00 4.197984327713e-07 6.512500000000e-15 -7.000000000000e+00 -4.198089043495e-07 0.000000000000e+00 4.198088973375e-07 7.012500000000e-15 -7.500000000000e+00 -4.198190296616e-07 0.000000000000e+00 4.198190221488e-07 7.512500000000e-15 -8.000000000000e+00 -4.198288502673e-07 0.000000000000e+00 4.198288422544e-07 8.012500000000e-15 -8.500000000000e+00 -4.198383955667e-07 0.000000000000e+00 4.198383870537e-07 8.512500000000e-15 -9.000000000000e+00 -4.198476905104e-07 0.000000000000e+00 4.198476814970e-07 9.012500000000e-15 -9.500000000000e+00 -4.198567564884e-07 0.000000000000e+00 4.198567469759e-07 9.512500000000e-15 -1.000000000000e+01 -4.198656120081e-07 0.000000000000e+00 4.198656019966e-07 1.001250000000e-14 -1.050000000000e+01 -4.198742732118e-07 0.000000000000e+00 4.198742626976e-07 1.051250000000e-14 -1.100000000000e+01 -4.198827542662e-07 0.000000000000e+00 4.198827432535e-07 1.101250000000e-14 -1.150000000000e+01 -4.198910677072e-07 0.000000000000e+00 4.198910561947e-07 1.151250000000e-14 -1.200000000000e+01 -4.198992246754e-07 0.000000000000e+00 4.198992126624e-07 1.201250000000e-14 -1.250000000000e+01 -4.199072351271e-07 0.000000000000e+00 4.199072226153e-07 1.251250000000e-14 -1.300000000000e+01 -4.199151080100e-07 0.000000000000e+00 4.199150949985e-07 1.301250000000e-14 -1.350000000000e+01 -4.199228513940e-07 0.000000000000e+00 4.199228378820e-07 1.351250000000e-14 -1.400000000000e+01 -4.199304725894e-07 0.000000000000e+00 4.199304585766e-07 1.401250000000e-14 -1.450000000000e+01 -4.199379782435e-07 0.000000000000e+00 4.199379637296e-07 1.451250000000e-14 -1.500000000000e+01 -4.199453744200e-07 0.000000000000e+00 4.199453594070e-07 1.501250000000e-14 -1.550000000000e+01 -4.199526666736e-07 0.000000000000e+00 4.199526511616e-07 1.551250000000e-14 -1.600000000000e+01 -4.199598601061e-07 0.000000000000e+00 4.199598440921e-07 1.601250000000e-14 -1.650000000000e+01 -4.199669594064e-07 0.000000000000e+00 4.199669428936e-07 1.651250000000e-14 -1.700000000000e+01 -4.199739689131e-07 0.000000000000e+00 4.199739519006e-07 1.701250000000e-14 -1.750000000000e+01 -4.199808926368e-07 0.000000000000e+00 4.199808751251e-07 1.751250000000e-14 -1.800000000000e+01 -4.199877342995e-07 0.000000000000e+00 4.199877162887e-07 1.801250000000e-14 -1.850000000000e+01 -4.199944973653e-07 0.000000000000e+00 4.199944788516e-07 1.851250000000e-14 -1.900000000000e+01 -4.200011850496e-07 0.000000000000e+00 4.200011660376e-07 1.901250000000e-14 -1.950000000000e+01 -4.200078003690e-07 0.000000000000e+00 4.200077808557e-07 1.951250000000e-14 -2.000000000000e+01 -4.200143461320e-07 0.000000000000e+00 4.200143261201e-07 2.001250000000e-14 -1.000000000000e+00 -8.894791503854e-06 0.000000000000e+00 8.894791502841e-06 1.012500000000e-15 -1.500000000000e+00 -1.114289142718e-05 0.000000000000e+00 1.114289142566e-05 1.512500000000e-15 -2.000000000000e+00 -1.239277624361e-05 0.000000000000e+00 1.239277624160e-05 2.012500000000e-15 -2.500000000000e+00 -1.300570466143e-05 0.000000000000e+00 1.300570465892e-05 2.512500000000e-15 -3.000000000000e+00 -1.325301590490e-05 0.000000000000e+00 1.325301590189e-05 3.012500000000e-15 -3.500000000000e+00 -1.331547303374e-05 0.000000000000e+00 1.331547303023e-05 3.512500000000e-15 -4.000000000000e+00 -1.331945643178e-05 0.000000000000e+00 1.331945642777e-05 4.012500000000e-15 -4.500000000000e+00 -1.331992421570e-05 0.000000000000e+00 1.331992421119e-05 4.512500000000e-15 -5.000000000000e+00 -1.332031386064e-05 0.000000000000e+00 1.332031385563e-05 5.012500000000e-15 -5.500000000000e+00 -1.332066388963e-05 0.000000000000e+00 1.332066388412e-05 5.512500000000e-15 -6.000000000000e+00 -1.332098308645e-05 0.000000000000e+00 1.332098308044e-05 6.012500000000e-15 -6.500000000000e+00 -1.332127770274e-05 0.000000000000e+00 1.332127769623e-05 6.512500000000e-15 -7.000000000000e+00 -1.332155238470e-05 0.000000000000e+00 1.332155237769e-05 7.012500000000e-15 -7.500000000000e+00 -1.332181062420e-05 0.000000000000e+00 1.332181061668e-05 7.512500000000e-15 -8.000000000000e+00 -1.332205508112e-05 0.000000000000e+00 1.332205507311e-05 8.012500000000e-15 -8.500000000000e+00 -1.332228781229e-05 0.000000000000e+00 1.332228780378e-05 8.512500000000e-15 -9.000000000000e+00 -1.332251043291e-05 0.000000000000e+00 1.332251042390e-05 9.012500000000e-15 -9.500000000000e+00 -1.332272423063e-05 0.000000000000e+00 1.332272422111e-05 9.512500000000e-15 -1.000000000000e+01 -1.332293024686e-05 0.000000000000e+00 1.332293023685e-05 1.001250000000e-14 -1.050000000000e+01 -1.332312933528e-05 0.000000000000e+00 1.332312932477e-05 1.051250000000e-14 -1.100000000000e+01 -1.332332220445e-05 0.000000000000e+00 1.332332219344e-05 1.101250000000e-14 -1.150000000000e+01 -1.332350944928e-05 0.000000000000e+00 1.332350943777e-05 1.151250000000e-14 -1.200000000000e+01 -1.332369157452e-05 0.000000000000e+00 1.332369156250e-05 1.201250000000e-14 -1.250000000000e+01 -1.332386901255e-05 0.000000000000e+00 1.332386900003e-05 1.251250000000e-14 -1.300000000000e+01 -1.332404213702e-05 0.000000000000e+00 1.332404212401e-05 1.301250000000e-14 -1.350000000000e+01 -1.332421127341e-05 0.000000000000e+00 1.332421125990e-05 1.351250000000e-14 -1.400000000000e+01 -1.332437670730e-05 0.000000000000e+00 1.332437669329e-05 1.401250000000e-14 -1.450000000000e+01 -1.332453869093e-05 0.000000000000e+00 1.332453867642e-05 1.451250000000e-14 -1.500000000000e+01 -1.332469744845e-05 0.000000000000e+00 1.332469743343e-05 1.501250000000e-14 -1.550000000000e+01 -1.332485318012e-05 0.000000000000e+00 1.332485316461e-05 1.551250000000e-14 -1.600000000000e+01 -1.332500606584e-05 0.000000000000e+00 1.332500604982e-05 1.601250000000e-14 -1.650000000000e+01 -1.332515626790e-05 0.000000000000e+00 1.332515625139e-05 1.651250000000e-14 -1.700000000000e+01 -1.332530393338e-05 0.000000000000e+00 1.332530391636e-05 1.701250000000e-14 -1.750000000000e+01 -1.332544919608e-05 0.000000000000e+00 1.332544917857e-05 1.751250000000e-14 -1.800000000000e+01 -1.332559217819e-05 0.000000000000e+00 1.332559216017e-05 1.801250000000e-14 -1.850000000000e+01 -1.332573299163e-05 0.000000000000e+00 1.332573297312e-05 1.851250000000e-14 -1.900000000000e+01 -1.332587173931e-05 0.000000000000e+00 1.332587172030e-05 1.901250000000e-14 -1.950000000000e+01 -1.332600851606e-05 0.000000000000e+00 1.332600849655e-05 1.951250000000e-14 -2.000000000000e+01 -1.332614340953e-05 0.000000000000e+00 1.332614338952e-05 2.001250000000e-14 -1.000000000000e+00 -2.241708994175e-05 0.000000000000e+00 2.241708994074e-05 1.012500000000e-15 -1.500000000000e+00 -3.159357727360e-05 0.000000000000e+00 3.159357727208e-05 1.512500000000e-15 -2.000000000000e+00 -3.945793363491e-05 0.000000000000e+00 3.945793363290e-05 2.012500000000e-15 -2.500000000000e+00 -4.609353820640e-05 0.000000000000e+00 4.609353820389e-05 2.512500000000e-15 -3.000000000000e+00 -5.161298396045e-05 0.000000000000e+00 5.161298395743e-05 3.012500000000e-15 -3.500000000000e+00 -5.614542027113e-05 0.000000000000e+00 5.614542026762e-05 3.512500000000e-15 -4.000000000000e+00 -5.982505597186e-05 0.000000000000e+00 5.982505596785e-05 4.012500000000e-15 -4.500000000000e+00 -6.278231395515e-05 0.000000000000e+00 6.278231395064e-05 4.512500000000e-15 -5.000000000000e+00 -6.513794426898e-05 0.000000000000e+00 6.513794426397e-05 5.012500000000e-15 -5.500000000000e+00 -6.699972417554e-05 0.000000000000e+00 6.699972417003e-05 5.512500000000e-15 -6.000000000000e+00 -6.846110178510e-05 0.000000000000e+00 6.846110177908e-05 6.012500000000e-15 -6.500000000000e+00 -6.960118338591e-05 0.000000000000e+00 6.960118337940e-05 6.512500000000e-15 -7.000000000000e+00 -7.048559971418e-05 0.000000000000e+00 7.048559970717e-05 7.012500000000e-15 -7.500000000000e+00 -7.116790005156e-05 0.000000000000e+00 7.116790004404e-05 7.512500000000e-15 -8.000000000000e+00 -7.169119860543e-05 0.000000000000e+00 7.169119859742e-05 8.012500000000e-15 -8.500000000000e+00 -7.208986148696e-05 0.000000000000e+00 7.208986147844e-05 8.512500000000e-15 -9.000000000000e+00 -7.239108941657e-05 0.000000000000e+00 7.239108940756e-05 9.012500000000e-15 -9.500000000000e+00 -7.261631560212e-05 0.000000000000e+00 7.261631559260e-05 9.512500000000e-15 -1.000000000000e+01 -7.278238966706e-05 0.000000000000e+00 7.278238965705e-05 1.001250000000e-14 -1.050000000000e+01 -7.290255256866e-05 0.000000000000e+00 7.290255255815e-05 1.051250000000e-14 -1.100000000000e+01 -7.298722621614e-05 0.000000000000e+00 7.298722620513e-05 1.101250000000e-14 -1.150000000000e+01 -7.304465023543e-05 0.000000000000e+00 7.304465022392e-05 1.151250000000e-14 -1.200000000000e+01 -7.308140305794e-05 0.000000000000e+00 7.308140304592e-05 1.201250000000e-14 -1.250000000000e+01 -7.310285202372e-05 0.000000000000e+00 7.310285201120e-05 1.251250000000e-14 -1.300000000000e+01 -7.311359497110e-05 0.000000000000e+00 7.311359495809e-05 1.301250000000e-14 -1.350000000000e+01 -7.311792238103e-05 0.000000000000e+00 7.311792236752e-05 1.351250000000e-14 -1.400000000000e+01 -7.311962258769e-05 0.000000000000e+00 7.311962257368e-05 1.401250000000e-14 -1.450000000000e+01 -7.312067416739e-05 0.000000000000e+00 7.312067415288e-05 1.451250000000e-14 -1.500000000000e+01 -7.312158468238e-05 0.000000000000e+00 7.312158466737e-05 1.501250000000e-14 -1.550000000000e+01 -7.312244633056e-05 0.000000000000e+00 7.312244631505e-05 1.551250000000e-14 -1.600000000000e+01 -7.312327726041e-05 0.000000000000e+00 7.312327724440e-05 1.601250000000e-14 -1.650000000000e+01 -7.312408266862e-05 0.000000000000e+00 7.312408265211e-05 1.651250000000e-14 -1.700000000000e+01 -7.312486512991e-05 0.000000000000e+00 7.312486511289e-05 1.701250000000e-14 -1.750000000000e+01 -7.312562651535e-05 0.000000000000e+00 7.312562649784e-05 1.751250000000e-14 -1.800000000000e+01 -7.312636840179e-05 0.000000000000e+00 7.312636838378e-05 1.801250000000e-14 -1.850000000000e+01 -7.312709217975e-05 0.000000000000e+00 7.312709216124e-05 1.851250000000e-14 -1.900000000000e+01 -7.312779909344e-05 0.000000000000e+00 7.312779907442e-05 1.901250000000e-14 -1.950000000000e+01 -7.312849026276e-05 0.000000000000e+00 7.312849024325e-05 1.951250000000e-14 -2.000000000000e+01 -7.312916669921e-05 0.000000000000e+00 7.312916667920e-05 2.001250000000e-14 -1.000000000000e+00 -3.341797476100e-07 0.000000000000e+00 3.341797466099e-07 1.000000000938e-15 -1.500000000000e+00 -3.342018088648e-07 0.000000000000e+00 3.342018073654e-07 1.500000000938e-15 -2.000000000000e+00 -3.342193215666e-07 0.000000000000e+00 3.342193195669e-07 2.000000000938e-15 -2.500000000000e+00 -3.342344888544e-07 0.000000000000e+00 3.342344863545e-07 2.500000000938e-15 -3.000000000000e+00 -3.342481416958e-07 0.000000000000e+00 3.342481386960e-07 3.000000000938e-15 -3.500000000000e+00 -3.342607024582e-07 0.000000000000e+00 3.342606989582e-07 3.500000000938e-15 -4.000000000000e+00 -3.342724237878e-07 0.000000000000e+00 3.342724197880e-07 4.000000000938e-15 -4.500000000000e+00 -3.342834723353e-07 0.000000000000e+00 3.342834678359e-07 4.500000000938e-15 -5.000000000000e+00 -3.342939653840e-07 0.000000000000e+00 3.342939603843e-07 5.000000000938e-15 -5.500000000000e+00 -3.343039893795e-07 0.000000000000e+00 3.343039838804e-07 5.500000000938e-15 -6.000000000000e+00 -3.343136103060e-07 0.000000000000e+00 3.343136043059e-07 6.000000000938e-15 -6.500000000000e+00 -3.343228799197e-07 0.000000000000e+00 3.343228734201e-07 6.500000000938e-15 -7.000000000000e+00 -3.343318397335e-07 0.000000000000e+00 3.343318327344e-07 7.000000000938e-15 -7.500000000000e+00 -3.343405236577e-07 0.000000000000e+00 3.343405161566e-07 7.500000000938e-15 -8.000000000000e+00 -3.343489598153e-07 0.000000000000e+00 3.343489518147e-07 8.000000000938e-15 -8.500000000000e+00 -3.343571718518e-07 0.000000000000e+00 3.343571633519e-07 8.500000000938e-15 -9.000000000000e+00 -3.343651798693e-07 0.000000000000e+00 3.343651708699e-07 9.000000000938e-15 -9.500000000000e+00 -3.343730011320e-07 0.000000000000e+00 3.343729916311e-07 9.500000000938e-15 -1.000000000000e+01 -3.343806505920e-07 0.000000000000e+00 3.343806405910e-07 1.000000000094e-14 -1.050000000000e+01 -3.343881413093e-07 0.000000000000e+00 3.343881308085e-07 1.050000000094e-14 -1.100000000000e+01 -3.343954847650e-07 0.000000000000e+00 3.343954737665e-07 1.100000000094e-14 -1.150000000000e+01 -3.344026911264e-07 0.000000000000e+00 3.344026796264e-07 1.150000000094e-14 -1.200000000000e+01 -3.344097694313e-07 0.000000000000e+00 3.344097574319e-07 1.200000000094e-14 -1.250000000000e+01 -3.344167277732e-07 0.000000000000e+00 3.344167152737e-07 1.250000000094e-14 -1.300000000000e+01 -3.344235734249e-07 0.000000000000e+00 3.344235604249e-07 1.300000000094e-14 -1.350000000000e+01 -3.344303129513e-07 0.000000000000e+00 3.344302994518e-07 1.350000000094e-14 -1.400000000000e+01 -3.344369523071e-07 0.000000000000e+00 3.344369383068e-07 1.400000000094e-14 -1.450000000000e+01 -3.344434969061e-07 0.000000000000e+00 3.344434824058e-07 1.450000000094e-14 -1.500000000000e+01 -3.344499516934e-07 0.000000000000e+00 3.344499366937e-07 1.500000000094e-14 -1.550000000000e+01 -3.344563211990e-07 0.000000000000e+00 3.344563056995e-07 1.550000000094e-14 -1.600000000000e+01 -3.344626095837e-07 0.000000000000e+00 3.344625935842e-07 1.600000000094e-14 -1.650000000000e+01 -3.344688206805e-07 0.000000000000e+00 3.344688041809e-07 1.650000000094e-14 -1.700000000000e+01 -3.344749580289e-07 0.000000000000e+00 3.344749410300e-07 1.700000000094e-14 -1.750000000000e+01 -3.344810249094e-07 0.000000000000e+00 3.344810074098e-07 1.750000000094e-14 -1.800000000000e+01 -3.344870243630e-07 0.000000000000e+00 3.344870063625e-07 1.800000000094e-14 -1.850000000000e+01 -3.344929592189e-07 0.000000000000e+00 3.344929407178e-07 1.850000000094e-14 -1.900000000000e+01 -3.344988321139e-07 0.000000000000e+00 3.344988131126e-07 1.900000000094e-14 -1.950000000000e+01 -3.345046455088e-07 0.000000000000e+00 3.345046260094e-07 1.950000000094e-14 -2.000000000000e+01 -3.345104017099e-07 0.000000000000e+00 3.345103817118e-07 2.000000000094e-14 -1.000000000000e+00 -1.334654800008e-05 0.000000000000e+00 1.334654799908e-05 1.000000000938e-15 -1.500000000000e+00 -1.660520622330e-05 0.000000000000e+00 1.660520622180e-05 1.500000000938e-15 -2.000000000000e+00 -1.834097332515e-05 0.000000000000e+00 1.834097332315e-05 2.000000000938e-15 -2.500000000000e+00 -1.912373612001e-05 0.000000000000e+00 1.912373611751e-05 2.500000000938e-15 -3.000000000000e+00 -1.937494856379e-05 0.000000000000e+00 1.937494856079e-05 3.000000000938e-15 -3.500000000000e+00 -1.939909446666e-05 0.000000000000e+00 1.939909446316e-05 3.500000000938e-15 -4.000000000000e+00 -1.939986272673e-05 0.000000000000e+00 1.939986272273e-05 4.000000000938e-15 -4.500000000000e+00 -1.940050674358e-05 0.000000000000e+00 1.940050673908e-05 4.500000000938e-15 -5.000000000000e+00 -1.940107739083e-05 0.000000000000e+00 1.940107738584e-05 5.000000000938e-15 -5.500000000000e+00 -1.940159084720e-05 0.000000000000e+00 1.940159084170e-05 5.500000000938e-15 -6.000000000000e+00 -1.940205932485e-05 0.000000000000e+00 1.940205931885e-05 6.000000000938e-15 -6.500000000000e+00 -1.940249192030e-05 0.000000000000e+00 1.940249191380e-05 6.500000000938e-15 -7.000000000000e+00 -1.940289541243e-05 0.000000000000e+00 1.940289540543e-05 7.000000000938e-15 -7.500000000000e+00 -1.940327489785e-05 0.000000000000e+00 1.940327489035e-05 7.500000000938e-15 -8.000000000000e+00 -1.940363425873e-05 0.000000000000e+00 1.940363425073e-05 8.000000000938e-15 -8.500000000000e+00 -1.940397649651e-05 0.000000000000e+00 1.940397648800e-05 8.500000000938e-15 -9.000000000000e+00 -1.940430396773e-05 0.000000000000e+00 1.940430395873e-05 9.000000000938e-15 -9.500000000000e+00 -1.940461855075e-05 0.000000000000e+00 1.940461854125e-05 9.500000000938e-15 -1.000000000000e+01 -1.940492176452e-05 0.000000000000e+00 1.940492175452e-05 1.000000000094e-14 -1.050000000000e+01 -1.940521485405e-05 0.000000000000e+00 1.940521484355e-05 1.050000000094e-14 -1.100000000000e+01 -1.940549885270e-05 0.000000000000e+00 1.940549884170e-05 1.100000000094e-14 -1.150000000000e+01 -1.940577462808e-05 0.000000000000e+00 1.940577461658e-05 1.150000000094e-14 -1.200000000000e+01 -1.940604291636e-05 0.000000000000e+00 1.940604290436e-05 1.200000000094e-14 -1.250000000000e+01 -1.940630434821e-05 0.000000000000e+00 1.940630433571e-05 1.250000000094e-14 -1.300000000000e+01 -1.940655946871e-05 0.000000000000e+00 1.940655945571e-05 1.300000000094e-14 -1.350000000000e+01 -1.940680875273e-05 0.000000000000e+00 1.940680873923e-05 1.350000000094e-14 -1.400000000000e+01 -1.940705261699e-05 0.000000000000e+00 1.940705260299e-05 1.400000000094e-14 -1.450000000000e+01 -1.940729142961e-05 0.000000000000e+00 1.940729141511e-05 1.450000000094e-14 -1.500000000000e+01 -1.940752551780e-05 0.000000000000e+00 1.940752550279e-05 1.500000000094e-14 -1.550000000000e+01 -1.940775517396e-05 0.000000000000e+00 1.940775515846e-05 1.550000000094e-14 -1.600000000000e+01 -1.940798066077e-05 0.000000000000e+00 1.940798064477e-05 1.600000000094e-14 -1.650000000000e+01 -1.940820221528e-05 0.000000000000e+00 1.940820219878e-05 1.650000000094e-14 -1.700000000000e+01 -1.940842005235e-05 0.000000000000e+00 1.940842003535e-05 1.700000000094e-14 -1.750000000000e+01 -1.940863436750e-05 0.000000000000e+00 1.940863434999e-05 1.750000000094e-14 -1.800000000000e+01 -1.940884533926e-05 0.000000000000e+00 1.940884532126e-05 1.800000000094e-14 -1.850000000000e+01 -1.940905313127e-05 0.000000000000e+00 1.940905311276e-05 1.850000000094e-14 -1.900000000000e+01 -1.940925789394e-05 0.000000000000e+00 1.940925787494e-05 1.900000000094e-14 -1.950000000000e+01 -1.940945976594e-05 0.000000000000e+00 1.940945974644e-05 1.950000000094e-14 -2.000000000000e+01 -1.940965887550e-05 0.000000000000e+00 1.940965885550e-05 2.000000000094e-14 -1.000000000000e+00 -3.515269624784e-05 0.000000000000e+00 3.515269624684e-05 1.000000000938e-15 -1.500000000000e+00 -4.955067276202e-05 0.000000000000e+00 4.955067276052e-05 1.500000000938e-15 -2.000000000000e+00 -6.189735679345e-05 0.000000000000e+00 6.189735679145e-05 2.000000000938e-15 -2.500000000000e+00 -7.232075174473e-05 0.000000000000e+00 7.232075174223e-05 2.500000000938e-15 -3.000000000000e+00 -8.099347685950e-05 0.000000000000e+00 8.099347685650e-05 3.000000000938e-15 -3.500000000000e+00 -8.811435192183e-05 0.000000000000e+00 8.811435191833e-05 3.500000000938e-15 -4.000000000000e+00 -9.389122285824e-05 0.000000000000e+00 9.389122285424e-05 4.000000000938e-15 -4.500000000000e+00 -9.852731187993e-05 0.000000000000e+00 9.852731187543e-05 4.500000000938e-15 -5.000000000000e+00 -1.022118166988e-04 0.000000000000e+00 1.022118166938e-04 5.000000000938e-15 -5.500000000000e+00 -1.051143936752e-04 0.000000000000e+00 1.051143936697e-04 5.500000000938e-15 -6.000000000000e+00 -1.073826965253e-04 0.000000000000e+00 1.073826965193e-04 6.000000000938e-15 -6.500000000000e+00 -1.091420809863e-04 0.000000000000e+00 1.091420809798e-04 6.500000000938e-15 -7.000000000000e+00 -1.104967768005e-04 0.000000000000e+00 1.104967767935e-04 7.000000000938e-15 -7.500000000000e+00 -1.115319603269e-04 0.000000000000e+00 1.115319603194e-04 7.500000000938e-15 -8.000000000000e+00 -1.123162802957e-04 0.000000000000e+00 1.123162802877e-04 8.000000000938e-15 -8.500000000000e+00 -1.129044872612e-04 0.000000000000e+00 1.129044872527e-04 8.500000000938e-15 -9.000000000000e+00 -1.133399244590e-04 0.000000000000e+00 1.133399244500e-04 9.000000000938e-15 -9.500000000000e+00 -1.136567429068e-04 0.000000000000e+00 1.136567428973e-04 9.500000000938e-15 -1.000000000000e+01 -1.138817892212e-04 0.000000000000e+00 1.138817892112e-04 1.000000000094e-14 -1.050000000000e+01 -1.140361736302e-04 0.000000000000e+00 1.140361736197e-04 1.050000000094e-14 -1.100000000000e+01 -1.141365638266e-04 0.000000000000e+00 1.141365638156e-04 1.100000000094e-14 -1.150000000000e+01 -1.141962861120e-04 0.000000000000e+00 1.141962861005e-04 1.150000000094e-14 -1.200000000000e+01 -1.142263999097e-04 0.000000000000e+00 1.142263998977e-04 1.200000000094e-14 -1.250000000000e+01 -1.142372346615e-04 0.000000000000e+00 1.142372346490e-04 1.250000000094e-14 -1.300000000000e+01 -1.142400839225e-04 0.000000000000e+00 1.142400839095e-04 1.300000000094e-14 -1.350000000000e+01 -1.142417307263e-04 0.000000000000e+00 1.142417307128e-04 1.350000000094e-14 -1.400000000000e+01 -1.142432434201e-04 0.000000000000e+00 1.142432434061e-04 1.400000000094e-14 -1.450000000000e+01 -1.142446952741e-04 0.000000000000e+00 1.142446952596e-04 1.450000000094e-14 -1.500000000000e+01 -1.142460955513e-04 0.000000000000e+00 1.142460955363e-04 1.500000000094e-14 -1.550000000000e+01 -1.142474489462e-04 0.000000000000e+00 1.142474489307e-04 1.550000000094e-14 -1.600000000000e+01 -1.142487593679e-04 0.000000000000e+00 1.142487593519e-04 1.600000000094e-14 -1.650000000000e+01 -1.142500302773e-04 0.000000000000e+00 1.142500302608e-04 1.650000000094e-14 -1.700000000000e+01 -1.142512647626e-04 0.000000000000e+00 1.142512647456e-04 1.700000000094e-14 -1.750000000000e+01 -1.142524655851e-04 0.000000000000e+00 1.142524655676e-04 1.750000000094e-14 -1.800000000000e+01 -1.142536352192e-04 0.000000000000e+00 1.142536352012e-04 1.800000000094e-14 -1.850000000000e+01 -1.142547758859e-04 0.000000000000e+00 1.142547758674e-04 1.850000000094e-14 -1.900000000000e+01 -1.142558895836e-04 0.000000000000e+00 1.142558895646e-04 1.900000000094e-14 -1.950000000000e+01 -1.142569781135e-04 0.000000000000e+00 1.142569780940e-04 1.950000000094e-14 -2.000000000000e+01 -1.142580431033e-04 0.000000000000e+00 1.142580430833e-04 2.000000000094e-14 -1.000000000000e+00 -5.429666561996e-07 0.000000000000e+00 5.429504630201e-07 1.619317952605e-11 -1.500000000000e+00 -5.430267999477e-07 0.000000000000e+00 5.430106062683e-07 1.619367952607e-11 -2.000000000000e+00 -5.430537035084e-07 0.000000000000e+00 5.430375093290e-07 1.619417952607e-11 -2.500000000000e+00 -5.430762543032e-07 0.000000000000e+00 5.430600596237e-07 1.619467952607e-11 -3.000000000000e+00 -5.430961968421e-07 0.000000000000e+00 5.430800016633e-07 1.619517952607e-11 -3.500000000000e+00 -5.431143141089e-07 0.000000000000e+00 5.430981184295e-07 1.619567952607e-11 -4.000000000000e+00 -5.431310567436e-07 0.000000000000e+00 5.431148605636e-07 1.619617952607e-11 -4.500000000000e+00 -5.431467141768e-07 0.000000000000e+00 5.431305174978e-07 1.619667952607e-11 -5.000000000000e+00 -5.431614859401e-07 0.000000000000e+00 5.431452887602e-07 1.619717952607e-11 -5.500000000000e+00 -5.431755166984e-07 0.000000000000e+00 5.431593190193e-07 1.619767952607e-11 -6.000000000000e+00 -5.431889154076e-07 0.000000000000e+00 5.431727172284e-07 1.619817952607e-11 -6.500000000000e+00 -5.432017665973e-07 0.000000000000e+00 5.431855679183e-07 1.619867952607e-11 -7.000000000000e+00 -5.432141374400e-07 0.000000000000e+00 5.431979382604e-07 1.619917952607e-11 -7.500000000000e+00 -5.432260823750e-07 0.000000000000e+00 5.432098826946e-07 1.619967952607e-11 -8.000000000000e+00 -5.432376462581e-07 0.000000000000e+00 5.432214460786e-07 1.620017952607e-11 -8.500000000000e+00 -5.432488665775e-07 0.000000000000e+00 5.432326658990e-07 1.620067952607e-11 -9.000000000000e+00 -5.432597750456e-07 0.000000000000e+00 5.432435738655e-07 1.620117952607e-11 -9.500000000000e+00 -5.432703987672e-07 0.000000000000e+00 5.432541970870e-07 1.620167952607e-11 -1.000000000000e+01 -5.432807611361e-07 0.000000000000e+00 5.432645589560e-07 1.620217952607e-11 -1.050000000000e+01 -5.432908825051e-07 0.000000000000e+00 5.432746798255e-07 1.620267952607e-11 -1.100000000000e+01 -5.433007807167e-07 0.000000000000e+00 5.432845775355e-07 1.620317952607e-11 -1.150000000000e+01 -5.433104715066e-07 0.000000000000e+00 5.432942678270e-07 1.620367952607e-11 -1.200000000000e+01 -5.433199688530e-07 0.000000000000e+00 5.433037646726e-07 1.620417952607e-11 -1.250000000000e+01 -5.433292852210e-07 0.000000000000e+00 5.433130805429e-07 1.620467952607e-11 -1.300000000000e+01 -5.433384318038e-07 0.000000000000e+00 5.433222266232e-07 1.620517952607e-11 -1.350000000000e+01 -5.433474186724e-07 0.000000000000e+00 5.433312129919e-07 1.620567952607e-11 -1.400000000000e+01 -5.433562549478e-07 0.000000000000e+00 5.433400487678e-07 1.620617952607e-11 -1.450000000000e+01 -5.433649489135e-07 0.000000000000e+00 5.433487422339e-07 1.620667952607e-11 -1.500000000000e+01 -5.433735081198e-07 0.000000000000e+00 5.433573009402e-07 1.620717952607e-11 -1.550000000000e+01 -5.433819394727e-07 0.000000000000e+00 5.433657317920e-07 1.620767952607e-11 -1.600000000000e+01 -5.433902493046e-07 0.000000000000e+00 5.433740411242e-07 1.620817952607e-11 -1.650000000000e+01 -5.433984434462e-07 0.000000000000e+00 5.433822347653e-07 1.620867952607e-11 -1.700000000000e+01 -5.434065272723e-07 0.000000000000e+00 5.433903180921e-07 1.620917952607e-11 -1.750000000000e+01 -5.434145057583e-07 0.000000000000e+00 5.433982960774e-07 1.620967952607e-11 -1.800000000000e+01 -5.434223835088e-07 0.000000000000e+00 5.434061733315e-07 1.621017952607e-11 -1.850000000000e+01 -5.434301648182e-07 0.000000000000e+00 5.434139541376e-07 1.621067952607e-11 -1.900000000000e+01 -5.434378536643e-07 0.000000000000e+00 5.434216424839e-07 1.621117952607e-11 -1.950000000000e+01 -5.434454537706e-07 0.000000000000e+00 5.434292420912e-07 1.621167952607e-11 -2.000000000000e+01 -5.434529686162e-07 0.000000000000e+00 5.434367564369e-07 1.621217952607e-11 -1.000000000000e+00 -5.578696227205e-06 0.000000000000e+00 5.578680034025e-06 1.619317952605e-11 -1.500000000000e+00 -7.055996177823e-06 0.000000000000e+00 7.055979984143e-06 1.619367952607e-11 -2.000000000000e+00 -7.925768586841e-06 0.000000000000e+00 7.925752392662e-06 1.619417952607e-11 -2.500000000000e+00 -8.397469439496e-06 0.000000000000e+00 8.397453244817e-06 1.619467952607e-11 -3.000000000000e+00 -8.630863863633e-06 0.000000000000e+00 8.630847668453e-06 1.619517952607e-11 -3.500000000000e+00 -8.732095329031e-06 0.000000000000e+00 8.732079133351e-06 1.619567952607e-11 -4.000000000000e+00 -8.766251544693e-06 0.000000000000e+00 8.766235348514e-06 1.619617952607e-11 -4.500000000000e+00 -8.773134011903e-06 0.000000000000e+00 8.773117815223e-06 1.619667952607e-11 -5.000000000000e+00 -8.774027029633e-06 0.000000000000e+00 8.774010832453e-06 1.619717952607e-11 -5.500000000000e+00 -8.774313836123e-06 0.000000000000e+00 8.774297638444e-06 1.619767952607e-11 -6.000000000000e+00 -8.774529057069e-06 0.000000000000e+00 8.774512858890e-06 1.619817952607e-11 -6.500000000000e+00 -8.774721749384e-06 0.000000000000e+00 8.774705550705e-06 1.619867952607e-11 -7.000000000000e+00 -8.774900240075e-06 0.000000000000e+00 8.774884040895e-06 1.619917952607e-11 -7.500000000000e+00 -8.775067676584e-06 0.000000000000e+00 8.775051476905e-06 1.619967952607e-11 -8.000000000000e+00 -8.775225988269e-06 0.000000000000e+00 8.775209788090e-06 1.620017952607e-11 -8.500000000000e+00 -8.775376576277e-06 0.000000000000e+00 8.775360375598e-06 1.620067952607e-11 -9.000000000000e+00 -8.775520519259e-06 0.000000000000e+00 8.775504318079e-06 1.620117952607e-11 -9.500000000000e+00 -8.775658670972e-06 0.000000000000e+00 8.775642469293e-06 1.620167952607e-11 -1.000000000000e+01 -8.775791719832e-06 0.000000000000e+00 8.775775517651e-06 1.620217952607e-11 -1.050000000000e+01 -8.775920229302e-06 0.000000000000e+00 8.775904026622e-06 1.620267952607e-11 -1.100000000000e+01 -8.776044666654e-06 0.000000000000e+00 8.776028463474e-06 1.620317952607e-11 -1.150000000000e+01 -8.776165423940e-06 0.000000000000e+00 8.776149220261e-06 1.620367952607e-11 -1.200000000000e+01 -8.776282833618e-06 0.000000000000e+00 8.776266629439e-06 1.620417952607e-11 -1.250000000000e+01 -8.776397180329e-06 0.000000000000e+00 8.776380975650e-06 1.620467952607e-11 -1.300000000000e+01 -8.776508709922e-06 0.000000000000e+00 8.776492504742e-06 1.620517952607e-11 -1.350000000000e+01 -8.776617636437e-06 0.000000000000e+00 8.776601430756e-06 1.620567952607e-11 -1.400000000000e+01 -8.776724147578e-06 0.000000000000e+00 8.776707941398e-06 1.620617952607e-11 -1.450000000000e+01 -8.776828409055e-06 0.000000000000e+00 8.776812202376e-06 1.620667952607e-11 -1.500000000000e+01 -8.776930568042e-06 0.000000000000e+00 8.776914360863e-06 1.620717952607e-11 -1.550000000000e+01 -8.777030755980e-06 0.000000000000e+00 8.777014548300e-06 1.620767952607e-11 -1.600000000000e+01 -8.777129090855e-06 0.000000000000e+00 8.777112882675e-06 1.620817952607e-11 -1.650000000000e+01 -8.777225679073e-06 0.000000000000e+00 8.777209470395e-06 1.620867952607e-11 -1.700000000000e+01 -8.777320617017e-06 0.000000000000e+00 8.777304407837e-06 1.620917952607e-11 -1.750000000000e+01 -8.777413992323e-06 0.000000000000e+00 8.777397782642e-06 1.620967952607e-11 -1.800000000000e+01 -8.777505884978e-06 0.000000000000e+00 8.777489674798e-06 1.621017952607e-11 -1.850000000000e+01 -8.777596368238e-06 0.000000000000e+00 8.777580157558e-06 1.621067952607e-11 -1.900000000000e+01 -8.777685509399e-06 0.000000000000e+00 8.777669298219e-06 1.621117952607e-11 -1.950000000000e+01 -8.777773370470e-06 0.000000000000e+00 8.777757158790e-06 1.621167952607e-11 -2.000000000000e+01 -8.777860008743e-06 0.000000000000e+00 8.777843796561e-06 1.621217952607e-11 -1.000000000000e+00 -1.319452878405e-05 0.000000000000e+00 1.319451259087e-05 1.619317952605e-11 -1.500000000000e+00 -1.859830516593e-05 0.000000000000e+00 1.859828897225e-05 1.619367952607e-11 -2.000000000000e+00 -2.323326244337e-05 0.000000000000e+00 2.323324624919e-05 1.619417952607e-11 -2.500000000000e+00 -2.714909706157e-05 0.000000000000e+00 2.714908086689e-05 1.619467952607e-11 -3.000000000000e+00 -3.041249310460e-05 0.000000000000e+00 3.041247690942e-05 1.619517952607e-11 -3.500000000000e+00 -3.309956358579e-05 0.000000000000e+00 3.309954739011e-05 1.619567952607e-11 -4.000000000000e+00 -3.528903851558e-05 0.000000000000e+00 3.528902231940e-05 1.619617952607e-11 -4.500000000000e+00 -3.705710153592e-05 0.000000000000e+00 3.705708533924e-05 1.619667952607e-11 -5.000000000000e+00 -3.847402906452e-05 0.000000000000e+00 3.847401286734e-05 1.619717952607e-11 -5.500000000000e+00 -3.960236428956e-05 0.000000000000e+00 3.960234809188e-05 1.619767952607e-11 -6.000000000000e+00 -4.049622323718e-05 0.000000000000e+00 4.049620703900e-05 1.619817952607e-11 -6.500000000000e+00 -4.120136613261e-05 0.000000000000e+00 4.120134993393e-05 1.619867952607e-11 -7.000000000000e+00 -4.175575470743e-05 0.000000000000e+00 4.175573850825e-05 1.619917952607e-11 -7.500000000000e+00 -4.219038964946e-05 0.000000000000e+00 4.219037344978e-05 1.619967952607e-11 -8.000000000000e+00 -4.253027289262e-05 0.000000000000e+00 4.253025669244e-05 1.620017952607e-11 -8.500000000000e+00 -4.279537987262e-05 0.000000000000e+00 4.279536367194e-05 1.620067952607e-11 -9.000000000000e+00 -4.300156519280e-05 0.000000000000e+00 4.300154899162e-05 1.620117952607e-11 -9.500000000000e+00 -4.316135990934e-05 0.000000000000e+00 4.316134370766e-05 1.620167952607e-11 -1.000000000000e+01 -4.328464576720e-05 0.000000000000e+00 4.328462956502e-05 1.620217952607e-11 -1.050000000000e+01 -4.337920947486e-05 0.000000000000e+00 4.337919327218e-05 1.620267952607e-11 -1.100000000000e+01 -4.345118961196e-05 0.000000000000e+00 4.345117340878e-05 1.620317952607e-11 -1.150000000000e+01 -4.350543243315e-05 0.000000000000e+00 4.350541622947e-05 1.620367952607e-11 -1.200000000000e+01 -4.354577303603e-05 0.000000000000e+00 4.354575683185e-05 1.620417952607e-11 -1.250000000000e+01 -4.357525685336e-05 0.000000000000e+00 4.357524064867e-05 1.620467952607e-11 -1.300000000000e+01 -4.359631428953e-05 0.000000000000e+00 4.359629808435e-05 1.620517952607e-11 -1.350000000000e+01 -4.361089908968e-05 0.000000000000e+00 4.361088288400e-05 1.620567952607e-11 -1.400000000000e+01 -4.362059878179e-05 0.000000000000e+00 4.362058257561e-05 1.620617952607e-11 -1.450000000000e+01 -4.362672265764e-05 0.000000000000e+00 4.362670645096e-05 1.620667952607e-11 -1.500000000000e+01 -4.363036682821e-05 0.000000000000e+00 4.363035062103e-05 1.620717952607e-11 -1.550000000000e+01 -4.363244237270e-05 0.000000000000e+00 4.363242616502e-05 1.620767952607e-11 -1.600000000000e+01 -4.363364816056e-05 0.000000000000e+00 4.363363195238e-05 1.620817952607e-11 -1.650000000000e+01 -4.363443207870e-05 0.000000000000e+00 4.363441587002e-05 1.620867952607e-11 -1.700000000000e+01 -4.363502616485e-05 0.000000000000e+00 4.363500995567e-05 1.620917952607e-11 -1.750000000000e+01 -4.363553383099e-05 0.000000000000e+00 4.363551762131e-05 1.620967952607e-11 -1.800000000000e+01 -4.363599854612e-05 0.000000000000e+00 4.363598233594e-05 1.621017952607e-11 -1.850000000000e+01 -4.363643875644e-05 0.000000000000e+00 4.363642254576e-05 1.621067952607e-11 -1.900000000000e+01 -4.363686269357e-05 0.000000000000e+00 4.363684648239e-05 1.621117952607e-11 -1.950000000000e+01 -4.363727432913e-05 0.000000000000e+00 4.363725811745e-05 1.621167952607e-11 -2.000000000000e+01 -4.363767578173e-05 0.000000000000e+00 4.363765956955e-05 1.621217952607e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_gidl.standard0000644000265600020320000010243012264261473023460 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -5.193472182379e-06 0.000000000000e+00 5.193472181367e-06 1.012500000000e-15 -1.500000000000e+00 -5.198987305783e-06 0.000000000000e+00 5.198987304270e-06 1.512500000000e-15 -2.000000000000e+00 -5.203594382392e-06 0.000000000000e+00 5.203594380380e-06 2.012500000000e-15 -2.500000000000e+00 -5.207739397528e-06 0.000000000000e+00 5.207739395015e-06 2.512500000000e-15 -3.000000000000e+00 -5.211590198049e-06 0.000000000000e+00 5.211590195036e-06 3.012500000000e-15 -3.500000000000e+00 -5.215231175500e-06 0.000000000000e+00 5.215231171988e-06 3.512500000000e-15 -4.000000000000e+00 -5.218712251262e-06 0.000000000000e+00 5.218712247249e-06 4.012500000000e-15 -4.500000000000e+00 -5.222066042596e-06 0.000000000000e+00 5.222066038083e-06 4.512500000000e-15 -5.000000000000e+00 -5.225315325856e-06 0.000000000000e+00 5.225315320844e-06 5.012500012766e-15 -5.500000000000e+00 -5.228476782239e-06 0.000000000000e+00 5.228476776727e-06 5.512500890361e-15 -6.000000000000e+00 -5.231563076680e-06 0.000000000000e+00 5.231563070667e-06 6.012525679433e-15 -6.500000000000e+00 -5.234584100225e-06 0.000000000000e+00 5.234584093713e-06 6.512894707513e-15 -7.000000000000e+00 -5.237547755763e-06 0.000000000000e+00 5.237547748747e-06 7.016311819941e-15 -7.500000000000e+00 -5.240460477752e-06 0.000000000000e+00 5.240460470214e-06 7.538359017167e-15 -8.000000000000e+00 -5.243327588818e-06 0.000000000000e+00 5.243327580672e-06 8.145770496569e-15 -8.500000000000e+00 -5.246153551981e-06 0.000000000000e+00 5.246153542916e-06 9.064698978724e-15 -9.000000000000e+00 -5.248942153823e-06 0.000000000000e+00 5.248942142893e-06 1.093085664807e-14 -9.500000000000e+00 -5.251696640625e-06 0.000000000000e+00 5.251696625344e-06 1.528071716066e-14 -1.000000000000e+01 -5.254419821736e-06 0.000000000000e+00 5.254419796339e-06 2.539695935522e-14 -1.050000000000e+01 -5.257114149694e-06 0.000000000000e+00 5.257114102079e-06 4.761477490153e-14 -1.100000000000e+01 -5.259781783532e-06 0.000000000000e+00 5.259781690363e-06 9.316796890254e-14 -1.150000000000e+01 -5.262424639794e-06 0.000000000000e+00 5.262424459184e-06 1.806104351311e-13 -1.200000000000e+01 -5.265044434380e-06 0.000000000000e+00 5.265044095582e-06 3.387983128606e-13 -1.250000000000e+01 -5.267642717428e-06 0.000000000000e+00 5.267642107059e-06 6.103697869876e-13 -1.300000000000e+01 -5.270220902846e-06 0.000000000000e+00 5.270219847226e-06 1.055619893405e-12 -1.350000000000e+01 -5.272780293556e-06 0.000000000000e+00 5.272778536916e-06 1.756640716257e-12 -1.400000000000e+01 -5.275322103302e-06 0.000000000000e+00 5.275319281717e-06 2.821584072760e-12 -1.450000000000e+01 -5.277847475536e-06 0.000000000000e+00 5.277843086632e-06 4.388903095351e-12 -1.500000000000e+01 -5.280357499868e-06 0.000000000000e+00 5.280350868429e-06 6.631438664826e-12 -1.550000000000e+01 -5.282853226343e-06 0.000000000000e+00 5.282843466108e-06 9.760233508124e-12 -1.600000000000e+01 -5.285335677797e-06 0.000000000000e+00 5.285321649819e-06 1.402797805661e-11 -1.650000000000e+01 -5.287805860526e-06 0.000000000000e+00 5.287786128511e-06 1.973201533606e-11 -1.700000000000e+01 -5.290264773378e-06 0.000000000000e+00 5.290237556523e-06 2.721685522598e-11 -1.750000000000e+01 -5.292713415456e-06 0.000000000000e+00 5.292676539286e-06 3.687616994756e-11 -1.800000000000e+01 -5.295152792549e-06 0.000000000000e+00 5.295103638286e-06 4.915426169212e-11 -1.850000000000e+01 -5.297583922406e-06 0.000000000000e+00 5.297519375395e-06 6.454700940014e-11 -1.900000000000e+01 -5.300007838984e-06 0.000000000000e+00 5.299924236670e-06 8.360231468766e-11 -1.950000000000e+01 -5.302425595769e-06 0.000000000000e+00 5.302318675693e-06 1.069200768725e-10 -2.000000000000e+01 -5.304838268264e-06 0.000000000000e+00 5.304703116528e-06 1.351517342184e-10 -1.000000000000e+00 -1.015125599410e-04 0.000000000000e+00 1.015125599400e-04 1.012500000000e-15 -1.500000000000e+00 -1.299779394283e-04 0.000000000000e+00 1.299779394268e-04 1.512500000000e-15 -2.000000000000e+00 -1.471105241735e-04 0.000000000000e+00 1.471105241715e-04 2.012500000000e-15 -2.500000000000e+00 -1.563368275935e-04 0.000000000000e+00 1.563368275910e-04 2.512500000000e-15 -3.000000000000e+00 -1.606159870770e-04 0.000000000000e+00 1.606159870740e-04 3.012500000000e-15 -3.500000000000e+00 -1.621237738572e-04 0.000000000000e+00 1.621237738537e-04 3.512500000000e-15 -4.000000000000e+00 -1.624049861278e-04 0.000000000000e+00 1.624049861238e-04 4.012500000000e-15 -4.500000000000e+00 -1.624824747538e-04 0.000000000000e+00 1.624824747493e-04 4.512500000000e-15 -5.000000000000e+00 -1.625489589716e-04 0.000000000000e+00 1.625489589666e-04 5.012500000000e-15 -5.500000000000e+00 -1.626092882798e-04 0.000000000000e+00 1.626092882743e-04 5.512500000000e-15 -6.000000000000e+00 -1.626647901545e-04 0.000000000000e+00 1.626647901485e-04 6.012500000000e-15 -6.500000000000e+00 -1.627164427610e-04 0.000000000000e+00 1.627164427545e-04 6.512500000000e-15 -7.000000000000e+00 -1.627649804500e-04 0.000000000000e+00 1.627649804430e-04 7.012500000000e-15 -7.500000000000e+00 -1.628109576042e-04 0.000000000000e+00 1.628109575967e-04 7.512500000000e-15 -8.000000000000e+00 -1.628547970987e-04 0.000000000000e+00 1.628547970906e-04 8.012500000000e-15 -8.500000000000e+00 -1.628968257309e-04 0.000000000000e+00 1.628968257224e-04 8.512500000000e-15 -9.000000000000e+00 -1.629372996471e-04 0.000000000000e+00 1.629372996380e-04 9.012500200418e-15 -9.500000000000e+00 -1.629764225057e-04 0.000000000000e+00 1.629764224962e-04 9.512507249693e-15 -1.000000000000e+01 -1.630143584994e-04 0.000000000000e+00 1.630143584893e-04 1.001263207015e-14 -1.050000000000e+01 -1.630512417616e-04 0.000000000000e+00 1.630512417511e-04 1.051395461656e-14 -1.100000000000e+01 -1.630871832325e-04 0.000000000000e+00 1.630871832215e-04 1.102345234522e-14 -1.150000000000e+01 -1.631222757271e-04 0.000000000000e+00 1.631222757155e-04 1.157391790572e-14 -1.200000000000e+01 -1.631565977205e-04 0.000000000000e+00 1.631565977083e-04 1.228531679991e-14 -1.250000000000e+01 -1.631902162105e-04 0.000000000000e+00 1.631902161969e-04 1.351706309903e-14 -1.300000000000e+01 -1.632231889056e-04 0.000000000000e+00 1.632231888894e-04 1.618573206185e-14 -1.350000000000e+01 -1.632555659194e-04 0.000000000000e+00 1.632555658971e-04 2.234104112748e-14 -1.400000000000e+01 -1.632873910953e-04 0.000000000000e+00 1.632873910592e-04 3.609673839035e-14 -1.450000000000e+01 -1.633187030538e-04 0.000000000000e+00 1.633187029888e-04 6.499902002653e-14 -1.500000000000e+01 -1.633495360295e-04 0.000000000000e+00 1.633495359076e-04 1.218852784545e-13 -1.550000000000e+01 -1.633799205458e-04 0.000000000000e+00 1.633799203186e-04 2.272462624510e-13 -1.600000000000e+01 -1.634098839646e-04 0.000000000000e+00 1.634098835525e-04 4.120624418280e-13 -1.650000000000e+01 -1.634394509367e-04 0.000000000000e+00 1.634394502157e-04 7.210471136470e-13 -1.700000000000e+01 -1.634686437757e-04 0.000000000000e+00 1.634686425595e-04 1.216199165705e-12 -1.750000000000e+01 -1.634974827691e-04 0.000000000000e+00 1.634974807885e-04 1.980549678845e-12 -1.800000000000e+01 -1.635259864397e-04 0.000000000000e+00 1.635259833177e-04 3.121978897125e-12 -1.850000000000e+01 -1.635541717671e-04 0.000000000000e+00 1.635541669901e-04 4.776982255435e-12 -1.900000000000e+01 -1.635820543750e-04 0.000000000000e+00 1.635820472607e-04 7.114274039846e-12 -1.950000000000e+01 -1.636096486923e-04 0.000000000000e+00 1.636096383542e-04 1.033813249831e-11 -2.000000000000e+01 -1.636369680908e-04 0.000000000000e+00 1.636369533994e-04 1.469140855373e-11 -1.000000000000e+00 -2.196590614833e-04 0.000000000000e+00 2.196590614822e-04 1.012500000000e-15 -1.500000000000e+00 -3.120423465437e-04 0.000000000000e+00 3.120423465422e-04 1.512500000000e-15 -2.000000000000e+00 -3.934344538019e-04 0.000000000000e+00 3.934344537998e-04 2.012500000000e-15 -2.500000000000e+00 -4.645681128334e-04 0.000000000000e+00 4.645681128309e-04 2.512500000000e-15 -3.000000000000e+00 -5.262715272235e-04 0.000000000000e+00 5.262715272205e-04 3.012500000000e-15 -3.500000000000e+00 -5.794113665687e-04 0.000000000000e+00 5.794113665652e-04 3.512500000000e-15 -4.000000000000e+00 -6.248562736580e-04 0.000000000000e+00 6.248562736540e-04 4.012500000000e-15 -4.500000000000e+00 -6.634534312106e-04 0.000000000000e+00 6.634534312061e-04 4.512500000000e-15 -5.000000000000e+00 -6.960130181175e-04 0.000000000000e+00 6.960130181125e-04 5.012500000000e-15 -5.500000000000e+00 -7.232975912906e-04 0.000000000000e+00 7.232975912851e-04 5.512500000000e-15 -6.000000000000e+00 -7.460148236163e-04 0.000000000000e+00 7.460148236103e-04 6.012500000000e-15 -6.500000000000e+00 -7.648127351484e-04 0.000000000000e+00 7.648127351419e-04 6.512500000000e-15 -7.000000000000e+00 -7.802769083028e-04 0.000000000000e+00 7.802769082958e-04 7.012500000000e-15 -7.500000000000e+00 -7.929294167815e-04 0.000000000000e+00 7.929294167740e-04 7.512500000000e-15 -8.000000000000e+00 -8.032293748123e-04 0.000000000000e+00 8.032293748043e-04 8.012500000000e-15 -8.500000000000e+00 -8.115750733100e-04 0.000000000000e+00 8.115750733015e-04 8.512500000000e-15 -9.000000000000e+00 -8.183075870732e-04 0.000000000000e+00 8.183075870642e-04 9.012500000000e-15 -9.500000000000e+00 -8.237155757987e-04 0.000000000000e+00 8.237155757892e-04 9.512500000000e-15 -1.000000000000e+01 -8.280408740160e-04 0.000000000000e+00 8.280408740060e-04 1.001250000000e-14 -1.050000000000e+01 -8.314843637219e-04 0.000000000000e+00 8.314843637114e-04 1.051250000000e-14 -1.100000000000e+01 -8.342118652566e-04 0.000000000000e+00 8.342118652456e-04 1.101250000000e-14 -1.150000000000e+01 -8.363595558704e-04 0.000000000000e+00 8.363595558589e-04 1.151250000000e-14 -1.200000000000e+01 -8.380389054620e-04 0.000000000000e+00 8.380389054500e-04 1.201250000000e-14 -1.250000000000e+01 -8.393409883245e-04 0.000000000000e+00 8.393409883119e-04 1.251250000000e-14 -1.300000000000e+01 -8.403401893337e-04 0.000000000000e+00 8.403401893207e-04 1.301250000000e-14 -1.350000000000e+01 -8.410973599309e-04 0.000000000000e+00 8.410973599174e-04 1.351250000000e-14 -1.400000000000e+01 -8.416625150144e-04 0.000000000000e+00 8.416625150003e-04 1.401250000000e-14 -1.450000000000e+01 -8.420771986224e-04 0.000000000000e+00 8.420771986079e-04 1.451250000000e-14 -1.500000000000e+01 -8.423767051750e-04 0.000000000000e+00 8.423767051599e-04 1.501250000000e-14 -1.550000000000e+01 -8.425924221846e-04 0.000000000000e+00 8.425924221691e-04 1.551250000000e-14 -1.600000000000e+01 -8.427541985470e-04 0.000000000000e+00 8.427541985310e-04 1.601250000000e-14 -1.650000000000e+01 -8.428890875893e-04 0.000000000000e+00 8.428890875728e-04 1.651250000000e-14 -1.700000000000e+01 -8.430134182713e-04 0.000000000000e+00 8.430134182542e-04 1.701250016622e-14 -1.750000000000e+01 -8.431327254320e-04 0.000000000000e+00 8.431327254145e-04 1.751250453664e-14 -1.800000000000e+01 -8.432484567223e-04 0.000000000000e+00 8.432484567043e-04 1.801256901650e-14 -1.850000000000e+01 -8.433611022708e-04 0.000000000000e+00 8.433611022523e-04 1.851317652955e-14 -1.900000000000e+01 -8.434709355905e-04 0.000000000000e+00 8.434709355715e-04 1.901722465976e-14 -1.950000000000e+01 -8.435781672147e-04 0.000000000000e+00 8.435781671952e-04 1.953775925258e-14 -2.000000000000e+01 -8.436829791083e-04 0.000000000000e+00 8.436829790882e-04 2.012148496284e-14 -1.000000000000e+00 -4.138938879528e-06 0.000000000000e+00 4.138938878528e-06 1.000000000938e-15 -1.500000000000e+00 -4.143807087967e-06 0.000000000000e+00 4.143807086467e-06 1.500000000938e-15 -2.000000000000e+00 -4.147981191834e-06 0.000000000000e+00 4.147981189834e-06 2.000000000938e-15 -2.500000000000e+00 -4.151798587606e-06 0.000000000000e+00 4.151798585106e-06 2.500000000938e-15 -3.000000000000e+00 -4.155386318867e-06 0.000000000000e+00 4.155386315867e-06 3.000000000938e-15 -3.500000000000e+00 -4.158808854788e-06 0.000000000000e+00 4.158808851288e-06 3.500000000938e-15 -4.000000000000e+00 -4.162104709874e-06 0.000000000000e+00 4.162104705874e-06 4.000000000938e-15 -4.500000000000e+00 -4.165299263223e-06 0.000000000000e+00 4.165299258723e-06 4.500000000938e-15 -5.000000000000e+00 -4.168410360637e-06 0.000000000000e+00 4.168410355638e-06 5.000000013926e-15 -5.500000000000e+00 -4.171451146417e-06 0.000000000000e+00 4.171451140916e-06 5.500000903818e-15 -6.000000000000e+00 -4.174431646507e-06 0.000000000000e+00 4.174431640508e-06 6.000025981641e-15 -6.500000000000e+00 -4.177359721035e-06 0.000000000000e+00 4.177359714535e-06 6.500398657582e-15 -7.000000000000e+00 -4.180241670364e-06 0.000000000000e+00 4.180241663361e-06 7.003844922243e-15 -7.500000000000e+00 -4.183082638143e-06 0.000000000000e+00 4.183082630617e-06 7.526056750893e-15 -8.000000000000e+00 -4.185886889119e-06 0.000000000000e+00 4.185886880985e-06 8.134178701125e-15 -8.500000000000e+00 -4.188658006478e-06 0.000000000000e+00 4.188657997422e-06 9.055587043711e-15 -9.000000000000e+00 -4.191399035699e-06 0.000000000000e+00 4.191399024770e-06 1.092904668348e-14 -9.500000000000e+00 -4.194112591887e-06 0.000000000000e+00 4.194112576589e-06 1.529763151584e-14 -1.000000000000e+01 -4.196800941589e-06 0.000000000000e+00 4.196800916132e-06 2.545672366485e-14 -1.050000000000e+01 -4.199466066513e-06 0.000000000000e+00 4.199466018748e-06 4.776373921198e-14 -1.100000000000e+01 -4.202109714153e-06 0.000000000000e+00 4.202109620663e-06 9.348841119667e-14 -1.150000000000e+01 -4.204733438859e-06 0.000000000000e+00 4.204733257620e-06 1.812390063763e-13 -1.200000000000e+01 -4.207338635786e-06 0.000000000000e+00 4.207338295836e-06 3.399495075224e-13 -1.250000000000e+01 -4.209926569440e-06 0.000000000000e+00 4.209925957076e-06 6.123644216402e-13 -1.300000000000e+01 -4.212498398059e-06 0.000000000000e+00 4.212497339141e-06 1.058918288375e-12 -1.350000000000e+01 -4.215055194654e-06 0.000000000000e+00 4.215053432774e-06 1.761880030583e-12 -1.400000000000e+01 -4.217597965328e-06 0.000000000000e+00 4.217595135709e-06 2.829619058199e-12 -1.450000000000e+01 -4.220127665282e-06 0.000000000000e+00 4.220123264433e-06 4.400849416623e-12 -1.500000000000e+01 -4.222645212821e-06 0.000000000000e+00 4.222638564104e-06 6.648717878116e-12 -1.550000000000e+01 -4.225151501587e-06 0.000000000000e+00 4.225141716968e-06 9.784618789849e-12 -1.600000000000e+01 -4.227647411177e-06 0.000000000000e+00 4.227633349536e-06 1.406163981838e-11 -1.650000000000e+01 -4.230133816313e-06 0.000000000000e+00 4.230114038747e-06 1.977756593811e-11 -1.700000000000e+01 -4.232611594669e-06 0.000000000000e+00 4.232584317276e-06 2.727739209892e-11 -1.750000000000e+01 -4.235081633455e-06 0.000000000000e+00 4.235044678139e-06 3.695531654027e-11 -1.800000000000e+01 -4.237544834904e-06 0.000000000000e+00 4.237495578698e-06 4.925620577686e-11 -1.850000000000e+01 -4.240002120695e-06 0.000000000000e+00 4.239937444156e-06 6.467653837459e-11 -1.900000000000e+01 -4.242454435484e-06 0.000000000000e+00 4.242370670636e-06 8.376484761723e-11 -1.950000000000e+01 -4.244902749569e-06 0.000000000000e+00 4.244795627875e-06 1.071216931089e-10 -2.000000000000e+01 -4.247348060822e-06 0.000000000000e+00 4.247212661622e-06 1.353991985127e-10 -1.000000000000e+00 -1.463239791206e-04 0.000000000000e+00 1.463239791196e-04 1.000000000938e-15 -1.500000000000e+00 -1.877403647010e-04 0.000000000000e+00 1.877403646995e-04 1.500000000938e-15 -2.000000000000e+00 -2.126275494897e-04 0.000000000000e+00 2.126275494876e-04 2.000000000938e-15 -2.500000000000e+00 -2.257773334512e-04 0.000000000000e+00 2.257773334487e-04 2.500000000938e-15 -3.000000000000e+00 -2.314768435905e-04 0.000000000000e+00 2.314768435875e-04 3.000000000938e-15 -3.500000000000e+00 -2.330260200944e-04 0.000000000000e+00 2.330260200909e-04 3.500000000938e-15 -4.000000000000e+00 -2.331934546603e-04 0.000000000000e+00 2.331934546563e-04 4.000000000938e-15 -4.500000000000e+00 -2.333011669956e-04 0.000000000000e+00 2.333011669911e-04 4.500000000938e-15 -5.000000000000e+00 -2.333974224807e-04 0.000000000000e+00 2.333974224757e-04 5.000000000938e-15 -5.500000000000e+00 -2.334846675860e-04 0.000000000000e+00 2.334846675805e-04 5.500000000938e-15 -6.000000000000e+00 -2.335648001026e-04 0.000000000000e+00 2.335648000966e-04 6.000000000938e-15 -6.500000000000e+00 -2.336392658505e-04 0.000000000000e+00 2.336392658440e-04 6.500000000938e-15 -7.000000000000e+00 -2.337091552384e-04 0.000000000000e+00 2.337091552314e-04 7.000000000938e-15 -7.500000000000e+00 -2.337752922866e-04 0.000000000000e+00 2.337752922791e-04 7.500000000938e-15 -8.000000000000e+00 -2.338383051568e-04 0.000000000000e+00 2.338383051488e-04 8.000000000938e-15 -8.500000000000e+00 -2.338986785535e-04 0.000000000000e+00 2.338986785450e-04 8.500000000938e-15 -9.000000000000e+00 -2.339567916261e-04 0.000000000000e+00 2.339567916171e-04 9.000000052140e-15 -9.500000000000e+00 -2.340129451497e-04 0.000000000000e+00 2.340129451402e-04 9.500002364511e-15 -1.000000000000e+01 -2.340673810419e-04 0.000000000000e+00 2.340673810319e-04 1.000005145393e-14 -1.050000000000e+01 -2.341202964658e-04 0.000000000000e+00 2.341202964553e-04 1.050064829401e-14 -1.100000000000e+01 -2.341718541171e-04 0.000000000000e+00 2.341718541061e-04 1.100541821153e-14 -1.150000000000e+01 -2.342221898099e-04 0.000000000000e+00 2.342221897984e-04 1.153300748283e-14 -1.200000000000e+01 -2.342714181346e-04 0.000000000000e+00 2.342714181224e-04 1.215677548222e-14 -1.250000000000e+01 -2.343196367283e-04 0.000000000000e+00 2.343196367151e-04 1.310995081603e-14 -1.300000000000e+01 -2.343669295352e-04 0.000000000000e+00 2.343669295202e-04 1.501720505047e-14 -1.350000000000e+01 -2.344133693250e-04 0.000000000000e+00 2.344133693057e-04 1.933383869162e-14 -1.400000000000e+01 -2.344590196583e-04 0.000000000000e+00 2.344590196292e-04 2.908312767225e-14 -1.450000000000e+01 -2.345039364381e-04 0.000000000000e+00 2.345039363881e-04 4.997603698440e-14 -1.500000000000e+01 -2.345481691461e-04 0.000000000000e+00 2.345481690541e-04 9.197544800970e-14 -1.550000000000e+01 -2.345917618378e-04 0.000000000000e+00 2.345917616665e-04 1.713334306007e-13 -1.600000000000e+01 -2.346347539504e-04 0.000000000000e+00 2.346347536373e-04 3.130912879968e-13 -1.650000000000e+01 -2.346771809644e-04 0.000000000000e+00 2.346771804104e-04 5.539945573692e-13 -1.700000000000e+01 -2.347190749507e-04 0.000000000000e+00 2.347190740049e-04 9.457438937910e-13 -1.750000000000e+01 -2.347604650251e-04 0.000000000000e+00 2.347604634666e-04 1.558480778594e-12 -1.800000000000e+01 -2.348013777294e-04 0.000000000000e+00 2.348013752450e-04 2.484395241191e-12 -1.850000000000e+01 -2.348418373530e-04 0.000000000000e+00 2.348418335117e-04 3.841340662365e-12 -1.900000000000e+01 -2.348818662057e-04 0.000000000000e+00 2.348818604294e-04 5.776346632861e-12 -1.950000000000e+01 -2.349214848502e-04 0.000000000000e+00 2.349214763813e-04 8.468932704942e-12 -2.000000000000e+01 -2.349607123022e-04 0.000000000000e+00 2.349607001681e-04 1.213414156975e-11 -1.000000000000e+00 -3.070286702272e-04 0.000000000000e+00 3.070286702262e-04 1.000000000938e-15 -1.500000000000e+00 -4.363382792342e-04 0.000000000000e+00 4.363382792327e-04 1.500000000938e-15 -2.000000000000e+00 -5.506850061722e-04 0.000000000000e+00 5.506850061702e-04 2.000000000938e-15 -2.500000000000e+00 -6.512762915162e-04 0.000000000000e+00 6.512762915137e-04 2.500000000938e-15 -3.000000000000e+00 -7.393665613641e-04 0.000000000000e+00 7.393665613611e-04 3.000000000938e-15 -3.500000000000e+00 -8.161743015666e-04 0.000000000000e+00 8.161743015631e-04 3.500000000938e-15 -4.000000000000e+00 -8.828474531565e-04 0.000000000000e+00 8.828474531525e-04 4.000000000938e-15 -4.500000000000e+00 -9.404534281445e-04 0.000000000000e+00 9.404534281400e-04 4.500000000938e-15 -5.000000000000e+00 -9.899798212591e-04 0.000000000000e+00 9.899798212541e-04 5.000000000938e-15 -5.500000000000e+00 -1.032338701895e-03 0.000000000000e+00 1.032338701890e-03 5.500000000938e-15 -6.000000000000e+00 -1.068371276215e-03 0.000000000000e+00 1.068371276209e-03 6.000000000938e-15 -6.500000000000e+00 -1.098851724384e-03 0.000000000000e+00 1.098851724378e-03 6.500000000938e-15 -7.000000000000e+00 -1.124489963199e-03 0.000000000000e+00 1.124489963192e-03 7.000000000938e-15 -7.500000000000e+00 -1.145933491041e-03 0.000000000000e+00 1.145933491034e-03 7.500000000938e-15 -8.000000000000e+00 -1.163768651055e-03 0.000000000000e+00 1.163768651047e-03 8.000000000938e-15 -8.500000000000e+00 -1.178521739660e-03 0.000000000000e+00 1.178521739651e-03 8.500000000938e-15 -9.000000000000e+00 -1.190660409543e-03 0.000000000000e+00 1.190660409534e-03 9.000000000938e-15 -9.500000000000e+00 -1.200595742035e-03 0.000000000000e+00 1.200595742025e-03 9.500000000938e-15 -1.000000000000e+01 -1.208685194322e-03 0.000000000000e+00 1.208685194312e-03 1.000000000094e-14 -1.050000000000e+01 -1.215236415450e-03 0.000000000000e+00 1.215236415439e-03 1.050000000094e-14 -1.100000000000e+01 -1.220511745178e-03 0.000000000000e+00 1.220511745167e-03 1.100000000094e-14 -1.150000000000e+01 -1.224733121523e-03 0.000000000000e+00 1.224733121512e-03 1.150000000094e-14 -1.200000000000e+01 -1.228087029186e-03 0.000000000000e+00 1.228087029174e-03 1.200000000094e-14 -1.250000000000e+01 -1.230729427171e-03 0.000000000000e+00 1.230729427159e-03 1.250000000094e-14 -1.300000000000e+01 -1.232790214559e-03 0.000000000000e+00 1.232790214546e-03 1.300000000094e-14 -1.350000000000e+01 -1.234377361884e-03 0.000000000000e+00 1.234377361870e-03 1.350000000094e-14 -1.400000000000e+01 -1.235580594138e-03 0.000000000000e+00 1.235580594124e-03 1.400000000094e-14 -1.450000000000e+01 -1.236474697641e-03 0.000000000000e+00 1.236474697627e-03 1.450000000094e-14 -1.500000000000e+01 -1.237122608072e-03 0.000000000000e+00 1.237122608057e-03 1.500000000094e-14 -1.550000000000e+01 -1.237578672130e-03 0.000000000000e+00 1.237578672114e-03 1.550000000094e-14 -1.600000000000e+01 -1.237893163588e-03 0.000000000000e+00 1.237893163572e-03 1.600000000094e-14 -1.650000000000e+01 -1.238119956000e-03 0.000000000000e+00 1.238119955983e-03 1.650000000094e-14 -1.700000000000e+01 -1.238312660105e-03 0.000000000000e+00 1.238312660088e-03 1.700000000094e-14 -1.750000000000e+01 -1.238495062700e-03 0.000000000000e+00 1.238495062683e-03 1.750000000094e-14 -1.800000000000e+01 -1.238671193469e-03 0.000000000000e+00 1.238671193451e-03 1.800000000094e-14 -1.850000000000e+01 -1.238841846030e-03 0.000000000000e+00 1.238841846011e-03 1.850000007885e-14 -1.900000000000e+01 -1.239007463267e-03 0.000000000000e+00 1.239007463248e-03 1.900000201329e-14 -1.950000000000e+01 -1.239168418350e-03 0.000000000000e+00 1.239168418331e-03 1.950002982441e-14 -2.000000000000e+01 -1.239325046123e-03 0.000000000000e+00 1.239325046103e-03 2.000028981308e-14 -1.000000000000e+00 -6.714210159799e-06 0.000000000000e+00 6.714193966620e-06 1.619317952605e-11 -1.500000000000e+00 -6.721092119165e-06 0.000000000000e+00 6.721075925486e-06 1.619367952607e-11 -2.000000000000e+00 -6.726336774163e-06 0.000000000000e+00 6.726320579983e-06 1.619417952607e-11 -2.500000000000e+00 -6.730940349466e-06 0.000000000000e+00 6.730924154786e-06 1.619467952607e-11 -3.000000000000e+00 -6.735147402281e-06 0.000000000000e+00 6.735131207101e-06 1.619517952607e-11 -3.500000000000e+00 -6.739076773903e-06 0.000000000000e+00 6.739060578224e-06 1.619567952607e-11 -4.000000000000e+00 -6.742797231372e-06 0.000000000000e+00 6.742781035193e-06 1.619617952607e-11 -4.500000000000e+00 -6.746352945458e-06 0.000000000000e+00 6.746336748778e-06 1.619667952607e-11 -5.000000000000e+00 -6.749774349822e-06 0.000000000000e+00 6.749758152642e-06 1.619717952609e-11 -5.500000000000e+00 -6.753083497273e-06 0.000000000000e+00 6.753067299594e-06 1.619767952695e-11 -6.000000000000e+00 -6.756296987164e-06 0.000000000000e+00 6.756280788986e-06 1.619817955132e-11 -6.500000000000e+00 -6.759427691613e-06 0.000000000000e+00 6.759411492933e-06 1.619867991515e-11 -7.000000000000e+00 -6.762485834721e-06 0.000000000000e+00 6.762469635538e-06 1.619918329061e-11 -7.500000000000e+00 -6.765479699399e-06 0.000000000000e+00 6.765463499695e-06 1.619970510232e-11 -8.000000000000e+00 -6.768416108140e-06 0.000000000000e+00 6.768399907827e-06 1.620031149654e-11 -8.500000000000e+00 -6.771300760531e-06 0.000000000000e+00 6.771284559304e-06 1.620122687151e-11 -9.000000000000e+00 -6.774138476713e-06 0.000000000000e+00 6.774122273630e-06 1.620308255897e-11 -9.500000000000e+00 -6.776933377162e-06 0.000000000000e+00 6.776917169757e-06 1.620740555623e-11 -1.000000000000e+01 -6.779689018394e-06 0.000000000000e+00 6.779672800933e-06 1.621746029453e-11 -1.050000000000e+01 -6.782408497424e-06 0.000000000000e+00 6.782392257873e-06 1.623955002835e-11 -1.100000000000e+01 -6.785094533769e-06 0.000000000000e+00 6.785078248913e-06 1.628485691541e-11 -1.150000000000e+01 -6.787749534987e-06 0.000000000000e+00 6.787733163132e-06 1.637185666371e-11 -1.200000000000e+01 -6.790375649965e-06 0.000000000000e+00 6.790359120672e-06 1.652929344859e-11 -1.250000000000e+01 -6.792974812948e-06 0.000000000000e+00 6.792958013295e-06 1.679965249563e-11 -1.300000000000e+01 -6.795548780421e-06 0.000000000000e+00 6.795531537393e-06 1.724302810582e-11 -1.350000000000e+01 -6.798099162366e-06 0.000000000000e+00 6.798081221107e-06 1.794125786258e-11 -1.400000000000e+01 -6.800627448973e-06 0.000000000000e+00 6.800608446793e-06 1.900218038286e-11 -1.450000000000e+01 -6.803135033637e-06 0.000000000000e+00 6.803114469763e-06 2.056387319316e-11 -1.500000000000e+01 -6.805623232785e-06 0.000000000000e+00 6.805600434047e-06 2.279873676443e-11 -1.550000000000e+01 -6.808093303029e-06 0.000000000000e+00 6.808067385721e-06 2.591730751985e-11 -1.600000000000e+01 -6.810546455954e-06 0.000000000000e+00 6.810516284250e-06 3.017170384848e-11 -1.650000000000e+01 -6.812983870834e-06 0.000000000000e+00 6.812948012201e-06 3.585863228598e-11 -1.700000000000e+01 -6.815406705499e-06 0.000000000000e+00 6.815363383594e-06 4.332190406059e-11 -1.750000000000e+01 -6.817816105557e-06 0.000000000000e+00 6.817763151124e-06 5.295443370657e-11 -1.800000000000e+01 -6.820213212144e-06 0.000000000000e+00 6.820148012434e-06 6.519971049551e-11 -1.850000000000e+01 -6.822599168335e-06 0.000000000000e+00 6.822518615586e-06 8.055274953823e-11 -1.900000000000e+01 -6.824975124394e-06 0.000000000000e+00 6.824875563852e-06 9.956054240473e-11 -1.950000000000e+01 -6.827342241965e-06 0.000000000000e+00 6.827219419926e-06 1.228220370810e-10 -2.000000000000e+01 -6.829701697326e-06 0.000000000000e+00 6.829550709641e-06 1.509876842612e-10 -1.000000000000e+00 -6.554845495392e-05 0.000000000000e+00 6.554843876074e-05 1.619317952605e-11 -1.500000000000e+00 -8.407823596969e-05 0.000000000000e+00 8.407821977601e-05 1.619367952607e-11 -2.000000000000e+00 -9.550516723092e-05 0.000000000000e+00 9.550515103674e-05 1.619417952607e-11 -2.500000000000e+00 -1.020087165764e-04 0.000000000000e+00 1.020087003817e-04 1.619467952607e-11 -3.000000000000e+00 -1.054087404707e-04 0.000000000000e+00 1.054087242755e-04 1.619517952607e-11 -3.500000000000e+00 -1.070059433246e-04 0.000000000000e+00 1.070059271289e-04 1.619567952607e-11 -4.000000000000e+00 -1.076379101651e-04 0.000000000000e+00 1.076378939689e-04 1.619617952607e-11 -4.500000000000e+00 -1.078276862733e-04 0.000000000000e+00 1.078276700766e-04 1.619667952607e-11 -5.000000000000e+00 -1.078880863876e-04 0.000000000000e+00 1.078880701904e-04 1.619717952607e-11 -5.500000000000e+00 -1.079289215390e-04 0.000000000000e+00 1.079289053413e-04 1.619767952607e-11 -6.000000000000e+00 -1.079652585650e-04 0.000000000000e+00 1.079652423669e-04 1.619817952607e-11 -6.500000000000e+00 -1.079989330000e-04 0.000000000000e+00 1.079989168013e-04 1.619867952607e-11 -7.000000000000e+00 -1.080305508003e-04 0.000000000000e+00 1.080305346011e-04 1.619917952607e-11 -7.500000000000e+00 -1.080604907349e-04 0.000000000000e+00 1.080604745352e-04 1.619967952607e-11 -8.000000000000e+00 -1.080890308192e-04 0.000000000000e+00 1.080890146190e-04 1.620017952607e-11 -8.500000000000e+00 -1.081163840867e-04 0.000000000000e+00 1.081163678860e-04 1.620067952608e-11 -9.000000000000e+00 -1.081427172697e-04 0.000000000000e+00 1.081427010685e-04 1.620117952661e-11 -9.500000000000e+00 -1.081681630043e-04 0.000000000000e+00 1.081681468026e-04 1.620167954240e-11 -1.000000000000e+01 -1.081928283463e-04 0.000000000000e+00 1.081928121442e-04 1.620217978831e-11 -1.050000000000e+01 -1.082168008691e-04 0.000000000000e+00 1.082167846664e-04 1.620268215111e-11 -1.100000000000e+01 -1.082401531005e-04 0.000000000000e+00 1.082401368973e-04 1.620319787101e-11 -1.150000000000e+01 -1.082629457966e-04 0.000000000000e+00 1.082629295928e-04 1.620377646392e-11 -1.200000000000e+01 -1.082852303879e-04 0.000000000000e+00 1.082852141833e-04 1.620458983824e-11 -1.250000000000e+01 -1.083070508304e-04 0.000000000000e+00 1.083070346243e-04 1.620613143279e-11 -1.300000000000e+01 -1.083284450234e-04 0.000000000000e+00 1.083284288137e-04 1.620961577745e-11 -1.350000000000e+01 -1.083494459075e-04 0.000000000000e+00 1.083494296898e-04 1.621767953587e-11 -1.400000000000e+01 -1.083700823259e-04 0.000000000000e+00 1.083700660904e-04 1.623548356323e-11 -1.450000000000e+01 -1.083903797053e-04 0.000000000000e+00 1.083903634330e-04 1.627229497334e-11 -1.500000000000e+01 -1.084103606021e-04 0.000000000000e+00 1.084103442585e-04 1.634359237130e-11 -1.550000000000e+01 -1.084300451428e-04 0.000000000000e+00 1.084300286691e-04 1.647369341386e-11 -1.600000000000e+01 -1.084494513839e-04 0.000000000000e+00 1.084494346850e-04 1.669885958840e-11 -1.650000000000e+01 -1.084685956078e-04 0.000000000000e+00 1.084685785370e-04 1.707079507025e-11 -1.700000000000e+01 -1.084874925683e-04 0.000000000000e+00 1.084874749079e-04 1.766042884522e-11 -1.750000000000e+01 -1.085061556961e-04 0.000000000000e+00 1.085061371342e-04 1.856185357921e-11 -1.800000000000e+01 -1.085245972712e-04 0.000000000000e+00 1.085245773749e-04 1.989629055331e-11 -1.850000000000e+01 -1.085428285693e-04 0.000000000000e+00 1.085428067534e-04 2.181595559706e-11 -1.900000000000e+01 -1.085608599868e-04 0.000000000000e+00 1.085608354791e-04 2.450771391615e-11 -1.950000000000e+01 -1.085787011468e-04 0.000000000000e+00 1.085786729504e-04 2.819642946855e-11 -2.000000000000e+01 -1.085963609910e-04 0.000000000000e+00 1.085963278431e-04 3.314793476413e-11 -1.000000000000e+00 -1.415229106041e-04 0.000000000000e+00 1.415228944109e-04 1.619317952605e-11 -1.500000000000e+00 -2.007623549463e-04 0.000000000000e+00 2.007623387527e-04 1.619367952607e-11 -2.000000000000e+00 -2.526645040776e-04 0.000000000000e+00 2.526644878834e-04 1.619417952607e-11 -2.500000000000e+00 -2.976686798259e-04 0.000000000000e+00 2.976686636313e-04 1.619467952607e-11 -3.000000000000e+00 -3.363126965936e-04 0.000000000000e+00 3.363126803985e-04 1.619517952607e-11 -3.500000000000e+00 -3.691935610895e-04 0.000000000000e+00 3.691935448939e-04 1.619567952607e-11 -4.000000000000e+00 -3.969334494913e-04 0.000000000000e+00 3.969334332951e-04 1.619617952607e-11 -4.500000000000e+00 -4.201521317938e-04 0.000000000000e+00 4.201521155971e-04 1.619667952607e-11 -5.000000000000e+00 -4.394459755772e-04 0.000000000000e+00 4.394459593800e-04 1.619717952607e-11 -5.500000000000e+00 -4.553730920067e-04 0.000000000000e+00 4.553730758090e-04 1.619767952607e-11 -6.000000000000e+00 -4.684437866565e-04 0.000000000000e+00 4.684437704583e-04 1.619817952607e-11 -6.500000000000e+00 -4.791153071399e-04 0.000000000000e+00 4.791152909412e-04 1.619867952607e-11 -7.000000000000e+00 -4.877899529439e-04 0.000000000000e+00 4.877899367447e-04 1.619917952607e-11 -7.500000000000e+00 -4.948158021137e-04 0.000000000000e+00 4.948157859140e-04 1.619967952607e-11 -8.000000000000e+00 -5.004894563880e-04 0.000000000000e+00 5.004894401878e-04 1.620017952607e-11 -8.500000000000e+00 -5.050602531673e-04 0.000000000000e+00 5.050602369666e-04 1.620067952607e-11 -9.000000000000e+00 -5.087353943071e-04 0.000000000000e+00 5.087353781059e-04 1.620117952607e-11 -9.500000000000e+00 -5.116854438212e-04 0.000000000000e+00 5.116854276196e-04 1.620167952607e-11 -1.000000000000e+01 -5.140498109923e-04 0.000000000000e+00 5.140497947901e-04 1.620217952607e-11 -1.050000000000e+01 -5.159418239868e-04 0.000000000000e+00 5.159418077841e-04 1.620267952607e-11 -1.100000000000e+01 -5.174532809483e-04 0.000000000000e+00 5.174532647451e-04 1.620317952607e-11 -1.150000000000e+01 -5.186583775541e-04 0.000000000000e+00 5.186583613505e-04 1.620367952607e-11 -1.200000000000e+01 -5.196170211926e-04 0.000000000000e+00 5.196170049884e-04 1.620417952607e-11 -1.250000000000e+01 -5.203775807620e-04 0.000000000000e+00 5.203775645573e-04 1.620467952607e-11 -1.300000000000e+01 -5.209791419934e-04 0.000000000000e+00 5.209791257883e-04 1.620517952607e-11 -1.350000000000e+01 -5.214533438514e-04 0.000000000000e+00 5.214533276457e-04 1.620567952607e-11 -1.400000000000e+01 -5.218258685819e-04 0.000000000000e+00 5.218258523757e-04 1.620617952607e-11 -1.450000000000e+01 -5.221176507885e-04 0.000000000000e+00 5.221176345818e-04 1.620667952607e-11 -1.500000000000e+01 -5.223458618205e-04 0.000000000000e+00 5.223458456133e-04 1.620717952607e-11 -1.550000000000e+01 -5.225247147864e-04 0.000000000000e+00 5.225246985787e-04 1.620767952608e-11 -1.600000000000e+01 -5.226661187976e-04 0.000000000000e+00 5.226661025894e-04 1.620817952662e-11 -1.650000000000e+01 -5.227801759836e-04 0.000000000000e+00 5.227801597749e-04 1.620867954000e-11 -1.700000000000e+01 -5.228754389100e-04 0.000000000000e+00 5.228754227008e-04 1.620917972393e-11 -1.750000000000e+01 -5.229587901100e-04 0.000000000000e+00 5.229587739003e-04 1.620968135148e-11 -1.800000000000e+01 -5.230350947992e-04 0.000000000000e+00 5.230350785890e-04 1.621019160489e-11 -1.850000000000e+01 -5.231072359527e-04 0.000000000000e+00 5.231072197420e-04 1.621074106547e-11 -1.900000000000e+01 -5.231766968569e-04 0.000000000000e+00 5.231766806455e-04 1.621143381715e-11 -1.950000000000e+01 -5.232442024767e-04 0.000000000000e+00 5.232441862642e-04 1.621256564726e-11 -2.000000000000e+01 -5.233101217598e-04 0.000000000000e+00 5.233101055449e-04 1.621486233379e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb2.standard0000644000265600020320000010253512264261473024266 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -2.000006063541e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -2.740776355870e-14 0.000000000000e+00 -2.592520583652e-15 3.000000000000e-14 -5.000000000000e+00 -3.590374769171e-08 0.000000000000e+00 3.590371769217e-08 3.000000000000e-14 -5.500000000000e+00 -1.030176434267e-05 0.000000000000e+00 1.030176431267e-05 3.000000000000e-14 -6.000000000000e+00 -4.674299722491e-05 0.000000000000e+00 4.674299719491e-05 3.000000000000e-14 -6.500000000000e+00 -1.089210759909e-04 0.000000000000e+00 1.089210759609e-04 3.000000000000e-14 -7.000000000000e+00 -1.937445415554e-04 0.000000000000e+00 1.937445415254e-04 3.000000000000e-14 -7.500000000000e+00 -2.978727983812e-04 0.000000000000e+00 2.978727983512e-04 3.000000000000e-14 -8.000000000000e+00 -4.182629881239e-04 0.000000000000e+00 4.182629880939e-04 3.000000000000e-14 -8.500000000000e+00 -5.522402052265e-04 0.000000000000e+00 5.522402051965e-04 3.000000000000e-14 -9.000000000000e+00 -6.974153510620e-04 0.000000000000e+00 6.974153510320e-04 3.000000000000e-14 -9.500000000000e+00 -8.502669370320e-04 0.000000000000e+00 8.502669370020e-04 3.000000000000e-14 -1.000000000000e+01 -9.962698673572e-04 0.000000000000e+00 9.962698673272e-04 3.000000000000e-14 -1.050000000000e+01 -1.122471111929e-03 0.000000000000e+00 1.122471111899e-03 3.000000000000e-14 -1.100000000000e+01 -1.224251964655e-03 0.000000000000e+00 1.224251964625e-03 3.000000000000e-14 -1.150000000000e+01 -1.303753898463e-03 0.000000000000e+00 1.303753898433e-03 3.000000000000e-14 -1.200000000000e+01 -1.365755306219e-03 0.000000000000e+00 1.365755306189e-03 3.000000000000e-14 -1.250000000000e+01 -1.414779942967e-03 0.000000000000e+00 1.414779942937e-03 3.000000000000e-14 -1.300000000000e+01 -1.454276985312e-03 0.000000000000e+00 1.454276985282e-03 3.000000000000e-14 -1.350000000000e+01 -1.486702223126e-03 0.000000000000e+00 1.486702223096e-03 3.000000000000e-14 -1.400000000000e+01 -1.513781678914e-03 0.000000000000e+00 1.513781678884e-03 3.000000000000e-14 -1.450000000000e+01 -1.536739434932e-03 0.000000000000e+00 1.536739434902e-03 3.000000000000e-14 -1.500000000000e+01 -1.556458631723e-03 0.000000000000e+00 1.556458631693e-03 3.000000000000e-14 -1.550000000000e+01 -1.573588919780e-03 0.000000000000e+00 1.573588919750e-03 3.000000000000e-14 -1.600000000000e+01 -1.588617451056e-03 0.000000000000e+00 1.588617451026e-03 3.000000000000e-14 -1.650000000000e+01 -1.601916155907e-03 0.000000000000e+00 1.601916155877e-03 3.000000000000e-14 -1.700000000000e+01 -1.613773710516e-03 0.000000000000e+00 1.613773710486e-03 3.000000000000e-14 -1.750000000000e+01 -1.624417541052e-03 0.000000000000e+00 1.624417541022e-03 3.000000000000e-14 -1.800000000000e+01 -1.634029248886e-03 0.000000000000e+00 1.634029248856e-03 3.000000000000e-14 -1.850000000000e+01 -1.642755617062e-03 0.000000000000e+00 1.642755617032e-03 3.000000000000e-14 -1.900000000000e+01 -1.650716596314e-03 0.000000000000e+00 1.650716596284e-03 3.000000000000e-14 -1.950000000000e+01 -1.658011190544e-03 0.000000000000e+00 1.658011190514e-03 3.000000000000e-14 -2.000000000000e+01 -1.664721857285e-03 0.000000000000e+00 1.664721857255e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -2.740754671826e-14 0.000000000000e+00 -2.592520583652e-15 3.000000000000e-14 -5.000000000000e+00 -3.590373620177e-08 0.000000000000e+00 3.590370620175e-08 3.000000000000e-14 -5.500000000000e+00 -1.030159919111e-05 0.000000000000e+00 1.030159916111e-05 3.000000000000e-14 -6.000000000000e+00 -4.674121954489e-05 0.000000000000e+00 4.674121951490e-05 3.000000000000e-14 -6.500000000000e+00 -1.089143622535e-04 0.000000000000e+00 1.089143622235e-04 3.000000000000e-14 -7.000000000000e+00 -1.937278204068e-04 0.000000000000e+00 1.937278203768e-04 3.000000000000e-14 -7.500000000000e+00 -2.978391311674e-04 0.000000000000e+00 2.978391311374e-04 3.000000000000e-14 -8.000000000000e+00 -4.182026269257e-04 0.000000000000e+00 4.182026268957e-04 3.000000000000e-14 -8.500000000000e+00 -5.521381891440e-04 0.000000000000e+00 5.521381891140e-04 3.000000000000e-14 -9.000000000000e+00 -6.972468864171e-04 0.000000000000e+00 6.972468863871e-04 3.000000000000e-14 -9.500000000000e+00 -8.497925870747e-04 0.000000000000e+00 8.497925870447e-04 3.000000000000e-14 -1.000000000000e+01 -9.946719306043e-04 0.000000000000e+00 9.946719305743e-04 3.000000000000e-14 -1.050000000000e+01 -1.118999455749e-03 0.000000000000e+00 1.118999455719e-03 3.000000000000e-14 -1.100000000000e+01 -1.218578995301e-03 0.000000000000e+00 1.218578995271e-03 3.000000000000e-14 -1.150000000000e+01 -1.295987362394e-03 0.000000000000e+00 1.295987362364e-03 3.000000000000e-14 -1.200000000000e+01 -1.356191855753e-03 0.000000000000e+00 1.356191855723e-03 3.000000000000e-14 -1.250000000000e+01 -1.403732196605e-03 0.000000000000e+00 1.403732196575e-03 3.000000000000e-14 -1.300000000000e+01 -1.442012004608e-03 0.000000000000e+00 1.442012004578e-03 3.000000000000e-14 -1.350000000000e+01 -1.473433063296e-03 0.000000000000e+00 1.473433063266e-03 3.000000000000e-14 -1.400000000000e+01 -1.499675146882e-03 0.000000000000e+00 1.499675146852e-03 3.000000000000e-14 -1.450000000000e+01 -1.521926255538e-03 0.000000000000e+00 1.521926255508e-03 3.000000000000e-14 -1.500000000000e+01 -1.541042166830e-03 0.000000000000e+00 1.541042166800e-03 3.000000000000e-14 -1.550000000000e+01 -1.557651860446e-03 0.000000000000e+00 1.557651860416e-03 3.000000000000e-14 -1.600000000000e+01 -1.572226773736e-03 0.000000000000e+00 1.572226773706e-03 3.000000000000e-14 -1.650000000000e+01 -1.585126763777e-03 0.000000000000e+00 1.585126763747e-03 3.000000000000e-14 -1.700000000000e+01 -1.596631118955e-03 0.000000000000e+00 1.596631118925e-03 3.000000000000e-14 -1.750000000000e+01 -1.606959876119e-03 0.000000000000e+00 1.606959876089e-03 3.000000000000e-14 -1.800000000000e+01 -1.616288751268e-03 0.000000000000e+00 1.616288751238e-03 3.000000000000e-14 -1.850000000000e+01 -1.624759787396e-03 0.000000000000e+00 1.624759787366e-03 3.000000000000e-14 -1.900000000000e+01 -1.632489077757e-03 0.000000000000e+00 1.632489077727e-03 3.000000000000e-14 -1.950000000000e+01 -1.639572456668e-03 0.000000000000e+00 1.639572456638e-03 3.000000000000e-14 -2.000000000000e+01 -1.646089754063e-03 0.000000000000e+00 1.646089754033e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -2.740732987783e-14 0.000000000000e+00 -2.592520583653e-15 3.000000000000e-14 -5.000000000000e+00 -3.590372164093e-08 0.000000000000e+00 3.590369164071e-08 3.000000000000e-14 -5.500000000000e+00 -1.030138991457e-05 0.000000000000e+00 1.030138988457e-05 3.000000000000e-14 -6.000000000000e+00 -4.673896698475e-05 0.000000000000e+00 4.673896695475e-05 3.000000000000e-14 -6.500000000000e+00 -1.089058548351e-04 0.000000000000e+00 1.089058548051e-04 3.000000000000e-14 -7.000000000000e+00 -1.937066287868e-04 0.000000000000e+00 1.937066287568e-04 3.000000000000e-14 -7.500000000000e+00 -2.977964459981e-04 0.000000000000e+00 2.977964459681e-04 3.000000000000e-14 -8.000000000000e+00 -4.181260311321e-04 0.000000000000e+00 4.181260311021e-04 3.000000000000e-14 -8.500000000000e+00 -5.520085184494e-04 0.000000000000e+00 5.520085184194e-04 3.000000000000e-14 -9.000000000000e+00 -6.970321579651e-04 0.000000000000e+00 6.970321579351e-04 3.000000000000e-14 -9.500000000000e+00 -8.491604272915e-04 0.000000000000e+00 8.491604272615e-04 3.000000000000e-14 -1.000000000000e+01 -9.925648019527e-04 0.000000000000e+00 9.925648019227e-04 3.000000000000e-14 -1.050000000000e+01 -1.114485343067e-03 0.000000000000e+00 1.114485343037e-03 3.000000000000e-14 -1.100000000000e+01 -1.211297228523e-03 0.000000000000e+00 1.211297228493e-03 3.000000000000e-14 -1.150000000000e+01 -1.286116217498e-03 0.000000000000e+00 1.286116217468e-03 3.000000000000e-14 -1.200000000000e+01 -1.344121324569e-03 0.000000000000e+00 1.344121324539e-03 3.000000000000e-14 -1.250000000000e+01 -1.389856019793e-03 0.000000000000e+00 1.389856019763e-03 3.000000000000e-14 -1.300000000000e+01 -1.426660253697e-03 0.000000000000e+00 1.426660253667e-03 3.000000000000e-14 -1.350000000000e+01 -1.456866458730e-03 0.000000000000e+00 1.456866458700e-03 3.000000000000e-14 -1.400000000000e+01 -1.482096664042e-03 0.000000000000e+00 1.482096664012e-03 3.000000000000e-14 -1.450000000000e+01 -1.503494428359e-03 0.000000000000e+00 1.503494428329e-03 3.000000000000e-14 -1.500000000000e+01 -1.521882084203e-03 0.000000000000e+00 1.521882084173e-03 3.000000000000e-14 -1.550000000000e+01 -1.537863463286e-03 0.000000000000e+00 1.537863463256e-03 3.000000000000e-14 -1.600000000000e+01 -1.551890941473e-03 0.000000000000e+00 1.551890941443e-03 3.000000000000e-14 -1.650000000000e+01 -1.564309760000e-03 0.000000000000e+00 1.564309759970e-03 3.000000000000e-14 -1.700000000000e+01 -1.575387857586e-03 0.000000000000e+00 1.575387857556e-03 3.000000000000e-14 -1.750000000000e+01 -1.585336345745e-03 0.000000000000e+00 1.585336345715e-03 3.000000000000e-14 -1.800000000000e+01 -1.594323836281e-03 0.000000000000e+00 1.594323836251e-03 3.000000000000e-14 -1.850000000000e+01 -1.602486653063e-03 0.000000000000e+00 1.602486653033e-03 3.000000000000e-14 -1.900000000000e+01 -1.609936236552e-03 0.000000000000e+00 1.609936236522e-03 3.000000000000e-14 -1.950000000000e+01 -1.616764598826e-03 0.000000000000e+00 1.616764598796e-03 3.000000000000e-14 -2.000000000000e+01 -1.623048401631e-03 0.000000000000e+00 1.623048401601e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -5.000000000000e+00 -1.429177451297e-10 0.000000000000e+00 1.428877451522e-10 3.000000000000e-14 -5.500000000000e+00 -8.526621934835e-06 0.000000000000e+00 8.526621904835e-06 3.000000000000e-14 -6.000000000000e+00 -5.509356374207e-05 0.000000000000e+00 5.509356371207e-05 3.000000000000e-14 -6.500000000000e+00 -1.402444148192e-04 0.000000000000e+00 1.402444147892e-04 3.000000000000e-14 -7.000000000000e+00 -2.573682800309e-04 0.000000000000e+00 2.573682800009e-04 3.000000000000e-14 -7.500000000000e+00 -4.000001483368e-04 0.000000000000e+00 4.000001483068e-04 3.000000000000e-14 -8.000000000000e+00 -5.627118973390e-04 0.000000000000e+00 5.627118973090e-04 3.000000000000e-14 -8.500000000000e+00 -7.409347423194e-04 0.000000000000e+00 7.409347422894e-04 3.000000000000e-14 -9.000000000000e+00 -9.305387228341e-04 0.000000000000e+00 9.305387228041e-04 3.000000000000e-14 -9.500000000000e+00 -1.114418822939e-03 0.000000000000e+00 1.114418822909e-03 3.000000000000e-14 -1.000000000000e+01 -1.261399534774e-03 0.000000000000e+00 1.261399534744e-03 3.000000000000e-14 -1.050000000000e+01 -1.367897865239e-03 0.000000000000e+00 1.367897865209e-03 3.000000000000e-14 -1.100000000000e+01 -1.443703255815e-03 0.000000000000e+00 1.443703255785e-03 3.000000000000e-14 -1.150000000000e+01 -1.498983511324e-03 0.000000000000e+00 1.498983511294e-03 3.000000000000e-14 -1.200000000000e+01 -1.540694019430e-03 0.000000000000e+00 1.540694019400e-03 3.000000000000e-14 -1.250000000000e+01 -1.573185952785e-03 0.000000000000e+00 1.573185952755e-03 3.000000000000e-14 -1.300000000000e+01 -1.599191420661e-03 0.000000000000e+00 1.599191420631e-03 3.000000000000e-14 -1.350000000000e+01 -1.620478086870e-03 0.000000000000e+00 1.620478086840e-03 3.000000000000e-14 -1.400000000000e+01 -1.638230014876e-03 0.000000000000e+00 1.638230014846e-03 3.000000000000e-14 -1.450000000000e+01 -1.653266967522e-03 0.000000000000e+00 1.653266967492e-03 3.000000000000e-14 -1.500000000000e+01 -1.666173467615e-03 0.000000000000e+00 1.666173467585e-03 3.000000000000e-14 -1.550000000000e+01 -1.677377204487e-03 0.000000000000e+00 1.677377204457e-03 3.000000000000e-14 -1.600000000000e+01 -1.687198241264e-03 0.000000000000e+00 1.687198241234e-03 3.000000000000e-14 -1.650000000000e+01 -1.695880858645e-03 0.000000000000e+00 1.695880858615e-03 3.000000000000e-14 -1.700000000000e+01 -1.703614746891e-03 0.000000000000e+00 1.703614746861e-03 3.000000000000e-14 -1.750000000000e+01 -1.710549469003e-03 0.000000000000e+00 1.710549468973e-03 3.000000000000e-14 -1.800000000000e+01 -1.716804557220e-03 0.000000000000e+00 1.716804557190e-03 3.000000000000e-14 -1.850000000000e+01 -1.722476705583e-03 0.000000000000e+00 1.722476705553e-03 3.000000000000e-14 -1.900000000000e+01 -1.727644987988e-03 0.000000000000e+00 1.727644987958e-03 3.000000000000e-14 -1.950000000000e+01 -1.732374706512e-03 0.000000000000e+00 1.732374706482e-03 3.000000000000e-14 -2.000000000000e+01 -1.736720272057e-03 0.000000000000e+00 1.736720272027e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -5.000000000000e+00 -1.429177446961e-10 0.000000000000e+00 1.428877448772e-10 3.000000000000e-14 -5.500000000000e+00 -8.526471846541e-06 0.000000000000e+00 8.526471816541e-06 3.000000000000e-14 -6.000000000000e+00 -5.509081131410e-05 0.000000000000e+00 5.509081128410e-05 3.000000000000e-14 -6.500000000000e+00 -1.402327275905e-04 0.000000000000e+00 1.402327275605e-04 3.000000000000e-14 -7.000000000000e+00 -2.573381606187e-04 0.000000000000e+00 2.573381605887e-04 3.000000000000e-14 -7.500000000000e+00 -3.999385781103e-04 0.000000000000e+00 3.999385780803e-04 3.000000000000e-14 -8.000000000000e+00 -5.625989784773e-04 0.000000000000e+00 5.625989784473e-04 3.000000000000e-14 -8.500000000000e+00 -7.407344296725e-04 0.000000000000e+00 7.407344296425e-04 3.000000000000e-14 -9.000000000000e+00 -9.301695077311e-04 0.000000000000e+00 9.301695077011e-04 3.000000000000e-14 -9.500000000000e+00 -1.112379497017e-03 0.000000000000e+00 1.112379496987e-03 3.000000000000e-14 -1.000000000000e+01 -1.256336041607e-03 0.000000000000e+00 1.256336041577e-03 3.000000000000e-14 -1.050000000000e+01 -1.359726257287e-03 0.000000000000e+00 1.359726257257e-03 3.000000000000e-14 -1.100000000000e+01 -1.433007201042e-03 0.000000000000e+00 1.433007201012e-03 3.000000000000e-14 -1.150000000000e+01 -1.486371115514e-03 0.000000000000e+00 1.486371115484e-03 3.000000000000e-14 -1.200000000000e+01 -1.526628631381e-03 0.000000000000e+00 1.526628631351e-03 3.000000000000e-14 -1.250000000000e+01 -1.557997969746e-03 0.000000000000e+00 1.557997969716e-03 3.000000000000e-14 -1.300000000000e+01 -1.583116324612e-03 0.000000000000e+00 1.583116324582e-03 3.000000000000e-14 -1.350000000000e+01 -1.603686856173e-03 0.000000000000e+00 1.603686856143e-03 3.000000000000e-14 -1.400000000000e+01 -1.620849676498e-03 0.000000000000e+00 1.620849676468e-03 3.000000000000e-14 -1.450000000000e+01 -1.635394041836e-03 0.000000000000e+00 1.635394041806e-03 3.000000000000e-14 -1.500000000000e+01 -1.647882818510e-03 0.000000000000e+00 1.647882818480e-03 3.000000000000e-14 -1.550000000000e+01 -1.658727973005e-03 0.000000000000e+00 1.658727972975e-03 3.000000000000e-14 -1.600000000000e+01 -1.668237911660e-03 0.000000000000e+00 1.668237911630e-03 3.000000000000e-14 -1.650000000000e+01 -1.676648106486e-03 0.000000000000e+00 1.676648106456e-03 3.000000000000e-14 -1.700000000000e+01 -1.684141475908e-03 0.000000000000e+00 1.684141475878e-03 3.000000000000e-14 -1.750000000000e+01 -1.690862295992e-03 0.000000000000e+00 1.690862295962e-03 3.000000000000e-14 -1.800000000000e+01 -1.696925913703e-03 0.000000000000e+00 1.696925913673e-03 3.000000000000e-14 -1.850000000000e+01 -1.702425668263e-03 0.000000000000e+00 1.702425668233e-03 3.000000000000e-14 -1.900000000000e+01 -1.707437913914e-03 0.000000000000e+00 1.707437913884e-03 3.000000000000e-14 -1.950000000000e+01 -1.712025725309e-03 0.000000000000e+00 1.712025725279e-03 3.000000000000e-14 -2.000000000000e+01 -1.716241672012e-03 0.000000000000e+00 1.716241671982e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -5.000000000000e+00 -1.429177446961e-10 0.000000000000e+00 1.428877445287e-10 3.000000000000e-14 -5.500000000000e+00 -8.526281658951e-06 0.000000000000e+00 8.526281628951e-06 3.000000000000e-14 -6.000000000000e+00 -5.508732373031e-05 0.000000000000e+00 5.508732370031e-05 3.000000000000e-14 -6.500000000000e+00 -1.402179183814e-04 0.000000000000e+00 1.402179183514e-04 3.000000000000e-14 -7.000000000000e+00 -2.572999865871e-04 0.000000000000e+00 2.572999865571e-04 3.000000000000e-14 -7.500000000000e+00 -3.998604880235e-04 0.000000000000e+00 3.998604879935e-04 3.000000000000e-14 -8.000000000000e+00 -5.624555175601e-04 0.000000000000e+00 5.624555175301e-04 3.000000000000e-14 -8.500000000000e+00 -7.404790412482e-04 0.000000000000e+00 7.404790412182e-04 3.000000000000e-14 -9.000000000000e+00 -9.296829351915e-04 0.000000000000e+00 9.296829351615e-04 3.000000000000e-14 -9.500000000000e+00 -1.109655995978e-03 0.000000000000e+00 1.109655995948e-03 3.000000000000e-14 -1.000000000000e+01 -1.249751809426e-03 0.000000000000e+00 1.249751809396e-03 3.000000000000e-14 -1.050000000000e+01 -1.349291726829e-03 0.000000000000e+00 1.349291726799e-03 3.000000000000e-14 -1.100000000000e+01 -1.419498574719e-03 0.000000000000e+00 1.419498574689e-03 3.000000000000e-14 -1.150000000000e+01 -1.470547646917e-03 0.000000000000e+00 1.470547646887e-03 3.000000000000e-14 -1.200000000000e+01 -1.509056254206e-03 0.000000000000e+00 1.509056254176e-03 3.000000000000e-14 -1.250000000000e+01 -1.539076392299e-03 0.000000000000e+00 1.539076392269e-03 3.000000000000e-14 -1.300000000000e+01 -1.563129147941e-03 0.000000000000e+00 1.563129147911e-03 3.000000000000e-14 -1.350000000000e+01 -1.582839544212e-03 0.000000000000e+00 1.582839544182e-03 3.000000000000e-14 -1.400000000000e+01 -1.599294714458e-03 0.000000000000e+00 1.599294714428e-03 3.000000000000e-14 -1.450000000000e+01 -1.613247239557e-03 0.000000000000e+00 1.613247239527e-03 3.000000000000e-14 -1.500000000000e+01 -1.625233987833e-03 0.000000000000e+00 1.625233987803e-03 3.000000000000e-14 -1.550000000000e+01 -1.635648065695e-03 0.000000000000e+00 1.635648065665e-03 3.000000000000e-14 -1.600000000000e+01 -1.644783902296e-03 0.000000000000e+00 1.644783902266e-03 3.000000000000e-14 -1.650000000000e+01 -1.652866409194e-03 0.000000000000e+00 1.652866409164e-03 3.000000000000e-14 -1.700000000000e+01 -1.660070386419e-03 0.000000000000e+00 1.660070386389e-03 3.000000000000e-14 -1.750000000000e+01 -1.666533771338e-03 0.000000000000e+00 1.666533771308e-03 3.000000000000e-14 -1.800000000000e+01 -1.672366892389e-03 0.000000000000e+00 1.672366892359e-03 3.000000000000e-14 -1.850000000000e+01 -1.677659065400e-03 0.000000000000e+00 1.677659065370e-03 3.000000000000e-14 -1.900000000000e+01 -1.682483382359e-03 0.000000000000e+00 1.682483382329e-03 3.000000000000e-14 -1.950000000000e+01 -1.686900245579e-03 0.000000000000e+00 1.686900245549e-03 3.000000000000e-14 -2.000000000000e+01 -1.690960015040e-03 0.000000000000e+00 1.690960015010e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -2.145549363175e-14 0.000000000000e+00 -8.544172727730e-15 3.000000000000e-14 -4.500000000000e+00 -1.161408313272e-10 0.000000000000e+00 1.161108315698e-10 3.000000000000e-14 -5.000000000000e+00 -9.947122292854e-07 0.000000000000e+00 9.947121992849e-07 3.000000000000e-14 -5.500000000000e+00 -1.287411275688e-05 0.000000000000e+00 1.287411272688e-05 3.000000000000e-14 -6.000000000000e+00 -4.037185663782e-05 0.000000000000e+00 4.037185660782e-05 3.000000000000e-14 -6.500000000000e+00 -8.307527173072e-05 0.000000000000e+00 8.307527170072e-05 3.000000000000e-14 -7.000000000000e+00 -1.397903681436e-04 0.000000000000e+00 1.397903681136e-04 3.000000000000e-14 -7.500000000000e+00 -2.091377650582e-04 0.000000000000e+00 2.091377650282e-04 3.000000000000e-14 -8.000000000000e+00 -2.897553417815e-04 0.000000000000e+00 2.897553417515e-04 3.000000000000e-14 -8.500000000000e+00 -3.803685871076e-04 0.000000000000e+00 3.803685870776e-04 3.000000000000e-14 -9.000000000000e+00 -4.798015376840e-04 0.000000000000e+00 4.798015376540e-04 3.000000000000e-14 -9.500000000000e+00 -5.867254801576e-04 0.000000000000e+00 5.867254801276e-04 3.000000000000e-14 -1.000000000000e+01 -6.972277651415e-04 0.000000000000e+00 6.972277651115e-04 3.000000000000e-14 -1.050000000000e+01 -8.058708739942e-04 0.000000000000e+00 8.058708739642e-04 3.000000000000e-14 -1.100000000000e+01 -9.078117425419e-04 0.000000000000e+00 9.078117425119e-04 3.000000000000e-14 -1.150000000000e+01 -9.994166401766e-04 0.000000000000e+00 9.994166401466e-04 3.000000000000e-14 -1.200000000000e+01 -1.079040076785e-03 0.000000000000e+00 1.079040076755e-03 3.000000000000e-14 -1.250000000000e+01 -1.146891929724e-03 0.000000000000e+00 1.146891929694e-03 3.000000000000e-14 -1.300000000000e+01 -1.204275369522e-03 0.000000000000e+00 1.204275369492e-03 3.000000000000e-14 -1.350000000000e+01 -1.252852727154e-03 0.000000000000e+00 1.252852727124e-03 3.000000000000e-14 -1.400000000000e+01 -1.294218481082e-03 0.000000000000e+00 1.294218481052e-03 3.000000000000e-14 -1.450000000000e+01 -1.329733330780e-03 0.000000000000e+00 1.329733330750e-03 3.000000000000e-14 -1.500000000000e+01 -1.360498600062e-03 0.000000000000e+00 1.360498600032e-03 3.000000000000e-14 -1.550000000000e+01 -1.387386031084e-03 0.000000000000e+00 1.387386031054e-03 3.000000000000e-14 -1.600000000000e+01 -1.411081191299e-03 0.000000000000e+00 1.411081191269e-03 3.000000000000e-14 -1.650000000000e+01 -1.432124220622e-03 0.000000000000e+00 1.432124220592e-03 3.000000000000e-14 -1.700000000000e+01 -1.450943287622e-03 0.000000000000e+00 1.450943287592e-03 3.000000000000e-14 -1.750000000000e+01 -1.467880589137e-03 0.000000000000e+00 1.467880589107e-03 3.000000000000e-14 -1.800000000000e+01 -1.483212093287e-03 0.000000000000e+00 1.483212093257e-03 3.000000000000e-14 -1.850000000000e+01 -1.497162415066e-03 0.000000000000e+00 1.497162415036e-03 3.000000000000e-14 -1.900000000000e+01 -1.509916026742e-03 0.000000000000e+00 1.509916026712e-03 3.000000000000e-14 -1.950000000000e+01 -1.521625744271e-03 0.000000000000e+00 1.521625744241e-03 3.000000000000e-14 -2.000000000000e+01 -1.532419195555e-03 0.000000000000e+00 1.532419195525e-03 3.000000000000e-14 -1.000000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -2.000027747584e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -2.145571047218e-14 0.000000000000e+00 -8.544172727730e-15 3.000000000000e-14 -4.500000000000e+00 -1.161408313272e-10 0.000000000000e+00 1.161108314736e-10 3.000000000000e-14 -5.000000000000e+00 -9.947092152992e-07 0.000000000000e+00 9.947091852991e-07 3.000000000000e-14 -5.500000000000e+00 -1.287392868001e-05 0.000000000000e+00 1.287392865001e-05 3.000000000000e-14 -6.000000000000e+00 -4.037072749573e-05 0.000000000000e+00 4.037072746573e-05 3.000000000000e-14 -6.500000000000e+00 -8.307170145299e-05 0.000000000000e+00 8.307170142299e-05 3.000000000000e-14 -7.000000000000e+00 -1.397821059325e-04 0.000000000000e+00 1.397821059025e-04 3.000000000000e-14 -7.500000000000e+00 -2.091217364177e-04 0.000000000000e+00 2.091217363877e-04 3.000000000000e-14 -8.000000000000e+00 -2.897274117763e-04 0.000000000000e+00 2.897274117463e-04 3.000000000000e-14 -8.500000000000e+00 -3.803230409370e-04 0.000000000000e+00 3.803230409070e-04 3.000000000000e-14 -9.000000000000e+00 -4.797300804778e-04 0.000000000000e+00 4.797300804478e-04 3.000000000000e-14 -9.500000000000e+00 -5.865904035930e-04 0.000000000000e+00 5.865904035630e-04 3.000000000000e-14 -1.000000000000e+01 -6.968543143331e-04 0.000000000000e+00 6.968543143031e-04 3.000000000000e-14 -1.050000000000e+01 -8.049873912560e-04 0.000000000000e+00 8.049873912260e-04 3.000000000000e-14 -1.100000000000e+01 -9.060841284479e-04 0.000000000000e+00 9.060841284179e-04 3.000000000000e-14 -1.150000000000e+01 -9.965465854051e-04 0.000000000000e+00 9.965465853751e-04 3.000000000000e-14 -1.200000000000e+01 -1.074854414861e-03 0.000000000000e+00 1.074854414831e-03 3.000000000000e-14 -1.250000000000e+01 -1.141357119880e-03 0.000000000000e+00 1.141357119850e-03 3.000000000000e-14 -1.300000000000e+01 -1.197456128111e-03 0.000000000000e+00 1.197456128081e-03 3.000000000000e-14 -1.350000000000e+01 -1.244862005986e-03 0.000000000000e+00 1.244862005956e-03 3.000000000000e-14 -1.400000000000e+01 -1.285182597484e-03 0.000000000000e+00 1.285182597454e-03 3.000000000000e-14 -1.450000000000e+01 -1.319773686629e-03 0.000000000000e+00 1.319773686599e-03 3.000000000000e-14 -1.500000000000e+01 -1.349724233813e-03 0.000000000000e+00 1.349724233783e-03 3.000000000000e-14 -1.550000000000e+01 -1.375891806986e-03 0.000000000000e+00 1.375891806956e-03 3.000000000000e-14 -1.600000000000e+01 -1.398948486191e-03 0.000000000000e+00 1.398948486161e-03 3.000000000000e-14 -1.650000000000e+01 -1.419422510430e-03 0.000000000000e+00 1.419422510400e-03 3.000000000000e-14 -1.700000000000e+01 -1.437731905214e-03 0.000000000000e+00 1.437731905184e-03 3.000000000000e-14 -1.750000000000e+01 -1.454210358010e-03 0.000000000000e+00 1.454210357980e-03 3.000000000000e-14 -1.800000000000e+01 -1.469126741127e-03 0.000000000000e+00 1.469126741097e-03 3.000000000000e-14 -1.850000000000e+01 -1.482699756737e-03 0.000000000000e+00 1.482699756707e-03 3.000000000000e-14 -1.900000000000e+01 -1.495108938933e-03 0.000000000000e+00 1.495108938903e-03 3.000000000000e-14 -1.950000000000e+01 -1.506502963367e-03 0.000000000000e+00 1.506502963337e-03 3.000000000000e-14 -2.000000000000e+01 -1.517005969955e-03 0.000000000000e+00 1.517005969925e-03 3.000000000000e-14 -1.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -1.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -2.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.000000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -3.500000000000e+00 -1.999984379497e-14 0.000000000000e+00 -1.000000000000e-14 3.000000000000e-14 -4.000000000000e+00 -2.145571047218e-14 0.000000000000e+00 -8.544172727730e-15 3.000000000000e-14 -4.500000000000e+00 -1.161408311103e-10 0.000000000000e+00 1.161108313516e-10 3.000000000000e-14 -5.000000000000e+00 -9.947053958997e-07 0.000000000000e+00 9.947053658999e-07 3.000000000000e-14 -5.500000000000e+00 -1.287369541990e-05 0.000000000000e+00 1.287369538990e-05 3.000000000000e-14 -6.000000000000e+00 -4.036929667764e-05 0.000000000000e+00 4.036929664764e-05 3.000000000000e-14 -6.500000000000e+00 -8.306717717572e-05 0.000000000000e+00 8.306717714572e-05 3.000000000000e-14 -7.000000000000e+00 -1.397716349886e-04 0.000000000000e+00 1.397716349586e-04 3.000000000000e-14 -7.500000000000e+00 -2.091014183290e-04 0.000000000000e+00 2.091014182990e-04 3.000000000000e-14 -8.000000000000e+00 -2.896919920272e-04 0.000000000000e+00 2.896919919972e-04 3.000000000000e-14 -8.500000000000e+00 -3.802652370802e-04 0.000000000000e+00 3.802652370502e-04 3.000000000000e-14 -9.000000000000e+00 -4.796392651730e-04 0.000000000000e+00 4.796392651430e-04 3.000000000000e-14 -9.500000000000e+00 -5.864155419572e-04 0.000000000000e+00 5.864155419272e-04 3.000000000000e-14 -1.000000000000e+01 -6.963669264817e-04 0.000000000000e+00 6.963669264517e-04 3.000000000000e-14 -1.050000000000e+01 -8.038356380502e-04 0.000000000000e+00 8.038356380202e-04 3.000000000000e-14 -1.100000000000e+01 -9.038418595981e-04 0.000000000000e+00 9.038418595681e-04 3.000000000000e-14 -1.150000000000e+01 -9.928446968962e-04 0.000000000000e+00 9.928446968662e-04 3.000000000000e-14 -1.200000000000e+01 -1.069491244830e-03 0.000000000000e+00 1.069491244800e-03 3.000000000000e-14 -1.250000000000e+01 -1.134307963931e-03 0.000000000000e+00 1.134307963901e-03 3.000000000000e-14 -1.300000000000e+01 -1.188815074351e-03 0.000000000000e+00 1.188815074321e-03 3.000000000000e-14 -1.350000000000e+01 -1.234777928648e-03 0.000000000000e+00 1.234777928618e-03 3.000000000000e-14 -1.400000000000e+01 -1.273816754980e-03 0.000000000000e+00 1.273816754950e-03 3.000000000000e-14 -1.450000000000e+01 -1.307278502643e-03 0.000000000000e+00 1.307278502613e-03 3.000000000000e-14 -1.500000000000e+01 -1.336235227344e-03 0.000000000000e+00 1.336235227314e-03 3.000000000000e-14 -1.550000000000e+01 -1.361526097992e-03 0.000000000000e+00 1.361526097962e-03 3.000000000000e-14 -1.600000000000e+01 -1.383806084460e-03 0.000000000000e+00 1.383806084430e-03 3.000000000000e-14 -1.650000000000e+01 -1.403588523086e-03 0.000000000000e+00 1.403588523056e-03 3.000000000000e-14 -1.700000000000e+01 -1.421278842526e-03 0.000000000000e+00 1.421278842496e-03 3.000000000000e-14 -1.750000000000e+01 -1.437200221678e-03 0.000000000000e+00 1.437200221648e-03 3.000000000000e-14 -1.800000000000e+01 -1.451612805087e-03 0.000000000000e+00 1.451612805057e-03 3.000000000000e-14 -1.850000000000e+01 -1.464728043737e-03 0.000000000000e+00 1.464728043707e-03 3.000000000000e-14 -1.900000000000e+01 -1.476719429358e-03 0.000000000000e+00 1.476719429328e-03 3.000000000000e-14 -1.950000000000e+01 -1.487730580271e-03 0.000000000000e+00 1.487730580241e-03 3.000000000000e-14 -2.000000000000e+01 -1.497881381664e-03 0.000000000000e+00 1.497881381634e-03 3.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/reference/dcVsub_Ig1_vb0_jd.standard0000644000265600020320000024357112264261473024747 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) -1.000000000000e+00 -1.100204587373e-09 0.000000000000e+00 1.100194577132e-09 1.001000000000e-14 -1.200000000000e+00 -5.114657012847e-08 0.000000000000e+00 5.114656011878e-08 1.001000000000e-14 -1.400000000000e+00 -9.455713661532e-07 0.000000000000e+00 9.455713561431e-07 1.001000000000e-14 -1.600000000000e+00 -4.505544944252e-06 0.000000000000e+00 4.505544934242e-06 1.001000000000e-14 -1.800000000000e+00 -1.162914770740e-05 0.000000000000e+00 1.162914769739e-05 1.001000000000e-14 -2.000000000000e+00 -2.258181433484e-05 0.000000000000e+00 2.258181432483e-05 1.001000000000e-14 -2.200000000000e+00 -3.741172488470e-05 0.000000000000e+00 3.741172487469e-05 1.001000000000e-14 -2.400000000000e+00 -5.606231207684e-05 0.000000000000e+00 5.606231206683e-05 1.001000000000e-14 -2.600000000000e+00 -7.841757737903e-05 0.000000000000e+00 7.841757736902e-05 1.001000000000e-14 -2.800000000000e+00 -1.043274432545e-04 0.000000000000e+00 1.043274432445e-04 1.001000000000e-14 -3.000000000000e+00 -1.336239016818e-04 0.000000000000e+00 1.336239016718e-04 1.001000000000e-14 -3.200000000000e+00 -1.661315586740e-04 0.000000000000e+00 1.661315586640e-04 1.001000000000e-14 -3.400000000000e+00 -2.016743774294e-04 0.000000000000e+00 2.016743774194e-04 1.001000000000e-14 -3.600000000000e+00 -2.400797930053e-04 0.000000000000e+00 2.400797929953e-04 1.001000000000e-14 -3.800000000000e+00 -2.811810286234e-04 0.000000000000e+00 2.811810286134e-04 1.001000000000e-14 -4.000000000000e+00 -3.248181995247e-04 0.000000000000e+00 3.248181995147e-04 1.001000000000e-14 -4.200000000000e+00 -3.708386063178e-04 0.000000000000e+00 3.708386063078e-04 1.001000000000e-14 -4.400000000000e+00 -4.190964843941e-04 0.000000000000e+00 4.190964843841e-04 1.001000000000e-14 -4.600000000000e+00 -4.694523800159e-04 0.000000000000e+00 4.694523800059e-04 1.001000000000e-14 -4.800000000000e+00 -5.217722583194e-04 0.000000000000e+00 5.217722583094e-04 1.001000000000e-14 -5.000000000000e+00 -5.759264066260e-04 0.000000000000e+00 5.759264066160e-04 1.001000000000e-14 -5.200000000000e+00 -6.317881734772e-04 0.000000000000e+00 6.317881734672e-04 1.001000000000e-14 -5.400000000000e+00 -6.892325770410e-04 0.000000000000e+00 6.892325770310e-04 1.001000000000e-14 -5.600000000000e+00 -7.481348225183e-04 0.000000000000e+00 7.481348225083e-04 1.001000000000e-14 -5.800000000000e+00 -8.083687467018e-04 0.000000000000e+00 8.083687466918e-04 1.001000000000e-14 -6.000000000000e+00 -8.698014655742e-04 0.000000000000e+00 8.698014655642e-04 1.001000000000e-14 -6.200000000000e+00 -9.320103273125e-04 0.000000000000e+00 9.320103273025e-04 1.001000000000e-14 -6.400000000000e+00 -9.933030803611e-04 0.000000000000e+00 9.933030803511e-04 1.001000000000e-14 -6.600000000000e+00 -1.052130507631e-03 0.000000000000e+00 1.052130507621e-03 1.001000000000e-14 -6.800000000000e+00 -1.107467104119e-03 0.000000000000e+00 1.107467104109e-03 1.001000000000e-14 -7.000000000000e+00 -1.158601429366e-03 0.000000000000e+00 1.158601429356e-03 1.001000000000e-14 -7.200000000000e+00 -1.205158637115e-03 0.000000000000e+00 1.205158637105e-03 1.001000000000e-14 -7.400000000000e+00 -1.247089310471e-03 0.000000000000e+00 1.247089310461e-03 1.001000000000e-14 -7.600000000000e+00 -1.284596953119e-03 0.000000000000e+00 1.284596953109e-03 1.001000000000e-14 -7.800000000000e+00 -1.318040259151e-03 0.000000000000e+00 1.318040259141e-03 1.001000000000e-14 -8.000000000000e+00 -1.347846583978e-03 0.000000000000e+00 1.347846583968e-03 1.001000000000e-14 -8.200000000000e+00 -1.374451984610e-03 0.000000000000e+00 1.374451984600e-03 1.001000000000e-14 -8.400000000000e+00 -1.398266828176e-03 0.000000000000e+00 1.398266828166e-03 1.001000000000e-14 -8.600000000000e+00 -1.419659845824e-03 0.000000000000e+00 1.419659845814e-03 1.001000000000e-14 -8.800000000000e+00 -1.438953479970e-03 0.000000000000e+00 1.438953479960e-03 1.001000000000e-14 -9.000000000000e+00 -1.456425305723e-03 0.000000000000e+00 1.456425305713e-03 1.001000000000e-14 -9.200000000000e+00 -1.472312255929e-03 0.000000000000e+00 1.472312255919e-03 1.001000000000e-14 -9.400000000000e+00 -1.486815797287e-03 0.000000000000e+00 1.486815797277e-03 1.001000000000e-14 -9.600000000000e+00 -1.500107100190e-03 0.000000000000e+00 1.500107100180e-03 1.001000000000e-14 -9.800000000000e+00 -1.512331763572e-03 0.000000000000e+00 1.512331763562e-03 1.001000000000e-14 -1.000000000000e+01 -1.523613936931e-03 0.000000000000e+00 1.523613936921e-03 1.001000000000e-14 -1.020000000000e+01 -1.534059823498e-03 0.000000000000e+00 1.534059823488e-03 1.001000000000e-14 -1.040000000000e+01 -1.543760613158e-03 0.000000000000e+00 1.543760613148e-03 1.001000000000e-14 -1.060000000000e+01 -1.552794917711e-03 0.000000000000e+00 1.552794917701e-03 1.001000000000e-14 -1.080000000000e+01 -1.561230784747e-03 0.000000000000e+00 1.561230784737e-03 1.001000000000e-14 -1.100000000000e+01 -1.569127360915e-03 0.000000000000e+00 1.569127360905e-03 1.001000000000e-14 -1.120000000000e+01 -1.576536266370e-03 0.000000000000e+00 1.576536266360e-03 1.001000000000e-14 -1.140000000000e+01 -1.583502732572e-03 0.000000000000e+00 1.583502732562e-03 1.001000000000e-14 -1.160000000000e+01 -1.590066546615e-03 0.000000000000e+00 1.590066546605e-03 1.001000000000e-14 -1.180000000000e+01 -1.596262837452e-03 0.000000000000e+00 1.596262837442e-03 1.001000000000e-14 -1.200000000000e+01 -1.602122732748e-03 0.000000000000e+00 1.602122732738e-03 1.001000000000e-14 -1.220000000000e+01 -1.607673909681e-03 0.000000000000e+00 1.607673909671e-03 1.001000000000e-14 -1.240000000000e+01 -1.612941058562e-03 0.000000000000e+00 1.612941058552e-03 1.001000000000e-14 -1.260000000000e+01 -1.617946274566e-03 0.000000000000e+00 1.617946274556e-03 1.001000000000e-14 -1.280000000000e+01 -1.622709389991e-03 0.000000000000e+00 1.622709389981e-03 1.001000000000e-14 -1.300000000000e+01 -1.627248257133e-03 0.000000000000e+00 1.627248257123e-03 1.001000000000e-14 -1.320000000000e+01 -1.631578990010e-03 0.000000000000e+00 1.631578990000e-03 1.001000000000e-14 -1.340000000000e+01 -1.635716171676e-03 0.000000000000e+00 1.635716171666e-03 1.001000000000e-14 -1.360000000000e+01 -1.639673032637e-03 0.000000000000e+00 1.639673032627e-03 1.001000000000e-14 -1.380000000000e+01 -1.643461604937e-03 0.000000000000e+00 1.643461604927e-03 1.001000000000e-14 -1.400000000000e+01 -1.647092855657e-03 0.000000000000e+00 1.647092855647e-03 1.001000000000e-14 -1.420000000000e+01 -1.650576802965e-03 0.000000000000e+00 1.650576802955e-03 1.001000000000e-14 -1.440000000000e+01 -1.653922617293e-03 0.000000000000e+00 1.653922617283e-03 1.001000000000e-14 -1.460000000000e+01 -1.657138709820e-03 0.000000000000e+00 1.657138709810e-03 1.001000000000e-14 -1.480000000000e+01 -1.660232825536e-03 0.000000000000e+00 1.660232825526e-03 1.001000000000e-14 -1.500000000000e+01 -1.663212047858e-03 0.000000000000e+00 1.663212047848e-03 1.001000000000e-14 -1.520000000000e+01 -1.666082957180e-03 0.000000000000e+00 1.666082957170e-03 1.001000000000e-14 -1.540000000000e+01 -1.668851616384e-03 0.000000000000e+00 1.668851616374e-03 1.001000000000e-14 -1.560000000000e+01 -1.671523635490e-03 0.000000000000e+00 1.671523635480e-03 1.001000000000e-14 -1.580000000000e+01 -1.674104213572e-03 0.000000000000e+00 1.674104213562e-03 1.001000000000e-14 -1.600000000000e+01 -1.676598176059e-03 0.000000000000e+00 1.676598176049e-03 1.001000000000e-14 -1.620000000000e+01 -1.679010008035e-03 0.000000000000e+00 1.679010008025e-03 1.001000000000e-14 -1.640000000000e+01 -1.681343884013e-03 0.000000000000e+00 1.681343884003e-03 1.001000000000e-14 -1.660000000000e+01 -1.683603694628e-03 0.000000000000e+00 1.683603694618e-03 1.001000000000e-14 -1.680000000000e+01 -1.685793070606e-03 0.000000000000e+00 1.685793070596e-03 1.001000000000e-14 -1.700000000000e+01 -1.687915404325e-03 0.000000000000e+00 1.687915404315e-03 1.001000000000e-14 -1.720000000000e+01 -1.689973869262e-03 0.000000000000e+00 1.689973869252e-03 1.001000000000e-14 -1.740000000000e+01 -1.691971437552e-03 0.000000000000e+00 1.691971437542e-03 1.001000000000e-14 -1.760000000000e+01 -1.693910895865e-03 0.000000000000e+00 1.693910895855e-03 1.001000000000e-14 -1.780000000000e+01 -1.695794859809e-03 0.000000000000e+00 1.695794859799e-03 1.001000000000e-14 -1.800000000000e+01 -1.697625786990e-03 0.000000000000e+00 1.697625786980e-03 1.001000000000e-14 -1.820000000000e+01 -1.699405988896e-03 0.000000000000e+00 1.699405988886e-03 1.001000000000e-14 -1.840000000000e+01 -1.701137641710e-03 0.000000000000e+00 1.701137641700e-03 1.001000000000e-14 -1.860000000000e+01 -1.702822796172e-03 0.000000000000e+00 1.702822796162e-03 1.001000000000e-14 -1.880000000000e+01 -1.704463386594e-03 0.000000000000e+00 1.704463386584e-03 1.001000000000e-14 -1.900000000000e+01 -1.706061239086e-03 0.000000000000e+00 1.706061239076e-03 1.001000000000e-14 -1.920000000000e+01 -1.707618079109e-03 0.000000000000e+00 1.707618079099e-03 1.001000000000e-14 -1.940000000000e+01 -1.709135538386e-03 0.000000000000e+00 1.709135538376e-03 1.001000000000e-14 -1.960000000000e+01 -1.710615161255e-03 0.000000000000e+00 1.710615161245e-03 1.001000000000e-14 -1.980000000000e+01 -1.712058410502e-03 0.000000000000e+00 1.712058410492e-03 1.001000000000e-14 -2.000000000000e+01 -1.713466672740e-03 0.000000000000e+00 1.713466672730e-03 1.001000000000e-14 -1.000000000000e+00 -1.100204584988e-09 0.000000000000e+00 1.100194574899e-09 1.001000000000e-14 -1.200000000000e+00 -5.114656551888e-08 0.000000000000e+00 5.114655550920e-08 1.001000000000e-14 -1.400000000000e+00 -9.455704146153e-07 0.000000000000e+00 9.455704046054e-07 1.001000000000e-14 -1.600000000000e+00 -4.505531739576e-06 0.000000000000e+00 4.505531729566e-06 1.001000000000e-14 -1.800000000000e+00 -1.162908395475e-05 0.000000000000e+00 1.162908394474e-05 1.001000000000e-14 -2.000000000000e+00 -2.258162234838e-05 0.000000000000e+00 2.258162233837e-05 1.001000000000e-14 -2.200000000000e+00 -3.741127965251e-05 0.000000000000e+00 3.741127964250e-05 1.001000000000e-14 -2.400000000000e+00 -5.606143636492e-05 0.000000000000e+00 5.606143635491e-05 1.001000000000e-14 -2.600000000000e+00 -7.841603851411e-05 0.000000000000e+00 7.841603850410e-05 1.001000000000e-14 -2.800000000000e+00 -1.043249501995e-04 0.000000000000e+00 1.043249501895e-04 1.001000000000e-14 -3.000000000000e+00 -1.336201011028e-04 0.000000000000e+00 1.336201010928e-04 1.001000000000e-14 -3.200000000000e+00 -1.661260288009e-04 0.000000000000e+00 1.661260287909e-04 1.001000000000e-14 -3.400000000000e+00 -2.016666185297e-04 0.000000000000e+00 2.016666185197e-04 1.001000000000e-14 -3.600000000000e+00 -2.400692131632e-04 0.000000000000e+00 2.400692131532e-04 1.001000000000e-14 -3.800000000000e+00 -2.811669232162e-04 0.000000000000e+00 2.811669232062e-04 1.001000000000e-14 -4.000000000000e+00 -3.247997222981e-04 0.000000000000e+00 3.247997222881e-04 1.001000000000e-14 -4.200000000000e+00 -3.708147292559e-04 0.000000000000e+00 3.708147292459e-04 1.001000000000e-14 -4.400000000000e+00 -4.190659426391e-04 0.000000000000e+00 4.190659426291e-04 1.001000000000e-14 -4.600000000000e+00 -4.694135969078e-04 0.000000000000e+00 4.694135968978e-04 1.001000000000e-14 -4.800000000000e+00 -5.217232442528e-04 0.000000000000e+00 5.217232442428e-04 1.001000000000e-14 -5.000000000000e+00 -5.758646240288e-04 0.000000000000e+00 5.758646240188e-04 1.001000000000e-14 -5.200000000000e+00 -6.317103591783e-04 0.000000000000e+00 6.317103591683e-04 1.001000000000e-14 -5.400000000000e+00 -6.891345132152e-04 0.000000000000e+00 6.891345132052e-04 1.001000000000e-14 -5.600000000000e+00 -7.480110486930e-04 0.000000000000e+00 7.480110486830e-04 1.001000000000e-14 -5.800000000000e+00 -8.082121934316e-04 0.000000000000e+00 8.082121934216e-04 1.001000000000e-14 -6.000000000000e+00 -8.696008126210e-04 0.000000000000e+00 8.696008126109e-04 1.001000000000e-14 -6.200000000000e+00 -9.316580743359e-04 0.000000000000e+00 9.316580743259e-04 1.001000000000e-14 -6.400000000000e+00 -9.925695141523e-04 0.000000000000e+00 9.925695141423e-04 1.001000000000e-14 -6.600000000000e+00 -1.050817724253e-03 0.000000000000e+00 1.050817724243e-03 1.001000000000e-14 -6.800000000000e+00 -1.105392363705e-03 0.000000000000e+00 1.105392363695e-03 1.001000000000e-14 -7.000000000000e+00 -1.155615393855e-03 0.000000000000e+00 1.155615393845e-03 1.001000000000e-14 -7.200000000000e+00 -1.201164177628e-03 0.000000000000e+00 1.201164177618e-03 1.001000000000e-14 -7.400000000000e+00 -1.242046290778e-03 0.000000000000e+00 1.242046290768e-03 1.001000000000e-14 -7.600000000000e+00 -1.278513750865e-03 0.000000000000e+00 1.278513750855e-03 1.001000000000e-14 -7.800000000000e+00 -1.310959238906e-03 0.000000000000e+00 1.310959238896e-03 1.001000000000e-14 -8.000000000000e+00 -1.339829899772e-03 0.000000000000e+00 1.339829899762e-03 1.001000000000e-14 -8.200000000000e+00 -1.365570660881e-03 0.000000000000e+00 1.365570660871e-03 1.001000000000e-14 -8.400000000000e+00 -1.388593513011e-03 0.000000000000e+00 1.388593513001e-03 1.001000000000e-14 -8.600000000000e+00 -1.409264533660e-03 0.000000000000e+00 1.409264533650e-03 1.001000000000e-14 -8.800000000000e+00 -1.427901295720e-03 0.000000000000e+00 1.427901295710e-03 1.001000000000e-14 -9.000000000000e+00 -1.444775589738e-03 0.000000000000e+00 1.444775589728e-03 1.001000000000e-14 -9.200000000000e+00 -1.460118409726e-03 0.000000000000e+00 1.460118409716e-03 1.001000000000e-14 -9.400000000000e+00 -1.474125539708e-03 0.000000000000e+00 1.474125539698e-03 1.001000000000e-14 -9.600000000000e+00 -1.486962920163e-03 0.000000000000e+00 1.486962920153e-03 1.001000000000e-14 -9.800000000000e+00 -1.498771445431e-03 0.000000000000e+00 1.498771445421e-03 1.001000000000e-14 -1.000000000000e+01 -1.509671090107e-03 0.000000000000e+00 1.509671090097e-03 1.001000000000e-14 -1.020000000000e+01 -1.519764381803e-03 0.000000000000e+00 1.519764381793e-03 1.001000000000e-14 -1.040000000000e+01 -1.529139288196e-03 0.000000000000e+00 1.529139288186e-03 1.001000000000e-14 -1.060000000000e+01 -1.537871601666e-03 0.000000000000e+00 1.537871601656e-03 1.001000000000e-14 -1.080000000000e+01 -1.546026903498e-03 0.000000000000e+00 1.546026903488e-03 1.001000000000e-14 -1.100000000000e+01 -1.553662181163e-03 0.000000000000e+00 1.553662181152e-03 1.001000000000e-14 -1.120000000000e+01 -1.560827161585e-03 0.000000000000e+00 1.560827161575e-03 1.001000000000e-14 -1.140000000000e+01 -1.567565412793e-03 0.000000000000e+00 1.567565412783e-03 1.001000000000e-14 -1.160000000000e+01 -1.573915256897e-03 0.000000000000e+00 1.573915256887e-03 1.001000000000e-14 -1.180000000000e+01 -1.579910529331e-03 0.000000000000e+00 1.579910529321e-03 1.001000000000e-14 -1.200000000000e+01 -1.585581212570e-03 0.000000000000e+00 1.585581212560e-03 1.001000000000e-14 -1.220000000000e+01 -1.590953967157e-03 0.000000000000e+00 1.590953967147e-03 1.001000000000e-14 -1.240000000000e+01 -1.596052578411e-03 0.000000000000e+00 1.596052578401e-03 1.001000000000e-14 -1.260000000000e+01 -1.600898333707e-03 0.000000000000e+00 1.600898333697e-03 1.001000000000e-14 -1.280000000000e+01 -1.605510342359e-03 0.000000000000e+00 1.605510342349e-03 1.001000000000e-14 -1.300000000000e+01 -1.609905807898e-03 0.000000000000e+00 1.609905807888e-03 1.001000000000e-14 -1.320000000000e+01 -1.614100260690e-03 0.000000000000e+00 1.614100260680e-03 1.001000000000e-14 -1.340000000000e+01 -1.618107757407e-03 0.000000000000e+00 1.618107757397e-03 1.001000000000e-14 -1.360000000000e+01 -1.621941052687e-03 0.000000000000e+00 1.621941052677e-03 1.001000000000e-14 -1.380000000000e+01 -1.625611747371e-03 0.000000000000e+00 1.625611747361e-03 1.001000000000e-14 -1.400000000000e+01 -1.629130416936e-03 0.000000000000e+00 1.629130416926e-03 1.001000000000e-14 -1.420000000000e+01 -1.632506723135e-03 0.000000000000e+00 1.632506723125e-03 1.001000000000e-14 -1.440000000000e+01 -1.635749511337e-03 0.000000000000e+00 1.635749511327e-03 1.001000000000e-14 -1.460000000000e+01 -1.638866895656e-03 0.000000000000e+00 1.638866895646e-03 1.001000000000e-14 -1.480000000000e+01 -1.641866348320e-03 0.000000000000e+00 1.641866348310e-03 1.001000000000e-14 -1.500000000000e+01 -1.644754704830e-03 0.000000000000e+00 1.644754704820e-03 1.001000000000e-14 -1.520000000000e+01 -1.647538315408e-03 0.000000000000e+00 1.647538315398e-03 1.001000000000e-14 -1.540000000000e+01 -1.650223031841e-03 0.000000000000e+00 1.650223031831e-03 1.001000000000e-14 -1.560000000000e+01 -1.652814269489e-03 0.000000000000e+00 1.652814269479e-03 1.001000000000e-14 -1.580000000000e+01 -1.655317047637e-03 0.000000000000e+00 1.655317047627e-03 1.001000000000e-14 -1.600000000000e+01 -1.657736025406e-03 0.000000000000e+00 1.657736025396e-03 1.001000000000e-14 -1.620000000000e+01 -1.660075533805e-03 0.000000000000e+00 1.660075533795e-03 1.001000000000e-14 -1.640000000000e+01 -1.662339604406e-03 0.000000000000e+00 1.662339604396e-03 1.001000000000e-14 -1.660000000000e+01 -1.664531995043e-03 0.000000000000e+00 1.664531995032e-03 1.001000000000e-14 -1.680000000000e+01 -1.666656212897e-03 0.000000000000e+00 1.666656212887e-03 1.001000000000e-14 -1.700000000000e+01 -1.668715535267e-03 0.000000000000e+00 1.668715535257e-03 1.001000000000e-14 -1.720000000000e+01 -1.670713028298e-03 0.000000000000e+00 1.670713028288e-03 1.001000000000e-14 -1.740000000000e+01 -1.672651563895e-03 0.000000000000e+00 1.672651563885e-03 1.001000000000e-14 -1.760000000000e+01 -1.674533835029e-03 0.000000000000e+00 1.674533835019e-03 1.001000000000e-14 -1.780000000000e+01 -1.676362369606e-03 0.000000000000e+00 1.676362369596e-03 1.001000000000e-14 -1.800000000000e+01 -1.678139543059e-03 0.000000000000e+00 1.678139543049e-03 1.001000000000e-14 -1.820000000000e+01 -1.679867589797e-03 0.000000000000e+00 1.679867589787e-03 1.001000000000e-14 -1.840000000000e+01 -1.681548613633e-03 0.000000000000e+00 1.681548613623e-03 1.001000000000e-14 -1.860000000000e+01 -1.683184597287e-03 0.000000000000e+00 1.683184597277e-03 1.001000000000e-14 -1.880000000000e+01 -1.684777411076e-03 0.000000000000e+00 1.684777411066e-03 1.001000000000e-14 -1.900000000000e+01 -1.686328820852e-03 0.000000000000e+00 1.686328820842e-03 1.001000000000e-14 -1.920000000000e+01 -1.687840495280e-03 0.000000000000e+00 1.687840495270e-03 1.001000000000e-14 -1.940000000000e+01 -1.689314012501e-03 0.000000000000e+00 1.689314012491e-03 1.001000000000e-14 -1.960000000000e+01 -1.690750866264e-03 0.000000000000e+00 1.690750866254e-03 1.001000000000e-14 -1.980000000000e+01 -1.692152471554e-03 0.000000000000e+00 1.692152471544e-03 1.001000000000e-14 -2.000000000000e+01 -1.693520169771e-03 0.000000000000e+00 1.693520169761e-03 1.001000000000e-14 -1.000000000000e+00 -1.100204582169e-09 0.000000000000e+00 1.100194572077e-09 1.001000000000e-14 -1.200000000000e+00 -5.114655967785e-08 0.000000000000e+00 5.114654966779e-08 1.001000000000e-14 -1.400000000000e+00 -9.455692087964e-07 0.000000000000e+00 9.455691987873e-07 1.001000000000e-14 -1.600000000000e+00 -4.505515006259e-06 0.000000000000e+00 4.505514996249e-06 1.001000000000e-14 -1.800000000000e+00 -1.162900316555e-05 0.000000000000e+00 1.162900315554e-05 1.001000000000e-14 -2.000000000000e+00 -2.258137905540e-05 0.000000000000e+00 2.258137904539e-05 1.001000000000e-14 -2.200000000000e+00 -3.741071542534e-05 0.000000000000e+00 3.741071541534e-05 1.001000000000e-14 -2.400000000000e+00 -5.606032656902e-05 0.000000000000e+00 5.606032655901e-05 1.001000000000e-14 -2.600000000000e+00 -7.841408820103e-05 0.000000000000e+00 7.841408819102e-05 1.001000000000e-14 -2.800000000000e+00 -1.043217903447e-04 0.000000000000e+00 1.043217903347e-04 1.001000000000e-14 -3.000000000000e+00 -1.336152835293e-04 0.000000000000e+00 1.336152835193e-04 1.001000000000e-14 -3.200000000000e+00 -1.661190182525e-04 0.000000000000e+00 1.661190182425e-04 1.001000000000e-14 -3.400000000000e+00 -2.016567803664e-04 0.000000000000e+00 2.016567803564e-04 1.001000000000e-14 -3.600000000000e+00 -2.400557949750e-04 0.000000000000e+00 2.400557949650e-04 1.001000000000e-14 -3.800000000000e+00 -2.811490282457e-04 0.000000000000e+00 2.811490282357e-04 1.001000000000e-14 -4.000000000000e+00 -3.247762719011e-04 0.000000000000e+00 3.247762718911e-04 1.001000000000e-14 -4.200000000000e+00 -3.707844106822e-04 0.000000000000e+00 3.707844106722e-04 1.001000000000e-14 -4.400000000000e+00 -4.190271371411e-04 0.000000000000e+00 4.190271371311e-04 1.001000000000e-14 -4.600000000000e+00 -4.693642815786e-04 0.000000000000e+00 4.693642815686e-04 1.001000000000e-14 -4.800000000000e+00 -5.216608591219e-04 0.000000000000e+00 5.216608591119e-04 1.001000000000e-14 -5.000000000000e+00 -5.757858940361e-04 0.000000000000e+00 5.757858940261e-04 1.001000000000e-14 -5.200000000000e+00 -6.316110592248e-04 0.000000000000e+00 6.316110592148e-04 1.001000000000e-14 -5.400000000000e+00 -6.890091643956e-04 0.000000000000e+00 6.890091643856e-04 1.001000000000e-14 -5.600000000000e+00 -7.478525355285e-04 0.000000000000e+00 7.478525355185e-04 1.001000000000e-14 -5.800000000000e+00 -8.080112668501e-04 0.000000000000e+00 8.080112668401e-04 1.001000000000e-14 -6.000000000000e+00 -8.693407687690e-04 0.000000000000e+00 8.693407687590e-04 1.001000000000e-14 -6.200000000000e+00 -9.311740413594e-04 0.000000000000e+00 9.311740413494e-04 1.001000000000e-14 -6.400000000000e+00 -9.915677538244e-04 0.000000000000e+00 9.915677538143e-04 1.001000000000e-14 -6.600000000000e+00 -1.049046488353e-03 0.000000000000e+00 1.049046488343e-03 1.001000000000e-14 -6.800000000000e+00 -1.102623128617e-03 0.000000000000e+00 1.102623128607e-03 1.001000000000e-14 -7.000000000000e+00 -1.151669074202e-03 0.000000000000e+00 1.151669074192e-03 1.001000000000e-14 -7.200000000000e+00 -1.195932802110e-03 0.000000000000e+00 1.195932802100e-03 1.001000000000e-14 -7.400000000000e+00 -1.235494918109e-03 0.000000000000e+00 1.235494918099e-03 1.001000000000e-14 -7.600000000000e+00 -1.270666386362e-03 0.000000000000e+00 1.270666386352e-03 1.001000000000e-14 -7.800000000000e+00 -1.301879017745e-03 0.000000000000e+00 1.301879017735e-03 1.001000000000e-14 -8.000000000000e+00 -1.329601193525e-03 0.000000000000e+00 1.329601193515e-03 1.001000000000e-14 -8.200000000000e+00 -1.354286027353e-03 0.000000000000e+00 1.354286027343e-03 1.001000000000e-14 -8.400000000000e+00 -1.376345421153e-03 0.000000000000e+00 1.376345421143e-03 1.001000000000e-14 -8.600000000000e+00 -1.396140717046e-03 0.000000000000e+00 1.396140717036e-03 1.001000000000e-14 -8.800000000000e+00 -1.413982518361e-03 0.000000000000e+00 1.413982518351e-03 1.001000000000e-14 -9.000000000000e+00 -1.430134878294e-03 0.000000000000e+00 1.430134878284e-03 1.001000000000e-14 -9.200000000000e+00 -1.444821110052e-03 0.000000000000e+00 1.444821110042e-03 1.001000000000e-14 -9.400000000000e+00 -1.458229795273e-03 0.000000000000e+00 1.458229795263e-03 1.001000000000e-14 -9.600000000000e+00 -1.470520334225e-03 0.000000000000e+00 1.470520334215e-03 1.001000000000e-14 -9.800000000000e+00 -1.481827793256e-03 0.000000000000e+00 1.481827793246e-03 1.001000000000e-14 -1.000000000000e+01 -1.492267010752e-03 0.000000000000e+00 1.492267010742e-03 1.001000000000e-14 -1.020000000000e+01 -1.501936015787e-03 0.000000000000e+00 1.501936015777e-03 1.001000000000e-14 -1.040000000000e+01 -1.510918848086e-03 0.000000000000e+00 1.510918848076e-03 1.001000000000e-14 -1.060000000000e+01 -1.519287873724e-03 0.000000000000e+00 1.519287873714e-03 1.001000000000e-14 -1.080000000000e+01 -1.527105684101e-03 0.000000000000e+00 1.527105684091e-03 1.001000000000e-14 -1.100000000000e+01 -1.534426654197e-03 0.000000000000e+00 1.534426654187e-03 1.001000000000e-14 -1.120000000000e+01 -1.541298223780e-03 0.000000000000e+00 1.541298223770e-03 1.001000000000e-14 -1.140000000000e+01 -1.547761953831e-03 0.000000000000e+00 1.547761953821e-03 1.001000000000e-14 -1.160000000000e+01 -1.553854400641e-03 0.000000000000e+00 1.553854400631e-03 1.001000000000e-14 -1.180000000000e+01 -1.559607841760e-03 0.000000000000e+00 1.559607841750e-03 1.001000000000e-14 -1.200000000000e+01 -1.565050881346e-03 0.000000000000e+00 1.565050881336e-03 1.001000000000e-14 -1.220000000000e+01 -1.570208956996e-03 0.000000000000e+00 1.570208956986e-03 1.001000000000e-14 -1.240000000000e+01 -1.575104765859e-03 0.000000000000e+00 1.575104765849e-03 1.001000000000e-14 -1.260000000000e+01 -1.579758624340e-03 0.000000000000e+00 1.579758624330e-03 1.001000000000e-14 -1.280000000000e+01 -1.584188772984e-03 0.000000000000e+00 1.584188772974e-03 1.001000000000e-14 -1.300000000000e+01 -1.588411635908e-03 0.000000000000e+00 1.588411635898e-03 1.001000000000e-14 -1.320000000000e+01 -1.592442042408e-03 0.000000000000e+00 1.592442042398e-03 1.001000000000e-14 -1.340000000000e+01 -1.596293416973e-03 0.000000000000e+00 1.596293416963e-03 1.001000000000e-14 -1.360000000000e+01 -1.599977942781e-03 0.000000000000e+00 1.599977942771e-03 1.001000000000e-14 -1.380000000000e+01 -1.603506702892e-03 0.000000000000e+00 1.603506702882e-03 1.001000000000e-14 -1.400000000000e+01 -1.606889802574e-03 0.000000000000e+00 1.606889802564e-03 1.001000000000e-14 -1.420000000000e+01 -1.610136475639e-03 0.000000000000e+00 1.610136475629e-03 1.001000000000e-14 -1.440000000000e+01 -1.613255177166e-03 0.000000000000e+00 1.613255177156e-03 1.001000000000e-14 -1.460000000000e+01 -1.616253680257e-03 0.000000000000e+00 1.616253680247e-03 1.001000000000e-14 -1.480000000000e+01 -1.619139082685e-03 0.000000000000e+00 1.619139082675e-03 1.001000000000e-14 -1.500000000000e+01 -1.621917969205e-03 0.000000000000e+00 1.621917969195e-03 1.001000000000e-14 -1.520000000000e+01 -1.624596398062e-03 0.000000000000e+00 1.624596398052e-03 1.001000000000e-14 -1.540000000000e+01 -1.627179967544e-03 0.000000000000e+00 1.627179967534e-03 1.001000000000e-14 -1.560000000000e+01 -1.629673859271e-03 0.000000000000e+00 1.629673859261e-03 1.001000000000e-14 -1.580000000000e+01 -1.632082876627e-03 0.000000000000e+00 1.632082876617e-03 1.001000000000e-14 -1.600000000000e+01 -1.634411479009e-03 0.000000000000e+00 1.634411478999e-03 1.001000000000e-14 -1.620000000000e+01 -1.636663812388e-03 0.000000000000e+00 1.636663812378e-03 1.001000000000e-14 -1.640000000000e+01 -1.638843736656e-03 0.000000000000e+00 1.638843736646e-03 1.001000000000e-14 -1.660000000000e+01 -1.640954850140e-03 0.000000000000e+00 1.640954850130e-03 1.001000000000e-14 -1.680000000000e+01 -1.643000511624e-03 0.000000000000e+00 1.643000511614e-03 1.001000000000e-14 -1.700000000000e+01 -1.644983860167e-03 0.000000000000e+00 1.644983860157e-03 1.001000000000e-14 -1.720000000000e+01 -1.646907832972e-03 0.000000000000e+00 1.646907832962e-03 1.001000000000e-14 -1.740000000000e+01 -1.648775181532e-03 0.000000000000e+00 1.648775181522e-03 1.001000000000e-14 -1.760000000000e+01 -1.650588486238e-03 0.000000000000e+00 1.650588486228e-03 1.001000000000e-14 -1.780000000000e+01 -1.652350169621e-03 0.000000000000e+00 1.652350169611e-03 1.001000000000e-14 -1.800000000000e+01 -1.654062508371e-03 0.000000000000e+00 1.654062508361e-03 1.001000000000e-14 -1.820000000000e+01 -1.655727644275e-03 0.000000000000e+00 1.655727644265e-03 1.001000000000e-14 -1.840000000000e+01 -1.657347594170e-03 0.000000000000e+00 1.657347594160e-03 1.001000000000e-14 -1.860000000000e+01 -1.658924259029e-03 0.000000000000e+00 1.658924259019e-03 1.001000000000e-14 -1.880000000000e+01 -1.660459432254e-03 0.000000000000e+00 1.660459432244e-03 1.001000000000e-14 -1.900000000000e+01 -1.661954807266e-03 0.000000000000e+00 1.661954807256e-03 1.001000000000e-14 -1.920000000000e+01 -1.663411984454e-03 0.000000000000e+00 1.663411984444e-03 1.001000000000e-14 -1.940000000000e+01 -1.664832477549e-03 0.000000000000e+00 1.664832477539e-03 1.001000000000e-14 -1.960000000000e+01 -1.666217719483e-03 0.000000000000e+00 1.666217719473e-03 1.001000000000e-14 -1.980000000000e+01 -1.667569067765e-03 0.000000000000e+00 1.667569067755e-03 1.001000000000e-14 -2.000000000000e+01 -1.668887809440e-03 0.000000000000e+00 1.668887809430e-03 1.001000000000e-14 -1.000000000000e+00 -5.365282870762e-13 0.000000000000e+00 5.265284871786e-13 1.000000000075e-14 -1.200000000000e+00 -1.082389735566e-10 0.000000000000e+00 1.082289739310e-10 1.000000000075e-14 -1.400000000000e+00 -2.514327297688e-08 0.000000000000e+00 2.514326297716e-08 1.000000000075e-14 -1.600000000000e+00 -1.239013869350e-06 0.000000000000e+00 1.239013859350e-06 1.000000000075e-14 -1.800000000000e+00 -6.882448007713e-06 0.000000000000e+00 6.882447997713e-06 1.000000000075e-14 -2.000000000000e+00 -1.828506155899e-05 0.000000000000e+00 1.828506154899e-05 1.000000000075e-14 -2.200000000000e+00 -3.571274917674e-05 0.000000000000e+00 3.571274916674e-05 1.000000000075e-14 -2.400000000000e+00 -5.909137904924e-05 0.000000000000e+00 5.909137903924e-05 1.000000000075e-14 -2.600000000000e+00 -8.817887896890e-05 0.000000000000e+00 8.817887895890e-05 1.000000000075e-14 -2.800000000000e+00 -1.226479656027e-04 0.000000000000e+00 1.226479655927e-04 1.000000000075e-14 -3.000000000000e+00 -1.621355278656e-04 0.000000000000e+00 1.621355278556e-04 1.000000000075e-14 -3.200000000000e+00 -2.062718154336e-04 0.000000000000e+00 2.062718154236e-04 1.000000000075e-14 -3.400000000000e+00 -2.546965762327e-04 0.000000000000e+00 2.546965762227e-04 1.000000000075e-14 -3.600000000000e+00 -3.070670684753e-04 0.000000000000e+00 3.070670684653e-04 1.000000000075e-14 -3.800000000000e+00 -3.630611955685e-04 0.000000000000e+00 3.630611955585e-04 1.000000000075e-14 -4.000000000000e+00 -4.223777608826e-04 0.000000000000e+00 4.223777608726e-04 1.000000000075e-14 -4.200000000000e+00 -4.847349998950e-04 0.000000000000e+00 4.847349998850e-04 1.000000000075e-14 -4.400000000000e+00 -5.498680176862e-04 0.000000000000e+00 5.498680176762e-04 1.000000000075e-14 -4.600000000000e+00 -6.175254322612e-04 0.000000000000e+00 6.175254322512e-04 1.000000000075e-14 -4.800000000000e+00 -6.874653224197e-04 0.000000000000e+00 6.874653224097e-04 1.000000000075e-14 -5.000000000000e+00 -7.594504618921e-04 0.000000000000e+00 7.594504618821e-04 1.000000000075e-14 -5.200000000000e+00 -8.332427757397e-04 0.000000000000e+00 8.332427757297e-04 1.000000000075e-14 -5.400000000000e+00 -9.085969713700e-04 0.000000000000e+00 9.085969713600e-04 1.000000000075e-14 -5.600000000000e+00 -9.852532791925e-04 0.000000000000e+00 9.852532791825e-04 1.000000000075e-14 -5.800000000000e+00 -1.062906280679e-03 0.000000000000e+00 1.062906280669e-03 1.000000000075e-14 -6.000000000000e+00 -1.139093350221e-03 0.000000000000e+00 1.139093350211e-03 1.000000000075e-14 -6.200000000000e+00 -1.209202717229e-03 0.000000000000e+00 1.209202717219e-03 1.000000000075e-14 -6.400000000000e+00 -1.271438857231e-03 0.000000000000e+00 1.271438857221e-03 1.000000000075e-14 -6.600000000000e+00 -1.325383889724e-03 0.000000000000e+00 1.325383889714e-03 1.000000000075e-14 -6.800000000000e+00 -1.371520297453e-03 0.000000000000e+00 1.371520297443e-03 1.000000000075e-14 -7.000000000000e+00 -1.410804483026e-03 0.000000000000e+00 1.410804483016e-03 1.000000000075e-14 -7.200000000000e+00 -1.444314127769e-03 0.000000000000e+00 1.444314127759e-03 1.000000000075e-14 -7.400000000000e+00 -1.473052556977e-03 0.000000000000e+00 1.473052556967e-03 1.000000000075e-14 -7.600000000000e+00 -1.497875689466e-03 0.000000000000e+00 1.497875689456e-03 1.000000000075e-14 -7.800000000000e+00 -1.519483819776e-03 0.000000000000e+00 1.519483819766e-03 1.000000000075e-14 -8.000000000000e+00 -1.538439380963e-03 0.000000000000e+00 1.538439380953e-03 1.000000000075e-14 -8.200000000000e+00 -1.555191362342e-03 0.000000000000e+00 1.555191362332e-03 1.000000000075e-14 -8.400000000000e+00 -1.570098490006e-03 0.000000000000e+00 1.570098489996e-03 1.000000000075e-14 -8.600000000000e+00 -1.583448691100e-03 0.000000000000e+00 1.583448691090e-03 1.000000000075e-14 -8.800000000000e+00 -1.595474587922e-03 0.000000000000e+00 1.595474587912e-03 1.000000000075e-14 -9.000000000000e+00 -1.606365535129e-03 0.000000000000e+00 1.606365535119e-03 1.000000000075e-14 -9.200000000000e+00 -1.616276879113e-03 0.000000000000e+00 1.616276879103e-03 1.000000000075e-14 -9.400000000000e+00 -1.625337065601e-03 0.000000000000e+00 1.625337065591e-03 1.000000000075e-14 -9.600000000000e+00 -1.633653108038e-03 0.000000000000e+00 1.633653108028e-03 1.000000000075e-14 -9.800000000000e+00 -1.641314815015e-03 0.000000000000e+00 1.641314815005e-03 1.000000000075e-14 -1.000000000000e+01 -1.648398078653e-03 0.000000000000e+00 1.648398078643e-03 1.000000000075e-14 -1.020000000000e+01 -1.654967450298e-03 0.000000000000e+00 1.654967450288e-03 1.000000000075e-14 -1.040000000000e+01 -1.661078172658e-03 0.000000000000e+00 1.661078172648e-03 1.000000000075e-14 -1.060000000000e+01 -1.666777794837e-03 0.000000000000e+00 1.666777794827e-03 1.000000000075e-14 -1.080000000000e+01 -1.672107465184e-03 0.000000000000e+00 1.672107465174e-03 1.000000000075e-14 -1.100000000000e+01 -1.677102973513e-03 0.000000000000e+00 1.677102973503e-03 1.000000000075e-14 -1.120000000000e+01 -1.681795597019e-03 0.000000000000e+00 1.681795597009e-03 1.000000000075e-14 -1.140000000000e+01 -1.686212791325e-03 0.000000000000e+00 1.686212791315e-03 1.000000000075e-14 -1.160000000000e+01 -1.690378758562e-03 0.000000000000e+00 1.690378758552e-03 1.000000000075e-14 -1.180000000000e+01 -1.694314917122e-03 0.000000000000e+00 1.694314917112e-03 1.000000000075e-14 -1.200000000000e+01 -1.698040292312e-03 0.000000000000e+00 1.698040292302e-03 1.000000000075e-14 -1.220000000000e+01 -1.701571842981e-03 0.000000000000e+00 1.701571842971e-03 1.000000000075e-14 -1.240000000000e+01 -1.704924736009e-03 0.000000000000e+00 1.704924735999e-03 1.000000000075e-14 -1.260000000000e+01 -1.708112578096e-03 0.000000000000e+00 1.708112578086e-03 1.000000000075e-14 -1.280000000000e+01 -1.711147612416e-03 0.000000000000e+00 1.711147612406e-03 1.000000000075e-14 -1.300000000000e+01 -1.714040886180e-03 0.000000000000e+00 1.714040886170e-03 1.000000000075e-14 -1.320000000000e+01 -1.716802394015e-03 0.000000000000e+00 1.716802394005e-03 1.000000000075e-14 -1.340000000000e+01 -1.719441201142e-03 0.000000000000e+00 1.719441201132e-03 1.000000000075e-14 -1.360000000000e+01 -1.721965549593e-03 0.000000000000e+00 1.721965549583e-03 1.000000000075e-14 -1.380000000000e+01 -1.724382967242e-03 0.000000000000e+00 1.724382967232e-03 1.000000000075e-14 -1.400000000000e+01 -1.726700277086e-03 0.000000000000e+00 1.726700277076e-03 1.000000000075e-14 -1.420000000000e+01 -1.728923776176e-03 0.000000000000e+00 1.728923776166e-03 1.000000000075e-14 -1.440000000000e+01 -1.731059220924e-03 0.000000000000e+00 1.731059220914e-03 1.000000000075e-14 -1.460000000000e+01 -1.733111899974e-03 0.000000000000e+00 1.733111899964e-03 1.000000000075e-14 -1.480000000000e+01 -1.735086681098e-03 0.000000000000e+00 1.735086681088e-03 1.000000000075e-14 -1.500000000000e+01 -1.736988052517e-03 0.000000000000e+00 1.736988052507e-03 1.000000000075e-14 -1.520000000000e+01 -1.738820159421e-03 0.000000000000e+00 1.738820159411e-03 1.000000000075e-14 -1.540000000000e+01 -1.740586836341e-03 0.000000000000e+00 1.740586836331e-03 1.000000000075e-14 -1.560000000000e+01 -1.742291635914e-03 0.000000000000e+00 1.742291635904e-03 1.000000000075e-14 -1.580000000000e+01 -1.743937854483e-03 0.000000000000e+00 1.743937854473e-03 1.000000000075e-14 -1.600000000000e+01 -1.745528554960e-03 0.000000000000e+00 1.745528554950e-03 1.000000000075e-14 -1.620000000000e+01 -1.747066587265e-03 0.000000000000e+00 1.747066587255e-03 1.000000000075e-14 -1.640000000000e+01 -1.748554606651e-03 0.000000000000e+00 1.748554606641e-03 1.000000000075e-14 -1.660000000000e+01 -1.749995090158e-03 0.000000000000e+00 1.749995090148e-03 1.000000000075e-14 -1.680000000000e+01 -1.751390351420e-03 0.000000000000e+00 1.751390351410e-03 1.000000000075e-14 -1.700000000000e+01 -1.752742554016e-03 0.000000000000e+00 1.752742554006e-03 1.000000000075e-14 -1.720000000000e+01 -1.754053723523e-03 0.000000000000e+00 1.754053723513e-03 1.000000000075e-14 -1.740000000000e+01 -1.755325758425e-03 0.000000000000e+00 1.755325758415e-03 1.000000000075e-14 -1.760000000000e+01 -1.756560439998e-03 0.000000000000e+00 1.756560439988e-03 1.000000000075e-14 -1.780000000000e+01 -1.757759441280e-03 0.000000000000e+00 1.757759441270e-03 1.000000000075e-14 -1.800000000000e+01 -1.758924335232e-03 0.000000000000e+00 1.758924335222e-03 1.000000000075e-14 -1.820000000000e+01 -1.760056602160e-03 0.000000000000e+00 1.760056602150e-03 1.000000000075e-14 -1.840000000000e+01 -1.761157636492e-03 0.000000000000e+00 1.761157636482e-03 1.000000000075e-14 -1.860000000000e+01 -1.762228752963e-03 0.000000000000e+00 1.762228752953e-03 1.000000000075e-14 -1.880000000000e+01 -1.763271192267e-03 0.000000000000e+00 1.763271192257e-03 1.000000000075e-14 -1.900000000000e+01 -1.764286126238e-03 0.000000000000e+00 1.764286126228e-03 1.000000000075e-14 -1.920000000000e+01 -1.765274662598e-03 0.000000000000e+00 1.765274662588e-03 1.000000000075e-14 -1.940000000000e+01 -1.766237849318e-03 0.000000000000e+00 1.766237849308e-03 1.000000000075e-14 -1.960000000000e+01 -1.767176678619e-03 0.000000000000e+00 1.767176678609e-03 1.000000000075e-14 -1.980000000000e+01 -1.768092090666e-03 0.000000000000e+00 1.768092090656e-03 1.000000000075e-14 -2.000000000000e+01 -1.768984976960e-03 0.000000000000e+00 1.768984976950e-03 1.000000000075e-14 -1.000000000000e+00 -5.365287207570e-13 0.000000000000e+00 5.265284871786e-13 1.000000000075e-14 -1.200000000000e+00 -1.082389737735e-10 0.000000000000e+00 1.082289739021e-10 1.000000000075e-14 -1.400000000000e+00 -2.514327141303e-08 0.000000000000e+00 2.514326141368e-08 1.000000000075e-14 -1.600000000000e+00 -1.239012000128e-06 0.000000000000e+00 1.239011990127e-06 1.000000000075e-14 -1.800000000000e+00 -6.882416040990e-06 0.000000000000e+00 6.882416030990e-06 1.000000000075e-14 -2.000000000000e+00 -1.828490240360e-05 0.000000000000e+00 1.828490239360e-05 1.000000000075e-14 -2.200000000000e+00 -3.571227017068e-05 0.000000000000e+00 3.571227016068e-05 1.000000000075e-14 -2.400000000000e+00 -5.909027957737e-05 0.000000000000e+00 5.909027956737e-05 1.000000000075e-14 -2.600000000000e+00 -8.817674636732e-05 0.000000000000e+00 8.817674635732e-05 1.000000000075e-14 -2.800000000000e+00 -1.226442730648e-04 0.000000000000e+00 1.226442730548e-04 1.000000000075e-14 -3.000000000000e+00 -1.621296289163e-04 0.000000000000e+00 1.621296289063e-04 1.000000000075e-14 -3.200000000000e+00 -2.062629306217e-04 0.000000000000e+00 2.062629306117e-04 1.000000000075e-14 -3.400000000000e+00 -2.546837680395e-04 0.000000000000e+00 2.546837680295e-04 1.000000000075e-14 -3.600000000000e+00 -3.070491997706e-04 0.000000000000e+00 3.070491997606e-04 1.000000000075e-14 -3.800000000000e+00 -3.630368652198e-04 0.000000000000e+00 3.630368652098e-04 1.000000000075e-14 -4.000000000000e+00 -4.223452071707e-04 0.000000000000e+00 4.223452071607e-04 1.000000000075e-14 -4.200000000000e+00 -4.846919578683e-04 0.000000000000e+00 4.846919578583e-04 1.000000000075e-14 -4.400000000000e+00 -5.498115099730e-04 0.000000000000e+00 5.498115099630e-04 1.000000000075e-14 -4.600000000000e+00 -6.174514636315e-04 0.000000000000e+00 6.174514636215e-04 1.000000000075e-14 -4.800000000000e+00 -6.873684363721e-04 0.000000000000e+00 6.873684363621e-04 1.000000000075e-14 -5.000000000000e+00 -7.593231037467e-04 0.000000000000e+00 7.593231037367e-04 1.000000000075e-14 -5.200000000000e+00 -8.330743941423e-04 0.000000000000e+00 8.330743941323e-04 1.000000000075e-14 -5.400000000000e+00 -9.083727815228e-04 0.000000000000e+00 9.083727815128e-04 1.000000000075e-14 -5.600000000000e+00 -9.849525858278e-04 0.000000000000e+00 9.849525858178e-04 1.000000000075e-14 -5.800000000000e+00 -1.062470802933e-03 0.000000000000e+00 1.062470802923e-03 1.000000000075e-14 -6.000000000000e+00 -1.137927809639e-03 0.000000000000e+00 1.137927809629e-03 1.000000000075e-14 -6.200000000000e+00 -1.206837207025e-03 0.000000000000e+00 1.206837207015e-03 1.000000000075e-14 -6.400000000000e+00 -1.267598999151e-03 0.000000000000e+00 1.267598999141e-03 1.000000000075e-14 -6.600000000000e+00 -1.319965509675e-03 0.000000000000e+00 1.319965509665e-03 1.000000000075e-14 -6.800000000000e+00 -1.364561099195e-03 0.000000000000e+00 1.364561099185e-03 1.000000000075e-14 -7.000000000000e+00 -1.402425480675e-03 0.000000000000e+00 1.402425480665e-03 1.000000000075e-14 -7.200000000000e+00 -1.434668578056e-03 0.000000000000e+00 1.434668578046e-03 1.000000000075e-14 -7.400000000000e+00 -1.462295209675e-03 0.000000000000e+00 1.462295209665e-03 1.000000000075e-14 -7.600000000000e+00 -1.486148420097e-03 0.000000000000e+00 1.486148420087e-03 1.000000000075e-14 -7.800000000000e+00 -1.506910800304e-03 0.000000000000e+00 1.506910800294e-03 1.000000000075e-14 -8.000000000000e+00 -1.525126887279e-03 0.000000000000e+00 1.525126887269e-03 1.000000000075e-14 -8.200000000000e+00 -1.541229482520e-03 0.000000000000e+00 1.541229482510e-03 1.000000000075e-14 -8.400000000000e+00 -1.555563392522e-03 0.000000000000e+00 1.555563392512e-03 1.000000000075e-14 -8.600000000000e+00 -1.568404863047e-03 0.000000000000e+00 1.568404863037e-03 1.000000000075e-14 -8.800000000000e+00 -1.579976820835e-03 0.000000000000e+00 1.579976820825e-03 1.000000000075e-14 -9.000000000000e+00 -1.590460603255e-03 0.000000000000e+00 1.590460603245e-03 1.000000000075e-14 -9.200000000000e+00 -1.600004924450e-03 0.000000000000e+00 1.600004924440e-03 1.000000000075e-14 -9.400000000000e+00 -1.608732728255e-03 0.000000000000e+00 1.608732728245e-03 1.000000000075e-14 -9.600000000000e+00 -1.616746444850e-03 0.000000000000e+00 1.616746444840e-03 1.000000000075e-14 -9.800000000000e+00 -1.624132046011e-03 0.000000000000e+00 1.624132046001e-03 1.000000000075e-14 -1.000000000000e+01 -1.630962194943e-03 0.000000000000e+00 1.630962194933e-03 1.000000000075e-14 -1.020000000000e+01 -1.637298710962e-03 0.000000000000e+00 1.637298710952e-03 1.000000000075e-14 -1.040000000000e+01 -1.643194512725e-03 0.000000000000e+00 1.643194512715e-03 1.000000000075e-14 -1.060000000000e+01 -1.648695161922e-03 0.000000000000e+00 1.648695161912e-03 1.000000000075e-14 -1.080000000000e+01 -1.653840098705e-03 0.000000000000e+00 1.653840098695e-03 1.000000000075e-14 -1.100000000000e+01 -1.658663637486e-03 0.000000000000e+00 1.658663637476e-03 1.000000000075e-14 -1.120000000000e+01 -1.663195775161e-03 0.000000000000e+00 1.663195775151e-03 1.000000000075e-14 -1.140000000000e+01 -1.667462851399e-03 0.000000000000e+00 1.667462851389e-03 1.000000000075e-14 -1.160000000000e+01 -1.671488091491e-03 0.000000000000e+00 1.671488091481e-03 1.000000000075e-14 -1.180000000000e+01 -1.675292055310e-03 0.000000000000e+00 1.675292055300e-03 1.000000000075e-14 -1.200000000000e+01 -1.678893010747e-03 0.000000000000e+00 1.678893010737e-03 1.000000000075e-14 -1.220000000000e+01 -1.682307245993e-03 0.000000000000e+00 1.682307245983e-03 1.000000000075e-14 -1.240000000000e+01 -1.685549332037e-03 0.000000000000e+00 1.685549332027e-03 1.000000000075e-14 -1.260000000000e+01 -1.688632344390e-03 0.000000000000e+00 1.688632344380e-03 1.000000000075e-14 -1.280000000000e+01 -1.691568051225e-03 0.000000000000e+00 1.691568051215e-03 1.000000000075e-14 -1.300000000000e+01 -1.694367073743e-03 0.000000000000e+00 1.694367073733e-03 1.000000000075e-14 -1.320000000000e+01 -1.697039023419e-03 0.000000000000e+00 1.697039023409e-03 1.000000000075e-14 -1.340000000000e+01 -1.699592619938e-03 0.000000000000e+00 1.699592619928e-03 1.000000000075e-14 -1.360000000000e+01 -1.702035792924e-03 0.000000000000e+00 1.702035792914e-03 1.000000000075e-14 -1.380000000000e+01 -1.704375786198e-03 0.000000000000e+00 1.704375786188e-03 1.000000000075e-14 -1.400000000000e+01 -1.706619167454e-03 0.000000000000e+00 1.706619167444e-03 1.000000000075e-14 -1.420000000000e+01 -1.708771998503e-03 0.000000000000e+00 1.708771998493e-03 1.000000000075e-14 -1.440000000000e+01 -1.710839822065e-03 0.000000000000e+00 1.710839822055e-03 1.000000000075e-14 -1.460000000000e+01 -1.712827731412e-03 0.000000000000e+00 1.712827731402e-03 1.000000000075e-14 -1.480000000000e+01 -1.714740415338e-03 0.000000000000e+00 1.714740415328e-03 1.000000000075e-14 -1.500000000000e+01 -1.716582197798e-03 0.000000000000e+00 1.716582197788e-03 1.000000000075e-14 -1.520000000000e+01 -1.718357072951e-03 0.000000000000e+00 1.718357072941e-03 1.000000000075e-14 -1.540000000000e+01 -1.720068736226e-03 0.000000000000e+00 1.720068736216e-03 1.000000000075e-14 -1.560000000000e+01 -1.721720611925e-03 0.000000000000e+00 1.721720611915e-03 1.000000000075e-14 -1.580000000000e+01 -1.723315877812e-03 0.000000000000e+00 1.723315877802e-03 1.000000000075e-14 -1.600000000000e+01 -1.724857487058e-03 0.000000000000e+00 1.724857487048e-03 1.000000000075e-14 -1.620000000000e+01 -1.726348187875e-03 0.000000000000e+00 1.726348187865e-03 1.000000000075e-14 -1.640000000000e+01 -1.727790541120e-03 0.000000000000e+00 1.727790541110e-03 1.000000000075e-14 -1.660000000000e+01 -1.729186936100e-03 0.000000000000e+00 1.729186936090e-03 1.000000000075e-14 -1.680000000000e+01 -1.730539604802e-03 0.000000000000e+00 1.730539604792e-03 1.000000000075e-14 -1.700000000000e+01 -1.731850634727e-03 0.000000000000e+00 1.731850634717e-03 1.000000000075e-14 -1.720000000000e+01 -1.733121980475e-03 0.000000000000e+00 1.733121980465e-03 1.000000000075e-14 -1.740000000000e+01 -1.734355474231e-03 0.000000000000e+00 1.734355474221e-03 1.000000000075e-14 -1.760000000000e+01 -1.735552835273e-03 0.000000000000e+00 1.735552835263e-03 1.000000000075e-14 -1.780000000000e+01 -1.736715678597e-03 0.000000000000e+00 1.736715678587e-03 1.000000000075e-14 -1.800000000000e+01 -1.737845522767e-03 0.000000000000e+00 1.737845522757e-03 1.000000000075e-14 -1.820000000000e+01 -1.738943797058e-03 0.000000000000e+00 1.738943797048e-03 1.000000000075e-14 -1.840000000000e+01 -1.740011847972e-03 0.000000000000e+00 1.740011847962e-03 1.000000000075e-14 -1.860000000000e+01 -1.741050945191e-03 0.000000000000e+00 1.741050945181e-03 1.000000000075e-14 -1.880000000000e+01 -1.742062287018e-03 0.000000000000e+00 1.742062287008e-03 1.000000000075e-14 -1.900000000000e+01 -1.743047005364e-03 0.000000000000e+00 1.743047005354e-03 1.000000000075e-14 -1.920000000000e+01 -1.744006170319e-03 0.000000000000e+00 1.744006170309e-03 1.000000000075e-14 -1.940000000000e+01 -1.744940794347e-03 0.000000000000e+00 1.744940794337e-03 1.000000000075e-14 -1.960000000000e+01 -1.745851836145e-03 0.000000000000e+00 1.745851836135e-03 1.000000000075e-14 -1.980000000000e+01 -1.746740204193e-03 0.000000000000e+00 1.746740204183e-03 1.000000000075e-14 -2.000000000000e+01 -1.747606760028e-03 0.000000000000e+00 1.747606760018e-03 1.000000000075e-14 -1.000000000000e+00 -5.365285039166e-13 0.000000000000e+00 5.265284871785e-13 1.000000000075e-14 -1.200000000000e+00 -1.082389739903e-10 0.000000000000e+00 1.082289738644e-10 1.000000000075e-14 -1.400000000000e+00 -2.514326943219e-08 0.000000000000e+00 2.514325943238e-08 1.000000000075e-14 -1.600000000000e+00 -1.239009631393e-06 0.000000000000e+00 1.239009621393e-06 1.000000000075e-14 -1.800000000000e+00 -6.882375532055e-06 0.000000000000e+00 6.882375522055e-06 1.000000000075e-14 -2.000000000000e+00 -1.828470071777e-05 0.000000000000e+00 1.828470070777e-05 1.000000000075e-14 -2.200000000000e+00 -3.571166315255e-05 0.000000000000e+00 3.571166314256e-05 1.000000000075e-14 -2.400000000000e+00 -5.908888622995e-05 0.000000000000e+00 5.908888621995e-05 1.000000000075e-14 -2.600000000000e+00 -8.817404358866e-05 0.000000000000e+00 8.817404357866e-05 1.000000000075e-14 -2.800000000000e+00 -1.226395928533e-04 0.000000000000e+00 1.226395928433e-04 1.000000000075e-14 -3.000000000000e+00 -1.621221511157e-04 0.000000000000e+00 1.621221511057e-04 1.000000000075e-14 -3.200000000000e+00 -2.062516656204e-04 0.000000000000e+00 2.062516656104e-04 1.000000000075e-14 -3.400000000000e+00 -2.546675242244e-04 0.000000000000e+00 2.546675242144e-04 1.000000000075e-14 -3.600000000000e+00 -3.070265296082e-04 0.000000000000e+00 3.070265295982e-04 1.000000000075e-14 -3.800000000000e+00 -3.630059814995e-04 0.000000000000e+00 3.630059814895e-04 1.000000000075e-14 -4.000000000000e+00 -4.223038569664e-04 0.000000000000e+00 4.223038569564e-04 1.000000000075e-14 -4.200000000000e+00 -4.846372356463e-04 0.000000000000e+00 4.846372356363e-04 1.000000000075e-14 -4.400000000000e+00 -5.497395822661e-04 0.000000000000e+00 5.497395822561e-04 1.000000000075e-14 -4.600000000000e+00 -6.173571650441e-04 0.000000000000e+00 6.173571650341e-04 1.000000000075e-14 -4.800000000000e+00 -6.872446801392e-04 0.000000000000e+00 6.872446801292e-04 1.000000000075e-14 -5.000000000000e+00 -7.591600310368e-04 0.000000000000e+00 7.591600310268e-04 1.000000000075e-14 -5.200000000000e+00 -8.328581690295e-04 0.000000000000e+00 8.328581690195e-04 1.000000000075e-14 -5.400000000000e+00 -9.080839264475e-04 0.000000000000e+00 9.080839264375e-04 1.000000000075e-14 -5.600000000000e+00 -9.845637055398e-04 0.000000000000e+00 9.845637055298e-04 1.000000000075e-14 -5.800000000000e+00 -1.061866752697e-03 0.000000000000e+00 1.061866752687e-03 1.000000000075e-14 -6.000000000000e+00 -1.136292379839e-03 0.000000000000e+00 1.136292379829e-03 1.000000000075e-14 -6.200000000000e+00 -1.203615391325e-03 0.000000000000e+00 1.203615391315e-03 1.000000000075e-14 -6.400000000000e+00 -1.262478186586e-03 0.000000000000e+00 1.262478186576e-03 1.000000000075e-14 -6.600000000000e+00 -1.312855054190e-03 0.000000000000e+00 1.312855054180e-03 1.000000000075e-14 -6.800000000000e+00 -1.355541130549e-03 0.000000000000e+00 1.355541130539e-03 1.000000000075e-14 -7.000000000000e+00 -1.391667369079e-03 0.000000000000e+00 1.391667369069e-03 1.000000000075e-14 -7.200000000000e+00 -1.422372950212e-03 0.000000000000e+00 1.422372950202e-03 1.000000000075e-14 -7.400000000000e+00 -1.448657525792e-03 0.000000000000e+00 1.448657525782e-03 1.000000000075e-14 -7.600000000000e+00 -1.471344293358e-03 0.000000000000e+00 1.471344293348e-03 1.000000000075e-14 -7.800000000000e+00 -1.491092022426e-03 0.000000000000e+00 1.491092022416e-03 1.000000000075e-14 -8.000000000000e+00 -1.508422327071e-03 0.000000000000e+00 1.508422327061e-03 1.000000000075e-14 -8.200000000000e+00 -1.523747794103e-03 0.000000000000e+00 1.523747794093e-03 1.000000000075e-14 -8.400000000000e+00 -1.537396109016e-03 0.000000000000e+00 1.537396109006e-03 1.000000000075e-14 -8.600000000000e+00 -1.549629288758e-03 0.000000000000e+00 1.549629288748e-03 1.000000000075e-14 -8.800000000000e+00 -1.560658527200e-03 0.000000000000e+00 1.560658527190e-03 1.000000000075e-14 -9.000000000000e+00 -1.570655503606e-03 0.000000000000e+00 1.570655503596e-03 1.000000000075e-14 -9.200000000000e+00 -1.579760967978e-03 0.000000000000e+00 1.579760967968e-03 1.000000000075e-14 -9.400000000000e+00 -1.588091272371e-03 0.000000000000e+00 1.588091272361e-03 1.000000000075e-14 -9.600000000000e+00 -1.595743364730e-03 0.000000000000e+00 1.595743364720e-03 1.000000000075e-14 -9.800000000000e+00 -1.602798632805e-03 0.000000000000e+00 1.602798632795e-03 1.000000000075e-14 -1.000000000000e+01 -1.609325885252e-03 0.000000000000e+00 1.609325885242e-03 1.000000000075e-14 -1.020000000000e+01 -1.615383681896e-03 0.000000000000e+00 1.615383681886e-03 1.000000000075e-14 -1.040000000000e+01 -1.621022169730e-03 0.000000000000e+00 1.621022169720e-03 1.000000000075e-14 -1.060000000000e+01 -1.626284540863e-03 0.000000000000e+00 1.626284540853e-03 1.000000000075e-14 -1.080000000000e+01 -1.631208199065e-03 0.000000000000e+00 1.631208199055e-03 1.000000000075e-14 -1.100000000000e+01 -1.635825700008e-03 0.000000000000e+00 1.635825699998e-03 1.000000000075e-14 -1.120000000000e+01 -1.640165514422e-03 0.000000000000e+00 1.640165514412e-03 1.000000000075e-14 -1.140000000000e+01 -1.644252651659e-03 0.000000000000e+00 1.644252651649e-03 1.000000000075e-14 -1.160000000000e+01 -1.648109172436e-03 0.000000000000e+00 1.648109172426e-03 1.000000000075e-14 -1.180000000000e+01 -1.651754613007e-03 0.000000000000e+00 1.651754612997e-03 1.000000000075e-14 -1.200000000000e+01 -1.655206338067e-03 0.000000000000e+00 1.655206338057e-03 1.000000000075e-14 -1.220000000000e+01 -1.658479835957e-03 0.000000000000e+00 1.658479835947e-03 1.000000000075e-14 -1.240000000000e+01 -1.661588966878e-03 0.000000000000e+00 1.661588966868e-03 1.000000000075e-14 -1.260000000000e+01 -1.664546172619e-03 0.000000000000e+00 1.664546172609e-03 1.000000000075e-14 -1.280000000000e+01 -1.667362654575e-03 0.000000000000e+00 1.667362654565e-03 1.000000000075e-14 -1.300000000000e+01 -1.670048525535e-03 0.000000000000e+00 1.670048525525e-03 1.000000000075e-14 -1.320000000000e+01 -1.672612939626e-03 0.000000000000e+00 1.672612939616e-03 1.000000000075e-14 -1.340000000000e+01 -1.675064204018e-03 0.000000000000e+00 1.675064204008e-03 1.000000000075e-14 -1.360000000000e+01 -1.677409875301e-03 0.000000000000e+00 1.677409875291e-03 1.000000000075e-14 -1.380000000000e+01 -1.679656858073e-03 0.000000000000e+00 1.679656858063e-03 1.000000000075e-14 -1.400000000000e+01 -1.681811415039e-03 0.000000000000e+00 1.681811415029e-03 1.000000000075e-14 -1.420000000000e+01 -1.683879326989e-03 0.000000000000e+00 1.683879326979e-03 1.000000000075e-14 -1.440000000000e+01 -1.685865881307e-03 0.000000000000e+00 1.685865881297e-03 1.000000000075e-14 -1.460000000000e+01 -1.687775937771e-03 0.000000000000e+00 1.687775937761e-03 1.000000000075e-14 -1.480000000000e+01 -1.689613971246e-03 0.000000000000e+00 1.689613971236e-03 1.000000000075e-14 -1.500000000000e+01 -1.691384109310e-03 0.000000000000e+00 1.691384109300e-03 1.000000000075e-14 -1.520000000000e+01 -1.693090165535e-03 0.000000000000e+00 1.693090165525e-03 1.000000000075e-14 -1.540000000000e+01 -1.694735668998e-03 0.000000000000e+00 1.694735668988e-03 1.000000000075e-14 -1.560000000000e+01 -1.696323890510e-03 0.000000000000e+00 1.696323890500e-03 1.000000000075e-14 -1.580000000000e+01 -1.697857865983e-03 0.000000000000e+00 1.697857865973e-03 1.000000000075e-14 -1.600000000000e+01 -1.699340417294e-03 0.000000000000e+00 1.699340417284e-03 1.000000000075e-14 -1.620000000000e+01 -1.700774170951e-03 0.000000000000e+00 1.700774170941e-03 1.000000000075e-14 -1.640000000000e+01 -1.702161574839e-03 0.000000000000e+00 1.702161574829e-03 1.000000000075e-14 -1.660000000000e+01 -1.703504913256e-03 0.000000000000e+00 1.703504913246e-03 1.000000000075e-14 -1.680000000000e+01 -1.704806320452e-03 0.000000000000e+00 1.704806320442e-03 1.000000000075e-14 -1.700000000000e+01 -1.706067792843e-03 0.000000000000e+00 1.706067792833e-03 1.000000000075e-14 -1.720000000000e+01 -1.707291200037e-03 0.000000000000e+00 1.707291200027e-03 1.000000000075e-14 -1.740000000000e+01 -1.708478294825e-03 0.000000000000e+00 1.708478294815e-03 1.000000000075e-14 -1.760000000000e+01 -1.709630722227e-03 0.000000000000e+00 1.709630722217e-03 1.000000000075e-14 -1.780000000000e+01 -1.710750027715e-03 0.000000000000e+00 1.710750027705e-03 1.000000000075e-14 -1.800000000000e+01 -1.711837664685e-03 0.000000000000e+00 1.711837664675e-03 1.000000000075e-14 -1.820000000000e+01 -1.712895001267e-03 0.000000000000e+00 1.712895001257e-03 1.000000000075e-14 -1.840000000000e+01 -1.713923326534e-03 0.000000000000e+00 1.713923326524e-03 1.000000000075e-14 -1.860000000000e+01 -1.714923856178e-03 0.000000000000e+00 1.714923856168e-03 1.000000000075e-14 -1.880000000000e+01 -1.715897737694e-03 0.000000000000e+00 1.715897737684e-03 1.000000000075e-14 -1.900000000000e+01 -1.716846055138e-03 0.000000000000e+00 1.716846055128e-03 1.000000000075e-14 -1.920000000000e+01 -1.717769833485e-03 0.000000000000e+00 1.717769833475e-03 1.000000000075e-14 -1.940000000000e+01 -1.718670042629e-03 0.000000000000e+00 1.718670042619e-03 1.000000000075e-14 -1.960000000000e+01 -1.719547601069e-03 0.000000000000e+00 1.719547601059e-03 1.000000000075e-14 -1.980000000000e+01 -1.720403379292e-03 0.000000000000e+00 1.720403379282e-03 1.000000000075e-14 -2.000000000000e+01 -1.721238202897e-03 0.000000000000e+00 1.721238202887e-03 1.000000000075e-14 -1.000000000000e+00 -5.358074626597e-07 0.000000000000e+00 5.357944989161e-07 1.296374362086e-11 -1.200000000000e+00 -2.218796728646e-06 0.000000000000e+00 2.218783764902e-06 1.296374362086e-11 -1.400000000000e+00 -5.697638534852e-06 0.000000000000e+00 5.697625571108e-06 1.296374362086e-11 -1.600000000000e+00 -1.122525579101e-05 0.000000000000e+00 1.122524282726e-05 1.296374362086e-11 -1.800000000000e+00 -1.890480590402e-05 0.000000000000e+00 1.890479294028e-05 1.296374362086e-11 -2.000000000000e+00 -2.876971234390e-05 0.000000000000e+00 2.876969938016e-05 1.296374362086e-11 -2.200000000000e+00 -4.081491768155e-05 0.000000000000e+00 4.081490471781e-05 1.296374362086e-11 -2.400000000000e+00 -5.501171367514e-05 0.000000000000e+00 5.501170071140e-05 1.296374362086e-11 -2.600000000000e+00 -7.131611058442e-05 0.000000000000e+00 7.131609762068e-05 1.296374362086e-11 -2.800000000000e+00 -8.967415040333e-05 0.000000000000e+00 8.967413743959e-05 1.296374362086e-11 -3.000000000000e+00 -1.100255229223e-04 0.000000000000e+00 1.100255099586e-04 1.296374362086e-11 -3.200000000000e+00 -1.323061141153e-04 0.000000000000e+00 1.323061011515e-04 1.296374362086e-11 -3.400000000000e+00 -1.564498230306e-04 0.000000000000e+00 1.564498100668e-04 1.296374362086e-11 -3.600000000000e+00 -1.823898511270e-04 0.000000000000e+00 1.823898381633e-04 1.296374362086e-11 -3.800000000000e+00 -2.100596005995e-04 0.000000000000e+00 2.100595876357e-04 1.296374362086e-11 -4.000000000000e+00 -2.393932791443e-04 0.000000000000e+00 2.393932661805e-04 1.296374362086e-11 -4.200000000000e+00 -2.703262831503e-04 0.000000000000e+00 2.703262701866e-04 1.296374362086e-11 -4.400000000000e+00 -3.027954133063e-04 0.000000000000e+00 3.027954003426e-04 1.296374362086e-11 -4.600000000000e+00 -3.367389633533e-04 0.000000000000e+00 3.367389503896e-04 1.296374362086e-11 -4.800000000000e+00 -3.720967128466e-04 0.000000000000e+00 3.720966998828e-04 1.296374362086e-11 -5.000000000000e+00 -4.088098475595e-04 0.000000000000e+00 4.088098345958e-04 1.296374362086e-11 -5.200000000000e+00 -4.468208258296e-04 0.000000000000e+00 4.468208128658e-04 1.296374362086e-11 -5.400000000000e+00 -4.860732035447e-04 0.000000000000e+00 4.860731905810e-04 1.296374362086e-11 -5.600000000000e+00 -5.265114108942e-04 0.000000000000e+00 5.265113979305e-04 1.296374362086e-11 -5.800000000000e+00 -5.680803242757e-04 0.000000000000e+00 5.680803113120e-04 1.296374362086e-11 -6.000000000000e+00 -6.107230120871e-04 0.000000000000e+00 6.107229991233e-04 1.296374362086e-11 -6.200000000000e+00 -6.543604713893e-04 0.000000000000e+00 6.543604584256e-04 1.296374362086e-11 -6.400000000000e+00 -6.987851024813e-04 0.000000000000e+00 6.987850895176e-04 1.296374362086e-11 -6.600000000000e+00 -7.435938619360e-04 0.000000000000e+00 7.435938489722e-04 1.296374362086e-11 -6.800000000000e+00 -7.883646835803e-04 0.000000000000e+00 7.883646706165e-04 1.296374362086e-11 -7.000000000000e+00 -8.327099417422e-04 0.000000000000e+00 8.327099287784e-04 1.296374362086e-11 -7.200000000000e+00 -8.762555805259e-04 0.000000000000e+00 8.762555675622e-04 1.296374362086e-11 -7.400000000000e+00 -9.186422092260e-04 0.000000000000e+00 9.186421962622e-04 1.296374362086e-11 -7.600000000000e+00 -9.595404379186e-04 0.000000000000e+00 9.595404249548e-04 1.296374362086e-11 -7.800000000000e+00 -9.986703596262e-04 0.000000000000e+00 9.986703466624e-04 1.296374362086e-11 -8.000000000000e+00 -1.035818148942e-03 0.000000000000e+00 1.035818135978e-03 1.296374362086e-11 -8.200000000000e+00 -1.070845048707e-03 0.000000000000e+00 1.070845035744e-03 1.296374362086e-11 -8.400000000000e+00 -1.103687046887e-03 0.000000000000e+00 1.103687033923e-03 1.296374362086e-11 -8.600000000000e+00 -1.134346569337e-03 0.000000000000e+00 1.134346556373e-03 1.296374362086e-11 -8.800000000000e+00 -1.162879308862e-03 0.000000000000e+00 1.162879295898e-03 1.296374362086e-11 -9.000000000000e+00 -1.189379517258e-03 0.000000000000e+00 1.189379504294e-03 1.296374362086e-11 -9.200000000000e+00 -1.213966243490e-03 0.000000000000e+00 1.213966230527e-03 1.296374362086e-11 -9.400000000000e+00 -1.236771869714e-03 0.000000000000e+00 1.236771856750e-03 1.296374362086e-11 -9.600000000000e+00 -1.257933367186e-03 0.000000000000e+00 1.257933354222e-03 1.296374362086e-11 -9.800000000000e+00 -1.277586117143e-03 0.000000000000e+00 1.277586104180e-03 1.296374362086e-11 -1.000000000000e+01 -1.295859871280e-03 0.000000000000e+00 1.295859858317e-03 1.296374362086e-11 -1.020000000000e+01 -1.312876357462e-03 0.000000000000e+00 1.312876344499e-03 1.296374362086e-11 -1.040000000000e+01 -1.328748074282e-03 0.000000000000e+00 1.328748061319e-03 1.296374362086e-11 -1.060000000000e+01 -1.343577899326e-03 0.000000000000e+00 1.343577886363e-03 1.296374362086e-11 -1.080000000000e+01 -1.357459224516e-03 0.000000000000e+00 1.357459211552e-03 1.296374362086e-11 -1.100000000000e+01 -1.370476410775e-03 0.000000000000e+00 1.370476397812e-03 1.296374362086e-11 -1.120000000000e+01 -1.382705417717e-03 0.000000000000e+00 1.382705404754e-03 1.296374362086e-11 -1.140000000000e+01 -1.394214511921e-03 0.000000000000e+00 1.394214498957e-03 1.296374362086e-11 -1.160000000000e+01 -1.405064991969e-03 0.000000000000e+00 1.405064979005e-03 1.296374362086e-11 -1.180000000000e+01 -1.415311892485e-03 0.000000000000e+00 1.415311879521e-03 1.296374362086e-11 -1.200000000000e+01 -1.425004645734e-03 0.000000000000e+00 1.425004632770e-03 1.296374362086e-11 -1.220000000000e+01 -1.434187690072e-03 0.000000000000e+00 1.434187677108e-03 1.296374362086e-11 -1.240000000000e+01 -1.442901021359e-03 0.000000000000e+00 1.442901008395e-03 1.296374362086e-11 -1.260000000000e+01 -1.451180687646e-03 0.000000000000e+00 1.451180674682e-03 1.296374362086e-11 -1.280000000000e+01 -1.459059229875e-03 0.000000000000e+00 1.459059216912e-03 1.296374362086e-11 -1.300000000000e+01 -1.466566072608e-03 0.000000000000e+00 1.466566059645e-03 1.296374362086e-11 -1.320000000000e+01 -1.473727869361e-03 0.000000000000e+00 1.473727856397e-03 1.296374362086e-11 -1.340000000000e+01 -1.480568807218e-03 0.000000000000e+00 1.480568794254e-03 1.296374362086e-11 -1.360000000000e+01 -1.487110875251e-03 0.000000000000e+00 1.487110862287e-03 1.296374362086e-11 -1.380000000000e+01 -1.493374100949e-03 0.000000000000e+00 1.493374087985e-03 1.296374362086e-11 -1.400000000000e+01 -1.499376758516e-03 0.000000000000e+00 1.499376745552e-03 1.296374362086e-11 -1.420000000000e+01 -1.505135552475e-03 0.000000000000e+00 1.505135539511e-03 1.296374362086e-11 -1.440000000000e+01 -1.510665779659e-03 0.000000000000e+00 1.510665766695e-03 1.296374362086e-11 -1.460000000000e+01 -1.515981472283e-03 0.000000000000e+00 1.515981459319e-03 1.296374362086e-11 -1.480000000000e+01 -1.521095524474e-03 0.000000000000e+00 1.521095511510e-03 1.296374362086e-11 -1.500000000000e+01 -1.526019804327e-03 0.000000000000e+00 1.526019791363e-03 1.296374362086e-11 -1.520000000000e+01 -1.530765253296e-03 0.000000000000e+00 1.530765240332e-03 1.296374362086e-11 -1.540000000000e+01 -1.535341974492e-03 0.000000000000e+00 1.535341961529e-03 1.296374362086e-11 -1.560000000000e+01 -1.539759311258e-03 0.000000000000e+00 1.539759298294e-03 1.296374362086e-11 -1.580000000000e+01 -1.544025917195e-03 0.000000000000e+00 1.544025904231e-03 1.296374362086e-11 -1.600000000000e+01 -1.548149832648e-03 0.000000000000e+00 1.548149819684e-03 1.296374362086e-11 -1.620000000000e+01 -1.552138483356e-03 0.000000000000e+00 1.552138470393e-03 1.296374362086e-11 -1.640000000000e+01 -1.555998818817e-03 0.000000000000e+00 1.555998805853e-03 1.296374362086e-11 -1.660000000000e+01 -1.559737296700e-03 0.000000000000e+00 1.559737283736e-03 1.296374362086e-11 -1.680000000000e+01 -1.563359938847e-03 0.000000000000e+00 1.563359925883e-03 1.296374362086e-11 -1.700000000000e+01 -1.566872367667e-03 0.000000000000e+00 1.566872354703e-03 1.296374362086e-11 -1.720000000000e+01 -1.570279838948e-03 0.000000000000e+00 1.570279825984e-03 1.296374362086e-11 -1.740000000000e+01 -1.573587271490e-03 0.000000000000e+00 1.573587258527e-03 1.296374362086e-11 -1.760000000000e+01 -1.576799273922e-03 0.000000000000e+00 1.576799260958e-03 1.296374362086e-11 -1.780000000000e+01 -1.579920168989e-03 0.000000000000e+00 1.579920156025e-03 1.296374362086e-11 -1.800000000000e+01 -1.582954015597e-03 0.000000000000e+00 1.582954002633e-03 1.296374362086e-11 -1.820000000000e+01 -1.585904628849e-03 0.000000000000e+00 1.585904615885e-03 1.296374362086e-11 -1.840000000000e+01 -1.588775598273e-03 0.000000000000e+00 1.588775585309e-03 1.296374362086e-11 -1.860000000000e+01 -1.591570304437e-03 0.000000000000e+00 1.591570291473e-03 1.296374362086e-11 -1.880000000000e+01 -1.594291934113e-03 0.000000000000e+00 1.594291921149e-03 1.296374362086e-11 -1.900000000000e+01 -1.596943494133e-03 0.000000000000e+00 1.596943481169e-03 1.296374362086e-11 -1.920000000000e+01 -1.599527824071e-03 0.000000000000e+00 1.599527811107e-03 1.296374362086e-11 -1.940000000000e+01 -1.602047607856e-03 0.000000000000e+00 1.602047594892e-03 1.296374362086e-11 -1.960000000000e+01 -1.604505384431e-03 0.000000000000e+00 1.604505371468e-03 1.296374362086e-11 -1.980000000000e+01 -1.606903557546e-03 0.000000000000e+00 1.606903544582e-03 1.296374362086e-11 -2.000000000000e+01 -1.609244404750e-03 0.000000000000e+00 1.609244391786e-03 1.296374362086e-11 -1.000000000000e+00 -5.358071997722e-07 0.000000000000e+00 5.357942360289e-07 1.296374362086e-11 -1.200000000000e+00 -2.218793596364e-06 0.000000000000e+00 2.218780632620e-06 1.296374362086e-11 -1.400000000000e+00 -5.697623052599e-06 0.000000000000e+00 5.697610088855e-06 1.296374362086e-11 -1.600000000000e+00 -1.122520731130e-05 0.000000000000e+00 1.122519434755e-05 1.296374362086e-11 -1.800000000000e+00 -1.890468929058e-05 0.000000000000e+00 1.890467632684e-05 1.296374362086e-11 -2.000000000000e+00 -2.876947539300e-05 0.000000000000e+00 2.876946242925e-05 1.296374362086e-11 -2.200000000000e+00 -4.081448906475e-05 0.000000000000e+00 4.081447610100e-05 1.296374362086e-11 -2.400000000000e+00 -5.501100120224e-05 0.000000000000e+00 5.501098823849e-05 1.296374362086e-11 -2.600000000000e+00 -7.131499958506e-05 0.000000000000e+00 7.131498662132e-05 1.296374362086e-11 -2.800000000000e+00 -8.967250202164e-05 0.000000000000e+00 8.967248905789e-05 1.296374362086e-11 -3.000000000000e+00 -1.100231721131e-04 0.000000000000e+00 1.100231591493e-04 1.296374362086e-11 -3.200000000000e+00 -1.323028671202e-04 0.000000000000e+00 1.323028541565e-04 1.296374362086e-11 -3.400000000000e+00 -1.564454540956e-04 0.000000000000e+00 1.564454411319e-04 1.296374362086e-11 -3.600000000000e+00 -1.823840981914e-04 0.000000000000e+00 1.823840852276e-04 1.296374362086e-11 -3.800000000000e+00 -2.100521596450e-04 0.000000000000e+00 2.100521466812e-04 1.296374362086e-11 -4.000000000000e+00 -2.393837968351e-04 0.000000000000e+00 2.393837838713e-04 1.296374362086e-11 -4.200000000000e+00 -2.703143473201e-04 0.000000000000e+00 2.703143343564e-04 1.296374362086e-11 -4.400000000000e+00 -3.027805407664e-04 0.000000000000e+00 3.027805278026e-04 1.296374362086e-11 -4.600000000000e+00 -3.367205844026e-04 0.000000000000e+00 3.367205714389e-04 1.296374362086e-11 -4.800000000000e+00 -3.720741517803e-04 0.000000000000e+00 3.720741388165e-04 1.296374362086e-11 -5.000000000000e+00 -4.087822984061e-04 0.000000000000e+00 4.087822854423e-04 1.296374362086e-11 -5.200000000000e+00 -4.467873224921e-04 0.000000000000e+00 4.467873095284e-04 1.296374362086e-11 -5.400000000000e+00 -4.860325832726e-04 0.000000000000e+00 4.860325703088e-04 1.296374362086e-11 -5.600000000000e+00 -5.264622674549e-04 0.000000000000e+00 5.264622544912e-04 1.296374362086e-11 -5.800000000000e+00 -5.680209210049e-04 0.000000000000e+00 5.680209080412e-04 1.296374362086e-11 -6.000000000000e+00 -6.106508262391e-04 0.000000000000e+00 6.106508132754e-04 1.296374362086e-11 -6.200000000000e+00 -6.542681074855e-04 0.000000000000e+00 6.542680945217e-04 1.296374362086e-11 -6.400000000000e+00 -6.986460005452e-04 0.000000000000e+00 6.986459875814e-04 1.296374362086e-11 -6.600000000000e+00 -7.433645282831e-04 0.000000000000e+00 7.433645153193e-04 1.296374362086e-11 -6.800000000000e+00 -7.879952418655e-04 0.000000000000e+00 7.879952289018e-04 1.296374362086e-11 -7.000000000000e+00 -8.321431618210e-04 0.000000000000e+00 8.321431488572e-04 1.296374362086e-11 -7.200000000000e+00 -8.754267854072e-04 0.000000000000e+00 8.754267724434e-04 1.296374362086e-11 -7.400000000000e+00 -9.174816694366e-04 0.000000000000e+00 9.174816564729e-04 1.296374362086e-11 -7.600000000000e+00 -9.579775777949e-04 0.000000000000e+00 9.579775648311e-04 1.296374362086e-11 -7.800000000000e+00 -9.966388489234e-04 0.000000000000e+00 9.966388359596e-04 1.296374362086e-11 -8.000000000000e+00 -1.033260730064e-03 0.000000000000e+00 1.033260717101e-03 1.296374362086e-11 -8.200000000000e+00 -1.067717057538e-03 0.000000000000e+00 1.067717044574e-03 1.296374362086e-11 -8.400000000000e+00 -1.099958073358e-03 0.000000000000e+00 1.099958060394e-03 1.296374362086e-11 -8.600000000000e+00 -1.130000306279e-03 0.000000000000e+00 1.130000293315e-03 1.296374362086e-11 -8.800000000000e+00 -1.157912059506e-03 0.000000000000e+00 1.157912046542e-03 1.296374362086e-11 -9.000000000000e+00 -1.183797966095e-03 0.000000000000e+00 1.183797953131e-03 1.296374362086e-11 -9.200000000000e+00 -1.207785014141e-03 0.000000000000e+00 1.207785001178e-03 1.296374362086e-11 -9.400000000000e+00 -1.230011223520e-03 0.000000000000e+00 1.230011210556e-03 1.296374362086e-11 -9.600000000000e+00 -1.250617229617e-03 0.000000000000e+00 1.250617216653e-03 1.296374362086e-11 -9.800000000000e+00 -1.269740495743e-03 0.000000000000e+00 1.269740482779e-03 1.296374362086e-11 -1.000000000000e+01 -1.287511653521e-03 0.000000000000e+00 1.287511640557e-03 1.296374362086e-11 -1.020000000000e+01 -1.304052439395e-03 0.000000000000e+00 1.304052426431e-03 1.296374362086e-11 -1.040000000000e+01 -1.319474758111e-03 0.000000000000e+00 1.319474745147e-03 1.296374362086e-11 -1.060000000000e+01 -1.333880499225e-03 0.000000000000e+00 1.333880486262e-03 1.296374362086e-11 -1.080000000000e+01 -1.347361827728e-03 0.000000000000e+00 1.347361814764e-03 1.296374362086e-11 -1.100000000000e+01 -1.360001750851e-03 0.000000000000e+00 1.360001737887e-03 1.296374362086e-11 -1.120000000000e+01 -1.371874826318e-03 0.000000000000e+00 1.371874813355e-03 1.296374362086e-11 -1.140000000000e+01 -1.383047923945e-03 0.000000000000e+00 1.383047910982e-03 1.296374362086e-11 -1.160000000000e+01 -1.393580985461e-03 0.000000000000e+00 1.393580972497e-03 1.296374362086e-11 -1.180000000000e+01 -1.403527750055e-03 0.000000000000e+00 1.403527737091e-03 1.296374362086e-11 -1.200000000000e+01 -1.412936428149e-03 0.000000000000e+00 1.412936415185e-03 1.296374362086e-11 -1.220000000000e+01 -1.421850315582e-03 0.000000000000e+00 1.421850302619e-03 1.296374362086e-11 -1.240000000000e+01 -1.430308346437e-03 0.000000000000e+00 1.430308333474e-03 1.296374362086e-11 -1.260000000000e+01 -1.438345586319e-03 0.000000000000e+00 1.438345573355e-03 1.296374362086e-11 -1.280000000000e+01 -1.445993669878e-03 0.000000000000e+00 1.445993656914e-03 1.296374362086e-11 -1.300000000000e+01 -1.453281187338e-03 0.000000000000e+00 1.453281174374e-03 1.296374362086e-11 -1.320000000000e+01 -1.460234025091e-03 0.000000000000e+00 1.460234012127e-03 1.296374362086e-11 -1.340000000000e+01 -1.466875665388e-03 0.000000000000e+00 1.466875652424e-03 1.296374362086e-11 -1.360000000000e+01 -1.473227449854e-03 0.000000000000e+00 1.473227436890e-03 1.296374362086e-11 -1.380000000000e+01 -1.479308811184e-03 0.000000000000e+00 1.479308798221e-03 1.296374362086e-11 -1.400000000000e+01 -1.485137476957e-03 0.000000000000e+00 1.485137463993e-03 1.296374362086e-11 -1.420000000000e+01 -1.490729649045e-03 0.000000000000e+00 1.490729636081e-03 1.296374362086e-11 -1.440000000000e+01 -1.496100161724e-03 0.000000000000e+00 1.496100148761e-03 1.296374362086e-11 -1.460000000000e+01 -1.501262621185e-03 0.000000000000e+00 1.501262608221e-03 1.296374362086e-11 -1.480000000000e+01 -1.506229528796e-03 0.000000000000e+00 1.506229515832e-03 1.296374362086e-11 -1.500000000000e+01 -1.511012390198e-03 0.000000000000e+00 1.511012377235e-03 1.296374362086e-11 -1.520000000000e+01 -1.515621811995e-03 0.000000000000e+00 1.515621799032e-03 1.296374362086e-11 -1.540000000000e+01 -1.520067587610e-03 0.000000000000e+00 1.520067574646e-03 1.296374362086e-11 -1.560000000000e+01 -1.524358773638e-03 0.000000000000e+00 1.524358760675e-03 1.296374362086e-11 -1.580000000000e+01 -1.528503772849e-03 0.000000000000e+00 1.528503759885e-03 1.296374362086e-11 -1.600000000000e+01 -1.532510333442e-03 0.000000000000e+00 1.532510320478e-03 1.296374362086e-11 -1.620000000000e+01 -1.536385698091e-03 0.000000000000e+00 1.536385685127e-03 1.296374362086e-11 -1.640000000000e+01 -1.540136587533e-03 0.000000000000e+00 1.540136574569e-03 1.296374362086e-11 -1.660000000000e+01 -1.543769260931e-03 0.000000000000e+00 1.543769247968e-03 1.296374362086e-11 -1.680000000000e+01 -1.547289555088e-03 0.000000000000e+00 1.547289542124e-03 1.296374362086e-11 -1.700000000000e+01 -1.550702919726e-03 0.000000000000e+00 1.550702906762e-03 1.296374362086e-11 -1.720000000000e+01 -1.554014449299e-03 0.000000000000e+00 1.554014436336e-03 1.296374362086e-11 -1.740000000000e+01 -1.557228911727e-03 0.000000000000e+00 1.557228898763e-03 1.296374362086e-11 -1.760000000000e+01 -1.560350774379e-03 0.000000000000e+00 1.560350761416e-03 1.296374362086e-11 -1.780000000000e+01 -1.563384227623e-03 0.000000000000e+00 1.563384214659e-03 1.296374362086e-11 -1.800000000000e+01 -1.566333206181e-03 0.000000000000e+00 1.566333193218e-03 1.296374362086e-11 -1.820000000000e+01 -1.569201408551e-03 0.000000000000e+00 1.569201395588e-03 1.296374362086e-11 -1.840000000000e+01 -1.571992314663e-03 0.000000000000e+00 1.571992301700e-03 1.296374362086e-11 -1.860000000000e+01 -1.574709201982e-03 0.000000000000e+00 1.574709189018e-03 1.296374362086e-11 -1.880000000000e+01 -1.577355160196e-03 0.000000000000e+00 1.577355147232e-03 1.296374362086e-11 -1.900000000000e+01 -1.579933104643e-03 0.000000000000e+00 1.579933091679e-03 1.296374362086e-11 -1.920000000000e+01 -1.582445788592e-03 0.000000000000e+00 1.582445775629e-03 1.296374362086e-11 -1.940000000000e+01 -1.584895814500e-03 0.000000000000e+00 1.584895801536e-03 1.296374362086e-11 -1.960000000000e+01 -1.587285644330e-03 0.000000000000e+00 1.587285631367e-03 1.296374362086e-11 -1.980000000000e+01 -1.589617609042e-03 0.000000000000e+00 1.589617596079e-03 1.296374362086e-11 -2.000000000000e+01 -1.591893917306e-03 0.000000000000e+00 1.591893904342e-03 1.296374362086e-11 -1.000000000000e+00 -5.358068666333e-07 0.000000000000e+00 5.357939028897e-07 1.296374362086e-11 -1.200000000000e+00 -2.218789627038e-06 0.000000000000e+00 2.218776663295e-06 1.296374362086e-11 -1.400000000000e+00 -5.697603433013e-06 0.000000000000e+00 5.697590469269e-06 1.296374362086e-11 -1.600000000000e+00 -1.122514587608e-05 0.000000000000e+00 1.122513291234e-05 1.296374362086e-11 -1.800000000000e+00 -1.890454151259e-05 0.000000000000e+00 1.890452854885e-05 1.296374362086e-11 -2.000000000000e+00 -2.876917511323e-05 0.000000000000e+00 2.876916214949e-05 1.296374362086e-11 -2.200000000000e+00 -4.081394588094e-05 0.000000000000e+00 4.081393291720e-05 1.296374362086e-11 -2.400000000000e+00 -5.501009826001e-05 0.000000000000e+00 5.501008529627e-05 1.296374362086e-11 -2.600000000000e+00 -7.131359151504e-05 0.000000000000e+00 7.131357855129e-05 1.296374362086e-11 -2.800000000000e+00 -8.967041275993e-05 0.000000000000e+00 8.967039979618e-05 1.296374362086e-11 -3.000000000000e+00 -1.100201923346e-04 0.000000000000e+00 1.100201793709e-04 1.296374362086e-11 -3.200000000000e+00 -1.322987510005e-04 0.000000000000e+00 1.322987380368e-04 1.296374362086e-11 -3.400000000000e+00 -1.564399150920e-04 0.000000000000e+00 1.564399021282e-04 1.296374362086e-11 -3.600000000000e+00 -1.823768034952e-04 0.000000000000e+00 1.823767905315e-04 1.296374362086e-11 -3.800000000000e+00 -2.100427228994e-04 0.000000000000e+00 2.100427099357e-04 1.296374362086e-11 -4.000000000000e+00 -2.393717686331e-04 0.000000000000e+00 2.393717556694e-04 1.296374362086e-11 -4.200000000000e+00 -2.702992029023e-04 0.000000000000e+00 2.702991899386e-04 1.296374362086e-11 -4.400000000000e+00 -3.027616642224e-04 0.000000000000e+00 3.027616512587e-04 1.296374362086e-11 -4.600000000000e+00 -3.366972485575e-04 0.000000000000e+00 3.366972355937e-04 1.296374362086e-11 -4.800000000000e+00 -3.720454928296e-04 0.000000000000e+00 3.720454798658e-04 1.296374362086e-11 -5.000000000000e+00 -4.087472842712e-04 0.000000000000e+00 4.087472713074e-04 1.296374362086e-11 -5.200000000000e+00 -4.467447137897e-04 0.000000000000e+00 4.467447008260e-04 1.296374362086e-11 -5.400000000000e+00 -4.859808854176e-04 0.000000000000e+00 4.859808724538e-04 1.296374362086e-11 -5.600000000000e+00 -5.263996686390e-04 0.000000000000e+00 5.263996556753e-04 1.296374362086e-11 -5.800000000000e+00 -5.679451712525e-04 0.000000000000e+00 5.679451582888e-04 1.296374362086e-11 -6.000000000000e+00 -6.105585513858e-04 0.000000000000e+00 6.105585384220e-04 1.296374362086e-11 -6.200000000000e+00 -6.541486713917e-04 0.000000000000e+00 6.541486584279e-04 1.296374362086e-11 -6.400000000000e+00 -6.984627396594e-04 0.000000000000e+00 6.984627266956e-04 1.296374362086e-11 -6.600000000000e+00 -7.430605131490e-04 0.000000000000e+00 7.430605001853e-04 1.296374362086e-11 -6.800000000000e+00 -7.875054695633e-04 0.000000000000e+00 7.875054565996e-04 1.296374362086e-11 -7.000000000000e+00 -8.313930202483e-04 0.000000000000e+00 8.313930072846e-04 1.296374362086e-11 -7.200000000000e+00 -8.743324168491e-04 0.000000000000e+00 8.743324038854e-04 1.296374362086e-11 -7.400000000000e+00 -9.159535444295e-04 0.000000000000e+00 9.159535314657e-04 1.296374362086e-11 -7.600000000000e+00 -9.559263163384e-04 0.000000000000e+00 9.559263033747e-04 1.296374362086e-11 -7.800000000000e+00 -9.939819544676e-04 0.000000000000e+00 9.939819415039e-04 1.296374362086e-11 -8.000000000000e+00 -1.029928664225e-03 0.000000000000e+00 1.029928651261e-03 1.296374362086e-11 -8.200000000000e+00 -1.063657347095e-03 0.000000000000e+00 1.063657334132e-03 1.296374362086e-11 -8.400000000000e+00 -1.095136881543e-03 0.000000000000e+00 1.095136868579e-03 1.296374362086e-11 -8.600000000000e+00 -1.124401700538e-03 0.000000000000e+00 1.124401687574e-03 1.296374362086e-11 -8.800000000000e+00 -1.151535695545e-03 0.000000000000e+00 1.151535682581e-03 1.296374362086e-11 -9.000000000000e+00 -1.176656001986e-03 0.000000000000e+00 1.176655989022e-03 1.296374362086e-11 -9.200000000000e+00 -1.199898906390e-03 0.000000000000e+00 1.199898893426e-03 1.296374362086e-11 -9.400000000000e+00 -1.221408813627e-03 0.000000000000e+00 1.221408800663e-03 1.296374362086e-11 -9.600000000000e+00 -1.241330314481e-03 0.000000000000e+00 1.241330301518e-03 1.296374362086e-11 -9.800000000000e+00 -1.259802926842e-03 0.000000000000e+00 1.259802913878e-03 1.296374362086e-11 -1.000000000000e+01 -1.276957925609e-03 0.000000000000e+00 1.276957912645e-03 1.296374362086e-11 -1.020000000000e+01 -1.292916691977e-03 0.000000000000e+00 1.292916679014e-03 1.296374362086e-11 -1.040000000000e+01 -1.307790104227e-03 0.000000000000e+00 1.307790091263e-03 1.296374362086e-11 -1.060000000000e+01 -1.321678602337e-03 0.000000000000e+00 1.321678589373e-03 1.296374362086e-11 -1.080000000000e+01 -1.334672660009e-03 0.000000000000e+00 1.334672647046e-03 1.296374362086e-11 -1.100000000000e+01 -1.346853479935e-03 0.000000000000e+00 1.346853466971e-03 1.296374362086e-11 -1.120000000000e+01 -1.358293790165e-03 0.000000000000e+00 1.358293777201e-03 1.296374362086e-11 -1.140000000000e+01 -1.369058664024e-03 0.000000000000e+00 1.369058651060e-03 1.296374362086e-11 -1.160000000000e+01 -1.379206316750e-03 0.000000000000e+00 1.379206303787e-03 1.296374362086e-11 -1.180000000000e+01 -1.388788852695e-03 0.000000000000e+00 1.388788839731e-03 1.296374362086e-11 -1.200000000000e+01 -1.397852950260e-03 0.000000000000e+00 1.397852937296e-03 1.296374362086e-11 -1.220000000000e+01 -1.406440480171e-03 0.000000000000e+00 1.406440467207e-03 1.296374362086e-11 -1.240000000000e+01 -1.414589057744e-03 0.000000000000e+00 1.414589044780e-03 1.296374362086e-11 -1.260000000000e+01 -1.422332532655e-03 0.000000000000e+00 1.422332519691e-03 1.296374362086e-11 -1.280000000000e+01 -1.429701421206e-03 0.000000000000e+00 1.429701408242e-03 1.296374362086e-11 -1.300000000000e+01 -1.436723286636e-03 0.000000000000e+00 1.436723273672e-03 1.296374362086e-11 -1.320000000000e+01 -1.443423073111e-03 0.000000000000e+00 1.443423060147e-03 1.296374362086e-11 -1.340000000000e+01 -1.449823398752e-03 0.000000000000e+00 1.449823385788e-03 1.296374362086e-11 -1.360000000000e+01 -1.455944812671e-03 0.000000000000e+00 1.455944799707e-03 1.296374362086e-11 -1.380000000000e+01 -1.461806020507e-03 0.000000000000e+00 1.461806007543e-03 1.296374362086e-11 -1.400000000000e+01 -1.467424082460e-03 0.000000000000e+00 1.467424069496e-03 1.296374362086e-11 -1.420000000000e+01 -1.472814587359e-03 0.000000000000e+00 1.472814574396e-03 1.296374362086e-11 -1.440000000000e+01 -1.477991805864e-03 0.000000000000e+00 1.477991792900e-03 1.296374362086e-11 -1.460000000000e+01 -1.482968825477e-03 0.000000000000e+00 1.482968812513e-03 1.296374362086e-11 -1.480000000000e+01 -1.487757669734e-03 0.000000000000e+00 1.487757656770e-03 1.296374362086e-11 -1.500000000000e+01 -1.492369403588e-03 0.000000000000e+00 1.492369390624e-03 1.296374362086e-11 -1.520000000000e+01 -1.496814226751e-03 0.000000000000e+00 1.496814213787e-03 1.296374362086e-11 -1.540000000000e+01 -1.501101556517e-03 0.000000000000e+00 1.501101543553e-03 1.296374362086e-11 -1.560000000000e+01 -1.505240101383e-03 0.000000000000e+00 1.505240088419e-03 1.296374362086e-11 -1.580000000000e+01 -1.509237940785e-03 0.000000000000e+00 1.509237927821e-03 1.296374362086e-11 -1.600000000000e+01 -1.513102525359e-03 0.000000000000e+00 1.513102512395e-03 1.296374362086e-11 -1.620000000000e+01 -1.516840818991e-03 0.000000000000e+00 1.516840806027e-03 1.296374362086e-11 -1.640000000000e+01 -1.520459284002e-03 0.000000000000e+00 1.520459271038e-03 1.296374362086e-11 -1.660000000000e+01 -1.523963938983e-03 0.000000000000e+00 1.523963926019e-03 1.296374362086e-11 -1.680000000000e+01 -1.527360396528e-03 0.000000000000e+00 1.527360383564e-03 1.296374362086e-11 -1.700000000000e+01 -1.530653897162e-03 0.000000000000e+00 1.530653884199e-03 1.296374362086e-11 -1.720000000000e+01 -1.533849339939e-03 0.000000000000e+00 1.533849326975e-03 1.296374362086e-11 -1.740000000000e+01 -1.536951310061e-03 0.000000000000e+00 1.536951297097e-03 1.296374362086e-11 -1.760000000000e+01 -1.539964103870e-03 0.000000000000e+00 1.539964090907e-03 1.296374362086e-11 -1.780000000000e+01 -1.542891751475e-03 0.000000000000e+00 1.542891738512e-03 1.296374362086e-11 -1.800000000000e+01 -1.545738037286e-03 0.000000000000e+00 1.545738024323e-03 1.296374362086e-11 -1.820000000000e+01 -1.548506518672e-03 0.000000000000e+00 1.548506505708e-03 1.296374362086e-11 -1.840000000000e+01 -1.551200542933e-03 0.000000000000e+00 1.551200529970e-03 1.296374362086e-11 -1.860000000000e+01 -1.553823262777e-03 0.000000000000e+00 1.553823249813e-03 1.296374362086e-11 -1.880000000000e+01 -1.556377650429e-03 0.000000000000e+00 1.556377637465e-03 1.296374362086e-11 -1.900000000000e+01 -1.558866510533e-03 0.000000000000e+00 1.558866497569e-03 1.296374362086e-11 -1.920000000000e+01 -1.561292491955e-03 0.000000000000e+00 1.561292478992e-03 1.296374362086e-11 -1.940000000000e+01 -1.563658098597e-03 0.000000000000e+00 1.563658085634e-03 1.296374362086e-11 -1.960000000000e+01 -1.565965699313e-03 0.000000000000e+00 1.565965686350e-03 1.296374362086e-11 -1.980000000000e+01 -1.568217537023e-03 0.000000000000e+00 1.568217524059e-03 1.296374362086e-11 -2.000000000000e+01 -1.570415737088e-03 0.000000000000e+00 1.570415724125e-03 1.296374362086e-11 ngspice-26/tests/hisimhv1/pmos/reference/dcSw_Id1_vb1.standard0000644000265600020320000010261512264261473023733 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) -1.000000000000e+00 -5.999974822535e-15 0.000000000000e+00 -5.000000000000e-15 1.100000000000e-14 -1.500000000000e+00 -6.499792024051e-15 0.000000000000e+00 -5.000000000000e-15 1.150000000000e-14 -2.000000000000e+00 -6.999826066001e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.499643267517e-15 0.000000000000e+00 -5.000000000000e-15 1.250000000000e-14 -3.000000000000e+00 -8.000110990336e-15 0.000000000000e+00 -5.000000000000e-15 1.300000000000e-14 -3.500000000000e+00 -8.499711351417e-15 0.000000000000e+00 -5.000000000000e-15 1.350000000000e-14 -4.000000000000e+00 -8.999745393368e-15 0.000000000000e+00 -5.000000000000e-15 1.400000000000e-14 -4.500000000000e+00 -9.499779435318e-15 0.000000000000e+00 -5.000000000000e-15 1.450000000000e-14 -5.000000000000e+00 -9.999813477268e-15 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -5.500000000000e+00 -1.049984751922e-14 0.000000000000e+00 -5.000000000000e-15 1.550000000000e-14 -6.000000000000e+00 -1.099988156117e-14 0.000000000000e+00 -5.000000000000e-15 1.600000000000e-14 -6.500000000000e+00 -1.149948192225e-14 0.000000000000e+00 -5.000000000000e-15 1.650000000000e-14 -7.000000000000e+00 -1.199951596420e-14 0.000000000000e+00 -5.000000000000e-15 1.700000000000e-14 -7.500000000000e+00 -1.250041736789e-14 0.000000000000e+00 -5.000000000000e-15 1.750000000000e-14 -8.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -5.000000000000e-15 1.800000000000e-14 -8.500000000000e+00 -1.350005177092e-14 0.000000000000e+00 -5.000000000000e-15 1.850000000000e-14 -9.000000000000e+00 -1.400008581287e-14 0.000000000000e+00 -5.000000000000e-15 1.900000000000e-14 -9.500000000000e+00 -1.450055353569e-14 0.000000000000e+00 -5.000000000000e-15 1.950000000000e-14 -1.000000000000e+01 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.050000000000e+01 -1.550062161959e-14 0.000000000000e+00 -5.000000000000e-15 2.050000000000e-14 -1.100000000000e+01 -1.600022198067e-14 0.000000000000e+00 -5.000000000000e-15 2.100000000000e-14 -1.150000000000e+01 -1.649982234175e-14 0.000000000000e+00 -5.000000000000e-15 2.150000000000e-14 -1.200000000000e+01 -1.700115742631e-14 0.000000000000e+00 -5.000000000000e-15 2.200000000000e-14 -1.250000000000e+01 -1.750075778739e-14 0.000000000000e+00 -5.000000000000e-15 2.250000000000e-14 -1.300000000000e+01 -1.800035814847e-14 0.000000000000e+00 -5.000000000000e-15 2.300000000000e-14 -1.350000000000e+01 -1.849995850955e-14 0.000000000000e+00 -5.000000000000e-15 2.350000000000e-14 -1.400000000000e+01 -1.900042623237e-14 0.000000000000e+00 -5.000000000000e-15 2.400000000000e-14 -1.450000000000e+01 -1.950089395519e-14 0.000000000000e+00 -5.000000000000e-15 2.450000000000e-14 -1.500000000000e+01 -2.000049431627e-14 0.000000000000e+00 -5.000000000000e-15 2.500000000000e-14 -1.550000000000e+01 -2.050009467736e-14 0.000000000000e+00 -5.000000000000e-15 2.550000000000e-14 -1.600000000000e+01 -2.100056240018e-14 0.000000000000e+00 -5.000000000000e-15 2.600000000000e-14 -1.650000000000e+01 -2.150016276126e-14 0.000000000000e+00 -5.000000000000e-15 2.650000000000e-14 -1.700000000000e+01 -2.200063048408e-14 0.000000000000e+00 -5.000000000000e-15 2.700000000000e-14 -1.750000000000e+01 -2.250109820690e-14 0.000000000000e+00 -5.000000000000e-15 2.750000000000e-14 -1.800000000000e+01 -2.300069856798e-14 0.000000000000e+00 -5.000000000000e-15 2.800000000000e-14 -1.850000000000e+01 -2.350029892906e-14 0.000000000000e+00 -5.000000000000e-15 2.850000000000e-14 -1.900000000000e+01 -2.400163401362e-14 0.000000000000e+00 -5.000000000000e-15 2.900000000000e-14 -1.950000000000e+01 -2.450036701296e-14 0.000000000000e+00 -5.000000000000e-15 2.950000000000e-14 -2.000000000000e+01 -2.500083473578e-14 0.000000000000e+00 -5.000000000000e-15 3.000000000000e-14 -1.000000000000e+00 -8.302934956900e-05 0.000000000000e+00 8.302934955800e-05 1.100000000000e-14 -1.500000000000e+00 -8.620371115057e-05 0.000000000000e+00 8.620371113907e-05 1.150000000000e-14 -2.000000000000e+00 -8.672417211324e-05 0.000000000000e+00 8.672417210124e-05 1.200000000000e-14 -2.500000000000e+00 -8.717381884863e-05 0.000000000000e+00 8.717381883613e-05 1.250000000000e-14 -3.000000000000e+00 -8.758273064568e-05 0.000000000000e+00 8.758273063268e-05 1.300000000000e-14 -3.500000000000e+00 -8.796645509027e-05 0.000000000000e+00 8.796645507678e-05 1.350000000000e-14 -4.000000000000e+00 -8.833338950005e-05 0.000000000000e+00 8.833338948605e-05 1.400000000000e-14 -4.500000000000e+00 -8.868834662388e-05 0.000000000000e+00 8.868834660938e-05 1.450000000000e-14 -5.000000000000e+00 -8.903429158755e-05 0.000000000000e+00 8.903429157255e-05 1.500000000000e-14 -5.500000000000e+00 -8.937317495467e-05 0.000000000000e+00 8.937317493917e-05 1.550000000000e-14 -6.000000000000e+00 -8.970635219340e-05 0.000000000000e+00 8.970635217740e-05 1.600000000000e-14 -6.500000000000e+00 -9.003480826407e-05 0.000000000000e+00 9.003480824757e-05 1.650000000000e-14 -7.000000000000e+00 -9.035928527462e-05 0.000000000000e+00 9.035928525762e-05 1.700000000000e-14 -7.500000000000e+00 -9.068035906799e-05 0.000000000000e+00 9.068035905049e-05 1.750000000000e-14 -8.000000000000e+00 -9.099848740314e-05 0.000000000000e+00 9.099848738514e-05 1.800000000000e-14 -8.500000000000e+00 -9.131404153937e-05 0.000000000000e+00 9.131404152087e-05 1.850000000000e-14 -9.000000000000e+00 -9.162732769058e-05 0.000000000000e+00 9.162732767158e-05 1.900000000000e-14 -9.500000000000e+00 -9.193860205379e-05 0.000000000000e+00 9.193860203429e-05 1.950000000000e-14 -1.000000000000e+01 -9.224808162069e-05 0.000000000000e+00 9.224808160069e-05 2.000000000000e-14 -1.050000000000e+01 -9.255595213813e-05 0.000000000000e+00 9.255595211763e-05 2.050000000000e-14 -1.100000000000e+01 -9.286237408944e-05 0.000000000000e+00 9.286237406844e-05 2.100000000000e-14 -1.150000000000e+01 -9.316748726960e-05 0.000000000000e+00 9.316748724810e-05 2.150000000000e-14 -1.200000000000e+01 -9.347141434037e-05 0.000000000000e+00 9.347141431837e-05 2.200000000000e-14 -1.250000000000e+01 -9.377426363185e-05 0.000000000000e+00 9.377426360935e-05 2.250000000000e-14 -1.300000000000e+01 -9.407613137806e-05 0.000000000000e+00 9.407613135506e-05 2.300000000000e-14 -1.350000000000e+01 -9.437710352103e-05 0.000000000000e+00 9.437710349753e-05 2.350000000000e-14 -1.400000000000e+01 -9.467725718153e-05 0.000000000000e+00 9.467725715752e-05 2.400000000000e-14 -1.450000000000e+01 -9.497666186918e-05 0.000000000000e+00 9.497666184468e-05 2.450000000000e-14 -1.500000000000e+01 -9.527538048660e-05 0.000000000000e+00 9.527538046160e-05 2.500000000000e-14 -1.550000000000e+01 -9.557347016885e-05 0.000000000000e+00 9.557347014335e-05 2.550000000000e-14 -1.600000000000e+01 -9.587098299040e-05 0.000000000000e+00 9.587098296440e-05 2.600000000000e-14 -1.650000000000e+01 -9.616796656427e-05 0.000000000000e+00 9.616796653777e-05 2.650000000000e-14 -1.700000000000e+01 -9.646446455281e-05 0.000000000000e+00 9.646446452581e-05 2.700000000000e-14 -1.750000000000e+01 -9.676051710579e-05 0.000000000000e+00 9.676051707829e-05 2.750000000000e-14 -1.800000000000e+01 -9.705616123782e-05 0.000000000000e+00 9.705616120982e-05 2.800000000000e-14 -1.850000000000e+01 -9.735143115530e-05 0.000000000000e+00 9.735143112680e-05 2.850000000000e-14 -1.900000000000e+01 -9.764635854081e-05 0.000000000000e+00 9.764635851181e-05 2.900000000000e-14 -1.950000000000e+01 -9.794097280160e-05 0.000000000000e+00 9.794097277210e-05 2.950000000000e-14 -2.000000000000e+01 -9.823530128749e-05 0.000000000000e+00 9.823530125749e-05 3.000000000000e-14 -1.000000000000e+00 -4.229786333518e-04 0.000000000000e+00 4.229786333408e-04 1.100000000000e-14 -1.500000000000e+00 -5.951111352786e-04 0.000000000000e+00 5.951111352671e-04 1.150000000000e-14 -2.000000000000e+00 -7.434559630949e-04 0.000000000000e+00 7.434559630829e-04 1.200000000000e-14 -2.500000000000e+00 -8.707920120172e-04 0.000000000000e+00 8.707920120047e-04 1.250000000000e-14 -3.000000000000e+00 -9.797566920584e-04 0.000000000000e+00 9.797566920454e-04 1.300000000000e-14 -3.500000000000e+00 -1.072699865804e-03 0.000000000000e+00 1.072699865790e-03 1.350000000000e-14 -4.000000000000e+00 -1.151683851039e-03 0.000000000000e+00 1.151683851025e-03 1.400000000000e-14 -4.500000000000e+00 -1.218521044289e-03 0.000000000000e+00 1.218521044275e-03 1.450000000000e-14 -5.000000000000e+00 -1.274813961016e-03 0.000000000000e+00 1.274813961001e-03 1.500000000000e-14 -5.500000000000e+00 -1.321987728649e-03 0.000000000000e+00 1.321987728634e-03 1.550000000000e-14 -6.000000000000e+00 -1.361313728790e-03 0.000000000000e+00 1.361313728774e-03 1.600000000000e-14 -6.500000000000e+00 -1.393926005339e-03 0.000000000000e+00 1.393926005322e-03 1.650000000000e-14 -7.000000000000e+00 -1.420832766973e-03 0.000000000000e+00 1.420832766956e-03 1.700000000000e-14 -7.500000000000e+00 -1.442925089323e-03 0.000000000000e+00 1.442925089306e-03 1.750000000000e-14 -8.000000000000e+00 -1.460984370311e-03 0.000000000000e+00 1.460984370293e-03 1.800000000000e-14 -8.500000000000e+00 -1.475689542211e-03 0.000000000000e+00 1.475689542192e-03 1.850000000000e-14 -9.000000000000e+00 -1.487624616992e-03 0.000000000000e+00 1.487624616973e-03 1.900000000000e-14 -9.500000000000e+00 -1.497286818527e-03 0.000000000000e+00 1.497286818508e-03 1.950000000000e-14 -1.000000000000e+01 -1.505095291288e-03 0.000000000000e+00 1.505095291268e-03 2.000000000000e-14 -1.050000000000e+01 -1.511400169945e-03 0.000000000000e+00 1.511400169925e-03 2.050000000000e-14 -1.100000000000e+01 -1.516491679139e-03 0.000000000000e+00 1.516491679118e-03 2.100000000000e-14 -1.150000000000e+01 -1.520608933032e-03 0.000000000000e+00 1.520608933010e-03 2.150000000000e-14 -1.200000000000e+01 -1.523948114098e-03 0.000000000000e+00 1.523948114076e-03 2.200000000000e-14 -1.250000000000e+01 -1.526670071315e-03 0.000000000000e+00 1.526670071293e-03 2.250000000000e-14 -1.300000000000e+01 -1.528907154558e-03 0.000000000000e+00 1.528907154535e-03 2.300000000000e-14 -1.350000000000e+01 -1.530769798339e-03 0.000000000000e+00 1.530769798316e-03 2.350000000000e-14 -1.400000000000e+01 -1.532353501436e-03 0.000000000000e+00 1.532353501412e-03 2.400000000000e-14 -1.450000000000e+01 -1.533746773622e-03 0.000000000000e+00 1.533746773597e-03 2.450000000000e-14 -1.500000000000e+01 -1.535032607878e-03 0.000000000000e+00 1.535032607853e-03 2.500000000000e-14 -1.550000000000e+01 -1.536266773061e-03 0.000000000000e+00 1.536266773036e-03 2.550000000000e-14 -1.600000000000e+01 -1.537469369094e-03 0.000000000000e+00 1.537469369068e-03 2.600000000000e-14 -1.650000000000e+01 -1.538646003501e-03 0.000000000000e+00 1.538646003474e-03 2.650000000000e-14 -1.700000000000e+01 -1.539799231242e-03 0.000000000000e+00 1.539799231215e-03 2.700000000000e-14 -1.750000000000e+01 -1.540930939801e-03 0.000000000000e+00 1.540930939774e-03 2.750000000000e-14 -1.800000000000e+01 -1.542042761001e-03 0.000000000000e+00 1.542042760973e-03 2.800000000000e-14 -1.850000000000e+01 -1.543136156270e-03 0.000000000000e+00 1.543136156242e-03 2.850000000000e-14 -1.900000000000e+01 -1.544212445022e-03 0.000000000000e+00 1.544212444993e-03 2.900000000000e-14 -1.950000000000e+01 -1.545272821389e-03 0.000000000000e+00 1.545272821360e-03 2.950000000000e-14 -2.000000000000e+01 -1.546318367621e-03 0.000000000000e+00 1.546318367591e-03 3.000000000000e-14 -1.000000000000e+00 -5.999974822535e-15 0.000000000000e+00 -5.000000000000e-15 1.100000000000e-14 -1.500000000000e+00 -6.499792024051e-15 0.000000000000e+00 -5.000000000000e-15 1.150000000000e-14 -2.000000000000e+00 -6.999826066001e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.499643267517e-15 0.000000000000e+00 -5.000000000000e-15 1.250000000000e-14 -3.000000000000e+00 -8.000110990336e-15 0.000000000000e+00 -5.000000000000e-15 1.300000000000e-14 -3.500000000000e+00 -8.499711351417e-15 0.000000000000e+00 -5.000000000000e-15 1.350000000000e-14 -4.000000000000e+00 -8.999745393368e-15 0.000000000000e+00 -5.000000000000e-15 1.400000000000e-14 -4.500000000000e+00 -9.499779435318e-15 0.000000000000e+00 -5.000000000000e-15 1.450000000000e-14 -5.000000000000e+00 -9.999813477268e-15 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -5.500000000000e+00 -1.049984751922e-14 0.000000000000e+00 -5.000000000000e-15 1.550000000000e-14 -6.000000000000e+00 -1.099988156117e-14 0.000000000000e+00 -5.000000000000e-15 1.600000000000e-14 -6.500000000000e+00 -1.149948192225e-14 0.000000000000e+00 -5.000000000000e-15 1.650000000000e-14 -7.000000000000e+00 -1.199951596420e-14 0.000000000000e+00 -5.000000000000e-15 1.700000000000e-14 -7.500000000000e+00 -1.250041736789e-14 0.000000000000e+00 -5.000000000000e-15 1.750000000000e-14 -8.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -5.000000000000e-15 1.800000000000e-14 -8.500000000000e+00 -1.350005177092e-14 0.000000000000e+00 -5.000000000000e-15 1.850000000000e-14 -9.000000000000e+00 -1.400008581287e-14 0.000000000000e+00 -5.000000000000e-15 1.900000000000e-14 -9.500000000000e+00 -1.450055353569e-14 0.000000000000e+00 -5.000000000000e-15 1.950000000000e-14 -1.000000000000e+01 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.050000000000e+01 -1.550062161959e-14 0.000000000000e+00 -5.000000000000e-15 2.050000000000e-14 -1.100000000000e+01 -1.600022198067e-14 0.000000000000e+00 -5.000000000000e-15 2.100000000000e-14 -1.150000000000e+01 -1.649982234175e-14 0.000000000000e+00 -5.000000000000e-15 2.150000000000e-14 -1.200000000000e+01 -1.700115742631e-14 0.000000000000e+00 -5.000000000000e-15 2.200000000000e-14 -1.250000000000e+01 -1.750075778739e-14 0.000000000000e+00 -5.000000000000e-15 2.250000000000e-14 -1.300000000000e+01 -1.800035814847e-14 0.000000000000e+00 -5.000000000000e-15 2.300000000000e-14 -1.350000000000e+01 -1.849995850955e-14 0.000000000000e+00 -5.000000000000e-15 2.350000000000e-14 -1.400000000000e+01 -1.900042623237e-14 0.000000000000e+00 -5.000000000000e-15 2.400000000000e-14 -1.450000000000e+01 -1.950089395519e-14 0.000000000000e+00 -5.000000000000e-15 2.450000000000e-14 -1.500000000000e+01 -2.000049431627e-14 0.000000000000e+00 -5.000000000000e-15 2.500000000000e-14 -1.550000000000e+01 -2.050009467736e-14 0.000000000000e+00 -5.000000000000e-15 2.550000000000e-14 -1.600000000000e+01 -2.100056240018e-14 0.000000000000e+00 -5.000000000000e-15 2.600000000000e-14 -1.650000000000e+01 -2.150016276126e-14 0.000000000000e+00 -5.000000000000e-15 2.650000000000e-14 -1.700000000000e+01 -2.200063048408e-14 0.000000000000e+00 -5.000000000000e-15 2.700000000000e-14 -1.750000000000e+01 -2.250109820690e-14 0.000000000000e+00 -5.000000000000e-15 2.750000000000e-14 -1.800000000000e+01 -2.300069856798e-14 0.000000000000e+00 -5.000000000000e-15 2.800000000000e-14 -1.850000000000e+01 -2.350029892906e-14 0.000000000000e+00 -5.000000000000e-15 2.850000000000e-14 -1.900000000000e+01 -2.400163401362e-14 0.000000000000e+00 -5.000000000000e-15 2.900000000000e-14 -1.950000000000e+01 -2.450036701296e-14 0.000000000000e+00 -5.000000000000e-15 2.950000000000e-14 -2.000000000000e+01 -2.500083473578e-14 0.000000000000e+00 -5.000000000000e-15 3.000000000000e-14 -1.000000000000e+00 -1.051102089975e-04 0.000000000000e+00 1.051102089865e-04 1.100000000000e-14 -1.500000000000e+00 -1.071174659762e-04 0.000000000000e+00 1.071174659647e-04 1.150000000000e-14 -2.000000000000e+00 -1.077757308322e-04 0.000000000000e+00 1.077757308202e-04 1.200000000000e-14 -2.500000000000e+00 -1.083517797836e-04 0.000000000000e+00 1.083517797711e-04 1.250000000000e-14 -3.000000000000e+00 -1.088787738467e-04 0.000000000000e+00 1.088787738337e-04 1.300000000000e-14 -3.500000000000e+00 -1.093755787842e-04 0.000000000000e+00 1.093755787707e-04 1.350000000000e-14 -4.000000000000e+00 -1.098523605606e-04 0.000000000000e+00 1.098523605466e-04 1.400000000000e-14 -4.500000000000e+00 -1.103149143572e-04 0.000000000000e+00 1.103149143427e-04 1.450000000000e-14 -5.000000000000e+00 -1.107667938308e-04 0.000000000000e+00 1.107667938158e-04 1.500000000000e-14 -5.500000000000e+00 -1.112103286669e-04 0.000000000000e+00 1.112103286514e-04 1.550000000000e-14 -6.000000000000e+00 -1.116471340564e-04 0.000000000000e+00 1.116471340404e-04 1.600000000000e-14 -6.500000000000e+00 -1.120783819958e-04 0.000000000000e+00 1.120783819793e-04 1.650000000000e-14 -7.000000000000e+00 -1.125049547772e-04 0.000000000000e+00 1.125049547602e-04 1.700000000000e-14 -7.500000000000e+00 -1.129275367301e-04 0.000000000000e+00 1.129275367126e-04 1.750000000000e-14 -8.000000000000e+00 -1.133466717658e-04 0.000000000000e+00 1.133466717478e-04 1.800000000000e-14 -8.500000000000e+00 -1.137628010170e-04 0.000000000000e+00 1.137628009985e-04 1.850000000000e-14 -9.000000000000e+00 -1.141762883636e-04 0.000000000000e+00 1.141762883446e-04 1.900000000000e-14 -9.500000000000e+00 -1.145874382922e-04 0.000000000000e+00 1.145874382727e-04 1.950000000000e-14 -1.000000000000e+01 -1.149965087352e-04 0.000000000000e+00 1.149965087152e-04 2.000000000000e-14 -1.050000000000e+01 -1.154037205191e-04 0.000000000000e+00 1.154037204986e-04 2.050000000000e-14 -1.100000000000e+01 -1.158092644618e-04 0.000000000000e+00 1.158092644408e-04 2.100000000000e-14 -1.150000000000e+01 -1.162133068010e-04 0.000000000000e+00 1.162133067795e-04 2.150000000000e-14 -1.200000000000e+01 -1.166159934124e-04 0.000000000000e+00 1.166159933904e-04 2.200000000000e-14 -1.250000000000e+01 -1.170174531343e-04 0.000000000000e+00 1.170174531118e-04 2.250000000000e-14 -1.300000000000e+01 -1.174178004207e-04 0.000000000000e+00 1.174178003977e-04 2.300000000000e-14 -1.350000000000e+01 -1.178171374830e-04 0.000000000000e+00 1.178171374595e-04 2.350000000000e-14 -1.400000000000e+01 -1.182155560364e-04 0.000000000000e+00 1.182155560124e-04 2.400000000000e-14 -1.450000000000e+01 -1.186131387374e-04 0.000000000000e+00 1.186131387129e-04 2.450000000000e-14 -1.500000000000e+01 -1.190099603764e-04 0.000000000000e+00 1.190099603514e-04 2.500000000000e-14 -1.550000000000e+01 -1.194060888757e-04 0.000000000000e+00 1.194060888502e-04 2.550000000000e-14 -1.600000000000e+01 -1.198015861295e-04 0.000000000000e+00 1.198015861035e-04 2.600000000000e-14 -1.650000000000e+01 -1.201965087166e-04 0.000000000000e+00 1.201965086901e-04 2.650000000000e-14 -1.700000000000e+01 -1.205909085081e-04 0.000000000000e+00 1.205909084811e-04 2.700000000000e-14 -1.750000000000e+01 -1.209848331880e-04 0.000000000000e+00 1.209848331605e-04 2.750000000000e-14 -1.800000000000e+01 -1.213783267033e-04 0.000000000000e+00 1.213783266753e-04 2.800000000000e-14 -1.850000000000e+01 -1.217714296520e-04 0.000000000000e+00 1.217714296235e-04 2.850000000000e-14 -1.900000000000e+01 -1.221641796227e-04 0.000000000000e+00 1.221641795937e-04 2.900000000000e-14 -1.950000000000e+01 -1.225566114900e-04 0.000000000000e+00 1.225566114605e-04 2.950000000000e-14 -2.000000000000e+01 -1.229487576744e-04 0.000000000000e+00 1.229487576444e-04 3.000000000000e-14 -1.000000000000e+00 -5.242327303462e-04 0.000000000000e+00 5.242327303352e-04 1.100000000000e-14 -1.500000000000e+00 -7.370024333853e-04 0.000000000000e+00 7.370024333738e-04 1.150000000000e-14 -2.000000000000e+00 -9.209843676992e-04 0.000000000000e+00 9.209843676872e-04 1.200000000000e-14 -2.500000000000e+00 -1.079961526222e-03 0.000000000000e+00 1.079961526209e-03 1.250000000000e-14 -3.000000000000e+00 -1.217304876451e-03 0.000000000000e+00 1.217304876438e-03 1.300000000000e-14 -3.500000000000e+00 -1.335894214871e-03 0.000000000000e+00 1.335894214857e-03 1.350000000000e-14 -4.000000000000e+00 -1.438171870953e-03 0.000000000000e+00 1.438171870939e-03 1.400000000000e-14 -4.500000000000e+00 -1.526219321091e-03 0.000000000000e+00 1.526219321076e-03 1.450000000000e-14 -5.000000000000e+00 -1.601827307483e-03 0.000000000000e+00 1.601827307468e-03 1.500000000000e-14 -5.500000000000e+00 -1.666553016901e-03 0.000000000000e+00 1.666553016885e-03 1.550000000000e-14 -6.000000000000e+00 -1.721764334721e-03 0.000000000000e+00 1.721764334705e-03 1.600000000000e-14 -6.500000000000e+00 -1.768672939500e-03 0.000000000000e+00 1.768672939483e-03 1.650000000000e-14 -7.000000000000e+00 -1.808358398247e-03 0.000000000000e+00 1.808358398230e-03 1.700000000000e-14 -7.500000000000e+00 -1.841785401241e-03 0.000000000000e+00 1.841785401224e-03 1.750000000000e-14 -8.000000000000e+00 -1.869816078797e-03 0.000000000000e+00 1.869816078779e-03 1.800000000000e-14 -8.500000000000e+00 -1.893219040910e-03 0.000000000000e+00 1.893219040891e-03 1.850000000000e-14 -9.000000000000e+00 -1.912676429360e-03 0.000000000000e+00 1.912676429341e-03 1.900000000000e-14 -9.500000000000e+00 -1.928789929327e-03 0.000000000000e+00 1.928789929307e-03 1.950000000000e-14 -1.000000000000e+01 -1.942086391394e-03 0.000000000000e+00 1.942086391374e-03 2.000000000000e-14 -1.050000000000e+01 -1.953023469601e-03 0.000000000000e+00 1.953023469580e-03 2.050000000000e-14 -1.100000000000e+01 -1.961995475342e-03 0.000000000000e+00 1.961995475321e-03 2.100000000000e-14 -1.150000000000e+01 -1.969339476994e-03 0.000000000000e+00 1.969339476973e-03 2.150000000000e-14 -1.200000000000e+01 -1.975341552382e-03 0.000000000000e+00 1.975341552360e-03 2.200000000000e-14 -1.250000000000e+01 -1.980243058769e-03 0.000000000000e+00 1.980243058746e-03 2.250000000000e-14 -1.300000000000e+01 -1.984246645381e-03 0.000000000000e+00 1.984246645358e-03 2.300000000000e-14 -1.350000000000e+01 -1.987522260276e-03 0.000000000000e+00 1.987522260253e-03 2.350000000000e-14 -1.400000000000e+01 -1.990212744349e-03 0.000000000000e+00 1.990212744325e-03 2.400000000000e-14 -1.450000000000e+01 -1.992439853860e-03 0.000000000000e+00 1.992439853835e-03 2.450000000000e-14 -1.500000000000e+01 -1.994312112164e-03 0.000000000000e+00 1.994312112139e-03 2.500000000000e-14 -1.550000000000e+01 -1.995939035780e-03 0.000000000000e+00 1.995939035754e-03 2.550000000000e-14 -1.600000000000e+01 -1.997440976794e-03 0.000000000000e+00 1.997440976768e-03 2.600000000000e-14 -1.650000000000e+01 -1.998890791273e-03 0.000000000000e+00 1.998890791247e-03 2.650000000000e-14 -1.700000000000e+01 -2.000303333841e-03 0.000000000000e+00 2.000303333814e-03 2.700000000000e-14 -1.750000000000e+01 -2.001682328779e-03 0.000000000000e+00 2.001682328752e-03 2.750000000000e-14 -1.800000000000e+01 -2.003030441066e-03 0.000000000000e+00 2.003030441038e-03 2.800000000000e-14 -1.850000000000e+01 -2.004350032636e-03 0.000000000000e+00 2.004350032608e-03 2.850000000000e-14 -1.900000000000e+01 -2.005643240319e-03 0.000000000000e+00 2.005643240290e-03 2.900000000000e-14 -1.950000000000e+01 -2.006912001394e-03 0.000000000000e+00 2.006912001365e-03 2.950000000000e-14 -2.000000000000e+01 -2.008158073195e-03 0.000000000000e+00 2.008158073165e-03 3.000000000000e-14 -1.000000000000e+00 -5.999974822535e-15 0.000000000000e+00 -5.000000000000e-15 1.100000000000e-14 -1.500000000000e+00 -6.499792024051e-15 0.000000000000e+00 -5.000000000000e-15 1.150000000000e-14 -2.000000000000e+00 -6.999826066001e-15 0.000000000000e+00 -5.000000000000e-15 1.200000000000e-14 -2.500000000000e+00 -7.499643267517e-15 0.000000000000e+00 -5.000000000000e-15 1.250000000000e-14 -3.000000000000e+00 -8.000110990336e-15 0.000000000000e+00 -5.000000000000e-15 1.300000000000e-14 -3.500000000000e+00 -8.499711351417e-15 0.000000000000e+00 -5.000000000000e-15 1.350000000000e-14 -4.000000000000e+00 -8.999745393368e-15 0.000000000000e+00 -5.000000000000e-15 1.400000000000e-14 -4.500000000000e+00 -9.499779435318e-15 0.000000000000e+00 -5.000000000000e-15 1.450000000000e-14 -5.000000000000e+00 -9.999813477268e-15 0.000000000000e+00 -5.000000000000e-15 1.500000000000e-14 -5.500000000000e+00 -1.049984751922e-14 0.000000000000e+00 -5.000000000000e-15 1.550000000000e-14 -6.000000000000e+00 -1.099988156117e-14 0.000000000000e+00 -5.000000000000e-15 1.600000000000e-14 -6.500000000000e+00 -1.149948192225e-14 0.000000000000e+00 -5.000000000000e-15 1.650000000000e-14 -7.000000000000e+00 -1.199951596420e-14 0.000000000000e+00 -5.000000000000e-15 1.700000000000e-14 -7.500000000000e+00 -1.250041736789e-14 0.000000000000e+00 -5.000000000000e-15 1.750000000000e-14 -8.000000000000e+00 -1.300001772897e-14 0.000000000000e+00 -5.000000000000e-15 1.800000000000e-14 -8.500000000000e+00 -1.350005177092e-14 0.000000000000e+00 -5.000000000000e-15 1.850000000000e-14 -9.000000000000e+00 -1.400008581287e-14 0.000000000000e+00 -5.000000000000e-15 1.900000000000e-14 -9.500000000000e+00 -1.450055353569e-14 0.000000000000e+00 -5.000000000000e-15 1.950000000000e-14 -1.000000000000e+01 -1.500015389677e-14 0.000000000000e+00 -5.000000000000e-15 2.000000000000e-14 -1.050000000000e+01 -1.550062161959e-14 0.000000000000e+00 -5.000000000000e-15 2.050000000000e-14 -1.100000000000e+01 -1.600022198067e-14 0.000000000000e+00 -5.000000000000e-15 2.100000000000e-14 -1.150000000000e+01 -1.649982234175e-14 0.000000000000e+00 -5.000000000000e-15 2.150000000000e-14 -1.200000000000e+01 -1.700115742631e-14 0.000000000000e+00 -5.000000000000e-15 2.200000000000e-14 -1.250000000000e+01 -1.750075778739e-14 0.000000000000e+00 -5.000000000000e-15 2.250000000000e-14 -1.300000000000e+01 -1.800035814847e-14 0.000000000000e+00 -5.000000000000e-15 2.300000000000e-14 -1.350000000000e+01 -1.849995850955e-14 0.000000000000e+00 -5.000000000000e-15 2.350000000000e-14 -1.400000000000e+01 -1.900042623237e-14 0.000000000000e+00 -5.000000000000e-15 2.400000000000e-14 -1.450000000000e+01 -1.950089395519e-14 0.000000000000e+00 -5.000000000000e-15 2.450000000000e-14 -1.500000000000e+01 -2.000049431627e-14 0.000000000000e+00 -5.000000000000e-15 2.500000000000e-14 -1.550000000000e+01 -2.050009467736e-14 0.000000000000e+00 -5.000000000000e-15 2.550000000000e-14 -1.600000000000e+01 -2.100056240018e-14 0.000000000000e+00 -5.000000000000e-15 2.600000000000e-14 -1.650000000000e+01 -2.150016276126e-14 0.000000000000e+00 -5.000000000000e-15 2.650000000000e-14 -1.700000000000e+01 -2.200063048408e-14 0.000000000000e+00 -5.000000000000e-15 2.700000000000e-14 -1.750000000000e+01 -2.250109820690e-14 0.000000000000e+00 -5.000000000000e-15 2.750000000000e-14 -1.800000000000e+01 -2.300069856798e-14 0.000000000000e+00 -5.000000000000e-15 2.800000000000e-14 -1.850000000000e+01 -2.350029892906e-14 0.000000000000e+00 -5.000000000000e-15 2.850000000000e-14 -1.900000000000e+01 -2.400163401362e-14 0.000000000000e+00 -5.000000000000e-15 2.900000000000e-14 -1.950000000000e+01 -2.450036701296e-14 0.000000000000e+00 -5.000000000000e-15 2.950000000000e-14 -2.000000000000e+01 -2.500083473578e-14 0.000000000000e+00 -5.000000000000e-15 3.000000000000e-14 -1.000000000000e+00 -6.349251021226e-05 0.000000000000e+00 6.349251020126e-05 1.100000000000e-14 -1.500000000000e+00 -6.885224254216e-05 0.000000000000e+00 6.885224253066e-05 1.150000000000e-14 -2.000000000000e+00 -6.955830622545e-05 0.000000000000e+00 6.955830621345e-05 1.200000000000e-14 -2.500000000000e+00 -6.990310645774e-05 0.000000000000e+00 6.990310644524e-05 1.250000000000e-14 -3.000000000000e+00 -7.021080372640e-05 0.000000000000e+00 7.021080371340e-05 1.300000000000e-14 -3.500000000000e+00 -7.049710693308e-05 0.000000000000e+00 7.049710691958e-05 1.350000000000e-14 -4.000000000000e+00 -7.076915351296e-05 0.000000000000e+00 7.076915349896e-05 1.400000000000e-14 -4.500000000000e+00 -7.103101412726e-05 0.000000000000e+00 7.103101411276e-05 1.450000000000e-14 -5.000000000000e+00 -7.128520053626e-05 0.000000000000e+00 7.128520052126e-05 1.500000000000e-14 -5.500000000000e+00 -7.153336695242e-05 0.000000000000e+00 7.153336693692e-05 1.550000000000e-14 -6.000000000000e+00 -7.177666320129e-05 0.000000000000e+00 7.177666318529e-05 1.600000000000e-14 -6.500000000000e+00 -7.201592443402e-05 0.000000000000e+00 7.201592441752e-05 1.650000000000e-14 -7.000000000000e+00 -7.225177931065e-05 0.000000000000e+00 7.225177929365e-05 1.700000000000e-14 -7.500000000000e+00 -7.248471506921e-05 0.000000000000e+00 7.248471505171e-05 1.750000000000e-14 -8.000000000000e+00 -7.271511853097e-05 0.000000000000e+00 7.271511851297e-05 1.800000000000e-14 -8.500000000000e+00 -7.294330300713e-05 0.000000000000e+00 7.294330298863e-05 1.850000000000e-14 -9.000000000000e+00 -7.316952658295e-05 0.000000000000e+00 7.316952656395e-05 1.900000000000e-14 -9.500000000000e+00 -7.339400492431e-05 0.000000000000e+00 7.339400490481e-05 1.950000000000e-14 -1.000000000000e+01 -7.361692048693e-05 0.000000000000e+00 7.361692046693e-05 2.000000000000e-14 -1.050000000000e+01 -7.383842929225e-05 0.000000000000e+00 7.383842927175e-05 2.050000000000e-14 -1.100000000000e+01 -7.405866601440e-05 0.000000000000e+00 7.405866599340e-05 2.100000000000e-14 -1.150000000000e+01 -7.427774786726e-05 0.000000000000e+00 7.427774784576e-05 2.150000000000e-14 -1.200000000000e+01 -7.449577762192e-05 0.000000000000e+00 7.449577759992e-05 2.200000000000e-14 -1.250000000000e+01 -7.471284598183e-05 0.000000000000e+00 7.471284595933e-05 2.250000000000e-14 -1.300000000000e+01 -7.492903347607e-05 0.000000000000e+00 7.492903345307e-05 2.300000000000e-14 -1.350000000000e+01 -7.514441198551e-05 0.000000000000e+00 7.514441196201e-05 2.350000000000e-14 -1.400000000000e+01 -7.535904598574e-05 0.000000000000e+00 7.535904596174e-05 2.400000000000e-14 -1.450000000000e+01 -7.557299356858e-05 0.000000000000e+00 7.557299354408e-05 2.450000000000e-14 -1.500000000000e+01 -7.578630728892e-05 0.000000000000e+00 7.578630726391e-05 2.500000000000e-14 -1.550000000000e+01 -7.599903487199e-05 0.000000000000e+00 7.599903484649e-05 2.550000000000e-14 -1.600000000000e+01 -7.621121980846e-05 0.000000000000e+00 7.621121978246e-05 2.600000000000e-14 -1.650000000000e+01 -7.642290185831e-05 0.000000000000e+00 7.642290183181e-05 2.650000000000e-14 -1.700000000000e+01 -7.663411748010e-05 0.000000000000e+00 7.663411745310e-05 2.700000000000e-14 -1.750000000000e+01 -7.684490019872e-05 0.000000000000e+00 7.684490017122e-05 2.750000000000e-14 -1.800000000000e+01 -7.705528092214e-05 0.000000000000e+00 7.705528089414e-05 2.800000000000e-14 -1.850000000000e+01 -7.726528821549e-05 0.000000000000e+00 7.726528818699e-05 2.850000000000e-14 -1.900000000000e+01 -7.747494853936e-05 0.000000000000e+00 7.747494851036e-05 2.900000000000e-14 -1.950000000000e+01 -7.768428645783e-05 0.000000000000e+00 7.768428642833e-05 2.950000000000e-14 -2.000000000000e+01 -7.789332482084e-05 0.000000000000e+00 7.789332479084e-05 3.000000000000e-14 -1.000000000000e+00 -3.076306175960e-04 0.000000000000e+00 3.076306175850e-04 1.100000000000e-14 -1.500000000000e+00 -4.332642757546e-04 0.000000000000e+00 4.332642757431e-04 1.150000000000e-14 -2.000000000000e+00 -5.411343938253e-04 0.000000000000e+00 5.411343938133e-04 1.200000000000e-14 -2.500000000000e+00 -6.329512638239e-04 0.000000000000e+00 6.329512638114e-04 1.250000000000e-14 -3.000000000000e+00 -7.105432601560e-04 0.000000000000e+00 7.105432601430e-04 1.300000000000e-14 -3.500000000000e+00 -7.756778678569e-04 0.000000000000e+00 7.756778678434e-04 1.350000000000e-14 -4.000000000000e+00 -8.300017039845e-04 0.000000000000e+00 8.300017039705e-04 1.400000000000e-14 -4.500000000000e+00 -8.750236104100e-04 0.000000000000e+00 8.750236103955e-04 1.450000000000e-14 -5.000000000000e+00 -9.121110624811e-04 0.000000000000e+00 9.121110624661e-04 1.500000000000e-14 -5.500000000000e+00 -9.424903370612e-04 0.000000000000e+00 9.424903370457e-04 1.550000000000e-14 -6.000000000000e+00 -9.672484974574e-04 0.000000000000e+00 9.672484974414e-04 1.600000000000e-14 -6.500000000000e+00 -9.873373916054e-04 0.000000000000e+00 9.873373915889e-04 1.650000000000e-14 -7.000000000000e+00 -1.003579935646e-03 0.000000000000e+00 1.003579935629e-03 1.700000000000e-14 -7.500000000000e+00 -1.016678565593e-03 0.000000000000e+00 1.016678565575e-03 1.750000000000e-14 -8.000000000000e+00 -1.027225457174e-03 0.000000000000e+00 1.027225457156e-03 1.800000000000e-14 -8.500000000000e+00 -1.035713983159e-03 0.000000000000e+00 1.035713983141e-03 1.850000000000e-14 -9.000000000000e+00 -1.042550815037e-03 0.000000000000e+00 1.042550815018e-03 1.900000000000e-14 -9.500000000000e+00 -1.048068058847e-03 0.000000000000e+00 1.048068058828e-03 1.950000000000e-14 -1.000000000000e+01 -1.052534875705e-03 0.000000000000e+00 1.052534875685e-03 2.000000000000e-14 -1.050000000000e+01 -1.056168110198e-03 0.000000000000e+00 1.056168110178e-03 2.050000000000e-14 -1.100000000000e+01 -1.059141798751e-03 0.000000000000e+00 1.059141798730e-03 2.100000000000e-14 -1.150000000000e+01 -1.061595273077e-03 0.000000000000e+00 1.061595273055e-03 2.150000000000e-14 -1.200000000000e+01 -1.063640054031e-03 0.000000000000e+00 1.063640054009e-03 2.200000000000e-14 -1.250000000000e+01 -1.065365585948e-03 0.000000000000e+00 1.065365585926e-03 2.250000000000e-14 -1.300000000000e+01 -1.066843990309e-03 0.000000000000e+00 1.066843990286e-03 2.300000000000e-14 -1.350000000000e+01 -1.068134003437e-03 0.000000000000e+00 1.068134003413e-03 2.350000000000e-14 -1.400000000000e+01 -1.069284175936e-03 0.000000000000e+00 1.069284175912e-03 2.400000000000e-14 -1.450000000000e+01 -1.070335103247e-03 0.000000000000e+00 1.070335103222e-03 2.450000000000e-14 -1.500000000000e+01 -1.071319920080e-03 0.000000000000e+00 1.071319920055e-03 2.500000000000e-14 -1.550000000000e+01 -1.072262844311e-03 0.000000000000e+00 1.072262844286e-03 2.550000000000e-14 -1.600000000000e+01 -1.073178461068e-03 0.000000000000e+00 1.073178461042e-03 2.600000000000e-14 -1.650000000000e+01 -1.074074164712e-03 0.000000000000e+00 1.074074164685e-03 2.650000000000e-14 -1.700000000000e+01 -1.074953585850e-03 0.000000000000e+00 1.074953585823e-03 2.700000000000e-14 -1.750000000000e+01 -1.075818739777e-03 0.000000000000e+00 1.075818739750e-03 2.750000000000e-14 -1.800000000000e+01 -1.076670968529e-03 0.000000000000e+00 1.076670968501e-03 2.800000000000e-14 -1.850000000000e+01 -1.077511304734e-03 0.000000000000e+00 1.077511304705e-03 2.850000000000e-14 -1.900000000000e+01 -1.078340612265e-03 0.000000000000e+00 1.078340612236e-03 2.900000000000e-14 -1.950000000000e+01 -1.079159644841e-03 0.000000000000e+00 1.079159644811e-03 2.950000000000e-14 -2.000000000000e+01 -1.079969073757e-03 0.000000000000e+00 1.079969073727e-03 3.000000000000e-14 ngspice-26/tests/hisimhv1/pmos/parameters/0000755000265600020320000000000012264261473020244 5ustar andreasadminngspice-26/tests/hisimhv1/pmos/parameters/pmosParameters0000644000265600020320000001171412264261473023175 0ustar andreasadmin+ CORSRD = ( 3 ) + CORG = ( 0 ) + COIPRV = ( 1 ) + COPPRV = ( 1 ) + COADOV = ( 1 ) + COISUB = ( 0 ) + COIIGS = ( 0 ) + COGIDL = ( 0 ) + COOVLP = ( 1 ) + COOVLPS = ( 0 ) + COFLICK = ( 0 ) + COISTI = ( 0 ) + CONQS = ( 0 ) + COTHRML = ( 0 ) + COIGN = ( 0 ) + CODFM = ( 0 ) + COQOVSM = ( 1 ) + CORBNET = ( 0 ) + COSELFHEAT = ( 0 ) + COSUBNODE = ( 0 ) + COSYM = ( 0 ) + COTEMP = ( 0 ) + COLDRIFT = ( 0 ) + VERSION = ( 1.23 ) + VMAX = ( 1E+07 ) + VMAXT1 = ( 0 ) + VMAXT2 = ( 0 ) + BGTMP1 = ( 9.025E-05 ) + BGTMP2 = ( 1E-07 ) + EG0 = ( 1.1785 ) + TOX = ( 3E-08 ) + XLD = ( 3E-08 ) + RDOV11 = ( 0 ) + RDOV12 = ( 1 ) + RDOV13 = ( 1 ) + RDSLP1 = ( 1 ) + RDICT1 = ( 1 ) + RDSLP2 = ( 1 ) + RDICT2 = ( 0 ) + SUBLD1 = ( 0 ) + SUBLD2 = ( 0 ) + DDLTMAX = ( 1 ) + DDLTSLP = ( 0 ) + DDLTICT = ( 10 ) + VFBOVER = ( -0.5 ) + NOVER = ( 3E+16 ) + NOVERS = ( 0 ) + XWD = ( 0 ) + XL = ( 0 ) + XW = ( 0 ) + SAREF = ( 1E-06 ) + SBREF = ( 1E-06 ) + LL = ( 0 ) + LLD = ( 0 ) + LLN = ( 0 ) + WL = ( 0 ) + WL1 = ( 0 ) + WL1P = ( 1 ) + WL2 = ( 0 ) + WL2P = ( 1 ) + WLD = ( 0 ) + WLN = ( 0 ) + RSH = ( 0 ) + RSHG = ( 0 ) + XQY = ( 0 ) + XQY1 = ( 0 ) + XQY2 = ( 0 ) + RS = ( 0 ) + RD = ( 0.005 ) + VFBC = ( -1 ) + VBI = ( 1.1 ) + NSUBC = ( 1E+17 ) + PARL2 = ( 1E-08 ) + LP = ( 0 ) + NSUBP = ( 1E+17 ) + NSUBP0 = ( 0 ) + NSUBWP = ( 1 ) + SCP1 = ( 1 ) + SCP2 = ( 0.1 ) + SCP3 = ( 0 ) + SC1 = ( 1 ) + SC2 = ( 1 ) + SC3 = ( 0 ) + SC4 = ( 0 ) + PGD1 = ( 0 ) + PGD2 = ( 1 ) + PGD3 = ( 0.8 ) + PGD4 = ( 0 ) + NDEP = ( 1 ) + NDEPL = ( 0 ) + NDEPLP = ( 1 ) + NINV = ( 0.5 ) + MUECB0 = ( 1000 ) + MUECB1 = ( 100 ) + MUEPH0 = ( 0.3 ) + MUEPH1 = ( 9000 ) + MUEPHW = ( 0 ) + MUEPWP = ( 1 ) + MUEPHL = ( 0 ) + MUEPLP = ( 1 ) + MUEPHS = ( 0 ) + MUEPSP = ( 1 ) + VTMP = ( 0 ) + WVTH0 = ( 0 ) + MUESR0 = ( 2 ) + MUESR1 = ( 1E+16 ) + MUESRL = ( 0 ) + MUESRW = ( 0 ) + MUESWP = ( 1 ) + MUESLP = ( 1 ) + MUETMP = ( 1.7 ) + BB = ( 1 ) + SUB1 = ( 0.05 ) + SUB2 = ( 100 ) + SVGS = ( 0.8 ) + SVBS = ( 0.5 ) + SVBSL = ( 0 ) + SVDS = ( 0.8 ) + SLG = ( 3E-08 ) + SUB1L = ( 0.0025 ) + SUB2L = ( 2E-06 ) + FN1 = ( 50 ) + FN2 = ( 0.00017 ) + FN3 = ( 0 ) + FVBS = ( 0.012 ) + SVGSL = ( 0 ) + SVGSLP = ( 1 ) + SVGSWP = ( 1 ) + SVGSW = ( 0 ) + SVBSLP = ( 1 ) + SLGL = ( 0 ) + SLGLP = ( 1 ) + SUB1LP = ( 1 ) + NSTI = ( 1E+17 ) + WSTI = ( 0 ) + WSTIL = ( 0 ) + WSTILP = ( 1 ) + WSTIW = ( 0 ) + WSTIWP = ( 1 ) + SCSTI1 = ( 0 ) + SCSTI2 = ( 0 ) + VTHSTI = ( 0 ) + VDSTI = ( 0 ) + MUESTI1 = ( 0 ) + MUESTI2 = ( 0 ) + MUESTI3 = ( 1 ) + NSUBPSTI1 = ( 0 ) + NSUBPSTI2 = ( 0 ) + NSUBPSTI3 = ( 1 ) + LPEXT = ( 1E-50 ) + NPEXT = ( 1E+17 ) + SCP21 = ( 0 ) + SCP22 = ( 0 ) + BS1 = ( 0 ) + BS2 = ( 0.9 ) + TPOLY = ( 2E-07 ) + CGBO = ( 0 ) + JS0 = ( 5E-07 ) + JS0SW = ( 0 ) + NJ = ( 1 ) + NJSW = ( 1 ) + XTI = ( 2 ) + CJ = ( 0.0005 ) + CJSW = ( 5E-10 ) + CJSWG = ( 5E-10 ) + MJ = ( 0.5 ) + MJSW = ( 0.33 ) + MJSWG = ( 0.33 ) + PB = ( 1 ) + PBSW = ( 1 ) + PBSWG = ( 1 ) + XTI2 = ( 0 ) + CISB = ( 0 ) + CVB = ( 0 ) + CTEMP = ( 0 ) + CISBK = ( 0 ) + CVBK = ( 0 ) + DIVX = ( 0 ) + CLM1 = ( 0.05 ) + CLM2 = ( 2 ) + CLM3 = ( 1 ) + CLM5 = ( 1 ) + CLM6 = ( 0 ) + VOVER = ( 0.3 ) + VOVERP = ( 0.3 ) + WFC = ( 0 ) + NSUBCW = ( 0 ) + NSUBCWP = ( 1 ) + QME1 = ( 0 ) + QME2 = ( 1 ) + QME3 = ( 0 ) + VOVERS = ( 0 ) + VOVERSP = ( 0 ) + GIDL1 = ( 2 ) + GIDL2 = ( 3E+07 ) + GIDL3 = ( 0.9 ) + GIDL4 = ( 0.9 ) + GIDL5 = ( 0.2 ) + GLEAK1 = ( 50 ) + GLEAK2 = ( 1E+07 ) + GLEAK3 = ( 0.06 ) + GLEAK4 = ( 4 ) + GLEAK5 = ( 7500 ) + GLEAK6 = ( 0.25 ) + GLEAK7 = ( 1E-06 ) + GLPART1 = ( 0.5 ) + GLKSD1 = ( 1E-15 ) + GLKSD2 = ( 5E+06 ) + GLKSD3 = ( -5E+06 ) + GLKB1 = ( 5E-16 ) + GLKB2 = ( 1 ) + GLKB3 = ( 0 ) + EGIG = ( 0 ) + IGTEMP2 = ( 0 ) + IGTEMP3 = ( 0 ) + VZADD0 = ( 0.01 ) + PZADD0 = ( 0.005 ) + NFTRP = ( 1E+10 ) + NFALP = ( 1E-19 ) + CIT = ( 0 ) + FALPH = ( 1 ) + KAPPA = ( 3.9 ) + PTHROU = ( 0 ) + VDIFFJ = ( 0.0006 ) + DLY1 = ( 1E-10 ) + DLY2 = ( 0.7 ) + DLY3 = ( 8E-07 ) + TNOM = ( 27 ) + OVSLP = ( 2E-08 ) + OVMAG = ( 500 ) + GBMIN = ( 1E-12 ) + RBPB = ( 50 ) + RBDB = ( 50 ) + RBSB = ( 50 ) + IBPC1 = ( 0 ) + IBPC2 = ( 0 ) + MPHDFM = ( -0.3 ) + RDVG11 = ( 0 ) + RDVG12 = ( 100 ) + RTH0 = ( 0.1 ) + CTH0 = ( 1E-07 ) + POWRAT = ( 1 ) + TCJBD = ( 0 ) + TCJBS = ( 0 ) + TCJBDSW = ( 0 ) + TCJBSSW = ( 0 ) + TCJBDSWG = ( 0 ) + TCJBSSWG = ( 0 ) + DLYOV = ( 0 ) + QDFTVD = ( 1 ) + XLDLD = ( 1E-06 ) + RDVD = ( 0.07 ) + QOVSM = ( 0.2 ) + RD20 = ( 0 ) + RD21 = ( 1 ) + RD22 = ( 0 ) + RD22D = ( 0 ) + RD23 = ( 0.005 ) + RD24 = ( 0 ) + RD25 = ( 0 ) + RDVDL = ( 0 ) + RDVDLP = ( 1 ) + RDVDS = ( 0 ) + RDVDSP = ( 1 ) + RD23L = ( 0 ) + RD23LP = ( 1 ) + RD23S = ( 0 ) + RD23SP = ( 1 ) + RDS = ( 0 ) + RDSP = ( 1 ) + RDTEMP1 = ( 0 ) + RDTEMP2 = ( 0 ) + RDVDTEMP1 = ( 0 ) + RDVDTEMP2 = ( 0 ) + RTH0W = ( 0 ) + RTH0WP = ( 1 ) + CVDSOVER = ( 0 ) + NINVD = ( 0 ) + NINVDW = ( 0 ) + NINVDWP = ( 1 ) + NINVDT1 = ( 0 ) + NINVDT2 = ( 0 ) + VBSMIN = ( -10.5 ) + RDVB = ( 0 ) + RTH0NF = ( 0 ) + RTHTEMP1 = ( 0 ) + RTHTEMP2 = ( 0 ) + PRATTEMP1 = ( 0 ) + PRATTEMP2 = ( 0 ) + RDVSUB = ( 1 ) + RDVDSUB = ( 0.3 ) + DDRIFT = ( 1E-06 ) + VBISUB = ( 0.7 ) + NSUBSUB = ( 1E+15 ) + SHEMAX = ( 500 ) ngspice-26/tests/hisimhv1/pmos/qaSpec0000644000265600020320000001030212264261473017234 0ustar andreasadmin // // Test specification for HiSIM_HV (version 1.2.3) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments pmos leveL=62 version=1.23 pTypeSelectionArguments nmos leveL=62 version=1.23 `endif `ifdef hspice nTypeSelectionArguments hisimhv_n5_va TYPE=-1 pTypeSelectionArguments hisimhv_n5_va TYPE=1 `endif `ifdef smartspice nTypeSelectionArguments hisimhv_n5_va TYPE=-1 pTypeSelectionArguments hisimhv_n5_va TYPE=1 `endif `ifdef spectre nTypeSelectionArguments hisimhv_n5_va TYPE=-1 pTypeSelectionArguments hisimhv_n5_va TYPE=1 `endif // // General test-independent information // keyLetter m linearScale w l ps pd areaScale as ad temperature 27 -50 150 //checkPolarity yes //symmetricpins d s scaleParameters m // // Specific tests for Vsub Node // pins d g s b sub test dcVsub_Id1_vb0 biases V(s)=0 V(g)=-10 V(b)=0 biasList V(sub)=0.6,5,10 biasSweep V(d)=-1,-20,-0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb1 biases V(s)=0 V(g)=-10 V(b)=5.0 biasList V(sub)=0.6,5,10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb2 biases V(s)=0 V(g)=-10 V(b)=10.0 biasList V(sub)=0.6,5,10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb0_jd biases V(s)=0 V(g)=-10 V(b)=0 biasList V(sub)=0.6,5,10 biasSweep V(d)=-1,-20,-0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb0 biases V(s)=0 V(d)=-10 V(b)=0 biasList V(sub)=0.6,5,10 biasSweep V(g)=-1,-20,-0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb1 biases V(s)=0 V(d)=-10 V(b)=5.0 biasList V(sub)=0.6,5,10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb2 biases V(s)=0 V(d)=-10 V(b)=10.0 biasList V(sub)=0.6,5,10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb0_jd biases V(s)=0 V(d)=-10 V(b)=0 biasList V(sub)=0.6,5,10 biasSweep V(g)=-1,-20,-0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/pmosParameters modelParameters COSUBNODE=1 ngspice-26/tests/hisimhv1/pmos/run0000644000265600020320000000016612264261473016633 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean cp qaSpec.basic qaSpec ../../bin/run_cmc_check ngspice | tee cmcqa_basic.log ngspice-26/tests/hisimhv1/pmos/qaSpec.basic0000644000265600020320000003105512264261473020324 0ustar andreasadmin // // Test specification for HiSIM_HV (version 1.2.3) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments pmos level=62 version=1.23 pTypeSelectionArguments nmos level=62 version=1.23 `endif `ifdef hspice nTypeSelectionArguments hisimhv_va TYPE=-1 pTypeSelectionArguments hisimhv_va TYPE=1 `endif `ifdef smartspice nTypeSelectionArguments hisimhv_va TYPE=-1 pTypeSelectionArguments hisimhv_va TYPE=1 `endif `ifdef spectre nTypeSelectionArguments hisimhv_va TYPE=-1 pTypeSelectionArguments hisimhv_va TYPE=1 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 //checkPolarity yes //symmetricpins d s scaleParameters m // // Specific tests // test dcSw_Id1_vb0 biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 modelParameters parameters/pmosParameters test dcSw_Id1_vb1 biases V(s)=0 V(b)=5 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 modelParameters parameters/pmosParameters test dcSw_Id1_vb2 biases V(s)=0 V(b)=10 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 modelParameters parameters/pmosParameters test dcSw_Id1_vb0_jd biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/pmosParameters test dcSw_Ig1_vb0 biases V(s)=0 V(b)=0 biasList V(d)=-2,-5,-10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=2e-6 modelParameters parameters/pmosParameters test dcSw_Ig1_vb1 biases V(s)=0 V(b)=5 biasList V(d)=-2,-5,-10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=2e-6 modelParameters parameters/pmosParameters test dcSw_Ig1_vb2 biases V(s)=0 V(b)=10 biasList V(d)=-2,-5,-10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters test dcSw_Ig1_vb0_jd biases V(s)=0 V(b)=0 biasList V(d)=-2,-5,-10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5e-6 L=2.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/pmosParameters test dcSw_ld2 biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters test dcSw_lg2 biases V(s)=0 V(b)=0 biasList V(d)=-2,-5,-10 biasSweep V(g)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters test dcSw_cosym biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-0.1,-30.1,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSYM=1 RD=0.1 test dcSw_rs2m biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10e-6 L=50e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters COSYM=1 RS=2e-3 test dcSw_corsrd0 biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters CORSRD=0 test dcSw_corsrd1 biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/pmosParameters modelParameters CORSRD=1 test dcSw_corsrd2 biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters CORSRD=2 test dcSw_isub biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters COISUB=1 test dcSw_gidl biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters COGIDL=1 test dcSw_she biases V(s)=0 V(b)=0 biasList V(g)=-2,-5,-10 biasSweep V(d)=-1,-20,-0.5 outputs I(d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSELFHEAT=1 POWRAT=0.5 test acVd temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-5 biasSweep V(d)=-1,-20,-1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters test acVd_corsrd1 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-10 biasSweep V(d)=-1,-20,-1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=5.0e-6 modelParameters parameters/pmosParameters modelParameters CORSRD=1 test acVd_corsrd2 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-20 biasSweep V(d)=-1,-20,-1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters CORSRD=2 test acVd_cosym temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-5 biasSweep V(d)=-1,-20,-1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COSYM=1 RD=0.1 test acVd_cvdsover temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-10 biasSweep V(d)=-1,-20,-1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters CVDSOVER=0.2 test acFreq temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters test acFreq_cosym temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters COSYM=1 RD=0.1 test acFreq_coovlp temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COOVLP=0 test acFreq_nover temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters NOVER=0 test acFreq_coadov temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/pmosParameters modelParameters COADOV=0 test acFreq_conqs temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=5e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/pmosParameters modelParameters CONQS=1 test acFreq_coiigs temperature 27 biases V(s)=0 V(b)=0 V(d)=-10 V(g)=-5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/pmosParameters modelParameters COIIGS=1 test noise1 temperature 27 biases V(s)=0 V(b)=0 V(d)=-20 biasList V(g)=-0.6,-2.0,-5 freq dec 10 1e3 1e8 outputs N(d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/pmosParameters modelParameters COTHRML=1 COIGN=1 test noise2 temperature 27 biases V(s)=0 V(b)=0 V(d)=-20 biasList V(g)=-0.6,-2.0,-5 freq dec 10 1e3 1e8 outputs N(d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/pmosParameters modelParameters COFLICK=1 FALPH=1.2 ngspice-26/tests/hisimhv1/Makefile.am0000644000265600020320000000052312264261473017157 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = nmos/qaSpec.basic pmos/qaSpec.basic TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in clean-local: rm -rf nmos/results pmos/results ngspiceCkt ngspice-26/tests/hisimhv1/nmos/0000755000265600020320000000000012264261473016077 5ustar andreasadminngspice-26/tests/hisimhv1/nmos/reference/0000755000265600020320000000000012264261473020035 5ustar andreasadminngspice-26/tests/hisimhv1/nmos/reference/dcSw_corsrd2.standard0000644000265600020320000010243012264261473024115 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.464334764099e-05 0.000000000000e+00 -5.464334763999e-05 -1.000000000000e-15 1.500000000000e+00 5.491302003872e-05 0.000000000000e+00 -5.491302003722e-05 -1.500000000000e-15 2.000000000000e+00 5.514590734766e-05 0.000000000000e+00 -5.514590734566e-05 -2.000000000000e-15 2.500000000000e+00 5.536003762946e-05 0.000000000000e+00 -5.536003762696e-05 -2.500000000000e-15 3.000000000000e+00 5.556227711485e-05 0.000000000000e+00 -5.556227711185e-05 -3.000000000000e-15 3.500000000000e+00 5.575609256033e-05 0.000000000000e+00 -5.575609255683e-05 -3.500000000000e-15 4.000000000000e+00 5.594353729866e-05 0.000000000000e+00 -5.594353729466e-05 -4.000000000000e-15 4.500000000000e+00 5.612595298739e-05 0.000000000000e+00 -5.612595298289e-05 -4.500000000000e-15 5.000000000000e+00 5.630427601472e-05 0.000000000000e+00 -5.630427600972e-05 -5.000000000000e-15 5.500000000000e+00 5.647919163341e-05 0.000000000000e+00 -5.647919162791e-05 -5.500000000000e-15 6.000000000000e+00 5.665121960902e-05 0.000000000000e+00 -5.665121960302e-05 -6.000000000000e-15 6.500000000000e+00 5.682076543521e-05 0.000000000000e+00 -5.682076542871e-05 -6.500000000000e-15 7.000000000000e+00 5.698815273272e-05 0.000000000000e+00 -5.698815272572e-05 -7.000000000000e-15 7.500000000000e+00 5.715364468074e-05 0.000000000000e+00 -5.715364467324e-05 -7.500000000000e-15 8.000000000000e+00 5.731745871778e-05 0.000000000000e+00 -5.731745870978e-05 -8.000000000000e-15 8.500000000000e+00 5.747977693502e-05 0.000000000000e+00 -5.747977692652e-05 -8.500000000000e-15 9.000000000000e+00 5.764075361421e-05 0.000000000000e+00 -5.764075360521e-05 -9.000000000000e-15 9.500000000000e+00 5.780052081593e-05 0.000000000000e+00 -5.780052080643e-05 -9.500000000000e-15 1.000000000000e+01 5.795919260183e-05 0.000000000000e+00 -5.795919259183e-05 -1.000000000000e-14 1.050000000000e+01 5.811686827856e-05 0.000000000000e+00 -5.811686826806e-05 -1.050000000000e-14 1.100000000000e+01 5.827363492713e-05 0.000000000000e+00 -5.827363491613e-05 -1.100000000000e-14 1.150000000000e+01 5.842956940118e-05 0.000000000000e+00 -5.842956938968e-05 -1.150000000000e-14 1.200000000000e+01 5.858473992447e-05 0.000000000000e+00 -5.858473991247e-05 -1.200000000000e-14 1.250000000000e+01 5.873920738164e-05 0.000000000000e+00 -5.873920736914e-05 -1.250000000000e-14 1.300000000000e+01 5.889302637132e-05 0.000000000000e+00 -5.889302635832e-05 -1.300000000000e-14 1.350000000000e+01 5.904624607285e-05 0.000000000000e+00 -5.904624605935e-05 -1.350000000000e-14 1.400000000000e+01 5.919891096559e-05 0.000000000000e+00 -5.919891095159e-05 -1.400000000000e-14 1.450000000000e+01 5.935106143004e-05 0.000000000000e+00 -5.935106141554e-05 -1.450000000000e-14 1.500000000000e+01 5.950273425401e-05 0.000000000000e+00 -5.950273423901e-05 -1.500000000000e-14 1.550000000000e+01 5.965396306119e-05 0.000000000000e+00 -5.965396304569e-05 -1.550000000000e-14 1.600000000000e+01 5.980477867644e-05 0.000000000000e+00 -5.980477866044e-05 -1.600000000000e-14 1.650000000000e+01 5.995520943865e-05 0.000000000000e+00 -5.995520942215e-05 -1.650000000000e-14 1.700000000000e+01 6.010528147025e-05 0.000000000000e+00 -6.010528145325e-05 -1.700000000000e-14 1.750000000000e+01 6.025501891030e-05 0.000000000000e+00 -6.025501889280e-05 -1.750000000000e-14 1.800000000000e+01 6.040444411715e-05 0.000000000000e+00 -6.040444409915e-05 -1.800000000000e-14 1.850000000000e+01 6.055357784530e-05 0.000000000000e+00 -6.055357782680e-05 -1.850000000000e-14 1.900000000000e+01 6.070243940037e-05 0.000000000000e+00 -6.070243938137e-05 -1.900000000000e-14 1.950000000000e+01 6.085104677542e-05 0.000000000000e+00 -6.085104675592e-05 -1.950000000000e-14 2.000000000000e+01 6.099941677123e-05 0.000000000000e+00 -6.099941675123e-05 -2.000000000000e-14 1.000000000000e+00 1.129597919176e-03 0.000000000000e+00 -1.129597919175e-03 -1.000000000000e-15 1.500000000000e+00 1.308756682198e-03 0.000000000000e+00 -1.308756682196e-03 -1.500000000000e-15 2.000000000000e+00 1.392118443819e-03 0.000000000000e+00 -1.392118443817e-03 -2.000000000000e-15 2.500000000000e+00 1.429990634253e-03 0.000000000000e+00 -1.429990634250e-03 -2.500000000000e-15 3.000000000000e+00 1.445558111864e-03 0.000000000000e+00 -1.445558111861e-03 -3.000000000000e-15 3.500000000000e+00 1.450598391572e-03 0.000000000000e+00 -1.450598391569e-03 -3.500000000000e-15 4.000000000000e+00 1.452506063254e-03 0.000000000000e+00 -1.452506063250e-03 -4.000000000000e-15 4.500000000000e+00 1.454118801893e-03 0.000000000000e+00 -1.454118801888e-03 -4.500000000000e-15 5.000000000000e+00 1.455601933584e-03 0.000000000000e+00 -1.455601933579e-03 -5.000000000000e-15 5.500000000000e+00 1.456982349819e-03 0.000000000000e+00 -1.456982349814e-03 -5.500000000000e-15 6.000000000000e+00 1.458280427242e-03 0.000000000000e+00 -1.458280427236e-03 -6.000000000000e-15 6.500000000000e+00 1.459511783076e-03 0.000000000000e+00 -1.459511783070e-03 -6.500000000000e-15 7.000000000000e+00 1.460688324642e-03 0.000000000000e+00 -1.460688324635e-03 -7.000000000000e-15 7.500000000000e+00 1.461819172274e-03 0.000000000000e+00 -1.461819172266e-03 -7.500000000000e-15 8.000000000000e+00 1.462911381427e-03 0.000000000000e+00 -1.462911381419e-03 -8.000000000000e-15 8.500000000000e+00 1.463970478846e-03 0.000000000000e+00 -1.463970478837e-03 -8.500000000000e-15 9.000000000000e+00 1.465000852507e-03 0.000000000000e+00 -1.465000852498e-03 -9.000000000000e-15 9.500000000000e+00 1.466006033740e-03 0.000000000000e+00 -1.466006033731e-03 -9.500000000000e-15 1.000000000000e+01 1.466988901938e-03 0.000000000000e+00 -1.466988901928e-03 -1.000000000000e-14 1.050000000000e+01 1.467951834198e-03 0.000000000000e+00 -1.467951834188e-03 -1.050000000000e-14 1.100000000000e+01 1.468896815780e-03 0.000000000000e+00 -1.468896815769e-03 -1.100000000000e-14 1.150000000000e+01 1.469825522527e-03 0.000000000000e+00 -1.469825522515e-03 -1.150000000000e-14 1.200000000000e+01 1.470739383077e-03 0.000000000000e+00 -1.470739383065e-03 -1.200000000000e-14 1.250000000000e+01 1.471639626362e-03 0.000000000000e+00 -1.471639626350e-03 -1.250000000000e-14 1.300000000000e+01 1.472527318279e-03 0.000000000000e+00 -1.472527318266e-03 -1.300000000000e-14 1.350000000000e+01 1.473403390312e-03 0.000000000000e+00 -1.473403390299e-03 -1.350000000000e-14 1.400000000000e+01 1.474268662114e-03 0.000000000000e+00 -1.474268662100e-03 -1.400000000000e-14 1.450000000000e+01 1.475123859491e-03 0.000000000000e+00 -1.475123859477e-03 -1.450000000000e-14 1.500000000000e+01 1.475969628869e-03 0.000000000000e+00 -1.475969628854e-03 -1.500000000000e-14 1.550000000000e+01 1.476806549028e-03 0.000000000000e+00 -1.476806549012e-03 -1.550000000000e-14 1.600000000000e+01 1.477635140710e-03 0.000000000000e+00 -1.477635140694e-03 -1.600000000000e-14 1.650000000000e+01 1.478455874540e-03 0.000000000000e+00 -1.478455874523e-03 -1.650000000000e-14 1.700000000000e+01 1.479269177604e-03 0.000000000000e+00 -1.479269177587e-03 -1.700000000000e-14 1.750000000000e+01 1.480075438965e-03 0.000000000000e+00 -1.480075438947e-03 -1.750000000000e-14 1.800000000000e+01 1.480875014293e-03 0.000000000000e+00 -1.480875014275e-03 -1.800000000000e-14 1.850000000000e+01 1.481668229807e-03 0.000000000000e+00 -1.481668229788e-03 -1.850000000000e-14 1.900000000000e+01 1.482455385619e-03 0.000000000000e+00 -1.482455385600e-03 -1.900000000000e-14 1.950000000000e+01 1.483236758616e-03 0.000000000000e+00 -1.483236758596e-03 -1.950000000000e-14 2.000000000000e+01 1.484012604928e-03 0.000000000000e+00 -1.484012604908e-03 -2.000000000000e-14 1.000000000000e+00 2.935428139136e-03 0.000000000000e+00 -2.935428139135e-03 -1.000000000000e-15 1.500000000000e+00 3.582872600403e-03 0.000000000000e+00 -3.582872600401e-03 -1.500000000000e-15 2.000000000000e+00 3.954141088060e-03 0.000000000000e+00 -3.954141088058e-03 -2.000000000000e-15 2.500000000000e+00 4.178109144234e-03 0.000000000000e+00 -4.178109144231e-03 -2.500000000000e-15 3.000000000000e+00 4.320493270677e-03 0.000000000000e+00 -4.320493270674e-03 -3.000000000000e-15 3.500000000000e+00 4.415136335744e-03 0.000000000000e+00 -4.415136335740e-03 -3.500000000000e-15 4.000000000000e+00 4.480332689813e-03 0.000000000000e+00 -4.480332689809e-03 -4.000000000000e-15 4.500000000000e+00 4.526525585542e-03 0.000000000000e+00 -4.526525585537e-03 -4.500000000000e-15 5.000000000000e+00 4.559987959147e-03 0.000000000000e+00 -4.559987959142e-03 -5.000000000000e-15 5.500000000000e+00 4.584660378063e-03 0.000000000000e+00 -4.584660378057e-03 -5.500000000000e-15 6.000000000000e+00 4.603114750648e-03 0.000000000000e+00 -4.603114750642e-03 -6.000000000000e-15 6.500000000000e+00 4.617084234106e-03 0.000000000000e+00 -4.617084234099e-03 -6.500000000000e-15 7.000000000000e+00 4.627767937955e-03 0.000000000000e+00 -4.627767937948e-03 -7.000000000000e-15 7.500000000000e+00 4.636013587980e-03 0.000000000000e+00 -4.636013587973e-03 -7.500000000000e-15 8.000000000000e+00 4.642431268278e-03 0.000000000000e+00 -4.642431268270e-03 -8.000000000000e-15 8.500000000000e+00 4.647466648868e-03 0.000000000000e+00 -4.647466648859e-03 -8.500000000000e-15 9.000000000000e+00 4.651449485031e-03 0.000000000000e+00 -4.651449485022e-03 -9.000000000000e-15 9.500000000000e+00 4.654626513142e-03 0.000000000000e+00 -4.654626513132e-03 -9.500000000000e-15 1.000000000000e+01 4.657184224301e-03 0.000000000000e+00 -4.657184224291e-03 -1.000000000000e-14 1.050000000000e+01 4.659264928218e-03 0.000000000000e+00 -4.659264928208e-03 -1.050000000000e-14 1.100000000000e+01 4.660978307037e-03 0.000000000000e+00 -4.660978307026e-03 -1.100000000000e-14 1.150000000000e+01 4.662409942164e-03 0.000000000000e+00 -4.662409942153e-03 -1.150000000000e-14 1.200000000000e+01 4.663627906556e-03 0.000000000000e+00 -4.663627906544e-03 -1.200000000000e-14 1.250000000000e+01 4.664688382727e-03 0.000000000000e+00 -4.664688382714e-03 -1.250000000000e-14 1.300000000000e+01 4.665641030733e-03 0.000000000000e+00 -4.665641030720e-03 -1.300000000000e-14 1.350000000000e+01 4.666531272516e-03 0.000000000000e+00 -4.666531272502e-03 -1.350000000000e-14 1.400000000000e+01 4.667390908764e-03 0.000000000000e+00 -4.667390908750e-03 -1.400000000000e-14 1.450000000000e+01 4.668232350768e-03 0.000000000000e+00 -4.668232350753e-03 -1.450000000000e-14 1.500000000000e+01 4.669059078294e-03 0.000000000000e+00 -4.669059078279e-03 -1.500000000000e-14 1.550000000000e+01 4.669872553577e-03 0.000000000000e+00 -4.669872553562e-03 -1.550000000000e-14 1.600000000000e+01 4.670673811638e-03 0.000000000000e+00 -4.670673811622e-03 -1.600000000000e-14 1.650000000000e+01 4.671463738240e-03 0.000000000000e+00 -4.671463738223e-03 -1.650000000000e-14 1.700000000000e+01 4.672243125381e-03 0.000000000000e+00 -4.672243125364e-03 -1.700000000000e-14 1.750000000000e+01 4.673012688382e-03 0.000000000000e+00 -4.673012688365e-03 -1.750000000000e-14 1.800000000000e+01 4.673773075288e-03 0.000000000000e+00 -4.673773075270e-03 -1.800000000000e-14 1.850000000000e+01 4.674524874185e-03 0.000000000000e+00 -4.674524874166e-03 -1.850000000000e-14 1.900000000000e+01 4.675268619550e-03 0.000000000000e+00 -4.675268619531e-03 -1.900000000000e-14 1.950000000000e+01 4.676004797899e-03 0.000000000000e+00 -4.676004797880e-03 -1.950000000000e-14 2.000000000000e+01 4.676733852829e-03 0.000000000000e+00 -4.676733852809e-03 -2.000000000000e-14 1.000000000000e+00 3.895401760747e-05 0.000000000000e+00 -3.895401760647e-05 -1.000000000000e-15 1.500000000000e+00 3.917545382115e-05 0.000000000000e+00 -3.917545381965e-05 -1.500000000000e-15 2.000000000000e+00 3.937171412919e-05 0.000000000000e+00 -3.937171412719e-05 -2.000000000000e-15 2.500000000000e+00 3.955510820019e-05 0.000000000000e+00 -3.955510819769e-05 -2.500000000000e-15 3.000000000000e+00 3.973030824865e-05 0.000000000000e+00 -3.973030824565e-05 -3.000000000000e-15 3.500000000000e+00 3.989968959160e-05 0.000000000000e+00 -3.989968958810e-05 -3.500000000000e-15 4.000000000000e+00 4.006467079130e-05 0.000000000000e+00 -4.006467078730e-05 -4.000000000000e-15 4.500000000000e+00 4.022618553181e-05 0.000000000000e+00 -4.022618552731e-05 -4.500000000000e-15 5.000000000000e+00 4.038488937290e-05 0.000000000000e+00 -4.038488936790e-05 -5.000000000000e-15 5.500000000000e+00 4.054126437179e-05 0.000000000000e+00 -4.054126436629e-05 -5.500000000000e-15 6.000000000000e+00 4.069567758905e-05 0.000000000000e+00 -4.069567758305e-05 -6.000000000000e-15 6.500000000000e+00 4.084841628442e-05 0.000000000000e+00 -4.084841627792e-05 -6.500000000000e-15 7.000000000000e+00 4.099971030258e-05 0.000000000000e+00 -4.099971029558e-05 -7.000000000000e-15 7.500000000000e+00 4.114974695175e-05 0.000000000000e+00 -4.114974694425e-05 -7.500000000000e-15 8.000000000000e+00 4.129868125235e-05 0.000000000000e+00 -4.129868124435e-05 -8.000000000000e-15 8.500000000000e+00 4.144664320918e-05 0.000000000000e+00 -4.144664320068e-05 -8.500000000000e-15 9.000000000000e+00 4.159374310249e-05 0.000000000000e+00 -4.159374309349e-05 -9.000000000000e-15 9.500000000000e+00 4.174007542152e-05 0.000000000000e+00 -4.174007541202e-05 -9.500000000000e-15 1.000000000000e+01 4.188572184381e-05 0.000000000000e+00 -4.188572183381e-05 -1.000000000000e-14 1.050000000000e+01 4.203075352925e-05 0.000000000000e+00 -4.203075351875e-05 -1.050000000000e-14 1.100000000000e+01 4.217523291209e-05 0.000000000000e+00 -4.217523290109e-05 -1.100000000000e-14 1.150000000000e+01 4.231921511929e-05 0.000000000000e+00 -4.231921510779e-05 -1.150000000000e-14 1.200000000000e+01 4.246274910596e-05 0.000000000000e+00 -4.246274909396e-05 -1.200000000000e-14 1.250000000000e+01 4.260587857418e-05 0.000000000000e+00 -4.260587856168e-05 -1.250000000000e-14 1.300000000000e+01 4.274864272344e-05 0.000000000000e+00 -4.274864271044e-05 -1.300000000000e-14 1.350000000000e+01 4.289107686904e-05 0.000000000000e+00 -4.289107685554e-05 -1.350000000000e-14 1.400000000000e+01 4.303321295575e-05 0.000000000000e+00 -4.303321294175e-05 -1.400000000000e-14 1.450000000000e+01 4.317507998752e-05 0.000000000000e+00 -4.317507997302e-05 -1.450000000000e-14 1.500000000000e+01 4.331670438949e-05 0.000000000000e+00 -4.331670437449e-05 -1.500000000000e-14 1.550000000000e+01 4.345811031488e-05 0.000000000000e+00 -4.345811029938e-05 -1.550000000000e-14 1.600000000000e+01 4.359931990658e-05 0.000000000000e+00 -4.359931989058e-05 -1.600000000000e-14 1.650000000000e+01 4.374035352145e-05 0.000000000000e+00 -4.374035350495e-05 -1.650000000000e-14 1.700000000000e+01 4.388122992355e-05 0.000000000000e+00 -4.388122990655e-05 -1.700000000000e-14 1.750000000000e+01 4.402196645143e-05 0.000000000000e+00 -4.402196643393e-05 -1.750000000000e-14 1.800000000000e+01 4.416257916353e-05 0.000000000000e+00 -4.416257914553e-05 -1.800000000000e-14 1.850000000000e+01 4.430308296523e-05 0.000000000000e+00 -4.430308294673e-05 -1.850000000000e-14 1.900000000000e+01 4.444349172016e-05 0.000000000000e+00 -4.444349170116e-05 -1.900000000000e-14 1.950000000000e+01 4.458381834812e-05 0.000000000000e+00 -4.458381832862e-05 -1.950000000000e-14 2.000000000000e+01 4.472407491156e-05 0.000000000000e+00 -4.472407489156e-05 -2.000000000000e-14 1.000000000000e+00 1.429703987287e-03 0.000000000000e+00 -1.429703987286e-03 -1.000000000000e-15 1.500000000000e+00 1.594114979955e-03 0.000000000000e+00 -1.594114979953e-03 -1.500000000000e-15 2.000000000000e+00 1.662733619102e-03 0.000000000000e+00 -1.662733619100e-03 -2.000000000000e-15 2.500000000000e+00 1.690888475931e-03 0.000000000000e+00 -1.690888475929e-03 -2.500000000000e-15 3.000000000000e+00 1.700387327626e-03 0.000000000000e+00 -1.700387327623e-03 -3.000000000000e-15 3.500000000000e+00 1.702719379207e-03 0.000000000000e+00 -1.702719379203e-03 -3.500000000000e-15 4.000000000000e+00 1.704365848848e-03 0.000000000000e+00 -1.704365848844e-03 -4.000000000000e-15 4.500000000000e+00 1.705873186281e-03 0.000000000000e+00 -1.705873186277e-03 -4.500000000000e-15 5.000000000000e+00 1.707268377259e-03 0.000000000000e+00 -1.707268377254e-03 -5.000000000000e-15 5.500000000000e+00 1.708573927146e-03 0.000000000000e+00 -1.708573927141e-03 -5.500000000000e-15 6.000000000000e+00 1.709807600430e-03 0.000000000000e+00 -1.709807600424e-03 -6.000000000000e-15 6.500000000000e+00 1.710983029174e-03 0.000000000000e+00 -1.710983029168e-03 -6.500000000000e-15 7.000000000000e+00 1.712110603532e-03 0.000000000000e+00 -1.712110603525e-03 -7.000000000000e-15 7.500000000000e+00 1.713198277061e-03 0.000000000000e+00 -1.713198277054e-03 -7.500000000000e-15 8.000000000000e+00 1.714252199056e-03 0.000000000000e+00 -1.714252199048e-03 -8.000000000000e-15 8.500000000000e+00 1.715277184154e-03 0.000000000000e+00 -1.715277184145e-03 -8.500000000000e-15 9.000000000000e+00 1.716277053626e-03 0.000000000000e+00 -1.716277053617e-03 -9.000000000000e-15 9.500000000000e+00 1.717254882058e-03 0.000000000000e+00 -1.717254882049e-03 -9.500000000000e-15 1.000000000000e+01 1.718213176167e-03 0.000000000000e+00 -1.718213176157e-03 -1.000000000000e-14 1.050000000000e+01 1.719154005390e-03 0.000000000000e+00 -1.719154005380e-03 -1.050000000000e-14 1.100000000000e+01 1.720079098195e-03 0.000000000000e+00 -1.720079098184e-03 -1.100000000000e-14 1.150000000000e+01 1.720989913891e-03 0.000000000000e+00 -1.720989913880e-03 -1.150000000000e-14 1.200000000000e+01 1.721887696803e-03 0.000000000000e+00 -1.721887696791e-03 -1.200000000000e-14 1.250000000000e+01 1.722773517596e-03 0.000000000000e+00 -1.722773517584e-03 -1.250000000000e-14 1.300000000000e+01 1.723648305180e-03 0.000000000000e+00 -1.723648305167e-03 -1.300000000000e-14 1.350000000000e+01 1.724512871596e-03 0.000000000000e+00 -1.724512871582e-03 -1.350000000000e-14 1.400000000000e+01 1.725367931642e-03 0.000000000000e+00 -1.725367931628e-03 -1.400000000000e-14 1.450000000000e+01 1.726214118508e-03 0.000000000000e+00 -1.726214118493e-03 -1.450000000000e-14 1.500000000000e+01 1.727051996339e-03 0.000000000000e+00 -1.727051996324e-03 -1.500000000000e-14 1.550000000000e+01 1.727882070440e-03 0.000000000000e+00 -1.727882070424e-03 -1.550000000000e-14 1.600000000000e+01 1.728704795613e-03 0.000000000000e+00 -1.728704795597e-03 -1.600000000000e-14 1.650000000000e+01 1.729520583044e-03 0.000000000000e+00 -1.729520583028e-03 -1.650000000000e-14 1.700000000000e+01 1.730329806023e-03 0.000000000000e+00 -1.730329806006e-03 -1.700000000000e-14 1.750000000000e+01 1.731132804723e-03 0.000000000000e+00 -1.731132804706e-03 -1.750000000000e-14 1.800000000000e+01 1.731929890242e-03 0.000000000000e+00 -1.731929890224e-03 -1.800000000000e-14 1.850000000000e+01 1.732721348012e-03 0.000000000000e+00 -1.732721347993e-03 -1.850000000000e-14 1.900000000000e+01 1.733507440719e-03 0.000000000000e+00 -1.733507440700e-03 -1.900000000000e-14 1.950000000000e+01 1.734288410798e-03 0.000000000000e+00 -1.734288410778e-03 -1.950000000000e-14 2.000000000000e+01 1.735064482589e-03 0.000000000000e+00 -1.735064482569e-03 -2.000000000000e-14 1.000000000000e+00 3.854032802957e-03 0.000000000000e+00 -3.854032802956e-03 -1.000000000000e-15 1.500000000000e+00 4.412043240587e-03 0.000000000000e+00 -4.412043240586e-03 -1.500000000000e-15 2.000000000000e+00 4.686046837368e-03 0.000000000000e+00 -4.686046837366e-03 -2.000000000000e-15 2.500000000000e+00 4.836665881575e-03 0.000000000000e+00 -4.836665881572e-03 -2.500000000000e-15 3.000000000000e+00 4.927049162943e-03 0.000000000000e+00 -4.927049162940e-03 -3.000000000000e-15 3.500000000000e+00 4.984913775603e-03 0.000000000000e+00 -4.984913775599e-03 -3.500000000000e-15 4.000000000000e+00 5.023774478516e-03 0.000000000000e+00 -5.023774478512e-03 -4.000000000000e-15 4.500000000000e+00 5.050824648047e-03 0.000000000000e+00 -5.050824648043e-03 -4.500000000000e-15 5.000000000000e+00 5.070175744181e-03 0.000000000000e+00 -5.070175744176e-03 -5.000000000000e-15 5.500000000000e+00 5.084317564298e-03 0.000000000000e+00 -5.084317564292e-03 -5.500000000000e-15 6.000000000000e+00 5.094830402382e-03 0.000000000000e+00 -5.094830402376e-03 -6.000000000000e-15 6.500000000000e+00 5.102756364419e-03 0.000000000000e+00 -5.102756364413e-03 -6.500000000000e-15 7.000000000000e+00 5.108804383261e-03 0.000000000000e+00 -5.108804383254e-03 -7.000000000000e-15 7.500000000000e+00 5.113469170824e-03 0.000000000000e+00 -5.113469170817e-03 -7.500000000000e-15 8.000000000000e+00 5.117103269473e-03 0.000000000000e+00 -5.117103269465e-03 -8.000000000000e-15 8.500000000000e+00 5.119962343702e-03 0.000000000000e+00 -5.119962343694e-03 -8.500000000000e-15 9.000000000000e+00 5.122234573110e-03 0.000000000000e+00 -5.122234573101e-03 -9.000000000000e-15 9.500000000000e+00 5.124060265552e-03 0.000000000000e+00 -5.124060265543e-03 -9.500000000000e-15 1.000000000000e+01 5.125545283807e-03 0.000000000000e+00 -5.125545283797e-03 -1.000000000000e-14 1.050000000000e+01 5.126770493562e-03 0.000000000000e+00 -5.126770493552e-03 -1.050000000000e-14 1.100000000000e+01 5.127798700118e-03 0.000000000000e+00 -5.127798700107e-03 -1.100000000000e-14 1.150000000000e+01 5.128680312838e-03 0.000000000000e+00 -5.128680312827e-03 -1.150000000000e-14 1.200000000000e+01 5.129459633967e-03 0.000000000000e+00 -5.129459633955e-03 -1.200000000000e-14 1.250000000000e+01 5.130182949668e-03 0.000000000000e+00 -5.130182949655e-03 -1.250000000000e-14 1.300000000000e+01 5.130885952675e-03 0.000000000000e+00 -5.130885952662e-03 -1.300000000000e-14 1.350000000000e+01 5.131577713103e-03 0.000000000000e+00 -5.131577713090e-03 -1.350000000000e-14 1.400000000000e+01 5.132259649888e-03 0.000000000000e+00 -5.132259649874e-03 -1.400000000000e-14 1.450000000000e+01 5.132932552456e-03 0.000000000000e+00 -5.132932552442e-03 -1.450000000000e-14 1.500000000000e+01 5.133597109340e-03 0.000000000000e+00 -5.133597109325e-03 -1.500000000000e-14 1.550000000000e+01 5.134253943565e-03 0.000000000000e+00 -5.134253943549e-03 -1.550000000000e-14 1.600000000000e+01 5.134903619661e-03 0.000000000000e+00 -5.134903619645e-03 -1.600000000000e-14 1.650000000000e+01 5.135546648861e-03 0.000000000000e+00 -5.135546648845e-03 -1.650000000000e-14 1.700000000000e+01 5.136183494069e-03 0.000000000000e+00 -5.136183494052e-03 -1.700000000000e-14 1.750000000000e+01 5.136814574584e-03 0.000000000000e+00 -5.136814574567e-03 -1.750000000000e-14 1.800000000000e+01 5.137440270510e-03 0.000000000000e+00 -5.137440270492e-03 -1.800000000000e-14 1.850000000000e+01 5.138060926800e-03 0.000000000000e+00 -5.138060926782e-03 -1.850000000000e-14 1.900000000000e+01 5.138676856933e-03 0.000000000000e+00 -5.138676856914e-03 -1.900000000000e-14 1.950000000000e+01 5.139288346218e-03 0.000000000000e+00 -5.139288346199e-03 -1.950000000000e-14 2.000000000000e+01 5.139895654765e-03 0.000000000000e+00 -5.139895654745e-03 -2.000000000000e-14 1.000000000000e+00 7.787582960650e-05 0.000000000000e+00 -7.787582960550e-05 -1.000000000000e-15 1.500000000000e+00 7.821572842147e-05 0.000000000000e+00 -7.821572841997e-05 -1.500000000000e-15 2.000000000000e+00 7.849442049280e-05 0.000000000000e+00 -7.849442049080e-05 -2.000000000000e-15 2.500000000000e+00 7.874446509247e-05 0.000000000000e+00 -7.874446508997e-05 -2.500000000000e-15 3.000000000000e+00 7.897672618282e-05 0.000000000000e+00 -7.897672617982e-05 -3.000000000000e-15 3.500000000000e+00 7.919655410702e-05 0.000000000000e+00 -7.919655410352e-05 -3.500000000000e-15 4.000000000000e+00 7.940705657220e-05 0.000000000000e+00 -7.940705656820e-05 -4.000000000000e-15 4.500000000000e+00 7.961023299667e-05 0.000000000000e+00 -7.961023299217e-05 -4.500000000000e-15 5.000000000000e+00 7.980746193404e-05 0.000000000000e+00 -7.980746192904e-05 -5.000000000000e-15 5.500000000000e+00 7.999974250330e-05 0.000000000000e+00 -7.999974249780e-05 -5.500000000000e-15 6.000000000000e+00 8.018782667373e-05 0.000000000000e+00 -8.018782666773e-05 -6.000000000000e-15 6.500000000000e+00 8.037229739723e-05 0.000000000000e+00 -8.037229739073e-05 -6.500000000000e-15 7.000000000000e+00 8.055361750901e-05 0.000000000000e+00 -8.055361750201e-05 -7.000000000000e-15 7.500000000000e+00 8.073216177707e-05 0.000000000000e+00 -8.073216176957e-05 -7.500000000000e-15 8.000000000000e+00 8.090823871149e-05 0.000000000000e+00 -8.090823870349e-05 -8.000000000000e-15 8.500000000000e+00 8.108210587659e-05 0.000000000000e+00 -8.108210586809e-05 -8.500000000000e-15 9.000000000000e+00 8.125398092938e-05 0.000000000000e+00 -8.125398092038e-05 -9.000000000000e-15 9.500000000000e+00 8.142404975933e-05 0.000000000000e+00 -8.142404974983e-05 -9.500000000000e-15 1.000000000000e+01 8.159247260990e-05 0.000000000000e+00 -8.159247259990e-05 -1.000000000000e-14 1.050000000000e+01 8.175938876199e-05 0.000000000000e+00 -8.175938875149e-05 -1.050000000000e-14 1.100000000000e+01 8.192492017236e-05 0.000000000000e+00 -8.192492016136e-05 -1.100000000000e-14 1.150000000000e+01 8.208917433850e-05 0.000000000000e+00 -8.208917432700e-05 -1.150000000000e-14 1.200000000000e+01 8.225224658215e-05 0.000000000000e+00 -8.225224657015e-05 -1.200000000000e-14 1.250000000000e+01 8.241422188942e-05 0.000000000000e+00 -8.241422187692e-05 -1.250000000000e-14 1.300000000000e+01 8.257517640839e-05 0.000000000000e+00 -8.257517639539e-05 -1.300000000000e-14 1.350000000000e+01 8.273517867913e-05 0.000000000000e+00 -8.273517866563e-05 -1.350000000000e-14 1.400000000000e+01 8.289429065222e-05 0.000000000000e+00 -8.289429063822e-05 -1.400000000000e-14 1.450000000000e+01 8.305256853859e-05 0.000000000000e+00 -8.305256852409e-05 -1.450000000000e-14 1.500000000000e+01 8.321006352373e-05 0.000000000000e+00 -8.321006350873e-05 -1.500000000000e-14 1.550000000000e+01 8.336682237163e-05 0.000000000000e+00 -8.336682235613e-05 -1.550000000000e-14 1.600000000000e+01 8.352288793872e-05 0.000000000000e+00 -8.352288792272e-05 -1.600000000000e-14 1.650000000000e+01 8.367829961353e-05 0.000000000000e+00 -8.367829959703e-05 -1.650000000000e-14 1.700000000000e+01 8.383309369491e-05 0.000000000000e+00 -8.383309367791e-05 -1.700000000000e-14 1.750000000000e+01 8.398730371889e-05 0.000000000000e+00 -8.398730370139e-05 -1.750000000000e-14 1.800000000000e+01 8.414096074243e-05 0.000000000000e+00 -8.414096072443e-05 -1.800000000000e-14 1.850000000000e+01 8.429409359093e-05 0.000000000000e+00 -8.429409357243e-05 -1.850000000000e-14 1.900000000000e+01 8.444672907487e-05 0.000000000000e+00 -8.444672905587e-05 -1.900000000000e-14 1.950000000000e+01 8.459889218021e-05 0.000000000000e+00 -8.459889216071e-05 -1.950000000000e-14 2.000000000000e+01 8.475060623630e-05 0.000000000000e+00 -8.475060621630e-05 -2.000000000000e-14 1.000000000000e+00 8.028198596655e-04 0.000000000000e+00 -8.028198596645e-04 -1.000000000000e-15 1.500000000000e+00 9.690487833512e-04 0.000000000000e+00 -9.690487833497e-04 -1.500000000000e-15 2.000000000000e+00 1.056807820661e-03 0.000000000000e+00 -1.056807820659e-03 -2.000000000000e-15 2.500000000000e+00 1.101968211582e-03 0.000000000000e+00 -1.101968211580e-03 -2.500000000000e-15 3.000000000000e+00 1.124335299886e-03 0.000000000000e+00 -1.124335299883e-03 -3.000000000000e-15 3.500000000000e+00 1.134726445257e-03 0.000000000000e+00 -1.134726445253e-03 -3.500000000000e-15 4.000000000000e+00 1.139161735168e-03 0.000000000000e+00 -1.139161735164e-03 -4.000000000000e-15 4.500000000000e+00 1.141188635592e-03 0.000000000000e+00 -1.141188635588e-03 -4.500000000000e-15 5.000000000000e+00 1.142629885156e-03 0.000000000000e+00 -1.142629885151e-03 -5.000000000000e-15 5.500000000000e+00 1.143925963592e-03 0.000000000000e+00 -1.143925963586e-03 -5.500000000000e-15 6.000000000000e+00 1.145135915340e-03 0.000000000000e+00 -1.145135915334e-03 -6.000000000000e-15 6.500000000000e+00 1.146278710963e-03 0.000000000000e+00 -1.146278710957e-03 -6.500000000000e-15 7.000000000000e+00 1.147366669925e-03 0.000000000000e+00 -1.147366669918e-03 -7.000000000000e-15 7.500000000000e+00 1.148408988603e-03 0.000000000000e+00 -1.148408988596e-03 -7.500000000000e-15 8.000000000000e+00 1.149412746815e-03 0.000000000000e+00 -1.149412746807e-03 -8.000000000000e-15 8.500000000000e+00 1.150383485135e-03 0.000000000000e+00 -1.150383485126e-03 -8.500000000000e-15 9.000000000000e+00 1.151325602020e-03 0.000000000000e+00 -1.151325602011e-03 -9.000000000000e-15 9.500000000000e+00 1.152242637316e-03 0.000000000000e+00 -1.152242637306e-03 -9.500000000000e-15 1.000000000000e+01 1.153137477304e-03 0.000000000000e+00 -1.153137477294e-03 -1.000000000000e-14 1.050000000000e+01 1.154012504503e-03 0.000000000000e+00 -1.154012504493e-03 -1.050000000000e-14 1.100000000000e+01 1.154869708286e-03 0.000000000000e+00 -1.154869708275e-03 -1.100000000000e-14 1.150000000000e+01 1.155710767470e-03 0.000000000000e+00 -1.155710767458e-03 -1.150000000000e-14 1.200000000000e+01 1.156537112700e-03 0.000000000000e+00 -1.156537112688e-03 -1.200000000000e-14 1.250000000000e+01 1.157349974104e-03 0.000000000000e+00 -1.157349974091e-03 -1.250000000000e-14 1.300000000000e+01 1.158150418101e-03 0.000000000000e+00 -1.158150418088e-03 -1.300000000000e-14 1.350000000000e+01 1.158939376157e-03 0.000000000000e+00 -1.158939376143e-03 -1.350000000000e-14 1.400000000000e+01 1.159717667461e-03 0.000000000000e+00 -1.159717667447e-03 -1.400000000000e-14 1.450000000000e+01 1.160486017008e-03 0.000000000000e+00 -1.160486016993e-03 -1.450000000000e-14 1.500000000000e+01 1.161245070131e-03 0.000000000000e+00 -1.161245070116e-03 -1.500000000000e-14 1.550000000000e+01 1.161995404307e-03 0.000000000000e+00 -1.161995404292e-03 -1.550000000000e-14 1.600000000000e+01 1.162737538804e-03 0.000000000000e+00 -1.162737538788e-03 -1.600000000000e-14 1.650000000000e+01 1.163471942649e-03 0.000000000000e+00 -1.163471942633e-03 -1.650000000000e-14 1.700000000000e+01 1.164199041243e-03 0.000000000000e+00 -1.164199041226e-03 -1.700000000000e-14 1.750000000000e+01 1.164919221895e-03 0.000000000000e+00 -1.164919221877e-03 -1.750000000000e-14 1.800000000000e+01 1.165632838484e-03 0.000000000000e+00 -1.165632838466e-03 -1.800000000000e-14 1.850000000000e+01 1.166340215414e-03 0.000000000000e+00 -1.166340215395e-03 -1.850000000000e-14 1.900000000000e+01 1.167041650973e-03 0.000000000000e+00 -1.167041650954e-03 -1.900000000000e-14 1.950000000000e+01 1.167737420226e-03 0.000000000000e+00 -1.167737420207e-03 -1.950000000000e-14 2.000000000000e+01 1.168427777495e-03 0.000000000000e+00 -1.168427777475e-03 -2.000000000000e-14 1.000000000000e+00 1.947630581048e-03 0.000000000000e+00 -1.947630581047e-03 -1.000000000000e-15 1.500000000000e+00 2.533228189983e-03 0.000000000000e+00 -2.533228189981e-03 -1.500000000000e-15 2.000000000000e+00 2.930333890994e-03 0.000000000000e+00 -2.930333890992e-03 -2.000000000000e-15 2.500000000000e+00 3.200794845794e-03 0.000000000000e+00 -3.200794845791e-03 -2.500000000000e-15 3.000000000000e+00 3.388151666905e-03 0.000000000000e+00 -3.388151666902e-03 -3.000000000000e-15 3.500000000000e+00 3.520574956877e-03 0.000000000000e+00 -3.520574956874e-03 -3.500000000000e-15 4.000000000000e+00 3.615989900440e-03 0.000000000000e+00 -3.615989900436e-03 -4.000000000000e-15 4.500000000000e+00 3.685919786759e-03 0.000000000000e+00 -3.685919786754e-03 -4.500000000000e-15 5.000000000000e+00 3.737926379954e-03 0.000000000000e+00 -3.737926379949e-03 -5.000000000000e-15 5.500000000000e+00 3.777089958598e-03 0.000000000000e+00 -3.777089958592e-03 -5.500000000000e-15 6.000000000000e+00 3.806902858301e-03 0.000000000000e+00 -3.806902858295e-03 -6.000000000000e-15 6.500000000000e+00 3.829815894678e-03 0.000000000000e+00 -3.829815894671e-03 -6.500000000000e-15 7.000000000000e+00 3.847579732934e-03 0.000000000000e+00 -3.847579732927e-03 -7.000000000000e-15 7.500000000000e+00 3.861463683636e-03 0.000000000000e+00 -3.861463683629e-03 -7.500000000000e-15 8.000000000000e+00 3.872399692733e-03 0.000000000000e+00 -3.872399692725e-03 -8.000000000000e-15 8.500000000000e+00 3.881079443002e-03 0.000000000000e+00 -3.881079442993e-03 -8.500000000000e-15 9.000000000000e+00 3.888021210678e-03 0.000000000000e+00 -3.888021210669e-03 -9.000000000000e-15 9.500000000000e+00 3.893616687609e-03 0.000000000000e+00 -3.893616687599e-03 -9.500000000000e-15 1.000000000000e+01 3.898164235055e-03 0.000000000000e+00 -3.898164235045e-03 -1.000000000000e-14 1.050000000000e+01 3.901892785836e-03 0.000000000000e+00 -3.901892785826e-03 -1.050000000000e-14 1.100000000000e+01 3.904979211056e-03 0.000000000000e+00 -3.904979211045e-03 -1.100000000000e-14 1.150000000000e+01 3.907561067652e-03 0.000000000000e+00 -3.907561067641e-03 -1.150000000000e-14 1.200000000000e+01 3.909746050378e-03 0.000000000000e+00 -3.909746050366e-03 -1.200000000000e-14 1.250000000000e+01 3.911619074871e-03 0.000000000000e+00 -3.911619074859e-03 -1.250000000000e-14 1.300000000000e+01 3.913247648334e-03 0.000000000000e+00 -3.913247648321e-03 -1.300000000000e-14 1.350000000000e+01 3.914685994613e-03 0.000000000000e+00 -3.914685994599e-03 -1.350000000000e-14 1.400000000000e+01 3.915978249544e-03 0.000000000000e+00 -3.915978249530e-03 -1.400000000000e-14 1.450000000000e+01 3.917160873489e-03 0.000000000000e+00 -3.917160873475e-03 -1.450000000000e-14 1.500000000000e+01 3.918264169725e-03 0.000000000000e+00 -3.918264169710e-03 -1.500000000000e-14 1.550000000000e+01 3.919312565805e-03 0.000000000000e+00 -3.919312565790e-03 -1.550000000000e-14 1.600000000000e+01 3.920323866053e-03 0.000000000000e+00 -3.920323866037e-03 -1.600000000000e-14 1.650000000000e+01 3.921309144898e-03 0.000000000000e+00 -3.921309144882e-03 -1.650000000000e-14 1.700000000000e+01 3.922274428825e-03 0.000000000000e+00 -3.922274428808e-03 -1.700000000000e-14 1.750000000000e+01 3.923222925033e-03 0.000000000000e+00 -3.923222925015e-03 -1.750000000000e-14 1.800000000000e+01 3.924156515407e-03 0.000000000000e+00 -3.924156515389e-03 -1.800000000000e-14 1.850000000000e+01 3.925076480901e-03 0.000000000000e+00 -3.925076480882e-03 -1.850000000000e-14 1.900000000000e+01 3.925983810643e-03 0.000000000000e+00 -3.925983810624e-03 -1.900000000000e-14 1.950000000000e+01 3.926879331818e-03 0.000000000000e+00 -3.926879331799e-03 -1.950000000000e-14 2.000000000000e+01 3.927763767027e-03 0.000000000000e+00 -3.927763767007e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_isub.standard0000644000265600020320000010243012264261473023501 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.389411504882e-07 0.000000000000e+00 -5.389411494757e-07 -1.012500000000e-15 1.500000000000e+00 5.389767316936e-07 0.000000000000e+00 -5.389767301811e-07 -1.512500000000e-15 2.000000000000e+00 5.390043785293e-07 0.000000000000e+00 -5.390043765168e-07 -2.012500000000e-15 2.500000000000e+00 5.390280351370e-07 0.000000000000e+00 -5.390280326245e-07 -2.512500000038e-15 3.000000000000e+00 5.390491621909e-07 0.000000000000e+00 -5.390491591784e-07 -3.012500020416e-15 3.500000000000e+00 5.390684884817e-07 0.000000000000e+00 -5.390684849692e-07 -3.512502291785e-15 4.000000000000e+00 5.390864433058e-07 0.000000000000e+00 -5.390864392932e-07 -4.012590361986e-15 4.500000000000e+00 5.391033064380e-07 0.000000000000e+00 -5.391033019238e-07 -4.514215693130e-15 5.000000000000e+00 5.391192729289e-07 0.000000000000e+00 -5.391192678972e-07 -5.031660422442e-15 5.500000000000e+00 5.391344855475e-07 0.000000000000e+00 -5.391344798912e-07 -5.656259133629e-15 6.000000000000e+00 5.391490529493e-07 0.000000000000e+00 -5.391490461424e-07 -6.806887979148e-15 6.500000000000e+00 5.391630610951e-07 0.000000000000e+00 -5.391630511307e-07 -9.964382206279e-15 7.000000000000e+00 5.391765817130e-07 0.000000000000e+00 -5.391765623252e-07 -1.938773374140e-14 7.500000000000e+00 5.391896800981e-07 0.000000000000e+00 -5.391896346410e-07 -4.545707592699e-14 8.000000000000e+00 5.392024237850e-07 0.000000000000e+00 -5.392023134932e-07 -1.102917822104e-13 8.500000000000e+00 5.392148930691e-07 0.000000000000e+00 -5.392146369547e-07 -2.561143723501e-13 9.000000000000e+00 5.392271938277e-07 0.000000000000e+00 -5.392266373210e-07 -5.565066986479e-13 9.500000000000e+00 5.392394725859e-07 0.000000000000e+00 -5.392383422691e-07 -1.130316831380e-12 1.000000000000e+01 5.392519333485e-07 0.000000000000e+00 -5.392497757336e-07 -2.157614902451e-12 1.050000000000e+01 5.392648554131e-07 0.000000000000e+00 -5.392609585799e-07 -3.896833132672e-12 1.100000000000e+01 5.392786112214e-07 0.000000000000e+00 -5.392719091287e-07 -6.702092642664e-12 1.150000000000e+01 5.392936832878e-07 0.000000000000e+00 -5.392826435708e-07 -1.103971698209e-11 1.200000000000e+01 5.393106793343e-07 0.000000000000e+00 -5.392931762982e-07 -1.750303601673e-11 1.250000000000e+01 5.393303449321e-07 0.000000000000e+00 -5.393035201728e-07 -2.682475939019e-11 1.300000000000e+01 5.393535731551e-07 0.000000000000e+00 -5.393136867443e-07 -3.988641072809e-11 1.350000000000e+01 5.393814109625e-07 0.000000000000e+00 -5.393236864308e-07 -5.772453179572e-11 1.400000000000e+01 5.394150622356e-07 0.000000000000e+00 -5.393335286679e-07 -8.153356768502e-11 1.450000000000e+01 5.394558875501e-07 0.000000000000e+00 -5.393432220342e-07 -1.126655158617e-10 1.500000000000e+01 5.395054009126e-07 0.000000000000e+00 -5.393527743557e-07 -1.526265568513e-10 1.550000000000e+01 5.395652637772e-07 0.000000000000e+00 -5.393621927959e-07 -2.030709813032e-10 1.600000000000e+01 5.396372767208e-07 0.000000000000e+00 -5.393714839312e-07 -2.657927897038e-10 1.650000000000e+01 5.397233691882e-07 0.000000000000e+00 -5.393806538163e-07 -3.427153718495e-10 1.700000000000e+01 5.398255877196e-07 0.000000000000e+00 -5.393897080406e-07 -4.358796790614e-10 1.750000000000e+01 5.399460830652e-07 0.000000000000e+00 -5.393986517763e-07 -5.474312888710e-10 1.800000000000e+01 5.400870965562e-07 0.000000000000e+00 -5.394074898212e-07 -6.796067349652e-10 1.850000000000e+01 5.402509460744e-07 0.000000000000e+00 -5.394162266352e-07 -8.347194392873e-10 1.900000000000e+01 5.404400119152e-07 0.000000000000e+00 -5.394248663728e-07 -1.015145542253e-09 1.950000000000e+01 5.406567227960e-07 0.000000000000e+00 -5.394334129119e-07 -1.223309884118e-09 2.000000000000e+01 5.409035422264e-07 0.000000000000e+00 -5.394418698785e-07 -1.461672347971e-09 1.000000000000e+00 9.421650280056e-06 0.000000000000e+00 -9.421650279044e-06 -1.012500000000e-15 1.500000000000e+00 1.301282781464e-05 0.000000000000e+00 -1.301282781313e-05 -1.512500000000e-15 2.000000000000e+00 1.572630541532e-05 0.000000000000e+00 -1.572630541330e-05 -2.012500000000e-15 2.500000000000e+00 1.757032315653e-05 0.000000000000e+00 -1.757032315402e-05 -2.512500000000e-15 3.000000000000e+00 1.866713667821e-05 0.000000000000e+00 -1.866713667519e-05 -3.012500000000e-15 3.500000000000e+00 1.921365080765e-05 0.000000000000e+00 -1.921365080414e-05 -3.512500000000e-15 4.000000000000e+00 1.941406507917e-05 0.000000000000e+00 -1.941406507516e-05 -4.012500000000e-15 4.500000000000e+00 1.944657297966e-05 0.000000000000e+00 -1.944657297515e-05 -4.512500000440e-15 5.000000000000e+00 1.944793536940e-05 0.000000000000e+00 -1.944793536438e-05 -5.012500313439e-15 5.500000000000e+00 1.944862194827e-05 0.000000000000e+00 -1.944862194276e-05 -5.512542085603e-15 6.000000000000e+00 1.944922369668e-05 0.000000000000e+00 -1.944922369067e-05 -6.014379094455e-15 6.500000000000e+00 1.944976364006e-05 0.000000000000e+00 -1.944976363350e-05 -6.551546813338e-15 7.000000000000e+00 1.945025508372e-05 0.000000000000e+00 -1.945025507624e-05 -7.479137568089e-15 7.500000000000e+00 1.945070775273e-05 0.000000000000e+00 -1.945070774153e-05 -1.120177102488e-14 8.000000000000e+00 1.945112888635e-05 0.000000000000e+00 -1.945112885709e-05 -2.925993801485e-14 8.500000000000e+00 1.945152397616e-05 0.000000000000e+00 -1.945152387219e-05 -1.039709248088e-13 9.000000000000e+00 1.945189731948e-05 0.000000000000e+00 -1.945189695875e-05 -3.607212345898e-13 9.500000000000e+00 1.945225247389e-05 0.000000000000e+00 -1.945225136119e-05 -1.112701346415e-12 1.000000000000e+01 1.945259268264e-05 0.000000000000e+00 -1.945258964154e-05 -3.041094231864e-12 1.050000000000e+01 1.945292132151e-05 0.000000000000e+00 -1.945291385275e-05 -7.468764110202e-12 1.100000000000e+01 1.945324239752e-05 0.000000000000e+00 -1.945322566244e-05 -1.673507714707e-11 1.150000000000e+01 1.945356110876e-05 0.000000000000e+00 -1.945352644253e-05 -3.466623463526e-11 1.200000000000e+01 1.945388445750e-05 0.000000000000e+00 -1.945381733491e-05 -6.712259621334e-11 1.250000000000e+01 1.945422189473e-05 0.000000000000e+00 -1.945409930023e-05 -1.225945053737e-10 1.300000000000e+01 1.945458596713e-05 0.000000000000e+00 -1.945437315462e-05 -2.128125108158e-10 1.350000000000e+01 1.945499293446e-05 0.000000000000e+00 -1.945463959765e-05 -3.533368159540e-10 1.400000000000e+01 1.945546332749e-05 0.000000000000e+00 -1.945489923388e-05 -5.640936177886e-10 1.450000000000e+01 1.945602242126e-05 0.000000000000e+00 -1.945515258967e-05 -8.698315874499e-10 1.500000000000e+01 1.945670060532e-05 0.000000000000e+00 -1.945540012645e-05 -1.300478869449e-09 1.550000000000e+01 1.945753363976e-05 0.000000000000e+00 -1.945564225122e-05 -1.891388545545e-09 1.600000000000e+01 1.945856279275e-05 0.000000000000e+00 -1.945587932506e-05 -2.683467691016e-09 1.650000000000e+01 1.945983486140e-05 0.000000000000e+00 -1.945611167000e-05 -3.723191400801e-09 1.700000000000e+01 1.946140208281e-05 0.000000000000e+00 -1.945633957462e-05 -5.062508192908e-09 1.750000000000e+01 1.946332194560e-05 0.000000000000e+00 -1.945656329868e-05 -6.758646921615e-09 1.800000000000e+01 1.946565691482e-05 0.000000000000e+00 -1.945678307701e-05 -8.873837810492e-09 1.850000000000e+01 1.946847408426e-05 0.000000000000e+00 -1.945699912267e-05 -1.147496158914e-08 1.900000000000e+01 1.947184477088e-05 0.000000000000e+00 -1.945721162970e-05 -1.463314117520e-08 1.950000000000e+01 1.947584406548e-05 0.000000000000e+00 -1.945742077540e-05 -1.842329008378e-08 2.000000000000e+01 1.948055035322e-05 0.000000000000e+00 -1.945762672226e-05 -2.292363095898e-08 1.000000000000e+00 1.516372234914e-05 0.000000000000e+00 -1.516372234813e-05 -1.012500000000e-15 1.500000000000e+00 2.247962220791e-05 0.000000000000e+00 -2.247962220640e-05 -1.512500000000e-15 2.000000000000e+00 2.960186092955e-05 0.000000000000e+00 -2.960186092754e-05 -2.012500000000e-15 2.500000000000e+00 3.651665422570e-05 0.000000000000e+00 -3.651665422319e-05 -2.512500000000e-15 3.000000000000e+00 4.320899853019e-05 0.000000000000e+00 -4.320899852718e-05 -3.012500000000e-15 3.500000000000e+00 4.966271649885e-05 0.000000000000e+00 -4.966271649534e-05 -3.512500000000e-15 4.000000000000e+00 5.586055677922e-05 0.000000000000e+00 -5.586055677521e-05 -4.012500000000e-15 4.500000000000e+00 6.178437410680e-05 0.000000000000e+00 -6.178437410229e-05 -4.512500000000e-15 5.000000000000e+00 6.741542077982e-05 0.000000000000e+00 -6.741542077481e-05 -5.012500000000e-15 5.500000000000e+00 7.273478270497e-05 0.000000000000e+00 -7.273478269945e-05 -5.512500000000e-15 6.000000000000e+00 7.772399065058e-05 0.000000000000e+00 -7.772399064456e-05 -6.012500000000e-15 6.500000000000e+00 8.236582685957e-05 0.000000000000e+00 -8.236582685306e-05 -6.512500000000e-15 7.000000000000e+00 8.664532509458e-05 0.000000000000e+00 -8.664532508757e-05 -7.012500000000e-15 7.500000000000e+00 9.055092587895e-05 0.000000000000e+00 -9.055092587144e-05 -7.512500000000e-15 8.000000000000e+00 9.407569898944e-05 0.000000000000e+00 -9.407569898143e-05 -8.012500000000e-15 8.500000000000e+00 9.721848948147e-05 0.000000000000e+00 -9.721848947296e-05 -8.512500000000e-15 9.000000000000e+00 9.998479772811e-05 0.000000000000e+00 -9.998479771909e-05 -9.012500000000e-15 9.500000000000e+00 1.023871914973e-04 0.000000000000e+00 -1.023871914878e-04 -9.512500000000e-15 1.000000000000e+01 1.044450916101e-04 0.000000000000e+00 -1.044450916000e-04 -1.001250000000e-14 1.050000000000e+01 1.061838792328e-04 0.000000000000e+00 -1.061838792223e-04 -1.051250000000e-14 1.100000000000e+01 1.076334195868e-04 0.000000000000e+00 -1.076334195758e-04 -1.101250000001e-14 1.150000000000e+01 1.088262322799e-04 0.000000000000e+00 -1.088262322684e-04 -1.151250001582e-14 1.200000000000e+01 1.097956069875e-04 0.000000000000e+00 -1.097956069755e-04 -1.201250388938e-14 1.250000000000e+01 1.105739395622e-04 0.000000000000e+00 -1.105739395497e-04 -1.251279628690e-14 1.300000000000e+01 1.111914681569e-04 0.000000000000e+00 -1.111914681438e-04 -1.302223468461e-14 1.350000000000e+01 1.116754702176e-04 0.000000000000e+00 -1.116754702039e-04 -1.368402868340e-14 1.400000000000e+01 1.120498840856e-04 0.000000000000e+00 -1.120498840697e-04 -1.589461427382e-14 1.450000000000e+01 1.123352643450e-04 0.000000000000e+00 -1.123352643162e-04 -2.880822338279e-14 1.500000000000e+01 1.125489655680e-04 0.000000000000e+00 -1.125489654718e-04 -9.619192379301e-14 1.550000000000e+01 1.127054615442e-04 0.000000000000e+00 -1.127054611638e-04 -3.804540286907e-13 1.600000000000e+01 1.128167265261e-04 0.000000000000e+00 -1.128167251536e-04 -1.372516493207e-12 1.650000000000e+01 1.128926469094e-04 0.000000000000e+00 -1.128926425821e-04 -4.327326041590e-12 1.700000000000e+01 1.129414332696e-04 0.000000000000e+00 -1.129414212297e-04 -1.203994776489e-11 1.750000000000e+01 1.129700647982e-04 0.000000000000e+00 -1.129700347350e-04 -3.006323501460e-11 1.800000000000e+01 1.129848099713e-04 0.000000000000e+00 -1.129847415483e-04 -6.842305333833e-11 1.850000000000e+01 1.129916750822e-04 0.000000000000e+00 -1.129915312635e-04 -1.438186685507e-10 1.900000000000e+01 1.129955700185e-04 0.000000000000e+00 -1.129952877824e-04 -2.822360794084e-10 1.950000000000e+01 1.129987636421e-04 0.000000000000e+00 -1.129982417605e-04 -5.218816157799e-10 2.000000000000e+01 1.130018538736e-04 0.000000000000e+00 -1.130009375950e-04 -9.162785378967e-10 1.000000000000e+00 3.819264103376e-07 0.000000000000e+00 -3.819264093376e-07 -1.000000000938e-15 1.500000000000e+00 3.819519313049e-07 0.000000000000e+00 -3.819519298049e-07 -1.500000000938e-15 2.000000000000e+00 3.819721107027e-07 0.000000000000e+00 -3.819721087027e-07 -2.000000000938e-15 2.500000000000e+00 3.819895632829e-07 0.000000000000e+00 -3.819895607828e-07 -2.500000001078e-15 3.000000000000e+00 3.820052633549e-07 0.000000000000e+00 -3.820052603549e-07 -3.000000050109e-15 3.500000000000e+00 3.820197028800e-07 0.000000000000e+00 -3.820196993800e-07 -3.500004162925e-15 4.000000000000e+00 3.820331750130e-07 0.000000000000e+00 -3.820331710128e-07 -4.000135150717e-15 4.500000000000e+00 3.820458726544e-07 0.000000000000e+00 -3.820458681522e-07 -4.502232582834e-15 5.000000000000e+00 3.820579313457e-07 0.000000000000e+00 -3.820579263232e-07 -5.022486494311e-15 5.500000000000e+00 3.820694509512e-07 0.000000000000e+00 -3.820694452952e-07 -5.655938668782e-15 6.000000000000e+00 3.820805079549e-07 0.000000000000e+00 -3.820805011446e-07 -6.810349174045e-15 6.500000000000e+00 3.820911633568e-07 0.000000000000e+00 -3.820911535035e-07 -9.853332413767e-15 7.000000000000e+00 3.821014687238e-07 0.000000000000e+00 -3.821014501675e-07 -1.855622836244e-14 7.500000000000e+00 3.821114719606e-07 0.000000000000e+00 -3.821114301571e-07 -4.180346408396e-14 8.000000000000e+00 3.821212238358e-07 0.000000000000e+00 -3.821211258270e-07 -9.800886830775e-14 8.500000000000e+00 3.821307858887e-07 0.000000000000e+00 -3.821305643625e-07 -2.215262153959e-13 9.000000000000e+00 3.821402399644e-07 0.000000000000e+00 -3.821397688696e-07 -4.710948470560e-13 9.500000000000e+00 3.821496992697e-07 0.000000000000e+00 -3.821487591845e-07 -9.400852337486e-13 1.000000000000e+01 3.821593205549e-07 0.000000000000e+00 -3.821575524882e-07 -1.768066648912e-12 1.050000000000e+01 3.821693168325e-07 0.000000000000e+00 -3.821661637792e-07 -3.153053215258e-12 1.100000000000e+01 3.821799699562e-07 0.000000000000e+00 -3.821746062432e-07 -5.363712973662e-12 1.150000000000e+01 3.821916423889e-07 0.000000000000e+00 -3.821828915465e-07 -8.750842368712e-12 1.200000000000e+01 3.822047875660e-07 0.000000000000e+00 -3.821910300697e-07 -1.375749635119e-11 1.250000000000e+01 3.822199583956e-07 0.000000000000e+00 -3.821990310986e-07 -2.092729700258e-11 1.300000000000e+01 3.822378135755e-07 0.000000000000e+00 -3.822069029789e-07 -3.091059659363e-11 1.350000000000e+01 3.822591215685e-07 0.000000000000e+00 -3.822146532445e-07 -4.446832406216e-11 1.400000000000e+01 3.822847622067e-07 0.000000000000e+00 -3.822222887240e-07 -6.247348266333e-11 1.450000000000e+01 3.823157260119e-07 0.000000000000e+00 -3.822298156295e-07 -8.591038243033e-11 1.500000000000e+01 3.823531114128e-07 0.000000000000e+00 -3.822372396323e-07 -1.158717803735e-10 1.550000000000e+01 3.823981200903e-07 0.000000000000e+00 -3.822445659264e-07 -1.535541639369e-10 1.600000000000e+01 3.824520507339e-07 0.000000000000e+00 -3.822517992826e-07 -2.002514513907e-10 1.650000000000e+01 3.825162914959e-07 0.000000000000e+00 -3.822589440958e-07 -2.573474001584e-10 1.700000000000e+01 3.825923114395e-07 0.000000000000e+00 -3.822660044248e-07 -3.263070146798e-10 1.750000000000e+01 3.826816512606e-07 0.000000000000e+00 -3.822729840273e-07 -4.086672333973e-10 1.800000000000e+01 3.827859135442e-07 0.000000000000e+00 -3.822798863905e-07 -5.060271535822e-10 1.850000000000e+01 3.829067527835e-07 0.000000000000e+00 -3.822867147574e-07 -6.200380261985e-10 1.900000000000e+01 3.830458653732e-07 0.000000000000e+00 -3.822934721498e-07 -7.523932234777e-10 1.950000000000e+01 3.832049797410e-07 0.000000000000e+00 -3.823001613896e-07 -9.048183513812e-10 2.000000000000e+01 3.833858467653e-07 0.000000000000e+00 -3.823067851161e-07 -1.079061649182e-09 1.000000000000e+00 1.180963079896e-05 0.000000000000e+00 -1.180963079796e-05 -1.000000000938e-15 1.500000000000e+00 1.662535100773e-05 0.000000000000e+00 -1.662535100623e-05 -1.500000000938e-15 2.000000000000e+00 2.050844277382e-05 0.000000000000e+00 -2.050844277182e-05 -2.000000000938e-15 2.500000000000e+00 2.335710260866e-05 0.000000000000e+00 -2.335710260616e-05 -2.500000000938e-15 3.000000000000e+00 2.518883803117e-05 0.000000000000e+00 -2.518883802817e-05 -3.000000000938e-15 3.500000000000e+00 2.616381262389e-05 0.000000000000e+00 -2.616381262039e-05 -3.500000000938e-15 4.000000000000e+00 2.653000381953e-05 0.000000000000e+00 -2.653000381553e-05 -4.000000000938e-15 4.500000000000e+00 2.657650789763e-05 0.000000000000e+00 -2.657650789313e-05 -4.500000000961e-15 5.000000000000e+00 2.657790912119e-05 0.000000000000e+00 -2.657790911619e-05 -5.000000041087e-15 5.500000000000e+00 2.657902341124e-05 0.000000000000e+00 -2.657902340574e-05 -5.500009504852e-15 6.000000000000e+00 2.657999072246e-05 0.000000000000e+00 -2.657999071646e-05 -6.000621954638e-15 6.500000000000e+00 2.658084577534e-05 0.000000000000e+00 -2.658084576883e-05 -6.516934275048e-15 7.000000000000e+00 2.658161376747e-05 0.000000000000e+00 -2.658161376023e-05 -7.246749279487e-15 7.500000000000e+00 2.658231307162e-05 0.000000000000e+00 -2.658231306186e-05 -9.766143220415e-15 8.000000000000e+00 2.658295721801e-05 0.000000000000e+00 -2.658295719535e-05 -2.265759945856e-14 8.500000000000e+00 2.658355632888e-05 0.000000000000e+00 -2.658355624820e-05 -8.068385117850e-14 9.000000000000e+00 2.658411815821e-05 0.000000000000e+00 -2.658411786285e-05 -2.953542985473e-13 9.500000000000e+00 2.658464888618e-05 0.000000000000e+00 -2.658464792256e-05 -9.636189902398e-13 1.000000000000e+01 2.658515379408e-05 0.000000000000e+00 -2.658515102809e-05 -2.765983361812e-12 1.050000000000e+01 2.658563791394e-05 0.000000000000e+00 -2.658563083178e-05 -7.082153819637e-12 1.100000000000e+01 2.658610671527e-05 0.000000000000e+00 -2.658609027424e-05 -1.644102792415e-11 1.150000000000e+01 2.658656685935e-05 0.000000000000e+00 -2.658653175427e-05 -3.510508194262e-11 1.200000000000e+01 2.658702702363e-05 0.000000000000e+00 -2.658695725248e-05 -6.977115496306e-11 1.250000000000e+01 2.658749877661e-05 0.000000000000e+00 -2.658736842238e-05 -1.303542306447e-10 1.300000000000e+01 2.658799746916e-05 0.000000000000e+00 -2.658776665849e-05 -2.308106674158e-10 1.350000000000e+01 2.658854310122e-05 0.000000000000e+00 -2.658815314787e-05 -3.899533500959e-10 1.400000000000e+01 2.658916112249e-05 0.000000000000e+00 -2.658852890952e-05 -6.322129679630e-10 1.450000000000e+01 2.658988313078e-05 0.000000000000e+00 -2.658889482503e-05 -9.883057517687e-10 1.500000000000e+01 2.659074743935e-05 0.000000000000e+00 -2.658925166246e-05 -1.495776888555e-09 1.550000000000e+01 2.659179949428e-05 0.000000000000e+00 -2.658960009537e-05 -2.199398911618e-09 1.600000000000e+01 2.659309213229e-05 0.000000000000e+00 -2.658994071793e-05 -3.151414361198e-09 1.650000000000e+01 2.659468567823e-05 0.000000000000e+00 -2.659027405719e-05 -4.411621034837e-09 1.700000000000e+01 2.659664788868e-05 0.000000000000e+00 -2.659060058301e-05 -6.047305667007e-09 1.750000000000e+01 2.659905375389e-05 0.000000000000e+00 -2.659092071622e-05 -8.133037672435e-09 1.800000000000e+01 2.660198517404e-05 0.000000000000e+00 -2.659123483539e-05 -1.075033865805e-08 1.850000000000e+01 2.660553052834e-05 0.000000000000e+00 -2.659154328244e-05 -1.398724590328e-08 1.900000000000e+01 2.660978415651e-05 0.000000000000e+00 -2.659184636735e-05 -1.793778915741e-08 1.950000000000e+01 2.661484577232e-05 0.000000000000e+00 -2.659214437215e-05 -2.270140016924e-08 2.000000000000e+01 2.662081982786e-05 0.000000000000e+00 -2.659243755425e-05 -2.838227360826e-08 1.000000000000e+00 1.767850226227e-05 0.000000000000e+00 -1.767850226127e-05 -1.000000000938e-15 1.500000000000e+00 2.631087682730e-05 0.000000000000e+00 -2.631087682580e-05 -1.500000000938e-15 2.000000000000e+00 3.479704047263e-05 0.000000000000e+00 -3.479704047063e-05 -2.000000000938e-15 2.500000000000e+00 4.312995115793e-05 0.000000000000e+00 -4.312995115543e-05 -2.500000000938e-15 3.000000000000e+00 5.130181830535e-05 0.000000000000e+00 -5.130181830235e-05 -3.000000000938e-15 3.500000000000e+00 5.930403336606e-05 0.000000000000e+00 -5.930403336256e-05 -3.500000000938e-15 4.000000000000e+00 6.712709807723e-05 0.000000000000e+00 -6.712709807323e-05 -4.000000000938e-15 4.500000000000e+00 7.476055150792e-05 0.000000000000e+00 -7.476055150342e-05 -4.500000000938e-15 5.000000000000e+00 8.219289946544e-05 0.000000000000e+00 -8.219289946044e-05 -5.000000000938e-15 5.500000000000e+00 8.941155214972e-05 0.000000000000e+00 -8.941155214422e-05 -5.500000000938e-15 6.000000000000e+00 9.640277875389e-05 0.000000000000e+00 -9.640277874789e-05 -6.000000000938e-15 6.500000000000e+00 1.031516912992e-04 0.000000000000e+00 -1.031516912927e-04 -6.500000000938e-15 7.000000000000e+00 1.096422744727e-04 0.000000000000e+00 -1.096422744657e-04 -7.000000000938e-15 7.500000000000e+00 1.158574835084e-04 0.000000000000e+00 -1.158574835009e-04 -7.500000000938e-15 8.000000000000e+00 1.217794377542e-04 0.000000000000e+00 -1.217794377462e-04 -8.000000000938e-15 8.500000000000e+00 1.273897424190e-04 0.000000000000e+00 -1.273897424105e-04 -8.500000000938e-15 9.000000000000e+00 1.326699730912e-04 0.000000000000e+00 -1.326699730822e-04 -9.000000000938e-15 9.500000000000e+00 1.376023537909e-04 0.000000000000e+00 -1.376023537814e-04 -9.500000000938e-15 1.000000000000e+01 1.421706453038e-04 0.000000000000e+00 -1.421706452938e-04 -1.000000000094e-14 1.050000000000e+01 1.463612319195e-04 0.000000000000e+00 -1.463612319090e-04 -1.050000000094e-14 1.100000000000e+01 1.501643491193e-04 0.000000000000e+00 -1.501643491083e-04 -1.100000000094e-14 1.150000000000e+01 1.535753357443e-04 0.000000000000e+00 -1.535753357328e-04 -1.150000000094e-14 1.200000000000e+01 1.565957349787e-04 0.000000000000e+00 -1.565957349667e-04 -1.200000000094e-14 1.250000000000e+01 1.592340328755e-04 0.000000000000e+00 -1.592340328630e-04 -1.250000000094e-14 1.300000000000e+01 1.615058384433e-04 0.000000000000e+00 -1.615058384303e-04 -1.300000000094e-14 1.350000000000e+01 1.634333909008e-04 0.000000000000e+00 -1.634333908873e-04 -1.350000000102e-14 1.400000000000e+01 1.650444146858e-04 0.000000000000e+00 -1.650444146718e-04 -1.400000005019e-14 1.450000000000e+01 1.663704874849e-04 0.000000000000e+00 -1.663704874704e-04 -1.450000790442e-14 1.500000000000e+01 1.674451859920e-04 0.000000000000e+00 -1.674451859770e-04 -1.500047154339e-14 1.550000000000e+01 1.683022931491e-04 0.000000000000e+00 -1.683022931336e-04 -1.551347431508e-14 1.600000000000e+01 1.689742925443e-04 0.000000000000e+00 -1.689742925281e-04 -1.621960871431e-14 1.650000000000e+01 1.694912750855e-04 0.000000000000e+00 -1.694912750667e-04 -1.881206168646e-14 1.700000000000e+01 1.698802822772e-04 0.000000000000e+00 -1.698802822429e-04 -3.422243340084e-14 1.750000000000e+01 1.701650386533e-04 0.000000000000e+00 -1.701650385387e-04 -1.146624807374e-13 1.800000000000e+01 1.703659935505e-04 0.000000000000e+00 -1.703659930953e-04 -4.552460555289e-13 1.850000000000e+01 1.705005997536e-04 0.000000000000e+00 -1.705005981014e-04 -1.652221701697e-12 1.900000000000e+01 1.705838009356e-04 0.000000000000e+00 -1.705837956863e-04 -5.249327736966e-12 1.950000000000e+01 1.706288851098e-04 0.000000000000e+00 -1.706288703820e-04 -1.472776702220e-11 2.000000000000e+01 1.706492394047e-04 0.000000000000e+00 -1.706492023268e-04 -3.707784314813e-11 1.000000000000e+00 7.727480689751e-07 0.000000000000e+00 -7.727318757956e-07 -1.619317952605e-11 1.500000000000e+00 7.728515838318e-07 0.000000000000e+00 -7.728353901523e-07 -1.619367952607e-11 2.000000000000e+00 7.728905162990e-07 0.000000000000e+00 -7.728743221194e-07 -1.619417952607e-11 2.500000000000e+00 7.729229661341e-07 0.000000000000e+00 -7.729067714545e-07 -1.619467952607e-11 3.000000000000e+00 7.729516008337e-07 0.000000000000e+00 -7.729354056542e-07 -1.619517952608e-11 3.500000000000e+00 7.729775821380e-07 0.000000000000e+00 -7.729613864585e-07 -1.619567952665e-11 4.000000000000e+00 7.730015726110e-07 0.000000000000e+00 -7.729853764315e-07 -1.619617955887e-11 4.500000000000e+00 7.730239954526e-07 0.000000000000e+00 -7.730077987722e-07 -1.619668033712e-11 5.000000000000e+00 7.730451412975e-07 0.000000000000e+00 -7.730289441069e-07 -1.619719052371e-11 5.500000000000e+00 7.730652203317e-07 0.000000000000e+00 -7.730490225566e-07 -1.619777508494e-11 6.000000000000e+00 7.730843907927e-07 0.000000000000e+00 -7.730681920216e-07 -1.619877115782e-11 6.500000000000e+00 7.731027762860e-07 0.000000000000e+00 -7.730865747938e-07 -1.620149221534e-11 7.000000000000e+00 7.731204779321e-07 0.000000000000e+00 -7.731042679125e-07 -1.621001965385e-11 7.500000000000e+00 7.731375848709e-07 0.000000000000e+00 -7.731213499309e-07 -1.623493995017e-11 8.000000000000e+00 7.731541854960e-07 0.000000000000e+00 -7.731378855108e-07 -1.629998517803e-11 8.500000000000e+00 7.731703810257e-07 0.000000000000e+00 -7.731539286417e-07 -1.645238395748e-11 9.000000000000e+00 7.731863022974e-07 0.000000000000e+00 -7.731695249593e-07 -1.677733815028e-11 9.500000000000e+00 7.732021299569e-07 0.000000000000e+00 -7.731847134520e-07 -1.741650493706e-11 1.000000000000e+01 7.732181175609e-07 0.000000000000e+00 -7.731995277437e-07 -1.858981721653e-11 1.050000000000e+01 7.732346166082e-07 0.000000000000e+00 -7.732139970746e-07 -2.061953356289e-11 1.100000000000e+01 7.732521022036e-07 0.000000000000e+00 -7.732281470623e-07 -2.395514134869e-11 1.150000000000e+01 7.732711979613e-07 0.000000000000e+00 -7.732420003008e-07 -2.919766048845e-11 1.200000000000e+01 7.732926988260e-07 0.000000000000e+00 -7.732555768380e-07 -3.712198797264e-11 1.250000000000e+01 7.733175907004e-07 0.000000000000e+00 -7.732688945605e-07 -4.869613982485e-11 1.300000000000e+01 7.733470660417e-07 0.000000000000e+00 -7.732819695061e-07 -6.509653565961e-11 1.350000000000e+01 7.733825349053e-07 0.000000000000e+00 -7.732948161207e-07 -8.771878451226e-11 1.400000000000e+01 7.734256312041e-07 0.000000000000e+00 -7.733074474718e-07 -1.181837323008e-10 1.450000000000e+01 7.734782142214e-07 0.000000000000e+00 -7.733198754249e-07 -1.583387964956e-10 1.500000000000e+01 7.735423656224e-07 0.000000000000e+00 -7.733321107936e-07 -2.102548288129e-10 1.550000000000e+01 7.736203823729e-07 0.000000000000e+00 -7.733441634654e-07 -2.762189074495e-10 1.600000000000e+01 7.737147660774e-07 0.000000000000e+00 -7.733560425090e-07 -3.587235683413e-10 1.650000000000e+01 7.738282093120e-07 0.000000000000e+00 -7.733677562660e-07 -4.604530459225e-10 1.700000000000e+01 7.739635795462e-07 0.000000000000e+00 -7.733793124306e-07 -5.842671156874e-10 1.750000000000e+01 7.741239012389e-07 0.000000000000e+00 -7.733907181170e-07 -7.331831219408e-10 1.800000000000e+01 7.743123366623e-07 0.000000000000e+00 -7.734019799196e-07 -9.103567425479e-10 1.850000000000e+01 7.745321659595e-07 0.000000000000e+00 -7.734131039641e-07 -1.119061995496e-09 1.900000000000e+01 7.747867668887e-07 0.000000000000e+00 -7.734240959529e-07 -1.362670935734e-09 1.950000000000e+01 7.750795946353e-07 0.000000000000e+00 -7.734349612053e-07 -1.644633429929e-09 2.000000000000e+01 7.754141620276e-07 0.000000000000e+00 -7.734457046923e-07 -1.968457335252e-09 1.000000000000e+00 6.877999119889e-06 0.000000000000e+00 -6.877982926709e-06 -1.619317952605e-11 1.500000000000e+00 9.319505996911e-06 0.000000000000e+00 -9.319489803232e-06 -1.619367952607e-11 2.000000000000e+00 1.106821590615e-05 0.000000000000e+00 -1.106819971198e-05 -1.619417952607e-11 2.500000000000e+00 1.220656312395e-05 0.000000000000e+00 -1.220654692927e-05 -1.619467952607e-11 3.000000000000e+00 1.287547241565e-05 0.000000000000e+00 -1.287545622047e-05 -1.619517952607e-11 3.500000000000e+00 1.322677648763e-05 0.000000000000e+00 -1.322676029195e-05 -1.619567952607e-11 4.000000000000e+00 1.338615744200e-05 0.000000000000e+00 -1.338614124582e-05 -1.619617952607e-11 4.500000000000e+00 1.344230923335e-05 0.000000000000e+00 -1.344229303667e-05 -1.619667952607e-11 5.000000000000e+00 1.345427354928e-05 0.000000000000e+00 -1.345425735210e-05 -1.619717952657e-11 5.500000000000e+00 1.345584621768e-05 0.000000000000e+00 -1.345583002000e-05 -1.619767958127e-11 6.000000000000e+00 1.345632136519e-05 0.000000000000e+00 -1.345630516701e-05 -1.619818169292e-11 6.500000000000e+00 1.345667030885e-05 0.000000000000e+00 -1.345665411013e-05 -1.619872058248e-11 7.000000000000e+00 1.345698069069e-05 0.000000000000e+00 -1.345696449105e-05 -1.619963769812e-11 7.500000000000e+00 1.345726699512e-05 0.000000000000e+00 -1.345725079200e-05 -1.620311731941e-11 8.000000000000e+00 1.345753464096e-05 0.000000000000e+00 -1.345751842178e-05 -1.621918576681e-11 8.500000000000e+00 1.345778697254e-05 0.000000000000e+00 -1.345777068921e-05 -1.628333161332e-11 9.000000000000e+00 1.345802649330e-05 0.000000000000e+00 -1.345800999553e-05 -1.649776494299e-11 9.500000000000e+00 1.345825529931e-05 0.000000000000e+00 -1.345823818735e-05 -1.711196439576e-11 1.000000000000e+01 1.345847538254e-05 0.000000000000e+00 -1.345845672419e-05 -1.865835564838e-11 1.050000000000e+01 1.345868893577e-05 0.000000000000e+00 -1.345866678099e-05 -2.215478400450e-11 1.100000000000e+01 1.345889869533e-05 0.000000000000e+00 -1.345886931767e-05 -2.937766800334e-11 1.150000000000e+01 1.345910832901e-05 0.000000000000e+00 -1.345906512869e-05 -4.320032097739e-11 1.200000000000e+01 1.345932286134e-05 0.000000000000e+00 -1.345925487922e-05 -6.798212125419e-11 1.250000000000e+01 1.345954911974e-05 0.000000000000e+00 -1.345943913204e-05 -1.099876981534e-10 1.300000000000e+01 1.345979617981e-05 0.000000000000e+00 -1.345961836789e-05 -1.778119207649e-10 1.350000000000e+01 1.346007578722e-05 0.000000000000e+00 -1.345979300097e-05 -2.827862527797e-10 1.400000000000e+01 1.346040273542e-05 0.000000000000e+00 -1.345996339100e-05 -4.393444229870e-10 1.450000000000e+01 1.346079518217e-05 0.000000000000e+00 -1.346012985263e-05 -6.653295350642e-10 1.500000000000e+01 1.346127489279e-05 0.000000000000e+00 -1.346029266294e-05 -9.822298446812e-10 1.550000000000e+01 1.346186740309e-05 0.000000000000e+00 -1.346045206736e-05 -1.415335728051e-09 1.600000000000e+01 1.346260209981e-05 0.000000000000e+00 -1.346060828451e-05 -1.993815304907e-09 1.650000000000e+01 1.346351222052e-05 0.000000000000e+00 -1.346076151010e-05 -2.750710411882e-09 1.700000000000e+01 1.346463477818e-05 0.000000000000e+00 -1.346091192020e-05 -3.722857976406e-09 1.750000000000e+01 1.346601041812e-05 0.000000000000e+00 -1.346105967384e-05 -4.950744278767e-09 1.800000000000e+01 1.346768321642e-05 0.000000000000e+00 -1.346120491526e-05 -6.478301165561e-09 1.850000000000e+01 1.346970042987e-05 0.000000000000e+00 -1.346134777577e-05 -8.352654101280e-09 1.900000000000e+01 1.347211220747e-05 0.000000000000e+00 -1.346148837532e-05 -1.062383215157e-08 1.950000000000e+01 1.347497127355e-05 0.000000000000e+00 -1.346162682383e-05 -1.334444972184e-08 2.000000000000e+01 1.347833259162e-05 0.000000000000e+00 -1.346176322236e-05 -1.656936926002e-08 1.000000000000e+00 1.185627260907e-05 0.000000000000e+00 -1.185625641589e-05 -1.619317952605e-11 1.500000000000e+00 1.745008749828e-05 0.000000000000e+00 -1.745007130460e-05 -1.619367952607e-11 2.000000000000e+00 2.279696940712e-05 0.000000000000e+00 -2.279695321294e-05 -1.619417952607e-11 2.500000000000e+00 2.787780128156e-05 0.000000000000e+00 -2.787778508688e-05 -1.619467952607e-11 3.000000000000e+00 3.267343095428e-05 0.000000000000e+00 -3.267341475910e-05 -1.619517952607e-11 3.500000000000e+00 3.716548241724e-05 0.000000000000e+00 -3.716546622156e-05 -1.619567952607e-11 4.000000000000e+00 4.133730483464e-05 0.000000000000e+00 -4.133728863846e-05 -1.619617952607e-11 4.500000000000e+00 4.517504680187e-05 0.000000000000e+00 -4.517503060519e-05 -1.619667952607e-11 5.000000000000e+00 4.866879502562e-05 0.000000000000e+00 -4.866877882844e-05 -1.619717952607e-11 5.500000000000e+00 5.181366710018e-05 0.000000000000e+00 -5.181365090251e-05 -1.619767952607e-11 6.000000000000e+00 5.461070889905e-05 0.000000000000e+00 -5.461069270087e-05 -1.619817952607e-11 6.500000000000e+00 5.706743338540e-05 0.000000000000e+00 -5.706741718672e-05 -1.619867952607e-11 7.000000000000e+00 5.919786202251e-05 0.000000000000e+00 -5.919784582333e-05 -1.619917952607e-11 7.500000000000e+00 6.102199580703e-05 0.000000000000e+00 -6.102197960735e-05 -1.619967952607e-11 8.000000000000e+00 6.256474035796e-05 0.000000000000e+00 -6.256472415778e-05 -1.620017952607e-11 8.500000000000e+00 6.385441563571e-05 0.000000000000e+00 -6.385439943503e-05 -1.620067952607e-11 9.000000000000e+00 6.492106450255e-05 0.000000000000e+00 -6.492104830137e-05 -1.620117952607e-11 9.500000000000e+00 6.579480590612e-05 0.000000000000e+00 -6.579478970444e-05 -1.620167952607e-11 1.000000000000e+01 6.650444517953e-05 0.000000000000e+00 -6.650442897735e-05 -1.620217952620e-11 1.050000000000e+01 6.707647022282e-05 0.000000000000e+00 -6.707645402014e-05 -1.620267954793e-11 1.100000000000e+01 6.753446330772e-05 0.000000000000e+00 -6.753444710454e-05 -1.620318074236e-11 1.150000000000e+01 6.789887902663e-05 0.000000000000e+00 -6.789886282292e-05 -1.620371033572e-11 1.200000000000e+01 6.818709693650e-05 0.000000000000e+00 -6.818708073188e-05 -1.620461719353e-11 1.250000000000e+01 6.841365029755e-05 0.000000000000e+00 -6.841363408885e-05 -1.620869494158e-11 1.300000000000e+01 6.859054730864e-05 0.000000000000e+00 -6.859053107719e-05 -1.623144818805e-11 1.350000000000e+01 6.872762134207e-05 0.000000000000e+00 -6.872760500477e-05 -1.633730025198e-11 1.400000000000e+01 6.883287792020e-05 0.000000000000e+00 -6.883286118153e-05 -1.673866144110e-11 1.450000000000e+01 6.891280748059e-05 0.000000000000e+00 -6.891278946387e-05 -1.801671579904e-11 1.500000000000e+01 6.897266288446e-05 0.000000000000e+00 -6.897264134680e-05 -2.153765982494e-11 1.550000000000e+01 6.901669648599e-05 0.000000000000e+00 -6.901666634943e-05 -3.013656004587e-11 1.600000000000e+01 6.904836021374e-05 0.000000000000e+00 -6.904831109424e-05 -4.911950674781e-11 1.650000000000e+01 6.907047335771e-05 0.000000000000e+00 -6.907038576025e-05 -8.759745887225e-11 1.700000000000e+01 6.908536289995e-05 0.000000000000e+00 -6.908520277868e-05 -1.601212635505e-10 1.750000000000e+01 6.909497884705e-05 0.000000000000e+00 -6.909469030020e-05 -2.885468450220e-10 1.800000000000e+01 6.910097885489e-05 0.000000000000e+00 -6.910047482464e-05 -5.040302491327e-10 1.850000000000e+01 6.910475899182e-05 0.000000000000e+00 -6.910390995320e-05 -8.490386250802e-10 1.900000000000e+01 6.910740966148e-05 0.000000000000e+00 -6.910603039490e-05 -1.379266576161e-09 1.950000000000e+01 6.910966497802e-05 0.000000000000e+00 -6.910749961650e-05 -2.165361521414e-09 2.000000000000e+01 6.911195909220e-05 0.000000000000e+00 -6.910866471628e-05 -3.294375916256e-09 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_cosym.standard0000644000265600020320000000753012264261473024177 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 7.09205409914013e-14 7.05542994562884e-14 2.16713376718507e-15 1258.925411794 7.09205409914047e-14 7.05542994562936e-14 2.16713376718439e-15 1584.893192461 7.0920540991396e-14 7.05542994562924e-14 2.16713376718387e-15 1995.262314969 7.09205409913865e-14 7.05542994562699e-14 2.16713376718422e-15 2511.88643151 7.09205409913558e-14 7.05542994562608e-14 2.1671337671831e-15 3162.277660168 7.09205409914011e-14 7.05542994562559e-14 2.16713376718359e-15 3981.071705535 7.09205409913496e-14 7.05542994562424e-14 2.1671337671828e-15 5011.872336273 7.09205409913429e-14 7.0554299456217e-14 2.16713376718162e-15 6309.573444802 7.09205409913226e-14 7.05542994561741e-14 2.16713376717989e-15 7943.282347243 7.09205409912703e-14 7.05542994560955e-14 2.1671337671769e-15 10000 7.09205409911785e-14 7.0554299455986e-14 2.16713376717393e-15 12589.25411794 7.09205409910634e-14 7.05542994558132e-14 2.16713376716669e-15 15848.93192461 7.09205409908638e-14 7.05542994555192e-14 2.16713376715676e-15 19952.62314969 7.0920540990541e-14 7.05542994550495e-14 2.16713376713955e-15 25118.8643151 7.09205409900252e-14 7.05542994542966e-14 2.1671337671134e-15 31622.77660168 7.09205409892369e-14 7.05542994531858e-14 2.16713376707236e-15 39810.71705535 7.09205409879915e-14 7.05542994513651e-14 2.1671337670061e-15 50118.72336273 7.09205409859762e-14 7.05542994485004e-14 2.16713376690186e-15 63095.73444802 7.0920540982822e-14 7.05542994439403e-14 2.16713376673645e-15 79432.82347243 7.09205409778259e-14 7.05542994367203e-14 2.16713376647362e-15 100000 7.09205409698835e-14 7.0554299425285e-14 2.16713376605985e-15 125892.5411794 7.09205409572962e-14 7.05542994071536e-14 2.16713376540185e-15 158489.3192461 7.092054093735e-14 7.05542993783966e-14 2.16713376435805e-15 199526.2314969 7.09205409057253e-14 7.05542993328313e-14 2.16713376270454e-15 251188.643151 7.09205408556371e-14 7.05542992606029e-14 2.16713376008416e-15 316227.7660168 7.09205407761934e-14 7.05542991461776e-14 2.16713375593149e-15 398107.1705535 7.0920540650338e-14 7.05542989647939e-14 2.16713374934945e-15 501187.2336273 7.09205404508311e-14 7.05542986773159e-14 2.16713373891788e-15 630957.3444802 7.09205401346781e-14 7.0554298221694e-14 2.16713372238521e-15 794328.2347243 7.09205396335824e-14 7.05542974995992e-14 2.16713369618186e-15 1000000 7.09205388394195e-14 7.05542963551543e-14 2.16713365465298e-15 1258925.411794 7.09205375807486e-14 7.05542945413382e-14 2.16713358883559e-15 1584893.192461 7.09205355858788e-14 7.05542916666041e-14 2.1671334845197e-15 1995262.314969 7.09205324242251e-14 7.05542871104533e-14 2.16713331919125e-15 2511886.43151 7.09205274133427e-14 7.05542798894554e-14 2.16713305716282e-15 3162277.660168 7.09205194716366e-14 7.05542684450059e-14 2.16713264187777e-15 3981071.705535 7.09205068849117e-14 7.05542503066751e-14 2.16713198369329e-15 5011872.336273 7.0920486936254e-14 7.05542215594469e-14 2.16713094054324e-15 6309573.444802 7.0920455319866e-14 7.055417599825e-14 2.16712928726444e-15 7943282.347243 7.0920405211383e-14 7.05541037887708e-14 2.1671266670009e-15 10000000 7.09203257950902e-14 7.05539893449349e-14 2.16712251417939e-15 12589254.11794 7.0920199929537e-14 7.05538079648019e-14 2.16711593244096e-15 15848931.92461 7.09200004480451e-14 7.05535204994998e-14 2.16710550119177e-15 19952623.14969 7.09196842961463e-14 7.0553064904839e-14 2.16708896903545e-15 25118864.3151 7.09191832416228e-14 7.05523428539114e-14 2.16706276798539e-15 31622776.60168 7.09183891550161e-14 7.05511985254296e-14 2.16702124375583e-15 39810717.05535 7.09171306910896e-14 7.05493850001531e-14 2.16695543639442e-15 50118723.36273 7.09151363575098e-14 7.05465110407015e-14 2.16685114907407e-15 63095734.44802 7.09119760473996e-14 7.05419568360814e-14 2.16668589072464e-15 79432823.47243 7.09069685378441e-14 7.05347407015019e-14 2.16642403896501e-15 100000000 7.0899035294403e-14 7.0523308401325e-14 2.16600919527377e-15 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Id1_vb0_jd.standard0000644000265600020320000024357112264261473024414 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 1.332694960189e-05 0.000000000000e+00 -1.332694960088e-05 -1.010000000000e-15 1.200000000000e+00 1.333310650935e-05 0.000000000000e+00 -1.333310650814e-05 -1.210000000000e-15 1.400000000000e+00 1.333864928892e-05 0.000000000000e+00 -1.333864928751e-05 -1.410000000000e-15 1.600000000000e+00 1.334377728226e-05 0.000000000000e+00 -1.334377728065e-05 -1.610000000000e-15 1.800000000000e+00 1.334860381645e-05 0.000000000000e+00 -1.334860381464e-05 -1.810000000000e-15 2.000000000000e+00 1.335319883675e-05 0.000000000000e+00 -1.335319883474e-05 -2.010000000000e-15 2.200000000000e+00 1.335760863357e-05 0.000000000000e+00 -1.335760863136e-05 -2.210000000000e-15 2.400000000000e+00 1.336186562365e-05 0.000000000000e+00 -1.336186562124e-05 -2.410000000000e-15 2.600000000000e+00 1.336599355566e-05 0.000000000000e+00 -1.336599355305e-05 -2.610000000000e-15 2.800000000000e+00 1.337001046645e-05 0.000000000000e+00 -1.337001046364e-05 -2.810000000000e-15 3.000000000000e+00 1.337393045827e-05 0.000000000000e+00 -1.337393045526e-05 -3.010000000000e-15 3.200000000000e+00 1.337776482116e-05 0.000000000000e+00 -1.337776481795e-05 -3.210000000000e-15 3.400000000000e+00 1.338152277209e-05 0.000000000000e+00 -1.338152276868e-05 -3.410000000000e-15 3.600000000000e+00 1.338521195969e-05 0.000000000000e+00 -1.338521195608e-05 -3.610000000000e-15 3.800000000000e+00 1.338883881966e-05 0.000000000000e+00 -1.338883881585e-05 -3.810000000000e-15 4.000000000000e+00 1.339240883186e-05 0.000000000000e+00 -1.339240882785e-05 -4.010000000000e-15 4.200000000000e+00 1.339592671050e-05 0.000000000000e+00 -1.339592670629e-05 -4.210000000000e-15 4.400000000000e+00 1.339939654784e-05 0.000000000000e+00 -1.339939654343e-05 -4.410000000000e-15 4.600000000000e+00 1.340282192458e-05 0.000000000000e+00 -1.340282191997e-05 -4.610000000000e-15 4.800000000000e+00 1.340620599599e-05 0.000000000000e+00 -1.340620599118e-05 -4.810000000000e-15 5.000000000000e+00 1.340955156012e-05 0.000000000000e+00 -1.340955155511e-05 -5.010000000000e-15 5.200000000000e+00 1.341286111245e-05 0.000000000000e+00 -1.341286110725e-05 -5.210000000000e-15 5.400000000000e+00 1.341613689010e-05 0.000000000000e+00 -1.341613688469e-05 -5.410000000000e-15 5.600000000000e+00 1.341938090803e-05 0.000000000000e+00 -1.341938090242e-05 -5.610000000000e-15 5.800000000000e+00 1.342259498896e-05 0.000000000000e+00 -1.342259498315e-05 -5.810000000000e-15 6.000000000000e+00 1.342578078819e-05 0.000000000000e+00 -1.342578078218e-05 -6.010000000000e-15 6.200000000000e+00 1.342893981452e-05 0.000000000000e+00 -1.342893980831e-05 -6.210000000000e-15 6.400000000000e+00 1.343207344780e-05 0.000000000000e+00 -1.343207344139e-05 -6.410000000000e-15 6.600000000000e+00 1.343518295395e-05 0.000000000000e+00 -1.343518294734e-05 -6.610000000000e-15 6.800000000000e+00 1.343826949774e-05 0.000000000000e+00 -1.343826949092e-05 -6.810000000000e-15 7.000000000000e+00 1.344133415376e-05 0.000000000000e+00 -1.344133414675e-05 -7.010000000000e-15 7.200000000000e+00 1.344437791597e-05 0.000000000000e+00 -1.344437790876e-05 -7.210000000000e-15 7.400000000000e+00 1.344740170591e-05 0.000000000000e+00 -1.344740169850e-05 -7.410000000000e-15 7.600000000000e+00 1.345040637991e-05 0.000000000000e+00 -1.345040637230e-05 -7.610000000000e-15 7.800000000000e+00 1.345339273537e-05 0.000000000000e+00 -1.345339272756e-05 -7.810000000000e-15 8.000000000000e+00 1.345636151631e-05 0.000000000000e+00 -1.345636150830e-05 -8.010000000000e-15 8.200000000000e+00 1.345931341823e-05 0.000000000000e+00 -1.345931341002e-05 -8.210000000000e-15 8.400000000000e+00 1.346224909245e-05 0.000000000000e+00 -1.346224908404e-05 -8.410000000000e-15 8.600000000000e+00 1.346516914993e-05 0.000000000000e+00 -1.346516914132e-05 -8.610000000000e-15 8.800000000000e+00 1.346807416469e-05 0.000000000000e+00 -1.346807415588e-05 -8.810000000000e-15 9.000000000000e+00 1.347096467689e-05 0.000000000000e+00 -1.347096466788e-05 -9.010000000000e-15 9.200000000000e+00 1.347384119554e-05 0.000000000000e+00 -1.347384118633e-05 -9.210000000000e-15 9.400000000000e+00 1.347670420094e-05 0.000000000000e+00 -1.347670419153e-05 -9.410000000000e-15 9.600000000000e+00 1.347955414695e-05 0.000000000000e+00 -1.347955413734e-05 -9.610000000000e-15 9.800000000000e+00 1.348239146295e-05 0.000000000000e+00 -1.348239145314e-05 -9.810000000000e-15 1.000000000000e+01 1.348521655564e-05 0.000000000000e+00 -1.348521654563e-05 -1.001000000000e-14 1.020000000000e+01 1.348802981070e-05 0.000000000000e+00 -1.348802980049e-05 -1.021000000000e-14 1.040000000000e+01 1.349083159429e-05 0.000000000000e+00 -1.349083158388e-05 -1.041000000000e-14 1.060000000000e+01 1.349362225439e-05 0.000000000000e+00 -1.349362224378e-05 -1.061000000000e-14 1.080000000000e+01 1.349640212202e-05 0.000000000000e+00 -1.349640211121e-05 -1.081000000000e-14 1.100000000000e+01 1.349917151242e-05 0.000000000000e+00 -1.349917150141e-05 -1.101000000000e-14 1.120000000000e+01 1.350193072604e-05 0.000000000000e+00 -1.350193071483e-05 -1.121000000000e-14 1.140000000000e+01 1.350468004954e-05 0.000000000000e+00 -1.350468003813e-05 -1.141000000000e-14 1.160000000000e+01 1.350741975659e-05 0.000000000000e+00 -1.350741974498e-05 -1.161000000000e-14 1.180000000000e+01 1.351015010875e-05 0.000000000000e+00 -1.351015009694e-05 -1.181000000000e-14 1.200000000000e+01 1.351287135616e-05 0.000000000000e+00 -1.351287134415e-05 -1.201000000000e-14 1.220000000000e+01 1.351558373826e-05 0.000000000000e+00 -1.351558372605e-05 -1.221000000000e-14 1.240000000000e+01 1.351828748439e-05 0.000000000000e+00 -1.351828747198e-05 -1.241000000000e-14 1.260000000000e+01 1.352098281437e-05 0.000000000000e+00 -1.352098280176e-05 -1.261000000000e-14 1.280000000000e+01 1.352366993910e-05 0.000000000000e+00 -1.352366992629e-05 -1.281000000000e-14 1.300000000000e+01 1.352634906099e-05 0.000000000000e+00 -1.352634904798e-05 -1.301000000000e-14 1.320000000000e+01 1.352902037447e-05 0.000000000000e+00 -1.352902036126e-05 -1.321000000000e-14 1.340000000000e+01 1.353168406641e-05 0.000000000000e+00 -1.353168405300e-05 -1.341000000000e-14 1.360000000000e+01 1.353434031652e-05 0.000000000000e+00 -1.353434030291e-05 -1.361000000000e-14 1.380000000000e+01 1.353698929775e-05 0.000000000000e+00 -1.353698928394e-05 -1.381000000000e-14 1.400000000000e+01 1.353963117662e-05 0.000000000000e+00 -1.353963116261e-05 -1.401000000000e-14 1.420000000000e+01 1.354226611355e-05 0.000000000000e+00 -1.354226609934e-05 -1.421000000000e-14 1.440000000000e+01 1.354489426319e-05 0.000000000000e+00 -1.354489424878e-05 -1.441000000000e-14 1.460000000000e+01 1.354751577465e-05 0.000000000000e+00 -1.354751576004e-05 -1.461000000000e-14 1.480000000000e+01 1.355013079186e-05 0.000000000000e+00 -1.355013077705e-05 -1.481000000000e-14 1.500000000000e+01 1.355273945374e-05 0.000000000000e+00 -1.355273943873e-05 -1.501000000000e-14 1.520000000000e+01 1.355534189448e-05 0.000000000000e+00 -1.355534187928e-05 -1.521000000000e-14 1.540000000000e+01 1.355793824376e-05 0.000000000000e+00 -1.355793822835e-05 -1.541000000000e-14 1.560000000000e+01 1.356052862693e-05 0.000000000000e+00 -1.356052861132e-05 -1.561000000000e-14 1.580000000000e+01 1.356311316526e-05 0.000000000000e+00 -1.356311314945e-05 -1.581000000000e-14 1.600000000000e+01 1.356569197608e-05 0.000000000000e+00 -1.356569196007e-05 -1.601000000000e-14 1.620000000000e+01 1.356826517296e-05 0.000000000000e+00 -1.356826515675e-05 -1.621000000000e-14 1.640000000000e+01 1.357083286591e-05 0.000000000000e+00 -1.357083284950e-05 -1.641000000000e-14 1.660000000000e+01 1.357339516150e-05 0.000000000000e+00 -1.357339514489e-05 -1.661000000000e-14 1.680000000000e+01 1.357595216302e-05 0.000000000000e+00 -1.357595214621e-05 -1.681000000000e-14 1.700000000000e+01 1.357850397063e-05 0.000000000000e+00 -1.357850395362e-05 -1.701000000000e-14 1.720000000000e+01 1.358105068146e-05 0.000000000000e+00 -1.358105066425e-05 -1.721000000000e-14 1.740000000000e+01 1.358359238978e-05 0.000000000000e+00 -1.358359237237e-05 -1.741000000000e-14 1.760000000000e+01 1.358612918707e-05 0.000000000000e+00 -1.358612916946e-05 -1.761000000000e-14 1.780000000000e+01 1.358866116218e-05 0.000000000000e+00 -1.358866114437e-05 -1.781000000000e-14 1.800000000000e+01 1.359118840140e-05 0.000000000000e+00 -1.359118838339e-05 -1.801000000000e-14 1.820000000000e+01 1.359371098857e-05 0.000000000000e+00 -1.359371097036e-05 -1.821000000000e-14 1.840000000000e+01 1.359622900519e-05 0.000000000000e+00 -1.359622898678e-05 -1.841000000000e-14 1.860000000000e+01 1.359874253049e-05 0.000000000000e+00 -1.359874251188e-05 -1.861000000000e-14 1.880000000000e+01 1.360125164154e-05 0.000000000000e+00 -1.360125162273e-05 -1.881000000000e-14 1.900000000000e+01 1.360375641331e-05 0.000000000000e+00 -1.360375639430e-05 -1.901000000000e-14 1.920000000000e+01 1.360625691875e-05 0.000000000000e+00 -1.360625689954e-05 -1.921000000000e-14 1.940000000000e+01 1.360875322890e-05 0.000000000000e+00 -1.360875320949e-05 -1.941000000000e-14 1.960000000000e+01 1.361124541289e-05 0.000000000000e+00 -1.361124539328e-05 -1.961000000000e-14 1.980000000000e+01 1.361373353810e-05 0.000000000000e+00 -1.361373351829e-05 -1.981000000000e-14 2.000000000000e+01 1.361621767014e-05 0.000000000000e+00 -1.361621765013e-05 -2.001000000000e-14 1.000000000000e+00 2.549780346303e-04 0.000000000000e+00 -2.549780346293e-04 -1.010000000000e-15 1.200000000000e+00 2.918149568493e-04 0.000000000000e+00 -2.918149568481e-04 -1.210000000000e-15 1.400000000000e+00 3.241310764439e-04 0.000000000000e+00 -3.241310764425e-04 -1.410000000000e-15 1.600000000000e+00 3.521300596755e-04 0.000000000000e+00 -3.521300596739e-04 -1.610000000000e-15 1.800000000000e+00 3.760679436702e-04 0.000000000000e+00 -3.760679436684e-04 -1.810000000000e-15 2.000000000000e+00 3.962455161448e-04 0.000000000000e+00 -3.962455161428e-04 -2.010000000000e-15 2.200000000000e+00 4.129979687568e-04 0.000000000000e+00 -4.129979687546e-04 -2.210000000000e-15 2.400000000000e+00 4.266823862225e-04 0.000000000000e+00 -4.266823862201e-04 -2.410000000000e-15 2.600000000000e+00 4.376642139188e-04 0.000000000000e+00 -4.376642139162e-04 -2.610000000000e-15 2.800000000000e+00 4.463042349121e-04 0.000000000000e+00 -4.463042349093e-04 -2.810000000000e-15 3.000000000000e+00 4.529475590679e-04 0.000000000000e+00 -4.529475590649e-04 -3.010000000000e-15 3.200000000000e+00 4.579156318718e-04 0.000000000000e+00 -4.579156318686e-04 -3.210000000000e-15 3.400000000000e+00 4.615015928028e-04 0.000000000000e+00 -4.615015927994e-04 -3.410000000000e-15 3.600000000000e+00 4.639688917167e-04 0.000000000000e+00 -4.639688917131e-04 -3.610000000000e-15 3.800000000000e+00 4.655532091348e-04 0.000000000000e+00 -4.655532091310e-04 -3.810000000000e-15 4.000000000000e+00 4.664686510154e-04 0.000000000000e+00 -4.664686510114e-04 -4.010000000000e-15 4.200000000000e+00 4.669206357826e-04 0.000000000000e+00 -4.669206357784e-04 -4.210000000000e-15 4.400000000000e+00 4.671177934099e-04 0.000000000000e+00 -4.671177934055e-04 -4.410000000000e-15 4.600000000000e+00 4.672277702192e-04 0.000000000000e+00 -4.672277702146e-04 -4.610000000000e-15 4.800000000000e+00 4.673179425690e-04 0.000000000000e+00 -4.673179425642e-04 -4.810000000000e-15 5.000000000000e+00 4.674017499635e-04 0.000000000000e+00 -4.674017499585e-04 -5.010000000000e-15 5.200000000000e+00 4.674814995534e-04 0.000000000000e+00 -4.674814995482e-04 -5.210000000000e-15 5.400000000000e+00 4.675578338545e-04 0.000000000000e+00 -4.675578338491e-04 -5.410000000000e-15 5.600000000000e+00 4.676311141558e-04 0.000000000000e+00 -4.676311141502e-04 -5.610000000000e-15 5.800000000000e+00 4.677016281794e-04 0.000000000000e+00 -4.677016281736e-04 -5.810000000000e-15 6.000000000000e+00 4.677696267183e-04 0.000000000000e+00 -4.677696267123e-04 -6.010000000000e-15 6.200000000000e+00 4.678353325968e-04 0.000000000000e+00 -4.678353325906e-04 -6.210000000000e-15 6.400000000000e+00 4.678989445531e-04 0.000000000000e+00 -4.678989445467e-04 -6.410000000000e-15 6.600000000000e+00 4.679606399938e-04 0.000000000000e+00 -4.679606399872e-04 -6.610000000000e-15 6.800000000000e+00 4.680205773638e-04 0.000000000000e+00 -4.680205773570e-04 -6.810000000000e-15 7.000000000000e+00 4.680788982769e-04 0.000000000000e+00 -4.680788982699e-04 -7.010000000000e-15 7.200000000000e+00 4.681357294359e-04 0.000000000000e+00 -4.681357294287e-04 -7.210000000000e-15 7.400000000000e+00 4.681911843534e-04 0.000000000000e+00 -4.681911843459e-04 -7.410000000000e-15 7.600000000000e+00 4.682453648841e-04 0.000000000000e+00 -4.682453648765e-04 -7.610000000000e-15 7.800000000000e+00 4.682983625822e-04 0.000000000000e+00 -4.682983625743e-04 -7.810000000000e-15 8.000000000000e+00 4.683502598978e-04 0.000000000000e+00 -4.683502598898e-04 -8.010000000000e-15 8.200000000000e+00 4.684011312308e-04 0.000000000000e+00 -4.684011312226e-04 -8.210000000000e-15 8.400000000000e+00 4.684510438552e-04 0.000000000000e+00 -4.684510438468e-04 -8.410000000000e-15 8.600000000000e+00 4.685000587296e-04 0.000000000000e+00 -4.685000587210e-04 -8.610000000000e-15 8.800000000000e+00 4.685482312082e-04 0.000000000000e+00 -4.685482311994e-04 -8.810000000000e-15 9.000000000000e+00 4.685956116637e-04 0.000000000000e+00 -4.685956116547e-04 -9.010000000000e-15 9.200000000000e+00 4.686422460336e-04 0.000000000000e+00 -4.686422460244e-04 -9.210000000000e-15 9.400000000000e+00 4.686881762992e-04 0.000000000000e+00 -4.686881762898e-04 -9.410000000000e-15 9.600000000000e+00 4.687334409068e-04 0.000000000000e+00 -4.687334408971e-04 -9.610000000000e-15 9.800000000000e+00 4.687780751379e-04 0.000000000000e+00 -4.687780751281e-04 -9.810000000000e-15 1.000000000000e+01 4.688221114354e-04 0.000000000000e+00 -4.688221114253e-04 -1.001000000000e-14 1.020000000000e+01 4.688655796904e-04 0.000000000000e+00 -4.688655796802e-04 -1.021000000000e-14 1.040000000000e+01 4.689085074971e-04 0.000000000000e+00 -4.689085074867e-04 -1.041000000000e-14 1.060000000000e+01 4.689509203764e-04 0.000000000000e+00 -4.689509203657e-04 -1.061000000000e-14 1.080000000000e+01 4.689928419755e-04 0.000000000000e+00 -4.689928419647e-04 -1.081000000000e-14 1.100000000000e+01 4.690342942448e-04 0.000000000000e+00 -4.690342942338e-04 -1.101000000000e-14 1.120000000000e+01 4.690752975945e-04 0.000000000000e+00 -4.690752975833e-04 -1.121000000000e-14 1.140000000000e+01 4.691158710348e-04 0.000000000000e+00 -4.691158710233e-04 -1.141000000000e-14 1.160000000000e+01 4.691560323009e-04 0.000000000000e+00 -4.691560322893e-04 -1.161000000000e-14 1.180000000000e+01 4.691957979648e-04 0.000000000000e+00 -4.691957979530e-04 -1.181000000000e-14 1.200000000000e+01 4.692351835350e-04 0.000000000000e+00 -4.692351835230e-04 -1.201000000000e-14 1.220000000000e+01 4.692742035466e-04 0.000000000000e+00 -4.692742035344e-04 -1.221000000000e-14 1.240000000000e+01 4.693128716417e-04 0.000000000000e+00 -4.693128716293e-04 -1.241000000000e-14 1.260000000000e+01 4.693512006422e-04 0.000000000000e+00 -4.693512006296e-04 -1.261000000000e-14 1.280000000000e+01 4.693892026154e-04 0.000000000000e+00 -4.693892026026e-04 -1.281000000000e-14 1.300000000000e+01 4.694268889328e-04 0.000000000000e+00 -4.694268889198e-04 -1.301000000000e-14 1.320000000000e+01 4.694642703241e-04 0.000000000000e+00 -4.694642703109e-04 -1.321000000000e-14 1.340000000000e+01 4.695013569256e-04 0.000000000000e+00 -4.695013569122e-04 -1.341000000000e-14 1.360000000000e+01 4.695381583241e-04 0.000000000000e+00 -4.695381583105e-04 -1.361000000000e-14 1.380000000000e+01 4.695746835972e-04 0.000000000000e+00 -4.695746835833e-04 -1.381000000000e-14 1.400000000000e+01 4.696109413496e-04 0.000000000000e+00 -4.696109413356e-04 -1.401000000000e-14 1.420000000000e+01 4.696469397469e-04 0.000000000000e+00 -4.696469397327e-04 -1.421000000000e-14 1.440000000000e+01 4.696826865451e-04 0.000000000000e+00 -4.696826865307e-04 -1.441000000000e-14 1.460000000000e+01 4.697181891192e-04 0.000000000000e+00 -4.697181891046e-04 -1.461000000000e-14 1.480000000000e+01 4.697534544886e-04 0.000000000000e+00 -4.697534544737e-04 -1.481000000000e-14 1.500000000000e+01 4.697884893399e-04 0.000000000000e+00 -4.697884893249e-04 -1.501000000000e-14 1.520000000000e+01 4.698233000491e-04 0.000000000000e+00 -4.698233000339e-04 -1.521000000000e-14 1.540000000000e+01 4.698578927010e-04 0.000000000000e+00 -4.698578926856e-04 -1.541000000000e-14 1.560000000000e+01 4.698922731074e-04 0.000000000000e+00 -4.698922730918e-04 -1.561000000000e-14 1.580000000000e+01 4.699264468238e-04 0.000000000000e+00 -4.699264468080e-04 -1.581000000000e-14 1.600000000000e+01 4.699604191653e-04 0.000000000000e+00 -4.699604191493e-04 -1.601000000000e-14 1.620000000000e+01 4.699941952204e-04 0.000000000000e+00 -4.699941952042e-04 -1.621000000000e-14 1.640000000000e+01 4.700277798646e-04 0.000000000000e+00 -4.700277798482e-04 -1.641000000000e-14 1.660000000000e+01 4.700611777727e-04 0.000000000000e+00 -4.700611777561e-04 -1.661000000000e-14 1.680000000000e+01 4.700943934299e-04 0.000000000000e+00 -4.700943934131e-04 -1.681000000000e-14 1.700000000000e+01 4.701274311427e-04 0.000000000000e+00 -4.701274311257e-04 -1.701000000000e-14 1.720000000000e+01 4.701602950486e-04 0.000000000000e+00 -4.701602950314e-04 -1.721000000000e-14 1.740000000000e+01 4.701929891254e-04 0.000000000000e+00 -4.701929891080e-04 -1.741000000000e-14 1.760000000000e+01 4.702255171995e-04 0.000000000000e+00 -4.702255171819e-04 -1.761000000000e-14 1.780000000000e+01 4.702578829541e-04 0.000000000000e+00 -4.702578829362e-04 -1.781000000000e-14 1.800000000000e+01 4.702900899364e-04 0.000000000000e+00 -4.702900899184e-04 -1.801000000000e-14 1.820000000000e+01 4.703221415650e-04 0.000000000000e+00 -4.703221415468e-04 -1.821000000000e-14 1.840000000000e+01 4.703540411357e-04 0.000000000000e+00 -4.703540411173e-04 -1.841000000000e-14 1.860000000000e+01 4.703857918282e-04 0.000000000000e+00 -4.703857918096e-04 -1.861000000000e-14 1.880000000000e+01 4.704173967115e-04 0.000000000000e+00 -4.704173966927e-04 -1.881000000000e-14 1.900000000000e+01 4.704488587495e-04 0.000000000000e+00 -4.704488587304e-04 -1.901000000000e-14 1.920000000000e+01 4.704801808054e-04 0.000000000000e+00 -4.704801807862e-04 -1.921000000000e-14 1.940000000000e+01 4.705113656475e-04 0.000000000000e+00 -4.705113656280e-04 -1.941000000000e-14 1.960000000000e+01 4.705424159523e-04 0.000000000000e+00 -4.705424159327e-04 -1.961000000000e-14 1.980000000000e+01 4.705733343100e-04 0.000000000000e+00 -4.705733342902e-04 -1.981000000000e-14 2.000000000000e+01 4.706041232275e-04 0.000000000000e+00 -4.706041232075e-04 -2.001000000000e-14 1.000000000000e+00 4.539191823284e-04 0.000000000000e+00 -4.539191823274e-04 -1.010000000000e-15 1.200000000000e+00 5.343557706960e-04 0.000000000000e+00 -5.343557706948e-04 -1.210000000000e-15 1.400000000000e+00 6.116673692629e-04 0.000000000000e+00 -6.116673692615e-04 -1.410000000000e-15 1.600000000000e+00 6.859822572900e-04 0.000000000000e+00 -6.859822572884e-04 -1.610000000000e-15 1.800000000000e+00 7.574231878852e-04 0.000000000000e+00 -7.574231878834e-04 -1.810000000000e-15 2.000000000000e+00 8.261074335878e-04 0.000000000000e+00 -8.261074335858e-04 -2.010000000000e-15 2.200000000000e+00 8.921468881352e-04 0.000000000000e+00 -8.921468881330e-04 -2.210000000000e-15 2.400000000000e+00 9.556482156231e-04 0.000000000000e+00 -9.556482156207e-04 -2.410000000000e-15 2.600000000000e+00 1.016712993731e-03 0.000000000000e+00 -1.016712993729e-03 -2.610000000000e-15 2.800000000000e+00 1.075437953653e-03 0.000000000000e+00 -1.075437953650e-03 -2.810000000000e-15 3.000000000000e+00 1.131915148763e-03 0.000000000000e+00 -1.131915148760e-03 -3.010000000000e-15 3.200000000000e+00 1.186232177036e-03 0.000000000000e+00 -1.186232177033e-03 -3.210000000000e-15 3.400000000000e+00 1.238472396206e-03 0.000000000000e+00 -1.238472396203e-03 -3.410000000000e-15 3.600000000000e+00 1.288715138677e-03 0.000000000000e+00 -1.288715138673e-03 -3.610000000000e-15 3.800000000000e+00 1.337035923691e-03 0.000000000000e+00 -1.337035923687e-03 -3.810000000000e-15 4.000000000000e+00 1.383506664911e-03 0.000000000000e+00 -1.383506664907e-03 -4.010000000000e-15 4.200000000000e+00 1.428195872049e-03 0.000000000000e+00 -1.428195872045e-03 -4.210000000000e-15 4.400000000000e+00 1.471168845592e-03 0.000000000000e+00 -1.471168845588e-03 -4.410000000000e-15 4.600000000000e+00 1.512487863982e-03 0.000000000000e+00 -1.512487863977e-03 -4.610000000000e-15 4.800000000000e+00 1.552212362828e-03 0.000000000000e+00 -1.552212362823e-03 -4.810000000000e-15 5.000000000000e+00 1.590399105941e-03 0.000000000000e+00 -1.590399105936e-03 -5.010000000000e-15 5.200000000000e+00 1.627102348102e-03 0.000000000000e+00 -1.627102348097e-03 -5.210000000000e-15 5.400000000000e+00 1.662373989581e-03 0.000000000000e+00 -1.662373989576e-03 -5.410000000000e-15 5.600000000000e+00 1.696263722520e-03 0.000000000000e+00 -1.696263722514e-03 -5.610000000000e-15 5.800000000000e+00 1.728819169325e-03 0.000000000000e+00 -1.728819169320e-03 -5.810000000000e-15 6.000000000000e+00 1.760086013279e-03 0.000000000000e+00 -1.760086013273e-03 -6.010000000000e-15 6.200000000000e+00 1.790108121574e-03 0.000000000000e+00 -1.790108121567e-03 -6.210000000000e-15 6.400000000000e+00 1.818927661030e-03 0.000000000000e+00 -1.818927661023e-03 -6.410000000000e-15 6.600000000000e+00 1.846585206725e-03 0.000000000000e+00 -1.846585206718e-03 -6.610000000000e-15 6.800000000000e+00 1.873119843797e-03 0.000000000000e+00 -1.873119843790e-03 -6.810000000000e-15 7.000000000000e+00 1.898569262657e-03 0.000000000000e+00 -1.898569262650e-03 -7.010000000000e-15 7.200000000000e+00 1.922969847867e-03 0.000000000000e+00 -1.922969847859e-03 -7.210000000000e-15 7.400000000000e+00 1.946356760899e-03 0.000000000000e+00 -1.946356760892e-03 -7.410000000000e-15 7.600000000000e+00 1.968764017031e-03 0.000000000000e+00 -1.968764017024e-03 -7.610000000000e-15 7.800000000000e+00 1.990224556564e-03 0.000000000000e+00 -1.990224556556e-03 -7.810000000000e-15 8.000000000000e+00 2.010770310597e-03 0.000000000000e+00 -2.010770310589e-03 -8.010000000000e-15 8.200000000000e+00 2.030432261555e-03 0.000000000000e+00 -2.030432261547e-03 -8.210000000000e-15 8.400000000000e+00 2.049240498654e-03 0.000000000000e+00 -2.049240498646e-03 -8.410000000000e-15 8.600000000000e+00 2.067224268512e-03 0.000000000000e+00 -2.067224268504e-03 -8.610000000000e-15 8.800000000000e+00 2.084412021076e-03 0.000000000000e+00 -2.084412021067e-03 -8.810000000000e-15 9.000000000000e+00 2.100831451055e-03 0.000000000000e+00 -2.100831451046e-03 -9.010000000000e-15 9.200000000000e+00 2.116509535048e-03 0.000000000000e+00 -2.116509535039e-03 -9.210000000000e-15 9.400000000000e+00 2.131472564552e-03 0.000000000000e+00 -2.131472564543e-03 -9.410000000000e-15 9.600000000000e+00 2.145746175036e-03 0.000000000000e+00 -2.145746175026e-03 -9.610000000000e-15 9.800000000000e+00 2.159355371294e-03 0.000000000000e+00 -2.159355371284e-03 -9.810000000000e-15 1.000000000000e+01 2.172324549283e-03 0.000000000000e+00 -2.172324549273e-03 -1.001000000000e-14 1.020000000000e+01 2.184677514659e-03 0.000000000000e+00 -2.184677514649e-03 -1.021000000000e-14 1.040000000000e+01 2.196437498263e-03 0.000000000000e+00 -2.196437498252e-03 -1.041000000000e-14 1.060000000000e+01 2.207627168785e-03 0.000000000000e+00 -2.207627168774e-03 -1.061000000000e-14 1.080000000000e+01 2.218268642882e-03 0.000000000000e+00 -2.218268642871e-03 -1.081000000000e-14 1.100000000000e+01 2.228383493015e-03 0.000000000000e+00 -2.228383493004e-03 -1.101000000000e-14 1.120000000000e+01 2.237992753280e-03 0.000000000000e+00 -2.237992753269e-03 -1.121000000000e-14 1.140000000000e+01 2.247116923538e-03 0.000000000000e+00 -2.247116923526e-03 -1.141000000000e-14 1.160000000000e+01 2.255775972121e-03 0.000000000000e+00 -2.255775972109e-03 -1.161000000000e-14 1.180000000000e+01 2.263989337414e-03 0.000000000000e+00 -2.263989337402e-03 -1.181000000000e-14 1.200000000000e+01 2.271775928597e-03 0.000000000000e+00 -2.271775928585e-03 -1.201000000000e-14 1.220000000000e+01 2.279154125829e-03 0.000000000000e+00 -2.279154125816e-03 -1.221000000000e-14 1.240000000000e+01 2.286141780131e-03 0.000000000000e+00 -2.286141780118e-03 -1.241000000000e-14 1.260000000000e+01 2.292756213222e-03 0.000000000000e+00 -2.292756213210e-03 -1.261000000000e-14 1.280000000000e+01 2.299014217530e-03 0.000000000000e+00 -2.299014217518e-03 -1.281000000000e-14 1.300000000000e+01 2.304932056572e-03 0.000000000000e+00 -2.304932056559e-03 -1.301000000000e-14 1.320000000000e+01 2.310525465881e-03 0.000000000000e+00 -2.310525465868e-03 -1.321000000000e-14 1.340000000000e+01 2.315809654632e-03 0.000000000000e+00 -2.315809654618e-03 -1.341000000000e-14 1.360000000000e+01 2.320799308055e-03 0.000000000000e+00 -2.320799308042e-03 -1.361000000000e-14 1.380000000000e+01 2.325508590758e-03 0.000000000000e+00 -2.325508590744e-03 -1.381000000000e-14 1.400000000000e+01 2.329951150978e-03 0.000000000000e+00 -2.329951150964e-03 -1.401000000000e-14 1.420000000000e+01 2.334140125824e-03 0.000000000000e+00 -2.334140125810e-03 -1.421000000000e-14 1.440000000000e+01 2.338088147496e-03 0.000000000000e+00 -2.338088147481e-03 -1.441000000000e-14 1.460000000000e+01 2.341807350478e-03 0.000000000000e+00 -2.341807350463e-03 -1.461000000000e-14 1.480000000000e+01 2.345309379665e-03 0.000000000000e+00 -2.345309379650e-03 -1.481000000000e-14 1.500000000000e+01 2.348605399375e-03 0.000000000000e+00 -2.348605399360e-03 -1.501000000000e-14 1.520000000000e+01 2.351706103188e-03 0.000000000000e+00 -2.351706103173e-03 -1.521000000000e-14 1.540000000000e+01 2.354621724531e-03 0.000000000000e+00 -2.354621724515e-03 -1.541000000000e-14 1.560000000000e+01 2.357362047938e-03 0.000000000000e+00 -2.357362047922e-03 -1.561000000000e-14 1.580000000000e+01 2.359936420901e-03 0.000000000000e+00 -2.359936420886e-03 -1.581000000000e-14 1.600000000000e+01 2.362353766220e-03 0.000000000000e+00 -2.362353766204e-03 -1.601000000000e-14 1.620000000000e+01 2.364622594765e-03 0.000000000000e+00 -2.364622594749e-03 -1.621000000000e-14 1.640000000000e+01 2.366751018586e-03 0.000000000000e+00 -2.366751018569e-03 -1.641000000000e-14 1.660000000000e+01 2.368746764250e-03 0.000000000000e+00 -2.368746764234e-03 -1.661000000000e-14 1.680000000000e+01 2.370617186375e-03 0.000000000000e+00 -2.370617186358e-03 -1.681000000000e-14 1.700000000000e+01 2.372369281244e-03 0.000000000000e+00 -2.372369281227e-03 -1.701000000000e-14 1.720000000000e+01 2.374009700466e-03 0.000000000000e+00 -2.374009700449e-03 -1.721000000000e-14 1.740000000000e+01 2.375544764609e-03 0.000000000000e+00 -2.375544764591e-03 -1.741000000000e-14 1.760000000000e+01 2.376980476741e-03 0.000000000000e+00 -2.376980476723e-03 -1.761000000000e-14 1.780000000000e+01 2.378322535858e-03 0.000000000000e+00 -2.378322535840e-03 -1.781000000000e-14 1.800000000000e+01 2.379576350133e-03 0.000000000000e+00 -2.379576350115e-03 -1.801000000000e-14 1.820000000000e+01 2.380747049963e-03 0.000000000000e+00 -2.380747049945e-03 -1.821000000000e-14 1.840000000000e+01 2.381839500787e-03 0.000000000000e+00 -2.381839500768e-03 -1.841000000000e-14 1.860000000000e+01 2.382858315651e-03 0.000000000000e+00 -2.382858315632e-03 -1.861000000000e-14 1.880000000000e+01 2.383807867510e-03 0.000000000000e+00 -2.383807867491e-03 -1.881000000000e-14 1.900000000000e+01 2.384692301255e-03 0.000000000000e+00 -2.384692301236e-03 -1.901000000000e-14 1.920000000000e+01 2.385515545469e-03 0.000000000000e+00 -2.385515545449e-03 -1.921000000000e-14 1.940000000000e+01 2.386281323912e-03 0.000000000000e+00 -2.386281323892e-03 -1.941000000000e-14 1.960000000000e+01 2.386993166765e-03 0.000000000000e+00 -2.386993166745e-03 -1.961000000000e-14 1.980000000000e+01 2.387654421636e-03 0.000000000000e+00 -2.387654421617e-03 -1.981000000000e-14 2.000000000000e+01 2.388268264380e-03 0.000000000000e+00 -2.388268264360e-03 -2.001000000000e-14 1.000000000000e+00 9.452184749736e-06 0.000000000000e+00 -9.452184748736e-06 -1.000000000751e-15 1.200000000000e+00 9.456972778271e-06 0.000000000000e+00 -9.456972777071e-06 -1.200000000751e-15 1.400000000000e+00 9.461346405596e-06 0.000000000000e+00 -9.461346404195e-06 -1.400000000751e-15 1.600000000000e+00 9.465439770743e-06 0.000000000000e+00 -9.465439769143e-06 -1.600000000751e-15 1.800000000000e+00 9.469328627114e-06 0.000000000000e+00 -9.469328625313e-06 -1.800000000751e-15 2.000000000000e+00 9.473059616495e-06 0.000000000000e+00 -9.473059614495e-06 -2.000000000751e-15 2.200000000000e+00 9.476663629788e-06 0.000000000000e+00 -9.476663627588e-06 -2.200000000751e-15 2.400000000000e+00 9.480162358613e-06 0.000000000000e+00 -9.480162356213e-06 -2.400000000751e-15 2.600000000000e+00 9.483571755224e-06 0.000000000000e+00 -9.483571752625e-06 -2.600000000751e-15 2.800000000000e+00 9.486903987713e-06 0.000000000000e+00 -9.486903984913e-06 -2.800000000751e-15 3.000000000000e+00 9.490168612354e-06 0.000000000000e+00 -9.490168609355e-06 -3.000000000751e-15 3.200000000000e+00 9.493373313291e-06 0.000000000000e+00 -9.493373310091e-06 -3.200000000751e-15 3.400000000000e+00 9.496524389953e-06 0.000000000000e+00 -9.496524386553e-06 -3.400000000751e-15 3.600000000000e+00 9.499627090374e-06 0.000000000000e+00 -9.499627086774e-06 -3.600000000751e-15 3.800000000000e+00 9.502685846445e-06 0.000000000000e+00 -9.502685842645e-06 -3.800000000751e-15 4.000000000000e+00 9.505704444505e-06 0.000000000000e+00 -9.505704440505e-06 -4.000000000751e-15 4.200000000000e+00 9.508686151976e-06 0.000000000000e+00 -9.508686147776e-06 -4.200000000751e-15 4.400000000000e+00 9.511633813278e-06 0.000000000000e+00 -9.511633808878e-06 -4.400000000751e-15 4.600000000000e+00 9.514549923770e-06 0.000000000000e+00 -9.514549919171e-06 -4.600000000751e-15 4.800000000000e+00 9.517436687661e-06 0.000000000000e+00 -9.517436682861e-06 -4.800000000751e-15 5.000000000000e+00 9.520296063951e-06 0.000000000000e+00 -9.520296058951e-06 -5.000000000751e-15 5.200000000000e+00 9.523129803377e-06 0.000000000000e+00 -9.523129798177e-06 -5.200000000751e-15 5.400000000000e+00 9.525939478404e-06 0.000000000000e+00 -9.525939473005e-06 -5.400000000751e-15 5.600000000000e+00 9.528726507842e-06 0.000000000000e+00 -9.528726502242e-06 -5.600000000751e-15 5.800000000000e+00 9.531492177209e-06 0.000000000000e+00 -9.531492171410e-06 -5.800000000751e-15 6.000000000000e+00 9.534237655743e-06 0.000000000000e+00 -9.534237649743e-06 -6.000000000751e-15 6.200000000000e+00 9.536964010678e-06 0.000000000000e+00 -9.536964004479e-06 -6.200000000751e-15 6.400000000000e+00 9.539672219347e-06 0.000000000000e+00 -9.539672212947e-06 -6.400000000751e-15 6.600000000000e+00 9.542363179478e-06 0.000000000000e+00 -9.542363172878e-06 -6.600000000751e-15 6.800000000000e+00 9.545037718019e-06 0.000000000000e+00 -9.545037711219e-06 -6.800000000751e-15 7.000000000000e+00 9.547696598733e-06 0.000000000000e+00 -9.547696591734e-06 -7.000000000751e-15 7.200000000000e+00 9.550340528782e-06 0.000000000000e+00 -9.550340521582e-06 -7.200000000751e-15 7.400000000000e+00 9.552970164433e-06 0.000000000000e+00 -9.552970157033e-06 -7.400000000751e-15 7.600000000000e+00 9.555586116061e-06 0.000000000000e+00 -9.555586108461e-06 -7.600000000751e-15 7.800000000000e+00 9.558188952525e-06 0.000000000000e+00 -9.558188944724e-06 -7.800000000751e-15 8.000000000000e+00 9.560779205021e-06 0.000000000000e+00 -9.560779197021e-06 -8.000000000751e-15 8.200000000000e+00 9.563357370489e-06 0.000000000000e+00 -9.563357362289e-06 -8.200000000751e-15 8.400000000000e+00 9.565923914631e-06 0.000000000000e+00 -9.565923906231e-06 -8.400000000751e-15 8.600000000000e+00 9.568479274591e-06 0.000000000000e+00 -9.568479265991e-06 -8.600000000751e-15 8.800000000000e+00 9.571023861354e-06 0.000000000000e+00 -9.571023852553e-06 -8.800000000751e-15 9.000000000000e+00 9.573558061884e-06 0.000000000000e+00 -9.573558052883e-06 -9.000000000751e-15 9.200000000000e+00 9.576082241046e-06 0.000000000000e+00 -9.576082231847e-06 -9.200000000751e-15 9.400000000000e+00 9.578596743339e-06 0.000000000000e+00 -9.578596733938e-06 -9.400000000751e-15 9.600000000000e+00 9.581101894438e-06 0.000000000000e+00 -9.581101884837e-06 -9.600000000751e-15 9.800000000000e+00 9.583598002620e-06 0.000000000000e+00 -9.583597992819e-06 -9.800000000751e-15 1.000000000000e+01 9.586085360026e-06 0.000000000000e+00 -9.586085350025e-06 -1.000000000075e-14 1.020000000000e+01 9.588564243822e-06 0.000000000000e+00 -9.588564233623e-06 -1.020000000075e-14 1.040000000000e+01 9.591034917258e-06 0.000000000000e+00 -9.591034906859e-06 -1.040000000075e-14 1.060000000000e+01 9.593497630614e-06 0.000000000000e+00 -9.593497620014e-06 -1.060000000075e-14 1.080000000000e+01 9.595952622083e-06 0.000000000000e+00 -9.595952611283e-06 -1.080000000075e-14 1.100000000000e+01 9.598400118576e-06 0.000000000000e+00 -9.598400107576e-06 -1.100000000075e-14 1.120000000000e+01 9.600840336448e-06 0.000000000000e+00 -9.600840325248e-06 -1.120000000075e-14 1.140000000000e+01 9.603273482177e-06 0.000000000000e+00 -9.603273470778e-06 -1.140000000075e-14 1.160000000000e+01 9.605699752984e-06 0.000000000000e+00 -9.605699741384e-06 -1.160000000075e-14 1.180000000000e+01 9.608119337396e-06 0.000000000000e+00 -9.608119325596e-06 -1.180000000075e-14 1.200000000000e+01 9.610532415783e-06 0.000000000000e+00 -9.610532403783e-06 -1.200000000075e-14 1.220000000000e+01 9.612939160834e-06 0.000000000000e+00 -9.612939148634e-06 -1.220000000075e-14 1.240000000000e+01 9.615339738013e-06 0.000000000000e+00 -9.615339725613e-06 -1.240000000075e-14 1.260000000000e+01 9.617734305971e-06 0.000000000000e+00 -9.617734293371e-06 -1.260000000075e-14 1.280000000000e+01 9.620123016933e-06 0.000000000000e+00 -9.620123004131e-06 -1.280000000075e-14 1.300000000000e+01 9.622506017052e-06 0.000000000000e+00 -9.622506004052e-06 -1.300000000075e-14 1.320000000000e+01 9.624883446755e-06 0.000000000000e+00 -9.624883433554e-06 -1.320000000075e-14 1.340000000000e+01 9.627255441034e-06 0.000000000000e+00 -9.627255427633e-06 -1.340000000075e-14 1.360000000000e+01 9.629622129747e-06 0.000000000000e+00 -9.629622116147e-06 -1.360000000075e-14 1.380000000000e+01 9.631983637888e-06 0.000000000000e+00 -9.631983624087e-06 -1.380000000075e-14 1.400000000000e+01 9.634340085826e-06 0.000000000000e+00 -9.634340071826e-06 -1.400000000075e-14 1.420000000000e+01 9.636691589558e-06 0.000000000000e+00 -9.636691575357e-06 -1.420000000075e-14 1.440000000000e+01 9.639038260908e-06 0.000000000000e+00 -9.639038246507e-06 -1.440000000075e-14 1.460000000000e+01 9.641380207751e-06 0.000000000000e+00 -9.641380193150e-06 -1.460000000075e-14 1.480000000000e+01 9.643717534196e-06 0.000000000000e+00 -9.643717519395e-06 -1.480000000075e-14 1.500000000000e+01 9.646050340769e-06 0.000000000000e+00 -9.646050325769e-06 -1.500000000075e-14 1.520000000000e+01 9.648378724585e-06 0.000000000000e+00 -9.648378709384e-06 -1.520000000075e-14 1.540000000000e+01 9.650702779501e-06 0.000000000000e+00 -9.650702764101e-06 -1.540000000075e-14 1.560000000000e+01 9.653022596278e-06 0.000000000000e+00 -9.653022580678e-06 -1.560000000075e-14 1.580000000000e+01 9.655338262709e-06 0.000000000000e+00 -9.655338246910e-06 -1.580000000075e-14 1.600000000000e+01 9.657649863763e-06 0.000000000000e+00 -9.657649847764e-06 -1.600000000075e-14 1.620000000000e+01 9.659957481705e-06 0.000000000000e+00 -9.659957465505e-06 -1.620000000075e-14 1.640000000000e+01 9.662261196214e-06 0.000000000000e+00 -9.662261179814e-06 -1.640000000075e-14 1.660000000000e+01 9.664561084499e-06 0.000000000000e+00 -9.664561067899e-06 -1.660000000075e-14 1.680000000000e+01 9.666857221404e-06 0.000000000000e+00 -9.666857204603e-06 -1.680000000075e-14 1.700000000000e+01 9.669149679502e-06 0.000000000000e+00 -9.669149662502e-06 -1.700000000075e-14 1.720000000000e+01 9.671438529200e-06 0.000000000000e+00 -9.671438511999e-06 -1.720000000075e-14 1.740000000000e+01 9.673723838817e-06 0.000000000000e+00 -9.673723821417e-06 -1.740000000075e-14 1.760000000000e+01 9.676005674681e-06 0.000000000000e+00 -9.676005657082e-06 -1.760000000075e-14 1.780000000000e+01 9.678284101202e-06 0.000000000000e+00 -9.678284083401e-06 -1.780000000075e-14 1.800000000000e+01 9.680559180945e-06 0.000000000000e+00 -9.680559162945e-06 -1.800000000075e-14 1.820000000000e+01 9.682830974715e-06 0.000000000000e+00 -9.682830956514e-06 -1.820000000075e-14 1.840000000000e+01 9.685099541613e-06 0.000000000000e+00 -9.685099523212e-06 -1.840000000075e-14 1.860000000000e+01 9.687364939108e-06 0.000000000000e+00 -9.687364920508e-06 -1.860000000075e-14 1.880000000000e+01 9.689627223102e-06 0.000000000000e+00 -9.689627204302e-06 -1.880000000075e-14 1.900000000000e+01 9.691886447981e-06 0.000000000000e+00 -9.691886428981e-06 -1.900000000075e-14 1.920000000000e+01 9.694142666677e-06 0.000000000000e+00 -9.694142647478e-06 -1.920000000075e-14 1.940000000000e+01 9.696395930725e-06 0.000000000000e+00 -9.696395911324e-06 -1.940000000075e-14 1.960000000000e+01 9.698646290302e-06 0.000000000000e+00 -9.698646270702e-06 -1.960000000075e-14 1.980000000000e+01 9.700893794291e-06 0.000000000000e+00 -9.700893774491e-06 -1.980000000075e-14 2.000000000000e+01 9.703138490318e-06 0.000000000000e+00 -9.703138470317e-06 -2.000000000075e-14 1.000000000000e+00 3.292868355259e-04 0.000000000000e+00 -3.292868355249e-04 -1.000000000751e-15 1.200000000000e+00 3.783278346879e-04 0.000000000000e+00 -3.783278346867e-04 -1.200000000751e-15 1.400000000000e+00 4.219006325125e-04 0.000000000000e+00 -4.219006325111e-04 -1.400000000751e-15 1.600000000000e+00 4.601724460436e-04 0.000000000000e+00 -4.601724460420e-04 -1.600000000751e-15 1.800000000000e+00 4.933664316019e-04 0.000000000000e+00 -4.933664316001e-04 -1.800000000751e-15 2.000000000000e+00 5.217608887880e-04 0.000000000000e+00 -5.217608887860e-04 -2.000000000751e-15 2.200000000000e+00 5.456851823299e-04 0.000000000000e+00 -5.456851823277e-04 -2.200000000751e-15 2.400000000000e+00 5.655113476646e-04 0.000000000000e+00 -5.655113476622e-04 -2.400000000751e-15 2.600000000000e+00 5.816412891941e-04 0.000000000000e+00 -5.816412891915e-04 -2.600000000751e-15 2.800000000000e+00 5.944910143185e-04 0.000000000000e+00 -5.944910143157e-04 -2.800000000751e-15 3.000000000000e+00 6.044748170668e-04 0.000000000000e+00 -6.044748170638e-04 -3.000000000751e-15 3.200000000000e+00 6.119925875088e-04 0.000000000000e+00 -6.119925875056e-04 -3.200000000751e-15 3.400000000000e+00 6.174220609796e-04 0.000000000000e+00 -6.174220609762e-04 -3.400000000751e-15 3.600000000000e+00 6.211161183359e-04 0.000000000000e+00 -6.211161183323e-04 -3.600000000751e-15 3.800000000000e+00 6.234053897393e-04 0.000000000000e+00 -6.234053897355e-04 -3.800000000751e-15 4.000000000000e+00 6.246111307275e-04 0.000000000000e+00 -6.246111307235e-04 -4.000000000751e-15 4.200000000000e+00 6.250895552418e-04 0.000000000000e+00 -6.250895552376e-04 -4.200000000751e-15 4.400000000000e+00 6.252718060051e-04 0.000000000000e+00 -6.252718060007e-04 -4.400000000751e-15 4.600000000000e+00 6.254088554988e-04 0.000000000000e+00 -6.254088554942e-04 -4.600000000751e-15 4.800000000000e+00 6.255367703937e-04 0.000000000000e+00 -6.255367703889e-04 -4.800000000751e-15 5.000000000000e+00 6.256581260962e-04 0.000000000000e+00 -6.256581260912e-04 -5.000000000751e-15 5.200000000000e+00 6.257736311401e-04 0.000000000000e+00 -6.257736311349e-04 -5.200000000751e-15 5.400000000000e+00 6.258838380190e-04 0.000000000000e+00 -6.258838380136e-04 -5.400000000751e-15 5.600000000000e+00 6.259892397094e-04 0.000000000000e+00 -6.259892397038e-04 -5.600000000751e-15 5.800000000000e+00 6.260902797347e-04 0.000000000000e+00 -6.260902797289e-04 -5.800000000751e-15 6.000000000000e+00 6.261873564468e-04 0.000000000000e+00 -6.261873564408e-04 -6.000000000751e-15 6.200000000000e+00 6.262808268613e-04 0.000000000000e+00 -6.262808268551e-04 -6.200000000751e-15 6.400000000000e+00 6.263710104341e-04 0.000000000000e+00 -6.263710104277e-04 -6.400000000751e-15 6.600000000000e+00 6.264581927398e-04 0.000000000000e+00 -6.264581927332e-04 -6.600000000751e-15 6.800000000000e+00 6.265426289756e-04 0.000000000000e+00 -6.265426289688e-04 -6.800000000751e-15 7.000000000000e+00 6.266245472338e-04 0.000000000000e+00 -6.266245472268e-04 -7.000000000751e-15 7.200000000000e+00 6.267041515067e-04 0.000000000000e+00 -6.267041514995e-04 -7.200000000751e-15 7.400000000000e+00 6.267816244131e-04 0.000000000000e+00 -6.267816244057e-04 -7.400000000751e-15 7.600000000000e+00 6.268571296463e-04 0.000000000000e+00 -6.268571296387e-04 -7.600000000751e-15 7.800000000000e+00 6.269308141571e-04 0.000000000000e+00 -6.269308141493e-04 -7.800000000751e-15 8.000000000000e+00 6.270028100884e-04 0.000000000000e+00 -6.270028100804e-04 -8.000000000751e-15 8.200000000000e+00 6.270732364846e-04 0.000000000000e+00 -6.270732364764e-04 -8.200000000751e-15 8.400000000000e+00 6.271422007955e-04 0.000000000000e+00 -6.271422007871e-04 -8.400000000751e-15 8.600000000000e+00 6.272098001998e-04 0.000000000000e+00 -6.272098001912e-04 -8.600000000751e-15 8.800000000000e+00 6.272761227653e-04 0.000000000000e+00 -6.272761227565e-04 -8.800000000751e-15 9.000000000000e+00 6.273412484682e-04 0.000000000000e+00 -6.273412484592e-04 -9.000000000751e-15 9.200000000000e+00 6.274052500872e-04 0.000000000000e+00 -6.274052500780e-04 -9.200000000751e-15 9.400000000000e+00 6.274681939881e-04 0.000000000000e+00 -6.274681939787e-04 -9.400000000751e-15 9.600000000000e+00 6.275301408133e-04 0.000000000000e+00 -6.275301408037e-04 -9.600000000751e-15 9.800000000000e+00 6.275911460879e-04 0.000000000000e+00 -6.275911460781e-04 -9.800000000751e-15 1.000000000000e+01 6.276512607533e-04 0.000000000000e+00 -6.276512607433e-04 -1.000000000075e-14 1.020000000000e+01 6.277105316374e-04 0.000000000000e+00 -6.277105316272e-04 -1.020000000075e-14 1.040000000000e+01 6.277690018698e-04 0.000000000000e+00 -6.277690018594e-04 -1.040000000075e-14 1.060000000000e+01 6.278267112484e-04 0.000000000000e+00 -6.278267112378e-04 -1.060000000075e-14 1.080000000000e+01 6.278836965646e-04 0.000000000000e+00 -6.278836965538e-04 -1.080000000075e-14 1.100000000000e+01 6.279399918912e-04 0.000000000000e+00 -6.279399918802e-04 -1.100000000075e-14 1.120000000000e+01 6.279956288383e-04 0.000000000000e+00 -6.279956288271e-04 -1.120000000075e-14 1.140000000000e+01 6.280506367811e-04 0.000000000000e+00 -6.280506367697e-04 -1.140000000075e-14 1.160000000000e+01 6.281050430629e-04 0.000000000000e+00 -6.281050430513e-04 -1.160000000075e-14 1.180000000000e+01 6.281588731762e-04 0.000000000000e+00 -6.281588731644e-04 -1.180000000075e-14 1.200000000000e+01 6.282121509251e-04 0.000000000000e+00 -6.282121509131e-04 -1.200000000075e-14 1.220000000000e+01 6.282648985705e-04 0.000000000000e+00 -6.282648985583e-04 -1.220000000075e-14 1.240000000000e+01 6.283171369604e-04 0.000000000000e+00 -6.283171369480e-04 -1.240000000075e-14 1.260000000000e+01 6.283688856474e-04 0.000000000000e+00 -6.283688856348e-04 -1.260000000075e-14 1.280000000000e+01 6.284201629939e-04 0.000000000000e+00 -6.284201629811e-04 -1.280000000075e-14 1.300000000000e+01 6.284709862680e-04 0.000000000000e+00 -6.284709862550e-04 -1.300000000075e-14 1.320000000000e+01 6.285213717288e-04 0.000000000000e+00 -6.285213717156e-04 -1.320000000075e-14 1.340000000000e+01 6.285713347053e-04 0.000000000000e+00 -6.285713346919e-04 -1.340000000075e-14 1.360000000000e+01 6.286208896661e-04 0.000000000000e+00 -6.286208896525e-04 -1.360000000075e-14 1.380000000000e+01 6.286700502842e-04 0.000000000000e+00 -6.286700502704e-04 -1.380000000075e-14 1.400000000000e+01 6.287188294952e-04 0.000000000000e+00 -6.287188294812e-04 -1.400000000075e-14 1.420000000000e+01 6.287672395502e-04 0.000000000000e+00 -6.287672395360e-04 -1.420000000075e-14 1.440000000000e+01 6.288152920645e-04 0.000000000000e+00 -6.288152920501e-04 -1.440000000075e-14 1.460000000000e+01 6.288629980619e-04 0.000000000000e+00 -6.288629980473e-04 -1.460000000075e-14 1.480000000000e+01 6.289103680149e-04 0.000000000000e+00 -6.289103680001e-04 -1.480000000075e-14 1.500000000000e+01 6.289574118823e-04 0.000000000000e+00 -6.289574118673e-04 -1.500000000075e-14 1.520000000000e+01 6.290041391427e-04 0.000000000000e+00 -6.290041391275e-04 -1.520000000075e-14 1.540000000000e+01 6.290505588260e-04 0.000000000000e+00 -6.290505588106e-04 -1.540000000075e-14 1.560000000000e+01 6.290966795424e-04 0.000000000000e+00 -6.290966795268e-04 -1.560000000075e-14 1.580000000000e+01 6.291425095083e-04 0.000000000000e+00 -6.291425094925e-04 -1.580000000075e-14 1.600000000000e+01 6.291880565711e-04 0.000000000000e+00 -6.291880565551e-04 -1.600000000075e-14 1.620000000000e+01 6.292333282320e-04 0.000000000000e+00 -6.292333282158e-04 -1.620000000075e-14 1.640000000000e+01 6.292783316660e-04 0.000000000000e+00 -6.292783316496e-04 -1.640000000075e-14 1.660000000000e+01 6.293230737420e-04 0.000000000000e+00 -6.293230737254e-04 -1.660000000075e-14 1.680000000000e+01 6.293675610403e-04 0.000000000000e+00 -6.293675610235e-04 -1.680000000075e-14 1.700000000000e+01 6.294117998690e-04 0.000000000000e+00 -6.294117998520e-04 -1.700000000075e-14 1.720000000000e+01 6.294557962798e-04 0.000000000000e+00 -6.294557962626e-04 -1.720000000075e-14 1.740000000000e+01 6.294995560818e-04 0.000000000000e+00 -6.294995560644e-04 -1.740000000075e-14 1.760000000000e+01 6.295430848553e-04 0.000000000000e+00 -6.295430848377e-04 -1.760000000075e-14 1.780000000000e+01 6.295863879639e-04 0.000000000000e+00 -6.295863879461e-04 -1.780000000075e-14 1.800000000000e+01 6.296294705660e-04 0.000000000000e+00 -6.296294705480e-04 -1.800000000075e-14 1.820000000000e+01 6.296723376257e-04 0.000000000000e+00 -6.296723376075e-04 -1.820000000075e-14 1.840000000000e+01 6.297149939229e-04 0.000000000000e+00 -6.297149939045e-04 -1.840000000075e-14 1.860000000000e+01 6.297574440624e-04 0.000000000000e+00 -6.297574440438e-04 -1.860000000075e-14 1.880000000000e+01 6.297996924834e-04 0.000000000000e+00 -6.297996924646e-04 -1.880000000075e-14 1.900000000000e+01 6.298417434668e-04 0.000000000000e+00 -6.298417434478e-04 -1.900000000075e-14 1.920000000000e+01 6.298836011439e-04 0.000000000000e+00 -6.298836011247e-04 -1.920000000075e-14 1.940000000000e+01 6.299252695029e-04 0.000000000000e+00 -6.299252694835e-04 -1.940000000075e-14 1.960000000000e+01 6.299667523960e-04 0.000000000000e+00 -6.299667523764e-04 -1.960000000075e-14 1.980000000000e+01 6.300080535460e-04 0.000000000000e+00 -6.300080535262e-04 -1.980000000075e-14 2.000000000000e+01 6.300491765520e-04 0.000000000000e+00 -6.300491765320e-04 -2.000000000075e-14 1.000000000000e+00 5.502627058516e-04 0.000000000000e+00 -5.502627058506e-04 -1.000000000751e-15 1.200000000000e+00 6.473969919885e-04 0.000000000000e+00 -6.473969919873e-04 -1.200000000751e-15 1.400000000000e+00 7.406991341028e-04 0.000000000000e+00 -7.406991341014e-04 -1.400000000751e-15 1.600000000000e+00 8.303522136667e-04 0.000000000000e+00 -8.303522136651e-04 -1.600000000751e-15 1.800000000000e+00 9.165295284428e-04 0.000000000000e+00 -9.165295284410e-04 -1.800000000751e-15 2.000000000000e+00 9.993949229565e-04 0.000000000000e+00 -9.993949229545e-04 -2.000000000751e-15 2.200000000000e+00 1.079103174311e-03 0.000000000000e+00 -1.079103174309e-03 -2.200000000751e-15 2.400000000000e+00 1.155800410494e-03 0.000000000000e+00 -1.155800410492e-03 -2.400000000751e-15 2.600000000000e+00 1.229624544703e-03 0.000000000000e+00 -1.229624544700e-03 -2.600000000751e-15 2.800000000000e+00 1.300705723579e-03 0.000000000000e+00 -1.300705723576e-03 -2.800000000751e-15 3.000000000000e+00 1.369166719296e-03 0.000000000000e+00 -1.369166719293e-03 -3.000000000751e-15 3.200000000000e+00 1.435123422386e-03 0.000000000000e+00 -1.435123422383e-03 -3.200000000751e-15 3.400000000000e+00 1.498685201386e-03 0.000000000000e+00 -1.498685201382e-03 -3.400000000751e-15 3.600000000000e+00 1.559955309732e-03 0.000000000000e+00 -1.559955309728e-03 -3.600000000751e-15 3.800000000000e+00 1.619031260391e-03 0.000000000000e+00 -1.619031260387e-03 -3.800000000751e-15 4.000000000000e+00 1.676005181289e-03 0.000000000000e+00 -1.676005181285e-03 -4.000000000751e-15 4.200000000000e+00 1.730964151269e-03 0.000000000000e+00 -1.730964151265e-03 -4.200000000751e-15 4.400000000000e+00 1.783990516745e-03 0.000000000000e+00 -1.783990516741e-03 -4.400000000751e-15 4.600000000000e+00 1.835162189466e-03 0.000000000000e+00 -1.835162189461e-03 -4.600000000751e-15 4.800000000000e+00 1.884552926039e-03 0.000000000000e+00 -1.884552926034e-03 -4.800000000751e-15 5.000000000000e+00 1.932232589962e-03 0.000000000000e+00 -1.932232589957e-03 -5.000000000751e-15 5.200000000000e+00 1.978267396999e-03 0.000000000000e+00 -1.978267396994e-03 -5.200000000751e-15 5.400000000000e+00 2.022720144795e-03 0.000000000000e+00 -2.022720144790e-03 -5.400000000751e-15 5.600000000000e+00 2.065650427599e-03 0.000000000000e+00 -2.065650427593e-03 -5.600000000751e-15 5.800000000000e+00 2.107114837004e-03 0.000000000000e+00 -2.107114836998e-03 -5.800000000751e-15 6.000000000000e+00 2.147167149560e-03 0.000000000000e+00 -2.147167149554e-03 -6.000000000751e-15 6.200000000000e+00 2.185858502105e-03 0.000000000000e+00 -2.185858502099e-03 -6.200000000751e-15 6.400000000000e+00 2.223237555609e-03 0.000000000000e+00 -2.223237555602e-03 -6.400000000751e-15 6.600000000000e+00 2.259350648296e-03 0.000000000000e+00 -2.259350648289e-03 -6.600000000751e-15 6.800000000000e+00 2.294241938773e-03 0.000000000000e+00 -2.294241938766e-03 -6.800000000751e-15 7.000000000000e+00 2.327953539824e-03 0.000000000000e+00 -2.327953539817e-03 -7.000000000751e-15 7.200000000000e+00 2.360525643521e-03 0.000000000000e+00 -2.360525643513e-03 -7.200000000751e-15 7.400000000000e+00 2.391996638232e-03 0.000000000000e+00 -2.391996638225e-03 -7.400000000751e-15 7.600000000000e+00 2.422403218087e-03 0.000000000000e+00 -2.422403218079e-03 -7.600000000751e-15 7.800000000000e+00 2.451780485397e-03 0.000000000000e+00 -2.451780485390e-03 -7.800000000751e-15 8.000000000000e+00 2.480162046528e-03 0.000000000000e+00 -2.480162046520e-03 -8.000000000751e-15 8.200000000000e+00 2.507580101635e-03 0.000000000000e+00 -2.507580101627e-03 -8.200000000751e-15 8.400000000000e+00 2.534065528700e-03 0.000000000000e+00 -2.534065528692e-03 -8.400000000751e-15 8.600000000000e+00 2.559647962219e-03 0.000000000000e+00 -2.559647962210e-03 -8.600000000751e-15 8.800000000000e+00 2.584355866895e-03 0.000000000000e+00 -2.584355866886e-03 -8.800000000751e-15 9.000000000000e+00 2.608216606670e-03 0.000000000000e+00 -2.608216606661e-03 -9.000000000751e-15 9.200000000000e+00 2.631256509372e-03 0.000000000000e+00 -2.631256509363e-03 -9.200000000751e-15 9.400000000000e+00 2.653500927250e-03 0.000000000000e+00 -2.653500927241e-03 -9.400000000751e-15 9.600000000000e+00 2.674974293669e-03 0.000000000000e+00 -2.674974293660e-03 -9.600000000751e-15 9.800000000000e+00 2.695700176165e-03 0.000000000000e+00 -2.695700176155e-03 -9.800000000751e-15 1.000000000000e+01 2.715701326097e-03 0.000000000000e+00 -2.715701326087e-03 -1.000000000075e-14 1.020000000000e+01 2.734999725081e-03 0.000000000000e+00 -2.734999725071e-03 -1.020000000075e-14 1.040000000000e+01 2.753616628389e-03 0.000000000000e+00 -2.753616628378e-03 -1.040000000075e-14 1.060000000000e+01 2.771572605478e-03 0.000000000000e+00 -2.771572605467e-03 -1.060000000075e-14 1.080000000000e+01 2.788887577817e-03 0.000000000000e+00 -2.788887577806e-03 -1.080000000075e-14 1.100000000000e+01 2.805580854133e-03 0.000000000000e+00 -2.805580854122e-03 -1.100000000075e-14 1.120000000000e+01 2.821671163237e-03 0.000000000000e+00 -2.821671163226e-03 -1.120000000075e-14 1.140000000000e+01 2.837176684530e-03 0.000000000000e+00 -2.837176684518e-03 -1.140000000075e-14 1.160000000000e+01 2.852115076328e-03 0.000000000000e+00 -2.852115076316e-03 -1.160000000075e-14 1.180000000000e+01 2.866503502104e-03 0.000000000000e+00 -2.866503502092e-03 -1.180000000075e-14 1.200000000000e+01 2.880358654754e-03 0.000000000000e+00 -2.880358654742e-03 -1.200000000075e-14 1.220000000000e+01 2.893696778994e-03 0.000000000000e+00 -2.893696778982e-03 -1.220000000075e-14 1.240000000000e+01 2.906533691974e-03 0.000000000000e+00 -2.906533691962e-03 -1.240000000075e-14 1.260000000000e+01 2.918884802213e-03 0.000000000000e+00 -2.918884802201e-03 -1.260000000075e-14 1.280000000000e+01 2.930765126934e-03 0.000000000000e+00 -2.930765126921e-03 -1.280000000075e-14 1.300000000000e+01 2.942189307894e-03 0.000000000000e+00 -2.942189307881e-03 -1.300000000075e-14 1.320000000000e+01 2.953171625795e-03 0.000000000000e+00 -2.953171625782e-03 -1.320000000075e-14 1.340000000000e+01 2.963726013362e-03 0.000000000000e+00 -2.963726013348e-03 -1.340000000075e-14 1.360000000000e+01 2.973866067161e-03 0.000000000000e+00 -2.973866067148e-03 -1.360000000075e-14 1.380000000000e+01 2.983605058265e-03 0.000000000000e+00 -2.983605058251e-03 -1.380000000075e-14 1.400000000000e+01 2.992955941820e-03 0.000000000000e+00 -2.992955941806e-03 -1.400000000075e-14 1.420000000000e+01 3.001931365624e-03 0.000000000000e+00 -3.001931365610e-03 -1.420000000075e-14 1.440000000000e+01 3.010543677779e-03 0.000000000000e+00 -3.010543677765e-03 -1.440000000075e-14 1.460000000000e+01 3.018804933510e-03 0.000000000000e+00 -3.018804933495e-03 -1.460000000075e-14 1.480000000000e+01 3.026726901223e-03 0.000000000000e+00 -3.026726901209e-03 -1.480000000075e-14 1.500000000000e+01 3.034321067894e-03 0.000000000000e+00 -3.034321067879e-03 -1.500000000075e-14 1.520000000000e+01 3.041598643847e-03 0.000000000000e+00 -3.041598643832e-03 -1.520000000075e-14 1.540000000000e+01 3.048570567019e-03 0.000000000000e+00 -3.048570567003e-03 -1.540000000075e-14 1.560000000000e+01 3.055247506770e-03 0.000000000000e+00 -3.055247506754e-03 -1.560000000075e-14 1.580000000000e+01 3.061639867313e-03 0.000000000000e+00 -3.061639867297e-03 -1.580000000075e-14 1.600000000000e+01 3.067757790834e-03 0.000000000000e+00 -3.067757790818e-03 -1.600000000075e-14 1.620000000000e+01 3.073611160361e-03 0.000000000000e+00 -3.073611160345e-03 -1.620000000075e-14 1.640000000000e+01 3.079209602445e-03 0.000000000000e+00 -3.079209602429e-03 -1.640000000075e-14 1.660000000000e+01 3.084562489709e-03 0.000000000000e+00 -3.084562489693e-03 -1.660000000075e-14 1.680000000000e+01 3.089678943312e-03 0.000000000000e+00 -3.089678943295e-03 -1.680000000075e-14 1.700000000000e+01 3.094567835372e-03 0.000000000000e+00 -3.094567835355e-03 -1.700000000075e-14 1.720000000000e+01 3.099237791407e-03 0.000000000000e+00 -3.099237791389e-03 -1.720000000075e-14 1.740000000000e+01 3.103697192793e-03 0.000000000000e+00 -3.103697192776e-03 -1.740000000075e-14 1.760000000000e+01 3.107954179318e-03 0.000000000000e+00 -3.107954179300e-03 -1.760000000075e-14 1.780000000000e+01 3.112016651810e-03 0.000000000000e+00 -3.112016651792e-03 -1.780000000075e-14 1.800000000000e+01 3.115892274899e-03 0.000000000000e+00 -3.115892274881e-03 -1.800000000075e-14 1.820000000000e+01 3.119588479909e-03 0.000000000000e+00 -3.119588479891e-03 -1.820000000075e-14 1.840000000000e+01 3.123112467892e-03 0.000000000000e+00 -3.123112467874e-03 -1.840000000075e-14 1.860000000000e+01 3.126471212827e-03 0.000000000000e+00 -3.126471212809e-03 -1.860000000075e-14 1.880000000000e+01 3.129671464974e-03 0.000000000000e+00 -3.129671464955e-03 -1.880000000075e-14 1.900000000000e+01 3.132719754391e-03 0.000000000000e+00 -3.132719754372e-03 -1.900000000075e-14 1.920000000000e+01 3.135622394613e-03 0.000000000000e+00 -3.135622394594e-03 -1.920000000075e-14 1.940000000000e+01 3.138385486489e-03 0.000000000000e+00 -3.138385486470e-03 -1.940000000075e-14 1.960000000000e+01 3.141014922166e-03 0.000000000000e+00 -3.141014922146e-03 -1.960000000075e-14 1.980000000000e+01 3.143516389215e-03 0.000000000000e+00 -3.143516389195e-03 -1.980000000075e-14 2.000000000000e+01 3.145895374898e-03 0.000000000000e+00 -3.145895374878e-03 -2.000000000075e-14 1.000000000000e+00 1.909065518471e-05 0.000000000000e+00 -1.909064222997e-05 -1.295474362084e-11 1.200000000000e+00 1.909993143584e-05 0.000000000000e+00 -1.909991848090e-05 -1.295494362086e-11 1.400000000000e+00 1.910726114385e-05 0.000000000000e+00 -1.910724818870e-05 -1.295514362086e-11 1.600000000000e+00 1.911384371210e-05 0.000000000000e+00 -1.911383075675e-05 -1.295534362086e-11 1.800000000000e+00 1.911993917776e-05 0.000000000000e+00 -1.911992622222e-05 -1.295554362086e-11 2.000000000000e+00 1.912567224627e-05 0.000000000000e+00 -1.912565929053e-05 -1.295574362086e-11 2.200000000000e+00 1.913112029831e-05 0.000000000000e+00 -1.913110734237e-05 -1.295594362086e-11 2.400000000000e+00 1.913633617513e-05 0.000000000000e+00 -1.913632321898e-05 -1.295614362086e-11 2.600000000000e+00 1.914135798943e-05 0.000000000000e+00 -1.914134503308e-05 -1.295634362086e-11 2.800000000000e+00 1.914621433043e-05 0.000000000000e+00 -1.914620137389e-05 -1.295654362086e-11 3.000000000000e+00 1.915092731045e-05 0.000000000000e+00 -1.915091435370e-05 -1.295674362086e-11 3.200000000000e+00 1.915551446139e-05 0.000000000000e+00 -1.915550150444e-05 -1.295694362086e-11 3.400000000000e+00 1.915998997113e-05 0.000000000000e+00 -1.915997701399e-05 -1.295714362086e-11 3.600000000000e+00 1.916436552030e-05 0.000000000000e+00 -1.916435256296e-05 -1.295734362086e-11 3.800000000000e+00 1.916865086675e-05 0.000000000000e+00 -1.916863790920e-05 -1.295754362086e-11 4.000000000000e+00 1.917285426495e-05 0.000000000000e+00 -1.917284130720e-05 -1.295774362086e-11 4.200000000000e+00 1.917698277405e-05 0.000000000000e+00 -1.917696981610e-05 -1.295794362086e-11 4.400000000000e+00 1.918104248880e-05 0.000000000000e+00 -1.918102953066e-05 -1.295814362086e-11 4.600000000000e+00 1.918503871577e-05 0.000000000000e+00 -1.918502575743e-05 -1.295834362086e-11 4.800000000000e+00 1.918897611000e-05 0.000000000000e+00 -1.918896315146e-05 -1.295854362086e-11 5.000000000000e+00 1.919285878245e-05 0.000000000000e+00 -1.919284582371e-05 -1.295874362086e-11 5.200000000000e+00 1.919669038553e-05 0.000000000000e+00 -1.919667742659e-05 -1.295894362086e-11 5.400000000000e+00 1.920047418208e-05 0.000000000000e+00 -1.920046122294e-05 -1.295914362086e-11 5.600000000000e+00 1.920421310139e-05 0.000000000000e+00 -1.920420014205e-05 -1.295934362086e-11 5.800000000000e+00 1.920790978530e-05 0.000000000000e+00 -1.920789682576e-05 -1.295954362086e-11 6.000000000000e+00 1.921156662635e-05 0.000000000000e+00 -1.921155366661e-05 -1.295974362086e-11 6.200000000000e+00 1.921518579962e-05 0.000000000000e+00 -1.921517283967e-05 -1.295994362086e-11 6.400000000000e+00 1.921876928954e-05 0.000000000000e+00 -1.921875632939e-05 -1.296014362086e-11 6.600000000000e+00 1.922231891256e-05 0.000000000000e+00 -1.922230595221e-05 -1.296034362086e-11 6.800000000000e+00 1.922583633644e-05 0.000000000000e+00 -1.922582337590e-05 -1.296054362086e-11 7.000000000000e+00 1.922932309683e-05 0.000000000000e+00 -1.922931013608e-05 -1.296074362086e-11 7.200000000000e+00 1.923278061145e-05 0.000000000000e+00 -1.923276765050e-05 -1.296094362086e-11 7.400000000000e+00 1.923621019245e-05 0.000000000000e+00 -1.923619723131e-05 -1.296114362086e-11 7.600000000000e+00 1.923961305712e-05 0.000000000000e+00 -1.923960009577e-05 -1.296134362086e-11 7.800000000000e+00 1.924299033721e-05 0.000000000000e+00 -1.924297737567e-05 -1.296154362086e-11 8.000000000000e+00 1.924634308716e-05 0.000000000000e+00 -1.924633012542e-05 -1.296174362086e-11 8.200000000000e+00 1.924967229127e-05 0.000000000000e+00 -1.924965932933e-05 -1.296194362086e-11 8.400000000000e+00 1.925297887011e-05 0.000000000000e+00 -1.925296590796e-05 -1.296214362086e-11 8.600000000000e+00 1.925626368610e-05 0.000000000000e+00 -1.925625072376e-05 -1.296234362086e-11 8.800000000000e+00 1.925952754860e-05 0.000000000000e+00 -1.925951458606e-05 -1.296254362086e-11 9.000000000000e+00 1.926277121833e-05 0.000000000000e+00 -1.926275825558e-05 -1.296274362086e-11 9.200000000000e+00 1.926599541135e-05 0.000000000000e+00 -1.926598244841e-05 -1.296294362086e-11 9.400000000000e+00 1.926920080271e-05 0.000000000000e+00 -1.926918783957e-05 -1.296314362086e-11 9.600000000000e+00 1.927238802962e-05 0.000000000000e+00 -1.927237506628e-05 -1.296334362086e-11 9.800000000000e+00 1.927555769436e-05 0.000000000000e+00 -1.927554473081e-05 -1.296354362086e-11 1.000000000000e+01 1.927871036691e-05 0.000000000000e+00 -1.927869740317e-05 -1.296374362086e-11 1.020000000000e+01 1.928184658734e-05 0.000000000000e+00 -1.928183362339e-05 -1.296394362086e-11 1.040000000000e+01 1.928496686793e-05 0.000000000000e+00 -1.928495390379e-05 -1.296414362086e-11 1.060000000000e+01 1.928807169516e-05 0.000000000000e+00 -1.928805873082e-05 -1.296434362086e-11 1.080000000000e+01 1.929116153148e-05 0.000000000000e+00 -1.929114856694e-05 -1.296454362086e-11 1.100000000000e+01 1.929423681695e-05 0.000000000000e+00 -1.929422385220e-05 -1.296474362086e-11 1.120000000000e+01 1.929729797070e-05 0.000000000000e+00 -1.929728500575e-05 -1.296494362086e-11 1.140000000000e+01 1.930034539233e-05 0.000000000000e+00 -1.930033242719e-05 -1.296514362086e-11 1.160000000000e+01 1.930337946316e-05 0.000000000000e+00 -1.930336649782e-05 -1.296534362086e-11 1.180000000000e+01 1.930640054735e-05 0.000000000000e+00 -1.930638758181e-05 -1.296554362086e-11 1.200000000000e+01 1.930940899299e-05 0.000000000000e+00 -1.930939602724e-05 -1.296574362086e-11 1.220000000000e+01 1.931240513305e-05 0.000000000000e+00 -1.931239216710e-05 -1.296594362086e-11 1.240000000000e+01 1.931538928631e-05 0.000000000000e+00 -1.931537632017e-05 -1.296614362086e-11 1.260000000000e+01 1.931836175819e-05 0.000000000000e+00 -1.931834879185e-05 -1.296634362086e-11 1.280000000000e+01 1.932132284149e-05 0.000000000000e+00 -1.932130987494e-05 -1.296654362086e-11 1.300000000000e+01 1.932427281714e-05 0.000000000000e+00 -1.932425985039e-05 -1.296674362086e-11 1.320000000000e+01 1.932721195484e-05 0.000000000000e+00 -1.932719898790e-05 -1.296694362086e-11 1.340000000000e+01 1.933014051371e-05 0.000000000000e+00 -1.933012754656e-05 -1.296714362086e-11 1.360000000000e+01 1.933305874282e-05 0.000000000000e+00 -1.933304577547e-05 -1.296734362086e-11 1.380000000000e+01 1.933596688175e-05 0.000000000000e+00 -1.933595391421e-05 -1.296754362086e-11 1.400000000000e+01 1.933886516111e-05 0.000000000000e+00 -1.933885219337e-05 -1.296774362086e-11 1.420000000000e+01 1.934175380295e-05 0.000000000000e+00 -1.934174083500e-05 -1.296794362086e-11 1.440000000000e+01 1.934463302123e-05 0.000000000000e+00 -1.934462005308e-05 -1.296814362086e-11 1.460000000000e+01 1.934750302224e-05 0.000000000000e+00 -1.934749005390e-05 -1.296834362086e-11 1.480000000000e+01 1.935036400495e-05 0.000000000000e+00 -1.935035103641e-05 -1.296854362086e-11 1.500000000000e+01 1.935321616140e-05 0.000000000000e+00 -1.935320319265e-05 -1.296874362086e-11 1.520000000000e+01 1.935605967697e-05 0.000000000000e+00 -1.935604670803e-05 -1.296894362086e-11 1.540000000000e+01 1.935889473079e-05 0.000000000000e+00 -1.935888176165e-05 -1.296914362086e-11 1.560000000000e+01 1.936172149596e-05 0.000000000000e+00 -1.936170852662e-05 -1.296934362086e-11 1.580000000000e+01 1.936454013986e-05 0.000000000000e+00 -1.936452717031e-05 -1.296954362086e-11 1.600000000000e+01 1.936735082439e-05 0.000000000000e+00 -1.936733785464e-05 -1.296974362086e-11 1.620000000000e+01 1.937015370625e-05 0.000000000000e+00 -1.937014073630e-05 -1.296994362086e-11 1.640000000000e+01 1.937294893715e-05 0.000000000000e+00 -1.937293596700e-05 -1.297014362086e-11 1.660000000000e+01 1.937573666401e-05 0.000000000000e+00 -1.937572369367e-05 -1.297034362086e-11 1.680000000000e+01 1.937851702923e-05 0.000000000000e+00 -1.937850405869e-05 -1.297054362086e-11 1.700000000000e+01 1.938129017081e-05 0.000000000000e+00 -1.938127720007e-05 -1.297074362086e-11 1.720000000000e+01 1.938405622258e-05 0.000000000000e+00 -1.938404325164e-05 -1.297094362086e-11 1.740000000000e+01 1.938681531437e-05 0.000000000000e+00 -1.938680234323e-05 -1.297114362086e-11 1.760000000000e+01 1.938956757217e-05 0.000000000000e+00 -1.938955460082e-05 -1.297134362086e-11 1.780000000000e+01 1.939231311827e-05 0.000000000000e+00 -1.939230014673e-05 -1.297154362086e-11 1.800000000000e+01 1.939505207145e-05 0.000000000000e+00 -1.939503909971e-05 -1.297174362086e-11 1.820000000000e+01 1.939778454709e-05 0.000000000000e+00 -1.939777157515e-05 -1.297194362086e-11 1.840000000000e+01 1.940051065730e-05 0.000000000000e+00 -1.940049768516e-05 -1.297214362086e-11 1.860000000000e+01 1.940323051108e-05 0.000000000000e+00 -1.940321753873e-05 -1.297234362086e-11 1.880000000000e+01 1.940594421438e-05 0.000000000000e+00 -1.940593124184e-05 -1.297254362086e-11 1.900000000000e+01 1.940865187030e-05 0.000000000000e+00 -1.940863889756e-05 -1.297274362086e-11 1.920000000000e+01 1.941135357913e-05 0.000000000000e+00 -1.941134060619e-05 -1.297294362086e-11 1.940000000000e+01 1.941404943848e-05 0.000000000000e+00 -1.941403646534e-05 -1.297314362086e-11 1.960000000000e+01 1.941673954338e-05 0.000000000000e+00 -1.941672657004e-05 -1.297334362086e-11 1.980000000000e+01 1.941942398638e-05 0.000000000000e+00 -1.941941101283e-05 -1.297354362086e-11 2.000000000000e+01 1.942210285760e-05 0.000000000000e+00 -1.942208988386e-05 -1.297374362086e-11 1.000000000000e+00 1.809521621508e-04 0.000000000000e+00 -1.809521491960e-04 -1.295474362084e-11 1.200000000000e+00 2.063972842350e-04 0.000000000000e+00 -2.063972712801e-04 -1.295494362086e-11 1.400000000000e+00 2.285109772834e-04 0.000000000000e+00 -2.285109643283e-04 -1.295514362086e-11 1.600000000000e+00 2.475022734997e-04 0.000000000000e+00 -2.475022605444e-04 -1.295534362086e-11 1.800000000000e+00 2.636158157764e-04 0.000000000000e+00 -2.636158028209e-04 -1.295554362086e-11 2.000000000000e+00 2.771207527797e-04 0.000000000000e+00 -2.771207398240e-04 -1.295574362086e-11 2.200000000000e+00 2.882992918272e-04 0.000000000000e+00 -2.882992788713e-04 -1.295594362086e-11 2.400000000000e+00 2.974358255794e-04 0.000000000000e+00 -2.974358126233e-04 -1.295614362086e-11 2.600000000000e+00 3.048073521708e-04 0.000000000000e+00 -3.048073392145e-04 -1.295634362086e-11 2.800000000000e+00 3.106756687632e-04 0.000000000000e+00 -3.106756558067e-04 -1.295654362086e-11 3.000000000000e+00 3.152816181225e-04 0.000000000000e+00 -3.152816051658e-04 -1.295674362086e-11 3.200000000000e+00 3.188414946366e-04 0.000000000000e+00 -3.188414816797e-04 -1.295694362086e-11 3.400000000000e+00 3.215455249986e-04 0.000000000000e+00 -3.215455120415e-04 -1.295714362086e-11 3.600000000000e+00 3.235581405380e-04 0.000000000000e+00 -3.235581275807e-04 -1.295734362086e-11 3.800000000000e+00 3.250196234046e-04 0.000000000000e+00 -3.250196104471e-04 -1.295754362086e-11 4.000000000000e+00 3.260486563944e-04 0.000000000000e+00 -3.260486434367e-04 -1.295774362086e-11 4.200000000000e+00 3.267454468100e-04 0.000000000000e+00 -3.267454338521e-04 -1.295794362086e-11 4.400000000000e+00 3.271950138790e-04 0.000000000000e+00 -3.271950009208e-04 -1.295814362086e-11 4.600000000000e+00 3.274702166287e-04 0.000000000000e+00 -3.274702036703e-04 -1.295834362086e-11 4.800000000000e+00 3.276332272318e-04 0.000000000000e+00 -3.276332142732e-04 -1.295854362086e-11 5.000000000000e+00 3.277334984343e-04 0.000000000000e+00 -3.277334854756e-04 -1.295874362086e-11 5.200000000000e+00 3.278037722634e-04 0.000000000000e+00 -3.278037593045e-04 -1.295894362086e-11 5.400000000000e+00 3.278608997594e-04 0.000000000000e+00 -3.278608868003e-04 -1.295914362086e-11 5.600000000000e+00 3.279119685097e-04 0.000000000000e+00 -3.279119555504e-04 -1.295934362086e-11 5.800000000000e+00 3.279597343413e-04 0.000000000000e+00 -3.279597213817e-04 -1.295954362086e-11 6.000000000000e+00 3.280053074933e-04 0.000000000000e+00 -3.280052945335e-04 -1.295974362086e-11 6.200000000000e+00 3.280491904710e-04 0.000000000000e+00 -3.280491775110e-04 -1.295994362086e-11 6.400000000000e+00 3.280916517324e-04 0.000000000000e+00 -3.280916387723e-04 -1.296014362086e-11 6.600000000000e+00 3.281328617328e-04 0.000000000000e+00 -3.281328487725e-04 -1.296034362086e-11 6.800000000000e+00 3.281729447989e-04 0.000000000000e+00 -3.281729318383e-04 -1.296054362086e-11 7.000000000000e+00 3.282120002474e-04 0.000000000000e+00 -3.282119872867e-04 -1.296074362086e-11 7.200000000000e+00 3.282501117257e-04 0.000000000000e+00 -3.282500987648e-04 -1.296094362086e-11 7.400000000000e+00 3.282873517864e-04 0.000000000000e+00 -3.282873388253e-04 -1.296114362086e-11 7.600000000000e+00 3.283237844099e-04 0.000000000000e+00 -3.283237714486e-04 -1.296134362086e-11 7.800000000000e+00 3.283594665762e-04 0.000000000000e+00 -3.283594536146e-04 -1.296154362086e-11 8.000000000000e+00 3.283944493547e-04 0.000000000000e+00 -3.283944363930e-04 -1.296174362086e-11 8.200000000000e+00 3.284287787267e-04 0.000000000000e+00 -3.284287657648e-04 -1.296194362086e-11 8.400000000000e+00 3.284624962399e-04 0.000000000000e+00 -3.284624832777e-04 -1.296214362086e-11 8.600000000000e+00 3.284956395496e-04 0.000000000000e+00 -3.284956265872e-04 -1.296234362086e-11 8.800000000000e+00 3.285282428759e-04 0.000000000000e+00 -3.285282299133e-04 -1.296254362086e-11 9.000000000000e+00 3.285603373953e-04 0.000000000000e+00 -3.285603244325e-04 -1.296274362086e-11 9.200000000000e+00 3.285919515789e-04 0.000000000000e+00 -3.285919386159e-04 -1.296294362086e-11 9.400000000000e+00 3.286231114865e-04 0.000000000000e+00 -3.286230985234e-04 -1.296314362086e-11 9.600000000000e+00 3.286538410236e-04 0.000000000000e+00 -3.286538280603e-04 -1.296334362086e-11 9.800000000000e+00 3.286841621658e-04 0.000000000000e+00 -3.286841492022e-04 -1.296354362086e-11 1.000000000000e+01 3.287140951567e-04 0.000000000000e+00 -3.287140821930e-04 -1.296374362086e-11 1.020000000000e+01 3.287436586820e-04 0.000000000000e+00 -3.287436457181e-04 -1.296394362086e-11 1.040000000000e+01 3.287728700228e-04 0.000000000000e+00 -3.287728570587e-04 -1.296414362086e-11 1.060000000000e+01 3.288017451914e-04 0.000000000000e+00 -3.288017322270e-04 -1.296434362086e-11 1.080000000000e+01 3.288302990516e-04 0.000000000000e+00 -3.288302860871e-04 -1.296454362086e-11 1.100000000000e+01 3.288585454260e-04 0.000000000000e+00 -3.288585324612e-04 -1.296474362086e-11 1.120000000000e+01 3.288864971904e-04 0.000000000000e+00 -3.288864842254e-04 -1.296494362086e-11 1.140000000000e+01 3.289141663592e-04 0.000000000000e+00 -3.289141533941e-04 -1.296514362086e-11 1.160000000000e+01 3.289415641610e-04 0.000000000000e+00 -3.289415511956e-04 -1.296534362086e-11 1.180000000000e+01 3.289687011059e-04 0.000000000000e+00 -3.289686881404e-04 -1.296554362086e-11 1.200000000000e+01 3.289955870469e-04 0.000000000000e+00 -3.289955740812e-04 -1.296574362086e-11 1.220000000000e+01 3.290222312342e-04 0.000000000000e+00 -3.290222182682e-04 -1.296594362086e-11 1.240000000000e+01 3.290486423641e-04 0.000000000000e+00 -3.290486293980e-04 -1.296614362086e-11 1.260000000000e+01 3.290748286237e-04 0.000000000000e+00 -3.290748156574e-04 -1.296634362086e-11 1.280000000000e+01 3.291007977306e-04 0.000000000000e+00 -3.291007847641e-04 -1.296654362086e-11 1.300000000000e+01 3.291265569691e-04 0.000000000000e+00 -3.291265440023e-04 -1.296674362086e-11 1.320000000000e+01 3.291521132228e-04 0.000000000000e+00 -3.291521002559e-04 -1.296694362086e-11 1.340000000000e+01 3.291774730049e-04 0.000000000000e+00 -3.291774600378e-04 -1.296714362086e-11 1.360000000000e+01 3.292026424845e-04 0.000000000000e+00 -3.292026295172e-04 -1.296734362086e-11 1.380000000000e+01 3.292276275117e-04 0.000000000000e+00 -3.292276145442e-04 -1.296754362086e-11 1.400000000000e+01 3.292524336398e-04 0.000000000000e+00 -3.292524206721e-04 -1.296774362086e-11 1.420000000000e+01 3.292770661461e-04 0.000000000000e+00 -3.292770531782e-04 -1.296794362086e-11 1.440000000000e+01 3.293015300502e-04 0.000000000000e+00 -3.293015170820e-04 -1.296814362086e-11 1.460000000000e+01 3.293258301315e-04 0.000000000000e+00 -3.293258171631e-04 -1.296834362086e-11 1.480000000000e+01 3.293499709449e-04 0.000000000000e+00 -3.293499579763e-04 -1.296854362086e-11 1.500000000000e+01 3.293739568351e-04 0.000000000000e+00 -3.293739438664e-04 -1.296874362086e-11 1.520000000000e+01 3.293977919502e-04 0.000000000000e+00 -3.293977789813e-04 -1.296894362086e-11 1.540000000000e+01 3.294214802538e-04 0.000000000000e+00 -3.294214672846e-04 -1.296914362086e-11 1.560000000000e+01 3.294450255361e-04 0.000000000000e+00 -3.294450125667e-04 -1.296934362086e-11 1.580000000000e+01 3.294684314246e-04 0.000000000000e+00 -3.294684184551e-04 -1.296954362086e-11 1.600000000000e+01 3.294917013939e-04 0.000000000000e+00 -3.294916884241e-04 -1.296974362086e-11 1.620000000000e+01 3.295148387740e-04 0.000000000000e+00 -3.295148258041e-04 -1.296994362086e-11 1.640000000000e+01 3.295378467595e-04 0.000000000000e+00 -3.295378337894e-04 -1.297014362086e-11 1.660000000000e+01 3.295607284164e-04 0.000000000000e+00 -3.295607154461e-04 -1.297034362086e-11 1.680000000000e+01 3.295834866897e-04 0.000000000000e+00 -3.295834737192e-04 -1.297054362086e-11 1.700000000000e+01 3.296061244100e-04 0.000000000000e+00 -3.296061114392e-04 -1.297074362086e-11 1.720000000000e+01 3.296286442995e-04 0.000000000000e+00 -3.296286313286e-04 -1.297094362086e-11 1.740000000000e+01 3.296510489781e-04 0.000000000000e+00 -3.296510360070e-04 -1.297114362086e-11 1.760000000000e+01 3.296733409683e-04 0.000000000000e+00 -3.296733279970e-04 -1.297134362086e-11 1.780000000000e+01 3.296955227006e-04 0.000000000000e+00 -3.296955097291e-04 -1.297154362086e-11 1.800000000000e+01 3.297175965180e-04 0.000000000000e+00 -3.297175835462e-04 -1.297174362086e-11 1.820000000000e+01 3.297395646803e-04 0.000000000000e+00 -3.297395517084e-04 -1.297194362086e-11 1.840000000000e+01 3.297614293687e-04 0.000000000000e+00 -3.297614163965e-04 -1.297214362086e-11 1.860000000000e+01 3.297831926887e-04 0.000000000000e+00 -3.297831797164e-04 -1.297234362086e-11 1.880000000000e+01 3.298048566749e-04 0.000000000000e+00 -3.298048437024e-04 -1.297254362086e-11 1.900000000000e+01 3.298264232933e-04 0.000000000000e+00 -3.298264103206e-04 -1.297274362086e-11 1.920000000000e+01 3.298478944452e-04 0.000000000000e+00 -3.298478814723e-04 -1.297294362086e-11 1.940000000000e+01 3.298692719699e-04 0.000000000000e+00 -3.298692589967e-04 -1.297314362086e-11 1.960000000000e+01 3.298905576475e-04 0.000000000000e+00 -3.298905446742e-04 -1.297334362086e-11 1.980000000000e+01 3.299117532018e-04 0.000000000000e+00 -3.299117402282e-04 -1.297354362086e-11 2.000000000000e+01 3.299328603024e-04 0.000000000000e+00 -3.299328473287e-04 -1.297374362086e-11 1.000000000000e+00 3.381608773918e-04 0.000000000000e+00 -3.381608644371e-04 -1.295474362084e-11 1.200000000000e+00 3.980721974282e-04 0.000000000000e+00 -3.980721844732e-04 -1.295494362086e-11 1.400000000000e+00 4.555964695727e-04 0.000000000000e+00 -4.555964566176e-04 -1.295514362086e-11 1.600000000000e+00 5.108099718072e-04 0.000000000000e+00 -5.108099588519e-04 -1.295534362086e-11 1.800000000000e+00 5.637870582295e-04 0.000000000000e+00 -5.637870452739e-04 -1.295554362086e-11 2.000000000000e+00 6.146001340623e-04 0.000000000000e+00 -6.146001211066e-04 -1.295574362086e-11 2.200000000000e+00 6.633196694738e-04 0.000000000000e+00 -6.633196565178e-04 -1.295594362086e-11 2.400000000000e+00 7.100141779315e-04 0.000000000000e+00 -7.100141649753e-04 -1.295614362086e-11 2.600000000000e+00 7.547502404331e-04 0.000000000000e+00 -7.547502274767e-04 -1.295634362086e-11 2.800000000000e+00 7.975925364799e-04 0.000000000000e+00 -7.975925235234e-04 -1.295654362086e-11 3.000000000000e+00 8.386038868998e-04 0.000000000000e+00 -8.386038739431e-04 -1.295674362086e-11 3.200000000000e+00 8.778453063211e-04 0.000000000000e+00 -8.778452933642e-04 -1.295694362086e-11 3.400000000000e+00 9.153760630678e-04 0.000000000000e+00 -9.153760501106e-04 -1.295714362086e-11 3.600000000000e+00 9.512537443472e-04 0.000000000000e+00 -9.512537313899e-04 -1.295734362086e-11 3.800000000000e+00 9.855343247816e-04 0.000000000000e+00 -9.855343118240e-04 -1.295754362086e-11 4.000000000000e+00 1.018272236546e-03 0.000000000000e+00 -1.018272223589e-03 -1.295774362086e-11 4.200000000000e+00 1.049520439606e-03 0.000000000000e+00 -1.049520426648e-03 -1.295794362086e-11 4.400000000000e+00 1.079330478920e-03 0.000000000000e+00 -1.079330465962e-03 -1.295814362086e-11 4.600000000000e+00 1.107752597386e-03 0.000000000000e+00 -1.107752584427e-03 -1.295834362086e-11 4.800000000000e+00 1.134835732226e-03 0.000000000000e+00 -1.134835719267e-03 -1.295854362086e-11 5.000000000000e+00 1.160627618228e-03 0.000000000000e+00 -1.160627605269e-03 -1.295874362086e-11 5.200000000000e+00 1.185174832697e-03 0.000000000000e+00 -1.185174819738e-03 -1.295894362086e-11 5.400000000000e+00 1.208522846139e-03 0.000000000000e+00 -1.208522833180e-03 -1.295914362086e-11 5.600000000000e+00 1.230716067926e-03 0.000000000000e+00 -1.230716054966e-03 -1.295934362086e-11 5.800000000000e+00 1.251797886760e-03 0.000000000000e+00 -1.251797873801e-03 -1.295954362086e-11 6.000000000000e+00 1.271810705914e-03 0.000000000000e+00 -1.271810692954e-03 -1.295974362086e-11 6.200000000000e+00 1.290795973218e-03 0.000000000000e+00 -1.290795960258e-03 -1.295994362086e-11 6.400000000000e+00 1.308794205919e-03 0.000000000000e+00 -1.308794192959e-03 -1.296014362086e-11 6.600000000000e+00 1.325845010529e-03 0.000000000000e+00 -1.325844997569e-03 -1.296034362086e-11 6.800000000000e+00 1.341987097876e-03 0.000000000000e+00 -1.341987084915e-03 -1.296054362086e-11 7.000000000000e+00 1.357258293601e-03 0.000000000000e+00 -1.357258280641e-03 -1.296074362086e-11 7.200000000000e+00 1.371695558040e-03 0.000000000000e+00 -1.371695545079e-03 -1.296094362086e-11 7.400000000000e+00 1.385334933266e-03 0.000000000000e+00 -1.385334920304e-03 -1.296114362086e-11 7.600000000000e+00 1.398211625962e-03 0.000000000000e+00 -1.398211613001e-03 -1.296134362086e-11 7.800000000000e+00 1.410359946438e-03 0.000000000000e+00 -1.410359933477e-03 -1.296154362086e-11 8.000000000000e+00 1.421813316116e-03 0.000000000000e+00 -1.421813303154e-03 -1.296174362086e-11 8.200000000000e+00 1.432604258635e-03 0.000000000000e+00 -1.432604245673e-03 -1.296194362086e-11 8.400000000000e+00 1.442764389445e-03 0.000000000000e+00 -1.442764376483e-03 -1.296214362086e-11 8.600000000000e+00 1.452324404500e-03 0.000000000000e+00 -1.452324391537e-03 -1.296234362086e-11 8.800000000000e+00 1.461314068638e-03 0.000000000000e+00 -1.461314055675e-03 -1.296254362086e-11 9.000000000000e+00 1.469762204271e-03 0.000000000000e+00 -1.469762191308e-03 -1.296274362086e-11 9.200000000000e+00 1.477696680948e-03 0.000000000000e+00 -1.477696667985e-03 -1.296294362086e-11 9.400000000000e+00 1.485144406352e-03 0.000000000000e+00 -1.485144393389e-03 -1.296314362086e-11 9.600000000000e+00 1.492131319226e-03 0.000000000000e+00 -1.492131306263e-03 -1.296334362086e-11 9.800000000000e+00 1.498682384650e-03 0.000000000000e+00 -1.498682371687e-03 -1.296354362086e-11 1.000000000000e+01 1.504821592030e-03 0.000000000000e+00 -1.504821579066e-03 -1.296374362086e-11 1.020000000000e+01 1.510571956053e-03 0.000000000000e+00 -1.510571943089e-03 -1.296394362086e-11 1.040000000000e+01 1.515955520788e-03 0.000000000000e+00 -1.515955507824e-03 -1.296414362086e-11 1.060000000000e+01 1.520993367006e-03 0.000000000000e+00 -1.520993354041e-03 -1.296434362086e-11 1.080000000000e+01 1.525705622720e-03 0.000000000000e+00 -1.525705609756e-03 -1.296454362086e-11 1.100000000000e+01 1.530111476861e-03 0.000000000000e+00 -1.530111463897e-03 -1.296474362086e-11 1.120000000000e+01 1.534229195922e-03 0.000000000000e+00 -1.534229182957e-03 -1.296494362086e-11 1.140000000000e+01 1.538076143370e-03 0.000000000000e+00 -1.538076130405e-03 -1.296514362086e-11 1.160000000000e+01 1.541668801561e-03 0.000000000000e+00 -1.541668788596e-03 -1.296534362086e-11 1.180000000000e+01 1.545022795862e-03 0.000000000000e+00 -1.545022782897e-03 -1.296554362086e-11 1.200000000000e+01 1.548152920675e-03 0.000000000000e+00 -1.548152907710e-03 -1.296574362086e-11 1.220000000000e+01 1.551073167033e-03 0.000000000000e+00 -1.551073154067e-03 -1.296594362086e-11 1.240000000000e+01 1.553796751446e-03 0.000000000000e+00 -1.553796738480e-03 -1.296614362086e-11 1.260000000000e+01 1.556336145698e-03 0.000000000000e+00 -1.556336132732e-03 -1.296634362086e-11 1.280000000000e+01 1.558703107272e-03 0.000000000000e+00 -1.558703094305e-03 -1.296654362086e-11 1.300000000000e+01 1.560908710149e-03 0.000000000000e+00 -1.560908697182e-03 -1.296674362086e-11 1.320000000000e+01 1.562963375715e-03 0.000000000000e+00 -1.562963362748e-03 -1.296694362086e-11 1.340000000000e+01 1.564876903551e-03 0.000000000000e+00 -1.564876890584e-03 -1.296714362086e-11 1.360000000000e+01 1.566658501908e-03 0.000000000000e+00 -1.566658488941e-03 -1.296734362086e-11 1.380000000000e+01 1.568316817690e-03 0.000000000000e+00 -1.568316804722e-03 -1.296754362086e-11 1.400000000000e+01 1.569859965800e-03 0.000000000000e+00 -1.569859952832e-03 -1.296774362086e-11 1.420000000000e+01 1.571295557728e-03 0.000000000000e+00 -1.571295544760e-03 -1.296794362086e-11 1.440000000000e+01 1.572630729282e-03 0.000000000000e+00 -1.572630716314e-03 -1.296814362086e-11 1.460000000000e+01 1.573872167381e-03 0.000000000000e+00 -1.573872154413e-03 -1.296834362086e-11 1.480000000000e+01 1.575026135862e-03 0.000000000000e+00 -1.575026122893e-03 -1.296854362086e-11 1.500000000000e+01 1.576098500248e-03 0.000000000000e+00 -1.576098487279e-03 -1.296874362086e-11 1.520000000000e+01 1.577094751466e-03 0.000000000000e+00 -1.577094738497e-03 -1.296894362086e-11 1.540000000000e+01 1.578020028490e-03 0.000000000000e+00 -1.578020015521e-03 -1.296914362086e-11 1.560000000000e+01 1.578879139925e-03 0.000000000000e+00 -1.578879126955e-03 -1.296934362086e-11 1.580000000000e+01 1.579676584517e-03 0.000000000000e+00 -1.579676571547e-03 -1.296954362086e-11 1.600000000000e+01 1.580416570638e-03 0.000000000000e+00 -1.580416557668e-03 -1.296974362086e-11 1.620000000000e+01 1.581103034740e-03 0.000000000000e+00 -1.581103021770e-03 -1.296994362086e-11 1.640000000000e+01 1.581739658831e-03 0.000000000000e+00 -1.581739645861e-03 -1.297014362086e-11 1.660000000000e+01 1.582329886988e-03 0.000000000000e+00 -1.582329874018e-03 -1.297034362086e-11 1.680000000000e+01 1.582876940958e-03 0.000000000000e+00 -1.582876927988e-03 -1.297054362086e-11 1.700000000000e+01 1.583383834882e-03 0.000000000000e+00 -1.583383821911e-03 -1.297074362086e-11 1.720000000000e+01 1.583853389177e-03 0.000000000000e+00 -1.583853376206e-03 -1.297094362086e-11 1.740000000000e+01 1.584288243629e-03 0.000000000000e+00 -1.584288230658e-03 -1.297114362086e-11 1.760000000000e+01 1.584690869732e-03 0.000000000000e+00 -1.584690856761e-03 -1.297134362086e-11 1.780000000000e+01 1.585063582314e-03 0.000000000000e+00 -1.585063569343e-03 -1.297154362086e-11 1.800000000000e+01 1.585408550502e-03 0.000000000000e+00 -1.585408537531e-03 -1.297174362086e-11 1.820000000000e+01 1.585727808055e-03 0.000000000000e+00 -1.585727795083e-03 -1.297194362086e-11 1.840000000000e+01 1.586023263108e-03 0.000000000000e+00 -1.586023250136e-03 -1.297214362086e-11 1.860000000000e+01 1.586296707369e-03 0.000000000000e+00 -1.586296694397e-03 -1.297234362086e-11 1.880000000000e+01 1.586549824786e-03 0.000000000000e+00 -1.586549811813e-03 -1.297254362086e-11 1.900000000000e+01 1.586784199722e-03 0.000000000000e+00 -1.586784186749e-03 -1.297274362086e-11 1.920000000000e+01 1.587001324645e-03 0.000000000000e+00 -1.587001311673e-03 -1.297294362086e-11 1.940000000000e+01 1.587202607348e-03 0.000000000000e+00 -1.587202594375e-03 -1.297314362086e-11 1.960000000000e+01 1.587389377666e-03 0.000000000000e+00 -1.587389364693e-03 -1.297334362086e-11 1.980000000000e+01 1.587562893670e-03 0.000000000000e+00 -1.587562880697e-03 -1.297354362086e-11 2.000000000000e+01 1.587724347264e-03 0.000000000000e+00 -1.587724334290e-03 -1.297374362086e-11 ngspice-26/tests/hisimhv1/nmos/reference/acFreq.standard0000644000265600020320000000754112264261473022767 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.83878311423964e-14 2.87555676803686e-14 3.59793946695449e-15 1258.925411794 2.83878311424009e-14 2.87555676803607e-14 3.59793946695495e-15 1584.893192461 2.83878311423932e-14 2.87555676803645e-14 3.5979394669553e-15 1995.262314969 2.8387831142388e-14 2.8755567680362e-14 3.59793946695432e-15 2511.88643151 2.83878311423869e-14 2.87555676803559e-14 3.59793946695396e-15 3162.277660168 2.83878311423945e-14 2.87555676803624e-14 3.59793946695535e-15 3981.071705535 2.83878311423878e-14 2.87555676803569e-14 3.59793946695463e-15 5011.872336273 2.83878311423882e-14 2.87555676803555e-14 3.5979394669532e-15 6309.573444802 2.83878311423966e-14 2.87555676803538e-14 3.59793946695518e-15 7943.282347243 2.83878311423852e-14 2.87555676803485e-14 3.59793946695412e-15 10000 2.83878311423805e-14 2.87555676803527e-14 3.5979394669529e-15 12589.25411794 2.83878311423756e-14 2.87555676803354e-14 3.59793946695242e-15 15848.93192461 2.8387831142363e-14 2.87555676803243e-14 3.59793946695028e-15 19952.62314969 2.83878311423321e-14 2.87555676802982e-14 3.59793946694634e-15 25118.8643151 2.83878311422982e-14 2.87555676802546e-14 3.59793946694129e-15 31622.77660168 2.83878311422586e-14 2.87555676802014e-14 3.59793946693471e-15 39810.71705535 2.83878311421719e-14 2.8755567680105e-14 3.59793946692265e-15 50118.72336273 2.83878311420452e-14 2.87555676799522e-14 3.59793946690239e-15 63095.73444802 2.83878311418417e-14 2.87555676797232e-14 3.59793946687446e-15 79432.82347243 2.83878311415236e-14 2.87555676793467e-14 3.59793946682588e-15 100000 2.83878311410117e-14 2.87555676787452e-14 3.59793946675077e-15 125892.5411794 2.83878311402138e-14 2.87555676777943e-14 3.59793946663258e-15 158489.3192461 2.83878311389387e-14 2.87555676762975e-14 3.59793946644316e-15 199526.2314969 2.8387831136924e-14 2.87555676739169e-14 3.5979394661431e-15 251188.643151 2.83878311337191e-14 2.87555676701422e-14 3.59793946566774e-15 316227.7660168 2.83878311286597e-14 2.87555676641766e-14 3.59793946491601e-15 398107.1705535 2.83878311206238e-14 2.8755567654707e-14 3.59793946372282e-15 501187.2336273 2.83878311078889e-14 2.87555676396988e-14 3.59793946183103e-15 630957.3444802 2.83878310877102e-14 2.87555676159308e-14 3.59793945883798e-15 794328.2347243 2.83878310557277e-14 2.87555675782229e-14 3.59793945408873e-15 1000000 2.83878310050457e-14 2.87555675184921e-14 3.59793944656356e-15 1258925.411794 2.83878309247161e-14 2.87555674238266e-14 3.59793943463662e-15 1584893.192461 2.83878307973903e-14 2.8755567273764e-14 3.59793941573308e-15 1995262.314969 2.83878305956051e-14 2.8755567035945e-14 3.59793938577363e-15 2511886.43151 2.83878302757896e-14 2.87555666590317e-14 3.59793933829114e-15 3162277.660168 2.83878297689305e-14 2.87555660616794e-14 3.59793926303749e-15 3981071.705535 2.83878289655984e-14 2.87555651149182e-14 3.59793914376717e-15 5011872.336273 2.83878276924042e-14 2.87555636144052e-14 3.5979389547356e-15 6309573.444802 2.83878256745376e-14 2.87555612362617e-14 3.59793865514451e-15 7943282.347243 2.83878224764131e-14 2.87555574671439e-14 3.5979381803214e-15 10000000 2.83878174077545e-14 2.87555514935151e-14 3.5979374277786e-15 12589254.11794 2.83878093744669e-14 2.87555420259462e-14 3.59793623508001e-15 15848931.92461 2.83877966425767e-14 2.87555270208768e-14 3.59793434478015e-15 19952623.14969 2.83877764639151e-14 2.87555032394836e-14 3.59793134886275e-15 25118864.3151 2.83877444829741e-14 2.87554655486029e-14 3.59792660066492e-15 31622776.60168 2.83876937968082e-14 2.87554058128288e-14 3.59791907530905e-15 39810717.05535 2.83876134651276e-14 2.87553111385793e-14 3.59790714849616e-15 50118723.36273 2.83874861492476e-14 2.87551610914763e-14 3.59788824595509e-15 63095734.44802 2.83872843702957e-14 2.87549232865295e-14 3.59785828791652e-15 79432823.47243 2.83869645800938e-14 2.87545464003665e-14 3.597810808788e-15 100000000 2.83864577665244e-14 2.87539490993141e-14 3.59773556237148e-15 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_she.standard0000644000265600020320000003204412264261473023321 0ustar andreasadminV(d) I(d) 1.000000000000e+00 5.460525274646e-05 1.500000000000e+00 5.488106747967e-05 2.000000000000e+00 5.511619191465e-05 2.500000000000e+00 5.533133608670e-05 3.000000000000e+00 5.553404913109e-05 3.500000000000e+00 5.572804571977e-05 4.000000000000e+00 5.591549238690e-05 4.500000000000e+00 5.609779068518e-05 5.000000000000e+00 5.627591202132e-05 5.500000000000e+00 5.645056363870e-05 6.000000000000e+00 5.662227987162e-05 6.500000000000e+00 5.679147627524e-05 7.000000000000e+00 5.695848365394e-05 7.500000000000e+00 5.712357045714e-05 8.000000000000e+00 5.728695807841e-05 8.500000000000e+00 5.744883163427e-05 9.000000000000e+00 5.760934775884e-05 9.500000000000e+00 5.776864036772e-05 1.000000000000e+01 5.792682500341e-05 1.050000000000e+01 5.808400216746e-05 1.100000000000e+01 5.824025991413e-05 1.150000000000e+01 5.839567589629e-05 1.200000000000e+01 5.855031899885e-05 1.250000000000e+01 5.870425065684e-05 1.300000000000e+01 5.885752592964e-05 1.350000000000e+01 5.901019438416e-05 1.400000000000e+01 5.916230082712e-05 1.450000000000e+01 5.931388591652e-05 1.500000000000e+01 5.946498667604e-05 1.550000000000e+01 5.961563693036e-05 1.600000000000e+01 5.976586767582e-05 1.650000000000e+01 5.991570739783e-05 1.700000000000e+01 6.006518234399e-05 1.750000000000e+01 6.021431676028e-05 1.800000000000e+01 6.036313309627e-05 1.850000000000e+01 6.051165218409e-05 1.900000000000e+01 6.065989339521e-05 1.950000000000e+01 6.080787477828e-05 2.000000000000e+01 6.095561318075e-05 1.000000000000e+00 5.686441046535e-04 1.500000000000e+00 7.907303328642e-04 2.000000000000e+00 9.733226631619e-04 2.500000000000e+00 1.118594634060e-03 3.000000000000e+00 1.229552657026e-03 3.500000000000e+00 1.310288577563e-03 4.000000000000e+00 1.365853827033e-03 4.500000000000e+00 1.401721684826e-03 5.000000000000e+00 1.423114314452e-03 5.500000000000e+00 1.434538042390e-03 6.000000000000e+00 1.439703440738e-03 6.500000000000e+00 1.441927257984e-03 7.000000000000e+00 1.443543668089e-03 7.500000000000e+00 1.444978375011e-03 8.000000000000e+00 1.446274709991e-03 8.500000000000e+00 1.447458750141e-03 9.000000000000e+00 1.448550591284e-03 9.500000000000e+00 1.449565919856e-03 1.000000000000e+01 1.450517067539e-03 1.050000000000e+01 1.451413809118e-03 1.100000000000e+01 1.452263963941e-03 1.150000000000e+01 1.453073847305e-03 1.200000000000e+01 1.453848609169e-03 1.250000000000e+01 1.454592489117e-03 1.300000000000e+01 1.455309009308e-03 1.350000000000e+01 1.456001121505e-03 1.400000000000e+01 1.456671319954e-03 1.450000000000e+01 1.457321728763e-03 1.500000000000e+01 1.457954170092e-03 1.550000000000e+01 1.458570217807e-03 1.600000000000e+01 1.459171240043e-03 1.650000000000e+01 1.459758433237e-03 1.700000000000e+01 1.460332849539e-03 1.750000000000e+01 1.460895419068e-03 1.800000000000e+01 1.461446968088e-03 1.850000000000e+01 1.461988233974e-03 1.900000000000e+01 1.462519877598e-03 1.950000000000e+01 1.463042493645e-03 2.000000000000e+01 1.463556619270e-03 1.000000000000e+00 7.187512725883e-04 1.500000000000e+00 1.021318247284e-03 2.000000000000e+00 1.292921730516e-03 2.500000000000e+00 1.537692952283e-03 3.000000000000e+00 1.759087467675e-03 3.500000000000e+00 1.960005175986e-03 4.000000000000e+00 2.142890572288e-03 4.500000000000e+00 2.309814721949e-03 5.000000000000e+00 2.462541686036e-03 5.500000000000e+00 2.602582208829e-03 6.000000000000e+00 2.731237139138e-03 6.500000000000e+00 2.849632645250e-03 7.000000000000e+00 2.958748878461e-03 7.500000000000e+00 3.059443399899e-03 8.000000000000e+00 3.152470407202e-03 8.500000000000e+00 3.238496576923e-03 9.000000000000e+00 3.318114165713e-03 9.500000000000e+00 3.391851878852e-03 1.000000000000e+01 3.460183910616e-03 1.050000000000e+01 3.523537480275e-03 1.100000000000e+01 3.582299125120e-03 1.150000000000e+01 3.636819963351e-03 1.200000000000e+01 3.687420101706e-03 1.250000000000e+01 3.734392332720e-03 1.300000000000e+01 3.778005242542e-03 1.350000000000e+01 3.818505830681e-03 1.400000000000e+01 3.856121726944e-03 1.450000000000e+01 3.891063077149e-03 1.500000000000e+01 3.923524157614e-03 1.550000000000e+01 3.953684768312e-03 1.600000000000e+01 3.981711445921e-03 1.650000000000e+01 4.007758530419e-03 1.700000000000e+01 4.031969112432e-03 1.750000000000e+01 4.054475883011e-03 1.800000000000e+01 4.075401902900e-03 1.850000000000e+01 4.094861304563e-03 1.900000000000e+01 4.112959937133e-03 1.950000000000e+01 4.129795962017e-03 2.000000000000e+01 4.145460404997e-03 1.000000000000e+00 3.893267870539e-05 1.500000000000e+00 3.915693226874e-05 2.000000000000e+00 3.935416308596e-05 2.500000000000e+00 3.953795592203e-05 3.000000000000e+00 3.971330080568e-05 3.500000000000e+00 3.988268799696e-05 4.000000000000e+00 4.004758871707e-05 4.500000000000e+00 4.020896466534e-05 5.000000000000e+00 4.036748787324e-05 5.500000000000e+00 4.052365079339e-05 6.000000000000e+00 4.067782740171e-05 6.500000000000e+00 4.083030974917e-05 7.000000000000e+00 4.098133110917e-05 7.500000000000e+00 4.113108130899e-05 8.000000000000e+00 4.127971726061e-05 8.500000000000e+00 4.142737041534e-05 9.000000000000e+00 4.157415217687e-05 9.500000000000e+00 4.172015791850e-05 1.000000000000e+01 4.186547002137e-05 1.050000000000e+01 4.201016021069e-05 1.100000000000e+01 4.215429137875e-05 1.150000000000e+01 4.229791902609e-05 1.200000000000e+01 4.244109241431e-05 1.250000000000e+01 4.258385549811e-05 1.300000000000e+01 4.272624768589e-05 1.350000000000e+01 4.286830446619e-05 1.400000000000e+01 4.301005792756e-05 1.450000000000e+01 4.315153719336e-05 1.500000000000e+01 4.329276878774e-05 1.550000000000e+01 4.343377694581e-05 1.600000000000e+01 4.357458387787e-05 1.650000000000e+01 4.371520999588e-05 1.700000000000e+01 4.385567410852e-05 1.750000000000e+01 4.399599358990e-05 1.800000000000e+01 4.413618452628e-05 1.850000000000e+01 4.427626184413e-05 1.900000000000e+01 4.441623942231e-05 1.950000000000e+01 4.455613019072e-05 2.000000000000e+01 4.469594621751e-05 1.000000000000e+00 6.405518954875e-04 1.500000000000e+00 8.942633326683e-04 2.000000000000e+00 1.106088817029e-03 2.500000000000e+00 1.277821149067e-03 3.000000000000e+00 1.411746295769e-03 3.500000000000e+00 1.511345071452e-03 4.000000000000e+00 1.581556677864e-03 4.500000000000e+00 1.628277382388e-03 5.000000000000e+00 1.657393013765e-03 5.500000000000e+00 1.673987784668e-03 6.000000000000e+00 1.682137512766e-03 6.500000000000e+00 1.685411437775e-03 7.000000000000e+00 1.687415820240e-03 7.500000000000e+00 1.689149216513e-03 8.000000000000e+00 1.690676496583e-03 8.500000000000e+00 1.692039066471e-03 9.000000000000e+00 1.693268423665e-03 9.500000000000e+00 1.694388796600e-03 1.000000000000e+01 1.695418999172e-03 1.050000000000e+01 1.696373781374e-03 1.100000000000e+01 1.697264821878e-03 1.150000000000e+01 1.698101460561e-03 1.200000000000e+01 1.698891241406e-03 1.250000000000e+01 1.699640317105e-03 1.300000000000e+01 1.700353752620e-03 1.350000000000e+01 1.701035754684e-03 1.400000000000e+01 1.701689846743e-03 1.450000000000e+01 1.702319003434e-03 1.500000000000e+01 1.702925754847e-03 1.550000000000e+01 1.703512268054e-03 1.600000000000e+01 1.704080411384e-03 1.650000000000e+01 1.704631805509e-03 1.700000000000e+01 1.705167864365e-03 1.750000000000e+01 1.705689828163e-03 1.800000000000e+01 1.706198790232e-03 1.850000000000e+01 1.706695718970e-03 1.900000000000e+01 1.707181475932e-03 1.950000000000e+01 1.707656830809e-03 2.000000000000e+01 1.708122473926e-03 1.000000000000e+00 7.689039075611e-04 1.500000000000e+00 1.090356084766e-03 2.000000000000e+00 1.377966474927e-03 2.500000000000e+00 1.636489234108e-03 3.000000000000e+00 1.869843601354e-03 3.500000000000e+00 2.081280260446e-03 4.000000000000e+00 2.273512901369e-03 4.500000000000e+00 2.448821789056e-03 5.000000000000e+00 2.609135389396e-03 5.500000000000e+00 2.756094938697e-03 6.000000000000e+00 2.891105796752e-03 6.500000000000e+00 3.015378529728e-03 7.000000000000e+00 3.129961978206e-03 7.500000000000e+00 3.235770033002e-03 8.000000000000e+00 3.333603437425e-03 8.500000000000e+00 3.424167629520e-03 9.000000000000e+00 3.508087407573e-03 9.500000000000e+00 3.585919028377e-03 1.000000000000e+01 3.658160216414e-03 1.050000000000e+01 3.725258462658e-03 1.100000000000e+01 3.787617916180e-03 1.150000000000e+01 3.845605114059e-03 1.200000000000e+01 3.899553750697e-03 1.250000000000e+01 3.949768652990e-03 1.300000000000e+01 3.996529100249e-03 1.350000000000e+01 4.040091605398e-03 1.400000000000e+01 4.080692255346e-03 1.450000000000e+01 4.118548692619e-03 1.500000000000e+01 4.153861806638e-03 1.550000000000e+01 4.186817191150e-03 1.600000000000e+01 4.217586413908e-03 1.650000000000e+01 4.246328135724e-03 1.700000000000e+01 4.273189108342e-03 1.750000000000e+01 4.298305074077e-03 1.800000000000e+01 4.321801584872e-03 1.850000000000e+01 4.343794754103e-03 1.900000000000e+01 4.364391951076e-03 1.950000000000e+01 4.383692445595e-03 2.000000000000e+01 4.401788007992e-03 1.000000000000e+00 7.779539259719e-05 1.500000000000e+00 7.815834122543e-05 2.000000000000e+00 7.844271095163e-05 2.500000000000e+00 7.869546456667e-05 3.000000000000e+00 7.892916462539e-05 3.500000000000e+00 7.914975969308e-05 4.000000000000e+00 7.936062589492e-05 4.500000000000e+00 7.956390248756e-05 5.000000000000e+00 7.976104869731e-05 5.500000000000e+00 7.995311373597e-05 6.000000000000e+00 8.014088244994e-05 6.500000000000e+00 8.032496032217e-05 7.000000000000e+00 8.050582617300e-05 7.500000000000e+00 8.068386643803e-05 8.000000000000e+00 8.085939834776e-05 8.500000000000e+00 8.103268611635e-05 9.000000000000e+00 8.120395255969e-05 9.500000000000e+00 8.137338762963e-05 1.000000000000e+01 8.154115481043e-05 1.050000000000e+01 8.170739599829e-05 1.100000000000e+01 8.187223528199e-05 1.150000000000e+01 8.203578191285e-05 1.200000000000e+01 8.219813266708e-05 1.250000000000e+01 8.235937374577e-05 1.300000000000e+01 8.251958231858e-05 1.350000000000e+01 8.267882778958e-05 1.400000000000e+01 8.283717284398e-05 1.450000000000e+01 8.299467432037e-05 1.500000000000e+01 8.315138394276e-05 1.550000000000e+01 8.330734893904e-05 1.600000000000e+01 8.346261256661e-05 1.650000000000e+01 8.361721456168e-05 1.700000000000e+01 8.377119152538e-05 1.750000000000e+01 8.392457725718e-05 1.800000000000e+01 8.407740304414e-05 1.850000000000e+01 8.422969791298e-05 1.900000000000e+01 8.438148885054e-05 1.950000000000e+01 8.453280099748e-05 2.000000000000e+01 8.468365781896e-05 1.000000000000e+00 4.708169871230e-04 1.500000000000e+00 6.503201437006e-04 2.000000000000e+00 7.943478517163e-04 2.500000000000e+00 9.055841045553e-04 3.000000000000e+00 9.877659608387e-04 3.500000000000e+00 1.045530506439e-03 4.000000000000e+00 1.083989594391e-03 4.500000000000e+00 1.108149592722e-03 5.000000000000e+00 1.122392674956e-03 5.500000000000e+00 1.130201174414e-03 6.000000000000e+00 1.134171411875e-03 6.500000000000e+00 1.136209071074e-03 7.000000000000e+00 1.137571965132e-03 7.500000000000e+00 1.138741639857e-03 8.000000000000e+00 1.139813463477e-03 8.500000000000e+00 1.140811890691e-03 9.000000000000e+00 1.141750223591e-03 9.500000000000e+00 1.142638146472e-03 1.000000000000e+01 1.143483204798e-03 1.050000000000e+01 1.144291407590e-03 1.100000000000e+01 1.145067602744e-03 1.150000000000e+01 1.145815744315e-03 1.200000000000e+01 1.146539090317e-03 1.250000000000e+01 1.147240351323e-03 1.300000000000e+01 1.147921803205e-03 1.350000000000e+01 1.148585373441e-03 1.400000000000e+01 1.149232707748e-03 1.450000000000e+01 1.149865221975e-03 1.500000000000e+01 1.150484142880e-03 1.550000000000e+01 1.151090540418e-03 1.600000000000e+01 1.151685353545e-03 1.650000000000e+01 1.152269410981e-03 1.700000000000e+01 1.152843448061e-03 1.750000000000e+01 1.153408120504e-03 1.800000000000e+01 1.153964015738e-03 1.850000000000e+01 1.154511662291e-03 1.900000000000e+01 1.155051537610e-03 1.950000000000e+01 1.155584074627e-03 2.000000000000e+01 1.156109667292e-03 1.000000000000e+00 6.375246114306e-04 1.500000000000e+00 9.083216531623e-04 2.000000000000e+00 1.152384630464e-03 2.500000000000e+00 1.372975531270e-03 3.000000000000e+00 1.572886180427e-03 3.500000000000e+00 1.754503845679e-03 4.000000000000e+00 1.919872870214e-03 4.500000000000e+00 2.070748977551e-03 5.000000000000e+00 2.208645653068e-03 5.500000000000e+00 2.334873119002e-03 6.000000000000e+00 2.450570832198e-03 6.500000000000e+00 2.556734478958e-03 7.000000000000e+00 2.654238376893e-03 7.500000000000e+00 2.743854071949e-03 8.000000000000e+00 2.826265793865e-03 8.500000000000e+00 2.902083318700e-03 9.000000000000e+00 2.971852688674e-03 9.500000000000e+00 3.036065157917e-03 1.000000000000e+01 3.095164666189e-03 1.050000000000e+01 3.149554089032e-03 1.100000000000e+01 3.199600469760e-03 1.150000000000e+01 3.245639403998e-03 1.200000000000e+01 3.287978719436e-03 1.250000000000e+01 3.326901570440e-03 1.300000000000e+01 3.362669048119e-03 1.350000000000e+01 3.395522390326e-03 1.400000000000e+01 3.425684862389e-03 1.450000000000e+01 3.453363367503e-03 1.500000000000e+01 3.478749835442e-03 1.550000000000e+01 3.502022429431e-03 1.600000000000e+01 3.523346603427e-03 1.650000000000e+01 3.542876035757e-03 1.700000000000e+01 3.560753459899e-03 1.750000000000e+01 3.577111409160e-03 1.800000000000e+01 3.592072888882e-03 1.850000000000e+01 3.605751987529e-03 1.900000000000e+01 3.618254436287e-03 1.950000000000e+01 3.629678125495e-03 2.000000000000e+01 3.640113585113e-03 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_corsrd0.standard0000644000265600020320000010243012264261473024113 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.465828119889e-05 0.000000000000e+00 -5.465828119789e-05 -1.000000000000e-15 1.500000000000e+00 5.492810137899e-05 0.000000000000e+00 -5.492810137749e-05 -1.500000000000e-15 2.000000000000e+00 5.516111689748e-05 0.000000000000e+00 -5.516111689548e-05 -2.000000000000e-15 2.500000000000e+00 5.537536554167e-05 0.000000000000e+00 -5.537536553917e-05 -2.500000000000e-15 3.000000000000e+00 5.557771723809e-05 0.000000000000e+00 -5.557771723509e-05 -3.000000000000e-15 3.500000000000e+00 5.577164060472e-05 0.000000000000e+00 -5.577164060122e-05 -3.500000000000e-15 4.000000000000e+00 5.595919007446e-05 0.000000000000e+00 -5.595919007046e-05 -4.000000000000e-15 4.500000000000e+00 5.614170802235e-05 0.000000000000e+00 -5.614170801785e-05 -4.500000000000e-15 5.000000000000e+00 5.632013133645e-05 0.000000000000e+00 -5.632013133145e-05 -5.000000000000e-15 5.500000000000e+00 5.649514563482e-05 0.000000000000e+00 -5.649514562932e-05 -5.500000000000e-15 6.000000000000e+00 5.666727095972e-05 0.000000000000e+00 -5.666727095372e-05 -6.000000000000e-15 6.500000000000e+00 5.683691302037e-05 0.000000000000e+00 -5.683691301387e-05 -6.500000000000e-15 7.000000000000e+00 5.700439560939e-05 0.000000000000e+00 -5.700439560239e-05 -7.000000000000e-15 7.500000000000e+00 5.716998204559e-05 0.000000000000e+00 -5.716998203809e-05 -7.500000000000e-15 8.000000000000e+00 5.733388988277e-05 0.000000000000e+00 -5.733388987477e-05 -8.000000000000e-15 8.500000000000e+00 5.749630130854e-05 0.000000000000e+00 -5.749630130004e-05 -8.500000000000e-15 9.000000000000e+00 5.765737068636e-05 0.000000000000e+00 -5.765737067736e-05 -9.000000000000e-15 9.500000000000e+00 5.781723014667e-05 0.000000000000e+00 -5.781723013717e-05 -9.500000000000e-15 1.000000000000e+01 5.797599381146e-05 0.000000000000e+00 -5.797599380146e-05 -1.000000000000e-14 1.050000000000e+01 5.813376103989e-05 0.000000000000e+00 -5.813376102939e-05 -1.050000000000e-14 1.100000000000e+01 5.829061895905e-05 0.000000000000e+00 -5.829061894805e-05 -1.100000000000e-14 1.150000000000e+01 5.844664446320e-05 0.000000000000e+00 -5.844664445170e-05 -1.150000000000e-14 1.200000000000e+01 5.860190581220e-05 0.000000000000e+00 -5.860190580020e-05 -1.200000000000e-14 1.250000000000e+01 5.875646392292e-05 0.000000000000e+00 -5.875646391042e-05 -1.250000000000e-14 1.300000000000e+01 5.891037342288e-05 0.000000000000e+00 -5.891037340988e-05 -1.300000000000e-14 1.350000000000e+01 5.906368351750e-05 0.000000000000e+00 -5.906368350400e-05 -1.350000000000e-14 1.400000000000e+01 5.921643870969e-05 0.000000000000e+00 -5.921643869569e-05 -1.400000000000e-14 1.450000000000e+01 5.936867940143e-05 0.000000000000e+00 -5.936867938693e-05 -1.450000000000e-14 1.500000000000e+01 5.952044240004e-05 0.000000000000e+00 -5.952044238504e-05 -1.500000000000e-14 1.550000000000e+01 5.967176134713e-05 0.000000000000e+00 -5.967176133163e-05 -1.550000000000e-14 1.600000000000e+01 5.982266708397e-05 0.000000000000e+00 -5.982266706797e-05 -1.600000000000e-14 1.650000000000e+01 5.997318796459e-05 0.000000000000e+00 -5.997318794809e-05 -1.650000000000e-14 1.700000000000e+01 6.012335012537e-05 0.000000000000e+00 -6.012335010837e-05 -1.700000000000e-14 1.750000000000e+01 6.027317771833e-05 0.000000000000e+00 -6.027317770083e-05 -1.750000000000e-14 1.800000000000e+01 6.042269311381e-05 0.000000000000e+00 -6.042269309581e-05 -1.800000000000e-14 1.850000000000e+01 6.057191707750e-05 0.000000000000e+00 -6.057191705900e-05 -1.850000000000e-14 1.900000000000e+01 6.072086892543e-05 0.000000000000e+00 -6.072086890643e-05 -1.900000000000e-14 1.950000000000e+01 6.086956666039e-05 0.000000000000e+00 -6.086956664089e-05 -1.950000000000e-14 2.000000000000e+01 6.101802709229e-05 0.000000000000e+00 -6.101802707229e-05 -2.000000000000e-14 1.000000000000e+00 1.136014115337e-03 0.000000000000e+00 -1.136014115336e-03 -1.000000000000e-15 1.500000000000e+00 1.317377314358e-03 0.000000000000e+00 -1.317377314357e-03 -1.500000000000e-15 2.000000000000e+00 1.401876333709e-03 0.000000000000e+00 -1.401876333707e-03 -2.000000000000e-15 2.500000000000e+00 1.440288630929e-03 0.000000000000e+00 -1.440288630927e-03 -2.500000000000e-15 3.000000000000e+00 1.456082370697e-03 0.000000000000e+00 -1.456082370694e-03 -3.000000000000e-15 3.500000000000e+00 1.461196438010e-03 0.000000000000e+00 -1.461196438007e-03 -3.500000000000e-15 4.000000000000e+00 1.463132104947e-03 0.000000000000e+00 -1.463132104943e-03 -4.000000000000e-15 4.500000000000e+00 1.464768539688e-03 0.000000000000e+00 -1.464768539684e-03 -4.500000000000e-15 5.000000000000e+00 1.466273486622e-03 0.000000000000e+00 -1.466273486617e-03 -5.000000000000e-15 5.500000000000e+00 1.467674227470e-03 0.000000000000e+00 -1.467674227465e-03 -5.500000000000e-15 6.000000000000e+00 1.468991434957e-03 0.000000000000e+00 -1.468991434951e-03 -6.000000000000e-15 6.500000000000e+00 1.470240953483e-03 0.000000000000e+00 -1.470240953477e-03 -6.500000000000e-15 7.000000000000e+00 1.471434863701e-03 0.000000000000e+00 -1.471434863694e-03 -7.000000000000e-15 7.500000000000e+00 1.472582418767e-03 0.000000000000e+00 -1.472582418759e-03 -7.500000000000e-15 8.000000000000e+00 1.473690776909e-03 0.000000000000e+00 -1.473690776901e-03 -8.000000000000e-15 8.500000000000e+00 1.474765545386e-03 0.000000000000e+00 -1.474765545377e-03 -8.500000000000e-15 9.000000000000e+00 1.475811176095e-03 0.000000000000e+00 -1.475811176086e-03 -9.000000000000e-15 9.500000000000e+00 1.476831251803e-03 0.000000000000e+00 -1.476831251793e-03 -9.500000000000e-15 1.000000000000e+01 1.477828693835e-03 0.000000000000e+00 -1.477828693825e-03 -1.000000000000e-14 1.050000000000e+01 1.478805913901e-03 0.000000000000e+00 -1.478805913890e-03 -1.050000000000e-14 1.100000000000e+01 1.479764926155e-03 0.000000000000e+00 -1.479764926144e-03 -1.100000000000e-14 1.150000000000e+01 1.480707430828e-03 0.000000000000e+00 -1.480707430816e-03 -1.150000000000e-14 1.200000000000e+01 1.481634877340e-03 0.000000000000e+00 -1.481634877328e-03 -1.200000000000e-14 1.250000000000e+01 1.482548512493e-03 0.000000000000e+00 -1.482548512481e-03 -1.250000000000e-14 1.300000000000e+01 1.483449417680e-03 0.000000000000e+00 -1.483449417667e-03 -1.300000000000e-14 1.350000000000e+01 1.484338537920e-03 0.000000000000e+00 -1.484338537907e-03 -1.350000000000e-14 1.400000000000e+01 1.485216704774e-03 0.000000000000e+00 -1.485216704760e-03 -1.400000000000e-14 1.450000000000e+01 1.486084654586e-03 0.000000000000e+00 -1.486084654571e-03 -1.450000000000e-14 1.500000000000e+01 1.486943043165e-03 0.000000000000e+00 -1.486943043150e-03 -1.500000000000e-14 1.550000000000e+01 1.487792457692e-03 0.000000000000e+00 -1.487792457677e-03 -1.550000000000e-14 1.600000000000e+01 1.488633426463e-03 0.000000000000e+00 -1.488633426447e-03 -1.600000000000e-14 1.650000000000e+01 1.489466426924e-03 0.000000000000e+00 -1.489466426907e-03 -1.650000000000e-14 1.700000000000e+01 1.490291892355e-03 0.000000000000e+00 -1.490291892338e-03 -1.700000000000e-14 1.750000000000e+01 1.491110217454e-03 0.000000000000e+00 -1.491110217437e-03 -1.750000000000e-14 1.800000000000e+01 1.491921763046e-03 0.000000000000e+00 -1.491921763028e-03 -1.800000000000e-14 1.850000000000e+01 1.492726860071e-03 0.000000000000e+00 -1.492726860052e-03 -1.850000000000e-14 1.900000000000e+01 1.493525812987e-03 0.000000000000e+00 -1.493525812968e-03 -1.900000000000e-14 1.950000000000e+01 1.494318902686e-03 0.000000000000e+00 -1.494318902667e-03 -1.950000000000e-14 2.000000000000e+01 1.495106389006e-03 0.000000000000e+00 -1.495106388986e-03 -2.000000000000e-14 1.000000000000e+00 2.979153597388e-03 0.000000000000e+00 -2.979153597387e-03 -1.000000000000e-15 1.500000000000e+00 3.648228288899e-03 0.000000000000e+00 -3.648228288897e-03 -1.500000000000e-15 2.000000000000e+00 4.033894021731e-03 0.000000000000e+00 -4.033894021729e-03 -2.000000000000e-15 2.500000000000e+00 4.267254421394e-03 0.000000000000e+00 -4.267254421391e-03 -2.500000000000e-15 3.000000000000e+00 4.415887332002e-03 0.000000000000e+00 -4.415887331999e-03 -3.000000000000e-15 3.500000000000e+00 4.514803709258e-03 0.000000000000e+00 -4.514803709254e-03 -3.500000000000e-15 4.000000000000e+00 4.582999506450e-03 0.000000000000e+00 -4.582999506446e-03 -4.000000000000e-15 4.500000000000e+00 4.631345100192e-03 0.000000000000e+00 -4.631345100187e-03 -4.500000000000e-15 5.000000000000e+00 4.666381173216e-03 0.000000000000e+00 -4.666381173211e-03 -5.000000000000e-15 5.500000000000e+00 4.692221594512e-03 0.000000000000e+00 -4.692221594507e-03 -5.500000000000e-15 6.000000000000e+00 4.711553870586e-03 0.000000000000e+00 -4.711553870580e-03 -6.000000000000e-15 6.500000000000e+00 4.726190332835e-03 0.000000000000e+00 -4.726190332829e-03 -6.500000000000e-15 7.000000000000e+00 4.737385547062e-03 0.000000000000e+00 -4.737385547055e-03 -7.000000000000e-15 7.500000000000e+00 4.746026816430e-03 0.000000000000e+00 -4.746026816423e-03 -7.500000000000e-15 8.000000000000e+00 4.752752916439e-03 0.000000000000e+00 -4.752752916431e-03 -8.000000000000e-15 8.500000000000e+00 4.758030595832e-03 0.000000000000e+00 -4.758030595823e-03 -8.500000000000e-15 9.000000000000e+00 4.762205275850e-03 0.000000000000e+00 -4.762205275841e-03 -9.000000000000e-15 9.500000000000e+00 4.765535455992e-03 0.000000000000e+00 -4.765535455982e-03 -9.500000000000e-15 1.000000000000e+01 4.768216543054e-03 0.000000000000e+00 -4.768216543044e-03 -1.000000000000e-14 1.050000000000e+01 4.770397665342e-03 0.000000000000e+00 -4.770397665331e-03 -1.050000000000e-14 1.100000000000e+01 4.772193769672e-03 0.000000000000e+00 -4.772193769661e-03 -1.100000000000e-14 1.150000000000e+01 4.773694551299e-03 0.000000000000e+00 -4.773694551288e-03 -1.150000000000e-14 1.200000000000e+01 4.774971359434e-03 0.000000000000e+00 -4.774971359422e-03 -1.200000000000e-14 1.250000000000e+01 4.776083083556e-03 0.000000000000e+00 -4.776083083543e-03 -1.250000000000e-14 1.300000000000e+01 4.777081778965e-03 0.000000000000e+00 -4.777081778952e-03 -1.300000000000e-14 1.350000000000e+01 4.778015060476e-03 0.000000000000e+00 -4.778015060462e-03 -1.350000000000e-14 1.400000000000e+01 4.778916264866e-03 0.000000000000e+00 -4.778916264852e-03 -1.400000000000e-14 1.450000000000e+01 4.779798402903e-03 0.000000000000e+00 -4.779798402888e-03 -1.450000000000e-14 1.500000000000e+01 4.780665122203e-03 0.000000000000e+00 -4.780665122188e-03 -1.500000000000e-14 1.550000000000e+01 4.781517955363e-03 0.000000000000e+00 -4.781517955348e-03 -1.550000000000e-14 1.600000000000e+01 4.782357987147e-03 0.000000000000e+00 -4.782357987131e-03 -1.600000000000e-14 1.650000000000e+01 4.783186145876e-03 0.000000000000e+00 -4.783186145860e-03 -1.650000000000e-14 1.700000000000e+01 4.784003261605e-03 0.000000000000e+00 -4.784003261588e-03 -1.700000000000e-14 1.750000000000e+01 4.784810084024e-03 0.000000000000e+00 -4.784810084006e-03 -1.750000000000e-14 1.800000000000e+01 4.785607292319e-03 0.000000000000e+00 -4.785607292301e-03 -1.800000000000e-14 1.850000000000e+01 4.786395502837e-03 0.000000000000e+00 -4.786395502819e-03 -1.850000000000e-14 1.900000000000e+01 4.787175275740e-03 0.000000000000e+00 -4.787175275721e-03 -1.900000000000e-14 1.950000000000e+01 4.787947120923e-03 0.000000000000e+00 -4.787947120904e-03 -1.950000000000e-14 2.000000000000e+01 4.788711503302e-03 0.000000000000e+00 -4.788711503282e-03 -2.000000000000e-14 1.000000000000e+00 3.896160616323e-05 0.000000000000e+00 -3.896160616223e-05 -1.000000000000e-15 1.500000000000e+00 3.918312890574e-05 0.000000000000e+00 -3.918312890424e-05 -1.500000000000e-15 2.000000000000e+00 3.937946631495e-05 0.000000000000e+00 -3.937946631295e-05 -2.000000000000e-15 2.500000000000e+00 3.956293278094e-05 0.000000000000e+00 -3.956293277844e-05 -2.500000000000e-15 3.000000000000e+00 3.973820230410e-05 0.000000000000e+00 -3.973820230110e-05 -3.000000000000e-15 3.500000000000e+00 3.990765110638e-05 0.000000000000e+00 -3.990765110288e-05 -3.500000000000e-15 4.000000000000e+00 4.007269828895e-05 0.000000000000e+00 -4.007269828495e-05 -4.000000000000e-15 4.500000000000e+00 4.023427788977e-05 0.000000000000e+00 -4.023427788527e-05 -4.500000000000e-15 5.000000000000e+00 4.039304571664e-05 0.000000000000e+00 -4.039304571164e-05 -5.000000000000e-15 5.500000000000e+00 4.054948400887e-05 0.000000000000e+00 -4.054948400337e-05 -5.500000000000e-15 6.000000000000e+00 4.070395996553e-05 0.000000000000e+00 -4.070395995953e-05 -6.000000000000e-15 6.500000000000e+00 4.085676095465e-05 0.000000000000e+00 -4.085676094815e-05 -6.500000000000e-15 7.000000000000e+00 4.100811690748e-05 0.000000000000e+00 -4.100811690048e-05 -7.000000000000e-15 7.500000000000e+00 4.115821520279e-05 0.000000000000e+00 -4.115821519529e-05 -7.500000000000e-15 8.000000000000e+00 4.130721091938e-05 0.000000000000e+00 -4.130721091138e-05 -8.000000000000e-15 8.500000000000e+00 4.145523411101e-05 0.000000000000e+00 -4.145523410251e-05 -8.500000000000e-15 9.000000000000e+00 4.160239509950e-05 0.000000000000e+00 -4.160239509050e-05 -9.000000000000e-15 9.500000000000e+00 4.174878840975e-05 0.000000000000e+00 -4.174878840025e-05 -9.500000000000e-15 1.000000000000e+01 4.189449575014e-05 0.000000000000e+00 -4.189449574014e-05 -1.000000000000e-14 1.050000000000e+01 4.203958830747e-05 0.000000000000e+00 -4.203958829697e-05 -1.050000000000e-14 1.100000000000e+01 4.218412853967e-05 0.000000000000e+00 -4.218412852867e-05 -1.100000000000e-14 1.150000000000e+01 4.232817159464e-05 0.000000000000e+00 -4.232817158314e-05 -1.150000000000e-14 1.200000000000e+01 4.247176644613e-05 0.000000000000e+00 -4.247176643413e-05 -1.200000000000e-14 1.250000000000e+01 4.261495681292e-05 0.000000000000e+00 -4.261495680042e-05 -1.250000000000e-14 1.300000000000e+01 4.275778190951e-05 0.000000000000e+00 -4.275778189651e-05 -1.300000000000e-14 1.350000000000e+01 4.290027706481e-05 0.000000000000e+00 -4.290027705131e-05 -1.350000000000e-14 1.400000000000e+01 4.304247423591e-05 0.000000000000e+00 -4.304247422191e-05 -1.400000000000e-14 1.450000000000e+01 4.318440243803e-05 0.000000000000e+00 -4.318440242353e-05 -1.450000000000e-14 1.500000000000e+01 4.332608810661e-05 0.000000000000e+00 -4.332608809161e-05 -1.500000000000e-14 1.550000000000e+01 4.346755540434e-05 0.000000000000e+00 -4.346755538884e-05 -1.550000000000e-14 1.600000000000e+01 4.360882648283e-05 0.000000000000e+00 -4.360882646683e-05 -1.600000000000e-14 1.650000000000e+01 4.374992170704e-05 0.000000000000e+00 -4.374992169054e-05 -1.650000000000e-14 1.700000000000e+01 4.389085984850e-05 0.000000000000e+00 -4.389085983150e-05 -1.700000000000e-14 1.750000000000e+01 4.403165825272e-05 0.000000000000e+00 -4.403165823522e-05 -1.750000000000e-14 1.800000000000e+01 4.417233298467e-05 0.000000000000e+00 -4.417233296667e-05 -1.800000000000e-14 1.850000000000e+01 4.431289895581e-05 0.000000000000e+00 -4.431289893731e-05 -1.850000000000e-14 1.900000000000e+01 4.445337003546e-05 0.000000000000e+00 -4.445337001646e-05 -1.900000000000e-14 1.950000000000e+01 4.459375914879e-05 0.000000000000e+00 -4.459375912929e-05 -1.950000000000e-14 2.000000000000e+01 4.473407836331e-05 0.000000000000e+00 -4.473407834331e-05 -2.000000000000e-14 1.000000000000e+00 1.439997840974e-03 0.000000000000e+00 -1.439997840973e-03 -1.000000000000e-15 1.500000000000e+00 1.606923081244e-03 0.000000000000e+00 -1.606923081243e-03 -1.500000000000e-15 2.000000000000e+00 1.676672921836e-03 0.000000000000e+00 -1.676672921834e-03 -2.000000000000e-15 2.500000000000e+00 1.705305886868e-03 0.000000000000e+00 -1.705305886865e-03 -2.500000000000e-15 3.000000000000e+00 1.714967876431e-03 0.000000000000e+00 -1.714967876428e-03 -3.000000000000e-15 3.500000000000e+00 1.717340121318e-03 0.000000000000e+00 -1.717340121314e-03 -3.500000000000e-15 4.000000000000e+00 1.719015001747e-03 0.000000000000e+00 -1.719015001743e-03 -4.000000000000e-15 4.500000000000e+00 1.720548373549e-03 0.000000000000e+00 -1.720548373544e-03 -4.500000000000e-15 5.000000000000e+00 1.721967682703e-03 0.000000000000e+00 -1.721967682698e-03 -5.000000000000e-15 5.500000000000e+00 1.723295819263e-03 0.000000000000e+00 -1.723295819257e-03 -5.500000000000e-15 6.000000000000e+00 1.724550851788e-03 0.000000000000e+00 -1.724550851782e-03 -6.000000000000e-15 6.500000000000e+00 1.725746645883e-03 0.000000000000e+00 -1.725746645877e-03 -6.500000000000e-15 7.000000000000e+00 1.726893769795e-03 0.000000000000e+00 -1.726893769788e-03 -7.000000000000e-15 7.500000000000e+00 1.728000313452e-03 0.000000000000e+00 -1.728000313445e-03 -7.500000000000e-15 8.000000000000e+00 1.729072531597e-03 0.000000000000e+00 -1.729072531589e-03 -8.000000000000e-15 8.500000000000e+00 1.730115321431e-03 0.000000000000e+00 -1.730115321423e-03 -8.500000000000e-15 9.000000000000e+00 1.731132569751e-03 0.000000000000e+00 -1.731132569742e-03 -9.000000000000e-15 9.500000000000e+00 1.732127403856e-03 0.000000000000e+00 -1.732127403846e-03 -9.500000000000e-15 1.000000000000e+01 1.733102373431e-03 0.000000000000e+00 -1.733102373421e-03 -1.000000000000e-14 1.050000000000e+01 1.734059583378e-03 0.000000000000e+00 -1.734059583367e-03 -1.050000000000e-14 1.100000000000e+01 1.735000791778e-03 0.000000000000e+00 -1.735000791767e-03 -1.100000000000e-14 1.150000000000e+01 1.735927482936e-03 0.000000000000e+00 -1.735927482924e-03 -1.150000000000e-14 1.200000000000e+01 1.736840922480e-03 0.000000000000e+00 -1.736840922468e-03 -1.200000000000e-14 1.250000000000e+01 1.737742199402e-03 0.000000000000e+00 -1.737742199390e-03 -1.250000000000e-14 1.300000000000e+01 1.738632258508e-03 0.000000000000e+00 -1.738632258495e-03 -1.300000000000e-14 1.350000000000e+01 1.739511925726e-03 0.000000000000e+00 -1.739511925713e-03 -1.350000000000e-14 1.400000000000e+01 1.740381928080e-03 0.000000000000e+00 -1.740381928066e-03 -1.400000000000e-14 1.450000000000e+01 1.741242909580e-03 0.000000000000e+00 -1.741242909566e-03 -1.450000000000e-14 1.500000000000e+01 1.742095444013e-03 0.000000000000e+00 -1.742095443998e-03 -1.500000000000e-14 1.550000000000e+01 1.742940045313e-03 0.000000000000e+00 -1.742940045297e-03 -1.550000000000e-14 1.600000000000e+01 1.743777176049e-03 0.000000000000e+00 -1.743777176033e-03 -1.600000000000e-14 1.650000000000e+01 1.744607254427e-03 0.000000000000e+00 -1.744607254410e-03 -1.650000000000e-14 1.700000000000e+01 1.745430660104e-03 0.000000000000e+00 -1.745430660087e-03 -1.700000000000e-14 1.750000000000e+01 1.746247739059e-03 0.000000000000e+00 -1.746247739041e-03 -1.750000000000e-14 1.800000000000e+01 1.747058807692e-03 0.000000000000e+00 -1.747058807674e-03 -1.800000000000e-14 1.850000000000e+01 1.747864156302e-03 0.000000000000e+00 -1.747864156284e-03 -1.850000000000e-14 1.900000000000e+01 1.748664052052e-03 0.000000000000e+00 -1.748664052033e-03 -1.900000000000e-14 1.950000000000e+01 1.749458741507e-03 0.000000000000e+00 -1.749458741488e-03 -1.950000000000e-14 2.000000000000e+01 1.750248452827e-03 0.000000000000e+00 -1.750248452807e-03 -2.000000000000e-14 1.000000000000e+00 3.929759924265e-03 0.000000000000e+00 -3.929759924264e-03 -1.000000000000e-15 1.500000000000e+00 4.511569441871e-03 0.000000000000e+00 -4.511569441869e-03 -1.500000000000e-15 2.000000000000e+00 4.798476264482e-03 0.000000000000e+00 -4.798476264480e-03 -2.000000000000e-15 2.500000000000e+00 4.956531315902e-03 0.000000000000e+00 -4.956531315900e-03 -2.500000000000e-15 3.000000000000e+00 5.051493963442e-03 0.000000000000e+00 -5.051493963439e-03 -3.000000000000e-15 3.500000000000e+00 5.112336565555e-03 0.000000000000e+00 -5.112336565552e-03 -3.500000000000e-15 4.000000000000e+00 5.153217496397e-03 0.000000000000e+00 -5.153217496393e-03 -4.000000000000e-15 4.500000000000e+00 5.181683527681e-03 0.000000000000e+00 -5.181683527677e-03 -4.500000000000e-15 5.000000000000e+00 5.202052347620e-03 0.000000000000e+00 -5.202052347615e-03 -5.000000000000e-15 5.500000000000e+00 5.216940480179e-03 0.000000000000e+00 -5.216940480173e-03 -5.500000000000e-15 6.000000000000e+00 5.228009516861e-03 0.000000000000e+00 -5.228009516855e-03 -6.000000000000e-15 6.500000000000e+00 5.236355604191e-03 0.000000000000e+00 -5.236355604184e-03 -6.500000000000e-15 7.000000000000e+00 5.242724662292e-03 0.000000000000e+00 -5.242724662285e-03 -7.000000000000e-15 7.500000000000e+00 5.247637334848e-03 0.000000000000e+00 -5.247637334840e-03 -7.500000000000e-15 8.000000000000e+00 5.251464711060e-03 0.000000000000e+00 -5.251464711052e-03 -8.000000000000e-15 8.500000000000e+00 5.254475943926e-03 0.000000000000e+00 -5.254475943918e-03 -8.500000000000e-15 9.000000000000e+00 5.256869163370e-03 0.000000000000e+00 -5.256869163361e-03 -9.000000000000e-15 9.500000000000e+00 5.258792109404e-03 0.000000000000e+00 -5.258792109394e-03 -9.500000000000e-15 1.000000000000e+01 5.260356260305e-03 0.000000000000e+00 -5.260356260295e-03 -1.000000000000e-14 1.050000000000e+01 5.261646776154e-03 0.000000000000e+00 -5.261646776144e-03 -1.050000000000e-14 1.100000000000e+01 5.262729800670e-03 0.000000000000e+00 -5.262729800659e-03 -1.100000000000e-14 1.150000000000e+01 5.263658424924e-03 0.000000000000e+00 -5.263658424913e-03 -1.150000000000e-14 1.200000000000e+01 5.264479309938e-03 0.000000000000e+00 -5.264479309926e-03 -1.200000000000e-14 1.250000000000e+01 5.265241208437e-03 0.000000000000e+00 -5.265241208424e-03 -1.250000000000e-14 1.300000000000e+01 5.265981716150e-03 0.000000000000e+00 -5.265981716137e-03 -1.300000000000e-14 1.350000000000e+01 5.266710386717e-03 0.000000000000e+00 -5.266710386704e-03 -1.350000000000e-14 1.400000000000e+01 5.267428714545e-03 0.000000000000e+00 -5.267428714531e-03 -1.400000000000e-14 1.450000000000e+01 5.268137530981e-03 0.000000000000e+00 -5.268137530967e-03 -1.450000000000e-14 1.500000000000e+01 5.268837561115e-03 0.000000000000e+00 -5.268837561100e-03 -1.500000000000e-14 1.550000000000e+01 5.269529461056e-03 0.000000000000e+00 -5.269529461040e-03 -1.550000000000e-14 1.600000000000e+01 5.270213825312e-03 0.000000000000e+00 -5.270213825296e-03 -1.600000000000e-14 1.650000000000e+01 5.270891192269e-03 0.000000000000e+00 -5.270891192252e-03 -1.650000000000e-14 1.700000000000e+01 5.271562049414e-03 0.000000000000e+00 -5.271562049397e-03 -1.700000000000e-14 1.750000000000e+01 5.272226838318e-03 0.000000000000e+00 -5.272226838300e-03 -1.750000000000e-14 1.800000000000e+01 5.272885959272e-03 0.000000000000e+00 -5.272885959254e-03 -1.800000000000e-14 1.850000000000e+01 5.273539775552e-03 0.000000000000e+00 -5.273539775534e-03 -1.850000000000e-14 1.900000000000e+01 5.274188617286e-03 0.000000000000e+00 -5.274188617267e-03 -1.900000000000e-14 1.950000000000e+01 5.274832784939e-03 0.000000000000e+00 -5.274832784919e-03 -1.950000000000e-14 2.000000000000e+01 5.275472552432e-03 0.000000000000e+00 -5.275472552412e-03 -2.000000000000e-14 1.000000000000e+00 7.790616464373e-05 0.000000000000e+00 -7.790616464273e-05 -1.000000000000e-15 1.500000000000e+00 7.824632889074e-05 0.000000000000e+00 -7.824632888924e-05 -1.500000000000e-15 2.000000000000e+00 7.852523945986e-05 0.000000000000e+00 -7.852523945786e-05 -2.000000000000e-15 2.500000000000e+00 7.877548075918e-05 0.000000000000e+00 -7.877548075668e-05 -2.500000000000e-15 3.000000000000e+00 7.900792512040e-05 0.000000000000e+00 -7.900792511740e-05 -3.000000000000e-15 3.500000000000e+00 7.922792700231e-05 0.000000000000e+00 -7.922792699881e-05 -3.500000000000e-15 4.000000000000e+00 7.943859649909e-05 0.000000000000e+00 -7.943859649509e-05 -4.000000000000e-15 4.500000000000e+00 7.964193456277e-05 0.000000000000e+00 -7.964193455827e-05 -4.500000000000e-15 5.000000000000e+00 7.983932080309e-05 0.000000000000e+00 -7.983932079809e-05 -5.000000000000e-15 5.500000000000e+00 8.003175510357e-05 0.000000000000e+00 -8.003175509807e-05 -5.500000000000e-15 6.000000000000e+00 8.021999000829e-05 0.000000000000e+00 -8.021999000229e-05 -6.000000000000e-15 6.500000000000e+00 8.040460891421e-05 0.000000000000e+00 -8.040460890771e-05 -6.500000000000e-15 7.000000000000e+00 8.058607500962e-05 0.000000000000e+00 -8.058607500262e-05 -7.000000000000e-15 7.500000000000e+00 8.076476334807e-05 0.000000000000e+00 -8.076476334057e-05 -7.500000000000e-15 8.000000000000e+00 8.094098267453e-05 0.000000000000e+00 -8.094098266653e-05 -8.000000000000e-15 8.500000000000e+00 8.111499074924e-05 0.000000000000e+00 -8.111499074074e-05 -8.500000000000e-15 9.000000000000e+00 8.128700539462e-05 0.000000000000e+00 -8.128700538562e-05 -9.000000000000e-15 9.500000000000e+00 8.145721264133e-05 0.000000000000e+00 -8.145721263183e-05 -9.500000000000e-15 1.000000000000e+01 8.162577285440e-05 0.000000000000e+00 -8.162577284440e-05 -1.000000000000e-14 1.050000000000e+01 8.179282542037e-05 0.000000000000e+00 -8.179282540987e-05 -1.050000000000e-14 1.100000000000e+01 8.195849238843e-05 0.000000000000e+00 -8.195849237743e-05 -1.100000000000e-14 1.150000000000e+01 8.212288133746e-05 0.000000000000e+00 -8.212288132596e-05 -1.150000000000e-14 1.200000000000e+01 8.228608766136e-05 0.000000000000e+00 -8.228608764936e-05 -1.200000000000e-14 1.250000000000e+01 8.244819641053e-05 0.000000000000e+00 -8.244819639803e-05 -1.250000000000e-14 1.300000000000e+01 8.260928379065e-05 0.000000000000e+00 -8.260928377765e-05 -1.300000000000e-14 1.350000000000e+01 8.276941839359e-05 0.000000000000e+00 -8.276941838009e-05 -1.350000000000e-14 1.400000000000e+01 8.292866221672e-05 0.000000000000e+00 -8.292866220272e-05 -1.400000000000e-14 1.450000000000e+01 8.308707151346e-05 0.000000000000e+00 -8.308707149896e-05 -1.450000000000e-14 1.500000000000e+01 8.324469750794e-05 0.000000000000e+00 -8.324469749294e-05 -1.500000000000e-14 1.550000000000e+01 8.340158699945e-05 0.000000000000e+00 -8.340158698395e-05 -1.550000000000e-14 1.600000000000e+01 8.355778287678e-05 0.000000000000e+00 -8.355778286078e-05 -1.600000000000e-14 1.650000000000e+01 8.371332455819e-05 0.000000000000e+00 -8.371332454169e-05 -1.650000000000e-14 1.700000000000e+01 8.386824836992e-05 0.000000000000e+00 -8.386824835292e-05 -1.700000000000e-14 1.750000000000e+01 8.402258787332e-05 0.000000000000e+00 -8.402258785582e-05 -1.750000000000e-14 1.800000000000e+01 8.417637414879e-05 0.000000000000e+00 -8.417637413079e-05 -1.800000000000e-14 1.850000000000e+01 8.432963604350e-05 0.000000000000e+00 -8.432963602500e-05 -1.850000000000e-14 1.900000000000e+01 8.448240038817e-05 0.000000000000e+00 -8.448240036917e-05 -1.900000000000e-14 1.950000000000e+01 8.463469218762e-05 0.000000000000e+00 -8.463469216812e-05 -1.950000000000e-14 2.000000000000e+01 8.478653478884e-05 0.000000000000e+00 -8.478653476884e-05 -2.000000000000e-14 1.000000000000e+00 8.060554463967e-04 0.000000000000e+00 -8.060554463957e-04 -1.000000000000e-15 1.500000000000e+00 9.737669217941e-04 0.000000000000e+00 -9.737669217926e-04 -1.500000000000e-15 2.000000000000e+00 1.062421698686e-03 0.000000000000e+00 -1.062421698684e-03 -2.000000000000e-15 2.500000000000e+00 1.108073520807e-03 0.000000000000e+00 -1.108073520804e-03 -2.500000000000e-15 3.000000000000e+00 1.130691683003e-03 0.000000000000e+00 -1.130691683000e-03 -3.000000000000e-15 3.500000000000e+00 1.141201201429e-03 0.000000000000e+00 -1.141201201425e-03 -3.500000000000e-15 4.000000000000e+00 1.145687351384e-03 0.000000000000e+00 -1.145687351380e-03 -4.000000000000e-15 4.500000000000e+00 1.147737561161e-03 0.000000000000e+00 -1.147737561157e-03 -4.500000000000e-15 5.000000000000e+00 1.149195410519e-03 0.000000000000e+00 -1.149195410514e-03 -5.000000000000e-15 5.500000000000e+00 1.150506434765e-03 0.000000000000e+00 -1.150506434760e-03 -5.500000000000e-15 6.000000000000e+00 1.151730354573e-03 0.000000000000e+00 -1.151730354567e-03 -6.000000000000e-15 6.500000000000e+00 1.152886356662e-03 0.000000000000e+00 -1.152886356655e-03 -6.500000000000e-15 7.000000000000e+00 1.153986900727e-03 0.000000000000e+00 -1.153986900720e-03 -7.000000000000e-15 7.500000000000e+00 1.155041287854e-03 0.000000000000e+00 -1.155041287847e-03 -7.500000000000e-15 8.000000000000e+00 1.156056678492e-03 0.000000000000e+00 -1.156056678484e-03 -8.000000000000e-15 8.500000000000e+00 1.157038676325e-03 0.000000000000e+00 -1.157038676317e-03 -8.500000000000e-15 9.000000000000e+00 1.157991729914e-03 0.000000000000e+00 -1.157991729905e-03 -9.000000000000e-15 9.500000000000e+00 1.158919419424e-03 0.000000000000e+00 -1.158919419415e-03 -9.500000000000e-15 1.000000000000e+01 1.159824664007e-03 0.000000000000e+00 -1.159824663997e-03 -1.000000000000e-14 1.050000000000e+01 1.160709873310e-03 0.000000000000e+00 -1.160709873300e-03 -1.050000000000e-14 1.100000000000e+01 1.161577059352e-03 0.000000000000e+00 -1.161577059341e-03 -1.100000000000e-14 1.150000000000e+01 1.162427920056e-03 0.000000000000e+00 -1.162427920045e-03 -1.150000000000e-14 1.200000000000e+01 1.163263902344e-03 0.000000000000e+00 -1.163263902332e-03 -1.200000000000e-14 1.250000000000e+01 1.164086250332e-03 0.000000000000e+00 -1.164086250319e-03 -1.250000000000e-14 1.300000000000e+01 1.164896042565e-03 0.000000000000e+00 -1.164896042552e-03 -1.300000000000e-14 1.350000000000e+01 1.165694221094e-03 0.000000000000e+00 -1.165694221080e-03 -1.350000000000e-14 1.400000000000e+01 1.166481614416e-03 0.000000000000e+00 -1.166481614402e-03 -1.400000000000e-14 1.450000000000e+01 1.167258955760e-03 0.000000000000e+00 -1.167258955746e-03 -1.450000000000e-14 1.500000000000e+01 1.168026897787e-03 0.000000000000e+00 -1.168026897772e-03 -1.500000000000e-14 1.550000000000e+01 1.168786024524e-03 0.000000000000e+00 -1.168786024509e-03 -1.550000000000e-14 1.600000000000e+01 1.169536861133e-03 0.000000000000e+00 -1.169536861117e-03 -1.600000000000e-14 1.650000000000e+01 1.170279881960e-03 0.000000000000e+00 -1.170279881944e-03 -1.650000000000e-14 1.700000000000e+01 1.171015517228e-03 0.000000000000e+00 -1.171015517211e-03 -1.700000000000e-14 1.750000000000e+01 1.171744158635e-03 0.000000000000e+00 -1.171744158618e-03 -1.750000000000e-14 1.800000000000e+01 1.172466164072e-03 0.000000000000e+00 -1.172466164054e-03 -1.800000000000e-14 1.850000000000e+01 1.173181861613e-03 0.000000000000e+00 -1.173181861595e-03 -1.850000000000e-14 1.900000000000e+01 1.173891552927e-03 0.000000000000e+00 -1.173891552908e-03 -1.900000000000e-14 1.950000000000e+01 1.174595516190e-03 0.000000000000e+00 -1.174595516170e-03 -1.950000000000e-14 2.000000000000e+01 1.175294008601e-03 0.000000000000e+00 -1.175294008581e-03 -2.000000000000e-14 1.000000000000e+00 1.966783419485e-03 0.000000000000e+00 -1.966783419484e-03 -1.000000000000e-15 1.500000000000e+00 2.565726038931e-03 0.000000000000e+00 -2.565726038929e-03 -1.500000000000e-15 2.000000000000e+00 2.973906589070e-03 0.000000000000e+00 -2.973906589068e-03 -2.000000000000e-15 2.500000000000e+00 3.252853430346e-03 0.000000000000e+00 -3.252853430344e-03 -2.500000000000e-15 3.000000000000e+00 3.446538647559e-03 0.000000000000e+00 -3.446538647556e-03 -3.000000000000e-15 3.500000000000e+00 3.583657636038e-03 0.000000000000e+00 -3.583657636034e-03 -3.500000000000e-15 4.000000000000e+00 3.682570593471e-03 0.000000000000e+00 -3.682570593467e-03 -4.000000000000e-15 4.500000000000e+00 3.755125241677e-03 0.000000000000e+00 -3.755125241673e-03 -4.500000000000e-15 5.000000000000e+00 3.809117384583e-03 0.000000000000e+00 -3.809117384578e-03 -5.000000000000e-15 5.500000000000e+00 3.849795073071e-03 0.000000000000e+00 -3.849795073066e-03 -5.500000000000e-15 6.000000000000e+00 3.880771461094e-03 0.000000000000e+00 -3.880771461088e-03 -6.000000000000e-15 6.500000000000e+00 3.904585108216e-03 0.000000000000e+00 -3.904585108210e-03 -6.500000000000e-15 7.000000000000e+00 3.923050993420e-03 0.000000000000e+00 -3.923050993413e-03 -7.000000000000e-15 7.500000000000e+00 3.937485982305e-03 0.000000000000e+00 -3.937485982297e-03 -7.500000000000e-15 8.000000000000e+00 3.948857468020e-03 0.000000000000e+00 -3.948857468012e-03 -8.000000000000e-15 8.500000000000e+00 3.957883752420e-03 0.000000000000e+00 -3.957883752412e-03 -8.500000000000e-15 9.000000000000e+00 3.965103241284e-03 0.000000000000e+00 -3.965103241275e-03 -9.000000000000e-15 9.500000000000e+00 3.970922950018e-03 0.000000000000e+00 -3.970922950008e-03 -9.500000000000e-15 1.000000000000e+01 3.975652979432e-03 0.000000000000e+00 -3.975652979422e-03 -1.000000000000e-14 1.050000000000e+01 3.979531311518e-03 0.000000000000e+00 -3.979531311508e-03 -1.050000000000e-14 1.100000000000e+01 3.982741834500e-03 0.000000000000e+00 -3.982741834489e-03 -1.100000000000e-14 1.150000000000e+01 3.985427578995e-03 0.000000000000e+00 -3.985427578983e-03 -1.150000000000e-14 1.200000000000e+01 3.987700535592e-03 0.000000000000e+00 -3.987700535580e-03 -1.200000000000e-14 1.250000000000e+01 3.989649013917e-03 0.000000000000e+00 -3.989649013904e-03 -1.250000000000e-14 1.300000000000e+01 3.991343223880e-03 0.000000000000e+00 -3.991343223867e-03 -1.300000000000e-14 1.350000000000e+01 3.992839563325e-03 0.000000000000e+00 -3.992839563311e-03 -1.350000000000e-14 1.400000000000e+01 3.994183939837e-03 0.000000000000e+00 -3.994183939823e-03 -1.400000000000e-14 1.450000000000e+01 3.995414279055e-03 0.000000000000e+00 -3.995414279041e-03 -1.450000000000e-14 1.500000000000e+01 3.996562103314e-03 0.000000000000e+00 -3.996562103299e-03 -1.500000000000e-14 1.550000000000e+01 3.997652823666e-03 0.000000000000e+00 -3.997652823650e-03 -1.550000000000e-14 1.600000000000e+01 3.998704961661e-03 0.000000000000e+00 -3.998704961645e-03 -1.600000000000e-14 1.650000000000e+01 3.999730037908e-03 0.000000000000e+00 -3.999730037892e-03 -1.650000000000e-14 1.700000000000e+01 4.000734321593e-03 0.000000000000e+00 -4.000734321576e-03 -1.700000000000e-14 1.750000000000e+01 4.001721148927e-03 0.000000000000e+00 -4.001721148910e-03 -1.750000000000e-14 1.800000000000e+01 4.002692477369e-03 0.000000000000e+00 -4.002692477351e-03 -1.800000000000e-14 1.850000000000e+01 4.003649639226e-03 0.000000000000e+00 -4.003649639208e-03 -1.850000000000e-14 1.900000000000e+01 4.004593663237e-03 0.000000000000e+00 -4.004593663218e-03 -1.900000000000e-14 1.950000000000e+01 4.005525409685e-03 0.000000000000e+00 -4.005525409666e-03 -1.950000000000e-14 2.000000000000e+01 4.006445630075e-03 0.000000000000e+00 -4.006445630055e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0.standard0000644000265600020320000024357112264261473023742 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.125305640678e-09 0.000000000000e+00 -2.125303640727e-09 -2.000000000000e-15 1.200000000000e+00 1.000997369965e-07 0.000000000000e+00 -1.000997349965e-07 -2.000000000000e-15 1.400000000000e+00 2.027178646210e-06 0.000000000000e+00 -2.027178644210e-06 -2.000000000000e-15 1.600000000000e+00 1.031512930307e-05 0.000000000000e+00 -1.031512930107e-05 -2.000000000000e-15 1.800000000000e+00 2.764961602509e-05 0.000000000000e+00 -2.764961602309e-05 -2.000000000000e-15 2.000000000000e+00 5.511404000809e-05 0.000000000000e+00 -5.511404000609e-05 -2.000000000000e-15 2.200000000000e+00 9.312540184993e-05 0.000000000000e+00 -9.312540184793e-05 -2.000000000000e-15 2.400000000000e+00 1.416788754447e-04 0.000000000000e+00 -1.416788754427e-04 -2.000000000000e-15 2.600000000000e+00 2.004489002647e-04 0.000000000000e+00 -2.004489002627e-04 -2.000000000000e-15 2.800000000000e+00 2.688609043085e-04 0.000000000000e+00 -2.688609043065e-04 -2.000000000000e-15 3.000000000000e+00 3.461577634299e-04 0.000000000000e+00 -3.461577634279e-04 -2.000000000000e-15 3.200000000000e+00 4.313584741405e-04 0.000000000000e+00 -4.313584741385e-04 -2.000000000000e-15 3.400000000000e+00 5.196773619665e-04 0.000000000000e+00 -5.196773619645e-04 -2.000000000000e-15 3.600000000000e+00 6.026156555121e-04 0.000000000000e+00 -6.026156555101e-04 -2.000000000000e-15 3.800000000000e+00 6.775047895279e-04 0.000000000000e+00 -6.775047895259e-04 -2.000000000000e-15 4.000000000000e+00 7.439940848777e-04 0.000000000000e+00 -7.439940848757e-04 -2.000000000000e-15 4.200000000000e+00 8.025213119313e-04 0.000000000000e+00 -8.025213119293e-04 -2.000000000000e-15 4.400000000000e+00 8.538698908104e-04 0.000000000000e+00 -8.538698908084e-04 -2.000000000000e-15 4.600000000000e+00 8.989260267565e-04 0.000000000000e+00 -8.989260267545e-04 -2.000000000000e-15 4.800000000000e+00 9.385513176286e-04 0.000000000000e+00 -9.385513176266e-04 -2.000000000000e-15 5.000000000000e+00 9.735258757998e-04 0.000000000000e+00 -9.735258757978e-04 -2.000000000000e-15 5.200000000000e+00 1.004529707504e-03 0.000000000000e+00 -1.004529707502e-03 -2.000000000000e-15 5.400000000000e+00 1.032143146865e-03 0.000000000000e+00 -1.032143146863e-03 -2.000000000000e-15 5.600000000000e+00 1.056855776396e-03 0.000000000000e+00 -1.056855776394e-03 -2.000000000000e-15 5.800000000000e+00 1.079078289141e-03 0.000000000000e+00 -1.079078289139e-03 -2.000000000000e-15 6.000000000000e+00 1.099154550805e-03 0.000000000000e+00 -1.099154550803e-03 -2.000000000000e-15 6.200000000000e+00 1.117372636762e-03 0.000000000000e+00 -1.117372636760e-03 -2.000000000000e-15 6.400000000000e+00 1.133974407753e-03 0.000000000000e+00 -1.133974407751e-03 -2.000000000000e-15 6.600000000000e+00 1.149163575647e-03 0.000000000000e+00 -1.149163575645e-03 -2.000000000000e-15 6.800000000000e+00 1.163112383304e-03 0.000000000000e+00 -1.163112383302e-03 -2.000000000000e-15 7.000000000000e+00 1.175967084549e-03 0.000000000000e+00 -1.175967084547e-03 -2.000000000000e-15 7.200000000000e+00 1.187852418344e-03 0.000000000000e+00 -1.187852418342e-03 -2.000000000000e-15 7.400000000000e+00 1.198875255467e-03 0.000000000000e+00 -1.198875255465e-03 -2.000000000000e-15 7.600000000000e+00 1.209127571661e-03 0.000000000000e+00 -1.209127571659e-03 -2.000000000000e-15 7.800000000000e+00 1.218688875726e-03 0.000000000000e+00 -1.218688875724e-03 -2.000000000000e-15 8.000000000000e+00 1.227628197682e-03 0.000000000000e+00 -1.227628197680e-03 -2.000000000000e-15 8.200000000000e+00 1.236005721951e-03 0.000000000000e+00 -1.236005721949e-03 -2.000000000000e-15 8.400000000000e+00 1.243874133849e-03 0.000000000000e+00 -1.243874133847e-03 -2.000000000000e-15 8.600000000000e+00 1.251279734020e-03 0.000000000000e+00 -1.251279734018e-03 -2.000000000000e-15 8.800000000000e+00 1.258263364523e-03 0.000000000000e+00 -1.258263364521e-03 -2.000000000000e-15 9.000000000000e+00 1.264861181569e-03 0.000000000000e+00 -1.264861181567e-03 -2.000000000000e-15 9.200000000000e+00 1.271105302938e-03 0.000000000000e+00 -1.271105302936e-03 -2.000000000000e-15 9.400000000000e+00 1.277024352606e-03 0.000000000000e+00 -1.277024352604e-03 -2.000000000000e-15 9.600000000000e+00 1.282643920739e-03 0.000000000000e+00 -1.282643920737e-03 -2.000000000000e-15 9.800000000000e+00 1.287986953725e-03 0.000000000000e+00 -1.287986953723e-03 -2.000000000000e-15 1.000000000000e+01 1.293074086161e-03 0.000000000000e+00 -1.293074086159e-03 -2.000000000000e-15 1.020000000000e+01 1.297923924461e-03 0.000000000000e+00 -1.297923924459e-03 -2.000000000000e-15 1.040000000000e+01 1.302553290039e-03 0.000000000000e+00 -1.302553290037e-03 -2.000000000000e-15 1.060000000000e+01 1.306977428526e-03 0.000000000000e+00 -1.306977428524e-03 -2.000000000000e-15 1.080000000000e+01 1.311210190399e-03 0.000000000000e+00 -1.311210190397e-03 -2.000000000000e-15 1.100000000000e+01 1.315264198705e-03 0.000000000000e+00 -1.315264198703e-03 -2.000000000000e-15 1.120000000000e+01 1.319150938287e-03 0.000000000000e+00 -1.319150938285e-03 -2.000000000000e-15 1.140000000000e+01 1.322880946887e-03 0.000000000000e+00 -1.322880946885e-03 -2.000000000000e-15 1.160000000000e+01 1.326463868326e-03 0.000000000000e+00 -1.326463868324e-03 -2.000000000000e-15 1.180000000000e+01 1.329908556384e-03 0.000000000000e+00 -1.329908556382e-03 -2.000000000000e-15 1.200000000000e+01 1.333223154579e-03 0.000000000000e+00 -1.333223154577e-03 -2.000000000000e-15 1.220000000000e+01 1.336415166452e-03 0.000000000000e+00 -1.336415166450e-03 -2.000000000000e-15 1.240000000000e+01 1.339491517672e-03 0.000000000000e+00 -1.339491517670e-03 -2.000000000000e-15 1.260000000000e+01 1.342458611033e-03 0.000000000000e+00 -1.342458611031e-03 -2.000000000000e-15 1.280000000000e+01 1.345322375280e-03 0.000000000000e+00 -1.345322375278e-03 -2.000000000000e-15 1.300000000000e+01 1.348088308553e-03 0.000000000000e+00 -1.348088308551e-03 -2.000000000000e-15 1.320000000000e+01 1.350761517130e-03 0.000000000000e+00 -1.350761517128e-03 -2.000000000000e-15 1.340000000000e+01 1.353346750046e-03 0.000000000000e+00 -1.353346750044e-03 -2.000000000000e-15 1.360000000000e+01 1.355848430097e-03 0.000000000000e+00 -1.355848430095e-03 -2.000000000000e-15 1.380000000000e+01 1.358270681656e-03 0.000000000000e+00 -1.358270681654e-03 -2.000000000000e-15 1.400000000000e+01 1.360617355683e-03 0.000000000000e+00 -1.360617355681e-03 -2.000000000000e-15 1.420000000000e+01 1.362892052250e-03 0.000000000000e+00 -1.362892052248e-03 -2.000000000000e-15 1.440000000000e+01 1.365098140865e-03 0.000000000000e+00 -1.365098140863e-03 -2.000000000000e-15 1.460000000000e+01 1.367238778843e-03 0.000000000000e+00 -1.367238778841e-03 -2.000000000000e-15 1.480000000000e+01 1.369316927937e-03 0.000000000000e+00 -1.369316927935e-03 -2.000000000000e-15 1.500000000000e+01 1.371335369427e-03 0.000000000000e+00 -1.371335369425e-03 -2.000000000000e-15 1.520000000000e+01 1.373296717821e-03 0.000000000000e+00 -1.373296717819e-03 -2.000000000000e-15 1.540000000000e+01 1.375203433317e-03 0.000000000000e+00 -1.375203433315e-03 -2.000000000000e-15 1.560000000000e+01 1.377057833165e-03 0.000000000000e+00 -1.377057833163e-03 -2.000000000000e-15 1.580000000000e+01 1.378862102028e-03 0.000000000000e+00 -1.378862102026e-03 -2.000000000000e-15 1.600000000000e+01 1.380618301450e-03 0.000000000000e+00 -1.380618301448e-03 -2.000000000000e-15 1.620000000000e+01 1.382328378522e-03 0.000000000000e+00 -1.382328378520e-03 -2.000000000000e-15 1.640000000000e+01 1.383994173814e-03 0.000000000000e+00 -1.383994173812e-03 -2.000000000000e-15 1.660000000000e+01 1.385617428664e-03 0.000000000000e+00 -1.385617428662e-03 -2.000000000000e-15 1.680000000000e+01 1.387199791860e-03 0.000000000000e+00 -1.387199791858e-03 -2.000000000000e-15 1.700000000000e+01 1.388742825791e-03 0.000000000000e+00 -1.388742825789e-03 -2.000000000000e-15 1.720000000000e+01 1.390248012114e-03 0.000000000000e+00 -1.390248012112e-03 -2.000000000000e-15 1.740000000000e+01 1.391716756971e-03 0.000000000000e+00 -1.391716756969e-03 -2.000000000000e-15 1.760000000000e+01 1.393150395805e-03 0.000000000000e+00 -1.393150395803e-03 -2.000000000000e-15 1.780000000000e+01 1.394550197814e-03 0.000000000000e+00 -1.394550197812e-03 -2.000000000000e-15 1.800000000000e+01 1.395917370063e-03 0.000000000000e+00 -1.395917370061e-03 -2.000000000000e-15 1.820000000000e+01 1.397253061298e-03 0.000000000000e+00 -1.397253061296e-03 -2.000000000000e-15 1.840000000000e+01 1.398558365474e-03 0.000000000000e+00 -1.398558365472e-03 -2.000000000000e-15 1.860000000000e+01 1.399834325029e-03 0.000000000000e+00 -1.399834325027e-03 -2.000000000000e-15 1.880000000000e+01 1.401081933933e-03 0.000000000000e+00 -1.401081933931e-03 -2.000000000000e-15 1.900000000000e+01 1.402302140504e-03 0.000000000000e+00 -1.402302140502e-03 -2.000000000000e-15 1.920000000000e+01 1.403495850048e-03 0.000000000000e+00 -1.403495850046e-03 -2.000000000000e-15 1.940000000000e+01 1.404663927297e-03 0.000000000000e+00 -1.404663927295e-03 -2.000000000000e-15 1.960000000000e+01 1.405807198700e-03 0.000000000000e+00 -1.405807198698e-03 -2.000000000000e-15 1.980000000000e+01 1.406926454544e-03 0.000000000000e+00 -1.406926454542e-03 -2.000000000000e-15 2.000000000000e+01 1.408022450943e-03 0.000000000000e+00 -1.408022450941e-03 -2.000000000000e-15 1.000000000000e+00 2.310951304017e-09 0.000000000000e+00 -2.310946303713e-09 -5.000000000000e-15 1.200000000000e+00 1.085598873023e-07 0.000000000000e+00 -1.085598823028e-07 -5.000000000000e-15 1.400000000000e+00 2.134705543634e-06 0.000000000000e+00 -2.134705538634e-06 -5.000000000000e-15 1.600000000000e+00 1.066259926715e-05 0.000000000000e+00 -1.066259926215e-05 -5.000000000000e-15 1.800000000000e+00 2.835126138981e-05 0.000000000000e+00 -2.835126138481e-05 -5.000000000000e-15 2.000000000000e+00 5.627032219644e-05 0.000000000000e+00 -5.627032219144e-05 -5.000000000000e-15 2.200000000000e+00 9.482837851222e-05 0.000000000000e+00 -9.482837850722e-05 -5.000000000000e-15 2.400000000000e+00 1.440176692001e-04 0.000000000000e+00 -1.440176691951e-04 -5.000000000000e-15 2.600000000000e+00 2.035181329042e-04 0.000000000000e+00 -2.035181328992e-04 -5.000000000000e-15 2.800000000000e+00 2.727708971112e-04 0.000000000000e+00 -2.727708971062e-04 -5.000000000000e-15 3.000000000000e+00 3.510427309349e-04 0.000000000000e+00 -3.510427309299e-04 -5.000000000000e-15 3.200000000000e+00 4.374846897784e-04 0.000000000000e+00 -4.374846897734e-04 -5.000000000000e-15 3.400000000000e+00 5.311838091363e-04 0.000000000000e+00 -5.311838091313e-04 -5.000000000000e-15 3.600000000000e+00 6.312062012907e-04 0.000000000000e+00 -6.312062012857e-04 -5.000000000000e-15 3.800000000000e+00 7.366306617093e-04 0.000000000000e+00 -7.366306617043e-04 -5.000000000000e-15 4.000000000000e+00 8.465729221566e-04 0.000000000000e+00 -8.465729221516e-04 -5.000000000000e-15 4.200000000000e+00 9.602014908607e-04 0.000000000000e+00 -9.602014908557e-04 -5.000000000000e-15 4.400000000000e+00 1.076745491053e-03 0.000000000000e+00 -1.076745491048e-03 -5.000000000000e-15 4.600000000000e+00 1.195358465656e-03 0.000000000000e+00 -1.195358465651e-03 -5.000000000000e-15 4.800000000000e+00 1.312754475562e-03 0.000000000000e+00 -1.312754475557e-03 -5.000000000000e-15 5.000000000000e+00 1.424576371275e-03 0.000000000000e+00 -1.424576371270e-03 -5.000000000000e-15 5.200000000000e+00 1.529158227733e-03 0.000000000000e+00 -1.529158227728e-03 -5.000000000000e-15 5.400000000000e+00 1.625816868144e-03 0.000000000000e+00 -1.625816868139e-03 -5.000000000000e-15 5.600000000000e+00 1.714329529466e-03 0.000000000000e+00 -1.714329529461e-03 -5.000000000000e-15 5.800000000000e+00 1.794795598291e-03 0.000000000000e+00 -1.794795598286e-03 -5.000000000000e-15 6.000000000000e+00 1.867549340802e-03 0.000000000000e+00 -1.867549340797e-03 -5.000000000000e-15 6.200000000000e+00 1.933083011236e-03 0.000000000000e+00 -1.933083011231e-03 -5.000000000000e-15 6.400000000000e+00 1.991980589189e-03 0.000000000000e+00 -1.991980589184e-03 -5.000000000000e-15 6.600000000000e+00 2.044864937928e-03 0.000000000000e+00 -2.044864937923e-03 -5.000000000000e-15 6.800000000000e+00 2.092358714365e-03 0.000000000000e+00 -2.092358714360e-03 -5.000000000000e-15 7.000000000000e+00 2.135057748569e-03 0.000000000000e+00 -2.135057748564e-03 -5.000000000000e-15 7.200000000000e+00 2.173514811460e-03 0.000000000000e+00 -2.173514811455e-03 -5.000000000000e-15 7.400000000000e+00 2.208231392421e-03 0.000000000000e+00 -2.208231392416e-03 -5.000000000000e-15 7.600000000000e+00 2.239655188914e-03 0.000000000000e+00 -2.239655188909e-03 -5.000000000000e-15 7.800000000000e+00 2.268181340357e-03 0.000000000000e+00 -2.268181340352e-03 -5.000000000000e-15 8.000000000000e+00 2.294155876001e-03 0.000000000000e+00 -2.294155875996e-03 -5.000000000000e-15 8.200000000000e+00 2.317880279502e-03 0.000000000000e+00 -2.317880279497e-03 -5.000000000000e-15 8.400000000000e+00 2.339616439388e-03 0.000000000000e+00 -2.339616439383e-03 -5.000000000000e-15 8.600000000000e+00 2.359591534391e-03 0.000000000000e+00 -2.359591534386e-03 -5.000000000000e-15 8.800000000000e+00 2.378002600416e-03 0.000000000000e+00 -2.378002600411e-03 -5.000000000000e-15 9.000000000000e+00 2.395020657182e-03 0.000000000000e+00 -2.395020657177e-03 -5.000000000000e-15 9.200000000000e+00 2.410794354557e-03 0.000000000000e+00 -2.410794354552e-03 -5.000000000000e-15 9.400000000000e+00 2.425453146584e-03 0.000000000000e+00 -2.425453146579e-03 -5.000000000000e-15 9.600000000000e+00 2.439110026768e-03 0.000000000000e+00 -2.439110026763e-03 -5.000000000000e-15 9.800000000000e+00 2.451863869745e-03 0.000000000000e+00 -2.451863869740e-03 -5.000000000000e-15 1.000000000000e+01 2.463801427720e-03 0.000000000000e+00 -2.463801427715e-03 -5.000000000000e-15 1.020000000000e+01 2.474999028563e-03 0.000000000000e+00 -2.474999028558e-03 -5.000000000000e-15 1.040000000000e+01 2.485524018712e-03 0.000000000000e+00 -2.485524018707e-03 -5.000000000000e-15 1.060000000000e+01 2.495435989172e-03 0.000000000000e+00 -2.495435989167e-03 -5.000000000000e-15 1.080000000000e+01 2.504787817970e-03 0.000000000000e+00 -2.504787817965e-03 -5.000000000000e-15 1.100000000000e+01 2.513626557662e-03 0.000000000000e+00 -2.513626557657e-03 -5.000000000000e-15 1.120000000000e+01 2.521994192167e-03 0.000000000000e+00 -2.521994192162e-03 -5.000000000000e-15 1.140000000000e+01 2.529928283456e-03 0.000000000000e+00 -2.529928283451e-03 -5.000000000000e-15 1.160000000000e+01 2.537462525324e-03 0.000000000000e+00 -2.537462525319e-03 -5.000000000000e-15 1.180000000000e+01 2.544627218713e-03 0.000000000000e+00 -2.544627218708e-03 -5.000000000000e-15 1.200000000000e+01 2.551449680686e-03 0.000000000000e+00 -2.551449680681e-03 -5.000000000000e-15 1.220000000000e+01 2.557954597210e-03 0.000000000000e+00 -2.557954597205e-03 -5.000000000000e-15 1.240000000000e+01 2.564164328239e-03 0.000000000000e+00 -2.564164328234e-03 -5.000000000000e-15 1.260000000000e+01 2.570099172215e-03 0.000000000000e+00 -2.570099172210e-03 -5.000000000000e-15 1.280000000000e+01 2.575777595985e-03 0.000000000000e+00 -2.575777595980e-03 -5.000000000000e-15 1.300000000000e+01 2.581216435152e-03 0.000000000000e+00 -2.581216435147e-03 -5.000000000000e-15 1.320000000000e+01 2.586431069104e-03 0.000000000000e+00 -2.586431069099e-03 -5.000000000000e-15 1.340000000000e+01 2.591435599485e-03 0.000000000000e+00 -2.591435599480e-03 -5.000000000000e-15 1.360000000000e+01 2.596242880764e-03 0.000000000000e+00 -2.596242880759e-03 -5.000000000000e-15 1.380000000000e+01 2.600864799983e-03 0.000000000000e+00 -2.600864799978e-03 -5.000000000000e-15 1.400000000000e+01 2.605312269734e-03 0.000000000000e+00 -2.605312269729e-03 -5.000000000000e-15 1.420000000000e+01 2.609595349423e-03 0.000000000000e+00 -2.609595349418e-03 -5.000000000000e-15 1.440000000000e+01 2.613723327105e-03 0.000000000000e+00 -2.613723327100e-03 -5.000000000000e-15 1.460000000000e+01 2.617704792116e-03 0.000000000000e+00 -2.617704792111e-03 -5.000000000000e-15 1.480000000000e+01 2.621547699695e-03 0.000000000000e+00 -2.621547699690e-03 -5.000000000000e-15 1.500000000000e+01 2.625259428608e-03 0.000000000000e+00 -2.625259428603e-03 -5.000000000000e-15 1.520000000000e+01 2.628846832625e-03 0.000000000000e+00 -2.628846832620e-03 -5.000000000000e-15 1.540000000000e+01 2.632316286596e-03 0.000000000000e+00 -2.632316286591e-03 -5.000000000000e-15 1.560000000000e+01 2.635673727776e-03 0.000000000000e+00 -2.635673727771e-03 -5.000000000000e-15 1.580000000000e+01 2.638924692950e-03 0.000000000000e+00 -2.638924692945e-03 -5.000000000000e-15 1.600000000000e+01 2.642074351851e-03 0.000000000000e+00 -2.642074351846e-03 -5.000000000000e-15 1.620000000000e+01 2.645127537284e-03 0.000000000000e+00 -2.645127537279e-03 -5.000000000000e-15 1.640000000000e+01 2.648088772341e-03 0.000000000000e+00 -2.648088772336e-03 -5.000000000000e-15 1.660000000000e+01 2.650962295012e-03 0.000000000000e+00 -2.650962295007e-03 -5.000000000000e-15 1.680000000000e+01 2.653752080490e-03 0.000000000000e+00 -2.653752080485e-03 -5.000000000000e-15 1.700000000000e+01 2.656461861408e-03 0.000000000000e+00 -2.656461861403e-03 -5.000000000000e-15 1.720000000000e+01 2.659095146238e-03 0.000000000000e+00 -2.659095146233e-03 -5.000000000000e-15 1.740000000000e+01 2.661655236027e-03 0.000000000000e+00 -2.661655236022e-03 -5.000000000000e-15 1.760000000000e+01 2.664145239663e-03 0.000000000000e+00 -2.664145239658e-03 -5.000000000000e-15 1.780000000000e+01 2.666568087799e-03 0.000000000000e+00 -2.666568087794e-03 -5.000000000000e-15 1.800000000000e+01 2.668926545590e-03 0.000000000000e+00 -2.668926545585e-03 -5.000000000000e-15 1.820000000000e+01 2.671223224338e-03 0.000000000000e+00 -2.671223224333e-03 -5.000000000000e-15 1.840000000000e+01 2.673460592174e-03 0.000000000000e+00 -2.673460592169e-03 -5.000000000000e-15 1.860000000000e+01 2.675640983852e-03 0.000000000000e+00 -2.675640983847e-03 -5.000000000000e-15 1.880000000000e+01 2.677766609748e-03 0.000000000000e+00 -2.677766609743e-03 -5.000000000000e-15 1.900000000000e+01 2.679839564138e-03 0.000000000000e+00 -2.679839564133e-03 -5.000000000000e-15 1.920000000000e+01 2.681861832821e-03 0.000000000000e+00 -2.681861832816e-03 -5.000000000000e-15 1.940000000000e+01 2.683835300141e-03 0.000000000000e+00 -2.683835300136e-03 -5.000000000000e-15 1.960000000000e+01 2.685761755473e-03 0.000000000000e+00 -2.685761755468e-03 -5.000000000000e-15 1.980000000000e+01 2.687642899212e-03 0.000000000000e+00 -2.687642899207e-03 -5.000000000000e-15 2.000000000000e+01 2.689480348313e-03 0.000000000000e+00 -2.689480348308e-03 -5.000000000000e-15 1.000000000000e+00 2.641968939628e-09 0.000000000000e+00 -2.641958939431e-09 -1.000000000000e-14 1.200000000000e+00 1.234756365322e-07 0.000000000000e+00 -1.234756265319e-07 -1.000000000000e-14 1.400000000000e+00 2.310700989403e-06 0.000000000000e+00 -2.310700979404e-06 -1.000000000000e-14 1.600000000000e+00 1.119888297745e-05 0.000000000000e+00 -1.119888296744e-05 -1.000000000000e-14 1.800000000000e+00 2.938770002435e-05 0.000000000000e+00 -2.938770001435e-05 -1.000000000000e-14 2.000000000000e+00 5.791519609649e-05 0.000000000000e+00 -5.791519608649e-05 -1.000000000000e-14 2.200000000000e+00 9.716440817730e-05 0.000000000000e+00 -9.716440816730e-05 -1.000000000000e-14 2.400000000000e+00 1.471031036198e-04 0.000000000000e+00 -1.471031036098e-04 -1.000000000000e-14 2.600000000000e+00 2.073884794294e-04 0.000000000000e+00 -2.073884794194e-04 -1.000000000000e-14 2.800000000000e+00 2.774424249198e-04 0.000000000000e+00 -2.774424249098e-04 -1.000000000000e-14 3.000000000000e+00 3.565179088752e-04 0.000000000000e+00 -3.565179088652e-04 -1.000000000000e-14 3.200000000000e+00 4.437593715047e-04 0.000000000000e+00 -4.437593714947e-04 -1.000000000000e-14 3.400000000000e+00 5.382558311152e-04 0.000000000000e+00 -5.382558311052e-04 -1.000000000000e-14 3.600000000000e+00 6.390849977034e-04 0.000000000000e+00 -6.390849976934e-04 -1.000000000000e-14 3.800000000000e+00 7.453474508812e-04 0.000000000000e+00 -7.453474508712e-04 -1.000000000000e-14 4.000000000000e+00 8.561909386606e-04 0.000000000000e+00 -8.561909386506e-04 -1.000000000000e-14 4.200000000000e+00 9.708256818984e-04 0.000000000000e+00 -9.708256818884e-04 -1.000000000000e-14 4.400000000000e+00 1.088532095841e-03 0.000000000000e+00 -1.088532095831e-03 -1.000000000000e-14 4.600000000000e+00 1.208662468953e-03 0.000000000000e+00 -1.208662468943e-03 -1.000000000000e-14 4.800000000000e+00 1.330638342806e-03 0.000000000000e+00 -1.330638342796e-03 -1.000000000000e-14 5.000000000000e+00 1.453944751703e-03 0.000000000000e+00 -1.453944751693e-03 -1.000000000000e-14 5.200000000000e+00 1.578122637249e-03 0.000000000000e+00 -1.578122637239e-03 -1.000000000000e-14 5.400000000000e+00 1.702760230604e-03 0.000000000000e+00 -1.702760230594e-03 -1.000000000000e-14 5.600000000000e+00 1.827484006334e-03 0.000000000000e+00 -1.827484006324e-03 -1.000000000000e-14 5.800000000000e+00 1.951949079827e-03 0.000000000000e+00 -1.951949079817e-03 -1.000000000000e-14 6.000000000000e+00 2.075776756264e-03 0.000000000000e+00 -2.075776756254e-03 -1.000000000000e-14 6.200000000000e+00 2.197631923934e-03 0.000000000000e+00 -2.197631923924e-03 -1.000000000000e-14 6.400000000000e+00 2.315498402435e-03 0.000000000000e+00 -2.315498402425e-03 -1.000000000000e-14 6.600000000000e+00 2.428339945450e-03 0.000000000000e+00 -2.428339945440e-03 -1.000000000000e-14 6.800000000000e+00 2.535507427293e-03 0.000000000000e+00 -2.535507427283e-03 -1.000000000000e-14 7.000000000000e+00 2.636528614456e-03 0.000000000000e+00 -2.636528614446e-03 -1.000000000000e-14 7.200000000000e+00 2.731081830950e-03 0.000000000000e+00 -2.731081830940e-03 -1.000000000000e-14 7.400000000000e+00 2.818995557481e-03 0.000000000000e+00 -2.818995557471e-03 -1.000000000000e-14 7.600000000000e+00 2.900245700907e-03 0.000000000000e+00 -2.900245700897e-03 -1.000000000000e-14 7.800000000000e+00 2.974944230601e-03 0.000000000000e+00 -2.974944230591e-03 -1.000000000000e-14 8.000000000000e+00 3.043319803042e-03 0.000000000000e+00 -3.043319803032e-03 -1.000000000000e-14 8.200000000000e+00 3.105693180364e-03 0.000000000000e+00 -3.105693180354e-03 -1.000000000000e-14 8.400000000000e+00 3.162450563048e-03 0.000000000000e+00 -3.162450563038e-03 -1.000000000000e-14 8.600000000000e+00 3.214017651698e-03 0.000000000000e+00 -3.214017651688e-03 -1.000000000000e-14 8.800000000000e+00 3.260836635257e-03 0.000000000000e+00 -3.260836635247e-03 -1.000000000000e-14 9.000000000000e+00 3.303347469147e-03 0.000000000000e+00 -3.303347469137e-03 -1.000000000000e-14 9.200000000000e+00 3.341973937991e-03 0.000000000000e+00 -3.341973937981e-03 -1.000000000000e-14 9.400000000000e+00 3.377114288246e-03 0.000000000000e+00 -3.377114288236e-03 -1.000000000000e-14 9.600000000000e+00 3.409135768853e-03 0.000000000000e+00 -3.409135768843e-03 -1.000000000000e-14 9.800000000000e+00 3.438372228621e-03 0.000000000000e+00 -3.438372228611e-03 -1.000000000000e-14 1.000000000000e+01 3.465123920580e-03 0.000000000000e+00 -3.465123920570e-03 -1.000000000000e-14 1.020000000000e+01 3.489658774518e-03 0.000000000000e+00 -3.489658774508e-03 -1.000000000000e-14 1.040000000000e+01 3.512214553146e-03 0.000000000000e+00 -3.512214553136e-03 -1.000000000000e-14 1.060000000000e+01 3.533001461878e-03 0.000000000000e+00 -3.533001461868e-03 -1.000000000000e-14 1.080000000000e+01 3.552204915607e-03 0.000000000000e+00 -3.552204915597e-03 -1.000000000000e-14 1.100000000000e+01 3.569988270658e-03 0.000000000000e+00 -3.569988270648e-03 -1.000000000000e-14 1.120000000000e+01 3.586495407236e-03 0.000000000000e+00 -3.586495407226e-03 -1.000000000000e-14 1.140000000000e+01 3.601853101391e-03 0.000000000000e+00 -3.601853101381e-03 -1.000000000000e-14 1.160000000000e+01 3.616173161234e-03 0.000000000000e+00 -3.616173161224e-03 -1.000000000000e-14 1.180000000000e+01 3.629554324553e-03 0.000000000000e+00 -3.629554324543e-03 -1.000000000000e-14 1.200000000000e+01 3.642083928333e-03 0.000000000000e+00 -3.642083928323e-03 -1.000000000000e-14 1.220000000000e+01 3.653839367725e-03 0.000000000000e+00 -3.653839367715e-03 -1.000000000000e-14 1.240000000000e+01 3.664889365237e-03 0.000000000000e+00 -3.664889365227e-03 -1.000000000000e-14 1.260000000000e+01 3.675295071516e-03 0.000000000000e+00 -3.675295071506e-03 -1.000000000000e-14 1.280000000000e+01 3.685111018423e-03 0.000000000000e+00 -3.685111018413e-03 -1.000000000000e-14 1.300000000000e+01 3.694385943497e-03 0.000000000000e+00 -3.694385943487e-03 -1.000000000000e-14 1.320000000000e+01 3.703163503102e-03 0.000000000000e+00 -3.703163503092e-03 -1.000000000000e-14 1.340000000000e+01 3.711482889522e-03 0.000000000000e+00 -3.711482889512e-03 -1.000000000000e-14 1.360000000000e+01 3.719379365414e-03 0.000000000000e+00 -3.719379365404e-03 -1.000000000000e-14 1.380000000000e+01 3.726884727205e-03 0.000000000000e+00 -3.726884727195e-03 -1.000000000000e-14 1.400000000000e+01 3.734027707465e-03 0.000000000000e+00 -3.734027707455e-03 -1.000000000000e-14 1.420000000000e+01 3.740834324850e-03 0.000000000000e+00 -3.740834324840e-03 -1.000000000000e-14 1.440000000000e+01 3.747328188971e-03 0.000000000000e+00 -3.747328188961e-03 -1.000000000000e-14 1.460000000000e+01 3.753530766491e-03 0.000000000000e+00 -3.753530766481e-03 -1.000000000000e-14 1.480000000000e+01 3.759461613835e-03 0.000000000000e+00 -3.759461613825e-03 -1.000000000000e-14 1.500000000000e+01 3.765138581082e-03 0.000000000000e+00 -3.765138581072e-03 -1.000000000000e-14 1.520000000000e+01 3.770577990989e-03 0.000000000000e+00 -3.770577990979e-03 -1.000000000000e-14 1.540000000000e+01 3.775794796478e-03 0.000000000000e+00 -3.775794796468e-03 -1.000000000000e-14 1.560000000000e+01 3.780802754390e-03 0.000000000000e+00 -3.780802754380e-03 -1.000000000000e-14 1.580000000000e+01 3.785614404115e-03 0.000000000000e+00 -3.785614404105e-03 -1.000000000000e-14 1.600000000000e+01 3.790241399135e-03 0.000000000000e+00 -3.790241399125e-03 -1.000000000000e-14 1.620000000000e+01 3.794694449489e-03 0.000000000000e+00 -3.794694449479e-03 -1.000000000000e-14 1.640000000000e+01 3.798983447073e-03 0.000000000000e+00 -3.798983447063e-03 -1.000000000000e-14 1.660000000000e+01 3.803117541832e-03 0.000000000000e+00 -3.803117541822e-03 -1.000000000000e-14 1.680000000000e+01 3.807105209636e-03 0.000000000000e+00 -3.807105209626e-03 -1.000000000000e-14 1.700000000000e+01 3.810954312941e-03 0.000000000000e+00 -3.810954312931e-03 -1.000000000000e-14 1.720000000000e+01 3.814672155087e-03 0.000000000000e+00 -3.814672155077e-03 -1.000000000000e-14 1.740000000000e+01 3.818265528987e-03 0.000000000000e+00 -3.818265528977e-03 -1.000000000000e-14 1.760000000000e+01 3.821740760865e-03 0.000000000000e+00 -3.821740760855e-03 -1.000000000000e-14 1.780000000000e+01 3.825103749606e-03 0.000000000000e+00 -3.825103749596e-03 -1.000000000000e-14 1.800000000000e+01 3.828360002229e-03 0.000000000000e+00 -3.828360002219e-03 -1.000000000000e-14 1.820000000000e+01 3.831514665898e-03 0.000000000000e+00 -3.831514665888e-03 -1.000000000000e-14 1.840000000000e+01 3.834572556875e-03 0.000000000000e+00 -3.834572556865e-03 -1.000000000000e-14 1.860000000000e+01 3.837538186732e-03 0.000000000000e+00 -3.837538186722e-03 -1.000000000000e-14 1.880000000000e+01 3.840415786120e-03 0.000000000000e+00 -3.840415786110e-03 -1.000000000000e-14 1.900000000000e+01 3.843209326367e-03 0.000000000000e+00 -3.843209326357e-03 -1.000000000000e-14 1.920000000000e+01 3.845922539106e-03 0.000000000000e+00 -3.845922539096e-03 -1.000000000000e-14 1.940000000000e+01 3.848558934168e-03 0.000000000000e+00 -3.848558934158e-03 -1.000000000000e-14 1.960000000000e+01 3.851121815889e-03 0.000000000000e+00 -3.851121815879e-03 -1.000000000000e-14 1.980000000000e+01 3.853614298006e-03 0.000000000000e+00 -3.853614297996e-03 -1.000000000000e-14 2.000000000000e+01 3.856039317277e-03 0.000000000000e+00 -3.856039317267e-03 -1.000000000000e-14 1.000000000000e+00 8.474683628468e-13 0.000000000000e+00 -8.454685635175e-13 -2.000000000000e-15 1.200000000000e+00 1.729889443497e-10 0.000000000000e+00 -1.729869446539e-10 -2.000000000000e-15 1.400000000000e+00 4.059861845600e-08 0.000000000000e+00 -4.059861645628e-08 -2.000000000000e-15 1.600000000000e+00 2.340085536073e-06 0.000000000000e+00 -2.340085534073e-06 -2.000000000000e-15 1.800000000000e+00 1.416417906072e-05 0.000000000000e+00 -1.416417905872e-05 -2.000000000000e-15 2.000000000000e+00 3.935254452813e-05 0.000000000000e+00 -3.935254452613e-05 -2.000000000000e-15 2.200000000000e+00 7.928589063844e-05 0.000000000000e+00 -7.928589063644e-05 -2.000000000000e-15 2.400000000000e+00 1.343107018778e-04 0.000000000000e+00 -1.343107018758e-04 -2.000000000000e-15 2.600000000000e+00 2.040090989800e-04 0.000000000000e+00 -2.040090989780e-04 -2.000000000000e-15 2.800000000000e+00 2.873540440107e-04 0.000000000000e+00 -2.873540440087e-04 -2.000000000000e-15 3.000000000000e+00 3.828755053082e-04 0.000000000000e+00 -3.828755053062e-04 -2.000000000000e-15 3.200000000000e+00 4.888394185794e-04 0.000000000000e+00 -4.888394185774e-04 -2.000000000000e-15 3.400000000000e+00 6.009186887864e-04 0.000000000000e+00 -6.009186887844e-04 -2.000000000000e-15 3.600000000000e+00 7.036107115398e-04 0.000000000000e+00 -7.036107115378e-04 -2.000000000000e-15 3.800000000000e+00 7.924185470314e-04 0.000000000000e+00 -7.924185470294e-04 -2.000000000000e-15 4.000000000000e+00 8.681535554763e-04 0.000000000000e+00 -8.681535554743e-04 -2.000000000000e-15 4.200000000000e+00 9.323518908212e-04 0.000000000000e+00 -9.323518908192e-04 -2.000000000000e-15 4.400000000000e+00 9.867387572459e-04 0.000000000000e+00 -9.867387572439e-04 -2.000000000000e-15 4.600000000000e+00 1.032948287944e-03 0.000000000000e+00 -1.032948287942e-03 -2.000000000000e-15 4.800000000000e+00 1.072409616481e-03 0.000000000000e+00 -1.072409616479e-03 -2.000000000000e-15 5.000000000000e+00 1.106321440529e-03 0.000000000000e+00 -1.106321440527e-03 -2.000000000000e-15 5.200000000000e+00 1.135666192186e-03 0.000000000000e+00 -1.135666192184e-03 -2.000000000000e-15 5.400000000000e+00 1.161239273269e-03 0.000000000000e+00 -1.161239273267e-03 -2.000000000000e-15 5.600000000000e+00 1.183681302885e-03 0.000000000000e+00 -1.183681302883e-03 -2.000000000000e-15 5.800000000000e+00 1.203507918541e-03 0.000000000000e+00 -1.203507918539e-03 -2.000000000000e-15 6.000000000000e+00 1.221135155517e-03 0.000000000000e+00 -1.221135155515e-03 -2.000000000000e-15 6.200000000000e+00 1.236900139254e-03 0.000000000000e+00 -1.236900139252e-03 -2.000000000000e-15 6.400000000000e+00 1.251077555940e-03 0.000000000000e+00 -1.251077555938e-03 -2.000000000000e-15 6.600000000000e+00 1.263892596899e-03 0.000000000000e+00 -1.263892596897e-03 -2.000000000000e-15 6.800000000000e+00 1.275531073181e-03 0.000000000000e+00 -1.275531073179e-03 -2.000000000000e-15 7.000000000000e+00 1.286147308298e-03 0.000000000000e+00 -1.286147308296e-03 -2.000000000000e-15 7.200000000000e+00 1.295870306460e-03 0.000000000000e+00 -1.295870306458e-03 -2.000000000000e-15 7.400000000000e+00 1.304808589219e-03 0.000000000000e+00 -1.304808589217e-03 -2.000000000000e-15 7.600000000000e+00 1.313054005175e-03 0.000000000000e+00 -1.313054005173e-03 -2.000000000000e-15 7.800000000000e+00 1.320684746515e-03 0.000000000000e+00 -1.320684746513e-03 -2.000000000000e-15 8.000000000000e+00 1.327767751077e-03 0.000000000000e+00 -1.327767751075e-03 -2.000000000000e-15 8.200000000000e+00 1.334360626337e-03 0.000000000000e+00 -1.334360626335e-03 -2.000000000000e-15 8.400000000000e+00 1.340513199621e-03 0.000000000000e+00 -1.340513199619e-03 -2.000000000000e-15 8.600000000000e+00 1.346268774540e-03 0.000000000000e+00 -1.346268774538e-03 -2.000000000000e-15 8.800000000000e+00 1.351665155219e-03 0.000000000000e+00 -1.351665155217e-03 -2.000000000000e-15 9.000000000000e+00 1.356735485964e-03 0.000000000000e+00 -1.356735485962e-03 -2.000000000000e-15 9.200000000000e+00 1.361508943416e-03 0.000000000000e+00 -1.361508943414e-03 -2.000000000000e-15 9.400000000000e+00 1.366011310104e-03 0.000000000000e+00 -1.366011310102e-03 -2.000000000000e-15 9.600000000000e+00 1.370265452180e-03 0.000000000000e+00 -1.370265452178e-03 -2.000000000000e-15 9.800000000000e+00 1.374291719265e-03 0.000000000000e+00 -1.374291719263e-03 -2.000000000000e-15 1.000000000000e+01 1.378108280699e-03 0.000000000000e+00 -1.378108280697e-03 -2.000000000000e-15 1.020000000000e+01 1.381731409586e-03 0.000000000000e+00 -1.381731409584e-03 -2.000000000000e-15 1.040000000000e+01 1.385175723768e-03 0.000000000000e+00 -1.385175723766e-03 -2.000000000000e-15 1.060000000000e+01 1.388454391111e-03 0.000000000000e+00 -1.388454391109e-03 -2.000000000000e-15 1.080000000000e+01 1.391579317317e-03 0.000000000000e+00 -1.391579317315e-03 -2.000000000000e-15 1.100000000000e+01 1.394561245886e-03 0.000000000000e+00 -1.394561245884e-03 -2.000000000000e-15 1.120000000000e+01 1.397409967254e-03 0.000000000000e+00 -1.397409967252e-03 -2.000000000000e-15 1.140000000000e+01 1.400134375956e-03 0.000000000000e+00 -1.400134375954e-03 -2.000000000000e-15 1.160000000000e+01 1.402742582501e-03 0.000000000000e+00 -1.402742582499e-03 -2.000000000000e-15 1.180000000000e+01 1.405241998186e-03 0.000000000000e+00 -1.405241998184e-03 -2.000000000000e-15 1.200000000000e+01 1.407639409121e-03 0.000000000000e+00 -1.407639409119e-03 -2.000000000000e-15 1.220000000000e+01 1.409941041053e-03 0.000000000000e+00 -1.409941041051e-03 -2.000000000000e-15 1.240000000000e+01 1.412152616281e-03 0.000000000000e+00 -1.412152616279e-03 -2.000000000000e-15 1.260000000000e+01 1.414279403776e-03 0.000000000000e+00 -1.414279403774e-03 -2.000000000000e-15 1.280000000000e+01 1.416326263419e-03 0.000000000000e+00 -1.416326263417e-03 -2.000000000000e-15 1.300000000000e+01 1.418297685155e-03 0.000000000000e+00 -1.418297685153e-03 -2.000000000000e-15 1.320000000000e+01 1.420197823729e-03 0.000000000000e+00 -1.420197823727e-03 -2.000000000000e-15 1.340000000000e+01 1.422030529572e-03 0.000000000000e+00 -1.422030529570e-03 -2.000000000000e-15 1.360000000000e+01 1.423799376333e-03 0.000000000000e+00 -1.423799376331e-03 -2.000000000000e-15 1.380000000000e+01 1.425507685458e-03 0.000000000000e+00 -1.425507685456e-03 -2.000000000000e-15 1.400000000000e+01 1.427158548204e-03 0.000000000000e+00 -1.427158548202e-03 -2.000000000000e-15 1.420000000000e+01 1.428754845370e-03 0.000000000000e+00 -1.428754845368e-03 -2.000000000000e-15 1.440000000000e+01 1.430299265034e-03 0.000000000000e+00 -1.430299265032e-03 -2.000000000000e-15 1.460000000000e+01 1.431794318515e-03 0.000000000000e+00 -1.431794318513e-03 -2.000000000000e-15 1.480000000000e+01 1.433242354777e-03 0.000000000000e+00 -1.433242354775e-03 -2.000000000000e-15 1.500000000000e+01 1.434645573436e-03 0.000000000000e+00 -1.434645573434e-03 -2.000000000000e-15 1.520000000000e+01 1.436006036537e-03 0.000000000000e+00 -1.436006036535e-03 -2.000000000000e-15 1.540000000000e+01 1.437325679227e-03 0.000000000000e+00 -1.437325679225e-03 -2.000000000000e-15 1.560000000000e+01 1.438606319449e-03 0.000000000000e+00 -1.438606319447e-03 -2.000000000000e-15 1.580000000000e+01 1.439849666753e-03 0.000000000000e+00 -1.439849666751e-03 -2.000000000000e-15 1.600000000000e+01 1.441057330329e-03 0.000000000000e+00 -1.441057330327e-03 -2.000000000000e-15 1.620000000000e+01 1.442230826319e-03 0.000000000000e+00 -1.442230826317e-03 -2.000000000000e-15 1.640000000000e+01 1.443371584515e-03 0.000000000000e+00 -1.443371584513e-03 -2.000000000000e-15 1.660000000000e+01 1.444480954467e-03 0.000000000000e+00 -1.444480954465e-03 -2.000000000000e-15 1.680000000000e+01 1.445560211091e-03 0.000000000000e+00 -1.445560211089e-03 -2.000000000000e-15 1.700000000000e+01 1.446610559799e-03 0.000000000000e+00 -1.446610559797e-03 -2.000000000000e-15 1.720000000000e+01 1.447633141221e-03 0.000000000000e+00 -1.447633141219e-03 -2.000000000000e-15 1.740000000000e+01 1.448629035537e-03 0.000000000000e+00 -1.448629035535e-03 -2.000000000000e-15 1.760000000000e+01 1.449599266469e-03 0.000000000000e+00 -1.449599266467e-03 -2.000000000000e-15 1.780000000000e+01 1.450544804958e-03 0.000000000000e+00 -1.450544804956e-03 -2.000000000000e-15 1.800000000000e+01 1.451466572554e-03 0.000000000000e+00 -1.451466572552e-03 -2.000000000000e-15 1.820000000000e+01 1.452365444551e-03 0.000000000000e+00 -1.452365444549e-03 -2.000000000000e-15 1.840000000000e+01 1.453242252879e-03 0.000000000000e+00 -1.453242252877e-03 -2.000000000000e-15 1.860000000000e+01 1.454097788788e-03 0.000000000000e+00 -1.454097788786e-03 -2.000000000000e-15 1.880000000000e+01 1.454932805327e-03 0.000000000000e+00 -1.454932805325e-03 -2.000000000000e-15 1.900000000000e+01 1.455748019648e-03 0.000000000000e+00 -1.455748019646e-03 -2.000000000000e-15 1.920000000000e+01 1.456544115140e-03 0.000000000000e+00 -1.456544115138e-03 -2.000000000000e-15 1.940000000000e+01 1.457321743416e-03 0.000000000000e+00 -1.457321743414e-03 -2.000000000000e-15 1.960000000000e+01 1.458081526159e-03 0.000000000000e+00 -1.458081526157e-03 -2.000000000000e-15 1.980000000000e+01 1.458824056835e-03 0.000000000000e+00 -1.458824056833e-03 -2.000000000000e-15 2.000000000000e+01 1.459549902301e-03 0.000000000000e+00 -1.459549902299e-03 -2.000000000000e-15 1.000000000000e+00 9.486417727744e-13 0.000000000000e+00 -9.436418037925e-13 -5.000000000000e-15 1.200000000000e+00 1.937825798264e-10 0.000000000000e+00 -1.937775802791e-10 -5.000000000000e-15 1.400000000000e+00 4.540884359413e-08 0.000000000000e+00 -4.540883859445e-08 -5.000000000000e-15 1.600000000000e+00 2.482204729891e-06 0.000000000000e+00 -2.482204724892e-06 -5.000000000000e-15 1.800000000000e+00 1.465908071444e-05 0.000000000000e+00 -1.465908070944e-05 -5.000000000000e-15 2.000000000000e+00 4.036326424163e-05 0.000000000000e+00 -4.036326423663e-05 -5.000000000000e-15 2.200000000000e+00 8.095228733810e-05 0.000000000000e+00 -8.095228733310e-05 -5.000000000000e-15 2.400000000000e+00 1.367551361845e-04 0.000000000000e+00 -1.367551361795e-04 -5.000000000000e-15 2.600000000000e+00 2.073458444368e-04 0.000000000000e+00 -2.073458444318e-04 -5.000000000000e-15 2.800000000000e+00 2.917057374706e-04 0.000000000000e+00 -2.917057374656e-04 -5.000000000000e-15 3.000000000000e+00 3.883905063934e-04 0.000000000000e+00 -3.883905063884e-04 -5.000000000000e-15 3.200000000000e+00 4.957021245663e-04 0.000000000000e+00 -4.957021245613e-04 -5.000000000000e-15 3.400000000000e+00 6.118465271613e-04 0.000000000000e+00 -6.118465271563e-04 -5.000000000000e-15 3.600000000000e+00 7.350602689876e-04 0.000000000000e+00 -7.350602689826e-04 -5.000000000000e-15 3.800000000000e+00 8.636981587704e-04 0.000000000000e+00 -8.636981587654e-04 -5.000000000000e-15 4.000000000000e+00 9.962826734635e-04 0.000000000000e+00 -9.962826734585e-04 -5.000000000000e-15 4.200000000000e+00 1.131521571853e-03 0.000000000000e+00 -1.131521571848e-03 -5.000000000000e-15 4.400000000000e+00 1.268301287883e-03 0.000000000000e+00 -1.268301287878e-03 -5.000000000000e-15 4.600000000000e+00 1.405468727200e-03 0.000000000000e+00 -1.405468727195e-03 -5.000000000000e-15 4.800000000000e+00 1.537390069980e-03 0.000000000000e+00 -1.537390069975e-03 -5.000000000000e-15 5.000000000000e+00 1.659156409607e-03 0.000000000000e+00 -1.659156409602e-03 -5.000000000000e-15 5.200000000000e+00 1.770144149313e-03 0.000000000000e+00 -1.770144149308e-03 -5.000000000000e-15 5.400000000000e+00 1.870335252001e-03 0.000000000000e+00 -1.870335251996e-03 -5.000000000000e-15 5.600000000000e+00 1.959971360833e-03 0.000000000000e+00 -1.959971360828e-03 -5.000000000000e-15 5.800000000000e+00 2.039544326381e-03 0.000000000000e+00 -2.039544326376e-03 -5.000000000000e-15 6.000000000000e+00 2.109758799531e-03 0.000000000000e+00 -2.109758799526e-03 -5.000000000000e-15 6.200000000000e+00 2.171464522160e-03 0.000000000000e+00 -2.171464522155e-03 -5.000000000000e-15 6.400000000000e+00 2.225581655646e-03 0.000000000000e+00 -2.225581655641e-03 -5.000000000000e-15 6.600000000000e+00 2.273034205994e-03 0.000000000000e+00 -2.273034205989e-03 -5.000000000000e-15 6.800000000000e+00 2.314699966581e-03 0.000000000000e+00 -2.314699966576e-03 -5.000000000000e-15 7.000000000000e+00 2.351379364497e-03 0.000000000000e+00 -2.351379364492e-03 -5.000000000000e-15 7.200000000000e+00 2.383780936789e-03 0.000000000000e+00 -2.383780936784e-03 -5.000000000000e-15 7.400000000000e+00 2.412518952815e-03 0.000000000000e+00 -2.412518952810e-03 -5.000000000000e-15 7.600000000000e+00 2.438118569911e-03 0.000000000000e+00 -2.438118569906e-03 -5.000000000000e-15 7.800000000000e+00 2.461024850305e-03 0.000000000000e+00 -2.461024850300e-03 -5.000000000000e-15 8.000000000000e+00 2.481613152227e-03 0.000000000000e+00 -2.481613152222e-03 -5.000000000000e-15 8.200000000000e+00 2.500199418482e-03 0.000000000000e+00 -2.500199418477e-03 -5.000000000000e-15 8.400000000000e+00 2.517049602928e-03 0.000000000000e+00 -2.517049602923e-03 -5.000000000000e-15 8.600000000000e+00 2.532387926618e-03 0.000000000000e+00 -2.532387926613e-03 -5.000000000000e-15 8.800000000000e+00 2.546403912152e-03 0.000000000000e+00 -2.546403912147e-03 -5.000000000000e-15 9.000000000000e+00 2.559258275293e-03 0.000000000000e+00 -2.559258275288e-03 -5.000000000000e-15 9.200000000000e+00 2.571087808316e-03 0.000000000000e+00 -2.571087808311e-03 -5.000000000000e-15 9.400000000000e+00 2.582009403620e-03 0.000000000000e+00 -2.582009403615e-03 -5.000000000000e-15 9.600000000000e+00 2.592123359366e-03 0.000000000000e+00 -2.592123359361e-03 -5.000000000000e-15 9.800000000000e+00 2.601516093177e-03 0.000000000000e+00 -2.601516093172e-03 -5.000000000000e-15 1.000000000000e+01 2.610262371488e-03 0.000000000000e+00 -2.610262371483e-03 -5.000000000000e-15 1.020000000000e+01 2.618427144256e-03 0.000000000000e+00 -2.618427144251e-03 -5.000000000000e-15 1.040000000000e+01 2.626067058638e-03 0.000000000000e+00 -2.626067058633e-03 -5.000000000000e-15 1.060000000000e+01 2.633231711582e-03 0.000000000000e+00 -2.633231711577e-03 -5.000000000000e-15 1.080000000000e+01 2.639964689815e-03 0.000000000000e+00 -2.639964689810e-03 -5.000000000000e-15 1.100000000000e+01 2.646304436387e-03 0.000000000000e+00 -2.646304436382e-03 -5.000000000000e-15 1.120000000000e+01 2.652284975363e-03 0.000000000000e+00 -2.652284975358e-03 -5.000000000000e-15 1.140000000000e+01 2.657936520142e-03 0.000000000000e+00 -2.657936520137e-03 -5.000000000000e-15 1.160000000000e+01 2.663285986024e-03 0.000000000000e+00 -2.663285986019e-03 -5.000000000000e-15 1.180000000000e+01 2.668357423688e-03 0.000000000000e+00 -2.668357423683e-03 -5.000000000000e-15 1.200000000000e+01 2.673172387166e-03 0.000000000000e+00 -2.673172387161e-03 -5.000000000000e-15 1.220000000000e+01 2.677750247303e-03 0.000000000000e+00 -2.677750247298e-03 -5.000000000000e-15 1.240000000000e+01 2.682108459765e-03 0.000000000000e+00 -2.682108459760e-03 -5.000000000000e-15 1.260000000000e+01 2.686262794938e-03 0.000000000000e+00 -2.686262794933e-03 -5.000000000000e-15 1.280000000000e+01 2.690227535829e-03 0.000000000000e+00 -2.690227535824e-03 -5.000000000000e-15 1.300000000000e+01 2.694015675433e-03 0.000000000000e+00 -2.694015675428e-03 -5.000000000000e-15 1.320000000000e+01 2.697638955156e-03 0.000000000000e+00 -2.697638955151e-03 -5.000000000000e-15 1.340000000000e+01 2.701108164015e-03 0.000000000000e+00 -2.701108164010e-03 -5.000000000000e-15 1.360000000000e+01 2.704433132506e-03 0.000000000000e+00 -2.704433132501e-03 -5.000000000000e-15 1.380000000000e+01 2.707622861391e-03 0.000000000000e+00 -2.707622861386e-03 -5.000000000000e-15 1.400000000000e+01 2.710685607616e-03 0.000000000000e+00 -2.710685607611e-03 -5.000000000000e-15 1.420000000000e+01 2.713628959762e-03 0.000000000000e+00 -2.713628959757e-03 -5.000000000000e-15 1.440000000000e+01 2.716459904528e-03 0.000000000000e+00 -2.716459904523e-03 -5.000000000000e-15 1.460000000000e+01 2.719184885457e-03 0.000000000000e+00 -2.719184885452e-03 -5.000000000000e-15 1.480000000000e+01 2.721809854916e-03 0.000000000000e+00 -2.721809854911e-03 -5.000000000000e-15 1.500000000000e+01 2.724340320246e-03 0.000000000000e+00 -2.724340320241e-03 -5.000000000000e-15 1.520000000000e+01 2.726781384788e-03 0.000000000000e+00 -2.726781384783e-03 -5.000000000000e-15 1.540000000000e+01 2.729137784470e-03 0.000000000000e+00 -2.729137784465e-03 -5.000000000000e-15 1.560000000000e+01 2.731413920479e-03 0.000000000000e+00 -2.731413920474e-03 -5.000000000000e-15 1.580000000000e+01 2.733613888508e-03 0.000000000000e+00 -2.733613888503e-03 -5.000000000000e-15 1.600000000000e+01 2.735741504988e-03 0.000000000000e+00 -2.735741504983e-03 -5.000000000000e-15 1.620000000000e+01 2.737800330660e-03 0.000000000000e+00 -2.737800330655e-03 -5.000000000000e-15 1.640000000000e+01 2.739793691788e-03 0.000000000000e+00 -2.739793691783e-03 -5.000000000000e-15 1.660000000000e+01 2.741724699300e-03 0.000000000000e+00 -2.741724699295e-03 -5.000000000000e-15 1.680000000000e+01 2.743596266076e-03 0.000000000000e+00 -2.743596266071e-03 -5.000000000000e-15 1.700000000000e+01 2.745411122587e-03 0.000000000000e+00 -2.745411122582e-03 -5.000000000000e-15 1.720000000000e+01 2.747171831084e-03 0.000000000000e+00 -2.747171831079e-03 -5.000000000000e-15 1.740000000000e+01 2.748880798463e-03 0.000000000000e+00 -2.748880798458e-03 -5.000000000000e-15 1.760000000000e+01 2.750540287977e-03 0.000000000000e+00 -2.750540287972e-03 -5.000000000000e-15 1.780000000000e+01 2.752152429891e-03 0.000000000000e+00 -2.752152429886e-03 -5.000000000000e-15 1.800000000000e+01 2.753719231205e-03 0.000000000000e+00 -2.753719231200e-03 -5.000000000000e-15 1.820000000000e+01 2.755242584527e-03 0.000000000000e+00 -2.755242584522e-03 -5.000000000000e-15 1.840000000000e+01 2.756724276196e-03 0.000000000000e+00 -2.756724276191e-03 -5.000000000000e-15 1.860000000000e+01 2.758165993708e-03 0.000000000000e+00 -2.758165993703e-03 -5.000000000000e-15 1.880000000000e+01 2.759569332535e-03 0.000000000000e+00 -2.759569332530e-03 -5.000000000000e-15 1.900000000000e+01 2.760935802377e-03 0.000000000000e+00 -2.760935802372e-03 -5.000000000000e-15 1.920000000000e+01 2.762266832916e-03 0.000000000000e+00 -2.762266832911e-03 -5.000000000000e-15 1.940000000000e+01 2.763563779105e-03 0.000000000000e+00 -2.763563779100e-03 -5.000000000000e-15 1.960000000000e+01 2.764827926041e-03 0.000000000000e+00 -2.764827926036e-03 -5.000000000000e-15 1.980000000000e+01 2.766060493463e-03 0.000000000000e+00 -2.766060493458e-03 -5.000000000000e-15 2.000000000000e+01 2.767262639902e-03 0.000000000000e+00 -2.767262639897e-03 -5.000000000000e-15 1.000000000000e+00 1.136861438322e-12 0.000000000000e+00 -1.126862587892e-12 -1.000000000000e-14 1.200000000000e+00 2.328145315422e-10 0.000000000000e+00 -2.328045325478e-10 -1.000000000000e-14 1.400000000000e+00 5.435776307544e-08 0.000000000000e+00 -5.435775307470e-08 -1.000000000000e-14 1.600000000000e+00 2.717917985741e-06 0.000000000000e+00 -2.717917975742e-06 -1.000000000000e-14 1.800000000000e+00 1.542592294087e-05 0.000000000000e+00 -1.542592293087e-05 -1.000000000000e-14 2.000000000000e+00 4.185658493470e-05 0.000000000000e+00 -4.185658492470e-05 -1.000000000000e-14 2.200000000000e+00 8.331424679273e-05 0.000000000000e+00 -8.331424678273e-05 -1.000000000000e-14 2.400000000000e+00 1.400769692522e-04 0.000000000000e+00 -1.400769692422e-04 -1.000000000000e-14 2.600000000000e+00 2.116677950224e-04 0.000000000000e+00 -2.116677950124e-04 -1.000000000000e-14 2.800000000000e+00 2.970229660249e-04 0.000000000000e+00 -2.970229660149e-04 -1.000000000000e-14 3.000000000000e+00 3.946656284081e-04 0.000000000000e+00 -3.946656283981e-04 -1.000000000000e-14 3.200000000000e+00 5.028829065826e-04 0.000000000000e+00 -5.028829065726e-04 -1.000000000000e-14 3.400000000000e+00 6.198865719884e-04 0.000000000000e+00 -6.198865719784e-04 -1.000000000000e-14 3.600000000000e+00 7.439407043620e-04 0.000000000000e+00 -7.439407043520e-04 -1.000000000000e-14 3.800000000000e+00 8.734489404784e-04 0.000000000000e+00 -8.734489404684e-04 -1.000000000000e-14 4.000000000000e+00 1.007002733154e-03 0.000000000000e+00 -1.007002733144e-03 -1.000000000000e-14 4.200000000000e+00 1.143397705904e-03 0.000000000000e+00 -1.143397705894e-03 -1.000000000000e-14 4.400000000000e+00 1.281627237068e-03 0.000000000000e+00 -1.281627237058e-03 -1.000000000000e-14 4.600000000000e+00 1.420862186379e-03 0.000000000000e+00 -1.420862186369e-03 -1.000000000000e-14 4.800000000000e+00 1.560423473734e-03 0.000000000000e+00 -1.560423473724e-03 -1.000000000000e-14 5.000000000000e+00 1.699752538009e-03 0.000000000000e+00 -1.699752537999e-03 -1.000000000000e-14 5.200000000000e+00 1.838382526883e-03 0.000000000000e+00 -1.838382526873e-03 -1.000000000000e-14 5.400000000000e+00 1.975911700847e-03 0.000000000000e+00 -1.975911700837e-03 -1.000000000000e-14 5.600000000000e+00 2.111979435622e-03 0.000000000000e+00 -2.111979435612e-03 -1.000000000000e-14 5.800000000000e+00 2.246244240934e-03 0.000000000000e+00 -2.246244240924e-03 -1.000000000000e-14 6.000000000000e+00 2.378068768456e-03 0.000000000000e+00 -2.378068768446e-03 -1.000000000000e-14 6.200000000000e+00 2.504921958193e-03 0.000000000000e+00 -2.504921958183e-03 -1.000000000000e-14 6.400000000000e+00 2.625327755134e-03 0.000000000000e+00 -2.625327755124e-03 -1.000000000000e-14 6.600000000000e+00 2.738736863998e-03 0.000000000000e+00 -2.738736863988e-03 -1.000000000000e-14 6.800000000000e+00 2.844755250908e-03 0.000000000000e+00 -2.844755250898e-03 -1.000000000000e-14 7.000000000000e+00 2.943089085304e-03 0.000000000000e+00 -2.943089085294e-03 -1.000000000000e-14 7.200000000000e+00 3.033568590378e-03 0.000000000000e+00 -3.033568590368e-03 -1.000000000000e-14 7.400000000000e+00 3.116177223673e-03 0.000000000000e+00 -3.116177223663e-03 -1.000000000000e-14 7.600000000000e+00 3.191064874929e-03 0.000000000000e+00 -3.191064874919e-03 -1.000000000000e-14 7.800000000000e+00 3.258540060922e-03 0.000000000000e+00 -3.258540060912e-03 -1.000000000000e-14 8.000000000000e+00 3.319043885772e-03 0.000000000000e+00 -3.319043885762e-03 -1.000000000000e-14 8.200000000000e+00 3.373112308399e-03 0.000000000000e+00 -3.373112308389e-03 -1.000000000000e-14 8.400000000000e+00 3.421334655396e-03 0.000000000000e+00 -3.421334655386e-03 -1.000000000000e-14 8.600000000000e+00 3.464315430101e-03 0.000000000000e+00 -3.464315430091e-03 -1.000000000000e-14 8.800000000000e+00 3.502643929878e-03 0.000000000000e+00 -3.502643929868e-03 -1.000000000000e-14 9.000000000000e+00 3.536873278597e-03 0.000000000000e+00 -3.536873278587e-03 -1.000000000000e-14 9.200000000000e+00 3.567508259425e-03 0.000000000000e+00 -3.567508259415e-03 -1.000000000000e-14 9.400000000000e+00 3.595000158776e-03 0.000000000000e+00 -3.595000158766e-03 -1.000000000000e-14 9.600000000000e+00 3.619746538178e-03 0.000000000000e+00 -3.619746538168e-03 -1.000000000000e-14 9.800000000000e+00 3.642094077993e-03 0.000000000000e+00 -3.642094077983e-03 -1.000000000000e-14 1.000000000000e+01 3.662343069420e-03 0.000000000000e+00 -3.662343069410e-03 -1.000000000000e-14 1.020000000000e+01 3.680752573796e-03 0.000000000000e+00 -3.680752573786e-03 -1.000000000000e-14 1.040000000000e+01 3.697545633126e-03 0.000000000000e+00 -3.697545633116e-03 -1.000000000000e-14 1.060000000000e+01 3.712914182065e-03 0.000000000000e+00 -3.712914182055e-03 -1.000000000000e-14 1.080000000000e+01 3.727023489824e-03 0.000000000000e+00 -3.727023489814e-03 -1.000000000000e-14 1.100000000000e+01 3.740016071550e-03 0.000000000000e+00 -3.740016071540e-03 -1.000000000000e-14 1.120000000000e+01 3.752015072975e-03 0.000000000000e+00 -3.752015072965e-03 -1.000000000000e-14 1.140000000000e+01 3.763127165845e-03 0.000000000000e+00 -3.763127165835e-03 -1.000000000000e-14 1.160000000000e+01 3.773445006600e-03 0.000000000000e+00 -3.773445006590e-03 -1.000000000000e-14 1.180000000000e+01 3.783049314762e-03 0.000000000000e+00 -3.783049314752e-03 -1.000000000000e-14 1.200000000000e+01 3.792010625505e-03 0.000000000000e+00 -3.792010625495e-03 -1.000000000000e-14 1.220000000000e+01 3.800390766054e-03 0.000000000000e+00 -3.800390766044e-03 -1.000000000000e-14 1.240000000000e+01 3.808244099574e-03 0.000000000000e+00 -3.808244099564e-03 -1.000000000000e-14 1.260000000000e+01 3.815618574152e-03 0.000000000000e+00 -3.815618574142e-03 -1.000000000000e-14 1.280000000000e+01 3.822556608734e-03 0.000000000000e+00 -3.822556608724e-03 -1.000000000000e-14 1.300000000000e+01 3.829095842835e-03 0.000000000000e+00 -3.829095842825e-03 -1.000000000000e-14 1.320000000000e+01 3.835269772403e-03 0.000000000000e+00 -3.835269772393e-03 -1.000000000000e-14 1.340000000000e+01 3.841108290453e-03 0.000000000000e+00 -3.841108290443e-03 -1.000000000000e-14 1.360000000000e+01 3.846638147957e-03 0.000000000000e+00 -3.846638147947e-03 -1.000000000000e-14 1.380000000000e+01 3.851883347813e-03 0.000000000000e+00 -3.851883347803e-03 -1.000000000000e-14 1.400000000000e+01 3.856865482562e-03 0.000000000000e+00 -3.856865482552e-03 -1.000000000000e-14 1.420000000000e+01 3.861604024679e-03 0.000000000000e+00 -3.861604024669e-03 -1.000000000000e-14 1.440000000000e+01 3.866116576826e-03 0.000000000000e+00 -3.866116576816e-03 -1.000000000000e-14 1.460000000000e+01 3.870419088164e-03 0.000000000000e+00 -3.870419088154e-03 -1.000000000000e-14 1.480000000000e+01 3.874526041862e-03 0.000000000000e+00 -3.874526041852e-03 -1.000000000000e-14 1.500000000000e+01 3.878450656050e-03 0.000000000000e+00 -3.878450656040e-03 -1.000000000000e-14 1.520000000000e+01 3.882204868890e-03 0.000000000000e+00 -3.882204868880e-03 -1.000000000000e-14 1.540000000000e+01 3.885799706459e-03 0.000000000000e+00 -3.885799706449e-03 -1.000000000000e-14 1.560000000000e+01 3.889245222853e-03 0.000000000000e+00 -3.889245222843e-03 -1.000000000000e-14 1.580000000000e+01 3.892550639432e-03 0.000000000000e+00 -3.892550639422e-03 -1.000000000000e-14 1.600000000000e+01 3.895724428964e-03 0.000000000000e+00 -3.895724428954e-03 -1.000000000000e-14 1.620000000000e+01 3.898774389774e-03 0.000000000000e+00 -3.898774389764e-03 -1.000000000000e-14 1.640000000000e+01 3.901707711333e-03 0.000000000000e+00 -3.901707711323e-03 -1.000000000000e-14 1.660000000000e+01 3.904531032407e-03 0.000000000000e+00 -3.904531032397e-03 -1.000000000000e-14 1.680000000000e+01 3.907250492704e-03 0.000000000000e+00 -3.907250492694e-03 -1.000000000000e-14 1.700000000000e+01 3.909871778863e-03 0.000000000000e+00 -3.909871778853e-03 -1.000000000000e-14 1.720000000000e+01 3.912400165467e-03 0.000000000000e+00 -3.912400165457e-03 -1.000000000000e-14 1.740000000000e+01 3.914840551712e-03 0.000000000000e+00 -3.914840551702e-03 -1.000000000000e-14 1.760000000000e+01 3.917197494241e-03 0.000000000000e+00 -3.917197494231e-03 -1.000000000000e-14 1.780000000000e+01 3.919475236605e-03 0.000000000000e+00 -3.919475236595e-03 -1.000000000000e-14 1.800000000000e+01 3.921677735751e-03 0.000000000000e+00 -3.921677735741e-03 -1.000000000000e-14 1.820000000000e+01 3.923808685865e-03 0.000000000000e+00 -3.923808685855e-03 -1.000000000000e-14 1.840000000000e+01 3.925871539885e-03 0.000000000000e+00 -3.925871539875e-03 -1.000000000000e-14 1.860000000000e+01 3.927869528939e-03 0.000000000000e+00 -3.927869528929e-03 -1.000000000000e-14 1.880000000000e+01 3.929805679935e-03 0.000000000000e+00 -3.929805679925e-03 -1.000000000000e-14 1.900000000000e+01 3.931682831506e-03 0.000000000000e+00 -3.931682831496e-03 -1.000000000000e-14 1.920000000000e+01 3.933503648486e-03 0.000000000000e+00 -3.933503648476e-03 -1.000000000000e-14 1.940000000000e+01 3.935270635070e-03 0.000000000000e+00 -3.935270635060e-03 -1.000000000000e-14 1.960000000000e+01 3.936986146799e-03 0.000000000000e+00 -3.936986146789e-03 -1.000000000000e-14 1.980000000000e+01 3.938652401486e-03 0.000000000000e+00 -3.938652401476e-03 -1.000000000000e-14 2.000000000000e+01 3.940271489190e-03 0.000000000000e+00 -3.940271489180e-03 -1.000000000000e-14 1.000000000000e+00 1.288031279820e-06 0.000000000000e+00 -1.288031277820e-06 -2.000000000000e-15 1.200000000000e+00 5.574730154865e-06 0.000000000000e+00 -5.574730152865e-06 -2.000000000000e-15 1.400000000000e+00 1.476089560102e-05 0.000000000000e+00 -1.476089559902e-05 -2.000000000000e-15 1.600000000000e+00 2.972212758238e-05 0.000000000000e+00 -2.972212758038e-05 -2.000000000000e-15 1.800000000000e+00 5.088668049538e-05 0.000000000000e+00 -5.088668049338e-05 -2.000000000000e-15 2.000000000000e+00 7.843996066233e-05 0.000000000000e+00 -7.843996066033e-05 -2.000000000000e-15 2.200000000000e+00 1.124068637759e-04 0.000000000000e+00 -1.124068637739e-04 -2.000000000000e-15 2.400000000000e+00 1.526934374412e-04 0.000000000000e+00 -1.526934374392e-04 -2.000000000000e-15 2.600000000000e+00 1.991129136698e-04 0.000000000000e+00 -1.991129136678e-04 -2.000000000000e-15 2.800000000000e+00 2.513959734018e-04 0.000000000000e+00 -2.513959733998e-04 -2.000000000000e-15 3.000000000000e+00 3.090088070879e-04 0.000000000000e+00 -3.090088070859e-04 -2.000000000000e-15 3.200000000000e+00 3.698755029886e-04 0.000000000000e+00 -3.698755029866e-04 -2.000000000000e-15 3.400000000000e+00 4.306718781210e-04 0.000000000000e+00 -4.306718781190e-04 -2.000000000000e-15 3.600000000000e+00 4.892534249433e-04 0.000000000000e+00 -4.892534249413e-04 -2.000000000000e-15 3.800000000000e+00 5.444761488215e-04 0.000000000000e+00 -5.444761488195e-04 -2.000000000000e-15 4.000000000000e+00 5.957846651797e-04 0.000000000000e+00 -5.957846651777e-04 -2.000000000000e-15 4.200000000000e+00 6.430120914941e-04 0.000000000000e+00 -6.430120914921e-04 -2.000000000000e-15 4.400000000000e+00 6.862397928884e-04 0.000000000000e+00 -6.862397928864e-04 -2.000000000000e-15 4.600000000000e+00 7.256931399001e-04 0.000000000000e+00 -7.256931398981e-04 -2.000000000000e-15 4.800000000000e+00 7.616690629498e-04 0.000000000000e+00 -7.616690629478e-04 -2.000000000000e-15 5.000000000000e+00 7.944893152274e-04 0.000000000000e+00 -7.944893152254e-04 -2.000000000000e-15 5.200000000000e+00 8.244724898440e-04 0.000000000000e+00 -8.244724898420e-04 -2.000000000000e-15 5.400000000000e+00 8.519187216544e-04 0.000000000000e+00 -8.519187216524e-04 -2.000000000000e-15 5.600000000000e+00 8.771024614834e-04 0.000000000000e+00 -8.771024614814e-04 -2.000000000000e-15 5.800000000000e+00 9.002701058081e-04 0.000000000000e+00 -9.002701058061e-04 -2.000000000000e-15 6.000000000000e+00 9.216403708017e-04 0.000000000000e+00 -9.216403707997e-04 -2.000000000000e-15 6.200000000000e+00 9.414060900031e-04 0.000000000000e+00 -9.414060900011e-04 -2.000000000000e-15 6.400000000000e+00 9.597366435101e-04 0.000000000000e+00 -9.597366435081e-04 -2.000000000000e-15 6.600000000000e+00 9.767805641587e-04 0.000000000000e+00 -9.767805641567e-04 -2.000000000000e-15 6.800000000000e+00 9.926680742298e-04 0.000000000000e+00 -9.926680742278e-04 -2.000000000000e-15 7.000000000000e+00 1.007513430595e-03 0.000000000000e+00 -1.007513430593e-03 -2.000000000000e-15 7.200000000000e+00 1.021417028251e-03 0.000000000000e+00 -1.021417028249e-03 -2.000000000000e-15 7.400000000000e+00 1.034467252291e-03 0.000000000000e+00 -1.034467252289e-03 -2.000000000000e-15 7.600000000000e+00 1.046742089397e-03 0.000000000000e+00 -1.046742089395e-03 -2.000000000000e-15 7.800000000000e+00 1.058310519878e-03 0.000000000000e+00 -1.058310519876e-03 -2.000000000000e-15 8.000000000000e+00 1.069233714903e-03 0.000000000000e+00 -1.069233714901e-03 -2.000000000000e-15 8.200000000000e+00 1.079566063775e-03 0.000000000000e+00 -1.079566063773e-03 -2.000000000000e-15 8.400000000000e+00 1.089356054561e-03 0.000000000000e+00 -1.089356054559e-03 -2.000000000000e-15 8.600000000000e+00 1.098647029059e-03 0.000000000000e+00 -1.098647029057e-03 -2.000000000000e-15 8.800000000000e+00 1.107477830581e-03 0.000000000000e+00 -1.107477830579e-03 -2.000000000000e-15 9.000000000000e+00 1.115883360485e-03 0.000000000000e+00 -1.115883360483e-03 -2.000000000000e-15 9.200000000000e+00 1.123895057130e-03 0.000000000000e+00 -1.123895057128e-03 -2.000000000000e-15 9.400000000000e+00 1.131541308899e-03 0.000000000000e+00 -1.131541308897e-03 -2.000000000000e-15 9.600000000000e+00 1.138847811108e-03 0.000000000000e+00 -1.138847811106e-03 -2.000000000000e-15 9.800000000000e+00 1.145837875154e-03 0.000000000000e+00 -1.145837875152e-03 -2.000000000000e-15 1.000000000000e+01 1.152532696913e-03 0.000000000000e+00 -1.152532696911e-03 -2.000000000000e-15 1.020000000000e+01 1.158951590325e-03 0.000000000000e+00 -1.158951590323e-03 -2.000000000000e-15 1.040000000000e+01 1.165112191184e-03 0.000000000000e+00 -1.165112191182e-03 -2.000000000000e-15 1.060000000000e+01 1.171030635353e-03 0.000000000000e+00 -1.171030635351e-03 -2.000000000000e-15 1.080000000000e+01 1.176721715005e-03 0.000000000000e+00 -1.176721715003e-03 -2.000000000000e-15 1.100000000000e+01 1.182199026517e-03 0.000000000000e+00 -1.182199026515e-03 -2.000000000000e-15 1.120000000000e+01 1.187475047636e-03 0.000000000000e+00 -1.187475047634e-03 -2.000000000000e-15 1.140000000000e+01 1.192561312095e-03 0.000000000000e+00 -1.192561312093e-03 -2.000000000000e-15 1.160000000000e+01 1.197468457233e-03 0.000000000000e+00 -1.197468457231e-03 -2.000000000000e-15 1.180000000000e+01 1.202206319938e-03 0.000000000000e+00 -1.202206319936e-03 -2.000000000000e-15 1.200000000000e+01 1.206784011111e-03 0.000000000000e+00 -1.206784011109e-03 -2.000000000000e-15 1.220000000000e+01 1.211209981976e-03 0.000000000000e+00 -1.211209981974e-03 -2.000000000000e-15 1.240000000000e+01 1.215492083272e-03 0.000000000000e+00 -1.215492083270e-03 -2.000000000000e-15 1.260000000000e+01 1.219637618169e-03 0.000000000000e+00 -1.219637618167e-03 -2.000000000000e-15 1.280000000000e+01 1.223653389691e-03 0.000000000000e+00 -1.223653389689e-03 -2.000000000000e-15 1.300000000000e+01 1.227545743288e-03 0.000000000000e+00 -1.227545743286e-03 -2.000000000000e-15 1.320000000000e+01 1.231320605115e-03 0.000000000000e+00 -1.231320605113e-03 -2.000000000000e-15 1.340000000000e+01 1.234983516534e-03 0.000000000000e+00 -1.234983516532e-03 -2.000000000000e-15 1.360000000000e+01 1.238539665235e-03 0.000000000000e+00 -1.238539665233e-03 -2.000000000000e-15 1.380000000000e+01 1.241993913391e-03 0.000000000000e+00 -1.241993913389e-03 -2.000000000000e-15 1.400000000000e+01 1.245350823144e-03 0.000000000000e+00 -1.245350823142e-03 -2.000000000000e-15 1.420000000000e+01 1.248614679720e-03 0.000000000000e+00 -1.248614679718e-03 -2.000000000000e-15 1.440000000000e+01 1.251789512433e-03 0.000000000000e+00 -1.251789512431e-03 -2.000000000000e-15 1.460000000000e+01 1.254879113794e-03 0.000000000000e+00 -1.254879113792e-03 -2.000000000000e-15 1.480000000000e+01 1.257887056918e-03 0.000000000000e+00 -1.257887056916e-03 -2.000000000000e-15 1.500000000000e+01 1.260816711413e-03 0.000000000000e+00 -1.260816711411e-03 -2.000000000000e-15 1.520000000000e+01 1.263671257896e-03 0.000000000000e+00 -1.263671257894e-03 -2.000000000000e-15 1.540000000000e+01 1.266453701272e-03 0.000000000000e+00 -1.266453701270e-03 -2.000000000000e-15 1.560000000000e+01 1.269166882905e-03 0.000000000000e+00 -1.269166882903e-03 -2.000000000000e-15 1.580000000000e+01 1.271813491782e-03 0.000000000000e+00 -1.271813491780e-03 -2.000000000000e-15 1.600000000000e+01 1.274396074763e-03 0.000000000000e+00 -1.274396074761e-03 -2.000000000000e-15 1.620000000000e+01 1.276917046014e-03 0.000000000000e+00 -1.276917046012e-03 -2.000000000000e-15 1.640000000000e+01 1.279378695689e-03 0.000000000000e+00 -1.279378695687e-03 -2.000000000000e-15 1.660000000000e+01 1.281783197930e-03 0.000000000000e+00 -1.281783197928e-03 -2.000000000000e-15 1.680000000000e+01 1.284132618255e-03 0.000000000000e+00 -1.284132618253e-03 -2.000000000000e-15 1.700000000000e+01 1.286428920380e-03 0.000000000000e+00 -1.286428920378e-03 -2.000000000000e-15 1.720000000000e+01 1.288673972531e-03 0.000000000000e+00 -1.288673972529e-03 -2.000000000000e-15 1.740000000000e+01 1.290869553281e-03 0.000000000000e+00 -1.290869553279e-03 -2.000000000000e-15 1.760000000000e+01 1.293017356970e-03 0.000000000000e+00 -1.293017356968e-03 -2.000000000000e-15 1.780000000000e+01 1.295118998723e-03 0.000000000000e+00 -1.295118998721e-03 -2.000000000000e-15 1.800000000000e+01 1.297176019115e-03 0.000000000000e+00 -1.297176019113e-03 -2.000000000000e-15 1.820000000000e+01 1.299189888504e-03 0.000000000000e+00 -1.299189888502e-03 -2.000000000000e-15 1.840000000000e+01 1.301162011064e-03 0.000000000000e+00 -1.301162011062e-03 -2.000000000000e-15 1.860000000000e+01 1.303093728540e-03 0.000000000000e+00 -1.303093728538e-03 -2.000000000000e-15 1.880000000000e+01 1.304986323745e-03 0.000000000000e+00 -1.304986323743e-03 -2.000000000000e-15 1.900000000000e+01 1.306841023825e-03 0.000000000000e+00 -1.306841023823e-03 -2.000000000000e-15 1.920000000000e+01 1.308659003305e-03 0.000000000000e+00 -1.308659003303e-03 -2.000000000000e-15 1.940000000000e+01 1.310441386936e-03 0.000000000000e+00 -1.310441386934e-03 -2.000000000000e-15 1.960000000000e+01 1.312189252354e-03 0.000000000000e+00 -1.312189252352e-03 -2.000000000000e-15 1.980000000000e+01 1.313903632574e-03 0.000000000000e+00 -1.313903632572e-03 -2.000000000000e-15 2.000000000000e+01 1.315585518320e-03 0.000000000000e+00 -1.315585518318e-03 -2.000000000000e-15 1.000000000000e+00 1.346856663521e-06 0.000000000000e+00 -1.346856658521e-06 -5.000000000000e-15 1.200000000000e+00 5.757996250361e-06 0.000000000000e+00 -5.757996245361e-06 -5.000000000000e-15 1.400000000000e+00 1.513775436862e-05 0.000000000000e+00 -1.513775436362e-05 -5.000000000000e-15 1.600000000000e+00 3.035450426573e-05 0.000000000000e+00 -3.035450426073e-05 -5.000000000000e-15 1.800000000000e+00 5.183212200730e-05 0.000000000000e+00 -5.183212200230e-05 -5.000000000000e-15 2.000000000000e+00 7.975391936707e-05 0.000000000000e+00 -7.975391936208e-05 -5.000000000000e-15 2.200000000000e+00 1.141458037704e-04 0.000000000000e+00 -1.141458037654e-04 -5.000000000000e-15 2.400000000000e+00 1.549192455102e-04 0.000000000000e+00 -1.549192455052e-04 -5.000000000000e-15 2.600000000000e+00 2.018987725302e-04 0.000000000000e+00 -2.018987725252e-04 -5.000000000000e-15 2.800000000000e+00 2.548422519879e-04 0.000000000000e+00 -2.548422519829e-04 -5.000000000000e-15 3.000000000000e+00 3.134570967546e-04 0.000000000000e+00 -3.134570967496e-04 -5.000000000000e-15 3.200000000000e+00 3.774137137127e-04 0.000000000000e+00 -3.774137137077e-04 -5.000000000000e-15 3.400000000000e+00 4.463568010888e-04 0.000000000000e+00 -4.463568010838e-04 -5.000000000000e-15 3.600000000000e+00 5.199148214275e-04 0.000000000000e+00 -5.199148214225e-04 -5.000000000000e-15 3.800000000000e+00 5.977078657712e-04 0.000000000000e+00 -5.977078657662e-04 -5.000000000000e-15 4.000000000000e+00 6.793539423169e-04 0.000000000000e+00 -6.793539423119e-04 -5.000000000000e-15 4.200000000000e+00 7.644716329794e-04 0.000000000000e+00 -7.644716329744e-04 -5.000000000000e-15 4.400000000000e+00 8.526450809234e-04 0.000000000000e+00 -8.526450809184e-04 -5.000000000000e-15 4.600000000000e+00 9.430408804526e-04 0.000000000000e+00 -9.430408804476e-04 -5.000000000000e-15 4.800000000000e+00 1.033840779792e-03 0.000000000000e+00 -1.033840779787e-03 -5.000000000000e-15 5.000000000000e+00 1.123278312914e-03 0.000000000000e+00 -1.123278312909e-03 -5.000000000000e-15 5.200000000000e+00 1.210115754106e-03 0.000000000000e+00 -1.210115754101e-03 -5.000000000000e-15 5.400000000000e+00 1.293449798071e-03 0.000000000000e+00 -1.293449798066e-03 -5.000000000000e-15 5.600000000000e+00 1.372635623798e-03 0.000000000000e+00 -1.372635623793e-03 -5.000000000000e-15 5.800000000000e+00 1.447261170293e-03 0.000000000000e+00 -1.447261170288e-03 -5.000000000000e-15 6.000000000000e+00 1.517120942434e-03 0.000000000000e+00 -1.517120942429e-03 -5.000000000000e-15 6.200000000000e+00 1.582180846787e-03 0.000000000000e+00 -1.582180846782e-03 -5.000000000000e-15 6.400000000000e+00 1.642538592021e-03 0.000000000000e+00 -1.642538592016e-03 -5.000000000000e-15 6.600000000000e+00 1.698385587707e-03 0.000000000000e+00 -1.698385587702e-03 -5.000000000000e-15 6.800000000000e+00 1.749973995402e-03 0.000000000000e+00 -1.749973995397e-03 -5.000000000000e-15 7.000000000000e+00 1.797590281883e-03 0.000000000000e+00 -1.797590281878e-03 -5.000000000000e-15 7.200000000000e+00 1.841535206080e-03 0.000000000000e+00 -1.841535206075e-03 -5.000000000000e-15 7.400000000000e+00 1.882109478673e-03 0.000000000000e+00 -1.882109478668e-03 -5.000000000000e-15 7.600000000000e+00 1.919604075410e-03 0.000000000000e+00 -1.919604075405e-03 -5.000000000000e-15 7.800000000000e+00 1.954294166423e-03 0.000000000000e+00 -1.954294166418e-03 -5.000000000000e-15 8.000000000000e+00 1.986435728154e-03 0.000000000000e+00 -1.986435728149e-03 -5.000000000000e-15 8.200000000000e+00 2.016264060955e-03 0.000000000000e+00 -2.016264060950e-03 -5.000000000000e-15 8.400000000000e+00 2.043993601067e-03 0.000000000000e+00 -2.043993601062e-03 -5.000000000000e-15 8.600000000000e+00 2.069818566945e-03 0.000000000000e+00 -2.069818566940e-03 -5.000000000000e-15 8.800000000000e+00 2.093914106528e-03 0.000000000000e+00 -2.093914106523e-03 -5.000000000000e-15 9.000000000000e+00 2.116437712014e-03 0.000000000000e+00 -2.116437712009e-03 -5.000000000000e-15 9.200000000000e+00 2.137530744298e-03 0.000000000000e+00 -2.137530744293e-03 -5.000000000000e-15 9.400000000000e+00 2.157319964361e-03 0.000000000000e+00 -2.157319964356e-03 -5.000000000000e-15 9.600000000000e+00 2.175919008122e-03 0.000000000000e+00 -2.175919008117e-03 -5.000000000000e-15 9.800000000000e+00 2.193429768258e-03 0.000000000000e+00 -2.193429768253e-03 -5.000000000000e-15 1.000000000000e+01 2.209943664739e-03 0.000000000000e+00 -2.209943664734e-03 -5.000000000000e-15 1.020000000000e+01 2.225542797685e-03 0.000000000000e+00 -2.225542797680e-03 -5.000000000000e-15 1.040000000000e+01 2.240300983623e-03 0.000000000000e+00 -2.240300983618e-03 -5.000000000000e-15 1.060000000000e+01 2.254284680689e-03 0.000000000000e+00 -2.254284680684e-03 -5.000000000000e-15 1.080000000000e+01 2.267553810713e-03 0.000000000000e+00 -2.267553810708e-03 -5.000000000000e-15 1.100000000000e+01 2.280162487276e-03 0.000000000000e+00 -2.280162487271e-03 -5.000000000000e-15 1.120000000000e+01 2.292159659055e-03 0.000000000000e+00 -2.292159659050e-03 -5.000000000000e-15 1.140000000000e+01 2.303589677544e-03 0.000000000000e+00 -2.303589677539e-03 -5.000000000000e-15 1.160000000000e+01 2.314492797676e-03 0.000000000000e+00 -2.314492797671e-03 -5.000000000000e-15 1.180000000000e+01 2.324905619218e-03 0.000000000000e+00 -2.324905619213e-03 -5.000000000000e-15 1.200000000000e+01 2.334861476005e-03 0.000000000000e+00 -2.334861476000e-03 -5.000000000000e-15 1.220000000000e+01 2.344390779381e-03 0.000000000000e+00 -2.344390779376e-03 -5.000000000000e-15 1.240000000000e+01 2.353521321466e-03 0.000000000000e+00 -2.353521321461e-03 -5.000000000000e-15 1.260000000000e+01 2.362278543218e-03 0.000000000000e+00 -2.362278543213e-03 -5.000000000000e-15 1.280000000000e+01 2.370685771646e-03 0.000000000000e+00 -2.370685771641e-03 -5.000000000000e-15 1.300000000000e+01 2.378764429981e-03 0.000000000000e+00 -2.378764429976e-03 -5.000000000000e-15 1.320000000000e+01 2.386534224159e-03 0.000000000000e+00 -2.386534224154e-03 -5.000000000000e-15 1.340000000000e+01 2.394013308505e-03 0.000000000000e+00 -2.394013308500e-03 -5.000000000000e-15 1.360000000000e+01 2.401218433160e-03 0.000000000000e+00 -2.401218433155e-03 -5.000000000000e-15 1.380000000000e+01 2.408165099543e-03 0.000000000000e+00 -2.408165099538e-03 -5.000000000000e-15 1.400000000000e+01 2.414867578509e-03 0.000000000000e+00 -2.414867578504e-03 -5.000000000000e-15 1.420000000000e+01 2.421339168360e-03 0.000000000000e+00 -2.421339168355e-03 -5.000000000000e-15 1.440000000000e+01 2.427592183274e-03 0.000000000000e+00 -2.427592183269e-03 -5.000000000000e-15 1.460000000000e+01 2.433638064687e-03 0.000000000000e+00 -2.433638064682e-03 -5.000000000000e-15 1.480000000000e+01 2.439487456898e-03 0.000000000000e+00 -2.439487456893e-03 -5.000000000000e-15 1.500000000000e+01 2.445150275030e-03 0.000000000000e+00 -2.445150275025e-03 -5.000000000000e-15 1.520000000000e+01 2.450635766261e-03 0.000000000000e+00 -2.450635766256e-03 -5.000000000000e-15 1.540000000000e+01 2.455952565060e-03 0.000000000000e+00 -2.455952565055e-03 -5.000000000000e-15 1.560000000000e+01 2.461108743099e-03 0.000000000000e+00 -2.461108743094e-03 -5.000000000000e-15 1.580000000000e+01 2.466111854401e-03 0.000000000000e+00 -2.466111854396e-03 -5.000000000000e-15 1.600000000000e+01 2.470968976263e-03 0.000000000000e+00 -2.470968976258e-03 -5.000000000000e-15 1.620000000000e+01 2.475686746376e-03 0.000000000000e+00 -2.475686746371e-03 -5.000000000000e-15 1.640000000000e+01 2.480271396564e-03 0.000000000000e+00 -2.480271396559e-03 -5.000000000000e-15 1.660000000000e+01 2.484728783472e-03 0.000000000000e+00 -2.484728783467e-03 -5.000000000000e-15 1.680000000000e+01 2.489064416532e-03 0.000000000000e+00 -2.489064416527e-03 -5.000000000000e-15 1.700000000000e+01 2.493283483474e-03 0.000000000000e+00 -2.493283483469e-03 -5.000000000000e-15 1.720000000000e+01 2.497390873625e-03 0.000000000000e+00 -2.497390873620e-03 -5.000000000000e-15 1.740000000000e+01 2.501391199219e-03 0.000000000000e+00 -2.501391199214e-03 -5.000000000000e-15 1.760000000000e+01 2.505288814915e-03 0.000000000000e+00 -2.505288814910e-03 -5.000000000000e-15 1.780000000000e+01 2.509087835683e-03 0.000000000000e+00 -2.509087835678e-03 -5.000000000000e-15 1.800000000000e+01 2.512792153229e-03 0.000000000000e+00 -2.512792153224e-03 -5.000000000000e-15 1.820000000000e+01 2.516405451079e-03 0.000000000000e+00 -2.516405451074e-03 -5.000000000000e-15 1.840000000000e+01 2.519931218465e-03 0.000000000000e+00 -2.519931218460e-03 -5.000000000000e-15 1.860000000000e+01 2.523372763107e-03 0.000000000000e+00 -2.523372763102e-03 -5.000000000000e-15 1.880000000000e+01 2.526733222998e-03 0.000000000000e+00 -2.526733222993e-03 -5.000000000000e-15 1.900000000000e+01 2.530015577289e-03 0.000000000000e+00 -2.530015577284e-03 -5.000000000000e-15 1.920000000000e+01 2.533222656329e-03 0.000000000000e+00 -2.533222656324e-03 -5.000000000000e-15 1.940000000000e+01 2.536357150967e-03 0.000000000000e+00 -2.536357150962e-03 -5.000000000000e-15 1.960000000000e+01 2.539421621154e-03 0.000000000000e+00 -2.539421621149e-03 -5.000000000000e-15 1.980000000000e+01 2.542418503913e-03 0.000000000000e+00 -2.542418503908e-03 -5.000000000000e-15 2.000000000000e+01 2.545350120737e-03 0.000000000000e+00 -2.545350120732e-03 -5.000000000000e-15 1.000000000000e+00 1.441746422287e-06 0.000000000000e+00 -1.441746412286e-06 -1.000000000000e-14 1.200000000000e+00 6.040380878710e-06 0.000000000000e+00 -6.040380868710e-06 -1.000000000000e-14 1.400000000000e+00 1.569629822896e-05 0.000000000000e+00 -1.569629821896e-05 -1.000000000000e-14 1.600000000000e+00 3.126089046787e-05 0.000000000000e+00 -3.126089045787e-05 -1.000000000000e-14 1.800000000000e+00 5.314640971987e-05 0.000000000000e+00 -5.314640970987e-05 -1.000000000000e-14 2.000000000000e+00 8.152645734489e-05 0.000000000000e+00 -8.152645733489e-05 -1.000000000000e-14 2.200000000000e+00 1.164181997507e-04 0.000000000000e+00 -1.164181997407e-04 -1.000000000000e-14 2.400000000000e+00 1.577252779398e-04 0.000000000000e+00 -1.577252779298e-04 -1.000000000000e-14 2.600000000000e+00 2.052655439040e-04 0.000000000000e+00 -2.052655438940e-04 -1.000000000000e-14 2.800000000000e+00 2.587917241494e-04 0.000000000000e+00 -2.587917241394e-04 -1.000000000000e-14 3.000000000000e+00 3.180080610667e-04 0.000000000000e+00 -3.180080610567e-04 -1.000000000000e-14 3.200000000000e+00 3.825842119439e-04 0.000000000000e+00 -3.825842119339e-04 -1.000000000000e-14 3.400000000000e+00 4.521669751504e-04 0.000000000000e+00 -4.521669751404e-04 -1.000000000000e-14 3.600000000000e+00 5.263901269348e-04 0.000000000000e+00 -5.263901269248e-04 -1.000000000000e-14 3.800000000000e+00 6.048825469737e-04 0.000000000000e+00 -6.048825469637e-04 -1.000000000000e-14 4.000000000000e+00 6.872747356196e-04 0.000000000000e+00 -6.872747356096e-04 -1.000000000000e-14 4.200000000000e+00 7.732039437867e-04 0.000000000000e+00 -7.732039437767e-04 -1.000000000000e-14 4.400000000000e+00 8.623179455761e-04 0.000000000000e+00 -8.623179455661e-04 -1.000000000000e-14 4.600000000000e+00 9.542776879296e-04 0.000000000000e+00 -9.542776879196e-04 -1.000000000000e-14 4.800000000000e+00 1.048758939873e-03 0.000000000000e+00 -1.048758939863e-03 -1.000000000000e-14 5.000000000000e+00 1.145453100745e-03 0.000000000000e+00 -1.145453100735e-03 -1.000000000000e-14 5.200000000000e+00 1.244067311209e-03 0.000000000000e+00 -1.244067311199e-03 -1.000000000000e-14 5.400000000000e+00 1.344323963138e-03 0.000000000000e+00 -1.344323963128e-03 -1.000000000000e-14 5.600000000000e+00 1.445959344321e-03 0.000000000000e+00 -1.445959344311e-03 -1.000000000000e-14 5.800000000000e+00 1.548717325861e-03 0.000000000000e+00 -1.548717325851e-03 -1.000000000000e-14 6.000000000000e+00 1.652292385178e-03 0.000000000000e+00 -1.652292385168e-03 -1.000000000000e-14 6.200000000000e+00 1.756054573449e-03 0.000000000000e+00 -1.756054573439e-03 -1.000000000000e-14 6.400000000000e+00 1.859016760559e-03 0.000000000000e+00 -1.859016760549e-03 -1.000000000000e-14 6.600000000000e+00 1.960318522004e-03 0.000000000000e+00 -1.960318521994e-03 -1.000000000000e-14 6.800000000000e+00 2.059269418621e-03 0.000000000000e+00 -2.059269418611e-03 -1.000000000000e-14 7.000000000000e+00 2.155274723433e-03 0.000000000000e+00 -2.155274723423e-03 -1.000000000000e-14 7.200000000000e+00 2.247818288212e-03 0.000000000000e+00 -2.247818288202e-03 -1.000000000000e-14 7.400000000000e+00 2.336468754014e-03 0.000000000000e+00 -2.336468754004e-03 -1.000000000000e-14 7.600000000000e+00 2.420890505611e-03 0.000000000000e+00 -2.420890505601e-03 -1.000000000000e-14 7.800000000000e+00 2.500851144930e-03 0.000000000000e+00 -2.500851144920e-03 -1.000000000000e-14 8.000000000000e+00 2.576222006095e-03 0.000000000000e+00 -2.576222006085e-03 -1.000000000000e-14 8.200000000000e+00 2.646971441079e-03 0.000000000000e+00 -2.646971441069e-03 -1.000000000000e-14 8.400000000000e+00 2.713152615219e-03 0.000000000000e+00 -2.713152615209e-03 -1.000000000000e-14 8.600000000000e+00 2.774888248027e-03 0.000000000000e+00 -2.774888248017e-03 -1.000000000000e-14 8.800000000000e+00 2.832354492703e-03 0.000000000000e+00 -2.832354492693e-03 -1.000000000000e-14 9.000000000000e+00 2.885765531967e-03 0.000000000000e+00 -2.885765531957e-03 -1.000000000000e-14 9.200000000000e+00 2.935359852479e-03 0.000000000000e+00 -2.935359852469e-03 -1.000000000000e-14 9.400000000000e+00 2.981388677247e-03 0.000000000000e+00 -2.981388677237e-03 -1.000000000000e-14 9.600000000000e+00 3.024106691695e-03 0.000000000000e+00 -3.024106691685e-03 -1.000000000000e-14 9.800000000000e+00 3.063764969238e-03 0.000000000000e+00 -3.063764969228e-03 -1.000000000000e-14 1.000000000000e+01 3.100605862441e-03 0.000000000000e+00 -3.100605862431e-03 -1.000000000000e-14 1.020000000000e+01 3.134859556382e-03 0.000000000000e+00 -3.134859556372e-03 -1.000000000000e-14 1.040000000000e+01 3.166741963062e-03 0.000000000000e+00 -3.166741963052e-03 -1.000000000000e-14 1.060000000000e+01 3.196453652401e-03 0.000000000000e+00 -3.196453652391e-03 -1.000000000000e-14 1.080000000000e+01 3.224179551674e-03 0.000000000000e+00 -3.224179551664e-03 -1.000000000000e-14 1.100000000000e+01 3.250089189746e-03 0.000000000000e+00 -3.250089189736e-03 -1.000000000000e-14 1.120000000000e+01 3.274337307644e-03 0.000000000000e+00 -3.274337307634e-03 -1.000000000000e-14 1.140000000000e+01 3.297064698226e-03 0.000000000000e+00 -3.297064698216e-03 -1.000000000000e-14 1.160000000000e+01 3.318399172975e-03 0.000000000000e+00 -3.318399172965e-03 -1.000000000000e-14 1.180000000000e+01 3.338456582618e-03 0.000000000000e+00 -3.338456582608e-03 -1.000000000000e-14 1.200000000000e+01 3.357341840759e-03 0.000000000000e+00 -3.357341840749e-03 -1.000000000000e-14 1.220000000000e+01 3.375149916828e-03 0.000000000000e+00 -3.375149916818e-03 -1.000000000000e-14 1.240000000000e+01 3.391966777258e-03 0.000000000000e+00 -3.391966777248e-03 -1.000000000000e-14 1.260000000000e+01 3.407870262918e-03 0.000000000000e+00 -3.407870262908e-03 -1.000000000000e-14 1.280000000000e+01 3.422930897221e-03 0.000000000000e+00 -3.422930897211e-03 -1.000000000000e-14 1.300000000000e+01 3.437212623654e-03 0.000000000000e+00 -3.437212623644e-03 -1.000000000000e-14 1.320000000000e+01 3.450773474354e-03 0.000000000000e+00 -3.450773474344e-03 -1.000000000000e-14 1.340000000000e+01 3.463666173092e-03 0.000000000000e+00 -3.463666173082e-03 -1.000000000000e-14 1.360000000000e+01 3.475938677070e-03 0.000000000000e+00 -3.475938677060e-03 -1.000000000000e-14 1.380000000000e+01 3.487634662391e-03 0.000000000000e+00 -3.487634662381e-03 -1.000000000000e-14 1.400000000000e+01 3.498793958231e-03 0.000000000000e+00 -3.498793958221e-03 -1.000000000000e-14 1.420000000000e+01 3.509452934618e-03 0.000000000000e+00 -3.509452934608e-03 -1.000000000000e-14 1.440000000000e+01 3.519644848513e-03 0.000000000000e+00 -3.519644848503e-03 -1.000000000000e-14 1.460000000000e+01 3.529400152555e-03 0.000000000000e+00 -3.529400152545e-03 -1.000000000000e-14 1.480000000000e+01 3.538746770499e-03 0.000000000000e+00 -3.538746770489e-03 -1.000000000000e-14 1.500000000000e+01 3.547710342982e-03 0.000000000000e+00 -3.547710342972e-03 -1.000000000000e-14 1.520000000000e+01 3.556314446935e-03 0.000000000000e+00 -3.556314446925e-03 -1.000000000000e-14 1.540000000000e+01 3.564580791570e-03 0.000000000000e+00 -3.564580791560e-03 -1.000000000000e-14 1.560000000000e+01 3.572529393595e-03 0.000000000000e+00 -3.572529393585e-03 -1.000000000000e-14 1.580000000000e+01 3.580178733997e-03 0.000000000000e+00 -3.580178733987e-03 -1.000000000000e-14 1.600000000000e+01 3.587545898456e-03 0.000000000000e+00 -3.587545898446e-03 -1.000000000000e-14 1.620000000000e+01 3.594646703257e-03 0.000000000000e+00 -3.594646703247e-03 -1.000000000000e-14 1.640000000000e+01 3.601495841051e-03 0.000000000000e+00 -3.601495841041e-03 -1.000000000000e-14 1.660000000000e+01 3.608106847830e-03 0.000000000000e+00 -3.608106847820e-03 -1.000000000000e-14 1.680000000000e+01 3.614492402026e-03 0.000000000000e+00 -3.614492402016e-03 -1.000000000000e-14 1.700000000000e+01 3.620664264167e-03 0.000000000000e+00 -3.620664264157e-03 -1.000000000000e-14 1.720000000000e+01 3.626633387891e-03 0.000000000000e+00 -3.626633387881e-03 -1.000000000000e-14 1.740000000000e+01 3.632409987059e-03 0.000000000000e+00 -3.632409987049e-03 -1.000000000000e-14 1.760000000000e+01 3.638003596384e-03 0.000000000000e+00 -3.638003596374e-03 -1.000000000000e-14 1.780000000000e+01 3.643423126324e-03 0.000000000000e+00 -3.643423126314e-03 -1.000000000000e-14 1.800000000000e+01 3.648676912856e-03 0.000000000000e+00 -3.648676912846e-03 -1.000000000000e-14 1.820000000000e+01 3.653772762635e-03 0.000000000000e+00 -3.653772762625e-03 -1.000000000000e-14 1.840000000000e+01 3.658717994052e-03 0.000000000000e+00 -3.658717994042e-03 -1.000000000000e-14 1.860000000000e+01 3.663519474574e-03 0.000000000000e+00 -3.663519474564e-03 -1.000000000000e-14 1.880000000000e+01 3.668183654773e-03 0.000000000000e+00 -3.668183654763e-03 -1.000000000000e-14 1.900000000000e+01 3.672716599352e-03 0.000000000000e+00 -3.672716599342e-03 -1.000000000000e-14 1.920000000000e+01 3.677124015486e-03 0.000000000000e+00 -3.677124015476e-03 -1.000000000000e-14 1.940000000000e+01 3.681411278719e-03 0.000000000000e+00 -3.681411278709e-03 -1.000000000000e-14 1.960000000000e+01 3.685583456681e-03 0.000000000000e+00 -3.685583456671e-03 -1.000000000000e-14 1.980000000000e+01 3.689645330805e-03 0.000000000000e+00 -3.689645330795e-03 -1.000000000000e-14 2.000000000000e+01 3.693601416259e-03 0.000000000000e+00 -3.693601416249e-03 -1.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_ld2.standard0000644000265600020320000010243012264261473023220 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 6.663474801453e-06 0.000000000000e+00 -6.663474800441e-06 -1.012500000000e-15 1.500000000000e+00 6.670628348187e-06 0.000000000000e+00 -6.670628346675e-06 -1.512500000000e-15 2.000000000000e+00 6.676599419384e-06 0.000000000000e+00 -6.676599417372e-06 -2.012500000000e-15 2.500000000000e+00 6.681972244096e-06 0.000000000000e+00 -6.681972241584e-06 -2.512500000000e-15 3.000000000000e+00 6.686965230641e-06 0.000000000000e+00 -6.686965227628e-06 -3.012500000000e-15 3.500000000000e+00 6.691687768781e-06 0.000000000000e+00 -6.691687765269e-06 -3.512500000000e-15 4.000000000000e+00 6.696204417937e-06 0.000000000000e+00 -6.696204413924e-06 -4.012500000000e-15 4.500000000000e+00 6.700557296002e-06 0.000000000000e+00 -6.700557291489e-06 -4.512500000000e-15 5.000000000000e+00 6.704775782569e-06 0.000000000000e+00 -6.704775777557e-06 -5.012500000000e-15 5.500000000000e+00 6.708881378218e-06 0.000000000000e+00 -6.708881372705e-06 -5.512500000000e-15 6.000000000000e+00 6.712890397104e-06 0.000000000000e+00 -6.712890391092e-06 -6.012500000000e-15 6.500000000000e+00 6.716815574125e-06 0.000000000000e+00 -6.716815567612e-06 -6.512500000000e-15 7.000000000000e+00 6.720667080386e-06 0.000000000000e+00 -6.720667073373e-06 -7.012500000000e-15 7.500000000000e+00 6.724453194384e-06 0.000000000000e+00 -6.724453186871e-06 -7.512500000000e-15 8.000000000000e+00 6.728180762164e-06 0.000000000000e+00 -6.728180754151e-06 -8.012500000000e-15 8.500000000000e+00 6.731855522545e-06 0.000000000000e+00 -6.731855514033e-06 -8.512500000000e-15 9.000000000000e+00 6.735482342953e-06 0.000000000000e+00 -6.735482333941e-06 -9.012500000000e-15 9.500000000000e+00 6.739065394249e-06 0.000000000000e+00 -6.739065384737e-06 -9.512500000000e-15 1.000000000000e+01 6.742608282825e-06 0.000000000000e+00 -6.742608272813e-06 -1.001250000000e-14 1.050000000000e+01 6.746114152108e-06 0.000000000000e+00 -6.746114141596e-06 -1.051250000000e-14 1.100000000000e+01 6.749585761716e-06 0.000000000000e+00 -6.749585750704e-06 -1.101250000000e-14 1.150000000000e+01 6.753025550004e-06 0.000000000000e+00 -6.753025538493e-06 -1.151250000000e-14 1.200000000000e+01 6.756435684088e-06 0.000000000000e+00 -6.756435672076e-06 -1.201250000000e-14 1.250000000000e+01 6.759818100264e-06 0.000000000000e+00 -6.759818087752e-06 -1.251250000000e-14 1.300000000000e+01 6.763174537004e-06 0.000000000000e+00 -6.763174523992e-06 -1.301250000000e-14 1.350000000000e+01 6.766506562122e-06 0.000000000000e+00 -6.766506548609e-06 -1.351250000000e-14 1.400000000000e+01 6.769815595318e-06 0.000000000000e+00 -6.769815581306e-06 -1.401250000000e-14 1.450000000000e+01 6.773102927046e-06 0.000000000000e+00 -6.773102912533e-06 -1.451250000000e-14 1.500000000000e+01 6.776369734379e-06 0.000000000000e+00 -6.776369719367e-06 -1.501250000000e-14 1.550000000000e+01 6.779617094476e-06 0.000000000000e+00 -6.779617078964e-06 -1.551250000000e-14 1.600000000000e+01 6.782845996046e-06 0.000000000000e+00 -6.782845980033e-06 -1.601250000000e-14 1.650000000000e+01 6.786057349179e-06 0.000000000000e+00 -6.786057332667e-06 -1.651250000000e-14 1.700000000000e+01 6.789251993821e-06 0.000000000000e+00 -6.789251976809e-06 -1.701250000000e-14 1.750000000000e+01 6.792430707101e-06 0.000000000000e+00 -6.792430689589e-06 -1.751250000000e-14 1.800000000000e+01 6.795594209705e-06 0.000000000000e+00 -6.795594191694e-06 -1.801250000000e-14 1.850000000000e+01 6.798743171452e-06 0.000000000000e+00 -6.798743152940e-06 -1.851250000000e-14 1.900000000000e+01 6.801878216162e-06 0.000000000000e+00 -6.801878197150e-06 -1.901250000000e-14 1.950000000000e+01 6.804999925964e-06 0.000000000000e+00 -6.804999906451e-06 -1.951250000000e-14 2.000000000000e+01 6.808108845078e-06 0.000000000000e+00 -6.808108825066e-06 -2.001250000000e-14 1.000000000000e+00 1.274890173157e-04 0.000000000000e+00 -1.274890173146e-04 -1.012500000000e-15 1.500000000000e+00 1.693276798902e-04 0.000000000000e+00 -1.693276798887e-04 -1.512500000000e-15 2.000000000000e+00 1.981227581134e-04 0.000000000000e+00 -1.981227581114e-04 -2.012500000000e-15 2.500000000000e+00 2.162441617759e-04 0.000000000000e+00 -2.162441617734e-04 -2.512500000000e-15 3.000000000000e+00 2.264737795371e-04 0.000000000000e+00 -2.264737795341e-04 -3.012500000000e-15 3.500000000000e+00 2.314298706895e-04 0.000000000000e+00 -2.314298706860e-04 -3.512500000000e-15 4.000000000000e+00 2.332343255097e-04 0.000000000000e+00 -2.332343255057e-04 -4.012500000000e-15 4.500000000000e+00 2.335886656475e-04 0.000000000000e+00 -2.335886656430e-04 -4.512500000000e-15 5.000000000000e+00 2.337008750159e-04 0.000000000000e+00 -2.337008750109e-04 -5.012500000000e-15 5.500000000000e+00 2.337974183649e-04 0.000000000000e+00 -2.337974183594e-04 -5.512500000000e-15 6.000000000000e+00 2.338848133622e-04 0.000000000000e+00 -2.338848133561e-04 -6.012500000000e-15 6.500000000000e+00 2.339650107616e-04 0.000000000000e+00 -2.339650107551e-04 -6.512500000000e-15 7.000000000000e+00 2.340394491420e-04 0.000000000000e+00 -2.340394491349e-04 -7.012500000000e-15 7.500000000000e+00 2.341092139879e-04 0.000000000000e+00 -2.341092139804e-04 -7.512500000000e-15 8.000000000000e+00 2.341751299529e-04 0.000000000000e+00 -2.341751299449e-04 -8.012500000000e-15 8.500000000000e+00 2.342378299682e-04 0.000000000000e+00 -2.342378299597e-04 -8.512500000000e-15 9.000000000000e+00 2.342978058364e-04 0.000000000000e+00 -2.342978058274e-04 -9.012500000000e-15 9.500000000000e+00 2.343554447722e-04 0.000000000000e+00 -2.343554447627e-04 -9.512500000000e-15 1.000000000000e+01 2.344110557227e-04 0.000000000000e+00 -2.344110557127e-04 -1.001250000000e-14 1.050000000000e+01 2.344648883967e-04 0.000000000000e+00 -2.344648883862e-04 -1.051250000000e-14 1.100000000000e+01 2.345171471279e-04 0.000000000000e+00 -2.345171471169e-04 -1.101250000000e-14 1.150000000000e+01 2.345680010697e-04 0.000000000000e+00 -2.345680010581e-04 -1.151250000000e-14 1.200000000000e+01 2.346175917735e-04 0.000000000000e+00 -2.346175917615e-04 -1.201250000000e-14 1.250000000000e+01 2.346660388851e-04 0.000000000000e+00 -2.346660388726e-04 -1.251250000000e-14 1.300000000000e+01 2.347134444729e-04 0.000000000000e+00 -2.347134444599e-04 -1.301250000000e-14 1.350000000000e+01 2.347598963549e-04 0.000000000000e+00 -2.347598963414e-04 -1.351250000000e-14 1.400000000000e+01 2.348054706818e-04 0.000000000000e+00 -2.348054706678e-04 -1.401250000000e-14 1.450000000000e+01 2.348502339640e-04 0.000000000000e+00 -2.348502339494e-04 -1.451250000000e-14 1.500000000000e+01 2.348942446774e-04 0.000000000000e+00 -2.348942446624e-04 -1.501250000000e-14 1.550000000000e+01 2.349375545487e-04 0.000000000000e+00 -2.349375545332e-04 -1.551250000000e-14 1.600000000000e+01 2.349802095907e-04 0.000000000000e+00 -2.349802095746e-04 -1.601250000000e-14 1.650000000000e+01 2.350222509463e-04 0.000000000000e+00 -2.350222509298e-04 -1.651250000000e-14 1.700000000000e+01 2.350637155798e-04 0.000000000000e+00 -2.350637155628e-04 -1.701250000000e-14 1.750000000000e+01 2.351046368484e-04 0.000000000000e+00 -2.351046368309e-04 -1.751250000000e-14 1.800000000000e+01 2.351450449772e-04 0.000000000000e+00 -2.351450449592e-04 -1.801250000000e-14 1.850000000000e+01 2.351849674579e-04 0.000000000000e+00 -2.351849674394e-04 -1.851250000000e-14 1.900000000000e+01 2.352244293842e-04 0.000000000000e+00 -2.352244293652e-04 -1.901250000000e-14 1.950000000000e+01 2.352634537363e-04 0.000000000000e+00 -2.352634537168e-04 -1.951250000000e-14 2.000000000000e+01 2.353020616237e-04 0.000000000000e+00 -2.353020616037e-04 -2.001250000000e-14 1.000000000000e+00 2.269595911647e-04 0.000000000000e+00 -2.269595911637e-04 -1.012500000000e-15 1.500000000000e+00 3.245958003619e-04 0.000000000000e+00 -3.245958003604e-04 -1.512500000000e-15 2.000000000000e+00 4.130537167950e-04 0.000000000000e+00 -4.130537167929e-04 -2.012500000000e-15 2.500000000000e+00 4.932395051055e-04 0.000000000000e+00 -4.932395051030e-04 -2.512500000000e-15 3.000000000000e+00 5.659575740699e-04 0.000000000000e+00 -5.659575740668e-04 -3.012500000000e-15 3.500000000000e+00 6.319193241630e-04 0.000000000000e+00 -6.319193241595e-04 -3.512500000000e-15 4.000000000000e+00 6.917533314493e-04 0.000000000000e+00 -6.917533314453e-04 -4.012500000000e-15 4.500000000000e+00 7.460156574186e-04 0.000000000000e+00 -7.460156574141e-04 -4.512500000000e-15 5.000000000000e+00 7.951995487403e-04 0.000000000000e+00 -7.951995487353e-04 -5.012500000000e-15 5.500000000000e+00 8.397442797519e-04 0.000000000000e+00 -8.397442797464e-04 -5.512500000000e-15 6.000000000000e+00 8.800429993220e-04 0.000000000000e+00 -8.800429993160e-04 -6.012500000000e-15 6.500000000000e+00 9.164495948268e-04 0.000000000000e+00 -9.164495948203e-04 -6.512500000000e-15 7.000000000000e+00 9.492846221673e-04 0.000000000000e+00 -9.492846221603e-04 -7.012500000000e-15 7.500000000000e+00 9.788403719368e-04 0.000000000000e+00 -9.788403719292e-04 -7.512500000000e-15 8.000000000000e+00 1.005385145780e-03 0.000000000000e+00 -1.005385145772e-03 -8.012500000000e-15 8.500000000000e+00 1.029166813646e-03 0.000000000000e+00 -1.029166813637e-03 -8.512500000000e-15 9.000000000000e+00 1.050415716893e-03 0.000000000000e+00 -1.050415716884e-03 -9.012500000000e-15 9.500000000000e+00 1.069346977058e-03 0.000000000000e+00 -1.069346977048e-03 -9.512500000000e-15 1.000000000000e+01 1.086162267650e-03 0.000000000000e+00 -1.086162267640e-03 -1.001250000000e-14 1.050000000000e+01 1.101051107714e-03 0.000000000000e+00 -1.101051107704e-03 -1.051250000000e-14 1.100000000000e+01 1.114191741395e-03 0.000000000000e+00 -1.114191741384e-03 -1.101250000000e-14 1.150000000000e+01 1.125751676145e-03 0.000000000000e+00 -1.125751676134e-03 -1.151250000000e-14 1.200000000000e+01 1.135887960891e-03 0.000000000000e+00 -1.135887960879e-03 -1.201250000000e-14 1.250000000000e+01 1.144747291005e-03 0.000000000000e+00 -1.144747290993e-03 -1.251250000000e-14 1.300000000000e+01 1.152466026198e-03 0.000000000000e+00 -1.152466026185e-03 -1.301250000000e-14 1.350000000000e+01 1.159170198818e-03 0.000000000000e+00 -1.159170198804e-03 -1.351250000000e-14 1.400000000000e+01 1.164975574299e-03 0.000000000000e+00 -1.164975574285e-03 -1.401250000000e-14 1.450000000000e+01 1.169987805195e-03 0.000000000000e+00 -1.169987805181e-03 -1.451250000000e-14 1.500000000000e+01 1.174302699051e-03 0.000000000000e+00 -1.174302699036e-03 -1.501250000000e-14 1.550000000000e+01 1.178006601622e-03 0.000000000000e+00 -1.178006601607e-03 -1.551250000000e-14 1.600000000000e+01 1.181176882787e-03 0.000000000000e+00 -1.181176882771e-03 -1.601250000000e-14 1.650000000000e+01 1.183882514109e-03 0.000000000000e+00 -1.183882514093e-03 -1.651250000000e-14 1.700000000000e+01 1.186184647748e-03 0.000000000000e+00 -1.186184647731e-03 -1.701250000000e-14 1.750000000000e+01 1.188137343234e-03 0.000000000000e+00 -1.188137343216e-03 -1.751250000000e-14 1.800000000000e+01 1.189788178515e-03 0.000000000000e+00 -1.189788178497e-03 -1.801250000000e-14 1.850000000000e+01 1.191178919333e-03 0.000000000000e+00 -1.191178919314e-03 -1.851250000000e-14 1.900000000000e+01 1.192346152250e-03 0.000000000000e+00 -1.192346152231e-03 -1.901250000000e-14 1.950000000000e+01 1.193321888056e-03 0.000000000000e+00 -1.193321888037e-03 -1.951250000000e-14 2.000000000000e+01 1.194134132931e-03 0.000000000000e+00 -1.194134132911e-03 -2.001250000000e-14 1.000000000000e+00 4.726092375368e-06 0.000000000000e+00 -4.726092374368e-06 -1.000000000938e-15 1.500000000000e+00 4.731711237202e-06 0.000000000000e+00 -4.731711235702e-06 -1.500000000938e-15 2.000000000000e+00 4.736529809248e-06 0.000000000000e+00 -4.736529807247e-06 -2.000000000938e-15 2.500000000000e+00 4.740938696603e-06 0.000000000000e+00 -4.740938694103e-06 -2.500000000938e-15 3.000000000000e+00 4.745084307677e-06 0.000000000000e+00 -4.745084304677e-06 -3.000000000938e-15 3.500000000000e+00 4.749040748413e-06 0.000000000000e+00 -4.749040744913e-06 -3.500000000938e-15 4.000000000000e+00 4.752852224252e-06 0.000000000000e+00 -4.752852220252e-06 -4.000000000938e-15 4.500000000000e+00 4.756547836439e-06 0.000000000000e+00 -4.756547831939e-06 -4.500000000938e-15 5.000000000000e+00 4.760148034476e-06 0.000000000000e+00 -4.760148029476e-06 -5.000000000938e-15 5.500000000000e+00 4.763667873033e-06 0.000000000000e+00 -4.763667867533e-06 -5.500000000938e-15 6.000000000000e+00 4.767118830872e-06 0.000000000000e+00 -4.767118824872e-06 -6.000000000938e-15 6.500000000000e+00 4.770509904366e-06 0.000000000000e+00 -4.770509897866e-06 -6.500000000938e-15 7.000000000000e+00 4.773848302867e-06 0.000000000000e+00 -4.773848295867e-06 -7.000000000938e-15 7.500000000000e+00 4.777139910885e-06 0.000000000000e+00 -4.777139903385e-06 -7.500000000938e-15 8.000000000000e+00 4.780389606510e-06 0.000000000000e+00 -4.780389598510e-06 -8.000000000938e-15 8.500000000000e+00 4.783601487430e-06 0.000000000000e+00 -4.783601478930e-06 -8.500000000938e-15 9.000000000000e+00 4.786779035441e-06 0.000000000000e+00 -4.786779026442e-06 -9.000000000938e-15 9.500000000000e+00 4.789925238813e-06 0.000000000000e+00 -4.789925229314e-06 -9.500000000938e-15 1.000000000000e+01 4.793042685013e-06 0.000000000000e+00 -4.793042675012e-06 -1.000000000094e-14 1.050000000000e+01 4.796133632142e-06 0.000000000000e+00 -4.796133621643e-06 -1.050000000094e-14 1.100000000000e+01 4.799200064788e-06 0.000000000000e+00 -4.799200053788e-06 -1.100000000094e-14 1.150000000000e+01 4.802243738233e-06 0.000000000000e+00 -4.802243726733e-06 -1.150000000094e-14 1.200000000000e+01 4.805266213891e-06 0.000000000000e+00 -4.805266201891e-06 -1.200000000094e-14 1.250000000000e+01 4.808268887992e-06 0.000000000000e+00 -4.808268875492e-06 -1.250000000094e-14 1.300000000000e+01 4.811253015026e-06 0.000000000000e+00 -4.811253002026e-06 -1.300000000094e-14 1.350000000000e+01 4.814219727081e-06 0.000000000000e+00 -4.814219713581e-06 -1.350000000094e-14 1.400000000000e+01 4.817170049913e-06 0.000000000000e+00 -4.817170035913e-06 -1.400000000094e-14 1.450000000000e+01 4.820104916400e-06 0.000000000000e+00 -4.820104901899e-06 -1.450000000094e-14 1.500000000000e+01 4.823025177885e-06 0.000000000000e+00 -4.823025162884e-06 -1.500000000094e-14 1.550000000000e+01 4.825931613801e-06 0.000000000000e+00 -4.825931598301e-06 -1.550000000094e-14 1.600000000000e+01 4.828824939881e-06 0.000000000000e+00 -4.828824923882e-06 -1.600000000094e-14 1.650000000000e+01 4.831705815201e-06 0.000000000000e+00 -4.831705798701e-06 -1.650000000094e-14 1.700000000000e+01 4.834574848251e-06 0.000000000000e+00 -4.834574831251e-06 -1.700000000094e-14 1.750000000000e+01 4.837432602199e-06 0.000000000000e+00 -4.837432584700e-06 -1.750000000094e-14 1.800000000000e+01 4.840279599472e-06 0.000000000000e+00 -4.840279581472e-06 -1.800000000094e-14 1.850000000000e+01 4.843116325753e-06 0.000000000000e+00 -4.843116307253e-06 -1.850000000094e-14 1.900000000000e+01 4.845943233490e-06 0.000000000000e+00 -4.845943214490e-06 -1.900000000094e-14 1.950000000000e+01 4.848760744993e-06 0.000000000000e+00 -4.848760725493e-06 -1.950000000094e-14 2.000000000000e+01 4.851569255159e-06 0.000000000000e+00 -4.851569235159e-06 -2.000000000094e-14 1.000000000000e+00 1.646434177635e-04 0.000000000000e+00 -1.646434177625e-04 -1.000000000938e-15 1.500000000000e+00 2.208432648033e-04 0.000000000000e+00 -2.208432648018e-04 -1.500000000938e-15 2.000000000000e+00 2.608804446688e-04 0.000000000000e+00 -2.608804446668e-04 -2.000000000938e-15 2.500000000000e+00 2.870062415930e-04 0.000000000000e+00 -2.870062415905e-04 -2.500000000938e-15 3.000000000000e+00 3.022374085582e-04 0.000000000000e+00 -3.022374085552e-04 -3.000000000938e-15 3.500000000000e+00 3.097324532827e-04 0.000000000000e+00 -3.097324532792e-04 -3.500000000938e-15 4.000000000000e+00 3.123055653658e-04 0.000000000000e+00 -3.123055653618e-04 -4.000000000938e-15 4.500000000000e+00 3.126709674888e-04 0.000000000000e+00 -3.126709674843e-04 -4.500000000938e-15 5.000000000000e+00 3.128290630908e-04 0.000000000000e+00 -3.128290630858e-04 -5.000000000938e-15 5.500000000000e+00 3.129685553469e-04 0.000000000000e+00 -3.129685553414e-04 -5.500000000938e-15 6.000000000000e+00 3.130936782264e-04 0.000000000000e+00 -3.130936782204e-04 -6.000000000938e-15 6.500000000000e+00 3.132074800648e-04 0.000000000000e+00 -3.132074800583e-04 -6.500000000938e-15 7.000000000000e+00 3.133122736204e-04 0.000000000000e+00 -3.133122736134e-04 -7.000000000938e-15 7.500000000000e+00 3.134098067217e-04 0.000000000000e+00 -3.134098067142e-04 -7.500000000938e-15 8.000000000000e+00 3.135014050482e-04 0.000000000000e+00 -3.135014050402e-04 -8.000000000938e-15 8.500000000000e+00 3.135880827072e-04 0.000000000000e+00 -3.135880826987e-04 -8.500000000938e-15 9.000000000000e+00 3.136706242386e-04 0.000000000000e+00 -3.136706242296e-04 -9.000000000938e-15 9.500000000000e+00 3.137496442305e-04 0.000000000000e+00 -3.137496442210e-04 -9.500000000938e-15 1.000000000000e+01 3.138256303816e-04 0.000000000000e+00 -3.138256303716e-04 -1.000000000094e-14 1.050000000000e+01 3.138989746550e-04 0.000000000000e+00 -3.138989746445e-04 -1.050000000094e-14 1.100000000000e+01 3.139699959511e-04 0.000000000000e+00 -3.139699959401e-04 -1.100000000094e-14 1.150000000000e+01 3.140389567532e-04 0.000000000000e+00 -3.140389567417e-04 -1.150000000094e-14 1.200000000000e+01 3.141060754686e-04 0.000000000000e+00 -3.141060754566e-04 -1.200000000094e-14 1.250000000000e+01 3.141715356775e-04 0.000000000000e+00 -3.141715356650e-04 -1.250000000094e-14 1.300000000000e+01 3.142354931405e-04 0.000000000000e+00 -3.142354931275e-04 -1.300000000094e-14 1.350000000000e+01 3.142980811643e-04 0.000000000000e+00 -3.142980811508e-04 -1.350000000094e-14 1.400000000000e+01 3.143594147546e-04 0.000000000000e+00 -3.143594147406e-04 -1.400000000094e-14 1.450000000000e+01 3.144195938627e-04 0.000000000000e+00 -3.144195938482e-04 -1.450000000094e-14 1.500000000000e+01 3.144787059487e-04 0.000000000000e+00 -3.144787059337e-04 -1.500000000094e-14 1.550000000000e+01 3.145368280241e-04 0.000000000000e+00 -3.145368280086e-04 -1.550000000094e-14 1.600000000000e+01 3.145940282936e-04 0.000000000000e+00 -3.145940282776e-04 -1.600000000094e-14 1.650000000000e+01 3.146503674862e-04 0.000000000000e+00 -3.146503674697e-04 -1.650000000094e-14 1.700000000000e+01 3.147058999430e-04 0.000000000000e+00 -3.147058999260e-04 -1.700000000094e-14 1.750000000000e+01 3.147606745122e-04 0.000000000000e+00 -3.147606744947e-04 -1.750000000094e-14 1.800000000000e+01 3.148147352920e-04 0.000000000000e+00 -3.148147352740e-04 -1.800000000094e-14 1.850000000000e+01 3.148681222498e-04 0.000000000000e+00 -3.148681222313e-04 -1.850000000094e-14 1.900000000000e+01 3.149208717429e-04 0.000000000000e+00 -3.149208717239e-04 -1.900000000094e-14 1.950000000000e+01 3.149730169583e-04 0.000000000000e+00 -3.149730169388e-04 -1.950000000094e-14 2.000000000000e+01 3.150245882860e-04 0.000000000000e+00 -3.150245882660e-04 -2.000000000094e-14 1.000000000000e+00 2.751313529263e-04 0.000000000000e+00 -2.751313529253e-04 -1.000000000938e-15 1.500000000000e+00 3.929853749127e-04 0.000000000000e+00 -3.929853749112e-04 -1.500000000938e-15 2.000000000000e+00 4.996974614796e-04 0.000000000000e+00 -4.996974614776e-04 -2.000000000938e-15 2.500000000000e+00 5.965316523305e-04 0.000000000000e+00 -5.965316523280e-04 -2.500000000938e-15 3.000000000000e+00 6.845833563727e-04 0.000000000000e+00 -6.845833563697e-04 -3.000000000938e-15 3.500000000000e+00 7.648002439057e-04 0.000000000000e+00 -7.648002439022e-04 -3.500000000938e-15 4.000000000000e+00 8.380025906074e-04 0.000000000000e+00 -8.380025906034e-04 -4.000000000938e-15 4.500000000000e+00 9.049017427870e-04 0.000000000000e+00 -9.049017427825e-04 -4.500000000938e-15 5.000000000000e+00 9.661162941166e-04 0.000000000000e+00 -9.661162941116e-04 -5.000000000938e-15 5.500000000000e+00 1.022185992778e-03 0.000000000000e+00 -1.022185992773e-03 -5.500000000938e-15 6.000000000000e+00 1.073583571867e-03 0.000000000000e+00 -1.073583571861e-03 -6.000000000938e-15 6.500000000000e+00 1.120724764862e-03 0.000000000000e+00 -1.120724764856e-03 -6.500000000938e-15 7.000000000000e+00 1.163976764973e-03 0.000000000000e+00 -1.163976764966e-03 -7.000000000938e-15 7.500000000000e+00 1.203665369216e-03 0.000000000000e+00 -1.203665369209e-03 -7.500000000938e-15 8.000000000000e+00 1.240081016829e-03 0.000000000000e+00 -1.240081016821e-03 -8.000000000938e-15 8.500000000000e+00 1.273483900085e-03 0.000000000000e+00 -1.273483900076e-03 -8.500000000938e-15 9.000000000000e+00 1.304108296091e-03 0.000000000000e+00 -1.304108296082e-03 -9.000000000938e-15 9.500000000000e+00 1.332166242221e-03 0.000000000000e+00 -1.332166242212e-03 -9.500000000938e-15 1.000000000000e+01 1.357850655666e-03 0.000000000000e+00 -1.357850655656e-03 -1.000000000094e-14 1.050000000000e+01 1.381337979195e-03 0.000000000000e+00 -1.381337979184e-03 -1.050000000094e-14 1.100000000000e+01 1.402790420104e-03 0.000000000000e+00 -1.402790420093e-03 -1.100000000094e-14 1.150000000000e+01 1.422357837207e-03 0.000000000000e+00 -1.422357837196e-03 -1.150000000094e-14 1.200000000000e+01 1.440179321237e-03 0.000000000000e+00 -1.440179321225e-03 -1.200000000094e-14 1.250000000000e+01 1.456384506808e-03 0.000000000000e+00 -1.456384506795e-03 -1.250000000094e-14 1.300000000000e+01 1.471094648855e-03 0.000000000000e+00 -1.471094648842e-03 -1.300000000094e-14 1.350000000000e+01 1.484423492978e-03 0.000000000000e+00 -1.484423492965e-03 -1.350000000094e-14 1.400000000000e+01 1.496477966925e-03 0.000000000000e+00 -1.496477966911e-03 -1.400000000094e-14 1.450000000000e+01 1.507358719306e-03 0.000000000000e+00 -1.507358719292e-03 -1.450000000094e-14 1.500000000000e+01 1.517160530996e-03 0.000000000000e+00 -1.517160530981e-03 -1.500000000094e-14 1.550000000000e+01 1.525972624202e-03 0.000000000000e+00 -1.525972624186e-03 -1.550000000094e-14 1.600000000000e+01 1.533878893343e-03 0.000000000000e+00 -1.533878893327e-03 -1.600000000094e-14 1.650000000000e+01 1.540958080539e-03 0.000000000000e+00 -1.540958080523e-03 -1.650000000094e-14 1.700000000000e+01 1.547283916298e-03 0.000000000000e+00 -1.547283916281e-03 -1.700000000094e-14 1.750000000000e+01 1.552925243154e-03 0.000000000000e+00 -1.552925243137e-03 -1.750000000094e-14 1.800000000000e+01 1.557946136561e-03 0.000000000000e+00 -1.557946136543e-03 -1.800000000094e-14 1.850000000000e+01 1.562406033623e-03 0.000000000000e+00 -1.562406033604e-03 -1.850000000094e-14 1.900000000000e+01 1.566359876649e-03 0.000000000000e+00 -1.566359876630e-03 -1.900000000094e-14 1.950000000000e+01 1.569858275144e-03 0.000000000000e+00 -1.569858275125e-03 -1.950000000094e-14 2.000000000000e+01 1.572947701406e-03 0.000000000000e+00 -1.572947701386e-03 -2.000000000094e-14 1.000000000000e+00 9.545337308163e-06 0.000000000000e+00 -9.545321114984e-06 -1.619317952605e-11 1.500000000000e+00 9.555321845056e-06 0.000000000000e+00 -9.555305651376e-06 -1.619367952607e-11 2.000000000000e+00 9.562845839443e-06 0.000000000000e+00 -9.562829645263e-06 -1.619417952607e-11 2.500000000000e+00 9.569444403080e-06 0.000000000000e+00 -9.569428208400e-06 -1.619467952607e-11 3.000000000000e+00 9.575473372031e-06 0.000000000000e+00 -9.575457176851e-06 -1.619517952607e-11 3.500000000000e+00 9.581104512767e-06 0.000000000000e+00 -9.581088317087e-06 -1.619567952607e-11 4.000000000000e+00 9.586436849781e-06 0.000000000000e+00 -9.586420653601e-06 -1.619617952607e-11 4.500000000000e+00 9.591533834272e-06 0.000000000000e+00 -9.591517637592e-06 -1.619667952607e-11 5.000000000000e+00 9.596439109032e-06 0.000000000000e+00 -9.596422911853e-06 -1.619717952607e-11 5.500000000000e+00 9.601184258069e-06 0.000000000000e+00 -9.601168060389e-06 -1.619767952607e-11 6.000000000000e+00 9.605793031483e-06 0.000000000000e+00 -9.605776833303e-06 -1.619817952607e-11 6.500000000000e+00 9.610283832006e-06 0.000000000000e+00 -9.610267633326e-06 -1.619867952607e-11 7.000000000000e+00 9.614671267222e-06 0.000000000000e+00 -9.614655068042e-06 -1.619917952607e-11 7.500000000000e+00 9.618967164902e-06 0.000000000000e+00 -9.618950965222e-06 -1.619967952607e-11 8.000000000000e+00 9.623181262888e-06 0.000000000000e+00 -9.623165062709e-06 -1.620017952607e-11 8.500000000000e+00 9.627321692901e-06 0.000000000000e+00 -9.627305492221e-06 -1.620067952607e-11 9.000000000000e+00 9.631395328970e-06 0.000000000000e+00 -9.631379127791e-06 -1.620117952607e-11 9.500000000000e+00 9.635408044203e-06 0.000000000000e+00 -9.635391842525e-06 -1.620167952607e-11 1.000000000000e+01 9.639364903762e-06 0.000000000000e+00 -9.639348701583e-06 -1.620217952607e-11 1.050000000000e+01 9.643270312442e-06 0.000000000000e+00 -9.643254109762e-06 -1.620267952607e-11 1.100000000000e+01 9.647128129282e-06 0.000000000000e+00 -9.647111926102e-06 -1.620317952607e-11 1.150000000000e+01 9.650941757782e-06 0.000000000000e+00 -9.650925554103e-06 -1.620367952607e-11 1.200000000000e+01 9.654714217800e-06 0.000000000000e+00 -9.654698013621e-06 -1.620417952607e-11 1.250000000000e+01 9.658448203475e-06 0.000000000000e+00 -9.658431998796e-06 -1.620467952607e-11 1.300000000000e+01 9.662146130375e-06 0.000000000000e+00 -9.662129925196e-06 -1.620517952607e-11 1.350000000000e+01 9.665810174203e-06 0.000000000000e+00 -9.665793968524e-06 -1.620567952607e-11 1.400000000000e+01 9.669442302862e-06 0.000000000000e+00 -9.669426096683e-06 -1.620617952607e-11 1.450000000000e+01 9.673044303203e-06 0.000000000000e+00 -9.673028096523e-06 -1.620667952607e-11 1.500000000000e+01 9.676617803505e-06 0.000000000000e+00 -9.676601596326e-06 -1.620717952607e-11 1.550000000000e+01 9.680164292490e-06 0.000000000000e+00 -9.680148084811e-06 -1.620767952607e-11 1.600000000000e+01 9.683685135501e-06 0.000000000000e+00 -9.683668927322e-06 -1.620817952607e-11 1.650000000000e+01 9.687181588347e-06 0.000000000000e+00 -9.687165379668e-06 -1.620867952607e-11 1.700000000000e+01 9.690654809212e-06 0.000000000000e+00 -9.690638600033e-06 -1.620917952607e-11 1.750000000000e+01 9.694105868953e-06 0.000000000000e+00 -9.694089659273e-06 -1.620967952607e-11 1.800000000000e+01 9.697535760035e-06 0.000000000000e+00 -9.697519549856e-06 -1.621017952607e-11 1.850000000000e+01 9.700945404334e-06 0.000000000000e+00 -9.700929193654e-06 -1.621067952607e-11 1.900000000000e+01 9.704335659958e-06 0.000000000000e+00 -9.704319448779e-06 -1.621117952607e-11 1.950000000000e+01 9.707707327257e-06 0.000000000000e+00 -9.707691115578e-06 -1.621167952607e-11 2.000000000000e+01 9.711061154107e-06 0.000000000000e+00 -9.711044941929e-06 -1.621217952607e-11 1.000000000000e+00 9.047609079119e-05 0.000000000000e+00 -9.047607459801e-05 -1.619317952605e-11 1.500000000000e+00 1.191911814021e-04 0.000000000000e+00 -1.191911652084e-04 -1.619367952607e-11 2.000000000000e+00 1.385603861087e-04 0.000000000000e+00 -1.385603699145e-04 -1.619417952607e-11 2.500000000000e+00 1.506627188573e-04 0.000000000000e+00 -1.506627026627e-04 -1.619467952607e-11 3.000000000000e+00 1.576408187781e-04 0.000000000000e+00 -1.576408025829e-04 -1.619517952607e-11 3.500000000000e+00 1.613144860714e-04 0.000000000000e+00 -1.613144698757e-04 -1.619567952607e-11 4.000000000000e+00 1.630243371076e-04 0.000000000000e+00 -1.630243209114e-04 -1.619617952607e-11 4.500000000000e+00 1.636751455141e-04 0.000000000000e+00 -1.636751293175e-04 -1.619667952607e-11 5.000000000000e+00 1.638667593304e-04 0.000000000000e+00 -1.638667431332e-04 -1.619717952607e-11 5.500000000000e+00 1.639434900280e-04 0.000000000000e+00 -1.639434738303e-04 -1.619767952607e-11 6.000000000000e+00 1.640026634650e-04 0.000000000000e+00 -1.640026472668e-04 -1.619817952607e-11 6.500000000000e+00 1.640562120289e-04 0.000000000000e+00 -1.640561958302e-04 -1.619867952607e-11 7.000000000000e+00 1.641060098425e-04 0.000000000000e+00 -1.641059936433e-04 -1.619917952607e-11 7.500000000000e+00 1.641528423775e-04 0.000000000000e+00 -1.641528261779e-04 -1.619967952607e-11 8.000000000000e+00 1.641972343967e-04 0.000000000000e+00 -1.641972181965e-04 -1.620017952607e-11 8.500000000000e+00 1.642395784474e-04 0.000000000000e+00 -1.642395622468e-04 -1.620067952607e-11 9.000000000000e+00 1.642801784174e-04 0.000000000000e+00 -1.642801622163e-04 -1.620117952607e-11 9.500000000000e+00 1.643192740376e-04 0.000000000000e+00 -1.643192578359e-04 -1.620167952607e-11 1.000000000000e+01 1.643570572987e-04 0.000000000000e+00 -1.643570410965e-04 -1.620217952607e-11 1.050000000000e+01 1.643936840576e-04 0.000000000000e+00 -1.643936678549e-04 -1.620267952607e-11 1.100000000000e+01 1.644292824338e-04 0.000000000000e+00 -1.644292662306e-04 -1.620317952607e-11 1.150000000000e+01 1.644639589751e-04 0.000000000000e+00 -1.644639427714e-04 -1.620367952607e-11 1.200000000000e+01 1.644978032448e-04 0.000000000000e+00 -1.644977870406e-04 -1.620417952607e-11 1.250000000000e+01 1.645308912765e-04 0.000000000000e+00 -1.645308750718e-04 -1.620467952607e-11 1.300000000000e+01 1.645632882063e-04 0.000000000000e+00 -1.645632720012e-04 -1.620517952607e-11 1.350000000000e+01 1.645950503019e-04 0.000000000000e+00 -1.645950340962e-04 -1.620567952607e-11 1.400000000000e+01 1.646262265422e-04 0.000000000000e+00 -1.646262103361e-04 -1.620617952607e-11 1.450000000000e+01 1.646568598620e-04 0.000000000000e+00 -1.646568436553e-04 -1.620667952607e-11 1.500000000000e+01 1.646869881404e-04 0.000000000000e+00 -1.646869719332e-04 -1.620717952607e-11 1.550000000000e+01 1.647166449941e-04 0.000000000000e+00 -1.647166287865e-04 -1.620767952607e-11 1.600000000000e+01 1.647458604202e-04 0.000000000000e+00 -1.647458442121e-04 -1.620817952607e-11 1.650000000000e+01 1.647746613197e-04 0.000000000000e+00 -1.647746451110e-04 -1.620867952607e-11 1.700000000000e+01 1.648030719288e-04 0.000000000000e+00 -1.648030557196e-04 -1.620917952607e-11 1.750000000000e+01 1.648311141767e-04 0.000000000000e+00 -1.648310979670e-04 -1.620967952607e-11 1.800000000000e+01 1.648588079833e-04 0.000000000000e+00 -1.648587917731e-04 -1.621017952607e-11 1.850000000000e+01 1.648861715100e-04 0.000000000000e+00 -1.648861552994e-04 -1.621067952607e-11 1.900000000000e+01 1.649132213715e-04 0.000000000000e+00 -1.649132051603e-04 -1.621117952607e-11 1.950000000000e+01 1.649399728153e-04 0.000000000000e+00 -1.649399566037e-04 -1.621167952607e-11 2.000000000000e+01 1.649664398765e-04 0.000000000000e+00 -1.649664236643e-04 -1.621217952607e-11 1.000000000000e+00 1.690804484117e-04 0.000000000000e+00 -1.690804322186e-04 -1.619317952605e-11 1.500000000000e+00 2.417436972565e-04 0.000000000000e+00 -2.417436810628e-04 -1.619367952607e-11 2.000000000000e+00 3.073000758711e-04 0.000000000000e+00 -3.073000596769e-04 -1.619417952607e-11 2.500000000000e+00 3.663114738802e-04 0.000000000000e+00 -3.663114576855e-04 -1.619467952607e-11 3.000000000000e+00 4.193019523055e-04 0.000000000000e+00 -4.193019361103e-04 -1.619517952607e-11 3.500000000000e+00 4.667590085141e-04 0.000000000000e+00 -4.667589923184e-04 -1.619567952607e-11 4.000000000000e+00 5.091361234767e-04 0.000000000000e+00 -5.091361072805e-04 -1.619617952607e-11 4.500000000000e+00 5.468559803322e-04 0.000000000000e+00 -5.468559641355e-04 -1.619667952607e-11 5.000000000000e+00 5.803138188318e-04 0.000000000000e+00 -5.803138026346e-04 -1.619717952607e-11 5.500000000000e+00 6.098805450742e-04 0.000000000000e+00 -6.098805288765e-04 -1.619767952607e-11 6.000000000000e+00 6.359053626752e-04 0.000000000000e+00 -6.359053464770e-04 -1.619817952607e-11 6.500000000000e+00 6.587178079491e-04 0.000000000000e+00 -6.587177917504e-04 -1.619867952607e-11 7.000000000000e+00 6.786291565195e-04 0.000000000000e+00 -6.786291403203e-04 -1.619917952607e-11 7.500000000000e+00 6.959332283890e-04 0.000000000000e+00 -6.959332121893e-04 -1.619967952607e-11 8.000000000000e+00 7.109066625894e-04 0.000000000000e+00 -7.109066463892e-04 -1.620017952607e-11 8.500000000000e+00 7.238087701461e-04 0.000000000000e+00 -7.238087539454e-04 -1.620067952607e-11 9.000000000000e+00 7.348811086256e-04 0.000000000000e+00 -7.348810924244e-04 -1.620117952607e-11 9.500000000000e+00 7.443469478820e-04 0.000000000000e+00 -7.443469316803e-04 -1.620167952607e-11 1.000000000000e+01 7.524108039604e-04 0.000000000000e+00 -7.524107877582e-04 -1.620217952607e-11 1.050000000000e+01 7.592581977179e-04 0.000000000000e+00 -7.592581815152e-04 -1.620267952607e-11 1.100000000000e+01 7.650557472687e-04 0.000000000000e+00 -7.650557310656e-04 -1.620317952607e-11 1.150000000000e+01 7.699516402409e-04 0.000000000000e+00 -7.699516240372e-04 -1.620367952607e-11 1.200000000000e+01 7.740764696519e-04 0.000000000000e+00 -7.740764534477e-04 -1.620417952607e-11 1.250000000000e+01 7.775443700098e-04 0.000000000000e+00 -7.775443538051e-04 -1.620467952607e-11 1.300000000000e+01 7.804543646183e-04 0.000000000000e+00 -7.804543484131e-04 -1.620517952607e-11 1.350000000000e+01 7.828918352505e-04 0.000000000000e+00 -7.828918190448e-04 -1.620567952607e-11 1.400000000000e+01 7.849299959945e-04 0.000000000000e+00 -7.849299797883e-04 -1.620617952607e-11 1.450000000000e+01 7.866313938493e-04 0.000000000000e+00 -7.866313776426e-04 -1.620667952607e-11 1.500000000000e+01 7.880492612418e-04 0.000000000000e+00 -7.880492450346e-04 -1.620717952607e-11 1.550000000000e+01 7.892287939658e-04 0.000000000000e+00 -7.892287777581e-04 -1.620767952607e-11 1.600000000000e+01 7.902082956071e-04 0.000000000000e+00 -7.902082793989e-04 -1.620817952607e-11 1.650000000000e+01 7.910201930843e-04 0.000000000000e+00 -7.910201768756e-04 -1.620867952607e-11 1.700000000000e+01 7.916919273886e-04 0.000000000000e+00 -7.916919111794e-04 -1.620917952607e-11 1.750000000000e+01 7.922467283673e-04 0.000000000000e+00 -7.922467121576e-04 -1.620967952607e-11 1.800000000000e+01 7.927042850615e-04 0.000000000000e+00 -7.927042688513e-04 -1.621017952607e-11 1.850000000000e+01 7.930813242335e-04 0.000000000000e+00 -7.930813080228e-04 -1.621067952607e-11 1.900000000000e+01 7.933921096168e-04 0.000000000000e+00 -7.933920934056e-04 -1.621117952607e-11 1.950000000000e+01 7.936488728993e-04 0.000000000000e+00 -7.936488566876e-04 -1.621167952607e-11 2.000000000000e+01 7.938621833673e-04 0.000000000000e+00 -7.938621671551e-04 -1.621217952607e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb1.standard0000644000265600020320000010235612264261473024264 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.718005078477e-14 0.000000000000e+00 2.819491012851e-15 -2.000000000000e-14 3.500000000000e+00 3.997157178815e-09 0.000000000000e+00 -3.997137179351e-09 -2.000000000000e-14 4.000000000000e+00 1.467477166715e-05 0.000000000000e+00 -1.467477164715e-05 -2.000000000000e-14 4.500000000000e+00 9.527700454580e-05 0.000000000000e+00 -9.527700452580e-05 -2.000000000000e-14 5.000000000000e+00 2.483888184849e-04 0.000000000000e+00 -2.483888184649e-04 -2.000000000000e-14 5.500000000000e+00 4.618426642458e-04 0.000000000000e+00 -4.618426642258e-04 -2.000000000000e-14 6.000000000000e+00 7.182803849786e-04 0.000000000000e+00 -7.182803849586e-04 -2.000000000000e-14 6.500000000000e+00 1.000051763472e-03 0.000000000000e+00 -1.000051763452e-03 -2.000000000000e-14 7.000000000000e+00 1.283944242709e-03 0.000000000000e+00 -1.283944242689e-03 -2.000000000000e-14 7.500000000000e+00 1.476529337334e-03 0.000000000000e+00 -1.476529337314e-03 -2.000000000000e-14 8.000000000000e+00 1.577477014622e-03 0.000000000000e+00 -1.577477014602e-03 -2.000000000000e-14 8.500000000000e+00 1.634707527623e-03 0.000000000000e+00 -1.634707527603e-03 -2.000000000000e-14 9.000000000000e+00 1.671078665930e-03 0.000000000000e+00 -1.671078665910e-03 -2.000000000000e-14 9.500000000000e+00 1.696271111932e-03 0.000000000000e+00 -1.696271111912e-03 -2.000000000000e-14 1.000000000000e+01 1.714825230634e-03 0.000000000000e+00 -1.714825230614e-03 -2.000000000000e-14 1.050000000000e+01 1.729115127726e-03 0.000000000000e+00 -1.729115127706e-03 -2.000000000000e-14 1.100000000000e+01 1.740497159350e-03 0.000000000000e+00 -1.740497159330e-03 -2.000000000000e-14 1.150000000000e+01 1.749802309897e-03 0.000000000000e+00 -1.749802309877e-03 -2.000000000000e-14 1.200000000000e+01 1.757568712351e-03 0.000000000000e+00 -1.757568712331e-03 -2.000000000000e-14 1.250000000000e+01 1.764160801507e-03 0.000000000000e+00 -1.764160801487e-03 -2.000000000000e-14 1.300000000000e+01 1.769834596320e-03 0.000000000000e+00 -1.769834596300e-03 -2.000000000000e-14 1.350000000000e+01 1.774775524390e-03 0.000000000000e+00 -1.774775524370e-03 -2.000000000000e-14 1.400000000000e+01 1.779121387175e-03 0.000000000000e+00 -1.779121387155e-03 -2.000000000000e-14 1.450000000000e+01 1.782976867773e-03 0.000000000000e+00 -1.782976867753e-03 -2.000000000000e-14 1.500000000000e+01 1.786423012890e-03 0.000000000000e+00 -1.786423012870e-03 -2.000000000000e-14 1.550000000000e+01 1.789523615083e-03 0.000000000000e+00 -1.789523615063e-03 -2.000000000000e-14 1.600000000000e+01 1.792329620326e-03 0.000000000000e+00 -1.792329620306e-03 -2.000000000000e-14 1.650000000000e+01 1.794882241427e-03 0.000000000000e+00 -1.794882241407e-03 -2.000000000000e-14 1.700000000000e+01 1.797215201741e-03 0.000000000000e+00 -1.797215201721e-03 -2.000000000000e-14 1.750000000000e+01 1.799356381248e-03 0.000000000000e+00 -1.799356381228e-03 -2.000000000000e-14 1.800000000000e+01 1.801329043678e-03 0.000000000000e+00 -1.801329043658e-03 -2.000000000000e-14 1.850000000000e+01 1.803152764623e-03 0.000000000000e+00 -1.803152764603e-03 -2.000000000000e-14 1.900000000000e+01 1.804844142739e-03 0.000000000000e+00 -1.804844142719e-03 -2.000000000000e-14 1.950000000000e+01 1.806417365256e-03 0.000000000000e+00 -1.806417365236e-03 -2.000000000000e-14 2.000000000000e+01 1.807884581277e-03 0.000000000000e+00 -1.807884581257e-03 -2.000000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.718026762521e-14 0.000000000000e+00 2.819491012851e-15 -2.000000000000e-14 3.500000000000e+00 3.997157069528e-09 0.000000000000e+00 -3.997137069476e-09 -2.000000000000e-14 4.000000000000e+00 1.467444418345e-05 0.000000000000e+00 -1.467444416345e-05 -2.000000000000e-14 4.500000000000e+00 9.527050766706e-05 0.000000000000e+00 -9.527050764706e-05 -2.000000000000e-14 5.000000000000e+00 2.483587434599e-04 0.000000000000e+00 -2.483587434399e-04 -2.000000000000e-14 5.500000000000e+00 4.617593765058e-04 0.000000000000e+00 -4.617593764858e-04 -2.000000000000e-14 6.000000000000e+00 7.180917626608e-04 0.000000000000e+00 -7.180917626408e-04 -2.000000000000e-14 6.500000000000e+00 9.996185670430e-04 0.000000000000e+00 -9.996185670230e-04 -2.000000000000e-14 7.000000000000e+00 1.281500626251e-03 0.000000000000e+00 -1.281500626231e-03 -2.000000000000e-14 7.500000000000e+00 1.467424909970e-03 0.000000000000e+00 -1.467424909950e-03 -2.000000000000e-14 8.000000000000e+00 1.563759256045e-03 0.000000000000e+00 -1.563759256025e-03 -2.000000000000e-14 8.500000000000e+00 1.618413550952e-03 0.000000000000e+00 -1.618413550932e-03 -2.000000000000e-14 9.000000000000e+00 1.653250022465e-03 0.000000000000e+00 -1.653250022445e-03 -2.000000000000e-14 9.500000000000e+00 1.677445874949e-03 0.000000000000e+00 -1.677445874929e-03 -2.000000000000e-14 1.000000000000e+01 1.695305743379e-03 0.000000000000e+00 -1.695305743359e-03 -2.000000000000e-14 1.050000000000e+01 1.709085257199e-03 0.000000000000e+00 -1.709085257179e-03 -2.000000000000e-14 1.100000000000e+01 1.720076214280e-03 0.000000000000e+00 -1.720076214260e-03 -2.000000000000e-14 1.150000000000e+01 1.729071845875e-03 0.000000000000e+00 -1.729071845855e-03 -2.000000000000e-14 1.200000000000e+01 1.736586873933e-03 0.000000000000e+00 -1.736586873913e-03 -2.000000000000e-14 1.250000000000e+01 1.742970492284e-03 0.000000000000e+00 -1.742970492264e-03 -2.000000000000e-14 1.300000000000e+01 1.748468388081e-03 0.000000000000e+00 -1.748468388061e-03 -2.000000000000e-14 1.350000000000e+01 1.753258742656e-03 0.000000000000e+00 -1.753258742636e-03 -2.000000000000e-14 1.400000000000e+01 1.757474126266e-03 0.000000000000e+00 -1.757474126246e-03 -2.000000000000e-14 1.450000000000e+01 1.761215350757e-03 0.000000000000e+00 -1.761215350737e-03 -2.000000000000e-14 1.500000000000e+01 1.764560535871e-03 0.000000000000e+00 -1.764560535851e-03 -2.000000000000e-14 1.550000000000e+01 1.767571219339e-03 0.000000000000e+00 -1.767571219319e-03 -2.000000000000e-14 1.600000000000e+01 1.770296581268e-03 0.000000000000e+00 -1.770296581248e-03 -2.000000000000e-14 1.650000000000e+01 1.772776431222e-03 0.000000000000e+00 -1.772776431202e-03 -2.000000000000e-14 1.700000000000e+01 1.775043362888e-03 0.000000000000e+00 -1.775043362868e-03 -2.000000000000e-14 1.750000000000e+01 1.777124336181e-03 0.000000000000e+00 -1.777124336161e-03 -2.000000000000e-14 1.800000000000e+01 1.779041857575e-03 0.000000000000e+00 -1.779041857555e-03 -2.000000000000e-14 1.850000000000e+01 1.780814873465e-03 0.000000000000e+00 -1.780814873445e-03 -2.000000000000e-14 1.900000000000e+01 1.782459472396e-03 0.000000000000e+00 -1.782459472376e-03 -2.000000000000e-14 1.950000000000e+01 1.783989343788e-03 0.000000000000e+00 -1.783989343768e-03 -2.000000000000e-14 2.000000000000e+01 1.785416311033e-03 0.000000000000e+00 -1.785416311013e-03 -2.000000000000e-14 1.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.718048446564e-14 0.000000000000e+00 2.819491012851e-15 -2.000000000000e-14 3.500000000000e+00 3.997156929666e-09 0.000000000000e+00 -3.997136930236e-09 -2.000000000000e-14 4.000000000000e+00 1.467402921035e-05 0.000000000000e+00 -1.467402919035e-05 -2.000000000000e-14 4.500000000000e+00 9.526227558767e-05 0.000000000000e+00 -9.526227556767e-05 -2.000000000000e-14 5.000000000000e+00 2.483206289991e-04 0.000000000000e+00 -2.483206289791e-04 -2.000000000000e-14 5.500000000000e+00 4.616537205099e-04 0.000000000000e+00 -4.616537204899e-04 -2.000000000000e-14 6.000000000000e+00 7.178516211815e-04 0.000000000000e+00 -7.178516211615e-04 -2.000000000000e-14 6.500000000000e+00 9.990611869889e-04 0.000000000000e+00 -9.990611869689e-04 -2.000000000000e-14 7.000000000000e+00 1.278098624779e-03 0.000000000000e+00 -1.278098624759e-03 -2.000000000000e-14 7.500000000000e+00 1.455656890584e-03 0.000000000000e+00 -1.455656890564e-03 -2.000000000000e-14 8.000000000000e+00 1.546476025470e-03 0.000000000000e+00 -1.546476025450e-03 -2.000000000000e-14 8.500000000000e+00 1.598084226307e-03 0.000000000000e+00 -1.598084226287e-03 -2.000000000000e-14 9.000000000000e+00 1.631105956225e-03 0.000000000000e+00 -1.631105956205e-03 -2.000000000000e-14 9.500000000000e+00 1.654120499731e-03 0.000000000000e+00 -1.654120499711e-03 -2.000000000000e-14 1.000000000000e+01 1.671155289263e-03 0.000000000000e+00 -1.671155289243e-03 -2.000000000000e-14 1.050000000000e+01 1.684326775213e-03 0.000000000000e+00 -1.684326775193e-03 -2.000000000000e-14 1.100000000000e+01 1.694850901534e-03 0.000000000000e+00 -1.694850901514e-03 -2.000000000000e-14 1.150000000000e+01 1.703476418896e-03 0.000000000000e+00 -1.703476418876e-03 -2.000000000000e-14 1.200000000000e+01 1.710690420866e-03 0.000000000000e+00 -1.710690420846e-03 -2.000000000000e-14 1.250000000000e+01 1.716824080213e-03 0.000000000000e+00 -1.716824080193e-03 -2.000000000000e-14 1.300000000000e+01 1.722110845873e-03 0.000000000000e+00 -1.722110845853e-03 -2.000000000000e-14 1.350000000000e+01 1.726720301837e-03 0.000000000000e+00 -1.726720301817e-03 -2.000000000000e-14 1.400000000000e+01 1.730778802614e-03 0.000000000000e+00 -1.730778802594e-03 -2.000000000000e-14 1.450000000000e+01 1.734382554032e-03 0.000000000000e+00 -1.734382554012e-03 -2.000000000000e-14 1.500000000000e+01 1.737606189111e-03 0.000000000000e+00 -1.737606189091e-03 -2.000000000000e-14 1.550000000000e+01 1.740508556572e-03 0.000000000000e+00 -1.740508556552e-03 -2.000000000000e-14 1.600000000000e+01 1.743136728519e-03 0.000000000000e+00 -1.743136728499e-03 -2.000000000000e-14 1.650000000000e+01 1.745528837857e-03 0.000000000000e+00 -1.745528837837e-03 -2.000000000000e-14 1.700000000000e+01 1.747716127382e-03 0.000000000000e+00 -1.747716127362e-03 -2.000000000000e-14 1.750000000000e+01 1.749724455913e-03 0.000000000000e+00 -1.749724455893e-03 -2.000000000000e-14 1.800000000000e+01 1.751575423040e-03 0.000000000000e+00 -1.751575423020e-03 -2.000000000000e-14 1.850000000000e+01 1.753287221149e-03 0.000000000000e+00 -1.753287221129e-03 -2.000000000000e-14 1.900000000000e+01 1.754875305328e-03 0.000000000000e+00 -1.754875305308e-03 -2.000000000000e-14 1.950000000000e+01 1.756352833166e-03 0.000000000000e+00 -1.756352833146e-03 -2.000000000000e-14 2.000000000000e+01 1.757731171638e-03 0.000000000000e+00 -1.757731171618e-03 -2.000000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.500000000000e+00 3.475372767348e-12 0.000000000000e+00 -3.455372823834e-12 -2.000000000000e-14 4.000000000000e+00 7.519012437158e-06 0.000000000000e+00 -7.519012417158e-06 -2.000000000000e-14 4.500000000000e+00 9.457375099417e-05 0.000000000000e+00 -9.457375097417e-05 -2.000000000000e-14 5.000000000000e+00 2.833729504781e-04 0.000000000000e+00 -2.833729504581e-04 -2.000000000000e-14 5.500000000000e+00 5.505598660214e-04 0.000000000000e+00 -5.505598660014e-04 -2.000000000000e-14 6.000000000000e+00 8.635573109133e-04 0.000000000000e+00 -8.635573108933e-04 -2.000000000000e-14 6.500000000000e+00 1.192548769603e-03 0.000000000000e+00 -1.192548769583e-03 -2.000000000000e-14 7.000000000000e+00 1.474073099715e-03 0.000000000000e+00 -1.474073099695e-03 -2.000000000000e-14 7.500000000000e+00 1.611035482037e-03 0.000000000000e+00 -1.611035482017e-03 -2.000000000000e-14 8.000000000000e+00 1.676646273216e-03 0.000000000000e+00 -1.676646273196e-03 -2.000000000000e-14 8.500000000000e+00 1.713736127038e-03 0.000000000000e+00 -1.713736127018e-03 -2.000000000000e-14 9.000000000000e+00 1.737516513539e-03 0.000000000000e+00 -1.737516513519e-03 -2.000000000000e-14 9.500000000000e+00 1.754113800973e-03 0.000000000000e+00 -1.754113800953e-03 -2.000000000000e-14 1.000000000000e+01 1.766399483330e-03 0.000000000000e+00 -1.766399483310e-03 -2.000000000000e-14 1.050000000000e+01 1.775889094989e-03 0.000000000000e+00 -1.775889094969e-03 -2.000000000000e-14 1.100000000000e+01 1.783457667548e-03 0.000000000000e+00 -1.783457667528e-03 -2.000000000000e-14 1.150000000000e+01 1.789646373902e-03 0.000000000000e+00 -1.789646373882e-03 -2.000000000000e-14 1.200000000000e+01 1.794808493130e-03 0.000000000000e+00 -1.794808493110e-03 -2.000000000000e-14 1.250000000000e+01 1.799184848270e-03 0.000000000000e+00 -1.799184848250e-03 -2.000000000000e-14 1.300000000000e+01 1.802945517417e-03 0.000000000000e+00 -1.802945517397e-03 -2.000000000000e-14 1.350000000000e+01 1.806214203380e-03 0.000000000000e+00 -1.806214203360e-03 -2.000000000000e-14 1.400000000000e+01 1.809083141068e-03 0.000000000000e+00 -1.809083141048e-03 -2.000000000000e-14 1.450000000000e+01 1.811622577527e-03 0.000000000000e+00 -1.811622577507e-03 -2.000000000000e-14 1.500000000000e+01 1.813887003949e-03 0.000000000000e+00 -1.813887003929e-03 -2.000000000000e-14 1.550000000000e+01 1.815919371616e-03 0.000000000000e+00 -1.815919371596e-03 -2.000000000000e-14 1.600000000000e+01 1.817754016184e-03 0.000000000000e+00 -1.817754016164e-03 -2.000000000000e-14 1.650000000000e+01 1.819418731126e-03 0.000000000000e+00 -1.819418731106e-03 -2.000000000000e-14 1.700000000000e+01 1.820936266816e-03 0.000000000000e+00 -1.820936266796e-03 -2.000000000000e-14 1.750000000000e+01 1.822325433358e-03 0.000000000000e+00 -1.822325433338e-03 -2.000000000000e-14 1.800000000000e+01 1.823601924650e-03 0.000000000000e+00 -1.823601924630e-03 -2.000000000000e-14 1.850000000000e+01 1.824778957052e-03 0.000000000000e+00 -1.824778957032e-03 -2.000000000000e-14 1.900000000000e+01 1.825867688603e-03 0.000000000000e+00 -1.825867688583e-03 -2.000000000000e-14 1.950000000000e+01 1.826877687457e-03 0.000000000000e+00 -1.826877687437e-03 -2.000000000000e-14 2.000000000000e+01 1.827817154997e-03 0.000000000000e+00 -1.827817154977e-03 -2.000000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.500000000000e+00 3.475372984188e-12 0.000000000000e+00 -3.455372823724e-12 -2.000000000000e-14 4.000000000000e+00 7.518880240416e-06 0.000000000000e+00 -7.518880220416e-06 -2.000000000000e-14 4.500000000000e+00 9.456634472376e-05 0.000000000000e+00 -9.456634470376e-05 -2.000000000000e-14 5.000000000000e+00 2.833311342631e-04 0.000000000000e+00 -2.833311342431e-04 -2.000000000000e-14 5.500000000000e+00 5.504377293548e-04 0.000000000000e+00 -5.504377293348e-04 -2.000000000000e-14 6.000000000000e+00 8.632642017509e-04 0.000000000000e+00 -8.632642017309e-04 -2.000000000000e-14 6.500000000000e+00 1.191740336418e-03 0.000000000000e+00 -1.191740336398e-03 -2.000000000000e-14 7.000000000000e+00 1.467137754445e-03 0.000000000000e+00 -1.467137754425e-03 -2.000000000000e-14 7.500000000000e+00 1.597250136398e-03 0.000000000000e+00 -1.597250136378e-03 -2.000000000000e-14 8.000000000000e+00 1.659507029673e-03 0.000000000000e+00 -1.659507029653e-03 -2.000000000000e-14 8.500000000000e+00 1.694861624567e-03 0.000000000000e+00 -1.694861624547e-03 -2.000000000000e-14 9.000000000000e+00 1.717622959903e-03 0.000000000000e+00 -1.717622959883e-03 -2.000000000000e-14 9.500000000000e+00 1.733558828837e-03 0.000000000000e+00 -1.733558828817e-03 -2.000000000000e-14 1.000000000000e+01 1.745382678915e-03 0.000000000000e+00 -1.745382678895e-03 -2.000000000000e-14 1.050000000000e+01 1.754531967591e-03 0.000000000000e+00 -1.754531967571e-03 -2.000000000000e-14 1.100000000000e+01 1.761839321566e-03 0.000000000000e+00 -1.761839321546e-03 -2.000000000000e-14 1.150000000000e+01 1.767821083397e-03 0.000000000000e+00 -1.767821083377e-03 -2.000000000000e-14 1.200000000000e+01 1.772815084006e-03 0.000000000000e+00 -1.772815083986e-03 -2.000000000000e-14 1.250000000000e+01 1.777052052204e-03 0.000000000000e+00 -1.777052052184e-03 -2.000000000000e-14 1.300000000000e+01 1.780695198337e-03 0.000000000000e+00 -1.780695198317e-03 -2.000000000000e-14 1.350000000000e+01 1.783863392341e-03 0.000000000000e+00 -1.783863392321e-03 -2.000000000000e-14 1.400000000000e+01 1.786645369830e-03 0.000000000000e+00 -1.786645369810e-03 -2.000000000000e-14 1.450000000000e+01 1.789108781588e-03 0.000000000000e+00 -1.789108781568e-03 -2.000000000000e-14 1.500000000000e+01 1.791306151535e-03 0.000000000000e+00 -1.791306151515e-03 -2.000000000000e-14 1.550000000000e+01 1.793278912655e-03 0.000000000000e+00 -1.793278912635e-03 -2.000000000000e-14 1.600000000000e+01 1.795060209754e-03 0.000000000000e+00 -1.795060209734e-03 -2.000000000000e-14 1.650000000000e+01 1.796676888845e-03 0.000000000000e+00 -1.796676888825e-03 -2.000000000000e-14 1.700000000000e+01 1.798150936828e-03 0.000000000000e+00 -1.798150936808e-03 -2.000000000000e-14 1.750000000000e+01 1.799500541539e-03 0.000000000000e+00 -1.799500541519e-03 -2.000000000000e-14 1.800000000000e+01 1.800740902297e-03 0.000000000000e+00 -1.800740902277e-03 -2.000000000000e-14 1.850000000000e+01 1.801884755217e-03 0.000000000000e+00 -1.801884755197e-03 -2.000000000000e-14 1.900000000000e+01 1.802942956605e-03 0.000000000000e+00 -1.802942956585e-03 -2.000000000000e-14 1.950000000000e+01 1.803924754171e-03 0.000000000000e+00 -1.803924754151e-03 -2.000000000000e-14 2.000000000000e+01 1.804838092697e-03 0.000000000000e+00 -1.804838092677e-03 -2.000000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.500000000000e+00 3.475372550507e-12 0.000000000000e+00 -3.455372823583e-12 -2.000000000000e-14 4.000000000000e+00 7.518712724667e-06 0.000000000000e+00 -7.518712704667e-06 -2.000000000000e-14 4.500000000000e+00 9.455696076178e-05 0.000000000000e+00 -9.455696074178e-05 -2.000000000000e-14 5.000000000000e+00 2.832781414746e-04 0.000000000000e+00 -2.832781414546e-04 -2.000000000000e-14 5.500000000000e+00 5.502827159407e-04 0.000000000000e+00 -5.502827159207e-04 -2.000000000000e-14 6.000000000000e+00 8.628897384120e-04 0.000000000000e+00 -8.628897383920e-04 -2.000000000000e-14 6.500000000000e+00 1.190686700305e-03 0.000000000000e+00 -1.190686700285e-03 -2.000000000000e-14 7.000000000000e+00 1.457904651187e-03 0.000000000000e+00 -1.457904651167e-03 -2.000000000000e-14 7.500000000000e+00 1.579793091350e-03 0.000000000000e+00 -1.579793091330e-03 -2.000000000000e-14 8.000000000000e+00 1.638117964800e-03 0.000000000000e+00 -1.638117964780e-03 -2.000000000000e-14 8.500000000000e+00 1.671437430372e-03 0.000000000000e+00 -1.671437430352e-03 -2.000000000000e-14 9.000000000000e+00 1.692998608175e-03 0.000000000000e+00 -1.692998608155e-03 -2.000000000000e-14 9.500000000000e+00 1.708152317033e-03 0.000000000000e+00 -1.708152317013e-03 -2.000000000000e-14 1.000000000000e+01 1.719428158643e-03 0.000000000000e+00 -1.719428158623e-03 -2.000000000000e-14 1.050000000000e+01 1.728172500842e-03 0.000000000000e+00 -1.728172500822e-03 -2.000000000000e-14 1.100000000000e+01 1.735168334477e-03 0.000000000000e+00 -1.735168334457e-03 -2.000000000000e-14 1.150000000000e+01 1.740902846577e-03 0.000000000000e+00 -1.740902846557e-03 -2.000000000000e-14 1.200000000000e+01 1.745695678543e-03 0.000000000000e+00 -1.745695678523e-03 -2.000000000000e-14 1.250000000000e+01 1.749765644607e-03 0.000000000000e+00 -1.749765644587e-03 -2.000000000000e-14 1.300000000000e+01 1.753267831481e-03 0.000000000000e+00 -1.753267831461e-03 -2.000000000000e-14 1.350000000000e+01 1.756315381715e-03 0.000000000000e+00 -1.756315381695e-03 -2.000000000000e-14 1.400000000000e+01 1.758992877059e-03 0.000000000000e+00 -1.758992877039e-03 -2.000000000000e-14 1.450000000000e+01 1.761364881871e-03 0.000000000000e+00 -1.761364881851e-03 -2.000000000000e-14 1.500000000000e+01 1.763481578323e-03 0.000000000000e+00 -1.763481578303e-03 -2.000000000000e-14 1.550000000000e+01 1.765382589986e-03 0.000000000000e+00 -1.765382589966e-03 -2.000000000000e-14 1.600000000000e+01 1.767099640991e-03 0.000000000000e+00 -1.767099640971e-03 -2.000000000000e-14 1.650000000000e+01 1.768658445969e-03 0.000000000000e+00 -1.768658445949e-03 -2.000000000000e-14 1.700000000000e+01 1.770080079364e-03 0.000000000000e+00 -1.770080079344e-03 -2.000000000000e-14 1.750000000000e+01 1.771381984727e-03 0.000000000000e+00 -1.771381984707e-03 -2.000000000000e-14 1.800000000000e+01 1.772578746804e-03 0.000000000000e+00 -1.772578746784e-03 -2.000000000000e-14 1.850000000000e+01 1.773682594381e-03 0.000000000000e+00 -1.773682594361e-03 -2.000000000000e-14 1.900000000000e+01 1.774703954256e-03 0.000000000000e+00 -1.774703954236e-03 -2.000000000000e-14 1.950000000000e+01 1.775651712523e-03 0.000000000000e+00 -1.775651712503e-03 -2.000000000000e-14 2.000000000000e+01 1.776533506149e-03 0.000000000000e+00 -1.776533506129e-03 -2.000000000000e-14 1.000000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499993705634e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.611926737921e-14 0.000000000000e+00 3.880682626561e-15 -2.000000000000e-14 3.000000000000e+00 8.115775347768e-11 0.000000000000e+00 -8.113775404345e-11 -2.000000000000e-14 3.500000000000e+00 1.010585535657e-06 0.000000000000e+00 -1.010585515657e-06 -2.000000000000e-14 4.000000000000e+00 2.666454243662e-05 0.000000000000e+00 -2.666454241662e-05 -2.000000000000e-14 4.500000000000e+00 9.767112681306e-05 0.000000000000e+00 -9.767112679306e-05 -2.000000000000e-14 5.000000000000e+00 2.138326258769e-04 0.000000000000e+00 -2.138326258569e-04 -2.000000000000e-14 5.500000000000e+00 3.698651709292e-04 0.000000000000e+00 -3.698651709092e-04 -2.000000000000e-14 6.000000000000e+00 5.585446959944e-04 0.000000000000e+00 -5.585446959744e-04 -2.000000000000e-14 6.500000000000e+00 7.720326301347e-04 0.000000000000e+00 -7.720326301147e-04 -2.000000000000e-14 7.000000000000e+00 1.002020421151e-03 0.000000000000e+00 -1.002020421131e-03 -2.000000000000e-14 7.500000000000e+00 1.219334161815e-03 0.000000000000e+00 -1.219334161795e-03 -2.000000000000e-14 8.000000000000e+00 1.375309914308e-03 0.000000000000e+00 -1.375309914288e-03 -2.000000000000e-14 8.500000000000e+00 1.473783850895e-03 0.000000000000e+00 -1.473783850875e-03 -2.000000000000e-14 9.000000000000e+00 1.537312353427e-03 0.000000000000e+00 -1.537312353407e-03 -2.000000000000e-14 9.500000000000e+00 1.580978221713e-03 0.000000000000e+00 -1.580978221693e-03 -2.000000000000e-14 1.000000000000e+01 1.612796910546e-03 0.000000000000e+00 -1.612796910526e-03 -2.000000000000e-14 1.050000000000e+01 1.637079503453e-03 0.000000000000e+00 -1.637079503433e-03 -2.000000000000e-14 1.100000000000e+01 1.656286082364e-03 0.000000000000e+00 -1.656286082344e-03 -2.000000000000e-14 1.150000000000e+01 1.671908858764e-03 0.000000000000e+00 -1.671908858744e-03 -2.000000000000e-14 1.200000000000e+01 1.684902595679e-03 0.000000000000e+00 -1.684902595659e-03 -2.000000000000e-14 1.250000000000e+01 1.695906352005e-03 0.000000000000e+00 -1.695906351985e-03 -2.000000000000e-14 1.300000000000e+01 1.705364339797e-03 0.000000000000e+00 -1.705364339777e-03 -2.000000000000e-14 1.350000000000e+01 1.713595314050e-03 0.000000000000e+00 -1.713595314030e-03 -2.000000000000e-14 1.400000000000e+01 1.720834267548e-03 0.000000000000e+00 -1.720834267528e-03 -2.000000000000e-14 1.450000000000e+01 1.727258496697e-03 0.000000000000e+00 -1.727258496677e-03 -2.000000000000e-14 1.500000000000e+01 1.733004468347e-03 0.000000000000e+00 -1.733004468327e-03 -2.000000000000e-14 1.550000000000e+01 1.738179067827e-03 0.000000000000e+00 -1.738179067807e-03 -2.000000000000e-14 1.600000000000e+01 1.742867301061e-03 0.000000000000e+00 -1.742867301041e-03 -2.000000000000e-14 1.650000000000e+01 1.747137693341e-03 0.000000000000e+00 -1.747137693321e-03 -2.000000000000e-14 1.700000000000e+01 1.751046152987e-03 0.000000000000e+00 -1.751046152967e-03 -2.000000000000e-14 1.750000000000e+01 1.754638788160e-03 0.000000000000e+00 -1.754638788140e-03 -2.000000000000e-14 1.800000000000e+01 1.757953994966e-03 0.000000000000e+00 -1.757953994946e-03 -2.000000000000e-14 1.850000000000e+01 1.761024028812e-03 0.000000000000e+00 -1.761024028792e-03 -2.000000000000e-14 1.900000000000e+01 1.763876203099e-03 0.000000000000e+00 -1.763876203079e-03 -2.000000000000e-14 1.950000000000e+01 1.766533815053e-03 0.000000000000e+00 -1.766533815033e-03 -2.000000000000e-14 2.000000000000e+01 1.769016868933e-03 0.000000000000e+00 -1.769016868913e-03 -2.000000000000e-14 1.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.611948421965e-14 0.000000000000e+00 3.880682626561e-15 -2.000000000000e-14 3.000000000000e+00 8.115775369452e-11 0.000000000000e+00 -8.113775401120e-11 -2.000000000000e-14 3.500000000000e+00 1.010582406537e-06 0.000000000000e+00 -1.010582386537e-06 -2.000000000000e-14 4.000000000000e+00 2.666385028714e-05 0.000000000000e+00 -2.666385026714e-05 -2.000000000000e-14 4.500000000000e+00 9.766552744654e-05 0.000000000000e+00 -9.766552742654e-05 -2.000000000000e-14 5.000000000000e+00 2.138126188170e-04 0.000000000000e+00 -2.138126187970e-04 -2.000000000000e-14 5.500000000000e+00 3.698151598274e-04 0.000000000000e+00 -3.698151598074e-04 -2.000000000000e-14 6.000000000000e+00 5.584394819451e-04 0.000000000000e+00 -5.584394819252e-04 -2.000000000000e-14 6.500000000000e+00 7.718228770118e-04 0.000000000000e+00 -7.718228769918e-04 -2.000000000000e-14 7.000000000000e+00 1.001527168423e-03 0.000000000000e+00 -1.001527168403e-03 -2.000000000000e-14 7.500000000000e+00 1.216274859969e-03 0.000000000000e+00 -1.216274859949e-03 -2.000000000000e-14 8.000000000000e+00 1.367794222888e-03 0.000000000000e+00 -1.367794222868e-03 -2.000000000000e-14 8.500000000000e+00 1.462571929556e-03 0.000000000000e+00 -1.462571929536e-03 -2.000000000000e-14 9.000000000000e+00 1.523608537543e-03 0.000000000000e+00 -1.523608537523e-03 -2.000000000000e-14 9.500000000000e+00 1.565600113782e-03 0.000000000000e+00 -1.565600113762e-03 -2.000000000000e-14 1.000000000000e+01 1.596244612423e-03 0.000000000000e+00 -1.596244612403e-03 -2.000000000000e-14 1.050000000000e+01 1.619665408117e-03 0.000000000000e+00 -1.619665408097e-03 -2.000000000000e-14 1.100000000000e+01 1.638214193718e-03 0.000000000000e+00 -1.638214193698e-03 -2.000000000000e-14 1.150000000000e+01 1.653318443602e-03 0.000000000000e+00 -1.653318443582e-03 -2.000000000000e-14 1.200000000000e+01 1.665892532947e-03 0.000000000000e+00 -1.665892532927e-03 -2.000000000000e-14 1.250000000000e+01 1.676549239353e-03 0.000000000000e+00 -1.676549239333e-03 -2.000000000000e-14 1.300000000000e+01 1.685715018308e-03 0.000000000000e+00 -1.685715018288e-03 -2.000000000000e-14 1.350000000000e+01 1.693696227472e-03 0.000000000000e+00 -1.693696227452e-03 -2.000000000000e-14 1.400000000000e+01 1.700718953512e-03 0.000000000000e+00 -1.700718953492e-03 -2.000000000000e-14 1.450000000000e+01 1.706953933917e-03 0.000000000000e+00 -1.706953933897e-03 -2.000000000000e-14 1.500000000000e+01 1.712532699257e-03 0.000000000000e+00 -1.712532699237e-03 -2.000000000000e-14 1.550000000000e+01 1.717558348283e-03 0.000000000000e+00 -1.717558348263e-03 -2.000000000000e-14 1.600000000000e+01 1.722112932945e-03 0.000000000000e+00 -1.722112932925e-03 -2.000000000000e-14 1.650000000000e+01 1.726262639365e-03 0.000000000000e+00 -1.726262639345e-03 -2.000000000000e-14 1.700000000000e+01 1.730061498630e-03 0.000000000000e+00 -1.730061498610e-03 -2.000000000000e-14 1.750000000000e+01 1.733554094227e-03 0.000000000000e+00 -1.733554094207e-03 -2.000000000000e-14 1.800000000000e+01 1.736777570482e-03 0.000000000000e+00 -1.736777570462e-03 -2.000000000000e-14 1.850000000000e+01 1.739763144969e-03 0.000000000000e+00 -1.739763144949e-03 -2.000000000000e-14 1.900000000000e+01 1.742537262950e-03 0.000000000000e+00 -1.742537262930e-03 -2.000000000000e-14 1.950000000000e+01 1.745122489543e-03 0.000000000000e+00 -1.745122489523e-03 -2.000000000000e-14 2.000000000000e+01 1.747538207009e-03 0.000000000000e+00 -1.747538206989e-03 -2.000000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.611883369834e-14 0.000000000000e+00 3.880682626561e-15 -2.000000000000e-14 3.000000000000e+00 8.115775347768e-11 0.000000000000e+00 -8.113775397476e-11 -2.000000000000e-14 3.500000000000e+00 1.010578461868e-06 0.000000000000e+00 -1.010578441869e-06 -2.000000000000e-14 4.000000000000e+00 2.666297322634e-05 0.000000000000e+00 -2.666297320634e-05 -2.000000000000e-14 4.500000000000e+00 9.765843220594e-05 0.000000000000e+00 -9.765843218594e-05 -2.000000000000e-14 5.000000000000e+00 2.137872624312e-04 0.000000000000e+00 -2.137872624112e-04 -2.000000000000e-14 5.500000000000e+00 3.697517370871e-04 0.000000000000e+00 -3.697517370671e-04 -2.000000000000e-14 6.000000000000e+00 5.583058128383e-04 0.000000000000e+00 -5.583058128183e-04 -2.000000000000e-14 6.500000000000e+00 7.715551868061e-04 0.000000000000e+00 -7.715551867861e-04 -2.000000000000e-14 7.000000000000e+00 1.000868497934e-03 0.000000000000e+00 -1.000868497914e-03 -2.000000000000e-14 7.500000000000e+00 1.212184206529e-03 0.000000000000e+00 -1.212184206509e-03 -2.000000000000e-14 8.000000000000e+00 1.358094791865e-03 0.000000000000e+00 -1.358094791845e-03 -2.000000000000e-14 8.500000000000e+00 1.448384470054e-03 0.000000000000e+00 -1.448384470034e-03 -2.000000000000e-14 9.000000000000e+00 1.506436159182e-03 0.000000000000e+00 -1.506436159162e-03 -2.000000000000e-14 9.500000000000e+00 1.546429422787e-03 0.000000000000e+00 -1.546429422767e-03 -2.000000000000e-14 1.000000000000e+01 1.575672738510e-03 0.000000000000e+00 -1.575672738490e-03 -2.000000000000e-14 1.050000000000e+01 1.598064167336e-03 0.000000000000e+00 -1.598064167316e-03 -2.000000000000e-14 1.100000000000e+01 1.615826275790e-03 0.000000000000e+00 -1.615826275770e-03 -2.000000000000e-14 1.150000000000e+01 1.630309617072e-03 0.000000000000e+00 -1.630309617052e-03 -2.000000000000e-14 1.200000000000e+01 1.642380605503e-03 0.000000000000e+00 -1.642380605483e-03 -2.000000000000e-14 1.250000000000e+01 1.652620800207e-03 0.000000000000e+00 -1.652620800187e-03 -2.000000000000e-14 1.300000000000e+01 1.661435549576e-03 0.000000000000e+00 -1.661435549556e-03 -2.000000000000e-14 1.350000000000e+01 1.669116461745e-03 0.000000000000e+00 -1.669116461725e-03 -2.000000000000e-14 1.400000000000e+01 1.675879017543e-03 0.000000000000e+00 -1.675879017523e-03 -2.000000000000e-14 1.450000000000e+01 1.681886136438e-03 0.000000000000e+00 -1.681886136418e-03 -2.000000000000e-14 1.500000000000e+01 1.687263459731e-03 0.000000000000e+00 -1.687263459711e-03 -2.000000000000e-14 1.550000000000e+01 1.692109564625e-03 0.000000000000e+00 -1.692109564605e-03 -2.000000000000e-14 1.600000000000e+01 1.696502972821e-03 0.000000000000e+00 -1.696502972801e-03 -2.000000000000e-14 1.650000000000e+01 1.700507072755e-03 0.000000000000e+00 -1.700507072735e-03 -2.000000000000e-14 1.700000000000e+01 1.704173648688e-03 0.000000000000e+00 -1.704173648668e-03 -2.000000000000e-14 1.750000000000e+01 1.707545458003e-03 0.000000000000e+00 -1.707545457983e-03 -2.000000000000e-14 1.800000000000e+01 1.710658144811e-03 0.000000000000e+00 -1.710658144791e-03 -2.000000000000e-14 1.850000000000e+01 1.713541682135e-03 0.000000000000e+00 -1.713541682115e-03 -2.000000000000e-14 1.900000000000e+01 1.716221473604e-03 0.000000000000e+00 -1.716221473584e-03 -2.000000000000e-14 1.950000000000e+01 1.718719205457e-03 0.000000000000e+00 -1.718719205437e-03 -2.000000000000e-14 2.000000000000e+01 1.721053512896e-03 0.000000000000e+00 -1.721053512876e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Ig1_vb1.standard0000644000265600020320000010235612264261473023736 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 1.500000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 3.000000000000e+00 7.987317404701e-15 0.000000000000e+00 4.012606216450e-15 -1.200000000000e-14 3.500000000000e+00 1.803154783906e-09 0.000000000000e+00 -1.803142784360e-09 -1.200000000000e-14 4.000000000000e+00 1.219183968711e-05 0.000000000000e+00 -1.219183967511e-05 -1.200000000000e-14 4.500000000000e+00 8.744682728136e-05 0.000000000000e+00 -8.744682726936e-05 -1.200000000000e-14 5.000000000000e+00 2.348896352177e-04 0.000000000000e+00 -2.348896352057e-04 -1.200000000000e-14 5.500000000000e+00 4.382521732482e-04 0.000000000000e+00 -4.382521732362e-04 -1.200000000000e-14 6.000000000000e+00 6.276941940996e-04 0.000000000000e+00 -6.276941940876e-04 -1.200000000000e-14 6.500000000000e+00 7.743784299737e-04 0.000000000000e+00 -7.743784299617e-04 -1.200000000000e-14 7.000000000000e+00 8.843641313797e-04 0.000000000000e+00 -8.843641313677e-04 -1.200000000000e-14 7.500000000000e+00 9.674302370807e-04 0.000000000000e+00 -9.674302370687e-04 -1.200000000000e-14 8.000000000000e+00 1.031464801816e-03 0.000000000000e+00 -1.031464801804e-03 -1.200000000000e-14 8.500000000000e+00 1.081991531172e-03 0.000000000000e+00 -1.081991531160e-03 -1.200000000000e-14 9.000000000000e+00 1.122750696454e-03 0.000000000000e+00 -1.122750696442e-03 -1.200000000000e-14 9.500000000000e+00 1.156283457824e-03 0.000000000000e+00 -1.156283457812e-03 -1.200000000000e-14 1.000000000000e+01 1.184346256661e-03 0.000000000000e+00 -1.184346256649e-03 -1.200000000000e-14 1.050000000000e+01 1.208179798981e-03 0.000000000000e+00 -1.208179798969e-03 -1.200000000000e-14 1.100000000000e+01 1.228680256958e-03 0.000000000000e+00 -1.228680256946e-03 -1.200000000000e-14 1.150000000000e+01 1.246508851039e-03 0.000000000000e+00 -1.246508851027e-03 -1.200000000000e-14 1.200000000000e+01 1.262163108477e-03 0.000000000000e+00 -1.262163108465e-03 -1.200000000000e-14 1.250000000000e+01 1.276024117938e-03 0.000000000000e+00 -1.276024117926e-03 -1.200000000000e-14 1.300000000000e+01 1.288388514952e-03 0.000000000000e+00 -1.288388514940e-03 -1.200000000000e-14 1.350000000000e+01 1.299490570791e-03 0.000000000000e+00 -1.299490570779e-03 -1.200000000000e-14 1.400000000000e+01 1.309517739954e-03 0.000000000000e+00 -1.309517739942e-03 -1.200000000000e-14 1.450000000000e+01 1.318621799637e-03 0.000000000000e+00 -1.318621799625e-03 -1.200000000000e-14 1.500000000000e+01 1.326926963393e-03 0.000000000000e+00 -1.326926963381e-03 -1.200000000000e-14 1.550000000000e+01 1.334535881289e-03 0.000000000000e+00 -1.334535881277e-03 -1.200000000000e-14 1.600000000000e+01 1.341534139599e-03 0.000000000000e+00 -1.341534139587e-03 -1.200000000000e-14 1.650000000000e+01 1.347993679025e-03 0.000000000000e+00 -1.347993679013e-03 -1.200000000000e-14 1.700000000000e+01 1.353975422391e-03 0.000000000000e+00 -1.353975422379e-03 -1.200000000000e-14 1.750000000000e+01 1.359531316923e-03 0.000000000000e+00 -1.359531316911e-03 -1.200000000000e-14 1.800000000000e+01 1.364705937721e-03 0.000000000000e+00 -1.364705937709e-03 -1.200000000000e-14 1.850000000000e+01 1.369537758607e-03 0.000000000000e+00 -1.369537758595e-03 -1.200000000000e-14 1.900000000000e+01 1.374060168169e-03 0.000000000000e+00 -1.374060168157e-03 -1.200000000000e-14 1.950000000000e+01 1.378302288730e-03 0.000000000000e+00 -1.378302288718e-03 -1.200000000000e-14 2.000000000000e+01 1.382289653239e-03 0.000000000000e+00 -1.382289653227e-03 -1.200000000000e-14 1.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 1.500000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.500000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 3.000000000000e+00 1.133164742595e-14 0.000000000000e+00 3.668184743063e-15 -1.500000000000e-14 3.500000000000e+00 2.436217720614e-09 0.000000000000e+00 -2.436202720987e-09 -1.500000000000e-14 4.000000000000e+00 1.312185510289e-05 0.000000000000e+00 -1.312185508789e-05 -1.500000000000e-14 4.500000000000e+00 9.065750952020e-05 0.000000000000e+00 -9.065750950520e-05 -1.500000000000e-14 5.000000000000e+00 2.411322147607e-04 0.000000000000e+00 -2.411322147457e-04 -1.500000000000e-14 5.500000000000e+00 4.534286866366e-04 0.000000000000e+00 -4.534286866216e-04 -1.500000000000e-14 6.000000000000e+00 7.108469746587e-04 0.000000000000e+00 -7.108469746437e-04 -1.500000000000e-14 6.500000000000e+00 9.969805179426e-04 0.000000000000e+00 -9.969805179276e-04 -1.500000000000e-14 7.000000000000e+00 1.284799762506e-03 0.000000000000e+00 -1.284799762491e-03 -1.500000000000e-14 7.500000000000e+00 1.536290737080e-03 0.000000000000e+00 -1.536290737065e-03 -1.500000000000e-14 8.000000000000e+00 1.743147690881e-03 0.000000000000e+00 -1.743147690866e-03 -1.500000000000e-14 8.500000000000e+00 1.907614651485e-03 0.000000000000e+00 -1.907614651470e-03 -1.500000000000e-14 9.000000000000e+00 2.036423881456e-03 0.000000000000e+00 -2.036423881441e-03 -1.500000000000e-14 9.500000000000e+00 2.137297837993e-03 0.000000000000e+00 -2.137297837978e-03 -1.500000000000e-14 1.000000000000e+01 2.217062753236e-03 0.000000000000e+00 -2.217062753221e-03 -1.500000000000e-14 1.050000000000e+01 2.281062133149e-03 0.000000000000e+00 -2.281062133134e-03 -1.500000000000e-14 1.100000000000e+01 2.333247591902e-03 0.000000000000e+00 -2.333247591887e-03 -1.500000000000e-14 1.150000000000e+01 2.376479720679e-03 0.000000000000e+00 -2.376479720664e-03 -1.500000000000e-14 1.200000000000e+01 2.412825092033e-03 0.000000000000e+00 -2.412825092018e-03 -1.500000000000e-14 1.250000000000e+01 2.443788701834e-03 0.000000000000e+00 -2.443788701819e-03 -1.500000000000e-14 1.300000000000e+01 2.470480717563e-03 0.000000000000e+00 -2.470480717548e-03 -1.500000000000e-14 1.350000000000e+01 2.493732224251e-03 0.000000000000e+00 -2.493732224236e-03 -1.500000000000e-14 1.400000000000e+01 2.514174869968e-03 0.000000000000e+00 -2.514174869953e-03 -1.500000000000e-14 1.450000000000e+01 2.532295851043e-03 0.000000000000e+00 -2.532295851028e-03 -1.500000000000e-14 1.500000000000e+01 2.548476227763e-03 0.000000000000e+00 -2.548476227748e-03 -1.500000000000e-14 1.550000000000e+01 2.563017952359e-03 0.000000000000e+00 -2.563017952344e-03 -1.500000000000e-14 1.600000000000e+01 2.576163192380e-03 0.000000000000e+00 -2.576163192365e-03 -1.500000000000e-14 1.650000000000e+01 2.588108336416e-03 0.000000000000e+00 -2.588108336401e-03 -1.500000000000e-14 1.700000000000e+01 2.599014283320e-03 0.000000000000e+00 -2.599014283305e-03 -1.500000000000e-14 1.750000000000e+01 2.609014099852e-03 0.000000000000e+00 -2.609014099837e-03 -1.500000000000e-14 1.800000000000e+01 2.618218790570e-03 0.000000000000e+00 -2.618218790555e-03 -1.500000000000e-14 1.850000000000e+01 2.626721696277e-03 0.000000000000e+00 -2.626721696262e-03 -1.500000000000e-14 1.900000000000e+01 2.634601883922e-03 0.000000000000e+00 -2.634601883907e-03 -1.500000000000e-14 1.950000000000e+01 2.641926786171e-03 0.000000000000e+00 -2.641926786156e-03 -1.500000000000e-14 2.000000000000e+01 2.648754276585e-03 0.000000000000e+00 -2.648754276570e-03 -1.500000000000e-14 1.000000000000e+00 1.500102125851e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.718070130607e-14 0.000000000000e+00 2.819491012850e-15 -2.000000000000e-14 3.500000000000e+00 3.997161789927e-09 0.000000000000e+00 -3.997141789047e-09 -2.000000000000e-14 4.000000000000e+00 1.468852706066e-05 0.000000000000e+00 -1.468852704066e-05 -2.000000000000e-14 4.500000000000e+00 9.555020456655e-05 0.000000000000e+00 -9.555020454655e-05 -2.000000000000e-14 5.000000000000e+00 2.496495468476e-04 0.000000000000e+00 -2.496495468276e-04 -2.000000000000e-14 5.500000000000e+00 4.652783928077e-04 0.000000000000e+00 -4.652783927877e-04 -2.000000000000e-14 6.000000000000e+00 7.256663795579e-04 0.000000000000e+00 -7.256663795379e-04 -2.000000000000e-14 6.500000000000e+00 1.014845178518e-03 0.000000000000e+00 -1.014845178498e-03 -2.000000000000e-14 7.000000000000e+00 1.320164316418e-03 0.000000000000e+00 -1.320164316398e-03 -2.000000000000e-14 7.500000000000e+00 1.632462447707e-03 0.000000000000e+00 -1.632462447687e-03 -2.000000000000e-14 8.000000000000e+00 1.944846411692e-03 0.000000000000e+00 -1.944846411672e-03 -2.000000000000e-14 8.500000000000e+00 2.241888928391e-03 0.000000000000e+00 -2.241888928371e-03 -2.000000000000e-14 9.000000000000e+00 2.509068979543e-03 0.000000000000e+00 -2.509068979523e-03 -2.000000000000e-14 9.500000000000e+00 2.740341307025e-03 0.000000000000e+00 -2.740341307005e-03 -2.000000000000e-14 1.000000000000e+01 2.933689618563e-03 0.000000000000e+00 -2.933689618543e-03 -2.000000000000e-14 1.050000000000e+01 3.090981775736e-03 0.000000000000e+00 -3.090981775716e-03 -2.000000000000e-14 1.100000000000e+01 3.216899210769e-03 0.000000000000e+00 -3.216899210749e-03 -2.000000000000e-14 1.150000000000e+01 3.317252687973e-03 0.000000000000e+00 -3.317252687953e-03 -2.000000000000e-14 1.200000000000e+01 3.397605901715e-03 0.000000000000e+00 -3.397605901695e-03 -2.000000000000e-14 1.250000000000e+01 3.462607824997e-03 0.000000000000e+00 -3.462607824977e-03 -2.000000000000e-14 1.300000000000e+01 3.515872821248e-03 0.000000000000e+00 -3.515872821228e-03 -2.000000000000e-14 1.350000000000e+01 3.560116198073e-03 0.000000000000e+00 -3.560116198053e-03 -2.000000000000e-14 1.400000000000e+01 3.597353130971e-03 0.000000000000e+00 -3.597353130951e-03 -2.000000000000e-14 1.450000000000e+01 3.629079882740e-03 0.000000000000e+00 -3.629079882720e-03 -2.000000000000e-14 1.500000000000e+01 3.656415530799e-03 0.000000000000e+00 -3.656415530779e-03 -2.000000000000e-14 1.550000000000e+01 3.680206060552e-03 0.000000000000e+00 -3.680206060532e-03 -2.000000000000e-14 1.600000000000e+01 3.701098859281e-03 0.000000000000e+00 -3.701098859261e-03 -2.000000000000e-14 1.650000000000e+01 3.719595617312e-03 0.000000000000e+00 -3.719595617292e-03 -2.000000000000e-14 1.700000000000e+01 3.736089964518e-03 0.000000000000e+00 -3.736089964498e-03 -2.000000000000e-14 1.750000000000e+01 3.750894433347e-03 0.000000000000e+00 -3.750894433327e-03 -2.000000000000e-14 1.800000000000e+01 3.764259961675e-03 0.000000000000e+00 -3.764259961655e-03 -2.000000000000e-14 1.850000000000e+01 3.776390153796e-03 0.000000000000e+00 -3.776390153776e-03 -2.000000000000e-14 1.900000000000e+01 3.787451827403e-03 0.000000000000e+00 -3.787451827383e-03 -2.000000000000e-14 1.950000000000e+01 3.797582902794e-03 0.000000000000e+00 -3.797582902774e-03 -2.000000000000e-14 2.000000000000e+01 3.806898369818e-03 0.000000000000e+00 -3.806898369798e-03 -2.000000000000e-14 1.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 1.500000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 3.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 3.500000000000e+00 1.196695737296e-12 0.000000000000e+00 -1.184695887159e-12 -1.200000000000e-14 4.000000000000e+00 5.637179858651e-06 0.000000000000e+00 -5.637179846651e-06 -1.200000000000e-14 4.500000000000e+00 8.570328471999e-05 0.000000000000e+00 -8.570328470799e-05 -1.200000000000e-14 5.000000000000e+00 2.674516708079e-04 0.000000000000e+00 -2.674516707959e-04 -1.200000000000e-14 5.500000000000e+00 5.256408837115e-04 0.000000000000e+00 -5.256408836995e-04 -1.200000000000e-14 6.000000000000e+00 7.541096178852e-04 0.000000000000e+00 -7.541096178732e-04 -1.200000000000e-14 6.500000000000e+00 9.158693706240e-04 0.000000000000e+00 -9.158693706120e-04 -1.200000000000e-14 7.000000000000e+00 1.028168159134e-03 0.000000000000e+00 -1.028168159122e-03 -1.200000000000e-14 7.500000000000e+00 1.107725009043e-03 0.000000000000e+00 -1.107725009031e-03 -1.200000000000e-14 8.000000000000e+00 1.165988888107e-03 0.000000000000e+00 -1.165988888095e-03 -1.200000000000e-14 8.500000000000e+00 1.210130076315e-03 0.000000000000e+00 -1.210130076303e-03 -1.200000000000e-14 9.000000000000e+00 1.244597593806e-03 0.000000000000e+00 -1.244597593794e-03 -1.200000000000e-14 9.500000000000e+00 1.272211881812e-03 0.000000000000e+00 -1.272211881800e-03 -1.200000000000e-14 1.000000000000e+01 1.294817659704e-03 0.000000000000e+00 -1.294817659692e-03 -1.200000000000e-14 1.050000000000e+01 1.313661269755e-03 0.000000000000e+00 -1.313661269743e-03 -1.200000000000e-14 1.100000000000e+01 1.329610772323e-03 0.000000000000e+00 -1.329610772311e-03 -1.200000000000e-14 1.150000000000e+01 1.343287557098e-03 0.000000000000e+00 -1.343287557086e-03 -1.200000000000e-14 1.200000000000e+01 1.355147388098e-03 0.000000000000e+00 -1.355147388086e-03 -1.200000000000e-14 1.250000000000e+01 1.365531807657e-03 0.000000000000e+00 -1.365531807645e-03 -1.200000000000e-14 1.300000000000e+01 1.374701665898e-03 0.000000000000e+00 -1.374701665886e-03 -1.200000000000e-14 1.350000000000e+01 1.382859563176e-03 0.000000000000e+00 -1.382859563164e-03 -1.200000000000e-14 1.400000000000e+01 1.390165229208e-03 0.000000000000e+00 -1.390165229196e-03 -1.200000000000e-14 1.450000000000e+01 1.396746289169e-03 0.000000000000e+00 -1.396746289157e-03 -1.200000000000e-14 1.500000000000e+01 1.402705947518e-03 0.000000000000e+00 -1.402705947506e-03 -1.200000000000e-14 1.550000000000e+01 1.408128568889e-03 0.000000000000e+00 -1.408128568877e-03 -1.200000000000e-14 1.600000000000e+01 1.413083796602e-03 0.000000000000e+00 -1.413083796590e-03 -1.200000000000e-14 1.650000000000e+01 1.417629636335e-03 0.000000000000e+00 -1.417629636323e-03 -1.200000000000e-14 1.700000000000e+01 1.421814795739e-03 0.000000000000e+00 -1.421814795727e-03 -1.200000000000e-14 1.750000000000e+01 1.425680481162e-03 0.000000000000e+00 -1.425680481150e-03 -1.200000000000e-14 1.800000000000e+01 1.429261792911e-03 0.000000000000e+00 -1.429261792899e-03 -1.200000000000e-14 1.850000000000e+01 1.432588819919e-03 0.000000000000e+00 -1.432588819907e-03 -1.200000000000e-14 1.900000000000e+01 1.435687520870e-03 0.000000000000e+00 -1.435687520858e-03 -1.200000000000e-14 1.950000000000e+01 1.438580357454e-03 0.000000000000e+00 -1.438580357442e-03 -1.200000000000e-14 2.000000000000e+01 1.441286946959e-03 0.000000000000e+00 -1.441286946947e-03 -1.200000000000e-14 1.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 1.500000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.500000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 3.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 3.500000000000e+00 1.789267952551e-12 0.000000000000e+00 -1.774268324817e-12 -1.500000000000e-14 4.000000000000e+00 6.318162012216e-06 0.000000000000e+00 -6.318161997215e-06 -1.500000000000e-14 4.500000000000e+00 8.929484652690e-05 0.000000000000e+00 -8.929484651190e-05 -1.500000000000e-14 5.000000000000e+00 2.748604948454e-04 0.000000000000e+00 -2.748604948304e-04 -1.500000000000e-14 5.500000000000e+00 5.415750572895e-04 0.000000000000e+00 -5.415750572745e-04 -1.500000000000e-14 6.000000000000e+00 8.577372684497e-04 0.000000000000e+00 -8.577372684347e-04 -1.500000000000e-14 6.500000000000e+00 1.196533052793e-03 0.000000000000e+00 -1.196533052778e-03 -1.500000000000e-14 7.000000000000e+00 1.519963381447e-03 0.000000000000e+00 -1.519963381432e-03 -1.500000000000e-14 7.500000000000e+00 1.787188581243e-03 0.000000000000e+00 -1.787188581228e-03 -1.500000000000e-14 8.000000000000e+00 1.996214134109e-03 0.000000000000e+00 -1.996214134094e-03 -1.500000000000e-14 8.500000000000e+00 2.153393808731e-03 0.000000000000e+00 -2.153393808716e-03 -1.500000000000e-14 9.000000000000e+00 2.269640192500e-03 0.000000000000e+00 -2.269640192485e-03 -1.500000000000e-14 9.500000000000e+00 2.356089233828e-03 0.000000000000e+00 -2.356089233813e-03 -1.500000000000e-14 1.000000000000e+01 2.421595926711e-03 0.000000000000e+00 -2.421595926696e-03 -1.500000000000e-14 1.050000000000e+01 2.472414342342e-03 0.000000000000e+00 -2.472414342327e-03 -1.500000000000e-14 1.100000000000e+01 2.512773026482e-03 0.000000000000e+00 -2.512773026467e-03 -1.500000000000e-14 1.150000000000e+01 2.545517280112e-03 0.000000000000e+00 -2.545517280097e-03 -1.500000000000e-14 1.200000000000e+01 2.572587075273e-03 0.000000000000e+00 -2.572587075258e-03 -1.500000000000e-14 1.250000000000e+01 2.595332281924e-03 0.000000000000e+00 -2.595332281909e-03 -1.500000000000e-14 1.300000000000e+01 2.614713420876e-03 0.000000000000e+00 -2.614713420861e-03 -1.500000000000e-14 1.350000000000e+01 2.631429163124e-03 0.000000000000e+00 -2.631429163109e-03 -1.500000000000e-14 1.400000000000e+01 2.645998303904e-03 0.000000000000e+00 -2.645998303889e-03 -1.500000000000e-14 1.450000000000e+01 2.658813428259e-03 0.000000000000e+00 -2.658813428244e-03 -1.500000000000e-14 1.500000000000e+01 2.670176758373e-03 0.000000000000e+00 -2.670176758358e-03 -1.500000000000e-14 1.550000000000e+01 2.680324589659e-03 0.000000000000e+00 -2.680324589644e-03 -1.500000000000e-14 1.600000000000e+01 2.689444277337e-03 0.000000000000e+00 -2.689444277322e-03 -1.500000000000e-14 1.650000000000e+01 2.697686264403e-03 0.000000000000e+00 -2.697686264388e-03 -1.500000000000e-14 1.700000000000e+01 2.705172746139e-03 0.000000000000e+00 -2.705172746124e-03 -1.500000000000e-14 1.750000000000e+01 2.712004011860e-03 0.000000000000e+00 -2.712004011845e-03 -1.500000000000e-14 1.800000000000e+01 2.718263155282e-03 0.000000000000e+00 -2.718263155267e-03 -1.500000000000e-14 1.850000000000e+01 2.724019620939e-03 0.000000000000e+00 -2.724019620924e-03 -1.500000000000e-14 1.900000000000e+01 2.729331907875e-03 0.000000000000e+00 -2.729331907860e-03 -1.500000000000e-14 1.950000000000e+01 2.734249654807e-03 0.000000000000e+00 -2.734249654792e-03 -1.500000000000e-14 2.000000000000e+01 2.738815265536e-03 0.000000000000e+00 -2.738815265521e-03 -1.500000000000e-14 1.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 3.500000000000e+00 3.475372767348e-12 0.000000000000e+00 -3.455372828485e-12 -2.000000000000e-14 4.000000000000e+00 7.524564012780e-06 0.000000000000e+00 -7.524563992779e-06 -2.000000000000e-14 4.500000000000e+00 9.488543765894e-05 0.000000000000e+00 -9.488543763894e-05 -2.000000000000e-14 5.000000000000e+00 2.851269433997e-04 0.000000000000e+00 -2.851269433797e-04 -2.000000000000e-14 5.500000000000e+00 5.555635813531e-04 0.000000000000e+00 -5.555635813331e-04 -2.000000000000e-14 6.000000000000e+00 8.745403604704e-04 0.000000000000e+00 -8.745403604504e-04 -2.000000000000e-14 6.500000000000e+00 1.216308972939e-03 0.000000000000e+00 -1.216308972919e-03 -2.000000000000e-14 7.000000000000e+00 1.564506611792e-03 0.000000000000e+00 -1.564506611772e-03 -2.000000000000e-14 7.500000000000e+00 1.909710901000e-03 0.000000000000e+00 -1.909710900980e-03 -2.000000000000e-14 8.000000000000e+00 2.245111830433e-03 0.000000000000e+00 -2.245111830413e-03 -2.000000000000e-14 8.500000000000e+00 2.552445514173e-03 0.000000000000e+00 -2.552445514153e-03 -2.000000000000e-14 9.000000000000e+00 2.820628637642e-03 0.000000000000e+00 -2.820628637622e-03 -2.000000000000e-14 9.500000000000e+00 3.044860481172e-03 0.000000000000e+00 -3.044860481152e-03 -2.000000000000e-14 1.000000000000e+01 3.224258359571e-03 0.000000000000e+00 -3.224258359551e-03 -2.000000000000e-14 1.050000000000e+01 3.363038619054e-03 0.000000000000e+00 -3.363038619034e-03 -2.000000000000e-14 1.100000000000e+01 3.468770439994e-03 0.000000000000e+00 -3.468770439974e-03 -2.000000000000e-14 1.150000000000e+01 3.549496229335e-03 0.000000000000e+00 -3.549496229315e-03 -2.000000000000e-14 1.200000000000e+01 3.611952029308e-03 0.000000000000e+00 -3.611952029288e-03 -2.000000000000e-14 1.250000000000e+01 3.661158949842e-03 0.000000000000e+00 -3.661158949822e-03 -2.000000000000e-14 1.300000000000e+01 3.700677747800e-03 0.000000000000e+00 -3.700677747780e-03 -2.000000000000e-14 1.350000000000e+01 3.732999545632e-03 0.000000000000e+00 -3.732999545612e-03 -2.000000000000e-14 1.400000000000e+01 3.759875329556e-03 0.000000000000e+00 -3.759875329536e-03 -2.000000000000e-14 1.450000000000e+01 3.782552565822e-03 0.000000000000e+00 -3.782552565802e-03 -2.000000000000e-14 1.500000000000e+01 3.801935214161e-03 0.000000000000e+00 -3.801935214141e-03 -2.000000000000e-14 1.550000000000e+01 3.818690142905e-03 0.000000000000e+00 -3.818690142885e-03 -2.000000000000e-14 1.600000000000e+01 3.833318008836e-03 0.000000000000e+00 -3.833318008816e-03 -2.000000000000e-14 1.650000000000e+01 3.846200959862e-03 0.000000000000e+00 -3.846200959842e-03 -2.000000000000e-14 1.700000000000e+01 3.857635204017e-03 0.000000000000e+00 -3.857635203997e-03 -2.000000000000e-14 1.750000000000e+01 3.867853603034e-03 0.000000000000e+00 -3.867853603014e-03 -2.000000000000e-14 1.800000000000e+01 3.877041602072e-03 0.000000000000e+00 -3.877041602052e-03 -2.000000000000e-14 1.850000000000e+01 3.885348640388e-03 0.000000000000e+00 -3.885348640368e-03 -2.000000000000e-14 1.900000000000e+01 3.892896449619e-03 0.000000000000e+00 -3.892896449599e-03 -2.000000000000e-14 1.950000000000e+01 3.899785175453e-03 0.000000000000e+00 -3.899785175433e-03 -2.000000000000e-14 2.000000000000e+01 3.906097954472e-03 0.000000000000e+00 -3.906097954452e-03 -2.000000000000e-14 1.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 1.500000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 7.278466024330e-15 0.000000000000e+00 4.721357677522e-15 -1.200000000000e-14 3.000000000000e+00 4.599691916414e-11 0.000000000000e+00 -4.598491941428e-11 -1.200000000000e-14 3.500000000000e+00 6.955535247252e-07 0.000000000000e+00 -6.955535127255e-07 -1.200000000000e-14 4.000000000000e+00 2.367749559279e-05 0.000000000000e+00 -2.367749558079e-05 -1.200000000000e-14 4.500000000000e+00 9.094885315836e-05 0.000000000000e+00 -9.094885314636e-05 -1.200000000000e-14 5.000000000000e+00 2.029369249689e-04 0.000000000000e+00 -2.029369249569e-04 -1.200000000000e-14 5.500000000000e+00 3.456600386006e-04 0.000000000000e+00 -3.456600385886e-04 -1.200000000000e-14 6.000000000000e+00 4.833886772360e-04 0.000000000000e+00 -4.833886772240e-04 -1.200000000000e-14 6.500000000000e+00 6.013221133484e-04 0.000000000000e+00 -6.013221133364e-04 -1.200000000000e-14 7.000000000000e+00 6.982461808515e-04 0.000000000000e+00 -6.982461808395e-04 -1.200000000000e-14 7.500000000000e+00 7.772803004165e-04 0.000000000000e+00 -7.772803004045e-04 -1.200000000000e-14 8.000000000000e+00 8.421485447392e-04 0.000000000000e+00 -8.421485447272e-04 -1.200000000000e-14 8.500000000000e+00 8.960231467985e-04 0.000000000000e+00 -8.960231467865e-04 -1.200000000000e-14 9.000000000000e+00 9.413561520290e-04 0.000000000000e+00 -9.413561520170e-04 -1.200000000000e-14 9.500000000000e+00 9.799878434092e-04 0.000000000000e+00 -9.799878433972e-04 -1.200000000000e-14 1.000000000000e+01 1.013294249535e-03 0.000000000000e+00 -1.013294249523e-03 -1.200000000000e-14 1.050000000000e+01 1.042311517512e-03 0.000000000000e+00 -1.042311517500e-03 -1.200000000000e-14 1.100000000000e+01 1.067828838443e-03 0.000000000000e+00 -1.067828838431e-03 -1.200000000000e-14 1.150000000000e+01 1.090455152728e-03 0.000000000000e+00 -1.090455152716e-03 -1.200000000000e-14 1.200000000000e+01 1.110666536266e-03 0.000000000000e+00 -1.110666536254e-03 -1.200000000000e-14 1.250000000000e+01 1.128839943380e-03 0.000000000000e+00 -1.128839943368e-03 -1.200000000000e-14 1.300000000000e+01 1.145277434970e-03 0.000000000000e+00 -1.145277434958e-03 -1.200000000000e-14 1.350000000000e+01 1.160223766909e-03 0.000000000000e+00 -1.160223766897e-03 -1.200000000000e-14 1.400000000000e+01 1.173879312810e-03 0.000000000000e+00 -1.173879312798e-03 -1.200000000000e-14 1.450000000000e+01 1.186409675633e-03 0.000000000000e+00 -1.186409675621e-03 -1.200000000000e-14 1.500000000000e+01 1.197952922754e-03 0.000000000000e+00 -1.197952922742e-03 -1.200000000000e-14 1.550000000000e+01 1.208625095188e-03 0.000000000000e+00 -1.208625095176e-03 -1.200000000000e-14 1.600000000000e+01 1.218524448790e-03 0.000000000000e+00 -1.218524448778e-03 -1.200000000000e-14 1.650000000000e+01 1.227734753155e-03 0.000000000000e+00 -1.227734753143e-03 -1.200000000000e-14 1.700000000000e+01 1.236327882602e-03 0.000000000000e+00 -1.236327882590e-03 -1.200000000000e-14 1.750000000000e+01 1.244365869748e-03 0.000000000000e+00 -1.244365869736e-03 -1.200000000000e-14 1.800000000000e+01 1.251902547092e-03 0.000000000000e+00 -1.251902547080e-03 -1.200000000000e-14 1.850000000000e+01 1.258984869795e-03 0.000000000000e+00 -1.258984869783e-03 -1.200000000000e-14 1.900000000000e+01 1.265653989596e-03 0.000000000000e+00 -1.265653989584e-03 -1.200000000000e-14 1.950000000000e+01 1.271946132835e-03 0.000000000000e+00 -1.271946132823e-03 -1.200000000000e-14 2.000000000000e+01 1.277893323077e-03 0.000000000000e+00 -1.277893323065e-03 -1.200000000000e-14 1.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 1.500000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 2.500000000000e+00 1.047209194360e-14 0.000000000000e+00 4.527545096957e-15 -1.500000000000e-14 3.000000000000e+00 5.703551086284e-11 0.000000000000e+00 -5.702051138085e-11 -1.500000000000e-14 3.500000000000e+00 8.050145218785e-07 0.000000000000e+00 -8.050145068790e-07 -1.500000000000e-14 4.000000000000e+00 2.483693826133e-05 0.000000000000e+00 -2.483693824633e-05 -1.500000000000e-14 4.500000000000e+00 9.376218693174e-05 0.000000000000e+00 -9.376218691674e-05 -1.500000000000e-14 5.000000000000e+00 2.080021784374e-04 0.000000000000e+00 -2.080021784224e-04 -1.500000000000e-14 5.500000000000e+00 3.627030509171e-04 0.000000000000e+00 -3.627030509021e-04 -1.500000000000e-14 6.000000000000e+00 5.509694893246e-04 0.000000000000e+00 -5.509694893096e-04 -1.500000000000e-14 6.500000000000e+00 7.651244289272e-04 0.000000000000e+00 -7.651244289122e-04 -1.500000000000e-14 7.000000000000e+00 9.887374190777e-04 0.000000000000e+00 -9.887374190627e-04 -1.500000000000e-14 7.500000000000e+00 1.200014932199e-03 0.000000000000e+00 -1.200014932184e-03 -1.500000000000e-14 8.000000000000e+00 1.388004462832e-03 0.000000000000e+00 -1.388004462817e-03 -1.500000000000e-14 8.500000000000e+00 1.549069077083e-03 0.000000000000e+00 -1.549069077068e-03 -1.500000000000e-14 9.000000000000e+00 1.684238048214e-03 0.000000000000e+00 -1.684238048199e-03 -1.500000000000e-14 9.500000000000e+00 1.796779488451e-03 0.000000000000e+00 -1.796779488436e-03 -1.500000000000e-14 1.000000000000e+01 1.890539226786e-03 0.000000000000e+00 -1.890539226771e-03 -1.500000000000e-14 1.050000000000e+01 1.969099325907e-03 0.000000000000e+00 -1.969099325892e-03 -1.500000000000e-14 1.100000000000e+01 2.035476676943e-03 0.000000000000e+00 -2.035476676928e-03 -1.500000000000e-14 1.150000000000e+01 2.092092791304e-03 0.000000000000e+00 -2.092092791289e-03 -1.500000000000e-14 1.200000000000e+01 2.140849194802e-03 0.000000000000e+00 -2.140849194787e-03 -1.500000000000e-14 1.250000000000e+01 2.183227792375e-03 0.000000000000e+00 -2.183227792360e-03 -1.500000000000e-14 1.300000000000e+01 2.220383983615e-03 0.000000000000e+00 -2.220383983600e-03 -1.500000000000e-14 1.350000000000e+01 2.253223066168e-03 0.000000000000e+00 -2.253223066153e-03 -1.500000000000e-14 1.400000000000e+01 2.282459622935e-03 0.000000000000e+00 -2.282459622920e-03 -1.500000000000e-14 1.450000000000e+01 2.308662555476e-03 0.000000000000e+00 -2.308662555461e-03 -1.500000000000e-14 1.500000000000e+01 2.332288897703e-03 0.000000000000e+00 -2.332288897688e-03 -1.500000000000e-14 1.550000000000e+01 2.353709161529e-03 0.000000000000e+00 -2.353709161514e-03 -1.500000000000e-14 1.600000000000e+01 2.373226390674e-03 0.000000000000e+00 -2.373226390659e-03 -1.500000000000e-14 1.650000000000e+01 2.391090564606e-03 0.000000000000e+00 -2.391090564591e-03 -1.500000000000e-14 1.700000000000e+01 2.407509564583e-03 0.000000000000e+00 -2.407509564568e-03 -1.500000000000e-14 1.750000000000e+01 2.422657588106e-03 0.000000000000e+00 -2.422657588091e-03 -1.500000000000e-14 1.800000000000e+01 2.436681658501e-03 0.000000000000e+00 -2.436681658486e-03 -1.500000000000e-14 1.850000000000e+01 2.449706702545e-03 0.000000000000e+00 -2.449706702530e-03 -1.500000000000e-14 1.900000000000e+01 2.461839543457e-03 0.000000000000e+00 -2.461839543442e-03 -1.500000000000e-14 1.950000000000e+01 2.473172065897e-03 0.000000000000e+00 -2.473172065882e-03 -1.500000000000e-14 2.000000000000e+01 2.483783743912e-03 0.000000000000e+00 -2.483783743897e-03 -1.500000000000e-14 1.000000000000e+00 1.500102125851e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.500000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.000000000000e+00 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 2.500000000000e+00 1.611818317704e-14 0.000000000000e+00 3.880682626560e-15 -2.000000000000e-14 3.000000000000e+00 8.115775586293e-11 0.000000000000e+00 -8.113775539759e-11 -2.000000000000e-14 3.500000000000e+00 1.010716834168e-06 0.000000000000e+00 -1.010716814168e-06 -2.000000000000e-14 4.000000000000e+00 2.669361561134e-05 0.000000000000e+00 -2.669361559134e-05 -2.000000000000e-14 4.500000000000e+00 9.790634602854e-05 0.000000000000e+00 -9.790634600854e-05 -2.000000000000e-14 5.000000000000e+00 2.146705046194e-04 0.000000000000e+00 -2.146705045994e-04 -2.000000000000e-14 5.500000000000e+00 3.719374695061e-04 0.000000000000e+00 -3.719374694861e-04 -2.000000000000e-14 6.000000000000e+00 5.627848143856e-04 0.000000000000e+00 -5.627848143656e-04 -2.000000000000e-14 6.500000000000e+00 7.799613051595e-04 0.000000000000e+00 -7.799613051395e-04 -2.000000000000e-14 7.000000000000e+00 1.016743381154e-03 0.000000000000e+00 -1.016743381134e-03 -2.000000000000e-14 7.500000000000e+00 1.267300272641e-03 0.000000000000e+00 -1.267300272621e-03 -2.000000000000e-14 8.000000000000e+00 1.526417957935e-03 0.000000000000e+00 -1.526417957915e-03 -2.000000000000e-14 8.500000000000e+00 1.784551364630e-03 0.000000000000e+00 -1.784551364610e-03 -2.000000000000e-14 9.000000000000e+00 2.030358161605e-03 0.000000000000e+00 -2.030358161585e-03 -2.000000000000e-14 9.500000000000e+00 2.256214307072e-03 0.000000000000e+00 -2.256214307052e-03 -2.000000000000e-14 1.000000000000e+01 2.457327762913e-03 0.000000000000e+00 -2.457327762893e-03 -2.000000000000e-14 1.050000000000e+01 2.631881099508e-03 0.000000000000e+00 -2.631881099488e-03 -2.000000000000e-14 1.100000000000e+01 2.780638959993e-03 0.000000000000e+00 -2.780638959973e-03 -2.000000000000e-14 1.150000000000e+01 2.906073470988e-03 0.000000000000e+00 -2.906073470968e-03 -2.000000000000e-14 1.200000000000e+01 3.011435759553e-03 0.000000000000e+00 -3.011435759533e-03 -2.000000000000e-14 1.250000000000e+01 3.100060147096e-03 0.000000000000e+00 -3.100060147076e-03 -2.000000000000e-14 1.300000000000e+01 3.174972761772e-03 0.000000000000e+00 -3.174972761752e-03 -2.000000000000e-14 1.350000000000e+01 3.238739621610e-03 0.000000000000e+00 -3.238739621590e-03 -2.000000000000e-14 1.400000000000e+01 3.293455576830e-03 0.000000000000e+00 -3.293455576810e-03 -2.000000000000e-14 1.450000000000e+01 3.340797256981e-03 0.000000000000e+00 -3.340797256961e-03 -2.000000000000e-14 1.500000000000e+01 3.382095101892e-03 0.000000000000e+00 -3.382095101872e-03 -2.000000000000e-14 1.550000000000e+01 3.418403157414e-03 0.000000000000e+00 -3.418403157394e-03 -2.000000000000e-14 1.600000000000e+01 3.450558735312e-03 0.000000000000e+00 -3.450558735292e-03 -2.000000000000e-14 1.650000000000e+01 3.479230463587e-03 0.000000000000e+00 -3.479230463567e-03 -2.000000000000e-14 1.700000000000e+01 3.504955841107e-03 0.000000000000e+00 -3.504955841087e-03 -2.000000000000e-14 1.750000000000e+01 3.528170165169e-03 0.000000000000e+00 -3.528170165149e-03 -2.000000000000e-14 1.800000000000e+01 3.549228687104e-03 0.000000000000e+00 -3.549228687084e-03 -2.000000000000e-14 1.850000000000e+01 3.568423574121e-03 0.000000000000e+00 -3.568423574101e-03 -2.000000000000e-14 1.900000000000e+01 3.585996931171e-03 0.000000000000e+00 -3.585996931151e-03 -2.000000000000e-14 1.950000000000e+01 3.602150845527e-03 0.000000000000e+00 -3.602150845507e-03 -2.000000000000e-14 2.000000000000e+01 3.617055180615e-03 0.000000000000e+00 -3.617055180595e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/noise2.standard0000644000265600020320000001165712264261473022770 0ustar andreasadminFreq N(d) 1000 8.701222511148e-35 1258.925411794 6.600552272296e-35 1584.893192461 5.007030936572e-35 1995.262314969 3.798221385961e-35 2511.88643151 2.881245568386e-35 3162.277660168 2.18564827633e-35 3981.071705535 1.657983769325e-35 5011.872336273 1.257709307172e-35 6309.573444802 9.540700763264e-36 7943.282347243 7.237361649075e-36 10000 5.490100249365e-36 12589.25411794 4.16466693383e-36 15848.93192461 3.159222943469e-36 19952.62314969 2.396515679433e-36 25118.8643151 1.817943052623e-36 31622.77660168 1.3790508324e-36 39810.71705535 1.046117036283e-36 50118.72336273 7.9356092458e-37 63095.73444802 6.019775218052e-37 79432.82347243 4.566466487123e-37 100000 3.464019074245e-37 125892.5411794 2.627727189185e-37 158489.3192461 1.993334918997e-37 199526.2314969 1.512099169058e-37 251188.643151 1.147044520849e-37 316227.7660168 8.70122251054e-38 398107.1705535 6.600552271565e-38 501187.2336273 5.007030935692e-38 630957.3444802 3.798221384904e-38 794328.2347243 2.881245567115e-38 1000000 2.185648274802e-38 1258925.411794 1.657983767488e-38 1584893.192461 1.257709304964e-38 1995262.314969 9.540700736715e-39 2511886.43151 7.237361617158e-39 3162277.660168 5.490100210991e-39 3981071.705535 4.164666887695e-39 5011872.336273 3.159222888002e-39 6309573.444802 2.396515612747e-39 7943282.347243 1.81794297245e-39 10000000 1.37905073601e-39 12589254.11794 1.046116920397e-39 15848931.92461 7.93560785254e-40 19952623.14969 6.019773542985e-40 25118864.3151 4.566464473249e-40 31622776.60168 3.464016653037e-40 39810717.05535 2.627724278253e-40 50118723.36273 1.99333141929e-40 63095734.44802 1.512094961489e-40 79432823.47243 1.147039462246e-40 100000000 8.701161692913e-41 1000 7.312402870397e-22 1258.925411794 5.547024837062e-22 1584.893192461 4.207848649525e-22 1995.262314969 3.191979624647e-22 2511.88643151 2.421364163207e-22 3162.277660168 1.836792555188e-22 3981.071705535 1.393349642346e-22 5011.872336273 1.056963792859e-22 6309.573444802 8.017890308805e-23 7943.282347243 6.082191787303e-23 10000 4.613814296874e-23 12589.25411794 3.499936060958e-23 15848.93192461 2.654973009878e-23 19952.62314969 2.014002987601e-23 25118.8643151 1.527777502436e-23 31622.77660168 1.158937752982e-23 39810.71705535 8.791441902662e-24 50118.72336273 6.668990679526e-24 63095.73444802 5.058946777562e-24 79432.82347243 3.837603578718e-24 100000 2.911120016659e-24 125892.5411794 2.208310362846e-24 158489.3192461 1.675174719948e-24 199526.2314969 1.270749976794e-24 251188.643151 9.639624358483e-25 316227.7660168 7.312402869848e-25 398107.1705535 5.547024836402e-25 501187.2336273 4.207848648732e-25 630957.3444802 3.191979623693e-25 794328.2347243 2.42136416206e-25 1000000 1.83679255381e-25 1258925.411794 1.393349640689e-25 1584893.192461 1.056963790866e-25 1995262.314969 8.017890284848e-26 2511886.43151 6.0821917585e-26 3162277.660168 4.613814262246e-26 3981071.705535 3.499936019326e-26 5011872.336273 2.654972959826e-26 6309573.444802 2.014002927425e-26 7943282.347243 1.527777430087e-26 10000000 1.158937666e-26 12589254.11794 8.791440856909e-27 15848931.92461 6.668989422255e-27 19952623.14969 5.05894526599e-27 25118864.3151 3.837601761409e-27 31622776.60168 2.911117831774e-27 39810717.05535 2.208307736038e-27 50118723.36273 1.675171561832e-27 63095734.44802 1.270746179908e-27 79432823.47243 9.639578709941e-28 100000000 7.312347988381e-28 1000 3.957056549102e-20 1258.925411794 3.001734361271e-20 1584.893192461 2.277048372655e-20 1995.262314969 1.727317832753e-20 2511.88643151 1.310304572874e-20 3162.277660168 9.939676654406e-21 3981.071705535 7.540015813073e-21 5011.872336273 5.719686911163e-21 6309.573444802 4.338826226996e-21 7943.282347243 3.291336277748e-21 10000 2.496733892179e-21 12589.25411794 1.893966341422e-21 15848.93192461 1.436720394463e-21 19952.62314969 1.089863872827e-21 25118.8643151 8.267462937605e-22 31622.77660168 6.27151198685e-22 39810.71705535 4.757428354748e-22 50118.72336273 3.608878464717e-22 63095.73444802 2.737614274336e-22 79432.82347243 2.076692797587e-22 100000 1.575332586468e-22 125892.5411794 1.195011973301e-22 158489.3192461 9.065092848294e-23 199526.2314969 6.876576150177e-23 251188.643151 5.216416460388e-23 316227.7660168 3.957056548724e-23 398107.1705535 3.001734360817e-23 501187.2336273 2.277048372109e-23 630957.3444802 1.727317832096e-23 794328.2347243 1.310304572085e-23 1000000 9.939676644911e-24 1258925.411794 7.540015801658e-24 1584893.192461 5.719686897439e-24 1995262.314969 4.338826210496e-24 2511886.43151 3.29133625791e-24 3162277.660168 2.496733868329e-24 3981071.705535 1.893966312748e-24 5011872.336273 1.436720359989e-24 6309573.444802 1.08986383138e-24 7943282.347243 8.267462439302e-25 10000000 6.271511387758e-25 12589254.11794 4.757427634482e-25 15848931.92461 3.608877598766e-25 19952623.14969 2.737613233234e-25 25118864.3151 2.076691545907e-25 31622776.60168 1.575331081619e-25 39810717.05535 1.195010164075e-25 50118723.36273 9.065071096635e-26 63095734.44802 6.876549998968e-26 79432823.47243 5.21638501979e-26 100000000 3.957018748944e-26 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_coiigs.standard0000644000265600020320000000752112264261473024322 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 4.40248039961547e-13 2.35767952812291e-13 4.50055138619227e-15 1258.925411794 4.4024803996168e-13 2.3576795281227e-13 4.50055138619357e-15 1584.893192461 4.40248039961569e-13 2.35767952812291e-13 4.50055138619231e-15 1995.262314969 4.40248039961555e-13 2.35767952812225e-13 4.50055138619256e-15 2511.88643151 4.40248039961497e-13 2.35767952812245e-13 4.5005513861914e-15 3162.277660168 4.40248039961628e-13 2.35767952812294e-13 4.500551386193e-15 3981.071705535 4.40248039961545e-13 2.35767952812248e-13 4.5005513861905e-15 5011.872336273 4.40248039961475e-13 2.35767952812234e-13 4.50055138619071e-15 6309.573444802 4.40248039961675e-13 2.3576795281225e-13 4.5005513861916e-15 7943.282347243 4.4024803996157e-13 2.35767952812237e-13 4.50055138619154e-15 10000 4.40248039961546e-13 2.35767952812291e-13 4.50055138619227e-15 12589.25411794 4.4024803996168e-13 2.3576795281227e-13 4.50055138619357e-15 15848.93192461 4.40248039961569e-13 2.35767952812291e-13 4.50055138619231e-15 19952.62314969 4.40248039961555e-13 2.35767952812225e-13 4.50055138619257e-15 25118.8643151 4.40248039961497e-13 2.35767952812245e-13 4.5005513861914e-15 31622.77660168 4.40248039961628e-13 2.35767952812294e-13 4.500551386193e-15 39810.71705535 4.40248039961545e-13 2.35767952812248e-13 4.5005513861905e-15 50118.72336273 4.40248039961474e-13 2.35767952812234e-13 4.50055138619071e-15 63095.73444802 4.40248039961675e-13 2.3576795281225e-13 4.5005513861916e-15 79432.82347243 4.4024803996157e-13 2.35767952812237e-13 4.50055138619154e-15 100000 4.40248039961546e-13 2.35767952812291e-13 4.50055138619227e-15 125892.5411794 4.4024803996168e-13 2.3576795281227e-13 4.50055138619357e-15 158489.3192461 4.40248039961569e-13 2.35767952812291e-13 4.50055138619231e-15 199526.2314969 4.40248039961555e-13 2.35767952812225e-13 4.50055138619256e-15 251188.643151 4.40248039961497e-13 2.35767952812245e-13 4.5005513861914e-15 316227.7660168 4.40248039961628e-13 2.35767952812294e-13 4.500551386193e-15 398107.1705535 4.40248039961545e-13 2.35767952812248e-13 4.5005513861905e-15 501187.2336273 4.40248039961474e-13 2.35767952812234e-13 4.50055138619071e-15 630957.3444802 4.40248039961675e-13 2.3576795281225e-13 4.5005513861916e-15 794328.2347243 4.4024803996157e-13 2.35767952812237e-13 4.50055138619154e-15 1000000 4.40248039961546e-13 2.35767952812291e-13 4.50055138619227e-15 1258925.411794 4.40248039961554e-13 2.3576795281227e-13 4.50055138619356e-15 1584893.192461 4.40248039961569e-13 2.35767952812191e-13 4.50055138619231e-15 1995262.314969 4.40248039961475e-13 2.35767952812145e-13 4.50055138619177e-15 2511886.43151 4.40248039961434e-13 2.35767952812119e-13 4.5005513861914e-15 3162277.660168 4.40248039961477e-13 2.35767952812092e-13 4.5005513861925e-15 3981071.705535 4.40248039961545e-13 2.35767952811928e-13 4.5005513861905e-15 5011872.336273 4.40248039961157e-13 2.35767952811726e-13 4.50055138619071e-15 6309573.444802 4.40248039961171e-13 2.35767952811443e-13 4.5005513861916e-15 7943282.347243 4.40248039960769e-13 2.35767952811035e-13 4.50055138618954e-15 10000000 4.40248039960432e-13 2.35767952810222e-13 4.50055138618909e-15 12589254.11794 4.40248039959784e-13 2.35767952808984e-13 4.50055138618598e-15 15848931.92461 4.40248039958757e-13 2.3576795280707e-13 4.50055138618227e-15 19952623.14969 4.40248039957008e-13 2.35767952804009e-13 4.50055138617581e-15 25118864.3151 4.40248039954274e-13 2.35767952799193e-13 4.50055138616606e-15 31622776.60168 4.40248039950153e-13 2.35767952791659e-13 4.50055138615223e-15 39810717.05535 4.40248039943555e-13 2.35767952779546e-13 4.50055138612654e-15 50118723.36273 4.40248039932895e-13 2.35767952760377e-13 4.50055138608909e-15 63095734.44802 4.40248039916019e-13 2.35767952730044e-13 4.50055138603016e-15 79432823.47243 4.40248039889239e-13 2.35767952682001e-13 4.50055138593507e-15 100000000 4.40248039847114e-13 2.35767952605708e-13 4.50055138578483e-15 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Id1_vb2.standard0000644000265600020320000010243012264261473024253 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.128564706039e-04 0.000000000000e+00 -2.128564705829e-04 -2.100000000000e-14 1.500000000000e+00 3.034816631415e-04 0.000000000000e+00 -3.034816631200e-04 -2.150000000000e-14 2.000000000000e+00 3.848396231954e-04 0.000000000000e+00 -3.848396231734e-04 -2.200000000000e-14 2.500000000000e+00 4.577650441687e-04 0.000000000000e+00 -4.577650441462e-04 -2.250000000000e-14 3.000000000000e+00 5.229944592755e-04 0.000000000000e+00 -5.229944592525e-04 -2.300000000000e-14 3.500000000000e+00 5.811742871046e-04 0.000000000000e+00 -5.811742870811e-04 -2.350000000000e-14 4.000000000000e+00 6.328727159429e-04 0.000000000000e+00 -6.328727159189e-04 -2.400000000000e-14 4.500000000000e+00 6.785932066851e-04 0.000000000000e+00 -6.785932066606e-04 -2.450000000000e-14 5.000000000000e+00 7.187883931098e-04 0.000000000000e+00 -7.187883930848e-04 -2.500000000000e-14 5.500000000000e+00 7.538736741136e-04 0.000000000000e+00 -7.538736740881e-04 -2.550000000000e-14 6.000000000000e+00 7.842398591851e-04 0.000000000000e+00 -7.842398591591e-04 -2.600000000000e-14 6.500000000000e+00 8.102641426414e-04 0.000000000000e+00 -8.102641426149e-04 -2.650000000000e-14 7.000000000000e+00 8.323185819360e-04 0.000000000000e+00 -8.323185819090e-04 -2.700000000000e-14 7.500000000000e+00 8.507752990528e-04 0.000000000000e+00 -8.507752990253e-04 -2.750000000000e-14 8.000000000000e+00 8.660079232483e-04 0.000000000000e+00 -8.660079232203e-04 -2.800000000000e-14 8.500000000000e+00 8.783893450543e-04 0.000000000000e+00 -8.783893450258e-04 -2.850000000000e-14 9.000000000000e+00 8.882865043893e-04 0.000000000000e+00 -8.882865043603e-04 -2.900000000000e-14 9.500000000000e+00 8.960534571973e-04 0.000000000000e+00 -8.960534571678e-04 -2.950000000000e-14 1.000000000000e+01 9.020241770732e-04 0.000000000000e+00 -9.020241770432e-04 -3.000000000000e-14 1.050000000000e+01 9.065064226812e-04 0.000000000000e+00 -9.065064226507e-04 -3.050000000000e-14 1.100000000000e+01 9.097776532429e-04 0.000000000000e+00 -9.097776532119e-04 -3.100000000000e-14 1.150000000000e+01 9.120836037954e-04 0.000000000000e+00 -9.120836037639e-04 -3.150000000000e-14 1.200000000000e+01 9.136400176616e-04 0.000000000000e+00 -9.136400176296e-04 -3.200000000000e-14 1.250000000000e+01 9.146386530050e-04 0.000000000000e+00 -9.146386529725e-04 -3.250000000000e-14 1.300000000000e+01 9.152602026616e-04 0.000000000000e+00 -9.152602026286e-04 -3.300000000000e-14 1.350000000000e+01 9.156852350626e-04 0.000000000000e+00 -9.156852350291e-04 -3.350000000000e-14 1.400000000000e+01 9.160457798499e-04 0.000000000000e+00 -9.160457798159e-04 -3.400000000000e-14 1.450000000000e+01 9.163847866640e-04 0.000000000000e+00 -9.163847866295e-04 -3.450000000000e-14 1.500000000000e+01 9.167098782001e-04 0.000000000000e+00 -9.167098781651e-04 -3.500000000000e-14 1.550000000000e+01 9.170231476787e-04 0.000000000000e+00 -9.170231476432e-04 -3.550000000000e-14 1.600000000000e+01 9.173258748637e-04 0.000000000000e+00 -9.173258748277e-04 -3.600000000000e-14 1.650000000000e+01 9.176191060786e-04 0.000000000000e+00 -9.176191060421e-04 -3.650000000000e-14 1.700000000000e+01 9.179037470150e-04 0.000000000000e+00 -9.179037469780e-04 -3.700000000000e-14 1.750000000000e+01 9.181805911197e-04 0.000000000000e+00 -9.181805910822e-04 -3.750000000000e-14 1.800000000000e+01 9.184503365000e-04 0.000000000000e+00 -9.184503364620e-04 -3.800000000000e-14 1.850000000000e+01 9.187135991844e-04 0.000000000000e+00 -9.187135991459e-04 -3.850000000000e-14 1.900000000000e+01 9.189709242549e-04 0.000000000000e+00 -9.189709242159e-04 -3.900000000000e-14 1.950000000000e+01 9.192227953313e-04 0.000000000000e+00 -9.192227952918e-04 -3.950000000000e-14 2.000000000000e+01 9.194696426808e-04 0.000000000000e+00 -9.194696426408e-04 -4.000000000000e-14 1.000000000000e+00 2.113183758019e-04 0.000000000000e+00 -2.113183757809e-04 -2.100000000000e-14 1.500000000000e+00 3.013310718157e-04 0.000000000000e+00 -3.013310717942e-04 -2.150000000000e-14 2.000000000000e+00 3.821836580355e-04 0.000000000000e+00 -3.821836580135e-04 -2.200000000000e-14 2.500000000000e+00 4.547094806245e-04 0.000000000000e+00 -4.547094806020e-04 -2.250000000000e-14 3.000000000000e+00 5.196422478252e-04 0.000000000000e+00 -5.196422478022e-04 -2.300000000000e-14 3.500000000000e+00 5.776244503628e-04 0.000000000000e+00 -5.776244503393e-04 -2.350000000000e-14 4.000000000000e+00 6.292193524171e-04 0.000000000000e+00 -6.292193523931e-04 -2.400000000000e-14 4.500000000000e+00 6.749243839946e-04 0.000000000000e+00 -6.749243839701e-04 -2.450000000000e-14 5.000000000000e+00 7.151848475944e-04 0.000000000000e+00 -7.151848475694e-04 -2.500000000000e-14 5.500000000000e+00 7.504073087314e-04 0.000000000000e+00 -7.504073087059e-04 -2.550000000000e-14 6.000000000000e+00 7.809721275078e-04 0.000000000000e+00 -7.809721274818e-04 -2.600000000000e-14 6.500000000000e+00 8.072445009501e-04 0.000000000000e+00 -8.072445009236e-04 -2.650000000000e-14 7.000000000000e+00 8.295832650745e-04 0.000000000000e+00 -8.295832650475e-04 -2.700000000000e-14 7.500000000000e+00 8.483466970332e-04 0.000000000000e+00 -8.483466970057e-04 -2.750000000000e-14 8.000000000000e+00 8.638947777658e-04 0.000000000000e+00 -8.638947777378e-04 -2.800000000000e-14 8.500000000000e+00 8.765878480292e-04 0.000000000000e+00 -8.765878480007e-04 -2.850000000000e-14 9.000000000000e+00 8.867822022498e-04 0.000000000000e+00 -8.867822022208e-04 -2.900000000000e-14 9.500000000000e+00 8.948237056222e-04 0.000000000000e+00 -8.948237055927e-04 -2.950000000000e-14 1.000000000000e+01 9.010408020374e-04 0.000000000000e+00 -9.010408020074e-04 -3.000000000000e-14 1.050000000000e+01 9.057382405376e-04 0.000000000000e+00 -9.057382405071e-04 -3.050000000000e-14 1.100000000000e+01 9.091925632879e-04 0.000000000000e+00 -9.091925632569e-04 -3.100000000000e-14 1.150000000000e+01 9.116500413814e-04 0.000000000000e+00 -9.116500413499e-04 -3.150000000000e-14 1.200000000000e+01 9.133275648376e-04 0.000000000000e+00 -9.133275648056e-04 -3.200000000000e-14 1.250000000000e+01 9.144174054516e-04 0.000000000000e+00 -9.144174054191e-04 -3.250000000000e-14 1.300000000000e+01 9.150982406574e-04 0.000000000000e+00 -9.150982406244e-04 -3.300000000000e-14 1.350000000000e+01 9.155492129224e-04 0.000000000000e+00 -9.155492128889e-04 -3.350000000000e-14 1.400000000000e+01 9.159171874947e-04 0.000000000000e+00 -9.159171874607e-04 -3.400000000000e-14 1.450000000000e+01 9.162596421109e-04 0.000000000000e+00 -9.162596420764e-04 -3.450000000000e-14 1.500000000000e+01 9.165874375580e-04 0.000000000000e+00 -9.165874375230e-04 -3.500000000000e-14 1.550000000000e+01 9.169031002010e-04 0.000000000000e+00 -9.169031001655e-04 -3.550000000000e-14 1.600000000000e+01 9.172079899912e-04 0.000000000000e+00 -9.172079899552e-04 -3.600000000000e-14 1.650000000000e+01 9.175031861325e-04 0.000000000000e+00 -9.175031860960e-04 -3.650000000000e-14 1.700000000000e+01 9.177896177971e-04 0.000000000000e+00 -9.177896177601e-04 -3.700000000000e-14 1.750000000000e+01 9.180680981480e-04 0.000000000000e+00 -9.180680981105e-04 -3.750000000000e-14 1.800000000000e+01 9.183393424308e-04 0.000000000000e+00 -9.183393423928e-04 -3.800000000000e-14 1.850000000000e+01 9.186039816906e-04 0.000000000000e+00 -9.186039816521e-04 -3.850000000000e-14 1.900000000000e+01 9.188625742011e-04 0.000000000000e+00 -9.188625741621e-04 -3.900000000000e-14 1.950000000000e+01 9.191156151894e-04 0.000000000000e+00 -9.191156151499e-04 -3.950000000000e-14 2.000000000000e+01 9.193635451519e-04 0.000000000000e+00 -9.193635451119e-04 -4.000000000000e-14 1.000000000000e+00 2.094536699597e-04 0.000000000000e+00 -2.094536699387e-04 -2.100000000000e-14 1.500000000000e+00 2.987175413079e-04 0.000000000000e+00 -2.987175412864e-04 -2.150000000000e-14 2.000000000000e+00 3.789473735001e-04 0.000000000000e+00 -3.789473734781e-04 -2.200000000000e-14 2.500000000000e+00 4.509753750037e-04 0.000000000000e+00 -4.509753749812e-04 -2.250000000000e-14 3.000000000000e+00 5.155324338934e-04 0.000000000000e+00 -5.155324338704e-04 -2.300000000000e-14 3.500000000000e+00 5.732570001576e-04 0.000000000000e+00 -5.732570001341e-04 -2.350000000000e-14 4.000000000000e+00 6.247071790048e-04 0.000000000000e+00 -6.247071789808e-04 -2.400000000000e-14 4.500000000000e+00 6.703739954207e-04 0.000000000000e+00 -6.703739953962e-04 -2.450000000000e-14 5.000000000000e+00 7.106948496639e-04 0.000000000000e+00 -7.106948496389e-04 -2.500000000000e-14 5.500000000000e+00 7.460666302470e-04 0.000000000000e+00 -7.460666302215e-04 -2.550000000000e-14 6.000000000000e+00 7.768580482397e-04 0.000000000000e+00 -7.768580482137e-04 -2.600000000000e-14 6.500000000000e+00 8.034206750259e-04 0.000000000000e+00 -8.034206749994e-04 -2.650000000000e-14 7.000000000000e+00 8.260980301383e-04 0.000000000000e+00 -8.260980301113e-04 -2.700000000000e-14 7.500000000000e+00 8.452320063382e-04 0.000000000000e+00 -8.452320063107e-04 -2.750000000000e-14 8.000000000000e+00 8.611660520575e-04 0.000000000000e+00 -8.611660520295e-04 -2.800000000000e-14 8.500000000000e+00 8.742449054822e-04 0.000000000000e+00 -8.742449054537e-04 -2.850000000000e-14 9.000000000000e+00 8.848112200587e-04 0.000000000000e+00 -8.848112200297e-04 -2.900000000000e-14 9.500000000000e+00 8.931999628154e-04 0.000000000000e+00 -8.931999627859e-04 -2.950000000000e-14 1.000000000000e+01 8.997318160803e-04 0.000000000000e+00 -8.997318160503e-04 -3.000000000000e-14 1.050000000000e+01 9.047068725179e-04 0.000000000000e+00 -9.047068724874e-04 -3.050000000000e-14 1.100000000000e+01 9.083997150851e-04 0.000000000000e+00 -9.083997150541e-04 -3.100000000000e-14 1.150000000000e+01 9.110566526234e-04 0.000000000000e+00 -9.110566525919e-04 -3.150000000000e-14 1.200000000000e+01 9.128956507301e-04 0.000000000000e+00 -9.128956506981e-04 -3.200000000000e-14 1.250000000000e+01 9.141097015296e-04 0.000000000000e+00 -9.141097014971e-04 -3.250000000000e-14 1.300000000000e+01 9.148755733146e-04 0.000000000000e+00 -9.148755732816e-04 -3.300000000000e-14 1.350000000000e+01 9.153686165120e-04 0.000000000000e+00 -9.153686164785e-04 -3.350000000000e-14 1.400000000000e+01 9.157491193718e-04 0.000000000000e+00 -9.157491193378e-04 -3.400000000000e-14 1.450000000000e+01 9.160963161695e-04 0.000000000000e+00 -9.160963161350e-04 -3.450000000000e-14 1.500000000000e+01 9.164275053666e-04 0.000000000000e+00 -9.164275053316e-04 -3.500000000000e-14 1.550000000000e+01 9.167461122680e-04 0.000000000000e+00 -9.167461122325e-04 -3.550000000000e-14 1.600000000000e+01 9.170536419735e-04 0.000000000000e+00 -9.170536419375e-04 -3.600000000000e-14 1.650000000000e+01 9.173512216989e-04 0.000000000000e+00 -9.173512216624e-04 -3.650000000000e-14 1.700000000000e+01 9.176398117096e-04 0.000000000000e+00 -9.176398116726e-04 -3.700000000000e-14 1.750000000000e+01 9.179202507143e-04 0.000000000000e+00 -9.179202506768e-04 -3.750000000000e-14 1.800000000000e+01 9.181932760923e-04 0.000000000000e+00 -9.181932760543e-04 -3.800000000000e-14 1.850000000000e+01 9.184595382936e-04 0.000000000000e+00 -9.184595382551e-04 -3.850000000000e-14 1.900000000000e+01 9.187196126627e-04 0.000000000000e+00 -9.187196126237e-04 -3.900000000000e-14 1.950000000000e+01 9.189740094722e-04 0.000000000000e+00 -9.189740094327e-04 -3.950000000000e-14 2.000000000000e+01 9.192231824980e-04 0.000000000000e+00 -9.192231824580e-04 -4.000000000000e-14 1.000000000000e+00 2.532154655852e-04 0.000000000000e+00 -2.532154655642e-04 -2.100000000000e-14 1.500000000000e+00 3.612559521761e-04 0.000000000000e+00 -3.612559521546e-04 -2.150000000000e-14 2.000000000000e+00 4.588066586672e-04 0.000000000000e+00 -4.588066586452e-04 -2.200000000000e-14 2.500000000000e+00 5.470449658217e-04 0.000000000000e+00 -5.470449657992e-04 -2.250000000000e-14 3.000000000000e+00 6.269794589615e-04 0.000000000000e+00 -6.269794589385e-04 -2.300000000000e-14 3.500000000000e+00 6.994723148070e-04 0.000000000000e+00 -6.994723147835e-04 -2.350000000000e-14 4.000000000000e+00 7.652605026447e-04 0.000000000000e+00 -7.652605026207e-04 -2.400000000000e-14 4.500000000000e+00 8.249747316305e-04 0.000000000000e+00 -8.249747316060e-04 -2.450000000000e-14 5.000000000000e+00 8.791559519769e-04 0.000000000000e+00 -8.791559519519e-04 -2.500000000000e-14 5.500000000000e+00 9.282696094833e-04 0.000000000000e+00 -9.282696094578e-04 -2.550000000000e-14 6.000000000000e+00 9.727179757010e-04 0.000000000000e+00 -9.727179756750e-04 -2.600000000000e-14 6.500000000000e+00 1.012850908017e-03 0.000000000000e+00 -1.012850907990e-03 -2.650000000000e-14 7.000000000000e+00 1.048975361148e-03 0.000000000000e+00 -1.048975361121e-03 -2.700000000000e-14 7.500000000000e+00 1.081363909640e-03 0.000000000000e+00 -1.081363909612e-03 -2.750000000000e-14 8.000000000000e+00 1.110262457471e-03 0.000000000000e+00 -1.110262457443e-03 -2.800000000000e-14 8.500000000000e+00 1.135897212642e-03 0.000000000000e+00 -1.135897212614e-03 -2.850000000000e-14 9.000000000000e+00 1.158480901631e-03 0.000000000000e+00 -1.158480901602e-03 -2.900000000000e-14 9.500000000000e+00 1.178218108681e-03 0.000000000000e+00 -1.178218108652e-03 -2.950000000000e-14 1.000000000000e+01 1.195309571309e-03 0.000000000000e+00 -1.195309571279e-03 -3.000000000000e-14 1.050000000000e+01 1.209955266426e-03 0.000000000000e+00 -1.209955266395e-03 -3.050000000000e-14 1.100000000000e+01 1.222356184991e-03 0.000000000000e+00 -1.222356184960e-03 -3.100000000000e-14 1.150000000000e+01 1.232714799075e-03 0.000000000000e+00 -1.232714799044e-03 -3.150000000000e-14 1.200000000000e+01 1.241234342886e-03 0.000000000000e+00 -1.241234342854e-03 -3.200000000000e-14 1.250000000000e+01 1.248117136071e-03 0.000000000000e+00 -1.248117136039e-03 -3.250000000000e-14 1.300000000000e+01 1.253562271854e-03 0.000000000000e+00 -1.253562271821e-03 -3.300000000000e-14 1.350000000000e+01 1.257763089978e-03 0.000000000000e+00 -1.257763089944e-03 -3.350000000000e-14 1.400000000000e+01 1.260904989694e-03 0.000000000000e+00 -1.260904989660e-03 -3.400000000000e-14 1.450000000000e+01 1.263164427309e-03 0.000000000000e+00 -1.263164427274e-03 -3.450000000000e-14 1.500000000000e+01 1.264710878839e-03 0.000000000000e+00 -1.264710878804e-03 -3.500000000000e-14 1.550000000000e+01 1.265717234365e-03 0.000000000000e+00 -1.265717234330e-03 -3.550000000000e-14 1.600000000000e+01 1.266391172622e-03 0.000000000000e+00 -1.266391172586e-03 -3.600000000000e-14 1.650000000000e+01 1.266950925739e-03 0.000000000000e+00 -1.266950925702e-03 -3.650000000000e-14 1.700000000000e+01 1.267476960616e-03 0.000000000000e+00 -1.267476960579e-03 -3.700000000000e-14 1.750000000000e+01 1.267978583028e-03 0.000000000000e+00 -1.267978582991e-03 -3.750000000000e-14 1.800000000000e+01 1.268458519756e-03 0.000000000000e+00 -1.268458519718e-03 -3.800000000000e-14 1.850000000000e+01 1.268918877236e-03 0.000000000000e+00 -1.268918877197e-03 -3.850000000000e-14 1.900000000000e+01 1.269361491522e-03 0.000000000000e+00 -1.269361491483e-03 -3.900000000000e-14 1.950000000000e+01 1.269787982153e-03 0.000000000000e+00 -1.269787982113e-03 -3.950000000000e-14 2.000000000000e+01 1.270199782458e-03 0.000000000000e+00 -1.270199782418e-03 -4.000000000000e-14 1.000000000000e+00 2.510113717121e-04 0.000000000000e+00 -2.510113716911e-04 -2.100000000000e-14 1.500000000000e+00 3.581393203385e-04 0.000000000000e+00 -3.581393203170e-04 -2.150000000000e-14 2.000000000000e+00 4.548984117215e-04 0.000000000000e+00 -4.548984116995e-04 -2.200000000000e-14 2.500000000000e+00 5.424601981305e-04 0.000000000000e+00 -5.424601981080e-04 -2.250000000000e-14 3.000000000000e+00 6.218272693100e-04 0.000000000000e+00 -6.218272692870e-04 -2.300000000000e-14 3.500000000000e+00 6.938560734415e-04 0.000000000000e+00 -6.938560734180e-04 -2.350000000000e-14 4.000000000000e+00 7.592782968150e-04 0.000000000000e+00 -7.592782967910e-04 -2.400000000000e-14 4.500000000000e+00 8.187198409154e-04 0.000000000000e+00 -8.187198408909e-04 -2.450000000000e-14 5.000000000000e+00 8.727172608560e-04 0.000000000000e+00 -8.727172608310e-04 -2.500000000000e-14 5.500000000000e+00 9.217318955137e-04 0.000000000000e+00 -9.217318954882e-04 -2.550000000000e-14 6.000000000000e+00 9.661620275278e-04 0.000000000000e+00 -9.661620275018e-04 -2.600000000000e-14 6.500000000000e+00 1.006353437829e-03 0.000000000000e+00 -1.006353437803e-03 -2.650000000000e-14 7.000000000000e+00 1.042608686015e-03 0.000000000000e+00 -1.042608685988e-03 -2.700000000000e-14 7.500000000000e+00 1.075195390082e-03 0.000000000000e+00 -1.075195390055e-03 -2.750000000000e-14 8.000000000000e+00 1.104353703056e-03 0.000000000000e+00 -1.104353703028e-03 -2.800000000000e-14 8.500000000000e+00 1.130303094677e-03 0.000000000000e+00 -1.130303094649e-03 -2.850000000000e-14 9.000000000000e+00 1.153248450260e-03 0.000000000000e+00 -1.153248450231e-03 -2.900000000000e-14 9.500000000000e+00 1.173385408979e-03 0.000000000000e+00 -1.173385408950e-03 -2.950000000000e-14 1.000000000000e+01 1.190904799652e-03 0.000000000000e+00 -1.190904799622e-03 -3.000000000000e-14 1.050000000000e+01 1.205996013272e-03 0.000000000000e+00 -1.205996013241e-03 -3.050000000000e-14 1.100000000000e+01 1.218849187505e-03 0.000000000000e+00 -1.218849187474e-03 -3.100000000000e-14 1.150000000000e+01 1.229656160075e-03 0.000000000000e+00 -1.229656160043e-03 -3.150000000000e-14 1.200000000000e+01 1.238610251603e-03 0.000000000000e+00 -1.238610251571e-03 -3.200000000000e-14 1.250000000000e+01 1.245905041457e-03 0.000000000000e+00 -1.245905041425e-03 -3.250000000000e-14 1.300000000000e+01 1.251732395331e-03 0.000000000000e+00 -1.251732395298e-03 -3.300000000000e-14 1.350000000000e+01 1.256280100027e-03 0.000000000000e+00 -1.256280099993e-03 -3.350000000000e-14 1.400000000000e+01 1.259729581769e-03 0.000000000000e+00 -1.259729581735e-03 -3.400000000000e-14 1.450000000000e+01 1.262254398111e-03 0.000000000000e+00 -1.262254398076e-03 -3.450000000000e-14 1.500000000000e+01 1.264020785816e-03 0.000000000000e+00 -1.264020785781e-03 -3.500000000000e-14 1.550000000000e+01 1.265193755773e-03 0.000000000000e+00 -1.265193755737e-03 -3.550000000000e-14 1.600000000000e+01 1.265959595176e-03 0.000000000000e+00 -1.265959595140e-03 -3.600000000000e-14 1.650000000000e+01 1.266544735888e-03 0.000000000000e+00 -1.266544735851e-03 -3.650000000000e-14 1.700000000000e+01 1.267082738455e-03 0.000000000000e+00 -1.267082738418e-03 -3.700000000000e-14 1.750000000000e+01 1.267594687070e-03 0.000000000000e+00 -1.267594687033e-03 -3.750000000000e-14 1.800000000000e+01 1.268084070295e-03 0.000000000000e+00 -1.268084070257e-03 -3.800000000000e-14 1.850000000000e+01 1.268553124499e-03 0.000000000000e+00 -1.268553124460e-03 -3.850000000000e-14 1.900000000000e+01 1.269003767808e-03 0.000000000000e+00 -1.269003767769e-03 -3.900000000000e-14 1.950000000000e+01 1.269437689439e-03 0.000000000000e+00 -1.269437689400e-03 -3.950000000000e-14 2.000000000000e+01 1.269856383818e-03 0.000000000000e+00 -1.269856383778e-03 -4.000000000000e-14 1.000000000000e+00 2.483485251272e-04 0.000000000000e+00 -2.483485251062e-04 -2.100000000000e-14 1.500000000000e+00 3.543661037674e-04 0.000000000000e+00 -3.543661037459e-04 -2.150000000000e-14 2.000000000000e+00 4.501560772921e-04 0.000000000000e+00 -4.501560772701e-04 -2.200000000000e-14 2.500000000000e+00 5.368833966721e-04 0.000000000000e+00 -5.368833966496e-04 -2.250000000000e-14 3.000000000000e+00 6.155438848617e-04 0.000000000000e+00 -6.155438848387e-04 -2.300000000000e-14 3.500000000000e+00 6.869875667694e-04 0.000000000000e+00 -6.869875667459e-04 -2.350000000000e-14 4.000000000000e+00 7.519402458311e-04 0.000000000000e+00 -7.519402458071e-04 -2.400000000000e-14 4.500000000000e+00 8.110225505661e-04 0.000000000000e+00 -8.110225505416e-04 -2.450000000000e-14 5.000000000000e+00 8.647662783066e-04 0.000000000000e+00 -8.647662782816e-04 -2.500000000000e-14 5.500000000000e+00 9.136284032953e-04 0.000000000000e+00 -9.136284032698e-04 -2.550000000000e-14 6.000000000000e+00 9.580030437869e-04 0.000000000000e+00 -9.580030437609e-04 -2.600000000000e-14 6.500000000000e+00 9.982317834925e-04 0.000000000000e+00 -9.982317834660e-04 -2.650000000000e-14 7.000000000000e+00 1.034612684552e-03 0.000000000000e+00 -1.034612684525e-03 -2.700000000000e-14 7.500000000000e+00 1.067408278025e-03 0.000000000000e+00 -1.067408277998e-03 -2.750000000000e-14 8.000000000000e+00 1.096852749805e-03 0.000000000000e+00 -1.096852749777e-03 -2.800000000000e-14 8.500000000000e+00 1.123158460944e-03 0.000000000000e+00 -1.123158460916e-03 -2.850000000000e-14 9.000000000000e+00 1.146521855199e-03 0.000000000000e+00 -1.146521855170e-03 -2.900000000000e-14 9.500000000000e+00 1.167128721148e-03 0.000000000000e+00 -1.167128721118e-03 -2.950000000000e-14 1.000000000000e+01 1.185158705841e-03 0.000000000000e+00 -1.185158705811e-03 -3.000000000000e-14 1.050000000000e+01 1.200788938805e-03 0.000000000000e+00 -1.200788938775e-03 -3.050000000000e-14 1.100000000000e+01 1.214196632069e-03 0.000000000000e+00 -1.214196632038e-03 -3.100000000000e-14 1.150000000000e+01 1.225560573210e-03 0.000000000000e+00 -1.225560573179e-03 -3.150000000000e-14 1.200000000000e+01 1.235061509622e-03 0.000000000000e+00 -1.235061509590e-03 -3.200000000000e-14 1.250000000000e+01 1.242881513580e-03 0.000000000000e+00 -1.242881513548e-03 -3.250000000000e-14 1.300000000000e+01 1.249202508520e-03 0.000000000000e+00 -1.249202508487e-03 -3.300000000000e-14 1.350000000000e+01 1.254204230167e-03 0.000000000000e+00 -1.254204230134e-03 -3.350000000000e-14 1.400000000000e+01 1.258062005193e-03 0.000000000000e+00 -1.258062005159e-03 -3.400000000000e-14 1.450000000000e+01 1.260944889912e-03 0.000000000000e+00 -1.260944889877e-03 -3.450000000000e-14 1.500000000000e+01 1.263015062563e-03 0.000000000000e+00 -1.263015062528e-03 -3.500000000000e-14 1.550000000000e+01 1.264430508649e-03 0.000000000000e+00 -1.264430508614e-03 -3.550000000000e-14 1.600000000000e+01 1.265357421910e-03 0.000000000000e+00 -1.265357421874e-03 -3.600000000000e-14 1.650000000000e+01 1.266001765424e-03 0.000000000000e+00 -1.266001765387e-03 -3.650000000000e-14 1.700000000000e+01 1.266557686607e-03 0.000000000000e+00 -1.266557686570e-03 -3.700000000000e-14 1.750000000000e+01 1.267083048208e-03 0.000000000000e+00 -1.267083048170e-03 -3.750000000000e-14 1.800000000000e+01 1.267584555076e-03 0.000000000000e+00 -1.267584555038e-03 -3.800000000000e-14 1.850000000000e+01 1.268064735067e-03 0.000000000000e+00 -1.268064735028e-03 -3.850000000000e-14 1.900000000000e+01 1.268525622719e-03 0.000000000000e+00 -1.268525622680e-03 -3.900000000000e-14 1.950000000000e+01 1.268968999960e-03 0.000000000000e+00 -1.268968999920e-03 -3.950000000000e-14 2.000000000000e+01 1.269396442027e-03 0.000000000000e+00 -1.269396441987e-03 -4.000000000000e-14 1.000000000000e+00 1.624062394999e-04 0.000000000000e+00 -1.624062394789e-04 -2.100000000000e-14 1.500000000000e+00 2.308099612313e-04 0.000000000000e+00 -2.308099612098e-04 -2.150000000000e-14 2.000000000000e+00 2.912962571119e-04 0.000000000000e+00 -2.912962570899e-04 -2.200000000000e-14 2.500000000000e+00 3.443640552021e-04 0.000000000000e+00 -3.443640551796e-04 -2.250000000000e-14 3.000000000000e+00 3.905178970876e-04 0.000000000000e+00 -3.905178970646e-04 -2.300000000000e-14 3.500000000000e+00 4.302655876785e-04 0.000000000000e+00 -4.302655876550e-04 -2.350000000000e-14 4.000000000000e+00 4.641216063698e-04 0.000000000000e+00 -4.641216063458e-04 -2.400000000000e-14 4.500000000000e+00 4.926113326826e-04 0.000000000000e+00 -4.926113326581e-04 -2.450000000000e-14 5.000000000000e+00 5.162726022971e-04 0.000000000000e+00 -5.162726022721e-04 -2.500000000000e-14 5.500000000000e+00 5.356525009116e-04 0.000000000000e+00 -5.356525008861e-04 -2.550000000000e-14 6.000000000000e+00 5.512988803654e-04 0.000000000000e+00 -5.512988803394e-04 -2.600000000000e-14 6.500000000000e+00 5.637476950335e-04 0.000000000000e+00 -5.637476950070e-04 -2.650000000000e-14 7.000000000000e+00 5.735085050606e-04 0.000000000000e+00 -5.735085050336e-04 -2.700000000000e-14 7.500000000000e+00 5.810509705079e-04 0.000000000000e+00 -5.810509704804e-04 -2.750000000000e-14 8.000000000000e+00 5.867947256690e-04 0.000000000000e+00 -5.867947256410e-04 -2.800000000000e-14 8.500000000000e+00 5.911039259664e-04 0.000000000000e+00 -5.911039259379e-04 -2.850000000000e-14 9.000000000000e+00 5.942865132013e-04 0.000000000000e+00 -5.942865131723e-04 -2.900000000000e-14 9.500000000000e+00 5.965973218656e-04 0.000000000000e+00 -5.965973218361e-04 -2.950000000000e-14 1.000000000000e+01 5.982437552614e-04 0.000000000000e+00 -5.982437552314e-04 -3.000000000000e-14 1.050000000000e+01 5.993928264498e-04 0.000000000000e+00 -5.993928264193e-04 -3.050000000000e-14 1.100000000000e+01 6.001786796011e-04 0.000000000000e+00 -6.001786795701e-04 -3.100000000000e-14 1.150000000000e+01 6.007099721859e-04 0.000000000000e+00 -6.007099721544e-04 -3.150000000000e-14 1.200000000000e+01 6.010761577196e-04 0.000000000000e+00 -6.010761576876e-04 -3.200000000000e-14 1.250000000000e+01 6.013493440235e-04 0.000000000000e+00 -6.013493439910e-04 -3.250000000000e-14 1.300000000000e+01 6.015789603052e-04 0.000000000000e+00 -6.015789602722e-04 -3.300000000000e-14 1.350000000000e+01 6.017896036077e-04 0.000000000000e+00 -6.017896035742e-04 -3.350000000000e-14 1.400000000000e+01 6.019904025777e-04 0.000000000000e+00 -6.019904025437e-04 -3.400000000000e-14 1.450000000000e+01 6.021845214261e-04 0.000000000000e+00 -6.021845213916e-04 -3.450000000000e-14 1.500000000000e+01 6.023732670217e-04 0.000000000000e+00 -6.023732669867e-04 -3.500000000000e-14 1.550000000000e+01 6.025573579535e-04 0.000000000000e+00 -6.025573579180e-04 -3.550000000000e-14 1.600000000000e+01 6.027372939013e-04 0.000000000000e+00 -6.027372938653e-04 -3.600000000000e-14 1.650000000000e+01 6.029134706361e-04 0.000000000000e+00 -6.029134705996e-04 -3.650000000000e-14 1.700000000000e+01 6.030862210546e-04 0.000000000000e+00 -6.030862210176e-04 -3.700000000000e-14 1.750000000000e+01 6.032558329054e-04 0.000000000000e+00 -6.032558328679e-04 -3.750000000000e-14 1.800000000000e+01 6.034225582968e-04 0.000000000000e+00 -6.034225582588e-04 -3.800000000000e-14 1.850000000000e+01 6.035866198492e-04 0.000000000000e+00 -6.035866198107e-04 -3.850000000000e-14 1.900000000000e+01 6.037482152092e-04 0.000000000000e+00 -6.037482151702e-04 -3.900000000000e-14 1.950000000000e+01 6.039075206069e-04 0.000000000000e+00 -6.039075205674e-04 -3.950000000000e-14 2.000000000000e+01 6.040646937662e-04 0.000000000000e+00 -6.040646937262e-04 -4.000000000000e-14 1.000000000000e+00 1.615288566321e-04 0.000000000000e+00 -1.615288566111e-04 -2.100000000000e-14 1.500000000000e+00 2.296114624621e-04 0.000000000000e+00 -2.296114624406e-04 -2.150000000000e-14 2.000000000000e+00 2.898610686402e-04 0.000000000000e+00 -2.898610686182e-04 -2.200000000000e-14 2.500000000000e+00 3.427754514365e-04 0.000000000000e+00 -3.427754514140e-04 -2.250000000000e-14 3.000000000000e+00 3.888544279024e-04 0.000000000000e+00 -3.888544278794e-04 -2.300000000000e-14 3.500000000000e+00 4.285979796821e-04 0.000000000000e+00 -4.285979796586e-04 -2.350000000000e-14 4.000000000000e+00 4.625101324887e-04 0.000000000000e+00 -4.625101324647e-04 -2.400000000000e-14 4.500000000000e+00 4.911038161522e-04 0.000000000000e+00 -4.911038161277e-04 -2.450000000000e-14 5.000000000000e+00 5.149032966074e-04 0.000000000000e+00 -5.149032965824e-04 -2.500000000000e-14 5.500000000000e+00 5.344420451704e-04 0.000000000000e+00 -5.344420451449e-04 -2.550000000000e-14 6.000000000000e+00 5.502553757089e-04 0.000000000000e+00 -5.502553756829e-04 -2.600000000000e-14 6.500000000000e+00 5.628687340035e-04 0.000000000000e+00 -5.628687339770e-04 -2.650000000000e-14 7.000000000000e+00 5.727837962002e-04 0.000000000000e+00 -5.727837961732e-04 -2.700000000000e-14 7.500000000000e+00 5.804651119360e-04 0.000000000000e+00 -5.804651119085e-04 -2.750000000000e-14 8.000000000000e+00 5.863297233316e-04 0.000000000000e+00 -5.863297233036e-04 -2.800000000000e-14 8.500000000000e+00 5.907411922449e-04 0.000000000000e+00 -5.907411922164e-04 -2.850000000000e-14 9.000000000000e+00 5.940082503809e-04 0.000000000000e+00 -5.940082503519e-04 -2.900000000000e-14 9.500000000000e+00 5.963873298474e-04 0.000000000000e+00 -5.963873298179e-04 -2.950000000000e-14 1.000000000000e+01 5.980877753731e-04 0.000000000000e+00 -5.980877753431e-04 -3.000000000000e-14 1.050000000000e+01 5.992785481772e-04 0.000000000000e+00 -5.992785481467e-04 -3.050000000000e-14 1.100000000000e+01 6.000955183061e-04 0.000000000000e+00 -6.000955182751e-04 -3.100000000000e-14 1.150000000000e+01 6.006487138922e-04 0.000000000000e+00 -6.006487138607e-04 -3.150000000000e-14 1.200000000000e+01 6.010286946283e-04 0.000000000000e+00 -6.010286945963e-04 -3.200000000000e-14 1.250000000000e+01 6.013090648434e-04 0.000000000000e+00 -6.013090648109e-04 -3.250000000000e-14 1.300000000000e+01 6.015417620992e-04 0.000000000000e+00 -6.015417620662e-04 -3.300000000000e-14 1.350000000000e+01 6.017537317317e-04 0.000000000000e+00 -6.017537316982e-04 -3.350000000000e-14 1.400000000000e+01 6.019552512929e-04 0.000000000000e+00 -6.019552512589e-04 -3.400000000000e-14 1.450000000000e+01 6.021498715059e-04 0.000000000000e+00 -6.021498714714e-04 -3.450000000000e-14 1.500000000000e+01 6.023390184125e-04 0.000000000000e+00 -6.023390183775e-04 -3.500000000000e-14 1.550000000000e+01 6.025234506322e-04 0.000000000000e+00 -6.025234505967e-04 -3.550000000000e-14 1.600000000000e+01 6.027036840854e-04 0.000000000000e+00 -6.027036840494e-04 -3.600000000000e-14 1.650000000000e+01 6.028801229438e-04 0.000000000000e+00 -6.028801229073e-04 -3.650000000000e-14 1.700000000000e+01 6.030531055252e-04 0.000000000000e+00 -6.030531054882e-04 -3.700000000000e-14 1.750000000000e+01 6.032229236319e-04 0.000000000000e+00 -6.032229235944e-04 -3.750000000000e-14 1.800000000000e+01 6.033898326566e-04 0.000000000000e+00 -6.033898326186e-04 -3.800000000000e-14 1.850000000000e+01 6.035540579879e-04 0.000000000000e+00 -6.035540579494e-04 -3.850000000000e-14 1.900000000000e+01 6.037157996521e-04 0.000000000000e+00 -6.037157996131e-04 -3.900000000000e-14 1.950000000000e+01 6.038752359470e-04 0.000000000000e+00 -6.038752359075e-04 -3.950000000000e-14 2.000000000000e+01 6.040325264040e-04 0.000000000000e+00 -6.040325263640e-04 -4.000000000000e-14 1.000000000000e+00 1.604606627438e-04 0.000000000000e+00 -1.604606627228e-04 -2.100000000000e-14 1.500000000000e+00 2.281483574254e-04 0.000000000000e+00 -2.281483574039e-04 -2.150000000000e-14 2.000000000000e+00 2.881036780236e-04 0.000000000000e+00 -2.881036780016e-04 -2.200000000000e-14 2.500000000000e+00 3.408236291185e-04 0.000000000000e+00 -3.408236290960e-04 -2.250000000000e-14 3.000000000000e+00 3.868030441727e-04 0.000000000000e+00 -3.868030441497e-04 -2.300000000000e-14 3.500000000000e+00 4.265332167844e-04 0.000000000000e+00 -4.265332167609e-04 -2.350000000000e-14 4.000000000000e+00 4.605062645298e-04 0.000000000000e+00 -4.605062645058e-04 -2.400000000000e-14 4.500000000000e+00 4.892206642751e-04 0.000000000000e+00 -4.892206642506e-04 -2.450000000000e-14 5.000000000000e+00 5.131846571859e-04 0.000000000000e+00 -5.131846571609e-04 -2.500000000000e-14 5.500000000000e+00 5.329153611155e-04 0.000000000000e+00 -5.329153610900e-04 -2.550000000000e-14 6.000000000000e+00 5.489327556606e-04 0.000000000000e+00 -5.489327556346e-04 -2.600000000000e-14 6.500000000000e+00 5.617491724446e-04 0.000000000000e+00 -5.617491724181e-04 -2.650000000000e-14 7.000000000000e+00 5.718562050588e-04 0.000000000000e+00 -5.718562050318e-04 -2.700000000000e-14 7.500000000000e+00 5.797116389839e-04 0.000000000000e+00 -5.797116389564e-04 -2.750000000000e-14 8.000000000000e+00 5.857288530821e-04 0.000000000000e+00 -5.857288530541e-04 -2.800000000000e-14 8.500000000000e+00 5.902702750228e-04 0.000000000000e+00 -5.902702749943e-04 -2.850000000000e-14 9.000000000000e+00 5.936453063143e-04 0.000000000000e+00 -5.936453062853e-04 -2.900000000000e-14 9.500000000000e+00 5.961121468471e-04 0.000000000000e+00 -5.961121468176e-04 -2.950000000000e-14 1.000000000000e+01 5.978824212951e-04 0.000000000000e+00 -5.978824212651e-04 -3.000000000000e-14 1.050000000000e+01 5.991274468204e-04 0.000000000000e+00 -5.991274467899e-04 -3.050000000000e-14 1.100000000000e+01 5.999852222185e-04 0.000000000000e+00 -5.999852221875e-04 -3.100000000000e-14 1.150000000000e+01 6.005674882576e-04 0.000000000000e+00 -6.005674882261e-04 -3.150000000000e-14 1.200000000000e+01 6.009661561121e-04 0.000000000000e+00 -6.009661560801e-04 -3.200000000000e-14 1.250000000000e+01 6.012565406001e-04 0.000000000000e+00 -6.012565405676e-04 -3.250000000000e-14 1.300000000000e+01 6.014935919711e-04 0.000000000000e+00 -6.014935919381e-04 -3.300000000000e-14 1.350000000000e+01 6.017073722475e-04 0.000000000000e+00 -6.017073722140e-04 -3.350000000000e-14 1.400000000000e+01 6.019098092219e-04 0.000000000000e+00 -6.019098091879e-04 -3.400000000000e-14 1.450000000000e+01 6.021050294305e-04 0.000000000000e+00 -6.021050293960e-04 -3.450000000000e-14 1.500000000000e+01 6.022946370591e-04 0.000000000000e+00 -6.022946370241e-04 -3.500000000000e-14 1.550000000000e+01 6.024794495574e-04 0.000000000000e+00 -6.024794495219e-04 -3.550000000000e-14 1.600000000000e+01 6.026600059567e-04 0.000000000000e+00 -6.026600059207e-04 -3.600000000000e-14 1.650000000000e+01 6.028367219301e-04 0.000000000000e+00 -6.028367218936e-04 -3.650000000000e-14 1.700000000000e+01 6.030099429891e-04 0.000000000000e+00 -6.030099429521e-04 -3.700000000000e-14 1.750000000000e+01 6.031799662192e-04 0.000000000000e+00 -6.031799661817e-04 -3.750000000000e-14 1.800000000000e+01 6.033470512570e-04 0.000000000000e+00 -6.033470512190e-04 -3.800000000000e-14 1.850000000000e+01 6.035114270580e-04 0.000000000000e+00 -6.035114270195e-04 -3.850000000000e-14 1.900000000000e+01 6.036732967148e-04 0.000000000000e+00 -6.036732966758e-04 -3.900000000000e-14 1.950000000000e+01 6.038328411924e-04 0.000000000000e+00 -6.038328411529e-04 -3.950000000000e-14 2.000000000000e+01 6.039902223589e-04 0.000000000000e+00 -6.039902223189e-04 -4.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Ig1_vb2.standard0000644000265600020320000010232412264261473023732 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 1.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 4.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 4.500000000000e+00 1.803591997973e-14 0.000000000000e+00 3.964133499354e-15 -2.200000000000e-14 5.000000000000e+00 3.182727454048e-08 0.000000000000e+00 -3.182725254046e-08 -2.200000000000e-14 5.500000000000e+00 2.259694415416e-05 0.000000000000e+00 -2.259694413216e-05 -2.200000000000e-14 6.000000000000e+00 1.146511858614e-04 0.000000000000e+00 -1.146511858394e-04 -2.200000000000e-14 6.500000000000e+00 2.770759696256e-04 0.000000000000e+00 -2.770759696036e-04 -2.200000000000e-14 7.000000000000e+00 4.787709754435e-04 0.000000000000e+00 -4.787709754215e-04 -2.200000000000e-14 7.500000000000e+00 6.516584294860e-04 0.000000000000e+00 -6.516584294640e-04 -2.200000000000e-14 8.000000000000e+00 7.851944159905e-04 0.000000000000e+00 -7.851944159685e-04 -2.200000000000e-14 8.500000000000e+00 8.866032784971e-04 0.000000000000e+00 -8.866032784751e-04 -2.200000000000e-14 9.000000000000e+00 9.644473974484e-04 0.000000000000e+00 -9.644473974264e-04 -2.200000000000e-14 9.500000000000e+00 1.025397827464e-03 0.000000000000e+00 -1.025397827442e-03 -2.200000000000e-14 1.000000000000e+01 1.074147877377e-03 0.000000000000e+00 -1.074147877355e-03 -2.200000000000e-14 1.050000000000e+01 1.113924917390e-03 0.000000000000e+00 -1.113924917368e-03 -2.200000000000e-14 1.100000000000e+01 1.146961147295e-03 0.000000000000e+00 -1.146961147273e-03 -2.200000000000e-14 1.150000000000e+01 1.174826420057e-03 0.000000000000e+00 -1.174826420035e-03 -2.200000000000e-14 1.200000000000e+01 1.198647302910e-03 0.000000000000e+00 -1.198647302888e-03 -2.200000000000e-14 1.250000000000e+01 1.219249043513e-03 0.000000000000e+00 -1.219249043491e-03 -2.200000000000e-14 1.300000000000e+01 1.237248119222e-03 0.000000000000e+00 -1.237248119200e-03 -2.200000000000e-14 1.350000000000e+01 1.253113466628e-03 0.000000000000e+00 -1.253113466606e-03 -2.200000000000e-14 1.400000000000e+01 1.267207730609e-03 0.000000000000e+00 -1.267207730587e-03 -2.200000000000e-14 1.450000000000e+01 1.279815584870e-03 0.000000000000e+00 -1.279815584848e-03 -2.200000000000e-14 1.500000000000e+01 1.291163541546e-03 0.000000000000e+00 -1.291163541524e-03 -2.200000000000e-14 1.550000000000e+01 1.301434055453e-03 0.000000000000e+00 -1.301434055431e-03 -2.200000000000e-14 1.600000000000e+01 1.310775734448e-03 0.000000000000e+00 -1.310775734426e-03 -2.200000000000e-14 1.650000000000e+01 1.319310845963e-03 0.000000000000e+00 -1.319310845941e-03 -2.200000000000e-14 1.700000000000e+01 1.327140915152e-03 0.000000000000e+00 -1.327140915130e-03 -2.200000000000e-14 1.750000000000e+01 1.334350955340e-03 0.000000000000e+00 -1.334350955318e-03 -2.200000000000e-14 1.800000000000e+01 1.341012704133e-03 0.000000000000e+00 -1.341012704111e-03 -2.200000000000e-14 1.850000000000e+01 1.347187126990e-03 0.000000000000e+00 -1.347187126968e-03 -2.200000000000e-14 1.900000000000e+01 1.352926374379e-03 0.000000000000e+00 -1.352926374357e-03 -2.200000000000e-14 1.950000000000e+01 1.358275326653e-03 0.000000000000e+00 -1.358275326631e-03 -2.200000000000e-14 2.000000000000e+01 1.363272824483e-03 0.000000000000e+00 -1.363272824461e-03 -2.200000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 4.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 4.500000000000e+00 2.432689466536e-14 0.000000000000e+00 6.731727684248e-16 -2.500000000000e-14 5.000000000000e+00 4.809763162967e-08 0.000000000000e+00 -4.809760662964e-08 -2.500000000000e-14 5.500000000000e+00 2.438762460924e-05 0.000000000000e+00 -2.438762458424e-05 -2.500000000000e-14 6.000000000000e+00 1.194789175709e-04 0.000000000000e+00 -1.194789175459e-04 -2.500000000000e-14 6.500000000000e+00 2.856886405378e-04 0.000000000000e+00 -2.856886405128e-04 -2.500000000000e-14 7.000000000000e+00 5.098097008880e-04 0.000000000000e+00 -5.098097008630e-04 -2.500000000000e-14 7.500000000000e+00 7.748926584119e-04 0.000000000000e+00 -7.748926583869e-04 -2.500000000000e-14 8.000000000000e+00 1.063747396140e-03 0.000000000000e+00 -1.063747396115e-03 -2.500000000000e-14 8.500000000000e+00 1.338000028557e-03 0.000000000000e+00 -1.338000028532e-03 -2.500000000000e-14 9.000000000000e+00 1.572882779375e-03 0.000000000000e+00 -1.572882779350e-03 -2.500000000000e-14 9.500000000000e+00 1.764889129337e-03 0.000000000000e+00 -1.764889129312e-03 -2.500000000000e-14 1.000000000000e+01 1.917782634951e-03 0.000000000000e+00 -1.917782634926e-03 -2.500000000000e-14 1.050000000000e+01 2.038369993772e-03 0.000000000000e+00 -2.038369993747e-03 -2.500000000000e-14 1.100000000000e+01 2.133752482968e-03 0.000000000000e+00 -2.133752482943e-03 -2.500000000000e-14 1.150000000000e+01 2.209998004314e-03 0.000000000000e+00 -2.209998004289e-03 -2.500000000000e-14 1.200000000000e+01 2.271814820241e-03 0.000000000000e+00 -2.271814820216e-03 -2.500000000000e-14 1.250000000000e+01 2.322697155183e-03 0.000000000000e+00 -2.322697155158e-03 -2.500000000000e-14 1.300000000000e+01 2.365197775194e-03 0.000000000000e+00 -2.365197775169e-03 -2.500000000000e-14 1.350000000000e+01 2.401181891980e-03 0.000000000000e+00 -2.401181891955e-03 -2.500000000000e-14 1.400000000000e+01 2.432023802766e-03 0.000000000000e+00 -2.432023802741e-03 -2.500000000000e-14 1.450000000000e+01 2.458748660199e-03 0.000000000000e+00 -2.458748660174e-03 -2.500000000000e-14 1.500000000000e+01 2.482131884635e-03 0.000000000000e+00 -2.482131884610e-03 -2.500000000000e-14 1.550000000000e+01 2.502768387207e-03 0.000000000000e+00 -2.502768387182e-03 -2.500000000000e-14 1.600000000000e+01 2.521120938987e-03 0.000000000000e+00 -2.521120938962e-03 -2.500000000000e-14 1.650000000000e+01 2.537554268324e-03 0.000000000000e+00 -2.537554268299e-03 -2.500000000000e-14 1.700000000000e+01 2.552359374515e-03 0.000000000000e+00 -2.552359374490e-03 -2.500000000000e-14 1.750000000000e+01 2.565771084760e-03 0.000000000000e+00 -2.565771084735e-03 -2.500000000000e-14 1.800000000000e+01 2.577980896430e-03 0.000000000000e+00 -2.577980896405e-03 -2.500000000000e-14 1.850000000000e+01 2.589146490773e-03 0.000000000000e+00 -2.589146490748e-03 -2.500000000000e-14 1.900000000000e+01 2.599398867724e-03 0.000000000000e+00 -2.599398867699e-03 -2.500000000000e-14 1.950000000000e+01 2.608847759592e-03 0.000000000000e+00 -2.608847759567e-03 -2.500000000000e-14 2.000000000000e+01 2.617585784520e-03 0.000000000000e+00 -2.617585784495e-03 -2.500000000000e-14 1.000000000000e+00 2.000049431627e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 3.915270885280e-14 0.000000000000e+00 -9.153347602007e-15 -3.000000000000e-14 5.000000000000e+00 9.297386855626e-08 0.000000000000e+00 -9.297383855785e-08 -3.000000000000e-14 5.500000000000e+00 2.740429079002e-05 0.000000000000e+00 -2.740429076002e-05 -3.000000000000e-14 6.000000000000e+00 1.268876094383e-04 0.000000000000e+00 -1.268876094083e-04 -3.000000000000e-14 6.500000000000e+00 2.974896191752e-04 0.000000000000e+00 -2.974896191452e-04 -3.000000000000e-14 7.000000000000e+00 5.254592379848e-04 0.000000000000e+00 -5.254592379548e-04 -3.000000000000e-14 7.500000000000e+00 7.939171226895e-04 0.000000000000e+00 -7.939171226595e-04 -3.000000000000e-14 8.000000000000e+00 1.087694927346e-03 0.000000000000e+00 -1.087694927316e-03 -3.000000000000e-14 8.500000000000e+00 1.395095549722e-03 0.000000000000e+00 -1.395095549692e-03 -3.000000000000e-14 9.000000000000e+00 1.707718166629e-03 0.000000000000e+00 -1.707718166599e-03 -3.000000000000e-14 9.500000000000e+00 2.016314358862e-03 0.000000000000e+00 -2.016314358832e-03 -3.000000000000e-14 1.000000000000e+01 2.302473849064e-03 0.000000000000e+00 -2.302473849034e-03 -3.000000000000e-14 1.050000000000e+01 2.556846840627e-03 0.000000000000e+00 -2.556846840597e-03 -3.000000000000e-14 1.100000000000e+01 2.775084106091e-03 0.000000000000e+00 -2.775084106061e-03 -3.000000000000e-14 1.150000000000e+01 2.956564916387e-03 0.000000000000e+00 -2.956564916357e-03 -3.000000000000e-14 1.200000000000e+01 3.104075111968e-03 0.000000000000e+00 -3.104075111938e-03 -3.000000000000e-14 1.250000000000e+01 3.222560323397e-03 0.000000000000e+00 -3.222560323367e-03 -3.000000000000e-14 1.300000000000e+01 3.317592454667e-03 0.000000000000e+00 -3.317592454637e-03 -3.000000000000e-14 1.350000000000e+01 3.394283846616e-03 0.000000000000e+00 -3.394283846586e-03 -3.000000000000e-14 1.400000000000e+01 3.456832057341e-03 0.000000000000e+00 -3.456832057311e-03 -3.000000000000e-14 1.450000000000e+01 3.508487786998e-03 0.000000000000e+00 -3.508487786968e-03 -3.000000000000e-14 1.500000000000e+01 3.551700907523e-03 0.000000000000e+00 -3.551700907493e-03 -3.000000000000e-14 1.550000000000e+01 3.588301885066e-03 0.000000000000e+00 -3.588301885036e-03 -3.000000000000e-14 1.600000000000e+01 3.619660967653e-03 0.000000000000e+00 -3.619660967623e-03 -3.000000000000e-14 1.650000000000e+01 3.646811728980e-03 0.000000000000e+00 -3.646811728950e-03 -3.000000000000e-14 1.700000000000e+01 3.670542012174e-03 0.000000000000e+00 -3.670542012144e-03 -3.000000000000e-14 1.750000000000e+01 3.691459433525e-03 0.000000000000e+00 -3.691459433495e-03 -3.000000000000e-14 1.800000000000e+01 3.710038276955e-03 0.000000000000e+00 -3.710038276925e-03 -3.000000000000e-14 1.850000000000e+01 3.726653143725e-03 0.000000000000e+00 -3.726653143695e-03 -3.000000000000e-14 1.900000000000e+01 3.741603264116e-03 0.000000000000e+00 -3.741603264086e-03 -3.000000000000e-14 1.950000000000e+01 3.755130225471e-03 0.000000000000e+00 -3.755130225441e-03 -3.000000000000e-14 2.000000000000e+01 3.767431034542e-03 0.000000000000e+00 -3.767431034512e-03 -3.000000000000e-14 1.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 1.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 4.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 4.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 5.000000000000e+00 7.089252709175e-11 0.000000000000e+00 -7.087052693042e-11 -2.200000000000e-14 5.500000000000e+00 1.585654279985e-05 0.000000000000e+00 -1.585654277785e-05 -2.200000000000e-14 6.000000000000e+00 1.222904567962e-04 0.000000000000e+00 -1.222904567742e-04 -2.200000000000e-14 6.500000000000e+00 3.271198712123e-04 0.000000000000e+00 -3.271198711903e-04 -2.200000000000e-14 7.000000000000e+00 5.835754316875e-04 0.000000000000e+00 -5.835754316655e-04 -2.200000000000e-14 7.500000000000e+00 7.866890805133e-04 0.000000000000e+00 -7.866890804913e-04 -2.200000000000e-14 8.000000000000e+00 9.309388264500e-04 0.000000000000e+00 -9.309388264280e-04 -2.200000000000e-14 8.500000000000e+00 1.032897797741e-03 0.000000000000e+00 -1.032897797719e-03 -2.200000000000e-14 9.000000000000e+00 1.106660499935e-03 0.000000000000e+00 -1.106660499913e-03 -2.200000000000e-14 9.500000000000e+00 1.161728181037e-03 0.000000000000e+00 -1.161728181015e-03 -2.200000000000e-14 1.000000000000e+01 1.204125160416e-03 0.000000000000e+00 -1.204125160394e-03 -2.200000000000e-14 1.050000000000e+01 1.237667828825e-03 0.000000000000e+00 -1.237667828803e-03 -2.200000000000e-14 1.100000000000e+01 1.264828357920e-03 0.000000000000e+00 -1.264828357898e-03 -2.200000000000e-14 1.150000000000e+01 1.287255981592e-03 0.000000000000e+00 -1.287255981570e-03 -2.200000000000e-14 1.200000000000e+01 1.306084434074e-03 0.000000000000e+00 -1.306084434052e-03 -2.200000000000e-14 1.250000000000e+01 1.322115236412e-03 0.000000000000e+00 -1.322115236390e-03 -2.200000000000e-14 1.300000000000e+01 1.335929576209e-03 0.000000000000e+00 -1.335929576187e-03 -2.200000000000e-14 1.350000000000e+01 1.347958491529e-03 0.000000000000e+00 -1.347958491507e-03 -2.200000000000e-14 1.400000000000e+01 1.358528123426e-03 0.000000000000e+00 -1.358528123404e-03 -2.200000000000e-14 1.450000000000e+01 1.367889663690e-03 0.000000000000e+00 -1.367889663668e-03 -2.200000000000e-14 1.500000000000e+01 1.376239657814e-03 0.000000000000e+00 -1.376239657792e-03 -2.200000000000e-14 1.550000000000e+01 1.383734076364e-03 0.000000000000e+00 -1.383734076342e-03 -2.200000000000e-14 1.600000000000e+01 1.390498265227e-03 0.000000000000e+00 -1.390498265205e-03 -2.200000000000e-14 1.650000000000e+01 1.396634111290e-03 0.000000000000e+00 -1.396634111268e-03 -2.200000000000e-14 1.700000000000e+01 1.402225289168e-03 0.000000000000e+00 -1.402225289146e-03 -2.200000000000e-14 1.750000000000e+01 1.407341161407e-03 0.000000000000e+00 -1.407341161385e-03 -2.200000000000e-14 1.800000000000e+01 1.412039718014e-03 0.000000000000e+00 -1.412039717992e-03 -2.200000000000e-14 1.850000000000e+01 1.416369820119e-03 0.000000000000e+00 -1.416369820097e-03 -2.200000000000e-14 1.900000000000e+01 1.420372932477e-03 0.000000000000e+00 -1.420372932455e-03 -2.200000000000e-14 1.950000000000e+01 1.424084475608e-03 0.000000000000e+00 -1.424084475586e-03 -2.200000000000e-14 2.000000000000e+01 1.427534891547e-03 0.000000000000e+00 -1.427534891525e-03 -2.200000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 4.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 4.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 5.000000000000e+00 1.271075163525e-10 0.000000000000e+00 -1.270825168122e-10 -2.500000000000e-14 5.500000000000e+00 1.755776472383e-05 0.000000000000e+00 -1.755776469883e-05 -2.500000000000e-14 6.000000000000e+00 1.279923380847e-04 0.000000000000e+00 -1.279923380597e-04 -2.500000000000e-14 6.500000000000e+00 3.375326569637e-04 0.000000000000e+00 -3.375326569387e-04 -2.500000000000e-14 7.000000000000e+00 6.196573909392e-04 0.000000000000e+00 -6.196573909142e-04 -2.500000000000e-14 7.500000000000e+00 9.431117108377e-04 0.000000000000e+00 -9.431117108127e-04 -2.500000000000e-14 8.000000000000e+00 1.281268987932e-03 0.000000000000e+00 -1.281268987907e-03 -2.500000000000e-14 8.500000000000e+00 1.583634048096e-03 0.000000000000e+00 -1.583634048071e-03 -2.500000000000e-14 9.000000000000e+00 1.829832630747e-03 0.000000000000e+00 -1.829832630722e-03 -2.500000000000e-14 9.500000000000e+00 2.021111376905e-03 0.000000000000e+00 -2.021111376880e-03 -2.500000000000e-14 1.000000000000e+01 2.165188019800e-03 0.000000000000e+00 -2.165188019775e-03 -2.500000000000e-14 1.050000000000e+01 2.272752570311e-03 0.000000000000e+00 -2.272752570286e-03 -2.500000000000e-14 1.100000000000e+01 2.353823099193e-03 0.000000000000e+00 -2.353823099168e-03 -2.500000000000e-14 1.150000000000e+01 2.416115734275e-03 0.000000000000e+00 -2.416115734250e-03 -2.500000000000e-14 1.200000000000e+01 2.465059369263e-03 0.000000000000e+00 -2.465059369238e-03 -2.500000000000e-14 1.250000000000e+01 2.504357984373e-03 0.000000000000e+00 -2.504357984348e-03 -2.500000000000e-14 1.300000000000e+01 2.536538539878e-03 0.000000000000e+00 -2.536538539853e-03 -2.500000000000e-14 1.350000000000e+01 2.563349236293e-03 0.000000000000e+00 -2.563349236268e-03 -2.500000000000e-14 1.400000000000e+01 2.586023503409e-03 0.000000000000e+00 -2.586023503384e-03 -2.500000000000e-14 1.450000000000e+01 2.605450112863e-03 0.000000000000e+00 -2.605450112838e-03 -2.500000000000e-14 1.500000000000e+01 2.622282822081e-03 0.000000000000e+00 -2.622282822056e-03 -2.500000000000e-14 1.550000000000e+01 2.637011901372e-03 0.000000000000e+00 -2.637011901347e-03 -2.500000000000e-14 1.600000000000e+01 2.650011603862e-03 0.000000000000e+00 -2.650011603837e-03 -2.500000000000e-14 1.650000000000e+01 2.661572272605e-03 0.000000000000e+00 -2.661572272580e-03 -2.500000000000e-14 1.700000000000e+01 2.671922475610e-03 0.000000000000e+00 -2.671922475585e-03 -2.500000000000e-14 1.750000000000e+01 2.681244550158e-03 0.000000000000e+00 -2.681244550133e-03 -2.500000000000e-14 1.800000000000e+01 2.689685710836e-03 0.000000000000e+00 -2.689685710811e-03 -2.500000000000e-14 1.850000000000e+01 2.697366117756e-03 0.000000000000e+00 -2.697366117731e-03 -2.500000000000e-14 1.900000000000e+01 2.704384826161e-03 0.000000000000e+00 -2.704384826136e-03 -2.500000000000e-14 1.950000000000e+01 2.710824235601e-03 0.000000000000e+00 -2.710824235576e-03 -2.500000000000e-14 2.000000000000e+01 2.716753460435e-03 0.000000000000e+00 -2.716753460410e-03 -2.500000000000e-14 1.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 5.000000000000e+00 3.343731853900e-10 0.000000000000e+00 -3.343431856052e-10 -3.000000000000e-14 5.500000000000e+00 2.051793379949e-05 0.000000000000e+00 -2.051793376949e-05 -3.000000000000e-14 6.000000000000e+00 1.368897502073e-04 0.000000000000e+00 -1.368897501773e-04 -3.000000000000e-14 6.500000000000e+00 3.519526954085e-04 0.000000000000e+00 -3.519526953785e-04 -3.000000000000e-14 7.000000000000e+00 6.381291162788e-04 0.000000000000e+00 -6.381291162488e-04 -3.000000000000e-14 7.500000000000e+00 9.646158356757e-04 0.000000000000e+00 -9.646158356457e-04 -3.000000000000e-14 8.000000000000e+00 1.308507232482e-03 0.000000000000e+00 -1.308507232452e-03 -3.000000000000e-14 8.500000000000e+00 1.655809672524e-03 0.000000000000e+00 -1.655809672494e-03 -3.000000000000e-14 9.000000000000e+00 1.998453771990e-03 0.000000000000e+00 -1.998453771960e-03 -3.000000000000e-14 9.500000000000e+00 2.325505255922e-03 0.000000000000e+00 -2.325505255892e-03 -3.000000000000e-14 1.000000000000e+01 2.618862297905e-03 0.000000000000e+00 -2.618862297875e-03 -3.000000000000e-14 1.050000000000e+01 2.871996293281e-03 0.000000000000e+00 -2.871996293251e-03 -3.000000000000e-14 1.100000000000e+01 3.081318972240e-03 0.000000000000e+00 -3.081318972210e-03 -3.000000000000e-14 1.150000000000e+01 3.247587371132e-03 0.000000000000e+00 -3.247587371102e-03 -3.000000000000e-14 1.200000000000e+01 3.376121519527e-03 0.000000000000e+00 -3.376121519497e-03 -3.000000000000e-14 1.250000000000e+01 3.474575098677e-03 0.000000000000e+00 -3.474575098647e-03 -3.000000000000e-14 1.300000000000e+01 3.550421538446e-03 0.000000000000e+00 -3.550421538416e-03 -3.000000000000e-14 1.350000000000e+01 3.609701477315e-03 0.000000000000e+00 -3.609701477285e-03 -3.000000000000e-14 1.400000000000e+01 3.656870137273e-03 0.000000000000e+00 -3.656870137243e-03 -3.000000000000e-14 1.450000000000e+01 3.695093190822e-03 0.000000000000e+00 -3.695093190792e-03 -3.000000000000e-14 1.500000000000e+01 3.726602339593e-03 0.000000000000e+00 -3.726602339563e-03 -3.000000000000e-14 1.550000000000e+01 3.752981659959e-03 0.000000000000e+00 -3.752981659929e-03 -3.000000000000e-14 1.600000000000e+01 3.775371237756e-03 0.000000000000e+00 -3.775371237726e-03 -3.000000000000e-14 1.650000000000e+01 3.794605329815e-03 0.000000000000e+00 -3.794605329785e-03 -3.000000000000e-14 1.700000000000e+01 3.811304980031e-03 0.000000000000e+00 -3.811304980001e-03 -3.000000000000e-14 1.750000000000e+01 3.825940303873e-03 0.000000000000e+00 -3.825940303843e-03 -3.000000000000e-14 1.800000000000e+01 3.838872823601e-03 0.000000000000e+00 -3.838872823571e-03 -3.000000000000e-14 1.850000000000e+01 3.850384651124e-03 0.000000000000e+00 -3.850384651094e-03 -3.000000000000e-14 1.900000000000e+01 3.860698915963e-03 0.000000000000e+00 -3.860698915933e-03 -3.000000000000e-14 1.950000000000e+01 3.869994289013e-03 0.000000000000e+00 -3.869994288983e-03 -3.000000000000e-14 2.000000000000e+01 3.878415466518e-03 0.000000000000e+00 -3.878415466488e-03 -3.000000000000e-14 1.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 1.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 3.500000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 4.000000000000e+00 1.307569504061e-14 0.000000000000e+00 8.924295976621e-15 -2.200000000000e-14 4.500000000000e+00 1.436957222049e-10 0.000000000000e+00 -1.436737220613e-10 -2.200000000000e-14 5.000000000000e+00 1.937285029542e-06 0.000000000000e+00 -1.937285007542e-06 -2.200000000000e-14 5.500000000000e+00 3.248264979501e-05 0.000000000000e+00 -3.248264977301e-05 -2.200000000000e-14 6.000000000000e+00 1.082432126138e-04 0.000000000000e+00 -1.082432125918e-04 -2.200000000000e-14 6.500000000000e+00 2.274951108239e-04 0.000000000000e+00 -2.274951108019e-04 -2.200000000000e-14 7.000000000000e+00 3.669895061294e-04 0.000000000000e+00 -3.669895061074e-04 -2.200000000000e-14 7.500000000000e+00 4.961317255738e-04 0.000000000000e+00 -4.961317255518e-04 -2.200000000000e-14 8.000000000000e+00 6.060233402986e-04 0.000000000000e+00 -6.060233402766e-04 -2.200000000000e-14 8.500000000000e+00 6.968897520226e-04 0.000000000000e+00 -6.968897520006e-04 -2.200000000000e-14 9.000000000000e+00 7.717661809397e-04 0.000000000000e+00 -7.717661809177e-04 -2.200000000000e-14 9.500000000000e+00 8.339156057143e-04 0.000000000000e+00 -8.339156056923e-04 -2.200000000000e-14 1.000000000000e+01 8.860756009167e-04 0.000000000000e+00 -8.860756008947e-04 -2.200000000000e-14 1.050000000000e+01 9.303739879768e-04 0.000000000000e+00 -9.303739879548e-04 -2.200000000000e-14 1.100000000000e+01 9.684268773192e-04 0.000000000000e+00 -9.684268772972e-04 -2.200000000000e-14 1.150000000000e+01 1.001459193673e-03 0.000000000000e+00 -1.001459193651e-03 -2.200000000000e-14 1.200000000000e+01 1.030405767793e-03 0.000000000000e+00 -1.030405767771e-03 -2.200000000000e-14 1.250000000000e+01 1.055987638683e-03 0.000000000000e+00 -1.055987638661e-03 -2.200000000000e-14 1.300000000000e+01 1.078767606034e-03 0.000000000000e+00 -1.078767606012e-03 -2.200000000000e-14 1.350000000000e+01 1.099190284502e-03 0.000000000000e+00 -1.099190284480e-03 -2.200000000000e-14 1.400000000000e+01 1.117611040050e-03 0.000000000000e+00 -1.117611040028e-03 -2.200000000000e-14 1.450000000000e+01 1.134317050426e-03 0.000000000000e+00 -1.134317050404e-03 -2.200000000000e-14 1.500000000000e+01 1.149542787177e-03 0.000000000000e+00 -1.149542787155e-03 -2.200000000000e-14 1.550000000000e+01 1.163481522941e-03 0.000000000000e+00 -1.163481522919e-03 -2.200000000000e-14 1.600000000000e+01 1.176293981449e-03 0.000000000000e+00 -1.176293981427e-03 -2.200000000000e-14 1.650000000000e+01 1.188114912290e-03 0.000000000000e+00 -1.188114912268e-03 -2.200000000000e-14 1.700000000000e+01 1.199058142152e-03 0.000000000000e+00 -1.199058142130e-03 -2.200000000000e-14 1.750000000000e+01 1.209220495374e-03 0.000000000000e+00 -1.209220495352e-03 -2.200000000000e-14 1.800000000000e+01 1.218684866466e-03 0.000000000000e+00 -1.218684866444e-03 -2.200000000000e-14 1.850000000000e+01 1.227522650059e-03 0.000000000000e+00 -1.227522650037e-03 -2.200000000000e-14 1.900000000000e+01 1.235795679196e-03 0.000000000000e+00 -1.235795679174e-03 -2.200000000000e-14 1.950000000000e+01 1.243557783944e-03 0.000000000000e+00 -1.243557783922e-03 -2.200000000000e-14 2.000000000000e+01 1.250856054203e-03 0.000000000000e+00 -1.250856054181e-03 -2.200000000000e-14 1.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 1.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 2.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 3.500000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 4.000000000000e+00 1.690661499687e-14 0.000000000000e+00 8.093224290331e-15 -2.500000000000e-14 4.500000000000e+00 1.962159792285e-10 0.000000000000e+00 -1.961909791513e-10 -2.500000000000e-14 5.000000000000e+00 2.249907569415e-06 0.000000000000e+00 -2.249907544415e-06 -2.500000000000e-14 5.500000000000e+00 3.431128373298e-05 0.000000000000e+00 -3.431128370798e-05 -2.500000000000e-14 6.000000000000e+00 1.121978170070e-04 0.000000000000e+00 -1.121978169820e-04 -2.500000000000e-14 6.500000000000e+00 2.346857929001e-04 0.000000000000e+00 -2.346857928751e-04 -2.500000000000e-14 7.000000000000e+00 3.963838059937e-04 0.000000000000e+00 -3.963838059687e-04 -2.500000000000e-14 7.500000000000e+00 5.902349834268e-04 0.000000000000e+00 -5.902349834018e-04 -2.500000000000e-14 8.000000000000e+00 8.068704720950e-04 0.000000000000e+00 -8.068704720700e-04 -2.500000000000e-14 8.500000000000e+00 1.024729280368e-03 0.000000000000e+00 -1.024729280343e-03 -2.500000000000e-14 9.000000000000e+00 1.226566467592e-03 0.000000000000e+00 -1.226566467567e-03 -2.500000000000e-14 9.500000000000e+00 1.404493148158e-03 0.000000000000e+00 -1.404493148133e-03 -2.500000000000e-14 1.000000000000e+01 1.556615565735e-03 0.000000000000e+00 -1.556615565710e-03 -2.500000000000e-14 1.050000000000e+01 1.684656344105e-03 0.000000000000e+00 -1.684656344080e-03 -2.500000000000e-14 1.100000000000e+01 1.791898621687e-03 0.000000000000e+00 -1.791898621662e-03 -2.500000000000e-14 1.150000000000e+01 1.881902582668e-03 0.000000000000e+00 -1.881902582643e-03 -2.500000000000e-14 1.200000000000e+01 1.957897791804e-03 0.000000000000e+00 -1.957897791779e-03 -2.500000000000e-14 1.250000000000e+01 2.022585806992e-03 0.000000000000e+00 -2.022585806967e-03 -2.500000000000e-14 1.300000000000e+01 2.078139515686e-03 0.000000000000e+00 -2.078139515661e-03 -2.500000000000e-14 1.350000000000e+01 2.126275932162e-03 0.000000000000e+00 -2.126275932137e-03 -2.500000000000e-14 1.400000000000e+01 2.168344084642e-03 0.000000000000e+00 -2.168344084617e-03 -2.500000000000e-14 1.450000000000e+01 2.205405020675e-03 0.000000000000e+00 -2.205405020650e-03 -2.500000000000e-14 1.500000000000e+01 2.238297401906e-03 0.000000000000e+00 -2.238297401881e-03 -2.500000000000e-14 1.550000000000e+01 2.267688784200e-03 0.000000000000e+00 -2.267688784175e-03 -2.500000000000e-14 1.600000000000e+01 2.294114829847e-03 0.000000000000e+00 -2.294114829822e-03 -2.500000000000e-14 1.650000000000e+01 2.318009025085e-03 0.000000000000e+00 -2.318009025060e-03 -2.500000000000e-14 1.700000000000e+01 2.339725166388e-03 0.000000000000e+00 -2.339725166363e-03 -2.500000000000e-14 1.750000000000e+01 2.359554420599e-03 0.000000000000e+00 -2.359554420574e-03 -2.500000000000e-14 1.800000000000e+01 2.377738335087e-03 0.000000000000e+00 -2.377738335062e-03 -2.500000000000e-14 1.850000000000e+01 2.394478824609e-03 0.000000000000e+00 -2.394478824584e-03 -2.500000000000e-14 1.900000000000e+01 2.409945893720e-03 0.000000000000e+00 -2.409945893695e-03 -2.500000000000e-14 1.950000000000e+01 2.424283654073e-03 0.000000000000e+00 -2.424283654048e-03 -2.500000000000e-14 2.000000000000e+01 2.437615049527e-03 0.000000000000e+00 -2.437615049502e-03 -2.500000000000e-14 1.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 2.410745214565e-14 0.000000000000e+00 5.892049647361e-15 -3.000000000000e-14 4.500000000000e+00 3.278681033267e-10 0.000000000000e+00 -3.278381029421e-10 -3.000000000000e-14 5.000000000000e+00 2.829477600620e-06 0.000000000000e+00 -2.829477570621e-06 -3.000000000000e-14 5.500000000000e+00 3.727345612070e-05 0.000000000000e+00 -3.727345609070e-05 -3.000000000000e-14 6.000000000000e+00 1.180980639039e-04 0.000000000000e+00 -1.180980638739e-04 -3.000000000000e-14 6.500000000000e+00 2.436787545711e-04 0.000000000000e+00 -2.436787545411e-04 -3.000000000000e-14 7.000000000000e+00 4.084408274828e-04 0.000000000000e+00 -4.084408274528e-04 -3.000000000000e-14 7.500000000000e+00 6.053381676236e-04 0.000000000000e+00 -6.053381675936e-04 -3.000000000000e-14 8.000000000000e+00 8.271951696020e-04 0.000000000000e+00 -8.271951695720e-04 -3.000000000000e-14 8.500000000000e+00 1.067444506008e-03 0.000000000000e+00 -1.067444505978e-03 -3.000000000000e-14 9.000000000000e+00 1.320413131188e-03 0.000000000000e+00 -1.320413131158e-03 -3.000000000000e-14 9.500000000000e+00 1.579527707585e-03 0.000000000000e+00 -1.579527707555e-03 -3.000000000000e-14 1.000000000000e+01 1.832918941135e-03 0.000000000000e+00 -1.832918941105e-03 -3.000000000000e-14 1.050000000000e+01 2.071192853261e-03 0.000000000000e+00 -2.071192853231e-03 -3.000000000000e-14 1.100000000000e+01 2.288026903424e-03 0.000000000000e+00 -2.288026903394e-03 -3.000000000000e-14 1.150000000000e+01 2.479859629394e-03 0.000000000000e+00 -2.479859629364e-03 -3.000000000000e-14 1.200000000000e+01 2.645865568280e-03 0.000000000000e+00 -2.645865568250e-03 -3.000000000000e-14 1.250000000000e+01 2.787384235647e-03 0.000000000000e+00 -2.787384235617e-03 -3.000000000000e-14 1.300000000000e+01 2.907064083947e-03 0.000000000000e+00 -2.907064083917e-03 -3.000000000000e-14 1.350000000000e+01 3.008063256248e-03 0.000000000000e+00 -3.008063256218e-03 -3.000000000000e-14 1.400000000000e+01 3.093495413611e-03 0.000000000000e+00 -3.093495413581e-03 -3.000000000000e-14 1.450000000000e+01 3.166138612799e-03 0.000000000000e+00 -3.166138612769e-03 -3.000000000000e-14 1.500000000000e+01 3.228334972574e-03 0.000000000000e+00 -3.228334972544e-03 -3.000000000000e-14 1.550000000000e+01 3.281997335560e-03 0.000000000000e+00 -3.281997335530e-03 -3.000000000000e-14 1.600000000000e+01 3.328662454045e-03 0.000000000000e+00 -3.328662454015e-03 -3.000000000000e-14 1.650000000000e+01 3.369556519413e-03 0.000000000000e+00 -3.369556519383e-03 -3.000000000000e-14 1.700000000000e+01 3.405657126687e-03 0.000000000000e+00 -3.405657126657e-03 -3.000000000000e-14 1.750000000000e+01 3.437745942854e-03 0.000000000000e+00 -3.437745942824e-03 -3.000000000000e-14 1.800000000000e+01 3.466451194096e-03 0.000000000000e+00 -3.466451194066e-03 -3.000000000000e-14 1.850000000000e+01 3.492281032481e-03 0.000000000000e+00 -3.492281032451e-03 -3.000000000000e-14 1.900000000000e+01 3.515649398488e-03 0.000000000000e+00 -3.515649398458e-03 -3.000000000000e-14 1.950000000000e+01 3.536895964214e-03 0.000000000000e+00 -3.536895964184e-03 -3.000000000000e-14 2.000000000000e+01 3.556301507128e-03 0.000000000000e+00 -3.556301507098e-03 -3.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/acVd_cosym.standard0000644000265600020320000000637312264261473023657 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 1 3.475337139497e-07 4.823286780491e-05 3.4092767010959e-14 8.97966048941174e-16 2 7.032059303370e-07 4.754114039476e-05 3.4329111229269e-14 9.06690653376673e-16 3 1.069776678414e-06 4.686075972449e-05 3.4571625952999e-14 9.16317708715173e-16 4 1.450180609400e-06 4.619123212457e-05 3.4822034330489e-14 9.26852360980173e-16 5 1.847583245057e-06 4.553204768723e-05 3.5082128558299e-14 9.38345232023873e-16 6 2.265441413178e-06 4.488267845507e-05 3.5353850818549e-14 9.50861794047472e-16 7 2.707570843153e-06 4.424257548777e-05 3.56393314761389e-14 9.64477965546172e-16 8 3.178224476900e-06 4.361116467712e-05 3.59409278643589e-14 9.79280555952171e-16 9 3.682184869003e-06 4.298784143115e-05 3.62612690473189e-14 9.95368539835871e-16 10 4.224874664951e-06 4.237196411966e-05 3.66033085376589e-14 1.01285471884997e-15 11 4.812490154692e-06 4.176284604916e-05 3.69703870669589e-14 1.03186776192397e-15 12 5.452164310228e-06 4.115974563053e-05 3.73663080188389e-14 1.05255468959197e-15 13 6.152167650108e-06 4.056185428305e-05 3.77954288535789e-14 1.07508390198197e-15 14 6.922157923240e-06 3.996828146469e-05 3.82627728200689e-14 1.09964888302997e-15 15 7.773493256414e-06 3.937803601334e-05 3.87741665530089e-14 1.12647275458697e-15 16 8.719628488520e-06 3.879000270240e-05 3.93364109147388e-14 1.15581390817097e-15 17 9.776621550535e-06 3.820291252382e-05 3.99574948430088e-14 1.18797301448797e-15 18 1.096378689273e-05 3.761530466158e-05 4.06468652680588e-14 1.22330180905796e-15 19 1.230454755442e-05 3.702547733476e-05 4.14157707497188e-14 1.26221418708796e-15 20 1.382755874884e-05 3.643142355598e-05 4.22777029378688e-14 1.30520032879196e-15 1 4.621777912906e-07 4.751571000876e-05 3.3817892241489e-14 1.13598955818797e-15 2 9.459058293568e-07 4.681743850498e-05 3.4154638260329e-14 1.14896832670797e-15 3 1.456753121668e-06 4.612750244301e-05 3.4504679909799e-14 1.16365911723797e-15 4 2.000870406085e-06 4.544520691964e-05 3.4871425892489e-14 1.18013794655497e-15 5 2.585179621940e-06 4.476977037306e-05 3.5258599450779e-14 1.19854005308996e-15 6 3.217585873098e-06 4.410031739229e-05 3.5670368811039e-14 1.21903001587396e-15 7 3.907233463743e-06 4.343586313235e-05 3.61114634863089e-14 1.24180427262896e-15 8 4.664824457802e-06 4.277529116607e-05 3.65873145397689e-14 1.26709652735096e-15 9 5.503022388823e-06 4.211732401454e-05 3.71042287074689e-14 1.29518494987896e-15 10 6.436971505833e-06 4.146048447520e-05 3.76696080874089e-14 1.32640149594896e-15 11 7.484973693459e-06 4.080304483600e-05 3.82922311353889e-14 1.36114395993196e-15 12 8.669382679605e-06 4.014295973707e-05 3.89826166579689e-14 1.39989164003496e-15 13 1.001780130670e-05 3.947777654549e-05 3.97535011851888e-14 1.44322585772696e-15 14 1.156470735333e-05 3.880451428940e-05 4.06204729468488e-14 1.49185709629596e-15 15 1.335369467116e-05 3.811949790065e-05 4.16028249697488e-14 1.54666130387395e-15 16 1.544061269574e-05 3.741812783536e-05 4.27247194456387e-14 1.60872910414795e-15 17 1.789804167026e-05 3.669455455205e-05 4.40168022804287e-14 1.67943355722295e-15 18 2.082179316434e-05 3.594121021416e-05 4.55184830422887e-14 1.76052524069695e-15 19 2.434054643013e-05 3.514812180711e-05 4.72812252054886e-14 1.85426880326095e-15 20 2.863044765589e-05 3.430188267531e-05 4.93734226507886e-14 1.96364486483494e-15 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_coovlp.standard0000644000265600020320000000754512264261473024355 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.49881292587846e-14 1.3272310423748e-14 1.28079660533749e-14 1258.925411794 2.49881292587809e-14 1.3272310423749e-14 1.28079660533738e-14 1584.893192461 2.49881292587756e-14 1.32723104237474e-14 1.28079660533714e-14 1995.262314969 2.49881292587789e-14 1.32723104237469e-14 1.28079660533727e-14 2511.88643151 2.4988129258776e-14 1.32723104237433e-14 1.28079660533718e-14 3162.277660168 2.49881292587808e-14 1.32723104237476e-14 1.28079660533741e-14 3981.071705535 2.49881292587757e-14 1.32723104237467e-14 1.28079660533753e-14 5011.872336273 2.49881292587769e-14 1.32723104237486e-14 1.28079660533755e-14 6309.573444802 2.49881292587773e-14 1.32723104237486e-14 1.28079660533743e-14 7943.282347243 2.49881292587701e-14 1.32723104237476e-14 1.28079660533737e-14 10000 2.49881292587846e-14 1.3272310423748e-14 1.28079660533749e-14 12589.25411794 2.49881292587809e-14 1.3272310423749e-14 1.28079660533738e-14 15848.93192461 2.49881292587756e-14 1.32723104237474e-14 1.28079660533714e-14 19952.62314969 2.4988129258771e-14 1.32723104237469e-14 1.28079660533727e-14 25118.8643151 2.49881292587697e-14 1.32723104237433e-14 1.28079660533718e-14 31622.77660168 2.49881292587757e-14 1.32723104237425e-14 1.28079660533741e-14 39810.71705535 2.49881292587717e-14 1.32723104237387e-14 1.28079660533753e-14 50118.72336273 2.49881292587674e-14 1.32723104237359e-14 1.28079660533723e-14 63095.73444802 2.49881292587647e-14 1.32723104237284e-14 1.28079660533718e-14 79432.82347243 2.49881292587501e-14 1.32723104237175e-14 1.28079660533717e-14 100000 2.49881292587369e-14 1.32723104236987e-14 1.28079660533701e-14 125892.5411794 2.49881292587303e-14 1.32723104236732e-14 1.28079660533738e-14 158489.3192461 2.49881292586952e-14 1.32723104236269e-14 1.28079660533613e-14 199526.2314969 2.49881292586433e-14 1.32723104235475e-14 1.28079660533567e-14 251188.643151 2.49881292585669e-14 1.32723104234329e-14 1.28079660533465e-14 316227.7660168 2.49881292584486e-14 1.32723104232594e-14 1.28079660533288e-14 398107.1705535 2.4988129258252e-14 1.32723104229671e-14 1.28079660533033e-14 501187.2336273 2.49881292579449e-14 1.32723104225101e-14 1.28079660532612e-14 630957.3444802 2.4988129257458e-14 1.32723104217886e-14 1.28079660531952e-14 794328.2347243 2.49881292566863e-14 1.32723104206419e-14 1.28079660530912e-14 1000000 2.49881292554583e-14 1.32723104188238e-14 1.28079660529245e-14 1258925.411794 2.49881292535344e-14 1.32723104159488e-14 1.28079660526659e-14 1584893.192461 2.49881292504608e-14 1.32723104113857e-14 1.28079660522467e-14 1995262.314969 2.49881292455856e-14 1.32723104041483e-14 1.28079660515859e-14 2511886.43151 2.49881292378733e-14 1.32723103926776e-14 1.28079660505332e-14 3162277.660168 2.49881292256541e-14 1.32723103745105e-14 1.28079660488797e-14 3981071.705535 2.49881292062727e-14 1.32723103457098e-14 1.28079660462512e-14 5011872.336273 2.49881291755646e-14 1.3272310300067e-14 1.28079660420832e-14 6309573.444802 2.49881291268968e-14 1.3272310227725e-14 1.28079660354801e-14 7943282.347243 2.49881290497702e-14 1.32723101130729e-14 1.28079660250121e-14 10000000 2.49881289275036e-14 1.32723099313624e-14 1.28079660084248e-14 12589254.11794 2.49881287337534e-14 1.32723096433758e-14 1.28079659821354e-14 15848931.92461 2.49881284266655e-14 1.32723091869348e-14 1.28079659404692e-14 19952623.14969 2.49881279399687e-14 1.32723084635189e-14 1.28079658744247e-14 25118864.3151 2.49881271686071e-14 1.32723073170023e-14 1.28079657697565e-14 31622776.60168 2.49881259460919e-14 1.32723054998898e-14 1.28079656038739e-14 39810717.05535 2.49881240085202e-14 1.32723026199579e-14 1.28079653409568e-14 50118723.36273 2.4988120937686e-14 1.32722980555798e-14 1.28079649242707e-14 63095734.44802 2.49881160707461e-14 1.32722908215413e-14 1.28079642638675e-14 79432823.47243 2.49881083571773e-14 1.32722793563824e-14 1.28079632171984e-14 100000000 2.4988096132052e-14 1.3272261185388e-14 1.28079615583475e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb0.standard0000644000265600020320000024357112264261473024270 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.641968399044e-09 0.000000000000e+00 -2.641958399492e-09 -1.000000000000e-14 1.200000000000e+00 1.234745073654e-07 0.000000000000e+00 -1.234744973652e-07 -1.000000000000e-14 1.400000000000e+00 2.310461020293e-06 0.000000000000e+00 -2.310461010294e-06 -1.000000000000e-14 1.600000000000e+00 1.119542008134e-05 0.000000000000e+00 -1.119542007134e-05 -1.000000000000e-14 1.800000000000e+00 2.937035171180e-05 0.000000000000e+00 -2.937035170180e-05 -1.000000000000e-14 2.000000000000e+00 5.786121995174e-05 0.000000000000e+00 -5.786121994174e-05 -1.000000000000e-14 2.200000000000e+00 9.703567615660e-05 0.000000000000e+00 -9.703567614660e-05 -1.000000000000e-14 2.400000000000e+00 1.468438303603e-04 0.000000000000e+00 -1.468438303503e-04 -1.000000000000e-14 2.600000000000e+00 2.069236318172e-04 0.000000000000e+00 -2.069236318072e-04 -1.000000000000e-14 2.800000000000e+00 2.766760673291e-04 0.000000000000e+00 -2.766760673191e-04 -1.000000000000e-14 3.000000000000e+00 3.553303348650e-04 0.000000000000e+00 -3.553303348550e-04 -1.000000000000e-14 3.200000000000e+00 4.420014413675e-04 0.000000000000e+00 -4.420014413575e-04 -1.000000000000e-14 3.400000000000e+00 5.357383638324e-04 0.000000000000e+00 -5.357383638224e-04 -1.000000000000e-14 3.600000000000e+00 6.355601255518e-04 0.000000000000e+00 -6.355601255418e-04 -1.000000000000e-14 3.800000000000e+00 7.404771360060e-04 0.000000000000e+00 -7.404771359960e-04 -1.000000000000e-14 4.000000000000e+00 8.494947116282e-04 0.000000000000e+00 -8.494947116182e-04 -1.000000000000e-14 4.200000000000e+00 9.615940646709e-04 0.000000000000e+00 -9.615940646609e-04 -1.000000000000e-14 4.400000000000e+00 1.075682832828e-03 0.000000000000e+00 -1.075682832818e-03 -1.000000000000e-14 4.600000000000e+00 1.190502884313e-03 0.000000000000e+00 -1.190502884303e-03 -1.000000000000e-14 4.800000000000e+00 1.303954692966e-03 0.000000000000e+00 -1.303954692956e-03 -1.000000000000e-14 5.000000000000e+00 1.402745597027e-03 0.000000000000e+00 -1.402745597017e-03 -1.000000000000e-14 5.200000000000e+00 1.477795267063e-03 0.000000000000e+00 -1.477795267053e-03 -1.000000000000e-14 5.400000000000e+00 1.533061383326e-03 0.000000000000e+00 -1.533061383316e-03 -1.000000000000e-14 5.600000000000e+00 1.574185356530e-03 0.000000000000e+00 -1.574185356520e-03 -1.000000000000e-14 5.800000000000e+00 1.605558904469e-03 0.000000000000e+00 -1.605558904459e-03 -1.000000000000e-14 6.000000000000e+00 1.630149733810e-03 0.000000000000e+00 -1.630149733800e-03 -1.000000000000e-14 6.200000000000e+00 1.649907424876e-03 0.000000000000e+00 -1.649907424866e-03 -1.000000000000e-14 6.400000000000e+00 1.666126633659e-03 0.000000000000e+00 -1.666126633649e-03 -1.000000000000e-14 6.600000000000e+00 1.679687521954e-03 0.000000000000e+00 -1.679687521944e-03 -1.000000000000e-14 6.800000000000e+00 1.691204305938e-03 0.000000000000e+00 -1.691204305928e-03 -1.000000000000e-14 7.000000000000e+00 1.701116649957e-03 0.000000000000e+00 -1.701116649947e-03 -1.000000000000e-14 7.200000000000e+00 1.709746721613e-03 0.000000000000e+00 -1.709746721603e-03 -1.000000000000e-14 7.400000000000e+00 1.717335630656e-03 0.000000000000e+00 -1.717335630646e-03 -1.000000000000e-14 7.600000000000e+00 1.724067269731e-03 0.000000000000e+00 -1.724067269721e-03 -1.000000000000e-14 7.800000000000e+00 1.730084285487e-03 0.000000000000e+00 -1.730084285477e-03 -1.000000000000e-14 8.000000000000e+00 1.735499018506e-03 0.000000000000e+00 -1.735499018496e-03 -1.000000000000e-14 8.200000000000e+00 1.740401152930e-03 0.000000000000e+00 -1.740401152920e-03 -1.000000000000e-14 8.400000000000e+00 1.744863167531e-03 0.000000000000e+00 -1.744863167521e-03 -1.000000000000e-14 8.600000000000e+00 1.748944287988e-03 0.000000000000e+00 -1.748944287978e-03 -1.000000000000e-14 8.800000000000e+00 1.752693398230e-03 0.000000000000e+00 -1.752693398220e-03 -1.000000000000e-14 9.000000000000e+00 1.756151216372e-03 0.000000000000e+00 -1.756151216362e-03 -1.000000000000e-14 9.200000000000e+00 1.759351942783e-03 0.000000000000e+00 -1.759351942773e-03 -1.000000000000e-14 9.400000000000e+00 1.762324523734e-03 0.000000000000e+00 -1.762324523724e-03 -1.000000000000e-14 9.600000000000e+00 1.765093631249e-03 0.000000000000e+00 -1.765093631239e-03 -1.000000000000e-14 9.800000000000e+00 1.767680430869e-03 0.000000000000e+00 -1.767680430859e-03 -1.000000000000e-14 1.000000000000e+01 1.770103189033e-03 0.000000000000e+00 -1.770103189023e-03 -1.000000000000e-14 1.020000000000e+01 1.772377757916e-03 0.000000000000e+00 -1.772377757906e-03 -1.000000000000e-14 1.040000000000e+01 1.774517965648e-03 0.000000000000e+00 -1.774517965638e-03 -1.000000000000e-14 1.060000000000e+01 1.776535932844e-03 0.000000000000e+00 -1.776535932834e-03 -1.000000000000e-14 1.080000000000e+01 1.778442331206e-03 0.000000000000e+00 -1.778442331196e-03 -1.000000000000e-14 1.100000000000e+01 1.780246596238e-03 0.000000000000e+00 -1.780246596228e-03 -1.000000000000e-14 1.120000000000e+01 1.781957119663e-03 0.000000000000e+00 -1.781957119653e-03 -1.000000000000e-14 1.140000000000e+01 1.783581327967e-03 0.000000000000e+00 -1.783581327957e-03 -1.000000000000e-14 1.160000000000e+01 1.785125911919e-03 0.000000000000e+00 -1.785125911909e-03 -1.000000000000e-14 1.180000000000e+01 1.786596855273e-03 0.000000000000e+00 -1.786596855263e-03 -1.000000000000e-14 1.200000000000e+01 1.787999541878e-03 0.000000000000e+00 -1.787999541868e-03 -1.000000000000e-14 1.220000000000e+01 1.789338830030e-03 0.000000000000e+00 -1.789338830020e-03 -1.000000000000e-14 1.240000000000e+01 1.790619115927e-03 0.000000000000e+00 -1.790619115917e-03 -1.000000000000e-14 1.260000000000e+01 1.791844388073e-03 0.000000000000e+00 -1.791844388063e-03 -1.000000000000e-14 1.280000000000e+01 1.793018274120e-03 0.000000000000e+00 -1.793018274110e-03 -1.000000000000e-14 1.300000000000e+01 1.794144081335e-03 0.000000000000e+00 -1.794144081325e-03 -1.000000000000e-14 1.320000000000e+01 1.795224831709e-03 0.000000000000e+00 -1.795224831699e-03 -1.000000000000e-14 1.340000000000e+01 1.796263292496e-03 0.000000000000e+00 -1.796263292486e-03 -1.000000000000e-14 1.360000000000e+01 1.797262002886e-03 0.000000000000e+00 -1.797262002876e-03 -1.000000000000e-14 1.380000000000e+01 1.798223297368e-03 0.000000000000e+00 -1.798223297358e-03 -1.000000000000e-14 1.400000000000e+01 1.799149326248e-03 0.000000000000e+00 -1.799149326238e-03 -1.000000000000e-14 1.420000000000e+01 1.800042073727e-03 0.000000000000e+00 -1.800042073717e-03 -1.000000000000e-14 1.440000000000e+01 1.800903373877e-03 0.000000000000e+00 -1.800903373867e-03 -1.000000000000e-14 1.460000000000e+01 1.801734924783e-03 0.000000000000e+00 -1.801734924773e-03 -1.000000000000e-14 1.480000000000e+01 1.802538301112e-03 0.000000000000e+00 -1.802538301102e-03 -1.000000000000e-14 1.500000000000e+01 1.803314965286e-03 0.000000000000e+00 -1.803314965276e-03 -1.000000000000e-14 1.520000000000e+01 1.804066277469e-03 0.000000000000e+00 -1.804066277459e-03 -1.000000000000e-14 1.540000000000e+01 1.804793504479e-03 0.000000000000e+00 -1.804793504469e-03 -1.000000000000e-14 1.560000000000e+01 1.805497827788e-03 0.000000000000e+00 -1.805497827778e-03 -1.000000000000e-14 1.580000000000e+01 1.806180350702e-03 0.000000000000e+00 -1.806180350692e-03 -1.000000000000e-14 1.600000000000e+01 1.806842104814e-03 0.000000000000e+00 -1.806842104804e-03 -1.000000000000e-14 1.620000000000e+01 1.807484055834e-03 0.000000000000e+00 -1.807484055824e-03 -1.000000000000e-14 1.640000000000e+01 1.808107108844e-03 0.000000000000e+00 -1.808107108834e-03 -1.000000000000e-14 1.660000000000e+01 1.808712113058e-03 0.000000000000e+00 -1.808712113048e-03 -1.000000000000e-14 1.680000000000e+01 1.809299866136e-03 0.000000000000e+00 -1.809299866126e-03 -1.000000000000e-14 1.700000000000e+01 1.809871118096e-03 0.000000000000e+00 -1.809871118086e-03 -1.000000000000e-14 1.720000000000e+01 1.810426574880e-03 0.000000000000e+00 -1.810426574870e-03 -1.000000000000e-14 1.740000000000e+01 1.810966901589e-03 0.000000000000e+00 -1.810966901579e-03 -1.000000000000e-14 1.760000000000e+01 1.811492725448e-03 0.000000000000e+00 -1.811492725438e-03 -1.000000000000e-14 1.780000000000e+01 1.812004638506e-03 0.000000000000e+00 -1.812004638496e-03 -1.000000000000e-14 1.800000000000e+01 1.812503200101e-03 0.000000000000e+00 -1.812503200091e-03 -1.000000000000e-14 1.820000000000e+01 1.812988939135e-03 0.000000000000e+00 -1.812988939125e-03 -1.000000000000e-14 1.840000000000e+01 1.813462356142e-03 0.000000000000e+00 -1.813462356132e-03 -1.000000000000e-14 1.860000000000e+01 1.813923925195e-03 0.000000000000e+00 -1.813923925185e-03 -1.000000000000e-14 1.880000000000e+01 1.814374095668e-03 0.000000000000e+00 -1.814374095658e-03 -1.000000000000e-14 1.900000000000e+01 1.814813293840e-03 0.000000000000e+00 -1.814813293830e-03 -1.000000000000e-14 1.920000000000e+01 1.815241924390e-03 0.000000000000e+00 -1.815241924380e-03 -1.000000000000e-14 1.940000000000e+01 1.815660371769e-03 0.000000000000e+00 -1.815660371759e-03 -1.000000000000e-14 1.960000000000e+01 1.816069001468e-03 0.000000000000e+00 -1.816069001458e-03 -1.000000000000e-14 1.980000000000e+01 1.816468161193e-03 0.000000000000e+00 -1.816468161183e-03 -1.000000000000e-14 2.000000000000e+01 1.816858181950e-03 0.000000000000e+00 -1.816858181940e-03 -1.000000000000e-14 1.000000000000e+00 2.641968386684e-09 0.000000000000e+00 -2.641958386624e-09 -1.000000000000e-14 1.200000000000e+00 1.234744804513e-07 0.000000000000e+00 -1.234744704515e-07 -1.000000000000e-14 1.400000000000e+00 2.310455301192e-06 0.000000000000e+00 -2.310455291192e-06 -1.000000000000e-14 1.600000000000e+00 1.119533756454e-05 0.000000000000e+00 -1.119533755454e-05 -1.000000000000e-14 1.800000000000e+00 2.936993829132e-05 0.000000000000e+00 -2.936993828132e-05 -1.000000000000e-14 2.000000000000e+00 5.785993307615e-05 0.000000000000e+00 -5.785993306615e-05 -1.000000000000e-14 2.200000000000e+00 9.703260359044e-05 0.000000000000e+00 -9.703260358044e-05 -1.000000000000e-14 2.400000000000e+00 1.468376291994e-04 0.000000000000e+00 -1.468376291894e-04 -1.000000000000e-14 2.600000000000e+00 2.069124748565e-04 0.000000000000e+00 -2.069124748465e-04 -1.000000000000e-14 2.800000000000e+00 2.766575706920e-04 0.000000000000e+00 -2.766575706820e-04 -1.000000000000e-14 3.000000000000e+00 3.553014236427e-04 0.000000000000e+00 -3.553014236327e-04 -1.000000000000e-14 3.200000000000e+00 4.419580848519e-04 0.000000000000e+00 -4.419580848419e-04 -1.000000000000e-14 3.400000000000e+00 5.356750687040e-04 0.000000000000e+00 -5.356750686940e-04 -1.000000000000e-14 3.600000000000e+00 6.354689933393e-04 0.000000000000e+00 -6.354689933293e-04 -1.000000000000e-14 3.800000000000e+00 7.403461290386e-04 0.000000000000e+00 -7.403461290286e-04 -1.000000000000e-14 4.000000000000e+00 8.493044503010e-04 0.000000000000e+00 -8.493044502910e-04 -1.000000000000e-14 4.200000000000e+00 9.613118603849e-04 0.000000000000e+00 -9.613118603749e-04 -1.000000000000e-14 4.400000000000e+00 1.075251569230e-03 0.000000000000e+00 -1.075251569220e-03 -1.000000000000e-14 4.600000000000e+00 1.189820596064e-03 0.000000000000e+00 -1.189820596054e-03 -1.000000000000e-14 4.800000000000e+00 1.302440071771e-03 0.000000000000e+00 -1.302440071761e-03 -1.000000000000e-14 5.000000000000e+00 1.398247870724e-03 0.000000000000e+00 -1.398247870714e-03 -1.000000000000e-14 5.200000000000e+00 1.470001882703e-03 0.000000000000e+00 -1.470001882693e-03 -1.000000000000e-14 5.400000000000e+00 1.522502641359e-03 0.000000000000e+00 -1.522502641349e-03 -1.000000000000e-14 5.600000000000e+00 1.561502200646e-03 0.000000000000e+00 -1.561502200636e-03 -1.000000000000e-14 5.800000000000e+00 1.591271463158e-03 0.000000000000e+00 -1.591271463148e-03 -1.000000000000e-14 6.000000000000e+00 1.614638542763e-03 0.000000000000e+00 -1.614638542753e-03 -1.000000000000e-14 6.200000000000e+00 1.633445124314e-03 0.000000000000e+00 -1.633445124304e-03 -1.000000000000e-14 6.400000000000e+00 1.648910014150e-03 0.000000000000e+00 -1.648910014140e-03 -1.000000000000e-14 6.600000000000e+00 1.661861054017e-03 0.000000000000e+00 -1.661861054007e-03 -1.000000000000e-14 6.800000000000e+00 1.672876142116e-03 0.000000000000e+00 -1.672876142106e-03 -1.000000000000e-14 7.000000000000e+00 1.682369334747e-03 0.000000000000e+00 -1.682369334737e-03 -1.000000000000e-14 7.200000000000e+00 1.690644406666e-03 0.000000000000e+00 -1.690644406656e-03 -1.000000000000e-14 7.400000000000e+00 1.697929007015e-03 0.000000000000e+00 -1.697929007005e-03 -1.000000000000e-14 7.600000000000e+00 1.704396998844e-03 0.000000000000e+00 -1.704396998834e-03 -1.000000000000e-14 7.800000000000e+00 1.710183429266e-03 0.000000000000e+00 -1.710183429256e-03 -1.000000000000e-14 8.000000000000e+00 1.715394790853e-03 0.000000000000e+00 -1.715394790843e-03 -1.000000000000e-14 8.200000000000e+00 1.720116203293e-03 0.000000000000e+00 -1.720116203283e-03 -1.000000000000e-14 8.400000000000e+00 1.724416536209e-03 0.000000000000e+00 -1.724416536199e-03 -1.000000000000e-14 8.600000000000e+00 1.728352127410e-03 0.000000000000e+00 -1.728352127400e-03 -1.000000000000e-14 8.800000000000e+00 1.731969524828e-03 0.000000000000e+00 -1.731969524818e-03 -1.000000000000e-14 9.000000000000e+00 1.735307538044e-03 0.000000000000e+00 -1.735307538034e-03 -1.000000000000e-14 9.200000000000e+00 1.738398793779e-03 0.000000000000e+00 -1.738398793769e-03 -1.000000000000e-14 9.400000000000e+00 1.741270929767e-03 0.000000000000e+00 -1.741270929757e-03 -1.000000000000e-14 9.600000000000e+00 1.743947521433e-03 0.000000000000e+00 -1.743947521423e-03 -1.000000000000e-14 9.800000000000e+00 1.746448808669e-03 0.000000000000e+00 -1.746448808659e-03 -1.000000000000e-14 1.000000000000e+01 1.748792271328e-03 0.000000000000e+00 -1.748792271318e-03 -1.000000000000e-14 1.020000000000e+01 1.750993088988e-03 0.000000000000e+00 -1.750993088978e-03 -1.000000000000e-14 1.040000000000e+01 1.753064511323e-03 0.000000000000e+00 -1.753064511313e-03 -1.000000000000e-14 1.060000000000e+01 1.755018158752e-03 0.000000000000e+00 -1.755018158742e-03 -1.000000000000e-14 1.080000000000e+01 1.756864268266e-03 0.000000000000e+00 -1.756864268256e-03 -1.000000000000e-14 1.100000000000e+01 1.758611895775e-03 0.000000000000e+00 -1.758611895765e-03 -1.000000000000e-14 1.120000000000e+01 1.760269099031e-03 0.000000000000e+00 -1.760269099021e-03 -1.000000000000e-14 1.140000000000e+01 1.761843013508e-03 0.000000000000e+00 -1.761843013498e-03 -1.000000000000e-14 1.160000000000e+01 1.763340069433e-03 0.000000000000e+00 -1.763340069423e-03 -1.000000000000e-14 1.180000000000e+01 1.764766020433e-03 0.000000000000e+00 -1.764766020423e-03 -1.000000000000e-14 1.200000000000e+01 1.766126045391e-03 0.000000000000e+00 -1.766126045381e-03 -1.000000000000e-14 1.220000000000e+01 1.767424819448e-03 0.000000000000e+00 -1.767424819438e-03 -1.000000000000e-14 1.240000000000e+01 1.768666574619e-03 0.000000000000e+00 -1.768666574609e-03 -1.000000000000e-14 1.260000000000e+01 1.769855151795e-03 0.000000000000e+00 -1.769855151785e-03 -1.000000000000e-14 1.280000000000e+01 1.770994045536e-03 0.000000000000e+00 -1.770994045526e-03 -1.000000000000e-14 1.300000000000e+01 1.772086442788e-03 0.000000000000e+00 -1.772086442778e-03 -1.000000000000e-14 1.320000000000e+01 1.773135256485e-03 0.000000000000e+00 -1.773135256475e-03 -1.000000000000e-14 1.340000000000e+01 1.774143154799e-03 0.000000000000e+00 -1.774143154789e-03 -1.000000000000e-14 1.360000000000e+01 1.775112586686e-03 0.000000000000e+00 -1.775112586676e-03 -1.000000000000e-14 1.380000000000e+01 1.776045804276e-03 0.000000000000e+00 -1.776045804266e-03 -1.000000000000e-14 1.400000000000e+01 1.776944882548e-03 0.000000000000e+00 -1.776944882538e-03 -1.000000000000e-14 1.420000000000e+01 1.777811736668e-03 0.000000000000e+00 -1.777811736658e-03 -1.000000000000e-14 1.440000000000e+01 1.778648137311e-03 0.000000000000e+00 -1.778648137301e-03 -1.000000000000e-14 1.460000000000e+01 1.779455724243e-03 0.000000000000e+00 -1.779455724233e-03 -1.000000000000e-14 1.480000000000e+01 1.780236018376e-03 0.000000000000e+00 -1.780236018366e-03 -1.000000000000e-14 1.500000000000e+01 1.780990432512e-03 0.000000000000e+00 -1.780990432502e-03 -1.000000000000e-14 1.520000000000e+01 1.781720280927e-03 0.000000000000e+00 -1.781720280917e-03 -1.000000000000e-14 1.540000000000e+01 1.782426787940e-03 0.000000000000e+00 -1.782426787930e-03 -1.000000000000e-14 1.560000000000e+01 1.783111095601e-03 0.000000000000e+00 -1.783111095591e-03 -1.000000000000e-14 1.580000000000e+01 1.783774270593e-03 0.000000000000e+00 -1.783774270583e-03 -1.000000000000e-14 1.600000000000e+01 1.784417310445e-03 0.000000000000e+00 -1.784417310435e-03 -1.000000000000e-14 1.620000000000e+01 1.785041149132e-03 0.000000000000e+00 -1.785041149122e-03 -1.000000000000e-14 1.640000000000e+01 1.785646662139e-03 0.000000000000e+00 -1.785646662129e-03 -1.000000000000e-14 1.660000000000e+01 1.786234671036e-03 0.000000000000e+00 -1.786234671026e-03 -1.000000000000e-14 1.680000000000e+01 1.786805947636e-03 0.000000000000e+00 -1.786805947626e-03 -1.000000000000e-14 1.700000000000e+01 1.787361217761e-03 0.000000000000e+00 -1.787361217751e-03 -1.000000000000e-14 1.720000000000e+01 1.787901164673e-03 0.000000000000e+00 -1.787901164663e-03 -1.000000000000e-14 1.740000000000e+01 1.788426432199e-03 0.000000000000e+00 -1.788426432189e-03 -1.000000000000e-14 1.760000000000e+01 1.788937627578e-03 0.000000000000e+00 -1.788937627568e-03 -1.000000000000e-14 1.780000000000e+01 1.789435324066e-03 0.000000000000e+00 -1.789435324056e-03 -1.000000000000e-14 1.800000000000e+01 1.789920063323e-03 0.000000000000e+00 -1.789920063313e-03 -1.000000000000e-14 1.820000000000e+01 1.790392357586e-03 0.000000000000e+00 -1.790392357576e-03 -1.000000000000e-14 1.840000000000e+01 1.790852691681e-03 0.000000000000e+00 -1.790852691671e-03 -1.000000000000e-14 1.860000000000e+01 1.791301524858e-03 0.000000000000e+00 -1.791301524848e-03 -1.000000000000e-14 1.880000000000e+01 1.791739292480e-03 0.000000000000e+00 -1.791739292470e-03 -1.000000000000e-14 1.900000000000e+01 1.792166407588e-03 0.000000000000e+00 -1.792166407578e-03 -1.000000000000e-14 1.920000000000e+01 1.792583262330e-03 0.000000000000e+00 -1.792583262320e-03 -1.000000000000e-14 1.940000000000e+01 1.792990229292e-03 0.000000000000e+00 -1.792990229282e-03 -1.000000000000e-14 1.960000000000e+01 1.793387662719e-03 0.000000000000e+00 -1.793387662709e-03 -1.000000000000e-14 1.980000000000e+01 1.793775899650e-03 0.000000000000e+00 -1.793775899640e-03 -1.000000000000e-14 2.000000000000e+01 1.794155260968e-03 0.000000000000e+00 -1.794155260958e-03 -1.000000000000e-14 1.000000000000e+00 2.641968370205e-09 0.000000000000e+00 -2.641958370317e-09 -1.000000000000e-14 1.200000000000e+00 1.234744463454e-07 0.000000000000e+00 -1.234744363455e-07 -1.000000000000e-14 1.400000000000e+00 2.310448053794e-06 0.000000000000e+00 -2.310448043794e-06 -1.000000000000e-14 1.600000000000e+00 1.119523299785e-05 0.000000000000e+00 -1.119523298785e-05 -1.000000000000e-14 1.800000000000e+00 2.936941439620e-05 0.000000000000e+00 -2.936941438620e-05 -1.000000000000e-14 2.000000000000e+00 5.785830227994e-05 0.000000000000e+00 -5.785830226994e-05 -1.000000000000e-14 2.200000000000e+00 9.702870963983e-05 0.000000000000e+00 -9.702870962983e-05 -1.000000000000e-14 2.400000000000e+00 1.468297693943e-04 0.000000000000e+00 -1.468297693843e-04 -1.000000000000e-14 2.600000000000e+00 2.068983309315e-04 0.000000000000e+00 -2.068983309215e-04 -1.000000000000e-14 2.800000000000e+00 2.766341145636e-04 0.000000000000e+00 -2.766341145536e-04 -1.000000000000e-14 3.000000000000e+00 3.552647417214e-04 0.000000000000e+00 -3.552647417114e-04 -1.000000000000e-14 3.200000000000e+00 4.419030310301e-04 0.000000000000e+00 -4.419030310201e-04 -1.000000000000e-14 3.400000000000e+00 5.355945976441e-04 0.000000000000e+00 -5.355945976341e-04 -1.000000000000e-14 3.600000000000e+00 6.353529134009e-04 0.000000000000e+00 -6.353529133909e-04 -1.000000000000e-14 3.800000000000e+00 7.401787899805e-04 0.000000000000e+00 -7.401787899705e-04 -1.000000000000e-14 4.000000000000e+00 8.490604314703e-04 0.000000000000e+00 -8.490604314603e-04 -1.000000000000e-14 4.200000000000e+00 9.609478515246e-04 0.000000000000e+00 -9.609478515146e-04 -1.000000000000e-14 4.400000000000e+00 1.074691085021e-03 0.000000000000e+00 -1.074691085011e-03 -1.000000000000e-14 4.600000000000e+00 1.188925474033e-03 0.000000000000e+00 -1.188925474023e-03 -1.000000000000e-14 4.800000000000e+00 1.300206538974e-03 0.000000000000e+00 -1.300206538964e-03 -1.000000000000e-14 5.000000000000e+00 1.392059065603e-03 0.000000000000e+00 -1.392059065593e-03 -1.000000000000e-14 5.200000000000e+00 1.459727032076e-03 0.000000000000e+00 -1.459727032066e-03 -1.000000000000e-14 5.400000000000e+00 1.508904031896e-03 0.000000000000e+00 -1.508904031886e-03 -1.000000000000e-14 5.600000000000e+00 1.545387638792e-03 0.000000000000e+00 -1.545387638782e-03 -1.000000000000e-14 5.800000000000e+00 1.573268670674e-03 0.000000000000e+00 -1.573268670664e-03 -1.000000000000e-14 6.000000000000e+00 1.595198328720e-03 0.000000000000e+00 -1.595198328710e-03 -1.000000000000e-14 6.200000000000e+00 1.612887799856e-03 0.000000000000e+00 -1.612887799846e-03 -1.000000000000e-14 6.400000000000e+00 1.627465953259e-03 0.000000000000e+00 -1.627465953249e-03 -1.000000000000e-14 6.600000000000e+00 1.639699177030e-03 0.000000000000e+00 -1.639699177020e-03 -1.000000000000e-14 6.800000000000e+00 1.650122906391e-03 0.000000000000e+00 -1.650122906381e-03 -1.000000000000e-14 7.000000000000e+00 1.659121318746e-03 0.000000000000e+00 -1.659121318736e-03 -1.000000000000e-14 7.200000000000e+00 1.666976743335e-03 0.000000000000e+00 -1.666976743325e-03 -1.000000000000e-14 7.400000000000e+00 1.673901133142e-03 0.000000000000e+00 -1.673901133132e-03 -1.000000000000e-14 7.600000000000e+00 1.680056649464e-03 0.000000000000e+00 -1.680056649454e-03 -1.000000000000e-14 7.800000000000e+00 1.685569465668e-03 0.000000000000e+00 -1.685569465658e-03 -1.000000000000e-14 8.000000000000e+00 1.690539239247e-03 0.000000000000e+00 -1.690539239237e-03 -1.000000000000e-14 8.200000000000e+00 1.695045749520e-03 0.000000000000e+00 -1.695045749510e-03 -1.000000000000e-14 8.400000000000e+00 1.699153638959e-03 0.000000000000e+00 -1.699153638949e-03 -1.000000000000e-14 8.600000000000e+00 1.702915859422e-03 0.000000000000e+00 -1.702915859412e-03 -1.000000000000e-14 8.800000000000e+00 1.706376217078e-03 0.000000000000e+00 -1.706376217068e-03 -1.000000000000e-14 9.000000000000e+00 1.709571279183e-03 0.000000000000e+00 -1.709571279173e-03 -1.000000000000e-14 9.200000000000e+00 1.712531821759e-03 0.000000000000e+00 -1.712531821749e-03 -1.000000000000e-14 9.400000000000e+00 1.715283942173e-03 0.000000000000e+00 -1.715283942163e-03 -1.000000000000e-14 9.600000000000e+00 1.717849923787e-03 0.000000000000e+00 -1.717849923777e-03 -1.000000000000e-14 9.800000000000e+00 1.720248914901e-03 0.000000000000e+00 -1.720248914891e-03 -1.000000000000e-14 1.000000000000e+01 1.722497466986e-03 0.000000000000e+00 -1.722497466976e-03 -1.000000000000e-14 1.020000000000e+01 1.724609965152e-03 0.000000000000e+00 -1.724609965142e-03 -1.000000000000e-14 1.040000000000e+01 1.726598975272e-03 0.000000000000e+00 -1.726598975262e-03 -1.000000000000e-14 1.060000000000e+01 1.728475526049e-03 0.000000000000e+00 -1.728475526039e-03 -1.000000000000e-14 1.080000000000e+01 1.730249339862e-03 0.000000000000e+00 -1.730249339852e-03 -1.000000000000e-14 1.100000000000e+01 1.731929040008e-03 0.000000000000e+00 -1.731929039998e-03 -1.000000000000e-14 1.120000000000e+01 1.733522237257e-03 0.000000000000e+00 -1.733522237247e-03 -1.000000000000e-14 1.140000000000e+01 1.735035772967e-03 0.000000000000e+00 -1.735035772957e-03 -1.000000000000e-14 1.160000000000e+01 1.736475751202e-03 0.000000000000e+00 -1.736475751192e-03 -1.000000000000e-14 1.180000000000e+01 1.737847652293e-03 0.000000000000e+00 -1.737847652283e-03 -1.000000000000e-14 1.200000000000e+01 1.739156411620e-03 0.000000000000e+00 -1.739156411610e-03 -1.000000000000e-14 1.220000000000e+01 1.740406486607e-03 0.000000000000e+00 -1.740406486597e-03 -1.000000000000e-14 1.240000000000e+01 1.741601914009e-03 0.000000000000e+00 -1.741601913999e-03 -1.000000000000e-14 1.260000000000e+01 1.742746359081e-03 0.000000000000e+00 -1.742746359071e-03 -1.000000000000e-14 1.280000000000e+01 1.743843157950e-03 0.000000000000e+00 -1.743843157940e-03 -1.000000000000e-14 1.300000000000e+01 1.744895354270e-03 0.000000000000e+00 -1.744895354260e-03 -1.000000000000e-14 1.320000000000e+01 1.745905731046e-03 0.000000000000e+00 -1.745905731036e-03 -1.000000000000e-14 1.340000000000e+01 1.746876838347e-03 0.000000000000e+00 -1.746876838337e-03 -1.000000000000e-14 1.360000000000e+01 1.747811017540e-03 0.000000000000e+00 -1.747811017530e-03 -1.000000000000e-14 1.380000000000e+01 1.748710422515e-03 0.000000000000e+00 -1.748710422505e-03 -1.000000000000e-14 1.400000000000e+01 1.749577038366e-03 0.000000000000e+00 -1.749577038356e-03 -1.000000000000e-14 1.420000000000e+01 1.750412697850e-03 0.000000000000e+00 -1.750412697840e-03 -1.000000000000e-14 1.440000000000e+01 1.751219095945e-03 0.000000000000e+00 -1.751219095935e-03 -1.000000000000e-14 1.460000000000e+01 1.751997802750e-03 0.000000000000e+00 -1.751997802740e-03 -1.000000000000e-14 1.480000000000e+01 1.752750274954e-03 0.000000000000e+00 -1.752750274944e-03 -1.000000000000e-14 1.500000000000e+01 1.753477866048e-03 0.000000000000e+00 -1.753477866038e-03 -1.000000000000e-14 1.520000000000e+01 1.754181835445e-03 0.000000000000e+00 -1.754181835435e-03 -1.000000000000e-14 1.540000000000e+01 1.754863356637e-03 0.000000000000e+00 -1.754863356627e-03 -1.000000000000e-14 1.560000000000e+01 1.755523524515e-03 0.000000000000e+00 -1.755523524505e-03 -1.000000000000e-14 1.580000000000e+01 1.756163361944e-03 0.000000000000e+00 -1.756163361934e-03 -1.000000000000e-14 1.600000000000e+01 1.756783825677e-03 0.000000000000e+00 -1.756783825667e-03 -1.000000000000e-14 1.620000000000e+01 1.757385811699e-03 0.000000000000e+00 -1.757385811689e-03 -1.000000000000e-14 1.640000000000e+01 1.757970160048e-03 0.000000000000e+00 -1.757970160038e-03 -1.000000000000e-14 1.660000000000e+01 1.758537659187e-03 0.000000000000e+00 -1.758537659177e-03 -1.000000000000e-14 1.680000000000e+01 1.759089049960e-03 0.000000000000e+00 -1.759089049950e-03 -1.000000000000e-14 1.700000000000e+01 1.759625029195e-03 0.000000000000e+00 -1.759625029185e-03 -1.000000000000e-14 1.720000000000e+01 1.760146252973e-03 0.000000000000e+00 -1.760146252963e-03 -1.000000000000e-14 1.740000000000e+01 1.760653339611e-03 0.000000000000e+00 -1.760653339601e-03 -1.000000000000e-14 1.760000000000e+01 1.761146872385e-03 0.000000000000e+00 -1.761146872375e-03 -1.000000000000e-14 1.780000000000e+01 1.761627402017e-03 0.000000000000e+00 -1.761627402007e-03 -1.000000000000e-14 1.800000000000e+01 1.762095448952e-03 0.000000000000e+00 -1.762095448942e-03 -1.000000000000e-14 1.820000000000e+01 1.762551505440e-03 0.000000000000e+00 -1.762551505430e-03 -1.000000000000e-14 1.840000000000e+01 1.762996037455e-03 0.000000000000e+00 -1.762996037445e-03 -1.000000000000e-14 1.860000000000e+01 1.763429486451e-03 0.000000000000e+00 -1.763429486441e-03 -1.000000000000e-14 1.880000000000e+01 1.763852270980e-03 0.000000000000e+00 -1.763852270970e-03 -1.000000000000e-14 1.900000000000e+01 1.764264788182e-03 0.000000000000e+00 -1.764264788172e-03 -1.000000000000e-14 1.920000000000e+01 1.764667415161e-03 0.000000000000e+00 -1.764667415151e-03 -1.000000000000e-14 1.940000000000e+01 1.765060510250e-03 0.000000000000e+00 -1.765060510240e-03 -1.000000000000e-14 1.960000000000e+01 1.765444414187e-03 0.000000000000e+00 -1.765444414177e-03 -1.000000000000e-14 1.980000000000e+01 1.765819451195e-03 0.000000000000e+00 -1.765819451185e-03 -1.000000000000e-14 2.000000000000e+01 1.766185929992e-03 0.000000000000e+00 -1.766185929982e-03 -1.000000000000e-14 1.000000000000e+00 1.136862739365e-12 0.000000000000e+00 -1.126862587885e-12 -1.000000000000e-14 1.200000000000e+00 2.328145269886e-10 0.000000000000e+00 -2.328045267838e-10 -1.000000000000e-14 1.400000000000e+00 5.435745611330e-08 0.000000000000e+00 -5.435744611316e-08 -1.000000000000e-14 1.600000000000e+00 2.717537855153e-06 0.000000000000e+00 -2.717537845153e-06 -1.000000000000e-14 1.800000000000e+00 1.541908698391e-05 0.000000000000e+00 -1.541908697391e-05 -1.000000000000e-14 2.000000000000e+00 4.182087346232e-05 0.000000000000e+00 -4.182087345232e-05 -1.000000000000e-14 2.200000000000e+00 8.320206878859e-05 0.000000000000e+00 -8.320206877859e-05 -1.000000000000e-14 2.400000000000e+00 1.398100536443e-04 0.000000000000e+00 -1.398100536343e-04 -1.000000000000e-14 2.600000000000e+00 2.111349774536e-04 0.000000000000e+00 -2.111349774436e-04 -1.000000000000e-14 2.800000000000e+00 2.960796172815e-04 0.000000000000e+00 -2.960796172715e-04 -1.000000000000e-14 3.000000000000e+00 3.931312504665e-04 0.000000000000e+00 -3.931312504565e-04 -1.000000000000e-14 3.200000000000e+00 5.005319218004e-04 0.000000000000e+00 -5.005319217904e-04 -1.000000000000e-14 3.400000000000e+00 6.164258646982e-04 0.000000000000e+00 -6.164258646882e-04 -1.000000000000e-14 3.600000000000e+00 7.389649199386e-04 0.000000000000e+00 -7.389649199286e-04 -1.000000000000e-14 3.800000000000e+00 8.663588252862e-04 0.000000000000e+00 -8.663588252762e-04 -1.000000000000e-14 4.000000000000e+00 9.968594214047e-04 0.000000000000e+00 -9.968594213947e-04 -1.000000000000e-14 4.200000000000e+00 1.128661273549e-03 0.000000000000e+00 -1.128661273539e-03 -1.000000000000e-14 4.400000000000e+00 1.259684816494e-03 0.000000000000e+00 -1.259684816484e-03 -1.000000000000e-14 4.600000000000e+00 1.387021871626e-03 0.000000000000e+00 -1.387021871616e-03 -1.000000000000e-14 4.800000000000e+00 1.492082525168e-03 0.000000000000e+00 -1.492082525158e-03 -1.000000000000e-14 5.000000000000e+00 1.564323846519e-03 0.000000000000e+00 -1.564323846509e-03 -1.000000000000e-14 5.200000000000e+00 1.613929423703e-03 0.000000000000e+00 -1.613929423693e-03 -1.000000000000e-14 5.400000000000e+00 1.649160036986e-03 0.000000000000e+00 -1.649160036976e-03 -1.000000000000e-14 5.600000000000e+00 1.675193632461e-03 0.000000000000e+00 -1.675193632451e-03 -1.000000000000e-14 5.800000000000e+00 1.695135322595e-03 0.000000000000e+00 -1.695135322585e-03 -1.000000000000e-14 6.000000000000e+00 1.710880838133e-03 0.000000000000e+00 -1.710880838123e-03 -1.000000000000e-14 6.200000000000e+00 1.723629397273e-03 0.000000000000e+00 -1.723629397263e-03 -1.000000000000e-14 6.400000000000e+00 1.734168732806e-03 0.000000000000e+00 -1.734168732796e-03 -1.000000000000e-14 6.600000000000e+00 1.743034602302e-03 0.000000000000e+00 -1.743034602292e-03 -1.000000000000e-14 6.800000000000e+00 1.750602919736e-03 0.000000000000e+00 -1.750602919726e-03 -1.000000000000e-14 7.000000000000e+00 1.757144757929e-03 0.000000000000e+00 -1.757144757919e-03 -1.000000000000e-14 7.200000000000e+00 1.762860332210e-03 0.000000000000e+00 -1.762860332200e-03 -1.000000000000e-14 7.400000000000e+00 1.767900669224e-03 0.000000000000e+00 -1.767900669214e-03 -1.000000000000e-14 7.600000000000e+00 1.772381825532e-03 0.000000000000e+00 -1.772381825522e-03 -1.000000000000e-14 7.800000000000e+00 1.776394462365e-03 0.000000000000e+00 -1.776394462355e-03 -1.000000000000e-14 8.000000000000e+00 1.780010445451e-03 0.000000000000e+00 -1.780010445441e-03 -1.000000000000e-14 8.200000000000e+00 1.783287490918e-03 0.000000000000e+00 -1.783287490908e-03 -1.000000000000e-14 8.400000000000e+00 1.786272498439e-03 0.000000000000e+00 -1.786272498429e-03 -1.000000000000e-14 8.600000000000e+00 1.789003984023e-03 0.000000000000e+00 -1.789003984013e-03 -1.000000000000e-14 8.800000000000e+00 1.791513883614e-03 0.000000000000e+00 -1.791513883604e-03 -1.000000000000e-14 9.000000000000e+00 1.793828909364e-03 0.000000000000e+00 -1.793828909354e-03 -1.000000000000e-14 9.200000000000e+00 1.795971582888e-03 0.000000000000e+00 -1.795971582878e-03 -1.000000000000e-14 9.400000000000e+00 1.797961031859e-03 0.000000000000e+00 -1.797961031849e-03 -1.000000000000e-14 9.600000000000e+00 1.799813610926e-03 0.000000000000e+00 -1.799813610916e-03 -1.000000000000e-14 9.800000000000e+00 1.801543390602e-03 0.000000000000e+00 -1.801543390592e-03 -1.000000000000e-14 1.000000000000e+01 1.803162545819e-03 0.000000000000e+00 -1.803162545809e-03 -1.000000000000e-14 1.020000000000e+01 1.804681667419e-03 0.000000000000e+00 -1.804681667409e-03 -1.000000000000e-14 1.040000000000e+01 1.806110013894e-03 0.000000000000e+00 -1.806110013884e-03 -1.000000000000e-14 1.060000000000e+01 1.807455734409e-03 0.000000000000e+00 -1.807455734399e-03 -1.000000000000e-14 1.080000000000e+01 1.808725961374e-03 0.000000000000e+00 -1.808725961364e-03 -1.000000000000e-14 1.100000000000e+01 1.809927067960e-03 0.000000000000e+00 -1.809927067950e-03 -1.000000000000e-14 1.120000000000e+01 1.811064699830e-03 0.000000000000e+00 -1.811064699820e-03 -1.000000000000e-14 1.140000000000e+01 1.812143893436e-03 0.000000000000e+00 -1.812143893426e-03 -1.000000000000e-14 1.160000000000e+01 1.813169156844e-03 0.000000000000e+00 -1.813169156834e-03 -1.000000000000e-14 1.180000000000e+01 1.814144537915e-03 0.000000000000e+00 -1.814144537905e-03 -1.000000000000e-14 1.200000000000e+01 1.815073682129e-03 0.000000000000e+00 -1.815073682119e-03 -1.000000000000e-14 1.220000000000e+01 1.815959881856e-03 0.000000000000e+00 -1.815959881846e-03 -1.000000000000e-14 1.240000000000e+01 1.816806118518e-03 0.000000000000e+00 -1.816806118508e-03 -1.000000000000e-14 1.260000000000e+01 1.817615098811e-03 0.000000000000e+00 -1.817615098801e-03 -1.000000000000e-14 1.280000000000e+01 1.818389285947e-03 0.000000000000e+00 -1.818389285937e-03 -1.000000000000e-14 1.300000000000e+01 1.819130926704e-03 0.000000000000e+00 -1.819130926694e-03 -1.000000000000e-14 1.320000000000e+01 1.819842074924e-03 0.000000000000e+00 -1.819842074914e-03 -1.000000000000e-14 1.340000000000e+01 1.820524611997e-03 0.000000000000e+00 -1.820524611987e-03 -1.000000000000e-14 1.360000000000e+01 1.821180264767e-03 0.000000000000e+00 -1.821180264757e-03 -1.000000000000e-14 1.380000000000e+01 1.821810621246e-03 0.000000000000e+00 -1.821810621236e-03 -1.000000000000e-14 1.400000000000e+01 1.822417144430e-03 0.000000000000e+00 -1.822417144420e-03 -1.000000000000e-14 1.420000000000e+01 1.823001184495e-03 0.000000000000e+00 -1.823001184485e-03 -1.000000000000e-14 1.440000000000e+01 1.823563989572e-03 0.000000000000e+00 -1.823563989562e-03 -1.000000000000e-14 1.460000000000e+01 1.824106715311e-03 0.000000000000e+00 -1.824106715301e-03 -1.000000000000e-14 1.480000000000e+01 1.824630433378e-03 0.000000000000e+00 -1.824630433368e-03 -1.000000000000e-14 1.500000000000e+01 1.825136139031e-03 0.000000000000e+00 -1.825136139021e-03 -1.000000000000e-14 1.520000000000e+01 1.825624757877e-03 0.000000000000e+00 -1.825624757867e-03 -1.000000000000e-14 1.540000000000e+01 1.826097151925e-03 0.000000000000e+00 -1.826097151915e-03 -1.000000000000e-14 1.560000000000e+01 1.826554125017e-03 0.000000000000e+00 -1.826554125007e-03 -1.000000000000e-14 1.580000000000e+01 1.826996427699e-03 0.000000000000e+00 -1.826996427689e-03 -1.000000000000e-14 1.600000000000e+01 1.827424761619e-03 0.000000000000e+00 -1.827424761609e-03 -1.000000000000e-14 1.620000000000e+01 1.827839783481e-03 0.000000000000e+00 -1.827839783471e-03 -1.000000000000e-14 1.640000000000e+01 1.828242108632e-03 0.000000000000e+00 -1.828242108622e-03 -1.000000000000e-14 1.660000000000e+01 1.828632314297e-03 0.000000000000e+00 -1.828632314287e-03 -1.000000000000e-14 1.680000000000e+01 1.829010942522e-03 0.000000000000e+00 -1.829010942512e-03 -1.000000000000e-14 1.700000000000e+01 1.829378502839e-03 0.000000000000e+00 -1.829378502829e-03 -1.000000000000e-14 1.720000000000e+01 1.829735474698e-03 0.000000000000e+00 -1.829735474688e-03 -1.000000000000e-14 1.740000000000e+01 1.830082309676e-03 0.000000000000e+00 -1.830082309666e-03 -1.000000000000e-14 1.760000000000e+01 1.830419433497e-03 0.000000000000e+00 -1.830419433487e-03 -1.000000000000e-14 1.780000000000e+01 1.830747247878e-03 0.000000000000e+00 -1.830747247868e-03 -1.000000000000e-14 1.800000000000e+01 1.831066132213e-03 0.000000000000e+00 -1.831066132203e-03 -1.000000000000e-14 1.820000000000e+01 1.831376445122e-03 0.000000000000e+00 -1.831376445112e-03 -1.000000000000e-14 1.840000000000e+01 1.831678525870e-03 0.000000000000e+00 -1.831678525860e-03 -1.000000000000e-14 1.860000000000e+01 1.831972695667e-03 0.000000000000e+00 -1.831972695657e-03 -1.000000000000e-14 1.880000000000e+01 1.832259258870e-03 0.000000000000e+00 -1.832259258860e-03 -1.000000000000e-14 1.900000000000e+01 1.832538504085e-03 0.000000000000e+00 -1.832538504075e-03 -1.000000000000e-14 1.920000000000e+01 1.832810705186e-03 0.000000000000e+00 -1.832810705176e-03 -1.000000000000e-14 1.940000000000e+01 1.833076122250e-03 0.000000000000e+00 -1.833076122240e-03 -1.000000000000e-14 1.960000000000e+01 1.833335002430e-03 0.000000000000e+00 -1.833335002420e-03 -1.000000000000e-14 1.980000000000e+01 1.833587580754e-03 0.000000000000e+00 -1.833587580744e-03 -1.000000000000e-14 2.000000000000e+01 1.833834080868e-03 0.000000000000e+00 -1.833834080858e-03 -1.000000000000e-14 1.000000000000e+00 1.136862305684e-12 0.000000000000e+00 -1.126862587885e-12 -1.000000000000e-14 1.200000000000e+00 2.328145267717e-10 0.000000000000e+00 -2.328045266424e-10 -1.000000000000e-14 1.400000000000e+00 5.435744879646e-08 0.000000000000e+00 -5.435743879669e-08 -1.000000000000e-14 1.600000000000e+00 2.717528795953e-06 0.000000000000e+00 -2.717528785953e-06 -1.000000000000e-14 1.800000000000e+00 1.541892411229e-05 0.000000000000e+00 -1.541892410229e-05 -1.000000000000e-14 2.000000000000e+00 4.182002251871e-05 0.000000000000e+00 -4.182002250871e-05 -1.000000000000e-14 2.200000000000e+00 8.319939381260e-05 0.000000000000e+00 -8.319939380260e-05 -1.000000000000e-14 2.400000000000e+00 1.398036771196e-04 0.000000000000e+00 -1.398036771096e-04 -1.000000000000e-14 2.600000000000e+00 2.111222025235e-04 0.000000000000e+00 -2.111222025135e-04 -1.000000000000e-14 2.800000000000e+00 2.960568533169e-04 0.000000000000e+00 -2.960568533069e-04 -1.000000000000e-14 3.000000000000e+00 3.930938193725e-04 0.000000000000e+00 -3.930938193625e-04 -1.000000000000e-14 3.200000000000e+00 5.004735415301e-04 0.000000000000e+00 -5.004735415201e-04 -1.000000000000e-14 3.400000000000e+00 6.163374717596e-04 0.000000000000e+00 -6.163374717496e-04 -1.000000000000e-14 3.600000000000e+00 7.388322083617e-04 0.000000000000e+00 -7.388322083517e-04 -1.000000000000e-14 3.800000000000e+00 8.661572336671e-04 0.000000000000e+00 -8.661572336571e-04 -1.000000000000e-14 4.000000000000e+00 9.965438451218e-04 0.000000000000e+00 -9.965438451118e-04 -1.000000000000e-14 4.200000000000e+00 1.128144704923e-03 0.000000000000e+00 -1.128144704913e-03 -1.000000000000e-14 4.400000000000e+00 1.258794525995e-03 0.000000000000e+00 -1.258794525985e-03 -1.000000000000e-14 4.600000000000e+00 1.385111342143e-03 0.000000000000e+00 -1.385111342133e-03 -1.000000000000e-14 4.800000000000e+00 1.485841463809e-03 0.000000000000e+00 -1.485841463799e-03 -1.000000000000e-14 5.000000000000e+00 1.554142693753e-03 0.000000000000e+00 -1.554142693743e-03 -1.000000000000e-14 5.200000000000e+00 1.600861914956e-03 0.000000000000e+00 -1.600861914946e-03 -1.000000000000e-14 5.400000000000e+00 1.634062291956e-03 0.000000000000e+00 -1.634062291946e-03 -1.000000000000e-14 5.600000000000e+00 1.658650151147e-03 0.000000000000e+00 -1.658650151137e-03 -1.000000000000e-14 5.800000000000e+00 1.677533314630e-03 0.000000000000e+00 -1.677533314620e-03 -1.000000000000e-14 6.000000000000e+00 1.692480518287e-03 0.000000000000e+00 -1.692480518277e-03 -1.000000000000e-14 6.200000000000e+00 1.704610366985e-03 0.000000000000e+00 -1.704610366975e-03 -1.000000000000e-14 6.400000000000e+00 1.714658535468e-03 0.000000000000e+00 -1.714658535458e-03 -1.000000000000e-14 6.600000000000e+00 1.723126296018e-03 0.000000000000e+00 -1.723126296008e-03 -1.000000000000e-14 6.800000000000e+00 1.730366085174e-03 0.000000000000e+00 -1.730366085164e-03 -1.000000000000e-14 7.000000000000e+00 1.736632570598e-03 0.000000000000e+00 -1.736632570588e-03 -1.000000000000e-14 7.200000000000e+00 1.742114225459e-03 0.000000000000e+00 -1.742114225449e-03 -1.000000000000e-14 7.400000000000e+00 1.746953486404e-03 0.000000000000e+00 -1.746953486394e-03 -1.000000000000e-14 7.600000000000e+00 1.751260001006e-03 0.000000000000e+00 -1.751260000996e-03 -1.000000000000e-14 7.800000000000e+00 1.755119563201e-03 0.000000000000e+00 -1.755119563191e-03 -1.000000000000e-14 8.000000000000e+00 1.758600282705e-03 0.000000000000e+00 -1.758600282695e-03 -1.000000000000e-14 8.200000000000e+00 1.761756935049e-03 0.000000000000e+00 -1.761756935039e-03 -1.000000000000e-14 8.400000000000e+00 1.764634087418e-03 0.000000000000e+00 -1.764634087408e-03 -1.000000000000e-14 8.600000000000e+00 1.767268383609e-03 0.000000000000e+00 -1.767268383599e-03 -1.000000000000e-14 8.800000000000e+00 1.769690240469e-03 0.000000000000e+00 -1.769690240459e-03 -1.000000000000e-14 9.000000000000e+00 1.771925125344e-03 0.000000000000e+00 -1.771925125334e-03 -1.000000000000e-14 9.200000000000e+00 1.773994530537e-03 0.000000000000e+00 -1.773994530527e-03 -1.000000000000e-14 9.400000000000e+00 1.775916725496e-03 0.000000000000e+00 -1.775916725486e-03 -1.000000000000e-14 9.600000000000e+00 1.777707343793e-03 0.000000000000e+00 -1.777707343783e-03 -1.000000000000e-14 9.800000000000e+00 1.779379845792e-03 0.000000000000e+00 -1.779379845782e-03 -1.000000000000e-14 1.000000000000e+01 1.780945886748e-03 0.000000000000e+00 -1.780945886738e-03 -1.000000000000e-14 1.020000000000e+01 1.782415612177e-03 0.000000000000e+00 -1.782415612167e-03 -1.000000000000e-14 1.040000000000e+01 1.783797896794e-03 0.000000000000e+00 -1.783797896784e-03 -1.000000000000e-14 1.060000000000e+01 1.785100556100e-03 0.000000000000e+00 -1.785100556090e-03 -1.000000000000e-14 1.080000000000e+01 1.786330435605e-03 0.000000000000e+00 -1.786330435595e-03 -1.000000000000e-14 1.100000000000e+01 1.787493653839e-03 0.000000000000e+00 -1.787493653829e-03 -1.000000000000e-14 1.120000000000e+01 1.788595634045e-03 0.000000000000e+00 -1.788595634035e-03 -1.000000000000e-14 1.140000000000e+01 1.789641216487e-03 0.000000000000e+00 -1.789641216477e-03 -1.000000000000e-14 1.160000000000e+01 1.790634735516e-03 0.000000000000e+00 -1.790634735506e-03 -1.000000000000e-14 1.180000000000e+01 1.791580084618e-03 0.000000000000e+00 -1.791580084608e-03 -1.000000000000e-14 1.200000000000e+01 1.792480771614e-03 0.000000000000e+00 -1.792480771604e-03 -1.000000000000e-14 1.220000000000e+01 1.793339965727e-03 0.000000000000e+00 -1.793339965717e-03 -1.000000000000e-14 1.240000000000e+01 1.794160537874e-03 0.000000000000e+00 -1.794160537864e-03 -1.000000000000e-14 1.260000000000e+01 1.794945095303e-03 0.000000000000e+00 -1.794945095293e-03 -1.000000000000e-14 1.280000000000e+01 1.795696011484e-03 0.000000000000e+00 -1.795696011474e-03 -1.000000000000e-14 1.300000000000e+01 1.796415451995e-03 0.000000000000e+00 -1.796415451985e-03 -1.000000000000e-14 1.320000000000e+01 1.797105397026e-03 0.000000000000e+00 -1.797105397016e-03 -1.000000000000e-14 1.340000000000e+01 1.797767661001e-03 0.000000000000e+00 -1.797767660991e-03 -1.000000000000e-14 1.360000000000e+01 1.798403909743e-03 0.000000000000e+00 -1.798403909733e-03 -1.000000000000e-14 1.380000000000e+01 1.799015675535e-03 0.000000000000e+00 -1.799015675525e-03 -1.000000000000e-14 1.400000000000e+01 1.799604370374e-03 0.000000000000e+00 -1.799604370364e-03 -1.000000000000e-14 1.420000000000e+01 1.800171297673e-03 0.000000000000e+00 -1.800171297663e-03 -1.000000000000e-14 1.440000000000e+01 1.800717662601e-03 0.000000000000e+00 -1.800717662591e-03 -1.000000000000e-14 1.460000000000e+01 1.801244581270e-03 0.000000000000e+00 -1.801244581260e-03 -1.000000000000e-14 1.480000000000e+01 1.801753088894e-03 0.000000000000e+00 -1.801753088884e-03 -1.000000000000e-14 1.500000000000e+01 1.802244147065e-03 0.000000000000e+00 -1.802244147055e-03 -1.000000000000e-14 1.520000000000e+01 1.802718650250e-03 0.000000000000e+00 -1.802718650240e-03 -1.000000000000e-14 1.540000000000e+01 1.803177431614e-03 0.000000000000e+00 -1.803177431604e-03 -1.000000000000e-14 1.560000000000e+01 1.803621268230e-03 0.000000000000e+00 -1.803621268220e-03 -1.000000000000e-14 1.580000000000e+01 1.804050885780e-03 0.000000000000e+00 -1.804050885770e-03 -1.000000000000e-14 1.600000000000e+01 1.804466962772e-03 0.000000000000e+00 -1.804466962762e-03 -1.000000000000e-14 1.620000000000e+01 1.804870134358e-03 0.000000000000e+00 -1.804870134348e-03 -1.000000000000e-14 1.640000000000e+01 1.805260995777e-03 0.000000000000e+00 -1.805260995767e-03 -1.000000000000e-14 1.660000000000e+01 1.805640105474e-03 0.000000000000e+00 -1.805640105464e-03 -1.000000000000e-14 1.680000000000e+01 1.806007987934e-03 0.000000000000e+00 -1.806007987924e-03 -1.000000000000e-14 1.700000000000e+01 1.806365136248e-03 0.000000000000e+00 -1.806365136238e-03 -1.000000000000e-14 1.720000000000e+01 1.806712014459e-03 0.000000000000e+00 -1.806712014449e-03 -1.000000000000e-14 1.740000000000e+01 1.807049059686e-03 0.000000000000e+00 -1.807049059676e-03 -1.000000000000e-14 1.760000000000e+01 1.807376684077e-03 0.000000000000e+00 -1.807376684067e-03 -1.000000000000e-14 1.780000000000e+01 1.807695276581e-03 0.000000000000e+00 -1.807695276571e-03 -1.000000000000e-14 1.800000000000e+01 1.808005204579e-03 0.000000000000e+00 -1.808005204569e-03 -1.000000000000e-14 1.820000000000e+01 1.808306815374e-03 0.000000000000e+00 -1.808306815364e-03 -1.000000000000e-14 1.840000000000e+01 1.808600437561e-03 0.000000000000e+00 -1.808600437551e-03 -1.000000000000e-14 1.860000000000e+01 1.808886382280e-03 0.000000000000e+00 -1.808886382270e-03 -1.000000000000e-14 1.880000000000e+01 1.809164944378e-03 0.000000000000e+00 -1.809164944368e-03 -1.000000000000e-14 1.900000000000e+01 1.809436403469e-03 0.000000000000e+00 -1.809436403459e-03 -1.000000000000e-14 1.920000000000e+01 1.809701024921e-03 0.000000000000e+00 -1.809701024911e-03 -1.000000000000e-14 1.940000000000e+01 1.809959060758e-03 0.000000000000e+00 -1.809959060748e-03 -1.000000000000e-14 1.960000000000e+01 1.810210750500e-03 0.000000000000e+00 -1.810210750490e-03 -1.000000000000e-14 1.980000000000e+01 1.810456321937e-03 0.000000000000e+00 -1.810456321927e-03 -1.000000000000e-14 2.000000000000e+01 1.810695991848e-03 0.000000000000e+00 -1.810695991838e-03 -1.000000000000e-14 1.000000000000e+00 1.136862305684e-12 0.000000000000e+00 -1.126862585161e-12 -1.000000000000e-14 1.200000000000e+00 2.328145261212e-10 0.000000000000e+00 -2.328045264706e-10 -1.000000000000e-14 1.400000000000e+00 5.435743952523e-08 0.000000000000e+00 -5.435742952501e-08 -1.000000000000e-14 1.600000000000e+00 2.717517315916e-06 0.000000000000e+00 -2.717517305916e-06 -1.000000000000e-14 1.800000000000e+00 1.541871771998e-05 0.000000000000e+00 -1.541871770998e-05 -1.000000000000e-14 2.000000000000e+00 4.181894419041e-05 0.000000000000e+00 -4.181894418041e-05 -1.000000000000e-14 2.200000000000e+00 8.319600390831e-05 0.000000000000e+00 -8.319600389831e-05 -1.000000000000e-14 2.400000000000e+00 1.397955955544e-04 0.000000000000e+00 -1.397955955444e-04 -1.000000000000e-14 2.600000000000e+00 2.111060083740e-04 0.000000000000e+00 -2.111060083640e-04 -1.000000000000e-14 2.800000000000e+00 2.960279858114e-04 0.000000000000e+00 -2.960279858014e-04 -1.000000000000e-14 3.000000000000e+00 3.930463210876e-04 0.000000000000e+00 -3.930463210776e-04 -1.000000000000e-14 3.200000000000e+00 5.003993767561e-04 0.000000000000e+00 -5.003993767461e-04 -1.000000000000e-14 3.400000000000e+00 6.162249690681e-04 0.000000000000e+00 -6.162249690581e-04 -1.000000000000e-14 3.600000000000e+00 7.386627824083e-04 0.000000000000e+00 -7.386627823983e-04 -1.000000000000e-14 3.800000000000e+00 8.658986357185e-04 0.000000000000e+00 -8.658986357085e-04 -1.000000000000e-14 4.000000000000e+00 9.961361269339e-04 0.000000000000e+00 -9.961361269239e-04 -1.000000000000e-14 4.200000000000e+00 1.127470673236e-03 0.000000000000e+00 -1.127470673226e-03 -1.000000000000e-14 4.400000000000e+00 1.257618423232e-03 0.000000000000e+00 -1.257618423222e-03 -1.000000000000e-14 4.600000000000e+00 1.382211613309e-03 0.000000000000e+00 -1.382211613299e-03 -1.000000000000e-14 4.800000000000e+00 1.477323698211e-03 0.000000000000e+00 -1.477323698201e-03 -1.000000000000e-14 5.000000000000e+00 1.540866395225e-03 0.000000000000e+00 -1.540866395215e-03 -1.000000000000e-14 5.200000000000e+00 1.584186303618e-03 0.000000000000e+00 -1.584186303608e-03 -1.000000000000e-14 5.400000000000e+00 1.615018821968e-03 0.000000000000e+00 -1.615018821958e-03 -1.000000000000e-14 5.600000000000e+00 1.637924699563e-03 0.000000000000e+00 -1.637924699553e-03 -1.000000000000e-14 5.800000000000e+00 1.655575673500e-03 0.000000000000e+00 -1.655575673490e-03 -1.000000000000e-14 6.000000000000e+00 1.669591945445e-03 0.000000000000e+00 -1.669591945435e-03 -1.000000000000e-14 6.200000000000e+00 1.680998715727e-03 0.000000000000e+00 -1.680998715717e-03 -1.000000000000e-14 6.400000000000e+00 1.690471562237e-03 0.000000000000e+00 -1.690471562227e-03 -1.000000000000e-14 6.600000000000e+00 1.698471983070e-03 0.000000000000e+00 -1.698471983060e-03 -1.000000000000e-14 6.800000000000e+00 1.705325324474e-03 0.000000000000e+00 -1.705325324464e-03 -1.000000000000e-14 7.000000000000e+00 1.711267302573e-03 0.000000000000e+00 -1.711267302563e-03 -1.000000000000e-14 7.200000000000e+00 1.716472805406e-03 0.000000000000e+00 -1.716472805396e-03 -1.000000000000e-14 7.400000000000e+00 1.721074314940e-03 0.000000000000e+00 -1.721074314930e-03 -1.000000000000e-14 7.600000000000e+00 1.725174038954e-03 0.000000000000e+00 -1.725174038944e-03 -1.000000000000e-14 7.800000000000e+00 1.728852111736e-03 0.000000000000e+00 -1.728852111726e-03 -1.000000000000e-14 8.000000000000e+00 1.732172268404e-03 0.000000000000e+00 -1.732172268394e-03 -1.000000000000e-14 8.200000000000e+00 1.735185854242e-03 0.000000000000e+00 -1.735185854232e-03 -1.000000000000e-14 8.400000000000e+00 1.737934711505e-03 0.000000000000e+00 -1.737934711495e-03 -1.000000000000e-14 8.600000000000e+00 1.740453293688e-03 0.000000000000e+00 -1.740453293678e-03 -1.000000000000e-14 8.800000000000e+00 1.742770238076e-03 0.000000000000e+00 -1.742770238066e-03 -1.000000000000e-14 9.000000000000e+00 1.744909551940e-03 0.000000000000e+00 -1.744909551930e-03 -1.000000000000e-14 9.200000000000e+00 1.746891518835e-03 0.000000000000e+00 -1.746891518825e-03 -1.000000000000e-14 9.400000000000e+00 1.748733399246e-03 0.000000000000e+00 -1.748733399236e-03 -1.000000000000e-14 9.600000000000e+00 1.750449978122e-03 0.000000000000e+00 -1.750449978112e-03 -1.000000000000e-14 9.800000000000e+00 1.752053997042e-03 0.000000000000e+00 -1.752053997032e-03 -1.000000000000e-14 1.000000000000e+01 1.753556498472e-03 0.000000000000e+00 -1.753556498462e-03 -1.000000000000e-14 1.020000000000e+01 1.754967102352e-03 0.000000000000e+00 -1.754967102342e-03 -1.000000000000e-14 1.040000000000e+01 1.756294230078e-03 0.000000000000e+00 -1.756294230068e-03 -1.000000000000e-14 1.060000000000e+01 1.757545302743e-03 0.000000000000e+00 -1.757545302733e-03 -1.000000000000e-14 1.080000000000e+01 1.758726826363e-03 0.000000000000e+00 -1.758726826353e-03 -1.000000000000e-14 1.100000000000e+01 1.759844618045e-03 0.000000000000e+00 -1.759844618035e-03 -1.000000000000e-14 1.120000000000e+01 1.760903837530e-03 0.000000000000e+00 -1.760903837520e-03 -1.000000000000e-14 1.140000000000e+01 1.761909092508e-03 0.000000000000e+00 -1.761909092498e-03 -1.000000000000e-14 1.160000000000e+01 1.762864511268e-03 0.000000000000e+00 -1.762864511258e-03 -1.000000000000e-14 1.180000000000e+01 1.763773804065e-03 0.000000000000e+00 -1.763773804055e-03 -1.000000000000e-14 1.200000000000e+01 1.764640315243e-03 0.000000000000e+00 -1.764640315233e-03 -1.000000000000e-14 1.220000000000e+01 1.765467067699e-03 0.000000000000e+00 -1.765467067689e-03 -1.000000000000e-14 1.240000000000e+01 1.766256800981e-03 0.000000000000e+00 -1.766256800971e-03 -1.000000000000e-14 1.260000000000e+01 1.767012004053e-03 0.000000000000e+00 -1.767012004043e-03 -1.000000000000e-14 1.280000000000e+01 1.767734943592e-03 0.000000000000e+00 -1.767734943582e-03 -1.000000000000e-14 1.300000000000e+01 1.768427688510e-03 0.000000000000e+00 -1.768427688500e-03 -1.000000000000e-14 1.320000000000e+01 1.769092131277e-03 0.000000000000e+00 -1.769092131267e-03 -1.000000000000e-14 1.340000000000e+01 1.769730006527e-03 0.000000000000e+00 -1.769730006517e-03 -1.000000000000e-14 1.360000000000e+01 1.770342907345e-03 0.000000000000e+00 -1.770342907335e-03 -1.000000000000e-14 1.380000000000e+01 1.770932299562e-03 0.000000000000e+00 -1.770932299552e-03 -1.000000000000e-14 1.400000000000e+01 1.771499534341e-03 0.000000000000e+00 -1.771499534331e-03 -1.000000000000e-14 1.420000000000e+01 1.772045859289e-03 0.000000000000e+00 -1.772045859279e-03 -1.000000000000e-14 1.440000000000e+01 1.772572428296e-03 0.000000000000e+00 -1.772572428286e-03 -1.000000000000e-14 1.460000000000e+01 1.773080310259e-03 0.000000000000e+00 -1.773080310249e-03 -1.000000000000e-14 1.480000000000e+01 1.773570496849e-03 0.000000000000e+00 -1.773570496839e-03 -1.000000000000e-14 1.500000000000e+01 1.774043909436e-03 0.000000000000e+00 -1.774043909426e-03 -1.000000000000e-14 1.520000000000e+01 1.774501405271e-03 0.000000000000e+00 -1.774501405261e-03 -1.000000000000e-14 1.540000000000e+01 1.774943783026e-03 0.000000000000e+00 -1.774943783016e-03 -1.000000000000e-14 1.560000000000e+01 1.775371787772e-03 0.000000000000e+00 -1.775371787762e-03 -1.000000000000e-14 1.580000000000e+01 1.775786115442e-03 0.000000000000e+00 -1.775786115432e-03 -1.000000000000e-14 1.600000000000e+01 1.776187416863e-03 0.000000000000e+00 -1.776187416853e-03 -1.000000000000e-14 1.620000000000e+01 1.776576301390e-03 0.000000000000e+00 -1.776576301380e-03 -1.000000000000e-14 1.640000000000e+01 1.776953340191e-03 0.000000000000e+00 -1.776953340181e-03 -1.000000000000e-14 1.660000000000e+01 1.777319069226e-03 0.000000000000e+00 -1.777319069216e-03 -1.000000000000e-14 1.680000000000e+01 1.777673991949e-03 0.000000000000e+00 -1.777673991939e-03 -1.000000000000e-14 1.700000000000e+01 1.778018581756e-03 0.000000000000e+00 -1.778018581746e-03 -1.000000000000e-14 1.720000000000e+01 1.778353284230e-03 0.000000000000e+00 -1.778353284220e-03 -1.000000000000e-14 1.740000000000e+01 1.778678519164e-03 0.000000000000e+00 -1.778678519154e-03 -1.000000000000e-14 1.760000000000e+01 1.778994682431e-03 0.000000000000e+00 -1.778994682421e-03 -1.000000000000e-14 1.780000000000e+01 1.779302147675e-03 0.000000000000e+00 -1.779302147665e-03 -1.000000000000e-14 1.800000000000e+01 1.779601267873e-03 0.000000000000e+00 -1.779601267863e-03 -1.000000000000e-14 1.820000000000e+01 1.779892376756e-03 0.000000000000e+00 -1.779892376746e-03 -1.000000000000e-14 1.840000000000e+01 1.780175790116e-03 0.000000000000e+00 -1.780175790106e-03 -1.000000000000e-14 1.860000000000e+01 1.780451807016e-03 0.000000000000e+00 -1.780451807006e-03 -1.000000000000e-14 1.880000000000e+01 1.780720710888e-03 0.000000000000e+00 -1.780720710878e-03 -1.000000000000e-14 1.900000000000e+01 1.780982770557e-03 0.000000000000e+00 -1.780982770547e-03 -1.000000000000e-14 1.920000000000e+01 1.781238241180e-03 0.000000000000e+00 -1.781238241170e-03 -1.000000000000e-14 1.940000000000e+01 1.781487365111e-03 0.000000000000e+00 -1.781487365101e-03 -1.000000000000e-14 1.960000000000e+01 1.781730372707e-03 0.000000000000e+00 -1.781730372697e-03 -1.000000000000e-14 1.980000000000e+01 1.781967483068e-03 0.000000000000e+00 -1.781967483058e-03 -1.000000000000e-14 2.000000000000e+01 1.782198904723e-03 0.000000000000e+00 -1.782198904713e-03 -1.000000000000e-14 1.000000000000e+00 1.441666157672e-06 0.000000000000e+00 -1.441666147673e-06 -1.000000000000e-14 1.200000000000e+00 6.039398779277e-06 0.000000000000e+00 -6.039398769277e-06 -1.000000000000e-14 1.400000000000e+00 1.569131458424e-05 0.000000000000e+00 -1.569131457424e-05 -1.000000000000e-14 1.600000000000e+00 3.124491297221e-05 0.000000000000e+00 -3.124491296221e-05 -1.000000000000e-14 1.800000000000e+00 5.310717672188e-05 0.000000000000e+00 -5.310717671188e-05 -1.000000000000e-14 2.000000000000e+00 8.144529203383e-05 0.000000000000e+00 -8.144529202383e-05 -1.000000000000e-14 2.200000000000e+00 1.162690393007e-04 0.000000000000e+00 -1.162690392907e-04 -1.000000000000e-14 2.400000000000e+00 1.574737754350e-04 0.000000000000e+00 -1.574737754250e-04 -1.000000000000e-14 2.600000000000e+00 2.048681108396e-04 0.000000000000e+00 -2.048681108296e-04 -1.000000000000e-14 2.800000000000e+00 2.581943070952e-04 0.000000000000e+00 -2.581943070852e-04 -1.000000000000e-14 3.000000000000e+00 3.171443939649e-04 0.000000000000e+00 -3.171443939549e-04 -1.000000000000e-14 3.200000000000e+00 3.813731913410e-04 0.000000000000e+00 -3.813731913310e-04 -1.000000000000e-14 3.400000000000e+00 4.505086780909e-04 0.000000000000e+00 -4.505086780809e-04 -1.000000000000e-14 3.600000000000e+00 5.241597965911e-04 0.000000000000e+00 -5.241597965811e-04 -1.000000000000e-14 3.800000000000e+00 6.019215634853e-04 0.000000000000e+00 -6.019215634753e-04 -1.000000000000e-14 4.000000000000e+00 6.833771557066e-04 0.000000000000e+00 -6.833771556966e-04 -1.000000000000e-14 4.200000000000e+00 7.680963898547e-04 0.000000000000e+00 -7.680963898447e-04 -1.000000000000e-14 4.400000000000e+00 8.556296759634e-04 0.000000000000e+00 -8.556296759534e-04 -1.000000000000e-14 4.600000000000e+00 9.454959550918e-04 0.000000000000e+00 -9.454959550818e-04 -1.000000000000e-14 4.800000000000e+00 1.037154294433e-03 0.000000000000e+00 -1.037154294423e-03 -1.000000000000e-14 5.000000000000e+00 1.129496698794e-03 0.000000000000e+00 -1.129496698784e-03 -1.000000000000e-14 5.200000000000e+00 1.217801108792e-03 0.000000000000e+00 -1.217801108782e-03 -1.000000000000e-14 5.400000000000e+00 1.296343960483e-03 0.000000000000e+00 -1.296343960473e-03 -1.000000000000e-14 5.600000000000e+00 1.362564126713e-03 0.000000000000e+00 -1.362564126703e-03 -1.000000000000e-14 5.800000000000e+00 1.416681662269e-03 0.000000000000e+00 -1.416681662259e-03 -1.000000000000e-14 6.000000000000e+00 1.460461479085e-03 0.000000000000e+00 -1.460461479075e-03 -1.000000000000e-14 6.200000000000e+00 1.496016375642e-03 0.000000000000e+00 -1.496016375632e-03 -1.000000000000e-14 6.400000000000e+00 1.525207189700e-03 0.000000000000e+00 -1.525207189690e-03 -1.000000000000e-14 6.600000000000e+00 1.549495560106e-03 0.000000000000e+00 -1.549495560096e-03 -1.000000000000e-14 6.800000000000e+00 1.569981161106e-03 0.000000000000e+00 -1.569981161096e-03 -1.000000000000e-14 7.000000000000e+00 1.587481906413e-03 0.000000000000e+00 -1.587481906403e-03 -1.000000000000e-14 7.200000000000e+00 1.602607974266e-03 0.000000000000e+00 -1.602607974256e-03 -1.000000000000e-14 7.400000000000e+00 1.615818954607e-03 0.000000000000e+00 -1.615818954597e-03 -1.000000000000e-14 7.600000000000e+00 1.627465309350e-03 0.000000000000e+00 -1.627465309340e-03 -1.000000000000e-14 7.800000000000e+00 1.637817828821e-03 0.000000000000e+00 -1.637817828811e-03 -1.000000000000e-14 8.000000000000e+00 1.647088497206e-03 0.000000000000e+00 -1.647088497196e-03 -1.000000000000e-14 8.200000000000e+00 1.655445354023e-03 0.000000000000e+00 -1.655445354013e-03 -1.000000000000e-14 8.400000000000e+00 1.663023180984e-03 0.000000000000e+00 -1.663023180974e-03 -1.000000000000e-14 8.600000000000e+00 1.669931275071e-03 0.000000000000e+00 -1.669931275061e-03 -1.000000000000e-14 8.800000000000e+00 1.676259170901e-03 0.000000000000e+00 -1.676259170891e-03 -1.000000000000e-14 9.000000000000e+00 1.682080904630e-03 0.000000000000e+00 -1.682080904620e-03 -1.000000000000e-14 9.200000000000e+00 1.687458228749e-03 0.000000000000e+00 -1.687458228739e-03 -1.000000000000e-14 9.400000000000e+00 1.692443063399e-03 0.000000000000e+00 -1.692443063389e-03 -1.000000000000e-14 9.600000000000e+00 1.697079385635e-03 0.000000000000e+00 -1.697079385625e-03 -1.000000000000e-14 9.800000000000e+00 1.701404700323e-03 0.000000000000e+00 -1.701404700313e-03 -1.000000000000e-14 1.000000000000e+01 1.705451196243e-03 0.000000000000e+00 -1.705451196233e-03 -1.000000000000e-14 1.020000000000e+01 1.709246662941e-03 0.000000000000e+00 -1.709246662931e-03 -1.000000000000e-14 1.040000000000e+01 1.712815223963e-03 0.000000000000e+00 -1.712815223953e-03 -1.000000000000e-14 1.060000000000e+01 1.716177927886e-03 0.000000000000e+00 -1.716177927876e-03 -1.000000000000e-14 1.080000000000e+01 1.719353228261e-03 0.000000000000e+00 -1.719353228251e-03 -1.000000000000e-14 1.100000000000e+01 1.722357376070e-03 0.000000000000e+00 -1.722357376060e-03 -1.000000000000e-14 1.120000000000e+01 1.725204742755e-03 0.000000000000e+00 -1.725204742745e-03 -1.000000000000e-14 1.140000000000e+01 1.727908087744e-03 0.000000000000e+00 -1.727908087734e-03 -1.000000000000e-14 1.160000000000e+01 1.730478781297e-03 0.000000000000e+00 -1.730478781287e-03 -1.000000000000e-14 1.180000000000e+01 1.732926991165e-03 0.000000000000e+00 -1.732926991155e-03 -1.000000000000e-14 1.200000000000e+01 1.735261855988e-03 0.000000000000e+00 -1.735261855978e-03 -1.000000000000e-14 1.220000000000e+01 1.737491550807e-03 0.000000000000e+00 -1.737491550797e-03 -1.000000000000e-14 1.240000000000e+01 1.739623505434e-03 0.000000000000e+00 -1.739623505424e-03 -1.000000000000e-14 1.260000000000e+01 1.741664427610e-03 0.000000000000e+00 -1.741664427600e-03 -1.000000000000e-14 1.280000000000e+01 1.743620404957e-03 0.000000000000e+00 -1.743620404947e-03 -1.000000000000e-14 1.300000000000e+01 1.745496976225e-03 0.000000000000e+00 -1.745496976215e-03 -1.000000000000e-14 1.320000000000e+01 1.747299192824e-03 0.000000000000e+00 -1.747299192814e-03 -1.000000000000e-14 1.340000000000e+01 1.749031672191e-03 0.000000000000e+00 -1.749031672181e-03 -1.000000000000e-14 1.360000000000e+01 1.750698644229e-03 0.000000000000e+00 -1.750698644219e-03 -1.000000000000e-14 1.380000000000e+01 1.752303991847e-03 0.000000000000e+00 -1.752303991837e-03 -1.000000000000e-14 1.400000000000e+01 1.753851286472e-03 0.000000000000e+00 -1.753851286462e-03 -1.000000000000e-14 1.420000000000e+01 1.755343819233e-03 0.000000000000e+00 -1.755343819223e-03 -1.000000000000e-14 1.440000000000e+01 1.756784628446e-03 0.000000000000e+00 -1.756784628436e-03 -1.000000000000e-14 1.460000000000e+01 1.758176523883e-03 0.000000000000e+00 -1.758176523873e-03 -1.000000000000e-14 1.480000000000e+01 1.759522108269e-03 0.000000000000e+00 -1.759522108259e-03 -1.000000000000e-14 1.500000000000e+01 1.760823796381e-03 0.000000000000e+00 -1.760823796371e-03 -1.000000000000e-14 1.520000000000e+01 1.762083832031e-03 0.000000000000e+00 -1.762083832021e-03 -1.000000000000e-14 1.540000000000e+01 1.763304303233e-03 0.000000000000e+00 -1.763304303223e-03 -1.000000000000e-14 1.560000000000e+01 1.764487155761e-03 0.000000000000e+00 -1.764487155751e-03 -1.000000000000e-14 1.580000000000e+01 1.765634205295e-03 0.000000000000e+00 -1.765634205285e-03 -1.000000000000e-14 1.600000000000e+01 1.766747148333e-03 0.000000000000e+00 -1.766747148323e-03 -1.000000000000e-14 1.620000000000e+01 1.767827572008e-03 0.000000000000e+00 -1.767827571998e-03 -1.000000000000e-14 1.640000000000e+01 1.768876962940e-03 0.000000000000e+00 -1.768876962930e-03 -1.000000000000e-14 1.660000000000e+01 1.769896715230e-03 0.000000000000e+00 -1.769896715220e-03 -1.000000000000e-14 1.680000000000e+01 1.770888137691e-03 0.000000000000e+00 -1.770888137681e-03 -1.000000000000e-14 1.700000000000e+01 1.771852460411e-03 0.000000000000e+00 -1.771852460401e-03 -1.000000000000e-14 1.720000000000e+01 1.772790840702e-03 0.000000000000e+00 -1.772790840692e-03 -1.000000000000e-14 1.740000000000e+01 1.773704368519e-03 0.000000000000e+00 -1.773704368509e-03 -1.000000000000e-14 1.760000000000e+01 1.774594071387e-03 0.000000000000e+00 -1.774594071377e-03 -1.000000000000e-14 1.780000000000e+01 1.775460918905e-03 0.000000000000e+00 -1.775460918895e-03 -1.000000000000e-14 1.800000000000e+01 1.776305826854e-03 0.000000000000e+00 -1.776305826844e-03 -1.000000000000e-14 1.820000000000e+01 1.777129660959e-03 0.000000000000e+00 -1.777129660949e-03 -1.000000000000e-14 1.840000000000e+01 1.777933240337e-03 0.000000000000e+00 -1.777933240327e-03 -1.000000000000e-14 1.860000000000e+01 1.778717340654e-03 0.000000000000e+00 -1.778717340644e-03 -1.000000000000e-14 1.880000000000e+01 1.779482697034e-03 0.000000000000e+00 -1.779482697024e-03 -1.000000000000e-14 1.900000000000e+01 1.780230006723e-03 0.000000000000e+00 -1.780230006713e-03 -1.000000000000e-14 1.920000000000e+01 1.780959931559e-03 0.000000000000e+00 -1.780959931549e-03 -1.000000000000e-14 1.940000000000e+01 1.781673100230e-03 0.000000000000e+00 -1.781673100220e-03 -1.000000000000e-14 1.960000000000e+01 1.782370110374e-03 0.000000000000e+00 -1.782370110364e-03 -1.000000000000e-14 1.980000000000e+01 1.783051530510e-03 0.000000000000e+00 -1.783051530500e-03 -1.000000000000e-14 2.000000000000e+01 1.783717901831e-03 0.000000000000e+00 -1.783717901821e-03 -1.000000000000e-14 1.000000000000e+00 1.441664244666e-06 0.000000000000e+00 -1.441664234666e-06 -1.000000000000e-14 1.200000000000e+00 6.039375373872e-06 0.000000000000e+00 -6.039375363873e-06 -1.000000000000e-14 1.400000000000e+00 1.569119581345e-05 0.000000000000e+00 -1.569119580345e-05 -1.000000000000e-14 1.600000000000e+00 3.124453211726e-05 0.000000000000e+00 -3.124453210726e-05 -1.000000000000e-14 1.800000000000e+00 5.310624105588e-05 0.000000000000e+00 -5.310624104588e-05 -1.000000000000e-14 2.000000000000e+00 8.144335453497e-05 0.000000000000e+00 -8.144335452497e-05 -1.000000000000e-14 2.200000000000e+00 1.162654733121e-04 0.000000000000e+00 -1.162654733021e-04 -1.000000000000e-14 2.400000000000e+00 1.574677490574e-04 0.000000000000e+00 -1.574677490474e-04 -1.000000000000e-14 2.600000000000e+00 2.048585561274e-04 0.000000000000e+00 -2.048585561174e-04 -1.000000000000e-14 2.800000000000e+00 2.581798767958e-04 0.000000000000e+00 -2.581798767858e-04 -1.000000000000e-14 3.000000000000e+00 3.171233951393e-04 0.000000000000e+00 -3.171233951293e-04 -1.000000000000e-14 3.200000000000e+00 3.813434799313e-04 0.000000000000e+00 -3.813434799213e-04 -1.000000000000e-14 3.400000000000e+00 4.504674899226e-04 0.000000000000e+00 -4.504674899126e-04 -1.000000000000e-14 3.600000000000e+00 5.241034759784e-04 0.000000000000e+00 -5.241034759684e-04 -1.000000000000e-14 3.800000000000e+00 6.018451264133e-04 0.000000000000e+00 -6.018451264033e-04 -1.000000000000e-14 4.000000000000e+00 6.832735837723e-04 0.000000000000e+00 -6.832735837623e-04 -1.000000000000e-14 4.200000000000e+00 7.679554836748e-04 0.000000000000e+00 -7.679554836648e-04 -1.000000000000e-14 4.400000000000e+00 8.554361887989e-04 0.000000000000e+00 -8.554361887889e-04 -1.000000000000e-14 4.600000000000e+00 9.452265124025e-04 0.000000000000e+00 -9.452265123925e-04 -1.000000000000e-14 4.800000000000e+00 1.036768627209e-03 0.000000000000e+00 -1.036768627199e-03 -1.000000000000e-14 5.000000000000e+00 1.128756287023e-03 0.000000000000e+00 -1.128756287013e-03 -1.000000000000e-14 5.200000000000e+00 1.215940471455e-03 0.000000000000e+00 -1.215940471445e-03 -1.000000000000e-14 5.400000000000e+00 1.292697380062e-03 0.000000000000e+00 -1.292697380052e-03 -1.000000000000e-14 5.600000000000e+00 1.356817978921e-03 0.000000000000e+00 -1.356817978911e-03 -1.000000000000e-14 5.800000000000e+00 1.408874927447e-03 0.000000000000e+00 -1.408874927437e-03 -1.000000000000e-14 6.000000000000e+00 1.450829633458e-03 0.000000000000e+00 -1.450829633448e-03 -1.000000000000e-14 6.200000000000e+00 1.484845425496e-03 0.000000000000e+00 -1.484845425486e-03 -1.000000000000e-14 6.400000000000e+00 1.512761557083e-03 0.000000000000e+00 -1.512761557073e-03 -1.000000000000e-14 6.600000000000e+00 1.535996421980e-03 0.000000000000e+00 -1.535996421970e-03 -1.000000000000e-14 6.800000000000e+00 1.555606468342e-03 0.000000000000e+00 -1.555606468332e-03 -1.000000000000e-14 7.000000000000e+00 1.572373084512e-03 0.000000000000e+00 -1.572373084502e-03 -1.000000000000e-14 7.200000000000e+00 1.586877434743e-03 0.000000000000e+00 -1.586877434733e-03 -1.000000000000e-14 7.400000000000e+00 1.599556584714e-03 0.000000000000e+00 -1.599556584704e-03 -1.000000000000e-14 7.600000000000e+00 1.610743609967e-03 0.000000000000e+00 -1.610743609957e-03 -1.000000000000e-14 7.800000000000e+00 1.620695845907e-03 0.000000000000e+00 -1.620695845897e-03 -1.000000000000e-14 8.000000000000e+00 1.629614795063e-03 0.000000000000e+00 -1.629614795053e-03 -1.000000000000e-14 8.200000000000e+00 1.637660261529e-03 0.000000000000e+00 -1.637660261519e-03 -1.000000000000e-14 8.400000000000e+00 1.644960495947e-03 0.000000000000e+00 -1.644960495937e-03 -1.000000000000e-14 8.600000000000e+00 1.651619566621e-03 0.000000000000e+00 -1.651619566611e-03 -1.000000000000e-14 8.800000000000e+00 1.657722783110e-03 0.000000000000e+00 -1.657722783100e-03 -1.000000000000e-14 9.000000000000e+00 1.663340736874e-03 0.000000000000e+00 -1.663340736864e-03 -1.000000000000e-14 9.200000000000e+00 1.668532347979e-03 0.000000000000e+00 -1.668532347969e-03 -1.000000000000e-14 9.400000000000e+00 1.673347188825e-03 0.000000000000e+00 -1.673347188815e-03 -1.000000000000e-14 9.600000000000e+00 1.677827275738e-03 0.000000000000e+00 -1.677827275728e-03 -1.000000000000e-14 9.800000000000e+00 1.682008464418e-03 0.000000000000e+00 -1.682008464408e-03 -1.000000000000e-14 1.000000000000e+01 1.685921547294e-03 0.000000000000e+00 -1.685921547284e-03 -1.000000000000e-14 1.020000000000e+01 1.689593124229e-03 0.000000000000e+00 -1.689593124219e-03 -1.000000000000e-14 1.040000000000e+01 1.693046299223e-03 0.000000000000e+00 -1.693046299213e-03 -1.000000000000e-14 1.060000000000e+01 1.696301242313e-03 0.000000000000e+00 -1.696301242303e-03 -1.000000000000e-14 1.080000000000e+01 1.699375646099e-03 0.000000000000e+00 -1.699375646089e-03 -1.000000000000e-14 1.100000000000e+01 1.702285099267e-03 0.000000000000e+00 -1.702285099257e-03 -1.000000000000e-14 1.120000000000e+01 1.705043394191e-03 0.000000000000e+00 -1.705043394181e-03 -1.000000000000e-14 1.140000000000e+01 1.707662781819e-03 0.000000000000e+00 -1.707662781809e-03 -1.000000000000e-14 1.160000000000e+01 1.710154184102e-03 0.000000000000e+00 -1.710154184092e-03 -1.000000000000e-14 1.180000000000e+01 1.712527372018e-03 0.000000000000e+00 -1.712527372008e-03 -1.000000000000e-14 1.200000000000e+01 1.714791130793e-03 0.000000000000e+00 -1.714791130783e-03 -1.000000000000e-14 1.220000000000e+01 1.716953323436e-03 0.000000000000e+00 -1.716953323426e-03 -1.000000000000e-14 1.240000000000e+01 1.719021097702e-03 0.000000000000e+00 -1.719021097692e-03 -1.000000000000e-14 1.260000000000e+01 1.721000909374e-03 0.000000000000e+00 -1.721000909364e-03 -1.000000000000e-14 1.280000000000e+01 1.722898619410e-03 0.000000000000e+00 -1.722898619400e-03 -1.000000000000e-14 1.300000000000e+01 1.724719562083e-03 0.000000000000e+00 -1.724719562073e-03 -1.000000000000e-14 1.320000000000e+01 1.726468603847e-03 0.000000000000e+00 -1.726468603837e-03 -1.000000000000e-14 1.340000000000e+01 1.728150194422e-03 0.000000000000e+00 -1.728150194412e-03 -1.000000000000e-14 1.360000000000e+01 1.729768411253e-03 0.000000000000e+00 -1.729768411243e-03 -1.000000000000e-14 1.380000000000e+01 1.731326998348e-03 0.000000000000e+00 -1.731326998338e-03 -1.000000000000e-14 1.400000000000e+01 1.732829400300e-03 0.000000000000e+00 -1.732829400290e-03 -1.000000000000e-14 1.420000000000e+01 1.734278792186e-03 0.000000000000e+00 -1.734278792176e-03 -1.000000000000e-14 1.440000000000e+01 1.735678105913e-03 0.000000000000e+00 -1.735678105903e-03 -1.000000000000e-14 1.460000000000e+01 1.737030053502e-03 0.000000000000e+00 -1.737030053492e-03 -1.000000000000e-14 1.480000000000e+01 1.738337147716e-03 0.000000000000e+00 -1.738337147706e-03 -1.000000000000e-14 1.500000000000e+01 1.739601720383e-03 0.000000000000e+00 -1.739601720373e-03 -1.000000000000e-14 1.520000000000e+01 1.740825938712e-03 0.000000000000e+00 -1.740825938702e-03 -1.000000000000e-14 1.540000000000e+01 1.742011819852e-03 0.000000000000e+00 -1.742011819842e-03 -1.000000000000e-14 1.560000000000e+01 1.743161243916e-03 0.000000000000e+00 -1.743161243906e-03 -1.000000000000e-14 1.580000000000e+01 1.744275965659e-03 0.000000000000e+00 -1.744275965649e-03 -1.000000000000e-14 1.600000000000e+01 1.745357624957e-03 0.000000000000e+00 -1.745357624947e-03 -1.000000000000e-14 1.620000000000e+01 1.746407756255e-03 0.000000000000e+00 -1.746407756245e-03 -1.000000000000e-14 1.640000000000e+01 1.747427797073e-03 0.000000000000e+00 -1.747427797063e-03 -1.000000000000e-14 1.660000000000e+01 1.748419095694e-03 0.000000000000e+00 -1.748419095684e-03 -1.000000000000e-14 1.680000000000e+01 1.749382918133e-03 0.000000000000e+00 -1.749382918123e-03 -1.000000000000e-14 1.700000000000e+01 1.750320454437e-03 0.000000000000e+00 -1.750320454427e-03 -1.000000000000e-14 1.720000000000e+01 1.751232824423e-03 0.000000000000e+00 -1.751232824413e-03 -1.000000000000e-14 1.740000000000e+01 1.752121082890e-03 0.000000000000e+00 -1.752121082880e-03 -1.000000000000e-14 1.760000000000e+01 1.752986224367e-03 0.000000000000e+00 -1.752986224357e-03 -1.000000000000e-14 1.780000000000e+01 1.753829187447e-03 0.000000000000e+00 -1.753829187437e-03 -1.000000000000e-14 1.800000000000e+01 1.754650858751e-03 0.000000000000e+00 -1.754650858741e-03 -1.000000000000e-14 1.820000000000e+01 1.755452076546e-03 0.000000000000e+00 -1.755452076536e-03 -1.000000000000e-14 1.840000000000e+01 1.756233634073e-03 0.000000000000e+00 -1.756233634063e-03 -1.000000000000e-14 1.860000000000e+01 1.756996282590e-03 0.000000000000e+00 -1.756996282580e-03 -1.000000000000e-14 1.880000000000e+01 1.757740734171e-03 0.000000000000e+00 -1.757740734161e-03 -1.000000000000e-14 1.900000000000e+01 1.758467664286e-03 0.000000000000e+00 -1.758467664276e-03 -1.000000000000e-14 1.920000000000e+01 1.759177714171e-03 0.000000000000e+00 -1.759177714161e-03 -1.000000000000e-14 1.940000000000e+01 1.759871493015e-03 0.000000000000e+00 -1.759871493005e-03 -1.000000000000e-14 1.960000000000e+01 1.760549579981e-03 0.000000000000e+00 -1.760549579971e-03 -1.000000000000e-14 1.980000000000e+01 1.761212526074e-03 0.000000000000e+00 -1.761212526064e-03 -1.000000000000e-14 2.000000000000e+01 1.761860855867e-03 0.000000000000e+00 -1.761860855857e-03 -1.000000000000e-14 1.000000000000e+00 1.441661820446e-06 0.000000000000e+00 -1.441661810447e-06 -1.000000000000e-14 1.200000000000e+00 6.039345713962e-06 0.000000000000e+00 -6.039345703962e-06 -1.000000000000e-14 1.400000000000e+00 1.569104530400e-05 0.000000000000e+00 -1.569104529400e-05 -1.000000000000e-14 1.600000000000e+00 3.124404948267e-05 0.000000000000e+00 -3.124404947267e-05 -1.000000000000e-14 1.800000000000e+00 5.310505531073e-05 0.000000000000e+00 -5.310505530073e-05 -1.000000000000e-14 2.000000000000e+00 8.144089907077e-05 0.000000000000e+00 -8.144089906077e-05 -1.000000000000e-14 2.200000000000e+00 1.162609536333e-04 0.000000000000e+00 -1.162609536233e-04 -1.000000000000e-14 2.400000000000e+00 1.574601100219e-04 0.000000000000e+00 -1.574601100119e-04 -1.000000000000e-14 2.600000000000e+00 2.048464423229e-04 0.000000000000e+00 -2.048464423129e-04 -1.000000000000e-14 2.800000000000e+00 2.581615766217e-04 0.000000000000e+00 -2.581615766117e-04 -1.000000000000e-14 3.000000000000e+00 3.170967546766e-04 0.000000000000e+00 -3.170967546666e-04 -1.000000000000e-14 3.200000000000e+00 3.813057656463e-04 0.000000000000e+00 -3.813057656363e-04 -1.000000000000e-14 3.400000000000e+00 4.504151677283e-04 0.000000000000e+00 -4.504151677183e-04 -1.000000000000e-14 3.600000000000e+00 5.240318547817e-04 0.000000000000e+00 -5.240318547717e-04 -1.000000000000e-14 3.800000000000e+00 6.017477812439e-04 0.000000000000e+00 -6.017477812339e-04 -1.000000000000e-14 4.000000000000e+00 6.831414174212e-04 0.000000000000e+00 -6.831414174112e-04 -1.000000000000e-14 4.200000000000e+00 7.677751920948e-04 0.000000000000e+00 -7.677751920848e-04 -1.000000000000e-14 4.400000000000e+00 8.551877441595e-04 0.000000000000e+00 -8.551877441495e-04 -1.000000000000e-14 4.600000000000e+00 9.448789531332e-04 0.000000000000e+00 -9.448789531232e-04 -1.000000000000e-14 4.800000000000e+00 1.036265771381e-03 0.000000000000e+00 -1.036265771371e-03 -1.000000000000e-14 5.000000000000e+00 1.127722588816e-03 0.000000000000e+00 -1.127722588806e-03 -1.000000000000e-14 5.200000000000e+00 1.213361592905e-03 0.000000000000e+00 -1.213361592895e-03 -1.000000000000e-14 5.400000000000e+00 1.287773166293e-03 0.000000000000e+00 -1.287773166283e-03 -1.000000000000e-14 5.600000000000e+00 1.349232217201e-03 0.000000000000e+00 -1.349232217191e-03 -1.000000000000e-14 5.800000000000e+00 1.398745469579e-03 0.000000000000e+00 -1.398745469569e-03 -1.000000000000e-14 6.000000000000e+00 1.438486135902e-03 0.000000000000e+00 -1.438486135892e-03 -1.000000000000e-14 6.200000000000e+00 1.470654225156e-03 0.000000000000e+00 -1.470654225146e-03 -1.000000000000e-14 6.400000000000e+00 1.497049081134e-03 0.000000000000e+00 -1.497049081124e-03 -1.000000000000e-14 6.600000000000e+00 1.519030573904e-03 0.000000000000e+00 -1.519030573894e-03 -1.000000000000e-14 6.800000000000e+00 1.537600525644e-03 0.000000000000e+00 -1.537600525634e-03 -1.000000000000e-14 7.000000000000e+00 1.553495521534e-03 0.000000000000e+00 -1.553495521524e-03 -1.000000000000e-14 7.200000000000e+00 1.567261695223e-03 0.000000000000e+00 -1.567261695213e-03 -1.000000000000e-14 7.400000000000e+00 1.579309165774e-03 0.000000000000e+00 -1.579309165764e-03 -1.000000000000e-14 7.600000000000e+00 1.589950323925e-03 0.000000000000e+00 -1.589950323915e-03 -1.000000000000e-14 7.800000000000e+00 1.599426552075e-03 0.000000000000e+00 -1.599426552065e-03 -1.000000000000e-14 8.000000000000e+00 1.607926950816e-03 0.000000000000e+00 -1.607926950806e-03 -1.000000000000e-14 8.200000000000e+00 1.615601591913e-03 0.000000000000e+00 -1.615601591903e-03 -1.000000000000e-14 8.400000000000e+00 1.622571012836e-03 0.000000000000e+00 -1.622571012826e-03 -1.000000000000e-14 8.600000000000e+00 1.628933108468e-03 0.000000000000e+00 -1.628933108458e-03 -1.000000000000e-14 8.800000000000e+00 1.634768199943e-03 0.000000000000e+00 -1.634768199933e-03 -1.000000000000e-14 9.000000000000e+00 1.640142810931e-03 0.000000000000e+00 -1.640142810921e-03 -1.000000000000e-14 9.200000000000e+00 1.645112515738e-03 0.000000000000e+00 -1.645112515728e-03 -1.000000000000e-14 9.400000000000e+00 1.649724112475e-03 0.000000000000e+00 -1.649724112465e-03 -1.000000000000e-14 9.600000000000e+00 1.654017299482e-03 0.000000000000e+00 -1.654017299472e-03 -1.000000000000e-14 9.800000000000e+00 1.658025981887e-03 0.000000000000e+00 -1.658025981877e-03 -1.000000000000e-14 1.000000000000e+01 1.661779299741e-03 0.000000000000e+00 -1.661779299731e-03 -1.000000000000e-14 1.020000000000e+01 1.665302444371e-03 0.000000000000e+00 -1.665302444361e-03 -1.000000000000e-14 1.040000000000e+01 1.668617312060e-03 0.000000000000e+00 -1.668617312050e-03 -1.000000000000e-14 1.060000000000e+01 1.671743031616e-03 0.000000000000e+00 -1.671743031606e-03 -1.000000000000e-14 1.080000000000e+01 1.674696393320e-03 0.000000000000e+00 -1.674696393310e-03 -1.000000000000e-14 1.100000000000e+01 1.677492200123e-03 0.000000000000e+00 -1.677492200113e-03 -1.000000000000e-14 1.120000000000e+01 1.680143557063e-03 0.000000000000e+00 -1.680143557053e-03 -1.000000000000e-14 1.140000000000e+01 1.682662111246e-03 0.000000000000e+00 -1.682662111236e-03 -1.000000000000e-14 1.160000000000e+01 1.685058251988e-03 0.000000000000e+00 -1.685058251978e-03 -1.000000000000e-14 1.180000000000e+01 1.687341295405e-03 0.000000000000e+00 -1.687341295395e-03 -1.000000000000e-14 1.200000000000e+01 1.689519556180e-03 0.000000000000e+00 -1.689519556170e-03 -1.000000000000e-14 1.220000000000e+01 1.691600576309e-03 0.000000000000e+00 -1.691600576299e-03 -1.000000000000e-14 1.240000000000e+01 1.693591151143e-03 0.000000000000e+00 -1.693591151133e-03 -1.000000000000e-14 1.260000000000e+01 1.695497436434e-03 0.000000000000e+00 -1.695497436424e-03 -1.000000000000e-14 1.280000000000e+01 1.697325023147e-03 0.000000000000e+00 -1.697325023137e-03 -1.000000000000e-14 1.300000000000e+01 1.699079001886e-03 0.000000000000e+00 -1.699079001876e-03 -1.000000000000e-14 1.320000000000e+01 1.700764018622e-03 0.000000000000e+00 -1.700764018612e-03 -1.000000000000e-14 1.340000000000e+01 1.702384323060e-03 0.000000000000e+00 -1.702384323050e-03 -1.000000000000e-14 1.360000000000e+01 1.703943810773e-03 0.000000000000e+00 -1.703943810763e-03 -1.000000000000e-14 1.380000000000e+01 1.705446060003e-03 0.000000000000e+00 -1.705446059993e-03 -1.000000000000e-14 1.400000000000e+01 1.706894363936e-03 0.000000000000e+00 -1.706894363926e-03 -1.000000000000e-14 1.420000000000e+01 1.708291759057e-03 0.000000000000e+00 -1.708291759047e-03 -1.000000000000e-14 1.440000000000e+01 1.709641050164e-03 0.000000000000e+00 -1.709641050154e-03 -1.000000000000e-14 1.460000000000e+01 1.710944832475e-03 0.000000000000e+00 -1.710944832465e-03 -1.000000000000e-14 1.480000000000e+01 1.712205511218e-03 0.000000000000e+00 -1.712205511208e-03 -1.000000000000e-14 1.500000000000e+01 1.713425319052e-03 0.000000000000e+00 -1.713425319042e-03 -1.000000000000e-14 1.520000000000e+01 1.714606331566e-03 0.000000000000e+00 -1.714606331556e-03 -1.000000000000e-14 1.540000000000e+01 1.715750481134e-03 0.000000000000e+00 -1.715750481124e-03 -1.000000000000e-14 1.560000000000e+01 1.716859569302e-03 0.000000000000e+00 -1.716859569292e-03 -1.000000000000e-14 1.580000000000e+01 1.717935277897e-03 0.000000000000e+00 -1.717935277887e-03 -1.000000000000e-14 1.600000000000e+01 1.718979179011e-03 0.000000000000e+00 -1.718979179001e-03 -1.000000000000e-14 1.620000000000e+01 1.719992743990e-03 0.000000000000e+00 -1.719992743980e-03 -1.000000000000e-14 1.640000000000e+01 1.720977351540e-03 0.000000000000e+00 -1.720977351530e-03 -1.000000000000e-14 1.660000000000e+01 1.721934295057e-03 0.000000000000e+00 -1.721934295047e-03 -1.000000000000e-14 1.680000000000e+01 1.722864789260e-03 0.000000000000e+00 -1.722864789250e-03 -1.000000000000e-14 1.700000000000e+01 1.723769976206e-03 0.000000000000e+00 -1.723769976196e-03 -1.000000000000e-14 1.720000000000e+01 1.724650930759e-03 0.000000000000e+00 -1.724650930749e-03 -1.000000000000e-14 1.740000000000e+01 1.725508665561e-03 0.000000000000e+00 -1.725508665551e-03 -1.000000000000e-14 1.760000000000e+01 1.726344135565e-03 0.000000000000e+00 -1.726344135555e-03 -1.000000000000e-14 1.780000000000e+01 1.727158242171e-03 0.000000000000e+00 -1.727158242161e-03 -1.000000000000e-14 1.800000000000e+01 1.727951837009e-03 0.000000000000e+00 -1.727951836999e-03 -1.000000000000e-14 1.820000000000e+01 1.728725725397e-03 0.000000000000e+00 -1.728725725387e-03 -1.000000000000e-14 1.840000000000e+01 1.729480669516e-03 0.000000000000e+00 -1.729480669506e-03 -1.000000000000e-14 1.860000000000e+01 1.730217391318e-03 0.000000000000e+00 -1.730217391308e-03 -1.000000000000e-14 1.880000000000e+01 1.730936575207e-03 0.000000000000e+00 -1.730936575197e-03 -1.000000000000e-14 1.900000000000e+01 1.731638870495e-03 0.000000000000e+00 -1.731638870485e-03 -1.000000000000e-14 1.920000000000e+01 1.732324893674e-03 0.000000000000e+00 -1.732324893664e-03 -1.000000000000e-14 1.940000000000e+01 1.732995230508e-03 0.000000000000e+00 -1.732995230498e-03 -1.000000000000e-14 1.960000000000e+01 1.733650437964e-03 0.000000000000e+00 -1.733650437954e-03 -1.000000000000e-14 1.980000000000e+01 1.734291045997e-03 0.000000000000e+00 -1.734291045987e-03 -1.000000000000e-14 2.000000000000e+01 1.734917559203e-03 0.000000000000e+00 -1.734917559193e-03 -1.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_conqs.standard0000644000265600020320000000754412264261473024175 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 4.10389944569607e-14 3.74248938520251e-14 2.62693622536481e-15 1258.925411794 4.10389944569534e-14 3.74248938520222e-14 2.62693622536488e-15 1584.893192461 4.10389944569568e-14 3.74248938520166e-14 2.62693622536426e-15 1995.262314969 4.10389944569457e-14 3.74248938520069e-14 2.62693622536422e-15 2511.88643151 4.10389944569356e-14 3.74248938519947e-14 2.62693622536383e-15 3162.277660168 4.10389944569412e-14 3.742489385199e-14 2.62693622536473e-15 3981.071705535 4.10389944569216e-14 3.74248938519578e-14 2.62693622536431e-15 5011.872336273 4.10389944568939e-14 3.74248938519194e-14 2.62693622536436e-15 6309.573444802 4.10389944568634e-14 3.74248938518526e-14 2.62693622536339e-15 7943.282347243 4.10389944568144e-14 3.74248938517645e-14 2.62693622536511e-15 10000 4.10389944567379e-14 3.74248938516113e-14 2.62693622536481e-15 12589.25411794 4.10389944565994e-14 3.74248938513774e-14 2.62693622536488e-15 15848.93192461 4.10389944563945e-14 3.74248938510024e-14 2.62693622536426e-15 19952.62314969 4.10389944560523e-14 3.74248938503876e-14 2.62693622536342e-15 25118.8643151 4.10389944555226e-14 3.74248938494286e-14 2.62693622536256e-15 31622.77660168 4.10389944547015e-14 3.74248938479284e-14 2.62693622536272e-15 39810.71705535 4.10389944533636e-14 3.74248938455253e-14 2.62693622536111e-15 50118.72336273 4.10389944512731e-14 3.74248938417259e-14 2.62693622535896e-15 63095.73444802 4.10389944479592e-14 3.7424893835709e-14 2.62693622535582e-15 79432.82347243 4.10389944426887e-14 3.7424893826158e-14 2.62693622535109e-15 100000 4.10389944343289e-14 3.74248938110268e-14 2.62693622534253e-15 125892.5411794 4.1038994421113e-14 3.74248937870416e-14 2.62693622532948e-15 158489.3192461 4.10389944001392e-14 3.74248937490359e-14 2.62693622530903e-15 199526.2314969 4.10389943668974e-14 3.74248936887968e-14 2.62693622527647e-15 251188.643151 4.10389943142156e-14 3.74248935933182e-14 2.62693622522507e-15 316227.7660168 4.10389942307416e-14 3.74248934420183e-14 2.62693622514479e-15 398107.1705535 4.10389940984397e-14 3.74248932022007e-14 2.6269362250161e-15 501187.2336273 4.10389938887229e-14 3.74248928221175e-14 2.62693622481213e-15 630957.3444802 4.10389935563538e-14 3.74248922197357e-14 2.62693622448811e-15 794328.2347243 4.10389930296001e-14 3.74248912650426e-14 2.62693622397659e-15 1000000 4.10389921947642e-14 3.74248897519232e-14 2.62693622316529e-15 1258925.411794 4.1038990871621e-14 3.74248873538048e-14 2.62693622187945e-15 1584893.192461 4.10389887745818e-14 3.74248835530439e-14 2.62693621984116e-15 1995262.314969 4.10389854509892e-14 3.74248775292277e-14 2.62693621661065e-15 2511886.43151 4.10389801834625e-14 3.74248679821406e-14 2.626936211491e-15 3162277.660168 4.10389718350122e-14 3.74248528510457e-14 2.6269362033769e-15 3981071.705535 4.10389586036088e-14 3.74248288698691e-14 2.62693619051636e-15 5011872.336273 4.10389376332577e-14 3.74247908623299e-14 2.62693617013377e-15 6309573.444802 4.1038904397554e-14 3.74247306244985e-14 2.62693613782982e-15 7943282.347243 4.10388517226463e-14 3.74246351542698e-14 2.62693608663094e-15 10000000 4.10387682389152e-14 3.74244838447957e-14 2.62693600548748e-15 12589254.11794 4.1038635927017e-14 3.74242440370742e-14 2.6269358768834e-15 15848931.92461 4.10384262290425e-14 3.74238639715113e-14 2.62693567305738e-15 19952623.14969 4.10380938857922e-14 3.74232616184643e-14 2.62693535001464e-15 25118864.3151 4.10375671714627e-14 3.74223069790183e-14 2.62693483802375e-15 31622776.60168 4.10367324212182e-14 3.74207940422636e-14 2.62693402656651e-15 39810717.05535 4.10354095208991e-14 3.74183963618035e-14 2.62693274047513e-15 50118723.36273 4.10333130903719e-14 3.74145967030641e-14 2.62693070211369e-15 63095734.44802 4.10299910374611e-14 3.74085756761473e-14 2.62692747141875e-15 79432823.47243 4.10247273585914e-14 3.73990355687899e-14 2.62692235083136e-15 100000000 4.10163885551361e-14 3.73839219878807e-14 2.6269142345539e-15 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_nover.standard0000644000265600020320000000754012264261473024177 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 5.73676226849977e-14 4.88168247335815e-14 1.2246132138864e-14 1258.925411794 5.73676226849929e-14 4.88168247335854e-14 1.22461321388661e-14 1584.893192461 5.73676226849976e-14 4.88168247335885e-14 1.22461321388624e-14 1995.262314969 5.73676226849861e-14 4.881682473358e-14 1.22461321388601e-14 2511.88643151 5.73676226849736e-14 4.88168247335682e-14 1.22461321388616e-14 3162.277660168 5.7367622685005e-14 4.8816824733581e-14 1.22461321388608e-14 3981.071705535 5.73676226849865e-14 4.88168247335844e-14 1.22461321388589e-14 5011.872336273 5.73676226849687e-14 4.88168247335388e-14 1.22461321388534e-14 6309.573444802 5.73676226849348e-14 4.88168247335451e-14 1.2246132138847e-14 7943.282347243 5.73676226849196e-14 4.88168247335032e-14 1.22461321388386e-14 10000 5.73676226848704e-14 4.88168247334541e-14 1.22461321388226e-14 12589.25411794 5.73676226848159e-14 4.88168247333832e-14 1.22461321387991e-14 15848.93192461 5.73676226847064e-14 4.88168247332671e-14 1.2246132138762e-14 19952.62314969 5.73676226845315e-14 4.88168247330695e-14 1.22461321386926e-14 25118.8643151 5.73676226842577e-14 4.88168247327699e-14 1.22461321385954e-14 31622.77660168 5.73676226838474e-14 4.88168247323126e-14 1.2246132138443e-14 39810.71705535 5.73676226831475e-14 4.88168247315455e-14 1.22461321381953e-14 50118.72336273 5.73676226821107e-14 4.88168247303633e-14 1.22461321378023e-14 63095.73444802 5.73676226804196e-14 4.8816824728475e-14 1.22461321371822e-14 79432.82347243 5.73676226777265e-14 4.88168247255087e-14 1.22461321361978e-14 100000 5.73676226734749e-14 4.88168247207854e-14 1.22461321346368e-14 125892.5411794 5.73676226667503e-14 4.88168247132948e-14 1.22461321321658e-14 158489.3192461 5.73676226560767e-14 4.8816824701424e-14 1.2246132128248e-14 199526.2314969 5.73676226391523e-14 4.88168246826013e-14 1.22461321220294e-14 251188.643151 5.73676226123432e-14 4.88168246527833e-14 1.22461321121867e-14 316227.7660168 5.73676225698517e-14 4.88168246055384e-14 1.22461320965893e-14 398107.1705535 5.73676225025273e-14 4.88168245306165e-14 1.224613207186e-14 501187.2336273 5.73676223958023e-14 4.88168244119182e-14 1.22461320326691e-14 630957.3444802 5.73676222266586e-14 4.8816824223786e-14 1.22461319705576e-14 794328.2347243 5.73676219585793e-14 4.88168239256147e-14 1.22461318721157e-14 1000000 5.73676215337027e-14 4.88168234530526e-14 1.2246131716096e-14 1258925.411794 5.73676208603421e-14 4.88168227040817e-14 1.2246131468822e-14 1584893.192461 5.73676197931031e-14 4.88168215170361e-14 1.22461310769211e-14 1995262.314969 5.73676181016552e-14 4.88168196356838e-14 1.22461304557885e-14 2511886.43151 5.73676154208884e-14 4.88168166539608e-14 1.22461294713687e-14 3162277.660168 5.73676111721977e-14 4.88168119282591e-14 1.22461279111717e-14 3981071.705535 5.73676044384268e-14 4.88168044385163e-14 1.22461254384246e-14 5011872.336273 5.73675937661092e-14 4.88167925680517e-14 1.22461215193853e-14 6309573.444802 5.73675768516951e-14 4.88167737546876e-14 1.22461153081333e-14 7943282.347243 5.73675500441804e-14 4.88167439375603e-14 1.22461054639736e-14 10000000 5.73675075572139e-14 4.88166966806814e-14 1.22460898620685e-14 12589254.11794 5.73674402201445e-14 4.88166217838398e-14 1.22460651347992e-14 15848931.92461 5.73673334986515e-14 4.88165030809707e-14 1.22460259449241e-14 19952623.14969 5.73671643579207e-14 4.88163149512195e-14 1.22459638337041e-14 25118864.3151 5.73668962915979e-14 4.88160167897261e-14 1.22458653953834e-14 31622776.60168 5.73664714442898e-14 4.88155442458134e-14 1.22457093845314e-14 39810717.05535 5.73657981296819e-14 4.88147953397627e-14 1.22454621324399e-14 50118723.36273 5.73647310557288e-14 4.88136084679593e-14 1.22450702855079e-14 63095734.44802 5.73630400026967e-14 4.88117275643924e-14 1.22444493032959e-14 79432823.47243 5.73603602289039e-14 4.88087469387251e-14 1.22434652467153e-14 100000000 5.73561139893339e-14 4.88040239838713e-14 1.224190595839e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Id1_vb0.standard0000644000265600020320000024357112264261473024265 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.788298853630e-04 0.000000000000e+00 -2.788298853620e-04 -1.000000000000e-15 1.200000000000e+00 3.281749663391e-04 0.000000000000e+00 -3.281749663379e-04 -1.200000000000e-15 1.400000000000e+00 3.756594837620e-04 0.000000000000e+00 -3.756594837606e-04 -1.400000000000e-15 1.600000000000e+00 4.213862320375e-04 0.000000000000e+00 -4.213862320359e-04 -1.600000000000e-15 1.800000000000e+00 4.654507304358e-04 0.000000000000e+00 -4.654507304340e-04 -1.800000000000e-15 2.000000000000e+00 5.079418278978e-04 0.000000000000e+00 -5.079418278958e-04 -2.000000000000e-15 2.200000000000e+00 5.489422530289e-04 0.000000000000e+00 -5.489422530267e-04 -2.200000000000e-15 2.400000000000e+00 5.885291140451e-04 0.000000000000e+00 -5.885291140427e-04 -2.400000000000e-15 2.600000000000e+00 6.267743532409e-04 0.000000000000e+00 -6.267743532383e-04 -2.600000000000e-15 2.800000000000e+00 6.637451602460e-04 0.000000000000e+00 -6.637451602432e-04 -2.800000000000e-15 3.000000000000e+00 6.995043479943e-04 0.000000000000e+00 -6.995043479913e-04 -3.000000000000e-15 3.200000000000e+00 7.341106949876e-04 0.000000000000e+00 -7.341106949844e-04 -3.200000000000e-15 3.400000000000e+00 7.676192571003e-04 0.000000000000e+00 -7.676192570969e-04 -3.400000000000e-15 3.600000000000e+00 8.000816518640e-04 0.000000000000e+00 -8.000816518604e-04 -3.600000000000e-15 3.800000000000e+00 8.315463178798e-04 0.000000000000e+00 -8.315463178760e-04 -3.800000000000e-15 4.000000000000e+00 8.620587517448e-04 0.000000000000e+00 -8.620587517408e-04 -4.000000000000e-15 4.200000000000e+00 8.916617246413e-04 0.000000000000e+00 -8.916617246371e-04 -4.200000000000e-15 4.400000000000e+00 9.203954805182e-04 0.000000000000e+00 -9.203954805138e-04 -4.400000000000e-15 4.600000000000e+00 9.482979263366e-04 0.000000000000e+00 -9.482979263320e-04 -4.600000000000e-15 4.800000000000e+00 9.754047626848e-04 0.000000000000e+00 -9.754047626800e-04 -4.800000000000e-15 5.000000000000e+00 1.001749691521e-03 0.000000000000e+00 -1.001749691516e-03 -5.000000000000e-15 5.200000000000e+00 1.027364518747e-03 0.000000000000e+00 -1.027364518742e-03 -5.200000000000e-15 5.400000000000e+00 1.052279292862e-03 0.000000000000e+00 -1.052279292857e-03 -5.400000000000e-15 5.600000000000e+00 1.076522423620e-03 0.000000000000e+00 -1.076522423615e-03 -5.600000000000e-15 5.800000000000e+00 1.100120791352e-03 0.000000000000e+00 -1.100120791347e-03 -5.800000000000e-15 6.000000000000e+00 1.123099847756e-03 0.000000000000e+00 -1.123099847750e-03 -6.000000000000e-15 6.200000000000e+00 1.145483708915e-03 0.000000000000e+00 -1.145483708909e-03 -6.200000000000e-15 6.400000000000e+00 1.167295241219e-03 0.000000000000e+00 -1.167295241213e-03 -6.400000000000e-15 6.600000000000e+00 1.188556140809e-03 0.000000000000e+00 -1.188556140802e-03 -6.600000000000e-15 6.800000000000e+00 1.209287007088e-03 0.000000000000e+00 -1.209287007081e-03 -6.800000000000e-15 7.000000000000e+00 1.229507410815e-03 0.000000000000e+00 -1.229507410808e-03 -7.000000000000e-15 7.200000000000e+00 1.249235957219e-03 0.000000000000e+00 -1.249235957212e-03 -7.200000000000e-15 7.400000000000e+00 1.268490344570e-03 0.000000000000e+00 -1.268490344563e-03 -7.400000000000e-15 7.600000000000e+00 1.287287418553e-03 0.000000000000e+00 -1.287287418545e-03 -7.600000000000e-15 7.800000000000e+00 1.305643222811e-03 0.000000000000e+00 -1.305643222803e-03 -7.800000000000e-15 8.000000000000e+00 1.323573045953e-03 0.000000000000e+00 -1.323573045945e-03 -8.000000000000e-15 8.200000000000e+00 1.341091465312e-03 0.000000000000e+00 -1.341091465304e-03 -8.200000000000e-15 8.400000000000e+00 1.358212387707e-03 0.000000000000e+00 -1.358212387698e-03 -8.400000000000e-15 8.600000000000e+00 1.374949087451e-03 0.000000000000e+00 -1.374949087442e-03 -8.600000000000e-15 8.800000000000e+00 1.391314241810e-03 0.000000000000e+00 -1.391314241802e-03 -8.800000000000e-15 9.000000000000e+00 1.407319964116e-03 0.000000000000e+00 -1.407319964107e-03 -9.000000000000e-15 9.200000000000e+00 1.422977834700e-03 0.000000000000e+00 -1.422977834691e-03 -9.200000000000e-15 9.400000000000e+00 1.438298929825e-03 0.000000000000e+00 -1.438298929816e-03 -9.400000000000e-15 9.600000000000e+00 1.453293848758e-03 0.000000000000e+00 -1.453293848749e-03 -9.600000000000e-15 9.800000000000e+00 1.467972739118e-03 0.000000000000e+00 -1.467972739108e-03 -9.800000000000e-15 1.000000000000e+01 1.482345320628e-03 0.000000000000e+00 -1.482345320618e-03 -1.000000000000e-14 1.020000000000e+01 1.496420907391e-03 0.000000000000e+00 -1.496420907381e-03 -1.020000000000e-14 1.040000000000e+01 1.510208428784e-03 0.000000000000e+00 -1.510208428773e-03 -1.040000000000e-14 1.060000000000e+01 1.523716449082e-03 0.000000000000e+00 -1.523716449072e-03 -1.060000000000e-14 1.080000000000e+01 1.536953185893e-03 0.000000000000e+00 -1.536953185882e-03 -1.080000000000e-14 1.100000000000e+01 1.549926527481e-03 0.000000000000e+00 -1.549926527470e-03 -1.100000000000e-14 1.120000000000e+01 1.562644049076e-03 0.000000000000e+00 -1.562644049065e-03 -1.120000000000e-14 1.140000000000e+01 1.575113028208e-03 0.000000000000e+00 -1.575113028197e-03 -1.140000000000e-14 1.160000000000e+01 1.587340459162e-03 0.000000000000e+00 -1.587340459150e-03 -1.160000000000e-14 1.180000000000e+01 1.599333066592e-03 0.000000000000e+00 -1.599333066580e-03 -1.180000000000e-14 1.200000000000e+01 1.611097318359e-03 0.000000000000e+00 -1.611097318347e-03 -1.200000000000e-14 1.220000000000e+01 1.622639437646e-03 0.000000000000e+00 -1.622639437633e-03 -1.220000000000e-14 1.240000000000e+01 1.633965414384e-03 0.000000000000e+00 -1.633965414371e-03 -1.240000000000e-14 1.260000000000e+01 1.645081016055e-03 0.000000000000e+00 -1.645081016043e-03 -1.260000000000e-14 1.280000000000e+01 1.655991797895e-03 0.000000000000e+00 -1.655991797882e-03 -1.280000000000e-14 1.300000000000e+01 1.666703112532e-03 0.000000000000e+00 -1.666703112519e-03 -1.300000000000e-14 1.320000000000e+01 1.677220119122e-03 0.000000000000e+00 -1.677220119109e-03 -1.320000000000e-14 1.340000000000e+01 1.687547791975e-03 0.000000000000e+00 -1.687547791962e-03 -1.340000000000e-14 1.360000000000e+01 1.697690928736e-03 0.000000000000e+00 -1.697690928723e-03 -1.360000000000e-14 1.380000000000e+01 1.707654158132e-03 0.000000000000e+00 -1.707654158118e-03 -1.380000000000e-14 1.400000000000e+01 1.717441947310e-03 0.000000000000e+00 -1.717441947296e-03 -1.400000000000e-14 1.420000000000e+01 1.727058608803e-03 0.000000000000e+00 -1.727058608789e-03 -1.420000000000e-14 1.440000000000e+01 1.736508307134e-03 0.000000000000e+00 -1.736508307120e-03 -1.440000000000e-14 1.460000000000e+01 1.745795065083e-03 0.000000000000e+00 -1.745795065068e-03 -1.460000000000e-14 1.480000000000e+01 1.754922769642e-03 0.000000000000e+00 -1.754922769627e-03 -1.480000000000e-14 1.500000000000e+01 1.763895177670e-03 0.000000000000e+00 -1.763895177655e-03 -1.500000000000e-14 1.520000000000e+01 1.772715921267e-03 0.000000000000e+00 -1.772715921252e-03 -1.520000000000e-14 1.540000000000e+01 1.781388512886e-03 0.000000000000e+00 -1.781388512871e-03 -1.540000000000e-14 1.560000000000e+01 1.789916350194e-03 0.000000000000e+00 -1.789916350179e-03 -1.560000000000e-14 1.580000000000e+01 1.798302720698e-03 0.000000000000e+00 -1.798302720683e-03 -1.580000000000e-14 1.600000000000e+01 1.806550806151e-03 0.000000000000e+00 -1.806550806135e-03 -1.600000000000e-14 1.620000000000e+01 1.814663686744e-03 0.000000000000e+00 -1.814663686727e-03 -1.620000000000e-14 1.640000000000e+01 1.822644345107e-03 0.000000000000e+00 -1.822644345091e-03 -1.640000000000e-14 1.660000000000e+01 1.830495670119e-03 0.000000000000e+00 -1.830495670102e-03 -1.660000000000e-14 1.680000000000e+01 1.838220460538e-03 0.000000000000e+00 -1.838220460521e-03 -1.680000000000e-14 1.700000000000e+01 1.845821428470e-03 0.000000000000e+00 -1.845821428453e-03 -1.700000000000e-14 1.720000000000e+01 1.853301202678e-03 0.000000000000e+00 -1.853301202660e-03 -1.720000000000e-14 1.740000000000e+01 1.860662331735e-03 0.000000000000e+00 -1.860662331718e-03 -1.740000000000e-14 1.760000000000e+01 1.867907287047e-03 0.000000000000e+00 -1.867907287029e-03 -1.760000000000e-14 1.780000000000e+01 1.875038465728e-03 0.000000000000e+00 -1.875038465710e-03 -1.780000000000e-14 1.800000000000e+01 1.882058193359e-03 0.000000000000e+00 -1.882058193341e-03 -1.800000000000e-14 1.820000000000e+01 1.888968726618e-03 0.000000000000e+00 -1.888968726600e-03 -1.820000000000e-14 1.840000000000e+01 1.895772255803e-03 0.000000000000e+00 -1.895772255785e-03 -1.840000000000e-14 1.860000000000e+01 1.902470907236e-03 0.000000000000e+00 -1.902470907218e-03 -1.860000000000e-14 1.880000000000e+01 1.909066745576e-03 0.000000000000e+00 -1.909066745557e-03 -1.880000000000e-14 1.900000000000e+01 1.915561776021e-03 0.000000000000e+00 -1.915561776002e-03 -1.900000000000e-14 1.920000000000e+01 1.921957946430e-03 0.000000000000e+00 -1.921957946410e-03 -1.920000000000e-14 1.940000000000e+01 1.928257149345e-03 0.000000000000e+00 -1.928257149326e-03 -1.940000000000e-14 1.960000000000e+01 1.934461223938e-03 0.000000000000e+00 -1.934461223918e-03 -1.960000000000e-14 1.980000000000e+01 1.940571957870e-03 0.000000000000e+00 -1.940571957850e-03 -1.980000000000e-14 2.000000000000e+01 1.946591089079e-03 0.000000000000e+00 -1.946591089059e-03 -2.000000000000e-14 1.000000000000e+00 2.761250030363e-04 0.000000000000e+00 -2.761250030353e-04 -1.000000000000e-15 1.200000000000e+00 3.249872263345e-04 0.000000000000e+00 -3.249872263333e-04 -1.200000000000e-15 1.400000000000e+00 3.720065491601e-04 0.000000000000e+00 -3.720065491587e-04 -1.400000000000e-15 1.600000000000e+00 4.172850682246e-04 0.000000000000e+00 -4.172850682230e-04 -1.600000000000e-15 1.800000000000e+00 4.609176283855e-04 0.000000000000e+00 -4.609176283837e-04 -1.800000000000e-15 2.000000000000e+00 5.029924288407e-04 0.000000000000e+00 -5.029924288387e-04 -2.000000000000e-15 2.200000000000e+00 5.435915738686e-04 0.000000000000e+00 -5.435915738664e-04 -2.200000000000e-15 2.400000000000e+00 5.827915730355e-04 0.000000000000e+00 -5.827915730331e-04 -2.400000000000e-15 2.600000000000e+00 6.206637955632e-04 0.000000000000e+00 -6.206637955606e-04 -2.600000000000e-15 2.800000000000e+00 6.572748832150e-04 0.000000000000e+00 -6.572748832122e-04 -2.800000000000e-15 3.000000000000e+00 6.926871256982e-04 0.000000000000e+00 -6.926871256952e-04 -3.000000000000e-15 3.200000000000e+00 7.269588022195e-04 0.000000000000e+00 -7.269588022163e-04 -3.200000000000e-15 3.400000000000e+00 7.601444924862e-04 0.000000000000e+00 -7.601444924828e-04 -3.400000000000e-15 3.600000000000e+00 7.922953601221e-04 0.000000000000e+00 -7.922953601185e-04 -3.600000000000e-15 3.800000000000e+00 8.234594111756e-04 0.000000000000e+00 -8.234594111718e-04 -3.800000000000e-15 4.000000000000e+00 8.536817301253e-04 0.000000000000e+00 -8.536817301213e-04 -4.000000000000e-15 4.200000000000e+00 8.830046955449e-04 0.000000000000e+00 -8.830046955407e-04 -4.200000000000e-15 4.400000000000e+00 9.114681773713e-04 0.000000000000e+00 -9.114681773669e-04 -4.400000000000e-15 4.600000000000e+00 9.391097262156e-04 0.000000000000e+00 -9.391097262110e-04 -4.600000000000e-15 4.800000000000e+00 9.659647032758e-04 0.000000000000e+00 -9.659647032710e-04 -4.800000000000e-15 5.000000000000e+00 9.920664869648e-04 0.000000000000e+00 -9.920664869598e-04 -5.000000000000e-15 5.200000000000e+00 1.017446574871e-03 0.000000000000e+00 -1.017446574865e-03 -5.200000000000e-15 5.400000000000e+00 1.042134721574e-03 0.000000000000e+00 -1.042134721569e-03 -5.400000000000e-15 5.600000000000e+00 1.066159056570e-03 0.000000000000e+00 -1.066159056565e-03 -5.600000000000e-15 5.800000000000e+00 1.089546192879e-03 0.000000000000e+00 -1.089546192873e-03 -5.800000000000e-15 6.000000000000e+00 1.112321327160e-03 0.000000000000e+00 -1.112321327154e-03 -6.000000000000e-15 6.200000000000e+00 1.134508332090e-03 0.000000000000e+00 -1.134508332084e-03 -6.200000000000e-15 6.400000000000e+00 1.156129841683e-03 0.000000000000e+00 -1.156129841676e-03 -6.400000000000e-15 6.600000000000e+00 1.177207330151e-03 0.000000000000e+00 -1.177207330144e-03 -6.600000000000e-15 6.800000000000e+00 1.197761184878e-03 0.000000000000e+00 -1.197761184871e-03 -6.800000000000e-15 7.000000000000e+00 1.217810773991e-03 0.000000000000e+00 -1.217810773984e-03 -7.000000000000e-15 7.200000000000e+00 1.237374508997e-03 0.000000000000e+00 -1.237374508989e-03 -7.200000000000e-15 7.400000000000e+00 1.256469902883e-03 0.000000000000e+00 -1.256469902875e-03 -7.400000000000e-15 7.600000000000e+00 1.275113624065e-03 0.000000000000e+00 -1.275113624057e-03 -7.600000000000e-15 7.800000000000e+00 1.293321546515e-03 0.000000000000e+00 -1.293321546507e-03 -7.800000000000e-15 8.000000000000e+00 1.311108796384e-03 0.000000000000e+00 -1.311108796376e-03 -8.000000000000e-15 8.200000000000e+00 1.328489795394e-03 0.000000000000e+00 -1.328489795385e-03 -8.200000000000e-15 8.400000000000e+00 1.345478301252e-03 0.000000000000e+00 -1.345478301243e-03 -8.400000000000e-15 8.600000000000e+00 1.362087445337e-03 0.000000000000e+00 -1.362087445329e-03 -8.600000000000e-15 8.800000000000e+00 1.378329767849e-03 0.000000000000e+00 -1.378329767841e-03 -8.800000000000e-15 9.000000000000e+00 1.394217250627e-03 0.000000000000e+00 -1.394217250618e-03 -9.000000000000e-15 9.200000000000e+00 1.409761347815e-03 0.000000000000e+00 -1.409761347806e-03 -9.200000000000e-15 9.400000000000e+00 1.424973014532e-03 0.000000000000e+00 -1.424973014523e-03 -9.400000000000e-15 9.600000000000e+00 1.439862733697e-03 0.000000000000e+00 -1.439862733687e-03 -9.600000000000e-15 9.800000000000e+00 1.454440541148e-03 0.000000000000e+00 -1.454440541138e-03 -9.800000000000e-15 1.000000000000e+01 1.468716049178e-03 0.000000000000e+00 -1.468716049168e-03 -1.000000000000e-14 1.020000000000e+01 1.482698468595e-03 0.000000000000e+00 -1.482698468585e-03 -1.020000000000e-14 1.040000000000e+01 1.496396629431e-03 0.000000000000e+00 -1.496396629421e-03 -1.040000000000e-14 1.060000000000e+01 1.509819000375e-03 0.000000000000e+00 -1.509819000364e-03 -1.060000000000e-14 1.080000000000e+01 1.522973707029e-03 0.000000000000e+00 -1.522973707018e-03 -1.080000000000e-14 1.100000000000e+01 1.535868549075e-03 0.000000000000e+00 -1.535868549064e-03 -1.100000000000e-14 1.120000000000e+01 1.548511016419e-03 0.000000000000e+00 -1.548511016408e-03 -1.120000000000e-14 1.140000000000e+01 1.560908304380e-03 0.000000000000e+00 -1.560908304369e-03 -1.140000000000e-14 1.160000000000e+01 1.573067328004e-03 0.000000000000e+00 -1.573067327992e-03 -1.160000000000e-14 1.180000000000e+01 1.584994735540e-03 0.000000000000e+00 -1.584994735528e-03 -1.180000000000e-14 1.200000000000e+01 1.596696921159e-03 0.000000000000e+00 -1.596696921147e-03 -1.200000000000e-14 1.220000000000e+01 1.608180036939e-03 0.000000000000e+00 -1.608180036926e-03 -1.220000000000e-14 1.240000000000e+01 1.619450004184e-03 0.000000000000e+00 -1.619450004172e-03 -1.240000000000e-14 1.260000000000e+01 1.630512524117e-03 0.000000000000e+00 -1.630512524104e-03 -1.260000000000e-14 1.280000000000e+01 1.641373087972e-03 0.000000000000e+00 -1.641373087960e-03 -1.280000000000e-14 1.300000000000e+01 1.652036986551e-03 0.000000000000e+00 -1.652036986538e-03 -1.300000000000e-14 1.320000000000e+01 1.662509319245e-03 0.000000000000e+00 -1.662509319231e-03 -1.320000000000e-14 1.340000000000e+01 1.672795002589e-03 0.000000000000e+00 -1.672795002576e-03 -1.340000000000e-14 1.360000000000e+01 1.682898778352e-03 0.000000000000e+00 -1.682898778339e-03 -1.360000000000e-14 1.380000000000e+01 1.692825221201e-03 0.000000000000e+00 -1.692825221188e-03 -1.380000000000e-14 1.400000000000e+01 1.702578745968e-03 0.000000000000e+00 -1.702578745954e-03 -1.400000000000e-14 1.420000000000e+01 1.712163614537e-03 0.000000000000e+00 -1.712163614523e-03 -1.420000000000e-14 1.440000000000e+01 1.721583942384e-03 0.000000000000e+00 -1.721583942370e-03 -1.440000000000e-14 1.460000000000e+01 1.730843704775e-03 0.000000000000e+00 -1.730843704760e-03 -1.460000000000e-14 1.480000000000e+01 1.739946742658e-03 0.000000000000e+00 -1.739946742643e-03 -1.480000000000e-14 1.500000000000e+01 1.748896768258e-03 0.000000000000e+00 -1.748896768243e-03 -1.500000000000e-14 1.520000000000e+01 1.757697370392e-03 0.000000000000e+00 -1.757697370377e-03 -1.520000000000e-14 1.540000000000e+01 1.766352019530e-03 0.000000000000e+00 -1.766352019515e-03 -1.540000000000e-14 1.560000000000e+01 1.774864072596e-03 0.000000000000e+00 -1.774864072581e-03 -1.560000000000e-14 1.580000000000e+01 1.783236777552e-03 0.000000000000e+00 -1.783236777536e-03 -1.580000000000e-14 1.600000000000e+01 1.791473277748e-03 0.000000000000e+00 -1.791473277732e-03 -1.600000000000e-14 1.620000000000e+01 1.799576616077e-03 0.000000000000e+00 -1.799576616061e-03 -1.620000000000e-14 1.640000000000e+01 1.807549738922e-03 0.000000000000e+00 -1.807549738905e-03 -1.640000000000e-14 1.660000000000e+01 1.815395499929e-03 0.000000000000e+00 -1.815395499912e-03 -1.660000000000e-14 1.680000000000e+01 1.823116663597e-03 0.000000000000e+00 -1.823116663580e-03 -1.680000000000e-14 1.700000000000e+01 1.830715908706e-03 0.000000000000e+00 -1.830715908689e-03 -1.700000000000e-14 1.720000000000e+01 1.838195831589e-03 0.000000000000e+00 -1.838195831572e-03 -1.720000000000e-14 1.740000000000e+01 1.845558949251e-03 0.000000000000e+00 -1.845558949233e-03 -1.740000000000e-14 1.760000000000e+01 1.852807702352e-03 0.000000000000e+00 -1.852807702334e-03 -1.760000000000e-14 1.780000000000e+01 1.859944458058e-03 0.000000000000e+00 -1.859944458040e-03 -1.780000000000e-14 1.800000000000e+01 1.866971512760e-03 0.000000000000e+00 -1.866971512742e-03 -1.800000000000e-14 1.820000000000e+01 1.873891094677e-03 0.000000000000e+00 -1.873891094659e-03 -1.820000000000e-14 1.840000000000e+01 1.880705366347e-03 0.000000000000e+00 -1.880705366329e-03 -1.840000000000e-14 1.860000000000e+01 1.887416427009e-03 0.000000000000e+00 -1.887416426990e-03 -1.860000000000e-14 1.880000000000e+01 1.894026314877e-03 0.000000000000e+00 -1.894026314858e-03 -1.880000000000e-14 1.900000000000e+01 1.900537009330e-03 0.000000000000e+00 -1.900537009311e-03 -1.900000000000e-14 1.920000000000e+01 1.906950432994e-03 0.000000000000e+00 -1.906950432975e-03 -1.920000000000e-14 1.940000000000e+01 1.913268453752e-03 0.000000000000e+00 -1.913268453732e-03 -1.940000000000e-14 1.960000000000e+01 1.919492886656e-03 0.000000000000e+00 -1.919492886636e-03 -1.960000000000e-14 1.980000000000e+01 1.925625495771e-03 0.000000000000e+00 -1.925625495751e-03 -1.980000000000e-14 2.000000000000e+01 1.931667995939e-03 0.000000000000e+00 -1.931667995919e-03 -2.000000000000e-14 1.000000000000e+00 2.728653254507e-04 0.000000000000e+00 -2.728653254497e-04 -1.000000000000e-15 1.200000000000e+00 3.211432076052e-04 0.000000000000e+00 -3.211432076040e-04 -1.200000000000e-15 1.400000000000e+00 3.675987224970e-04 0.000000000000e+00 -3.675987224956e-04 -1.400000000000e-15 1.600000000000e+00 4.123331530939e-04 0.000000000000e+00 -4.123331530923e-04 -1.600000000000e-15 1.800000000000e+00 4.554405582719e-04 0.000000000000e+00 -4.554405582701e-04 -1.800000000000e-15 2.000000000000e+00 4.970083805267e-04 0.000000000000e+00 -4.970083805247e-04 -2.000000000000e-15 2.200000000000e+00 5.371179974965e-04 0.000000000000e+00 -5.371179974943e-04 -2.200000000000e-15 2.400000000000e+00 5.758452224036e-04 0.000000000000e+00 -5.758452224012e-04 -2.400000000000e-15 2.600000000000e+00 6.132607582425e-04 0.000000000000e+00 -6.132607582399e-04 -2.600000000000e-15 2.800000000000e+00 6.494306101840e-04 0.000000000000e+00 -6.494306101812e-04 -2.800000000000e-15 3.000000000000e+00 6.844164602736e-04 0.000000000000e+00 -6.844164602706e-04 -3.000000000000e-15 3.200000000000e+00 7.182760081261e-04 0.000000000000e+00 -7.182760081229e-04 -3.200000000000e-15 3.400000000000e+00 7.510632809587e-04 0.000000000000e+00 -7.510632809553e-04 -3.400000000000e-15 3.600000000000e+00 7.828289159701e-04 0.000000000000e+00 -7.828289159665e-04 -3.600000000000e-15 3.800000000000e+00 8.136204177729e-04 0.000000000000e+00 -8.136204177691e-04 -3.800000000000e-15 4.000000000000e+00 8.434823933067e-04 0.000000000000e+00 -8.434823933027e-04 -4.000000000000e-15 4.200000000000e+00 8.724567664121e-04 0.000000000000e+00 -8.724567664079e-04 -4.200000000000e-15 4.400000000000e+00 9.005829740211e-04 0.000000000000e+00 -9.005829740167e-04 -4.400000000000e-15 4.600000000000e+00 9.278981543855e-04 0.000000000000e+00 -9.278981543809e-04 -4.600000000000e-15 4.800000000000e+00 9.544372760904e-04 0.000000000000e+00 -9.544372760856e-04 -4.800000000000e-15 5.000000000000e+00 9.802333434849e-04 0.000000000000e+00 -9.802333434799e-04 -5.000000000000e-15 5.200000000000e+00 1.005317497845e-03 0.000000000000e+00 -1.005317497840e-03 -5.200000000000e-15 5.400000000000e+00 1.029719154235e-03 0.000000000000e+00 -1.029719154230e-03 -5.400000000000e-15 5.600000000000e+00 1.053466118565e-03 0.000000000000e+00 -1.053466118559e-03 -5.600000000000e-15 5.800000000000e+00 1.076584695360e-03 0.000000000000e+00 -1.076584695355e-03 -5.800000000000e-15 6.000000000000e+00 1.099099787101e-03 0.000000000000e+00 -1.099099787095e-03 -6.000000000000e-15 6.200000000000e+00 1.121034985842e-03 0.000000000000e+00 -1.121034985836e-03 -6.200000000000e-15 6.400000000000e+00 1.142412657825e-03 0.000000000000e+00 -1.142412657818e-03 -6.400000000000e-15 6.600000000000e+00 1.163254021668e-03 0.000000000000e+00 -1.163254021662e-03 -6.600000000000e-15 6.800000000000e+00 1.183579220704e-03 0.000000000000e+00 -1.183579220697e-03 -6.800000000000e-15 7.000000000000e+00 1.203407389949e-03 0.000000000000e+00 -1.203407389942e-03 -7.000000000000e-15 7.200000000000e+00 1.222756718169e-03 0.000000000000e+00 -1.222756718162e-03 -7.200000000000e-15 7.400000000000e+00 1.241644505449e-03 0.000000000000e+00 -1.241644505442e-03 -7.400000000000e-15 7.600000000000e+00 1.260087216628e-03 0.000000000000e+00 -1.260087216621e-03 -7.600000000000e-15 7.800000000000e+00 1.278100530954e-03 0.000000000000e+00 -1.278100530946e-03 -7.800000000000e-15 8.000000000000e+00 1.295699388247e-03 0.000000000000e+00 -1.295699388239e-03 -8.000000000000e-15 8.200000000000e+00 1.312898031872e-03 0.000000000000e+00 -1.312898031864e-03 -8.200000000000e-15 8.400000000000e+00 1.329710048750e-03 0.000000000000e+00 -1.329710048741e-03 -8.400000000000e-15 8.600000000000e+00 1.346148406658e-03 0.000000000000e+00 -1.346148406650e-03 -8.600000000000e-15 8.800000000000e+00 1.362225489027e-03 0.000000000000e+00 -1.362225489018e-03 -8.800000000000e-15 9.000000000000e+00 1.377953127416e-03 0.000000000000e+00 -1.377953127407e-03 -9.000000000000e-15 9.200000000000e+00 1.393342631862e-03 0.000000000000e+00 -1.393342631853e-03 -9.200000000000e-15 9.400000000000e+00 1.408404819243e-03 0.000000000000e+00 -1.408404819234e-03 -9.400000000000e-15 9.600000000000e+00 1.423150039825e-03 0.000000000000e+00 -1.423150039815e-03 -9.600000000000e-15 9.800000000000e+00 1.437588202102e-03 0.000000000000e+00 -1.437588202092e-03 -9.800000000000e-15 1.000000000000e+01 1.451728796082e-03 0.000000000000e+00 -1.451728796072e-03 -1.000000000000e-14 1.020000000000e+01 1.465580915110e-03 0.000000000000e+00 -1.465580915100e-03 -1.020000000000e-14 1.040000000000e+01 1.479153276338e-03 0.000000000000e+00 -1.479153276328e-03 -1.040000000000e-14 1.060000000000e+01 1.492454239952e-03 0.000000000000e+00 -1.492454239941e-03 -1.060000000000e-14 1.080000000000e+01 1.505491827220e-03 0.000000000000e+00 -1.505491827209e-03 -1.080000000000e-14 1.100000000000e+01 1.518273737464e-03 0.000000000000e+00 -1.518273737453e-03 -1.100000000000e-14 1.120000000000e+01 1.530807364024e-03 0.000000000000e+00 -1.530807364012e-03 -1.120000000000e-14 1.140000000000e+01 1.543099809271e-03 0.000000000000e+00 -1.543099809260e-03 -1.140000000000e-14 1.160000000000e+01 1.555157898758e-03 0.000000000000e+00 -1.555157898746e-03 -1.160000000000e-14 1.180000000000e+01 1.566988194541e-03 0.000000000000e+00 -1.566988194530e-03 -1.180000000000e-14 1.200000000000e+01 1.578597007746e-03 0.000000000000e+00 -1.578597007734e-03 -1.200000000000e-14 1.220000000000e+01 1.589990410417e-03 0.000000000000e+00 -1.589990410405e-03 -1.220000000000e-14 1.240000000000e+01 1.601174246703e-03 0.000000000000e+00 -1.601174246690e-03 -1.240000000000e-14 1.260000000000e+01 1.612154143417e-03 0.000000000000e+00 -1.612154143404e-03 -1.260000000000e-14 1.280000000000e+01 1.622935520019e-03 0.000000000000e+00 -1.622935520006e-03 -1.280000000000e-14 1.300000000000e+01 1.633523598047e-03 0.000000000000e+00 -1.633523598034e-03 -1.300000000000e-14 1.320000000000e+01 1.643923410041e-03 0.000000000000e+00 -1.643923410028e-03 -1.320000000000e-14 1.340000000000e+01 1.654139807985e-03 0.000000000000e+00 -1.654139807972e-03 -1.340000000000e-14 1.360000000000e+01 1.664177471302e-03 0.000000000000e+00 -1.664177471288e-03 -1.360000000000e-14 1.380000000000e+01 1.674040914424e-03 0.000000000000e+00 -1.674040914410e-03 -1.380000000000e-14 1.400000000000e+01 1.683734493973e-03 0.000000000000e+00 -1.683734493959e-03 -1.400000000000e-14 1.420000000000e+01 1.693262415559e-03 0.000000000000e+00 -1.693262415545e-03 -1.420000000000e-14 1.440000000000e+01 1.702628740239e-03 0.000000000000e+00 -1.702628740225e-03 -1.440000000000e-14 1.460000000000e+01 1.711837390641e-03 0.000000000000e+00 -1.711837390626e-03 -1.460000000000e-14 1.480000000000e+01 1.720892156778e-03 0.000000000000e+00 -1.720892156763e-03 -1.480000000000e-14 1.500000000000e+01 1.729796701575e-03 0.000000000000e+00 -1.729796701560e-03 -1.500000000000e-14 1.520000000000e+01 1.738554566119e-03 0.000000000000e+00 -1.738554566103e-03 -1.520000000000e-14 1.540000000000e+01 1.747169174648e-03 0.000000000000e+00 -1.747169174633e-03 -1.540000000000e-14 1.560000000000e+01 1.755643839302e-03 0.000000000000e+00 -1.755643839287e-03 -1.560000000000e-14 1.580000000000e+01 1.763981764637e-03 0.000000000000e+00 -1.763981764621e-03 -1.580000000000e-14 1.600000000000e+01 1.772186051927e-03 0.000000000000e+00 -1.772186051911e-03 -1.600000000000e-14 1.620000000000e+01 1.780259703257e-03 0.000000000000e+00 -1.780259703241e-03 -1.620000000000e-14 1.640000000000e+01 1.788205625431e-03 0.000000000000e+00 -1.788205625415e-03 -1.640000000000e-14 1.660000000000e+01 1.796026633681e-03 0.000000000000e+00 -1.796026633664e-03 -1.660000000000e-14 1.680000000000e+01 1.803725455220e-03 0.000000000000e+00 -1.803725455203e-03 -1.680000000000e-14 1.700000000000e+01 1.811304732620e-03 0.000000000000e+00 -1.811304732603e-03 -1.700000000000e-14 1.720000000000e+01 1.818767027041e-03 0.000000000000e+00 -1.818767027024e-03 -1.720000000000e-14 1.740000000000e+01 1.826114821309e-03 0.000000000000e+00 -1.826114821292e-03 -1.740000000000e-14 1.760000000000e+01 1.833350522860e-03 0.000000000000e+00 -1.833350522843e-03 -1.760000000000e-14 1.780000000000e+01 1.840476466548e-03 0.000000000000e+00 -1.840476466530e-03 -1.780000000000e-14 1.800000000000e+01 1.847494917329e-03 0.000000000000e+00 -1.847494917311e-03 -1.800000000000e-14 1.820000000000e+01 1.854408072831e-03 0.000000000000e+00 -1.854408072813e-03 -1.820000000000e-14 1.840000000000e+01 1.861218065807e-03 0.000000000000e+00 -1.861218065789e-03 -1.840000000000e-14 1.860000000000e+01 1.867926966482e-03 0.000000000000e+00 -1.867926966463e-03 -1.860000000000e-14 1.880000000000e+01 1.874536784801e-03 0.000000000000e+00 -1.874536784782e-03 -1.880000000000e-14 1.900000000000e+01 1.881049472583e-03 0.000000000000e+00 -1.881049472564e-03 -1.900000000000e-14 1.920000000000e+01 1.887466925575e-03 0.000000000000e+00 -1.887466925556e-03 -1.920000000000e-14 1.940000000000e+01 1.893790985432e-03 0.000000000000e+00 -1.893790985413e-03 -1.940000000000e-14 1.960000000000e+01 1.900023441603e-03 0.000000000000e+00 -1.900023441584e-03 -1.960000000000e-14 1.980000000000e+01 1.906166033148e-03 0.000000000000e+00 -1.906166033128e-03 -1.980000000000e-14 2.000000000000e+01 1.912220450470e-03 0.000000000000e+00 -1.912220450450e-03 -2.000000000000e-14 1.000000000000e+00 3.113817702308e-04 0.000000000000e+00 -3.113817702298e-04 -1.000000000000e-15 1.200000000000e+00 3.660854655575e-04 0.000000000000e+00 -3.660854655563e-04 -1.200000000000e-15 1.400000000000e+00 4.186166530534e-04 0.000000000000e+00 -4.186166530520e-04 -1.400000000000e-15 1.600000000000e+00 4.691029948174e-04 0.000000000000e+00 -4.691029948158e-04 -1.600000000000e-15 1.800000000000e+00 5.176624933325e-04 0.000000000000e+00 -5.176624933307e-04 -1.800000000000e-15 2.000000000000e+00 5.644043613646e-04 0.000000000000e+00 -5.644043613626e-04 -2.000000000000e-15 2.200000000000e+00 6.094298041270e-04 0.000000000000e+00 -6.094298041248e-04 -2.200000000000e-15 2.400000000000e+00 6.528327229365e-04 0.000000000000e+00 -6.528327229341e-04 -2.400000000000e-15 2.600000000000e+00 6.947003487252e-04 0.000000000000e+00 -6.947003487226e-04 -2.600000000000e-15 2.800000000000e+00 7.351138129274e-04 0.000000000000e+00 -7.351138129246e-04 -2.800000000000e-15 3.000000000000e+00 7.741486624610e-04 0.000000000000e+00 -7.741486624580e-04 -3.000000000000e-15 3.200000000000e+00 8.118753247917e-04 0.000000000000e+00 -8.118753247885e-04 -3.200000000000e-15 3.400000000000e+00 8.483595284029e-04 0.000000000000e+00 -8.483595283995e-04 -3.400000000000e-15 3.600000000000e+00 8.836626833999e-04 0.000000000000e+00 -8.836626833963e-04 -3.600000000000e-15 3.800000000000e+00 9.178422264452e-04 0.000000000000e+00 -9.178422264414e-04 -3.800000000000e-15 4.000000000000e+00 9.509519337508e-04 0.000000000000e+00 -9.509519337468e-04 -4.000000000000e-15 4.200000000000e+00 9.830422054325e-04 0.000000000000e+00 -9.830422054283e-04 -4.200000000000e-15 4.400000000000e+00 1.014160333284e-03 0.000000000000e+00 -1.014160333280e-03 -4.400000000000e-15 4.600000000000e+00 1.044350699039e-03 0.000000000000e+00 -1.044350699034e-03 -4.600000000000e-15 4.800000000000e+00 1.073655046443e-03 0.000000000000e+00 -1.073655046438e-03 -4.800000000000e-15 5.000000000000e+00 1.102112638206e-03 0.000000000000e+00 -1.102112638201e-03 -5.000000000000e-15 5.200000000000e+00 1.129760445280e-03 0.000000000000e+00 -1.129760445275e-03 -5.200000000000e-15 5.400000000000e+00 1.156633310861e-03 0.000000000000e+00 -1.156633310855e-03 -5.400000000000e-15 5.600000000000e+00 1.182764100635e-03 0.000000000000e+00 -1.182764100630e-03 -5.600000000000e-15 5.800000000000e+00 1.208183840585e-03 0.000000000000e+00 -1.208183840579e-03 -5.800000000000e-15 6.000000000000e+00 1.232921843512e-03 0.000000000000e+00 -1.232921843506e-03 -6.000000000000e-15 6.200000000000e+00 1.257005825338e-03 0.000000000000e+00 -1.257005825332e-03 -6.200000000000e-15 6.400000000000e+00 1.280462012124e-03 0.000000000000e+00 -1.280462012118e-03 -6.400000000000e-15 6.600000000000e+00 1.303315238640e-03 0.000000000000e+00 -1.303315238633e-03 -6.600000000000e-15 6.800000000000e+00 1.325589039262e-03 0.000000000000e+00 -1.325589039255e-03 -6.800000000000e-15 7.000000000000e+00 1.347305731869e-03 0.000000000000e+00 -1.347305731862e-03 -7.000000000000e-15 7.200000000000e+00 1.368486495358e-03 0.000000000000e+00 -1.368486495351e-03 -7.200000000000e-15 7.400000000000e+00 1.389151441328e-03 0.000000000000e+00 -1.389151441321e-03 -7.400000000000e-15 7.600000000000e+00 1.409319680446e-03 0.000000000000e+00 -1.409319680439e-03 -7.600000000000e-15 7.800000000000e+00 1.429009383933e-03 0.000000000000e+00 -1.429009383926e-03 -7.800000000000e-15 8.000000000000e+00 1.448237840590e-03 0.000000000000e+00 -1.448237840582e-03 -8.000000000000e-15 8.200000000000e+00 1.467021509732e-03 0.000000000000e+00 -1.467021509723e-03 -8.200000000000e-15 8.400000000000e+00 1.485376070364e-03 0.000000000000e+00 -1.485376070356e-03 -8.400000000000e-15 8.600000000000e+00 1.503316466916e-03 0.000000000000e+00 -1.503316466907e-03 -8.600000000000e-15 8.800000000000e+00 1.520856951793e-03 0.000000000000e+00 -1.520856951784e-03 -8.800000000000e-15 9.000000000000e+00 1.538011125019e-03 0.000000000000e+00 -1.538011125010e-03 -9.000000000000e-15 9.200000000000e+00 1.554791971183e-03 0.000000000000e+00 -1.554791971173e-03 -9.200000000000e-15 9.400000000000e+00 1.571211893907e-03 0.000000000000e+00 -1.571211893897e-03 -9.400000000000e-15 9.600000000000e+00 1.587282748032e-03 0.000000000000e+00 -1.587282748022e-03 -9.600000000000e-15 9.800000000000e+00 1.603015869682e-03 0.000000000000e+00 -1.603015869672e-03 -9.800000000000e-15 1.000000000000e+01 1.618422104380e-03 0.000000000000e+00 -1.618422104370e-03 -1.000000000000e-14 1.020000000000e+01 1.633511833354e-03 0.000000000000e+00 -1.633511833343e-03 -1.020000000000e-14 1.040000000000e+01 1.648294998168e-03 0.000000000000e+00 -1.648294998158e-03 -1.040000000000e-14 1.060000000000e+01 1.662781123808e-03 0.000000000000e+00 -1.662781123797e-03 -1.060000000000e-14 1.080000000000e+01 1.676979340320e-03 0.000000000000e+00 -1.676979340310e-03 -1.080000000000e-14 1.100000000000e+01 1.690898403122e-03 0.000000000000e+00 -1.690898403111e-03 -1.100000000000e-14 1.120000000000e+01 1.704546712067e-03 0.000000000000e+00 -1.704546712056e-03 -1.120000000000e-14 1.140000000000e+01 1.717932329360e-03 0.000000000000e+00 -1.717932329349e-03 -1.140000000000e-14 1.160000000000e+01 1.731062996400e-03 0.000000000000e+00 -1.731062996389e-03 -1.160000000000e-14 1.180000000000e+01 1.743946149622e-03 0.000000000000e+00 -1.743946149611e-03 -1.180000000000e-14 1.200000000000e+01 1.756588935411e-03 0.000000000000e+00 -1.756588935399e-03 -1.200000000000e-14 1.220000000000e+01 1.768998224145e-03 0.000000000000e+00 -1.768998224133e-03 -1.220000000000e-14 1.240000000000e+01 1.781180623439e-03 0.000000000000e+00 -1.781180623426e-03 -1.240000000000e-14 1.260000000000e+01 1.793142490617e-03 0.000000000000e+00 -1.793142490604e-03 -1.260000000000e-14 1.280000000000e+01 1.804889944496e-03 0.000000000000e+00 -1.804889944483e-03 -1.280000000000e-14 1.300000000000e+01 1.816428876502e-03 0.000000000000e+00 -1.816428876489e-03 -1.300000000000e-14 1.320000000000e+01 1.827764961166e-03 0.000000000000e+00 -1.827764961152e-03 -1.320000000000e-14 1.340000000000e+01 1.838903666052e-03 0.000000000000e+00 -1.838903666038e-03 -1.340000000000e-14 1.360000000000e+01 1.849850261137e-03 0.000000000000e+00 -1.849850261123e-03 -1.360000000000e-14 1.380000000000e+01 1.860609827688e-03 0.000000000000e+00 -1.860609827674e-03 -1.380000000000e-14 1.400000000000e+01 1.871187266663e-03 0.000000000000e+00 -1.871187266649e-03 -1.400000000000e-14 1.420000000000e+01 1.881587306669e-03 0.000000000000e+00 -1.881587306655e-03 -1.420000000000e-14 1.440000000000e+01 1.891814511495e-03 0.000000000000e+00 -1.891814511480e-03 -1.440000000000e-14 1.460000000000e+01 1.901873287261e-03 0.000000000000e+00 -1.901873287246e-03 -1.460000000000e-14 1.480000000000e+01 1.911767889193e-03 0.000000000000e+00 -1.911767889178e-03 -1.480000000000e-14 1.500000000000e+01 1.921502428051e-03 0.000000000000e+00 -1.921502428036e-03 -1.500000000000e-14 1.520000000000e+01 1.931080876231e-03 0.000000000000e+00 -1.931080876216e-03 -1.520000000000e-14 1.540000000000e+01 1.940507073563e-03 0.000000000000e+00 -1.940507073548e-03 -1.540000000000e-14 1.560000000000e+01 1.949784732814e-03 0.000000000000e+00 -1.949784732798e-03 -1.560000000000e-14 1.580000000000e+01 1.958917444920e-03 0.000000000000e+00 -1.958917444905e-03 -1.580000000000e-14 1.600000000000e+01 1.967908683968e-03 0.000000000000e+00 -1.967908683952e-03 -1.600000000000e-14 1.620000000000e+01 1.976761811921e-03 0.000000000000e+00 -1.976761811905e-03 -1.620000000000e-14 1.640000000000e+01 1.985480083133e-03 0.000000000000e+00 -1.985480083117e-03 -1.640000000000e-14 1.660000000000e+01 1.994066648631e-03 0.000000000000e+00 -1.994066648614e-03 -1.660000000000e-14 1.680000000000e+01 2.002524560201e-03 0.000000000000e+00 -2.002524560184e-03 -1.680000000000e-14 1.700000000000e+01 2.010856774284e-03 0.000000000000e+00 -2.010856774267e-03 -1.700000000000e-14 1.720000000000e+01 2.019066155683e-03 0.000000000000e+00 -2.019066155666e-03 -1.720000000000e-14 1.740000000000e+01 2.027155481106e-03 0.000000000000e+00 -2.027155481088e-03 -1.740000000000e-14 1.760000000000e+01 2.035127442532e-03 0.000000000000e+00 -2.035127442514e-03 -1.760000000000e-14 1.780000000000e+01 2.042984650442e-03 0.000000000000e+00 -2.042984650424e-03 -1.780000000000e-14 1.800000000000e+01 2.050729636888e-03 0.000000000000e+00 -2.050729636870e-03 -1.800000000000e-14 1.820000000000e+01 2.058364858428e-03 0.000000000000e+00 -2.058364858410e-03 -1.820000000000e-14 1.840000000000e+01 2.065892698938e-03 0.000000000000e+00 -2.065892698919e-03 -1.840000000000e-14 1.860000000000e+01 2.073315472283e-03 0.000000000000e+00 -2.073315472264e-03 -1.860000000000e-14 1.880000000000e+01 2.080635424887e-03 0.000000000000e+00 -2.080635424868e-03 -1.880000000000e-14 1.900000000000e+01 2.087854738181e-03 0.000000000000e+00 -2.087854738162e-03 -1.900000000000e-14 1.920000000000e+01 2.094975530948e-03 0.000000000000e+00 -2.094975530928e-03 -1.920000000000e-14 1.940000000000e+01 2.101999861563e-03 0.000000000000e+00 -2.101999861544e-03 -1.940000000000e-14 1.960000000000e+01 2.108929730146e-03 0.000000000000e+00 -2.108929730127e-03 -1.960000000000e-14 1.980000000000e+01 2.115767080615e-03 0.000000000000e+00 -2.115767080595e-03 -1.980000000000e-14 2.000000000000e+01 2.122513802652e-03 0.000000000000e+00 -2.122513802632e-03 -2.000000000000e-14 1.000000000000e+00 3.079955647316e-04 0.000000000000e+00 -3.079955647306e-04 -1.000000000000e-15 1.200000000000e+00 3.620994014853e-04 0.000000000000e+00 -3.620994014841e-04 -1.200000000000e-15 1.400000000000e+00 4.140536783072e-04 0.000000000000e+00 -4.140536783058e-04 -1.400000000000e-15 1.600000000000e+00 4.639849561173e-04 0.000000000000e+00 -4.639849561157e-04 -1.600000000000e-15 1.800000000000e+00 5.120101945457e-04 0.000000000000e+00 -5.120101945439e-04 -1.800000000000e-15 2.000000000000e+00 5.582376199582e-04 0.000000000000e+00 -5.582376199562e-04 -2.000000000000e-15 2.200000000000e+00 6.027675053828e-04 0.000000000000e+00 -6.027675053806e-04 -2.200000000000e-15 2.400000000000e+00 6.456928717114e-04 0.000000000000e+00 -6.456928717090e-04 -2.400000000000e-15 2.600000000000e+00 6.871001186461e-04 0.000000000000e+00 -6.871001186435e-04 -2.600000000000e-15 2.800000000000e+00 7.270695929887e-04 0.000000000000e+00 -7.270695929859e-04 -2.800000000000e-15 3.000000000000e+00 7.656761010445e-04 0.000000000000e+00 -7.656761010415e-04 -3.000000000000e-15 3.200000000000e+00 8.029893711666e-04 0.000000000000e+00 -8.029893711634e-04 -3.200000000000e-15 3.400000000000e+00 8.390744717905e-04 0.000000000000e+00 -8.390744717871e-04 -3.400000000000e-15 3.600000000000e+00 8.739921897017e-04 0.000000000000e+00 -8.739921896981e-04 -3.600000000000e-15 3.800000000000e+00 9.077993727461e-04 0.000000000000e+00 -9.077993727423e-04 -3.800000000000e-15 4.000000000000e+00 9.405492407101e-04 0.000000000000e+00 -9.405492407061e-04 -4.000000000000e-15 4.200000000000e+00 9.722916676811e-04 0.000000000000e+00 -9.722916676769e-04 -4.200000000000e-15 4.400000000000e+00 1.003073447741e-03 0.000000000000e+00 -1.003073447737e-03 -4.400000000000e-15 4.600000000000e+00 1.032938492291e-03 0.000000000000e+00 -1.032938492286e-03 -4.600000000000e-15 4.800000000000e+00 1.061928099196e-03 0.000000000000e+00 -1.061928099191e-03 -4.800000000000e-15 5.000000000000e+00 1.090081109053e-03 0.000000000000e+00 -1.090081109048e-03 -5.000000000000e-15 5.200000000000e+00 1.117434092800e-03 0.000000000000e+00 -1.117434092794e-03 -5.200000000000e-15 5.400000000000e+00 1.144021514354e-03 0.000000000000e+00 -1.144021514348e-03 -5.400000000000e-15 5.600000000000e+00 1.169875879596e-03 0.000000000000e+00 -1.169875879591e-03 -5.600000000000e-15 5.800000000000e+00 1.195027872990e-03 0.000000000000e+00 -1.195027872984e-03 -5.800000000000e-15 6.000000000000e+00 1.219506483000e-03 0.000000000000e+00 -1.219506482994e-03 -6.000000000000e-15 6.200000000000e+00 1.243339117361e-03 0.000000000000e+00 -1.243339117355e-03 -6.200000000000e-15 6.400000000000e+00 1.266551709132e-03 0.000000000000e+00 -1.266551709126e-03 -6.400000000000e-15 6.600000000000e+00 1.289168814369e-03 0.000000000000e+00 -1.289168814363e-03 -6.600000000000e-15 6.800000000000e+00 1.311213702181e-03 0.000000000000e+00 -1.311213702174e-03 -6.800000000000e-15 7.000000000000e+00 1.332708437840e-03 0.000000000000e+00 -1.332708437833e-03 -7.000000000000e-15 7.200000000000e+00 1.353673959568e-03 0.000000000000e+00 -1.353673959560e-03 -7.200000000000e-15 7.400000000000e+00 1.374130149532e-03 0.000000000000e+00 -1.374130149525e-03 -7.400000000000e-15 7.600000000000e+00 1.394095899574e-03 0.000000000000e+00 -1.394095899567e-03 -7.600000000000e-15 7.800000000000e+00 1.413589172093e-03 0.000000000000e+00 -1.413589172085e-03 -7.800000000000e-15 8.000000000000e+00 1.432627056515e-03 0.000000000000e+00 -1.432627056507e-03 -8.000000000000e-15 8.200000000000e+00 1.451225821701e-03 0.000000000000e+00 -1.451225821693e-03 -8.200000000000e-15 8.400000000000e+00 1.469400964638e-03 0.000000000000e+00 -1.469400964629e-03 -8.400000000000e-15 8.600000000000e+00 1.487167255702e-03 0.000000000000e+00 -1.487167255693e-03 -8.600000000000e-15 8.800000000000e+00 1.504538780791e-03 0.000000000000e+00 -1.504538780782e-03 -8.800000000000e-15 9.000000000000e+00 1.521528980555e-03 0.000000000000e+00 -1.521528980546e-03 -9.000000000000e-15 9.200000000000e+00 1.538150686969e-03 0.000000000000e+00 -1.538150686960e-03 -9.200000000000e-15 9.400000000000e+00 1.554416157445e-03 0.000000000000e+00 -1.554416157435e-03 -9.400000000000e-15 9.600000000000e+00 1.570337106678e-03 0.000000000000e+00 -1.570337106669e-03 -9.600000000000e-15 9.800000000000e+00 1.585924736406e-03 0.000000000000e+00 -1.585924736396e-03 -9.800000000000e-15 1.000000000000e+01 1.601189763222e-03 0.000000000000e+00 -1.601189763212e-03 -1.000000000000e-14 1.020000000000e+01 1.616142444611e-03 0.000000000000e+00 -1.616142444600e-03 -1.020000000000e-14 1.040000000000e+01 1.630792603314e-03 0.000000000000e+00 -1.630792603303e-03 -1.040000000000e-14 1.060000000000e+01 1.645149650171e-03 0.000000000000e+00 -1.645149650160e-03 -1.060000000000e-14 1.080000000000e+01 1.659222605528e-03 0.000000000000e+00 -1.659222605517e-03 -1.080000000000e-14 1.100000000000e+01 1.673020119330e-03 0.000000000000e+00 -1.673020119319e-03 -1.100000000000e-14 1.120000000000e+01 1.686550489982e-03 0.000000000000e+00 -1.686550489970e-03 -1.120000000000e-14 1.140000000000e+01 1.699821682066e-03 0.000000000000e+00 -1.699821682055e-03 -1.140000000000e-14 1.160000000000e+01 1.712841343008e-03 0.000000000000e+00 -1.712841342996e-03 -1.160000000000e-14 1.180000000000e+01 1.725616818739e-03 0.000000000000e+00 -1.725616818728e-03 -1.180000000000e-14 1.200000000000e+01 1.738155168455e-03 0.000000000000e+00 -1.738155168443e-03 -1.200000000000e-14 1.220000000000e+01 1.750463178501e-03 0.000000000000e+00 -1.750463178489e-03 -1.220000000000e-14 1.240000000000e+01 1.762547375467e-03 0.000000000000e+00 -1.762547375454e-03 -1.240000000000e-14 1.260000000000e+01 1.774414038528e-03 0.000000000000e+00 -1.774414038515e-03 -1.260000000000e-14 1.280000000000e+01 1.786069211096e-03 0.000000000000e+00 -1.786069211084e-03 -1.280000000000e-14 1.300000000000e+01 1.797518711810e-03 0.000000000000e+00 -1.797518711797e-03 -1.300000000000e-14 1.320000000000e+01 1.808768144919e-03 0.000000000000e+00 -1.808768144905e-03 -1.320000000000e-14 1.340000000000e+01 1.819822910095e-03 0.000000000000e+00 -1.819822910081e-03 -1.340000000000e-14 1.360000000000e+01 1.830688211713e-03 0.000000000000e+00 -1.830688211700e-03 -1.360000000000e-14 1.380000000000e+01 1.841369067627e-03 0.000000000000e+00 -1.841369067613e-03 -1.380000000000e-14 1.400000000000e+01 1.851870317474e-03 0.000000000000e+00 -1.851870317460e-03 -1.400000000000e-14 1.420000000000e+01 1.862196630543e-03 0.000000000000e+00 -1.862196630529e-03 -1.420000000000e-14 1.440000000000e+01 1.872352513229e-03 0.000000000000e+00 -1.872352513215e-03 -1.440000000000e-14 1.460000000000e+01 1.882342316093e-03 0.000000000000e+00 -1.882342316078e-03 -1.460000000000e-14 1.480000000000e+01 1.892170240565e-03 0.000000000000e+00 -1.892170240550e-03 -1.480000000000e-14 1.500000000000e+01 1.901840345298e-03 0.000000000000e+00 -1.901840345283e-03 -1.500000000000e-14 1.520000000000e+01 1.911356552202e-03 0.000000000000e+00 -1.911356552186e-03 -1.520000000000e-14 1.540000000000e+01 1.920722652171e-03 0.000000000000e+00 -1.920722652156e-03 -1.540000000000e-14 1.560000000000e+01 1.929942310530e-03 0.000000000000e+00 -1.929942310515e-03 -1.560000000000e-14 1.580000000000e+01 1.939019072206e-03 0.000000000000e+00 -1.939019072190e-03 -1.580000000000e-14 1.600000000000e+01 1.947956366644e-03 0.000000000000e+00 -1.947956366628e-03 -1.600000000000e-14 1.620000000000e+01 1.956757512495e-03 0.000000000000e+00 -1.956757512479e-03 -1.620000000000e-14 1.640000000000e+01 1.965425722060e-03 0.000000000000e+00 -1.965425722043e-03 -1.640000000000e-14 1.660000000000e+01 1.973964105536e-03 0.000000000000e+00 -1.973964105519e-03 -1.660000000000e-14 1.680000000000e+01 1.982375675053e-03 0.000000000000e+00 -1.982375675036e-03 -1.680000000000e-14 1.700000000000e+01 1.990663348519e-03 0.000000000000e+00 -1.990663348502e-03 -1.700000000000e-14 1.720000000000e+01 1.998829953293e-03 0.000000000000e+00 -1.998829953276e-03 -1.720000000000e-14 1.740000000000e+01 2.006878229677e-03 0.000000000000e+00 -2.006878229659e-03 -1.740000000000e-14 1.760000000000e+01 2.014810834253e-03 0.000000000000e+00 -2.014810834236e-03 -1.760000000000e-14 1.780000000000e+01 2.022630343071e-03 0.000000000000e+00 -2.022630343053e-03 -1.780000000000e-14 1.800000000000e+01 2.030339254682e-03 0.000000000000e+00 -2.030339254664e-03 -1.800000000000e-14 1.820000000000e+01 2.037939993043e-03 0.000000000000e+00 -2.037939993025e-03 -1.820000000000e-14 1.840000000000e+01 2.045434910292e-03 0.000000000000e+00 -2.045434910273e-03 -1.840000000000e-14 1.860000000000e+01 2.052826289391e-03 0.000000000000e+00 -2.052826289372e-03 -1.860000000000e-14 1.880000000000e+01 2.060116346666e-03 0.000000000000e+00 -2.060116346647e-03 -1.880000000000e-14 1.900000000000e+01 2.067307234224e-03 0.000000000000e+00 -2.067307234205e-03 -1.900000000000e-14 1.920000000000e+01 2.074401042272e-03 0.000000000000e+00 -2.074401042253e-03 -1.920000000000e-14 1.940000000000e+01 2.081399801334e-03 0.000000000000e+00 -2.081399801315e-03 -1.940000000000e-14 1.960000000000e+01 2.088305484373e-03 0.000000000000e+00 -2.088305484354e-03 -1.960000000000e-14 1.980000000000e+01 2.095120008823e-03 0.000000000000e+00 -2.095120008804e-03 -1.980000000000e-14 2.000000000000e+01 2.101845238537e-03 0.000000000000e+00 -2.101845238517e-03 -2.000000000000e-14 1.000000000000e+00 3.039258813696e-04 0.000000000000e+00 -3.039258813686e-04 -1.000000000000e-15 1.200000000000e+00 3.573058609284e-04 0.000000000000e+00 -3.573058609272e-04 -1.200000000000e-15 1.400000000000e+00 4.085629771271e-04 0.000000000000e+00 -4.085629771257e-04 -1.400000000000e-15 1.600000000000e+00 4.578225046302e-04 0.000000000000e+00 -4.578225046286e-04 -1.600000000000e-15 1.800000000000e+00 5.052001856781e-04 0.000000000000e+00 -5.052001856763e-04 -1.800000000000e-15 2.000000000000e+00 5.508030957795e-04 0.000000000000e+00 -5.508030957775e-04 -2.000000000000e-15 2.200000000000e+00 5.947304209035e-04 0.000000000000e+00 -5.947304209013e-04 -2.200000000000e-15 2.400000000000e+00 6.370741557167e-04 0.000000000000e+00 -6.370741557143e-04 -2.400000000000e-15 2.600000000000e+00 6.779197314562e-04 0.000000000000e+00 -6.779197314536e-04 -2.600000000000e-15 2.800000000000e+00 7.173465811197e-04 0.000000000000e+00 -7.173465811169e-04 -2.800000000000e-15 3.000000000000e+00 7.554286488077e-04 0.000000000000e+00 -7.554286488047e-04 -3.000000000000e-15 3.200000000000e+00 7.922348492827e-04 0.000000000000e+00 -7.922348492795e-04 -3.200000000000e-15 3.400000000000e+00 8.278294831241e-04 0.000000000000e+00 -8.278294831207e-04 -3.400000000000e-15 3.600000000000e+00 8.622726122403e-04 0.000000000000e+00 -8.622726122367e-04 -3.600000000000e-15 3.800000000000e+00 8.956203999556e-04 0.000000000000e+00 -8.956203999518e-04 -3.800000000000e-15 4.000000000000e+00 9.279254194072e-04 0.000000000000e+00 -9.279254194032e-04 -4.000000000000e-15 4.200000000000e+00 9.592369431244e-04 0.000000000000e+00 -9.592369431202e-04 -4.200000000000e-15 4.400000000000e+00 9.896011584735e-04 0.000000000000e+00 -9.896011584691e-04 -4.400000000000e-15 4.600000000000e+00 1.019061459477e-03 0.000000000000e+00 -1.019061459472e-03 -4.600000000000e-15 4.800000000000e+00 1.047658616936e-03 0.000000000000e+00 -1.047658616931e-03 -4.800000000000e-15 5.000000000000e+00 1.075430981708e-03 0.000000000000e+00 -1.075430981703e-03 -5.000000000000e-15 5.200000000000e+00 1.102414660772e-03 0.000000000000e+00 -1.102414660766e-03 -5.200000000000e-15 5.400000000000e+00 1.128643678294e-03 0.000000000000e+00 -1.128643678288e-03 -5.400000000000e-15 5.600000000000e+00 1.154150123123e-03 0.000000000000e+00 -1.154150123117e-03 -5.600000000000e-15 5.800000000000e+00 1.178964284025e-03 0.000000000000e+00 -1.178964284019e-03 -5.800000000000e-15 6.000000000000e+00 1.203114773810e-03 0.000000000000e+00 -1.203114773804e-03 -6.000000000000e-15 6.200000000000e+00 1.226628643394e-03 0.000000000000e+00 -1.226628643388e-03 -6.200000000000e-15 6.400000000000e+00 1.249531486729e-03 0.000000000000e+00 -1.249531486722e-03 -6.400000000000e-15 6.600000000000e+00 1.271847537419e-03 0.000000000000e+00 -1.271847537412e-03 -6.600000000000e-15 6.800000000000e+00 1.293599757803e-03 0.000000000000e+00 -1.293599757796e-03 -6.800000000000e-15 7.000000000000e+00 1.314809921144e-03 0.000000000000e+00 -1.314809921137e-03 -7.000000000000e-15 7.200000000000e+00 1.335498687557e-03 0.000000000000e+00 -1.335498687550e-03 -7.200000000000e-15 7.400000000000e+00 1.355685674215e-03 0.000000000000e+00 -1.355685674208e-03 -7.400000000000e-15 7.600000000000e+00 1.375389520319e-03 0.000000000000e+00 -1.375389520311e-03 -7.600000000000e-15 7.800000000000e+00 1.394627947290e-03 0.000000000000e+00 -1.394627947283e-03 -7.800000000000e-15 8.000000000000e+00 1.413417814586e-03 0.000000000000e+00 -1.413417814578e-03 -8.000000000000e-15 8.200000000000e+00 1.431775171491e-03 0.000000000000e+00 -1.431775171483e-03 -8.200000000000e-15 8.400000000000e+00 1.449715305240e-03 0.000000000000e+00 -1.449715305231e-03 -8.400000000000e-15 8.600000000000e+00 1.467252785743e-03 0.000000000000e+00 -1.467252785735e-03 -8.600000000000e-15 8.800000000000e+00 1.484401507218e-03 0.000000000000e+00 -1.484401507209e-03 -8.800000000000e-15 9.000000000000e+00 1.501174726945e-03 0.000000000000e+00 -1.501174726936e-03 -9.000000000000e-15 9.200000000000e+00 1.517585101402e-03 0.000000000000e+00 -1.517585101393e-03 -9.200000000000e-15 9.400000000000e+00 1.533644719959e-03 0.000000000000e+00 -1.533644719950e-03 -9.400000000000e-15 9.600000000000e+00 1.549365136339e-03 0.000000000000e+00 -1.549365136330e-03 -9.600000000000e-15 9.800000000000e+00 1.564757398006e-03 0.000000000000e+00 -1.564757397996e-03 -9.800000000000e-15 1.000000000000e+01 1.579832073637e-03 0.000000000000e+00 -1.579832073627e-03 -1.000000000000e-14 1.020000000000e+01 1.594599278834e-03 0.000000000000e+00 -1.594599278824e-03 -1.020000000000e-14 1.040000000000e+01 1.609068700188e-03 0.000000000000e+00 -1.609068700177e-03 -1.040000000000e-14 1.060000000000e+01 1.623249617829e-03 0.000000000000e+00 -1.623249617818e-03 -1.060000000000e-14 1.080000000000e+01 1.637150926569e-03 0.000000000000e+00 -1.637150926558e-03 -1.080000000000e-14 1.100000000000e+01 1.650781155737e-03 0.000000000000e+00 -1.650781155726e-03 -1.100000000000e-14 1.120000000000e+01 1.664148487802e-03 0.000000000000e+00 -1.664148487790e-03 -1.120000000000e-14 1.140000000000e+01 1.677260775867e-03 0.000000000000e+00 -1.677260775855e-03 -1.140000000000e-14 1.160000000000e+01 1.690125560116e-03 0.000000000000e+00 -1.690125560104e-03 -1.160000000000e-14 1.180000000000e+01 1.702750083283e-03 0.000000000000e+00 -1.702750083271e-03 -1.180000000000e-14 1.200000000000e+01 1.715141305210e-03 0.000000000000e+00 -1.715141305198e-03 -1.200000000000e-14 1.220000000000e+01 1.727305916564e-03 0.000000000000e+00 -1.727305916551e-03 -1.220000000000e-14 1.240000000000e+01 1.739250351752e-03 0.000000000000e+00 -1.739250351740e-03 -1.240000000000e-14 1.260000000000e+01 1.750980801112e-03 0.000000000000e+00 -1.750980801099e-03 -1.260000000000e-14 1.280000000000e+01 1.762503222400e-03 0.000000000000e+00 -1.762503222387e-03 -1.280000000000e-14 1.300000000000e+01 1.773823351646e-03 0.000000000000e+00 -1.773823351633e-03 -1.300000000000e-14 1.320000000000e+01 1.784946713395e-03 0.000000000000e+00 -1.784946713382e-03 -1.320000000000e-14 1.340000000000e+01 1.795878630398e-03 0.000000000000e+00 -1.795878630384e-03 -1.340000000000e-14 1.360000000000e+01 1.806624232758e-03 0.000000000000e+00 -1.806624232744e-03 -1.360000000000e-14 1.380000000000e+01 1.817188466600e-03 0.000000000000e+00 -1.817188466586e-03 -1.380000000000e-14 1.400000000000e+01 1.827576102261e-03 0.000000000000e+00 -1.827576102247e-03 -1.400000000000e-14 1.420000000000e+01 1.837791742055e-03 0.000000000000e+00 -1.837791742040e-03 -1.420000000000e-14 1.440000000000e+01 1.847839827624e-03 0.000000000000e+00 -1.847839827610e-03 -1.440000000000e-14 1.460000000000e+01 1.857724646913e-03 0.000000000000e+00 -1.857724646898e-03 -1.460000000000e-14 1.480000000000e+01 1.867450340771e-03 0.000000000000e+00 -1.867450340757e-03 -1.480000000000e-14 1.500000000000e+01 1.877020909231e-03 0.000000000000e+00 -1.877020909216e-03 -1.500000000000e-14 1.520000000000e+01 1.886440217452e-03 0.000000000000e+00 -1.886440217437e-03 -1.520000000000e-14 1.540000000000e+01 1.895712001383e-03 0.000000000000e+00 -1.895712001367e-03 -1.540000000000e-14 1.560000000000e+01 1.904839873119e-03 0.000000000000e+00 -1.904839873104e-03 -1.560000000000e-14 1.580000000000e+01 1.913827326017e-03 0.000000000000e+00 -1.913827326001e-03 -1.580000000000e-14 1.600000000000e+01 1.922677739540e-03 0.000000000000e+00 -1.922677739524e-03 -1.600000000000e-14 1.620000000000e+01 1.931394383876e-03 0.000000000000e+00 -1.931394383860e-03 -1.620000000000e-14 1.640000000000e+01 1.939980424333e-03 0.000000000000e+00 -1.939980424317e-03 -1.640000000000e-14 1.660000000000e+01 1.948438925517e-03 0.000000000000e+00 -1.948438925500e-03 -1.660000000000e-14 1.680000000000e+01 1.956772855317e-03 0.000000000000e+00 -1.956772855301e-03 -1.680000000000e-14 1.700000000000e+01 1.964985088703e-03 0.000000000000e+00 -1.964985088686e-03 -1.700000000000e-14 1.720000000000e+01 1.973078411338e-03 0.000000000000e+00 -1.973078411321e-03 -1.720000000000e-14 1.740000000000e+01 1.981055523033e-03 0.000000000000e+00 -1.981055523015e-03 -1.740000000000e-14 1.760000000000e+01 1.988919041031e-03 0.000000000000e+00 -1.988919041013e-03 -1.760000000000e-14 1.780000000000e+01 1.996671503154e-03 0.000000000000e+00 -1.996671503136e-03 -1.780000000000e-14 1.800000000000e+01 2.004315370794e-03 0.000000000000e+00 -2.004315370776e-03 -1.800000000000e-14 1.820000000000e+01 2.011853031780e-03 0.000000000000e+00 -2.011853031762e-03 -1.820000000000e-14 1.840000000000e+01 2.019286803108e-03 0.000000000000e+00 -2.019286803090e-03 -1.840000000000e-14 1.860000000000e+01 2.026618933558e-03 0.000000000000e+00 -2.026618933539e-03 -1.860000000000e-14 1.880000000000e+01 2.033851606188e-03 0.000000000000e+00 -2.033851606169e-03 -1.880000000000e-14 1.900000000000e+01 2.040986940725e-03 0.000000000000e+00 -2.040986940706e-03 -1.900000000000e-14 1.920000000000e+01 2.048026995850e-03 0.000000000000e+00 -2.048026995831e-03 -1.920000000000e-14 1.940000000000e+01 2.054973771383e-03 0.000000000000e+00 -2.054973771364e-03 -1.940000000000e-14 1.960000000000e+01 2.061829210376e-03 0.000000000000e+00 -2.061829210357e-03 -1.960000000000e-14 1.980000000000e+01 2.068595201119e-03 0.000000000000e+00 -2.068595201099e-03 -1.980000000000e-14 2.000000000000e+01 2.075273579056e-03 0.000000000000e+00 -2.075273579036e-03 -2.000000000000e-14 1.000000000000e+00 2.314013127009e-04 0.000000000000e+00 -2.314013126999e-04 -1.000000000000e-15 1.200000000000e+00 2.726307497779e-04 0.000000000000e+00 -2.726307497767e-04 -1.200000000000e-15 1.400000000000e+00 3.123736012569e-04 0.000000000000e+00 -3.123736012555e-04 -1.400000000000e-15 1.600000000000e+00 3.507033899815e-04 0.000000000000e+00 -3.507033899799e-04 -1.600000000000e-15 1.800000000000e+00 3.876889253745e-04 0.000000000000e+00 -3.876889253727e-04 -1.800000000000e-15 2.000000000000e+00 4.233946591541e-04 0.000000000000e+00 -4.233946591521e-04 -2.000000000000e-15 2.200000000000e+00 4.578810101180e-04 0.000000000000e+00 -4.578810101158e-04 -2.200000000000e-15 2.400000000000e+00 4.912046611598e-04 0.000000000000e+00 -4.912046611574e-04 -2.400000000000e-15 2.600000000000e+00 5.234188313067e-04 0.000000000000e+00 -5.234188313041e-04 -2.600000000000e-15 2.800000000000e+00 5.545735252227e-04 0.000000000000e+00 -5.545735252199e-04 -2.800000000000e-15 3.000000000000e+00 5.847157623154e-04 0.000000000000e+00 -5.847157623124e-04 -3.000000000000e-15 3.200000000000e+00 6.138897873366e-04 0.000000000000e+00 -6.138897873334e-04 -3.200000000000e-15 3.400000000000e+00 6.421372641512e-04 0.000000000000e+00 -6.421372641478e-04 -3.400000000000e-15 3.600000000000e+00 6.694974541730e-04 0.000000000000e+00 -6.694974541694e-04 -3.600000000000e-15 3.800000000000e+00 6.960073871457e-04 0.000000000000e+00 -6.960073871419e-04 -3.800000000000e-15 4.000000000000e+00 7.217019864586e-04 0.000000000000e+00 -7.217019864546e-04 -4.000000000000e-15 4.200000000000e+00 7.466142503479e-04 0.000000000000e+00 -7.466142503437e-04 -4.200000000000e-15 4.400000000000e+00 7.707753525007e-04 0.000000000000e+00 -7.707753524963e-04 -4.400000000000e-15 4.600000000000e+00 7.942147690928e-04 0.000000000000e+00 -7.942147690882e-04 -4.600000000000e-15 4.800000000000e+00 8.169603893379e-04 0.000000000000e+00 -8.169603893331e-04 -4.800000000000e-15 5.000000000000e+00 8.390386178217e-04 0.000000000000e+00 -8.390386178167e-04 -5.000000000000e-15 5.200000000000e+00 8.604744692941e-04 0.000000000000e+00 -8.604744692889e-04 -5.200000000000e-15 5.400000000000e+00 8.812916565411e-04 0.000000000000e+00 -8.812916565357e-04 -5.400000000000e-15 5.600000000000e+00 9.015126718995e-04 0.000000000000e+00 -9.015126718939e-04 -5.600000000000e-15 5.800000000000e+00 9.211588629314e-04 0.000000000000e+00 -9.211588629256e-04 -5.800000000000e-15 6.000000000000e+00 9.402505027288e-04 0.000000000000e+00 -9.402505027228e-04 -6.000000000000e-15 6.200000000000e+00 9.588068552770e-04 0.000000000000e+00 -9.588068552708e-04 -6.200000000000e-15 6.400000000000e+00 9.768462362725e-04 0.000000000000e+00 -9.768462362661e-04 -6.400000000000e-15 6.600000000000e+00 9.943860697516e-04 0.000000000000e+00 -9.943860697450e-04 -6.600000000000e-15 6.800000000000e+00 1.011442940862e-03 0.000000000000e+00 -1.011442940855e-03 -6.800000000000e-15 7.000000000000e+00 1.028032645074e-03 0.000000000000e+00 -1.028032645067e-03 -7.000000000000e-15 7.200000000000e+00 1.044170234115e-03 0.000000000000e+00 -1.044170234108e-03 -7.200000000000e-15 7.400000000000e+00 1.059870058867e-03 0.000000000000e+00 -1.059870058860e-03 -7.400000000000e-15 7.600000000000e+00 1.075145809473e-03 0.000000000000e+00 -1.075145809466e-03 -7.600000000000e-15 7.800000000000e+00 1.090010552856e-03 0.000000000000e+00 -1.090010552848e-03 -7.800000000000e-15 8.000000000000e+00 1.104476767846e-03 0.000000000000e+00 -1.104476767838e-03 -8.000000000000e-15 8.200000000000e+00 1.118556378099e-03 0.000000000000e+00 -1.118556378090e-03 -8.200000000000e-15 8.400000000000e+00 1.132260782968e-03 0.000000000000e+00 -1.132260782960e-03 -8.400000000000e-15 8.600000000000e+00 1.145600886481e-03 0.000000000000e+00 -1.145600886472e-03 -8.600000000000e-15 8.800000000000e+00 1.158587124556e-03 0.000000000000e+00 -1.158587124547e-03 -8.800000000000e-15 9.000000000000e+00 1.171229490597e-03 0.000000000000e+00 -1.171229490588e-03 -9.000000000000e-15 9.200000000000e+00 1.183537559574e-03 0.000000000000e+00 -1.183537559565e-03 -9.200000000000e-15 9.400000000000e+00 1.195520510700e-03 0.000000000000e+00 -1.195520510690e-03 -9.400000000000e-15 9.600000000000e+00 1.207187148808e-03 0.000000000000e+00 -1.207187148798e-03 -9.600000000000e-15 9.800000000000e+00 1.218545924519e-03 0.000000000000e+00 -1.218545924509e-03 -9.800000000000e-15 1.000000000000e+01 1.229604953276e-03 0.000000000000e+00 -1.229604953266e-03 -1.000000000000e-14 1.020000000000e+01 1.240372033341e-03 0.000000000000e+00 -1.240372033331e-03 -1.020000000000e-14 1.040000000000e+01 1.250854662802e-03 0.000000000000e+00 -1.250854662791e-03 -1.040000000000e-14 1.060000000000e+01 1.261060055681e-03 0.000000000000e+00 -1.261060055671e-03 -1.060000000000e-14 1.080000000000e+01 1.270995157186e-03 0.000000000000e+00 -1.270995157175e-03 -1.080000000000e-14 1.100000000000e+01 1.280666658163e-03 0.000000000000e+00 -1.280666658152e-03 -1.100000000000e-14 1.120000000000e+01 1.290081008816e-03 0.000000000000e+00 -1.290081008805e-03 -1.120000000000e-14 1.140000000000e+01 1.299244431719e-03 0.000000000000e+00 -1.299244431708e-03 -1.140000000000e-14 1.160000000000e+01 1.308162934176e-03 0.000000000000e+00 -1.308162934164e-03 -1.160000000000e-14 1.180000000000e+01 1.316842319969e-03 0.000000000000e+00 -1.316842319957e-03 -1.180000000000e-14 1.200000000000e+01 1.325288200522e-03 0.000000000000e+00 -1.325288200510e-03 -1.200000000000e-14 1.220000000000e+01 1.333506005518e-03 0.000000000000e+00 -1.333506005506e-03 -1.220000000000e-14 1.240000000000e+01 1.341500992999e-03 0.000000000000e+00 -1.341500992987e-03 -1.240000000000e-14 1.260000000000e+01 1.349278258971e-03 0.000000000000e+00 -1.349278258959e-03 -1.260000000000e-14 1.280000000000e+01 1.356842746544e-03 0.000000000000e+00 -1.356842746531e-03 -1.280000000000e-14 1.300000000000e+01 1.364199254619e-03 0.000000000000e+00 -1.364199254606e-03 -1.300000000000e-14 1.320000000000e+01 1.371352446157e-03 0.000000000000e+00 -1.371352446143e-03 -1.320000000000e-14 1.340000000000e+01 1.378306856027e-03 0.000000000000e+00 -1.378306856013e-03 -1.340000000000e-14 1.360000000000e+01 1.385066898466e-03 0.000000000000e+00 -1.385066898452e-03 -1.360000000000e-14 1.380000000000e+01 1.391636874150e-03 0.000000000000e+00 -1.391636874136e-03 -1.380000000000e-14 1.400000000000e+01 1.398020976901e-03 0.000000000000e+00 -1.398020976887e-03 -1.400000000000e-14 1.420000000000e+01 1.404223300032e-03 0.000000000000e+00 -1.404223300018e-03 -1.420000000000e-14 1.440000000000e+01 1.410247842338e-03 0.000000000000e+00 -1.410247842324e-03 -1.440000000000e-14 1.460000000000e+01 1.416098513750e-03 0.000000000000e+00 -1.416098513735e-03 -1.460000000000e-14 1.480000000000e+01 1.421779140648e-03 0.000000000000e+00 -1.421779140633e-03 -1.480000000000e-14 1.500000000000e+01 1.427293470857e-03 0.000000000000e+00 -1.427293470842e-03 -1.500000000000e-14 1.520000000000e+01 1.432645178305e-03 0.000000000000e+00 -1.432645178290e-03 -1.520000000000e-14 1.540000000000e+01 1.437837867381e-03 0.000000000000e+00 -1.437837867366e-03 -1.540000000000e-14 1.560000000000e+01 1.442875076974e-03 0.000000000000e+00 -1.442875076958e-03 -1.560000000000e-14 1.580000000000e+01 1.447760284205e-03 0.000000000000e+00 -1.447760284189e-03 -1.580000000000e-14 1.600000000000e+01 1.452496907872e-03 0.000000000000e+00 -1.452496907856e-03 -1.600000000000e-14 1.620000000000e+01 1.457088311592e-03 0.000000000000e+00 -1.457088311576e-03 -1.620000000000e-14 1.640000000000e+01 1.461537806661e-03 0.000000000000e+00 -1.461537806644e-03 -1.640000000000e-14 1.660000000000e+01 1.465848654633e-03 0.000000000000e+00 -1.465848654617e-03 -1.660000000000e-14 1.680000000000e+01 1.470024069636e-03 0.000000000000e+00 -1.470024069620e-03 -1.680000000000e-14 1.700000000000e+01 1.474067220412e-03 0.000000000000e+00 -1.474067220395e-03 -1.700000000000e-14 1.720000000000e+01 1.477981232114e-03 0.000000000000e+00 -1.477981232097e-03 -1.720000000000e-14 1.740000000000e+01 1.481769187853e-03 0.000000000000e+00 -1.481769187835e-03 -1.740000000000e-14 1.760000000000e+01 1.485434130012e-03 0.000000000000e+00 -1.485434129994e-03 -1.760000000000e-14 1.780000000000e+01 1.488979061342e-03 0.000000000000e+00 -1.488979061324e-03 -1.780000000000e-14 1.800000000000e+01 1.492406945839e-03 0.000000000000e+00 -1.492406945821e-03 -1.800000000000e-14 1.820000000000e+01 1.495720709432e-03 0.000000000000e+00 -1.495720709414e-03 -1.820000000000e-14 1.840000000000e+01 1.498923240476e-03 0.000000000000e+00 -1.498923240458e-03 -1.840000000000e-14 1.860000000000e+01 1.502017390087e-03 0.000000000000e+00 -1.502017390069e-03 -1.860000000000e-14 1.880000000000e+01 1.505005972307e-03 0.000000000000e+00 -1.505005972288e-03 -1.880000000000e-14 1.900000000000e+01 1.507891764132e-03 0.000000000000e+00 -1.507891764113e-03 -1.900000000000e-14 1.920000000000e+01 1.510677505418e-03 0.000000000000e+00 -1.510677505399e-03 -1.920000000000e-14 1.940000000000e+01 1.513365898664e-03 0.000000000000e+00 -1.513365898645e-03 -1.940000000000e-14 1.960000000000e+01 1.515959608704e-03 0.000000000000e+00 -1.515959608684e-03 -1.960000000000e-14 1.980000000000e+01 1.518461262310e-03 0.000000000000e+00 -1.518461262290e-03 -1.980000000000e-14 2.000000000000e+01 1.520873447736e-03 0.000000000000e+00 -1.520873447716e-03 -2.000000000000e-14 1.000000000000e+00 2.295542934624e-04 0.000000000000e+00 -2.295542934614e-04 -1.000000000000e-15 1.200000000000e+00 2.704544686130e-04 0.000000000000e+00 -2.704544686118e-04 -1.200000000000e-15 1.400000000000e+00 3.098807977281e-04 0.000000000000e+00 -3.098807977267e-04 -1.400000000000e-15 1.600000000000e+00 3.479065061988e-04 0.000000000000e+00 -3.479065061972e-04 -1.600000000000e-15 1.800000000000e+00 3.846001015217e-04 0.000000000000e+00 -3.846001015199e-04 -1.800000000000e-15 2.000000000000e+00 4.200257317993e-04 0.000000000000e+00 -4.200257317973e-04 -2.000000000000e-15 2.200000000000e+00 4.542435128296e-04 0.000000000000e+00 -4.542435128274e-04 -2.200000000000e-15 2.400000000000e+00 4.873098270041e-04 0.000000000000e+00 -4.873098270017e-04 -2.400000000000e-15 2.600000000000e+00 5.192775968606e-04 0.000000000000e+00 -5.192775968580e-04 -2.600000000000e-15 2.800000000000e+00 5.501965357860e-04 0.000000000000e+00 -5.501965357832e-04 -2.800000000000e-15 3.000000000000e+00 5.801133780537e-04 0.000000000000e+00 -5.801133780507e-04 -3.000000000000e-15 3.200000000000e+00 6.090720901285e-04 0.000000000000e+00 -6.090720901253e-04 -3.200000000000e-15 3.400000000000e+00 6.371140649488e-04 0.000000000000e+00 -6.371140649454e-04 -3.400000000000e-15 3.600000000000e+00 6.642783007187e-04 0.000000000000e+00 -6.642783007151e-04 -3.600000000000e-15 3.800000000000e+00 6.906015721100e-04 0.000000000000e+00 -6.906015721062e-04 -3.800000000000e-15 4.000000000000e+00 7.161185548973e-04 0.000000000000e+00 -7.161185548933e-04 -4.000000000000e-15 4.200000000000e+00 7.408620083876e-04 0.000000000000e+00 -7.408620083834e-04 -4.200000000000e-15 4.400000000000e+00 7.648628751766e-04 0.000000000000e+00 -7.648628751722e-04 -4.400000000000e-15 4.600000000000e+00 7.881504082846e-04 0.000000000000e+00 -7.881504082800e-04 -4.600000000000e-15 4.800000000000e+00 8.107522815571e-04 0.000000000000e+00 -8.107522815523e-04 -4.800000000000e-15 5.000000000000e+00 8.326946918116e-04 0.000000000000e+00 -8.326946918066e-04 -5.000000000000e-15 5.200000000000e+00 8.540024534161e-04 0.000000000000e+00 -8.540024534109e-04 -5.200000000000e-15 5.400000000000e+00 8.746990859229e-04 0.000000000000e+00 -8.746990859175e-04 -5.400000000000e-15 5.600000000000e+00 8.948068953304e-04 0.000000000000e+00 -8.948068953248e-04 -5.600000000000e-15 5.800000000000e+00 9.143470494909e-04 0.000000000000e+00 -9.143470494851e-04 -5.800000000000e-15 6.000000000000e+00 9.333396481409e-04 0.000000000000e+00 -9.333396481349e-04 -6.000000000000e-15 6.200000000000e+00 9.518037879846e-04 0.000000000000e+00 -9.518037879784e-04 -6.200000000000e-15 6.400000000000e+00 9.697576232278e-04 0.000000000000e+00 -9.697576232214e-04 -6.400000000000e-15 6.600000000000e+00 9.872184219229e-04 0.000000000000e+00 -9.872184219163e-04 -6.600000000000e-15 6.800000000000e+00 1.004202618455e-03 0.000000000000e+00 -1.004202618448e-03 -6.800000000000e-15 7.000000000000e+00 1.020725862472e-03 0.000000000000e+00 -1.020725862465e-03 -7.000000000000e-15 7.200000000000e+00 1.036803064535e-03 0.000000000000e+00 -1.036803064528e-03 -7.200000000000e-15 7.400000000000e+00 1.052448438745e-03 0.000000000000e+00 -1.052448438738e-03 -7.400000000000e-15 7.600000000000e+00 1.067675542568e-03 0.000000000000e+00 -1.067675542560e-03 -7.600000000000e-15 7.800000000000e+00 1.082497314089e-03 0.000000000000e+00 -1.082497314081e-03 -7.800000000000e-15 8.000000000000e+00 1.096926106874e-03 0.000000000000e+00 -1.096926106866e-03 -8.000000000000e-15 8.200000000000e+00 1.110973722626e-03 0.000000000000e+00 -1.110973722618e-03 -8.200000000000e-15 8.400000000000e+00 1.124651441802e-03 0.000000000000e+00 -1.124651441793e-03 -8.400000000000e-15 8.600000000000e+00 1.137970052334e-03 0.000000000000e+00 -1.137970052325e-03 -8.600000000000e-15 8.800000000000e+00 1.150939876605e-03 0.000000000000e+00 -1.150939876596e-03 -8.800000000000e-15 9.000000000000e+00 1.163570796799e-03 0.000000000000e+00 -1.163570796790e-03 -9.000000000000e-15 9.200000000000e+00 1.175872278743e-03 0.000000000000e+00 -1.175872278734e-03 -9.200000000000e-15 9.400000000000e+00 1.187853394353e-03 0.000000000000e+00 -1.187853394344e-03 -9.400000000000e-15 9.600000000000e+00 1.199522842786e-03 0.000000000000e+00 -1.199522842776e-03 -9.600000000000e-15 9.800000000000e+00 1.210888970379e-03 0.000000000000e+00 -1.210888970369e-03 -9.800000000000e-15 1.000000000000e+01 1.221959789474e-03 0.000000000000e+00 -1.221959789464e-03 -1.000000000000e-14 1.020000000000e+01 1.232742996197e-03 0.000000000000e+00 -1.232742996187e-03 -1.020000000000e-14 1.040000000000e+01 1.243245987264e-03 0.000000000000e+00 -1.243245987253e-03 -1.040000000000e-14 1.060000000000e+01 1.253475875883e-03 0.000000000000e+00 -1.253475875872e-03 -1.060000000000e-14 1.080000000000e+01 1.263439506816e-03 0.000000000000e+00 -1.263439506805e-03 -1.080000000000e-14 1.100000000000e+01 1.273143470644e-03 0.000000000000e+00 -1.273143470633e-03 -1.100000000000e-14 1.120000000000e+01 1.282594117303e-03 0.000000000000e+00 -1.282594117292e-03 -1.120000000000e-14 1.140000000000e+01 1.291797568925e-03 0.000000000000e+00 -1.291797568914e-03 -1.140000000000e-14 1.160000000000e+01 1.300759732037e-03 0.000000000000e+00 -1.300759732025e-03 -1.160000000000e-14 1.180000000000e+01 1.309486309147e-03 0.000000000000e+00 -1.309486309136e-03 -1.180000000000e-14 1.200000000000e+01 1.317982809768e-03 0.000000000000e+00 -1.317982809756e-03 -1.200000000000e-14 1.220000000000e+01 1.326254560895e-03 0.000000000000e+00 -1.326254560883e-03 -1.220000000000e-14 1.240000000000e+01 1.334306716983e-03 0.000000000000e+00 -1.334306716971e-03 -1.240000000000e-14 1.260000000000e+01 1.342144269439e-03 0.000000000000e+00 -1.342144269427e-03 -1.260000000000e-14 1.280000000000e+01 1.349772055663e-03 0.000000000000e+00 -1.349772055650e-03 -1.280000000000e-14 1.300000000000e+01 1.357194767651e-03 0.000000000000e+00 -1.357194767638e-03 -1.300000000000e-14 1.320000000000e+01 1.364416960190e-03 0.000000000000e+00 -1.364416960177e-03 -1.320000000000e-14 1.340000000000e+01 1.371443058656e-03 0.000000000000e+00 -1.371443058642e-03 -1.340000000000e-14 1.360000000000e+01 1.378277366430e-03 0.000000000000e+00 -1.378277366416e-03 -1.360000000000e-14 1.380000000000e+01 1.384924071955e-03 0.000000000000e+00 -1.384924071941e-03 -1.380000000000e-14 1.400000000000e+01 1.391387255434e-03 0.000000000000e+00 -1.391387255420e-03 -1.400000000000e-14 1.420000000000e+01 1.397670895194e-03 0.000000000000e+00 -1.397670895180e-03 -1.420000000000e-14 1.440000000000e+01 1.403778873713e-03 0.000000000000e+00 -1.403778873699e-03 -1.440000000000e-14 1.460000000000e+01 1.409714983328e-03 0.000000000000e+00 -1.409714983314e-03 -1.460000000000e-14 1.480000000000e+01 1.415482931626e-03 0.000000000000e+00 -1.415482931612e-03 -1.480000000000e-14 1.500000000000e+01 1.421086346529e-03 0.000000000000e+00 -1.421086346514e-03 -1.500000000000e-14 1.520000000000e+01 1.426528781074e-03 0.000000000000e+00 -1.426528781059e-03 -1.520000000000e-14 1.540000000000e+01 1.431813717904e-03 0.000000000000e+00 -1.431813717888e-03 -1.540000000000e-14 1.560000000000e+01 1.436944573455e-03 0.000000000000e+00 -1.436944573440e-03 -1.560000000000e-14 1.580000000000e+01 1.441924701876e-03 0.000000000000e+00 -1.441924701860e-03 -1.580000000000e-14 1.600000000000e+01 1.446757398646e-03 0.000000000000e+00 -1.446757398630e-03 -1.600000000000e-14 1.620000000000e+01 1.451445903935e-03 0.000000000000e+00 -1.451445903919e-03 -1.620000000000e-14 1.640000000000e+01 1.455993405679e-03 0.000000000000e+00 -1.455993405663e-03 -1.640000000000e-14 1.660000000000e+01 1.460403042399e-03 0.000000000000e+00 -1.460403042383e-03 -1.660000000000e-14 1.680000000000e+01 1.464677905758e-03 0.000000000000e+00 -1.464677905741e-03 -1.680000000000e-14 1.700000000000e+01 1.468821042859e-03 0.000000000000e+00 -1.468821042842e-03 -1.700000000000e-14 1.720000000000e+01 1.472835458306e-03 0.000000000000e+00 -1.472835458289e-03 -1.720000000000e-14 1.740000000000e+01 1.476724116018e-03 0.000000000000e+00 -1.476724116000e-03 -1.740000000000e-14 1.760000000000e+01 1.480489940815e-03 0.000000000000e+00 -1.480489940797e-03 -1.760000000000e-14 1.780000000000e+01 1.484135819784e-03 0.000000000000e+00 -1.484135819767e-03 -1.780000000000e-14 1.800000000000e+01 1.487664603428e-03 0.000000000000e+00 -1.487664603410e-03 -1.800000000000e-14 1.820000000000e+01 1.491079106615e-03 0.000000000000e+00 -1.491079106597e-03 -1.820000000000e-14 1.840000000000e+01 1.494382109333e-03 0.000000000000e+00 -1.494382109315e-03 -1.840000000000e-14 1.860000000000e+01 1.497576357271e-03 0.000000000000e+00 -1.497576357253e-03 -1.860000000000e-14 1.880000000000e+01 1.500664562224e-03 0.000000000000e+00 -1.500664562205e-03 -1.880000000000e-14 1.900000000000e+01 1.503649402345e-03 0.000000000000e+00 -1.503649402326e-03 -1.900000000000e-14 1.920000000000e+01 1.506533522256e-03 0.000000000000e+00 -1.506533522237e-03 -1.920000000000e-14 1.940000000000e+01 1.509319533029e-03 0.000000000000e+00 -1.509319533009e-03 -1.940000000000e-14 1.960000000000e+01 1.512010012046e-03 0.000000000000e+00 -1.512010012026e-03 -1.960000000000e-14 1.980000000000e+01 1.514607502761e-03 0.000000000000e+00 -1.514607502742e-03 -1.980000000000e-14 2.000000000000e+01 1.517114514374e-03 0.000000000000e+00 -1.517114514354e-03 -2.000000000000e-14 1.000000000000e+00 2.273195422139e-04 0.000000000000e+00 -2.273195422129e-04 -1.000000000000e-15 1.200000000000e+00 2.678194796076e-04 0.000000000000e+00 -2.678194796064e-04 -1.200000000000e-15 1.400000000000e+00 3.068604030868e-04 0.000000000000e+00 -3.068604030854e-04 -1.400000000000e-15 1.600000000000e+00 3.445151958263e-04 0.000000000000e+00 -3.445151958247e-04 -1.600000000000e-15 1.800000000000e+00 3.808520182311e-04 0.000000000000e+00 -3.808520182293e-04 -1.800000000000e-15 2.000000000000e+00 4.159346696406e-04 0.000000000000e+00 -4.159346696386e-04 -2.000000000000e-15 2.200000000000e+00 4.498229180673e-04 0.000000000000e+00 -4.498229180651e-04 -2.200000000000e-15 2.400000000000e+00 4.825728012558e-04 0.000000000000e+00 -4.825728012534e-04 -2.400000000000e-15 2.600000000000e+00 5.142369019736e-04 0.000000000000e+00 -5.142369019710e-04 -2.600000000000e-15 2.800000000000e+00 5.448646000876e-04 0.000000000000e+00 -5.448646000848e-04 -2.800000000000e-15 3.000000000000e+00 5.745023036676e-04 0.000000000000e+00 -5.745023036646e-04 -3.000000000000e-15 3.200000000000e+00 6.031936610938e-04 0.000000000000e+00 -6.031936610906e-04 -3.200000000000e-15 3.400000000000e+00 6.309797559254e-04 0.000000000000e+00 -6.309797559220e-04 -3.400000000000e-15 3.600000000000e+00 6.578992860950e-04 0.000000000000e+00 -6.578992860914e-04 -3.600000000000e-15 3.800000000000e+00 6.839887356300e-04 0.000000000000e+00 -6.839887356262e-04 -3.800000000000e-15 4.000000000000e+00 7.092824983401e-04 0.000000000000e+00 -7.092824983361e-04 -4.000000000000e-15 4.200000000000e+00 7.338130618947e-04 0.000000000000e+00 -7.338130618905e-04 -4.200000000000e-15 4.400000000000e+00 7.576111064376e-04 0.000000000000e+00 -7.576111064332e-04 -4.400000000000e-15 4.600000000000e+00 7.807056318733e-04 0.000000000000e+00 -7.807056318687e-04 -4.600000000000e-15 4.800000000000e+00 8.031240680895e-04 0.000000000000e+00 -8.031240680847e-04 -4.800000000000e-15 5.000000000000e+00 8.248923768876e-04 0.000000000000e+00 -8.248923768826e-04 -5.000000000000e-15 5.200000000000e+00 8.460351463088e-04 0.000000000000e+00 -8.460351463036e-04 -5.200000000000e-15 5.400000000000e+00 8.665756779919e-04 0.000000000000e+00 -8.665756779865e-04 -5.400000000000e-15 5.600000000000e+00 8.865360681397e-04 0.000000000000e+00 -8.865360681341e-04 -5.600000000000e-15 5.800000000000e+00 9.059372826174e-04 0.000000000000e+00 -9.059372826116e-04 -5.800000000000e-15 6.000000000000e+00 9.247992266639e-04 0.000000000000e+00 -9.247992266579e-04 -6.000000000000e-15 6.200000000000e+00 9.431408096495e-04 0.000000000000e+00 -9.431408096433e-04 -6.200000000000e-15 6.400000000000e+00 9.609800052814e-04 0.000000000000e+00 -9.609800052750e-04 -6.400000000000e-15 6.600000000000e+00 9.783339076177e-04 0.000000000000e+00 -9.783339076111e-04 -6.600000000000e-15 6.800000000000e+00 9.952187832238e-04 0.000000000000e+00 -9.952187832170e-04 -6.800000000000e-15 7.000000000000e+00 1.011650119774e-03 0.000000000000e+00 -1.011650119767e-03 -7.000000000000e-15 7.200000000000e+00 1.027642671377e-03 0.000000000000e+00 -1.027642671370e-03 -7.200000000000e-15 7.400000000000e+00 1.043210500876e-03 0.000000000000e+00 -1.043210500869e-03 -7.400000000000e-15 7.600000000000e+00 1.058367019364e-03 0.000000000000e+00 -1.058367019356e-03 -7.600000000000e-15 7.800000000000e+00 1.073125023114e-03 0.000000000000e+00 -1.073125023106e-03 -7.800000000000e-15 8.000000000000e+00 1.087496728139e-03 0.000000000000e+00 -1.087496728131e-03 -8.000000000000e-15 8.200000000000e+00 1.101493802541e-03 0.000000000000e+00 -1.101493802533e-03 -8.200000000000e-15 8.400000000000e+00 1.115127396826e-03 0.000000000000e+00 -1.115127396818e-03 -8.400000000000e-15 8.600000000000e+00 1.128408172338e-03 0.000000000000e+00 -1.128408172329e-03 -8.600000000000e-15 8.800000000000e+00 1.141346327936e-03 0.000000000000e+00 -1.141346327927e-03 -8.800000000000e-15 9.000000000000e+00 1.153951625065e-03 0.000000000000e+00 -1.153951625056e-03 -9.000000000000e-15 9.200000000000e+00 1.166233411317e-03 0.000000000000e+00 -1.166233411308e-03 -9.200000000000e-15 9.400000000000e+00 1.178200642603e-03 0.000000000000e+00 -1.178200642594e-03 -9.400000000000e-15 9.600000000000e+00 1.189861904031e-03 0.000000000000e+00 -1.189861904022e-03 -9.600000000000e-15 9.800000000000e+00 1.201225429586e-03 0.000000000000e+00 -1.201225429576e-03 -9.800000000000e-15 1.000000000000e+01 1.212299120688e-03 0.000000000000e+00 -1.212299120678e-03 -1.000000000000e-14 1.020000000000e+01 1.223090563720e-03 0.000000000000e+00 -1.223090563710e-03 -1.020000000000e-14 1.040000000000e+01 1.233607046582e-03 0.000000000000e+00 -1.233607046571e-03 -1.040000000000e-14 1.060000000000e+01 1.243855574349e-03 0.000000000000e+00 -1.243855574339e-03 -1.060000000000e-14 1.080000000000e+01 1.253842884094e-03 0.000000000000e+00 -1.253842884084e-03 -1.080000000000e-14 1.100000000000e+01 1.263575458920e-03 0.000000000000e+00 -1.263575458909e-03 -1.100000000000e-14 1.120000000000e+01 1.273059541268e-03 0.000000000000e+00 -1.273059541257e-03 -1.120000000000e-14 1.140000000000e+01 1.282301145541e-03 0.000000000000e+00 -1.282301145530e-03 -1.140000000000e-14 1.160000000000e+01 1.291306070089e-03 0.000000000000e+00 -1.291306070077e-03 -1.160000000000e-14 1.180000000000e+01 1.300079908593e-03 0.000000000000e+00 -1.300079908582e-03 -1.180000000000e-14 1.200000000000e+01 1.308628060895e-03 0.000000000000e+00 -1.308628060883e-03 -1.200000000000e-14 1.220000000000e+01 1.316955743289e-03 0.000000000000e+00 -1.316955743277e-03 -1.220000000000e-14 1.240000000000e+01 1.325067998325e-03 0.000000000000e+00 -1.325067998313e-03 -1.240000000000e-14 1.260000000000e+01 1.332969704143e-03 0.000000000000e+00 -1.332969704131e-03 -1.260000000000e-14 1.280000000000e+01 1.340665583360e-03 0.000000000000e+00 -1.340665583347e-03 -1.280000000000e-14 1.300000000000e+01 1.348160211541e-03 0.000000000000e+00 -1.348160211528e-03 -1.300000000000e-14 1.320000000000e+01 1.355458025273e-03 0.000000000000e+00 -1.355458025260e-03 -1.320000000000e-14 1.340000000000e+01 1.362563329860e-03 0.000000000000e+00 -1.362563329847e-03 -1.340000000000e-14 1.360000000000e+01 1.369480306652e-03 0.000000000000e+00 -1.369480306638e-03 -1.360000000000e-14 1.380000000000e+01 1.376213020032e-03 0.000000000000e+00 -1.376213020018e-03 -1.380000000000e-14 1.400000000000e+01 1.382765424072e-03 0.000000000000e+00 -1.382765424058e-03 -1.400000000000e-14 1.420000000000e+01 1.389141368860e-03 0.000000000000e+00 -1.389141368846e-03 -1.420000000000e-14 1.440000000000e+01 1.395344606528e-03 0.000000000000e+00 -1.395344606514e-03 -1.440000000000e-14 1.460000000000e+01 1.401378796974e-03 0.000000000000e+00 -1.401378796959e-03 -1.460000000000e-14 1.480000000000e+01 1.407247513289e-03 0.000000000000e+00 -1.407247513274e-03 -1.480000000000e-14 1.500000000000e+01 1.412954246910e-03 0.000000000000e+00 -1.412954246895e-03 -1.500000000000e-14 1.520000000000e+01 1.418502412484e-03 0.000000000000e+00 -1.418502412468e-03 -1.520000000000e-14 1.540000000000e+01 1.423895352468e-03 0.000000000000e+00 -1.423895352453e-03 -1.540000000000e-14 1.560000000000e+01 1.429136341460e-03 0.000000000000e+00 -1.429136341445e-03 -1.560000000000e-14 1.580000000000e+01 1.434228590266e-03 0.000000000000e+00 -1.434228590250e-03 -1.580000000000e-14 1.600000000000e+01 1.439175249708e-03 0.000000000000e+00 -1.439175249692e-03 -1.600000000000e-14 1.620000000000e+01 1.443979414189e-03 0.000000000000e+00 -1.443979414173e-03 -1.620000000000e-14 1.640000000000e+01 1.448644124996e-03 0.000000000000e+00 -1.448644124979e-03 -1.640000000000e-14 1.660000000000e+01 1.453172373361e-03 0.000000000000e+00 -1.453172373344e-03 -1.660000000000e-14 1.680000000000e+01 1.457567103290e-03 0.000000000000e+00 -1.457567103273e-03 -1.680000000000e-14 1.700000000000e+01 1.461831214143e-03 0.000000000000e+00 -1.461831214126e-03 -1.700000000000e-14 1.720000000000e+01 1.465967562991e-03 0.000000000000e+00 -1.465967562973e-03 -1.720000000000e-14 1.740000000000e+01 1.469978966741e-03 0.000000000000e+00 -1.469978966723e-03 -1.740000000000e-14 1.760000000000e+01 1.473868204045e-03 0.000000000000e+00 -1.473868204028e-03 -1.760000000000e-14 1.780000000000e+01 1.477638016993e-03 0.000000000000e+00 -1.477638016976e-03 -1.780000000000e-14 1.800000000000e+01 1.481291112595e-03 0.000000000000e+00 -1.481291112577e-03 -1.800000000000e-14 1.820000000000e+01 1.484830164066e-03 0.000000000000e+00 -1.484830164048e-03 -1.820000000000e-14 1.840000000000e+01 1.488257811917e-03 0.000000000000e+00 -1.488257811899e-03 -1.840000000000e-14 1.860000000000e+01 1.491576664866e-03 0.000000000000e+00 -1.491576664847e-03 -1.860000000000e-14 1.880000000000e+01 1.494789300566e-03 0.000000000000e+00 -1.494789300547e-03 -1.880000000000e-14 1.900000000000e+01 1.497898266176e-03 0.000000000000e+00 -1.497898266157e-03 -1.900000000000e-14 1.920000000000e+01 1.500906078773e-03 0.000000000000e+00 -1.500906078754e-03 -1.920000000000e-14 1.940000000000e+01 1.503815225623e-03 0.000000000000e+00 -1.503815225604e-03 -1.940000000000e-14 1.960000000000e+01 1.506628164314e-03 0.000000000000e+00 -1.506628164294e-03 -1.960000000000e-14 1.980000000000e+01 1.509347322769e-03 0.000000000000e+00 -1.509347322749e-03 -1.980000000000e-14 2.000000000000e+01 1.511975099156e-03 0.000000000000e+00 -1.511975099136e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/acFreq_coadov.standard0000644000265600020320000000760112264261473024317 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 8.78216872381078e-15 8.2604388145426e-15 -8.81379017921382e-18 1258.925411794 8.78216872381091e-15 8.2604388145433e-15 -8.8137901792155e-18 1584.893192461 8.78216872381119e-15 8.2604388145436e-15 -8.81379017921458e-18 1995.262314969 8.78216872381327e-15 8.26043881454511e-15 -8.81379017920938e-18 2511.88643151 8.78216872381088e-15 8.26043881454218e-15 -8.81379017921158e-18 3162.277660168 8.78216872381062e-15 8.26043881454545e-15 -8.81379017921422e-18 3981.071705535 8.78216872381027e-15 8.260438814541e-15 -8.81379017921297e-18 5011.872336273 8.78216872380879e-15 8.26043881454087e-15 -8.81379017921195e-18 6309.573444802 8.78216872380919e-15 8.26043881454338e-15 -8.8137901792135e-18 7943.282347243 8.78216872381027e-15 8.2604388145417e-15 -8.81379017921288e-18 10000 8.78216872381078e-15 8.2604388145426e-15 -8.81379017921382e-18 12589.25411794 8.7821687238109e-15 8.2604388145433e-15 -8.8137901792155e-18 15848.93192461 8.78216872381119e-15 8.2604388145436e-15 -8.81379017921458e-18 19952.62314969 8.78216872381327e-15 8.26043881454511e-15 -8.81379017920938e-18 25118.8643151 8.78216872381088e-15 8.26043881454218e-15 -8.81379017921159e-18 31622.77660168 8.78216872381062e-15 8.26043881454545e-15 -8.81379017921422e-18 39810.71705535 8.78216872381027e-15 8.260438814541e-15 -8.81379017921297e-18 50118.72336273 8.78216872380879e-15 8.26043881454087e-15 -8.81379017921195e-18 63095.73444802 8.78216872380919e-15 8.26043881454338e-15 -8.8137901792135e-18 79432.82347243 8.78216872381027e-15 8.2604388145417e-15 -8.81379017921288e-18 100000 8.78216872381078e-15 8.2604388145426e-15 -8.81379017921382e-18 125892.5411794 8.78216872381091e-15 8.2604388145433e-15 -8.8137901792155e-18 158489.3192461 8.78216872381119e-15 8.26043881454361e-15 -8.81379017921458e-18 199526.2314969 8.78216872381327e-15 8.26043881454511e-15 -8.81379017920938e-18 251188.643151 8.78216872381088e-15 8.26043881454218e-15 -8.81379017921158e-18 316227.7660168 8.78216872381062e-15 8.26043881454545e-15 -8.81379017921422e-18 398107.1705535 8.78216872381027e-15 8.260438814541e-15 -8.81379017921297e-18 501187.2336273 8.78216872380879e-15 8.26043881454087e-15 -8.81379017921195e-18 630957.3444802 8.78216872380919e-15 8.26043881454338e-15 -8.8137901792135e-18 794328.2347243 8.78216872381027e-15 8.2604388145417e-15 -8.81379017921288e-18 1000000 8.78216872381078e-15 8.2604388145426e-15 -8.81379017921382e-18 1258925.411794 8.7821687238109e-15 8.26043881454329e-15 -8.8137901792155e-18 1584893.192461 8.78216872381119e-15 8.2604388145436e-15 -8.81379017921458e-18 1995262.314969 8.78216872381327e-15 8.26043881454511e-15 -8.81379017920938e-18 2511886.43151 8.78216872381088e-15 8.26043881454218e-15 -8.81379017921158e-18 3162277.660168 8.78216872381062e-15 8.26043881454545e-15 -8.81379017921422e-18 3981071.705535 8.78216872381027e-15 8.260438814541e-15 -8.81379017921297e-18 5011872.336273 8.78216872380879e-15 8.26043881454087e-15 -8.81379017921195e-18 6309573.444802 8.78216872380919e-15 8.26043881454085e-15 -8.8137901792135e-18 7943282.347243 8.78216872380827e-15 8.26043881453969e-15 -8.81379017921288e-18 10000000 8.7821687238076e-15 8.26043881453782e-15 -8.81379017921064e-18 12589254.11794 8.78216872380711e-15 8.26043881453571e-15 -8.81379017921044e-18 15848931.92461 8.78216872380416e-15 8.26043881453155e-15 -8.81379017920755e-18 19952623.14969 8.78216872379731e-15 8.26043881452118e-15 -8.81379017920141e-18 25118864.3151 8.78216872379187e-15 8.2604388145105e-15 -8.81379017919258e-18 31622776.60168 8.78216872378545e-15 8.26043881449512e-15 -8.81379017918906e-18 39810717.05535 8.7821687237663e-15 8.26043881446504e-15 -8.81379017917299e-18 50118723.36273 8.78216872374211e-15 8.2604388144202e-15 -8.81379017914527e-18 63095734.44802 8.78216872370325e-15 8.26043881435167e-15 -8.81379017910756e-18 79432823.47243 8.78216872364196e-15 8.26043881423915e-15 -8.81379017904457e-18 100000000 8.7821687235434e-15 8.26043881406195e-15 -8.81379017894644e-18 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Ig1_vb0_jd.standard0000644000265600020320000024357112264261473024417 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.125305650870e-09 0.000000000000e+00 -2.125303640727e-09 -2.010000000000e-15 1.200000000000e+00 1.000997370065e-07 0.000000000000e+00 -1.000997349965e-07 -2.010000000000e-15 1.400000000000e+00 2.027178646220e-06 0.000000000000e+00 -2.027178644210e-06 -2.010000000000e-15 1.600000000000e+00 1.031512930308e-05 0.000000000000e+00 -1.031512930107e-05 -2.010000000000e-15 1.800000000000e+00 2.764961602510e-05 0.000000000000e+00 -2.764961602309e-05 -2.010000000000e-15 2.000000000000e+00 5.511404000810e-05 0.000000000000e+00 -5.511404000609e-05 -2.010000000000e-15 2.200000000000e+00 9.312540184994e-05 0.000000000000e+00 -9.312540184793e-05 -2.010000000000e-15 2.400000000000e+00 1.416788754447e-04 0.000000000000e+00 -1.416788754427e-04 -2.010000000000e-15 2.600000000000e+00 2.004489002647e-04 0.000000000000e+00 -2.004489002627e-04 -2.010000000000e-15 2.800000000000e+00 2.688609043085e-04 0.000000000000e+00 -2.688609043065e-04 -2.010000000000e-15 3.000000000000e+00 3.461577634299e-04 0.000000000000e+00 -3.461577634279e-04 -2.010000000000e-15 3.200000000000e+00 4.313584741405e-04 0.000000000000e+00 -4.313584741385e-04 -2.010000000000e-15 3.400000000000e+00 5.196773619665e-04 0.000000000000e+00 -5.196773619645e-04 -2.010000000000e-15 3.600000000000e+00 6.026156555121e-04 0.000000000000e+00 -6.026156555101e-04 -2.010000000000e-15 3.800000000000e+00 6.775047895279e-04 0.000000000000e+00 -6.775047895259e-04 -2.010000000000e-15 4.000000000000e+00 7.439940848777e-04 0.000000000000e+00 -7.439940848757e-04 -2.010000000000e-15 4.200000000000e+00 8.025213119313e-04 0.000000000000e+00 -8.025213119293e-04 -2.010000000000e-15 4.400000000000e+00 8.538698908104e-04 0.000000000000e+00 -8.538698908084e-04 -2.010000000000e-15 4.600000000000e+00 8.989260267566e-04 0.000000000000e+00 -8.989260267545e-04 -2.010000000000e-15 4.800000000000e+00 9.385513176287e-04 0.000000000000e+00 -9.385513176266e-04 -2.010000000000e-15 5.000000000000e+00 9.735258757998e-04 0.000000000000e+00 -9.735258757978e-04 -2.010000000000e-15 5.200000000000e+00 1.004529707504e-03 0.000000000000e+00 -1.004529707502e-03 -2.010000000000e-15 5.400000000000e+00 1.032143146865e-03 0.000000000000e+00 -1.032143146863e-03 -2.010000000000e-15 5.600000000000e+00 1.056855776396e-03 0.000000000000e+00 -1.056855776394e-03 -2.010000000000e-15 5.800000000000e+00 1.079078289141e-03 0.000000000000e+00 -1.079078289139e-03 -2.010000000000e-15 6.000000000000e+00 1.099154550805e-03 0.000000000000e+00 -1.099154550803e-03 -2.010000000000e-15 6.200000000000e+00 1.117372636762e-03 0.000000000000e+00 -1.117372636760e-03 -2.010000000000e-15 6.400000000000e+00 1.133974407753e-03 0.000000000000e+00 -1.133974407751e-03 -2.010000000000e-15 6.600000000000e+00 1.149163575647e-03 0.000000000000e+00 -1.149163575645e-03 -2.010000000000e-15 6.800000000000e+00 1.163112383304e-03 0.000000000000e+00 -1.163112383302e-03 -2.010000000000e-15 7.000000000000e+00 1.175967084549e-03 0.000000000000e+00 -1.175967084547e-03 -2.010000000000e-15 7.200000000000e+00 1.187852418344e-03 0.000000000000e+00 -1.187852418342e-03 -2.010000000000e-15 7.400000000000e+00 1.198875255467e-03 0.000000000000e+00 -1.198875255465e-03 -2.010000000000e-15 7.600000000000e+00 1.209127571661e-03 0.000000000000e+00 -1.209127571659e-03 -2.010000000000e-15 7.800000000000e+00 1.218688875726e-03 0.000000000000e+00 -1.218688875724e-03 -2.010000000000e-15 8.000000000000e+00 1.227628197682e-03 0.000000000000e+00 -1.227628197680e-03 -2.010000000000e-15 8.200000000000e+00 1.236005721951e-03 0.000000000000e+00 -1.236005721949e-03 -2.010000000000e-15 8.400000000000e+00 1.243874133849e-03 0.000000000000e+00 -1.243874133847e-03 -2.010000000000e-15 8.600000000000e+00 1.251279734020e-03 0.000000000000e+00 -1.251279734018e-03 -2.010000000000e-15 8.800000000000e+00 1.258263364523e-03 0.000000000000e+00 -1.258263364521e-03 -2.010000000000e-15 9.000000000000e+00 1.264861181569e-03 0.000000000000e+00 -1.264861181567e-03 -2.010000000000e-15 9.200000000000e+00 1.271105302938e-03 0.000000000000e+00 -1.271105302936e-03 -2.010000000000e-15 9.400000000000e+00 1.277024352606e-03 0.000000000000e+00 -1.277024352604e-03 -2.010000000000e-15 9.600000000000e+00 1.282643920739e-03 0.000000000000e+00 -1.282643920737e-03 -2.010000000000e-15 9.800000000000e+00 1.287986953725e-03 0.000000000000e+00 -1.287986953723e-03 -2.010000000000e-15 1.000000000000e+01 1.293074086161e-03 0.000000000000e+00 -1.293074086159e-03 -2.010000000000e-15 1.020000000000e+01 1.297923924461e-03 0.000000000000e+00 -1.297923924459e-03 -2.010000000000e-15 1.040000000000e+01 1.302553290039e-03 0.000000000000e+00 -1.302553290037e-03 -2.010000000000e-15 1.060000000000e+01 1.306977428526e-03 0.000000000000e+00 -1.306977428524e-03 -2.010000000000e-15 1.080000000000e+01 1.311210190399e-03 0.000000000000e+00 -1.311210190397e-03 -2.010000000000e-15 1.100000000000e+01 1.315264198705e-03 0.000000000000e+00 -1.315264198703e-03 -2.010000000000e-15 1.120000000000e+01 1.319150938287e-03 0.000000000000e+00 -1.319150938285e-03 -2.010000000000e-15 1.140000000000e+01 1.322880946887e-03 0.000000000000e+00 -1.322880946885e-03 -2.010000000000e-15 1.160000000000e+01 1.326463868326e-03 0.000000000000e+00 -1.326463868324e-03 -2.010000000000e-15 1.180000000000e+01 1.329908556384e-03 0.000000000000e+00 -1.329908556382e-03 -2.010000000000e-15 1.200000000000e+01 1.333223154579e-03 0.000000000000e+00 -1.333223154577e-03 -2.010000000000e-15 1.220000000000e+01 1.336415166452e-03 0.000000000000e+00 -1.336415166450e-03 -2.010000000000e-15 1.240000000000e+01 1.339491517672e-03 0.000000000000e+00 -1.339491517670e-03 -2.010000000000e-15 1.260000000000e+01 1.342458611033e-03 0.000000000000e+00 -1.342458611031e-03 -2.010000000000e-15 1.280000000000e+01 1.345322375280e-03 0.000000000000e+00 -1.345322375278e-03 -2.010000000000e-15 1.300000000000e+01 1.348088308553e-03 0.000000000000e+00 -1.348088308551e-03 -2.010000000000e-15 1.320000000000e+01 1.350761517130e-03 0.000000000000e+00 -1.350761517128e-03 -2.010000000000e-15 1.340000000000e+01 1.353346750046e-03 0.000000000000e+00 -1.353346750044e-03 -2.010000000000e-15 1.360000000000e+01 1.355848430097e-03 0.000000000000e+00 -1.355848430095e-03 -2.010000000000e-15 1.380000000000e+01 1.358270681656e-03 0.000000000000e+00 -1.358270681654e-03 -2.010000000000e-15 1.400000000000e+01 1.360617355683e-03 0.000000000000e+00 -1.360617355681e-03 -2.010000000000e-15 1.420000000000e+01 1.362892052250e-03 0.000000000000e+00 -1.362892052248e-03 -2.010000000000e-15 1.440000000000e+01 1.365098140865e-03 0.000000000000e+00 -1.365098140863e-03 -2.010000000000e-15 1.460000000000e+01 1.367238778843e-03 0.000000000000e+00 -1.367238778841e-03 -2.010000000000e-15 1.480000000000e+01 1.369316927937e-03 0.000000000000e+00 -1.369316927935e-03 -2.010000000000e-15 1.500000000000e+01 1.371335369427e-03 0.000000000000e+00 -1.371335369425e-03 -2.010000000000e-15 1.520000000000e+01 1.373296717821e-03 0.000000000000e+00 -1.373296717819e-03 -2.010000000000e-15 1.540000000000e+01 1.375203433317e-03 0.000000000000e+00 -1.375203433315e-03 -2.010000000000e-15 1.560000000000e+01 1.377057833165e-03 0.000000000000e+00 -1.377057833163e-03 -2.010000000000e-15 1.580000000000e+01 1.378862102028e-03 0.000000000000e+00 -1.378862102026e-03 -2.010000000000e-15 1.600000000000e+01 1.380618301451e-03 0.000000000000e+00 -1.380618301448e-03 -2.010000000000e-15 1.620000000000e+01 1.382328378522e-03 0.000000000000e+00 -1.382328378520e-03 -2.010000000000e-15 1.640000000000e+01 1.383994173815e-03 0.000000000000e+00 -1.383994173812e-03 -2.010000000000e-15 1.660000000000e+01 1.385617428664e-03 0.000000000000e+00 -1.385617428662e-03 -2.010000000000e-15 1.680000000000e+01 1.387199791860e-03 0.000000000000e+00 -1.387199791858e-03 -2.010000000000e-15 1.700000000000e+01 1.388742825791e-03 0.000000000000e+00 -1.388742825789e-03 -2.010000000000e-15 1.720000000000e+01 1.390248012114e-03 0.000000000000e+00 -1.390248012112e-03 -2.010000000000e-15 1.740000000000e+01 1.391716756971e-03 0.000000000000e+00 -1.391716756969e-03 -2.010000000000e-15 1.760000000000e+01 1.393150395805e-03 0.000000000000e+00 -1.393150395803e-03 -2.010000000000e-15 1.780000000000e+01 1.394550197814e-03 0.000000000000e+00 -1.394550197812e-03 -2.010000000000e-15 1.800000000000e+01 1.395917370063e-03 0.000000000000e+00 -1.395917370061e-03 -2.010000000000e-15 1.820000000000e+01 1.397253061298e-03 0.000000000000e+00 -1.397253061296e-03 -2.010000000000e-15 1.840000000000e+01 1.398558365474e-03 0.000000000000e+00 -1.398558365472e-03 -2.010000000000e-15 1.860000000000e+01 1.399834325029e-03 0.000000000000e+00 -1.399834325027e-03 -2.010000000000e-15 1.880000000000e+01 1.401081933933e-03 0.000000000000e+00 -1.401081933931e-03 -2.010000000000e-15 1.900000000000e+01 1.402302140504e-03 0.000000000000e+00 -1.402302140502e-03 -2.010000000000e-15 1.920000000000e+01 1.403495850048e-03 0.000000000000e+00 -1.403495850046e-03 -2.010000000000e-15 1.940000000000e+01 1.404663927297e-03 0.000000000000e+00 -1.404663927295e-03 -2.010000000000e-15 1.960000000000e+01 1.405807198700e-03 0.000000000000e+00 -1.405807198698e-03 -2.010000000000e-15 1.980000000000e+01 1.406926454544e-03 0.000000000000e+00 -1.406926454542e-03 -2.010000000000e-15 2.000000000000e+01 1.408022450943e-03 0.000000000000e+00 -1.408022450941e-03 -2.010000000000e-15 1.000000000000e+00 2.310951313991e-09 0.000000000000e+00 -2.310946303713e-09 -5.010000000000e-15 1.200000000000e+00 1.085598873127e-07 0.000000000000e+00 -1.085598823028e-07 -5.010000000000e-15 1.400000000000e+00 2.134705543644e-06 0.000000000000e+00 -2.134705538634e-06 -5.010000000000e-15 1.600000000000e+00 1.066259926716e-05 0.000000000000e+00 -1.066259926215e-05 -5.010000000000e-15 1.800000000000e+00 2.835126138982e-05 0.000000000000e+00 -2.835126138481e-05 -5.010000000000e-15 2.000000000000e+00 5.627032219645e-05 0.000000000000e+00 -5.627032219144e-05 -5.010000000000e-15 2.200000000000e+00 9.482837851223e-05 0.000000000000e+00 -9.482837850722e-05 -5.010000000000e-15 2.400000000000e+00 1.440176692001e-04 0.000000000000e+00 -1.440176691951e-04 -5.010000000000e-15 2.600000000000e+00 2.035181329042e-04 0.000000000000e+00 -2.035181328992e-04 -5.010000000000e-15 2.800000000000e+00 2.727708971112e-04 0.000000000000e+00 -2.727708971062e-04 -5.010000000000e-15 3.000000000000e+00 3.510427309349e-04 0.000000000000e+00 -3.510427309299e-04 -5.010000000000e-15 3.200000000000e+00 4.374846897784e-04 0.000000000000e+00 -4.374846897734e-04 -5.010000000000e-15 3.400000000000e+00 5.311838091364e-04 0.000000000000e+00 -5.311838091313e-04 -5.010000000000e-15 3.600000000000e+00 6.312062012908e-04 0.000000000000e+00 -6.312062012857e-04 -5.010000000000e-15 3.800000000000e+00 7.366306617093e-04 0.000000000000e+00 -7.366306617043e-04 -5.010000000000e-15 4.000000000000e+00 8.465729221566e-04 0.000000000000e+00 -8.465729221516e-04 -5.010000000000e-15 4.200000000000e+00 9.602014908607e-04 0.000000000000e+00 -9.602014908557e-04 -5.010000000000e-15 4.400000000000e+00 1.076745491053e-03 0.000000000000e+00 -1.076745491048e-03 -5.010000000000e-15 4.600000000000e+00 1.195358465656e-03 0.000000000000e+00 -1.195358465651e-03 -5.010000000000e-15 4.800000000000e+00 1.312754475562e-03 0.000000000000e+00 -1.312754475557e-03 -5.010000000000e-15 5.000000000000e+00 1.424576371275e-03 0.000000000000e+00 -1.424576371270e-03 -5.010000000000e-15 5.200000000000e+00 1.529158227733e-03 0.000000000000e+00 -1.529158227728e-03 -5.010000000000e-15 5.400000000000e+00 1.625816868144e-03 0.000000000000e+00 -1.625816868139e-03 -5.010000000000e-15 5.600000000000e+00 1.714329529466e-03 0.000000000000e+00 -1.714329529461e-03 -5.010000000000e-15 5.800000000000e+00 1.794795598291e-03 0.000000000000e+00 -1.794795598286e-03 -5.010000000000e-15 6.000000000000e+00 1.867549340802e-03 0.000000000000e+00 -1.867549340797e-03 -5.010000000000e-15 6.200000000000e+00 1.933083011236e-03 0.000000000000e+00 -1.933083011231e-03 -5.010000000000e-15 6.400000000000e+00 1.991980589189e-03 0.000000000000e+00 -1.991980589184e-03 -5.010000000000e-15 6.600000000000e+00 2.044864937928e-03 0.000000000000e+00 -2.044864937923e-03 -5.010000000000e-15 6.800000000000e+00 2.092358714365e-03 0.000000000000e+00 -2.092358714360e-03 -5.010000000000e-15 7.000000000000e+00 2.135057748569e-03 0.000000000000e+00 -2.135057748564e-03 -5.010000000000e-15 7.200000000000e+00 2.173514811460e-03 0.000000000000e+00 -2.173514811455e-03 -5.010000000000e-15 7.400000000000e+00 2.208231392421e-03 0.000000000000e+00 -2.208231392416e-03 -5.010000000000e-15 7.600000000000e+00 2.239655188914e-03 0.000000000000e+00 -2.239655188909e-03 -5.010000000000e-15 7.800000000000e+00 2.268181340357e-03 0.000000000000e+00 -2.268181340352e-03 -5.010000000000e-15 8.000000000000e+00 2.294155876001e-03 0.000000000000e+00 -2.294155875996e-03 -5.010000000000e-15 8.200000000000e+00 2.317880279502e-03 0.000000000000e+00 -2.317880279497e-03 -5.010000000000e-15 8.400000000000e+00 2.339616439388e-03 0.000000000000e+00 -2.339616439383e-03 -5.010000000000e-15 8.600000000000e+00 2.359591534391e-03 0.000000000000e+00 -2.359591534386e-03 -5.010000000000e-15 8.800000000000e+00 2.378002600416e-03 0.000000000000e+00 -2.378002600411e-03 -5.010000000000e-15 9.000000000000e+00 2.395020657182e-03 0.000000000000e+00 -2.395020657177e-03 -5.010000000000e-15 9.200000000000e+00 2.410794354557e-03 0.000000000000e+00 -2.410794354552e-03 -5.010000000000e-15 9.400000000000e+00 2.425453146584e-03 0.000000000000e+00 -2.425453146579e-03 -5.010000000000e-15 9.600000000000e+00 2.439110026768e-03 0.000000000000e+00 -2.439110026763e-03 -5.010000000000e-15 9.800000000000e+00 2.451863869745e-03 0.000000000000e+00 -2.451863869740e-03 -5.010000000000e-15 1.000000000000e+01 2.463801427720e-03 0.000000000000e+00 -2.463801427715e-03 -5.010000000000e-15 1.020000000000e+01 2.474999028563e-03 0.000000000000e+00 -2.474999028558e-03 -5.010000000000e-15 1.040000000000e+01 2.485524018712e-03 0.000000000000e+00 -2.485524018707e-03 -5.010000000000e-15 1.060000000000e+01 2.495435989172e-03 0.000000000000e+00 -2.495435989167e-03 -5.010000000000e-15 1.080000000000e+01 2.504787817970e-03 0.000000000000e+00 -2.504787817965e-03 -5.010000000000e-15 1.100000000000e+01 2.513626557662e-03 0.000000000000e+00 -2.513626557657e-03 -5.010000000000e-15 1.120000000000e+01 2.521994192167e-03 0.000000000000e+00 -2.521994192162e-03 -5.010000000000e-15 1.140000000000e+01 2.529928283456e-03 0.000000000000e+00 -2.529928283451e-03 -5.010000000000e-15 1.160000000000e+01 2.537462525324e-03 0.000000000000e+00 -2.537462525319e-03 -5.010000000000e-15 1.180000000000e+01 2.544627218713e-03 0.000000000000e+00 -2.544627218708e-03 -5.010000000000e-15 1.200000000000e+01 2.551449680686e-03 0.000000000000e+00 -2.551449680681e-03 -5.010000000000e-15 1.220000000000e+01 2.557954597211e-03 0.000000000000e+00 -2.557954597205e-03 -5.010000000000e-15 1.240000000000e+01 2.564164328239e-03 0.000000000000e+00 -2.564164328234e-03 -5.010000000000e-15 1.260000000000e+01 2.570099172215e-03 0.000000000000e+00 -2.570099172210e-03 -5.010000000000e-15 1.280000000000e+01 2.575777595985e-03 0.000000000000e+00 -2.575777595980e-03 -5.010000000000e-15 1.300000000000e+01 2.581216435152e-03 0.000000000000e+00 -2.581216435147e-03 -5.010000000000e-15 1.320000000000e+01 2.586431069104e-03 0.000000000000e+00 -2.586431069099e-03 -5.010000000000e-15 1.340000000000e+01 2.591435599485e-03 0.000000000000e+00 -2.591435599480e-03 -5.010000000000e-15 1.360000000000e+01 2.596242880764e-03 0.000000000000e+00 -2.596242880759e-03 -5.010000000000e-15 1.380000000000e+01 2.600864799983e-03 0.000000000000e+00 -2.600864799978e-03 -5.010000000000e-15 1.400000000000e+01 2.605312269734e-03 0.000000000000e+00 -2.605312269729e-03 -5.010000000000e-15 1.420000000000e+01 2.609595349423e-03 0.000000000000e+00 -2.609595349418e-03 -5.010000000000e-15 1.440000000000e+01 2.613723327105e-03 0.000000000000e+00 -2.613723327100e-03 -5.010000000000e-15 1.460000000000e+01 2.617704792116e-03 0.000000000000e+00 -2.617704792111e-03 -5.010000000000e-15 1.480000000000e+01 2.621547699695e-03 0.000000000000e+00 -2.621547699690e-03 -5.010000000000e-15 1.500000000000e+01 2.625259428608e-03 0.000000000000e+00 -2.625259428603e-03 -5.010000000000e-15 1.520000000000e+01 2.628846832625e-03 0.000000000000e+00 -2.628846832620e-03 -5.010000000000e-15 1.540000000000e+01 2.632316286596e-03 0.000000000000e+00 -2.632316286591e-03 -5.010000000000e-15 1.560000000000e+01 2.635673727776e-03 0.000000000000e+00 -2.635673727771e-03 -5.010000000000e-15 1.580000000000e+01 2.638924692950e-03 0.000000000000e+00 -2.638924692945e-03 -5.010000000000e-15 1.600000000000e+01 2.642074351851e-03 0.000000000000e+00 -2.642074351846e-03 -5.010000000000e-15 1.620000000000e+01 2.645127537284e-03 0.000000000000e+00 -2.645127537279e-03 -5.010000000000e-15 1.640000000000e+01 2.648088772341e-03 0.000000000000e+00 -2.648088772336e-03 -5.010000000000e-15 1.660000000000e+01 2.650962295012e-03 0.000000000000e+00 -2.650962295007e-03 -5.010000000000e-15 1.680000000000e+01 2.653752080490e-03 0.000000000000e+00 -2.653752080485e-03 -5.010000000000e-15 1.700000000000e+01 2.656461861408e-03 0.000000000000e+00 -2.656461861403e-03 -5.010000000000e-15 1.720000000000e+01 2.659095146238e-03 0.000000000000e+00 -2.659095146233e-03 -5.010000000000e-15 1.740000000000e+01 2.661655236027e-03 0.000000000000e+00 -2.661655236022e-03 -5.010000000000e-15 1.760000000000e+01 2.664145239663e-03 0.000000000000e+00 -2.664145239658e-03 -5.010000000000e-15 1.780000000000e+01 2.666568087799e-03 0.000000000000e+00 -2.666568087794e-03 -5.010000000000e-15 1.800000000000e+01 2.668926545590e-03 0.000000000000e+00 -2.668926545585e-03 -5.010000000000e-15 1.820000000000e+01 2.671223224338e-03 0.000000000000e+00 -2.671223224333e-03 -5.010000000000e-15 1.840000000000e+01 2.673460592174e-03 0.000000000000e+00 -2.673460592169e-03 -5.010000000000e-15 1.860000000000e+01 2.675640983852e-03 0.000000000000e+00 -2.675640983847e-03 -5.010000000000e-15 1.880000000000e+01 2.677766609748e-03 0.000000000000e+00 -2.677766609743e-03 -5.010000000000e-15 1.900000000000e+01 2.679839564138e-03 0.000000000000e+00 -2.679839564133e-03 -5.010000000000e-15 1.920000000000e+01 2.681861832821e-03 0.000000000000e+00 -2.681861832816e-03 -5.010000000000e-15 1.940000000000e+01 2.683835300141e-03 0.000000000000e+00 -2.683835300136e-03 -5.010000000000e-15 1.960000000000e+01 2.685761755473e-03 0.000000000000e+00 -2.685761755468e-03 -5.010000000000e-15 1.980000000000e+01 2.687642899212e-03 0.000000000000e+00 -2.687642899207e-03 -5.010000000000e-15 2.000000000000e+01 2.689480348313e-03 0.000000000000e+00 -2.689480348308e-03 -5.010000000000e-15 1.000000000000e+00 2.641968949169e-09 0.000000000000e+00 -2.641958939431e-09 -1.001000000000e-14 1.200000000000e+00 1.234756365417e-07 0.000000000000e+00 -1.234756265319e-07 -1.001000000000e-14 1.400000000000e+00 2.310700989413e-06 0.000000000000e+00 -2.310700979404e-06 -1.001000000000e-14 1.600000000000e+00 1.119888297746e-05 0.000000000000e+00 -1.119888296744e-05 -1.001000000000e-14 1.800000000000e+00 2.938770002436e-05 0.000000000000e+00 -2.938770001435e-05 -1.001000000000e-14 2.000000000000e+00 5.791519609650e-05 0.000000000000e+00 -5.791519608649e-05 -1.001000000000e-14 2.200000000000e+00 9.716440817731e-05 0.000000000000e+00 -9.716440816730e-05 -1.001000000000e-14 2.400000000000e+00 1.471031036198e-04 0.000000000000e+00 -1.471031036098e-04 -1.001000000000e-14 2.600000000000e+00 2.073884794294e-04 0.000000000000e+00 -2.073884794194e-04 -1.001000000000e-14 2.800000000000e+00 2.774424249199e-04 0.000000000000e+00 -2.774424249098e-04 -1.001000000000e-14 3.000000000000e+00 3.565179088752e-04 0.000000000000e+00 -3.565179088652e-04 -1.001000000000e-14 3.200000000000e+00 4.437593715047e-04 0.000000000000e+00 -4.437593714947e-04 -1.001000000000e-14 3.400000000000e+00 5.382558311152e-04 0.000000000000e+00 -5.382558311052e-04 -1.001000000000e-14 3.600000000000e+00 6.390849977034e-04 0.000000000000e+00 -6.390849976934e-04 -1.001000000000e-14 3.800000000000e+00 7.453474508812e-04 0.000000000000e+00 -7.453474508712e-04 -1.001000000000e-14 4.000000000000e+00 8.561909386606e-04 0.000000000000e+00 -8.561909386506e-04 -1.001000000000e-14 4.200000000000e+00 9.708256818984e-04 0.000000000000e+00 -9.708256818884e-04 -1.001000000000e-14 4.400000000000e+00 1.088532095841e-03 0.000000000000e+00 -1.088532095831e-03 -1.001000000000e-14 4.600000000000e+00 1.208662468953e-03 0.000000000000e+00 -1.208662468943e-03 -1.001000000000e-14 4.800000000000e+00 1.330638342806e-03 0.000000000000e+00 -1.330638342796e-03 -1.001000000000e-14 5.000000000000e+00 1.453944751703e-03 0.000000000000e+00 -1.453944751693e-03 -1.001000000000e-14 5.200000000000e+00 1.578122637249e-03 0.000000000000e+00 -1.578122637239e-03 -1.001000000000e-14 5.400000000000e+00 1.702760230604e-03 0.000000000000e+00 -1.702760230594e-03 -1.001000000000e-14 5.600000000000e+00 1.827484006334e-03 0.000000000000e+00 -1.827484006324e-03 -1.001000000000e-14 5.800000000000e+00 1.951949079827e-03 0.000000000000e+00 -1.951949079817e-03 -1.001000000000e-14 6.000000000000e+00 2.075776756264e-03 0.000000000000e+00 -2.075776756254e-03 -1.001000000000e-14 6.200000000000e+00 2.197631923934e-03 0.000000000000e+00 -2.197631923924e-03 -1.001000000000e-14 6.400000000000e+00 2.315498402435e-03 0.000000000000e+00 -2.315498402425e-03 -1.001000000000e-14 6.600000000000e+00 2.428339945450e-03 0.000000000000e+00 -2.428339945440e-03 -1.001000000000e-14 6.800000000000e+00 2.535507427293e-03 0.000000000000e+00 -2.535507427283e-03 -1.001000000000e-14 7.000000000000e+00 2.636528614456e-03 0.000000000000e+00 -2.636528614446e-03 -1.001000000000e-14 7.200000000000e+00 2.731081830950e-03 0.000000000000e+00 -2.731081830940e-03 -1.001000000000e-14 7.400000000000e+00 2.818995557481e-03 0.000000000000e+00 -2.818995557471e-03 -1.001000000000e-14 7.600000000000e+00 2.900245700907e-03 0.000000000000e+00 -2.900245700897e-03 -1.001000000000e-14 7.800000000000e+00 2.974944230601e-03 0.000000000000e+00 -2.974944230591e-03 -1.001000000000e-14 8.000000000000e+00 3.043319803042e-03 0.000000000000e+00 -3.043319803032e-03 -1.001000000000e-14 8.200000000000e+00 3.105693180364e-03 0.000000000000e+00 -3.105693180354e-03 -1.001000000000e-14 8.400000000000e+00 3.162450563048e-03 0.000000000000e+00 -3.162450563038e-03 -1.001000000000e-14 8.600000000000e+00 3.214017651698e-03 0.000000000000e+00 -3.214017651688e-03 -1.001000000000e-14 8.800000000000e+00 3.260836635257e-03 0.000000000000e+00 -3.260836635247e-03 -1.001000000000e-14 9.000000000000e+00 3.303347469147e-03 0.000000000000e+00 -3.303347469137e-03 -1.001000000000e-14 9.200000000000e+00 3.341973937991e-03 0.000000000000e+00 -3.341973937981e-03 -1.001000000000e-14 9.400000000000e+00 3.377114288246e-03 0.000000000000e+00 -3.377114288236e-03 -1.001000000000e-14 9.600000000000e+00 3.409135768853e-03 0.000000000000e+00 -3.409135768843e-03 -1.001000000000e-14 9.800000000000e+00 3.438372228621e-03 0.000000000000e+00 -3.438372228611e-03 -1.001000000000e-14 1.000000000000e+01 3.465123920580e-03 0.000000000000e+00 -3.465123920570e-03 -1.001000000000e-14 1.020000000000e+01 3.489658774518e-03 0.000000000000e+00 -3.489658774508e-03 -1.001000000000e-14 1.040000000000e+01 3.512214553146e-03 0.000000000000e+00 -3.512214553136e-03 -1.001000000000e-14 1.060000000000e+01 3.533001461878e-03 0.000000000000e+00 -3.533001461868e-03 -1.001000000000e-14 1.080000000000e+01 3.552204915607e-03 0.000000000000e+00 -3.552204915597e-03 -1.001000000000e-14 1.100000000000e+01 3.569988270658e-03 0.000000000000e+00 -3.569988270648e-03 -1.001000000000e-14 1.120000000000e+01 3.586495407236e-03 0.000000000000e+00 -3.586495407226e-03 -1.001000000000e-14 1.140000000000e+01 3.601853101391e-03 0.000000000000e+00 -3.601853101381e-03 -1.001000000000e-14 1.160000000000e+01 3.616173161234e-03 0.000000000000e+00 -3.616173161224e-03 -1.001000000000e-14 1.180000000000e+01 3.629554324553e-03 0.000000000000e+00 -3.629554324543e-03 -1.001000000000e-14 1.200000000000e+01 3.642083928333e-03 0.000000000000e+00 -3.642083928323e-03 -1.001000000000e-14 1.220000000000e+01 3.653839367725e-03 0.000000000000e+00 -3.653839367715e-03 -1.001000000000e-14 1.240000000000e+01 3.664889365237e-03 0.000000000000e+00 -3.664889365227e-03 -1.001000000000e-14 1.260000000000e+01 3.675295071516e-03 0.000000000000e+00 -3.675295071506e-03 -1.001000000000e-14 1.280000000000e+01 3.685111018423e-03 0.000000000000e+00 -3.685111018413e-03 -1.001000000000e-14 1.300000000000e+01 3.694385943497e-03 0.000000000000e+00 -3.694385943487e-03 -1.001000000000e-14 1.320000000000e+01 3.703163503102e-03 0.000000000000e+00 -3.703163503092e-03 -1.001000000000e-14 1.340000000000e+01 3.711482889522e-03 0.000000000000e+00 -3.711482889512e-03 -1.001000000000e-14 1.360000000000e+01 3.719379365414e-03 0.000000000000e+00 -3.719379365404e-03 -1.001000000000e-14 1.380000000000e+01 3.726884727205e-03 0.000000000000e+00 -3.726884727195e-03 -1.001000000000e-14 1.400000000000e+01 3.734027707465e-03 0.000000000000e+00 -3.734027707455e-03 -1.001000000000e-14 1.420000000000e+01 3.740834324850e-03 0.000000000000e+00 -3.740834324840e-03 -1.001000000000e-14 1.440000000000e+01 3.747328188971e-03 0.000000000000e+00 -3.747328188961e-03 -1.001000000000e-14 1.460000000000e+01 3.753530766491e-03 0.000000000000e+00 -3.753530766481e-03 -1.001000000000e-14 1.480000000000e+01 3.759461613835e-03 0.000000000000e+00 -3.759461613825e-03 -1.001000000000e-14 1.500000000000e+01 3.765138581082e-03 0.000000000000e+00 -3.765138581072e-03 -1.001000000000e-14 1.520000000000e+01 3.770577990989e-03 0.000000000000e+00 -3.770577990979e-03 -1.001000000000e-14 1.540000000000e+01 3.775794796478e-03 0.000000000000e+00 -3.775794796468e-03 -1.001000000000e-14 1.560000000000e+01 3.780802754390e-03 0.000000000000e+00 -3.780802754380e-03 -1.001000000000e-14 1.580000000000e+01 3.785614404115e-03 0.000000000000e+00 -3.785614404105e-03 -1.001000000000e-14 1.600000000000e+01 3.790241399135e-03 0.000000000000e+00 -3.790241399125e-03 -1.001000000000e-14 1.620000000000e+01 3.794694449489e-03 0.000000000000e+00 -3.794694449479e-03 -1.001000000000e-14 1.640000000000e+01 3.798983447073e-03 0.000000000000e+00 -3.798983447063e-03 -1.001000000000e-14 1.660000000000e+01 3.803117541832e-03 0.000000000000e+00 -3.803117541822e-03 -1.001000000000e-14 1.680000000000e+01 3.807105209636e-03 0.000000000000e+00 -3.807105209626e-03 -1.001000000000e-14 1.700000000000e+01 3.810954312941e-03 0.000000000000e+00 -3.810954312931e-03 -1.001000000000e-14 1.720000000000e+01 3.814672155087e-03 0.000000000000e+00 -3.814672155077e-03 -1.001000000000e-14 1.740000000000e+01 3.818265528987e-03 0.000000000000e+00 -3.818265528977e-03 -1.001000000000e-14 1.760000000000e+01 3.821740760865e-03 0.000000000000e+00 -3.821740760855e-03 -1.001000000000e-14 1.780000000000e+01 3.825103749606e-03 0.000000000000e+00 -3.825103749596e-03 -1.001000000000e-14 1.800000000000e+01 3.828360002229e-03 0.000000000000e+00 -3.828360002219e-03 -1.001000000000e-14 1.820000000000e+01 3.831514665898e-03 0.000000000000e+00 -3.831514665888e-03 -1.001000000000e-14 1.840000000000e+01 3.834572556875e-03 0.000000000000e+00 -3.834572556865e-03 -1.001000000000e-14 1.860000000000e+01 3.837538186732e-03 0.000000000000e+00 -3.837538186722e-03 -1.001000000000e-14 1.880000000000e+01 3.840415786120e-03 0.000000000000e+00 -3.840415786110e-03 -1.001000000000e-14 1.900000000000e+01 3.843209326367e-03 0.000000000000e+00 -3.843209326357e-03 -1.001000000000e-14 1.920000000000e+01 3.845922539106e-03 0.000000000000e+00 -3.845922539096e-03 -1.001000000000e-14 1.940000000000e+01 3.848558934168e-03 0.000000000000e+00 -3.848558934158e-03 -1.001000000000e-14 1.960000000000e+01 3.851121815889e-03 0.000000000000e+00 -3.851121815879e-03 -1.001000000000e-14 1.980000000000e+01 3.853614298006e-03 0.000000000000e+00 -3.853614297996e-03 -1.001000000000e-14 2.000000000000e+01 3.856039317277e-03 0.000000000000e+00 -3.856039317267e-03 -1.001000000000e-14 1.000000000000e+00 8.474683628468e-13 0.000000000000e+00 -8.454685635175e-13 -2.000000000751e-15 1.200000000000e+00 1.729889443497e-10 0.000000000000e+00 -1.729869446539e-10 -2.000000000751e-15 1.400000000000e+00 4.059861845600e-08 0.000000000000e+00 -4.059861645628e-08 -2.000000000751e-15 1.600000000000e+00 2.340085536073e-06 0.000000000000e+00 -2.340085534073e-06 -2.000000000751e-15 1.800000000000e+00 1.416417906072e-05 0.000000000000e+00 -1.416417905872e-05 -2.000000000751e-15 2.000000000000e+00 3.935254452813e-05 0.000000000000e+00 -3.935254452613e-05 -2.000000000751e-15 2.200000000000e+00 7.928589063844e-05 0.000000000000e+00 -7.928589063644e-05 -2.000000000751e-15 2.400000000000e+00 1.343107018778e-04 0.000000000000e+00 -1.343107018758e-04 -2.000000000751e-15 2.600000000000e+00 2.040090989800e-04 0.000000000000e+00 -2.040090989780e-04 -2.000000000751e-15 2.800000000000e+00 2.873540440107e-04 0.000000000000e+00 -2.873540440087e-04 -2.000000000751e-15 3.000000000000e+00 3.828755053082e-04 0.000000000000e+00 -3.828755053062e-04 -2.000000000751e-15 3.200000000000e+00 4.888394185794e-04 0.000000000000e+00 -4.888394185774e-04 -2.000000000751e-15 3.400000000000e+00 6.009186887864e-04 0.000000000000e+00 -6.009186887844e-04 -2.000000000751e-15 3.600000000000e+00 7.036107115398e-04 0.000000000000e+00 -7.036107115378e-04 -2.000000000751e-15 3.800000000000e+00 7.924185470314e-04 0.000000000000e+00 -7.924185470294e-04 -2.000000000751e-15 4.000000000000e+00 8.681535554763e-04 0.000000000000e+00 -8.681535554743e-04 -2.000000000751e-15 4.200000000000e+00 9.323518908212e-04 0.000000000000e+00 -9.323518908192e-04 -2.000000000751e-15 4.400000000000e+00 9.867387572459e-04 0.000000000000e+00 -9.867387572439e-04 -2.000000000751e-15 4.600000000000e+00 1.032948287944e-03 0.000000000000e+00 -1.032948287942e-03 -2.000000000751e-15 4.800000000000e+00 1.072409616481e-03 0.000000000000e+00 -1.072409616479e-03 -2.000000000751e-15 5.000000000000e+00 1.106321440529e-03 0.000000000000e+00 -1.106321440527e-03 -2.000000000751e-15 5.200000000000e+00 1.135666192186e-03 0.000000000000e+00 -1.135666192184e-03 -2.000000000751e-15 5.400000000000e+00 1.161239273269e-03 0.000000000000e+00 -1.161239273267e-03 -2.000000000751e-15 5.600000000000e+00 1.183681302885e-03 0.000000000000e+00 -1.183681302883e-03 -2.000000000751e-15 5.800000000000e+00 1.203507918541e-03 0.000000000000e+00 -1.203507918539e-03 -2.000000000751e-15 6.000000000000e+00 1.221135155517e-03 0.000000000000e+00 -1.221135155515e-03 -2.000000000751e-15 6.200000000000e+00 1.236900139254e-03 0.000000000000e+00 -1.236900139252e-03 -2.000000000751e-15 6.400000000000e+00 1.251077555940e-03 0.000000000000e+00 -1.251077555938e-03 -2.000000000751e-15 6.600000000000e+00 1.263892596899e-03 0.000000000000e+00 -1.263892596897e-03 -2.000000000751e-15 6.800000000000e+00 1.275531073181e-03 0.000000000000e+00 -1.275531073179e-03 -2.000000000751e-15 7.000000000000e+00 1.286147308298e-03 0.000000000000e+00 -1.286147308296e-03 -2.000000000751e-15 7.200000000000e+00 1.295870306460e-03 0.000000000000e+00 -1.295870306458e-03 -2.000000000751e-15 7.400000000000e+00 1.304808589219e-03 0.000000000000e+00 -1.304808589217e-03 -2.000000000751e-15 7.600000000000e+00 1.313054005175e-03 0.000000000000e+00 -1.313054005173e-03 -2.000000000751e-15 7.800000000000e+00 1.320684746515e-03 0.000000000000e+00 -1.320684746513e-03 -2.000000000751e-15 8.000000000000e+00 1.327767751077e-03 0.000000000000e+00 -1.327767751075e-03 -2.000000000751e-15 8.200000000000e+00 1.334360626337e-03 0.000000000000e+00 -1.334360626335e-03 -2.000000000751e-15 8.400000000000e+00 1.340513199621e-03 0.000000000000e+00 -1.340513199619e-03 -2.000000000751e-15 8.600000000000e+00 1.346268774540e-03 0.000000000000e+00 -1.346268774538e-03 -2.000000000751e-15 8.800000000000e+00 1.351665155219e-03 0.000000000000e+00 -1.351665155217e-03 -2.000000000751e-15 9.000000000000e+00 1.356735485964e-03 0.000000000000e+00 -1.356735485962e-03 -2.000000000751e-15 9.200000000000e+00 1.361508943416e-03 0.000000000000e+00 -1.361508943414e-03 -2.000000000751e-15 9.400000000000e+00 1.366011310104e-03 0.000000000000e+00 -1.366011310102e-03 -2.000000000751e-15 9.600000000000e+00 1.370265452180e-03 0.000000000000e+00 -1.370265452178e-03 -2.000000000751e-15 9.800000000000e+00 1.374291719265e-03 0.000000000000e+00 -1.374291719263e-03 -2.000000000751e-15 1.000000000000e+01 1.378108280699e-03 0.000000000000e+00 -1.378108280697e-03 -2.000000000751e-15 1.020000000000e+01 1.381731409586e-03 0.000000000000e+00 -1.381731409584e-03 -2.000000000751e-15 1.040000000000e+01 1.385175723768e-03 0.000000000000e+00 -1.385175723766e-03 -2.000000000751e-15 1.060000000000e+01 1.388454391111e-03 0.000000000000e+00 -1.388454391109e-03 -2.000000000751e-15 1.080000000000e+01 1.391579317317e-03 0.000000000000e+00 -1.391579317315e-03 -2.000000000751e-15 1.100000000000e+01 1.394561245886e-03 0.000000000000e+00 -1.394561245884e-03 -2.000000000751e-15 1.120000000000e+01 1.397409967254e-03 0.000000000000e+00 -1.397409967252e-03 -2.000000000751e-15 1.140000000000e+01 1.400134375956e-03 0.000000000000e+00 -1.400134375954e-03 -2.000000000751e-15 1.160000000000e+01 1.402742582501e-03 0.000000000000e+00 -1.402742582499e-03 -2.000000000751e-15 1.180000000000e+01 1.405241998186e-03 0.000000000000e+00 -1.405241998184e-03 -2.000000000751e-15 1.200000000000e+01 1.407639409121e-03 0.000000000000e+00 -1.407639409119e-03 -2.000000000751e-15 1.220000000000e+01 1.409941041053e-03 0.000000000000e+00 -1.409941041051e-03 -2.000000000751e-15 1.240000000000e+01 1.412152616281e-03 0.000000000000e+00 -1.412152616279e-03 -2.000000000751e-15 1.260000000000e+01 1.414279403776e-03 0.000000000000e+00 -1.414279403774e-03 -2.000000000751e-15 1.280000000000e+01 1.416326263419e-03 0.000000000000e+00 -1.416326263417e-03 -2.000000000751e-15 1.300000000000e+01 1.418297685155e-03 0.000000000000e+00 -1.418297685153e-03 -2.000000000751e-15 1.320000000000e+01 1.420197823729e-03 0.000000000000e+00 -1.420197823727e-03 -2.000000000751e-15 1.340000000000e+01 1.422030529572e-03 0.000000000000e+00 -1.422030529570e-03 -2.000000000751e-15 1.360000000000e+01 1.423799376333e-03 0.000000000000e+00 -1.423799376331e-03 -2.000000000751e-15 1.380000000000e+01 1.425507685458e-03 0.000000000000e+00 -1.425507685456e-03 -2.000000000751e-15 1.400000000000e+01 1.427158548204e-03 0.000000000000e+00 -1.427158548202e-03 -2.000000000751e-15 1.420000000000e+01 1.428754845370e-03 0.000000000000e+00 -1.428754845368e-03 -2.000000000751e-15 1.440000000000e+01 1.430299265034e-03 0.000000000000e+00 -1.430299265032e-03 -2.000000000751e-15 1.460000000000e+01 1.431794318515e-03 0.000000000000e+00 -1.431794318513e-03 -2.000000000751e-15 1.480000000000e+01 1.433242354777e-03 0.000000000000e+00 -1.433242354775e-03 -2.000000000751e-15 1.500000000000e+01 1.434645573436e-03 0.000000000000e+00 -1.434645573434e-03 -2.000000000751e-15 1.520000000000e+01 1.436006036537e-03 0.000000000000e+00 -1.436006036535e-03 -2.000000000751e-15 1.540000000000e+01 1.437325679227e-03 0.000000000000e+00 -1.437325679225e-03 -2.000000000751e-15 1.560000000000e+01 1.438606319449e-03 0.000000000000e+00 -1.438606319447e-03 -2.000000000751e-15 1.580000000000e+01 1.439849666753e-03 0.000000000000e+00 -1.439849666751e-03 -2.000000000751e-15 1.600000000000e+01 1.441057330329e-03 0.000000000000e+00 -1.441057330327e-03 -2.000000000751e-15 1.620000000000e+01 1.442230826319e-03 0.000000000000e+00 -1.442230826317e-03 -2.000000000751e-15 1.640000000000e+01 1.443371584515e-03 0.000000000000e+00 -1.443371584513e-03 -2.000000000751e-15 1.660000000000e+01 1.444480954467e-03 0.000000000000e+00 -1.444480954465e-03 -2.000000000751e-15 1.680000000000e+01 1.445560211091e-03 0.000000000000e+00 -1.445560211089e-03 -2.000000000751e-15 1.700000000000e+01 1.446610559799e-03 0.000000000000e+00 -1.446610559797e-03 -2.000000000751e-15 1.720000000000e+01 1.447633141221e-03 0.000000000000e+00 -1.447633141219e-03 -2.000000000751e-15 1.740000000000e+01 1.448629035537e-03 0.000000000000e+00 -1.448629035535e-03 -2.000000000751e-15 1.760000000000e+01 1.449599266469e-03 0.000000000000e+00 -1.449599266467e-03 -2.000000000751e-15 1.780000000000e+01 1.450544804958e-03 0.000000000000e+00 -1.450544804956e-03 -2.000000000751e-15 1.800000000000e+01 1.451466572554e-03 0.000000000000e+00 -1.451466572552e-03 -2.000000000751e-15 1.820000000000e+01 1.452365444551e-03 0.000000000000e+00 -1.452365444549e-03 -2.000000000751e-15 1.840000000000e+01 1.453242252879e-03 0.000000000000e+00 -1.453242252877e-03 -2.000000000751e-15 1.860000000000e+01 1.454097788788e-03 0.000000000000e+00 -1.454097788786e-03 -2.000000000751e-15 1.880000000000e+01 1.454932805327e-03 0.000000000000e+00 -1.454932805325e-03 -2.000000000751e-15 1.900000000000e+01 1.455748019648e-03 0.000000000000e+00 -1.455748019646e-03 -2.000000000751e-15 1.920000000000e+01 1.456544115140e-03 0.000000000000e+00 -1.456544115138e-03 -2.000000000751e-15 1.940000000000e+01 1.457321743416e-03 0.000000000000e+00 -1.457321743414e-03 -2.000000000751e-15 1.960000000000e+01 1.458081526159e-03 0.000000000000e+00 -1.458081526157e-03 -2.000000000751e-15 1.980000000000e+01 1.458824056835e-03 0.000000000000e+00 -1.458824056833e-03 -2.000000000751e-15 2.000000000000e+01 1.459549902301e-03 0.000000000000e+00 -1.459549902299e-03 -2.000000000751e-15 1.000000000000e+00 9.486417727744e-13 0.000000000000e+00 -9.436418037925e-13 -5.000000000751e-15 1.200000000000e+00 1.937825798264e-10 0.000000000000e+00 -1.937775802791e-10 -5.000000000751e-15 1.400000000000e+00 4.540884359413e-08 0.000000000000e+00 -4.540883859445e-08 -5.000000000751e-15 1.600000000000e+00 2.482204729891e-06 0.000000000000e+00 -2.482204724892e-06 -5.000000000751e-15 1.800000000000e+00 1.465908071444e-05 0.000000000000e+00 -1.465908070944e-05 -5.000000000751e-15 2.000000000000e+00 4.036326424163e-05 0.000000000000e+00 -4.036326423663e-05 -5.000000000751e-15 2.200000000000e+00 8.095228733810e-05 0.000000000000e+00 -8.095228733310e-05 -5.000000000751e-15 2.400000000000e+00 1.367551361845e-04 0.000000000000e+00 -1.367551361795e-04 -5.000000000751e-15 2.600000000000e+00 2.073458444368e-04 0.000000000000e+00 -2.073458444318e-04 -5.000000000751e-15 2.800000000000e+00 2.917057374706e-04 0.000000000000e+00 -2.917057374656e-04 -5.000000000751e-15 3.000000000000e+00 3.883905063934e-04 0.000000000000e+00 -3.883905063884e-04 -5.000000000751e-15 3.200000000000e+00 4.957021245663e-04 0.000000000000e+00 -4.957021245613e-04 -5.000000000751e-15 3.400000000000e+00 6.118465271613e-04 0.000000000000e+00 -6.118465271563e-04 -5.000000000751e-15 3.600000000000e+00 7.350602689876e-04 0.000000000000e+00 -7.350602689826e-04 -5.000000000751e-15 3.800000000000e+00 8.636981587704e-04 0.000000000000e+00 -8.636981587654e-04 -5.000000000751e-15 4.000000000000e+00 9.962826734635e-04 0.000000000000e+00 -9.962826734585e-04 -5.000000000751e-15 4.200000000000e+00 1.131521571853e-03 0.000000000000e+00 -1.131521571848e-03 -5.000000000751e-15 4.400000000000e+00 1.268301287883e-03 0.000000000000e+00 -1.268301287878e-03 -5.000000000751e-15 4.600000000000e+00 1.405468727200e-03 0.000000000000e+00 -1.405468727195e-03 -5.000000000751e-15 4.800000000000e+00 1.537390069980e-03 0.000000000000e+00 -1.537390069975e-03 -5.000000000751e-15 5.000000000000e+00 1.659156409607e-03 0.000000000000e+00 -1.659156409602e-03 -5.000000000751e-15 5.200000000000e+00 1.770144149313e-03 0.000000000000e+00 -1.770144149308e-03 -5.000000000751e-15 5.400000000000e+00 1.870335252001e-03 0.000000000000e+00 -1.870335251996e-03 -5.000000000751e-15 5.600000000000e+00 1.959971360833e-03 0.000000000000e+00 -1.959971360828e-03 -5.000000000751e-15 5.800000000000e+00 2.039544326381e-03 0.000000000000e+00 -2.039544326376e-03 -5.000000000751e-15 6.000000000000e+00 2.109758799531e-03 0.000000000000e+00 -2.109758799526e-03 -5.000000000751e-15 6.200000000000e+00 2.171464522160e-03 0.000000000000e+00 -2.171464522155e-03 -5.000000000751e-15 6.400000000000e+00 2.225581655646e-03 0.000000000000e+00 -2.225581655641e-03 -5.000000000751e-15 6.600000000000e+00 2.273034205994e-03 0.000000000000e+00 -2.273034205989e-03 -5.000000000751e-15 6.800000000000e+00 2.314699966581e-03 0.000000000000e+00 -2.314699966576e-03 -5.000000000751e-15 7.000000000000e+00 2.351379364497e-03 0.000000000000e+00 -2.351379364492e-03 -5.000000000751e-15 7.200000000000e+00 2.383780936789e-03 0.000000000000e+00 -2.383780936784e-03 -5.000000000751e-15 7.400000000000e+00 2.412518952815e-03 0.000000000000e+00 -2.412518952810e-03 -5.000000000751e-15 7.600000000000e+00 2.438118569911e-03 0.000000000000e+00 -2.438118569906e-03 -5.000000000751e-15 7.800000000000e+00 2.461024850305e-03 0.000000000000e+00 -2.461024850300e-03 -5.000000000751e-15 8.000000000000e+00 2.481613152227e-03 0.000000000000e+00 -2.481613152222e-03 -5.000000000751e-15 8.200000000000e+00 2.500199418482e-03 0.000000000000e+00 -2.500199418477e-03 -5.000000000751e-15 8.400000000000e+00 2.517049602928e-03 0.000000000000e+00 -2.517049602923e-03 -5.000000000751e-15 8.600000000000e+00 2.532387926618e-03 0.000000000000e+00 -2.532387926613e-03 -5.000000000751e-15 8.800000000000e+00 2.546403912152e-03 0.000000000000e+00 -2.546403912147e-03 -5.000000000751e-15 9.000000000000e+00 2.559258275293e-03 0.000000000000e+00 -2.559258275288e-03 -5.000000000751e-15 9.200000000000e+00 2.571087808316e-03 0.000000000000e+00 -2.571087808311e-03 -5.000000000751e-15 9.400000000000e+00 2.582009403620e-03 0.000000000000e+00 -2.582009403615e-03 -5.000000000751e-15 9.600000000000e+00 2.592123359366e-03 0.000000000000e+00 -2.592123359361e-03 -5.000000000751e-15 9.800000000000e+00 2.601516093177e-03 0.000000000000e+00 -2.601516093172e-03 -5.000000000751e-15 1.000000000000e+01 2.610262371488e-03 0.000000000000e+00 -2.610262371483e-03 -5.000000000751e-15 1.020000000000e+01 2.618427144256e-03 0.000000000000e+00 -2.618427144251e-03 -5.000000000751e-15 1.040000000000e+01 2.626067058638e-03 0.000000000000e+00 -2.626067058633e-03 -5.000000000751e-15 1.060000000000e+01 2.633231711582e-03 0.000000000000e+00 -2.633231711577e-03 -5.000000000751e-15 1.080000000000e+01 2.639964689815e-03 0.000000000000e+00 -2.639964689810e-03 -5.000000000751e-15 1.100000000000e+01 2.646304436387e-03 0.000000000000e+00 -2.646304436382e-03 -5.000000000751e-15 1.120000000000e+01 2.652284975363e-03 0.000000000000e+00 -2.652284975358e-03 -5.000000000751e-15 1.140000000000e+01 2.657936520142e-03 0.000000000000e+00 -2.657936520137e-03 -5.000000000751e-15 1.160000000000e+01 2.663285986024e-03 0.000000000000e+00 -2.663285986019e-03 -5.000000000751e-15 1.180000000000e+01 2.668357423688e-03 0.000000000000e+00 -2.668357423683e-03 -5.000000000751e-15 1.200000000000e+01 2.673172387166e-03 0.000000000000e+00 -2.673172387161e-03 -5.000000000751e-15 1.220000000000e+01 2.677750247303e-03 0.000000000000e+00 -2.677750247298e-03 -5.000000000751e-15 1.240000000000e+01 2.682108459765e-03 0.000000000000e+00 -2.682108459760e-03 -5.000000000751e-15 1.260000000000e+01 2.686262794938e-03 0.000000000000e+00 -2.686262794933e-03 -5.000000000751e-15 1.280000000000e+01 2.690227535829e-03 0.000000000000e+00 -2.690227535824e-03 -5.000000000751e-15 1.300000000000e+01 2.694015675433e-03 0.000000000000e+00 -2.694015675428e-03 -5.000000000751e-15 1.320000000000e+01 2.697638955156e-03 0.000000000000e+00 -2.697638955151e-03 -5.000000000751e-15 1.340000000000e+01 2.701108164015e-03 0.000000000000e+00 -2.701108164010e-03 -5.000000000751e-15 1.360000000000e+01 2.704433132506e-03 0.000000000000e+00 -2.704433132501e-03 -5.000000000751e-15 1.380000000000e+01 2.707622861391e-03 0.000000000000e+00 -2.707622861386e-03 -5.000000000751e-15 1.400000000000e+01 2.710685607616e-03 0.000000000000e+00 -2.710685607611e-03 -5.000000000751e-15 1.420000000000e+01 2.713628959762e-03 0.000000000000e+00 -2.713628959757e-03 -5.000000000751e-15 1.440000000000e+01 2.716459904528e-03 0.000000000000e+00 -2.716459904523e-03 -5.000000000751e-15 1.460000000000e+01 2.719184885457e-03 0.000000000000e+00 -2.719184885452e-03 -5.000000000751e-15 1.480000000000e+01 2.721809854916e-03 0.000000000000e+00 -2.721809854911e-03 -5.000000000751e-15 1.500000000000e+01 2.724340320246e-03 0.000000000000e+00 -2.724340320241e-03 -5.000000000751e-15 1.520000000000e+01 2.726781384788e-03 0.000000000000e+00 -2.726781384783e-03 -5.000000000751e-15 1.540000000000e+01 2.729137784470e-03 0.000000000000e+00 -2.729137784465e-03 -5.000000000751e-15 1.560000000000e+01 2.731413920479e-03 0.000000000000e+00 -2.731413920474e-03 -5.000000000751e-15 1.580000000000e+01 2.733613888508e-03 0.000000000000e+00 -2.733613888503e-03 -5.000000000751e-15 1.600000000000e+01 2.735741504988e-03 0.000000000000e+00 -2.735741504983e-03 -5.000000000751e-15 1.620000000000e+01 2.737800330660e-03 0.000000000000e+00 -2.737800330655e-03 -5.000000000751e-15 1.640000000000e+01 2.739793691788e-03 0.000000000000e+00 -2.739793691783e-03 -5.000000000751e-15 1.660000000000e+01 2.741724699300e-03 0.000000000000e+00 -2.741724699295e-03 -5.000000000751e-15 1.680000000000e+01 2.743596266076e-03 0.000000000000e+00 -2.743596266071e-03 -5.000000000751e-15 1.700000000000e+01 2.745411122587e-03 0.000000000000e+00 -2.745411122582e-03 -5.000000000751e-15 1.720000000000e+01 2.747171831084e-03 0.000000000000e+00 -2.747171831079e-03 -5.000000000751e-15 1.740000000000e+01 2.748880798463e-03 0.000000000000e+00 -2.748880798458e-03 -5.000000000751e-15 1.760000000000e+01 2.750540287977e-03 0.000000000000e+00 -2.750540287972e-03 -5.000000000751e-15 1.780000000000e+01 2.752152429891e-03 0.000000000000e+00 -2.752152429886e-03 -5.000000000751e-15 1.800000000000e+01 2.753719231205e-03 0.000000000000e+00 -2.753719231200e-03 -5.000000000751e-15 1.820000000000e+01 2.755242584527e-03 0.000000000000e+00 -2.755242584522e-03 -5.000000000751e-15 1.840000000000e+01 2.756724276196e-03 0.000000000000e+00 -2.756724276191e-03 -5.000000000751e-15 1.860000000000e+01 2.758165993708e-03 0.000000000000e+00 -2.758165993703e-03 -5.000000000751e-15 1.880000000000e+01 2.759569332535e-03 0.000000000000e+00 -2.759569332530e-03 -5.000000000751e-15 1.900000000000e+01 2.760935802377e-03 0.000000000000e+00 -2.760935802372e-03 -5.000000000751e-15 1.920000000000e+01 2.762266832916e-03 0.000000000000e+00 -2.762266832911e-03 -5.000000000751e-15 1.940000000000e+01 2.763563779105e-03 0.000000000000e+00 -2.763563779100e-03 -5.000000000751e-15 1.960000000000e+01 2.764827926041e-03 0.000000000000e+00 -2.764827926036e-03 -5.000000000751e-15 1.980000000000e+01 2.766060493463e-03 0.000000000000e+00 -2.766060493458e-03 -5.000000000751e-15 2.000000000000e+01 2.767262639902e-03 0.000000000000e+00 -2.767262639897e-03 -5.000000000751e-15 1.000000000000e+00 1.136861438322e-12 0.000000000000e+00 -1.126862587892e-12 -1.000000000075e-14 1.200000000000e+00 2.328145315422e-10 0.000000000000e+00 -2.328045325478e-10 -1.000000000075e-14 1.400000000000e+00 5.435776307544e-08 0.000000000000e+00 -5.435775307470e-08 -1.000000000075e-14 1.600000000000e+00 2.717917985741e-06 0.000000000000e+00 -2.717917975742e-06 -1.000000000075e-14 1.800000000000e+00 1.542592294087e-05 0.000000000000e+00 -1.542592293087e-05 -1.000000000075e-14 2.000000000000e+00 4.185658493470e-05 0.000000000000e+00 -4.185658492470e-05 -1.000000000075e-14 2.200000000000e+00 8.331424679273e-05 0.000000000000e+00 -8.331424678273e-05 -1.000000000075e-14 2.400000000000e+00 1.400769692522e-04 0.000000000000e+00 -1.400769692422e-04 -1.000000000075e-14 2.600000000000e+00 2.116677950224e-04 0.000000000000e+00 -2.116677950124e-04 -1.000000000075e-14 2.800000000000e+00 2.970229660249e-04 0.000000000000e+00 -2.970229660149e-04 -1.000000000075e-14 3.000000000000e+00 3.946656284081e-04 0.000000000000e+00 -3.946656283981e-04 -1.000000000075e-14 3.200000000000e+00 5.028829065826e-04 0.000000000000e+00 -5.028829065726e-04 -1.000000000075e-14 3.400000000000e+00 6.198865719884e-04 0.000000000000e+00 -6.198865719784e-04 -1.000000000075e-14 3.600000000000e+00 7.439407043620e-04 0.000000000000e+00 -7.439407043520e-04 -1.000000000075e-14 3.800000000000e+00 8.734489404784e-04 0.000000000000e+00 -8.734489404684e-04 -1.000000000075e-14 4.000000000000e+00 1.007002733154e-03 0.000000000000e+00 -1.007002733144e-03 -1.000000000075e-14 4.200000000000e+00 1.143397705904e-03 0.000000000000e+00 -1.143397705894e-03 -1.000000000075e-14 4.400000000000e+00 1.281627237068e-03 0.000000000000e+00 -1.281627237058e-03 -1.000000000075e-14 4.600000000000e+00 1.420862186379e-03 0.000000000000e+00 -1.420862186369e-03 -1.000000000075e-14 4.800000000000e+00 1.560423473734e-03 0.000000000000e+00 -1.560423473724e-03 -1.000000000075e-14 5.000000000000e+00 1.699752538009e-03 0.000000000000e+00 -1.699752537999e-03 -1.000000000075e-14 5.200000000000e+00 1.838382526883e-03 0.000000000000e+00 -1.838382526873e-03 -1.000000000075e-14 5.400000000000e+00 1.975911700847e-03 0.000000000000e+00 -1.975911700837e-03 -1.000000000075e-14 5.600000000000e+00 2.111979435622e-03 0.000000000000e+00 -2.111979435612e-03 -1.000000000075e-14 5.800000000000e+00 2.246244240934e-03 0.000000000000e+00 -2.246244240924e-03 -1.000000000075e-14 6.000000000000e+00 2.378068768456e-03 0.000000000000e+00 -2.378068768446e-03 -1.000000000075e-14 6.200000000000e+00 2.504921958193e-03 0.000000000000e+00 -2.504921958183e-03 -1.000000000075e-14 6.400000000000e+00 2.625327755134e-03 0.000000000000e+00 -2.625327755124e-03 -1.000000000075e-14 6.600000000000e+00 2.738736863998e-03 0.000000000000e+00 -2.738736863988e-03 -1.000000000075e-14 6.800000000000e+00 2.844755250908e-03 0.000000000000e+00 -2.844755250898e-03 -1.000000000075e-14 7.000000000000e+00 2.943089085304e-03 0.000000000000e+00 -2.943089085294e-03 -1.000000000075e-14 7.200000000000e+00 3.033568590378e-03 0.000000000000e+00 -3.033568590368e-03 -1.000000000075e-14 7.400000000000e+00 3.116177223673e-03 0.000000000000e+00 -3.116177223663e-03 -1.000000000075e-14 7.600000000000e+00 3.191064874929e-03 0.000000000000e+00 -3.191064874919e-03 -1.000000000075e-14 7.800000000000e+00 3.258540060922e-03 0.000000000000e+00 -3.258540060912e-03 -1.000000000075e-14 8.000000000000e+00 3.319043885772e-03 0.000000000000e+00 -3.319043885762e-03 -1.000000000075e-14 8.200000000000e+00 3.373112308399e-03 0.000000000000e+00 -3.373112308389e-03 -1.000000000075e-14 8.400000000000e+00 3.421334655396e-03 0.000000000000e+00 -3.421334655386e-03 -1.000000000075e-14 8.600000000000e+00 3.464315430101e-03 0.000000000000e+00 -3.464315430091e-03 -1.000000000075e-14 8.800000000000e+00 3.502643929878e-03 0.000000000000e+00 -3.502643929868e-03 -1.000000000075e-14 9.000000000000e+00 3.536873278597e-03 0.000000000000e+00 -3.536873278587e-03 -1.000000000075e-14 9.200000000000e+00 3.567508259425e-03 0.000000000000e+00 -3.567508259415e-03 -1.000000000075e-14 9.400000000000e+00 3.595000158776e-03 0.000000000000e+00 -3.595000158766e-03 -1.000000000075e-14 9.600000000000e+00 3.619746538178e-03 0.000000000000e+00 -3.619746538168e-03 -1.000000000075e-14 9.800000000000e+00 3.642094077993e-03 0.000000000000e+00 -3.642094077983e-03 -1.000000000075e-14 1.000000000000e+01 3.662343069420e-03 0.000000000000e+00 -3.662343069410e-03 -1.000000000075e-14 1.020000000000e+01 3.680752573796e-03 0.000000000000e+00 -3.680752573786e-03 -1.000000000075e-14 1.040000000000e+01 3.697545633126e-03 0.000000000000e+00 -3.697545633116e-03 -1.000000000075e-14 1.060000000000e+01 3.712914182065e-03 0.000000000000e+00 -3.712914182055e-03 -1.000000000075e-14 1.080000000000e+01 3.727023489824e-03 0.000000000000e+00 -3.727023489814e-03 -1.000000000075e-14 1.100000000000e+01 3.740016071550e-03 0.000000000000e+00 -3.740016071540e-03 -1.000000000075e-14 1.120000000000e+01 3.752015072975e-03 0.000000000000e+00 -3.752015072965e-03 -1.000000000075e-14 1.140000000000e+01 3.763127165845e-03 0.000000000000e+00 -3.763127165835e-03 -1.000000000075e-14 1.160000000000e+01 3.773445006600e-03 0.000000000000e+00 -3.773445006590e-03 -1.000000000075e-14 1.180000000000e+01 3.783049314762e-03 0.000000000000e+00 -3.783049314752e-03 -1.000000000075e-14 1.200000000000e+01 3.792010625505e-03 0.000000000000e+00 -3.792010625495e-03 -1.000000000075e-14 1.220000000000e+01 3.800390766054e-03 0.000000000000e+00 -3.800390766044e-03 -1.000000000075e-14 1.240000000000e+01 3.808244099574e-03 0.000000000000e+00 -3.808244099564e-03 -1.000000000075e-14 1.260000000000e+01 3.815618574152e-03 0.000000000000e+00 -3.815618574142e-03 -1.000000000075e-14 1.280000000000e+01 3.822556608734e-03 0.000000000000e+00 -3.822556608724e-03 -1.000000000075e-14 1.300000000000e+01 3.829095842835e-03 0.000000000000e+00 -3.829095842825e-03 -1.000000000075e-14 1.320000000000e+01 3.835269772403e-03 0.000000000000e+00 -3.835269772393e-03 -1.000000000075e-14 1.340000000000e+01 3.841108290453e-03 0.000000000000e+00 -3.841108290443e-03 -1.000000000075e-14 1.360000000000e+01 3.846638147957e-03 0.000000000000e+00 -3.846638147947e-03 -1.000000000075e-14 1.380000000000e+01 3.851883347813e-03 0.000000000000e+00 -3.851883347803e-03 -1.000000000075e-14 1.400000000000e+01 3.856865482562e-03 0.000000000000e+00 -3.856865482552e-03 -1.000000000075e-14 1.420000000000e+01 3.861604024679e-03 0.000000000000e+00 -3.861604024669e-03 -1.000000000075e-14 1.440000000000e+01 3.866116576826e-03 0.000000000000e+00 -3.866116576816e-03 -1.000000000075e-14 1.460000000000e+01 3.870419088164e-03 0.000000000000e+00 -3.870419088154e-03 -1.000000000075e-14 1.480000000000e+01 3.874526041862e-03 0.000000000000e+00 -3.874526041852e-03 -1.000000000075e-14 1.500000000000e+01 3.878450656050e-03 0.000000000000e+00 -3.878450656040e-03 -1.000000000075e-14 1.520000000000e+01 3.882204868890e-03 0.000000000000e+00 -3.882204868880e-03 -1.000000000075e-14 1.540000000000e+01 3.885799706459e-03 0.000000000000e+00 -3.885799706449e-03 -1.000000000075e-14 1.560000000000e+01 3.889245222853e-03 0.000000000000e+00 -3.889245222843e-03 -1.000000000075e-14 1.580000000000e+01 3.892550639432e-03 0.000000000000e+00 -3.892550639422e-03 -1.000000000075e-14 1.600000000000e+01 3.895724428964e-03 0.000000000000e+00 -3.895724428954e-03 -1.000000000075e-14 1.620000000000e+01 3.898774389774e-03 0.000000000000e+00 -3.898774389764e-03 -1.000000000075e-14 1.640000000000e+01 3.901707711333e-03 0.000000000000e+00 -3.901707711323e-03 -1.000000000075e-14 1.660000000000e+01 3.904531032407e-03 0.000000000000e+00 -3.904531032397e-03 -1.000000000075e-14 1.680000000000e+01 3.907250492704e-03 0.000000000000e+00 -3.907250492694e-03 -1.000000000075e-14 1.700000000000e+01 3.909871778863e-03 0.000000000000e+00 -3.909871778853e-03 -1.000000000075e-14 1.720000000000e+01 3.912400165467e-03 0.000000000000e+00 -3.912400165457e-03 -1.000000000075e-14 1.740000000000e+01 3.914840551712e-03 0.000000000000e+00 -3.914840551702e-03 -1.000000000075e-14 1.760000000000e+01 3.917197494241e-03 0.000000000000e+00 -3.917197494231e-03 -1.000000000075e-14 1.780000000000e+01 3.919475236605e-03 0.000000000000e+00 -3.919475236595e-03 -1.000000000075e-14 1.800000000000e+01 3.921677735751e-03 0.000000000000e+00 -3.921677735741e-03 -1.000000000075e-14 1.820000000000e+01 3.923808685865e-03 0.000000000000e+00 -3.923808685855e-03 -1.000000000075e-14 1.840000000000e+01 3.925871539885e-03 0.000000000000e+00 -3.925871539875e-03 -1.000000000075e-14 1.860000000000e+01 3.927869528939e-03 0.000000000000e+00 -3.927869528929e-03 -1.000000000075e-14 1.880000000000e+01 3.929805679935e-03 0.000000000000e+00 -3.929805679925e-03 -1.000000000075e-14 1.900000000000e+01 3.931682831506e-03 0.000000000000e+00 -3.931682831496e-03 -1.000000000075e-14 1.920000000000e+01 3.933503648486e-03 0.000000000000e+00 -3.933503648476e-03 -1.000000000075e-14 1.940000000000e+01 3.935270635070e-03 0.000000000000e+00 -3.935270635060e-03 -1.000000000075e-14 1.960000000000e+01 3.936986146799e-03 0.000000000000e+00 -3.936986146789e-03 -1.000000000075e-14 1.980000000000e+01 3.938652401486e-03 0.000000000000e+00 -3.938652401476e-03 -1.000000000075e-14 2.000000000000e+01 3.940271489190e-03 0.000000000000e+00 -3.940271489180e-03 -1.000000000075e-14 1.000000000000e+00 1.288044233563e-06 0.000000000000e+00 -1.288031277820e-06 -1.295574362086e-11 1.200000000000e+00 5.574743108609e-06 0.000000000000e+00 -5.574730152865e-06 -1.295574362086e-11 1.400000000000e+00 1.476090855476e-05 0.000000000000e+00 -1.476089559902e-05 -1.295574362086e-11 1.600000000000e+00 2.972214053613e-05 0.000000000000e+00 -2.972212758038e-05 -1.295574362086e-11 1.800000000000e+00 5.088669344913e-05 0.000000000000e+00 -5.088668049338e-05 -1.295574362086e-11 2.000000000000e+00 7.843997361607e-05 0.000000000000e+00 -7.843996066033e-05 -1.295574362086e-11 2.200000000000e+00 1.124068767297e-04 0.000000000000e+00 -1.124068637739e-04 -1.295574362086e-11 2.400000000000e+00 1.526934503949e-04 0.000000000000e+00 -1.526934374392e-04 -1.295574362086e-11 2.600000000000e+00 1.991129266236e-04 0.000000000000e+00 -1.991129136678e-04 -1.295574362086e-11 2.800000000000e+00 2.513959863555e-04 0.000000000000e+00 -2.513959733998e-04 -1.295574362086e-11 3.000000000000e+00 3.090088200417e-04 0.000000000000e+00 -3.090088070859e-04 -1.295574362086e-11 3.200000000000e+00 3.698755159423e-04 0.000000000000e+00 -3.698755029866e-04 -1.295574362086e-11 3.400000000000e+00 4.306718910748e-04 0.000000000000e+00 -4.306718781190e-04 -1.295574362086e-11 3.600000000000e+00 4.892534378971e-04 0.000000000000e+00 -4.892534249413e-04 -1.295574362086e-11 3.800000000000e+00 5.444761617752e-04 0.000000000000e+00 -5.444761488195e-04 -1.295574362086e-11 4.000000000000e+00 5.957846781334e-04 0.000000000000e+00 -5.957846651777e-04 -1.295574362086e-11 4.200000000000e+00 6.430121044478e-04 0.000000000000e+00 -6.430120914921e-04 -1.295574362086e-11 4.400000000000e+00 6.862398058422e-04 0.000000000000e+00 -6.862397928864e-04 -1.295574362086e-11 4.600000000000e+00 7.256931528538e-04 0.000000000000e+00 -7.256931398981e-04 -1.295574362086e-11 4.800000000000e+00 7.616690759036e-04 0.000000000000e+00 -7.616690629478e-04 -1.295574362086e-11 5.000000000000e+00 7.944893281812e-04 0.000000000000e+00 -7.944893152254e-04 -1.295574362086e-11 5.200000000000e+00 8.244725027977e-04 0.000000000000e+00 -8.244724898420e-04 -1.295574362086e-11 5.400000000000e+00 8.519187346081e-04 0.000000000000e+00 -8.519187216524e-04 -1.295574362086e-11 5.600000000000e+00 8.771024744371e-04 0.000000000000e+00 -8.771024614814e-04 -1.295574362086e-11 5.800000000000e+00 9.002701187618e-04 0.000000000000e+00 -9.002701058061e-04 -1.295574362086e-11 6.000000000000e+00 9.216403837554e-04 0.000000000000e+00 -9.216403707997e-04 -1.295574362086e-11 6.200000000000e+00 9.414061029569e-04 0.000000000000e+00 -9.414060900011e-04 -1.295574362086e-11 6.400000000000e+00 9.597366564638e-04 0.000000000000e+00 -9.597366435081e-04 -1.295574362086e-11 6.600000000000e+00 9.767805771125e-04 0.000000000000e+00 -9.767805641567e-04 -1.295574362086e-11 6.800000000000e+00 9.926680871836e-04 0.000000000000e+00 -9.926680742278e-04 -1.295574362086e-11 7.000000000000e+00 1.007513443549e-03 0.000000000000e+00 -1.007513430593e-03 -1.295574362086e-11 7.200000000000e+00 1.021417041205e-03 0.000000000000e+00 -1.021417028249e-03 -1.295574362086e-11 7.400000000000e+00 1.034467265245e-03 0.000000000000e+00 -1.034467252289e-03 -1.295574362086e-11 7.600000000000e+00 1.046742102351e-03 0.000000000000e+00 -1.046742089395e-03 -1.295574362086e-11 7.800000000000e+00 1.058310532831e-03 0.000000000000e+00 -1.058310519876e-03 -1.295574362086e-11 8.000000000000e+00 1.069233727856e-03 0.000000000000e+00 -1.069233714901e-03 -1.295574362086e-11 8.200000000000e+00 1.079566076729e-03 0.000000000000e+00 -1.079566063773e-03 -1.295574362086e-11 8.400000000000e+00 1.089356067514e-03 0.000000000000e+00 -1.089356054559e-03 -1.295574362086e-11 8.600000000000e+00 1.098647042012e-03 0.000000000000e+00 -1.098647029057e-03 -1.295574362086e-11 8.800000000000e+00 1.107477843535e-03 0.000000000000e+00 -1.107477830579e-03 -1.295574362086e-11 9.000000000000e+00 1.115883373438e-03 0.000000000000e+00 -1.115883360483e-03 -1.295574362086e-11 9.200000000000e+00 1.123895070084e-03 0.000000000000e+00 -1.123895057128e-03 -1.295574362086e-11 9.400000000000e+00 1.131541321853e-03 0.000000000000e+00 -1.131541308897e-03 -1.295574362086e-11 9.600000000000e+00 1.138847824062e-03 0.000000000000e+00 -1.138847811106e-03 -1.295574362086e-11 9.800000000000e+00 1.145837888108e-03 0.000000000000e+00 -1.145837875152e-03 -1.295574362086e-11 1.000000000000e+01 1.152532709866e-03 0.000000000000e+00 -1.152532696911e-03 -1.295574362086e-11 1.020000000000e+01 1.158951603278e-03 0.000000000000e+00 -1.158951590323e-03 -1.295574362086e-11 1.040000000000e+01 1.165112204137e-03 0.000000000000e+00 -1.165112191182e-03 -1.295574362086e-11 1.060000000000e+01 1.171030648307e-03 0.000000000000e+00 -1.171030635351e-03 -1.295574362086e-11 1.080000000000e+01 1.176721727958e-03 0.000000000000e+00 -1.176721715003e-03 -1.295574362086e-11 1.100000000000e+01 1.182199039471e-03 0.000000000000e+00 -1.182199026515e-03 -1.295574362086e-11 1.120000000000e+01 1.187475060590e-03 0.000000000000e+00 -1.187475047634e-03 -1.295574362086e-11 1.140000000000e+01 1.192561325048e-03 0.000000000000e+00 -1.192561312093e-03 -1.295574362086e-11 1.160000000000e+01 1.197468470187e-03 0.000000000000e+00 -1.197468457231e-03 -1.295574362086e-11 1.180000000000e+01 1.202206332892e-03 0.000000000000e+00 -1.202206319936e-03 -1.295574362086e-11 1.200000000000e+01 1.206784024064e-03 0.000000000000e+00 -1.206784011109e-03 -1.295574362086e-11 1.220000000000e+01 1.211209994930e-03 0.000000000000e+00 -1.211209981974e-03 -1.295574362086e-11 1.240000000000e+01 1.215492096226e-03 0.000000000000e+00 -1.215492083270e-03 -1.295574362086e-11 1.260000000000e+01 1.219637631123e-03 0.000000000000e+00 -1.219637618167e-03 -1.295574362086e-11 1.280000000000e+01 1.223653402645e-03 0.000000000000e+00 -1.223653389689e-03 -1.295574362086e-11 1.300000000000e+01 1.227545756241e-03 0.000000000000e+00 -1.227545743286e-03 -1.295574362086e-11 1.320000000000e+01 1.231320618069e-03 0.000000000000e+00 -1.231320605113e-03 -1.295574362086e-11 1.340000000000e+01 1.234983529487e-03 0.000000000000e+00 -1.234983516532e-03 -1.295574362086e-11 1.360000000000e+01 1.238539678188e-03 0.000000000000e+00 -1.238539665233e-03 -1.295574362086e-11 1.380000000000e+01 1.241993926345e-03 0.000000000000e+00 -1.241993913389e-03 -1.295574362086e-11 1.400000000000e+01 1.245350836098e-03 0.000000000000e+00 -1.245350823142e-03 -1.295574362086e-11 1.420000000000e+01 1.248614692674e-03 0.000000000000e+00 -1.248614679718e-03 -1.295574362086e-11 1.440000000000e+01 1.251789525387e-03 0.000000000000e+00 -1.251789512431e-03 -1.295574362086e-11 1.460000000000e+01 1.254879126748e-03 0.000000000000e+00 -1.254879113792e-03 -1.295574362086e-11 1.480000000000e+01 1.257887069872e-03 0.000000000000e+00 -1.257887056916e-03 -1.295574362086e-11 1.500000000000e+01 1.260816724367e-03 0.000000000000e+00 -1.260816711411e-03 -1.295574362086e-11 1.520000000000e+01 1.263671270850e-03 0.000000000000e+00 -1.263671257894e-03 -1.295574362086e-11 1.540000000000e+01 1.266453714226e-03 0.000000000000e+00 -1.266453701270e-03 -1.295574362086e-11 1.560000000000e+01 1.269166895859e-03 0.000000000000e+00 -1.269166882903e-03 -1.295574362086e-11 1.580000000000e+01 1.271813504736e-03 0.000000000000e+00 -1.271813491780e-03 -1.295574362086e-11 1.600000000000e+01 1.274396087717e-03 0.000000000000e+00 -1.274396074761e-03 -1.295574362086e-11 1.620000000000e+01 1.276917058968e-03 0.000000000000e+00 -1.276917046012e-03 -1.295574362086e-11 1.640000000000e+01 1.279378708643e-03 0.000000000000e+00 -1.279378695687e-03 -1.295574362086e-11 1.660000000000e+01 1.281783210884e-03 0.000000000000e+00 -1.281783197928e-03 -1.295574362086e-11 1.680000000000e+01 1.284132631209e-03 0.000000000000e+00 -1.284132618253e-03 -1.295574362086e-11 1.700000000000e+01 1.286428933334e-03 0.000000000000e+00 -1.286428920378e-03 -1.295574362086e-11 1.720000000000e+01 1.288673985484e-03 0.000000000000e+00 -1.288673972529e-03 -1.295574362086e-11 1.740000000000e+01 1.290869566235e-03 0.000000000000e+00 -1.290869553279e-03 -1.295574362086e-11 1.760000000000e+01 1.293017369924e-03 0.000000000000e+00 -1.293017356968e-03 -1.295574362086e-11 1.780000000000e+01 1.295119011677e-03 0.000000000000e+00 -1.295118998721e-03 -1.295574362086e-11 1.800000000000e+01 1.297176032069e-03 0.000000000000e+00 -1.297176019113e-03 -1.295574362086e-11 1.820000000000e+01 1.299189901458e-03 0.000000000000e+00 -1.299189888502e-03 -1.295574362086e-11 1.840000000000e+01 1.301162024018e-03 0.000000000000e+00 -1.301162011062e-03 -1.295574362086e-11 1.860000000000e+01 1.303093741494e-03 0.000000000000e+00 -1.303093728538e-03 -1.295574362086e-11 1.880000000000e+01 1.304986336699e-03 0.000000000000e+00 -1.304986323743e-03 -1.295574362086e-11 1.900000000000e+01 1.306841036779e-03 0.000000000000e+00 -1.306841023823e-03 -1.295574362086e-11 1.920000000000e+01 1.308659016259e-03 0.000000000000e+00 -1.308659003303e-03 -1.295574362086e-11 1.940000000000e+01 1.310441399889e-03 0.000000000000e+00 -1.310441386934e-03 -1.295574362086e-11 1.960000000000e+01 1.312189265307e-03 0.000000000000e+00 -1.312189252352e-03 -1.295574362086e-11 1.980000000000e+01 1.313903645528e-03 0.000000000000e+00 -1.313903632572e-03 -1.295574362086e-11 2.000000000000e+01 1.315585531274e-03 0.000000000000e+00 -1.315585518318e-03 -1.295574362086e-11 1.000000000000e+00 1.346869617265e-06 0.000000000000e+00 -1.346856658521e-06 -1.295874362086e-11 1.200000000000e+00 5.758009204104e-06 0.000000000000e+00 -5.757996245361e-06 -1.295874362086e-11 1.400000000000e+00 1.513776732236e-05 0.000000000000e+00 -1.513775436362e-05 -1.295874362086e-11 1.600000000000e+00 3.035451721947e-05 0.000000000000e+00 -3.035450426073e-05 -1.295874362086e-11 1.800000000000e+00 5.183213496104e-05 0.000000000000e+00 -5.183212200230e-05 -1.295874362086e-11 2.000000000000e+00 7.975393232082e-05 0.000000000000e+00 -7.975391936208e-05 -1.295874362086e-11 2.200000000000e+00 1.141458167241e-04 0.000000000000e+00 -1.141458037654e-04 -1.295874362086e-11 2.400000000000e+00 1.549192584640e-04 0.000000000000e+00 -1.549192455052e-04 -1.295874362086e-11 2.600000000000e+00 2.018987854840e-04 0.000000000000e+00 -2.018987725252e-04 -1.295874362086e-11 2.800000000000e+00 2.548422649417e-04 0.000000000000e+00 -2.548422519829e-04 -1.295874362086e-11 3.000000000000e+00 3.134571097084e-04 0.000000000000e+00 -3.134570967496e-04 -1.295874362086e-11 3.200000000000e+00 3.774137266664e-04 0.000000000000e+00 -3.774137137077e-04 -1.295874362086e-11 3.400000000000e+00 4.463568140425e-04 0.000000000000e+00 -4.463568010838e-04 -1.295874362086e-11 3.600000000000e+00 5.199148343812e-04 0.000000000000e+00 -5.199148214225e-04 -1.295874362086e-11 3.800000000000e+00 5.977078787249e-04 0.000000000000e+00 -5.977078657662e-04 -1.295874362086e-11 4.000000000000e+00 6.793539552706e-04 0.000000000000e+00 -6.793539423119e-04 -1.295874362086e-11 4.200000000000e+00 7.644716459331e-04 0.000000000000e+00 -7.644716329744e-04 -1.295874362086e-11 4.400000000000e+00 8.526450938771e-04 0.000000000000e+00 -8.526450809184e-04 -1.295874362086e-11 4.600000000000e+00 9.430408934064e-04 0.000000000000e+00 -9.430408804476e-04 -1.295874362086e-11 4.800000000000e+00 1.033840792745e-03 0.000000000000e+00 -1.033840779787e-03 -1.295874362086e-11 5.000000000000e+00 1.123278325868e-03 0.000000000000e+00 -1.123278312909e-03 -1.295874362086e-11 5.200000000000e+00 1.210115767059e-03 0.000000000000e+00 -1.210115754101e-03 -1.295874362086e-11 5.400000000000e+00 1.293449811025e-03 0.000000000000e+00 -1.293449798066e-03 -1.295874362086e-11 5.600000000000e+00 1.372635636752e-03 0.000000000000e+00 -1.372635623793e-03 -1.295874362086e-11 5.800000000000e+00 1.447261183247e-03 0.000000000000e+00 -1.447261170288e-03 -1.295874362086e-11 6.000000000000e+00 1.517120955388e-03 0.000000000000e+00 -1.517120942429e-03 -1.295874362086e-11 6.200000000000e+00 1.582180859741e-03 0.000000000000e+00 -1.582180846782e-03 -1.295874362086e-11 6.400000000000e+00 1.642538604975e-03 0.000000000000e+00 -1.642538592016e-03 -1.295874362086e-11 6.600000000000e+00 1.698385600661e-03 0.000000000000e+00 -1.698385587702e-03 -1.295874362086e-11 6.800000000000e+00 1.749974008356e-03 0.000000000000e+00 -1.749973995397e-03 -1.295874362086e-11 7.000000000000e+00 1.797590294837e-03 0.000000000000e+00 -1.797590281878e-03 -1.295874362086e-11 7.200000000000e+00 1.841535219034e-03 0.000000000000e+00 -1.841535206075e-03 -1.295874362086e-11 7.400000000000e+00 1.882109491627e-03 0.000000000000e+00 -1.882109478668e-03 -1.295874362086e-11 7.600000000000e+00 1.919604088364e-03 0.000000000000e+00 -1.919604075405e-03 -1.295874362086e-11 7.800000000000e+00 1.954294179376e-03 0.000000000000e+00 -1.954294166418e-03 -1.295874362086e-11 8.000000000000e+00 1.986435741108e-03 0.000000000000e+00 -1.986435728149e-03 -1.295874362086e-11 8.200000000000e+00 2.016264073909e-03 0.000000000000e+00 -2.016264060950e-03 -1.295874362086e-11 8.400000000000e+00 2.043993614021e-03 0.000000000000e+00 -2.043993601062e-03 -1.295874362086e-11 8.600000000000e+00 2.069818579899e-03 0.000000000000e+00 -2.069818566940e-03 -1.295874362086e-11 8.800000000000e+00 2.093914119481e-03 0.000000000000e+00 -2.093914106523e-03 -1.295874362086e-11 9.000000000000e+00 2.116437724968e-03 0.000000000000e+00 -2.116437712009e-03 -1.295874362086e-11 9.200000000000e+00 2.137530757251e-03 0.000000000000e+00 -2.137530744293e-03 -1.295874362086e-11 9.400000000000e+00 2.157319977314e-03 0.000000000000e+00 -2.157319964356e-03 -1.295874362086e-11 9.600000000000e+00 2.175919021076e-03 0.000000000000e+00 -2.175919008117e-03 -1.295874362086e-11 9.800000000000e+00 2.193429781212e-03 0.000000000000e+00 -2.193429768253e-03 -1.295874362086e-11 1.000000000000e+01 2.209943677693e-03 0.000000000000e+00 -2.209943664734e-03 -1.295874362086e-11 1.020000000000e+01 2.225542810638e-03 0.000000000000e+00 -2.225542797680e-03 -1.295874362086e-11 1.040000000000e+01 2.240300996577e-03 0.000000000000e+00 -2.240300983618e-03 -1.295874362086e-11 1.060000000000e+01 2.254284693643e-03 0.000000000000e+00 -2.254284680684e-03 -1.295874362086e-11 1.080000000000e+01 2.267553823667e-03 0.000000000000e+00 -2.267553810708e-03 -1.295874362086e-11 1.100000000000e+01 2.280162500230e-03 0.000000000000e+00 -2.280162487271e-03 -1.295874362086e-11 1.120000000000e+01 2.292159672009e-03 0.000000000000e+00 -2.292159659050e-03 -1.295874362086e-11 1.140000000000e+01 2.303589690497e-03 0.000000000000e+00 -2.303589677539e-03 -1.295874362086e-11 1.160000000000e+01 2.314492810630e-03 0.000000000000e+00 -2.314492797671e-03 -1.295874362086e-11 1.180000000000e+01 2.324905632172e-03 0.000000000000e+00 -2.324905619213e-03 -1.295874362086e-11 1.200000000000e+01 2.334861488959e-03 0.000000000000e+00 -2.334861476000e-03 -1.295874362086e-11 1.220000000000e+01 2.344390792334e-03 0.000000000000e+00 -2.344390779376e-03 -1.295874362086e-11 1.240000000000e+01 2.353521334419e-03 0.000000000000e+00 -2.353521321461e-03 -1.295874362086e-11 1.260000000000e+01 2.362278556172e-03 0.000000000000e+00 -2.362278543213e-03 -1.295874362086e-11 1.280000000000e+01 2.370685784600e-03 0.000000000000e+00 -2.370685771641e-03 -1.295874362086e-11 1.300000000000e+01 2.378764442934e-03 0.000000000000e+00 -2.378764429976e-03 -1.295874362086e-11 1.320000000000e+01 2.386534237112e-03 0.000000000000e+00 -2.386534224154e-03 -1.295874362086e-11 1.340000000000e+01 2.394013321458e-03 0.000000000000e+00 -2.394013308500e-03 -1.295874362086e-11 1.360000000000e+01 2.401218446114e-03 0.000000000000e+00 -2.401218433155e-03 -1.295874362086e-11 1.380000000000e+01 2.408165112497e-03 0.000000000000e+00 -2.408165099538e-03 -1.295874362086e-11 1.400000000000e+01 2.414867591463e-03 0.000000000000e+00 -2.414867578504e-03 -1.295874362086e-11 1.420000000000e+01 2.421339181314e-03 0.000000000000e+00 -2.421339168355e-03 -1.295874362086e-11 1.440000000000e+01 2.427592196227e-03 0.000000000000e+00 -2.427592183269e-03 -1.295874362086e-11 1.460000000000e+01 2.433638077641e-03 0.000000000000e+00 -2.433638064682e-03 -1.295874362086e-11 1.480000000000e+01 2.439487469852e-03 0.000000000000e+00 -2.439487456893e-03 -1.295874362086e-11 1.500000000000e+01 2.445150287984e-03 0.000000000000e+00 -2.445150275025e-03 -1.295874362086e-11 1.520000000000e+01 2.450635779214e-03 0.000000000000e+00 -2.450635766256e-03 -1.295874362086e-11 1.540000000000e+01 2.455952578014e-03 0.000000000000e+00 -2.455952565055e-03 -1.295874362086e-11 1.560000000000e+01 2.461108756052e-03 0.000000000000e+00 -2.461108743094e-03 -1.295874362086e-11 1.580000000000e+01 2.466111867355e-03 0.000000000000e+00 -2.466111854396e-03 -1.295874362086e-11 1.600000000000e+01 2.470968989216e-03 0.000000000000e+00 -2.470968976258e-03 -1.295874362086e-11 1.620000000000e+01 2.475686759330e-03 0.000000000000e+00 -2.475686746371e-03 -1.295874362086e-11 1.640000000000e+01 2.480271409518e-03 0.000000000000e+00 -2.480271396559e-03 -1.295874362086e-11 1.660000000000e+01 2.484728796426e-03 0.000000000000e+00 -2.484728783467e-03 -1.295874362086e-11 1.680000000000e+01 2.489064429486e-03 0.000000000000e+00 -2.489064416527e-03 -1.295874362086e-11 1.700000000000e+01 2.493283496428e-03 0.000000000000e+00 -2.493283483469e-03 -1.295874362086e-11 1.720000000000e+01 2.497390886578e-03 0.000000000000e+00 -2.497390873620e-03 -1.295874362086e-11 1.740000000000e+01 2.501391212173e-03 0.000000000000e+00 -2.501391199214e-03 -1.295874362086e-11 1.760000000000e+01 2.505288827868e-03 0.000000000000e+00 -2.505288814910e-03 -1.295874362086e-11 1.780000000000e+01 2.509087848637e-03 0.000000000000e+00 -2.509087835678e-03 -1.295874362086e-11 1.800000000000e+01 2.512792166183e-03 0.000000000000e+00 -2.512792153224e-03 -1.295874362086e-11 1.820000000000e+01 2.516405464033e-03 0.000000000000e+00 -2.516405451074e-03 -1.295874362086e-11 1.840000000000e+01 2.519931231419e-03 0.000000000000e+00 -2.519931218460e-03 -1.295874362086e-11 1.860000000000e+01 2.523372776060e-03 0.000000000000e+00 -2.523372763102e-03 -1.295874362086e-11 1.880000000000e+01 2.526733235952e-03 0.000000000000e+00 -2.526733222993e-03 -1.295874362086e-11 1.900000000000e+01 2.530015590243e-03 0.000000000000e+00 -2.530015577284e-03 -1.295874362086e-11 1.920000000000e+01 2.533222669283e-03 0.000000000000e+00 -2.533222656324e-03 -1.295874362086e-11 1.940000000000e+01 2.536357163921e-03 0.000000000000e+00 -2.536357150962e-03 -1.295874362086e-11 1.960000000000e+01 2.539421634107e-03 0.000000000000e+00 -2.539421621149e-03 -1.295874362086e-11 1.980000000000e+01 2.542418516866e-03 0.000000000000e+00 -2.542418503908e-03 -1.295874362086e-11 2.000000000000e+01 2.545350133691e-03 0.000000000000e+00 -2.545350120732e-03 -1.295874362086e-11 1.000000000000e+00 1.441759376031e-06 0.000000000000e+00 -1.441746412286e-06 -1.296374362086e-11 1.200000000000e+00 6.040393832454e-06 0.000000000000e+00 -6.040380868710e-06 -1.296374362086e-11 1.400000000000e+00 1.569631118271e-05 0.000000000000e+00 -1.569629821896e-05 -1.296374362086e-11 1.600000000000e+00 3.126090342162e-05 0.000000000000e+00 -3.126089045787e-05 -1.296374362086e-11 1.800000000000e+00 5.314642267362e-05 0.000000000000e+00 -5.314640970987e-05 -1.296374362086e-11 2.000000000000e+00 8.152647029863e-05 0.000000000000e+00 -8.152645733489e-05 -1.296374362086e-11 2.200000000000e+00 1.164182127044e-04 0.000000000000e+00 -1.164181997407e-04 -1.296374362086e-11 2.400000000000e+00 1.577252908935e-04 0.000000000000e+00 -1.577252779298e-04 -1.296374362086e-11 2.600000000000e+00 2.052655568578e-04 0.000000000000e+00 -2.052655438940e-04 -1.296374362086e-11 2.800000000000e+00 2.587917371032e-04 0.000000000000e+00 -2.587917241394e-04 -1.296374362086e-11 3.000000000000e+00 3.180080740204e-04 0.000000000000e+00 -3.180080610567e-04 -1.296374362086e-11 3.200000000000e+00 3.825842248976e-04 0.000000000000e+00 -3.825842119339e-04 -1.296374362086e-11 3.400000000000e+00 4.521669881042e-04 0.000000000000e+00 -4.521669751404e-04 -1.296374362086e-11 3.600000000000e+00 5.263901398885e-04 0.000000000000e+00 -5.263901269248e-04 -1.296374362086e-11 3.800000000000e+00 6.048825599274e-04 0.000000000000e+00 -6.048825469637e-04 -1.296374362086e-11 4.000000000000e+00 6.872747485733e-04 0.000000000000e+00 -6.872747356096e-04 -1.296374362086e-11 4.200000000000e+00 7.732039567405e-04 0.000000000000e+00 -7.732039437767e-04 -1.296374362086e-11 4.400000000000e+00 8.623179585298e-04 0.000000000000e+00 -8.623179455661e-04 -1.296374362086e-11 4.600000000000e+00 9.542777008834e-04 0.000000000000e+00 -9.542776879196e-04 -1.296374362086e-11 4.800000000000e+00 1.048758952827e-03 0.000000000000e+00 -1.048758939863e-03 -1.296374362086e-11 5.000000000000e+00 1.145453113699e-03 0.000000000000e+00 -1.145453100735e-03 -1.296374362086e-11 5.200000000000e+00 1.244067324162e-03 0.000000000000e+00 -1.244067311199e-03 -1.296374362086e-11 5.400000000000e+00 1.344323976092e-03 0.000000000000e+00 -1.344323963128e-03 -1.296374362086e-11 5.600000000000e+00 1.445959357275e-03 0.000000000000e+00 -1.445959344311e-03 -1.296374362086e-11 5.800000000000e+00 1.548717338815e-03 0.000000000000e+00 -1.548717325851e-03 -1.296374362086e-11 6.000000000000e+00 1.652292398132e-03 0.000000000000e+00 -1.652292385168e-03 -1.296374362086e-11 6.200000000000e+00 1.756054586403e-03 0.000000000000e+00 -1.756054573439e-03 -1.296374362086e-11 6.400000000000e+00 1.859016773512e-03 0.000000000000e+00 -1.859016760549e-03 -1.296374362086e-11 6.600000000000e+00 1.960318534958e-03 0.000000000000e+00 -1.960318521994e-03 -1.296374362086e-11 6.800000000000e+00 2.059269431575e-03 0.000000000000e+00 -2.059269418611e-03 -1.296374362086e-11 7.000000000000e+00 2.155274736386e-03 0.000000000000e+00 -2.155274723423e-03 -1.296374362086e-11 7.200000000000e+00 2.247818301166e-03 0.000000000000e+00 -2.247818288202e-03 -1.296374362086e-11 7.400000000000e+00 2.336468766967e-03 0.000000000000e+00 -2.336468754004e-03 -1.296374362086e-11 7.600000000000e+00 2.420890518564e-03 0.000000000000e+00 -2.420890505601e-03 -1.296374362086e-11 7.800000000000e+00 2.500851157884e-03 0.000000000000e+00 -2.500851144920e-03 -1.296374362086e-11 8.000000000000e+00 2.576222019049e-03 0.000000000000e+00 -2.576222006085e-03 -1.296374362086e-11 8.200000000000e+00 2.646971454033e-03 0.000000000000e+00 -2.646971441069e-03 -1.296374362086e-11 8.400000000000e+00 2.713152628172e-03 0.000000000000e+00 -2.713152615209e-03 -1.296374362086e-11 8.600000000000e+00 2.774888260981e-03 0.000000000000e+00 -2.774888248017e-03 -1.296374362086e-11 8.800000000000e+00 2.832354505657e-03 0.000000000000e+00 -2.832354492693e-03 -1.296374362086e-11 9.000000000000e+00 2.885765544921e-03 0.000000000000e+00 -2.885765531957e-03 -1.296374362086e-11 9.200000000000e+00 2.935359865433e-03 0.000000000000e+00 -2.935359852469e-03 -1.296374362086e-11 9.400000000000e+00 2.981388690200e-03 0.000000000000e+00 -2.981388677237e-03 -1.296374362086e-11 9.600000000000e+00 3.024106704648e-03 0.000000000000e+00 -3.024106691685e-03 -1.296374362086e-11 9.800000000000e+00 3.063764982191e-03 0.000000000000e+00 -3.063764969228e-03 -1.296374362086e-11 1.000000000000e+01 3.100605875394e-03 0.000000000000e+00 -3.100605862431e-03 -1.296374362086e-11 1.020000000000e+01 3.134859569336e-03 0.000000000000e+00 -3.134859556372e-03 -1.296374362086e-11 1.040000000000e+01 3.166741976016e-03 0.000000000000e+00 -3.166741963052e-03 -1.296374362086e-11 1.060000000000e+01 3.196453665355e-03 0.000000000000e+00 -3.196453652391e-03 -1.296374362086e-11 1.080000000000e+01 3.224179564628e-03 0.000000000000e+00 -3.224179551664e-03 -1.296374362086e-11 1.100000000000e+01 3.250089202700e-03 0.000000000000e+00 -3.250089189736e-03 -1.296374362086e-11 1.120000000000e+01 3.274337320598e-03 0.000000000000e+00 -3.274337307634e-03 -1.296374362086e-11 1.140000000000e+01 3.297064711179e-03 0.000000000000e+00 -3.297064698216e-03 -1.296374362086e-11 1.160000000000e+01 3.318399185929e-03 0.000000000000e+00 -3.318399172965e-03 -1.296374362086e-11 1.180000000000e+01 3.338456595572e-03 0.000000000000e+00 -3.338456582608e-03 -1.296374362086e-11 1.200000000000e+01 3.357341853713e-03 0.000000000000e+00 -3.357341840749e-03 -1.296374362086e-11 1.220000000000e+01 3.375149929782e-03 0.000000000000e+00 -3.375149916818e-03 -1.296374362086e-11 1.240000000000e+01 3.391966790211e-03 0.000000000000e+00 -3.391966777248e-03 -1.296374362086e-11 1.260000000000e+01 3.407870275872e-03 0.000000000000e+00 -3.407870262908e-03 -1.296374362086e-11 1.280000000000e+01 3.422930910175e-03 0.000000000000e+00 -3.422930897211e-03 -1.296374362086e-11 1.300000000000e+01 3.437212636608e-03 0.000000000000e+00 -3.437212623644e-03 -1.296374362086e-11 1.320000000000e+01 3.450773487308e-03 0.000000000000e+00 -3.450773474344e-03 -1.296374362086e-11 1.340000000000e+01 3.463666186046e-03 0.000000000000e+00 -3.463666173082e-03 -1.296374362086e-11 1.360000000000e+01 3.475938690024e-03 0.000000000000e+00 -3.475938677060e-03 -1.296374362086e-11 1.380000000000e+01 3.487634675345e-03 0.000000000000e+00 -3.487634662381e-03 -1.296374362086e-11 1.400000000000e+01 3.498793971185e-03 0.000000000000e+00 -3.498793958221e-03 -1.296374362086e-11 1.420000000000e+01 3.509452947572e-03 0.000000000000e+00 -3.509452934608e-03 -1.296374362086e-11 1.440000000000e+01 3.519644861466e-03 0.000000000000e+00 -3.519644848503e-03 -1.296374362086e-11 1.460000000000e+01 3.529400165509e-03 0.000000000000e+00 -3.529400152545e-03 -1.296374362086e-11 1.480000000000e+01 3.538746783453e-03 0.000000000000e+00 -3.538746770489e-03 -1.296374362086e-11 1.500000000000e+01 3.547710355936e-03 0.000000000000e+00 -3.547710342972e-03 -1.296374362086e-11 1.520000000000e+01 3.556314459889e-03 0.000000000000e+00 -3.556314446925e-03 -1.296374362086e-11 1.540000000000e+01 3.564580804523e-03 0.000000000000e+00 -3.564580791560e-03 -1.296374362086e-11 1.560000000000e+01 3.572529406549e-03 0.000000000000e+00 -3.572529393585e-03 -1.296374362086e-11 1.580000000000e+01 3.580178746950e-03 0.000000000000e+00 -3.580178733987e-03 -1.296374362086e-11 1.600000000000e+01 3.587545911409e-03 0.000000000000e+00 -3.587545898446e-03 -1.296374362086e-11 1.620000000000e+01 3.594646716211e-03 0.000000000000e+00 -3.594646703247e-03 -1.296374362086e-11 1.640000000000e+01 3.601495854005e-03 0.000000000000e+00 -3.601495841041e-03 -1.296374362086e-11 1.660000000000e+01 3.608106860784e-03 0.000000000000e+00 -3.608106847820e-03 -1.296374362086e-11 1.680000000000e+01 3.614492414980e-03 0.000000000000e+00 -3.614492402016e-03 -1.296374362086e-11 1.700000000000e+01 3.620664277121e-03 0.000000000000e+00 -3.620664264157e-03 -1.296374362086e-11 1.720000000000e+01 3.626633400844e-03 0.000000000000e+00 -3.626633387881e-03 -1.296374362086e-11 1.740000000000e+01 3.632410000013e-03 0.000000000000e+00 -3.632409987049e-03 -1.296374362086e-11 1.760000000000e+01 3.638003609337e-03 0.000000000000e+00 -3.638003596374e-03 -1.296374362086e-11 1.780000000000e+01 3.643423139278e-03 0.000000000000e+00 -3.643423126314e-03 -1.296374362086e-11 1.800000000000e+01 3.648676925809e-03 0.000000000000e+00 -3.648676912846e-03 -1.296374362086e-11 1.820000000000e+01 3.653772775589e-03 0.000000000000e+00 -3.653772762625e-03 -1.296374362086e-11 1.840000000000e+01 3.658718007006e-03 0.000000000000e+00 -3.658717994042e-03 -1.296374362086e-11 1.860000000000e+01 3.663519487528e-03 0.000000000000e+00 -3.663519474564e-03 -1.296374362086e-11 1.880000000000e+01 3.668183667727e-03 0.000000000000e+00 -3.668183654763e-03 -1.296374362086e-11 1.900000000000e+01 3.672716612306e-03 0.000000000000e+00 -3.672716599342e-03 -1.296374362086e-11 1.920000000000e+01 3.677124028439e-03 0.000000000000e+00 -3.677124015476e-03 -1.296374362086e-11 1.940000000000e+01 3.681411291673e-03 0.000000000000e+00 -3.681411278709e-03 -1.296374362086e-11 1.960000000000e+01 3.685583469634e-03 0.000000000000e+00 -3.685583456671e-03 -1.296374362086e-11 1.980000000000e+01 3.689645343759e-03 0.000000000000e+00 -3.689645330795e-03 -1.296374362086e-11 2.000000000000e+01 3.693601429213e-03 0.000000000000e+00 -3.693601416249e-03 -1.296374362086e-11 ngspice-26/tests/hisimhv1/nmos/reference/acVd.standard0000644000265600020320000000640612264261473022442 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 1 6.664005290595e-05 1.957552766278e-04 3.92262692573189e-14 2.17231656538094e-14 2 1.474167443111e-04 9.203439373515e-05 4.31958429892987e-14 1.73103967800895e-14 3 2.160923720096e-04 2.877191922786e-05 4.34409035483287e-14 1.23101251683196e-14 4 2.535657413096e-04 3.246458763948e-06 4.35008495549587e-14 1.09985263040597e-14 5 2.588750747751e-04 4.081065631443e-07 4.29633134637987e-14 9.89588404998371e-15 6 2.591365358786e-04 3.340858985181e-07 3.96423103339988e-14 5.63114650697983e-15 7 2.593374287687e-04 2.877803609803e-07 3.83391863598889e-14 3.97309096762688e-15 8 2.594995777214e-04 2.568627351113e-07 3.78463265255689e-14 3.2901022781119e-15 9 2.596358731017e-04 2.350005054859e-07 3.75847493401689e-14 2.89368162253692e-15 10 2.597543028702e-04 2.187374688643e-07 3.74248938520189e-14 2.62693622536392e-15 11 2.598598839457e-04 2.061226441432e-07 3.73195812597589e-14 2.43174822282293e-15 12 2.599558678114e-04 1.960022267871e-07 3.72471280878789e-14 2.28095125775093e-15 13 2.600444387792e-04 1.876605853941e-07 3.71960593214589e-14 2.15992336962894e-15 14 2.601271166308e-04 1.806337451654e-07 3.71596931527689e-14 2.06000386164594e-15 15 2.602049935042e-04 1.746087126002e-07 3.71338592555289e-14 1.97569329399694e-15 16 2.602788772916e-04 1.693668418995e-07 3.71158137573389e-14 1.90330951010694e-15 17 2.603493811430e-04 1.647506669031e-07 3.71036747849089e-14 1.84028192675595e-15 18 2.604169810345e-04 1.606437306979e-07 3.70961076492989e-14 1.78475424705795e-15 19 2.604820538614e-04 1.569578890916e-07 3.70921392090989e-14 1.73534798889095e-15 20 2.605449033172e-04 1.536250646603e-07 3.70910432971989e-14 1.69101515734695e-15 1 4.619108398271e-05 1.358479234909e-04 3.60505541265089e-14 2.32859148911193e-14 2 9.807243449033e-05 6.147088110671e-05 4.01790327872288e-14 1.74941479048895e-14 3 1.379218736578e-04 2.024509033547e-05 4.10742986517788e-14 1.24030481180696e-14 4 1.587327514119e-04 4.237941439282e-06 4.11503618634588e-14 1.08588520231597e-14 5 1.652054601727e-04 4.064887530837e-07 4.04999263950088e-14 9.08419393878173e-15 6 1.656298544658e-04 2.233532013105e-07 3.84189968052889e-14 5.08197511959685e-15 7 1.657504775793e-04 1.928527688153e-07 3.77944608388389e-14 3.80072491753389e-15 8 1.658468776776e-04 1.732440043873e-07 3.75286371610189e-14 3.20656006252991e-15 9 1.659291359438e-04 1.592490819976e-07 3.73808775611889e-14 2.84588345826992e-15 10 1.660016007109e-04 1.487263286019e-07 3.72881726319089e-14 2.59730540815192e-15 11 1.660669523285e-04 1.404849892891e-07 3.72259642452589e-14 2.41266631811993e-15 12 1.661269343918e-04 1.338178507070e-07 3.71825137145989e-14 2.26854681023293e-15 13 1.661827258528e-04 1.282831533092e-07 3.71514466209989e-14 2.15200911872394e-15 14 1.662351527883e-04 1.235922986604e-07 3.71289826996889e-14 2.05524661136794e-15 15 1.662848130877e-04 1.195491355966e-07 3.71127301513789e-14 1.97323264250994e-15 16 1.663321521885e-04 1.160156563599e-07 3.71010985780289e-14 1.90256486811794e-15 17 1.663775105355e-04 1.128917996569e-07 3.70929880089389e-14 1.84084726139995e-15 18 1.664211542317e-04 1.101030996436e-07 3.70876129646089e-14 1.78633716138695e-15 19 1.664632954031e-04 1.075928677098e-07 3.70843975030689e-14 1.73773271435095e-15 20 1.665041060895e-04 1.053170867999e-07 3.70829098190189e-14 1.69403915030495e-15 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Id1_vb0.standard0000644000265600020320000024357112264261473023737 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.460420951468e-05 0.000000000000e+00 -5.460420951368e-05 -1.000000000000e-15 1.200000000000e+00 5.472189415421e-05 0.000000000000e+00 -5.472189415301e-05 -1.200000000000e-15 1.400000000000e+00 5.482883580702e-05 0.000000000000e+00 -5.482883580562e-05 -1.400000000000e-15 1.600000000000e+00 5.492862307513e-05 0.000000000000e+00 -5.492862307353e-05 -1.600000000000e-15 1.800000000000e+00 5.502327936220e-05 0.000000000000e+00 -5.502327936040e-05 -1.800000000000e-15 2.000000000000e+00 5.511404000809e-05 0.000000000000e+00 -5.511404000609e-05 -2.000000000000e-15 2.200000000000e+00 5.520171406810e-05 0.000000000000e+00 -5.520171406590e-05 -2.200000000000e-15 2.400000000000e+00 5.528686290157e-05 0.000000000000e+00 -5.528686289917e-05 -2.400000000000e-15 2.600000000000e+00 5.536989450914e-05 0.000000000000e+00 -5.536989450654e-05 -2.600000000000e-15 2.800000000000e+00 5.545111667068e-05 0.000000000000e+00 -5.545111666788e-05 -2.800000000000e-15 3.000000000000e+00 5.553076863831e-05 0.000000000000e+00 -5.553076863531e-05 -3.000000000000e-15 3.200000000000e+00 5.560904100179e-05 0.000000000000e+00 -5.560904099859e-05 -3.200000000000e-15 3.400000000000e+00 5.568608868419e-05 0.000000000000e+00 -5.568608868079e-05 -3.400000000000e-15 3.600000000000e+00 5.576203976119e-05 0.000000000000e+00 -5.576203975759e-05 -3.600000000000e-15 3.800000000000e+00 5.583700163774e-05 0.000000000000e+00 -5.583700163394e-05 -3.800000000000e-15 4.000000000000e+00 5.591106549316e-05 0.000000000000e+00 -5.591106548916e-05 -4.000000000000e-15 4.200000000000e+00 5.598430955633e-05 0.000000000000e+00 -5.598430955213e-05 -4.200000000000e-15 4.400000000000e+00 5.605680156889e-05 0.000000000000e+00 -5.605680156449e-05 -4.400000000000e-15 4.600000000000e+00 5.612860067134e-05 0.000000000000e+00 -5.612860066674e-05 -4.600000000000e-15 4.800000000000e+00 5.619975887035e-05 0.000000000000e+00 -5.619975886555e-05 -4.800000000000e-15 5.000000000000e+00 5.627032219644e-05 0.000000000000e+00 -5.627032219144e-05 -5.000000000000e-15 5.200000000000e+00 5.634033162887e-05 0.000000000000e+00 -5.634033162367e-05 -5.200000000000e-15 5.400000000000e+00 5.640982384297e-05 0.000000000000e+00 -5.640982383757e-05 -5.400000000000e-15 5.600000000000e+00 5.647883182008e-05 0.000000000000e+00 -5.647883181448e-05 -5.600000000000e-15 5.800000000000e+00 5.654738535000e-05 0.000000000000e+00 -5.654738534420e-05 -5.800000000000e-15 6.000000000000e+00 5.661551144843e-05 0.000000000000e+00 -5.661551144243e-05 -6.000000000000e-15 6.200000000000e+00 5.668323470629e-05 0.000000000000e+00 -5.668323470009e-05 -6.200000000000e-15 6.400000000000e+00 5.675057758430e-05 0.000000000000e+00 -5.675057757789e-05 -6.400000000000e-15 6.600000000000e+00 5.681756066282e-05 0.000000000000e+00 -5.681756065622e-05 -6.600000000000e-15 6.800000000000e+00 5.688420285520e-05 0.000000000000e+00 -5.688420284840e-05 -6.800000000000e-15 7.000000000000e+00 5.695052159075e-05 0.000000000000e+00 -5.695052158375e-05 -7.000000000000e-15 7.200000000000e+00 5.701653297277e-05 0.000000000000e+00 -5.701653296557e-05 -7.200000000000e-15 7.400000000000e+00 5.708225191539e-05 0.000000000000e+00 -5.708225190800e-05 -7.400000000000e-15 7.600000000000e+00 5.714769226283e-05 0.000000000000e+00 -5.714769225523e-05 -7.600000000000e-15 7.800000000000e+00 5.721286689360e-05 0.000000000000e+00 -5.721286688580e-05 -7.800000000000e-15 8.000000000000e+00 5.727778781210e-05 0.000000000000e+00 -5.727778780410e-05 -8.000000000000e-15 8.200000000000e+00 5.734246622922e-05 0.000000000000e+00 -5.734246622102e-05 -8.200000000000e-15 8.400000000000e+00 5.740691263370e-05 0.000000000000e+00 -5.740691262530e-05 -8.400000000000e-15 8.600000000000e+00 5.747113685538e-05 0.000000000000e+00 -5.747113684678e-05 -8.600000000000e-15 8.800000000000e+00 5.753514812153e-05 0.000000000000e+00 -5.753514811273e-05 -8.800000000000e-15 9.000000000000e+00 5.759895510716e-05 0.000000000000e+00 -5.759895509816e-05 -9.000000000000e-15 9.200000000000e+00 5.766256598000e-05 0.000000000000e+00 -5.766256597080e-05 -9.200000000000e-15 9.400000000000e+00 5.772598844090e-05 0.000000000000e+00 -5.772598843150e-05 -9.400000000000e-15 9.600000000000e+00 5.778922976021e-05 0.000000000000e+00 -5.778922975061e-05 -9.600000000000e-15 9.800000000000e+00 5.785229681055e-05 0.000000000000e+00 -5.785229680075e-05 -9.800000000000e-15 1.000000000000e+01 5.791519609649e-05 0.000000000000e+00 -5.791519608649e-05 -1.000000000000e-14 1.020000000000e+01 5.797793378143e-05 0.000000000000e+00 -5.797793377123e-05 -1.020000000000e-14 1.040000000000e+01 5.804051571197e-05 0.000000000000e+00 -5.804051570157e-05 -1.040000000000e-14 1.060000000000e+01 5.810294744014e-05 0.000000000000e+00 -5.810294742954e-05 -1.060000000000e-14 1.080000000000e+01 5.816523424366e-05 0.000000000000e+00 -5.816523423286e-05 -1.080000000000e-14 1.100000000000e+01 5.822738114440e-05 0.000000000000e+00 -5.822738113341e-05 -1.100000000000e-14 1.120000000000e+01 5.828939292536e-05 0.000000000000e+00 -5.828939291416e-05 -1.120000000000e-14 1.140000000000e+01 5.835127414609e-05 0.000000000000e+00 -5.835127413470e-05 -1.140000000000e-14 1.160000000000e+01 5.841302915706e-05 0.000000000000e+00 -5.841302914546e-05 -1.160000000000e-14 1.180000000000e+01 5.847466211265e-05 0.000000000000e+00 -5.847466210084e-05 -1.180000000000e-14 1.200000000000e+01 5.853617698325e-05 0.000000000000e+00 -5.853617697125e-05 -1.200000000000e-14 1.220000000000e+01 5.859757756642e-05 0.000000000000e+00 -5.859757755422e-05 -1.220000000000e-14 1.240000000000e+01 5.865886749712e-05 0.000000000000e+00 -5.865886748472e-05 -1.240000000000e-14 1.260000000000e+01 5.872005025727e-05 0.000000000000e+00 -5.872005024467e-05 -1.260000000000e-14 1.280000000000e+01 5.878112918449e-05 0.000000000000e+00 -5.878112917169e-05 -1.280000000000e-14 1.300000000000e+01 5.884210748033e-05 0.000000000000e+00 -5.884210746733e-05 -1.300000000000e-14 1.320000000000e+01 5.890298821782e-05 0.000000000000e+00 -5.890298820462e-05 -1.320000000000e-14 1.340000000000e+01 5.896377434853e-05 0.000000000000e+00 -5.896377433513e-05 -1.340000000000e-14 1.360000000000e+01 5.902446870913e-05 0.000000000000e+00 -5.902446869553e-05 -1.360000000000e-14 1.380000000000e+01 5.908507402748e-05 0.000000000000e+00 -5.908507401368e-05 -1.380000000000e-14 1.400000000000e+01 5.914559292838e-05 0.000000000000e+00 -5.914559291438e-05 -1.400000000000e-14 1.420000000000e+01 5.920602793887e-05 0.000000000000e+00 -5.920602792467e-05 -1.420000000000e-14 1.440000000000e+01 5.926638149319e-05 0.000000000000e+00 -5.926638147879e-05 -1.440000000000e-14 1.460000000000e+01 5.932665593747e-05 0.000000000000e+00 -5.932665592287e-05 -1.460000000000e-14 1.480000000000e+01 5.938685353407e-05 0.000000000000e+00 -5.938685351927e-05 -1.480000000000e-14 1.500000000000e+01 5.944697646567e-05 0.000000000000e+00 -5.944697645067e-05 -1.500000000000e-14 1.520000000000e+01 5.950702683912e-05 0.000000000000e+00 -5.950702682392e-05 -1.520000000000e-14 1.540000000000e+01 5.956700668904e-05 0.000000000000e+00 -5.956700667364e-05 -1.540000000000e-14 1.560000000000e+01 5.962691798119e-05 0.000000000000e+00 -5.962691796559e-05 -1.560000000000e-14 1.580000000000e+01 5.968676261567e-05 0.000000000000e+00 -5.968676259987e-05 -1.580000000000e-14 1.600000000000e+01 5.974654242992e-05 0.000000000000e+00 -5.974654241392e-05 -1.600000000000e-14 1.620000000000e+01 5.980625920154e-05 0.000000000000e+00 -5.980625918534e-05 -1.620000000000e-14 1.640000000000e+01 5.986591465095e-05 0.000000000000e+00 -5.986591463455e-05 -1.640000000000e-14 1.660000000000e+01 5.992551044393e-05 0.000000000000e+00 -5.992551042733e-05 -1.660000000000e-14 1.680000000000e+01 5.998504819396e-05 0.000000000000e+00 -5.998504817715e-05 -1.680000000000e-14 1.700000000000e+01 6.004452946448e-05 0.000000000000e+00 -6.004452944748e-05 -1.700000000000e-14 1.720000000000e+01 6.010395577102e-05 0.000000000000e+00 -6.010395575382e-05 -1.720000000000e-14 1.740000000000e+01 6.016332858321e-05 0.000000000000e+00 -6.016332856581e-05 -1.740000000000e-14 1.760000000000e+01 6.022264932665e-05 0.000000000000e+00 -6.022264930905e-05 -1.760000000000e-14 1.780000000000e+01 6.028191938474e-05 0.000000000000e+00 -6.028191936694e-05 -1.780000000000e-14 1.800000000000e+01 6.034114010041e-05 0.000000000000e+00 -6.034114008241e-05 -1.800000000000e-14 1.820000000000e+01 6.040031277767e-05 0.000000000000e+00 -6.040031275947e-05 -1.820000000000e-14 1.840000000000e+01 6.045943868323e-05 0.000000000000e+00 -6.045943866483e-05 -1.840000000000e-14 1.860000000000e+01 6.051851904791e-05 0.000000000000e+00 -6.051851902931e-05 -1.860000000000e-14 1.880000000000e+01 6.057755506804e-05 0.000000000000e+00 -6.057755504924e-05 -1.880000000000e-14 1.900000000000e+01 6.063654790679e-05 0.000000000000e+00 -6.063654788779e-05 -1.900000000000e-14 1.920000000000e+01 6.069549869543e-05 0.000000000000e+00 -6.069549867623e-05 -1.920000000000e-14 1.940000000000e+01 6.075440853449e-05 0.000000000000e+00 -6.075440851509e-05 -1.940000000000e-14 1.960000000000e+01 6.081327849497e-05 0.000000000000e+00 -6.081327847537e-05 -1.960000000000e-14 1.980000000000e+01 6.087210961936e-05 0.000000000000e+00 -6.087210959956e-05 -1.980000000000e-14 2.000000000000e+01 6.093090292269e-05 0.000000000000e+00 -6.093090290269e-05 -2.000000000000e-14 1.000000000000e+00 5.686755923392e-04 0.000000000000e+00 -5.686755923382e-04 -1.000000000000e-15 1.200000000000e+00 6.623851909426e-04 0.000000000000e+00 -6.623851909414e-04 -1.200000000000e-15 1.400000000000e+00 7.496108804226e-04 0.000000000000e+00 -7.496108804212e-04 -1.400000000000e-15 1.600000000000e+00 8.304611167072e-04 0.000000000000e+00 -8.304611167056e-04 -1.600000000000e-15 1.800000000000e+00 9.050552054503e-04 0.000000000000e+00 -9.050552054485e-04 -1.800000000000e-15 2.000000000000e+00 9.735258757606e-04 0.000000000000e+00 -9.735258757586e-04 -2.000000000000e-15 2.200000000000e+00 1.036023031236e-03 0.000000000000e+00 -1.036023031234e-03 -2.200000000000e-15 2.400000000000e+00 1.092717964156e-03 0.000000000000e+00 -1.092717964154e-03 -2.400000000000e-15 2.600000000000e+00 1.143807297804e-03 0.000000000000e+00 -1.143807297801e-03 -2.600000000000e-15 2.800000000000e+00 1.189515944815e-03 0.000000000000e+00 -1.189515944813e-03 -2.800000000000e-15 3.000000000000e+00 1.230098472088e-03 0.000000000000e+00 -1.230098472085e-03 -3.000000000000e-15 3.200000000000e+00 1.265838456934e-03 0.000000000000e+00 -1.265838456931e-03 -3.200000000000e-15 3.400000000000e+00 1.297045685658e-03 0.000000000000e+00 -1.297045685655e-03 -3.400000000000e-15 3.600000000000e+00 1.324051339981e-03 0.000000000000e+00 -1.324051339978e-03 -3.600000000000e-15 3.800000000000e+00 1.347201585719e-03 0.000000000000e+00 -1.347201585715e-03 -3.800000000000e-15 4.000000000000e+00 1.366850179322e-03 0.000000000000e+00 -1.366850179318e-03 -4.000000000000e-15 4.200000000000e+00 1.383350816039e-03 0.000000000000e+00 -1.383350816035e-03 -4.200000000000e-15 4.400000000000e+00 1.397049944428e-03 0.000000000000e+00 -1.397049944424e-03 -4.400000000000e-15 4.600000000000e+00 1.408280659526e-03 0.000000000000e+00 -1.408280659521e-03 -4.600000000000e-15 4.800000000000e+00 1.417358079505e-03 0.000000000000e+00 -1.417358079501e-03 -4.800000000000e-15 5.000000000000e+00 1.424576371274e-03 0.000000000000e+00 -1.424576371269e-03 -5.000000000000e-15 5.200000000000e+00 1.430207416204e-03 0.000000000000e+00 -1.430207416198e-03 -5.200000000000e-15 5.400000000000e+00 1.434501088165e-03 0.000000000000e+00 -1.434501088160e-03 -5.400000000000e-15 5.600000000000e+00 1.437687325377e-03 0.000000000000e+00 -1.437687325371e-03 -5.600000000000e-15 5.800000000000e+00 1.439980726925e-03 0.000000000000e+00 -1.439980726919e-03 -5.800000000000e-15 6.000000000000e+00 1.441589335534e-03 0.000000000000e+00 -1.441589335528e-03 -6.000000000000e-15 6.200000000000e+00 1.442727506513e-03 0.000000000000e+00 -1.442727506507e-03 -6.200000000000e-15 6.400000000000e+00 1.443610239152e-03 0.000000000000e+00 -1.443610239145e-03 -6.400000000000e-15 6.600000000000e+00 1.444388186661e-03 0.000000000000e+00 -1.444388186655e-03 -6.600000000000e-15 6.800000000000e+00 1.445118452306e-03 0.000000000000e+00 -1.445118452299e-03 -6.800000000000e-15 7.000000000000e+00 1.445815887303e-03 0.000000000000e+00 -1.445815887296e-03 -7.000000000000e-15 7.200000000000e+00 1.446485376705e-03 0.000000000000e+00 -1.446485376697e-03 -7.200000000000e-15 7.400000000000e+00 1.447129689186e-03 0.000000000000e+00 -1.447129689179e-03 -7.400000000000e-15 7.600000000000e+00 1.447750996996e-03 0.000000000000e+00 -1.447750996988e-03 -7.600000000000e-15 7.800000000000e+00 1.448351190910e-03 0.000000000000e+00 -1.448351190903e-03 -7.800000000000e-15 8.000000000000e+00 1.448931962241e-03 0.000000000000e+00 -1.448931962233e-03 -8.000000000000e-15 8.200000000000e+00 1.449494835159e-03 0.000000000000e+00 -1.449494835151e-03 -8.200000000000e-15 8.400000000000e+00 1.450041186595e-03 0.000000000000e+00 -1.450041186586e-03 -8.400000000000e-15 8.600000000000e+00 1.450572261978e-03 0.000000000000e+00 -1.450572261969e-03 -8.600000000000e-15 8.800000000000e+00 1.451089188900e-03 0.000000000000e+00 -1.451089188891e-03 -8.800000000000e-15 9.000000000000e+00 1.451592989279e-03 0.000000000000e+00 -1.451592989270e-03 -9.000000000000e-15 9.200000000000e+00 1.452084590268e-03 0.000000000000e+00 -1.452084590259e-03 -9.200000000000e-15 9.400000000000e+00 1.452564834047e-03 0.000000000000e+00 -1.452564834038e-03 -9.400000000000e-15 9.600000000000e+00 1.453034486585e-03 0.000000000000e+00 -1.453034486575e-03 -9.600000000000e-15 9.800000000000e+00 1.453494245482e-03 0.000000000000e+00 -1.453494245472e-03 -9.800000000000e-15 1.000000000000e+01 1.453944746978e-03 0.000000000000e+00 -1.453944746968e-03 -1.000000000000e-14 1.020000000000e+01 1.454386572198e-03 0.000000000000e+00 -1.454386572188e-03 -1.020000000000e-14 1.040000000000e+01 1.454820252725e-03 0.000000000000e+00 -1.454820252714e-03 -1.040000000000e-14 1.060000000000e+01 1.455246275565e-03 0.000000000000e+00 -1.455246275555e-03 -1.060000000000e-14 1.080000000000e+01 1.455665087577e-03 0.000000000000e+00 -1.455665087567e-03 -1.080000000000e-14 1.100000000000e+01 1.456077099412e-03 0.000000000000e+00 -1.456077099401e-03 -1.100000000000e-14 1.120000000000e+01 1.456482689030e-03 0.000000000000e+00 -1.456482689019e-03 -1.120000000000e-14 1.140000000000e+01 1.456882204840e-03 0.000000000000e+00 -1.456882204828e-03 -1.140000000000e-14 1.160000000000e+01 1.457275968497e-03 0.000000000000e+00 -1.457275968486e-03 -1.160000000000e-14 1.180000000000e+01 1.457664277408e-03 0.000000000000e+00 -1.457664277396e-03 -1.180000000000e-14 1.200000000000e+01 1.458047406962e-03 0.000000000000e+00 -1.458047406950e-03 -1.200000000000e-14 1.220000000000e+01 1.458425612541e-03 0.000000000000e+00 -1.458425612528e-03 -1.220000000000e-14 1.240000000000e+01 1.458799131307e-03 0.000000000000e+00 -1.458799131294e-03 -1.240000000000e-14 1.260000000000e+01 1.459168183818e-03 0.000000000000e+00 -1.459168183806e-03 -1.260000000000e-14 1.280000000000e+01 1.459532975473e-03 0.000000000000e+00 -1.459532975460e-03 -1.280000000000e-14 1.300000000000e+01 1.459893697810e-03 0.000000000000e+00 -1.459893697797e-03 -1.300000000000e-14 1.320000000000e+01 1.460250529680e-03 0.000000000000e+00 -1.460250529667e-03 -1.320000000000e-14 1.340000000000e+01 1.460603638305e-03 0.000000000000e+00 -1.460603638291e-03 -1.340000000000e-14 1.360000000000e+01 1.460953180226e-03 0.000000000000e+00 -1.460953180212e-03 -1.360000000000e-14 1.380000000000e+01 1.461299302173e-03 0.000000000000e+00 -1.461299302159e-03 -1.380000000000e-14 1.400000000000e+01 1.461642141839e-03 0.000000000000e+00 -1.461642141825e-03 -1.400000000000e-14 1.420000000000e+01 1.461981828591e-03 0.000000000000e+00 -1.461981828577e-03 -1.420000000000e-14 1.440000000000e+01 1.462318484112e-03 0.000000000000e+00 -1.462318484098e-03 -1.440000000000e-14 1.460000000000e+01 1.462652222985e-03 0.000000000000e+00 -1.462652222970e-03 -1.460000000000e-14 1.480000000000e+01 1.462983153221e-03 0.000000000000e+00 -1.462983153207e-03 -1.480000000000e-14 1.500000000000e+01 1.463311376749e-03 0.000000000000e+00 -1.463311376734e-03 -1.500000000000e-14 1.520000000000e+01 1.463636989850e-03 0.000000000000e+00 -1.463636989835e-03 -1.520000000000e-14 1.540000000000e+01 1.463960083568e-03 0.000000000000e+00 -1.463960083553e-03 -1.540000000000e-14 1.560000000000e+01 1.464280744074e-03 0.000000000000e+00 -1.464280744059e-03 -1.560000000000e-14 1.580000000000e+01 1.464599053006e-03 0.000000000000e+00 -1.464599052990e-03 -1.580000000000e-14 1.600000000000e+01 1.464915087778e-03 0.000000000000e+00 -1.464915087762e-03 -1.600000000000e-14 1.620000000000e+01 1.465228921865e-03 0.000000000000e+00 -1.465228921849e-03 -1.620000000000e-14 1.640000000000e+01 1.465540625063e-03 0.000000000000e+00 -1.465540625046e-03 -1.640000000000e-14 1.660000000000e+01 1.465850263731e-03 0.000000000000e+00 -1.465850263714e-03 -1.660000000000e-14 1.680000000000e+01 1.466157901013e-03 0.000000000000e+00 -1.466157900996e-03 -1.680000000000e-14 1.700000000000e+01 1.466463597040e-03 0.000000000000e+00 -1.466463597023e-03 -1.700000000000e-14 1.720000000000e+01 1.466767409121e-03 0.000000000000e+00 -1.466767409104e-03 -1.720000000000e-14 1.740000000000e+01 1.467069391915e-03 0.000000000000e+00 -1.467069391897e-03 -1.740000000000e-14 1.760000000000e+01 1.467369597593e-03 0.000000000000e+00 -1.467369597576e-03 -1.760000000000e-14 1.780000000000e+01 1.467668075990e-03 0.000000000000e+00 -1.467668075972e-03 -1.780000000000e-14 1.800000000000e+01 1.467964874737e-03 0.000000000000e+00 -1.467964874719e-03 -1.800000000000e-14 1.820000000000e+01 1.468260039398e-03 0.000000000000e+00 -1.468260039380e-03 -1.820000000000e-14 1.840000000000e+01 1.468553613582e-03 0.000000000000e+00 -1.468553613564e-03 -1.840000000000e-14 1.860000000000e+01 1.468845639056e-03 0.000000000000e+00 -1.468845639038e-03 -1.860000000000e-14 1.880000000000e+01 1.469136155852e-03 0.000000000000e+00 -1.469136155833e-03 -1.880000000000e-14 1.900000000000e+01 1.469425202356e-03 0.000000000000e+00 -1.469425202337e-03 -1.900000000000e-14 1.920000000000e+01 1.469712815404e-03 0.000000000000e+00 -1.469712815385e-03 -1.920000000000e-14 1.940000000000e+01 1.469999030363e-03 0.000000000000e+00 -1.469999030344e-03 -1.940000000000e-14 1.960000000000e+01 1.470283881209e-03 0.000000000000e+00 -1.470283881190e-03 -1.960000000000e-14 1.980000000000e+01 1.470567400601e-03 0.000000000000e+00 -1.470567400581e-03 -1.980000000000e-14 2.000000000000e+01 1.470849619945e-03 0.000000000000e+00 -1.470849619925e-03 -2.000000000000e-14 1.000000000000e+00 7.187762725013e-04 0.000000000000e+00 -7.187762725003e-04 -1.000000000000e-15 1.200000000000e+00 8.438309966082e-04 0.000000000000e+00 -8.438309966070e-04 -1.200000000000e-15 1.400000000000e+00 9.634887666177e-04 0.000000000000e+00 -9.634887666163e-04 -1.400000000000e-15 1.600000000000e+00 1.078059608435e-03 0.000000000000e+00 -1.078059608434e-03 -1.600000000000e-15 1.800000000000e+00 1.187831942360e-03 0.000000000000e+00 -1.187831942358e-03 -1.800000000000e-15 2.000000000000e+00 1.293074086161e-03 0.000000000000e+00 -1.293074086159e-03 -2.000000000000e-15 2.200000000000e+00 1.394035708127e-03 0.000000000000e+00 -1.394035708125e-03 -2.200000000000e-15 2.400000000000e+00 1.490949225096e-03 0.000000000000e+00 -1.490949225094e-03 -2.400000000000e-15 2.600000000000e+00 1.584031041768e-03 0.000000000000e+00 -1.584031041765e-03 -2.600000000000e-15 2.800000000000e+00 1.673482872043e-03 0.000000000000e+00 -1.673482872040e-03 -2.800000000000e-15 3.000000000000e+00 1.759492795159e-03 0.000000000000e+00 -1.759492795156e-03 -3.000000000000e-15 3.200000000000e+00 1.842236324173e-03 0.000000000000e+00 -1.842236324170e-03 -3.200000000000e-15 3.400000000000e+00 1.921877372829e-03 0.000000000000e+00 -1.921877372825e-03 -3.400000000000e-15 3.600000000000e+00 1.998569146059e-03 0.000000000000e+00 -1.998569146055e-03 -3.600000000000e-15 3.800000000000e+00 2.072454958922e-03 0.000000000000e+00 -2.072454958918e-03 -3.800000000000e-15 4.000000000000e+00 2.143668988989e-03 0.000000000000e+00 -2.143668988985e-03 -4.000000000000e-15 4.200000000000e+00 2.212336967169e-03 0.000000000000e+00 -2.212336967165e-03 -4.200000000000e-15 4.400000000000e+00 2.278576811829e-03 0.000000000000e+00 -2.278576811824e-03 -4.400000000000e-15 4.600000000000e+00 2.342499210804e-03 0.000000000000e+00 -2.342499210799e-03 -4.600000000000e-15 4.800000000000e+00 2.404208155672e-03 0.000000000000e+00 -2.404208155667e-03 -4.800000000000e-15 5.000000000000e+00 2.463801432311e-03 0.000000000000e+00 -2.463801432306e-03 -5.000000000000e-15 5.200000000000e+00 2.521371071507e-03 0.000000000000e+00 -2.521371071502e-03 -5.200000000000e-15 5.400000000000e+00 2.577003763057e-03 0.000000000000e+00 -2.577003763052e-03 -5.400000000000e-15 5.600000000000e+00 2.630781236529e-03 0.000000000000e+00 -2.630781236524e-03 -5.600000000000e-15 5.800000000000e+00 2.682780611576e-03 0.000000000000e+00 -2.682780611570e-03 -5.800000000000e-15 6.000000000000e+00 2.733074720441e-03 0.000000000000e+00 -2.733074720435e-03 -6.000000000000e-15 6.200000000000e+00 2.781732405063e-03 0.000000000000e+00 -2.781732405056e-03 -6.200000000000e-15 6.400000000000e+00 2.828818790959e-03 0.000000000000e+00 -2.828818790953e-03 -6.400000000000e-15 6.600000000000e+00 2.874395539886e-03 0.000000000000e+00 -2.874395539879e-03 -6.600000000000e-15 6.800000000000e+00 2.918521083069e-03 0.000000000000e+00 -2.918521083062e-03 -6.800000000000e-15 7.000000000000e+00 2.961250836656e-03 0.000000000000e+00 -2.961250836649e-03 -7.000000000000e-15 7.200000000000e+00 3.002637400872e-03 0.000000000000e+00 -3.002637400864e-03 -7.200000000000e-15 7.400000000000e+00 3.042730744230e-03 0.000000000000e+00 -3.042730744223e-03 -7.400000000000e-15 7.600000000000e+00 3.081578374036e-03 0.000000000000e+00 -3.081578374028e-03 -7.600000000000e-15 7.800000000000e+00 3.119225494283e-03 0.000000000000e+00 -3.119225494276e-03 -7.800000000000e-15 8.000000000000e+00 3.155715151981e-03 0.000000000000e+00 -3.155715151973e-03 -8.000000000000e-15 8.200000000000e+00 3.191088372811e-03 0.000000000000e+00 -3.191088372803e-03 -8.200000000000e-15 8.400000000000e+00 3.225384286975e-03 0.000000000000e+00 -3.225384286966e-03 -8.400000000000e-15 8.600000000000e+00 3.258640245990e-03 0.000000000000e+00 -3.258640245981e-03 -8.600000000000e-15 8.800000000000e+00 3.290891931133e-03 0.000000000000e+00 -3.290891931124e-03 -8.800000000000e-15 9.000000000000e+00 3.322173454176e-03 0.000000000000e+00 -3.322173454167e-03 -9.000000000000e-15 9.200000000000e+00 3.352517450987e-03 0.000000000000e+00 -3.352517450978e-03 -9.200000000000e-15 9.400000000000e+00 3.381955168550e-03 0.000000000000e+00 -3.381955168540e-03 -9.400000000000e-15 9.600000000000e+00 3.410516545870e-03 0.000000000000e+00 -3.410516545861e-03 -9.600000000000e-15 9.800000000000e+00 3.438230289237e-03 0.000000000000e+00 -3.438230289227e-03 -9.800000000000e-15 1.000000000000e+01 3.465123942241e-03 0.000000000000e+00 -3.465123942231e-03 -1.000000000000e-14 1.020000000000e+01 3.491223950939e-03 0.000000000000e+00 -3.491223950929e-03 -1.020000000000e-14 1.040000000000e+01 3.516555724506e-03 0.000000000000e+00 -3.516555724496e-03 -1.040000000000e-14 1.060000000000e+01 3.541143691714e-03 0.000000000000e+00 -3.541143691703e-03 -1.060000000000e-14 1.080000000000e+01 3.565011353516e-03 0.000000000000e+00 -3.565011353506e-03 -1.080000000000e-14 1.100000000000e+01 3.588181332040e-03 0.000000000000e+00 -3.588181332029e-03 -1.100000000000e-14 1.120000000000e+01 3.610675416217e-03 0.000000000000e+00 -3.610675416206e-03 -1.120000000000e-14 1.140000000000e+01 3.632514604320e-03 0.000000000000e+00 -3.632514604308e-03 -1.140000000000e-14 1.160000000000e+01 3.653719143598e-03 0.000000000000e+00 -3.653719143586e-03 -1.160000000000e-14 1.180000000000e+01 3.674308567245e-03 0.000000000000e+00 -3.674308567234e-03 -1.180000000000e-14 1.200000000000e+01 3.694301728874e-03 0.000000000000e+00 -3.694301728862e-03 -1.200000000000e-14 1.220000000000e+01 3.713716834680e-03 0.000000000000e+00 -3.713716834668e-03 -1.220000000000e-14 1.240000000000e+01 3.732571473475e-03 0.000000000000e+00 -3.732571473463e-03 -1.240000000000e-14 1.260000000000e+01 3.750882644724e-03 0.000000000000e+00 -3.750882644711e-03 -1.260000000000e-14 1.280000000000e+01 3.768666784751e-03 0.000000000000e+00 -3.768666784738e-03 -1.280000000000e-14 1.300000000000e+01 3.785939791243e-03 0.000000000000e+00 -3.785939791230e-03 -1.300000000000e-14 1.320000000000e+01 3.802717046173e-03 0.000000000000e+00 -3.802717046160e-03 -1.320000000000e-14 1.340000000000e+01 3.819013437269e-03 0.000000000000e+00 -3.819013437256e-03 -1.340000000000e-14 1.360000000000e+01 3.834843378140e-03 0.000000000000e+00 -3.834843378126e-03 -1.360000000000e-14 1.380000000000e+01 3.850220827149e-03 0.000000000000e+00 -3.850220827135e-03 -1.380000000000e-14 1.400000000000e+01 3.865159305147e-03 0.000000000000e+00 -3.865159305133e-03 -1.400000000000e-14 1.420000000000e+01 3.879671912146e-03 0.000000000000e+00 -3.879671912132e-03 -1.420000000000e-14 1.440000000000e+01 3.893771343011e-03 0.000000000000e+00 -3.893771342996e-03 -1.440000000000e-14 1.460000000000e+01 3.907469902258e-03 0.000000000000e+00 -3.907469902243e-03 -1.460000000000e-14 1.480000000000e+01 3.920779518024e-03 0.000000000000e+00 -3.920779518009e-03 -1.480000000000e-14 1.500000000000e+01 3.933711755271e-03 0.000000000000e+00 -3.933711755256e-03 -1.500000000000e-14 1.520000000000e+01 3.946277828289e-03 0.000000000000e+00 -3.946277828274e-03 -1.520000000000e-14 1.540000000000e+01 3.958488612559e-03 0.000000000000e+00 -3.958488612544e-03 -1.540000000000e-14 1.560000000000e+01 3.970354656013e-03 0.000000000000e+00 -3.970354655998e-03 -1.560000000000e-14 1.580000000000e+01 3.981886189752e-03 0.000000000000e+00 -3.981886189737e-03 -1.580000000000e-14 1.600000000000e+01 3.993093138262e-03 0.000000000000e+00 -3.993093138246e-03 -1.600000000000e-14 1.620000000000e+01 4.003985129161e-03 0.000000000000e+00 -4.003985129144e-03 -1.620000000000e-14 1.640000000000e+01 4.014571502520e-03 0.000000000000e+00 -4.014571502503e-03 -1.640000000000e-14 1.660000000000e+01 4.024861319793e-03 0.000000000000e+00 -4.024861319776e-03 -1.660000000000e-14 1.680000000000e+01 4.034863372374e-03 0.000000000000e+00 -4.034863372357e-03 -1.680000000000e-14 1.700000000000e+01 4.044586189821e-03 0.000000000000e+00 -4.044586189804e-03 -1.700000000000e-14 1.720000000000e+01 4.054038047765e-03 0.000000000000e+00 -4.054038047748e-03 -1.720000000000e-14 1.740000000000e+01 4.063226975528e-03 0.000000000000e+00 -4.063226975510e-03 -1.740000000000e-14 1.760000000000e+01 4.072160763465e-03 0.000000000000e+00 -4.072160763448e-03 -1.760000000000e-14 1.780000000000e+01 4.080846970061e-03 0.000000000000e+00 -4.080846970044e-03 -1.780000000000e-14 1.800000000000e+01 4.089292928779e-03 0.000000000000e+00 -4.089292928761e-03 -1.800000000000e-14 1.820000000000e+01 4.097505754691e-03 0.000000000000e+00 -4.097505754672e-03 -1.820000000000e-14 1.840000000000e+01 4.105492350900e-03 0.000000000000e+00 -4.105492350881e-03 -1.840000000000e-14 1.860000000000e+01 4.113259414759e-03 0.000000000000e+00 -4.113259414740e-03 -1.860000000000e-14 1.880000000000e+01 4.120813443900e-03 0.000000000000e+00 -4.120813443881e-03 -1.880000000000e-14 1.900000000000e+01 4.128160742089e-03 0.000000000000e+00 -4.128160742070e-03 -1.900000000000e-14 1.920000000000e+01 4.135307424904e-03 0.000000000000e+00 -4.135307424885e-03 -1.920000000000e-14 1.940000000000e+01 4.142259425251e-03 0.000000000000e+00 -4.142259425232e-03 -1.940000000000e-14 1.960000000000e+01 4.149022498724e-03 0.000000000000e+00 -4.149022498705e-03 -1.960000000000e-14 1.980000000000e+01 4.155602228809e-03 0.000000000000e+00 -4.155602228789e-03 -1.980000000000e-14 2.000000000000e+01 4.162004031945e-03 0.000000000000e+00 -4.162004031925e-03 -2.000000000000e-14 1.000000000000e+00 3.893189194817e-05 0.000000000000e+00 -3.893189194717e-05 -1.000000000000e-15 1.200000000000e+00 3.902644282694e-05 0.000000000000e+00 -3.902644282574e-05 -1.200000000000e-15 1.400000000000e+00 3.911388759996e-05 0.000000000000e+00 -3.911388759856e-05 -1.400000000000e-15 1.600000000000e+00 3.919658890555e-05 0.000000000000e+00 -3.919658890395e-05 -1.600000000000e-15 1.800000000000e+00 3.927587164925e-05 0.000000000000e+00 -3.927587164745e-05 -1.800000000000e-15 2.000000000000e+00 3.935254452813e-05 0.000000000000e+00 -3.935254452613e-05 -2.000000000000e-15 2.200000000000e+00 3.942713872321e-05 0.000000000000e+00 -3.942713872101e-05 -2.200000000000e-15 2.400000000000e+00 3.950002450632e-05 0.000000000000e+00 -3.950002450392e-05 -2.400000000000e-15 2.600000000000e+00 3.957147246455e-05 0.000000000000e+00 -3.957147246195e-05 -2.600000000000e-15 2.800000000000e+00 3.964168788245e-05 0.000000000000e+00 -3.964168787965e-05 -2.800000000000e-15 3.000000000000e+00 3.971083123232e-05 0.000000000000e+00 -3.971083122932e-05 -3.000000000000e-15 3.200000000000e+00 3.977903102875e-05 0.000000000000e+00 -3.977903102555e-05 -3.200000000000e-15 3.400000000000e+00 3.984639225524e-05 0.000000000000e+00 -3.984639225184e-05 -3.400000000000e-15 3.600000000000e+00 3.991300209927e-05 0.000000000000e+00 -3.991300209567e-05 -3.600000000000e-15 3.800000000000e+00 3.997893398288e-05 0.000000000000e+00 -3.997893397908e-05 -3.800000000000e-15 4.000000000000e+00 4.004425047417e-05 0.000000000000e+00 -4.004425047017e-05 -4.000000000000e-15 4.200000000000e+00 4.010900544109e-05 0.000000000000e+00 -4.010900543689e-05 -4.200000000000e-15 4.400000000000e+00 4.017324567760e-05 0.000000000000e+00 -4.017324567320e-05 -4.400000000000e-15 4.600000000000e+00 4.023701215382e-05 0.000000000000e+00 -4.023701214922e-05 -4.600000000000e-15 4.800000000000e+00 4.030034099240e-05 0.000000000000e+00 -4.030034098760e-05 -4.800000000000e-15 5.000000000000e+00 4.036326424163e-05 0.000000000000e+00 -4.036326423663e-05 -5.000000000000e-15 5.200000000000e+00 4.042581049534e-05 0.000000000000e+00 -4.042581049014e-05 -5.200000000000e-15 5.400000000000e+00 4.048800539551e-05 0.000000000000e+00 -4.048800539011e-05 -5.400000000000e-15 5.600000000000e+00 4.054987204379e-05 0.000000000000e+00 -4.054987203819e-05 -5.600000000000e-15 5.800000000000e+00 4.061143134155e-05 0.000000000000e+00 -4.061143133575e-05 -5.800000000000e-15 6.000000000000e+00 4.067270227318e-05 0.000000000000e+00 -4.067270226718e-05 -6.000000000000e-15 6.200000000000e+00 4.073370214389e-05 0.000000000000e+00 -4.073370213769e-05 -6.200000000000e-15 6.400000000000e+00 4.079444678066e-05 0.000000000000e+00 -4.079444677426e-05 -6.400000000000e-15 6.600000000000e+00 4.085495070317e-05 0.000000000000e+00 -4.085495069657e-05 -6.600000000000e-15 6.800000000000e+00 4.091522727006e-05 0.000000000000e+00 -4.091522726326e-05 -6.800000000000e-15 7.000000000000e+00 4.097528880465e-05 0.000000000000e+00 -4.097528879765e-05 -7.000000000000e-15 7.200000000000e+00 4.103514670374e-05 0.000000000000e+00 -4.103514669654e-05 -7.200000000000e-15 7.400000000000e+00 4.109481153205e-05 0.000000000000e+00 -4.109481152465e-05 -7.400000000000e-15 7.600000000000e+00 4.115429310455e-05 0.000000000000e+00 -4.115429309695e-05 -7.600000000000e-15 7.800000000000e+00 4.121360055872e-05 0.000000000000e+00 -4.121360055092e-05 -7.800000000000e-15 8.000000000000e+00 4.127274241798e-05 0.000000000000e+00 -4.127274240998e-05 -8.000000000000e-15 8.200000000000e+00 4.133172664769e-05 0.000000000000e+00 -4.133172663949e-05 -8.200000000000e-15 8.400000000000e+00 4.139056070483e-05 0.000000000000e+00 -4.139056069643e-05 -8.400000000000e-15 8.600000000000e+00 4.144925158199e-05 0.000000000000e+00 -4.144925157339e-05 -8.600000000000e-15 8.800000000000e+00 4.150780584672e-05 0.000000000000e+00 -4.150780583792e-05 -8.800000000000e-15 9.000000000000e+00 4.156622967663e-05 0.000000000000e+00 -4.156622966763e-05 -9.000000000000e-15 9.200000000000e+00 4.162452889085e-05 0.000000000000e+00 -4.162452888165e-05 -9.200000000000e-15 9.400000000000e+00 4.168270897831e-05 0.000000000000e+00 -4.168270896891e-05 -9.400000000000e-15 9.600000000000e+00 4.174077512324e-05 0.000000000000e+00 -4.174077511364e-05 -9.600000000000e-15 9.800000000000e+00 4.179873222816e-05 0.000000000000e+00 -4.179873221836e-05 -9.800000000000e-15 1.000000000000e+01 4.185658493470e-05 0.000000000000e+00 -4.185658492470e-05 -1.000000000000e-14 1.020000000000e+01 4.191433764251e-05 0.000000000000e+00 -4.191433763231e-05 -1.020000000000e-14 1.040000000000e+01 4.197199452643e-05 0.000000000000e+00 -4.197199451603e-05 -1.040000000000e-14 1.060000000000e+01 4.202955955208e-05 0.000000000000e+00 -4.202955954148e-05 -1.060000000000e-14 1.080000000000e+01 4.208703649021e-05 0.000000000000e+00 -4.208703647941e-05 -1.080000000000e-14 1.100000000000e+01 4.214442892966e-05 0.000000000000e+00 -4.214442891866e-05 -1.100000000000e-14 1.120000000000e+01 4.220174028937e-05 0.000000000000e+00 -4.220174027817e-05 -1.120000000000e-14 1.140000000000e+01 4.225897382929e-05 0.000000000000e+00 -4.225897381789e-05 -1.140000000000e-14 1.160000000000e+01 4.231613266048e-05 0.000000000000e+00 -4.231613264888e-05 -1.160000000000e-14 1.180000000000e+01 4.237321975437e-05 0.000000000000e+00 -4.237321974257e-05 -1.180000000000e-14 1.200000000000e+01 4.243023795126e-05 0.000000000000e+00 -4.243023793926e-05 -1.200000000000e-14 1.220000000000e+01 4.248718996828e-05 0.000000000000e+00 -4.248718995608e-05 -1.220000000000e-14 1.240000000000e+01 4.254407840657e-05 0.000000000000e+00 -4.254407839417e-05 -1.240000000000e-14 1.260000000000e+01 4.260090575812e-05 0.000000000000e+00 -4.260090574552e-05 -1.260000000000e-14 1.280000000000e+01 4.265767441195e-05 0.000000000000e+00 -4.265767439915e-05 -1.280000000000e-14 1.300000000000e+01 4.271438665994e-05 0.000000000000e+00 -4.271438664694e-05 -1.300000000000e-14 1.320000000000e+01 4.277104470219e-05 0.000000000000e+00 -4.277104468898e-05 -1.320000000000e-14 1.340000000000e+01 4.282765065205e-05 0.000000000000e+00 -4.282765063865e-05 -1.340000000000e-14 1.360000000000e+01 4.288420654078e-05 0.000000000000e+00 -4.288420652718e-05 -1.360000000000e-14 1.380000000000e+01 4.294071432188e-05 0.000000000000e+00 -4.294071430808e-05 -1.380000000000e-14 1.400000000000e+01 4.299717587517e-05 0.000000000000e+00 -4.299717586117e-05 -1.400000000000e-14 1.420000000000e+01 4.305359301056e-05 0.000000000000e+00 -4.305359299636e-05 -1.420000000000e-14 1.440000000000e+01 4.310996747161e-05 0.000000000000e+00 -4.310996745721e-05 -1.440000000000e-14 1.460000000000e+01 4.316630093883e-05 0.000000000000e+00 -4.316630092423e-05 -1.460000000000e-14 1.480000000000e+01 4.322259503281e-05 0.000000000000e+00 -4.322259501801e-05 -1.480000000000e-14 1.500000000000e+01 4.327885131711e-05 0.000000000000e+00 -4.327885130211e-05 -1.500000000000e-14 1.520000000000e+01 4.333507130100e-05 0.000000000000e+00 -4.333507128580e-05 -1.520000000000e-14 1.540000000000e+01 4.339125644205e-05 0.000000000000e+00 -4.339125642665e-05 -1.540000000000e-14 1.560000000000e+01 4.344740814853e-05 0.000000000000e+00 -4.344740813293e-05 -1.560000000000e-14 1.580000000000e+01 4.350352778167e-05 0.000000000000e+00 -4.350352776587e-05 -1.580000000000e-14 1.600000000000e+01 4.355961665784e-05 0.000000000000e+00 -4.355961664184e-05 -1.600000000000e-14 1.620000000000e+01 4.361567605052e-05 0.000000000000e+00 -4.361567603432e-05 -1.620000000000e-14 1.640000000000e+01 4.367170719224e-05 0.000000000000e+00 -4.367170717584e-05 -1.640000000000e-14 1.660000000000e+01 4.372771127637e-05 0.000000000000e+00 -4.372771125977e-05 -1.660000000000e-14 1.680000000000e+01 4.378368945879e-05 0.000000000000e+00 -4.378368944199e-05 -1.680000000000e-14 1.700000000000e+01 4.383964285953e-05 0.000000000000e+00 -4.383964284253e-05 -1.700000000000e-14 1.720000000000e+01 4.389557256427e-05 0.000000000000e+00 -4.389557254707e-05 -1.720000000000e-14 1.740000000000e+01 4.395147962577e-05 0.000000000000e+00 -4.395147960837e-05 -1.740000000000e-14 1.760000000000e+01 4.400736506524e-05 0.000000000000e+00 -4.400736504764e-05 -1.760000000000e-14 1.780000000000e+01 4.406322987364e-05 0.000000000000e+00 -4.406322985584e-05 -1.780000000000e-14 1.800000000000e+01 4.411907501288e-05 0.000000000000e+00 -4.411907499488e-05 -1.800000000000e-14 1.820000000000e+01 4.417490141698e-05 0.000000000000e+00 -4.417490139878e-05 -1.820000000000e-14 1.840000000000e+01 4.423070999320e-05 0.000000000000e+00 -4.423070997480e-05 -1.840000000000e-14 1.860000000000e+01 4.428650162305e-05 0.000000000000e+00 -4.428650160445e-05 -1.860000000000e-14 1.880000000000e+01 4.434227716331e-05 0.000000000000e+00 -4.434227714451e-05 -1.880000000000e-14 1.900000000000e+01 4.439803744697e-05 0.000000000000e+00 -4.439803742797e-05 -1.900000000000e-14 1.920000000000e+01 4.445378328414e-05 0.000000000000e+00 -4.445378326494e-05 -1.920000000000e-14 1.940000000000e+01 4.450951546287e-05 0.000000000000e+00 -4.450951544347e-05 -1.940000000000e-14 1.960000000000e+01 4.456523475001e-05 0.000000000000e+00 -4.456523473041e-05 -1.960000000000e-14 1.980000000000e+01 4.462094189198e-05 0.000000000000e+00 -4.462094187218e-05 -1.980000000000e-14 2.000000000000e+01 4.467663761547e-05 0.000000000000e+00 -4.467663759548e-05 -2.000000000000e-14 1.000000000000e+00 6.405874862821e-04 0.000000000000e+00 -6.405874862811e-04 -1.000000000000e-15 1.200000000000e+00 7.472359462218e-04 0.000000000000e+00 -7.472359462206e-04 -1.200000000000e-15 1.400000000000e+00 8.470182696917e-04 0.000000000000e+00 -8.470182696903e-04 -1.400000000000e-15 1.600000000000e+00 9.400521605240e-04 0.000000000000e+00 -9.400521605224e-04 -1.600000000000e-15 1.800000000000e+00 1.026449766851e-03 0.000000000000e+00 -1.026449766849e-03 -1.800000000000e-15 2.000000000000e+00 1.106321440225e-03 0.000000000000e+00 -1.106321440223e-03 -2.000000000000e-15 2.200000000000e+00 1.179781688496e-03 0.000000000000e+00 -1.179781688494e-03 -2.200000000000e-15 2.400000000000e+00 1.246956756745e-03 0.000000000000e+00 -1.246956756743e-03 -2.400000000000e-15 2.600000000000e+00 1.307993055374e-03 0.000000000000e+00 -1.307993055372e-03 -2.600000000000e-15 2.800000000000e+00 1.363065409089e-03 0.000000000000e+00 -1.363065409086e-03 -2.800000000000e-15 3.000000000000e+00 1.412383931069e-03 0.000000000000e+00 -1.412383931066e-03 -3.000000000000e-15 3.200000000000e+00 1.456198344914e-03 0.000000000000e+00 -1.456198344911e-03 -3.200000000000e-15 3.400000000000e+00 1.494798852215e-03 0.000000000000e+00 -1.494798852212e-03 -3.400000000000e-15 3.600000000000e+00 1.528513154153e-03 0.000000000000e+00 -1.528513154149e-03 -3.600000000000e-15 3.800000000000e+00 1.557699859626e-03 0.000000000000e+00 -1.557699859622e-03 -3.800000000000e-15 4.000000000000e+00 1.582739078446e-03 0.000000000000e+00 -1.582739078442e-03 -4.000000000000e-15 4.200000000000e+00 1.604021372022e-03 0.000000000000e+00 -1.604021372018e-03 -4.200000000000e-15 4.400000000000e+00 1.621936379530e-03 0.000000000000e+00 -1.621936379526e-03 -4.400000000000e-15 4.600000000000e+00 1.636862396510e-03 0.000000000000e+00 -1.636862396505e-03 -4.600000000000e-15 4.800000000000e+00 1.649157993252e-03 0.000000000000e+00 -1.649157993248e-03 -4.800000000000e-15 5.000000000000e+00 1.659156409567e-03 0.000000000000e+00 -1.659156409562e-03 -5.000000000000e-15 5.200000000000e+00 1.667162956622e-03 0.000000000000e+00 -1.667162956617e-03 -5.200000000000e-15 5.400000000000e+00 1.673455136866e-03 0.000000000000e+00 -1.673455136860e-03 -5.400000000000e-15 5.600000000000e+00 1.678284934605e-03 0.000000000000e+00 -1.678284934599e-03 -5.600000000000e-15 5.800000000000e+00 1.681883026426e-03 0.000000000000e+00 -1.681883026420e-03 -5.800000000000e-15 6.000000000000e+00 1.684465932427e-03 0.000000000000e+00 -1.684465932421e-03 -6.000000000000e-15 6.200000000000e+00 1.686250856458e-03 0.000000000000e+00 -1.686250856451e-03 -6.200000000000e-15 6.400000000000e+00 1.687490344568e-03 0.000000000000e+00 -1.687490344561e-03 -6.400000000000e-15 6.600000000000e+00 1.688481115047e-03 0.000000000000e+00 -1.688481115041e-03 -6.600000000000e-15 6.800000000000e+00 1.689392328576e-03 0.000000000000e+00 -1.689392328569e-03 -6.800000000000e-15 7.000000000000e+00 1.690255267990e-03 0.000000000000e+00 -1.690255267983e-03 -7.000000000000e-15 7.200000000000e+00 1.691076363930e-03 0.000000000000e+00 -1.691076363923e-03 -7.200000000000e-15 7.400000000000e+00 1.691859629074e-03 0.000000000000e+00 -1.691859629067e-03 -7.400000000000e-15 7.600000000000e+00 1.692608477474e-03 0.000000000000e+00 -1.692608477466e-03 -7.600000000000e-15 7.800000000000e+00 1.693325933898e-03 0.000000000000e+00 -1.693325933890e-03 -7.800000000000e-15 8.000000000000e+00 1.694014698000e-03 0.000000000000e+00 -1.694014697992e-03 -8.000000000000e-15 8.200000000000e+00 1.694677186453e-03 0.000000000000e+00 -1.694677186445e-03 -8.200000000000e-15 8.400000000000e+00 1.695315567043e-03 0.000000000000e+00 -1.695315567034e-03 -8.400000000000e-15 8.600000000000e+00 1.695931787634e-03 0.000000000000e+00 -1.695931787625e-03 -8.600000000000e-15 8.800000000000e+00 1.696527601211e-03 0.000000000000e+00 -1.696527601203e-03 -8.800000000000e-15 9.000000000000e+00 1.697104587740e-03 0.000000000000e+00 -1.697104587731e-03 -9.000000000000e-15 9.200000000000e+00 1.697664173353e-03 0.000000000000e+00 -1.697664173344e-03 -9.200000000000e-15 9.400000000000e+00 1.698207647248e-03 0.000000000000e+00 -1.698207647239e-03 -9.400000000000e-15 9.600000000000e+00 1.698736176599e-03 0.000000000000e+00 -1.698736176590e-03 -9.600000000000e-15 9.800000000000e+00 1.699250819732e-03 0.000000000000e+00 -1.699250819722e-03 -9.800000000000e-15 1.000000000000e+01 1.699752537771e-03 0.000000000000e+00 -1.699752537761e-03 -1.000000000000e-14 1.020000000000e+01 1.700242204947e-03 0.000000000000e+00 -1.700242204937e-03 -1.020000000000e-14 1.040000000000e+01 1.700720617717e-03 0.000000000000e+00 -1.700720617707e-03 -1.040000000000e-14 1.060000000000e+01 1.701188502850e-03 0.000000000000e+00 -1.701188502840e-03 -1.060000000000e-14 1.080000000000e+01 1.701646524582e-03 0.000000000000e+00 -1.701646524572e-03 -1.080000000000e-14 1.100000000000e+01 1.702095290972e-03 0.000000000000e+00 -1.702095290961e-03 -1.100000000000e-14 1.120000000000e+01 1.702535359536e-03 0.000000000000e+00 -1.702535359524e-03 -1.120000000000e-14 1.140000000000e+01 1.702967242254e-03 0.000000000000e+00 -1.702967242243e-03 -1.140000000000e-14 1.160000000000e+01 1.703391410029e-03 0.000000000000e+00 -1.703391410017e-03 -1.160000000000e-14 1.180000000000e+01 1.703808296641e-03 0.000000000000e+00 -1.703808296629e-03 -1.180000000000e-14 1.200000000000e+01 1.704218302290e-03 0.000000000000e+00 -1.704218302278e-03 -1.200000000000e-14 1.220000000000e+01 1.704621796739e-03 0.000000000000e+00 -1.704621796727e-03 -1.220000000000e-14 1.240000000000e+01 1.705019122136e-03 0.000000000000e+00 -1.705019122123e-03 -1.240000000000e-14 1.260000000000e+01 1.705410595526e-03 0.000000000000e+00 -1.705410595513e-03 -1.260000000000e-14 1.280000000000e+01 1.705796511112e-03 0.000000000000e+00 -1.705796511100e-03 -1.280000000000e-14 1.300000000000e+01 1.706177142276e-03 0.000000000000e+00 -1.706177142263e-03 -1.300000000000e-14 1.320000000000e+01 1.706552743393e-03 0.000000000000e+00 -1.706552743379e-03 -1.320000000000e-14 1.340000000000e+01 1.706923551464e-03 0.000000000000e+00 -1.706923551451e-03 -1.340000000000e-14 1.360000000000e+01 1.707289787593e-03 0.000000000000e+00 -1.707289787580e-03 -1.360000000000e-14 1.380000000000e+01 1.707651658305e-03 0.000000000000e+00 -1.707651658291e-03 -1.380000000000e-14 1.400000000000e+01 1.708009356746e-03 0.000000000000e+00 -1.708009356732e-03 -1.400000000000e-14 1.420000000000e+01 1.708363063770e-03 0.000000000000e+00 -1.708363063756e-03 -1.420000000000e-14 1.440000000000e+01 1.708712948911e-03 0.000000000000e+00 -1.708712948897e-03 -1.440000000000e-14 1.460000000000e+01 1.709059171279e-03 0.000000000000e+00 -1.709059171265e-03 -1.460000000000e-14 1.480000000000e+01 1.709401880362e-03 0.000000000000e+00 -1.709401880347e-03 -1.480000000000e-14 1.500000000000e+01 1.709741216760e-03 0.000000000000e+00 -1.709741216745e-03 -1.500000000000e-14 1.520000000000e+01 1.710077312853e-03 0.000000000000e+00 -1.710077312838e-03 -1.520000000000e-14 1.540000000000e+01 1.710410293410e-03 0.000000000000e+00 -1.710410293395e-03 -1.540000000000e-14 1.560000000000e+01 1.710740276141e-03 0.000000000000e+00 -1.710740276126e-03 -1.560000000000e-14 1.580000000000e+01 1.711067372208e-03 0.000000000000e+00 -1.711067372192e-03 -1.580000000000e-14 1.600000000000e+01 1.711391686684e-03 0.000000000000e+00 -1.711391686668e-03 -1.600000000000e-14 1.620000000000e+01 1.711713318981e-03 0.000000000000e+00 -1.711713318965e-03 -1.620000000000e-14 1.640000000000e+01 1.712032363241e-03 0.000000000000e+00 -1.712032363225e-03 -1.640000000000e-14 1.660000000000e+01 1.712348908688e-03 0.000000000000e+00 -1.712348908671e-03 -1.660000000000e-14 1.680000000000e+01 1.712663039961e-03 0.000000000000e+00 -1.712663039944e-03 -1.680000000000e-14 1.700000000000e+01 1.712974837415e-03 0.000000000000e+00 -1.712974837398e-03 -1.700000000000e-14 1.720000000000e+01 1.713284377401e-03 0.000000000000e+00 -1.713284377384e-03 -1.720000000000e-14 1.740000000000e+01 1.713591732518e-03 0.000000000000e+00 -1.713591732501e-03 -1.740000000000e-14 1.760000000000e+01 1.713896971858e-03 0.000000000000e+00 -1.713896971840e-03 -1.760000000000e-14 1.780000000000e+01 1.714200161215e-03 0.000000000000e+00 -1.714200161198e-03 -1.780000000000e-14 1.800000000000e+01 1.714501363299e-03 0.000000000000e+00 -1.714501363281e-03 -1.800000000000e-14 1.820000000000e+01 1.714800637913e-03 0.000000000000e+00 -1.714800637895e-03 -1.820000000000e-14 1.840000000000e+01 1.715098042133e-03 0.000000000000e+00 -1.715098042115e-03 -1.840000000000e-14 1.860000000000e+01 1.715393630470e-03 0.000000000000e+00 -1.715393630451e-03 -1.860000000000e-14 1.880000000000e+01 1.715687455014e-03 0.000000000000e+00 -1.715687454996e-03 -1.880000000000e-14 1.900000000000e+01 1.715979565581e-03 0.000000000000e+00 -1.715979565562e-03 -1.900000000000e-14 1.920000000000e+01 1.716270009835e-03 0.000000000000e+00 -1.716270009816e-03 -1.920000000000e-14 1.940000000000e+01 1.716558833414e-03 0.000000000000e+00 -1.716558833394e-03 -1.940000000000e-14 1.960000000000e+01 1.716846080040e-03 0.000000000000e+00 -1.716846080020e-03 -1.960000000000e-14 1.980000000000e+01 1.717131791625e-03 0.000000000000e+00 -1.717131791605e-03 -1.980000000000e-14 2.000000000000e+01 1.717416008368e-03 0.000000000000e+00 -1.717416008348e-03 -2.000000000000e-14 1.000000000000e+00 7.689275845449e-04 0.000000000000e+00 -7.689275845439e-04 -1.000000000000e-15 1.200000000000e+00 9.019291737907e-04 0.000000000000e+00 -9.019291737895e-04 -1.200000000000e-15 1.400000000000e+00 1.028999580410e-03 0.000000000000e+00 -1.028999580409e-03 -1.400000000000e-15 1.600000000000e+00 1.150500919908e-03 0.000000000000e+00 -1.150500919906e-03 -1.600000000000e-15 1.800000000000e+00 1.266767519723e-03 0.000000000000e+00 -1.266767519721e-03 -1.800000000000e-15 2.000000000000e+00 1.378108280699e-03 0.000000000000e+00 -1.378108280697e-03 -2.000000000000e-15 2.200000000000e+00 1.484808862508e-03 0.000000000000e+00 -1.484808862506e-03 -2.200000000000e-15 2.400000000000e+00 1.587133635850e-03 0.000000000000e+00 -1.587133635848e-03 -2.400000000000e-15 2.600000000000e+00 1.685327573015e-03 0.000000000000e+00 -1.685327573013e-03 -2.600000000000e-15 2.800000000000e+00 1.779617855226e-03 0.000000000000e+00 -1.779617855223e-03 -2.800000000000e-15 3.000000000000e+00 1.870215395742e-03 0.000000000000e+00 -1.870215395739e-03 -3.000000000000e-15 3.200000000000e+00 1.957316210592e-03 0.000000000000e+00 -1.957316210589e-03 -3.200000000000e-15 3.400000000000e+00 2.041102663398e-03 0.000000000000e+00 -2.041102663395e-03 -3.400000000000e-15 3.600000000000e+00 2.121744595742e-03 0.000000000000e+00 -2.121744595738e-03 -3.600000000000e-15 3.800000000000e+00 2.199400353747e-03 0.000000000000e+00 -2.199400353744e-03 -3.800000000000e-15 4.000000000000e+00 2.274217720796e-03 0.000000000000e+00 -2.274217720792e-03 -4.000000000000e-15 4.200000000000e+00 2.346334765407e-03 0.000000000000e+00 -2.346334765403e-03 -4.200000000000e-15 4.400000000000e+00 2.415880612548e-03 0.000000000000e+00 -2.415880612544e-03 -4.400000000000e-15 4.600000000000e+00 2.482976145826e-03 0.000000000000e+00 -2.482976145821e-03 -4.600000000000e-15 4.800000000000e+00 2.547734647307e-03 0.000000000000e+00 -2.547734647302e-03 -4.800000000000e-15 5.000000000000e+00 2.610262381047e-03 0.000000000000e+00 -2.610262381042e-03 -5.000000000000e-15 5.200000000000e+00 2.670659125770e-03 0.000000000000e+00 -2.670659125765e-03 -5.200000000000e-15 5.400000000000e+00 2.729018661633e-03 0.000000000000e+00 -2.729018661627e-03 -5.400000000000e-15 5.600000000000e+00 2.785429215444e-03 0.000000000000e+00 -2.785429215438e-03 -5.600000000000e-15 5.800000000000e+00 2.839973868314e-03 0.000000000000e+00 -2.839973868308e-03 -5.800000000000e-15 6.000000000000e+00 2.892730929269e-03 0.000000000000e+00 -2.892730929263e-03 -6.000000000000e-15 6.200000000000e+00 2.943774278006e-03 0.000000000000e+00 -2.943774278000e-03 -6.200000000000e-15 6.400000000000e+00 2.993173679649e-03 0.000000000000e+00 -2.993173679643e-03 -6.400000000000e-15 6.600000000000e+00 3.040995074065e-03 0.000000000000e+00 -3.040995074059e-03 -6.600000000000e-15 6.800000000000e+00 3.087300842045e-03 0.000000000000e+00 -3.087300842038e-03 -6.800000000000e-15 7.000000000000e+00 3.132150050411e-03 0.000000000000e+00 -3.132150050404e-03 -7.000000000000e-15 7.200000000000e+00 3.175598677927e-03 0.000000000000e+00 -3.175598677920e-03 -7.200000000000e-15 7.400000000000e+00 3.217699823664e-03 0.000000000000e+00 -3.217699823656e-03 -7.400000000000e-15 7.600000000000e+00 3.258503899356e-03 0.000000000000e+00 -3.258503899348e-03 -7.600000000000e-15 7.800000000000e+00 3.298058807093e-03 0.000000000000e+00 -3.298058807085e-03 -7.800000000000e-15 8.000000000000e+00 3.336410103582e-03 0.000000000000e+00 -3.336410103574e-03 -8.000000000000e-15 8.200000000000e+00 3.373601152096e-03 0.000000000000e+00 -3.373601152088e-03 -8.200000000000e-15 8.400000000000e+00 3.409673263105e-03 0.000000000000e+00 -3.409673263097e-03 -8.400000000000e-15 8.600000000000e+00 3.444665824515e-03 0.000000000000e+00 -3.444665824507e-03 -8.600000000000e-15 8.800000000000e+00 3.478616422329e-03 0.000000000000e+00 -3.478616422320e-03 -8.800000000000e-15 9.000000000000e+00 3.511560952491e-03 0.000000000000e+00 -3.511560952482e-03 -9.000000000000e-15 9.200000000000e+00 3.543533724597e-03 0.000000000000e+00 -3.543533724588e-03 -9.200000000000e-15 9.400000000000e+00 3.574567558092e-03 0.000000000000e+00 -3.574567558082e-03 -9.400000000000e-15 9.600000000000e+00 3.604693871528e-03 0.000000000000e+00 -3.604693871519e-03 -9.600000000000e-15 9.800000000000e+00 3.633942765408e-03 0.000000000000e+00 -3.633942765398e-03 -9.800000000000e-15 1.000000000000e+01 3.662343099082e-03 0.000000000000e+00 -3.662343099072e-03 -1.000000000000e-14 1.020000000000e+01 3.689922562153e-03 0.000000000000e+00 -3.689922562143e-03 -1.020000000000e-14 1.040000000000e+01 3.716707740778e-03 0.000000000000e+00 -3.716707740768e-03 -1.040000000000e-14 1.060000000000e+01 3.742724179255e-03 0.000000000000e+00 -3.742724179244e-03 -1.060000000000e-14 1.080000000000e+01 3.767996437228e-03 0.000000000000e+00 -3.767996437217e-03 -1.080000000000e-14 1.100000000000e+01 3.792548142833e-03 0.000000000000e+00 -3.792548142822e-03 -1.100000000000e-14 1.120000000000e+01 3.816402042087e-03 0.000000000000e+00 -3.816402042076e-03 -1.120000000000e-14 1.140000000000e+01 3.839580044781e-03 0.000000000000e+00 -3.839580044770e-03 -1.140000000000e-14 1.160000000000e+01 3.862103267145e-03 0.000000000000e+00 -3.862103267134e-03 -1.160000000000e-14 1.180000000000e+01 3.883992071522e-03 0.000000000000e+00 -3.883992071511e-03 -1.180000000000e-14 1.200000000000e+01 3.905266103261e-03 0.000000000000e+00 -3.905266103249e-03 -1.200000000000e-14 1.220000000000e+01 3.925944325047e-03 0.000000000000e+00 -3.925944325035e-03 -1.220000000000e-14 1.240000000000e+01 3.946045048863e-03 0.000000000000e+00 -3.946045048851e-03 -1.240000000000e-14 1.260000000000e+01 3.965585965752e-03 0.000000000000e+00 -3.965585965739e-03 -1.260000000000e-14 1.280000000000e+01 3.984584173553e-03 0.000000000000e+00 -3.984584173540e-03 -1.280000000000e-14 1.300000000000e+01 4.003056202778e-03 0.000000000000e+00 -4.003056202765e-03 -1.300000000000e-14 1.320000000000e+01 4.021018040756e-03 0.000000000000e+00 -4.021018040743e-03 -1.320000000000e-14 1.340000000000e+01 4.038485154201e-03 0.000000000000e+00 -4.038485154188e-03 -1.340000000000e-14 1.360000000000e+01 4.055472510314e-03 0.000000000000e+00 -4.055472510300e-03 -1.360000000000e-14 1.380000000000e+01 4.071994596551e-03 0.000000000000e+00 -4.071994596537e-03 -1.380000000000e-14 1.400000000000e+01 4.088065439157e-03 0.000000000000e+00 -4.088065439143e-03 -1.400000000000e-14 1.420000000000e+01 4.103698620574e-03 0.000000000000e+00 -4.103698620560e-03 -1.420000000000e-14 1.440000000000e+01 4.118907295811e-03 0.000000000000e+00 -4.118907295796e-03 -1.440000000000e-14 1.460000000000e+01 4.133704207869e-03 0.000000000000e+00 -4.133704207855e-03 -1.460000000000e-14 1.480000000000e+01 4.148101702302e-03 0.000000000000e+00 -4.148101702287e-03 -1.480000000000e-14 1.500000000000e+01 4.162111740975e-03 0.000000000000e+00 -4.162111740960e-03 -1.500000000000e-14 1.520000000000e+01 4.175745915107e-03 0.000000000000e+00 -4.175745915092e-03 -1.520000000000e-14 1.540000000000e+01 4.189015457645e-03 0.000000000000e+00 -4.189015457629e-03 -1.540000000000e-14 1.560000000000e+01 4.201931255028e-03 0.000000000000e+00 -4.201931255012e-03 -1.560000000000e-14 1.580000000000e+01 4.214503858402e-03 0.000000000000e+00 -4.214503858386e-03 -1.580000000000e-14 1.600000000000e+01 4.226743494320e-03 0.000000000000e+00 -4.226743494304e-03 -1.600000000000e-14 1.620000000000e+01 4.238660074978e-03 0.000000000000e+00 -4.238660074962e-03 -1.620000000000e-14 1.640000000000e+01 4.250263208022e-03 0.000000000000e+00 -4.250263208006e-03 -1.640000000000e-14 1.660000000000e+01 4.261562205962e-03 0.000000000000e+00 -4.261562205945e-03 -1.660000000000e-14 1.680000000000e+01 4.272566095218e-03 0.000000000000e+00 -4.272566095201e-03 -1.680000000000e-14 1.700000000000e+01 4.283283624838e-03 0.000000000000e+00 -4.283283624821e-03 -1.700000000000e-14 1.720000000000e+01 4.293723274899e-03 0.000000000000e+00 -4.293723274882e-03 -1.720000000000e-14 1.740000000000e+01 4.303893264622e-03 0.000000000000e+00 -4.303893264605e-03 -1.740000000000e-14 1.760000000000e+01 4.313801560217e-03 0.000000000000e+00 -4.313801560199e-03 -1.760000000000e-14 1.780000000000e+01 4.323455882477e-03 0.000000000000e+00 -4.323455882460e-03 -1.780000000000e-14 1.800000000000e+01 4.332863714135e-03 0.000000000000e+00 -4.332863714117e-03 -1.800000000000e-14 1.820000000000e+01 4.342032306998e-03 0.000000000000e+00 -4.342032306980e-03 -1.820000000000e-14 1.840000000000e+01 4.350968688870e-03 0.000000000000e+00 -4.350968688851e-03 -1.840000000000e-14 1.860000000000e+01 4.359679670275e-03 0.000000000000e+00 -4.359679670257e-03 -1.860000000000e-14 1.880000000000e+01 4.368171850992e-03 0.000000000000e+00 -4.368171850973e-03 -1.880000000000e-14 1.900000000000e+01 4.376451626402e-03 0.000000000000e+00 -4.376451626383e-03 -1.900000000000e-14 1.920000000000e+01 4.384525193663e-03 0.000000000000e+00 -4.384525193643e-03 -1.920000000000e-14 1.940000000000e+01 4.392398557715e-03 0.000000000000e+00 -4.392398557695e-03 -1.940000000000e-14 1.960000000000e+01 4.400077537124e-03 0.000000000000e+00 -4.400077537104e-03 -1.960000000000e-14 1.980000000000e+01 4.407567769766e-03 0.000000000000e+00 -4.407567769746e-03 -1.980000000000e-14 2.000000000000e+01 4.414874718355e-03 0.000000000000e+00 -4.414874718335e-03 -2.000000000000e-14 1.000000000000e+00 7.779407217426e-05 0.000000000000e+00 -7.779407217326e-05 -1.000000000000e-15 1.200000000000e+00 7.795767125604e-05 0.000000000000e+00 -7.795767125484e-05 -1.200000000000e-15 1.400000000000e+00 7.809346477466e-05 0.000000000000e+00 -7.809346477326e-05 -1.400000000000e-15 1.600000000000e+00 7.821666360955e-05 0.000000000000e+00 -7.821666360795e-05 -1.600000000000e-15 1.800000000000e+00 7.833143145567e-05 0.000000000000e+00 -7.833143145387e-05 -1.800000000000e-15 2.000000000000e+00 7.843996066233e-05 0.000000000000e+00 -7.843996066033e-05 -2.000000000000e-15 2.200000000000e+00 7.854362995576e-05 0.000000000000e+00 -7.854362995356e-05 -2.200000000000e-15 2.400000000000e+00 7.864337596709e-05 0.000000000000e+00 -7.864337596469e-05 -2.400000000000e-15 2.600000000000e+00 7.873986852929e-05 0.000000000000e+00 -7.873986852669e-05 -2.600000000000e-15 2.800000000000e+00 7.883360589579e-05 0.000000000000e+00 -7.883360589299e-05 -2.800000000000e-15 3.000000000000e+00 7.892497054521e-05 0.000000000000e+00 -7.892497054221e-05 -3.000000000000e-15 3.200000000000e+00 7.901426373184e-05 0.000000000000e+00 -7.901426372864e-05 -3.200000000000e-15 3.400000000000e+00 7.910172784740e-05 0.000000000000e+00 -7.910172784400e-05 -3.400000000000e-15 3.600000000000e+00 7.918756144417e-05 0.000000000000e+00 -7.918756144057e-05 -3.600000000000e-15 3.800000000000e+00 7.927192965470e-05 0.000000000000e+00 -7.927192965090e-05 -3.800000000000e-15 4.000000000000e+00 7.935497162044e-05 0.000000000000e+00 -7.935497161644e-05 -4.000000000000e-15 4.200000000000e+00 7.943680591581e-05 0.000000000000e+00 -7.943680591161e-05 -4.200000000000e-15 4.400000000000e+00 7.951753459252e-05 0.000000000000e+00 -7.951753458812e-05 -4.400000000000e-15 4.600000000000e+00 7.959724625082e-05 0.000000000000e+00 -7.959724624622e-05 -4.600000000000e-15 4.800000000000e+00 7.967601841040e-05 0.000000000000e+00 -7.967601840560e-05 -4.800000000000e-15 5.000000000000e+00 7.975391936708e-05 0.000000000000e+00 -7.975391936208e-05 -5.000000000000e-15 5.200000000000e+00 7.983100966598e-05 0.000000000000e+00 -7.983100966078e-05 -5.200000000000e-15 5.400000000000e+00 7.990734328400e-05 0.000000000000e+00 -7.990734327860e-05 -5.400000000000e-15 5.600000000000e+00 7.998296858910e-05 0.000000000000e+00 -7.998296858350e-05 -5.600000000000e-15 5.800000000000e+00 8.005792912588e-05 0.000000000000e+00 -8.005792912008e-05 -5.800000000000e-15 6.000000000000e+00 8.013226426470e-05 0.000000000000e+00 -8.013226425870e-05 -6.000000000000e-15 6.200000000000e+00 8.020600974220e-05 0.000000000000e+00 -8.020600973600e-05 -6.200000000000e-15 6.400000000000e+00 8.027919811478e-05 0.000000000000e+00 -8.027919810838e-05 -6.400000000000e-15 6.600000000000e+00 8.035185914162e-05 0.000000000000e+00 -8.035185913502e-05 -6.600000000000e-15 6.800000000000e+00 8.042402011020e-05 0.000000000000e+00 -8.042402010340e-05 -6.800000000000e-15 7.000000000000e+00 8.049570611455e-05 0.000000000000e+00 -8.049570610755e-05 -7.000000000000e-15 7.200000000000e+00 8.056694029445e-05 0.000000000000e+00 -8.056694028725e-05 -7.200000000000e-15 7.400000000000e+00 8.063774404197e-05 0.000000000000e+00 -8.063774403456e-05 -7.400000000000e-15 7.600000000000e+00 8.070813718077e-05 0.000000000000e+00 -8.070813717317e-05 -7.600000000000e-15 7.800000000000e+00 8.077813812239e-05 0.000000000000e+00 -8.077813811460e-05 -7.800000000000e-15 8.000000000000e+00 8.084776400302e-05 0.000000000000e+00 -8.084776399502e-05 -8.000000000000e-15 8.200000000000e+00 8.091703080365e-05 0.000000000000e+00 -8.091703079545e-05 -8.200000000000e-15 8.400000000000e+00 8.098595345614e-05 0.000000000000e+00 -8.098595344774e-05 -8.400000000000e-15 8.600000000000e+00 8.105454593694e-05 0.000000000000e+00 -8.105454592834e-05 -8.600000000000e-15 8.800000000000e+00 8.112282135045e-05 0.000000000000e+00 -8.112282134165e-05 -8.800000000000e-15 9.000000000000e+00 8.119079200311e-05 0.000000000000e+00 -8.119079199411e-05 -9.000000000000e-15 9.200000000000e+00 8.125846946968e-05 0.000000000000e+00 -8.125846946048e-05 -9.200000000000e-15 9.400000000000e+00 8.132586465259e-05 0.000000000000e+00 -8.132586464319e-05 -9.400000000000e-15 9.600000000000e+00 8.139298783523e-05 0.000000000000e+00 -8.139298782563e-05 -9.600000000000e-15 9.800000000000e+00 8.145984872990e-05 0.000000000000e+00 -8.145984872010e-05 -9.800000000000e-15 1.000000000000e+01 8.152645652113e-05 0.000000000000e+00 -8.152645651113e-05 -1.000000000000e-14 1.020000000000e+01 8.159281990485e-05 0.000000000000e+00 -8.159281989465e-05 -1.020000000000e-14 1.040000000000e+01 8.165894712392e-05 0.000000000000e+00 -8.165894711352e-05 -1.040000000000e-14 1.060000000000e+01 8.172484600037e-05 0.000000000000e+00 -8.172484598977e-05 -1.060000000000e-14 1.080000000000e+01 8.179052396477e-05 0.000000000000e+00 -8.179052395397e-05 -1.080000000000e-14 1.100000000000e+01 8.185598808302e-05 0.000000000000e+00 -8.185598807202e-05 -1.100000000000e-14 1.120000000000e+01 8.192124508082e-05 0.000000000000e+00 -8.192124506963e-05 -1.120000000000e-14 1.140000000000e+01 8.198630136613e-05 0.000000000000e+00 -8.198630135473e-05 -1.140000000000e-14 1.160000000000e+01 8.205116304960e-05 0.000000000000e+00 -8.205116303800e-05 -1.160000000000e-14 1.180000000000e+01 8.211583596357e-05 0.000000000000e+00 -8.211583595177e-05 -1.180000000000e-14 1.200000000000e+01 8.218032567933e-05 0.000000000000e+00 -8.218032566733e-05 -1.200000000000e-14 1.220000000000e+01 8.224463752317e-05 0.000000000000e+00 -8.224463751097e-05 -1.220000000000e-14 1.240000000000e+01 8.230877659110e-05 0.000000000000e+00 -8.230877657870e-05 -1.240000000000e-14 1.260000000000e+01 8.237274776251e-05 0.000000000000e+00 -8.237274774991e-05 -1.260000000000e-14 1.280000000000e+01 8.243655571278e-05 0.000000000000e+00 -8.243655569998e-05 -1.280000000000e-14 1.300000000000e+01 8.250020492493e-05 0.000000000000e+00 -8.250020491193e-05 -1.300000000000e-14 1.320000000000e+01 8.256369970053e-05 0.000000000000e+00 -8.256369968733e-05 -1.320000000000e-14 1.340000000000e+01 8.262704416971e-05 0.000000000000e+00 -8.262704415631e-05 -1.340000000000e-14 1.360000000000e+01 8.269024230054e-05 0.000000000000e+00 -8.269024228694e-05 -1.360000000000e-14 1.380000000000e+01 8.275329790775e-05 0.000000000000e+00 -8.275329789395e-05 -1.380000000000e-14 1.400000000000e+01 8.281621466085e-05 0.000000000000e+00 -8.281621464685e-05 -1.400000000000e-14 1.420000000000e+01 8.287899609173e-05 0.000000000000e+00 -8.287899607753e-05 -1.420000000000e-14 1.440000000000e+01 8.294164560171e-05 0.000000000000e+00 -8.294164558731e-05 -1.440000000000e-14 1.460000000000e+01 8.300416646816e-05 0.000000000000e+00 -8.300416645355e-05 -1.460000000000e-14 1.480000000000e+01 8.306656185070e-05 0.000000000000e+00 -8.306656183590e-05 -1.480000000000e-14 1.500000000000e+01 8.312883479703e-05 0.000000000000e+00 -8.312883478203e-05 -1.500000000000e-14 1.520000000000e+01 8.319098824834e-05 0.000000000000e+00 -8.319098823314e-05 -1.520000000000e-14 1.540000000000e+01 8.325302504440e-05 0.000000000000e+00 -8.325302502900e-05 -1.540000000000e-14 1.560000000000e+01 8.331494792839e-05 0.000000000000e+00 -8.331494791279e-05 -1.560000000000e-14 1.580000000000e+01 8.337675955142e-05 0.000000000000e+00 -8.337675953562e-05 -1.580000000000e-14 1.600000000000e+01 8.343846247671e-05 0.000000000000e+00 -8.343846246071e-05 -1.600000000000e-14 1.620000000000e+01 8.350005918364e-05 0.000000000000e+00 -8.350005916744e-05 -1.620000000000e-14 1.640000000000e+01 8.356155207152e-05 0.000000000000e+00 -8.356155205512e-05 -1.640000000000e-14 1.660000000000e+01 8.362294346308e-05 0.000000000000e+00 -8.362294344648e-05 -1.660000000000e-14 1.680000000000e+01 8.368423560790e-05 0.000000000000e+00 -8.368423559110e-05 -1.680000000000e-14 1.700000000000e+01 8.374543068549e-05 0.000000000000e+00 -8.374543066849e-05 -1.700000000000e-14 1.720000000000e+01 8.380653080837e-05 0.000000000000e+00 -8.380653079117e-05 -1.720000000000e-14 1.740000000000e+01 8.386753802484e-05 0.000000000000e+00 -8.386753800744e-05 -1.740000000000e-14 1.760000000000e+01 8.392845432168e-05 0.000000000000e+00 -8.392845430408e-05 -1.760000000000e-14 1.780000000000e+01 8.398928162666e-05 0.000000000000e+00 -8.398928160886e-05 -1.780000000000e-14 1.800000000000e+01 8.405002181100e-05 0.000000000000e+00 -8.405002179300e-05 -1.800000000000e-14 1.820000000000e+01 8.411067669160e-05 0.000000000000e+00 -8.411067667340e-05 -1.820000000000e-14 1.840000000000e+01 8.417124803322e-05 0.000000000000e+00 -8.417124801482e-05 -1.840000000000e-14 1.860000000000e+01 8.423173755054e-05 0.000000000000e+00 -8.423173753193e-05 -1.860000000000e-14 1.880000000000e+01 8.429214691009e-05 0.000000000000e+00 -8.429214689129e-05 -1.880000000000e-14 1.900000000000e+01 8.435247773214e-05 0.000000000000e+00 -8.435247771314e-05 -1.900000000000e-14 1.920000000000e+01 8.441273159245e-05 0.000000000000e+00 -8.441273157325e-05 -1.920000000000e-14 1.940000000000e+01 8.447291002391e-05 0.000000000000e+00 -8.447291000451e-05 -1.940000000000e-14 1.960000000000e+01 8.453301451821e-05 0.000000000000e+00 -8.453301449861e-05 -1.960000000000e-14 1.980000000000e+01 8.459304652731e-05 0.000000000000e+00 -8.459304650751e-05 -1.980000000000e-14 2.000000000000e+01 8.465300746491e-05 0.000000000000e+00 -8.465300744491e-05 -2.000000000000e-14 1.000000000000e+00 4.708395587402e-04 0.000000000000e+00 -4.708395587392e-04 -1.000000000000e-15 1.200000000000e+00 5.470409605424e-04 0.000000000000e+00 -5.470409605412e-04 -1.200000000000e-15 1.400000000000e+00 6.173813222809e-04 0.000000000000e+00 -6.173813222795e-04 -1.400000000000e-15 1.600000000000e+00 6.819730160120e-04 0.000000000000e+00 -6.819730160104e-04 -1.600000000000e-15 1.800000000000e+00 7.409541818428e-04 0.000000000000e+00 -7.409541818410e-04 -1.800000000000e-15 2.000000000000e+00 7.944893152267e-04 0.000000000000e+00 -7.944893152247e-04 -2.000000000000e-15 2.200000000000e+00 8.427700703481e-04 0.000000000000e+00 -8.427700703459e-04 -2.200000000000e-15 2.400000000000e+00 8.860156765719e-04 0.000000000000e+00 -8.860156765695e-04 -2.400000000000e-15 2.600000000000e+00 9.244724771555e-04 0.000000000000e+00 -9.244724771529e-04 -2.600000000000e-15 2.800000000000e+00 9.584122579034e-04 0.000000000000e+00 -9.584122579006e-04 -2.800000000000e-15 3.000000000000e+00 9.881292279693e-04 0.000000000000e+00 -9.881292279663e-04 -3.000000000000e-15 3.200000000000e+00 1.013935715726e-03 0.000000000000e+00 -1.013935715723e-03 -3.200000000000e-15 3.400000000000e+00 1.036156811708e-03 0.000000000000e+00 -1.036156811704e-03 -3.400000000000e-15 3.600000000000e+00 1.055124300703e-03 0.000000000000e+00 -1.055124300699e-03 -3.600000000000e-15 3.800000000000e+00 1.071170273824e-03 0.000000000000e+00 -1.071170273820e-03 -3.800000000000e-15 4.000000000000e+00 1.084620819434e-03 0.000000000000e+00 -1.084620819430e-03 -4.000000000000e-15 4.200000000000e+00 1.095790181467e-03 0.000000000000e+00 -1.095790181462e-03 -4.200000000000e-15 4.400000000000e+00 1.104975746541e-03 0.000000000000e+00 -1.104975746536e-03 -4.400000000000e-15 4.600000000000e+00 1.112454158469e-03 0.000000000000e+00 -1.112454158465e-03 -4.600000000000e-15 4.800000000000e+00 1.118478746988e-03 0.000000000000e+00 -1.118478746983e-03 -4.800000000000e-15 5.000000000000e+00 1.123278312914e-03 0.000000000000e+00 -1.123278312909e-03 -5.000000000000e-15 5.200000000000e+00 1.127057175267e-03 0.000000000000e+00 -1.127057175262e-03 -5.200000000000e-15 5.400000000000e+00 1.129996294792e-03 0.000000000000e+00 -1.129996294786e-03 -5.400000000000e-15 5.600000000000e+00 1.132255263014e-03 0.000000000000e+00 -1.132255263008e-03 -5.600000000000e-15 5.800000000000e+00 1.133974842248e-03 0.000000000000e+00 -1.133974842242e-03 -5.800000000000e-15 6.000000000000e+00 1.135279897102e-03 0.000000000000e+00 -1.135279897096e-03 -6.000000000000e-15 6.200000000000e+00 1.136281578974e-03 0.000000000000e+00 -1.136281578968e-03 -6.200000000000e-15 6.400000000000e+00 1.137077112214e-03 0.000000000000e+00 -1.137077112207e-03 -6.400000000000e-15 6.600000000000e+00 1.137745180983e-03 0.000000000000e+00 -1.137745180976e-03 -6.600000000000e-15 6.800000000000e+00 1.138340106206e-03 0.000000000000e+00 -1.138340106199e-03 -6.800000000000e-15 7.000000000000e+00 1.138892722690e-03 0.000000000000e+00 -1.138892722683e-03 -7.000000000000e-15 7.200000000000e+00 1.139418178050e-03 0.000000000000e+00 -1.139418178043e-03 -7.200000000000e-15 7.400000000000e+00 1.139923650321e-03 0.000000000000e+00 -1.139923650314e-03 -7.400000000000e-15 7.600000000000e+00 1.140412791918e-03 0.000000000000e+00 -1.140412791911e-03 -7.600000000000e-15 7.800000000000e+00 1.140887738394e-03 0.000000000000e+00 -1.140887738386e-03 -7.800000000000e-15 8.000000000000e+00 1.141349941571e-03 0.000000000000e+00 -1.141349941563e-03 -8.000000000000e-15 8.200000000000e+00 1.141800513215e-03 0.000000000000e+00 -1.141800513207e-03 -8.200000000000e-15 8.400000000000e+00 1.142240372159e-03 0.000000000000e+00 -1.142240372151e-03 -8.400000000000e-15 8.600000000000e+00 1.142670311572e-03 0.000000000000e+00 -1.142670311563e-03 -8.600000000000e-15 8.800000000000e+00 1.143091032657e-03 0.000000000000e+00 -1.143091032648e-03 -8.800000000000e-15 9.000000000000e+00 1.143503163548e-03 0.000000000000e+00 -1.143503163539e-03 -9.000000000000e-15 9.200000000000e+00 1.143907271251e-03 0.000000000000e+00 -1.143907271242e-03 -9.200000000000e-15 9.400000000000e+00 1.144303870082e-03 0.000000000000e+00 -1.144303870072e-03 -9.400000000000e-15 9.600000000000e+00 1.144693428131e-03 0.000000000000e+00 -1.144693428122e-03 -9.600000000000e-15 9.800000000000e+00 1.145076372533e-03 0.000000000000e+00 -1.145076372523e-03 -9.800000000000e-15 1.000000000000e+01 1.145453093896e-03 0.000000000000e+00 -1.145453093886e-03 -1.000000000000e-14 1.020000000000e+01 1.145823950133e-03 0.000000000000e+00 -1.145823950123e-03 -1.020000000000e-14 1.040000000000e+01 1.146189269795e-03 0.000000000000e+00 -1.146189269785e-03 -1.040000000000e-14 1.060000000000e+01 1.146549355007e-03 0.000000000000e+00 -1.146549354996e-03 -1.060000000000e-14 1.080000000000e+01 1.146904484066e-03 0.000000000000e+00 -1.146904484056e-03 -1.080000000000e-14 1.100000000000e+01 1.147254913749e-03 0.000000000000e+00 -1.147254913738e-03 -1.100000000000e-14 1.120000000000e+01 1.147600881354e-03 0.000000000000e+00 -1.147600881342e-03 -1.120000000000e-14 1.140000000000e+01 1.147942606533e-03 0.000000000000e+00 -1.147942606522e-03 -1.140000000000e-14 1.160000000000e+01 1.148280292922e-03 0.000000000000e+00 -1.148280292910e-03 -1.160000000000e-14 1.180000000000e+01 1.148614129593e-03 0.000000000000e+00 -1.148614129581e-03 -1.180000000000e-14 1.200000000000e+01 1.148944292363e-03 0.000000000000e+00 -1.148944292351e-03 -1.200000000000e-14 1.220000000000e+01 1.149270944964e-03 0.000000000000e+00 -1.149270944952e-03 -1.220000000000e-14 1.240000000000e+01 1.149594240087e-03 0.000000000000e+00 -1.149594240075e-03 -1.240000000000e-14 1.260000000000e+01 1.149914320334e-03 0.000000000000e+00 -1.149914320322e-03 -1.260000000000e-14 1.280000000000e+01 1.150231319061e-03 0.000000000000e+00 -1.150231319048e-03 -1.280000000000e-14 1.300000000000e+01 1.150545361145e-03 0.000000000000e+00 -1.150545361132e-03 -1.300000000000e-14 1.320000000000e+01 1.150856563677e-03 0.000000000000e+00 -1.150856563664e-03 -1.320000000000e-14 1.340000000000e+01 1.151165036586e-03 0.000000000000e+00 -1.151165036572e-03 -1.340000000000e-14 1.360000000000e+01 1.151470883203e-03 0.000000000000e+00 -1.151470883189e-03 -1.360000000000e-14 1.380000000000e+01 1.151774200776e-03 0.000000000000e+00 -1.151774200763e-03 -1.380000000000e-14 1.400000000000e+01 1.152075080934e-03 0.000000000000e+00 -1.152075080920e-03 -1.400000000000e-14 1.420000000000e+01 1.152373610109e-03 0.000000000000e+00 -1.152373610094e-03 -1.420000000000e-14 1.440000000000e+01 1.152669869920e-03 0.000000000000e+00 -1.152669869906e-03 -1.440000000000e-14 1.460000000000e+01 1.152963937529e-03 0.000000000000e+00 -1.152963937514e-03 -1.460000000000e-14 1.480000000000e+01 1.153255885954e-03 0.000000000000e+00 -1.153255885939e-03 -1.480000000000e-14 1.500000000000e+01 1.153545784366e-03 0.000000000000e+00 -1.153545784351e-03 -1.500000000000e-14 1.520000000000e+01 1.153833698354e-03 0.000000000000e+00 -1.153833698339e-03 -1.520000000000e-14 1.540000000000e+01 1.154119690172e-03 0.000000000000e+00 -1.154119690157e-03 -1.540000000000e-14 1.560000000000e+01 1.154403818963e-03 0.000000000000e+00 -1.154403818948e-03 -1.560000000000e-14 1.580000000000e+01 1.154686140964e-03 0.000000000000e+00 -1.154686140948e-03 -1.580000000000e-14 1.600000000000e+01 1.154966709697e-03 0.000000000000e+00 -1.154966709681e-03 -1.600000000000e-14 1.620000000000e+01 1.155245576144e-03 0.000000000000e+00 -1.155245576128e-03 -1.620000000000e-14 1.640000000000e+01 1.155522788908e-03 0.000000000000e+00 -1.155522788891e-03 -1.640000000000e-14 1.660000000000e+01 1.155798394358e-03 0.000000000000e+00 -1.155798394342e-03 -1.660000000000e-14 1.680000000000e+01 1.156072436774e-03 0.000000000000e+00 -1.156072436757e-03 -1.680000000000e-14 1.700000000000e+01 1.156344958464e-03 0.000000000000e+00 -1.156344958447e-03 -1.700000000000e-14 1.720000000000e+01 1.156615999888e-03 0.000000000000e+00 -1.156615999871e-03 -1.720000000000e-14 1.740000000000e+01 1.156885599767e-03 0.000000000000e+00 -1.156885599749e-03 -1.740000000000e-14 1.760000000000e+01 1.157153795179e-03 0.000000000000e+00 -1.157153795161e-03 -1.760000000000e-14 1.780000000000e+01 1.157420621657e-03 0.000000000000e+00 -1.157420621639e-03 -1.780000000000e-14 1.800000000000e+01 1.157686113275e-03 0.000000000000e+00 -1.157686113257e-03 -1.800000000000e-14 1.820000000000e+01 1.157950302729e-03 0.000000000000e+00 -1.157950302711e-03 -1.820000000000e-14 1.840000000000e+01 1.158213221412e-03 0.000000000000e+00 -1.158213221393e-03 -1.840000000000e-14 1.860000000000e+01 1.158474899483e-03 0.000000000000e+00 -1.158474899464e-03 -1.860000000000e-14 1.880000000000e+01 1.158735365937e-03 0.000000000000e+00 -1.158735365918e-03 -1.880000000000e-14 1.900000000000e+01 1.158994648662e-03 0.000000000000e+00 -1.158994648643e-03 -1.900000000000e-14 1.920000000000e+01 1.159252774498e-03 0.000000000000e+00 -1.159252774479e-03 -1.920000000000e-14 1.940000000000e+01 1.159509769292e-03 0.000000000000e+00 -1.159509769272e-03 -1.940000000000e-14 1.960000000000e+01 1.159765657943e-03 0.000000000000e+00 -1.159765657924e-03 -1.960000000000e-14 1.980000000000e+01 1.160020464458e-03 0.000000000000e+00 -1.160020464438e-03 -1.980000000000e-14 2.000000000000e+01 1.160274211986e-03 0.000000000000e+00 -1.160274211966e-03 -2.000000000000e-14 1.000000000000e+00 6.375482682111e-04 0.000000000000e+00 -6.375482682101e-04 -1.000000000000e-15 1.200000000000e+00 7.493205736711e-04 0.000000000000e+00 -7.493205736699e-04 -1.200000000000e-15 1.400000000000e+00 8.564729701626e-04 0.000000000000e+00 -8.564729701612e-04 -1.400000000000e-15 1.600000000000e+00 9.592446017156e-04 0.000000000000e+00 -9.592446017140e-04 -1.600000000000e-15 1.800000000000e+00 1.057860606286e-03 0.000000000000e+00 -1.057860606285e-03 -1.800000000000e-15 2.000000000000e+00 1.152532696913e-03 0.000000000000e+00 -1.152532696911e-03 -2.000000000000e-15 2.200000000000e+00 1.243459813371e-03 0.000000000000e+00 -1.243459813369e-03 -2.200000000000e-15 2.400000000000e+00 1.330828809049e-03 0.000000000000e+00 -1.330828809046e-03 -2.400000000000e-15 2.600000000000e+00 1.414815160513e-03 0.000000000000e+00 -1.414815160511e-03 -2.600000000000e-15 2.800000000000e+00 1.495583605374e-03 0.000000000000e+00 -1.495583605371e-03 -2.800000000000e-15 3.000000000000e+00 1.573288902262e-03 0.000000000000e+00 -1.573288902259e-03 -3.000000000000e-15 3.200000000000e+00 1.648076414006e-03 0.000000000000e+00 -1.648076414003e-03 -3.200000000000e-15 3.400000000000e+00 1.720082742600e-03 0.000000000000e+00 -1.720082742597e-03 -3.400000000000e-15 3.600000000000e+00 1.789436313531e-03 0.000000000000e+00 -1.789436313527e-03 -3.600000000000e-15 3.800000000000e+00 1.856257926235e-03 0.000000000000e+00 -1.856257926232e-03 -3.800000000000e-15 4.000000000000e+00 1.920661270602e-03 0.000000000000e+00 -1.920661270598e-03 -4.000000000000e-15 4.200000000000e+00 1.982753410138e-03 0.000000000000e+00 -1.982753410134e-03 -4.200000000000e-15 4.400000000000e+00 2.042635232913e-03 0.000000000000e+00 -2.042635232909e-03 -4.400000000000e-15 4.600000000000e+00 2.100401871669e-03 0.000000000000e+00 -2.100401871664e-03 -4.600000000000e-15 4.800000000000e+00 2.156143094697e-03 0.000000000000e+00 -2.156143094692e-03 -4.800000000000e-15 5.000000000000e+00 2.209943669140e-03 0.000000000000e+00 -2.209943669135e-03 -5.000000000000e-15 5.200000000000e+00 2.261883698439e-03 0.000000000000e+00 -2.261883698433e-03 -5.200000000000e-15 5.400000000000e+00 2.312038935591e-03 0.000000000000e+00 -2.312038935585e-03 -5.400000000000e-15 5.600000000000e+00 2.360481073879e-03 0.000000000000e+00 -2.360481073873e-03 -5.600000000000e-15 5.800000000000e+00 2.407278016628e-03 0.000000000000e+00 -2.407278016622e-03 -5.800000000000e-15 6.000000000000e+00 2.452494127499e-03 0.000000000000e+00 -2.452494127493e-03 -6.000000000000e-15 6.200000000000e+00 2.496190462723e-03 0.000000000000e+00 -2.496190462717e-03 -6.200000000000e-15 6.400000000000e+00 2.538424986598e-03 0.000000000000e+00 -2.538424986591e-03 -6.400000000000e-15 6.600000000000e+00 2.579252771492e-03 0.000000000000e+00 -2.579252771486e-03 -6.600000000000e-15 6.800000000000e+00 2.618726183495e-03 0.000000000000e+00 -2.618726183489e-03 -6.800000000000e-15 7.000000000000e+00 2.656895054784e-03 0.000000000000e+00 -2.656895054777e-03 -7.000000000000e-15 7.200000000000e+00 2.693806843699e-03 0.000000000000e+00 -2.693806843691e-03 -7.200000000000e-15 7.400000000000e+00 2.729506783430e-03 0.000000000000e+00 -2.729506783423e-03 -7.400000000000e-15 7.600000000000e+00 2.764038020179e-03 0.000000000000e+00 -2.764038020171e-03 -7.600000000000e-15 7.800000000000e+00 2.797441741543e-03 0.000000000000e+00 -2.797441741535e-03 -7.800000000000e-15 8.000000000000e+00 2.829757295871e-03 0.000000000000e+00 -2.829757295863e-03 -8.000000000000e-15 8.200000000000e+00 2.861022303241e-03 0.000000000000e+00 -2.861022303233e-03 -8.200000000000e-15 8.400000000000e+00 2.891272758657e-03 0.000000000000e+00 -2.891272758648e-03 -8.400000000000e-15 8.600000000000e+00 2.920543128056e-03 0.000000000000e+00 -2.920543128047e-03 -8.600000000000e-15 8.800000000000e+00 2.948866437627e-03 0.000000000000e+00 -2.948866437618e-03 -8.800000000000e-15 9.000000000000e+00 2.976274356927e-03 0.000000000000e+00 -2.976274356918e-03 -9.000000000000e-15 9.200000000000e+00 3.002797276237e-03 0.000000000000e+00 -3.002797276227e-03 -9.200000000000e-15 9.400000000000e+00 3.028464378576e-03 0.000000000000e+00 -3.028464378567e-03 -9.400000000000e-15 9.600000000000e+00 3.053303706749e-03 0.000000000000e+00 -3.053303706740e-03 -9.600000000000e-15 9.800000000000e+00 3.077342225775e-03 0.000000000000e+00 -3.077342225765e-03 -9.800000000000e-15 1.000000000000e+01 3.100605881034e-03 0.000000000000e+00 -3.100605881024e-03 -1.000000000000e-14 1.020000000000e+01 3.123119652431e-03 0.000000000000e+00 -3.123119652421e-03 -1.020000000000e-14 1.040000000000e+01 3.144907604857e-03 0.000000000000e+00 -3.144907604847e-03 -1.040000000000e-14 1.060000000000e+01 3.165992935212e-03 0.000000000000e+00 -3.165992935201e-03 -1.060000000000e-14 1.080000000000e+01 3.186398016232e-03 0.000000000000e+00 -3.186398016221e-03 -1.080000000000e-14 1.100000000000e+01 3.206144437356e-03 0.000000000000e+00 -3.206144437345e-03 -1.100000000000e-14 1.120000000000e+01 3.225253042824e-03 0.000000000000e+00 -3.225253042813e-03 -1.120000000000e-14 1.140000000000e+01 3.243743967236e-03 0.000000000000e+00 -3.243743967224e-03 -1.140000000000e-14 1.160000000000e+01 3.261636668716e-03 0.000000000000e+00 -3.261636668705e-03 -1.160000000000e-14 1.180000000000e+01 3.278949959896e-03 0.000000000000e+00 -3.278949959884e-03 -1.180000000000e-14 1.200000000000e+01 3.295702036840e-03 0.000000000000e+00 -3.295702036828e-03 -1.200000000000e-14 1.220000000000e+01 3.311910506092e-03 0.000000000000e+00 -3.311910506080e-03 -1.220000000000e-14 1.240000000000e+01 3.327592409960e-03 0.000000000000e+00 -3.327592409948e-03 -1.240000000000e-14 1.260000000000e+01 3.342764250185e-03 0.000000000000e+00 -3.342764250172e-03 -1.260000000000e-14 1.280000000000e+01 3.357442010108e-03 0.000000000000e+00 -3.357442010096e-03 -1.280000000000e-14 1.300000000000e+01 3.371641175449e-03 0.000000000000e+00 -3.371641175436e-03 -1.300000000000e-14 1.320000000000e+01 3.385376753799e-03 0.000000000000e+00 -3.385376753786e-03 -1.320000000000e-14 1.340000000000e+01 3.398663292935e-03 0.000000000000e+00 -3.398663292921e-03 -1.340000000000e-14 1.360000000000e+01 3.411514898030e-03 0.000000000000e+00 -3.411514898016e-03 -1.360000000000e-14 1.380000000000e+01 3.423945247859e-03 0.000000000000e+00 -3.423945247845e-03 -1.380000000000e-14 1.400000000000e+01 3.435967610068e-03 0.000000000000e+00 -3.435967610054e-03 -1.400000000000e-14 1.420000000000e+01 3.447594855581e-03 0.000000000000e+00 -3.447594855567e-03 -1.420000000000e-14 1.440000000000e+01 3.458839472209e-03 0.000000000000e+00 -3.458839472195e-03 -1.440000000000e-14 1.460000000000e+01 3.469713577526e-03 0.000000000000e+00 -3.469713577512e-03 -1.460000000000e-14 1.480000000000e+01 3.480228931062e-03 0.000000000000e+00 -3.480228931048e-03 -1.480000000000e-14 1.500000000000e+01 3.490396945871e-03 0.000000000000e+00 -3.490396945856e-03 -1.500000000000e-14 1.520000000000e+01 3.500228699511e-03 0.000000000000e+00 -3.500228699495e-03 -1.520000000000e-14 1.540000000000e+01 3.509734944492e-03 0.000000000000e+00 -3.509734944477e-03 -1.540000000000e-14 1.560000000000e+01 3.518926118222e-03 0.000000000000e+00 -3.518926118207e-03 -1.560000000000e-14 1.580000000000e+01 3.527812352483e-03 0.000000000000e+00 -3.527812352468e-03 -1.580000000000e-14 1.600000000000e+01 3.536403482487e-03 0.000000000000e+00 -3.536403482471e-03 -1.600000000000e-14 1.620000000000e+01 3.544709055522e-03 0.000000000000e+00 -3.544709055505e-03 -1.620000000000e-14 1.640000000000e+01 3.552738339227e-03 0.000000000000e+00 -3.552738339210e-03 -1.640000000000e-14 1.660000000000e+01 3.560500329523e-03 0.000000000000e+00 -3.560500329507e-03 -1.660000000000e-14 1.680000000000e+01 3.568003758214e-03 0.000000000000e+00 -3.568003758198e-03 -1.680000000000e-14 1.700000000000e+01 3.575257100285e-03 0.000000000000e+00 -3.575257100268e-03 -1.700000000000e-14 1.720000000000e+01 3.582268580917e-03 0.000000000000e+00 -3.582268580900e-03 -1.720000000000e-14 1.740000000000e+01 3.589046182235e-03 0.000000000000e+00 -3.589046182218e-03 -1.740000000000e-14 1.760000000000e+01 3.595597649812e-03 0.000000000000e+00 -3.595597649794e-03 -1.760000000000e-14 1.780000000000e+01 3.601930498930e-03 0.000000000000e+00 -3.601930498912e-03 -1.780000000000e-14 1.800000000000e+01 3.608052020637e-03 0.000000000000e+00 -3.608052020619e-03 -1.800000000000e-14 1.820000000000e+01 3.613969287586e-03 0.000000000000e+00 -3.613969287568e-03 -1.820000000000e-14 1.840000000000e+01 3.619689159695e-03 0.000000000000e+00 -3.619689159677e-03 -1.840000000000e-14 1.860000000000e+01 3.625218289620e-03 0.000000000000e+00 -3.625218289601e-03 -1.860000000000e-14 1.880000000000e+01 3.630563128065e-03 0.000000000000e+00 -3.630563128047e-03 -1.880000000000e-14 1.900000000000e+01 3.635729928941e-03 0.000000000000e+00 -3.635729928922e-03 -1.900000000000e-14 1.920000000000e+01 3.640724754370e-03 0.000000000000e+00 -3.640724754350e-03 -1.920000000000e-14 1.940000000000e+01 3.645553479559e-03 0.000000000000e+00 -3.645553479540e-03 -1.940000000000e-14 1.960000000000e+01 3.650221797555e-03 0.000000000000e+00 -3.650221797535e-03 -1.960000000000e-14 1.980000000000e+01 3.654735223867e-03 0.000000000000e+00 -3.654735223847e-03 -1.980000000000e-14 2.000000000000e+01 3.659099100991e-03 0.000000000000e+00 -3.659099100971e-03 -2.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/acVd_corsrd1.standard0000644000265600020320000000640212264261473024073 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 1 2.382045758131e-05 4.121930002820e-04 4.39713585242687e-14 1.59742575096595e-14 2 4.771693525000e-05 3.399294059881e-04 4.70588406537286e-14 1.47617032690996e-14 3 7.276060870312e-05 2.809128500801e-04 4.99049169589685e-14 1.38191791947696e-14 4 9.946170346805e-05 2.323322521622e-04 5.25707586649185e-14 1.30516982317896e-14 5 1.280131052079e-04 1.919353948577e-04 5.50684031392184e-14 1.23926749803096e-14 6 1.583714480389e-04 1.580216497092e-04 5.73754530040683e-14 1.17944801100297e-14 7 1.902762715964e-04 1.293448073543e-04 5.94473730795983e-14 1.12239152787497e-14 8 2.232543988173e-04 1.050077763331e-04 6.12336367255082e-14 1.06620039282497e-14 9 2.566368824524e-04 8.436923325930e-05 6.27012119037982e-14 1.01059453991897e-14 10 2.896060923914e-04 6.696375662228e-05 6.38606878821281e-14 9.56958457552372e-15 11 3.212805197718e-04 5.243372831815e-05 6.47802789541681e-14 9.07859498936573e-15 12 3.508293379956e-04 4.047374789366e-05 6.55722233636581e-14 8.65971468570275e-15 13 3.775894945618e-04 3.079166882970e-05 6.63523078756681e-14 8.32853469692876e-15 14 4.011478294312e-04 2.309020538231e-05 6.7193245199708e-14 8.08219328017276e-15 15 4.213625266423e-04 1.706781929067e-05 6.8090955412508e-14 7.89852855304277e-15 16 4.383262644885e-04 1.243134982093e-05 6.8926859538448e-14 7.73378998162077e-15 17 4.522958761829e-04 8.910955706428e-06 6.9275798250698e-14 7.48459054266078e-15 18 4.636168081036e-04 6.270948466572e-06 6.63669934113281e-14 6.55745639836281e-15 19 4.726602885958e-04 4.314564847418e-06 5.64620469030483e-14 4.25007698352688e-15 20 4.797782486269e-04 2.883801497964e-06 5.24373028013985e-14 3.2986895714119e-15 1 2.157359325991e-05 3.067427737642e-04 3.94533791747088e-14 2.01814536301394e-14 2 4.442149720101e-05 2.505052520264e-04 4.25977072669988e-14 1.86817382770095e-14 3 6.919130940552e-05 2.026570794588e-04 4.54617869327087e-14 1.73424890905595e-14 4 9.587738952861e-05 1.621250444945e-04 4.80048177422586e-14 1.61037458871695e-14 5 1.239999649415e-04 1.279766284322e-04 5.01785525546785e-14 1.49194651660596e-14 6 1.527259632610e-04 9.946786107710e-05 5.19385019887785e-14 1.37684422608296e-14 7 1.810063391934e-04 7.600081197316e-05 5.32699214295484e-14 1.26646418145996e-14 8 2.077495768247e-04 5.705008851298e-05 5.42190984581884e-14 1.16558405765697e-14 9 2.320119734260e-04 4.209510801729e-05 5.48989696837484e-14 1.08002037204797e-14 10 2.531579340367e-04 3.058150465143e-05 5.54475503138884e-14 1.01312380665897e-14 11 2.709341503234e-04 2.192442565204e-05 5.59616842369784e-14 9.63594305669072e-15 12 2.854338004480e-04 1.554597313536e-05 5.64415779854283e-14 9.25291804671073e-15 13 2.969851112712e-04 1.092077501891e-05 5.67009510340083e-14 8.85154864529374e-15 14 3.060263738919e-04 7.606418678728e-06 5.56328178909484e-14 7.92054324010377e-15 15 3.130104763434e-04 5.252180465099e-06 4.99496906905585e-14 5.11191256198285e-15 16 3.183495417381e-04 3.591932775398e-06 4.71512399567886e-14 3.74403511155389e-15 17 3.223911574122e-04 2.429822948025e-06 4.59695063505687e-14 3.13349643993391e-15 18 3.254133615738e-04 1.624869569371e-06 4.52841542087487e-14 2.76542246691492e-15 19 3.276280268332e-04 1.077551599703e-06 4.48107774105987e-14 2.50937967862293e-15 20 3.291864253561e-04 7.193114782922e-07 4.44296737750087e-14 2.31326819826093e-15 ngspice-26/tests/hisimhv1/nmos/reference/noise1.standard0000644000265600020320000001167712264261473022771 0ustar andreasadminFreq N(d) 1000 7.605375381051e-31 1258.925411794 7.605375560373e-31 1584.893192461 7.605375844579e-31 1995.262314969 7.605376295016e-31 2511.88643151 7.605377008909e-31 3162.277660168 7.605378140354e-31 3981.071705535 7.605379933574e-31 5011.872336273 7.605382775635e-31 6309.573444802 7.605387279999e-31 7943.282347243 7.605394418934e-31 10000 7.605405733384e-31 12589.25411794 7.605423665579e-31 15848.93192461 7.605452086192e-31 19952.62314969 7.605497129828e-31 25118.8643151 7.605568519181e-31 31622.77660168 7.605681663681e-31 39810.71705535 7.605860985628e-31 50118.72336273 7.606145191761e-31 63095.73444802 7.606595628126e-31 79432.82347243 7.607309521655e-31 100000 7.60844096665e-31 125892.5411794 7.610234186119e-31 158489.3192461 7.613076247448e-31 199526.2314969 7.617580611102e-31 251188.643151 7.624719546393e-31 316227.7660168 7.636033996336e-31 398107.1705535 7.653966191026e-31 501187.2336273 7.682386804313e-31 630957.3444802 7.72743044083e-31 794328.2347243 7.798819793691e-31 1000000 7.911964293006e-31 1258925.411794 8.091286239616e-31 1584893.192461 8.375492371756e-31 1995262.314969 8.825928735087e-31 2511886.43151 9.539822259071e-31 3162277.660168 1.067126724062e-30 3981071.705535 1.246448667756e-30 5011872.336273 1.530654792571e-30 6309573.444802 1.981091137504e-30 7943282.347243 2.694984615274e-30 10000000 3.826429480735e-30 12589254.11794 5.619648626082e-30 15848931.92461 8.461709141796e-30 19952623.14969 1.29660707513e-29 25118864.3151 2.010500090759e-29 31622776.60168 3.141943795373e-29 39810717.05535 4.935160024808e-29 50118723.36273 7.777213216088e-29 63095734.44802 1.228155642747e-28 79432823.47243 1.942044036987e-28 100000000 3.073476133239e-28 1000 4.473181984904e-24 1258.925411794 4.473181984904e-24 1584.893192461 4.473181984905e-24 1995.262314969 4.473181984905e-24 2511.88643151 4.473181984905e-24 3162.277660168 4.473181984905e-24 3981.071705535 4.473181984905e-24 5011.872336273 4.473181984906e-24 6309.573444802 4.473181984907e-24 7943.282347243 4.473181984908e-24 10000 4.47318198491e-24 12589.25411794 4.473181984914e-24 15848.93192461 4.473181984919e-24 19952.62314969 4.473181984928e-24 25118.8643151 4.473181984941e-24 31622.77660168 4.473181984963e-24 39810.71705535 4.473181984997e-24 50118.72336273 4.473181985051e-24 63095.73444802 4.473181985136e-24 79432.82347243 4.473181985272e-24 100000 4.473181985487e-24 125892.5411794 4.473181985827e-24 158489.3192461 4.473181986367e-24 199526.2314969 4.473181987222e-24 251188.643151 4.473181988578e-24 316227.7660168 4.473181990727e-24 398107.1705535 4.473181994132e-24 501187.2336273 4.47318199953e-24 630957.3444802 4.473182008084e-24 794328.2347243 4.473182021642e-24 1000000 4.473182043129e-24 1258925.411794 4.473182077184e-24 1584893.192461 4.473182131158e-24 1995262.314969 4.473182216702e-24 2511886.43151 4.473182352278e-24 3162277.660168 4.473182567152e-24 3981071.705535 4.473182907705e-24 5011872.336273 4.473183447445e-24 6309573.444802 4.473184302876e-24 7943282.347243 4.473185658641e-24 10000000 4.473187807384e-24 12589254.11794 4.473191212913e-24 15848931.92461 4.473196610311e-24 19952623.14969 4.47320516461e-24 25118864.3151 4.473218722255e-24 31622776.60168 4.473240209666e-24 39810717.05535 4.473274264891e-24 50118723.36273 4.473328238726e-24 63095734.44802 4.473413781335e-24 79432823.47243 4.473549356847e-24 100000000 4.473764228583e-24 1000 2.736088720265e-23 1258.925411794 2.736088720265e-23 1584.893192461 2.736088720265e-23 1995.262314969 2.736088720265e-23 2511.88643151 2.736088720265e-23 3162.277660168 2.736088720265e-23 3981.071705535 2.736088720265e-23 5011.872336273 2.736088720265e-23 6309.573444802 2.736088720265e-23 7943.282347243 2.736088720265e-23 10000 2.736088720265e-23 12589.25411794 2.736088720266e-23 15848.93192461 2.736088720266e-23 19952.62314969 2.736088720266e-23 25118.8643151 2.736088720267e-23 31622.77660168 2.736088720267e-23 39810.71705535 2.736088720269e-23 50118.72336273 2.736088720271e-23 63095.73444802 2.736088720274e-23 79432.82347243 2.736088720279e-23 100000 2.736088720287e-23 125892.5411794 2.736088720299e-23 158489.3192461 2.736088720319e-23 199526.2314969 2.736088720351e-23 251188.643151 2.736088720401e-23 316227.7660168 2.73608872048e-23 398107.1705535 2.736088720606e-23 501187.2336273 2.736088720806e-23 630957.3444802 2.736088721122e-23 794328.2347243 2.736088721623e-23 1000000 2.736088722417e-23 1258925.411794 2.736088723676e-23 1584893.192461 2.736088725671e-23 1995262.314969 2.736088728833e-23 2511886.43151 2.736088733844e-23 3162277.660168 2.736088741787e-23 3981071.705535 2.736088754375e-23 5011872.336273 2.736088774325e-23 6309573.444802 2.736088805944e-23 7943282.347243 2.736088856057e-23 10000000 2.736088935481e-23 12589254.11794 2.736089061359e-23 15848931.92461 2.736089260862e-23 19952623.14969 2.736089577053e-23 25118864.3151 2.736090078182e-23 31622776.60168 2.736090872417e-23 39810717.05535 2.736092131194e-23 50118723.36273 2.736094126218e-23 63095734.44802 2.736097288111e-23 79432823.47243 2.736102299355e-23 100000000 2.736110241596e-23 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Id1_vb0_jd.standard0000644000265600020320000024357112264261473024742 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.788298853630e-04 0.000000000000e+00 -2.788298853620e-04 -1.010000000000e-15 1.200000000000e+00 3.281749663391e-04 0.000000000000e+00 -3.281749663379e-04 -1.210000000000e-15 1.400000000000e+00 3.756594837620e-04 0.000000000000e+00 -3.756594837606e-04 -1.410000000000e-15 1.600000000000e+00 4.213862320375e-04 0.000000000000e+00 -4.213862320359e-04 -1.610000000000e-15 1.800000000000e+00 4.654507304358e-04 0.000000000000e+00 -4.654507304340e-04 -1.810000000000e-15 2.000000000000e+00 5.079418278978e-04 0.000000000000e+00 -5.079418278958e-04 -2.010000000000e-15 2.200000000000e+00 5.489422530289e-04 0.000000000000e+00 -5.489422530267e-04 -2.210000000000e-15 2.400000000000e+00 5.885291140451e-04 0.000000000000e+00 -5.885291140427e-04 -2.410000000000e-15 2.600000000000e+00 6.267743532409e-04 0.000000000000e+00 -6.267743532383e-04 -2.610000000000e-15 2.800000000000e+00 6.637451602460e-04 0.000000000000e+00 -6.637451602432e-04 -2.810000000000e-15 3.000000000000e+00 6.995043479944e-04 0.000000000000e+00 -6.995043479913e-04 -3.010000000000e-15 3.200000000000e+00 7.341106949876e-04 0.000000000000e+00 -7.341106949844e-04 -3.210000000000e-15 3.400000000000e+00 7.676192571003e-04 0.000000000000e+00 -7.676192570969e-04 -3.410000000000e-15 3.600000000000e+00 8.000816518640e-04 0.000000000000e+00 -8.000816518604e-04 -3.610000000000e-15 3.800000000000e+00 8.315463178798e-04 0.000000000000e+00 -8.315463178760e-04 -3.810000000000e-15 4.000000000000e+00 8.620587517448e-04 0.000000000000e+00 -8.620587517408e-04 -4.010000000000e-15 4.200000000000e+00 8.916617246413e-04 0.000000000000e+00 -8.916617246371e-04 -4.210000000000e-15 4.400000000000e+00 9.203954805182e-04 0.000000000000e+00 -9.203954805138e-04 -4.410000000000e-15 4.600000000000e+00 9.482979263366e-04 0.000000000000e+00 -9.482979263320e-04 -4.610000000000e-15 4.800000000000e+00 9.754047626849e-04 0.000000000000e+00 -9.754047626800e-04 -4.810000000000e-15 5.000000000000e+00 1.001749691521e-03 0.000000000000e+00 -1.001749691516e-03 -5.010000000000e-15 5.200000000000e+00 1.027364518748e-03 0.000000000000e+00 -1.027364518742e-03 -5.210000000000e-15 5.400000000000e+00 1.052279292862e-03 0.000000000000e+00 -1.052279292857e-03 -5.410000000000e-15 5.600000000000e+00 1.076522423620e-03 0.000000000000e+00 -1.076522423615e-03 -5.610000000000e-15 5.800000000000e+00 1.100120791352e-03 0.000000000000e+00 -1.100120791347e-03 -5.810000000000e-15 6.000000000000e+00 1.123099847757e-03 0.000000000000e+00 -1.123099847750e-03 -6.010000000000e-15 6.200000000000e+00 1.145483708915e-03 0.000000000000e+00 -1.145483708909e-03 -6.210000000000e-15 6.400000000000e+00 1.167295241219e-03 0.000000000000e+00 -1.167295241213e-03 -6.410000000000e-15 6.600000000000e+00 1.188556140809e-03 0.000000000000e+00 -1.188556140802e-03 -6.610000000000e-15 6.800000000000e+00 1.209287007088e-03 0.000000000000e+00 -1.209287007081e-03 -6.810000000000e-15 7.000000000000e+00 1.229507410815e-03 0.000000000000e+00 -1.229507410808e-03 -7.010000000000e-15 7.200000000000e+00 1.249235957219e-03 0.000000000000e+00 -1.249235957212e-03 -7.210000000000e-15 7.400000000000e+00 1.268490344570e-03 0.000000000000e+00 -1.268490344563e-03 -7.410000000000e-15 7.600000000000e+00 1.287287418553e-03 0.000000000000e+00 -1.287287418545e-03 -7.610000000000e-15 7.800000000000e+00 1.305643222811e-03 0.000000000000e+00 -1.305643222803e-03 -7.810000000000e-15 8.000000000000e+00 1.323573045953e-03 0.000000000000e+00 -1.323573045945e-03 -8.010000000000e-15 8.200000000000e+00 1.341091465312e-03 0.000000000000e+00 -1.341091465304e-03 -8.210000000000e-15 8.400000000000e+00 1.358212387707e-03 0.000000000000e+00 -1.358212387698e-03 -8.410000000000e-15 8.600000000000e+00 1.374949087451e-03 0.000000000000e+00 -1.374949087442e-03 -8.610000000000e-15 8.800000000000e+00 1.391314241810e-03 0.000000000000e+00 -1.391314241802e-03 -8.810000000000e-15 9.000000000000e+00 1.407319964116e-03 0.000000000000e+00 -1.407319964107e-03 -9.010000000000e-15 9.200000000000e+00 1.422977834700e-03 0.000000000000e+00 -1.422977834691e-03 -9.210000000000e-15 9.400000000000e+00 1.438298929825e-03 0.000000000000e+00 -1.438298929816e-03 -9.410000000000e-15 9.600000000000e+00 1.453293848758e-03 0.000000000000e+00 -1.453293848749e-03 -9.610000000000e-15 9.800000000000e+00 1.467972739118e-03 0.000000000000e+00 -1.467972739108e-03 -9.810000000000e-15 1.000000000000e+01 1.482345320628e-03 0.000000000000e+00 -1.482345320618e-03 -1.001000000000e-14 1.020000000000e+01 1.496420907391e-03 0.000000000000e+00 -1.496420907381e-03 -1.021000000000e-14 1.040000000000e+01 1.510208428784e-03 0.000000000000e+00 -1.510208428773e-03 -1.041000000000e-14 1.060000000000e+01 1.523716449082e-03 0.000000000000e+00 -1.523716449072e-03 -1.061000000000e-14 1.080000000000e+01 1.536953185893e-03 0.000000000000e+00 -1.536953185882e-03 -1.081000000000e-14 1.100000000000e+01 1.549926527482e-03 0.000000000000e+00 -1.549926527470e-03 -1.101000000000e-14 1.120000000000e+01 1.562644049076e-03 0.000000000000e+00 -1.562644049065e-03 -1.121000000000e-14 1.140000000000e+01 1.575113028208e-03 0.000000000000e+00 -1.575113028197e-03 -1.141000000000e-14 1.160000000000e+01 1.587340459162e-03 0.000000000000e+00 -1.587340459150e-03 -1.161000000000e-14 1.180000000000e+01 1.599333066592e-03 0.000000000000e+00 -1.599333066580e-03 -1.181000000000e-14 1.200000000000e+01 1.611097318359e-03 0.000000000000e+00 -1.611097318347e-03 -1.201000000000e-14 1.220000000000e+01 1.622639437646e-03 0.000000000000e+00 -1.622639437633e-03 -1.221000000000e-14 1.240000000000e+01 1.633965414384e-03 0.000000000000e+00 -1.633965414371e-03 -1.241000000000e-14 1.260000000000e+01 1.645081016055e-03 0.000000000000e+00 -1.645081016043e-03 -1.261000000000e-14 1.280000000000e+01 1.655991797895e-03 0.000000000000e+00 -1.655991797882e-03 -1.281000000000e-14 1.300000000000e+01 1.666703112532e-03 0.000000000000e+00 -1.666703112519e-03 -1.301000000000e-14 1.320000000000e+01 1.677220119122e-03 0.000000000000e+00 -1.677220119109e-03 -1.321000000000e-14 1.340000000000e+01 1.687547791975e-03 0.000000000000e+00 -1.687547791962e-03 -1.341000000000e-14 1.360000000000e+01 1.697690928736e-03 0.000000000000e+00 -1.697690928723e-03 -1.361000000000e-14 1.380000000000e+01 1.707654158132e-03 0.000000000000e+00 -1.707654158118e-03 -1.381000000000e-14 1.400000000000e+01 1.717441947310e-03 0.000000000000e+00 -1.717441947296e-03 -1.401000000000e-14 1.420000000000e+01 1.727058608803e-03 0.000000000000e+00 -1.727058608789e-03 -1.421000000000e-14 1.440000000000e+01 1.736508307134e-03 0.000000000000e+00 -1.736508307120e-03 -1.441000000000e-14 1.460000000000e+01 1.745795065083e-03 0.000000000000e+00 -1.745795065068e-03 -1.461000000000e-14 1.480000000000e+01 1.754922769642e-03 0.000000000000e+00 -1.754922769627e-03 -1.481000000000e-14 1.500000000000e+01 1.763895177670e-03 0.000000000000e+00 -1.763895177655e-03 -1.501000000000e-14 1.520000000000e+01 1.772715921267e-03 0.000000000000e+00 -1.772715921252e-03 -1.521000000000e-14 1.540000000000e+01 1.781388512886e-03 0.000000000000e+00 -1.781388512871e-03 -1.541000000000e-14 1.560000000000e+01 1.789916350194e-03 0.000000000000e+00 -1.789916350179e-03 -1.561000000000e-14 1.580000000000e+01 1.798302720698e-03 0.000000000000e+00 -1.798302720683e-03 -1.581000000000e-14 1.600000000000e+01 1.806550806151e-03 0.000000000000e+00 -1.806550806135e-03 -1.601000000000e-14 1.620000000000e+01 1.814663686744e-03 0.000000000000e+00 -1.814663686727e-03 -1.621000000000e-14 1.640000000000e+01 1.822644345107e-03 0.000000000000e+00 -1.822644345091e-03 -1.641000000000e-14 1.660000000000e+01 1.830495670119e-03 0.000000000000e+00 -1.830495670102e-03 -1.661000000000e-14 1.680000000000e+01 1.838220460538e-03 0.000000000000e+00 -1.838220460521e-03 -1.681000000000e-14 1.700000000000e+01 1.845821428470e-03 0.000000000000e+00 -1.845821428453e-03 -1.701000000000e-14 1.720000000000e+01 1.853301202678e-03 0.000000000000e+00 -1.853301202660e-03 -1.721000000000e-14 1.740000000000e+01 1.860662331735e-03 0.000000000000e+00 -1.860662331718e-03 -1.741000000000e-14 1.760000000000e+01 1.867907287047e-03 0.000000000000e+00 -1.867907287029e-03 -1.761000000000e-14 1.780000000000e+01 1.875038465728e-03 0.000000000000e+00 -1.875038465710e-03 -1.781000000000e-14 1.800000000000e+01 1.882058193359e-03 0.000000000000e+00 -1.882058193341e-03 -1.801000000000e-14 1.820000000000e+01 1.888968726618e-03 0.000000000000e+00 -1.888968726600e-03 -1.821000000000e-14 1.840000000000e+01 1.895772255803e-03 0.000000000000e+00 -1.895772255785e-03 -1.841000000000e-14 1.860000000000e+01 1.902470907236e-03 0.000000000000e+00 -1.902470907218e-03 -1.861000000000e-14 1.880000000000e+01 1.909066745576e-03 0.000000000000e+00 -1.909066745557e-03 -1.881000000000e-14 1.900000000000e+01 1.915561776021e-03 0.000000000000e+00 -1.915561776002e-03 -1.901000000000e-14 1.920000000000e+01 1.921957946430e-03 0.000000000000e+00 -1.921957946410e-03 -1.921000000000e-14 1.940000000000e+01 1.928257149345e-03 0.000000000000e+00 -1.928257149326e-03 -1.941000000000e-14 1.960000000000e+01 1.934461223938e-03 0.000000000000e+00 -1.934461223918e-03 -1.961000000000e-14 1.980000000000e+01 1.940571957870e-03 0.000000000000e+00 -1.940571957850e-03 -1.981000000000e-14 2.000000000000e+01 1.946591089079e-03 0.000000000000e+00 -1.946591089059e-03 -2.001000000000e-14 1.000000000000e+00 2.761250030363e-04 0.000000000000e+00 -2.761250030353e-04 -1.010000000000e-15 1.200000000000e+00 3.249872263345e-04 0.000000000000e+00 -3.249872263333e-04 -1.210000000000e-15 1.400000000000e+00 3.720065491601e-04 0.000000000000e+00 -3.720065491587e-04 -1.410000000000e-15 1.600000000000e+00 4.172850682247e-04 0.000000000000e+00 -4.172850682230e-04 -1.610000000000e-15 1.800000000000e+00 4.609176283855e-04 0.000000000000e+00 -4.609176283837e-04 -1.810000000000e-15 2.000000000000e+00 5.029924288407e-04 0.000000000000e+00 -5.029924288387e-04 -2.010000000000e-15 2.200000000000e+00 5.435915738686e-04 0.000000000000e+00 -5.435915738664e-04 -2.210000000000e-15 2.400000000000e+00 5.827915730355e-04 0.000000000000e+00 -5.827915730331e-04 -2.410000000000e-15 2.600000000000e+00 6.206637955632e-04 0.000000000000e+00 -6.206637955606e-04 -2.610000000000e-15 2.800000000000e+00 6.572748832150e-04 0.000000000000e+00 -6.572748832122e-04 -2.810000000000e-15 3.000000000000e+00 6.926871256982e-04 0.000000000000e+00 -6.926871256952e-04 -3.010000000000e-15 3.200000000000e+00 7.269588022196e-04 0.000000000000e+00 -7.269588022163e-04 -3.210000000000e-15 3.400000000000e+00 7.601444924862e-04 0.000000000000e+00 -7.601444924828e-04 -3.410000000000e-15 3.600000000000e+00 7.922953601221e-04 0.000000000000e+00 -7.922953601185e-04 -3.610000000000e-15 3.800000000000e+00 8.234594111756e-04 0.000000000000e+00 -8.234594111718e-04 -3.810000000000e-15 4.000000000000e+00 8.536817301253e-04 0.000000000000e+00 -8.536817301213e-04 -4.010000000000e-15 4.200000000000e+00 8.830046955449e-04 0.000000000000e+00 -8.830046955407e-04 -4.210000000000e-15 4.400000000000e+00 9.114681773713e-04 0.000000000000e+00 -9.114681773669e-04 -4.410000000000e-15 4.600000000000e+00 9.391097262156e-04 0.000000000000e+00 -9.391097262110e-04 -4.610000000000e-15 4.800000000000e+00 9.659647032758e-04 0.000000000000e+00 -9.659647032710e-04 -4.810000000000e-15 5.000000000000e+00 9.920664869648e-04 0.000000000000e+00 -9.920664869598e-04 -5.010000000000e-15 5.200000000000e+00 1.017446574871e-03 0.000000000000e+00 -1.017446574865e-03 -5.210000000000e-15 5.400000000000e+00 1.042134721574e-03 0.000000000000e+00 -1.042134721569e-03 -5.410000000000e-15 5.600000000000e+00 1.066159056571e-03 0.000000000000e+00 -1.066159056565e-03 -5.610000000000e-15 5.800000000000e+00 1.089546192879e-03 0.000000000000e+00 -1.089546192873e-03 -5.810000000000e-15 6.000000000000e+00 1.112321327160e-03 0.000000000000e+00 -1.112321327154e-03 -6.010000000000e-15 6.200000000000e+00 1.134508332090e-03 0.000000000000e+00 -1.134508332084e-03 -6.210000000000e-15 6.400000000000e+00 1.156129841683e-03 0.000000000000e+00 -1.156129841676e-03 -6.410000000000e-15 6.600000000000e+00 1.177207330151e-03 0.000000000000e+00 -1.177207330144e-03 -6.610000000000e-15 6.800000000000e+00 1.197761184878e-03 0.000000000000e+00 -1.197761184871e-03 -6.810000000000e-15 7.000000000000e+00 1.217810773991e-03 0.000000000000e+00 -1.217810773984e-03 -7.010000000000e-15 7.200000000000e+00 1.237374508997e-03 0.000000000000e+00 -1.237374508989e-03 -7.210000000000e-15 7.400000000000e+00 1.256469902883e-03 0.000000000000e+00 -1.256469902875e-03 -7.410000000000e-15 7.600000000000e+00 1.275113624065e-03 0.000000000000e+00 -1.275113624057e-03 -7.610000000000e-15 7.800000000000e+00 1.293321546515e-03 0.000000000000e+00 -1.293321546507e-03 -7.810000000000e-15 8.000000000000e+00 1.311108796384e-03 0.000000000000e+00 -1.311108796376e-03 -8.010000000000e-15 8.200000000000e+00 1.328489795394e-03 0.000000000000e+00 -1.328489795385e-03 -8.210000000000e-15 8.400000000000e+00 1.345478301252e-03 0.000000000000e+00 -1.345478301243e-03 -8.410000000000e-15 8.600000000000e+00 1.362087445337e-03 0.000000000000e+00 -1.362087445329e-03 -8.610000000000e-15 8.800000000000e+00 1.378329767849e-03 0.000000000000e+00 -1.378329767841e-03 -8.810000000000e-15 9.000000000000e+00 1.394217250627e-03 0.000000000000e+00 -1.394217250618e-03 -9.010000000000e-15 9.200000000000e+00 1.409761347815e-03 0.000000000000e+00 -1.409761347806e-03 -9.210000000000e-15 9.400000000000e+00 1.424973014532e-03 0.000000000000e+00 -1.424973014523e-03 -9.410000000000e-15 9.600000000000e+00 1.439862733697e-03 0.000000000000e+00 -1.439862733687e-03 -9.610000000000e-15 9.800000000000e+00 1.454440541148e-03 0.000000000000e+00 -1.454440541138e-03 -9.810000000000e-15 1.000000000000e+01 1.468716049178e-03 0.000000000000e+00 -1.468716049168e-03 -1.001000000000e-14 1.020000000000e+01 1.482698468595e-03 0.000000000000e+00 -1.482698468585e-03 -1.021000000000e-14 1.040000000000e+01 1.496396629431e-03 0.000000000000e+00 -1.496396629421e-03 -1.041000000000e-14 1.060000000000e+01 1.509819000375e-03 0.000000000000e+00 -1.509819000364e-03 -1.061000000000e-14 1.080000000000e+01 1.522973707029e-03 0.000000000000e+00 -1.522973707018e-03 -1.081000000000e-14 1.100000000000e+01 1.535868549075e-03 0.000000000000e+00 -1.535868549064e-03 -1.101000000000e-14 1.120000000000e+01 1.548511016419e-03 0.000000000000e+00 -1.548511016408e-03 -1.121000000000e-14 1.140000000000e+01 1.560908304380e-03 0.000000000000e+00 -1.560908304369e-03 -1.141000000000e-14 1.160000000000e+01 1.573067328004e-03 0.000000000000e+00 -1.573067327992e-03 -1.161000000000e-14 1.180000000000e+01 1.584994735540e-03 0.000000000000e+00 -1.584994735528e-03 -1.181000000000e-14 1.200000000000e+01 1.596696921159e-03 0.000000000000e+00 -1.596696921147e-03 -1.201000000000e-14 1.220000000000e+01 1.608180036939e-03 0.000000000000e+00 -1.608180036926e-03 -1.221000000000e-14 1.240000000000e+01 1.619450004184e-03 0.000000000000e+00 -1.619450004172e-03 -1.241000000000e-14 1.260000000000e+01 1.630512524117e-03 0.000000000000e+00 -1.630512524104e-03 -1.261000000000e-14 1.280000000000e+01 1.641373087972e-03 0.000000000000e+00 -1.641373087960e-03 -1.281000000000e-14 1.300000000000e+01 1.652036986551e-03 0.000000000000e+00 -1.652036986538e-03 -1.301000000000e-14 1.320000000000e+01 1.662509319245e-03 0.000000000000e+00 -1.662509319231e-03 -1.321000000000e-14 1.340000000000e+01 1.672795002589e-03 0.000000000000e+00 -1.672795002576e-03 -1.341000000000e-14 1.360000000000e+01 1.682898778352e-03 0.000000000000e+00 -1.682898778339e-03 -1.361000000000e-14 1.380000000000e+01 1.692825221201e-03 0.000000000000e+00 -1.692825221188e-03 -1.381000000000e-14 1.400000000000e+01 1.702578745968e-03 0.000000000000e+00 -1.702578745954e-03 -1.401000000000e-14 1.420000000000e+01 1.712163614537e-03 0.000000000000e+00 -1.712163614523e-03 -1.421000000000e-14 1.440000000000e+01 1.721583942384e-03 0.000000000000e+00 -1.721583942370e-03 -1.441000000000e-14 1.460000000000e+01 1.730843704775e-03 0.000000000000e+00 -1.730843704760e-03 -1.461000000000e-14 1.480000000000e+01 1.739946742658e-03 0.000000000000e+00 -1.739946742643e-03 -1.481000000000e-14 1.500000000000e+01 1.748896768258e-03 0.000000000000e+00 -1.748896768243e-03 -1.501000000000e-14 1.520000000000e+01 1.757697370392e-03 0.000000000000e+00 -1.757697370377e-03 -1.521000000000e-14 1.540000000000e+01 1.766352019530e-03 0.000000000000e+00 -1.766352019515e-03 -1.541000000000e-14 1.560000000000e+01 1.774864072596e-03 0.000000000000e+00 -1.774864072581e-03 -1.561000000000e-14 1.580000000000e+01 1.783236777552e-03 0.000000000000e+00 -1.783236777536e-03 -1.581000000000e-14 1.600000000000e+01 1.791473277748e-03 0.000000000000e+00 -1.791473277732e-03 -1.601000000000e-14 1.620000000000e+01 1.799576616077e-03 0.000000000000e+00 -1.799576616061e-03 -1.621000000000e-14 1.640000000000e+01 1.807549738922e-03 0.000000000000e+00 -1.807549738905e-03 -1.641000000000e-14 1.660000000000e+01 1.815395499929e-03 0.000000000000e+00 -1.815395499912e-03 -1.661000000000e-14 1.680000000000e+01 1.823116663597e-03 0.000000000000e+00 -1.823116663580e-03 -1.681000000000e-14 1.700000000000e+01 1.830715908706e-03 0.000000000000e+00 -1.830715908689e-03 -1.701000000000e-14 1.720000000000e+01 1.838195831589e-03 0.000000000000e+00 -1.838195831572e-03 -1.721000000000e-14 1.740000000000e+01 1.845558949251e-03 0.000000000000e+00 -1.845558949233e-03 -1.741000000000e-14 1.760000000000e+01 1.852807702352e-03 0.000000000000e+00 -1.852807702334e-03 -1.761000000000e-14 1.780000000000e+01 1.859944458058e-03 0.000000000000e+00 -1.859944458040e-03 -1.781000000000e-14 1.800000000000e+01 1.866971512760e-03 0.000000000000e+00 -1.866971512742e-03 -1.801000000000e-14 1.820000000000e+01 1.873891094677e-03 0.000000000000e+00 -1.873891094659e-03 -1.821000000000e-14 1.840000000000e+01 1.880705366348e-03 0.000000000000e+00 -1.880705366329e-03 -1.841000000000e-14 1.860000000000e+01 1.887416427009e-03 0.000000000000e+00 -1.887416426990e-03 -1.861000000000e-14 1.880000000000e+01 1.894026314877e-03 0.000000000000e+00 -1.894026314858e-03 -1.881000000000e-14 1.900000000000e+01 1.900537009330e-03 0.000000000000e+00 -1.900537009311e-03 -1.901000000000e-14 1.920000000000e+01 1.906950432994e-03 0.000000000000e+00 -1.906950432975e-03 -1.921000000000e-14 1.940000000000e+01 1.913268453752e-03 0.000000000000e+00 -1.913268453732e-03 -1.941000000000e-14 1.960000000000e+01 1.919492886656e-03 0.000000000000e+00 -1.919492886636e-03 -1.961000000000e-14 1.980000000000e+01 1.925625495771e-03 0.000000000000e+00 -1.925625495751e-03 -1.981000000000e-14 2.000000000000e+01 1.931667995939e-03 0.000000000000e+00 -1.931667995919e-03 -2.001000000000e-14 1.000000000000e+00 2.728653254507e-04 0.000000000000e+00 -2.728653254497e-04 -1.010000000000e-15 1.200000000000e+00 3.211432076053e-04 0.000000000000e+00 -3.211432076040e-04 -1.210000000000e-15 1.400000000000e+00 3.675987224970e-04 0.000000000000e+00 -3.675987224956e-04 -1.410000000000e-15 1.600000000000e+00 4.123331530939e-04 0.000000000000e+00 -4.123331530923e-04 -1.610000000000e-15 1.800000000000e+00 4.554405582720e-04 0.000000000000e+00 -4.554405582701e-04 -1.810000000000e-15 2.000000000000e+00 4.970083805267e-04 0.000000000000e+00 -4.970083805247e-04 -2.010000000000e-15 2.200000000000e+00 5.371179974965e-04 0.000000000000e+00 -5.371179974943e-04 -2.210000000000e-15 2.400000000000e+00 5.758452224036e-04 0.000000000000e+00 -5.758452224012e-04 -2.410000000000e-15 2.600000000000e+00 6.132607582425e-04 0.000000000000e+00 -6.132607582399e-04 -2.610000000000e-15 2.800000000000e+00 6.494306101840e-04 0.000000000000e+00 -6.494306101812e-04 -2.810000000000e-15 3.000000000000e+00 6.844164602736e-04 0.000000000000e+00 -6.844164602706e-04 -3.010000000000e-15 3.200000000000e+00 7.182760081261e-04 0.000000000000e+00 -7.182760081229e-04 -3.210000000000e-15 3.400000000000e+00 7.510632809587e-04 0.000000000000e+00 -7.510632809553e-04 -3.410000000000e-15 3.600000000000e+00 7.828289159701e-04 0.000000000000e+00 -7.828289159665e-04 -3.610000000000e-15 3.800000000000e+00 8.136204177729e-04 0.000000000000e+00 -8.136204177691e-04 -3.810000000000e-15 4.000000000000e+00 8.434823933067e-04 0.000000000000e+00 -8.434823933027e-04 -4.010000000000e-15 4.200000000000e+00 8.724567664121e-04 0.000000000000e+00 -8.724567664079e-04 -4.210000000000e-15 4.400000000000e+00 9.005829740211e-04 0.000000000000e+00 -9.005829740167e-04 -4.410000000000e-15 4.600000000000e+00 9.278981543855e-04 0.000000000000e+00 -9.278981543809e-04 -4.610000000000e-15 4.800000000000e+00 9.544372760904e-04 0.000000000000e+00 -9.544372760856e-04 -4.810000000000e-15 5.000000000000e+00 9.802333434849e-04 0.000000000000e+00 -9.802333434799e-04 -5.010000000000e-15 5.200000000000e+00 1.005317497845e-03 0.000000000000e+00 -1.005317497840e-03 -5.210000000000e-15 5.400000000000e+00 1.029719154235e-03 0.000000000000e+00 -1.029719154230e-03 -5.410000000000e-15 5.600000000000e+00 1.053466118565e-03 0.000000000000e+00 -1.053466118559e-03 -5.610000000000e-15 5.800000000000e+00 1.076584695360e-03 0.000000000000e+00 -1.076584695355e-03 -5.810000000000e-15 6.000000000000e+00 1.099099787101e-03 0.000000000000e+00 -1.099099787095e-03 -6.010000000000e-15 6.200000000000e+00 1.121034985842e-03 0.000000000000e+00 -1.121034985836e-03 -6.210000000000e-15 6.400000000000e+00 1.142412657825e-03 0.000000000000e+00 -1.142412657818e-03 -6.410000000000e-15 6.600000000000e+00 1.163254021668e-03 0.000000000000e+00 -1.163254021662e-03 -6.610000000000e-15 6.800000000000e+00 1.183579220704e-03 0.000000000000e+00 -1.183579220697e-03 -6.810000000000e-15 7.000000000000e+00 1.203407389949e-03 0.000000000000e+00 -1.203407389942e-03 -7.010000000000e-15 7.200000000000e+00 1.222756718169e-03 0.000000000000e+00 -1.222756718162e-03 -7.210000000000e-15 7.400000000000e+00 1.241644505449e-03 0.000000000000e+00 -1.241644505442e-03 -7.410000000000e-15 7.600000000000e+00 1.260087216628e-03 0.000000000000e+00 -1.260087216621e-03 -7.610000000000e-15 7.800000000000e+00 1.278100530954e-03 0.000000000000e+00 -1.278100530946e-03 -7.810000000000e-15 8.000000000000e+00 1.295699388247e-03 0.000000000000e+00 -1.295699388239e-03 -8.010000000000e-15 8.200000000000e+00 1.312898031872e-03 0.000000000000e+00 -1.312898031864e-03 -8.210000000000e-15 8.400000000000e+00 1.329710048750e-03 0.000000000000e+00 -1.329710048741e-03 -8.410000000000e-15 8.600000000000e+00 1.346148406658e-03 0.000000000000e+00 -1.346148406650e-03 -8.610000000000e-15 8.800000000000e+00 1.362225489027e-03 0.000000000000e+00 -1.362225489018e-03 -8.810000000000e-15 9.000000000000e+00 1.377953127416e-03 0.000000000000e+00 -1.377953127407e-03 -9.010000000000e-15 9.200000000000e+00 1.393342631862e-03 0.000000000000e+00 -1.393342631853e-03 -9.210000000000e-15 9.400000000000e+00 1.408404819244e-03 0.000000000000e+00 -1.408404819234e-03 -9.410000000000e-15 9.600000000000e+00 1.423150039825e-03 0.000000000000e+00 -1.423150039815e-03 -9.610000000000e-15 9.800000000000e+00 1.437588202102e-03 0.000000000000e+00 -1.437588202092e-03 -9.810000000000e-15 1.000000000000e+01 1.451728796082e-03 0.000000000000e+00 -1.451728796072e-03 -1.001000000000e-14 1.020000000000e+01 1.465580915110e-03 0.000000000000e+00 -1.465580915100e-03 -1.021000000000e-14 1.040000000000e+01 1.479153276338e-03 0.000000000000e+00 -1.479153276328e-03 -1.041000000000e-14 1.060000000000e+01 1.492454239952e-03 0.000000000000e+00 -1.492454239941e-03 -1.061000000000e-14 1.080000000000e+01 1.505491827220e-03 0.000000000000e+00 -1.505491827209e-03 -1.081000000000e-14 1.100000000000e+01 1.518273737464e-03 0.000000000000e+00 -1.518273737453e-03 -1.101000000000e-14 1.120000000000e+01 1.530807364024e-03 0.000000000000e+00 -1.530807364012e-03 -1.121000000000e-14 1.140000000000e+01 1.543099809271e-03 0.000000000000e+00 -1.543099809260e-03 -1.141000000000e-14 1.160000000000e+01 1.555157898758e-03 0.000000000000e+00 -1.555157898746e-03 -1.161000000000e-14 1.180000000000e+01 1.566988194541e-03 0.000000000000e+00 -1.566988194530e-03 -1.181000000000e-14 1.200000000000e+01 1.578597007746e-03 0.000000000000e+00 -1.578597007734e-03 -1.201000000000e-14 1.220000000000e+01 1.589990410417e-03 0.000000000000e+00 -1.589990410405e-03 -1.221000000000e-14 1.240000000000e+01 1.601174246703e-03 0.000000000000e+00 -1.601174246690e-03 -1.241000000000e-14 1.260000000000e+01 1.612154143417e-03 0.000000000000e+00 -1.612154143404e-03 -1.261000000000e-14 1.280000000000e+01 1.622935520019e-03 0.000000000000e+00 -1.622935520006e-03 -1.281000000000e-14 1.300000000000e+01 1.633523598047e-03 0.000000000000e+00 -1.633523598034e-03 -1.301000000000e-14 1.320000000000e+01 1.643923410041e-03 0.000000000000e+00 -1.643923410028e-03 -1.321000000000e-14 1.340000000000e+01 1.654139807985e-03 0.000000000000e+00 -1.654139807972e-03 -1.341000000000e-14 1.360000000000e+01 1.664177471302e-03 0.000000000000e+00 -1.664177471288e-03 -1.361000000000e-14 1.380000000000e+01 1.674040914424e-03 0.000000000000e+00 -1.674040914410e-03 -1.381000000000e-14 1.400000000000e+01 1.683734493973e-03 0.000000000000e+00 -1.683734493959e-03 -1.401000000000e-14 1.420000000000e+01 1.693262415559e-03 0.000000000000e+00 -1.693262415545e-03 -1.421000000000e-14 1.440000000000e+01 1.702628740239e-03 0.000000000000e+00 -1.702628740225e-03 -1.441000000000e-14 1.460000000000e+01 1.711837390641e-03 0.000000000000e+00 -1.711837390626e-03 -1.461000000000e-14 1.480000000000e+01 1.720892156778e-03 0.000000000000e+00 -1.720892156763e-03 -1.481000000000e-14 1.500000000000e+01 1.729796701575e-03 0.000000000000e+00 -1.729796701560e-03 -1.501000000000e-14 1.520000000000e+01 1.738554566119e-03 0.000000000000e+00 -1.738554566103e-03 -1.521000000000e-14 1.540000000000e+01 1.747169174648e-03 0.000000000000e+00 -1.747169174633e-03 -1.541000000000e-14 1.560000000000e+01 1.755643839302e-03 0.000000000000e+00 -1.755643839287e-03 -1.561000000000e-14 1.580000000000e+01 1.763981764637e-03 0.000000000000e+00 -1.763981764621e-03 -1.581000000000e-14 1.600000000000e+01 1.772186051927e-03 0.000000000000e+00 -1.772186051911e-03 -1.601000000000e-14 1.620000000000e+01 1.780259703257e-03 0.000000000000e+00 -1.780259703241e-03 -1.621000000000e-14 1.640000000000e+01 1.788205625431e-03 0.000000000000e+00 -1.788205625415e-03 -1.641000000000e-14 1.660000000000e+01 1.796026633681e-03 0.000000000000e+00 -1.796026633664e-03 -1.661000000000e-14 1.680000000000e+01 1.803725455220e-03 0.000000000000e+00 -1.803725455203e-03 -1.681000000000e-14 1.700000000000e+01 1.811304732620e-03 0.000000000000e+00 -1.811304732603e-03 -1.701000000000e-14 1.720000000000e+01 1.818767027041e-03 0.000000000000e+00 -1.818767027024e-03 -1.721000000000e-14 1.740000000000e+01 1.826114821309e-03 0.000000000000e+00 -1.826114821292e-03 -1.741000000000e-14 1.760000000000e+01 1.833350522860e-03 0.000000000000e+00 -1.833350522843e-03 -1.761000000000e-14 1.780000000000e+01 1.840476466548e-03 0.000000000000e+00 -1.840476466530e-03 -1.781000000000e-14 1.800000000000e+01 1.847494917329e-03 0.000000000000e+00 -1.847494917311e-03 -1.801000000000e-14 1.820000000000e+01 1.854408072831e-03 0.000000000000e+00 -1.854408072813e-03 -1.821000000000e-14 1.840000000000e+01 1.861218065807e-03 0.000000000000e+00 -1.861218065789e-03 -1.841000000000e-14 1.860000000000e+01 1.867926966482e-03 0.000000000000e+00 -1.867926966463e-03 -1.861000000000e-14 1.880000000000e+01 1.874536784801e-03 0.000000000000e+00 -1.874536784782e-03 -1.881000000000e-14 1.900000000000e+01 1.881049472583e-03 0.000000000000e+00 -1.881049472564e-03 -1.901000000000e-14 1.920000000000e+01 1.887466925575e-03 0.000000000000e+00 -1.887466925556e-03 -1.921000000000e-14 1.940000000000e+01 1.893790985432e-03 0.000000000000e+00 -1.893790985413e-03 -1.941000000000e-14 1.960000000000e+01 1.900023441604e-03 0.000000000000e+00 -1.900023441584e-03 -1.961000000000e-14 1.980000000000e+01 1.906166033148e-03 0.000000000000e+00 -1.906166033128e-03 -1.981000000000e-14 2.000000000000e+01 1.912220450470e-03 0.000000000000e+00 -1.912220450450e-03 -2.001000000000e-14 1.000000000000e+00 3.113817702308e-04 0.000000000000e+00 -3.113817702298e-04 -1.000000000751e-15 1.200000000000e+00 3.660854655575e-04 0.000000000000e+00 -3.660854655563e-04 -1.200000000751e-15 1.400000000000e+00 4.186166530534e-04 0.000000000000e+00 -4.186166530520e-04 -1.400000000751e-15 1.600000000000e+00 4.691029948174e-04 0.000000000000e+00 -4.691029948158e-04 -1.600000000751e-15 1.800000000000e+00 5.176624933325e-04 0.000000000000e+00 -5.176624933307e-04 -1.800000000751e-15 2.000000000000e+00 5.644043613646e-04 0.000000000000e+00 -5.644043613626e-04 -2.000000000751e-15 2.200000000000e+00 6.094298041270e-04 0.000000000000e+00 -6.094298041248e-04 -2.200000000751e-15 2.400000000000e+00 6.528327229365e-04 0.000000000000e+00 -6.528327229341e-04 -2.400000000751e-15 2.600000000000e+00 6.947003487252e-04 0.000000000000e+00 -6.947003487226e-04 -2.600000000751e-15 2.800000000000e+00 7.351138129274e-04 0.000000000000e+00 -7.351138129246e-04 -2.800000000751e-15 3.000000000000e+00 7.741486624610e-04 0.000000000000e+00 -7.741486624580e-04 -3.000000000751e-15 3.200000000000e+00 8.118753247917e-04 0.000000000000e+00 -8.118753247885e-04 -3.200000000751e-15 3.400000000000e+00 8.483595284029e-04 0.000000000000e+00 -8.483595283995e-04 -3.400000000751e-15 3.600000000000e+00 8.836626833999e-04 0.000000000000e+00 -8.836626833963e-04 -3.600000000751e-15 3.800000000000e+00 9.178422264452e-04 0.000000000000e+00 -9.178422264414e-04 -3.800000000751e-15 4.000000000000e+00 9.509519337508e-04 0.000000000000e+00 -9.509519337468e-04 -4.000000000751e-15 4.200000000000e+00 9.830422054325e-04 0.000000000000e+00 -9.830422054283e-04 -4.200000000751e-15 4.400000000000e+00 1.014160333284e-03 0.000000000000e+00 -1.014160333280e-03 -4.400000000751e-15 4.600000000000e+00 1.044350699039e-03 0.000000000000e+00 -1.044350699034e-03 -4.600000000751e-15 4.800000000000e+00 1.073655046443e-03 0.000000000000e+00 -1.073655046438e-03 -4.800000000751e-15 5.000000000000e+00 1.102112638206e-03 0.000000000000e+00 -1.102112638201e-03 -5.000000000751e-15 5.200000000000e+00 1.129760445280e-03 0.000000000000e+00 -1.129760445275e-03 -5.200000000751e-15 5.400000000000e+00 1.156633310861e-03 0.000000000000e+00 -1.156633310855e-03 -5.400000000751e-15 5.600000000000e+00 1.182764100635e-03 0.000000000000e+00 -1.182764100630e-03 -5.600000000751e-15 5.800000000000e+00 1.208183840585e-03 0.000000000000e+00 -1.208183840579e-03 -5.800000000751e-15 6.000000000000e+00 1.232921843512e-03 0.000000000000e+00 -1.232921843506e-03 -6.000000000751e-15 6.200000000000e+00 1.257005825338e-03 0.000000000000e+00 -1.257005825332e-03 -6.200000000751e-15 6.400000000000e+00 1.280462012124e-03 0.000000000000e+00 -1.280462012118e-03 -6.400000000751e-15 6.600000000000e+00 1.303315238640e-03 0.000000000000e+00 -1.303315238633e-03 -6.600000000751e-15 6.800000000000e+00 1.325589039262e-03 0.000000000000e+00 -1.325589039255e-03 -6.800000000751e-15 7.000000000000e+00 1.347305731869e-03 0.000000000000e+00 -1.347305731862e-03 -7.000000000751e-15 7.200000000000e+00 1.368486495358e-03 0.000000000000e+00 -1.368486495351e-03 -7.200000000751e-15 7.400000000000e+00 1.389151441328e-03 0.000000000000e+00 -1.389151441321e-03 -7.400000000751e-15 7.600000000000e+00 1.409319680446e-03 0.000000000000e+00 -1.409319680439e-03 -7.600000000751e-15 7.800000000000e+00 1.429009383933e-03 0.000000000000e+00 -1.429009383926e-03 -7.800000000751e-15 8.000000000000e+00 1.448237840590e-03 0.000000000000e+00 -1.448237840582e-03 -8.000000000751e-15 8.200000000000e+00 1.467021509732e-03 0.000000000000e+00 -1.467021509723e-03 -8.200000000751e-15 8.400000000000e+00 1.485376070364e-03 0.000000000000e+00 -1.485376070356e-03 -8.400000000751e-15 8.600000000000e+00 1.503316466916e-03 0.000000000000e+00 -1.503316466907e-03 -8.600000000751e-15 8.800000000000e+00 1.520856951793e-03 0.000000000000e+00 -1.520856951784e-03 -8.800000000751e-15 9.000000000000e+00 1.538011125019e-03 0.000000000000e+00 -1.538011125010e-03 -9.000000000751e-15 9.200000000000e+00 1.554791971183e-03 0.000000000000e+00 -1.554791971173e-03 -9.200000000751e-15 9.400000000000e+00 1.571211893907e-03 0.000000000000e+00 -1.571211893897e-03 -9.400000000751e-15 9.600000000000e+00 1.587282748032e-03 0.000000000000e+00 -1.587282748022e-03 -9.600000000751e-15 9.800000000000e+00 1.603015869682e-03 0.000000000000e+00 -1.603015869672e-03 -9.800000000751e-15 1.000000000000e+01 1.618422104380e-03 0.000000000000e+00 -1.618422104370e-03 -1.000000000075e-14 1.020000000000e+01 1.633511833354e-03 0.000000000000e+00 -1.633511833343e-03 -1.020000000075e-14 1.040000000000e+01 1.648294998168e-03 0.000000000000e+00 -1.648294998158e-03 -1.040000000075e-14 1.060000000000e+01 1.662781123808e-03 0.000000000000e+00 -1.662781123797e-03 -1.060000000075e-14 1.080000000000e+01 1.676979340320e-03 0.000000000000e+00 -1.676979340310e-03 -1.080000000075e-14 1.100000000000e+01 1.690898403122e-03 0.000000000000e+00 -1.690898403111e-03 -1.100000000075e-14 1.120000000000e+01 1.704546712067e-03 0.000000000000e+00 -1.704546712056e-03 -1.120000000075e-14 1.140000000000e+01 1.717932329360e-03 0.000000000000e+00 -1.717932329349e-03 -1.140000000075e-14 1.160000000000e+01 1.731062996400e-03 0.000000000000e+00 -1.731062996389e-03 -1.160000000075e-14 1.180000000000e+01 1.743946149622e-03 0.000000000000e+00 -1.743946149611e-03 -1.180000000075e-14 1.200000000000e+01 1.756588935411e-03 0.000000000000e+00 -1.756588935399e-03 -1.200000000075e-14 1.220000000000e+01 1.768998224145e-03 0.000000000000e+00 -1.768998224133e-03 -1.220000000075e-14 1.240000000000e+01 1.781180623439e-03 0.000000000000e+00 -1.781180623426e-03 -1.240000000075e-14 1.260000000000e+01 1.793142490617e-03 0.000000000000e+00 -1.793142490604e-03 -1.260000000075e-14 1.280000000000e+01 1.804889944496e-03 0.000000000000e+00 -1.804889944483e-03 -1.280000000075e-14 1.300000000000e+01 1.816428876502e-03 0.000000000000e+00 -1.816428876489e-03 -1.300000000075e-14 1.320000000000e+01 1.827764961166e-03 0.000000000000e+00 -1.827764961152e-03 -1.320000000075e-14 1.340000000000e+01 1.838903666052e-03 0.000000000000e+00 -1.838903666038e-03 -1.340000000075e-14 1.360000000000e+01 1.849850261137e-03 0.000000000000e+00 -1.849850261123e-03 -1.360000000075e-14 1.380000000000e+01 1.860609827688e-03 0.000000000000e+00 -1.860609827674e-03 -1.380000000075e-14 1.400000000000e+01 1.871187266663e-03 0.000000000000e+00 -1.871187266649e-03 -1.400000000075e-14 1.420000000000e+01 1.881587306669e-03 0.000000000000e+00 -1.881587306655e-03 -1.420000000075e-14 1.440000000000e+01 1.891814511495e-03 0.000000000000e+00 -1.891814511480e-03 -1.440000000075e-14 1.460000000000e+01 1.901873287261e-03 0.000000000000e+00 -1.901873287246e-03 -1.460000000075e-14 1.480000000000e+01 1.911767889193e-03 0.000000000000e+00 -1.911767889178e-03 -1.480000000075e-14 1.500000000000e+01 1.921502428051e-03 0.000000000000e+00 -1.921502428036e-03 -1.500000000075e-14 1.520000000000e+01 1.931080876231e-03 0.000000000000e+00 -1.931080876216e-03 -1.520000000075e-14 1.540000000000e+01 1.940507073563e-03 0.000000000000e+00 -1.940507073548e-03 -1.540000000075e-14 1.560000000000e+01 1.949784732814e-03 0.000000000000e+00 -1.949784732798e-03 -1.560000000075e-14 1.580000000000e+01 1.958917444920e-03 0.000000000000e+00 -1.958917444905e-03 -1.580000000075e-14 1.600000000000e+01 1.967908683968e-03 0.000000000000e+00 -1.967908683952e-03 -1.600000000075e-14 1.620000000000e+01 1.976761811921e-03 0.000000000000e+00 -1.976761811905e-03 -1.620000000075e-14 1.640000000000e+01 1.985480083133e-03 0.000000000000e+00 -1.985480083117e-03 -1.640000000075e-14 1.660000000000e+01 1.994066648631e-03 0.000000000000e+00 -1.994066648614e-03 -1.660000000075e-14 1.680000000000e+01 2.002524560201e-03 0.000000000000e+00 -2.002524560184e-03 -1.680000000075e-14 1.700000000000e+01 2.010856774284e-03 0.000000000000e+00 -2.010856774267e-03 -1.700000000075e-14 1.720000000000e+01 2.019066155683e-03 0.000000000000e+00 -2.019066155666e-03 -1.720000000075e-14 1.740000000000e+01 2.027155481106e-03 0.000000000000e+00 -2.027155481088e-03 -1.740000000075e-14 1.760000000000e+01 2.035127442532e-03 0.000000000000e+00 -2.035127442514e-03 -1.760000000075e-14 1.780000000000e+01 2.042984650442e-03 0.000000000000e+00 -2.042984650424e-03 -1.780000000075e-14 1.800000000000e+01 2.050729636888e-03 0.000000000000e+00 -2.050729636870e-03 -1.800000000075e-14 1.820000000000e+01 2.058364858428e-03 0.000000000000e+00 -2.058364858410e-03 -1.820000000075e-14 1.840000000000e+01 2.065892698938e-03 0.000000000000e+00 -2.065892698919e-03 -1.840000000075e-14 1.860000000000e+01 2.073315472283e-03 0.000000000000e+00 -2.073315472264e-03 -1.860000000075e-14 1.880000000000e+01 2.080635424887e-03 0.000000000000e+00 -2.080635424868e-03 -1.880000000075e-14 1.900000000000e+01 2.087854738181e-03 0.000000000000e+00 -2.087854738162e-03 -1.900000000075e-14 1.920000000000e+01 2.094975530948e-03 0.000000000000e+00 -2.094975530928e-03 -1.920000000075e-14 1.940000000000e+01 2.101999861563e-03 0.000000000000e+00 -2.101999861544e-03 -1.940000000075e-14 1.960000000000e+01 2.108929730146e-03 0.000000000000e+00 -2.108929730127e-03 -1.960000000075e-14 1.980000000000e+01 2.115767080615e-03 0.000000000000e+00 -2.115767080595e-03 -1.980000000075e-14 2.000000000000e+01 2.122513802652e-03 0.000000000000e+00 -2.122513802632e-03 -2.000000000075e-14 1.000000000000e+00 3.079955647316e-04 0.000000000000e+00 -3.079955647306e-04 -1.000000000751e-15 1.200000000000e+00 3.620994014853e-04 0.000000000000e+00 -3.620994014841e-04 -1.200000000751e-15 1.400000000000e+00 4.140536783072e-04 0.000000000000e+00 -4.140536783058e-04 -1.400000000751e-15 1.600000000000e+00 4.639849561173e-04 0.000000000000e+00 -4.639849561157e-04 -1.600000000751e-15 1.800000000000e+00 5.120101945457e-04 0.000000000000e+00 -5.120101945439e-04 -1.800000000751e-15 2.000000000000e+00 5.582376199582e-04 0.000000000000e+00 -5.582376199562e-04 -2.000000000751e-15 2.200000000000e+00 6.027675053828e-04 0.000000000000e+00 -6.027675053806e-04 -2.200000000751e-15 2.400000000000e+00 6.456928717114e-04 0.000000000000e+00 -6.456928717090e-04 -2.400000000751e-15 2.600000000000e+00 6.871001186461e-04 0.000000000000e+00 -6.871001186435e-04 -2.600000000751e-15 2.800000000000e+00 7.270695929887e-04 0.000000000000e+00 -7.270695929859e-04 -2.800000000751e-15 3.000000000000e+00 7.656761010445e-04 0.000000000000e+00 -7.656761010415e-04 -3.000000000751e-15 3.200000000000e+00 8.029893711666e-04 0.000000000000e+00 -8.029893711634e-04 -3.200000000751e-15 3.400000000000e+00 8.390744717905e-04 0.000000000000e+00 -8.390744717871e-04 -3.400000000751e-15 3.600000000000e+00 8.739921897017e-04 0.000000000000e+00 -8.739921896981e-04 -3.600000000751e-15 3.800000000000e+00 9.077993727461e-04 0.000000000000e+00 -9.077993727423e-04 -3.800000000751e-15 4.000000000000e+00 9.405492407101e-04 0.000000000000e+00 -9.405492407061e-04 -4.000000000751e-15 4.200000000000e+00 9.722916676811e-04 0.000000000000e+00 -9.722916676769e-04 -4.200000000751e-15 4.400000000000e+00 1.003073447741e-03 0.000000000000e+00 -1.003073447737e-03 -4.400000000751e-15 4.600000000000e+00 1.032938492291e-03 0.000000000000e+00 -1.032938492286e-03 -4.600000000751e-15 4.800000000000e+00 1.061928099196e-03 0.000000000000e+00 -1.061928099191e-03 -4.800000000751e-15 5.000000000000e+00 1.090081109053e-03 0.000000000000e+00 -1.090081109048e-03 -5.000000000751e-15 5.200000000000e+00 1.117434092800e-03 0.000000000000e+00 -1.117434092794e-03 -5.200000000751e-15 5.400000000000e+00 1.144021514354e-03 0.000000000000e+00 -1.144021514348e-03 -5.400000000751e-15 5.600000000000e+00 1.169875879596e-03 0.000000000000e+00 -1.169875879591e-03 -5.600000000751e-15 5.800000000000e+00 1.195027872990e-03 0.000000000000e+00 -1.195027872984e-03 -5.800000000751e-15 6.000000000000e+00 1.219506483000e-03 0.000000000000e+00 -1.219506482994e-03 -6.000000000751e-15 6.200000000000e+00 1.243339117361e-03 0.000000000000e+00 -1.243339117355e-03 -6.200000000751e-15 6.400000000000e+00 1.266551709132e-03 0.000000000000e+00 -1.266551709126e-03 -6.400000000751e-15 6.600000000000e+00 1.289168814369e-03 0.000000000000e+00 -1.289168814363e-03 -6.600000000751e-15 6.800000000000e+00 1.311213702181e-03 0.000000000000e+00 -1.311213702174e-03 -6.800000000751e-15 7.000000000000e+00 1.332708437840e-03 0.000000000000e+00 -1.332708437833e-03 -7.000000000751e-15 7.200000000000e+00 1.353673959568e-03 0.000000000000e+00 -1.353673959560e-03 -7.200000000751e-15 7.400000000000e+00 1.374130149532e-03 0.000000000000e+00 -1.374130149525e-03 -7.400000000751e-15 7.600000000000e+00 1.394095899574e-03 0.000000000000e+00 -1.394095899567e-03 -7.600000000751e-15 7.800000000000e+00 1.413589172093e-03 0.000000000000e+00 -1.413589172085e-03 -7.800000000751e-15 8.000000000000e+00 1.432627056515e-03 0.000000000000e+00 -1.432627056507e-03 -8.000000000751e-15 8.200000000000e+00 1.451225821701e-03 0.000000000000e+00 -1.451225821693e-03 -8.200000000751e-15 8.400000000000e+00 1.469400964638e-03 0.000000000000e+00 -1.469400964629e-03 -8.400000000751e-15 8.600000000000e+00 1.487167255702e-03 0.000000000000e+00 -1.487167255693e-03 -8.600000000751e-15 8.800000000000e+00 1.504538780791e-03 0.000000000000e+00 -1.504538780782e-03 -8.800000000751e-15 9.000000000000e+00 1.521528980555e-03 0.000000000000e+00 -1.521528980546e-03 -9.000000000751e-15 9.200000000000e+00 1.538150686969e-03 0.000000000000e+00 -1.538150686960e-03 -9.200000000751e-15 9.400000000000e+00 1.554416157445e-03 0.000000000000e+00 -1.554416157435e-03 -9.400000000751e-15 9.600000000000e+00 1.570337106678e-03 0.000000000000e+00 -1.570337106669e-03 -9.600000000751e-15 9.800000000000e+00 1.585924736406e-03 0.000000000000e+00 -1.585924736396e-03 -9.800000000751e-15 1.000000000000e+01 1.601189763222e-03 0.000000000000e+00 -1.601189763212e-03 -1.000000000075e-14 1.020000000000e+01 1.616142444611e-03 0.000000000000e+00 -1.616142444600e-03 -1.020000000075e-14 1.040000000000e+01 1.630792603314e-03 0.000000000000e+00 -1.630792603303e-03 -1.040000000075e-14 1.060000000000e+01 1.645149650171e-03 0.000000000000e+00 -1.645149650160e-03 -1.060000000075e-14 1.080000000000e+01 1.659222605528e-03 0.000000000000e+00 -1.659222605517e-03 -1.080000000075e-14 1.100000000000e+01 1.673020119330e-03 0.000000000000e+00 -1.673020119319e-03 -1.100000000075e-14 1.120000000000e+01 1.686550489982e-03 0.000000000000e+00 -1.686550489970e-03 -1.120000000075e-14 1.140000000000e+01 1.699821682066e-03 0.000000000000e+00 -1.699821682055e-03 -1.140000000075e-14 1.160000000000e+01 1.712841343008e-03 0.000000000000e+00 -1.712841342996e-03 -1.160000000075e-14 1.180000000000e+01 1.725616818739e-03 0.000000000000e+00 -1.725616818728e-03 -1.180000000075e-14 1.200000000000e+01 1.738155168455e-03 0.000000000000e+00 -1.738155168443e-03 -1.200000000075e-14 1.220000000000e+01 1.750463178501e-03 0.000000000000e+00 -1.750463178489e-03 -1.220000000075e-14 1.240000000000e+01 1.762547375467e-03 0.000000000000e+00 -1.762547375454e-03 -1.240000000075e-14 1.260000000000e+01 1.774414038528e-03 0.000000000000e+00 -1.774414038515e-03 -1.260000000075e-14 1.280000000000e+01 1.786069211096e-03 0.000000000000e+00 -1.786069211084e-03 -1.280000000075e-14 1.300000000000e+01 1.797518711810e-03 0.000000000000e+00 -1.797518711797e-03 -1.300000000075e-14 1.320000000000e+01 1.808768144919e-03 0.000000000000e+00 -1.808768144905e-03 -1.320000000075e-14 1.340000000000e+01 1.819822910095e-03 0.000000000000e+00 -1.819822910081e-03 -1.340000000075e-14 1.360000000000e+01 1.830688211713e-03 0.000000000000e+00 -1.830688211700e-03 -1.360000000075e-14 1.380000000000e+01 1.841369067627e-03 0.000000000000e+00 -1.841369067613e-03 -1.380000000075e-14 1.400000000000e+01 1.851870317474e-03 0.000000000000e+00 -1.851870317460e-03 -1.400000000075e-14 1.420000000000e+01 1.862196630543e-03 0.000000000000e+00 -1.862196630529e-03 -1.420000000075e-14 1.440000000000e+01 1.872352513229e-03 0.000000000000e+00 -1.872352513215e-03 -1.440000000075e-14 1.460000000000e+01 1.882342316093e-03 0.000000000000e+00 -1.882342316078e-03 -1.460000000075e-14 1.480000000000e+01 1.892170240565e-03 0.000000000000e+00 -1.892170240550e-03 -1.480000000075e-14 1.500000000000e+01 1.901840345298e-03 0.000000000000e+00 -1.901840345283e-03 -1.500000000075e-14 1.520000000000e+01 1.911356552202e-03 0.000000000000e+00 -1.911356552186e-03 -1.520000000075e-14 1.540000000000e+01 1.920722652171e-03 0.000000000000e+00 -1.920722652156e-03 -1.540000000075e-14 1.560000000000e+01 1.929942310530e-03 0.000000000000e+00 -1.929942310515e-03 -1.560000000075e-14 1.580000000000e+01 1.939019072206e-03 0.000000000000e+00 -1.939019072190e-03 -1.580000000075e-14 1.600000000000e+01 1.947956366644e-03 0.000000000000e+00 -1.947956366628e-03 -1.600000000075e-14 1.620000000000e+01 1.956757512495e-03 0.000000000000e+00 -1.956757512479e-03 -1.620000000075e-14 1.640000000000e+01 1.965425722060e-03 0.000000000000e+00 -1.965425722043e-03 -1.640000000075e-14 1.660000000000e+01 1.973964105536e-03 0.000000000000e+00 -1.973964105519e-03 -1.660000000075e-14 1.680000000000e+01 1.982375675053e-03 0.000000000000e+00 -1.982375675036e-03 -1.680000000075e-14 1.700000000000e+01 1.990663348519e-03 0.000000000000e+00 -1.990663348502e-03 -1.700000000075e-14 1.720000000000e+01 1.998829953293e-03 0.000000000000e+00 -1.998829953276e-03 -1.720000000075e-14 1.740000000000e+01 2.006878229677e-03 0.000000000000e+00 -2.006878229659e-03 -1.740000000075e-14 1.760000000000e+01 2.014810834253e-03 0.000000000000e+00 -2.014810834236e-03 -1.760000000075e-14 1.780000000000e+01 2.022630343071e-03 0.000000000000e+00 -2.022630343053e-03 -1.780000000075e-14 1.800000000000e+01 2.030339254682e-03 0.000000000000e+00 -2.030339254664e-03 -1.800000000075e-14 1.820000000000e+01 2.037939993043e-03 0.000000000000e+00 -2.037939993025e-03 -1.820000000075e-14 1.840000000000e+01 2.045434910292e-03 0.000000000000e+00 -2.045434910273e-03 -1.840000000075e-14 1.860000000000e+01 2.052826289391e-03 0.000000000000e+00 -2.052826289372e-03 -1.860000000075e-14 1.880000000000e+01 2.060116346666e-03 0.000000000000e+00 -2.060116346647e-03 -1.880000000075e-14 1.900000000000e+01 2.067307234224e-03 0.000000000000e+00 -2.067307234205e-03 -1.900000000075e-14 1.920000000000e+01 2.074401042272e-03 0.000000000000e+00 -2.074401042253e-03 -1.920000000075e-14 1.940000000000e+01 2.081399801334e-03 0.000000000000e+00 -2.081399801315e-03 -1.940000000075e-14 1.960000000000e+01 2.088305484373e-03 0.000000000000e+00 -2.088305484354e-03 -1.960000000075e-14 1.980000000000e+01 2.095120008823e-03 0.000000000000e+00 -2.095120008804e-03 -1.980000000075e-14 2.000000000000e+01 2.101845238537e-03 0.000000000000e+00 -2.101845238517e-03 -2.000000000075e-14 1.000000000000e+00 3.039258813696e-04 0.000000000000e+00 -3.039258813686e-04 -1.000000000751e-15 1.200000000000e+00 3.573058609284e-04 0.000000000000e+00 -3.573058609272e-04 -1.200000000751e-15 1.400000000000e+00 4.085629771271e-04 0.000000000000e+00 -4.085629771257e-04 -1.400000000751e-15 1.600000000000e+00 4.578225046302e-04 0.000000000000e+00 -4.578225046286e-04 -1.600000000751e-15 1.800000000000e+00 5.052001856781e-04 0.000000000000e+00 -5.052001856763e-04 -1.800000000751e-15 2.000000000000e+00 5.508030957795e-04 0.000000000000e+00 -5.508030957775e-04 -2.000000000751e-15 2.200000000000e+00 5.947304209035e-04 0.000000000000e+00 -5.947304209013e-04 -2.200000000751e-15 2.400000000000e+00 6.370741557167e-04 0.000000000000e+00 -6.370741557143e-04 -2.400000000751e-15 2.600000000000e+00 6.779197314562e-04 0.000000000000e+00 -6.779197314536e-04 -2.600000000751e-15 2.800000000000e+00 7.173465811197e-04 0.000000000000e+00 -7.173465811169e-04 -2.800000000751e-15 3.000000000000e+00 7.554286488077e-04 0.000000000000e+00 -7.554286488047e-04 -3.000000000751e-15 3.200000000000e+00 7.922348492827e-04 0.000000000000e+00 -7.922348492795e-04 -3.200000000751e-15 3.400000000000e+00 8.278294831241e-04 0.000000000000e+00 -8.278294831207e-04 -3.400000000751e-15 3.600000000000e+00 8.622726122403e-04 0.000000000000e+00 -8.622726122367e-04 -3.600000000751e-15 3.800000000000e+00 8.956203999556e-04 0.000000000000e+00 -8.956203999518e-04 -3.800000000751e-15 4.000000000000e+00 9.279254194072e-04 0.000000000000e+00 -9.279254194032e-04 -4.000000000751e-15 4.200000000000e+00 9.592369431244e-04 0.000000000000e+00 -9.592369431202e-04 -4.200000000751e-15 4.400000000000e+00 9.896011584735e-04 0.000000000000e+00 -9.896011584691e-04 -4.400000000751e-15 4.600000000000e+00 1.019061459477e-03 0.000000000000e+00 -1.019061459472e-03 -4.600000000751e-15 4.800000000000e+00 1.047658616936e-03 0.000000000000e+00 -1.047658616931e-03 -4.800000000751e-15 5.000000000000e+00 1.075430981708e-03 0.000000000000e+00 -1.075430981703e-03 -5.000000000751e-15 5.200000000000e+00 1.102414660772e-03 0.000000000000e+00 -1.102414660766e-03 -5.200000000751e-15 5.400000000000e+00 1.128643678294e-03 0.000000000000e+00 -1.128643678288e-03 -5.400000000751e-15 5.600000000000e+00 1.154150123123e-03 0.000000000000e+00 -1.154150123117e-03 -5.600000000751e-15 5.800000000000e+00 1.178964284025e-03 0.000000000000e+00 -1.178964284019e-03 -5.800000000751e-15 6.000000000000e+00 1.203114773810e-03 0.000000000000e+00 -1.203114773804e-03 -6.000000000751e-15 6.200000000000e+00 1.226628643394e-03 0.000000000000e+00 -1.226628643388e-03 -6.200000000751e-15 6.400000000000e+00 1.249531486729e-03 0.000000000000e+00 -1.249531486722e-03 -6.400000000751e-15 6.600000000000e+00 1.271847537419e-03 0.000000000000e+00 -1.271847537412e-03 -6.600000000751e-15 6.800000000000e+00 1.293599757803e-03 0.000000000000e+00 -1.293599757796e-03 -6.800000000751e-15 7.000000000000e+00 1.314809921144e-03 0.000000000000e+00 -1.314809921137e-03 -7.000000000751e-15 7.200000000000e+00 1.335498687557e-03 0.000000000000e+00 -1.335498687550e-03 -7.200000000751e-15 7.400000000000e+00 1.355685674215e-03 0.000000000000e+00 -1.355685674208e-03 -7.400000000751e-15 7.600000000000e+00 1.375389520319e-03 0.000000000000e+00 -1.375389520311e-03 -7.600000000751e-15 7.800000000000e+00 1.394627947290e-03 0.000000000000e+00 -1.394627947283e-03 -7.800000000751e-15 8.000000000000e+00 1.413417814586e-03 0.000000000000e+00 -1.413417814578e-03 -8.000000000751e-15 8.200000000000e+00 1.431775171491e-03 0.000000000000e+00 -1.431775171483e-03 -8.200000000751e-15 8.400000000000e+00 1.449715305240e-03 0.000000000000e+00 -1.449715305231e-03 -8.400000000751e-15 8.600000000000e+00 1.467252785743e-03 0.000000000000e+00 -1.467252785735e-03 -8.600000000751e-15 8.800000000000e+00 1.484401507218e-03 0.000000000000e+00 -1.484401507209e-03 -8.800000000751e-15 9.000000000000e+00 1.501174726945e-03 0.000000000000e+00 -1.501174726936e-03 -9.000000000751e-15 9.200000000000e+00 1.517585101402e-03 0.000000000000e+00 -1.517585101393e-03 -9.200000000751e-15 9.400000000000e+00 1.533644719959e-03 0.000000000000e+00 -1.533644719950e-03 -9.400000000751e-15 9.600000000000e+00 1.549365136339e-03 0.000000000000e+00 -1.549365136330e-03 -9.600000000751e-15 9.800000000000e+00 1.564757398006e-03 0.000000000000e+00 -1.564757397996e-03 -9.800000000751e-15 1.000000000000e+01 1.579832073637e-03 0.000000000000e+00 -1.579832073627e-03 -1.000000000075e-14 1.020000000000e+01 1.594599278834e-03 0.000000000000e+00 -1.594599278824e-03 -1.020000000075e-14 1.040000000000e+01 1.609068700188e-03 0.000000000000e+00 -1.609068700177e-03 -1.040000000075e-14 1.060000000000e+01 1.623249617829e-03 0.000000000000e+00 -1.623249617818e-03 -1.060000000075e-14 1.080000000000e+01 1.637150926569e-03 0.000000000000e+00 -1.637150926558e-03 -1.080000000075e-14 1.100000000000e+01 1.650781155737e-03 0.000000000000e+00 -1.650781155726e-03 -1.100000000075e-14 1.120000000000e+01 1.664148487802e-03 0.000000000000e+00 -1.664148487790e-03 -1.120000000075e-14 1.140000000000e+01 1.677260775867e-03 0.000000000000e+00 -1.677260775855e-03 -1.140000000075e-14 1.160000000000e+01 1.690125560116e-03 0.000000000000e+00 -1.690125560104e-03 -1.160000000075e-14 1.180000000000e+01 1.702750083283e-03 0.000000000000e+00 -1.702750083271e-03 -1.180000000075e-14 1.200000000000e+01 1.715141305210e-03 0.000000000000e+00 -1.715141305198e-03 -1.200000000075e-14 1.220000000000e+01 1.727305916564e-03 0.000000000000e+00 -1.727305916551e-03 -1.220000000075e-14 1.240000000000e+01 1.739250351752e-03 0.000000000000e+00 -1.739250351740e-03 -1.240000000075e-14 1.260000000000e+01 1.750980801112e-03 0.000000000000e+00 -1.750980801099e-03 -1.260000000075e-14 1.280000000000e+01 1.762503222400e-03 0.000000000000e+00 -1.762503222387e-03 -1.280000000075e-14 1.300000000000e+01 1.773823351646e-03 0.000000000000e+00 -1.773823351633e-03 -1.300000000075e-14 1.320000000000e+01 1.784946713395e-03 0.000000000000e+00 -1.784946713382e-03 -1.320000000075e-14 1.340000000000e+01 1.795878630398e-03 0.000000000000e+00 -1.795878630384e-03 -1.340000000075e-14 1.360000000000e+01 1.806624232758e-03 0.000000000000e+00 -1.806624232744e-03 -1.360000000075e-14 1.380000000000e+01 1.817188466600e-03 0.000000000000e+00 -1.817188466586e-03 -1.380000000075e-14 1.400000000000e+01 1.827576102261e-03 0.000000000000e+00 -1.827576102247e-03 -1.400000000075e-14 1.420000000000e+01 1.837791742055e-03 0.000000000000e+00 -1.837791742040e-03 -1.420000000075e-14 1.440000000000e+01 1.847839827624e-03 0.000000000000e+00 -1.847839827610e-03 -1.440000000075e-14 1.460000000000e+01 1.857724646913e-03 0.000000000000e+00 -1.857724646898e-03 -1.460000000075e-14 1.480000000000e+01 1.867450340771e-03 0.000000000000e+00 -1.867450340757e-03 -1.480000000075e-14 1.500000000000e+01 1.877020909231e-03 0.000000000000e+00 -1.877020909216e-03 -1.500000000075e-14 1.520000000000e+01 1.886440217452e-03 0.000000000000e+00 -1.886440217437e-03 -1.520000000075e-14 1.540000000000e+01 1.895712001383e-03 0.000000000000e+00 -1.895712001367e-03 -1.540000000075e-14 1.560000000000e+01 1.904839873119e-03 0.000000000000e+00 -1.904839873104e-03 -1.560000000075e-14 1.580000000000e+01 1.913827326017e-03 0.000000000000e+00 -1.913827326001e-03 -1.580000000075e-14 1.600000000000e+01 1.922677739540e-03 0.000000000000e+00 -1.922677739524e-03 -1.600000000075e-14 1.620000000000e+01 1.931394383876e-03 0.000000000000e+00 -1.931394383860e-03 -1.620000000075e-14 1.640000000000e+01 1.939980424333e-03 0.000000000000e+00 -1.939980424317e-03 -1.640000000075e-14 1.660000000000e+01 1.948438925517e-03 0.000000000000e+00 -1.948438925500e-03 -1.660000000075e-14 1.680000000000e+01 1.956772855317e-03 0.000000000000e+00 -1.956772855301e-03 -1.680000000075e-14 1.700000000000e+01 1.964985088703e-03 0.000000000000e+00 -1.964985088686e-03 -1.700000000075e-14 1.720000000000e+01 1.973078411338e-03 0.000000000000e+00 -1.973078411321e-03 -1.720000000075e-14 1.740000000000e+01 1.981055523033e-03 0.000000000000e+00 -1.981055523015e-03 -1.740000000075e-14 1.760000000000e+01 1.988919041031e-03 0.000000000000e+00 -1.988919041013e-03 -1.760000000075e-14 1.780000000000e+01 1.996671503154e-03 0.000000000000e+00 -1.996671503136e-03 -1.780000000075e-14 1.800000000000e+01 2.004315370794e-03 0.000000000000e+00 -2.004315370776e-03 -1.800000000075e-14 1.820000000000e+01 2.011853031780e-03 0.000000000000e+00 -2.011853031762e-03 -1.820000000075e-14 1.840000000000e+01 2.019286803108e-03 0.000000000000e+00 -2.019286803090e-03 -1.840000000075e-14 1.860000000000e+01 2.026618933558e-03 0.000000000000e+00 -2.026618933539e-03 -1.860000000075e-14 1.880000000000e+01 2.033851606188e-03 0.000000000000e+00 -2.033851606169e-03 -1.880000000075e-14 1.900000000000e+01 2.040986940725e-03 0.000000000000e+00 -2.040986940706e-03 -1.900000000075e-14 1.920000000000e+01 2.048026995850e-03 0.000000000000e+00 -2.048026995831e-03 -1.920000000075e-14 1.940000000000e+01 2.054973771383e-03 0.000000000000e+00 -2.054973771364e-03 -1.940000000075e-14 1.960000000000e+01 2.061829210376e-03 0.000000000000e+00 -2.061829210357e-03 -1.960000000075e-14 1.980000000000e+01 2.068595201119e-03 0.000000000000e+00 -2.068595201099e-03 -1.980000000075e-14 2.000000000000e+01 2.075273579056e-03 0.000000000000e+00 -2.075273579036e-03 -2.000000000075e-14 1.000000000000e+00 2.314013256547e-04 0.000000000000e+00 -2.314013126999e-04 -1.295474362084e-11 1.200000000000e+00 2.726307627316e-04 0.000000000000e+00 -2.726307497767e-04 -1.295494362086e-11 1.400000000000e+00 3.123736142107e-04 0.000000000000e+00 -3.123736012555e-04 -1.295514362086e-11 1.600000000000e+00 3.507034029352e-04 0.000000000000e+00 -3.507033899799e-04 -1.295534362086e-11 1.800000000000e+00 3.876889383283e-04 0.000000000000e+00 -3.876889253727e-04 -1.295554362086e-11 2.000000000000e+00 4.233946721078e-04 0.000000000000e+00 -4.233946591521e-04 -1.295574362086e-11 2.200000000000e+00 4.578810230717e-04 0.000000000000e+00 -4.578810101158e-04 -1.295594362086e-11 2.400000000000e+00 4.912046741135e-04 0.000000000000e+00 -4.912046611574e-04 -1.295614362086e-11 2.600000000000e+00 5.234188442605e-04 0.000000000000e+00 -5.234188313041e-04 -1.295634362086e-11 2.800000000000e+00 5.545735381764e-04 0.000000000000e+00 -5.545735252199e-04 -1.295654362086e-11 3.000000000000e+00 5.847157752691e-04 0.000000000000e+00 -5.847157623124e-04 -1.295674362086e-11 3.200000000000e+00 6.138898002904e-04 0.000000000000e+00 -6.138897873334e-04 -1.295694362086e-11 3.400000000000e+00 6.421372771049e-04 0.000000000000e+00 -6.421372641478e-04 -1.295714362086e-11 3.600000000000e+00 6.694974671268e-04 0.000000000000e+00 -6.694974541694e-04 -1.295734362086e-11 3.800000000000e+00 6.960074000994e-04 0.000000000000e+00 -6.960073871419e-04 -1.295754362086e-11 4.000000000000e+00 7.217019994123e-04 0.000000000000e+00 -7.217019864546e-04 -1.295774362086e-11 4.200000000000e+00 7.466142633017e-04 0.000000000000e+00 -7.466142503437e-04 -1.295794362086e-11 4.400000000000e+00 7.707753654545e-04 0.000000000000e+00 -7.707753524963e-04 -1.295814362086e-11 4.600000000000e+00 7.942147820465e-04 0.000000000000e+00 -7.942147690882e-04 -1.295834362086e-11 4.800000000000e+00 8.169604022916e-04 0.000000000000e+00 -8.169603893331e-04 -1.295854362086e-11 5.000000000000e+00 8.390386307754e-04 0.000000000000e+00 -8.390386178167e-04 -1.295874362086e-11 5.200000000000e+00 8.604744822479e-04 0.000000000000e+00 -8.604744692889e-04 -1.295894362086e-11 5.400000000000e+00 8.812916694949e-04 0.000000000000e+00 -8.812916565357e-04 -1.295914362086e-11 5.600000000000e+00 9.015126848532e-04 0.000000000000e+00 -9.015126718939e-04 -1.295934362086e-11 5.800000000000e+00 9.211588758852e-04 0.000000000000e+00 -9.211588629256e-04 -1.295954362086e-11 6.000000000000e+00 9.402505156825e-04 0.000000000000e+00 -9.402505027228e-04 -1.295974362086e-11 6.200000000000e+00 9.588068682308e-04 0.000000000000e+00 -9.588068552708e-04 -1.295994362086e-11 6.400000000000e+00 9.768462492262e-04 0.000000000000e+00 -9.768462362661e-04 -1.296014362086e-11 6.600000000000e+00 9.943860827053e-04 0.000000000000e+00 -9.943860697450e-04 -1.296034362086e-11 6.800000000000e+00 1.011442953816e-03 0.000000000000e+00 -1.011442940855e-03 -1.296054362086e-11 7.000000000000e+00 1.028032658028e-03 0.000000000000e+00 -1.028032645067e-03 -1.296074362086e-11 7.200000000000e+00 1.044170247069e-03 0.000000000000e+00 -1.044170234108e-03 -1.296094362086e-11 7.400000000000e+00 1.059870071821e-03 0.000000000000e+00 -1.059870058860e-03 -1.296114362086e-11 7.600000000000e+00 1.075145822427e-03 0.000000000000e+00 -1.075145809466e-03 -1.296134362086e-11 7.800000000000e+00 1.090010565810e-03 0.000000000000e+00 -1.090010552848e-03 -1.296154362086e-11 8.000000000000e+00 1.104476780799e-03 0.000000000000e+00 -1.104476767838e-03 -1.296174362086e-11 8.200000000000e+00 1.118556391052e-03 0.000000000000e+00 -1.118556378090e-03 -1.296194362086e-11 8.400000000000e+00 1.132260795922e-03 0.000000000000e+00 -1.132260782960e-03 -1.296214362086e-11 8.600000000000e+00 1.145600899434e-03 0.000000000000e+00 -1.145600886472e-03 -1.296234362086e-11 8.800000000000e+00 1.158587137509e-03 0.000000000000e+00 -1.158587124547e-03 -1.296254362086e-11 9.000000000000e+00 1.171229503551e-03 0.000000000000e+00 -1.171229490588e-03 -1.296274362086e-11 9.200000000000e+00 1.183537572527e-03 0.000000000000e+00 -1.183537559565e-03 -1.296294362086e-11 9.400000000000e+00 1.195520523653e-03 0.000000000000e+00 -1.195520510690e-03 -1.296314362086e-11 9.600000000000e+00 1.207187161762e-03 0.000000000000e+00 -1.207187148798e-03 -1.296334362086e-11 9.800000000000e+00 1.218545937473e-03 0.000000000000e+00 -1.218545924509e-03 -1.296354362086e-11 1.000000000000e+01 1.229604966230e-03 0.000000000000e+00 -1.229604953266e-03 -1.296374362086e-11 1.020000000000e+01 1.240372046295e-03 0.000000000000e+00 -1.240372033331e-03 -1.296394362086e-11 1.040000000000e+01 1.250854675755e-03 0.000000000000e+00 -1.250854662791e-03 -1.296414362086e-11 1.060000000000e+01 1.261060068635e-03 0.000000000000e+00 -1.261060055671e-03 -1.296434362086e-11 1.080000000000e+01 1.270995170139e-03 0.000000000000e+00 -1.270995157175e-03 -1.296454362086e-11 1.100000000000e+01 1.280666671117e-03 0.000000000000e+00 -1.280666658152e-03 -1.296474362086e-11 1.120000000000e+01 1.290081021770e-03 0.000000000000e+00 -1.290081008805e-03 -1.296494362086e-11 1.140000000000e+01 1.299244444673e-03 0.000000000000e+00 -1.299244431708e-03 -1.296514362086e-11 1.160000000000e+01 1.308162947130e-03 0.000000000000e+00 -1.308162934164e-03 -1.296534362086e-11 1.180000000000e+01 1.316842332922e-03 0.000000000000e+00 -1.316842319957e-03 -1.296554362086e-11 1.200000000000e+01 1.325288213475e-03 0.000000000000e+00 -1.325288200510e-03 -1.296574362086e-11 1.220000000000e+01 1.333506018472e-03 0.000000000000e+00 -1.333506005506e-03 -1.296594362086e-11 1.240000000000e+01 1.341501005953e-03 0.000000000000e+00 -1.341500992987e-03 -1.296614362086e-11 1.260000000000e+01 1.349278271925e-03 0.000000000000e+00 -1.349278258959e-03 -1.296634362086e-11 1.280000000000e+01 1.356842759497e-03 0.000000000000e+00 -1.356842746531e-03 -1.296654362086e-11 1.300000000000e+01 1.364199267573e-03 0.000000000000e+00 -1.364199254606e-03 -1.296674362086e-11 1.320000000000e+01 1.371352459110e-03 0.000000000000e+00 -1.371352446143e-03 -1.296694362086e-11 1.340000000000e+01 1.378306868981e-03 0.000000000000e+00 -1.378306856013e-03 -1.296714362086e-11 1.360000000000e+01 1.385066911419e-03 0.000000000000e+00 -1.385066898452e-03 -1.296734362086e-11 1.380000000000e+01 1.391636887103e-03 0.000000000000e+00 -1.391636874136e-03 -1.296754362086e-11 1.400000000000e+01 1.398020989855e-03 0.000000000000e+00 -1.398020976887e-03 -1.296774362086e-11 1.420000000000e+01 1.404223312986e-03 0.000000000000e+00 -1.404223300018e-03 -1.296794362086e-11 1.440000000000e+01 1.410247855292e-03 0.000000000000e+00 -1.410247842324e-03 -1.296814362086e-11 1.460000000000e+01 1.416098526703e-03 0.000000000000e+00 -1.416098513735e-03 -1.296834362086e-11 1.480000000000e+01 1.421779153602e-03 0.000000000000e+00 -1.421779140633e-03 -1.296854362086e-11 1.500000000000e+01 1.427293483810e-03 0.000000000000e+00 -1.427293470842e-03 -1.296874362086e-11 1.520000000000e+01 1.432645191259e-03 0.000000000000e+00 -1.432645178290e-03 -1.296894362086e-11 1.540000000000e+01 1.437837880335e-03 0.000000000000e+00 -1.437837867366e-03 -1.296914362086e-11 1.560000000000e+01 1.442875089927e-03 0.000000000000e+00 -1.442875076958e-03 -1.296934362086e-11 1.580000000000e+01 1.447760297159e-03 0.000000000000e+00 -1.447760284189e-03 -1.296954362086e-11 1.600000000000e+01 1.452496920826e-03 0.000000000000e+00 -1.452496907856e-03 -1.296974362086e-11 1.620000000000e+01 1.457088324546e-03 0.000000000000e+00 -1.457088311576e-03 -1.296994362086e-11 1.640000000000e+01 1.461537819615e-03 0.000000000000e+00 -1.461537806644e-03 -1.297014362086e-11 1.660000000000e+01 1.465848667587e-03 0.000000000000e+00 -1.465848654617e-03 -1.297034362086e-11 1.680000000000e+01 1.470024082590e-03 0.000000000000e+00 -1.470024069620e-03 -1.297054362086e-11 1.700000000000e+01 1.474067233366e-03 0.000000000000e+00 -1.474067220395e-03 -1.297074362086e-11 1.720000000000e+01 1.477981245068e-03 0.000000000000e+00 -1.477981232097e-03 -1.297094362086e-11 1.740000000000e+01 1.481769200806e-03 0.000000000000e+00 -1.481769187835e-03 -1.297114362086e-11 1.760000000000e+01 1.485434142966e-03 0.000000000000e+00 -1.485434129994e-03 -1.297134362086e-11 1.780000000000e+01 1.488979074295e-03 0.000000000000e+00 -1.488979061324e-03 -1.297154362086e-11 1.800000000000e+01 1.492406958793e-03 0.000000000000e+00 -1.492406945821e-03 -1.297174362086e-11 1.820000000000e+01 1.495720722386e-03 0.000000000000e+00 -1.495720709414e-03 -1.297194362086e-11 1.840000000000e+01 1.498923253430e-03 0.000000000000e+00 -1.498923240458e-03 -1.297214362086e-11 1.860000000000e+01 1.502017403041e-03 0.000000000000e+00 -1.502017390069e-03 -1.297234362086e-11 1.880000000000e+01 1.505005985260e-03 0.000000000000e+00 -1.505005972288e-03 -1.297254362086e-11 1.900000000000e+01 1.507891777086e-03 0.000000000000e+00 -1.507891764113e-03 -1.297274362086e-11 1.920000000000e+01 1.510677518372e-03 0.000000000000e+00 -1.510677505399e-03 -1.297294362086e-11 1.940000000000e+01 1.513365911618e-03 0.000000000000e+00 -1.513365898645e-03 -1.297314362086e-11 1.960000000000e+01 1.515959621657e-03 0.000000000000e+00 -1.515959608684e-03 -1.297334362086e-11 1.980000000000e+01 1.518461275264e-03 0.000000000000e+00 -1.518461262290e-03 -1.297354362086e-11 2.000000000000e+01 1.520873460690e-03 0.000000000000e+00 -1.520873447716e-03 -1.297374362086e-11 1.000000000000e+00 2.295543064161e-04 0.000000000000e+00 -2.295542934614e-04 -1.295474362084e-11 1.200000000000e+00 2.704544815667e-04 0.000000000000e+00 -2.704544686118e-04 -1.295494362086e-11 1.400000000000e+00 3.098808106818e-04 0.000000000000e+00 -3.098807977267e-04 -1.295514362086e-11 1.600000000000e+00 3.479065191525e-04 0.000000000000e+00 -3.479065061972e-04 -1.295534362086e-11 1.800000000000e+00 3.846001144754e-04 0.000000000000e+00 -3.846001015199e-04 -1.295554362086e-11 2.000000000000e+00 4.200257447530e-04 0.000000000000e+00 -4.200257317973e-04 -1.295574362086e-11 2.200000000000e+00 4.542435257833e-04 0.000000000000e+00 -4.542435128274e-04 -1.295594362086e-11 2.400000000000e+00 4.873098399578e-04 0.000000000000e+00 -4.873098270017e-04 -1.295614362086e-11 2.600000000000e+00 5.192776098144e-04 0.000000000000e+00 -5.192775968580e-04 -1.295634362086e-11 2.800000000000e+00 5.501965487397e-04 0.000000000000e+00 -5.501965357832e-04 -1.295654362086e-11 3.000000000000e+00 5.801133910075e-04 0.000000000000e+00 -5.801133780507e-04 -1.295674362086e-11 3.200000000000e+00 6.090721030822e-04 0.000000000000e+00 -6.090720901253e-04 -1.295694362086e-11 3.400000000000e+00 6.371140779025e-04 0.000000000000e+00 -6.371140649454e-04 -1.295714362086e-11 3.600000000000e+00 6.642783136724e-04 0.000000000000e+00 -6.642783007151e-04 -1.295734362086e-11 3.800000000000e+00 6.906015850637e-04 0.000000000000e+00 -6.906015721062e-04 -1.295754362086e-11 4.000000000000e+00 7.161185678510e-04 0.000000000000e+00 -7.161185548933e-04 -1.295774362086e-11 4.200000000000e+00 7.408620213413e-04 0.000000000000e+00 -7.408620083834e-04 -1.295794362086e-11 4.400000000000e+00 7.648628881303e-04 0.000000000000e+00 -7.648628751722e-04 -1.295814362086e-11 4.600000000000e+00 7.881504212384e-04 0.000000000000e+00 -7.881504082800e-04 -1.295834362086e-11 4.800000000000e+00 8.107522945108e-04 0.000000000000e+00 -8.107522815523e-04 -1.295854362086e-11 5.000000000000e+00 8.326947047654e-04 0.000000000000e+00 -8.326946918066e-04 -1.295874362086e-11 5.200000000000e+00 8.540024663699e-04 0.000000000000e+00 -8.540024534109e-04 -1.295894362086e-11 5.400000000000e+00 8.746990988767e-04 0.000000000000e+00 -8.746990859175e-04 -1.295914362086e-11 5.600000000000e+00 8.948069082841e-04 0.000000000000e+00 -8.948068953248e-04 -1.295934362086e-11 5.800000000000e+00 9.143470624446e-04 0.000000000000e+00 -9.143470494851e-04 -1.295954362086e-11 6.000000000000e+00 9.333396610946e-04 0.000000000000e+00 -9.333396481349e-04 -1.295974362086e-11 6.200000000000e+00 9.518038009383e-04 0.000000000000e+00 -9.518037879784e-04 -1.295994362086e-11 6.400000000000e+00 9.697576361816e-04 0.000000000000e+00 -9.697576232214e-04 -1.296014362086e-11 6.600000000000e+00 9.872184348767e-04 0.000000000000e+00 -9.872184219163e-04 -1.296034362086e-11 6.800000000000e+00 1.004202631409e-03 0.000000000000e+00 -1.004202618448e-03 -1.296054362086e-11 7.000000000000e+00 1.020725875426e-03 0.000000000000e+00 -1.020725862465e-03 -1.296074362086e-11 7.200000000000e+00 1.036803077489e-03 0.000000000000e+00 -1.036803064528e-03 -1.296094362086e-11 7.400000000000e+00 1.052448451699e-03 0.000000000000e+00 -1.052448438738e-03 -1.296114362086e-11 7.600000000000e+00 1.067675555522e-03 0.000000000000e+00 -1.067675542560e-03 -1.296134362086e-11 7.800000000000e+00 1.082497327043e-03 0.000000000000e+00 -1.082497314081e-03 -1.296154362086e-11 8.000000000000e+00 1.096926119828e-03 0.000000000000e+00 -1.096926106866e-03 -1.296174362086e-11 8.200000000000e+00 1.110973735580e-03 0.000000000000e+00 -1.110973722618e-03 -1.296194362086e-11 8.400000000000e+00 1.124651454756e-03 0.000000000000e+00 -1.124651441793e-03 -1.296214362086e-11 8.600000000000e+00 1.137970065287e-03 0.000000000000e+00 -1.137970052325e-03 -1.296234362086e-11 8.800000000000e+00 1.150939889559e-03 0.000000000000e+00 -1.150939876596e-03 -1.296254362086e-11 9.000000000000e+00 1.163570809753e-03 0.000000000000e+00 -1.163570796790e-03 -1.296274362086e-11 9.200000000000e+00 1.175872291697e-03 0.000000000000e+00 -1.175872278734e-03 -1.296294362086e-11 9.400000000000e+00 1.187853407307e-03 0.000000000000e+00 -1.187853394344e-03 -1.296314362086e-11 9.600000000000e+00 1.199522855740e-03 0.000000000000e+00 -1.199522842776e-03 -1.296334362086e-11 9.800000000000e+00 1.210888983333e-03 0.000000000000e+00 -1.210888970369e-03 -1.296354362086e-11 1.000000000000e+01 1.221959802428e-03 0.000000000000e+00 -1.221959789464e-03 -1.296374362086e-11 1.020000000000e+01 1.232743009151e-03 0.000000000000e+00 -1.232742996187e-03 -1.296394362086e-11 1.040000000000e+01 1.243246000217e-03 0.000000000000e+00 -1.243245987253e-03 -1.296414362086e-11 1.060000000000e+01 1.253475888837e-03 0.000000000000e+00 -1.253475875872e-03 -1.296434362086e-11 1.080000000000e+01 1.263439519770e-03 0.000000000000e+00 -1.263439506805e-03 -1.296454362086e-11 1.100000000000e+01 1.273143483598e-03 0.000000000000e+00 -1.273143470633e-03 -1.296474362086e-11 1.120000000000e+01 1.282594130257e-03 0.000000000000e+00 -1.282594117292e-03 -1.296494362086e-11 1.140000000000e+01 1.291797581879e-03 0.000000000000e+00 -1.291797568914e-03 -1.296514362086e-11 1.160000000000e+01 1.300759744991e-03 0.000000000000e+00 -1.300759732025e-03 -1.296534362086e-11 1.180000000000e+01 1.309486322101e-03 0.000000000000e+00 -1.309486309136e-03 -1.296554362086e-11 1.200000000000e+01 1.317982822722e-03 0.000000000000e+00 -1.317982809756e-03 -1.296574362086e-11 1.220000000000e+01 1.326254573849e-03 0.000000000000e+00 -1.326254560883e-03 -1.296594362086e-11 1.240000000000e+01 1.334306729937e-03 0.000000000000e+00 -1.334306716971e-03 -1.296614362086e-11 1.260000000000e+01 1.342144282393e-03 0.000000000000e+00 -1.342144269427e-03 -1.296634362086e-11 1.280000000000e+01 1.349772068617e-03 0.000000000000e+00 -1.349772055650e-03 -1.296654362086e-11 1.300000000000e+01 1.357194780605e-03 0.000000000000e+00 -1.357194767638e-03 -1.296674362086e-11 1.320000000000e+01 1.364416973144e-03 0.000000000000e+00 -1.364416960177e-03 -1.296694362086e-11 1.340000000000e+01 1.371443071610e-03 0.000000000000e+00 -1.371443058642e-03 -1.296714362086e-11 1.360000000000e+01 1.378277379384e-03 0.000000000000e+00 -1.378277366416e-03 -1.296734362086e-11 1.380000000000e+01 1.384924084908e-03 0.000000000000e+00 -1.384924071941e-03 -1.296754362086e-11 1.400000000000e+01 1.391387268388e-03 0.000000000000e+00 -1.391387255420e-03 -1.296774362086e-11 1.420000000000e+01 1.397670908148e-03 0.000000000000e+00 -1.397670895180e-03 -1.296794362086e-11 1.440000000000e+01 1.403778886667e-03 0.000000000000e+00 -1.403778873699e-03 -1.296814362086e-11 1.460000000000e+01 1.409714996282e-03 0.000000000000e+00 -1.409714983314e-03 -1.296834362086e-11 1.480000000000e+01 1.415482944580e-03 0.000000000000e+00 -1.415482931612e-03 -1.296854362086e-11 1.500000000000e+01 1.421086359483e-03 0.000000000000e+00 -1.421086346514e-03 -1.296874362086e-11 1.520000000000e+01 1.426528794028e-03 0.000000000000e+00 -1.426528781059e-03 -1.296894362086e-11 1.540000000000e+01 1.431813730857e-03 0.000000000000e+00 -1.431813717888e-03 -1.296914362086e-11 1.560000000000e+01 1.436944586409e-03 0.000000000000e+00 -1.436944573440e-03 -1.296934362086e-11 1.580000000000e+01 1.441924714830e-03 0.000000000000e+00 -1.441924701860e-03 -1.296954362086e-11 1.600000000000e+01 1.446757411600e-03 0.000000000000e+00 -1.446757398630e-03 -1.296974362086e-11 1.620000000000e+01 1.451445916889e-03 0.000000000000e+00 -1.451445903919e-03 -1.296994362086e-11 1.640000000000e+01 1.455993418633e-03 0.000000000000e+00 -1.455993405663e-03 -1.297014362086e-11 1.660000000000e+01 1.460403055353e-03 0.000000000000e+00 -1.460403042383e-03 -1.297034362086e-11 1.680000000000e+01 1.464677918712e-03 0.000000000000e+00 -1.464677905741e-03 -1.297054362086e-11 1.700000000000e+01 1.468821055813e-03 0.000000000000e+00 -1.468821042842e-03 -1.297074362086e-11 1.720000000000e+01 1.472835471260e-03 0.000000000000e+00 -1.472835458289e-03 -1.297094362086e-11 1.740000000000e+01 1.476724128971e-03 0.000000000000e+00 -1.476724116000e-03 -1.297114362086e-11 1.760000000000e+01 1.480489953769e-03 0.000000000000e+00 -1.480489940797e-03 -1.297134362086e-11 1.780000000000e+01 1.484135832738e-03 0.000000000000e+00 -1.484135819767e-03 -1.297154362086e-11 1.800000000000e+01 1.487664616382e-03 0.000000000000e+00 -1.487664603410e-03 -1.297174362086e-11 1.820000000000e+01 1.491079119569e-03 0.000000000000e+00 -1.491079106597e-03 -1.297194362086e-11 1.840000000000e+01 1.494382122287e-03 0.000000000000e+00 -1.494382109315e-03 -1.297214362086e-11 1.860000000000e+01 1.497576370225e-03 0.000000000000e+00 -1.497576357253e-03 -1.297234362086e-11 1.880000000000e+01 1.500664575178e-03 0.000000000000e+00 -1.500664562205e-03 -1.297254362086e-11 1.900000000000e+01 1.503649415299e-03 0.000000000000e+00 -1.503649402326e-03 -1.297274362086e-11 1.920000000000e+01 1.506533535210e-03 0.000000000000e+00 -1.506533522237e-03 -1.297294362086e-11 1.940000000000e+01 1.509319545983e-03 0.000000000000e+00 -1.509319533009e-03 -1.297314362086e-11 1.960000000000e+01 1.512010024999e-03 0.000000000000e+00 -1.512010012026e-03 -1.297334362086e-11 1.980000000000e+01 1.514607515715e-03 0.000000000000e+00 -1.514607502742e-03 -1.297354362086e-11 2.000000000000e+01 1.517114527328e-03 0.000000000000e+00 -1.517114514354e-03 -1.297374362086e-11 1.000000000000e+00 2.273195551676e-04 0.000000000000e+00 -2.273195422129e-04 -1.295474362084e-11 1.200000000000e+00 2.678194925614e-04 0.000000000000e+00 -2.678194796064e-04 -1.295494362086e-11 1.400000000000e+00 3.068604160405e-04 0.000000000000e+00 -3.068604030854e-04 -1.295514362086e-11 1.600000000000e+00 3.445152087801e-04 0.000000000000e+00 -3.445151958247e-04 -1.295534362086e-11 1.800000000000e+00 3.808520311849e-04 0.000000000000e+00 -3.808520182293e-04 -1.295554362086e-11 2.000000000000e+00 4.159346825944e-04 0.000000000000e+00 -4.159346696386e-04 -1.295574362086e-11 2.200000000000e+00 4.498229310211e-04 0.000000000000e+00 -4.498229180651e-04 -1.295594362086e-11 2.400000000000e+00 4.825728142096e-04 0.000000000000e+00 -4.825728012534e-04 -1.295614362086e-11 2.600000000000e+00 5.142369149273e-04 0.000000000000e+00 -5.142369019710e-04 -1.295634362086e-11 2.800000000000e+00 5.448646130414e-04 0.000000000000e+00 -5.448646000848e-04 -1.295654362086e-11 3.000000000000e+00 5.745023166213e-04 0.000000000000e+00 -5.745023036646e-04 -1.295674362086e-11 3.200000000000e+00 6.031936740475e-04 0.000000000000e+00 -6.031936610906e-04 -1.295694362086e-11 3.400000000000e+00 6.309797688792e-04 0.000000000000e+00 -6.309797559220e-04 -1.295714362086e-11 3.600000000000e+00 6.578992990487e-04 0.000000000000e+00 -6.578992860914e-04 -1.295734362086e-11 3.800000000000e+00 6.839887485838e-04 0.000000000000e+00 -6.839887356262e-04 -1.295754362086e-11 4.000000000000e+00 7.092825112939e-04 0.000000000000e+00 -7.092824983361e-04 -1.295774362086e-11 4.200000000000e+00 7.338130748484e-04 0.000000000000e+00 -7.338130618905e-04 -1.295794362086e-11 4.400000000000e+00 7.576111193914e-04 0.000000000000e+00 -7.576111064332e-04 -1.295814362086e-11 4.600000000000e+00 7.807056448270e-04 0.000000000000e+00 -7.807056318687e-04 -1.295834362086e-11 4.800000000000e+00 8.031240810433e-04 0.000000000000e+00 -8.031240680847e-04 -1.295854362086e-11 5.000000000000e+00 8.248923898414e-04 0.000000000000e+00 -8.248923768826e-04 -1.295874362086e-11 5.200000000000e+00 8.460351592625e-04 0.000000000000e+00 -8.460351463036e-04 -1.295894362086e-11 5.400000000000e+00 8.665756909456e-04 0.000000000000e+00 -8.665756779865e-04 -1.295914362086e-11 5.600000000000e+00 8.865360810934e-04 0.000000000000e+00 -8.865360681341e-04 -1.295934362086e-11 5.800000000000e+00 9.059372955712e-04 0.000000000000e+00 -9.059372826116e-04 -1.295954362086e-11 6.000000000000e+00 9.247992396176e-04 0.000000000000e+00 -9.247992266579e-04 -1.295974362086e-11 6.200000000000e+00 9.431408226033e-04 0.000000000000e+00 -9.431408096433e-04 -1.295994362086e-11 6.400000000000e+00 9.609800182351e-04 0.000000000000e+00 -9.609800052750e-04 -1.296014362086e-11 6.600000000000e+00 9.783339205714e-04 0.000000000000e+00 -9.783339076111e-04 -1.296034362086e-11 6.800000000000e+00 9.952187961775e-04 0.000000000000e+00 -9.952187832170e-04 -1.296054362086e-11 7.000000000000e+00 1.011650132728e-03 0.000000000000e+00 -1.011650119767e-03 -1.296074362086e-11 7.200000000000e+00 1.027642684331e-03 0.000000000000e+00 -1.027642671370e-03 -1.296094362086e-11 7.400000000000e+00 1.043210513830e-03 0.000000000000e+00 -1.043210500869e-03 -1.296114362086e-11 7.600000000000e+00 1.058367032317e-03 0.000000000000e+00 -1.058367019356e-03 -1.296134362086e-11 7.800000000000e+00 1.073125036068e-03 0.000000000000e+00 -1.073125023106e-03 -1.296154362086e-11 8.000000000000e+00 1.087496741093e-03 0.000000000000e+00 -1.087496728131e-03 -1.296174362086e-11 8.200000000000e+00 1.101493815495e-03 0.000000000000e+00 -1.101493802533e-03 -1.296194362086e-11 8.400000000000e+00 1.115127409780e-03 0.000000000000e+00 -1.115127396818e-03 -1.296214362086e-11 8.600000000000e+00 1.128408185292e-03 0.000000000000e+00 -1.128408172329e-03 -1.296234362086e-11 8.800000000000e+00 1.141346340890e-03 0.000000000000e+00 -1.141346327927e-03 -1.296254362086e-11 9.000000000000e+00 1.153951638019e-03 0.000000000000e+00 -1.153951625056e-03 -1.296274362086e-11 9.200000000000e+00 1.166233424271e-03 0.000000000000e+00 -1.166233411308e-03 -1.296294362086e-11 9.400000000000e+00 1.178200655557e-03 0.000000000000e+00 -1.178200642594e-03 -1.296314362086e-11 9.600000000000e+00 1.189861916985e-03 0.000000000000e+00 -1.189861904022e-03 -1.296334362086e-11 9.800000000000e+00 1.201225442540e-03 0.000000000000e+00 -1.201225429576e-03 -1.296354362086e-11 1.000000000000e+01 1.212299133642e-03 0.000000000000e+00 -1.212299120678e-03 -1.296374362086e-11 1.020000000000e+01 1.223090576674e-03 0.000000000000e+00 -1.223090563710e-03 -1.296394362086e-11 1.040000000000e+01 1.233607059535e-03 0.000000000000e+00 -1.233607046571e-03 -1.296414362086e-11 1.060000000000e+01 1.243855587303e-03 0.000000000000e+00 -1.243855574339e-03 -1.296434362086e-11 1.080000000000e+01 1.253842897048e-03 0.000000000000e+00 -1.253842884084e-03 -1.296454362086e-11 1.100000000000e+01 1.263575471874e-03 0.000000000000e+00 -1.263575458909e-03 -1.296474362086e-11 1.120000000000e+01 1.273059554222e-03 0.000000000000e+00 -1.273059541257e-03 -1.296494362086e-11 1.140000000000e+01 1.282301158495e-03 0.000000000000e+00 -1.282301145530e-03 -1.296514362086e-11 1.160000000000e+01 1.291306083042e-03 0.000000000000e+00 -1.291306070077e-03 -1.296534362086e-11 1.180000000000e+01 1.300079921547e-03 0.000000000000e+00 -1.300079908582e-03 -1.296554362086e-11 1.200000000000e+01 1.308628073849e-03 0.000000000000e+00 -1.308628060883e-03 -1.296574362086e-11 1.220000000000e+01 1.316955756243e-03 0.000000000000e+00 -1.316955743277e-03 -1.296594362086e-11 1.240000000000e+01 1.325068011279e-03 0.000000000000e+00 -1.325067998313e-03 -1.296614362086e-11 1.260000000000e+01 1.332969717097e-03 0.000000000000e+00 -1.332969704131e-03 -1.296634362086e-11 1.280000000000e+01 1.340665596314e-03 0.000000000000e+00 -1.340665583347e-03 -1.296654362086e-11 1.300000000000e+01 1.348160224495e-03 0.000000000000e+00 -1.348160211528e-03 -1.296674362086e-11 1.320000000000e+01 1.355458038227e-03 0.000000000000e+00 -1.355458025260e-03 -1.296694362086e-11 1.340000000000e+01 1.362563342814e-03 0.000000000000e+00 -1.362563329847e-03 -1.296714362086e-11 1.360000000000e+01 1.369480319605e-03 0.000000000000e+00 -1.369480306638e-03 -1.296734362086e-11 1.380000000000e+01 1.376213032986e-03 0.000000000000e+00 -1.376213020018e-03 -1.296754362086e-11 1.400000000000e+01 1.382765437025e-03 0.000000000000e+00 -1.382765424058e-03 -1.296774362086e-11 1.420000000000e+01 1.389141381814e-03 0.000000000000e+00 -1.389141368846e-03 -1.296794362086e-11 1.440000000000e+01 1.395344619482e-03 0.000000000000e+00 -1.395344606514e-03 -1.296814362086e-11 1.460000000000e+01 1.401378809928e-03 0.000000000000e+00 -1.401378796959e-03 -1.296834362086e-11 1.480000000000e+01 1.407247526243e-03 0.000000000000e+00 -1.407247513274e-03 -1.296854362086e-11 1.500000000000e+01 1.412954259863e-03 0.000000000000e+00 -1.412954246895e-03 -1.296874362086e-11 1.520000000000e+01 1.418502425437e-03 0.000000000000e+00 -1.418502412468e-03 -1.296894362086e-11 1.540000000000e+01 1.423895365422e-03 0.000000000000e+00 -1.423895352453e-03 -1.296914362086e-11 1.560000000000e+01 1.429136354414e-03 0.000000000000e+00 -1.429136341445e-03 -1.296934362086e-11 1.580000000000e+01 1.434228603219e-03 0.000000000000e+00 -1.434228590250e-03 -1.296954362086e-11 1.600000000000e+01 1.439175262662e-03 0.000000000000e+00 -1.439175249692e-03 -1.296974362086e-11 1.620000000000e+01 1.443979427143e-03 0.000000000000e+00 -1.443979414173e-03 -1.296994362086e-11 1.640000000000e+01 1.448644137949e-03 0.000000000000e+00 -1.448644124979e-03 -1.297014362086e-11 1.660000000000e+01 1.453172386315e-03 0.000000000000e+00 -1.453172373344e-03 -1.297034362086e-11 1.680000000000e+01 1.457567116244e-03 0.000000000000e+00 -1.457567103273e-03 -1.297054362086e-11 1.700000000000e+01 1.461831227097e-03 0.000000000000e+00 -1.461831214126e-03 -1.297074362086e-11 1.720000000000e+01 1.465967575944e-03 0.000000000000e+00 -1.465967562973e-03 -1.297094362086e-11 1.740000000000e+01 1.469978979694e-03 0.000000000000e+00 -1.469978966723e-03 -1.297114362086e-11 1.760000000000e+01 1.473868216999e-03 0.000000000000e+00 -1.473868204028e-03 -1.297134362086e-11 1.780000000000e+01 1.477638029947e-03 0.000000000000e+00 -1.477638016976e-03 -1.297154362086e-11 1.800000000000e+01 1.481291125549e-03 0.000000000000e+00 -1.481291112577e-03 -1.297174362086e-11 1.820000000000e+01 1.484830177020e-03 0.000000000000e+00 -1.484830164048e-03 -1.297194362086e-11 1.840000000000e+01 1.488257824871e-03 0.000000000000e+00 -1.488257811899e-03 -1.297214362086e-11 1.860000000000e+01 1.491576677820e-03 0.000000000000e+00 -1.491576664847e-03 -1.297234362086e-11 1.880000000000e+01 1.494789313519e-03 0.000000000000e+00 -1.494789300547e-03 -1.297254362086e-11 1.900000000000e+01 1.497898279129e-03 0.000000000000e+00 -1.497898266157e-03 -1.297274362086e-11 1.920000000000e+01 1.500906091727e-03 0.000000000000e+00 -1.500906078754e-03 -1.297294362086e-11 1.940000000000e+01 1.503815238577e-03 0.000000000000e+00 -1.503815225604e-03 -1.297314362086e-11 1.960000000000e+01 1.506628177267e-03 0.000000000000e+00 -1.506628164294e-03 -1.297334362086e-11 1.980000000000e+01 1.509347335723e-03 0.000000000000e+00 -1.509347322749e-03 -1.297354362086e-11 2.000000000000e+01 1.511975112109e-03 0.000000000000e+00 -1.511975099136e-03 -1.297374362086e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Id1_vb2.standard0000644000265600020320000010224312264261473023727 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 1.099998998139e-14 0.000000000000e+00 1.000000000000e-14 -2.100000000000e-14 1.500000000000e+00 1.149991560312e-14 0.000000000000e+00 1.000000000000e-14 -2.150000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.249976684659e-14 0.000000000000e+00 1.000000000000e-14 -2.250000000000e-14 3.000000000000e+00 1.300001772897e-14 0.000000000000e+00 1.000000000000e-14 -2.300000000000e-14 3.500000000000e+00 1.349961809005e-14 0.000000000000e+00 1.000000000000e-14 -2.350000000000e-14 4.000000000000e+00 1.399965213200e-14 0.000000000000e+00 1.000000000000e-14 -2.400000000000e-14 4.500000000000e+00 1.449968617395e-14 0.000000000000e+00 1.000000000000e-14 -2.450000000000e-14 5.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 5.500000000000e+00 1.549975425785e-14 0.000000000000e+00 1.000000000000e-14 -2.550000000000e-14 6.000000000000e+00 1.599978829980e-14 0.000000000000e+00 1.000000000000e-14 -2.600000000000e-14 6.500000000000e+00 1.649938866088e-14 0.000000000000e+00 1.000000000000e-14 -2.650000000000e-14 7.000000000000e+00 1.699942270283e-14 0.000000000000e+00 1.000000000000e-14 -2.700000000000e-14 7.500000000000e+00 1.750032410652e-14 0.000000000000e+00 1.000000000000e-14 -2.750000000000e-14 8.000000000000e+00 1.799992446760e-14 0.000000000000e+00 1.000000000000e-14 -2.800000000000e-14 8.500000000000e+00 1.849995850955e-14 0.000000000000e+00 1.000000000000e-14 -2.850000000000e-14 9.000000000000e+00 1.899955887064e-14 0.000000000000e+00 1.000000000000e-14 -2.900000000000e-14 9.500000000000e+00 1.950002659346e-14 0.000000000000e+00 1.000000000000e-14 -2.950000000000e-14 1.000000000000e+01 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.050000000000e+01 2.050009467736e-14 0.000000000000e+00 1.000000000000e-14 -3.050000000000e-14 1.100000000000e+01 2.099969503844e-14 0.000000000000e+00 1.000000000000e-14 -3.100000000000e-14 1.150000000000e+01 2.149929539952e-14 0.000000000000e+00 1.000000000000e-14 -3.150000000000e-14 1.200000000000e+01 2.200063048408e-14 0.000000000000e+00 1.000000000000e-14 -3.200000000000e-14 1.250000000000e+01 2.250023084516e-14 0.000000000000e+00 1.000000000000e-14 -3.250000000000e-14 1.300000000000e+01 2.299983120624e-14 0.000000000000e+00 1.000000000000e-14 -3.300000000000e-14 1.350000000000e+01 2.349943156732e-14 0.000000000000e+00 1.000000000000e-14 -3.350000000000e-14 1.400000000000e+01 2.399989929014e-14 0.000000000000e+00 1.000000000000e-14 -3.400000000000e-14 1.450000000000e+01 2.450036701296e-14 0.000000000000e+00 1.000000000000e-14 -3.450000000000e-14 1.500000000000e+01 2.499996737404e-14 0.000000000000e+00 1.000000000000e-14 -3.500000000000e-14 1.550000000000e+01 2.549956773512e-14 0.000000000000e+00 1.000000000000e-14 -3.550000000000e-14 1.600000000000e+01 2.600003545794e-14 0.000000000000e+00 1.000000000000e-14 -3.600000000000e-14 1.650000000000e+01 2.649963581902e-14 0.000000000000e+00 1.000000000000e-14 -3.650000000000e-14 1.700000000000e+01 2.700010354184e-14 0.000000000000e+00 1.000000000000e-14 -3.700000000000e-14 1.750000000000e+01 2.750057126466e-14 0.000000000000e+00 1.000000000000e-14 -3.750000000000e-14 1.800000000000e+01 2.800017162574e-14 0.000000000000e+00 1.000000000000e-14 -3.800000000000e-14 1.850000000000e+01 2.849977198682e-14 0.000000000000e+00 1.000000000000e-14 -3.850000000000e-14 1.900000000000e+01 2.900110707138e-14 0.000000000000e+00 1.000000000000e-14 -3.900000000000e-14 1.950000000000e+01 2.949984007072e-14 0.000000000000e+00 1.000000000000e-14 -3.950000000000e-14 2.000000000000e+01 3.000030779354e-14 0.000000000000e+00 1.000000000000e-14 -4.000000000000e-14 1.000000000000e+00 2.763553077828e-08 0.000000000000e+00 -2.763550977816e-08 -2.100000000000e-14 1.500000000000e+00 2.966719615935e-08 0.000000000000e+00 -2.966717465921e-08 -2.150000000000e-14 2.000000000000e+00 3.182727454092e-08 0.000000000000e+00 -3.182725254093e-08 -2.200000000000e-14 2.500000000000e+00 3.412760615448e-08 0.000000000000e+00 -3.412758365441e-08 -2.250000000000e-14 3.000000000000e+00 3.657870081613e-08 0.000000000000e+00 -3.657867781680e-08 -2.300000000000e-14 3.500000000000e+00 3.919079163755e-08 0.000000000000e+00 -3.919076813817e-08 -2.350000000000e-14 4.000000000000e+00 4.197420312669e-08 0.000000000000e+00 -4.197417912744e-08 -2.400000000000e-14 4.500000000000e+00 4.493951261553e-08 0.000000000000e+00 -4.493948811561e-08 -2.450000000000e-14 5.000000000000e+00 4.809763163140e-08 0.000000000000e+00 -4.809760663233e-08 -2.500000000000e-14 5.500000000000e+00 5.145985071311e-08 0.000000000000e+00 -5.145982521381e-08 -2.550000000000e-14 6.000000000000e+00 5.503786518852e-08 0.000000000000e+00 -5.503783918886e-08 -2.600000000000e-14 6.500000000000e+00 5.884378986940e-08 0.000000000000e+00 -5.884376336960e-08 -2.650000000000e-14 7.000000000000e+00 6.289016653890e-08 0.000000000000e+00 -6.289013953948e-08 -2.700000000000e-14 7.500000000000e+00 6.718996628128e-08 0.000000000000e+00 -6.718993878242e-08 -2.750000000000e-14 8.000000000000e+00 7.175658778800e-08 0.000000000000e+00 -7.175655978786e-08 -2.800000000000e-14 8.500000000000e+00 7.660385229922e-08 0.000000000000e+00 -7.660382379949e-08 -2.850000000000e-14 9.000000000000e+00 8.174599562798e-08 0.000000000000e+00 -8.174596662855e-08 -2.900000000000e-14 9.500000000000e+00 8.719765751900e-08 0.000000000000e+00 -8.719762801987e-08 -2.950000000000e-14 1.000000000000e+01 9.297386859182e-08 0.000000000000e+00 -9.297383859133e-08 -3.000000000000e-14 1.050000000000e+01 9.909003503578e-08 0.000000000000e+00 -9.909000453530e-08 -3.050000000000e-14 1.100000000000e+01 1.055619212589e-07 0.000000000000e+00 -1.055618902584e-07 -3.100000000000e-14 1.150000000000e+01 1.124056306367e-07 0.000000000000e+00 -1.124055991376e-07 -3.150000000000e-14 1.200000000000e+01 1.196375845761e-07 0.000000000000e+00 -1.196375525753e-07 -3.200000000000e-14 1.250000000000e+01 1.272745000476e-07 0.000000000000e+00 -1.272744675472e-07 -3.250000000000e-14 1.300000000000e+01 1.353333658445e-07 0.000000000000e+00 -1.353333328451e-07 -3.300000000000e-14 1.350000000000e+01 1.438314177248e-07 0.000000000000e+00 -1.438313842256e-07 -3.350000000000e-14 1.400000000000e+01 1.527861126843e-07 0.000000000000e+00 -1.527860786831e-07 -3.400000000000e-14 1.450000000000e+01 1.622151025674e-07 0.000000000000e+00 -1.622150680678e-07 -3.450000000000e-14 1.500000000000e+01 1.721362072700e-07 0.000000000000e+00 -1.721361722701e-07 -3.500000000000e-14 1.550000000000e+01 1.825673876911e-07 0.000000000000e+00 -1.825673521912e-07 -3.550000000000e-14 1.600000000000e+01 1.935267187128e-07 0.000000000000e+00 -1.935266827124e-07 -3.600000000000e-14 1.650000000000e+01 2.050323623659e-07 0.000000000000e+00 -2.050323258662e-07 -3.650000000000e-14 1.700000000000e+01 2.171025414010e-07 0.000000000000e+00 -2.171025044018e-07 -3.700000000000e-14 1.750000000000e+01 2.297555134218e-07 0.000000000000e+00 -2.297554759214e-07 -3.750000000000e-14 1.800000000000e+01 2.430095457492e-07 0.000000000000e+00 -2.430095077483e-07 -3.800000000000e-14 1.850000000000e+01 2.568828911696e-07 0.000000000000e+00 -2.568828526712e-07 -3.850000000000e-14 1.900000000000e+01 2.713937646871e-07 0.000000000000e+00 -2.713937256868e-07 -3.900000000000e-14 1.950000000000e+01 2.865603213470e-07 0.000000000000e+00 -2.865602818477e-07 -3.950000000000e-14 2.000000000000e+01 3.024006353007e-07 0.000000000000e+00 -3.024005953004e-07 -4.000000000000e-14 1.000000000000e+00 6.018316520647e-04 0.000000000000e+00 -6.018316520437e-04 -2.100000000000e-14 1.500000000000e+00 8.527464769523e-04 0.000000000000e+00 -8.527464769308e-04 -2.150000000000e-14 2.000000000000e+00 1.074147876189e-03 0.000000000000e+00 -1.074147876167e-03 -2.200000000000e-14 2.500000000000e+00 1.268726884432e-03 0.000000000000e+00 -1.268726884409e-03 -2.250000000000e-14 3.000000000000e+00 1.438924218050e-03 0.000000000000e+00 -1.438924218027e-03 -2.300000000000e-14 3.500000000000e+00 1.586950529247e-03 0.000000000000e+00 -1.586950529223e-03 -2.350000000000e-14 4.000000000000e+00 1.714839004096e-03 0.000000000000e+00 -1.714839004072e-03 -2.400000000000e-14 4.500000000000e+00 1.824503091795e-03 0.000000000000e+00 -1.824503091771e-03 -2.450000000000e-14 5.000000000000e+00 1.917782635073e-03 0.000000000000e+00 -1.917782635048e-03 -2.500000000000e-14 5.500000000000e+00 1.996468823807e-03 0.000000000000e+00 -1.996468823781e-03 -2.550000000000e-14 6.000000000000e+00 2.062305473994e-03 0.000000000000e+00 -2.062305473968e-03 -2.600000000000e-14 6.500000000000e+00 2.116970936141e-03 0.000000000000e+00 -2.116970936114e-03 -2.650000000000e-14 7.000000000000e+00 2.162049544340e-03 0.000000000000e+00 -2.162049544313e-03 -2.700000000000e-14 7.500000000000e+00 2.199002474206e-03 0.000000000000e+00 -2.199002474178e-03 -2.750000000000e-14 8.000000000000e+00 2.229145523563e-03 0.000000000000e+00 -2.229145523535e-03 -2.800000000000e-14 8.500000000000e+00 2.253637444651e-03 0.000000000000e+00 -2.253637444622e-03 -2.850000000000e-14 9.000000000000e+00 2.273478923283e-03 0.000000000000e+00 -2.273478923254e-03 -2.900000000000e-14 9.500000000000e+00 2.289520114963e-03 0.000000000000e+00 -2.289520114933e-03 -2.950000000000e-14 1.000000000000e+01 2.302473848929e-03 0.000000000000e+00 -2.302473848899e-03 -3.000000000000e-14 1.050000000000e+01 2.312931754964e-03 0.000000000000e+00 -2.312931754933e-03 -3.050000000000e-14 1.100000000000e+01 2.321381173180e-03 0.000000000000e+00 -2.321381173149e-03 -3.100000000000e-14 1.150000000000e+01 2.328221435118e-03 0.000000000000e+00 -2.328221435086e-03 -3.150000000000e-14 1.200000000000e+01 2.333778765730e-03 0.000000000000e+00 -2.333778765698e-03 -3.200000000000e-14 1.250000000000e+01 2.338319600111e-03 0.000000000000e+00 -2.338319600078e-03 -3.250000000000e-14 1.300000000000e+01 2.342062396678e-03 0.000000000000e+00 -2.342062396645e-03 -3.300000000000e-14 1.350000000000e+01 2.345188978910e-03 0.000000000000e+00 -2.345188978877e-03 -3.350000000000e-14 1.400000000000e+01 2.347856487651e-03 0.000000000000e+00 -2.347856487617e-03 -3.400000000000e-14 1.450000000000e+01 2.350211983649e-03 0.000000000000e+00 -2.350211983614e-03 -3.450000000000e-14 1.500000000000e+01 2.352393870478e-03 0.000000000000e+00 -2.352393870443e-03 -3.500000000000e-14 1.550000000000e+01 2.354485981493e-03 0.000000000000e+00 -2.354485981458e-03 -3.550000000000e-14 1.600000000000e+01 2.356512901890e-03 0.000000000000e+00 -2.356512901854e-03 -3.600000000000e-14 1.650000000000e+01 2.358482884403e-03 0.000000000000e+00 -2.358482884367e-03 -3.650000000000e-14 1.700000000000e+01 2.360401549033e-03 0.000000000000e+00 -2.360401548996e-03 -3.700000000000e-14 1.750000000000e+01 2.362273633088e-03 0.000000000000e+00 -2.362273633050e-03 -3.750000000000e-14 1.800000000000e+01 2.364103286085e-03 0.000000000000e+00 -2.364103286047e-03 -3.800000000000e-14 1.850000000000e+01 2.365894175028e-03 0.000000000000e+00 -2.365894174989e-03 -3.850000000000e-14 1.900000000000e+01 2.367649552454e-03 0.000000000000e+00 -2.367649552415e-03 -3.900000000000e-14 1.950000000000e+01 2.369372311042e-03 0.000000000000e+00 -2.369372311003e-03 -3.950000000000e-14 2.000000000000e+01 2.371065029842e-03 0.000000000000e+00 -2.371065029802e-03 -4.000000000000e-14 1.000000000000e+00 1.099998998139e-14 0.000000000000e+00 1.000000000000e-14 -2.100000000000e-14 1.500000000000e+00 1.149991560312e-14 0.000000000000e+00 1.000000000000e-14 -2.150000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.249976684659e-14 0.000000000000e+00 1.000000000000e-14 -2.250000000000e-14 3.000000000000e+00 1.300001772897e-14 0.000000000000e+00 1.000000000000e-14 -2.300000000000e-14 3.500000000000e+00 1.349961809005e-14 0.000000000000e+00 1.000000000000e-14 -2.350000000000e-14 4.000000000000e+00 1.399965213200e-14 0.000000000000e+00 1.000000000000e-14 -2.400000000000e-14 4.500000000000e+00 1.449968617395e-14 0.000000000000e+00 1.000000000000e-14 -2.450000000000e-14 5.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 5.500000000000e+00 1.549975425785e-14 0.000000000000e+00 1.000000000000e-14 -2.550000000000e-14 6.000000000000e+00 1.599978829980e-14 0.000000000000e+00 1.000000000000e-14 -2.600000000000e-14 6.500000000000e+00 1.649938866088e-14 0.000000000000e+00 1.000000000000e-14 -2.650000000000e-14 7.000000000000e+00 1.699942270283e-14 0.000000000000e+00 1.000000000000e-14 -2.700000000000e-14 7.500000000000e+00 1.750032410652e-14 0.000000000000e+00 1.000000000000e-14 -2.750000000000e-14 8.000000000000e+00 1.799992446760e-14 0.000000000000e+00 1.000000000000e-14 -2.800000000000e-14 8.500000000000e+00 1.849995850955e-14 0.000000000000e+00 1.000000000000e-14 -2.850000000000e-14 9.000000000000e+00 1.899955887064e-14 0.000000000000e+00 1.000000000000e-14 -2.900000000000e-14 9.500000000000e+00 1.950002659346e-14 0.000000000000e+00 1.000000000000e-14 -2.950000000000e-14 1.000000000000e+01 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.050000000000e+01 2.050009467736e-14 0.000000000000e+00 1.000000000000e-14 -3.050000000000e-14 1.100000000000e+01 2.099969503844e-14 0.000000000000e+00 1.000000000000e-14 -3.100000000000e-14 1.150000000000e+01 2.149929539952e-14 0.000000000000e+00 1.000000000000e-14 -3.150000000000e-14 1.200000000000e+01 2.200063048408e-14 0.000000000000e+00 1.000000000000e-14 -3.200000000000e-14 1.250000000000e+01 2.250023084516e-14 0.000000000000e+00 1.000000000000e-14 -3.250000000000e-14 1.300000000000e+01 2.299983120624e-14 0.000000000000e+00 1.000000000000e-14 -3.300000000000e-14 1.350000000000e+01 2.349943156732e-14 0.000000000000e+00 1.000000000000e-14 -3.350000000000e-14 1.400000000000e+01 2.399989929014e-14 0.000000000000e+00 1.000000000000e-14 -3.400000000000e-14 1.450000000000e+01 2.450036701296e-14 0.000000000000e+00 1.000000000000e-14 -3.450000000000e-14 1.500000000000e+01 2.499996737404e-14 0.000000000000e+00 1.000000000000e-14 -3.500000000000e-14 1.550000000000e+01 2.549956773512e-14 0.000000000000e+00 1.000000000000e-14 -3.550000000000e-14 1.600000000000e+01 2.600003545794e-14 0.000000000000e+00 1.000000000000e-14 -3.600000000000e-14 1.650000000000e+01 2.649963581902e-14 0.000000000000e+00 1.000000000000e-14 -3.650000000000e-14 1.700000000000e+01 2.700010354184e-14 0.000000000000e+00 1.000000000000e-14 -3.700000000000e-14 1.750000000000e+01 2.750057126466e-14 0.000000000000e+00 1.000000000000e-14 -3.750000000000e-14 1.800000000000e+01 2.800017162574e-14 0.000000000000e+00 1.000000000000e-14 -3.800000000000e-14 1.850000000000e+01 2.849977198682e-14 0.000000000000e+00 1.000000000000e-14 -3.850000000000e-14 1.900000000000e+01 2.900110707138e-14 0.000000000000e+00 1.000000000000e-14 -3.900000000000e-14 1.950000000000e+01 2.949984007072e-14 0.000000000000e+00 1.000000000000e-14 -3.950000000000e-14 2.000000000000e+01 3.000030779354e-14 0.000000000000e+00 1.000000000000e-14 -4.000000000000e-14 1.000000000000e+00 5.824759392262e-11 0.000000000000e+00 -5.822659388767e-11 -2.100000000000e-14 1.500000000000e+00 6.427471077076e-11 0.000000000000e+00 -6.425321074365e-11 -2.150000000000e-14 2.000000000000e+00 7.089252687491e-11 0.000000000000e+00 -7.087052694090e-11 -2.200000000000e-14 2.500000000000e+00 7.816863063954e-11 0.000000000000e+00 -7.814613089871e-11 -2.250000000000e-14 3.000000000000e+00 8.617346506506e-11 0.000000000000e+00 -8.615046529489e-11 -2.300000000000e-14 3.500000000000e+00 9.498295205912e-11 0.000000000000e+00 -9.495945295393e-11 -2.350000000000e-14 4.000000000000e+00 1.046798659039e-10 0.000000000000e+00 -1.046558665946e-10 -2.400000000000e-14 4.500000000000e+00 1.153548749577e-10 0.000000000000e+00 -1.153303751561e-10 -2.450000000000e-14 5.000000000000e+00 1.271075159189e-10 0.000000000000e+00 -1.270825168175e-10 -2.500000000000e-14 5.500000000000e+00 1.400471895570e-10 0.000000000000e+00 -1.400216895136e-10 -2.550000000000e-14 6.000000000000e+00 1.542942006799e-10 0.000000000000e+00 -1.542682003360e-10 -2.600000000000e-14 6.500000000000e+00 1.699808982805e-10 0.000000000000e+00 -1.699543982646e-10 -2.650000000000e-14 7.000000000000e+00 1.872529076241e-10 0.000000000000e+00 -1.872259077808e-10 -2.700000000000e-14 7.500000000000e+00 2.062704772612e-10 0.000000000000e+00 -2.062429778795e-10 -2.750000000000e-14 8.000000000000e+00 2.272099617825e-10 0.000000000000e+00 -2.271819609898e-10 -2.800000000000e-14 8.500000000000e+00 2.502654364127e-10 0.000000000000e+00 -2.502369362273e-10 -2.850000000000e-14 9.000000000000e+00 2.756504920154e-10 0.000000000000e+00 -2.756214918244e-10 -2.900000000000e-14 9.500000000000e+00 3.036001831880e-10 0.000000000000e+00 -3.035706834387e-10 -2.950000000000e-14 1.000000000000e+01 3.343731853900e-10 0.000000000000e+00 -3.343431855971e-10 -3.000000000000e-14 1.050000000000e+01 3.682541563355e-10 0.000000000000e+00 -3.682236555048e-10 -3.050000000000e-14 1.100000000000e+01 4.055563307057e-10 0.000000000000e+00 -4.055253299023e-10 -3.100000000000e-14 1.150000000000e+01 4.466243763712e-10 0.000000000000e+00 -4.465928776353e-10 -3.150000000000e-14 1.200000000000e+01 4.918375333743e-10 0.000000000000e+00 -4.918055326028e-10 -3.200000000000e-14 1.250000000000e+01 5.416130330685e-10 0.000000000000e+00 -5.415805338560e-10 -3.250000000000e-14 1.300000000000e+01 5.964099023675e-10 0.000000000000e+00 -5.963769022078e-10 -3.300000000000e-14 1.350000000000e+01 6.567330863155e-10 0.000000000000e+00 -6.566995848805e-10 -3.350000000000e-14 1.400000000000e+01 7.231380043382e-10 0.000000000000e+00 -7.231040030636e-10 -3.400000000000e-14 1.450000000000e+01 7.962355401750e-10 0.000000000000e+00 -7.962010394506e-10 -3.450000000000e-14 1.500000000000e+01 8.766975062580e-10 0.000000000000e+00 -8.766625066336e-10 -3.500000000000e-14 1.550000000000e+01 9.652626389162e-10 0.000000000000e+00 -9.652271399575e-10 -3.550000000000e-14 1.600000000000e+01 1.062743162569e-09 0.000000000000e+00 -1.062707162358e-09 -3.600000000000e-14 1.650000000000e+01 1.170031974085e-09 0.000000000000e+00 -1.169995471914e-09 -3.650000000000e-14 1.700000000000e+01 1.288110507147e-09 0.000000000000e+00 -1.288073507110e-09 -3.700000000000e-14 1.750000000000e+01 1.418057346894e-09 0.000000000000e+00 -1.418019848164e-09 -3.750000000000e-14 1.800000000000e+01 1.561057616506e-09 0.000000000000e+00 -1.561019617133e-09 -3.800000000000e-14 1.850000000000e+01 1.718413242431e-09 0.000000000000e+00 -1.718374743408e-09 -3.850000000000e-14 1.900000000000e+01 1.891554166772e-09 0.000000000000e+00 -1.891515164905e-09 -3.900000000000e-14 1.950000000000e+01 2.082050538921e-09 0.000000000000e+00 -2.082011039279e-09 -3.950000000000e-14 2.000000000000e+01 2.291626043441e-09 0.000000000000e+00 -2.291586043481e-09 -4.000000000000e-14 1.000000000000e+00 6.751008120718e-04 0.000000000000e+00 -6.751008120508e-04 -2.100000000000e-14 1.500000000000e+00 9.559200966619e-04 0.000000000000e+00 -9.559200966404e-04 -2.150000000000e-14 2.000000000000e+00 1.204125155375e-03 0.000000000000e+00 -1.204125155353e-03 -2.200000000000e-14 2.500000000000e+00 1.423040821579e-03 0.000000000000e+00 -1.423040821557e-03 -2.250000000000e-14 3.000000000000e+00 1.615503310933e-03 0.000000000000e+00 -1.615503310910e-03 -2.300000000000e-14 3.500000000000e+00 1.783933961170e-03 0.000000000000e+00 -1.783933961146e-03 -2.350000000000e-14 4.000000000000e+00 1.930440517807e-03 0.000000000000e+00 -1.930440517783e-03 -2.400000000000e-14 4.500000000000e+00 2.056925811883e-03 0.000000000000e+00 -2.056925811859e-03 -2.450000000000e-14 5.000000000000e+00 2.165188020437e-03 0.000000000000e+00 -2.165188020412e-03 -2.500000000000e-14 5.500000000000e+00 2.256996605456e-03 0.000000000000e+00 -2.256996605431e-03 -2.550000000000e-14 6.000000000000e+00 2.334130679646e-03 0.000000000000e+00 -2.334130679620e-03 -2.600000000000e-14 6.500000000000e+00 2.398375382607e-03 0.000000000000e+00 -2.398375382581e-03 -2.650000000000e-14 7.000000000000e+00 2.451484445492e-03 0.000000000000e+00 -2.451484445465e-03 -2.700000000000e-14 7.500000000000e+00 2.495126708655e-03 0.000000000000e+00 -2.495126708628e-03 -2.750000000000e-14 8.000000000000e+00 2.530835670123e-03 0.000000000000e+00 -2.530835670095e-03 -2.800000000000e-14 8.500000000000e+00 2.559974853796e-03 0.000000000000e+00 -2.559974853768e-03 -2.850000000000e-14 9.000000000000e+00 2.583722973072e-03 0.000000000000e+00 -2.583722973043e-03 -2.900000000000e-14 9.500000000000e+00 2.603076236503e-03 0.000000000000e+00 -2.603076236473e-03 -2.950000000000e-14 1.000000000000e+01 2.618862295760e-03 0.000000000000e+00 -2.618862295730e-03 -3.000000000000e-14 1.050000000000e+01 2.631760364650e-03 0.000000000000e+00 -2.631760364619e-03 -3.050000000000e-14 1.100000000000e+01 2.642323349108e-03 0.000000000000e+00 -2.642323349077e-03 -3.100000000000e-14 1.150000000000e+01 2.650999308071e-03 0.000000000000e+00 -2.650999308039e-03 -3.150000000000e-14 1.200000000000e+01 2.658150769083e-03 0.000000000000e+00 -2.658150769051e-03 -3.200000000000e-14 1.250000000000e+01 2.664071293261e-03 0.000000000000e+00 -2.664071293229e-03 -3.250000000000e-14 1.300000000000e+01 2.668999302015e-03 0.000000000000e+00 -2.668999301982e-03 -3.300000000000e-14 1.350000000000e+01 2.673129404677e-03 0.000000000000e+00 -2.673129404643e-03 -3.350000000000e-14 1.400000000000e+01 2.676622352219e-03 0.000000000000e+00 -2.676622352185e-03 -3.400000000000e-14 1.450000000000e+01 2.679614462596e-03 0.000000000000e+00 -2.679614462562e-03 -3.450000000000e-14 1.500000000000e+01 2.682230949552e-03 0.000000000000e+00 -2.682230949517e-03 -3.500000000000e-14 1.550000000000e+01 2.684609362439e-03 0.000000000000e+00 -2.684609362403e-03 -3.550000000000e-14 1.600000000000e+01 2.686870663224e-03 0.000000000000e+00 -2.686870663188e-03 -3.600000000000e-14 1.650000000000e+01 2.689046911519e-03 0.000000000000e+00 -2.689046911483e-03 -3.650000000000e-14 1.700000000000e+01 2.691146462806e-03 0.000000000000e+00 -2.691146462769e-03 -3.700000000000e-14 1.750000000000e+01 2.693176863475e-03 0.000000000000e+00 -2.693176863438e-03 -3.750000000000e-14 1.800000000000e+01 2.695144765444e-03 0.000000000000e+00 -2.695144765406e-03 -3.800000000000e-14 1.850000000000e+01 2.697056007524e-03 0.000000000000e+00 -2.697056007486e-03 -3.850000000000e-14 1.900000000000e+01 2.698915729473e-03 0.000000000000e+00 -2.698915729434e-03 -3.900000000000e-14 1.950000000000e+01 2.700728470027e-03 0.000000000000e+00 -2.700728469988e-03 -3.950000000000e-14 2.000000000000e+01 2.702498249431e-03 0.000000000000e+00 -2.702498249391e-03 -4.000000000000e-14 1.000000000000e+00 1.099998998139e-14 0.000000000000e+00 1.000000000000e-14 -2.100000000000e-14 1.500000000000e+00 1.149991560312e-14 0.000000000000e+00 1.000000000000e-14 -2.150000000000e-14 2.000000000000e+00 1.199994964507e-14 0.000000000000e+00 1.000000000000e-14 -2.200000000000e-14 2.500000000000e+00 1.249976684659e-14 0.000000000000e+00 1.000000000000e-14 -2.250000000000e-14 3.000000000000e+00 1.300001772897e-14 0.000000000000e+00 1.000000000000e-14 -2.300000000000e-14 3.500000000000e+00 1.349961809005e-14 0.000000000000e+00 1.000000000000e-14 -2.350000000000e-14 4.000000000000e+00 1.399965213200e-14 0.000000000000e+00 1.000000000000e-14 -2.400000000000e-14 4.500000000000e+00 1.449968617395e-14 0.000000000000e+00 1.000000000000e-14 -2.450000000000e-14 5.000000000000e+00 1.499972021590e-14 0.000000000000e+00 1.000000000000e-14 -2.500000000000e-14 5.500000000000e+00 1.549975425785e-14 0.000000000000e+00 1.000000000000e-14 -2.550000000000e-14 6.000000000000e+00 1.599978829980e-14 0.000000000000e+00 1.000000000000e-14 -2.600000000000e-14 6.500000000000e+00 1.649938866088e-14 0.000000000000e+00 1.000000000000e-14 -2.650000000000e-14 7.000000000000e+00 1.699942270283e-14 0.000000000000e+00 1.000000000000e-14 -2.700000000000e-14 7.500000000000e+00 1.750032410652e-14 0.000000000000e+00 1.000000000000e-14 -2.750000000000e-14 8.000000000000e+00 1.799992446760e-14 0.000000000000e+00 1.000000000000e-14 -2.800000000000e-14 8.500000000000e+00 1.849995850955e-14 0.000000000000e+00 1.000000000000e-14 -2.850000000000e-14 9.000000000000e+00 1.899955887064e-14 0.000000000000e+00 1.000000000000e-14 -2.900000000000e-14 9.500000000000e+00 1.950002659346e-14 0.000000000000e+00 1.000000000000e-14 -2.950000000000e-14 1.000000000000e+01 1.999962695454e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.050000000000e+01 2.050009467736e-14 0.000000000000e+00 1.000000000000e-14 -3.050000000000e-14 1.100000000000e+01 2.099969503844e-14 0.000000000000e+00 1.000000000000e-14 -3.100000000000e-14 1.150000000000e+01 2.149929539952e-14 0.000000000000e+00 1.000000000000e-14 -3.150000000000e-14 1.200000000000e+01 2.200063048408e-14 0.000000000000e+00 1.000000000000e-14 -3.200000000000e-14 1.250000000000e+01 2.250023084516e-14 0.000000000000e+00 1.000000000000e-14 -3.250000000000e-14 1.300000000000e+01 2.299983120624e-14 0.000000000000e+00 1.000000000000e-14 -3.300000000000e-14 1.350000000000e+01 2.349943156732e-14 0.000000000000e+00 1.000000000000e-14 -3.350000000000e-14 1.400000000000e+01 2.399989929014e-14 0.000000000000e+00 1.000000000000e-14 -3.400000000000e-14 1.450000000000e+01 2.450036701296e-14 0.000000000000e+00 1.000000000000e-14 -3.450000000000e-14 1.500000000000e+01 2.499996737404e-14 0.000000000000e+00 1.000000000000e-14 -3.500000000000e-14 1.550000000000e+01 2.549956773512e-14 0.000000000000e+00 1.000000000000e-14 -3.550000000000e-14 1.600000000000e+01 2.600003545794e-14 0.000000000000e+00 1.000000000000e-14 -3.600000000000e-14 1.650000000000e+01 2.649963581902e-14 0.000000000000e+00 1.000000000000e-14 -3.650000000000e-14 1.700000000000e+01 2.700010354184e-14 0.000000000000e+00 1.000000000000e-14 -3.700000000000e-14 1.750000000000e+01 2.750057126466e-14 0.000000000000e+00 1.000000000000e-14 -3.750000000000e-14 1.800000000000e+01 2.800017162574e-14 0.000000000000e+00 1.000000000000e-14 -3.800000000000e-14 1.850000000000e+01 2.849977198682e-14 0.000000000000e+00 1.000000000000e-14 -3.850000000000e-14 1.900000000000e+01 2.900110707138e-14 0.000000000000e+00 1.000000000000e-14 -3.900000000000e-14 1.950000000000e+01 2.949984007072e-14 0.000000000000e+00 1.000000000000e-14 -3.950000000000e-14 2.000000000000e+01 3.000030779354e-14 0.000000000000e+00 1.000000000000e-14 -4.000000000000e-14 1.000000000000e+00 1.836683621681e-06 0.000000000000e+00 -1.836683600681e-06 -2.100000000000e-14 1.500000000000e+00 1.886971019839e-06 0.000000000000e+00 -1.886970998339e-06 -2.150000000000e-14 2.000000000000e+00 1.937285033778e-06 0.000000000000e+00 -1.937285011778e-06 -2.200000000000e-14 2.500000000000e+00 1.987936509957e-06 0.000000000000e+00 -1.987936487457e-06 -2.250000000000e-14 3.000000000000e+00 2.039077223564e-06 0.000000000000e+00 -2.039077200565e-06 -2.300000000000e-14 3.500000000000e+00 2.090795444018e-06 0.000000000000e+00 -2.090795420519e-06 -2.350000000000e-14 4.000000000000e+00 2.143148351102e-06 0.000000000000e+00 -2.143148327102e-06 -2.400000000000e-14 4.500000000000e+00 2.196175888917e-06 0.000000000000e+00 -2.196175864418e-06 -2.450000000000e-14 5.000000000000e+00 2.249907590494e-06 0.000000000000e+00 -2.249907565494e-06 -2.500000000000e-14 5.500000000000e+00 2.304366288253e-06 0.000000000000e+00 -2.304366262754e-06 -2.550000000000e-14 6.000000000000e+00 2.359570284730e-06 0.000000000000e+00 -2.359570258730e-06 -2.600000000000e-14 6.500000000000e+00 2.415534696800e-06 0.000000000000e+00 -2.415534670300e-06 -2.650000000000e-14 7.000000000000e+00 2.472272326930e-06 0.000000000000e+00 -2.472272299930e-06 -2.700000000000e-14 7.500000000000e+00 2.529794249387e-06 0.000000000000e+00 -2.529794221887e-06 -2.750000000000e-14 8.000000000000e+00 2.588110217223e-06 0.000000000000e+00 -2.588110189224e-06 -2.800000000000e-14 8.500000000000e+00 2.647228952464e-06 0.000000000000e+00 -2.647228923964e-06 -2.850000000000e-14 9.000000000000e+00 2.707158357823e-06 0.000000000000e+00 -2.707158328823e-06 -2.900000000000e-14 9.500000000000e+00 2.767905674306e-06 0.000000000000e+00 -2.767905644808e-06 -2.950000000000e-14 1.000000000000e+01 2.829477600620e-06 0.000000000000e+00 -2.829477570621e-06 -3.000000000000e-14 1.050000000000e+01 2.891880385059e-06 0.000000000000e+00 -2.891880354560e-06 -3.050000000000e-14 1.100000000000e+01 2.955119897257e-06 0.000000000000e+00 -2.955119866256e-06 -3.100000000000e-14 1.150000000000e+01 3.019201684883e-06 0.000000000000e+00 -3.019201653385e-06 -3.150000000000e-14 1.200000000000e+01 3.084131019019e-06 0.000000000000e+00 -3.084130987020e-06 -3.200000000000e-14 1.250000000000e+01 3.149912930797e-06 0.000000000000e+00 -3.149912898298e-06 -3.250000000000e-14 1.300000000000e+01 3.216552241336e-06 0.000000000000e+00 -3.216552208335e-06 -3.300000000000e-14 1.350000000000e+01 3.284053586370e-06 0.000000000000e+00 -3.284053552869e-06 -3.350000000000e-14 1.400000000000e+01 3.352421436724e-06 0.000000000000e+00 -3.352421402723e-06 -3.400000000000e-14 1.450000000000e+01 3.421660115431e-06 0.000000000000e+00 -3.421660080932e-06 -3.450000000000e-14 1.500000000000e+01 3.491773812178e-06 0.000000000000e+00 -3.491773777178e-06 -3.500000000000e-14 1.550000000000e+01 3.562766595554e-06 0.000000000000e+00 -3.562766560054e-06 -3.550000000000e-14 1.600000000000e+01 3.634642423529e-06 0.000000000000e+00 -3.634642387529e-06 -3.600000000000e-14 1.650000000000e+01 3.707405152458e-06 0.000000000000e+00 -3.707405115957e-06 -3.650000000000e-14 1.700000000000e+01 3.781058544855e-06 0.000000000000e+00 -3.781058507855e-06 -3.700000000000e-14 1.750000000000e+01 3.855606276179e-06 0.000000000000e+00 -3.855606238677e-06 -3.750000000000e-14 1.800000000000e+01 3.931051940730e-06 0.000000000000e+00 -3.931051902729e-06 -3.800000000000e-14 1.850000000000e+01 4.007399056863e-06 0.000000000000e+00 -4.007399018363e-06 -3.850000000000e-14 1.900000000000e+01 4.084651071570e-06 0.000000000000e+00 -4.084651032570e-06 -3.900000000000e-14 1.950000000000e+01 4.162811364546e-06 0.000000000000e+00 -4.162811325047e-06 -3.950000000000e-14 2.000000000000e+01 4.241883251823e-06 0.000000000000e+00 -4.241883211822e-06 -4.000000000000e-14 1.000000000000e+00 4.969461450365e-04 0.000000000000e+00 -4.969461450155e-04 -2.100000000000e-14 1.500000000000e+00 7.041276588495e-04 0.000000000000e+00 -7.041276588280e-04 -2.150000000000e-14 2.000000000000e+00 8.860756008027e-04 0.000000000000e+00 -8.860756007807e-04 -2.200000000000e-14 2.500000000000e+00 1.044749478282e-03 0.000000000000e+00 -1.044749478260e-03 -2.250000000000e-14 3.000000000000e+00 1.182117300773e-03 0.000000000000e+00 -1.182117300750e-03 -2.300000000000e-14 3.500000000000e+00 1.300114252947e-03 0.000000000000e+00 -1.300114252923e-03 -2.350000000000e-14 4.000000000000e+00 1.400634975699e-03 0.000000000000e+00 -1.400634975675e-03 -2.400000000000e-14 4.500000000000e+00 1.485533184783e-03 0.000000000000e+00 -1.485533184758e-03 -2.450000000000e-14 5.000000000000e+00 1.556615562556e-03 0.000000000000e+00 -1.556615562531e-03 -2.500000000000e-14 5.500000000000e+00 1.615625880190e-03 0.000000000000e+00 -1.615625880164e-03 -2.550000000000e-14 6.000000000000e+00 1.664221425092e-03 0.000000000000e+00 -1.664221425066e-03 -2.600000000000e-14 6.500000000000e+00 1.703947017490e-03 0.000000000000e+00 -1.703947017463e-03 -2.650000000000e-14 7.000000000000e+00 1.736212289943e-03 0.000000000000e+00 -1.736212289916e-03 -2.700000000000e-14 7.500000000000e+00 1.762276259435e-03 0.000000000000e+00 -1.762276259407e-03 -2.750000000000e-14 8.000000000000e+00 1.783240802241e-03 0.000000000000e+00 -1.783240802213e-03 -2.800000000000e-14 8.500000000000e+00 1.800052550925e-03 0.000000000000e+00 -1.800052550897e-03 -2.850000000000e-14 9.000000000000e+00 1.813511488998e-03 0.000000000000e+00 -1.813511488969e-03 -2.900000000000e-14 9.500000000000e+00 1.824284088708e-03 0.000000000000e+00 -1.824284088678e-03 -2.950000000000e-14 1.000000000000e+01 1.832918941135e-03 0.000000000000e+00 -1.832918941105e-03 -3.000000000000e-14 1.050000000000e+01 1.839863196305e-03 0.000000000000e+00 -1.839863196275e-03 -3.050000000000e-14 1.100000000000e+01 1.845478590904e-03 0.000000000000e+00 -1.845478590873e-03 -3.100000000000e-14 1.150000000000e+01 1.850056307227e-03 0.000000000000e+00 -1.850056307195e-03 -3.150000000000e-14 1.200000000000e+01 1.853830203409e-03 0.000000000000e+00 -1.853830203377e-03 -3.200000000000e-14 1.250000000000e+01 1.856988572281e-03 0.000000000000e+00 -1.856988572249e-03 -3.250000000000e-14 1.300000000000e+01 1.859684204015e-03 0.000000000000e+00 -1.859684203982e-03 -3.300000000000e-14 1.350000000000e+01 1.862043044227e-03 0.000000000000e+00 -1.862043044194e-03 -3.350000000000e-14 1.400000000000e+01 1.864170319404e-03 0.000000000000e+00 -1.864170319370e-03 -3.400000000000e-14 1.450000000000e+01 1.866150877118e-03 0.000000000000e+00 -1.866150877083e-03 -3.450000000000e-14 1.500000000000e+01 1.868043024920e-03 0.000000000000e+00 -1.868043024885e-03 -3.500000000000e-14 1.550000000000e+01 1.869877702565e-03 0.000000000000e+00 -1.869877702529e-03 -3.550000000000e-14 1.600000000000e+01 1.871668819423e-03 0.000000000000e+00 -1.871668819387e-03 -3.600000000000e-14 1.650000000000e+01 1.873423146447e-03 0.000000000000e+00 -1.873423146411e-03 -3.650000000000e-14 1.700000000000e+01 1.875144823922e-03 0.000000000000e+00 -1.875144823885e-03 -3.700000000000e-14 1.750000000000e+01 1.876836919472e-03 0.000000000000e+00 -1.876836919434e-03 -3.750000000000e-14 1.800000000000e+01 1.878501954010e-03 0.000000000000e+00 -1.878501953972e-03 -3.800000000000e-14 1.850000000000e+01 1.880142098522e-03 0.000000000000e+00 -1.880142098483e-03 -3.850000000000e-14 1.900000000000e+01 1.881759262204e-03 0.000000000000e+00 -1.881759262165e-03 -3.900000000000e-14 1.950000000000e+01 1.883355141342e-03 0.000000000000e+00 -1.883355141303e-03 -3.950000000000e-14 2.000000000000e+01 1.884931251964e-03 0.000000000000e+00 -1.884931251924e-03 -4.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/acVd_cvdsover.standard0000644000265600020320000000640512264261473024354 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 1 2.371378339551e-05 4.102161076546e-04 4.38848730135687e-14 1.60517898455595e-14 2 4.733341857652e-05 3.367182141371e-04 4.68846912734586e-14 1.49003188179096e-14 3 7.196256970668e-05 2.769143670207e-04 4.96405577635885e-14 1.40017741101296e-14 4 9.811110556302e-05 2.278441433154e-04 5.22097580989985e-14 1.32609902042096e-14 5 1.259472174445e-04 1.871807501084e-04 5.45995346393684e-14 1.26115546293896e-14 6 1.553864595532e-04 1.531865466767e-04 5.67831861135383e-14 1.20066959346396e-14 7 1.861212178545e-04 1.245952104388e-04 5.87140965980883e-14 1.14153244255997e-14 8 2.176387216779e-04 1.004938254547e-04 6.03440560996782e-14 1.08224651620097e-14 9 2.492536261849e-04 8.022159776438e-05 6.16485930381182e-14 1.02313940293997e-14 10 2.801691026599e-04 6.328576589247e-05 6.26525009412082e-14 9.66306406272172e-15 11 3.095688381426e-04 4.929297442643e-05 6.34388529786981e-14 9.14890318352673e-15 12 3.367270349753e-04 3.789687774220e-05 6.41276790271881e-14 8.71763745333474e-15 13 3.611076840354e-04 2.876522978551e-05 6.48306788280681e-14 8.38250915676975e-15 14 3.824208166975e-04 2.156810298718e-05 6.56062712264481e-14 8.13548597720376e-15 15 4.006205695408e-04 1.598309187791e-05 6.64294159284681e-14 7.94784567465077e-15 16 4.158562363686e-04 1.170851110478e-05 6.7142443159958e-14 7.76463782214977e-15 17 4.284026086789e-04 8.475882658060e-06 6.7129309738538e-14 7.43225007832178e-15 18 4.385932673945e-04 6.057122564460e-06 6.17949148676282e-14 5.90368773187083e-15 19 4.467687908545e-04 4.266008370350e-06 5.37971651118184e-14 3.90811882259689e-15 20 4.532407400687e-04 2.955772508466e-06 5.08676013024185e-14 3.15012720232291e-15 1 2.150044551524e-05 3.056536513892e-04 3.94054985962788e-14 2.02232251190394e-14 2 4.414538167481e-05 2.487736311119e-04 4.25029866792988e-14 1.87522682408394e-14 3 6.859148414373e-05 2.005818115585e-04 4.53217311259387e-14 1.74274979108095e-14 4 9.482936806790e-05 1.599217422265e-04 4.78194008466586e-14 1.61899420806395e-14 5 1.223730338349e-04 1.258094059571e-04 4.99466037913185e-14 1.49961331583896e-14 6 1.503919467005e-04 9.746106774749e-05 5.16593762842485e-14 1.38288703721896e-14 7 1.778574994179e-04 7.424069275151e-05 5.29455714110384e-14 1.27072561267296e-14 8 2.037192376472e-04 5.558405822640e-05 5.38552912110284e-14 1.16840183973897e-14 9 2.270893596876e-04 4.093370906208e-05 5.45041384039284e-14 1.08199635021397e-14 10 2.473904890987e-04 2.970515729419e-05 5.50293952630484e-14 1.01478544062997e-14 11 2.644159698809e-04 2.129409194874e-05 5.55238586419984e-14 9.65154694511172e-15 12 2.782854222845e-04 1.511459700067e-05 5.59814466446584e-14 9.26520767933973e-15 13 2.893330037449e-04 1.064225111885e-05 5.61998153765084e-14 8.84796906264674e-15 14 2.979880834790e-04 7.440710065356e-06 5.49254859767484e-14 7.80810175334277e-15 15 3.046868620840e-04 5.167113623851e-06 4.93098005833686e-14 4.96337539633586e-15 16 3.098225524744e-04 3.562954054487e-06 4.68043059215886e-14 3.69218245612189e-15 17 3.137248684635e-04 2.438847588856e-06 4.57103958950387e-14 3.10579835679991e-15 18 3.166564365942e-04 1.658923475285e-06 4.50667276637087e-14 2.74769332437592e-15 19 3.188164735449e-04 1.127542370728e-06 4.46167078307087e-14 2.49662358336593e-15 20 3.203461883142e-04 7.790207438109e-07 4.42492429192687e-14 2.30311997655593e-15 ngspice-26/tests/hisimhv1/nmos/reference/acVd_corsrd2.standard0000644000265600020320000000637712264261473024107 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 1 6.924140758136e-05 1.553597065172e-03 2.45841887430693e-14 3.3729044563539e-14 2 1.377685595069e-04 1.250191079785e-03 2.59588337965792e-14 3.2401708231459e-14 3 2.019969576787e-04 9.667810811084e-04 2.75328133220292e-14 3.08276745661491e-14 4 2.590274544044e-04 7.333226202873e-04 2.91786442688391e-14 2.90950477099191e-14 5 3.077813273769e-04 5.530881194892e-04 3.08013708760391e-14 2.72844649436392e-14 6 3.485732414024e-04 4.180539094325e-04 3.23361697706191e-14 2.54643983056193e-14 7 3.823785581190e-04 3.179244748072e-04 3.3743721527219e-14 2.36894291010593e-14 8 4.103330208575e-04 2.436533969363e-04 3.5003556864389e-14 2.20017129631394e-14 9 4.334919421127e-04 1.882469257726e-04 3.61077721916489e-14 2.04334085396594e-14 10 4.527480853823e-04 1.465784507086e-04 3.70566823201789e-14 1.90081956162994e-14 11 4.688250758564e-04 1.149671150076e-04 3.78564670676589e-14 1.77413990183595e-14 12 4.822996783885e-04 9.078137482070e-05 3.85179356918789e-14 1.66394110208995e-14 13 4.936308211152e-04 7.213126047632e-05 3.90554756320389e-14 1.56994319432395e-14 14 5.031861982887e-04 5.764698901439e-05 3.94857329711088e-14 1.49100738172096e-14 15 5.112635372497e-04 4.632494651840e-05 3.98260901025588e-14 1.42525164396696e-14 16 5.181064600327e-04 3.742180228114e-05 4.00932533882888e-14 1.37008769578396e-14 17 5.239159739191e-04 3.038158758227e-05 4.03022241589688e-14 1.32181019529096e-14 18 5.288588277698e-04 2.478494694882e-05 4.04657526238988e-14 1.27305988304596e-14 19 5.330737649102e-04 2.031328701826e-05 4.05942161824788e-14 1.19101301965697e-14 20 5.366763882319e-04 1.672304815249e-05 4.06957864086388e-14 7.38545417325478e-15 1 4.096607801013e-05 9.313339648447e-04 2.45819048163893e-14 3.3672746775969e-14 2 8.271497105300e-05 7.952522531440e-04 2.59929083895492e-14 3.23389425036991e-14 3 1.241978683414e-04 6.613913224685e-04 2.76082032351392e-14 3.07634056727591e-14 4 1.640708304496e-04 5.400808323341e-04 2.92978989411591e-14 2.90325416251692e-14 5 2.012280516426e-04 4.359713347198e-04 3.09661845294591e-14 2.72259156696792e-14 6 2.350048092251e-04 3.496739442081e-04 3.2547931147669e-14 2.54113133276193e-14 7 2.651489523953e-04 2.796455774331e-04 3.4003740112209e-14 2.36428251105293e-14 8 2.917033467450e-04 2.235127706841e-04 3.5313140203869e-14 2.19621142135694e-14 9 3.148858795860e-04 1.788082520373e-04 3.64681788098989e-14 2.04006836168794e-14 10 3.349991472394e-04 1.433057192760e-04 3.74689450290089e-14 1.89813459564994e-14 11 3.523729301704e-04 1.151289791630e-04 3.83211188396589e-14 1.77184307815195e-14 12 3.673321116555e-04 9.275226534035e-05 3.90347227199689e-14 1.66173552945795e-14 13 3.801811380354e-04 7.495735680360e-05 3.96231606780688e-14 1.56744650306095e-14 14 3.911978286305e-04 6.078008720824e-05 4.01020590076688e-14 1.48775844962396e-14 15 4.006317943853e-04 4.946020589586e-05 4.04879108894188e-14 1.42068778036696e-14 16 4.087048580349e-04 4.039909495867e-05 4.07967818119688e-14 1.36344964165696e-14 17 4.156123064630e-04 3.312565809432e-05 4.10433255416588e-14 1.31185978961096e-14 18 4.215245602468e-04 2.726924445188e-05 4.12402188078088e-14 1.25714797188796e-14 19 4.265891285126e-04 2.253823944404e-05 4.13979816230988e-14 1.16125880939197e-14 20 4.309327681390e-04 1.870314061469e-05 4.15250736849188e-14 7.45723621915978e-15 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_corsrd1.standard0000644000265600020320000010243012264261473024114 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.462009469449e-05 0.000000000000e+00 -5.462009469348e-05 -1.010000000000e-15 1.500000000000e+00 5.489521985279e-05 0.000000000000e+00 -5.489521985128e-05 -1.510000000000e-15 2.000000000000e+00 5.512977541630e-05 0.000000000000e+00 -5.512977541429e-05 -2.010000000000e-15 2.500000000000e+00 5.534439284552e-05 0.000000000000e+00 -5.534439284301e-05 -2.510000000000e-15 3.000000000000e+00 5.554659642525e-05 0.000000000000e+00 -5.554659642224e-05 -3.010000000000e-15 3.500000000000e+00 5.574009073027e-05 0.000000000000e+00 -5.574009072676e-05 -3.510000000000e-15 4.000000000000e+00 5.592703753878e-05 0.000000000000e+00 -5.592703753477e-05 -4.010000000000e-15 4.500000000000e+00 5.610883593518e-05 0.000000000000e+00 -5.610883593067e-05 -4.510000000000e-15 5.000000000000e+00 5.628645595698e-05 0.000000000000e+00 -5.628645595197e-05 -5.010000000000e-15 5.500000000000e+00 5.646060405239e-05 0.000000000000e+00 -5.646060404688e-05 -5.510000000000e-15 6.000000000000e+00 5.663181407988e-05 0.000000000000e+00 -5.663181407388e-05 -6.010000000000e-15 6.500000000000e+00 5.680050130535e-05 0.000000000000e+00 -5.680050129884e-05 -6.510000000000e-15 7.000000000000e+00 5.696699635701e-05 0.000000000000e+00 -5.696699635001e-05 -7.010000000000e-15 7.500000000000e+00 5.713156757894e-05 0.000000000000e+00 -5.713156757143e-05 -7.510000000000e-15 8.000000000000e+00 5.729443630457e-05 0.000000000000e+00 -5.729443629656e-05 -8.010000000000e-15 8.500000000000e+00 5.745578761978e-05 0.000000000000e+00 -5.745578761127e-05 -8.510000000000e-15 9.000000000000e+00 5.761577814748e-05 0.000000000000e+00 -5.761577813847e-05 -9.010000000000e-15 9.500000000000e+00 5.777454180487e-05 0.000000000000e+00 -5.777454179536e-05 -9.510000000000e-15 1.000000000000e+01 5.793219414462e-05 0.000000000000e+00 -5.793219413461e-05 -1.001000000000e-14 1.050000000000e+01 5.808883568405e-05 0.000000000000e+00 -5.808883567354e-05 -1.051000000000e-14 1.100000000000e+01 5.824455449679e-05 0.000000000000e+00 -5.824455448578e-05 -1.101000000000e-14 1.150000000000e+01 5.839942825735e-05 0.000000000000e+00 -5.839942824584e-05 -1.151000000000e-14 1.200000000000e+01 5.855352587362e-05 0.000000000000e+00 -5.855352586161e-05 -1.201000000000e-14 1.250000000000e+01 5.870690880425e-05 0.000000000000e+00 -5.870690879174e-05 -1.251000000000e-14 1.300000000000e+01 5.885963213244e-05 0.000000000000e+00 -5.885963211943e-05 -1.301000000000e-14 1.350000000000e+01 5.901174544886e-05 0.000000000000e+00 -5.901174543535e-05 -1.351000000000e-14 1.400000000000e+01 5.916329358363e-05 0.000000000000e+00 -5.916329356962e-05 -1.401000000000e-14 1.450000000000e+01 5.931431721775e-05 0.000000000000e+00 -5.931431720324e-05 -1.451000000000e-14 1.500000000000e+01 5.946485339731e-05 0.000000000000e+00 -5.946485338230e-05 -1.501000000000e-14 1.550000000000e+01 5.961493596881e-05 0.000000000000e+00 -5.961493595330e-05 -1.551000000000e-14 1.600000000000e+01 5.976459594979e-05 0.000000000000e+00 -5.976459593378e-05 -1.601000000000e-14 1.650000000000e+01 5.991386184623e-05 0.000000000000e+00 -5.991386182971e-05 -1.651000000000e-14 1.700000000000e+01 6.006275992561e-05 0.000000000000e+00 -6.006275990860e-05 -1.701000000000e-14 1.750000000000e+01 6.021131445323e-05 0.000000000000e+00 -6.021131443572e-05 -1.751000000000e-14 1.800000000000e+01 6.035954789729e-05 0.000000000000e+00 -6.035954787928e-05 -1.801000000000e-14 1.850000000000e+01 6.050748110800e-05 0.000000000000e+00 -6.050748108949e-05 -1.851000000000e-14 1.900000000000e+01 6.065513347434e-05 0.000000000000e+00 -6.065513345533e-05 -1.901000000000e-14 1.950000000000e+01 6.080252306190e-05 0.000000000000e+00 -6.080252304239e-05 -1.951000000000e-14 2.000000000000e+01 6.094966673456e-05 0.000000000000e+00 -6.094966671455e-05 -2.001000000000e-14 1.000000000000e+00 5.705056660052e-04 0.000000000000e+00 -5.705056660042e-04 -1.010000000000e-15 1.500000000000e+00 7.946957922550e-04 0.000000000000e+00 -7.946957922535e-04 -1.510000000000e-15 2.000000000000e+00 9.799734701653e-04 0.000000000000e+00 -9.799734701633e-04 -2.010000000000e-15 2.500000000000e+00 1.128275895206e-03 0.000000000000e+00 -1.128275895204e-03 -2.510000000000e-15 3.000000000000e+00 1.242285293332e-03 0.000000000000e+00 -1.242285293329e-03 -3.010000000000e-15 3.500000000000e+00 1.325749836816e-03 0.000000000000e+00 -1.325749836812e-03 -3.510000000000e-15 4.000000000000e+00 1.383467918767e-03 0.000000000000e+00 -1.383467918763e-03 -4.010000000000e-15 4.500000000000e+00 1.420821728100e-03 0.000000000000e+00 -1.420821728095e-03 -4.510000000000e-15 5.000000000000e+00 1.443089315500e-03 0.000000000000e+00 -1.443089315495e-03 -5.010000000000e-15 5.500000000000e+00 1.454908494969e-03 0.000000000000e+00 -1.454908494964e-03 -5.510000000000e-15 6.000000000000e+00 1.460122559178e-03 0.000000000000e+00 -1.460122559172e-03 -6.010000000000e-15 6.500000000000e+00 1.462143187141e-03 0.000000000000e+00 -1.462143187134e-03 -6.510000000000e-15 7.000000000000e+00 1.463533029278e-03 0.000000000000e+00 -1.463533029271e-03 -7.010000000000e-15 7.500000000000e+00 1.464811657508e-03 0.000000000000e+00 -1.464811657501e-03 -7.510000000000e-15 8.000000000000e+00 1.466008907397e-03 0.000000000000e+00 -1.466008907389e-03 -8.010000000000e-15 8.500000000000e+00 1.467138298215e-03 0.000000000000e+00 -1.467138298206e-03 -8.510000000000e-15 9.000000000000e+00 1.468210797414e-03 0.000000000000e+00 -1.468210797405e-03 -9.010000000000e-15 9.500000000000e+00 1.469235324561e-03 0.000000000000e+00 -1.469235324551e-03 -9.510000000000e-15 1.000000000000e+01 1.470219083052e-03 0.000000000000e+00 -1.470219083042e-03 -1.001000000000e-14 1.050000000000e+01 1.471167886052e-03 0.000000000000e+00 -1.471167886041e-03 -1.051000000000e-14 1.100000000000e+01 1.472086441488e-03 0.000000000000e+00 -1.472086441477e-03 -1.101000000000e-14 1.150000000000e+01 1.472978585534e-03 0.000000000000e+00 -1.472978585523e-03 -1.151000000000e-14 1.200000000000e+01 1.473847467678e-03 0.000000000000e+00 -1.473847467666e-03 -1.201000000000e-14 1.250000000000e+01 1.474695695055e-03 0.000000000000e+00 -1.474695695042e-03 -1.251000000000e-14 1.300000000000e+01 1.475525444283e-03 0.000000000000e+00 -1.475525444270e-03 -1.301000000000e-14 1.350000000000e+01 1.476338548010e-03 0.000000000000e+00 -1.476338547996e-03 -1.351000000000e-14 1.400000000000e+01 1.477136562057e-03 0.000000000000e+00 -1.477136562043e-03 -1.401000000000e-14 1.450000000000e+01 1.477920817740e-03 0.000000000000e+00 -1.477920817725e-03 -1.451000000000e-14 1.500000000000e+01 1.478692462877e-03 0.000000000000e+00 -1.478692462862e-03 -1.501000000000e-14 1.550000000000e+01 1.479452494142e-03 0.000000000000e+00 -1.479452494127e-03 -1.551000000000e-14 1.600000000000e+01 1.480201782761e-03 0.000000000000e+00 -1.480201782745e-03 -1.601000000000e-14 1.650000000000e+01 1.480941095079e-03 0.000000000000e+00 -1.480941095062e-03 -1.651000000000e-14 1.700000000000e+01 1.481671109130e-03 0.000000000000e+00 -1.481671109113e-03 -1.701000000000e-14 1.750000000000e+01 1.482392428085e-03 0.000000000000e+00 -1.482392428068e-03 -1.751000000000e-14 1.800000000000e+01 1.483105591249e-03 0.000000000000e+00 -1.483105591231e-03 -1.801000000000e-14 1.850000000000e+01 1.483811083098e-03 0.000000000000e+00 -1.483811083080e-03 -1.851000000000e-14 1.900000000000e+01 1.484509340778e-03 0.000000000000e+00 -1.484509340759e-03 -1.901000000000e-14 1.950000000000e+01 1.485200760344e-03 0.000000000000e+00 -1.485200760325e-03 -1.951000000000e-14 2.000000000000e+01 1.485885701994e-03 0.000000000000e+00 -1.485885701974e-03 -2.001000000000e-14 1.000000000000e+00 7.214550411983e-04 0.000000000000e+00 -7.214550411973e-04 -1.010000000000e-15 1.500000000000e+00 1.026946267313e-03 0.000000000000e+00 -1.026946267311e-03 -1.510000000000e-15 2.000000000000e+00 1.302250822257e-03 0.000000000000e+00 -1.302250822255e-03 -2.010000000000e-15 2.500000000000e+00 1.551375235698e-03 0.000000000000e+00 -1.551375235695e-03 -2.510000000000e-15 3.000000000000e+00 1.777686952726e-03 0.000000000000e+00 -1.777686952723e-03 -3.010000000000e-15 3.500000000000e+00 1.984022042587e-03 0.000000000000e+00 -1.984022042583e-03 -3.510000000000e-15 4.000000000000e+00 2.172777534149e-03 0.000000000000e+00 -2.172777534145e-03 -4.010000000000e-15 4.500000000000e+00 2.345988124276e-03 0.000000000000e+00 -2.345988124271e-03 -4.510000000000e-15 5.000000000000e+00 2.505388991418e-03 0.000000000000e+00 -2.505388991412e-03 -5.010000000000e-15 5.500000000000e+00 2.652466929191e-03 0.000000000000e+00 -2.652466929185e-03 -5.510000000000e-15 6.000000000000e+00 2.788501937437e-03 0.000000000000e+00 -2.788501937431e-03 -6.010000000000e-15 6.500000000000e+00 2.914600982573e-03 0.000000000000e+00 -2.914600982566e-03 -6.510000000000e-15 7.000000000000e+00 3.031725810536e-03 0.000000000000e+00 -3.031725810529e-03 -7.010000000000e-15 7.500000000000e+00 3.140715437661e-03 0.000000000000e+00 -3.140715437653e-03 -7.510000000000e-15 8.000000000000e+00 3.242304826165e-03 0.000000000000e+00 -3.242304826157e-03 -8.010000000000e-15 8.500000000000e+00 3.337140433554e-03 0.000000000000e+00 -3.337140433545e-03 -8.510000000000e-15 9.000000000000e+00 3.425792880162e-03 0.000000000000e+00 -3.425792880153e-03 -9.010000000000e-15 9.500000000000e+00 3.508767732511e-03 0.000000000000e+00 -3.508767732502e-03 -9.510000000000e-15 1.000000000000e+01 3.586514466849e-03 0.000000000000e+00 -3.586514466839e-03 -1.001000000000e-14 1.050000000000e+01 3.659434038291e-03 0.000000000000e+00 -3.659434038280e-03 -1.051000000000e-14 1.100000000000e+01 3.727885289938e-03 0.000000000000e+00 -3.727885289927e-03 -1.101000000000e-14 1.150000000000e+01 3.792190403853e-03 0.000000000000e+00 -3.792190403842e-03 -1.151000000000e-14 1.200000000000e+01 3.852639557029e-03 0.000000000000e+00 -3.852639557017e-03 -1.201000000000e-14 1.250000000000e+01 3.909494914597e-03 0.000000000000e+00 -3.909494914584e-03 -1.251000000000e-14 1.300000000000e+01 3.962994067945e-03 0.000000000000e+00 -3.962994067931e-03 -1.301000000000e-14 1.350000000000e+01 4.013353005642e-03 0.000000000000e+00 -4.013353005628e-03 -1.351000000000e-14 1.400000000000e+01 4.060768689196e-03 0.000000000000e+00 -4.060768689182e-03 -1.401000000000e-14 1.450000000000e+01 4.105421292828e-03 0.000000000000e+00 -4.105421292814e-03 -1.451000000000e-14 1.500000000000e+01 4.147476156065e-03 0.000000000000e+00 -4.147476156050e-03 -1.501000000000e-14 1.550000000000e+01 4.187085489497e-03 0.000000000000e+00 -4.187085489481e-03 -1.551000000000e-14 1.600000000000e+01 4.224389867183e-03 0.000000000000e+00 -4.224389867167e-03 -1.601000000000e-14 1.650000000000e+01 4.259519533625e-03 0.000000000000e+00 -4.259519533609e-03 -1.651000000000e-14 1.700000000000e+01 4.292595548668e-03 0.000000000000e+00 -4.292595548651e-03 -1.701000000000e-14 1.750000000000e+01 4.323730790056e-03 0.000000000000e+00 -4.323730790038e-03 -1.751000000000e-14 1.800000000000e+01 4.353030830376e-03 0.000000000000e+00 -4.353030830358e-03 -1.801000000000e-14 1.850000000000e+01 4.380594702798e-03 0.000000000000e+00 -4.380594702779e-03 -1.851000000000e-14 1.900000000000e+01 4.406515568065e-03 0.000000000000e+00 -4.406515568046e-03 -1.901000000000e-14 1.950000000000e+01 4.430881293750e-03 0.000000000000e+00 -4.430881293730e-03 -1.951000000000e-14 2.000000000000e+01 4.453774955548e-03 0.000000000000e+00 -4.453774955528e-03 -2.001000000000e-14 1.000000000000e+00 3.893981747328e-05 0.000000000000e+00 -3.893981747228e-05 -1.000000000751e-15 1.500000000000e+00 3.916364424869e-05 0.000000000000e+00 -3.916364424719e-05 -1.500000000751e-15 2.000000000000e+00 3.936048432221e-05 0.000000000000e+00 -3.936048432021e-05 -2.000000000751e-15 2.500000000000e+00 3.954389687561e-05 0.000000000000e+00 -3.954389687311e-05 -2.500000000751e-15 3.000000000000e+00 3.971886388320e-05 0.000000000000e+00 -3.971886388020e-05 -3.000000000751e-15 3.500000000000e+00 3.988787240104e-05 0.000000000000e+00 -3.988787239754e-05 -3.500000000751e-15 4.000000000000e+00 4.005239219324e-05 0.000000000000e+00 -4.005239218924e-05 -4.000000000751e-15 4.500000000000e+00 4.021338423996e-05 0.000000000000e+00 -4.021338423546e-05 -4.500000000751e-15 5.000000000000e+00 4.037152020095e-05 0.000000000000e+00 -4.037152019595e-05 -5.000000000751e-15 5.500000000000e+00 4.052729233351e-05 0.000000000000e+00 -4.052729232801e-05 -5.500000000751e-15 6.000000000000e+00 4.068107451301e-05 0.000000000000e+00 -4.068107450701e-05 -6.000000000751e-15 6.500000000000e+00 4.083315874272e-05 0.000000000000e+00 -4.083315873622e-05 -6.500000000751e-15 7.000000000000e+00 4.098377827861e-05 0.000000000000e+00 -4.098377827161e-05 -7.000000000751e-15 7.500000000000e+00 4.113312294806e-05 0.000000000000e+00 -4.113312294056e-05 -7.500000000751e-15 8.000000000000e+00 4.128134967331e-05 0.000000000000e+00 -4.128134966531e-05 -8.000000000751e-15 8.500000000000e+00 4.142858992163e-05 0.000000000000e+00 -4.142858991312e-05 -8.500000000751e-15 9.000000000000e+00 4.157495511574e-05 0.000000000000e+00 -4.157495510674e-05 -9.000000000751e-15 9.500000000000e+00 4.172054064938e-05 0.000000000000e+00 -4.172054063988e-05 -9.500000000751e-15 1.000000000000e+01 4.186542892454e-05 0.000000000000e+00 -4.186542891454e-05 -1.000000000075e-14 1.050000000000e+01 4.200969168706e-05 0.000000000000e+00 -4.200969167656e-05 -1.050000000075e-14 1.100000000000e+01 4.215339184927e-05 0.000000000000e+00 -4.215339183827e-05 -1.100000000075e-14 1.150000000000e+01 4.229658493095e-05 0.000000000000e+00 -4.229658491945e-05 -1.150000000075e-14 1.200000000000e+01 4.243932021207e-05 0.000000000000e+00 -4.243932020007e-05 -1.200000000075e-14 1.250000000000e+01 4.258164166467e-05 0.000000000000e+00 -4.258164165217e-05 -1.250000000075e-14 1.300000000000e+01 4.272358871358e-05 0.000000000000e+00 -4.272358870059e-05 -1.300000000075e-14 1.350000000000e+01 4.286519686281e-05 0.000000000000e+00 -4.286519684931e-05 -1.350000000075e-14 1.400000000000e+01 4.300649821545e-05 0.000000000000e+00 -4.300649820145e-05 -1.400000000075e-14 1.450000000000e+01 4.314752190855e-05 0.000000000000e+00 -4.314752189405e-05 -1.450000000075e-14 1.500000000000e+01 4.328829447910e-05 0.000000000000e+00 -4.328829446410e-05 -1.500000000075e-14 1.550000000000e+01 4.342884017430e-05 0.000000000000e+00 -4.342884015880e-05 -1.550000000075e-14 1.600000000000e+01 4.356918121581e-05 0.000000000000e+00 -4.356918119981e-05 -1.600000000075e-14 1.650000000000e+01 4.370933802625e-05 0.000000000000e+00 -4.370933800976e-05 -1.650000000075e-14 1.700000000000e+01 4.384932942436e-05 0.000000000000e+00 -4.384932940736e-05 -1.700000000075e-14 1.750000000000e+01 4.398917279369e-05 0.000000000000e+00 -4.398917277619e-05 -1.750000000075e-14 1.800000000000e+01 4.412888422944e-05 0.000000000000e+00 -4.412888421144e-05 -1.800000000075e-14 1.850000000000e+01 4.426847866647e-05 0.000000000000e+00 -4.426847864797e-05 -1.850000000075e-14 1.900000000000e+01 4.440796999156e-05 0.000000000000e+00 -4.440796997256e-05 -1.900000000075e-14 1.950000000000e+01 4.454737114214e-05 0.000000000000e+00 -4.454737112264e-05 -1.950000000075e-14 2.000000000000e+01 4.468669419343e-05 0.000000000000e+00 -4.468669417343e-05 -2.000000000075e-14 1.000000000000e+00 6.429328745801e-04 0.000000000000e+00 -6.429328745791e-04 -1.000000000751e-15 1.500000000000e+00 8.994438023916e-04 0.000000000000e+00 -8.994438023901e-04 -1.500000000751e-15 2.000000000000e+00 1.115026008559e-03 0.000000000000e+00 -1.115026008557e-03 -2.000000000751e-15 2.500000000000e+00 1.291259521567e-03 0.000000000000e+00 -1.291259521565e-03 -2.500000000751e-15 3.000000000000e+00 1.430000637047e-03 0.000000000000e+00 -1.430000637044e-03 -3.000000000751e-15 3.500000000000e+00 1.534129930038e-03 0.000000000000e+00 -1.534129930035e-03 -3.500000000751e-15 4.000000000000e+00 1.608033983706e-03 0.000000000000e+00 -1.608033983702e-03 -4.000000000751e-15 4.500000000000e+00 1.657335530589e-03 0.000000000000e+00 -1.657335530585e-03 -4.500000000751e-15 5.000000000000e+00 1.687970249824e-03 0.000000000000e+00 -1.687970249819e-03 -5.000000000751e-15 5.500000000000e+00 1.705253236469e-03 0.000000000000e+00 -1.705253236464e-03 -5.500000000751e-15 6.000000000000e+00 1.713500832865e-03 0.000000000000e+00 -1.713500832859e-03 -6.000000000751e-15 6.500000000000e+00 1.716378873327e-03 0.000000000000e+00 -1.716378873320e-03 -6.500000000751e-15 7.000000000000e+00 1.717748884738e-03 0.000000000000e+00 -1.717748884731e-03 -7.000000000751e-15 7.500000000000e+00 1.719000891316e-03 0.000000000000e+00 -1.719000891308e-03 -7.500000000751e-15 8.000000000000e+00 1.720172094326e-03 0.000000000000e+00 -1.720172094318e-03 -8.000000000751e-15 8.500000000000e+00 1.721274465176e-03 0.000000000000e+00 -1.721274465168e-03 -8.500000000751e-15 9.000000000000e+00 1.722318652973e-03 0.000000000000e+00 -1.722318652964e-03 -9.000000000751e-15 9.500000000000e+00 1.723313716111e-03 0.000000000000e+00 -1.723313716101e-03 -9.500000000751e-15 1.000000000000e+01 1.724267155365e-03 0.000000000000e+00 -1.724267155355e-03 -1.000000000075e-14 1.050000000000e+01 1.725185103214e-03 0.000000000000e+00 -1.725185103203e-03 -1.050000000075e-14 1.100000000000e+01 1.726072553054e-03 0.000000000000e+00 -1.726072553043e-03 -1.100000000075e-14 1.150000000000e+01 1.726933575549e-03 0.000000000000e+00 -1.726933575538e-03 -1.150000000075e-14 1.200000000000e+01 1.727771503555e-03 0.000000000000e+00 -1.727771503543e-03 -1.200000000075e-14 1.250000000000e+01 1.728589082788e-03 0.000000000000e+00 -1.728589082775e-03 -1.250000000075e-14 1.300000000000e+01 1.729388591641e-03 0.000000000000e+00 -1.729388591628e-03 -1.300000000075e-14 1.350000000000e+01 1.730171935357e-03 0.000000000000e+00 -1.730171935344e-03 -1.350000000075e-14 1.400000000000e+01 1.730940719713e-03 0.000000000000e+00 -1.730940719699e-03 -1.400000000075e-14 1.450000000000e+01 1.731696308657e-03 0.000000000000e+00 -1.731696308643e-03 -1.450000000075e-14 1.500000000000e+01 1.732439869536e-03 0.000000000000e+00 -1.732439869521e-03 -1.500000000075e-14 1.550000000000e+01 1.733172408710e-03 0.000000000000e+00 -1.733172408694e-03 -1.550000000075e-14 1.600000000000e+01 1.733894799777e-03 0.000000000000e+00 -1.733894799761e-03 -1.600000000075e-14 1.650000000000e+01 1.734607806058e-03 0.000000000000e+00 -1.734607806041e-03 -1.650000000075e-14 1.700000000000e+01 1.735312098634e-03 0.000000000000e+00 -1.735312098617e-03 -1.700000000075e-14 1.750000000000e+01 1.736008270910e-03 0.000000000000e+00 -1.736008270893e-03 -1.750000000075e-14 1.800000000000e+01 1.736696850447e-03 0.000000000000e+00 -1.736696850429e-03 -1.800000000075e-14 1.850000000000e+01 1.737378308646e-03 0.000000000000e+00 -1.737378308628e-03 -1.850000000075e-14 1.900000000000e+01 1.738053068719e-03 0.000000000000e+00 -1.738053068700e-03 -1.900000000075e-14 1.950000000000e+01 1.738721512294e-03 0.000000000000e+00 -1.738721512275e-03 -1.950000000075e-14 2.000000000000e+01 1.739383984918e-03 0.000000000000e+00 -1.739383984898e-03 -2.000000000075e-14 1.000000000000e+00 7.719861128581e-04 0.000000000000e+00 -7.719861128571e-04 -1.000000000751e-15 1.500000000000e+00 1.096738629667e-03 0.000000000000e+00 -1.096738629665e-03 -1.500000000751e-15 2.000000000000e+00 1.388502548451e-03 0.000000000000e+00 -1.388502548449e-03 -2.000000000751e-15 2.500000000000e+00 1.651890992797e-03 0.000000000000e+00 -1.651890992794e-03 -2.500000000751e-15 3.000000000000e+00 1.890726808414e-03 0.000000000000e+00 -1.890726808411e-03 -3.000000000751e-15 3.500000000000e+00 2.108193535754e-03 0.000000000000e+00 -2.108193535751e-03 -3.500000000751e-15 4.000000000000e+00 2.306957271288e-03 0.000000000000e+00 -2.306957271284e-03 -4.000000000751e-15 4.500000000000e+00 2.489263887167e-03 0.000000000000e+00 -2.489263887162e-03 -4.500000000751e-15 5.000000000000e+00 2.657016339510e-03 0.000000000000e+00 -2.657016339505e-03 -5.000000000751e-15 5.500000000000e+00 2.811836210359e-03 0.000000000000e+00 -2.811836210354e-03 -5.500000000751e-15 6.000000000000e+00 2.955112866561e-03 0.000000000000e+00 -2.955112866555e-03 -6.000000000751e-15 6.500000000000e+00 3.088042911053e-03 0.000000000000e+00 -3.088042911047e-03 -6.500000000751e-15 7.000000000000e+00 3.211662023107e-03 0.000000000000e+00 -3.211662023100e-03 -7.000000000751e-15 7.500000000000e+00 3.326870730098e-03 0.000000000000e+00 -3.326870730090e-03 -7.500000000751e-15 8.000000000000e+00 3.434455580680e-03 0.000000000000e+00 -3.434455580672e-03 -8.000000000751e-15 8.500000000000e+00 3.535106345792e-03 0.000000000000e+00 -3.535106345784e-03 -8.500000000751e-15 9.000000000000e+00 3.629430318465e-03 0.000000000000e+00 -3.629430318456e-03 -9.000000000751e-15 9.500000000000e+00 3.717964150226e-03 0.000000000000e+00 -3.717964150216e-03 -9.500000000751e-15 1.000000000000e+01 3.801183721897e-03 0.000000000000e+00 -3.801183721887e-03 -1.000000000075e-14 1.050000000000e+01 3.879512367377e-03 0.000000000000e+00 -3.879512367367e-03 -1.050000000075e-14 1.100000000000e+01 3.953328024576e-03 0.000000000000e+00 -3.953328024565e-03 -1.100000000075e-14 1.150000000000e+01 4.022968876619e-03 0.000000000000e+00 -4.022968876607e-03 -1.150000000075e-14 1.200000000000e+01 4.088738519447e-03 0.000000000000e+00 -4.088738519435e-03 -1.200000000075e-14 1.250000000000e+01 4.150910203941e-03 0.000000000000e+00 -4.150910203929e-03 -1.250000000075e-14 1.300000000000e+01 4.209730503653e-03 0.000000000000e+00 -4.209730503640e-03 -1.300000000075e-14 1.350000000000e+01 4.265422472204e-03 0.000000000000e+00 -4.265422472191e-03 -1.350000000075e-14 1.400000000000e+01 4.318188372256e-03 0.000000000000e+00 -4.318188372242e-03 -1.400000000075e-14 1.450000000000e+01 4.368212043422e-03 0.000000000000e+00 -4.368212043408e-03 -1.450000000075e-14 1.500000000000e+01 4.415660964745e-03 0.000000000000e+00 -4.415660964730e-03 -1.500000000075e-14 1.550000000000e+01 4.460688057825e-03 0.000000000000e+00 -4.460688057809e-03 -1.550000000075e-14 1.600000000000e+01 4.503433268937e-03 0.000000000000e+00 -4.503433268921e-03 -1.600000000075e-14 1.650000000000e+01 4.544024962089e-03 0.000000000000e+00 -4.544024962072e-03 -1.650000000075e-14 1.700000000000e+01 4.582581149735e-03 0.000000000000e+00 -4.582581149718e-03 -1.700000000075e-14 1.750000000000e+01 4.619210583525e-03 0.000000000000e+00 -4.619210583508e-03 -1.750000000075e-14 1.800000000000e+01 4.654013723834e-03 0.000000000000e+00 -4.654013723816e-03 -1.800000000075e-14 1.850000000000e+01 4.687083603821e-03 0.000000000000e+00 -4.687083603803e-03 -1.850000000075e-14 1.900000000000e+01 4.718506601222e-03 0.000000000000e+00 -4.718506601203e-03 -1.900000000075e-14 1.950000000000e+01 4.748363128949e-03 0.000000000000e+00 -4.748363128929e-03 -1.950000000075e-14 2.000000000000e+01 4.776728253791e-03 0.000000000000e+00 -4.776728253771e-03 -2.000000000075e-14 1.000000000000e+00 7.782724838936e-05 0.000000000000e+00 -7.782723543462e-05 -1.295474362084e-11 1.500000000000e+00 7.818889325103e-05 0.000000000000e+00 -7.818888029578e-05 -1.295524362086e-11 2.000000000000e+00 7.847234563036e-05 0.000000000000e+00 -7.847233267462e-05 -1.295574362086e-11 2.500000000000e+00 7.872432791813e-05 0.000000000000e+00 -7.872431496188e-05 -1.295624362086e-11 3.000000000000e+00 7.895732339759e-05 0.000000000000e+00 -7.895731044084e-05 -1.295674362086e-11 3.500000000000e+00 7.917724814773e-05 0.000000000000e+00 -7.917723519048e-05 -1.295724362086e-11 4.000000000000e+00 7.938746273597e-05 0.000000000000e+00 -7.938744977822e-05 -1.295774362086e-11 4.500000000000e+00 7.959009814771e-05 0.000000000000e+00 -7.959008518947e-05 -1.295824362086e-11 5.000000000000e+00 7.978660887135e-05 0.000000000000e+00 -7.978659591260e-05 -1.295874362086e-11 5.500000000000e+00 7.997804125040e-05 0.000000000000e+00 -7.997802829115e-05 -1.295924362086e-11 6.000000000000e+00 8.016517832042e-05 0.000000000000e+00 -8.016516536067e-05 -1.295974362086e-11 6.500000000000e+00 8.034862438377e-05 0.000000000000e+00 -8.034861142353e-05 -1.296024362086e-11 7.000000000000e+00 8.052885747215e-05 0.000000000000e+00 -8.052884451141e-05 -1.296074362086e-11 7.500000000000e+00 8.070626348470e-05 0.000000000000e+00 -8.070625052345e-05 -1.296124362086e-11 8.000000000000e+00 8.088115928255e-05 0.000000000000e+00 -8.088114632080e-05 -1.296174362086e-11 8.500000000000e+00 8.105380882385e-05 0.000000000000e+00 -8.105379586160e-05 -1.296224362086e-11 9.000000000000e+00 8.122443474692e-05 0.000000000000e+00 -8.122442178418e-05 -1.296274362086e-11 9.500000000000e+00 8.139322688127e-05 0.000000000000e+00 -8.139321391803e-05 -1.296324362086e-11 1.000000000000e+01 8.156034862825e-05 0.000000000000e+00 -8.156033566451e-05 -1.296374362086e-11 1.050000000000e+01 8.172594182963e-05 0.000000000000e+00 -8.172592886539e-05 -1.296424362086e-11 1.100000000000e+01 8.189013054051e-05 0.000000000000e+00 -8.189011757577e-05 -1.296474362086e-11 1.150000000000e+01 8.205302399382e-05 0.000000000000e+00 -8.205301102857e-05 -1.296524362086e-11 1.200000000000e+01 8.221471895859e-05 0.000000000000e+00 -8.221470599285e-05 -1.296574362086e-11 1.250000000000e+01 8.237530163709e-05 0.000000000000e+00 -8.237528867085e-05 -1.296624362086e-11 1.300000000000e+01 8.253484920636e-05 0.000000000000e+00 -8.253483623961e-05 -1.296674362086e-11 1.350000000000e+01 8.269343108238e-05 0.000000000000e+00 -8.269341811514e-05 -1.296724362086e-11 1.400000000000e+01 8.285110996567e-05 0.000000000000e+00 -8.285109699793e-05 -1.296774362086e-11 1.450000000000e+01 8.300794271255e-05 0.000000000000e+00 -8.300792974431e-05 -1.296824362086e-11 1.500000000000e+01 8.316398106655e-05 0.000000000000e+00 -8.316396809781e-05 -1.296874362086e-11 1.550000000000e+01 8.331927227628e-05 0.000000000000e+00 -8.331925930703e-05 -1.296924362086e-11 1.600000000000e+01 8.347385962069e-05 0.000000000000e+00 -8.347384665095e-05 -1.296974362086e-11 1.650000000000e+01 8.362778285809e-05 0.000000000000e+00 -8.362776988784e-05 -1.297024362086e-11 1.700000000000e+01 8.378107861196e-05 0.000000000000e+00 -8.378106564121e-05 -1.297074362086e-11 1.750000000000e+01 8.393378070424e-05 0.000000000000e+00 -8.393376773299e-05 -1.297124362086e-11 1.800000000000e+01 8.408592044443e-05 0.000000000000e+00 -8.408590747269e-05 -1.297174362086e-11 1.850000000000e+01 8.423752688154e-05 0.000000000000e+00 -8.423751390930e-05 -1.297224362086e-11 1.900000000000e+01 8.438862702451e-05 0.000000000000e+00 -8.438861405177e-05 -1.297274362086e-11 1.950000000000e+01 8.453924603579e-05 0.000000000000e+00 -8.453923306254e-05 -1.297324362086e-11 2.000000000000e+01 8.468940740204e-05 0.000000000000e+00 -8.468939442829e-05 -1.297374362086e-11 1.000000000000e+00 4.720753718990e-04 0.000000000000e+00 -4.720753589442e-04 -1.295474362084e-11 1.500000000000e+00 6.529220176079e-04 0.000000000000e+00 -6.529220046527e-04 -1.295524362086e-11 2.000000000000e+00 7.985562543786e-04 0.000000000000e+00 -7.985562414229e-04 -1.295574362086e-11 2.500000000000e+00 9.114735268919e-04 0.000000000000e+00 -9.114735139356e-04 -1.295624362086e-11 3.000000000000e+00 9.952200696679e-04 0.000000000000e+00 -9.952200567112e-04 -1.295674362086e-11 3.500000000000e+00 1.054284086036e-03 0.000000000000e+00 -1.054284073079e-03 -1.295724362086e-11 4.000000000000e+00 1.093705464521e-03 0.000000000000e+00 -1.093705451563e-03 -1.295774362086e-11 4.500000000000e+00 1.118498136817e-03 0.000000000000e+00 -1.118498123859e-03 -1.295824362086e-11 5.000000000000e+00 1.133104712363e-03 0.000000000000e+00 -1.133104699404e-03 -1.295874362086e-11 5.500000000000e+00 1.141085353648e-03 0.000000000000e+00 -1.141085340688e-03 -1.295924362086e-11 6.000000000000e+00 1.145106318564e-03 0.000000000000e+00 -1.145106305604e-03 -1.295974362086e-11 6.500000000000e+00 1.147128476867e-03 0.000000000000e+00 -1.147128463906e-03 -1.296024362086e-11 7.000000000000e+00 1.148461186999e-03 0.000000000000e+00 -1.148461174038e-03 -1.296074362086e-11 7.500000000000e+00 1.149616564747e-03 0.000000000000e+00 -1.149616551785e-03 -1.296124362086e-11 8.000000000000e+00 1.150692636635e-03 0.000000000000e+00 -1.150692623674e-03 -1.296174362086e-11 8.500000000000e+00 1.151710741767e-03 0.000000000000e+00 -1.151710728805e-03 -1.296224362086e-11 9.000000000000e+00 1.152681299037e-03 0.000000000000e+00 -1.152681286075e-03 -1.296274362086e-11 9.500000000000e+00 1.153611745738e-03 0.000000000000e+00 -1.153611732774e-03 -1.296324362086e-11 1.000000000000e+01 1.154507885480e-03 0.000000000000e+00 -1.154507872516e-03 -1.296374362086e-11 1.050000000000e+01 1.155374359969e-03 0.000000000000e+00 -1.155374347005e-03 -1.296424362086e-11 1.100000000000e+01 1.156214928927e-03 0.000000000000e+00 -1.156214915962e-03 -1.296474362086e-11 1.150000000000e+01 1.157032669395e-03 0.000000000000e+00 -1.157032656430e-03 -1.296524362086e-11 1.200000000000e+01 1.157830124520e-03 0.000000000000e+00 -1.157830111554e-03 -1.296574362086e-11 1.250000000000e+01 1.158609416245e-03 0.000000000000e+00 -1.158609403279e-03 -1.296624362086e-11 1.300000000000e+01 1.159372331323e-03 0.000000000000e+00 -1.159372318357e-03 -1.296674362086e-11 1.350000000000e+01 1.160120387429e-03 0.000000000000e+00 -1.160120374461e-03 -1.296724362086e-11 1.400000000000e+01 1.160854884338e-03 0.000000000000e+00 -1.160854871370e-03 -1.296774362086e-11 1.450000000000e+01 1.161576943859e-03 0.000000000000e+00 -1.161576930890e-03 -1.296824362086e-11 1.500000000000e+01 1.162287541229e-03 0.000000000000e+00 -1.162287528260e-03 -1.296874362086e-11 1.550000000000e+01 1.162987530003e-03 0.000000000000e+00 -1.162987517034e-03 -1.296924362086e-11 1.600000000000e+01 1.163677661935e-03 0.000000000000e+00 -1.163677648965e-03 -1.296974362086e-11 1.650000000000e+01 1.164358602991e-03 0.000000000000e+00 -1.164358590021e-03 -1.297024362086e-11 1.700000000000e+01 1.165030946342e-03 0.000000000000e+00 -1.165030933371e-03 -1.297074362086e-11 1.750000000000e+01 1.165695222980e-03 0.000000000000e+00 -1.165695210009e-03 -1.297124362086e-11 1.800000000000e+01 1.166351910460e-03 0.000000000000e+00 -1.166351897489e-03 -1.297174362086e-11 1.850000000000e+01 1.167001440142e-03 0.000000000000e+00 -1.167001427170e-03 -1.297224362086e-11 1.900000000000e+01 1.167644203235e-03 0.000000000000e+00 -1.167644190262e-03 -1.297274362086e-11 1.950000000000e+01 1.168280555864e-03 0.000000000000e+00 -1.168280542891e-03 -1.297324362086e-11 2.000000000000e+01 1.168910823359e-03 0.000000000000e+00 -1.168910810385e-03 -1.297374362086e-11 1.000000000000e+00 6.396609529594e-04 0.000000000000e+00 -6.396609400046e-04 -1.295474362084e-11 1.500000000000e+00 9.127968521166e-04 0.000000000000e+00 -9.127968391613e-04 -1.295524362086e-11 2.000000000000e+00 1.159839189526e-03 0.000000000000e+00 -1.159839176571e-03 -1.295574362086e-11 2.500000000000e+00 1.383949199823e-03 0.000000000000e+00 -1.383949186867e-03 -1.295624362086e-11 3.000000000000e+00 1.587844035480e-03 0.000000000000e+00 -1.587844022523e-03 -1.295674362086e-11 3.500000000000e+00 1.773853844704e-03 0.000000000000e+00 -1.773853831747e-03 -1.295724362086e-11 4.000000000000e+00 1.943977726950e-03 0.000000000000e+00 -1.943977713992e-03 -1.295774362086e-11 4.500000000000e+00 2.099934167185e-03 0.000000000000e+00 -2.099934154227e-03 -1.295824362086e-11 5.000000000000e+00 2.243204725585e-03 0.000000000000e+00 -2.243204712626e-03 -1.295874362086e-11 5.500000000000e+00 2.375071049707e-03 0.000000000000e+00 -2.375071036748e-03 -1.295924362086e-11 6.000000000000e+00 2.496646093006e-03 0.000000000000e+00 -2.496646080047e-03 -1.295974362086e-11 6.500000000000e+00 2.608900041295e-03 0.000000000000e+00 -2.608900028335e-03 -1.296024362086e-11 7.000000000000e+00 2.712682047938e-03 0.000000000000e+00 -2.712682034977e-03 -1.296074362086e-11 7.500000000000e+00 2.808738357588e-03 0.000000000000e+00 -2.808738344627e-03 -1.296124362086e-11 8.000000000000e+00 2.897727463290e-03 0.000000000000e+00 -2.897727450328e-03 -1.296174362086e-11 8.500000000000e+00 2.980232819619e-03 0.000000000000e+00 -2.980232806657e-03 -1.296224362086e-11 9.000000000000e+00 3.056773535879e-03 0.000000000000e+00 -3.056773522917e-03 -1.296274362086e-11 9.500000000000e+00 3.127813398194e-03 0.000000000000e+00 -3.127813385230e-03 -1.296324362086e-11 1.000000000000e+01 3.193768504817e-03 0.000000000000e+00 -3.193768491853e-03 -1.296374362086e-11 1.050000000000e+01 3.255013746080e-03 0.000000000000e+00 -3.255013733115e-03 -1.296424362086e-11 1.100000000000e+01 3.311888317372e-03 0.000000000000e+00 -3.311888304407e-03 -1.296474362086e-11 1.150000000000e+01 3.364700418848e-03 0.000000000000e+00 -3.364700405883e-03 -1.296524362086e-11 1.200000000000e+01 3.413731267600e-03 0.000000000000e+00 -3.413731254634e-03 -1.296574362086e-11 1.250000000000e+01 3.459238525681e-03 0.000000000000e+00 -3.459238512715e-03 -1.296624362086e-11 1.300000000000e+01 3.501459229477e-03 0.000000000000e+00 -3.501459216511e-03 -1.296674362086e-11 1.350000000000e+01 3.540612291685e-03 0.000000000000e+00 -3.540612278717e-03 -1.296724362086e-11 1.400000000000e+01 3.576900635789e-03 0.000000000000e+00 -3.576900622821e-03 -1.296774362086e-11 1.450000000000e+01 3.610513013912e-03 0.000000000000e+00 -3.610513000944e-03 -1.296824362086e-11 1.500000000000e+01 3.641625551617e-03 0.000000000000e+00 -3.641625538648e-03 -1.296874362086e-11 1.550000000000e+01 3.670403057395e-03 0.000000000000e+00 -3.670403044426e-03 -1.296924362086e-11 1.600000000000e+01 3.697000129744e-03 0.000000000000e+00 -3.697000116774e-03 -1.296974362086e-11 1.650000000000e+01 3.721562090663e-03 0.000000000000e+00 -3.721562077693e-03 -1.297024362086e-11 1.700000000000e+01 3.744225770978e-03 0.000000000000e+00 -3.744225758007e-03 -1.297074362086e-11 1.750000000000e+01 3.765120169849e-03 0.000000000000e+00 -3.765120156878e-03 -1.297124362086e-11 1.800000000000e+01 3.784367008184e-03 0.000000000000e+00 -3.784366995212e-03 -1.297174362086e-11 1.850000000000e+01 3.802081193323e-03 0.000000000000e+00 -3.802081180351e-03 -1.297224362086e-11 1.900000000000e+01 3.818371210284e-03 0.000000000000e+00 -3.818371197312e-03 -1.297274362086e-11 1.950000000000e+01 3.833339453049e-03 0.000000000000e+00 -3.833339440076e-03 -1.297324362086e-11 2.000000000000e+01 3.847082507785e-03 0.000000000000e+00 -3.847082494811e-03 -1.297374362086e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_cosym.standard0000644000265600020320000015003612264261473023676 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e-01 4.285225226820e-06 0.000000000000e+00 -4.285225226720e-06 -1.000000000000e-16 6.000000000000e-01 2.504627891847e-05 0.000000000000e+00 -2.504627891787e-05 -6.000000000000e-16 1.100000000000e+00 4.379234875759e-05 0.000000000000e+00 -4.379234875649e-05 -1.100000000000e-15 1.600000000000e+00 5.421013073910e-05 0.000000000000e+00 -5.421013073750e-05 -1.600000000000e-15 2.100000000000e+00 5.462508415335e-05 0.000000000000e+00 -5.462508415125e-05 -2.100000000000e-15 2.600000000000e+00 5.489573602582e-05 0.000000000000e+00 -5.489573602322e-05 -2.600000000000e-15 3.100000000000e+00 5.512808465084e-05 0.000000000000e+00 -5.512808464774e-05 -3.100000000000e-15 3.600000000000e+00 5.534102508205e-05 0.000000000000e+00 -5.534102507845e-05 -3.600000000000e-15 4.100000000000e+00 5.554176132045e-05 0.000000000000e+00 -5.554176131635e-05 -4.100000000000e-15 4.600000000000e+00 5.573390635097e-05 0.000000000000e+00 -5.573390634637e-05 -4.600000000000e-15 5.100000000000e+00 5.591958427109e-05 0.000000000000e+00 -5.591958426599e-05 -5.100000000000e-15 5.600000000000e+00 5.610017406987e-05 0.000000000000e+00 -5.610017406427e-05 -5.600000000000e-15 6.100000000000e+00 5.627663314841e-05 0.000000000000e+00 -5.627663314231e-05 -6.100000000000e-15 6.600000000000e+00 5.644965917499e-05 0.000000000000e+00 -5.644965916839e-05 -6.600000000000e-15 7.100000000000e+00 5.661977951976e-05 0.000000000000e+00 -5.661977951266e-05 -7.100000000000e-15 7.600000000000e+00 5.678740445640e-05 0.000000000000e+00 -5.678740444880e-05 -7.600000000000e-15 8.100000000000e+00 5.695286066189e-05 0.000000000000e+00 -5.695286065379e-05 -8.100000000000e-15 8.600000000000e+00 5.711641328617e-05 0.000000000000e+00 -5.711641327757e-05 -8.600000000000e-15 9.100000000000e+00 5.727828103742e-05 0.000000000000e+00 -5.727828102832e-05 -9.100000000000e-15 9.600000000000e+00 5.743864681419e-05 0.000000000000e+00 -5.743864680459e-05 -9.600000000000e-15 1.010000000000e+01 5.759766539593e-05 0.000000000000e+00 -5.759766538583e-05 -1.010000000000e-14 1.060000000000e+01 5.775546913078e-05 0.000000000000e+00 -5.775546912018e-05 -1.060000000000e-14 1.110000000000e+01 5.791217222423e-05 0.000000000000e+00 -5.791217221313e-05 -1.110000000000e-14 1.160000000000e+01 5.806787402797e-05 0.000000000000e+00 -5.806787401637e-05 -1.160000000000e-14 1.210000000000e+01 5.822266160012e-05 0.000000000000e+00 -5.822266158802e-05 -1.210000000000e-14 1.260000000000e+01 5.837661172491e-05 0.000000000000e+00 -5.837661171231e-05 -1.260000000000e-14 1.310000000000e+01 5.852979252522e-05 0.000000000000e+00 -5.852979251212e-05 -1.310000000000e-14 1.360000000000e+01 5.868226476399e-05 0.000000000000e+00 -5.868226475039e-05 -1.360000000000e-14 1.410000000000e+01 5.883408290482e-05 0.000000000000e+00 -5.883408289072e-05 -1.410000000000e-14 1.460000000000e+01 5.898529598414e-05 0.000000000000e+00 -5.898529596954e-05 -1.460000000000e-14 1.510000000000e+01 5.913594833426e-05 0.000000000000e+00 -5.913594831916e-05 -1.510000000000e-14 1.560000000000e+01 5.928608018733e-05 0.000000000000e+00 -5.928608017173e-05 -1.560000000000e-14 1.610000000000e+01 5.943572818330e-05 0.000000000000e+00 -5.943572816720e-05 -1.610000000000e-14 1.660000000000e+01 5.958492579998e-05 0.000000000000e+00 -5.958492578338e-05 -1.660000000000e-14 1.710000000000e+01 5.973370371911e-05 0.000000000000e+00 -5.973370370201e-05 -1.710000000000e-14 1.760000000000e+01 5.988209013997e-05 0.000000000000e+00 -5.988209012237e-05 -1.760000000000e-14 1.810000000000e+01 6.003011104916e-05 0.000000000000e+00 -6.003011103106e-05 -1.810000000000e-14 1.860000000000e+01 6.017779045401e-05 0.000000000000e+00 -6.017779043541e-05 -1.860000000000e-14 1.910000000000e+01 6.032515058529e-05 0.000000000000e+00 -6.032515056619e-05 -1.910000000000e-14 1.960000000000e+01 6.047221207412e-05 0.000000000000e+00 -6.047221205452e-05 -1.960000000000e-14 2.010000000000e+01 6.061899410687e-05 0.000000000000e+00 -6.061899408677e-05 -2.010000000000e-14 2.060000000000e+01 6.076551456140e-05 0.000000000000e+00 -6.076551454080e-05 -2.060000000000e-14 2.110000000000e+01 6.091179012727e-05 0.000000000000e+00 -6.091179010617e-05 -2.110000000000e-14 2.160000000000e+01 6.105783641213e-05 0.000000000000e+00 -6.105783639053e-05 -2.160000000000e-14 2.210000000000e+01 6.120366803626e-05 0.000000000000e+00 -6.120366801416e-05 -2.210000000000e-14 2.260000000000e+01 6.134929871674e-05 0.000000000000e+00 -6.134929869414e-05 -2.260000000000e-14 2.310000000000e+01 6.149474134270e-05 0.000000000000e+00 -6.149474131960e-05 -2.310000000000e-14 2.360000000000e+01 6.164000804269e-05 0.000000000000e+00 -6.164000801909e-05 -2.360000000000e-14 2.410000000000e+01 6.178511024520e-05 0.000000000000e+00 -6.178511022110e-05 -2.410000000000e-14 2.460000000000e+01 6.193005873317e-05 0.000000000000e+00 -6.193005870857e-05 -2.460000000000e-14 2.510000000000e+01 6.207486369317e-05 0.000000000000e+00 -6.207486366807e-05 -2.510000000000e-14 2.560000000000e+01 6.221953475987e-05 0.000000000000e+00 -6.221953473427e-05 -2.560000000000e-14 2.610000000000e+01 6.236408105642e-05 0.000000000000e+00 -6.236408103032e-05 -2.610000000000e-14 2.660000000000e+01 6.250851123103e-05 0.000000000000e+00 -6.250851120443e-05 -2.660000000000e-14 2.710000000000e+01 6.265283349037e-05 0.000000000000e+00 -6.265283346327e-05 -2.710000000000e-14 2.760000000000e+01 6.279705562995e-05 0.000000000000e+00 -6.279705560235e-05 -2.760000000000e-14 2.810000000000e+01 6.294118506191e-05 0.000000000000e+00 -6.294118503381e-05 -2.810000000000e-14 2.860000000000e+01 6.308522884044e-05 0.000000000000e+00 -6.308522881184e-05 -2.860000000000e-14 2.910000000000e+01 6.322919368513e-05 0.000000000000e+00 -6.322919365603e-05 -2.910000000000e-14 2.960000000000e+01 6.337308600233e-05 0.000000000000e+00 -6.337308597273e-05 -2.960000000000e-14 3.010000000000e+01 6.351691190485e-05 0.000000000000e+00 -6.351691187475e-05 -3.010000000000e-14 1.000000000000e-01 4.890094671803e-06 0.000000000000e+00 -4.890094671703e-06 -1.000000000000e-16 6.000000000000e-01 2.923456099114e-05 0.000000000000e+00 -2.923456099054e-05 -6.000000000000e-16 1.100000000000e+00 5.340344090546e-05 0.000000000000e+00 -5.340344090436e-05 -1.100000000000e-15 1.600000000000e+00 7.739822278531e-05 0.000000000000e+00 -7.739822278371e-05 -1.600000000000e-15 2.100000000000e+00 1.012203644522e-04 0.000000000000e+00 -1.012203644501e-04 -2.100000000000e-15 2.600000000000e+00 1.248712934248e-04 0.000000000000e+00 -1.248712934222e-04 -2.600000000000e-15 3.100000000000e+00 1.483524067562e-04 0.000000000000e+00 -1.483524067531e-04 -3.100000000000e-15 3.600000000000e+00 1.716650705672e-04 0.000000000000e+00 -1.716650705636e-04 -3.600000000000e-15 4.100000000000e+00 1.948106195345e-04 0.000000000000e+00 -1.948106195304e-04 -4.100000000000e-15 4.600000000000e+00 2.177903563660e-04 0.000000000000e+00 -2.177903563614e-04 -4.600000000000e-15 5.100000000000e+00 2.406055512533e-04 0.000000000000e+00 -2.406055512482e-04 -5.100000000000e-15 5.600000000000e+00 2.632574412854e-04 0.000000000000e+00 -2.632574412798e-04 -5.600000000000e-15 6.100000000000e+00 2.857472298143e-04 0.000000000000e+00 -2.857472298082e-04 -6.100000000000e-15 6.600000000000e+00 3.080760857612e-04 0.000000000000e+00 -3.080760857546e-04 -6.600000000000e-15 7.100000000000e+00 3.302451428560e-04 0.000000000000e+00 -3.302451428489e-04 -7.100000000000e-15 7.600000000000e+00 3.522554988009e-04 0.000000000000e+00 -3.522554987933e-04 -7.600000000000e-15 8.100000000000e+00 3.741082143490e-04 0.000000000000e+00 -3.741082143409e-04 -8.100000000000e-15 8.600000000000e+00 3.958043122896e-04 0.000000000000e+00 -3.958043122810e-04 -8.600000000000e-15 9.100000000000e+00 4.173447763293e-04 0.000000000000e+00 -4.173447763202e-04 -9.100000000000e-15 9.600000000000e+00 4.387305498580e-04 0.000000000000e+00 -4.387305498484e-04 -9.600000000000e-15 1.010000000000e+01 4.599625345877e-04 0.000000000000e+00 -4.599625345776e-04 -1.010000000000e-14 1.060000000000e+01 4.810415890510e-04 0.000000000000e+00 -4.810415890404e-04 -1.060000000000e-14 1.110000000000e+01 5.019685269434e-04 0.000000000000e+00 -5.019685269323e-04 -1.110000000000e-14 1.160000000000e+01 5.227441152932e-04 0.000000000000e+00 -5.227441152816e-04 -1.160000000000e-14 1.210000000000e+01 5.433690724398e-04 0.000000000000e+00 -5.433690724277e-04 -1.210000000000e-14 1.260000000000e+01 5.638440657992e-04 0.000000000000e+00 -5.638440657866e-04 -1.260000000000e-14 1.310000000000e+01 5.841697093917e-04 0.000000000000e+00 -5.841697093786e-04 -1.310000000000e-14 1.360000000000e+01 6.043465611059e-04 0.000000000000e+00 -6.043465610923e-04 -1.360000000000e-14 1.410000000000e+01 6.243751196665e-04 0.000000000000e+00 -6.243751196524e-04 -1.410000000000e-14 1.460000000000e+01 6.442558212715e-04 0.000000000000e+00 -6.442558212569e-04 -1.460000000000e-14 1.510000000000e+01 6.639890358575e-04 0.000000000000e+00 -6.639890358424e-04 -1.510000000000e-14 1.560000000000e+01 6.835750629473e-04 0.000000000000e+00 -6.835750629317e-04 -1.560000000000e-14 1.610000000000e+01 7.030141195009e-04 0.000000000000e+00 -7.030141194848e-04 -1.610000000000e-14 1.660000000000e+01 7.223063640375e-04 0.000000000000e+00 -7.223063640209e-04 -1.660000000000e-14 1.710000000000e+01 7.414518481018e-04 0.000000000000e+00 -7.414518480847e-04 -1.710000000000e-14 1.760000000000e+01 7.604505376291e-04 0.000000000000e+00 -7.604505376115e-04 -1.760000000000e-14 1.810000000000e+01 7.793022989370e-04 0.000000000000e+00 -7.793022989189e-04 -1.810000000000e-14 1.860000000000e+01 7.980068906128e-04 0.000000000000e+00 -7.980068905942e-04 -1.860000000000e-14 1.910000000000e+01 8.165639543829e-04 0.000000000000e+00 -8.165639543638e-04 -1.910000000000e-14 1.960000000000e+01 8.349730048117e-04 0.000000000000e+00 -8.349730047921e-04 -1.960000000000e-14 2.010000000000e+01 8.532334176544e-04 0.000000000000e+00 -8.532334176343e-04 -2.010000000000e-14 2.060000000000e+01 8.713444166530e-04 0.000000000000e+00 -8.713444166324e-04 -2.060000000000e-14 2.110000000000e+01 8.893050585286e-04 0.000000000000e+00 -8.893050585075e-04 -2.110000000000e-14 2.160000000000e+01 9.071142158773e-04 0.000000000000e+00 -9.071142158557e-04 -2.160000000000e-14 2.210000000000e+01 9.247705576178e-04 0.000000000000e+00 -9.247705575957e-04 -2.210000000000e-14 2.260000000000e+01 9.422725265750e-04 0.000000000000e+00 -9.422725265524e-04 -2.260000000000e-14 2.310000000000e+01 9.596183136949e-04 0.000000000000e+00 -9.596183136718e-04 -2.310000000000e-14 2.360000000000e+01 9.768058282874e-04 0.000000000000e+00 -9.768058282638e-04 -2.360000000000e-14 2.410000000000e+01 9.938326635636e-04 0.000000000000e+00 -9.938326635395e-04 -2.410000000000e-14 2.460000000000e+01 1.010696056579e-03 0.000000000000e+00 -1.010696056554e-03 -2.460000000000e-14 2.510000000000e+01 1.027392841497e-03 0.000000000000e+00 -1.027392841472e-03 -2.510000000000e-14 2.560000000000e+01 1.043919394843e-03 0.000000000000e+00 -1.043919394817e-03 -2.560000000000e-14 2.610000000000e+01 1.060271571115e-03 0.000000000000e+00 -1.060271571089e-03 -2.610000000000e-14 2.660000000000e+01 1.076444626732e-03 0.000000000000e+00 -1.076444626706e-03 -2.660000000000e-14 2.710000000000e+01 1.092433129810e-03 0.000000000000e+00 -1.092433129782e-03 -2.710000000000e-14 2.760000000000e+01 1.108230852651e-03 0.000000000000e+00 -1.108230852624e-03 -2.760000000000e-14 2.810000000000e+01 1.123830643054e-03 0.000000000000e+00 -1.123830643026e-03 -2.810000000000e-14 2.860000000000e+01 1.139224269542e-03 0.000000000000e+00 -1.139224269513e-03 -2.860000000000e-14 2.910000000000e+01 1.154402234385e-03 0.000000000000e+00 -1.154402234356e-03 -2.910000000000e-14 2.960000000000e+01 1.169353546691e-03 0.000000000000e+00 -1.169353546661e-03 -2.960000000000e-14 3.010000000000e+01 1.184065445833e-03 0.000000000000e+00 -1.184065445803e-03 -3.010000000000e-14 1.000000000000e-01 4.960949150454e-06 0.000000000000e+00 -4.960949150354e-06 -1.000000000000e-16 6.000000000000e-01 2.965933971883e-05 0.000000000000e+00 -2.965933971823e-05 -6.000000000000e-16 1.100000000000e+00 5.418182204080e-05 0.000000000000e+00 -5.418182203970e-05 -1.100000000000e-15 1.600000000000e+00 7.853023845497e-05 0.000000000000e+00 -7.853023845337e-05 -1.600000000000e-15 2.100000000000e+00 1.027064032696e-04 0.000000000000e+00 -1.027064032675e-04 -2.100000000000e-15 2.600000000000e+00 1.267121045022e-04 0.000000000000e+00 -1.267121044996e-04 -2.600000000000e-15 3.100000000000e+00 1.505491043687e-04 0.000000000000e+00 -1.505491043656e-04 -3.100000000000e-15 3.600000000000e+00 1.742191397377e-04 0.000000000000e+00 -1.742191397342e-04 -3.600000000000e-15 4.100000000000e+00 1.977239225773e-04 0.000000000000e+00 -1.977239225732e-04 -4.100000000000e-15 4.600000000000e+00 2.210651403916e-04 0.000000000000e+00 -2.210651403870e-04 -4.600000000000e-15 5.100000000000e+00 2.442444566481e-04 0.000000000000e+00 -2.442444566430e-04 -5.100000000000e-15 5.600000000000e+00 2.672635111936e-04 0.000000000000e+00 -2.672635111880e-04 -5.600000000000e-15 6.100000000000e+00 2.901239206614e-04 0.000000000000e+00 -2.901239206553e-04 -6.100000000000e-15 6.600000000000e+00 3.128272788700e-04 0.000000000000e+00 -3.128272788634e-04 -6.600000000000e-15 7.100000000000e+00 3.353751572135e-04 0.000000000000e+00 -3.353751572064e-04 -7.100000000000e-15 7.600000000000e+00 3.577691050436e-04 0.000000000000e+00 -3.577691050360e-04 -7.600000000000e-15 8.100000000000e+00 3.800106500448e-04 0.000000000000e+00 -3.800106500367e-04 -8.100000000000e-15 8.600000000000e+00 4.021012986010e-04 0.000000000000e+00 -4.021012985924e-04 -8.600000000000e-15 9.100000000000e+00 4.240425361554e-04 0.000000000000e+00 -4.240425361463e-04 -9.100000000000e-15 9.600000000000e+00 4.458358275632e-04 0.000000000000e+00 -4.458358275536e-04 -9.600000000000e-15 1.010000000000e+01 4.674826174369e-04 0.000000000000e+00 -4.674826174268e-04 -1.010000000000e-14 1.060000000000e+01 4.889843304845e-04 0.000000000000e+00 -4.889843304739e-04 -1.060000000000e-14 1.110000000000e+01 5.103423718419e-04 0.000000000000e+00 -5.103423718308e-04 -1.110000000000e-14 1.160000000000e+01 5.315581273977e-04 0.000000000000e+00 -5.315581273861e-04 -1.160000000000e-14 1.210000000000e+01 5.526329641121e-04 0.000000000000e+00 -5.526329641000e-04 -1.210000000000e-14 1.260000000000e+01 5.735682303296e-04 0.000000000000e+00 -5.735682303170e-04 -1.260000000000e-14 1.310000000000e+01 5.943652560851e-04 0.000000000000e+00 -5.943652560720e-04 -1.310000000000e-14 1.360000000000e+01 6.150253534048e-04 0.000000000000e+00 -6.150253533912e-04 -1.360000000000e-14 1.410000000000e+01 6.355498166004e-04 0.000000000000e+00 -6.355498165863e-04 -1.410000000000e-14 1.460000000000e+01 6.559399225584e-04 0.000000000000e+00 -6.559399225438e-04 -1.460000000000e-14 1.510000000000e+01 6.761969310231e-04 0.000000000000e+00 -6.761969310080e-04 -1.510000000000e-14 1.560000000000e+01 6.963220848749e-04 0.000000000000e+00 -6.963220848593e-04 -1.560000000000e-14 1.610000000000e+01 7.163166104028e-04 0.000000000000e+00 -7.163166103867e-04 -1.610000000000e-14 1.660000000000e+01 7.361817175722e-04 0.000000000000e+00 -7.361817175556e-04 -1.660000000000e-14 1.710000000000e+01 7.559186002869e-04 0.000000000000e+00 -7.559186002698e-04 -1.710000000000e-14 1.760000000000e+01 7.755284366472e-04 0.000000000000e+00 -7.755284366296e-04 -1.760000000000e-14 1.810000000000e+01 7.950123892025e-04 0.000000000000e+00 -7.950123891844e-04 -1.810000000000e-14 1.860000000000e+01 8.143716051990e-04 0.000000000000e+00 -8.143716051804e-04 -1.860000000000e-14 1.910000000000e+01 8.336072168240e-04 0.000000000000e+00 -8.336072168049e-04 -1.910000000000e-14 1.960000000000e+01 8.527203414443e-04 0.000000000000e+00 -8.527203414247e-04 -1.960000000000e-14 2.010000000000e+01 8.717120818413e-04 0.000000000000e+00 -8.717120818212e-04 -2.010000000000e-14 2.060000000000e+01 8.905835264412e-04 0.000000000000e+00 -8.905835264206e-04 -2.060000000000e-14 2.110000000000e+01 9.093357495416e-04 0.000000000000e+00 -9.093357495205e-04 -2.110000000000e-14 2.160000000000e+01 9.279698115336e-04 0.000000000000e+00 -9.279698115120e-04 -2.160000000000e-14 2.210000000000e+01 9.464867591200e-04 0.000000000000e+00 -9.464867590979e-04 -2.210000000000e-14 2.260000000000e+01 9.648876255300e-04 0.000000000000e+00 -9.648876255074e-04 -2.260000000000e-14 2.310000000000e+01 9.831734307295e-04 0.000000000000e+00 -9.831734307064e-04 -2.310000000000e-14 2.360000000000e+01 1.001345181629e-03 0.000000000000e+00 -1.001345181605e-03 -2.360000000000e-14 2.410000000000e+01 1.019403872284e-03 0.000000000000e+00 -1.019403872260e-03 -2.410000000000e-14 2.460000000000e+01 1.037350484101e-03 0.000000000000e+00 -1.037350484077e-03 -2.460000000000e-14 2.510000000000e+01 1.055185986027e-03 0.000000000000e+00 -1.055185986002e-03 -2.510000000000e-14 2.560000000000e+01 1.072911334747e-03 0.000000000000e+00 -1.072911334721e-03 -2.560000000000e-14 2.610000000000e+01 1.090527474871e-03 0.000000000000e+00 -1.090527474844e-03 -2.610000000000e-14 2.660000000000e+01 1.108035339123e-03 0.000000000000e+00 -1.108035339096e-03 -2.660000000000e-14 2.710000000000e+01 1.125435848524e-03 0.000000000000e+00 -1.125435848497e-03 -2.710000000000e-14 2.760000000000e+01 1.142729912571e-03 0.000000000000e+00 -1.142729912543e-03 -2.760000000000e-14 2.810000000000e+01 1.159918429415e-03 0.000000000000e+00 -1.159918429387e-03 -2.810000000000e-14 2.860000000000e+01 1.177002286036e-03 0.000000000000e+00 -1.177002286007e-03 -2.860000000000e-14 2.910000000000e+01 1.193982358413e-03 0.000000000000e+00 -1.193982358384e-03 -2.910000000000e-14 2.960000000000e+01 1.210859511695e-03 0.000000000000e+00 -1.210859511665e-03 -2.960000000000e-14 3.010000000000e+01 1.227634600366e-03 0.000000000000e+00 -1.227634600335e-03 -3.010000000000e-14 1.000000000000e-01 4.255732136928e-06 0.000000000000e+00 -4.255732136828e-06 -1.000000000000e-16 6.000000000000e-01 2.447904399544e-05 0.000000000000e+00 -2.447904399484e-05 -6.000000000000e-16 1.100000000000e+00 3.841151421086e-05 0.000000000000e+00 -3.841151420976e-05 -1.100000000000e-15 1.600000000000e+00 3.885321608352e-05 0.000000000000e+00 -3.885321608192e-05 -1.600000000000e-15 2.100000000000e+00 3.909121462989e-05 0.000000000000e+00 -3.909121462779e-05 -2.100000000000e-15 2.600000000000e+00 3.929327424811e-05 0.000000000000e+00 -3.929327424551e-05 -2.600000000000e-15 3.100000000000e+00 3.947924895142e-05 0.000000000000e+00 -3.947924894832e-05 -3.100000000000e-15 3.600000000000e+00 3.965562893230e-05 0.000000000000e+00 -3.965562892870e-05 -3.600000000000e-15 4.100000000000e+00 3.982543345151e-05 0.000000000000e+00 -3.982543344741e-05 -4.100000000000e-15 4.600000000000e+00 3.999037282913e-05 0.000000000000e+00 -3.999037282453e-05 -4.600000000000e-15 5.100000000000e+00 4.015153496069e-05 0.000000000000e+00 -4.015153495559e-05 -5.100000000000e-15 5.600000000000e+00 4.030966571888e-05 0.000000000000e+00 -4.030966571328e-05 -5.600000000000e-15 6.100000000000e+00 4.046530403622e-05 0.000000000000e+00 -4.046530403012e-05 -6.100000000000e-15 6.600000000000e+00 4.061885478310e-05 0.000000000000e+00 -4.061885477650e-05 -6.600000000000e-15 7.100000000000e+00 4.077063143215e-05 0.000000000000e+00 -4.077063142505e-05 -7.100000000000e-15 7.600000000000e+00 4.092088262158e-05 0.000000000000e+00 -4.092088261398e-05 -7.600000000000e-15 8.100000000000e+00 4.106980950965e-05 0.000000000000e+00 -4.106980950155e-05 -8.100000000000e-15 8.600000000000e+00 4.121757756096e-05 0.000000000000e+00 -4.121757755236e-05 -8.600000000000e-15 9.100000000000e+00 4.136432481120e-05 0.000000000000e+00 -4.136432480210e-05 -9.100000000000e-15 9.600000000000e+00 4.151016782016e-05 0.000000000000e+00 -4.151016781056e-05 -9.600000000000e-15 1.010000000000e+01 4.165520605903e-05 0.000000000000e+00 -4.165520604893e-05 -1.010000000000e-14 1.060000000000e+01 4.179952520854e-05 0.000000000000e+00 -4.179952519794e-05 -1.060000000000e-14 1.110000000000e+01 4.194319968148e-05 0.000000000000e+00 -4.194319967038e-05 -1.110000000000e-14 1.160000000000e+01 4.208629458193e-05 0.000000000000e+00 -4.208629457033e-05 -1.160000000000e-14 1.210000000000e+01 4.222886724749e-05 0.000000000000e+00 -4.222886723539e-05 -1.210000000000e-14 1.260000000000e+01 4.237096847845e-05 0.000000000000e+00 -4.237096846585e-05 -1.260000000000e-14 1.310000000000e+01 4.251264352793e-05 0.000000000000e+00 -4.251264351483e-05 -1.310000000000e-14 1.360000000000e+01 4.265393290769e-05 0.000000000000e+00 -4.265393289409e-05 -1.360000000000e-14 1.410000000000e+01 4.279487304970e-05 0.000000000000e+00 -4.279487303560e-05 -1.410000000000e-14 1.460000000000e+01 4.293549685394e-05 0.000000000000e+00 -4.293549683934e-05 -1.460000000000e-14 1.510000000000e+01 4.307583414529e-05 0.000000000000e+00 -4.307583413019e-05 -1.510000000000e-14 1.560000000000e+01 4.321591205749e-05 0.000000000000e+00 -4.321591204189e-05 -1.560000000000e-14 1.610000000000e+01 4.335575535762e-05 0.000000000000e+00 -4.335575534152e-05 -1.610000000000e-14 1.660000000000e+01 4.349538672230e-05 0.000000000000e+00 -4.349538670570e-05 -1.660000000000e-14 1.710000000000e+01 4.363482697378e-05 0.000000000000e+00 -4.363482695668e-05 -1.710000000000e-14 1.760000000000e+01 4.377409528305e-05 0.000000000000e+00 -4.377409526545e-05 -1.760000000000e-14 1.810000000000e+01 4.391320934528e-05 0.000000000000e+00 -4.391320932718e-05 -1.810000000000e-14 1.860000000000e+01 4.405218553210e-05 0.000000000000e+00 -4.405218551350e-05 -1.860000000000e-14 1.910000000000e+01 4.419103902440e-05 0.000000000000e+00 -4.419103900530e-05 -1.910000000000e-14 1.960000000000e+01 4.432978392846e-05 0.000000000000e+00 -4.432978390886e-05 -1.960000000000e-14 2.010000000000e+01 4.446843337806e-05 0.000000000000e+00 -4.446843335796e-05 -2.010000000000e-14 2.060000000000e+01 4.460699962447e-05 0.000000000000e+00 -4.460699960387e-05 -2.060000000000e-14 2.110000000000e+01 4.474549411606e-05 0.000000000000e+00 -4.474549409496e-05 -2.110000000000e-14 2.160000000000e+01 4.488392756899e-05 0.000000000000e+00 -4.488392754739e-05 -2.160000000000e-14 2.210000000000e+01 4.502231003008e-05 0.000000000000e+00 -4.502231000798e-05 -2.210000000000e-14 2.260000000000e+01 4.516065093300e-05 0.000000000000e+00 -4.516065091040e-05 -2.260000000000e-14 2.310000000000e+01 4.529895914852e-05 0.000000000000e+00 -4.529895912542e-05 -2.310000000000e-14 2.360000000000e+01 4.543724302968e-05 0.000000000000e+00 -4.543724300608e-05 -2.360000000000e-14 2.410000000000e+01 4.557551045236e-05 0.000000000000e+00 -4.557551042826e-05 -2.410000000000e-14 2.460000000000e+01 4.571376885193e-05 0.000000000000e+00 -4.571376882733e-05 -2.460000000000e-14 2.510000000000e+01 4.585202525636e-05 0.000000000000e+00 -4.585202523126e-05 -2.510000000000e-14 2.560000000000e+01 4.599028631621e-05 0.000000000000e+00 -4.599028629061e-05 -2.560000000000e-14 2.610000000000e+01 4.612855833188e-05 0.000000000000e+00 -4.612855830578e-05 -2.610000000000e-14 2.660000000000e+01 4.626684727837e-05 0.000000000000e+00 -4.626684725177e-05 -2.660000000000e-14 2.710000000000e+01 4.640515882789e-05 0.000000000000e+00 -4.640515880079e-05 -2.710000000000e-14 2.760000000000e+01 4.654349837044e-05 0.000000000000e+00 -4.654349834284e-05 -2.760000000000e-14 2.810000000000e+01 4.668187103271e-05 0.000000000000e+00 -4.668187100461e-05 -2.810000000000e-14 2.860000000000e+01 4.682028169533e-05 0.000000000000e+00 -4.682028166673e-05 -2.860000000000e-14 2.910000000000e+01 4.695873500876e-05 0.000000000000e+00 -4.695873497966e-05 -2.910000000000e-14 2.960000000000e+01 4.709723540785e-05 0.000000000000e+00 -4.709723537825e-05 -2.960000000000e-14 3.010000000000e+01 4.723578712526e-05 0.000000000000e+00 -4.723578709516e-05 -3.010000000000e-14 1.000000000000e-01 4.930280015106e-06 0.000000000000e+00 -4.930280015006e-06 -1.000000000000e-16 6.000000000000e-01 2.947535036173e-05 0.000000000000e+00 -2.947535036113e-05 -6.000000000000e-16 1.100000000000e+00 5.384440613272e-05 0.000000000000e+00 -5.384440613162e-05 -1.100000000000e-15 1.600000000000e+00 7.803908473985e-05 0.000000000000e+00 -7.803908473825e-05 -1.600000000000e-15 2.100000000000e+00 1.020609930438e-04 0.000000000000e+00 -1.020609930417e-04 -2.100000000000e-15 2.600000000000e+00 1.259117081563e-04 0.000000000000e+00 -1.259117081537e-04 -2.600000000000e-15 3.100000000000e+00 1.495927776926e-04 0.000000000000e+00 -1.495927776895e-04 -3.100000000000e-15 3.600000000000e+00 1.731057198824e-04 0.000000000000e+00 -1.731057198788e-04 -3.600000000000e-15 4.100000000000e+00 1.964520236276e-04 0.000000000000e+00 -1.964520236235e-04 -4.100000000000e-15 4.600000000000e+00 2.196331485167e-04 0.000000000000e+00 -2.196331485121e-04 -4.600000000000e-15 5.100000000000e+00 2.426505248110e-04 0.000000000000e+00 -2.426505248059e-04 -5.100000000000e-15 5.600000000000e+00 2.655055534039e-04 0.000000000000e+00 -2.655055533983e-04 -5.600000000000e-15 6.100000000000e+00 2.881996057544e-04 0.000000000000e+00 -2.881996057483e-04 -6.100000000000e-15 6.600000000000e+00 3.107340237911e-04 0.000000000000e+00 -3.107340237845e-04 -6.600000000000e-15 7.100000000000e+00 3.331101197848e-04 0.000000000000e+00 -3.331101197777e-04 -7.100000000000e-15 7.600000000000e+00 3.553291761860e-04 0.000000000000e+00 -3.553291761784e-04 -7.600000000000e-15 8.100000000000e+00 3.773924454261e-04 0.000000000000e+00 -3.773924454180e-04 -8.100000000000e-15 8.600000000000e+00 3.993011496788e-04 0.000000000000e+00 -3.993011496702e-04 -8.600000000000e-15 9.100000000000e+00 4.210564805787e-04 0.000000000000e+00 -4.210564805696e-04 -9.100000000000e-15 9.600000000000e+00 4.426595988951e-04 0.000000000000e+00 -4.426595988855e-04 -9.600000000000e-15 1.010000000000e+01 4.641116341566e-04 0.000000000000e+00 -4.641116341465e-04 -1.010000000000e-14 1.060000000000e+01 4.854136842245e-04 0.000000000000e+00 -4.854136842139e-04 -1.060000000000e-14 1.110000000000e+01 5.065668148093e-04 0.000000000000e+00 -5.065668147982e-04 -1.110000000000e-14 1.160000000000e+01 5.275720589273e-04 0.000000000000e+00 -5.275720589157e-04 -1.160000000000e-14 1.210000000000e+01 5.484304162935e-04 0.000000000000e+00 -5.484304162814e-04 -1.210000000000e-14 1.260000000000e+01 5.691428526428e-04 0.000000000000e+00 -5.691428526302e-04 -1.260000000000e-14 1.310000000000e+01 5.897102989776e-04 0.000000000000e+00 -5.897102989645e-04 -1.310000000000e-14 1.360000000000e+01 6.101336507325e-04 0.000000000000e+00 -6.101336507189e-04 -1.360000000000e-14 1.410000000000e+01 6.304137668511e-04 0.000000000000e+00 -6.304137668370e-04 -1.410000000000e-14 1.460000000000e+01 6.505514687663e-04 0.000000000000e+00 -6.505514687517e-04 -1.460000000000e-14 1.510000000000e+01 6.705475392761e-04 0.000000000000e+00 -6.705475392610e-04 -1.510000000000e-14 1.560000000000e+01 6.904027213050e-04 0.000000000000e+00 -6.904027212894e-04 -1.560000000000e-14 1.610000000000e+01 7.101177165413e-04 0.000000000000e+00 -7.101177165252e-04 -1.610000000000e-14 1.660000000000e+01 7.296931839374e-04 0.000000000000e+00 -7.296931839208e-04 -1.660000000000e-14 1.710000000000e+01 7.491297380608e-04 0.000000000000e+00 -7.491297380437e-04 -1.710000000000e-14 1.760000000000e+01 7.684279472808e-04 0.000000000000e+00 -7.684279472632e-04 -1.760000000000e-14 1.810000000000e+01 7.875883317743e-04 0.000000000000e+00 -7.875883317562e-04 -1.810000000000e-14 1.860000000000e+01 8.066113613321e-04 0.000000000000e+00 -8.066113613135e-04 -1.860000000000e-14 1.910000000000e+01 8.254974529451e-04 0.000000000000e+00 -8.254974529260e-04 -1.910000000000e-14 1.960000000000e+01 8.442469681466e-04 0.000000000000e+00 -8.442469681270e-04 -1.960000000000e-14 2.010000000000e+01 8.628602100830e-04 0.000000000000e+00 -8.628602100629e-04 -2.010000000000e-14 2.060000000000e+01 8.813374202853e-04 0.000000000000e+00 -8.813374202647e-04 -2.060000000000e-14 2.110000000000e+01 8.996787659706e-04 0.000000000000e+00 -8.996787659495e-04 -2.110000000000e-14 2.160000000000e+01 9.178843717656e-04 0.000000000000e+00 -9.178843717440e-04 -2.160000000000e-14 2.210000000000e+01 9.359542630739e-04 0.000000000000e+00 -9.359542630518e-04 -2.210000000000e-14 2.260000000000e+01 9.538883953374e-04 0.000000000000e+00 -9.538883953148e-04 -2.260000000000e-14 2.310000000000e+01 9.716866403406e-04 0.000000000000e+00 -9.716866403175e-04 -2.310000000000e-14 2.360000000000e+01 9.893487802633e-04 0.000000000000e+00 -9.893487802397e-04 -2.360000000000e-14 2.410000000000e+01 1.006874501063e-03 0.000000000000e+00 -1.006874501039e-03 -2.410000000000e-14 2.460000000000e+01 1.024263385100e-03 0.000000000000e+00 -1.024263385075e-03 -2.460000000000e-14 2.510000000000e+01 1.041514902903e-03 0.000000000000e+00 -1.041514902878e-03 -2.510000000000e-14 2.560000000000e+01 1.058628403961e-03 0.000000000000e+00 -1.058628403935e-03 -2.560000000000e-14 2.610000000000e+01 1.075603106397e-03 0.000000000000e+00 -1.075603106371e-03 -2.610000000000e-14 2.660000000000e+01 1.092438085379e-03 0.000000000000e+00 -1.092438085352e-03 -2.660000000000e-14 2.710000000000e+01 1.109132260077e-03 0.000000000000e+00 -1.109132260050e-03 -2.710000000000e-14 2.760000000000e+01 1.125684378949e-03 0.000000000000e+00 -1.125684378921e-03 -2.760000000000e-14 2.810000000000e+01 1.142093003116e-03 0.000000000000e+00 -1.142093003088e-03 -2.810000000000e-14 2.860000000000e+01 1.158356487529e-03 0.000000000000e+00 -1.158356487501e-03 -2.860000000000e-14 2.910000000000e+01 1.174472959580e-03 0.000000000000e+00 -1.174472959551e-03 -2.910000000000e-14 2.960000000000e+01 1.190440294764e-03 0.000000000000e+00 -1.190440294734e-03 -2.960000000000e-14 3.010000000000e+01 1.206256088913e-03 0.000000000000e+00 -1.206256088883e-03 -3.010000000000e-14 1.000000000000e-01 4.982495717221e-06 0.000000000000e+00 -4.982495717121e-06 -1.000000000000e-16 6.000000000000e-01 2.978783587228e-05 0.000000000000e+00 -2.978783587168e-05 -6.000000000000e-16 1.100000000000e+00 5.441598487018e-05 0.000000000000e+00 -5.441598486908e-05 -1.100000000000e-15 1.600000000000e+00 7.886881529784e-05 0.000000000000e+00 -7.886881529624e-05 -1.600000000000e-15 2.100000000000e+00 1.031481710077e-04 0.000000000000e+00 -1.031481710056e-04 -2.100000000000e-15 2.600000000000e+00 1.272558688514e-04 0.000000000000e+00 -1.272558688488e-04 -2.600000000000e-15 3.100000000000e+00 1.511936991912e-04 0.000000000000e+00 -1.511936991881e-04 -3.100000000000e-15 3.600000000000e+00 1.749634263595e-04 0.000000000000e+00 -1.749634263559e-04 -3.600000000000e-15 4.100000000000e+00 1.985667891094e-04 0.000000000000e+00 -1.985667891053e-04 -4.100000000000e-15 4.600000000000e+00 2.220055010587e-04 0.000000000000e+00 -2.220055010541e-04 -4.600000000000e-15 5.100000000000e+00 2.452812511237e-04 0.000000000000e+00 -2.452812511186e-04 -5.100000000000e-15 5.600000000000e+00 2.683957039462e-04 0.000000000000e+00 -2.683957039406e-04 -5.600000000000e-15 6.100000000000e+00 2.913505003113e-04 0.000000000000e+00 -2.913505003052e-04 -6.100000000000e-15 6.600000000000e+00 3.141472575568e-04 0.000000000000e+00 -3.141472575502e-04 -6.600000000000e-15 7.100000000000e+00 3.367875699749e-04 0.000000000000e+00 -3.367875699678e-04 -7.100000000000e-15 7.600000000000e+00 3.592730092047e-04 0.000000000000e+00 -3.592730091971e-04 -7.600000000000e-15 8.100000000000e+00 3.816051246186e-04 0.000000000000e+00 -3.816051246105e-04 -8.100000000000e-15 8.600000000000e+00 4.037854436993e-04 0.000000000000e+00 -4.037854436907e-04 -8.600000000000e-15 9.100000000000e+00 4.258154724112e-04 0.000000000000e+00 -4.258154724021e-04 -9.100000000000e-15 9.600000000000e+00 4.476966955631e-04 0.000000000000e+00 -4.476966955535e-04 -9.600000000000e-15 1.010000000000e+01 4.694305771648e-04 0.000000000000e+00 -4.694305771547e-04 -1.010000000000e-14 1.060000000000e+01 4.910185607771e-04 0.000000000000e+00 -4.910185607665e-04 -1.060000000000e-14 1.110000000000e+01 5.124620698537e-04 0.000000000000e+00 -5.124620698426e-04 -1.110000000000e-14 1.160000000000e+01 5.337625080788e-04 0.000000000000e+00 -5.337625080672e-04 -1.160000000000e-14 1.210000000000e+01 5.549212596959e-04 0.000000000000e+00 -5.549212596838e-04 -1.210000000000e-14 1.260000000000e+01 5.759396898327e-04 0.000000000000e+00 -5.759396898201e-04 -1.260000000000e-14 1.310000000000e+01 5.968191448180e-04 0.000000000000e+00 -5.968191448049e-04 -1.310000000000e-14 1.360000000000e+01 6.175609524942e-04 0.000000000000e+00 -6.175609524806e-04 -1.360000000000e-14 1.410000000000e+01 6.381664225228e-04 0.000000000000e+00 -6.381664225087e-04 -1.410000000000e-14 1.460000000000e+01 6.586368466856e-04 0.000000000000e+00 -6.586368466710e-04 -1.460000000000e-14 1.510000000000e+01 6.789734991788e-04 0.000000000000e+00 -6.789734991637e-04 -1.510000000000e-14 1.560000000000e+01 6.991776369035e-04 0.000000000000e+00 -6.991776368879e-04 -1.560000000000e-14 1.610000000000e+01 7.192504997495e-04 0.000000000000e+00 -7.192504997334e-04 -1.610000000000e-14 1.660000000000e+01 7.391933108749e-04 0.000000000000e+00 -7.391933108583e-04 -1.660000000000e-14 1.710000000000e+01 7.590072769805e-04 0.000000000000e+00 -7.590072769634e-04 -1.710000000000e-14 1.760000000000e+01 7.786935885792e-04 0.000000000000e+00 -7.786935885616e-04 -1.760000000000e-14 1.810000000000e+01 7.982534202610e-04 0.000000000000e+00 -7.982534202429e-04 -1.810000000000e-14 1.860000000000e+01 8.176879309532e-04 0.000000000000e+00 -8.176879309346e-04 -1.860000000000e-14 1.910000000000e+01 8.369982641759e-04 0.000000000000e+00 -8.369982641568e-04 -1.910000000000e-14 1.960000000000e+01 8.561855482938e-04 0.000000000000e+00 -8.561855482742e-04 -1.960000000000e-14 2.010000000000e+01 8.752508967630e-04 0.000000000000e+00 -8.752508967429e-04 -2.010000000000e-14 2.060000000000e+01 8.941954083740e-04 0.000000000000e+00 -8.941954083534e-04 -2.060000000000e-14 2.110000000000e+01 9.130201674907e-04 0.000000000000e+00 -9.130201674696e-04 -2.110000000000e-14 2.160000000000e+01 9.317262442853e-04 0.000000000000e+00 -9.317262442637e-04 -2.160000000000e-14 2.210000000000e+01 9.503146949691e-04 0.000000000000e+00 -9.503146949470e-04 -2.210000000000e-14 2.260000000000e+01 9.687865620204e-04 0.000000000000e+00 -9.687865619978e-04 -2.260000000000e-14 2.310000000000e+01 9.871428744075e-04 0.000000000000e+00 -9.871428743844e-04 -2.310000000000e-14 2.360000000000e+01 1.005384647809e-03 0.000000000000e+00 -1.005384647785e-03 -2.360000000000e-14 2.410000000000e+01 1.023512884830e-03 0.000000000000e+00 -1.023512884805e-03 -2.410000000000e-14 2.460000000000e+01 1.041528575215e-03 0.000000000000e+00 -1.041528575190e-03 -2.460000000000e-14 2.510000000000e+01 1.059432696058e-03 0.000000000000e+00 -1.059432696033e-03 -2.510000000000e-14 2.560000000000e+01 1.077226212011e-03 0.000000000000e+00 -1.077226211985e-03 -2.560000000000e-14 2.610000000000e+01 1.094910075481e-03 0.000000000000e+00 -1.094910075455e-03 -2.610000000000e-14 2.660000000000e+01 1.112485226835e-03 0.000000000000e+00 -1.112485226809e-03 -2.660000000000e-14 2.710000000000e+01 1.129952594598e-03 0.000000000000e+00 -1.129952594571e-03 -2.710000000000e-14 2.760000000000e+01 1.147313095642e-03 0.000000000000e+00 -1.147313095614e-03 -2.760000000000e-14 2.810000000000e+01 1.164567635378e-03 0.000000000000e+00 -1.164567635350e-03 -2.810000000000e-14 2.860000000000e+01 1.181717107949e-03 0.000000000000e+00 -1.181717107921e-03 -2.860000000000e-14 2.910000000000e+01 1.198762396408e-03 0.000000000000e+00 -1.198762396379e-03 -2.910000000000e-14 2.960000000000e+01 1.215704372903e-03 0.000000000000e+00 -1.215704372874e-03 -2.960000000000e-14 3.010000000000e+01 1.232543898859e-03 0.000000000000e+00 -1.232543898829e-03 -3.010000000000e-14 1.000000000000e-01 4.281553714303e-06 0.000000000000e+00 -4.281553714203e-06 -1.000000000000e-16 6.000000000000e-01 2.523351937928e-05 0.000000000000e+00 -2.523351937868e-05 -6.000000000000e-16 1.100000000000e+00 4.511355008280e-05 0.000000000000e+00 -4.511355008170e-05 -1.100000000000e-15 1.600000000000e+00 6.301786323967e-05 0.000000000000e+00 -6.301786323807e-05 -1.600000000000e-15 2.100000000000e+00 7.575844788371e-05 0.000000000000e+00 -7.575844788161e-05 -2.100000000000e-15 2.600000000000e+00 7.784751040455e-05 0.000000000000e+00 -7.784751040195e-05 -2.600000000000e-15 3.100000000000e+00 7.818978648324e-05 0.000000000000e+00 -7.818978648014e-05 -3.100000000000e-15 3.600000000000e+00 7.846938710399e-05 0.000000000000e+00 -7.846938710039e-05 -3.600000000000e-15 4.100000000000e+00 7.871897698568e-05 0.000000000000e+00 -7.871897698158e-05 -4.100000000000e-15 4.600000000000e+00 7.895004496222e-05 0.000000000000e+00 -7.895004495762e-05 -4.600000000000e-15 5.100000000000e+00 7.916825791063e-05 0.000000000000e+00 -7.916825790553e-05 -5.100000000000e-15 5.600000000000e+00 7.937689027043e-05 0.000000000000e+00 -7.937689026483e-05 -5.600000000000e-15 6.100000000000e+00 7.957803481048e-05 0.000000000000e+00 -7.957803480438e-05 -6.100000000000e-15 6.600000000000e+00 7.977312528331e-05 0.000000000000e+00 -7.977312527671e-05 -6.600000000000e-15 7.100000000000e+00 7.996319495558e-05 0.000000000000e+00 -7.996319494848e-05 -7.100000000000e-15 7.600000000000e+00 8.014901771176e-05 0.000000000000e+00 -8.014901770416e-05 -7.600000000000e-15 8.100000000000e+00 8.033119099321e-05 0.000000000000e+00 -8.033119098511e-05 -8.100000000000e-15 8.600000000000e+00 8.051018744791e-05 0.000000000000e+00 -8.051018743931e-05 -8.600000000000e-15 9.100000000000e+00 8.068638861829e-05 0.000000000000e+00 -8.068638860919e-05 -9.100000000000e-15 9.600000000000e+00 8.086010776222e-05 0.000000000000e+00 -8.086010775262e-05 -9.600000000000e-15 1.010000000000e+01 8.103160580937e-05 0.000000000000e+00 -8.103160579927e-05 -1.010000000000e-14 1.060000000000e+01 8.120110282067e-05 0.000000000000e+00 -8.120110281007e-05 -1.060000000000e-14 1.110000000000e+01 8.136878640986e-05 0.000000000000e+00 -8.136878639876e-05 -1.110000000000e-14 1.160000000000e+01 8.153481805741e-05 0.000000000000e+00 -8.153481804581e-05 -1.160000000000e-14 1.210000000000e+01 8.169933792769e-05 0.000000000000e+00 -8.169933791559e-05 -1.210000000000e-14 1.260000000000e+01 8.186246860179e-05 0.000000000000e+00 -8.186246858919e-05 -1.260000000000e-14 1.310000000000e+01 8.202431801003e-05 0.000000000000e+00 -8.202431799693e-05 -1.310000000000e-14 1.360000000000e+01 8.218498176448e-05 0.000000000000e+00 -8.218498175088e-05 -1.360000000000e-14 1.410000000000e+01 8.234454503505e-05 0.000000000000e+00 -8.234454502094e-05 -1.410000000000e-14 1.460000000000e+01 8.250308407366e-05 0.000000000000e+00 -8.250308405906e-05 -1.460000000000e-14 1.510000000000e+01 8.266066746414e-05 0.000000000000e+00 -8.266066744904e-05 -1.510000000000e-14 1.560000000000e+01 8.281735715567e-05 0.000000000000e+00 -8.281735714007e-05 -1.560000000000e-14 1.610000000000e+01 8.297320932395e-05 0.000000000000e+00 -8.297320930785e-05 -1.610000000000e-14 1.660000000000e+01 8.312827509402e-05 0.000000000000e+00 -8.312827507742e-05 -1.660000000000e-14 1.710000000000e+01 8.328260115079e-05 0.000000000000e+00 -8.328260113369e-05 -1.710000000000e-14 1.760000000000e+01 8.343623025803e-05 0.000000000000e+00 -8.343623024043e-05 -1.760000000000e-14 1.810000000000e+01 8.358920170193e-05 0.000000000000e+00 -8.358920168383e-05 -1.810000000000e-14 1.860000000000e+01 8.374155167235e-05 0.000000000000e+00 -8.374155165375e-05 -1.860000000000e-14 1.910000000000e+01 8.389331359196e-05 0.000000000000e+00 -8.389331357286e-05 -1.910000000000e-14 1.960000000000e+01 8.404451840183e-05 0.000000000000e+00 -8.404451838223e-05 -1.960000000000e-14 2.010000000000e+01 8.419519481027e-05 0.000000000000e+00 -8.419519479017e-05 -2.010000000000e-14 2.060000000000e+01 8.434536951057e-05 0.000000000000e+00 -8.434536948997e-05 -2.060000000000e-14 2.110000000000e+01 8.449506737218e-05 0.000000000000e+00 -8.449506735108e-05 -2.110000000000e-14 2.160000000000e+01 8.464431160925e-05 0.000000000000e+00 -8.464431158765e-05 -2.160000000000e-14 2.210000000000e+01 8.479312392975e-05 0.000000000000e+00 -8.479312390765e-05 -2.210000000000e-14 2.260000000000e+01 8.494152466768e-05 0.000000000000e+00 -8.494152464508e-05 -2.260000000000e-14 2.310000000000e+01 8.508953290091e-05 0.000000000000e+00 -8.508953287781e-05 -2.310000000000e-14 2.360000000000e+01 8.523716655620e-05 0.000000000000e+00 -8.523716653261e-05 -2.360000000000e-14 2.410000000000e+01 8.538444250338e-05 0.000000000000e+00 -8.538444247928e-05 -2.410000000000e-14 2.460000000000e+01 8.553137663972e-05 0.000000000000e+00 -8.553137661512e-05 -2.460000000000e-14 2.510000000000e+01 8.567798396601e-05 0.000000000000e+00 -8.567798394091e-05 -2.510000000000e-14 2.560000000000e+01 8.582427865506e-05 0.000000000000e+00 -8.582427862946e-05 -2.560000000000e-14 2.610000000000e+01 8.597027411368e-05 0.000000000000e+00 -8.597027408758e-05 -2.610000000000e-14 2.660000000000e+01 8.611598303886e-05 0.000000000000e+00 -8.611598301226e-05 -2.660000000000e-14 2.710000000000e+01 8.626141746869e-05 0.000000000000e+00 -8.626141744160e-05 -2.710000000000e-14 2.760000000000e+01 8.640658882882e-05 0.000000000000e+00 -8.640658880123e-05 -2.760000000000e-14 2.810000000000e+01 8.655150797469e-05 0.000000000000e+00 -8.655150794659e-05 -2.810000000000e-14 2.860000000000e+01 8.669618523014e-05 0.000000000000e+00 -8.669618520154e-05 -2.860000000000e-14 2.910000000000e+01 8.684063042278e-05 0.000000000000e+00 -8.684063039368e-05 -2.910000000000e-14 2.960000000000e+01 8.698485291633e-05 0.000000000000e+00 -8.698485288673e-05 -2.960000000000e-14 3.010000000000e+01 8.712886164034e-05 0.000000000000e+00 -8.712886161024e-05 -3.010000000000e-14 1.000000000000e-01 4.818733011571e-06 0.000000000000e+00 -4.818733011471e-06 -1.000000000000e-16 6.000000000000e-01 2.880595634767e-05 0.000000000000e+00 -2.880595634707e-05 -6.000000000000e-16 1.100000000000e+00 5.261660739930e-05 0.000000000000e+00 -5.261660739820e-05 -1.100000000000e-15 1.600000000000e+00 7.625181713971e-05 0.000000000000e+00 -7.625181713811e-05 -1.600000000000e-15 2.100000000000e+00 9.971267722735e-05 0.000000000000e+00 -9.971267722525e-05 -2.100000000000e-15 2.600000000000e+00 1.230002428330e-04 0.000000000000e+00 -1.230002428304e-04 -2.600000000000e-15 3.100000000000e+00 1.461155272969e-04 0.000000000000e+00 -1.461155272938e-04 -3.100000000000e-15 3.600000000000e+00 1.690594999569e-04 0.000000000000e+00 -1.690594999533e-04 -3.600000000000e-15 4.100000000000e+00 1.918330835017e-04 0.000000000000e+00 -1.918330834976e-04 -4.100000000000e-15 4.600000000000e+00 2.144371512655e-04 0.000000000000e+00 -2.144371512609e-04 -4.600000000000e-15 5.100000000000e+00 2.368725243772e-04 0.000000000000e+00 -2.368725243721e-04 -5.100000000000e-15 5.600000000000e+00 2.591399687047e-04 0.000000000000e+00 -2.591399686991e-04 -5.600000000000e-15 6.100000000000e+00 2.812401915440e-04 0.000000000000e+00 -2.812401915379e-04 -6.100000000000e-15 6.600000000000e+00 3.031738380040e-04 0.000000000000e+00 -3.031738379974e-04 -6.600000000000e-15 7.100000000000e+00 3.249414837218e-04 0.000000000000e+00 -3.249414837147e-04 -7.100000000000e-15 7.600000000000e+00 3.465436432824e-04 0.000000000000e+00 -3.465436432748e-04 -7.600000000000e-15 8.100000000000e+00 3.679807468084e-04 0.000000000000e+00 -3.679807468003e-04 -8.100000000000e-15 8.600000000000e+00 3.892531465617e-04 0.000000000000e+00 -3.892531465531e-04 -8.600000000000e-15 9.100000000000e+00 4.103611080403e-04 0.000000000000e+00 -4.103611080312e-04 -9.100000000000e-15 9.600000000000e+00 4.313048032775e-04 0.000000000000e+00 -4.313048032679e-04 -9.600000000000e-15 1.010000000000e+01 4.520843033354e-04 0.000000000000e+00 -4.520843033253e-04 -1.010000000000e-14 1.060000000000e+01 4.726995698724e-04 0.000000000000e+00 -4.726995698618e-04 -1.060000000000e-14 1.110000000000e+01 4.931504456465e-04 0.000000000000e+00 -4.931504456354e-04 -1.110000000000e-14 1.160000000000e+01 5.134366437890e-04 0.000000000000e+00 -5.134366437774e-04 -1.160000000000e-14 1.210000000000e+01 5.335577356565e-04 0.000000000000e+00 -5.335577356444e-04 -1.210000000000e-14 1.260000000000e+01 5.535131370339e-04 0.000000000000e+00 -5.535131370213e-04 -1.260000000000e-14 1.310000000000e+01 5.733020924164e-04 0.000000000000e+00 -5.733020924033e-04 -1.310000000000e-14 1.360000000000e+01 5.929236570488e-04 0.000000000000e+00 -5.929236570352e-04 -1.360000000000e-14 1.410000000000e+01 6.123766763365e-04 0.000000000000e+00 -6.123766763224e-04 -1.410000000000e-14 1.460000000000e+01 6.316597621626e-04 0.000000000000e+00 -6.316597621480e-04 -1.460000000000e-14 1.510000000000e+01 6.507712655526e-04 0.000000000000e+00 -6.507712655375e-04 -1.510000000000e-14 1.560000000000e+01 6.697092450054e-04 0.000000000000e+00 -6.697092449898e-04 -1.560000000000e-14 1.610000000000e+01 6.884714296643e-04 0.000000000000e+00 -6.884714296482e-04 -1.610000000000e-14 1.660000000000e+01 7.070551763123e-04 0.000000000000e+00 -7.070551762957e-04 -1.660000000000e-14 1.710000000000e+01 7.254574189466e-04 0.000000000000e+00 -7.254574189295e-04 -1.710000000000e-14 1.760000000000e+01 7.436746093867e-04 0.000000000000e+00 -7.436746093691e-04 -1.760000000000e-14 1.810000000000e+01 7.617026470015e-04 0.000000000000e+00 -7.617026469834e-04 -1.810000000000e-14 1.860000000000e+01 7.795367951586e-04 0.000000000000e+00 -7.795367951400e-04 -1.860000000000e-14 1.910000000000e+01 7.971715813865e-04 0.000000000000e+00 -7.971715813674e-04 -1.910000000000e-14 1.960000000000e+01 8.146006774557e-04 0.000000000000e+00 -8.146006774361e-04 -1.960000000000e-14 2.010000000000e+01 8.318167545598e-04 0.000000000000e+00 -8.318167545397e-04 -2.010000000000e-14 2.060000000000e+01 8.488113074670e-04 0.000000000000e+00 -8.488113074464e-04 -2.060000000000e-14 2.110000000000e+01 8.655744397993e-04 0.000000000000e+00 -8.655744397782e-04 -2.110000000000e-14 2.160000000000e+01 8.820946003889e-04 0.000000000000e+00 -8.820946003673e-04 -2.160000000000e-14 2.210000000000e+01 8.983582578191e-04 0.000000000000e+00 -8.983582577970e-04 -2.210000000000e-14 2.260000000000e+01 9.143494966331e-04 0.000000000000e+00 -9.143494966105e-04 -2.260000000000e-14 2.310000000000e+01 9.300495141761e-04 0.000000000000e+00 -9.300495141530e-04 -2.310000000000e-14 2.360000000000e+01 9.454359916118e-04 0.000000000000e+00 -9.454359915882e-04 -2.360000000000e-14 2.410000000000e+01 9.604823066073e-04 0.000000000000e+00 -9.604823065832e-04 -2.410000000000e-14 2.460000000000e+01 9.751565495146e-04 0.000000000000e+00 -9.751565494900e-04 -2.460000000000e-14 2.510000000000e+01 9.894203021469e-04 0.000000000000e+00 -9.894203021218e-04 -2.510000000000e-14 2.560000000000e+01 1.003227144315e-03 0.000000000000e+00 -1.003227144290e-03 -2.560000000000e-14 2.610000000000e+01 1.016520880682e-03 0.000000000000e+00 -1.016520880656e-03 -2.610000000000e-14 2.660000000000e+01 1.029233554694e-03 0.000000000000e+00 -1.029233554668e-03 -2.660000000000e-14 2.710000000000e+01 1.041283486486e-03 0.000000000000e+00 -1.041283486459e-03 -2.710000000000e-14 2.760000000000e+01 1.052573925064e-03 0.000000000000e+00 -1.052573925036e-03 -2.760000000000e-14 2.810000000000e+01 1.062993575342e-03 0.000000000000e+00 -1.062993575314e-03 -2.810000000000e-14 2.860000000000e+01 1.072421385375e-03 0.000000000000e+00 -1.072421385347e-03 -2.860000000000e-14 2.910000000000e+01 1.080739492319e-03 0.000000000000e+00 -1.080739492290e-03 -2.910000000000e-14 2.960000000000e+01 1.087859333426e-03 0.000000000000e+00 -1.087859333396e-03 -2.960000000000e-14 3.010000000000e+01 1.093764468918e-03 0.000000000000e+00 -1.093764468887e-03 -3.010000000000e-14 1.000000000000e-01 4.919904545161e-06 0.000000000000e+00 -4.919904545061e-06 -1.000000000000e-16 6.000000000000e-01 2.941439330596e-05 0.000000000000e+00 -2.941439330536e-05 -6.000000000000e-16 1.100000000000e+00 5.373513470957e-05 0.000000000000e+00 -5.373513470847e-05 -1.100000000000e-15 1.600000000000e+00 7.788391577721e-05 0.000000000000e+00 -7.788391577561e-05 -1.600000000000e-15 2.100000000000e+00 1.018624967317e-04 0.000000000000e+00 -1.018624967296e-04 -2.100000000000e-15 2.600000000000e+00 1.256726127088e-04 0.000000000000e+00 -1.256726127062e-04 -2.600000000000e-15 3.100000000000e+00 1.493159742325e-04 0.000000000000e+00 -1.493159742294e-04 -3.100000000000e-15 3.600000000000e+00 1.727942676491e-04 0.000000000000e+00 -1.727942676455e-04 -3.600000000000e-15 4.100000000000e+00 1.961091555361e-04 0.000000000000e+00 -1.961091555320e-04 -4.100000000000e-15 4.600000000000e+00 2.192622771002e-04 0.000000000000e+00 -2.192622770956e-04 -4.600000000000e-15 5.100000000000e+00 2.422552485666e-04 0.000000000000e+00 -2.422552485615e-04 -5.100000000000e-15 5.600000000000e+00 2.650896635623e-04 0.000000000000e+00 -2.650896635567e-04 -5.600000000000e-15 6.100000000000e+00 2.877670934928e-04 0.000000000000e+00 -2.877670934867e-04 -6.100000000000e-15 6.600000000000e+00 3.102890879121e-04 0.000000000000e+00 -3.102890879055e-04 -6.600000000000e-15 7.100000000000e+00 3.326571748855e-04 0.000000000000e+00 -3.326571748784e-04 -7.100000000000e-15 7.600000000000e+00 3.548728613455e-04 0.000000000000e+00 -3.548728613379e-04 -7.600000000000e-15 8.100000000000e+00 3.769376334407e-04 0.000000000000e+00 -3.769376334326e-04 -8.100000000000e-15 8.600000000000e+00 3.988529568779e-04 0.000000000000e+00 -3.988529568693e-04 -8.600000000000e-15 9.100000000000e+00 4.206202772575e-04 0.000000000000e+00 -4.206202772484e-04 -9.100000000000e-15 9.600000000000e+00 4.422410204019e-04 0.000000000000e+00 -4.422410203923e-04 -9.600000000000e-15 1.010000000000e+01 4.637165926777e-04 0.000000000000e+00 -4.637165926676e-04 -1.010000000000e-14 1.060000000000e+01 4.850483813114e-04 0.000000000000e+00 -4.850483813008e-04 -1.060000000000e-14 1.110000000000e+01 5.062377546989e-04 0.000000000000e+00 -5.062377546878e-04 -1.110000000000e-14 1.160000000000e+01 5.272860627086e-04 0.000000000000e+00 -5.272860626970e-04 -1.160000000000e-14 1.210000000000e+01 5.481946369789e-04 0.000000000000e+00 -5.481946369668e-04 -1.210000000000e-14 1.260000000000e+01 5.689647912097e-04 0.000000000000e+00 -5.689647911971e-04 -1.260000000000e-14 1.310000000000e+01 5.895978214479e-04 0.000000000000e+00 -5.895978214348e-04 -1.310000000000e-14 1.360000000000e+01 6.100950063677e-04 0.000000000000e+00 -6.100950063541e-04 -1.360000000000e-14 1.410000000000e+01 6.304576075451e-04 0.000000000000e+00 -6.304576075310e-04 -1.410000000000e-14 1.460000000000e+01 6.506868697272e-04 0.000000000000e+00 -6.506868697126e-04 -1.460000000000e-14 1.510000000000e+01 6.707840210964e-04 0.000000000000e+00 -6.707840210813e-04 -1.510000000000e-14 1.560000000000e+01 6.907502735290e-04 0.000000000000e+00 -6.907502735134e-04 -1.560000000000e-14 1.610000000000e+01 7.105868228493e-04 0.000000000000e+00 -7.105868228332e-04 -1.610000000000e-14 1.660000000000e+01 7.302948490788e-04 0.000000000000e+00 -7.302948490622e-04 -1.660000000000e-14 1.710000000000e+01 7.498755166800e-04 0.000000000000e+00 -7.498755166629e-04 -1.710000000000e-14 1.760000000000e+01 7.693299747965e-04 0.000000000000e+00 -7.693299747789e-04 -1.760000000000e-14 1.810000000000e+01 7.886593574875e-04 0.000000000000e+00 -7.886593574694e-04 -1.810000000000e-14 1.860000000000e+01 8.078647839586e-04 0.000000000000e+00 -8.078647839400e-04 -1.860000000000e-14 1.910000000000e+01 8.269473587880e-04 0.000000000000e+00 -8.269473587689e-04 -1.910000000000e-14 1.960000000000e+01 8.459081721483e-04 0.000000000000e+00 -8.459081721287e-04 -1.960000000000e-14 2.010000000000e+01 8.647483000242e-04 0.000000000000e+00 -8.647483000041e-04 -2.010000000000e-14 2.060000000000e+01 8.834688044264e-04 0.000000000000e+00 -8.834688044058e-04 -2.060000000000e-14 2.110000000000e+01 9.020707336009e-04 0.000000000000e+00 -9.020707335798e-04 -2.110000000000e-14 2.160000000000e+01 9.205551222350e-04 0.000000000000e+00 -9.205551222134e-04 -2.160000000000e-14 2.210000000000e+01 9.389229916591e-04 0.000000000000e+00 -9.389229916370e-04 -2.210000000000e-14 2.260000000000e+01 9.571753500451e-04 0.000000000000e+00 -9.571753500225e-04 -2.260000000000e-14 2.310000000000e+01 9.753131926008e-04 0.000000000000e+00 -9.753131925777e-04 -2.310000000000e-14 2.360000000000e+01 9.933375017608e-04 0.000000000000e+00 -9.933375017372e-04 -2.360000000000e-14 2.410000000000e+01 1.011249247374e-03 0.000000000000e+00 -1.011249247350e-03 -2.410000000000e-14 2.460000000000e+01 1.029049386889e-03 0.000000000000e+00 -1.029049386865e-03 -2.460000000000e-14 2.510000000000e+01 1.046738865533e-03 0.000000000000e+00 -1.046738865508e-03 -2.510000000000e-14 2.560000000000e+01 1.064318616488e-03 0.000000000000e+00 -1.064318616462e-03 -2.560000000000e-14 2.610000000000e+01 1.081789561069e-03 0.000000000000e+00 -1.081789561043e-03 -2.610000000000e-14 2.660000000000e+01 1.099152608895e-03 0.000000000000e+00 -1.099152608868e-03 -2.660000000000e-14 2.710000000000e+01 1.116408658051e-03 0.000000000000e+00 -1.116408658023e-03 -2.710000000000e-14 2.760000000000e+01 1.133558595259e-03 0.000000000000e+00 -1.133558595232e-03 -2.760000000000e-14 2.810000000000e+01 1.150603296041e-03 0.000000000000e+00 -1.150603296013e-03 -2.810000000000e-14 2.860000000000e+01 1.167543624871e-03 0.000000000000e+00 -1.167543624843e-03 -2.860000000000e-14 2.910000000000e+01 1.184380435341e-03 0.000000000000e+00 -1.184380435312e-03 -2.910000000000e-14 2.960000000000e+01 1.201114570306e-03 0.000000000000e+00 -1.201114570276e-03 -2.960000000000e-14 3.010000000000e+01 1.217746862040e-03 0.000000000000e+00 -1.217746862010e-03 -3.010000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_lg2.standard0000644000265600020320000010243012264261473023223 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.408678210228e-10 0.000000000000e+00 -2.408658085136e-10 -2.012500000000e-15 1.500000000000e+00 6.063186298914e-07 0.000000000000e+00 -6.063186278789e-07 -2.012500000000e-15 2.000000000000e+00 6.676599419384e-06 0.000000000000e+00 -6.676599417372e-06 -2.012500000000e-15 2.500000000000e+00 2.118281903110e-05 0.000000000000e+00 -2.118281902908e-05 -2.012500000000e-15 3.000000000000e+00 4.495355015017e-05 0.000000000000e+00 -4.495355014816e-05 -2.012500000000e-15 3.500000000000e+00 7.819600857550e-05 0.000000000000e+00 -7.819600857349e-05 -2.012500000000e-15 4.000000000000e+00 1.185323050815e-04 0.000000000000e+00 -1.185323050794e-04 -2.012500000000e-15 4.500000000000e+00 1.595305710705e-04 0.000000000000e+00 -1.595305710685e-04 -2.012500000000e-15 5.000000000000e+00 1.981227580736e-04 0.000000000000e+00 -1.981227580716e-04 -2.012500000000e-15 5.500000000000e+00 2.330177355665e-04 0.000000000000e+00 -2.330177355645e-04 -2.012500000000e-15 6.000000000000e+00 2.639514559006e-04 0.000000000000e+00 -2.639514558986e-04 -2.012500000000e-15 6.500000000000e+00 2.911791850641e-04 0.000000000000e+00 -2.911791850620e-04 -2.012500000000e-15 7.000000000000e+00 3.151447960959e-04 0.000000000000e+00 -3.151447960938e-04 -2.012500000000e-15 7.500000000000e+00 3.363161594630e-04 0.000000000000e+00 -3.363161594609e-04 -2.012500000000e-15 8.000000000000e+00 3.551187158701e-04 0.000000000000e+00 -3.551187158681e-04 -2.012500000000e-15 8.500000000000e+00 3.719163922437e-04 0.000000000000e+00 -3.719163922417e-04 -2.012500000000e-15 9.000000000000e+00 3.870122904680e-04 0.000000000000e+00 -3.870122904660e-04 -2.012500000000e-15 9.500000000000e+00 4.006562360191e-04 0.000000000000e+00 -4.006562360171e-04 -2.012500000000e-15 1.000000000000e+01 4.130537167949e-04 0.000000000000e+00 -4.130537167929e-04 -2.012500000000e-15 1.050000000000e+01 4.243741502146e-04 0.000000000000e+00 -4.243741502126e-04 -2.012500000000e-15 1.100000000000e+01 4.347578711383e-04 0.000000000000e+00 -4.347578711363e-04 -2.012500000000e-15 1.150000000000e+01 4.443218075677e-04 0.000000000000e+00 -4.443218075657e-04 -2.012500000000e-15 1.200000000000e+01 4.531640078079e-04 0.000000000000e+00 -4.531640078059e-04 -2.012500000000e-15 1.250000000000e+01 4.613672257677e-04 0.000000000000e+00 -4.613672257657e-04 -2.012500000000e-15 1.300000000000e+01 4.690017569632e-04 0.000000000000e+00 -4.690017569612e-04 -2.012500000000e-15 1.350000000000e+01 4.761276867152e-04 0.000000000000e+00 -4.761276867132e-04 -2.012500000000e-15 1.400000000000e+01 4.827966797172e-04 0.000000000000e+00 -4.827966797152e-04 -2.012500000000e-15 1.450000000000e+01 4.890534119614e-04 0.000000000000e+00 -4.890534119594e-04 -2.012500000000e-15 1.500000000000e+01 4.949367231366e-04 0.000000000000e+00 -4.949367231346e-04 -2.012500000000e-15 1.550000000000e+01 5.004805496832e-04 0.000000000000e+00 -5.004805496812e-04 -2.012500000000e-15 1.600000000000e+01 5.057146848772e-04 0.000000000000e+00 -5.057146848752e-04 -2.012500000000e-15 1.650000000000e+01 5.106654017612e-04 0.000000000000e+00 -5.106654017591e-04 -2.012500000000e-15 1.700000000000e+01 5.153559666931e-04 0.000000000000e+00 -5.153559666911e-04 -2.012500000000e-15 1.750000000000e+01 5.198070651488e-04 0.000000000000e+00 -5.198070651467e-04 -2.012500000000e-15 1.800000000000e+01 5.240371567200e-04 0.000000000000e+00 -5.240371567180e-04 -2.012500000000e-15 1.850000000000e+01 5.280627726530e-04 0.000000000000e+00 -5.280627726510e-04 -2.012500000000e-15 1.900000000000e+01 5.318987711868e-04 0.000000000000e+00 -5.318987711848e-04 -2.012500000000e-15 1.950000000000e+01 5.355585301934e-04 0.000000000000e+00 -5.355585301914e-04 -2.012500000000e-15 2.000000000000e+01 5.390541581262e-04 0.000000000000e+00 -5.390541581242e-04 -2.012500000000e-15 1.000000000000e+00 2.443223815537e-10 0.000000000000e+00 -2.443173689493e-10 -5.012500000000e-15 1.500000000000e+00 6.108134587937e-07 0.000000000000e+00 -6.108134537813e-07 -5.012500000000e-15 2.000000000000e+00 6.704775782569e-06 0.000000000000e+00 -6.704775777557e-06 -5.012500000000e-15 2.500000000000e+00 2.125606906403e-05 0.000000000000e+00 -2.125606905902e-05 -5.012500000000e-15 3.000000000000e+00 4.509980963213e-05 0.000000000000e+00 -4.509980962712e-05 -5.012500000000e-15 3.500000000000e+00 7.846399197593e-05 0.000000000000e+00 -7.846399197092e-05 -5.012500000000e-15 4.000000000000e+00 1.212471123974e-04 0.000000000000e+00 -1.212471123924e-04 -5.012500000000e-15 4.500000000000e+00 1.731411387849e-04 0.000000000000e+00 -1.731411387799e-04 -5.012500000000e-15 5.000000000000e+00 2.337008749843e-04 0.000000000000e+00 -2.337008749793e-04 -5.012500000000e-15 5.500000000000e+00 3.021809936244e-04 0.000000000000e+00 -3.021809936194e-04 -5.012500000000e-15 6.000000000000e+00 3.745473205097e-04 0.000000000000e+00 -3.745473205047e-04 -5.012500000000e-15 6.500000000000e+00 4.460949020770e-04 0.000000000000e+00 -4.460949020720e-04 -5.012500000000e-15 7.000000000000e+00 5.138267847347e-04 0.000000000000e+00 -5.138267847296e-04 -5.012500000000e-15 7.500000000000e+00 5.758563396947e-04 0.000000000000e+00 -5.758563396897e-04 -5.012500000000e-15 8.000000000000e+00 6.314017642561e-04 0.000000000000e+00 -6.314017642511e-04 -5.012500000000e-15 8.500000000000e+00 6.805133922416e-04 0.000000000000e+00 -6.805133922366e-04 -5.012500000000e-15 9.000000000000e+00 7.237104734019e-04 0.000000000000e+00 -7.237104733969e-04 -5.012500000000e-15 9.500000000000e+00 7.616979477753e-04 0.000000000000e+00 -7.616979477703e-04 -5.012500000000e-15 1.000000000000e+01 7.951995487539e-04 0.000000000000e+00 -7.951995487489e-04 -5.012500000000e-15 1.050000000000e+01 8.248788203869e-04 0.000000000000e+00 -8.248788203819e-04 -5.012500000000e-15 1.100000000000e+01 8.513115589617e-04 0.000000000000e+00 -8.513115589567e-04 -5.012500000000e-15 1.150000000000e+01 8.749837511880e-04 0.000000000000e+00 -8.749837511829e-04 -5.012500000000e-15 1.200000000000e+01 8.963002009884e-04 0.000000000000e+00 -8.963002009834e-04 -5.012500000000e-15 1.250000000000e+01 9.155964130972e-04 0.000000000000e+00 -9.155964130922e-04 -5.012500000000e-15 1.300000000000e+01 9.331503988565e-04 0.000000000000e+00 -9.331503988515e-04 -5.012500000000e-15 1.350000000000e+01 9.491931262342e-04 0.000000000000e+00 -9.491931262292e-04 -5.012500000000e-15 1.400000000000e+01 9.639172888436e-04 0.000000000000e+00 -9.639172888386e-04 -5.012500000000e-15 1.450000000000e+01 9.774844696587e-04 0.000000000000e+00 -9.774844696537e-04 -5.012500000000e-15 1.500000000000e+01 9.900309160212e-04 0.000000000000e+00 -9.900309160161e-04 -5.012500000000e-15 1.550000000000e+01 1.001672168534e-03 0.000000000000e+00 -1.001672168529e-03 -5.012500000000e-15 1.600000000000e+01 1.012506766597e-03 0.000000000000e+00 -1.012506766592e-03 -5.012500000000e-15 1.650000000000e+01 1.022619219065e-03 0.000000000000e+00 -1.022619219059e-03 -5.012500000000e-15 1.700000000000e+01 1.032082393195e-03 0.000000000000e+00 -1.032082393190e-03 -5.012500000000e-15 1.750000000000e+01 1.040959443749e-03 0.000000000000e+00 -1.040959443744e-03 -5.012500000000e-15 1.800000000000e+01 1.049305378150e-03 0.000000000000e+00 -1.049305378145e-03 -5.012500000000e-15 1.850000000000e+01 1.057168332807e-03 0.000000000000e+00 -1.057168332802e-03 -5.012500000000e-15 1.900000000000e+01 1.064590619345e-03 0.000000000000e+00 -1.064590619340e-03 -5.012500000000e-15 1.950000000000e+01 1.071609586721e-03 0.000000000000e+00 -1.071609586716e-03 -5.012500000000e-15 2.000000000000e+01 1.078258335343e-03 0.000000000000e+00 -1.078258335338e-03 -5.012500000000e-15 1.000000000000e+00 2.498359418651e-10 0.000000000000e+00 -2.498259297299e-10 -1.001250000000e-14 1.500000000000e+00 6.175056113259e-07 0.000000000000e+00 -6.175056013139e-07 -1.001250000000e-14 2.000000000000e+00 6.742608337088e-06 0.000000000000e+00 -6.742608327076e-06 -1.001250000000e-14 2.500000000000e+00 2.134638323537e-05 0.000000000000e+00 -2.134638322536e-05 -1.001250000000e-14 3.000000000000e+00 4.526248463226e-05 0.000000000000e+00 -4.526248462225e-05 -1.001250000000e-14 3.500000000000e+00 7.871929566798e-05 0.000000000000e+00 -7.871929565797e-05 -1.001250000000e-14 4.000000000000e+00 1.216185719238e-04 0.000000000000e+00 -1.216185719138e-04 -1.001250000000e-14 4.500000000000e+00 1.736598495695e-04 0.000000000000e+00 -1.736598495594e-04 -1.001250000000e-14 5.000000000000e+00 2.344110557227e-04 0.000000000000e+00 -2.344110557127e-04 -1.001250000000e-14 5.500000000000e+00 3.033522551210e-04 0.000000000000e+00 -3.033522551110e-04 -1.001250000000e-14 6.000000000000e+00 3.799038532878e-04 0.000000000000e+00 -3.799038532778e-04 -1.001250000000e-14 6.500000000000e+00 4.634447066526e-04 0.000000000000e+00 -4.634447066425e-04 -1.001250000000e-14 7.000000000000e+00 5.533221684719e-04 0.000000000000e+00 -5.533221684619e-04 -1.001250000000e-14 7.500000000000e+00 6.483846253945e-04 0.000000000000e+00 -6.483846253845e-04 -1.001250000000e-14 8.000000000000e+00 7.449335548545e-04 0.000000000000e+00 -7.449335548445e-04 -1.001250000000e-14 8.500000000000e+00 8.394845117971e-04 0.000000000000e+00 -8.394845117871e-04 -1.001250000000e-14 9.000000000000e+00 9.291791705291e-04 0.000000000000e+00 -9.291791705191e-04 -1.001250000000e-14 9.500000000000e+00 1.011816464468e-03 0.000000000000e+00 -1.011816464458e-03 -1.001250000000e-14 1.000000000000e+01 1.086162267744e-03 0.000000000000e+00 -1.086162267734e-03 -1.001250000000e-14 1.050000000000e+01 1.151954272128e-03 0.000000000000e+00 -1.151954272118e-03 -1.001250000000e-14 1.100000000000e+01 1.209638410560e-03 0.000000000000e+00 -1.209638410550e-03 -1.001250000000e-14 1.150000000000e+01 1.260039541975e-03 0.000000000000e+00 -1.260039541965e-03 -1.001250000000e-14 1.200000000000e+01 1.304106159051e-03 0.000000000000e+00 -1.304106159041e-03 -1.001250000000e-14 1.250000000000e+01 1.342760020315e-03 0.000000000000e+00 -1.342760020305e-03 -1.001250000000e-14 1.300000000000e+01 1.376826725179e-03 0.000000000000e+00 -1.376826725169e-03 -1.001250000000e-14 1.350000000000e+01 1.407014599024e-03 0.000000000000e+00 -1.407014599014e-03 -1.001250000000e-14 1.400000000000e+01 1.433917738336e-03 0.000000000000e+00 -1.433917738326e-03 -1.001250000000e-14 1.450000000000e+01 1.458028982105e-03 0.000000000000e+00 -1.458028982095e-03 -1.001250000000e-14 1.500000000000e+01 1.479755510443e-03 0.000000000000e+00 -1.479755510433e-03 -1.001250000000e-14 1.550000000000e+01 1.499433772084e-03 0.000000000000e+00 -1.499433772074e-03 -1.001250000000e-14 1.600000000000e+01 1.517342506868e-03 0.000000000000e+00 -1.517342506858e-03 -1.001250000000e-14 1.650000000000e+01 1.533713602307e-03 0.000000000000e+00 -1.533713602297e-03 -1.001250000000e-14 1.700000000000e+01 1.548740933891e-03 0.000000000000e+00 -1.548740933881e-03 -1.001250000000e-14 1.750000000000e+01 1.562587478467e-03 0.000000000000e+00 -1.562587478457e-03 -1.001250000000e-14 1.800000000000e+01 1.575391008507e-03 0.000000000000e+00 -1.575391008497e-03 -1.001250000000e-14 1.850000000000e+01 1.587268645383e-03 0.000000000000e+00 -1.587268645373e-03 -1.001250000000e-14 1.900000000000e+01 1.598320505457e-03 0.000000000000e+00 -1.598320505447e-03 -1.001250000000e-14 1.950000000000e+01 1.608632628534e-03 0.000000000000e+00 -1.608632628524e-03 -1.001250000000e-14 2.000000000000e+01 1.618279339310e-03 0.000000000000e+00 -1.618279339300e-03 -1.001250000000e-14 1.000000000000e+00 9.573429288895e-14 0.000000000000e+00 -9.373429542752e-14 -2.000000000938e-15 1.500000000000e+00 5.135512571067e-08 0.000000000000e+00 -5.135512371056e-08 -2.000000000938e-15 2.000000000000e+00 4.736529809248e-06 0.000000000000e+00 -4.736529807247e-06 -2.000000000938e-15 2.500000000000e+00 2.096149931245e-05 0.000000000000e+00 -2.096149931045e-05 -2.000000000938e-15 3.000000000000e+00 5.087065840058e-05 0.000000000000e+00 -5.087065839858e-05 -2.000000000938e-15 3.500000000000e+00 9.521545486521e-05 0.000000000000e+00 -9.521545486321e-05 -2.000000000938e-15 4.000000000000e+00 1.519760720809e-04 0.000000000000e+00 -1.519760720789e-04 -2.000000000938e-15 4.500000000000e+00 2.092388812515e-04 0.000000000000e+00 -2.092388812495e-04 -2.000000000938e-15 5.000000000000e+00 2.608804444217e-04 0.000000000000e+00 -2.608804444197e-04 -2.000000000938e-15 5.500000000000e+00 3.052082647707e-04 0.000000000000e+00 -3.052082647687e-04 -2.000000000938e-15 6.000000000000e+00 3.425474977790e-04 0.000000000000e+00 -3.425474977770e-04 -2.000000000938e-15 6.500000000000e+00 3.739429699494e-04 0.000000000000e+00 -3.739429699474e-04 -2.000000000938e-15 7.000000000000e+00 4.005012212893e-04 0.000000000000e+00 -4.005012212873e-04 -2.000000000938e-15 7.500000000000e+00 4.231730009856e-04 0.000000000000e+00 -4.231730009836e-04 -2.000000000938e-15 8.000000000000e+00 4.427186781949e-04 0.000000000000e+00 -4.427186781929e-04 -2.000000000938e-15 8.500000000000e+00 4.597315556114e-04 0.000000000000e+00 -4.597315556094e-04 -2.000000000938e-15 9.000000000000e+00 4.746723301392e-04 0.000000000000e+00 -4.746723301372e-04 -2.000000000938e-15 9.500000000000e+00 4.879001904201e-04 0.000000000000e+00 -4.879001904181e-04 -2.000000000938e-15 1.000000000000e+01 4.996974614794e-04 0.000000000000e+00 -4.996974614774e-04 -2.000000000938e-15 1.050000000000e+01 5.102882308659e-04 0.000000000000e+00 -5.102882308639e-04 -2.000000000938e-15 1.100000000000e+01 5.198521934844e-04 0.000000000000e+00 -5.198521934824e-04 -2.000000000938e-15 1.150000000000e+01 5.285349130858e-04 0.000000000000e+00 -5.285349130838e-04 -2.000000000938e-15 1.200000000000e+01 5.364554572069e-04 0.000000000000e+00 -5.364554572049e-04 -2.000000000938e-15 1.250000000000e+01 5.437121188195e-04 0.000000000000e+00 -5.437121188175e-04 -2.000000000938e-15 1.300000000000e+01 5.503867419650e-04 0.000000000000e+00 -5.503867419630e-04 -2.000000000938e-15 1.350000000000e+01 5.565480229854e-04 0.000000000000e+00 -5.565480229834e-04 -2.000000000938e-15 1.400000000000e+01 5.622540541780e-04 0.000000000000e+00 -5.622540541760e-04 -2.000000000938e-15 1.450000000000e+01 5.675543022702e-04 0.000000000000e+00 -5.675543022682e-04 -2.000000000938e-15 1.500000000000e+01 5.724911613684e-04 0.000000000000e+00 -5.724911613664e-04 -2.000000000938e-15 1.550000000000e+01 5.771011825724e-04 0.000000000000e+00 -5.771011825704e-04 -2.000000000938e-15 1.600000000000e+01 5.814160556780e-04 0.000000000000e+00 -5.814160556760e-04 -2.000000000938e-15 1.650000000000e+01 5.854633991284e-04 0.000000000000e+00 -5.854633991264e-04 -2.000000000938e-15 1.700000000000e+01 5.892674004037e-04 0.000000000000e+00 -5.892674004017e-04 -2.000000000938e-15 1.750000000000e+01 5.928493388171e-04 0.000000000000e+00 -5.928493388151e-04 -2.000000000938e-15 1.800000000000e+01 5.962280151421e-04 0.000000000000e+00 -5.962280151401e-04 -2.000000000938e-15 1.850000000000e+01 5.994201068878e-04 0.000000000000e+00 -5.994201068858e-04 -2.000000000938e-15 1.900000000000e+01 6.024404689825e-04 0.000000000000e+00 -6.024404689805e-04 -2.000000000938e-15 1.950000000000e+01 6.053023594606e-04 0.000000000000e+00 -6.053023594586e-04 -2.000000000938e-15 2.000000000000e+01 6.080176811032e-04 0.000000000000e+00 -6.080176811012e-04 -2.000000000938e-15 1.000000000000e+00 1.004725816434e-13 0.000000000000e+00 -9.547265105432e-14 -5.000000000938e-15 1.500000000000e+00 5.213696617100e-08 0.000000000000e+00 -5.213696117106e-08 -5.000000000938e-15 2.000000000000e+00 4.760148076346e-06 0.000000000000e+00 -4.760148071346e-06 -5.000000000938e-15 2.500000000000e+00 2.103950093392e-05 0.000000000000e+00 -2.103950092892e-05 -5.000000000938e-15 3.000000000000e+00 5.104321428005e-05 0.000000000000e+00 -5.104321427505e-05 -5.000000000938e-15 3.500000000000e+00 9.554163409545e-05 0.000000000000e+00 -9.554163409045e-05 -5.000000000938e-15 4.000000000000e+00 1.544868561881e-04 0.000000000000e+00 -1.544868561831e-04 -5.000000000938e-15 4.500000000000e+00 2.272577292267e-04 0.000000000000e+00 -2.272577292217e-04 -5.000000000938e-15 5.000000000000e+00 3.128290630506e-04 0.000000000000e+00 -3.128290630456e-04 -5.000000000938e-15 5.500000000000e+00 4.096092234115e-04 0.000000000000e+00 -4.096092234065e-04 -5.000000000938e-15 6.000000000000e+00 5.087930586835e-04 0.000000000000e+00 -5.087930586785e-04 -5.000000000938e-15 6.500000000000e+00 6.011972300444e-04 0.000000000000e+00 -6.011972300394e-04 -5.000000000938e-15 7.000000000000e+00 6.827667696392e-04 0.000000000000e+00 -6.827667696342e-04 -5.000000000938e-15 7.500000000000e+00 7.523651906039e-04 0.000000000000e+00 -7.523651905989e-04 -5.000000000938e-15 8.000000000000e+00 8.108337861774e-04 0.000000000000e+00 -8.108337861724e-04 -5.000000000938e-15 8.500000000000e+00 8.598281356127e-04 0.000000000000e+00 -8.598281356077e-04 -5.000000000938e-15 9.000000000000e+00 9.010806803649e-04 0.000000000000e+00 -9.010806803599e-04 -5.000000000938e-15 9.500000000000e+00 9.361020432492e-04 0.000000000000e+00 -9.361020432442e-04 -5.000000000938e-15 1.000000000000e+01 9.661162941907e-04 0.000000000000e+00 -9.661162941857e-04 -5.000000000938e-15 1.050000000000e+01 9.920863059113e-04 0.000000000000e+00 -9.920863059063e-04 -5.000000000938e-15 1.100000000000e+01 1.014762484277e-03 0.000000000000e+00 -1.014762484272e-03 -5.000000000938e-15 1.150000000000e+01 1.034730117837e-03 0.000000000000e+00 -1.034730117832e-03 -5.000000000938e-15 1.200000000000e+01 1.052448384456e-03 0.000000000000e+00 -1.052448384451e-03 -5.000000000938e-15 1.250000000000e+01 1.068280515855e-03 0.000000000000e+00 -1.068280515850e-03 -5.000000000938e-15 1.300000000000e+01 1.082516530532e-03 0.000000000000e+00 -1.082516530527e-03 -5.000000000938e-15 1.350000000000e+01 1.095390217643e-03 0.000000000000e+00 -1.095390217638e-03 -5.000000000938e-15 1.400000000000e+01 1.107091824850e-03 0.000000000000e+00 -1.107091824845e-03 -5.000000000938e-15 1.450000000000e+01 1.117777579373e-03 0.000000000000e+00 -1.117777579368e-03 -5.000000000938e-15 1.500000000000e+01 1.127576882058e-03 0.000000000000e+00 -1.127576882053e-03 -5.000000000938e-15 1.550000000000e+01 1.136597787430e-03 0.000000000000e+00 -1.136597787425e-03 -5.000000000938e-15 1.600000000000e+01 1.144931214359e-03 0.000000000000e+00 -1.144931214354e-03 -5.000000000938e-15 1.650000000000e+01 1.152654209900e-03 0.000000000000e+00 -1.152654209895e-03 -5.000000000938e-15 1.700000000000e+01 1.159832501269e-03 0.000000000000e+00 -1.159832501264e-03 -5.000000000938e-15 1.750000000000e+01 1.166522508127e-03 0.000000000000e+00 -1.166522508122e-03 -5.000000000938e-15 1.800000000000e+01 1.172772942269e-03 0.000000000000e+00 -1.172772942264e-03 -5.000000000938e-15 1.850000000000e+01 1.178626089227e-03 0.000000000000e+00 -1.178626089222e-03 -5.000000000938e-15 1.900000000000e+01 1.184118842689e-03 0.000000000000e+00 -1.184118842684e-03 -5.000000000938e-15 1.950000000000e+01 1.189283545291e-03 0.000000000000e+00 -1.189283545286e-03 -5.000000000938e-15 2.000000000000e+01 1.194148676626e-03 0.000000000000e+00 -1.194148676621e-03 -5.000000000938e-15 1.000000000000e+00 1.083022560522e-13 0.000000000000e+00 -9.830257479598e-14 -1.000000000094e-14 1.500000000000e+00 5.338710884224e-08 0.000000000000e+00 -5.338709884278e-08 -1.000000000094e-14 2.000000000000e+00 4.793042712634e-06 0.000000000000e+00 -4.793042702635e-06 -1.000000000094e-14 2.500000000000e+00 2.113816693591e-05 0.000000000000e+00 -2.113816692591e-05 -1.000000000094e-14 3.000000000000e+00 5.123875899718e-05 0.000000000000e+00 -5.123875898718e-05 -1.000000000094e-14 3.500000000000e+00 9.586487667508e-05 0.000000000000e+00 -9.586487666508e-05 -1.000000000094e-14 4.000000000000e+00 1.549734507123e-04 0.000000000000e+00 -1.549734507023e-04 -1.000000000094e-14 4.500000000000e+00 2.279583175077e-04 0.000000000000e+00 -2.279583174977e-04 -1.000000000094e-14 5.000000000000e+00 3.138256303816e-04 0.000000000000e+00 -3.138256303716e-04 -1.000000000094e-14 5.500000000000e+00 4.113261529967e-04 0.000000000000e+00 -4.113261529867e-04 -1.000000000094e-14 6.000000000000e+00 5.190534364150e-04 0.000000000000e+00 -5.190534364050e-04 -1.000000000094e-14 6.500000000000e+00 6.355106362441e-04 0.000000000000e+00 -6.355106362341e-04 -1.000000000094e-14 7.000000000000e+00 7.591425786989e-04 0.000000000000e+00 -7.591425786889e-04 -1.000000000094e-14 7.500000000000e+00 8.856432593946e-04 0.000000000000e+00 -8.856432593846e-04 -1.000000000094e-14 8.000000000000e+00 1.006122199252e-03 0.000000000000e+00 -1.006122199242e-03 -1.000000000094e-14 8.500000000000e+00 1.115269746388e-03 0.000000000000e+00 -1.115269746378e-03 -1.000000000094e-14 9.000000000000e+00 1.210241308203e-03 0.000000000000e+00 -1.210241308193e-03 -1.000000000094e-14 9.500000000000e+00 1.290655164213e-03 0.000000000000e+00 -1.290655164203e-03 -1.000000000094e-14 1.000000000000e+01 1.357850659752e-03 0.000000000000e+00 -1.357850659742e-03 -1.000000000094e-14 1.050000000000e+01 1.413872904358e-03 0.000000000000e+00 -1.413872904348e-03 -1.000000000094e-14 1.100000000000e+01 1.460788499794e-03 0.000000000000e+00 -1.460788499784e-03 -1.000000000094e-14 1.150000000000e+01 1.500390492097e-03 0.000000000000e+00 -1.500390492087e-03 -1.000000000094e-14 1.200000000000e+01 1.534132673752e-03 0.000000000000e+00 -1.534132673742e-03 -1.000000000094e-14 1.250000000000e+01 1.563159439472e-03 0.000000000000e+00 -1.563159439462e-03 -1.000000000094e-14 1.300000000000e+01 1.588362327687e-03 0.000000000000e+00 -1.588362327677e-03 -1.000000000094e-14 1.350000000000e+01 1.610435638225e-03 0.000000000000e+00 -1.610435638215e-03 -1.000000000094e-14 1.400000000000e+01 1.629922723364e-03 0.000000000000e+00 -1.629922723354e-03 -1.000000000094e-14 1.450000000000e+01 1.647252039989e-03 0.000000000000e+00 -1.647252039979e-03 -1.000000000094e-14 1.500000000000e+01 1.662764439443e-03 0.000000000000e+00 -1.662764439433e-03 -1.000000000094e-14 1.550000000000e+01 1.676733603760e-03 0.000000000000e+00 -1.676733603750e-03 -1.000000000094e-14 1.600000000000e+01 1.689381324882e-03 0.000000000000e+00 -1.689381324872e-03 -1.000000000094e-14 1.650000000000e+01 1.700888966438e-03 0.000000000000e+00 -1.700888966428e-03 -1.000000000094e-14 1.700000000000e+01 1.711406113985e-03 0.000000000000e+00 -1.711406113975e-03 -1.000000000094e-14 1.750000000000e+01 1.721057152450e-03 0.000000000000e+00 -1.721057152440e-03 -1.000000000094e-14 1.800000000000e+01 1.729946308581e-03 0.000000000000e+00 -1.729946308571e-03 -1.000000000094e-14 1.850000000000e+01 1.738161549449e-03 0.000000000000e+00 -1.738161549439e-03 -1.000000000094e-14 1.900000000000e+01 1.745777622060e-03 0.000000000000e+00 -1.745777622050e-03 -1.000000000094e-14 1.950000000000e+01 1.752858443020e-03 0.000000000000e+00 -1.752858443010e-03 -1.000000000094e-14 2.000000000000e+01 1.759458992347e-03 0.000000000000e+00 -1.759458992337e-03 -1.000000000094e-14 1.000000000000e+00 1.509362705539e-07 0.000000000000e+00 -1.509200763743e-07 -1.619417952607e-11 1.500000000000e+00 2.577406315547e-06 0.000000000000e+00 -2.577390121367e-06 -1.619417952607e-11 2.000000000000e+00 9.562845839443e-06 0.000000000000e+00 -9.562829645263e-06 -1.619417952607e-11 2.500000000000e+00 2.177275708395e-05 0.000000000000e+00 -2.177274088977e-05 -1.619417952607e-11 3.000000000000e+00 3.940298106841e-05 0.000000000000e+00 -3.940296487423e-05 -1.619417952607e-11 3.500000000000e+00 6.211161312108e-05 0.000000000000e+00 -6.211159692690e-05 -1.619417952607e-11 4.000000000000e+00 8.751277164306e-05 0.000000000000e+00 -8.751275544888e-05 -1.619417952607e-11 4.500000000000e+00 1.134076984305e-04 0.000000000000e+00 -1.134076822363e-04 -1.619417952607e-11 5.000000000000e+00 1.385603861062e-04 0.000000000000e+00 -1.385603699120e-04 -1.619417952607e-11 5.500000000000e+00 1.622938279819e-04 0.000000000000e+00 -1.622938117877e-04 -1.619417952607e-11 6.000000000000e+00 1.843189759879e-04 0.000000000000e+00 -1.843189597937e-04 -1.619417952607e-11 6.500000000000e+00 2.045853602489e-04 0.000000000000e+00 -2.045853440547e-04 -1.619417952607e-11 7.000000000000e+00 2.231702268654e-04 0.000000000000e+00 -2.231702106713e-04 -1.619417952607e-11 7.500000000000e+00 2.402083326084e-04 0.000000000000e+00 -2.402083164142e-04 -1.619417952607e-11 8.000000000000e+00 2.558522838274e-04 0.000000000000e+00 -2.558522676332e-04 -1.619417952607e-11 8.500000000000e+00 2.702522647193e-04 0.000000000000e+00 -2.702522485251e-04 -1.619417952607e-11 9.000000000000e+00 2.835468808020e-04 0.000000000000e+00 -2.835468646078e-04 -1.619417952607e-11 9.500000000000e+00 2.958599231780e-04 0.000000000000e+00 -2.958599069838e-04 -1.619417952607e-11 1.000000000000e+01 3.073000758711e-04 0.000000000000e+00 -3.073000596769e-04 -1.619417952607e-11 1.050000000000e+01 3.179619553988e-04 0.000000000000e+00 -3.179619392046e-04 -1.619417952607e-11 1.100000000000e+01 3.279276504225e-04 0.000000000000e+00 -3.279276342283e-04 -1.619417952607e-11 1.150000000000e+01 3.372683526367e-04 0.000000000000e+00 -3.372683364425e-04 -1.619417952607e-11 1.200000000000e+01 3.460458927185e-04 0.000000000000e+00 -3.460458765243e-04 -1.619417952607e-11 1.250000000000e+01 3.543141087036e-04 0.000000000000e+00 -3.543140925094e-04 -1.619417952607e-11 1.300000000000e+01 3.621200298195e-04 0.000000000000e+00 -3.621200136253e-04 -1.619417952607e-11 1.350000000000e+01 3.695048843667e-04 0.000000000000e+00 -3.695048681726e-04 -1.619417952607e-11 1.400000000000e+01 3.765049505021e-04 0.000000000000e+00 -3.765049343079e-04 -1.619417952607e-11 1.450000000000e+01 3.831522715186e-04 0.000000000000e+00 -3.831522553245e-04 -1.619417952607e-11 1.500000000000e+01 3.894752564781e-04 0.000000000000e+00 -3.894752402840e-04 -1.619417952607e-11 1.550000000000e+01 3.954991848746e-04 0.000000000000e+00 -3.954991686804e-04 -1.619417952607e-11 1.600000000000e+01 4.012466314175e-04 0.000000000000e+00 -4.012466152233e-04 -1.619417952607e-11 1.650000000000e+01 4.067378244875e-04 0.000000000000e+00 -4.067378082933e-04 -1.619417952607e-11 1.700000000000e+01 4.119909495373e-04 0.000000000000e+00 -4.119909333431e-04 -1.619417952607e-11 1.750000000000e+01 4.170224067487e-04 0.000000000000e+00 -4.170223905545e-04 -1.619417952607e-11 1.800000000000e+01 4.218470347498e-04 0.000000000000e+00 -4.218470185556e-04 -1.619417952607e-11 1.850000000000e+01 4.264782812319e-04 0.000000000000e+00 -4.264782650377e-04 -1.619417952607e-11 1.900000000000e+01 4.309283909022e-04 0.000000000000e+00 -4.309283747080e-04 -1.619417952607e-11 1.950000000000e+01 4.352085257249e-04 0.000000000000e+00 -4.352085095308e-04 -1.619417952607e-11 2.000000000000e+01 4.393288898062e-04 0.000000000000e+00 -4.393288736120e-04 -1.619417952607e-11 1.000000000000e+00 1.521583201007e-07 0.000000000000e+00 -1.521421229209e-07 -1.619717952607e-11 1.500000000000e+00 2.589078694580e-06 0.000000000000e+00 -2.589062497401e-06 -1.619717952607e-11 2.000000000000e+00 9.596439194140e-06 0.000000000000e+00 -9.596422996960e-06 -1.619717952607e-11 2.500000000000e+00 2.184124544113e-05 0.000000000000e+00 -2.184122924395e-05 -1.619717952607e-11 3.000000000000e+00 3.952642418631e-05 0.000000000000e+00 -3.952640798913e-05 -1.619717952607e-11 3.500000000000e+00 6.267249989256e-05 0.000000000000e+00 -6.267248369538e-05 -1.619717952607e-11 4.000000000000e+00 9.120554165904e-05 0.000000000000e+00 -9.120552546186e-05 -1.619717952607e-11 4.500000000000e+00 1.249963535253e-04 0.000000000000e+00 -1.249963373281e-04 -1.619717952607e-11 5.000000000000e+00 1.638667589330e-04 0.000000000000e+00 -1.638667427358e-04 -1.619717952607e-11 5.500000000000e+00 2.071355233272e-04 0.000000000000e+00 -2.071355071301e-04 -1.619717952607e-11 6.000000000000e+00 2.530672461471e-04 0.000000000000e+00 -2.530672299500e-04 -1.619717952607e-11 6.500000000000e+00 3.000895867861e-04 0.000000000000e+00 -3.000895705889e-04 -1.619717952607e-11 7.000000000000e+00 3.468586725405e-04 0.000000000000e+00 -3.468586563433e-04 -1.619717952607e-11 7.500000000000e+00 3.922579707396e-04 0.000000000000e+00 -3.922579545424e-04 -1.619717952607e-11 8.000000000000e+00 4.354738644776e-04 0.000000000000e+00 -4.354738482804e-04 -1.619717952607e-11 8.500000000000e+00 4.760119139659e-04 0.000000000000e+00 -4.760118977687e-04 -1.619717952607e-11 9.000000000000e+00 5.136530277655e-04 0.000000000000e+00 -5.136530115683e-04 -1.619717952607e-11 9.500000000000e+00 5.483816614437e-04 0.000000000000e+00 -5.483816452465e-04 -1.619717952607e-11 1.000000000000e+01 5.803138188322e-04 0.000000000000e+00 -5.803138026350e-04 -1.619717952607e-11 1.050000000000e+01 6.096388779877e-04 0.000000000000e+00 -6.096388617905e-04 -1.619717952607e-11 1.100000000000e+01 6.365785364814e-04 0.000000000000e+00 -6.365785202842e-04 -1.619717952607e-11 1.150000000000e+01 6.613606979112e-04 0.000000000000e+00 -6.613606817140e-04 -1.619717952607e-11 1.200000000000e+01 6.842044250183e-04 0.000000000000e+00 -6.842044088211e-04 -1.619717952607e-11 1.250000000000e+01 7.053122905264e-04 0.000000000000e+00 -7.053122743292e-04 -1.619717952607e-11 1.300000000000e+01 7.248673084015e-04 0.000000000000e+00 -7.248672922043e-04 -1.619717952607e-11 1.350000000000e+01 7.430325105456e-04 0.000000000000e+00 -7.430324943484e-04 -1.619717952607e-11 1.400000000000e+01 7.599519323050e-04 0.000000000000e+00 -7.599519161078e-04 -1.619717952607e-11 1.450000000000e+01 7.757522582793e-04 0.000000000000e+00 -7.757522420821e-04 -1.619717952607e-11 1.500000000000e+01 7.905446971672e-04 0.000000000000e+00 -7.905446809700e-04 -1.619717952607e-11 1.550000000000e+01 8.044268507749e-04 0.000000000000e+00 -8.044268345777e-04 -1.619717952607e-11 1.600000000000e+01 8.174844593545e-04 0.000000000000e+00 -8.174844431573e-04 -1.619717952607e-11 1.650000000000e+01 8.297929727846e-04 0.000000000000e+00 -8.297929565874e-04 -1.619717952607e-11 1.700000000000e+01 8.414189343088e-04 0.000000000000e+00 -8.414189181117e-04 -1.619717952607e-11 1.750000000000e+01 8.524211829582e-04 0.000000000000e+00 -8.524211667610e-04 -1.619717952607e-11 1.800000000000e+01 8.628518899492e-04 0.000000000000e+00 -8.628518737520e-04 -1.619717952607e-11 1.850000000000e+01 8.727574477958e-04 0.000000000000e+00 -8.727574315986e-04 -1.619717952607e-11 1.900000000000e+01 8.821792312507e-04 0.000000000000e+00 -8.821792150535e-04 -1.619717952607e-11 1.950000000000e+01 8.911542480407e-04 0.000000000000e+00 -8.911542318435e-04 -1.619717952607e-11 2.000000000000e+01 8.997156955401e-04 0.000000000000e+00 -8.997156793429e-04 -1.619717952607e-11 1.000000000000e+00 1.539987988740e-07 0.000000000000e+00 -1.539825966951e-07 -1.620217952607e-11 1.500000000000e+00 2.605104778504e-06 0.000000000000e+00 -2.605088576324e-06 -1.620217952607e-11 2.000000000000e+00 9.639364957521e-06 0.000000000000e+00 -9.639348755342e-06 -1.620217952607e-11 2.500000000000e+00 2.192245379500e-05 0.000000000000e+00 -2.192243759282e-05 -1.620217952607e-11 3.000000000000e+00 3.965702181562e-05 0.000000000000e+00 -3.965700561344e-05 -1.620217952607e-11 3.500000000000e+00 6.286434020084e-05 0.000000000000e+00 -6.286432399866e-05 -1.620217952607e-11 4.000000000000e+00 9.147257179544e-05 0.000000000000e+00 -9.147255559326e-05 -1.620217952607e-11 4.500000000000e+00 1.253563508484e-04 0.000000000000e+00 -1.253563346462e-04 -1.620217952607e-11 5.000000000000e+00 1.643570572987e-04 0.000000000000e+00 -1.643570410965e-04 -1.620217952607e-11 5.500000000000e+00 2.082939924800e-04 0.000000000000e+00 -2.082939762778e-04 -1.620217952607e-11 6.000000000000e+00 2.569708374280e-04 0.000000000000e+00 -2.569708212259e-04 -1.620217952607e-11 6.500000000000e+00 3.101792765549e-04 0.000000000000e+00 -3.101792603527e-04 -1.620217952607e-11 7.000000000000e+00 3.676893072811e-04 0.000000000000e+00 -3.676892910790e-04 -1.620217952607e-11 7.500000000000e+00 4.289879694490e-04 0.000000000000e+00 -4.289879532468e-04 -1.620217952607e-11 8.000000000000e+00 4.929499958779e-04 0.000000000000e+00 -4.929499796757e-04 -1.620217952607e-11 8.500000000000e+00 5.584219736440e-04 0.000000000000e+00 -5.584219574418e-04 -1.620217952607e-11 9.000000000000e+00 6.242550318863e-04 0.000000000000e+00 -6.242550156841e-04 -1.620217952607e-11 9.500000000000e+00 6.892840778410e-04 0.000000000000e+00 -6.892840616388e-04 -1.620217952607e-11 1.000000000000e+01 7.524108039604e-04 0.000000000000e+00 -7.524107877582e-04 -1.620217952607e-11 1.050000000000e+01 8.127085297219e-04 0.000000000000e+00 -8.127085135197e-04 -1.620217952607e-11 1.100000000000e+01 8.695017053257e-04 0.000000000000e+00 -8.695016891235e-04 -1.620217952607e-11 1.150000000000e+01 9.223933738896e-04 0.000000000000e+00 -9.223933576874e-04 -1.620217952607e-11 1.200000000000e+01 9.712412410668e-04 0.000000000000e+00 -9.712412248646e-04 -1.620217952607e-11 1.250000000000e+01 1.016102273481e-03 0.000000000000e+00 -1.016102257279e-03 -1.620217952607e-11 1.300000000000e+01 1.057168757901e-03 0.000000000000e+00 -1.057168741699e-03 -1.620217952607e-11 1.350000000000e+01 1.094711370519e-03 0.000000000000e+00 -1.094711354317e-03 -1.620217952607e-11 1.400000000000e+01 1.129035809537e-03 0.000000000000e+00 -1.129035793335e-03 -1.620217952607e-11 1.450000000000e+01 1.160453382457e-03 0.000000000000e+00 -1.160453366255e-03 -1.620217952607e-11 1.500000000000e+01 1.189263064095e-03 0.000000000000e+00 -1.189263047893e-03 -1.620217952607e-11 1.550000000000e+01 1.215741852916e-03 0.000000000000e+00 -1.215741836713e-03 -1.620217952607e-11 1.600000000000e+01 1.240140613977e-03 0.000000000000e+00 -1.240140597774e-03 -1.620217952607e-11 1.650000000000e+01 1.262683282261e-03 0.000000000000e+00 -1.262683266059e-03 -1.620217952607e-11 1.700000000000e+01 1.283567962978e-03 0.000000000000e+00 -1.283567946776e-03 -1.620217952607e-11 1.750000000000e+01 1.302968986533e-03 0.000000000000e+00 -1.302968970331e-03 -1.620217952607e-11 1.800000000000e+01 1.321039344255e-03 0.000000000000e+00 -1.321039328053e-03 -1.620217952607e-11 1.850000000000e+01 1.337913174678e-03 0.000000000000e+00 -1.337913158476e-03 -1.620217952607e-11 1.900000000000e+01 1.353708123767e-03 0.000000000000e+00 -1.353708107565e-03 -1.620217952607e-11 1.950000000000e+01 1.368527495492e-03 0.000000000000e+00 -1.368527479290e-03 -1.620217952607e-11 2.000000000000e+01 1.382462163160e-03 0.000000000000e+00 -1.382462146958e-03 -1.620217952607e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Id1_vb1.standard0000644000265600020320000010243012264261473024252 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.435832744593e-04 0.000000000000e+00 -2.435832744483e-04 -1.100000000000e-14 1.500000000000e+00 3.486308849556e-04 0.000000000000e+00 -3.486308849441e-04 -1.150000000000e-14 2.000000000000e+00 4.442245279042e-04 0.000000000000e+00 -4.442245278922e-04 -1.200000000000e-14 2.500000000000e+00 5.314318912709e-04 0.000000000000e+00 -5.314318912584e-04 -1.250000000000e-14 3.000000000000e+00 6.111726227737e-04 0.000000000000e+00 -6.111726227607e-04 -1.300000000000e-14 3.500000000000e+00 6.842386783110e-04 0.000000000000e+00 -6.842386782975e-04 -1.350000000000e-14 4.000000000000e+00 7.513129291461e-04 0.000000000000e+00 -7.513129291321e-04 -1.400000000000e-14 4.500000000000e+00 8.129854614613e-04 0.000000000000e+00 -8.129854614468e-04 -1.450000000000e-14 5.000000000000e+00 8.697675580074e-04 0.000000000000e+00 -8.697675579924e-04 -1.500000000000e-14 5.500000000000e+00 9.221035197510e-04 0.000000000000e+00 -9.221035197355e-04 -1.550000000000e-14 6.000000000000e+00 9.703807365658e-04 0.000000000000e+00 -9.703807365498e-04 -1.600000000000e-14 6.500000000000e+00 1.014938068041e-03 0.000000000000e+00 -1.014938068024e-03 -1.650000000000e-14 7.000000000000e+00 1.056073004282e-03 0.000000000000e+00 -1.056073004265e-03 -1.700000000000e-14 7.500000000000e+00 1.094047710502e-03 0.000000000000e+00 -1.094047710484e-03 -1.750000000000e-14 8.000000000000e+00 1.129094182137e-03 0.000000000000e+00 -1.129094182119e-03 -1.800000000000e-14 8.500000000000e+00 1.161418666271e-03 0.000000000000e+00 -1.161418666253e-03 -1.850000000000e-14 9.000000000000e+00 1.191205479498e-03 0.000000000000e+00 -1.191205479479e-03 -1.900000000000e-14 9.500000000000e+00 1.218620327901e-03 0.000000000000e+00 -1.218620327881e-03 -1.950000000000e-14 1.000000000000e+01 1.243813212946e-03 0.000000000000e+00 -1.243813212926e-03 -2.000000000000e-14 1.050000000000e+01 1.266920987796e-03 0.000000000000e+00 -1.266920987776e-03 -2.050000000000e-14 1.100000000000e+01 1.288069611509e-03 0.000000000000e+00 -1.288069611488e-03 -2.100000000000e-14 1.150000000000e+01 1.307376133507e-03 0.000000000000e+00 -1.307376133486e-03 -2.150000000000e-14 1.200000000000e+01 1.324950427710e-03 0.000000000000e+00 -1.324950427688e-03 -2.200000000000e-14 1.250000000000e+01 1.340896685141e-03 0.000000000000e+00 -1.340896685118e-03 -2.250000000000e-14 1.300000000000e+01 1.355314666100e-03 0.000000000000e+00 -1.355314666077e-03 -2.300000000000e-14 1.350000000000e+01 1.368300708863e-03 0.000000000000e+00 -1.368300708840e-03 -2.350000000000e-14 1.400000000000e+01 1.379948491651e-03 0.000000000000e+00 -1.379948491627e-03 -2.400000000000e-14 1.450000000000e+01 1.390349548549e-03 0.000000000000e+00 -1.390349548525e-03 -2.450000000000e-14 1.500000000000e+01 1.399593547640e-03 0.000000000000e+00 -1.399593547615e-03 -2.500000000000e-14 1.550000000000e+01 1.407768349766e-03 0.000000000000e+00 -1.407768349741e-03 -2.550000000000e-14 1.600000000000e+01 1.414959877502e-03 0.000000000000e+00 -1.414959877476e-03 -2.600000000000e-14 1.650000000000e+01 1.421251834076e-03 0.000000000000e+00 -1.421251834050e-03 -2.650000000000e-14 1.700000000000e+01 1.426725319449e-03 0.000000000000e+00 -1.426725319422e-03 -2.700000000000e-14 1.750000000000e+01 1.431458394124e-03 0.000000000000e+00 -1.431458394096e-03 -2.750000000000e-14 1.800000000000e+01 1.435525640172e-03 0.000000000000e+00 -1.435525640144e-03 -2.800000000000e-14 1.850000000000e+01 1.438997763708e-03 0.000000000000e+00 -1.438997763680e-03 -2.850000000000e-14 1.900000000000e+01 1.441941274911e-03 0.000000000000e+00 -1.441941274882e-03 -2.900000000000e-14 1.950000000000e+01 1.444418272415e-03 0.000000000000e+00 -1.444418272386e-03 -2.950000000000e-14 2.000000000000e+01 1.446486350553e-03 0.000000000000e+00 -1.446486350523e-03 -3.000000000000e-14 1.000000000000e+00 2.415355490334e-04 0.000000000000e+00 -2.415355490224e-04 -1.100000000000e-14 1.500000000000e+00 3.457080039821e-04 0.000000000000e+00 -3.457080039706e-04 -1.150000000000e-14 2.000000000000e+00 4.405210334980e-04 0.000000000000e+00 -4.405210334860e-04 -1.200000000000e-14 2.500000000000e+00 5.270373571405e-04 0.000000000000e+00 -5.270373571280e-04 -1.250000000000e-14 3.000000000000e+00 6.061713801949e-04 0.000000000000e+00 -6.061713801819e-04 -1.300000000000e-14 3.500000000000e+00 6.787099087684e-04 0.000000000000e+00 -6.787099087549e-04 -1.350000000000e-14 4.000000000000e+00 7.453309426469e-04 0.000000000000e+00 -7.453309426329e-04 -1.400000000000e-14 4.500000000000e+00 8.066200560595e-04 0.000000000000e+00 -8.066200560450e-04 -1.450000000000e-14 5.000000000000e+00 8.630843933820e-04 0.000000000000e+00 -8.630843933670e-04 -1.500000000000e-14 5.500000000000e+00 9.151645084640e-04 0.000000000000e+00 -9.151645084485e-04 -1.550000000000e-14 6.000000000000e+00 9.632443453947e-04 0.000000000000e+00 -9.632443453787e-04 -1.600000000000e-14 6.500000000000e+00 1.007659593483e-03 0.000000000000e+00 -1.007659593466e-03 -1.650000000000e-14 7.000000000000e+00 1.048704846847e-03 0.000000000000e+00 -1.048704846830e-03 -1.700000000000e-14 7.500000000000e+00 1.086639516178e-03 0.000000000000e+00 -1.086639516161e-03 -1.750000000000e-14 8.000000000000e+00 1.121692965346e-03 0.000000000000e+00 -1.121692965328e-03 -1.800000000000e-14 8.500000000000e+00 1.154068865088e-03 0.000000000000e+00 -1.154068865069e-03 -1.850000000000e-14 9.000000000000e+00 1.183948951591e-03 0.000000000000e+00 -1.183948951572e-03 -1.900000000000e-14 9.500000000000e+00 1.211496289041e-03 0.000000000000e+00 -1.211496289022e-03 -1.950000000000e-14 1.000000000000e+01 1.236858121708e-03 0.000000000000e+00 -1.236858121688e-03 -2.000000000000e-14 1.050000000000e+01 1.260168382456e-03 0.000000000000e+00 -1.260168382435e-03 -2.050000000000e-14 1.100000000000e+01 1.281549907982e-03 0.000000000000e+00 -1.281549907961e-03 -2.100000000000e-14 1.150000000000e+01 1.301116396519e-03 0.000000000000e+00 -1.301116396498e-03 -2.150000000000e-14 1.200000000000e+01 1.318974130878e-03 0.000000000000e+00 -1.318974130856e-03 -2.200000000000e-14 1.250000000000e+01 1.335223478874e-03 0.000000000000e+00 -1.335223478852e-03 -2.250000000000e-14 1.300000000000e+01 1.349960174694e-03 0.000000000000e+00 -1.349960174671e-03 -2.300000000000e-14 1.350000000000e+01 1.363276379129e-03 0.000000000000e+00 -1.363276379106e-03 -2.350000000000e-14 1.400000000000e+01 1.375261514439e-03 0.000000000000e+00 -1.375261514415e-03 -2.400000000000e-14 1.450000000000e+01 1.386002871107e-03 0.000000000000e+00 -1.386002871082e-03 -2.450000000000e-14 1.500000000000e+01 1.395585988961e-03 0.000000000000e+00 -1.395585988936e-03 -2.500000000000e-14 1.550000000000e+01 1.404094823323e-03 0.000000000000e+00 -1.404094823297e-03 -2.550000000000e-14 1.600000000000e+01 1.411611716851e-03 0.000000000000e+00 -1.411611716825e-03 -2.600000000000e-14 1.650000000000e+01 1.418217208018e-03 0.000000000000e+00 -1.418217207991e-03 -2.650000000000e-14 1.700000000000e+01 1.423989715816e-03 0.000000000000e+00 -1.423989715789e-03 -2.700000000000e-14 1.750000000000e+01 1.429005146015e-03 0.000000000000e+00 -1.429005145988e-03 -2.750000000000e-14 1.800000000000e+01 1.433336465982e-03 0.000000000000e+00 -1.433336465954e-03 -2.800000000000e-14 1.850000000000e+01 1.437053292772e-03 0.000000000000e+00 -1.437053292744e-03 -2.850000000000e-14 1.900000000000e+01 1.440221533398e-03 0.000000000000e+00 -1.440221533369e-03 -2.900000000000e-14 1.950000000000e+01 1.442903108311e-03 0.000000000000e+00 -1.442903108281e-03 -2.950000000000e-14 2.000000000000e+01 1.445155780929e-03 0.000000000000e+00 -1.445155780899e-03 -3.000000000000e-14 1.000000000000e+00 2.390602515012e-04 0.000000000000e+00 -2.390602514902e-04 -1.100000000000e-14 1.500000000000e+00 3.421681926553e-04 0.000000000000e+00 -3.421681926438e-04 -1.150000000000e-14 2.000000000000e+00 4.360269166772e-04 0.000000000000e+00 -4.360269166652e-04 -1.200000000000e-14 2.500000000000e+00 5.216934784506e-04 0.000000000000e+00 -5.216934784381e-04 -1.250000000000e-14 3.000000000000e+00 6.000763103112e-04 0.000000000000e+00 -6.000763102982e-04 -1.300000000000e-14 3.500000000000e+00 6.719563625507e-04 0.000000000000e+00 -6.719563625372e-04 -1.350000000000e-14 4.000000000000e+00 7.380061119888e-04 0.000000000000e+00 -7.380061119748e-04 -1.400000000000e-14 4.500000000000e+00 7.988060375618e-04 0.000000000000e+00 -7.988060375473e-04 -1.450000000000e-14 5.000000000000e+00 8.548586407834e-04 0.000000000000e+00 -8.548586407684e-04 -1.500000000000e-14 5.500000000000e+00 9.066002699852e-04 0.000000000000e+00 -9.066002699697e-04 -1.550000000000e-14 6.000000000000e+00 9.544110536299e-04 0.000000000000e+00 -9.544110536139e-04 -1.600000000000e-14 6.500000000000e+00 9.986232318611e-04 0.000000000000e+00 -9.986232318446e-04 -1.650000000000e-14 7.000000000000e+00 1.039528204123e-03 0.000000000000e+00 -1.039528204106e-03 -1.700000000000e-14 7.500000000000e+00 1.077382423047e-03 0.000000000000e+00 -1.077382423030e-03 -1.750000000000e-14 8.000000000000e+00 1.112412440307e-03 0.000000000000e+00 -1.112412440289e-03 -1.800000000000e-14 8.500000000000e+00 1.144819194957e-03 0.000000000000e+00 -1.144819194939e-03 -1.850000000000e-14 9.000000000000e+00 1.174781701785e-03 0.000000000000e+00 -1.174781701766e-03 -1.900000000000e-14 9.500000000000e+00 1.202460244351e-03 0.000000000000e+00 -1.202460244331e-03 -1.950000000000e-14 1.000000000000e+01 1.227999160007e-03 0.000000000000e+00 -1.227999159987e-03 -2.000000000000e-14 1.050000000000e+01 1.251529286060e-03 0.000000000000e+00 -1.251529286040e-03 -2.050000000000e-14 1.100000000000e+01 1.273170120440e-03 0.000000000000e+00 -1.273170120419e-03 -2.100000000000e-14 1.150000000000e+01 1.293031736262e-03 0.000000000000e+00 -1.293031736241e-03 -2.150000000000e-14 1.200000000000e+01 1.311216477343e-03 0.000000000000e+00 -1.311216477321e-03 -2.200000000000e-14 1.250000000000e+01 1.327820450964e-03 0.000000000000e+00 -1.327820450941e-03 -2.250000000000e-14 1.300000000000e+01 1.342934825233e-03 0.000000000000e+00 -1.342934825210e-03 -2.300000000000e-14 1.350000000000e+01 1.356646931605e-03 0.000000000000e+00 -1.356646931582e-03 -2.350000000000e-14 1.400000000000e+01 1.369041169040e-03 0.000000000000e+00 -1.369041169016e-03 -2.400000000000e-14 1.450000000000e+01 1.380199705231e-03 0.000000000000e+00 -1.380199705207e-03 -2.450000000000e-14 1.500000000000e+01 1.390202972675e-03 0.000000000000e+00 -1.390202972650e-03 -2.500000000000e-14 1.550000000000e+01 1.399129962708e-03 0.000000000000e+00 -1.399129962682e-03 -2.550000000000e-14 1.600000000000e+01 1.407058328564e-03 0.000000000000e+00 -1.407058328538e-03 -2.600000000000e-14 1.650000000000e+01 1.414064317637e-03 0.000000000000e+00 -1.414064317611e-03 -2.650000000000e-14 1.700000000000e+01 1.420222562236e-03 0.000000000000e+00 -1.420222562209e-03 -2.700000000000e-14 1.750000000000e+01 1.425605765501e-03 0.000000000000e+00 -1.425605765473e-03 -2.750000000000e-14 1.800000000000e+01 1.430284323761e-03 0.000000000000e+00 -1.430284323733e-03 -2.800000000000e-14 1.850000000000e+01 1.434325927605e-03 0.000000000000e+00 -1.434325927577e-03 -2.850000000000e-14 1.900000000000e+01 1.437795181475e-03 0.000000000000e+00 -1.437795181446e-03 -2.900000000000e-14 1.950000000000e+01 1.440753276231e-03 0.000000000000e+00 -1.440753276202e-03 -2.950000000000e-14 2.000000000000e+01 1.443257742213e-03 0.000000000000e+00 -1.443257742183e-03 -3.000000000000e-14 1.000000000000e+00 2.814860317277e-04 0.000000000000e+00 -2.814860317167e-04 -1.100000000000e-14 1.500000000000e+00 4.021515046025e-04 0.000000000000e+00 -4.021515045910e-04 -1.150000000000e-14 2.000000000000e+00 5.117474409271e-04 0.000000000000e+00 -5.117474409151e-04 -1.200000000000e-14 2.500000000000e+00 6.116712396178e-04 0.000000000000e+00 -6.116712396053e-04 -1.250000000000e-14 3.000000000000e+00 7.031027941626e-04 0.000000000000e+00 -7.031027941496e-04 -1.300000000000e-14 3.500000000000e+00 7.870420314280e-04 0.000000000000e+00 -7.870420314145e-04 -1.350000000000e-14 4.000000000000e+00 8.643400074267e-04 0.000000000000e+00 -8.643400074127e-04 -1.400000000000e-14 4.500000000000e+00 9.357243736275e-04 0.000000000000e+00 -9.357243736130e-04 -1.450000000000e-14 5.000000000000e+00 1.001820142103e-03 0.000000000000e+00 -1.001820142088e-03 -1.500000000000e-14 5.500000000000e+00 1.063166608302e-03 0.000000000000e+00 -1.063166608287e-03 -1.550000000000e-14 6.000000000000e+00 1.120231165439e-03 0.000000000000e+00 -1.120231165423e-03 -1.600000000000e-14 6.500000000000e+00 1.173420614946e-03 0.000000000000e+00 -1.173420614930e-03 -1.650000000000e-14 7.000000000000e+00 1.223090461437e-03 0.000000000000e+00 -1.223090461420e-03 -1.700000000000e-14 7.500000000000e+00 1.269552594193e-03 0.000000000000e+00 -1.269552594176e-03 -1.750000000000e-14 8.000000000000e+00 1.313081594314e-03 0.000000000000e+00 -1.313081594296e-03 -1.800000000000e-14 8.500000000000e+00 1.353920119233e-03 0.000000000000e+00 -1.353920119215e-03 -1.850000000000e-14 9.000000000000e+00 1.392283256944e-03 0.000000000000e+00 -1.392283256925e-03 -1.900000000000e-14 9.500000000000e+00 1.428362269423e-03 0.000000000000e+00 -1.428362269403e-03 -1.950000000000e-14 1.000000000000e+01 1.462327732411e-03 0.000000000000e+00 -1.462327732391e-03 -2.000000000000e-14 1.050000000000e+01 1.494332197097e-03 0.000000000000e+00 -1.494332197076e-03 -2.050000000000e-14 1.100000000000e+01 1.524512456381e-03 0.000000000000e+00 -1.524512456360e-03 -2.100000000000e-14 1.150000000000e+01 1.552991462590e-03 0.000000000000e+00 -1.552991462568e-03 -2.150000000000e-14 1.200000000000e+01 1.579880066815e-03 0.000000000000e+00 -1.579880066793e-03 -2.200000000000e-14 1.250000000000e+01 1.605278351367e-03 0.000000000000e+00 -1.605278351345e-03 -2.250000000000e-14 1.300000000000e+01 1.629276936760e-03 0.000000000000e+00 -1.629276936737e-03 -2.300000000000e-14 1.350000000000e+01 1.651958049657e-03 0.000000000000e+00 -1.651958049634e-03 -2.350000000000e-14 1.400000000000e+01 1.673396469090e-03 0.000000000000e+00 -1.673396469066e-03 -2.400000000000e-14 1.450000000000e+01 1.693660357418e-03 0.000000000000e+00 -1.693660357394e-03 -2.450000000000e-14 1.500000000000e+01 1.712811993543e-03 0.000000000000e+00 -1.712811993518e-03 -2.500000000000e-14 1.550000000000e+01 1.730908422988e-03 0.000000000000e+00 -1.730908422963e-03 -2.550000000000e-14 1.600000000000e+01 1.748002037077e-03 0.000000000000e+00 -1.748002037051e-03 -2.600000000000e-14 1.650000000000e+01 1.764141091450e-03 0.000000000000e+00 -1.764141091424e-03 -2.650000000000e-14 1.700000000000e+01 1.779370172449e-03 0.000000000000e+00 -1.779370172422e-03 -2.700000000000e-14 1.750000000000e+01 1.793730618473e-03 0.000000000000e+00 -1.793730618445e-03 -2.750000000000e-14 1.800000000000e+01 1.807260902160e-03 0.000000000000e+00 -1.807260902132e-03 -2.800000000000e-14 1.850000000000e+01 1.819996978170e-03 0.000000000000e+00 -1.819996978142e-03 -2.850000000000e-14 1.900000000000e+01 1.831972600391e-03 0.000000000000e+00 -1.831972600362e-03 -2.900000000000e-14 1.950000000000e+01 1.843219611590e-03 0.000000000000e+00 -1.843219611560e-03 -2.950000000000e-14 2.000000000000e+01 1.853768207762e-03 0.000000000000e+00 -1.853768207732e-03 -3.000000000000e-14 1.000000000000e+00 2.787323855186e-04 0.000000000000e+00 -2.787323855076e-04 -1.100000000000e-14 1.500000000000e+00 3.982147754100e-04 0.000000000000e+00 -3.982147753985e-04 -1.150000000000e-14 2.000000000000e+00 5.067431163110e-04 0.000000000000e+00 -5.067431162990e-04 -1.200000000000e-14 2.500000000000e+00 6.057046049318e-04 0.000000000000e+00 -6.057046049193e-04 -1.250000000000e-14 3.000000000000e+00 6.962696183327e-04 0.000000000000e+00 -6.962696183197e-04 -1.300000000000e-14 3.500000000000e+00 7.794294227599e-04 0.000000000000e+00 -7.794294227464e-04 -1.350000000000e-14 4.000000000000e+00 8.560273011743e-04 0.000000000000e+00 -8.560273011603e-04 -1.400000000000e-14 4.500000000000e+00 9.267839835889e-04 0.000000000000e+00 -9.267839835744e-04 -1.450000000000e-14 5.000000000000e+00 9.923183457847e-04 0.000000000000e+00 -9.923183457697e-04 -1.500000000000e-14 5.500000000000e+00 1.053164254837e-03 0.000000000000e+00 -1.053164254822e-03 -1.550000000000e-14 6.000000000000e+00 1.109784305582e-03 0.000000000000e+00 -1.109784305566e-03 -1.600000000000e-14 6.500000000000e+00 1.162581057396e-03 0.000000000000e+00 -1.162581057380e-03 -1.650000000000e-14 7.000000000000e+00 1.211906261917e-03 0.000000000000e+00 -1.211906261900e-03 -1.700000000000e-14 7.500000000000e+00 1.258068473381e-03 0.000000000000e+00 -1.258068473363e-03 -1.750000000000e-14 8.000000000000e+00 1.301339359062e-03 0.000000000000e+00 -1.301339359044e-03 -1.800000000000e-14 8.500000000000e+00 1.341958918852e-03 0.000000000000e+00 -1.341958918833e-03 -1.850000000000e-14 9.000000000000e+00 1.380139922192e-03 0.000000000000e+00 -1.380139922173e-03 -1.900000000000e-14 9.500000000000e+00 1.416071549880e-03 0.000000000000e+00 -1.416071549861e-03 -1.950000000000e-14 1.000000000000e+01 1.449922515841e-03 0.000000000000e+00 -1.449922515821e-03 -2.000000000000e-14 1.050000000000e+01 1.481843700590e-03 0.000000000000e+00 -1.481843700569e-03 -2.050000000000e-14 1.100000000000e+01 1.511970392377e-03 0.000000000000e+00 -1.511970392356e-03 -2.100000000000e-14 1.150000000000e+01 1.540424186973e-03 0.000000000000e+00 -1.540424186952e-03 -2.150000000000e-14 1.200000000000e+01 1.567314689022e-03 0.000000000000e+00 -1.567314689000e-03 -2.200000000000e-14 1.250000000000e+01 1.592740851077e-03 0.000000000000e+00 -1.592740851054e-03 -2.250000000000e-14 1.300000000000e+01 1.616792247449e-03 0.000000000000e+00 -1.616792247426e-03 -2.300000000000e-14 1.350000000000e+01 1.639550129914e-03 0.000000000000e+00 -1.639550129890e-03 -2.350000000000e-14 1.400000000000e+01 1.661088358843e-03 0.000000000000e+00 -1.661088358819e-03 -2.400000000000e-14 1.450000000000e+01 1.681474219835e-03 0.000000000000e+00 -1.681474219811e-03 -2.450000000000e-14 1.500000000000e+01 1.700769143216e-03 0.000000000000e+00 -1.700769143191e-03 -2.500000000000e-14 1.550000000000e+01 1.719029340929e-03 0.000000000000e+00 -1.719029340903e-03 -2.550000000000e-14 1.600000000000e+01 1.736306373009e-03 0.000000000000e+00 -1.736306372983e-03 -2.600000000000e-14 1.650000000000e+01 1.752647653888e-03 0.000000000000e+00 -1.752647653862e-03 -2.650000000000e-14 1.700000000000e+01 1.768096907097e-03 0.000000000000e+00 -1.768096907070e-03 -2.700000000000e-14 1.750000000000e+01 1.782694575584e-03 0.000000000000e+00 -1.782694575557e-03 -2.750000000000e-14 1.800000000000e+01 1.796478193642e-03 0.000000000000e+00 -1.796478193614e-03 -2.800000000000e-14 1.850000000000e+01 1.809482725395e-03 0.000000000000e+00 -1.809482725366e-03 -2.850000000000e-14 1.900000000000e+01 1.821740873924e-03 0.000000000000e+00 -1.821740873895e-03 -2.900000000000e-14 1.950000000000e+01 1.833283364272e-03 0.000000000000e+00 -1.833283364242e-03 -2.950000000000e-14 2.000000000000e+01 1.844139202903e-03 0.000000000000e+00 -1.844139202873e-03 -3.000000000000e-14 1.000000000000e+00 2.754144176430e-04 0.000000000000e+00 -2.754144176320e-04 -1.100000000000e-14 1.500000000000e+00 3.934632043652e-04 0.000000000000e+00 -3.934632043537e-04 -1.150000000000e-14 2.000000000000e+00 5.006922607631e-04 0.000000000000e+00 -5.006922607511e-04 -1.200000000000e-14 2.500000000000e+00 5.984769314460e-04 0.000000000000e+00 -5.984769314335e-04 -1.250000000000e-14 3.000000000000e+00 6.879765563188e-04 0.000000000000e+00 -6.879765563058e-04 -1.300000000000e-14 3.500000000000e+00 7.701723709608e-04 0.000000000000e+00 -7.701723709473e-04 -1.350000000000e-14 4.000000000000e+00 8.458986672988e-04 0.000000000000e+00 -8.458986672848e-04 -1.400000000000e-14 4.500000000000e+00 9.158681797892e-04 0.000000000000e+00 -9.158681797747e-04 -1.450000000000e-14 5.000000000000e+00 9.806927054705e-04 0.000000000000e+00 -9.806927054555e-04 -1.500000000000e-14 5.500000000000e+00 1.040899858828e-03 0.000000000000e+00 -1.040899858812e-03 -1.550000000000e-14 6.000000000000e+00 1.096946717164e-03 0.000000000000e+00 -1.096946717148e-03 -1.600000000000e-14 6.500000000000e+00 1.149230971496e-03 0.000000000000e+00 -1.149230971480e-03 -1.650000000000e-14 7.000000000000e+00 1.198100075988e-03 0.000000000000e+00 -1.198100075971e-03 -1.700000000000e-14 7.500000000000e+00 1.243858788330e-03 0.000000000000e+00 -1.243858788313e-03 -1.750000000000e-14 8.000000000000e+00 1.286775421306e-03 0.000000000000e+00 -1.286775421288e-03 -1.800000000000e-14 8.500000000000e+00 1.327086994792e-03 0.000000000000e+00 -1.327086994774e-03 -1.850000000000e-14 9.000000000000e+00 1.365003646705e-03 0.000000000000e+00 -1.365003646686e-03 -1.900000000000e-14 9.500000000000e+00 1.400712217276e-03 0.000000000000e+00 -1.400712217256e-03 -1.950000000000e-14 1.000000000000e+01 1.434379338299e-03 0.000000000000e+00 -1.434379338279e-03 -2.000000000000e-14 1.050000000000e+01 1.466154034119e-03 0.000000000000e+00 -1.466154034099e-03 -2.050000000000e-14 1.100000000000e+01 1.496169933952e-03 0.000000000000e+00 -1.496169933931e-03 -2.100000000000e-14 1.150000000000e+01 1.524547161555e-03 0.000000000000e+00 -1.524547161533e-03 -2.150000000000e-14 1.200000000000e+01 1.551393956026e-03 0.000000000000e+00 -1.551393956004e-03 -2.200000000000e-14 1.250000000000e+01 1.576808047816e-03 0.000000000000e+00 -1.576808047794e-03 -2.250000000000e-14 1.300000000000e+01 1.600877940326e-03 0.000000000000e+00 -1.600877940303e-03 -2.300000000000e-14 1.350000000000e+01 1.623683853917e-03 0.000000000000e+00 -1.623683853893e-03 -2.350000000000e-14 1.400000000000e+01 1.645298704538e-03 0.000000000000e+00 -1.645298704514e-03 -2.400000000000e-14 1.450000000000e+01 1.665788888967e-03 0.000000000000e+00 -1.665788888943e-03 -2.450000000000e-14 1.500000000000e+01 1.685214988572e-03 0.000000000000e+00 -1.685214988547e-03 -2.500000000000e-14 1.550000000000e+01 1.703632390963e-03 0.000000000000e+00 -1.703632390937e-03 -2.550000000000e-14 1.600000000000e+01 1.721091841601e-03 0.000000000000e+00 -1.721091841575e-03 -2.600000000000e-14 1.650000000000e+01 1.737639935576e-03 0.000000000000e+00 -1.737639935550e-03 -2.650000000000e-14 1.700000000000e+01 1.753319558129e-03 0.000000000000e+00 -1.753319558102e-03 -2.700000000000e-14 1.750000000000e+01 1.768170281182e-03 0.000000000000e+00 -1.768170281154e-03 -2.750000000000e-14 1.800000000000e+01 1.782228721982e-03 0.000000000000e+00 -1.782228721954e-03 -2.800000000000e-14 1.850000000000e+01 1.795528868981e-03 0.000000000000e+00 -1.795528868953e-03 -2.850000000000e-14 1.900000000000e+01 1.808102379229e-03 0.000000000000e+00 -1.808102379200e-03 -2.900000000000e-14 1.950000000000e+01 1.819978850801e-03 0.000000000000e+00 -1.819978850772e-03 -2.950000000000e-14 2.000000000000e+01 1.831186073133e-03 0.000000000000e+00 -1.831186073103e-03 -3.000000000000e-14 1.000000000000e+00 1.926546660957e-04 0.000000000000e+00 -1.926546660847e-04 -1.100000000000e-14 1.500000000000e+00 2.758821354513e-04 0.000000000000e+00 -2.758821354398e-04 -1.150000000000e-14 2.000000000000e+00 3.513846838849e-04 0.000000000000e+00 -3.513846838729e-04 -1.200000000000e-14 2.500000000000e+00 4.198412882294e-04 0.000000000000e+00 -4.198412882169e-04 -1.250000000000e-14 3.000000000000e+00 4.818622827793e-04 0.000000000000e+00 -4.818622827663e-04 -1.300000000000e-14 3.500000000000e+00 5.379926684023e-04 0.000000000000e+00 -5.379926683888e-04 -1.350000000000e-14 4.000000000000e+00 5.887183152802e-04 0.000000000000e+00 -5.887183152662e-04 -1.400000000000e-14 4.500000000000e+00 6.344732918347e-04 0.000000000000e+00 -6.344732918202e-04 -1.450000000000e-14 5.000000000000e+00 6.756474034563e-04 0.000000000000e+00 -6.756474034413e-04 -1.500000000000e-14 5.500000000000e+00 7.125934552311e-04 0.000000000000e+00 -7.125934552156e-04 -1.550000000000e-14 6.000000000000e+00 7.456339704179e-04 0.000000000000e+00 -7.456339704019e-04 -1.600000000000e-14 6.500000000000e+00 7.750672012250e-04 0.000000000000e+00 -7.750672012085e-04 -1.650000000000e-14 7.000000000000e+00 8.011723151996e-04 0.000000000000e+00 -8.011723151826e-04 -1.700000000000e-14 7.500000000000e+00 8.242136621926e-04 0.000000000000e+00 -8.242136621751e-04 -1.750000000000e-14 8.000000000000e+00 8.444440449401e-04 0.000000000000e+00 -8.444440449221e-04 -1.800000000000e-14 8.500000000000e+00 8.621069453304e-04 0.000000000000e+00 -8.621069453119e-04 -1.850000000000e-14 9.000000000000e+00 8.774377067635e-04 0.000000000000e+00 -8.774377067445e-04 -1.900000000000e-14 9.500000000000e+00 8.906637416422e-04 0.000000000000e+00 -8.906637416227e-04 -1.950000000000e-14 1.000000000000e+01 9.020039139943e-04 0.000000000000e+00 -9.020039139743e-04 -2.000000000000e-14 1.050000000000e+01 9.116673240535e-04 0.000000000000e+00 -9.116673240330e-04 -2.050000000000e-14 1.100000000000e+01 9.198517738151e-04 0.000000000000e+00 -9.198517737941e-04 -2.100000000000e-14 1.150000000000e+01 9.267422035267e-04 0.000000000000e+00 -9.267422035052e-04 -2.150000000000e-14 1.200000000000e+01 9.325093538172e-04 0.000000000000e+00 -9.325093537952e-04 -2.200000000000e-14 1.250000000000e+01 9.373088360850e-04 0.000000000000e+00 -9.373088360625e-04 -2.250000000000e-14 1.300000000000e+01 9.412807044819e-04 0.000000000000e+00 -9.412807044589e-04 -2.300000000000e-14 1.350000000000e+01 9.445495377975e-04 0.000000000000e+00 -9.445495377740e-04 -2.350000000000e-14 1.400000000000e+01 9.472249745362e-04 0.000000000000e+00 -9.472249745122e-04 -2.400000000000e-14 1.450000000000e+01 9.494026061278e-04 0.000000000000e+00 -9.494026061033e-04 -2.450000000000e-14 1.500000000000e+01 9.511651279581e-04 0.000000000000e+00 -9.511651279331e-04 -2.500000000000e-14 1.550000000000e+01 9.525835956948e-04 0.000000000000e+00 -9.525835956693e-04 -2.550000000000e-14 1.600000000000e+01 9.537188364414e-04 0.000000000000e+00 -9.537188364154e-04 -2.600000000000e-14 1.650000000000e+01 9.546227596812e-04 0.000000000000e+00 -9.546227596547e-04 -2.650000000000e-14 1.700000000000e+01 9.553396835585e-04 0.000000000000e+00 -9.553396835315e-04 -2.700000000000e-14 1.750000000000e+01 9.559075822669e-04 0.000000000000e+00 -9.559075822394e-04 -2.750000000000e-14 1.800000000000e+01 9.563592363013e-04 0.000000000000e+00 -9.563592362733e-04 -2.800000000000e-14 1.850000000000e+01 9.567231992601e-04 0.000000000000e+00 -9.567231992316e-04 -2.850000000000e-14 1.900000000000e+01 9.570243452465e-04 0.000000000000e+00 -9.570243452175e-04 -2.900000000000e-14 1.950000000000e+01 9.572836118752e-04 0.000000000000e+00 -9.572836118457e-04 -2.950000000000e-14 2.000000000000e+01 9.575169667033e-04 0.000000000000e+00 -9.575169666733e-04 -3.000000000000e-14 1.000000000000e+00 1.913903081948e-04 0.000000000000e+00 -1.913903081838e-04 -1.100000000000e-14 1.500000000000e+00 2.740937971099e-04 0.000000000000e+00 -2.740937970984e-04 -1.150000000000e-14 2.000000000000e+00 3.491477309524e-04 0.000000000000e+00 -3.491477309404e-04 -1.200000000000e-14 2.500000000000e+00 4.172306400848e-04 0.000000000000e+00 -4.172306400723e-04 -1.250000000000e-14 3.000000000000e+00 4.789510931895e-04 0.000000000000e+00 -4.789510931765e-04 -1.300000000000e-14 3.500000000000e+00 5.348514289624e-04 0.000000000000e+00 -5.348514289489e-04 -1.350000000000e-14 4.000000000000e+00 5.854141738770e-04 0.000000000000e+00 -5.854141738630e-04 -1.400000000000e-14 4.500000000000e+00 6.310695131480e-04 0.000000000000e+00 -6.310695131335e-04 -1.450000000000e-14 5.000000000000e+00 6.722028424991e-04 0.000000000000e+00 -6.722028424841e-04 -1.500000000000e-14 5.500000000000e+00 7.091620547024e-04 0.000000000000e+00 -7.091620546869e-04 -1.550000000000e-14 6.000000000000e+00 7.422642572039e-04 0.000000000000e+00 -7.422642571879e-04 -1.600000000000e-14 6.500000000000e+00 7.718018002379e-04 0.000000000000e+00 -7.718018002214e-04 -1.650000000000e-14 7.000000000000e+00 7.980475130707e-04 0.000000000000e+00 -7.980475130537e-04 -1.700000000000e-14 7.500000000000e+00 8.212590653656e-04 0.000000000000e+00 -8.212590653481e-04 -1.750000000000e-14 8.000000000000e+00 8.416823819789e-04 0.000000000000e+00 -8.416823819609e-04 -1.800000000000e-14 8.500000000000e+00 8.595540600756e-04 0.000000000000e+00 -8.595540600571e-04 -1.850000000000e-14 9.000000000000e+00 8.751027763053e-04 0.000000000000e+00 -8.751027762863e-04 -1.900000000000e-14 9.500000000000e+00 8.885497314818e-04 0.000000000000e+00 -8.885497314623e-04 -1.950000000000e-14 1.000000000000e+01 9.001082551762e-04 0.000000000000e+00 -9.001082551562e-04 -2.000000000000e-14 1.050000000000e+01 9.099827687623e-04 0.000000000000e+00 -9.099827687418e-04 -2.050000000000e-14 1.100000000000e+01 9.183673634114e-04 0.000000000000e+00 -9.183673633904e-04 -2.100000000000e-14 1.150000000000e+01 9.254442716793e-04 0.000000000000e+00 -9.254442716578e-04 -2.150000000000e-14 1.200000000000e+01 9.313824895541e-04 0.000000000000e+00 -9.313824895321e-04 -2.200000000000e-14 1.250000000000e+01 9.363367455374e-04 0.000000000000e+00 -9.363367455149e-04 -2.250000000000e-14 1.300000000000e+01 9.404469311101e-04 0.000000000000e+00 -9.404469310871e-04 -2.300000000000e-14 1.350000000000e+01 9.438380233268e-04 0.000000000000e+00 -9.438380233033e-04 -2.350000000000e-14 1.400000000000e+01 9.466204620970e-04 0.000000000000e+00 -9.466204620730e-04 -2.400000000000e-14 1.450000000000e+01 9.488909006813e-04 0.000000000000e+00 -9.488909006568e-04 -2.450000000000e-14 1.500000000000e+01 9.507332376974e-04 0.000000000000e+00 -9.507332376724e-04 -2.500000000000e-14 1.550000000000e+01 9.522197729042e-04 0.000000000000e+00 -9.522197728787e-04 -2.550000000000e-14 1.600000000000e+01 9.534125544128e-04 0.000000000000e+00 -9.534125543868e-04 -2.600000000000e-14 1.650000000000e+01 9.543646307343e-04 0.000000000000e+00 -9.543646307078e-04 -2.650000000000e-14 1.700000000000e+01 9.551213413308e-04 0.000000000000e+00 -9.551213413038e-04 -2.700000000000e-14 1.750000000000e+01 9.557215392152e-04 0.000000000000e+00 -9.557215391877e-04 -2.750000000000e-14 1.800000000000e+01 9.561987330823e-04 0.000000000000e+00 -9.561987330543e-04 -2.800000000000e-14 1.850000000000e+01 9.565820844900e-04 0.000000000000e+00 -9.565820844615e-04 -2.850000000000e-14 1.900000000000e+01 9.568970747617e-04 0.000000000000e+00 -9.568970747327e-04 -2.900000000000e-14 1.950000000000e+01 9.571654804661e-04 0.000000000000e+00 -9.571654804366e-04 -2.950000000000e-14 2.000000000000e+01 9.574044852017e-04 0.000000000000e+00 -9.574044851717e-04 -3.000000000000e-14 1.000000000000e+00 1.898553999881e-04 0.000000000000e+00 -1.898553999771e-04 -1.100000000000e-14 1.500000000000e+00 2.719181196368e-04 0.000000000000e+00 -2.719181196253e-04 -1.150000000000e-14 2.000000000000e+00 3.464199146796e-04 0.000000000000e+00 -3.464199146676e-04 -1.200000000000e-14 2.500000000000e+00 4.140391029821e-04 0.000000000000e+00 -4.140391029696e-04 -1.250000000000e-14 3.000000000000e+00 4.753825119392e-04 0.000000000000e+00 -4.753825119262e-04 -1.300000000000e-14 3.500000000000e+00 5.309896979000e-04 0.000000000000e+00 -5.309896978865e-04 -1.350000000000e-14 4.000000000000e+00 5.813396407386e-04 0.000000000000e+00 -5.813396407246e-04 -1.400000000000e-14 4.500000000000e+00 6.268583200760e-04 0.000000000000e+00 -6.268583200615e-04 -1.450000000000e-14 5.000000000000e+00 6.679263302504e-04 0.000000000000e+00 -6.679263302354e-04 -1.500000000000e-14 5.500000000000e+00 7.048861551334e-04 0.000000000000e+00 -7.048861551179e-04 -1.550000000000e-14 6.000000000000e+00 7.380488747918e-04 0.000000000000e+00 -7.380488747758e-04 -1.600000000000e-14 6.500000000000e+00 7.677001946531e-04 0.000000000000e+00 -7.677001946366e-04 -1.650000000000e-14 7.000000000000e+00 7.941057182407e-04 0.000000000000e+00 -7.941057182237e-04 -1.700000000000e-14 7.500000000000e+00 8.175153965757e-04 0.000000000000e+00 -8.175153965582e-04 -1.750000000000e-14 8.000000000000e+00 8.381670916897e-04 0.000000000000e+00 -8.381670916717e-04 -1.800000000000e-14 8.500000000000e+00 8.562892030409e-04 0.000000000000e+00 -8.562892030224e-04 -1.850000000000e-14 9.000000000000e+00 8.721023334036e-04 0.000000000000e+00 -8.721023333846e-04 -1.900000000000e-14 9.500000000000e+00 8.858200191761e-04 0.000000000000e+00 -8.858200191566e-04 -1.950000000000e-14 1.000000000000e+01 8.976486161063e-04 0.000000000000e+00 -8.976486160863e-04 -2.000000000000e-14 1.050000000000e+01 9.077865041367e-04 0.000000000000e+00 -9.077865041162e-04 -2.050000000000e-14 1.100000000000e+01 9.164228371708e-04 0.000000000000e+00 -9.164228371498e-04 -2.100000000000e-14 1.150000000000e+01 9.237360971374e-04 0.000000000000e+00 -9.237360971159e-04 -2.150000000000e-14 1.200000000000e+01 9.298927056353e-04 0.000000000000e+00 -9.298927056133e-04 -2.200000000000e-14 1.250000000000e+01 9.350459014371e-04 0.000000000000e+00 -9.350459014146e-04 -2.250000000000e-14 1.300000000000e+01 9.393350206488e-04 0.000000000000e+00 -9.393350206258e-04 -2.300000000000e-14 1.350000000000e+01 9.428852368851e-04 0.000000000000e+00 -9.428852368616e-04 -2.350000000000e-14 1.400000000000e+01 9.458077487450e-04 0.000000000000e+00 -9.458077487210e-04 -2.400000000000e-14 1.450000000000e+01 9.482003520382e-04 0.000000000000e+00 -9.482003520137e-04 -2.450000000000e-14 1.500000000000e+01 9.501483077239e-04 0.000000000000e+00 -9.501483076989e-04 -2.500000000000e-14 1.550000000000e+01 9.517254172147e-04 0.000000000000e+00 -9.517254171892e-04 -2.550000000000e-14 1.600000000000e+01 9.529951757956e-04 0.000000000000e+00 -9.529951757696e-04 -2.600000000000e-14 1.650000000000e+01 9.540120489249e-04 0.000000000000e+00 -9.540120488984e-04 -2.650000000000e-14 1.700000000000e+01 9.548226577575e-04 0.000000000000e+00 -9.548226577305e-04 -2.700000000000e-14 1.750000000000e+01 9.554669743496e-04 0.000000000000e+00 -9.554669743221e-04 -2.750000000000e-14 1.800000000000e+01 9.559794437331e-04 0.000000000000e+00 -9.559794437051e-04 -2.800000000000e-14 1.850000000000e+01 9.563899986098e-04 0.000000000000e+00 -9.563899985813e-04 -2.850000000000e-14 1.900000000000e+01 9.567248362020e-04 0.000000000000e+00 -9.567248361730e-04 -2.900000000000e-14 1.950000000000e+01 9.570066566174e-04 0.000000000000e+00 -9.570066565879e-04 -2.950000000000e-14 2.000000000000e+01 9.572540470051e-04 0.000000000000e+00 -9.572540469751e-04 -3.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_rs2m.standard0000644000265600020320000010243012264261473023422 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.766377414502e-06 0.000000000000e+00 -2.766377413489e-06 -1.012500000000e-15 1.500000000000e+00 2.766870648829e-06 0.000000000000e+00 -2.766870647316e-06 -1.512500000000e-15 2.000000000000e+00 2.767262951006e-06 0.000000000000e+00 -2.767262948994e-06 -2.012500000000e-15 2.500000000000e+00 2.767603825547e-06 0.000000000000e+00 -2.767603823035e-06 -2.512500000000e-15 3.000000000000e+00 2.767911897604e-06 0.000000000000e+00 -2.767911894591e-06 -3.012500000000e-15 3.500000000000e+00 2.768196539439e-06 0.000000000000e+00 -2.768196535928e-06 -3.512500000000e-15 4.000000000000e+00 2.768463299622e-06 0.000000000000e+00 -2.768463295609e-06 -4.012500000000e-15 4.500000000000e+00 2.768715805874e-06 0.000000000000e+00 -2.768715801363e-06 -4.512500000000e-15 5.000000000000e+00 2.768956592851e-06 0.000000000000e+00 -2.768956587839e-06 -5.012500000000e-15 5.500000000000e+00 2.769187517819e-06 0.000000000000e+00 -2.769187512307e-06 -5.512500000000e-15 6.000000000000e+00 2.769409991500e-06 0.000000000000e+00 -2.769409985488e-06 -6.012500000000e-15 6.500000000000e+00 2.769625116078e-06 0.000000000000e+00 -2.769625109566e-06 -6.512500000000e-15 7.000000000000e+00 2.769833772521e-06 0.000000000000e+00 -2.769833765509e-06 -7.012500000000e-15 7.500000000000e+00 2.770036678354e-06 0.000000000000e+00 -2.770036670842e-06 -7.512500000000e-15 8.000000000000e+00 2.770234427314e-06 0.000000000000e+00 -2.770234419302e-06 -8.012500000000e-15 8.500000000000e+00 2.770427517392e-06 0.000000000000e+00 -2.770427508880e-06 -8.512500000000e-15 9.000000000000e+00 2.770616371182e-06 0.000000000000e+00 -2.770616362171e-06 -9.012500000000e-15 9.500000000000e+00 2.770801350984e-06 0.000000000000e+00 -2.770801341472e-06 -9.512500000000e-15 1.000000000000e+01 2.770982770206e-06 0.000000000000e+00 -2.770982760193e-06 -1.001250000000e-14 1.050000000000e+01 2.771160902144e-06 0.000000000000e+00 -2.771160891631e-06 -1.051250000000e-14 1.100000000000e+01 2.771335986828e-06 0.000000000000e+00 -2.771335975816e-06 -1.101250000000e-14 1.150000000000e+01 2.771508236433e-06 0.000000000000e+00 -2.771508224920e-06 -1.151250000000e-14 1.200000000000e+01 2.771677839600e-06 0.000000000000e+00 -2.771677827587e-06 -1.201250000000e-14 1.250000000000e+01 2.771844964946e-06 0.000000000000e+00 -2.771844952433e-06 -1.251250000000e-14 1.300000000000e+01 2.772009763916e-06 0.000000000000e+00 -2.772009750904e-06 -1.301250000000e-14 1.350000000000e+01 2.772172373141e-06 0.000000000000e+00 -2.772172359627e-06 -1.351250000000e-14 1.400000000000e+01 2.772332916379e-06 0.000000000000e+00 -2.772332902366e-06 -1.401250000000e-14 1.450000000000e+01 2.772491506170e-06 0.000000000000e+00 -2.772491491656e-06 -1.451250000000e-14 1.500000000000e+01 2.772648245195e-06 0.000000000000e+00 -2.772648230182e-06 -1.501250000000e-14 1.550000000000e+01 2.772803227453e-06 0.000000000000e+00 -2.772803211941e-06 -1.551250000000e-14 1.600000000000e+01 2.772956539255e-06 0.000000000000e+00 -2.772956523242e-06 -1.601250000000e-14 1.650000000000e+01 2.773108260068e-06 0.000000000000e+00 -2.773108243554e-06 -1.651250000000e-14 1.700000000000e+01 2.773258463261e-06 0.000000000000e+00 -2.773258446249e-06 -1.701250000000e-14 1.750000000000e+01 2.773407216740e-06 0.000000000000e+00 -2.773407199228e-06 -1.751250000000e-14 1.800000000000e+01 2.773554583496e-06 0.000000000000e+00 -2.773554565484e-06 -1.801250000000e-14 1.850000000000e+01 2.773700622092e-06 0.000000000000e+00 -2.773700603580e-06 -1.851250000000e-14 1.900000000000e+01 2.773845387088e-06 0.000000000000e+00 -2.773845368075e-06 -1.901250000000e-14 1.950000000000e+01 2.773988929410e-06 0.000000000000e+00 -2.773988909896e-06 -1.951250000000e-14 2.000000000000e+01 2.774131296682e-06 0.000000000000e+00 -2.774131276670e-06 -2.001250000000e-14 1.000000000000e+00 6.274727295438e-05 0.000000000000e+00 -6.274727295337e-05 -1.012500000000e-15 1.500000000000e+00 7.941497490149e-05 0.000000000000e+00 -7.941497489997e-05 -1.512500000000e-15 2.000000000000e+00 8.899426730284e-05 0.000000000000e+00 -8.899426730083e-05 -2.012500000000e-15 2.500000000000e+00 9.387642130889e-05 0.000000000000e+00 -9.387642130638e-05 -2.512500000000e-15 3.000000000000e+00 9.596214644865e-05 0.000000000000e+00 -9.596214644563e-05 -3.012500000000e-15 3.500000000000e+00 9.656251830917e-05 0.000000000000e+00 -9.656251830566e-05 -3.512500000000e-15 4.000000000000e+00 9.661914129075e-05 0.000000000000e+00 -9.661914128674e-05 -4.012500000000e-15 4.500000000000e+00 9.662812240000e-05 0.000000000000e+00 -9.662812239549e-05 -4.512500000000e-15 5.000000000000e+00 9.663569662126e-05 0.000000000000e+00 -9.663569661625e-05 -5.012500000000e-15 5.500000000000e+00 9.664249206739e-05 0.000000000000e+00 -9.664249206188e-05 -5.512500000000e-15 6.000000000000e+00 9.664868191153e-05 0.000000000000e+00 -9.664868190552e-05 -6.012500000000e-15 6.500000000000e+00 9.665439110659e-05 0.000000000000e+00 -9.665439110007e-05 -6.512500000000e-15 7.000000000000e+00 9.665971231033e-05 0.000000000000e+00 -9.665971230332e-05 -7.012500000000e-15 7.500000000000e+00 9.666471491792e-05 0.000000000000e+00 -9.666471491040e-05 -7.512500000000e-15 8.000000000000e+00 9.666945159365e-05 0.000000000000e+00 -9.666945158563e-05 -8.012500000000e-15 8.500000000000e+00 9.667396290903e-05 0.000000000000e+00 -9.667396290051e-05 -8.512500000000e-15 9.000000000000e+00 9.667828060781e-05 0.000000000000e+00 -9.667828059880e-05 -9.012500000000e-15 9.500000000000e+00 9.668242990807e-05 0.000000000000e+00 -9.668242989856e-05 -9.512500000000e-15 1.000000000000e+01 9.668643113722e-05 0.000000000000e+00 -9.668643112720e-05 -1.001250000000e-14 1.050000000000e+01 9.669030090553e-05 0.000000000000e+00 -9.669030089502e-05 -1.051250000000e-14 1.100000000000e+01 9.669405295868e-05 0.000000000000e+00 -9.669405294766e-05 -1.101250000000e-14 1.150000000000e+01 9.669769880494e-05 0.000000000000e+00 -9.669769879342e-05 -1.151250000000e-14 1.200000000000e+01 9.670124818271e-05 0.000000000000e+00 -9.670124817070e-05 -1.201250000000e-14 1.250000000000e+01 9.670470941340e-05 0.000000000000e+00 -9.670470940088e-05 -1.251250000000e-14 1.300000000000e+01 9.670808967104e-05 0.000000000000e+00 -9.670808965803e-05 -1.301250000000e-14 1.350000000000e+01 9.671139519087e-05 0.000000000000e+00 -9.671139517736e-05 -1.351250000000e-14 1.400000000000e+01 9.671463143234e-05 0.000000000000e+00 -9.671463141832e-05 -1.401250000000e-14 1.450000000000e+01 9.671780320797e-05 0.000000000000e+00 -9.671780319346e-05 -1.451250000000e-14 1.500000000000e+01 9.672091478629e-05 0.000000000000e+00 -9.672091477128e-05 -1.501250000000e-14 1.550000000000e+01 9.672396997472e-05 0.000000000000e+00 -9.672396995921e-05 -1.551250000000e-14 1.600000000000e+01 9.672697218699e-05 0.000000000000e+00 -9.672697217097e-05 -1.601250000000e-14 1.650000000000e+01 9.672992449843e-05 0.000000000000e+00 -9.672992448191e-05 -1.651250000000e-14 1.700000000000e+01 9.673282969168e-05 0.000000000000e+00 -9.673282967467e-05 -1.701250000000e-14 1.750000000000e+01 9.673569029472e-05 0.000000000000e+00 -9.673569027720e-05 -1.751250000000e-14 1.800000000000e+01 9.673850861275e-05 0.000000000000e+00 -9.673850859474e-05 -1.801250000000e-14 1.850000000000e+01 9.674128675514e-05 0.000000000000e+00 -9.674128673663e-05 -1.851250000000e-14 1.900000000000e+01 9.674402665822e-05 0.000000000000e+00 -9.674402663921e-05 -1.901250000000e-14 1.950000000000e+01 9.674673010485e-05 0.000000000000e+00 -9.674673008533e-05 -1.951250000000e-14 2.000000000000e+01 9.674939874111e-05 0.000000000000e+00 -9.674939872109e-05 -2.001250000000e-14 1.000000000000e+00 1.458352921750e-04 0.000000000000e+00 -1.458352921740e-04 -1.012500000000e-15 1.500000000000e+00 2.072575023335e-04 0.000000000000e+00 -2.072575023320e-04 -1.512500000000e-15 2.000000000000e+00 2.613864821500e-04 0.000000000000e+00 -2.613864821480e-04 -2.012500000000e-15 2.500000000000e+00 3.085814365318e-04 0.000000000000e+00 -3.085814365293e-04 -2.512500000000e-15 3.000000000000e+00 3.492782407744e-04 0.000000000000e+00 -3.492782407714e-04 -3.012500000000e-15 3.500000000000e+00 3.839819271795e-04 0.000000000000e+00 -3.839819271760e-04 -3.512500000000e-15 4.000000000000e+00 4.132501577530e-04 0.000000000000e+00 -4.132501577489e-04 -4.012500000000e-15 4.500000000000e+00 4.376714332006e-04 0.000000000000e+00 -4.376714331961e-04 -4.512500000000e-15 5.000000000000e+00 4.578416418831e-04 0.000000000000e+00 -4.578416418781e-04 -5.012500000000e-15 5.500000000000e+00 4.743421014328e-04 0.000000000000e+00 -4.743421014273e-04 -5.512500000000e-15 6.000000000000e+00 4.877213423486e-04 0.000000000000e+00 -4.877213423426e-04 -6.012500000000e-15 6.500000000000e+00 4.984818043776e-04 0.000000000000e+00 -4.984818043711e-04 -6.512500000000e-15 7.000000000000e+00 5.070716840441e-04 0.000000000000e+00 -5.070716840370e-04 -7.012500000000e-15 7.500000000000e+00 5.138815233880e-04 0.000000000000e+00 -5.138815233805e-04 -7.512500000000e-15 8.000000000000e+00 5.192447371101e-04 0.000000000000e+00 -5.192447371021e-04 -8.012500000000e-15 8.500000000000e+00 5.234410429745e-04 0.000000000000e+00 -5.234410429660e-04 -8.512500000000e-15 9.000000000000e+00 5.267017909449e-04 0.000000000000e+00 -5.267017909359e-04 -9.012500000000e-15 9.500000000000e+00 5.292161482281e-04 0.000000000000e+00 -5.292161482186e-04 -9.512500000000e-15 1.000000000000e+01 5.311374652493e-04 0.000000000000e+00 -5.311374652393e-04 -1.001250000000e-14 1.050000000000e+01 5.325892882521e-04 0.000000000000e+00 -5.325892882416e-04 -1.051250000000e-14 1.100000000000e+01 5.336707501773e-04 0.000000000000e+00 -5.336707501663e-04 -1.101250000000e-14 1.150000000000e+01 5.344612368183e-04 0.000000000000e+00 -5.344612368068e-04 -1.151250000000e-14 1.200000000000e+01 5.350243417097e-04 0.000000000000e+00 -5.350243416977e-04 -1.201250000000e-14 1.250000000000e+01 5.354111994682e-04 0.000000000000e+00 -5.354111994557e-04 -1.251250000000e-14 1.300000000000e+01 5.356633498911e-04 0.000000000000e+00 -5.356633498781e-04 -1.301250000000e-14 1.350000000000e+01 5.358153715186e-04 0.000000000000e+00 -5.358153715051e-04 -1.351250000000e-14 1.400000000000e+01 5.358976289960e-04 0.000000000000e+00 -5.358976289820e-04 -1.401250000000e-14 1.450000000000e+01 5.359387873508e-04 0.000000000000e+00 -5.359387873363e-04 -1.451250000000e-14 1.500000000000e+01 5.359631559093e-04 0.000000000000e+00 -5.359631558943e-04 -1.501250000000e-14 1.550000000000e+01 5.359829165719e-04 0.000000000000e+00 -5.359829165564e-04 -1.551250000000e-14 1.600000000000e+01 5.360012556245e-04 0.000000000000e+00 -5.360012556085e-04 -1.601250000000e-14 1.650000000000e+01 5.360188096422e-04 0.000000000000e+00 -5.360188096257e-04 -1.651250000000e-14 1.700000000000e+01 5.360357383465e-04 0.000000000000e+00 -5.360357383295e-04 -1.701250000000e-14 1.750000000000e+01 5.360521113262e-04 0.000000000000e+00 -5.360521113087e-04 -1.751250000000e-14 1.800000000000e+01 5.360679765531e-04 0.000000000000e+00 -5.360679765351e-04 -1.801250000000e-14 1.850000000000e+01 5.360833739002e-04 0.000000000000e+00 -5.360833738816e-04 -1.851250000000e-14 1.900000000000e+01 5.360983383955e-04 0.000000000000e+00 -5.360983383765e-04 -1.901250000000e-14 1.950000000000e+01 5.361129013267e-04 0.000000000000e+00 -5.361129013072e-04 -1.951250000000e-14 2.000000000000e+01 5.361270908170e-04 0.000000000000e+00 -5.361270907970e-04 -2.001250000000e-14 1.000000000000e+00 1.960979091123e-06 0.000000000000e+00 -1.960979090123e-06 -1.000000000938e-15 1.500000000000e+00 1.961342727658e-06 0.000000000000e+00 -1.961342726158e-06 -1.500000000938e-15 2.000000000000e+00 1.961637661698e-06 0.000000000000e+00 -1.961637659698e-06 -2.000000000938e-15 2.500000000000e+00 1.961897202794e-06 0.000000000000e+00 -1.961897200294e-06 -2.500000000938e-15 3.000000000000e+00 1.962133900799e-06 0.000000000000e+00 -1.962133897800e-06 -3.000000000938e-15 3.500000000000e+00 1.962354131285e-06 0.000000000000e+00 -1.962354127785e-06 -3.500000000938e-15 4.000000000000e+00 1.962561706748e-06 0.000000000000e+00 -1.962561702748e-06 -4.000000000938e-15 4.500000000000e+00 1.962759141430e-06 0.000000000000e+00 -1.962759136930e-06 -4.500000000938e-15 5.000000000000e+00 1.962948204465e-06 0.000000000000e+00 -1.962948199465e-06 -5.000000000938e-15 5.500000000000e+00 1.963130199677e-06 0.000000000000e+00 -1.963130194177e-06 -5.500000000938e-15 6.000000000000e+00 1.963306122111e-06 0.000000000000e+00 -1.963306116111e-06 -6.000000000938e-15 6.500000000000e+00 1.963476752246e-06 0.000000000000e+00 -1.963476745746e-06 -6.500000000938e-15 7.000000000000e+00 1.963642715983e-06 0.000000000000e+00 -1.963642708983e-06 -7.000000000938e-15 7.500000000000e+00 1.963804524538e-06 0.000000000000e+00 -1.963804517038e-06 -7.500000000938e-15 8.000000000000e+00 1.963962601955e-06 0.000000000000e+00 -1.963962593955e-06 -8.000000000938e-15 8.500000000000e+00 1.964117304647e-06 0.000000000000e+00 -1.964117296147e-06 -8.500000000938e-15 9.000000000000e+00 1.964268935621e-06 0.000000000000e+00 -1.964268926621e-06 -9.000000000938e-15 9.500000000000e+00 1.964417755073e-06 0.000000000000e+00 -1.964417745572e-06 -9.500000000938e-15 1.000000000000e+01 1.964563988413e-06 0.000000000000e+00 -1.964563978413e-06 -1.000000000094e-14 1.050000000000e+01 1.964707832459e-06 0.000000000000e+00 -1.964707821958e-06 -1.050000000094e-14 1.100000000000e+01 1.964849460264e-06 0.000000000000e+00 -1.964849449264e-06 -1.100000000094e-14 1.150000000000e+01 1.964989024966e-06 0.000000000000e+00 -1.964989013466e-06 -1.150000000094e-14 1.200000000000e+01 1.965126662847e-06 0.000000000000e+00 -1.965126650847e-06 -1.200000000094e-14 1.250000000000e+01 1.965262495827e-06 0.000000000000e+00 -1.965262483327e-06 -1.250000000094e-14 1.300000000000e+01 1.965396633496e-06 0.000000000000e+00 -1.965396620496e-06 -1.300000000094e-14 1.350000000000e+01 1.965529174799e-06 0.000000000000e+00 -1.965529161298e-06 -1.350000000094e-14 1.400000000000e+01 1.965660209419e-06 0.000000000000e+00 -1.965660195417e-06 -1.400000000094e-14 1.450000000000e+01 1.965789818956e-06 0.000000000000e+00 -1.965789804456e-06 -1.450000000094e-14 1.500000000000e+01 1.965918077912e-06 0.000000000000e+00 -1.965918062913e-06 -1.500000000094e-14 1.550000000000e+01 1.966045054525e-06 0.000000000000e+00 -1.966045039025e-06 -1.550000000094e-14 1.600000000000e+01 1.966170811474e-06 0.000000000000e+00 -1.966170795474e-06 -1.600000000094e-14 1.650000000000e+01 1.966295406509e-06 0.000000000000e+00 -1.966295390009e-06 -1.650000000094e-14 1.700000000000e+01 1.966418892964e-06 0.000000000000e+00 -1.966418875962e-06 -1.700000000094e-14 1.750000000000e+01 1.966541320220e-06 0.000000000000e+00 -1.966541302719e-06 -1.750000000094e-14 1.800000000000e+01 1.966662734105e-06 0.000000000000e+00 -1.966662716105e-06 -1.800000000094e-14 1.850000000000e+01 1.966783177245e-06 0.000000000000e+00 -1.966783158745e-06 -1.850000000094e-14 1.900000000000e+01 1.966902689359e-06 0.000000000000e+00 -1.966902670358e-06 -1.900000000094e-14 1.950000000000e+01 1.967021307532e-06 0.000000000000e+00 -1.967021288034e-06 -1.950000000094e-14 2.000000000000e+01 1.967139066469e-06 0.000000000000e+00 -1.967139046469e-06 -2.000000000094e-14 1.000000000000e+00 8.607698085699e-05 0.000000000000e+00 -8.607698085599e-05 -1.000000000938e-15 1.500000000000e+00 1.085872160577e-04 0.000000000000e+00 -1.085872160562e-04 -1.500000000938e-15 2.000000000000e+00 1.211690845352e-04 0.000000000000e+00 -1.211690845332e-04 -2.000000000938e-15 2.500000000000e+00 1.272231938473e-04 0.000000000000e+00 -1.272231938448e-04 -2.500000000938e-15 3.000000000000e+00 1.294355361441e-04 0.000000000000e+00 -1.294355361411e-04 -3.000000000938e-15 3.500000000000e+00 1.297680187728e-04 0.000000000000e+00 -1.297680187693e-04 -3.500000000938e-15 4.000000000000e+00 1.297825673434e-04 0.000000000000e+00 -1.297825673394e-04 -4.000000000938e-15 4.500000000000e+00 1.297942979794e-04 0.000000000000e+00 -1.297942979749e-04 -4.500000000938e-15 5.000000000000e+00 1.298046433914e-04 0.000000000000e+00 -1.298046433864e-04 -5.000000000938e-15 5.500000000000e+00 1.298139159331e-04 0.000000000000e+00 -1.298139159276e-04 -5.500000000938e-15 6.000000000000e+00 1.298223502204e-04 0.000000000000e+00 -1.298223502144e-04 -6.000000000938e-15 6.500000000000e+00 1.298301203464e-04 0.000000000000e+00 -1.298301203399e-04 -6.500000000938e-15 7.000000000000e+00 1.298373554277e-04 0.000000000000e+00 -1.298373554207e-04 -7.000000000938e-15 7.500000000000e+00 1.298441520286e-04 0.000000000000e+00 -1.298441520211e-04 -7.500000000938e-15 8.000000000000e+00 1.298505833079e-04 0.000000000000e+00 -1.298505832999e-04 -8.000000000938e-15 8.500000000000e+00 1.298567055274e-04 0.000000000000e+00 -1.298567055189e-04 -8.500000000938e-15 9.000000000000e+00 1.298625626326e-04 0.000000000000e+00 -1.298625626236e-04 -9.000000000938e-15 9.500000000000e+00 1.298681894790e-04 0.000000000000e+00 -1.298681894695e-04 -9.500000000938e-15 1.000000000000e+01 1.298736141200e-04 0.000000000000e+00 -1.298736141100e-04 -1.000000000094e-14 1.050000000000e+01 1.298788594469e-04 0.000000000000e+00 -1.298788594364e-04 -1.050000000094e-14 1.100000000000e+01 1.298839443783e-04 0.000000000000e+00 -1.298839443673e-04 -1.100000000094e-14 1.150000000000e+01 1.298888847344e-04 0.000000000000e+00 -1.298888847229e-04 -1.150000000094e-14 1.200000000000e+01 1.298936938868e-04 0.000000000000e+00 -1.298936938748e-04 -1.200000000094e-14 1.250000000000e+01 1.298983832497e-04 0.000000000000e+00 -1.298983832372e-04 -1.250000000094e-14 1.300000000000e+01 1.299029626536e-04 0.000000000000e+00 -1.299029626406e-04 -1.300000000094e-14 1.350000000000e+01 1.299074406348e-04 0.000000000000e+00 -1.299074406213e-04 -1.350000000094e-14 1.400000000000e+01 1.299118246608e-04 0.000000000000e+00 -1.299118246468e-04 -1.400000000094e-14 1.450000000000e+01 1.299161213092e-04 0.000000000000e+00 -1.299161212947e-04 -1.450000000094e-14 1.500000000000e+01 1.299203364092e-04 0.000000000000e+00 -1.299203363942e-04 -1.500000000094e-14 1.550000000000e+01 1.299244751570e-04 0.000000000000e+00 -1.299244751415e-04 -1.550000000094e-14 1.600000000000e+01 1.299285422080e-04 0.000000000000e+00 -1.299285421920e-04 -1.600000000094e-14 1.650000000000e+01 1.299325417536e-04 0.000000000000e+00 -1.299325417371e-04 -1.650000000094e-14 1.700000000000e+01 1.299364775839e-04 0.000000000000e+00 -1.299364775669e-04 -1.700000000094e-14 1.750000000000e+01 1.299403531402e-04 0.000000000000e+00 -1.299403531227e-04 -1.750000000094e-14 1.800000000000e+01 1.299441715588e-04 0.000000000000e+00 -1.299441715408e-04 -1.800000000094e-14 1.850000000000e+01 1.299479357081e-04 0.000000000000e+00 -1.299479356896e-04 -1.850000000094e-14 1.900000000000e+01 1.299516482199e-04 0.000000000000e+00 -1.299516482009e-04 -1.900000000094e-14 1.950000000000e+01 1.299553115163e-04 0.000000000000e+00 -1.299553114968e-04 -1.950000000094e-14 2.000000000000e+01 1.299589278325e-04 0.000000000000e+00 -1.299589278125e-04 -2.000000000094e-14 1.000000000000e+00 2.017636164273e-04 0.000000000000e+00 -2.017636164263e-04 -1.000000000938e-15 1.500000000000e+00 2.873769342016e-04 0.000000000000e+00 -2.873769342001e-04 -1.500000000938e-15 2.000000000000e+00 3.634475564015e-04 0.000000000000e+00 -3.634475563995e-04 -2.000000000938e-15 2.500000000000e+00 4.304676663612e-04 0.000000000000e+00 -4.304676663587e-04 -2.500000000938e-15 3.000000000000e+00 4.889697964134e-04 0.000000000000e+00 -4.889697964104e-04 -3.000000000938e-15 3.500000000000e+00 5.395356911971e-04 0.000000000000e+00 -5.395356911936e-04 -3.500000000938e-15 4.000000000000e+00 5.827957818449e-04 0.000000000000e+00 -5.827957818409e-04 -4.000000000938e-15 4.500000000000e+00 6.194205326940e-04 0.000000000000e+00 -6.194205326895e-04 -4.500000000938e-15 5.000000000000e+00 6.501053830076e-04 0.000000000000e+00 -6.501053830026e-04 -5.000000000938e-15 5.500000000000e+00 6.755515721311e-04 0.000000000000e+00 -6.755515721256e-04 -5.500000000938e-15 6.000000000000e+00 6.964456646586e-04 0.000000000000e+00 -6.964456646526e-04 -6.000000000938e-15 6.500000000000e+00 7.134405167335e-04 0.000000000000e+00 -7.134405167270e-04 -6.500000000938e-15 7.000000000000e+00 7.271398496162e-04 0.000000000000e+00 -7.271398496092e-04 -7.000000000938e-15 7.500000000000e+00 7.380876941000e-04 0.000000000000e+00 -7.380876940925e-04 -7.500000000938e-15 8.000000000000e+00 7.467630014132e-04 0.000000000000e+00 -7.467630014052e-04 -8.000000000938e-15 8.500000000000e+00 7.535789094170e-04 0.000000000000e+00 -7.535789094085e-04 -8.500000000938e-15 9.000000000000e+00 7.588856481423e-04 0.000000000000e+00 -7.588856481333e-04 -9.000000000938e-15 9.500000000000e+00 7.629758590325e-04 0.000000000000e+00 -7.629758590229e-04 -9.500000000938e-15 1.000000000000e+01 7.660912751263e-04 0.000000000000e+00 -7.660912751163e-04 -1.000000000094e-14 1.050000000000e+01 7.684297697114e-04 0.000000000000e+00 -7.684297697009e-04 -1.050000000094e-14 1.100000000000e+01 7.701522559445e-04 0.000000000000e+00 -7.701522559335e-04 -1.100000000094e-14 1.150000000000e+01 7.713890469865e-04 0.000000000000e+00 -7.713890469750e-04 -1.150000000094e-14 1.200000000000e+01 7.722455555907e-04 0.000000000000e+00 -7.722455555787e-04 -1.200000000094e-14 1.250000000000e+01 7.728074033252e-04 0.000000000000e+00 -7.728074033127e-04 -1.250000000094e-14 1.300000000000e+01 7.731453074022e-04 0.000000000000e+00 -7.731453073892e-04 -1.300000000094e-14 1.350000000000e+01 7.733209389096e-04 0.000000000000e+00 -7.733209388961e-04 -1.350000000094e-14 1.400000000000e+01 7.733967086677e-04 0.000000000000e+00 -7.733967086537e-04 -1.400000000094e-14 1.450000000000e+01 7.734366136782e-04 0.000000000000e+00 -7.734366136637e-04 -1.450000000094e-14 1.500000000000e+01 7.734705632629e-04 0.000000000000e+00 -7.734705632479e-04 -1.500000000094e-14 1.550000000000e+01 7.735026717632e-04 0.000000000000e+00 -7.735026717477e-04 -1.550000000094e-14 1.600000000000e+01 7.735333505347e-04 0.000000000000e+00 -7.735333505187e-04 -1.600000000094e-14 1.650000000000e+01 7.735627451574e-04 0.000000000000e+00 -7.735627451409e-04 -1.650000000094e-14 1.700000000000e+01 7.735909691186e-04 0.000000000000e+00 -7.735909691016e-04 -1.700000000094e-14 1.750000000000e+01 7.736181218701e-04 0.000000000000e+00 -7.736181218526e-04 -1.750000000094e-14 1.800000000000e+01 7.736442917817e-04 0.000000000000e+00 -7.736442917637e-04 -1.800000000094e-14 1.850000000000e+01 7.736695576564e-04 0.000000000000e+00 -7.736695576379e-04 -1.850000000094e-14 1.900000000000e+01 7.736939899387e-04 0.000000000000e+00 -7.736939899197e-04 -1.900000000094e-14 1.950000000000e+01 7.737176517495e-04 0.000000000000e+00 -7.737176517300e-04 -1.950000000094e-14 2.000000000000e+01 7.737405997790e-04 0.000000000000e+00 -7.737405997590e-04 -2.000000000094e-14 1.000000000000e+00 3.966527803883e-06 0.000000000000e+00 -3.966511610703e-06 -1.619317952605e-11 1.500000000000e+00 3.967406812020e-06 0.000000000000e+00 -3.967390618341e-06 -1.619367952607e-11 2.000000000000e+00 3.967940026401e-06 0.000000000000e+00 -3.967923832222e-06 -1.619417952607e-11 2.500000000000e+00 3.968393241220e-06 0.000000000000e+00 -3.968377046541e-06 -1.619467952607e-11 3.000000000000e+00 3.968797481409e-06 0.000000000000e+00 -3.968781286230e-06 -1.619517952607e-11 3.500000000000e+00 3.969167415328e-06 0.000000000000e+00 -3.969151219648e-06 -1.619567952607e-11 4.000000000000e+00 3.969511517030e-06 0.000000000000e+00 -3.969495320851e-06 -1.619617952607e-11 4.500000000000e+00 3.969835230528e-06 0.000000000000e+00 -3.969819033849e-06 -1.619667952607e-11 5.000000000000e+00 3.970142308121e-06 0.000000000000e+00 -3.970126110942e-06 -1.619717952607e-11 5.500000000000e+00 3.970435469790e-06 0.000000000000e+00 -3.970419272110e-06 -1.619767952607e-11 6.000000000000e+00 3.970716763578e-06 0.000000000000e+00 -3.970700565398e-06 -1.619817952607e-11 6.500000000000e+00 3.970987778146e-06 0.000000000000e+00 -3.970971579466e-06 -1.619867952607e-11 7.000000000000e+00 3.971249775696e-06 0.000000000000e+00 -3.971233576517e-06 -1.619917952607e-11 7.500000000000e+00 3.971503779053e-06 0.000000000000e+00 -3.971487579373e-06 -1.619967952607e-11 8.000000000000e+00 3.971750630899e-06 0.000000000000e+00 -3.971734430720e-06 -1.620017952607e-11 8.500000000000e+00 3.971991035373e-06 0.000000000000e+00 -3.971974834694e-06 -1.620067952607e-11 9.000000000000e+00 3.972225588040e-06 0.000000000000e+00 -3.972209386860e-06 -1.620117952607e-11 9.500000000000e+00 3.972454798008e-06 0.000000000000e+00 -3.972438596328e-06 -1.620167952607e-11 1.000000000000e+01 3.972679104557e-06 0.000000000000e+00 -3.972662902378e-06 -1.620217952607e-11 1.050000000000e+01 3.972898889867e-06 0.000000000000e+00 -3.972882687187e-06 -1.620267952607e-11 1.100000000000e+01 3.973114488898e-06 0.000000000000e+00 -3.973098285719e-06 -1.620317952607e-11 1.150000000000e+01 3.973326197190e-06 0.000000000000e+00 -3.973309993511e-06 -1.620367952607e-11 1.200000000000e+01 3.973534277064e-06 0.000000000000e+00 -3.973518072883e-06 -1.620417952607e-11 1.250000000000e+01 3.973738962625e-06 0.000000000000e+00 -3.973722757945e-06 -1.620467952607e-11 1.300000000000e+01 3.973940463846e-06 0.000000000000e+00 -3.973924258667e-06 -1.620517952607e-11 1.350000000000e+01 3.974138969912e-06 0.000000000000e+00 -3.974122764232e-06 -1.620567952607e-11 1.400000000000e+01 3.974334651986e-06 0.000000000000e+00 -3.974318445807e-06 -1.620617952607e-11 1.450000000000e+01 3.974527665535e-06 0.000000000000e+00 -3.974511458855e-06 -1.620667952607e-11 1.500000000000e+01 3.974718152266e-06 0.000000000000e+00 -3.974701945087e-06 -1.620717952607e-11 1.550000000000e+01 3.974906241781e-06 0.000000000000e+00 -3.974890034100e-06 -1.620767952607e-11 1.600000000000e+01 3.975092052967e-06 0.000000000000e+00 -3.975075844787e-06 -1.620817952607e-11 1.650000000000e+01 3.975275695210e-06 0.000000000000e+00 -3.975259486530e-06 -1.620867952607e-11 1.700000000000e+01 3.975457269411e-06 0.000000000000e+00 -3.975441060233e-06 -1.620917952607e-11 1.750000000000e+01 3.975636868896e-06 0.000000000000e+00 -3.975620659216e-06 -1.620967952607e-11 1.800000000000e+01 3.975814580170e-06 0.000000000000e+00 -3.975798369991e-06 -1.621017952607e-11 1.850000000000e+01 3.975990483613e-06 0.000000000000e+00 -3.975974272933e-06 -1.621067952607e-11 1.900000000000e+01 3.976164654059e-06 0.000000000000e+00 -3.976148442878e-06 -1.621117952607e-11 1.950000000000e+01 3.976337161320e-06 0.000000000000e+00 -3.976320949639e-06 -1.621167952607e-11 2.000000000000e+01 3.976508070648e-06 0.000000000000e+00 -3.976491858470e-06 -1.621217952607e-11 1.000000000000e+00 4.224777830089e-05 0.000000000000e+00 -4.224776210771e-05 -1.619317952605e-11 1.500000000000e+00 5.381160147031e-05 0.000000000000e+00 -5.381158527663e-05 -1.619367952607e-11 2.000000000000e+00 6.076033823717e-05 0.000000000000e+00 -6.076032204299e-05 -1.619417952607e-11 2.500000000000e+00 6.460375635027e-05 0.000000000000e+00 -6.460374015559e-05 -1.619467952607e-11 3.000000000000e+00 6.654603160829e-05 0.000000000000e+00 -6.654601541311e-05 -1.619517952607e-11 3.500000000000e+00 6.741155126046e-05 0.000000000000e+00 -6.741153506478e-05 -1.619567952607e-11 4.000000000000e+00 6.771787599106e-05 0.000000000000e+00 -6.771785979488e-05 -1.619617952607e-11 4.500000000000e+00 6.778654371586e-05 0.000000000000e+00 -6.778652751918e-05 -1.619667952607e-11 5.000000000000e+00 6.779811616851e-05 0.000000000000e+00 -6.779809997133e-05 -1.619717952607e-11 5.500000000000e+00 6.780336286674e-05 0.000000000000e+00 -6.780334666906e-05 -1.619767952607e-11 6.000000000000e+00 6.780769959531e-05 0.000000000000e+00 -6.780768339713e-05 -1.619817952607e-11 6.500000000000e+00 6.781164686071e-05 0.000000000000e+00 -6.781163066203e-05 -1.619867952607e-11 7.000000000000e+00 6.781531688097e-05 0.000000000000e+00 -6.781530068180e-05 -1.619917952607e-11 7.500000000000e+00 6.781876482974e-05 0.000000000000e+00 -6.781874863006e-05 -1.619967952607e-11 8.000000000000e+00 6.782202842223e-05 0.000000000000e+00 -6.782201222205e-05 -1.620017952607e-11 8.500000000000e+00 6.782513595485e-05 0.000000000000e+00 -6.782511975417e-05 -1.620067952607e-11 9.000000000000e+00 6.782810940759e-05 0.000000000000e+00 -6.782809320641e-05 -1.620117952607e-11 9.500000000000e+00 6.783096620923e-05 0.000000000000e+00 -6.783095000755e-05 -1.620167952607e-11 1.000000000000e+01 6.783372040566e-05 0.000000000000e+00 -6.783370420348e-05 -1.620217952607e-11 1.050000000000e+01 6.783638347815e-05 0.000000000000e+00 -6.783636727547e-05 -1.620267952607e-11 1.100000000000e+01 6.783896493267e-05 0.000000000000e+00 -6.783894872949e-05 -1.620317952607e-11 1.150000000000e+01 6.784147273203e-05 0.000000000000e+00 -6.784145652835e-05 -1.620367952607e-11 1.200000000000e+01 6.784391361769e-05 0.000000000000e+00 -6.784389741351e-05 -1.620417952607e-11 1.250000000000e+01 6.784629335267e-05 0.000000000000e+00 -6.784627714799e-05 -1.620467952607e-11 1.300000000000e+01 6.784861690730e-05 0.000000000000e+00 -6.784860070212e-05 -1.620517952607e-11 1.350000000000e+01 6.785088860287e-05 0.000000000000e+00 -6.785087239719e-05 -1.620567952607e-11 1.400000000000e+01 6.785311222407e-05 0.000000000000e+00 -6.785309601789e-05 -1.620617952607e-11 1.450000000000e+01 6.785529110794e-05 0.000000000000e+00 -6.785527490126e-05 -1.620667952607e-11 1.500000000000e+01 6.785742821490e-05 0.000000000000e+00 -6.785741200772e-05 -1.620717952607e-11 1.550000000000e+01 6.785952618599e-05 0.000000000000e+00 -6.785950997831e-05 -1.620767952607e-11 1.600000000000e+01 6.786158738954e-05 0.000000000000e+00 -6.786157118136e-05 -1.620817952607e-11 1.650000000000e+01 6.786361395936e-05 0.000000000000e+00 -6.786359775068e-05 -1.620867952607e-11 1.700000000000e+01 6.786560782636e-05 0.000000000000e+00 -6.786559161718e-05 -1.620917952607e-11 1.750000000000e+01 6.786757074489e-05 0.000000000000e+00 -6.786755453522e-05 -1.620967952607e-11 1.800000000000e+01 6.786950431484e-05 0.000000000000e+00 -6.786948810466e-05 -1.621017952607e-11 1.850000000000e+01 6.787141000023e-05 0.000000000000e+00 -6.787139378955e-05 -1.621067952607e-11 1.900000000000e+01 6.787328914508e-05 0.000000000000e+00 -6.787327293390e-05 -1.621117952607e-11 1.950000000000e+01 6.787514298691e-05 0.000000000000e+00 -6.787512677523e-05 -1.621167952607e-11 2.000000000000e+01 6.787697266836e-05 0.000000000000e+00 -6.787695645618e-05 -1.621217952607e-11 1.000000000000e+00 9.493648861545e-05 0.000000000000e+00 -9.493647242227e-05 -1.619317952605e-11 1.500000000000e+00 1.346070784585e-04 0.000000000000e+00 -1.346070622649e-04 -1.619367952607e-11 2.000000000000e+00 1.692929392877e-04 0.000000000000e+00 -1.692929230936e-04 -1.619417952607e-11 2.500000000000e+00 1.992520450307e-04 0.000000000000e+00 -1.992520288360e-04 -1.619467952607e-11 3.000000000000e+00 2.248193250585e-04 0.000000000000e+00 -2.248193088633e-04 -1.619517952607e-11 3.500000000000e+00 2.463888932710e-04 0.000000000000e+00 -2.463888770754e-04 -1.619567952607e-11 4.000000000000e+00 2.643907688759e-04 0.000000000000e+00 -2.643907526797e-04 -1.619617952607e-11 4.500000000000e+00 2.792671049375e-04 0.000000000000e+00 -2.792670887408e-04 -1.619667952607e-11 5.000000000000e+00 2.914513276276e-04 0.000000000000e+00 -2.914513114304e-04 -1.619717952607e-11 5.500000000000e+00 3.013520230900e-04 0.000000000000e+00 -3.013520068924e-04 -1.619767952607e-11 6.000000000000e+00 3.093420330124e-04 0.000000000000e+00 -3.093420168143e-04 -1.619817952607e-11 6.500000000000e+00 3.157523308853e-04 0.000000000000e+00 -3.157523146866e-04 -1.619867952607e-11 7.000000000000e+00 3.208698510504e-04 0.000000000000e+00 -3.208698348512e-04 -1.619917952607e-11 7.500000000000e+00 3.249383282454e-04 0.000000000000e+00 -3.249383120457e-04 -1.619967952607e-11 8.000000000000e+00 3.281612807396e-04 0.000000000000e+00 -3.281612645394e-04 -1.620017952607e-11 8.500000000000e+00 3.307062495481e-04 0.000000000000e+00 -3.307062333474e-04 -1.620067952607e-11 9.000000000000e+00 3.327096308378e-04 0.000000000000e+00 -3.327096146367e-04 -1.620117952607e-11 9.500000000000e+00 3.342815372800e-04 0.000000000000e+00 -3.342815210783e-04 -1.620167952607e-11 1.000000000000e+01 3.355103338962e-04 0.000000000000e+00 -3.355103176940e-04 -1.620217952607e-11 1.050000000000e+01 3.364666552525e-04 0.000000000000e+00 -3.364666390498e-04 -1.620267952607e-11 1.100000000000e+01 3.372068355362e-04 0.000000000000e+00 -3.372068193330e-04 -1.620317952607e-11 1.150000000000e+01 3.377757632133e-04 0.000000000000e+00 -3.377757470097e-04 -1.620367952607e-11 1.200000000000e+01 3.382092153739e-04 0.000000000000e+00 -3.382091991697e-04 -1.620417952607e-11 1.250000000000e+01 3.385357448729e-04 0.000000000000e+00 -3.385357286682e-04 -1.620467952607e-11 1.300000000000e+01 3.387781961687e-04 0.000000000000e+00 -3.387781799635e-04 -1.620517952607e-11 1.350000000000e+01 3.389549206365e-04 0.000000000000e+00 -3.389549044308e-04 -1.620567952607e-11 1.400000000000e+01 3.390807534033e-04 0.000000000000e+00 -3.390807371971e-04 -1.620617952607e-11 1.450000000000e+01 3.391678026383e-04 0.000000000000e+00 -3.391677864316e-04 -1.620667952607e-11 1.500000000000e+01 3.392260852515e-04 0.000000000000e+00 -3.392260690443e-04 -1.620717952607e-11 1.550000000000e+01 3.392640066563e-04 0.000000000000e+00 -3.392639904486e-04 -1.620767952607e-11 1.600000000000e+01 3.392886041920e-04 0.000000000000e+00 -3.392885879838e-04 -1.620817952607e-11 1.650000000000e+01 3.393054255238e-04 0.000000000000e+00 -3.393054093151e-04 -1.620867952607e-11 1.700000000000e+01 3.393182265706e-04 0.000000000000e+00 -3.393182103615e-04 -1.620917952607e-11 1.750000000000e+01 3.393290819463e-04 0.000000000000e+00 -3.393290657366e-04 -1.620967952607e-11 1.800000000000e+01 3.393389649525e-04 0.000000000000e+00 -3.393389487423e-04 -1.621017952607e-11 1.850000000000e+01 3.393483002103e-04 0.000000000000e+00 -3.393482839996e-04 -1.621067952607e-11 1.900000000000e+01 3.393572746614e-04 0.000000000000e+00 -3.393572584502e-04 -1.621117952607e-11 1.950000000000e+01 3.393659762823e-04 0.000000000000e+00 -3.393659600706e-04 -1.621167952607e-11 2.000000000000e+01 3.393744511472e-04 0.000000000000e+00 -3.393744349350e-04 -1.621217952607e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_gidl.standard0000644000265600020320000010243012264261473023456 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 1.332694960189e-05 0.000000000000e+00 -1.332694960088e-05 -1.012500000000e-15 1.500000000000e+00 1.334125669486e-05 0.000000000000e+00 -1.334125669335e-05 -1.512500000000e-15 2.000000000000e+00 1.335319883676e-05 0.000000000000e+00 -1.335319883474e-05 -2.012500000000e-15 2.500000000000e+00 1.336394448568e-05 0.000000000000e+00 -1.336394448317e-05 -2.512500000000e-15 3.000000000000e+00 1.337393045827e-05 0.000000000000e+00 -1.337393045526e-05 -3.012500000000e-15 3.500000000000e+00 1.338337553405e-05 0.000000000000e+00 -1.338337553054e-05 -3.512500000000e-15 4.000000000000e+00 1.339240883186e-05 0.000000000000e+00 -1.339240882785e-05 -4.012500000000e-15 4.500000000000e+00 1.340111458749e-05 0.000000000000e+00 -1.340111458298e-05 -4.512500000000e-15 5.000000000000e+00 1.340955156013e-05 0.000000000000e+00 -1.340955155511e-05 -5.012500011170e-15 5.500000000000e+00 1.341776275092e-05 0.000000000000e+00 -1.341776274541e-05 -5.512500798748e-15 6.000000000000e+00 1.342578078820e-05 0.000000000000e+00 -1.342578078218e-05 -6.012523452195e-15 6.500000000000e+00 1.343363114174e-05 0.000000000000e+00 -1.343363113522e-05 -6.512865287409e-15 7.000000000000e+00 1.344133415376e-05 0.000000000000e+00 -1.344133414675e-05 -7.016063741367e-15 7.500000000000e+00 1.344890638128e-05 0.000000000000e+00 -1.344890637374e-05 -7.536869964099e-15 8.000000000000e+00 1.345636151644e-05 0.000000000000e+00 -1.345636150830e-05 -8.138904061043e-15 8.500000000000e+00 1.346371103710e-05 0.000000000000e+00 -1.346371102807e-05 -9.038998572304e-15 9.000000000000e+00 1.347096467873e-05 0.000000000000e+00 -1.347096466788e-05 -1.084953662654e-14 9.500000000000e+00 1.347813078453e-05 0.000000000000e+00 -1.347813076947e-05 -1.505640923632e-14 1.000000000000e+01 1.348521657047e-05 0.000000000000e+00 -1.348521654563e-05 -2.484469446563e-14 1.050000000000e+01 1.349222832957e-05 0.000000000000e+00 -1.349222828319e-05 -4.637844200715e-14 1.100000000000e+01 1.349917159202e-05 0.000000000000e+00 -1.349917150140e-05 -9.061421157992e-14 1.150000000000e+01 1.350605125266e-05 0.000000000000e+00 -1.350605107698e-05 -1.756855038315e-13 1.200000000000e+01 1.351287167399e-05 0.000000000000e+00 -1.351287134414e-05 -3.298455044813e-13 1.250000000000e+01 1.351963677039e-05 0.000000000000e+00 -1.351963617548e-05 -5.949074362189e-13 1.300000000000e+01 1.352635007803e-05 0.000000000000e+00 -1.352634904795e-05 -1.030082122840e-12 1.350000000000e+01 1.353301481324e-05 0.000000000000e+00 -1.353301309715e-05 -1.716085073520e-12 1.400000000000e+01 1.353963392188e-05 0.000000000000e+00 -1.353963116250e-05 -2.759371646340e-12 1.450000000000e+01 1.354621012125e-05 0.000000000000e+00 -1.354620582490e-05 -4.296357656432e-12 1.500000000000e+01 1.355274593596e-05 0.000000000000e+00 -1.355273943847e-05 -6.497491847384e-12 1.550000000000e+01 1.355924372860e-05 0.000000000000e+00 -1.355923415753e-05 -9.571063074684e-12 1.600000000000e+01 1.356570572614e-05 0.000000000000e+00 -1.356569195949e-05 -1.376664598634e-11 1.650000000000e+01 1.357213404262e-05 0.000000000000e+00 -1.357211466451e-05 -1.937811190563e-11 1.700000000000e+01 1.357853069862e-05 0.000000000000e+00 -1.357850395247e-05 -2.674615451922e-11 1.750000000000e+01 1.358489763789e-05 0.000000000000e+00 -1.358486137759e-05 -3.626030140039e-11 1.800000000000e+01 1.359123674164e-05 0.000000000000e+00 -1.359118838124e-05 -4.836040141899e-11 1.850000000000e+01 1.359754984061e-05 0.000000000000e+00 -1.359748630301e-05 -6.353759420348e-11 1.900000000000e+01 1.360383872531e-05 0.000000000000e+00 -1.360375639053e-05 -8.233478085359e-11 1.950000000000e+01 1.361010515463e-05 0.000000000000e+00 -1.360999980801e-05 -1.053466251305e-10 2.000000000000e+01 1.361635086297e-05 0.000000000000e+00 -1.361621764385e-05 -1.332191216031e-10 1.000000000000e+00 2.549780346303e-04 0.000000000000e+00 -2.549780346293e-04 -1.012500000000e-15 1.500000000000e+00 3.386553597790e-04 0.000000000000e+00 -3.386553597774e-04 -1.512500000000e-15 2.000000000000e+00 3.962455162248e-04 0.000000000000e+00 -3.962455162228e-04 -2.012500000000e-15 2.500000000000e+00 4.324883235493e-04 0.000000000000e+00 -4.324883235468e-04 -2.512500000000e-15 3.000000000000e+00 4.529475590711e-04 0.000000000000e+00 -4.529475590681e-04 -3.012500000000e-15 3.500000000000e+00 4.628597413755e-04 0.000000000000e+00 -4.628597413719e-04 -3.512500000000e-15 4.000000000000e+00 4.664686510154e-04 0.000000000000e+00 -4.664686510114e-04 -4.012500000000e-15 4.500000000000e+00 4.671773312905e-04 0.000000000000e+00 -4.671773312860e-04 -4.512500000000e-15 5.000000000000e+00 4.674017500268e-04 0.000000000000e+00 -4.674017500218e-04 -5.012500000000e-15 5.500000000000e+00 4.675948367242e-04 0.000000000000e+00 -4.675948367187e-04 -5.512500000000e-15 6.000000000000e+00 4.677696267183e-04 0.000000000000e+00 -4.677696267123e-04 -6.012500000000e-15 6.500000000000e+00 4.679300215167e-04 0.000000000000e+00 -4.679300215102e-04 -6.512500000000e-15 7.000000000000e+00 4.680788982769e-04 0.000000000000e+00 -4.680788982699e-04 -7.012500000000e-15 7.500000000000e+00 4.682184279683e-04 0.000000000000e+00 -4.682184279608e-04 -7.512500000000e-15 8.000000000000e+00 4.683502598978e-04 0.000000000000e+00 -4.683502598898e-04 -8.012500000000e-15 8.500000000000e+00 4.684756599278e-04 0.000000000000e+00 -4.684756599193e-04 -8.512500000000e-15 9.000000000000e+00 4.685956116637e-04 0.000000000000e+00 -4.685956116547e-04 -9.012500000000e-15 9.500000000000e+00 4.687108895350e-04 0.000000000000e+00 -4.687108895254e-04 -9.512500029714e-15 1.000000000000e+01 4.688221114354e-04 0.000000000000e+00 -4.688221114253e-04 -1.001250136212e-14 1.050000000000e+01 4.689297767829e-04 0.000000000000e+00 -4.689297767724e-04 -1.051252980692e-14 1.100000000000e+01 4.690342942448e-04 0.000000000000e+00 -4.690342942338e-04 -1.101287985800e-14 1.150000000000e+01 4.691360021278e-04 0.000000000000e+00 -4.691360021163e-04 -1.151572068464e-14 1.200000000000e+01 4.692351835350e-04 0.000000000000e+00 -4.692351835230e-04 -1.203242929185e-14 1.250000000000e+01 4.693320777577e-04 0.000000000000e+00 -4.693320777451e-04 -1.260867713612e-14 1.300000000000e+01 4.694268889332e-04 0.000000000000e+00 -4.694268889198e-04 -1.339260075605e-14 1.350000000000e+01 4.695197926976e-04 0.000000000000e+00 -4.695197926828e-04 -1.478874854324e-14 1.400000000000e+01 4.696109413534e-04 0.000000000000e+00 -4.696109413356e-04 -1.775729954164e-14 1.450000000000e+01 4.697004679232e-04 0.000000000000e+00 -4.697004678989e-04 -2.432850334842e-14 1.500000000000e+01 4.697884893632e-04 0.000000000000e+00 -4.697884893248e-04 -3.840201804069e-14 1.550000000000e+01 4.698751091332e-04 0.000000000000e+00 -4.698751090663e-04 -6.688855312643e-14 1.600000000000e+01 4.699604192704e-04 0.000000000000e+00 -4.699604191492e-04 -1.212288958844e-13 1.650000000000e+01 4.700445020787e-04 0.000000000000e+00 -4.700445018594e-04 -2.192970839649e-13 1.700000000000e+01 4.701274315130e-04 0.000000000000e+00 -4.701274311253e-04 -3.876649176987e-13 1.750000000000e+01 4.702092743254e-04 0.000000000000e+00 -4.702092736612e-04 -6.641783503020e-13 1.800000000000e+01 4.702900910183e-04 0.000000000000e+00 -4.702900899175e-04 -1.100775457383e-12 1.850000000000e+01 4.703699366438e-04 0.000000000000e+00 -4.703699348774e-04 -1.766462125548e-12 1.900000000000e+01 4.704488614784e-04 0.000000000000e+00 -4.704488587281e-04 -2.750355495344e-12 1.950000000000e+01 4.705269115948e-04 0.000000000000e+00 -4.705269074301e-04 -4.164705801258e-12 2.000000000000e+01 4.706041293500e-04 0.000000000000e+00 -4.706041232021e-04 -6.147813280253e-12 1.000000000000e+00 4.539191823284e-04 0.000000000000e+00 -4.539191823274e-04 -1.012500000000e-15 1.500000000000e+00 6.491916007223e-04 0.000000000000e+00 -6.491916007208e-04 -1.512500000000e-15 2.000000000000e+00 8.261074335879e-04 0.000000000000e+00 -8.261074335859e-04 -2.012500000000e-15 2.500000000000e+00 9.864790102086e-04 0.000000000000e+00 -9.864790102061e-04 -2.512500000000e-15 3.000000000000e+00 1.131915148137e-03 0.000000000000e+00 -1.131915148134e-03 -3.012500000000e-15 3.500000000000e+00 1.263838648322e-03 0.000000000000e+00 -1.263838648319e-03 -3.512500000000e-15 4.000000000000e+00 1.383506662895e-03 0.000000000000e+00 -1.383506662891e-03 -4.012500000000e-15 4.500000000000e+00 1.492031314833e-03 0.000000000000e+00 -1.492031314828e-03 -4.512500000000e-15 5.000000000000e+00 1.590399097476e-03 0.000000000000e+00 -1.590399097471e-03 -5.012500000000e-15 5.500000000000e+00 1.679488559498e-03 0.000000000000e+00 -1.679488559493e-03 -5.512500000000e-15 6.000000000000e+00 1.760085998638e-03 0.000000000000e+00 -1.760085998632e-03 -6.012500000000e-15 6.500000000000e+00 1.832899189647e-03 0.000000000000e+00 -1.832899189641e-03 -6.512500000000e-15 7.000000000000e+00 1.898569244328e-03 0.000000000000e+00 -1.898569244321e-03 -7.012500000000e-15 7.500000000000e+00 1.957680743866e-03 0.000000000000e+00 -1.957680743858e-03 -7.512500000000e-15 8.000000000000e+00 2.010770291551e-03 0.000000000000e+00 -2.010770291543e-03 -8.012500000000e-15 8.500000000000e+00 2.058333627283e-03 0.000000000000e+00 -2.058333627275e-03 -8.512500000000e-15 9.000000000000e+00 2.100831433777e-03 0.000000000000e+00 -2.100831433768e-03 -9.012500000000e-15 9.500000000000e+00 2.138693954106e-03 0.000000000000e+00 -2.138693954096e-03 -9.512500000000e-15 1.000000000000e+01 2.172324535290e-03 0.000000000000e+00 -2.172324535280e-03 -1.001250000000e-14 1.050000000000e+01 2.202102215418e-03 0.000000000000e+00 -2.202102215407e-03 -1.051250000000e-14 1.100000000000e+01 2.228383482778e-03 0.000000000000e+00 -2.228383482767e-03 -1.101250000000e-14 1.150000000000e+01 2.251503352279e-03 0.000000000000e+00 -2.251503352268e-03 -1.151250000000e-14 1.200000000000e+01 2.271775921771e-03 0.000000000000e+00 -2.271775921759e-03 -1.201250000000e-14 1.250000000000e+01 2.289494581998e-03 0.000000000000e+00 -2.289494581986e-03 -1.251250000000e-14 1.300000000000e+01 2.304932052382e-03 0.000000000000e+00 -2.304932052369e-03 -1.301250000000e-14 1.350000000000e+01 2.318340397622e-03 0.000000000000e+00 -2.318340397608e-03 -1.351250000000e-14 1.400000000000e+01 2.329951148585e-03 0.000000000000e+00 -2.329951148571e-03 -1.401250000000e-14 1.450000000000e+01 2.339975610376e-03 0.000000000000e+00 -2.339975610361e-03 -1.451250000000e-14 1.500000000000e+01 2.348605398086e-03 0.000000000000e+00 -2.348605398071e-03 -1.501250000000e-14 1.550000000000e+01 2.356013203229e-03 0.000000000000e+00 -2.356013203214e-03 -1.551250000000e-14 1.600000000000e+01 2.362353765558e-03 0.000000000000e+00 -2.362353765542e-03 -1.601250000000e-14 1.650000000000e+01 2.367765028202e-03 0.000000000000e+00 -2.367765028185e-03 -1.651250000000e-14 1.700000000000e+01 2.372369295480e-03 0.000000000000e+00 -2.372369295463e-03 -1.701250000000e-14 1.750000000000e+01 2.376274686450e-03 0.000000000000e+00 -2.376274686433e-03 -1.751250000000e-14 1.800000000000e+01 2.379576357011e-03 0.000000000000e+00 -2.379576356993e-03 -1.801250000000e-14 1.850000000000e+01 2.382357838647e-03 0.000000000000e+00 -2.382357838629e-03 -1.851250000000e-14 1.900000000000e+01 2.384692304481e-03 0.000000000000e+00 -2.384692304462e-03 -1.901250000000e-14 1.950000000000e+01 2.386643776093e-03 0.000000000000e+00 -2.386643776074e-03 -1.951250000000e-14 2.000000000000e+01 2.388268265843e-03 0.000000000000e+00 -2.388268265823e-03 -2.001250000000e-14 1.000000000000e+00 9.452184749736e-06 0.000000000000e+00 -9.452184748736e-06 -1.000000000938e-15 1.500000000000e+00 9.463422472904e-06 0.000000000000e+00 -9.463422471404e-06 -1.500000000938e-15 2.000000000000e+00 9.473059616495e-06 0.000000000000e+00 -9.473059614495e-06 -2.000000000938e-15 2.500000000000e+00 9.481877390705e-06 0.000000000000e+00 -9.481877388205e-06 -2.500000000938e-15 3.000000000000e+00 9.490168612354e-06 0.000000000000e+00 -9.490168609355e-06 -3.000000000938e-15 3.500000000000e+00 9.498081493327e-06 0.000000000000e+00 -9.498081489826e-06 -3.500000000938e-15 4.000000000000e+00 9.505704444504e-06 0.000000000000e+00 -9.505704440505e-06 -4.000000000938e-15 4.500000000000e+00 9.513095668377e-06 0.000000000000e+00 -9.513095663877e-06 -4.500000000938e-15 5.000000000000e+00 9.520296063951e-06 0.000000000000e+00 -9.520296058951e-06 -5.000000012842e-15 5.500000000000e+00 9.527335740566e-06 0.000000000000e+00 -9.527335735067e-06 -5.500000842046e-15 6.000000000000e+00 9.534237655743e-06 0.000000000000e+00 -9.534237649743e-06 -6.000024487426e-15 6.500000000000e+00 9.541019802232e-06 0.000000000000e+00 -9.541019795731e-06 -6.500378993270e-15 7.000000000000e+00 9.547696598737e-06 0.000000000000e+00 -9.547696591734e-06 -7.003679572755e-15 7.500000000000e+00 9.554279814295e-06 0.000000000000e+00 -9.554279806770e-06 -7.525066426989e-15 8.000000000000e+00 9.560779205151e-06 0.000000000000e+00 -9.560779197021e-06 -8.129619898603e-15 8.500000000000e+00 9.567202966898e-06 0.000000000000e+00 -9.567202957860e-06 -9.038547433064e-15 9.000000000000e+00 9.573558063757e-06 0.000000000000e+00 -9.573558052883e-06 -1.087519120658e-14 9.500000000000e+00 9.579850473776e-06 0.000000000000e+00 -9.579850458627e-06 -1.514921681551e-14 1.000000000000e+01 9.586085375116e-06 0.000000000000e+00 -9.586085350024e-06 -2.509159292829e-14 1.050000000000e+01 9.592267290231e-06 0.000000000000e+00 -9.592267243284e-06 -4.694685586247e-14 1.100000000000e+01 9.598400199377e-06 0.000000000000e+00 -9.598400107574e-06 -9.180196499081e-14 1.150000000000e+01 9.604487631449e-06 0.000000000000e+00 -9.604487453461e-06 -1.779881494063e-13 1.200000000000e+01 9.610532737814e-06 0.000000000000e+00 -9.610532403772e-06 -3.340421657170e-13 1.250000000000e+01 9.616538353130e-06 0.000000000000e+00 -9.616537750965e-06 -6.021651580522e-13 1.300000000000e+01 9.622507046095e-06 0.000000000000e+00 -9.622506004018e-06 -1.042077665252e-12 1.350000000000e+01 9.628441162247e-06 0.000000000000e+00 -9.628439427104e-06 -1.735142176804e-12 1.400000000000e+01 9.634342860341e-06 0.000000000000e+00 -9.634340071730e-06 -2.788611107959e-12 1.450000000000e+01 9.640214143502e-06 0.000000000000e+00 -9.640209803646e-06 -4.339857111638e-12 1.500000000000e+01 9.646056885985e-06 0.000000000000e+00 -9.646050325533e-06 -6.560451930753e-12 1.550000000000e+01 9.651872856226e-06 0.000000000000e+00 -9.651863196248e-06 -9.659976627839e-12 1.600000000000e+01 9.657663736713e-06 0.000000000000e+00 -9.657649847245e-06 -1.388946712906e-11 1.650000000000e+01 9.663431141083e-06 0.000000000000e+00 -9.663411596661e-06 -1.954442205967e-11 1.700000000000e+01 9.669176628783e-06 0.000000000000e+00 -9.669149661460e-06 -2.696732282529e-11 1.750000000000e+01 9.674901717602e-06 0.000000000000e+00 -9.674865167964e-06 -3.654963736451e-11 1.800000000000e+01 9.680607894298e-06 0.000000000000e+00 -9.680559160999e-06 -4.873329803354e-11 1.850000000000e+01 9.686296623570e-06 0.000000000000e+00 -9.686232611908e-06 -6.401166018944e-11 1.900000000000e+01 9.691969355522e-06 0.000000000000e+00 -9.691886425562e-06 -8.292996105025e-11 1.950000000000e+01 9.697627531852e-06 0.000000000000e+00 -9.697521446544e-06 -1.060853084002e-10 2.000000000000e+01 9.703272590849e-06 0.000000000000e+00 -9.703138464613e-06 -1.341262359242e-10 1.000000000000e+00 3.292868355259e-04 0.000000000000e+00 -3.292868355249e-04 -1.000000000938e-15 1.500000000000e+00 4.416865296052e-04 0.000000000000e+00 -4.416865296037e-04 -1.500000000938e-15 2.000000000000e+00 5.217608893357e-04 0.000000000000e+00 -5.217608893337e-04 -2.000000000938e-15 2.500000000000e+00 5.740124831835e-04 0.000000000000e+00 -5.740124831810e-04 -2.500000000938e-15 3.000000000000e+00 6.044748171134e-04 0.000000000000e+00 -6.044748171104e-04 -3.000000000938e-15 3.500000000000e+00 6.194649065620e-04 0.000000000000e+00 -6.194649065585e-04 -3.500000000938e-15 4.000000000000e+00 6.246111307277e-04 0.000000000000e+00 -6.246111307237e-04 -4.000000000938e-15 4.500000000000e+00 6.253419349731e-04 0.000000000000e+00 -6.253419349686e-04 -4.500000000938e-15 5.000000000000e+00 6.256581261766e-04 0.000000000000e+00 -6.256581261716e-04 -5.000000000938e-15 5.500000000000e+00 6.259371106883e-04 0.000000000000e+00 -6.259371106828e-04 -5.500000000938e-15 6.000000000000e+00 6.261873564469e-04 0.000000000000e+00 -6.261873564409e-04 -6.000000000938e-15 6.500000000000e+00 6.264149601231e-04 0.000000000000e+00 -6.264149601166e-04 -6.500000000938e-15 7.000000000000e+00 6.266245472338e-04 0.000000000000e+00 -6.266245472268e-04 -7.000000000938e-15 7.500000000000e+00 6.268196134358e-04 0.000000000000e+00 -6.268196134283e-04 -7.500000000938e-15 8.000000000000e+00 6.270028100884e-04 0.000000000000e+00 -6.270028100804e-04 -8.000000000938e-15 8.500000000000e+00 6.271761654058e-04 0.000000000000e+00 -6.271761653973e-04 -8.500000000938e-15 9.000000000000e+00 6.273412484682e-04 0.000000000000e+00 -6.273412484592e-04 -9.000000000938e-15 9.500000000000e+00 6.274992884515e-04 0.000000000000e+00 -6.274992884420e-04 -9.500000000938e-15 1.000000000000e+01 6.276512607533e-04 0.000000000000e+00 -6.276512607433e-04 -1.000000006639e-14 1.050000000000e+01 6.277979492994e-04 0.000000000000e+00 -6.277979492889e-04 -1.050000236725e-14 1.100000000000e+01 6.279399918912e-04 0.000000000000e+00 -6.279399918802e-04 -1.100004389756e-14 1.150000000000e+01 6.280779134950e-04 0.000000000000e+00 -6.280779134835e-04 -1.150049688796e-14 1.200000000000e+01 6.282121509251e-04 0.000000000000e+00 -6.282121509131e-04 -1.200386114313e-14 1.250000000000e+01 6.283430713424e-04 0.000000000000e+00 -6.283430713299e-04 -1.252237825943e-14 1.300000000000e+01 6.284709862681e-04 0.000000000000e+00 -6.284709862550e-04 -1.310272888721e-14 1.350000000000e+01 6.285961623155e-04 0.000000000000e+00 -6.285961623016e-04 -1.389057172343e-14 1.400000000000e+01 6.287188294965e-04 0.000000000000e+00 -6.287188294812e-04 -1.527219765606e-14 1.450000000000e+01 6.288391877145e-04 0.000000000000e+00 -6.288391876963e-04 -1.814428028290e-14 1.500000000000e+01 6.289574118917e-04 0.000000000000e+00 -6.289574118673e-04 -2.437102859891e-14 1.550000000000e+01 6.290736560546e-04 0.000000000000e+00 -6.290736560171e-04 -3.748762079316e-14 1.600000000000e+01 6.291880566188e-04 0.000000000000e+00 -6.291880565551e-04 -6.369867981945e-14 1.650000000000e+01 6.293007350525e-04 0.000000000000e+00 -6.293007349393e-04 -1.132022781496e-13 1.700000000000e+01 6.294118000536e-04 0.000000000000e+00 -6.294117998518e-04 -2.018467227021e-13 1.750000000000e+01 6.295213493421e-04 0.000000000000e+00 -6.295213489890e-04 -3.531029063710e-13 1.800000000000e+01 6.296294711476e-04 0.000000000000e+00 -6.296294705473e-04 -6.003126596494e-13 1.850000000000e+01 6.297362454505e-04 0.000000000000e+00 -6.297362444613e-04 -9.891556859076e-13 1.900000000000e+01 6.298417450261e-04 0.000000000000e+00 -6.298417434458e-04 -1.580265592159e-12 1.950000000000e+01 6.299460363262e-04 0.000000000000e+00 -6.299460338743e-04 -2.451919500414e-12 2.000000000000e+01 6.300491802299e-04 0.000000000000e+00 -6.300491765272e-04 -3.702725253491e-12 1.000000000000e+00 5.502627058516e-04 0.000000000000e+00 -5.502627058506e-04 -1.000000000938e-15 1.500000000000e+00 7.859707498239e-04 0.000000000000e+00 -7.859707498224e-04 -1.500000000938e-15 2.000000000000e+00 9.993949229571e-04 0.000000000000e+00 -9.993949229551e-04 -2.000000000938e-15 2.500000000000e+00 1.193063304659e-03 0.000000000000e+00 -1.193063304656e-03 -2.500000000938e-15 3.000000000000e+00 1.369166712742e-03 0.000000000000e+00 -1.369166712739e-03 -3.000000000938e-15 3.500000000000e+00 1.529600487808e-03 0.000000000000e+00 -1.529600487804e-03 -3.500000000938e-15 4.000000000000e+00 1.676005181211e-03 0.000000000000e+00 -1.676005181207e-03 -4.000000000938e-15 4.500000000000e+00 1.809803485570e-03 0.000000000000e+00 -1.809803485565e-03 -4.500000000938e-15 5.000000000000e+00 1.932232588228e-03 0.000000000000e+00 -1.932232588223e-03 -5.000000000938e-15 5.500000000000e+00 2.044371985551e-03 0.000000000000e+00 -2.044371985545e-03 -5.500000000938e-15 6.000000000000e+00 2.147167143727e-03 0.000000000000e+00 -2.147167143721e-03 -6.000000000938e-15 6.500000000000e+00 2.241449529718e-03 0.000000000000e+00 -2.241449529712e-03 -6.500000000938e-15 7.000000000000e+00 2.327953529940e-03 0.000000000000e+00 -2.327953529933e-03 -7.000000000938e-15 7.500000000000e+00 2.407330738425e-03 0.000000000000e+00 -2.407330738417e-03 -7.500000000938e-15 8.000000000000e+00 2.480162033651e-03 0.000000000000e+00 -2.480162033643e-03 -8.000000000938e-15 8.500000000000e+00 2.546967800161e-03 0.000000000000e+00 -2.546967800153e-03 -8.500000000938e-15 9.000000000000e+00 2.608216592174e-03 0.000000000000e+00 -2.608216592165e-03 -9.000000000938e-15 9.500000000000e+00 2.664332484433e-03 0.000000000000e+00 -2.664332484424e-03 -9.500000000938e-15 1.000000000000e+01 2.715701311321e-03 0.000000000000e+00 -2.715701311311e-03 -1.000000000094e-14 1.050000000000e+01 2.762675958379e-03 0.000000000000e+00 -2.762675958369e-03 -1.050000000094e-14 1.100000000000e+01 2.805580840198e-03 0.000000000000e+00 -2.805580840187e-03 -1.100000000094e-14 1.150000000000e+01 2.844715674403e-03 0.000000000000e+00 -2.844715674391e-03 -1.150000000094e-14 1.200000000000e+01 2.880358642463e-03 0.000000000000e+00 -2.880358642451e-03 -1.200000000094e-14 1.250000000000e+01 2.912769013603e-03 0.000000000000e+00 -2.912769013591e-03 -1.250000000094e-14 1.300000000000e+01 2.942189297697e-03 0.000000000000e+00 -2.942189297684e-03 -1.300000000094e-14 1.350000000000e+01 2.968846985943e-03 0.000000000000e+00 -2.968846985929e-03 -1.350000000094e-14 1.400000000000e+01 2.992955933837e-03 0.000000000000e+00 -2.992955933823e-03 -1.400000000094e-14 1.450000000000e+01 3.014717438598e-03 0.000000000000e+00 -3.014717438583e-03 -1.450000000094e-14 1.500000000000e+01 3.034321061978e-03 0.000000000000e+00 -3.034321061963e-03 -1.500000000094e-14 1.550000000000e+01 3.051945248388e-03 0.000000000000e+00 -3.051945248373e-03 -1.550000000094e-14 1.600000000000e+01 3.067757786671e-03 0.000000000000e+00 -3.067757786655e-03 -1.600000000094e-14 1.650000000000e+01 3.081916161062e-03 0.000000000000e+00 -3.081916161046e-03 -1.650000000094e-14 1.700000000000e+01 3.094567832579e-03 0.000000000000e+00 -3.094567832562e-03 -1.700000000094e-14 1.750000000000e+01 3.105850486291e-03 0.000000000000e+00 -3.105850486274e-03 -1.750000000094e-14 1.800000000000e+01 3.115892273103e-03 0.000000000000e+00 -3.115892273085e-03 -1.800000000094e-14 1.850000000000e+01 3.124812067227e-03 0.000000000000e+00 -3.124812067208e-03 -1.850000000094e-14 1.900000000000e+01 3.132719753278e-03 0.000000000000e+00 -3.132719753259e-03 -1.900000000094e-14 1.950000000000e+01 3.139716550269e-03 0.000000000000e+00 -3.139716550250e-03 -1.950000000094e-14 2.000000000000e+01 3.145895402791e-03 0.000000000000e+00 -3.145895402771e-03 -2.000000000094e-14 1.000000000000e+00 1.909065842315e-05 0.000000000000e+00 -1.909064222997e-05 -1.619317952605e-11 1.500000000000e+00 1.911062749643e-05 0.000000000000e+00 -1.911061130275e-05 -1.619367952607e-11 2.000000000000e+00 1.912567548471e-05 0.000000000000e+00 -1.912565929053e-05 -1.619417952607e-11 2.500000000000e+00 1.913887261148e-05 0.000000000000e+00 -1.913885641680e-05 -1.619467952607e-11 3.000000000000e+00 1.915093054888e-05 0.000000000000e+00 -1.915091435370e-05 -1.619517952607e-11 3.500000000000e+00 1.916219282985e-05 0.000000000000e+00 -1.916217663417e-05 -1.619567952607e-11 4.000000000000e+00 1.917285750338e-05 0.000000000000e+00 -1.917284130720e-05 -1.619617952607e-11 4.500000000000e+00 1.918305147186e-05 0.000000000000e+00 -1.918303527518e-05 -1.619667952607e-11 5.000000000000e+00 1.919286202088e-05 0.000000000000e+00 -1.919284582371e-05 -1.619717952608e-11 5.500000000000e+00 1.920235231846e-05 0.000000000000e+00 -1.920233612078e-05 -1.619767952681e-11 6.000000000000e+00 1.921156986479e-05 0.000000000000e+00 -1.921155366661e-05 -1.619817954806e-11 6.500000000000e+00 1.922055146533e-05 0.000000000000e+00 -1.922053526665e-05 -1.619867987183e-11 7.000000000000e+00 1.922932633527e-05 0.000000000000e+00 -1.922931013608e-05 -1.619918292381e-11 7.500000000000e+00 1.923791813015e-05 0.000000000000e+00 -1.923790193044e-05 -1.619970289341e-11 8.000000000000e+00 1.924634632572e-05 0.000000000000e+00 -1.924633012542e-05 -1.620030128398e-11 8.500000000000e+00 1.925462718563e-05 0.000000000000e+00 -1.925461098444e-05 -1.620118856615e-11 9.000000000000e+00 1.926277445854e-05 0.000000000000e+00 -1.926275825558e-05 -1.620296114529e-11 9.500000000000e+00 1.927079989212e-05 0.000000000000e+00 -1.927078368505e-05 -1.620707017654e-11 1.000000000000e+01 1.927871361980e-05 0.000000000000e+00 -1.927869740317e-05 -1.621663357128e-11 1.050000000000e+01 1.928652445722e-05 0.000000000000e+00 -1.928650821952e-05 -1.623769740327e-11 1.100000000000e+01 1.929424013323e-05 0.000000000000e+00 -1.929422385220e-05 -1.628102685769e-11 1.150000000000e+01 1.930186747266e-05 0.000000000000e+00 -1.930185110820e-05 -1.636446494460e-11 1.200000000000e+01 1.930941254308e-05 0.000000000000e+00 -1.930939602723e-05 -1.651584787324e-11 1.250000000000e+01 1.931688077399e-05 0.000000000000e+00 -1.931686399757e-05 -1.677641801387e-11 1.300000000000e+01 1.932427705499e-05 0.000000000000e+00 -1.932425985035e-05 -1.720463562244e-11 1.350000000000e+01 1.933160581724e-05 0.000000000000e+00 -1.933158793698e-05 -1.788026298301e-11 1.400000000000e+01 1.933887110183e-05 0.000000000000e+00 -1.933885219325e-05 -1.890858055282e-11 1.450000000000e+01 1.934607661746e-05 0.000000000000e+00 -1.934605619286e-05 -2.042459314532e-11 1.500000000000e+01 1.935322578946e-05 0.000000000000e+00 -1.935320319237e-05 -2.259709289431e-11 1.550000000000e+01 1.936032180166e-05 0.000000000000e+00 -1.936029616920e-05 -2.563246187053e-11 1.600000000000e+01 1.936736763214e-05 0.000000000000e+00 -1.936733785402e-05 -2.977811791524e-11 1.650000000000e+01 1.937436608398e-05 0.000000000000e+00 -1.937433075845e-05 -3.532552999540e-11 1.700000000000e+01 1.938131981158e-05 0.000000000000e+00 -1.938127719882e-05 -4.261275216431e-11 1.750000000000e+01 1.938823134328e-05 0.000000000000e+00 -1.938817931684e-05 -5.202644657384e-11 1.800000000000e+01 1.939510310078e-05 0.000000000000e+00 -1.939503909740e-05 -6.400338498259e-11 1.850000000000e+01 1.940193741566e-05 0.000000000000e+00 -1.940185838423e-05 -7.903143432858e-11 1.900000000000e+01 1.940873654356e-05 0.000000000000e+00 -1.940863889351e-05 -9.765004500638e-11 1.950000000000e+01 1.941550267617e-05 0.000000000000e+00 -1.941538222590e-05 -1.204502705641e-10 2.000000000000e+01 1.942223795148e-05 0.000000000000e+00 -1.942208987712e-05 -1.480743548447e-10 1.000000000000e+00 1.809521653892e-04 0.000000000000e+00 -1.809521491960e-04 -1.619317952605e-11 1.500000000000e+00 2.383823466105e-04 0.000000000000e+00 -2.383823304169e-04 -1.619367952607e-11 2.000000000000e+00 2.771207560232e-04 0.000000000000e+00 -2.771207398290e-04 -1.619417952607e-11 2.500000000000e+00 3.013254215200e-04 0.000000000000e+00 -3.013254053253e-04 -1.619467952607e-11 3.000000000000e+00 3.152816213611e-04 0.000000000000e+00 -3.152816051659e-04 -1.619517952607e-11 3.500000000000e+00 3.226289559472e-04 0.000000000000e+00 -3.226289397515e-04 -1.619567952607e-11 4.000000000000e+00 3.260486580191e-04 0.000000000000e+00 -3.260486418229e-04 -1.619617952607e-11 4.500000000000e+00 3.273502748316e-04 0.000000000000e+00 -3.273502586349e-04 -1.619667952607e-11 5.000000000000e+00 3.277335024636e-04 0.000000000000e+00 -3.277334862664e-04 -1.619717952607e-11 5.500000000000e+00 3.278869638584e-04 0.000000000000e+00 -3.278869476607e-04 -1.619767952607e-11 6.000000000000e+00 3.280053107318e-04 0.000000000000e+00 -3.280052945336e-04 -1.619817952607e-11 6.500000000000e+00 3.281124078592e-04 0.000000000000e+00 -3.281123916605e-04 -1.619867952607e-11 7.000000000000e+00 3.282120034859e-04 0.000000000000e+00 -3.282119872867e-04 -1.619917952607e-11 7.500000000000e+00 3.283056685554e-04 0.000000000000e+00 -3.283056523557e-04 -1.619967952607e-11 8.000000000000e+00 3.283944525931e-04 0.000000000000e+00 -3.283944363930e-04 -1.620017952607e-11 8.500000000000e+00 3.284791406942e-04 0.000000000000e+00 -3.284791244935e-04 -1.620067952607e-11 9.000000000000e+00 3.285603406337e-04 0.000000000000e+00 -3.285603244325e-04 -1.620117952608e-11 9.500000000000e+00 3.286385318736e-04 0.000000000000e+00 -3.286385156719e-04 -1.620167952654e-11 1.000000000000e+01 3.287140983951e-04 0.000000000000e+00 -3.287140821930e-04 -1.620217953927e-11 1.050000000000e+01 3.287873519125e-04 0.000000000000e+00 -3.287873357098e-04 -1.620267972932e-11 1.100000000000e+01 3.288585486644e-04 0.000000000000e+00 -3.288585324612e-04 -1.620318150842e-11 1.150000000000e+01 3.289279017465e-04 0.000000000000e+00 -3.289278855428e-04 -1.620369316633e-11 1.200000000000e+01 3.289955902854e-04 0.000000000000e+00 -3.289955740812e-04 -1.620425098067e-11 1.250000000000e+01 3.290617663485e-04 0.000000000000e+00 -3.290617501435e-04 -1.620498072439e-11 1.300000000000e+01 3.291265602086e-04 0.000000000000e+00 -3.291265440023e-04 -1.620624416637e-11 1.350000000000e+01 3.291900844014e-04 0.000000000000e+00 -3.291900681924e-04 -1.620893565982e-11 1.400000000000e+01 3.292524368871e-04 0.000000000000e+00 -3.292524206721e-04 -1.621500819879e-11 1.450000000000e+01 3.293137035390e-04 0.000000000000e+00 -3.293136873107e-04 -1.622831047565e-11 1.500000000000e+01 3.293739601221e-04 0.000000000000e+00 -3.293739438663e-04 -1.625580417925e-11 1.550000000000e+01 3.294332738821e-04 0.000000000000e+00 -3.294332575729e-04 -1.630920583703e-11 1.600000000000e+01 3.294917048311e-04 0.000000000000e+00 -3.294916884240e-04 -1.640706465339e-11 1.650000000000e+01 3.295493067990e-04 0.000000000000e+00 -3.295492902218e-04 -1.657725282773e-11 1.700000000000e+01 3.296061282987e-04 0.000000000000e+00 -3.296061114389e-04 -1.685981298281e-11 1.750000000000e+01 3.296622132435e-04 0.000000000000e+00 -3.296621959334e-04 -1.731008230208e-11 1.800000000000e+01 3.297176015473e-04 0.000000000000e+00 -3.297175835453e-04 -1.800199665562e-11 1.850000000000e+01 3.297723296287e-04 0.000000000000e+00 -3.297723105972e-04 -1.903147066510e-11 1.900000000000e+01 3.298264308380e-04 0.000000000000e+00 -3.298264103183e-04 -2.051975041960e-11 1.950000000000e+01 3.298799358206e-04 0.000000000000e+00 -3.298799132039e-04 -2.261664282002e-11 2.000000000000e+01 3.299328728273e-04 0.000000000000e+00 -3.299328473237e-04 -2.550353744351e-11 1.000000000000e+00 3.381608806303e-04 0.000000000000e+00 -3.381608644371e-04 -1.619317952605e-11 1.500000000000e+00 4.834873783193e-04 0.000000000000e+00 -4.834873621256e-04 -1.619367952607e-11 2.000000000000e+00 6.146001355479e-04 0.000000000000e+00 -6.146001193538e-04 -1.619417952607e-11 2.500000000000e+00 7.326229315657e-04 0.000000000000e+00 -7.326229153710e-04 -1.619467952607e-11 3.000000000000e+00 8.386038884159e-04 0.000000000000e+00 -8.386038722207e-04 -1.619517952607e-11 3.500000000000e+00 9.335180008325e-04 0.000000000000e+00 -9.335179846369e-04 -1.619567952607e-11 4.000000000000e+00 1.018272230757e-03 0.000000000000e+00 -1.018272214561e-03 -1.619617952607e-11 4.500000000000e+00 1.093711944468e-03 0.000000000000e+00 -1.093711928271e-03 -1.619667952607e-11 5.000000000000e+00 1.160627621466e-03 0.000000000000e+00 -1.160627605269e-03 -1.619717952607e-11 5.500000000000e+00 1.219761073951e-03 0.000000000000e+00 -1.219761057753e-03 -1.619767952607e-11 6.000000000000e+00 1.271810709152e-03 0.000000000000e+00 -1.271810692954e-03 -1.619817952607e-11 6.500000000000e+00 1.317435599700e-03 0.000000000000e+00 -1.317435583501e-03 -1.619867952607e-11 7.000000000000e+00 1.357258296840e-03 0.000000000000e+00 -1.357258280641e-03 -1.619917952607e-11 7.500000000000e+00 1.391866440578e-03 0.000000000000e+00 -1.391866424379e-03 -1.619967952607e-11 8.000000000000e+00 1.421813308979e-03 0.000000000000e+00 -1.421813292778e-03 -1.620017952607e-11 8.500000000000e+00 1.447617524091e-03 0.000000000000e+00 -1.447617507891e-03 -1.620067952607e-11 9.000000000000e+00 1.469762201050e-03 0.000000000000e+00 -1.469762184849e-03 -1.620117952607e-11 9.500000000000e+00 1.488693879562e-03 0.000000000000e+00 -1.488693863361e-03 -1.620167952607e-11 1.000000000000e+01 1.504821591719e-03 0.000000000000e+00 -1.504821575516e-03 -1.620217952607e-11 1.050000000000e+01 1.518516379233e-03 0.000000000000e+00 -1.518516363030e-03 -1.620267952607e-11 1.100000000000e+01 1.530111478334e-03 0.000000000000e+00 -1.530111462131e-03 -1.620317952607e-11 1.150000000000e+01 1.539903264278e-03 0.000000000000e+00 -1.539903248074e-03 -1.620367952607e-11 1.200000000000e+01 1.548152923100e-03 0.000000000000e+00 -1.548152906895e-03 -1.620417952607e-11 1.250000000000e+01 1.555088723815e-03 0.000000000000e+00 -1.555088707610e-03 -1.620467952607e-11 1.300000000000e+01 1.560908713031e-03 0.000000000000e+00 -1.560908696826e-03 -1.620517952607e-11 1.350000000000e+01 1.565783654295e-03 0.000000000000e+00 -1.565783638090e-03 -1.620567952607e-11 1.400000000000e+01 1.569859975783e-03 0.000000000000e+00 -1.569859959577e-03 -1.620617952607e-11 1.450000000000e+01 1.573262771492e-03 0.000000000000e+00 -1.573262755285e-03 -1.620667952607e-11 1.500000000000e+01 1.576098506276e-03 0.000000000000e+00 -1.576098490069e-03 -1.620717952607e-11 1.550000000000e+01 1.578457571724e-03 0.000000000000e+00 -1.578457555516e-03 -1.620767952607e-11 1.600000000000e+01 1.580416575006e-03 0.000000000000e+00 -1.580416558798e-03 -1.620817952607e-11 1.650000000000e+01 1.582040369960e-03 0.000000000000e+00 -1.582040353751e-03 -1.620867952607e-11 1.700000000000e+01 1.583383838568e-03 0.000000000000e+00 -1.583383822359e-03 -1.620917952607e-11 1.750000000000e+01 1.584493440525e-03 0.000000000000e+00 -1.584493424315e-03 -1.620967952607e-11 1.800000000000e+01 1.585408553913e-03 0.000000000000e+00 -1.585408537703e-03 -1.621017952607e-11 1.850000000000e+01 1.586162632256e-03 0.000000000000e+00 -1.586162616046e-03 -1.621067952607e-11 1.900000000000e+01 1.586784203022e-03 0.000000000000e+00 -1.586784186811e-03 -1.621117952607e-11 1.950000000000e+01 1.587297729587e-03 0.000000000000e+00 -1.587297713375e-03 -1.621167952607e-11 2.000000000000e+01 1.587724350522e-03 0.000000000000e+00 -1.587724334310e-03 -1.621217952611e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb2.standard0000644000265600020320000010232612264261473024262 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 2.000006063541e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 3.915335937410e-14 0.000000000000e+00 -9.153347601852e-15 -3.000000000000e-14 5.000000000000e+00 9.297063386054e-08 0.000000000000e+00 -9.297060386039e-08 -3.000000000000e-14 5.500000000000e+00 2.735481744204e-05 0.000000000000e+00 -2.735481741204e-05 -3.000000000000e-14 6.000000000000e+00 1.263337042253e-04 0.000000000000e+00 -1.263337041953e-04 -3.000000000000e-14 6.500000000000e+00 2.953850101330e-04 0.000000000000e+00 -2.953850101030e-04 -3.000000000000e-14 7.000000000000e+00 5.202777724311e-04 0.000000000000e+00 -5.202777724011e-04 -3.000000000000e-14 7.500000000000e+00 7.834400225996e-04 0.000000000000e+00 -7.834400225696e-04 -3.000000000000e-14 8.000000000000e+00 1.067501951767e-03 0.000000000000e+00 -1.067501951737e-03 -3.000000000000e-14 8.500000000000e+00 1.333392633550e-03 0.000000000000e+00 -1.333392633520e-03 -3.000000000000e-14 9.000000000000e+00 1.495150296380e-03 0.000000000000e+00 -1.495150296350e-03 -3.000000000000e-14 9.500000000000e+00 1.582735752041e-03 0.000000000000e+00 -1.582735752011e-03 -3.000000000000e-14 1.000000000000e+01 1.634785171237e-03 0.000000000000e+00 -1.634785171207e-03 -3.000000000000e-14 1.050000000000e+01 1.669001355064e-03 0.000000000000e+00 -1.669001355034e-03 -3.000000000000e-14 1.100000000000e+01 1.693255815917e-03 0.000000000000e+00 -1.693255815887e-03 -3.000000000000e-14 1.150000000000e+01 1.711413036547e-03 0.000000000000e+00 -1.711413036517e-03 -3.000000000000e-14 1.200000000000e+01 1.725565361374e-03 0.000000000000e+00 -1.725565361344e-03 -3.000000000000e-14 1.250000000000e+01 1.736940191748e-03 0.000000000000e+00 -1.736940191718e-03 -3.000000000000e-14 1.300000000000e+01 1.746304962789e-03 0.000000000000e+00 -1.746304962759e-03 -3.000000000000e-14 1.350000000000e+01 1.754164758498e-03 0.000000000000e+00 -1.754164758468e-03 -3.000000000000e-14 1.400000000000e+01 1.760866137243e-03 0.000000000000e+00 -1.760866137213e-03 -3.000000000000e-14 1.450000000000e+01 1.766655203809e-03 0.000000000000e+00 -1.766655203779e-03 -3.000000000000e-14 1.500000000000e+01 1.771711828016e-03 0.000000000000e+00 -1.771711827986e-03 -3.000000000000e-14 1.550000000000e+01 1.776170715316e-03 0.000000000000e+00 -1.776170715286e-03 -3.000000000000e-14 1.600000000000e+01 1.780134877701e-03 0.000000000000e+00 -1.780134877671e-03 -3.000000000000e-14 1.650000000000e+01 1.783684528867e-03 0.000000000000e+00 -1.783684528837e-03 -3.000000000000e-14 1.700000000000e+01 1.786883125134e-03 0.000000000000e+00 -1.786883125104e-03 -3.000000000000e-14 1.750000000000e+01 1.789781570113e-03 0.000000000000e+00 -1.789781570083e-03 -3.000000000000e-14 1.800000000000e+01 1.792421205438e-03 0.000000000000e+00 -1.792421205408e-03 -3.000000000000e-14 1.850000000000e+01 1.794835979432e-03 0.000000000000e+00 -1.794835979402e-03 -3.000000000000e-14 1.900000000000e+01 1.797054046981e-03 0.000000000000e+00 -1.797054046951e-03 -3.000000000000e-14 1.950000000000e+01 1.799098968194e-03 0.000000000000e+00 -1.799098968164e-03 -3.000000000000e-14 2.000000000000e+01 1.800990619119e-03 0.000000000000e+00 -1.800990619089e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 3.915314253367e-14 0.000000000000e+00 -9.153347601849e-15 -3.000000000000e-14 5.000000000000e+00 9.297055676336e-08 0.000000000000e+00 -9.297052676323e-08 -3.000000000000e-14 5.500000000000e+00 2.735364085322e-05 0.000000000000e+00 -2.735364082322e-05 -3.000000000000e-14 6.000000000000e+00 1.263205533674e-04 0.000000000000e+00 -1.263205533374e-04 -3.000000000000e-14 6.500000000000e+00 2.953348879570e-04 0.000000000000e+00 -2.953348879270e-04 -3.000000000000e-14 7.000000000000e+00 5.201521999530e-04 0.000000000000e+00 -5.201521999230e-04 -3.000000000000e-14 7.500000000000e+00 7.831709744074e-04 0.000000000000e+00 -7.831709743774e-04 -3.000000000000e-14 8.000000000000e+00 1.066900230765e-03 0.000000000000e+00 -1.066900230735e-03 -3.000000000000e-14 8.500000000000e+00 1.329106072531e-03 0.000000000000e+00 -1.329106072501e-03 -3.000000000000e-14 9.000000000000e+00 1.484769877135e-03 0.000000000000e+00 -1.484769877105e-03 -3.000000000000e-14 9.500000000000e+00 1.568475680011e-03 0.000000000000e+00 -1.568475679981e-03 -3.000000000000e-14 1.000000000000e+01 1.618283530130e-03 0.000000000000e+00 -1.618283530100e-03 -3.000000000000e-14 1.050000000000e+01 1.651112281295e-03 0.000000000000e+00 -1.651112281265e-03 -3.000000000000e-14 1.100000000000e+01 1.674439176671e-03 0.000000000000e+00 -1.674439176641e-03 -3.000000000000e-14 1.150000000000e+01 1.691936277427e-03 0.000000000000e+00 -1.691936277397e-03 -3.000000000000e-14 1.200000000000e+01 1.705595506629e-03 0.000000000000e+00 -1.705595506599e-03 -3.000000000000e-14 1.250000000000e+01 1.716587867167e-03 0.000000000000e+00 -1.716587867137e-03 -3.000000000000e-14 1.300000000000e+01 1.725647024901e-03 0.000000000000e+00 -1.725647024871e-03 -3.000000000000e-14 1.350000000000e+01 1.733256719966e-03 0.000000000000e+00 -1.733256719936e-03 -3.000000000000e-14 1.400000000000e+01 1.739749398711e-03 0.000000000000e+00 -1.739749398681e-03 -3.000000000000e-14 1.450000000000e+01 1.745361475967e-03 0.000000000000e+00 -1.745361475937e-03 -3.000000000000e-14 1.500000000000e+01 1.750265951782e-03 0.000000000000e+00 -1.750265951752e-03 -3.000000000000e-14 1.550000000000e+01 1.754592526450e-03 0.000000000000e+00 -1.754592526420e-03 -3.000000000000e-14 1.600000000000e+01 1.758440478563e-03 0.000000000000e+00 -1.758440478533e-03 -3.000000000000e-14 1.650000000000e+01 1.761887179576e-03 0.000000000000e+00 -1.761887179546e-03 -3.000000000000e-14 1.700000000000e+01 1.764993882976e-03 0.000000000000e+00 -1.764993882946e-03 -3.000000000000e-14 1.750000000000e+01 1.767809757978e-03 0.000000000000e+00 -1.767809757948e-03 -3.000000000000e-14 1.800000000000e+01 1.770374761409e-03 0.000000000000e+00 -1.770374761379e-03 -3.000000000000e-14 1.850000000000e+01 1.772721722014e-03 0.000000000000e+00 -1.772721721984e-03 -3.000000000000e-14 1.900000000000e+01 1.774877879327e-03 0.000000000000e+00 -1.774877879297e-03 -3.000000000000e-14 1.950000000000e+01 1.776866037473e-03 0.000000000000e+00 -1.776866037443e-03 -3.000000000000e-14 2.000000000000e+01 1.778705442385e-03 0.000000000000e+00 -1.778705442355e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 3.915314253367e-14 0.000000000000e+00 -9.153347601844e-15 -3.000000000000e-14 5.000000000000e+00 9.297045906308e-08 0.000000000000e+00 -9.297042906328e-08 -3.000000000000e-14 5.500000000000e+00 2.735215001474e-05 0.000000000000e+00 -2.735214998474e-05 -3.000000000000e-14 6.000000000000e+00 1.263038915599e-04 0.000000000000e+00 -1.263038915299e-04 -3.000000000000e-14 6.500000000000e+00 2.952713725985e-04 0.000000000000e+00 -2.952713725685e-04 -3.000000000000e-14 7.000000000000e+00 5.199928966802e-04 0.000000000000e+00 -5.199928966502e-04 -3.000000000000e-14 7.500000000000e+00 7.828282403054e-04 0.000000000000e+00 -7.828282402754e-04 -3.000000000000e-14 8.000000000000e+00 1.066124655638e-03 0.000000000000e+00 -1.066124655608e-03 -3.000000000000e-14 8.500000000000e+00 1.323349652849e-03 0.000000000000e+00 -1.323349652819e-03 -3.000000000000e-14 9.000000000000e+00 1.471490653950e-03 0.000000000000e+00 -1.471490653920e-03 -3.000000000000e-14 9.500000000000e+00 1.550567890796e-03 0.000000000000e+00 -1.550567890766e-03 -3.000000000000e-14 1.000000000000e+01 1.597720450091e-03 0.000000000000e+00 -1.597720450061e-03 -3.000000000000e-14 1.050000000000e+01 1.628904893243e-03 0.000000000000e+00 -1.628904893213e-03 -3.000000000000e-14 1.100000000000e+01 1.651130101731e-03 0.000000000000e+00 -1.651130101701e-03 -3.000000000000e-14 1.150000000000e+01 1.667841335243e-03 0.000000000000e+00 -1.667841335213e-03 -3.000000000000e-14 1.200000000000e+01 1.680912294897e-03 0.000000000000e+00 -1.680912294867e-03 -3.000000000000e-14 1.250000000000e+01 1.691447528357e-03 0.000000000000e+00 -1.691447528327e-03 -3.000000000000e-14 1.300000000000e+01 1.700140846811e-03 0.000000000000e+00 -1.700140846781e-03 -3.000000000000e-14 1.350000000000e+01 1.707450755921e-03 0.000000000000e+00 -1.707450755891e-03 -3.000000000000e-14 1.400000000000e+01 1.713692988767e-03 0.000000000000e+00 -1.713692988737e-03 -3.000000000000e-14 1.450000000000e+01 1.719092465412e-03 0.000000000000e+00 -1.719092465382e-03 -3.000000000000e-14 1.500000000000e+01 1.723814024380e-03 0.000000000000e+00 -1.723814024350e-03 -3.000000000000e-14 1.550000000000e+01 1.727981411517e-03 0.000000000000e+00 -1.727981411487e-03 -3.000000000000e-14 1.600000000000e+01 1.731689458389e-03 0.000000000000e+00 -1.731689458359e-03 -3.000000000000e-14 1.650000000000e+01 1.735012147083e-03 0.000000000000e+00 -1.735012147053e-03 -3.000000000000e-14 1.700000000000e+01 1.738008101497e-03 0.000000000000e+00 -1.738008101467e-03 -3.000000000000e-14 1.750000000000e+01 1.740724418496e-03 0.000000000000e+00 -1.740724418466e-03 -3.000000000000e-14 1.800000000000e+01 1.743199398836e-03 0.000000000000e+00 -1.743199398806e-03 -3.000000000000e-14 1.850000000000e+01 1.745464531323e-03 0.000000000000e+00 -1.745464531293e-03 -3.000000000000e-14 1.900000000000e+01 1.747545959179e-03 0.000000000000e+00 -1.747545959149e-03 -3.000000000000e-14 1.950000000000e+01 1.749465580490e-03 0.000000000000e+00 -1.749465580460e-03 -3.000000000000e-14 2.000000000000e+01 1.751241885537e-03 0.000000000000e+00 -1.751241885507e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 5.000000000000e+00 3.343731225063e-10 0.000000000000e+00 -3.343431224342e-10 -3.000000000000e-14 5.500000000000e+00 2.048109266410e-05 0.000000000000e+00 -2.048109263410e-05 -3.000000000000e-14 6.000000000000e+00 1.361684315926e-04 0.000000000000e+00 -1.361684315626e-04 -3.000000000000e-14 6.500000000000e+00 3.488695515318e-04 0.000000000000e+00 -3.488695515018e-04 -3.000000000000e-14 7.000000000000e+00 6.304093917227e-04 0.000000000000e+00 -6.304093916927e-04 -3.000000000000e-14 7.500000000000e+00 9.487834014961e-04 0.000000000000e+00 -9.487834014661e-04 -3.000000000000e-14 8.000000000000e+00 1.275228113032e-03 0.000000000000e+00 -1.275228113002e-03 -3.000000000000e-14 8.500000000000e+00 1.511531587893e-03 0.000000000000e+00 -1.511531587863e-03 -3.000000000000e-14 9.000000000000e+00 1.622766914119e-03 0.000000000000e+00 -1.622766914089e-03 -3.000000000000e-14 9.500000000000e+00 1.679728806236e-03 0.000000000000e+00 -1.679728806206e-03 -3.000000000000e-14 1.000000000000e+01 1.713576500838e-03 0.000000000000e+00 -1.713576500808e-03 -3.000000000000e-14 1.050000000000e+01 1.735992413074e-03 0.000000000000e+00 -1.735992413044e-03 -3.000000000000e-14 1.100000000000e+01 1.751982233331e-03 0.000000000000e+00 -1.751982233301e-03 -3.000000000000e-14 1.150000000000e+01 1.764002444069e-03 0.000000000000e+00 -1.764002444039e-03 -3.000000000000e-14 1.200000000000e+01 1.773393652381e-03 0.000000000000e+00 -1.773393652351e-03 -3.000000000000e-14 1.250000000000e+01 1.780949504851e-03 0.000000000000e+00 -1.780949504821e-03 -3.000000000000e-14 1.300000000000e+01 1.787170431899e-03 0.000000000000e+00 -1.787170431869e-03 -3.000000000000e-14 1.350000000000e+01 1.792388168569e-03 0.000000000000e+00 -1.792388168539e-03 -3.000000000000e-14 1.400000000000e+01 1.796831690777e-03 0.000000000000e+00 -1.796831690747e-03 -3.000000000000e-14 1.450000000000e+01 1.800664390552e-03 0.000000000000e+00 -1.800664390522e-03 -3.000000000000e-14 1.500000000000e+01 1.804006147453e-03 0.000000000000e+00 -1.804006147423e-03 -3.000000000000e-14 1.550000000000e+01 1.806947013178e-03 0.000000000000e+00 -1.806947013148e-03 -3.000000000000e-14 1.600000000000e+01 1.809556014282e-03 0.000000000000e+00 -1.809556014252e-03 -3.000000000000e-14 1.650000000000e+01 1.811886996348e-03 0.000000000000e+00 -1.811886996318e-03 -3.000000000000e-14 1.700000000000e+01 1.813982611724e-03 0.000000000000e+00 -1.813982611694e-03 -3.000000000000e-14 1.750000000000e+01 1.815877106520e-03 0.000000000000e+00 -1.815877106490e-03 -3.000000000000e-14 1.800000000000e+01 1.817598310027e-03 0.000000000000e+00 -1.817598309997e-03 -3.000000000000e-14 1.850000000000e+01 1.819169081709e-03 0.000000000000e+00 -1.819169081679e-03 -3.000000000000e-14 1.900000000000e+01 1.820608381466e-03 0.000000000000e+00 -1.820608381436e-03 -3.000000000000e-14 1.950000000000e+01 1.821932073281e-03 0.000000000000e+00 -1.821932073251e-03 -3.000000000000e-14 2.000000000000e+01 1.823153551020e-03 0.000000000000e+00 -1.823153550990e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 5.000000000000e+00 3.343731207715e-10 0.000000000000e+00 -3.343431209285e-10 -3.000000000000e-14 5.500000000000e+00 2.048021655193e-05 0.000000000000e+00 -2.048021652193e-05 -3.000000000000e-14 6.000000000000e+00 1.361513272623e-04 0.000000000000e+00 -1.361513272323e-04 -3.000000000000e-14 6.500000000000e+00 3.487961581200e-04 0.000000000000e+00 -3.487961580900e-04 -3.000000000000e-14 7.000000000000e+00 6.302204239003e-04 0.000000000000e+00 -6.302204238703e-04 -3.000000000000e-14 7.500000000000e+00 9.483528383528e-04 0.000000000000e+00 -9.483528383228e-04 -3.000000000000e-14 8.000000000000e+00 1.273892382295e-03 0.000000000000e+00 -1.273892382265e-03 -3.000000000000e-14 8.500000000000e+00 1.502350101662e-03 0.000000000000e+00 -1.502350101632e-03 -3.000000000000e-14 9.000000000000e+00 1.608051477628e-03 0.000000000000e+00 -1.608051477598e-03 -3.000000000000e-14 9.500000000000e+00 1.662241736076e-03 0.000000000000e+00 -1.662241736046e-03 -3.000000000000e-14 1.000000000000e+01 1.694576594163e-03 0.000000000000e+00 -1.694576594133e-03 -3.000000000000e-14 1.050000000000e+01 1.716067595821e-03 0.000000000000e+00 -1.716067595791e-03 -3.000000000000e-14 1.100000000000e+01 1.731439828305e-03 0.000000000000e+00 -1.731439828275e-03 -3.000000000000e-14 1.150000000000e+01 1.743019912588e-03 0.000000000000e+00 -1.743019912558e-03 -3.000000000000e-14 1.200000000000e+01 1.752081827199e-03 0.000000000000e+00 -1.752081827169e-03 -3.000000000000e-14 1.250000000000e+01 1.759381967558e-03 0.000000000000e+00 -1.759381967528e-03 -3.000000000000e-14 1.300000000000e+01 1.765398450579e-03 0.000000000000e+00 -1.765398450549e-03 -3.000000000000e-14 1.350000000000e+01 1.770448875894e-03 0.000000000000e+00 -1.770448875864e-03 -3.000000000000e-14 1.400000000000e+01 1.774752846019e-03 0.000000000000e+00 -1.774752845989e-03 -3.000000000000e-14 1.450000000000e+01 1.778467297351e-03 0.000000000000e+00 -1.778467297321e-03 -3.000000000000e-14 1.500000000000e+01 1.781707519670e-03 0.000000000000e+00 -1.781707519640e-03 -3.000000000000e-14 1.550000000000e+01 1.784560212106e-03 0.000000000000e+00 -1.784560212076e-03 -3.000000000000e-14 1.600000000000e+01 1.787091894916e-03 0.000000000000e+00 -1.787091894886e-03 -3.000000000000e-14 1.650000000000e+01 1.789354501993e-03 0.000000000000e+00 -1.789354501963e-03 -3.000000000000e-14 1.700000000000e+01 1.791389201690e-03 0.000000000000e+00 -1.791389201660e-03 -3.000000000000e-14 1.750000000000e+01 1.793229070168e-03 0.000000000000e+00 -1.793229070138e-03 -3.000000000000e-14 1.800000000000e+01 1.794901001603e-03 0.000000000000e+00 -1.794901001573e-03 -3.000000000000e-14 1.850000000000e+01 1.796427098823e-03 0.000000000000e+00 -1.796427098793e-03 -3.000000000000e-14 1.900000000000e+01 1.797825702737e-03 0.000000000000e+00 -1.797825702707e-03 -3.000000000000e-14 1.950000000000e+01 1.799112183540e-03 0.000000000000e+00 -1.799112183510e-03 -3.000000000000e-14 2.000000000000e+01 1.800299454961e-03 0.000000000000e+00 -1.800299454931e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 5.000000000000e+00 3.343731192536e-10 0.000000000000e+00 -3.343431190204e-10 -3.000000000000e-14 5.500000000000e+00 2.047910644663e-05 0.000000000000e+00 -2.047910641663e-05 -3.000000000000e-14 6.000000000000e+00 1.361296579172e-04 0.000000000000e+00 -1.361296578872e-04 -3.000000000000e-14 6.500000000000e+00 3.487031542345e-04 0.000000000000e+00 -3.487031542045e-04 -3.000000000000e-14 7.000000000000e+00 6.299805209394e-04 0.000000000000e+00 -6.299805209094e-04 -3.000000000000e-14 7.500000000000e+00 9.478017720426e-04 0.000000000000e+00 -9.478017720126e-04 -3.000000000000e-14 8.000000000000e+00 1.271972055585e-03 0.000000000000e+00 -1.271972055555e-03 -3.000000000000e-14 8.500000000000e+00 1.490408335298e-03 0.000000000000e+00 -1.490408335268e-03 -3.000000000000e-14 9.000000000000e+00 1.589521600322e-03 0.000000000000e+00 -1.589521600292e-03 -3.000000000000e-14 9.500000000000e+00 1.640457115172e-03 0.000000000000e+00 -1.640457115142e-03 -3.000000000000e-14 1.000000000000e+01 1.671012801073e-03 0.000000000000e+00 -1.671012801043e-03 -3.000000000000e-14 1.050000000000e+01 1.691411872415e-03 0.000000000000e+00 -1.691411872385e-03 -3.000000000000e-14 1.100000000000e+01 1.706052324167e-03 0.000000000000e+00 -1.706052324137e-03 -3.000000000000e-14 1.150000000000e+01 1.717109302208e-03 0.000000000000e+00 -1.717109302178e-03 -3.000000000000e-14 1.200000000000e+01 1.725778858279e-03 0.000000000000e+00 -1.725778858249e-03 -3.000000000000e-14 1.250000000000e+01 1.732773689599e-03 0.000000000000e+00 -1.732773689569e-03 -3.000000000000e-14 1.300000000000e+01 1.738545663273e-03 0.000000000000e+00 -1.738545663243e-03 -3.000000000000e-14 1.350000000000e+01 1.743395707458e-03 0.000000000000e+00 -1.743395707428e-03 -3.000000000000e-14 1.400000000000e+01 1.747532344573e-03 0.000000000000e+00 -1.747532344543e-03 -3.000000000000e-14 1.450000000000e+01 1.751104864746e-03 0.000000000000e+00 -1.751104864716e-03 -3.000000000000e-14 1.500000000000e+01 1.754223111894e-03 0.000000000000e+00 -1.754223111864e-03 -3.000000000000e-14 1.550000000000e+01 1.756969801078e-03 0.000000000000e+00 -1.756969801048e-03 -3.000000000000e-14 1.600000000000e+01 1.759408470031e-03 0.000000000000e+00 -1.759408470001e-03 -3.000000000000e-14 1.650000000000e+01 1.761588774911e-03 0.000000000000e+00 -1.761588774881e-03 -3.000000000000e-14 1.700000000000e+01 1.763550113967e-03 0.000000000000e+00 -1.763550113937e-03 -3.000000000000e-14 1.750000000000e+01 1.765324166453e-03 0.000000000000e+00 -1.765324166423e-03 -3.000000000000e-14 1.800000000000e+01 1.766936709026e-03 0.000000000000e+00 -1.766936708996e-03 -3.000000000000e-14 1.850000000000e+01 1.768408939550e-03 0.000000000000e+00 -1.768408939520e-03 -3.000000000000e-14 1.900000000000e+01 1.769758458044e-03 0.000000000000e+00 -1.769758458014e-03 -3.000000000000e-14 1.950000000000e+01 1.771000020914e-03 0.000000000000e+00 -1.771000020884e-03 -3.000000000000e-14 2.000000000000e+01 1.772146033589e-03 0.000000000000e+00 -1.772146033559e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 2.410788582652e-14 0.000000000000e+00 5.892049647368e-15 -3.000000000000e-14 4.500000000000e+00 3.278680703669e-10 0.000000000000e+00 -3.278380707562e-10 -3.000000000000e-14 5.000000000000e+00 2.828450994401e-06 0.000000000000e+00 -2.828450964401e-06 -3.000000000000e-14 5.500000000000e+00 3.720829360436e-05 0.000000000000e+00 -3.720829357436e-05 -3.000000000000e-14 6.000000000000e+00 1.176906180062e-04 0.000000000000e+00 -1.176906179762e-04 -3.000000000000e-14 6.500000000000e+00 2.423846255337e-04 0.000000000000e+00 -2.423846255037e-04 -3.000000000000e-14 7.000000000000e+00 4.054491342419e-04 0.000000000000e+00 -4.054491342119e-04 -3.000000000000e-14 7.500000000000e+00 5.994910790894e-04 0.000000000000e+00 -5.994910790594e-04 -3.000000000000e-14 8.000000000000e+00 8.166271980683e-04 0.000000000000e+00 -8.166271980383e-04 -3.000000000000e-14 8.500000000000e+00 1.046566512048e-03 0.000000000000e+00 -1.046566512018e-03 -3.000000000000e-14 9.000000000000e+00 1.247708632214e-03 0.000000000000e+00 -1.247708632184e-03 -3.000000000000e-14 9.500000000000e+00 1.386830345015e-03 0.000000000000e+00 -1.386830344985e-03 -3.000000000000e-14 1.000000000000e+01 1.476043113349e-03 0.000000000000e+00 -1.476043113319e-03 -3.000000000000e-14 1.050000000000e+01 1.535267711996e-03 0.000000000000e+00 -1.535267711966e-03 -3.000000000000e-14 1.100000000000e+01 1.576970148395e-03 0.000000000000e+00 -1.576970148365e-03 -3.000000000000e-14 1.150000000000e+01 1.607912162577e-03 0.000000000000e+00 -1.607912162547e-03 -3.000000000000e-14 1.200000000000e+01 1.631844651295e-03 0.000000000000e+00 -1.631844651265e-03 -3.000000000000e-14 1.250000000000e+01 1.650967076176e-03 0.000000000000e+00 -1.650967076146e-03 -3.000000000000e-14 1.300000000000e+01 1.666643346729e-03 0.000000000000e+00 -1.666643346699e-03 -3.000000000000e-14 1.350000000000e+01 1.679761802260e-03 0.000000000000e+00 -1.679761802230e-03 -3.000000000000e-14 1.400000000000e+01 1.690925705425e-03 0.000000000000e+00 -1.690925705395e-03 -3.000000000000e-14 1.450000000000e+01 1.700559420605e-03 0.000000000000e+00 -1.700559420575e-03 -3.000000000000e-14 1.500000000000e+01 1.708970516514e-03 0.000000000000e+00 -1.708970516484e-03 -3.000000000000e-14 1.550000000000e+01 1.716387666108e-03 0.000000000000e+00 -1.716387666078e-03 -3.000000000000e-14 1.600000000000e+01 1.722984653503e-03 0.000000000000e+00 -1.722984653473e-03 -3.000000000000e-14 1.650000000000e+01 1.728896084399e-03 0.000000000000e+00 -1.728896084369e-03 -3.000000000000e-14 1.700000000000e+01 1.734227965609e-03 0.000000000000e+00 -1.734227965579e-03 -3.000000000000e-14 1.750000000000e+01 1.739065011443e-03 0.000000000000e+00 -1.739065011413e-03 -3.000000000000e-14 1.800000000000e+01 1.743475803756e-03 0.000000000000e+00 -1.743475803726e-03 -3.000000000000e-14 1.850000000000e+01 1.747516509519e-03 0.000000000000e+00 -1.747516509489e-03 -3.000000000000e-14 1.900000000000e+01 1.751233607404e-03 0.000000000000e+00 -1.751233607374e-03 -3.000000000000e-14 1.950000000000e+01 1.754665919908e-03 0.000000000000e+00 -1.754665919878e-03 -3.000000000000e-14 2.000000000000e+01 1.757846150056e-03 0.000000000000e+00 -1.757846150026e-03 -3.000000000000e-14 1.000000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 2.000027747584e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 2.410810266695e-14 0.000000000000e+00 5.892049647368e-15 -3.000000000000e-14 4.500000000000e+00 3.278680697164e-10 0.000000000000e+00 -3.278380699807e-10 -3.000000000000e-14 5.000000000000e+00 2.828426536833e-06 0.000000000000e+00 -2.828426506833e-06 -3.000000000000e-14 5.500000000000e+00 3.720674351421e-05 0.000000000000e+00 -3.720674348421e-05 -3.000000000000e-14 6.000000000000e+00 1.176809308729e-04 0.000000000000e+00 -1.176809308429e-04 -3.000000000000e-14 6.500000000000e+00 2.423537747475e-04 0.000000000000e+00 -2.423537747175e-04 -3.000000000000e-14 7.000000000000e+00 4.053770628917e-04 0.000000000000e+00 -4.053770628617e-04 -3.000000000000e-14 7.500000000000e+00 5.993461246891e-04 0.000000000000e+00 -5.993461246591e-04 -3.000000000000e-14 8.000000000000e+00 8.163471374440e-04 0.000000000000e+00 -8.163471374140e-04 -3.000000000000e-14 8.500000000000e+00 1.045622545030e-03 0.000000000000e+00 -1.045622545000e-03 -3.000000000000e-14 9.000000000000e+00 1.243555572451e-03 0.000000000000e+00 -1.243555572421e-03 -3.000000000000e-14 9.500000000000e+00 1.378470999567e-03 0.000000000000e+00 -1.378470999537e-03 -3.000000000000e-14 1.000000000000e+01 1.464404941136e-03 0.000000000000e+00 -1.464404941106e-03 -3.000000000000e-14 1.050000000000e+01 1.521391426186e-03 0.000000000000e+00 -1.521391426156e-03 -3.000000000000e-14 1.100000000000e+01 1.561552792502e-03 0.000000000000e+00 -1.561552792472e-03 -3.000000000000e-14 1.150000000000e+01 1.591390259132e-03 0.000000000000e+00 -1.591390259102e-03 -3.000000000000e-14 1.200000000000e+01 1.614497909208e-03 0.000000000000e+00 -1.614497909178e-03 -3.000000000000e-14 1.250000000000e+01 1.632982160752e-03 0.000000000000e+00 -1.632982160722e-03 -3.000000000000e-14 1.300000000000e+01 1.648149966810e-03 0.000000000000e+00 -1.648149966780e-03 -3.000000000000e-14 1.350000000000e+01 1.660853390140e-03 0.000000000000e+00 -1.660853390110e-03 -3.000000000000e-14 1.400000000000e+01 1.671671679669e-03 0.000000000000e+00 -1.671671679639e-03 -3.000000000000e-14 1.450000000000e+01 1.681012742027e-03 0.000000000000e+00 -1.681012741997e-03 -3.000000000000e-14 1.500000000000e+01 1.689172516526e-03 0.000000000000e+00 -1.689172516496e-03 -3.000000000000e-14 1.550000000000e+01 1.696371235813e-03 0.000000000000e+00 -1.696371235783e-03 -3.000000000000e-14 1.600000000000e+01 1.702776413218e-03 0.000000000000e+00 -1.702776413188e-03 -3.000000000000e-14 1.650000000000e+01 1.708517898826e-03 0.000000000000e+00 -1.708517898796e-03 -3.000000000000e-14 1.700000000000e+01 1.713698026971e-03 0.000000000000e+00 -1.713698026941e-03 -3.000000000000e-14 1.750000000000e+01 1.718398630035e-03 0.000000000000e+00 -1.718398630005e-03 -3.000000000000e-14 1.800000000000e+01 1.722685995747e-03 0.000000000000e+00 -1.722685995717e-03 -3.000000000000e-14 1.850000000000e+01 1.726614441351e-03 0.000000000000e+00 -1.726614441321e-03 -3.000000000000e-14 1.900000000000e+01 1.730228936841e-03 0.000000000000e+00 -1.730228936811e-03 -3.000000000000e-14 1.950000000000e+01 1.733567061357e-03 0.000000000000e+00 -1.733567061327e-03 -3.000000000000e-14 2.000000000000e+01 1.736660483517e-03 0.000000000000e+00 -1.736660483487e-03 -3.000000000000e-14 1.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 1.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 2.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.000000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 3.500000000000e+00 1.999984379497e-14 0.000000000000e+00 1.000000000000e-14 -3.000000000000e-14 4.000000000000e+00 2.410766898608e-14 0.000000000000e+00 5.892049647368e-15 -3.000000000000e-14 4.500000000000e+00 3.278680690659e-10 0.000000000000e+00 -3.278380690248e-10 -3.000000000000e-14 5.000000000000e+00 2.828395544164e-06 0.000000000000e+00 -2.828395514164e-06 -3.000000000000e-14 5.500000000000e+00 3.720477939240e-05 0.000000000000e+00 -3.720477936240e-05 -3.000000000000e-14 6.000000000000e+00 1.176686566152e-04 0.000000000000e+00 -1.176686565852e-04 -3.000000000000e-14 6.500000000000e+00 2.423146785963e-04 0.000000000000e+00 -2.423146785663e-04 -3.000000000000e-14 7.000000000000e+00 4.052856710383e-04 0.000000000000e+00 -4.052856710083e-04 -3.000000000000e-14 7.500000000000e+00 5.991619638813e-04 0.000000000000e+00 -5.991619638513e-04 -3.000000000000e-14 8.000000000000e+00 8.159896017856e-04 0.000000000000e+00 -8.159896017556e-04 -3.000000000000e-14 8.500000000000e+00 1.044344807983e-03 0.000000000000e+00 -1.044344807953e-03 -3.000000000000e-14 9.000000000000e+00 1.238084116716e-03 0.000000000000e+00 -1.238084116686e-03 -3.000000000000e-14 9.500000000000e+00 1.367761305364e-03 0.000000000000e+00 -1.367761305334e-03 -3.000000000000e-14 1.000000000000e+01 1.449723274284e-03 0.000000000000e+00 -1.449723274254e-03 -3.000000000000e-14 1.050000000000e+01 1.504026381078e-03 0.000000000000e+00 -1.504026381048e-03 -3.000000000000e-14 1.100000000000e+01 1.542345349558e-03 0.000000000000e+00 -1.542345349528e-03 -3.000000000000e-14 1.150000000000e+01 1.570862479303e-03 0.000000000000e+00 -1.570862479273e-03 -3.000000000000e-14 1.200000000000e+01 1.592983361907e-03 0.000000000000e+00 -1.592983361877e-03 -3.000000000000e-14 1.250000000000e+01 1.610703335194e-03 0.000000000000e+00 -1.610703335164e-03 -3.000000000000e-14 1.300000000000e+01 1.625261528270e-03 0.000000000000e+00 -1.625261528240e-03 -3.000000000000e-14 1.350000000000e+01 1.637466836484e-03 0.000000000000e+00 -1.637466836454e-03 -3.000000000000e-14 1.400000000000e+01 1.647869929676e-03 0.000000000000e+00 -1.647869929646e-03 -3.000000000000e-14 1.450000000000e+01 1.656859117236e-03 0.000000000000e+00 -1.656859117206e-03 -3.000000000000e-14 1.500000000000e+01 1.664716480477e-03 0.000000000000e+00 -1.664716480447e-03 -3.000000000000e-14 1.550000000000e+01 1.671652186115e-03 0.000000000000e+00 -1.671652186085e-03 -3.000000000000e-14 1.600000000000e+01 1.677826262707e-03 0.000000000000e+00 -1.677826262677e-03 -3.000000000000e-14 1.650000000000e+01 1.683362879405e-03 0.000000000000e+00 -1.683362879375e-03 -3.000000000000e-14 1.700000000000e+01 1.688359980032e-03 0.000000000000e+00 -1.688359980002e-03 -3.000000000000e-14 1.750000000000e+01 1.692895948976e-03 0.000000000000e+00 -1.692895948946e-03 -3.000000000000e-14 1.800000000000e+01 1.697034327270e-03 0.000000000000e+00 -1.697034327240e-03 -3.000000000000e-14 1.850000000000e+01 1.700827216043e-03 0.000000000000e+00 -1.700827216013e-03 -3.000000000000e-14 1.900000000000e+01 1.704317776638e-03 0.000000000000e+00 -1.704317776608e-03 -3.000000000000e-14 1.950000000000e+01 1.707542096727e-03 0.000000000000e+00 -1.707542096697e-03 -3.000000000000e-14 2.000000000000e+01 1.710530603431e-03 0.000000000000e+00 -1.710530603401e-03 -3.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/reference/dcVsub_Ig1_vb0_jd.standard0000644000265600020320000024357112264261473024745 0ustar andreasadminV(g) I(d) I(g) I(s) I(b) 1.000000000000e+00 2.641968409019e-09 0.000000000000e+00 -2.641958399492e-09 -1.001000000000e-14 1.200000000000e+00 1.234745073753e-07 0.000000000000e+00 -1.234744973652e-07 -1.001000000000e-14 1.400000000000e+00 2.310461020303e-06 0.000000000000e+00 -2.310461010294e-06 -1.001000000000e-14 1.600000000000e+00 1.119542008135e-05 0.000000000000e+00 -1.119542007134e-05 -1.001000000000e-14 1.800000000000e+00 2.937035171181e-05 0.000000000000e+00 -2.937035170180e-05 -1.001000000000e-14 2.000000000000e+00 5.786121995175e-05 0.000000000000e+00 -5.786121994174e-05 -1.001000000000e-14 2.200000000000e+00 9.703567615661e-05 0.000000000000e+00 -9.703567614660e-05 -1.001000000000e-14 2.400000000000e+00 1.468438303603e-04 0.000000000000e+00 -1.468438303503e-04 -1.001000000000e-14 2.600000000000e+00 2.069236318172e-04 0.000000000000e+00 -2.069236318072e-04 -1.001000000000e-14 2.800000000000e+00 2.766760673291e-04 0.000000000000e+00 -2.766760673191e-04 -1.001000000000e-14 3.000000000000e+00 3.553303348651e-04 0.000000000000e+00 -3.553303348550e-04 -1.001000000000e-14 3.200000000000e+00 4.420014413675e-04 0.000000000000e+00 -4.420014413575e-04 -1.001000000000e-14 3.400000000000e+00 5.357383638324e-04 0.000000000000e+00 -5.357383638224e-04 -1.001000000000e-14 3.600000000000e+00 6.355601255518e-04 0.000000000000e+00 -6.355601255418e-04 -1.001000000000e-14 3.800000000000e+00 7.404771360061e-04 0.000000000000e+00 -7.404771359960e-04 -1.001000000000e-14 4.000000000000e+00 8.494947116282e-04 0.000000000000e+00 -8.494947116182e-04 -1.001000000000e-14 4.200000000000e+00 9.615940646709e-04 0.000000000000e+00 -9.615940646609e-04 -1.001000000000e-14 4.400000000000e+00 1.075682832828e-03 0.000000000000e+00 -1.075682832818e-03 -1.001000000000e-14 4.600000000000e+00 1.190502884313e-03 0.000000000000e+00 -1.190502884303e-03 -1.001000000000e-14 4.800000000000e+00 1.303954692966e-03 0.000000000000e+00 -1.303954692956e-03 -1.001000000000e-14 5.000000000000e+00 1.402745597027e-03 0.000000000000e+00 -1.402745597017e-03 -1.001000000000e-14 5.200000000000e+00 1.477795267063e-03 0.000000000000e+00 -1.477795267053e-03 -1.001000000000e-14 5.400000000000e+00 1.533061383326e-03 0.000000000000e+00 -1.533061383316e-03 -1.001000000000e-14 5.600000000000e+00 1.574185356530e-03 0.000000000000e+00 -1.574185356520e-03 -1.001000000000e-14 5.800000000000e+00 1.605558904469e-03 0.000000000000e+00 -1.605558904459e-03 -1.001000000000e-14 6.000000000000e+00 1.630149733810e-03 0.000000000000e+00 -1.630149733800e-03 -1.001000000000e-14 6.200000000000e+00 1.649907424876e-03 0.000000000000e+00 -1.649907424866e-03 -1.001000000000e-14 6.400000000000e+00 1.666126633659e-03 0.000000000000e+00 -1.666126633649e-03 -1.001000000000e-14 6.600000000000e+00 1.679687521954e-03 0.000000000000e+00 -1.679687521944e-03 -1.001000000000e-14 6.800000000000e+00 1.691204305938e-03 0.000000000000e+00 -1.691204305928e-03 -1.001000000000e-14 7.000000000000e+00 1.701116649957e-03 0.000000000000e+00 -1.701116649947e-03 -1.001000000000e-14 7.200000000000e+00 1.709746721613e-03 0.000000000000e+00 -1.709746721603e-03 -1.001000000000e-14 7.400000000000e+00 1.717335630656e-03 0.000000000000e+00 -1.717335630646e-03 -1.001000000000e-14 7.600000000000e+00 1.724067269731e-03 0.000000000000e+00 -1.724067269721e-03 -1.001000000000e-14 7.800000000000e+00 1.730084285487e-03 0.000000000000e+00 -1.730084285477e-03 -1.001000000000e-14 8.000000000000e+00 1.735499018506e-03 0.000000000000e+00 -1.735499018496e-03 -1.001000000000e-14 8.200000000000e+00 1.740401152930e-03 0.000000000000e+00 -1.740401152920e-03 -1.001000000000e-14 8.400000000000e+00 1.744863167531e-03 0.000000000000e+00 -1.744863167521e-03 -1.001000000000e-14 8.600000000000e+00 1.748944287988e-03 0.000000000000e+00 -1.748944287978e-03 -1.001000000000e-14 8.800000000000e+00 1.752693398230e-03 0.000000000000e+00 -1.752693398220e-03 -1.001000000000e-14 9.000000000000e+00 1.756151216372e-03 0.000000000000e+00 -1.756151216362e-03 -1.001000000000e-14 9.200000000000e+00 1.759351942783e-03 0.000000000000e+00 -1.759351942773e-03 -1.001000000000e-14 9.400000000000e+00 1.762324523734e-03 0.000000000000e+00 -1.762324523724e-03 -1.001000000000e-14 9.600000000000e+00 1.765093631249e-03 0.000000000000e+00 -1.765093631239e-03 -1.001000000000e-14 9.800000000000e+00 1.767680430869e-03 0.000000000000e+00 -1.767680430859e-03 -1.001000000000e-14 1.000000000000e+01 1.770103189033e-03 0.000000000000e+00 -1.770103189023e-03 -1.001000000000e-14 1.020000000000e+01 1.772377757916e-03 0.000000000000e+00 -1.772377757906e-03 -1.001000000000e-14 1.040000000000e+01 1.774517965648e-03 0.000000000000e+00 -1.774517965638e-03 -1.001000000000e-14 1.060000000000e+01 1.776535932844e-03 0.000000000000e+00 -1.776535932834e-03 -1.001000000000e-14 1.080000000000e+01 1.778442331206e-03 0.000000000000e+00 -1.778442331196e-03 -1.001000000000e-14 1.100000000000e+01 1.780246596238e-03 0.000000000000e+00 -1.780246596228e-03 -1.001000000000e-14 1.120000000000e+01 1.781957119663e-03 0.000000000000e+00 -1.781957119653e-03 -1.001000000000e-14 1.140000000000e+01 1.783581327967e-03 0.000000000000e+00 -1.783581327957e-03 -1.001000000000e-14 1.160000000000e+01 1.785125911919e-03 0.000000000000e+00 -1.785125911909e-03 -1.001000000000e-14 1.180000000000e+01 1.786596855273e-03 0.000000000000e+00 -1.786596855263e-03 -1.001000000000e-14 1.200000000000e+01 1.787999541878e-03 0.000000000000e+00 -1.787999541868e-03 -1.001000000000e-14 1.220000000000e+01 1.789338830030e-03 0.000000000000e+00 -1.789338830020e-03 -1.001000000000e-14 1.240000000000e+01 1.790619115927e-03 0.000000000000e+00 -1.790619115917e-03 -1.001000000000e-14 1.260000000000e+01 1.791844388073e-03 0.000000000000e+00 -1.791844388063e-03 -1.001000000000e-14 1.280000000000e+01 1.793018274120e-03 0.000000000000e+00 -1.793018274110e-03 -1.001000000000e-14 1.300000000000e+01 1.794144081335e-03 0.000000000000e+00 -1.794144081325e-03 -1.001000000000e-14 1.320000000000e+01 1.795224831709e-03 0.000000000000e+00 -1.795224831699e-03 -1.001000000000e-14 1.340000000000e+01 1.796263292496e-03 0.000000000000e+00 -1.796263292486e-03 -1.001000000000e-14 1.360000000000e+01 1.797262002886e-03 0.000000000000e+00 -1.797262002876e-03 -1.001000000000e-14 1.380000000000e+01 1.798223297368e-03 0.000000000000e+00 -1.798223297358e-03 -1.001000000000e-14 1.400000000000e+01 1.799149326248e-03 0.000000000000e+00 -1.799149326238e-03 -1.001000000000e-14 1.420000000000e+01 1.800042073727e-03 0.000000000000e+00 -1.800042073717e-03 -1.001000000000e-14 1.440000000000e+01 1.800903373877e-03 0.000000000000e+00 -1.800903373867e-03 -1.001000000000e-14 1.460000000000e+01 1.801734924783e-03 0.000000000000e+00 -1.801734924773e-03 -1.001000000000e-14 1.480000000000e+01 1.802538301112e-03 0.000000000000e+00 -1.802538301102e-03 -1.001000000000e-14 1.500000000000e+01 1.803314965286e-03 0.000000000000e+00 -1.803314965276e-03 -1.001000000000e-14 1.520000000000e+01 1.804066277469e-03 0.000000000000e+00 -1.804066277459e-03 -1.001000000000e-14 1.540000000000e+01 1.804793504479e-03 0.000000000000e+00 -1.804793504469e-03 -1.001000000000e-14 1.560000000000e+01 1.805497827789e-03 0.000000000000e+00 -1.805497827778e-03 -1.001000000000e-14 1.580000000000e+01 1.806180350702e-03 0.000000000000e+00 -1.806180350692e-03 -1.001000000000e-14 1.600000000000e+01 1.806842104814e-03 0.000000000000e+00 -1.806842104804e-03 -1.001000000000e-14 1.620000000000e+01 1.807484055834e-03 0.000000000000e+00 -1.807484055824e-03 -1.001000000000e-14 1.640000000000e+01 1.808107108844e-03 0.000000000000e+00 -1.808107108834e-03 -1.001000000000e-14 1.660000000000e+01 1.808712113058e-03 0.000000000000e+00 -1.808712113048e-03 -1.001000000000e-14 1.680000000000e+01 1.809299866136e-03 0.000000000000e+00 -1.809299866126e-03 -1.001000000000e-14 1.700000000000e+01 1.809871118096e-03 0.000000000000e+00 -1.809871118086e-03 -1.001000000000e-14 1.720000000000e+01 1.810426574880e-03 0.000000000000e+00 -1.810426574870e-03 -1.001000000000e-14 1.740000000000e+01 1.810966901589e-03 0.000000000000e+00 -1.810966901579e-03 -1.001000000000e-14 1.760000000000e+01 1.811492725448e-03 0.000000000000e+00 -1.811492725438e-03 -1.001000000000e-14 1.780000000000e+01 1.812004638506e-03 0.000000000000e+00 -1.812004638496e-03 -1.001000000000e-14 1.800000000000e+01 1.812503200101e-03 0.000000000000e+00 -1.812503200091e-03 -1.001000000000e-14 1.820000000000e+01 1.812988939135e-03 0.000000000000e+00 -1.812988939125e-03 -1.001000000000e-14 1.840000000000e+01 1.813462356142e-03 0.000000000000e+00 -1.813462356132e-03 -1.001000000000e-14 1.860000000000e+01 1.813923925195e-03 0.000000000000e+00 -1.813923925185e-03 -1.001000000000e-14 1.880000000000e+01 1.814374095668e-03 0.000000000000e+00 -1.814374095658e-03 -1.001000000000e-14 1.900000000000e+01 1.814813293840e-03 0.000000000000e+00 -1.814813293830e-03 -1.001000000000e-14 1.920000000000e+01 1.815241924390e-03 0.000000000000e+00 -1.815241924380e-03 -1.001000000000e-14 1.940000000000e+01 1.815660371769e-03 0.000000000000e+00 -1.815660371759e-03 -1.001000000000e-14 1.960000000000e+01 1.816069001468e-03 0.000000000000e+00 -1.816069001458e-03 -1.001000000000e-14 1.980000000000e+01 1.816468161193e-03 0.000000000000e+00 -1.816468161183e-03 -1.001000000000e-14 2.000000000000e+01 1.816858181950e-03 0.000000000000e+00 -1.816858181940e-03 -1.001000000000e-14 1.000000000000e+00 2.641968396659e-09 0.000000000000e+00 -2.641958386624e-09 -1.001000000000e-14 1.200000000000e+00 1.234744804613e-07 0.000000000000e+00 -1.234744704515e-07 -1.001000000000e-14 1.400000000000e+00 2.310455301202e-06 0.000000000000e+00 -2.310455291192e-06 -1.001000000000e-14 1.600000000000e+00 1.119533756455e-05 0.000000000000e+00 -1.119533755454e-05 -1.001000000000e-14 1.800000000000e+00 2.936993829133e-05 0.000000000000e+00 -2.936993828132e-05 -1.001000000000e-14 2.000000000000e+00 5.785993307616e-05 0.000000000000e+00 -5.785993306615e-05 -1.001000000000e-14 2.200000000000e+00 9.703260359045e-05 0.000000000000e+00 -9.703260358044e-05 -1.001000000000e-14 2.400000000000e+00 1.468376291994e-04 0.000000000000e+00 -1.468376291894e-04 -1.001000000000e-14 2.600000000000e+00 2.069124748565e-04 0.000000000000e+00 -2.069124748465e-04 -1.001000000000e-14 2.800000000000e+00 2.766575706920e-04 0.000000000000e+00 -2.766575706820e-04 -1.001000000000e-14 3.000000000000e+00 3.553014236427e-04 0.000000000000e+00 -3.553014236327e-04 -1.001000000000e-14 3.200000000000e+00 4.419580848520e-04 0.000000000000e+00 -4.419580848419e-04 -1.001000000000e-14 3.400000000000e+00 5.356750687040e-04 0.000000000000e+00 -5.356750686940e-04 -1.001000000000e-14 3.600000000000e+00 6.354689933393e-04 0.000000000000e+00 -6.354689933293e-04 -1.001000000000e-14 3.800000000000e+00 7.403461290386e-04 0.000000000000e+00 -7.403461290286e-04 -1.001000000000e-14 4.000000000000e+00 8.493044503010e-04 0.000000000000e+00 -8.493044502910e-04 -1.001000000000e-14 4.200000000000e+00 9.613118603849e-04 0.000000000000e+00 -9.613118603749e-04 -1.001000000000e-14 4.400000000000e+00 1.075251569230e-03 0.000000000000e+00 -1.075251569220e-03 -1.001000000000e-14 4.600000000000e+00 1.189820596064e-03 0.000000000000e+00 -1.189820596054e-03 -1.001000000000e-14 4.800000000000e+00 1.302440071771e-03 0.000000000000e+00 -1.302440071761e-03 -1.001000000000e-14 5.000000000000e+00 1.398247870724e-03 0.000000000000e+00 -1.398247870714e-03 -1.001000000000e-14 5.200000000000e+00 1.470001882703e-03 0.000000000000e+00 -1.470001882693e-03 -1.001000000000e-14 5.400000000000e+00 1.522502641359e-03 0.000000000000e+00 -1.522502641349e-03 -1.001000000000e-14 5.600000000000e+00 1.561502200646e-03 0.000000000000e+00 -1.561502200636e-03 -1.001000000000e-14 5.800000000000e+00 1.591271463158e-03 0.000000000000e+00 -1.591271463148e-03 -1.001000000000e-14 6.000000000000e+00 1.614638542763e-03 0.000000000000e+00 -1.614638542753e-03 -1.001000000000e-14 6.200000000000e+00 1.633445124314e-03 0.000000000000e+00 -1.633445124304e-03 -1.001000000000e-14 6.400000000000e+00 1.648910014150e-03 0.000000000000e+00 -1.648910014140e-03 -1.001000000000e-14 6.600000000000e+00 1.661861054017e-03 0.000000000000e+00 -1.661861054007e-03 -1.001000000000e-14 6.800000000000e+00 1.672876142116e-03 0.000000000000e+00 -1.672876142106e-03 -1.001000000000e-14 7.000000000000e+00 1.682369334747e-03 0.000000000000e+00 -1.682369334737e-03 -1.001000000000e-14 7.200000000000e+00 1.690644406666e-03 0.000000000000e+00 -1.690644406656e-03 -1.001000000000e-14 7.400000000000e+00 1.697929007015e-03 0.000000000000e+00 -1.697929007005e-03 -1.001000000000e-14 7.600000000000e+00 1.704396998844e-03 0.000000000000e+00 -1.704396998834e-03 -1.001000000000e-14 7.800000000000e+00 1.710183429266e-03 0.000000000000e+00 -1.710183429256e-03 -1.001000000000e-14 8.000000000000e+00 1.715394790853e-03 0.000000000000e+00 -1.715394790843e-03 -1.001000000000e-14 8.200000000000e+00 1.720116203293e-03 0.000000000000e+00 -1.720116203283e-03 -1.001000000000e-14 8.400000000000e+00 1.724416536209e-03 0.000000000000e+00 -1.724416536199e-03 -1.001000000000e-14 8.600000000000e+00 1.728352127410e-03 0.000000000000e+00 -1.728352127400e-03 -1.001000000000e-14 8.800000000000e+00 1.731969524828e-03 0.000000000000e+00 -1.731969524818e-03 -1.001000000000e-14 9.000000000000e+00 1.735307538044e-03 0.000000000000e+00 -1.735307538034e-03 -1.001000000000e-14 9.200000000000e+00 1.738398793779e-03 0.000000000000e+00 -1.738398793769e-03 -1.001000000000e-14 9.400000000000e+00 1.741270929767e-03 0.000000000000e+00 -1.741270929757e-03 -1.001000000000e-14 9.600000000000e+00 1.743947521433e-03 0.000000000000e+00 -1.743947521423e-03 -1.001000000000e-14 9.800000000000e+00 1.746448808669e-03 0.000000000000e+00 -1.746448808659e-03 -1.001000000000e-14 1.000000000000e+01 1.748792271328e-03 0.000000000000e+00 -1.748792271318e-03 -1.001000000000e-14 1.020000000000e+01 1.750993088988e-03 0.000000000000e+00 -1.750993088978e-03 -1.001000000000e-14 1.040000000000e+01 1.753064511323e-03 0.000000000000e+00 -1.753064511313e-03 -1.001000000000e-14 1.060000000000e+01 1.755018158752e-03 0.000000000000e+00 -1.755018158742e-03 -1.001000000000e-14 1.080000000000e+01 1.756864268266e-03 0.000000000000e+00 -1.756864268256e-03 -1.001000000000e-14 1.100000000000e+01 1.758611895775e-03 0.000000000000e+00 -1.758611895765e-03 -1.001000000000e-14 1.120000000000e+01 1.760269099031e-03 0.000000000000e+00 -1.760269099021e-03 -1.001000000000e-14 1.140000000000e+01 1.761843013508e-03 0.000000000000e+00 -1.761843013498e-03 -1.001000000000e-14 1.160000000000e+01 1.763340069434e-03 0.000000000000e+00 -1.763340069423e-03 -1.001000000000e-14 1.180000000000e+01 1.764766020433e-03 0.000000000000e+00 -1.764766020423e-03 -1.001000000000e-14 1.200000000000e+01 1.766126045391e-03 0.000000000000e+00 -1.766126045381e-03 -1.001000000000e-14 1.220000000000e+01 1.767424819448e-03 0.000000000000e+00 -1.767424819438e-03 -1.001000000000e-14 1.240000000000e+01 1.768666574619e-03 0.000000000000e+00 -1.768666574609e-03 -1.001000000000e-14 1.260000000000e+01 1.769855151795e-03 0.000000000000e+00 -1.769855151785e-03 -1.001000000000e-14 1.280000000000e+01 1.770994045536e-03 0.000000000000e+00 -1.770994045526e-03 -1.001000000000e-14 1.300000000000e+01 1.772086442788e-03 0.000000000000e+00 -1.772086442778e-03 -1.001000000000e-14 1.320000000000e+01 1.773135256485e-03 0.000000000000e+00 -1.773135256475e-03 -1.001000000000e-14 1.340000000000e+01 1.774143154799e-03 0.000000000000e+00 -1.774143154789e-03 -1.001000000000e-14 1.360000000000e+01 1.775112586686e-03 0.000000000000e+00 -1.775112586676e-03 -1.001000000000e-14 1.380000000000e+01 1.776045804276e-03 0.000000000000e+00 -1.776045804266e-03 -1.001000000000e-14 1.400000000000e+01 1.776944882548e-03 0.000000000000e+00 -1.776944882538e-03 -1.001000000000e-14 1.420000000000e+01 1.777811736668e-03 0.000000000000e+00 -1.777811736658e-03 -1.001000000000e-14 1.440000000000e+01 1.778648137311e-03 0.000000000000e+00 -1.778648137301e-03 -1.001000000000e-14 1.460000000000e+01 1.779455724243e-03 0.000000000000e+00 -1.779455724233e-03 -1.001000000000e-14 1.480000000000e+01 1.780236018376e-03 0.000000000000e+00 -1.780236018366e-03 -1.001000000000e-14 1.500000000000e+01 1.780990432512e-03 0.000000000000e+00 -1.780990432502e-03 -1.001000000000e-14 1.520000000000e+01 1.781720280927e-03 0.000000000000e+00 -1.781720280917e-03 -1.001000000000e-14 1.540000000000e+01 1.782426787940e-03 0.000000000000e+00 -1.782426787930e-03 -1.001000000000e-14 1.560000000000e+01 1.783111095601e-03 0.000000000000e+00 -1.783111095591e-03 -1.001000000000e-14 1.580000000000e+01 1.783774270593e-03 0.000000000000e+00 -1.783774270583e-03 -1.001000000000e-14 1.600000000000e+01 1.784417310445e-03 0.000000000000e+00 -1.784417310435e-03 -1.001000000000e-14 1.620000000000e+01 1.785041149132e-03 0.000000000000e+00 -1.785041149122e-03 -1.001000000000e-14 1.640000000000e+01 1.785646662139e-03 0.000000000000e+00 -1.785646662129e-03 -1.001000000000e-14 1.660000000000e+01 1.786234671036e-03 0.000000000000e+00 -1.786234671026e-03 -1.001000000000e-14 1.680000000000e+01 1.786805947636e-03 0.000000000000e+00 -1.786805947626e-03 -1.001000000000e-14 1.700000000000e+01 1.787361217761e-03 0.000000000000e+00 -1.787361217751e-03 -1.001000000000e-14 1.720000000000e+01 1.787901164673e-03 0.000000000000e+00 -1.787901164663e-03 -1.001000000000e-14 1.740000000000e+01 1.788426432199e-03 0.000000000000e+00 -1.788426432189e-03 -1.001000000000e-14 1.760000000000e+01 1.788937627578e-03 0.000000000000e+00 -1.788937627568e-03 -1.001000000000e-14 1.780000000000e+01 1.789435324066e-03 0.000000000000e+00 -1.789435324056e-03 -1.001000000000e-14 1.800000000000e+01 1.789920063323e-03 0.000000000000e+00 -1.789920063313e-03 -1.001000000000e-14 1.820000000000e+01 1.790392357586e-03 0.000000000000e+00 -1.790392357576e-03 -1.001000000000e-14 1.840000000000e+01 1.790852691681e-03 0.000000000000e+00 -1.790852691671e-03 -1.001000000000e-14 1.860000000000e+01 1.791301524858e-03 0.000000000000e+00 -1.791301524848e-03 -1.001000000000e-14 1.880000000000e+01 1.791739292480e-03 0.000000000000e+00 -1.791739292470e-03 -1.001000000000e-14 1.900000000000e+01 1.792166407588e-03 0.000000000000e+00 -1.792166407578e-03 -1.001000000000e-14 1.920000000000e+01 1.792583262330e-03 0.000000000000e+00 -1.792583262320e-03 -1.001000000000e-14 1.940000000000e+01 1.792990229292e-03 0.000000000000e+00 -1.792990229282e-03 -1.001000000000e-14 1.960000000000e+01 1.793387662719e-03 0.000000000000e+00 -1.793387662709e-03 -1.001000000000e-14 1.980000000000e+01 1.793775899650e-03 0.000000000000e+00 -1.793775899640e-03 -1.001000000000e-14 2.000000000000e+01 1.794155260968e-03 0.000000000000e+00 -1.794155260958e-03 -1.001000000000e-14 1.000000000000e+00 2.641968380179e-09 0.000000000000e+00 -2.641958370317e-09 -1.001000000000e-14 1.200000000000e+00 1.234744463553e-07 0.000000000000e+00 -1.234744363455e-07 -1.001000000000e-14 1.400000000000e+00 2.310448053804e-06 0.000000000000e+00 -2.310448043794e-06 -1.001000000000e-14 1.600000000000e+00 1.119523299786e-05 0.000000000000e+00 -1.119523298785e-05 -1.001000000000e-14 1.800000000000e+00 2.936941439621e-05 0.000000000000e+00 -2.936941438620e-05 -1.001000000000e-14 2.000000000000e+00 5.785830227995e-05 0.000000000000e+00 -5.785830226994e-05 -1.001000000000e-14 2.200000000000e+00 9.702870963984e-05 0.000000000000e+00 -9.702870962983e-05 -1.001000000000e-14 2.400000000000e+00 1.468297693943e-04 0.000000000000e+00 -1.468297693843e-04 -1.001000000000e-14 2.600000000000e+00 2.068983309315e-04 0.000000000000e+00 -2.068983309215e-04 -1.001000000000e-14 2.800000000000e+00 2.766341145636e-04 0.000000000000e+00 -2.766341145536e-04 -1.001000000000e-14 3.000000000000e+00 3.552647417214e-04 0.000000000000e+00 -3.552647417114e-04 -1.001000000000e-14 3.200000000000e+00 4.419030310301e-04 0.000000000000e+00 -4.419030310201e-04 -1.001000000000e-14 3.400000000000e+00 5.355945976441e-04 0.000000000000e+00 -5.355945976341e-04 -1.001000000000e-14 3.600000000000e+00 6.353529134009e-04 0.000000000000e+00 -6.353529133909e-04 -1.001000000000e-14 3.800000000000e+00 7.401787899805e-04 0.000000000000e+00 -7.401787899705e-04 -1.001000000000e-14 4.000000000000e+00 8.490604314703e-04 0.000000000000e+00 -8.490604314603e-04 -1.001000000000e-14 4.200000000000e+00 9.609478515247e-04 0.000000000000e+00 -9.609478515146e-04 -1.001000000000e-14 4.400000000000e+00 1.074691085021e-03 0.000000000000e+00 -1.074691085011e-03 -1.001000000000e-14 4.600000000000e+00 1.188925474033e-03 0.000000000000e+00 -1.188925474023e-03 -1.001000000000e-14 4.800000000000e+00 1.300206538974e-03 0.000000000000e+00 -1.300206538964e-03 -1.001000000000e-14 5.000000000000e+00 1.392059065603e-03 0.000000000000e+00 -1.392059065593e-03 -1.001000000000e-14 5.200000000000e+00 1.459727032076e-03 0.000000000000e+00 -1.459727032066e-03 -1.001000000000e-14 5.400000000000e+00 1.508904031896e-03 0.000000000000e+00 -1.508904031886e-03 -1.001000000000e-14 5.600000000000e+00 1.545387638792e-03 0.000000000000e+00 -1.545387638782e-03 -1.001000000000e-14 5.800000000000e+00 1.573268670674e-03 0.000000000000e+00 -1.573268670664e-03 -1.001000000000e-14 6.000000000000e+00 1.595198328720e-03 0.000000000000e+00 -1.595198328710e-03 -1.001000000000e-14 6.200000000000e+00 1.612887799856e-03 0.000000000000e+00 -1.612887799846e-03 -1.001000000000e-14 6.400000000000e+00 1.627465953259e-03 0.000000000000e+00 -1.627465953249e-03 -1.001000000000e-14 6.600000000000e+00 1.639699177030e-03 0.000000000000e+00 -1.639699177020e-03 -1.001000000000e-14 6.800000000000e+00 1.650122906391e-03 0.000000000000e+00 -1.650122906381e-03 -1.001000000000e-14 7.000000000000e+00 1.659121318746e-03 0.000000000000e+00 -1.659121318736e-03 -1.001000000000e-14 7.200000000000e+00 1.666976743335e-03 0.000000000000e+00 -1.666976743325e-03 -1.001000000000e-14 7.400000000000e+00 1.673901133142e-03 0.000000000000e+00 -1.673901133132e-03 -1.001000000000e-14 7.600000000000e+00 1.680056649464e-03 0.000000000000e+00 -1.680056649454e-03 -1.001000000000e-14 7.800000000000e+00 1.685569465668e-03 0.000000000000e+00 -1.685569465658e-03 -1.001000000000e-14 8.000000000000e+00 1.690539239247e-03 0.000000000000e+00 -1.690539239237e-03 -1.001000000000e-14 8.200000000000e+00 1.695045749520e-03 0.000000000000e+00 -1.695045749510e-03 -1.001000000000e-14 8.400000000000e+00 1.699153638959e-03 0.000000000000e+00 -1.699153638949e-03 -1.001000000000e-14 8.600000000000e+00 1.702915859422e-03 0.000000000000e+00 -1.702915859412e-03 -1.001000000000e-14 8.800000000000e+00 1.706376217078e-03 0.000000000000e+00 -1.706376217068e-03 -1.001000000000e-14 9.000000000000e+00 1.709571279183e-03 0.000000000000e+00 -1.709571279173e-03 -1.001000000000e-14 9.200000000000e+00 1.712531821759e-03 0.000000000000e+00 -1.712531821749e-03 -1.001000000000e-14 9.400000000000e+00 1.715283942173e-03 0.000000000000e+00 -1.715283942163e-03 -1.001000000000e-14 9.600000000000e+00 1.717849923787e-03 0.000000000000e+00 -1.717849923777e-03 -1.001000000000e-14 9.800000000000e+00 1.720248914901e-03 0.000000000000e+00 -1.720248914891e-03 -1.001000000000e-14 1.000000000000e+01 1.722497466986e-03 0.000000000000e+00 -1.722497466976e-03 -1.001000000000e-14 1.020000000000e+01 1.724609965152e-03 0.000000000000e+00 -1.724609965142e-03 -1.001000000000e-14 1.040000000000e+01 1.726598975272e-03 0.000000000000e+00 -1.726598975262e-03 -1.001000000000e-14 1.060000000000e+01 1.728475526049e-03 0.000000000000e+00 -1.728475526039e-03 -1.001000000000e-14 1.080000000000e+01 1.730249339862e-03 0.000000000000e+00 -1.730249339852e-03 -1.001000000000e-14 1.100000000000e+01 1.731929040008e-03 0.000000000000e+00 -1.731929039998e-03 -1.001000000000e-14 1.120000000000e+01 1.733522237257e-03 0.000000000000e+00 -1.733522237247e-03 -1.001000000000e-14 1.140000000000e+01 1.735035772967e-03 0.000000000000e+00 -1.735035772957e-03 -1.001000000000e-14 1.160000000000e+01 1.736475751202e-03 0.000000000000e+00 -1.736475751192e-03 -1.001000000000e-14 1.180000000000e+01 1.737847652293e-03 0.000000000000e+00 -1.737847652283e-03 -1.001000000000e-14 1.200000000000e+01 1.739156411620e-03 0.000000000000e+00 -1.739156411610e-03 -1.001000000000e-14 1.220000000000e+01 1.740406486607e-03 0.000000000000e+00 -1.740406486597e-03 -1.001000000000e-14 1.240000000000e+01 1.741601914009e-03 0.000000000000e+00 -1.741601913999e-03 -1.001000000000e-14 1.260000000000e+01 1.742746359081e-03 0.000000000000e+00 -1.742746359071e-03 -1.001000000000e-14 1.280000000000e+01 1.743843157950e-03 0.000000000000e+00 -1.743843157940e-03 -1.001000000000e-14 1.300000000000e+01 1.744895354270e-03 0.000000000000e+00 -1.744895354260e-03 -1.001000000000e-14 1.320000000000e+01 1.745905731046e-03 0.000000000000e+00 -1.745905731036e-03 -1.001000000000e-14 1.340000000000e+01 1.746876838347e-03 0.000000000000e+00 -1.746876838337e-03 -1.001000000000e-14 1.360000000000e+01 1.747811017540e-03 0.000000000000e+00 -1.747811017530e-03 -1.001000000000e-14 1.380000000000e+01 1.748710422515e-03 0.000000000000e+00 -1.748710422505e-03 -1.001000000000e-14 1.400000000000e+01 1.749577038366e-03 0.000000000000e+00 -1.749577038356e-03 -1.001000000000e-14 1.420000000000e+01 1.750412697850e-03 0.000000000000e+00 -1.750412697840e-03 -1.001000000000e-14 1.440000000000e+01 1.751219095945e-03 0.000000000000e+00 -1.751219095935e-03 -1.001000000000e-14 1.460000000000e+01 1.751997802750e-03 0.000000000000e+00 -1.751997802740e-03 -1.001000000000e-14 1.480000000000e+01 1.752750274954e-03 0.000000000000e+00 -1.752750274944e-03 -1.001000000000e-14 1.500000000000e+01 1.753477866048e-03 0.000000000000e+00 -1.753477866038e-03 -1.001000000000e-14 1.520000000000e+01 1.754181835445e-03 0.000000000000e+00 -1.754181835435e-03 -1.001000000000e-14 1.540000000000e+01 1.754863356637e-03 0.000000000000e+00 -1.754863356627e-03 -1.001000000000e-14 1.560000000000e+01 1.755523524515e-03 0.000000000000e+00 -1.755523524505e-03 -1.001000000000e-14 1.580000000000e+01 1.756163361944e-03 0.000000000000e+00 -1.756163361934e-03 -1.001000000000e-14 1.600000000000e+01 1.756783825677e-03 0.000000000000e+00 -1.756783825667e-03 -1.001000000000e-14 1.620000000000e+01 1.757385811699e-03 0.000000000000e+00 -1.757385811689e-03 -1.001000000000e-14 1.640000000000e+01 1.757970160048e-03 0.000000000000e+00 -1.757970160038e-03 -1.001000000000e-14 1.660000000000e+01 1.758537659187e-03 0.000000000000e+00 -1.758537659177e-03 -1.001000000000e-14 1.680000000000e+01 1.759089049960e-03 0.000000000000e+00 -1.759089049950e-03 -1.001000000000e-14 1.700000000000e+01 1.759625029195e-03 0.000000000000e+00 -1.759625029185e-03 -1.001000000000e-14 1.720000000000e+01 1.760146252973e-03 0.000000000000e+00 -1.760146252963e-03 -1.001000000000e-14 1.740000000000e+01 1.760653339611e-03 0.000000000000e+00 -1.760653339601e-03 -1.001000000000e-14 1.760000000000e+01 1.761146872385e-03 0.000000000000e+00 -1.761146872375e-03 -1.001000000000e-14 1.780000000000e+01 1.761627402017e-03 0.000000000000e+00 -1.761627402007e-03 -1.001000000000e-14 1.800000000000e+01 1.762095448952e-03 0.000000000000e+00 -1.762095448942e-03 -1.001000000000e-14 1.820000000000e+01 1.762551505440e-03 0.000000000000e+00 -1.762551505430e-03 -1.001000000000e-14 1.840000000000e+01 1.762996037455e-03 0.000000000000e+00 -1.762996037445e-03 -1.001000000000e-14 1.860000000000e+01 1.763429486451e-03 0.000000000000e+00 -1.763429486441e-03 -1.001000000000e-14 1.880000000000e+01 1.763852270980e-03 0.000000000000e+00 -1.763852270970e-03 -1.001000000000e-14 1.900000000000e+01 1.764264788182e-03 0.000000000000e+00 -1.764264788172e-03 -1.001000000000e-14 1.920000000000e+01 1.764667415161e-03 0.000000000000e+00 -1.764667415151e-03 -1.001000000000e-14 1.940000000000e+01 1.765060510250e-03 0.000000000000e+00 -1.765060510240e-03 -1.001000000000e-14 1.960000000000e+01 1.765444414187e-03 0.000000000000e+00 -1.765444414177e-03 -1.001000000000e-14 1.980000000000e+01 1.765819451195e-03 0.000000000000e+00 -1.765819451185e-03 -1.001000000000e-14 2.000000000000e+01 1.766185929992e-03 0.000000000000e+00 -1.766185929982e-03 -1.001000000000e-14 1.000000000000e+00 1.136862739365e-12 0.000000000000e+00 -1.126862587885e-12 -1.000000000075e-14 1.200000000000e+00 2.328145269886e-10 0.000000000000e+00 -2.328045267838e-10 -1.000000000075e-14 1.400000000000e+00 5.435745611330e-08 0.000000000000e+00 -5.435744611316e-08 -1.000000000075e-14 1.600000000000e+00 2.717537855153e-06 0.000000000000e+00 -2.717537845153e-06 -1.000000000075e-14 1.800000000000e+00 1.541908698391e-05 0.000000000000e+00 -1.541908697391e-05 -1.000000000075e-14 2.000000000000e+00 4.182087346232e-05 0.000000000000e+00 -4.182087345232e-05 -1.000000000075e-14 2.200000000000e+00 8.320206878859e-05 0.000000000000e+00 -8.320206877859e-05 -1.000000000075e-14 2.400000000000e+00 1.398100536443e-04 0.000000000000e+00 -1.398100536343e-04 -1.000000000075e-14 2.600000000000e+00 2.111349774536e-04 0.000000000000e+00 -2.111349774436e-04 -1.000000000075e-14 2.800000000000e+00 2.960796172815e-04 0.000000000000e+00 -2.960796172715e-04 -1.000000000075e-14 3.000000000000e+00 3.931312504665e-04 0.000000000000e+00 -3.931312504565e-04 -1.000000000075e-14 3.200000000000e+00 5.005319218004e-04 0.000000000000e+00 -5.005319217904e-04 -1.000000000075e-14 3.400000000000e+00 6.164258646982e-04 0.000000000000e+00 -6.164258646882e-04 -1.000000000075e-14 3.600000000000e+00 7.389649199386e-04 0.000000000000e+00 -7.389649199286e-04 -1.000000000075e-14 3.800000000000e+00 8.663588252862e-04 0.000000000000e+00 -8.663588252762e-04 -1.000000000075e-14 4.000000000000e+00 9.968594214047e-04 0.000000000000e+00 -9.968594213947e-04 -1.000000000075e-14 4.200000000000e+00 1.128661273549e-03 0.000000000000e+00 -1.128661273539e-03 -1.000000000075e-14 4.400000000000e+00 1.259684816494e-03 0.000000000000e+00 -1.259684816484e-03 -1.000000000075e-14 4.600000000000e+00 1.387021871626e-03 0.000000000000e+00 -1.387021871616e-03 -1.000000000075e-14 4.800000000000e+00 1.492082525168e-03 0.000000000000e+00 -1.492082525158e-03 -1.000000000075e-14 5.000000000000e+00 1.564323846519e-03 0.000000000000e+00 -1.564323846509e-03 -1.000000000075e-14 5.200000000000e+00 1.613929423703e-03 0.000000000000e+00 -1.613929423693e-03 -1.000000000075e-14 5.400000000000e+00 1.649160036986e-03 0.000000000000e+00 -1.649160036976e-03 -1.000000000075e-14 5.600000000000e+00 1.675193632461e-03 0.000000000000e+00 -1.675193632451e-03 -1.000000000075e-14 5.800000000000e+00 1.695135322595e-03 0.000000000000e+00 -1.695135322585e-03 -1.000000000075e-14 6.000000000000e+00 1.710880838133e-03 0.000000000000e+00 -1.710880838123e-03 -1.000000000075e-14 6.200000000000e+00 1.723629397273e-03 0.000000000000e+00 -1.723629397263e-03 -1.000000000075e-14 6.400000000000e+00 1.734168732806e-03 0.000000000000e+00 -1.734168732796e-03 -1.000000000075e-14 6.600000000000e+00 1.743034602302e-03 0.000000000000e+00 -1.743034602292e-03 -1.000000000075e-14 6.800000000000e+00 1.750602919736e-03 0.000000000000e+00 -1.750602919726e-03 -1.000000000075e-14 7.000000000000e+00 1.757144757929e-03 0.000000000000e+00 -1.757144757919e-03 -1.000000000075e-14 7.200000000000e+00 1.762860332210e-03 0.000000000000e+00 -1.762860332200e-03 -1.000000000075e-14 7.400000000000e+00 1.767900669224e-03 0.000000000000e+00 -1.767900669214e-03 -1.000000000075e-14 7.600000000000e+00 1.772381825532e-03 0.000000000000e+00 -1.772381825522e-03 -1.000000000075e-14 7.800000000000e+00 1.776394462365e-03 0.000000000000e+00 -1.776394462355e-03 -1.000000000075e-14 8.000000000000e+00 1.780010445451e-03 0.000000000000e+00 -1.780010445441e-03 -1.000000000075e-14 8.200000000000e+00 1.783287490918e-03 0.000000000000e+00 -1.783287490908e-03 -1.000000000075e-14 8.400000000000e+00 1.786272498439e-03 0.000000000000e+00 -1.786272498429e-03 -1.000000000075e-14 8.600000000000e+00 1.789003984023e-03 0.000000000000e+00 -1.789003984013e-03 -1.000000000075e-14 8.800000000000e+00 1.791513883614e-03 0.000000000000e+00 -1.791513883604e-03 -1.000000000075e-14 9.000000000000e+00 1.793828909364e-03 0.000000000000e+00 -1.793828909354e-03 -1.000000000075e-14 9.200000000000e+00 1.795971582888e-03 0.000000000000e+00 -1.795971582878e-03 -1.000000000075e-14 9.400000000000e+00 1.797961031859e-03 0.000000000000e+00 -1.797961031849e-03 -1.000000000075e-14 9.600000000000e+00 1.799813610926e-03 0.000000000000e+00 -1.799813610916e-03 -1.000000000075e-14 9.800000000000e+00 1.801543390602e-03 0.000000000000e+00 -1.801543390592e-03 -1.000000000075e-14 1.000000000000e+01 1.803162545819e-03 0.000000000000e+00 -1.803162545809e-03 -1.000000000075e-14 1.020000000000e+01 1.804681667419e-03 0.000000000000e+00 -1.804681667409e-03 -1.000000000075e-14 1.040000000000e+01 1.806110013894e-03 0.000000000000e+00 -1.806110013884e-03 -1.000000000075e-14 1.060000000000e+01 1.807455734409e-03 0.000000000000e+00 -1.807455734399e-03 -1.000000000075e-14 1.080000000000e+01 1.808725961374e-03 0.000000000000e+00 -1.808725961364e-03 -1.000000000075e-14 1.100000000000e+01 1.809927067960e-03 0.000000000000e+00 -1.809927067950e-03 -1.000000000075e-14 1.120000000000e+01 1.811064699830e-03 0.000000000000e+00 -1.811064699820e-03 -1.000000000075e-14 1.140000000000e+01 1.812143893436e-03 0.000000000000e+00 -1.812143893426e-03 -1.000000000075e-14 1.160000000000e+01 1.813169156844e-03 0.000000000000e+00 -1.813169156834e-03 -1.000000000075e-14 1.180000000000e+01 1.814144537915e-03 0.000000000000e+00 -1.814144537905e-03 -1.000000000075e-14 1.200000000000e+01 1.815073682129e-03 0.000000000000e+00 -1.815073682119e-03 -1.000000000075e-14 1.220000000000e+01 1.815959881856e-03 0.000000000000e+00 -1.815959881846e-03 -1.000000000075e-14 1.240000000000e+01 1.816806118518e-03 0.000000000000e+00 -1.816806118508e-03 -1.000000000075e-14 1.260000000000e+01 1.817615098811e-03 0.000000000000e+00 -1.817615098801e-03 -1.000000000075e-14 1.280000000000e+01 1.818389285947e-03 0.000000000000e+00 -1.818389285937e-03 -1.000000000075e-14 1.300000000000e+01 1.819130926704e-03 0.000000000000e+00 -1.819130926694e-03 -1.000000000075e-14 1.320000000000e+01 1.819842074924e-03 0.000000000000e+00 -1.819842074914e-03 -1.000000000075e-14 1.340000000000e+01 1.820524611997e-03 0.000000000000e+00 -1.820524611987e-03 -1.000000000075e-14 1.360000000000e+01 1.821180264767e-03 0.000000000000e+00 -1.821180264757e-03 -1.000000000075e-14 1.380000000000e+01 1.821810621246e-03 0.000000000000e+00 -1.821810621236e-03 -1.000000000075e-14 1.400000000000e+01 1.822417144430e-03 0.000000000000e+00 -1.822417144420e-03 -1.000000000075e-14 1.420000000000e+01 1.823001184495e-03 0.000000000000e+00 -1.823001184485e-03 -1.000000000075e-14 1.440000000000e+01 1.823563989572e-03 0.000000000000e+00 -1.823563989562e-03 -1.000000000075e-14 1.460000000000e+01 1.824106715311e-03 0.000000000000e+00 -1.824106715301e-03 -1.000000000075e-14 1.480000000000e+01 1.824630433378e-03 0.000000000000e+00 -1.824630433368e-03 -1.000000000075e-14 1.500000000000e+01 1.825136139031e-03 0.000000000000e+00 -1.825136139021e-03 -1.000000000075e-14 1.520000000000e+01 1.825624757877e-03 0.000000000000e+00 -1.825624757867e-03 -1.000000000075e-14 1.540000000000e+01 1.826097151925e-03 0.000000000000e+00 -1.826097151915e-03 -1.000000000075e-14 1.560000000000e+01 1.826554125017e-03 0.000000000000e+00 -1.826554125007e-03 -1.000000000075e-14 1.580000000000e+01 1.826996427699e-03 0.000000000000e+00 -1.826996427689e-03 -1.000000000075e-14 1.600000000000e+01 1.827424761619e-03 0.000000000000e+00 -1.827424761609e-03 -1.000000000075e-14 1.620000000000e+01 1.827839783481e-03 0.000000000000e+00 -1.827839783471e-03 -1.000000000075e-14 1.640000000000e+01 1.828242108632e-03 0.000000000000e+00 -1.828242108622e-03 -1.000000000075e-14 1.660000000000e+01 1.828632314297e-03 0.000000000000e+00 -1.828632314287e-03 -1.000000000075e-14 1.680000000000e+01 1.829010942522e-03 0.000000000000e+00 -1.829010942512e-03 -1.000000000075e-14 1.700000000000e+01 1.829378502839e-03 0.000000000000e+00 -1.829378502829e-03 -1.000000000075e-14 1.720000000000e+01 1.829735474698e-03 0.000000000000e+00 -1.829735474688e-03 -1.000000000075e-14 1.740000000000e+01 1.830082309676e-03 0.000000000000e+00 -1.830082309666e-03 -1.000000000075e-14 1.760000000000e+01 1.830419433497e-03 0.000000000000e+00 -1.830419433487e-03 -1.000000000075e-14 1.780000000000e+01 1.830747247878e-03 0.000000000000e+00 -1.830747247868e-03 -1.000000000075e-14 1.800000000000e+01 1.831066132213e-03 0.000000000000e+00 -1.831066132203e-03 -1.000000000075e-14 1.820000000000e+01 1.831376445122e-03 0.000000000000e+00 -1.831376445112e-03 -1.000000000075e-14 1.840000000000e+01 1.831678525870e-03 0.000000000000e+00 -1.831678525860e-03 -1.000000000075e-14 1.860000000000e+01 1.831972695667e-03 0.000000000000e+00 -1.831972695657e-03 -1.000000000075e-14 1.880000000000e+01 1.832259258870e-03 0.000000000000e+00 -1.832259258860e-03 -1.000000000075e-14 1.900000000000e+01 1.832538504085e-03 0.000000000000e+00 -1.832538504075e-03 -1.000000000075e-14 1.920000000000e+01 1.832810705186e-03 0.000000000000e+00 -1.832810705176e-03 -1.000000000075e-14 1.940000000000e+01 1.833076122250e-03 0.000000000000e+00 -1.833076122240e-03 -1.000000000075e-14 1.960000000000e+01 1.833335002430e-03 0.000000000000e+00 -1.833335002420e-03 -1.000000000075e-14 1.980000000000e+01 1.833587580754e-03 0.000000000000e+00 -1.833587580744e-03 -1.000000000075e-14 2.000000000000e+01 1.833834080868e-03 0.000000000000e+00 -1.833834080858e-03 -1.000000000075e-14 1.000000000000e+00 1.136862305684e-12 0.000000000000e+00 -1.126862587885e-12 -1.000000000075e-14 1.200000000000e+00 2.328145267717e-10 0.000000000000e+00 -2.328045266424e-10 -1.000000000075e-14 1.400000000000e+00 5.435744879646e-08 0.000000000000e+00 -5.435743879669e-08 -1.000000000075e-14 1.600000000000e+00 2.717528795953e-06 0.000000000000e+00 -2.717528785953e-06 -1.000000000075e-14 1.800000000000e+00 1.541892411229e-05 0.000000000000e+00 -1.541892410229e-05 -1.000000000075e-14 2.000000000000e+00 4.182002251871e-05 0.000000000000e+00 -4.182002250871e-05 -1.000000000075e-14 2.200000000000e+00 8.319939381260e-05 0.000000000000e+00 -8.319939380260e-05 -1.000000000075e-14 2.400000000000e+00 1.398036771196e-04 0.000000000000e+00 -1.398036771096e-04 -1.000000000075e-14 2.600000000000e+00 2.111222025235e-04 0.000000000000e+00 -2.111222025135e-04 -1.000000000075e-14 2.800000000000e+00 2.960568533169e-04 0.000000000000e+00 -2.960568533069e-04 -1.000000000075e-14 3.000000000000e+00 3.930938193725e-04 0.000000000000e+00 -3.930938193625e-04 -1.000000000075e-14 3.200000000000e+00 5.004735415301e-04 0.000000000000e+00 -5.004735415201e-04 -1.000000000075e-14 3.400000000000e+00 6.163374717596e-04 0.000000000000e+00 -6.163374717496e-04 -1.000000000075e-14 3.600000000000e+00 7.388322083617e-04 0.000000000000e+00 -7.388322083517e-04 -1.000000000075e-14 3.800000000000e+00 8.661572336671e-04 0.000000000000e+00 -8.661572336571e-04 -1.000000000075e-14 4.000000000000e+00 9.965438451218e-04 0.000000000000e+00 -9.965438451118e-04 -1.000000000075e-14 4.200000000000e+00 1.128144704923e-03 0.000000000000e+00 -1.128144704913e-03 -1.000000000075e-14 4.400000000000e+00 1.258794525995e-03 0.000000000000e+00 -1.258794525985e-03 -1.000000000075e-14 4.600000000000e+00 1.385111342143e-03 0.000000000000e+00 -1.385111342133e-03 -1.000000000075e-14 4.800000000000e+00 1.485841463809e-03 0.000000000000e+00 -1.485841463799e-03 -1.000000000075e-14 5.000000000000e+00 1.554142693753e-03 0.000000000000e+00 -1.554142693743e-03 -1.000000000075e-14 5.200000000000e+00 1.600861914956e-03 0.000000000000e+00 -1.600861914946e-03 -1.000000000075e-14 5.400000000000e+00 1.634062291956e-03 0.000000000000e+00 -1.634062291946e-03 -1.000000000075e-14 5.600000000000e+00 1.658650151147e-03 0.000000000000e+00 -1.658650151137e-03 -1.000000000075e-14 5.800000000000e+00 1.677533314630e-03 0.000000000000e+00 -1.677533314620e-03 -1.000000000075e-14 6.000000000000e+00 1.692480518287e-03 0.000000000000e+00 -1.692480518277e-03 -1.000000000075e-14 6.200000000000e+00 1.704610366985e-03 0.000000000000e+00 -1.704610366975e-03 -1.000000000075e-14 6.400000000000e+00 1.714658535468e-03 0.000000000000e+00 -1.714658535458e-03 -1.000000000075e-14 6.600000000000e+00 1.723126296018e-03 0.000000000000e+00 -1.723126296008e-03 -1.000000000075e-14 6.800000000000e+00 1.730366085174e-03 0.000000000000e+00 -1.730366085164e-03 -1.000000000075e-14 7.000000000000e+00 1.736632570598e-03 0.000000000000e+00 -1.736632570588e-03 -1.000000000075e-14 7.200000000000e+00 1.742114225459e-03 0.000000000000e+00 -1.742114225449e-03 -1.000000000075e-14 7.400000000000e+00 1.746953486404e-03 0.000000000000e+00 -1.746953486394e-03 -1.000000000075e-14 7.600000000000e+00 1.751260001006e-03 0.000000000000e+00 -1.751260000996e-03 -1.000000000075e-14 7.800000000000e+00 1.755119563201e-03 0.000000000000e+00 -1.755119563191e-03 -1.000000000075e-14 8.000000000000e+00 1.758600282705e-03 0.000000000000e+00 -1.758600282695e-03 -1.000000000075e-14 8.200000000000e+00 1.761756935049e-03 0.000000000000e+00 -1.761756935039e-03 -1.000000000075e-14 8.400000000000e+00 1.764634087418e-03 0.000000000000e+00 -1.764634087408e-03 -1.000000000075e-14 8.600000000000e+00 1.767268383609e-03 0.000000000000e+00 -1.767268383599e-03 -1.000000000075e-14 8.800000000000e+00 1.769690240469e-03 0.000000000000e+00 -1.769690240459e-03 -1.000000000075e-14 9.000000000000e+00 1.771925125344e-03 0.000000000000e+00 -1.771925125334e-03 -1.000000000075e-14 9.200000000000e+00 1.773994530537e-03 0.000000000000e+00 -1.773994530527e-03 -1.000000000075e-14 9.400000000000e+00 1.775916725496e-03 0.000000000000e+00 -1.775916725486e-03 -1.000000000075e-14 9.600000000000e+00 1.777707343793e-03 0.000000000000e+00 -1.777707343783e-03 -1.000000000075e-14 9.800000000000e+00 1.779379845792e-03 0.000000000000e+00 -1.779379845782e-03 -1.000000000075e-14 1.000000000000e+01 1.780945886748e-03 0.000000000000e+00 -1.780945886738e-03 -1.000000000075e-14 1.020000000000e+01 1.782415612177e-03 0.000000000000e+00 -1.782415612167e-03 -1.000000000075e-14 1.040000000000e+01 1.783797896794e-03 0.000000000000e+00 -1.783797896784e-03 -1.000000000075e-14 1.060000000000e+01 1.785100556100e-03 0.000000000000e+00 -1.785100556090e-03 -1.000000000075e-14 1.080000000000e+01 1.786330435605e-03 0.000000000000e+00 -1.786330435595e-03 -1.000000000075e-14 1.100000000000e+01 1.787493653839e-03 0.000000000000e+00 -1.787493653829e-03 -1.000000000075e-14 1.120000000000e+01 1.788595634045e-03 0.000000000000e+00 -1.788595634035e-03 -1.000000000075e-14 1.140000000000e+01 1.789641216487e-03 0.000000000000e+00 -1.789641216477e-03 -1.000000000075e-14 1.160000000000e+01 1.790634735516e-03 0.000000000000e+00 -1.790634735506e-03 -1.000000000075e-14 1.180000000000e+01 1.791580084618e-03 0.000000000000e+00 -1.791580084608e-03 -1.000000000075e-14 1.200000000000e+01 1.792480771614e-03 0.000000000000e+00 -1.792480771604e-03 -1.000000000075e-14 1.220000000000e+01 1.793339965727e-03 0.000000000000e+00 -1.793339965717e-03 -1.000000000075e-14 1.240000000000e+01 1.794160537874e-03 0.000000000000e+00 -1.794160537864e-03 -1.000000000075e-14 1.260000000000e+01 1.794945095303e-03 0.000000000000e+00 -1.794945095293e-03 -1.000000000075e-14 1.280000000000e+01 1.795696011484e-03 0.000000000000e+00 -1.795696011474e-03 -1.000000000075e-14 1.300000000000e+01 1.796415451995e-03 0.000000000000e+00 -1.796415451985e-03 -1.000000000075e-14 1.320000000000e+01 1.797105397026e-03 0.000000000000e+00 -1.797105397016e-03 -1.000000000075e-14 1.340000000000e+01 1.797767661001e-03 0.000000000000e+00 -1.797767660991e-03 -1.000000000075e-14 1.360000000000e+01 1.798403909743e-03 0.000000000000e+00 -1.798403909733e-03 -1.000000000075e-14 1.380000000000e+01 1.799015675535e-03 0.000000000000e+00 -1.799015675525e-03 -1.000000000075e-14 1.400000000000e+01 1.799604370374e-03 0.000000000000e+00 -1.799604370364e-03 -1.000000000075e-14 1.420000000000e+01 1.800171297673e-03 0.000000000000e+00 -1.800171297663e-03 -1.000000000075e-14 1.440000000000e+01 1.800717662601e-03 0.000000000000e+00 -1.800717662591e-03 -1.000000000075e-14 1.460000000000e+01 1.801244581270e-03 0.000000000000e+00 -1.801244581260e-03 -1.000000000075e-14 1.480000000000e+01 1.801753088894e-03 0.000000000000e+00 -1.801753088884e-03 -1.000000000075e-14 1.500000000000e+01 1.802244147065e-03 0.000000000000e+00 -1.802244147055e-03 -1.000000000075e-14 1.520000000000e+01 1.802718650250e-03 0.000000000000e+00 -1.802718650240e-03 -1.000000000075e-14 1.540000000000e+01 1.803177431614e-03 0.000000000000e+00 -1.803177431604e-03 -1.000000000075e-14 1.560000000000e+01 1.803621268230e-03 0.000000000000e+00 -1.803621268220e-03 -1.000000000075e-14 1.580000000000e+01 1.804050885780e-03 0.000000000000e+00 -1.804050885770e-03 -1.000000000075e-14 1.600000000000e+01 1.804466962772e-03 0.000000000000e+00 -1.804466962762e-03 -1.000000000075e-14 1.620000000000e+01 1.804870134358e-03 0.000000000000e+00 -1.804870134348e-03 -1.000000000075e-14 1.640000000000e+01 1.805260995777e-03 0.000000000000e+00 -1.805260995767e-03 -1.000000000075e-14 1.660000000000e+01 1.805640105474e-03 0.000000000000e+00 -1.805640105464e-03 -1.000000000075e-14 1.680000000000e+01 1.806007987934e-03 0.000000000000e+00 -1.806007987924e-03 -1.000000000075e-14 1.700000000000e+01 1.806365136248e-03 0.000000000000e+00 -1.806365136238e-03 -1.000000000075e-14 1.720000000000e+01 1.806712014459e-03 0.000000000000e+00 -1.806712014449e-03 -1.000000000075e-14 1.740000000000e+01 1.807049059686e-03 0.000000000000e+00 -1.807049059676e-03 -1.000000000075e-14 1.760000000000e+01 1.807376684077e-03 0.000000000000e+00 -1.807376684067e-03 -1.000000000075e-14 1.780000000000e+01 1.807695276581e-03 0.000000000000e+00 -1.807695276571e-03 -1.000000000075e-14 1.800000000000e+01 1.808005204579e-03 0.000000000000e+00 -1.808005204569e-03 -1.000000000075e-14 1.820000000000e+01 1.808306815374e-03 0.000000000000e+00 -1.808306815364e-03 -1.000000000075e-14 1.840000000000e+01 1.808600437561e-03 0.000000000000e+00 -1.808600437551e-03 -1.000000000075e-14 1.860000000000e+01 1.808886382280e-03 0.000000000000e+00 -1.808886382270e-03 -1.000000000075e-14 1.880000000000e+01 1.809164944378e-03 0.000000000000e+00 -1.809164944368e-03 -1.000000000075e-14 1.900000000000e+01 1.809436403469e-03 0.000000000000e+00 -1.809436403459e-03 -1.000000000075e-14 1.920000000000e+01 1.809701024921e-03 0.000000000000e+00 -1.809701024911e-03 -1.000000000075e-14 1.940000000000e+01 1.809959060758e-03 0.000000000000e+00 -1.809959060748e-03 -1.000000000075e-14 1.960000000000e+01 1.810210750500e-03 0.000000000000e+00 -1.810210750490e-03 -1.000000000075e-14 1.980000000000e+01 1.810456321937e-03 0.000000000000e+00 -1.810456321927e-03 -1.000000000075e-14 2.000000000000e+01 1.810695991848e-03 0.000000000000e+00 -1.810695991838e-03 -1.000000000075e-14 1.000000000000e+00 1.136862305684e-12 0.000000000000e+00 -1.126862585161e-12 -1.000000000075e-14 1.200000000000e+00 2.328145261212e-10 0.000000000000e+00 -2.328045264706e-10 -1.000000000075e-14 1.400000000000e+00 5.435743952523e-08 0.000000000000e+00 -5.435742952501e-08 -1.000000000075e-14 1.600000000000e+00 2.717517315916e-06 0.000000000000e+00 -2.717517305916e-06 -1.000000000075e-14 1.800000000000e+00 1.541871771998e-05 0.000000000000e+00 -1.541871770998e-05 -1.000000000075e-14 2.000000000000e+00 4.181894419041e-05 0.000000000000e+00 -4.181894418041e-05 -1.000000000075e-14 2.200000000000e+00 8.319600390831e-05 0.000000000000e+00 -8.319600389831e-05 -1.000000000075e-14 2.400000000000e+00 1.397955955544e-04 0.000000000000e+00 -1.397955955444e-04 -1.000000000075e-14 2.600000000000e+00 2.111060083740e-04 0.000000000000e+00 -2.111060083640e-04 -1.000000000075e-14 2.800000000000e+00 2.960279858114e-04 0.000000000000e+00 -2.960279858014e-04 -1.000000000075e-14 3.000000000000e+00 3.930463210876e-04 0.000000000000e+00 -3.930463210776e-04 -1.000000000075e-14 3.200000000000e+00 5.003993767561e-04 0.000000000000e+00 -5.003993767461e-04 -1.000000000075e-14 3.400000000000e+00 6.162249690681e-04 0.000000000000e+00 -6.162249690581e-04 -1.000000000075e-14 3.600000000000e+00 7.386627824083e-04 0.000000000000e+00 -7.386627823983e-04 -1.000000000075e-14 3.800000000000e+00 8.658986357185e-04 0.000000000000e+00 -8.658986357085e-04 -1.000000000075e-14 4.000000000000e+00 9.961361269339e-04 0.000000000000e+00 -9.961361269239e-04 -1.000000000075e-14 4.200000000000e+00 1.127470673236e-03 0.000000000000e+00 -1.127470673226e-03 -1.000000000075e-14 4.400000000000e+00 1.257618423232e-03 0.000000000000e+00 -1.257618423222e-03 -1.000000000075e-14 4.600000000000e+00 1.382211613309e-03 0.000000000000e+00 -1.382211613299e-03 -1.000000000075e-14 4.800000000000e+00 1.477323698211e-03 0.000000000000e+00 -1.477323698201e-03 -1.000000000075e-14 5.000000000000e+00 1.540866395225e-03 0.000000000000e+00 -1.540866395215e-03 -1.000000000075e-14 5.200000000000e+00 1.584186303618e-03 0.000000000000e+00 -1.584186303608e-03 -1.000000000075e-14 5.400000000000e+00 1.615018821968e-03 0.000000000000e+00 -1.615018821958e-03 -1.000000000075e-14 5.600000000000e+00 1.637924699563e-03 0.000000000000e+00 -1.637924699553e-03 -1.000000000075e-14 5.800000000000e+00 1.655575673500e-03 0.000000000000e+00 -1.655575673490e-03 -1.000000000075e-14 6.000000000000e+00 1.669591945445e-03 0.000000000000e+00 -1.669591945435e-03 -1.000000000075e-14 6.200000000000e+00 1.680998715727e-03 0.000000000000e+00 -1.680998715717e-03 -1.000000000075e-14 6.400000000000e+00 1.690471562237e-03 0.000000000000e+00 -1.690471562227e-03 -1.000000000075e-14 6.600000000000e+00 1.698471983070e-03 0.000000000000e+00 -1.698471983060e-03 -1.000000000075e-14 6.800000000000e+00 1.705325324474e-03 0.000000000000e+00 -1.705325324464e-03 -1.000000000075e-14 7.000000000000e+00 1.711267302573e-03 0.000000000000e+00 -1.711267302563e-03 -1.000000000075e-14 7.200000000000e+00 1.716472805406e-03 0.000000000000e+00 -1.716472805396e-03 -1.000000000075e-14 7.400000000000e+00 1.721074314940e-03 0.000000000000e+00 -1.721074314930e-03 -1.000000000075e-14 7.600000000000e+00 1.725174038954e-03 0.000000000000e+00 -1.725174038944e-03 -1.000000000075e-14 7.800000000000e+00 1.728852111736e-03 0.000000000000e+00 -1.728852111726e-03 -1.000000000075e-14 8.000000000000e+00 1.732172268404e-03 0.000000000000e+00 -1.732172268394e-03 -1.000000000075e-14 8.200000000000e+00 1.735185854242e-03 0.000000000000e+00 -1.735185854232e-03 -1.000000000075e-14 8.400000000000e+00 1.737934711505e-03 0.000000000000e+00 -1.737934711495e-03 -1.000000000075e-14 8.600000000000e+00 1.740453293688e-03 0.000000000000e+00 -1.740453293678e-03 -1.000000000075e-14 8.800000000000e+00 1.742770238076e-03 0.000000000000e+00 -1.742770238066e-03 -1.000000000075e-14 9.000000000000e+00 1.744909551940e-03 0.000000000000e+00 -1.744909551930e-03 -1.000000000075e-14 9.200000000000e+00 1.746891518835e-03 0.000000000000e+00 -1.746891518825e-03 -1.000000000075e-14 9.400000000000e+00 1.748733399246e-03 0.000000000000e+00 -1.748733399236e-03 -1.000000000075e-14 9.600000000000e+00 1.750449978122e-03 0.000000000000e+00 -1.750449978112e-03 -1.000000000075e-14 9.800000000000e+00 1.752053997042e-03 0.000000000000e+00 -1.752053997032e-03 -1.000000000075e-14 1.000000000000e+01 1.753556498472e-03 0.000000000000e+00 -1.753556498462e-03 -1.000000000075e-14 1.020000000000e+01 1.754967102352e-03 0.000000000000e+00 -1.754967102342e-03 -1.000000000075e-14 1.040000000000e+01 1.756294230078e-03 0.000000000000e+00 -1.756294230068e-03 -1.000000000075e-14 1.060000000000e+01 1.757545302743e-03 0.000000000000e+00 -1.757545302733e-03 -1.000000000075e-14 1.080000000000e+01 1.758726826363e-03 0.000000000000e+00 -1.758726826353e-03 -1.000000000075e-14 1.100000000000e+01 1.759844618045e-03 0.000000000000e+00 -1.759844618035e-03 -1.000000000075e-14 1.120000000000e+01 1.760903837530e-03 0.000000000000e+00 -1.760903837520e-03 -1.000000000075e-14 1.140000000000e+01 1.761909092508e-03 0.000000000000e+00 -1.761909092498e-03 -1.000000000075e-14 1.160000000000e+01 1.762864511268e-03 0.000000000000e+00 -1.762864511258e-03 -1.000000000075e-14 1.180000000000e+01 1.763773804065e-03 0.000000000000e+00 -1.763773804055e-03 -1.000000000075e-14 1.200000000000e+01 1.764640315243e-03 0.000000000000e+00 -1.764640315233e-03 -1.000000000075e-14 1.220000000000e+01 1.765467067699e-03 0.000000000000e+00 -1.765467067689e-03 -1.000000000075e-14 1.240000000000e+01 1.766256800981e-03 0.000000000000e+00 -1.766256800971e-03 -1.000000000075e-14 1.260000000000e+01 1.767012004053e-03 0.000000000000e+00 -1.767012004043e-03 -1.000000000075e-14 1.280000000000e+01 1.767734943592e-03 0.000000000000e+00 -1.767734943582e-03 -1.000000000075e-14 1.300000000000e+01 1.768427688510e-03 0.000000000000e+00 -1.768427688500e-03 -1.000000000075e-14 1.320000000000e+01 1.769092131277e-03 0.000000000000e+00 -1.769092131267e-03 -1.000000000075e-14 1.340000000000e+01 1.769730006527e-03 0.000000000000e+00 -1.769730006517e-03 -1.000000000075e-14 1.360000000000e+01 1.770342907345e-03 0.000000000000e+00 -1.770342907335e-03 -1.000000000075e-14 1.380000000000e+01 1.770932299562e-03 0.000000000000e+00 -1.770932299552e-03 -1.000000000075e-14 1.400000000000e+01 1.771499534341e-03 0.000000000000e+00 -1.771499534331e-03 -1.000000000075e-14 1.420000000000e+01 1.772045859289e-03 0.000000000000e+00 -1.772045859279e-03 -1.000000000075e-14 1.440000000000e+01 1.772572428296e-03 0.000000000000e+00 -1.772572428286e-03 -1.000000000075e-14 1.460000000000e+01 1.773080310259e-03 0.000000000000e+00 -1.773080310249e-03 -1.000000000075e-14 1.480000000000e+01 1.773570496849e-03 0.000000000000e+00 -1.773570496839e-03 -1.000000000075e-14 1.500000000000e+01 1.774043909436e-03 0.000000000000e+00 -1.774043909426e-03 -1.000000000075e-14 1.520000000000e+01 1.774501405271e-03 0.000000000000e+00 -1.774501405261e-03 -1.000000000075e-14 1.540000000000e+01 1.774943783026e-03 0.000000000000e+00 -1.774943783016e-03 -1.000000000075e-14 1.560000000000e+01 1.775371787772e-03 0.000000000000e+00 -1.775371787762e-03 -1.000000000075e-14 1.580000000000e+01 1.775786115442e-03 0.000000000000e+00 -1.775786115432e-03 -1.000000000075e-14 1.600000000000e+01 1.776187416863e-03 0.000000000000e+00 -1.776187416853e-03 -1.000000000075e-14 1.620000000000e+01 1.776576301390e-03 0.000000000000e+00 -1.776576301380e-03 -1.000000000075e-14 1.640000000000e+01 1.776953340191e-03 0.000000000000e+00 -1.776953340181e-03 -1.000000000075e-14 1.660000000000e+01 1.777319069226e-03 0.000000000000e+00 -1.777319069216e-03 -1.000000000075e-14 1.680000000000e+01 1.777673991949e-03 0.000000000000e+00 -1.777673991939e-03 -1.000000000075e-14 1.700000000000e+01 1.778018581756e-03 0.000000000000e+00 -1.778018581746e-03 -1.000000000075e-14 1.720000000000e+01 1.778353284230e-03 0.000000000000e+00 -1.778353284220e-03 -1.000000000075e-14 1.740000000000e+01 1.778678519164e-03 0.000000000000e+00 -1.778678519154e-03 -1.000000000075e-14 1.760000000000e+01 1.778994682431e-03 0.000000000000e+00 -1.778994682421e-03 -1.000000000075e-14 1.780000000000e+01 1.779302147675e-03 0.000000000000e+00 -1.779302147665e-03 -1.000000000075e-14 1.800000000000e+01 1.779601267873e-03 0.000000000000e+00 -1.779601267863e-03 -1.000000000075e-14 1.820000000000e+01 1.779892376756e-03 0.000000000000e+00 -1.779892376746e-03 -1.000000000075e-14 1.840000000000e+01 1.780175790116e-03 0.000000000000e+00 -1.780175790106e-03 -1.000000000075e-14 1.860000000000e+01 1.780451807016e-03 0.000000000000e+00 -1.780451807006e-03 -1.000000000075e-14 1.880000000000e+01 1.780720710888e-03 0.000000000000e+00 -1.780720710878e-03 -1.000000000075e-14 1.900000000000e+01 1.780982770557e-03 0.000000000000e+00 -1.780982770547e-03 -1.000000000075e-14 1.920000000000e+01 1.781238241180e-03 0.000000000000e+00 -1.781238241170e-03 -1.000000000075e-14 1.940000000000e+01 1.781487365111e-03 0.000000000000e+00 -1.781487365101e-03 -1.000000000075e-14 1.960000000000e+01 1.781730372707e-03 0.000000000000e+00 -1.781730372697e-03 -1.000000000075e-14 1.980000000000e+01 1.781967483068e-03 0.000000000000e+00 -1.781967483058e-03 -1.000000000075e-14 2.000000000000e+01 1.782198904723e-03 0.000000000000e+00 -1.782198904713e-03 -1.000000000075e-14 1.000000000000e+00 1.441679111416e-06 0.000000000000e+00 -1.441666147673e-06 -1.296374362086e-11 1.200000000000e+00 6.039411733021e-06 0.000000000000e+00 -6.039398769277e-06 -1.296374362086e-11 1.400000000000e+00 1.569132753798e-05 0.000000000000e+00 -1.569131457424e-05 -1.296374362086e-11 1.600000000000e+00 3.124492592595e-05 0.000000000000e+00 -3.124491296221e-05 -1.296374362086e-11 1.800000000000e+00 5.310718967562e-05 0.000000000000e+00 -5.310717671188e-05 -1.296374362086e-11 2.000000000000e+00 8.144530498758e-05 0.000000000000e+00 -8.144529202383e-05 -1.296374362086e-11 2.200000000000e+00 1.162690522544e-04 0.000000000000e+00 -1.162690392907e-04 -1.296374362086e-11 2.400000000000e+00 1.574737883887e-04 0.000000000000e+00 -1.574737754250e-04 -1.296374362086e-11 2.600000000000e+00 2.048681237933e-04 0.000000000000e+00 -2.048681108296e-04 -1.296374362086e-11 2.800000000000e+00 2.581943200490e-04 0.000000000000e+00 -2.581943070852e-04 -1.296374362086e-11 3.000000000000e+00 3.171444069187e-04 0.000000000000e+00 -3.171443939549e-04 -1.296374362086e-11 3.200000000000e+00 3.813732042947e-04 0.000000000000e+00 -3.813731913310e-04 -1.296374362086e-11 3.400000000000e+00 4.505086910446e-04 0.000000000000e+00 -4.505086780809e-04 -1.296374362086e-11 3.600000000000e+00 5.241598095449e-04 0.000000000000e+00 -5.241597965811e-04 -1.296374362086e-11 3.800000000000e+00 6.019215764391e-04 0.000000000000e+00 -6.019215634753e-04 -1.296374362086e-11 4.000000000000e+00 6.833771686603e-04 0.000000000000e+00 -6.833771556966e-04 -1.296374362086e-11 4.200000000000e+00 7.680964028084e-04 0.000000000000e+00 -7.680963898447e-04 -1.296374362086e-11 4.400000000000e+00 8.556296889172e-04 0.000000000000e+00 -8.556296759534e-04 -1.296374362086e-11 4.600000000000e+00 9.454959680455e-04 0.000000000000e+00 -9.454959550818e-04 -1.296374362086e-11 4.800000000000e+00 1.037154307387e-03 0.000000000000e+00 -1.037154294423e-03 -1.296374362086e-11 5.000000000000e+00 1.129496711747e-03 0.000000000000e+00 -1.129496698784e-03 -1.296374362086e-11 5.200000000000e+00 1.217801121746e-03 0.000000000000e+00 -1.217801108782e-03 -1.296374362086e-11 5.400000000000e+00 1.296343973437e-03 0.000000000000e+00 -1.296343960473e-03 -1.296374362086e-11 5.600000000000e+00 1.362564139666e-03 0.000000000000e+00 -1.362564126703e-03 -1.296374362086e-11 5.800000000000e+00 1.416681675223e-03 0.000000000000e+00 -1.416681662259e-03 -1.296374362086e-11 6.000000000000e+00 1.460461492039e-03 0.000000000000e+00 -1.460461479075e-03 -1.296374362086e-11 6.200000000000e+00 1.496016388596e-03 0.000000000000e+00 -1.496016375632e-03 -1.296374362086e-11 6.400000000000e+00 1.525207202654e-03 0.000000000000e+00 -1.525207189690e-03 -1.296374362086e-11 6.600000000000e+00 1.549495573060e-03 0.000000000000e+00 -1.549495560096e-03 -1.296374362086e-11 6.800000000000e+00 1.569981174059e-03 0.000000000000e+00 -1.569981161096e-03 -1.296374362086e-11 7.000000000000e+00 1.587481919367e-03 0.000000000000e+00 -1.587481906403e-03 -1.296374362086e-11 7.200000000000e+00 1.602607987220e-03 0.000000000000e+00 -1.602607974256e-03 -1.296374362086e-11 7.400000000000e+00 1.615818967560e-03 0.000000000000e+00 -1.615818954597e-03 -1.296374362086e-11 7.600000000000e+00 1.627465322304e-03 0.000000000000e+00 -1.627465309340e-03 -1.296374362086e-11 7.800000000000e+00 1.637817841775e-03 0.000000000000e+00 -1.637817828811e-03 -1.296374362086e-11 8.000000000000e+00 1.647088510160e-03 0.000000000000e+00 -1.647088497196e-03 -1.296374362086e-11 8.200000000000e+00 1.655445366977e-03 0.000000000000e+00 -1.655445354013e-03 -1.296374362086e-11 8.400000000000e+00 1.663023193937e-03 0.000000000000e+00 -1.663023180974e-03 -1.296374362086e-11 8.600000000000e+00 1.669931288025e-03 0.000000000000e+00 -1.669931275061e-03 -1.296374362086e-11 8.800000000000e+00 1.676259183855e-03 0.000000000000e+00 -1.676259170891e-03 -1.296374362086e-11 9.000000000000e+00 1.682080917584e-03 0.000000000000e+00 -1.682080904620e-03 -1.296374362086e-11 9.200000000000e+00 1.687458241703e-03 0.000000000000e+00 -1.687458228739e-03 -1.296374362086e-11 9.400000000000e+00 1.692443076353e-03 0.000000000000e+00 -1.692443063389e-03 -1.296374362086e-11 9.600000000000e+00 1.697079398589e-03 0.000000000000e+00 -1.697079385625e-03 -1.296374362086e-11 9.800000000000e+00 1.701404713277e-03 0.000000000000e+00 -1.701404700313e-03 -1.296374362086e-11 1.000000000000e+01 1.705451209197e-03 0.000000000000e+00 -1.705451196233e-03 -1.296374362086e-11 1.020000000000e+01 1.709246675895e-03 0.000000000000e+00 -1.709246662931e-03 -1.296374362086e-11 1.040000000000e+01 1.712815236917e-03 0.000000000000e+00 -1.712815223953e-03 -1.296374362086e-11 1.060000000000e+01 1.716177940840e-03 0.000000000000e+00 -1.716177927876e-03 -1.296374362086e-11 1.080000000000e+01 1.719353241215e-03 0.000000000000e+00 -1.719353228251e-03 -1.296374362086e-11 1.100000000000e+01 1.722357389023e-03 0.000000000000e+00 -1.722357376060e-03 -1.296374362086e-11 1.120000000000e+01 1.725204755709e-03 0.000000000000e+00 -1.725204742745e-03 -1.296374362086e-11 1.140000000000e+01 1.727908100698e-03 0.000000000000e+00 -1.727908087734e-03 -1.296374362086e-11 1.160000000000e+01 1.730478794251e-03 0.000000000000e+00 -1.730478781287e-03 -1.296374362086e-11 1.180000000000e+01 1.732927004119e-03 0.000000000000e+00 -1.732926991155e-03 -1.296374362086e-11 1.200000000000e+01 1.735261868942e-03 0.000000000000e+00 -1.735261855978e-03 -1.296374362086e-11 1.220000000000e+01 1.737491563761e-03 0.000000000000e+00 -1.737491550797e-03 -1.296374362086e-11 1.240000000000e+01 1.739623518388e-03 0.000000000000e+00 -1.739623505424e-03 -1.296374362086e-11 1.260000000000e+01 1.741664440564e-03 0.000000000000e+00 -1.741664427600e-03 -1.296374362086e-11 1.280000000000e+01 1.743620417911e-03 0.000000000000e+00 -1.743620404947e-03 -1.296374362086e-11 1.300000000000e+01 1.745496989179e-03 0.000000000000e+00 -1.745496976215e-03 -1.296374362086e-11 1.320000000000e+01 1.747299205777e-03 0.000000000000e+00 -1.747299192814e-03 -1.296374362086e-11 1.340000000000e+01 1.749031685145e-03 0.000000000000e+00 -1.749031672181e-03 -1.296374362086e-11 1.360000000000e+01 1.750698657182e-03 0.000000000000e+00 -1.750698644219e-03 -1.296374362086e-11 1.380000000000e+01 1.752304004801e-03 0.000000000000e+00 -1.752303991837e-03 -1.296374362086e-11 1.400000000000e+01 1.753851299425e-03 0.000000000000e+00 -1.753851286462e-03 -1.296374362086e-11 1.420000000000e+01 1.755343832187e-03 0.000000000000e+00 -1.755343819223e-03 -1.296374362086e-11 1.440000000000e+01 1.756784641400e-03 0.000000000000e+00 -1.756784628436e-03 -1.296374362086e-11 1.460000000000e+01 1.758176536836e-03 0.000000000000e+00 -1.758176523873e-03 -1.296374362086e-11 1.480000000000e+01 1.759522121223e-03 0.000000000000e+00 -1.759522108259e-03 -1.296374362086e-11 1.500000000000e+01 1.760823809335e-03 0.000000000000e+00 -1.760823796371e-03 -1.296374362086e-11 1.520000000000e+01 1.762083844984e-03 0.000000000000e+00 -1.762083832021e-03 -1.296374362086e-11 1.540000000000e+01 1.763304316187e-03 0.000000000000e+00 -1.763304303223e-03 -1.296374362086e-11 1.560000000000e+01 1.764487168715e-03 0.000000000000e+00 -1.764487155751e-03 -1.296374362086e-11 1.580000000000e+01 1.765634218249e-03 0.000000000000e+00 -1.765634205285e-03 -1.296374362086e-11 1.600000000000e+01 1.766747161287e-03 0.000000000000e+00 -1.766747148323e-03 -1.296374362086e-11 1.620000000000e+01 1.767827584962e-03 0.000000000000e+00 -1.767827571998e-03 -1.296374362086e-11 1.640000000000e+01 1.768876975894e-03 0.000000000000e+00 -1.768876962930e-03 -1.296374362086e-11 1.660000000000e+01 1.769896728183e-03 0.000000000000e+00 -1.769896715220e-03 -1.296374362086e-11 1.680000000000e+01 1.770888150644e-03 0.000000000000e+00 -1.770888137681e-03 -1.296374362086e-11 1.700000000000e+01 1.771852473364e-03 0.000000000000e+00 -1.771852460401e-03 -1.296374362086e-11 1.720000000000e+01 1.772790853656e-03 0.000000000000e+00 -1.772790840692e-03 -1.296374362086e-11 1.740000000000e+01 1.773704381473e-03 0.000000000000e+00 -1.773704368509e-03 -1.296374362086e-11 1.760000000000e+01 1.774594084341e-03 0.000000000000e+00 -1.774594071377e-03 -1.296374362086e-11 1.780000000000e+01 1.775460931859e-03 0.000000000000e+00 -1.775460918895e-03 -1.296374362086e-11 1.800000000000e+01 1.776305839807e-03 0.000000000000e+00 -1.776305826844e-03 -1.296374362086e-11 1.820000000000e+01 1.777129673913e-03 0.000000000000e+00 -1.777129660949e-03 -1.296374362086e-11 1.840000000000e+01 1.777933253291e-03 0.000000000000e+00 -1.777933240327e-03 -1.296374362086e-11 1.860000000000e+01 1.778717353608e-03 0.000000000000e+00 -1.778717340644e-03 -1.296374362086e-11 1.880000000000e+01 1.779482709987e-03 0.000000000000e+00 -1.779482697024e-03 -1.296374362086e-11 1.900000000000e+01 1.780230019677e-03 0.000000000000e+00 -1.780230006713e-03 -1.296374362086e-11 1.920000000000e+01 1.780959944513e-03 0.000000000000e+00 -1.780959931549e-03 -1.296374362086e-11 1.940000000000e+01 1.781673113184e-03 0.000000000000e+00 -1.781673100220e-03 -1.296374362086e-11 1.960000000000e+01 1.782370123327e-03 0.000000000000e+00 -1.782370110364e-03 -1.296374362086e-11 1.980000000000e+01 1.783051543464e-03 0.000000000000e+00 -1.783051530500e-03 -1.296374362086e-11 2.000000000000e+01 1.783717914785e-03 0.000000000000e+00 -1.783717901821e-03 -1.296374362086e-11 1.000000000000e+00 1.441677198409e-06 0.000000000000e+00 -1.441664234666e-06 -1.296374362086e-11 1.200000000000e+00 6.039388327616e-06 0.000000000000e+00 -6.039375363873e-06 -1.296374362086e-11 1.400000000000e+00 1.569120876719e-05 0.000000000000e+00 -1.569119580345e-05 -1.296374362086e-11 1.600000000000e+00 3.124454507100e-05 0.000000000000e+00 -3.124453210726e-05 -1.296374362086e-11 1.800000000000e+00 5.310625400962e-05 0.000000000000e+00 -5.310624104588e-05 -1.296374362086e-11 2.000000000000e+00 8.144336748871e-05 0.000000000000e+00 -8.144335452497e-05 -1.296374362086e-11 2.200000000000e+00 1.162654862659e-04 0.000000000000e+00 -1.162654733021e-04 -1.296374362086e-11 2.400000000000e+00 1.574677620111e-04 0.000000000000e+00 -1.574677490474e-04 -1.296374362086e-11 2.600000000000e+00 2.048585690812e-04 0.000000000000e+00 -2.048585561174e-04 -1.296374362086e-11 2.800000000000e+00 2.581798897496e-04 0.000000000000e+00 -2.581798767858e-04 -1.296374362086e-11 3.000000000000e+00 3.171234080931e-04 0.000000000000e+00 -3.171233951293e-04 -1.296374362086e-11 3.200000000000e+00 3.813434928850e-04 0.000000000000e+00 -3.813434799213e-04 -1.296374362086e-11 3.400000000000e+00 4.504675028763e-04 0.000000000000e+00 -4.504674899126e-04 -1.296374362086e-11 3.600000000000e+00 5.241034889321e-04 0.000000000000e+00 -5.241034759684e-04 -1.296374362086e-11 3.800000000000e+00 6.018451393671e-04 0.000000000000e+00 -6.018451264033e-04 -1.296374362086e-11 4.000000000000e+00 6.832735967260e-04 0.000000000000e+00 -6.832735837623e-04 -1.296374362086e-11 4.200000000000e+00 7.679554966285e-04 0.000000000000e+00 -7.679554836648e-04 -1.296374362086e-11 4.400000000000e+00 8.554362017527e-04 0.000000000000e+00 -8.554361887889e-04 -1.296374362086e-11 4.600000000000e+00 9.452265253562e-04 0.000000000000e+00 -9.452265123925e-04 -1.296374362086e-11 4.800000000000e+00 1.036768640162e-03 0.000000000000e+00 -1.036768627199e-03 -1.296374362086e-11 5.000000000000e+00 1.128756299977e-03 0.000000000000e+00 -1.128756287013e-03 -1.296374362086e-11 5.200000000000e+00 1.215940484409e-03 0.000000000000e+00 -1.215940471445e-03 -1.296374362086e-11 5.400000000000e+00 1.292697393016e-03 0.000000000000e+00 -1.292697380052e-03 -1.296374362086e-11 5.600000000000e+00 1.356817991874e-03 0.000000000000e+00 -1.356817978911e-03 -1.296374362086e-11 5.800000000000e+00 1.408874940401e-03 0.000000000000e+00 -1.408874927437e-03 -1.296374362086e-11 6.000000000000e+00 1.450829646412e-03 0.000000000000e+00 -1.450829633448e-03 -1.296374362086e-11 6.200000000000e+00 1.484845438450e-03 0.000000000000e+00 -1.484845425486e-03 -1.296374362086e-11 6.400000000000e+00 1.512761570036e-03 0.000000000000e+00 -1.512761557073e-03 -1.296374362086e-11 6.600000000000e+00 1.535996434934e-03 0.000000000000e+00 -1.535996421970e-03 -1.296374362086e-11 6.800000000000e+00 1.555606481296e-03 0.000000000000e+00 -1.555606468332e-03 -1.296374362086e-11 7.000000000000e+00 1.572373097466e-03 0.000000000000e+00 -1.572373084502e-03 -1.296374362086e-11 7.200000000000e+00 1.586877447697e-03 0.000000000000e+00 -1.586877434733e-03 -1.296374362086e-11 7.400000000000e+00 1.599556597668e-03 0.000000000000e+00 -1.599556584704e-03 -1.296374362086e-11 7.600000000000e+00 1.610743622921e-03 0.000000000000e+00 -1.610743609957e-03 -1.296374362086e-11 7.800000000000e+00 1.620695858861e-03 0.000000000000e+00 -1.620695845897e-03 -1.296374362086e-11 8.000000000000e+00 1.629614808017e-03 0.000000000000e+00 -1.629614795053e-03 -1.296374362086e-11 8.200000000000e+00 1.637660274482e-03 0.000000000000e+00 -1.637660261519e-03 -1.296374362086e-11 8.400000000000e+00 1.644960508901e-03 0.000000000000e+00 -1.644960495937e-03 -1.296374362086e-11 8.600000000000e+00 1.651619579574e-03 0.000000000000e+00 -1.651619566611e-03 -1.296374362086e-11 8.800000000000e+00 1.657722796064e-03 0.000000000000e+00 -1.657722783100e-03 -1.296374362086e-11 9.000000000000e+00 1.663340749828e-03 0.000000000000e+00 -1.663340736864e-03 -1.296374362086e-11 9.200000000000e+00 1.668532360932e-03 0.000000000000e+00 -1.668532347969e-03 -1.296374362086e-11 9.400000000000e+00 1.673347201779e-03 0.000000000000e+00 -1.673347188815e-03 -1.296374362086e-11 9.600000000000e+00 1.677827288692e-03 0.000000000000e+00 -1.677827275728e-03 -1.296374362086e-11 9.800000000000e+00 1.682008477372e-03 0.000000000000e+00 -1.682008464408e-03 -1.296374362086e-11 1.000000000000e+01 1.685921560248e-03 0.000000000000e+00 -1.685921547284e-03 -1.296374362086e-11 1.020000000000e+01 1.689593137182e-03 0.000000000000e+00 -1.689593124219e-03 -1.296374362086e-11 1.040000000000e+01 1.693046312177e-03 0.000000000000e+00 -1.693046299213e-03 -1.296374362086e-11 1.060000000000e+01 1.696301255266e-03 0.000000000000e+00 -1.696301242303e-03 -1.296374362086e-11 1.080000000000e+01 1.699375659052e-03 0.000000000000e+00 -1.699375646089e-03 -1.296374362086e-11 1.100000000000e+01 1.702285112220e-03 0.000000000000e+00 -1.702285099257e-03 -1.296374362086e-11 1.120000000000e+01 1.705043407145e-03 0.000000000000e+00 -1.705043394181e-03 -1.296374362086e-11 1.140000000000e+01 1.707662794773e-03 0.000000000000e+00 -1.707662781809e-03 -1.296374362086e-11 1.160000000000e+01 1.710154197056e-03 0.000000000000e+00 -1.710154184092e-03 -1.296374362086e-11 1.180000000000e+01 1.712527384971e-03 0.000000000000e+00 -1.712527372008e-03 -1.296374362086e-11 1.200000000000e+01 1.714791143747e-03 0.000000000000e+00 -1.714791130783e-03 -1.296374362086e-11 1.220000000000e+01 1.716953336389e-03 0.000000000000e+00 -1.716953323426e-03 -1.296374362086e-11 1.240000000000e+01 1.719021110655e-03 0.000000000000e+00 -1.719021097692e-03 -1.296374362086e-11 1.260000000000e+01 1.721000922328e-03 0.000000000000e+00 -1.721000909364e-03 -1.296374362086e-11 1.280000000000e+01 1.722898632364e-03 0.000000000000e+00 -1.722898619400e-03 -1.296374362086e-11 1.300000000000e+01 1.724719575037e-03 0.000000000000e+00 -1.724719562073e-03 -1.296374362086e-11 1.320000000000e+01 1.726468616801e-03 0.000000000000e+00 -1.726468603837e-03 -1.296374362086e-11 1.340000000000e+01 1.728150207376e-03 0.000000000000e+00 -1.728150194412e-03 -1.296374362086e-11 1.360000000000e+01 1.729768424206e-03 0.000000000000e+00 -1.729768411243e-03 -1.296374362086e-11 1.380000000000e+01 1.731327011301e-03 0.000000000000e+00 -1.731326998338e-03 -1.296374362086e-11 1.400000000000e+01 1.732829413254e-03 0.000000000000e+00 -1.732829400290e-03 -1.296374362086e-11 1.420000000000e+01 1.734278805140e-03 0.000000000000e+00 -1.734278792176e-03 -1.296374362086e-11 1.440000000000e+01 1.735678118867e-03 0.000000000000e+00 -1.735678105903e-03 -1.296374362086e-11 1.460000000000e+01 1.737030066456e-03 0.000000000000e+00 -1.737030053492e-03 -1.296374362086e-11 1.480000000000e+01 1.738337160670e-03 0.000000000000e+00 -1.738337147706e-03 -1.296374362086e-11 1.500000000000e+01 1.739601733337e-03 0.000000000000e+00 -1.739601720373e-03 -1.296374362086e-11 1.520000000000e+01 1.740825951666e-03 0.000000000000e+00 -1.740825938702e-03 -1.296374362086e-11 1.540000000000e+01 1.742011832806e-03 0.000000000000e+00 -1.742011819842e-03 -1.296374362086e-11 1.560000000000e+01 1.743161256870e-03 0.000000000000e+00 -1.743161243906e-03 -1.296374362086e-11 1.580000000000e+01 1.744275978612e-03 0.000000000000e+00 -1.744275965649e-03 -1.296374362086e-11 1.600000000000e+01 1.745357637911e-03 0.000000000000e+00 -1.745357624947e-03 -1.296374362086e-11 1.620000000000e+01 1.746407769209e-03 0.000000000000e+00 -1.746407756245e-03 -1.296374362086e-11 1.640000000000e+01 1.747427810026e-03 0.000000000000e+00 -1.747427797063e-03 -1.296374362086e-11 1.660000000000e+01 1.748419108648e-03 0.000000000000e+00 -1.748419095684e-03 -1.296374362086e-11 1.680000000000e+01 1.749382931087e-03 0.000000000000e+00 -1.749382918123e-03 -1.296374362086e-11 1.700000000000e+01 1.750320467391e-03 0.000000000000e+00 -1.750320454427e-03 -1.296374362086e-11 1.720000000000e+01 1.751232837377e-03 0.000000000000e+00 -1.751232824413e-03 -1.296374362086e-11 1.740000000000e+01 1.752121095844e-03 0.000000000000e+00 -1.752121082880e-03 -1.296374362086e-11 1.760000000000e+01 1.752986237321e-03 0.000000000000e+00 -1.752986224357e-03 -1.296374362086e-11 1.780000000000e+01 1.753829200401e-03 0.000000000000e+00 -1.753829187437e-03 -1.296374362086e-11 1.800000000000e+01 1.754650871704e-03 0.000000000000e+00 -1.754650858741e-03 -1.296374362086e-11 1.820000000000e+01 1.755452089500e-03 0.000000000000e+00 -1.755452076536e-03 -1.296374362086e-11 1.840000000000e+01 1.756233647027e-03 0.000000000000e+00 -1.756233634063e-03 -1.296374362086e-11 1.860000000000e+01 1.756996295543e-03 0.000000000000e+00 -1.756996282580e-03 -1.296374362086e-11 1.880000000000e+01 1.757740747125e-03 0.000000000000e+00 -1.757740734161e-03 -1.296374362086e-11 1.900000000000e+01 1.758467677240e-03 0.000000000000e+00 -1.758467664276e-03 -1.296374362086e-11 1.920000000000e+01 1.759177727124e-03 0.000000000000e+00 -1.759177714161e-03 -1.296374362086e-11 1.940000000000e+01 1.759871505968e-03 0.000000000000e+00 -1.759871493005e-03 -1.296374362086e-11 1.960000000000e+01 1.760549592935e-03 0.000000000000e+00 -1.760549579971e-03 -1.296374362086e-11 1.980000000000e+01 1.761212539028e-03 0.000000000000e+00 -1.761212526064e-03 -1.296374362086e-11 2.000000000000e+01 1.761860868821e-03 0.000000000000e+00 -1.761860855857e-03 -1.296374362086e-11 1.000000000000e+00 1.441674774190e-06 0.000000000000e+00 -1.441661810447e-06 -1.296374362086e-11 1.200000000000e+00 6.039358667706e-06 0.000000000000e+00 -6.039345703962e-06 -1.296374362086e-11 1.400000000000e+00 1.569105825775e-05 0.000000000000e+00 -1.569104529400e-05 -1.296374362086e-11 1.600000000000e+00 3.124406243642e-05 0.000000000000e+00 -3.124404947267e-05 -1.296374362086e-11 1.800000000000e+00 5.310506826448e-05 0.000000000000e+00 -5.310505530073e-05 -1.296374362086e-11 2.000000000000e+00 8.144091202452e-05 0.000000000000e+00 -8.144089906077e-05 -1.296374362086e-11 2.200000000000e+00 1.162609665870e-04 0.000000000000e+00 -1.162609536233e-04 -1.296374362086e-11 2.400000000000e+00 1.574601229757e-04 0.000000000000e+00 -1.574601100119e-04 -1.296374362086e-11 2.600000000000e+00 2.048464552767e-04 0.000000000000e+00 -2.048464423129e-04 -1.296374362086e-11 2.800000000000e+00 2.581615895755e-04 0.000000000000e+00 -2.581615766117e-04 -1.296374362086e-11 3.000000000000e+00 3.170967676303e-04 0.000000000000e+00 -3.170967546666e-04 -1.296374362086e-11 3.200000000000e+00 3.813057786000e-04 0.000000000000e+00 -3.813057656363e-04 -1.296374362086e-11 3.400000000000e+00 4.504151806820e-04 0.000000000000e+00 -4.504151677183e-04 -1.296374362086e-11 3.600000000000e+00 5.240318677354e-04 0.000000000000e+00 -5.240318547717e-04 -1.296374362086e-11 3.800000000000e+00 6.017477941976e-04 0.000000000000e+00 -6.017477812339e-04 -1.296374362086e-11 4.000000000000e+00 6.831414303750e-04 0.000000000000e+00 -6.831414174112e-04 -1.296374362086e-11 4.200000000000e+00 7.677752050486e-04 0.000000000000e+00 -7.677751920848e-04 -1.296374362086e-11 4.400000000000e+00 8.551877571133e-04 0.000000000000e+00 -8.551877441495e-04 -1.296374362086e-11 4.600000000000e+00 9.448789660869e-04 0.000000000000e+00 -9.448789531232e-04 -1.296374362086e-11 4.800000000000e+00 1.036265784334e-03 0.000000000000e+00 -1.036265771371e-03 -1.296374362086e-11 5.000000000000e+00 1.127722601770e-03 0.000000000000e+00 -1.127722588806e-03 -1.296374362086e-11 5.200000000000e+00 1.213361605859e-03 0.000000000000e+00 -1.213361592895e-03 -1.296374362086e-11 5.400000000000e+00 1.287773179246e-03 0.000000000000e+00 -1.287773166283e-03 -1.296374362086e-11 5.600000000000e+00 1.349232230155e-03 0.000000000000e+00 -1.349232217191e-03 -1.296374362086e-11 5.800000000000e+00 1.398745482532e-03 0.000000000000e+00 -1.398745469569e-03 -1.296374362086e-11 6.000000000000e+00 1.438486148855e-03 0.000000000000e+00 -1.438486135892e-03 -1.296374362086e-11 6.200000000000e+00 1.470654238110e-03 0.000000000000e+00 -1.470654225146e-03 -1.296374362086e-11 6.400000000000e+00 1.497049094087e-03 0.000000000000e+00 -1.497049081124e-03 -1.296374362086e-11 6.600000000000e+00 1.519030586858e-03 0.000000000000e+00 -1.519030573894e-03 -1.296374362086e-11 6.800000000000e+00 1.537600538597e-03 0.000000000000e+00 -1.537600525634e-03 -1.296374362086e-11 7.000000000000e+00 1.553495534488e-03 0.000000000000e+00 -1.553495521524e-03 -1.296374362086e-11 7.200000000000e+00 1.567261708177e-03 0.000000000000e+00 -1.567261695213e-03 -1.296374362086e-11 7.400000000000e+00 1.579309178728e-03 0.000000000000e+00 -1.579309165764e-03 -1.296374362086e-11 7.600000000000e+00 1.589950336879e-03 0.000000000000e+00 -1.589950323915e-03 -1.296374362086e-11 7.800000000000e+00 1.599426565029e-03 0.000000000000e+00 -1.599426552065e-03 -1.296374362086e-11 8.000000000000e+00 1.607926963770e-03 0.000000000000e+00 -1.607926950806e-03 -1.296374362086e-11 8.200000000000e+00 1.615601604867e-03 0.000000000000e+00 -1.615601591903e-03 -1.296374362086e-11 8.400000000000e+00 1.622571025789e-03 0.000000000000e+00 -1.622571012826e-03 -1.296374362086e-11 8.600000000000e+00 1.628933121421e-03 0.000000000000e+00 -1.628933108458e-03 -1.296374362086e-11 8.800000000000e+00 1.634768212897e-03 0.000000000000e+00 -1.634768199933e-03 -1.296374362086e-11 9.000000000000e+00 1.640142823885e-03 0.000000000000e+00 -1.640142810921e-03 -1.296374362086e-11 9.200000000000e+00 1.645112528692e-03 0.000000000000e+00 -1.645112515728e-03 -1.296374362086e-11 9.400000000000e+00 1.649724125429e-03 0.000000000000e+00 -1.649724112465e-03 -1.296374362086e-11 9.600000000000e+00 1.654017312436e-03 0.000000000000e+00 -1.654017299472e-03 -1.296374362086e-11 9.800000000000e+00 1.658025994841e-03 0.000000000000e+00 -1.658025981877e-03 -1.296374362086e-11 1.000000000000e+01 1.661779312695e-03 0.000000000000e+00 -1.661779299731e-03 -1.296374362086e-11 1.020000000000e+01 1.665302457324e-03 0.000000000000e+00 -1.665302444361e-03 -1.296374362086e-11 1.040000000000e+01 1.668617325013e-03 0.000000000000e+00 -1.668617312050e-03 -1.296374362086e-11 1.060000000000e+01 1.671743044569e-03 0.000000000000e+00 -1.671743031606e-03 -1.296374362086e-11 1.080000000000e+01 1.674696406274e-03 0.000000000000e+00 -1.674696393310e-03 -1.296374362086e-11 1.100000000000e+01 1.677492213077e-03 0.000000000000e+00 -1.677492200113e-03 -1.296374362086e-11 1.120000000000e+01 1.680143570016e-03 0.000000000000e+00 -1.680143557053e-03 -1.296374362086e-11 1.140000000000e+01 1.682662124200e-03 0.000000000000e+00 -1.682662111236e-03 -1.296374362086e-11 1.160000000000e+01 1.685058264941e-03 0.000000000000e+00 -1.685058251978e-03 -1.296374362086e-11 1.180000000000e+01 1.687341308359e-03 0.000000000000e+00 -1.687341295395e-03 -1.296374362086e-11 1.200000000000e+01 1.689519569134e-03 0.000000000000e+00 -1.689519556170e-03 -1.296374362086e-11 1.220000000000e+01 1.691600589262e-03 0.000000000000e+00 -1.691600576299e-03 -1.296374362086e-11 1.240000000000e+01 1.693591164096e-03 0.000000000000e+00 -1.693591151133e-03 -1.296374362086e-11 1.260000000000e+01 1.695497449388e-03 0.000000000000e+00 -1.695497436424e-03 -1.296374362086e-11 1.280000000000e+01 1.697325036101e-03 0.000000000000e+00 -1.697325023137e-03 -1.296374362086e-11 1.300000000000e+01 1.699079014840e-03 0.000000000000e+00 -1.699079001876e-03 -1.296374362086e-11 1.320000000000e+01 1.700764031575e-03 0.000000000000e+00 -1.700764018612e-03 -1.296374362086e-11 1.340000000000e+01 1.702384336014e-03 0.000000000000e+00 -1.702384323050e-03 -1.296374362086e-11 1.360000000000e+01 1.703943823726e-03 0.000000000000e+00 -1.703943810763e-03 -1.296374362086e-11 1.380000000000e+01 1.705446072957e-03 0.000000000000e+00 -1.705446059993e-03 -1.296374362086e-11 1.400000000000e+01 1.706894376890e-03 0.000000000000e+00 -1.706894363926e-03 -1.296374362086e-11 1.420000000000e+01 1.708291772011e-03 0.000000000000e+00 -1.708291759047e-03 -1.296374362086e-11 1.440000000000e+01 1.709641063118e-03 0.000000000000e+00 -1.709641050154e-03 -1.296374362086e-11 1.460000000000e+01 1.710944845428e-03 0.000000000000e+00 -1.710944832465e-03 -1.296374362086e-11 1.480000000000e+01 1.712205524172e-03 0.000000000000e+00 -1.712205511208e-03 -1.296374362086e-11 1.500000000000e+01 1.713425332005e-03 0.000000000000e+00 -1.713425319042e-03 -1.296374362086e-11 1.520000000000e+01 1.714606344519e-03 0.000000000000e+00 -1.714606331556e-03 -1.296374362086e-11 1.540000000000e+01 1.715750494088e-03 0.000000000000e+00 -1.715750481124e-03 -1.296374362086e-11 1.560000000000e+01 1.716859582256e-03 0.000000000000e+00 -1.716859569292e-03 -1.296374362086e-11 1.580000000000e+01 1.717935290851e-03 0.000000000000e+00 -1.717935277887e-03 -1.296374362086e-11 1.600000000000e+01 1.718979191965e-03 0.000000000000e+00 -1.718979179001e-03 -1.296374362086e-11 1.620000000000e+01 1.719992756944e-03 0.000000000000e+00 -1.719992743980e-03 -1.296374362086e-11 1.640000000000e+01 1.720977364494e-03 0.000000000000e+00 -1.720977351530e-03 -1.296374362086e-11 1.660000000000e+01 1.721934308011e-03 0.000000000000e+00 -1.721934295047e-03 -1.296374362086e-11 1.680000000000e+01 1.722864802214e-03 0.000000000000e+00 -1.722864789250e-03 -1.296374362086e-11 1.700000000000e+01 1.723769989160e-03 0.000000000000e+00 -1.723769976196e-03 -1.296374362086e-11 1.720000000000e+01 1.724650943713e-03 0.000000000000e+00 -1.724650930749e-03 -1.296374362086e-11 1.740000000000e+01 1.725508678514e-03 0.000000000000e+00 -1.725508665551e-03 -1.296374362086e-11 1.760000000000e+01 1.726344148518e-03 0.000000000000e+00 -1.726344135555e-03 -1.296374362086e-11 1.780000000000e+01 1.727158255125e-03 0.000000000000e+00 -1.727158242161e-03 -1.296374362086e-11 1.800000000000e+01 1.727951849963e-03 0.000000000000e+00 -1.727951836999e-03 -1.296374362086e-11 1.820000000000e+01 1.728725738351e-03 0.000000000000e+00 -1.728725725387e-03 -1.296374362086e-11 1.840000000000e+01 1.729480682469e-03 0.000000000000e+00 -1.729480669506e-03 -1.296374362086e-11 1.860000000000e+01 1.730217404272e-03 0.000000000000e+00 -1.730217391308e-03 -1.296374362086e-11 1.880000000000e+01 1.730936588160e-03 0.000000000000e+00 -1.730936575197e-03 -1.296374362086e-11 1.900000000000e+01 1.731638883448e-03 0.000000000000e+00 -1.731638870485e-03 -1.296374362086e-11 1.920000000000e+01 1.732324906628e-03 0.000000000000e+00 -1.732324893664e-03 -1.296374362086e-11 1.940000000000e+01 1.732995243462e-03 0.000000000000e+00 -1.732995230498e-03 -1.296374362086e-11 1.960000000000e+01 1.733650450918e-03 0.000000000000e+00 -1.733650437954e-03 -1.296374362086e-11 1.980000000000e+01 1.734291058950e-03 0.000000000000e+00 -1.734291045987e-03 -1.296374362086e-11 2.000000000000e+01 1.734917572157e-03 0.000000000000e+00 -1.734917559193e-03 -1.296374362086e-11 ngspice-26/tests/hisimhv1/nmos/reference/dcSw_Id1_vb1.standard0000644000265600020320000010224312264261473023726 0ustar andreasadminV(d) I(d) I(g) I(s) I(b) 1.000000000000e+00 5.999974822535e-15 0.000000000000e+00 5.000000000000e-15 -1.100000000000e-14 1.500000000000e+00 6.499792024051e-15 0.000000000000e+00 5.000000000000e-15 -1.150000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 7.499643267517e-15 0.000000000000e+00 5.000000000000e-15 -1.250000000000e-14 3.000000000000e+00 8.000110990336e-15 0.000000000000e+00 5.000000000000e-15 -1.300000000000e-14 3.500000000000e+00 8.499711351417e-15 0.000000000000e+00 5.000000000000e-15 -1.350000000000e-14 4.000000000000e+00 8.999745393368e-15 0.000000000000e+00 5.000000000000e-15 -1.400000000000e-14 4.500000000000e+00 9.499779435318e-15 0.000000000000e+00 5.000000000000e-15 -1.450000000000e-14 5.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 5.500000000000e+00 1.049984751922e-14 0.000000000000e+00 5.000000000000e-15 -1.550000000000e-14 6.000000000000e+00 1.099988156117e-14 0.000000000000e+00 5.000000000000e-15 -1.600000000000e-14 6.500000000000e+00 1.149948192225e-14 0.000000000000e+00 5.000000000000e-15 -1.650000000000e-14 7.000000000000e+00 1.199951596420e-14 0.000000000000e+00 5.000000000000e-15 -1.700000000000e-14 7.500000000000e+00 1.250041736789e-14 0.000000000000e+00 5.000000000000e-15 -1.750000000000e-14 8.000000000000e+00 1.300001772897e-14 0.000000000000e+00 5.000000000000e-15 -1.800000000000e-14 8.500000000000e+00 1.350005177092e-14 0.000000000000e+00 5.000000000000e-15 -1.850000000000e-14 9.000000000000e+00 1.400008581287e-14 0.000000000000e+00 5.000000000000e-15 -1.900000000000e-14 9.500000000000e+00 1.450055353569e-14 0.000000000000e+00 5.000000000000e-15 -1.950000000000e-14 1.000000000000e+01 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.050000000000e+01 1.550062161959e-14 0.000000000000e+00 5.000000000000e-15 -2.050000000000e-14 1.100000000000e+01 1.600022198067e-14 0.000000000000e+00 5.000000000000e-15 -2.100000000000e-14 1.150000000000e+01 1.649982234175e-14 0.000000000000e+00 5.000000000000e-15 -2.150000000000e-14 1.200000000000e+01 1.700115742631e-14 0.000000000000e+00 5.000000000000e-15 -2.200000000000e-14 1.250000000000e+01 1.750075778739e-14 0.000000000000e+00 5.000000000000e-15 -2.250000000000e-14 1.300000000000e+01 1.800035814847e-14 0.000000000000e+00 5.000000000000e-15 -2.300000000000e-14 1.350000000000e+01 1.849995850955e-14 0.000000000000e+00 5.000000000000e-15 -2.350000000000e-14 1.400000000000e+01 1.900042623237e-14 0.000000000000e+00 5.000000000000e-15 -2.400000000000e-14 1.450000000000e+01 1.950089395519e-14 0.000000000000e+00 5.000000000000e-15 -2.450000000000e-14 1.500000000000e+01 2.000049431627e-14 0.000000000000e+00 5.000000000000e-15 -2.500000000000e-14 1.550000000000e+01 2.050009467736e-14 0.000000000000e+00 5.000000000000e-15 -2.550000000000e-14 1.600000000000e+01 2.100056240018e-14 0.000000000000e+00 5.000000000000e-15 -2.600000000000e-14 1.650000000000e+01 2.150016276126e-14 0.000000000000e+00 5.000000000000e-15 -2.650000000000e-14 1.700000000000e+01 2.200063048408e-14 0.000000000000e+00 5.000000000000e-15 -2.700000000000e-14 1.750000000000e+01 2.250109820690e-14 0.000000000000e+00 5.000000000000e-15 -2.750000000000e-14 1.800000000000e+01 2.300069856798e-14 0.000000000000e+00 5.000000000000e-15 -2.800000000000e-14 1.850000000000e+01 2.350029892906e-14 0.000000000000e+00 5.000000000000e-15 -2.850000000000e-14 1.900000000000e+01 2.400163401362e-14 0.000000000000e+00 5.000000000000e-15 -2.900000000000e-14 1.950000000000e+01 2.450036701296e-14 0.000000000000e+00 5.000000000000e-15 -2.950000000000e-14 2.000000000000e+01 2.500083473578e-14 0.000000000000e+00 5.000000000000e-15 -3.000000000000e-14 1.000000000000e+00 2.152677284143e-04 0.000000000000e+00 -2.152677284033e-04 -1.100000000000e-14 1.500000000000e+00 2.332808066552e-04 0.000000000000e+00 -2.332808066437e-04 -1.150000000000e-14 2.000000000000e+00 2.348896352177e-04 0.000000000000e+00 -2.348896352057e-04 -1.200000000000e-14 2.500000000000e+00 2.361310042703e-04 0.000000000000e+00 -2.361310042578e-04 -1.250000000000e-14 3.000000000000e+00 2.372438675769e-04 0.000000000000e+00 -2.372438675639e-04 -1.300000000000e-14 3.500000000000e+00 2.382785397033e-04 0.000000000000e+00 -2.382785396898e-04 -1.350000000000e-14 4.000000000000e+00 2.392622757808e-04 0.000000000000e+00 -2.392622757668e-04 -1.400000000000e-14 4.500000000000e+00 2.402104188586e-04 0.000000000000e+00 -2.402104188441e-04 -1.450000000000e-14 5.000000000000e+00 2.411322147611e-04 0.000000000000e+00 -2.411322147461e-04 -1.500000000000e-14 5.500000000000e+00 2.420336192770e-04 0.000000000000e+00 -2.420336192615e-04 -1.550000000000e-14 6.000000000000e+00 2.429186957420e-04 0.000000000000e+00 -2.429186957260e-04 -1.600000000000e-14 6.500000000000e+00 2.437903510778e-04 0.000000000000e+00 -2.437903510613e-04 -1.650000000000e-14 7.000000000000e+00 2.446507469453e-04 0.000000000000e+00 -2.446507469283e-04 -1.700000000000e-14 7.500000000000e+00 2.455015423399e-04 0.000000000000e+00 -2.455015423224e-04 -1.750000000000e-14 8.000000000000e+00 2.463440438792e-04 0.000000000000e+00 -2.463440438612e-04 -1.800000000000e-14 8.500000000000e+00 2.471793029629e-04 0.000000000000e+00 -2.471793029444e-04 -1.850000000000e-14 9.000000000000e+00 2.480081809530e-04 0.000000000000e+00 -2.480081809340e-04 -1.900000000000e-14 9.500000000000e+00 2.488313943279e-04 0.000000000000e+00 -2.488313943084e-04 -1.950000000000e-14 1.000000000000e+01 2.496495468478e-04 0.000000000000e+00 -2.496495468278e-04 -2.000000000000e-14 1.050000000000e+01 2.504631530292e-04 0.000000000000e+00 -2.504631530087e-04 -2.050000000000e-14 1.100000000000e+01 2.512726556465e-04 0.000000000000e+00 -2.512726556255e-04 -2.100000000000e-14 1.150000000000e+01 2.520784390249e-04 0.000000000000e+00 -2.520784390034e-04 -2.150000000000e-14 1.200000000000e+01 2.528808393049e-04 0.000000000000e+00 -2.528808392829e-04 -2.200000000000e-14 1.250000000000e+01 2.536801524861e-04 0.000000000000e+00 -2.536801524636e-04 -2.250000000000e-14 1.300000000000e+01 2.544766408126e-04 0.000000000000e+00 -2.544766407896e-04 -2.300000000000e-14 1.350000000000e+01 2.552705379027e-04 0.000000000000e+00 -2.552705378792e-04 -2.350000000000e-14 1.400000000000e+01 2.560620529132e-04 0.000000000000e+00 -2.560620528892e-04 -2.400000000000e-14 1.450000000000e+01 2.568513739527e-04 0.000000000000e+00 -2.568513739282e-04 -2.450000000000e-14 1.500000000000e+01 2.576386709038e-04 0.000000000000e+00 -2.576386708788e-04 -2.500000000000e-14 1.550000000000e+01 2.584240977755e-04 0.000000000000e+00 -2.584240977500e-04 -2.550000000000e-14 1.600000000000e+01 2.592077946777e-04 0.000000000000e+00 -2.592077946517e-04 -2.600000000000e-14 1.650000000000e+01 2.599898894909e-04 0.000000000000e+00 -2.599898894644e-04 -2.650000000000e-14 1.700000000000e+01 2.607704992855e-04 0.000000000000e+00 -2.607704992585e-04 -2.700000000000e-14 1.750000000000e+01 2.615497315363e-04 0.000000000000e+00 -2.615497315088e-04 -2.750000000000e-14 1.800000000000e+01 2.623276851670e-04 0.000000000000e+00 -2.623276851390e-04 -2.800000000000e-14 1.850000000000e+01 2.631044514527e-04 0.000000000000e+00 -2.631044514242e-04 -2.850000000000e-14 1.900000000000e+01 2.638801148041e-04 0.000000000000e+00 -2.638801147751e-04 -2.900000000000e-14 1.950000000000e+01 2.646547534503e-04 0.000000000000e+00 -2.646547534208e-04 -2.950000000000e-14 2.000000000000e+01 2.654284400383e-04 0.000000000000e+00 -2.654284400083e-04 -3.000000000000e-14 1.000000000000e+00 6.587476245214e-04 0.000000000000e+00 -6.587476245104e-04 -1.100000000000e-14 1.500000000000e+00 9.362049745663e-04 0.000000000000e+00 -9.362049745548e-04 -1.150000000000e-14 2.000000000000e+00 1.184346256610e-03 0.000000000000e+00 -1.184346256598e-03 -1.200000000000e-14 2.500000000000e+00 1.406549664546e-03 0.000000000000e+00 -1.406549664534e-03 -1.250000000000e-14 3.000000000000e+00 1.605725061900e-03 0.000000000000e+00 -1.605725061887e-03 -1.300000000000e-14 3.500000000000e+00 1.784366771527e-03 0.000000000000e+00 -1.784366771513e-03 -1.350000000000e-14 4.000000000000e+00 1.944614531646e-03 0.000000000000e+00 -1.944614531632e-03 -1.400000000000e-14 4.500000000000e+00 2.088312542652e-03 0.000000000000e+00 -2.088312542637e-03 -1.450000000000e-14 5.000000000000e+00 2.217062753250e-03 0.000000000000e+00 -2.217062753235e-03 -1.500000000000e-14 5.500000000000e+00 2.332271155638e-03 0.000000000000e+00 -2.332271155623e-03 -1.550000000000e-14 6.000000000000e+00 2.435186883452e-03 0.000000000000e+00 -2.435186883436e-03 -1.600000000000e-14 6.500000000000e+00 2.526934264327e-03 0.000000000000e+00 -2.526934264310e-03 -1.650000000000e-14 7.000000000000e+00 2.608538119377e-03 0.000000000000e+00 -2.608538119360e-03 -1.700000000000e-14 7.500000000000e+00 2.680942733095e-03 0.000000000000e+00 -2.680942733078e-03 -1.750000000000e-14 8.000000000000e+00 2.745025108360e-03 0.000000000000e+00 -2.745025108342e-03 -1.800000000000e-14 8.500000000000e+00 2.801603353676e-03 0.000000000000e+00 -2.801603353657e-03 -1.850000000000e-14 9.000000000000e+00 2.851441256906e-03 0.000000000000e+00 -2.851441256887e-03 -1.900000000000e-14 9.500000000000e+00 2.895250209810e-03 0.000000000000e+00 -2.895250209790e-03 -1.950000000000e-14 1.000000000000e+01 2.933689618564e-03 0.000000000000e+00 -2.933689618544e-03 -2.000000000000e-14 1.050000000000e+01 2.967366771554e-03 0.000000000000e+00 -2.967366771534e-03 -2.050000000000e-14 1.100000000000e+01 2.996836881302e-03 0.000000000000e+00 -2.996836881281e-03 -2.100000000000e-14 1.150000000000e+01 3.022603734482e-03 0.000000000000e+00 -3.022603734461e-03 -2.150000000000e-14 1.200000000000e+01 3.045121128438e-03 0.000000000000e+00 -3.045121128416e-03 -2.200000000000e-14 1.250000000000e+01 3.064795079235e-03 0.000000000000e+00 -3.064795079213e-03 -2.250000000000e-14 1.300000000000e+01 3.081986665944e-03 0.000000000000e+00 -3.081986665921e-03 -2.300000000000e-14 1.350000000000e+01 3.097015320948e-03 0.000000000000e+00 -3.097015320924e-03 -2.350000000000e-14 1.400000000000e+01 3.110162369718e-03 0.000000000000e+00 -3.110162369694e-03 -2.400000000000e-14 1.450000000000e+01 3.121674646649e-03 0.000000000000e+00 -3.121674646624e-03 -2.450000000000e-14 1.500000000000e+01 3.131768050214e-03 0.000000000000e+00 -3.131768050189e-03 -2.500000000000e-14 1.550000000000e+01 3.140630939754e-03 0.000000000000e+00 -3.140630939728e-03 -2.550000000000e-14 1.600000000000e+01 3.148427311102e-03 0.000000000000e+00 -3.148427311076e-03 -2.600000000000e-14 1.650000000000e+01 3.155299745831e-03 0.000000000000e+00 -3.155299745805e-03 -2.650000000000e-14 1.700000000000e+01 3.161371934733e-03 0.000000000000e+00 -3.161371934706e-03 -2.700000000000e-14 1.750000000000e+01 3.166751266572e-03 0.000000000000e+00 -3.166751266544e-03 -2.750000000000e-14 1.800000000000e+01 3.171530800757e-03 0.000000000000e+00 -3.171530800729e-03 -2.800000000000e-14 1.850000000000e+01 3.175791193675e-03 0.000000000000e+00 -3.175791193647e-03 -2.850000000000e-14 1.900000000000e+01 3.179602362776e-03 0.000000000000e+00 -3.179602362747e-03 -2.900000000000e-14 1.950000000000e+01 3.183024954101e-03 0.000000000000e+00 -3.183024954071e-03 -2.950000000000e-14 2.000000000000e+01 3.186111638122e-03 0.000000000000e+00 -3.186111638092e-03 -3.000000000000e-14 1.000000000000e+00 5.999974822535e-15 0.000000000000e+00 5.000000000000e-15 -1.100000000000e-14 1.500000000000e+00 6.499792024051e-15 0.000000000000e+00 5.000000000000e-15 -1.150000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 7.499643267517e-15 0.000000000000e+00 5.000000000000e-15 -1.250000000000e-14 3.000000000000e+00 8.000110990336e-15 0.000000000000e+00 5.000000000000e-15 -1.300000000000e-14 3.500000000000e+00 8.499711351417e-15 0.000000000000e+00 5.000000000000e-15 -1.350000000000e-14 4.000000000000e+00 8.999745393368e-15 0.000000000000e+00 5.000000000000e-15 -1.400000000000e-14 4.500000000000e+00 9.499779435318e-15 0.000000000000e+00 5.000000000000e-15 -1.450000000000e-14 5.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 5.500000000000e+00 1.049984751922e-14 0.000000000000e+00 5.000000000000e-15 -1.550000000000e-14 6.000000000000e+00 1.099988156117e-14 0.000000000000e+00 5.000000000000e-15 -1.600000000000e-14 6.500000000000e+00 1.149948192225e-14 0.000000000000e+00 5.000000000000e-15 -1.650000000000e-14 7.000000000000e+00 1.199951596420e-14 0.000000000000e+00 5.000000000000e-15 -1.700000000000e-14 7.500000000000e+00 1.250041736789e-14 0.000000000000e+00 5.000000000000e-15 -1.750000000000e-14 8.000000000000e+00 1.300001772897e-14 0.000000000000e+00 5.000000000000e-15 -1.800000000000e-14 8.500000000000e+00 1.350005177092e-14 0.000000000000e+00 5.000000000000e-15 -1.850000000000e-14 9.000000000000e+00 1.400008581287e-14 0.000000000000e+00 5.000000000000e-15 -1.900000000000e-14 9.500000000000e+00 1.450055353569e-14 0.000000000000e+00 5.000000000000e-15 -1.950000000000e-14 1.000000000000e+01 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.050000000000e+01 1.550062161959e-14 0.000000000000e+00 5.000000000000e-15 -2.050000000000e-14 1.100000000000e+01 1.600022198067e-14 0.000000000000e+00 5.000000000000e-15 -2.100000000000e-14 1.150000000000e+01 1.649982234175e-14 0.000000000000e+00 5.000000000000e-15 -2.150000000000e-14 1.200000000000e+01 1.700115742631e-14 0.000000000000e+00 5.000000000000e-15 -2.200000000000e-14 1.250000000000e+01 1.750075778739e-14 0.000000000000e+00 5.000000000000e-15 -2.250000000000e-14 1.300000000000e+01 1.800035814847e-14 0.000000000000e+00 5.000000000000e-15 -2.300000000000e-14 1.350000000000e+01 1.849995850955e-14 0.000000000000e+00 5.000000000000e-15 -2.350000000000e-14 1.400000000000e+01 1.900042623237e-14 0.000000000000e+00 5.000000000000e-15 -2.400000000000e-14 1.450000000000e+01 1.950089395519e-14 0.000000000000e+00 5.000000000000e-15 -2.450000000000e-14 1.500000000000e+01 2.000049431627e-14 0.000000000000e+00 5.000000000000e-15 -2.500000000000e-14 1.550000000000e+01 2.050009467736e-14 0.000000000000e+00 5.000000000000e-15 -2.550000000000e-14 1.600000000000e+01 2.100056240018e-14 0.000000000000e+00 5.000000000000e-15 -2.600000000000e-14 1.650000000000e+01 2.150016276126e-14 0.000000000000e+00 5.000000000000e-15 -2.650000000000e-14 1.700000000000e+01 2.200063048408e-14 0.000000000000e+00 5.000000000000e-15 -2.700000000000e-14 1.750000000000e+01 2.250109820690e-14 0.000000000000e+00 5.000000000000e-15 -2.750000000000e-14 1.800000000000e+01 2.300069856798e-14 0.000000000000e+00 5.000000000000e-15 -2.800000000000e-14 1.850000000000e+01 2.350029892906e-14 0.000000000000e+00 5.000000000000e-15 -2.850000000000e-14 1.900000000000e+01 2.400163401362e-14 0.000000000000e+00 5.000000000000e-15 -2.900000000000e-14 1.950000000000e+01 2.450036701296e-14 0.000000000000e+00 5.000000000000e-15 -2.950000000000e-14 2.000000000000e+01 2.500083473578e-14 0.000000000000e+00 5.000000000000e-15 -3.000000000000e-14 1.000000000000e+00 2.509409100342e-04 0.000000000000e+00 -2.509409100232e-04 -1.100000000000e-14 1.500000000000e+00 2.657569695441e-04 0.000000000000e+00 -2.657569695326e-04 -1.150000000000e-14 2.000000000000e+00 2.674516708078e-04 0.000000000000e+00 -2.674516707958e-04 -1.200000000000e-14 2.500000000000e+00 2.689110772834e-04 0.000000000000e+00 -2.689110772709e-04 -1.250000000000e-14 3.000000000000e+00 2.702263097857e-04 0.000000000000e+00 -2.702263097727e-04 -1.300000000000e-14 3.500000000000e+00 2.714541384900e-04 0.000000000000e+00 -2.714541384765e-04 -1.350000000000e-14 4.000000000000e+00 2.726254246896e-04 0.000000000000e+00 -2.726254246756e-04 -1.400000000000e-14 4.500000000000e+00 2.737574329427e-04 0.000000000000e+00 -2.737574329282e-04 -1.450000000000e-14 5.000000000000e+00 2.748604948461e-04 0.000000000000e+00 -2.748604948311e-04 -1.500000000000e-14 5.500000000000e+00 2.759412267122e-04 0.000000000000e+00 -2.759412266967e-04 -1.550000000000e-14 6.000000000000e+00 2.770041221208e-04 0.000000000000e+00 -2.770041221048e-04 -1.600000000000e-14 6.500000000000e+00 2.780523849543e-04 0.000000000000e+00 -2.780523849378e-04 -1.650000000000e-14 7.000000000000e+00 2.790883917931e-04 0.000000000000e+00 -2.790883917761e-04 -1.700000000000e-14 7.500000000000e+00 2.801139632503e-04 0.000000000000e+00 -2.801139632328e-04 -1.750000000000e-14 8.000000000000e+00 2.811305312933e-04 0.000000000000e+00 -2.811305312753e-04 -1.800000000000e-14 8.500000000000e+00 2.821392470077e-04 0.000000000000e+00 -2.821392469892e-04 -1.850000000000e-14 9.000000000000e+00 2.831410526729e-04 0.000000000000e+00 -2.831410526539e-04 -1.900000000000e-14 9.500000000000e+00 2.841367315713e-04 0.000000000000e+00 -2.841367315518e-04 -1.950000000000e-14 1.000000000000e+01 2.851269433999e-04 0.000000000000e+00 -2.851269433799e-04 -2.000000000000e-14 1.050000000000e+01 2.861122500764e-04 0.000000000000e+00 -2.861122500559e-04 -2.050000000000e-14 1.100000000000e+01 2.870931349538e-04 0.000000000000e+00 -2.870931349328e-04 -2.100000000000e-14 1.150000000000e+01 2.880700174023e-04 0.000000000000e+00 -2.880700173808e-04 -2.150000000000e-14 1.200000000000e+01 2.890432640599e-04 0.000000000000e+00 -2.890432640379e-04 -2.200000000000e-14 1.250000000000e+01 2.900131976441e-04 0.000000000000e+00 -2.900131976216e-04 -2.250000000000e-14 1.300000000000e+01 2.909801039440e-04 0.000000000000e+00 -2.909801039210e-04 -2.300000000000e-14 1.350000000000e+01 2.919442374353e-04 0.000000000000e+00 -2.919442374118e-04 -2.350000000000e-14 1.400000000000e+01 2.929058258375e-04 0.000000000000e+00 -2.929058258135e-04 -2.400000000000e-14 1.450000000000e+01 2.938650738483e-04 0.000000000000e+00 -2.938650738238e-04 -2.450000000000e-14 1.500000000000e+01 2.948221662312e-04 0.000000000000e+00 -2.948221662062e-04 -2.500000000000e-14 1.550000000000e+01 2.957772703883e-04 0.000000000000e+00 -2.957772703628e-04 -2.550000000000e-14 1.600000000000e+01 2.967305385208e-04 0.000000000000e+00 -2.967305384948e-04 -2.600000000000e-14 1.650000000000e+01 2.976821094544e-04 0.000000000000e+00 -2.976821094279e-04 -2.650000000000e-14 1.700000000000e+01 2.986321101917e-04 0.000000000000e+00 -2.986321101647e-04 -2.700000000000e-14 1.750000000000e+01 2.995806572410e-04 0.000000000000e+00 -2.995806572135e-04 -2.750000000000e-14 1.800000000000e+01 3.005278577582e-04 0.000000000000e+00 -3.005278577302e-04 -2.800000000000e-14 1.850000000000e+01 3.014738105343e-04 0.000000000000e+00 -3.014738105058e-04 -2.850000000000e-14 1.900000000000e+01 3.024186068524e-04 0.000000000000e+00 -3.024186068234e-04 -2.900000000000e-14 1.950000000000e+01 3.033623312353e-04 0.000000000000e+00 -3.033623312058e-04 -2.950000000000e-14 2.000000000000e+01 3.043050621007e-04 0.000000000000e+00 -3.043050620707e-04 -3.000000000000e-14 1.000000000000e+00 7.223999889981e-04 0.000000000000e+00 -7.223999889871e-04 -1.100000000000e-14 1.500000000000e+00 1.024833230857e-03 0.000000000000e+00 -1.024833230846e-03 -1.150000000000e-14 2.000000000000e+00 1.294817659581e-03 0.000000000000e+00 -1.294817659569e-03 -1.200000000000e-14 2.500000000000e+00 1.536440582735e-03 0.000000000000e+00 -1.536440582723e-03 -1.250000000000e-14 3.000000000000e+00 1.753129215296e-03 0.000000000000e+00 -1.753129215283e-03 -1.300000000000e-14 3.500000000000e+00 1.947755702783e-03 0.000000000000e+00 -1.947755702769e-03 -1.350000000000e-14 4.000000000000e+00 2.122733594612e-03 0.000000000000e+00 -2.122733594598e-03 -1.400000000000e-14 4.500000000000e+00 2.280101760117e-03 0.000000000000e+00 -2.280101760103e-03 -1.450000000000e-14 5.000000000000e+00 2.421595926756e-03 0.000000000000e+00 -2.421595926741e-03 -1.500000000000e-14 5.500000000000e+00 2.548709281952e-03 0.000000000000e+00 -2.548709281936e-03 -1.550000000000e-14 6.000000000000e+00 2.662743640852e-03 0.000000000000e+00 -2.662743640836e-03 -1.600000000000e-14 6.500000000000e+00 2.764852286953e-03 0.000000000000e+00 -2.764852286937e-03 -1.650000000000e-14 7.000000000000e+00 2.856075106224e-03 0.000000000000e+00 -2.856075106207e-03 -1.700000000000e-14 7.500000000000e+00 2.937366272438e-03 0.000000000000e+00 -2.937366272421e-03 -1.750000000000e-14 8.000000000000e+00 3.009614632810e-03 0.000000000000e+00 -3.009614632792e-03 -1.800000000000e-14 8.500000000000e+00 3.073657129668e-03 0.000000000000e+00 -3.073657129649e-03 -1.850000000000e-14 9.000000000000e+00 3.130286008337e-03 0.000000000000e+00 -3.130286008318e-03 -1.900000000000e-14 9.500000000000e+00 3.180251042116e-03 0.000000000000e+00 -3.180251042096e-03 -1.950000000000e-14 1.000000000000e+01 3.224258359579e-03 0.000000000000e+00 -3.224258359559e-03 -2.000000000000e-14 1.050000000000e+01 3.262967549240e-03 0.000000000000e+00 -3.262967549220e-03 -2.050000000000e-14 1.100000000000e+01 3.296988515382e-03 0.000000000000e+00 -3.296988515361e-03 -2.100000000000e-14 1.150000000000e+01 3.326879148539e-03 0.000000000000e+00 -3.326879148518e-03 -2.150000000000e-14 1.200000000000e+01 3.353144390938e-03 0.000000000000e+00 -3.353144390916e-03 -2.200000000000e-14 1.250000000000e+01 3.376236846076e-03 0.000000000000e+00 -3.376236846054e-03 -2.250000000000e-14 1.300000000000e+01 3.396558775698e-03 0.000000000000e+00 -3.396558775675e-03 -2.300000000000e-14 1.350000000000e+01 3.414465162394e-03 0.000000000000e+00 -3.414465162370e-03 -2.350000000000e-14 1.400000000000e+01 3.430267467740e-03 0.000000000000e+00 -3.430267467716e-03 -2.400000000000e-14 1.450000000000e+01 3.444237744320e-03 0.000000000000e+00 -3.444237744295e-03 -2.450000000000e-14 1.500000000000e+01 3.456612826587e-03 0.000000000000e+00 -3.456612826562e-03 -2.500000000000e-14 1.550000000000e+01 3.467598402073e-03 0.000000000000e+00 -3.467598402047e-03 -2.550000000000e-14 1.600000000000e+01 3.477372834297e-03 0.000000000000e+00 -3.477372834271e-03 -2.600000000000e-14 1.650000000000e+01 3.486090664788e-03 0.000000000000e+00 -3.486090664761e-03 -2.650000000000e-14 1.700000000000e+01 3.493885762542e-03 0.000000000000e+00 -3.493885762515e-03 -2.700000000000e-14 1.750000000000e+01 3.500874143623e-03 0.000000000000e+00 -3.500874143596e-03 -2.750000000000e-14 1.800000000000e+01 3.507156309029e-03 0.000000000000e+00 -3.507156309001e-03 -2.800000000000e-14 1.850000000000e+01 3.512819561968e-03 0.000000000000e+00 -3.512819561939e-03 -2.850000000000e-14 1.900000000000e+01 3.517939720154e-03 0.000000000000e+00 -3.517939720125e-03 -2.900000000000e-14 1.950000000000e+01 3.522582744206e-03 0.000000000000e+00 -3.522582744176e-03 -2.950000000000e-14 2.000000000000e+01 3.526806105765e-03 0.000000000000e+00 -3.526806105735e-03 -3.000000000000e-14 1.000000000000e+00 5.999974822535e-15 0.000000000000e+00 5.000000000000e-15 -1.100000000000e-14 1.500000000000e+00 6.499792024051e-15 0.000000000000e+00 5.000000000000e-15 -1.150000000000e-14 2.000000000000e+00 6.999826066001e-15 0.000000000000e+00 5.000000000000e-15 -1.200000000000e-14 2.500000000000e+00 7.499643267517e-15 0.000000000000e+00 5.000000000000e-15 -1.250000000000e-14 3.000000000000e+00 8.000110990336e-15 0.000000000000e+00 5.000000000000e-15 -1.300000000000e-14 3.500000000000e+00 8.499711351417e-15 0.000000000000e+00 5.000000000000e-15 -1.350000000000e-14 4.000000000000e+00 8.999745393368e-15 0.000000000000e+00 5.000000000000e-15 -1.400000000000e-14 4.500000000000e+00 9.499779435318e-15 0.000000000000e+00 5.000000000000e-15 -1.450000000000e-14 5.000000000000e+00 9.999813477268e-15 0.000000000000e+00 5.000000000000e-15 -1.500000000000e-14 5.500000000000e+00 1.049984751922e-14 0.000000000000e+00 5.000000000000e-15 -1.550000000000e-14 6.000000000000e+00 1.099988156117e-14 0.000000000000e+00 5.000000000000e-15 -1.600000000000e-14 6.500000000000e+00 1.149948192225e-14 0.000000000000e+00 5.000000000000e-15 -1.650000000000e-14 7.000000000000e+00 1.199951596420e-14 0.000000000000e+00 5.000000000000e-15 -1.700000000000e-14 7.500000000000e+00 1.250041736789e-14 0.000000000000e+00 5.000000000000e-15 -1.750000000000e-14 8.000000000000e+00 1.300001772897e-14 0.000000000000e+00 5.000000000000e-15 -1.800000000000e-14 8.500000000000e+00 1.350005177092e-14 0.000000000000e+00 5.000000000000e-15 -1.850000000000e-14 9.000000000000e+00 1.400008581287e-14 0.000000000000e+00 5.000000000000e-15 -1.900000000000e-14 9.500000000000e+00 1.450055353569e-14 0.000000000000e+00 5.000000000000e-15 -1.950000000000e-14 1.000000000000e+01 1.500015389677e-14 0.000000000000e+00 5.000000000000e-15 -2.000000000000e-14 1.050000000000e+01 1.550062161959e-14 0.000000000000e+00 5.000000000000e-15 -2.050000000000e-14 1.100000000000e+01 1.600022198067e-14 0.000000000000e+00 5.000000000000e-15 -2.100000000000e-14 1.150000000000e+01 1.649982234175e-14 0.000000000000e+00 5.000000000000e-15 -2.150000000000e-14 1.200000000000e+01 1.700115742631e-14 0.000000000000e+00 5.000000000000e-15 -2.200000000000e-14 1.250000000000e+01 1.750075778739e-14 0.000000000000e+00 5.000000000000e-15 -2.250000000000e-14 1.300000000000e+01 1.800035814847e-14 0.000000000000e+00 5.000000000000e-15 -2.300000000000e-14 1.350000000000e+01 1.849995850955e-14 0.000000000000e+00 5.000000000000e-15 -2.350000000000e-14 1.400000000000e+01 1.900042623237e-14 0.000000000000e+00 5.000000000000e-15 -2.400000000000e-14 1.450000000000e+01 1.950089395519e-14 0.000000000000e+00 5.000000000000e-15 -2.450000000000e-14 1.500000000000e+01 2.000049431627e-14 0.000000000000e+00 5.000000000000e-15 -2.500000000000e-14 1.550000000000e+01 2.050009467736e-14 0.000000000000e+00 5.000000000000e-15 -2.550000000000e-14 1.600000000000e+01 2.100056240018e-14 0.000000000000e+00 5.000000000000e-15 -2.600000000000e-14 1.650000000000e+01 2.150016276126e-14 0.000000000000e+00 5.000000000000e-15 -2.650000000000e-14 1.700000000000e+01 2.200063048408e-14 0.000000000000e+00 5.000000000000e-15 -2.700000000000e-14 1.750000000000e+01 2.250109820690e-14 0.000000000000e+00 5.000000000000e-15 -2.750000000000e-14 1.800000000000e+01 2.300069856798e-14 0.000000000000e+00 5.000000000000e-15 -2.800000000000e-14 1.850000000000e+01 2.350029892906e-14 0.000000000000e+00 5.000000000000e-15 -2.850000000000e-14 1.900000000000e+01 2.400163401362e-14 0.000000000000e+00 5.000000000000e-15 -2.900000000000e-14 1.950000000000e+01 2.450036701296e-14 0.000000000000e+00 5.000000000000e-15 -2.950000000000e-14 2.000000000000e+01 2.500083473578e-14 0.000000000000e+00 5.000000000000e-15 -3.000000000000e-14 1.000000000000e+00 1.766603497138e-04 0.000000000000e+00 -1.766603497028e-04 -1.100000000000e-14 1.500000000000e+00 1.991036774631e-04 0.000000000000e+00 -1.991036774516e-04 -1.150000000000e-14 2.000000000000e+00 2.029369249688e-04 0.000000000000e+00 -2.029369249568e-04 -1.200000000000e-14 2.500000000000e+00 2.039925671509e-04 0.000000000000e+00 -2.039925671384e-04 -1.250000000000e-14 3.000000000000e+00 2.048964056209e-04 0.000000000000e+00 -2.048964056079e-04 -1.300000000000e-14 3.500000000000e+00 2.057294459243e-04 0.000000000000e+00 -2.057294459108e-04 -1.350000000000e-14 4.000000000000e+00 2.065165011759e-04 0.000000000000e+00 -2.065165011619e-04 -1.400000000000e-14 4.500000000000e+00 2.072713101549e-04 0.000000000000e+00 -2.072713101404e-04 -1.450000000000e-14 5.000000000000e+00 2.080021784376e-04 0.000000000000e+00 -2.080021784226e-04 -1.500000000000e-14 5.500000000000e+00 2.087144762165e-04 0.000000000000e+00 -2.087144762010e-04 -1.550000000000e-14 6.000000000000e+00 2.094118772484e-04 0.000000000000e+00 -2.094118772324e-04 -1.600000000000e-14 6.500000000000e+00 2.100970141422e-04 0.000000000000e+00 -2.100970141257e-04 -1.650000000000e-14 7.000000000000e+00 2.107718462792e-04 0.000000000000e+00 -2.107718462622e-04 -1.700000000000e-14 7.500000000000e+00 2.114378778894e-04 0.000000000000e+00 -2.114378778719e-04 -1.750000000000e-14 8.000000000000e+00 2.120962936477e-04 0.000000000000e+00 -2.120962936297e-04 -1.800000000000e-14 8.500000000000e+00 2.127480465814e-04 0.000000000000e+00 -2.127480465629e-04 -1.850000000000e-14 9.000000000000e+00 2.133939171649e-04 0.000000000000e+00 -2.133939171459e-04 -1.900000000000e-14 9.500000000000e+00 2.140345543151e-04 0.000000000000e+00 -2.140345542956e-04 -1.950000000000e-14 1.000000000000e+01 2.146705046194e-04 0.000000000000e+00 -2.146705045994e-04 -2.000000000000e-14 1.050000000000e+01 2.153022336783e-04 0.000000000000e+00 -2.153022336578e-04 -2.050000000000e-14 1.100000000000e+01 2.159301420193e-04 0.000000000000e+00 -2.159301419983e-04 -2.100000000000e-14 1.150000000000e+01 2.165545771836e-04 0.000000000000e+00 -2.165545771621e-04 -2.150000000000e-14 1.200000000000e+01 2.171758430576e-04 0.000000000000e+00 -2.171758430356e-04 -2.200000000000e-14 1.250000000000e+01 2.177942071820e-04 0.000000000000e+00 -2.177942071595e-04 -2.250000000000e-14 1.300000000000e+01 2.184099065529e-04 0.000000000000e+00 -2.184099065299e-04 -2.300000000000e-14 1.350000000000e+01 2.190231522782e-04 0.000000000000e+00 -2.190231522547e-04 -2.350000000000e-14 1.400000000000e+01 2.196341333570e-04 0.000000000000e+00 -2.196341333330e-04 -2.400000000000e-14 1.450000000000e+01 2.202430197753e-04 0.000000000000e+00 -2.202430197508e-04 -2.450000000000e-14 1.500000000000e+01 2.208499650635e-04 0.000000000000e+00 -2.208499650385e-04 -2.500000000000e-14 1.550000000000e+01 2.214551084283e-04 0.000000000000e+00 -2.214551084028e-04 -2.550000000000e-14 1.600000000000e+01 2.220585765399e-04 0.000000000000e+00 -2.220585765139e-04 -2.600000000000e-14 1.650000000000e+01 2.226604850431e-04 0.000000000000e+00 -2.226604850166e-04 -2.650000000000e-14 1.700000000000e+01 2.232609398412e-04 0.000000000000e+00 -2.232609398142e-04 -2.700000000000e-14 1.750000000000e+01 2.238600381937e-04 0.000000000000e+00 -2.238600381662e-04 -2.750000000000e-14 1.800000000000e+01 2.244578696603e-04 0.000000000000e+00 -2.244578696323e-04 -2.800000000000e-14 1.850000000000e+01 2.250545169155e-04 0.000000000000e+00 -2.250545168870e-04 -2.850000000000e-14 1.900000000000e+01 2.256500564569e-04 0.000000000000e+00 -2.256500564279e-04 -2.900000000000e-14 1.950000000000e+01 2.262445592215e-04 0.000000000000e+00 -2.262445591920e-04 -2.950000000000e-14 2.000000000000e+01 2.268380911258e-04 0.000000000000e+00 -2.268380910958e-04 -3.000000000000e-14 1.000000000000e+00 5.618403894216e-04 0.000000000000e+00 -5.618403894106e-04 -1.100000000000e-14 1.500000000000e+00 8.000439017251e-04 0.000000000000e+00 -8.000439017136e-04 -1.150000000000e-14 2.000000000000e+00 1.013294249525e-03 0.000000000000e+00 -1.013294249513e-03 -1.200000000000e-14 2.500000000000e+00 1.204052700209e-03 0.000000000000e+00 -1.204052700196e-03 -1.250000000000e-14 3.000000000000e+00 1.374546045946e-03 0.000000000000e+00 -1.374546045933e-03 -1.300000000000e-14 3.500000000000e+00 1.526763231359e-03 0.000000000000e+00 -1.526763231346e-03 -1.350000000000e-14 4.000000000000e+00 1.662474793688e-03 0.000000000000e+00 -1.662474793674e-03 -1.400000000000e-14 4.500000000000e+00 1.783260681284e-03 0.000000000000e+00 -1.783260681270e-03 -1.450000000000e-14 5.000000000000e+00 1.890539223326e-03 0.000000000000e+00 -1.890539223311e-03 -1.500000000000e-14 5.500000000000e+00 1.985593672184e-03 0.000000000000e+00 -1.985593672168e-03 -1.550000000000e-14 6.000000000000e+00 2.069594656634e-03 0.000000000000e+00 -2.069594656618e-03 -1.600000000000e-14 6.500000000000e+00 2.143617960324e-03 0.000000000000e+00 -2.143617960307e-03 -1.650000000000e-14 7.000000000000e+00 2.208657701590e-03 0.000000000000e+00 -2.208657701573e-03 -1.700000000000e-14 7.500000000000e+00 2.265635424804e-03 0.000000000000e+00 -2.265635424787e-03 -1.750000000000e-14 8.000000000000e+00 2.315405887043e-03 0.000000000000e+00 -2.315405887025e-03 -1.800000000000e-14 8.500000000000e+00 2.358760454883e-03 0.000000000000e+00 -2.358760454864e-03 -1.850000000000e-14 9.000000000000e+00 2.396429023701e-03 0.000000000000e+00 -2.396429023682e-03 -1.900000000000e-14 9.500000000000e+00 2.429081257788e-03 0.000000000000e+00 -2.429081257769e-03 -1.950000000000e-14 1.000000000000e+01 2.457327761566e-03 0.000000000000e+00 -2.457327761546e-03 -2.000000000000e-14 1.050000000000e+01 2.481721576685e-03 0.000000000000e+00 -2.481721576665e-03 -2.050000000000e-14 1.100000000000e+01 2.502760199555e-03 0.000000000000e+00 -2.502760199534e-03 -2.100000000000e-14 1.150000000000e+01 2.520888157825e-03 0.000000000000e+00 -2.520888157803e-03 -2.150000000000e-14 1.200000000000e+01 2.536500083008e-03 0.000000000000e+00 -2.536500082986e-03 -2.200000000000e-14 1.250000000000e+01 2.549944164544e-03 0.000000000000e+00 -2.549944164521e-03 -2.250000000000e-14 1.300000000000e+01 2.561525854242e-03 0.000000000000e+00 -2.561525854219e-03 -2.300000000000e-14 1.350000000000e+01 2.571511694315e-03 0.000000000000e+00 -2.571511694292e-03 -2.350000000000e-14 1.400000000000e+01 2.580133155996e-03 0.000000000000e+00 -2.580133155972e-03 -2.400000000000e-14 1.450000000000e+01 2.587590393157e-03 0.000000000000e+00 -2.587590393133e-03 -2.450000000000e-14 1.500000000000e+01 2.594055856171e-03 0.000000000000e+00 -2.594055856146e-03 -2.500000000000e-14 1.550000000000e+01 2.599677567006e-03 0.000000000000e+00 -2.599677566980e-03 -2.550000000000e-14 1.600000000000e+01 2.604582390713e-03 0.000000000000e+00 -2.604582390687e-03 -2.600000000000e-14 1.650000000000e+01 2.608878748333e-03 0.000000000000e+00 -2.608878748306e-03 -2.650000000000e-14 1.700000000000e+01 2.612659193834e-03 0.000000000000e+00 -2.612659193807e-03 -2.700000000000e-14 1.750000000000e+01 2.616002675064e-03 0.000000000000e+00 -2.616002675037e-03 -2.750000000000e-14 1.800000000000e+01 2.618976527709e-03 0.000000000000e+00 -2.618976527681e-03 -2.800000000000e-14 1.850000000000e+01 2.621638223945e-03 0.000000000000e+00 -2.621638223917e-03 -2.850000000000e-14 1.900000000000e+01 2.624036901501e-03 0.000000000000e+00 -2.624036901472e-03 -2.900000000000e-14 1.950000000000e+01 2.626214700478e-03 0.000000000000e+00 -2.626214700448e-03 -2.950000000000e-14 2.000000000000e+01 2.628207933846e-03 0.000000000000e+00 -2.628207933816e-03 -3.000000000000e-14 ngspice-26/tests/hisimhv1/nmos/parameters/0000755000265600020320000000000012264261473020242 5ustar andreasadminngspice-26/tests/hisimhv1/nmos/parameters/nmosParameters0000644000265600020320000001171512264261473023172 0ustar andreasadmin+ CORSRD = ( 3 ) + CORG = ( 0 ) + COIPRV = ( 1 ) + COPPRV = ( 1 ) + COADOV = ( 1 ) + COISUB = ( 0 ) + COIIGS = ( 0 ) + COGIDL = ( 0 ) + COOVLP = ( 1 ) + COOVLPS = ( 0 ) + COFLICK = ( 0 ) + COISTI = ( 0 ) + CONQS = ( 0 ) + COTHRML = ( 0 ) + COIGN = ( 0 ) + CODFM = ( 0 ) + COQOVSM = ( 1 ) + CORBNET = ( 0 ) + COSELFHEAT = ( 0 ) + COSUBNODE = ( 0 ) + COSYM = ( 0 ) + COTEMP = ( 0 ) + COLDRIFT = ( 0 ) + VERSION = ( 1.23 ) + VMAX = ( 1E+07 ) + VMAXT1 = ( 0 ) + VMAXT2 = ( 0 ) + BGTMP1 = ( 9.025E-05 ) + BGTMP2 = ( 1E-07 ) + EG0 = ( 1.1785 ) + TOX = ( 3E-08 ) + XLD = ( 3E-08 ) + RDOV11 = ( 0 ) + RDOV12 = ( 1 ) + RDOV13 = ( 1 ) + RDSLP1 = ( 1 ) + RDICT1 = ( 1 ) + RDSLP2 = ( 1 ) + RDICT2 = ( 0 ) + SUBLD1 = ( 0 ) + SUBLD2 = ( 0 ) + DDLTMAX = ( 1 ) + DDLTSLP = ( 0 ) + DDLTICT = ( 10 ) + VFBOVER = ( -0.5 ) + NOVER = ( 3E+16 ) + NOVERS = ( 0 ) + XWD = ( 0 ) + XL = ( 0 ) + XW = ( 0 ) + SAREF = ( 1E-06 ) + SBREF = ( 1E-06 ) + LL = ( 0 ) + LLD = ( 0 ) + LLN = ( 0 ) + WL = ( 0 ) + WL1 = ( 0 ) + WL1P = ( 1 ) + WL2 = ( 0 ) + WL2P = ( 1 ) + WLD = ( 0 ) + WLN = ( 0 ) + RSH = ( 0 ) + RSHG = ( 0 ) + XQY = ( 0 ) + XQY1 = ( 0 ) + XQY2 = ( 0 ) + RS = ( 0 ) + RD = ( 0.005 ) + VFBC = ( -1 ) + VBI = ( 1.1 ) + NSUBC = ( 1E+17 ) + PARL2 = ( 1E-08 ) + LP = ( 0 ) + NSUBP = ( 1E+17 ) + NSUBP0 = ( 0 ) + NSUBWP = ( 1 ) + SCP1 = ( 1 ) + SCP2 = ( 0.1 ) + SCP3 = ( 0 ) + SC1 = ( 1 ) + SC2 = ( 1 ) + SC3 = ( 0 ) + SC4 = ( 0 ) + PGD1 = ( 0 ) + PGD2 = ( 1 ) + PGD3 = ( 0.8 ) + PGD4 = ( 0 ) + NDEP = ( 1 ) + NDEPL = ( 0 ) + NDEPLP = ( 1 ) + NINV = ( 0.5 ) + MUECB0 = ( 1000 ) + MUECB1 = ( 100 ) + MUEPH0 = ( 0.3 ) + MUEPH1 = ( 25000 ) + MUEPHW = ( 0 ) + MUEPWP = ( 1 ) + MUEPHL = ( 0 ) + MUEPLP = ( 1 ) + MUEPHS = ( 0 ) + MUEPSP = ( 1 ) + VTMP = ( 0 ) + WVTH0 = ( 0 ) + MUESR0 = ( 2 ) + MUESR1 = ( 1E+16 ) + MUESRL = ( 0 ) + MUESRW = ( 0 ) + MUESWP = ( 1 ) + MUESLP = ( 1 ) + MUETMP = ( 1.7 ) + BB = ( 2 ) + SUB1 = ( 0.05 ) + SUB2 = ( 100 ) + SVGS = ( 0.8 ) + SVBS = ( 0.5 ) + SVBSL = ( 0 ) + SVDS = ( 0.8 ) + SLG = ( 3E-08 ) + SUB1L = ( 0.0025 ) + SUB2L = ( 2E-06 ) + FN1 = ( 50 ) + FN2 = ( 0.00017 ) + FN3 = ( 0 ) + FVBS = ( 0.012 ) + SVGSL = ( 0 ) + SVGSLP = ( 1 ) + SVGSWP = ( 1 ) + SVGSW = ( 0 ) + SVBSLP = ( 1 ) + SLGL = ( 0 ) + SLGLP = ( 1 ) + SUB1LP = ( 1 ) + NSTI = ( 1E+17 ) + WSTI = ( 0 ) + WSTIL = ( 0 ) + WSTILP = ( 1 ) + WSTIW = ( 0 ) + WSTIWP = ( 1 ) + SCSTI1 = ( 0 ) + SCSTI2 = ( 0 ) + VTHSTI = ( 0 ) + VDSTI = ( 0 ) + MUESTI1 = ( 0 ) + MUESTI2 = ( 0 ) + MUESTI3 = ( 1 ) + NSUBPSTI1 = ( 0 ) + NSUBPSTI2 = ( 0 ) + NSUBPSTI3 = ( 1 ) + LPEXT = ( 1E-50 ) + NPEXT = ( 1E+17 ) + SCP21 = ( 0 ) + SCP22 = ( 0 ) + BS1 = ( 0 ) + BS2 = ( 0.9 ) + TPOLY = ( 2E-07 ) + CGBO = ( 0 ) + JS0 = ( 5E-07 ) + JS0SW = ( 0 ) + NJ = ( 1 ) + NJSW = ( 1 ) + XTI = ( 2 ) + CJ = ( 0.0005 ) + CJSW = ( 5E-10 ) + CJSWG = ( 5E-10 ) + MJ = ( 0.5 ) + MJSW = ( 0.33 ) + MJSWG = ( 0.33 ) + PB = ( 1 ) + PBSW = ( 1 ) + PBSWG = ( 1 ) + XTI2 = ( 0 ) + CISB = ( 0 ) + CVB = ( 0 ) + CTEMP = ( 0 ) + CISBK = ( 0 ) + CVBK = ( 0 ) + DIVX = ( 0 ) + CLM1 = ( 0.05 ) + CLM2 = ( 2 ) + CLM3 = ( 1 ) + CLM5 = ( 1 ) + CLM6 = ( 0 ) + VOVER = ( 0.3 ) + VOVERP = ( 0.3 ) + WFC = ( 0 ) + NSUBCW = ( 0 ) + NSUBCWP = ( 1 ) + QME1 = ( 0 ) + QME2 = ( 1 ) + QME3 = ( 0 ) + VOVERS = ( 0 ) + VOVERSP = ( 0 ) + GIDL1 = ( 2 ) + GIDL2 = ( 3E+07 ) + GIDL3 = ( 0.9 ) + GIDL4 = ( 0.9 ) + GIDL5 = ( 0.2 ) + GLEAK1 = ( 50 ) + GLEAK2 = ( 1E+07 ) + GLEAK3 = ( 0.06 ) + GLEAK4 = ( 4 ) + GLEAK5 = ( 7500 ) + GLEAK6 = ( 0.25 ) + GLEAK7 = ( 1E-06 ) + GLPART1 = ( 0.5 ) + GLKSD1 = ( 1E-15 ) + GLKSD2 = ( 5E+06 ) + GLKSD3 = ( -5E+06 ) + GLKB1 = ( 5E-16 ) + GLKB2 = ( 1 ) + GLKB3 = ( 0 ) + EGIG = ( 0 ) + IGTEMP2 = ( 0 ) + IGTEMP3 = ( 0 ) + VZADD0 = ( 0.01 ) + PZADD0 = ( 0.005 ) + NFTRP = ( 1E+10 ) + NFALP = ( 1E-19 ) + CIT = ( 0 ) + FALPH = ( 1 ) + KAPPA = ( 3.9 ) + PTHROU = ( 0 ) + VDIFFJ = ( 0.0006 ) + DLY1 = ( 1E-10 ) + DLY2 = ( 0.7 ) + DLY3 = ( 8E-07 ) + TNOM = ( 27 ) + OVSLP = ( 2E-08 ) + OVMAG = ( 500 ) + GBMIN = ( 1E-12 ) + RBPB = ( 50 ) + RBDB = ( 50 ) + RBSB = ( 50 ) + IBPC1 = ( 0 ) + IBPC2 = ( 0 ) + MPHDFM = ( -0.3 ) + RDVG11 = ( 0 ) + RDVG12 = ( 100 ) + RTH0 = ( 0.1 ) + CTH0 = ( 1E-07 ) + POWRAT = ( 1 ) + TCJBD = ( 0 ) + TCJBS = ( 0 ) + TCJBDSW = ( 0 ) + TCJBSSW = ( 0 ) + TCJBDSWG = ( 0 ) + TCJBSSWG = ( 0 ) + DLYOV = ( 0 ) + QDFTVD = ( 1 ) + XLDLD = ( 1E-06 ) + RDVD = ( 0.07 ) + QOVSM = ( 0.2 ) + RD20 = ( 0 ) + RD21 = ( 1 ) + RD22 = ( 0 ) + RD22D = ( 0 ) + RD23 = ( 0.005 ) + RD24 = ( 0 ) + RD25 = ( 0 ) + RDVDL = ( 0 ) + RDVDLP = ( 1 ) + RDVDS = ( 0 ) + RDVDSP = ( 1 ) + RD23L = ( 0 ) + RD23LP = ( 1 ) + RD23S = ( 0 ) + RD23SP = ( 1 ) + RDS = ( 0 ) + RDSP = ( 1 ) + RDTEMP1 = ( 0 ) + RDTEMP2 = ( 0 ) + RDVDTEMP1 = ( 0 ) + RDVDTEMP2 = ( 0 ) + RTH0W = ( 0 ) + RTH0WP = ( 1 ) + CVDSOVER = ( 0 ) + NINVD = ( 0 ) + NINVDW = ( 0 ) + NINVDWP = ( 1 ) + NINVDT1 = ( 0 ) + NINVDT2 = ( 0 ) + VBSMIN = ( -10.5 ) + RDVB = ( 0 ) + RTH0NF = ( 0 ) + RTHTEMP1 = ( 0 ) + RTHTEMP2 = ( 0 ) + PRATTEMP1 = ( 0 ) + PRATTEMP2 = ( 0 ) + RDVSUB = ( 1 ) + RDVDSUB = ( 0.3 ) + DDRIFT = ( 1E-06 ) + VBISUB = ( 0.7 ) + NSUBSUB = ( 1E+15 ) + SHEMAX = ( 500 ) ngspice-26/tests/hisimhv1/nmos/qaSpec0000644000265600020320000001033612264261473017241 0ustar andreasadmin // // Test specification for HiSIM_HV (version 1.2.3) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments nmos leveL=62 version=1.23 pTypeSelectionArguments pmos leveL=62 version=1.23 `endif `ifdef hspice nTypeSelectionArguments hisimhv_n5_va TYPE=1 pTypeSelectionArguments hisimhv_n5_va TYPE=-1 `endif `ifdef smartspice nTypeSelectionArguments hisimhv_n5_va TYPE=1 pTypeSelectionArguments hisimhv_n5_va TYPE=-1 `endif `ifdef spectre nTypeSelectionArguments hisimhv_n5_va TYPE=1 pTypeSelectionArguments hisimhv_n5_va TYPE=-1 `endif // // General test-independent information // keyLetter m linearScale w l ps pd areaScale as ad temperature 27 -50 150 //checkPolarity yes //symmetricpins d s scaleParameters m // // Specific tests for Vsub Node // pins d g s b sub test dcVsub_Id1_vb0 biases V(s)=0 V(g)=10 V(b)=0 biasList V(sub)=-0.6,-5,-10 biasSweep V(d)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb1 biases V(s)=0 V(g)=10 V(b)=-5.0 biasList V(sub)=-0.6,-5,-10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb2 biases V(s)=0 V(g)=10 V(b)=-10.0 biasList V(sub)=-0.6,-5,-10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Id1_vb0_jd biases V(s)=0 V(g)=10 V(b)=0 biasList V(sub)=-0.6,-5,-10 biasSweep V(d)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb0 biases V(s)=0 V(d)=10 V(b)=0 biasList V(sub)=-0.6,-5,-10 biasSweep V(g)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb1 biases V(s)=0 V(d)=10 V(b)=-5.0 biasList V(sub)=-0.6,-5,-10 biasSweep V(g)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb2 biases V(s)=0 V(d)=10 V(b)=-10.0 biasList V(sub)=-0.6,-5,-10 biasSweep V(g)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 test dcVsub_Ig1_vb0_jd biases V(s)=0 V(d)=10 V(b)=0 biasList V(sub)=-0.6,-5,-10 biasSweep V(g)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/nmosParameters modelParameters COSUBNODE=1 ngspice-26/tests/hisimhv1/nmos/run0000644000265600020320000000016612264261473016631 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean cp qaSpec.basic qaSpec ../../bin/run_cmc_check ngspice | tee cmcqa_basic.log ngspice-26/tests/hisimhv1/nmos/qaSpec.basic0000644000265600020320000003063112264261473020321 0ustar andreasadmin // // Test specification for HiSIM_HV (version 1.2.3) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef ngspice nTypeSelectionArguments nmos level=62 version=1.23 pTypeSelectionArguments pmos level=62 version=1.23 `endif `ifdef hspice nTypeSelectionArguments hisimhv_va TYPE=1 pTypeSelectionArguments hisimhv_va TYPE=-1 `endif `ifdef smartspice nTypeSelectionArguments hisimhv_va TYPE=1 pTypeSelectionArguments hisimhv_va TYPE=-1 `endif `ifdef spectre nTypeSelectionArguments hisimhv_va TYPE=1 pTypeSelectionArguments hisimhv_va TYPE=-1 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 //checkPolarity yes //symmetricpins d s scaleParameters m // // Specific tests // test dcSw_Id1_vb0 biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Id1_vb1 biases V(s)=0 V(b)=-5 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Id1_vb2 biases V(s)=0 V(b)=-10 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Id1_vb0_jd biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=5.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/nmosParameters test dcSw_Ig1_vb0 biases V(s)=0 V(b)=0 biasList V(d)=2,5,10 biasSweep V(g)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Ig1_vb1 biases V(s)=0 V(b)=-5 biasList V(d)=2,5,10 biasSweep V(g)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Ig1_vb2 biases V(s)=0 V(b)=-10 biasList V(d)=2,5,10 biasSweep V(g)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test dcSw_Ig1_vb0_jd biases V(s)=0 V(b)=0 biasList V(d)=2,5,10 biasSweep V(g)=1,20,0.2 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2.0e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/nmosParameters test dcSw_ld2 biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=5e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters test dcSw_lg2 biases V(s)=0 V(b)=0 biasList V(d)=2,5,10 biasSweep V(g)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5.0e-6 L=5e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters test dcSw_cosym biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=0.1,30.1,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSYM=1 RD=0.1 test dcSw_rs2m biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10e-6 L=20e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters COSYM=1 RS=2e-3 test dcSw_corsrd0 biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters CORSRD=0 test dcSw_corsrd1 biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 AD=20e-12 AS=20e-12 PD=12e-6 PS=12e-6 modelParameters parameters/nmosParameters modelParameters CORSRD=1 test dcSw_corsrd2 biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters CORSRD=2 test dcSw_isub biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=5e-6 L=50e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters COISUB=1 RD=0.1 test dcSw_gidl biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) I(g) I(s) I(b) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters COGIDL=1 test dcSw_she biases V(s)=0 V(b)=0 biasList V(g)=2,5,10 biasSweep V(d)=1,20,0.5 outputs I(d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSELFHEAT=1 POWRAT=0.5 test acVd temperature 27 150 biases V(s)=0 V(b)=0 V(g)=5 biasSweep V(d)=1,20,1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters test acVd_corsrd1 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=10 biasSweep V(d)=1,20,1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=5e-6 modelParameters parameters/nmosParameters modelParameters CORSRD=1 test acVd_corsrd2 temperature 27 150 biases V(s)=0 V(b)=0 V(g)=20 biasSweep V(d)=1,20,1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters CORSRD=2 test acVd_cosym temperature 27 150 biases V(s)=0 V(b)=0 V(g)=5 biasSweep V(d)=1,20,1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COSYM=1 RD=0.1 test acVd_cvdsover temperature 27 150 biases V(s)=0 V(b)=0 V(g)=10 biasSweep V(d)=1,20,1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters CVDSOVER=0.2 test acFreq temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters test acFreq_cosym temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters COSYM=1 RD=0.1 test acFreq_coovlp temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=10 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COOVLP=0 test acFreq_nover temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=5.0e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters NOVER=0 test acFreq_coadov temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=2e-6 modelParameters parameters/nmosParameters modelParameters COADOV=0 test acFreq_conqs temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10.0e-6 L=5e-6 AD=25e-12 AS=25e-12 PD=10e-6 PS=10e-6 modelParameters parameters/nmosParameters modelParameters CONQS=1 test acFreq_coiigs temperature 27 biases V(s)=0 V(b)=0 V(d)=10 V(g)=5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/nmosParameters modelParameters COIIGS=1 test noise1 temperature 27 biases V(s)=0 V(b)=0 V(d)=20 biasList V(g)=0.6,2.0,5 freq dec 10 1e3 1e8 outputs N(d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/nmosParameters modelParameters COTHRML=1 COIGN=1 test noise2 temperature 27 biases V(s)=0 V(b)=0 V(d)=20 biasList V(g)=0.6,2.0,5 freq dec 10 1e3 1e8 outputs N(d) instanceParameters W=100.0e-6 L=8e-6 modelParameters parameters/nmosParameters modelParameters COFLICK=1 FALPH=1.2 ngspice-26/tests/hisimhv1/Makefile.in0000644000265600020320000003370312264261541017172 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/hisimhv1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = nmos/qaSpec.basic pmos/qaSpec.basic TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/hisimhv1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/hisimhv1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: rm -rf nmos/results pmos/results ngspiceCkt # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/mos6/0000755000265600020320000000000012264261714014255 5ustar andreasadminngspice-26/tests/mos6/simpleinv.out0000644000265600020320000006224712264261473017031 0ustar andreasadmin Circuit: *** NDINV * 4 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 100 5 1 0 11 -6.97413e-17 12 -6.97413e-17 vin#branch 0 vdd#branch 0 *** NDINV * 4 Transient Analysis Sat Aug 27 16:32:01 2005 -------------------------------------------------------------------------------- Index time v(1) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 1 5.000000e-12 1.250000e-02 2 1.000000e-11 2.500000e-02 3 2.000000e-11 5.000000e-02 4 4.000000e-11 1.000000e-01 5 8.000000e-11 2.000000e-01 6 1.600000e-10 4.000000e-01 7 3.200000e-10 8.000000e-01 8 6.400000e-10 1.600000e+00 9 1.140000e-09 2.850000e+00 10 1.640000e-09 4.100000e+00 11 2.000000e-09 5.000000e+00 12 2.050000e-09 5.000000e+00 13 2.150000e-09 5.000000e+00 14 2.350000e-09 5.000000e+00 15 2.750000e-09 5.000000e+00 16 3.250000e-09 5.000000e+00 17 3.750000e-09 5.000000e+00 18 4.250000e-09 5.000000e+00 19 4.750000e-09 5.000000e+00 20 5.250000e-09 5.000000e+00 21 5.750000e-09 5.000000e+00 22 6.250000e-09 5.000000e+00 23 6.750000e-09 5.000000e+00 24 7.250000e-09 5.000000e+00 25 7.750000e-09 5.000000e+00 26 8.250000e-09 5.000000e+00 27 8.750000e-09 5.000000e+00 28 9.250000e-09 5.000000e+00 29 9.750000e-09 5.000000e+00 30 1.025000e-08 5.000000e+00 31 1.075000e-08 5.000000e+00 32 1.125000e-08 5.000000e+00 33 1.175000e-08 5.000000e+00 34 1.225000e-08 5.000000e+00 35 1.275000e-08 5.000000e+00 36 1.325000e-08 5.000000e+00 37 1.375000e-08 5.000000e+00 38 1.425000e-08 5.000000e+00 39 1.475000e-08 5.000000e+00 40 1.525000e-08 5.000000e+00 41 1.575000e-08 5.000000e+00 42 1.625000e-08 5.000000e+00 43 1.675000e-08 5.000000e+00 44 1.725000e-08 5.000000e+00 45 1.775000e-08 5.000000e+00 46 1.825000e-08 5.000000e+00 47 1.875000e-08 5.000000e+00 48 1.925000e-08 5.000000e+00 49 1.975000e-08 5.000000e+00 50 2.025000e-08 5.000000e+00 51 2.075000e-08 5.000000e+00 52 2.125000e-08 5.000000e+00 53 2.175000e-08 5.000000e+00 54 2.225000e-08 5.000000e+00 Index time v(1) -------------------------------------------------------------------------------- 55 2.275000e-08 5.000000e+00 56 2.325000e-08 5.000000e+00 57 2.375000e-08 5.000000e+00 58 2.425000e-08 5.000000e+00 59 2.475000e-08 5.000000e+00 60 2.525000e-08 5.000000e+00 61 2.575000e-08 5.000000e+00 62 2.625000e-08 5.000000e+00 63 2.675000e-08 5.000000e+00 64 2.725000e-08 5.000000e+00 65 2.775000e-08 5.000000e+00 66 2.825000e-08 5.000000e+00 67 2.875000e-08 5.000000e+00 68 2.925000e-08 5.000000e+00 69 2.975000e-08 5.000000e+00 70 3.025000e-08 5.000000e+00 71 3.075000e-08 5.000000e+00 72 3.125000e-08 5.000000e+00 73 3.175000e-08 5.000000e+00 74 3.225000e-08 5.000000e+00 75 3.275000e-08 5.000000e+00 76 3.325000e-08 5.000000e+00 77 3.375000e-08 5.000000e+00 78 3.425000e-08 5.000000e+00 79 3.475000e-08 5.000000e+00 80 3.525000e-08 5.000000e+00 81 3.575000e-08 5.000000e+00 82 3.625000e-08 5.000000e+00 83 3.675000e-08 5.000000e+00 84 3.725000e-08 5.000000e+00 85 3.775000e-08 5.000000e+00 86 3.825000e-08 5.000000e+00 87 3.875000e-08 5.000000e+00 88 3.925000e-08 5.000000e+00 89 3.975000e-08 5.000000e+00 90 4.025000e-08 5.000000e+00 91 4.075000e-08 5.000000e+00 92 4.125000e-08 5.000000e+00 93 4.175000e-08 5.000000e+00 94 4.225000e-08 5.000000e+00 95 4.275000e-08 5.000000e+00 96 4.325000e-08 5.000000e+00 97 4.375000e-08 5.000000e+00 98 4.425000e-08 5.000000e+00 99 4.475000e-08 5.000000e+00 100 4.525000e-08 5.000000e+00 101 4.575000e-08 5.000000e+00 102 4.625000e-08 5.000000e+00 103 4.675000e-08 5.000000e+00 104 4.725000e-08 5.000000e+00 105 4.775000e-08 5.000000e+00 106 4.825000e-08 5.000000e+00 107 4.875000e-08 5.000000e+00 108 4.925000e-08 5.000000e+00 109 4.975000e-08 5.000000e+00 110 5.025000e-08 5.000000e+00 111 5.075000e-08 5.000000e+00 112 5.125000e-08 5.000000e+00 Index time v(1) -------------------------------------------------------------------------------- 113 5.175000e-08 5.000000e+00 114 5.225000e-08 5.000000e+00 115 5.275000e-08 5.000000e+00 116 5.325000e-08 5.000000e+00 117 5.375000e-08 5.000000e+00 118 5.425000e-08 5.000000e+00 119 5.475000e-08 5.000000e+00 120 5.525000e-08 5.000000e+00 121 5.575000e-08 5.000000e+00 122 5.625000e-08 5.000000e+00 123 5.675000e-08 5.000000e+00 124 5.725000e-08 5.000000e+00 125 5.775000e-08 5.000000e+00 126 5.825000e-08 5.000000e+00 127 5.875000e-08 5.000000e+00 128 5.925000e-08 5.000000e+00 129 5.975000e-08 5.000000e+00 130 6.025000e-08 5.000000e+00 131 6.075000e-08 5.000000e+00 132 6.125000e-08 5.000000e+00 133 6.175000e-08 5.000000e+00 134 6.225000e-08 5.000000e+00 135 6.275000e-08 5.000000e+00 136 6.325000e-08 5.000000e+00 137 6.375000e-08 5.000000e+00 138 6.425000e-08 5.000000e+00 139 6.475000e-08 5.000000e+00 140 6.525000e-08 5.000000e+00 141 6.575000e-08 5.000000e+00 142 6.625000e-08 5.000000e+00 143 6.675000e-08 5.000000e+00 144 6.725000e-08 5.000000e+00 145 6.775000e-08 5.000000e+00 146 6.825000e-08 5.000000e+00 147 6.875000e-08 5.000000e+00 148 6.925000e-08 5.000000e+00 149 6.975000e-08 5.000000e+00 150 7.025000e-08 5.000000e+00 151 7.075000e-08 5.000000e+00 152 7.125000e-08 5.000000e+00 153 7.175000e-08 5.000000e+00 154 7.225000e-08 5.000000e+00 155 7.275000e-08 5.000000e+00 156 7.325000e-08 5.000000e+00 157 7.375000e-08 5.000000e+00 158 7.425000e-08 5.000000e+00 159 7.475000e-08 5.000000e+00 160 7.525000e-08 5.000000e+00 161 7.575000e-08 5.000000e+00 162 7.625000e-08 5.000000e+00 163 7.675000e-08 5.000000e+00 164 7.725000e-08 5.000000e+00 165 7.775000e-08 5.000000e+00 166 7.825000e-08 5.000000e+00 167 7.875000e-08 5.000000e+00 168 7.925000e-08 5.000000e+00 169 7.975000e-08 5.000000e+00 170 8.025000e-08 5.000000e+00 Index time v(1) -------------------------------------------------------------------------------- 171 8.075000e-08 5.000000e+00 172 8.125000e-08 5.000000e+00 173 8.175000e-08 5.000000e+00 174 8.225000e-08 5.000000e+00 175 8.275000e-08 5.000000e+00 176 8.325000e-08 5.000000e+00 177 8.375000e-08 5.000000e+00 178 8.425000e-08 5.000000e+00 179 8.475000e-08 5.000000e+00 180 8.525000e-08 5.000000e+00 181 8.575000e-08 5.000000e+00 182 8.625000e-08 5.000000e+00 183 8.675000e-08 5.000000e+00 184 8.725000e-08 5.000000e+00 185 8.775000e-08 5.000000e+00 186 8.825000e-08 5.000000e+00 187 8.875000e-08 5.000000e+00 188 8.925000e-08 5.000000e+00 189 8.975000e-08 5.000000e+00 190 9.025000e-08 5.000000e+00 191 9.075000e-08 5.000000e+00 192 9.125000e-08 5.000000e+00 193 9.175000e-08 5.000000e+00 194 9.225000e-08 5.000000e+00 195 9.275000e-08 5.000000e+00 196 9.325000e-08 5.000000e+00 197 9.375000e-08 5.000000e+00 198 9.425000e-08 5.000000e+00 199 9.475000e-08 5.000000e+00 200 9.525000e-08 5.000000e+00 201 9.575000e-08 5.000000e+00 202 9.625000e-08 5.000000e+00 203 9.675000e-08 5.000000e+00 204 9.725000e-08 5.000000e+00 205 9.775000e-08 5.000000e+00 206 9.825000e-08 5.000000e+00 207 9.875000e-08 5.000000e+00 208 9.925000e-08 5.000000e+00 209 9.975000e-08 5.000000e+00 210 1.002500e-07 5.000000e+00 211 1.007500e-07 5.000000e+00 212 1.012500e-07 5.000000e+00 213 1.017500e-07 5.000000e+00 214 1.022500e-07 5.000000e+00 215 1.027500e-07 5.000000e+00 216 1.032500e-07 5.000000e+00 217 1.037500e-07 5.000000e+00 218 1.042500e-07 5.000000e+00 219 1.047500e-07 5.000000e+00 220 1.052500e-07 5.000000e+00 221 1.057500e-07 5.000000e+00 222 1.062500e-07 5.000000e+00 223 1.067500e-07 5.000000e+00 224 1.072500e-07 5.000000e+00 225 1.077500e-07 5.000000e+00 226 1.082500e-07 5.000000e+00 227 1.087500e-07 5.000000e+00 228 1.092500e-07 5.000000e+00 Index time v(1) -------------------------------------------------------------------------------- 229 1.097500e-07 5.000000e+00 230 1.102500e-07 5.000000e+00 231 1.107500e-07 5.000000e+00 232 1.112500e-07 5.000000e+00 233 1.117500e-07 5.000000e+00 234 1.122500e-07 5.000000e+00 235 1.127500e-07 5.000000e+00 236 1.132500e-07 5.000000e+00 237 1.137500e-07 5.000000e+00 238 1.142500e-07 5.000000e+00 239 1.147500e-07 5.000000e+00 240 1.152500e-07 5.000000e+00 241 1.157500e-07 5.000000e+00 242 1.162500e-07 5.000000e+00 243 1.167500e-07 5.000000e+00 244 1.172500e-07 5.000000e+00 245 1.177500e-07 5.000000e+00 246 1.182500e-07 5.000000e+00 247 1.187500e-07 5.000000e+00 248 1.192500e-07 5.000000e+00 249 1.197500e-07 5.000000e+00 250 1.202500e-07 5.000000e+00 251 1.207500e-07 5.000000e+00 252 1.212500e-07 5.000000e+00 253 1.217500e-07 5.000000e+00 254 1.222500e-07 5.000000e+00 255 1.227500e-07 5.000000e+00 256 1.232500e-07 5.000000e+00 257 1.237500e-07 5.000000e+00 258 1.242500e-07 5.000000e+00 259 1.247500e-07 5.000000e+00 260 1.252500e-07 5.000000e+00 261 1.257500e-07 5.000000e+00 262 1.262500e-07 5.000000e+00 263 1.267500e-07 5.000000e+00 264 1.272500e-07 5.000000e+00 265 1.277500e-07 5.000000e+00 266 1.282500e-07 5.000000e+00 267 1.287500e-07 5.000000e+00 268 1.292500e-07 5.000000e+00 269 1.297500e-07 5.000000e+00 270 1.302500e-07 5.000000e+00 271 1.307500e-07 5.000000e+00 272 1.312500e-07 5.000000e+00 273 1.317500e-07 5.000000e+00 274 1.322500e-07 5.000000e+00 275 1.327500e-07 5.000000e+00 276 1.332500e-07 5.000000e+00 277 1.337500e-07 5.000000e+00 278 1.342500e-07 5.000000e+00 279 1.347500e-07 5.000000e+00 280 1.352500e-07 5.000000e+00 281 1.357500e-07 5.000000e+00 282 1.362500e-07 5.000000e+00 283 1.367500e-07 5.000000e+00 284 1.372500e-07 5.000000e+00 285 1.377500e-07 5.000000e+00 286 1.382500e-07 5.000000e+00 Index time v(1) -------------------------------------------------------------------------------- 287 1.387500e-07 5.000000e+00 288 1.392500e-07 5.000000e+00 289 1.397500e-07 5.000000e+00 290 1.402500e-07 5.000000e+00 291 1.407500e-07 5.000000e+00 292 1.412500e-07 5.000000e+00 293 1.417500e-07 5.000000e+00 294 1.422500e-07 5.000000e+00 295 1.427500e-07 5.000000e+00 296 1.432500e-07 5.000000e+00 297 1.437500e-07 5.000000e+00 298 1.442500e-07 5.000000e+00 299 1.447500e-07 5.000000e+00 300 1.452500e-07 5.000000e+00 301 1.457500e-07 5.000000e+00 302 1.462500e-07 5.000000e+00 303 1.467500e-07 5.000000e+00 304 1.472500e-07 5.000000e+00 305 1.477500e-07 5.000000e+00 306 1.482500e-07 5.000000e+00 307 1.487500e-07 5.000000e+00 308 1.492500e-07 5.000000e+00 309 1.497500e-07 5.000000e+00 310 1.500000e-07 5.000000e+00 *** NDINV * 4 Transient Analysis Sat Aug 27 16:32:01 2005 -------------------------------------------------------------------------------- Index time v(11) v(12) -------------------------------------------------------------------------------- 0 0.000000e+00 -6.974134e-17 -6.974134e-17 1 5.000000e-12 -2.301190e-19 -2.301190e-19 2 1.000000e-11 5.960820e-16 5.960820e-16 3 2.000000e-11 1.937113e-15 2.235461e-15 4 4.000000e-11 2.980001e-15 3.576901e-15 5 8.000000e-11 3.218990e-15 3.039871e-15 6 1.600000e-10 1.755070e-15 1.821422e-15 7 3.200000e-10 1.612877e-15 1.665574e-15 8 6.400000e-10 8.850733e-16 9.031725e-16 9 1.140000e-09 1.871906e-15 1.853606e-15 10 1.640000e-09 2.328445e-15 2.328445e-15 11 2.000000e-09 3.203473e-15 3.167152e-15 12 2.050000e-09 4.131995e-15 4.064132e-15 13 2.150000e-09 5.215717e-15 5.215717e-15 14 2.350000e-09 4.470615e-15 4.470615e-15 15 2.750000e-09 2.235307e-15 2.235307e-15 16 3.250000e-09 3.259823e-15 3.259823e-15 17 3.750000e-09 4.191201e-15 4.191201e-15 18 4.250000e-09 4.647740e-15 4.666040e-15 19 4.750000e-09 4.191201e-15 4.191201e-15 20 5.250000e-09 4.647740e-15 4.666040e-15 21 5.750000e-09 4.191201e-15 4.191201e-15 22 6.250000e-09 4.647740e-15 4.666040e-15 23 6.750000e-09 4.191201e-15 4.191201e-15 24 7.250000e-09 4.647740e-15 4.666040e-15 25 7.750000e-09 4.191201e-15 4.191201e-15 26 8.250000e-09 4.647740e-15 4.666040e-15 27 8.750000e-09 4.191201e-15 4.191201e-15 28 9.250000e-09 4.647740e-15 4.666040e-15 29 9.750000e-09 4.191201e-15 4.191201e-15 30 1.025000e-08 4.647740e-15 4.666040e-15 31 1.075000e-08 4.191201e-15 4.191201e-15 32 1.125000e-08 4.647740e-15 4.666040e-15 33 1.175000e-08 4.191201e-15 4.191201e-15 34 1.225000e-08 4.647740e-15 4.666040e-15 35 1.275000e-08 4.191201e-15 4.191201e-15 36 1.325000e-08 4.647740e-15 4.666040e-15 37 1.375000e-08 4.191201e-15 4.191201e-15 38 1.425000e-08 4.647740e-15 4.666040e-15 39 1.475000e-08 4.191201e-15 4.191201e-15 40 1.525000e-08 4.647740e-15 4.666040e-15 41 1.575000e-08 4.191201e-15 4.191201e-15 42 1.625000e-08 4.647740e-15 4.666040e-15 43 1.675000e-08 4.191201e-15 4.191201e-15 44 1.725000e-08 4.647740e-15 4.666040e-15 45 1.775000e-08 4.191201e-15 4.191201e-15 46 1.825000e-08 4.647740e-15 4.666040e-15 47 1.875000e-08 4.191201e-15 4.191201e-15 48 1.925000e-08 4.647740e-15 4.666040e-15 49 1.975000e-08 4.191201e-15 4.191201e-15 50 2.025000e-08 4.647740e-15 4.666040e-15 51 2.075000e-08 4.191201e-15 4.191201e-15 52 2.125000e-08 4.647740e-15 4.666040e-15 53 2.175000e-08 4.191201e-15 4.191201e-15 54 2.225000e-08 4.647740e-15 4.666040e-15 Index time v(11) v(12) -------------------------------------------------------------------------------- 55 2.275000e-08 4.191201e-15 4.191201e-15 56 2.325000e-08 4.647740e-15 4.666040e-15 57 2.375000e-08 4.191201e-15 4.191201e-15 58 2.425000e-08 4.647740e-15 4.666040e-15 59 2.475000e-08 4.191201e-15 4.191201e-15 60 2.525000e-08 4.647740e-15 4.666040e-15 61 2.575000e-08 4.191201e-15 4.191201e-15 62 2.625000e-08 4.647740e-15 4.666040e-15 63 2.675000e-08 4.191201e-15 4.191201e-15 64 2.725000e-08 4.647740e-15 4.666040e-15 65 2.775000e-08 4.191201e-15 4.191201e-15 66 2.825000e-08 4.647740e-15 4.666040e-15 67 2.875000e-08 4.191201e-15 4.191201e-15 68 2.925000e-08 4.647740e-15 4.666040e-15 69 2.975000e-08 4.191201e-15 4.191201e-15 70 3.025000e-08 4.647740e-15 4.666040e-15 71 3.075000e-08 4.191201e-15 4.191201e-15 72 3.125000e-08 4.647740e-15 4.666040e-15 73 3.175000e-08 4.191201e-15 4.191201e-15 74 3.225000e-08 4.647740e-15 4.666040e-15 75 3.275000e-08 4.191201e-15 4.191201e-15 76 3.325000e-08 4.647740e-15 4.666040e-15 77 3.375000e-08 4.191201e-15 4.191201e-15 78 3.425000e-08 4.647740e-15 4.666040e-15 79 3.475000e-08 4.191201e-15 4.191201e-15 80 3.525000e-08 4.647740e-15 4.666040e-15 81 3.575000e-08 4.191201e-15 4.191201e-15 82 3.625000e-08 4.647740e-15 4.666040e-15 83 3.675000e-08 4.191201e-15 4.191201e-15 84 3.725000e-08 4.647740e-15 4.666040e-15 85 3.775000e-08 4.191201e-15 4.191201e-15 86 3.825000e-08 4.647740e-15 4.666040e-15 87 3.875000e-08 4.191201e-15 4.191201e-15 88 3.925000e-08 4.647740e-15 4.666040e-15 89 3.975000e-08 4.191201e-15 4.191201e-15 90 4.025000e-08 4.647740e-15 4.666040e-15 91 4.075000e-08 4.191201e-15 4.191201e-15 92 4.125000e-08 4.647740e-15 4.666040e-15 93 4.175000e-08 4.191201e-15 4.191201e-15 94 4.225000e-08 4.647740e-15 4.666040e-15 95 4.275000e-08 4.191201e-15 4.191201e-15 96 4.325000e-08 4.647740e-15 4.666040e-15 97 4.375000e-08 4.191201e-15 4.191201e-15 98 4.425000e-08 4.647740e-15 4.666040e-15 99 4.475000e-08 4.191201e-15 4.191201e-15 100 4.525000e-08 4.647740e-15 4.666040e-15 101 4.575000e-08 4.191201e-15 4.191201e-15 102 4.625000e-08 4.647740e-15 4.666040e-15 103 4.675000e-08 4.191201e-15 4.191201e-15 104 4.725000e-08 4.647740e-15 4.666040e-15 105 4.775000e-08 4.191201e-15 4.191201e-15 106 4.825000e-08 4.647740e-15 4.666040e-15 107 4.875000e-08 4.191201e-15 4.191201e-15 108 4.925000e-08 4.647740e-15 4.666040e-15 109 4.975000e-08 4.191201e-15 4.191201e-15 110 5.025000e-08 4.647740e-15 4.666040e-15 111 5.075000e-08 4.191201e-15 4.191201e-15 112 5.125000e-08 4.647740e-15 4.666040e-15 Index time v(11) v(12) -------------------------------------------------------------------------------- 113 5.175000e-08 4.191201e-15 4.191201e-15 114 5.225000e-08 4.647740e-15 4.666040e-15 115 5.275000e-08 4.191201e-15 4.191201e-15 116 5.325000e-08 4.647740e-15 4.666040e-15 117 5.375000e-08 4.191201e-15 4.191201e-15 118 5.425000e-08 4.647740e-15 4.666040e-15 119 5.475000e-08 4.191201e-15 4.191201e-15 120 5.525000e-08 4.647740e-15 4.666040e-15 121 5.575000e-08 4.191201e-15 4.191201e-15 122 5.625000e-08 4.647740e-15 4.666040e-15 123 5.675000e-08 4.191201e-15 4.191201e-15 124 5.725000e-08 4.647740e-15 4.666040e-15 125 5.775000e-08 4.191201e-15 4.191201e-15 126 5.825000e-08 4.647740e-15 4.666040e-15 127 5.875000e-08 4.191201e-15 4.191201e-15 128 5.925000e-08 4.647740e-15 4.666040e-15 129 5.975000e-08 4.191201e-15 4.191201e-15 130 6.025000e-08 4.647740e-15 4.666040e-15 131 6.075000e-08 4.191201e-15 4.191201e-15 132 6.125000e-08 4.647740e-15 4.666040e-15 133 6.175000e-08 4.191201e-15 4.191201e-15 134 6.225000e-08 4.647740e-15 4.666040e-15 135 6.275000e-08 4.191201e-15 4.191201e-15 136 6.325000e-08 4.647740e-15 4.666040e-15 137 6.375000e-08 4.191201e-15 4.191201e-15 138 6.425000e-08 4.647740e-15 4.666040e-15 139 6.475000e-08 4.191201e-15 4.191201e-15 140 6.525000e-08 4.647740e-15 4.666040e-15 141 6.575000e-08 4.191201e-15 4.191201e-15 142 6.625000e-08 4.647740e-15 4.666040e-15 143 6.675000e-08 4.191201e-15 4.191201e-15 144 6.725000e-08 4.647740e-15 4.666040e-15 145 6.775000e-08 4.191201e-15 4.191201e-15 146 6.825000e-08 4.647740e-15 4.666040e-15 147 6.875000e-08 4.191201e-15 4.191201e-15 148 6.925000e-08 4.647740e-15 4.666040e-15 149 6.975000e-08 4.191201e-15 4.191201e-15 150 7.025000e-08 4.647740e-15 4.666040e-15 151 7.075000e-08 4.191201e-15 4.191201e-15 152 7.125000e-08 4.647740e-15 4.666040e-15 153 7.175000e-08 4.191201e-15 4.191201e-15 154 7.225000e-08 4.647740e-15 4.666040e-15 155 7.275000e-08 4.191201e-15 4.191201e-15 156 7.325000e-08 4.647740e-15 4.666040e-15 157 7.375000e-08 4.191201e-15 4.191201e-15 158 7.425000e-08 4.647740e-15 4.666040e-15 159 7.475000e-08 4.191201e-15 4.191201e-15 160 7.525000e-08 4.647740e-15 4.666040e-15 161 7.575000e-08 4.191201e-15 4.191201e-15 162 7.625000e-08 4.647740e-15 4.666040e-15 163 7.675000e-08 4.191201e-15 4.191201e-15 164 7.725000e-08 4.647740e-15 4.666040e-15 165 7.775000e-08 4.191201e-15 4.191201e-15 166 7.825000e-08 4.647740e-15 4.666040e-15 167 7.875000e-08 4.191201e-15 4.191201e-15 168 7.925000e-08 4.647740e-15 4.666040e-15 169 7.975000e-08 4.191201e-15 4.191201e-15 170 8.025000e-08 4.647740e-15 4.666040e-15 Index time v(11) v(12) -------------------------------------------------------------------------------- 171 8.075000e-08 4.191201e-15 4.191201e-15 172 8.125000e-08 4.647740e-15 4.666040e-15 173 8.175000e-08 4.191201e-15 4.191201e-15 174 8.225000e-08 4.647740e-15 4.666040e-15 175 8.275000e-08 4.191201e-15 4.191201e-15 176 8.325000e-08 4.647740e-15 4.666040e-15 177 8.375000e-08 4.191201e-15 4.191201e-15 178 8.425000e-08 4.647740e-15 4.666040e-15 179 8.475000e-08 4.191201e-15 4.191201e-15 180 8.525000e-08 4.647740e-15 4.666040e-15 181 8.575000e-08 4.191201e-15 4.191201e-15 182 8.625000e-08 4.647740e-15 4.666040e-15 183 8.675000e-08 4.191201e-15 4.191201e-15 184 8.725000e-08 4.647740e-15 4.666040e-15 185 8.775000e-08 4.191201e-15 4.191201e-15 186 8.825000e-08 4.647740e-15 4.666040e-15 187 8.875000e-08 4.191201e-15 4.191201e-15 188 8.925000e-08 4.647740e-15 4.666040e-15 189 8.975000e-08 4.191201e-15 4.191201e-15 190 9.025000e-08 4.647740e-15 4.666040e-15 191 9.075000e-08 4.191201e-15 4.191201e-15 192 9.125000e-08 4.647740e-15 4.666040e-15 193 9.175000e-08 4.191201e-15 4.191201e-15 194 9.225000e-08 4.647740e-15 4.666040e-15 195 9.275000e-08 4.191201e-15 4.191201e-15 196 9.325000e-08 4.647740e-15 4.666040e-15 197 9.375000e-08 4.191201e-15 4.191201e-15 198 9.425000e-08 4.647740e-15 4.666040e-15 199 9.475000e-08 4.191201e-15 4.191201e-15 200 9.525000e-08 4.647740e-15 4.666040e-15 201 9.575000e-08 4.191201e-15 4.191201e-15 202 9.625000e-08 4.647740e-15 4.666040e-15 203 9.675000e-08 4.191201e-15 4.191201e-15 204 9.725000e-08 4.647740e-15 4.666040e-15 205 9.775000e-08 4.191201e-15 4.191201e-15 206 9.825000e-08 4.647740e-15 4.666040e-15 207 9.875000e-08 4.191201e-15 4.191201e-15 208 9.925000e-08 4.647740e-15 4.666040e-15 209 9.975000e-08 4.191201e-15 4.191201e-15 210 1.002500e-07 4.647740e-15 4.666040e-15 211 1.007500e-07 4.191201e-15 4.191201e-15 212 1.012500e-07 4.647740e-15 4.666040e-15 213 1.017500e-07 4.191201e-15 4.191201e-15 214 1.022500e-07 4.647740e-15 4.666040e-15 215 1.027500e-07 4.191201e-15 4.191201e-15 216 1.032500e-07 4.647740e-15 4.666040e-15 217 1.037500e-07 4.191201e-15 4.191201e-15 218 1.042500e-07 4.647740e-15 4.666040e-15 219 1.047500e-07 4.191201e-15 4.191201e-15 220 1.052500e-07 4.647740e-15 4.666040e-15 221 1.057500e-07 4.191201e-15 4.191201e-15 222 1.062500e-07 4.647740e-15 4.666040e-15 223 1.067500e-07 4.191201e-15 4.191201e-15 224 1.072500e-07 4.647740e-15 4.666040e-15 225 1.077500e-07 4.191201e-15 4.191201e-15 226 1.082500e-07 4.647740e-15 4.666040e-15 227 1.087500e-07 4.191201e-15 4.191201e-15 228 1.092500e-07 4.647740e-15 4.666040e-15 Index time v(11) v(12) -------------------------------------------------------------------------------- 229 1.097500e-07 4.191201e-15 4.191201e-15 230 1.102500e-07 4.647740e-15 4.666040e-15 231 1.107500e-07 4.191201e-15 4.191201e-15 232 1.112500e-07 4.647740e-15 4.666040e-15 233 1.117500e-07 4.191201e-15 4.191201e-15 234 1.122500e-07 4.647740e-15 4.666040e-15 235 1.127500e-07 4.191201e-15 4.191201e-15 236 1.132500e-07 4.647740e-15 4.666040e-15 237 1.137500e-07 4.191201e-15 4.191201e-15 238 1.142500e-07 4.647740e-15 4.666040e-15 239 1.147500e-07 4.191201e-15 4.191201e-15 240 1.152500e-07 4.647740e-15 4.666040e-15 241 1.157500e-07 4.191201e-15 4.191201e-15 242 1.162500e-07 4.647740e-15 4.666040e-15 243 1.167500e-07 4.191201e-15 4.191201e-15 244 1.172500e-07 4.647740e-15 4.666040e-15 245 1.177500e-07 4.191201e-15 4.191201e-15 246 1.182500e-07 4.647740e-15 4.666040e-15 247 1.187500e-07 4.191201e-15 4.191201e-15 248 1.192500e-07 4.647740e-15 4.666040e-15 249 1.197500e-07 4.191201e-15 4.191201e-15 250 1.202500e-07 4.647740e-15 4.666040e-15 251 1.207500e-07 4.191201e-15 4.191201e-15 252 1.212500e-07 4.647740e-15 4.666040e-15 253 1.217500e-07 4.191201e-15 4.191201e-15 254 1.222500e-07 4.647740e-15 4.666040e-15 255 1.227500e-07 4.191201e-15 4.191201e-15 256 1.232500e-07 4.647740e-15 4.666040e-15 257 1.237500e-07 4.191201e-15 4.191201e-15 258 1.242500e-07 4.647740e-15 4.666040e-15 259 1.247500e-07 4.191201e-15 4.191201e-15 260 1.252500e-07 4.647740e-15 4.666040e-15 261 1.257500e-07 4.191201e-15 4.191201e-15 262 1.262500e-07 4.647740e-15 4.666040e-15 263 1.267500e-07 4.191201e-15 4.191201e-15 264 1.272500e-07 4.647740e-15 4.666040e-15 265 1.277500e-07 4.191201e-15 4.191201e-15 266 1.282500e-07 4.647740e-15 4.666040e-15 267 1.287500e-07 4.191201e-15 4.191201e-15 268 1.292500e-07 4.647740e-15 4.666040e-15 269 1.297500e-07 4.191201e-15 4.191201e-15 270 1.302500e-07 4.647740e-15 4.666040e-15 271 1.307500e-07 4.191201e-15 4.191201e-15 272 1.312500e-07 4.647740e-15 4.666040e-15 273 1.317500e-07 4.191201e-15 4.191201e-15 274 1.322500e-07 4.647740e-15 4.666040e-15 275 1.327500e-07 4.191201e-15 4.191201e-15 276 1.332500e-07 4.647740e-15 4.666040e-15 277 1.337500e-07 4.191201e-15 4.191201e-15 278 1.342500e-07 4.647740e-15 4.666040e-15 279 1.347500e-07 4.191201e-15 4.191201e-15 280 1.352500e-07 4.647740e-15 4.666040e-15 281 1.357500e-07 4.191201e-15 4.191201e-15 282 1.362500e-07 4.647740e-15 4.666040e-15 283 1.367500e-07 4.191201e-15 4.191201e-15 284 1.372500e-07 4.647740e-15 4.666040e-15 285 1.377500e-07 4.191201e-15 4.191201e-15 286 1.382500e-07 4.647740e-15 4.666040e-15 Index time v(11) v(12) -------------------------------------------------------------------------------- 287 1.387500e-07 4.191201e-15 4.191201e-15 288 1.392500e-07 4.647740e-15 4.666040e-15 289 1.397500e-07 4.191201e-15 4.191201e-15 290 1.402500e-07 4.647740e-15 4.666040e-15 291 1.407500e-07 4.191201e-15 4.191201e-15 292 1.412500e-07 4.647740e-15 4.666040e-15 293 1.417500e-07 4.191201e-15 4.191201e-15 294 1.422500e-07 4.647740e-15 4.666040e-15 295 1.427500e-07 4.191201e-15 4.191201e-15 296 1.432500e-07 4.647740e-15 4.666040e-15 297 1.437500e-07 4.191201e-15 4.191201e-15 298 1.442500e-07 4.647740e-15 4.666040e-15 299 1.447500e-07 4.191201e-15 4.191201e-15 300 1.452500e-07 4.647740e-15 4.666040e-15 301 1.457500e-07 4.191201e-15 4.191201e-15 302 1.462500e-07 4.647740e-15 4.666040e-15 303 1.467500e-07 4.191201e-15 4.191201e-15 304 1.472500e-07 4.647740e-15 4.666040e-15 305 1.477500e-07 4.191201e-15 4.191201e-15 306 1.482500e-07 4.647740e-15 4.666040e-15 307 1.487500e-07 4.191201e-15 4.191201e-15 308 1.492500e-07 4.647740e-15 4.666040e-15 309 1.497500e-07 4.191201e-15 4.191201e-15 310 1.500000e-07 4.558415e-15 4.522521e-15 CPU time since last call: 0.029 seconds. Total CPU time: 0.029 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/tests/mos6/mos6inv.cir0000644000265600020320000000704312264261473016363 0ustar andreasadmin*** NDINV * 4 XNDINV1 1 11 12 13 2 100 NDINV XNDINV2 2 21 22 23 3 100 NDINV XNDINV3 3 31 32 33 4 100 NDINV XNDINV4 4 41 42 43 5 100 NDINV .SUBCKT NDINV 10 11 21 31 41 100 MP11 11 100 100 100 P12L5 L=1.2U W=5U MP12 11 100 100 100 P12L5 L=1.2U W=5U MP13 11 100 100 100 P12L5 L=1.2U W=5U MP14 11 10 100 100 P12L5 L=1.2U W=5U MN11 11 100 12 0 N10L5 L=1.0U W=5U MN12 12 100 13 0 N10L5 L=1.0U W=5U MN13 13 100 14 0 N10L5 L=1.0U W=5U MN14 14 10 0 0 N10L5 L=1.0U W=5U MP21 23 0 100 100 P12L5 L=1.2U W=20U MP22 22 11 23 100 P12L5 L=1.2U W=20U MP23 21 0 22 100 P12L5 L=1.2U W=20U MN21 21 0 0 0 N10L5 L=1.0U W=5U MN22 21 11 0 0 N10L5 L=1.0U W=5U MN23 21 0 0 0 N10L5 L=1.0U W=5U MP31 31 21 100 100 P12L5 L=1.2U W=10U MP32 31 100 100 100 P12L5 L=1.2U W=10U MN31 31 21 32 0 N10L5 L=1.0U W=5U MN32 32 100 0 0 N10L5 L=1.0U W=5U MP41 41 31 100 100 P12L5 L=1.2U W=10U MN41 41 31 0 0 N10L5 L=1.0U W=5U C11 11 0 1P C21 21 0 1P C31 31 0 1P C41 41 0 1P .ENDS VDD 100 0 5 VIN 1 0 DC 0 PWL(0 0 2N 5) .TRAN 0.5N 150N .PRINT TRAN V(1) V(2) V(3) V(4) V(5) .PRINT TRAN V(11) V(12) V(13) V(41) V(42) V(43) .OPTIONS NOACCT **** LEVEL 1 NMOS **** .MODEL N10L1 NMOS + LEVEL=1 TPG=1 + KP=2.33082E-05 + LAMBDA=0.013333 VT0=0.69486 GAMMA=0.60309 PHI=1 + TOX=1.9800000E-08 XJ=0.2U LD=0.1U NSUB=4.9999999E+16 + NSS=0.0000000E+00 + CJ=4.091E-4 MJ=0.307 PB=1.0 + CJSW=3.078E-10 MJSW=1.0E-2 + CGSO=3.93E-10 CGDO=3.93E-10 **** LEVEL 1 PMOS **** .MODEL P12L1 PMOS + LEVEL=1 TPG=-1 + KP=7.69968E-06 + LAMBDA=0.018966 VT0=-0.60865 GAMMA=0.89213 PHI=1 + TOX=1.9800000E-08 XJ=0.4U LD=0.28U NSUB=4.9999999E+17 + NSS=0.0000000E+00 + CJ=6.852E-4 MJ=0.429 PB=1.0 + CJSW=5.217E-10 MJSW=0.351 + CGSO=7.29E-10 CGDO=7.29E-10 **** LEVEL 3 NMOS **** .MODEL N10L3 NMOS + LEVEL=3 TPG=+1 + GAMMA=1.140501 THETA=0.8109787 KAPPA=0.1579183 ETA=5.0622310E-02 + DELTA=0.000000E+00 UO=812.5126 VMAX=1186662. VTO=0.8 + TOX=1.9800000E-08 XJ=0.2U LD=0.1U NSUB=4.9999999E+16 + NSS=0.0000000E+00 + CJ=4.091E-4 MJ=0.307 PB=1.0 + CJSW=3.078E-10 MJSW=1.0E-2 + CGSO=3.93E-10 CGDO=3.93E-10 **** LEVEL 3 PMOS **** .MODEL P12L3 PMOS + LEVEL=3 TPG=-1 + GAMMA=1.211640 THETA=0.1184638 KAPPA=0.2162577 ETA=2.7580135E-02 + DELTA=0.000000E+00 UO=89.16160 VMAX=5.9000000E+07 VTO=-0.8 + TOX=1.9800000E-08 XJ=0.4U LD=0.28U NSUB=4.9999999E+17 + NSS=0.0000000E+00 + CJ=6.852E-4 MJ=0.429 PB=1.0 + CJSW=5.217E-10 MJSW=0.351 + CGSO=7.29E-10 CGDO=7.29E-10 **** LEVEL 6 NMOS **** .MODEL N10L5 NMOS + LEVEL=6 TPG=1 + KC=3.8921e-05 NC=1.1739 KV=0.91602 NV=0.87225 + LAMBDA0=0.013333 LAMBDA1=0.0046901 VT0=0.69486 GAMMA=0.60309 PHI=1 + TOX=1.9800000E-08 XJ=0.2U LD=0.1U NSUB=4.9999999E+16 + NSS=0.0000000E+00 + CJ=4.091E-4 MJ=0.307 PB=1.0 + CJSW=3.078E-10 MJSW=1.0E-2 + CGSO=3.93E-10 CGDO=3.93E-10 **** LEVEL 6 PMOS **** .MODEL P12L5 PMOS + LEVEL=6 TPG=-1 + KC=6.42696E-06 NC=1.6536 KV=0.92145 NV=0.88345 + LAMBDA0=0.018966 LAMBDA1=0.0084012 VT0=-0.60865 GAMMA=0.89213 PHI=1 + TOX=1.9800000E-08 XJ=0.4U LD=0.28U NSUB=4.9999999E+17 + NSS=0.0000000E+00 + CJ=6.852E-4 MJ=0.429 PB=1.0 + CJSW=5.217E-10 MJSW=0.351 + CGSO=7.29E-10 CGDO=7.29E-10 .END ngspice-26/tests/mos6/mos6inv.out0000644000265600020320000022272012264261473016416 0ustar andreasadmin Circuit: *** NDINV * 4 Error on line 79 : .model n10l5 nmos level=6 tpg=1 kc=3.8921e-05 nc=1.1739 kv=0.91602 nv=0.87225 lambda0=0.013333 lambda1=0.0046901 vt0=0.69486 gamma=0.60309 phi=1 tox=1.9800000e-08 xj=0.2u ld=0.1u nsub=4.9999999e+16 nss=0.0000000e+00 cj=4.091e-4 mj=0.307 pb=1.0 cjsw=3.078e-10 mjsw=1.0e-2 cgso=3.93e-10 cgdo=3.93e-10 unrecognized parameter (xj) - ignored unrecognized parameter (0.2u) - ignored Error on line 89 : .model p12l5 pmos level=6 tpg=-1 kc=6.42696e-06 nc=1.6536 kv=0.92145 nv=0.88345 lambda0=0.018966 lambda1=0.0084012 vt0=-0.60865 gamma=0.89213 phi=1 tox=1.9800000e-08 xj=0.4u ld=0.28u nsub=4.9999999e+17 nss=0.0000000e+00 cj=6.852e-4 mj=0.429 pb=1.0 cjsw=5.217e-10 mjsw=0.351 cgso=7.29e-10 cgdo=7.29e-10 unrecognized parameter (xj) - ignored unrecognized parameter (0.4u) - ignored Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 11 5 100 5 1 0 ndinv1:12 3.61293 ndinv1:13 3.61293 ndinv1:14 3.61293 ndinv1:23 5 ndinv1:22 1.59002 12 1.43643e-08 13 5 ndinv1:32 7.47791e-206 2 6.07304e-09 21 5 ndinv2:12 3.61293 ndinv2:13 3.61293 ndinv2:14 3.61293 ndinv2:23 5 ndinv2:22 1.59002 22 1.43643e-08 23 5 ndinv2:32 1.44672e-207 3 6.07304e-09 31 5 ndinv3:12 3.61293 ndinv3:13 3.61293 ndinv3:14 3.61293 ndinv3:23 5 ndinv3:22 1.59004 32 1.43643e-08 33 5 ndinv3:32 -1.04135e-115 4 6.07304e-09 41 5 ndinv4:12 3.61293 ndinv4:13 3.61293 ndinv4:14 3.61292 ndinv4:23 5 ndinv4:22 1.59083 42 1.43624e-08 43 5 ndinv4:32 -8.95202e-88 5 6.07304e-09 vin#branch 0 vdd#branch -1.94468e-10 *** NDINV * 4 Transient Analysis Sat Aug 27 16:31:59 2005 -------------------------------------------------------------------------------- Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 6.073044e-09 6.073044e-09 1 5.000000e-12 1.250000e-02 6.139822e-09 6.072904e-09 2 1.000000e-11 2.500000e-02 6.205723e-09 6.072764e-09 3 2.000000e-11 5.000000e-02 6.335817e-09 6.072487e-09 4 4.000000e-11 1.000000e-01 6.586155e-09 6.071944e-09 5 8.000000e-11 2.000000e-01 7.050473e-09 6.070894e-09 6 1.600000e-10 4.000000e-01 7.851233e-09 6.068933e-09 7 1.800000e-10 4.500000e-01 8.022372e-09 6.068477e-09 8 2.200000e-10 5.500000e-01 8.347904e-09 6.067584e-09 9 3.000000e-10 7.500000e-01 8.906914e-09 6.065922e-09 10 4.600000e-10 1.150000e+00 8.847684e-09 6.063046e-09 11 6.354757e-10 1.588689e+00 2.139844e-09 6.060504e-09 12 8.960570e-10 2.240143e+00 -2.797049e-08 6.057707e-09 13 1.196298e-09 2.990745e+00 -7.162840e-08 6.055650e-09 14 1.610915e-09 4.027287e+00 -1.028679e-07 6.054302e-09 15 2.000000e-09 5.000000e+00 -1.013340e-07 6.054152e-09 16 2.050000e-09 5.000000e+00 -9.996482e-08 6.054198e-09 17 2.150000e-09 5.000000e+00 -9.664682e-08 6.054308e-09 18 2.350000e-09 5.000000e+00 -8.697821e-08 6.054635e-09 19 2.750000e-09 5.000000e+00 -6.068391e-08 6.055602e-09 20 3.250000e-09 5.000000e+00 -1.882771e-08 6.057179e-09 21 3.750000e-09 5.000000e+00 1.235013e-06 6.058939e-09 22 4.235270e-09 5.000000e+00 3.912871e-06 6.060666e-09 23 4.735270e-09 5.000000e+00 6.554394e-06 6.062365e-09 24 5.235270e-09 5.000000e+00 8.532872e-06 6.063933e-09 25 5.735270e-09 5.000000e+00 1.002130e-05 6.065354e-09 26 6.235270e-09 5.000000e+00 1.111304e-05 6.066620e-09 27 6.735270e-09 5.000000e+00 1.196879e-05 6.067738e-09 28 7.235270e-09 5.000000e+00 1.276181e-05 6.068715e-09 29 7.735270e-09 5.000000e+00 1.370884e-05 6.069564e-09 30 8.235270e-09 5.000000e+00 1.509320e-05 6.070298e-09 31 8.735270e-09 5.000000e+00 -8.270615e-06 6.070852e-09 32 9.235270e-09 5.000000e+00 -9.734072e-05 6.071194e-09 33 9.735270e-09 5.000000e+00 -2.608076e-04 6.071459e-09 34 1.023527e-08 5.000000e+00 -4.879628e-04 6.071756e-09 35 1.073527e-08 5.000000e+00 -7.726609e-04 6.072090e-09 36 1.123527e-08 5.000000e+00 -1.111678e-03 6.072442e-09 37 1.173527e-08 5.000000e+00 -1.504544e-03 6.072788e-09 38 1.223527e-08 5.000000e+00 -1.953972e-03 6.073101e-09 39 1.273527e-08 5.000000e+00 -2.467429e-03 6.073355e-09 40 1.323527e-08 5.000000e+00 -3.059960e-03 6.073525e-09 41 1.373527e-08 5.000000e+00 -3.080746e-03 6.075686e-09 42 1.423527e-08 5.000000e+00 -1.009192e-04 6.085247e-09 43 1.473527e-08 5.000000e+00 9.300835e-03 6.103709e-09 44 1.523527e-08 5.000000e+00 2.838013e-02 6.127487e-09 45 1.573527e-08 5.000000e+00 6.031830e-02 6.153155e-09 46 1.623527e-08 5.000000e+00 1.082457e-01 6.178334e-09 47 1.673527e-08 5.000000e+00 1.753935e-01 6.202842e-09 48 1.723527e-08 5.000000e+00 2.648652e-01 6.226900e-09 49 1.773527e-08 5.000000e+00 3.799908e-01 6.252582e-09 50 1.823527e-08 5.000000e+00 5.262788e-01 6.288956e-09 51 1.873527e-08 5.000000e+00 7.165873e-01 6.362975e-09 52 1.923527e-08 5.000000e+00 9.669387e-01 3.221768e-09 53 1.973527e-08 5.000000e+00 1.279988e+00 -9.466130e-09 54 2.023527e-08 5.000000e+00 1.646110e+00 -2.914678e-08 Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 55 2.073527e-08 5.000000e+00 2.055672e+00 -4.890039e-08 56 2.123527e-08 5.000000e+00 2.490459e+00 -6.124372e-08 57 2.173527e-08 5.000000e+00 2.921621e+00 -5.678892e-08 58 2.223527e-08 5.000000e+00 3.322401e+00 -4.025824e-08 59 2.273527e-08 5.000000e+00 3.676345e+00 -2.338167e-08 60 2.323527e-08 5.000000e+00 3.975577e+00 2.605919e-07 61 2.373527e-08 5.000000e+00 4.219430e+00 1.954364e-06 62 2.423527e-08 5.000000e+00 4.412595e+00 4.625093e-06 63 2.473527e-08 5.000000e+00 4.562194e+00 6.877824e-06 64 2.523527e-08 5.000000e+00 4.676060e+00 8.653036e-06 65 2.573527e-08 5.000000e+00 4.761559e+00 1.001376e-05 66 2.623527e-08 5.000000e+00 4.825116e+00 1.105411e-05 67 2.673527e-08 5.000000e+00 4.871993e+00 1.190898e-05 68 2.723527e-08 5.000000e+00 4.906381e+00 1.274668e-05 69 2.773527e-08 5.000000e+00 4.931497e+00 1.378134e-05 70 2.823527e-08 5.000000e+00 4.949798e+00 1.530806e-05 71 2.873527e-08 5.000000e+00 4.963105e+00 -1.643185e-05 72 2.923527e-08 5.000000e+00 4.972781e+00 -1.202357e-04 73 2.973527e-08 5.000000e+00 4.979812e+00 -2.954300e-04 74 3.023527e-08 5.000000e+00 4.984931e+00 -5.325541e-04 75 3.073527e-08 5.000000e+00 4.988658e+00 -8.261722e-04 76 3.123527e-08 5.000000e+00 4.991387e+00 -1.173738e-03 77 3.173527e-08 5.000000e+00 4.993388e+00 -1.575335e-03 78 3.223527e-08 5.000000e+00 4.994866e+00 -2.034343e-03 79 3.273527e-08 5.000000e+00 4.995961e+00 -2.559227e-03 80 3.323527e-08 5.000000e+00 4.996780e+00 -3.166701e-03 81 3.373527e-08 5.000000e+00 4.997395e+00 -2.908868e-03 82 3.423527e-08 5.000000e+00 4.997863e+00 9.072562e-04 83 3.473527e-08 5.000000e+00 4.998219e+00 1.167933e-02 84 3.523527e-08 5.000000e+00 4.998496e+00 3.265866e-02 85 3.573527e-08 5.000000e+00 4.998711e+00 6.700389e-02 86 3.623527e-08 5.000000e+00 4.998883e+00 1.178548e-01 87 3.673527e-08 5.000000e+00 4.999020e+00 1.884152e-01 88 3.723527e-08 5.000000e+00 4.999133e+00 2.818719e-01 89 3.773527e-08 5.000000e+00 4.999226e+00 4.017420e-01 90 3.823527e-08 5.000000e+00 4.999306e+00 5.541445e-01 91 3.873527e-08 5.000000e+00 4.999373e+00 7.536218e-01 92 3.923527e-08 5.000000e+00 4.999432e+00 1.015237e+00 93 3.973527e-08 5.000000e+00 4.999483e+00 1.337798e+00 94 4.023527e-08 5.000000e+00 4.999530e+00 1.711780e+00 95 4.073527e-08 5.000000e+00 4.999570e+00 2.127673e+00 96 4.123527e-08 5.000000e+00 4.999608e+00 2.564605e+00 97 4.173527e-08 5.000000e+00 4.999641e+00 2.992192e+00 98 4.223527e-08 5.000000e+00 4.999672e+00 3.385894e+00 99 4.273527e-08 5.000000e+00 4.999700e+00 3.730914e+00 100 4.323527e-08 5.000000e+00 4.999726e+00 4.020600e+00 101 4.373527e-08 5.000000e+00 4.999749e+00 4.255476e+00 102 4.423527e-08 5.000000e+00 4.999771e+00 4.440719e+00 103 4.473527e-08 5.000000e+00 4.999790e+00 4.583745e+00 104 4.523527e-08 5.000000e+00 4.999808e+00 4.692305e+00 105 4.573527e-08 5.000000e+00 4.999825e+00 4.773688e+00 106 4.623527e-08 5.000000e+00 4.999840e+00 4.834075e+00 107 4.673527e-08 5.000000e+00 4.999854e+00 4.878587e+00 108 4.723527e-08 5.000000e+00 4.999867e+00 4.911196e+00 109 4.773527e-08 5.000000e+00 4.999878e+00 4.935015e+00 110 4.823527e-08 5.000000e+00 4.999889e+00 4.952351e+00 111 4.873527e-08 5.000000e+00 4.999898e+00 4.964968e+00 112 4.923527e-08 5.000000e+00 4.999908e+00 4.974130e+00 Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 113 4.973527e-08 5.000000e+00 4.999916e+00 4.980800e+00 114 5.023527e-08 5.000000e+00 4.999923e+00 4.985645e+00 115 5.073527e-08 5.000000e+00 4.999930e+00 4.989185e+00 116 5.123527e-08 5.000000e+00 4.999936e+00 4.991768e+00 117 5.173527e-08 5.000000e+00 4.999942e+00 4.993673e+00 118 5.223527e-08 5.000000e+00 4.999947e+00 4.995073e+00 119 5.273527e-08 5.000000e+00 4.999952e+00 4.996119e+00 120 5.323527e-08 5.000000e+00 4.999956e+00 4.996895e+00 121 5.373527e-08 5.000000e+00 4.999960e+00 4.997486e+00 122 5.423527e-08 5.000000e+00 4.999964e+00 4.997929e+00 123 5.473527e-08 5.000000e+00 4.999967e+00 4.998273e+00 124 5.523527e-08 5.000000e+00 4.999970e+00 4.998535e+00 125 5.573527e-08 5.000000e+00 4.999972e+00 4.998745e+00 126 5.623527e-08 5.000000e+00 4.999975e+00 4.998907e+00 127 5.673527e-08 5.000000e+00 4.999977e+00 4.999042e+00 128 5.723527e-08 5.000000e+00 4.999979e+00 4.999149e+00 129 5.773527e-08 5.000000e+00 4.999981e+00 4.999242e+00 130 5.823527e-08 5.000000e+00 4.999983e+00 4.999317e+00 131 5.873527e-08 5.000000e+00 4.999984e+00 4.999385e+00 132 5.923527e-08 5.000000e+00 4.999986e+00 4.999440e+00 133 5.973527e-08 5.000000e+00 4.999987e+00 4.999493e+00 134 6.023527e-08 5.000000e+00 4.999988e+00 4.999536e+00 135 6.073527e-08 5.000000e+00 4.999989e+00 4.999578e+00 136 6.123527e-08 5.000000e+00 4.999990e+00 4.999613e+00 137 6.173527e-08 5.000000e+00 4.999991e+00 4.999648e+00 138 6.223527e-08 5.000000e+00 4.999992e+00 4.999676e+00 139 6.273527e-08 5.000000e+00 4.999993e+00 4.999705e+00 140 6.323527e-08 5.000000e+00 4.999993e+00 4.999729e+00 141 6.373238e-08 5.000000e+00 4.999994e+00 4.999754e+00 142 6.423238e-08 5.000000e+00 4.999994e+00 4.999773e+00 143 6.473238e-08 5.000000e+00 4.999995e+00 4.999794e+00 144 6.523238e-08 5.000000e+00 4.999995e+00 4.999811e+00 145 6.573238e-08 5.000000e+00 4.999996e+00 4.999828e+00 146 6.623238e-08 5.000000e+00 4.999996e+00 4.999842e+00 147 6.673238e-08 5.000000e+00 4.999997e+00 4.999857e+00 148 6.723238e-08 5.000000e+00 4.999997e+00 4.999868e+00 149 6.773238e-08 5.000000e+00 4.999997e+00 4.999881e+00 150 6.823238e-08 5.000000e+00 4.999997e+00 4.999890e+00 151 6.873238e-08 5.000000e+00 4.999998e+00 4.999901e+00 152 6.923238e-08 5.000000e+00 4.999998e+00 4.999908e+00 153 6.973238e-08 5.000000e+00 4.999998e+00 4.999917e+00 154 7.023238e-08 5.000000e+00 4.999998e+00 4.999924e+00 155 7.073238e-08 5.000000e+00 4.999998e+00 4.999931e+00 156 7.123238e-08 5.000000e+00 4.999999e+00 4.999937e+00 157 7.173238e-08 5.000000e+00 4.999999e+00 4.999943e+00 158 7.223238e-08 5.000000e+00 4.999999e+00 4.999947e+00 159 7.273238e-08 5.000000e+00 4.999999e+00 4.999953e+00 160 7.323238e-08 5.000000e+00 4.999999e+00 4.999956e+00 161 7.373238e-08 5.000000e+00 4.999999e+00 4.999961e+00 162 7.423238e-08 5.000000e+00 4.999999e+00 4.999964e+00 163 7.473238e-08 5.000000e+00 4.999999e+00 4.999968e+00 164 7.523238e-08 5.000000e+00 4.999999e+00 4.999970e+00 165 7.573238e-08 5.000000e+00 4.999999e+00 4.999973e+00 166 7.623238e-08 5.000000e+00 4.999999e+00 4.999975e+00 167 7.673238e-08 5.000000e+00 4.999999e+00 4.999978e+00 168 7.723238e-08 5.000000e+00 5.000000e+00 4.999979e+00 169 7.773238e-08 5.000000e+00 5.000000e+00 4.999982e+00 170 7.823238e-08 5.000000e+00 5.000000e+00 4.999983e+00 Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 171 7.873238e-08 5.000000e+00 5.000000e+00 4.999985e+00 172 7.923238e-08 5.000000e+00 5.000000e+00 4.999986e+00 173 7.973238e-08 5.000000e+00 5.000000e+00 4.999987e+00 174 8.023238e-08 5.000000e+00 5.000000e+00 4.999988e+00 175 8.073238e-08 5.000000e+00 5.000000e+00 4.999990e+00 176 8.123238e-08 5.000000e+00 5.000000e+00 4.999990e+00 177 8.173238e-08 5.000000e+00 5.000000e+00 4.999991e+00 178 8.223238e-08 5.000000e+00 5.000000e+00 4.999992e+00 179 8.273238e-08 5.000000e+00 5.000000e+00 4.999993e+00 180 8.323238e-08 5.000000e+00 5.000000e+00 4.999993e+00 181 8.373238e-08 5.000000e+00 5.000000e+00 4.999994e+00 182 8.423238e-08 5.000000e+00 5.000000e+00 4.999994e+00 183 8.473238e-08 5.000000e+00 5.000000e+00 4.999995e+00 184 8.523238e-08 5.000000e+00 5.000000e+00 4.999995e+00 185 8.573238e-08 5.000000e+00 5.000000e+00 4.999996e+00 186 8.623238e-08 5.000000e+00 5.000000e+00 4.999996e+00 187 8.673238e-08 5.000000e+00 5.000000e+00 4.999997e+00 188 8.723238e-08 5.000000e+00 5.000000e+00 4.999997e+00 189 8.773238e-08 5.000000e+00 5.000000e+00 4.999997e+00 190 8.823238e-08 5.000000e+00 5.000000e+00 4.999997e+00 191 8.873238e-08 5.000000e+00 5.000000e+00 4.999998e+00 192 8.923238e-08 5.000000e+00 5.000000e+00 4.999998e+00 193 8.973238e-08 5.000000e+00 5.000000e+00 4.999998e+00 194 9.023238e-08 5.000000e+00 5.000000e+00 4.999998e+00 195 9.073238e-08 5.000000e+00 5.000000e+00 4.999998e+00 196 9.123238e-08 5.000000e+00 5.000000e+00 4.999998e+00 197 9.173238e-08 5.000000e+00 5.000000e+00 4.999999e+00 198 9.223238e-08 5.000000e+00 5.000000e+00 4.999999e+00 199 9.273238e-08 5.000000e+00 5.000000e+00 4.999999e+00 200 9.323238e-08 5.000000e+00 5.000000e+00 4.999999e+00 201 9.373238e-08 5.000000e+00 5.000000e+00 4.999999e+00 202 9.423238e-08 5.000000e+00 5.000000e+00 4.999999e+00 203 9.473238e-08 5.000000e+00 5.000000e+00 4.999999e+00 204 9.523238e-08 5.000000e+00 5.000000e+00 4.999999e+00 205 9.573238e-08 5.000000e+00 5.000000e+00 4.999999e+00 206 9.623238e-08 5.000000e+00 5.000000e+00 4.999999e+00 207 9.673238e-08 5.000000e+00 5.000000e+00 5.000000e+00 208 9.723238e-08 5.000000e+00 5.000000e+00 4.999999e+00 209 9.773238e-08 5.000000e+00 5.000000e+00 5.000000e+00 210 9.823238e-08 5.000000e+00 5.000000e+00 5.000000e+00 211 9.873238e-08 5.000000e+00 5.000000e+00 5.000000e+00 212 9.923238e-08 5.000000e+00 5.000000e+00 5.000000e+00 213 9.973238e-08 5.000000e+00 5.000000e+00 5.000000e+00 214 1.002324e-07 5.000000e+00 5.000000e+00 5.000000e+00 215 1.007324e-07 5.000000e+00 5.000000e+00 5.000000e+00 216 1.012324e-07 5.000000e+00 5.000000e+00 5.000000e+00 217 1.017324e-07 5.000000e+00 5.000000e+00 5.000000e+00 218 1.022324e-07 5.000000e+00 5.000000e+00 5.000000e+00 219 1.027324e-07 5.000000e+00 5.000000e+00 5.000000e+00 220 1.032324e-07 5.000000e+00 5.000000e+00 5.000000e+00 221 1.037324e-07 5.000000e+00 5.000000e+00 5.000000e+00 222 1.042324e-07 5.000000e+00 5.000000e+00 5.000000e+00 223 1.047324e-07 5.000000e+00 5.000000e+00 5.000000e+00 224 1.052324e-07 5.000000e+00 5.000000e+00 5.000000e+00 225 1.057324e-07 5.000000e+00 5.000000e+00 5.000000e+00 226 1.062324e-07 5.000000e+00 5.000000e+00 5.000000e+00 227 1.067324e-07 5.000000e+00 5.000000e+00 5.000000e+00 228 1.072324e-07 5.000000e+00 5.000000e+00 5.000000e+00 Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 229 1.077324e-07 5.000000e+00 5.000000e+00 5.000000e+00 230 1.082324e-07 5.000000e+00 5.000000e+00 5.000000e+00 231 1.087324e-07 5.000000e+00 5.000000e+00 5.000000e+00 232 1.092324e-07 5.000000e+00 5.000000e+00 5.000000e+00 233 1.097324e-07 5.000000e+00 5.000000e+00 5.000000e+00 234 1.102324e-07 5.000000e+00 5.000000e+00 5.000000e+00 235 1.107324e-07 5.000000e+00 5.000000e+00 5.000000e+00 236 1.112324e-07 5.000000e+00 5.000000e+00 5.000000e+00 237 1.117324e-07 5.000000e+00 5.000000e+00 5.000000e+00 238 1.122324e-07 5.000000e+00 5.000000e+00 5.000000e+00 239 1.127324e-07 5.000000e+00 5.000000e+00 5.000000e+00 240 1.132324e-07 5.000000e+00 5.000000e+00 5.000000e+00 241 1.137324e-07 5.000000e+00 5.000000e+00 5.000000e+00 242 1.142324e-07 5.000000e+00 5.000000e+00 5.000000e+00 243 1.147324e-07 5.000000e+00 5.000000e+00 5.000000e+00 244 1.152324e-07 5.000000e+00 5.000000e+00 5.000000e+00 245 1.157324e-07 5.000000e+00 5.000000e+00 5.000000e+00 246 1.162324e-07 5.000000e+00 5.000000e+00 5.000000e+00 247 1.167324e-07 5.000000e+00 5.000000e+00 5.000000e+00 248 1.172324e-07 5.000000e+00 5.000000e+00 5.000000e+00 249 1.177324e-07 5.000000e+00 5.000000e+00 5.000000e+00 250 1.182324e-07 5.000000e+00 5.000000e+00 5.000000e+00 251 1.187324e-07 5.000000e+00 5.000000e+00 5.000000e+00 252 1.192324e-07 5.000000e+00 5.000000e+00 5.000000e+00 253 1.197324e-07 5.000000e+00 5.000000e+00 5.000000e+00 254 1.202324e-07 5.000000e+00 5.000000e+00 5.000000e+00 255 1.207324e-07 5.000000e+00 5.000000e+00 5.000000e+00 256 1.212324e-07 5.000000e+00 5.000000e+00 5.000000e+00 257 1.217324e-07 5.000000e+00 5.000000e+00 5.000000e+00 258 1.222324e-07 5.000000e+00 5.000000e+00 5.000000e+00 259 1.227324e-07 5.000000e+00 5.000000e+00 5.000000e+00 260 1.232324e-07 5.000000e+00 5.000000e+00 5.000000e+00 261 1.237324e-07 5.000000e+00 5.000000e+00 5.000000e+00 262 1.242324e-07 5.000000e+00 5.000000e+00 5.000000e+00 263 1.247324e-07 5.000000e+00 5.000000e+00 5.000000e+00 264 1.252324e-07 5.000000e+00 5.000000e+00 5.000000e+00 265 1.257324e-07 5.000000e+00 5.000000e+00 5.000000e+00 266 1.262324e-07 5.000000e+00 5.000000e+00 5.000000e+00 267 1.267324e-07 5.000000e+00 5.000000e+00 5.000000e+00 268 1.272324e-07 5.000000e+00 5.000000e+00 5.000000e+00 269 1.277324e-07 5.000000e+00 5.000000e+00 5.000000e+00 270 1.282324e-07 5.000000e+00 5.000000e+00 5.000000e+00 271 1.287324e-07 5.000000e+00 5.000000e+00 5.000000e+00 272 1.292324e-07 5.000000e+00 5.000000e+00 5.000000e+00 273 1.297324e-07 5.000000e+00 5.000000e+00 5.000000e+00 274 1.302324e-07 5.000000e+00 5.000000e+00 5.000000e+00 275 1.307324e-07 5.000000e+00 5.000000e+00 5.000000e+00 276 1.312324e-07 5.000000e+00 5.000000e+00 5.000000e+00 277 1.317324e-07 5.000000e+00 5.000000e+00 5.000000e+00 278 1.322324e-07 5.000000e+00 5.000000e+00 5.000000e+00 279 1.327324e-07 5.000000e+00 5.000000e+00 5.000000e+00 280 1.332324e-07 5.000000e+00 5.000000e+00 5.000000e+00 281 1.337324e-07 5.000000e+00 5.000000e+00 5.000000e+00 282 1.342324e-07 5.000000e+00 5.000000e+00 5.000000e+00 283 1.347324e-07 5.000000e+00 5.000000e+00 5.000000e+00 284 1.352324e-07 5.000000e+00 5.000000e+00 5.000000e+00 285 1.357324e-07 5.000000e+00 5.000000e+00 5.000000e+00 286 1.362324e-07 5.000000e+00 5.000000e+00 5.000000e+00 Index time v(1) v(2) v(3) -------------------------------------------------------------------------------- 287 1.367324e-07 5.000000e+00 5.000000e+00 5.000000e+00 288 1.372324e-07 5.000000e+00 5.000000e+00 5.000000e+00 289 1.377324e-07 5.000000e+00 5.000000e+00 5.000000e+00 290 1.382324e-07 5.000000e+00 5.000000e+00 5.000000e+00 291 1.387324e-07 5.000000e+00 5.000000e+00 5.000000e+00 292 1.392324e-07 5.000000e+00 5.000000e+00 5.000000e+00 293 1.397324e-07 5.000000e+00 5.000000e+00 5.000000e+00 294 1.402324e-07 5.000000e+00 5.000000e+00 5.000000e+00 295 1.407324e-07 5.000000e+00 5.000000e+00 5.000000e+00 296 1.412324e-07 5.000000e+00 5.000000e+00 5.000000e+00 297 1.417324e-07 5.000000e+00 5.000000e+00 5.000000e+00 298 1.422324e-07 5.000000e+00 5.000000e+00 5.000000e+00 299 1.427324e-07 5.000000e+00 5.000000e+00 5.000000e+00 300 1.432324e-07 5.000000e+00 5.000000e+00 5.000000e+00 301 1.437324e-07 5.000000e+00 5.000000e+00 5.000000e+00 302 1.442324e-07 5.000000e+00 5.000000e+00 5.000000e+00 303 1.447324e-07 5.000000e+00 5.000000e+00 5.000000e+00 304 1.452324e-07 5.000000e+00 5.000000e+00 5.000000e+00 305 1.457324e-07 5.000000e+00 5.000000e+00 5.000000e+00 306 1.462324e-07 5.000000e+00 5.000000e+00 5.000000e+00 307 1.467324e-07 5.000000e+00 5.000000e+00 5.000000e+00 308 1.472324e-07 5.000000e+00 5.000000e+00 5.000000e+00 309 1.477324e-07 5.000000e+00 5.000000e+00 5.000000e+00 310 1.482324e-07 5.000000e+00 5.000000e+00 5.000000e+00 311 1.487324e-07 5.000000e+00 5.000000e+00 5.000000e+00 312 1.492324e-07 5.000000e+00 5.000000e+00 5.000000e+00 313 1.497324e-07 5.000000e+00 5.000000e+00 5.000000e+00 314 1.500000e-07 5.000000e+00 5.000000e+00 5.000000e+00 *** NDINV * 4 Transient Analysis Sat Aug 27 16:31:59 2005 -------------------------------------------------------------------------------- Index time v(4) v(5) -------------------------------------------------------------------------------- 0 0.000000e+00 6.073044e-09 6.073044e-09 1 5.000000e-12 6.074070e-09 6.075023e-09 2 1.000000e-11 6.074841e-09 6.076979e-09 3 2.000000e-11 6.075882e-09 6.080845e-09 4 4.000000e-11 6.075067e-09 6.088305e-09 5 8.000000e-11 6.062977e-09 6.102179e-09 6 1.600000e-10 6.005455e-09 6.126056e-09 7 1.800000e-10 5.984303e-09 6.131117e-09 8 2.200000e-10 5.938848e-09 6.140691e-09 9 3.000000e-10 5.832994e-09 6.156750e-09 10 4.600000e-10 5.591204e-09 6.178361e-09 11 6.354757e-10 5.318662e-09 6.189094e-09 12 8.960570e-10 4.963465e-09 6.187994e-09 13 1.196298e-09 4.662199e-09 6.171242e-09 14 1.610915e-09 4.434390e-09 6.136917e-09 15 2.000000e-09 4.381255e-09 6.103192e-09 16 2.050000e-09 4.384395e-09 6.099145e-09 17 2.150000e-09 4.393783e-09 6.091250e-09 18 2.350000e-09 4.429256e-09 6.076749e-09 19 2.750000e-09 4.550185e-09 6.053239e-09 20 3.250000e-09 4.760318e-09 6.033865e-09 21 3.750000e-09 4.999218e-09 6.024055e-09 22 4.235270e-09 5.233483e-09 6.021391e-09 23 4.735270e-09 5.462145e-09 6.023353e-09 24 5.235270e-09 5.669884e-09 6.028150e-09 25 5.735270e-09 5.853093e-09 6.034321e-09 26 6.235270e-09 6.011012e-09 6.040868e-09 27 6.735270e-09 6.144549e-09 6.047167e-09 28 7.235270e-09 6.255530e-09 6.052870e-09 29 7.735270e-09 6.346215e-09 6.057816e-09 30 8.235270e-09 6.418996e-09 6.061968e-09 31 8.735270e-09 6.476223e-09 6.065364e-09 32 9.235270e-09 6.520103e-09 6.068078e-09 33 9.735270e-09 6.552645e-09 6.070203e-09 34 1.023527e-08 6.575646e-09 6.071833e-09 35 1.073527e-08 6.590684e-09 6.073058e-09 36 1.123527e-08 6.599134e-09 6.073957e-09 37 1.173527e-08 6.602180e-09 6.074598e-09 38 1.223527e-08 6.600833e-09 6.075039e-09 39 1.273527e-08 6.595957e-09 6.075326e-09 40 1.323527e-08 6.588278e-09 6.075497e-09 41 1.373527e-08 6.578408e-09 6.075582e-09 42 1.423527e-08 6.566861e-09 6.075603e-09 43 1.473527e-08 6.554062e-09 6.075579e-09 44 1.523527e-08 6.540364e-09 6.075523e-09 45 1.573527e-08 6.526060e-09 6.075446e-09 46 1.623527e-08 6.511387e-09 6.075356e-09 47 1.673527e-08 6.496539e-09 6.075257e-09 48 1.723527e-08 6.481672e-09 6.075155e-09 49 1.773527e-08 6.466912e-09 6.075052e-09 50 1.823527e-08 6.452358e-09 6.074950e-09 51 1.873527e-08 6.438086e-09 6.074851e-09 52 1.923527e-08 6.424154e-09 6.074755e-09 53 1.973527e-08 6.410608e-09 6.074664e-09 54 2.023527e-08 6.397477e-09 6.074577e-09 Index time v(4) v(5) -------------------------------------------------------------------------------- 55 2.073527e-08 6.384784e-09 6.074494e-09 56 2.123527e-08 6.372542e-09 6.074417e-09 57 2.173527e-08 6.360756e-09 6.074343e-09 58 2.223527e-08 6.349427e-09 6.074274e-09 59 2.273527e-08 6.338553e-09 6.074209e-09 60 2.323527e-08 6.328127e-09 6.074148e-09 61 2.373527e-08 6.318142e-09 6.074091e-09 62 2.423527e-08 6.308583e-09 6.074037e-09 63 2.473527e-08 6.299432e-09 6.073986e-09 64 2.523527e-08 6.290681e-09 6.073939e-09 65 2.573527e-08 6.282316e-09 6.073894e-09 66 2.623527e-08 6.274325e-09 6.073852e-09 67 2.673527e-08 6.266691e-09 6.073812e-09 68 2.723527e-08 6.259400e-09 6.073775e-09 69 2.773527e-08 6.252436e-09 6.073740e-09 70 2.823527e-08 6.245784e-09 6.073707e-09 71 2.873527e-08 6.239327e-09 6.073676e-09 72 2.923527e-08 6.233037e-09 6.073647e-09 73 2.973527e-08 6.227055e-09 6.073619e-09 74 3.023527e-08 6.221432e-09 6.073593e-09 75 3.073527e-08 6.216144e-09 6.073568e-09 76 3.123527e-08 6.211152e-09 6.073545e-09 77 3.173527e-08 6.206412e-09 6.073522e-09 78 3.223527e-08 6.201883e-09 6.073501e-09 79 3.273527e-08 6.197522e-09 6.073482e-09 80 3.323527e-08 6.193291e-09 6.073463e-09 81 3.373527e-08 6.192183e-09 6.073445e-09 82 3.423527e-08 6.199374e-09 6.073428e-09 83 3.473527e-08 6.215351e-09 6.073412e-09 84 3.523527e-08 6.236269e-09 6.073397e-09 85 3.573527e-08 6.258586e-09 6.073382e-09 86 3.623527e-08 6.280442e-09 6.073369e-09 87 3.673527e-08 6.301694e-09 6.073356e-09 88 3.723527e-08 6.323074e-09 6.073343e-09 89 3.773527e-08 6.347110e-09 6.073331e-09 90 3.823527e-08 6.384166e-09 6.073320e-09 91 3.873527e-08 6.396054e-09 6.073309e-09 92 3.923527e-08 1.916059e-09 6.073299e-09 93 3.973527e-08 -1.251828e-08 6.073289e-09 94 4.023527e-08 -3.246496e-08 6.073280e-09 95 4.073527e-08 -5.198099e-08 6.073271e-09 96 4.123527e-08 -6.218081e-08 6.073263e-09 97 4.173527e-08 -5.438362e-08 6.073255e-09 98 4.223527e-08 -3.691745e-08 6.073247e-09 99 4.273527e-08 -2.048270e-08 6.073240e-09 100 4.323527e-08 4.536342e-07 6.073234e-09 101 4.373527e-08 2.389435e-06 6.073232e-09 102 4.423527e-08 5.051698e-06 6.073227e-09 103 4.473527e-08 7.210572e-06 6.073217e-09 104 4.523527e-08 8.913870e-06 6.073207e-09 105 4.573527e-08 1.021079e-05 6.073198e-09 106 4.623527e-08 1.121000e-05 6.073191e-09 107 4.673527e-08 1.204929e-05 6.073186e-09 108 4.723527e-08 1.290470e-05 6.073182e-09 109 4.773527e-08 1.400041e-05 6.073179e-09 110 4.823527e-08 1.564110e-05 6.073177e-09 111 4.873527e-08 -2.492327e-05 6.073041e-09 112 4.923527e-08 -1.441149e-04 6.072791e-09 Index time v(4) v(5) -------------------------------------------------------------------------------- 113 4.973527e-08 -3.316988e-04 6.072613e-09 114 5.023527e-08 -5.796825e-04 6.072539e-09 115 5.073527e-08 -8.831043e-04 6.072553e-09 116 5.123527e-08 -1.240060e-03 6.072628e-09 117 5.173527e-08 -1.651258e-03 6.072729e-09 118 5.223527e-08 -2.120868e-03 6.072826e-09 119 5.273527e-08 -2.658516e-03 6.072888e-09 120 5.323527e-08 -3.272275e-03 6.072915e-09 121 5.373527e-08 -2.657163e-03 6.077114e-09 122 5.423527e-08 2.147889e-03 6.090509e-09 123 5.473527e-08 1.446824e-02 6.112227e-09 124 5.523527e-08 3.754811e-02 6.138358e-09 125 5.573527e-08 7.452673e-02 6.165419e-09 126 5.623527e-08 1.285604e-01 6.191718e-09 127 5.673527e-08 2.028717e-01 6.217174e-09 128 5.723527e-08 3.006303e-01 6.242438e-09 129 5.773527e-08 4.255621e-01 6.270797e-09 130 5.823527e-08 5.847010e-01 6.315279e-09 131 5.873527e-08 7.940434e-01 5.929827e-09 132 5.923527e-08 1.066846e+00 -1.991201e-10 133 5.973527e-08 1.398994e+00 -1.615934e-08 134 6.023527e-08 1.780890e+00 -3.644218e-08 135 6.073527e-08 2.201954e+00 -5.545878e-08 136 6.123527e-08 2.639562e+00 -6.301759e-08 137 6.173527e-08 3.062822e+00 -5.202595e-08 138 6.223527e-08 3.448962e+00 -3.369832e-08 139 6.273527e-08 3.784754e+00 -1.750238e-08 140 6.323527e-08 4.064780e+00 6.940108e-07 141 6.373238e-08 4.289513e+00 2.885196e-06 142 6.423238e-08 4.467189e+00 5.536599e-06 143 6.473238e-08 4.603967e+00 7.620437e-06 144 6.523238e-08 4.707524e+00 9.251302e-06 145 6.573238e-08 4.785027e+00 1.047989e-05 146 6.623238e-08 4.842447e+00 1.143097e-05 147 6.673238e-08 4.884738e+00 1.224973e-05 148 6.723238e-08 4.915689e+00 1.312274e-05 149 6.773238e-08 4.938293e+00 1.428822e-05 150 6.823238e-08 4.954733e+00 1.093300e-05 151 6.873238e-08 4.966703e+00 -4.169129e-05 152 6.923238e-08 4.975388e+00 -1.743849e-04 153 6.973238e-08 4.981718e+00 -3.746080e-04 154 7.023238e-08 4.986311e+00 -6.346954e-04 155 7.073238e-08 4.989673e+00 -9.499326e-04 156 7.123238e-08 4.992124e+00 -1.318746e-03 157 7.173238e-08 4.993938e+00 -1.742337e-03 158 7.223238e-08 4.995268e+00 -2.225687e-03 159 7.273238e-08 4.996266e+00 -2.779776e-03 160 7.323238e-08 4.997004e+00 -3.327745e-03 161 7.373238e-08 4.997570e+00 -2.230166e-03 162 7.423238e-08 4.997991e+00 3.715083e-03 163 7.473238e-08 4.998323e+00 1.783986e-02 164 7.523238e-08 4.998572e+00 4.339968e-02 165 7.573238e-08 4.998776e+00 8.353844e-02 166 7.623238e-08 4.998931e+00 1.414471e-01 167 7.673238e-08 4.999063e+00 2.203863e-01 168 7.723238e-08 4.999165e+00 3.235990e-01 169 7.773238e-08 4.999256e+00 4.552552e-01 170 7.823238e-08 4.999328e+00 6.238792e-01 Index time v(4) v(5) -------------------------------------------------------------------------------- 171 7.873238e-08 4.999395e+00 8.474177e-01 172 7.923238e-08 4.999449e+00 1.136642e+00 173 7.973238e-08 4.999501e+00 1.485583e+00 174 8.023238e-08 4.999543e+00 1.884351e+00 175 8.073238e-08 4.999585e+00 2.320626e+00 176 8.123238e-08 4.999619e+00 2.766788e+00 177 8.173238e-08 4.999653e+00 3.189668e+00 178 8.223238e-08 4.999681e+00 3.568872e+00 179 8.273238e-08 4.999710e+00 3.892860e+00 180 8.323238e-08 4.999733e+00 4.158449e+00 181 8.373238e-08 4.999758e+00 4.369344e+00 182 8.423238e-08 4.999777e+00 4.532646e+00 183 8.473238e-08 4.999797e+00 4.656650e+00 184 8.523238e-08 4.999813e+00 4.749416e+00 185 8.573238e-08 4.999831e+00 4.818029e+00 186 8.623238e-08 4.999844e+00 4.868346e+00 187 8.673238e-08 4.999859e+00 4.905011e+00 188 8.723238e-08 4.999870e+00 4.931600e+00 189 8.773238e-08 4.999883e+00 4.950814e+00 190 8.823238e-08 4.999892e+00 4.964664e+00 191 8.873238e-08 4.999902e+00 4.974627e+00 192 8.923238e-08 4.999910e+00 4.981785e+00 193 8.973238e-08 4.999919e+00 4.986923e+00 194 9.023238e-08 4.999925e+00 4.990609e+00 195 9.073238e-08 4.999933e+00 4.993253e+00 196 9.123238e-08 4.999938e+00 4.995149e+00 197 9.173238e-08 4.999944e+00 4.996509e+00 198 9.223238e-08 4.999948e+00 4.997485e+00 199 9.273238e-08 4.999954e+00 4.998186e+00 200 9.323238e-08 4.999957e+00 4.998689e+00 201 9.373238e-08 4.999962e+00 4.999051e+00 202 9.423238e-08 4.999964e+00 4.999312e+00 203 9.473238e-08 4.999968e+00 4.999500e+00 204 9.523238e-08 4.999970e+00 4.999636e+00 205 9.573238e-08 4.999974e+00 4.999734e+00 206 9.623238e-08 4.999975e+00 4.999805e+00 207 9.673238e-08 4.999978e+00 4.999856e+00 208 9.723238e-08 4.999980e+00 4.999894e+00 209 9.773238e-08 4.999982e+00 4.999921e+00 210 9.823238e-08 4.999983e+00 4.999942e+00 211 9.873238e-08 4.999985e+00 4.999956e+00 212 9.923238e-08 4.999986e+00 4.999967e+00 213 9.973238e-08 4.999988e+00 4.999975e+00 214 1.002324e-07 4.999988e+00 4.999981e+00 215 1.007324e-07 4.999990e+00 4.999986e+00 216 1.012324e-07 4.999990e+00 4.999989e+00 217 1.017324e-07 4.999992e+00 4.999992e+00 218 1.022324e-07 4.999992e+00 4.999993e+00 219 1.027324e-07 4.999993e+00 4.999995e+00 220 1.032324e-07 4.999993e+00 4.999996e+00 221 1.037324e-07 4.999994e+00 4.999997e+00 222 1.042324e-07 4.999994e+00 4.999998e+00 223 1.047324e-07 4.999995e+00 4.999998e+00 224 1.052324e-07 4.999995e+00 4.999998e+00 225 1.057324e-07 4.999996e+00 4.999999e+00 226 1.062324e-07 4.999996e+00 4.999999e+00 227 1.067324e-07 4.999997e+00 4.999999e+00 228 1.072324e-07 4.999997e+00 4.999999e+00 Index time v(4) v(5) -------------------------------------------------------------------------------- 229 1.077324e-07 4.999997e+00 4.999999e+00 230 1.082324e-07 4.999997e+00 5.000000e+00 231 1.087324e-07 4.999998e+00 5.000000e+00 232 1.092324e-07 4.999998e+00 5.000000e+00 233 1.097324e-07 4.999998e+00 5.000000e+00 234 1.102324e-07 4.999998e+00 5.000000e+00 235 1.107324e-07 4.999999e+00 5.000000e+00 236 1.112324e-07 4.999998e+00 5.000000e+00 237 1.117324e-07 4.999999e+00 5.000000e+00 238 1.122324e-07 4.999999e+00 5.000000e+00 239 1.127324e-07 4.999999e+00 5.000000e+00 240 1.132324e-07 4.999999e+00 5.000000e+00 241 1.137324e-07 4.999999e+00 5.000000e+00 242 1.142324e-07 4.999999e+00 5.000000e+00 243 1.147324e-07 4.999999e+00 5.000000e+00 244 1.152324e-07 4.999999e+00 5.000000e+00 245 1.157324e-07 4.999999e+00 5.000000e+00 246 1.162324e-07 4.999999e+00 5.000000e+00 247 1.167324e-07 5.000000e+00 5.000000e+00 248 1.172324e-07 4.999999e+00 5.000000e+00 249 1.177324e-07 5.000000e+00 5.000000e+00 250 1.182324e-07 5.000000e+00 5.000000e+00 251 1.187324e-07 5.000000e+00 5.000000e+00 252 1.192324e-07 5.000000e+00 5.000000e+00 253 1.197324e-07 5.000000e+00 5.000000e+00 254 1.202324e-07 5.000000e+00 5.000000e+00 255 1.207324e-07 5.000000e+00 5.000000e+00 256 1.212324e-07 5.000000e+00 5.000000e+00 257 1.217324e-07 5.000000e+00 5.000000e+00 258 1.222324e-07 5.000000e+00 5.000000e+00 259 1.227324e-07 5.000000e+00 5.000000e+00 260 1.232324e-07 5.000000e+00 5.000000e+00 261 1.237324e-07 5.000000e+00 5.000000e+00 262 1.242324e-07 5.000000e+00 5.000000e+00 263 1.247324e-07 5.000000e+00 5.000000e+00 264 1.252324e-07 5.000000e+00 5.000000e+00 265 1.257324e-07 5.000000e+00 5.000000e+00 266 1.262324e-07 5.000000e+00 5.000000e+00 267 1.267324e-07 5.000000e+00 5.000000e+00 268 1.272324e-07 5.000000e+00 5.000000e+00 269 1.277324e-07 5.000000e+00 5.000000e+00 270 1.282324e-07 5.000000e+00 5.000000e+00 271 1.287324e-07 5.000000e+00 5.000000e+00 272 1.292324e-07 5.000000e+00 5.000000e+00 273 1.297324e-07 5.000000e+00 5.000000e+00 274 1.302324e-07 5.000000e+00 5.000000e+00 275 1.307324e-07 5.000000e+00 5.000000e+00 276 1.312324e-07 5.000000e+00 5.000000e+00 277 1.317324e-07 5.000000e+00 5.000000e+00 278 1.322324e-07 5.000000e+00 5.000000e+00 279 1.327324e-07 5.000000e+00 5.000000e+00 280 1.332324e-07 5.000000e+00 5.000000e+00 281 1.337324e-07 5.000000e+00 5.000000e+00 282 1.342324e-07 5.000000e+00 5.000000e+00 283 1.347324e-07 5.000000e+00 5.000000e+00 284 1.352324e-07 5.000000e+00 5.000000e+00 285 1.357324e-07 5.000000e+00 5.000000e+00 286 1.362324e-07 5.000000e+00 5.000000e+00 Index time v(4) v(5) -------------------------------------------------------------------------------- 287 1.367324e-07 5.000000e+00 5.000000e+00 288 1.372324e-07 5.000000e+00 5.000000e+00 289 1.377324e-07 5.000000e+00 5.000000e+00 290 1.382324e-07 5.000000e+00 5.000000e+00 291 1.387324e-07 5.000000e+00 5.000000e+00 292 1.392324e-07 5.000000e+00 5.000000e+00 293 1.397324e-07 5.000000e+00 5.000000e+00 294 1.402324e-07 5.000000e+00 5.000000e+00 295 1.407324e-07 5.000000e+00 5.000000e+00 296 1.412324e-07 5.000000e+00 5.000000e+00 297 1.417324e-07 5.000000e+00 5.000000e+00 298 1.422324e-07 5.000000e+00 5.000000e+00 299 1.427324e-07 5.000000e+00 5.000000e+00 300 1.432324e-07 5.000000e+00 5.000000e+00 301 1.437324e-07 5.000000e+00 5.000000e+00 302 1.442324e-07 5.000000e+00 5.000000e+00 303 1.447324e-07 5.000000e+00 5.000000e+00 304 1.452324e-07 5.000000e+00 5.000000e+00 305 1.457324e-07 5.000000e+00 5.000000e+00 306 1.462324e-07 5.000000e+00 5.000000e+00 307 1.467324e-07 5.000000e+00 5.000000e+00 308 1.472324e-07 5.000000e+00 5.000000e+00 309 1.477324e-07 5.000000e+00 5.000000e+00 310 1.482324e-07 5.000000e+00 5.000000e+00 311 1.487324e-07 5.000000e+00 5.000000e+00 312 1.492324e-07 5.000000e+00 5.000000e+00 313 1.497324e-07 5.000000e+00 5.000000e+00 314 1.500000e-07 5.000000e+00 5.000000e+00 *** NDINV * 4 Transient Analysis Sat Aug 27 16:31:59 2005 -------------------------------------------------------------------------------- Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 1.436434e-08 5.000000e+00 1 5.000000e-12 5.000075e+00 4.021338e-07 5.000000e+00 2 1.000000e-11 5.000151e+00 7.876029e-07 5.000000e+00 3 2.000000e-11 5.000301e+00 1.554144e-06 5.000000e+00 4 4.000000e-11 5.000600e+00 3.062415e-06 5.000000e+00 5 8.000000e-11 5.001192e+00 5.990654e-06 5.000000e+00 6 1.600000e-10 5.002354e+00 1.154810e-05 5.000000e+00 7 1.800000e-10 5.002640e+00 1.287078e-05 5.000000e+00 8 2.200000e-10 5.003209e+00 1.547886e-05 5.000000e+00 9 3.000000e-10 5.004329e+00 2.049335e-05 5.000000e+00 10 4.600000e-10 5.005385e+00 2.422345e-05 5.000000e+00 11 6.354757e-10 4.997795e+00 -1.483841e-05 5.000000e+00 12 8.960570e-10 4.951031e+00 -2.309236e-04 4.999997e+00 13 1.196298e-09 4.853434e+00 -6.335196e-04 4.999992e+00 14 1.610915e-09 4.690296e+00 -1.185522e-03 4.999987e+00 15 2.000000e-09 4.525725e+00 -1.620535e-03 4.999985e+00 16 2.050000e-09 4.503409e+00 -1.672707e-03 4.999984e+00 17 2.150000e-09 4.458701e+00 -1.773878e-03 4.999984e+00 18 2.350000e-09 4.369211e+00 -1.956847e-03 4.999984e+00 19 2.750000e-09 4.191207e+00 -2.253421e-03 4.999984e+00 20 3.250000e-09 3.972133e+00 -2.471205e-03 4.999986e+00 21 3.750000e-09 3.754213e+00 7.201591e-03 5.000107e+00 22 4.235270e-09 3.541345e+00 3.404688e-02 5.000405e+00 23 4.735270e-09 3.322945e+00 7.485626e-02 5.000788e+00 24 5.235270e-09 3.108515e+00 1.259311e-01 5.001193e+00 25 5.735270e-09 2.899931e+00 1.871548e-01 5.001614e+00 26 6.235270e-09 2.698778e+00 2.580704e-01 5.002044e+00 27 6.735270e-09 2.506126e+00 3.387948e-01 5.002487e+00 28 7.235270e-09 2.322720e+00 4.299599e-01 5.002952e+00 29 7.735270e-09 2.148988e+00 5.330997e-01 5.003457e+00 30 8.235270e-09 1.985130e+00 6.510900e-01 5.004035e+00 31 8.735270e-09 1.831366e+00 7.882694e-01 5.002250e+00 32 9.235270e-09 1.687553e+00 9.513371e-01 4.993314e+00 33 9.735270e-09 1.553313e+00 1.145283e+00 4.974259e+00 34 1.023527e-08 1.428288e+00 1.369010e+00 4.943742e+00 35 1.073527e-08 1.312216e+00 1.618282e+00 4.900352e+00 36 1.123527e-08 1.205314e+00 1.886938e+00 4.842628e+00 37 1.173527e-08 1.107315e+00 2.167613e+00 4.769004e+00 38 1.223527e-08 1.017558e+00 2.452720e+00 4.677693e+00 39 1.273527e-08 9.354099e-01 2.735015e+00 4.566461e+00 40 1.323527e-08 8.601669e-01 3.008279e+00 4.432252e+00 41 1.373527e-08 7.912086e-01 3.267342e+00 4.270277e+00 42 1.423527e-08 7.278925e-01 3.508622e+00 4.073417e+00 43 1.473527e-08 6.695803e-01 3.728175e+00 3.839105e+00 44 1.523527e-08 6.157243e-01 3.922636e+00 3.572315e+00 45 1.573527e-08 5.659199e-01 4.091940e+00 3.279530e+00 46 1.623527e-08 5.198575e-01 4.237773e+00 2.966540e+00 47 1.673527e-08 4.772475e-01 4.361956e+00 2.641521e+00 48 1.723527e-08 4.378463e-01 4.467058e+00 2.318434e+00 49 1.773527e-08 4.014416e-01 4.555665e+00 2.011645e+00 50 1.823527e-08 3.678301e-01 4.629775e+00 1.729933e+00 51 1.873527e-08 3.368271e-01 4.691684e+00 1.476833e+00 52 1.923527e-08 3.082641e-01 4.743394e+00 1.253311e+00 53 1.973527e-08 2.819761e-01 4.786587e+00 1.058913e+00 54 2.023527e-08 2.578077e-01 4.822622e+00 8.916622e-01 Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 55 2.073527e-08 2.356058e-01 4.852643e+00 7.489893e-01 56 2.123527e-08 2.152269e-01 4.877629e+00 6.285023e-01 57 2.173527e-08 1.965346e-01 4.898405e+00 5.274318e-01 58 2.223527e-08 1.794043e-01 4.915663e+00 4.425382e-01 59 2.273527e-08 1.637162e-01 4.929981e+00 3.711124e-01 60 2.323527e-08 1.493579e-01 4.941857e+00 3.109320e-01 61 2.373527e-08 1.362234e-01 4.951700e+00 2.601935e-01 62 2.423527e-08 1.242150e-01 4.959859e+00 2.174243e-01 63 2.473527e-08 1.132406e-01 4.966620e+00 1.814128e-01 64 2.523527e-08 1.032159e-01 4.972226e+00 1.511401e-01 65 2.573527e-08 9.406177e-02 4.976874e+00 1.257414e-01 66 2.623527e-08 8.570590e-02 4.980730e+00 1.044714e-01 67 2.673527e-08 7.808078e-02 4.983929e+00 8.669479e-02 68 2.723527e-08 7.112475e-02 4.986586e+00 7.186399e-02 69 2.773527e-08 6.478052e-02 4.988793e+00 5.951331e-02 70 2.823527e-08 5.899584e-02 4.990628e+00 4.924276e-02 71 2.873527e-08 5.372230e-02 4.992153e+00 4.071504e-02 72 2.923527e-08 4.891583e-02 4.993423e+00 3.364193e-02 73 2.973527e-08 4.453553e-02 4.994480e+00 2.778232e-02 74 3.023527e-08 4.054442e-02 4.995362e+00 2.293158e-02 75 3.073527e-08 3.690844e-02 4.996097e+00 1.892058e-02 76 3.123527e-08 3.359656e-02 4.996711e+00 1.560534e-02 77 3.173527e-08 3.058011e-02 4.997224e+00 1.286768e-02 78 3.223527e-08 2.783316e-02 4.997653e+00 1.060729e-02 79 3.273527e-08 2.533175e-02 4.998012e+00 8.742555e-03 80 3.323527e-08 2.305425e-02 4.998313e+00 7.204043e-03 81 3.373527e-08 2.098071e-02 4.998566e+00 5.935801e-03 82 3.423527e-08 1.909308e-02 4.998779e+00 4.889957e-03 83 3.473527e-08 1.737471e-02 4.998957e+00 4.028321e-03 84 3.523527e-08 1.581056e-02 4.999108e+00 3.317978e-03 85 3.573527e-08 1.438680e-02 4.999235e+00 2.733031e-03 86 3.623527e-08 1.309098e-02 4.999343e+00 2.250876e-03 87 3.673527e-08 1.191159e-02 4.999434e+00 1.854010e-03 88 3.723527e-08 1.083828e-02 4.999512e+00 1.526892e-03 89 3.773527e-08 9.861485e-03 4.999577e+00 1.257747e-03 90 3.823527e-08 8.972603e-03 4.999634e+00 1.035876e-03 91 3.873527e-08 8.163711e-03 4.999681e+00 8.534011e-04 92 3.923527e-08 7.427668e-03 4.999723e+00 7.029363e-04 93 3.973527e-08 6.757891e-03 4.999758e+00 5.792426e-04 94 4.023527e-08 6.148456e-03 4.999788e+00 4.772013e-04 95 4.073527e-08 5.593910e-03 4.999814e+00 3.933578e-04 96 4.123527e-08 5.089350e-03 4.999836e+00 3.241444e-04 97 4.173527e-08 4.630254e-03 4.999856e+00 2.673091e-04 98 4.223527e-08 4.212552e-03 4.999873e+00 2.203475e-04 99 4.273527e-08 3.832497e-03 4.999887e+00 1.818147e-04 100 4.323527e-08 3.486719e-03 4.999900e+00 1.499356e-04 101 4.373527e-08 3.172113e-03 4.999911e+00 1.238047e-04 102 4.423527e-08 2.885887e-03 4.999921e+00 1.021495e-04 103 4.473527e-08 2.625471e-03 4.999930e+00 8.442258e-05 104 4.523527e-08 2.388551e-03 4.999937e+00 6.969912e-05 105 4.573527e-08 2.172997e-03 4.999944e+00 5.766792e-05 106 4.623527e-08 1.976895e-03 4.999950e+00 4.764584e-05 107 4.673527e-08 1.798481e-03 4.999955e+00 3.947571e-05 108 4.723527e-08 1.636169e-03 4.999960e+00 3.264382e-05 109 4.773527e-08 1.488499e-03 4.999964e+00 2.709194e-05 110 4.823527e-08 1.354157e-03 4.999967e+00 2.242621e-05 111 4.873527e-08 1.231936e-03 4.999971e+00 1.865058e-05 112 4.923527e-08 1.120747e-03 4.999974e+00 1.545692e-05 Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 113 4.973527e-08 1.019590e-03 4.999976e+00 1.288694e-05 114 5.023527e-08 9.275644e-04 4.999978e+00 1.069476e-05 115 5.073527e-08 8.438437e-04 4.999981e+00 8.943698e-06 116 5.123527e-08 7.676794e-04 4.999982e+00 7.433738e-06 117 5.173527e-08 6.983897e-04 4.999984e+00 6.239340e-06 118 5.223527e-08 6.353537e-04 4.999986e+00 5.194899e-06 119 5.273527e-08 5.780082e-04 4.999987e+00 4.379252e-06 120 5.323527e-08 5.258380e-04 4.999988e+00 3.653120e-06 121 5.373527e-08 4.783781e-04 4.999989e+00 3.095455e-06 122 5.423527e-08 4.352011e-04 4.999990e+00 2.587527e-06 123 5.473527e-08 3.959229e-04 4.999991e+00 2.205804e-06 124 5.523527e-08 3.601888e-04 4.999992e+00 1.847922e-06 125 5.573527e-08 3.276821e-04 4.999993e+00 1.586363e-06 126 5.623527e-08 2.981080e-04 4.999993e+00 1.332053e-06 127 5.673527e-08 2.712056e-04 4.999994e+00 1.152698e-06 128 5.723527e-08 2.467297e-04 4.999995e+00 9.702059e-07 129 5.773527e-08 2.244654e-04 4.999995e+00 8.471847e-07 130 5.823527e-08 2.042089e-04 4.999996e+00 7.147658e-07 131 5.873527e-08 1.857832e-04 4.999996e+00 6.304246e-07 132 5.923527e-08 1.690186e-04 4.999996e+00 5.331456e-07 133 5.973527e-08 1.537699e-04 4.999997e+00 4.754167e-07 134 6.023527e-08 1.398953e-04 4.999997e+00 4.029861e-07 135 6.073527e-08 1.272757e-04 4.999997e+00 3.636051e-07 136 6.123527e-08 1.157929e-04 4.999997e+00 3.089023e-07 137 6.173527e-08 1.053493e-04 4.999998e+00 2.821965e-07 138 6.223527e-08 9.584594e-05 4.999998e+00 2.402689e-07 139 6.273527e-08 8.720305e-05 4.999998e+00 2.223353e-07 140 6.323527e-08 7.933793e-05 4.999998e+00 1.897184e-07 141 6.373238e-08 7.222484e-05 4.999998e+00 1.779729e-07 142 6.423238e-08 6.571193e-05 4.999999e+00 1.522142e-07 143 6.473238e-08 5.978948e-05 4.999999e+00 1.445612e-07 144 6.523238e-08 5.439923e-05 4.999999e+00 1.239437e-07 145 6.573238e-08 4.949808e-05 4.999999e+00 1.192169e-07 146 6.623238e-08 4.503694e-05 4.999999e+00 1.024974e-07 147 6.673238e-08 4.098099e-05 4.999999e+00 9.979507e-08 148 6.723238e-08 3.728879e-05 4.999999e+00 8.607359e-08 149 6.773238e-08 3.393232e-05 4.999999e+00 8.476562e-08 150 6.823238e-08 3.087650e-05 4.999999e+00 7.338280e-08 151 6.873238e-08 2.809890e-05 4.999999e+00 7.302765e-08 152 6.923238e-08 2.556974e-05 4.999999e+00 6.349463e-08 153 6.973238e-08 2.327121e-05 4.999999e+00 6.378195e-08 154 7.023238e-08 2.117793e-05 5.000000e+00 5.573143e-08 155 7.073238e-08 1.927585e-05 5.000000e+00 5.644263e-08 156 7.123238e-08 1.754331e-05 5.000000e+00 4.959491e-08 157 7.173238e-08 1.596933e-05 5.000000e+00 5.057589e-08 158 7.223238e-08 1.453533e-05 5.000000e+00 4.471500e-08 159 7.273238e-08 1.323288e-05 5.000000e+00 4.585714e-08 160 7.323238e-08 1.204597e-05 5.000000e+00 4.081410e-08 161 7.373238e-08 1.096822e-05 5.000000e+00 4.204103e-08 162 7.423238e-08 9.985800e-06 5.000000e+00 3.768184e-08 163 7.473238e-08 9.094012e-06 5.000000e+00 3.894019e-08 164 7.523238e-08 8.280828e-06 5.000000e+00 3.515731e-08 165 7.573238e-08 7.542929e-06 5.000000e+00 3.641014e-08 166 7.623238e-08 6.869814e-06 5.000000e+00 3.311626e-08 167 7.673238e-08 6.259266e-06 5.000000e+00 3.433841e-08 168 7.723238e-08 5.702076e-06 5.000000e+00 3.146191e-08 169 7.773238e-08 5.196916e-06 5.000000e+00 3.263672e-08 170 7.823238e-08 4.735672e-06 5.000000e+00 3.011831e-08 Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 171 7.873238e-08 4.317724e-06 5.000000e+00 3.123523e-08 172 7.923238e-08 3.935889e-06 5.000000e+00 2.902540e-08 173 7.973238e-08 3.590110e-06 5.000000e+00 3.007828e-08 174 8.023238e-08 3.273999e-06 5.000000e+00 2.813539e-08 175 8.073238e-08 2.987942e-06 5.000000e+00 2.912124e-08 176 8.123238e-08 2.726229e-06 5.000000e+00 2.741006e-08 177 8.173238e-08 2.489592e-06 5.000000e+00 2.832814e-08 178 8.223238e-08 2.272903e-06 5.000000e+00 2.681868e-08 179 8.273238e-08 2.077160e-06 5.000000e+00 2.766982e-08 180 8.323238e-08 1.897738e-06 5.000000e+00 2.633643e-08 181 8.373238e-08 1.735833e-06 5.000000e+00 2.712257e-08 182 8.423238e-08 1.587257e-06 5.000000e+00 2.594322e-08 183 8.473238e-08 1.453352e-06 5.000000e+00 2.666703e-08 184 8.523238e-08 1.330309e-06 5.000000e+00 2.562274e-08 185 8.573238e-08 1.219571e-06 5.000000e+00 2.628736e-08 186 8.623238e-08 1.117664e-06 5.000000e+00 2.536169e-08 187 8.673238e-08 1.026095e-06 5.000000e+00 2.597054e-08 188 8.723238e-08 9.416830e-07 5.000000e+00 2.514924e-08 189 8.773238e-08 8.659739e-07 5.000000e+00 2.570585e-08 190 8.823238e-08 7.960450e-07 5.000000e+00 2.497652e-08 191 8.873238e-08 7.334576e-07 5.000000e+00 2.548447e-08 192 8.923238e-08 6.755184e-07 5.000000e+00 2.483630e-08 193 8.973238e-08 6.237866e-07 5.000000e+00 2.529910e-08 194 9.023238e-08 5.757737e-07 5.000000e+00 2.472265e-08 195 9.073238e-08 5.330223e-07 5.000000e+00 2.514370e-08 196 9.123238e-08 4.932277e-07 5.000000e+00 2.463070e-08 197 9.173238e-08 4.579051e-07 5.000000e+00 2.501329e-08 198 9.223238e-08 4.249151e-07 5.000000e+00 2.455647e-08 199 9.273238e-08 3.957374e-07 5.000000e+00 2.490372e-08 200 9.323238e-08 3.683818e-07 5.000000e+00 2.449671e-08 201 9.373238e-08 3.442865e-07 5.000000e+00 2.481154e-08 202 9.423238e-08 3.215970e-07 5.000000e+00 2.444874e-08 203 9.473238e-08 3.017049e-07 5.000000e+00 2.473391e-08 204 9.523238e-08 2.828797e-07 5.000000e+00 2.441037e-08 205 9.573238e-08 2.664634e-07 5.000000e+00 2.466844e-08 206 9.623238e-08 2.508390e-07 5.000000e+00 2.437979e-08 207 9.673238e-08 2.372967e-07 5.000000e+00 2.461317e-08 208 9.723238e-08 2.243237e-07 5.000000e+00 2.435556e-08 209 9.773238e-08 2.131575e-07 5.000000e+00 2.456643e-08 210 9.823238e-08 2.023811e-07 5.000000e+00 2.433645e-08 211 9.873238e-08 1.931789e-07 5.000000e+00 2.452687e-08 212 9.923238e-08 1.842228e-07 5.000000e+00 2.432149e-08 213 9.973238e-08 1.766438e-07 5.000000e+00 2.449332e-08 214 1.002324e-07 1.691962e-07 5.000000e+00 2.430988e-08 215 1.007324e-07 1.629585e-07 5.000000e+00 2.446484e-08 216 1.012324e-07 1.567613e-07 5.000000e+00 2.430095e-08 217 1.017324e-07 1.516317e-07 5.000000e+00 2.444062e-08 218 1.022324e-07 1.464713e-07 5.000000e+00 2.429418e-08 219 1.027324e-07 1.422569e-07 5.000000e+00 2.442000e-08 220 1.032324e-07 1.379563e-07 5.000000e+00 2.428912e-08 221 1.037324e-07 1.344975e-07 5.000000e+00 2.440241e-08 222 1.042324e-07 1.309102e-07 5.000000e+00 2.428544e-08 223 1.047324e-07 1.280751e-07 5.000000e+00 2.438739e-08 224 1.052324e-07 1.250797e-07 5.000000e+00 2.428283e-08 225 1.057324e-07 1.227592e-07 5.000000e+00 2.437454e-08 226 1.062324e-07 1.202552e-07 5.000000e+00 2.428107e-08 227 1.067324e-07 1.183591e-07 5.000000e+00 2.436352e-08 228 1.072324e-07 1.162632e-07 5.000000e+00 2.427997e-08 Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 229 1.077324e-07 1.147170e-07 5.000000e+00 2.435407e-08 230 1.082324e-07 1.129601e-07 5.000000e+00 2.427938e-08 231 1.087324e-07 1.117021e-07 5.000000e+00 2.434595e-08 232 1.092324e-07 1.102272e-07 5.000000e+00 2.427918e-08 233 1.097324e-07 1.092064e-07 5.000000e+00 2.433895e-08 234 1.102324e-07 1.079660e-07 5.000000e+00 2.427927e-08 235 1.107324e-07 1.071404e-07 5.000000e+00 2.433292e-08 236 1.112324e-07 1.060953e-07 5.000000e+00 2.427957e-08 237 1.117324e-07 1.054301e-07 5.000000e+00 2.432771e-08 238 1.122324e-07 1.045476e-07 5.000000e+00 2.428003e-08 239 1.127324e-07 1.040141e-07 5.000000e+00 2.432320e-08 240 1.132324e-07 1.032673e-07 5.000000e+00 2.428060e-08 241 1.137324e-07 1.028418e-07 5.000000e+00 2.431929e-08 242 1.142324e-07 1.022082e-07 5.000000e+00 2.428123e-08 243 1.147324e-07 1.018711e-07 5.000000e+00 2.431590e-08 244 1.152324e-07 1.013321e-07 5.000000e+00 2.428190e-08 245 1.157324e-07 1.010674e-07 5.000000e+00 2.431296e-08 246 1.162324e-07 1.006075e-07 5.000000e+00 2.428259e-08 247 1.167324e-07 1.004018e-07 5.000000e+00 2.431040e-08 248 1.172324e-07 1.000082e-07 5.000000e+00 2.428328e-08 249 1.177324e-07 9.985059e-08 5.000000e+00 2.430816e-08 250 1.182324e-07 9.951262e-08 5.000000e+00 2.428396e-08 251 1.187324e-07 9.939404e-08 5.000000e+00 2.430621e-08 252 1.192324e-07 9.910283e-08 5.000000e+00 2.428462e-08 253 1.197324e-07 9.901587e-08 5.000000e+00 2.430451e-08 254 1.202324e-07 9.876403e-08 5.000000e+00 2.428524e-08 255 1.207324e-07 9.870258e-08 5.000000e+00 2.430302e-08 256 1.212324e-07 9.848395e-08 5.000000e+00 2.428584e-08 257 1.217324e-07 9.844299e-08 5.000000e+00 2.430172e-08 258 1.222324e-07 9.825246e-08 5.000000e+00 2.428640e-08 259 1.227324e-07 9.822788e-08 5.000000e+00 2.430057e-08 260 1.232324e-07 9.806116e-08 5.000000e+00 2.428692e-08 261 1.237324e-07 9.804958e-08 5.000000e+00 2.429957e-08 262 1.242324e-07 9.790310e-08 5.000000e+00 2.428741e-08 263 1.247324e-07 9.790177e-08 5.000000e+00 2.429869e-08 264 1.252324e-07 9.777254e-08 5.000000e+00 2.428786e-08 265 1.257324e-07 9.777920e-08 5.000000e+00 2.429791e-08 266 1.262324e-07 9.766472e-08 5.000000e+00 2.428828e-08 267 1.267324e-07 9.767754e-08 5.000000e+00 2.429723e-08 268 1.272324e-07 9.757571e-08 5.000000e+00 2.428866e-08 269 1.277324e-07 9.759320e-08 5.000000e+00 2.429663e-08 270 1.282324e-07 9.750226e-08 5.000000e+00 2.428902e-08 271 1.287324e-07 9.752320e-08 5.000000e+00 2.429610e-08 272 1.292324e-07 9.744166e-08 5.000000e+00 2.428934e-08 273 1.297324e-07 9.746507e-08 5.000000e+00 2.429563e-08 274 1.302324e-07 9.739169e-08 5.000000e+00 2.428963e-08 275 1.307324e-07 9.741679e-08 5.000000e+00 2.429522e-08 276 1.312324e-07 9.735051e-08 5.000000e+00 2.428990e-08 277 1.317324e-07 9.737667e-08 5.000000e+00 2.429485e-08 278 1.322324e-07 9.731659e-08 5.000000e+00 2.429014e-08 279 1.327324e-07 9.734331e-08 5.000000e+00 2.429453e-08 280 1.332324e-07 9.728867e-08 5.000000e+00 2.429036e-08 281 1.337324e-07 9.731555e-08 5.000000e+00 2.429425e-08 282 1.342324e-07 9.726571e-08 5.000000e+00 2.429056e-08 283 1.347324e-07 9.729244e-08 5.000000e+00 2.429400e-08 284 1.352324e-07 9.724684e-08 5.000000e+00 2.429074e-08 285 1.357324e-07 9.727318e-08 5.000000e+00 2.429378e-08 286 1.362324e-07 9.723136e-08 5.000000e+00 2.429090e-08 Index time v(11) v(12) v(13) -------------------------------------------------------------------------------- 287 1.367324e-07 9.725712e-08 5.000000e+00 2.429358e-08 288 1.372324e-07 9.721866e-08 5.000000e+00 2.429104e-08 289 1.377324e-07 9.724371e-08 5.000000e+00 2.429341e-08 290 1.382324e-07 9.720826e-08 5.000000e+00 2.429117e-08 291 1.387324e-07 9.723251e-08 5.000000e+00 2.429325e-08 292 1.392324e-07 9.719977e-08 5.000000e+00 2.429129e-08 293 1.397324e-07 9.722313e-08 5.000000e+00 2.429312e-08 294 1.402324e-07 9.719283e-08 5.000000e+00 2.429140e-08 295 1.407324e-07 9.721528e-08 5.000000e+00 2.429300e-08 296 1.412324e-07 9.718719e-08 5.000000e+00 2.429149e-08 297 1.417324e-07 9.720868e-08 5.000000e+00 2.429289e-08 298 1.422324e-07 9.718261e-08 5.000000e+00 2.429158e-08 299 1.427324e-07 9.720314e-08 5.000000e+00 2.429280e-08 300 1.432324e-07 9.717890e-08 5.000000e+00 2.429165e-08 301 1.437324e-07 9.719848e-08 5.000000e+00 2.429272e-08 302 1.442324e-07 9.717591e-08 5.000000e+00 2.429172e-08 303 1.447324e-07 9.719454e-08 5.000000e+00 2.429265e-08 304 1.452324e-07 9.717350e-08 5.000000e+00 2.429178e-08 305 1.457324e-07 9.719121e-08 5.000000e+00 2.429258e-08 306 1.462324e-07 9.717159e-08 5.000000e+00 2.429183e-08 307 1.467324e-07 9.718838e-08 5.000000e+00 2.429253e-08 308 1.472324e-07 9.717006e-08 5.000000e+00 2.429188e-08 309 1.477324e-07 9.718598e-08 5.000000e+00 2.429248e-08 310 1.482324e-07 9.716886e-08 5.000000e+00 2.429192e-08 311 1.487324e-07 9.718394e-08 5.000000e+00 2.429243e-08 312 1.492324e-07 9.716793e-08 5.000000e+00 2.429196e-08 313 1.497324e-07 9.718219e-08 5.000000e+00 2.429239e-08 314 1.500000e-07 9.716765e-08 5.000000e+00 2.429200e-08 *** NDINV * 4 Transient Analysis Sat Aug 27 16:31:59 2005 -------------------------------------------------------------------------------- Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e+00 1.436238e-08 5.000000e+00 1 5.000000e-12 5.000000e+00 2.562350e-08 5.000000e+00 2 1.000000e-11 5.000000e+00 3.683353e-08 5.000000e+00 3 2.000000e-11 5.000000e+00 5.915273e-08 5.000000e+00 4 4.000000e-11 5.000000e+00 1.031959e-07 5.000000e+00 5 8.000000e-11 5.000000e+00 1.889638e-07 5.000000e+00 6 1.600000e-10 5.000000e+00 3.515952e-07 5.000000e+00 7 1.800000e-10 5.000000e+00 3.900968e-07 5.000000e+00 8 2.200000e-10 5.000000e+00 4.657306e-07 5.000000e+00 9 3.000000e-10 5.000000e+00 6.090363e-07 5.000000e+00 10 4.600000e-10 5.000000e+00 8.662008e-07 5.000000e+00 11 6.354757e-10 5.000000e+00 1.107426e-06 5.000000e+00 12 8.960570e-10 4.999999e+00 1.398952e-06 5.000000e+00 13 1.196298e-09 4.999999e+00 1.652997e-06 5.000000e+00 14 1.610915e-09 4.999999e+00 1.893683e-06 5.000000e+00 15 2.000000e-09 4.999999e+00 2.031785e-06 5.000000e+00 16 2.050000e-09 4.999999e+00 2.044075e-06 5.000000e+00 17 2.150000e-09 4.999999e+00 2.066866e-06 5.000000e+00 18 2.350000e-09 4.999999e+00 2.102547e-06 5.000000e+00 19 2.750000e-09 4.999999e+00 2.141602e-06 5.000000e+00 20 3.250000e-09 4.999999e+00 2.145167e-06 5.000000e+00 21 3.750000e-09 4.999999e+00 2.115212e-06 5.000000e+00 22 4.235270e-09 4.999999e+00 2.066388e-06 5.000000e+00 23 4.735270e-09 4.999999e+00 2.004236e-06 5.000000e+00 24 5.235270e-09 4.999999e+00 1.935644e-06 5.000000e+00 25 5.735270e-09 4.999999e+00 1.864323e-06 5.000000e+00 26 6.235270e-09 4.999999e+00 1.792651e-06 5.000000e+00 27 6.735270e-09 4.999999e+00 1.722118e-06 5.000000e+00 28 7.235270e-09 4.999999e+00 1.653628e-06 5.000000e+00 29 7.735270e-09 4.999999e+00 1.587696e-06 5.000000e+00 30 8.235270e-09 4.999999e+00 1.524587e-06 5.000000e+00 31 8.735270e-09 4.999999e+00 1.464400e-06 5.000000e+00 32 9.235270e-09 4.999999e+00 1.407133e-06 5.000000e+00 33 9.735270e-09 4.999999e+00 1.352719e-06 5.000000e+00 34 1.023527e-08 4.999999e+00 1.301054e-06 5.000000e+00 35 1.073527e-08 4.999999e+00 1.252013e-06 5.000000e+00 36 1.123527e-08 4.999999e+00 1.205462e-06 5.000000e+00 37 1.173527e-08 4.999999e+00 1.161263e-06 5.000000e+00 38 1.223527e-08 4.999999e+00 1.119283e-06 5.000000e+00 39 1.273527e-08 4.999999e+00 1.079390e-06 5.000000e+00 40 1.323527e-08 4.999999e+00 1.041460e-06 5.000000e+00 41 1.373527e-08 4.999999e+00 1.005376e-06 5.000000e+00 42 1.423527e-08 4.999999e+00 9.710274e-07 5.000000e+00 43 1.473527e-08 4.999999e+00 9.383102e-07 5.000000e+00 44 1.523527e-08 4.999999e+00 9.071280e-07 5.000000e+00 45 1.573527e-08 4.999999e+00 8.773903e-07 5.000000e+00 46 1.623527e-08 4.999999e+00 8.490130e-07 5.000000e+00 47 1.673527e-08 4.999999e+00 8.219177e-07 5.000000e+00 48 1.723527e-08 4.999999e+00 7.960313e-07 5.000000e+00 49 1.773527e-08 4.999999e+00 7.712854e-07 5.000000e+00 50 1.823527e-08 4.999999e+00 7.476166e-07 5.000000e+00 51 1.873527e-08 4.999999e+00 7.249653e-07 5.000000e+00 52 1.923527e-08 4.999999e+00 7.032763e-07 5.000000e+00 53 1.973527e-08 4.999999e+00 6.824976e-07 5.000000e+00 54 2.023527e-08 4.999999e+00 6.625807e-07 5.000000e+00 Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 55 2.073527e-08 4.999999e+00 6.434803e-07 5.000000e+00 56 2.123527e-08 4.999999e+00 6.251540e-07 5.000000e+00 57 2.173527e-08 4.999999e+00 6.075618e-07 5.000000e+00 58 2.223527e-08 4.999999e+00 5.906666e-07 5.000000e+00 59 2.273527e-08 4.999999e+00 5.744331e-07 5.000000e+00 60 2.323527e-08 4.999999e+00 5.588286e-07 5.000000e+00 61 2.373527e-08 4.999999e+00 5.438219e-07 5.000000e+00 62 2.423527e-08 4.999999e+00 5.293841e-07 5.000000e+00 63 2.473527e-08 4.999999e+00 5.154878e-07 5.000000e+00 64 2.523527e-08 4.999999e+00 5.021071e-07 5.000000e+00 65 2.573527e-08 4.999999e+00 4.892177e-07 5.000000e+00 66 2.623527e-08 5.000000e+00 4.767968e-07 5.000000e+00 67 2.673527e-08 5.000000e+00 4.648226e-07 5.000000e+00 68 2.723527e-08 5.000000e+00 4.532748e-07 5.000000e+00 69 2.773527e-08 5.000000e+00 4.421340e-07 5.000000e+00 70 2.823527e-08 5.000000e+00 4.313820e-07 5.000000e+00 71 2.873527e-08 5.000000e+00 4.210016e-07 5.000000e+00 72 2.923527e-08 5.000000e+00 4.109764e-07 5.000000e+00 73 2.973527e-08 5.000000e+00 4.012910e-07 5.000000e+00 74 3.023527e-08 5.000000e+00 3.919308e-07 5.000000e+00 75 3.073527e-08 5.000000e+00 3.828817e-07 5.000000e+00 76 3.123527e-08 5.000000e+00 3.741308e-07 5.000000e+00 77 3.173527e-08 5.000000e+00 3.656654e-07 5.000000e+00 78 3.223527e-08 5.000000e+00 3.574738e-07 5.000000e+00 79 3.273527e-08 5.000000e+00 3.495447e-07 5.000000e+00 80 3.323527e-08 5.000000e+00 3.418674e-07 5.000000e+00 81 3.373527e-08 5.000000e+00 3.344317e-07 5.000000e+00 82 3.423527e-08 5.000000e+00 3.272279e-07 5.000000e+00 83 3.473527e-08 5.000000e+00 3.202468e-07 5.000000e+00 84 3.523527e-08 5.000000e+00 3.134797e-07 5.000000e+00 85 3.573527e-08 5.000000e+00 3.069182e-07 5.000000e+00 86 3.623527e-08 5.000000e+00 3.005543e-07 5.000000e+00 87 3.673527e-08 5.000000e+00 2.943806e-07 5.000000e+00 88 3.723527e-08 5.000000e+00 2.883897e-07 5.000000e+00 89 3.773527e-08 5.000000e+00 2.825748e-07 5.000000e+00 90 3.823527e-08 5.000000e+00 2.769292e-07 5.000000e+00 91 3.873527e-08 5.000000e+00 2.714468e-07 5.000000e+00 92 3.923527e-08 5.000000e+00 2.661214e-07 5.000000e+00 93 3.973527e-08 5.000000e+00 2.609471e-07 5.000000e+00 94 4.023527e-08 5.000000e+00 2.559187e-07 5.000000e+00 95 4.073527e-08 5.000000e+00 2.510311e-07 5.000000e+00 96 4.123527e-08 5.000000e+00 2.462794e-07 5.000000e+00 97 4.173527e-08 5.000000e+00 2.416591e-07 5.000000e+00 98 4.223527e-08 5.000000e+00 2.371650e-07 5.000000e+00 99 4.273527e-08 5.000000e+00 2.327925e-07 5.000000e+00 100 4.323527e-08 5.000000e+00 2.285489e-07 5.000000e+00 101 4.373527e-08 5.000000e+00 2.244506e-07 5.000000e+00 102 4.423527e-08 5.000000e+00 2.204626e-07 5.000000e+00 103 4.473527e-08 5.000000e+00 2.165502e-07 5.000000e+00 104 4.523527e-08 5.000000e+00 2.127227e-07 5.000000e+00 105 4.573527e-08 5.000000e+00 2.089846e-07 5.000000e+00 106 4.623527e-08 5.000000e+00 2.053389e-07 5.000000e+00 107 4.673527e-08 5.000000e+00 2.017871e-07 5.000000e+00 108 4.723527e-08 5.000000e+00 1.983302e-07 5.000000e+00 109 4.773527e-08 5.000000e+00 1.949691e-07 5.000000e+00 110 4.823527e-08 5.000000e+00 1.917050e-07 5.000000e+00 111 4.873527e-08 5.000000e+00 1.874695e-07 5.000000e+00 112 4.923527e-08 4.999999e+00 1.817704e-07 5.000000e+00 Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 113 4.973527e-08 4.999998e+00 1.754222e-07 5.000000e+00 114 5.023527e-08 4.999997e+00 1.688391e-07 5.000000e+00 115 5.073527e-08 4.999995e+00 1.622753e-07 5.000000e+00 116 5.123527e-08 4.999994e+00 1.558807e-07 5.000000e+00 117 5.173527e-08 4.999992e+00 1.496973e-07 5.000000e+00 118 5.223527e-08 4.999990e+00 1.436628e-07 5.000000e+00 119 5.273527e-08 4.999988e+00 1.375889e-07 5.000000e+00 120 5.323527e-08 4.999985e+00 1.313805e-07 5.000000e+00 121 5.373527e-08 4.999990e+00 1.581281e-07 5.000000e+00 122 5.423527e-08 5.000018e+00 2.778349e-07 5.000000e+00 123 5.473527e-08 5.000084e+00 5.314870e-07 5.000000e+00 124 5.523527e-08 5.000201e+00 9.386964e-07 5.000000e+00 125 5.573527e-08 5.000378e+00 1.509576e-06 5.000000e+00 126 5.623527e-08 5.000625e+00 2.254716e-06 5.000000e+00 127 5.673527e-08 5.000951e+00 3.189877e-06 5.000000e+00 128 5.723527e-08 5.001363e+00 4.335638e-06 5.000000e+00 129 5.773527e-08 5.001875e+00 5.735936e-06 5.000000e+00 130 5.823527e-08 5.002515e+00 7.527478e-06 5.000000e+00 131 5.873527e-08 5.002557e+00 6.287840e-06 5.000000e+00 132 5.923527e-08 4.991720e+00 -4.199799e-05 4.999999e+00 133 5.973527e-08 4.952418e+00 -1.978542e-04 4.999998e+00 134 6.023527e-08 4.874456e+00 -4.702047e-04 4.999995e+00 135 6.073527e-08 4.752034e+00 -8.478336e-04 4.999992e+00 136 6.123527e-08 4.594488e+00 -1.259188e-03 4.999989e+00 137 6.173527e-08 4.422671e+00 -1.606621e-03 4.999988e+00 138 6.223527e-08 4.241183e+00 -1.893983e-03 4.999988e+00 139 6.273527e-08 4.048069e+00 -2.152141e-03 4.999988e+00 140 6.323527e-08 3.845027e+00 3.128803e-03 5.000055e+00 141 6.373238e-08 3.635138e+00 2.347570e-02 5.000287e+00 142 6.423238e-08 3.420332e+00 5.860337e-02 5.000634e+00 143 6.473238e-08 3.206902e+00 1.040992e-01 5.001012e+00 144 6.523238e-08 2.997576e+00 1.598930e-01 5.001415e+00 145 6.573238e-08 2.794290e+00 2.254884e-01 5.001831e+00 146 6.623238e-08 2.598535e+00 3.008256e-01 5.002261e+00 147 6.673238e-08 2.411324e+00 3.862450e-01 5.002710e+00 148 6.723238e-08 2.233347e+00 4.828159e-01 5.003190e+00 149 6.773238e-08 2.064978e+00 5.926653e-01 5.003726e+00 150 6.823238e-08 1.906488e+00 7.194470e-01 5.003867e+00 151 6.873238e-08 1.757968e+00 8.684762e-01 4.999187e+00 152 6.923238e-08 1.619089e+00 1.046528e+00 4.985146e+00 153 6.973238e-08 1.489543e+00 1.255962e+00 4.960367e+00 154 7.023238e-08 1.369102e+00 1.493058e+00 4.923432e+00 155 7.073238e-08 1.257672e+00 1.752802e+00 4.872926e+00 156 7.123238e-08 1.155305e+00 2.028432e+00 4.807330e+00 157 7.173238e-08 1.061541e+00 2.312196e+00 4.724976e+00 158 7.223238e-08 9.756765e-01 2.596602e+00 4.623885e+00 159 7.273238e-08 8.970774e-01 2.874937e+00 4.501471e+00 160 7.323238e-08 8.250815e-01 3.141435e+00 4.353865e+00 161 7.373238e-08 7.590429e-01 3.391794e+00 4.175130e+00 162 7.423238e-08 6.982908e-01 3.622713e+00 3.959390e+00 163 7.473238e-08 6.422682e-01 3.829909e+00 3.707803e+00 164 7.523238e-08 5.904753e-01 4.011410e+00 3.427083e+00 165 7.573238e-08 5.425685e-01 4.168573e+00 3.123403e+00 166 7.623238e-08 4.982549e-01 4.303314e+00 2.802591e+00 167 7.673238e-08 4.572711e-01 4.417740e+00 2.476153e+00 168 7.723238e-08 4.193845e-01 4.514252e+00 2.159822e+00 169 7.773238e-08 3.843894e-01 4.595162e+00 1.865054e+00 170 7.823238e-08 3.520942e-01 4.662788e+00 1.597796e+00 Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 171 7.873238e-08 3.223269e-01 4.719318e+00 1.360289e+00 172 7.923238e-08 2.949163e-01 4.766526e+00 1.152358e+00 173 7.973238e-08 2.697023e-01 4.805907e+00 9.721881e-01 174 8.023238e-08 2.465283e-01 4.838720e+00 8.176079e-01 175 8.073238e-08 2.252496e-01 4.866038e+00 6.862371e-01 176 8.123238e-08 2.057246e-01 4.888765e+00 5.757461e-01 177 8.173238e-08 1.878242e-01 4.907656e+00 4.832360e-01 178 8.223238e-08 1.714235e-01 4.923336e+00 4.050886e-01 179 8.273238e-08 1.564077e-01 4.936345e+00 3.390605e-01 180 8.323238e-08 1.426676e-01 4.947131e+00 2.835923e-01 181 8.373238e-08 1.301033e-01 4.956073e+00 2.369319e-01 182 8.423238e-08 1.186185e-01 4.963483e+00 1.976818e-01 183 8.473238e-08 1.081262e-01 4.969626e+00 1.646930e-01 184 8.523238e-08 9.854330e-02 4.974718e+00 1.370097e-01 185 8.573238e-08 8.979512e-02 4.978942e+00 1.138236e-01 186 8.623238e-08 8.181077e-02 4.982446e+00 9.444649e-02 187 8.673238e-08 7.452642e-02 4.985355e+00 7.828091e-02 188 8.723238e-08 6.788188e-02 4.987771e+00 6.481909e-02 189 8.773238e-08 6.182299e-02 4.989778e+00 5.362510e-02 190 8.823238e-08 5.629885e-02 4.991447e+00 4.433126e-02 191 8.873238e-08 5.126373e-02 4.992836e+00 3.662346e-02 192 8.923238e-08 4.667478e-02 4.993992e+00 3.023912e-02 193 8.973238e-08 4.249350e-02 4.994955e+00 2.495497e-02 194 9.023238e-08 3.868394e-02 4.995758e+00 2.058599e-02 195 9.073238e-08 3.521379e-02 4.996428e+00 1.697531e-02 196 9.123238e-08 3.205297e-02 4.996987e+00 1.399403e-02 197 9.173238e-08 2.917443e-02 4.997455e+00 1.153287e-02 198 9.223238e-08 2.655306e-02 4.997846e+00 9.502804e-03 199 9.273238e-08 2.416623e-02 4.998175e+00 7.828207e-03 200 9.323238e-08 2.199305e-02 4.998450e+00 6.448012e-03 201 9.373238e-08 2.001460e-02 4.998681e+00 5.310098e-03 202 9.423238e-08 1.821353e-02 4.998875e+00 4.372808e-03 203 9.473238e-08 1.657405e-02 4.999039e+00 3.600314e-03 204 9.523238e-08 1.508175e-02 4.999177e+00 2.964336e-03 205 9.573238e-08 1.372346e-02 4.999294e+00 2.440273e-03 206 9.623238e-08 1.248725e-02 4.999392e+00 2.009011e-03 207 9.673238e-08 1.136214e-02 4.999476e+00 1.653655e-03 208 9.723238e-08 1.033826e-02 4.999547e+00 1.361344e-03 209 9.773238e-08 9.406436e-03 4.999608e+00 1.120464e-03 210 9.823238e-08 8.558531e-03 4.999659e+00 9.224013e-04 211 9.873238e-08 7.786888e-03 4.999704e+00 7.591510e-04 212 9.923238e-08 7.084798e-03 4.999741e+00 6.249824e-04 213 9.973238e-08 6.445866e-03 4.999774e+00 5.143553e-04 214 1.002324e-07 5.864573e-03 4.999802e+00 4.234857e-04 215 1.007324e-07 5.335572e-03 4.999826e+00 3.485198e-04 216 1.012324e-07 4.854332e-03 4.999847e+00 2.869848e-04 217 1.017324e-07 4.416377e-03 4.999865e+00 2.361809e-04 218 1.022324e-07 4.017996e-03 4.999880e+00 1.945160e-04 219 1.027324e-07 3.655438e-03 4.999894e+00 1.600813e-04 220 1.032324e-07 3.325670e-03 4.999906e+00 1.318734e-04 221 1.037324e-07 3.025541e-03 4.999917e+00 1.085281e-04 222 1.042324e-07 2.752581e-03 4.999926e+00 8.943323e-05 223 1.047324e-07 2.504141e-03 4.999934e+00 7.360058e-05 224 1.052324e-07 2.278213e-03 4.999941e+00 6.067650e-05 225 1.057324e-07 2.072565e-03 4.999947e+00 4.993388e-05 226 1.062324e-07 1.885573e-03 4.999953e+00 4.118805e-05 227 1.067324e-07 1.715349e-03 4.999957e+00 3.389456e-05 228 1.072324e-07 1.560587e-03 4.999962e+00 2.797770e-05 Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 229 1.077324e-07 1.419688e-03 4.999966e+00 2.302192e-05 230 1.082324e-07 1.291605e-03 4.999969e+00 1.902039e-05 231 1.087324e-07 1.174979e-03 4.999972e+00 1.564951e-05 232 1.092324e-07 1.068980e-03 4.999975e+00 1.294464e-05 233 1.097324e-07 9.724459e-04 4.999977e+00 1.064870e-05 234 1.102324e-07 8.847245e-04 4.999980e+00 8.821602e-06 235 1.107324e-07 8.048211e-04 4.999982e+00 7.255082e-06 236 1.112324e-07 7.322278e-04 4.999983e+00 6.022118e-06 237 1.117324e-07 6.660896e-04 4.999985e+00 4.950902e-06 238 1.122324e-07 6.060171e-04 4.999986e+00 4.120011e-06 239 1.127324e-07 5.512721e-04 4.999988e+00 3.385409e-06 240 1.132324e-07 5.015623e-04 4.999989e+00 2.826546e-06 241 1.137324e-07 4.562471e-04 4.999990e+00 2.320958e-06 242 1.142324e-07 4.151136e-04 4.999991e+00 1.946068e-06 243 1.147324e-07 3.776034e-04 4.999992e+00 1.596510e-06 244 1.152324e-07 3.435677e-04 4.999992e+00 1.345971e-06 245 1.157324e-07 3.125174e-04 4.999993e+00 1.102906e-06 246 1.162324e-07 2.843556e-04 4.999994e+00 9.363514e-07 247 1.167324e-07 2.586520e-04 4.999994e+00 7.661366e-07 248 1.172324e-07 2.353514e-04 4.999995e+00 6.562366e-07 249 1.177324e-07 2.140730e-04 4.999995e+00 5.360015e-07 250 1.182324e-07 1.947952e-04 4.999996e+00 4.642580e-07 251 1.187324e-07 1.771796e-04 4.999996e+00 3.784379e-07 252 1.192324e-07 1.612309e-04 4.999996e+00 3.323331e-07 253 1.197324e-07 1.466468e-04 4.999997e+00 2.703196e-07 254 1.202324e-07 1.334530e-04 4.999997e+00 2.413860e-07 255 1.207324e-07 1.213781e-04 4.999997e+00 1.959355e-07 256 1.212324e-07 1.104640e-04 4.999998e+00 1.784493e-07 257 1.217324e-07 1.004659e-04 4.999998e+00 1.446040e-07 258 1.222324e-07 9.143827e-05 4.999998e+00 1.346994e-07 259 1.227324e-07 8.315926e-05 4.999998e+00 1.090560e-07 260 1.232324e-07 7.569258e-05 4.999998e+00 1.041255e-07 261 1.237324e-07 6.883649e-05 4.999998e+00 8.433922e-08 262 1.242324e-07 6.266144e-05 4.999999e+00 8.262760e-08 263 1.247324e-07 5.698317e-05 4.999999e+00 6.707496e-08 264 1.252324e-07 5.187685e-05 4.999999e+00 6.740387e-08 265 1.257324e-07 4.717357e-05 4.999999e+00 5.495464e-08 266 1.262324e-07 4.295150e-05 4.999999e+00 5.653612e-08 267 1.267324e-07 3.905531e-05 4.999999e+00 4.639770e-08 268 1.272324e-07 3.556486e-05 4.999999e+00 4.870778e-08 269 1.277324e-07 3.233681e-05 4.999999e+00 4.031954e-08 270 1.282324e-07 2.945163e-05 4.999999e+00 4.301262e-08 271 1.287324e-07 2.677673e-05 4.999999e+00 3.597389e-08 272 1.292324e-07 2.439229e-05 4.999999e+00 3.882470e-08 273 1.297324e-07 2.217534e-05 4.999999e+00 3.284567e-08 274 1.302324e-07 2.020514e-05 5.000000e+00 3.570989e-08 275 1.307324e-07 1.836735e-05 5.000000e+00 3.057801e-08 276 1.312324e-07 1.673980e-05 5.000000e+00 3.336569e-08 277 1.317324e-07 1.521598e-05 5.000000e+00 2.892263e-08 278 1.322324e-07 1.387184e-05 5.000000e+00 3.158009e-08 279 1.327324e-07 1.260801e-05 5.000000e+00 2.770595e-08 280 1.332324e-07 1.149827e-05 5.000000e+00 3.020359e-08 281 1.337324e-07 1.044975e-05 5.000000e+00 2.680595e-08 282 1.342324e-07 9.533852e-06 5.000000e+00 2.912997e-08 283 1.347324e-07 8.663663e-06 5.000000e+00 2.613631e-08 284 1.352324e-07 7.908050e-06 5.000000e+00 2.828316e-08 285 1.357324e-07 7.185580e-06 5.000000e+00 2.563555e-08 286 1.362324e-07 6.562488e-06 5.000000e+00 2.760817e-08 Index time v(41) v(42) v(43) -------------------------------------------------------------------------------- 287 1.367324e-07 5.962395e-06 5.000000e+00 2.525960e-08 288 1.372324e-07 5.448852e-06 5.000000e+00 2.706486e-08 289 1.377324e-07 4.950158e-06 5.000000e+00 2.497656e-08 290 1.382324e-07 4.527159e-06 5.000000e+00 2.662364e-08 291 1.387324e-07 4.112497e-06 5.000000e+00 2.476318e-08 292 1.392324e-07 3.764319e-06 5.000000e+00 2.626242e-08 293 1.397324e-07 3.419310e-06 5.000000e+00 2.460239e-08 294 1.402324e-07 3.132949e-06 5.000000e+00 2.596457e-08 295 1.407324e-07 2.845685e-06 5.000000e+00 2.448151e-08 296 1.412324e-07 2.610383e-06 5.000000e+00 2.571738e-08 297 1.417324e-07 2.371007e-06 5.000000e+00 2.439108e-08 298 1.422324e-07 2.177866e-06 5.000000e+00 2.551106e-08 299 1.427324e-07 1.978213e-06 5.000000e+00 2.432395e-08 300 1.432324e-07 1.819874e-06 5.000000e+00 2.533797e-08 301 1.437324e-07 1.653184e-06 5.000000e+00 2.427472e-08 302 1.442324e-07 1.523562e-06 5.000000e+00 2.519211e-08 303 1.447324e-07 1.384234e-06 5.000000e+00 2.423923e-08 304 1.452324e-07 1.278297e-06 5.000000e+00 2.506868e-08 305 1.457324e-07 1.161691e-06 5.000000e+00 2.421432e-08 306 1.462324e-07 1.075281e-06 5.000000e+00 2.496386e-08 307 1.467324e-07 9.775538e-07 5.000000e+00 2.419751e-08 308 1.472324e-07 9.072309e-07 5.000000e+00 2.487455e-08 309 1.477324e-07 8.251979e-07 5.000000e+00 2.418689e-08 310 1.482324e-07 7.681210e-07 5.000000e+00 2.479821e-08 311 1.487324e-07 6.991421e-07 5.000000e+00 2.418098e-08 312 1.492324e-07 6.529633e-07 5.000000e+00 2.473279e-08 313 1.497324e-07 5.948504e-07 5.000000e+00 2.417862e-08 314 1.500000e-07 5.780658e-07 5.000000e+00 2.467159e-08 CPU time since last call: 0.560 seconds. Total CPU time: 0.560 seconds. Current dynamic memory usage = 270336, Dynamic memory limit = -491521. ngspice-26/tests/mos6/Makefile.am0000644000265600020320000000042412264261473016313 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ mos6inv.cir \ simpleinv.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/mos6/simpleinv.cir0000644000265600020320000000245112264261473016766 0ustar andreasadmin*** NDINV * 4 VDD 100 0 5 VIN 1 0 DC 0 PWL(0 0 150N 5) MP10 11 1 100 100 p12l5 L=1.0U W=5U MN11 11 1 0 0 N10L5 L=1.0U W=5U .TRAN 0.5N 150N .PRINT TRAN V(1) V(11) .OPTIONS NOACCT **** LEVEL 1 NMOS **** .MODEL N10L1 NMOS + LEVEL=1 TPG=1 + KP=2.33082E-05 + LAMBDA=0.013333 VT0=0.69486 GAMMA=0.60309 PHI=1 + TOX=1.9800000E-08 LD=0.1U NSUB=4.9999999E+16 + NSS=0.0000000E+00 + CJ=4.091E-4 MJ=0.307 PB=1.0 + CJSW=3.078E-10 MJSW=1.0E-2 + CGSO=3.93E-10 CGDO=3.93E-10 **** LEVEL 6 NMOS **** .MODEL N10L5 NMOS + LEVEL=6 TPG=1 + KC=3.8921e-05 NC=1.1739 KV=0.91602 NV=0.87225 + LAMBDA0=0.013333 LAMBDA1=0.0046901 VT0=0.69486 GAMMA=0.60309 PHI=1 + TOX=1.9800000E-08 LD=0.1U NSUB=4.9999999E+16 + NSS=0.0000000E+00 + CJ=4.091E-4 MJ=0.307 PB=1.0 + CJSW=3.078E-10 MJSW=1.0E-2 + CGSO=3.93E-10 CGDO=3.93E-10 **** LEVEL 6 PMOS **** .MODEL P12L5 PMOS + LEVEL=6 TPG=-1 + KC=6.42696E-06 NC=1.6536 KV=0.92145 NV=0.88345 + LAMBDA0=0.018966 LAMBDA1=0.0084012 VT0=-0.60865 GAMMA=0.89213 PHI=1 + TOX=1.9800000E-08 LD=0.28U NSUB=4.9999999E+17 + NSS=0.0000000E+00 + CJ=6.852E-4 MJ=0.429 PB=1.0 + CJSW=5.217E-10 MJSW=0.351 + CGSO=7.29E-10 CGDO=7.29E-10 .END ngspice-26/tests/mos6/Makefile.in0000644000265600020320000003354012264261542016326 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/mos6 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ mos6inv.cir \ simpleinv.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/mos6/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/mos6/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/filters/0000755000265600020320000000000012264261714015041 5ustar andreasadminngspice-26/tests/filters/lowpass.out0000644000265600020320000001056212264261473017270 0ustar andreasadmin No. of Data Rows : 31 No. of Data Rows : 1 Circuit: A Simple AC Run Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 a simple ac run .op .ac dec 10 1k 1meg v1 1 0 dc 0 ac 1 sin 0 1 1k 0 0 distof1 0 distof2 0 r1 1 2 10k r2 2 0 10k c1 2 0 1n .options list node post trans .end Node Voltage ---- ------- ---- ------- V(2) 0.000000e+00 V(1) 0.000000e+00 Source Current ------ ------- v1#branch 0.000000e+00 Capacitor models (Fixed capacitor) model C cap 0 cj 0 cjsw 0 defw 1e-05 defl 0 narrow 0 short 0 tc1 0 tc2 0 di 0 thick 0 Resistor models (Simple linear resistor) model R rsh 0 narrow 0 short 0 tc1 0 tc2 0 defw 1e-05 kf 0 af 0 Capacitor: Fixed capacitor device c1 model C capacitance 1e-09 cap 1e-09 c 1e-09 dtemp 0 i 0 p 0 Resistor: Simple linear resistor device r2 r1 model R R resistance 10000 10000 ac 10000 10000 dtemp 0 0 noisy 1 1 i 0 0 p 0 0 Vsource: Independent voltage source device v1 dc 0 acmag 1 i 0 p -0 A Simple AC Run -------------------------------------------------------------------------------- Index frequency v(2) -------------------------------------------------------------------------------- 0 1.000000e+03, 0.000000e+00 4.995070e-01, -1.569248e-02 1 1.258925e+03, 0.000000e+00 4.992191e-01, -1.974427e-02 2 1.584893e+03, 0.000000e+00 4.987635e-01, -2.483388e-02 3 1.995262e+03, 0.000000e+00 4.980431e-01, -3.121884e-02 4 2.511886e+03, 0.000000e+00 4.969056e-01, -3.921243e-02 5 3.162278e+03, 0.000000e+00 4.951134e-01, -4.918748e-02 6 3.981072e+03, 0.000000e+00 4.922993e-01, -6.157141e-02 7 5.011872e+03, 0.000000e+00 4.879042e-01, -7.682179e-02 8 6.309573e+03, 0.000000e+00 4.810969e-01, -9.536356e-02 9 7.943282e+03, 0.000000e+00 4.706888e-01, -1.174583e-01 10 1.000000e+04, 0.000000e+00 4.550849e-01, -1.429691e-01 11 1.258925e+04, 0.000000e+00 4.323679e-01, -1.710028e-01 12 1.584893e+04, 0.000000e+00 4.006689e-01, -1.994966e-01 13 1.995262e+04, 0.000000e+00 3.589592e-01, -2.250064e-01 14 2.511886e+04, 0.000000e+00 3.081227e-01, -2.431496e-01 15 3.162278e+04, 0.000000e+00 2.516406e-01, -2.499946e-01 16 3.981072e+04, 0.000000e+00 1.949905e-01, -2.438728e-01 17 5.011872e+04, 0.000000e+00 1.437140e-01, -2.262814e-01 18 6.309573e+04, 0.000000e+00 1.014372e-01, -2.010698e-01 19 7.943282e+04, 0.000000e+00 6.918213e-02, -1.726410e-01 20 1.000000e+05, 0.000000e+00 4.599983e-02, -1.445127e-01 21 1.258925e+05, 0.000000e+00 3.004398e-02, -1.188249e-01 22 1.584893e+05, 0.000000e+00 1.938636e-02, -9.652642e-02 23 1.995262e+05, 0.000000e+00 1.240953e-02, -7.778670e-02 24 2.511886e+05, 0.000000e+00 7.902266e-03, -6.235934e-02 25 3.162278e+05, 0.000000e+00 5.015244e-03, -4.982439e-02 26 3.981072e+05, 0.000000e+00 3.176162e-03, -3.972396e-02 27 5.011872e+05, 0.000000e+00 2.008732e-03, -3.162801e-02 28 6.309573e+05, 0.000000e+00 1.269306e-03, -2.516032e-02 29 7.943282e+05, 0.000000e+00 8.016290e-04, -2.000430e-02 30 1.000000e+06, 0.000000e+00 5.060931e-04, -1.589938e-02 ngspice-26/tests/filters/lowpass.cir0000644000265600020320000000026712264261473017237 0ustar andreasadminA Simple AC Run .OPTIONS LIST NODE POST TRANS noacct .OP .AC DEC 10 1k 1Meg .PRINT AC V(2) V1 1 0 DC 0 AC 1 SIN 0 1 1K 0 0 DISTOF1 0 DISTOF2 0 R1 1 2 10k R2 2 0 10k C1 2 0 1n .END ngspice-26/tests/filters/Makefile.am0000644000265600020320000000040112264261473017072 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ lowpass.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/filters/Makefile.in0000644000265600020320000003352712264261541017116 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/filters DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ lowpass.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/filters/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/filters/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soidd/0000755000265600020320000000000012264261714015431 5ustar andreasadminngspice-26/tests/bsim3soidd/t3.cir0000644000265600020320000000043412264261473016461 0ustar andreasadmin*model = BSIMSOI (DD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 1.5 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vd 0 3 0.01 vg 0.5 3 0.5 .print dc v(g), i(vs) .include nmosdd.mod ngspice-26/tests/bsim3soidd/lib.h0000644000265600020320000001042512264261473016354 0ustar andreasadmin .subckt dum ss mn1 ss ss ss ss ss n1 w=4u l=0.15u debug=1 AS=6p AD=6p PS=7u PD=7u .ends dum * XOR2 .subckt xnor2 dd ss sub A B out mn1 T1 A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out A C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn5 C2 T1 ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 T1 A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 T1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out A C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp5 out T1 dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends xnor2 .subckt nor2 dd ss sub A B out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor2 .subckt nand2 dd ss sub A B out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand2 .subckt nor3 dd ss sub A B C out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor3 .subckt nand3 dd ss sub A B C out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand3 .subckt nor4 dd ss sub A B C D out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor4 .subckt nand4 dd ss sub A B C D out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C C3 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 C3 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand4 .subckt inv1 dd ss sub in out mn1 out in ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out in dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends inv1 .subckt inv5 dd ss sub in out xinv1 dd ss sub in 1 inv1 xinv2 dd ss sub 1 2 inv1 xinv3 dd ss sub 2 3 inv1 xinv4 dd ss sub 3 4 inv1 xinv5 dd ss sub 4 out inv1 .ends inv5 .subckt inv25 dd ss sub in out xinv1 dd ss sub in 1 inv5 xinv2 dd ss sub 1 2 inv5 xinv3 dd ss sub 2 3 inv5 xinv4 dd ss sub 3 4 inv5 xinv5 dd ss sub 4 out inv5 .ends inv25 .subckt inv125 dd ss sub in out xinv1 dd ss sub in 1 inv25 xinv2 dd ss sub 1 2 inv25 xinv3 dd ss sub 2 3 inv25 xinv4 dd ss sub 3 4 inv25 xinv5 dd ss sub 4 out inv25 .ends inv125 .subckt inv625 dd ss sub in out xinv1 dd ss sub in 1 inv125 xinv2 dd ss sub 1 2 inv125 xinv3 dd ss sub 2 3 inv125 xinv4 dd ss sub 3 4 inv125 xinv5 dd ss sub 4 out inv125 .ends inv625 ngspice-26/tests/bsim3soidd/t5.out0000644000265600020320000013114412264261473016520 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (DD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (DD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 2.064981e-12 1 1.000000e-02 2.750991e-12 2 2.000000e-02 4.012634e-12 3 3.000000e-02 5.593057e-12 4 4.000000e-02 7.795398e-12 5 5.000000e-02 1.086403e-11 6 6.000000e-02 1.513914e-11 7 7.000000e-02 2.109411e-11 8 8.000000e-02 2.938743e-11 9 9.000000e-02 4.093474e-11 10 1.000000e-01 5.700856e-11 11 1.100000e-01 7.937633e-11 12 1.200000e-01 1.104912e-10 13 1.300000e-01 1.537552e-10 14 1.400000e-01 2.138818e-10 15 1.500000e-01 2.973940e-10 16 1.600000e-01 4.133010e-10 17 1.700000e-01 5.739877e-10 18 1.800000e-01 7.965107e-10 19 1.900000e-01 1.104291e-09 20 2.000000e-01 1.529397e-09 21 2.100000e-01 2.115610e-09 22 2.200000e-01 2.922495e-09 23 2.300000e-01 4.030771e-09 24 2.400000e-01 5.549341e-09 25 2.500000e-01 7.624372e-09 26 2.600000e-01 1.045092e-08 27 2.700000e-01 1.428761e-08 28 2.800000e-01 1.947483e-08 29 2.900000e-01 2.645706e-08 30 3.000000e-01 3.580963e-08 31 3.100000e-01 4.827032e-08 32 3.200000e-01 6.477582e-08 33 3.300000e-01 8.650332e-08 34 3.400000e-01 1.149169e-07 35 3.500000e-01 1.518190e-07 36 3.600000e-01 1.994073e-07 37 3.700000e-01 2.603381e-07 38 3.800000e-01 3.377970e-07 39 3.900000e-01 4.355794e-07 40 4.000000e-01 5.581821e-07 41 4.100000e-01 7.108746e-07 42 4.200000e-01 8.996268e-07 43 4.300000e-01 1.131406e-06 44 4.400000e-01 1.414288e-06 45 4.500000e-01 1.757461e-06 46 4.600000e-01 2.171230e-06 47 4.700000e-01 2.666926e-06 48 4.800000e-01 3.256704e-06 49 4.900000e-01 3.953195e-06 50 5.000000e-01 4.769004e-06 51 5.100000e-01 5.716084e-06 52 5.200000e-01 6.805016e-06 53 5.300000e-01 8.044296e-06 54 5.400000e-01 9.439702e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 1.099386e-05 56 5.600000e-01 1.270604e-05 57 5.700000e-01 1.457225e-05 58 5.800000e-01 1.658558e-05 59 5.900000e-01 1.873680e-05 60 6.000000e-01 2.101516e-05 61 6.100000e-01 2.340955e-05 62 6.200000e-01 2.591048e-05 63 6.300000e-01 2.851274e-05 64 6.400000e-01 3.121346e-05 65 6.500000e-01 3.400052e-05 66 6.600000e-01 3.685373e-05 67 6.700000e-01 3.975537e-05 68 6.800000e-01 4.269170e-05 69 6.900000e-01 4.565163e-05 70 7.000000e-01 4.862588e-05 71 7.100000e-01 5.160659e-05 72 7.200000e-01 5.458710e-05 73 7.300000e-01 5.756173e-05 74 7.400000e-01 6.052572e-05 75 7.500000e-01 6.347508e-05 76 7.600000e-01 6.640647e-05 77 7.700000e-01 6.931717e-05 78 7.800000e-01 7.220492e-05 79 7.900000e-01 7.506790e-05 80 8.000000e-01 7.790465e-05 81 8.100000e-01 8.071404e-05 82 8.200000e-01 8.349515e-05 83 8.300000e-01 8.624734e-05 84 8.400000e-01 8.897010e-05 85 8.500000e-01 9.166311e-05 86 8.600000e-01 9.432618e-05 87 8.700000e-01 9.695919e-05 88 8.800000e-01 9.956217e-05 89 8.900000e-01 1.021352e-04 90 9.000000e-01 1.046784e-04 91 9.100000e-01 1.071919e-04 92 9.200000e-01 1.096760e-04 93 9.300000e-01 1.121311e-04 94 9.400000e-01 1.145573e-04 95 9.500000e-01 1.169550e-04 96 9.600000e-01 1.193245e-04 97 9.700000e-01 1.216663e-04 98 9.800000e-01 1.239807e-04 99 9.900000e-01 1.262681e-04 100 1.000000e+00 1.285289e-04 101 1.010000e+00 1.307633e-04 102 1.020000e+00 1.329719e-04 103 1.030000e+00 1.351550e-04 104 1.040000e+00 1.373130e-04 105 1.050000e+00 1.394460e-04 106 1.060000e+00 1.415546e-04 107 1.070000e+00 1.436388e-04 108 1.080000e+00 1.456991e-04 109 1.090000e+00 1.477355e-04 110 1.100000e+00 1.497483e-04 111 1.110000e+00 1.517378e-04 112 1.120000e+00 1.537039e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 1.556471e-04 114 1.140000e+00 1.575674e-04 115 1.150000e+00 1.594649e-04 116 1.160000e+00 1.613400e-04 117 1.170000e+00 1.631927e-04 118 1.180000e+00 1.650234e-04 119 1.190000e+00 1.668322e-04 120 1.200000e+00 1.686193e-04 121 1.210000e+00 1.703850e-04 122 1.220000e+00 1.721295e-04 123 1.230000e+00 1.738531e-04 124 1.240000e+00 1.755561e-04 125 1.250000e+00 1.772387e-04 126 1.260000e+00 1.789011e-04 127 1.270000e+00 1.805436e-04 128 1.280000e+00 1.821665e-04 129 1.290000e+00 1.837701e-04 130 1.300000e+00 1.853545e-04 131 1.310000e+00 1.869202e-04 132 1.320000e+00 1.884673e-04 133 1.330000e+00 1.899960e-04 134 1.340000e+00 1.915067e-04 135 1.350000e+00 1.929996e-04 136 1.360000e+00 1.944749e-04 137 1.370000e+00 1.959329e-04 138 1.380000e+00 1.973738e-04 139 1.390000e+00 1.987979e-04 140 1.400000e+00 2.002054e-04 141 1.410000e+00 2.015964e-04 142 1.420000e+00 2.029713e-04 143 1.430000e+00 2.043303e-04 144 1.440000e+00 2.056736e-04 145 1.450000e+00 2.070013e-04 146 1.460000e+00 2.083137e-04 147 1.470000e+00 2.096111e-04 148 1.480000e+00 2.108936e-04 149 1.490000e+00 2.121613e-04 150 1.500000e+00 2.134146e-04 151 0.000000e+00 2.065527e-12 152 1.000000e-02 2.751725e-12 153 2.000000e-02 4.013719e-12 154 3.000000e-02 5.594586e-12 155 4.000000e-02 7.797555e-12 156 5.000000e-02 1.086708e-11 157 6.000000e-02 1.514343e-11 158 7.000000e-02 2.110015e-11 159 8.000000e-02 2.939595e-11 160 9.000000e-02 4.094675e-11 161 1.000000e-01 5.702548e-11 162 1.100000e-01 7.940017e-11 163 1.200000e-01 1.105248e-10 164 1.300000e-01 1.538025e-10 165 1.400000e-01 2.139484e-10 166 1.500000e-01 2.974877e-10 167 1.600000e-01 4.134327e-10 168 1.700000e-01 5.741729e-10 169 1.800000e-01 7.967707e-10 170 1.900000e-01 1.104655e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 1.529908e-09 172 2.100000e-01 2.116325e-09 173 2.200000e-01 2.923494e-09 174 2.300000e-01 4.032165e-09 175 2.400000e-01 5.551280e-09 176 2.500000e-01 7.627065e-09 177 2.600000e-01 1.045465e-08 178 2.700000e-01 1.429276e-08 179 2.800000e-01 1.948192e-08 180 2.900000e-01 2.646679e-08 181 3.000000e-01 3.582292e-08 182 3.100000e-01 4.828839e-08 183 3.200000e-01 6.480030e-08 184 3.300000e-01 8.653629e-08 185 3.400000e-01 1.149610e-07 186 3.500000e-01 1.518778e-07 187 3.600000e-01 1.994843e-07 188 3.700000e-01 2.604018e-07 189 3.800000e-01 3.376975e-07 190 3.900000e-01 4.350425e-07 191 4.000000e-01 5.567666e-07 192 4.100000e-01 7.079415e-07 193 4.200000e-01 8.944774e-07 194 4.300000e-01 1.123220e-06 195 4.400000e-01 1.402039e-06 196 4.500000e-01 1.739883e-06 197 4.600000e-01 2.146786e-06 198 4.700000e-01 2.633791e-06 199 4.800000e-01 3.212758e-06 200 4.900000e-01 3.896042e-06 201 5.000000e-01 4.696027e-06 202 5.100000e-01 5.624529e-06 203 5.200000e-01 6.692127e-06 204 5.300000e-01 7.907490e-06 205 5.400000e-01 9.276805e-06 206 5.500000e-01 1.080344e-05 207 5.600000e-01 1.248799e-05 208 5.700000e-01 1.432898e-05 209 5.800000e-01 1.632471e-05 210 5.900000e-01 1.847540e-05 211 6.000000e-01 2.077826e-05 212 6.100000e-01 2.321891e-05 213 6.200000e-01 2.577786e-05 214 6.300000e-01 2.843711e-05 215 6.400000e-01 3.118050e-05 216 6.500000e-01 3.399327e-05 217 6.600000e-01 3.686186e-05 218 6.700000e-01 3.977399e-05 219 6.800000e-01 4.271858e-05 220 6.900000e-01 4.568582e-05 221 7.000000e-01 4.866713e-05 222 7.100000e-01 5.165503e-05 223 7.200000e-01 5.464313e-05 224 7.300000e-01 5.762600e-05 225 7.400000e-01 6.059907e-05 226 7.500000e-01 6.355857e-05 227 7.600000e-01 6.650139e-05 228 7.700000e-01 6.942501e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 7.232747e-05 230 7.900000e-01 7.520722e-05 231 8.000000e-01 7.806308e-05 232 8.100000e-01 8.089419e-05 233 8.200000e-01 8.369989e-05 234 8.300000e-01 8.647966e-05 235 8.400000e-01 8.923306e-05 236 8.500000e-01 9.195962e-05 237 8.600000e-01 9.465880e-05 238 8.700000e-01 9.733001e-05 239 8.800000e-01 9.997262e-05 240 8.900000e-01 1.025860e-04 241 9.000000e-01 1.051696e-04 242 9.100000e-01 1.077228e-04 243 9.200000e-01 1.102455e-04 244 9.300000e-01 1.127373e-04 245 9.400000e-01 1.151983e-04 246 9.500000e-01 1.176283e-04 247 9.600000e-01 1.200277e-04 248 9.700000e-01 1.223965e-04 249 9.800000e-01 1.247352e-04 250 9.900000e-01 1.270439e-04 251 1.000000e+00 1.293231e-04 252 1.010000e+00 1.315731e-04 253 1.020000e+00 1.337944e-04 254 1.030000e+00 1.359873e-04 255 1.040000e+00 1.381523e-04 256 1.050000e+00 1.402898e-04 257 1.060000e+00 1.424002e-04 258 1.070000e+00 1.444839e-04 259 1.080000e+00 1.465413e-04 260 1.090000e+00 1.485729e-04 261 1.100000e+00 1.505791e-04 262 1.110000e+00 1.525602e-04 263 1.120000e+00 1.545166e-04 264 1.130000e+00 1.564488e-04 265 1.140000e+00 1.583570e-04 266 1.150000e+00 1.602417e-04 267 1.160000e+00 1.621033e-04 268 1.170000e+00 1.639420e-04 269 1.180000e+00 1.657582e-04 270 1.190000e+00 1.675523e-04 271 1.200000e+00 1.693247e-04 272 1.210000e+00 1.710755e-04 273 1.220000e+00 1.728052e-04 274 1.230000e+00 1.745141e-04 275 1.240000e+00 1.762024e-04 276 1.250000e+00 1.778706e-04 277 1.260000e+00 1.795187e-04 278 1.270000e+00 1.811473e-04 279 1.280000e+00 1.827565e-04 280 1.290000e+00 1.843466e-04 281 1.300000e+00 1.859180e-04 282 1.310000e+00 1.874708e-04 283 1.320000e+00 1.890053e-04 284 1.330000e+00 1.905218e-04 285 1.340000e+00 1.920206e-04 286 1.350000e+00 1.935019e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 1.949658e-04 288 1.370000e+00 1.964128e-04 289 1.380000e+00 1.978430e-04 290 1.390000e+00 1.992566e-04 291 1.400000e+00 2.006539e-04 292 1.410000e+00 2.020351e-04 293 1.420000e+00 2.034004e-04 294 1.430000e+00 2.047500e-04 295 1.440000e+00 2.060842e-04 296 1.450000e+00 2.074031e-04 297 1.460000e+00 2.087069e-04 298 1.470000e+00 2.099959e-04 299 1.480000e+00 2.112702e-04 300 1.490000e+00 2.125301e-04 301 1.500000e+00 2.137757e-04 302 0.000000e+00 2.066772e-12 303 1.000000e-02 2.753407e-12 304 2.000000e-02 4.016233e-12 305 3.000000e-02 5.598160e-12 306 4.000000e-02 7.802635e-12 307 5.000000e-02 1.087430e-11 308 6.000000e-02 1.515370e-11 309 7.000000e-02 2.111475e-11 310 8.000000e-02 2.941671e-11 311 9.000000e-02 4.097628e-11 312 1.000000e-01 5.706747e-11 313 1.100000e-01 7.945989e-11 314 1.200000e-01 1.106097e-10 315 1.300000e-01 1.539232e-10 316 1.400000e-01 2.141201e-10 317 1.500000e-01 2.977317e-10 318 1.600000e-01 4.137794e-10 319 1.700000e-01 5.746652e-10 320 1.800000e-01 7.974695e-10 321 1.900000e-01 1.105646e-09 322 2.000000e-01 1.531312e-09 323 2.100000e-01 2.118313e-09 324 2.200000e-01 2.926303e-09 325 2.300000e-01 4.036131e-09 326 2.400000e-01 5.556869e-09 327 2.500000e-01 7.634925e-09 328 2.600000e-01 1.046568e-08 329 2.700000e-01 1.430820e-08 330 2.800000e-01 1.950346e-08 331 2.900000e-01 2.649674e-08 332 3.000000e-01 3.586443e-08 333 3.100000e-01 4.834567e-08 334 3.200000e-01 6.487844e-08 335 3.300000e-01 8.662492e-08 336 3.400000e-01 1.150059e-07 337 3.500000e-01 1.517738e-07 338 3.600000e-01 1.990533e-07 339 3.700000e-01 2.593955e-07 340 3.800000e-01 3.358387e-07 341 3.900000e-01 4.319774e-07 342 4.000000e-01 5.520402e-07 343 4.100000e-01 7.009767e-07 344 4.200000e-01 8.845520e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 1.109443e-06 346 4.400000e-01 1.383327e-06 347 4.500000e-01 1.714939e-06 348 4.600000e-01 2.114095e-06 349 4.700000e-01 2.591624e-06 350 4.800000e-01 3.159216e-06 351 4.900000e-01 3.829144e-06 352 5.000000e-01 4.613877e-06 353 5.100000e-01 5.525622e-06 354 5.200000e-01 6.575919e-06 355 5.300000e-01 7.775580e-06 356 5.400000e-01 9.135477e-06 357 5.500000e-01 1.066724e-05 358 5.600000e-01 1.237822e-05 359 5.700000e-01 1.426579e-05 360 5.800000e-01 1.632211e-05 361 5.900000e-01 1.853797e-05 362 6.000000e-01 2.090342e-05 363 6.100000e-01 2.340782e-05 364 6.200000e-01 2.603975e-05 365 6.300000e-01 2.878602e-05 366 6.400000e-01 3.163063e-05 367 6.500000e-01 3.455495e-05 368 6.600000e-01 3.753980e-05 369 6.700000e-01 4.056761e-05 370 6.800000e-01 4.362345e-05 371 6.900000e-01 4.669505e-05 372 7.000000e-01 4.977246e-05 373 7.100000e-01 5.284759e-05 374 7.200000e-01 5.591389e-05 375 7.300000e-01 5.896604e-05 376 7.400000e-01 6.199972e-05 377 7.500000e-01 6.501146e-05 378 7.600000e-01 6.799846e-05 379 7.700000e-01 7.095852e-05 380 7.800000e-01 7.388989e-05 381 7.900000e-01 7.679124e-05 382 8.000000e-01 7.966153e-05 383 8.100000e-01 8.250003e-05 384 8.200000e-01 8.530622e-05 385 8.300000e-01 8.807974e-05 386 8.400000e-01 9.082041e-05 387 8.500000e-01 9.352818e-05 388 8.600000e-01 9.620306e-05 389 8.700000e-01 9.884519e-05 390 8.800000e-01 1.014547e-04 391 8.900000e-01 1.040320e-04 392 9.000000e-01 1.065771e-04 393 9.100000e-01 1.090905e-04 394 9.200000e-01 1.115725e-04 395 9.300000e-01 1.140235e-04 396 9.400000e-01 1.164438e-04 397 9.500000e-01 1.188338e-04 398 9.600000e-01 1.211939e-04 399 9.700000e-01 1.235245e-04 400 9.800000e-01 1.258260e-04 401 9.900000e-01 1.280989e-04 402 1.000000e+00 1.303434e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.325601e-04 404 1.020000e+00 1.347492e-04 405 1.030000e+00 1.369113e-04 406 1.040000e+00 1.390467e-04 407 1.050000e+00 1.411557e-04 408 1.060000e+00 1.432388e-04 409 1.070000e+00 1.452964e-04 410 1.080000e+00 1.473287e-04 411 1.090000e+00 1.493362e-04 412 1.100000e+00 1.513192e-04 413 1.110000e+00 1.532782e-04 414 1.120000e+00 1.552133e-04 415 1.130000e+00 1.571251e-04 416 1.140000e+00 1.590137e-04 417 1.150000e+00 1.608796e-04 418 1.160000e+00 1.627230e-04 419 1.170000e+00 1.645444e-04 420 1.180000e+00 1.663439e-04 421 1.190000e+00 1.681220e-04 422 1.200000e+00 1.698789e-04 423 1.210000e+00 1.716148e-04 424 1.220000e+00 1.733302e-04 425 1.230000e+00 1.750253e-04 426 1.240000e+00 1.767004e-04 427 1.250000e+00 1.783557e-04 428 1.260000e+00 1.799916e-04 429 1.270000e+00 1.816082e-04 430 1.280000e+00 1.832060e-04 431 1.290000e+00 1.847850e-04 432 1.300000e+00 1.863457e-04 433 1.310000e+00 1.878882e-04 434 1.320000e+00 1.894127e-04 435 1.330000e+00 1.909196e-04 436 1.340000e+00 1.924091e-04 437 1.350000e+00 1.938813e-04 438 1.360000e+00 1.953366e-04 439 1.370000e+00 1.967752e-04 440 1.380000e+00 1.981972e-04 441 1.390000e+00 1.996029e-04 442 1.400000e+00 2.009925e-04 443 1.410000e+00 2.023663e-04 444 1.420000e+00 2.037244e-04 445 1.430000e+00 2.050671e-04 446 1.440000e+00 2.063945e-04 447 1.450000e+00 2.077069e-04 448 1.460000e+00 2.090044e-04 449 1.470000e+00 2.102872e-04 450 1.480000e+00 2.115555e-04 451 1.490000e+00 2.128096e-04 452 1.500000e+00 2.140496e-04 453 0.000000e+00 2.072522e-12 454 1.000000e-02 2.761350e-12 455 2.000000e-02 4.028601e-12 456 3.000000e-02 5.616346e-12 457 4.000000e-02 7.829424e-12 458 5.000000e-02 1.091384e-11 459 6.000000e-02 1.521220e-11 460 7.000000e-02 2.120149e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 2.954567e-11 462 9.000000e-02 4.116854e-11 463 1.000000e-01 5.735505e-11 464 1.100000e-01 7.989155e-11 465 1.200000e-01 1.112602e-10 466 1.300000e-01 1.549081e-10 467 1.400000e-01 2.156189e-10 468 1.500000e-01 3.000266e-10 469 1.600000e-01 4.173183e-10 470 1.700000e-01 5.801683e-10 471 1.800000e-01 8.061148e-10 472 1.900000e-01 1.119402e-09 473 2.000000e-01 1.553552e-09 474 2.100000e-01 2.155020e-09 475 2.200000e-01 2.988527e-09 476 2.300000e-01 4.145176e-09 477 2.400000e-01 5.755065e-09 478 2.500000e-01 8.004832e-09 479 2.600000e-01 1.115475e-08 480 2.700000e-01 1.555195e-08 481 2.800000e-01 2.165279e-08 482 2.900000e-01 3.005843e-08 483 3.000000e-01 4.155874e-08 484 3.100000e-01 5.719560e-08 485 3.200000e-01 7.831618e-08 486 3.300000e-01 1.066349e-07 487 3.400000e-01 1.443092e-07 488 3.500000e-01 1.940253e-07 489 3.600000e-01 2.590932e-07 490 3.700000e-01 3.435517e-07 491 3.800000e-01 4.522870e-07 492 3.900000e-01 5.911651e-07 493 4.000000e-01 7.671765e-07 494 4.100000e-01 9.885874e-07 495 4.200000e-01 1.265079e-06 496 4.300000e-01 1.607851e-06 497 4.400000e-01 2.029632e-06 498 4.500000e-01 2.544561e-06 499 4.600000e-01 3.167847e-06 500 4.700000e-01 3.915125e-06 501 4.800000e-01 4.801366e-06 502 4.900000e-01 5.839018e-06 503 5.000000e-01 7.034884e-06 504 5.100000e-01 8.388099e-06 505 5.200000e-01 9.897562e-06 506 5.300000e-01 1.156778e-05 507 5.400000e-01 1.340158e-05 508 5.500000e-01 1.539660e-05 509 5.600000e-01 1.754618e-05 510 5.700000e-01 1.984048e-05 511 5.800000e-01 2.226739e-05 512 5.900000e-01 2.481331e-05 513 6.000000e-01 2.746386e-05 514 6.100000e-01 3.020442e-05 515 6.200000e-01 3.302065e-05 516 6.300000e-01 3.589884e-05 517 6.400000e-01 3.882618e-05 518 6.500000e-01 4.179091e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 4.478245e-05 520 6.700000e-01 4.779136e-05 521 6.800000e-01 5.080937e-05 522 6.900000e-01 5.382929e-05 523 7.000000e-01 5.684495e-05 524 7.100000e-01 5.985109e-05 525 7.200000e-01 6.284326e-05 526 7.300000e-01 6.581775e-05 527 7.400000e-01 6.877148e-05 528 7.500000e-01 7.170193e-05 529 7.600000e-01 7.460703e-05 530 7.700000e-01 7.748514e-05 531 7.800000e-01 8.033495e-05 532 7.900000e-01 8.315543e-05 533 8.000000e-01 8.594583e-05 534 8.100000e-01 8.870557e-05 535 8.200000e-01 9.143426e-05 536 8.300000e-01 9.413166e-05 537 8.400000e-01 9.679763e-05 538 8.500000e-01 9.943214e-05 539 8.600000e-01 1.020352e-04 540 8.700000e-01 1.046071e-04 541 8.800000e-01 1.071477e-04 542 8.900000e-01 1.096575e-04 543 9.000000e-01 1.121367e-04 544 9.100000e-01 1.145854e-04 545 9.200000e-01 1.170041e-04 546 9.300000e-01 1.193931e-04 547 9.400000e-01 1.217527e-04 548 9.500000e-01 1.240832e-04 549 9.600000e-01 1.263850e-04 550 9.700000e-01 1.286584e-04 551 9.800000e-01 1.309039e-04 552 9.900000e-01 1.331218e-04 553 1.000000e+00 1.353124e-04 554 1.010000e+00 1.374762e-04 555 1.020000e+00 1.396134e-04 556 1.030000e+00 1.417245e-04 557 1.040000e+00 1.438098e-04 558 1.050000e+00 1.458696e-04 559 1.060000e+00 1.479044e-04 560 1.070000e+00 1.499145e-04 561 1.080000e+00 1.519001e-04 562 1.090000e+00 1.538617e-04 563 1.100000e+00 1.557996e-04 564 1.110000e+00 1.577142e-04 565 1.120000e+00 1.596056e-04 566 1.130000e+00 1.614744e-04 567 1.140000e+00 1.633207e-04 568 1.150000e+00 1.651450e-04 569 1.160000e+00 1.669474e-04 570 1.170000e+00 1.687284e-04 571 1.180000e+00 1.704882e-04 572 1.190000e+00 1.722271e-04 573 1.200000e+00 1.739453e-04 574 1.210000e+00 1.756433e-04 575 1.220000e+00 1.773212e-04 576 1.230000e+00 1.789793e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 1.806180e-04 578 1.250000e+00 1.822374e-04 579 1.260000e+00 1.838379e-04 580 1.270000e+00 1.854196e-04 581 1.280000e+00 1.869829e-04 582 1.290000e+00 1.885280e-04 583 1.300000e+00 1.900551e-04 584 1.310000e+00 1.915646e-04 585 1.320000e+00 1.930565e-04 586 1.330000e+00 1.945312e-04 587 1.340000e+00 1.959889e-04 588 1.350000e+00 1.974298e-04 589 1.360000e+00 1.988541e-04 590 1.370000e+00 2.002621e-04 591 1.380000e+00 2.016539e-04 592 1.390000e+00 2.030299e-04 593 1.400000e+00 2.043901e-04 594 1.410000e+00 2.057348e-04 595 1.420000e+00 2.070642e-04 596 1.430000e+00 2.083785e-04 597 1.440000e+00 2.096779e-04 598 1.450000e+00 2.109626e-04 599 1.460000e+00 2.122328e-04 600 1.470000e+00 2.134886e-04 601 1.480000e+00 2.147303e-04 602 1.490000e+00 2.159580e-04 603 1.500000e+00 2.171719e-04 604 0.000000e+00 4.149697e-12 605 1.000000e-02 5.650698e-12 606 2.000000e-02 8.551535e-12 607 3.000000e-02 1.227249e-11 608 4.000000e-02 1.760870e-11 609 5.000000e-02 2.525906e-11 610 6.000000e-02 3.622354e-11 611 7.000000e-02 5.193193e-11 612 8.000000e-02 7.442713e-11 613 9.000000e-02 1.066257e-10 614 1.000000e-01 1.526874e-10 615 1.100000e-01 2.185387e-10 616 1.200000e-01 3.126114e-10 617 1.300000e-01 4.468842e-10 618 1.400000e-01 6.383434e-10 619 1.500000e-01 9.110261e-10 620 1.600000e-01 1.298843e-09 621 1.700000e-01 1.849360e-09 622 1.800000e-01 2.629285e-09 623 1.900000e-01 3.731735e-09 624 2.000000e-01 5.286071e-09 625 2.100000e-01 7.471051e-09 626 2.200000e-01 1.053220e-08 627 2.300000e-01 1.480442e-08 628 2.400000e-01 2.074103e-08 629 2.500000e-01 2.895034e-08 630 2.600000e-01 4.024094e-08 631 2.700000e-01 5.567669e-08 632 2.800000e-01 7.664210e-08 633 2.900000e-01 1.049187e-07 634 3.000000e-01 1.427730e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 1.930558e-07 636 3.200000e-01 2.593155e-07 637 3.300000e-01 3.459256e-07 638 3.400000e-01 4.582287e-07 639 3.500000e-01 6.027000e-07 640 3.600000e-01 7.871250e-07 641 3.700000e-01 1.020785e-06 642 3.800000e-01 1.314626e-06 643 3.900000e-01 1.681377e-06 644 4.000000e-01 2.135546e-06 645 4.100000e-01 2.693225e-06 646 4.200000e-01 3.371579e-06 647 4.300000e-01 4.187855e-06 648 4.400000e-01 5.157563e-06 649 4.500000e-01 6.291041e-06 650 4.600000e-01 7.587978e-06 651 4.700000e-01 9.038489e-06 652 4.800000e-01 1.064051e-05 653 4.900000e-01 1.240101e-05 654 5.000000e-01 1.432317e-05 655 5.100000e-01 1.640407e-05 656 5.200000e-01 1.863631e-05 657 5.300000e-01 2.100939e-05 658 5.400000e-01 2.351072e-05 659 5.500000e-01 2.612645e-05 660 5.600000e-01 2.884208e-05 661 5.700000e-01 3.164308e-05 662 5.800000e-01 3.451528e-05 663 5.900000e-01 3.744525e-05 664 6.000000e-01 4.042047e-05 665 6.100000e-01 4.342954e-05 666 6.200000e-01 4.646219e-05 667 6.300000e-01 4.950931e-05 668 6.400000e-01 5.256294e-05 669 6.500000e-01 5.561616e-05 670 6.600000e-01 5.866303e-05 671 6.700000e-01 6.169851e-05 672 6.800000e-01 6.471835e-05 673 6.900000e-01 6.771899e-05 674 7.000000e-01 7.069749e-05 675 7.100000e-01 7.365145e-05 676 7.200000e-01 7.657892e-05 677 7.300000e-01 7.947833e-05 678 7.400000e-01 8.234846e-05 679 7.500000e-01 8.518835e-05 680 7.600000e-01 8.799729e-05 681 7.700000e-01 9.077477e-05 682 7.800000e-01 9.352045e-05 683 7.900000e-01 9.623410e-05 684 8.000000e-01 9.891565e-05 685 8.100000e-01 1.015651e-04 686 8.200000e-01 1.041825e-04 687 8.300000e-01 1.067680e-04 688 8.400000e-01 1.093218e-04 689 8.500000e-01 1.118442e-04 690 8.600000e-01 1.143354e-04 691 8.700000e-01 1.167957e-04 692 8.800000e-01 1.192255e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.216250e-04 694 9.000000e-01 1.239947e-04 695 9.100000e-01 1.263349e-04 696 9.200000e-01 1.286460e-04 697 9.300000e-01 1.309283e-04 698 9.400000e-01 1.331822e-04 699 9.500000e-01 1.354081e-04 700 9.600000e-01 1.376064e-04 701 9.700000e-01 1.397775e-04 702 9.800000e-01 1.419217e-04 703 9.900000e-01 1.440394e-04 704 1.000000e+00 1.461310e-04 705 1.010000e+00 1.481968e-04 706 1.020000e+00 1.502373e-04 707 1.030000e+00 1.522527e-04 708 1.040000e+00 1.542434e-04 709 1.050000e+00 1.562098e-04 710 1.060000e+00 1.581522e-04 711 1.070000e+00 1.600709e-04 712 1.080000e+00 1.619664e-04 713 1.090000e+00 1.638388e-04 714 1.100000e+00 1.656886e-04 715 1.110000e+00 1.675160e-04 716 1.120000e+00 1.693215e-04 717 1.130000e+00 1.711052e-04 718 1.140000e+00 1.728675e-04 719 1.150000e+00 1.746087e-04 720 1.160000e+00 1.763291e-04 721 1.170000e+00 1.780289e-04 722 1.180000e+00 1.797085e-04 723 1.190000e+00 1.813682e-04 724 1.200000e+00 1.830081e-04 725 1.210000e+00 1.846287e-04 726 1.220000e+00 1.862301e-04 727 1.230000e+00 1.878126e-04 728 1.240000e+00 1.893765e-04 729 1.250000e+00 1.909221e-04 730 1.260000e+00 1.924495e-04 731 1.270000e+00 1.939591e-04 732 1.280000e+00 1.954510e-04 733 1.290000e+00 1.969255e-04 734 1.300000e+00 1.983829e-04 735 1.310000e+00 1.998233e-04 736 1.320000e+00 2.012471e-04 737 1.330000e+00 2.026543e-04 738 1.340000e+00 2.040454e-04 739 1.350000e+00 2.054203e-04 740 1.360000e+00 2.067795e-04 741 1.370000e+00 2.081230e-04 742 1.380000e+00 2.094511e-04 743 1.390000e+00 2.107640e-04 744 1.400000e+00 2.120619e-04 745 1.410000e+00 2.133449e-04 746 1.420000e+00 2.146133e-04 747 1.430000e+00 2.158673e-04 748 1.440000e+00 2.171071e-04 749 1.450000e+00 2.183327e-04 750 1.460000e+00 2.195445e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 2.207426e-04 752 1.480000e+00 2.219271e-04 753 1.490000e+00 2.230983e-04 754 1.500000e+00 2.242563e-04 755 0.000000e+00 2.039674e-11 756 1.000000e-02 2.936285e-11 757 2.000000e-02 4.225803e-11 758 3.000000e-02 6.079651e-11 759 4.000000e-02 8.743568e-11 760 5.000000e-02 1.256951e-10 761 6.000000e-02 1.806104e-10 762 7.000000e-02 2.593780e-10 763 8.000000e-02 3.722671e-10 764 9.000000e-02 5.339088e-10 765 1.000000e-01 7.651084e-10 766 1.100000e-01 1.095385e-09 767 1.200000e-01 1.566511e-09 768 1.300000e-01 2.237422e-09 769 1.400000e-01 3.190971e-09 770 1.500000e-01 4.543156e-09 771 1.600000e-01 6.455517e-09 772 1.700000e-01 9.151132e-09 773 1.800000e-01 1.293714e-08 774 1.900000e-01 1.823313e-08 775 2.000000e-01 2.560762e-08 776 2.100000e-01 3.582410e-08 777 2.200000e-01 4.989798e-08 778 2.300000e-01 6.916574e-08 779 2.400000e-01 9.536735e-08 780 2.500000e-01 1.307429e-07 781 2.600000e-01 1.781442e-07 782 2.700000e-01 2.411632e-07 783 2.800000e-01 3.242784e-07 784 2.900000e-01 4.330219e-07 785 3.000000e-01 5.741683e-07 786 3.100000e-01 7.559600e-07 787 3.200000e-01 9.884636e-07 788 3.300000e-01 1.283590e-06 789 3.400000e-01 1.655271e-06 790 3.500000e-01 2.119490e-06 791 3.600000e-01 2.694047e-06 792 3.700000e-01 3.397920e-06 793 3.800000e-01 4.250005e-06 794 3.900000e-01 5.266717e-06 795 4.000000e-01 6.457328e-06 796 4.100000e-01 7.816460e-06 797 4.200000e-01 9.326264e-06 798 4.300000e-01 1.098167e-05 799 4.400000e-01 1.279167e-05 800 4.500000e-01 1.476130e-05 801 4.600000e-01 1.688842e-05 802 4.700000e-01 1.916588e-05 803 4.800000e-01 2.158327e-05 804 4.900000e-01 2.412806e-05 805 5.000000e-01 2.678642e-05 806 5.100000e-01 2.954396e-05 807 5.200000e-01 3.238621e-05 808 5.300000e-01 3.529910e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 3.826925e-05 810 5.500000e-01 4.128423e-05 811 5.600000e-01 4.433265e-05 812 5.700000e-01 4.740427e-05 813 5.800000e-01 5.048999e-05 814 5.900000e-01 5.358183e-05 815 6.000000e-01 5.667284e-05 816 6.100000e-01 5.975706e-05 817 6.200000e-01 6.282940e-05 818 6.300000e-01 6.588559e-05 819 6.400000e-01 6.892202e-05 820 6.500000e-01 7.193573e-05 821 6.600000e-01 7.492428e-05 822 6.700000e-01 7.788569e-05 823 6.800000e-01 8.081838e-05 824 6.900000e-01 8.372110e-05 825 7.000000e-01 8.659289e-05 826 7.100000e-01 8.943303e-05 827 7.200000e-01 9.224099e-05 828 7.300000e-01 9.501643e-05 829 7.400000e-01 9.775913e-05 830 7.500000e-01 1.004690e-04 831 7.600000e-01 1.031461e-04 832 7.700000e-01 1.057904e-04 833 7.800000e-01 1.084022e-04 834 7.900000e-01 1.109816e-04 835 8.000000e-01 1.135289e-04 836 8.100000e-01 1.160443e-04 837 8.200000e-01 1.185283e-04 838 8.300000e-01 1.209810e-04 839 8.400000e-01 1.234029e-04 840 8.500000e-01 1.257944e-04 841 8.600000e-01 1.281557e-04 842 8.700000e-01 1.304874e-04 843 8.800000e-01 1.327897e-04 844 8.900000e-01 1.350632e-04 845 9.000000e-01 1.373080e-04 846 9.100000e-01 1.395248e-04 847 9.200000e-01 1.417138e-04 848 9.300000e-01 1.438754e-04 849 9.400000e-01 1.460100e-04 850 9.500000e-01 1.481181e-04 851 9.600000e-01 1.501999e-04 852 9.700000e-01 1.522559e-04 853 9.800000e-01 1.542864e-04 854 9.900000e-01 1.562918e-04 855 1.000000e+00 1.582724e-04 856 1.010000e+00 1.602287e-04 857 1.020000e+00 1.621609e-04 858 1.030000e+00 1.640694e-04 859 1.040000e+00 1.659545e-04 860 1.050000e+00 1.678166e-04 861 1.060000e+00 1.696560e-04 862 1.070000e+00 1.714730e-04 863 1.080000e+00 1.732680e-04 864 1.090000e+00 1.750412e-04 865 1.100000e+00 1.767930e-04 866 1.110000e+00 1.785236e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 1.802334e-04 868 1.130000e+00 1.819226e-04 869 1.140000e+00 1.835916e-04 870 1.150000e+00 1.852406e-04 871 1.160000e+00 1.868699e-04 872 1.170000e+00 1.884798e-04 873 1.180000e+00 1.900706e-04 874 1.190000e+00 1.916424e-04 875 1.200000e+00 1.931956e-04 876 1.210000e+00 1.947305e-04 877 1.220000e+00 1.962472e-04 878 1.230000e+00 1.977460e-04 879 1.240000e+00 1.992272e-04 880 1.250000e+00 2.006911e-04 881 1.260000e+00 2.021377e-04 882 1.270000e+00 2.035675e-04 883 1.280000e+00 2.049806e-04 884 1.290000e+00 2.063771e-04 885 1.300000e+00 2.077575e-04 886 1.310000e+00 2.091218e-04 887 1.320000e+00 2.104702e-04 888 1.330000e+00 2.118031e-04 889 1.340000e+00 2.131206e-04 890 1.350000e+00 2.144228e-04 891 1.360000e+00 2.157101e-04 892 1.370000e+00 2.169826e-04 893 1.380000e+00 2.182404e-04 894 1.390000e+00 2.194838e-04 895 1.400000e+00 2.207130e-04 896 1.410000e+00 2.219282e-04 897 1.420000e+00 2.231295e-04 898 1.430000e+00 2.243170e-04 899 1.440000e+00 2.254911e-04 900 1.450000e+00 2.266518e-04 901 1.460000e+00 2.277994e-04 902 1.470000e+00 2.289340e-04 903 1.480000e+00 2.300557e-04 904 1.490000e+00 2.311647e-04 905 1.500000e+00 2.322613e-04 906 0.000000e+00 1.468737e-10 907 1.000000e-02 2.126740e-10 908 2.000000e-02 3.077418e-10 909 3.000000e-02 4.449567e-10 910 4.000000e-02 6.427766e-10 911 5.000000e-02 9.275941e-10 912 6.000000e-02 1.337051e-09 913 7.000000e-02 1.924673e-09 914 8.000000e-02 2.766314e-09 915 9.000000e-02 3.969041e-09 916 1.000000e-01 5.683300e-09 917 1.100000e-01 8.119385e-09 918 1.200000e-01 1.156952e-08 919 1.300000e-01 1.643703e-08 920 1.400000e-01 2.327445e-08 921 1.500000e-01 3.283237e-08 922 1.600000e-01 4.612049e-08 923 1.700000e-01 6.447923e-08 924 1.800000e-01 8.967626e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 1.240158e-07 926 2.000000e-01 1.704680e-07 927 2.100000e-01 2.328208e-07 928 2.200000e-01 3.158556e-07 929 2.300000e-01 4.255513e-07 930 2.400000e-01 5.693147e-07 931 2.500000e-01 7.562375e-07 932 2.600000e-01 9.973625e-07 933 2.700000e-01 1.305927e-06 934 2.800000e-01 1.697521e-06 935 2.900000e-01 2.190055e-06 936 3.000000e-01 2.803399e-06 937 3.100000e-01 3.558467e-06 938 3.200000e-01 4.475389e-06 939 3.300000e-01 5.569931e-06 940 3.400000e-01 6.846410e-06 941 3.500000e-01 8.288679e-06 942 3.600000e-01 9.872788e-06 943 3.700000e-01 1.159878e-05 944 3.800000e-01 1.347855e-05 945 3.900000e-01 1.551694e-05 946 4.000000e-01 1.771117e-05 947 4.100000e-01 2.005365e-05 948 4.200000e-01 2.253366e-05 949 4.300000e-01 2.513854e-05 950 4.400000e-01 2.785449e-05 951 4.500000e-01 3.066722e-05 952 4.600000e-01 3.356246e-05 953 4.700000e-01 3.652635e-05 954 4.800000e-01 3.954574e-05 955 4.900000e-01 4.260840e-05 956 5.000000e-01 4.570314e-05 957 5.100000e-01 4.881989e-05 958 5.200000e-01 5.194966e-05 959 5.300000e-01 5.508456e-05 960 5.400000e-01 5.821773e-05 961 5.500000e-01 6.134324e-05 962 5.600000e-01 6.445605e-05 963 5.700000e-01 6.755187e-05 964 5.800000e-01 7.062714e-05 965 5.900000e-01 7.367888e-05 966 6.000000e-01 7.670465e-05 967 6.100000e-01 7.970246e-05 968 6.200000e-01 8.267073e-05 969 6.300000e-01 8.560822e-05 970 6.400000e-01 8.851395e-05 971 6.500000e-01 9.138722e-05 972 6.600000e-01 9.422749e-05 973 6.700000e-01 9.703443e-05 974 6.800000e-01 9.980785e-05 975 6.900000e-01 1.025476e-04 976 7.000000e-01 1.052539e-04 977 7.100000e-01 1.079266e-04 978 7.200000e-01 1.105659e-04 979 7.300000e-01 1.131722e-04 980 7.400000e-01 1.157457e-04 981 7.500000e-01 1.182866e-04 982 7.600000e-01 1.207952e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 1.232721e-04 984 7.800000e-01 1.257174e-04 985 7.900000e-01 1.281316e-04 986 8.000000e-01 1.305152e-04 987 8.100000e-01 1.328684e-04 988 8.200000e-01 1.351917e-04 989 8.300000e-01 1.374854e-04 990 8.400000e-01 1.397501e-04 991 8.500000e-01 1.419861e-04 992 8.600000e-01 1.441939e-04 993 8.700000e-01 1.463737e-04 994 8.800000e-01 1.485260e-04 995 8.900000e-01 1.506513e-04 996 9.000000e-01 1.527498e-04 997 9.100000e-01 1.548221e-04 998 9.200000e-01 1.568684e-04 999 9.300000e-01 1.588891e-04 1000 9.400000e-01 1.608847e-04 1001 9.500000e-01 1.628554e-04 1002 9.600000e-01 1.648017e-04 1003 9.700000e-01 1.667239e-04 1004 9.800000e-01 1.686223e-04 1005 9.900000e-01 1.704973e-04 1006 1.000000e+00 1.723492e-04 1007 1.010000e+00 1.741784e-04 1008 1.020000e+00 1.759851e-04 1009 1.030000e+00 1.777698e-04 1010 1.040000e+00 1.795327e-04 1011 1.050000e+00 1.812741e-04 1012 1.060000e+00 1.829944e-04 1013 1.070000e+00 1.846937e-04 1014 1.080000e+00 1.863726e-04 1015 1.090000e+00 1.880311e-04 1016 1.100000e+00 1.896696e-04 1017 1.110000e+00 1.912885e-04 1018 1.120000e+00 1.928879e-04 1019 1.130000e+00 1.944681e-04 1020 1.140000e+00 1.960294e-04 1021 1.150000e+00 1.975721e-04 1022 1.160000e+00 1.990964e-04 1023 1.170000e+00 2.006026e-04 1024 1.180000e+00 2.020909e-04 1025 1.190000e+00 2.035616e-04 1026 1.200000e+00 2.050149e-04 1027 1.210000e+00 2.064511e-04 1028 1.220000e+00 2.078703e-04 1029 1.230000e+00 2.092728e-04 1030 1.240000e+00 2.106588e-04 1031 1.250000e+00 2.120287e-04 1032 1.260000e+00 2.133824e-04 1033 1.270000e+00 2.147204e-04 1034 1.280000e+00 2.160428e-04 1035 1.290000e+00 2.173498e-04 1036 1.300000e+00 2.186416e-04 1037 1.310000e+00 2.199184e-04 1038 1.320000e+00 2.211804e-04 1039 1.330000e+00 2.224278e-04 1040 1.340000e+00 2.236608e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 2.248795e-04 1042 1.360000e+00 2.260843e-04 1043 1.370000e+00 2.272752e-04 1044 1.380000e+00 2.284524e-04 1045 1.390000e+00 2.296161e-04 1046 1.400000e+00 2.307665e-04 1047 1.410000e+00 2.319037e-04 1048 1.420000e+00 2.330280e-04 1049 1.430000e+00 2.341394e-04 1050 1.440000e+00 2.352382e-04 1051 1.450000e+00 2.363245e-04 1052 1.460000e+00 2.373985e-04 1053 1.470000e+00 2.384602e-04 1054 1.480000e+00 2.395100e-04 1055 1.490000e+00 2.405478e-04 1056 1.500000e+00 2.415739e-04 1057 0.000000e+00 1.491864e-09 1058 1.000000e-02 2.158102e-09 1059 2.000000e-02 3.116114e-09 1060 3.000000e-02 4.490120e-09 1061 4.000000e-02 6.455027e-09 1062 5.000000e-02 9.255779e-09 1063 6.000000e-02 1.323331e-08 1064 7.000000e-02 1.885894e-08 1065 8.000000e-02 2.677935e-08 1066 9.000000e-02 3.787446e-08 1067 1.000000e-01 5.333102e-08 1068 1.100000e-01 7.473436e-08 1069 1.200000e-01 1.041815e-07 1070 1.300000e-01 1.444187e-07 1071 1.400000e-01 1.990065e-07 1072 1.500000e-01 2.725171e-07 1073 1.600000e-01 3.707627e-07 1074 1.700000e-01 5.010355e-07 1075 1.800000e-01 6.724479e-07 1076 1.900000e-01 8.962557e-07 1077 2.000000e-01 1.186173e-06 1078 2.100000e-01 1.558611e-06 1079 2.200000e-01 2.032706e-06 1080 2.300000e-01 2.629957e-06 1081 2.400000e-01 3.373140e-06 1082 2.500000e-01 4.283943e-06 1083 2.600000e-01 5.378000e-06 1084 2.700000e-01 6.654960e-06 1085 2.800000e-01 8.089410e-06 1086 2.900000e-01 9.656277e-06 1087 3.000000e-01 1.136243e-05 1088 3.100000e-01 1.322275e-05 1089 3.200000e-01 1.524300e-05 1090 3.300000e-01 1.742118e-05 1091 3.400000e-01 1.975043e-05 1092 3.500000e-01 2.222073e-05 1093 3.600000e-01 2.482002e-05 1094 3.700000e-01 2.753496e-05 1095 3.800000e-01 3.035163e-05 1096 3.900000e-01 3.325593e-05 1097 4.000000e-01 3.623406e-05 1098 4.100000e-01 3.927277e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 4.235965e-05 1100 4.300000e-01 4.548318e-05 1101 4.400000e-01 4.863291e-05 1102 4.500000e-01 5.179942e-05 1103 4.600000e-01 5.497437e-05 1104 4.700000e-01 5.815043e-05 1105 4.800000e-01 6.132120e-05 1106 4.900000e-01 6.448119e-05 1107 5.000000e-01 6.762572e-05 1108 5.100000e-01 7.075081e-05 1109 5.200000e-01 7.385316e-05 1110 5.300000e-01 7.693002e-05 1111 5.400000e-01 7.997913e-05 1112 5.500000e-01 8.299867e-05 1113 5.600000e-01 8.598719e-05 1114 5.700000e-01 8.894357e-05 1115 5.800000e-01 9.186694e-05 1116 5.900000e-01 9.475668e-05 1117 6.000000e-01 9.761235e-05 1118 6.100000e-01 1.004337e-04 1119 6.200000e-01 1.032205e-04 1120 6.300000e-01 1.059729e-04 1121 6.400000e-01 1.086908e-04 1122 6.500000e-01 1.113744e-04 1123 6.600000e-01 1.140240e-04 1124 6.700000e-01 1.166398e-04 1125 6.800000e-01 1.192220e-04 1126 6.900000e-01 1.217711e-04 1127 7.000000e-01 1.242874e-04 1128 7.100000e-01 1.267713e-04 1129 7.200000e-01 1.292232e-04 1130 7.300000e-01 1.316435e-04 1131 7.400000e-01 1.340325e-04 1132 7.500000e-01 1.363909e-04 1133 7.600000e-01 1.387188e-04 1134 7.700000e-01 1.410169e-04 1135 7.800000e-01 1.432855e-04 1136 7.900000e-01 1.455250e-04 1137 8.000000e-01 1.477359e-04 1138 8.100000e-01 1.499186e-04 1139 8.200000e-01 1.520735e-04 1140 8.300000e-01 1.542009e-04 1141 8.400000e-01 1.563014e-04 1142 8.500000e-01 1.583753e-04 1143 8.600000e-01 1.604230e-04 1144 8.700000e-01 1.624449e-04 1145 8.800000e-01 1.644413e-04 1146 8.900000e-01 1.664127e-04 1147 9.000000e-01 1.683594e-04 1148 9.100000e-01 1.702818e-04 1149 9.200000e-01 1.721803e-04 1150 9.300000e-01 1.740551e-04 1151 9.400000e-01 1.759066e-04 1152 9.500000e-01 1.777352e-04 1153 9.600000e-01 1.795412e-04 1154 9.700000e-01 1.813250e-04 1155 9.800000e-01 1.830868e-04 1156 9.900000e-01 1.848269e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 1.865458e-04 1158 1.010000e+00 1.882436e-04 1159 1.020000e+00 1.899207e-04 1160 1.030000e+00 1.915774e-04 1161 1.040000e+00 1.932140e-04 1162 1.050000e+00 1.948307e-04 1163 1.060000e+00 1.964279e-04 1164 1.070000e+00 1.980058e-04 1165 1.080000e+00 1.995646e-04 1166 1.090000e+00 2.011048e-04 1167 1.100000e+00 2.026264e-04 1168 1.110000e+00 2.041298e-04 1169 1.120000e+00 2.056152e-04 1170 1.130000e+00 2.070828e-04 1171 1.140000e+00 2.085330e-04 1172 1.150000e+00 2.099659e-04 1173 1.160000e+00 2.113819e-04 1174 1.170000e+00 2.127810e-04 1175 1.180000e+00 2.141636e-04 1176 1.190000e+00 2.155298e-04 1177 1.200000e+00 2.168800e-04 1178 1.210000e+00 2.182142e-04 1179 1.220000e+00 2.195328e-04 1180 1.230000e+00 2.208359e-04 1181 1.240000e+00 2.221237e-04 1182 1.250000e+00 2.233965e-04 1183 1.260000e+00 2.246544e-04 1184 1.270000e+00 2.258977e-04 1185 1.280000e+00 2.271264e-04 1186 1.290000e+00 2.283409e-04 1187 1.300000e+00 2.295413e-04 1188 1.310000e+00 2.307278e-04 1189 1.320000e+00 2.319006e-04 1190 1.330000e+00 2.330598e-04 1191 1.340000e+00 2.342056e-04 1192 1.350000e+00 2.353382e-04 1193 1.360000e+00 2.364578e-04 1194 1.370000e+00 2.375645e-04 1195 1.380000e+00 2.386586e-04 1196 1.390000e+00 2.397400e-04 1197 1.400000e+00 2.408091e-04 1198 1.410000e+00 2.418660e-04 1199 1.420000e+00 2.429108e-04 1200 1.430000e+00 2.439437e-04 1201 1.440000e+00 2.449648e-04 1202 1.450000e+00 2.459742e-04 1203 1.460000e+00 2.469722e-04 1204 1.470000e+00 2.479589e-04 1205 1.480000e+00 2.489344e-04 1206 1.490000e+00 2.498988e-04 1207 1.500000e+00 2.508523e-04 1208 0.000000e+00 1.048409e-08 1209 1.000000e-02 1.505832e-08 1210 2.000000e-02 2.154301e-08 1211 3.000000e-02 3.068721e-08 1212 4.000000e-02 4.350714e-08 1213 5.000000e-02 6.136848e-08 1214 6.000000e-02 8.608831e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 1.200599e-07 1216 8.000000e-02 1.664038e-07 1217 9.000000e-02 2.291479e-07 1218 1.000000e-01 3.134426e-07 1219 1.100000e-01 4.258100e-07 1220 1.200000e-01 5.744308e-07 1221 1.300000e-01 7.694535e-07 1222 1.400000e-01 1.023296e-06 1223 1.500000e-01 1.350867e-06 1224 1.600000e-01 1.769554e-06 1225 1.700000e-01 2.298628e-06 1226 1.800000e-01 2.957947e-06 1227 1.900000e-01 3.764320e-06 1228 2.000000e-01 4.723621e-06 1229 2.100000e-01 5.822589e-06 1230 2.200000e-01 7.047310e-06 1231 2.300000e-01 8.409078e-06 1232 2.400000e-01 9.926061e-06 1233 2.500000e-01 1.160887e-05 1234 2.600000e-01 1.346102e-05 1235 2.700000e-01 1.548098e-05 1236 2.800000e-01 1.766340e-05 1237 2.900000e-01 1.999995e-05 1238 3.000000e-01 2.248005e-05 1239 3.100000e-01 2.509145e-05 1240 3.200000e-01 2.782085e-05 1241 3.300000e-01 3.065437e-05 1242 3.400000e-01 3.357803e-05 1243 3.500000e-01 3.657804e-05 1244 3.600000e-01 3.964117e-05 1245 3.700000e-01 4.275490e-05 1246 3.800000e-01 4.590759e-05 1247 3.900000e-01 4.908858e-05 1248 4.000000e-01 5.228822e-05 1249 4.100000e-01 5.549789e-05 1250 4.200000e-01 5.870995e-05 1251 4.300000e-01 6.191774e-05 1252 4.400000e-01 6.511545e-05 1253 4.500000e-01 6.829812e-05 1254 4.600000e-01 7.146152e-05 1255 4.700000e-01 7.460210e-05 1256 4.800000e-01 7.771688e-05 1257 4.900000e-01 8.080344e-05 1258 5.000000e-01 8.385979e-05 1259 5.100000e-01 8.688435e-05 1260 5.200000e-01 8.987589e-05 1261 5.300000e-01 9.283347e-05 1262 5.400000e-01 9.575638e-05 1263 5.500000e-01 9.864417e-05 1264 5.600000e-01 1.014965e-04 1265 5.700000e-01 1.043133e-04 1266 5.800000e-01 1.070944e-04 1267 5.900000e-01 1.098401e-04 1268 6.000000e-01 1.125503e-04 1269 6.100000e-01 1.152255e-04 1270 6.200000e-01 1.178658e-04 1271 6.300000e-01 1.204716e-04 1272 6.400000e-01 1.230433e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 1.255812e-04 1274 6.600000e-01 1.280859e-04 1275 6.700000e-01 1.305576e-04 1276 6.800000e-01 1.329970e-04 1277 6.900000e-01 1.354044e-04 1278 7.000000e-01 1.377803e-04 1279 7.100000e-01 1.401251e-04 1280 7.200000e-01 1.424394e-04 1281 7.300000e-01 1.447235e-04 1282 7.400000e-01 1.469780e-04 1283 7.500000e-01 1.492032e-04 1284 7.600000e-01 1.513997e-04 1285 7.700000e-01 1.535679e-04 1286 7.800000e-01 1.557081e-04 1287 7.900000e-01 1.578209e-04 1288 8.000000e-01 1.599067e-04 1289 8.100000e-01 1.619658e-04 1290 8.200000e-01 1.639987e-04 1291 8.300000e-01 1.660058e-04 1292 8.400000e-01 1.679874e-04 1293 8.500000e-01 1.699440e-04 1294 8.600000e-01 1.718760e-04 1295 8.700000e-01 1.737836e-04 1296 8.800000e-01 1.756673e-04 1297 8.900000e-01 1.775274e-04 1298 9.000000e-01 1.793644e-04 1299 9.100000e-01 1.811784e-04 1300 9.200000e-01 1.829699e-04 1301 9.300000e-01 1.847391e-04 1302 9.400000e-01 1.864865e-04 1303 9.500000e-01 1.882124e-04 1304 9.600000e-01 1.899170e-04 1305 9.700000e-01 1.916006e-04 1306 9.800000e-01 1.932636e-04 1307 9.900000e-01 1.949062e-04 1308 1.000000e+00 1.965289e-04 1309 1.010000e+00 1.981317e-04 1310 1.020000e+00 1.997150e-04 1311 1.030000e+00 2.012792e-04 1312 1.040000e+00 2.028244e-04 1313 1.050000e+00 2.043509e-04 1314 1.060000e+00 2.058591e-04 1315 1.070000e+00 2.073491e-04 1316 1.080000e+00 2.088211e-04 1317 1.090000e+00 2.102756e-04 1318 1.100000e+00 2.117126e-04 1319 1.110000e+00 2.131325e-04 1320 1.120000e+00 2.145354e-04 1321 1.130000e+00 2.159216e-04 1322 1.140000e+00 2.172914e-04 1323 1.150000e+00 2.186449e-04 1324 1.160000e+00 2.199824e-04 1325 1.170000e+00 2.213040e-04 1326 1.180000e+00 2.226101e-04 1327 1.190000e+00 2.239008e-04 1328 1.200000e+00 2.251763e-04 1329 1.210000e+00 2.264368e-04 1330 1.220000e+00 2.276825e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 2.289137e-04 1332 1.240000e+00 2.301304e-04 1333 1.250000e+00 2.313330e-04 1334 1.260000e+00 2.325215e-04 1335 1.270000e+00 2.336962e-04 1336 1.280000e+00 2.348572e-04 1337 1.290000e+00 2.360048e-04 1338 1.300000e+00 2.371391e-04 1339 1.310000e+00 2.382602e-04 1340 1.320000e+00 2.393683e-04 1341 1.330000e+00 2.404637e-04 1342 1.340000e+00 2.415465e-04 1343 1.350000e+00 2.426167e-04 1344 1.360000e+00 2.436747e-04 1345 1.370000e+00 2.447205e-04 1346 1.380000e+00 2.457543e-04 1347 1.390000e+00 2.467762e-04 1348 1.400000e+00 2.477865e-04 1349 1.410000e+00 2.487851e-04 1350 1.420000e+00 2.497724e-04 1351 1.430000e+00 2.507484e-04 1352 1.440000e+00 2.517133e-04 1353 1.450000e+00 2.526672e-04 1354 1.460000e+00 2.536102e-04 1355 1.470000e+00 2.545425e-04 1356 1.480000e+00 2.554642e-04 1357 1.490000e+00 2.563755e-04 1358 1.500000e+00 2.572764e-04 ngspice-26/tests/bsim3soidd/t4.out0000644000265600020320000013114412264261473016517 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (DD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (DD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 4.146227e-12 1 1.000000e-02 5.646211e-12 2 2.000000e-02 8.545267e-12 3 3.000000e-02 1.226404e-11 4 4.000000e-02 1.759728e-11 5 5.000000e-02 2.524361e-11 6 6.000000e-02 3.620261e-11 7 7.000000e-02 5.190353e-11 8 8.000000e-02 7.438857e-11 9 9.000000e-02 1.065733e-10 10 1.000000e-01 1.526162e-10 11 1.100000e-01 2.184419e-10 12 1.200000e-01 3.124799e-10 13 1.300000e-01 4.467056e-10 14 1.400000e-01 6.381011e-10 15 1.500000e-01 9.106977e-10 16 1.600000e-01 1.298398e-09 17 1.700000e-01 1.848760e-09 18 1.800000e-01 2.628478e-09 19 1.900000e-01 3.730652e-09 20 2.000000e-01 5.284624e-09 21 2.100000e-01 7.469127e-09 22 2.200000e-01 1.052965e-08 23 2.300000e-01 1.480108e-08 24 2.400000e-01 2.073668e-08 25 2.500000e-01 2.894472e-08 26 2.600000e-01 4.023376e-08 27 2.700000e-01 5.566760e-08 28 2.800000e-01 7.663072e-08 29 2.900000e-01 1.049046e-07 30 3.000000e-01 1.427557e-07 31 3.100000e-01 1.930347e-07 32 3.200000e-01 2.592898e-07 33 3.300000e-01 3.458940e-07 34 3.400000e-01 4.581896e-07 35 3.500000e-01 6.026505e-07 36 3.600000e-01 7.870605e-07 37 3.700000e-01 1.020699e-06 38 3.800000e-01 1.314508e-06 39 3.900000e-01 1.681213e-06 40 4.000000e-01 2.135318e-06 41 4.100000e-01 2.692908e-06 42 4.200000e-01 3.371145e-06 43 4.300000e-01 4.187271e-06 44 4.400000e-01 5.156795e-06 45 4.500000e-01 6.290054e-06 46 4.600000e-01 7.586744e-06 47 4.700000e-01 9.036984e-06 48 4.800000e-01 1.063872e-05 49 4.900000e-01 1.239891e-05 50 5.000000e-01 1.432076e-05 51 5.100000e-01 1.640136e-05 52 5.200000e-01 1.863330e-05 53 5.300000e-01 2.100609e-05 54 5.400000e-01 2.350716e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 2.612264e-05 56 5.600000e-01 2.883806e-05 57 5.700000e-01 3.163886e-05 58 5.800000e-01 3.451090e-05 59 5.900000e-01 3.744072e-05 60 6.000000e-01 4.041582e-05 61 6.100000e-01 4.342478e-05 62 6.200000e-01 4.645735e-05 63 6.300000e-01 4.950441e-05 64 6.400000e-01 5.255799e-05 65 6.500000e-01 5.561117e-05 66 6.600000e-01 5.865801e-05 67 6.700000e-01 6.169348e-05 68 6.800000e-01 6.471330e-05 69 6.900000e-01 6.771394e-05 70 7.000000e-01 7.069245e-05 71 7.100000e-01 7.364643e-05 72 7.200000e-01 7.657391e-05 73 7.300000e-01 7.947334e-05 74 7.400000e-01 8.234349e-05 75 7.500000e-01 8.518340e-05 76 7.600000e-01 8.799237e-05 77 7.700000e-01 9.076988e-05 78 7.800000e-01 9.351559e-05 79 7.900000e-01 9.622928e-05 80 8.000000e-01 9.891086e-05 81 8.100000e-01 1.015603e-04 82 8.200000e-01 1.041778e-04 83 8.300000e-01 1.067633e-04 84 8.400000e-01 1.093172e-04 85 8.500000e-01 1.118396e-04 86 8.600000e-01 1.143308e-04 87 8.700000e-01 1.167912e-04 88 8.800000e-01 1.192210e-04 89 8.900000e-01 1.216206e-04 90 9.000000e-01 1.239903e-04 91 9.100000e-01 1.263305e-04 92 9.200000e-01 1.286416e-04 93 9.300000e-01 1.309239e-04 94 9.400000e-01 1.331779e-04 95 9.500000e-01 1.354039e-04 96 9.600000e-01 1.376022e-04 97 9.700000e-01 1.397733e-04 98 9.800000e-01 1.419176e-04 99 9.900000e-01 1.440353e-04 100 1.000000e+00 1.461269e-04 101 1.010000e+00 1.481928e-04 102 1.020000e+00 1.502333e-04 103 1.030000e+00 1.522487e-04 104 1.040000e+00 1.542394e-04 105 1.050000e+00 1.562059e-04 106 1.060000e+00 1.581483e-04 107 1.070000e+00 1.600671e-04 108 1.080000e+00 1.619625e-04 109 1.090000e+00 1.638350e-04 110 1.100000e+00 1.656848e-04 111 1.110000e+00 1.675123e-04 112 1.120000e+00 1.693178e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 1.711015e-04 114 1.140000e+00 1.728639e-04 115 1.150000e+00 1.746051e-04 116 1.160000e+00 1.763255e-04 117 1.170000e+00 1.780254e-04 118 1.180000e+00 1.797050e-04 119 1.190000e+00 1.813647e-04 120 1.200000e+00 1.830047e-04 121 1.210000e+00 1.846253e-04 122 1.220000e+00 1.862267e-04 123 1.230000e+00 1.878092e-04 124 1.240000e+00 1.893732e-04 125 1.250000e+00 1.909188e-04 126 1.260000e+00 1.924462e-04 127 1.270000e+00 1.939558e-04 128 1.280000e+00 1.954477e-04 129 1.290000e+00 1.969223e-04 130 1.300000e+00 1.983797e-04 131 1.310000e+00 1.998202e-04 132 1.320000e+00 2.012439e-04 133 1.330000e+00 2.026512e-04 134 1.340000e+00 2.040423e-04 135 1.350000e+00 2.054173e-04 136 1.360000e+00 2.067764e-04 137 1.370000e+00 2.081200e-04 138 1.380000e+00 2.094481e-04 139 1.390000e+00 2.107610e-04 140 1.400000e+00 2.120589e-04 141 1.410000e+00 2.133420e-04 142 1.420000e+00 2.146104e-04 143 1.430000e+00 2.158644e-04 144 1.440000e+00 2.171042e-04 145 1.450000e+00 2.183299e-04 146 1.460000e+00 2.195417e-04 147 1.470000e+00 2.207398e-04 148 1.480000e+00 2.219244e-04 149 1.490000e+00 2.230956e-04 150 1.500000e+00 2.242536e-04 151 0.000000e+00 4.146482e-12 152 1.000000e-02 5.646551e-12 153 2.000000e-02 8.545765e-12 154 3.000000e-02 1.226474e-11 155 4.000000e-02 1.759825e-11 156 5.000000e-02 2.524497e-11 157 6.000000e-02 3.620450e-11 158 7.000000e-02 5.190617e-11 159 8.000000e-02 7.439226e-11 160 9.000000e-02 1.065785e-10 161 1.000000e-01 1.526234e-10 162 1.100000e-01 2.184519e-10 163 1.200000e-01 3.124937e-10 164 1.300000e-01 4.467248e-10 165 1.400000e-01 6.381277e-10 166 1.500000e-01 9.107344e-10 167 1.600000e-01 1.298449e-09 168 1.700000e-01 1.848830e-09 169 1.800000e-01 2.628573e-09 170 1.900000e-01 3.730782e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 5.284801e-09 172 2.100000e-01 7.469365e-09 173 2.200000e-01 1.052997e-08 174 2.300000e-01 1.480151e-08 175 2.400000e-01 2.073725e-08 176 2.500000e-01 2.894546e-08 177 2.600000e-01 4.023472e-08 178 2.700000e-01 5.566883e-08 179 2.800000e-01 7.663228e-08 180 2.900000e-01 1.049066e-07 181 3.000000e-01 1.427581e-07 182 3.100000e-01 1.930377e-07 183 3.200000e-01 2.592935e-07 184 3.300000e-01 3.458986e-07 185 3.400000e-01 4.581953e-07 186 3.500000e-01 6.026578e-07 187 3.600000e-01 7.870701e-07 188 3.700000e-01 1.020712e-06 189 3.800000e-01 1.314526e-06 190 3.900000e-01 1.681238e-06 191 4.000000e-01 2.135353e-06 192 4.100000e-01 2.692957e-06 193 4.200000e-01 3.371213e-06 194 4.300000e-01 4.187363e-06 195 4.400000e-01 5.156917e-06 196 4.500000e-01 6.290212e-06 197 4.600000e-01 7.586942e-06 198 4.700000e-01 9.037226e-06 199 4.800000e-01 1.063901e-05 200 4.900000e-01 1.239925e-05 201 5.000000e-01 1.432115e-05 202 5.100000e-01 1.640180e-05 203 5.200000e-01 1.863378e-05 204 5.300000e-01 2.100662e-05 205 5.400000e-01 2.350774e-05 206 5.500000e-01 2.612326e-05 207 5.600000e-01 2.883871e-05 208 5.700000e-01 3.163955e-05 209 5.800000e-01 3.451161e-05 210 5.900000e-01 3.744145e-05 211 6.000000e-01 4.041657e-05 212 6.100000e-01 4.342555e-05 213 6.200000e-01 4.645813e-05 214 6.300000e-01 4.950520e-05 215 6.400000e-01 5.255879e-05 216 6.500000e-01 5.561198e-05 217 6.600000e-01 5.865883e-05 218 6.700000e-01 6.169429e-05 219 6.800000e-01 6.471412e-05 220 6.900000e-01 6.771476e-05 221 7.000000e-01 7.069327e-05 222 7.100000e-01 7.364724e-05 223 7.200000e-01 7.657472e-05 224 7.300000e-01 7.947415e-05 225 7.400000e-01 8.234429e-05 226 7.500000e-01 8.518420e-05 227 7.600000e-01 8.799317e-05 228 7.700000e-01 9.077067e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 9.351637e-05 230 7.900000e-01 9.623006e-05 231 8.000000e-01 9.891163e-05 232 8.100000e-01 1.015611e-04 233 8.200000e-01 1.041785e-04 234 8.300000e-01 1.067641e-04 235 8.400000e-01 1.093179e-04 236 8.500000e-01 1.118403e-04 237 8.600000e-01 1.143316e-04 238 8.700000e-01 1.167919e-04 239 8.800000e-01 1.192217e-04 240 8.900000e-01 1.216213e-04 241 9.000000e-01 1.239910e-04 242 9.100000e-01 1.263312e-04 243 9.200000e-01 1.286423e-04 244 9.300000e-01 1.309246e-04 245 9.400000e-01 1.331786e-04 246 9.500000e-01 1.354046e-04 247 9.600000e-01 1.376029e-04 248 9.700000e-01 1.397740e-04 249 9.800000e-01 1.419182e-04 250 9.900000e-01 1.440360e-04 251 1.000000e+00 1.461276e-04 252 1.010000e+00 1.481934e-04 253 1.020000e+00 1.502339e-04 254 1.030000e+00 1.522493e-04 255 1.040000e+00 1.542401e-04 256 1.050000e+00 1.562065e-04 257 1.060000e+00 1.581489e-04 258 1.070000e+00 1.600677e-04 259 1.080000e+00 1.619632e-04 260 1.090000e+00 1.638356e-04 261 1.100000e+00 1.656854e-04 262 1.110000e+00 1.675129e-04 263 1.120000e+00 1.693184e-04 264 1.130000e+00 1.711021e-04 265 1.140000e+00 1.728644e-04 266 1.150000e+00 1.746057e-04 267 1.160000e+00 1.763261e-04 268 1.170000e+00 1.780259e-04 269 1.180000e+00 1.797056e-04 270 1.190000e+00 1.813652e-04 271 1.200000e+00 1.830052e-04 272 1.210000e+00 1.846258e-04 273 1.220000e+00 1.862272e-04 274 1.230000e+00 1.878098e-04 275 1.240000e+00 1.893737e-04 276 1.250000e+00 1.909193e-04 277 1.260000e+00 1.924467e-04 278 1.270000e+00 1.939563e-04 279 1.280000e+00 1.954483e-04 280 1.290000e+00 1.969228e-04 281 1.300000e+00 1.983802e-04 282 1.310000e+00 1.998207e-04 283 1.320000e+00 2.012444e-04 284 1.330000e+00 2.026517e-04 285 1.340000e+00 2.040428e-04 286 1.350000e+00 2.054178e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 2.067769e-04 288 1.370000e+00 2.081205e-04 289 1.380000e+00 2.094486e-04 290 1.390000e+00 2.107615e-04 291 1.400000e+00 2.120594e-04 292 1.410000e+00 2.133425e-04 293 1.420000e+00 2.146109e-04 294 1.430000e+00 2.158649e-04 295 1.440000e+00 2.171047e-04 296 1.450000e+00 2.183304e-04 297 1.460000e+00 2.195422e-04 298 1.470000e+00 2.207403e-04 299 1.480000e+00 2.219248e-04 300 1.490000e+00 2.230960e-04 301 1.500000e+00 2.242540e-04 302 0.000000e+00 4.147012e-12 303 1.000000e-02 5.647254e-12 304 2.000000e-02 8.546781e-12 305 3.000000e-02 1.226614e-11 306 4.000000e-02 1.760020e-11 307 5.000000e-02 2.524766e-11 308 6.000000e-02 3.620823e-11 309 7.000000e-02 5.191133e-11 310 8.000000e-02 7.439939e-11 311 9.000000e-02 1.065883e-10 312 1.000000e-01 1.526370e-10 313 1.100000e-01 2.184707e-10 314 1.200000e-01 3.125197e-10 315 1.300000e-01 4.467605e-10 316 1.400000e-01 6.381768e-10 317 1.500000e-01 9.108019e-10 318 1.600000e-01 1.298541e-09 319 1.700000e-01 1.848956e-09 320 1.800000e-01 2.628745e-09 321 1.900000e-01 3.731015e-09 322 2.000000e-01 5.285115e-09 323 2.100000e-01 7.469787e-09 324 2.200000e-01 1.053054e-08 325 2.300000e-01 1.480225e-08 326 2.400000e-01 2.073822e-08 327 2.500000e-01 2.894674e-08 328 2.600000e-01 4.023636e-08 329 2.700000e-01 5.567092e-08 330 2.800000e-01 7.663492e-08 331 2.900000e-01 1.049099e-07 332 3.000000e-01 1.427622e-07 333 3.100000e-01 1.930427e-07 334 3.200000e-01 2.592996e-07 335 3.300000e-01 3.459061e-07 336 3.400000e-01 4.582048e-07 337 3.500000e-01 6.026698e-07 338 3.600000e-01 7.870858e-07 339 3.700000e-01 1.020733e-06 340 3.800000e-01 1.314555e-06 341 3.900000e-01 1.681279e-06 342 4.000000e-01 2.135409e-06 343 4.100000e-01 2.693036e-06 344 4.200000e-01 3.371321e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 4.187509e-06 346 4.400000e-01 5.157110e-06 347 4.500000e-01 6.290461e-06 348 4.600000e-01 7.587255e-06 349 4.700000e-01 9.037608e-06 350 4.800000e-01 1.063946e-05 351 4.900000e-01 1.239978e-05 352 5.000000e-01 1.432176e-05 353 5.100000e-01 1.640249e-05 354 5.200000e-01 1.863455e-05 355 5.300000e-01 2.100746e-05 356 5.400000e-01 2.350864e-05 357 5.500000e-01 2.612423e-05 358 5.600000e-01 2.883973e-05 359 5.700000e-01 3.164062e-05 360 5.800000e-01 3.451272e-05 361 5.900000e-01 3.744260e-05 362 6.000000e-01 4.041775e-05 363 6.100000e-01 4.342676e-05 364 6.200000e-01 4.645936e-05 365 6.300000e-01 4.950645e-05 366 6.400000e-01 5.256005e-05 367 6.500000e-01 5.561325e-05 368 6.600000e-01 5.866010e-05 369 6.700000e-01 6.169557e-05 370 6.800000e-01 6.471540e-05 371 6.900000e-01 6.771604e-05 372 7.000000e-01 7.069455e-05 373 7.100000e-01 7.364852e-05 374 7.200000e-01 7.657599e-05 375 7.300000e-01 7.947542e-05 376 7.400000e-01 8.234555e-05 377 7.500000e-01 8.518546e-05 378 7.600000e-01 8.799442e-05 379 7.700000e-01 9.077192e-05 380 7.800000e-01 9.351761e-05 381 7.900000e-01 9.623129e-05 382 8.000000e-01 9.891285e-05 383 8.100000e-01 1.015623e-04 384 8.200000e-01 1.041797e-04 385 8.300000e-01 1.067653e-04 386 8.400000e-01 1.093191e-04 387 8.500000e-01 1.118415e-04 388 8.600000e-01 1.143327e-04 389 8.700000e-01 1.167931e-04 390 8.800000e-01 1.192229e-04 391 8.900000e-01 1.216224e-04 392 9.000000e-01 1.239921e-04 393 9.100000e-01 1.263323e-04 394 9.200000e-01 1.286434e-04 395 9.300000e-01 1.309258e-04 396 9.400000e-01 1.331797e-04 397 9.500000e-01 1.354056e-04 398 9.600000e-01 1.376040e-04 399 9.700000e-01 1.397751e-04 400 9.800000e-01 1.419193e-04 401 9.900000e-01 1.440370e-04 402 1.000000e+00 1.461286e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.481945e-04 404 1.020000e+00 1.502349e-04 405 1.030000e+00 1.522503e-04 406 1.040000e+00 1.542411e-04 407 1.050000e+00 1.562075e-04 408 1.060000e+00 1.581499e-04 409 1.070000e+00 1.600687e-04 410 1.080000e+00 1.619641e-04 411 1.090000e+00 1.638366e-04 412 1.100000e+00 1.656864e-04 413 1.110000e+00 1.675139e-04 414 1.120000e+00 1.693193e-04 415 1.130000e+00 1.711030e-04 416 1.140000e+00 1.728654e-04 417 1.150000e+00 1.746066e-04 418 1.160000e+00 1.763270e-04 419 1.170000e+00 1.780268e-04 420 1.180000e+00 1.797065e-04 421 1.190000e+00 1.813661e-04 422 1.200000e+00 1.830061e-04 423 1.210000e+00 1.846267e-04 424 1.220000e+00 1.862281e-04 425 1.230000e+00 1.878107e-04 426 1.240000e+00 1.893746e-04 427 1.250000e+00 1.909201e-04 428 1.260000e+00 1.924476e-04 429 1.270000e+00 1.939571e-04 430 1.280000e+00 1.954491e-04 431 1.290000e+00 1.969236e-04 432 1.300000e+00 1.983810e-04 433 1.310000e+00 1.998215e-04 434 1.320000e+00 2.012452e-04 435 1.330000e+00 2.026525e-04 436 1.340000e+00 2.040436e-04 437 1.350000e+00 2.054185e-04 438 1.360000e+00 2.067777e-04 439 1.370000e+00 2.081212e-04 440 1.380000e+00 2.094493e-04 441 1.390000e+00 2.107622e-04 442 1.400000e+00 2.120601e-04 443 1.410000e+00 2.133432e-04 444 1.420000e+00 2.146116e-04 445 1.430000e+00 2.158656e-04 446 1.440000e+00 2.171054e-04 447 1.450000e+00 2.183311e-04 448 1.460000e+00 2.195429e-04 449 1.470000e+00 2.207410e-04 450 1.480000e+00 2.219255e-04 451 1.490000e+00 2.230967e-04 452 1.500000e+00 2.242547e-04 453 0.000000e+00 4.148791e-12 454 1.000000e-02 5.649556e-12 455 2.000000e-02 8.549996e-12 456 3.000000e-02 1.227048e-11 457 4.000000e-02 1.760605e-11 458 5.000000e-02 2.525557e-11 459 6.000000e-02 3.621893e-11 460 7.000000e-02 5.192582e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 7.441903e-11 462 9.000000e-02 1.066149e-10 463 1.000000e-01 1.526731e-10 464 1.100000e-01 2.185196e-10 465 1.200000e-01 3.125860e-10 466 1.300000e-01 4.468504e-10 467 1.400000e-01 6.382984e-10 468 1.500000e-01 9.109662e-10 469 1.600000e-01 1.298763e-09 470 1.700000e-01 1.849255e-09 471 1.800000e-01 2.629145e-09 472 1.900000e-01 3.731550e-09 473 2.000000e-01 5.285828e-09 474 2.100000e-01 7.470732e-09 475 2.200000e-01 1.053178e-08 476 2.300000e-01 1.480388e-08 477 2.400000e-01 2.074034e-08 478 2.500000e-01 2.894946e-08 479 2.600000e-01 4.023983e-08 480 2.700000e-01 5.567530e-08 481 2.800000e-01 7.664038e-08 482 2.900000e-01 1.049166e-07 483 3.000000e-01 1.427704e-07 484 3.100000e-01 1.930527e-07 485 3.200000e-01 2.593118e-07 486 3.300000e-01 3.459211e-07 487 3.400000e-01 4.582232e-07 488 3.500000e-01 6.026931e-07 489 3.600000e-01 7.871160e-07 490 3.700000e-01 1.020773e-06 491 3.800000e-01 1.314610e-06 492 3.900000e-01 1.681355e-06 493 4.000000e-01 2.135515e-06 494 4.100000e-01 2.693183e-06 495 4.200000e-01 3.371522e-06 496 4.300000e-01 4.187779e-06 497 4.400000e-01 5.157463e-06 498 4.500000e-01 6.290913e-06 499 4.600000e-01 7.587820e-06 500 4.700000e-01 9.038297e-06 501 4.800000e-01 1.064028e-05 502 4.900000e-01 1.240074e-05 503 5.000000e-01 1.432286e-05 504 5.100000e-01 1.640373e-05 505 5.200000e-01 1.863593e-05 506 5.300000e-01 2.100897e-05 507 5.400000e-01 2.351027e-05 508 5.500000e-01 2.612596e-05 509 5.600000e-01 2.884157e-05 510 5.700000e-01 3.164254e-05 511 5.800000e-01 3.451473e-05 512 5.900000e-01 3.744467e-05 513 6.000000e-01 4.041988e-05 514 6.100000e-01 4.342893e-05 515 6.200000e-01 4.646157e-05 516 6.300000e-01 4.950869e-05 517 6.400000e-01 5.256231e-05 518 6.500000e-01 5.561553e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 5.866240e-05 520 6.700000e-01 6.169787e-05 521 6.800000e-01 6.471771e-05 522 6.900000e-01 6.771835e-05 523 7.000000e-01 7.069685e-05 524 7.100000e-01 7.365082e-05 525 7.200000e-01 7.657828e-05 526 7.300000e-01 7.947770e-05 527 7.400000e-01 8.234783e-05 528 7.500000e-01 8.518772e-05 529 7.600000e-01 8.799667e-05 530 7.700000e-01 9.077415e-05 531 7.800000e-01 9.351983e-05 532 7.900000e-01 9.623349e-05 533 8.000000e-01 9.891504e-05 534 8.100000e-01 1.015645e-04 535 8.200000e-01 1.041819e-04 536 8.300000e-01 1.067674e-04 537 8.400000e-01 1.093212e-04 538 8.500000e-01 1.118436e-04 539 8.600000e-01 1.143348e-04 540 8.700000e-01 1.167951e-04 541 8.800000e-01 1.192249e-04 542 8.900000e-01 1.216245e-04 543 9.000000e-01 1.239942e-04 544 9.100000e-01 1.263344e-04 545 9.200000e-01 1.286454e-04 546 9.300000e-01 1.309277e-04 547 9.400000e-01 1.331817e-04 548 9.500000e-01 1.354076e-04 549 9.600000e-01 1.376059e-04 550 9.700000e-01 1.397770e-04 551 9.800000e-01 1.419212e-04 552 9.900000e-01 1.440389e-04 553 1.000000e+00 1.461305e-04 554 1.010000e+00 1.481963e-04 555 1.020000e+00 1.502368e-04 556 1.030000e+00 1.522522e-04 557 1.040000e+00 1.542429e-04 558 1.050000e+00 1.562093e-04 559 1.060000e+00 1.581517e-04 560 1.070000e+00 1.600704e-04 561 1.080000e+00 1.619659e-04 562 1.090000e+00 1.638383e-04 563 1.100000e+00 1.656881e-04 564 1.110000e+00 1.675156e-04 565 1.120000e+00 1.693210e-04 566 1.130000e+00 1.711047e-04 567 1.140000e+00 1.728670e-04 568 1.150000e+00 1.746082e-04 569 1.160000e+00 1.763286e-04 570 1.170000e+00 1.780284e-04 571 1.180000e+00 1.797081e-04 572 1.190000e+00 1.813677e-04 573 1.200000e+00 1.830077e-04 574 1.210000e+00 1.846282e-04 575 1.220000e+00 1.862297e-04 576 1.230000e+00 1.878122e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 1.893761e-04 578 1.250000e+00 1.909217e-04 579 1.260000e+00 1.924491e-04 580 1.270000e+00 1.939586e-04 581 1.280000e+00 1.954506e-04 582 1.290000e+00 1.969251e-04 583 1.300000e+00 1.983825e-04 584 1.310000e+00 1.998229e-04 585 1.320000e+00 2.012467e-04 586 1.330000e+00 2.026540e-04 587 1.340000e+00 2.040450e-04 588 1.350000e+00 2.054199e-04 589 1.360000e+00 2.067791e-04 590 1.370000e+00 2.081226e-04 591 1.380000e+00 2.094507e-04 592 1.390000e+00 2.107636e-04 593 1.400000e+00 2.120615e-04 594 1.410000e+00 2.133445e-04 595 1.420000e+00 2.146130e-04 596 1.430000e+00 2.158670e-04 597 1.440000e+00 2.171067e-04 598 1.450000e+00 2.183324e-04 599 1.460000e+00 2.195442e-04 600 1.470000e+00 2.207422e-04 601 1.480000e+00 2.219268e-04 602 1.490000e+00 2.230980e-04 603 1.500000e+00 2.242560e-04 604 0.000000e+00 4.342370e-12 605 1.000000e-02 5.848072e-12 606 2.000000e-02 8.761122e-12 607 3.000000e-02 1.249202e-11 608 4.000000e-02 1.783257e-11 609 5.000000e-02 2.548303e-11 610 6.000000e-02 3.645059e-11 611 7.000000e-02 5.217063e-11 612 8.000000e-02 7.468824e-11 613 9.000000e-02 1.069212e-10 614 1.000000e-01 1.530310e-10 615 1.100000e-01 2.189467e-10 616 1.200000e-01 3.131039e-10 617 1.300000e-01 4.474865e-10 618 1.400000e-01 6.390874e-10 619 1.500000e-01 9.119524e-10 620 1.600000e-01 1.300003e-09 621 1.700000e-01 1.850819e-09 622 1.800000e-01 2.631125e-09 623 1.900000e-01 3.734059e-09 624 2.000000e-01 5.289006e-09 625 2.100000e-01 7.474753e-09 626 2.200000e-01 1.053686e-08 627 2.300000e-01 1.481026e-08 628 2.400000e-01 2.074831e-08 629 2.500000e-01 2.895936e-08 630 2.600000e-01 4.025203e-08 631 2.700000e-01 5.569021e-08 632 2.800000e-01 7.665845e-08 633 2.900000e-01 1.049383e-07 634 3.000000e-01 1.427963e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 1.930834e-07 636 3.200000e-01 2.593481e-07 637 3.300000e-01 3.459644e-07 638 3.400000e-01 4.582756e-07 639 3.500000e-01 6.027579e-07 640 3.600000e-01 7.871986e-07 641 3.700000e-01 1.020881e-06 642 3.800000e-01 1.314755e-06 643 3.900000e-01 1.681552e-06 644 4.000000e-01 2.135786e-06 645 4.100000e-01 2.693551e-06 646 4.200000e-01 3.372018e-06 647 4.300000e-01 4.188435e-06 648 4.400000e-01 5.158314e-06 649 4.500000e-01 6.291990e-06 650 4.600000e-01 7.589152e-06 651 4.700000e-01 9.039911e-06 652 4.800000e-01 1.064220e-05 653 4.900000e-01 1.240298e-05 654 5.000000e-01 1.432543e-05 655 5.100000e-01 1.640662e-05 656 5.200000e-01 1.863913e-05 657 5.300000e-01 2.101247e-05 658 5.400000e-01 2.351405e-05 659 5.500000e-01 2.613000e-05 660 5.600000e-01 2.884584e-05 661 5.700000e-01 3.164702e-05 662 5.800000e-01 3.451938e-05 663 5.900000e-01 3.744948e-05 664 6.000000e-01 4.042482e-05 665 6.100000e-01 4.343398e-05 666 6.200000e-01 4.646670e-05 667 6.300000e-01 4.951389e-05 668 6.400000e-01 5.256757e-05 669 6.500000e-01 5.562083e-05 670 6.600000e-01 5.866772e-05 671 6.700000e-01 6.170322e-05 672 6.800000e-01 6.472306e-05 673 6.900000e-01 6.772370e-05 674 7.000000e-01 7.070220e-05 675 7.100000e-01 7.365615e-05 676 7.200000e-01 7.658360e-05 677 7.300000e-01 7.948300e-05 678 7.400000e-01 8.235310e-05 679 7.500000e-01 8.519297e-05 680 7.600000e-01 8.800188e-05 681 7.700000e-01 9.077934e-05 682 7.800000e-01 9.352498e-05 683 7.900000e-01 9.623861e-05 684 8.000000e-01 9.892013e-05 685 8.100000e-01 1.015695e-04 686 8.200000e-01 1.041869e-04 687 8.300000e-01 1.067724e-04 688 8.400000e-01 1.093262e-04 689 8.500000e-01 1.118485e-04 690 8.600000e-01 1.143397e-04 691 8.700000e-01 1.168000e-04 692 8.800000e-01 1.192297e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.216292e-04 694 9.000000e-01 1.239989e-04 695 9.100000e-01 1.263390e-04 696 9.200000e-01 1.286500e-04 697 9.300000e-01 1.309323e-04 698 9.400000e-01 1.331862e-04 699 9.500000e-01 1.354121e-04 700 9.600000e-01 1.376104e-04 701 9.700000e-01 1.397814e-04 702 9.800000e-01 1.419256e-04 703 9.900000e-01 1.440433e-04 704 1.000000e+00 1.461348e-04 705 1.010000e+00 1.482006e-04 706 1.020000e+00 1.502410e-04 707 1.030000e+00 1.522564e-04 708 1.040000e+00 1.542471e-04 709 1.050000e+00 1.562134e-04 710 1.060000e+00 1.581558e-04 711 1.070000e+00 1.600745e-04 712 1.080000e+00 1.619699e-04 713 1.090000e+00 1.638423e-04 714 1.100000e+00 1.656921e-04 715 1.110000e+00 1.675195e-04 716 1.120000e+00 1.693249e-04 717 1.130000e+00 1.711086e-04 718 1.140000e+00 1.728709e-04 719 1.150000e+00 1.746120e-04 720 1.160000e+00 1.763324e-04 721 1.170000e+00 1.780322e-04 722 1.180000e+00 1.797118e-04 723 1.190000e+00 1.813714e-04 724 1.200000e+00 1.830114e-04 725 1.210000e+00 1.846319e-04 726 1.220000e+00 1.862333e-04 727 1.230000e+00 1.878158e-04 728 1.240000e+00 1.893797e-04 729 1.250000e+00 1.909252e-04 730 1.260000e+00 1.924526e-04 731 1.270000e+00 1.939621e-04 732 1.280000e+00 1.954540e-04 733 1.290000e+00 1.969285e-04 734 1.300000e+00 1.983859e-04 735 1.310000e+00 1.998263e-04 736 1.320000e+00 2.012500e-04 737 1.330000e+00 2.026573e-04 738 1.340000e+00 2.040482e-04 739 1.350000e+00 2.054232e-04 740 1.360000e+00 2.067823e-04 741 1.370000e+00 2.081258e-04 742 1.380000e+00 2.094539e-04 743 1.390000e+00 2.107668e-04 744 1.400000e+00 2.120646e-04 745 1.410000e+00 2.133476e-04 746 1.420000e+00 2.146160e-04 747 1.430000e+00 2.158700e-04 748 1.440000e+00 2.171097e-04 749 1.450000e+00 2.183354e-04 750 1.460000e+00 2.195472e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 2.207452e-04 752 1.480000e+00 2.219297e-04 753 1.490000e+00 2.231009e-04 754 1.500000e+00 2.242589e-04 755 0.000000e+00 1.035825e-11 756 1.000000e-02 1.374050e-11 757 2.000000e-02 1.989926e-11 758 3.000000e-02 2.757713e-11 759 4.000000e-02 3.821258e-11 760 5.000000e-02 5.294171e-11 761 6.000000e-02 7.333502e-11 762 7.000000e-02 1.015622e-10 763 8.000000e-02 1.406188e-10 764 9.000000e-02 1.946371e-10 765 1.000000e-01 2.693124e-10 766 1.100000e-01 3.724855e-10 767 1.200000e-01 5.149374e-10 768 1.300000e-01 7.114699e-10 769 1.400000e-01 9.823713e-10 770 1.500000e-01 1.355395e-09 771 1.600000e-01 1.868398e-09 772 1.700000e-01 2.572718e-09 773 1.800000e-01 3.538056e-09 774 1.900000e-01 4.858667e-09 775 2.000000e-01 6.661560e-09 776 2.100000e-01 9.117327e-09 777 2.200000e-01 1.245447e-08 778 2.300000e-01 1.697864e-08 779 2.400000e-01 2.309950e-08 780 2.500000e-01 3.137067e-08 781 2.600000e-01 4.255412e-08 782 2.700000e-01 5.772124e-08 783 2.800000e-01 7.835827e-08 784 2.900000e-01 1.063745e-07 785 3.000000e-01 1.440740e-07 786 3.100000e-01 1.942644e-07 787 3.200000e-01 2.604440e-07 788 3.300000e-01 3.469806e-07 789 3.400000e-01 4.592439e-07 790 3.500000e-01 6.037297e-07 791 3.600000e-01 7.882339e-07 792 3.700000e-01 1.022048e-06 793 3.800000e-01 1.316131e-06 794 3.900000e-01 1.683226e-06 795 4.000000e-01 2.137861e-06 796 4.100000e-01 2.696140e-06 797 4.200000e-01 3.375239e-06 798 4.300000e-01 4.192406e-06 799 4.400000e-01 5.163146e-06 800 4.500000e-01 6.297792e-06 801 4.600000e-01 7.596049e-06 802 4.700000e-01 9.048061e-06 803 4.800000e-01 1.065176e-05 804 4.900000e-01 1.241405e-05 805 5.000000e-01 1.433806e-05 806 5.100000e-01 1.642081e-05 807 5.200000e-01 1.865485e-05 808 5.300000e-01 2.102965e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 2.353259e-05 810 5.500000e-01 2.614978e-05 811 5.600000e-01 2.886674e-05 812 5.700000e-01 3.166891e-05 813 5.800000e-01 3.454213e-05 814 5.900000e-01 3.747297e-05 815 6.000000e-01 4.044894e-05 816 6.100000e-01 4.345862e-05 817 6.200000e-01 4.649177e-05 818 6.300000e-01 4.953930e-05 819 6.400000e-01 5.259324e-05 820 6.500000e-01 5.564669e-05 821 6.600000e-01 5.869372e-05 822 6.700000e-01 6.172929e-05 823 6.800000e-01 6.474917e-05 824 6.900000e-01 6.774981e-05 825 7.000000e-01 7.072828e-05 826 7.100000e-01 7.368217e-05 827 7.200000e-01 7.660954e-05 828 7.300000e-01 7.950884e-05 829 7.400000e-01 8.237882e-05 830 7.500000e-01 8.521855e-05 831 7.600000e-01 8.802733e-05 832 7.700000e-01 9.080463e-05 833 7.800000e-01 9.355011e-05 834 7.900000e-01 9.626357e-05 835 8.000000e-01 9.894491e-05 836 8.100000e-01 1.015941e-04 837 8.200000e-01 1.042113e-04 838 8.300000e-01 1.067966e-04 839 8.400000e-01 1.093502e-04 840 8.500000e-01 1.118724e-04 841 8.600000e-01 1.143634e-04 842 8.700000e-01 1.168235e-04 843 8.800000e-01 1.192530e-04 844 8.900000e-01 1.216523e-04 845 9.000000e-01 1.240218e-04 846 9.100000e-01 1.263618e-04 847 9.200000e-01 1.286726e-04 848 9.300000e-01 1.309547e-04 849 9.400000e-01 1.332084e-04 850 9.500000e-01 1.354341e-04 851 9.600000e-01 1.376322e-04 852 9.700000e-01 1.398031e-04 853 9.800000e-01 1.419470e-04 854 9.900000e-01 1.440645e-04 855 1.000000e+00 1.461559e-04 856 1.010000e+00 1.482215e-04 857 1.020000e+00 1.502618e-04 858 1.030000e+00 1.522770e-04 859 1.040000e+00 1.542675e-04 860 1.050000e+00 1.562337e-04 861 1.060000e+00 1.581759e-04 862 1.070000e+00 1.600944e-04 863 1.080000e+00 1.619896e-04 864 1.090000e+00 1.638619e-04 865 1.100000e+00 1.657115e-04 866 1.110000e+00 1.675388e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 1.693440e-04 868 1.130000e+00 1.711275e-04 869 1.140000e+00 1.728897e-04 870 1.150000e+00 1.746307e-04 871 1.160000e+00 1.763509e-04 872 1.170000e+00 1.780505e-04 873 1.180000e+00 1.797300e-04 874 1.190000e+00 1.813894e-04 875 1.200000e+00 1.830292e-04 876 1.210000e+00 1.846496e-04 877 1.220000e+00 1.862509e-04 878 1.230000e+00 1.878332e-04 879 1.240000e+00 1.893970e-04 880 1.250000e+00 1.909423e-04 881 1.260000e+00 1.924696e-04 882 1.270000e+00 1.939790e-04 883 1.280000e+00 1.954708e-04 884 1.290000e+00 1.969451e-04 885 1.300000e+00 1.984023e-04 886 1.310000e+00 1.998426e-04 887 1.320000e+00 2.012662e-04 888 1.330000e+00 2.026734e-04 889 1.340000e+00 2.040642e-04 890 1.350000e+00 2.054390e-04 891 1.360000e+00 2.067980e-04 892 1.370000e+00 2.081414e-04 893 1.380000e+00 2.094694e-04 894 1.390000e+00 2.107821e-04 895 1.400000e+00 2.120798e-04 896 1.410000e+00 2.133628e-04 897 1.420000e+00 2.146310e-04 898 1.430000e+00 2.158849e-04 899 1.440000e+00 2.171245e-04 900 1.450000e+00 2.183500e-04 901 1.460000e+00 2.195617e-04 902 1.470000e+00 2.207596e-04 903 1.480000e+00 2.219441e-04 904 1.490000e+00 2.231151e-04 905 1.500000e+00 2.242730e-04 906 0.000000e+00 2.888814e-11 907 1.000000e-02 3.985200e-11 908 2.000000e-02 5.497377e-11 909 3.000000e-02 7.582477e-11 910 4.000000e-02 1.045667e-10 911 5.000000e-02 1.441716e-10 912 6.000000e-02 1.987217e-10 913 7.000000e-02 2.738195e-10 914 8.000000e-02 3.771447e-10 915 9.000000e-02 5.192109e-10 916 1.000000e-01 7.143893e-10 917 1.100000e-01 9.822894e-10 918 1.200000e-01 1.349613e-09 919 1.300000e-01 1.852634e-09 920 1.400000e-01 2.540492e-09 921 1.500000e-01 3.479546e-09 922 1.600000e-01 4.759021e-09 923 1.700000e-01 6.497972e-09 924 1.800000e-01 8.855179e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 1.204107e-08 926 2.000000e-01 1.633276e-08 927 2.100000e-01 2.209272e-08 928 2.200000e-01 2.979157e-08 929 2.300000e-01 4.003547e-08 930 2.400000e-01 5.359841e-08 931 2.500000e-01 7.145981e-08 932 2.600000e-01 9.484748e-08 933 2.700000e-01 1.252861e-07 934 2.800000e-01 1.646516e-07 935 2.900000e-01 2.152318e-07 936 3.000000e-01 2.797944e-07 937 3.100000e-01 3.616633e-07 938 3.200000e-01 4.648060e-07 939 3.300000e-01 5.939315e-07 940 3.400000e-01 7.546012e-07 941 3.500000e-01 9.533483e-07 942 3.600000e-01 1.197800e-06 943 3.700000e-01 1.496793e-06 944 3.800000e-01 1.860454e-06 945 3.900000e-01 2.300243e-06 946 4.000000e-01 2.828906e-06 947 4.100000e-01 3.460354e-06 948 4.200000e-01 4.209458e-06 949 4.300000e-01 5.091849e-06 950 4.400000e-01 6.123857e-06 951 4.500000e-01 7.322601e-06 952 4.600000e-01 8.704781e-06 953 4.700000e-01 1.028153e-05 954 4.800000e-01 1.205570e-05 955 4.900000e-01 1.402401e-05 956 5.000000e-01 1.617661e-05 957 5.100000e-01 1.849841e-05 958 5.200000e-01 2.097175e-05 959 5.300000e-01 2.357818e-05 960 5.400000e-01 2.629938e-05 961 5.500000e-01 2.911767e-05 962 5.600000e-01 3.201639e-05 963 5.700000e-01 3.498009e-05 964 5.800000e-01 3.799462e-05 965 5.900000e-01 4.104726e-05 966 6.000000e-01 4.412668e-05 967 6.100000e-01 4.722288e-05 968 6.200000e-01 5.032719e-05 969 6.300000e-01 5.343210e-05 970 6.400000e-01 5.653120e-05 971 6.500000e-01 5.961905e-05 972 6.600000e-01 6.269109e-05 973 6.700000e-01 6.574352e-05 974 6.800000e-01 6.877321e-05 975 6.900000e-01 7.177759e-05 976 7.000000e-01 7.475460e-05 977 7.100000e-01 7.770259e-05 978 7.200000e-01 8.062027e-05 979 7.300000e-01 8.350665e-05 980 7.400000e-01 8.636099e-05 981 7.500000e-01 8.918278e-05 982 7.600000e-01 9.197165e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 9.472742e-05 984 7.800000e-01 9.744999e-05 985 7.900000e-01 1.001394e-04 986 8.000000e-01 1.027957e-04 987 8.100000e-01 1.054192e-04 988 8.200000e-01 1.080100e-04 989 8.300000e-01 1.105683e-04 990 8.400000e-01 1.130946e-04 991 8.500000e-01 1.155891e-04 992 8.600000e-01 1.180521e-04 993 8.700000e-01 1.204841e-04 994 8.800000e-01 1.228855e-04 995 8.900000e-01 1.252565e-04 996 9.000000e-01 1.275977e-04 997 9.100000e-01 1.299094e-04 998 9.200000e-01 1.321920e-04 999 9.300000e-01 1.344459e-04 1000 9.400000e-01 1.366716e-04 1001 9.500000e-01 1.388693e-04 1002 9.600000e-01 1.410396e-04 1003 9.700000e-01 1.431828e-04 1004 9.800000e-01 1.452992e-04 1005 9.900000e-01 1.473894e-04 1006 1.000000e+00 1.494536e-04 1007 1.010000e+00 1.514923e-04 1008 1.020000e+00 1.535058e-04 1009 1.030000e+00 1.554944e-04 1010 1.040000e+00 1.574586e-04 1011 1.050000e+00 1.593986e-04 1012 1.060000e+00 1.613149e-04 1013 1.070000e+00 1.632078e-04 1014 1.080000e+00 1.650776e-04 1015 1.090000e+00 1.669246e-04 1016 1.100000e+00 1.687492e-04 1017 1.110000e+00 1.705517e-04 1018 1.120000e+00 1.723324e-04 1019 1.130000e+00 1.740917e-04 1020 1.140000e+00 1.758297e-04 1021 1.150000e+00 1.775469e-04 1022 1.160000e+00 1.792434e-04 1023 1.170000e+00 1.809197e-04 1024 1.180000e+00 1.825760e-04 1025 1.190000e+00 1.842126e-04 1026 1.200000e+00 1.858297e-04 1027 1.210000e+00 1.874276e-04 1028 1.220000e+00 1.890066e-04 1029 1.230000e+00 1.905669e-04 1030 1.240000e+00 1.921089e-04 1031 1.250000e+00 1.936327e-04 1032 1.260000e+00 1.951385e-04 1033 1.270000e+00 1.966268e-04 1034 1.280000e+00 1.980976e-04 1035 1.290000e+00 1.995513e-04 1036 1.300000e+00 2.009880e-04 1037 1.310000e+00 2.024080e-04 1038 1.320000e+00 2.038115e-04 1039 1.330000e+00 2.051987e-04 1040 1.340000e+00 2.065699e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 2.079252e-04 1042 1.360000e+00 2.092649e-04 1043 1.370000e+00 2.105892e-04 1044 1.380000e+00 2.118983e-04 1045 1.390000e+00 2.131923e-04 1046 1.400000e+00 2.144715e-04 1047 1.410000e+00 2.157361e-04 1048 1.420000e+00 2.169863e-04 1049 1.430000e+00 2.182221e-04 1050 1.440000e+00 2.194440e-04 1051 1.450000e+00 2.206519e-04 1052 1.460000e+00 2.218462e-04 1053 1.470000e+00 2.230269e-04 1054 1.480000e+00 2.241942e-04 1055 1.490000e+00 2.253484e-04 1056 1.500000e+00 2.264895e-04 1057 0.000000e+00 9.353506e-11 1058 1.000000e-02 1.279145e-10 1059 2.000000e-02 1.750465e-10 1060 3.000000e-02 2.396334e-10 1061 4.000000e-02 3.280945e-10 1062 5.000000e-02 4.491831e-10 1063 6.000000e-02 6.148191e-10 1064 7.000000e-02 8.412100e-10 1065 8.000000e-02 1.150353e-09 1066 9.000000e-02 1.572042e-09 1067 1.000000e-01 2.146534e-09 1068 1.100000e-01 2.928076e-09 1069 1.200000e-01 3.989531e-09 1070 1.300000e-01 5.428422e-09 1071 1.400000e-01 7.374732e-09 1072 1.500000e-01 1.000091e-08 1073 1.600000e-01 1.353437e-08 1074 1.700000e-01 1.827214e-08 1075 1.800000e-01 2.460148e-08 1076 1.900000e-01 3.302316e-08 1077 2.000000e-01 4.417953e-08 1078 2.100000e-01 5.888767e-08 1079 2.200000e-01 7.817794e-08 1080 2.300000e-01 1.033380e-07 1081 2.400000e-01 1.359629e-07 1082 2.500000e-01 1.780104e-07 1083 2.600000e-01 2.318645e-07 1084 2.700000e-01 3.004048e-07 1085 2.800000e-01 3.870860e-07 1086 2.900000e-01 4.960270e-07 1087 3.000000e-01 6.321102e-07 1088 3.100000e-01 8.010920e-07 1089 3.200000e-01 1.009717e-06 1090 3.300000e-01 1.265831e-06 1091 3.400000e-01 1.578474e-06 1092 3.500000e-01 1.957932e-06 1093 3.600000e-01 2.415719e-06 1094 3.700000e-01 2.964459e-06 1095 3.800000e-01 3.617623e-06 1096 3.900000e-01 4.389115e-06 1097 4.000000e-01 5.292685e-06 1098 4.100000e-01 6.341219e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 7.545935e-06 1100 4.300000e-01 8.915619e-06 1101 4.400000e-01 1.045596e-05 1102 4.500000e-01 1.216909e-05 1103 4.600000e-01 1.405338e-05 1104 4.700000e-01 1.610353e-05 1105 4.800000e-01 1.831121e-05 1106 4.900000e-01 2.066572e-05 1107 5.000000e-01 2.315455e-05 1108 5.100000e-01 2.576403e-05 1109 5.200000e-01 2.847997e-05 1110 5.300000e-01 3.128834e-05 1111 5.400000e-01 3.417569e-05 1112 5.500000e-01 3.712954e-05 1113 5.600000e-01 4.013867e-05 1114 5.700000e-01 4.319316e-05 1115 5.800000e-01 4.628432e-05 1116 5.900000e-01 4.940421e-05 1117 6.000000e-01 5.254512e-05 1118 6.100000e-01 5.569889e-05 1119 6.200000e-01 5.885691e-05 1120 6.300000e-01 6.201051e-05 1121 6.400000e-01 6.515170e-05 1122 6.500000e-01 6.827378e-05 1123 6.600000e-01 7.137140e-05 1124 6.700000e-01 7.444056e-05 1125 6.800000e-01 7.747833e-05 1126 6.900000e-01 8.048263e-05 1127 7.000000e-01 8.345202e-05 1128 7.100000e-01 8.638557e-05 1129 7.200000e-01 8.928269e-05 1130 7.300000e-01 9.214309e-05 1131 7.400000e-01 9.496667e-05 1132 7.500000e-01 9.775351e-05 1133 7.600000e-01 1.005038e-04 1134 7.700000e-01 1.032178e-04 1135 7.800000e-01 1.058959e-04 1136 7.900000e-01 1.085384e-04 1137 8.000000e-01 1.111459e-04 1138 8.100000e-01 1.137187e-04 1139 8.200000e-01 1.162574e-04 1140 8.300000e-01 1.187625e-04 1141 8.400000e-01 1.212344e-04 1142 8.500000e-01 1.236737e-04 1143 8.600000e-01 1.260808e-04 1144 8.700000e-01 1.284563e-04 1145 8.800000e-01 1.308007e-04 1146 8.900000e-01 1.331145e-04 1147 9.000000e-01 1.353982e-04 1148 9.100000e-01 1.376522e-04 1149 9.200000e-01 1.398770e-04 1150 9.300000e-01 1.420731e-04 1151 9.400000e-01 1.442410e-04 1152 9.500000e-01 1.463811e-04 1153 9.600000e-01 1.484939e-04 1154 9.700000e-01 1.505797e-04 1155 9.800000e-01 1.526390e-04 1156 9.900000e-01 1.546723e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 1.566799e-04 1158 1.010000e+00 1.586622e-04 1159 1.020000e+00 1.606197e-04 1160 1.030000e+00 1.625526e-04 1161 1.040000e+00 1.644615e-04 1162 1.050000e+00 1.663466e-04 1163 1.060000e+00 1.682083e-04 1164 1.070000e+00 1.700470e-04 1165 1.080000e+00 1.718630e-04 1166 1.090000e+00 1.736567e-04 1167 1.100000e+00 1.754284e-04 1168 1.110000e+00 1.771784e-04 1169 1.120000e+00 1.789070e-04 1170 1.130000e+00 1.806146e-04 1171 1.140000e+00 1.823014e-04 1172 1.150000e+00 1.839679e-04 1173 1.160000e+00 1.856141e-04 1174 1.170000e+00 1.872406e-04 1175 1.180000e+00 1.888475e-04 1176 1.190000e+00 1.904351e-04 1177 1.200000e+00 1.920036e-04 1178 1.210000e+00 1.935535e-04 1179 1.220000e+00 1.950849e-04 1180 1.230000e+00 1.965981e-04 1181 1.240000e+00 1.980933e-04 1182 1.250000e+00 1.995708e-04 1183 1.260000e+00 2.010309e-04 1184 1.270000e+00 2.024737e-04 1185 1.280000e+00 2.038996e-04 1186 1.290000e+00 2.053087e-04 1187 1.300000e+00 2.067014e-04 1188 1.310000e+00 2.080777e-04 1189 1.320000e+00 2.094380e-04 1190 1.330000e+00 2.107824e-04 1191 1.340000e+00 2.121112e-04 1192 1.350000e+00 2.134245e-04 1193 1.360000e+00 2.147227e-04 1194 1.370000e+00 2.160058e-04 1195 1.380000e+00 2.172741e-04 1196 1.390000e+00 2.185278e-04 1197 1.400000e+00 2.197671e-04 1198 1.410000e+00 2.209921e-04 1199 1.420000e+00 2.222031e-04 1200 1.430000e+00 2.234002e-04 1201 1.440000e+00 2.245837e-04 1202 1.450000e+00 2.257536e-04 1203 1.460000e+00 2.269102e-04 1204 1.470000e+00 2.280536e-04 1205 1.480000e+00 2.291841e-04 1206 1.490000e+00 2.303017e-04 1207 1.500000e+00 2.314066e-04 1208 0.000000e+00 3.853291e-10 1209 1.000000e-02 5.115682e-10 1210 2.000000e-02 6.831691e-10 1211 3.000000e-02 9.162574e-10 1212 4.000000e-02 1.232590e-09 1213 5.000000e-02 1.661468e-09 1214 6.000000e-02 2.242261e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 3.027733e-09 1216 8.000000e-02 4.088398e-09 1217 9.000000e-02 5.518170e-09 1218 1.000000e-01 7.441664e-09 1219 1.100000e-01 1.002352e-08 1220 1.200000e-01 1.348020e-08 1221 1.300000e-01 1.809483e-08 1222 1.400000e-01 2.423546e-08 1223 1.500000e-01 3.237750e-08 1224 1.600000e-01 4.313011e-08 1225 1.700000e-01 5.726476e-08 1226 1.800000e-01 7.575602e-08 1227 1.900000e-01 9.982342e-08 1228 2.000000e-01 1.309796e-07 1229 2.100000e-01 1.710852e-07 1230 2.200000e-01 2.224108e-07 1231 2.300000e-01 2.877061e-07 1232 2.400000e-01 3.702785e-07 1233 2.500000e-01 4.740812e-07 1234 2.600000e-01 6.038112e-07 1235 2.700000e-01 7.650179e-07 1236 2.800000e-01 9.642163e-07 1237 2.900000e-01 1.209000e-06 1238 3.000000e-01 1.508136e-06 1239 3.100000e-01 1.871627e-06 1240 3.200000e-01 2.310709e-06 1241 3.300000e-01 2.837751e-06 1242 3.400000e-01 3.466032e-06 1243 3.500000e-01 4.209363e-06 1244 3.600000e-01 5.081545e-06 1245 3.700000e-01 6.095690e-06 1246 3.800000e-01 7.263442e-06 1247 3.900000e-01 8.594197e-06 1248 4.000000e-01 1.009442e-05 1249 4.100000e-01 1.176714e-05 1250 4.200000e-01 1.361174e-05 1251 4.300000e-01 1.562402e-05 1252 4.400000e-01 1.779649e-05 1253 4.500000e-01 2.011889e-05 1254 4.600000e-01 2.257882e-05 1255 4.700000e-01 2.516240e-05 1256 4.800000e-01 2.785503e-05 1257 4.900000e-01 3.064202e-05 1258 5.000000e-01 3.350892e-05 1259 5.100000e-01 3.644193e-05 1260 5.200000e-01 3.942812e-05 1261 5.300000e-01 4.245561e-05 1262 5.400000e-01 4.551368e-05 1263 5.500000e-01 4.859278e-05 1264 5.600000e-01 5.168450e-05 1265 5.700000e-01 5.478156e-05 1266 5.800000e-01 5.787771e-05 1267 5.900000e-01 6.096765e-05 1268 6.000000e-01 6.404693e-05 1269 6.100000e-01 6.711192e-05 1270 6.200000e-01 7.015963e-05 1271 6.300000e-01 7.318773e-05 1272 6.400000e-01 7.619438e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 7.917819e-05 1274 6.600000e-01 8.213807e-05 1275 6.700000e-01 8.507321e-05 1276 6.800000e-01 8.798284e-05 1277 6.900000e-01 9.086625e-05 1278 7.000000e-01 9.372258e-05 1279 7.100000e-01 9.655088e-05 1280 7.200000e-01 9.935007e-05 1281 7.300000e-01 1.021190e-04 1282 7.400000e-01 1.048567e-04 1283 7.500000e-01 1.075622e-04 1284 7.600000e-01 1.102347e-04 1285 7.700000e-01 1.128738e-04 1286 7.800000e-01 1.154791e-04 1287 7.900000e-01 1.180505e-04 1288 8.000000e-01 1.205880e-04 1289 8.100000e-01 1.230918e-04 1290 8.200000e-01 1.255621e-04 1291 8.300000e-01 1.279993e-04 1292 8.400000e-01 1.304037e-04 1293 8.500000e-01 1.327758e-04 1294 8.600000e-01 1.351161e-04 1295 8.700000e-01 1.374250e-04 1296 8.800000e-01 1.397030e-04 1297 8.900000e-01 1.419506e-04 1298 9.000000e-01 1.441683e-04 1299 9.100000e-01 1.463566e-04 1300 9.200000e-01 1.485160e-04 1301 9.300000e-01 1.506469e-04 1302 9.400000e-01 1.527499e-04 1303 9.500000e-01 1.548254e-04 1304 9.600000e-01 1.568739e-04 1305 9.700000e-01 1.588957e-04 1306 9.800000e-01 1.608915e-04 1307 9.900000e-01 1.628616e-04 1308 1.000000e+00 1.648063e-04 1309 1.010000e+00 1.667262e-04 1310 1.020000e+00 1.686217e-04 1311 1.030000e+00 1.704930e-04 1312 1.040000e+00 1.723407e-04 1313 1.050000e+00 1.741651e-04 1314 1.060000e+00 1.759666e-04 1315 1.070000e+00 1.777455e-04 1316 1.080000e+00 1.795022e-04 1317 1.090000e+00 1.812370e-04 1318 1.100000e+00 1.829502e-04 1319 1.110000e+00 1.846423e-04 1320 1.120000e+00 1.863135e-04 1321 1.130000e+00 1.879642e-04 1322 1.140000e+00 1.895946e-04 1323 1.150000e+00 1.912050e-04 1324 1.160000e+00 1.927958e-04 1325 1.170000e+00 1.943673e-04 1326 1.180000e+00 1.959197e-04 1327 1.190000e+00 1.974533e-04 1328 1.200000e+00 1.989684e-04 1329 1.210000e+00 2.004652e-04 1330 1.220000e+00 2.019441e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 2.034053e-04 1332 1.240000e+00 2.048490e-04 1333 1.250000e+00 2.062755e-04 1334 1.260000e+00 2.076850e-04 1335 1.270000e+00 2.090777e-04 1336 1.280000e+00 2.104540e-04 1337 1.290000e+00 2.118140e-04 1338 1.300000e+00 2.131580e-04 1339 1.310000e+00 2.144861e-04 1340 1.320000e+00 2.157987e-04 1341 1.330000e+00 2.170958e-04 1342 1.340000e+00 2.183778e-04 1343 1.350000e+00 2.196448e-04 1344 1.360000e+00 2.208971e-04 1345 1.370000e+00 2.221348e-04 1346 1.380000e+00 2.233581e-04 1347 1.390000e+00 2.245672e-04 1348 1.400000e+00 2.257624e-04 1349 1.410000e+00 2.269437e-04 1350 1.420000e+00 2.281115e-04 1351 1.430000e+00 2.292657e-04 1352 1.440000e+00 2.304068e-04 1353 1.450000e+00 2.315347e-04 1354 1.460000e+00 2.326497e-04 1355 1.470000e+00 2.337520e-04 1356 1.480000e+00 2.348416e-04 1357 1.490000e+00 2.359189e-04 1358 1.500000e+00 2.369838e-04 ngspice-26/tests/bsim3soidd/inv2.out0000644000265600020320000002735512264261473017056 0ustar andreasadmin No. of Data Rows : 251 Circuit: * model = BSIMSOI (DD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. * model = BSIMSOI (DD) -------------------------------------------------------------------------------- Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 2.500000e+00 1 1.000000e-02 1.000000e-02 2.500000e+00 2 2.000000e-02 2.000000e-02 2.500000e+00 3 3.000000e-02 3.000000e-02 2.500000e+00 4 4.000000e-02 4.000000e-02 2.500000e+00 5 5.000000e-02 5.000000e-02 2.500000e+00 6 6.000000e-02 6.000000e-02 2.499999e+00 7 7.000000e-02 7.000000e-02 2.499999e+00 8 8.000000e-02 8.000000e-02 2.499998e+00 9 9.000000e-02 9.000000e-02 2.499997e+00 10 1.000000e-01 1.000000e-01 2.499995e+00 11 1.100000e-01 1.100000e-01 2.499993e+00 12 1.200000e-01 1.200000e-01 2.499988e+00 13 1.300000e-01 1.300000e-01 2.499982e+00 14 1.400000e-01 1.400000e-01 2.499972e+00 15 1.500000e-01 1.500000e-01 2.499957e+00 16 1.600000e-01 1.600000e-01 2.499936e+00 17 1.700000e-01 1.700000e-01 2.499905e+00 18 1.800000e-01 1.800000e-01 2.499861e+00 19 1.900000e-01 1.900000e-01 2.499802e+00 20 2.000000e-01 2.000000e-01 2.499720e+00 21 2.100000e-01 2.100000e-01 2.499612e+00 22 2.200000e-01 2.200000e-01 2.499469e+00 23 2.300000e-01 2.300000e-01 2.499283e+00 24 2.400000e-01 2.400000e-01 2.499045e+00 25 2.500000e-01 2.500000e-01 2.498745e+00 26 2.600000e-01 2.600000e-01 2.498373e+00 27 2.700000e-01 2.700000e-01 2.497919e+00 28 2.800000e-01 2.800000e-01 2.497374e+00 29 2.900000e-01 2.900000e-01 2.496733e+00 30 3.000000e-01 3.000000e-01 2.495990e+00 31 3.100000e-01 3.100000e-01 2.495142e+00 32 3.200000e-01 3.200000e-01 2.494190e+00 33 3.300000e-01 3.300000e-01 2.493135e+00 34 3.400000e-01 3.400000e-01 2.491980e+00 35 3.500000e-01 3.500000e-01 2.490729e+00 36 3.600000e-01 3.600000e-01 2.489387e+00 37 3.700000e-01 3.700000e-01 2.487957e+00 38 3.800000e-01 3.800000e-01 2.486445e+00 39 3.900000e-01 3.900000e-01 2.484855e+00 40 4.000000e-01 4.000000e-01 2.483191e+00 41 4.100000e-01 4.100000e-01 2.481458e+00 42 4.200000e-01 4.200000e-01 2.479656e+00 43 4.300000e-01 4.300000e-01 2.477790e+00 44 4.400000e-01 4.400000e-01 2.475861e+00 45 4.500000e-01 4.500000e-01 2.473871e+00 46 4.600000e-01 4.600000e-01 2.471820e+00 47 4.700000e-01 4.700000e-01 2.469709e+00 48 4.800000e-01 4.800000e-01 2.467538e+00 49 4.900000e-01 4.900000e-01 2.465307e+00 50 5.000000e-01 5.000000e-01 2.463016e+00 51 5.100000e-01 5.100000e-01 2.460664e+00 52 5.200000e-01 5.200000e-01 2.458249e+00 53 5.300000e-01 5.300000e-01 2.455770e+00 54 5.400000e-01 5.400000e-01 2.453224e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 55 5.500000e-01 5.500000e-01 2.450609e+00 56 5.600000e-01 5.600000e-01 2.447923e+00 57 5.700000e-01 5.700000e-01 2.445160e+00 58 5.800000e-01 5.800000e-01 2.442319e+00 59 5.900000e-01 5.900000e-01 2.439392e+00 60 6.000000e-01 6.000000e-01 2.436377e+00 61 6.100000e-01 6.100000e-01 2.433266e+00 62 6.200000e-01 6.200000e-01 2.430054e+00 63 6.300000e-01 6.300000e-01 2.426735e+00 64 6.400000e-01 6.400000e-01 2.423302e+00 65 6.500000e-01 6.500000e-01 2.419749e+00 66 6.600000e-01 6.600000e-01 2.416072e+00 67 6.700000e-01 6.700000e-01 2.412267e+00 68 6.800000e-01 6.800000e-01 2.408329e+00 69 6.900000e-01 6.900000e-01 2.404258e+00 70 7.000000e-01 7.000000e-01 2.400051e+00 71 7.100000e-01 7.100000e-01 2.395707e+00 72 7.200000e-01 7.200000e-01 2.391227e+00 73 7.300000e-01 7.300000e-01 2.386609e+00 74 7.400000e-01 7.400000e-01 2.381853e+00 75 7.500000e-01 7.500000e-01 2.376958e+00 76 7.600000e-01 7.600000e-01 2.371922e+00 77 7.700000e-01 7.700000e-01 2.366745e+00 78 7.800000e-01 7.800000e-01 2.361424e+00 79 7.900000e-01 7.900000e-01 2.355957e+00 80 8.000000e-01 8.000000e-01 2.350341e+00 81 8.100000e-01 8.100000e-01 2.344571e+00 82 8.200000e-01 8.200000e-01 2.338645e+00 83 8.300000e-01 8.300000e-01 2.332557e+00 84 8.400000e-01 8.400000e-01 2.326304e+00 85 8.500000e-01 8.500000e-01 2.319878e+00 86 8.600000e-01 8.600000e-01 2.313274e+00 87 8.700000e-01 8.700000e-01 2.306485e+00 88 8.800000e-01 8.800000e-01 2.299503e+00 89 8.900000e-01 8.900000e-01 2.292321e+00 90 9.000000e-01 9.000000e-01 2.284930e+00 91 9.100000e-01 9.100000e-01 2.277319e+00 92 9.200000e-01 9.200000e-01 2.269479e+00 93 9.300000e-01 9.300000e-01 2.261396e+00 94 9.400000e-01 9.400000e-01 2.253058e+00 95 9.500000e-01 9.500000e-01 2.244452e+00 96 9.600000e-01 9.600000e-01 2.235561e+00 97 9.700000e-01 9.700000e-01 2.226367e+00 98 9.800000e-01 9.800000e-01 2.216853e+00 99 9.900000e-01 9.900000e-01 2.206995e+00 100 1.000000e+00 1.000000e+00 2.196772e+00 101 1.010000e+00 1.010000e+00 2.186154e+00 102 1.020000e+00 1.020000e+00 2.175114e+00 103 1.030000e+00 1.030000e+00 2.163616e+00 104 1.040000e+00 1.040000e+00 2.151623e+00 105 1.050000e+00 1.050000e+00 2.139089e+00 106 1.060000e+00 1.060000e+00 2.125965e+00 107 1.070000e+00 1.070000e+00 2.112191e+00 108 1.080000e+00 1.080000e+00 2.097698e+00 109 1.090000e+00 1.090000e+00 2.082405e+00 110 1.100000e+00 1.100000e+00 2.066214e+00 111 1.110000e+00 1.110000e+00 2.049008e+00 112 1.120000e+00 1.120000e+00 2.030641e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 113 1.130000e+00 1.130000e+00 2.010934e+00 114 1.140000e+00 1.140000e+00 1.989654e+00 115 1.150000e+00 1.150000e+00 1.966500e+00 116 1.160000e+00 1.160000e+00 1.941063e+00 117 1.170000e+00 1.170000e+00 1.912769e+00 118 1.180000e+00 1.180000e+00 1.880773e+00 119 1.190000e+00 1.190000e+00 1.843752e+00 120 1.200000e+00 1.200000e+00 1.799517e+00 121 1.210000e+00 1.210000e+00 1.744480e+00 122 1.220000e+00 1.220000e+00 1.674500e+00 123 1.230000e+00 1.230000e+00 1.590985e+00 124 1.240000e+00 1.240000e+00 1.503942e+00 125 1.250000e+00 1.250000e+00 1.341767e+00 126 1.260000e+00 1.260000e+00 1.088858e+00 127 1.270000e+00 1.270000e+00 8.944097e-01 128 1.280000e+00 1.280000e+00 7.997023e-01 129 1.290000e+00 1.290000e+00 7.421520e-01 130 1.300000e+00 1.300000e+00 6.964756e-01 131 1.310000e+00 1.310000e+00 6.584965e-01 132 1.320000e+00 1.320000e+00 6.255547e-01 133 1.330000e+00 1.330000e+00 5.963339e-01 134 1.340000e+00 1.340000e+00 5.699202e-01 135 1.350000e+00 1.350000e+00 5.457303e-01 136 1.360000e+00 1.360000e+00 5.233645e-01 137 1.370000e+00 1.370000e+00 5.025314e-01 138 1.380000e+00 1.380000e+00 4.830098e-01 139 1.390000e+00 1.390000e+00 4.646272e-01 140 1.400000e+00 1.400000e+00 4.472457e-01 141 1.410000e+00 1.410000e+00 4.307528e-01 142 1.420000e+00 1.420000e+00 4.150558e-01 143 1.430000e+00 1.430000e+00 4.000764e-01 144 1.440000e+00 1.440000e+00 3.857487e-01 145 1.450000e+00 1.450000e+00 3.720158e-01 146 1.460000e+00 1.460000e+00 3.588289e-01 147 1.470000e+00 1.470000e+00 3.461453e-01 148 1.480000e+00 1.480000e+00 3.339277e-01 149 1.490000e+00 1.490000e+00 3.221430e-01 150 1.500000e+00 1.500000e+00 3.107622e-01 151 1.510000e+00 1.510000e+00 2.997591e-01 152 1.520000e+00 1.520000e+00 2.891106e-01 153 1.530000e+00 1.530000e+00 2.787957e-01 154 1.540000e+00 1.540000e+00 2.687957e-01 155 1.550000e+00 1.550000e+00 2.590935e-01 156 1.560000e+00 1.560000e+00 2.496737e-01 157 1.570000e+00 1.570000e+00 2.405222e-01 158 1.580000e+00 1.580000e+00 2.316263e-01 159 1.590000e+00 1.590000e+00 2.229743e-01 160 1.600000e+00 1.600000e+00 2.145555e-01 161 1.610000e+00 1.610000e+00 2.063602e-01 162 1.620000e+00 1.620000e+00 1.983795e-01 163 1.630000e+00 1.630000e+00 1.906050e-01 164 1.640000e+00 1.640000e+00 1.830293e-01 165 1.650000e+00 1.650000e+00 1.756454e-01 166 1.660000e+00 1.660000e+00 1.684470e-01 167 1.670000e+00 1.670000e+00 1.614281e-01 168 1.680000e+00 1.680000e+00 1.545836e-01 169 1.690000e+00 1.690000e+00 1.479084e-01 170 1.700000e+00 1.700000e+00 1.413982e-01 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 171 1.710000e+00 1.710000e+00 1.350488e-01 172 1.720000e+00 1.720000e+00 1.288568e-01 173 1.730000e+00 1.730000e+00 1.228188e-01 174 1.740000e+00 1.740000e+00 1.169320e-01 175 1.750000e+00 1.750000e+00 1.111939e-01 176 1.760000e+00 1.760000e+00 1.056025e-01 177 1.770000e+00 1.770000e+00 1.001561e-01 178 1.780000e+00 1.780000e+00 9.485343e-02 179 1.790000e+00 1.790000e+00 8.969369e-02 180 1.800000e+00 1.800000e+00 8.467656e-02 181 1.810000e+00 1.810000e+00 7.980223e-02 182 1.820000e+00 1.820000e+00 7.507144e-02 183 1.830000e+00 1.830000e+00 7.048552e-02 184 1.840000e+00 1.840000e+00 6.604639e-02 185 1.850000e+00 1.850000e+00 6.175652e-02 186 1.860000e+00 1.860000e+00 5.761877e-02 187 1.870000e+00 1.870000e+00 5.363615e-02 188 1.880000e+00 1.880000e+00 4.981126e-02 189 1.890000e+00 1.890000e+00 4.614572e-02 190 1.900000e+00 1.900000e+00 4.263946e-02 191 1.910000e+00 1.910000e+00 3.929045e-02 192 1.920000e+00 1.920000e+00 3.609476e-02 193 1.930000e+00 1.930000e+00 3.304738e-02 194 1.940000e+00 1.940000e+00 3.014314e-02 195 1.950000e+00 1.950000e+00 2.737758e-02 196 1.960000e+00 1.960000e+00 2.474758e-02 197 1.970000e+00 1.970000e+00 2.225157e-02 198 1.980000e+00 1.980000e+00 1.988949e-02 199 1.990000e+00 1.990000e+00 1.766257e-02 200 2.000000e+00 2.000000e+00 1.557309e-02 201 2.010000e+00 2.010000e+00 1.362395e-02 202 2.020000e+00 2.020000e+00 1.181830e-02 203 2.030000e+00 2.030000e+00 1.015909e-02 204 2.040000e+00 2.040000e+00 8.648552e-03 205 2.050000e+00 2.050000e+00 7.287712e-03 206 2.060000e+00 2.060000e+00 6.075896e-03 207 2.070000e+00 2.070000e+00 5.010461e-03 208 2.080000e+00 2.080000e+00 4.086553e-03 209 2.090000e+00 2.090000e+00 3.296794e-03 210 2.100000e+00 2.100000e+00 2.631421e-03 211 2.110000e+00 2.110000e+00 2.078812e-03 212 2.120000e+00 2.120000e+00 1.626150e-03 213 2.130000e+00 2.130000e+00 1.260149e-03 214 2.140000e+00 2.140000e+00 9.677601e-04 215 2.150000e+00 2.150000e+00 7.367541e-04 216 2.160000e+00 2.160000e+00 5.561244e-04 217 2.170000e+00 2.170000e+00 4.162698e-04 218 2.180000e+00 2.180000e+00 3.086613e-04 219 2.190000e+00 2.190000e+00 2.265229e-04 220 2.200000e+00 2.200000e+00 1.644520e-04 221 2.210000e+00 2.210000e+00 1.180565e-04 222 2.220000e+00 2.220000e+00 8.378794e-05 223 2.230000e+00 2.230000e+00 5.879595e-05 224 2.240000e+00 2.240000e+00 4.080883e-05 225 2.250000e+00 2.250000e+00 2.803541e-05 226 2.260000e+00 2.260000e+00 1.908344e-05 227 2.270000e+00 2.270000e+00 1.288950e-05 228 2.280000e+00 2.280000e+00 8.657819e-06 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 229 2.290000e+00 2.290000e+00 5.808017e-06 230 2.300000e+00 2.300000e+00 3.929452e-06 231 2.310000e+00 2.310000e+00 2.709377e-06 232 2.320000e+00 2.320000e+00 1.888948e-06 233 2.330000e+00 2.330000e+00 1.319648e-06 234 2.340000e+00 2.340000e+00 9.225229e-07 235 2.350000e+00 2.350000e+00 6.447846e-07 236 2.360000e+00 2.360000e+00 4.503306e-07 237 2.370000e+00 2.370000e+00 3.142418e-07 238 2.380000e+00 2.380000e+00 2.190908e-07 239 2.390000e+00 2.390000e+00 1.526323e-07 240 2.400000e+00 2.400000e+00 1.062600e-07 241 2.410000e+00 2.410000e+00 7.393178e-08 242 2.420000e+00 2.420000e+00 5.141199e-08 243 2.430000e+00 2.430000e+00 3.573541e-08 244 2.440000e+00 2.440000e+00 2.482901e-08 245 2.450000e+00 2.450000e+00 1.724520e-08 246 2.460000e+00 2.460000e+00 1.197412e-08 247 2.470000e+00 2.470000e+00 8.311920e-09 248 2.480000e+00 2.480000e+00 5.768392e-09 249 2.490000e+00 2.490000e+00 4.002351e-09 250 2.500000e+00 2.500000e+00 2.776464e-09 ngspice-26/tests/bsim3soidd/RampVg2.cir0000644000265600020320000000047012264261473017411 0ustar andreasadmin* BSIMSOI (DD) example * * SOI, Ramp Vg Vd d 0 1.5 Vg g 0 0.0 PULSE 0V 2V .02n .1n .1n .2n .6n Ve e 0 0.0 Vs s 0 0.0 Vb b 0 0.0 m1 d g s e n1 w=10u l=0.25u debug=-1 .option gmin=1e-20 itl1=200 itl2=200 abstol=1e-9 noacct .tran 1p 1.0ns .print tran @m1[Vbs], V(g)/10 .include nmosdd.mod .end ngspice-26/tests/bsim3soidd/inv2.cir0000644000265600020320000000046312264261473017013 0ustar andreasadmin* model = BSIMSOI (DD) * * * SOI Inverter - floating body vin in 0 dc 2.5 vdd dd 0 dc 2.5 vss ss 0 dc 0 ve e 0 dc 1.25 m1 out in dd e p1 w=20u l=0.25u m2 out in ss e n1 w=10u l=0.25u .option itl1=500 gmin=1e-25 noacct .dc vin 0 2.5 0.01 .print dc v(in), v(out) .include nmosdd.mod .include pmosdd.mod ngspice-26/tests/bsim3soidd/pmosdd.mod0000644000265600020320000000403212264261473017421 0ustar andreasadmin*Model Card for BSIMDD2.0, floating body DD SOI PMOS *Released on 2/15/99 .Model P1 PMOS Level= 56 +TNOM = 27 TOX = 4.5E-09 TSI = 5e-8 TBOX = 8E-08 +MOBMOD = 2 CAPMOD = 3 SHMOD = 0 +WINT = 0 LINT = -2E-08 +VTH0 = -.52 K1 = .39 K2 = .1 K3 = 0 +KB1 = .95 K3B = 2.2 NLX = 7.2E-08 +DVT0 = .55 DVT1 = .28 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 3.0E+17 NSUB = 1E+15 NGATE = 1E+20 +DVBD0 = 60.0 DVBD1 = 1.1 VBSA = -0.2 +KB3 = 2.2 DELP = 0.02 +ABP = 0.9 MXC = 0.9 ADICE0 = 0.93 +KBJT1 = 1.0E-08 EDL = .0000005 +NDIODE = 1.13 NTUN = 14.0 +ISBJT = 0.0 ISDIF = 1e-6 ISTUN = 0.0 ISREC = 0.0 +XBJT = 0.01 XDIF = 0.01 XREC = 0.01 XTUN = 0.001 +U0 = 145 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 700 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 0.0 RBSH = 0.0 +A0 = 1.4 KETA = -.67 VSAT = 75000 +DWG = 0 DWB = 0 +ALPHA0 = 0.0 ALPHA1 = 1e-4 BETA0 = 19 +AII = 1.25 BII = 0.1e-7 CII = 0.8 DII = 0.6 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .01 ETAB = 0 +DSUB = .3 RTH0 = .006 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 5e-10 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 ngspice-26/tests/bsim3soidd/nmosdd.mod0000644000265600020320000000405512264261473017424 0ustar andreasadmin*Model Card for BSIMDD2.0, floating body DD SOI NMOS *Released on 2/15/99 .Model N1 NMOS Level= 56 +TNOM = 27 TOX = 4.5E-09 TSI = 5e-8 TBOX = 8E-08 +MOBMOD = 0 CAPMOD = 3 SHMOD = 0 +PARAMCHK=0 WINT = 0 LINT = -2E-08 +VTH0 = .52 K1 = .39 K2 = .1 K3 = 0 +KB1 = .95 K3B = 2.2 NLX = 7.2E-08 +DVT0 = .55 DVT1 = .28 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 3.3E+17 NSUB = 1E+15 NGATE = 1E+20 +DVBD0 = 60.0 DVBD1 = 1.1 VBSA = 0.0 +KB3 = 2.2 DELP = 0.02 +ABP = 0.9 MXC = 0.9 ADICE0 = 0.93 +KBJT1 = 1.0E-08 EDL = .0000005 +NDIODE = 1.13 NTUN = 14.0 +ISBJT = 2e-6 ISDIF = 1e-6 ISTUN = 0.0 ISREC = 1e-5 +XBJT = 0.01 XDIF = 0.01 XREC = 0.01 XTUN = 0.001 +U0 = 352 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 700 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 0.0 RBSH = 0.0 +A0 = 1.4 KETA = -.67 VSAT = 135000 +DWG = 0 DWB = 0 +ALPHA0 = 0.0 ALPHA1 = 1.5 BETA0 = 20.5 +AII = 1.2 BII = 0.1e-7 CII = 0.8 DII = 0.6 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .01 ETAB = 0 +DSUB = .3 RTH0 = .006 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 5e-10 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 ngspice-26/tests/bsim3soidd/ring51.cir0000644000265600020320000000064512264261473017244 0ustar andreasadmin* 51 stage Ring-Osc. vin in out 2 pulse 2 0 0.1n 5n 1 1 1 vdd dd 0 dc 0 pulse 0 2 0 1n 1 1 1 vss ss 0 dc 0 ve sub 0 dc 0 xinv1 dd ss sub in out25 inv25 xinv2 dd ss sub out25 out50 inv25 xinv5 dd ss sub out50 out inv1 xinv11 dd ss sub out buf inv1 cout buf ss 1pF xdum ss dum .option itl1=500 gmin=1e-15 itl4=10 noacct *.dc vdd 0 2 0.01 .tran 0.2n 50n .include nmosdd.mod .include pmosdd.mod .include lib.h .end ngspice-26/tests/bsim3soidd/RampVg2.out0000644000265600020320000013701412264261473017450 0ustar andreasadmin Circuit: * BSIMSOI (DD) example Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Initial Transient Solution -------------------------- Node Voltage ---- ------- d 1.5 g 0 e 0 s 0 b 0 vb#branch 0 vs#branch 1.06195e-11 ve#branch 0 vg#branch 1.5e-20 vd#branch -1.06195e-11 No. of Data Rows : 1029 * BSIMSOI (DD) example -------------------------------------------------------------------------------- Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 0 0.000000e+00 9.166197e-02 0.000000e+00 1 1.000000e-14 9.166197e-02 0.000000e+00 2 2.000000e-14 9.166197e-02 0.000000e+00 3 4.000000e-14 9.166197e-02 0.000000e+00 4 8.000000e-14 9.166197e-02 0.000000e+00 5 1.600000e-13 9.166197e-02 0.000000e+00 6 3.200000e-13 9.166197e-02 0.000000e+00 7 6.400000e-13 9.166197e-02 0.000000e+00 8 1.280000e-12 9.166197e-02 0.000000e+00 9 2.280000e-12 9.166197e-02 0.000000e+00 10 3.280000e-12 9.166197e-02 0.000000e+00 11 4.280000e-12 9.166197e-02 0.000000e+00 12 5.280000e-12 9.166197e-02 0.000000e+00 13 6.280000e-12 9.166197e-02 0.000000e+00 14 7.280000e-12 9.166197e-02 0.000000e+00 15 8.280000e-12 9.166197e-02 0.000000e+00 16 9.280000e-12 9.166197e-02 0.000000e+00 17 1.028000e-11 9.166197e-02 0.000000e+00 18 1.128000e-11 9.166197e-02 0.000000e+00 19 1.228000e-11 9.166197e-02 0.000000e+00 20 1.328000e-11 9.166197e-02 0.000000e+00 21 1.428000e-11 9.166197e-02 0.000000e+00 22 1.528000e-11 9.166197e-02 0.000000e+00 23 1.628000e-11 9.166197e-02 0.000000e+00 24 1.728000e-11 9.166197e-02 0.000000e+00 25 1.828000e-11 9.166197e-02 0.000000e+00 26 1.928000e-11 9.166197e-02 0.000000e+00 27 2.000000e-11 9.166197e-02 0.000000e+00 28 2.010000e-11 9.393837e-02 2.000000e-04 29 2.030000e-11 9.863117e-02 6.000000e-04 30 2.070000e-11 1.087280e-01 1.400000e-03 31 2.150000e-11 1.322176e-01 3.000000e-03 32 2.250000e-11 1.634797e-01 5.000000e-03 33 2.350000e-11 1.940307e-01 7.000000e-03 34 2.450000e-11 2.234013e-01 9.000000e-03 35 2.550000e-11 2.517648e-01 1.100000e-02 36 2.650000e-11 2.793418e-01 1.300000e-02 37 2.750000e-11 3.062522e-01 1.500000e-02 38 2.850000e-11 3.324855e-01 1.700000e-02 39 2.950000e-11 3.579054e-01 1.900000e-02 40 3.050000e-11 3.823391e-01 2.100000e-02 41 3.150000e-11 4.056560e-01 2.300000e-02 42 3.250000e-11 4.274095e-01 2.500000e-02 43 3.350000e-11 4.473553e-01 2.700000e-02 44 3.450000e-11 4.654301e-01 2.900000e-02 45 3.550000e-11 4.816629e-01 3.100000e-02 46 3.650000e-11 4.960865e-01 3.300000e-02 47 3.750000e-11 5.086948e-01 3.500000e-02 48 3.850000e-11 5.194649e-01 3.700000e-02 49 3.950000e-11 5.284127e-01 3.900000e-02 50 4.050000e-11 5.356307e-01 4.100000e-02 51 4.150000e-11 5.412833e-01 4.300000e-02 52 4.250000e-11 5.455761e-01 4.500000e-02 53 4.350000e-11 5.487215e-01 4.700000e-02 54 4.450000e-11 5.509170e-01 4.900000e-02 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 55 4.550000e-11 5.523348e-01 5.100000e-02 56 4.650000e-11 5.531176e-01 5.300000e-02 57 4.750000e-11 5.533812e-01 5.500000e-02 58 4.850000e-11 5.532216e-01 5.700000e-02 59 4.950000e-11 5.527060e-01 5.900000e-02 60 5.050000e-11 5.518984e-01 6.100000e-02 61 5.150000e-11 5.508476e-01 6.300000e-02 62 5.250000e-11 5.495937e-01 6.500000e-02 63 5.350000e-11 5.481712e-01 6.700000e-02 64 5.450000e-11 5.466100e-01 6.900000e-02 65 5.550000e-11 5.449355e-01 7.100000e-02 66 5.650000e-11 5.431673e-01 7.300000e-02 67 5.750000e-11 5.413167e-01 7.500000e-02 68 5.850000e-11 5.393864e-01 7.700000e-02 69 5.950000e-11 5.373729e-01 7.900000e-02 70 6.050000e-11 5.352712e-01 8.100000e-02 71 6.150000e-11 5.330782e-01 8.300000e-02 72 6.250000e-11 5.307927e-01 8.500000e-02 73 6.350000e-11 5.284157e-01 8.700000e-02 74 6.450000e-11 5.259492e-01 8.900000e-02 75 6.550000e-11 5.233961e-01 9.100000e-02 76 6.650000e-11 5.207594e-01 9.300000e-02 77 6.750000e-11 5.180420e-01 9.500000e-02 78 6.850000e-11 5.152468e-01 9.700000e-02 79 6.950000e-11 5.123765e-01 9.900000e-02 80 7.050000e-11 5.094333e-01 1.010000e-01 81 7.150000e-11 5.064196e-01 1.030000e-01 82 7.250000e-11 5.033370e-01 1.050000e-01 83 7.350000e-11 5.001873e-01 1.070000e-01 84 7.450000e-11 4.969718e-01 1.090000e-01 85 7.550000e-11 4.936916e-01 1.110000e-01 86 7.650000e-11 4.903478e-01 1.130000e-01 87 7.750000e-11 4.869410e-01 1.150000e-01 88 7.850000e-11 4.834720e-01 1.170000e-01 89 7.950000e-11 4.799410e-01 1.190000e-01 90 8.050000e-11 4.763484e-01 1.210000e-01 91 8.150000e-11 4.726943e-01 1.230000e-01 92 8.250000e-11 4.689788e-01 1.250000e-01 93 8.350000e-11 4.652016e-01 1.270000e-01 94 8.450000e-11 4.613625e-01 1.290000e-01 95 8.550000e-11 4.574612e-01 1.310000e-01 96 8.650000e-11 4.534973e-01 1.330000e-01 97 8.750000e-11 4.494700e-01 1.350000e-01 98 8.850000e-11 4.453789e-01 1.370000e-01 99 8.950000e-11 4.412231e-01 1.390000e-01 100 9.050000e-11 4.370017e-01 1.410000e-01 101 9.150000e-11 4.327138e-01 1.430000e-01 102 9.250000e-11 4.283584e-01 1.450000e-01 103 9.350000e-11 4.239342e-01 1.470000e-01 104 9.450000e-11 4.194401e-01 1.490000e-01 105 9.550000e-11 4.148747e-01 1.510000e-01 106 9.650000e-11 4.102366e-01 1.530000e-01 107 9.750000e-11 4.055241e-01 1.550000e-01 108 9.850000e-11 4.007355e-01 1.570000e-01 109 9.950000e-11 3.958691e-01 1.590000e-01 110 1.005000e-10 3.909227e-01 1.610000e-01 111 1.015000e-10 3.858943e-01 1.630000e-01 112 1.025000e-10 3.807815e-01 1.650000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 113 1.035000e-10 3.755815e-01 1.670000e-01 114 1.045000e-10 3.702914e-01 1.690000e-01 115 1.055000e-10 3.649100e-01 1.710000e-01 116 1.065000e-10 3.594363e-01 1.730000e-01 117 1.075000e-10 3.538678e-01 1.750000e-01 118 1.085000e-10 3.482016e-01 1.770000e-01 119 1.095000e-10 3.424350e-01 1.790000e-01 120 1.105000e-10 3.365646e-01 1.810000e-01 121 1.115000e-10 3.305872e-01 1.830000e-01 122 1.125000e-10 3.244993e-01 1.850000e-01 123 1.135000e-10 3.182970e-01 1.870000e-01 124 1.145000e-10 3.119762e-01 1.890000e-01 125 1.155000e-10 3.055323e-01 1.910000e-01 126 1.165000e-10 2.989603e-01 1.930000e-01 127 1.175000e-10 2.922546e-01 1.950000e-01 128 1.185000e-10 2.854089e-01 1.970000e-01 129 1.195000e-10 2.784155e-01 1.990000e-01 130 1.200000e-10 2.748604e-01 2.000000e-01 131 1.201000e-10 2.748604e-01 2.000000e-01 132 1.203000e-10 2.748604e-01 2.000000e-01 133 1.207000e-10 2.748604e-01 2.000000e-01 134 1.215000e-10 2.748604e-01 2.000000e-01 135 1.225000e-10 2.748604e-01 2.000000e-01 136 1.235000e-10 2.748604e-01 2.000000e-01 137 1.245000e-10 2.748604e-01 2.000000e-01 138 1.255000e-10 2.748604e-01 2.000000e-01 139 1.265000e-10 2.748604e-01 2.000000e-01 140 1.275000e-10 2.748604e-01 2.000000e-01 141 1.285000e-10 2.748604e-01 2.000000e-01 142 1.295000e-10 2.748604e-01 2.000000e-01 143 1.305000e-10 2.748604e-01 2.000000e-01 144 1.315000e-10 2.748604e-01 2.000000e-01 145 1.325000e-10 2.748604e-01 2.000000e-01 146 1.335000e-10 2.748604e-01 2.000000e-01 147 1.345000e-10 2.748604e-01 2.000000e-01 148 1.355000e-10 2.748604e-01 2.000000e-01 149 1.365000e-10 2.748604e-01 2.000000e-01 150 1.375000e-10 2.748604e-01 2.000000e-01 151 1.385000e-10 2.748604e-01 2.000000e-01 152 1.395000e-10 2.748604e-01 2.000000e-01 153 1.405000e-10 2.748604e-01 2.000000e-01 154 1.415000e-10 2.748604e-01 2.000000e-01 155 1.425000e-10 2.748604e-01 2.000000e-01 156 1.435000e-10 2.748604e-01 2.000000e-01 157 1.445000e-10 2.748604e-01 2.000000e-01 158 1.455000e-10 2.748604e-01 2.000000e-01 159 1.465000e-10 2.748604e-01 2.000000e-01 160 1.475000e-10 2.748604e-01 2.000000e-01 161 1.485000e-10 2.748604e-01 2.000000e-01 162 1.495000e-10 2.748604e-01 2.000000e-01 163 1.505000e-10 2.748604e-01 2.000000e-01 164 1.515000e-10 2.748604e-01 2.000000e-01 165 1.525000e-10 2.748604e-01 2.000000e-01 166 1.535000e-10 2.748604e-01 2.000000e-01 167 1.545000e-10 2.748604e-01 2.000000e-01 168 1.555000e-10 2.748604e-01 2.000000e-01 169 1.565000e-10 2.748604e-01 2.000000e-01 170 1.575000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 171 1.585000e-10 2.748604e-01 2.000000e-01 172 1.595000e-10 2.748604e-01 2.000000e-01 173 1.605000e-10 2.748604e-01 2.000000e-01 174 1.615000e-10 2.748604e-01 2.000000e-01 175 1.625000e-10 2.748604e-01 2.000000e-01 176 1.635000e-10 2.748604e-01 2.000000e-01 177 1.645000e-10 2.748604e-01 2.000000e-01 178 1.655000e-10 2.748604e-01 2.000000e-01 179 1.665000e-10 2.748604e-01 2.000000e-01 180 1.675000e-10 2.748604e-01 2.000000e-01 181 1.685000e-10 2.748604e-01 2.000000e-01 182 1.695000e-10 2.748604e-01 2.000000e-01 183 1.705000e-10 2.748604e-01 2.000000e-01 184 1.715000e-10 2.748604e-01 2.000000e-01 185 1.725000e-10 2.748604e-01 2.000000e-01 186 1.735000e-10 2.748604e-01 2.000000e-01 187 1.745000e-10 2.748604e-01 2.000000e-01 188 1.755000e-10 2.748604e-01 2.000000e-01 189 1.765000e-10 2.748604e-01 2.000000e-01 190 1.775000e-10 2.748604e-01 2.000000e-01 191 1.785000e-10 2.748604e-01 2.000000e-01 192 1.795000e-10 2.748604e-01 2.000000e-01 193 1.805000e-10 2.748604e-01 2.000000e-01 194 1.815000e-10 2.748604e-01 2.000000e-01 195 1.825000e-10 2.748604e-01 2.000000e-01 196 1.835000e-10 2.748604e-01 2.000000e-01 197 1.845000e-10 2.748604e-01 2.000000e-01 198 1.855000e-10 2.748604e-01 2.000000e-01 199 1.865000e-10 2.748604e-01 2.000000e-01 200 1.875000e-10 2.748604e-01 2.000000e-01 201 1.885000e-10 2.748604e-01 2.000000e-01 202 1.895000e-10 2.748604e-01 2.000000e-01 203 1.905000e-10 2.748604e-01 2.000000e-01 204 1.915000e-10 2.748604e-01 2.000000e-01 205 1.925000e-10 2.748604e-01 2.000000e-01 206 1.935000e-10 2.748604e-01 2.000000e-01 207 1.945000e-10 2.748604e-01 2.000000e-01 208 1.955000e-10 2.748604e-01 2.000000e-01 209 1.965000e-10 2.748604e-01 2.000000e-01 210 1.975000e-10 2.748604e-01 2.000000e-01 211 1.985000e-10 2.748604e-01 2.000000e-01 212 1.995000e-10 2.748604e-01 2.000000e-01 213 2.005000e-10 2.748604e-01 2.000000e-01 214 2.015000e-10 2.748604e-01 2.000000e-01 215 2.025000e-10 2.748604e-01 2.000000e-01 216 2.035000e-10 2.748604e-01 2.000000e-01 217 2.045000e-10 2.748604e-01 2.000000e-01 218 2.055000e-10 2.748604e-01 2.000000e-01 219 2.065000e-10 2.748604e-01 2.000000e-01 220 2.075000e-10 2.748604e-01 2.000000e-01 221 2.085000e-10 2.748604e-01 2.000000e-01 222 2.095000e-10 2.748604e-01 2.000000e-01 223 2.105000e-10 2.748604e-01 2.000000e-01 224 2.115000e-10 2.748604e-01 2.000000e-01 225 2.125000e-10 2.748604e-01 2.000000e-01 226 2.135000e-10 2.748604e-01 2.000000e-01 227 2.145000e-10 2.748604e-01 2.000000e-01 228 2.155000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 229 2.165000e-10 2.748604e-01 2.000000e-01 230 2.175000e-10 2.748604e-01 2.000000e-01 231 2.185000e-10 2.748604e-01 2.000000e-01 232 2.195000e-10 2.748604e-01 2.000000e-01 233 2.205000e-10 2.748604e-01 2.000000e-01 234 2.215000e-10 2.748604e-01 2.000000e-01 235 2.225000e-10 2.748604e-01 2.000000e-01 236 2.235000e-10 2.748604e-01 2.000000e-01 237 2.245000e-10 2.748604e-01 2.000000e-01 238 2.255000e-10 2.748604e-01 2.000000e-01 239 2.265000e-10 2.748604e-01 2.000000e-01 240 2.275000e-10 2.748604e-01 2.000000e-01 241 2.285000e-10 2.748604e-01 2.000000e-01 242 2.295000e-10 2.748604e-01 2.000000e-01 243 2.305000e-10 2.748604e-01 2.000000e-01 244 2.315000e-10 2.748604e-01 2.000000e-01 245 2.325000e-10 2.748604e-01 2.000000e-01 246 2.335000e-10 2.748604e-01 2.000000e-01 247 2.345000e-10 2.748604e-01 2.000000e-01 248 2.355000e-10 2.748604e-01 2.000000e-01 249 2.365000e-10 2.748604e-01 2.000000e-01 250 2.375000e-10 2.748604e-01 2.000000e-01 251 2.385000e-10 2.748604e-01 2.000000e-01 252 2.395000e-10 2.748604e-01 2.000000e-01 253 2.405000e-10 2.748604e-01 2.000000e-01 254 2.415000e-10 2.748604e-01 2.000000e-01 255 2.425000e-10 2.748604e-01 2.000000e-01 256 2.435000e-10 2.748604e-01 2.000000e-01 257 2.445000e-10 2.748604e-01 2.000000e-01 258 2.455000e-10 2.748604e-01 2.000000e-01 259 2.465000e-10 2.748604e-01 2.000000e-01 260 2.475000e-10 2.748604e-01 2.000000e-01 261 2.485000e-10 2.748604e-01 2.000000e-01 262 2.495000e-10 2.748604e-01 2.000000e-01 263 2.505000e-10 2.748604e-01 2.000000e-01 264 2.515000e-10 2.748604e-01 2.000000e-01 265 2.525000e-10 2.748604e-01 2.000000e-01 266 2.535000e-10 2.748604e-01 2.000000e-01 267 2.545000e-10 2.748604e-01 2.000000e-01 268 2.555000e-10 2.748604e-01 2.000000e-01 269 2.565000e-10 2.748604e-01 2.000000e-01 270 2.575000e-10 2.748604e-01 2.000000e-01 271 2.585000e-10 2.748604e-01 2.000000e-01 272 2.595000e-10 2.748604e-01 2.000000e-01 273 2.605000e-10 2.748604e-01 2.000000e-01 274 2.615000e-10 2.748604e-01 2.000000e-01 275 2.625000e-10 2.748604e-01 2.000000e-01 276 2.635000e-10 2.748604e-01 2.000000e-01 277 2.645000e-10 2.748604e-01 2.000000e-01 278 2.655000e-10 2.748604e-01 2.000000e-01 279 2.665000e-10 2.748604e-01 2.000000e-01 280 2.675000e-10 2.748604e-01 2.000000e-01 281 2.685000e-10 2.748604e-01 2.000000e-01 282 2.695000e-10 2.748604e-01 2.000000e-01 283 2.705000e-10 2.748604e-01 2.000000e-01 284 2.715000e-10 2.748604e-01 2.000000e-01 285 2.725000e-10 2.748604e-01 2.000000e-01 286 2.735000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 287 2.745000e-10 2.748604e-01 2.000000e-01 288 2.755000e-10 2.748604e-01 2.000000e-01 289 2.765000e-10 2.748604e-01 2.000000e-01 290 2.775000e-10 2.748604e-01 2.000000e-01 291 2.785000e-10 2.748604e-01 2.000000e-01 292 2.795000e-10 2.748604e-01 2.000000e-01 293 2.805000e-10 2.748604e-01 2.000000e-01 294 2.815000e-10 2.748604e-01 2.000000e-01 295 2.825000e-10 2.748604e-01 2.000000e-01 296 2.835000e-10 2.748604e-01 2.000000e-01 297 2.845000e-10 2.748604e-01 2.000000e-01 298 2.855000e-10 2.748604e-01 2.000000e-01 299 2.865000e-10 2.748604e-01 2.000000e-01 300 2.875000e-10 2.748604e-01 2.000000e-01 301 2.885000e-10 2.748604e-01 2.000000e-01 302 2.895000e-10 2.748604e-01 2.000000e-01 303 2.905000e-10 2.748604e-01 2.000000e-01 304 2.915000e-10 2.748604e-01 2.000000e-01 305 2.925000e-10 2.748604e-01 2.000000e-01 306 2.935000e-10 2.748604e-01 2.000000e-01 307 2.945000e-10 2.748604e-01 2.000000e-01 308 2.955000e-10 2.748604e-01 2.000000e-01 309 2.965000e-10 2.748604e-01 2.000000e-01 310 2.975000e-10 2.748604e-01 2.000000e-01 311 2.985000e-10 2.748604e-01 2.000000e-01 312 2.995000e-10 2.748604e-01 2.000000e-01 313 3.005000e-10 2.748604e-01 2.000000e-01 314 3.015000e-10 2.748604e-01 2.000000e-01 315 3.025000e-10 2.748604e-01 2.000000e-01 316 3.035000e-10 2.748604e-01 2.000000e-01 317 3.045000e-10 2.748604e-01 2.000000e-01 318 3.055000e-10 2.748604e-01 2.000000e-01 319 3.065000e-10 2.748604e-01 2.000000e-01 320 3.075000e-10 2.748604e-01 2.000000e-01 321 3.085000e-10 2.748604e-01 2.000000e-01 322 3.095000e-10 2.748604e-01 2.000000e-01 323 3.105000e-10 2.748604e-01 2.000000e-01 324 3.115000e-10 2.748604e-01 2.000000e-01 325 3.125000e-10 2.748604e-01 2.000000e-01 326 3.135000e-10 2.748604e-01 2.000000e-01 327 3.145000e-10 2.748604e-01 2.000000e-01 328 3.155000e-10 2.748604e-01 2.000000e-01 329 3.165000e-10 2.748604e-01 2.000000e-01 330 3.175000e-10 2.748604e-01 2.000000e-01 331 3.185000e-10 2.748604e-01 2.000000e-01 332 3.195000e-10 2.748604e-01 2.000000e-01 333 3.200000e-10 2.748604e-01 2.000000e-01 334 3.201000e-10 2.755747e-01 1.998000e-01 335 3.203000e-10 2.769983e-01 1.994000e-01 336 3.207000e-10 2.798265e-01 1.986000e-01 337 3.215000e-10 2.854089e-01 1.970000e-01 338 3.225000e-10 2.922546e-01 1.950000e-01 339 3.235000e-10 2.989603e-01 1.930000e-01 340 3.245000e-10 3.055323e-01 1.910000e-01 341 3.255000e-10 3.119762e-01 1.890000e-01 342 3.265000e-10 3.182970e-01 1.870000e-01 343 3.275000e-10 3.244993e-01 1.850000e-01 344 3.285000e-10 3.305872e-01 1.830000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 345 3.295000e-10 3.365645e-01 1.810000e-01 346 3.305000e-10 3.424350e-01 1.790000e-01 347 3.315000e-10 3.482016e-01 1.770000e-01 348 3.325000e-10 3.538678e-01 1.750000e-01 349 3.335000e-10 3.594363e-01 1.730000e-01 350 3.345000e-10 3.649100e-01 1.710000e-01 351 3.355000e-10 3.702914e-01 1.690000e-01 352 3.365000e-10 3.755815e-01 1.670000e-01 353 3.375000e-10 3.807815e-01 1.650000e-01 354 3.385000e-10 3.858943e-01 1.630000e-01 355 3.395000e-10 3.909227e-01 1.610000e-01 356 3.405000e-10 3.958691e-01 1.590000e-01 357 3.415000e-10 4.007355e-01 1.570000e-01 358 3.425000e-10 4.055241e-01 1.550000e-01 359 3.435000e-10 4.102366e-01 1.530000e-01 360 3.445000e-10 4.148747e-01 1.510000e-01 361 3.455000e-10 4.194402e-01 1.490000e-01 362 3.465000e-10 4.239342e-01 1.470000e-01 363 3.475000e-10 4.283584e-01 1.450000e-01 364 3.485000e-10 4.327138e-01 1.430000e-01 365 3.495000e-10 4.370017e-01 1.410000e-01 366 3.505000e-10 4.412231e-01 1.390000e-01 367 3.515000e-10 4.453789e-01 1.370000e-01 368 3.525000e-10 4.494700e-01 1.350000e-01 369 3.535000e-10 4.534973e-01 1.330000e-01 370 3.545000e-10 4.574612e-01 1.310000e-01 371 3.555000e-10 4.613625e-01 1.290000e-01 372 3.565000e-10 4.652016e-01 1.270000e-01 373 3.575000e-10 4.689788e-01 1.250000e-01 374 3.585000e-10 4.726943e-01 1.230000e-01 375 3.595000e-10 4.763484e-01 1.210000e-01 376 3.605000e-10 4.799410e-01 1.190000e-01 377 3.615000e-10 4.834720e-01 1.170000e-01 378 3.625000e-10 4.869410e-01 1.150000e-01 379 3.635000e-10 4.903478e-01 1.130000e-01 380 3.645000e-10 4.936916e-01 1.110000e-01 381 3.655000e-10 4.969718e-01 1.090000e-01 382 3.665000e-10 5.001873e-01 1.070000e-01 383 3.675000e-10 5.033370e-01 1.050000e-01 384 3.685000e-10 5.064196e-01 1.030000e-01 385 3.695000e-10 5.094333e-01 1.010000e-01 386 3.705000e-10 5.123764e-01 9.900000e-02 387 3.715000e-10 5.152468e-01 9.700000e-02 388 3.725000e-10 5.180420e-01 9.500000e-02 389 3.735000e-10 5.207594e-01 9.300000e-02 390 3.745000e-10 5.233961e-01 9.100000e-02 391 3.755000e-10 5.259492e-01 8.900000e-02 392 3.765000e-10 5.284157e-01 8.700000e-02 393 3.775000e-10 5.307927e-01 8.500000e-02 394 3.785000e-10 5.330782e-01 8.300000e-02 395 3.795000e-10 5.352713e-01 8.100000e-02 396 3.805000e-10 5.373729e-01 7.900000e-02 397 3.815000e-10 5.393864e-01 7.700000e-02 398 3.825000e-10 5.413167e-01 7.500000e-02 399 3.835000e-10 5.431672e-01 7.300000e-02 400 3.845000e-10 5.449354e-01 7.100000e-02 401 3.855000e-10 5.466098e-01 6.900000e-02 402 3.865000e-10 5.481710e-01 6.700000e-02 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 403 3.875000e-10 5.495933e-01 6.500000e-02 404 3.885000e-10 5.508470e-01 6.300000e-02 405 3.895000e-10 5.518977e-01 6.100000e-02 406 3.905000e-10 5.527049e-01 5.900000e-02 407 3.915000e-10 5.532200e-01 5.700000e-02 408 3.925000e-10 5.533834e-01 5.500000e-02 409 3.935000e-10 5.531176e-01 5.300000e-02 410 3.945000e-10 5.523348e-01 5.100000e-02 411 3.955000e-10 5.509170e-01 4.900000e-02 412 3.965000e-10 5.487215e-01 4.700000e-02 413 3.975000e-10 5.455761e-01 4.500000e-02 414 3.985000e-10 5.412833e-01 4.300000e-02 415 3.995000e-10 5.356307e-01 4.100000e-02 416 4.005000e-10 5.284127e-01 3.900000e-02 417 4.015000e-10 5.194648e-01 3.700000e-02 418 4.025000e-10 5.086948e-01 3.500000e-02 419 4.035000e-10 4.960865e-01 3.300000e-02 420 4.045000e-10 4.816629e-01 3.100000e-02 421 4.055000e-10 4.654301e-01 2.900000e-02 422 4.065000e-10 4.473553e-01 2.700000e-02 423 4.075000e-10 4.274096e-01 2.500000e-02 424 4.085000e-10 4.056561e-01 2.300000e-02 425 4.095000e-10 3.823392e-01 2.100000e-02 426 4.105000e-10 3.579054e-01 1.900000e-02 427 4.115000e-10 3.324855e-01 1.700000e-02 428 4.125000e-10 3.062522e-01 1.500000e-02 429 4.135000e-10 2.793418e-01 1.300000e-02 430 4.145000e-10 2.517648e-01 1.100000e-02 431 4.155000e-10 2.234013e-01 9.000000e-03 432 4.165000e-10 1.940307e-01 7.000000e-03 433 4.175000e-10 1.634796e-01 5.000000e-03 434 4.185000e-10 1.322176e-01 3.000000e-03 435 4.195000e-10 1.035401e-01 1.000000e-03 436 4.200000e-10 9.166197e-02 3.230922e-17 437 4.201000e-10 9.166198e-02 0.000000e+00 438 4.203000e-10 9.166197e-02 0.000000e+00 439 4.207000e-10 9.166197e-02 0.000000e+00 440 4.215000e-10 9.166197e-02 0.000000e+00 441 4.225000e-10 9.166197e-02 0.000000e+00 442 4.235000e-10 9.166197e-02 0.000000e+00 443 4.245000e-10 9.166197e-02 0.000000e+00 444 4.255000e-10 9.166197e-02 0.000000e+00 445 4.265000e-10 9.166197e-02 0.000000e+00 446 4.275000e-10 9.166197e-02 0.000000e+00 447 4.285000e-10 9.166197e-02 0.000000e+00 448 4.295000e-10 9.166197e-02 0.000000e+00 449 4.305000e-10 9.166197e-02 0.000000e+00 450 4.315000e-10 9.166197e-02 0.000000e+00 451 4.325000e-10 9.166197e-02 0.000000e+00 452 4.335000e-10 9.166197e-02 0.000000e+00 453 4.345000e-10 9.166197e-02 0.000000e+00 454 4.355000e-10 9.166197e-02 0.000000e+00 455 4.365000e-10 9.166197e-02 0.000000e+00 456 4.375000e-10 9.166197e-02 0.000000e+00 457 4.385000e-10 9.166197e-02 0.000000e+00 458 4.395000e-10 9.166197e-02 0.000000e+00 459 4.405000e-10 9.166197e-02 0.000000e+00 460 4.415000e-10 9.166197e-02 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 461 4.425000e-10 9.166197e-02 0.000000e+00 462 4.435000e-10 9.166197e-02 0.000000e+00 463 4.445000e-10 9.166197e-02 0.000000e+00 464 4.455000e-10 9.166197e-02 0.000000e+00 465 4.465000e-10 9.166197e-02 0.000000e+00 466 4.475000e-10 9.166197e-02 0.000000e+00 467 4.485000e-10 9.166197e-02 0.000000e+00 468 4.495000e-10 9.166197e-02 0.000000e+00 469 4.505000e-10 9.166197e-02 0.000000e+00 470 4.515000e-10 9.166197e-02 0.000000e+00 471 4.525000e-10 9.166197e-02 0.000000e+00 472 4.535000e-10 9.166197e-02 0.000000e+00 473 4.545000e-10 9.166197e-02 0.000000e+00 474 4.555000e-10 9.166197e-02 0.000000e+00 475 4.565000e-10 9.166197e-02 0.000000e+00 476 4.575000e-10 9.166197e-02 0.000000e+00 477 4.585000e-10 9.166197e-02 0.000000e+00 478 4.595000e-10 9.166197e-02 0.000000e+00 479 4.605000e-10 9.166197e-02 0.000000e+00 480 4.615000e-10 9.166197e-02 0.000000e+00 481 4.625000e-10 9.166197e-02 0.000000e+00 482 4.635000e-10 9.166197e-02 0.000000e+00 483 4.645000e-10 9.166197e-02 0.000000e+00 484 4.655000e-10 9.166197e-02 0.000000e+00 485 4.665000e-10 9.166197e-02 0.000000e+00 486 4.675000e-10 9.166197e-02 0.000000e+00 487 4.685000e-10 9.166197e-02 0.000000e+00 488 4.695000e-10 9.166197e-02 0.000000e+00 489 4.705000e-10 9.166197e-02 0.000000e+00 490 4.715000e-10 9.166197e-02 0.000000e+00 491 4.725000e-10 9.166197e-02 0.000000e+00 492 4.735000e-10 9.166197e-02 0.000000e+00 493 4.745000e-10 9.166197e-02 0.000000e+00 494 4.755000e-10 9.166197e-02 0.000000e+00 495 4.765000e-10 9.166197e-02 0.000000e+00 496 4.775000e-10 9.166197e-02 0.000000e+00 497 4.785000e-10 9.166197e-02 0.000000e+00 498 4.795000e-10 9.166197e-02 0.000000e+00 499 4.805000e-10 9.166197e-02 0.000000e+00 500 4.815000e-10 9.166197e-02 0.000000e+00 501 4.825000e-10 9.166197e-02 0.000000e+00 502 4.835000e-10 9.166197e-02 0.000000e+00 503 4.845000e-10 9.166197e-02 0.000000e+00 504 4.855000e-10 9.166197e-02 0.000000e+00 505 4.865000e-10 9.166197e-02 0.000000e+00 506 4.875000e-10 9.166197e-02 0.000000e+00 507 4.885000e-10 9.166197e-02 0.000000e+00 508 4.895000e-10 9.166197e-02 0.000000e+00 509 4.905000e-10 9.166197e-02 0.000000e+00 510 4.915000e-10 9.166197e-02 0.000000e+00 511 4.925000e-10 9.166197e-02 0.000000e+00 512 4.935000e-10 9.166197e-02 0.000000e+00 513 4.945000e-10 9.166197e-02 0.000000e+00 514 4.955000e-10 9.166197e-02 0.000000e+00 515 4.965000e-10 9.166197e-02 0.000000e+00 516 4.975000e-10 9.166197e-02 0.000000e+00 517 4.985000e-10 9.166197e-02 0.000000e+00 518 4.995000e-10 9.166197e-02 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 519 5.005000e-10 9.166197e-02 0.000000e+00 520 5.015000e-10 9.166197e-02 0.000000e+00 521 5.025000e-10 9.166197e-02 0.000000e+00 522 5.035000e-10 9.166197e-02 0.000000e+00 523 5.045000e-10 9.166197e-02 0.000000e+00 524 5.055000e-10 9.166197e-02 0.000000e+00 525 5.065000e-10 9.166197e-02 0.000000e+00 526 5.075000e-10 9.166197e-02 0.000000e+00 527 5.085000e-10 9.166197e-02 0.000000e+00 528 5.095000e-10 9.166197e-02 0.000000e+00 529 5.105000e-10 9.166197e-02 0.000000e+00 530 5.115000e-10 9.166197e-02 0.000000e+00 531 5.125000e-10 9.166197e-02 0.000000e+00 532 5.135000e-10 9.166197e-02 0.000000e+00 533 5.145000e-10 9.166197e-02 0.000000e+00 534 5.155000e-10 9.166197e-02 0.000000e+00 535 5.165000e-10 9.166197e-02 0.000000e+00 536 5.175000e-10 9.166197e-02 0.000000e+00 537 5.185000e-10 9.166197e-02 0.000000e+00 538 5.195000e-10 9.166197e-02 0.000000e+00 539 5.205000e-10 9.166197e-02 0.000000e+00 540 5.215000e-10 9.166197e-02 0.000000e+00 541 5.225000e-10 9.166197e-02 0.000000e+00 542 5.235000e-10 9.166197e-02 0.000000e+00 543 5.245000e-10 9.166197e-02 0.000000e+00 544 5.255000e-10 9.166197e-02 0.000000e+00 545 5.265000e-10 9.166197e-02 0.000000e+00 546 5.275000e-10 9.166197e-02 0.000000e+00 547 5.285000e-10 9.166197e-02 0.000000e+00 548 5.295000e-10 9.166197e-02 0.000000e+00 549 5.305000e-10 9.166197e-02 0.000000e+00 550 5.315000e-10 9.166197e-02 0.000000e+00 551 5.325000e-10 9.166197e-02 0.000000e+00 552 5.335000e-10 9.166197e-02 0.000000e+00 553 5.345000e-10 9.166197e-02 0.000000e+00 554 5.355000e-10 9.166197e-02 0.000000e+00 555 5.365000e-10 9.166197e-02 0.000000e+00 556 5.375000e-10 9.166197e-02 0.000000e+00 557 5.385000e-10 9.166197e-02 0.000000e+00 558 5.395000e-10 9.166197e-02 0.000000e+00 559 5.405000e-10 9.166197e-02 0.000000e+00 560 5.415000e-10 9.166197e-02 0.000000e+00 561 5.425000e-10 9.166197e-02 0.000000e+00 562 5.435000e-10 9.166197e-02 0.000000e+00 563 5.445000e-10 9.166197e-02 0.000000e+00 564 5.455000e-10 9.166197e-02 0.000000e+00 565 5.465000e-10 9.166197e-02 0.000000e+00 566 5.475000e-10 9.166197e-02 0.000000e+00 567 5.485000e-10 9.166197e-02 0.000000e+00 568 5.495000e-10 9.166197e-02 0.000000e+00 569 5.505000e-10 9.166197e-02 0.000000e+00 570 5.515000e-10 9.166197e-02 0.000000e+00 571 5.525000e-10 9.166197e-02 0.000000e+00 572 5.535000e-10 9.166197e-02 0.000000e+00 573 5.545000e-10 9.166197e-02 0.000000e+00 574 5.555000e-10 9.166197e-02 0.000000e+00 575 5.565000e-10 9.166197e-02 0.000000e+00 576 5.575000e-10 9.166197e-02 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 577 5.585000e-10 9.166197e-02 0.000000e+00 578 5.595000e-10 9.166197e-02 0.000000e+00 579 5.605000e-10 9.166197e-02 0.000000e+00 580 5.615000e-10 9.166197e-02 0.000000e+00 581 5.625000e-10 9.166197e-02 0.000000e+00 582 5.635000e-10 9.166197e-02 0.000000e+00 583 5.645000e-10 9.166197e-02 0.000000e+00 584 5.655000e-10 9.166197e-02 0.000000e+00 585 5.665000e-10 9.166197e-02 0.000000e+00 586 5.675000e-10 9.166197e-02 0.000000e+00 587 5.685000e-10 9.166197e-02 0.000000e+00 588 5.695000e-10 9.166197e-02 0.000000e+00 589 5.705000e-10 9.166197e-02 0.000000e+00 590 5.715000e-10 9.166197e-02 0.000000e+00 591 5.725000e-10 9.166197e-02 0.000000e+00 592 5.735000e-10 9.166197e-02 0.000000e+00 593 5.745000e-10 9.166197e-02 0.000000e+00 594 5.755000e-10 9.166197e-02 0.000000e+00 595 5.765000e-10 9.166197e-02 0.000000e+00 596 5.775000e-10 9.166197e-02 0.000000e+00 597 5.785000e-10 9.166197e-02 0.000000e+00 598 5.795000e-10 9.166197e-02 0.000000e+00 599 5.805000e-10 9.166197e-02 0.000000e+00 600 5.815000e-10 9.166197e-02 0.000000e+00 601 5.825000e-10 9.166197e-02 0.000000e+00 602 5.835000e-10 9.166197e-02 0.000000e+00 603 5.845000e-10 9.166197e-02 0.000000e+00 604 5.855000e-10 9.166197e-02 0.000000e+00 605 5.865000e-10 9.166197e-02 0.000000e+00 606 5.875000e-10 9.166197e-02 0.000000e+00 607 5.885000e-10 9.166197e-02 0.000000e+00 608 5.895000e-10 9.166197e-02 0.000000e+00 609 5.905000e-10 9.166197e-02 0.000000e+00 610 5.915000e-10 9.166197e-02 0.000000e+00 611 5.925000e-10 9.166197e-02 0.000000e+00 612 5.935000e-10 9.166197e-02 0.000000e+00 613 5.945000e-10 9.166197e-02 0.000000e+00 614 5.955000e-10 9.166197e-02 0.000000e+00 615 5.965000e-10 9.166197e-02 0.000000e+00 616 5.975000e-10 9.166197e-02 0.000000e+00 617 5.985000e-10 9.166197e-02 0.000000e+00 618 5.995000e-10 9.166197e-02 0.000000e+00 619 6.005000e-10 9.166197e-02 0.000000e+00 620 6.015000e-10 9.166197e-02 0.000000e+00 621 6.025000e-10 9.166197e-02 0.000000e+00 622 6.035000e-10 9.166197e-02 0.000000e+00 623 6.045000e-10 9.166197e-02 0.000000e+00 624 6.055000e-10 9.166197e-02 0.000000e+00 625 6.065000e-10 9.166197e-02 0.000000e+00 626 6.075000e-10 9.166197e-02 0.000000e+00 627 6.085000e-10 9.166197e-02 0.000000e+00 628 6.095000e-10 9.166197e-02 0.000000e+00 629 6.105000e-10 9.166197e-02 0.000000e+00 630 6.115000e-10 9.166197e-02 0.000000e+00 631 6.125000e-10 9.166197e-02 0.000000e+00 632 6.135000e-10 9.166197e-02 0.000000e+00 633 6.145000e-10 9.166197e-02 0.000000e+00 634 6.155000e-10 9.166197e-02 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 635 6.165000e-10 9.166197e-02 0.000000e+00 636 6.175000e-10 9.166197e-02 0.000000e+00 637 6.185000e-10 9.166197e-02 0.000000e+00 638 6.195000e-10 9.166197e-02 0.000000e+00 639 6.200000e-10 9.166197e-02 7.108583e-17 640 6.201000e-10 9.393837e-02 2.000000e-04 641 6.203000e-10 9.863117e-02 6.000000e-04 642 6.207000e-10 1.087280e-01 1.400000e-03 643 6.215000e-10 1.322176e-01 3.000000e-03 644 6.225000e-10 1.634797e-01 5.000000e-03 645 6.235000e-10 1.940307e-01 7.000000e-03 646 6.245000e-10 2.234013e-01 9.000000e-03 647 6.255000e-10 2.517648e-01 1.100000e-02 648 6.265000e-10 2.793418e-01 1.300000e-02 649 6.275000e-10 3.062522e-01 1.500000e-02 650 6.285000e-10 3.324855e-01 1.700000e-02 651 6.295000e-10 3.579054e-01 1.900000e-02 652 6.305000e-10 3.823391e-01 2.100000e-02 653 6.315000e-10 4.056560e-01 2.300000e-02 654 6.325000e-10 4.274095e-01 2.500000e-02 655 6.335000e-10 4.473553e-01 2.700000e-02 656 6.345000e-10 4.654301e-01 2.900000e-02 657 6.355000e-10 4.816629e-01 3.100000e-02 658 6.365000e-10 4.960865e-01 3.300000e-02 659 6.375000e-10 5.086948e-01 3.500000e-02 660 6.385000e-10 5.194649e-01 3.700000e-02 661 6.395000e-10 5.284127e-01 3.900000e-02 662 6.405000e-10 5.356307e-01 4.100000e-02 663 6.415000e-10 5.412833e-01 4.300000e-02 664 6.425000e-10 5.455761e-01 4.500000e-02 665 6.435000e-10 5.487215e-01 4.700000e-02 666 6.445000e-10 5.509170e-01 4.900000e-02 667 6.455000e-10 5.523348e-01 5.100000e-02 668 6.465000e-10 5.531176e-01 5.300000e-02 669 6.475000e-10 5.533812e-01 5.500000e-02 670 6.485000e-10 5.532216e-01 5.700000e-02 671 6.495000e-10 5.527060e-01 5.900000e-02 672 6.505000e-10 5.518984e-01 6.100000e-02 673 6.515000e-10 5.508476e-01 6.300000e-02 674 6.525000e-10 5.495937e-01 6.500000e-02 675 6.535000e-10 5.481712e-01 6.700000e-02 676 6.545000e-10 5.466100e-01 6.900000e-02 677 6.555000e-10 5.449355e-01 7.100000e-02 678 6.565000e-10 5.431673e-01 7.300000e-02 679 6.575000e-10 5.413167e-01 7.500000e-02 680 6.585000e-10 5.393864e-01 7.700000e-02 681 6.595000e-10 5.373729e-01 7.900000e-02 682 6.605000e-10 5.352712e-01 8.100000e-02 683 6.615000e-10 5.330782e-01 8.300000e-02 684 6.625000e-10 5.307927e-01 8.500000e-02 685 6.635000e-10 5.284157e-01 8.700000e-02 686 6.645000e-10 5.259492e-01 8.900000e-02 687 6.655000e-10 5.233961e-01 9.100000e-02 688 6.665000e-10 5.207594e-01 9.300000e-02 689 6.675000e-10 5.180420e-01 9.500000e-02 690 6.685000e-10 5.152468e-01 9.700000e-02 691 6.695000e-10 5.123765e-01 9.900000e-02 692 6.705000e-10 5.094333e-01 1.010000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 693 6.715000e-10 5.064196e-01 1.030000e-01 694 6.725000e-10 5.033370e-01 1.050000e-01 695 6.735000e-10 5.001873e-01 1.070000e-01 696 6.745000e-10 4.969718e-01 1.090000e-01 697 6.755000e-10 4.936916e-01 1.110000e-01 698 6.765000e-10 4.903478e-01 1.130000e-01 699 6.775000e-10 4.869410e-01 1.150000e-01 700 6.785000e-10 4.834720e-01 1.170000e-01 701 6.795000e-10 4.799410e-01 1.190000e-01 702 6.805000e-10 4.763484e-01 1.210000e-01 703 6.815000e-10 4.726943e-01 1.230000e-01 704 6.825000e-10 4.689788e-01 1.250000e-01 705 6.835000e-10 4.652016e-01 1.270000e-01 706 6.845000e-10 4.613625e-01 1.290000e-01 707 6.855000e-10 4.574612e-01 1.310000e-01 708 6.865000e-10 4.534973e-01 1.330000e-01 709 6.875000e-10 4.494700e-01 1.350000e-01 710 6.885000e-10 4.453789e-01 1.370000e-01 711 6.895000e-10 4.412231e-01 1.390000e-01 712 6.905000e-10 4.370017e-01 1.410000e-01 713 6.915000e-10 4.327138e-01 1.430000e-01 714 6.925000e-10 4.283584e-01 1.450000e-01 715 6.935000e-10 4.239342e-01 1.470000e-01 716 6.945000e-10 4.194401e-01 1.490000e-01 717 6.955000e-10 4.148747e-01 1.510000e-01 718 6.965000e-10 4.102366e-01 1.530000e-01 719 6.975000e-10 4.055241e-01 1.550000e-01 720 6.985000e-10 4.007355e-01 1.570000e-01 721 6.995000e-10 3.958691e-01 1.590000e-01 722 7.005000e-10 3.909227e-01 1.610000e-01 723 7.015000e-10 3.858943e-01 1.630000e-01 724 7.025000e-10 3.807815e-01 1.650000e-01 725 7.035000e-10 3.755815e-01 1.670000e-01 726 7.045000e-10 3.702914e-01 1.690000e-01 727 7.055000e-10 3.649100e-01 1.710000e-01 728 7.065000e-10 3.594363e-01 1.730000e-01 729 7.075000e-10 3.538678e-01 1.750000e-01 730 7.085000e-10 3.482016e-01 1.770000e-01 731 7.095000e-10 3.424350e-01 1.790000e-01 732 7.105000e-10 3.365646e-01 1.810000e-01 733 7.115000e-10 3.305872e-01 1.830000e-01 734 7.125000e-10 3.244993e-01 1.850000e-01 735 7.135000e-10 3.182970e-01 1.870000e-01 736 7.145000e-10 3.119762e-01 1.890000e-01 737 7.155000e-10 3.055323e-01 1.910000e-01 738 7.165000e-10 2.989603e-01 1.930000e-01 739 7.175000e-10 2.922546e-01 1.950000e-01 740 7.185000e-10 2.854089e-01 1.970000e-01 741 7.195000e-10 2.784155e-01 1.990000e-01 742 7.200000e-10 2.748604e-01 2.000000e-01 743 7.201000e-10 2.748604e-01 2.000000e-01 744 7.203000e-10 2.748604e-01 2.000000e-01 745 7.207000e-10 2.748604e-01 2.000000e-01 746 7.215000e-10 2.748604e-01 2.000000e-01 747 7.225000e-10 2.748604e-01 2.000000e-01 748 7.235000e-10 2.748604e-01 2.000000e-01 749 7.245000e-10 2.748604e-01 2.000000e-01 750 7.255000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 751 7.265000e-10 2.748604e-01 2.000000e-01 752 7.275000e-10 2.748604e-01 2.000000e-01 753 7.285000e-10 2.748604e-01 2.000000e-01 754 7.295000e-10 2.748604e-01 2.000000e-01 755 7.305000e-10 2.748604e-01 2.000000e-01 756 7.315000e-10 2.748604e-01 2.000000e-01 757 7.325000e-10 2.748604e-01 2.000000e-01 758 7.335000e-10 2.748604e-01 2.000000e-01 759 7.345000e-10 2.748604e-01 2.000000e-01 760 7.355000e-10 2.748604e-01 2.000000e-01 761 7.365000e-10 2.748604e-01 2.000000e-01 762 7.375000e-10 2.748604e-01 2.000000e-01 763 7.385000e-10 2.748604e-01 2.000000e-01 764 7.395000e-10 2.748604e-01 2.000000e-01 765 7.405000e-10 2.748604e-01 2.000000e-01 766 7.415000e-10 2.748604e-01 2.000000e-01 767 7.425000e-10 2.748604e-01 2.000000e-01 768 7.435000e-10 2.748604e-01 2.000000e-01 769 7.445000e-10 2.748604e-01 2.000000e-01 770 7.455000e-10 2.748604e-01 2.000000e-01 771 7.465000e-10 2.748604e-01 2.000000e-01 772 7.475000e-10 2.748604e-01 2.000000e-01 773 7.485000e-10 2.748604e-01 2.000000e-01 774 7.495000e-10 2.748604e-01 2.000000e-01 775 7.505000e-10 2.748604e-01 2.000000e-01 776 7.515000e-10 2.748604e-01 2.000000e-01 777 7.525000e-10 2.748604e-01 2.000000e-01 778 7.535000e-10 2.748604e-01 2.000000e-01 779 7.545000e-10 2.748604e-01 2.000000e-01 780 7.555000e-10 2.748604e-01 2.000000e-01 781 7.565000e-10 2.748604e-01 2.000000e-01 782 7.575000e-10 2.748604e-01 2.000000e-01 783 7.585000e-10 2.748604e-01 2.000000e-01 784 7.595000e-10 2.748604e-01 2.000000e-01 785 7.605000e-10 2.748604e-01 2.000000e-01 786 7.615000e-10 2.748604e-01 2.000000e-01 787 7.625000e-10 2.748604e-01 2.000000e-01 788 7.635000e-10 2.748604e-01 2.000000e-01 789 7.645000e-10 2.748604e-01 2.000000e-01 790 7.655000e-10 2.748604e-01 2.000000e-01 791 7.665000e-10 2.748604e-01 2.000000e-01 792 7.675000e-10 2.748604e-01 2.000000e-01 793 7.685000e-10 2.748604e-01 2.000000e-01 794 7.695000e-10 2.748604e-01 2.000000e-01 795 7.705000e-10 2.748604e-01 2.000000e-01 796 7.715000e-10 2.748604e-01 2.000000e-01 797 7.725000e-10 2.748604e-01 2.000000e-01 798 7.735000e-10 2.748604e-01 2.000000e-01 799 7.745000e-10 2.748604e-01 2.000000e-01 800 7.755000e-10 2.748604e-01 2.000000e-01 801 7.765000e-10 2.748604e-01 2.000000e-01 802 7.775000e-10 2.748604e-01 2.000000e-01 803 7.785000e-10 2.748604e-01 2.000000e-01 804 7.795000e-10 2.748604e-01 2.000000e-01 805 7.805000e-10 2.748604e-01 2.000000e-01 806 7.815000e-10 2.748604e-01 2.000000e-01 807 7.825000e-10 2.748604e-01 2.000000e-01 808 7.835000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 809 7.845000e-10 2.748604e-01 2.000000e-01 810 7.855000e-10 2.748604e-01 2.000000e-01 811 7.865000e-10 2.748604e-01 2.000000e-01 812 7.875000e-10 2.748604e-01 2.000000e-01 813 7.885000e-10 2.748604e-01 2.000000e-01 814 7.895000e-10 2.748604e-01 2.000000e-01 815 7.905000e-10 2.748604e-01 2.000000e-01 816 7.915000e-10 2.748604e-01 2.000000e-01 817 7.925000e-10 2.748604e-01 2.000000e-01 818 7.935000e-10 2.748604e-01 2.000000e-01 819 7.945000e-10 2.748604e-01 2.000000e-01 820 7.955000e-10 2.748604e-01 2.000000e-01 821 7.965000e-10 2.748604e-01 2.000000e-01 822 7.975000e-10 2.748604e-01 2.000000e-01 823 7.985000e-10 2.748604e-01 2.000000e-01 824 7.995000e-10 2.748604e-01 2.000000e-01 825 8.005000e-10 2.748604e-01 2.000000e-01 826 8.015000e-10 2.748604e-01 2.000000e-01 827 8.025000e-10 2.748604e-01 2.000000e-01 828 8.035000e-10 2.748604e-01 2.000000e-01 829 8.045000e-10 2.748604e-01 2.000000e-01 830 8.055000e-10 2.748604e-01 2.000000e-01 831 8.065000e-10 2.748604e-01 2.000000e-01 832 8.075000e-10 2.748604e-01 2.000000e-01 833 8.085000e-10 2.748604e-01 2.000000e-01 834 8.095000e-10 2.748604e-01 2.000000e-01 835 8.105000e-10 2.748604e-01 2.000000e-01 836 8.115000e-10 2.748604e-01 2.000000e-01 837 8.125000e-10 2.748604e-01 2.000000e-01 838 8.135000e-10 2.748604e-01 2.000000e-01 839 8.145000e-10 2.748604e-01 2.000000e-01 840 8.155000e-10 2.748604e-01 2.000000e-01 841 8.165000e-10 2.748604e-01 2.000000e-01 842 8.175000e-10 2.748604e-01 2.000000e-01 843 8.185000e-10 2.748604e-01 2.000000e-01 844 8.195000e-10 2.748604e-01 2.000000e-01 845 8.205000e-10 2.748604e-01 2.000000e-01 846 8.215000e-10 2.748604e-01 2.000000e-01 847 8.225000e-10 2.748604e-01 2.000000e-01 848 8.235000e-10 2.748604e-01 2.000000e-01 849 8.245000e-10 2.748604e-01 2.000000e-01 850 8.255000e-10 2.748604e-01 2.000000e-01 851 8.265000e-10 2.748604e-01 2.000000e-01 852 8.275000e-10 2.748604e-01 2.000000e-01 853 8.285000e-10 2.748604e-01 2.000000e-01 854 8.295000e-10 2.748604e-01 2.000000e-01 855 8.305000e-10 2.748604e-01 2.000000e-01 856 8.315000e-10 2.748604e-01 2.000000e-01 857 8.325000e-10 2.748604e-01 2.000000e-01 858 8.335000e-10 2.748604e-01 2.000000e-01 859 8.345000e-10 2.748604e-01 2.000000e-01 860 8.355000e-10 2.748604e-01 2.000000e-01 861 8.365000e-10 2.748604e-01 2.000000e-01 862 8.375000e-10 2.748604e-01 2.000000e-01 863 8.385000e-10 2.748604e-01 2.000000e-01 864 8.395000e-10 2.748604e-01 2.000000e-01 865 8.405000e-10 2.748604e-01 2.000000e-01 866 8.415000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 867 8.425000e-10 2.748604e-01 2.000000e-01 868 8.435000e-10 2.748604e-01 2.000000e-01 869 8.445000e-10 2.748604e-01 2.000000e-01 870 8.455000e-10 2.748604e-01 2.000000e-01 871 8.465000e-10 2.748604e-01 2.000000e-01 872 8.475000e-10 2.748604e-01 2.000000e-01 873 8.485000e-10 2.748604e-01 2.000000e-01 874 8.495000e-10 2.748604e-01 2.000000e-01 875 8.505000e-10 2.748604e-01 2.000000e-01 876 8.515000e-10 2.748604e-01 2.000000e-01 877 8.525000e-10 2.748604e-01 2.000000e-01 878 8.535000e-10 2.748604e-01 2.000000e-01 879 8.545000e-10 2.748604e-01 2.000000e-01 880 8.555000e-10 2.748604e-01 2.000000e-01 881 8.565000e-10 2.748604e-01 2.000000e-01 882 8.575000e-10 2.748604e-01 2.000000e-01 883 8.585000e-10 2.748604e-01 2.000000e-01 884 8.595000e-10 2.748604e-01 2.000000e-01 885 8.605000e-10 2.748604e-01 2.000000e-01 886 8.615000e-10 2.748604e-01 2.000000e-01 887 8.625000e-10 2.748604e-01 2.000000e-01 888 8.635000e-10 2.748604e-01 2.000000e-01 889 8.645000e-10 2.748604e-01 2.000000e-01 890 8.655000e-10 2.748604e-01 2.000000e-01 891 8.665000e-10 2.748604e-01 2.000000e-01 892 8.675000e-10 2.748604e-01 2.000000e-01 893 8.685000e-10 2.748604e-01 2.000000e-01 894 8.695000e-10 2.748604e-01 2.000000e-01 895 8.705000e-10 2.748604e-01 2.000000e-01 896 8.715000e-10 2.748604e-01 2.000000e-01 897 8.725000e-10 2.748604e-01 2.000000e-01 898 8.735000e-10 2.748604e-01 2.000000e-01 899 8.745000e-10 2.748604e-01 2.000000e-01 900 8.755000e-10 2.748604e-01 2.000000e-01 901 8.765000e-10 2.748604e-01 2.000000e-01 902 8.775000e-10 2.748604e-01 2.000000e-01 903 8.785000e-10 2.748604e-01 2.000000e-01 904 8.795000e-10 2.748604e-01 2.000000e-01 905 8.805000e-10 2.748604e-01 2.000000e-01 906 8.815000e-10 2.748604e-01 2.000000e-01 907 8.825000e-10 2.748604e-01 2.000000e-01 908 8.835000e-10 2.748604e-01 2.000000e-01 909 8.845000e-10 2.748604e-01 2.000000e-01 910 8.855000e-10 2.748604e-01 2.000000e-01 911 8.865000e-10 2.748604e-01 2.000000e-01 912 8.875000e-10 2.748604e-01 2.000000e-01 913 8.885000e-10 2.748604e-01 2.000000e-01 914 8.895000e-10 2.748604e-01 2.000000e-01 915 8.905000e-10 2.748604e-01 2.000000e-01 916 8.915000e-10 2.748604e-01 2.000000e-01 917 8.925000e-10 2.748604e-01 2.000000e-01 918 8.935000e-10 2.748604e-01 2.000000e-01 919 8.945000e-10 2.748604e-01 2.000000e-01 920 8.955000e-10 2.748604e-01 2.000000e-01 921 8.965000e-10 2.748604e-01 2.000000e-01 922 8.975000e-10 2.748604e-01 2.000000e-01 923 8.985000e-10 2.748604e-01 2.000000e-01 924 8.995000e-10 2.748604e-01 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 925 9.005000e-10 2.748604e-01 2.000000e-01 926 9.015000e-10 2.748604e-01 2.000000e-01 927 9.025000e-10 2.748604e-01 2.000000e-01 928 9.035000e-10 2.748604e-01 2.000000e-01 929 9.045000e-10 2.748604e-01 2.000000e-01 930 9.055000e-10 2.748604e-01 2.000000e-01 931 9.065000e-10 2.748604e-01 2.000000e-01 932 9.075000e-10 2.748604e-01 2.000000e-01 933 9.085000e-10 2.748604e-01 2.000000e-01 934 9.095000e-10 2.748604e-01 2.000000e-01 935 9.105000e-10 2.748604e-01 2.000000e-01 936 9.115000e-10 2.748604e-01 2.000000e-01 937 9.125000e-10 2.748604e-01 2.000000e-01 938 9.135000e-10 2.748604e-01 2.000000e-01 939 9.145000e-10 2.748604e-01 2.000000e-01 940 9.155000e-10 2.748604e-01 2.000000e-01 941 9.165000e-10 2.748604e-01 2.000000e-01 942 9.175000e-10 2.748604e-01 2.000000e-01 943 9.185000e-10 2.748604e-01 2.000000e-01 944 9.195000e-10 2.748604e-01 2.000000e-01 945 9.200000e-10 2.748604e-01 2.000000e-01 946 9.201000e-10 2.755747e-01 1.998000e-01 947 9.203000e-10 2.769983e-01 1.994000e-01 948 9.207000e-10 2.798265e-01 1.986000e-01 949 9.215000e-10 2.854089e-01 1.970000e-01 950 9.225000e-10 2.922546e-01 1.950000e-01 951 9.235000e-10 2.989603e-01 1.930000e-01 952 9.245000e-10 3.055323e-01 1.910000e-01 953 9.255000e-10 3.119762e-01 1.890000e-01 954 9.265000e-10 3.182970e-01 1.870000e-01 955 9.275000e-10 3.244993e-01 1.850000e-01 956 9.285000e-10 3.305872e-01 1.830000e-01 957 9.295000e-10 3.365645e-01 1.810000e-01 958 9.305000e-10 3.424350e-01 1.790000e-01 959 9.315000e-10 3.482016e-01 1.770000e-01 960 9.325000e-10 3.538678e-01 1.750000e-01 961 9.335000e-10 3.594363e-01 1.730000e-01 962 9.345000e-10 3.649100e-01 1.710000e-01 963 9.355000e-10 3.702914e-01 1.690000e-01 964 9.365000e-10 3.755815e-01 1.670000e-01 965 9.375000e-10 3.807815e-01 1.650000e-01 966 9.385000e-10 3.858943e-01 1.630000e-01 967 9.395000e-10 3.909227e-01 1.610000e-01 968 9.405000e-10 3.958691e-01 1.590000e-01 969 9.415000e-10 4.007355e-01 1.570000e-01 970 9.425000e-10 4.055241e-01 1.550000e-01 971 9.435000e-10 4.102366e-01 1.530000e-01 972 9.445000e-10 4.148747e-01 1.510000e-01 973 9.455000e-10 4.194402e-01 1.490000e-01 974 9.465000e-10 4.239342e-01 1.470000e-01 975 9.475000e-10 4.283584e-01 1.450000e-01 976 9.485000e-10 4.327138e-01 1.430000e-01 977 9.495000e-10 4.370017e-01 1.410000e-01 978 9.505000e-10 4.412231e-01 1.390000e-01 979 9.515000e-10 4.453789e-01 1.370000e-01 980 9.525000e-10 4.494700e-01 1.350000e-01 981 9.535000e-10 4.534973e-01 1.330000e-01 982 9.545000e-10 4.574612e-01 1.310000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 983 9.555000e-10 4.613625e-01 1.290000e-01 984 9.565000e-10 4.652016e-01 1.270000e-01 985 9.575000e-10 4.689788e-01 1.250000e-01 986 9.585000e-10 4.726943e-01 1.230000e-01 987 9.595000e-10 4.763484e-01 1.210000e-01 988 9.605000e-10 4.799410e-01 1.190000e-01 989 9.615000e-10 4.834720e-01 1.170000e-01 990 9.625000e-10 4.869410e-01 1.150000e-01 991 9.635000e-10 4.903478e-01 1.130000e-01 992 9.645000e-10 4.936916e-01 1.110000e-01 993 9.655000e-10 4.969718e-01 1.090000e-01 994 9.665000e-10 5.001873e-01 1.070000e-01 995 9.675000e-10 5.033370e-01 1.050000e-01 996 9.685000e-10 5.064196e-01 1.030000e-01 997 9.695000e-10 5.094333e-01 1.010000e-01 998 9.705000e-10 5.123764e-01 9.900000e-02 999 9.715000e-10 5.152468e-01 9.700000e-02 1000 9.725000e-10 5.180420e-01 9.500000e-02 1001 9.735000e-10 5.207594e-01 9.300000e-02 1002 9.745000e-10 5.233961e-01 9.100000e-02 1003 9.755000e-10 5.259492e-01 8.900000e-02 1004 9.765000e-10 5.284157e-01 8.700000e-02 1005 9.775000e-10 5.307927e-01 8.500000e-02 1006 9.785000e-10 5.330782e-01 8.300000e-02 1007 9.795000e-10 5.352713e-01 8.100000e-02 1008 9.805000e-10 5.373729e-01 7.900000e-02 1009 9.815000e-10 5.393864e-01 7.700000e-02 1010 9.825000e-10 5.413167e-01 7.500000e-02 1011 9.835000e-10 5.431672e-01 7.300000e-02 1012 9.845000e-10 5.449354e-01 7.100000e-02 1013 9.855000e-10 5.466098e-01 6.900000e-02 1014 9.865000e-10 5.481710e-01 6.700000e-02 1015 9.875000e-10 5.495933e-01 6.500000e-02 1016 9.885000e-10 5.508470e-01 6.300000e-02 1017 9.895000e-10 5.518977e-01 6.100000e-02 1018 9.905000e-10 5.527049e-01 5.900000e-02 1019 9.915000e-10 5.532200e-01 5.700000e-02 1020 9.925000e-10 5.533834e-01 5.500000e-02 1021 9.935000e-10 5.531176e-01 5.300000e-02 1022 9.945000e-10 5.523348e-01 5.100000e-02 1023 9.955000e-10 5.509170e-01 4.900000e-02 1024 9.965000e-10 5.487215e-01 4.700000e-02 1025 9.975000e-10 5.455761e-01 4.500000e-02 1026 9.985000e-10 5.412833e-01 4.300000e-02 1027 9.995000e-10 5.356307e-01 4.100000e-02 1028 1.000000e-09 5.322290e-01 4.000000e-02 ngspice-26/tests/bsim3soidd/Makefile.am0000644000265600020320000000060512264261473017470 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ nmosdd.mod \ pmosdd.mod \ $(TESTS) \ $(TESTS:.cir=.out) EXTRA_DIST += ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3soidd/Makefile.in0000644000265600020320000003371012264261541017500 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3soidd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = nmosdd.mod pmosdd.mod $(TESTS) $(TESTS:.cir=.out) \ ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3soidd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3soidd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soidd/t3.out0000644000265600020320000024625312264261473016526 0ustar andreasadmin Circuit: *model = BSIMSOI (DD) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (DD) DC transfer characteristic Sat Aug 27 15:56:51 2005 -------------------------------------------------------------------------------- Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e-01 -5.161596e-35 1 1.000000e-02 5.000000e-01 3.628821e-06 2 2.000000e-02 5.000000e-01 6.866714e-06 3 3.000000e-02 5.000000e-01 9.721321e-06 4 4.000000e-02 5.000000e-01 1.220246e-05 5 5.000000e-02 5.000000e-01 1.432317e-05 6 6.000000e-02 5.000000e-01 1.610108e-05 7 7.000000e-02 5.000000e-01 1.755994e-05 8 8.000000e-02 5.000000e-01 1.873090e-05 9 9.000000e-02 5.000000e-01 1.965237e-05 10 1.000000e-01 5.000000e-01 2.036791e-05 11 1.100000e-01 5.000000e-01 2.092197e-05 12 1.200000e-01 5.000000e-01 2.135522e-05 13 1.300000e-01 5.000000e-01 2.170127e-05 14 1.400000e-01 5.000000e-01 2.198575e-05 15 1.500000e-01 5.000000e-01 2.222712e-05 16 1.600000e-01 5.000000e-01 2.243823e-05 17 1.700000e-01 5.000000e-01 2.262788e-05 18 1.800000e-01 5.000000e-01 2.280209e-05 19 1.900000e-01 5.000000e-01 2.296503e-05 20 2.000000e-01 5.000000e-01 2.311958e-05 21 2.100000e-01 5.000000e-01 2.326779e-05 22 2.200000e-01 5.000000e-01 2.341114e-05 23 2.300000e-01 5.000000e-01 2.355068e-05 24 2.400000e-01 5.000000e-01 2.368723e-05 25 2.500000e-01 5.000000e-01 2.382139e-05 26 2.600000e-01 5.000000e-01 2.395361e-05 27 2.700000e-01 5.000000e-01 2.408425e-05 28 2.800000e-01 5.000000e-01 2.421360e-05 29 2.900000e-01 5.000000e-01 2.434186e-05 30 3.000000e-01 5.000000e-01 2.446923e-05 31 3.100000e-01 5.000000e-01 2.459584e-05 32 3.200000e-01 5.000000e-01 2.472182e-05 33 3.300000e-01 5.000000e-01 2.484726e-05 34 3.400000e-01 5.000000e-01 2.497225e-05 35 3.500000e-01 5.000000e-01 2.509684e-05 36 3.600000e-01 5.000000e-01 2.522111e-05 37 3.700000e-01 5.000000e-01 2.534509e-05 38 3.800000e-01 5.000000e-01 2.546884e-05 39 3.900000e-01 5.000000e-01 2.559238e-05 40 4.000000e-01 5.000000e-01 2.571575e-05 41 4.100000e-01 5.000000e-01 2.583898e-05 42 4.200000e-01 5.000000e-01 2.596209e-05 43 4.300000e-01 5.000000e-01 2.608509e-05 44 4.400000e-01 5.000000e-01 2.620801e-05 45 4.500000e-01 5.000000e-01 2.633087e-05 46 4.600000e-01 5.000000e-01 2.645368e-05 47 4.700000e-01 5.000000e-01 2.657645e-05 48 4.800000e-01 5.000000e-01 2.669919e-05 49 4.900000e-01 5.000000e-01 2.682191e-05 50 5.000000e-01 5.000000e-01 2.694463e-05 51 5.100000e-01 5.000000e-01 2.706734e-05 52 5.200000e-01 5.000000e-01 2.719007e-05 53 5.300000e-01 5.000000e-01 2.731281e-05 54 5.400000e-01 5.000000e-01 2.743557e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 5.000000e-01 2.755835e-05 56 5.600000e-01 5.000000e-01 2.768117e-05 57 5.700000e-01 5.000000e-01 2.780403e-05 58 5.800000e-01 5.000000e-01 2.792693e-05 59 5.900000e-01 5.000000e-01 2.804987e-05 60 6.000000e-01 5.000000e-01 2.817286e-05 61 6.100000e-01 5.000000e-01 2.829590e-05 62 6.200000e-01 5.000000e-01 2.841900e-05 63 6.300000e-01 5.000000e-01 2.854215e-05 64 6.400000e-01 5.000000e-01 2.866536e-05 65 6.500000e-01 5.000000e-01 2.878865e-05 66 6.600000e-01 5.000000e-01 2.891200e-05 67 6.700000e-01 5.000000e-01 2.903542e-05 68 6.800000e-01 5.000000e-01 2.915892e-05 69 6.900000e-01 5.000000e-01 2.928250e-05 70 7.000000e-01 5.000000e-01 2.940617e-05 71 7.100000e-01 5.000000e-01 2.952995e-05 72 7.200000e-01 5.000000e-01 2.965384e-05 73 7.300000e-01 5.000000e-01 2.977787e-05 74 7.400000e-01 5.000000e-01 2.990204e-05 75 7.500000e-01 5.000000e-01 3.002638e-05 76 7.600000e-01 5.000000e-01 3.015091e-05 77 7.700000e-01 5.000000e-01 3.027565e-05 78 7.800000e-01 5.000000e-01 3.040061e-05 79 7.900000e-01 5.000000e-01 3.052581e-05 80 8.000000e-01 5.000000e-01 3.065127e-05 81 8.100000e-01 5.000000e-01 3.077703e-05 82 8.200000e-01 5.000000e-01 3.090314e-05 83 8.300000e-01 5.000000e-01 3.102967e-05 84 8.400000e-01 5.000000e-01 3.115673e-05 85 8.500000e-01 5.000000e-01 3.128448e-05 86 8.600000e-01 5.000000e-01 3.141320e-05 87 8.700000e-01 5.000000e-01 3.154331e-05 88 8.800000e-01 5.000000e-01 3.167565e-05 89 8.900000e-01 5.000000e-01 3.181185e-05 90 9.000000e-01 5.000000e-01 3.195572e-05 91 9.100000e-01 5.000000e-01 3.211788e-05 92 9.200000e-01 5.000000e-01 3.233415e-05 93 9.300000e-01 5.000000e-01 3.268784e-05 94 9.400000e-01 5.000000e-01 3.315744e-05 95 9.500000e-01 5.000000e-01 3.363908e-05 96 9.600000e-01 5.000000e-01 3.410684e-05 97 9.700000e-01 5.000000e-01 3.456930e-05 98 9.800000e-01 5.000000e-01 3.504589e-05 99 9.900000e-01 5.000000e-01 3.556360e-05 100 1.000000e+00 5.000000e-01 3.615687e-05 101 1.010000e+00 5.000000e-01 3.686245e-05 102 1.020000e+00 5.000000e-01 3.770443e-05 103 1.030000e+00 5.000000e-01 3.868068e-05 104 1.040000e+00 5.000000e-01 3.976837e-05 105 1.050000e+00 5.000000e-01 4.094050e-05 106 1.060000e+00 5.000000e-01 4.217556e-05 107 1.070000e+00 5.000000e-01 4.345876e-05 108 1.080000e+00 5.000000e-01 4.478040e-05 109 1.090000e+00 5.000000e-01 4.613406e-05 110 1.100000e+00 5.000000e-01 4.751535e-05 111 1.110000e+00 5.000000e-01 4.892760e-05 112 1.120000e+00 5.000000e-01 5.037555e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 5.000000e-01 5.185403e-05 114 1.140000e+00 5.000000e-01 5.335897e-05 115 1.150000e+00 5.000000e-01 5.488717e-05 116 1.160000e+00 5.000000e-01 5.643604e-05 117 1.170000e+00 5.000000e-01 5.800344e-05 118 1.180000e+00 5.000000e-01 5.958757e-05 119 1.190000e+00 5.000000e-01 6.118688e-05 120 1.200000e+00 5.000000e-01 6.280003e-05 121 1.210000e+00 5.000000e-01 6.442581e-05 122 1.220000e+00 5.000000e-01 6.606317e-05 123 1.230000e+00 5.000000e-01 6.771114e-05 124 1.240000e+00 5.000000e-01 6.936884e-05 125 1.250000e+00 5.000000e-01 7.103547e-05 126 1.260000e+00 5.000000e-01 7.271028e-05 127 1.270000e+00 5.000000e-01 7.439258e-05 128 1.280000e+00 5.000000e-01 7.608173e-05 129 1.290000e+00 5.000000e-01 7.777712e-05 130 1.300000e+00 5.000000e-01 7.947818e-05 131 1.310000e+00 5.000000e-01 8.118438e-05 132 1.320000e+00 5.000000e-01 8.289520e-05 133 1.330000e+00 5.000000e-01 8.461016e-05 134 1.340000e+00 5.000000e-01 8.632882e-05 135 1.350000e+00 5.000000e-01 8.805074e-05 136 1.360000e+00 5.000000e-01 8.977551e-05 137 1.370000e+00 5.000000e-01 9.150273e-05 138 1.380000e+00 5.000000e-01 9.323204e-05 139 1.390000e+00 5.000000e-01 9.496308e-05 140 1.400000e+00 5.000000e-01 9.669551e-05 141 1.410000e+00 5.000000e-01 9.842901e-05 142 1.420000e+00 5.000000e-01 1.001633e-04 143 1.430000e+00 5.000000e-01 1.018980e-04 144 1.440000e+00 5.000000e-01 1.036329e-04 145 1.450000e+00 5.000000e-01 1.053677e-04 146 1.460000e+00 5.000000e-01 1.071022e-04 147 1.470000e+00 5.000000e-01 1.088361e-04 148 1.480000e+00 5.000000e-01 1.105692e-04 149 1.490000e+00 5.000000e-01 1.123012e-04 150 1.500000e+00 5.000000e-01 1.140320e-04 151 1.510000e+00 5.000000e-01 1.157613e-04 152 1.520000e+00 5.000000e-01 1.174890e-04 153 1.530000e+00 5.000000e-01 1.192148e-04 154 1.540000e+00 5.000000e-01 1.209386e-04 155 1.550000e+00 5.000000e-01 1.226602e-04 156 1.560000e+00 5.000000e-01 1.243795e-04 157 1.570000e+00 5.000000e-01 1.260962e-04 158 1.580000e+00 5.000000e-01 1.278103e-04 159 1.590000e+00 5.000000e-01 1.295216e-04 160 1.600000e+00 5.000000e-01 1.312299e-04 161 1.610000e+00 5.000000e-01 1.329352e-04 162 1.620000e+00 5.000000e-01 1.346373e-04 163 1.630000e+00 5.000000e-01 1.363361e-04 164 1.640000e+00 5.000000e-01 1.380315e-04 165 1.650000e+00 5.000000e-01 1.397234e-04 166 1.660000e+00 5.000000e-01 1.414116e-04 167 1.670000e+00 5.000000e-01 1.430962e-04 168 1.680000e+00 5.000000e-01 1.447769e-04 169 1.690000e+00 5.000000e-01 1.464537e-04 170 1.700000e+00 5.000000e-01 1.481265e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 171 1.710000e+00 5.000000e-01 1.497952e-04 172 1.720000e+00 5.000000e-01 1.514598e-04 173 1.730000e+00 5.000000e-01 1.531202e-04 174 1.740000e+00 5.000000e-01 1.547763e-04 175 1.750000e+00 5.000000e-01 1.564281e-04 176 1.760000e+00 5.000000e-01 1.580754e-04 177 1.770000e+00 5.000000e-01 1.597183e-04 178 1.780000e+00 5.000000e-01 1.613567e-04 179 1.790000e+00 5.000000e-01 1.629904e-04 180 1.800000e+00 5.000000e-01 1.646196e-04 181 1.810000e+00 5.000000e-01 1.662440e-04 182 1.820000e+00 5.000000e-01 1.678638e-04 183 1.830000e+00 5.000000e-01 1.694788e-04 184 1.840000e+00 5.000000e-01 1.710889e-04 185 1.850000e+00 5.000000e-01 1.726942e-04 186 1.860000e+00 5.000000e-01 1.742947e-04 187 1.870000e+00 5.000000e-01 1.758902e-04 188 1.880000e+00 5.000000e-01 1.774808e-04 189 1.890000e+00 5.000000e-01 1.790664e-04 190 1.900000e+00 5.000000e-01 1.806470e-04 191 1.910000e+00 5.000000e-01 1.822226e-04 192 1.920000e+00 5.000000e-01 1.837931e-04 193 1.930000e+00 5.000000e-01 1.853585e-04 194 1.940000e+00 5.000000e-01 1.869188e-04 195 1.950000e+00 5.000000e-01 1.884740e-04 196 1.960000e+00 5.000000e-01 1.900241e-04 197 1.970000e+00 5.000000e-01 1.915690e-04 198 1.980000e+00 5.000000e-01 1.931088e-04 199 1.990000e+00 5.000000e-01 1.946433e-04 200 2.000000e+00 5.000000e-01 1.961727e-04 201 2.010000e+00 5.000000e-01 1.976969e-04 202 2.020000e+00 5.000000e-01 1.992158e-04 203 2.030000e+00 5.000000e-01 2.007295e-04 204 2.040000e+00 5.000000e-01 2.022380e-04 205 2.050000e+00 5.000000e-01 2.037412e-04 206 2.060000e+00 5.000000e-01 2.052392e-04 207 2.070000e+00 5.000000e-01 2.067319e-04 208 2.080000e+00 5.000000e-01 2.082193e-04 209 2.090000e+00 5.000000e-01 2.097015e-04 210 2.100000e+00 5.000000e-01 2.111784e-04 211 2.110000e+00 5.000000e-01 2.126501e-04 212 2.120000e+00 5.000000e-01 2.141165e-04 213 2.130000e+00 5.000000e-01 2.155776e-04 214 2.140000e+00 5.000000e-01 2.170334e-04 215 2.150000e+00 5.000000e-01 2.184840e-04 216 2.160000e+00 5.000000e-01 2.199293e-04 217 2.170000e+00 5.000000e-01 2.213694e-04 218 2.180000e+00 5.000000e-01 2.228042e-04 219 2.190000e+00 5.000000e-01 2.242337e-04 220 2.200000e+00 5.000000e-01 2.256581e-04 221 2.210000e+00 5.000000e-01 2.270771e-04 222 2.220000e+00 5.000000e-01 2.284910e-04 223 2.230000e+00 5.000000e-01 2.298996e-04 224 2.240000e+00 5.000000e-01 2.313030e-04 225 2.250000e+00 5.000000e-01 2.327012e-04 226 2.260000e+00 5.000000e-01 2.340942e-04 227 2.270000e+00 5.000000e-01 2.354820e-04 228 2.280000e+00 5.000000e-01 2.368646e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 229 2.290000e+00 5.000000e-01 2.382421e-04 230 2.300000e+00 5.000000e-01 2.396144e-04 231 2.310000e+00 5.000000e-01 2.409816e-04 232 2.320000e+00 5.000000e-01 2.423437e-04 233 2.330000e+00 5.000000e-01 2.437006e-04 234 2.340000e+00 5.000000e-01 2.450525e-04 235 2.350000e+00 5.000000e-01 2.463992e-04 236 2.360000e+00 5.000000e-01 2.477410e-04 237 2.370000e+00 5.000000e-01 2.490776e-04 238 2.380000e+00 5.000000e-01 2.504093e-04 239 2.390000e+00 5.000000e-01 2.517359e-04 240 2.400000e+00 5.000000e-01 2.530576e-04 241 2.410000e+00 5.000000e-01 2.543742e-04 242 2.420000e+00 5.000000e-01 2.556859e-04 243 2.430000e+00 5.000000e-01 2.569927e-04 244 2.440000e+00 5.000000e-01 2.582946e-04 245 2.450000e+00 5.000000e-01 2.595916e-04 246 2.460000e+00 5.000000e-01 2.608837e-04 247 2.470000e+00 5.000000e-01 2.621710e-04 248 2.480000e+00 5.000000e-01 2.634534e-04 249 2.490000e+00 5.000000e-01 2.647311e-04 250 2.500000e+00 5.000000e-01 2.660039e-04 251 2.510000e+00 5.000000e-01 2.672721e-04 252 2.520000e+00 5.000000e-01 2.685355e-04 253 2.530000e+00 5.000000e-01 2.697942e-04 254 2.540000e+00 5.000000e-01 2.710483e-04 255 2.550000e+00 5.000000e-01 2.722977e-04 256 2.560000e+00 5.000000e-01 2.735425e-04 257 2.570000e+00 5.000000e-01 2.747827e-04 258 2.580000e+00 5.000000e-01 2.760184e-04 259 2.590000e+00 5.000000e-01 2.772496e-04 260 2.600000e+00 5.000000e-01 2.784762e-04 261 2.610000e+00 5.000000e-01 2.796984e-04 262 2.620000e+00 5.000000e-01 2.809162e-04 263 2.630000e+00 5.000000e-01 2.821296e-04 264 2.640000e+00 5.000000e-01 2.833386e-04 265 2.650000e+00 5.000000e-01 2.845434e-04 266 2.660000e+00 5.000000e-01 2.857438e-04 267 2.670000e+00 5.000000e-01 2.869400e-04 268 2.680000e+00 5.000000e-01 2.881319e-04 269 2.690000e+00 5.000000e-01 2.893197e-04 270 2.700000e+00 5.000000e-01 2.905033e-04 271 2.710000e+00 5.000000e-01 2.916829e-04 272 2.720000e+00 5.000000e-01 2.928583e-04 273 2.730000e+00 5.000000e-01 2.940298e-04 274 2.740000e+00 5.000000e-01 2.951972e-04 275 2.750000e+00 5.000000e-01 2.963607e-04 276 2.760000e+00 5.000000e-01 2.975203e-04 277 2.770000e+00 5.000000e-01 2.986761e-04 278 2.780000e+00 5.000000e-01 2.998280e-04 279 2.790000e+00 5.000000e-01 3.009762e-04 280 2.800000e+00 5.000000e-01 3.021206e-04 281 2.810000e+00 5.000000e-01 3.032614e-04 282 2.820000e+00 5.000000e-01 3.043985e-04 283 2.830000e+00 5.000000e-01 3.055320e-04 284 2.840000e+00 5.000000e-01 3.066620e-04 285 2.850000e+00 5.000000e-01 3.077885e-04 286 2.860000e+00 5.000000e-01 3.089115e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 287 2.870000e+00 5.000000e-01 3.100311e-04 288 2.880000e+00 5.000000e-01 3.111474e-04 289 2.890000e+00 5.000000e-01 3.122604e-04 290 2.900000e+00 5.000000e-01 3.133701e-04 291 2.910000e+00 5.000000e-01 3.144766e-04 292 2.920000e+00 5.000000e-01 3.155800e-04 293 2.930000e+00 5.000000e-01 3.166803e-04 294 2.940000e+00 5.000000e-01 3.177775e-04 295 2.950000e+00 5.000000e-01 3.188718e-04 296 2.960000e+00 5.000000e-01 3.199631e-04 297 2.970000e+00 5.000000e-01 3.210516e-04 298 2.980000e+00 5.000000e-01 3.221372e-04 299 2.990000e+00 5.000000e-01 3.232200e-04 300 3.000000e+00 5.000000e-01 3.243001e-04 301 0.000000e+00 1.000000e+00 -5.161596e-35 302 1.000000e-02 1.000000e+00 3.035382e-05 303 2.000000e-02 1.000000e+00 6.014191e-05 304 3.000000e-02 1.000000e+00 8.936619e-05 305 4.000000e-02 1.000000e+00 1.180286e-04 306 5.000000e-02 1.000000e+00 1.461310e-04 307 6.000000e-02 1.000000e+00 1.736754e-04 308 7.000000e-02 1.000000e+00 2.006636e-04 309 8.000000e-02 1.000000e+00 2.270975e-04 310 9.000000e-02 1.000000e+00 2.529791e-04 311 1.000000e-01 1.000000e+00 2.783103e-04 312 1.100000e-01 1.000000e+00 3.030928e-04 313 1.200000e-01 1.000000e+00 3.273287e-04 314 1.300000e-01 1.000000e+00 3.510198e-04 315 1.400000e-01 1.000000e+00 3.741679e-04 316 1.500000e-01 1.000000e+00 3.967749e-04 317 1.600000e-01 1.000000e+00 4.188428e-04 318 1.700000e-01 1.000000e+00 4.403734e-04 319 1.800000e-01 1.000000e+00 4.613686e-04 320 1.900000e-01 1.000000e+00 4.818302e-04 321 2.000000e-01 1.000000e+00 5.017602e-04 322 2.100000e-01 1.000000e+00 5.211604e-04 323 2.200000e-01 1.000000e+00 5.400328e-04 324 2.300000e-01 1.000000e+00 5.583792e-04 325 2.400000e-01 1.000000e+00 5.762015e-04 326 2.500000e-01 1.000000e+00 5.935017e-04 327 2.600000e-01 1.000000e+00 6.102819e-04 328 2.700000e-01 1.000000e+00 6.265438e-04 329 2.800000e-01 1.000000e+00 6.422897e-04 330 2.900000e-01 1.000000e+00 6.575214e-04 331 3.000000e-01 1.000000e+00 6.722413e-04 332 3.100000e-01 1.000000e+00 6.864514e-04 333 3.200000e-01 1.000000e+00 7.001539e-04 334 3.300000e-01 1.000000e+00 7.133514e-04 335 3.400000e-01 1.000000e+00 7.260463e-04 336 3.500000e-01 1.000000e+00 7.382412e-04 337 3.600000e-01 1.000000e+00 7.499389e-04 338 3.700000e-01 1.000000e+00 7.611427e-04 339 3.800000e-01 1.000000e+00 7.718558e-04 340 3.900000e-01 1.000000e+00 7.820821e-04 341 4.000000e-01 1.000000e+00 7.918258e-04 342 4.100000e-01 1.000000e+00 8.010919e-04 343 4.200000e-01 1.000000e+00 8.098858e-04 344 4.300000e-01 1.000000e+00 8.182141e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 345 4.400000e-01 1.000000e+00 8.260843e-04 346 4.500000e-01 1.000000e+00 8.335052e-04 347 4.600000e-01 1.000000e+00 8.404869e-04 348 4.700000e-01 1.000000e+00 8.470415e-04 349 4.800000e-01 1.000000e+00 8.531825e-04 350 4.900000e-01 1.000000e+00 8.589254e-04 351 5.000000e-01 1.000000e+00 8.642875e-04 352 5.100000e-01 1.000000e+00 8.692879e-04 353 5.200000e-01 1.000000e+00 8.739470e-04 354 5.300000e-01 1.000000e+00 8.782866e-04 355 5.400000e-01 1.000000e+00 8.823288e-04 356 5.500000e-01 1.000000e+00 8.860965e-04 357 5.600000e-01 1.000000e+00 8.896119e-04 358 5.700000e-01 1.000000e+00 8.928969e-04 359 5.800000e-01 1.000000e+00 8.959725e-04 360 5.900000e-01 1.000000e+00 8.988582e-04 361 6.000000e-01 1.000000e+00 9.015723e-04 362 6.100000e-01 1.000000e+00 9.041317e-04 363 6.200000e-01 1.000000e+00 9.065517e-04 364 6.300000e-01 1.000000e+00 9.088463e-04 365 6.400000e-01 1.000000e+00 9.110278e-04 366 6.500000e-01 1.000000e+00 9.131076e-04 367 6.600000e-01 1.000000e+00 9.150956e-04 368 6.700000e-01 1.000000e+00 9.170008e-04 369 6.800000e-01 1.000000e+00 9.188312e-04 370 6.900000e-01 1.000000e+00 9.205938e-04 371 7.000000e-01 1.000000e+00 9.222949e-04 372 7.100000e-01 1.000000e+00 9.239402e-04 373 7.200000e-01 1.000000e+00 9.255347e-04 374 7.300000e-01 1.000000e+00 9.270828e-04 375 7.400000e-01 1.000000e+00 9.285886e-04 376 7.500000e-01 1.000000e+00 9.300556e-04 377 7.600000e-01 1.000000e+00 9.314870e-04 378 7.700000e-01 1.000000e+00 9.328858e-04 379 7.800000e-01 1.000000e+00 9.342546e-04 380 7.900000e-01 1.000000e+00 9.355955e-04 381 8.000000e-01 1.000000e+00 9.369109e-04 382 8.100000e-01 1.000000e+00 9.382026e-04 383 8.200000e-01 1.000000e+00 9.394723e-04 384 8.300000e-01 1.000000e+00 9.407215e-04 385 8.400000e-01 1.000000e+00 9.419518e-04 386 8.500000e-01 1.000000e+00 9.431645e-04 387 8.600000e-01 1.000000e+00 9.443606e-04 388 8.700000e-01 1.000000e+00 9.455414e-04 389 8.800000e-01 1.000000e+00 9.467078e-04 390 8.900000e-01 1.000000e+00 9.478607e-04 391 9.000000e-01 1.000000e+00 9.490010e-04 392 9.100000e-01 1.000000e+00 9.501305e-04 393 9.200000e-01 1.000000e+00 9.512496e-04 394 9.300000e-01 1.000000e+00 9.523590e-04 395 9.400000e-01 1.000000e+00 9.534597e-04 396 9.500000e-01 1.000000e+00 9.545524e-04 397 9.600000e-01 1.000000e+00 9.556378e-04 398 9.700000e-01 1.000000e+00 9.567166e-04 399 9.800000e-01 1.000000e+00 9.577897e-04 400 9.900000e-01 1.000000e+00 9.588578e-04 401 1.000000e+00 1.000000e+00 9.599222e-04 402 1.010000e+00 1.000000e+00 9.609844e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 403 1.020000e+00 1.000000e+00 9.620466e-04 404 1.030000e+00 1.000000e+00 9.631129e-04 405 1.040000e+00 1.000000e+00 9.641899e-04 406 1.050000e+00 1.000000e+00 9.652918e-04 407 1.060000e+00 1.000000e+00 9.664537e-04 408 1.070000e+00 1.000000e+00 9.677858e-04 409 1.080000e+00 1.000000e+00 9.697455e-04 410 1.090000e+00 1.000000e+00 9.734428e-04 411 1.100000e+00 1.000000e+00 9.783818e-04 412 1.110000e+00 1.000000e+00 9.835361e-04 413 1.120000e+00 1.000000e+00 9.886429e-04 414 1.130000e+00 1.000000e+00 9.936418e-04 415 1.140000e+00 1.000000e+00 9.985189e-04 416 1.150000e+00 1.000000e+00 1.003274e-03 417 1.160000e+00 1.000000e+00 1.007910e-03 418 1.170000e+00 1.000000e+00 1.012432e-03 419 1.180000e+00 1.000000e+00 1.016848e-03 420 1.190000e+00 1.000000e+00 1.021161e-03 421 1.200000e+00 1.000000e+00 1.025379e-03 422 1.210000e+00 1.000000e+00 1.029506e-03 423 1.220000e+00 1.000000e+00 1.033547e-03 424 1.230000e+00 1.000000e+00 1.037508e-03 425 1.240000e+00 1.000000e+00 1.041394e-03 426 1.250000e+00 1.000000e+00 1.045262e-03 427 1.260000e+00 1.000000e+00 1.049117e-03 428 1.270000e+00 1.000000e+00 1.052944e-03 429 1.280000e+00 1.000000e+00 1.056734e-03 430 1.290000e+00 1.000000e+00 1.060479e-03 431 1.300000e+00 1.000000e+00 1.064174e-03 432 1.310000e+00 1.000000e+00 1.067819e-03 433 1.320000e+00 1.000000e+00 1.071410e-03 434 1.330000e+00 1.000000e+00 1.074947e-03 435 1.340000e+00 1.000000e+00 1.078431e-03 436 1.350000e+00 1.000000e+00 1.081862e-03 437 1.360000e+00 1.000000e+00 1.085241e-03 438 1.370000e+00 1.000000e+00 1.088568e-03 439 1.380000e+00 1.000000e+00 1.091844e-03 440 1.390000e+00 1.000000e+00 1.095072e-03 441 1.400000e+00 1.000000e+00 1.098252e-03 442 1.410000e+00 1.000000e+00 1.101385e-03 443 1.420000e+00 1.000000e+00 1.104474e-03 444 1.430000e+00 1.000000e+00 1.107519e-03 445 1.440000e+00 1.000000e+00 1.110522e-03 446 1.450000e+00 1.000000e+00 1.113484e-03 447 1.460000e+00 1.000000e+00 1.116406e-03 448 1.470000e+00 1.000000e+00 1.119290e-03 449 1.480000e+00 1.000000e+00 1.122138e-03 450 1.490000e+00 1.000000e+00 1.124949e-03 451 1.500000e+00 1.000000e+00 1.127726e-03 452 1.510000e+00 1.000000e+00 1.130470e-03 453 1.520000e+00 1.000000e+00 1.133182e-03 454 1.530000e+00 1.000000e+00 1.135862e-03 455 1.540000e+00 1.000000e+00 1.138513e-03 456 1.550000e+00 1.000000e+00 1.141134e-03 457 1.560000e+00 1.000000e+00 1.143727e-03 458 1.570000e+00 1.000000e+00 1.146294e-03 459 1.580000e+00 1.000000e+00 1.148834e-03 460 1.590000e+00 1.000000e+00 1.151349e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 461 1.600000e+00 1.000000e+00 1.153839e-03 462 1.610000e+00 1.000000e+00 1.156306e-03 463 1.620000e+00 1.000000e+00 1.158750e-03 464 1.630000e+00 1.000000e+00 1.161172e-03 465 1.640000e+00 1.000000e+00 1.163572e-03 466 1.650000e+00 1.000000e+00 1.165952e-03 467 1.660000e+00 1.000000e+00 1.168312e-03 468 1.670000e+00 1.000000e+00 1.170653e-03 469 1.680000e+00 1.000000e+00 1.172974e-03 470 1.690000e+00 1.000000e+00 1.175278e-03 471 1.700000e+00 1.000000e+00 1.177564e-03 472 1.710000e+00 1.000000e+00 1.179832e-03 473 1.720000e+00 1.000000e+00 1.182085e-03 474 1.730000e+00 1.000000e+00 1.184321e-03 475 1.740000e+00 1.000000e+00 1.186542e-03 476 1.750000e+00 1.000000e+00 1.188747e-03 477 1.760000e+00 1.000000e+00 1.190938e-03 478 1.770000e+00 1.000000e+00 1.193115e-03 479 1.780000e+00 1.000000e+00 1.195277e-03 480 1.790000e+00 1.000000e+00 1.197427e-03 481 1.800000e+00 1.000000e+00 1.199563e-03 482 1.810000e+00 1.000000e+00 1.201686e-03 483 1.820000e+00 1.000000e+00 1.203797e-03 484 1.830000e+00 1.000000e+00 1.205896e-03 485 1.840000e+00 1.000000e+00 1.207983e-03 486 1.850000e+00 1.000000e+00 1.210058e-03 487 1.860000e+00 1.000000e+00 1.212123e-03 488 1.870000e+00 1.000000e+00 1.214176e-03 489 1.880000e+00 1.000000e+00 1.216218e-03 490 1.890000e+00 1.000000e+00 1.218250e-03 491 1.900000e+00 1.000000e+00 1.220272e-03 492 1.910000e+00 1.000000e+00 1.222284e-03 493 1.920000e+00 1.000000e+00 1.224286e-03 494 1.930000e+00 1.000000e+00 1.226278e-03 495 1.940000e+00 1.000000e+00 1.228260e-03 496 1.950000e+00 1.000000e+00 1.230234e-03 497 1.960000e+00 1.000000e+00 1.232198e-03 498 1.970000e+00 1.000000e+00 1.234153e-03 499 1.980000e+00 1.000000e+00 1.236100e-03 500 1.990000e+00 1.000000e+00 1.238037e-03 501 2.000000e+00 1.000000e+00 1.239966e-03 502 2.010000e+00 1.000000e+00 1.241887e-03 503 2.020000e+00 1.000000e+00 1.243799e-03 504 2.030000e+00 1.000000e+00 1.245704e-03 505 2.040000e+00 1.000000e+00 1.247599e-03 506 2.050000e+00 1.000000e+00 1.249487e-03 507 2.060000e+00 1.000000e+00 1.251367e-03 508 2.070000e+00 1.000000e+00 1.253239e-03 509 2.080000e+00 1.000000e+00 1.255104e-03 510 2.090000e+00 1.000000e+00 1.256960e-03 511 2.100000e+00 1.000000e+00 1.258809e-03 512 2.110000e+00 1.000000e+00 1.260651e-03 513 2.120000e+00 1.000000e+00 1.262485e-03 514 2.130000e+00 1.000000e+00 1.264311e-03 515 2.140000e+00 1.000000e+00 1.266130e-03 516 2.150000e+00 1.000000e+00 1.267941e-03 517 2.160000e+00 1.000000e+00 1.269746e-03 518 2.170000e+00 1.000000e+00 1.271543e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 519 2.180000e+00 1.000000e+00 1.273332e-03 520 2.190000e+00 1.000000e+00 1.275115e-03 521 2.200000e+00 1.000000e+00 1.276890e-03 522 2.210000e+00 1.000000e+00 1.278658e-03 523 2.220000e+00 1.000000e+00 1.280419e-03 524 2.230000e+00 1.000000e+00 1.282173e-03 525 2.240000e+00 1.000000e+00 1.283920e-03 526 2.250000e+00 1.000000e+00 1.285659e-03 527 2.260000e+00 1.000000e+00 1.287392e-03 528 2.270000e+00 1.000000e+00 1.289117e-03 529 2.280000e+00 1.000000e+00 1.290836e-03 530 2.290000e+00 1.000000e+00 1.292547e-03 531 2.300000e+00 1.000000e+00 1.294252e-03 532 2.310000e+00 1.000000e+00 1.295950e-03 533 2.320000e+00 1.000000e+00 1.297640e-03 534 2.330000e+00 1.000000e+00 1.299324e-03 535 2.340000e+00 1.000000e+00 1.301000e-03 536 2.350000e+00 1.000000e+00 1.302670e-03 537 2.360000e+00 1.000000e+00 1.304333e-03 538 2.370000e+00 1.000000e+00 1.305989e-03 539 2.380000e+00 1.000000e+00 1.307638e-03 540 2.390000e+00 1.000000e+00 1.309280e-03 541 2.400000e+00 1.000000e+00 1.310916e-03 542 2.410000e+00 1.000000e+00 1.312544e-03 543 2.420000e+00 1.000000e+00 1.314166e-03 544 2.430000e+00 1.000000e+00 1.315781e-03 545 2.440000e+00 1.000000e+00 1.317389e-03 546 2.450000e+00 1.000000e+00 1.318990e-03 547 2.460000e+00 1.000000e+00 1.320585e-03 548 2.470000e+00 1.000000e+00 1.322173e-03 549 2.480000e+00 1.000000e+00 1.323754e-03 550 2.490000e+00 1.000000e+00 1.325328e-03 551 2.500000e+00 1.000000e+00 1.326896e-03 552 2.510000e+00 1.000000e+00 1.328457e-03 553 2.520000e+00 1.000000e+00 1.330011e-03 554 2.530000e+00 1.000000e+00 1.331559e-03 555 2.540000e+00 1.000000e+00 1.333101e-03 556 2.550000e+00 1.000000e+00 1.334635e-03 557 2.560000e+00 1.000000e+00 1.336164e-03 558 2.570000e+00 1.000000e+00 1.337685e-03 559 2.580000e+00 1.000000e+00 1.339201e-03 560 2.590000e+00 1.000000e+00 1.340710e-03 561 2.600000e+00 1.000000e+00 1.342212e-03 562 2.610000e+00 1.000000e+00 1.343709e-03 563 2.620000e+00 1.000000e+00 1.345199e-03 564 2.630000e+00 1.000000e+00 1.346683e-03 565 2.640000e+00 1.000000e+00 1.348160e-03 566 2.650000e+00 1.000000e+00 1.349632e-03 567 2.660000e+00 1.000000e+00 1.351097e-03 568 2.670000e+00 1.000000e+00 1.352557e-03 569 2.680000e+00 1.000000e+00 1.354011e-03 570 2.690000e+00 1.000000e+00 1.355458e-03 571 2.700000e+00 1.000000e+00 1.356900e-03 572 2.710000e+00 1.000000e+00 1.358336e-03 573 2.720000e+00 1.000000e+00 1.359767e-03 574 2.730000e+00 1.000000e+00 1.361192e-03 575 2.740000e+00 1.000000e+00 1.362611e-03 576 2.750000e+00 1.000000e+00 1.364025e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 577 2.760000e+00 1.000000e+00 1.365433e-03 578 2.770000e+00 1.000000e+00 1.366836e-03 579 2.780000e+00 1.000000e+00 1.368234e-03 580 2.790000e+00 1.000000e+00 1.369626e-03 581 2.800000e+00 1.000000e+00 1.371014e-03 582 2.810000e+00 1.000000e+00 1.372397e-03 583 2.820000e+00 1.000000e+00 1.373774e-03 584 2.830000e+00 1.000000e+00 1.375147e-03 585 2.840000e+00 1.000000e+00 1.376515e-03 586 2.850000e+00 1.000000e+00 1.377879e-03 587 2.860000e+00 1.000000e+00 1.379238e-03 588 2.870000e+00 1.000000e+00 1.380592e-03 589 2.880000e+00 1.000000e+00 1.381943e-03 590 2.890000e+00 1.000000e+00 1.383289e-03 591 2.900000e+00 1.000000e+00 1.384630e-03 592 2.910000e+00 1.000000e+00 1.385968e-03 593 2.920000e+00 1.000000e+00 1.387302e-03 594 2.930000e+00 1.000000e+00 1.388633e-03 595 2.940000e+00 1.000000e+00 1.389959e-03 596 2.950000e+00 1.000000e+00 1.391282e-03 597 2.960000e+00 1.000000e+00 1.392602e-03 598 2.970000e+00 1.000000e+00 1.393918e-03 599 2.980000e+00 1.000000e+00 1.395232e-03 600 2.990000e+00 1.000000e+00 1.396542e-03 601 3.000000e+00 1.000000e+00 1.397849e-03 602 0.000000e+00 1.500000e+00 -5.161596e-35 603 1.000000e-02 1.500000e+00 4.579468e-05 604 2.000000e-02 1.500000e+00 9.111651e-05 605 3.000000e-02 1.500000e+00 1.359666e-04 606 4.000000e-02 1.500000e+00 1.803462e-04 607 5.000000e-02 1.500000e+00 2.242563e-04 608 6.000000e-02 1.500000e+00 2.676981e-04 609 7.000000e-02 1.500000e+00 3.106727e-04 610 8.000000e-02 1.500000e+00 3.531813e-04 611 9.000000e-02 1.500000e+00 3.952248e-04 612 1.000000e-01 1.500000e+00 4.368045e-04 613 1.100000e-01 1.500000e+00 4.779215e-04 614 1.200000e-01 1.500000e+00 5.185768e-04 615 1.300000e-01 1.500000e+00 5.587716e-04 616 1.400000e-01 1.500000e+00 5.985069e-04 617 1.500000e-01 1.500000e+00 6.377839e-04 618 1.600000e-01 1.500000e+00 6.766036e-04 619 1.700000e-01 1.500000e+00 7.149671e-04 620 1.800000e-01 1.500000e+00 7.528755e-04 621 1.900000e-01 1.500000e+00 7.903298e-04 622 2.000000e-01 1.500000e+00 8.273312e-04 623 2.100000e-01 1.500000e+00 8.638806e-04 624 2.200000e-01 1.500000e+00 8.999792e-04 625 2.300000e-01 1.500000e+00 9.356280e-04 626 2.400000e-01 1.500000e+00 9.708281e-04 627 2.500000e-01 1.500000e+00 1.005580e-03 628 2.600000e-01 1.500000e+00 1.039886e-03 629 2.700000e-01 1.500000e+00 1.073746e-03 630 2.800000e-01 1.500000e+00 1.107162e-03 631 2.900000e-01 1.500000e+00 1.140133e-03 632 3.000000e-01 1.500000e+00 1.172663e-03 633 3.100000e-01 1.500000e+00 1.204750e-03 634 3.200000e-01 1.500000e+00 1.236397e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 635 3.300000e-01 1.500000e+00 1.267605e-03 636 3.400000e-01 1.500000e+00 1.298374e-03 637 3.500000e-01 1.500000e+00 1.328705e-03 638 3.600000e-01 1.500000e+00 1.358599e-03 639 3.700000e-01 1.500000e+00 1.388058e-03 640 3.800000e-01 1.500000e+00 1.417082e-03 641 3.900000e-01 1.500000e+00 1.445672e-03 642 4.000000e-01 1.500000e+00 1.473830e-03 643 4.100000e-01 1.500000e+00 1.501555e-03 644 4.200000e-01 1.500000e+00 1.528849e-03 645 4.300000e-01 1.500000e+00 1.555713e-03 646 4.400000e-01 1.500000e+00 1.582148e-03 647 4.500000e-01 1.500000e+00 1.608154e-03 648 4.600000e-01 1.500000e+00 1.633732e-03 649 4.700000e-01 1.500000e+00 1.658884e-03 650 4.800000e-01 1.500000e+00 1.683609e-03 651 4.900000e-01 1.500000e+00 1.707910e-03 652 5.000000e-01 1.500000e+00 1.731785e-03 653 5.100000e-01 1.500000e+00 1.755237e-03 654 5.200000e-01 1.500000e+00 1.778266e-03 655 5.300000e-01 1.500000e+00 1.800872e-03 656 5.400000e-01 1.500000e+00 1.823056e-03 657 5.500000e-01 1.500000e+00 1.844819e-03 658 5.600000e-01 1.500000e+00 1.866161e-03 659 5.700000e-01 1.500000e+00 1.887083e-03 660 5.800000e-01 1.500000e+00 1.907584e-03 661 5.900000e-01 1.500000e+00 1.927666e-03 662 6.000000e-01 1.500000e+00 1.947329e-03 663 6.100000e-01 1.500000e+00 1.966572e-03 664 6.200000e-01 1.500000e+00 1.985397e-03 665 6.300000e-01 1.500000e+00 2.003802e-03 666 6.400000e-01 1.500000e+00 2.021788e-03 667 6.500000e-01 1.500000e+00 2.039355e-03 668 6.600000e-01 1.500000e+00 2.056503e-03 669 6.700000e-01 1.500000e+00 2.073230e-03 670 6.800000e-01 1.500000e+00 2.089537e-03 671 6.900000e-01 1.500000e+00 2.105423e-03 672 7.000000e-01 1.500000e+00 2.120886e-03 673 7.100000e-01 1.500000e+00 2.135927e-03 674 7.200000e-01 1.500000e+00 2.150543e-03 675 7.300000e-01 1.500000e+00 2.164734e-03 676 7.400000e-01 1.500000e+00 2.178498e-03 677 7.500000e-01 1.500000e+00 2.191834e-03 678 7.600000e-01 1.500000e+00 2.204740e-03 679 7.700000e-01 1.500000e+00 2.217215e-03 680 7.800000e-01 1.500000e+00 2.229259e-03 681 7.900000e-01 1.500000e+00 2.240869e-03 682 8.000000e-01 1.500000e+00 2.252045e-03 683 8.100000e-01 1.500000e+00 2.262787e-03 684 8.200000e-01 1.500000e+00 2.273096e-03 685 8.300000e-01 1.500000e+00 2.282973e-03 686 8.400000e-01 1.500000e+00 2.292421e-03 687 8.500000e-01 1.500000e+00 2.301443e-03 688 8.600000e-01 1.500000e+00 2.310044e-03 689 8.700000e-01 1.500000e+00 2.318232e-03 690 8.800000e-01 1.500000e+00 2.326015e-03 691 8.900000e-01 1.500000e+00 2.333403e-03 692 9.000000e-01 1.500000e+00 2.340407e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 693 9.100000e-01 1.500000e+00 2.347041e-03 694 9.200000e-01 1.500000e+00 2.353320e-03 695 9.300000e-01 1.500000e+00 2.359259e-03 696 9.400000e-01 1.500000e+00 2.364875e-03 697 9.500000e-01 1.500000e+00 2.370185e-03 698 9.600000e-01 1.500000e+00 2.375207e-03 699 9.700000e-01 1.500000e+00 2.379958e-03 700 9.800000e-01 1.500000e+00 2.384455e-03 701 9.900000e-01 1.500000e+00 2.388716e-03 702 1.000000e+00 1.500000e+00 2.392756e-03 703 1.010000e+00 1.500000e+00 2.396592e-03 704 1.020000e+00 1.500000e+00 2.400238e-03 705 1.030000e+00 1.500000e+00 2.403708e-03 706 1.040000e+00 1.500000e+00 2.407016e-03 707 1.050000e+00 1.500000e+00 2.410173e-03 708 1.060000e+00 1.500000e+00 2.413191e-03 709 1.070000e+00 1.500000e+00 2.416080e-03 710 1.080000e+00 1.500000e+00 2.418851e-03 711 1.090000e+00 1.500000e+00 2.421511e-03 712 1.100000e+00 1.500000e+00 2.424070e-03 713 1.110000e+00 1.500000e+00 2.426537e-03 714 1.120000e+00 1.500000e+00 2.428918e-03 715 1.130000e+00 1.500000e+00 2.431220e-03 716 1.140000e+00 1.500000e+00 2.433449e-03 717 1.150000e+00 1.500000e+00 2.435610e-03 718 1.160000e+00 1.500000e+00 2.437708e-03 719 1.170000e+00 1.500000e+00 2.439749e-03 720 1.180000e+00 1.500000e+00 2.441738e-03 721 1.190000e+00 1.500000e+00 2.443678e-03 722 1.200000e+00 1.500000e+00 2.445575e-03 723 1.210000e+00 1.500000e+00 2.447435e-03 724 1.220000e+00 1.500000e+00 2.449265e-03 725 1.230000e+00 1.500000e+00 2.451077e-03 726 1.240000e+00 1.500000e+00 2.452889e-03 727 1.250000e+00 1.500000e+00 2.454747e-03 728 1.260000e+00 1.500000e+00 2.456784e-03 729 1.270000e+00 1.500000e+00 2.459531e-03 730 1.280000e+00 1.500000e+00 2.464487e-03 731 1.290000e+00 1.500000e+00 2.471352e-03 732 1.300000e+00 1.500000e+00 2.478654e-03 733 1.310000e+00 1.500000e+00 2.485967e-03 734 1.320000e+00 1.500000e+00 2.493192e-03 735 1.330000e+00 1.500000e+00 2.500301e-03 736 1.340000e+00 1.500000e+00 2.507287e-03 737 1.350000e+00 1.500000e+00 2.514149e-03 738 1.360000e+00 1.500000e+00 2.520891e-03 739 1.370000e+00 1.500000e+00 2.527516e-03 740 1.380000e+00 1.500000e+00 2.534028e-03 741 1.390000e+00 1.500000e+00 2.540432e-03 742 1.400000e+00 1.500000e+00 2.546732e-03 743 1.410000e+00 1.500000e+00 2.552931e-03 744 1.420000e+00 1.500000e+00 2.559034e-03 745 1.430000e+00 1.500000e+00 2.565051e-03 746 1.440000e+00 1.500000e+00 2.571058e-03 747 1.450000e+00 1.500000e+00 2.577049e-03 748 1.460000e+00 1.500000e+00 2.583003e-03 749 1.470000e+00 1.500000e+00 2.588905e-03 750 1.480000e+00 1.500000e+00 2.594746e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 751 1.490000e+00 1.500000e+00 2.600517e-03 752 1.500000e+00 1.500000e+00 2.606215e-03 753 1.510000e+00 1.500000e+00 2.611836e-03 754 1.520000e+00 1.500000e+00 2.617379e-03 755 1.530000e+00 1.500000e+00 2.622842e-03 756 1.540000e+00 1.500000e+00 2.628227e-03 757 1.550000e+00 1.500000e+00 2.633532e-03 758 1.560000e+00 1.500000e+00 2.638759e-03 759 1.570000e+00 1.500000e+00 2.643907e-03 760 1.580000e+00 1.500000e+00 2.648980e-03 761 1.590000e+00 1.500000e+00 2.653976e-03 762 1.600000e+00 1.500000e+00 2.658899e-03 763 1.610000e+00 1.500000e+00 2.663749e-03 764 1.620000e+00 1.500000e+00 2.668527e-03 765 1.630000e+00 1.500000e+00 2.673235e-03 766 1.640000e+00 1.500000e+00 2.677875e-03 767 1.650000e+00 1.500000e+00 2.682448e-03 768 1.660000e+00 1.500000e+00 2.686955e-03 769 1.670000e+00 1.500000e+00 2.691399e-03 770 1.680000e+00 1.500000e+00 2.695779e-03 771 1.690000e+00 1.500000e+00 2.700098e-03 772 1.700000e+00 1.500000e+00 2.704357e-03 773 1.710000e+00 1.500000e+00 2.708558e-03 774 1.720000e+00 1.500000e+00 2.712701e-03 775 1.730000e+00 1.500000e+00 2.716788e-03 776 1.740000e+00 1.500000e+00 2.720821e-03 777 1.750000e+00 1.500000e+00 2.724800e-03 778 1.760000e+00 1.500000e+00 2.728727e-03 779 1.770000e+00 1.500000e+00 2.732603e-03 780 1.780000e+00 1.500000e+00 2.736428e-03 781 1.790000e+00 1.500000e+00 2.740205e-03 782 1.800000e+00 1.500000e+00 2.743934e-03 783 1.810000e+00 1.500000e+00 2.747616e-03 784 1.820000e+00 1.500000e+00 2.751253e-03 785 1.830000e+00 1.500000e+00 2.754845e-03 786 1.840000e+00 1.500000e+00 2.758393e-03 787 1.850000e+00 1.500000e+00 2.761898e-03 788 1.860000e+00 1.500000e+00 2.765361e-03 789 1.870000e+00 1.500000e+00 2.768783e-03 790 1.880000e+00 1.500000e+00 2.772165e-03 791 1.890000e+00 1.500000e+00 2.775508e-03 792 1.900000e+00 1.500000e+00 2.778812e-03 793 1.910000e+00 1.500000e+00 2.782078e-03 794 1.920000e+00 1.500000e+00 2.785307e-03 795 1.930000e+00 1.500000e+00 2.788500e-03 796 1.940000e+00 1.500000e+00 2.791658e-03 797 1.950000e+00 1.500000e+00 2.794780e-03 798 1.960000e+00 1.500000e+00 2.797868e-03 799 1.970000e+00 1.500000e+00 2.800923e-03 800 1.980000e+00 1.500000e+00 2.803945e-03 801 1.990000e+00 1.500000e+00 2.806935e-03 802 2.000000e+00 1.500000e+00 2.809893e-03 803 2.010000e+00 1.500000e+00 2.812819e-03 804 2.020000e+00 1.500000e+00 2.815716e-03 805 2.030000e+00 1.500000e+00 2.818582e-03 806 2.040000e+00 1.500000e+00 2.821419e-03 807 2.050000e+00 1.500000e+00 2.824226e-03 808 2.060000e+00 1.500000e+00 2.827006e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 809 2.070000e+00 1.500000e+00 2.829757e-03 810 2.080000e+00 1.500000e+00 2.832481e-03 811 2.090000e+00 1.500000e+00 2.835178e-03 812 2.100000e+00 1.500000e+00 2.837849e-03 813 2.110000e+00 1.500000e+00 2.840493e-03 814 2.120000e+00 1.500000e+00 2.843112e-03 815 2.130000e+00 1.500000e+00 2.845705e-03 816 2.140000e+00 1.500000e+00 2.848273e-03 817 2.150000e+00 1.500000e+00 2.850817e-03 818 2.160000e+00 1.500000e+00 2.853336e-03 819 2.170000e+00 1.500000e+00 2.855832e-03 820 2.180000e+00 1.500000e+00 2.858305e-03 821 2.190000e+00 1.500000e+00 2.860754e-03 822 2.200000e+00 1.500000e+00 2.863180e-03 823 2.210000e+00 1.500000e+00 2.865584e-03 824 2.220000e+00 1.500000e+00 2.867966e-03 825 2.230000e+00 1.500000e+00 2.870326e-03 826 2.240000e+00 1.500000e+00 2.872665e-03 827 2.250000e+00 1.500000e+00 2.874982e-03 828 2.260000e+00 1.500000e+00 2.877278e-03 829 2.270000e+00 1.500000e+00 2.879553e-03 830 2.280000e+00 1.500000e+00 2.881808e-03 831 2.290000e+00 1.500000e+00 2.884043e-03 832 2.300000e+00 1.500000e+00 2.886258e-03 833 2.310000e+00 1.500000e+00 2.888453e-03 834 2.320000e+00 1.500000e+00 2.890629e-03 835 2.330000e+00 1.500000e+00 2.892785e-03 836 2.340000e+00 1.500000e+00 2.894923e-03 837 2.350000e+00 1.500000e+00 2.897041e-03 838 2.360000e+00 1.500000e+00 2.899141e-03 839 2.370000e+00 1.500000e+00 2.901223e-03 840 2.380000e+00 1.500000e+00 2.903286e-03 841 2.390000e+00 1.500000e+00 2.905331e-03 842 2.400000e+00 1.500000e+00 2.907359e-03 843 2.410000e+00 1.500000e+00 2.909369e-03 844 2.420000e+00 1.500000e+00 2.911361e-03 845 2.430000e+00 1.500000e+00 2.913337e-03 846 2.440000e+00 1.500000e+00 2.915295e-03 847 2.450000e+00 1.500000e+00 2.917236e-03 848 2.460000e+00 1.500000e+00 2.919161e-03 849 2.470000e+00 1.500000e+00 2.921069e-03 850 2.480000e+00 1.500000e+00 2.922960e-03 851 2.490000e+00 1.500000e+00 2.924836e-03 852 2.500000e+00 1.500000e+00 2.926695e-03 853 2.510000e+00 1.500000e+00 2.928538e-03 854 2.520000e+00 1.500000e+00 2.930366e-03 855 2.530000e+00 1.500000e+00 2.932178e-03 856 2.540000e+00 1.500000e+00 2.933975e-03 857 2.550000e+00 1.500000e+00 2.935756e-03 858 2.560000e+00 1.500000e+00 2.937522e-03 859 2.570000e+00 1.500000e+00 2.939273e-03 860 2.580000e+00 1.500000e+00 2.941009e-03 861 2.590000e+00 1.500000e+00 2.942731e-03 862 2.600000e+00 1.500000e+00 2.944437e-03 863 2.610000e+00 1.500000e+00 2.946130e-03 864 2.620000e+00 1.500000e+00 2.947808e-03 865 2.630000e+00 1.500000e+00 2.949472e-03 866 2.640000e+00 1.500000e+00 2.951123e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 867 2.650000e+00 1.500000e+00 2.952759e-03 868 2.660000e+00 1.500000e+00 2.954381e-03 869 2.670000e+00 1.500000e+00 2.955991e-03 870 2.680000e+00 1.500000e+00 2.957586e-03 871 2.690000e+00 1.500000e+00 2.959169e-03 872 2.700000e+00 1.500000e+00 2.960738e-03 873 2.710000e+00 1.500000e+00 2.962295e-03 874 2.720000e+00 1.500000e+00 2.963839e-03 875 2.730000e+00 1.500000e+00 2.965370e-03 876 2.740000e+00 1.500000e+00 2.966889e-03 877 2.750000e+00 1.500000e+00 2.968395e-03 878 2.760000e+00 1.500000e+00 2.969890e-03 879 2.770000e+00 1.500000e+00 2.971372e-03 880 2.780000e+00 1.500000e+00 2.972843e-03 881 2.790000e+00 1.500000e+00 2.974302e-03 882 2.800000e+00 1.500000e+00 2.975750e-03 883 2.810000e+00 1.500000e+00 2.977186e-03 884 2.820000e+00 1.500000e+00 2.978612e-03 885 2.830000e+00 1.500000e+00 2.980026e-03 886 2.840000e+00 1.500000e+00 2.981430e-03 887 2.850000e+00 1.500000e+00 2.982823e-03 888 2.860000e+00 1.500000e+00 2.984206e-03 889 2.870000e+00 1.500000e+00 2.985579e-03 890 2.880000e+00 1.500000e+00 2.986942e-03 891 2.890000e+00 1.500000e+00 2.988295e-03 892 2.900000e+00 1.500000e+00 2.989638e-03 893 2.910000e+00 1.500000e+00 2.990972e-03 894 2.920000e+00 1.500000e+00 2.992297e-03 895 2.930000e+00 1.500000e+00 2.993614e-03 896 2.940000e+00 1.500000e+00 2.994921e-03 897 2.950000e+00 1.500000e+00 2.996220e-03 898 2.960000e+00 1.500000e+00 2.997510e-03 899 2.970000e+00 1.500000e+00 2.998793e-03 900 2.980000e+00 1.500000e+00 3.000068e-03 901 2.990000e+00 1.500000e+00 3.001335e-03 902 3.000000e+00 1.500000e+00 3.002594e-03 903 0.000000e+00 2.000000e+00 -5.161596e-35 904 1.000000e-02 2.000000e+00 5.447069e-05 905 2.000000e-02 2.000000e+00 1.085482e-04 906 3.000000e-02 2.000000e+00 1.622332e-04 907 4.000000e-02 2.000000e+00 2.155265e-04 908 5.000000e-02 2.000000e+00 2.684288e-04 909 6.000000e-02 2.000000e+00 3.209408e-04 910 7.000000e-02 2.000000e+00 3.730632e-04 911 8.000000e-02 2.000000e+00 4.247969e-04 912 9.000000e-02 2.000000e+00 4.761425e-04 913 1.000000e-01 2.000000e+00 5.271007e-04 914 1.100000e-01 2.000000e+00 5.776722e-04 915 1.200000e-01 2.000000e+00 6.278579e-04 916 1.300000e-01 2.000000e+00 6.776583e-04 917 1.400000e-01 2.000000e+00 7.270742e-04 918 1.500000e-01 2.000000e+00 7.761064e-04 919 1.600000e-01 2.000000e+00 8.247555e-04 920 1.700000e-01 2.000000e+00 8.730222e-04 921 1.800000e-01 2.000000e+00 9.209073e-04 922 1.900000e-01 2.000000e+00 9.684115e-04 923 2.000000e-01 2.000000e+00 1.015535e-03 924 2.100000e-01 2.000000e+00 1.062280e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 925 2.200000e-01 2.000000e+00 1.108645e-03 926 2.300000e-01 2.000000e+00 1.154633e-03 927 2.400000e-01 2.000000e+00 1.200243e-03 928 2.500000e-01 2.000000e+00 1.245476e-03 929 2.600000e-01 2.000000e+00 1.290333e-03 930 2.700000e-01 2.000000e+00 1.334815e-03 931 2.800000e-01 2.000000e+00 1.378922e-03 932 2.900000e-01 2.000000e+00 1.422655e-03 933 3.000000e-01 2.000000e+00 1.466014e-03 934 3.100000e-01 2.000000e+00 1.509002e-03 935 3.200000e-01 2.000000e+00 1.551617e-03 936 3.300000e-01 2.000000e+00 1.593860e-03 937 3.400000e-01 2.000000e+00 1.635733e-03 938 3.500000e-01 2.000000e+00 1.677236e-03 939 3.600000e-01 2.000000e+00 1.718370e-03 940 3.700000e-01 2.000000e+00 1.759135e-03 941 3.800000e-01 2.000000e+00 1.799532e-03 942 3.900000e-01 2.000000e+00 1.839562e-03 943 4.000000e-01 2.000000e+00 1.879225e-03 944 4.100000e-01 2.000000e+00 1.918522e-03 945 4.200000e-01 2.000000e+00 1.957454e-03 946 4.300000e-01 2.000000e+00 1.996021e-03 947 4.400000e-01 2.000000e+00 2.034223e-03 948 4.500000e-01 2.000000e+00 2.072062e-03 949 4.600000e-01 2.000000e+00 2.109539e-03 950 4.700000e-01 2.000000e+00 2.146653e-03 951 4.800000e-01 2.000000e+00 2.183405e-03 952 4.900000e-01 2.000000e+00 2.219796e-03 953 5.000000e-01 2.000000e+00 2.255827e-03 954 5.100000e-01 2.000000e+00 2.291498e-03 955 5.200000e-01 2.000000e+00 2.326810e-03 956 5.300000e-01 2.000000e+00 2.361763e-03 957 5.400000e-01 2.000000e+00 2.396358e-03 958 5.500000e-01 2.000000e+00 2.430596e-03 959 5.600000e-01 2.000000e+00 2.464477e-03 960 5.700000e-01 2.000000e+00 2.498001e-03 961 5.800000e-01 2.000000e+00 2.531170e-03 962 5.900000e-01 2.000000e+00 2.563984e-03 963 6.000000e-01 2.000000e+00 2.596442e-03 964 6.100000e-01 2.000000e+00 2.628547e-03 965 6.200000e-01 2.000000e+00 2.660298e-03 966 6.300000e-01 2.000000e+00 2.691696e-03 967 6.400000e-01 2.000000e+00 2.722741e-03 968 6.500000e-01 2.000000e+00 2.753435e-03 969 6.600000e-01 2.000000e+00 2.783776e-03 970 6.700000e-01 2.000000e+00 2.813767e-03 971 6.800000e-01 2.000000e+00 2.843406e-03 972 6.900000e-01 2.000000e+00 2.872696e-03 973 7.000000e-01 2.000000e+00 2.901635e-03 974 7.100000e-01 2.000000e+00 2.930225e-03 975 7.200000e-01 2.000000e+00 2.958466e-03 976 7.300000e-01 2.000000e+00 2.986358e-03 977 7.400000e-01 2.000000e+00 3.013902e-03 978 7.500000e-01 2.000000e+00 3.041097e-03 979 7.600000e-01 2.000000e+00 3.067945e-03 980 7.700000e-01 2.000000e+00 3.094445e-03 981 7.800000e-01 2.000000e+00 3.120598e-03 982 7.900000e-01 2.000000e+00 3.146404e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 983 8.000000e-01 2.000000e+00 3.171862e-03 984 8.100000e-01 2.000000e+00 3.196974e-03 985 8.200000e-01 2.000000e+00 3.221739e-03 986 8.300000e-01 2.000000e+00 3.246156e-03 987 8.400000e-01 2.000000e+00 3.270227e-03 988 8.500000e-01 2.000000e+00 3.293951e-03 989 8.600000e-01 2.000000e+00 3.317328e-03 990 8.700000e-01 2.000000e+00 3.340357e-03 991 8.800000e-01 2.000000e+00 3.363039e-03 992 8.900000e-01 2.000000e+00 3.385372e-03 993 9.000000e-01 2.000000e+00 3.407357e-03 994 9.100000e-01 2.000000e+00 3.428993e-03 995 9.200000e-01 2.000000e+00 3.450278e-03 996 9.300000e-01 2.000000e+00 3.471213e-03 997 9.400000e-01 2.000000e+00 3.491796e-03 998 9.500000e-01 2.000000e+00 3.512027e-03 999 9.600000e-01 2.000000e+00 3.531903e-03 1000 9.700000e-01 2.000000e+00 3.551424e-03 1001 9.800000e-01 2.000000e+00 3.570588e-03 1002 9.900000e-01 2.000000e+00 3.589394e-03 1003 1.000000e+00 2.000000e+00 3.607838e-03 1004 1.010000e+00 2.000000e+00 3.625921e-03 1005 1.020000e+00 2.000000e+00 3.643637e-03 1006 1.030000e+00 2.000000e+00 3.660987e-03 1007 1.040000e+00 2.000000e+00 3.677966e-03 1008 1.050000e+00 2.000000e+00 3.694571e-03 1009 1.060000e+00 2.000000e+00 3.710799e-03 1010 1.070000e+00 2.000000e+00 3.726648e-03 1011 1.080000e+00 2.000000e+00 3.742112e-03 1012 1.090000e+00 2.000000e+00 3.757189e-03 1013 1.100000e+00 2.000000e+00 3.771875e-03 1014 1.110000e+00 2.000000e+00 3.786165e-03 1015 1.120000e+00 2.000000e+00 3.800056e-03 1016 1.130000e+00 2.000000e+00 3.813544e-03 1017 1.140000e+00 2.000000e+00 3.826625e-03 1018 1.150000e+00 2.000000e+00 3.839296e-03 1019 1.160000e+00 2.000000e+00 3.851554e-03 1020 1.170000e+00 2.000000e+00 3.863397e-03 1021 1.180000e+00 2.000000e+00 3.874824e-03 1022 1.190000e+00 2.000000e+00 3.885834e-03 1023 1.200000e+00 2.000000e+00 3.896427e-03 1024 1.210000e+00 2.000000e+00 3.906606e-03 1025 1.220000e+00 2.000000e+00 3.916373e-03 1026 1.230000e+00 2.000000e+00 3.925734e-03 1027 1.240000e+00 2.000000e+00 3.934693e-03 1028 1.250000e+00 2.000000e+00 3.943259e-03 1029 1.260000e+00 2.000000e+00 3.951441e-03 1030 1.270000e+00 2.000000e+00 3.959249e-03 1031 1.280000e+00 2.000000e+00 3.966693e-03 1032 1.290000e+00 2.000000e+00 3.973788e-03 1033 1.300000e+00 2.000000e+00 3.980545e-03 1034 1.310000e+00 2.000000e+00 3.986981e-03 1035 1.320000e+00 2.000000e+00 3.993113e-03 1036 1.330000e+00 2.000000e+00 3.998952e-03 1037 1.340000e+00 2.000000e+00 4.004515e-03 1038 1.350000e+00 2.000000e+00 4.009816e-03 1039 1.360000e+00 2.000000e+00 4.014871e-03 1040 1.370000e+00 2.000000e+00 4.019695e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1041 1.380000e+00 2.000000e+00 4.024302e-03 1042 1.390000e+00 2.000000e+00 4.028706e-03 1043 1.400000e+00 2.000000e+00 4.032923e-03 1044 1.410000e+00 2.000000e+00 4.036968e-03 1045 1.420000e+00 2.000000e+00 4.040857e-03 1046 1.430000e+00 2.000000e+00 4.044613e-03 1047 1.440000e+00 2.000000e+00 4.048267e-03 1048 1.450000e+00 2.000000e+00 4.051884e-03 1049 1.460000e+00 2.000000e+00 4.055647e-03 1050 1.470000e+00 2.000000e+00 4.060277e-03 1051 1.480000e+00 2.000000e+00 4.067422e-03 1052 1.490000e+00 2.000000e+00 4.076364e-03 1053 1.500000e+00 2.000000e+00 4.085669e-03 1054 1.510000e+00 2.000000e+00 4.094952e-03 1055 1.520000e+00 2.000000e+00 4.104118e-03 1056 1.530000e+00 2.000000e+00 4.113142e-03 1057 1.540000e+00 2.000000e+00 4.122017e-03 1058 1.550000e+00 2.000000e+00 4.130743e-03 1059 1.560000e+00 2.000000e+00 4.139324e-03 1060 1.570000e+00 2.000000e+00 4.147764e-03 1061 1.580000e+00 2.000000e+00 4.156070e-03 1062 1.590000e+00 2.000000e+00 4.164244e-03 1063 1.600000e+00 2.000000e+00 4.172293e-03 1064 1.610000e+00 2.000000e+00 4.180221e-03 1065 1.620000e+00 2.000000e+00 4.188032e-03 1066 1.630000e+00 2.000000e+00 4.195749e-03 1067 1.640000e+00 2.000000e+00 4.203454e-03 1068 1.650000e+00 2.000000e+00 4.211131e-03 1069 1.660000e+00 2.000000e+00 4.218755e-03 1070 1.670000e+00 2.000000e+00 4.226310e-03 1071 1.680000e+00 2.000000e+00 4.233785e-03 1072 1.690000e+00 2.000000e+00 4.241173e-03 1073 1.700000e+00 2.000000e+00 4.248469e-03 1074 1.710000e+00 2.000000e+00 4.255669e-03 1075 1.720000e+00 2.000000e+00 4.262772e-03 1076 1.730000e+00 2.000000e+00 4.269776e-03 1077 1.740000e+00 2.000000e+00 4.276683e-03 1078 1.750000e+00 2.000000e+00 4.283491e-03 1079 1.760000e+00 2.000000e+00 4.290202e-03 1080 1.770000e+00 2.000000e+00 4.296816e-03 1081 1.780000e+00 2.000000e+00 4.303336e-03 1082 1.790000e+00 2.000000e+00 4.309761e-03 1083 1.800000e+00 2.000000e+00 4.316095e-03 1084 1.810000e+00 2.000000e+00 4.322337e-03 1085 1.820000e+00 2.000000e+00 4.328491e-03 1086 1.830000e+00 2.000000e+00 4.334557e-03 1087 1.840000e+00 2.000000e+00 4.340537e-03 1088 1.850000e+00 2.000000e+00 4.346434e-03 1089 1.860000e+00 2.000000e+00 4.352248e-03 1090 1.870000e+00 2.000000e+00 4.357981e-03 1091 1.880000e+00 2.000000e+00 4.363635e-03 1092 1.890000e+00 2.000000e+00 4.369212e-03 1093 1.900000e+00 2.000000e+00 4.374713e-03 1094 1.910000e+00 2.000000e+00 4.380140e-03 1095 1.920000e+00 2.000000e+00 4.385494e-03 1096 1.930000e+00 2.000000e+00 4.390777e-03 1097 1.940000e+00 2.000000e+00 4.395991e-03 1098 1.950000e+00 2.000000e+00 4.401136e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1099 1.960000e+00 2.000000e+00 4.406214e-03 1100 1.970000e+00 2.000000e+00 4.411227e-03 1101 1.980000e+00 2.000000e+00 4.416176e-03 1102 1.990000e+00 2.000000e+00 4.421062e-03 1103 2.000000e+00 2.000000e+00 4.425886e-03 1104 2.010000e+00 2.000000e+00 4.430651e-03 1105 2.020000e+00 2.000000e+00 4.435356e-03 1106 2.030000e+00 2.000000e+00 4.440003e-03 1107 2.040000e+00 2.000000e+00 4.444594e-03 1108 2.050000e+00 2.000000e+00 4.449129e-03 1109 2.060000e+00 2.000000e+00 4.453609e-03 1110 2.070000e+00 2.000000e+00 4.458036e-03 1111 2.080000e+00 2.000000e+00 4.462411e-03 1112 2.090000e+00 2.000000e+00 4.466734e-03 1113 2.100000e+00 2.000000e+00 4.471007e-03 1114 2.110000e+00 2.000000e+00 4.475231e-03 1115 2.120000e+00 2.000000e+00 4.479405e-03 1116 2.130000e+00 2.000000e+00 4.483533e-03 1117 2.140000e+00 2.000000e+00 4.487613e-03 1118 2.150000e+00 2.000000e+00 4.491648e-03 1119 2.160000e+00 2.000000e+00 4.495637e-03 1120 2.170000e+00 2.000000e+00 4.499583e-03 1121 2.180000e+00 2.000000e+00 4.503484e-03 1122 2.190000e+00 2.000000e+00 4.507343e-03 1123 2.200000e+00 2.000000e+00 4.511160e-03 1124 2.210000e+00 2.000000e+00 4.514936e-03 1125 2.220000e+00 2.000000e+00 4.518671e-03 1126 2.230000e+00 2.000000e+00 4.522367e-03 1127 2.240000e+00 2.000000e+00 4.526023e-03 1128 2.250000e+00 2.000000e+00 4.529640e-03 1129 2.260000e+00 2.000000e+00 4.533220e-03 1130 2.270000e+00 2.000000e+00 4.536762e-03 1131 2.280000e+00 2.000000e+00 4.540267e-03 1132 2.290000e+00 2.000000e+00 4.543737e-03 1133 2.300000e+00 2.000000e+00 4.547170e-03 1134 2.310000e+00 2.000000e+00 4.550569e-03 1135 2.320000e+00 2.000000e+00 4.553933e-03 1136 2.330000e+00 2.000000e+00 4.557262e-03 1137 2.340000e+00 2.000000e+00 4.560559e-03 1138 2.350000e+00 2.000000e+00 4.563822e-03 1139 2.360000e+00 2.000000e+00 4.567053e-03 1140 2.370000e+00 2.000000e+00 4.570251e-03 1141 2.380000e+00 2.000000e+00 4.573418e-03 1142 2.390000e+00 2.000000e+00 4.576553e-03 1143 2.400000e+00 2.000000e+00 4.579658e-03 1144 2.410000e+00 2.000000e+00 4.582732e-03 1145 2.420000e+00 2.000000e+00 4.585776e-03 1146 2.430000e+00 2.000000e+00 4.588790e-03 1147 2.440000e+00 2.000000e+00 4.591776e-03 1148 2.450000e+00 2.000000e+00 4.594732e-03 1149 2.460000e+00 2.000000e+00 4.597659e-03 1150 2.470000e+00 2.000000e+00 4.600559e-03 1151 2.480000e+00 2.000000e+00 4.603430e-03 1152 2.490000e+00 2.000000e+00 4.606274e-03 1153 2.500000e+00 2.000000e+00 4.609091e-03 1154 2.510000e+00 2.000000e+00 4.611881e-03 1155 2.520000e+00 2.000000e+00 4.614644e-03 1156 2.530000e+00 2.000000e+00 4.617380e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1157 2.540000e+00 2.000000e+00 4.620091e-03 1158 2.550000e+00 2.000000e+00 4.622776e-03 1159 2.560000e+00 2.000000e+00 4.625435e-03 1160 2.570000e+00 2.000000e+00 4.628070e-03 1161 2.580000e+00 2.000000e+00 4.630679e-03 1162 2.590000e+00 2.000000e+00 4.633263e-03 1163 2.600000e+00 2.000000e+00 4.635823e-03 1164 2.610000e+00 2.000000e+00 4.638359e-03 1165 2.620000e+00 2.000000e+00 4.640871e-03 1166 2.630000e+00 2.000000e+00 4.643359e-03 1167 2.640000e+00 2.000000e+00 4.645824e-03 1168 2.650000e+00 2.000000e+00 4.648266e-03 1169 2.660000e+00 2.000000e+00 4.650684e-03 1170 2.670000e+00 2.000000e+00 4.653080e-03 1171 2.680000e+00 2.000000e+00 4.655453e-03 1172 2.690000e+00 2.000000e+00 4.657803e-03 1173 2.700000e+00 2.000000e+00 4.660132e-03 1174 2.710000e+00 2.000000e+00 4.662439e-03 1175 2.720000e+00 2.000000e+00 4.664723e-03 1176 2.730000e+00 2.000000e+00 4.666987e-03 1177 2.740000e+00 2.000000e+00 4.669229e-03 1178 2.750000e+00 2.000000e+00 4.671450e-03 1179 2.760000e+00 2.000000e+00 4.673650e-03 1180 2.770000e+00 2.000000e+00 4.675830e-03 1181 2.780000e+00 2.000000e+00 4.677989e-03 1182 2.790000e+00 2.000000e+00 4.680128e-03 1183 2.800000e+00 2.000000e+00 4.682247e-03 1184 2.810000e+00 2.000000e+00 4.684346e-03 1185 2.820000e+00 2.000000e+00 4.686426e-03 1186 2.830000e+00 2.000000e+00 4.688486e-03 1187 2.840000e+00 2.000000e+00 4.690527e-03 1188 2.850000e+00 2.000000e+00 4.692549e-03 1189 2.860000e+00 2.000000e+00 4.694552e-03 1190 2.870000e+00 2.000000e+00 4.696537e-03 1191 2.880000e+00 2.000000e+00 4.698504e-03 1192 2.890000e+00 2.000000e+00 4.700452e-03 1193 2.900000e+00 2.000000e+00 4.702383e-03 1194 2.910000e+00 2.000000e+00 4.704297e-03 1195 2.920000e+00 2.000000e+00 4.706193e-03 1196 2.930000e+00 2.000000e+00 4.708071e-03 1197 2.940000e+00 2.000000e+00 4.709933e-03 1198 2.950000e+00 2.000000e+00 4.711779e-03 1199 2.960000e+00 2.000000e+00 4.713608e-03 1200 2.970000e+00 2.000000e+00 4.715421e-03 1201 2.980000e+00 2.000000e+00 4.717218e-03 1202 2.990000e+00 2.000000e+00 4.719000e-03 1203 3.000000e+00 2.000000e+00 4.720766e-03 1204 0.000000e+00 2.500000e+00 -5.161596e-35 1205 1.000000e-02 2.500000e+00 5.946712e-05 1206 2.000000e-02 2.500000e+00 1.186031e-04 1207 3.000000e-02 2.500000e+00 1.774084e-04 1208 4.000000e-02 2.500000e+00 2.358836e-04 1209 5.000000e-02 2.500000e+00 2.940291e-04 1210 6.000000e-02 2.500000e+00 3.518455e-04 1211 7.000000e-02 2.500000e+00 4.093333e-04 1212 8.000000e-02 2.500000e+00 4.664929e-04 1213 9.000000e-02 2.500000e+00 5.233249e-04 1214 1.000000e-01 2.500000e+00 5.798297e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1215 1.100000e-01 2.500000e+00 6.360079e-04 1216 1.200000e-01 2.500000e+00 6.918600e-04 1217 1.300000e-01 2.500000e+00 7.473864e-04 1218 1.400000e-01 2.500000e+00 8.025876e-04 1219 1.500000e-01 2.500000e+00 8.574642e-04 1220 1.600000e-01 2.500000e+00 9.120167e-04 1221 1.700000e-01 2.500000e+00 9.662454e-04 1222 1.800000e-01 2.500000e+00 1.020151e-03 1223 1.900000e-01 2.500000e+00 1.073734e-03 1224 2.000000e-01 2.500000e+00 1.126995e-03 1225 2.100000e-01 2.500000e+00 1.179933e-03 1226 2.200000e-01 2.500000e+00 1.232551e-03 1227 2.300000e-01 2.500000e+00 1.284848e-03 1228 2.400000e-01 2.500000e+00 1.336825e-03 1229 2.500000e-01 2.500000e+00 1.388482e-03 1230 2.600000e-01 2.500000e+00 1.439819e-03 1231 2.700000e-01 2.500000e+00 1.490838e-03 1232 2.800000e-01 2.500000e+00 1.541538e-03 1233 2.900000e-01 2.500000e+00 1.591921e-03 1234 3.000000e-01 2.500000e+00 1.641986e-03 1235 3.100000e-01 2.500000e+00 1.691734e-03 1236 3.200000e-01 2.500000e+00 1.741166e-03 1237 3.300000e-01 2.500000e+00 1.790282e-03 1238 3.400000e-01 2.500000e+00 1.839082e-03 1239 3.500000e-01 2.500000e+00 1.887567e-03 1240 3.600000e-01 2.500000e+00 1.935738e-03 1241 3.700000e-01 2.500000e+00 1.983595e-03 1242 3.800000e-01 2.500000e+00 2.031138e-03 1243 3.900000e-01 2.500000e+00 2.078367e-03 1244 4.000000e-01 2.500000e+00 2.125285e-03 1245 4.100000e-01 2.500000e+00 2.171889e-03 1246 4.200000e-01 2.500000e+00 2.218182e-03 1247 4.300000e-01 2.500000e+00 2.264164e-03 1248 4.400000e-01 2.500000e+00 2.309835e-03 1249 4.500000e-01 2.500000e+00 2.355195e-03 1250 4.600000e-01 2.500000e+00 2.400246e-03 1251 4.700000e-01 2.500000e+00 2.444987e-03 1252 4.800000e-01 2.500000e+00 2.489418e-03 1253 4.900000e-01 2.500000e+00 2.533542e-03 1254 5.000000e-01 2.500000e+00 2.577357e-03 1255 5.100000e-01 2.500000e+00 2.620864e-03 1256 5.200000e-01 2.500000e+00 2.664064e-03 1257 5.300000e-01 2.500000e+00 2.706957e-03 1258 5.400000e-01 2.500000e+00 2.749544e-03 1259 5.500000e-01 2.500000e+00 2.791825e-03 1260 5.600000e-01 2.500000e+00 2.833800e-03 1261 5.700000e-01 2.500000e+00 2.875470e-03 1262 5.800000e-01 2.500000e+00 2.916836e-03 1263 5.900000e-01 2.500000e+00 2.957897e-03 1264 6.000000e-01 2.500000e+00 2.998654e-03 1265 6.100000e-01 2.500000e+00 3.039109e-03 1266 6.200000e-01 2.500000e+00 3.079260e-03 1267 6.300000e-01 2.500000e+00 3.119108e-03 1268 6.400000e-01 2.500000e+00 3.158655e-03 1269 6.500000e-01 2.500000e+00 3.197899e-03 1270 6.600000e-01 2.500000e+00 3.236843e-03 1271 6.700000e-01 2.500000e+00 3.275485e-03 1272 6.800000e-01 2.500000e+00 3.313827e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1273 6.900000e-01 2.500000e+00 3.351869e-03 1274 7.000000e-01 2.500000e+00 3.389611e-03 1275 7.100000e-01 2.500000e+00 3.427054e-03 1276 7.200000e-01 2.500000e+00 3.464198e-03 1277 7.300000e-01 2.500000e+00 3.501044e-03 1278 7.400000e-01 2.500000e+00 3.537591e-03 1279 7.500000e-01 2.500000e+00 3.573841e-03 1280 7.600000e-01 2.500000e+00 3.609793e-03 1281 7.700000e-01 2.500000e+00 3.645448e-03 1282 7.800000e-01 2.500000e+00 3.680807e-03 1283 7.900000e-01 2.500000e+00 3.715869e-03 1284 8.000000e-01 2.500000e+00 3.750635e-03 1285 8.100000e-01 2.500000e+00 3.785106e-03 1286 8.200000e-01 2.500000e+00 3.819282e-03 1287 8.300000e-01 2.500000e+00 3.853162e-03 1288 8.400000e-01 2.500000e+00 3.886749e-03 1289 8.500000e-01 2.500000e+00 3.920040e-03 1290 8.600000e-01 2.500000e+00 3.953038e-03 1291 8.700000e-01 2.500000e+00 3.985743e-03 1292 8.800000e-01 2.500000e+00 4.018154e-03 1293 8.900000e-01 2.500000e+00 4.050272e-03 1294 9.000000e-01 2.500000e+00 4.082097e-03 1295 9.100000e-01 2.500000e+00 4.113630e-03 1296 9.200000e-01 2.500000e+00 4.144870e-03 1297 9.300000e-01 2.500000e+00 4.175819e-03 1298 9.400000e-01 2.500000e+00 4.206476e-03 1299 9.500000e-01 2.500000e+00 4.236841e-03 1300 9.600000e-01 2.500000e+00 4.266916e-03 1301 9.700000e-01 2.500000e+00 4.296699e-03 1302 9.800000e-01 2.500000e+00 4.326191e-03 1303 9.900000e-01 2.500000e+00 4.355392e-03 1304 1.000000e+00 2.500000e+00 4.384303e-03 1305 1.010000e+00 2.500000e+00 4.412923e-03 1306 1.020000e+00 2.500000e+00 4.441253e-03 1307 1.030000e+00 2.500000e+00 4.469292e-03 1308 1.040000e+00 2.500000e+00 4.497041e-03 1309 1.050000e+00 2.500000e+00 4.524500e-03 1310 1.060000e+00 2.500000e+00 4.551669e-03 1311 1.070000e+00 2.500000e+00 4.578547e-03 1312 1.080000e+00 2.500000e+00 4.605135e-03 1313 1.090000e+00 2.500000e+00 4.631433e-03 1314 1.100000e+00 2.500000e+00 4.657440e-03 1315 1.110000e+00 2.500000e+00 4.683156e-03 1316 1.120000e+00 2.500000e+00 4.708581e-03 1317 1.130000e+00 2.500000e+00 4.733715e-03 1318 1.140000e+00 2.500000e+00 4.758557e-03 1319 1.150000e+00 2.500000e+00 4.783107e-03 1320 1.160000e+00 2.500000e+00 4.807365e-03 1321 1.170000e+00 2.500000e+00 4.831329e-03 1322 1.180000e+00 2.500000e+00 4.855000e-03 1323 1.190000e+00 2.500000e+00 4.878377e-03 1324 1.200000e+00 2.500000e+00 4.901458e-03 1325 1.210000e+00 2.500000e+00 4.924244e-03 1326 1.220000e+00 2.500000e+00 4.946733e-03 1327 1.230000e+00 2.500000e+00 4.968923e-03 1328 1.240000e+00 2.500000e+00 4.990815e-03 1329 1.250000e+00 2.500000e+00 5.012406e-03 1330 1.260000e+00 2.500000e+00 5.033696e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1331 1.270000e+00 2.500000e+00 5.054682e-03 1332 1.280000e+00 2.500000e+00 5.075363e-03 1333 1.290000e+00 2.500000e+00 5.095737e-03 1334 1.300000e+00 2.500000e+00 5.115801e-03 1335 1.310000e+00 2.500000e+00 5.135555e-03 1336 1.320000e+00 2.500000e+00 5.154995e-03 1337 1.330000e+00 2.500000e+00 5.174118e-03 1338 1.340000e+00 2.500000e+00 5.192922e-03 1339 1.350000e+00 2.500000e+00 5.211404e-03 1340 1.360000e+00 2.500000e+00 5.229560e-03 1341 1.370000e+00 2.500000e+00 5.247387e-03 1342 1.380000e+00 2.500000e+00 5.264881e-03 1343 1.390000e+00 2.500000e+00 5.282039e-03 1344 1.400000e+00 2.500000e+00 5.298856e-03 1345 1.410000e+00 2.500000e+00 5.315327e-03 1346 1.420000e+00 2.500000e+00 5.331449e-03 1347 1.430000e+00 2.500000e+00 5.347217e-03 1348 1.440000e+00 2.500000e+00 5.362626e-03 1349 1.450000e+00 2.500000e+00 5.377671e-03 1350 1.460000e+00 2.500000e+00 5.392347e-03 1351 1.470000e+00 2.500000e+00 5.406651e-03 1352 1.480000e+00 2.500000e+00 5.420577e-03 1353 1.490000e+00 2.500000e+00 5.434122e-03 1354 1.500000e+00 2.500000e+00 5.447281e-03 1355 1.510000e+00 2.500000e+00 5.460052e-03 1356 1.520000e+00 2.500000e+00 5.472432e-03 1357 1.530000e+00 2.500000e+00 5.484420e-03 1358 1.540000e+00 2.500000e+00 5.496019e-03 1359 1.550000e+00 2.500000e+00 5.507226e-03 1360 1.560000e+00 2.500000e+00 5.518042e-03 1361 1.570000e+00 2.500000e+00 5.528470e-03 1362 1.580000e+00 2.500000e+00 5.538514e-03 1363 1.590000e+00 2.500000e+00 5.548178e-03 1364 1.600000e+00 2.500000e+00 5.557470e-03 1365 1.610000e+00 2.500000e+00 5.566399e-03 1366 1.620000e+00 2.500000e+00 5.574974e-03 1367 1.630000e+00 2.500000e+00 5.583209e-03 1368 1.640000e+00 2.500000e+00 5.591122e-03 1369 1.650000e+00 2.500000e+00 5.598739e-03 1370 1.660000e+00 2.500000e+00 5.606107e-03 1371 1.670000e+00 2.500000e+00 5.613336e-03 1372 1.680000e+00 2.500000e+00 5.620810e-03 1373 1.690000e+00 2.500000e+00 5.629951e-03 1374 1.700000e+00 2.500000e+00 5.641662e-03 1375 1.710000e+00 2.500000e+00 5.654183e-03 1376 1.720000e+00 2.500000e+00 5.666701e-03 1377 1.730000e+00 2.500000e+00 5.679034e-03 1378 1.740000e+00 2.500000e+00 5.691135e-03 1379 1.750000e+00 2.500000e+00 5.702995e-03 1380 1.760000e+00 2.500000e+00 5.714613e-03 1381 1.770000e+00 2.500000e+00 5.725996e-03 1382 1.780000e+00 2.500000e+00 5.737151e-03 1383 1.790000e+00 2.500000e+00 5.748087e-03 1384 1.800000e+00 2.500000e+00 5.758813e-03 1385 1.810000e+00 2.500000e+00 5.769336e-03 1386 1.820000e+00 2.500000e+00 5.779665e-03 1387 1.830000e+00 2.500000e+00 5.789807e-03 1388 1.840000e+00 2.500000e+00 5.799782e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1389 1.850000e+00 2.500000e+00 5.809689e-03 1390 1.860000e+00 2.500000e+00 5.819520e-03 1391 1.870000e+00 2.500000e+00 5.829248e-03 1392 1.880000e+00 2.500000e+00 5.838856e-03 1393 1.890000e+00 2.500000e+00 5.848335e-03 1394 1.900000e+00 2.500000e+00 5.857678e-03 1395 1.910000e+00 2.500000e+00 5.866880e-03 1396 1.920000e+00 2.500000e+00 5.875940e-03 1397 1.930000e+00 2.500000e+00 5.884857e-03 1398 1.940000e+00 2.500000e+00 5.893633e-03 1399 1.950000e+00 2.500000e+00 5.902268e-03 1400 1.960000e+00 2.500000e+00 5.910764e-03 1401 1.970000e+00 2.500000e+00 5.919123e-03 1402 1.980000e+00 2.500000e+00 5.927349e-03 1403 1.990000e+00 2.500000e+00 5.935443e-03 1404 2.000000e+00 2.500000e+00 5.943408e-03 1405 2.010000e+00 2.500000e+00 5.951248e-03 1406 2.020000e+00 2.500000e+00 5.958964e-03 1407 2.030000e+00 2.500000e+00 5.966561e-03 1408 2.040000e+00 2.500000e+00 5.974040e-03 1409 2.050000e+00 2.500000e+00 5.981404e-03 1410 2.060000e+00 2.500000e+00 5.988656e-03 1411 2.070000e+00 2.500000e+00 5.995800e-03 1412 2.080000e+00 2.500000e+00 6.002836e-03 1413 2.090000e+00 2.500000e+00 6.009769e-03 1414 2.100000e+00 2.500000e+00 6.016600e-03 1415 2.110000e+00 2.500000e+00 6.023333e-03 1416 2.120000e+00 2.500000e+00 6.029968e-03 1417 2.130000e+00 2.500000e+00 6.036510e-03 1418 2.140000e+00 2.500000e+00 6.042959e-03 1419 2.150000e+00 2.500000e+00 6.049318e-03 1420 2.160000e+00 2.500000e+00 6.055590e-03 1421 2.170000e+00 2.500000e+00 6.061775e-03 1422 2.180000e+00 2.500000e+00 6.067877e-03 1423 2.190000e+00 2.500000e+00 6.073897e-03 1424 2.200000e+00 2.500000e+00 6.079837e-03 1425 2.210000e+00 2.500000e+00 6.085699e-03 1426 2.220000e+00 2.500000e+00 6.091484e-03 1427 2.230000e+00 2.500000e+00 6.097195e-03 1428 2.240000e+00 2.500000e+00 6.102832e-03 1429 2.250000e+00 2.500000e+00 6.108398e-03 1430 2.260000e+00 2.500000e+00 6.113893e-03 1431 2.270000e+00 2.500000e+00 6.119320e-03 1432 2.280000e+00 2.500000e+00 6.124681e-03 1433 2.290000e+00 2.500000e+00 6.129975e-03 1434 2.300000e+00 2.500000e+00 6.135205e-03 1435 2.310000e+00 2.500000e+00 6.140372e-03 1436 2.320000e+00 2.500000e+00 6.145477e-03 1437 2.330000e+00 2.500000e+00 6.150522e-03 1438 2.340000e+00 2.500000e+00 6.155508e-03 1439 2.350000e+00 2.500000e+00 6.160435e-03 1440 2.360000e+00 2.500000e+00 6.165305e-03 1441 2.370000e+00 2.500000e+00 6.170119e-03 1442 2.380000e+00 2.500000e+00 6.174879e-03 1443 2.390000e+00 2.500000e+00 6.179584e-03 1444 2.400000e+00 2.500000e+00 6.184237e-03 1445 2.410000e+00 2.500000e+00 6.188838e-03 1446 2.420000e+00 2.500000e+00 6.193388e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1447 2.430000e+00 2.500000e+00 6.197887e-03 1448 2.440000e+00 2.500000e+00 6.202338e-03 1449 2.450000e+00 2.500000e+00 6.206740e-03 1450 2.460000e+00 2.500000e+00 6.211094e-03 1451 2.470000e+00 2.500000e+00 6.215402e-03 1452 2.480000e+00 2.500000e+00 6.219664e-03 1453 2.490000e+00 2.500000e+00 6.223881e-03 1454 2.500000e+00 2.500000e+00 6.228053e-03 1455 2.510000e+00 2.500000e+00 6.232181e-03 1456 2.520000e+00 2.500000e+00 6.236266e-03 1457 2.530000e+00 2.500000e+00 6.240309e-03 1458 2.540000e+00 2.500000e+00 6.244310e-03 1459 2.550000e+00 2.500000e+00 6.248270e-03 1460 2.560000e+00 2.500000e+00 6.252189e-03 1461 2.570000e+00 2.500000e+00 6.256068e-03 1462 2.580000e+00 2.500000e+00 6.259908e-03 1463 2.590000e+00 2.500000e+00 6.263709e-03 1464 2.600000e+00 2.500000e+00 6.267471e-03 1465 2.610000e+00 2.500000e+00 6.271196e-03 1466 2.620000e+00 2.500000e+00 6.274883e-03 1467 2.630000e+00 2.500000e+00 6.278534e-03 1468 2.640000e+00 2.500000e+00 6.282148e-03 1469 2.650000e+00 2.500000e+00 6.285726e-03 1470 2.660000e+00 2.500000e+00 6.289269e-03 1471 2.670000e+00 2.500000e+00 6.292777e-03 1472 2.680000e+00 2.500000e+00 6.296250e-03 1473 2.690000e+00 2.500000e+00 6.299689e-03 1474 2.700000e+00 2.500000e+00 6.303095e-03 1475 2.710000e+00 2.500000e+00 6.306467e-03 1476 2.720000e+00 2.500000e+00 6.309806e-03 1477 2.730000e+00 2.500000e+00 6.313112e-03 1478 2.740000e+00 2.500000e+00 6.316386e-03 1479 2.750000e+00 2.500000e+00 6.319628e-03 1480 2.760000e+00 2.500000e+00 6.322839e-03 1481 2.770000e+00 2.500000e+00 6.326018e-03 1482 2.780000e+00 2.500000e+00 6.329167e-03 1483 2.790000e+00 2.500000e+00 6.332284e-03 1484 2.800000e+00 2.500000e+00 6.335372e-03 1485 2.810000e+00 2.500000e+00 6.338430e-03 1486 2.820000e+00 2.500000e+00 6.341457e-03 1487 2.830000e+00 2.500000e+00 6.344456e-03 1488 2.840000e+00 2.500000e+00 6.347426e-03 1489 2.850000e+00 2.500000e+00 6.350366e-03 1490 2.860000e+00 2.500000e+00 6.353279e-03 1491 2.870000e+00 2.500000e+00 6.356163e-03 1492 2.880000e+00 2.500000e+00 6.359019e-03 1493 2.890000e+00 2.500000e+00 6.361847e-03 1494 2.900000e+00 2.500000e+00 6.364648e-03 1495 2.910000e+00 2.500000e+00 6.367422e-03 1496 2.920000e+00 2.500000e+00 6.370169e-03 1497 2.930000e+00 2.500000e+00 6.372890e-03 1498 2.940000e+00 2.500000e+00 6.375584e-03 1499 2.950000e+00 2.500000e+00 6.378252e-03 1500 2.960000e+00 2.500000e+00 6.380895e-03 1501 2.970000e+00 2.500000e+00 6.383512e-03 1502 2.980000e+00 2.500000e+00 6.386104e-03 1503 2.990000e+00 2.500000e+00 6.388671e-03 1504 3.000000e+00 2.500000e+00 6.391213e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1505 0.000000e+00 3.000000e+00 -5.161596e-35 1506 1.000000e-02 3.000000e+00 6.230785e-05 1507 2.000000e-02 3.000000e+00 1.243329e-04 1508 3.000000e-02 3.000000e+00 1.860755e-04 1509 4.000000e-02 3.000000e+00 2.475361e-04 1510 5.000000e-02 3.000000e+00 3.087150e-04 1511 6.000000e-02 3.000000e+00 3.696125e-04 1512 7.000000e-02 3.000000e+00 4.302290e-04 1513 8.000000e-02 3.000000e+00 4.905649e-04 1514 9.000000e-02 3.000000e+00 5.506206e-04 1515 1.000000e-01 3.000000e+00 6.103963e-04 1516 1.100000e-01 3.000000e+00 6.698925e-04 1517 1.200000e-01 3.000000e+00 7.291094e-04 1518 1.300000e-01 3.000000e+00 7.880476e-04 1519 1.400000e-01 3.000000e+00 8.467072e-04 1520 1.500000e-01 3.000000e+00 9.050888e-04 1521 1.600000e-01 3.000000e+00 9.631925e-04 1522 1.700000e-01 3.000000e+00 1.021019e-03 1523 1.800000e-01 3.000000e+00 1.078568e-03 1524 1.900000e-01 3.000000e+00 1.135841e-03 1525 2.000000e-01 3.000000e+00 1.192837e-03 1526 2.100000e-01 3.000000e+00 1.249557e-03 1527 2.200000e-01 3.000000e+00 1.306002e-03 1528 2.300000e-01 3.000000e+00 1.362171e-03 1529 2.400000e-01 3.000000e+00 1.418065e-03 1530 2.500000e-01 3.000000e+00 1.473685e-03 1531 2.600000e-01 3.000000e+00 1.529030e-03 1532 2.700000e-01 3.000000e+00 1.584102e-03 1533 2.800000e-01 3.000000e+00 1.638899e-03 1534 2.900000e-01 3.000000e+00 1.693424e-03 1535 3.000000e-01 3.000000e+00 1.747676e-03 1536 3.100000e-01 3.000000e+00 1.801655e-03 1537 3.200000e-01 3.000000e+00 1.855362e-03 1538 3.300000e-01 3.000000e+00 1.908798e-03 1539 3.400000e-01 3.000000e+00 1.961961e-03 1540 3.500000e-01 3.000000e+00 2.014854e-03 1541 3.600000e-01 3.000000e+00 2.067476e-03 1542 3.700000e-01 3.000000e+00 2.119827e-03 1543 3.800000e-01 3.000000e+00 2.171908e-03 1544 3.900000e-01 3.000000e+00 2.223719e-03 1545 4.000000e-01 3.000000e+00 2.275261e-03 1546 4.100000e-01 3.000000e+00 2.326534e-03 1547 4.200000e-01 3.000000e+00 2.377538e-03 1548 4.300000e-01 3.000000e+00 2.428273e-03 1549 4.400000e-01 3.000000e+00 2.478740e-03 1550 4.500000e-01 3.000000e+00 2.528940e-03 1551 4.600000e-01 3.000000e+00 2.578872e-03 1552 4.700000e-01 3.000000e+00 2.628537e-03 1553 4.800000e-01 3.000000e+00 2.677935e-03 1554 4.900000e-01 3.000000e+00 2.727067e-03 1555 5.000000e-01 3.000000e+00 2.775932e-03 1556 5.100000e-01 3.000000e+00 2.824532e-03 1557 5.200000e-01 3.000000e+00 2.872866e-03 1558 5.300000e-01 3.000000e+00 2.920936e-03 1559 5.400000e-01 3.000000e+00 2.968740e-03 1560 5.500000e-01 3.000000e+00 3.016280e-03 1561 5.600000e-01 3.000000e+00 3.063555e-03 1562 5.700000e-01 3.000000e+00 3.110567e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1563 5.800000e-01 3.000000e+00 3.157315e-03 1564 5.900000e-01 3.000000e+00 3.203801e-03 1565 6.000000e-01 3.000000e+00 3.250023e-03 1566 6.100000e-01 3.000000e+00 3.295982e-03 1567 6.200000e-01 3.000000e+00 3.341680e-03 1568 6.300000e-01 3.000000e+00 3.387115e-03 1569 6.400000e-01 3.000000e+00 3.432289e-03 1570 6.500000e-01 3.000000e+00 3.477202e-03 1571 6.600000e-01 3.000000e+00 3.521853e-03 1572 6.700000e-01 3.000000e+00 3.566244e-03 1573 6.800000e-01 3.000000e+00 3.610375e-03 1574 6.900000e-01 3.000000e+00 3.654246e-03 1575 7.000000e-01 3.000000e+00 3.697856e-03 1576 7.100000e-01 3.000000e+00 3.741208e-03 1577 7.200000e-01 3.000000e+00 3.784300e-03 1578 7.300000e-01 3.000000e+00 3.827134e-03 1579 7.400000e-01 3.000000e+00 3.869709e-03 1580 7.500000e-01 3.000000e+00 3.912026e-03 1581 7.600000e-01 3.000000e+00 3.954085e-03 1582 7.700000e-01 3.000000e+00 3.995886e-03 1583 7.800000e-01 3.000000e+00 4.037430e-03 1584 7.900000e-01 3.000000e+00 4.078717e-03 1585 8.000000e-01 3.000000e+00 4.119748e-03 1586 8.100000e-01 3.000000e+00 4.160522e-03 1587 8.200000e-01 3.000000e+00 4.201039e-03 1588 8.300000e-01 3.000000e+00 4.241302e-03 1589 8.400000e-01 3.000000e+00 4.281308e-03 1590 8.500000e-01 3.000000e+00 4.321060e-03 1591 8.600000e-01 3.000000e+00 4.360556e-03 1592 8.700000e-01 3.000000e+00 4.399798e-03 1593 8.800000e-01 3.000000e+00 4.438785e-03 1594 8.900000e-01 3.000000e+00 4.477519e-03 1595 9.000000e-01 3.000000e+00 4.515998e-03 1596 9.100000e-01 3.000000e+00 4.554224e-03 1597 9.200000e-01 3.000000e+00 4.592197e-03 1598 9.300000e-01 3.000000e+00 4.629917e-03 1599 9.400000e-01 3.000000e+00 4.667384e-03 1600 9.500000e-01 3.000000e+00 4.704598e-03 1601 9.600000e-01 3.000000e+00 4.741561e-03 1602 9.700000e-01 3.000000e+00 4.778271e-03 1603 9.800000e-01 3.000000e+00 4.814730e-03 1604 9.900000e-01 3.000000e+00 4.850938e-03 1605 1.000000e+00 3.000000e+00 4.886894e-03 1606 1.010000e+00 3.000000e+00 4.922599e-03 1607 1.020000e+00 3.000000e+00 4.958054e-03 1608 1.030000e+00 3.000000e+00 4.993258e-03 1609 1.040000e+00 3.000000e+00 5.028213e-03 1610 1.050000e+00 3.000000e+00 5.062917e-03 1611 1.060000e+00 3.000000e+00 5.097371e-03 1612 1.070000e+00 3.000000e+00 5.131576e-03 1613 1.080000e+00 3.000000e+00 5.165532e-03 1614 1.090000e+00 3.000000e+00 5.199238e-03 1615 1.100000e+00 3.000000e+00 5.232696e-03 1616 1.110000e+00 3.000000e+00 5.265905e-03 1617 1.120000e+00 3.000000e+00 5.298866e-03 1618 1.130000e+00 3.000000e+00 5.331579e-03 1619 1.140000e+00 3.000000e+00 5.364043e-03 1620 1.150000e+00 3.000000e+00 5.396259e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1621 1.160000e+00 3.000000e+00 5.428228e-03 1622 1.170000e+00 3.000000e+00 5.459949e-03 1623 1.180000e+00 3.000000e+00 5.491423e-03 1624 1.190000e+00 3.000000e+00 5.522650e-03 1625 1.200000e+00 3.000000e+00 5.553629e-03 1626 1.210000e+00 3.000000e+00 5.584361e-03 1627 1.220000e+00 3.000000e+00 5.614847e-03 1628 1.230000e+00 3.000000e+00 5.645086e-03 1629 1.240000e+00 3.000000e+00 5.675078e-03 1630 1.250000e+00 3.000000e+00 5.704823e-03 1631 1.260000e+00 3.000000e+00 5.734322e-03 1632 1.270000e+00 3.000000e+00 5.763574e-03 1633 1.280000e+00 3.000000e+00 5.792580e-03 1634 1.290000e+00 3.000000e+00 5.821340e-03 1635 1.300000e+00 3.000000e+00 5.849853e-03 1636 1.310000e+00 3.000000e+00 5.878119e-03 1637 1.320000e+00 3.000000e+00 5.906139e-03 1638 1.330000e+00 3.000000e+00 5.933913e-03 1639 1.340000e+00 3.000000e+00 5.961439e-03 1640 1.350000e+00 3.000000e+00 5.988719e-03 1641 1.360000e+00 3.000000e+00 6.015753e-03 1642 1.370000e+00 3.000000e+00 6.042539e-03 1643 1.380000e+00 3.000000e+00 6.069078e-03 1644 1.390000e+00 3.000000e+00 6.095369e-03 1645 1.400000e+00 3.000000e+00 6.121412e-03 1646 1.410000e+00 3.000000e+00 6.147208e-03 1647 1.420000e+00 3.000000e+00 6.172755e-03 1648 1.430000e+00 3.000000e+00 6.198053e-03 1649 1.440000e+00 3.000000e+00 6.223103e-03 1650 1.450000e+00 3.000000e+00 6.247902e-03 1651 1.460000e+00 3.000000e+00 6.272451e-03 1652 1.470000e+00 3.000000e+00 6.296750e-03 1653 1.480000e+00 3.000000e+00 6.320797e-03 1654 1.490000e+00 3.000000e+00 6.344591e-03 1655 1.500000e+00 3.000000e+00 6.368133e-03 1656 1.510000e+00 3.000000e+00 6.391421e-03 1657 1.520000e+00 3.000000e+00 6.414454e-03 1658 1.530000e+00 3.000000e+00 6.437231e-03 1659 1.540000e+00 3.000000e+00 6.459751e-03 1660 1.550000e+00 3.000000e+00 6.482013e-03 1661 1.560000e+00 3.000000e+00 6.504016e-03 1662 1.570000e+00 3.000000e+00 6.525757e-03 1663 1.580000e+00 3.000000e+00 6.547236e-03 1664 1.590000e+00 3.000000e+00 6.568451e-03 1665 1.600000e+00 3.000000e+00 6.589399e-03 1666 1.610000e+00 3.000000e+00 6.610079e-03 1667 1.620000e+00 3.000000e+00 6.630489e-03 1668 1.630000e+00 3.000000e+00 6.650626e-03 1669 1.640000e+00 3.000000e+00 6.670489e-03 1670 1.650000e+00 3.000000e+00 6.690073e-03 1671 1.660000e+00 3.000000e+00 6.709377e-03 1672 1.670000e+00 3.000000e+00 6.728397e-03 1673 1.680000e+00 3.000000e+00 6.747131e-03 1674 1.690000e+00 3.000000e+00 6.765574e-03 1675 1.700000e+00 3.000000e+00 6.783723e-03 1676 1.710000e+00 3.000000e+00 6.801574e-03 1677 1.720000e+00 3.000000e+00 6.819124e-03 1678 1.730000e+00 3.000000e+00 6.836368e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1679 1.740000e+00 3.000000e+00 6.853301e-03 1680 1.750000e+00 3.000000e+00 6.869920e-03 1681 1.760000e+00 3.000000e+00 6.886219e-03 1682 1.770000e+00 3.000000e+00 6.902197e-03 1683 1.780000e+00 3.000000e+00 6.917850e-03 1684 1.790000e+00 3.000000e+00 6.933172e-03 1685 1.800000e+00 3.000000e+00 6.948157e-03 1686 1.810000e+00 3.000000e+00 6.962802e-03 1687 1.820000e+00 3.000000e+00 6.977103e-03 1688 1.830000e+00 3.000000e+00 6.991057e-03 1689 1.840000e+00 3.000000e+00 7.004661e-03 1690 1.850000e+00 3.000000e+00 7.017915e-03 1691 1.860000e+00 3.000000e+00 7.030820e-03 1692 1.870000e+00 3.000000e+00 7.043383e-03 1693 1.880000e+00 3.000000e+00 7.055618e-03 1694 1.890000e+00 3.000000e+00 7.067565e-03 1695 1.900000e+00 3.000000e+00 7.079343e-03 1696 1.910000e+00 3.000000e+00 7.091434e-03 1697 1.920000e+00 3.000000e+00 7.105554e-03 1698 1.930000e+00 3.000000e+00 7.122055e-03 1699 1.940000e+00 3.000000e+00 7.139058e-03 1700 1.950000e+00 3.000000e+00 7.155925e-03 1701 1.960000e+00 3.000000e+00 7.172511e-03 1702 1.970000e+00 3.000000e+00 7.188777e-03 1703 1.980000e+00 3.000000e+00 7.204708e-03 1704 1.990000e+00 3.000000e+00 7.220304e-03 1705 2.000000e+00 3.000000e+00 7.235569e-03 1706 2.010000e+00 3.000000e+00 7.250506e-03 1707 2.020000e+00 3.000000e+00 7.265123e-03 1708 2.030000e+00 3.000000e+00 7.279428e-03 1709 2.040000e+00 3.000000e+00 7.293427e-03 1710 2.050000e+00 3.000000e+00 7.307129e-03 1711 2.060000e+00 3.000000e+00 7.320545e-03 1712 2.070000e+00 3.000000e+00 7.333774e-03 1713 2.080000e+00 3.000000e+00 7.346839e-03 1714 2.090000e+00 3.000000e+00 7.359711e-03 1715 2.100000e+00 3.000000e+00 7.372370e-03 1716 2.110000e+00 3.000000e+00 7.384806e-03 1717 2.120000e+00 3.000000e+00 7.397012e-03 1718 2.130000e+00 3.000000e+00 7.408987e-03 1719 2.140000e+00 3.000000e+00 7.420730e-03 1720 2.150000e+00 3.000000e+00 7.432244e-03 1721 2.160000e+00 3.000000e+00 7.443532e-03 1722 2.170000e+00 3.000000e+00 7.454599e-03 1723 2.180000e+00 3.000000e+00 7.465448e-03 1724 2.190000e+00 3.000000e+00 7.476085e-03 1725 2.200000e+00 3.000000e+00 7.486516e-03 1726 2.210000e+00 3.000000e+00 7.496746e-03 1727 2.220000e+00 3.000000e+00 7.506780e-03 1728 2.230000e+00 3.000000e+00 7.516625e-03 1729 2.240000e+00 3.000000e+00 7.526285e-03 1730 2.250000e+00 3.000000e+00 7.535766e-03 1731 2.260000e+00 3.000000e+00 7.545074e-03 1732 2.270000e+00 3.000000e+00 7.554214e-03 1733 2.280000e+00 3.000000e+00 7.563190e-03 1734 2.290000e+00 3.000000e+00 7.572008e-03 1735 2.300000e+00 3.000000e+00 7.580673e-03 1736 2.310000e+00 3.000000e+00 7.589188e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1737 2.320000e+00 3.000000e+00 7.597560e-03 1738 2.330000e+00 3.000000e+00 7.605791e-03 1739 2.340000e+00 3.000000e+00 7.613886e-03 1740 2.350000e+00 3.000000e+00 7.621849e-03 1741 2.360000e+00 3.000000e+00 7.629684e-03 1742 2.370000e+00 3.000000e+00 7.637395e-03 1743 2.380000e+00 3.000000e+00 7.644984e-03 1744 2.390000e+00 3.000000e+00 7.652457e-03 1745 2.400000e+00 3.000000e+00 7.659815e-03 1746 2.410000e+00 3.000000e+00 7.667062e-03 1747 2.420000e+00 3.000000e+00 7.674201e-03 1748 2.430000e+00 3.000000e+00 7.681235e-03 1749 2.440000e+00 3.000000e+00 7.688167e-03 1750 2.450000e+00 3.000000e+00 7.694999e-03 1751 2.460000e+00 3.000000e+00 7.701735e-03 1752 2.470000e+00 3.000000e+00 7.708376e-03 1753 2.480000e+00 3.000000e+00 7.714926e-03 1754 2.490000e+00 3.000000e+00 7.721385e-03 1755 2.500000e+00 3.000000e+00 7.727757e-03 1756 2.510000e+00 3.000000e+00 7.734044e-03 1757 2.520000e+00 3.000000e+00 7.740248e-03 1758 2.530000e+00 3.000000e+00 7.746371e-03 1759 2.540000e+00 3.000000e+00 7.752414e-03 1760 2.550000e+00 3.000000e+00 7.758380e-03 1761 2.560000e+00 3.000000e+00 7.764270e-03 1762 2.570000e+00 3.000000e+00 7.770086e-03 1763 2.580000e+00 3.000000e+00 7.775830e-03 1764 2.590000e+00 3.000000e+00 7.781504e-03 1765 2.600000e+00 3.000000e+00 7.787108e-03 1766 2.610000e+00 3.000000e+00 7.792644e-03 1767 2.620000e+00 3.000000e+00 7.798114e-03 1768 2.630000e+00 3.000000e+00 7.803519e-03 1769 2.640000e+00 3.000000e+00 7.808861e-03 1770 2.650000e+00 3.000000e+00 7.814140e-03 1771 2.660000e+00 3.000000e+00 7.819358e-03 1772 2.670000e+00 3.000000e+00 7.824517e-03 1773 2.680000e+00 3.000000e+00 7.829616e-03 1774 2.690000e+00 3.000000e+00 7.834658e-03 1775 2.700000e+00 3.000000e+00 7.839644e-03 1776 2.710000e+00 3.000000e+00 7.844574e-03 1777 2.720000e+00 3.000000e+00 7.849449e-03 1778 2.730000e+00 3.000000e+00 7.854271e-03 1779 2.740000e+00 3.000000e+00 7.859040e-03 1780 2.750000e+00 3.000000e+00 7.863758e-03 1781 2.760000e+00 3.000000e+00 7.868424e-03 1782 2.770000e+00 3.000000e+00 7.873041e-03 1783 2.780000e+00 3.000000e+00 7.877608e-03 1784 2.790000e+00 3.000000e+00 7.882127e-03 1785 2.800000e+00 3.000000e+00 7.886598e-03 1786 2.810000e+00 3.000000e+00 7.891022e-03 1787 2.820000e+00 3.000000e+00 7.895400e-03 1788 2.830000e+00 3.000000e+00 7.899732e-03 1789 2.840000e+00 3.000000e+00 7.904020e-03 1790 2.850000e+00 3.000000e+00 7.908263e-03 1791 2.860000e+00 3.000000e+00 7.912462e-03 1792 2.870000e+00 3.000000e+00 7.916619e-03 1793 2.880000e+00 3.000000e+00 7.920732e-03 1794 2.890000e+00 3.000000e+00 7.924804e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1795 2.900000e+00 3.000000e+00 7.928835e-03 1796 2.910000e+00 3.000000e+00 7.932825e-03 1797 2.920000e+00 3.000000e+00 7.936774e-03 1798 2.930000e+00 3.000000e+00 7.940684e-03 1799 2.940000e+00 3.000000e+00 7.944554e-03 1800 2.950000e+00 3.000000e+00 7.948385e-03 1801 2.960000e+00 3.000000e+00 7.952178e-03 1802 2.970000e+00 3.000000e+00 7.955933e-03 1803 2.980000e+00 3.000000e+00 7.959651e-03 1804 2.990000e+00 3.000000e+00 7.963331e-03 1805 3.000000e+00 3.000000e+00 7.966974e-03 CPU time since last call: 0.157 seconds. Total CPU time: 0.157 seconds. Current dynamic memory usage = 270336, Dynamic memory limit = -491521. ngspice-26/tests/bsim3soidd/t5.cir0000644000265600020320000000042412264261473016462 0ustar andreasadmin*model = BSIMSOI (DD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 ve -4 4 1 .print dc i(vs) .include nmosdd.mod ngspice-26/tests/bsim3soidd/t4.cir0000644000265600020320000000044412264261473016463 0ustar andreasadmin*model = BSIMSOI (DD) *Berkeley Spice Compatibility * * SOI NMOSFET, tied body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 vb b 0 dc 0 m1 d g s e b n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 vb -0.3 0.5 0.1 .print dc i(vs) .include nmosdd.mod ngspice-26/tests/xspice/0000755000265600020320000000000012264261715014665 5ustar andreasadminngspice-26/tests/xspice/digital/0000755000265600020320000000000012264261715016302 5ustar andreasadminngspice-26/tests/xspice/digital/d_state-updn.txt0000644000265600020320000000051312264261473021432 0ustar andreasadmin* This is an example state.in file. This file * defines a simple 2-bit counter with one input. The * value of this input determines whether the counter counts * up (in = 1) or down (in = 0). 0 0s 0s 0 -> 3 1 -> 1 1 0s 1z 0 -> 0 1 -> 2 2 1z 0s 0 -> 1 1 -> 3 3 1z 1z 0 -> 2 3 1z 1z 1 -> 0 ngspice-26/tests/xspice/digital/d_source-stimulus.txt0000644000265600020320000000105712264261473022535 0ustar andreasadmin* time, a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab 0n 0s 0s Uu Uu Uu Uu Uu Uu Uu Uu Uu 1n 1s 0s Uu Uu 0u Uu Uu Uu Uu Uu Uu 2n Us 0s Uu Uu 0u 0u Uu Uu Uu Uu Uu 3n Us 0r Uu Uu 0u 0u 0u Uu Uu Uu Uu 4n Us 1r Uu Uu 0u 0u 0u 0u Uu Uu Uu 5n Us Ur Uu Uu 0u 0u 0u 0u 0u Uu Uu 6n Us Ur 0z Uu 0u 0u 0u 0u 0u 0u Uu 7n Us Ur 1z Uu 0u 0u 0u 0u 0u 0u 0u 8n Us Ur Uz Uu 0u 0u 0u 0u 0u 0u 0u 9n Us Ur Uz 0u 0u 0u 0u 0u 0u 0u 0u 10n Us Ur Uz 1u 0u 0u 0u 0u 0u 0u 0u 11n Us Ur Uz Uu 0u 0u 0u 0u 0u 0u 0u ngspice-26/tests/xspice/digital/spinit.in0000644000265600020320000000016512264261473020143 0ustar andreasadmincodemodel @top_builddir@/src/xspice/icm/digital/digital.cm set sourcepath = ( $ngspice_vpath . ) set filetype=binary ngspice-26/tests/xspice/digital/d_state-stimulus.txt0000644000265600020320000000011212264261473022344 0ustar andreasadmin* time, enable, reset, up 0 0s 1s 1s 1n 1s 0s 1s 9n 1s 0s 0s ngspice-26/tests/xspice/digital/d_ram-stimulus.txt0000644000265600020320000000254012264261473022012 0ustar andreasadmin* ram test * a a a d d d d d we cs 0ns 0s 0s 0s 0r 0r 0r 0r 0r 0s 1s 10ns 0s 0s 0s 0r 0r 0r 0r 0r 1s 1s 20ns 0s 0s 0s 0r 0r 0r 0r 0r 0s 1s 30ns 0s 0s 1s 0r 1r 1r 0r 1r 0s 1s 40ns 0s 0s 1s 0r 1r 1r 0r 1r 1s 1s 50ns 0s 0s 1s 0r 1r 1r 0r 1r 0s 1s 60ns 0s 1s 0s 1r 1r 0r 1r 0r 0s 0s 70ns 0s 1s 0s 1r 1r 0r 1r 0r 1s 0s 80ns 0s 1s 0s 1r 1r 0r 1r 0r 0s 0s 90ns 0s 1s 1s 0r 0r 1r 1r 1r 0s 1s 100ns 0s 1s 1s 0r 0r 1r 1r 1r 1s 1s 110ns 0s 1s 1s 0r 0r 1r 1r 1r 0s 1s 120ns 1s 0s 0s 1r 0r 1r 0r 0r 0s 1s 130ns 1s 0s 0s 1r 0r 1r 0r 0r 1s 1s 140ns 1s 0s 0s 1r 0r 1r 0r 0r 0s 1s 150ns 1s 0s 1s 0r 0r 0r 0r 1r 0s 1s 160ns 1s 0s 1s 0r 0r 0r 0r 1r 1s 1s 170ns 1s 0s 1s 0r 0r 0r 0r 1r 0s 1s 180ns 1s 1s 0s 0r 1r 1r 1r 0r 0s 1s 190ns 1s 1s 0s 0r 1r 1r 1r 0r 1s 1s 200ns 1s 1s 0s 0r 1r 1r 1r 0r 0s 1s 210ns 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s 220ns 1s 1s 1s 1r 1r 0r 1r 1r 1s 1s 230ns 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s 240ns 0s 0s 0s 0r 0r 0r 0r 0r 0s 1s 250ns 0s 0s 1s 0r 1r 1r 0r 1r 0s 1s 260ns 0s 1s 0s 1r 1r 0r 1r 0r 0s 1s 270ns 0s 1s 1s 0r 0r 1r 1r 1r 0s 1s 280ns 1s 0s 0s 1r 0r 1r 0r 0r 0s 1s 290ns 1s 0s 1s 0r 0r 0r 0r 1r 0s 1s 300ns 1s 1s 0s 0r 1r 1r 1r 0r 0s 1s 310ns 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s 320ns 1s 1s 1s 1r 1r 0r 1r 1r 0s 0s 330ns 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s ngspice-26/tests/xspice/digital/d_ram.out0000644000265600020320000001666612264261473020135 0ustar andreasadmin Circuit: code model test: d_source + d_ram Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 3508 **** Results Data **** Time or Step a0 a1 a2 d0 d1 d2 d3 d4 o0 o1 o2 o3 o4 we cs 0.000000000e+00 0s 0s 0s 0r 0r 0r 0r 0r Us Us Us Us Us 0s 1s 1.000000000e-08 0s 0s 0s 0r 0r 0r 0r 0r Us Us Us Us Us 1s 1s 1.100000000e-08 0s 0s 0s 0r 0r 0r 0r 0r 0z 0z 0z 0z 0z 1s 1s 2.000000000e-08 0s 0s 0s 0r 0r 0r 0r 0r 0z 0z 0z 0z 0z 0s 1s 2.100000000e-08 0s 0s 0s 0r 0r 0r 0r 0r 0s 0s 0s 0s 0s 0s 1s 3.000000000e-08 0s 0s 1s 0r 1r 1r 0r 1r 0s 0s 0s 0s 0s 0s 1s 3.100000000e-08 0s 0s 1s 0r 1r 1r 0r 1r Us Us Us Us Us 0s 1s 4.000000000e-08 0s 0s 1s 0r 1r 1r 0r 1r Us Us Us Us Us 1s 1s 4.100000000e-08 0s 0s 1s 0r 1r 1r 0r 1r 0z 1z 1z 0z 1z 1s 1s 5.000000000e-08 0s 0s 1s 0r 1r 1r 0r 1r 0z 1z 1z 0z 1z 0s 1s 5.100000000e-08 0s 0s 1s 0r 1r 1r 0r 1r 0s 1s 1s 0s 1s 0s 1s 6.000000000e-08 0s 1s 0s 1r 1r 0r 1r 0r 0s 1s 1s 0s 1s 0s 0s 6.100000000e-08 0s 1s 0s 1r 1r 0r 1r 0r Uz Uz Uz Uz Uz 0s 0s 7.000000000e-08 0s 1s 0s 1r 1r 0r 1r 0r Uz Uz Uz Uz Uz 1s 0s 8.000000000e-08 0s 1s 0s 1r 1r 0r 1r 0r Uz Uz Uz Uz Uz 0s 0s 9.000000000e-08 0s 1s 1s 0r 0r 1r 1r 1r Uz Uz Uz Uz Uz 0s 1s 9.100000000e-08 0s 1s 1s 0r 0r 1r 1r 1r Us Us Us Us Us 0s 1s 1.000000000e-07 0s 1s 1s 0r 0r 1r 1r 1r Us Us Us Us Us 1s 1s 1.010000000e-07 0s 1s 1s 0r 0r 1r 1r 1r 0z 0z 1z 1z 1z 1s 1s 1.100000000e-07 0s 1s 1s 0r 0r 1r 1r 1r 0z 0z 1z 1z 1z 0s 1s 1.110000000e-07 0s 1s 1s 0r 0r 1r 1r 1r 0s 0s 1s 1s 1s 0s 1s 1.200000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 0s 0s 1s 1s 1s 0s 1s 1.210000000e-07 1s 0s 0s 1r 0r 1r 0r 0r Us Us Us Us Us 0s 1s 1.300000000e-07 1s 0s 0s 1r 0r 1r 0r 0r Us Us Us Us Us 1s 1s 1.310000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 1z 0z 1z 0z 0z 1s 1s 1.400000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 1z 0z 1z 0z 0z 0s 1s 1.410000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 1s 0s 1s 0s 0s 0s 1s 1.500000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 1s 0s 1s 0s 0s 0s 1s 1.510000000e-07 1s 0s 1s 0r 0r 0r 0r 1r Us Us Us Us Us 0s 1s 1.600000000e-07 1s 0s 1s 0r 0r 0r 0r 1r Us Us Us Us Us 1s 1s 1.610000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 0z 0z 0z 0z 1z 1s 1s 1.700000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 0z 0z 0z 0z 1z 0s 1s 1.710000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 0s 0s 0s 0s 1s 0s 1s 1.800000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0s 0s 0s 0s 1s 0s 1s 1.810000000e-07 1s 1s 0s 0r 1r 1r 1r 0r Us Us Us Us Us 0s 1s 1.900000000e-07 1s 1s 0s 0r 1r 1r 1r 0r Us Us Us Us Us 1s 1s 1.910000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0z 1z 1z 1z 0z 1s 1s 2.000000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0z 1z 1z 1z 0z 0s 1s 2.010000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0s 1s 1s 1s 0s 0s 1s 2.100000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s 1s 1s 0s 0s 1s 2.110000000e-07 1s 1s 1s 1r 1r 0r 1r 1r Us Us Us Us Us 0s 1s 2.200000000e-07 1s 1s 1s 1r 1r 0r 1r 1r Us Us Us Us Us 1s 1s 2.210000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1z 1z 0z 1z 1z 1s 1s 2.300000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1z 1z 0z 1z 1z 0s 1s 2.310000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1s 1s 0s 1s 1s 0s 1s 2.400000000e-07 0s 0s 0s 0r 0r 0r 0r 0r 1s 1s 0s 1s 1s 0s 1s 2.410000000e-07 0s 0s 0s 0r 0r 0r 0r 0r 0s 0s 0s 0s 0s 0s 1s 2.500000000e-07 0s 0s 1s 0r 1r 1r 0r 1r 0s 0s 0s 0s 0s 0s 1s 2.510000000e-07 0s 0s 1s 0r 1r 1r 0r 1r 0s 1s 1s 0s 1s 0s 1s 2.600000000e-07 0s 1s 0s 1r 1r 0r 1r 0r 0s 1s 1s 0s 1s 0s 1s 2.610000000e-07 0s 1s 0s 1r 1r 0r 1r 0r Us Us Us Us Us 0s 1s 2.700000000e-07 0s 1s 1s 0r 0r 1r 1r 1r Us Us Us Us Us 0s 1s 2.710000000e-07 0s 1s 1s 0r 0r 1r 1r 1r 0s 0s 1s 1s 1s 0s 1s 2.800000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 0s 0s 1s 1s 1s 0s 1s 2.810000000e-07 1s 0s 0s 1r 0r 1r 0r 0r 1s 0s 1s 0s 0s 0s 1s 2.900000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 1s 0s 1s 0s 0s 0s 1s 2.910000000e-07 1s 0s 1s 0r 0r 0r 0r 1r 0s 0s 0s 0s 1s 0s 1s 3.000000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0s 0s 0s 0s 1s 0s 1s 3.010000000e-07 1s 1s 0s 0r 1r 1r 1r 0r 0s 1s 1s 1s 0s 0s 1s 3.100000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 0s 1s 1s 1s 0s 0s 1s 3.110000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1s 1s 0s 1s 1s 0s 1s 3.200000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1s 1s 0s 1s 1s 0s 0s 3.210000000e-07 1s 1s 1s 1r 1r 0r 1r 1r Uz Uz Uz Uz Uz 0s 0s 3.300000000e-07 1s 1s 1s 1r 1r 0r 1r 1r Uz Uz Uz Uz Uz 0s 1s 3.310000000e-07 1s 1s 1s 1r 1r 0r 1r 1r 1s 1s 0s 1s 1s 0s 1s **** Messages **** **** Statistics **** Operating point analog/event alternations: 1 Operating point load calls: 3 Operating point event passes: 2 Transient analysis load calls: 66 Transient analysis timestep backups: 0 binary raw file Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 ngspice-26/tests/xspice/digital/d_state.out0000644000265600020320000000376412264261473020471 0ustar andreasadmin Circuit: code model test: d_source + d_state Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 208 **** Results Data **** Time or Step clk up reset o1 o2 0.000000000e+00 0s 1s 1s 0s 0s 1.000000000e-09 0s 1s 0s 0s 0s 2.000000000e-09 1s 1s 0s 0s 0s 2.100000000e-09 1s 1s 0s 0s 1z 3.000000000e-09 0s 1s 0s 0s 1z 4.000000000e-09 1s 1s 0s 0s 1z 4.100000000e-09 1s 1s 0s 1z 0s 5.000000000e-09 0s 1s 0s 1z 0s 6.000000000e-09 1s 1s 0s 1z 0s 6.100000000e-09 1s 1s 0s 1z 1z 7.000000000e-09 0s 1s 0s 1z 1z 8.000000000e-09 1s 1s 0s 1z 1z 8.100000000e-09 1s 1s 0s 0s 0s 9.000000000e-09 0s 0s 0s 0s 0s 1.000000000e-08 1s 0s 0s 0s 0s 1.010000000e-08 1s 0s 0s 1z 1z 1.100000000e-08 0s 0s 0s 1z 1z 1.200000000e-08 1s 0s 0s 1z 1z 1.210000000e-08 1s 0s 0s 1z 0s 1.300000000e-08 0s 0s 0s 1z 0s 1.400000000e-08 1s 0s 0s 1z 0s 1.410000000e-08 1s 0s 0s 0s 1z 1.500000000e-08 0s 0s 0s 0s 1z 1.600000000e-08 1s 0s 0s 0s 1z 1.610000000e-08 1s 0s 0s 0s 0s 1.700000000e-08 0s 0s 0s 0s 0s 1.800000000e-08 1s 0s 0s 0s 0s 1.810000000e-08 1s 0s 0s 1z 1z 1.900000000e-08 0s 0s 0s 1z 1z 2.000000000e-08 1s 0s 0s 1z 1z **** Messages **** **** Statistics **** Operating point analog/event alternations: 1 Operating point load calls: 5 Operating point event passes: 2 Transient analysis load calls: 42 Transient analysis timestep backups: 0 binary raw file Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 ngspice-26/tests/xspice/digital/d_source.out0000644000265600020320000000313212264261473020636 0ustar andreasadmin Circuit: code model test: d_source Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 No. of Data Rows : 308 **** Results Data **** Time or Step a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab 0.000000000e+00 0s 0s Uu Uu Uu Uu Uu Uu Uu Uu Uu 1.000000000e-09 1s 0s Uu Uu 0u Uu Uu Uu Uu Uu Uu 2.000000000e-09 Us 0s Uu Uu 0u 0u Uu Uu Uu Uu Uu 3.000000000e-09 Us 0r Uu Uu 0u 0u 0u Uu Uu Uu Uu 4.000000000e-09 Us 1r Uu Uu 0u 0u 0u 0u Uu Uu Uu 5.000000000e-09 Us Ur Uu Uu 0u 0u 0u 0u 0u Uu Uu 6.000000000e-09 Us Ur 0z Uu 0u 0u 0u 0u 0u 0u Uu 7.000000000e-09 Us Ur 1z Uu 0u 0u 0u 0u 0u 0u 0u 8.000000000e-09 Us Ur Uz Uu 0u 0u 0u 0u 0u 0u 0u 9.000000000e-09 Us Ur Uz 0u 0u 0u 0u 0u 0u 0u 0u 1.000000000e-08 Us Ur Uz 1u 0u 0u 0u 0u 0u 0u 0u 1.100000000e-08 Us Ur Uz Uu 0u 0u 0u 0u 0u 0u 0u **** Messages **** **** Statistics **** Operating point analog/event alternations: 1 Operating point load calls: 1 Operating point event passes: 2 Transient analysis load calls: 11 Transient analysis timestep backups: 0 binary raw file Reducing trtol to 1 for xspice 'A' devices Doing analysis at TEMP = 27.000000 and TNOM = 27.000000 ngspice-26/tests/xspice/digital/d_ram.cir0000644000265600020320000000076112264261473020070 0ustar andreasadminCode Model Test: d_source + d_ram * (compile (concat "SPICE_SCRIPTS=. ../../../src/ngspice " buffer-file-name) t) vdummy dummy 0 DC=0 a_source [a0 a1 a2 d0 d1 d2 d3 d4 we cs] d_source1 aram [d0 d1 d2 d3 d4] [o0 o1 o2 o3 o4] [a0 a1 a2] we [cs] d_ram1 .model d_source1 d_source input_file="d_ram-stimulus.txt" .model d_ram1 d_ram (select_value=1 ic=2 read_delay=1ns) .control set noaskquit set noacct tran 100ps 350ns eprint a0 a1 a2 d0 d1 d2 d3 d4 o0 o1 o2 o3 o4 we cs .endc .end ngspice-26/tests/xspice/digital/d_state.cir0000644000265600020320000000113112264261473020421 0ustar andreasadminCode Model Test: d_source + d_state * (compile (concat "SPICE_SCRIPTS=. ../../../src/ngspice " buffer-file-name) t) vdummy dummy 0 DC=0 a_source [enable reset up] d_source1 a_osc [enable clk] clk d_xor1 a_counter [up] clk reset [o1 o2] d_state1 .model d_source1 d_source (input_file="d_state-stimulus.txt") .model d_xor1 d_xor (rise_delay=1ns fall_delay=1ns) .model d_state1 d_state (clk_delay=0.1ns reset_delay=0.1ns + state_file="d_state-updn.txt" reset_state=0) .control set noaskquit set noacct tran 100ps 20ns eprint clk up reset o1 o2 .endc .end ngspice-26/tests/xspice/digital/Makefile.am0000644000265600020320000000067412264261473020346 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ d_ram.cir \ d_source.cir \ d_state.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) SPICE_SCRIPTS=. $(SHELL) $(top_srcdir)/tests/bin/check.sh "$(top_builddir)/src/ngspice -r foobaz" EXTRA_DIST = \ d_ram-stimulus.txt \ d_source-stimulus.txt \ d_state-stimulus.txt \ d_state-updn.txt \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/xspice/digital/Makefile.in0000644000265600020320000003427412264261542020357 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/xspice/digital DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ $(srcdir)/spinit.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = spinit CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ d_ram.cir \ d_source.cir \ d_state.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) SPICE_SCRIPTS=. $(SHELL) $(top_srcdir)/tests/bin/check.sh "$(top_builddir)/src/ngspice -r foobaz" EXTRA_DIST = \ d_ram-stimulus.txt \ d_source-stimulus.txt \ d_state-stimulus.txt \ d_state-updn.txt \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/xspice/digital/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/xspice/digital/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): spinit: $(top_builddir)/config.status $(srcdir)/spinit.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/xspice/digital/d_source.cir0000644000265600020320000000054012264261473020604 0ustar andreasadminCode Model Test: d_source * (compile (concat "SPICE_SCRIPTS=. ../../../src/ngspice " buffer-file-name) t) vdummy dummy 0 DC=0 a_source [a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab] d_source1 .model d_source1 d_source (input_file="d_source-stimulus.txt") .control set noaskquit set noacct tran 100ps 30ns eprint a1 a2 a3 a4 a5 a6 a7 a8 a9 aa ab .endc .end ngspice-26/tests/xspice/Makefile.am0000644000265600020320000000016112264261473016720 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = digital MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/xspice/Makefile.in0000644000265600020320000004354212264261542016740 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/xspice DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = digital MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/xspice/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/xspice/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/transient/0000755000265600020320000000000012264261715015401 5ustar andreasadminngspice-26/tests/transient/fourbitadder.out0000644000265600020320000003553712264261473020622 0ustar andreasadmin Circuit: 4 bit adder Warning -- Level not specified on line "(bf=75 rb=100 cje=1pf cjc=3pf)" Using level 1. Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 99 5 1 0 2 0 3 0 4 0 5 0 6 0 7 0 8 0 1:1:1:1:9 0.0179277 1:1:1:1:5 0.826789 1:1:1:1:6 4.97244 1:1:1:1:8 3.54606e-09 1:1:1:1:7 4.83208 1:1:1:1:10 4.18989 1:1:1:7 3.52783 1:1:1:2:9 0.0363158 1:1:1:2:5 0.844836 1:1:1:2:6 4.99412 1:1:1:2:8 3.66756e-09 1:1:1:2:7 4.96415 1:1:1:2:10 4.25286 1:1:1:8 3.63074 1:1:1:3:9 0.0363158 1:1:1:3:5 0.844836 1:1:1:3:6 4.99412 1:1:1:3:8 3.66756e-09 1:1:1:3:7 4.96415 1:1:1:3:10 4.25286 1:1:1:9 3.63074 1:1:1:4:9 1.99534 1:1:1:4:5 2.76452 1:1:1:4:6 1.10792 1:1:1:4:8 1.07019 1:1:1:4:7 4.99984 1:1:1:4:10 0.507271 1:1:1:10 0.0253869 1:1:1:5:9 0.0277172 1:1:1:5:5 0.836398 1:1:1:5:6 4.97251 1:1:1:5:8 3.55613e-09 1:1:1:5:7 4.83248 1:1:1:5:10 4.19002 1:1:1:11 3.52802 1:1:1:6:9 0.0363158 1:1:1:6:5 0.844836 1:1:1:6:6 4.9941 1:1:1:6:8 3.66742e-09 1:1:1:6:7 4.96406 1:1:1:6:10 4.25278 1:1:1:12 3.63059 1:1:1:7:9 0.0617017 1:1:1:7:5 0.869755 1:1:1:7:6 4.9941 1:1:1:7:8 3.6935e-09 1:1:1:7:7 4.96406 1:1:1:7:10 4.25278 1:1:1:13 3.63059 1:1:1:8:9 1.98972 1:1:1:8:5 2.75903 1:1:1:8:6 1.10196 1:1:1:8:8 1.06424 1:1:1:8:7 4.99984 1:1:1:8:10 0.500516 9 0.0178393 1:1:1:9:9 1.9967 1:1:1:9:5 2.76585 1:1:1:9:6 1.10936 1:1:1:9:8 1.07163 1:1:1:9:7 4.99984 1:1:1:9:10 0.508909 1:1:10 0.0272212 1:1:2:1:9 0.0179277 1:1:2:1:5 0.826789 1:1:2:1:6 4.97244 1:1:2:1:8 3.54606e-09 1:1:2:1:7 4.83208 1:1:2:1:10 4.18989 1:1:2:7 3.52783 1:1:2:2:9 0.0363158 1:1:2:2:5 0.844836 1:1:2:2:6 4.99412 1:1:2:2:8 3.6676e-09 1:1:2:2:7 4.96417 1:1:2:2:10 4.25288 1:1:2:8 3.63077 1:1:2:3:9 0.0363158 1:1:2:3:5 0.844836 1:1:2:3:6 4.99412 1:1:2:3:8 3.6676e-09 1:1:2:3:7 4.96417 1:1:2:3:10 4.25288 1:1:2:9 3.63077 1:1:2:4:9 1.9967 1:1:2:4:5 2.76585 1:1:2:4:6 1.10936 1:1:2:4:8 1.07163 1:1:2:4:7 4.99984 1:1:2:4:10 0.508909 1:1:2:10 0.0272212 1:1:2:5:9 0.0451489 1:1:2:5:5 0.85351 1:1:2:5:6 4.97258 1:1:2:5:8 3.57407e-09 1:1:2:5:7 4.83293 1:1:2:5:10 4.19017 1:1:2:11 3.52824 1:1:2:6:9 0.063536 1:1:2:6:5 0.871555 1:1:2:6:6 4.9941 1:1:2:6:8 3.69541e-09 1:1:2:6:7 4.96406 1:1:2:6:10 4.25278 1:1:2:12 3.63059 1:1:2:7:9 0.063536 1:1:2:7:5 0.871555 1:1:2:7:6 4.9941 1:1:2:7:8 3.69541e-09 1:1:2:7:7 4.96406 1:1:2:7:10 4.25278 1:1:2:13 3.63059 1:1:2:8:9 1.98972 1:1:2:8:5 2.75903 1:1:2:8:6 1.10196 1:1:2:8:8 1.06424 1:1:2:8:7 4.99984 1:1:2:8:10 0.500516 10 0.0178393 1:1:2:9:9 1.9967 1:1:2:9:5 2.76585 1:1:2:9:6 1.10936 1:1:2:9:8 1.07163 1:1:2:9:7 4.99984 1:1:2:9:10 0.508909 1:16 0.0272212 1:2:1:1:9 0.0179277 1:2:1:1:5 0.826789 1:2:1:1:6 4.97244 1:2:1:1:8 3.54606e-09 1:2:1:1:7 4.83208 1:2:1:1:10 4.18989 1:2:1:7 3.52783 1:2:1:2:9 0.0363158 1:2:1:2:5 0.844836 1:2:1:2:6 4.99412 1:2:1:2:8 3.6676e-09 1:2:1:2:7 4.96417 1:2:1:2:10 4.25288 1:2:1:8 3.63077 1:2:1:3:9 0.0363158 1:2:1:3:5 0.844836 1:2:1:3:6 4.99412 1:2:1:3:8 3.6676e-09 1:2:1:3:7 4.96417 1:2:1:3:10 4.25288 1:2:1:9 3.63077 1:2:1:4:9 1.9967 1:2:1:4:5 2.76585 1:2:1:4:6 1.10936 1:2:1:4:8 1.07163 1:2:1:4:7 4.99984 1:2:1:4:10 0.508909 1:2:1:10 0.0272212 1:2:1:5:9 0.0451489 1:2:1:5:5 0.85351 1:2:1:5:6 4.97258 1:2:1:5:8 3.57407e-09 1:2:1:5:7 4.83293 1:2:1:5:10 4.19017 1:2:1:11 3.52824 1:2:1:6:9 0.063536 1:2:1:6:5 0.871555 1:2:1:6:6 4.9941 1:2:1:6:8 3.69541e-09 1:2:1:6:7 4.96406 1:2:1:6:10 4.25278 1:2:1:12 3.63059 1:2:1:7:9 0.063536 1:2:1:7:5 0.871555 1:2:1:7:6 4.9941 1:2:1:7:8 3.69541e-09 1:2:1:7:7 4.96406 1:2:1:7:10 4.25278 1:2:1:13 3.63059 1:2:1:8:9 1.98972 1:2:1:8:5 2.75903 1:2:1:8:6 1.10196 1:2:1:8:8 1.06424 1:2:1:8:7 4.99984 1:2:1:8:10 0.500516 11 0.0178393 1:2:1:9:9 1.9967 1:2:1:9:5 2.76585 1:2:1:9:6 1.10936 1:2:1:9:8 1.07163 1:2:1:9:7 4.99984 1:2:1:9:10 0.508909 1:2:10 0.0272212 1:2:2:1:9 0.0179277 1:2:2:1:5 0.826789 1:2:2:1:6 4.97243 1:2:2:1:8 3.54601e-09 1:2:2:1:7 4.83197 1:2:2:1:10 4.18986 1:2:2:7 3.52778 1:2:2:2:9 0.0363158 1:2:2:2:5 0.844836 1:2:2:2:6 4.99412 1:2:2:2:8 3.6676e-09 1:2:2:2:7 4.96417 1:2:2:2:10 4.25288 1:2:2:8 3.63077 1:2:2:3:9 0.0363158 1:2:2:3:5 0.844836 1:2:2:3:6 4.99412 1:2:2:3:8 3.6676e-09 1:2:2:3:7 4.96417 1:2:2:3:10 4.25288 1:2:2:9 3.63077 1:2:2:4:9 1.9967 1:2:2:4:5 2.76585 1:2:2:4:6 1.10936 1:2:2:4:8 1.07163 1:2:2:4:7 4.99984 1:2:2:4:10 0.508909 1:2:2:10 0.0272212 1:2:2:5:9 0.0451489 1:2:2:5:5 0.85351 1:2:2:5:6 4.97257 1:2:2:5:8 3.57402e-09 1:2:2:5:7 4.83282 1:2:2:5:10 4.19014 1:2:2:11 3.52819 1:2:2:6:9 0.063536 1:2:2:6:5 0.871555 1:2:2:6:6 4.9941 1:2:2:6:8 3.69541e-09 1:2:2:6:7 4.96406 1:2:2:6:10 4.25278 1:2:2:12 3.63059 1:2:2:7:9 0.063536 1:2:2:7:5 0.871555 1:2:2:7:6 4.9941 1:2:2:7:8 3.69541e-09 1:2:2:7:7 4.96406 1:2:2:7:10 4.25278 1:2:2:13 3.63059 1:2:2:8:9 1.98972 1:2:2:8:5 2.75903 1:2:2:8:6 1.10196 1:2:2:8:8 1.06424 1:2:2:8:7 4.99984 1:2:2:8:10 0.500516 12 0.0178393 1:2:2:9:9 1.98972 1:2:2:9:5 2.75903 1:2:2:9:6 1.10196 1:2:2:9:8 1.06424 1:2:2:9:7 4.99984 1:2:2:9:10 0.500516 13 0.0178393 vin4b#branch 0.00207527 vin4a#branch 0.00207527 vin3b#branch 0.00207527 vin3a#branch 0.00207527 vin2b#branch 0.00207527 vin2a#branch 0.00207527 vin1b#branch 0.00207527 vin1a#branch 0.00207527 vcc#branch -0.0757537 No. of Data Rows : 60 4 bit adder -------------------------------------------------------------------------------- Index time v(1) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 1 3.000000e-13 9.000000e-05 2 6.000000e-13 1.800000e-04 3 1.200000e-12 3.600000e-04 4 2.400000e-12 7.200000e-04 5 4.800000e-12 1.440000e-03 6 9.600000e-12 2.880000e-03 7 1.920000e-11 5.760000e-03 8 3.840000e-11 1.152000e-02 9 7.680000e-11 2.304000e-02 10 1.536000e-10 4.608000e-02 11 2.577473e-10 7.732420e-02 12 3.777473e-10 1.133242e-01 13 4.977473e-10 1.493242e-01 14 6.177473e-10 1.853242e-01 15 7.377473e-10 2.213242e-01 16 8.577473e-10 2.573242e-01 17 9.777473e-10 2.933242e-01 18 1.097747e-09 3.293242e-01 19 1.217747e-09 3.653242e-01 20 1.337747e-09 4.013242e-01 21 1.457747e-09 4.373242e-01 22 1.577747e-09 4.733242e-01 23 1.697747e-09 5.093242e-01 24 1.817747e-09 5.453242e-01 25 1.937747e-09 5.813242e-01 26 2.057747e-09 6.173242e-01 27 2.177747e-09 6.533242e-01 28 2.297747e-09 6.893242e-01 29 2.417747e-09 7.253242e-01 30 2.537747e-09 7.613242e-01 31 2.657747e-09 7.973242e-01 32 2.777747e-09 8.333242e-01 33 2.897747e-09 8.693242e-01 34 3.017747e-09 9.053242e-01 35 3.137747e-09 9.413242e-01 36 3.257747e-09 9.773242e-01 37 3.377747e-09 1.013324e+00 38 3.497747e-09 1.049324e+00 39 3.617747e-09 1.085324e+00 40 3.737747e-09 1.121324e+00 41 3.857747e-09 1.157324e+00 42 3.977747e-09 1.193324e+00 43 4.097747e-09 1.229324e+00 44 4.217747e-09 1.265324e+00 45 4.337747e-09 1.301324e+00 46 4.457747e-09 1.337324e+00 47 4.577747e-09 1.373324e+00 48 4.697747e-09 1.409324e+00 49 4.817747e-09 1.445324e+00 50 4.937747e-09 1.481324e+00 51 5.057747e-09 1.517324e+00 52 5.177747e-09 1.553324e+00 53 5.297747e-09 1.589324e+00 54 5.417747e-09 1.625324e+00 Index time v(1) -------------------------------------------------------------------------------- 55 5.537747e-09 1.661324e+00 56 5.657747e-09 1.697324e+00 57 5.777747e-09 1.733324e+00 58 5.897747e-09 1.769324e+00 59 6.000000e-09 1.800000e+00 ngspice-26/tests/transient/fourbitadder.cir0000644000265600020320000000270512264261473020557 0ustar andreasadmin4 bit adder * Models: .MODEL dmod D .MODEL qmod NPN(level=1 BF=75 RB=100 CJE=1PF CJC=3PF) .options noacct .SUBCKT NAND 1 2 3 4 * noeuds: entrees(2) sortie vcc q1 9 5 1 qmod d1clamp 0 1 dmod q2 9 5 2 qmod d2clamp 0 2 dmod rb 4 5 4k r1 4 6 1.6k q3 6 9 8 qmod r2 8 0 1k rc 4 7 130 q4 7 6 10 qmod dvbedrop 10 3 dmod q5 3 8 0 qmod .ends NAND .SUBCKT ONEBIT 1 2 3 4 5 6 * noeuds entrees(2) ,carryin, sortie, carryout, vcc x1 1 2 7 6 NAND x2 1 7 8 6 NAND x3 2 7 9 6 NAND x4 8 9 10 6 NAND x5 3 10 11 6 NAND x6 3 11 12 6 NAND x7 10 11 13 6 NAND x8 12 13 4 6 NAND x9 11 7 5 6 NAND .ends ONEBIT .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 * noeuds x1 1 2 7 5 10 9 ONEBIT x2 3 4 10 6 8 9 ONEBIT .ends TWOBIT .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x1 1 2 3 4 9 10 13 16 15 TWOBIT x2 5 6 7 8 11 12 16 14 15 TWOBIT .ends FOURBIT * Inputs/Supplies: vcc 99 0 DC 5V VIN1A 1 0 DC 0 pulse(0 3 0 10ns 10ns 10ns 50ns) VIN1B 2 0 DC 0 pulse(0 3 0 10ns 10ns 20ns 100ns) VIN2A 3 0 DC 0 pulse(0 3 0 10ns 10ns 40ns 200ns) VIN2B 4 0 DC 0 pulse(0 3 0 10ns 10ns 80ns 400ns) VIN3A 5 0 DC 0 pulse(0 3 0 10ns 10ns 160ns 800ns) VIN3B 6 0 DC 0 pulse(0 3 0 10ns 10ns 320ns 1600ns) VIN4A 7 0 DC 0 pulse(0 3 0 10ns 10ns 640ns 3200ns) VIN4B 8 0 DC 0 pulse(0 3 0 10ns 10ns 1280ns 6400ns) * Circuit description: x1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT rbit0 9 0 1k rbit1 10 0 1k rbit2 11 0 1k rbit3 12 0 1k rcout 13 0 1k * Analysys: .tran 1ns 6ns .print tran v(1) .end ngspice-26/tests/transient/Makefile.am0000644000265600020320000000040412264261473017434 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = fourbitadder.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/transient/Makefile.in0000644000265600020320000003353612264261542017456 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/transient DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = fourbitadder.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/transient/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/transient/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/README0000644000265600020320000000166312264261473014261 0ustar andreasadminngspice test and example files: =============================== This directory is organized as a tree of subdirectories containing test files for devices and analyses implemented in ngspice. Some files comes from the original Spice3f5 package and others have been contributed by developers and users. File Extension Convention: .cir : Circuit file. This can be a simple circuit description or a spice2 input file. .out : .cir files have been run and results are recorded into this type of file. This is useful if want to test ngspice against known (hopefully correct results). REPLICATE TESTS To replicate tests you have to launch configure without any option and compile ngspice. In the future this will change. TO ADD NEW TESTS Take an existing test and adopt it to your liking. Add the test script and its supporting files to Makefile.am. Use `make check' to see your new test in action. ngspice-26/tests/polezero/0000755000265600020320000000000012264261714015230 5ustar andreasadminngspice-26/tests/polezero/pz2.cir0000644000265600020320000000045512264261473016450 0ustar andreasadmintest pz iin 1 0 ac r1 1 0 1.019524e+9Ohms l1 1 0 1H gm2 2 0 1 0 1 r2 2 0 8.296965e+08Ohms l2 2 0 1H gm3 3 0 2 0 1 r3 3 0 8.652054e+07Ohms l3 3 0 1H gm4 4 0 3 0 1 r4 4 0 1.060594e+07Ohms l4 4 0 1H *gm5 5 0 4 0 1 *r5 5 0 10Ohms *l5 5 0 0.66mH .options noacct .pz 1 0 4 0 cur pol .print pz all .end ngspice-26/tests/polezero/simplepz.cir0000644000265600020320000000021212264261473017567 0ustar andreasadmintest circuit #1 for pz analysis:high pass filter r1 1 0 1k r2 2 0 1k c1 1 2 1.0e-12 .options noacct .pz 1 0 2 0 cur pz .print pz all .end ngspice-26/tests/polezero/pzt.cir0000644000265600020320000000042112264261473016543 0ustar andreasadmintest pz iin 1 0 ac r1 1 0 1Ohms l1 1 0 0.05H gm2 2 0 1 0 1 r2 2 0 1Ohms l2 2 0 0.05H gm3 3 0 2 0 1 r3 3 0 1Ohms l3 3 0 0.05H *gm4 4 0 3 0 1 *r4 4 0 1Ohms *l4 4 0 0.05H *gm5 5 0 4 0 1 *r5 5 0 10Ohms *l5 5 0 0.66mH .options noacct .pz 1 0 3 0 cur pol .print pz all .end ngspice-26/tests/polezero/filt_bridge_t.cir0000644000265600020320000000020512264261473020523 0ustar andreasadminBRIDGE-T FILTER V1 1 0 12 AC 1 C1 1 2 1U C2 2 3 1U R3 2 0 1K R4 1 3 1K * .options noacct .OP .PZ 1 0 3 0 VOL PZ .PRINT PZ ALL * .END ngspice-26/tests/polezero/pz2.out0000644000265600020320000000147512264261473016505 0ustar andreasadminWarning: Source iin has no value, DC 0 assumed No. of Data Rows : 1 Circuit: test pz Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 test pz -------------------------------------------------------------------------------- Index pole(1) pole(2) -------------------------------------------------------------------------------- 0 -1.019524e+09, 0.000000e+00 -8.296965e+08, 0.000000e+00 test pz -------------------------------------------------------------------------------- Index pole(3) pole(4) -------------------------------------------------------------------------------- 0 -8.652054e+07, 0.000000e+00 -1.060594e+07, 0.000000e+00 ngspice-26/tests/polezero/filt_multistage.out0000644000265600020320000000134512264261473021162 0ustar andreasadmin No. of Data Rows : 1 Circuit: Multistage filter Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Multistage filter -------------------------------------------------------------------------------- Index pole(1) pole(2) -------------------------------------------------------------------------------- 0 -5.000000e+10, 0.000000e+00 -8.000000e+08, 0.000000e+00 Multistage filter -------------------------------------------------------------------------------- Index pole(3) -------------------------------------------------------------------------------- 0 -1.000000e+08, 0.000000e+00 ngspice-26/tests/polezero/filt_rc.cir0000644000265600020320000000014512264261473017353 0ustar andreasadminRC filter v1 1 0 0 ac 1.0 r1 1 2 1k c1 2 0 10p .options noacct .pz 1 0 2 0 vol pz .print pz all .end ngspice-26/tests/polezero/pzt.out0000644000265600020320000000140112264261473016574 0ustar andreasadminWarning: Source iin has no value, DC 0 assumed No. of Data Rows : 1 Circuit: test pz Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 test pz -------------------------------------------------------------------------------- Index pole(1) pole(2) -------------------------------------------------------------------------------- 0 -2.000000e+01, 0.000000e+00 -2.000000e+01, 0.000000e+00 test pz -------------------------------------------------------------------------------- Index pole(3) -------------------------------------------------------------------------------- 0 -2.000000e+01, 0.000000e+00 ngspice-26/tests/polezero/filt_multistage.cir0000644000265600020320000000026612264261473021131 0ustar andreasadminMultistage filter v1 1 0 0 ac 1.0 r1 1 2 1k c1 2 0 10p e2 3 0 2 0 10 r2 3 4 1k c2 4 0 1.25p e3 5 0 4 0 10 r3 5 6 1k c3 6 0 .02p .options noacct .pz 1 0 6 0 vol pz .print pz all .end ngspice-26/tests/polezero/Makefile.am0000644000265600020320000000053012264261473017264 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ filt_multistage.cir \ filt_rc.cir \ filt_bridge_t.cir \ pz2.cir \ pzt.cir \ simplepz.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/polezero/Makefile.in0000644000265600020320000003366112264261542017305 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/polezero DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ filt_multistage.cir \ filt_rc.cir \ filt_bridge_t.cir \ pz2.cir \ pzt.cir \ simplepz.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/polezero/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/polezero/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/polezero/filt_rc.out0000644000265600020320000000060012264261473017401 0ustar andreasadmin No. of Data Rows : 1 Circuit: RC filter Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 RC filter -------------------------------------------------------------------------------- Index all -------------------------------------------------------------------------------- 0 -1.000000e+08, 0.000000e+00 ngspice-26/tests/polezero/filt_bridge_t.out0000644000265600020320000000605212264261473020563 0ustar andreasadmin No. of Data Rows : 1 No. of Data Rows : 1 Circuit: BRIDGE-T FILTER Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Node Voltage ---- ------- ---- ------- V(3) 1.200000e+01 V(2) 0.000000e+00 V(1) 1.200000e+01 Source Current ------ ------- v1#branch 0.000000e+00 Capacitor models (Fixed capacitor) model C cap 0 cj 0 cjsw 0 defw 1e-05 defl 0 narrow 0 short 0 tc1 0 tc2 0 di 0 thick 0 Resistor models (Simple linear resistor) model R rsh 0 narrow 0 short 0 tc1 0 tc2 0 defw 1e-05 kf 0 af 0 Capacitor: Fixed capacitor device c2 c1 model C C capacitance 1e-06 1e-06 cap 1e-06 1e-06 c 1e-06 1e-06 dtemp 0 0 i 0 0 p 0 0 Resistor: Simple linear resistor device r4 r3 model R R resistance 1000 1000 ac 1000 1000 dtemp 0 0 noisy 1 1 i 0 0 p 0 0 Vsource: Independent voltage source device v1 dc 12 acmag 1 i 0 p -0 BRIDGE-T FILTER -------------------------------------------------------------------------------- Index pole(1) pole(2) -------------------------------------------------------------------------------- 0 -2.618034e+03, 0.000000e+00 -3.819660e+02, 0.000000e+00 BRIDGE-T FILTER -------------------------------------------------------------------------------- Index zero(1) zero(2) -------------------------------------------------------------------------------- 0 -1.000000e+03, 0.000000e+00 -1.000000e+03, 0.000000e+00 ngspice-26/tests/polezero/simplepz.out0000644000265600020320000000076612264261473017637 0ustar andreasadmin No. of Data Rows : 1 Circuit: test circuit #1 for pz analysis:high pass filter Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 test circuit #1 for pz analysis:high pass filter -------------------------------------------------------------------------------- Index pole(1) zero(1) -------------------------------------------------------------------------------- 0 -5.000000e+08, 0.000000e+00 0.000000e+00, 0.000000e+00 ngspice-26/tests/ChangeLog0000644000265600020320000000125012264261473015143 0ustar andreasadmin2001-12-07 Paolo Nenzi * tests/: added mesa tests from macspice3f4 and corrected all other tests. 2001-12-04 Emmanuel Rouat * check.sh (testdir): turned that script into 'real' sh script (was bash, really) 2000-09-14 Arno W. Peters * diffpair.out, filters/lowpass.out, polezero/filt_bridge_t.out, polezero/filt_multistage.out, polezero/filt_rc.out, resistance/res_array.out, resistance/res_partition.out: Updated for new spice output. 2000-09-09 Arno W. Peters * fourbitadder.out, resistance/res_simple.out: Updated to correspond to the new output from ngspice. ngspice-26/tests/hisim/0000755000265600020320000000000012264261714014502 5ustar andreasadminngspice-26/tests/hisim/pmos/0000755000265600020320000000000012264261473015462 5ustar andreasadminngspice-26/tests/hisim/pmos/reference/0000755000265600020320000000000012264261473017420 5ustar andreasadminngspice-26/tests/hisim/pmos/reference/56_acFreq_CONQS=0.standard0000644000265600020320000002530212264261473023777 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/53_acFreq_COSTI=1.standard0000644000265600020320000002530212264261473023773 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/75_noise_COIGN=1_T27.standard0000644000265600020320000000710012264261473024321 0ustar andreasadminFreq N(g) 1000 9.580197e-39 1258.925 1.518359e-38 1584.893 2.406437e-38 1995.262 3.813945e-38 2511.886 6.044696e-38 3162.278 9.580197e-38 3981.072 1.518359e-37 5011.872 2.406437e-37 6309.573 3.813945e-37 7943.282 6.044696e-37 10000 9.580197e-37 12589.25 1.518359e-36 15848.93 2.406437e-36 19952.62 3.813945e-36 25118.86 6.044696e-36 31622.78 9.580197e-36 39810.72 1.518359e-35 50118.72 2.406437e-35 63095.73 3.813945e-35 79432.82 6.044696e-35 100000 9.580197e-35 125892.5 1.518359e-34 158489.3 2.406437e-34 199526.2 3.813945e-34 251188.6 6.044696e-34 316227.8 9.580197e-34 398107.2 1.518359e-33 501187.2 2.406437e-33 630957.3 3.813945e-33 794328.2 6.044696e-33 1000000 9.580197e-33 1258925 1.518359e-32 1584893 2.406437e-32 1995262 3.813945e-32 2511886 6.044696e-32 3162278 9.580197e-32 3981072 1.518359e-31 5011872 2.406437e-31 6309573 3.813945e-31 7943282 6.044696e-31 10000000 9.580197e-31 12589250 1.518359e-30 15848930 2.406437e-30 19952620 3.813945e-30 25118860 6.044696e-30 31622780 9.580197e-30 39810720 1.518359e-29 50118720 2.406437e-29 63095730 3.813945e-29 79432820 6.044696e-29 100000000 9.580197e-29 125892500 1.518359e-28 158489300 2.406437e-28 199526200 3.813945e-28 251188600 6.044696e-28 316227800 9.580197e-28 398107200 1.518359e-27 501187200 2.406437e-27 630957300 3.813945e-27 794328200 6.044696e-27 1000000000 9.580197e-27 1258925000 1.518359e-26 1584893000 2.406437e-26 1995262000 3.813945e-26 2511886000 6.044696e-26 3162278000 9.580197e-26 3981072000 1.518359e-25 5011872000 2.406437e-25 6309573000 3.813945e-25 7943282000 6.044696e-25 10000000000 9.580197e-25 12589250000 1.518359e-24 15848930000 2.406437e-24 19952620000 3.813945e-24 25118860000 6.044696e-24 31622780000 9.580197e-24 39810720000 1.518359e-23 50118720000 2.406437e-23 63095730000 3.813945e-23 79432820000 6.044696e-23 100000000000 9.580197e-23 1000 5.573819e-39 1258.925 8.833907e-39 1584.893 1.40008e-38 1995.262 2.218977e-38 2511.886 3.516842e-38 3162.278 5.573819e-38 3981.072 8.833907e-38 5011.872 1.40008e-37 6309.573 2.218977e-37 7943.282 3.516842e-37 10000 5.573819e-37 12589.25 8.833907e-37 15848.93 1.40008e-36 19952.62 2.218977e-36 25118.86 3.516842e-36 31622.78 5.573819e-36 39810.72 8.833907e-36 50118.72 1.40008e-35 63095.73 2.218977e-35 79432.82 3.516842e-35 100000 5.573819e-35 125892.5 8.833907e-35 158489.3 1.40008e-34 199526.2 2.218977e-34 251188.6 3.516842e-34 316227.8 5.573819e-34 398107.2 8.833907e-34 501187.2 1.40008e-33 630957.3 2.218977e-33 794328.2 3.516842e-33 1000000 5.573819e-33 1258925 8.833907e-33 1584893 1.40008e-32 1995262 2.218977e-32 2511886 3.516842e-32 3162278 5.573819e-32 3981072 8.833907e-32 5011872 1.40008e-31 6309573 2.218977e-31 7943282 3.516842e-31 10000000 5.573819e-31 12589250 8.833907e-31 15848930 1.40008e-30 19952620 2.218977e-30 25118860 3.516842e-30 31622780 5.573819e-30 39810720 8.833907e-30 50118720 1.40008e-29 63095730 2.218977e-29 79432820 3.516842e-29 100000000 5.573819e-29 125892500 8.833907e-29 158489300 1.40008e-28 199526200 2.218977e-28 251188600 3.516842e-28 316227800 5.573819e-28 398107200 8.833907e-28 501187200 1.40008e-27 630957300 2.218977e-27 794328200 3.516842e-27 1000000000 5.573819e-27 1258925000 8.833907e-27 1584893000 1.40008e-26 1995262000 2.218977e-26 2511886000 3.516842e-26 3162278000 5.573819e-26 3981072000 8.833907e-26 5011872000 1.40008e-25 6309573000 2.218977e-25 7943282000 3.516842e-25 10000000000 5.573819e-25 12589250000 8.833907e-25 15848930000 1.40008e-24 19952620000 2.218977e-24 25118860000 3.516842e-24 31622780000 5.573819e-24 39810720000 8.833907e-24 50118720000 1.40008e-23 63095730000 2.218977e-23 79432820000 3.516842e-23 100000000000 5.573819e-23 ngspice-26/tests/hisim/pmos/reference/10_dcSweep_COGIDL=0.standard0000644000265600020320000003447412264261473024246 0ustar andreasadminV(d) I(d) I(b) -2.000000e-01 -4.699615e-05 3.553410e-12 -3.000000e-01 -5.356446e-05 2.604381e-11 -4.000000e-01 -6.033229e-05 1.060519e-10 -5.000000e-01 -6.744961e-05 3.031405e-10 -6.000000e-01 -7.492488e-05 6.816477e-10 -7.000000e-01 -8.274355e-05 1.290438e-09 -8.000000e-01 -9.090086e-05 2.152985e-09 -9.000000e-01 -9.940156e-05 3.270759e-09 -1.000000e+00 -1.082558e-04 4.632738e-09 -1.100000e+00 -1.174767e-04 6.223881e-09 -1.200000e+00 -1.270787e-04 8.030011e-09 -1.300000e+00 -1.370779e-04 1.003970e-08 -1.400000e+00 -1.474909e-04 1.224448e-08 -1.500000e+00 -1.583356e-04 1.463841e-08 -1.600000e+00 -1.696309e-04 1.721747e-08 -1.700000e+00 -1.813967e-04 1.997900e-08 -1.800000e+00 -1.936544e-04 2.292131e-08 -2.000000e-01 -3.236954e-04 9.068226e-14 -3.000000e-01 -3.722842e-04 2.582050e-12 -4.000000e-01 -4.052187e-04 2.028808e-11 -5.000000e-01 -4.371929e-04 8.483953e-11 -6.000000e-01 -4.684502e-04 2.438000e-10 -7.000000e-01 -4.993050e-04 5.470330e-10 -8.000000e-01 -5.300668e-04 1.033158e-09 -9.000000e-01 -5.609701e-04 1.724361e-09 -1.000000e+00 -5.921851e-04 2.628901e-09 -1.100000e+00 -6.238365e-04 3.746428e-09 -1.200000e+00 -6.560177e-04 5.072606e-09 -1.300000e+00 -6.888017e-04 6.601981e-09 -1.400000e+00 -7.222475e-04 8.329402e-09 -1.500000e+00 -7.564047e-04 1.025054e-08 -1.600000e+00 -7.913168e-04 1.236199e-08 -1.700000e+00 -8.270229e-04 1.466113e-08 -1.800000e+00 -8.635594e-04 1.714602e-08 -2.000000e-01 -6.362416e-04 2.000000e-16 -3.000000e-01 -8.252108e-04 4.608147e-16 -4.000000e-01 -9.384887e-04 3.007756e-13 -5.000000e-01 -1.006766e-03 6.577786e-12 -6.000000e-01 -1.066911e-03 4.069423e-11 -7.000000e-01 -1.125791e-03 1.406359e-10 -8.000000e-01 -1.183256e-03 3.490034e-10 -9.000000e-01 -1.239417e-03 7.018357e-10 -1.000000e+00 -1.294579e-03 1.223940e-09 -1.100000e+00 -1.349080e-03 1.929691e-09 -1.200000e+00 -1.403218e-03 2.826014e-09 -1.300000e+00 -1.457240e-03 3.915316e-09 -1.400000e+00 -1.511342e-03 5.197610e-09 -1.500000e+00 -1.565681e-03 6.671811e-09 -1.600000e+00 -1.620381e-03 8.336449e-09 -1.700000e+00 -1.675542e-03 1.019003e-08 -1.800000e+00 -1.731249e-03 1.223120e-08 -2.000000e-01 -8.942919e-04 2.000000e-16 -3.000000e-01 -1.221693e-03 3.000000e-16 -4.000000e-01 -1.471297e-03 4.000000e-16 -5.000000e-01 -1.648885e-03 5.082379e-16 -6.000000e-01 -1.767189e-03 2.747811e-13 -7.000000e-01 -1.854914e-03 7.970863e-12 -8.000000e-01 -1.937134e-03 4.953345e-11 -9.000000e-01 -2.017933e-03 1.637565e-10 -1.000000e+00 -2.097231e-03 3.879594e-10 -1.100000e+00 -2.174955e-03 7.511815e-10 -1.200000e+00 -2.251233e-03 1.273343e-09 -1.300000e+00 -2.326299e-03 1.966987e-09 -1.400000e+00 -2.400414e-03 2.839496e-09 -1.500000e+00 -2.473834e-03 3.894923e-09 -1.600000e+00 -2.546784e-03 5.135295e-09 -1.700000e+00 -2.619461e-03 6.561454e-09 -1.800000e+00 -2.692033e-03 8.173579e-09 -2.000000e-01 -1.099660e-03 2.000000e-16 -3.000000e-01 -1.542998e-03 3.000000e-16 -4.000000e-01 -1.912357e-03 4.000000e-16 -5.000000e-01 -2.210948e-03 5.000000e-16 -6.000000e-01 -2.443263e-03 6.000000e-16 -7.000000e-01 -2.616248e-03 7.000015e-16 -8.000000e-01 -2.743263e-03 1.093928e-13 -9.000000e-01 -2.847346e-03 6.260229e-12 -1.000000e+00 -2.946866e-03 4.545125e-11 -1.100000e+00 -3.044793e-03 1.569013e-10 -1.200000e+00 -3.141253e-03 3.759662e-10 -1.300000e+00 -3.236151e-03 7.291703e-10 -1.400000e+00 -3.329503e-03 1.234825e-09 -1.500000e+00 -3.421424e-03 1.905019e-09 -1.600000e+00 -3.512088e-03 2.747505e-09 -1.700000e+00 -3.601689e-03 3.767150e-09 -1.800000e+00 -3.690424e-03 4.966940e-09 -2.000000e-01 -1.323288e-03 2.000000e-16 -3.000000e-01 -1.900779e-03 3.000000e-16 -4.000000e-01 -2.413864e-03 4.000000e-16 -5.000000e-01 -2.862055e-03 5.000000e-16 -6.000000e-01 -3.247311e-03 6.000000e-16 -7.000000e-01 -3.572769e-03 7.000000e-16 -8.000000e-01 -3.842246e-03 8.000000e-16 -9.000000e-01 -4.060779e-03 9.000000e-16 -1.000000e+00 -4.235768e-03 1.000000e-15 -1.100000e+00 -4.377686e-03 6.231963e-15 -1.200000e+00 -4.501075e-03 2.497943e-12 -1.300000e+00 -4.619790e-03 2.929002e-11 -1.400000e+00 -4.736666e-03 1.203504e-10 -1.500000e+00 -4.852063e-03 3.123339e-10 -1.600000e+00 -4.966007e-03 6.320425e-10 -1.700000e+00 -5.078486e-03 1.097812e-09 -1.800000e+00 -5.189528e-03 1.721951e-09 -2.000000e-01 -1.465681e-03 2.000000e-16 -3.000000e-01 -2.135731e-03 3.000000e-16 -4.000000e-01 -2.753367e-03 4.000000e-16 -5.000000e-01 -3.315155e-03 5.000000e-16 -6.000000e-01 -3.820331e-03 6.000000e-16 -7.000000e-01 -4.269931e-03 7.000000e-16 -8.000000e-01 -4.666054e-03 8.000000e-16 -9.000000e-01 -5.011370e-03 9.000000e-16 -1.000000e+00 -5.308993e-03 1.000000e-15 -1.100000e+00 -5.562716e-03 1.100000e-15 -1.200000e+00 -5.777420e-03 1.200000e-15 -1.300000e+00 -5.959268e-03 1.300000e-15 -1.400000e+00 -6.115539e-03 1.403994e-15 -1.500000e+00 -6.254781e-03 5.196828e-13 -1.600000e+00 -6.387042e-03 1.440883e-11 -1.700000e+00 -6.517185e-03 7.919809e-11 -1.800000e+00 -6.645738e-03 2.348776e-10 -2.000000e-01 -8.053778e-05 3.553410e-12 -3.000000e-01 -9.162411e-05 2.604381e-11 -4.000000e-01 -1.024998e-04 1.060519e-10 -5.000000e-01 -1.136551e-04 3.031405e-10 -6.000000e-01 -1.251796e-04 6.816477e-10 -7.000000e-01 -1.371008e-04 1.290438e-09 -8.000000e-01 -1.494378e-04 2.152985e-09 -9.000000e-01 -1.622112e-04 3.270759e-09 -1.000000e+00 -1.754428e-04 4.632738e-09 -1.100000e+00 -1.891547e-04 6.223881e-09 -1.200000e+00 -2.033687e-04 8.030011e-09 -1.300000e+00 -2.181071e-04 1.003970e-08 -1.400000e+00 -2.333922e-04 1.224448e-08 -1.500000e+00 -2.492470e-04 1.463841e-08 -1.600000e+00 -2.656953e-04 1.721747e-08 -1.700000e+00 -2.827618e-04 1.997900e-08 -1.800000e+00 -3.004721e-04 2.292131e-08 -2.000000e-01 -2.967540e-04 9.068226e-14 -3.000000e-01 -3.587330e-04 2.582050e-12 -4.000000e-01 -3.937602e-04 2.028808e-11 -5.000000e-01 -4.249226e-04 8.483953e-11 -6.000000e-01 -4.554247e-04 2.438000e-10 -7.000000e-01 -4.853720e-04 5.470330e-10 -8.000000e-01 -5.149872e-04 1.033158e-09 -9.000000e-01 -5.445114e-04 1.724361e-09 -1.000000e+00 -5.741434e-04 2.628901e-09 -1.100000e+00 -6.040352e-04 3.746428e-09 -1.200000e+00 -6.343020e-04 5.072606e-09 -1.300000e+00 -6.650320e-04 6.601981e-09 -1.400000e+00 -6.962950e-04 8.329402e-09 -1.500000e+00 -7.281476e-04 1.025054e-08 -1.600000e+00 -7.606378e-04 1.236199e-08 -1.700000e+00 -7.938074e-04 1.466113e-08 -1.800000e+00 -8.276937e-04 1.714602e-08 -2.000000e-01 -5.192224e-04 2.000000e-16 -3.000000e-01 -6.879597e-04 4.608147e-16 -4.000000e-01 -8.011363e-04 3.007756e-13 -5.000000e-01 -8.720396e-04 6.577786e-12 -6.000000e-01 -9.256745e-04 4.069423e-11 -7.000000e-01 -9.769034e-04 1.406359e-10 -8.000000e-01 -1.027362e-03 3.490034e-10 -9.000000e-01 -1.076897e-03 7.018357e-10 -1.000000e+00 -1.125565e-03 1.223940e-09 -1.100000e+00 -1.173564e-03 1.929691e-09 -1.200000e+00 -1.221122e-03 2.826014e-09 -1.300000e+00 -1.268450e-03 3.915316e-09 -1.400000e+00 -1.315731e-03 5.197610e-09 -1.500000e+00 -1.363116e-03 6.671811e-09 -1.600000e+00 -1.410729e-03 8.336449e-09 -1.700000e+00 -1.458671e-03 1.019003e-08 -1.800000e+00 -1.507026e-03 1.223120e-08 -2.000000e-01 -7.107833e-04 2.000000e-16 -3.000000e-01 -9.814930e-04 3.000000e-16 -4.000000e-01 -1.196037e-03 4.000000e-16 -5.000000e-01 -1.357425e-03 5.082379e-16 -6.000000e-01 -1.472204e-03 2.747811e-13 -7.000000e-01 -1.554887e-03 7.970863e-12 -8.000000e-01 -1.625302e-03 4.953345e-11 -9.000000e-01 -1.693712e-03 1.637565e-10 -1.000000e+00 -1.761385e-03 3.879594e-10 -1.100000e+00 -1.828127e-03 7.511815e-10 -1.200000e+00 -1.893854e-03 1.273343e-09 -1.300000e+00 -1.958631e-03 1.966987e-09 -1.400000e+00 -2.022606e-03 2.839496e-09 -1.500000e+00 -2.085952e-03 3.894923e-09 -1.600000e+00 -2.148845e-03 5.135295e-09 -1.700000e+00 -2.211447e-03 6.561454e-09 -1.800000e+00 -2.273902e-03 8.173579e-09 -2.000000e-01 -8.703534e-04 2.000000e-16 -3.000000e-01 -1.229542e-03 3.000000e-16 -4.000000e-01 -1.535299e-03 4.000000e-16 -5.000000e-01 -1.788717e-03 5.000000e-16 -6.000000e-01 -1.992234e-03 6.000000e-16 -7.000000e-01 -2.150032e-03 7.000015e-16 -8.000000e-01 -2.269922e-03 1.093928e-13 -9.000000e-01 -2.364654e-03 6.260229e-12 -1.000000e+00 -2.449433e-03 4.545125e-11 -1.100000e+00 -2.532170e-03 1.569013e-10 -1.200000e+00 -2.614133e-03 3.759662e-10 -1.300000e+00 -2.695229e-03 7.291703e-10 -1.400000e+00 -2.775332e-03 1.234825e-09 -1.500000e+00 -2.854419e-03 1.905019e-09 -1.600000e+00 -2.932554e-03 2.747505e-09 -1.700000e+00 -3.009845e-03 3.767150e-09 -1.800000e+00 -3.086420e-03 4.966940e-09 -2.000000e-01 -1.055746e-03 2.000000e-16 -3.000000e-01 -1.522006e-03 3.000000e-16 -4.000000e-01 -1.941527e-03 4.000000e-16 -5.000000e-01 -2.312983e-03 5.000000e-16 -6.000000e-01 -2.636801e-03 6.000000e-16 -7.000000e-01 -2.914587e-03 7.000000e-16 -8.000000e-01 -3.148785e-03 8.000000e-16 -9.000000e-01 -3.342837e-03 9.000000e-16 -1.000000e+00 -3.501773e-03 1.000000e-15 -1.100000e+00 -3.632590e-03 6.231963e-15 -1.200000e+00 -3.744148e-03 2.497943e-12 -1.300000e+00 -3.846545e-03 2.929002e-11 -1.400000e+00 -3.946382e-03 1.203504e-10 -1.500000e+00 -4.045211e-03 3.123339e-10 -1.600000e+00 -4.143204e-03 6.320425e-10 -1.700000e+00 -4.240298e-03 1.097812e-09 -1.800000e+00 -4.336437e-03 1.721951e-09 -2.000000e-01 -1.186306e-03 2.000000e-16 -3.000000e-01 -1.731660e-03 3.000000e-16 -4.000000e-01 -2.238332e-03 4.000000e-16 -5.000000e-01 -2.703337e-03 5.000000e-16 -6.000000e-01 -3.125332e-03 6.000000e-16 -7.000000e-01 -3.504342e-03 7.000000e-16 -8.000000e-01 -3.841383e-03 8.000000e-16 -9.000000e-01 -4.138137e-03 9.000000e-16 -1.000000e+00 -4.396808e-03 1.000000e-15 -1.100000e+00 -4.620185e-03 1.100000e-15 -1.200000e+00 -4.811857e-03 1.200000e-15 -1.300000e+00 -4.976335e-03 1.300000e-15 -1.400000e+00 -5.118917e-03 1.403994e-15 -1.500000e+00 -5.245465e-03 5.196828e-13 -1.600000e+00 -5.362370e-03 1.440883e-11 -1.700000e+00 -5.475385e-03 7.919809e-11 -1.800000e+00 -5.586920e-03 2.348776e-10 -2.000000e-01 -1.215310e-04 3.553410e-12 -3.000000e-01 -1.449795e-04 2.604381e-11 -4.000000e-01 -1.644398e-04 1.060519e-10 -5.000000e-01 -1.838947e-04 3.031405e-10 -6.000000e-01 -2.037637e-04 6.816477e-10 -7.000000e-01 -2.241352e-04 1.290438e-09 -8.000000e-01 -2.450750e-04 2.152985e-09 -9.000000e-01 -2.666414e-04 3.270759e-09 -1.000000e+00 -2.888850e-04 4.632738e-09 -1.100000e+00 -3.118496e-04 6.223881e-09 -1.200000e+00 -3.355744e-04 8.030011e-09 -1.300000e+00 -3.600953e-04 1.003970e-08 -1.400000e+00 -3.854465e-04 1.224448e-08 -1.500000e+00 -4.116615e-04 1.463841e-08 -1.600000e+00 -4.387739e-04 1.721747e-08 -1.700000e+00 -4.668176e-04 1.997900e-08 -1.800000e+00 -4.958274e-04 2.292131e-08 -2.000000e-01 -2.683866e-04 9.068226e-14 -3.000000e-01 -3.434867e-04 2.582050e-12 -4.000000e-01 -3.905718e-04 2.028808e-11 -5.000000e-01 -4.254122e-04 8.483953e-11 -6.000000e-01 -4.579231e-04 2.438000e-10 -7.000000e-01 -4.899894e-04 5.470330e-10 -8.000000e-01 -5.217557e-04 1.033158e-09 -9.000000e-01 -5.533478e-04 1.724361e-09 -1.000000e+00 -5.849313e-04 2.628901e-09 -1.100000e+00 -6.166644e-04 3.746428e-09 -1.200000e+00 -6.486803e-04 5.072606e-09 -1.300000e+00 -6.810866e-04 6.601981e-09 -1.400000e+00 -7.139696e-04 8.329402e-09 -1.500000e+00 -7.473997e-04 1.025054e-08 -1.600000e+00 -7.814349e-04 1.236199e-08 -1.700000e+00 -8.161248e-04 1.466113e-08 -1.800000e+00 -8.515127e-04 1.714602e-08 -2.000000e-01 -4.174948e-04 2.000000e-16 -3.000000e-01 -5.651320e-04 4.608147e-16 -4.000000e-01 -6.748377e-04 3.007756e-13 -5.000000e-01 -7.519469e-04 6.577786e-12 -6.000000e-01 -8.074889e-04 4.069423e-11 -7.000000e-01 -8.544461e-04 1.406359e-10 -8.000000e-01 -8.996979e-04 3.490034e-10 -9.000000e-01 -9.444793e-04 7.018357e-10 -1.000000e+00 -9.887749e-04 1.223940e-09 -1.100000e+00 -1.032585e-03 1.929691e-09 -1.200000e+00 -1.076004e-03 2.826014e-09 -1.300000e+00 -1.119166e-03 3.915316e-09 -1.400000e+00 -1.162212e-03 5.197610e-09 -1.500000e+00 -1.205271e-03 6.671811e-09 -1.600000e+00 -1.248459e-03 8.336449e-09 -1.700000e+00 -1.291873e-03 1.019003e-08 -1.800000e+00 -1.335599e-03 1.223120e-08 -2.000000e-01 -5.523075e-04 2.000000e-16 -3.000000e-01 -7.705283e-04 3.000000e-16 -4.000000e-01 -9.501590e-04 4.000000e-16 -5.000000e-01 -1.092854e-03 5.082379e-16 -6.000000e-01 -1.201930e-03 2.747811e-13 -7.000000e-01 -1.284056e-03 7.970863e-12 -8.000000e-01 -1.349422e-03 4.953345e-11 -9.000000e-01 -1.408062e-03 1.637565e-10 -1.000000e+00 -1.465169e-03 3.879594e-10 -1.100000e+00 -1.521832e-03 7.511815e-10 -1.200000e+00 -1.578022e-03 1.273343e-09 -1.300000e+00 -1.633660e-03 1.966987e-09 -1.400000e+00 -1.688750e-03 2.839496e-09 -1.500000e+00 -1.743361e-03 3.894923e-09 -1.600000e+00 -1.797592e-03 5.135295e-09 -1.700000e+00 -1.851551e-03 6.561454e-09 -1.800000e+00 -1.905348e-03 8.173579e-09 -2.000000e-01 -6.699586e-04 2.000000e-16 -3.000000e-01 -9.519966e-04 3.000000e-16 -4.000000e-01 -1.196965e-03 4.000000e-16 -5.000000e-01 -1.405155e-03 5.000000e-16 -6.000000e-01 -1.577904e-03 6.000000e-16 -7.000000e-01 -1.717682e-03 7.000015e-16 -8.000000e-01 -1.828773e-03 1.093928e-13 -9.000000e-01 -1.917844e-03 6.260229e-12 -1.000000e+00 -1.993249e-03 4.545125e-11 -1.100000e+00 -2.062742e-03 1.569013e-10 -1.200000e+00 -2.130579e-03 3.759662e-10 -1.300000e+00 -2.197916e-03 7.291703e-10 -1.400000e+00 -2.264817e-03 1.234825e-09 -1.500000e+00 -2.331192e-03 1.905019e-09 -1.600000e+00 -2.396995e-03 2.747505e-09 -1.700000e+00 -2.462235e-03 3.767150e-09 -1.800000e+00 -2.526961e-03 4.966940e-09 -2.000000e-01 -8.151175e-04 2.000000e-16 -3.000000e-01 -1.178259e-03 3.000000e-16 -4.000000e-01 -1.508450e-03 4.000000e-16 -5.000000e-01 -1.804478e-03 5.000000e-16 -6.000000e-01 -2.066202e-03 6.000000e-16 -7.000000e-01 -2.294404e-03 7.000000e-16 -8.000000e-01 -2.490612e-03 8.000000e-16 -9.000000e-01 -2.657086e-03 9.000000e-16 -1.000000e+00 -2.797037e-03 1.000000e-15 -1.100000e+00 -2.914811e-03 6.231963e-15 -1.200000e+00 -3.015698e-03 2.497943e-12 -1.300000e+00 -3.105458e-03 2.929002e-11 -1.400000e+00 -3.189490e-03 1.203504e-10 -1.500000e+00 -3.271331e-03 3.123339e-10 -1.600000e+00 -3.352375e-03 6.320425e-10 -1.700000e+00 -3.432951e-03 1.097812e-09 -1.800000e+00 -3.513056e-03 1.721951e-09 -2.000000e-01 -9.263926e-04 2.000000e-16 -3.000000e-01 -1.353590e-03 3.000000e-16 -4.000000e-01 -1.752829e-03 4.000000e-16 -5.000000e-01 -2.121990e-03 5.000000e-16 -6.000000e-01 -2.459839e-03 6.000000e-16 -7.000000e-01 -2.766039e-03 7.000000e-16 -8.000000e-01 -3.041016e-03 8.000000e-16 -9.000000e-01 -3.285795e-03 9.000000e-16 -1.000000e+00 -3.501875e-03 1.000000e-15 -1.100000e+00 -3.691217e-03 1.100000e-15 -1.200000e+00 -3.856317e-03 1.200000e-15 -1.300000e+00 -4.000255e-03 1.300000e-15 -1.400000e+00 -4.126613e-03 1.403994e-15 -1.500000e+00 -4.239259e-03 5.196828e-13 -1.600000e+00 -4.342117e-03 1.440883e-11 -1.700000e+00 -4.438929e-03 7.919809e-11 -1.800000e+00 -4.532698e-03 2.348776e-10 ngspice-26/tests/hisim/pmos/reference/63_acFreq_COFLICK=1.standard0000644000265600020320000002530212264261473024165 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/47_acFreq_COISUB=1.standard0000644000265600020320000002530212264261473024101 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/76_noise_COIGN=1_T-55.standard0000644000265600020320000000710012264261473024400 0ustar andreasadminFreq N(g) 1000 6.585602e-39 1258.925 1.043748e-38 1584.893 1.654228e-38 1995.262 2.621775e-38 2511.886 4.155234e-38 3162.278 6.585602e-38 3981.072 1.043748e-37 5011.872 1.654228e-37 6309.573 2.621775e-37 7943.282 4.155234e-37 10000 6.585602e-37 12589.25 1.043748e-36 15848.93 1.654228e-36 19952.62 2.621775e-36 25118.86 4.155234e-36 31622.78 6.585602e-36 39810.72 1.043748e-35 50118.72 1.654228e-35 63095.73 2.621775e-35 79432.82 4.155234e-35 100000 6.585602e-35 125892.5 1.043748e-34 158489.3 1.654228e-34 199526.2 2.621775e-34 251188.6 4.155234e-34 316227.8 6.585602e-34 398107.2 1.043748e-33 501187.2 1.654228e-33 630957.3 2.621775e-33 794328.2 4.155234e-33 1000000 6.585602e-33 1258925 1.043748e-32 1584893 1.654228e-32 1995262 2.621775e-32 2511886 4.155234e-32 3162278 6.585602e-32 3981072 1.043748e-31 5011872 1.654228e-31 6309573 2.621775e-31 7943282 4.155234e-31 10000000 6.585602e-31 12589250 1.043748e-30 15848930 1.654228e-30 19952620 2.621775e-30 25118860 4.155234e-30 31622780 6.585602e-30 39810720 1.043748e-29 50118720 1.654228e-29 63095730 2.621775e-29 79432820 4.155234e-29 100000000 6.585602e-29 125892500 1.043748e-28 158489300 1.654228e-28 199526200 2.621775e-28 251188600 4.155234e-28 316227800 6.585602e-28 398107200 1.043748e-27 501187200 1.654228e-27 630957300 2.621775e-27 794328200 4.155234e-27 1000000000 6.585602e-27 1258925000 1.043748e-26 1584893000 1.654228e-26 1995262000 2.621775e-26 2511886000 4.155234e-26 3162278000 6.585602e-26 3981072000 1.043748e-25 5011872000 1.654228e-25 6309573000 2.621775e-25 7943282000 4.155234e-25 10000000000 6.585602e-25 12589250000 1.043748e-24 15848930000 1.654228e-24 19952620000 2.621775e-24 25118860000 4.155234e-24 31622780000 6.585602e-24 39810720000 1.043748e-23 50118720000 1.654228e-23 63095730000 2.621775e-23 79432820000 4.155234e-23 100000000000 6.585602e-23 1000 3.477462e-39 1258.925 5.511407e-39 1584.893 8.734991e-39 1995.262 1.384403e-38 2511.886 2.19413e-38 3162.278 3.477462e-38 3981.072 5.511407e-38 5011.872 8.734991e-38 6309.573 1.384403e-37 7943.282 2.19413e-37 10000 3.477462e-37 12589.25 5.511407e-37 15848.93 8.734991e-37 19952.62 1.384403e-36 25118.86 2.19413e-36 31622.78 3.477462e-36 39810.72 5.511407e-36 50118.72 8.734991e-36 63095.73 1.384403e-35 79432.82 2.19413e-35 100000 3.477462e-35 125892.5 5.511407e-35 158489.3 8.734991e-35 199526.2 1.384403e-34 251188.6 2.19413e-34 316227.8 3.477462e-34 398107.2 5.511407e-34 501187.2 8.734991e-34 630957.3 1.384403e-33 794328.2 2.19413e-33 1000000 3.477462e-33 1258925 5.511407e-33 1584893 8.734991e-33 1995262 1.384403e-32 2511886 2.19413e-32 3162278 3.477462e-32 3981072 5.511407e-32 5011872 8.734991e-32 6309573 1.384403e-31 7943282 2.19413e-31 10000000 3.477462e-31 12589250 5.511407e-31 15848930 8.734991e-31 19952620 1.384403e-30 25118860 2.19413e-30 31622780 3.477462e-30 39810720 5.511407e-30 50118720 8.734991e-30 63095730 1.384403e-29 79432820 2.19413e-29 100000000 3.477462e-29 125892500 5.511407e-29 158489300 8.734991e-29 199526200 1.384403e-28 251188600 2.19413e-28 316227800 3.477462e-28 398107200 5.511407e-28 501187200 8.734991e-28 630957300 1.384403e-27 794328200 2.19413e-27 1000000000 3.477462e-27 1258925000 5.511407e-27 1584893000 8.734991e-27 1995262000 1.384403e-26 2511886000 2.19413e-26 3162278000 3.477462e-26 3981072000 5.511407e-26 5011872000 8.734991e-26 6309573000 1.384403e-25 7943282000 2.19413e-25 10000000000 3.477462e-25 12589250000 5.511407e-25 15848930000 8.734991e-25 19952620000 1.384403e-24 25118860000 2.19413e-24 31622780000 3.477462e-24 39810720000 5.511407e-24 50118720000 8.734991e-24 63095730000 1.384403e-23 79432820000 2.19413e-23 100000000000 3.477462e-23 ngspice-26/tests/hisim/pmos/reference/21_dcSweep_CORBNET=0.standard0000644000265600020320000003447412264261473024403 0ustar andreasadminV(d) I(d) I(b) -2.000000e-01 -4.699615e-05 2.000000e-16 -3.000000e-01 -5.356444e-05 3.000000e-16 -4.000000e-01 -6.033219e-05 4.000000e-16 -5.000000e-01 -6.744931e-05 5.000000e-16 -6.000000e-01 -7.492420e-05 6.000000e-16 -7.000000e-01 -8.274226e-05 7.000000e-16 -8.000000e-01 -9.089871e-05 8.000000e-16 -9.000000e-01 -9.939829e-05 9.000000e-16 -1.000000e+00 -1.082512e-04 1.000000e-15 -1.100000e+00 -1.174704e-04 1.100000e-15 -1.200000e+00 -1.270707e-04 1.200000e-15 -1.300000e+00 -1.370679e-04 1.300000e-15 -1.400000e+00 -1.474787e-04 1.400000e-15 -1.500000e+00 -1.583210e-04 1.500000e-15 -1.600000e+00 -1.696137e-04 1.600000e-15 -1.700000e+00 -1.813767e-04 1.700000e-15 -1.800000e+00 -1.936315e-04 1.800000e-15 -2.000000e-01 -3.236954e-04 2.000000e-16 -3.000000e-01 -3.722842e-04 3.000000e-16 -4.000000e-01 -4.052186e-04 4.000000e-16 -5.000000e-01 -4.371928e-04 5.000000e-16 -6.000000e-01 -4.684500e-04 6.000000e-16 -7.000000e-01 -4.993045e-04 7.000000e-16 -8.000000e-01 -5.300657e-04 8.000000e-16 -9.000000e-01 -5.609683e-04 9.000000e-16 -1.000000e+00 -5.921825e-04 1.000000e-15 -1.100000e+00 -6.238328e-04 1.100000e-15 -1.200000e+00 -6.560127e-04 1.200000e-15 -1.300000e+00 -6.887951e-04 1.300000e-15 -1.400000e+00 -7.222391e-04 1.400000e-15 -1.500000e+00 -7.563944e-04 1.500000e-15 -1.600000e+00 -7.913044e-04 1.600000e-15 -1.700000e+00 -8.270083e-04 1.700000e-15 -1.800000e+00 -8.635422e-04 1.800000e-15 -2.000000e-01 -6.362416e-04 2.000000e-16 -3.000000e-01 -8.252108e-04 3.000000e-16 -4.000000e-01 -9.384887e-04 4.000000e-16 -5.000000e-01 -1.006766e-03 5.000000e-16 -6.000000e-01 -1.066911e-03 6.000000e-16 -7.000000e-01 -1.125791e-03 7.000000e-16 -8.000000e-01 -1.183256e-03 8.000000e-16 -9.000000e-01 -1.239416e-03 9.000000e-16 -1.000000e+00 -1.294578e-03 1.000000e-15 -1.100000e+00 -1.349078e-03 1.100000e-15 -1.200000e+00 -1.403215e-03 1.200000e-15 -1.300000e+00 -1.457236e-03 1.300000e-15 -1.400000e+00 -1.511337e-03 1.400000e-15 -1.500000e+00 -1.565674e-03 1.500000e-15 -1.600000e+00 -1.620372e-03 1.600000e-15 -1.700000e+00 -1.675532e-03 1.700000e-15 -1.800000e+00 -1.731237e-03 1.800000e-15 -2.000000e-01 -8.942919e-04 2.000000e-16 -3.000000e-01 -1.221693e-03 3.000000e-16 -4.000000e-01 -1.471297e-03 4.000000e-16 -5.000000e-01 -1.648885e-03 5.000000e-16 -6.000000e-01 -1.767189e-03 6.000000e-16 -7.000000e-01 -1.854914e-03 7.000000e-16 -8.000000e-01 -1.937134e-03 8.000000e-16 -9.000000e-01 -2.017933e-03 9.000000e-16 -1.000000e+00 -2.097230e-03 1.000000e-15 -1.100000e+00 -2.174954e-03 1.100000e-15 -1.200000e+00 -2.251232e-03 1.200000e-15 -1.300000e+00 -2.326297e-03 1.300000e-15 -1.400000e+00 -2.400412e-03 1.400000e-15 -1.500000e+00 -2.473830e-03 1.500000e-15 -1.600000e+00 -2.546779e-03 1.600000e-15 -1.700000e+00 -2.619455e-03 1.700000e-15 -1.800000e+00 -2.692024e-03 1.800000e-15 -2.000000e-01 -1.099660e-03 2.000000e-16 -3.000000e-01 -1.542998e-03 3.000000e-16 -4.000000e-01 -1.912357e-03 4.000000e-16 -5.000000e-01 -2.210948e-03 5.000000e-16 -6.000000e-01 -2.443263e-03 6.000000e-16 -7.000000e-01 -2.616248e-03 7.000000e-16 -8.000000e-01 -2.743263e-03 8.000000e-16 -9.000000e-01 -2.847346e-03 9.000000e-16 -1.000000e+00 -2.946865e-03 1.000000e-15 -1.100000e+00 -3.044792e-03 1.100000e-15 -1.200000e+00 -3.141252e-03 1.200000e-15 -1.300000e+00 -3.236151e-03 1.300000e-15 -1.400000e+00 -3.329502e-03 1.400000e-15 -1.500000e+00 -3.421422e-03 1.500000e-15 -1.600000e+00 -3.512085e-03 1.600000e-15 -1.700000e+00 -3.601685e-03 1.700000e-15 -1.800000e+00 -3.690419e-03 1.800000e-15 -2.000000e-01 -1.323288e-03 2.000000e-16 -3.000000e-01 -1.900779e-03 3.000000e-16 -4.000000e-01 -2.413864e-03 4.000000e-16 -5.000000e-01 -2.862055e-03 5.000000e-16 -6.000000e-01 -3.247311e-03 6.000000e-16 -7.000000e-01 -3.572769e-03 7.000000e-16 -8.000000e-01 -3.842246e-03 8.000000e-16 -9.000000e-01 -4.060779e-03 9.000000e-16 -1.000000e+00 -4.235768e-03 1.000000e-15 -1.100000e+00 -4.377686e-03 1.100000e-15 -1.200000e+00 -4.501075e-03 1.200000e-15 -1.300000e+00 -4.619790e-03 1.300000e-15 -1.400000e+00 -4.736666e-03 1.400000e-15 -1.500000e+00 -4.852063e-03 1.500000e-15 -1.600000e+00 -4.966006e-03 1.600000e-15 -1.700000e+00 -5.078485e-03 1.700000e-15 -1.800000e+00 -5.189527e-03 1.800000e-15 -2.000000e-01 -1.465681e-03 2.000000e-16 -3.000000e-01 -2.135731e-03 3.000000e-16 -4.000000e-01 -2.753367e-03 4.000000e-16 -5.000000e-01 -3.315155e-03 5.000000e-16 -6.000000e-01 -3.820331e-03 6.000000e-16 -7.000000e-01 -4.269931e-03 7.000000e-16 -8.000000e-01 -4.666054e-03 8.000000e-16 -9.000000e-01 -5.011370e-03 9.000000e-16 -1.000000e+00 -5.308993e-03 1.000000e-15 -1.100000e+00 -5.562716e-03 1.100000e-15 -1.200000e+00 -5.777420e-03 1.200000e-15 -1.300000e+00 -5.959268e-03 1.300000e-15 -1.400000e+00 -6.115539e-03 1.400000e-15 -1.500000e+00 -6.254781e-03 1.500000e-15 -1.600000e+00 -6.387042e-03 1.600000e-15 -1.700000e+00 -6.517185e-03 1.700000e-15 -1.800000e+00 -6.645738e-03 1.800000e-15 -2.000000e-01 -8.053777e-05 2.000000e-16 -3.000000e-01 -9.162409e-05 3.000000e-16 -4.000000e-01 -1.024997e-04 4.000000e-16 -5.000000e-01 -1.136548e-04 5.000000e-16 -6.000000e-01 -1.251789e-04 6.000000e-16 -7.000000e-01 -1.370995e-04 7.000000e-16 -8.000000e-01 -1.494356e-04 8.000000e-16 -9.000000e-01 -1.622080e-04 9.000000e-16 -1.000000e+00 -1.754382e-04 1.000000e-15 -1.100000e+00 -1.891484e-04 1.100000e-15 -1.200000e+00 -2.033607e-04 1.200000e-15 -1.300000e+00 -2.180970e-04 1.300000e-15 -1.400000e+00 -2.333799e-04 1.400000e-15 -1.500000e+00 -2.492324e-04 1.500000e-15 -1.600000e+00 -2.656781e-04 1.600000e-15 -1.700000e+00 -2.827418e-04 1.700000e-15 -1.800000e+00 -3.004492e-04 1.800000e-15 -2.000000e-01 -2.967540e-04 2.000000e-16 -3.000000e-01 -3.587330e-04 3.000000e-16 -4.000000e-01 -3.937602e-04 4.000000e-16 -5.000000e-01 -4.249225e-04 5.000000e-16 -6.000000e-01 -4.554245e-04 6.000000e-16 -7.000000e-01 -4.853715e-04 7.000000e-16 -8.000000e-01 -5.149862e-04 8.000000e-16 -9.000000e-01 -5.445097e-04 9.000000e-16 -1.000000e+00 -5.741407e-04 1.000000e-15 -1.100000e+00 -6.040315e-04 1.100000e-15 -1.200000e+00 -6.342969e-04 1.200000e-15 -1.300000e+00 -6.650254e-04 1.300000e-15 -1.400000e+00 -6.962867e-04 1.400000e-15 -1.500000e+00 -7.281374e-04 1.500000e-15 -1.600000e+00 -7.606255e-04 1.600000e-15 -1.700000e+00 -7.937927e-04 1.700000e-15 -1.800000e+00 -8.276765e-04 1.800000e-15 -2.000000e-01 -5.192224e-04 2.000000e-16 -3.000000e-01 -6.879597e-04 3.000000e-16 -4.000000e-01 -8.011363e-04 4.000000e-16 -5.000000e-01 -8.720396e-04 5.000000e-16 -6.000000e-01 -9.256745e-04 6.000000e-16 -7.000000e-01 -9.769033e-04 7.000000e-16 -8.000000e-01 -1.027362e-03 8.000000e-16 -9.000000e-01 -1.076896e-03 9.000000e-16 -1.000000e+00 -1.125564e-03 1.000000e-15 -1.100000e+00 -1.173562e-03 1.100000e-15 -1.200000e+00 -1.221119e-03 1.200000e-15 -1.300000e+00 -1.268446e-03 1.300000e-15 -1.400000e+00 -1.315726e-03 1.400000e-15 -1.500000e+00 -1.363110e-03 1.500000e-15 -1.600000e+00 -1.410721e-03 1.600000e-15 -1.700000e+00 -1.458660e-03 1.700000e-15 -1.800000e+00 -1.507013e-03 1.800000e-15 -2.000000e-01 -7.107833e-04 2.000000e-16 -3.000000e-01 -9.814930e-04 3.000000e-16 -4.000000e-01 -1.196037e-03 4.000000e-16 -5.000000e-01 -1.357425e-03 5.000000e-16 -6.000000e-01 -1.472204e-03 6.000000e-16 -7.000000e-01 -1.554887e-03 7.000000e-16 -8.000000e-01 -1.625302e-03 8.000000e-16 -9.000000e-01 -1.693712e-03 9.000000e-16 -1.000000e+00 -1.761384e-03 1.000000e-15 -1.100000e+00 -1.828127e-03 1.100000e-15 -1.200000e+00 -1.893853e-03 1.200000e-15 -1.300000e+00 -1.958629e-03 1.300000e-15 -1.400000e+00 -2.022603e-03 1.400000e-15 -1.500000e+00 -2.085948e-03 1.500000e-15 -1.600000e+00 -2.148840e-03 1.600000e-15 -1.700000e+00 -2.211441e-03 1.700000e-15 -1.800000e+00 -2.273894e-03 1.800000e-15 -2.000000e-01 -8.703534e-04 2.000000e-16 -3.000000e-01 -1.229542e-03 3.000000e-16 -4.000000e-01 -1.535299e-03 4.000000e-16 -5.000000e-01 -1.788717e-03 5.000000e-16 -6.000000e-01 -1.992234e-03 6.000000e-16 -7.000000e-01 -2.150032e-03 7.000000e-16 -8.000000e-01 -2.269922e-03 8.000000e-16 -9.000000e-01 -2.364654e-03 9.000000e-16 -1.000000e+00 -2.449433e-03 1.000000e-15 -1.100000e+00 -2.532170e-03 1.100000e-15 -1.200000e+00 -2.614133e-03 1.200000e-15 -1.300000e+00 -2.695229e-03 1.300000e-15 -1.400000e+00 -2.775330e-03 1.400000e-15 -1.500000e+00 -2.854418e-03 1.500000e-15 -1.600000e+00 -2.932552e-03 1.600000e-15 -1.700000e+00 -3.009841e-03 1.700000e-15 -1.800000e+00 -3.086415e-03 1.800000e-15 -2.000000e-01 -1.055746e-03 2.000000e-16 -3.000000e-01 -1.522006e-03 3.000000e-16 -4.000000e-01 -1.941527e-03 4.000000e-16 -5.000000e-01 -2.312983e-03 5.000000e-16 -6.000000e-01 -2.636801e-03 6.000000e-16 -7.000000e-01 -2.914587e-03 7.000000e-16 -8.000000e-01 -3.148785e-03 8.000000e-16 -9.000000e-01 -3.342837e-03 9.000000e-16 -1.000000e+00 -3.501773e-03 1.000000e-15 -1.100000e+00 -3.632590e-03 1.100000e-15 -1.200000e+00 -3.744148e-03 1.200000e-15 -1.300000e+00 -3.846545e-03 1.300000e-15 -1.400000e+00 -3.946382e-03 1.400000e-15 -1.500000e+00 -4.045210e-03 1.500000e-15 -1.600000e+00 -4.143203e-03 1.600000e-15 -1.700000e+00 -4.240296e-03 1.700000e-15 -1.800000e+00 -4.336435e-03 1.800000e-15 -2.000000e-01 -1.186306e-03 2.000000e-16 -3.000000e-01 -1.731660e-03 3.000000e-16 -4.000000e-01 -2.238332e-03 4.000000e-16 -5.000000e-01 -2.703337e-03 5.000000e-16 -6.000000e-01 -3.125332e-03 6.000000e-16 -7.000000e-01 -3.504342e-03 7.000000e-16 -8.000000e-01 -3.841383e-03 8.000000e-16 -9.000000e-01 -4.138137e-03 9.000000e-16 -1.000000e+00 -4.396808e-03 1.000000e-15 -1.100000e+00 -4.620185e-03 1.100000e-15 -1.200000e+00 -4.811857e-03 1.200000e-15 -1.300000e+00 -4.976335e-03 1.300000e-15 -1.400000e+00 -5.118917e-03 1.400000e-15 -1.500000e+00 -5.245465e-03 1.500000e-15 -1.600000e+00 -5.362370e-03 1.600000e-15 -1.700000e+00 -5.475384e-03 1.700000e-15 -1.800000e+00 -5.586920e-03 1.800000e-15 -2.000000e-01 -1.215310e-04 2.000000e-16 -3.000000e-01 -1.449795e-04 3.000000e-16 -4.000000e-01 -1.644397e-04 4.000000e-16 -5.000000e-01 -1.838944e-04 5.000000e-16 -6.000000e-01 -2.037631e-04 6.000000e-16 -7.000000e-01 -2.241339e-04 7.000000e-16 -8.000000e-01 -2.450728e-04 8.000000e-16 -9.000000e-01 -2.666381e-04 9.000000e-16 -1.000000e+00 -2.888803e-04 1.000000e-15 -1.100000e+00 -3.118434e-04 1.100000e-15 -1.200000e+00 -3.355664e-04 1.200000e-15 -1.300000e+00 -3.600852e-04 1.300000e-15 -1.400000e+00 -3.854342e-04 1.400000e-15 -1.500000e+00 -4.116469e-04 1.500000e-15 -1.600000e+00 -4.387567e-04 1.600000e-15 -1.700000e+00 -4.667976e-04 1.700000e-15 -1.800000e+00 -4.958045e-04 1.800000e-15 -2.000000e-01 -2.683866e-04 2.000000e-16 -3.000000e-01 -3.434866e-04 3.000000e-16 -4.000000e-01 -3.905718e-04 4.000000e-16 -5.000000e-01 -4.254121e-04 5.000000e-16 -6.000000e-01 -4.579229e-04 6.000000e-16 -7.000000e-01 -4.899888e-04 7.000000e-16 -8.000000e-01 -5.217546e-04 8.000000e-16 -9.000000e-01 -5.533460e-04 9.000000e-16 -1.000000e+00 -5.849287e-04 1.000000e-15 -1.100000e+00 -6.166606e-04 1.100000e-15 -1.200000e+00 -6.486752e-04 1.200000e-15 -1.300000e+00 -6.810800e-04 1.300000e-15 -1.400000e+00 -7.139613e-04 1.400000e-15 -1.500000e+00 -7.473894e-04 1.500000e-15 -1.600000e+00 -7.814225e-04 1.600000e-15 -1.700000e+00 -8.161101e-04 1.700000e-15 -1.800000e+00 -8.514956e-04 1.800000e-15 -2.000000e-01 -4.174948e-04 2.000000e-16 -3.000000e-01 -5.651320e-04 3.000000e-16 -4.000000e-01 -6.748377e-04 4.000000e-16 -5.000000e-01 -7.519469e-04 5.000000e-16 -6.000000e-01 -8.074889e-04 6.000000e-16 -7.000000e-01 -8.544460e-04 7.000000e-16 -8.000000e-01 -8.996975e-04 8.000000e-16 -9.000000e-01 -9.444786e-04 9.000000e-16 -1.000000e+00 -9.887737e-04 1.000000e-15 -1.100000e+00 -1.032583e-03 1.100000e-15 -1.200000e+00 -1.076001e-03 1.200000e-15 -1.300000e+00 -1.119162e-03 1.300000e-15 -1.400000e+00 -1.162206e-03 1.400000e-15 -1.500000e+00 -1.205264e-03 1.500000e-15 -1.600000e+00 -1.248450e-03 1.600000e-15 -1.700000e+00 -1.291863e-03 1.700000e-15 -1.800000e+00 -1.335586e-03 1.800000e-15 -2.000000e-01 -5.523075e-04 2.000000e-16 -3.000000e-01 -7.705283e-04 3.000000e-16 -4.000000e-01 -9.501590e-04 4.000000e-16 -5.000000e-01 -1.092854e-03 5.000000e-16 -6.000000e-01 -1.201930e-03 6.000000e-16 -7.000000e-01 -1.284056e-03 7.000000e-16 -8.000000e-01 -1.349422e-03 8.000000e-16 -9.000000e-01 -1.408062e-03 9.000000e-16 -1.000000e+00 -1.465169e-03 1.000000e-15 -1.100000e+00 -1.521831e-03 1.100000e-15 -1.200000e+00 -1.578020e-03 1.200000e-15 -1.300000e+00 -1.633658e-03 1.300000e-15 -1.400000e+00 -1.688747e-03 1.400000e-15 -1.500000e+00 -1.743357e-03 1.500000e-15 -1.600000e+00 -1.797587e-03 1.600000e-15 -1.700000e+00 -1.851545e-03 1.700000e-15 -1.800000e+00 -1.905340e-03 1.800000e-15 -2.000000e-01 -6.699586e-04 2.000000e-16 -3.000000e-01 -9.519966e-04 3.000000e-16 -4.000000e-01 -1.196965e-03 4.000000e-16 -5.000000e-01 -1.405155e-03 5.000000e-16 -6.000000e-01 -1.577904e-03 6.000000e-16 -7.000000e-01 -1.717682e-03 7.000000e-16 -8.000000e-01 -1.828773e-03 8.000000e-16 -9.000000e-01 -1.917844e-03 9.000000e-16 -1.000000e+00 -1.993249e-03 1.000000e-15 -1.100000e+00 -2.062742e-03 1.100000e-15 -1.200000e+00 -2.130579e-03 1.200000e-15 -1.300000e+00 -2.197915e-03 1.300000e-15 -1.400000e+00 -2.264816e-03 1.400000e-15 -1.500000e+00 -2.331190e-03 1.500000e-15 -1.600000e+00 -2.396992e-03 1.600000e-15 -1.700000e+00 -2.462231e-03 1.700000e-15 -1.800000e+00 -2.526956e-03 1.800000e-15 -2.000000e-01 -8.151175e-04 2.000000e-16 -3.000000e-01 -1.178259e-03 3.000000e-16 -4.000000e-01 -1.508450e-03 4.000000e-16 -5.000000e-01 -1.804478e-03 5.000000e-16 -6.000000e-01 -2.066202e-03 6.000000e-16 -7.000000e-01 -2.294404e-03 7.000000e-16 -8.000000e-01 -2.490612e-03 8.000000e-16 -9.000000e-01 -2.657086e-03 9.000000e-16 -1.000000e+00 -2.797037e-03 1.000000e-15 -1.100000e+00 -2.914811e-03 1.100000e-15 -1.200000e+00 -3.015698e-03 1.200000e-15 -1.300000e+00 -3.105458e-03 1.300000e-15 -1.400000e+00 -3.189490e-03 1.400000e-15 -1.500000e+00 -3.271330e-03 1.500000e-15 -1.600000e+00 -3.352374e-03 1.600000e-15 -1.700000e+00 -3.432950e-03 1.700000e-15 -1.800000e+00 -3.513054e-03 1.800000e-15 -2.000000e-01 -9.263926e-04 2.000000e-16 -3.000000e-01 -1.353590e-03 3.000000e-16 -4.000000e-01 -1.752829e-03 4.000000e-16 -5.000000e-01 -2.121990e-03 5.000000e-16 -6.000000e-01 -2.459839e-03 6.000000e-16 -7.000000e-01 -2.766039e-03 7.000000e-16 -8.000000e-01 -3.041016e-03 8.000000e-16 -9.000000e-01 -3.285795e-03 9.000000e-16 -1.000000e+00 -3.501875e-03 1.000000e-15 -1.100000e+00 -3.691217e-03 1.100000e-15 -1.200000e+00 -3.856317e-03 1.200000e-15 -1.300000e+00 -4.000255e-03 1.300000e-15 -1.400000e+00 -4.126613e-03 1.400000e-15 -1.500000e+00 -4.239259e-03 1.500000e-15 -1.600000e+00 -4.342117e-03 1.600000e-15 -1.700000e+00 -4.438929e-03 1.700000e-15 -1.800000e+00 -4.532697e-03 1.800000e-15 ngspice-26/tests/hisim/pmos/reference/4_dcSweep_NSUBPFAC.standard0000644000265600020320000002342612264261473024247 0ustar andreasadminV(d) I(d) -2.000000e-01 -2.628429e-05 -3.000000e-01 -3.006503e-05 -4.000000e-01 -3.405657e-05 -5.000000e-01 -3.831147e-05 -6.000000e-01 -4.280545e-05 -7.000000e-01 -4.751427e-05 -8.000000e-01 -5.242659e-05 -9.000000e-01 -5.754003e-05 -1.000000e+00 -6.285691e-05 -1.100000e+00 -6.838202e-05 -1.200000e+00 -7.412140e-05 -1.300000e+00 -8.008192e-05 -1.400000e+00 -8.627109e-05 -1.500000e+00 -9.269690e-05 -1.600000e+00 -9.936791e-05 -1.700000e+00 -1.062932e-04 -1.800000e+00 -1.134823e-04 -2.000000e-01 -2.691313e-04 -3.000000e-01 -3.030362e-04 -4.000000e-01 -3.291466e-04 -5.000000e-01 -3.545482e-04 -6.000000e-01 -3.794755e-04 -7.000000e-01 -4.042176e-04 -8.000000e-01 -4.289970e-04 -9.000000e-01 -4.539699e-04 -1.000000e+00 -4.792470e-04 -1.100000e+00 -5.049087e-04 -1.200000e+00 -5.310160e-04 -1.300000e+00 -5.576167e-04 -1.400000e+00 -5.847497e-04 -1.500000e+00 -6.124482e-04 -1.600000e+00 -6.407416e-04 -1.700000e+00 -6.696562e-04 -1.800000e+00 -6.992168e-04 -2.000000e-01 -5.836425e-04 -3.000000e-01 -7.461084e-04 -4.000000e-01 -8.363986e-04 -5.000000e-01 -8.927594e-04 -6.000000e-01 -9.450489e-04 -7.000000e-01 -9.960027e-04 -8.000000e-01 -1.045571e-03 -9.000000e-01 -1.094000e-03 -1.000000e+00 -1.141624e-03 -1.100000e+00 -1.188755e-03 -1.200000e+00 -1.235649e-03 -1.300000e+00 -1.282508e-03 -1.400000e+00 -1.329488e-03 -1.500000e+00 -1.376713e-03 -1.600000e+00 -1.424277e-03 -1.700000e+00 -1.472260e-03 -1.800000e+00 -1.520725e-03 -2.000000e-01 -8.466291e-04 -3.000000e-01 -1.149327e-03 -4.000000e-01 -1.374214e-03 -5.000000e-01 -1.527816e-03 -6.000000e-01 -1.626954e-03 -7.000000e-01 -1.704338e-03 -8.000000e-01 -1.778532e-03 -9.000000e-01 -1.851229e-03 -1.000000e+00 -1.922313e-03 -1.100000e+00 -1.991844e-03 -1.200000e+00 -2.060029e-03 -1.300000e+00 -2.127133e-03 -1.400000e+00 -2.193422e-03 -1.500000e+00 -2.259132e-03 -1.600000e+00 -2.324469e-03 -1.700000e+00 -2.389605e-03 -1.800000e+00 -2.454685e-03 -2.000000e-01 -1.056755e-03 -3.000000e-01 -1.477474e-03 -4.000000e-01 -1.824092e-03 -5.000000e-01 -2.099913e-03 -6.000000e-01 -2.309589e-03 -7.000000e-01 -2.461366e-03 -8.000000e-01 -2.571892e-03 -9.000000e-01 -2.666528e-03 -1.000000e+00 -2.758118e-03 -1.100000e+00 -2.848128e-03 -1.200000e+00 -2.936542e-03 -1.300000e+00 -3.023335e-03 -1.400000e+00 -3.108594e-03 -1.500000e+00 -3.192484e-03 -1.600000e+00 -3.275204e-03 -1.700000e+00 -3.356956e-03 -1.800000e+00 -3.437935e-03 -2.000000e-01 -1.286702e-03 -3.000000e-01 -1.844506e-03 -4.000000e-01 -2.337523e-03 -5.000000e-01 -2.765523e-03 -6.000000e-01 -3.130572e-03 -7.000000e-01 -3.435808e-03 -8.000000e-01 -3.685151e-03 -9.000000e-01 -3.884173e-03 -1.000000e+00 -4.041376e-03 -1.100000e+00 -4.168953e-03 -1.200000e+00 -4.283353e-03 -1.300000e+00 -4.394527e-03 -1.400000e+00 -4.503926e-03 -1.500000e+00 -4.611780e-03 -1.600000e+00 -4.718101e-03 -1.700000e+00 -4.822908e-03 -1.800000e+00 -4.926268e-03 -2.000000e-01 -1.434442e-03 -3.000000e-01 -2.087432e-03 -4.000000e-01 -2.687432e-03 -5.000000e-01 -3.231252e-03 -6.000000e-01 -3.718308e-03 -7.000000e-01 -4.149746e-03 -8.000000e-01 -4.527703e-03 -9.000000e-01 -4.854862e-03 -1.000000e+00 -5.134418e-03 -1.100000e+00 -5.370434e-03 -1.200000e+00 -5.568282e-03 -1.300000e+00 -5.734744e-03 -1.400000e+00 -5.877848e-03 -1.500000e+00 -6.007413e-03 -1.600000e+00 -6.132566e-03 -1.700000e+00 -6.255682e-03 -1.800000e+00 -6.377230e-03 -2.000000e-01 -5.517665e-05 -3.000000e-01 -6.262590e-05 -4.000000e-01 -7.012650e-05 -5.000000e-01 -7.792638e-05 -6.000000e-01 -8.604320e-05 -7.000000e-01 -9.446597e-05 -8.000000e-01 -1.031906e-04 -9.000000e-01 -1.122210e-04 -1.000000e+00 -1.215653e-04 -1.100000e+00 -1.312335e-04 -1.200000e+00 -1.412368e-04 -1.300000e+00 -1.515866e-04 -1.400000e+00 -1.622950e-04 -1.500000e+00 -1.733743e-04 -1.600000e+00 -1.848375e-04 -1.700000e+00 -1.966981e-04 -1.800000e+00 -2.089700e-04 -2.000000e-01 -2.554500e-04 -3.000000e-01 -3.013406e-04 -4.000000e-01 -3.285774e-04 -5.000000e-01 -3.538735e-04 -6.000000e-01 -3.785686e-04 -7.000000e-01 -4.028410e-04 -8.000000e-01 -4.269160e-04 -9.000000e-01 -4.509868e-04 -1.000000e+00 -4.751992e-04 -1.100000e+00 -4.996602e-04 -1.200000e+00 -5.244491e-04 -1.300000e+00 -5.496261e-04 -1.400000e+00 -5.752388e-04 -1.500000e+00 -6.013259e-04 -1.600000e+00 -6.279199e-04 -1.700000e+00 -6.550496e-04 -1.800000e+00 -6.827407e-04 -2.000000e-01 -4.794537e-04 -3.000000e-01 -6.277488e-04 -4.000000e-01 -7.216836e-04 -5.000000e-01 -7.788900e-04 -6.000000e-01 -8.249362e-04 -7.000000e-01 -8.695725e-04 -8.000000e-01 -9.132860e-04 -9.000000e-01 -9.560496e-04 -1.000000e+00 -9.980243e-04 -1.100000e+00 -1.039436e-03 -1.200000e+00 -1.080503e-03 -1.300000e+00 -1.121414e-03 -1.400000e+00 -1.162321e-03 -1.500000e+00 -1.203347e-03 -1.600000e+00 -1.244592e-03 -1.700000e+00 -1.286135e-03 -1.800000e+00 -1.328043e-03 -2.000000e-01 -6.742034e-04 -3.000000e-01 -9.255767e-04 -4.000000e-01 -1.120584e-03 -5.000000e-01 -1.262674e-03 -6.000000e-01 -1.360267e-03 -7.000000e-01 -1.431039e-03 -8.000000e-01 -1.493992e-03 -9.000000e-01 -1.555652e-03 -1.000000e+00 -1.616389e-03 -1.100000e+00 -1.676065e-03 -1.200000e+00 -1.734701e-03 -1.300000e+00 -1.792425e-03 -1.400000e+00 -1.849415e-03 -1.500000e+00 -1.905849e-03 -1.600000e+00 -1.961897e-03 -1.700000e+00 -2.017707e-03 -1.800000e+00 -2.073407e-03 -2.000000e-01 -8.369558e-04 -3.000000e-01 -1.178233e-03 -4.000000e-01 -1.465728e-03 -5.000000e-01 -1.700714e-03 -6.000000e-01 -1.885805e-03 -7.000000e-01 -2.025899e-03 -8.000000e-01 -2.130473e-03 -9.000000e-01 -2.214348e-03 -1.000000e+00 -2.291765e-03 -1.100000e+00 -2.367784e-03 -1.200000e+00 -2.442901e-03 -1.300000e+00 -2.516994e-03 -1.400000e+00 -2.590008e-03 -1.500000e+00 -2.661983e-03 -1.600000e+00 -2.733022e-03 -1.700000e+00 -2.803255e-03 -1.800000e+00 -2.872822e-03 -2.000000e-01 -1.026682e-03 -3.000000e-01 -1.477128e-03 -4.000000e-01 -1.880317e-03 -5.000000e-01 -2.235142e-03 -6.000000e-01 -2.542173e-03 -7.000000e-01 -2.803095e-03 -8.000000e-01 -3.020463e-03 -9.000000e-01 -3.198066e-03 -1.000000e+00 -3.341634e-03 -1.100000e+00 -3.459105e-03 -1.200000e+00 -3.560452e-03 -1.300000e+00 -3.655550e-03 -1.400000e+00 -3.748819e-03 -1.500000e+00 -3.841096e-03 -1.600000e+00 -3.932420e-03 -1.700000e+00 -4.022737e-03 -1.800000e+00 -4.112026e-03 -2.000000e-01 -1.161007e-03 -3.000000e-01 -1.692459e-03 -4.000000e-01 -2.184621e-03 -5.000000e-01 -2.634683e-03 -6.000000e-01 -3.041461e-03 -7.000000e-01 -3.405101e-03 -8.000000e-01 -3.726696e-03 -9.000000e-01 -4.007981e-03 -1.000000e+00 -4.251243e-03 -1.100000e+00 -4.459465e-03 -1.200000e+00 -4.636576e-03 -1.300000e+00 -4.787520e-03 -1.400000e+00 -4.918054e-03 -1.500000e+00 -5.034570e-03 -1.600000e+00 -5.143824e-03 -1.700000e+00 -5.250392e-03 -1.800000e+00 -5.355673e-03 -2.000000e-01 -9.510700e-05 -3.000000e-01 -1.117296e-04 -4.000000e-01 -1.262773e-04 -5.000000e-01 -1.410037e-04 -6.000000e-01 -1.561316e-04 -7.000000e-01 -1.716957e-04 -8.000000e-01 -1.877195e-04 -9.000000e-01 -2.042277e-04 -1.000000e+00 -2.212445e-04 -1.100000e+00 -2.387928e-04 -1.200000e+00 -2.568939e-04 -1.300000e+00 -2.755684e-04 -1.400000e+00 -2.948361e-04 -1.500000e+00 -3.147167e-04 -1.600000e+00 -3.352301e-04 -1.700000e+00 -3.563964e-04 -1.800000e+00 -3.782366e-04 -2.000000e-01 -2.376343e-04 -3.000000e-01 -2.982592e-04 -4.000000e-01 -3.346393e-04 -5.000000e-01 -3.627644e-04 -6.000000e-01 -3.895187e-04 -7.000000e-01 -4.158232e-04 -8.000000e-01 -4.418286e-04 -9.000000e-01 -4.676928e-04 -1.000000e+00 -4.935712e-04 -1.100000e+00 -5.195943e-04 -1.200000e+00 -5.458648e-04 -1.300000e+00 -5.724624e-04 -1.400000e+00 -5.994495e-04 -1.500000e+00 -6.268759e-04 -1.600000e+00 -6.547828e-04 -1.700000e+00 -6.832047e-04 -1.800000e+00 -7.121720e-04 -2.000000e-01 -3.880144e-04 -3.000000e-01 -5.202136e-04 -4.000000e-01 -6.147190e-04 -5.000000e-01 -6.784862e-04 -6.000000e-01 -7.244956e-04 -7.000000e-01 -7.649123e-04 -8.000000e-01 -8.042370e-04 -9.000000e-01 -8.429768e-04 -1.000000e+00 -8.811364e-04 -1.100000e+00 -9.187915e-04 -1.200000e+00 -9.560738e-04 -1.300000e+00 -9.931263e-04 -1.400000e+00 -1.030082e-03 -1.500000e+00 -1.067057e-03 -1.600000e+00 -1.104148e-03 -1.700000e+00 -1.141436e-03 -1.800000e+00 -1.178991e-03 -2.000000e-01 -5.248863e-04 -3.000000e-01 -7.284183e-04 -4.000000e-01 -8.930698e-04 -5.000000e-01 -1.020779e-03 -6.000000e-01 -1.115621e-03 -7.000000e-01 -1.185733e-03 -8.000000e-01 -1.242348e-03 -9.000000e-01 -1.294552e-03 -1.000000e+00 -1.345760e-03 -1.100000e+00 -1.396411e-03 -1.200000e+00 -1.446446e-03 -1.300000e+00 -1.495848e-03 -1.400000e+00 -1.544677e-03 -1.500000e+00 -1.593029e-03 -1.600000e+00 -1.641016e-03 -1.700000e+00 -1.688751e-03 -1.800000e+00 -1.736337e-03 -2.000000e-01 -6.446034e-04 -3.000000e-01 -9.129122e-04 -4.000000e-01 -1.143735e-03 -5.000000e-01 -1.337547e-03 -6.000000e-01 -1.495855e-03 -7.000000e-01 -1.621484e-03 -8.000000e-01 -1.719510e-03 -9.000000e-01 -1.797608e-03 -1.000000e+00 -1.864708e-03 -1.100000e+00 -1.927799e-03 -1.200000e+00 -1.989802e-03 -1.300000e+00 -2.051259e-03 -1.400000e+00 -2.112136e-03 -1.500000e+00 -2.172376e-03 -1.600000e+00 -2.231976e-03 -1.700000e+00 -2.290983e-03 -1.800000e+00 -2.349469e-03 -2.000000e-01 -7.926195e-04 -3.000000e-01 -1.143462e-03 -4.000000e-01 -1.460842e-03 -5.000000e-01 -1.743707e-03 -6.000000e-01 -1.992053e-03 -7.000000e-01 -2.206770e-03 -8.000000e-01 -2.389490e-03 -9.000000e-01 -2.542683e-03 -1.000000e+00 -2.669953e-03 -1.100000e+00 -2.776160e-03 -1.200000e+00 -2.867095e-03 -1.300000e+00 -2.948831e-03 -1.400000e+00 -3.026404e-03 -1.500000e+00 -3.102463e-03 -1.600000e+00 -3.177846e-03 -1.700000e+00 -3.252681e-03 -1.800000e+00 -3.326934e-03 -2.000000e-01 -9.064332e-04 -3.000000e-01 -1.322650e-03 -4.000000e-01 -1.710365e-03 -5.000000e-01 -2.067570e-03 -6.000000e-01 -2.393153e-03 -7.000000e-01 -2.686885e-03 -8.000000e-01 -2.949283e-03 -9.000000e-01 -3.181440e-03 -1.000000e+00 -3.384935e-03 -1.100000e+00 -3.561860e-03 -1.200000e+00 -3.714923e-03 -1.300000e+00 -3.847476e-03 -1.400000e+00 -3.963376e-03 -1.500000e+00 -4.066729e-03 -1.600000e+00 -4.161635e-03 -1.700000e+00 -4.251789e-03 -1.800000e+00 -4.339709e-03 ngspice-26/tests/hisim/pmos/reference/5_dcSweep_NSUBPDLT.standard0000644000265600020320000002342612264261473024302 0ustar andreasadminV(d) I(d) -2.000000e-01 -1.877125e-05 -3.000000e-01 -2.153279e-05 -4.000000e-01 -2.448566e-05 -5.000000e-01 -2.765267e-05 -6.000000e-01 -3.100540e-05 -7.000000e-01 -3.452064e-05 -8.000000e-01 -3.818714e-05 -9.000000e-01 -4.200140e-05 -1.000000e+00 -4.596395e-05 -1.100000e+00 -5.007732e-05 -1.200000e+00 -5.434514e-05 -1.300000e+00 -5.877167e-05 -1.400000e+00 -6.336165e-05 -1.500000e+00 -6.812019e-05 -1.600000e+00 -7.305275e-05 -1.700000e+00 -7.816516e-05 -1.800000e+00 -8.346359e-05 -2.000000e-01 -2.428966e-04 -3.000000e-01 -2.711927e-04 -4.000000e-01 -2.943178e-04 -5.000000e-01 -3.168453e-04 -6.000000e-01 -3.390262e-04 -7.000000e-01 -3.611130e-04 -8.000000e-01 -3.832846e-04 -9.000000e-01 -4.056638e-04 -1.000000e+00 -4.283374e-04 -1.100000e+00 -4.513690e-04 -1.200000e+00 -4.748068e-04 -1.300000e+00 -4.986892e-04 -1.400000e+00 -5.230476e-04 -1.500000e+00 -5.479089e-04 -1.600000e+00 -5.732969e-04 -1.700000e+00 -5.992333e-04 -1.800000e+00 -6.257383e-04 -2.000000e-01 -5.574984e-04 -3.000000e-01 -7.069258e-04 -4.000000e-01 -7.867362e-04 -5.000000e-01 -8.382499e-04 -6.000000e-01 -8.868799e-04 -7.000000e-01 -9.341533e-04 -8.000000e-01 -9.801043e-04 -9.000000e-01 -1.025020e-03 -1.000000e+00 -1.069231e-03 -1.100000e+00 -1.113029e-03 -1.200000e+00 -1.156647e-03 -1.300000e+00 -1.200264e-03 -1.400000e+00 -1.244020e-03 -1.500000e+00 -1.288021e-03 -1.600000e+00 -1.332352e-03 -1.700000e+00 -1.377082e-03 -1.800000e+00 -1.422264e-03 -2.000000e-01 -8.228368e-04 -3.000000e-01 -1.113227e-03 -4.000000e-01 -1.325810e-03 -5.000000e-01 -1.467701e-03 -6.000000e-01 -1.558279e-03 -7.000000e-01 -1.631187e-03 -8.000000e-01 -1.701573e-03 -9.000000e-01 -1.770411e-03 -1.000000e+00 -1.837622e-03 -1.100000e+00 -1.903319e-03 -1.200000e+00 -1.967740e-03 -1.300000e+00 -2.031156e-03 -1.400000e+00 -2.093826e-03 -1.500000e+00 -2.155977e-03 -1.600000e+00 -2.217802e-03 -1.700000e+00 -2.279460e-03 -1.800000e+00 -2.341085e-03 -2.000000e-01 -1.035292e-03 -3.000000e-01 -1.444714e-03 -4.000000e-01 -1.779974e-03 -5.000000e-01 -2.044415e-03 -6.000000e-01 -2.242830e-03 -7.000000e-01 -2.384339e-03 -8.000000e-01 -2.487539e-03 -9.000000e-01 -2.577917e-03 -1.000000e+00 -2.665710e-03 -1.100000e+00 -2.751903e-03 -1.200000e+00 -2.836458e-03 -1.300000e+00 -2.919389e-03 -1.400000e+00 -3.000814e-03 -1.500000e+00 -3.080915e-03 -1.600000e+00 -3.159899e-03 -1.700000e+00 -3.237969e-03 -1.800000e+00 -3.315314e-03 -2.000000e-01 -1.268358e-03 -3.000000e-01 -1.816307e-03 -4.000000e-01 -2.299285e-03 -5.000000e-01 -2.717183e-03 -6.000000e-01 -3.072114e-03 -7.000000e-01 -3.367214e-03 -8.000000e-01 -3.606486e-03 -9.000000e-01 -3.795850e-03 -1.000000e+00 -3.944455e-03 -1.100000e+00 -4.065535e-03 -1.200000e+00 -4.175881e-03 -1.300000e+00 -4.283368e-03 -1.400000e+00 -4.389123e-03 -1.500000e+00 -4.493307e-03 -1.600000e+00 -4.595932e-03 -1.700000e+00 -4.697036e-03 -1.800000e+00 -4.796701e-03 -2.000000e-01 -1.418748e-03 -3.000000e-01 -2.063181e-03 -4.000000e-01 -2.654343e-03 -5.000000e-01 -3.189162e-03 -6.000000e-01 -3.667144e-03 -7.000000e-01 -4.089481e-03 -8.000000e-01 -4.458325e-03 -9.000000e-01 -4.776367e-03 -1.000000e+00 -5.046861e-03 -1.100000e+00 -5.274038e-03 -1.200000e+00 -5.463554e-03 -1.300000e+00 -5.622532e-03 -1.400000e+00 -5.759453e-03 -1.500000e+00 -5.884750e-03 -1.600000e+00 -6.006379e-03 -1.700000e+00 -6.126044e-03 -1.800000e+00 -6.244150e-03 -2.000000e-01 -4.474684e-05 -3.000000e-01 -5.078723e-05 -4.000000e-01 -5.695011e-05 -5.000000e-01 -6.340364e-05 -6.000000e-01 -7.014157e-05 -7.000000e-01 -7.714279e-05 -8.000000e-01 -8.439740e-05 -9.000000e-01 -9.190470e-05 -1.000000e+00 -9.966883e-05 -1.100000e+00 -1.076962e-04 -1.200000e+00 -1.159944e-04 -1.300000e+00 -1.245716e-04 -1.400000e+00 -1.334363e-04 -1.500000e+00 -1.425974e-04 -1.600000e+00 -1.520644e-04 -1.700000e+00 -1.618470e-04 -1.800000e+00 -1.719554e-04 -2.000000e-01 -2.353693e-04 -3.000000e-01 -2.743533e-04 -4.000000e-01 -2.984507e-04 -5.000000e-01 -3.211363e-04 -6.000000e-01 -3.432829e-04 -7.000000e-01 -3.650876e-04 -8.000000e-01 -3.867583e-04 -9.000000e-01 -4.084605e-04 -1.000000e+00 -4.303156e-04 -1.100000e+00 -4.524113e-04 -1.200000e+00 -4.748124e-04 -1.300000e+00 -4.975682e-04 -1.400000e+00 -5.207175e-04 -1.500000e+00 -5.442918e-04 -1.600000e+00 -5.683182e-04 -1.700000e+00 -5.928201e-04 -1.800000e+00 -6.178187e-04 -2.000000e-01 -4.597148e-04 -3.000000e-01 -5.979546e-04 -4.000000e-01 -6.827673e-04 -5.000000e-01 -7.341349e-04 -6.000000e-01 -7.768859e-04 -7.000000e-01 -8.184453e-04 -8.000000e-01 -8.590437e-04 -9.000000e-01 -8.987196e-04 -1.000000e+00 -9.376652e-04 -1.100000e+00 -9.761085e-04 -1.200000e+00 -1.014258e-03 -1.300000e+00 -1.052285e-03 -1.400000e+00 -1.090329e-03 -1.500000e+00 -1.128500e-03 -1.600000e+00 -1.166886e-03 -1.700000e+00 -1.205557e-03 -1.800000e+00 -1.244570e-03 -2.000000e-01 -6.559645e-04 -3.000000e-01 -8.977243e-04 -4.000000e-01 -1.083037e-03 -5.000000e-01 -1.215662e-03 -6.000000e-01 -1.305206e-03 -7.000000e-01 -1.370842e-03 -8.000000e-01 -1.430433e-03 -9.000000e-01 -1.488883e-03 -1.000000e+00 -1.546335e-03 -1.100000e+00 -1.602697e-03 -1.200000e+00 -1.658031e-03 -1.300000e+00 -1.712493e-03 -1.400000e+00 -1.766263e-03 -1.500000e+00 -1.819520e-03 -1.600000e+00 -1.872426e-03 -1.700000e+00 -1.925122e-03 -1.800000e+00 -1.977729e-03 -2.000000e-01 -8.202666e-04 -3.000000e-01 -1.152611e-03 -4.000000e-01 -1.431004e-03 -5.000000e-01 -1.656808e-03 -6.000000e-01 -1.832753e-03 -7.000000e-01 -1.964210e-03 -8.000000e-01 -2.061632e-03 -9.000000e-01 -2.140753e-03 -1.000000e+00 -2.214778e-03 -1.100000e+00 -2.287574e-03 -1.200000e+00 -2.359402e-03 -1.300000e+00 -2.430153e-03 -1.400000e+00 -2.499805e-03 -1.500000e+00 -2.568426e-03 -1.600000e+00 -2.636132e-03 -1.700000e+00 -2.703063e-03 -1.800000e+00 -2.769358e-03 -2.000000e-01 -1.012125e-03 -3.000000e-01 -1.454662e-03 -4.000000e-01 -1.849691e-03 -5.000000e-01 -2.196209e-03 -6.000000e-01 -2.494853e-03 -7.000000e-01 -2.747347e-03 -8.000000e-01 -2.956320e-03 -9.000000e-01 -3.125782e-03 -1.000000e+00 -3.261870e-03 -1.100000e+00 -3.373052e-03 -1.200000e+00 -3.469833e-03 -1.300000e+00 -3.561524e-03 -1.400000e+00 -3.651618e-03 -1.500000e+00 -3.740709e-03 -1.600000e+00 -3.828797e-03 -1.700000e+00 -3.915839e-03 -1.800000e+00 -4.001833e-03 -2.000000e-01 -1.148311e-03 -3.000000e-01 -1.672796e-03 -4.000000e-01 -2.157693e-03 -5.000000e-01 -2.600278e-03 -6.000000e-01 -2.999445e-03 -7.000000e-01 -3.355396e-03 -8.000000e-01 -3.669259e-03 -9.000000e-01 -3.942798e-03 -1.000000e+00 -4.178350e-03 -1.100000e+00 -4.379019e-03 -1.200000e+00 -4.548930e-03 -1.300000e+00 -4.693266e-03 -1.400000e+00 -4.818032e-03 -1.500000e+00 -4.929916e-03 -1.600000e+00 -5.035654e-03 -1.700000e+00 -5.139090e-03 -1.800000e+00 -5.241313e-03 -2.000000e-01 -8.324256e-05 -3.000000e-01 -9.722335e-05 -4.000000e-01 -1.097722e-04 -5.000000e-01 -1.225638e-04 -6.000000e-01 -1.357493e-04 -7.000000e-01 -1.493391e-04 -8.000000e-01 -1.633406e-04 -9.000000e-01 -1.777667e-04 -1.000000e+00 -1.926328e-04 -1.100000e+00 -2.079548e-04 -1.200000e+00 -2.237482e-04 -1.300000e+00 -2.400281e-04 -1.400000e+00 -2.568095e-04 -1.500000e+00 -2.741075e-04 -1.600000e+00 -2.919371e-04 -1.700000e+00 -3.103141e-04 -1.800000e+00 -3.292543e-04 -2.000000e-01 -2.226466e-04 -3.000000e-01 -2.765736e-04 -4.000000e-01 -3.084542e-04 -5.000000e-01 -3.337570e-04 -6.000000e-01 -3.579682e-04 -7.000000e-01 -3.817488e-04 -8.000000e-01 -4.052583e-04 -9.000000e-01 -4.286554e-04 -1.000000e+00 -4.520833e-04 -1.100000e+00 -4.756568e-04 -1.200000e+00 -4.994638e-04 -1.300000e+00 -5.235719e-04 -1.400000e+00 -5.480334e-04 -1.500000e+00 -5.728900e-04 -1.600000e+00 -5.981759e-04 -1.700000e+00 -6.239198e-04 -1.800000e+00 -6.501469e-04 -2.000000e-01 -3.734249e-04 -3.000000e-01 -4.980558e-04 -4.000000e-01 -5.852431e-04 -5.000000e-01 -6.429174e-04 -6.000000e-01 -6.848693e-04 -7.000000e-01 -7.224198e-04 -8.000000e-01 -7.590260e-04 -9.000000e-01 -7.950066e-04 -1.000000e+00 -8.303942e-04 -1.100000e+00 -8.652920e-04 -1.200000e+00 -8.998408e-04 -1.300000e+00 -9.341819e-04 -1.400000e+00 -9.684416e-04 -1.500000e+00 -1.002727e-03 -1.600000e+00 -1.037126e-03 -1.700000e+00 -1.071712e-03 -1.800000e+00 -1.106547e-03 -2.000000e-01 -5.112473e-04 -3.000000e-01 -7.075035e-04 -4.000000e-01 -8.647602e-04 -5.000000e-01 -9.851270e-04 -6.000000e-01 -1.073160e-03 -7.000000e-01 -1.137798e-03 -8.000000e-01 -1.190609e-03 -9.000000e-01 -1.239928e-03 -1.000000e+00 -1.288379e-03 -1.100000e+00 -1.336216e-03 -1.200000e+00 -1.383392e-03 -1.300000e+00 -1.429921e-03 -1.400000e+00 -1.475881e-03 -1.500000e+00 -1.521379e-03 -1.600000e+00 -1.566530e-03 -1.700000e+00 -1.611444e-03 -1.800000e+00 -1.656221e-03 -2.000000e-01 -6.319591e-04 -3.000000e-01 -8.934387e-04 -4.000000e-01 -1.117237e-03 -5.000000e-01 -1.303922e-03 -6.000000e-01 -1.455094e-03 -7.000000e-01 -1.573807e-03 -8.000000e-01 -1.665600e-03 -9.000000e-01 -1.738666e-03 -1.000000e+00 -1.802082e-03 -1.100000e+00 -1.862260e-03 -1.200000e+00 -1.921511e-03 -1.300000e+00 -1.980173e-03 -1.400000e+00 -2.038199e-03 -1.500000e+00 -2.095553e-03 -1.600000e+00 -2.152254e-03 -1.700000e+00 -2.208360e-03 -1.800000e+00 -2.263951e-03 -2.000000e-01 -7.813710e-04 -3.000000e-01 -1.126074e-03 -4.000000e-01 -1.437068e-03 -5.000000e-01 -1.713377e-03 -6.000000e-01 -1.955065e-03 -7.000000e-01 -2.163071e-03 -8.000000e-01 -2.339091e-03 -9.000000e-01 -2.485725e-03 -1.000000e+00 -2.606805e-03 -1.100000e+00 -2.707472e-03 -1.200000e+00 -2.793768e-03 -1.300000e+00 -2.871855e-03 -1.400000e+00 -2.946446e-03 -1.500000e+00 -3.019761e-03 -1.600000e+00 -3.092420e-03 -1.700000e+00 -3.164490e-03 -1.800000e+00 -3.235933e-03 -2.000000e-01 -8.964334e-04 -3.000000e-01 -1.307157e-03 -4.000000e-01 -1.689111e-03 -5.000000e-01 -2.040345e-03 -6.000000e-01 -2.359806e-03 -7.000000e-01 -2.647319e-03 -8.000000e-01 -2.903440e-03 -9.000000e-01 -3.129300e-03 -1.000000e+00 -3.326521e-03 -1.100000e+00 -3.497275e-03 -1.200000e+00 -3.644392e-03 -1.300000e+00 -3.771375e-03 -1.400000e+00 -3.882224e-03 -1.500000e+00 -3.981164e-03 -1.600000e+00 -4.072368e-03 -1.700000e+00 -4.159423e-03 -1.800000e+00 -4.244563e-03 ngspice-26/tests/hisim/pmos/reference/14_dcSweep_COISTI=1_NSUBC.standard0000644000265600020320000002342612264261473025231 0ustar andreasadminV(d) I(d) -2.000000e-01 -9.149765e-04 -3.000000e-01 -1.312071e-03 -4.000000e-01 -1.433168e-03 -5.000000e-01 -1.496034e-03 -6.000000e-01 -1.555059e-03 -7.000000e-01 -1.614410e-03 -8.000000e-01 -1.674240e-03 -9.000000e-01 -1.734532e-03 -1.000000e+00 -1.795358e-03 -1.100000e+00 -1.856851e-03 -1.200000e+00 -1.919158e-03 -1.300000e+00 -1.982431e-03 -1.400000e+00 -2.046820e-03 -1.500000e+00 -2.112466e-03 -1.600000e+00 -2.179509e-03 -1.700000e+00 -2.248084e-03 -1.800000e+00 -2.318324e-03 -2.000000e-01 -9.232297e-04 -3.000000e-01 -1.327337e-03 -4.000000e-01 -1.710863e-03 -5.000000e-01 -1.958674e-03 -6.000000e-01 -2.093061e-03 -7.000000e-01 -2.189930e-03 -8.000000e-01 -2.275584e-03 -9.000000e-01 -2.356945e-03 -1.000000e+00 -2.436286e-03 -1.100000e+00 -2.514620e-03 -1.200000e+00 -2.592523e-03 -1.300000e+00 -2.670375e-03 -1.400000e+00 -2.748455e-03 -1.500000e+00 -2.826978e-03 -1.600000e+00 -2.906118e-03 -1.700000e+00 -2.986021e-03 -1.800000e+00 -3.066812e-03 -2.000000e-01 -1.095416e-03 -3.000000e-01 -1.532864e-03 -4.000000e-01 -1.908293e-03 -5.000000e-01 -2.251935e-03 -6.000000e-01 -2.549626e-03 -7.000000e-01 -2.763046e-03 -8.000000e-01 -2.913534e-03 -9.000000e-01 -3.033796e-03 -1.000000e+00 -3.140514e-03 -1.100000e+00 -3.240484e-03 -1.200000e+00 -3.336646e-03 -1.300000e+00 -3.430477e-03 -1.400000e+00 -3.522832e-03 -1.500000e+00 -3.614269e-03 -1.600000e+00 -3.705181e-03 -1.700000e+00 -3.795862e-03 -1.800000e+00 -3.886539e-03 -2.000000e-01 -1.266181e-03 -3.000000e-01 -1.788446e-03 -4.000000e-01 -2.239391e-03 -5.000000e-01 -2.625167e-03 -6.000000e-01 -2.956214e-03 -7.000000e-01 -3.254331e-03 -8.000000e-01 -3.511588e-03 -9.000000e-01 -3.714657e-03 -1.000000e+00 -3.876238e-03 -1.100000e+00 -4.013410e-03 -1.200000e+00 -4.137132e-03 -1.300000e+00 -4.253089e-03 -1.400000e+00 -4.364192e-03 -1.500000e+00 -4.472039e-03 -1.600000e+00 -4.577602e-03 -1.700000e+00 -4.681523e-03 -1.800000e+00 -4.784263e-03 -2.000000e-01 -1.410458e-03 -3.000000e-01 -2.013890e-03 -4.000000e-01 -2.546215e-03 -5.000000e-01 -3.012144e-03 -6.000000e-01 -3.416584e-03 -7.000000e-01 -3.764445e-03 -8.000000e-01 -4.064268e-03 -9.000000e-01 -4.332522e-03 -1.000000e+00 -4.569253e-03 -1.100000e+00 -4.768351e-03 -1.200000e+00 -4.937569e-03 -1.300000e+00 -5.086916e-03 -1.400000e+00 -5.223801e-03 -1.500000e+00 -5.352736e-03 -1.600000e+00 -5.476335e-03 -1.700000e+00 -5.596153e-03 -1.800000e+00 -5.713172e-03 -2.000000e-01 -1.569615e-03 -3.000000e-01 -2.272355e-03 -4.000000e-01 -2.911045e-03 -5.000000e-01 -3.486223e-03 -6.000000e-01 -4.001100e-03 -7.000000e-01 -4.459595e-03 -8.000000e-01 -4.865291e-03 -9.000000e-01 -5.221495e-03 -1.000000e+00 -5.532079e-03 -1.100000e+00 -5.802606e-03 -1.200000e+00 -6.043859e-03 -1.300000e+00 -6.264340e-03 -1.400000e+00 -6.461017e-03 -1.500000e+00 -6.637501e-03 -1.600000e+00 -6.799003e-03 -1.700000e+00 -6.949893e-03 -1.800000e+00 -7.093283e-03 -2.000000e-01 -1.666869e-03 -3.000000e-01 -2.438619e-03 -4.000000e-01 -3.157347e-03 -5.000000e-01 -3.820091e-03 -6.000000e-01 -4.427010e-03 -7.000000e-01 -4.980095e-03 -8.000000e-01 -5.482150e-03 -9.000000e-01 -5.936103e-03 -1.000000e+00 -6.344668e-03 -1.100000e+00 -6.710377e-03 -1.200000e+00 -7.035842e-03 -1.300000e+00 -7.324036e-03 -1.400000e+00 -7.578767e-03 -1.500000e+00 -7.806338e-03 -1.600000e+00 -8.016639e-03 -1.700000e+00 -8.211786e-03 -1.800000e+00 -8.392274e-03 -2.000000e-01 -9.251483e-04 -3.000000e-01 -1.400997e-03 -4.000000e-01 -1.622351e-03 -5.000000e-01 -1.714781e-03 -6.000000e-01 -1.788269e-03 -7.000000e-01 -1.858537e-03 -8.000000e-01 -1.927932e-03 -9.000000e-01 -1.997102e-03 -1.000000e+00 -2.066400e-03 -1.100000e+00 -2.136103e-03 -1.200000e+00 -2.206440e-03 -1.300000e+00 -2.277614e-03 -1.400000e+00 -2.349806e-03 -1.500000e+00 -2.423179e-03 -1.600000e+00 -2.497883e-03 -1.700000e+00 -2.574062e-03 -1.800000e+00 -2.651853e-03 -2.000000e-01 -9.004562e-04 -3.000000e-01 -1.309167e-03 -4.000000e-01 -1.709083e-03 -5.000000e-01 -2.018699e-03 -6.000000e-01 -2.197293e-03 -7.000000e-01 -2.313527e-03 -8.000000e-01 -2.408984e-03 -9.000000e-01 -2.496530e-03 -1.000000e+00 -2.580343e-03 -1.100000e+00 -2.662153e-03 -1.200000e+00 -2.742868e-03 -1.300000e+00 -2.823050e-03 -1.400000e+00 -2.903088e-03 -1.500000e+00 -2.983268e-03 -1.600000e+00 -3.063816e-03 -1.700000e+00 -3.144912e-03 -1.800000e+00 -3.226709e-03 -2.000000e-01 -9.965683e-04 -3.000000e-01 -1.424684e-03 -4.000000e-01 -1.809940e-03 -5.000000e-01 -2.162401e-03 -6.000000e-01 -2.481521e-03 -7.000000e-01 -2.728326e-03 -8.000000e-01 -2.902116e-03 -9.000000e-01 -3.034214e-03 -1.000000e+00 -3.146682e-03 -1.100000e+00 -3.249490e-03 -1.200000e+00 -3.346952e-03 -1.300000e+00 -3.441139e-03 -1.400000e+00 -3.533199e-03 -1.500000e+00 -3.623852e-03 -1.600000e+00 -3.713591e-03 -1.700000e+00 -3.802780e-03 -1.800000e+00 -3.891698e-03 -2.000000e-01 -1.107086e-03 -3.000000e-01 -1.588163e-03 -4.000000e-01 -2.020564e-03 -5.000000e-01 -2.406972e-03 -6.000000e-01 -2.750770e-03 -7.000000e-01 -3.058797e-03 -8.000000e-01 -3.331277e-03 -9.000000e-01 -3.552663e-03 -1.000000e+00 -3.726767e-03 -1.100000e+00 -3.870138e-03 -1.200000e+00 -3.996051e-03 -1.300000e+00 -4.111994e-03 -1.400000e+00 -4.221847e-03 -1.500000e+00 -4.327689e-03 -1.600000e+00 -4.430727e-03 -1.700000e+00 -4.531736e-03 -1.800000e+00 -4.631251e-03 -2.000000e-01 -1.208704e-03 -3.000000e-01 -1.745351e-03 -4.000000e-01 -2.233061e-03 -5.000000e-01 -2.673490e-03 -6.000000e-01 -3.069016e-03 -7.000000e-01 -3.421711e-03 -8.000000e-01 -3.734234e-03 -9.000000e-01 -4.011272e-03 -1.000000e+00 -4.256918e-03 -1.100000e+00 -4.466025e-03 -1.200000e+00 -4.641572e-03 -1.300000e+00 -4.793285e-03 -1.400000e+00 -4.929741e-03 -1.500000e+00 -5.056552e-03 -1.600000e+00 -5.177031e-03 -1.700000e+00 -5.293124e-03 -1.800000e+00 -5.406020e-03 -2.000000e-01 -1.331359e-03 -3.000000e-01 -1.940890e-03 -4.000000e-01 -2.506041e-03 -5.000000e-01 -3.025747e-03 -6.000000e-01 -3.501024e-03 -7.000000e-01 -3.933831e-03 -8.000000e-01 -4.326181e-03 -9.000000e-01 -4.679760e-03 -1.000000e+00 -4.996085e-03 -1.100000e+00 -5.276891e-03 -1.200000e+00 -5.525501e-03 -1.300000e+00 -5.748477e-03 -1.400000e+00 -5.948324e-03 -1.500000e+00 -6.126086e-03 -1.600000e+00 -6.286551e-03 -1.700000e+00 -6.434602e-03 -1.800000e+00 -6.573938e-03 -2.000000e-01 -1.416524e-03 -3.000000e-01 -2.081044e-03 -4.000000e-01 -2.708319e-03 -5.000000e-01 -3.295318e-03 -6.000000e-01 -3.841061e-03 -7.000000e-01 -4.346056e-03 -8.000000e-01 -4.811693e-03 -9.000000e-01 -5.239702e-03 -1.000000e+00 -5.631767e-03 -1.100000e+00 -5.989354e-03 -1.200000e+00 -6.313729e-03 -1.300000e+00 -6.606069e-03 -1.400000e+00 -6.867794e-03 -1.500000e+00 -7.101516e-03 -1.600000e+00 -7.312506e-03 -1.700000e+00 -7.506751e-03 -1.800000e+00 -7.685915e-03 -2.000000e-01 -8.934599e-04 -3.000000e-01 -1.377643e-03 -4.000000e-01 -1.735261e-03 -5.000000e-01 -1.897501e-03 -6.000000e-01 -1.998268e-03 -7.000000e-01 -2.085511e-03 -8.000000e-01 -2.168610e-03 -9.000000e-01 -2.250053e-03 -1.000000e+00 -2.330872e-03 -1.100000e+00 -2.411661e-03 -1.200000e+00 -2.492827e-03 -1.300000e+00 -2.574679e-03 -1.400000e+00 -2.657462e-03 -1.500000e+00 -2.741383e-03 -1.600000e+00 -2.826623e-03 -1.700000e+00 -2.913344e-03 -1.800000e+00 -3.001695e-03 -2.000000e-01 -8.555843e-04 -3.000000e-01 -1.260704e-03 -4.000000e-01 -1.657924e-03 -5.000000e-01 -2.015303e-03 -6.000000e-01 -2.261883e-03 -7.000000e-01 -2.416649e-03 -8.000000e-01 -2.531899e-03 -9.000000e-01 -2.631799e-03 -1.000000e+00 -2.724740e-03 -1.100000e+00 -2.813973e-03 -1.200000e+00 -2.901054e-03 -1.300000e+00 -2.986875e-03 -1.400000e+00 -3.072022e-03 -1.500000e+00 -3.156910e-03 -1.600000e+00 -3.241853e-03 -1.700000e+00 -3.327094e-03 -1.800000e+00 -3.412832e-03 -2.000000e-01 -8.989893e-04 -3.000000e-01 -1.307696e-03 -4.000000e-01 -1.691009e-03 -5.000000e-01 -2.050515e-03 -6.000000e-01 -2.383159e-03 -7.000000e-01 -2.664810e-03 -8.000000e-01 -2.874339e-03 -9.000000e-01 -3.028710e-03 -1.000000e+00 -3.153469e-03 -1.100000e+00 -3.263485e-03 -1.200000e+00 -3.365607e-03 -1.300000e+00 -3.463025e-03 -1.400000e+00 -3.557394e-03 -1.500000e+00 -3.649692e-03 -1.600000e+00 -3.740562e-03 -1.700000e+00 -3.830467e-03 -1.800000e+00 -3.919755e-03 -2.000000e-01 -9.628973e-04 -3.000000e-01 -1.399928e-03 -4.000000e-01 -1.806559e-03 -5.000000e-01 -2.184082e-03 -6.000000e-01 -2.533154e-03 -7.000000e-01 -2.853139e-03 -8.000000e-01 -3.139621e-03 -9.000000e-01 -3.382188e-03 -1.000000e+00 -3.575894e-03 -1.100000e+00 -3.731643e-03 -1.200000e+00 -3.863959e-03 -1.300000e+00 -3.982748e-03 -1.400000e+00 -4.093482e-03 -1.500000e+00 -4.199073e-03 -1.600000e+00 -4.301143e-03 -1.700000e+00 -4.400675e-03 -1.800000e+00 -4.498319e-03 -2.000000e-01 -1.028399e-03 -3.000000e-01 -1.499709e-03 -4.000000e-01 -1.939645e-03 -5.000000e-01 -2.348615e-03 -6.000000e-01 -2.727738e-03 -7.000000e-01 -3.077715e-03 -8.000000e-01 -3.398289e-03 -9.000000e-01 -3.687902e-03 -1.000000e+00 -3.944159e-03 -1.100000e+00 -4.165063e-03 -1.200000e+00 -4.350970e-03 -1.300000e+00 -4.508722e-03 -1.400000e+00 -4.647331e-03 -1.500000e+00 -4.773710e-03 -1.600000e+00 -4.892211e-03 -1.700000e+00 -5.005412e-03 -1.800000e+00 -5.114851e-03 -2.000000e-01 -1.115540e-03 -3.000000e-01 -1.636187e-03 -4.000000e-01 -2.127702e-03 -5.000000e-01 -2.588805e-03 -6.000000e-01 -3.019541e-03 -7.000000e-01 -3.420759e-03 -8.000000e-01 -3.793482e-03 -9.000000e-01 -4.138384e-03 -1.000000e+00 -4.455486e-03 -1.100000e+00 -4.744042e-03 -1.200000e+00 -5.002969e-03 -1.300000e+00 -5.232579e-03 -1.400000e+00 -5.435832e-03 -1.500000e+00 -5.616015e-03 -1.600000e+00 -5.776779e-03 -1.700000e+00 -5.922867e-03 -1.800000e+00 -6.058530e-03 -2.000000e-01 -1.183506e-03 -3.000000e-01 -1.745004e-03 -4.000000e-01 -2.281435e-03 -5.000000e-01 -2.790466e-03 -6.000000e-01 -3.270917e-03 -7.000000e-01 -3.722612e-03 -8.000000e-01 -4.146094e-03 -9.000000e-01 -4.542269e-03 -1.000000e+00 -4.912066e-03 -1.100000e+00 -5.256173e-03 -1.200000e+00 -5.574869e-03 -1.300000e+00 -5.867959e-03 -1.400000e+00 -6.134933e-03 -1.500000e+00 -6.375629e-03 -1.600000e+00 -6.591361e-03 -1.700000e+00 -6.785628e-03 -1.800000e+00 -6.962758e-03 ngspice-26/tests/hisim/pmos/reference/65_acFreq_COTHRML=1.standard0000644000265600020320000002530212264261473024225 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/50_acFreq_COGIDL=0.standard0000644000265600020320000002530212264261473024047 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/52_acFreq_COSTI=0.standard0000644000265600020320000002530212264261473023771 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/78_noise_COIGN=0_T27.standard0000644000265600020320000000353212264261473024330 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/pmos/reference/7_dcSweep_COISUB=1.standard0000644000265600020320000003447412264261473024220 0ustar andreasadminV(d) I(d) I(b) -2.000000e-01 -1.172852e-04 7.028908e-05 -3.000000e-01 -1.365443e-04 8.297984e-05 -4.000000e-01 -1.586244e-04 9.829218e-05 -5.000000e-01 -1.837526e-04 1.163033e-04 -6.000000e-01 -2.118185e-04 1.368943e-04 -7.000000e-01 -2.427316e-04 1.599893e-04 -8.000000e-01 -2.764973e-04 1.855986e-04 -9.000000e-01 -3.131935e-04 2.137952e-04 -1.000000e+00 -3.529413e-04 2.446901e-04 -1.100000e+00 -3.958881e-04 2.784177e-04 -1.200000e+00 -4.421988e-04 3.151281e-04 -1.300000e+00 -4.920519e-04 3.549841e-04 -1.400000e+00 -5.456385e-04 3.981598e-04 -1.500000e+00 -6.031616e-04 4.448406e-04 -1.600000e+00 -6.648367e-04 4.952231e-04 -1.700000e+00 -7.308928e-04 5.495161e-04 -1.800000e+00 -8.015727e-04 6.079412e-04 -2.000000e-01 -8.331983e-04 5.095030e-04 -3.000000e-01 -9.762189e-04 6.039347e-04 -4.000000e-01 -1.088298e-03 6.830796e-04 -5.000000e-01 -1.211124e-03 7.739309e-04 -6.000000e-01 -1.343185e-03 8.747349e-04 -7.000000e-01 -1.483409e-03 9.841042e-04 -8.000000e-01 -1.631455e-03 1.101389e-03 -9.000000e-01 -1.787397e-03 1.226428e-03 -1.000000e+00 -1.951511e-03 1.359328e-03 -1.100000e+00 -2.124158e-03 1.500325e-03 -1.200000e+00 -2.305729e-03 1.649716e-03 -1.300000e+00 -2.496618e-03 1.807823e-03 -1.400000e+00 -2.697222e-03 1.974983e-03 -1.500000e+00 -2.907937e-03 2.151543e-03 -1.600000e+00 -3.129163e-03 2.337859e-03 -1.700000e+00 -3.361303e-03 2.534295e-03 -1.800000e+00 -3.604768e-03 2.741226e-03 -2.000000e-01 -1.655057e-03 1.018815e-03 -3.000000e-01 -2.202781e-03 1.377571e-03 -4.000000e-01 -2.578698e-03 1.640209e-03 -5.000000e-01 -2.840829e-03 1.834063e-03 -6.000000e-01 -3.097512e-03 2.030601e-03 -7.000000e-01 -3.374711e-03 2.248920e-03 -8.000000e-01 -3.667756e-03 2.484500e-03 -9.000000e-01 -3.973348e-03 2.733932e-03 -1.000000e+00 -4.290104e-03 2.995526e-03 -1.100000e+00 -4.617797e-03 3.268719e-03 -1.200000e+00 -4.956739e-03 3.553524e-03 -1.300000e+00 -5.307450e-03 3.850214e-03 -1.400000e+00 -5.670497e-03 4.159160e-03 -1.500000e+00 -6.046443e-03 4.480769e-03 -1.600000e+00 -6.435827e-03 4.815455e-03 -1.700000e+00 -6.839159e-03 5.163626e-03 -1.800000e+00 -7.256927e-03 5.525690e-03 -2.000000e-01 -2.339651e-03 1.445359e-03 -3.000000e-01 -3.283324e-03 2.061630e-03 -4.000000e-01 -4.080191e-03 2.608894e-03 -5.000000e-01 -4.724058e-03 3.075173e-03 -6.000000e-01 -5.223761e-03 3.456572e-03 -7.000000e-01 -5.637266e-03 3.782353e-03 -8.000000e-01 -6.058064e-03 4.120930e-03 -9.000000e-01 -6.508868e-03 4.490935e-03 -1.000000e+00 -6.982911e-03 4.885681e-03 -1.100000e+00 -7.474652e-03 5.299698e-03 -1.200000e+00 -7.981222e-03 5.729990e-03 -1.300000e+00 -8.501555e-03 6.175259e-03 -1.400000e+00 -9.035540e-03 6.635128e-03 -1.500000e+00 -9.583499e-03 7.109669e-03 -1.600000e+00 -1.014594e-02 7.599160e-03 -1.700000e+00 -1.072342e-02 8.103964e-03 -1.800000e+00 -1.131650e-02 8.624480e-03 -2.000000e-01 -2.888669e-03 1.789008e-03 -3.000000e-01 -4.165304e-03 2.622306e-03 -4.000000e-01 -5.330077e-03 3.417719e-03 -5.000000e-01 -6.372668e-03 4.161720e-03 -6.000000e-01 -7.281015e-03 4.837752e-03 -7.000000e-01 -8.051290e-03 5.435042e-03 -8.000000e-01 -8.701377e-03 5.958114e-03 -9.000000e-01 -9.282850e-03 6.435504e-03 -1.000000e+00 -9.878247e-03 6.931381e-03 -1.100000e+00 -1.051189e-02 7.467101e-03 -1.200000e+00 -1.117536e-02 8.034110e-03 -1.300000e+00 -1.186140e-02 8.625247e-03 -1.400000e+00 -1.256597e-02 9.236470e-03 -1.500000e+00 -1.328725e-02 9.865823e-03 -1.600000e+00 -1.402458e-02 1.051249e-02 -1.700000e+00 -1.477794e-02 1.117626e-02 -1.800000e+00 -1.554760e-02 1.185719e-02 -2.000000e-01 -3.492012e-03 2.168724e-03 -3.000000e-01 -5.155863e-03 3.255084e-03 -4.000000e-01 -6.762670e-03 4.348806e-03 -5.000000e-01 -8.296246e-03 5.434191e-03 -6.000000e-01 -9.739075e-03 6.491764e-03 -7.000000e-01 -1.107685e-02 7.504086e-03 -8.000000e-01 -1.229989e-02 8.457642e-03 -9.000000e-01 -1.340549e-02 9.344709e-03 -1.000000e+00 -1.440201e-02 1.016624e-02 -1.100000e+00 -1.531101e-02 1.093333e-02 -1.200000e+00 -1.616971e-02 1.166863e-02 -1.300000e+00 -1.704066e-02 1.242087e-02 -1.400000e+00 -1.795682e-02 1.322015e-02 -1.500000e+00 -1.890997e-02 1.405790e-02 -1.600000e+00 -1.989134e-02 1.492533e-02 -1.700000e+00 -2.089597e-02 1.581748e-02 -1.800000e+00 -2.192133e-02 1.673181e-02 -2.000000e-01 -3.881343e-03 2.415661e-03 -3.000000e-01 -5.814136e-03 3.678405e-03 -4.000000e-01 -7.742962e-03 4.989594e-03 -5.000000e-01 -9.648150e-03 6.332995e-03 -6.000000e-01 -1.150709e-02 7.686755e-03 -7.000000e-01 -1.330064e-02 9.030705e-03 -8.000000e-01 -1.501438e-02 1.034832e-02 -9.000000e-01 -1.663803e-02 1.162666e-02 -1.000000e+00 -1.816525e-02 1.285626e-02 -1.100000e+00 -1.959458e-02 1.403186e-02 -1.200000e+00 -2.093103e-02 1.515361e-02 -1.300000e+00 -2.218703e-02 1.622776e-02 -1.400000e+00 -2.338174e-02 1.726620e-02 -1.500000e+00 -2.454078e-02 1.828600e-02 -1.600000e+00 -2.570218e-02 1.931514e-02 -1.700000e+00 -2.690357e-02 2.038638e-02 -1.800000e+00 -2.814547e-02 2.149973e-02 -2.000000e-01 -1.990026e-04 1.184648e-04 -3.000000e-01 -2.309365e-04 1.393125e-04 -4.000000e-01 -2.662635e-04 1.637638e-04 -5.000000e-01 -3.058735e-04 1.922187e-04 -6.000000e-01 -3.496572e-04 2.244783e-04 -7.000000e-01 -3.975014e-04 2.604019e-04 -8.000000e-01 -4.494153e-04 2.999797e-04 -9.000000e-01 -5.055061e-04 3.432981e-04 -1.000000e+00 -5.659395e-04 3.905013e-04 -1.100000e+00 -6.309153e-04 4.417669e-04 -1.200000e+00 -7.006544e-04 4.972937e-04 -1.300000e+00 -7.753940e-04 5.572970e-04 -1.400000e+00 -8.553851e-04 6.220052e-04 -1.500000e+00 -9.408925e-04 6.916601e-04 -1.600000e+00 -1.032195e-03 7.665168e-04 -1.700000e+00 -1.129586e-03 8.468440e-04 -1.800000e+00 -1.233375e-03 9.329254e-04 -2.000000e-01 -7.541177e-04 4.573637e-04 -3.000000e-01 -9.315588e-04 5.728257e-04 -4.000000e-01 -1.047596e-03 6.538359e-04 -5.000000e-01 -1.165084e-03 7.401614e-04 -6.000000e-01 -1.292023e-03 8.365988e-04 -7.000000e-01 -1.426788e-03 9.414169e-04 -8.000000e-01 -1.568628e-03 1.053642e-03 -9.000000e-01 -1.717469e-03 1.172960e-03 -1.000000e+00 -1.873552e-03 1.299411e-03 -1.100000e+00 -2.037235e-03 1.433203e-03 -1.200000e+00 -2.208908e-03 1.574611e-03 -1.300000e+00 -2.388964e-03 1.723939e-03 -1.400000e+00 -2.577787e-03 1.881501e-03 -1.500000e+00 -2.775756e-03 2.047619e-03 -1.600000e+00 -2.983245e-03 2.222619e-03 -1.700000e+00 -3.200627e-03 2.406834e-03 -1.800000e+00 -3.428279e-03 2.600603e-03 -2.000000e-01 -1.334988e-03 8.157656e-04 -3.000000e-01 -1.815175e-03 1.127215e-03 -4.000000e-01 -2.177476e-03 1.376339e-03 -5.000000e-01 -2.440730e-03 1.568691e-03 -6.000000e-01 -2.666082e-03 1.740408e-03 -7.000000e-01 -2.903558e-03 1.926655e-03 -8.000000e-01 -3.156980e-03 2.129618e-03 -9.000000e-01 -3.422703e-03 2.345807e-03 -1.000000e+00 -3.698656e-03 2.573093e-03 -1.100000e+00 -3.984143e-03 2.810581e-03 -1.200000e+00 -4.279197e-03 3.058078e-03 -1.300000e+00 -4.584171e-03 3.315725e-03 -1.400000e+00 -4.899534e-03 3.583807e-03 -1.500000e+00 -5.225779e-03 3.862670e-03 -1.600000e+00 -5.563394e-03 4.152674e-03 -1.700000e+00 -5.912846e-03 4.454186e-03 -1.800000e+00 -6.274582e-03 4.767569e-03 -2.000000e-01 -1.840802e-03 1.130018e-03 -3.000000e-01 -2.611010e-03 1.629517e-03 -4.000000e-01 -3.283259e-03 2.087222e-03 -5.000000e-01 -3.850368e-03 2.492943e-03 -6.000000e-01 -4.311944e-03 2.839740e-03 -7.000000e-01 -4.692636e-03 3.137749e-03 -8.000000e-01 -5.048749e-03 3.423447e-03 -9.000000e-01 -5.424635e-03 3.730923e-03 -1.000000e+00 -5.822927e-03 4.061543e-03 -1.100000e+00 -6.238465e-03 4.410338e-03 -1.200000e+00 -6.667931e-03 4.774079e-03 -1.300000e+00 -7.109810e-03 5.151181e-03 -1.400000e+00 -7.563637e-03 5.541034e-03 -1.500000e+00 -8.029479e-03 5.943530e-03 -1.600000e+00 -8.507652e-03 6.358811e-03 -1.700000e+00 -8.998581e-03 6.787140e-03 -1.800000e+00 -9.502728e-03 7.228834e-03 -2.000000e-01 -2.266133e-03 1.395779e-03 -3.000000e-01 -3.289685e-03 2.060144e-03 -4.000000e-01 -4.241194e-03 2.705895e-03 -5.000000e-01 -5.110149e-03 3.321432e-03 -6.000000e-01 -5.885110e-03 3.892876e-03 -7.000000e-01 -6.560338e-03 4.410305e-03 -8.000000e-01 -7.143666e-03 4.873744e-03 -9.000000e-01 -7.662048e-03 5.297394e-03 -1.000000e+00 -8.164068e-03 5.714635e-03 -1.100000e+00 -8.690706e-03 6.158536e-03 -1.200000e+00 -9.245077e-03 6.630944e-03 -1.300000e+00 -9.821086e-03 7.125858e-03 -1.400000e+00 -1.041459e-02 7.639255e-03 -1.500000e+00 -1.102345e-02 8.169027e-03 -1.600000e+00 -1.164674e-02 8.714192e-03 -1.700000e+00 -1.228421e-02 9.274365e-03 -1.800000e+00 -1.293590e-02 9.849484e-03 -2.000000e-01 -2.765650e-03 1.709904e-03 -3.000000e-01 -4.098181e-03 2.576175e-03 -4.000000e-01 -5.399565e-03 3.458038e-03 -5.000000e-01 -6.655799e-03 4.342816e-03 -6.000000e-01 -7.850842e-03 5.214042e-03 -7.000000e-01 -8.971473e-03 6.056885e-03 -8.000000e-01 -1.000872e-02 6.859932e-03 -9.000000e-01 -1.095912e-02 7.616282e-03 -1.000000e+00 -1.182704e-02 8.325270e-03 -1.100000e+00 -1.262635e-02 8.993764e-03 -1.200000e+00 -1.338050e-02 9.636357e-03 -1.300000e+00 -1.412426e-02 1.027772e-02 -1.400000e+00 -1.489294e-02 1.094655e-02 -1.500000e+00 -1.569393e-02 1.164872e-02 -1.600000e+00 -1.652141e-02 1.237821e-02 -1.700000e+00 -1.737075e-02 1.313045e-02 -1.800000e+00 -1.823938e-02 1.390295e-02 -2.000000e-01 -3.122399e-03 1.936093e-03 -3.000000e-01 -4.685358e-03 2.953699e-03 -4.000000e-01 -6.256263e-03 4.017931e-03 -5.000000e-01 -7.819891e-03 5.116555e-03 -6.000000e-01 -9.357030e-03 6.231698e-03 -7.000000e-01 -1.085067e-02 7.346331e-03 -8.000000e-01 -1.228771e-02 8.446323e-03 -9.000000e-01 -1.365877e-02 9.520633e-03 -1.000000e+00 -1.495807e-02 1.056126e-02 -1.100000e+00 -1.618378e-02 1.156359e-02 -1.200000e+00 -1.733895e-02 1.252709e-02 -1.300000e+00 -1.843216e-02 1.345582e-02 -1.400000e+00 -1.947710e-02 1.435818e-02 -1.500000e+00 -2.049171e-02 1.524624e-02 -1.600000e+00 -2.149843e-02 1.613606e-02 -1.700000e+00 -2.252282e-02 1.704744e-02 -1.800000e+00 -2.357819e-02 1.799127e-02 -2.000000e-01 -2.960746e-04 1.745436e-04 -3.000000e-01 -3.601336e-04 2.151541e-04 -4.000000e-01 -4.204899e-04 2.560502e-04 -5.000000e-01 -4.869574e-04 3.030630e-04 -6.000000e-01 -5.600763e-04 3.563132e-04 -7.000000e-01 -6.397021e-04 4.155682e-04 -8.000000e-01 -7.258677e-04 4.807949e-04 -9.000000e-01 -8.187615e-04 5.521234e-04 -1.000000e+00 -9.186582e-04 6.297779e-04 -1.100000e+00 -1.025878e-03 7.140344e-04 -1.200000e+00 -1.140765e-03 8.051990e-04 -1.300000e+00 -1.263684e-03 9.035992e-04 -1.400000e+00 -1.395014e-03 1.009580e-03 -1.500000e+00 -1.535148e-03 1.123501e-03 -1.600000e+00 -1.684498e-03 1.245742e-03 -1.700000e+00 -1.843493e-03 1.376695e-03 -1.800000e+00 -2.012579e-03 1.516775e-03 -2.000000e-01 -6.703689e-04 4.019823e-04 -3.000000e-01 -8.783842e-04 5.348976e-04 -4.000000e-01 -1.025956e-03 6.353838e-04 -5.000000e-01 -1.151187e-03 7.257746e-04 -6.000000e-01 -1.281357e-03 8.234339e-04 -7.000000e-01 -1.420526e-03 9.305374e-04 -8.000000e-01 -1.567679e-03 1.045925e-03 -9.000000e-01 -1.722246e-03 1.168900e-03 -1.000000e+00 -1.884230e-03 1.299301e-03 -1.100000e+00 -2.053915e-03 1.437255e-03 -1.200000e+00 -2.231690e-03 1.583015e-03 -1.300000e+00 -2.417966e-03 1.736887e-03 -1.400000e+00 -2.613159e-03 1.899197e-03 -1.500000e+00 -2.817670e-03 2.070281e-03 -1.600000e+00 -3.031899e-03 2.250476e-03 -1.700000e+00 -3.256235e-03 2.440125e-03 -1.800000e+00 -3.491070e-03 2.639575e-03 -2.000000e-01 -1.057025e-03 6.395301e-04 -3.000000e-01 -1.468412e-03 9.032799e-04 -4.000000e-01 -1.807383e-03 1.132545e-03 -5.000000e-01 -2.077832e-03 1.325885e-03 -6.000000e-01 -2.300638e-03 1.493149e-03 -7.000000e-01 -2.511753e-03 1.657307e-03 -8.000000e-01 -2.733544e-03 1.833847e-03 -9.000000e-01 -2.968083e-03 2.023605e-03 -1.000000e+00 -3.213270e-03 2.224496e-03 -1.100000e+00 -3.467784e-03 2.435200e-03 -1.200000e+00 -3.731187e-03 2.655186e-03 -1.300000e+00 -4.003534e-03 2.884372e-03 -1.400000e+00 -4.285110e-03 3.122904e-03 -1.500000e+00 -4.576298e-03 3.371034e-03 -1.600000e+00 -4.877510e-03 3.629060e-03 -1.700000e+00 -5.189163e-03 3.897300e-03 -1.800000e+00 -5.511666e-03 4.176080e-03 -2.000000e-01 -1.411390e-03 8.590830e-04 -3.000000e-01 -2.022460e-03 1.251932e-03 -4.000000e-01 -2.573714e-03 1.623555e-03 -5.000000e-01 -3.059632e-03 1.966778e-03 -6.000000e-01 -3.476960e-03 2.275030e-03 -7.000000e-01 -3.833712e-03 2.549656e-03 -8.000000e-01 -4.153402e-03 2.803980e-03 -9.000000e-01 -4.468602e-03 3.060540e-03 -1.000000e+00 -4.798832e-03 3.333663e-03 -1.100000e+00 -5.145476e-03 3.623645e-03 -1.200000e+00 -5.505825e-03 3.927804e-03 -1.300000e+00 -5.877991e-03 4.244333e-03 -1.400000e+00 -6.261085e-03 4.572338e-03 -1.500000e+00 -6.654833e-03 4.911475e-03 -1.600000e+00 -7.059291e-03 5.261704e-03 -1.700000e+00 -7.474689e-03 5.623145e-03 -1.800000e+00 -7.901343e-03 5.996003e-03 -2.000000e-01 -1.724244e-03 1.054285e-03 -3.000000e-01 -2.517555e-03 1.565559e-03 -4.000000e-01 -3.268260e-03 2.071295e-03 -5.000000e-01 -3.968205e-03 2.563051e-03 -6.000000e-01 -4.608402e-03 3.030498e-03 -7.000000e-01 -5.183503e-03 3.465821e-03 -8.000000e-01 -5.695684e-03 3.866911e-03 -9.000000e-01 -6.157509e-03 4.239665e-03 -1.000000e+00 -6.591565e-03 4.598316e-03 -1.100000e+00 -7.025693e-03 4.962951e-03 -1.200000e+00 -7.477402e-03 5.346823e-03 -1.300000e+00 -7.948381e-03 5.750466e-03 -1.400000e+00 -8.435853e-03 6.171037e-03 -1.500000e+00 -8.937661e-03 6.606471e-03 -1.600000e+00 -9.452623e-03 7.055631e-03 -1.700000e+00 -9.980191e-03 7.517960e-03 -1.800000e+00 -1.052019e-02 7.993234e-03 -2.000000e-01 -2.115268e-03 1.300150e-03 -3.000000e-01 -3.142670e-03 1.964411e-03 -4.000000e-01 -4.155567e-03 2.647117e-03 -5.000000e-01 -5.143758e-03 3.339280e-03 -6.000000e-01 -6.094587e-03 4.028385e-03 -7.000000e-01 -6.997420e-03 4.703016e-03 -8.000000e-01 -7.845050e-03 5.354438e-03 -9.000000e-01 -8.634298e-03 5.977212e-03 -1.000000e+00 -9.367039e-03 6.570002e-03 -1.100000e+00 -1.005111e-02 7.136298e-03 -1.200000e+00 -1.070001e-02 7.684312e-03 -1.300000e+00 -1.133168e-02 8.226224e-03 -1.400000e+00 -1.196623e-02 8.776740e-03 -1.500000e+00 -1.261846e-02 9.347130e-03 -1.600000e+00 -1.329200e-02 9.939623e-03 -1.700000e+00 -1.398511e-02 1.055216e-02 -1.800000e+00 -1.469580e-02 1.118274e-02 -2.000000e-01 -2.419718e-03 1.493325e-03 -3.000000e-01 -3.634317e-03 2.280727e-03 -4.000000e-01 -4.861638e-03 3.108809e-03 -5.000000e-01 -6.091233e-03 3.969243e-03 -6.000000e-01 -7.308479e-03 4.848639e-03 -7.000000e-01 -8.499880e-03 5.733842e-03 -8.000000e-01 -9.654813e-03 6.613797e-03 -9.000000e-01 -1.076569e-02 7.479894e-03 -1.000000e+00 -1.182783e-02 8.325957e-03 -1.100000e+00 -1.283959e-02 9.148373e-03 -1.200000e+00 -1.380270e-02 9.946388e-03 -1.300000e+00 -1.472258e-02 1.072232e-02 -1.400000e+00 -1.560798e-02 1.148137e-02 -1.500000e+00 -1.647021e-02 1.223095e-02 -1.600000e+00 -1.732200e-02 1.297988e-02 -1.700000e+00 -1.817666e-02 1.373773e-02 -1.800000e+00 -1.904565e-02 1.451296e-02 ngspice-26/tests/hisim/pmos/reference/35_acVd_CORSRD=0.standard0000644000265600020320000000723712264261473023570 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.2 9.150678e-04 4.675415e-03 1.44027738996139e-14 1.23120833335503e-14 -0.3 1.447685e-03 3.865036e-03 1.49525340484638e-14 1.1435343096169e-14 -0.4 2.008014e-03 3.069189e-03 1.55434342084526e-14 1.0306692790582e-14 -0.5 2.584135e-03 2.315011e-03 1.61351743686689e-14 8.86168939934107e-15 -0.6 3.163276e-03 1.619623e-03 1.66227345006779e-14 7.14742393519622e-15 -0.7 3.702488e-03 1.031764e-03 1.68652545663413e-14 5.55046250281194e-15 -0.8 4.084248e-03 6.628834e-04 1.68801945703863e-14 4.49893121810526e-15 -0.9 4.139660e-03 6.467982e-04 1.68230945549263e-14 3.91077105885833e-15 -1 4.202707e-03 6.342970e-04 1.68155645528875e-14 3.75718801727505e-15 -1.1 4.278822e-03 6.102845e-04 1.68164045531149e-14 3.63680798468163e-15 -1.2 4.356072e-03 5.856554e-04 1.68169445532611e-14 3.49670194674731e-15 -1.3 4.433529e-03 5.613020e-04 1.68172045533315e-14 3.3325749023092e-15 -1.4 4.509751e-03 5.382646e-04 1.6817324553364e-14 3.13315784831616e-15 -1.5 4.583618e-03 5.171742e-04 1.68173845533803e-14 2.92917479308686e-15 -1.6 4.654459e-03 4.982762e-04 1.68174045533857e-14 2.73212173973388e-15 -1.7 4.721960e-03 4.815709e-04 1.68174245533911e-14 2.55175369089845e-15 -1.8 4.786051e-03 4.669270e-04 1.68174345533938e-14 2.40298665061912e-15 -0.2 7.278371e-04 3.757703e-03 1.42233038510216e-14 1.22243933098078e-14 -0.3 1.140444e-03 3.175842e-03 1.47430839917543e-14 1.139202308444e-14 -0.4 1.572729e-03 2.591066e-03 1.53012841428895e-14 1.03409727998635e-14 -0.5 2.015606e-03 2.026121e-03 1.58639742952403e-14 9.02708644412305e-15 -0.6 2.459467e-03 1.497172e-03 1.63545844280751e-14 7.46869502218177e-15 -0.7 2.881036e-03 1.033514e-03 1.66544045092527e-14 5.91526960158506e-15 -0.8 3.226840e-03 6.895359e-04 1.67311745300385e-14 4.75867328843156e-15 -0.9 3.405505e-03 5.415092e-04 1.66932845197796e-14 4.06756310131046e-15 -1 3.444341e-03 5.417110e-04 1.66562145097428e-14 3.71382500553433e-15 -1.1 3.497872e-03 5.319536e-04 1.66514945084648e-14 3.55217096176579e-15 -1.2 3.558183e-03 5.163710e-04 1.66517045085217e-14 3.40950992313969e-15 -1.3 3.620597e-03 4.991822e-04 1.66520045086029e-14 3.26135188302525e-15 -1.4 3.683547e-03 4.817812e-04 1.66521545086435e-14 3.08725283588718e-15 -1.5 3.745794e-03 4.650802e-04 1.66522345086652e-14 2.90425178633884e-15 -1.6 3.806464e-03 4.495972e-04 1.66522645086733e-14 2.73138473953434e-15 -1.7 3.865019e-03 4.355656e-04 1.66522845086787e-14 2.56335769404028e-15 -1.8 3.921175e-03 4.230391e-04 1.66522945086814e-14 2.41266265323894e-15 -0.2 5.487890e-04 2.931054e-03 1.39915937882851e-14 1.21090932785898e-14 -0.3 8.516106e-04 2.527445e-03 1.44744639190243e-14 1.13304830677777e-14 -0.4 1.166181e-03 2.117438e-03 1.49930240594267e-14 1.03675728070656e-14 -0.5 1.486156e-03 1.716804e-03 1.55182242016269e-14 9.19663649002946e-15 -0.6 1.804691e-03 1.338077e-03 1.59976643314374e-14 7.82299211810925e-15 -0.7 2.110220e-03 9.972043e-04 1.63448244254325e-14 6.38159372784435e-15 -0.8 2.379951e-03 7.195488e-04 1.65006344676188e-14 5.15321539525556e-15 -0.9 2.580672e-03 5.343712e-04 1.65116944706133e-14 4.3202771697339e-15 -1 2.684286e-03 4.584274e-04 1.64722844599429e-14 3.80532303030782e-15 -1.1 2.726016e-03 4.476048e-04 1.64428344519692e-14 3.49399694601492e-15 -1.2 2.764650e-03 4.418289e-04 1.64344544497003e-14 3.31243089685512e-15 -1.3 2.807393e-03 4.328108e-04 1.64330444493185e-14 3.17421485943252e-15 -1.4 2.852313e-03 4.220591e-04 1.64328844492752e-14 3.02376181869671e-15 -1.5 2.898107e-03 4.106847e-04 1.64329044492806e-14 2.86482777566462e-15 -1.6 2.943814e-03 3.994204e-04 1.64329344492887e-14 2.70986373370743e-15 -1.7 2.988741e-03 3.887175e-04 1.64329544492941e-14 2.56607269477538e-15 -1.8 3.032420e-03 3.788244e-04 1.64329644492968e-14 2.42739165722688e-15 ngspice-26/tests/hisim/pmos/reference/24_dcSweep_CODFM=1.standard0000644000265600020320000002342612264261473024136 0ustar andreasadminV(d) I(d) -2.000000e-01 -3.770875e-05 -3.000000e-01 -4.300475e-05 -4.000000e-01 -4.848457e-05 -5.000000e-01 -5.426240e-05 -6.000000e-01 -6.033806e-05 -7.000000e-01 -6.669593e-05 -8.000000e-01 -7.333011e-05 -9.000000e-01 -8.024325e-05 -1.000000e+00 -8.744281e-05 -1.100000e+00 -9.493876e-05 -1.200000e+00 -1.027425e-04 -1.300000e+00 -1.108664e-04 -1.400000e+00 -1.193237e-04 -1.500000e+00 -1.281283e-04 -1.600000e+00 -1.372953e-04 -1.700000e+00 -1.468403e-04 -1.800000e+00 -1.567801e-04 -2.000000e-01 -2.788640e-04 -3.000000e-01 -3.195688e-04 -4.000000e-01 -3.478435e-04 -5.000000e-01 -3.753220e-04 -6.000000e-01 -4.022025e-04 -7.000000e-01 -4.287686e-04 -8.000000e-01 -4.552853e-04 -9.000000e-01 -4.819499e-04 -1.000000e+00 -5.089052e-04 -1.100000e+00 -5.362554e-04 -1.200000e+00 -5.640793e-04 -1.300000e+00 -5.924385e-04 -1.400000e+00 -6.213829e-04 -1.500000e+00 -6.509552e-04 -1.600000e+00 -6.811925e-04 -1.700000e+00 -7.121288e-04 -1.800000e+00 -7.437957e-04 -2.000000e-01 -5.599541e-04 -3.000000e-01 -7.255665e-04 -4.000000e-01 -8.238197e-04 -5.000000e-01 -8.833398e-04 -6.000000e-01 -9.364465e-04 -7.000000e-01 -9.884359e-04 -8.000000e-01 -1.039166e-03 -9.000000e-01 -1.088760e-03 -1.000000e+00 -1.137504e-03 -1.100000e+00 -1.185697e-03 -1.200000e+00 -1.233606e-03 -1.300000e+00 -1.281447e-03 -1.400000e+00 -1.329391e-03 -1.500000e+00 -1.377575e-03 -1.600000e+00 -1.426109e-03 -1.700000e+00 -1.475080e-03 -1.800000e+00 -1.524562e-03 -2.000000e-01 -7.951820e-04 -3.000000e-01 -1.086891e-03 -4.000000e-01 -1.309202e-03 -5.000000e-01 -1.466710e-03 -6.000000e-01 -1.571113e-03 -7.000000e-01 -1.649320e-03 -8.000000e-01 -1.723159e-03 -9.000000e-01 -1.795746e-03 -1.000000e+00 -1.866977e-03 -1.100000e+00 -1.936801e-03 -1.200000e+00 -2.005347e-03 -1.300000e+00 -2.072833e-03 -1.400000e+00 -2.139499e-03 -1.500000e+00 -2.205575e-03 -1.600000e+00 -2.271265e-03 -1.700000e+00 -2.336746e-03 -1.800000e+00 -2.402166e-03 -2.000000e-01 -9.854308e-04 -3.000000e-01 -1.383744e-03 -4.000000e-01 -1.716271e-03 -5.000000e-01 -1.985231e-03 -6.000000e-01 -2.194171e-03 -7.000000e-01 -2.349232e-03 -8.000000e-01 -2.462912e-03 -9.000000e-01 -2.557007e-03 -1.000000e+00 -2.647476e-03 -1.100000e+00 -2.736549e-03 -1.200000e+00 -2.824294e-03 -1.300000e+00 -2.910626e-03 -1.400000e+00 -2.995568e-03 -1.500000e+00 -3.079232e-03 -1.600000e+00 -3.161779e-03 -1.700000e+00 -3.243391e-03 -1.800000e+00 -3.324247e-03 -2.000000e-01 -1.198078e-03 -3.000000e-01 -1.721718e-03 -4.000000e-01 -2.187986e-03 -5.000000e-01 -2.596051e-03 -6.000000e-01 -2.947225e-03 -7.000000e-01 -3.243973e-03 -8.000000e-01 -3.489521e-03 -9.000000e-01 -3.688376e-03 -1.000000e+00 -3.847369e-03 -1.100000e+00 -3.976345e-03 -1.200000e+00 -4.089304e-03 -1.300000e+00 -4.198668e-03 -1.400000e+00 -4.306427e-03 -1.500000e+00 -4.412849e-03 -1.600000e+00 -4.517946e-03 -1.700000e+00 -4.621708e-03 -1.800000e+00 -4.724164e-03 -2.000000e-01 -1.339605e-03 -3.000000e-01 -1.952180e-03 -4.000000e-01 -2.517689e-03 -5.000000e-01 -3.032909e-03 -6.000000e-01 -3.496867e-03 -7.000000e-01 -3.910210e-03 -8.000000e-01 -4.274602e-03 -9.000000e-01 -4.592303e-03 -1.000000e+00 -4.866058e-03 -1.100000e+00 -5.099312e-03 -1.200000e+00 -5.296577e-03 -1.300000e+00 -5.463588e-03 -1.400000e+00 -5.607181e-03 -1.500000e+00 -5.735594e-03 -1.600000e+00 -5.858461e-03 -1.700000e+00 -5.979634e-03 -1.800000e+00 -6.099381e-03 -2.000000e-01 -6.673432e-05 -3.000000e-01 -7.588499e-05 -4.000000e-01 -8.490562e-05 -5.000000e-01 -9.418097e-05 -6.000000e-01 -1.037774e-04 -7.000000e-01 -1.137114e-04 -8.000000e-01 -1.239955e-04 -9.000000e-01 -1.346446e-04 -1.000000e+00 -1.456754e-04 -1.100000e+00 -1.571052e-04 -1.200000e+00 -1.689517e-04 -1.300000e+00 -1.812326e-04 -1.400000e+00 -1.939661e-04 -1.500000e+00 -2.071707e-04 -1.600000e+00 -2.208657e-04 -1.700000e+00 -2.350713e-04 -1.800000e+00 -2.498083e-04 -2.000000e-01 -2.565294e-04 -3.000000e-01 -3.089026e-04 -4.000000e-01 -3.387002e-04 -5.000000e-01 -3.654826e-04 -6.000000e-01 -3.916887e-04 -7.000000e-01 -4.174238e-04 -8.000000e-01 -4.428915e-04 -9.000000e-01 -4.683006e-04 -1.000000e+00 -4.938204e-04 -1.100000e+00 -5.195793e-04 -1.200000e+00 -5.456743e-04 -1.300000e+00 -5.721798e-04 -1.400000e+00 -5.991545e-04 -1.500000e+00 -6.266465e-04 -1.600000e+00 -6.546965e-04 -1.700000e+00 -6.833402e-04 -1.800000e+00 -7.126096e-04 -2.000000e-01 -4.558015e-04 -3.000000e-01 -6.032418e-04 -4.000000e-01 -7.014041e-04 -5.000000e-01 -7.625959e-04 -6.000000e-01 -8.094350e-04 -7.000000e-01 -8.543832e-04 -8.000000e-01 -8.986326e-04 -9.000000e-01 -9.420577e-04 -1.000000e+00 -9.847298e-04 -1.100000e+00 -1.026832e-03 -1.200000e+00 -1.068568e-03 -1.300000e+00 -1.110126e-03 -1.400000e+00 -1.151665e-03 -1.500000e+00 -1.193317e-03 -1.600000e+00 -1.235191e-03 -1.700000e+00 -1.277373e-03 -1.800000e+00 -1.319937e-03 -2.000000e-01 -6.292859e-04 -3.000000e-01 -8.688414e-04 -4.000000e-01 -1.058522e-03 -5.000000e-01 -1.200756e-03 -6.000000e-01 -1.301443e-03 -7.000000e-01 -1.374051e-03 -8.000000e-01 -1.436496e-03 -9.000000e-01 -1.497358e-03 -1.000000e+00 -1.557558e-03 -1.100000e+00 -1.616917e-03 -1.200000e+00 -1.675372e-03 -1.300000e+00 -1.732995e-03 -1.400000e+00 -1.789923e-03 -1.500000e+00 -1.846313e-03 -1.600000e+00 -1.902325e-03 -1.700000e+00 -1.958102e-03 -1.800000e+00 -2.013774e-03 -2.000000e-01 -7.757029e-04 -3.000000e-01 -1.095901e-03 -4.000000e-01 -1.368675e-03 -5.000000e-01 -1.594759e-03 -6.000000e-01 -1.776094e-03 -7.000000e-01 -1.916338e-03 -8.000000e-01 -2.022653e-03 -9.000000e-01 -2.106900e-03 -1.000000e+00 -2.182907e-03 -1.100000e+00 -2.257295e-03 -1.200000e+00 -2.331004e-03 -1.300000e+00 -2.403930e-03 -1.400000e+00 -2.475965e-03 -1.500000e+00 -2.547096e-03 -1.600000e+00 -2.617386e-03 -1.700000e+00 -2.686935e-03 -1.800000e+00 -2.755863e-03 -2.000000e-01 -9.493495e-04 -3.000000e-01 -1.368551e-03 -4.000000e-01 -1.746103e-03 -5.000000e-01 -2.080739e-03 -6.000000e-01 -2.372655e-03 -7.000000e-01 -2.623105e-03 -8.000000e-01 -2.834148e-03 -9.000000e-01 -3.008831e-03 -1.000000e+00 -3.151739e-03 -1.100000e+00 -3.269323e-03 -1.200000e+00 -3.369851e-03 -1.300000e+00 -3.462714e-03 -1.400000e+00 -3.553562e-03 -1.500000e+00 -3.643558e-03 -1.600000e+00 -3.732807e-03 -1.700000e+00 -3.821246e-03 -1.800000e+00 -3.908825e-03 -2.000000e-01 -1.075700e-03 -3.000000e-01 -1.569799e-03 -4.000000e-01 -2.029113e-03 -5.000000e-01 -2.451016e-03 -6.000000e-01 -2.834228e-03 -7.000000e-01 -3.178642e-03 -8.000000e-01 -3.485045e-03 -9.000000e-01 -3.754854e-03 -1.000000e+00 -3.989998e-03 -1.100000e+00 -4.192982e-03 -1.200000e+00 -4.367083e-03 -1.300000e+00 -4.516446e-03 -1.400000e+00 -4.645965e-03 -1.500000e+00 -4.761108e-03 -1.600000e+00 -4.867919e-03 -1.700000e+00 -4.971639e-03 -1.800000e+00 -5.074169e-03 -2.000000e-01 -1.029424e-04 -3.000000e-01 -1.224425e-04 -4.000000e-01 -1.387914e-04 -5.000000e-01 -1.551727e-04 -6.000000e-01 -1.719196e-04 -7.000000e-01 -1.891019e-04 -8.000000e-01 -2.067710e-04 -9.000000e-01 -2.249725e-04 -1.000000e+00 -2.437466e-04 -1.100000e+00 -2.631282e-04 -1.200000e+00 -2.831490e-04 -1.300000e+00 -3.038381e-04 -1.400000e+00 -3.252235e-04 -1.500000e+00 -3.473327e-04 -1.600000e+00 -3.701932e-04 -1.700000e+00 -3.938329e-04 -1.800000e+00 -4.182805e-04 -2.000000e-01 -2.326826e-04 -3.000000e-01 -2.968909e-04 -4.000000e-01 -3.368301e-04 -5.000000e-01 -3.666029e-04 -6.000000e-01 -3.945188e-04 -7.000000e-01 -4.220433e-04 -8.000000e-01 -4.493012e-04 -9.000000e-01 -4.764122e-04 -1.000000e+00 -5.035239e-04 -1.100000e+00 -5.307734e-04 -1.200000e+00 -5.582746e-04 -1.300000e+00 -5.861189e-04 -1.400000e+00 -6.143794e-04 -1.500000e+00 -6.431156e-04 -1.600000e+00 -6.723766e-04 -1.700000e+00 -7.022044e-04 -1.800000e+00 -7.326358e-04 -2.000000e-01 -3.658979e-04 -3.000000e-01 -4.946757e-04 -4.000000e-01 -5.898788e-04 -5.000000e-01 -6.563856e-04 -6.000000e-01 -7.042886e-04 -7.000000e-01 -7.450971e-04 -8.000000e-01 -7.845423e-04 -9.000000e-01 -8.235634e-04 -1.000000e+00 -8.621415e-04 -1.100000e+00 -9.002898e-04 -1.200000e+00 -9.380993e-04 -1.300000e+00 -9.756927e-04 -1.400000e+00 -1.013195e-03 -1.500000e+00 -1.050721e-03 -1.600000e+00 -1.088371e-03 -1.700000e+00 -1.126229e-03 -1.800000e+00 -1.164370e-03 -2.000000e-01 -4.873673e-04 -3.000000e-01 -6.795289e-04 -4.000000e-01 -8.374697e-04 -5.000000e-01 -9.626076e-04 -6.000000e-01 -1.057909e-03 -7.000000e-01 -1.129479e-03 -8.000000e-01 -1.186598e-03 -9.000000e-01 -1.238154e-03 -1.000000e+00 -1.288489e-03 -1.100000e+00 -1.338434e-03 -1.200000e+00 -1.387946e-03 -1.300000e+00 -1.436962e-03 -1.400000e+00 -1.485495e-03 -1.500000e+00 -1.533611e-03 -1.600000e+00 -1.581400e-03 -1.700000e+00 -1.628963e-03 -1.800000e+00 -1.676396e-03 -2.000000e-01 -5.944459e-04 -3.000000e-01 -8.443543e-04 -4.000000e-01 -1.061332e-03 -5.000000e-01 -1.245609e-03 -6.000000e-01 -1.398315e-03 -7.000000e-01 -1.521622e-03 -8.000000e-01 -1.619415e-03 -9.000000e-01 -1.697780e-03 -1.000000e+00 -1.764330e-03 -1.100000e+00 -1.825969e-03 -1.200000e+00 -1.886288e-03 -1.300000e+00 -1.946185e-03 -1.400000e+00 -2.005689e-03 -1.500000e+00 -2.064720e-03 -1.600000e+00 -2.123240e-03 -1.700000e+00 -2.181264e-03 -1.800000e+00 -2.238839e-03 -2.000000e-01 -7.286277e-04 -3.000000e-01 -1.052811e-03 -4.000000e-01 -1.347551e-03 -5.000000e-01 -1.611815e-03 -6.000000e-01 -1.845451e-03 -7.000000e-01 -2.049108e-03 -8.000000e-01 -2.224106e-03 -9.000000e-01 -2.372448e-03 -1.000000e+00 -2.497036e-03 -1.100000e+00 -2.601823e-03 -1.200000e+00 -2.691636e-03 -1.300000e+00 -2.771746e-03 -1.400000e+00 -2.847035e-03 -1.500000e+00 -2.920554e-03 -1.600000e+00 -2.993430e-03 -1.700000e+00 -3.065902e-03 -1.800000e+00 -3.137954e-03 -2.000000e-01 -8.339544e-04 -3.000000e-01 -1.217922e-03 -4.000000e-01 -1.576666e-03 -5.000000e-01 -1.908395e-03 -6.000000e-01 -2.212035e-03 -7.000000e-01 -2.487268e-03 -8.000000e-01 -2.734448e-03 -9.000000e-01 -2.954460e-03 -1.000000e+00 -3.148627e-03 -1.100000e+00 -3.318708e-03 -1.200000e+00 -3.466960e-03 -1.300000e+00 -3.596185e-03 -1.400000e+00 -3.709647e-03 -1.500000e+00 -3.810875e-03 -1.600000e+00 -3.903468e-03 -1.700000e+00 -3.990862e-03 -1.800000e+00 -4.075746e-03 ngspice-26/tests/hisim/pmos/reference/36_acVd_CORSRD=-1_GDLD.standard0000644000265600020320000000723112264261473024433 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.2 8.010067e-04 3.788485e-03 1.47596239962326e-14 1.19242132285328e-14 -0.3 1.281060e-03 3.165814e-03 1.52120841187382e-14 1.1166483023374e-14 -0.4 1.800353e-03 2.528028e-03 1.57028942516271e-14 1.01148427386378e-14 -0.5 2.349318e-03 1.898307e-03 1.61853343822499e-14 8.66913734720676e-15 -0.6 2.912254e-03 1.299560e-03 1.65349044768975e-14 6.87980186273637e-15 -0.7 3.424736e-03 8.018339e-04 1.66216445003828e-14 5.26652042593339e-15 -0.8 3.689649e-03 5.827727e-04 1.65354544770465e-14 4.29159416196785e-15 -0.9 3.716078e-03 6.067361e-04 1.64749344606604e-14 3.91807106083484e-15 -1 3.798355e-03 5.857627e-04 1.646455445785e-14 3.81351003252448e-15 -1.1 3.883523e-03 5.626068e-04 1.64544444551126e-14 3.70293300258527e-15 -1.2 3.969563e-03 5.390661e-04 1.64421044517715e-14 3.57028296666969e-15 -1.3 4.054615e-03 5.164654e-04 1.64279644479431e-14 3.41977392591871e-15 -1.4 4.137039e-03 4.957748e-04 1.64107244432753e-14 3.23248687520993e-15 -1.5 4.215864e-03 4.774135e-04 1.63918844381742e-14 3.02826381991564e-15 -1.6 4.290669e-03 4.614314e-04 1.63734244331761e-14 2.83291376702376e-15 -1.7 4.361392e-03 4.476851e-04 1.63551444282267e-14 2.64292371558313e-15 -1.8 4.428175e-03 4.359498e-04 1.63391544238974e-14 2.48465367273082e-15 -0.2 6.553590e-04 3.093179e-03 1.45042239270819e-14 1.18844432177649e-14 -0.3 1.034488e-03 2.625745e-03 1.49520340483285e-14 1.11328230142604e-14 -0.4 1.438860e-03 2.144181e-03 1.54355041792301e-14 1.01266727418408e-14 -0.5 1.860693e-03 1.666513e-03 1.59159343093087e-14 8.7967693817637e-15 -0.6 2.288785e-03 1.210306e-03 1.62996144131917e-14 7.1664189403392e-15 -0.7 2.689575e-03 8.147817e-04 1.6464654457877e-14 5.58660151259674e-15 -0.8 2.981682e-03 5.572181e-04 1.64346444497517e-14 4.51903722354905e-15 -0.9 3.070796e-03 5.102860e-04 1.63577844289415e-14 3.95476107076882e-15 -1 3.116987e-03 5.117500e-04 1.63290344211573e-14 3.74448201383484e-15 -1.1 3.180550e-03 4.993573e-04 1.6318274418244e-14 3.61075097762658e-15 -1.2 3.248083e-03 4.838022e-04 1.6307674415374e-14 3.47110293981627e-15 -1.3 3.316925e-03 4.673461e-04 1.6296594412374e-14 3.33092790186326e-15 -1.4 3.385277e-03 4.513135e-04 1.62835944088542e-14 3.16528485701469e-15 -1.5 3.451893e-03 4.364667e-04 1.62693344049933e-14 2.9842108079881e-15 -1.6 3.516033e-03 4.231510e-04 1.62551944011648e-14 2.80892476052864e-15 -1.7 3.577334e-03 4.114546e-04 1.62414143974338e-14 2.64239771544071e-15 -1.8 3.635683e-03 4.013253e-04 1.62280143938057e-14 2.48413367259003e-15 -0.2 5.066285e-04 2.456055e-03 1.41993938445478e-14 1.18157031991532e-14 -0.3 7.895771e-04 2.119230e-03 1.46312739614813e-14 1.10874330019709e-14 -0.4 1.086245e-03 1.772887e-03 1.5096824087531e-14 1.01463727471747e-14 -0.5 1.390729e-03 1.429731e-03 1.55639542140085e-14 8.95305742407937e-15 -0.6 1.695415e-03 1.102074e-03 1.59679043233798e-14 7.51560503488286e-15 -0.7 1.984733e-03 8.094223e-04 1.6211284389276e-14 6.03270763338192e-15 -0.8 2.227072e-03 5.842342e-04 1.62624744031359e-14 4.86337631678036e-15 -0.9 2.379760e-03 4.619054e-04 1.62124443895901e-14 4.14704312283002e-15 -1 2.438655e-03 4.362268e-04 1.61575943747392e-14 3.74488801394477e-15 -1.1 2.476466e-03 4.338194e-04 1.61317443677402e-14 3.5198339530104e-15 -1.2 2.519878e-03 4.275462e-04 1.61197243644857e-14 3.35798690918961e-15 -1.3 2.566770e-03 4.185052e-04 1.61111743621708e-14 3.22792887397583e-15 -1.4 2.615147e-03 4.083044e-04 1.61020543597015e-14 3.08368483492112e-15 -1.5 2.663638e-03 3.979770e-04 1.60921843570291e-14 2.92757179265284e-15 -1.6 2.711290e-03 3.881454e-04 1.60821543543135e-14 2.77180175047742e-15 -1.7 2.757485e-03 3.791442e-04 1.60725043517007e-14 2.62627971107669e-15 -1.8 2.801856e-03 3.711217e-04 1.60631343491637e-14 2.48838667374155e-15 ngspice-26/tests/hisim/pmos/reference/45_acFreq_COOVLP=1.standard0000644000265600020320000002530212264261473024115 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/60_acFreq_CORBNET=0.standard0000644000265600020320000002530212264261473024203 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/79_noise_COIGN=0_T-55.standard0000644000265600020320000000353212264261473024407 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/pmos/reference/9_dcSweep_COIIGS=1.standard0000644000265600020320000002333512264261473024205 0ustar andreasadminV(d) I(g) -2.000000e-01 -4.801261e-10 -3.000000e-01 -3.933269e-10 -4.000000e-01 -3.527743e-10 -5.000000e-01 -3.171287e-10 -6.000000e-01 -2.391916e-10 -7.000000e-01 -1.096159e-10 -8.000000e-01 8.102744e-11 -9.000000e-01 3.427750e-10 -1.000000e+00 6.865583e-10 -1.100000e+00 1.124389e-09 -1.200000e+00 1.669505e-09 -1.300000e+00 2.336507e-09 -1.400000e+00 3.141492e-09 -1.500000e+00 4.102203e-09 -1.600000e+00 5.238175e-09 -1.700000e+00 6.570907e-09 -1.800000e+00 8.124034e-09 -2.000000e-01 -2.235718e-09 -3.000000e-01 -1.899158e-09 -4.000000e-01 -1.664745e-09 -5.000000e-01 -1.492100e-09 -6.000000e-01 -1.374165e-09 -7.000000e-01 -1.269280e-09 -8.000000e-01 -1.129791e-09 -9.000000e-01 -9.455648e-10 -1.000000e+00 -7.062959e-10 -1.100000e+00 -4.011275e-10 -1.200000e+00 -1.841631e-11 -1.300000e+00 4.544506e-10 -1.400000e+00 1.031215e-09 -1.500000e+00 1.726902e-09 -1.600000e+00 2.557966e-09 -1.700000e+00 3.542453e-09 -1.800000e+00 4.700158e-09 -2.000000e-01 -7.013415e-09 -3.000000e-01 -5.946330e-09 -4.000000e-01 -5.216689e-09 -5.000000e-01 -4.702056e-09 -6.000000e-01 -4.290653e-09 -7.000000e-01 -3.948152e-09 -8.000000e-01 -3.672251e-09 -9.000000e-01 -3.422914e-09 -1.000000e+00 -3.152195e-09 -1.100000e+00 -2.848889e-09 -1.200000e+00 -2.501418e-09 -1.300000e+00 -2.097702e-09 -1.400000e+00 -1.624993e-09 -1.500000e+00 -1.069710e-09 -1.600000e+00 -4.172718e-10 -1.700000e+00 3.480739e-10 -1.800000e+00 1.243414e-09 -2.000000e-01 -1.718211e-08 -3.000000e-01 -1.485761e-08 -4.000000e-01 -1.305729e-08 -5.000000e-01 -1.167548e-08 -6.000000e-01 -1.061455e-08 -7.000000e-01 -9.779277e-09 -8.000000e-01 -9.070495e-09 -9.000000e-01 -8.449380e-09 -1.000000e+00 -7.915683e-09 -1.100000e+00 -7.429217e-09 -1.200000e+00 -6.940665e-09 -1.300000e+00 -6.437076e-09 -1.400000e+00 -5.905129e-09 -1.500000e+00 -5.331136e-09 -1.600000e+00 -4.700912e-09 -1.700000e+00 -3.999607e-09 -1.800000e+00 -3.211519e-09 -2.000000e-01 -3.575019e-08 -3.000000e-01 -3.142464e-08 -4.000000e-01 -2.792317e-08 -5.000000e-01 -2.505980e-08 -6.000000e-01 -2.271719e-08 -7.000000e-01 -2.080514e-08 -8.000000e-01 -1.922807e-08 -9.000000e-01 -1.791963e-08 -1.000000e+00 -1.678457e-08 -1.100000e+00 -1.576588e-08 -1.200000e+00 -1.486256e-08 -1.300000e+00 -1.403333e-08 -1.400000e+00 -1.322689e-08 -1.500000e+00 -1.242809e-08 -1.600000e+00 -1.162151e-08 -1.700000e+00 -1.079153e-08 -1.800000e+00 -9.922259e-09 -2.000000e-01 -8.753429e-08 -3.000000e-01 -7.817111e-08 -4.000000e-01 -7.034786e-08 -5.000000e-01 -6.375444e-08 -6.000000e-01 -5.814100e-08 -7.000000e-01 -5.333253e-08 -8.000000e-01 -4.920794e-08 -9.000000e-01 -4.566804e-08 -1.000000e+00 -4.261360e-08 -1.100000e+00 -3.995252e-08 -1.200000e+00 -3.763724e-08 -1.300000e+00 -3.560710e-08 -1.400000e+00 -3.375769e-08 -1.500000e+00 -3.207560e-08 -1.600000e+00 -3.051714e-08 -1.700000e+00 -2.902763e-08 -1.800000e+00 -2.758824e-08 -2.000000e-01 -1.813852e-07 -3.000000e-01 -1.635395e-07 -4.000000e-01 -1.482957e-07 -5.000000e-01 -1.352929e-07 -6.000000e-01 -1.241179e-07 -7.000000e-01 -1.144224e-07 -8.000000e-01 -1.059470e-07 -9.000000e-01 -9.850430e-08 -1.000000e+00 -9.195318e-08 -1.100000e+00 -8.617530e-08 -1.200000e+00 -8.106018e-08 -1.300000e+00 -7.650248e-08 -1.400000e+00 -7.241214e-08 -1.500000e+00 -6.873598e-08 -1.600000e+00 -6.546420e-08 -1.700000e+00 -6.249532e-08 -1.800000e+00 -5.975895e-08 -2.000000e-01 -5.278961e-10 -3.000000e-01 -4.310848e-10 -4.000000e-01 -3.842084e-10 -5.000000e-01 -3.441878e-10 -6.000000e-01 -2.629495e-10 -7.000000e-01 -1.307189e-10 -8.000000e-01 6.214652e-11 -9.000000e-01 3.257985e-10 -1.000000e+00 6.712383e-10 -1.100000e+00 1.110524e-09 -1.200000e+00 1.656927e-09 -1.300000e+00 2.325073e-09 -1.400000e+00 3.131081e-09 -1.500000e+00 4.092708e-09 -1.600000e+00 5.229505e-09 -1.700000e+00 6.562981e-09 -1.800000e+00 8.116780e-09 -2.000000e-01 -2.368238e-09 -3.000000e-01 -1.990074e-09 -4.000000e-01 -1.742425e-09 -5.000000e-01 -1.562524e-09 -6.000000e-01 -1.438333e-09 -7.000000e-01 -1.327852e-09 -8.000000e-01 -1.183359e-09 -9.000000e-01 -9.946687e-10 -1.000000e+00 -7.514134e-10 -1.100000e+00 -4.426761e-10 -1.200000e+00 -5.675867e-11 -1.300000e+00 4.189990e-10 -1.400000e+00 9.983796e-10 -1.500000e+00 1.696441e-09 -1.600000e+00 2.529667e-09 -1.700000e+00 3.516129e-09 -1.800000e+00 4.675642e-09 -2.000000e-01 -7.229221e-09 -3.000000e-01 -6.121787e-09 -4.000000e-01 -5.343436e-09 -5.000000e-01 -4.792465e-09 -6.000000e-01 -4.369123e-09 -7.000000e-01 -4.021120e-09 -8.000000e-01 -3.740028e-09 -9.000000e-01 -3.485743e-09 -1.000000e+00 -3.210437e-09 -1.100000e+00 -2.902939e-09 -1.200000e+00 -2.551658e-09 -1.300000e+00 -2.144479e-09 -1.400000e+00 -1.668616e-09 -1.500000e+00 -1.110454e-09 -1.600000e+00 -4.553798e-10 -1.700000e+00 3.123843e-10 -1.800000e+00 1.209949e-09 -2.000000e-01 -1.740938e-08 -3.000000e-01 -1.503413e-08 -4.000000e-01 -1.319221e-08 -5.000000e-01 -1.176700e-08 -6.000000e-01 -1.066609e-08 -7.000000e-01 -9.794214e-09 -8.000000e-01 -9.074755e-09 -9.000000e-01 -8.452845e-09 -1.000000e+00 -7.918397e-09 -1.100000e+00 -7.431050e-09 -1.200000e+00 -6.941677e-09 -1.300000e+00 -6.437394e-09 -1.400000e+00 -5.904880e-09 -1.500000e+00 -5.330425e-09 -1.600000e+00 -4.699823e-09 -1.700000e+00 -3.998205e-09 -1.800000e+00 -3.209855e-09 -2.000000e-01 -3.587676e-08 -3.000000e-01 -3.146113e-08 -4.000000e-01 -2.789666e-08 -5.000000e-01 -2.499159e-08 -6.000000e-01 -2.261542e-08 -7.000000e-01 -2.067348e-08 -8.000000e-01 -1.907347e-08 -9.000000e-01 -1.773229e-08 -1.000000e+00 -1.658813e-08 -1.100000e+00 -1.557781e-08 -1.200000e+00 -1.468307e-08 -1.300000e+00 -1.386175e-08 -1.400000e+00 -1.306276e-08 -1.500000e+00 -1.227107e-08 -1.600000e+00 -1.147128e-08 -1.700000e+00 -1.064778e-08 -1.800000e+00 -9.784673e-09 -2.000000e-01 -8.714653e-08 -3.000000e-01 -7.759980e-08 -4.000000e-01 -6.962980e-08 -5.000000e-01 -6.294320e-08 -6.000000e-01 -5.728255e-08 -7.000000e-01 -5.245711e-08 -8.000000e-01 -4.833109e-08 -9.000000e-01 -4.479760e-08 -1.000000e+00 -4.175721e-08 -1.100000e+00 -3.911517e-08 -1.200000e+00 -3.679765e-08 -1.300000e+00 -3.475947e-08 -1.400000e+00 -3.293851e-08 -1.500000e+00 -3.128978e-08 -1.600000e+00 -2.976314e-08 -1.700000e+00 -2.830378e-08 -1.800000e+00 -2.689306e-08 -2.000000e-01 -1.797838e-07 -3.000000e-01 -1.616464e-07 -4.000000e-01 -1.461315e-07 -5.000000e-01 -1.329294e-07 -6.000000e-01 -1.216361e-07 -7.000000e-01 -1.118922e-07 -8.000000e-01 -1.034202e-07 -9.000000e-01 -9.601457e-08 -1.000000e+00 -8.951935e-08 -1.100000e+00 -8.380719e-08 -1.200000e+00 -7.876426e-08 -1.300000e+00 -7.428481e-08 -1.400000e+00 -7.027538e-08 -1.500000e+00 -6.666449e-08 -1.600000e+00 -6.341138e-08 -1.700000e+00 -6.048319e-08 -1.800000e+00 -5.781519e-08 -2.000000e-01 -5.905777e-10 -3.000000e-01 -4.798739e-10 -4.000000e-01 -4.250848e-10 -5.000000e-01 -3.795678e-10 -6.000000e-01 -2.941309e-10 -7.000000e-01 -1.584921e-10 -8.000000e-01 3.724255e-11 -9.000000e-01 3.033627e-10 -1.000000e+00 6.509548e-10 -1.100000e+00 1.092135e-09 -1.200000e+00 1.640216e-09 -1.300000e+00 2.309857e-09 -1.400000e+00 3.117202e-09 -1.500000e+00 4.080030e-09 -1.600000e+00 5.217908e-09 -1.700000e+00 6.552361e-09 -1.800000e+00 8.107044e-09 -2.000000e-01 -2.603895e-09 -3.000000e-01 -2.163734e-09 -4.000000e-01 -1.882619e-09 -5.000000e-01 -1.687318e-09 -6.000000e-01 -1.551809e-09 -7.000000e-01 -1.431417e-09 -8.000000e-01 -1.278086e-09 -9.000000e-01 -1.081510e-09 -1.000000e+00 -8.312127e-10 -1.100000e+00 -5.161689e-10 -1.200000e+00 -1.245845e-10 -1.300000e+00 3.562840e-10 -1.400000e+00 9.402901e-10 -1.500000e+00 1.642551e-09 -1.600000e+00 2.479603e-09 -1.700000e+00 3.469559e-09 -1.800000e+00 4.632272e-09 -2.000000e-01 -7.722123e-09 -3.000000e-01 -6.534864e-09 -4.000000e-01 -5.677089e-09 -5.000000e-01 -5.060412e-09 -6.000000e-01 -4.597026e-09 -7.000000e-01 -4.228115e-09 -8.000000e-01 -3.931097e-09 -9.000000e-01 -3.662436e-09 -1.000000e+00 -3.374050e-09 -1.100000e+00 -3.054712e-09 -1.200000e+00 -2.692720e-09 -1.300000e+00 -2.275832e-09 -1.400000e+00 -1.791144e-09 -1.500000e+00 -1.224933e-09 -1.600000e+00 -5.624968e-10 -1.700000e+00 2.120221e-10 -1.800000e+00 1.115800e-09 -2.000000e-01 -1.825310e-08 -3.000000e-01 -1.574568e-08 -4.000000e-01 -1.379446e-08 -5.000000e-01 -1.227055e-08 -6.000000e-01 -1.108096e-08 -7.000000e-01 -1.013886e-08 -8.000000e-01 -9.368370e-09 -9.000000e-01 -8.718771e-09 -1.000000e+00 -8.164461e-09 -1.100000e+00 -7.659460e-09 -1.200000e+00 -7.154075e-09 -1.300000e+00 -6.635313e-09 -1.400000e+00 -6.089703e-09 -1.500000e+00 -5.503367e-09 -1.600000e+00 -4.861942e-09 -1.700000e+00 -4.150426e-09 -1.800000e+00 -3.352991e-09 -2.000000e-01 -3.718621e-08 -3.000000e-01 -3.254258e-08 -4.000000e-01 -2.879299e-08 -5.000000e-01 -2.574061e-08 -6.000000e-01 -2.324138e-08 -7.000000e-01 -2.119227e-08 -8.000000e-01 -1.950388e-08 -9.000000e-01 -1.809059e-08 -1.000000e+00 -1.688477e-08 -1.100000e+00 -1.583918e-08 -1.200000e+00 -1.492235e-08 -1.300000e+00 -1.408250e-08 -1.400000e+00 -1.326699e-08 -1.500000e+00 -1.246053e-08 -1.600000e+00 -1.164751e-08 -1.700000e+00 -1.081212e-08 -1.800000e+00 -9.938262e-09 -2.000000e-01 -8.938622e-08 -3.000000e-01 -7.938783e-08 -4.000000e-01 -7.102636e-08 -5.000000e-01 -6.402594e-08 -6.000000e-01 -5.812287e-08 -7.000000e-01 -5.311045e-08 -8.000000e-01 -4.883621e-08 -9.000000e-01 -4.518192e-08 -1.000000e+00 -4.204453e-08 -1.100000e+00 -3.932805e-08 -1.200000e+00 -3.694904e-08 -1.300000e+00 -3.484585e-08 -1.400000e+00 -3.297637e-08 -1.500000e+00 -3.130433e-08 -1.600000e+00 -2.976375e-08 -1.700000e+00 -2.829366e-08 -1.800000e+00 -2.687413e-08 -2.000000e-01 -1.832260e-07 -3.000000e-01 -1.643220e-07 -4.000000e-01 -1.480988e-07 -5.000000e-01 -1.342985e-07 -6.000000e-01 -1.225276e-07 -7.000000e-01 -1.124154e-07 -8.000000e-01 -1.036649e-07 -9.000000e-01 -9.604952e-08 -1.000000e+00 -8.939494e-08 -1.100000e+00 -8.356038e-08 -1.200000e+00 -7.842444e-08 -1.300000e+00 -7.387778e-08 -1.400000e+00 -6.982328e-08 -1.500000e+00 -6.618044e-08 -1.600000e+00 -6.288961e-08 -1.700000e+00 -5.991132e-08 -1.800000e+00 -5.721456e-08 ngspice-26/tests/hisim/pmos/reference/58_acFreq_CORG=0.standard0000644000265600020320000002530212264261473023650 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/39_acVd_VFBCL.standard0000644000265600020320000000725112264261473023253 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.2 -4.155438e-05 2.520459e-03 5.76561156106449e-14 5.48672548555487e-14 -0.3 -5.749442e-05 2.511981e-03 5.84363758219037e-14 5.39677846120132e-14 -0.4 -6.916320e-05 2.494623e-03 5.92528760429747e-14 5.29878443466901e-14 -0.5 -7.578415e-05 2.467578e-03 6.01084362746214e-14 5.19164440566038e-14 -0.6 -7.663424e-05 2.430479e-03 6.1004416517212e-14 5.07427337388166e-14 -0.7 -7.107657e-05 2.383302e-03 6.19409767707897e-14 4.94555633903096e-14 -0.8 -5.858078e-05 2.326248e-03 6.29171470350921e-14 4.80430530078662e-14 -0.9 -3.873238e-05 2.259677e-03 6.39307573095315e-14 4.64922325879748e-14 -1 -1.123342e-05 2.184070e-03 6.49784475931982e-14 4.47887021267365e-14 -1.1 2.410310e-05 2.099996e-03 6.60555178848197e-14 4.29179016202091e-14 -1.2 6.736190e-05 2.008089e-03 6.71556881826956e-14 4.08743610669116e-14 -1.3 1.185327e-04 1.909038e-03 6.8270648484576e-14 3.86513504650218e-14 -1.4 1.775101e-04 1.803592e-03 6.93894287874906e-14 3.62361898111065e-14 -1.5 2.440794e-04 1.692585e-03 7.04976590875488e-14 3.36624891142658e-14 -1.6 3.178825e-04 1.576990e-03 7.15770893798093e-14 3.09523183804753e-14 -1.7 3.983621e-04 1.457987e-03 7.26056196582884e-14 2.81370776182365e-14 -1.8 4.846908e-04 1.337028e-03 7.35582699162226e-14 2.52673068412336e-14 -0.2 -1.602504e-05 2.186276e-03 5.7366495532229e-14 5.45981847826968e-14 -0.3 -1.963066e-05 2.172405e-03 5.81355457404527e-14 5.36997045394293e-14 -0.4 -1.964567e-05 2.152080e-03 5.89402459583288e-14 5.27213742745421e-14 -0.5 -1.557102e-05 2.124572e-03 5.97834161866208e-14 5.16521439850434e-14 -0.6 -6.929603e-06 2.089496e-03 6.06663864256888e-14 5.04810936679764e-14 -0.7 6.710486e-06 2.046726e-03 6.15893166755762e-14 4.91969033202762e-14 -0.8 2.571886e-05 1.996317e-03 6.25512169360149e-14 4.77876329387101e-14 -0.9 5.039149e-05 1.938459e-03 6.35499172064174e-14 4.62406725198639e-14 -1 8.094422e-05 1.873456e-03 6.45820374858685e-14 4.45433520603069e-14 -1.1 1.175103e-04 1.801708e-03 6.56428877730983e-14 4.26864415575403e-14 -1.2 1.601406e-04 1.723699e-03 6.67262880664337e-14 4.0675581013091e-14 -1.3 2.088041e-04 1.639986e-03 6.78241483636841e-14 3.85087504264122e-14 -1.4 2.633857e-04 1.551197e-03 6.89259686620068e-14 3.61668397923297e-14 -1.5 3.236756e-04 1.458047e-03 7.00182489577464e-14 3.36706191164671e-14 -1.6 3.893473e-04 1.361360e-03 7.10839792462976e-14 3.10495284067953e-14 -1.7 4.599226e-04 1.262113e-03 7.21027295221287e-14 2.83184976673568e-14 -1.8 5.347272e-04 1.161477e-03 7.30514697790042e-14 2.55225469103409e-14 -0.2 4.554976e-06 1.828164e-03 5.67913253764992e-14 5.42162746792929e-14 -0.3 1.054929e-05 1.810239e-03 5.75449955805587e-14 5.3320034436632e-14 -0.4 1.938799e-05 1.787937e-03 5.833320579397e-14 5.23451141726681e-14 -0.5 3.135973e-05 1.760664e-03 5.91588760175238e-14 5.12801938843363e-14 -0.6 4.674706e-05 1.728065e-03 6.00234362516073e-14 5.01139635685743e-14 -0.7 6.581116e-05 1.689980e-03 6.09270664962691e-14 4.88346432221927e-14 -0.8 8.877902e-05 1.646389e-03 6.18687967512467e-14 4.7429772841818e-14 -0.9 1.158333e-04 1.597380e-03 6.28464270159443e-14 4.58866924240222e-14 -1 1.471046e-04 1.543138e-03 6.38565972894524e-14 4.41947619659247e-14 -1.1 1.826656e-04 1.483935e-03 6.4894647570509e-14 4.23523014670704e-14 -1.2 2.225274e-04 1.420127e-03 6.59545078574708e-14 4.03810909333566e-14 -1.3 2.666370e-04 1.352140e-03 6.70283881482286e-14 3.82826803652028e-14 -1.4 3.148737e-04 1.280474e-03 6.81063784400991e-14 3.60278797547057e-14 -1.5 3.670424e-04 1.205698e-03 6.91759787296981e-14 3.36293291052876e-14 -1.6 4.228604e-04 1.128471e-03 7.02217190128368e-14 3.11105484233167e-14 -1.7 4.819387e-04 1.049552e-03 7.12252292845416e-14 2.849752771583e-14 -1.8 5.437581e-04 9.698234e-04 7.21658095392078e-14 2.58132469890493e-14 ngspice-26/tests/hisim/pmos/reference/25_dcSweep_VFBCL.standard0000644000265600020320000002342612264261473023765 0ustar andreasadminV(d) I(d) -2.000000e-01 -6.351651e-04 -3.000000e-01 -9.559341e-04 -4.000000e-01 -1.278874e-03 -5.000000e-01 -1.603965e-03 -6.000000e-01 -1.931169e-03 -7.000000e-01 -2.260437e-03 -8.000000e-01 -2.591715e-03 -9.000000e-01 -2.924948e-03 -1.000000e+00 -3.260077e-03 -1.100000e+00 -3.597038e-03 -1.200000e+00 -3.935766e-03 -1.300000e+00 -4.276192e-03 -1.400000e+00 -4.618241e-03 -1.500000e+00 -4.961838e-03 -1.600000e+00 -5.306903e-03 -1.700000e+00 -5.653353e-03 -1.800000e+00 -6.001104e-03 -2.000000e-01 -6.257151e-04 -3.000000e-01 -9.416755e-04 -4.000000e-01 -1.259751e-03 -5.000000e-01 -1.579925e-03 -6.000000e-01 -1.902161e-03 -7.000000e-01 -2.226413e-03 -8.000000e-01 -2.552632e-03 -9.000000e-01 -2.880765e-03 -1.000000e+00 -3.210757e-03 -1.100000e+00 -3.542549e-03 -1.200000e+00 -3.876080e-03 -1.300000e+00 -4.211284e-03 -1.400000e+00 -4.548093e-03 -1.500000e+00 -4.886435e-03 -1.600000e+00 -5.226236e-03 -1.700000e+00 -5.567417e-03 -1.800000e+00 -5.909899e-03 -2.000000e-01 -6.165245e-04 -3.000000e-01 -9.278089e-04 -4.000000e-01 -1.241155e-03 -5.000000e-01 -1.556548e-03 -6.000000e-01 -1.873953e-03 -7.000000e-01 -2.193328e-03 -8.000000e-01 -2.514627e-03 -9.000000e-01 -2.837800e-03 -1.000000e+00 -3.162796e-03 -1.100000e+00 -3.489560e-03 -1.200000e+00 -3.818034e-03 -1.300000e+00 -4.148157e-03 -1.400000e+00 -4.479864e-03 -1.500000e+00 -4.813088e-03 -1.600000e+00 -5.147759e-03 -1.700000e+00 -5.483805e-03 -1.800000e+00 -5.821149e-03 -2.000000e-01 -6.075836e-04 -3.000000e-01 -9.143196e-04 -4.000000e-01 -1.223065e-03 -5.000000e-01 -1.533808e-03 -6.000000e-01 -1.846514e-03 -7.000000e-01 -2.161146e-03 -8.000000e-01 -2.477659e-03 -9.000000e-01 -2.796008e-03 -1.000000e+00 -3.116144e-03 -1.100000e+00 -3.438015e-03 -1.200000e+00 -3.761568e-03 -1.300000e+00 -4.086743e-03 -1.400000e+00 -4.413483e-03 -1.500000e+00 -4.741722e-03 -1.600000e+00 -5.071396e-03 -1.700000e+00 -5.402435e-03 -1.800000e+00 -5.734770e-03 -2.000000e-01 -5.988829e-04 -3.000000e-01 -9.011933e-04 -4.000000e-01 -1.205463e-03 -5.000000e-01 -1.511681e-03 -6.000000e-01 -1.819817e-03 -7.000000e-01 -2.129834e-03 -8.000000e-01 -2.441691e-03 -9.000000e-01 -2.755346e-03 -1.000000e+00 -3.070752e-03 -1.100000e+00 -3.387861e-03 -1.200000e+00 -3.706623e-03 -1.300000e+00 -4.026982e-03 -1.400000e+00 -4.348884e-03 -1.500000e+00 -4.672267e-03 -1.600000e+00 -4.997071e-03 -1.700000e+00 -5.323231e-03 -1.800000e+00 -5.650679e-03 -2.000000e-01 -5.862625e-04 -3.000000e-01 -8.821547e-04 -4.000000e-01 -1.179934e-03 -5.000000e-01 -1.479592e-03 -6.000000e-01 -1.781100e-03 -7.000000e-01 -2.084426e-03 -8.000000e-01 -2.389531e-03 -9.000000e-01 -2.696378e-03 -1.000000e+00 -3.004924e-03 -1.100000e+00 -3.315126e-03 -1.200000e+00 -3.626937e-03 -1.300000e+00 -3.940308e-03 -1.400000e+00 -4.255187e-03 -1.500000e+00 -4.571520e-03 -1.600000e+00 -4.889250e-03 -1.700000e+00 -5.208318e-03 -1.800000e+00 -5.528664e-03 -2.000000e-01 -5.741336e-04 -3.000000e-01 -8.638589e-04 -4.000000e-01 -1.155403e-03 -5.000000e-01 -1.448758e-03 -6.000000e-01 -1.743900e-03 -7.000000e-01 -2.040797e-03 -8.000000e-01 -2.339417e-03 -9.000000e-01 -2.639724e-03 -1.000000e+00 -2.941679e-03 -1.100000e+00 -3.245243e-03 -1.200000e+00 -3.550373e-03 -1.300000e+00 -3.857024e-03 -1.400000e+00 -4.165150e-03 -1.500000e+00 -4.474700e-03 -1.600000e+00 -4.785622e-03 -1.700000e+00 -5.097863e-03 -1.800000e+00 -5.411367e-03 -2.000000e-01 -6.225004e-04 -3.000000e-01 -9.367471e-04 -4.000000e-01 -1.253036e-03 -5.000000e-01 -1.571348e-03 -6.000000e-01 -1.891644e-03 -7.000000e-01 -2.213876e-03 -8.000000e-01 -2.537992e-03 -9.000000e-01 -2.863937e-03 -1.000000e+00 -3.191653e-03 -1.100000e+00 -3.521079e-03 -1.200000e+00 -3.852149e-03 -1.300000e+00 -4.184797e-03 -1.400000e+00 -4.518951e-03 -1.500000e+00 -4.854537e-03 -1.600000e+00 -5.191477e-03 -1.700000e+00 -5.529691e-03 -1.800000e+00 -5.869097e-03 -2.000000e-01 -6.135776e-04 -3.000000e-01 -9.232893e-04 -4.000000e-01 -1.234994e-03 -5.000000e-01 -1.548676e-03 -6.000000e-01 -1.864298e-03 -7.000000e-01 -2.181815e-03 -8.000000e-01 -2.501179e-03 -9.000000e-01 -2.822337e-03 -1.000000e+00 -3.145236e-03 -1.100000e+00 -3.469819e-03 -1.200000e+00 -3.796023e-03 -1.300000e+00 -4.123787e-03 -1.400000e+00 -4.453043e-03 -1.500000e+00 -4.783721e-03 -1.600000e+00 -5.115749e-03 -1.700000e+00 -5.449051e-03 -1.800000e+00 -5.783549e-03 -2.000000e-01 -6.048858e-04 -3.000000e-01 -9.101804e-04 -4.000000e-01 -1.217421e-03 -5.000000e-01 -1.526593e-03 -6.000000e-01 -1.837662e-03 -7.000000e-01 -2.150587e-03 -8.000000e-01 -2.465320e-03 -9.000000e-01 -2.781815e-03 -1.000000e+00 -3.100020e-03 -1.100000e+00 -3.419882e-03 -1.200000e+00 -3.741343e-03 -1.300000e+00 -4.064343e-03 -1.400000e+00 -4.388821e-03 -1.500000e+00 -4.714709e-03 -1.600000e+00 -5.041941e-03 -1.700000e+00 -5.370445e-03 -1.800000e+00 -5.700147e-03 -2.000000e-01 -5.964171e-04 -3.000000e-01 -8.974083e-04 -4.000000e-01 -1.200300e-03 -5.000000e-01 -1.505078e-03 -6.000000e-01 -1.811712e-03 -7.000000e-01 -2.120162e-03 -8.000000e-01 -2.430384e-03 -9.000000e-01 -2.742334e-03 -1.000000e+00 -3.055964e-03 -1.100000e+00 -3.371224e-03 -1.200000e+00 -3.688059e-03 -1.300000e+00 -4.006414e-03 -1.400000e+00 -4.326230e-03 -1.500000e+00 -4.647444e-03 -1.600000e+00 -4.969994e-03 -1.700000e+00 -5.293811e-03 -1.800000e+00 -5.618827e-03 -2.000000e-01 -5.881636e-04 -3.000000e-01 -8.849613e-04 -4.000000e-01 -1.183615e-03 -5.000000e-01 -1.484112e-03 -6.000000e-01 -1.786424e-03 -7.000000e-01 -2.090513e-03 -8.000000e-01 -2.396339e-03 -9.000000e-01 -2.703859e-03 -1.000000e+00 -3.013030e-03 -1.100000e+00 -3.323802e-03 -1.200000e+00 -3.636127e-03 -1.300000e+00 -3.949951e-03 -1.400000e+00 -4.265218e-03 -1.500000e+00 -4.581871e-03 -1.600000e+00 -4.899849e-03 -1.700000e+00 -5.219089e-03 -1.800000e+00 -5.539525e-03 -2.000000e-01 -5.761712e-04 -3.000000e-01 -8.668761e-04 -4.000000e-01 -1.159372e-03 -5.000000e-01 -1.453650e-03 -6.000000e-01 -1.749683e-03 -7.000000e-01 -2.047437e-03 -8.000000e-01 -2.346875e-03 -9.000000e-01 -2.647959e-03 -1.000000e+00 -2.950649e-03 -1.100000e+00 -3.254899e-03 -1.200000e+00 -3.560665e-03 -1.300000e+00 -3.867899e-03 -1.400000e+00 -4.176550e-03 -1.500000e+00 -4.486564e-03 -1.600000e+00 -4.797886e-03 -1.700000e+00 -5.110459e-03 -1.800000e+00 -5.424223e-03 -2.000000e-01 -5.646228e-04 -3.000000e-01 -8.494616e-04 -4.000000e-01 -1.136030e-03 -5.000000e-01 -1.424320e-03 -6.000000e-01 -1.714308e-03 -7.000000e-01 -2.005963e-03 -8.000000e-01 -2.299251e-03 -9.000000e-01 -2.594138e-03 -1.000000e+00 -2.890585e-03 -1.100000e+00 -3.188553e-03 -1.200000e+00 -3.488001e-03 -1.300000e+00 -3.788883e-03 -1.400000e+00 -4.091155e-03 -1.500000e+00 -4.394766e-03 -1.600000e+00 -4.699667e-03 -1.700000e+00 -5.005804e-03 -1.800000e+00 -5.313122e-03 -2.000000e-01 -6.046918e-04 -3.000000e-01 -9.097744e-04 -4.000000e-01 -1.216723e-03 -5.000000e-01 -1.525518e-03 -6.000000e-01 -1.836122e-03 -7.000000e-01 -2.148485e-03 -8.000000e-01 -2.462559e-03 -9.000000e-01 -2.778287e-03 -1.000000e+00 -3.095615e-03 -1.100000e+00 -3.414481e-03 -1.200000e+00 -3.734824e-03 -1.300000e+00 -4.056577e-03 -1.400000e+00 -4.379672e-03 -1.500000e+00 -4.704036e-03 -1.600000e+00 -5.029595e-03 -1.700000e+00 -5.356273e-03 -1.800000e+00 -5.683988e-03 -2.000000e-01 -5.964899e-04 -3.000000e-01 -8.974115e-04 -4.000000e-01 -1.200159e-03 -5.000000e-01 -1.504717e-03 -6.000000e-01 -1.811047e-03 -7.000000e-01 -2.119105e-03 -8.000000e-01 -2.428843e-03 -9.000000e-01 -2.740212e-03 -1.000000e+00 -3.053157e-03 -1.100000e+00 -3.367623e-03 -1.200000e+00 -3.683551e-03 -1.300000e+00 -4.000878e-03 -1.400000e+00 -4.319539e-03 -1.500000e+00 -4.639468e-03 -1.600000e+00 -4.960594e-03 -1.700000e+00 -5.282845e-03 -1.800000e+00 -5.606144e-03 -2.000000e-01 -5.884817e-04 -3.000000e-01 -8.853405e-04 -4.000000e-01 -1.183987e-03 -5.000000e-01 -1.484406e-03 -6.000000e-01 -1.786562e-03 -7.000000e-01 -2.090416e-03 -8.000000e-01 -2.395920e-03 -9.000000e-01 -2.703029e-03 -1.000000e+00 -3.011692e-03 -1.100000e+00 -3.321856e-03 -1.200000e+00 -3.633466e-03 -1.300000e+00 -3.946464e-03 -1.400000e+00 -4.260788e-03 -1.500000e+00 -4.576376e-03 -1.600000e+00 -4.893160e-03 -1.700000e+00 -5.211072e-03 -1.800000e+00 -5.530042e-03 -2.000000e-01 -5.806614e-04 -3.000000e-01 -8.735529e-04 -4.000000e-01 -1.168194e-03 -5.000000e-01 -1.464571e-03 -6.000000e-01 -1.762652e-03 -7.000000e-01 -2.062398e-03 -8.000000e-01 -2.363767e-03 -9.000000e-01 -2.666714e-03 -1.000000e+00 -2.971192e-03 -1.100000e+00 -3.277151e-03 -1.200000e+00 -3.584540e-03 -1.300000e+00 -3.893303e-03 -1.400000e+00 -4.203384e-03 -1.500000e+00 -4.514721e-03 -1.600000e+00 -4.827253e-03 -1.700000e+00 -5.140915e-03 -1.800000e+00 -5.455640e-03 -2.000000e-01 -5.730235e-04 -3.000000e-01 -8.620403e-04 -4.000000e-01 -1.152770e-03 -5.000000e-01 -1.445199e-03 -6.000000e-01 -1.739300e-03 -7.000000e-01 -2.035034e-03 -8.000000e-01 -2.332362e-03 -9.000000e-01 -2.631242e-03 -1.000000e+00 -2.931630e-03 -1.100000e+00 -3.233479e-03 -1.200000e+00 -3.536741e-03 -1.300000e+00 -3.841362e-03 -1.400000e+00 -4.147291e-03 -1.500000e+00 -4.454468e-03 -1.600000e+00 -4.762837e-03 -1.700000e+00 -5.072336e-03 -1.800000e+00 -5.382901e-03 -2.000000e-01 -5.618969e-04 -3.000000e-01 -8.452693e-04 -4.000000e-01 -1.130300e-03 -5.000000e-01 -1.416980e-03 -6.000000e-01 -1.705281e-03 -7.000000e-01 -1.995169e-03 -8.000000e-01 -2.286609e-03 -9.000000e-01 -2.579563e-03 -1.000000e+00 -2.873989e-03 -1.100000e+00 -3.169845e-03 -1.200000e+00 -3.467087e-03 -1.300000e+00 -3.765666e-03 -1.400000e+00 -4.065534e-03 -1.500000e+00 -4.366639e-03 -1.600000e+00 -4.668926e-03 -1.700000e+00 -4.972339e-03 -1.800000e+00 -5.276821e-03 -2.000000e-01 -5.511510e-04 -3.000000e-01 -8.290726e-04 -4.000000e-01 -1.108601e-03 -5.000000e-01 -1.389727e-03 -6.000000e-01 -1.672427e-03 -7.000000e-01 -1.956669e-03 -8.000000e-01 -2.242422e-03 -9.000000e-01 -2.529649e-03 -1.000000e+00 -2.818314e-03 -1.100000e+00 -3.108377e-03 -1.200000e+00 -3.399798e-03 -1.300000e+00 -3.692533e-03 -1.400000e+00 -3.986537e-03 -1.500000e+00 -4.281761e-03 -1.600000e+00 -4.578158e-03 -1.700000e+00 -4.875674e-03 -1.800000e+00 -5.174256e-03 ngspice-26/tests/hisim/pmos/reference/49_acFreq_COIIGS=1.standard0000644000265600020320000002530212264261473024074 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/22_dcSweep_CORBNET=1.standard0000644000265600020320000003447412264261473024405 0ustar andreasadminV(d) I(d) I(b) -2.000000e-01 -4.699615e-05 2.000000e-16 -3.000000e-01 -5.356444e-05 3.000000e-16 -4.000000e-01 -6.033219e-05 4.000000e-16 -5.000000e-01 -6.744931e-05 5.000000e-16 -6.000000e-01 -7.492420e-05 6.000000e-16 -7.000000e-01 -8.274226e-05 7.000000e-16 -8.000000e-01 -9.089871e-05 8.000000e-16 -9.000000e-01 -9.939829e-05 9.000000e-16 -1.000000e+00 -1.082512e-04 1.000000e-15 -1.100000e+00 -1.174704e-04 1.100000e-15 -1.200000e+00 -1.270707e-04 1.200000e-15 -1.300000e+00 -1.370679e-04 1.300000e-15 -1.400000e+00 -1.474787e-04 1.400000e-15 -1.500000e+00 -1.583210e-04 1.500000e-15 -1.600000e+00 -1.696137e-04 1.600000e-15 -1.700000e+00 -1.813767e-04 1.700000e-15 -1.800000e+00 -1.936315e-04 1.800000e-15 -2.000000e-01 -3.236954e-04 2.000000e-16 -3.000000e-01 -3.722842e-04 3.000000e-16 -4.000000e-01 -4.052186e-04 4.000000e-16 -5.000000e-01 -4.371928e-04 5.000000e-16 -6.000000e-01 -4.684500e-04 6.000000e-16 -7.000000e-01 -4.993045e-04 7.000000e-16 -8.000000e-01 -5.300657e-04 8.000000e-16 -9.000000e-01 -5.609683e-04 9.000000e-16 -1.000000e+00 -5.921825e-04 1.000000e-15 -1.100000e+00 -6.238328e-04 1.100000e-15 -1.200000e+00 -6.560127e-04 1.200000e-15 -1.300000e+00 -6.887951e-04 1.300000e-15 -1.400000e+00 -7.222391e-04 1.400000e-15 -1.500000e+00 -7.563944e-04 1.500000e-15 -1.600000e+00 -7.913044e-04 1.600000e-15 -1.700000e+00 -8.270083e-04 1.700000e-15 -1.800000e+00 -8.635422e-04 1.800000e-15 -2.000000e-01 -6.362416e-04 2.000000e-16 -3.000000e-01 -8.252108e-04 3.000000e-16 -4.000000e-01 -9.384887e-04 4.000000e-16 -5.000000e-01 -1.006766e-03 5.000000e-16 -6.000000e-01 -1.066911e-03 6.000000e-16 -7.000000e-01 -1.125791e-03 7.000000e-16 -8.000000e-01 -1.183256e-03 8.000000e-16 -9.000000e-01 -1.239416e-03 9.000000e-16 -1.000000e+00 -1.294578e-03 1.000000e-15 -1.100000e+00 -1.349078e-03 1.100000e-15 -1.200000e+00 -1.403215e-03 1.200000e-15 -1.300000e+00 -1.457236e-03 1.300000e-15 -1.400000e+00 -1.511337e-03 1.400000e-15 -1.500000e+00 -1.565674e-03 1.500000e-15 -1.600000e+00 -1.620372e-03 1.600000e-15 -1.700000e+00 -1.675532e-03 1.700000e-15 -1.800000e+00 -1.731237e-03 1.800000e-15 -2.000000e-01 -8.942919e-04 2.000000e-16 -3.000000e-01 -1.221693e-03 3.000000e-16 -4.000000e-01 -1.471297e-03 4.000000e-16 -5.000000e-01 -1.648885e-03 5.000000e-16 -6.000000e-01 -1.767189e-03 6.000000e-16 -7.000000e-01 -1.854914e-03 7.000000e-16 -8.000000e-01 -1.937134e-03 8.000000e-16 -9.000000e-01 -2.017933e-03 9.000000e-16 -1.000000e+00 -2.097230e-03 1.000000e-15 -1.100000e+00 -2.174954e-03 1.100000e-15 -1.200000e+00 -2.251232e-03 1.200000e-15 -1.300000e+00 -2.326297e-03 1.300000e-15 -1.400000e+00 -2.400412e-03 1.400000e-15 -1.500000e+00 -2.473830e-03 1.500000e-15 -1.600000e+00 -2.546779e-03 1.600000e-15 -1.700000e+00 -2.619455e-03 1.700000e-15 -1.800000e+00 -2.692024e-03 1.800000e-15 -2.000000e-01 -1.099660e-03 2.000000e-16 -3.000000e-01 -1.542998e-03 3.000000e-16 -4.000000e-01 -1.912357e-03 4.000000e-16 -5.000000e-01 -2.210948e-03 5.000000e-16 -6.000000e-01 -2.443263e-03 6.000000e-16 -7.000000e-01 -2.616248e-03 7.000000e-16 -8.000000e-01 -2.743263e-03 8.000000e-16 -9.000000e-01 -2.847346e-03 9.000000e-16 -1.000000e+00 -2.946865e-03 1.000000e-15 -1.100000e+00 -3.044792e-03 1.100000e-15 -1.200000e+00 -3.141252e-03 1.200000e-15 -1.300000e+00 -3.236151e-03 1.300000e-15 -1.400000e+00 -3.329502e-03 1.400000e-15 -1.500000e+00 -3.421422e-03 1.500000e-15 -1.600000e+00 -3.512085e-03 1.600000e-15 -1.700000e+00 -3.601685e-03 1.700000e-15 -1.800000e+00 -3.690419e-03 1.800000e-15 -2.000000e-01 -1.323288e-03 2.000000e-16 -3.000000e-01 -1.900779e-03 3.000000e-16 -4.000000e-01 -2.413864e-03 4.000000e-16 -5.000000e-01 -2.862055e-03 5.000000e-16 -6.000000e-01 -3.247311e-03 6.000000e-16 -7.000000e-01 -3.572769e-03 7.000000e-16 -8.000000e-01 -3.842246e-03 8.000000e-16 -9.000000e-01 -4.060779e-03 9.000000e-16 -1.000000e+00 -4.235768e-03 1.000000e-15 -1.100000e+00 -4.377686e-03 1.100000e-15 -1.200000e+00 -4.501075e-03 1.200000e-15 -1.300000e+00 -4.619790e-03 1.300000e-15 -1.400000e+00 -4.736666e-03 1.400000e-15 -1.500000e+00 -4.852063e-03 1.500000e-15 -1.600000e+00 -4.966006e-03 1.600000e-15 -1.700000e+00 -5.078485e-03 1.700000e-15 -1.800000e+00 -5.189527e-03 1.800000e-15 -2.000000e-01 -1.465681e-03 2.000000e-16 -3.000000e-01 -2.135731e-03 3.000000e-16 -4.000000e-01 -2.753367e-03 4.000000e-16 -5.000000e-01 -3.315155e-03 5.000000e-16 -6.000000e-01 -3.820331e-03 6.000000e-16 -7.000000e-01 -4.269931e-03 7.000000e-16 -8.000000e-01 -4.666054e-03 8.000000e-16 -9.000000e-01 -5.011370e-03 9.000000e-16 -1.000000e+00 -5.308993e-03 1.000000e-15 -1.100000e+00 -5.562716e-03 1.100000e-15 -1.200000e+00 -5.777420e-03 1.200000e-15 -1.300000e+00 -5.959268e-03 1.300000e-15 -1.400000e+00 -6.115539e-03 1.400000e-15 -1.500000e+00 -6.254781e-03 1.500000e-15 -1.600000e+00 -6.387042e-03 1.600000e-15 -1.700000e+00 -6.517185e-03 1.700000e-15 -1.800000e+00 -6.645738e-03 1.800000e-15 -2.000000e-01 -8.053777e-05 2.000000e-16 -3.000000e-01 -9.162409e-05 3.000000e-16 -4.000000e-01 -1.024997e-04 4.000000e-16 -5.000000e-01 -1.136548e-04 5.000000e-16 -6.000000e-01 -1.251789e-04 6.000000e-16 -7.000000e-01 -1.370995e-04 7.000000e-16 -8.000000e-01 -1.494356e-04 8.000000e-16 -9.000000e-01 -1.622080e-04 9.000000e-16 -1.000000e+00 -1.754382e-04 1.000000e-15 -1.100000e+00 -1.891484e-04 1.100000e-15 -1.200000e+00 -2.033607e-04 1.200000e-15 -1.300000e+00 -2.180970e-04 1.300000e-15 -1.400000e+00 -2.333799e-04 1.400000e-15 -1.500000e+00 -2.492324e-04 1.500000e-15 -1.600000e+00 -2.656781e-04 1.600000e-15 -1.700000e+00 -2.827418e-04 1.700000e-15 -1.800000e+00 -3.004492e-04 1.800000e-15 -2.000000e-01 -2.967540e-04 2.000000e-16 -3.000000e-01 -3.587330e-04 3.000000e-16 -4.000000e-01 -3.937602e-04 4.000000e-16 -5.000000e-01 -4.249225e-04 5.000000e-16 -6.000000e-01 -4.554245e-04 6.000000e-16 -7.000000e-01 -4.853715e-04 7.000000e-16 -8.000000e-01 -5.149862e-04 8.000000e-16 -9.000000e-01 -5.445097e-04 9.000000e-16 -1.000000e+00 -5.741407e-04 1.000000e-15 -1.100000e+00 -6.040315e-04 1.100000e-15 -1.200000e+00 -6.342969e-04 1.200000e-15 -1.300000e+00 -6.650254e-04 1.300000e-15 -1.400000e+00 -6.962867e-04 1.400000e-15 -1.500000e+00 -7.281374e-04 1.500000e-15 -1.600000e+00 -7.606255e-04 1.600000e-15 -1.700000e+00 -7.937927e-04 1.700000e-15 -1.800000e+00 -8.276765e-04 1.800000e-15 -2.000000e-01 -5.192224e-04 2.000000e-16 -3.000000e-01 -6.879597e-04 3.000000e-16 -4.000000e-01 -8.011363e-04 4.000000e-16 -5.000000e-01 -8.720396e-04 5.000000e-16 -6.000000e-01 -9.256745e-04 6.000000e-16 -7.000000e-01 -9.769033e-04 7.000000e-16 -8.000000e-01 -1.027362e-03 8.000000e-16 -9.000000e-01 -1.076896e-03 9.000000e-16 -1.000000e+00 -1.125564e-03 1.000000e-15 -1.100000e+00 -1.173562e-03 1.100000e-15 -1.200000e+00 -1.221119e-03 1.200000e-15 -1.300000e+00 -1.268446e-03 1.300000e-15 -1.400000e+00 -1.315726e-03 1.400000e-15 -1.500000e+00 -1.363110e-03 1.500000e-15 -1.600000e+00 -1.410721e-03 1.600000e-15 -1.700000e+00 -1.458660e-03 1.700000e-15 -1.800000e+00 -1.507013e-03 1.800000e-15 -2.000000e-01 -7.107833e-04 2.000000e-16 -3.000000e-01 -9.814930e-04 3.000000e-16 -4.000000e-01 -1.196037e-03 4.000000e-16 -5.000000e-01 -1.357425e-03 5.000000e-16 -6.000000e-01 -1.472204e-03 6.000000e-16 -7.000000e-01 -1.554887e-03 7.000000e-16 -8.000000e-01 -1.625302e-03 8.000000e-16 -9.000000e-01 -1.693712e-03 9.000000e-16 -1.000000e+00 -1.761384e-03 1.000000e-15 -1.100000e+00 -1.828127e-03 1.100000e-15 -1.200000e+00 -1.893853e-03 1.200000e-15 -1.300000e+00 -1.958629e-03 1.300000e-15 -1.400000e+00 -2.022603e-03 1.400000e-15 -1.500000e+00 -2.085948e-03 1.500000e-15 -1.600000e+00 -2.148840e-03 1.600000e-15 -1.700000e+00 -2.211441e-03 1.700000e-15 -1.800000e+00 -2.273894e-03 1.800000e-15 -2.000000e-01 -8.703534e-04 2.000000e-16 -3.000000e-01 -1.229542e-03 3.000000e-16 -4.000000e-01 -1.535299e-03 4.000000e-16 -5.000000e-01 -1.788717e-03 5.000000e-16 -6.000000e-01 -1.992234e-03 6.000000e-16 -7.000000e-01 -2.150032e-03 7.000000e-16 -8.000000e-01 -2.269922e-03 8.000000e-16 -9.000000e-01 -2.364654e-03 9.000000e-16 -1.000000e+00 -2.449433e-03 1.000000e-15 -1.100000e+00 -2.532170e-03 1.100000e-15 -1.200000e+00 -2.614133e-03 1.200000e-15 -1.300000e+00 -2.695229e-03 1.300000e-15 -1.400000e+00 -2.775330e-03 1.400000e-15 -1.500000e+00 -2.854418e-03 1.500000e-15 -1.600000e+00 -2.932552e-03 1.600000e-15 -1.700000e+00 -3.009841e-03 1.700000e-15 -1.800000e+00 -3.086415e-03 1.800000e-15 -2.000000e-01 -1.055746e-03 2.000000e-16 -3.000000e-01 -1.522006e-03 3.000000e-16 -4.000000e-01 -1.941527e-03 4.000000e-16 -5.000000e-01 -2.312983e-03 5.000000e-16 -6.000000e-01 -2.636801e-03 6.000000e-16 -7.000000e-01 -2.914587e-03 7.000000e-16 -8.000000e-01 -3.148785e-03 8.000000e-16 -9.000000e-01 -3.342837e-03 9.000000e-16 -1.000000e+00 -3.501773e-03 1.000000e-15 -1.100000e+00 -3.632590e-03 1.100000e-15 -1.200000e+00 -3.744148e-03 1.200000e-15 -1.300000e+00 -3.846545e-03 1.300000e-15 -1.400000e+00 -3.946382e-03 1.400000e-15 -1.500000e+00 -4.045210e-03 1.500000e-15 -1.600000e+00 -4.143203e-03 1.600000e-15 -1.700000e+00 -4.240296e-03 1.700000e-15 -1.800000e+00 -4.336435e-03 1.800000e-15 -2.000000e-01 -1.186306e-03 2.000000e-16 -3.000000e-01 -1.731660e-03 3.000000e-16 -4.000000e-01 -2.238332e-03 4.000000e-16 -5.000000e-01 -2.703337e-03 5.000000e-16 -6.000000e-01 -3.125332e-03 6.000000e-16 -7.000000e-01 -3.504342e-03 7.000000e-16 -8.000000e-01 -3.841383e-03 8.000000e-16 -9.000000e-01 -4.138137e-03 9.000000e-16 -1.000000e+00 -4.396808e-03 1.000000e-15 -1.100000e+00 -4.620185e-03 1.100000e-15 -1.200000e+00 -4.811857e-03 1.200000e-15 -1.300000e+00 -4.976335e-03 1.300000e-15 -1.400000e+00 -5.118917e-03 1.400000e-15 -1.500000e+00 -5.245465e-03 1.500000e-15 -1.600000e+00 -5.362370e-03 1.600000e-15 -1.700000e+00 -5.475384e-03 1.700000e-15 -1.800000e+00 -5.586920e-03 1.800000e-15 -2.000000e-01 -1.215310e-04 2.000000e-16 -3.000000e-01 -1.449795e-04 3.000000e-16 -4.000000e-01 -1.644397e-04 4.000000e-16 -5.000000e-01 -1.838944e-04 5.000000e-16 -6.000000e-01 -2.037631e-04 6.000000e-16 -7.000000e-01 -2.241339e-04 7.000000e-16 -8.000000e-01 -2.450728e-04 8.000000e-16 -9.000000e-01 -2.666381e-04 9.000000e-16 -1.000000e+00 -2.888803e-04 1.000000e-15 -1.100000e+00 -3.118434e-04 1.100000e-15 -1.200000e+00 -3.355664e-04 1.200000e-15 -1.300000e+00 -3.600852e-04 1.300000e-15 -1.400000e+00 -3.854342e-04 1.400000e-15 -1.500000e+00 -4.116469e-04 1.500000e-15 -1.600000e+00 -4.387567e-04 1.600000e-15 -1.700000e+00 -4.667976e-04 1.700000e-15 -1.800000e+00 -4.958045e-04 1.800000e-15 -2.000000e-01 -2.683866e-04 2.000000e-16 -3.000000e-01 -3.434866e-04 3.000000e-16 -4.000000e-01 -3.905718e-04 4.000000e-16 -5.000000e-01 -4.254121e-04 5.000000e-16 -6.000000e-01 -4.579229e-04 6.000000e-16 -7.000000e-01 -4.899888e-04 7.000000e-16 -8.000000e-01 -5.217546e-04 8.000000e-16 -9.000000e-01 -5.533460e-04 9.000000e-16 -1.000000e+00 -5.849287e-04 1.000000e-15 -1.100000e+00 -6.166606e-04 1.100000e-15 -1.200000e+00 -6.486752e-04 1.200000e-15 -1.300000e+00 -6.810800e-04 1.300000e-15 -1.400000e+00 -7.139613e-04 1.400000e-15 -1.500000e+00 -7.473894e-04 1.500000e-15 -1.600000e+00 -7.814225e-04 1.600000e-15 -1.700000e+00 -8.161101e-04 1.700000e-15 -1.800000e+00 -8.514956e-04 1.800000e-15 -2.000000e-01 -4.174948e-04 2.000000e-16 -3.000000e-01 -5.651320e-04 3.000000e-16 -4.000000e-01 -6.748377e-04 4.000000e-16 -5.000000e-01 -7.519469e-04 5.000000e-16 -6.000000e-01 -8.074889e-04 6.000000e-16 -7.000000e-01 -8.544460e-04 7.000000e-16 -8.000000e-01 -8.996975e-04 8.000000e-16 -9.000000e-01 -9.444786e-04 9.000000e-16 -1.000000e+00 -9.887737e-04 1.000000e-15 -1.100000e+00 -1.032583e-03 1.100000e-15 -1.200000e+00 -1.076001e-03 1.200000e-15 -1.300000e+00 -1.119162e-03 1.300000e-15 -1.400000e+00 -1.162206e-03 1.400000e-15 -1.500000e+00 -1.205264e-03 1.500000e-15 -1.600000e+00 -1.248450e-03 1.600000e-15 -1.700000e+00 -1.291863e-03 1.700000e-15 -1.800000e+00 -1.335586e-03 1.800000e-15 -2.000000e-01 -5.523075e-04 2.000000e-16 -3.000000e-01 -7.705283e-04 3.000000e-16 -4.000000e-01 -9.501590e-04 4.000000e-16 -5.000000e-01 -1.092854e-03 5.000000e-16 -6.000000e-01 -1.201930e-03 6.000000e-16 -7.000000e-01 -1.284056e-03 7.000000e-16 -8.000000e-01 -1.349422e-03 8.000000e-16 -9.000000e-01 -1.408062e-03 9.000000e-16 -1.000000e+00 -1.465169e-03 1.000000e-15 -1.100000e+00 -1.521831e-03 1.100000e-15 -1.200000e+00 -1.578020e-03 1.200000e-15 -1.300000e+00 -1.633658e-03 1.300000e-15 -1.400000e+00 -1.688747e-03 1.400000e-15 -1.500000e+00 -1.743357e-03 1.500000e-15 -1.600000e+00 -1.797587e-03 1.600000e-15 -1.700000e+00 -1.851545e-03 1.700000e-15 -1.800000e+00 -1.905340e-03 1.800000e-15 -2.000000e-01 -6.699586e-04 2.000000e-16 -3.000000e-01 -9.519966e-04 3.000000e-16 -4.000000e-01 -1.196965e-03 4.000000e-16 -5.000000e-01 -1.405155e-03 5.000000e-16 -6.000000e-01 -1.577904e-03 6.000000e-16 -7.000000e-01 -1.717682e-03 7.000000e-16 -8.000000e-01 -1.828773e-03 8.000000e-16 -9.000000e-01 -1.917844e-03 9.000000e-16 -1.000000e+00 -1.993249e-03 1.000000e-15 -1.100000e+00 -2.062742e-03 1.100000e-15 -1.200000e+00 -2.130579e-03 1.200000e-15 -1.300000e+00 -2.197915e-03 1.300000e-15 -1.400000e+00 -2.264816e-03 1.400000e-15 -1.500000e+00 -2.331190e-03 1.500000e-15 -1.600000e+00 -2.396992e-03 1.600000e-15 -1.700000e+00 -2.462231e-03 1.700000e-15 -1.800000e+00 -2.526956e-03 1.800000e-15 -2.000000e-01 -8.151175e-04 2.000000e-16 -3.000000e-01 -1.178259e-03 3.000000e-16 -4.000000e-01 -1.508450e-03 4.000000e-16 -5.000000e-01 -1.804478e-03 5.000000e-16 -6.000000e-01 -2.066202e-03 6.000000e-16 -7.000000e-01 -2.294404e-03 7.000000e-16 -8.000000e-01 -2.490612e-03 8.000000e-16 -9.000000e-01 -2.657086e-03 9.000000e-16 -1.000000e+00 -2.797037e-03 1.000000e-15 -1.100000e+00 -2.914811e-03 1.100000e-15 -1.200000e+00 -3.015698e-03 1.200000e-15 -1.300000e+00 -3.105458e-03 1.300000e-15 -1.400000e+00 -3.189490e-03 1.400000e-15 -1.500000e+00 -3.271330e-03 1.500000e-15 -1.600000e+00 -3.352374e-03 1.600000e-15 -1.700000e+00 -3.432950e-03 1.700000e-15 -1.800000e+00 -3.513054e-03 1.800000e-15 -2.000000e-01 -9.263926e-04 2.000000e-16 -3.000000e-01 -1.353590e-03 3.000000e-16 -4.000000e-01 -1.752829e-03 4.000000e-16 -5.000000e-01 -2.121990e-03 5.000000e-16 -6.000000e-01 -2.459839e-03 6.000000e-16 -7.000000e-01 -2.766039e-03 7.000000e-16 -8.000000e-01 -3.041016e-03 8.000000e-16 -9.000000e-01 -3.285795e-03 9.000000e-16 -1.000000e+00 -3.501875e-03 1.000000e-15 -1.100000e+00 -3.691217e-03 1.100000e-15 -1.200000e+00 -3.856317e-03 1.200000e-15 -1.300000e+00 -4.000255e-03 1.300000e-15 -1.400000e+00 -4.126613e-03 1.400000e-15 -1.500000e+00 -4.239259e-03 1.500000e-15 -1.600000e+00 -4.342117e-03 1.600000e-15 -1.700000e+00 -4.438929e-03 1.700000e-15 -1.800000e+00 -4.532697e-03 1.800000e-15 ngspice-26/tests/hisim/pmos/reference/46_acFreq_COISUB=0.standard0000644000265600020320000002530212264261473024077 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/13_dcSweep_COISTI=0.standard0000644000265600020320000002342612264261473024275 0ustar andreasadminV(d) I(d) -2.000000e-01 -7.671720e-05 -3.000000e-01 -8.750760e-05 -4.000000e-01 -9.839927e-05 -5.000000e-01 -1.096746e-04 -6.000000e-01 -1.214329e-04 -7.000000e-01 -1.337036e-04 -8.000000e-01 -1.465092e-04 -9.000000e-01 -1.598760e-04 -1.000000e+00 -1.738341e-04 -1.100000e+00 -1.884156e-04 -1.200000e+00 -2.036541e-04 -1.300000e+00 -2.195848e-04 -1.400000e+00 -2.362445e-04 -1.500000e+00 -2.536722e-04 -1.600000e+00 -2.719089e-04 -1.700000e+00 -2.909984e-04 -1.800000e+00 -3.109877e-04 -2.000000e-01 -3.735170e-04 -3.000000e-01 -4.411706e-04 -4.000000e-01 -4.820511e-04 -5.000000e-01 -5.213854e-04 -6.000000e-01 -5.599214e-04 -7.000000e-01 -5.978262e-04 -8.000000e-01 -6.354516e-04 -9.000000e-01 -6.731147e-04 -1.000000e+00 -7.110618e-04 -1.100000e+00 -7.494784e-04 -1.200000e+00 -7.885051e-04 -1.300000e+00 -8.282518e-04 -1.400000e+00 -8.688068e-04 -1.500000e+00 -9.102444e-04 -1.600000e+00 -9.526286e-04 -1.700000e+00 -9.960171e-04 -1.800000e+00 -1.040463e-03 -2.000000e-01 -6.731124e-04 -3.000000e-01 -8.831757e-04 -4.000000e-01 -1.018174e-03 -5.000000e-01 -1.100156e-03 -6.000000e-01 -1.167342e-03 -7.000000e-01 -1.233273e-03 -8.000000e-01 -1.298048e-03 -9.000000e-01 -1.361519e-03 -1.000000e+00 -1.423865e-03 -1.100000e+00 -1.485391e-03 -1.200000e+00 -1.546414e-03 -1.300000e+00 -1.607213e-03 -1.400000e+00 -1.668022e-03 -1.500000e+00 -1.729031e-03 -1.600000e+00 -1.790396e-03 -1.700000e+00 -1.852244e-03 -1.800000e+00 -1.914680e-03 -2.000000e-01 -9.194967e-04 -3.000000e-01 -1.260861e-03 -4.000000e-01 -1.526052e-03 -5.000000e-01 -1.721399e-03 -6.000000e-01 -1.856905e-03 -7.000000e-01 -1.954409e-03 -8.000000e-01 -2.042273e-03 -9.000000e-01 -2.128766e-03 -1.000000e+00 -2.214102e-03 -1.100000e+00 -2.298049e-03 -1.200000e+00 -2.380586e-03 -1.300000e+00 -2.461862e-03 -1.400000e+00 -2.542097e-03 -1.500000e+00 -2.621535e-03 -1.600000e+00 -2.700407e-03 -1.700000e+00 -2.778923e-03 -1.800000e+00 -2.857264e-03 -2.000000e-01 -1.116167e-03 -3.000000e-01 -1.567927e-03 -4.000000e-01 -1.946271e-03 -5.000000e-01 -2.255360e-03 -6.000000e-01 -2.500430e-03 -7.000000e-01 -2.687940e-03 -8.000000e-01 -2.828405e-03 -9.000000e-01 -2.939745e-03 -1.000000e+00 -3.043431e-03 -1.100000e+00 -3.145591e-03 -1.200000e+00 -3.246577e-03 -1.300000e+00 -3.346242e-03 -1.400000e+00 -3.444497e-03 -1.500000e+00 -3.541373e-03 -1.600000e+00 -3.636987e-03 -1.700000e+00 -3.731498e-03 -1.800000e+00 -3.825086e-03 -2.000000e-01 -1.331406e-03 -3.000000e-01 -1.911876e-03 -4.000000e-01 -2.427318e-03 -5.000000e-01 -2.878016e-03 -6.000000e-01 -3.266738e-03 -7.000000e-01 -3.597327e-03 -8.000000e-01 -3.874049e-03 -9.000000e-01 -4.101811e-03 -1.000000e+00 -4.287040e-03 -1.100000e+00 -4.438398e-03 -1.200000e+00 -4.567288e-03 -1.300000e+00 -4.688091e-03 -1.400000e+00 -4.807259e-03 -1.500000e+00 -4.925123e-03 -1.600000e+00 -5.041746e-03 -1.700000e+00 -5.157081e-03 -1.800000e+00 -5.271108e-03 -2.000000e-01 -1.469381e-03 -3.000000e-01 -2.139572e-03 -4.000000e-01 -2.755963e-03 -5.000000e-01 -3.315680e-03 -6.000000e-01 -3.818670e-03 -7.000000e-01 -4.266639e-03 -8.000000e-01 -4.662262e-03 -9.000000e-01 -5.008667e-03 -1.000000e+00 -5.309239e-03 -1.100000e+00 -5.567743e-03 -1.200000e+00 -5.788646e-03 -1.300000e+00 -5.977359e-03 -1.400000e+00 -6.140184e-03 -1.500000e+00 -6.284185e-03 -1.600000e+00 -6.417784e-03 -1.700000e+00 -6.548574e-03 -1.800000e+00 -6.677946e-03 -2.000000e-01 -1.119629e-04 -3.000000e-01 -1.283640e-04 -4.000000e-01 -1.440160e-04 -5.000000e-01 -1.598812e-04 -6.000000e-01 -1.761382e-04 -7.000000e-01 -1.928897e-04 -8.000000e-01 -2.102071e-04 -9.000000e-01 -2.281484e-04 -1.000000e+00 -2.467648e-04 -1.100000e+00 -2.661027e-04 -1.200000e+00 -2.862065e-04 -1.300000e+00 -3.071193e-04 -1.400000e+00 -3.288841e-04 -1.500000e+00 -3.515448e-04 -1.600000e+00 -3.751467e-04 -1.700000e+00 -3.997370e-04 -1.800000e+00 -4.253653e-04 -2.000000e-01 -3.330469e-04 -3.000000e-01 -4.129017e-04 -4.000000e-01 -4.581474e-04 -5.000000e-01 -4.958055e-04 -6.000000e-01 -5.328842e-04 -7.000000e-01 -5.694311e-04 -8.000000e-01 -6.055474e-04 -9.000000e-01 -6.414763e-04 -1.000000e+00 -6.774617e-04 -1.100000e+00 -7.137069e-04 -1.200000e+00 -7.503730e-04 -1.300000e+00 -7.875867e-04 -1.400000e+00 -8.254492e-04 -1.500000e+00 -8.640435e-04 -1.600000e+00 -9.034397e-04 -1.700000e+00 -9.436992e-04 -1.800000e+00 -9.848767e-04 -2.000000e-01 -5.465604e-04 -3.000000e-01 -7.315495e-04 -4.000000e-01 -8.620827e-04 -5.000000e-01 -9.477369e-04 -6.000000e-01 -1.009643e-03 -7.000000e-01 -1.066914e-03 -8.000000e-01 -1.123705e-03 -9.000000e-01 -1.179826e-03 -1.000000e+00 -1.235142e-03 -1.100000e+00 -1.289752e-03 -1.200000e+00 -1.343849e-03 -1.300000e+00 -1.397650e-03 -1.400000e+00 -1.451354e-03 -1.500000e+00 -1.505137e-03 -1.600000e+00 -1.559146e-03 -1.700000e+00 -1.613507e-03 -1.800000e+00 -1.668323e-03 -2.000000e-01 -7.297485e-04 -3.000000e-01 -1.011999e-03 -4.000000e-01 -1.239455e-03 -5.000000e-01 -1.415301e-03 -6.000000e-01 -1.544942e-03 -7.000000e-01 -1.639449e-03 -8.000000e-01 -1.716588e-03 -9.000000e-01 -1.790152e-03 -1.000000e+00 -1.863218e-03 -1.100000e+00 -1.935680e-03 -1.200000e+00 -2.007309e-03 -1.300000e+00 -2.078061e-03 -1.400000e+00 -2.148013e-03 -1.500000e+00 -2.217305e-03 -1.600000e+00 -2.286099e-03 -1.700000e+00 -2.354555e-03 -1.800000e+00 -2.422826e-03 -2.000000e-01 -8.826431e-04 -3.000000e-01 -1.249376e-03 -4.000000e-01 -1.563557e-03 -5.000000e-01 -1.826601e-03 -6.000000e-01 -2.041265e-03 -7.000000e-01 -2.211503e-03 -8.000000e-01 -2.343707e-03 -9.000000e-01 -2.448074e-03 -1.000000e+00 -2.538362e-03 -1.100000e+00 -2.625299e-03 -1.200000e+00 -2.711582e-03 -1.300000e+00 -2.797298e-03 -1.400000e+00 -2.882247e-03 -1.500000e+00 -2.966322e-03 -1.600000e+00 -3.049517e-03 -1.700000e+00 -3.131893e-03 -1.800000e+00 -3.213550e-03 -2.000000e-01 -1.060985e-03 -3.000000e-01 -1.530425e-03 -4.000000e-01 -1.953354e-03 -5.000000e-01 -2.328704e-03 -6.000000e-01 -2.657244e-03 -7.000000e-01 -2.940927e-03 -8.000000e-01 -3.182431e-03 -9.000000e-01 -3.385126e-03 -1.000000e+00 -3.553470e-03 -1.100000e+00 -3.693411e-03 -1.200000e+00 -3.812374e-03 -1.300000e+00 -3.919136e-03 -1.400000e+00 -4.021840e-03 -1.500000e+00 -4.123500e-03 -1.600000e+00 -4.224509e-03 -1.700000e+00 -4.324828e-03 -1.800000e+00 -4.424365e-03 -2.000000e-01 -1.187290e-03 -3.000000e-01 -1.733120e-03 -4.000000e-01 -2.240011e-03 -5.000000e-01 -2.705150e-03 -6.000000e-01 -3.127495e-03 -7.000000e-01 -3.507393e-03 -8.000000e-01 -3.846166e-03 -9.000000e-01 -4.145754e-03 -1.000000e+00 -4.408518e-03 -1.100000e+00 -4.637227e-03 -1.200000e+00 -4.835207e-03 -1.300000e+00 -5.006472e-03 -1.400000e+00 -5.155690e-03 -1.500000e+00 -5.287983e-03 -1.600000e+00 -5.408818e-03 -1.700000e+00 -5.523880e-03 -1.800000e+00 -5.637040e-03 -2.000000e-01 -1.503023e-04 -3.000000e-01 -1.835684e-04 -4.000000e-01 -2.098299e-04 -5.000000e-01 -2.358280e-04 -6.000000e-01 -2.623288e-04 -7.000000e-01 -2.894437e-04 -8.000000e-01 -3.172846e-04 -9.000000e-01 -3.459618e-04 -1.000000e+00 -3.755715e-04 -1.100000e+00 -4.061964e-04 -1.200000e+00 -4.379086e-04 -1.300000e+00 -4.707739e-04 -1.400000e+00 -5.048539e-04 -1.500000e+00 -5.402087e-04 -1.600000e+00 -5.768982e-04 -1.700000e+00 -6.149831e-04 -1.800000e+00 -6.545258e-04 -2.000000e-01 -2.945294e-04 -3.000000e-01 -3.842717e-04 -4.000000e-01 -4.441024e-04 -5.000000e-01 -4.874819e-04 -6.000000e-01 -5.266939e-04 -7.000000e-01 -5.655417e-04 -8.000000e-01 -6.042748e-04 -9.000000e-01 -6.429109e-04 -1.000000e+00 -6.815736e-04 -1.100000e+00 -7.204264e-04 -1.200000e+00 -7.596277e-04 -1.300000e+00 -7.993151e-04 -1.400000e+00 -8.396046e-04 -1.500000e+00 -8.805934e-04 -1.600000e+00 -9.223635e-04 -1.700000e+00 -9.649863e-04 -1.800000e+00 -1.008524e-03 -2.000000e-01 -4.373079e-04 -3.000000e-01 -5.972148e-04 -4.000000e-01 -7.203201e-04 -5.000000e-01 -8.107467e-04 -6.000000e-01 -8.770425e-04 -7.000000e-01 -9.313064e-04 -8.000000e-01 -9.825497e-04 -9.000000e-01 -1.033468e-03 -1.000000e+00 -1.084178e-03 -1.100000e+00 -1.134567e-03 -1.200000e+00 -1.184641e-03 -1.300000e+00 -1.234492e-03 -1.400000e+00 -1.284244e-03 -1.500000e+00 -1.334031e-03 -1.600000e+00 -1.383977e-03 -1.700000e+00 -1.434195e-03 -1.800000e+00 -1.484785e-03 -2.000000e-01 -5.661807e-04 -3.000000e-01 -7.934805e-04 -4.000000e-01 -9.834086e-04 -5.000000e-01 -1.137551e-03 -6.000000e-01 -1.258776e-03 -7.000000e-01 -1.352355e-03 -8.000000e-01 -1.426744e-03 -9.000000e-01 -1.491685e-03 -1.000000e+00 -1.553989e-03 -1.100000e+00 -1.615918e-03 -1.200000e+00 -1.677652e-03 -1.300000e+00 -1.739049e-03 -1.400000e+00 -1.800032e-03 -1.500000e+00 -1.860611e-03 -1.600000e+00 -1.920848e-03 -1.700000e+00 -1.980834e-03 -1.800000e+00 -2.040668e-03 -2.000000e-01 -6.788649e-04 -3.000000e-01 -9.671320e-04 -4.000000e-01 -1.219356e-03 -5.000000e-01 -1.435831e-03 -6.000000e-01 -1.617931e-03 -7.000000e-01 -1.767987e-03 -8.000000e-01 -1.889647e-03 -9.000000e-01 -1.988427e-03 -1.000000e+00 -2.071522e-03 -1.100000e+00 -2.146506e-03 -1.200000e+00 -2.218812e-03 -1.300000e+00 -2.290553e-03 -1.400000e+00 -2.362077e-03 -1.500000e+00 -2.433296e-03 -1.600000e+00 -2.504107e-03 -1.700000e+00 -2.574468e-03 -1.800000e+00 -2.644388e-03 -2.000000e-01 -8.183730e-04 -3.000000e-01 -1.184378e-03 -4.000000e-01 -1.518123e-03 -5.000000e-01 -1.818419e-03 -6.000000e-01 -2.085193e-03 -7.000000e-01 -2.319317e-03 -8.000000e-01 -2.522379e-03 -9.000000e-01 -2.696574e-03 -1.000000e+00 -2.844805e-03 -1.100000e+00 -2.970853e-03 -1.200000e+00 -3.079324e-03 -1.300000e+00 -3.175316e-03 -1.400000e+00 -3.263947e-03 -1.500000e+00 -3.349363e-03 -1.600000e+00 -3.433703e-03 -1.700000e+00 -3.517640e-03 -1.800000e+00 -3.601273e-03 -2.000000e-01 -9.258234e-04 -3.000000e-01 -1.353530e-03 -4.000000e-01 -1.753666e-03 -5.000000e-01 -2.124133e-03 -6.000000e-01 -2.463769e-03 -7.000000e-01 -2.772334e-03 -8.000000e-01 -3.050355e-03 -9.000000e-01 -3.298947e-03 -1.000000e+00 -3.519662e-03 -1.100000e+00 -3.714427e-03 -1.200000e+00 -3.885575e-03 -1.300000e+00 -4.035892e-03 -1.400000e+00 -4.168586e-03 -1.500000e+00 -4.287135e-03 -1.600000e+00 -4.395089e-03 -1.700000e+00 -4.495897e-03 -1.800000e+00 -4.592658e-03 ngspice-26/tests/hisim/pmos/reference/1_dcSweep_CORSRD=0.standard0000644000265600020320000002342612264261473024214 0ustar andreasadminV(d) I(d) -2.000000e-01 -3.825342e-05 -3.000000e-01 -4.167169e-05 -4.000000e-01 -4.460776e-05 -5.000000e-01 -4.736693e-05 -6.000000e-01 -5.007323e-05 -7.000000e-01 -5.277774e-05 -8.000000e-01 -5.550686e-05 -9.000000e-01 -5.827739e-05 -1.000000e+00 -6.110162e-05 -1.100000e+00 -6.398934e-05 -1.200000e+00 -6.694889e-05 -1.300000e+00 -6.998772e-05 -1.400000e+00 -7.311273e-05 -1.500000e+00 -7.633050e-05 -1.600000e+00 -7.964751e-05 -1.700000e+00 -8.307019e-05 -1.800000e+00 -8.660507e-05 -2.000000e-01 -3.006926e-04 -3.000000e-01 -3.352848e-04 -4.000000e-01 -3.558290e-04 -5.000000e-01 -3.739311e-04 -6.000000e-01 -3.901459e-04 -7.000000e-01 -4.050598e-04 -8.000000e-01 -4.191112e-04 -9.000000e-01 -4.325922e-04 -1.000000e+00 -4.456970e-04 -1.100000e+00 -4.585578e-04 -1.200000e+00 -4.712679e-04 -1.300000e+00 -4.838954e-04 -1.400000e+00 -4.964917e-04 -1.500000e+00 -5.090970e-04 -1.600000e+00 -5.217438e-04 -1.700000e+00 -5.344590e-04 -1.800000e+00 -5.472654e-04 -2.000000e-01 -6.141910e-04 -3.000000e-01 -7.837321e-04 -4.000000e-01 -8.714081e-04 -5.000000e-01 -9.150173e-04 -6.000000e-01 -9.530653e-04 -7.000000e-01 -9.886386e-04 -8.000000e-01 -1.021703e-03 -9.000000e-01 -1.052544e-03 -1.000000e+00 -1.081561e-03 -1.100000e+00 -1.109135e-03 -1.200000e+00 -1.135587e-03 -1.300000e+00 -1.161171e-03 -1.400000e+00 -1.186086e-03 -1.500000e+00 -1.210487e-03 -1.600000e+00 -1.234493e-03 -1.700000e+00 -1.258202e-03 -1.800000e+00 -1.281690e-03 -2.000000e-01 -8.743267e-04 -3.000000e-01 -1.183821e-03 -4.000000e-01 -1.408297e-03 -5.000000e-01 -1.553834e-03 -6.000000e-01 -1.635426e-03 -7.000000e-01 -1.689877e-03 -8.000000e-01 -1.742665e-03 -9.000000e-01 -1.793109e-03 -1.000000e+00 -1.841016e-03 -1.100000e+00 -1.886431e-03 -1.200000e+00 -1.929560e-03 -1.300000e+00 -1.970687e-03 -1.400000e+00 -2.010105e-03 -1.500000e+00 -2.048084e-03 -1.600000e+00 -2.084863e-03 -1.700000e+00 -2.120642e-03 -1.800000e+00 -2.155590e-03 -2.000000e-01 -1.081665e-03 -3.000000e-01 -1.508769e-03 -4.000000e-01 -1.855202e-03 -5.000000e-01 -2.124010e-03 -6.000000e-01 -2.320125e-03 -7.000000e-01 -2.451456e-03 -8.000000e-01 -2.533611e-03 -9.000000e-01 -2.597183e-03 -1.000000e+00 -2.661565e-03 -1.100000e+00 -2.723801e-03 -1.200000e+00 -2.783601e-03 -1.300000e+00 -2.840941e-03 -1.400000e+00 -2.895905e-03 -1.500000e+00 -2.948660e-03 -1.600000e+00 -2.999414e-03 -1.700000e+00 -3.048388e-03 -1.800000e+00 -3.095797e-03 -2.000000e-01 -1.307889e-03 -3.000000e-01 -1.871382e-03 -4.000000e-01 -2.364605e-03 -5.000000e-01 -2.786843e-03 -6.000000e-01 -3.140223e-03 -7.000000e-01 -3.428196e-03 -8.000000e-01 -3.654996e-03 -9.000000e-01 -3.826203e-03 -1.000000e+00 -3.949977e-03 -1.100000e+00 -4.038382e-03 -1.200000e+00 -4.111342e-03 -1.300000e+00 -4.187574e-03 -1.400000e+00 -4.262901e-03 -1.500000e+00 -4.335943e-03 -1.600000e+00 -4.406703e-03 -1.700000e+00 -4.475214e-03 -1.800000e+00 -4.541549e-03 -2.000000e-01 -1.452477e-03 -3.000000e-01 -2.110444e-03 -4.000000e-01 -2.710854e-03 -5.000000e-01 -3.250032e-03 -6.000000e-01 -3.727312e-03 -7.000000e-01 -4.143933e-03 -8.000000e-01 -4.502221e-03 -9.000000e-01 -4.805104e-03 -1.000000e+00 -5.055996e-03 -1.100000e+00 -5.259045e-03 -1.200000e+00 -5.419544e-03 -1.300000e+00 -5.544186e-03 -1.400000e+00 -5.641219e-03 -1.500000e+00 -5.721954e-03 -1.600000e+00 -5.803017e-03 -1.700000e+00 -5.887078e-03 -1.800000e+00 -5.969385e-03 -2.000000e-01 -7.048207e-05 -3.000000e-01 -7.777882e-05 -4.000000e-01 -8.414383e-05 -5.000000e-01 -9.018929e-05 -6.000000e-01 -9.614311e-05 -7.000000e-01 -1.021107e-04 -8.000000e-01 -1.081485e-04 -9.000000e-01 -1.142926e-04 -1.000000e+00 -1.205686e-04 -1.100000e+00 -1.269966e-04 -1.200000e+00 -1.335934e-04 -1.300000e+00 -1.403737e-04 -1.400000e+00 -1.473509e-04 -1.500000e+00 -1.545378e-04 -1.600000e+00 -1.619467e-04 -1.700000e+00 -1.695900e-04 -1.800000e+00 -1.774800e-04 -2.000000e-01 -2.800741e-04 -3.000000e-01 -3.295990e-04 -4.000000e-01 -3.530656e-04 -5.000000e-01 -3.725860e-04 -6.000000e-01 -3.904889e-04 -7.000000e-01 -4.070695e-04 -8.000000e-01 -4.226783e-04 -9.000000e-01 -4.376140e-04 -1.000000e+00 -4.520992e-04 -1.100000e+00 -4.662936e-04 -1.200000e+00 -4.803122e-04 -1.300000e+00 -4.942392e-04 -1.400000e+00 -5.081379e-04 -1.500000e+00 -5.220571e-04 -1.600000e+00 -5.360359e-04 -1.700000e+00 -5.501059e-04 -1.800000e+00 -5.642939e-04 -2.000000e-01 -5.031384e-04 -3.000000e-01 -6.576240e-04 -4.000000e-01 -7.515622e-04 -5.000000e-01 -8.009734e-04 -6.000000e-01 -8.355758e-04 -7.000000e-01 -8.681302e-04 -8.000000e-01 -8.990473e-04 -9.000000e-01 -9.282416e-04 -1.000000e+00 -9.558646e-04 -1.100000e+00 -9.821648e-04 -1.200000e+00 -1.007397e-03 -1.300000e+00 -1.031786e-03 -1.400000e+00 -1.055517e-03 -1.500000e+00 -1.078742e-03 -1.600000e+00 -1.101581e-03 -1.700000e+00 -1.124131e-03 -1.800000e+00 -1.146471e-03 -2.000000e-01 -6.959330e-04 -3.000000e-01 -9.532572e-04 -4.000000e-01 -1.148970e-03 -5.000000e-01 -1.286245e-03 -6.000000e-01 -1.372830e-03 -7.000000e-01 -1.426551e-03 -8.000000e-01 -1.471707e-03 -9.000000e-01 -1.515807e-03 -1.000000e+00 -1.558407e-03 -1.100000e+00 -1.599266e-03 -1.200000e+00 -1.638370e-03 -1.300000e+00 -1.675837e-03 -1.400000e+00 -1.711848e-03 -1.500000e+00 -1.746599e-03 -1.600000e+00 -1.780279e-03 -1.700000e+00 -1.813056e-03 -1.800000e+00 -1.845077e-03 -2.000000e-01 -8.567307e-04 -3.000000e-01 -1.203567e-03 -4.000000e-01 -1.491821e-03 -5.000000e-01 -1.722451e-03 -6.000000e-01 -1.898229e-03 -7.000000e-01 -2.024030e-03 -8.000000e-01 -2.108896e-03 -9.000000e-01 -2.168519e-03 -1.000000e+00 -2.222486e-03 -1.100000e+00 -2.276267e-03 -1.200000e+00 -2.328705e-03 -1.300000e+00 -2.379489e-03 -1.400000e+00 -2.428535e-03 -1.500000e+00 -2.475869e-03 -1.600000e+00 -2.521592e-03 -1.700000e+00 -2.565837e-03 -1.800000e+00 -2.608755e-03 -2.000000e-01 -1.043799e-03 -3.000000e-01 -1.499163e-03 -4.000000e-01 -1.903166e-03 -5.000000e-01 -2.254283e-03 -6.000000e-01 -2.553062e-03 -7.000000e-01 -2.801366e-03 -8.000000e-01 -3.001972e-03 -9.000000e-01 -3.158760e-03 -1.000000e+00 -3.277335e-03 -1.100000e+00 -3.365603e-03 -1.200000e+00 -3.434439e-03 -1.300000e+00 -3.497962e-03 -1.400000e+00 -3.562796e-03 -1.500000e+00 -3.626862e-03 -1.600000e+00 -3.689441e-03 -1.700000e+00 -3.750413e-03 -1.800000e+00 -3.809753e-03 -2.000000e-01 -1.175822e-03 -3.000000e-01 -1.711572e-03 -4.000000e-01 -2.204512e-03 -5.000000e-01 -2.651441e-03 -6.000000e-01 -3.051080e-03 -7.000000e-01 -3.403606e-03 -8.000000e-01 -3.710221e-03 -9.000000e-01 -3.972823e-03 -1.000000e+00 -4.193864e-03 -1.100000e+00 -4.376431e-03 -1.200000e+00 -4.524456e-03 -1.300000e+00 -4.642868e-03 -1.400000e+00 -4.737574e-03 -1.500000e+00 -4.815621e-03 -1.600000e+00 -4.886041e-03 -1.700000e+00 -4.957464e-03 -1.800000e+00 -5.029892e-03 -2.000000e-01 -1.121237e-04 -3.000000e-01 -1.309135e-04 -4.000000e-01 -1.455402e-04 -5.000000e-01 -1.596307e-04 -6.000000e-01 -1.736839e-04 -7.000000e-01 -1.878677e-04 -8.000000e-01 -2.022881e-04 -9.000000e-01 -2.170205e-04 -1.000000e+00 -2.321203e-04 -1.100000e+00 -2.476308e-04 -1.200000e+00 -2.635873e-04 -1.300000e+00 -2.800198e-04 -1.400000e+00 -2.969557e-04 -1.500000e+00 -3.144205e-04 -1.600000e+00 -3.324387e-04 -1.700000e+00 -3.510346e-04 -1.800000e+00 -3.702325e-04 -2.000000e-01 -2.568047e-04 -3.000000e-01 -3.224265e-04 -4.000000e-01 -3.586575e-04 -5.000000e-01 -3.832018e-04 -6.000000e-01 -4.052936e-04 -7.000000e-01 -4.263704e-04 -8.000000e-01 -4.466132e-04 -9.000000e-01 -4.662055e-04 -1.000000e+00 -4.853435e-04 -1.100000e+00 -5.041977e-04 -1.200000e+00 -5.229044e-04 -1.300000e+00 -5.415693e-04 -1.400000e+00 -5.602743e-04 -1.500000e+00 -5.790839e-04 -1.600000e+00 -5.980492e-04 -1.700000e+00 -6.172125e-04 -1.800000e+00 -6.366086e-04 -2.000000e-01 -4.062236e-04 -3.000000e-01 -5.438546e-04 -4.000000e-01 -6.398475e-04 -5.000000e-01 -7.004547e-04 -6.000000e-01 -7.391200e-04 -7.000000e-01 -7.705702e-04 -8.000000e-01 -8.004698e-04 -9.000000e-01 -8.293598e-04 -1.000000e+00 -8.571793e-04 -1.100000e+00 -8.839701e-04 -1.200000e+00 -9.098589e-04 -1.300000e+00 -9.349997e-04 -1.400000e+00 -9.595427e-04 -1.500000e+00 -9.836219e-04 -1.600000e+00 -1.007352e-03 -1.700000e+00 -1.030828e-03 -1.800000e+00 -1.054132e-03 -2.000000e-01 -5.417036e-04 -3.000000e-01 -7.503617e-04 -4.000000e-01 -9.165237e-04 -5.000000e-01 -1.041912e-03 -6.000000e-01 -1.130477e-03 -7.000000e-01 -1.190180e-03 -8.000000e-01 -1.233518e-03 -9.000000e-01 -1.272053e-03 -1.000000e+00 -1.309574e-03 -1.100000e+00 -1.346198e-03 -1.200000e+00 -1.381750e-03 -1.300000e+00 -1.416169e-03 -1.400000e+00 -1.449493e-03 -1.500000e+00 -1.481814e-03 -1.600000e+00 -1.513248e-03 -1.700000e+00 -1.543915e-03 -1.800000e+00 -1.573930e-03 -2.000000e-01 -6.600607e-04 -3.000000e-01 -9.331176e-04 -4.000000e-01 -1.165342e-03 -5.000000e-01 -1.356922e-03 -6.000000e-01 -1.509429e-03 -7.000000e-01 -1.625787e-03 -8.000000e-01 -1.710973e-03 -9.000000e-01 -1.772787e-03 -1.000000e+00 -1.821565e-03 -1.100000e+00 -1.866673e-03 -1.200000e+00 -1.911176e-03 -1.300000e+00 -1.954928e-03 -1.400000e+00 -1.997681e-03 -1.500000e+00 -2.039319e-03 -1.600000e+00 -2.079822e-03 -1.700000e+00 -2.119222e-03 -1.800000e+00 -2.157592e-03 -2.000000e-01 -8.062250e-04 -3.000000e-01 -1.161256e-03 -4.000000e-01 -1.479878e-03 -5.000000e-01 -1.760721e-03 -6.000000e-01 -2.003728e-03 -7.000000e-01 -2.209874e-03 -8.000000e-01 -2.380939e-03 -9.000000e-01 -2.519500e-03 -1.000000e+00 -2.629170e-03 -1.100000e+00 -2.714822e-03 -1.200000e+00 -2.782563e-03 -1.300000e+00 -2.839569e-03 -1.400000e+00 -2.892985e-03 -1.500000e+00 -2.946254e-03 -1.600000e+00 -2.999174e-03 -1.700000e+00 -3.051272e-03 -1.800000e+00 -3.102364e-03 -2.000000e-01 -9.184100e-04 -3.000000e-01 -1.338302e-03 -4.000000e-01 -1.727087e-03 -5.000000e-01 -2.082467e-03 -6.000000e-01 -2.403247e-03 -7.000000e-01 -2.689204e-03 -8.000000e-01 -2.940909e-03 -9.000000e-01 -3.159550e-03 -1.000000e+00 -3.346822e-03 -1.100000e+00 -3.504914e-03 -1.200000e+00 -3.636583e-03 -1.300000e+00 -3.745215e-03 -1.400000e+00 -3.834767e-03 -1.500000e+00 -3.909652e-03 -1.600000e+00 -3.974689e-03 -1.700000e+00 -4.035013e-03 -1.800000e+00 -4.094716e-03 ngspice-26/tests/hisim/pmos/reference/77_noise_COIGN=1_T150.standard0000644000265600020320000000712012264261473024402 0ustar andreasadminFreq N(g) 1000 1.456735e-38 1258.925 2.308769e-38 1584.893 3.659152e-38 1995.262 5.799366e-38 2511.886 9.191375e-38 3162.278 1.456735e-37 3981.072 2.308769e-37 5011.872 3.659152e-37 6309.573 5.799366e-37 7943.282 9.191375e-37 10000 1.456735e-36 12589.25 2.308769e-36 15848.93 3.659152e-36 19952.62 5.799366e-36 25118.86 9.191375e-36 31622.78 1.456735e-35 39810.72 2.308769e-35 50118.72 3.659152e-35 63095.73 5.799366e-35 79432.82 9.191375e-35 100000 1.456735e-34 125892.5 2.308769e-34 158489.3 3.659152e-34 199526.2 5.799366e-34 251188.6 9.191375e-34 316227.8 1.456735e-33 398107.2 2.308769e-33 501187.2 3.659152e-33 630957.3 5.799366e-33 794328.2 9.191375e-33 1000000 1.456735e-32 1258925 2.308769e-32 1584893 3.659152e-32 1995262 5.799366e-32 2511886 9.191375e-32 3162278 1.456735e-31 3981072 2.308769e-31 5011872 3.659152e-31 6309573 5.799366e-31 7943282 9.191375e-31 10000000 1.456735e-30 12589250 2.308769e-30 15848930 3.659152e-30 19952620 5.799366e-30 25118860 9.191375e-30 31622780 1.456735e-29 39810720 2.308769e-29 50118720 3.659152e-29 63095730 5.799366e-29 79432820 9.191375e-29 100000000 1.456735e-28 125892500 2.308769e-28 158489300 3.659152e-28 199526200 5.799366e-28 251188600 9.191375e-28 316227800 1.456735e-27 398107200 2.308769e-27 501187200 3.659152e-27 630957300 5.799366e-27 794328200 9.191375e-27 1000000000 1.456735e-26 1258925000 2.308769e-26 1584893000 3.659152e-26 1995262000 5.799366e-26 2511886000 9.191375e-26 3162278000 1.456735e-25 3981072000 2.308769e-25 5011872000 3.659152e-25 6309573000 5.799366e-25 7943282000 9.191375e-25 10000000000 1.456735e-24 12589250000 2.308769e-24 15848930000 3.659152e-24 19952620000 5.799366e-24 25118860000 9.191375e-24 31622780000 1.456735e-23 39810720000 2.308769e-23 50118720000 3.659152e-23 63095730000 5.799366e-23 79432820000 9.191375e-23 100000000000 1.456735e-22 1000 9.424581e-39 1258.925 1.493695e-38 1584.893 2.367348e-38 1995.262 3.751993e-38 2511.886 5.946508e-38 3162.278 9.424581e-38 3981.072 1.493695e-37 5011.872 2.367348e-37 6309.573 3.751993e-37 7943.282 5.946508e-37 10000 9.424581e-37 12589.25 1.493695e-36 15848.93 2.367348e-36 19952.62 3.751993e-36 25118.86 5.946508e-36 31622.78 9.424581e-36 39810.72 1.493695e-35 50118.72 2.367348e-35 63095.73 3.751993e-35 79432.82 5.946508e-35 100000 9.424581e-35 125892.5 1.493695e-34 158489.3 2.367348e-34 199526.2 3.751993e-34 251188.6 5.946508e-34 316227.8 9.424581e-34 398107.2 1.493695e-33 501187.2 2.367348e-33 630957.3 3.751993e-33 794328.2 5.946508e-33 1000000 9.424581e-33 1258925 1.493695e-32 1584893 2.367348e-32 1995262 3.751993e-32 2511886 5.946508e-32 3162278 9.424581e-32 3981072 1.493695e-31 5011872 2.367348e-31 6309573 3.751993e-31 7943282 5.946508e-31 10000000 9.424581e-31 12589250 1.493695e-30 15848930 2.367348e-30 19952620 3.751993e-30 25118860 5.946508e-30 31622780 9.424581e-30 39810720 1.493695e-29 50118720 2.367348e-29 63095730 3.751993e-29 79432820 5.946508e-29 100000000 9.424581e-29 125892500 1.493695e-28 158489300 2.367348e-28 199526200 3.751993e-28 251188600 5.946508e-28 316227800 9.424581e-28 398107200 1.493695e-27 501187200 2.367348e-27 630957300 3.751993e-27 794328200 5.946508e-27 1000000000 9.424581e-27 1258925000 1.493695e-26 1584893000 2.367348e-26 1995262000 3.751993e-26 2511886000 5.946508e-26 3162278000 9.424581e-26 3981072000 1.493695e-25 5011872000 2.367348e-25 6309573000 3.751993e-25 7943282000 5.946508e-25 10000000000 9.424581e-25 12589250000 1.493695e-24 15848930000 2.367348e-24 19952620000 3.751993e-24 25118860000 5.946508e-24 31622780000 9.424581e-24 39810720000 1.493695e-23 50118720000 2.367348e-23 63095730000 3.751993e-23 79432820000 5.946508e-23 100000000000 9.424581e-23 ngspice-26/tests/hisim/pmos/reference/12_dcSweep_COGIDL=1.standard0000644000265600020320000002342612264261473024244 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.699615e-05 -3.000000e-01 -5.356444e-05 -4.000000e-01 -6.033220e-05 -5.000000e-01 -6.744937e-05 -6.000000e-01 -7.492440e-05 -7.000000e-01 -8.274273e-05 -8.000000e-01 -9.089962e-05 -9.000000e-01 -9.939983e-05 -1.000000e+00 -1.082536e-04 -1.100000e+00 -1.174739e-04 -1.200000e+00 -1.270754e-04 -1.300000e+00 -1.370740e-04 -1.400000e+00 -1.474865e-04 -1.500000e+00 -1.583306e-04 -1.600000e+00 -1.696254e-04 -1.700000e+00 -1.813907e-04 -1.800000e+00 -1.936478e-04 -2.000000e-01 -3.236954e-04 -3.000000e-01 -3.722842e-04 -4.000000e-01 -4.052186e-04 -5.000000e-01 -4.371928e-04 -6.000000e-01 -4.684500e-04 -7.000000e-01 -4.993046e-04 -8.000000e-01 -5.300660e-04 -9.000000e-01 -5.609689e-04 -1.000000e+00 -5.921836e-04 -1.100000e+00 -6.238345e-04 -1.200000e+00 -6.560152e-04 -1.300000e+00 -6.887987e-04 -1.400000e+00 -7.222439e-04 -1.500000e+00 -7.564006e-04 -1.600000e+00 -7.913122e-04 -1.700000e+00 -8.270178e-04 -1.800000e+00 -8.635538e-04 -2.000000e-01 -6.362416e-04 -3.000000e-01 -8.252108e-04 -4.000000e-01 -9.384887e-04 -5.000000e-01 -1.006766e-03 -6.000000e-01 -1.066911e-03 -7.000000e-01 -1.125791e-03 -8.000000e-01 -1.183256e-03 -9.000000e-01 -1.239416e-03 -1.000000e+00 -1.294578e-03 -1.100000e+00 -1.349078e-03 -1.200000e+00 -1.403216e-03 -1.300000e+00 -1.457238e-03 -1.400000e+00 -1.511340e-03 -1.500000e+00 -1.565678e-03 -1.600000e+00 -1.620377e-03 -1.700000e+00 -1.675538e-03 -1.800000e+00 -1.731244e-03 -2.000000e-01 -8.942919e-04 -3.000000e-01 -1.221693e-03 -4.000000e-01 -1.471297e-03 -5.000000e-01 -1.648885e-03 -6.000000e-01 -1.767189e-03 -7.000000e-01 -1.854914e-03 -8.000000e-01 -1.937134e-03 -9.000000e-01 -2.017933e-03 -1.000000e+00 -2.097230e-03 -1.100000e+00 -2.174954e-03 -1.200000e+00 -2.251232e-03 -1.300000e+00 -2.326297e-03 -1.400000e+00 -2.400413e-03 -1.500000e+00 -2.473832e-03 -1.600000e+00 -2.546781e-03 -1.700000e+00 -2.619458e-03 -1.800000e+00 -2.692029e-03 -2.000000e-01 -1.099660e-03 -3.000000e-01 -1.542998e-03 -4.000000e-01 -1.912357e-03 -5.000000e-01 -2.210948e-03 -6.000000e-01 -2.443263e-03 -7.000000e-01 -2.616248e-03 -8.000000e-01 -2.743263e-03 -9.000000e-01 -2.847346e-03 -1.000000e+00 -2.946865e-03 -1.100000e+00 -3.044792e-03 -1.200000e+00 -3.141252e-03 -1.300000e+00 -3.236151e-03 -1.400000e+00 -3.329502e-03 -1.500000e+00 -3.421423e-03 -1.600000e+00 -3.512086e-03 -1.700000e+00 -3.601687e-03 -1.800000e+00 -3.690421e-03 -2.000000e-01 -1.323288e-03 -3.000000e-01 -1.900779e-03 -4.000000e-01 -2.413864e-03 -5.000000e-01 -2.862055e-03 -6.000000e-01 -3.247311e-03 -7.000000e-01 -3.572769e-03 -8.000000e-01 -3.842246e-03 -9.000000e-01 -4.060779e-03 -1.000000e+00 -4.235768e-03 -1.100000e+00 -4.377686e-03 -1.200000e+00 -4.501075e-03 -1.300000e+00 -4.619790e-03 -1.400000e+00 -4.736666e-03 -1.500000e+00 -4.852063e-03 -1.600000e+00 -4.966007e-03 -1.700000e+00 -5.078485e-03 -1.800000e+00 -5.189527e-03 -2.000000e-01 -1.465681e-03 -3.000000e-01 -2.135731e-03 -4.000000e-01 -2.753367e-03 -5.000000e-01 -3.315155e-03 -6.000000e-01 -3.820331e-03 -7.000000e-01 -4.269931e-03 -8.000000e-01 -4.666054e-03 -9.000000e-01 -5.011370e-03 -1.000000e+00 -5.308993e-03 -1.100000e+00 -5.562716e-03 -1.200000e+00 -5.777420e-03 -1.300000e+00 -5.959268e-03 -1.400000e+00 -6.115539e-03 -1.500000e+00 -6.254781e-03 -1.600000e+00 -6.387042e-03 -1.700000e+00 -6.517185e-03 -1.800000e+00 -6.645738e-03 -2.000000e-01 -8.053777e-05 -3.000000e-01 -9.162409e-05 -4.000000e-01 -1.024998e-04 -5.000000e-01 -1.136549e-04 -6.000000e-01 -1.251791e-04 -7.000000e-01 -1.371000e-04 -8.000000e-01 -1.494365e-04 -9.000000e-01 -1.622095e-04 -1.000000e+00 -1.754406e-04 -1.100000e+00 -1.891519e-04 -1.200000e+00 -2.033654e-04 -1.300000e+00 -2.181032e-04 -1.400000e+00 -2.333878e-04 -1.500000e+00 -2.492421e-04 -1.600000e+00 -2.656898e-04 -1.700000e+00 -2.827557e-04 -1.800000e+00 -3.004656e-04 -2.000000e-01 -2.967540e-04 -3.000000e-01 -3.587330e-04 -4.000000e-01 -3.937602e-04 -5.000000e-01 -4.249225e-04 -6.000000e-01 -4.554245e-04 -7.000000e-01 -4.853716e-04 -8.000000e-01 -5.149864e-04 -9.000000e-01 -5.445102e-04 -1.000000e+00 -5.741418e-04 -1.100000e+00 -6.040332e-04 -1.200000e+00 -6.342995e-04 -1.300000e+00 -6.650290e-04 -1.400000e+00 -6.962915e-04 -1.500000e+00 -7.281436e-04 -1.600000e+00 -7.606333e-04 -1.700000e+00 -7.938023e-04 -1.800000e+00 -8.276881e-04 -2.000000e-01 -5.192224e-04 -3.000000e-01 -6.879597e-04 -4.000000e-01 -8.011363e-04 -5.000000e-01 -8.720396e-04 -6.000000e-01 -9.256745e-04 -7.000000e-01 -9.769033e-04 -8.000000e-01 -1.027362e-03 -9.000000e-01 -1.076896e-03 -1.000000e+00 -1.125564e-03 -1.100000e+00 -1.173563e-03 -1.200000e+00 -1.221120e-03 -1.300000e+00 -1.268448e-03 -1.400000e+00 -1.315729e-03 -1.500000e+00 -1.363113e-03 -1.600000e+00 -1.410725e-03 -1.700000e+00 -1.458667e-03 -1.800000e+00 -1.507021e-03 -2.000000e-01 -7.107833e-04 -3.000000e-01 -9.814930e-04 -4.000000e-01 -1.196037e-03 -5.000000e-01 -1.357425e-03 -6.000000e-01 -1.472204e-03 -7.000000e-01 -1.554887e-03 -8.000000e-01 -1.625302e-03 -9.000000e-01 -1.693712e-03 -1.000000e+00 -1.761384e-03 -1.100000e+00 -1.828127e-03 -1.200000e+00 -1.893853e-03 -1.300000e+00 -1.958630e-03 -1.400000e+00 -2.022604e-03 -1.500000e+00 -2.085950e-03 -1.600000e+00 -2.148843e-03 -1.700000e+00 -2.211444e-03 -1.800000e+00 -2.273899e-03 -2.000000e-01 -8.703534e-04 -3.000000e-01 -1.229542e-03 -4.000000e-01 -1.535299e-03 -5.000000e-01 -1.788717e-03 -6.000000e-01 -1.992234e-03 -7.000000e-01 -2.150032e-03 -8.000000e-01 -2.269922e-03 -9.000000e-01 -2.364654e-03 -1.000000e+00 -2.449433e-03 -1.100000e+00 -2.532170e-03 -1.200000e+00 -2.614133e-03 -1.300000e+00 -2.695229e-03 -1.400000e+00 -2.775331e-03 -1.500000e+00 -2.854418e-03 -1.600000e+00 -2.932553e-03 -1.700000e+00 -3.009842e-03 -1.800000e+00 -3.086417e-03 -2.000000e-01 -1.055746e-03 -3.000000e-01 -1.522006e-03 -4.000000e-01 -1.941527e-03 -5.000000e-01 -2.312983e-03 -6.000000e-01 -2.636801e-03 -7.000000e-01 -2.914587e-03 -8.000000e-01 -3.148785e-03 -9.000000e-01 -3.342837e-03 -1.000000e+00 -3.501773e-03 -1.100000e+00 -3.632590e-03 -1.200000e+00 -3.744148e-03 -1.300000e+00 -3.846545e-03 -1.400000e+00 -3.946382e-03 -1.500000e+00 -4.045210e-03 -1.600000e+00 -4.143203e-03 -1.700000e+00 -4.240297e-03 -1.800000e+00 -4.336436e-03 -2.000000e-01 -1.186306e-03 -3.000000e-01 -1.731660e-03 -4.000000e-01 -2.238332e-03 -5.000000e-01 -2.703337e-03 -6.000000e-01 -3.125332e-03 -7.000000e-01 -3.504342e-03 -8.000000e-01 -3.841383e-03 -9.000000e-01 -4.138137e-03 -1.000000e+00 -4.396808e-03 -1.100000e+00 -4.620185e-03 -1.200000e+00 -4.811857e-03 -1.300000e+00 -4.976335e-03 -1.400000e+00 -5.118917e-03 -1.500000e+00 -5.245465e-03 -1.600000e+00 -5.362370e-03 -1.700000e+00 -5.475384e-03 -1.800000e+00 -5.586920e-03 -2.000000e-01 -1.215310e-04 -3.000000e-01 -1.449795e-04 -4.000000e-01 -1.644397e-04 -5.000000e-01 -1.838944e-04 -6.000000e-01 -2.037633e-04 -7.000000e-01 -2.241344e-04 -8.000000e-01 -2.450737e-04 -9.000000e-01 -2.666396e-04 -1.000000e+00 -2.888827e-04 -1.100000e+00 -3.118468e-04 -1.200000e+00 -3.355710e-04 -1.300000e+00 -3.600914e-04 -1.400000e+00 -3.854420e-04 -1.500000e+00 -4.116565e-04 -1.600000e+00 -4.387684e-04 -1.700000e+00 -4.668115e-04 -1.800000e+00 -4.958208e-04 -2.000000e-01 -2.683866e-04 -3.000000e-01 -3.434866e-04 -4.000000e-01 -3.905718e-04 -5.000000e-01 -4.254121e-04 -6.000000e-01 -4.579229e-04 -7.000000e-01 -4.899889e-04 -8.000000e-01 -5.217549e-04 -9.000000e-01 -5.533466e-04 -1.000000e+00 -5.849297e-04 -1.100000e+00 -6.166623e-04 -1.200000e+00 -6.486777e-04 -1.300000e+00 -6.810835e-04 -1.400000e+00 -7.139661e-04 -1.500000e+00 -7.473956e-04 -1.600000e+00 -7.814303e-04 -1.700000e+00 -8.161197e-04 -1.800000e+00 -8.515072e-04 -2.000000e-01 -4.174948e-04 -3.000000e-01 -5.651320e-04 -4.000000e-01 -6.748377e-04 -5.000000e-01 -7.519469e-04 -6.000000e-01 -8.074889e-04 -7.000000e-01 -8.544460e-04 -8.000000e-01 -8.996976e-04 -9.000000e-01 -9.444788e-04 -1.000000e+00 -9.887740e-04 -1.100000e+00 -1.032584e-03 -1.200000e+00 -1.076002e-03 -1.300000e+00 -1.119164e-03 -1.400000e+00 -1.162209e-03 -1.500000e+00 -1.205268e-03 -1.600000e+00 -1.248455e-03 -1.700000e+00 -1.291869e-03 -1.800000e+00 -1.335594e-03 -2.000000e-01 -5.523075e-04 -3.000000e-01 -7.705283e-04 -4.000000e-01 -9.501590e-04 -5.000000e-01 -1.092854e-03 -6.000000e-01 -1.201930e-03 -7.000000e-01 -1.284056e-03 -8.000000e-01 -1.349422e-03 -9.000000e-01 -1.408062e-03 -1.000000e+00 -1.465169e-03 -1.100000e+00 -1.521831e-03 -1.200000e+00 -1.578021e-03 -1.300000e+00 -1.633658e-03 -1.400000e+00 -1.688748e-03 -1.500000e+00 -1.743359e-03 -1.600000e+00 -1.797589e-03 -1.700000e+00 -1.851548e-03 -1.800000e+00 -1.905345e-03 -2.000000e-01 -6.699586e-04 -3.000000e-01 -9.519966e-04 -4.000000e-01 -1.196965e-03 -5.000000e-01 -1.405155e-03 -6.000000e-01 -1.577904e-03 -7.000000e-01 -1.717682e-03 -8.000000e-01 -1.828773e-03 -9.000000e-01 -1.917844e-03 -1.000000e+00 -1.993249e-03 -1.100000e+00 -2.062742e-03 -1.200000e+00 -2.130579e-03 -1.300000e+00 -2.197915e-03 -1.400000e+00 -2.264816e-03 -1.500000e+00 -2.331191e-03 -1.600000e+00 -2.396993e-03 -1.700000e+00 -2.462232e-03 -1.800000e+00 -2.526958e-03 -2.000000e-01 -8.151175e-04 -3.000000e-01 -1.178259e-03 -4.000000e-01 -1.508450e-03 -5.000000e-01 -1.804478e-03 -6.000000e-01 -2.066202e-03 -7.000000e-01 -2.294404e-03 -8.000000e-01 -2.490612e-03 -9.000000e-01 -2.657086e-03 -1.000000e+00 -2.797037e-03 -1.100000e+00 -2.914811e-03 -1.200000e+00 -3.015698e-03 -1.300000e+00 -3.105458e-03 -1.400000e+00 -3.189490e-03 -1.500000e+00 -3.271330e-03 -1.600000e+00 -3.352374e-03 -1.700000e+00 -3.432950e-03 -1.800000e+00 -3.513055e-03 -2.000000e-01 -9.263926e-04 -3.000000e-01 -1.353590e-03 -4.000000e-01 -1.752829e-03 -5.000000e-01 -2.121990e-03 -6.000000e-01 -2.459839e-03 -7.000000e-01 -2.766039e-03 -8.000000e-01 -3.041016e-03 -9.000000e-01 -3.285795e-03 -1.000000e+00 -3.501875e-03 -1.100000e+00 -3.691217e-03 -1.200000e+00 -3.856317e-03 -1.300000e+00 -4.000255e-03 -1.400000e+00 -4.126613e-03 -1.500000e+00 -4.239259e-03 -1.600000e+00 -4.342117e-03 -1.700000e+00 -4.438929e-03 -1.800000e+00 -4.532697e-03 ngspice-26/tests/hisim/pmos/reference/64_acFreq_COTHRML=0.standard0000644000265600020320000002530212264261473024223 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/3_dcSweep_CORSRD=-1_PT.standard0000644000265600020320000002342612264261473024677 0ustar andreasadminV(d) I(d) -2.000000e-01 -1.218445e-04 -3.000000e-01 -1.359275e-04 -4.000000e-01 -1.496661e-04 -5.000000e-01 -1.635169e-04 -6.000000e-01 -1.776681e-04 -7.000000e-01 -1.921813e-04 -8.000000e-01 -2.070855e-04 -9.000000e-01 -2.224045e-04 -1.000000e+00 -2.381612e-04 -1.100000e+00 -2.543779e-04 -1.200000e+00 -2.710759e-04 -1.300000e+00 -2.882757e-04 -1.400000e+00 -3.059976e-04 -1.500000e+00 -3.242613e-04 -1.600000e+00 -3.430869e-04 -1.700000e+00 -3.624946e-04 -1.800000e+00 -3.825050e-04 -2.000000e-01 -4.370968e-04 -3.000000e-01 -5.229236e-04 -4.000000e-01 -5.667245e-04 -5.000000e-01 -6.061559e-04 -6.000000e-01 -6.444297e-04 -7.000000e-01 -6.816705e-04 -8.000000e-01 -7.182260e-04 -9.000000e-01 -7.544260e-04 -1.000000e+00 -7.905273e-04 -1.100000e+00 -8.267201e-04 -1.200000e+00 -8.631441e-04 -1.300000e+00 -8.999037e-04 -1.400000e+00 -9.370789e-04 -1.500000e+00 -9.747324e-04 -1.600000e+00 -1.012915e-03 -1.700000e+00 -1.051670e-03 -1.800000e+00 -1.091033e-03 -2.000000e-01 -7.233047e-04 -3.000000e-01 -9.570462e-04 -4.000000e-01 -1.110404e-03 -5.000000e-01 -1.200296e-03 -6.000000e-01 -1.265381e-03 -7.000000e-01 -1.327526e-03 -8.000000e-01 -1.388138e-03 -9.000000e-01 -1.447117e-03 -1.000000e+00 -1.504653e-03 -1.100000e+00 -1.561056e-03 -1.200000e+00 -1.616641e-03 -1.300000e+00 -1.671685e-03 -1.400000e+00 -1.726415e-03 -1.500000e+00 -1.781015e-03 -1.600000e+00 -1.835631e-03 -1.700000e+00 -1.890382e-03 -1.800000e+00 -1.945363e-03 -2.000000e-01 -9.496160e-04 -3.000000e-01 -1.311036e-03 -4.000000e-01 -1.595941e-03 -5.000000e-01 -1.808179e-03 -6.000000e-01 -1.955089e-03 -7.000000e-01 -2.055126e-03 -8.000000e-01 -2.138023e-03 -9.000000e-01 -2.218092e-03 -1.000000e+00 -2.296572e-03 -1.100000e+00 -2.373350e-03 -1.200000e+00 -2.448454e-03 -1.300000e+00 -2.522053e-03 -1.400000e+00 -2.594383e-03 -1.500000e+00 -2.665687e-03 -1.600000e+00 -2.736197e-03 -1.700000e+00 -2.806116e-03 -1.800000e+00 -2.875621e-03 -2.000000e-01 -1.124405e-03 -3.000000e-01 -1.589375e-03 -4.000000e-01 -1.984279e-03 -5.000000e-01 -2.310637e-03 -6.000000e-01 -2.571506e-03 -7.000000e-01 -2.771379e-03 -8.000000e-01 -2.918910e-03 -9.000000e-01 -3.030147e-03 -1.000000e+00 -3.127385e-03 -1.100000e+00 -3.221593e-03 -1.200000e+00 -3.314176e-03 -1.300000e+00 -3.405134e-03 -1.400000e+00 -3.494437e-03 -1.500000e+00 -3.582151e-03 -1.600000e+00 -3.668413e-03 -1.700000e+00 -3.753397e-03 -1.800000e+00 -3.837286e-03 -2.000000e-01 -1.308714e-03 -3.000000e-01 -1.889471e-03 -4.000000e-01 -2.412276e-03 -5.000000e-01 -2.875216e-03 -6.000000e-01 -3.278747e-03 -7.000000e-01 -3.624681e-03 -8.000000e-01 -3.915597e-03 -9.000000e-01 -4.154963e-03 -1.000000e+00 -4.348045e-03 -1.100000e+00 -4.502801e-03 -1.200000e+00 -4.630145e-03 -1.300000e+00 -4.744241e-03 -1.400000e+00 -4.854615e-03 -1.500000e+00 -4.963178e-03 -1.600000e+00 -5.070216e-03 -1.700000e+00 -5.175741e-03 -1.800000e+00 -5.279767e-03 -2.000000e-01 -1.421464e-03 -3.000000e-01 -2.078994e-03 -4.000000e-01 -2.691296e-03 -5.000000e-01 -3.254323e-03 -6.000000e-01 -3.766191e-03 -7.000000e-01 -4.226654e-03 -8.000000e-01 -4.636595e-03 -9.000000e-01 -4.997616e-03 -1.000000e+00 -5.311824e-03 -1.100000e+00 -5.581907e-03 -1.200000e+00 -5.811476e-03 -1.300000e+00 -6.005412e-03 -1.400000e+00 -6.169864e-03 -1.500000e+00 -6.311975e-03 -1.600000e+00 -6.440098e-03 -1.700000e+00 -6.562593e-03 -1.800000e+00 -6.682794e-03 -2.000000e-01 -1.540854e-04 -3.000000e-01 -1.740702e-04 -4.000000e-01 -1.912281e-04 -5.000000e-01 -2.081408e-04 -6.000000e-01 -2.250953e-04 -7.000000e-01 -2.422435e-04 -8.000000e-01 -2.596794e-04 -9.000000e-01 -2.774674e-04 -1.000000e+00 -2.956561e-04 -1.100000e+00 -3.142841e-04 -1.200000e+00 -3.333834e-04 -1.300000e+00 -3.529818e-04 -1.400000e+00 -3.731041e-04 -1.500000e+00 -3.937738e-04 -1.600000e+00 -4.150128e-04 -1.700000e+00 -4.368430e-04 -1.800000e+00 -4.592857e-04 -2.000000e-01 -3.816322e-04 -3.000000e-01 -4.773564e-04 -4.000000e-01 -5.285764e-04 -5.000000e-01 -5.659175e-04 -6.000000e-01 -6.017025e-04 -7.000000e-01 -6.366047e-04 -8.000000e-01 -6.707288e-04 -9.000000e-01 -7.043162e-04 -1.000000e+00 -7.376125e-04 -1.100000e+00 -7.708213e-04 -1.200000e+00 -8.041007e-04 -1.300000e+00 -8.375716e-04 -1.400000e+00 -8.713266e-04 -1.500000e+00 -9.054384e-04 -1.600000e+00 -9.399648e-04 -1.700000e+00 -9.749534e-04 -1.800000e+00 -1.010444e-03 -2.000000e-01 -5.875623e-04 -3.000000e-01 -7.904656e-04 -4.000000e-01 -9.350831e-04 -5.000000e-01 -1.028969e-03 -6.000000e-01 -1.091689e-03 -7.000000e-01 -1.145720e-03 -8.000000e-01 -1.198439e-03 -9.000000e-01 -1.250127e-03 -1.000000e+00 -1.300706e-03 -1.100000e+00 -1.350293e-03 -1.200000e+00 -1.399089e-03 -1.300000e+00 -1.447307e-03 -1.400000e+00 -1.495145e-03 -1.500000e+00 -1.542770e-03 -1.600000e+00 -1.590321e-03 -1.700000e+00 -1.637915e-03 -1.800000e+00 -1.685646e-03 -2.000000e-01 -7.591090e-04 -3.000000e-01 -1.057009e-03 -4.000000e-01 -1.299117e-03 -5.000000e-01 -1.487327e-03 -6.000000e-01 -1.625701e-03 -7.000000e-01 -1.723918e-03 -8.000000e-01 -1.799047e-03 -9.000000e-01 -1.867397e-03 -1.000000e+00 -1.934412e-03 -1.100000e+00 -2.000436e-03 -1.200000e+00 -2.065332e-03 -1.300000e+00 -2.129094e-03 -1.400000e+00 -2.191823e-03 -1.500000e+00 -2.253670e-03 -1.600000e+00 -2.314799e-03 -1.700000e+00 -2.375372e-03 -1.800000e+00 -2.435536e-03 -2.000000e-01 -8.988419e-04 -3.000000e-01 -1.276973e-03 -4.000000e-01 -1.603716e-03 -5.000000e-01 -1.879229e-03 -6.000000e-01 -2.105047e-03 -7.000000e-01 -2.283977e-03 -8.000000e-01 -2.421393e-03 -9.000000e-01 -2.526785e-03 -1.000000e+00 -2.613566e-03 -1.100000e+00 -2.694097e-03 -1.200000e+00 -2.773085e-03 -1.300000e+00 -2.851111e-03 -1.400000e+00 -2.928079e-03 -1.500000e+00 -3.003931e-03 -1.600000e+00 -3.078689e-03 -1.700000e+00 -3.152434e-03 -1.800000e+00 -3.225279e-03 -2.000000e-01 -1.057433e-03 -3.000000e-01 -1.530133e-03 -4.000000e-01 -1.959651e-03 -5.000000e-01 -2.344038e-03 -6.000000e-01 -2.682905e-03 -7.000000e-01 -2.977028e-03 -8.000000e-01 -3.228018e-03 -9.000000e-01 -3.438324e-03 -1.000000e+00 -3.611682e-03 -1.100000e+00 -3.753623e-03 -1.200000e+00 -3.871454e-03 -1.300000e+00 -3.973907e-03 -1.400000e+00 -4.069629e-03 -1.500000e+00 -4.163150e-03 -1.600000e+00 -4.255597e-03 -1.700000e+00 -4.347080e-03 -1.800000e+00 -4.437555e-03 -2.000000e-01 -1.166138e-03 -3.000000e-01 -1.706727e-03 -4.000000e-01 -2.212695e-03 -5.000000e-01 -2.680901e-03 -6.000000e-01 -3.109493e-03 -7.000000e-01 -3.497779e-03 -8.000000e-01 -3.846010e-03 -9.000000e-01 -4.155140e-03 -1.000000e+00 -4.426670e-03 -1.100000e+00 -4.662648e-03 -1.200000e+00 -4.865835e-03 -1.300000e+00 -5.039902e-03 -1.400000e+00 -5.189417e-03 -1.500000e+00 -5.319598e-03 -1.600000e+00 -5.436065e-03 -1.700000e+00 -5.544638e-03 -1.800000e+00 -5.649781e-03 -2.000000e-01 -1.654692e-04 -3.000000e-01 -2.094031e-04 -4.000000e-01 -2.349961e-04 -5.000000e-01 -2.582449e-04 -6.000000e-01 -2.813171e-04 -7.000000e-01 -3.044869e-04 -8.000000e-01 -3.278945e-04 -9.000000e-01 -3.516537e-04 -1.000000e+00 -3.758533e-04 -1.100000e+00 -4.005623e-04 -1.200000e+00 -4.258344e-04 -1.300000e+00 -4.517134e-04 -1.400000e+00 -4.782360e-04 -1.500000e+00 -5.054347e-04 -1.600000e+00 -5.333388e-04 -1.700000e+00 -5.619762e-04 -1.800000e+00 -5.913735e-04 -2.000000e-01 -3.080695e-04 -3.000000e-01 -4.151926e-04 -4.000000e-01 -4.808854e-04 -5.000000e-01 -5.240919e-04 -6.000000e-01 -5.599783e-04 -7.000000e-01 -5.945207e-04 -8.000000e-01 -6.284802e-04 -9.000000e-01 -6.619558e-04 -1.000000e+00 -6.950898e-04 -1.100000e+00 -7.280487e-04 -1.200000e+00 -7.609862e-04 -1.300000e+00 -7.940313e-04 -1.400000e+00 -8.272883e-04 -1.500000e+00 -8.608409e-04 -1.600000e+00 -8.947567e-04 -1.700000e+00 -9.290910e-04 -1.800000e+00 -9.638900e-04 -2.000000e-01 -4.434637e-04 -3.000000e-01 -6.227153e-04 -4.000000e-01 -7.560811e-04 -5.000000e-01 -8.524280e-04 -6.000000e-01 -9.201583e-04 -7.000000e-01 -9.719527e-04 -8.000000e-01 -1.018589e-03 -9.000000e-01 -1.064098e-03 -1.000000e+00 -1.108967e-03 -1.100000e+00 -1.153180e-03 -1.200000e+00 -1.196781e-03 -1.300000e+00 -1.239878e-03 -1.400000e+00 -1.282603e-03 -1.500000e+00 -1.325088e-03 -1.600000e+00 -1.367454e-03 -1.700000e+00 -1.409804e-03 -1.800000e+00 -1.452230e-03 -2.000000e-01 -5.629485e-04 -3.000000e-01 -8.092158e-04 -4.000000e-01 -1.010565e-03 -5.000000e-01 -1.173502e-03 -6.000000e-01 -1.300677e-03 -7.000000e-01 -1.396887e-03 -8.000000e-01 -1.470480e-03 -9.000000e-01 -1.531684e-03 -1.000000e+00 -1.588523e-03 -1.100000e+00 -1.644238e-03 -1.200000e+00 -1.699339e-03 -1.300000e+00 -1.753784e-03 -1.400000e+00 -1.807546e-03 -1.500000e+00 -1.860661e-03 -1.600000e+00 -1.913208e-03 -1.700000e+00 -1.965288e-03 -1.800000e+00 -2.017003e-03 -2.000000e-01 -6.656144e-04 -3.000000e-01 -9.711487e-04 -4.000000e-01 -1.234262e-03 -5.000000e-01 -1.460278e-03 -6.000000e-01 -1.650370e-03 -7.000000e-01 -1.806325e-03 -8.000000e-01 -1.931324e-03 -9.000000e-01 -2.030671e-03 -1.000000e+00 -2.111648e-03 -1.100000e+00 -2.182172e-03 -1.200000e+00 -2.248471e-03 -1.300000e+00 -2.313464e-03 -1.400000e+00 -2.377829e-03 -1.500000e+00 -2.441580e-03 -1.600000e+00 -2.504666e-03 -1.700000e+00 -2.567075e-03 -1.800000e+00 -2.628838e-03 -2.000000e-01 -7.903125e-04 -3.000000e-01 -1.169679e-03 -4.000000e-01 -1.511585e-03 -5.000000e-01 -1.820144e-03 -6.000000e-01 -2.095176e-03 -7.000000e-01 -2.337005e-03 -8.000000e-01 -2.546658e-03 -9.000000e-01 -2.725838e-03 -1.000000e+00 -2.877080e-03 -1.100000e+00 -3.003988e-03 -1.200000e+00 -3.111202e-03 -1.300000e+00 -3.203996e-03 -1.400000e+00 -3.287707e-03 -1.500000e+00 -3.366829e-03 -1.600000e+00 -3.444056e-03 -1.700000e+00 -3.520450e-03 -1.800000e+00 -3.596247e-03 -2.000000e-01 -8.842512e-04 -3.000000e-01 -1.320751e-03 -4.000000e-01 -1.725088e-03 -5.000000e-01 -2.100770e-03 -6.000000e-01 -2.446728e-03 -7.000000e-01 -2.762281e-03 -8.000000e-01 -3.047423e-03 -9.000000e-01 -3.302739e-03 -1.000000e+00 -3.529298e-03 -1.100000e+00 -3.728625e-03 -1.200000e+00 -3.902750e-03 -1.300000e+00 -4.054291e-03 -1.400000e+00 -4.186436e-03 -1.500000e+00 -4.302774e-03 -1.600000e+00 -4.407034e-03 -1.700000e+00 -4.502853e-03 -1.800000e+00 -4.593496e-03 ngspice-26/tests/hisim/pmos/reference/70_acFreq_CODFM=1.standard0000644000265600020320000002530712264261473023746 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.11246037655987e-14 1.69852542591817e-14 3.49529242355868e-15 1258.925 2.11246083844011e-14 1.69852587613605e-14 3.49529248522067e-15 1584.893 2.11246107034753e-14 1.69852584467456e-14 3.49529256796162e-15 1995.262 2.11246096517556e-14 1.69852579656888e-14 3.49529193847184e-15 2511.886 2.11246084287713e-14 1.69852579500079e-14 3.49529240955469e-15 3162.278 2.11246074655805e-14 1.69852516633522e-14 3.49529143426464e-15 3981.072 2.11246041515614e-14 1.69852552407194e-14 3.49529156790984e-15 5011.872 2.11246079514424e-14 1.69852575094297e-14 3.49529312983344e-15 6309.573 2.11246097595272e-14 1.69852569097701e-14 3.49529168928738e-15 7943.282 2.1124599133106e-14 1.69852568646578e-14 3.49529154851327e-15 10000 2.11246037655987e-14 1.69852542591817e-14 3.49529242355868e-15 12589.25 2.11246083844011e-14 1.69852587613605e-14 3.49529248522067e-15 15848.93 2.11246107034753e-14 1.69852584467456e-14 3.49529256796162e-15 19952.62 2.11246096517556e-14 1.69852579656888e-14 3.49529193847184e-15 25118.86 2.11246084287713e-14 1.69852579500079e-14 3.49529240955469e-15 31622.78 2.11246074655805e-14 1.69852516633522e-14 3.49529143426464e-15 39810.72 2.11246041515614e-14 1.69852552407194e-14 3.49529156790984e-15 50118.72 2.11246079514424e-14 1.69852575094297e-14 3.49529312983344e-15 63095.73 2.11246097595272e-14 1.69852569097701e-14 3.49529168928738e-15 79432.82 2.1124599133106e-14 1.69852568646578e-14 3.49529154851327e-15 100000 2.11246037655987e-14 1.69852542591817e-14 3.49529242355868e-15 125892.5 2.11246083844011e-14 1.69852587613605e-14 3.49529248522067e-15 158489.3 2.11246107034753e-14 1.69852584467456e-14 3.49529256796162e-15 199526.2 2.11246096517556e-14 1.69852579656888e-14 3.49529193847184e-15 251188.6 2.11246084287713e-14 1.69852579500079e-14 3.49529240955469e-15 316227.8 2.11246074655805e-14 1.69852516633522e-14 3.49529143426464e-15 398107.2 2.11246041515614e-14 1.69852552407194e-14 3.49529156790984e-15 501187.2 2.11246079514424e-14 1.69852575094297e-14 3.49529312983344e-15 630957.3 2.11246097595272e-14 1.69852569097701e-14 3.49529168928738e-15 794328.2 2.1124599133106e-14 1.69852568646578e-14 3.49529154851327e-15 1000000 2.11246037655987e-14 1.69852542591817e-14 3.49529242355868e-15 1258925 2.11246083844011e-14 1.69852587613605e-14 3.49529248522067e-15 1584893 2.11246107034753e-14 1.69852584467456e-14 3.49529256796162e-15 1995262 2.11246096517556e-14 1.69852579656888e-14 3.49529193847184e-15 2511886 2.11246084287713e-14 1.69852579500079e-14 3.49529240955469e-15 3162278 2.11246074655805e-14 1.69852516633522e-14 3.49529143426464e-15 3981072 2.11246041515614e-14 1.69852552407194e-14 3.49529156790984e-15 5011872 2.11246079514424e-14 1.69852575094297e-14 3.49529312983344e-15 6309573 2.11246097595272e-14 1.69852569097701e-14 3.49529168928738e-15 7943282 2.1124599133106e-14 1.69852568646578e-14 3.49529154851327e-15 10000000 2.11246037655986e-14 1.69852542591817e-14 3.49529242355868e-15 12589250 2.11246083844011e-14 1.69852587613605e-14 3.49529248522067e-15 15848930 2.11246107034753e-14 1.69852584467456e-14 3.49529256796162e-15 19952620 2.11246096517556e-14 1.69852579656888e-14 3.49529193847184e-15 25118860 2.11246084287713e-14 1.69852579500079e-14 3.49529240955469e-15 31622780 2.11246074655805e-14 1.69852516633522e-14 3.49529143426464e-15 39810720 2.11246041515614e-14 1.69852552407194e-14 3.49529156790984e-15 50118720 2.11246079514424e-14 1.69852575094297e-14 3.49529312983344e-15 63095730 2.11246097595272e-14 1.69852569097701e-14 3.49529168928738e-15 79432820 2.1124599133106e-14 1.69852568646578e-14 3.49529154851327e-15 100000000 2.11246037655987e-14 1.69852542591817e-14 3.49529242355868e-15 1000 2.09056861413757e-14 1.68547949523293e-14 3.40821238799538e-15 1258.925 2.0905697250332e-14 1.68548046153418e-14 3.40821475362247e-15 1584.893 2.09056951199373e-14 1.68548028345556e-14 3.40821337150979e-15 1995.262 2.0905690662011e-14 1.68547999559503e-14 3.40821331084042e-15 2511.886 2.09056907534163e-14 1.68547981967284e-14 3.40821385067921e-15 3162.278 2.09056854822947e-14 1.68547933266758e-14 3.40821284742353e-15 3981.072 2.0905689107353e-14 1.68547953229405e-14 3.4082128809646e-15 5011.872 2.09056912778548e-14 1.68547992021923e-14 3.40821295600885e-15 6309.573 2.09056900583683e-14 1.68547990404061e-14 3.40821215244046e-15 7943.282 2.09056811961346e-14 1.6854797723214e-14 3.40821326239962e-15 10000 2.09056861413758e-14 1.68547949523293e-14 3.40821238799538e-15 12589.25 2.0905697250332e-14 1.68548046153418e-14 3.40821475362247e-15 15848.93 2.09056951199373e-14 1.68548028345556e-14 3.40821337150979e-15 19952.62 2.0905690662011e-14 1.68547999559503e-14 3.40821331084042e-15 25118.86 2.09056907534163e-14 1.68547981967284e-14 3.40821385067921e-15 31622.78 2.09056854822947e-14 1.68547933266758e-14 3.40821284742353e-15 39810.72 2.0905689107353e-14 1.68547953229405e-14 3.4082128809646e-15 50118.72 2.09056912778548e-14 1.68547992021923e-14 3.40821295600885e-15 63095.73 2.09056900583683e-14 1.68547990404061e-14 3.40821215244046e-15 79432.82 2.09056811961346e-14 1.6854797723214e-14 3.40821326239962e-15 100000 2.09056861413757e-14 1.68547949523293e-14 3.40821238799538e-15 125892.5 2.0905697250332e-14 1.68548046153418e-14 3.40821475362247e-15 158489.3 2.09056951199373e-14 1.68548028345556e-14 3.40821337150979e-15 199526.2 2.0905690662011e-14 1.68547999559503e-14 3.40821331084042e-15 251188.6 2.09056907534163e-14 1.68547981967284e-14 3.40821385067921e-15 316227.8 2.09056854822947e-14 1.68547933266758e-14 3.40821284742353e-15 398107.2 2.0905689107353e-14 1.68547953229405e-14 3.4082128809646e-15 501187.2 2.09056912778548e-14 1.68547992021923e-14 3.40821295600885e-15 630957.3 2.09056900583683e-14 1.68547990404061e-14 3.40821215244046e-15 794328.2 2.09056811961346e-14 1.6854797723214e-14 3.40821326239962e-15 1000000 2.09056861413757e-14 1.68547949523293e-14 3.40821238799538e-15 1258925 2.0905697250332e-14 1.68548046153418e-14 3.40821475362247e-15 1584893 2.09056951199373e-14 1.68548028345556e-14 3.40821337150979e-15 1995262 2.0905690662011e-14 1.68547999559503e-14 3.40821331084042e-15 2511886 2.09056907534163e-14 1.68547981967284e-14 3.40821385067921e-15 3162278 2.09056854822947e-14 1.68547933266758e-14 3.40821284742353e-15 3981072 2.0905689107353e-14 1.68547953229405e-14 3.4082128809646e-15 5011872 2.09056912778548e-14 1.68547992021923e-14 3.40821295600885e-15 6309573 2.09056900583683e-14 1.68547990404061e-14 3.40821215244046e-15 7943282 2.09056811961346e-14 1.6854797723214e-14 3.40821326239962e-15 10000000 2.09056861413757e-14 1.68547949523293e-14 3.40821238799538e-15 12589250 2.0905697250332e-14 1.68548046153418e-14 3.40821475362247e-15 15848930 2.09056951199373e-14 1.68548028345556e-14 3.40821337150979e-15 19952620 2.0905690662011e-14 1.68547999559503e-14 3.40821331084042e-15 25118860 2.09056907534163e-14 1.68547981967284e-14 3.40821385067921e-15 31622780 2.09056854822947e-14 1.68547933266758e-14 3.40821284742353e-15 39810720 2.0905689107353e-14 1.68547953229405e-14 3.4082128809646e-15 50118720 2.09056912778548e-14 1.68547992021923e-14 3.40821295600885e-15 63095730 2.09056900583683e-14 1.68547990404061e-14 3.40821215244046e-15 79432820 2.09056811961346e-14 1.6854797723214e-14 3.40821326239962e-15 100000000 2.09056861413758e-14 1.68547949523293e-14 3.40821238799538e-15 1000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 1258.925 2.06433351132717e-14 1.66827578595353e-14 3.32139618570227e-15 1584.893 2.06433278056668e-14 1.66827532614933e-14 3.32139627123824e-15 1995.262 2.0643330870002e-14 1.66827517253145e-14 3.32139631712642e-15 2511.886 2.06433329581738e-14 1.66827547930957e-14 3.32139633803176e-15 3162.278 2.06433293936303e-14 1.66827479665065e-14 3.32139546916517e-15 3981.072 2.06433300669903e-14 1.66827503818804e-14 3.32139564955892e-15 5011.872 2.06433297841194e-14 1.66827537767139e-14 3.32139635356591e-15 6309.573 2.06433314862274e-14 1.66827512456746e-14 3.32139494894132e-15 7943.282 2.06433242982119e-14 1.66827509861289e-14 3.32139544976031e-15 10000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 12589.25 2.06433351132717e-14 1.66827578595353e-14 3.32139618570227e-15 15848.93 2.06433278056668e-14 1.66827532614933e-14 3.32139627123824e-15 19952.62 2.0643330870002e-14 1.66827517253145e-14 3.32139631712642e-15 25118.86 2.06433329581738e-14 1.66827547930957e-14 3.32139633803176e-15 31622.78 2.06433293936303e-14 1.66827479665065e-14 3.32139546916517e-15 39810.72 2.06433300669903e-14 1.66827503818804e-14 3.32139564955892e-15 50118.72 2.06433297841194e-14 1.6682753776714e-14 3.32139635356591e-15 63095.73 2.06433314862274e-14 1.66827512456746e-14 3.32139494894132e-15 79432.82 2.06433242982119e-14 1.66827509861289e-14 3.32139544976031e-15 100000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 125892.5 2.06433351132717e-14 1.66827578595353e-14 3.32139618570227e-15 158489.3 2.06433278056668e-14 1.66827532614933e-14 3.32139627123824e-15 199526.2 2.0643330870002e-14 1.66827517253145e-14 3.32139631712642e-15 251188.6 2.06433329581738e-14 1.66827547930957e-14 3.32139633803176e-15 316227.8 2.06433293936303e-14 1.66827479665065e-14 3.32139546916517e-15 398107.2 2.06433300669903e-14 1.66827503818804e-14 3.32139564955892e-15 501187.2 2.06433297841194e-14 1.66827537767139e-14 3.32139635356591e-15 630957.3 2.06433314862274e-14 1.66827512456746e-14 3.32139494894132e-15 794328.2 2.06433242982119e-14 1.66827509861289e-14 3.32139544976031e-15 1000000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 1258925 2.06433351132717e-14 1.66827578595353e-14 3.32139618570227e-15 1584893 2.06433278056668e-14 1.66827532614933e-14 3.32139627123824e-15 1995262 2.0643330870002e-14 1.66827517253145e-14 3.32139631712642e-15 2511886 2.06433329581738e-14 1.66827547930956e-14 3.32139633803176e-15 3162278 2.06433293936303e-14 1.66827479665065e-14 3.32139546916517e-15 3981072 2.06433300669903e-14 1.66827503818804e-14 3.32139564955892e-15 5011872 2.06433297841194e-14 1.66827537767139e-14 3.32139635356591e-15 6309573 2.06433314862274e-14 1.66827512456746e-14 3.32139494894132e-15 7943282 2.06433242982119e-14 1.66827509861289e-14 3.32139544976031e-15 10000000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 12589250 2.06433351132717e-14 1.66827578595353e-14 3.32139618570227e-15 15848930 2.06433278056668e-14 1.66827532614933e-14 3.32139627123824e-15 19952620 2.0643330870002e-14 1.66827517253145e-14 3.32139631712642e-15 25118860 2.06433329581738e-14 1.66827547930957e-14 3.32139633803176e-15 31622780 2.06433293936303e-14 1.66827479665065e-14 3.32139546916517e-15 39810720 2.06433300669903e-14 1.66827503818804e-14 3.32139564955892e-15 50118720 2.06433297841194e-14 1.6682753776714e-14 3.32139635356591e-15 63095730 2.06433314862274e-14 1.66827512456746e-14 3.32139494894132e-15 79432820 2.06433242982119e-14 1.66827509861289e-14 3.32139544976031e-15 100000000 2.06433351331831e-14 1.66827484588469e-14 3.32139495808818e-15 ngspice-26/tests/hisim/pmos/reference/20_dcSweep_CORG=1.standard0000644000265600020320000002342612264261473024034 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.699615e-05 -3.000000e-01 -5.356444e-05 -4.000000e-01 -6.033219e-05 -5.000000e-01 -6.744931e-05 -6.000000e-01 -7.492420e-05 -7.000000e-01 -8.274226e-05 -8.000000e-01 -9.089871e-05 -9.000000e-01 -9.939829e-05 -1.000000e+00 -1.082512e-04 -1.100000e+00 -1.174704e-04 -1.200000e+00 -1.270707e-04 -1.300000e+00 -1.370679e-04 -1.400000e+00 -1.474787e-04 -1.500000e+00 -1.583210e-04 -1.600000e+00 -1.696137e-04 -1.700000e+00 -1.813767e-04 -1.800000e+00 -1.936315e-04 -2.000000e-01 -3.236954e-04 -3.000000e-01 -3.722842e-04 -4.000000e-01 -4.052186e-04 -5.000000e-01 -4.371928e-04 -6.000000e-01 -4.684500e-04 -7.000000e-01 -4.993045e-04 -8.000000e-01 -5.300657e-04 -9.000000e-01 -5.609683e-04 -1.000000e+00 -5.921825e-04 -1.100000e+00 -6.238328e-04 -1.200000e+00 -6.560127e-04 -1.300000e+00 -6.887951e-04 -1.400000e+00 -7.222391e-04 -1.500000e+00 -7.563944e-04 -1.600000e+00 -7.913044e-04 -1.700000e+00 -8.270083e-04 -1.800000e+00 -8.635422e-04 -2.000000e-01 -6.362416e-04 -3.000000e-01 -8.252108e-04 -4.000000e-01 -9.384887e-04 -5.000000e-01 -1.006766e-03 -6.000000e-01 -1.066911e-03 -7.000000e-01 -1.125791e-03 -8.000000e-01 -1.183256e-03 -9.000000e-01 -1.239416e-03 -1.000000e+00 -1.294578e-03 -1.100000e+00 -1.349078e-03 -1.200000e+00 -1.403215e-03 -1.300000e+00 -1.457236e-03 -1.400000e+00 -1.511337e-03 -1.500000e+00 -1.565674e-03 -1.600000e+00 -1.620372e-03 -1.700000e+00 -1.675532e-03 -1.800000e+00 -1.731237e-03 -2.000000e-01 -8.942919e-04 -3.000000e-01 -1.221693e-03 -4.000000e-01 -1.471297e-03 -5.000000e-01 -1.648885e-03 -6.000000e-01 -1.767189e-03 -7.000000e-01 -1.854914e-03 -8.000000e-01 -1.937134e-03 -9.000000e-01 -2.017933e-03 -1.000000e+00 -2.097230e-03 -1.100000e+00 -2.174954e-03 -1.200000e+00 -2.251232e-03 -1.300000e+00 -2.326297e-03 -1.400000e+00 -2.400412e-03 -1.500000e+00 -2.473830e-03 -1.600000e+00 -2.546779e-03 -1.700000e+00 -2.619455e-03 -1.800000e+00 -2.692024e-03 -2.000000e-01 -1.099660e-03 -3.000000e-01 -1.542998e-03 -4.000000e-01 -1.912357e-03 -5.000000e-01 -2.210948e-03 -6.000000e-01 -2.443263e-03 -7.000000e-01 -2.616248e-03 -8.000000e-01 -2.743263e-03 -9.000000e-01 -2.847346e-03 -1.000000e+00 -2.946865e-03 -1.100000e+00 -3.044792e-03 -1.200000e+00 -3.141252e-03 -1.300000e+00 -3.236151e-03 -1.400000e+00 -3.329502e-03 -1.500000e+00 -3.421422e-03 -1.600000e+00 -3.512085e-03 -1.700000e+00 -3.601685e-03 -1.800000e+00 -3.690419e-03 -2.000000e-01 -1.323288e-03 -3.000000e-01 -1.900779e-03 -4.000000e-01 -2.413864e-03 -5.000000e-01 -2.862055e-03 -6.000000e-01 -3.247311e-03 -7.000000e-01 -3.572769e-03 -8.000000e-01 -3.842246e-03 -9.000000e-01 -4.060779e-03 -1.000000e+00 -4.235768e-03 -1.100000e+00 -4.377686e-03 -1.200000e+00 -4.501075e-03 -1.300000e+00 -4.619790e-03 -1.400000e+00 -4.736666e-03 -1.500000e+00 -4.852063e-03 -1.600000e+00 -4.966006e-03 -1.700000e+00 -5.078485e-03 -1.800000e+00 -5.189527e-03 -2.000000e-01 -1.465681e-03 -3.000000e-01 -2.135731e-03 -4.000000e-01 -2.753367e-03 -5.000000e-01 -3.315155e-03 -6.000000e-01 -3.820331e-03 -7.000000e-01 -4.269931e-03 -8.000000e-01 -4.666054e-03 -9.000000e-01 -5.011370e-03 -1.000000e+00 -5.308993e-03 -1.100000e+00 -5.562716e-03 -1.200000e+00 -5.777420e-03 -1.300000e+00 -5.959268e-03 -1.400000e+00 -6.115539e-03 -1.500000e+00 -6.254781e-03 -1.600000e+00 -6.387042e-03 -1.700000e+00 -6.517185e-03 -1.800000e+00 -6.645738e-03 -2.000000e-01 -8.053777e-05 -3.000000e-01 -9.162409e-05 -4.000000e-01 -1.024997e-04 -5.000000e-01 -1.136548e-04 -6.000000e-01 -1.251789e-04 -7.000000e-01 -1.370995e-04 -8.000000e-01 -1.494356e-04 -9.000000e-01 -1.622080e-04 -1.000000e+00 -1.754382e-04 -1.100000e+00 -1.891484e-04 -1.200000e+00 -2.033607e-04 -1.300000e+00 -2.180970e-04 -1.400000e+00 -2.333799e-04 -1.500000e+00 -2.492324e-04 -1.600000e+00 -2.656781e-04 -1.700000e+00 -2.827418e-04 -1.800000e+00 -3.004492e-04 -2.000000e-01 -2.967540e-04 -3.000000e-01 -3.587330e-04 -4.000000e-01 -3.937602e-04 -5.000000e-01 -4.249225e-04 -6.000000e-01 -4.554245e-04 -7.000000e-01 -4.853715e-04 -8.000000e-01 -5.149862e-04 -9.000000e-01 -5.445097e-04 -1.000000e+00 -5.741407e-04 -1.100000e+00 -6.040315e-04 -1.200000e+00 -6.342969e-04 -1.300000e+00 -6.650254e-04 -1.400000e+00 -6.962867e-04 -1.500000e+00 -7.281374e-04 -1.600000e+00 -7.606255e-04 -1.700000e+00 -7.937927e-04 -1.800000e+00 -8.276765e-04 -2.000000e-01 -5.192224e-04 -3.000000e-01 -6.879597e-04 -4.000000e-01 -8.011363e-04 -5.000000e-01 -8.720396e-04 -6.000000e-01 -9.256745e-04 -7.000000e-01 -9.769033e-04 -8.000000e-01 -1.027362e-03 -9.000000e-01 -1.076896e-03 -1.000000e+00 -1.125564e-03 -1.100000e+00 -1.173562e-03 -1.200000e+00 -1.221119e-03 -1.300000e+00 -1.268446e-03 -1.400000e+00 -1.315726e-03 -1.500000e+00 -1.363110e-03 -1.600000e+00 -1.410721e-03 -1.700000e+00 -1.458660e-03 -1.800000e+00 -1.507013e-03 -2.000000e-01 -7.107833e-04 -3.000000e-01 -9.814930e-04 -4.000000e-01 -1.196037e-03 -5.000000e-01 -1.357425e-03 -6.000000e-01 -1.472204e-03 -7.000000e-01 -1.554887e-03 -8.000000e-01 -1.625302e-03 -9.000000e-01 -1.693712e-03 -1.000000e+00 -1.761384e-03 -1.100000e+00 -1.828127e-03 -1.200000e+00 -1.893853e-03 -1.300000e+00 -1.958629e-03 -1.400000e+00 -2.022603e-03 -1.500000e+00 -2.085948e-03 -1.600000e+00 -2.148840e-03 -1.700000e+00 -2.211441e-03 -1.800000e+00 -2.273894e-03 -2.000000e-01 -8.703534e-04 -3.000000e-01 -1.229542e-03 -4.000000e-01 -1.535299e-03 -5.000000e-01 -1.788717e-03 -6.000000e-01 -1.992234e-03 -7.000000e-01 -2.150032e-03 -8.000000e-01 -2.269922e-03 -9.000000e-01 -2.364654e-03 -1.000000e+00 -2.449433e-03 -1.100000e+00 -2.532170e-03 -1.200000e+00 -2.614133e-03 -1.300000e+00 -2.695229e-03 -1.400000e+00 -2.775330e-03 -1.500000e+00 -2.854418e-03 -1.600000e+00 -2.932552e-03 -1.700000e+00 -3.009841e-03 -1.800000e+00 -3.086415e-03 -2.000000e-01 -1.055746e-03 -3.000000e-01 -1.522006e-03 -4.000000e-01 -1.941527e-03 -5.000000e-01 -2.312983e-03 -6.000000e-01 -2.636801e-03 -7.000000e-01 -2.914587e-03 -8.000000e-01 -3.148785e-03 -9.000000e-01 -3.342837e-03 -1.000000e+00 -3.501773e-03 -1.100000e+00 -3.632590e-03 -1.200000e+00 -3.744148e-03 -1.300000e+00 -3.846545e-03 -1.400000e+00 -3.946382e-03 -1.500000e+00 -4.045210e-03 -1.600000e+00 -4.143203e-03 -1.700000e+00 -4.240296e-03 -1.800000e+00 -4.336435e-03 -2.000000e-01 -1.186306e-03 -3.000000e-01 -1.731660e-03 -4.000000e-01 -2.238332e-03 -5.000000e-01 -2.703337e-03 -6.000000e-01 -3.125332e-03 -7.000000e-01 -3.504342e-03 -8.000000e-01 -3.841383e-03 -9.000000e-01 -4.138137e-03 -1.000000e+00 -4.396808e-03 -1.100000e+00 -4.620185e-03 -1.200000e+00 -4.811857e-03 -1.300000e+00 -4.976335e-03 -1.400000e+00 -5.118917e-03 -1.500000e+00 -5.245465e-03 -1.600000e+00 -5.362370e-03 -1.700000e+00 -5.475384e-03 -1.800000e+00 -5.586920e-03 -2.000000e-01 -1.215310e-04 -3.000000e-01 -1.449795e-04 -4.000000e-01 -1.644397e-04 -5.000000e-01 -1.838944e-04 -6.000000e-01 -2.037631e-04 -7.000000e-01 -2.241339e-04 -8.000000e-01 -2.450728e-04 -9.000000e-01 -2.666381e-04 -1.000000e+00 -2.888803e-04 -1.100000e+00 -3.118434e-04 -1.200000e+00 -3.355664e-04 -1.300000e+00 -3.600852e-04 -1.400000e+00 -3.854342e-04 -1.500000e+00 -4.116469e-04 -1.600000e+00 -4.387567e-04 -1.700000e+00 -4.667976e-04 -1.800000e+00 -4.958045e-04 -2.000000e-01 -2.683866e-04 -3.000000e-01 -3.434866e-04 -4.000000e-01 -3.905718e-04 -5.000000e-01 -4.254121e-04 -6.000000e-01 -4.579229e-04 -7.000000e-01 -4.899888e-04 -8.000000e-01 -5.217546e-04 -9.000000e-01 -5.533460e-04 -1.000000e+00 -5.849287e-04 -1.100000e+00 -6.166606e-04 -1.200000e+00 -6.486752e-04 -1.300000e+00 -6.810800e-04 -1.400000e+00 -7.139613e-04 -1.500000e+00 -7.473894e-04 -1.600000e+00 -7.814225e-04 -1.700000e+00 -8.161101e-04 -1.800000e+00 -8.514956e-04 -2.000000e-01 -4.174948e-04 -3.000000e-01 -5.651320e-04 -4.000000e-01 -6.748377e-04 -5.000000e-01 -7.519469e-04 -6.000000e-01 -8.074889e-04 -7.000000e-01 -8.544460e-04 -8.000000e-01 -8.996975e-04 -9.000000e-01 -9.444786e-04 -1.000000e+00 -9.887737e-04 -1.100000e+00 -1.032583e-03 -1.200000e+00 -1.076001e-03 -1.300000e+00 -1.119162e-03 -1.400000e+00 -1.162206e-03 -1.500000e+00 -1.205264e-03 -1.600000e+00 -1.248450e-03 -1.700000e+00 -1.291863e-03 -1.800000e+00 -1.335586e-03 -2.000000e-01 -5.523075e-04 -3.000000e-01 -7.705283e-04 -4.000000e-01 -9.501590e-04 -5.000000e-01 -1.092854e-03 -6.000000e-01 -1.201930e-03 -7.000000e-01 -1.284056e-03 -8.000000e-01 -1.349422e-03 -9.000000e-01 -1.408062e-03 -1.000000e+00 -1.465169e-03 -1.100000e+00 -1.521831e-03 -1.200000e+00 -1.578020e-03 -1.300000e+00 -1.633658e-03 -1.400000e+00 -1.688747e-03 -1.500000e+00 -1.743357e-03 -1.600000e+00 -1.797587e-03 -1.700000e+00 -1.851545e-03 -1.800000e+00 -1.905340e-03 -2.000000e-01 -6.699586e-04 -3.000000e-01 -9.519966e-04 -4.000000e-01 -1.196965e-03 -5.000000e-01 -1.405155e-03 -6.000000e-01 -1.577904e-03 -7.000000e-01 -1.717682e-03 -8.000000e-01 -1.828773e-03 -9.000000e-01 -1.917844e-03 -1.000000e+00 -1.993249e-03 -1.100000e+00 -2.062742e-03 -1.200000e+00 -2.130579e-03 -1.300000e+00 -2.197915e-03 -1.400000e+00 -2.264816e-03 -1.500000e+00 -2.331190e-03 -1.600000e+00 -2.396992e-03 -1.700000e+00 -2.462231e-03 -1.800000e+00 -2.526956e-03 -2.000000e-01 -8.151175e-04 -3.000000e-01 -1.178259e-03 -4.000000e-01 -1.508450e-03 -5.000000e-01 -1.804478e-03 -6.000000e-01 -2.066202e-03 -7.000000e-01 -2.294404e-03 -8.000000e-01 -2.490612e-03 -9.000000e-01 -2.657086e-03 -1.000000e+00 -2.797037e-03 -1.100000e+00 -2.914811e-03 -1.200000e+00 -3.015698e-03 -1.300000e+00 -3.105458e-03 -1.400000e+00 -3.189490e-03 -1.500000e+00 -3.271330e-03 -1.600000e+00 -3.352374e-03 -1.700000e+00 -3.432950e-03 -1.800000e+00 -3.513054e-03 -2.000000e-01 -9.263926e-04 -3.000000e-01 -1.353590e-03 -4.000000e-01 -1.752829e-03 -5.000000e-01 -2.121990e-03 -6.000000e-01 -2.459839e-03 -7.000000e-01 -2.766039e-03 -8.000000e-01 -3.041016e-03 -9.000000e-01 -3.285795e-03 -1.000000e+00 -3.501875e-03 -1.100000e+00 -3.691217e-03 -1.200000e+00 -3.856317e-03 -1.300000e+00 -4.000255e-03 -1.400000e+00 -4.126613e-03 -1.500000e+00 -4.239259e-03 -1.600000e+00 -4.342117e-03 -1.700000e+00 -4.438929e-03 -1.800000e+00 -4.532697e-03 ngspice-26/tests/hisim/pmos/reference/68_acFreq_WPE.standard0000644000265600020320000002525312264261473023402 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 1258.925 2.11181482556468e-14 1.69794813076605e-14 3.49557693315995e-15 1584.893 2.11181436559616e-14 1.69794842971798e-14 3.49557675654025e-15 1995.262 2.11181485702583e-14 1.69794828755604e-14 3.49557670465635e-15 2511.886 2.11181456338056e-14 1.69794794509797e-14 3.49557689925465e-15 3162.278 2.11181401625201e-14 1.69794789033442e-14 3.49557579428247e-15 3981.072 2.11181397233124e-14 1.69794784325439e-14 3.49557581085882e-15 5011.872 2.11181425136951e-14 1.69794811679452e-14 3.49557575456798e-15 6309.573 2.111814223353e-14 1.69794805312469e-14 3.49557672455949e-15 7943.282 2.11181474055108e-14 1.69794803644538e-14 3.49557606569293e-15 10000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 12589.25 2.11181482556468e-14 1.69794813076605e-14 3.49557693315995e-15 15848.93 2.11181436559616e-14 1.69794842971798e-14 3.49557675654025e-15 19952.62 2.11181485702583e-14 1.69794828755604e-14 3.49557670465635e-15 25118.86 2.11181456338056e-14 1.69794794509797e-14 3.49557689925465e-15 31622.78 2.11181401625201e-14 1.69794789033442e-14 3.49557579428247e-15 39810.72 2.11181397233124e-14 1.69794784325439e-14 3.49557581085882e-15 50118.72 2.11181425136951e-14 1.69794811679452e-14 3.49557575456798e-15 63095.73 2.111814223353e-14 1.69794805312469e-14 3.49557672455949e-15 79432.82 2.11181474055108e-14 1.69794803644538e-14 3.49557606569293e-15 100000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 125892.5 2.11181482556468e-14 1.69794813076605e-14 3.49557693315995e-15 158489.3 2.11181436559616e-14 1.69794842971798e-14 3.49557675654025e-15 199526.2 2.11181485702583e-14 1.69794828755603e-14 3.49557670465635e-15 251188.6 2.11181456338056e-14 1.69794794509797e-14 3.49557689925465e-15 316227.8 2.11181401625201e-14 1.69794789033442e-14 3.49557579428247e-15 398107.2 2.11181397233124e-14 1.69794784325439e-14 3.49557581085882e-15 501187.2 2.11181425136951e-14 1.69794811679452e-14 3.49557575456798e-15 630957.3 2.111814223353e-14 1.69794805312469e-14 3.49557672455949e-15 794328.2 2.11181474055108e-14 1.69794803644538e-14 3.49557606569293e-15 1000000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 1258925 2.11181482556468e-14 1.69794813076605e-14 3.49557693315995e-15 1584893 2.11181436559616e-14 1.69794842971798e-14 3.49557675654025e-15 1995262 2.11181485702583e-14 1.69794828755604e-14 3.49557670465635e-15 2511886 2.11181456338056e-14 1.69794794509797e-14 3.49557689925465e-15 3162278 2.11181401625201e-14 1.69794789033442e-14 3.49557579428247e-15 3981072 2.11181397233124e-14 1.69794784325439e-14 3.49557581085882e-15 5011872 2.11181425136951e-14 1.69794811679452e-14 3.49557575456798e-15 6309573 2.111814223353e-14 1.69794805312469e-14 3.49557672455949e-15 7943282 2.11181474055108e-14 1.69794803644538e-14 3.49557606569293e-15 10000000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 12589250 2.11181482556468e-14 1.69794813076605e-14 3.49557693315995e-15 15848930 2.11181436559616e-14 1.69794842971798e-14 3.49557675654025e-15 19952620 2.11181485702583e-14 1.69794828755604e-14 3.49557670465635e-15 25118860 2.11181456338056e-14 1.69794794509797e-14 3.49557689925465e-15 31622780 2.11181401625201e-14 1.69794789033442e-14 3.49557579428247e-15 39810720 2.11181397233124e-14 1.69794784325439e-14 3.49557581085882e-15 50118720 2.11181425136951e-14 1.69794811679452e-14 3.49557575456798e-15 63095730 2.111814223353e-14 1.69794805312469e-14 3.49557672455949e-15 79432820 2.11181474055108e-14 1.69794803644538e-14 3.49557606569293e-15 100000000 2.11181420749091e-14 1.69794769347475e-14 3.49557571935738e-15 1000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 1258.925 2.08997301646725e-14 1.68492673621239e-14 3.40866987032531e-15 1584.893 2.08997301723859e-14 1.68492596509724e-14 3.4086692782755e-15 1995.262 2.08997241324308e-14 1.68492561884928e-14 3.40866957486714e-15 2511.886 2.08997285082567e-14 1.6849260468493e-14 3.40867004797091e-15 3162.278 2.08997214713012e-14 1.68492520810186e-14 3.40866883003619e-15 3981.072 2.08997244029946e-14 1.68492543844414e-14 3.40866902893195e-15 5011.872 2.08997275784003e-14 1.68492578520602e-14 3.40867023647821e-15 6309.573 2.08997270195784e-14 1.68492572484342e-14 3.40866871336304e-15 7943.282 2.0899730379067e-14 1.68492576527791e-14 3.40867009280077e-15 10000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 12589.25 2.08997301646725e-14 1.68492673621239e-14 3.40866987032531e-15 15848.93 2.08997301723859e-14 1.68492596509724e-14 3.4086692782755e-15 19952.62 2.08997241324308e-14 1.68492561884928e-14 3.40866957486714e-15 25118.86 2.08997285082567e-14 1.6849260468493e-14 3.40867004797091e-15 31622.78 2.08997214713012e-14 1.68492520810186e-14 3.40866883003619e-15 39810.72 2.08997244029946e-14 1.68492543844414e-14 3.40866902893195e-15 50118.72 2.08997275784003e-14 1.68492578520602e-14 3.40867023647821e-15 63095.73 2.08997270195784e-14 1.68492572484342e-14 3.40866871336304e-15 79432.82 2.0899730379067e-14 1.68492576527791e-14 3.40867009280077e-15 100000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 125892.5 2.08997301646725e-14 1.68492673621239e-14 3.40866987032531e-15 158489.3 2.08997301723859e-14 1.68492596509724e-14 3.4086692782755e-15 199526.2 2.08997241324308e-14 1.68492561884928e-14 3.40866957486714e-15 251188.6 2.08997285082567e-14 1.6849260468493e-14 3.40867004797091e-15 316227.8 2.08997214713012e-14 1.68492520810186e-14 3.40866883003619e-15 398107.2 2.08997244029946e-14 1.68492543844414e-14 3.40866902893195e-15 501187.2 2.08997275784003e-14 1.68492578520602e-14 3.40867023647821e-15 630957.3 2.08997270195784e-14 1.68492572484342e-14 3.40866871336304e-15 794328.2 2.0899730379067e-14 1.68492576527791e-14 3.40867009280077e-15 1000000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 1258925 2.08997301646724e-14 1.68492673621239e-14 3.40866987032531e-15 1584893 2.08997301723859e-14 1.68492596509724e-14 3.4086692782755e-15 1995262 2.08997241324308e-14 1.68492561884928e-14 3.40866957486714e-15 2511886 2.08997285082567e-14 1.6849260468493e-14 3.40867004797091e-15 3162278 2.08997214713012e-14 1.68492520810186e-14 3.40866883003619e-15 3981072 2.08997244029946e-14 1.68492543844414e-14 3.40866902893195e-15 5011872 2.08997275784003e-14 1.68492578520602e-14 3.40867023647821e-15 6309573 2.08997270195784e-14 1.68492572484342e-14 3.40866871336304e-15 7943282 2.0899730379067e-14 1.68492576527791e-14 3.40867009280077e-15 10000000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 12589250 2.08997301646724e-14 1.68492673621239e-14 3.40866987032531e-15 15848930 2.08997301723859e-14 1.68492596509724e-14 3.4086692782755e-15 19952620 2.08997241324308e-14 1.68492561884928e-14 3.40866957486714e-15 25118860 2.08997285082567e-14 1.6849260468493e-14 3.40867004797091e-15 31622780 2.08997214713012e-14 1.68492520810186e-14 3.40866883003619e-15 39810720 2.08997244029946e-14 1.68492543844414e-14 3.40866902893195e-15 50118720 2.08997275784003e-14 1.68492578520602e-14 3.40867023647821e-15 63095730 2.08997270195784e-14 1.68492572484342e-14 3.40866871336304e-15 79432820 2.0899730379067e-14 1.68492576527791e-14 3.40867009280077e-15 100000000 2.08997178310098e-14 1.68492563603097e-14 3.40866916268205e-15 1000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 1258.925 2.0641249161717e-14 1.66784468929889e-14 3.32456556785237e-15 1584.893 2.06412491118231e-14 1.6678435201818e-14 3.324564522e-15 1995.262 2.06412489659639e-14 1.66784363610058e-14 3.32456464005324e-15 2511.886 2.06412483899936e-14 1.6678439927045e-14 3.32456500838704e-15 3162.278 2.06412407315524e-14 1.66784347534927e-14 3.32456419601874e-15 3981.072 2.06412432200231e-14 1.66784367652567e-14 3.32456389902541e-15 5011.872 2.06412466175367e-14 1.66784381922844e-14 3.32456556126326e-15 6309.573 2.06412454316253e-14 1.66784378800525e-14 3.32456565103901e-15 7943.282 2.06412405104171e-14 1.66784371446654e-14 3.32456521157881e-15 10000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 12589.25 2.0641249161717e-14 1.66784468929889e-14 3.32456556785237e-15 15848.93 2.06412491118231e-14 1.6678435201818e-14 3.324564522e-15 19952.62 2.06412489659639e-14 1.66784363610058e-14 3.32456464005324e-15 25118.86 2.06412483899936e-14 1.6678439927045e-14 3.32456500838704e-15 31622.78 2.06412407315524e-14 1.66784347534927e-14 3.32456419601874e-15 39810.72 2.06412432200231e-14 1.66784367652567e-14 3.32456389902541e-15 50118.72 2.06412466175367e-14 1.66784381922844e-14 3.32456556126326e-15 63095.73 2.06412454316253e-14 1.66784378800525e-14 3.32456565103901e-15 79432.82 2.06412405104171e-14 1.66784371446654e-14 3.32456521157881e-15 100000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 125892.5 2.0641249161717e-14 1.66784468929889e-14 3.32456556785237e-15 158489.3 2.06412491118231e-14 1.6678435201818e-14 3.324564522e-15 199526.2 2.06412489659639e-14 1.66784363610058e-14 3.32456464005324e-15 251188.6 2.06412483899936e-14 1.6678439927045e-14 3.32456500838704e-15 316227.8 2.06412407315524e-14 1.66784347534927e-14 3.32456419601874e-15 398107.2 2.06412432200231e-14 1.66784367652567e-14 3.32456389902541e-15 501187.2 2.06412466175367e-14 1.66784381922844e-14 3.32456556126326e-15 630957.3 2.06412454316253e-14 1.66784378800525e-14 3.32456565103901e-15 794328.2 2.06412405104171e-14 1.66784371446654e-14 3.32456521157881e-15 1000000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 1258925 2.0641249161717e-14 1.66784468929889e-14 3.32456556785237e-15 1584893 2.06412491118231e-14 1.6678435201818e-14 3.324564522e-15 1995262 2.06412489659639e-14 1.66784363610058e-14 3.32456464005324e-15 2511886 2.06412483899936e-14 1.6678439927045e-14 3.32456500838704e-15 3162278 2.06412407315524e-14 1.66784347534927e-14 3.32456419601874e-15 3981072 2.06412432200231e-14 1.66784367652567e-14 3.32456389902541e-15 5011872 2.06412466175367e-14 1.66784381922844e-14 3.32456556126326e-15 6309573 2.06412454316253e-14 1.66784378800525e-14 3.32456565103901e-15 7943282 2.06412405104171e-14 1.66784371446654e-14 3.32456521157881e-15 10000000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 12589250 2.0641249161717e-14 1.66784468929889e-14 3.32456556785237e-15 15848930 2.06412491118231e-14 1.6678435201818e-14 3.324564522e-15 19952620 2.06412489659639e-14 1.66784363610058e-14 3.32456464005324e-15 25118860 2.06412483899936e-14 1.6678439927045e-14 3.32456500838704e-15 31622780 2.06412407315524e-14 1.66784347534927e-14 3.32456419601874e-15 39810720 2.06412432200231e-14 1.66784367652567e-14 3.32456389902541e-15 50118720 2.06412466175367e-14 1.66784381922844e-14 3.32456556126326e-15 63095730 2.06412454316253e-14 1.66784378800525e-14 3.32456565103901e-15 79432820 2.06412405104171e-14 1.66784371446654e-14 3.32456521157881e-15 100000000 2.06412502034286e-14 1.66784353598892e-14 3.32456373300514e-15 ngspice-26/tests/hisim/pmos/reference/55_acFreq_COADOV=1.standard0000644000265600020320000002530212264261473024067 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/61_acFreq_CORBNET=1.standard0000644000265600020320000002530212264261473024205 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/15_dcSweep_COISTI=1_NSUBP.standard0000644000265600020320000002342612264261473025247 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.375632e-04 -3.000000e-01 -6.134099e-04 -4.000000e-01 -6.766302e-04 -5.000000e-01 -7.154321e-04 -6.000000e-01 -7.526338e-04 -7.000000e-01 -7.902214e-04 -8.000000e-01 -8.284049e-04 -9.000000e-01 -8.672720e-04 -1.000000e+00 -9.069252e-04 -1.100000e+00 -9.474784e-04 -1.200000e+00 -9.890482e-04 -1.300000e+00 -1.031750e-03 -1.400000e+00 -1.075696e-03 -1.500000e+00 -1.121000e-03 -1.600000e+00 -1.167774e-03 -1.700000e+00 -1.216132e-03 -1.800000e+00 -1.266192e-03 -2.000000e-01 -6.366620e-04 -3.000000e-01 -8.506634e-04 -4.000000e-01 -1.036636e-03 -5.000000e-01 -1.168707e-03 -6.000000e-01 -1.254491e-03 -7.000000e-01 -1.324263e-03 -8.000000e-01 -1.388928e-03 -9.000000e-01 -1.451609e-03 -1.000000e+00 -1.513492e-03 -1.100000e+00 -1.575189e-03 -1.200000e+00 -1.637082e-03 -1.300000e+00 -1.699444e-03 -1.400000e+00 -1.762476e-03 -1.500000e+00 -1.826343e-03 -1.600000e+00 -1.891178e-03 -1.700000e+00 -1.957096e-03 -1.800000e+00 -2.024199e-03 -2.000000e-01 -8.879574e-04 -3.000000e-01 -1.210855e-03 -4.000000e-01 -1.460519e-03 -5.000000e-01 -1.656579e-03 -6.000000e-01 -1.824409e-03 -7.000000e-01 -1.958360e-03 -8.000000e-01 -2.066388e-03 -9.000000e-01 -2.161324e-03 -1.000000e+00 -2.249915e-03 -1.100000e+00 -2.335082e-03 -1.200000e+00 -2.418234e-03 -1.300000e+00 -2.500181e-03 -1.400000e+00 -2.581452e-03 -1.500000e+00 -2.662427e-03 -1.600000e+00 -2.743392e-03 -1.700000e+00 -2.824571e-03 -1.800000e+00 -2.906144e-03 -2.000000e-01 -1.104019e-03 -3.000000e-01 -1.541268e-03 -4.000000e-01 -1.903273e-03 -5.000000e-01 -2.195426e-03 -6.000000e-01 -2.425460e-03 -7.000000e-01 -2.611833e-03 -8.000000e-01 -2.776108e-03 -9.000000e-01 -2.918263e-03 -1.000000e+00 -3.043099e-03 -1.100000e+00 -3.157259e-03 -1.200000e+00 -3.265076e-03 -1.300000e+00 -3.368889e-03 -1.400000e+00 -3.469996e-03 -1.500000e+00 -3.569197e-03 -1.600000e+00 -3.667039e-03 -1.700000e+00 -3.763928e-03 -1.800000e+00 -3.860181e-03 -2.000000e-01 -1.278380e-03 -3.000000e-01 -1.814836e-03 -4.000000e-01 -2.278695e-03 -5.000000e-01 -2.673493e-03 -6.000000e-01 -3.003780e-03 -7.000000e-01 -3.274543e-03 -8.000000e-01 -3.493694e-03 -9.000000e-01 -3.676408e-03 -1.000000e+00 -3.841892e-03 -1.100000e+00 -3.991947e-03 -1.200000e+00 -4.129284e-03 -1.300000e+00 -4.257837e-03 -1.400000e+00 -4.380498e-03 -1.500000e+00 -4.499073e-03 -1.600000e+00 -4.614666e-03 -1.700000e+00 -4.727993e-03 -1.800000e+00 -4.839556e-03 -2.000000e-01 -1.467635e-03 -3.000000e-01 -2.120312e-03 -4.000000e-01 -2.709416e-03 -5.000000e-01 -3.234423e-03 -6.000000e-01 -3.697549e-03 -7.000000e-01 -4.102175e-03 -8.000000e-01 -4.451947e-03 -9.000000e-01 -4.750729e-03 -1.000000e+00 -5.003334e-03 -1.100000e+00 -5.216406e-03 -1.200000e+00 -5.399848e-03 -1.300000e+00 -5.568512e-03 -1.400000e+00 -5.727837e-03 -1.500000e+00 -5.878265e-03 -1.600000e+00 -6.021903e-03 -1.700000e+00 -6.160489e-03 -1.800000e+00 -6.295254e-03 -2.000000e-01 -1.584796e-03 -3.000000e-01 -2.317035e-03 -4.000000e-01 -2.997592e-03 -5.000000e-01 -3.622839e-03 -6.000000e-01 -4.192069e-03 -7.000000e-01 -4.706489e-03 -8.000000e-01 -5.168369e-03 -9.000000e-01 -5.580438e-03 -1.000000e+00 -5.945574e-03 -1.100000e+00 -6.266811e-03 -1.200000e+00 -6.547601e-03 -1.300000e+00 -6.792107e-03 -1.400000e+00 -7.005380e-03 -1.500000e+00 -7.193750e-03 -1.600000e+00 -7.366152e-03 -1.700000e+00 -7.531367e-03 -1.800000e+00 -7.690260e-03 -2.000000e-01 -4.618781e-04 -3.000000e-01 -6.710798e-04 -4.000000e-01 -7.787772e-04 -5.000000e-01 -8.334222e-04 -6.000000e-01 -8.799336e-04 -7.000000e-01 -9.251193e-04 -8.000000e-01 -9.701958e-04 -9.000000e-01 -1.015593e-03 -1.000000e+00 -1.061573e-03 -1.100000e+00 -1.108333e-03 -1.200000e+00 -1.156041e-03 -1.300000e+00 -1.204842e-03 -1.400000e+00 -1.254868e-03 -1.500000e+00 -1.306243e-03 -1.600000e+00 -1.359083e-03 -1.700000e+00 -1.413505e-03 -1.800000e+00 -1.469625e-03 -2.000000e-01 -5.945111e-04 -3.000000e-01 -8.190441e-04 -4.000000e-01 -1.013039e-03 -5.000000e-01 -1.167397e-03 -6.000000e-01 -1.269611e-03 -7.000000e-01 -1.346317e-03 -8.000000e-01 -1.414083e-03 -9.000000e-01 -1.478256e-03 -1.000000e+00 -1.540746e-03 -1.100000e+00 -1.602456e-03 -1.200000e+00 -1.663920e-03 -1.300000e+00 -1.725498e-03 -1.400000e+00 -1.787455e-03 -1.500000e+00 -1.849993e-03 -1.600000e+00 -1.913273e-03 -1.700000e+00 -1.977433e-03 -1.800000e+00 -2.042586e-03 -2.000000e-01 -7.626544e-04 -3.000000e-01 -1.062408e-03 -4.000000e-01 -1.310839e-03 -5.000000e-01 -1.514445e-03 -6.000000e-01 -1.685904e-03 -7.000000e-01 -1.826550e-03 -8.000000e-01 -1.938106e-03 -9.000000e-01 -2.032639e-03 -1.000000e+00 -2.118757e-03 -1.100000e+00 -2.200448e-03 -1.200000e+00 -2.279548e-03 -1.300000e+00 -2.357033e-03 -1.400000e+00 -2.433513e-03 -1.500000e+00 -2.509412e-03 -1.600000e+00 -2.585050e-03 -1.700000e+00 -2.660674e-03 -1.800000e+00 -2.736485e-03 -2.000000e-01 -9.169463e-04 -3.000000e-01 -1.297238e-03 -4.000000e-01 -1.624681e-03 -5.000000e-01 -1.901761e-03 -6.000000e-01 -2.131880e-03 -7.000000e-01 -2.321951e-03 -8.000000e-01 -2.483871e-03 -9.000000e-01 -2.624051e-03 -1.000000e+00 -2.745316e-03 -1.100000e+00 -2.854015e-03 -1.200000e+00 -2.955250e-03 -1.300000e+00 -3.051936e-03 -1.400000e+00 -3.145640e-03 -1.500000e+00 -3.237266e-03 -1.600000e+00 -3.327396e-03 -1.700000e+00 -3.416446e-03 -1.800000e+00 -3.504736e-03 -2.000000e-01 -1.048769e-03 -3.000000e-01 -1.502312e-03 -4.000000e-01 -1.904783e-03 -5.000000e-01 -2.257181e-03 -6.000000e-01 -2.561732e-03 -7.000000e-01 -2.821125e-03 -8.000000e-01 -3.039204e-03 -9.000000e-01 -3.222463e-03 -1.000000e+00 -3.381584e-03 -1.100000e+00 -3.524806e-03 -1.200000e+00 -3.654539e-03 -1.300000e+00 -3.774470e-03 -1.400000e+00 -3.887879e-03 -1.500000e+00 -3.996916e-03 -1.600000e+00 -4.102874e-03 -1.700000e+00 -4.206550e-03 -1.800000e+00 -4.308471e-03 -2.000000e-01 -1.203003e-03 -3.000000e-01 -1.746979e-03 -4.000000e-01 -2.245985e-03 -5.000000e-01 -2.698461e-03 -6.000000e-01 -3.104815e-03 -7.000000e-01 -3.466654e-03 -8.000000e-01 -3.786128e-03 -9.000000e-01 -4.065645e-03 -1.000000e+00 -4.308065e-03 -1.100000e+00 -4.517112e-03 -1.200000e+00 -4.697949e-03 -1.300000e+00 -4.858374e-03 -1.400000e+00 -5.007024e-03 -1.500000e+00 -5.146824e-03 -1.600000e+00 -5.279402e-03 -1.700000e+00 -5.406632e-03 -1.800000e+00 -5.529933e-03 -2.000000e-01 -1.310222e-03 -3.000000e-01 -1.920981e-03 -4.000000e-01 -2.494585e-03 -5.000000e-01 -3.027771e-03 -6.000000e-01 -3.519096e-03 -7.000000e-01 -3.968573e-03 -8.000000e-01 -4.377224e-03 -9.000000e-01 -4.746662e-03 -1.000000e+00 -5.078788e-03 -1.100000e+00 -5.375668e-03 -1.200000e+00 -5.639590e-03 -1.300000e+00 -5.873201e-03 -1.400000e+00 -6.079658e-03 -1.500000e+00 -6.262877e-03 -1.600000e+00 -6.428023e-03 -1.700000e+00 -6.581686e-03 -1.800000e+00 -6.728668e-03 -2.000000e-01 -4.712709e-04 -3.000000e-01 -6.918118e-04 -4.000000e-01 -8.596201e-04 -5.000000e-01 -9.496997e-04 -6.000000e-01 -1.014898e-03 -7.000000e-01 -1.074532e-03 -8.000000e-01 -1.132629e-03 -9.000000e-01 -1.190430e-03 -1.000000e+00 -1.248539e-03 -1.100000e+00 -1.307339e-03 -1.200000e+00 -1.367110e-03 -1.300000e+00 -1.428068e-03 -1.400000e+00 -1.490393e-03 -1.500000e+00 -1.554243e-03 -1.600000e+00 -1.619760e-03 -1.700000e+00 -1.687076e-03 -1.800000e+00 -1.756318e-03 -2.000000e-01 -5.462149e-04 -3.000000e-01 -7.743822e-04 -4.000000e-01 -9.779886e-04 -5.000000e-01 -1.153287e-03 -6.000000e-01 -1.282752e-03 -7.000000e-01 -1.375919e-03 -8.000000e-01 -1.453326e-03 -9.000000e-01 -1.524436e-03 -1.000000e+00 -1.592625e-03 -1.100000e+00 -1.659309e-03 -1.200000e+00 -1.725251e-03 -1.300000e+00 -1.790940e-03 -1.400000e+00 -1.856726e-03 -1.500000e+00 -1.922874e-03 -1.600000e+00 -1.989595e-03 -1.700000e+00 -2.057060e-03 -1.800000e+00 -2.125410e-03 -2.000000e-01 -6.500533e-04 -3.000000e-01 -9.232995e-04 -4.000000e-01 -1.163669e-03 -5.000000e-01 -1.373184e-03 -6.000000e-01 -1.553898e-03 -7.000000e-01 -1.705164e-03 -8.000000e-01 -1.826375e-03 -9.000000e-01 -1.925800e-03 -1.000000e+00 -2.013478e-03 -1.100000e+00 -2.095143e-03 -1.200000e+00 -2.173455e-03 -1.300000e+00 -2.249705e-03 -1.400000e+00 -2.324620e-03 -1.500000e+00 -2.398680e-03 -1.600000e+00 -2.472233e-03 -1.700000e+00 -2.545552e-03 -1.800000e+00 -2.618856e-03 -2.000000e-01 -7.531617e-04 -3.000000e-01 -1.078711e-03 -4.000000e-01 -1.369440e-03 -5.000000e-01 -1.626553e-03 -6.000000e-01 -1.851568e-03 -7.000000e-01 -2.046254e-03 -8.000000e-01 -2.212915e-03 -9.000000e-01 -2.354807e-03 -1.000000e+00 -2.476023e-03 -1.100000e+00 -2.582206e-03 -1.200000e+00 -2.679105e-03 -1.300000e+00 -2.770512e-03 -1.400000e+00 -2.858506e-03 -1.500000e+00 -2.944215e-03 -1.600000e+00 -3.028300e-03 -1.700000e+00 -3.111196e-03 -1.800000e+00 -3.193222e-03 -2.000000e-01 -8.468388e-04 -3.000000e-01 -1.222895e-03 -4.000000e-01 -1.564814e-03 -5.000000e-01 -1.872659e-03 -6.000000e-01 -2.147478e-03 -7.000000e-01 -2.390696e-03 -8.000000e-01 -2.603875e-03 -9.000000e-01 -2.788912e-03 -1.000000e+00 -2.948626e-03 -1.100000e+00 -3.087842e-03 -1.200000e+00 -3.211745e-03 -1.300000e+00 -3.324407e-03 -1.400000e+00 -3.429464e-03 -1.500000e+00 -3.529565e-03 -1.600000e+00 -3.626349e-03 -1.700000e+00 -3.720789e-03 -1.800000e+00 -3.813479e-03 -2.000000e-01 -9.646310e-04 -3.000000e-01 -1.406965e-03 -4.000000e-01 -1.818654e-03 -5.000000e-01 -2.198234e-03 -6.000000e-01 -2.545425e-03 -7.000000e-01 -2.860879e-03 -8.000000e-01 -3.145790e-03 -9.000000e-01 -3.401574e-03 -1.000000e+00 -3.629726e-03 -1.100000e+00 -3.831873e-03 -1.200000e+00 -4.009994e-03 -1.300000e+00 -4.167045e-03 -1.400000e+00 -4.307632e-03 -1.500000e+00 -4.436876e-03 -1.600000e+00 -4.558090e-03 -1.700000e+00 -4.673392e-03 -1.800000e+00 -4.784449e-03 -2.000000e-01 -1.054963e-03 -3.000000e-01 -1.550165e-03 -4.000000e-01 -2.019382e-03 -5.000000e-01 -2.460253e-03 -6.000000e-01 -2.871391e-03 -7.000000e-01 -3.252355e-03 -8.000000e-01 -3.603480e-03 -9.000000e-01 -3.925639e-03 -1.000000e+00 -4.220006e-03 -1.100000e+00 -4.487890e-03 -1.200000e+00 -4.730659e-03 -1.300000e+00 -4.949739e-03 -1.400000e+00 -5.146683e-03 -1.500000e+00 -5.323386e-03 -1.600000e+00 -5.482425e-03 -1.700000e+00 -5.627318e-03 -1.800000e+00 -5.762187e-03 ngspice-26/tests/hisim/pmos/reference/23_dcSweep_CODFM=0.standard0000644000265600020320000002342612264261473024134 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.699615e-05 -3.000000e-01 -5.356444e-05 -4.000000e-01 -6.033219e-05 -5.000000e-01 -6.744931e-05 -6.000000e-01 -7.492420e-05 -7.000000e-01 -8.274226e-05 -8.000000e-01 -9.089871e-05 -9.000000e-01 -9.939829e-05 -1.000000e+00 -1.082512e-04 -1.100000e+00 -1.174704e-04 -1.200000e+00 -1.270707e-04 -1.300000e+00 -1.370679e-04 -1.400000e+00 -1.474787e-04 -1.500000e+00 -1.583210e-04 -1.600000e+00 -1.696137e-04 -1.700000e+00 -1.813767e-04 -1.800000e+00 -1.936315e-04 -2.000000e-01 -3.236954e-04 -3.000000e-01 -3.722842e-04 -4.000000e-01 -4.052186e-04 -5.000000e-01 -4.371928e-04 -6.000000e-01 -4.684500e-04 -7.000000e-01 -4.993045e-04 -8.000000e-01 -5.300657e-04 -9.000000e-01 -5.609683e-04 -1.000000e+00 -5.921825e-04 -1.100000e+00 -6.238328e-04 -1.200000e+00 -6.560127e-04 -1.300000e+00 -6.887951e-04 -1.400000e+00 -7.222391e-04 -1.500000e+00 -7.563944e-04 -1.600000e+00 -7.913044e-04 -1.700000e+00 -8.270083e-04 -1.800000e+00 -8.635422e-04 -2.000000e-01 -6.362416e-04 -3.000000e-01 -8.252108e-04 -4.000000e-01 -9.384887e-04 -5.000000e-01 -1.006766e-03 -6.000000e-01 -1.066911e-03 -7.000000e-01 -1.125791e-03 -8.000000e-01 -1.183256e-03 -9.000000e-01 -1.239416e-03 -1.000000e+00 -1.294578e-03 -1.100000e+00 -1.349078e-03 -1.200000e+00 -1.403215e-03 -1.300000e+00 -1.457236e-03 -1.400000e+00 -1.511337e-03 -1.500000e+00 -1.565674e-03 -1.600000e+00 -1.620372e-03 -1.700000e+00 -1.675532e-03 -1.800000e+00 -1.731237e-03 -2.000000e-01 -8.942919e-04 -3.000000e-01 -1.221693e-03 -4.000000e-01 -1.471297e-03 -5.000000e-01 -1.648885e-03 -6.000000e-01 -1.767189e-03 -7.000000e-01 -1.854914e-03 -8.000000e-01 -1.937134e-03 -9.000000e-01 -2.017933e-03 -1.000000e+00 -2.097230e-03 -1.100000e+00 -2.174954e-03 -1.200000e+00 -2.251232e-03 -1.300000e+00 -2.326297e-03 -1.400000e+00 -2.400412e-03 -1.500000e+00 -2.473830e-03 -1.600000e+00 -2.546779e-03 -1.700000e+00 -2.619455e-03 -1.800000e+00 -2.692024e-03 -2.000000e-01 -1.099660e-03 -3.000000e-01 -1.542998e-03 -4.000000e-01 -1.912357e-03 -5.000000e-01 -2.210948e-03 -6.000000e-01 -2.443263e-03 -7.000000e-01 -2.616248e-03 -8.000000e-01 -2.743263e-03 -9.000000e-01 -2.847346e-03 -1.000000e+00 -2.946865e-03 -1.100000e+00 -3.044792e-03 -1.200000e+00 -3.141252e-03 -1.300000e+00 -3.236151e-03 -1.400000e+00 -3.329502e-03 -1.500000e+00 -3.421422e-03 -1.600000e+00 -3.512085e-03 -1.700000e+00 -3.601685e-03 -1.800000e+00 -3.690419e-03 -2.000000e-01 -1.323288e-03 -3.000000e-01 -1.900779e-03 -4.000000e-01 -2.413864e-03 -5.000000e-01 -2.862055e-03 -6.000000e-01 -3.247311e-03 -7.000000e-01 -3.572769e-03 -8.000000e-01 -3.842246e-03 -9.000000e-01 -4.060779e-03 -1.000000e+00 -4.235768e-03 -1.100000e+00 -4.377686e-03 -1.200000e+00 -4.501075e-03 -1.300000e+00 -4.619790e-03 -1.400000e+00 -4.736666e-03 -1.500000e+00 -4.852063e-03 -1.600000e+00 -4.966006e-03 -1.700000e+00 -5.078485e-03 -1.800000e+00 -5.189527e-03 -2.000000e-01 -1.465681e-03 -3.000000e-01 -2.135731e-03 -4.000000e-01 -2.753367e-03 -5.000000e-01 -3.315155e-03 -6.000000e-01 -3.820331e-03 -7.000000e-01 -4.269931e-03 -8.000000e-01 -4.666054e-03 -9.000000e-01 -5.011370e-03 -1.000000e+00 -5.308993e-03 -1.100000e+00 -5.562716e-03 -1.200000e+00 -5.777420e-03 -1.300000e+00 -5.959268e-03 -1.400000e+00 -6.115539e-03 -1.500000e+00 -6.254781e-03 -1.600000e+00 -6.387042e-03 -1.700000e+00 -6.517185e-03 -1.800000e+00 -6.645738e-03 -2.000000e-01 -8.053777e-05 -3.000000e-01 -9.162409e-05 -4.000000e-01 -1.024997e-04 -5.000000e-01 -1.136548e-04 -6.000000e-01 -1.251789e-04 -7.000000e-01 -1.370995e-04 -8.000000e-01 -1.494356e-04 -9.000000e-01 -1.622080e-04 -1.000000e+00 -1.754382e-04 -1.100000e+00 -1.891484e-04 -1.200000e+00 -2.033607e-04 -1.300000e+00 -2.180970e-04 -1.400000e+00 -2.333799e-04 -1.500000e+00 -2.492324e-04 -1.600000e+00 -2.656781e-04 -1.700000e+00 -2.827418e-04 -1.800000e+00 -3.004492e-04 -2.000000e-01 -2.967540e-04 -3.000000e-01 -3.587330e-04 -4.000000e-01 -3.937602e-04 -5.000000e-01 -4.249225e-04 -6.000000e-01 -4.554245e-04 -7.000000e-01 -4.853715e-04 -8.000000e-01 -5.149862e-04 -9.000000e-01 -5.445097e-04 -1.000000e+00 -5.741407e-04 -1.100000e+00 -6.040315e-04 -1.200000e+00 -6.342969e-04 -1.300000e+00 -6.650254e-04 -1.400000e+00 -6.962867e-04 -1.500000e+00 -7.281374e-04 -1.600000e+00 -7.606255e-04 -1.700000e+00 -7.937927e-04 -1.800000e+00 -8.276765e-04 -2.000000e-01 -5.192224e-04 -3.000000e-01 -6.879597e-04 -4.000000e-01 -8.011363e-04 -5.000000e-01 -8.720396e-04 -6.000000e-01 -9.256745e-04 -7.000000e-01 -9.769033e-04 -8.000000e-01 -1.027362e-03 -9.000000e-01 -1.076896e-03 -1.000000e+00 -1.125564e-03 -1.100000e+00 -1.173562e-03 -1.200000e+00 -1.221119e-03 -1.300000e+00 -1.268446e-03 -1.400000e+00 -1.315726e-03 -1.500000e+00 -1.363110e-03 -1.600000e+00 -1.410721e-03 -1.700000e+00 -1.458660e-03 -1.800000e+00 -1.507013e-03 -2.000000e-01 -7.107833e-04 -3.000000e-01 -9.814930e-04 -4.000000e-01 -1.196037e-03 -5.000000e-01 -1.357425e-03 -6.000000e-01 -1.472204e-03 -7.000000e-01 -1.554887e-03 -8.000000e-01 -1.625302e-03 -9.000000e-01 -1.693712e-03 -1.000000e+00 -1.761384e-03 -1.100000e+00 -1.828127e-03 -1.200000e+00 -1.893853e-03 -1.300000e+00 -1.958629e-03 -1.400000e+00 -2.022603e-03 -1.500000e+00 -2.085948e-03 -1.600000e+00 -2.148840e-03 -1.700000e+00 -2.211441e-03 -1.800000e+00 -2.273894e-03 -2.000000e-01 -8.703534e-04 -3.000000e-01 -1.229542e-03 -4.000000e-01 -1.535299e-03 -5.000000e-01 -1.788717e-03 -6.000000e-01 -1.992234e-03 -7.000000e-01 -2.150032e-03 -8.000000e-01 -2.269922e-03 -9.000000e-01 -2.364654e-03 -1.000000e+00 -2.449433e-03 -1.100000e+00 -2.532170e-03 -1.200000e+00 -2.614133e-03 -1.300000e+00 -2.695229e-03 -1.400000e+00 -2.775330e-03 -1.500000e+00 -2.854418e-03 -1.600000e+00 -2.932552e-03 -1.700000e+00 -3.009841e-03 -1.800000e+00 -3.086415e-03 -2.000000e-01 -1.055746e-03 -3.000000e-01 -1.522006e-03 -4.000000e-01 -1.941527e-03 -5.000000e-01 -2.312983e-03 -6.000000e-01 -2.636801e-03 -7.000000e-01 -2.914587e-03 -8.000000e-01 -3.148785e-03 -9.000000e-01 -3.342837e-03 -1.000000e+00 -3.501773e-03 -1.100000e+00 -3.632590e-03 -1.200000e+00 -3.744148e-03 -1.300000e+00 -3.846545e-03 -1.400000e+00 -3.946382e-03 -1.500000e+00 -4.045210e-03 -1.600000e+00 -4.143203e-03 -1.700000e+00 -4.240296e-03 -1.800000e+00 -4.336435e-03 -2.000000e-01 -1.186306e-03 -3.000000e-01 -1.731660e-03 -4.000000e-01 -2.238332e-03 -5.000000e-01 -2.703337e-03 -6.000000e-01 -3.125332e-03 -7.000000e-01 -3.504342e-03 -8.000000e-01 -3.841383e-03 -9.000000e-01 -4.138137e-03 -1.000000e+00 -4.396808e-03 -1.100000e+00 -4.620185e-03 -1.200000e+00 -4.811857e-03 -1.300000e+00 -4.976335e-03 -1.400000e+00 -5.118917e-03 -1.500000e+00 -5.245465e-03 -1.600000e+00 -5.362370e-03 -1.700000e+00 -5.475384e-03 -1.800000e+00 -5.586920e-03 -2.000000e-01 -1.215310e-04 -3.000000e-01 -1.449795e-04 -4.000000e-01 -1.644397e-04 -5.000000e-01 -1.838944e-04 -6.000000e-01 -2.037631e-04 -7.000000e-01 -2.241339e-04 -8.000000e-01 -2.450728e-04 -9.000000e-01 -2.666381e-04 -1.000000e+00 -2.888803e-04 -1.100000e+00 -3.118434e-04 -1.200000e+00 -3.355664e-04 -1.300000e+00 -3.600852e-04 -1.400000e+00 -3.854342e-04 -1.500000e+00 -4.116469e-04 -1.600000e+00 -4.387567e-04 -1.700000e+00 -4.667976e-04 -1.800000e+00 -4.958045e-04 -2.000000e-01 -2.683866e-04 -3.000000e-01 -3.434866e-04 -4.000000e-01 -3.905718e-04 -5.000000e-01 -4.254121e-04 -6.000000e-01 -4.579229e-04 -7.000000e-01 -4.899888e-04 -8.000000e-01 -5.217546e-04 -9.000000e-01 -5.533460e-04 -1.000000e+00 -5.849287e-04 -1.100000e+00 -6.166606e-04 -1.200000e+00 -6.486752e-04 -1.300000e+00 -6.810800e-04 -1.400000e+00 -7.139613e-04 -1.500000e+00 -7.473894e-04 -1.600000e+00 -7.814225e-04 -1.700000e+00 -8.161101e-04 -1.800000e+00 -8.514956e-04 -2.000000e-01 -4.174948e-04 -3.000000e-01 -5.651320e-04 -4.000000e-01 -6.748377e-04 -5.000000e-01 -7.519469e-04 -6.000000e-01 -8.074889e-04 -7.000000e-01 -8.544460e-04 -8.000000e-01 -8.996975e-04 -9.000000e-01 -9.444786e-04 -1.000000e+00 -9.887737e-04 -1.100000e+00 -1.032583e-03 -1.200000e+00 -1.076001e-03 -1.300000e+00 -1.119162e-03 -1.400000e+00 -1.162206e-03 -1.500000e+00 -1.205264e-03 -1.600000e+00 -1.248450e-03 -1.700000e+00 -1.291863e-03 -1.800000e+00 -1.335586e-03 -2.000000e-01 -5.523075e-04 -3.000000e-01 -7.705283e-04 -4.000000e-01 -9.501590e-04 -5.000000e-01 -1.092854e-03 -6.000000e-01 -1.201930e-03 -7.000000e-01 -1.284056e-03 -8.000000e-01 -1.349422e-03 -9.000000e-01 -1.408062e-03 -1.000000e+00 -1.465169e-03 -1.100000e+00 -1.521831e-03 -1.200000e+00 -1.578020e-03 -1.300000e+00 -1.633658e-03 -1.400000e+00 -1.688747e-03 -1.500000e+00 -1.743357e-03 -1.600000e+00 -1.797587e-03 -1.700000e+00 -1.851545e-03 -1.800000e+00 -1.905340e-03 -2.000000e-01 -6.699586e-04 -3.000000e-01 -9.519966e-04 -4.000000e-01 -1.196965e-03 -5.000000e-01 -1.405155e-03 -6.000000e-01 -1.577904e-03 -7.000000e-01 -1.717682e-03 -8.000000e-01 -1.828773e-03 -9.000000e-01 -1.917844e-03 -1.000000e+00 -1.993249e-03 -1.100000e+00 -2.062742e-03 -1.200000e+00 -2.130579e-03 -1.300000e+00 -2.197915e-03 -1.400000e+00 -2.264816e-03 -1.500000e+00 -2.331190e-03 -1.600000e+00 -2.396992e-03 -1.700000e+00 -2.462231e-03 -1.800000e+00 -2.526956e-03 -2.000000e-01 -8.151175e-04 -3.000000e-01 -1.178259e-03 -4.000000e-01 -1.508450e-03 -5.000000e-01 -1.804478e-03 -6.000000e-01 -2.066202e-03 -7.000000e-01 -2.294404e-03 -8.000000e-01 -2.490612e-03 -9.000000e-01 -2.657086e-03 -1.000000e+00 -2.797037e-03 -1.100000e+00 -2.914811e-03 -1.200000e+00 -3.015698e-03 -1.300000e+00 -3.105458e-03 -1.400000e+00 -3.189490e-03 -1.500000e+00 -3.271330e-03 -1.600000e+00 -3.352374e-03 -1.700000e+00 -3.432950e-03 -1.800000e+00 -3.513054e-03 -2.000000e-01 -9.263926e-04 -3.000000e-01 -1.353590e-03 -4.000000e-01 -1.752829e-03 -5.000000e-01 -2.121990e-03 -6.000000e-01 -2.459839e-03 -7.000000e-01 -2.766039e-03 -8.000000e-01 -3.041016e-03 -9.000000e-01 -3.285795e-03 -1.000000e+00 -3.501875e-03 -1.100000e+00 -3.691217e-03 -1.200000e+00 -3.856317e-03 -1.300000e+00 -4.000255e-03 -1.400000e+00 -4.126613e-03 -1.500000e+00 -4.239259e-03 -1.600000e+00 -4.342117e-03 -1.700000e+00 -4.438929e-03 -1.800000e+00 -4.532697e-03 ngspice-26/tests/hisim/pmos/reference/16_dcSweep_WPE.standard0000644000265600020320000002342612264261473023564 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.641622e-05 -3.000000e-01 -5.290611e-05 -4.000000e-01 -5.959665e-05 -5.000000e-01 -6.663491e-05 -6.000000e-01 -7.402805e-05 -7.000000e-01 -8.176100e-05 -8.000000e-01 -8.982866e-05 -9.000000e-01 -9.823552e-05 -1.000000e+00 -1.069915e-04 -1.100000e+00 -1.161093e-04 -1.200000e+00 -1.256035e-04 -1.300000e+00 -1.354894e-04 -1.400000e+00 -1.457837e-04 -1.500000e+00 -1.565038e-04 -1.600000e+00 -1.676684e-04 -1.700000e+00 -1.792970e-04 -1.800000e+00 -1.914106e-04 -2.000000e-01 -3.223862e-04 -3.000000e-01 -3.705740e-04 -4.000000e-01 -4.033330e-04 -5.000000e-01 -4.351397e-04 -6.000000e-01 -4.662344e-04 -7.000000e-01 -4.969319e-04 -8.000000e-01 -5.275397e-04 -9.000000e-01 -5.582905e-04 -1.000000e+00 -5.893529e-04 -1.100000e+00 -6.208502e-04 -1.200000e+00 -6.528751e-04 -1.300000e+00 -6.854998e-04 -1.400000e+00 -7.187827e-04 -1.500000e+00 -7.527731e-04 -1.600000e+00 -7.875141e-04 -1.700000e+00 -8.230443e-04 -1.800000e+00 -8.593999e-04 -2.000000e-01 -6.350008e-04 -3.000000e-01 -8.233416e-04 -4.000000e-01 -9.360531e-04 -5.000000e-01 -1.004012e-03 -6.000000e-01 -1.063963e-03 -7.000000e-01 -1.122649e-03 -8.000000e-01 -1.179918e-03 -9.000000e-01 -1.235885e-03 -1.000000e+00 -1.290858e-03 -1.100000e+00 -1.345174e-03 -1.200000e+00 -1.399129e-03 -1.300000e+00 -1.452971e-03 -1.400000e+00 -1.506894e-03 -1.500000e+00 -1.561053e-03 -1.600000e+00 -1.615572e-03 -1.700000e+00 -1.670552e-03 -1.800000e+00 -1.726076e-03 -2.000000e-01 -8.931705e-04 -3.000000e-01 -1.219990e-03 -4.000000e-01 -1.469011e-03 -5.000000e-01 -1.646029e-03 -6.000000e-01 -1.763855e-03 -7.000000e-01 -1.851311e-03 -8.000000e-01 -1.933336e-03 -9.000000e-01 -2.013939e-03 -1.000000e+00 -2.093037e-03 -1.100000e+00 -2.170560e-03 -1.200000e+00 -2.246638e-03 -1.300000e+00 -2.321507e-03 -1.400000e+00 -2.395429e-03 -1.500000e+00 -2.468657e-03 -1.600000e+00 -2.541417e-03 -1.700000e+00 -2.613906e-03 -1.800000e+00 -2.686291e-03 -2.000000e-01 -1.098652e-03 -3.000000e-01 -1.541458e-03 -4.000000e-01 -1.910282e-03 -5.000000e-01 -2.208338e-03 -6.000000e-01 -2.440120e-03 -7.000000e-01 -2.612598e-03 -8.000000e-01 -2.739200e-03 -9.000000e-01 -2.843043e-03 -1.000000e+00 -2.942371e-03 -1.100000e+00 -3.040108e-03 -1.200000e+00 -3.136374e-03 -1.300000e+00 -3.231076e-03 -1.400000e+00 -3.324231e-03 -1.500000e+00 -3.415956e-03 -1.600000e+00 -3.506424e-03 -1.700000e+00 -3.595833e-03 -1.800000e+00 -3.684377e-03 -2.000000e-01 -1.322430e-03 -3.000000e-01 -1.899458e-03 -4.000000e-01 -2.412072e-03 -5.000000e-01 -2.859788e-03 -6.000000e-01 -3.244570e-03 -7.000000e-01 -3.569554e-03 -8.000000e-01 -3.838558e-03 -9.000000e-01 -4.056630e-03 -1.000000e+00 -4.231194e-03 -1.100000e+00 -4.372757e-03 -1.200000e+00 -4.495916e-03 -1.300000e+00 -4.614453e-03 -1.400000e+00 -4.731151e-03 -1.500000e+00 -4.846368e-03 -1.600000e+00 -4.960129e-03 -1.700000e+00 -5.072423e-03 -1.800000e+00 -5.183280e-03 -2.000000e-01 -1.464950e-03 -3.000000e-01 -2.134599e-03 -4.000000e-01 -2.751822e-03 -5.000000e-01 -3.313188e-03 -6.000000e-01 -3.817938e-03 -7.000000e-01 -4.267112e-03 -8.000000e-01 -4.662809e-03 -9.000000e-01 -5.007700e-03 -1.000000e+00 -5.304899e-03 -1.100000e+00 -5.558205e-03 -1.200000e+00 -5.772511e-03 -1.300000e+00 -5.953992e-03 -1.400000e+00 -6.109943e-03 -1.500000e+00 -6.248940e-03 -1.600000e+00 -6.381031e-03 -1.700000e+00 -6.511008e-03 -1.800000e+00 -6.639395e-03 -2.000000e-01 -7.987137e-05 -3.000000e-01 -9.085765e-05 -4.000000e-01 -1.016418e-04 -5.000000e-01 -1.127065e-04 -6.000000e-01 -1.241393e-04 -7.000000e-01 -1.359664e-04 -8.000000e-01 -1.482060e-04 -9.000000e-01 -1.608784e-04 -1.000000e+00 -1.740049e-04 -1.100000e+00 -1.876070e-04 -1.200000e+00 -2.017064e-04 -1.300000e+00 -2.163251e-04 -1.400000e+00 -2.314851e-04 -1.500000e+00 -2.472090e-04 -1.600000e+00 -2.635203e-04 -1.700000e+00 -2.804433e-04 -1.800000e+00 -2.980035e-04 -2.000000e-01 -2.957676e-04 -3.000000e-01 -3.573364e-04 -4.000000e-01 -3.921527e-04 -5.000000e-01 -4.231669e-04 -6.000000e-01 -4.535211e-04 -7.000000e-01 -4.833226e-04 -8.000000e-01 -5.127950e-04 -9.000000e-01 -5.421783e-04 -1.000000e+00 -5.716701e-04 -1.100000e+00 -6.014214e-04 -1.200000e+00 -6.315463e-04 -1.300000e+00 -6.621324e-04 -1.400000e+00 -6.932486e-04 -1.500000e+00 -7.249514e-04 -1.600000e+00 -7.572881e-04 -1.700000e+00 -7.903002e-04 -1.800000e+00 -8.240247e-04 -2.000000e-01 -5.182834e-04 -3.000000e-01 -6.865355e-04 -4.000000e-01 -7.992469e-04 -5.000000e-01 -8.697982e-04 -6.000000e-01 -9.232361e-04 -7.000000e-01 -9.743031e-04 -8.000000e-01 -1.024596e-03 -9.000000e-01 -1.073961e-03 -1.000000e+00 -1.122462e-03 -1.100000e+00 -1.170294e-03 -1.200000e+00 -1.217688e-03 -1.300000e+00 -1.264854e-03 -1.400000e+00 -1.311973e-03 -1.500000e+00 -1.359197e-03 -1.600000e+00 -1.406648e-03 -1.700000e+00 -1.454426e-03 -1.800000e+00 -1.502617e-03 -2.000000e-01 -7.099220e-04 -3.000000e-01 -9.801755e-04 -4.000000e-01 -1.194259e-03 -5.000000e-01 -1.355188e-03 -6.000000e-01 -1.469548e-03 -7.000000e-01 -1.551926e-03 -8.000000e-01 -1.622152e-03 -9.000000e-01 -1.690398e-03 -1.000000e+00 -1.757902e-03 -1.100000e+00 -1.824472e-03 -1.200000e+00 -1.890024e-03 -1.300000e+00 -1.954627e-03 -1.400000e+00 -2.018427e-03 -1.500000e+00 -2.081602e-03 -1.600000e+00 -2.144324e-03 -1.700000e+00 -2.206755e-03 -1.800000e+00 -2.269041e-03 -2.000000e-01 -8.695681e-04 -3.000000e-01 -1.228335e-03 -4.000000e-01 -1.533662e-03 -5.000000e-01 -1.786646e-03 -6.000000e-01 -1.989728e-03 -7.000000e-01 -2.147105e-03 -8.000000e-01 -2.266620e-03 -9.000000e-01 -2.361076e-03 -1.000000e+00 -2.445672e-03 -1.100000e+00 -2.528247e-03 -1.200000e+00 -2.610045e-03 -1.300000e+00 -2.690971e-03 -1.400000e+00 -2.770901e-03 -1.500000e+00 -2.849815e-03 -1.600000e+00 -2.927776e-03 -1.700000e+00 -3.004892e-03 -1.800000e+00 -3.081294e-03 -2.000000e-01 -1.055064e-03 -3.000000e-01 -1.520952e-03 -4.000000e-01 -1.940089e-03 -5.000000e-01 -2.311154e-03 -6.000000e-01 -2.634577e-03 -7.000000e-01 -2.911967e-03 -8.000000e-01 -3.145769e-03 -9.000000e-01 -3.339432e-03 -1.000000e+00 -3.498001e-03 -1.100000e+00 -3.628495e-03 -1.200000e+00 -3.739796e-03 -1.300000e+00 -3.842012e-03 -1.400000e+00 -3.941692e-03 -1.500000e+00 -4.040364e-03 -1.600000e+00 -4.138198e-03 -1.700000e+00 -4.235128e-03 -1.800000e+00 -4.331102e-03 -2.000000e-01 -1.185713e-03 -3.000000e-01 -1.730740e-03 -4.000000e-01 -2.237072e-03 -5.000000e-01 -2.701725e-03 -6.000000e-01 -3.123363e-03 -7.000000e-01 -3.502013e-03 -8.000000e-01 -3.838690e-03 -9.000000e-01 -4.135081e-03 -1.000000e+00 -4.393390e-03 -1.100000e+00 -4.616410e-03 -1.200000e+00 -4.807739e-03 -1.300000e+00 -4.971894e-03 -1.400000e+00 -5.114186e-03 -1.500000e+00 -5.240488e-03 -1.600000e+00 -5.357202e-03 -1.700000e+00 -5.470062e-03 -1.800000e+00 -5.581449e-03 -2.000000e-01 -1.208707e-04 -3.000000e-01 -1.441316e-04 -4.000000e-01 -1.634607e-04 -5.000000e-01 -1.827895e-04 -6.000000e-01 -2.025319e-04 -7.000000e-01 -2.227747e-04 -8.000000e-01 -2.435828e-04 -9.000000e-01 -2.650136e-04 -1.000000e+00 -2.871168e-04 -1.100000e+00 -3.099356e-04 -1.200000e+00 -3.335088e-04 -1.300000e+00 -3.578717e-04 -1.400000e+00 -3.830582e-04 -1.500000e+00 -4.091013e-04 -1.600000e+00 -4.360343e-04 -1.700000e+00 -4.638906e-04 -1.800000e+00 -4.927047e-04 -2.000000e-01 -2.676524e-04 -3.000000e-01 -3.423971e-04 -4.000000e-01 -3.892042e-04 -5.000000e-01 -4.238673e-04 -6.000000e-01 -4.562316e-04 -7.000000e-01 -4.881506e-04 -8.000000e-01 -5.197683e-04 -9.000000e-01 -5.512118e-04 -1.000000e+00 -5.826467e-04 -1.100000e+00 -6.142307e-04 -1.200000e+00 -6.460963e-04 -1.300000e+00 -6.783503e-04 -1.400000e+00 -7.110786e-04 -1.500000e+00 -7.443508e-04 -1.600000e+00 -7.782247e-04 -1.700000e+00 -8.127493e-04 -1.800000e+00 -8.479677e-04 -2.000000e-01 -4.167972e-04 -3.000000e-01 -5.640670e-04 -4.000000e-01 -6.734075e-04 -5.000000e-01 -7.501865e-04 -6.000000e-01 -8.054820e-04 -7.000000e-01 -8.522706e-04 -8.000000e-01 -8.973748e-04 -9.000000e-01 -9.420056e-04 -1.000000e+00 -9.861470e-04 -1.100000e+00 -1.029802e-03 -1.200000e+00 -1.073064e-03 -1.300000e+00 -1.116070e-03 -1.400000e+00 -1.158960e-03 -1.500000e+00 -1.201863e-03 -1.600000e+00 -1.244894e-03 -1.700000e+00 -1.288151e-03 -1.800000e+00 -1.331716e-03 -2.000000e-01 -5.516606e-04 -3.000000e-01 -7.695340e-04 -4.000000e-01 -9.488097e-04 -5.000000e-01 -1.091148e-03 -6.000000e-01 -1.199881e-03 -7.000000e-01 -1.281709e-03 -8.000000e-01 -1.346851e-03 -9.000000e-01 -1.405328e-03 -1.000000e+00 -1.462289e-03 -1.100000e+00 -1.518804e-03 -1.200000e+00 -1.574843e-03 -1.300000e+00 -1.630325e-03 -1.400000e+00 -1.685260e-03 -1.500000e+00 -1.739714e-03 -1.600000e+00 -1.793787e-03 -1.700000e+00 -1.847589e-03 -1.800000e+00 -1.901229e-03 -2.000000e-01 -6.693615e-04 -3.000000e-01 -9.510757e-04 -4.000000e-01 -1.195710e-03 -5.000000e-01 -1.403560e-03 -6.000000e-01 -1.575967e-03 -7.000000e-01 -1.715408e-03 -8.000000e-01 -1.826184e-03 -9.000000e-01 -1.914983e-03 -1.000000e+00 -1.990178e-03 -1.100000e+00 -2.059511e-03 -1.200000e+00 -2.127205e-03 -1.300000e+00 -2.194399e-03 -1.400000e+00 -2.261153e-03 -1.500000e+00 -2.327378e-03 -1.600000e+00 -2.393027e-03 -1.700000e+00 -2.458113e-03 -1.800000e+00 -2.522684e-03 -2.000000e-01 -8.145887e-04 -3.000000e-01 -1.177441e-03 -4.000000e-01 -1.507330e-03 -5.000000e-01 -1.803048e-03 -6.000000e-01 -2.064456e-03 -7.000000e-01 -2.292340e-03 -8.000000e-01 -2.488230e-03 -9.000000e-01 -2.654389e-03 -1.000000e+00 -2.794039e-03 -1.100000e+00 -2.911534e-03 -1.200000e+00 -3.012177e-03 -1.300000e+00 -3.101737e-03 -1.400000e+00 -3.185609e-03 -1.500000e+00 -3.267309e-03 -1.600000e+00 -3.348216e-03 -1.700000e+00 -3.428654e-03 -1.800000e+00 -3.508617e-03 -2.000000e-01 -9.259241e-04 -3.000000e-01 -1.352863e-03 -4.000000e-01 -1.751832e-03 -5.000000e-01 -2.120711e-03 -6.000000e-01 -2.458272e-03 -7.000000e-01 -2.764178e-03 -8.000000e-01 -3.038859e-03 -9.000000e-01 -3.283341e-03 -1.000000e+00 -3.499125e-03 -1.100000e+00 -3.688174e-03 -1.200000e+00 -3.852989e-03 -1.300000e+00 -3.996656e-03 -1.400000e+00 -4.122764e-03 -1.500000e+00 -4.235185e-03 -1.600000e+00 -4.337848e-03 -1.700000e+00 -4.434496e-03 -1.800000e+00 -4.528122e-03 ngspice-26/tests/hisim/pmos/reference/80_noise_COIGN=0_T150.standard0000644000265600020320000000353212264261473024376 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/pmos/reference/48_acFreq_COIIGS=0.standard0000644000265600020320000002530212264261473024072 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/8_dcSweep_COIIGS=0.standard0000644000265600020320000002266112264261473024204 0ustar andreasadminV(d) I(g) -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 -2.000000e-01 0.000000e+00 -3.000000e-01 0.000000e+00 -4.000000e-01 0.000000e+00 -5.000000e-01 0.000000e+00 -6.000000e-01 0.000000e+00 -7.000000e-01 0.000000e+00 -8.000000e-01 0.000000e+00 -9.000000e-01 0.000000e+00 -1.000000e+00 0.000000e+00 -1.100000e+00 0.000000e+00 -1.200000e+00 0.000000e+00 -1.300000e+00 0.000000e+00 -1.400000e+00 0.000000e+00 -1.500000e+00 0.000000e+00 -1.600000e+00 0.000000e+00 -1.700000e+00 0.000000e+00 -1.800000e+00 0.000000e+00 ngspice-26/tests/hisim/pmos/reference/37_acVd_CORSRD=-1_PT.standard0000644000265600020320000000723112264261473024245 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.2 3.070827e-04 3.168838e-03 9.46321356220637e-15 1.68777245697176e-14 -0.3 5.291150e-04 2.825787e-03 9.77419564640612e-15 1.60269443393651e-14 -0.4 8.001052e-04 2.438303e-03 1.01167527391549e-14 1.49046540355001e-14 -0.5 1.115874e-03 2.021390e-03 1.04844428387086e-14 1.3431373636603e-14 -0.6 1.469285e-03 1.589588e-03 1.08491229374474e-14 1.14664831046003e-14 -0.7 1.848942e-03 1.159338e-03 1.112244301145e-14 8.94694742242506e-15 -0.8 2.210602e-03 7.816956e-04 1.11623330222504e-14 6.50451776112657e-15 -0.9 2.440552e-03 5.688505e-04 1.10332729873068e-14 5.09558837965279e-15 -1 2.511867e-03 5.274743e-04 1.09398129620021e-14 4.69290827062539e-15 -1.1 2.557430e-03 5.123288e-04 1.08775529451449e-14 4.54927823173693e-15 -1.2 2.603894e-03 4.967127e-04 1.08137829278789e-14 4.38816018811352e-15 -1.3 2.651098e-03 4.808222e-04 1.07479629100579e-14 4.20927313967907e-15 -1.4 2.697314e-03 4.660078e-04 1.06800428916682e-14 3.99581908188545e-15 -1.5 2.741411e-03 4.529974e-04 1.06119628732353e-14 3.76966902065434e-15 -1.6 2.782891e-03 4.419930e-04 1.05456728552869e-14 3.55601796280738e-15 -1.7 2.821666e-03 4.329098e-04 1.04813228378639e-14 3.3514529074205e-15 -1.8 2.857869e-03 4.255407e-04 1.04204828213912e-14 3.18173586146887e-15 -0.2 2.915935e-04 2.732975e-03 9.95107969429825e-15 1.61176843639334e-14 -0.3 4.857969e-04 2.445072e-03 1.02601427779784e-14 1.53109441455049e-14 -0.4 7.128917e-04 2.129670e-03 1.0592242867896e-14 1.42711338639718e-14 -0.5 9.694648e-04 1.796161e-03 1.09460329636862e-14 1.29404335036788e-14 -0.6 1.250144e-03 1.454353e-03 1.13013030598771e-14 1.12279430400146e-14 -0.7 1.546903e-03 1.115750e-03 1.15935831390132e-14 9.09520346256603e-15 -0.8 1.836650e-03 8.082013e-04 1.17073731698224e-14 6.90403786929838e-15 -0.9 2.066424e-03 5.863588e-04 1.16347031501466e-14 5.37373445496205e-15 -1 2.182762e-03 4.940747e-04 1.15206431192644e-14 4.64186525680527e-15 -1.1 2.229434e-03 4.747444e-04 1.14507431003387e-14 4.39589919020889e-15 -1.2 2.266754e-03 4.648479e-04 1.13937830849165e-14 4.23321614616174e-15 -1.3 2.305611e-03 4.538406e-04 1.13365330694158e-14 4.07320910283914e-15 -1.4 2.345334e-03 4.423353e-04 1.1277303053379e-14 3.88769705261094e-15 -1.5 2.384596e-03 4.313781e-04 1.12172330371148e-14 3.68818899859327e-15 -1.6 2.422514e-03 4.215541e-04 1.11579430210618e-14 3.49665394673431e-15 -1.7 2.458635e-03 4.130870e-04 1.11000630053905e-14 3.31611189785177e-15 -1.8 2.492792e-03 4.059900e-04 1.10438629901741e-14 3.14630485187577e-15 -0.2 2.600396e-04 2.764567e-03 7.0775439162759e-15 1.42371738547769e-14 -0.3 4.383949e-04 2.254702e-03 8.24029523109589e-15 1.38747737566555e-14 -0.4 6.263702e-04 1.924817e-03 9.26224350779285e-15 1.31877335706364e-14 -0.5 8.260413e-04 1.624089e-03 1.01096427372299e-14 1.21788832974858e-14 -0.6 1.036667e-03 1.339680e-03 1.07959429230487e-14 1.08244229307597e-14 -0.7 1.254457e-03 1.071379e-03 1.13251930663454e-14 9.12920447177195e-15 -0.8 1.469055e-03 8.282637e-04 1.16571131562143e-14 7.288262973329e-15 -0.9 1.658075e-03 6.322471e-04 1.1772523187462e-14 5.75369355783764e-15 -1 1.794827e-03 5.055302e-04 1.17583531836254e-14 4.79799829907898e-15 -1.1 1.869935e-03 4.489661e-04 1.17209131734884e-14 4.29199216207561e-15 -1.2 1.907163e-03 4.320105e-04 1.17020831683901e-14 4.04541409531352e-15 -1.3 1.935030e-03 4.245511e-04 1.1690903165363e-14 3.89530805467165e-15 -1.4 1.962980e-03 4.173893e-04 1.16765031614642e-14 3.74010101264867e-15 -1.5 1.991791e-03 4.097803e-04 1.1657633156355e-14 3.57350296754152e-15 -1.6 2.020753e-03 4.022655e-04 1.16353331503172e-14 3.40738992256569e-15 -1.7 2.049184e-03 3.953078e-04 1.1610823143681e-14 3.25222688055462e-15 -1.8 2.076631e-03 3.891612e-04 1.15847831366306e-14 3.10585284092321e-15 ngspice-26/tests/hisim/pmos/reference/6_dcSweep_COISUB=0.standard0000644000265600020320000002266112264261473024211 0ustar andreasadminV(d) I(b) -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 -2.000000e-01 2.000000e-16 -3.000000e-01 3.000000e-16 -4.000000e-01 4.000000e-16 -5.000000e-01 5.000000e-16 -6.000000e-01 6.000000e-16 -7.000000e-01 7.000000e-16 -8.000000e-01 8.000000e-16 -9.000000e-01 9.000000e-16 -1.000000e+00 1.000000e-15 -1.100000e+00 1.100000e-15 -1.200000e+00 1.200000e-15 -1.300000e+00 1.300000e-15 -1.400000e+00 1.400000e-15 -1.500000e+00 1.500000e-15 -1.600000e+00 1.600000e-15 -1.700000e+00 1.700000e-15 -1.800000e+00 1.800000e-15 ngspice-26/tests/hisim/pmos/reference/51_acFreq_COGIDL=1.standard0000644000265600020320000002530212264261473024051 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/11_dcSweep_COGIDL=1.standard0000644000265600020320000003447412264261473024250 0ustar andreasadminV(d) I(d) I(b) -2.000000e-01 -4.699615e-05 1.157845e-13 -3.000000e-01 -5.356444e-05 1.565528e-12 -4.000000e-01 -6.033219e-05 9.717824e-12 -5.000000e-01 -6.744934e-05 3.783540e-11 -6.000000e-01 -7.492430e-05 1.078206e-10 -7.000000e-01 -8.274251e-05 2.462661e-10 -8.000000e-01 -9.089919e-05 4.785897e-10 -9.000000e-01 -9.939911e-05 8.251033e-10 -1.000000e+00 -1.082525e-04 1.300187e-09 -1.100000e+00 -1.174723e-04 1.913389e-09 -1.200000e+00 -1.270734e-04 2.670997e-09 -1.300000e+00 -1.370714e-04 3.577324e-09 -1.400000e+00 -1.474833e-04 4.635554e-09 -1.500000e+00 -1.583268e-04 5.848224e-09 -1.600000e+00 -1.696209e-04 7.217488e-09 -1.700000e+00 -1.813855e-04 8.745252e-09 -1.800000e+00 -1.936419e-04 1.043324e-08 -2.000000e-01 -3.236954e-04 3.074996e-16 -3.000000e-01 -3.722842e-04 2.406654e-14 -4.000000e-01 -4.052186e-04 5.485023e-13 -5.000000e-01 -4.371928e-04 4.469358e-12 -6.000000e-01 -4.684500e-04 2.026539e-11 -7.000000e-01 -4.993045e-04 6.338027e-11 -8.000000e-01 -5.300659e-04 1.541458e-10 -9.000000e-01 -5.609686e-04 3.139623e-10 -1.000000e+00 -5.921831e-04 5.622460e-10 -1.100000e+00 -6.238337e-04 9.150864e-10 -1.200000e+00 -6.560141e-04 1.385201e-09 -1.300000e+00 -6.887971e-04 1.982474e-09 -1.400000e+00 -7.222419e-04 2.714613e-09 -1.500000e+00 -7.563980e-04 3.587705e-09 -1.600000e+00 -7.913090e-04 4.606652e-09 -1.700000e+00 -8.270140e-04 5.775470e-09 -1.800000e+00 -8.635493e-04 7.097510e-09 -2.000000e-01 -6.362416e-04 2.000000e-16 -3.000000e-01 -8.252108e-04 3.000001e-16 -4.000000e-01 -9.384887e-04 5.643185e-16 -5.000000e-01 -1.006766e-03 4.170752e-14 -6.000000e-01 -1.066911e-03 8.739416e-13 -7.000000e-01 -1.125791e-03 6.359450e-12 -8.000000e-01 -1.183256e-03 2.602827e-11 -9.000000e-01 -1.239416e-03 7.499540e-11 -1.000000e+00 -1.294578e-03 1.715208e-10 -1.100000e+00 -1.349078e-03 3.342344e-10 -1.200000e+00 -1.403216e-03 5.802777e-10 -1.300000e+00 -1.457237e-03 9.244940e-10 -1.400000e+00 -1.511338e-03 1.379316e-09 -1.500000e+00 -1.565676e-03 1.954994e-09 -1.600000e+00 -1.620375e-03 2.659938e-09 -1.700000e+00 -1.675536e-03 3.501059e-09 -1.800000e+00 -1.731241e-03 4.484063e-09 -2.000000e-01 -8.942919e-04 2.000000e-16 -3.000000e-01 -1.221693e-03 3.000000e-16 -4.000000e-01 -1.471297e-03 4.000000e-16 -5.000000e-01 -1.648885e-03 5.000000e-16 -6.000000e-01 -1.767189e-03 6.500217e-16 -7.000000e-01 -1.854914e-03 3.160399e-14 -8.000000e-01 -1.937134e-03 8.133973e-13 -9.000000e-01 -2.017933e-03 6.237099e-12 -1.000000e+00 -2.097230e-03 2.568351e-11 -1.100000e+00 -2.174954e-03 7.353914e-11 -1.200000e+00 -2.251232e-03 1.668683e-10 -1.300000e+00 -2.326297e-03 3.230975e-10 -1.400000e+00 -2.400412e-03 5.585112e-10 -1.500000e+00 -2.473831e-03 8.875468e-10 -1.600000e+00 -2.546780e-03 1.322619e-09 -1.700000e+00 -2.619457e-03 1.874225e-09 -1.800000e+00 -2.692027e-03 2.551170e-09 -2.000000e-01 -1.099660e-03 2.000000e-16 -3.000000e-01 -1.542998e-03 3.000000e-16 -4.000000e-01 -1.912357e-03 4.000000e-16 -5.000000e-01 -2.210948e-03 5.000000e-16 -6.000000e-01 -2.443263e-03 6.000000e-16 -7.000000e-01 -2.616248e-03 7.000000e-16 -8.000000e-01 -2.743263e-03 8.043190e-16 -9.000000e-01 -2.847346e-03 1.436709e-14 -1.000000e+00 -2.946865e-03 5.470598e-13 -1.100000e+00 -3.044792e-03 4.929101e-12 -1.200000e+00 -3.141252e-03 2.183415e-11 -1.300000e+00 -3.236151e-03 6.492347e-11 -1.400000e+00 -3.329502e-03 1.505931e-10 -1.500000e+00 -3.421423e-03 2.957585e-10 -1.600000e+00 -3.512085e-03 5.164144e-10 -1.700000e+00 -3.601686e-03 8.269284e-10 -1.800000e+00 -3.690420e-03 1.239822e-09 -2.000000e-01 -1.323288e-03 2.000000e-16 -3.000000e-01 -1.900779e-03 3.000000e-16 -4.000000e-01 -2.413864e-03 4.000000e-16 -5.000000e-01 -2.862055e-03 5.000000e-16 -6.000000e-01 -3.247311e-03 6.000000e-16 -7.000000e-01 -3.572769e-03 7.000000e-16 -8.000000e-01 -3.842246e-03 8.000000e-16 -9.000000e-01 -4.060779e-03 9.000000e-16 -1.000000e+00 -4.235768e-03 1.000000e-15 -1.100000e+00 -4.377686e-03 1.100005e-15 -1.200000e+00 -4.501075e-03 2.864238e-15 -1.300000e+00 -4.619790e-03 2.003258e-13 -1.400000e+00 -4.736666e-03 2.700444e-12 -1.500000e+00 -4.852063e-03 1.452033e-11 -1.600000e+00 -4.966006e-03 4.804823e-11 -1.700000e+00 -5.078485e-03 1.189690e-10 -1.800000e+00 -5.189527e-03 2.439274e-10 -2.000000e-01 -1.465681e-03 2.000000e-16 -3.000000e-01 -2.135731e-03 3.000000e-16 -4.000000e-01 -2.753367e-03 4.000000e-16 -5.000000e-01 -3.315155e-03 5.000000e-16 -6.000000e-01 -3.820331e-03 6.000000e-16 -7.000000e-01 -4.269931e-03 7.000000e-16 -8.000000e-01 -4.666054e-03 8.000000e-16 -9.000000e-01 -5.011370e-03 9.000000e-16 -1.000000e+00 -5.308993e-03 1.000000e-15 -1.100000e+00 -5.562716e-03 1.100000e-15 -1.200000e+00 -5.777420e-03 1.200000e-15 -1.300000e+00 -5.959268e-03 1.300000e-15 -1.400000e+00 -6.115539e-03 1.400000e-15 -1.500000e+00 -6.254781e-03 1.560710e-15 -1.600000e+00 -6.387042e-03 4.821106e-14 -1.700000e+00 -6.517185e-03 1.179422e-12 -1.800000e+00 -6.645738e-03 8.412147e-12 -2.000000e-01 -8.053777e-05 1.157845e-13 -3.000000e-01 -9.162409e-05 1.565528e-12 -4.000000e-01 -1.024997e-04 9.717824e-12 -5.000000e-01 -1.136549e-04 3.783540e-11 -6.000000e-01 -1.251791e-04 1.078206e-10 -7.000000e-01 -1.370997e-04 2.462661e-10 -8.000000e-01 -1.494361e-04 4.785897e-10 -9.000000e-01 -1.622088e-04 8.251033e-10 -1.000000e+00 -1.754395e-04 1.300187e-09 -1.100000e+00 -1.891504e-04 1.913389e-09 -1.200000e+00 -2.033633e-04 2.670997e-09 -1.300000e+00 -2.181006e-04 3.577324e-09 -1.400000e+00 -2.333846e-04 4.635554e-09 -1.500000e+00 -2.492382e-04 5.848224e-09 -1.600000e+00 -2.656853e-04 7.217488e-09 -1.700000e+00 -2.827505e-04 8.745252e-09 -1.800000e+00 -3.004597e-04 1.043324e-08 -2.000000e-01 -2.967540e-04 3.074996e-16 -3.000000e-01 -3.587330e-04 2.406654e-14 -4.000000e-01 -3.937602e-04 5.485023e-13 -5.000000e-01 -4.249225e-04 4.469358e-12 -6.000000e-01 -4.554245e-04 2.026539e-11 -7.000000e-01 -4.853715e-04 6.338027e-11 -8.000000e-01 -5.149863e-04 1.541458e-10 -9.000000e-01 -5.445100e-04 3.139623e-10 -1.000000e+00 -5.741413e-04 5.622460e-10 -1.100000e+00 -6.040324e-04 9.150864e-10 -1.200000e+00 -6.342983e-04 1.385201e-09 -1.300000e+00 -6.650274e-04 1.982474e-09 -1.400000e+00 -6.962894e-04 2.714613e-09 -1.500000e+00 -7.281410e-04 3.587705e-09 -1.600000e+00 -7.606301e-04 4.606652e-09 -1.700000e+00 -7.937985e-04 5.775470e-09 -1.800000e+00 -8.276836e-04 7.097510e-09 -2.000000e-01 -5.192224e-04 2.000000e-16 -3.000000e-01 -6.879597e-04 3.000001e-16 -4.000000e-01 -8.011363e-04 5.643185e-16 -5.000000e-01 -8.720396e-04 4.170752e-14 -6.000000e-01 -9.256745e-04 8.739416e-13 -7.000000e-01 -9.769033e-04 6.359450e-12 -8.000000e-01 -1.027362e-03 2.602827e-11 -9.000000e-01 -1.076896e-03 7.499540e-11 -1.000000e+00 -1.125564e-03 1.715208e-10 -1.100000e+00 -1.173562e-03 3.342344e-10 -1.200000e+00 -1.221119e-03 5.802777e-10 -1.300000e+00 -1.268447e-03 9.244940e-10 -1.400000e+00 -1.315728e-03 1.379316e-09 -1.500000e+00 -1.363112e-03 1.954994e-09 -1.600000e+00 -1.410723e-03 2.659938e-09 -1.700000e+00 -1.458664e-03 3.501059e-09 -1.800000e+00 -1.507018e-03 4.484063e-09 -2.000000e-01 -7.107833e-04 2.000000e-16 -3.000000e-01 -9.814930e-04 3.000000e-16 -4.000000e-01 -1.196037e-03 4.000000e-16 -5.000000e-01 -1.357425e-03 5.000000e-16 -6.000000e-01 -1.472204e-03 6.500217e-16 -7.000000e-01 -1.554887e-03 3.160399e-14 -8.000000e-01 -1.625302e-03 8.133973e-13 -9.000000e-01 -1.693712e-03 6.237099e-12 -1.000000e+00 -1.761384e-03 2.568351e-11 -1.100000e+00 -1.828127e-03 7.353914e-11 -1.200000e+00 -1.893853e-03 1.668683e-10 -1.300000e+00 -1.958630e-03 3.230975e-10 -1.400000e+00 -2.022603e-03 5.585112e-10 -1.500000e+00 -2.085949e-03 8.875468e-10 -1.600000e+00 -2.148842e-03 1.322619e-09 -1.700000e+00 -2.211443e-03 1.874225e-09 -1.800000e+00 -2.273897e-03 2.551170e-09 -2.000000e-01 -8.703534e-04 2.000000e-16 -3.000000e-01 -1.229542e-03 3.000000e-16 -4.000000e-01 -1.535299e-03 4.000000e-16 -5.000000e-01 -1.788717e-03 5.000000e-16 -6.000000e-01 -1.992234e-03 6.000000e-16 -7.000000e-01 -2.150032e-03 7.000000e-16 -8.000000e-01 -2.269922e-03 8.043190e-16 -9.000000e-01 -2.364654e-03 1.436709e-14 -1.000000e+00 -2.449433e-03 5.470598e-13 -1.100000e+00 -2.532170e-03 4.929101e-12 -1.200000e+00 -2.614133e-03 2.183415e-11 -1.300000e+00 -2.695229e-03 6.492347e-11 -1.400000e+00 -2.775330e-03 1.505931e-10 -1.500000e+00 -2.854418e-03 2.957585e-10 -1.600000e+00 -2.932552e-03 5.164144e-10 -1.700000e+00 -3.009842e-03 8.269284e-10 -1.800000e+00 -3.086416e-03 1.239822e-09 -2.000000e-01 -1.055746e-03 2.000000e-16 -3.000000e-01 -1.522006e-03 3.000000e-16 -4.000000e-01 -1.941527e-03 4.000000e-16 -5.000000e-01 -2.312983e-03 5.000000e-16 -6.000000e-01 -2.636801e-03 6.000000e-16 -7.000000e-01 -2.914587e-03 7.000000e-16 -8.000000e-01 -3.148785e-03 8.000000e-16 -9.000000e-01 -3.342837e-03 9.000000e-16 -1.000000e+00 -3.501773e-03 1.000000e-15 -1.100000e+00 -3.632590e-03 1.100005e-15 -1.200000e+00 -3.744148e-03 2.864238e-15 -1.300000e+00 -3.846545e-03 2.003258e-13 -1.400000e+00 -3.946382e-03 2.700444e-12 -1.500000e+00 -4.045210e-03 1.452033e-11 -1.600000e+00 -4.143203e-03 4.804823e-11 -1.700000e+00 -4.240297e-03 1.189690e-10 -1.800000e+00 -4.336435e-03 2.439274e-10 -2.000000e-01 -1.186306e-03 2.000000e-16 -3.000000e-01 -1.731660e-03 3.000000e-16 -4.000000e-01 -2.238332e-03 4.000000e-16 -5.000000e-01 -2.703337e-03 5.000000e-16 -6.000000e-01 -3.125332e-03 6.000000e-16 -7.000000e-01 -3.504342e-03 7.000000e-16 -8.000000e-01 -3.841383e-03 8.000000e-16 -9.000000e-01 -4.138137e-03 9.000000e-16 -1.000000e+00 -4.396808e-03 1.000000e-15 -1.100000e+00 -4.620185e-03 1.100000e-15 -1.200000e+00 -4.811857e-03 1.200000e-15 -1.300000e+00 -4.976335e-03 1.300000e-15 -1.400000e+00 -5.118917e-03 1.400000e-15 -1.500000e+00 -5.245465e-03 1.560710e-15 -1.600000e+00 -5.362370e-03 4.821106e-14 -1.700000e+00 -5.475384e-03 1.179422e-12 -1.800000e+00 -5.586920e-03 8.412147e-12 -2.000000e-01 -1.215310e-04 1.157845e-13 -3.000000e-01 -1.449795e-04 1.565528e-12 -4.000000e-01 -1.644397e-04 9.717824e-12 -5.000000e-01 -1.838944e-04 3.783540e-11 -6.000000e-01 -2.037632e-04 1.078206e-10 -7.000000e-01 -2.241342e-04 2.462661e-10 -8.000000e-01 -2.450733e-04 4.785897e-10 -9.000000e-01 -2.666389e-04 8.251033e-10 -1.000000e+00 -2.888816e-04 1.300187e-09 -1.100000e+00 -3.118453e-04 1.913389e-09 -1.200000e+00 -3.355690e-04 2.670997e-09 -1.300000e+00 -3.600888e-04 3.577324e-09 -1.400000e+00 -3.854389e-04 4.635554e-09 -1.500000e+00 -4.116527e-04 5.848224e-09 -1.600000e+00 -4.387639e-04 7.217488e-09 -1.700000e+00 -4.668063e-04 8.745252e-09 -1.800000e+00 -4.958149e-04 1.043324e-08 -2.000000e-01 -2.683866e-04 3.074996e-16 -3.000000e-01 -3.434866e-04 2.406654e-14 -4.000000e-01 -3.905718e-04 5.485023e-13 -5.000000e-01 -4.254121e-04 4.469358e-12 -6.000000e-01 -4.579229e-04 2.026539e-11 -7.000000e-01 -4.899889e-04 6.338027e-11 -8.000000e-01 -5.217548e-04 1.541458e-10 -9.000000e-01 -5.533464e-04 3.139623e-10 -1.000000e+00 -5.849292e-04 5.622460e-10 -1.100000e+00 -6.166615e-04 9.150864e-10 -1.200000e+00 -6.486766e-04 1.385201e-09 -1.300000e+00 -6.810819e-04 1.982474e-09 -1.400000e+00 -7.139640e-04 2.714613e-09 -1.500000e+00 -7.473930e-04 3.587705e-09 -1.600000e+00 -7.814271e-04 4.606652e-09 -1.700000e+00 -8.161159e-04 5.775470e-09 -1.800000e+00 -8.515027e-04 7.097510e-09 -2.000000e-01 -4.174948e-04 2.000000e-16 -3.000000e-01 -5.651320e-04 3.000001e-16 -4.000000e-01 -6.748377e-04 5.643185e-16 -5.000000e-01 -7.519469e-04 4.170752e-14 -6.000000e-01 -8.074889e-04 8.739416e-13 -7.000000e-01 -8.544460e-04 6.359450e-12 -8.000000e-01 -8.996976e-04 2.602827e-11 -9.000000e-01 -9.444787e-04 7.499540e-11 -1.000000e+00 -9.887738e-04 1.715208e-10 -1.100000e+00 -1.032584e-03 3.342344e-10 -1.200000e+00 -1.076002e-03 5.802777e-10 -1.300000e+00 -1.119163e-03 9.244940e-10 -1.400000e+00 -1.162208e-03 1.379316e-09 -1.500000e+00 -1.205266e-03 1.954994e-09 -1.600000e+00 -1.248453e-03 2.659938e-09 -1.700000e+00 -1.291867e-03 3.501059e-09 -1.800000e+00 -1.335591e-03 4.484063e-09 -2.000000e-01 -5.523075e-04 2.000000e-16 -3.000000e-01 -7.705283e-04 3.000000e-16 -4.000000e-01 -9.501590e-04 4.000000e-16 -5.000000e-01 -1.092854e-03 5.000000e-16 -6.000000e-01 -1.201930e-03 6.500217e-16 -7.000000e-01 -1.284056e-03 3.160399e-14 -8.000000e-01 -1.349422e-03 8.133973e-13 -9.000000e-01 -1.408062e-03 6.237099e-12 -1.000000e+00 -1.465169e-03 2.568351e-11 -1.100000e+00 -1.521831e-03 7.353914e-11 -1.200000e+00 -1.578021e-03 1.668683e-10 -1.300000e+00 -1.633658e-03 3.230975e-10 -1.400000e+00 -1.688748e-03 5.585112e-10 -1.500000e+00 -1.743358e-03 8.875468e-10 -1.600000e+00 -1.797588e-03 1.322619e-09 -1.700000e+00 -1.851547e-03 1.874225e-09 -1.800000e+00 -1.905343e-03 2.551170e-09 -2.000000e-01 -6.699586e-04 2.000000e-16 -3.000000e-01 -9.519966e-04 3.000000e-16 -4.000000e-01 -1.196965e-03 4.000000e-16 -5.000000e-01 -1.405155e-03 5.000000e-16 -6.000000e-01 -1.577904e-03 6.000000e-16 -7.000000e-01 -1.717682e-03 7.000000e-16 -8.000000e-01 -1.828773e-03 8.043190e-16 -9.000000e-01 -1.917844e-03 1.436709e-14 -1.000000e+00 -1.993249e-03 5.470598e-13 -1.100000e+00 -2.062742e-03 4.929101e-12 -1.200000e+00 -2.130579e-03 2.183415e-11 -1.300000e+00 -2.197915e-03 6.492347e-11 -1.400000e+00 -2.264816e-03 1.505931e-10 -1.500000e+00 -2.331191e-03 2.957585e-10 -1.600000e+00 -2.396993e-03 5.164144e-10 -1.700000e+00 -2.462232e-03 8.269284e-10 -1.800000e+00 -2.526957e-03 1.239822e-09 -2.000000e-01 -8.151175e-04 2.000000e-16 -3.000000e-01 -1.178259e-03 3.000000e-16 -4.000000e-01 -1.508450e-03 4.000000e-16 -5.000000e-01 -1.804478e-03 5.000000e-16 -6.000000e-01 -2.066202e-03 6.000000e-16 -7.000000e-01 -2.294404e-03 7.000000e-16 -8.000000e-01 -2.490612e-03 8.000000e-16 -9.000000e-01 -2.657086e-03 9.000000e-16 -1.000000e+00 -2.797037e-03 1.000000e-15 -1.100000e+00 -2.914811e-03 1.100005e-15 -1.200000e+00 -3.015698e-03 2.864238e-15 -1.300000e+00 -3.105458e-03 2.003258e-13 -1.400000e+00 -3.189490e-03 2.700444e-12 -1.500000e+00 -3.271330e-03 1.452033e-11 -1.600000e+00 -3.352374e-03 4.804823e-11 -1.700000e+00 -3.432950e-03 1.189690e-10 -1.800000e+00 -3.513054e-03 2.439274e-10 -2.000000e-01 -9.263926e-04 2.000000e-16 -3.000000e-01 -1.353590e-03 3.000000e-16 -4.000000e-01 -1.752829e-03 4.000000e-16 -5.000000e-01 -2.121990e-03 5.000000e-16 -6.000000e-01 -2.459839e-03 6.000000e-16 -7.000000e-01 -2.766039e-03 7.000000e-16 -8.000000e-01 -3.041016e-03 8.000000e-16 -9.000000e-01 -3.285795e-03 9.000000e-16 -1.000000e+00 -3.501875e-03 1.000000e-15 -1.100000e+00 -3.691217e-03 1.100000e-15 -1.200000e+00 -3.856317e-03 1.200000e-15 -1.300000e+00 -4.000255e-03 1.300000e-15 -1.400000e+00 -4.126613e-03 1.400000e-15 -1.500000e+00 -4.239259e-03 1.560710e-15 -1.600000e+00 -4.342117e-03 4.821106e-14 -1.700000e+00 -4.438929e-03 1.179422e-12 -1.800000e+00 -4.532697e-03 8.412147e-12 ngspice-26/tests/hisim/pmos/reference/62_acFreq_COFLICK=0.standard0000644000265600020320000002530212264261473024163 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/59_acFreq_CORG=1.standard0000644000265600020320000002530212264261473023652 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.4956133900954e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171509161677e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788612390417e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171495273267e-14 1.69788618432594e-14 3.49561359533879e-15 158489.3 2.11171394560372e-14 1.69788516512274e-14 3.49561290773753e-15 199526.2 2.11171355364927e-14 1.69788527206983e-14 3.49561180188918e-15 251188.6 2.11171318620462e-14 1.69788458436301e-14 3.49561048044418e-15 316227.8 2.11171084137828e-14 1.69788246236571e-14 3.49560649509855e-15 398107.2 2.11170843064555e-14 1.69788068036349e-14 3.49560259605936e-15 501187.2 2.11170501214628e-14 1.69787793694471e-14 3.49559798347968e-15 630957.3 2.11169894802614e-14 1.69787313677441e-14 3.49558681430364e-15 794328.2 2.11168851109813e-14 1.69786528602623e-14 3.4955700547666e-15 1000000 2.11167415114099e-14 1.69785220050889e-14 3.49554547991819e-15 1258925 2.11165047786643e-14 1.69783435159033e-14 3.49550613722839e-15 1584893 2.11161151721142e-14 1.69780282072893e-14 3.49544219375037e-15 1995262 2.11155083011526e-14 1.69775365744673e-14 3.49534139366355e-15 2511886 2.11145404079864e-14 1.69767612754499e-14 3.49518216187586e-15 3162278 2.11130065834371e-14 1.69755280606186e-14 3.49492805739229e-15 3981072 2.11105878958775e-14 1.69735816906347e-14 3.49452719024676e-15 5011872 2.11067517842258e-14 1.69705006876164e-14 3.49389270839603e-15 6309573 2.11006743639783e-14 1.6965612177919e-14 3.4928852853087e-15 7943282 2.10910381277584e-14 1.69578730879363e-14 3.49129227886111e-15 10000000 2.10758068600467e-14 1.69456246783518e-14 3.48877025399077e-15 12589250 2.10517012170312e-14 1.69262452955581e-14 3.48478055359798e-15 15848930 2.10136064438226e-14 1.68956034774875e-14 3.4784732234264e-15 19952620 2.09535106417348e-14 1.68472859574683e-14 3.46852551245666e-15 25118860 2.08589685474579e-14 1.67712697398326e-14 3.45287556553674e-15 31622780 2.07108510573335e-14 1.66521830392801e-14 3.42835761569563e-15 39810720 2.04803801007393e-14 1.64668776567181e-14 3.39020603017982e-15 50118720 2.01254310725419e-14 1.61814854666505e-14 3.33145017277416e-15 63095730 1.95873968799981e-14 1.57488899314246e-14 3.24238720741072e-15 79432820 1.87912036152189e-14 1.51087258098351e-14 3.11059025969352e-15 100000000 1.76538800906051e-14 1.41942861207819e-14 2.92232507913127e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486934268242e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.68486946936839e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486972676341e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486966329882e-14 3.40873220570619e-15 100000 2.08987947323399e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873308097849e-15 158489.3 2.08987962664561e-14 1.68486872570155e-14 3.40873153867082e-15 199526.2 2.08987908651034e-14 1.68486898467813e-14 3.40873099502459e-15 251188.6 2.08987844333058e-14 1.68486775497314e-14 3.40872960706177e-15 316227.8 2.0898765216374e-14 1.68486632293002e-14 3.40872620533182e-15 398107.2 2.08987409463779e-14 1.68486467201904e-14 3.40872259933302e-15 501187.2 2.08987050484619e-14 1.68486163891796e-14 3.40871786986044e-15 630957.3 2.08986474169548e-14 1.68485711458323e-14 3.40870654990359e-15 794328.2 2.08985482302219e-14 1.6848494265135e-14 3.40869213286398e-15 1000000 2.08983968449821e-14 1.68483810081227e-14 3.40866757113262e-15 1258925 2.08981751826044e-14 1.68481927810199e-14 3.40863067972035e-15 1584893 2.08978021085309e-14 1.68478838970759e-14 3.40856885828305e-15 1995262 2.08972114896263e-14 1.68474135837695e-14 3.40847334942908e-15 2511886 2.08962753482015e-14 1.68466563422862e-14 3.40832029671394e-15 3162278 2.0894789209045e-14 1.68454572588337e-14 3.40807796514958e-15 3981072 2.08924404275651e-14 1.68435655276707e-14 3.40769516701392e-15 5011872 2.08887242671064e-14 1.68405726987012e-14 3.40708880818835e-15 6309573 2.08828342654429e-14 1.68358202316685e-14 3.40612862027444e-15 7943282 2.08735027038431e-14 1.68282975526632e-14 3.40460670660108e-15 10000000 2.08587354331636e-14 1.68163908645612e-14 3.4021963311465e-15 12589250 2.08353690776116e-14 1.67975484056976e-14 3.39838549705405e-15 15848930 2.07984264840037e-14 1.67677688271003e-14 3.39236107150185e-15 19952620 2.07401593493792e-14 1.67208003163541e-14 3.38285715545328e-15 25118860 2.06484841859259e-14 1.66468862810357e-14 3.36790375109863e-15 31622780 2.05048234168032e-14 1.65310658033664e-14 3.3444719137273e-15 39810720 2.02811981535234e-14 1.63507818024509e-14 3.30799745238293e-15 50118720 1.99365996431674e-14 1.60729639197071e-14 3.25179127990019e-15 63095730 1.94138003095404e-14 1.56514810190088e-14 3.16651989874538e-15 79432820 1.8639143208184e-14 1.50269491607453e-14 3.0401682504428e-15 100000000 1.75305031787202e-14 1.41331547071403e-14 2.85933951040265e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781041151497e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781009508022e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409276046847e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.6678102536433e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505734673406e-15 158489.3 2.0640917725848e-14 1.66780937738437e-14 3.325056579963e-15 199526.2 2.06409139469233e-14 1.66780933653214e-14 3.32505600131278e-15 251188.6 2.06409062420249e-14 1.66780851069292e-14 3.32505415326092e-15 316227.8 2.06408884271055e-14 1.66780723832045e-14 3.32505087944749e-15 398107.2 2.06408634298662e-14 1.66780529773087e-14 3.32504763175152e-15 501187.2 2.0640830619332e-14 1.66780285451972e-14 3.32504189508551e-15 630957.3 2.06407762585226e-14 1.66779813191299e-14 3.32503230170574e-15 794328.2 2.06406794906263e-14 1.66779081831483e-14 3.32501803469574e-15 1000000 2.06405340061846e-14 1.66777987401168e-14 3.32499504290092e-15 1258925 2.06403262861807e-14 1.6677612512367e-14 3.32496000232817e-15 1584893 2.06399536939205e-14 1.66773205399019e-14 3.32490193317462e-15 1995262 2.0639390407953e-14 1.66768649621725e-14 3.32481032068301e-15 2511886 2.06384921980229e-14 1.66761335962925e-14 3.32466511834827e-15 3162278 2.0637058374476e-14 1.66749771369927e-14 3.32443434666547e-15 3981072 2.06347947829386e-14 1.66731516853895e-14 3.32406977204237e-15 5011872 2.06312150272402e-14 1.6670257952777e-14 3.3234922223838e-15 6309573 2.0625538222427e-14 1.66656693088365e-14 3.32257797144237e-15 7943282 2.06165556396182e-14 1.66584047308466e-14 3.32113096900175e-15 10000000 2.06023209043483e-14 1.66469067656626e-14 3.31883733815269e-15 12589250 2.05797957647021e-14 1.66287127510723e-14 3.31521039118275e-15 15848930 2.054421327312e-14 1.65999569777194e-14 3.30947742233451e-15 19952620 2.04880575213276e-14 1.65545830123535e-14 3.30043130416429e-15 25118860 2.03996855879645e-14 1.64831811501235e-14 3.28619628172558e-15 31622780 2.02611746942676e-14 1.63712605062656e-14 3.26388327808963e-15 39810720 2.00454723976348e-14 1.61969667889204e-14 3.22913502575758e-15 50118720 1.9712856120181e-14 1.59282124222436e-14 3.17555405164938e-15 63095730 1.92077223302425e-14 1.55200570566428e-14 3.0941814780949e-15 79432820 1.84580981143815e-14 1.49143524887148e-14 2.97342492810659e-15 100000000 1.73829028844968e-14 1.40455781081546e-14 2.80021981524173e-15 ngspice-26/tests/hisim/pmos/reference/19_dcSweep_CORG=0.standard0000644000265600020320000002342612264261473024043 0ustar andreasadminV(d) I(d) -2.000000e-01 -4.699615e-05 -3.000000e-01 -5.356444e-05 -4.000000e-01 -6.033219e-05 -5.000000e-01 -6.744931e-05 -6.000000e-01 -7.492420e-05 -7.000000e-01 -8.274226e-05 -8.000000e-01 -9.089871e-05 -9.000000e-01 -9.939829e-05 -1.000000e+00 -1.082512e-04 -1.100000e+00 -1.174704e-04 -1.200000e+00 -1.270707e-04 -1.300000e+00 -1.370679e-04 -1.400000e+00 -1.474787e-04 -1.500000e+00 -1.583210e-04 -1.600000e+00 -1.696137e-04 -1.700000e+00 -1.813767e-04 -1.800000e+00 -1.936315e-04 -2.000000e-01 -3.236954e-04 -3.000000e-01 -3.722842e-04 -4.000000e-01 -4.052186e-04 -5.000000e-01 -4.371928e-04 -6.000000e-01 -4.684500e-04 -7.000000e-01 -4.993045e-04 -8.000000e-01 -5.300657e-04 -9.000000e-01 -5.609683e-04 -1.000000e+00 -5.921825e-04 -1.100000e+00 -6.238328e-04 -1.200000e+00 -6.560127e-04 -1.300000e+00 -6.887951e-04 -1.400000e+00 -7.222391e-04 -1.500000e+00 -7.563944e-04 -1.600000e+00 -7.913044e-04 -1.700000e+00 -8.270083e-04 -1.800000e+00 -8.635422e-04 -2.000000e-01 -6.362416e-04 -3.000000e-01 -8.252108e-04 -4.000000e-01 -9.384887e-04 -5.000000e-01 -1.006766e-03 -6.000000e-01 -1.066911e-03 -7.000000e-01 -1.125791e-03 -8.000000e-01 -1.183256e-03 -9.000000e-01 -1.239416e-03 -1.000000e+00 -1.294578e-03 -1.100000e+00 -1.349078e-03 -1.200000e+00 -1.403215e-03 -1.300000e+00 -1.457236e-03 -1.400000e+00 -1.511337e-03 -1.500000e+00 -1.565674e-03 -1.600000e+00 -1.620372e-03 -1.700000e+00 -1.675532e-03 -1.800000e+00 -1.731237e-03 -2.000000e-01 -8.942919e-04 -3.000000e-01 -1.221693e-03 -4.000000e-01 -1.471297e-03 -5.000000e-01 -1.648885e-03 -6.000000e-01 -1.767189e-03 -7.000000e-01 -1.854914e-03 -8.000000e-01 -1.937134e-03 -9.000000e-01 -2.017933e-03 -1.000000e+00 -2.097230e-03 -1.100000e+00 -2.174954e-03 -1.200000e+00 -2.251232e-03 -1.300000e+00 -2.326297e-03 -1.400000e+00 -2.400412e-03 -1.500000e+00 -2.473830e-03 -1.600000e+00 -2.546779e-03 -1.700000e+00 -2.619455e-03 -1.800000e+00 -2.692024e-03 -2.000000e-01 -1.099660e-03 -3.000000e-01 -1.542998e-03 -4.000000e-01 -1.912357e-03 -5.000000e-01 -2.210948e-03 -6.000000e-01 -2.443263e-03 -7.000000e-01 -2.616248e-03 -8.000000e-01 -2.743263e-03 -9.000000e-01 -2.847346e-03 -1.000000e+00 -2.946865e-03 -1.100000e+00 -3.044792e-03 -1.200000e+00 -3.141252e-03 -1.300000e+00 -3.236151e-03 -1.400000e+00 -3.329502e-03 -1.500000e+00 -3.421422e-03 -1.600000e+00 -3.512085e-03 -1.700000e+00 -3.601685e-03 -1.800000e+00 -3.690419e-03 -2.000000e-01 -1.323288e-03 -3.000000e-01 -1.900779e-03 -4.000000e-01 -2.413864e-03 -5.000000e-01 -2.862055e-03 -6.000000e-01 -3.247311e-03 -7.000000e-01 -3.572769e-03 -8.000000e-01 -3.842246e-03 -9.000000e-01 -4.060779e-03 -1.000000e+00 -4.235768e-03 -1.100000e+00 -4.377686e-03 -1.200000e+00 -4.501075e-03 -1.300000e+00 -4.619790e-03 -1.400000e+00 -4.736666e-03 -1.500000e+00 -4.852063e-03 -1.600000e+00 -4.966006e-03 -1.700000e+00 -5.078485e-03 -1.800000e+00 -5.189527e-03 -2.000000e-01 -1.465681e-03 -3.000000e-01 -2.135731e-03 -4.000000e-01 -2.753367e-03 -5.000000e-01 -3.315155e-03 -6.000000e-01 -3.820331e-03 -7.000000e-01 -4.269931e-03 -8.000000e-01 -4.666054e-03 -9.000000e-01 -5.011370e-03 -1.000000e+00 -5.308993e-03 -1.100000e+00 -5.562716e-03 -1.200000e+00 -5.777420e-03 -1.300000e+00 -5.959268e-03 -1.400000e+00 -6.115539e-03 -1.500000e+00 -6.254781e-03 -1.600000e+00 -6.387042e-03 -1.700000e+00 -6.517185e-03 -1.800000e+00 -6.645738e-03 -2.000000e-01 -8.053777e-05 -3.000000e-01 -9.162409e-05 -4.000000e-01 -1.024997e-04 -5.000000e-01 -1.136548e-04 -6.000000e-01 -1.251789e-04 -7.000000e-01 -1.370995e-04 -8.000000e-01 -1.494356e-04 -9.000000e-01 -1.622080e-04 -1.000000e+00 -1.754382e-04 -1.100000e+00 -1.891484e-04 -1.200000e+00 -2.033607e-04 -1.300000e+00 -2.180970e-04 -1.400000e+00 -2.333799e-04 -1.500000e+00 -2.492324e-04 -1.600000e+00 -2.656781e-04 -1.700000e+00 -2.827418e-04 -1.800000e+00 -3.004492e-04 -2.000000e-01 -2.967540e-04 -3.000000e-01 -3.587330e-04 -4.000000e-01 -3.937602e-04 -5.000000e-01 -4.249225e-04 -6.000000e-01 -4.554245e-04 -7.000000e-01 -4.853715e-04 -8.000000e-01 -5.149862e-04 -9.000000e-01 -5.445097e-04 -1.000000e+00 -5.741407e-04 -1.100000e+00 -6.040315e-04 -1.200000e+00 -6.342969e-04 -1.300000e+00 -6.650254e-04 -1.400000e+00 -6.962867e-04 -1.500000e+00 -7.281374e-04 -1.600000e+00 -7.606255e-04 -1.700000e+00 -7.937927e-04 -1.800000e+00 -8.276765e-04 -2.000000e-01 -5.192224e-04 -3.000000e-01 -6.879597e-04 -4.000000e-01 -8.011363e-04 -5.000000e-01 -8.720396e-04 -6.000000e-01 -9.256745e-04 -7.000000e-01 -9.769033e-04 -8.000000e-01 -1.027362e-03 -9.000000e-01 -1.076896e-03 -1.000000e+00 -1.125564e-03 -1.100000e+00 -1.173562e-03 -1.200000e+00 -1.221119e-03 -1.300000e+00 -1.268446e-03 -1.400000e+00 -1.315726e-03 -1.500000e+00 -1.363110e-03 -1.600000e+00 -1.410721e-03 -1.700000e+00 -1.458660e-03 -1.800000e+00 -1.507013e-03 -2.000000e-01 -7.107833e-04 -3.000000e-01 -9.814930e-04 -4.000000e-01 -1.196037e-03 -5.000000e-01 -1.357425e-03 -6.000000e-01 -1.472204e-03 -7.000000e-01 -1.554887e-03 -8.000000e-01 -1.625302e-03 -9.000000e-01 -1.693712e-03 -1.000000e+00 -1.761384e-03 -1.100000e+00 -1.828127e-03 -1.200000e+00 -1.893853e-03 -1.300000e+00 -1.958629e-03 -1.400000e+00 -2.022603e-03 -1.500000e+00 -2.085948e-03 -1.600000e+00 -2.148840e-03 -1.700000e+00 -2.211441e-03 -1.800000e+00 -2.273894e-03 -2.000000e-01 -8.703534e-04 -3.000000e-01 -1.229542e-03 -4.000000e-01 -1.535299e-03 -5.000000e-01 -1.788717e-03 -6.000000e-01 -1.992234e-03 -7.000000e-01 -2.150032e-03 -8.000000e-01 -2.269922e-03 -9.000000e-01 -2.364654e-03 -1.000000e+00 -2.449433e-03 -1.100000e+00 -2.532170e-03 -1.200000e+00 -2.614133e-03 -1.300000e+00 -2.695229e-03 -1.400000e+00 -2.775330e-03 -1.500000e+00 -2.854418e-03 -1.600000e+00 -2.932552e-03 -1.700000e+00 -3.009841e-03 -1.800000e+00 -3.086415e-03 -2.000000e-01 -1.055746e-03 -3.000000e-01 -1.522006e-03 -4.000000e-01 -1.941527e-03 -5.000000e-01 -2.312983e-03 -6.000000e-01 -2.636801e-03 -7.000000e-01 -2.914587e-03 -8.000000e-01 -3.148785e-03 -9.000000e-01 -3.342837e-03 -1.000000e+00 -3.501773e-03 -1.100000e+00 -3.632590e-03 -1.200000e+00 -3.744148e-03 -1.300000e+00 -3.846545e-03 -1.400000e+00 -3.946382e-03 -1.500000e+00 -4.045210e-03 -1.600000e+00 -4.143203e-03 -1.700000e+00 -4.240296e-03 -1.800000e+00 -4.336435e-03 -2.000000e-01 -1.186306e-03 -3.000000e-01 -1.731660e-03 -4.000000e-01 -2.238332e-03 -5.000000e-01 -2.703337e-03 -6.000000e-01 -3.125332e-03 -7.000000e-01 -3.504342e-03 -8.000000e-01 -3.841383e-03 -9.000000e-01 -4.138137e-03 -1.000000e+00 -4.396808e-03 -1.100000e+00 -4.620185e-03 -1.200000e+00 -4.811857e-03 -1.300000e+00 -4.976335e-03 -1.400000e+00 -5.118917e-03 -1.500000e+00 -5.245465e-03 -1.600000e+00 -5.362370e-03 -1.700000e+00 -5.475384e-03 -1.800000e+00 -5.586920e-03 -2.000000e-01 -1.215310e-04 -3.000000e-01 -1.449795e-04 -4.000000e-01 -1.644397e-04 -5.000000e-01 -1.838944e-04 -6.000000e-01 -2.037631e-04 -7.000000e-01 -2.241339e-04 -8.000000e-01 -2.450728e-04 -9.000000e-01 -2.666381e-04 -1.000000e+00 -2.888803e-04 -1.100000e+00 -3.118434e-04 -1.200000e+00 -3.355664e-04 -1.300000e+00 -3.600852e-04 -1.400000e+00 -3.854342e-04 -1.500000e+00 -4.116469e-04 -1.600000e+00 -4.387567e-04 -1.700000e+00 -4.667976e-04 -1.800000e+00 -4.958045e-04 -2.000000e-01 -2.683866e-04 -3.000000e-01 -3.434866e-04 -4.000000e-01 -3.905718e-04 -5.000000e-01 -4.254121e-04 -6.000000e-01 -4.579229e-04 -7.000000e-01 -4.899888e-04 -8.000000e-01 -5.217546e-04 -9.000000e-01 -5.533460e-04 -1.000000e+00 -5.849287e-04 -1.100000e+00 -6.166606e-04 -1.200000e+00 -6.486752e-04 -1.300000e+00 -6.810800e-04 -1.400000e+00 -7.139613e-04 -1.500000e+00 -7.473894e-04 -1.600000e+00 -7.814225e-04 -1.700000e+00 -8.161101e-04 -1.800000e+00 -8.514956e-04 -2.000000e-01 -4.174948e-04 -3.000000e-01 -5.651320e-04 -4.000000e-01 -6.748377e-04 -5.000000e-01 -7.519469e-04 -6.000000e-01 -8.074889e-04 -7.000000e-01 -8.544460e-04 -8.000000e-01 -8.996975e-04 -9.000000e-01 -9.444786e-04 -1.000000e+00 -9.887737e-04 -1.100000e+00 -1.032583e-03 -1.200000e+00 -1.076001e-03 -1.300000e+00 -1.119162e-03 -1.400000e+00 -1.162206e-03 -1.500000e+00 -1.205264e-03 -1.600000e+00 -1.248450e-03 -1.700000e+00 -1.291863e-03 -1.800000e+00 -1.335586e-03 -2.000000e-01 -5.523075e-04 -3.000000e-01 -7.705283e-04 -4.000000e-01 -9.501590e-04 -5.000000e-01 -1.092854e-03 -6.000000e-01 -1.201930e-03 -7.000000e-01 -1.284056e-03 -8.000000e-01 -1.349422e-03 -9.000000e-01 -1.408062e-03 -1.000000e+00 -1.465169e-03 -1.100000e+00 -1.521831e-03 -1.200000e+00 -1.578020e-03 -1.300000e+00 -1.633658e-03 -1.400000e+00 -1.688747e-03 -1.500000e+00 -1.743357e-03 -1.600000e+00 -1.797587e-03 -1.700000e+00 -1.851545e-03 -1.800000e+00 -1.905340e-03 -2.000000e-01 -6.699586e-04 -3.000000e-01 -9.519966e-04 -4.000000e-01 -1.196965e-03 -5.000000e-01 -1.405155e-03 -6.000000e-01 -1.577904e-03 -7.000000e-01 -1.717682e-03 -8.000000e-01 -1.828773e-03 -9.000000e-01 -1.917844e-03 -1.000000e+00 -1.993249e-03 -1.100000e+00 -2.062742e-03 -1.200000e+00 -2.130579e-03 -1.300000e+00 -2.197915e-03 -1.400000e+00 -2.264816e-03 -1.500000e+00 -2.331190e-03 -1.600000e+00 -2.396992e-03 -1.700000e+00 -2.462231e-03 -1.800000e+00 -2.526956e-03 -2.000000e-01 -8.151175e-04 -3.000000e-01 -1.178259e-03 -4.000000e-01 -1.508450e-03 -5.000000e-01 -1.804478e-03 -6.000000e-01 -2.066202e-03 -7.000000e-01 -2.294404e-03 -8.000000e-01 -2.490612e-03 -9.000000e-01 -2.657086e-03 -1.000000e+00 -2.797037e-03 -1.100000e+00 -2.914811e-03 -1.200000e+00 -3.015698e-03 -1.300000e+00 -3.105458e-03 -1.400000e+00 -3.189490e-03 -1.500000e+00 -3.271330e-03 -1.600000e+00 -3.352374e-03 -1.700000e+00 -3.432950e-03 -1.800000e+00 -3.513054e-03 -2.000000e-01 -9.263926e-04 -3.000000e-01 -1.353590e-03 -4.000000e-01 -1.752829e-03 -5.000000e-01 -2.121990e-03 -6.000000e-01 -2.459839e-03 -7.000000e-01 -2.766039e-03 -8.000000e-01 -3.041016e-03 -9.000000e-01 -3.285795e-03 -1.000000e+00 -3.501875e-03 -1.100000e+00 -3.691217e-03 -1.200000e+00 -3.856317e-03 -1.300000e+00 -4.000255e-03 -1.400000e+00 -4.126613e-03 -1.500000e+00 -4.239259e-03 -1.600000e+00 -4.342117e-03 -1.700000e+00 -4.438929e-03 -1.800000e+00 -4.532697e-03 ngspice-26/tests/hisim/pmos/reference/67_acFreq_COIGN=1.standard0000644000265600020320000002530212264261473023756 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/57_acFreq_CONQS=1.standard0000644000265600020320000002530312264261473024002 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788612390417e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.68486946936839e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781041151497e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409276046847e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/54_acFreq_COADOV=0.standard0000644000265600020320000002530512264261473024070 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 1258.925 1.35669277748042e-14 1.29198656025324e-14 4.38164490614454e-18 1584.893 1.35669217357971e-14 1.29198655144543e-14 4.38164360610996e-18 1995.262 1.35669230915003e-14 1.29198657211564e-14 4.38164383754387e-18 2511.886 1.35669209547044e-14 1.2919862121088e-14 4.3816438300667e-18 3162.278 1.35669171091701e-14 1.29198596632842e-14 4.38164261643059e-18 3981.072 1.35669199526265e-14 1.29198614678969e-14 4.38164303754885e-18 5011.872 1.35669208719186e-14 1.29198626566591e-14 4.38164240403752e-18 6309.573 1.35669196990797e-14 1.29198644070349e-14 4.38164292079278e-18 7943.282 1.35669212023169e-14 1.29198630155745e-14 4.38164270884676e-18 10000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 12589.25 1.35669277748042e-14 1.29198656025324e-14 4.38164490614454e-18 15848.93 1.35669217357971e-14 1.29198655144543e-14 4.38164360610996e-18 19952.62 1.35669230915003e-14 1.29198657211564e-14 4.38164383754387e-18 25118.86 1.35669209547044e-14 1.2919862121088e-14 4.3816438300667e-18 31622.78 1.35669171091701e-14 1.29198596632842e-14 4.38164261643059e-18 39810.72 1.35669199526265e-14 1.29198614678969e-14 4.38164303754885e-18 50118.72 1.35669208719186e-14 1.29198626566591e-14 4.38164240403752e-18 63095.73 1.35669196990797e-14 1.29198644070349e-14 4.38164292079278e-18 79432.82 1.35669212023169e-14 1.29198630155745e-14 4.38164270884676e-18 100000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 125892.5 1.35669277748042e-14 1.29198656025324e-14 4.38164490614454e-18 158489.3 1.35669217357971e-14 1.29198655144543e-14 4.38164360610996e-18 199526.2 1.35669230915003e-14 1.29198657211564e-14 4.38164383754387e-18 251188.6 1.35669209547044e-14 1.2919862121088e-14 4.3816438300667e-18 316227.8 1.35669171091701e-14 1.29198596632842e-14 4.38164261643059e-18 398107.2 1.35669199526265e-14 1.29198614678969e-14 4.38164303754885e-18 501187.2 1.35669208719186e-14 1.29198626566591e-14 4.38164240403752e-18 630957.3 1.35669196990797e-14 1.29198644070349e-14 4.38164292079278e-18 794328.2 1.35669212023169e-14 1.29198630155745e-14 4.38164270884676e-18 1000000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 1258925 1.35669277748042e-14 1.29198656025324e-14 4.38164490614454e-18 1584893 1.35669217357971e-14 1.29198655144543e-14 4.38164360610995e-18 1995262 1.35669230915003e-14 1.29198657211564e-14 4.38164383754387e-18 2511886 1.35669209547044e-14 1.2919862121088e-14 4.3816438300667e-18 3162278 1.35669171091701e-14 1.29198596632842e-14 4.38164261643059e-18 3981072 1.35669199526265e-14 1.29198614678969e-14 4.38164303754885e-18 5011872 1.35669208719186e-14 1.29198626566591e-14 4.38164240403752e-18 6309573 1.35669196990797e-14 1.29198644070349e-14 4.38164292079278e-18 7943282 1.35669212023169e-14 1.29198630155745e-14 4.38164270884676e-18 10000000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 12589250 1.35669277748042e-14 1.29198656025324e-14 4.38164490614454e-18 15848930 1.35669217357971e-14 1.29198655144543e-14 4.38164360610996e-18 19952620 1.35669230915003e-14 1.29198657211564e-14 4.38164383754387e-18 25118860 1.35669209547044e-14 1.2919862121088e-14 4.3816438300667e-18 31622780 1.35669171091701e-14 1.29198596632842e-14 4.38164261643059e-18 39810720 1.35669199526265e-14 1.29198614678969e-14 4.38164303754885e-18 50118720 1.35669208719186e-14 1.29198626566591e-14 4.38164240403752e-18 63095730 1.35669196990797e-14 1.29198644070349e-14 4.38164292079278e-18 79432820 1.35669212023169e-14 1.29198630155745e-14 4.38164270884676e-18 100000000 1.35669196168057e-14 1.29198624632701e-14 4.38164221713175e-18 1000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 1258.925 1.34398111512731e-14 1.279272369474e-14 5.70371468045593e-18 1584.893 1.34398101093556e-14 1.27927237620151e-14 5.70371397889315e-18 1995.262 1.3439807295524e-14 1.27927259952487e-14 5.70371352417664e-18 2511.886 1.34398066482307e-14 1.27927288063938e-14 5.70371371913377e-18 3162.278 1.34398006318182e-14 1.27927230542497e-14 5.70371336935356e-18 3981.072 1.34398021882281e-14 1.27927237145428e-14 5.70371256255342e-18 5011.872 1.34398032525547e-14 1.27927259839423e-14 5.70371327880486e-18 6309.573 1.34398040574638e-14 1.27927260634947e-14 5.70371218590939e-18 7943.282 1.34398041359132e-14 1.27927259127496e-14 5.70371389705458e-18 10000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 12589.25 1.34398111512731e-14 1.279272369474e-14 5.70371468045593e-18 15848.93 1.34398101093556e-14 1.27927237620151e-14 5.70371397889315e-18 19952.62 1.3439807295524e-14 1.27927259952487e-14 5.70371352417664e-18 25118.86 1.34398066482307e-14 1.27927288063938e-14 5.70371371913377e-18 31622.78 1.34398006318182e-14 1.27927230542497e-14 5.70371336935356e-18 39810.72 1.34398021882281e-14 1.27927237145428e-14 5.70371256255342e-18 50118.72 1.34398032525547e-14 1.27927259839423e-14 5.70371327880486e-18 63095.73 1.34398040574638e-14 1.27927260634947e-14 5.70371218590939e-18 79432.82 1.34398041359132e-14 1.27927259127496e-14 5.70371389705458e-18 100000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 125892.5 1.34398111512731e-14 1.279272369474e-14 5.70371468045593e-18 158489.3 1.34398101093556e-14 1.27927237620151e-14 5.70371397889315e-18 199526.2 1.3439807295524e-14 1.27927259952487e-14 5.70371352417664e-18 251188.6 1.34398066482307e-14 1.27927288063938e-14 5.70371371913377e-18 316227.8 1.34398006318182e-14 1.27927230542497e-14 5.70371336935356e-18 398107.2 1.34398021882281e-14 1.27927237145428e-14 5.70371256255342e-18 501187.2 1.34398032525547e-14 1.27927259839423e-14 5.70371327880486e-18 630957.3 1.34398040574638e-14 1.27927260634947e-14 5.7037121859094e-18 794328.2 1.34398041359132e-14 1.27927259127496e-14 5.70371389705458e-18 1000000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 1258925 1.34398111512731e-14 1.279272369474e-14 5.70371468045593e-18 1584893 1.34398101093556e-14 1.27927237620151e-14 5.70371397889315e-18 1995262 1.3439807295524e-14 1.27927259952487e-14 5.70371352417664e-18 2511886 1.34398066482307e-14 1.27927288063938e-14 5.70371371913377e-18 3162278 1.34398006318182e-14 1.27927230542497e-14 5.70371336935356e-18 3981072 1.34398021882281e-14 1.27927237145428e-14 5.70371256255342e-18 5011872 1.34398032525547e-14 1.27927259839423e-14 5.70371327880486e-18 6309573 1.34398040574638e-14 1.27927260634947e-14 5.70371218590939e-18 7943282 1.34398041359132e-14 1.27927259127496e-14 5.70371389705458e-18 10000000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 12589250 1.34398111512731e-14 1.279272369474e-14 5.70371468045593e-18 15848930 1.34398101093556e-14 1.27927237620151e-14 5.70371397889315e-18 19952620 1.3439807295524e-14 1.27927259952487e-14 5.70371352417664e-18 25118860 1.34398066482307e-14 1.27927288063938e-14 5.70371371913377e-18 31622780 1.34398006318182e-14 1.27927230542497e-14 5.70371336935356e-18 39810720 1.34398021882281e-14 1.27927237145428e-14 5.70371256255342e-18 50118720 1.34398032525547e-14 1.27927259839423e-14 5.70371327880486e-18 63095730 1.34398040574638e-14 1.27927260634947e-14 5.7037121859094e-18 79432820 1.34398041359132e-14 1.27927259127496e-14 5.70371389705458e-18 100000000 1.34398041553076e-14 1.279272472008e-14 5.70371368150637e-18 1000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 1258.925 1.32836808379355e-14 1.26180625463182e-14 2.78530031507588e-17 1584.893 1.32836771050964e-14 1.26180632691492e-14 2.78529912055158e-17 1995.262 1.32836804459605e-14 1.26180614254386e-14 2.78529964602242e-17 2511.886 1.32836794612195e-14 1.26180622683338e-14 2.78529925872609e-17 3162.278 1.32836743997269e-14 1.26180555424116e-14 2.78529882528179e-17 3981.072 1.32836764514273e-14 1.26180562225048e-14 2.78529865595469e-17 5011.872 1.32836769034158e-14 1.26180607224415e-14 2.78529914953146e-17 6309.573 1.32836778789939e-14 1.26180599801575e-14 2.78529909569953e-17 7943.282 1.32836783390365e-14 1.26180584117842e-14 2.78529896308628e-17 10000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 12589.25 1.32836808379355e-14 1.26180625463182e-14 2.78530031507588e-17 15848.93 1.32836771050965e-14 1.26180632691492e-14 2.78529912055158e-17 19952.62 1.32836804459605e-14 1.26180614254386e-14 2.78529964602242e-17 25118.86 1.32836794612195e-14 1.26180622683338e-14 2.78529925872609e-17 31622.78 1.32836743997269e-14 1.26180555424116e-14 2.78529882528179e-17 39810.72 1.32836764514273e-14 1.26180562225048e-14 2.78529865595469e-17 50118.72 1.32836769034158e-14 1.26180607224415e-14 2.78529914953146e-17 63095.73 1.32836778789939e-14 1.26180599801575e-14 2.78529909569953e-17 79432.82 1.32836783390365e-14 1.26180584117842e-14 2.78529896308628e-17 100000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 125892.5 1.32836808379355e-14 1.26180625463182e-14 2.78530031507588e-17 158489.3 1.32836771050964e-14 1.26180632691492e-14 2.78529912055158e-17 199526.2 1.32836804459605e-14 1.26180614254386e-14 2.78529964602242e-17 251188.6 1.32836794612195e-14 1.26180622683338e-14 2.78529925872609e-17 316227.8 1.32836743997269e-14 1.26180555424116e-14 2.78529882528179e-17 398107.2 1.32836764514273e-14 1.26180562225048e-14 2.78529865595469e-17 501187.2 1.32836769034158e-14 1.26180607224415e-14 2.78529914953146e-17 630957.3 1.32836778789939e-14 1.26180599801575e-14 2.78529909569953e-17 794328.2 1.32836783390365e-14 1.26180584117842e-14 2.78529896308628e-17 1000000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 1258925 1.32836808379355e-14 1.26180625463182e-14 2.78530031507588e-17 1584893 1.32836771050964e-14 1.26180632691492e-14 2.78529912055158e-17 1995262 1.32836804459605e-14 1.26180614254386e-14 2.78529964602242e-17 2511886 1.32836794612195e-14 1.26180622683338e-14 2.78529925872609e-17 3162278 1.32836743997269e-14 1.26180555424116e-14 2.78529882528179e-17 3981072 1.32836764514273e-14 1.26180562225048e-14 2.78529865595469e-17 5011872 1.32836769034158e-14 1.26180607224415e-14 2.78529914953146e-17 6309573 1.32836778789939e-14 1.26180599801575e-14 2.78529909569953e-17 7943282 1.32836783390365e-14 1.26180584117842e-14 2.78529896308628e-17 10000000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 12589250 1.32836808379355e-14 1.26180625463182e-14 2.78530031507588e-17 15848930 1.32836771050964e-14 1.26180632691492e-14 2.78529912055158e-17 19952620 1.32836804459605e-14 1.26180614254386e-14 2.78529964602242e-17 25118860 1.32836794612195e-14 1.26180622683338e-14 2.78529925872609e-17 31622780 1.32836743997269e-14 1.26180555424116e-14 2.78529882528179e-17 39810720 1.32836764514273e-14 1.26180562225048e-14 2.78529865595469e-17 50118720 1.32836769034158e-14 1.26180607224415e-14 2.78529914953146e-17 63095730 1.32836778789939e-14 1.26180599801575e-14 2.78529909569953e-17 79432820 1.32836783390365e-14 1.26180584117842e-14 2.78529896308628e-17 100000000 1.32836779307828e-14 1.26180585362344e-14 2.78529903932687e-17 ngspice-26/tests/hisim/pmos/reference/2_dcSweep_CORSRD=-1_GDLD.standard0000644000265600020320000002342612264261473025065 0ustar andreasadminV(d) I(d) -2.000000e-01 -3.754267e-06 -3.000000e-01 -4.334728e-06 -4.000000e-01 -4.951132e-06 -5.000000e-01 -5.614432e-06 -6.000000e-01 -6.321155e-06 -7.000000e-01 -7.068014e-06 -8.000000e-01 -7.853847e-06 -9.000000e-01 -8.678935e-06 -1.000000e+00 -9.544353e-06 -1.100000e+00 -1.045162e-05 -1.200000e+00 -1.140252e-05 -1.300000e+00 -1.239906e-05 -1.400000e+00 -1.344343e-05 -1.500000e+00 -1.453801e-05 -1.600000e+00 -1.568537e-05 -1.700000e+00 -1.688827e-05 -1.800000e+00 -1.814973e-05 -2.000000e-01 -1.539299e-04 -3.000000e-01 -1.675824e-04 -4.000000e-01 -1.787195e-04 -5.000000e-01 -1.886299e-04 -6.000000e-01 -1.978655e-04 -7.000000e-01 -2.067413e-04 -8.000000e-01 -2.154311e-04 -9.000000e-01 -2.240399e-04 -1.000000e+00 -2.326366e-04 -1.100000e+00 -2.412701e-04 -1.200000e+00 -2.499771e-04 -1.300000e+00 -2.587862e-04 -1.400000e+00 -2.677212e-04 -1.500000e+00 -2.768025e-04 -1.600000e+00 -2.860480e-04 -1.700000e+00 -2.954741e-04 -1.800000e+00 -3.050962e-04 -2.000000e-01 -4.500062e-04 -3.000000e-01 -5.551879e-04 -4.000000e-01 -6.014239e-04 -5.000000e-01 -6.336069e-04 -6.000000e-01 -6.633621e-04 -7.000000e-01 -6.908955e-04 -8.000000e-01 -7.165839e-04 -9.000000e-01 -7.408611e-04 -1.000000e+00 -7.641003e-04 -1.100000e+00 -7.865929e-04 -1.200000e+00 -8.085581e-04 -1.300000e+00 -8.301605e-04 -1.400000e+00 -8.515246e-04 -1.500000e+00 -8.727460e-04 -1.600000e+00 -8.938998e-04 -1.700000e+00 -9.150463e-04 -1.800000e+00 -9.362348e-04 -2.000000e-01 -7.046222e-04 -3.000000e-01 -9.457608e-04 -4.000000e-01 -1.112367e-03 -5.000000e-01 -1.211047e-03 -6.000000e-01 -1.266678e-03 -7.000000e-01 -1.315971e-03 -8.000000e-01 -1.363287e-03 -9.000000e-01 -1.408245e-03 -1.000000e+00 -1.450881e-03 -1.100000e+00 -1.491419e-03 -1.200000e+00 -1.530169e-03 -1.300000e+00 -1.567446e-03 -1.400000e+00 -1.603534e-03 -1.500000e+00 -1.638671e-03 -1.600000e+00 -1.673057e-03 -1.700000e+00 -1.706854e-03 -1.800000e+00 -1.740195e-03 -2.000000e-01 -9.054077e-04 -3.000000e-01 -1.260917e-03 -4.000000e-01 -1.546740e-03 -5.000000e-01 -1.764419e-03 -6.000000e-01 -1.917675e-03 -7.000000e-01 -2.015415e-03 -8.000000e-01 -2.080291e-03 -9.000000e-01 -2.143046e-03 -1.000000e+00 -2.204600e-03 -1.100000e+00 -2.263880e-03 -1.200000e+00 -2.320816e-03 -1.300000e+00 -2.375462e-03 -1.400000e+00 -2.427988e-03 -1.500000e+00 -2.478619e-03 -1.600000e+00 -2.527599e-03 -1.700000e+00 -2.575161e-03 -1.800000e+00 -2.621514e-03 -2.000000e-01 -1.122399e-03 -3.000000e-01 -1.608580e-03 -4.000000e-01 -2.035800e-03 -5.000000e-01 -2.402372e-03 -6.000000e-01 -2.709037e-03 -7.000000e-01 -2.957850e-03 -8.000000e-01 -3.151871e-03 -9.000000e-01 -3.296049e-03 -1.000000e+00 -3.398957e-03 -1.100000e+00 -3.475753e-03 -1.200000e+00 -3.550987e-03 -1.300000e+00 -3.628277e-03 -1.400000e+00 -3.703523e-03 -1.500000e+00 -3.776571e-03 -1.600000e+00 -3.847420e-03 -1.700000e+00 -3.916122e-03 -1.800000e+00 -3.982778e-03 -2.000000e-01 -1.261518e-03 -3.000000e-01 -1.837125e-03 -4.000000e-01 -2.365818e-03 -5.000000e-01 -2.843657e-03 -6.000000e-01 -3.269063e-03 -7.000000e-01 -3.642131e-03 -8.000000e-01 -3.964024e-03 -9.000000e-01 -4.236585e-03 -1.000000e+00 -4.462265e-03 -1.100000e+00 -4.644420e-03 -1.200000e+00 -4.787836e-03 -1.300000e+00 -4.899147e-03 -1.400000e+00 -4.987547e-03 -1.500000e+00 -5.068215e-03 -1.600000e+00 -5.154598e-03 -1.700000e+00 -5.240897e-03 -1.800000e+00 -5.325173e-03 -2.000000e-01 -1.955498e-05 -3.000000e-01 -2.261923e-05 -4.000000e-01 -2.583450e-05 -5.000000e-01 -2.927051e-05 -6.000000e-01 -3.291566e-05 -7.000000e-01 -3.675570e-05 -8.000000e-01 -4.078545e-05 -9.000000e-01 -4.500635e-05 -1.000000e+00 -4.942347e-05 -1.100000e+00 -5.404385e-05 -1.200000e+00 -5.887574e-05 -1.300000e+00 -6.392827e-05 -1.400000e+00 -6.921136e-05 -1.500000e+00 -7.473571e-05 -1.600000e+00 -8.051279e-05 -1.700000e+00 -8.655495e-05 -1.800000e+00 -9.287545e-05 -2.000000e-01 -1.667845e-04 -3.000000e-01 -1.880297e-04 -4.000000e-01 -2.022851e-04 -5.000000e-01 -2.151923e-04 -6.000000e-01 -2.272833e-04 -7.000000e-01 -2.388913e-04 -8.000000e-01 -2.502435e-04 -9.000000e-01 -2.614890e-04 -1.000000e+00 -2.727282e-04 -1.100000e+00 -2.840318e-04 -1.200000e+00 -2.954514e-04 -1.300000e+00 -3.070272e-04 -1.400000e+00 -3.187912e-04 -1.500000e+00 -3.307707e-04 -1.600000e+00 -3.429892e-04 -1.700000e+00 -3.554682e-04 -1.800000e+00 -3.682275e-04 -2.000000e-01 -3.807781e-04 -3.000000e-01 -4.853990e-04 -4.000000e-01 -5.412322e-04 -5.000000e-01 -5.734060e-04 -6.000000e-01 -6.018821e-04 -7.000000e-01 -6.288815e-04 -8.000000e-01 -6.544023e-04 -9.000000e-01 -6.786357e-04 -1.000000e+00 -7.018523e-04 -1.100000e+00 -7.243088e-04 -1.200000e+00 -7.462188e-04 -1.300000e+00 -7.677516e-04 -1.400000e+00 -7.890392e-04 -1.500000e+00 -8.101850e-04 -1.600000e+00 -8.312706e-04 -1.700000e+00 -8.523617e-04 -1.800000e+00 -8.735123e-04 -2.000000e-01 -5.702827e-04 -3.000000e-01 -7.747496e-04 -4.000000e-01 -9.247151e-04 -5.000000e-01 -1.023696e-03 -6.000000e-01 -1.083124e-03 -7.000000e-01 -1.126634e-03 -8.000000e-01 -1.168484e-03 -9.000000e-01 -1.209089e-03 -1.000000e+00 -1.248137e-03 -1.100000e+00 -1.285586e-03 -1.200000e+00 -1.321561e-03 -1.300000e+00 -1.356261e-03 -1.400000e+00 -1.389898e-03 -1.500000e+00 -1.422670e-03 -1.600000e+00 -1.454750e-03 -1.700000e+00 -1.486287e-03 -1.800000e+00 -1.517404e-03 -2.000000e-01 -7.272829e-04 -3.000000e-01 -1.019127e-03 -4.000000e-01 -1.259385e-03 -5.000000e-01 -1.448583e-03 -6.000000e-01 -1.589020e-03 -7.000000e-01 -1.686028e-03 -8.000000e-01 -1.751270e-03 -9.000000e-01 -1.804574e-03 -1.000000e+00 -1.857729e-03 -1.100000e+00 -1.909957e-03 -1.200000e+00 -1.960728e-03 -1.300000e+00 -2.009886e-03 -1.400000e+00 -2.057435e-03 -1.500000e+00 -2.103472e-03 -1.600000e+00 -2.148144e-03 -1.700000e+00 -2.191613e-03 -1.800000e+00 -2.234041e-03 -2.000000e-01 -9.082769e-04 -3.000000e-01 -1.305053e-03 -4.000000e-01 -1.657439e-03 -5.000000e-01 -1.963701e-03 -6.000000e-01 -2.223843e-03 -7.000000e-01 -2.439057e-03 -8.000000e-01 -2.611505e-03 -9.000000e-01 -2.744723e-03 -1.000000e+00 -2.844506e-03 -1.100000e+00 -2.919861e-03 -1.200000e+00 -2.984356e-03 -1.300000e+00 -3.049929e-03 -1.400000e+00 -3.115798e-03 -1.500000e+00 -3.180442e-03 -1.600000e+00 -3.243606e-03 -1.700000e+00 -3.305223e-03 -1.800000e+00 -3.365297e-03 -2.000000e-01 -1.035575e-03 -3.000000e-01 -1.509290e-03 -4.000000e-01 -1.946786e-03 -5.000000e-01 -2.344963e-03 -6.000000e-01 -2.702241e-03 -7.000000e-01 -3.018281e-03 -8.000000e-01 -3.293675e-03 -9.000000e-01 -3.529699e-03 -1.000000e+00 -3.728229e-03 -1.100000e+00 -3.891870e-03 -1.200000e+00 -4.024239e-03 -1.300000e+00 -4.130193e-03 -1.400000e+00 -4.215973e-03 -1.500000e+00 -4.289845e-03 -1.600000e+00 -4.362307e-03 -1.700000e+00 -4.437396e-03 -1.800000e+00 -4.512205e-03 -2.000000e-01 -5.846707e-05 -3.000000e-01 -7.023460e-05 -4.000000e-01 -8.207367e-05 -5.000000e-01 -9.467920e-05 -6.000000e-01 -1.080361e-04 -7.000000e-01 -1.220926e-04 -8.000000e-01 -1.368280e-04 -9.000000e-01 -1.522446e-04 -1.000000e+00 -1.683574e-04 -1.100000e+00 -1.851879e-04 -1.200000e+00 -2.027615e-04 -1.300000e+00 -2.211063e-04 -1.400000e+00 -2.402528e-04 -1.500000e+00 -2.602339e-04 -1.600000e+00 -2.810847e-04 -1.700000e+00 -3.028430e-04 -1.800000e+00 -3.255492e-04 -2.000000e-01 -1.755673e-04 -3.000000e-01 -2.139969e-04 -4.000000e-01 -2.372536e-04 -5.000000e-01 -2.571418e-04 -6.000000e-01 -2.763153e-04 -7.000000e-01 -2.951067e-04 -8.000000e-01 -3.137039e-04 -9.000000e-01 -3.322773e-04 -1.000000e+00 -3.509646e-04 -1.100000e+00 -3.698719e-04 -1.200000e+00 -3.890803e-04 -1.300000e+00 -4.086532e-04 -1.400000e+00 -4.286422e-04 -1.500000e+00 -4.490905e-04 -1.600000e+00 -4.700358e-04 -1.700000e+00 -4.915124e-04 -1.800000e+00 -5.135522e-04 -2.000000e-01 -3.187757e-04 -3.000000e-01 -4.200687e-04 -4.000000e-01 -4.863724e-04 -5.000000e-01 -5.273349e-04 -6.000000e-01 -5.578856e-04 -7.000000e-01 -5.863105e-04 -8.000000e-01 -6.138948e-04 -9.000000e-01 -6.406421e-04 -1.000000e+00 -6.666107e-04 -1.100000e+00 -6.919433e-04 -1.200000e+00 -7.168041e-04 -1.300000e+00 -7.413462e-04 -1.400000e+00 -7.657013e-04 -1.500000e+00 -7.899788e-04 -1.600000e+00 -8.142686e-04 -1.700000e+00 -8.386451e-04 -1.800000e+00 -8.631701e-04 -2.000000e-01 -4.520527e-04 -3.000000e-01 -6.219850e-04 -4.000000e-01 -7.541327e-04 -5.000000e-01 -8.505157e-04 -6.000000e-01 -9.162792e-04 -7.000000e-01 -9.618878e-04 -8.000000e-01 -1.000158e-03 -9.000000e-01 -1.037151e-03 -1.000000e+00 -1.073452e-03 -1.100000e+00 -1.108869e-03 -1.200000e+00 -1.143316e-03 -1.300000e+00 -1.176829e-03 -1.400000e+00 -1.209508e-03 -1.500000e+00 -1.241482e-03 -1.600000e+00 -1.272878e-03 -1.700000e+00 -1.303819e-03 -1.800000e+00 -1.334413e-03 -2.000000e-01 -5.683511e-04 -3.000000e-01 -8.012639e-04 -4.000000e-01 -9.976646e-04 -5.000000e-01 -1.157759e-03 -6.000000e-01 -1.283041e-03 -7.000000e-01 -1.376634e-03 -8.000000e-01 -1.444425e-03 -9.000000e-01 -1.495785e-03 -1.000000e+00 -1.541363e-03 -1.100000e+00 -1.586280e-03 -1.200000e+00 -1.630723e-03 -1.300000e+00 -1.674363e-03 -1.400000e+00 -1.717034e-03 -1.500000e+00 -1.758688e-03 -1.600000e+00 -1.799356e-03 -1.700000e+00 -1.839111e-03 -1.800000e+00 -1.878049e-03 -2.000000e-01 -7.110119e-04 -3.000000e-01 -1.023798e-03 -4.000000e-01 -1.304292e-03 -5.000000e-01 -1.551180e-03 -6.000000e-01 -1.764275e-03 -7.000000e-01 -1.944317e-03 -8.000000e-01 -2.092836e-03 -9.000000e-01 -2.212260e-03 -1.000000e+00 -2.306272e-03 -1.100000e+00 -2.380108e-03 -1.200000e+00 -2.440595e-03 -1.300000e+00 -2.495570e-03 -1.400000e+00 -2.550297e-03 -1.500000e+00 -2.605143e-03 -1.600000e+00 -2.659431e-03 -1.700000e+00 -2.712869e-03 -1.800000e+00 -2.765344e-03 -2.000000e-01 -8.198897e-04 -3.000000e-01 -1.195403e-03 -4.000000e-01 -1.543703e-03 -5.000000e-01 -1.862654e-03 -6.000000e-01 -2.151021e-03 -7.000000e-01 -2.408404e-03 -8.000000e-01 -2.635122e-03 -9.000000e-01 -2.832075e-03 -1.000000e+00 -3.000670e-03 -1.100000e+00 -3.142845e-03 -1.200000e+00 -3.261185e-03 -1.300000e+00 -3.359012e-03 -1.400000e+00 -3.440361e-03 -1.500000e+00 -3.509921e-03 -1.600000e+00 -3.573031e-03 -1.700000e+00 -3.634821e-03 -1.800000e+00 -3.697412e-03 ngspice-26/tests/hisim/pmos/reference/66_acFreq_COIGN=0.standard0000644000265600020320000002530212264261473023754 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/69_acFreq_CODFM=0.standard0000644000265600020320000002530212264261473023750 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1258.925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584.893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995.262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511.886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162.278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981.072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011.872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309.573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943.282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 10000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589.25 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848.93 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952.62 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118.86 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622.78 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810.72 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118.72 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095.73 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432.82 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 125892.5 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 158489.3 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 199526.2 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 251188.6 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 316227.8 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 398107.2 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 501187.2 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 630957.3 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 794328.2 2.11171455844556e-14 1.69788632426838e-14 3.49561413489303e-15 1000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 1258925 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 1584893 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 1995262 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 2511886 2.11171572063402e-14 1.69788648518506e-14 3.49561428208827e-15 3162278 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 3981072 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 5011872 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 6309573 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 7943282 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 10000000 2.11171553142619e-14 1.69788562304694e-14 3.49561391654372e-15 12589250 2.11171621694573e-14 1.69788618432594e-14 3.49561485955185e-15 15848930 2.11171494980364e-14 1.69788616932266e-14 3.49561391193746e-15 19952620 2.11171514897803e-14 1.69788606973421e-14 3.49561419488233e-15 25118860 2.11171572063402e-14 1.69788648518506e-14 3.49561428208828e-15 31622780 2.11171486771481e-14 1.69788598541018e-14 3.49561354118749e-15 39810720 2.11171482711135e-14 1.69788587749195e-14 3.49561378987451e-15 50118720 2.11171517393449e-14 1.69788619339763e-14 3.49561386127376e-15 63095730 2.11171534386037e-14 1.6978862534418e-14 3.49561456110004e-15 79432820 2.11171455844556e-14 1.69788632426838e-14 3.49561413489302e-15 100000000 2.1117155314262e-14 1.69788562304694e-14 3.49561391654372e-15 1000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258.925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584.893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995.262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511.886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162.278 2.08988054797393e-14 1.68486984597449e-14 3.40873274812869e-15 3981.072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011.872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309.573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943.282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589.25 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848.93 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952.62 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118.86 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622.78 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810.72 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118.72 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095.73 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432.82 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 125892.5 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 158489.3 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 199526.2 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 251188.6 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 316227.8 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 398107.2 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 501187.2 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 630957.3 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 794328.2 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 1000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1258925 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 1584893 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 1995262 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 2511886 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 3162278 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 3981072 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 5011872 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 6309573 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 7943282 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 10000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 12589250 2.08988072891361e-14 1.68486984662453e-14 3.40873434519155e-15 15848930 2.08988063084553e-14 1.68486972990147e-14 3.40873354707067e-15 19952620 2.08988068183911e-14 1.68486978234251e-14 3.40873338801773e-15 25118860 2.08988097775998e-14 1.68487028940254e-14 3.40873404231322e-15 31622780 2.08988054797393e-14 1.68486984597449e-14 3.4087327481287e-15 39810720 2.08988049110359e-14 1.6848698691475e-14 3.40873299358995e-15 50118720 2.08988066663439e-14 1.68486989537088e-14 3.40873374765451e-15 63095730 2.08988063304251e-14 1.68486997900702e-14 3.40873429669999e-15 79432820 2.08988087036962e-14 1.68486986366303e-14 3.4087342093483e-15 100000000 2.08988106478342e-14 1.68486993180089e-14 3.40873282465929e-15 1000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258.925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584.893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995.262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511.886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162.278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981.072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011.872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309.573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943.282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589.25 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848.93 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952.62 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118.86 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622.78 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810.72 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118.72 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095.73 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432.82 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 125892.5 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 158489.3 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 199526.2 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 251188.6 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 316227.8 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 398107.2 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 501187.2 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 630957.3 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 794328.2 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 1000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 1258925 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 1584893 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 1995262 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 2511886 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 3162278 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 3981072 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 5011872 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 6309573 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 7943282 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 10000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 12589250 2.06409331084511e-14 1.66781055554617e-14 3.32505861094712e-15 15848930 2.06409277678472e-14 1.6678103815843e-14 3.32505758416292e-15 19952620 2.0640929900211e-14 1.6678109318609e-14 3.32505839430593e-15 25118860 2.06409315863188e-14 1.66781104512232e-14 3.32505795490501e-15 31622780 2.06409236575502e-14 1.66781025807285e-14 3.32505742224436e-15 39810720 2.06409273945242e-14 1.66781049485933e-14 3.32505722645022e-15 50118720 2.06409290616552e-14 1.66781047586088e-14 3.32505777287959e-15 63095730 2.06409301271208e-14 1.66781049184957e-14 3.3250575260661e-15 79432820 2.06409199276795e-14 1.66781045400751e-14 3.32505810753794e-15 100000000 2.06409318935424e-14 1.66781011345087e-14 3.32505711332872e-15 ngspice-26/tests/hisim/pmos/reference/38_acVd_WPE.standard0000644000265600020320000000723012264261473023046 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.2 8.630335e-04 5.256786e-03 1.41559838327944e-14 1.23845433531692e-14 -0.3 1.372156e-03 4.469020e-03 1.46984539796706e-14 1.15507631274195e-14 -0.4 1.910046e-03 3.701688e-03 1.52818841376368e-14 1.04960928418629e-14 -0.5 2.464325e-03 2.977336e-03 1.5876464298622e-14 9.16424248125864e-15 -0.6 3.026369e-03 2.304682e-03 1.64037544413881e-14 7.56219504749731e-15 -0.7 3.571334e-03 1.712474e-03 1.67309945299898e-14 5.95607361263292e-15 -0.8 4.036725e-03 1.263681e-03 1.68165745531609e-14 4.78049029433861e-15 -0.9 4.317235e-03 1.042347e-03 1.67733445414562e-14 4.06220109985867e-15 -1 4.430695e-03 9.970745e-04 1.67436645334202e-14 3.76222801863965e-15 -1.1 4.515079e-03 9.797152e-04 1.67437145334338e-14 3.63677598467297e-15 -1.2 4.597998e-03 9.636041e-04 1.67444145336233e-14 3.49666694673783e-15 -1.3 4.681888e-03 9.469130e-04 1.67447645337181e-14 3.33254290230053e-15 -1.4 4.765760e-03 9.305448e-04 1.67449245337614e-14 3.13312684830777e-15 -1.5 4.848415e-03 9.153374e-04 1.6745004533783e-14 2.92914879307982e-15 -1.6 4.928964e-03 9.017724e-04 1.67450445337939e-14 2.73210173972847e-15 -1.7 5.006855e-03 8.900439e-04 1.67450645337993e-14 2.55174069089493e-15 -1.8 5.081808e-03 8.801623e-04 1.6745074533802e-14 2.40297665061641e-15 -0.2 6.927205e-04 4.206682e-03 1.39829837859539e-14 1.2292123328146e-14 -0.3 1.089148e-03 3.646827e-03 1.44981039254249e-14 1.14961031126201e-14 -0.4 1.506444e-03 3.087061e-03 1.50514440752442e-14 1.05061728445921e-14 -0.5 1.935820e-03 2.545967e-03 1.56167442283016e-14 9.28390351365739e-15 -0.6 2.370059e-03 2.034892e-03 1.61360443689044e-14 7.82616111896727e-15 -0.7 2.794790e-03 1.573051e-03 1.65044244686449e-14 6.29990070572561e-15 -0.8 3.176527e-03 1.197617e-03 1.66549645094043e-14 5.05176036778616e-15 -0.9 3.466134e-03 9.504195e-04 1.6653264508944e-14 4.25819515292492e-15 -1 3.625230e-03 8.501199e-04 1.66073244965056e-14 3.77786602287371e-15 -1.1 3.707799e-03 8.270577e-04 1.65916544922629e-14 3.55743496319104e-15 -1.2 3.775764e-03 8.173806e-04 1.65908744920517e-14 3.40985392323283e-15 -1.3 3.844194e-03 8.072597e-04 1.65911744921329e-14 3.26135388302579e-15 -1.4 3.913923e-03 7.961974e-04 1.6591374492187e-14 3.0872248358796e-15 -1.5 3.983947e-03 7.850680e-04 1.65914644922114e-14 2.9042257863318e-15 -1.6 4.053295e-03 7.745616e-04 1.65915144922249e-14 2.73136373952865e-15 -1.7 4.121257e-03 7.650846e-04 1.65915344922304e-14 2.56334369403649e-15 -1.8 4.187381e-03 7.568308e-04 1.65915544922358e-14 2.41265265323623e-15 -0.2 5.262641e-04 3.263947e-03 1.37581737250856e-14 1.21710032953523e-14 -0.3 8.189283e-04 2.877674e-03 1.42394738553997e-14 1.14214530924083e-14 -0.4 1.124576e-03 2.486939e-03 1.47561839953012e-14 1.0506452844668e-14 -0.5 1.437391e-03 2.103855e-03 1.5284784138422e-14 9.40508654646822e-15 -0.6 1.751827e-03 1.738143e-03 1.57844242737017e-14 8.11301219663345e-15 -0.7 2.059992e-03 1.401482e-03 1.618160438124e-14 6.71948281932929e-15 -0.8 2.346296e-03 1.112972e-03 1.64054144418375e-14 5.45284447638144e-15 -0.9 2.588301e-03 8.941830e-04 1.64662244583021e-14 4.52515322520498e-15 -1 2.766437e-03 7.569717e-04 1.64447944524999e-14 3.9303270641532e-15 -1.1 2.877304e-03 6.939224e-04 1.64091544428502e-14 3.54534795991843e-15 -1.2 2.945001e-03 6.737703e-04 1.63924244383204e-14 3.32339789982448e-15 -1.3 2.998591e-03 6.665290e-04 1.63887044373132e-14 3.17614685995562e-15 -1.4 3.050626e-03 6.606329e-04 1.63881144371535e-14 3.02410181878876e-15 -1.5 3.103433e-03 6.541666e-04 1.63880544371372e-14 2.86487877567843e-15 -1.6 3.156754e-03 6.473775e-04 1.63880744371427e-14 2.70986073370662e-15 -1.7 3.209958e-03 6.407282e-04 1.63880944371481e-14 2.5660616947724e-15 -1.8 3.262504e-03 6.345610e-04 1.63881144371535e-14 2.42738265722445e-15 ngspice-26/tests/hisim/pmos/parameters/0000755000265600020320000000000012264261473017625 5ustar andreasadminngspice-26/tests/hisim/pmos/parameters/pmosParameters0000644000265600020320000000732512264261473022561 0ustar andreasadmin+ CORSRD = ( 0 ) + CORG = ( 0 ) + COADOV = ( 1 ) + COISUB = ( 0 ) + COIIGS = ( 0 ) + COGIDL = ( 0 ) + COOVLP = ( 1 ) + COFLICK = ( 0 ) + COISTI = ( 0 ) + CONQS = ( 0 ) + COTHRML = ( 0 ) + COIGN = ( 0 ) + CODFM = ( 0 ) + CORBNET = ( 0 ) + COQY = ( 0 ) + CORECIP = ( 1 ) + VMAX = ( 2.003E+06 ) + BGTMP1 = ( 0.000695 ) + BGTMP2 = ( -6.934E-07 ) + EG0 = ( 1.024 ) + TOX = ( 1.6E-09 ) + XLD = ( 3.88E-09 ) + LOVER = ( 1.9E-08 ) + DDLTMAX = ( 10 ) + DDLTSLP = ( 2.72 ) + DDLTICT = ( 1.278 ) + VFBOVER = ( 0.0 ) + NOVER = ( 1.7E+19 ) + XWD = ( -7.244E-09 ) + XL = ( 0 ) + XW = ( 0 ) + SAREF = ( 0 ) + SBREF = ( 0 ) + LL = ( 0 ) + LLD = ( 0 ) + LLN = ( 0 ) + WL = ( 0 ) + WL1 = ( 5.129E-08 ) + WL1P = ( 0 ) + WL2 = ( -0.0007244 ) + WL2P = ( 0.837 ) + WLD = ( 0 ) + WLN = ( 0 ) + RSH = ( 0 ) + RSHG = ( 0 ) + XQY = ( 10E-09 ) + XQY1 = ( 0 ) + XQY2 = ( 0 ) + RS = ( 5E-05 ) + RD = ( 5E-05 ) + VFBC = ( -0.9409 ) + VBI = ( 1.1 ) + NSUBC = ( 6.73E+16 ) + PARL2 = ( 3E-09 ) + LP = ( 1E-07 ) + NSUBP = ( 1.025E+18 ) + NSUBPW = ( -0.0007244 ) + NSUBPWP = ( 2.116 ) + SCP1 = ( 0 ) + SCP2 = ( 0 ) + SCP3 = ( 6.166E-08 ) + SC1 = ( 0 ) + SC2 = ( 0 ) + SC3 = ( 1.175E-07 ) + PGD1 = ( 0 ) + PGD2 = ( 0 ) + PGD4 = ( 0.129 ) + BB = ( 1 ) + NDEP = ( 0.7994 ) + NDEPL = ( 0.02291 ) + NDEPLP = ( 1.242 ) + NINV = ( 0.5 ) + MUECB0 = ( 1E+05 ) + MUECB1 = ( 6.95 ) + MUEPH0 = ( 0.3 ) + MUEPH1 = ( 5538 ) + MUEPHW = ( -0.1233 ) + MUEPWP = ( 0.2553 ) + MUEPHL = ( -0.7652 ) + MUEPLP = ( 3.774 ) + MUEPHS = ( 1.776E-07 ) + MUEPSP = ( 3 ) + VTMP = ( -0.8463 ) + WVTH0 = ( -0.00558 ) + MUESR0 = ( 2 ) + MUESR1 = ( 4.111E+14 ) + MUESRL = ( 0.001759 ) + MUESRW = ( -5.248E-06 ) + MUESWP = ( 3 ) + MUESLP = ( 1 ) + MUETMP = ( 0.9632 ) + SUB1 = ( 0 ) + SUB2 = ( 0 ) + SVGS = ( 0 ) + SVBS = ( 0 ) + SVBSL = ( 0 ) + SVDS = ( 0 ) + SLG = ( 0 ) + SUB1L = ( 0 ) + SUB2L = ( 0 ) + SVGSL = ( 0 ) + SVGSLP = ( 0 ) + SVGSWP = ( 0 ) + SVGSW = ( 0 ) + SVBSLP = ( 0 ) + SLGL = ( 0 ) + SLGLP = ( 0 ) + SUB1LP = ( 0 ) + NSTI = ( 5.176E+16 ) + WSTI = ( 0 ) + WSTIL = ( 0 ) + WSTILP = ( 0 ) + WSTIW = ( 0 ) + WSTIWP = ( 0 ) + SCSTI1 = ( 0 ) + SCSTI2 = ( 0 ) + VTHSTI = ( 0 ) + VDSTI = ( 0 ) + MUESTI1 = ( 0 ) + MUESTI2 = ( 0 ) + MUESTI3 = ( 0 ) + NSUBPSTI1 = ( 0 ) + NSUBPSTI2 = ( 0 ) + NSUBPSTI3 = ( 0 ) + LPEXT = ( 3.656E-06 ) + NPEXT = ( 2.809E+17 ) + SCP21 = ( 0.7031 ) + SCP22 = ( 0 ) + BS1 = ( 0 ) + BS2 = ( 0.9 ) + TPOLY = ( 0 ) + CGBO = ( 0 ) + CLM1 = ( 0.95 ) + CLM2 = ( 3.726 ) + CLM3 = ( 1 ) + CLM5 = ( 0.7568 ) + CLM6 = ( 16.51 ) + VOVER = ( 3.384 ) + VOVERP = ( 0.5 ) + WFC = ( 1E-14 ) + QME1 = ( 1E-12 ) + QME2 = ( 2.0 ) + QME3 = ( 0 ) + VOVERS = ( -0.1423 ) + VOVERSP = ( 0.3 ) + GIDL1 = ( 0.185 ) + GIDL2 = ( 1.4E+07 ) + GIDL3 = ( 0.88 ) + GIDL4 = ( 0.45 ) + GIDL5 = ( 0 ) + GLEAK1 = ( 1.15E+06 ) + GLEAK2 = ( 4.7E+07 ) + GLEAK3 = ( 0.07 ) + GLEAK4 = ( 0.3 ) + GLEAK5 = ( 1.1E+06 ) + GLEAK6 = ( 0.88 ) + GLEAK7 = ( 5.4E-07 ) + GLKSD1 = ( 5E-14 ) + GLKSD2 = ( 3.5E+06 ) + GLKSD3 = ( 0.55 ) + GLKB1 = ( 0 ) + GLKB2 = ( 0 ) + GLKB3 = ( 0 ) + EGIG = ( 0 ) + IGTEMP2 = ( 0 ) + IGTEMP3 = ( 0 ) + VZADD0 = ( 0.1 ) + PZADD0 = ( 0.1 ) + NFTRP = ( 0 ) + NFALP = ( 0 ) + CIT = ( 0 ) + KAPPA = ( 3.9 ) + CGSO = ( 0 ) + CGDO = ( 0 ) + TNOM = ( 25 ) + OVSLP = ( 2.318E-07 ) + OVMAG = ( 5.201 ) + IBPC1 = ( 0 ) + IBPC2 = ( 0 ) + DLY1 = ( 1.995E-09 ) + DLY2 = ( 0.195 ) + DLY3 = ( 8.511E-08 ) + GDL = ( 0.02028 ) + GDLP = ( 0.3548 ) + SC4 = ( 0 ) + MUEPLD = ( 1.0e-6 ) + NINVD = ( 0 ) + NSUBPL = ( 0.3483 ) + NSUBPFAC = ( 0.7309 ) + NSUBCW = ( 0 ) + NSUBCWP = ( 0 ) + NSUBCMAX = ( 1E+18 ) + QYRAT = ( 0.5 ) + PTL = ( 1.899 ) + PT2 = ( 6.931 ) + PTP = ( 4 ) + PTLP = ( 0.7645 ) + PT4 = ( 10 ) + PT4P = ( 0 ) + GDLD = ( 0 ) + MUEPHL2 = ( 0 ) + MUEPLP2 = ( 1 ) + NSUBCW2 = ( 0 ) + NSUBCWP2 = ( 1 ) + MUEPHW2 = ( 0 ) + MUEPWP2 = ( 1 ) + SC3VBS = ( -2.5 ) ngspice-26/tests/hisim/pmos/qaSpec0000644000265600020320000006361312264261473016632 0ustar andreasadmin // // Test specification for HiSIM (version 2.7.0) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // `ifdef ngspice nTypeSelectionArguments pmos level=61 version=270 pTypeSelectionArguments nmos level=61 version=270 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 scaleParameters m // // Specific tests // test 1_dcSweep_CORSRD=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters CORSRD=0 GDLD=0.001 test 2_dcSweep_CORSRD=-1_GDLD temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=1.0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.1 NRS=0.01 modelParameters CORSRD=-1 RSH=1 GDLD=0.0001 test 3_dcSweep_CORSRD=-1_PT temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=-0.5 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.01 NRS=0.1 AD=1e-8 AS=1e-8 PD=1e-3 PS=1e-3 modelParameters CORSRD=-1 RSH=10 PT4P=0.1 test 4_dcSweep_NSUBPFAC temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters NSUBPL=0.1 NSUBPFAC=0.6 test 5_dcSweep_NSUBPDLT temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters NSUBPL=0.1 NSUBPFAC=0.8 NSUBPDLT=0.0001 test 6_dcSweep_COISUB=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=0 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 7_dcSweep_COISUB=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=1 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 8_dcSweep_COIIGS=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 test 9_dcSweep_COIIGS=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=1 test 10_dcSweep_COGIDL=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 GIDL7=1.05 test 11_dcSweep_COGIDL=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 test 12_dcSweep_COGIDL=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL7=1.05 test 13_dcSweep_COISTI=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=0 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=5 modelParameters NSUBPSTI1=2e-6 NSUBPSTI2=1e-6 NSUBPSTI3=1.5 test 14_dcSweep_COISTI=1_NSUBC temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=5 modelParameters NSUBCSTI1=2e-6 NSUBCSTI2=1e-6 NSUBCSTI3=1.4 test 15_dcSweep_COISTI=1_NSUBP temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=2 modelParameters NSUBPSTI1=2e-6 NSUBPSTI2=1e-6 NSUBPSTI3=1.5 test 16_dcSweep_WPE temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=1E16 NPEXTWPE=1E16 instanceParameters SCA=4.244122e-01 SCB=2.561023e-09 SCC=3.215142e-18 test 19_dcSweep_CORG=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=0 RSHG=10 test 20_dcSweep_CORG=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=1 RSHG=10 test 21_dcSweep_CORBNET=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=0 test 22_dcSweep_CORBNET=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=1 test 23_dcSweep_CODFM=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=0 test 24_dcSweep_CODFM=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=1 test 25_dcSweep_VFBCL temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 biasList V(g)=-0.4,-0.6,-0.8,-1.0,-1.2,-1.5,-1.8 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters VFBCL=0.8 VFBCLP=1.2 test 35_acVd_CORSRD=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(g)=-1.2 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORSRD=0 GDLD=0.001 test 36_acVd_CORSRD=-1_GDLD temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=1.0 V(g)=-1.2 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=1 NRS=0.1 modelParameters CORSRD=-1 RSH=10 GDLD=0.001 test 37_acVd_CORSRD=-1_PT temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=-0.5 V(g)=-1.2 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.1 NRS=1 AD=1e-8 AS=1e-8 PD=1e-3 PS=1e-3 modelParameters CORSRD=-1 RSH=100 PT4P=0.1 test 38_acVd_WPE temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=-0.5 V(g)=-1.2 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=2E16 NPEXTWPE=3E16 instanceParameters SCA=4.25e-01 SCB=2.56e-09 SCC=3.2e-18 test 39_acVd_VFBCL temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=-0.5 V(g)=-1.2 biasSweep V(d)=-0.2,-1.800000000001,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=500e-9 modelParameters VFBCL=0.8 VFBCLP=1.2 test 45_acFreq_COOVLP=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COOVLP=1 test 46_acFreq_COISUB=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=0 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 47_acFreq_COISUB=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=1 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 48_acFreq_COIIGS=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 test 49_acFreq_COIIGS=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=1 test 50_acFreq_COGIDL=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=0 GIDL6=-1.0 GIDL7=1.05 test 51_acFreq_COGIDL=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 GIDL7=1.05 test 52_acFreq_COSTI=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=0 test 53_acFreq_COSTI=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 test 54_acFreq_COADOV=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COADOV=0 test 55_acFreq_COADOV=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COADOV=1 test 56_acFreq_CONQS=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CONQS=0 test 57_acFreq_CONQS=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CONQS=1 test 58_acFreq_CORG=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=0 RSHG=10 test 59_acFreq_CORG=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=1 RSHG=10 test 60_acFreq_CORBNET=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=0 test 61_acFreq_CORBNET=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=1 test 62_acFreq_COFLICK=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COFLICK=0 test 63_acFreq_COFLICK=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COFLICK=1 test 64_acFreq_COTHRML=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COTHRML=0 test 65_acFreq_COTHRML=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COTHRML=1 test 66_acFreq_COIGN=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIGN=0 test 67_acFreq_COIGN=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIGN=1 test 68_acFreq_WPE temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=1E16 NPEXTWPE=1E16 instanceParameters SCA=4.25e-01 SCB=2.56e-09 SCC=3.2e-18 test 69_acFreq_CODFM=0 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=0 test 70_acFreq_CODFM=1 temperature -55 27 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.5 V(g)=-1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=1 test 75_noise_COIGN=1_T27 temperature 27 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 76_noise_COIGN=1_T-55 temperature -55 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 77_noise_COIGN=1_T150 temperature 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 78_noise_COIGN=0_T27 temperature 27 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 test 79_noise_COIGN=0_T-55 temperature -55 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 test 80_noise_COIGN=0_T150 temperature 150 modelParameters parameters/pmosParameters biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.5,-1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 ngspice-26/tests/hisim/pmos/run0000644000265600020320000000010612264261473016206 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean ngspice | tee cmcqa_pmos.log ngspice-26/tests/hisim/Makefile.am0000644000265600020320000000050712264261473016542 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in clean-local: rm -rf nmos/results pmos/results ngspiceCkt ngspice-26/tests/hisim/nmos/0000755000265600020320000000000012264261473015460 5ustar andreasadminngspice-26/tests/hisim/nmos/reference/0000755000265600020320000000000012264261473017416 5ustar andreasadminngspice-26/tests/hisim/nmos/reference/56_acFreq_CONQS=0.standard0000644000265600020320000002533012264261473023776 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/53_acFreq_COSTI=1.standard0000644000265600020320000002533012264261473023772 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/75_noise_COIGN=1_T27.standard0000644000265600020320000000712012264261473024321 0ustar andreasadminFreq N(g) 1000 5.562967e-39 1258.925 8.816708e-39 1584.893 1.397354e-38 1995.262 2.214657e-38 2511.886 3.509995e-38 3162.278 5.562967e-38 3981.072 8.816708e-38 5011.872 1.397354e-37 6309.573 2.214657e-37 7943.282 3.509995e-37 10000 5.562967e-37 12589.25 8.816708e-37 15848.93 1.397354e-36 19952.62 2.214657e-36 25118.86 3.509995e-36 31622.78 5.562967e-36 39810.72 8.816708e-36 50118.72 1.397354e-35 63095.73 2.214657e-35 79432.82 3.509995e-35 100000 5.562967e-35 125892.5 8.816708e-35 158489.3 1.397354e-34 199526.2 2.214657e-34 251188.6 3.509995e-34 316227.8 5.562967e-34 398107.2 8.816708e-34 501187.2 1.397354e-33 630957.3 2.214657e-33 794328.2 3.509995e-33 1000000 5.562967e-33 1258925 8.816708e-33 1584893 1.397354e-32 1995262 2.214657e-32 2511886 3.509995e-32 3162278 5.562967e-32 3981072 8.816708e-32 5011872 1.397354e-31 6309573 2.214657e-31 7943282 3.509995e-31 10000000 5.562967e-31 12589250 8.816708e-31 15848930 1.397354e-30 19952620 2.214657e-30 25118860 3.509995e-30 31622780 5.562967e-30 39810720 8.816708e-30 50118720 1.397354e-29 63095730 2.214657e-29 79432820 3.509995e-29 100000000 5.562967e-29 125892500 8.816708e-29 158489300 1.397354e-28 199526200 2.214657e-28 251188600 3.509995e-28 316227800 5.562967e-28 398107200 8.816708e-28 501187200 1.397354e-27 630957300 2.214657e-27 794328200 3.509995e-27 1000000000 5.562967e-27 1258925000 8.816708e-27 1584893000 1.397354e-26 1995262000 2.214657e-26 2511886000 3.509995e-26 3162278000 5.562967e-26 3981072000 8.816708e-26 5011872000 1.397354e-25 6309573000 2.214657e-25 7943282000 3.509995e-25 10000000000 5.562967e-25 12589250000 8.816708e-25 15848930000 1.397354e-24 19952620000 2.214657e-24 25118860000 3.509995e-24 31622780000 5.562967e-24 39810720000 8.816708e-24 50118720000 1.397354e-23 63095730000 2.214657e-23 79432820000 3.509995e-23 100000000000 5.562967e-23 1000 1.769373e-39 1258.925 2.804268e-39 1584.893 4.444465e-39 1995.262 7.044002e-39 2511.886 1.116399e-38 3162.278 1.769373e-38 3981.072 2.804268e-38 5011.872 4.444465e-38 6309.573 7.044002e-38 7943.282 1.116399e-37 10000 1.769373e-37 12589.25 2.804268e-37 15848.93 4.444465e-37 19952.62 7.044002e-37 25118.86 1.116399e-36 31622.78 1.769373e-36 39810.72 2.804268e-36 50118.72 4.444465e-36 63095.73 7.044002e-36 79432.82 1.116399e-35 100000 1.769373e-35 125892.5 2.804268e-35 158489.3 4.444465e-35 199526.2 7.044002e-35 251188.6 1.116399e-34 316227.8 1.769373e-34 398107.2 2.804268e-34 501187.2 4.444465e-34 630957.3 7.044002e-34 794328.2 1.116399e-33 1000000 1.769373e-33 1258925 2.804268e-33 1584893 4.444465e-33 1995262 7.044002e-33 2511886 1.116399e-32 3162278 1.769373e-32 3981072 2.804268e-32 5011872 4.444465e-32 6309573 7.044002e-32 7943282 1.116399e-31 10000000 1.769373e-31 12589250 2.804268e-31 15848930 4.444465e-31 19952620 7.044002e-31 25118860 1.116399e-30 31622780 1.769373e-30 39810720 2.804268e-30 50118720 4.444465e-30 63095730 7.044002e-30 79432820 1.116399e-29 100000000 1.769373e-29 125892500 2.804268e-29 158489300 4.444465e-29 199526200 7.044002e-29 251188600 1.116399e-28 316227800 1.769373e-28 398107200 2.804268e-28 501187200 4.444465e-28 630957300 7.044002e-28 794328200 1.116399e-27 1000000000 1.769373e-27 1258925000 2.804268e-27 1584893000 4.444465e-27 1995262000 7.044002e-27 2511886000 1.116399e-26 3162278000 1.769373e-26 3981072000 2.804268e-26 5011872000 4.444465e-26 6309573000 7.044002e-26 7943282000 1.116399e-25 10000000000 1.769373e-25 12589250000 2.804268e-25 15848930000 4.444465e-25 19952620000 7.044002e-25 25118860000 1.116399e-24 31622780000 1.769373e-24 39810720000 2.804268e-24 50118720000 4.444465e-24 63095730000 7.044002e-24 79432820000 1.116399e-23 100000000000 1.769373e-23 ngspice-26/tests/hisim/nmos/reference/10_dcSweep_COGIDL=0.standard0000644000265600020320000003372712264261473024244 0ustar andreasadminV(d) I(d) I(b) 2.000000e-01 1.031423e-06 -8.357176e-11 3.000000e-01 1.188107e-06 -4.391570e-10 4.000000e-01 1.364874e-06 -1.462508e-09 5.000000e-01 1.557485e-06 -3.674970e-09 6.000000e-01 1.761610e-06 -7.584140e-09 7.000000e-01 1.974746e-06 -1.354086e-08 8.000000e-01 2.195597e-06 -2.169250e-08 9.000000e-01 2.423442e-06 -3.203182e-08 1.000000e+00 2.657827e-06 -4.447691e-08 1.100000e+00 2.898448e-06 -5.893228e-08 1.200000e+00 3.145092e-06 -7.531895e-08 1.300000e+00 3.397609e-06 -9.358284e-08 1.400000e+00 3.655896e-06 -1.136925e-07 1.500000e+00 3.919879e-06 -1.356337e-07 1.600000e+00 4.189503e-06 -1.594038e-07 1.700000e+00 4.464729e-06 -1.850077e-07 1.800000e+00 4.745525e-06 -2.124546e-07 2.000000e-01 3.625489e-04 -2.499923e-11 3.000000e-01 3.836436e-04 -1.598849e-10 4.000000e-01 4.033953e-04 -6.159265e-10 5.000000e-01 4.229029e-04 -1.731230e-09 6.000000e-01 4.423792e-04 -3.904251e-09 7.000000e-01 4.618477e-04 -7.489497e-09 8.000000e-01 4.813174e-04 -1.272872e-08 9.000000e-01 5.008038e-04 -1.974701e-08 1.000000e+00 5.203246e-04 -2.858868e-08 1.100000e+00 5.398967e-04 -3.925761e-08 1.200000e+00 5.595340e-04 -5.174462e-08 1.300000e+00 5.792481e-04 -6.604119e-08 1.400000e+00 5.990480e-04 -8.214422e-08 1.500000e+00 6.189407e-04 -1.000565e-07 1.600000e+00 6.389320e-04 -1.197853e-07 1.700000e+00 6.590260e-04 -1.413412e-07 1.800000e+00 6.792263e-04 -1.647365e-07 2.000000e-01 1.846855e-03 -3.955921e-12 3.000000e-01 1.974260e-03 -3.713309e-11 4.000000e-01 2.031600e-03 -1.860791e-10 5.000000e-01 2.082672e-03 -6.326508e-10 6.000000e-01 2.130366e-03 -1.646546e-09 7.000000e-01 2.175741e-03 -3.530079e-09 8.000000e-01 2.219471e-03 -6.554020e-09 9.000000e-01 2.261993e-03 -1.092310e-08 1.000000e+00 2.303604e-03 -1.677591e-08 1.100000e+00 2.344511e-03 -2.420202e-08 1.200000e+00 2.384864e-03 -3.326050e-08 1.300000e+00 2.424772e-03 -4.399343e-08 1.400000e+00 2.464317e-03 -5.643380e-08 1.500000e+00 2.503563e-03 -7.060975e-08 1.600000e+00 2.542559e-03 -8.654646e-08 1.700000e+00 2.581344e-03 -1.042670e-07 1.800000e+00 2.619950e-03 -1.237927e-07 2.000000e-01 3.343576e-03 -1.412325e-13 3.000000e-01 3.817799e-03 -3.405915e-12 4.000000e-01 4.017738e-03 -3.004430e-11 5.000000e-01 4.104539e-03 -1.479593e-10 6.000000e-01 4.168575e-03 -4.986518e-10 7.000000e-01 4.228357e-03 -1.291141e-09 8.000000e-01 4.284869e-03 -2.764952e-09 9.000000e-01 4.338711e-03 -5.149148e-09 1.000000e+00 4.390433e-03 -8.638407e-09 1.100000e+00 4.440487e-03 -1.338774e-08 1.200000e+00 4.489227e-03 -1.951758e-08 1.300000e+00 4.536916e-03 -2.712178e-08 1.400000e+00 4.583757e-03 -3.627474e-08 1.500000e+00 4.629899e-03 -4.703687e-08 1.600000e+00 4.675460e-03 -5.945826e-08 1.700000e+00 4.720529e-03 -7.358120e-08 1.800000e+00 4.765179e-03 -8.944195e-08 2.000000e-01 4.575745e-03 -2.230055e-16 3.000000e-01 5.436588e-03 -2.435248e-14 4.000000e-01 5.883336e-03 -1.130306e-12 5.000000e-01 6.122649e-03 -1.378676e-11 6.000000e-01 6.251933e-03 -8.090980e-11 7.000000e-01 6.328676e-03 -3.024543e-10 8.000000e-01 6.392837e-03 -8.378408e-10 9.000000e-01 6.453952e-03 -1.883733e-09 1.000000e+00 6.512530e-03 -3.644615e-09 1.100000e+00 6.568847e-03 -6.311214e-09 1.200000e+00 6.623226e-03 -1.005034e-08 1.300000e+00 6.675982e-03 -1.500297e-08 1.400000e+00 6.727390e-03 -2.128645e-08 1.500000e+00 6.777680e-03 -2.899811e-08 1.600000e+00 6.827038e-03 -3.821886e-08 1.700000e+00 6.875613e-03 -4.901635e-08 1.800000e+00 6.923523e-03 -6.144752e-08 2.000000e-01 5.870243e-03 -2.000000e-16 3.000000e-01 7.364527e-03 -3.000000e-16 4.000000e-01 8.250873e-03 -4.000002e-16 5.000000e-01 8.791206e-03 -9.432078e-16 6.000000e-01 9.132925e-03 -1.574606e-13 7.000000e-01 9.355002e-03 -4.175390e-12 8.000000e-01 9.502595e-03 -3.522104e-11 9.000000e-01 9.604011e-03 -1.596554e-10 1.000000e+00 9.676654e-03 -4.962552e-10 1.100000e+00 9.739828e-03 -1.204510e-09 1.200000e+00 9.800796e-03 -2.463643e-09 1.300000e+00 9.859962e-03 -4.453857e-09 1.400000e+00 9.917434e-03 -7.344176e-09 1.500000e+00 9.973358e-03 -1.128647e-08 1.600000e+00 1.002790e-02 -1.641368e-08 1.700000e+00 1.008124e-02 -2.284040e-08 1.800000e+00 1.013352e-02 -3.066465e-08 2.000000e-01 6.544617e-03 -2.000000e-16 3.000000e-01 8.629425e-03 -3.000000e-16 4.000000e-01 1.002415e-02 -4.000000e-16 5.000000e-01 1.095009e-02 -5.000000e-16 6.000000e-01 1.157533e-02 -6.000000e-16 7.000000e-01 1.200797e-02 -7.000010e-16 8.000000e-01 1.231437e-02 -1.976755e-15 9.000000e-01 1.253558e-02 -3.129946e-13 1.000000e+00 1.269838e-02 -6.866102e-12 1.100000e+00 1.282132e-02 -5.067109e-11 1.200000e+00 1.291696e-02 -2.088579e-10 1.300000e+00 1.299134e-02 -6.064997e-10 1.400000e+00 1.305478e-02 -1.401704e-09 1.500000e+00 1.311590e-02 -2.766695e-09 1.600000e+00 1.317556e-02 -4.872670e-09 1.700000e+00 1.323384e-02 -7.880325e-09 1.800000e+00 1.329083e-02 -1.193511e-08 2.000000e-01 6.168542e-06 -1.010111e-10 3.000000e-01 6.993049e-06 -5.221931e-10 4.000000e-01 7.900549e-06 -1.715959e-09 5.000000e-01 8.877411e-06 -4.263871e-09 6.000000e-01 9.902548e-06 -8.715984e-09 7.000000e-01 1.096311e-05 -1.543405e-08 8.000000e-01 1.205254e-05 -2.454828e-08 9.000000e-01 1.316753e-05 -3.601991e-08 1.000000e+00 1.430632e-05 -4.973414e-08 1.100000e+00 1.546788e-05 -6.556801e-08 1.200000e+00 1.665155e-05 -8.342238e-08 1.300000e+00 1.785687e-05 -1.032293e-07 1.400000e+00 1.908350e-05 -1.249483e-07 1.500000e+00 2.033119e-05 -1.485591e-07 1.600000e+00 2.159972e-05 -1.740555e-07 1.700000e+00 2.288890e-05 -2.014396e-07 1.800000e+00 2.419859e-05 -2.307191e-07 2.000000e-01 3.314500e-04 -3.157035e-11 3.000000e-01 3.516445e-04 -1.969242e-10 4.000000e-01 3.692615e-04 -7.438721e-10 5.000000e-01 3.862642e-04 -2.057899e-09 6.000000e-01 4.030353e-04 -4.580242e-09 7.000000e-01 4.196856e-04 -8.689191e-09 8.000000e-01 4.362679e-04 -1.462800e-08 9.000000e-01 4.528196e-04 -2.250769e-08 1.000000e+00 4.693703e-04 -3.235220e-08 1.100000e+00 4.859433e-04 -4.414528e-08 1.200000e+00 5.025569e-04 -5.786086e-08 1.300000e+00 5.192253e-04 -7.347737e-08 1.400000e+00 5.359597e-04 -9.098197e-08 1.500000e+00 5.527689e-04 -1.103703e-07 1.600000e+00 5.696598e-04 -1.316443e-07 1.700000e+00 5.866380e-04 -1.548106e-07 1.800000e+00 6.037080e-04 -1.798783e-07 2.000000e-01 1.414259e-03 -5.374643e-12 3.000000e-01 1.567979e-03 -4.833572e-11 4.000000e-01 1.628986e-03 -2.347030e-10 5.000000e-01 1.678047e-03 -7.788310e-10 6.000000e-01 1.722926e-03 -1.988198e-09 7.000000e-01 1.764991e-03 -4.195855e-09 8.000000e-01 1.805087e-03 -7.688558e-09 9.000000e-01 1.843776e-03 -1.267264e-08 1.000000e+00 1.881432e-03 -1.927898e-08 1.100000e+00 1.918313e-03 -2.758546e-08 1.200000e+00 1.954596e-03 -3.763900e-08 1.300000e+00 1.990413e-03 -4.947069e-08 1.400000e+00 2.025857e-03 -6.310431e-08 1.500000e+00 2.061002e-03 -7.856037e-08 1.600000e+00 2.095902e-03 -9.585787e-08 1.700000e+00 2.130603e-03 -1.150149e-07 1.800000e+00 2.165138e-03 -1.360485e-07 2.000000e-01 2.542714e-03 -2.218104e-13 3.000000e-01 3.063220e-03 -4.895299e-12 4.000000e-01 3.310856e-03 -4.073095e-11 5.000000e-01 3.420396e-03 -1.924416e-10 6.000000e-01 3.491905e-03 -6.287645e-10 7.000000e-01 3.556334e-03 -1.589291e-09 8.000000e-01 3.616449e-03 -3.338520e-09 9.000000e-01 3.673011e-03 -6.120169e-09 1.000000e+00 3.726728e-03 -1.013368e-08 1.100000e+00 3.778201e-03 -1.553198e-08 1.200000e+00 3.827907e-03 -2.242969e-08 1.300000e+00 3.876207e-03 -3.091338e-08 1.400000e+00 3.923377e-03 -4.105004e-08 1.500000e+00 3.969624e-03 -5.289307e-08 1.600000e+00 4.015107e-03 -6.648627e-08 1.700000e+00 4.059949e-03 -8.186642e-08 1.800000e+00 4.104247e-03 -9.906491e-08 2.000000e-01 3.486631e-03 -2.551739e-16 3.000000e-01 4.388014e-03 -4.368423e-14 4.000000e-01 4.924867e-03 -1.767327e-12 5.000000e-01 5.232529e-03 -1.978481e-11 6.000000e-01 5.399700e-03 -1.096310e-10 7.000000e-01 5.495664e-03 -3.933095e-10 8.000000e-01 5.570695e-03 -1.056383e-09 9.000000e-01 5.640527e-03 -2.318658e-09 1.000000e+00 5.706723e-03 -4.400611e-09 1.100000e+00 5.769682e-03 -7.501340e-09 1.200000e+00 5.829837e-03 -1.178999e-08 1.300000e+00 5.887624e-03 -1.740590e-08 1.400000e+00 5.943435e-03 -2.446247e-08 1.500000e+00 5.997600e-03 -3.305202e-08 1.600000e+00 6.050387e-03 -4.325009e-08 1.700000e+00 6.102016e-03 -5.511900e-08 1.800000e+00 6.152663e-03 -6.871069e-08 2.000000e-01 4.523458e-03 -2.000000e-16 3.000000e-01 5.961592e-03 -3.000000e-16 4.000000e-01 6.939779e-03 -4.000010e-16 5.000000e-01 7.596286e-03 -1.540811e-15 6.000000e-01 8.035751e-03 -2.821553e-13 7.000000e-01 8.327590e-03 -6.520127e-12 8.000000e-01 8.519006e-03 -5.052293e-11 9.000000e-01 8.645415e-03 -2.162978e-10 1.000000e+00 8.735121e-03 -6.452915e-10 1.100000e+00 8.810858e-03 -1.518661e-09 1.200000e+00 8.882455e-03 -3.032434e-09 1.300000e+00 8.951291e-03 -5.377693e-09 1.400000e+00 9.017601e-03 -8.729080e-09 1.500000e+00 9.081596e-03 -1.324009e-08 1.600000e+00 9.143514e-03 -1.904255e-08 1.700000e+00 9.203596e-03 -2.624829e-08 1.800000e+00 9.262063e-03 -3.495156e-08 2.000000e-01 5.146662e-03 -2.000000e-16 3.000000e-01 7.031863e-03 -3.000000e-16 4.000000e-01 8.439639e-03 -4.000000e-16 5.000000e-01 9.465363e-03 -5.000000e-16 6.000000e-01 1.020835e-02 -6.000000e-16 7.000000e-01 1.074777e-02 -7.000050e-16 8.000000e-01 1.114061e-02 -3.556711e-15 9.000000e-01 1.142684e-02 -5.607744e-13 1.000000e+00 1.163539e-02 -1.072015e-11 1.100000e+00 1.178842e-02 -7.268128e-11 1.200000e+00 1.190317e-02 -2.829505e-10 1.300000e+00 1.199275e-02 -7.886388e-10 1.400000e+00 1.206906e-02 -1.767282e-09 1.500000e+00 1.214088e-02 -3.405450e-09 1.600000e+00 1.221035e-02 -5.883379e-09 1.700000e+00 1.227778e-02 -9.366335e-09 1.800000e+00 1.234333e-02 -1.400101e-08 2.000000e-01 2.757259e-05 -1.167501e-10 3.000000e-01 3.089003e-05 -5.961097e-10 4.000000e-01 3.432808e-05 -1.939067e-09 5.000000e-01 3.797211e-05 -4.777481e-09 6.000000e-01 4.176753e-05 -9.695398e-09 7.000000e-01 4.567397e-05 -1.706130e-08 8.000000e-01 4.967057e-05 -2.698863e-08 9.000000e-01 5.374731e-05 -3.941057e-08 1.000000e+00 5.789925e-05 -5.418385e-08 1.100000e+00 6.212376e-05 -7.116231e-08 1.200000e+00 6.641931e-05 -9.023002e-08 1.300000e+00 7.078486e-05 -1.113078e-07 1.400000e+00 7.521966e-05 -1.343479e-07 1.500000e+00 7.972310e-05 -1.593256e-07 1.600000e+00 8.429466e-05 -1.862317e-07 1.700000e+00 8.893388e-05 -2.150668e-07 1.800000e+00 9.364035e-05 -2.458372e-07 2.000000e-01 3.233979e-04 -3.772563e-11 3.000000e-01 3.491753e-04 -2.308894e-10 4.000000e-01 3.669813e-04 -8.592668e-10 5.000000e-01 3.832653e-04 -2.348611e-09 6.000000e-01 3.989996e-04 -5.175240e-09 7.000000e-01 4.144464e-04 -9.735457e-09 8.000000e-01 4.297238e-04 -1.627147e-08 9.000000e-01 4.449024e-04 -2.488053e-08 1.000000e+00 4.600301e-04 -3.556822e-08 1.100000e+00 4.751410e-04 -4.830073e-08 1.200000e+00 4.902604e-04 -6.303764e-08 1.300000e+00 5.054073e-04 -7.974649e-08 1.400000e+00 5.205961e-04 -9.840651e-08 1.500000e+00 5.358383e-04 -1.190076e-07 1.600000e+00 5.511427e-04 -1.415476e-07 1.700000e+00 5.665166e-04 -1.660301e-07 1.800000e+00 5.819659e-04 -1.924619e-07 2.000000e-01 1.006788e-03 -6.789385e-12 3.000000e-01 1.176557e-03 -5.910440e-11 4.000000e-01 1.246390e-03 -2.802022e-10 5.000000e-01 1.291248e-03 -9.128232e-10 6.000000e-01 1.330238e-03 -2.296286e-09 7.000000e-01 1.366190e-03 -4.788312e-09 8.000000e-01 1.400055e-03 -8.687139e-09 9.000000e-01 1.432435e-03 -1.419841e-08 1.000000e+00 1.463737e-03 -2.144489e-08 1.100000e+00 1.494246e-03 -3.049357e-08 1.200000e+00 1.524157e-03 -4.138053e-08 1.300000e+00 1.553612e-03 -5.412742e-08 1.400000e+00 1.582713e-03 -6.875022e-08 1.500000e+00 1.611537e-03 -8.526318e-08 1.600000e+00 1.640141e-03 -1.036803e-07 1.700000e+00 1.668572e-03 -1.240157e-07 1.800000e+00 1.696865e-03 -1.462832e-07 2.000000e-01 1.720602e-03 -3.128548e-13 3.000000e-01 2.182212e-03 -6.454063e-12 4.000000e-01 2.443001e-03 -5.136777e-11 5.000000e-01 2.573625e-03 -2.351712e-10 6.000000e-01 2.648908e-03 -7.504850e-10 7.000000e-01 2.710124e-03 -1.862555e-09 8.000000e-01 2.766326e-03 -3.855720e-09 9.000000e-01 2.818915e-03 -6.984241e-09 1.000000e+00 2.868551e-03 -1.144977e-08 1.100000e+00 2.915803e-03 -1.740197e-08 1.200000e+00 2.961154e-03 -2.494955e-08 1.300000e+00 3.004988e-03 -3.417231e-08 1.400000e+00 3.047602e-03 -4.513064e-08 1.500000e+00 3.089227e-03 -5.787195e-08 1.600000e+00 3.130040e-03 -7.243477e-08 1.700000e+00 3.170181e-03 -8.885133e-08 1.800000e+00 3.209758e-03 -1.071491e-07 2.000000e-01 2.344551e-03 -3.073317e-16 3.000000e-01 3.101925e-03 -6.827024e-14 4.000000e-01 3.621184e-03 -2.484117e-12 5.000000e-01 3.954178e-03 -2.605381e-11 6.000000e-01 4.151658e-03 -1.382052e-10 7.000000e-01 4.267092e-03 -4.805709e-10 8.000000e-01 4.348382e-03 -1.260817e-09 9.000000e-01 4.419818e-03 -2.717273e-09 1.000000e+00 4.486880e-03 -5.082304e-09 1.100000e+00 4.550444e-03 -8.560380e-09 1.200000e+00 4.610920e-03 -1.332116e-08 1.300000e+00 4.668716e-03 -1.950149e-08 1.400000e+00 4.724227e-03 -2.721070e-08 1.500000e+00 4.777809e-03 -3.653642e-08 1.600000e+00 4.829764e-03 -4.754940e-08 1.700000e+00 4.880342e-03 -6.030743e-08 1.800000e+00 4.929753e-03 -7.485822e-08 2.000000e-01 3.084402e-03 -2.000000e-16 3.000000e-01 4.235437e-03 -3.000000e-16 4.000000e-01 5.122679e-03 -4.000034e-16 5.000000e-01 5.785658e-03 -2.492623e-15 6.000000e-01 6.267956e-03 -4.400792e-13 7.000000e-01 6.608144e-03 -9.155390e-12 8.000000e-01 6.840111e-03 -6.651016e-11 9.000000e-01 6.995611e-03 -2.726433e-10 1.000000e+00 7.104437e-03 -7.884259e-10 1.100000e+00 7.191525e-03 -1.812526e-09 1.200000e+00 7.270756e-03 -3.553734e-09 1.300000e+00 7.346167e-03 -6.210728e-09 1.400000e+00 7.418541e-03 -9.961443e-09 1.500000e+00 7.488140e-03 -1.495958e-08 1.600000e+00 7.555198e-03 -2.133519e-08 1.700000e+00 7.619958e-03 -2.919715e-08 1.800000e+00 7.682667e-03 -3.863622e-08 2.000000e-01 3.603565e-03 -2.000000e-16 3.000000e-01 5.071371e-03 -3.000000e-16 4.000000e-01 6.281326e-03 -4.000000e-16 5.000000e-01 7.251718e-03 -5.000000e-16 6.000000e-01 8.015715e-03 -6.000000e-16 7.000000e-01 8.608979e-03 -7.000165e-16 8.000000e-01 9.063670e-03 -6.067924e-15 9.000000e-01 9.407070e-03 -8.744318e-13 1.000000e+00 9.662614e-03 -1.505112e-11 1.100000e+00 9.851179e-03 -9.567617e-11 1.200000e+00 9.991500e-03 -3.566535e-10 1.300000e+00 1.010011e-02 -9.635639e-10 1.400000e+00 1.019104e-02 -2.109251e-09 1.500000e+00 1.027396e-02 -3.990872e-09 1.600000e+00 1.035307e-02 -6.794747e-09 1.700000e+00 1.042946e-02 -1.068867e-08 1.800000e+00 1.050346e-02 -1.581933e-08 ngspice-26/tests/hisim/nmos/reference/63_acFreq_COFLICK=1.standard0000644000265600020320000002533012264261473024164 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/47_acFreq_COISUB=1.standard0000644000265600020320000002533012264261473024100 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/76_noise_COIGN=1_T-55.standard0000644000265600020320000000710012264261473024376 0ustar andreasadminFreq N(g) 1000 4.557841e-39 1258.925 7.223691e-39 1584.893 1.144878e-38 1995.262 1.814509e-38 2511.886 2.875803e-38 3162.278 4.557841e-38 3981.072 7.223691e-38 5011.872 1.144878e-37 6309.573 1.814509e-37 7943.282 2.875803e-37 10000 4.557841e-37 12589.25 7.223691e-37 15848.93 1.144878e-36 19952.62 1.814509e-36 25118.86 2.875803e-36 31622.78 4.557841e-36 39810.72 7.223691e-36 50118.72 1.144878e-35 63095.73 1.814509e-35 79432.82 2.875803e-35 100000 4.557841e-35 125892.5 7.223691e-35 158489.3 1.144878e-34 199526.2 1.814509e-34 251188.6 2.875803e-34 316227.8 4.557841e-34 398107.2 7.223691e-34 501187.2 1.144878e-33 630957.3 1.814509e-33 794328.2 2.875803e-33 1000000 4.557841e-33 1258925 7.223691e-33 1584893 1.144878e-32 1995262 1.814509e-32 2511886 2.875803e-32 3162278 4.557841e-32 3981072 7.223691e-32 5011872 1.144878e-31 6309573 1.814509e-31 7943282 2.875803e-31 10000000 4.557841e-31 12589250 7.223691e-31 15848930 1.144878e-30 19952620 1.814509e-30 25118860 2.875803e-30 31622780 4.557841e-30 39810720 7.223691e-30 50118720 1.144878e-29 63095730 1.814509e-29 79432820 2.875803e-29 100000000 4.557841e-29 125892500 7.223691e-29 158489300 1.144878e-28 199526200 1.814509e-28 251188600 2.875803e-28 316227800 4.557841e-28 398107200 7.223691e-28 501187200 1.144878e-27 630957300 1.814509e-27 794328200 2.875803e-27 1000000000 4.557841e-27 1258925000 7.223691e-27 1584893000 1.144878e-26 1995262000 1.814509e-26 2511886000 2.875803e-26 3162278000 4.557841e-26 3981072000 7.223691e-26 5011872000 1.144878e-25 6309573000 1.814509e-25 7943282000 2.875803e-25 10000000000 4.557841e-25 12589250000 7.223691e-25 15848930000 1.144878e-24 19952620000 1.814509e-24 25118860000 2.875803e-24 31622780000 4.557841e-24 39810720000 7.223691e-24 50118720000 1.144878e-23 63095730000 1.814509e-23 79432820000 2.875803e-23 100000000000 4.557841e-23 1000 1.491104e-39 1258.925 2.36324e-39 1584.893 3.745483e-39 1995.262 5.936191e-39 2511.886 9.408228e-39 3162.278 1.491104e-38 3981.072 2.36324e-38 5011.872 3.745483e-38 6309.573 5.936191e-38 7943.282 9.408228e-38 10000 1.491104e-37 12589.25 2.36324e-37 15848.93 3.745483e-37 19952.62 5.936191e-37 25118.86 9.408228e-37 31622.78 1.491104e-36 39810.72 2.36324e-36 50118.72 3.745483e-36 63095.73 5.936191e-36 79432.82 9.408228e-36 100000 1.491104e-35 125892.5 2.36324e-35 158489.3 3.745483e-35 199526.2 5.936191e-35 251188.6 9.408228e-35 316227.8 1.491104e-34 398107.2 2.36324e-34 501187.2 3.745483e-34 630957.3 5.936191e-34 794328.2 9.408228e-34 1000000 1.491104e-33 1258925 2.36324e-33 1584893 3.745483e-33 1995262 5.936191e-33 2511886 9.408228e-33 3162278 1.491104e-32 3981072 2.36324e-32 5011872 3.745483e-32 6309573 5.936191e-32 7943282 9.408228e-32 10000000 1.491104e-31 12589250 2.36324e-31 15848930 3.745483e-31 19952620 5.936191e-31 25118860 9.408228e-31 31622780 1.491104e-30 39810720 2.36324e-30 50118720 3.745483e-30 63095730 5.936191e-30 79432820 9.408228e-30 100000000 1.491104e-29 125892500 2.36324e-29 158489300 3.745483e-29 199526200 5.936191e-29 251188600 9.408228e-29 316227800 1.491104e-28 398107200 2.36324e-28 501187200 3.745483e-28 630957300 5.936191e-28 794328200 9.408228e-28 1000000000 1.491104e-27 1258925000 2.36324e-27 1584893000 3.745483e-27 1995262000 5.936191e-27 2511886000 9.408228e-27 3162278000 1.491104e-26 3981072000 2.36324e-26 5011872000 3.745483e-26 6309573000 5.936191e-26 7943282000 9.408228e-26 10000000000 1.491104e-25 12589250000 2.36324e-25 15848930000 3.745483e-25 19952620000 5.936191e-25 25118860000 9.408228e-25 31622780000 1.491104e-24 39810720000 2.36324e-24 50118720000 3.745483e-24 63095730000 5.936191e-24 79432820000 9.408228e-24 100000000000 1.491104e-23 ngspice-26/tests/hisim/nmos/reference/21_dcSweep_CORBNET=0.standard0000644000265600020320000003372712264261473024401 0ustar andreasadminV(d) I(d) I(b) 2.000000e-01 1.031340e-06 -2.000000e-16 3.000000e-01 1.187668e-06 -3.000000e-16 4.000000e-01 1.363411e-06 -4.000000e-16 5.000000e-01 1.553811e-06 -5.000000e-16 6.000000e-01 1.754026e-06 -6.000000e-16 7.000000e-01 1.961205e-06 -7.000000e-16 8.000000e-01 2.173905e-06 -8.000000e-16 9.000000e-01 2.391410e-06 -9.000000e-16 1.000000e+00 2.613350e-06 -1.000000e-15 1.100000e+00 2.839516e-06 -1.100000e-15 1.200000e+00 3.069773e-06 -1.200000e-15 1.300000e+00 3.304026e-06 -1.300000e-15 1.400000e+00 3.542204e-06 -1.400000e-15 1.500000e+00 3.784246e-06 -1.500000e-15 1.600000e+00 4.030100e-06 -1.600000e-15 1.700000e+00 4.279721e-06 -1.700000e-15 1.800000e+00 4.533070e-06 -1.800000e-15 2.000000e-01 3.625488e-04 -2.000000e-16 3.000000e-01 3.836434e-04 -3.000000e-16 4.000000e-01 4.033947e-04 -4.000000e-16 5.000000e-01 4.229012e-04 -5.000000e-16 6.000000e-01 4.423753e-04 -6.000000e-16 7.000000e-01 4.618402e-04 -7.000000e-16 8.000000e-01 4.813047e-04 -8.000000e-16 9.000000e-01 5.007840e-04 -9.000000e-16 1.000000e+00 5.202960e-04 -1.000000e-15 1.100000e+00 5.398574e-04 -1.100000e-15 1.200000e+00 5.594823e-04 -1.200000e-15 1.300000e+00 5.791821e-04 -1.300000e-15 1.400000e+00 5.989658e-04 -1.400000e-15 1.500000e+00 6.188407e-04 -1.500000e-15 1.600000e+00 6.388122e-04 -1.600000e-15 1.700000e+00 6.588847e-04 -1.700000e-15 1.800000e+00 6.790616e-04 -1.800000e-15 2.000000e-01 1.846855e-03 -2.000000e-16 3.000000e-01 1.974260e-03 -3.000000e-16 4.000000e-01 2.031600e-03 -4.000000e-16 5.000000e-01 2.082672e-03 -5.000000e-16 6.000000e-01 2.130364e-03 -6.000000e-16 7.000000e-01 2.175738e-03 -7.000000e-16 8.000000e-01 2.219464e-03 -8.000000e-16 9.000000e-01 2.261982e-03 -9.000000e-16 1.000000e+00 2.303587e-03 -1.000000e-15 1.100000e+00 2.344487e-03 -1.100000e-15 1.200000e+00 2.384830e-03 -1.200000e-15 1.300000e+00 2.424728e-03 -1.300000e-15 1.400000e+00 2.464261e-03 -1.400000e-15 1.500000e+00 2.503492e-03 -1.500000e-15 1.600000e+00 2.542472e-03 -1.600000e-15 1.700000e+00 2.581239e-03 -1.700000e-15 1.800000e+00 2.619826e-03 -1.800000e-15 2.000000e-01 3.343576e-03 -2.000000e-16 3.000000e-01 3.817799e-03 -3.000000e-16 4.000000e-01 4.017737e-03 -4.000000e-16 5.000000e-01 4.104539e-03 -5.000000e-16 6.000000e-01 4.168574e-03 -6.000000e-16 7.000000e-01 4.228356e-03 -7.000000e-16 8.000000e-01 4.284866e-03 -8.000000e-16 9.000000e-01 4.338706e-03 -9.000000e-16 1.000000e+00 4.390424e-03 -1.000000e-15 1.100000e+00 4.440474e-03 -1.100000e-15 1.200000e+00 4.489207e-03 -1.200000e-15 1.300000e+00 4.536889e-03 -1.300000e-15 1.400000e+00 4.583720e-03 -1.400000e-15 1.500000e+00 4.629852e-03 -1.500000e-15 1.600000e+00 4.675400e-03 -1.600000e-15 1.700000e+00 4.720456e-03 -1.700000e-15 1.800000e+00 4.765089e-03 -1.800000e-15 2.000000e-01 4.575745e-03 -2.000000e-16 3.000000e-01 5.436588e-03 -3.000000e-16 4.000000e-01 5.883336e-03 -4.000000e-16 5.000000e-01 6.122649e-03 -5.000000e-16 6.000000e-01 6.251933e-03 -6.000000e-16 7.000000e-01 6.328676e-03 -7.000000e-16 8.000000e-01 6.392836e-03 -8.000000e-16 9.000000e-01 6.453950e-03 -9.000000e-16 1.000000e+00 6.512526e-03 -1.000000e-15 1.100000e+00 6.568841e-03 -1.100000e-15 1.200000e+00 6.623216e-03 -1.200000e-15 1.300000e+00 6.675967e-03 -1.300000e-15 1.400000e+00 6.727368e-03 -1.400000e-15 1.500000e+00 6.777651e-03 -1.500000e-15 1.600000e+00 6.827000e-03 -1.600000e-15 1.700000e+00 6.875564e-03 -1.700000e-15 1.800000e+00 6.923462e-03 -1.800000e-15 2.000000e-01 5.870243e-03 -2.000000e-16 3.000000e-01 7.364527e-03 -3.000000e-16 4.000000e-01 8.250873e-03 -4.000000e-16 5.000000e-01 8.791206e-03 -5.000000e-16 6.000000e-01 9.132925e-03 -6.000000e-16 7.000000e-01 9.355002e-03 -7.000000e-16 8.000000e-01 9.502595e-03 -8.000000e-16 9.000000e-01 9.604011e-03 -9.000000e-16 1.000000e+00 9.676653e-03 -1.000000e-15 1.100000e+00 9.739827e-03 -1.100000e-15 1.200000e+00 9.800793e-03 -1.200000e-15 1.300000e+00 9.859958e-03 -1.300000e-15 1.400000e+00 9.917427e-03 -1.400000e-15 1.500000e+00 9.973346e-03 -1.500000e-15 1.600000e+00 1.002789e-02 -1.600000e-15 1.700000e+00 1.008122e-02 -1.700000e-15 1.800000e+00 1.013349e-02 -1.800000e-15 2.000000e-01 6.544617e-03 -2.000000e-16 3.000000e-01 8.629425e-03 -3.000000e-16 4.000000e-01 1.002415e-02 -4.000000e-16 5.000000e-01 1.095009e-02 -5.000000e-16 6.000000e-01 1.157533e-02 -6.000000e-16 7.000000e-01 1.200797e-02 -7.000000e-16 8.000000e-01 1.231437e-02 -8.000000e-16 9.000000e-01 1.253558e-02 -9.000000e-16 1.000000e+00 1.269838e-02 -1.000000e-15 1.100000e+00 1.282132e-02 -1.100000e-15 1.200000e+00 1.291696e-02 -1.200000e-15 1.300000e+00 1.299134e-02 -1.300000e-15 1.400000e+00 1.305478e-02 -1.400000e-15 1.500000e+00 1.311590e-02 -1.500000e-15 1.600000e+00 1.317555e-02 -1.600000e-15 1.700000e+00 1.323383e-02 -1.700000e-15 1.800000e+00 1.329082e-02 -1.800000e-15 2.000000e-01 6.168441e-06 -2.000000e-16 3.000000e-01 6.992527e-06 -3.000000e-16 4.000000e-01 7.898833e-06 -4.000000e-16 5.000000e-01 8.873147e-06 -5.000000e-16 6.000000e-01 9.893832e-06 -6.000000e-16 7.000000e-01 1.094768e-05 -7.000000e-16 8.000000e-01 1.202799e-05 -8.000000e-16 9.000000e-01 1.313151e-05 -9.000000e-16 1.000000e+00 1.425659e-05 -1.000000e-15 1.100000e+00 1.540231e-05 -1.100000e-15 1.200000e+00 1.656813e-05 -1.200000e-15 1.300000e+00 1.775364e-05 -1.300000e-15 1.400000e+00 1.895856e-05 -1.400000e-15 1.500000e+00 2.018263e-05 -1.500000e-15 1.600000e+00 2.142567e-05 -1.600000e-15 1.700000e+00 2.268746e-05 -1.700000e-15 1.800000e+00 2.396787e-05 -1.800000e-15 2.000000e-01 3.314500e-04 -2.000000e-16 3.000000e-01 3.516443e-04 -3.000000e-16 4.000000e-01 3.692608e-04 -4.000000e-16 5.000000e-01 3.862621e-04 -5.000000e-16 6.000000e-01 4.030308e-04 -6.000000e-16 7.000000e-01 4.196770e-04 -7.000000e-16 8.000000e-01 4.362533e-04 -8.000000e-16 9.000000e-01 4.527971e-04 -9.000000e-16 1.000000e+00 4.693380e-04 -1.000000e-15 1.100000e+00 4.858992e-04 -1.100000e-15 1.200000e+00 5.024990e-04 -1.200000e-15 1.300000e+00 5.191518e-04 -1.300000e-15 1.400000e+00 5.358687e-04 -1.400000e-15 1.500000e+00 5.526585e-04 -1.500000e-15 1.600000e+00 5.695281e-04 -1.600000e-15 1.700000e+00 5.864832e-04 -1.700000e-15 1.800000e+00 6.035282e-04 -1.800000e-15 2.000000e-01 1.414259e-03 -2.000000e-16 3.000000e-01 1.567979e-03 -3.000000e-16 4.000000e-01 1.628986e-03 -4.000000e-16 5.000000e-01 1.678046e-03 -5.000000e-16 6.000000e-01 1.722925e-03 -6.000000e-16 7.000000e-01 1.764987e-03 -7.000000e-16 8.000000e-01 1.805080e-03 -8.000000e-16 9.000000e-01 1.843763e-03 -9.000000e-16 1.000000e+00 1.881413e-03 -1.000000e-15 1.100000e+00 1.918285e-03 -1.100000e-15 1.200000e+00 1.954559e-03 -1.200000e-15 1.300000e+00 1.990363e-03 -1.300000e-15 1.400000e+00 2.025794e-03 -1.400000e-15 1.500000e+00 2.060923e-03 -1.500000e-15 1.600000e+00 2.095806e-03 -1.600000e-15 1.700000e+00 2.130488e-03 -1.700000e-15 1.800000e+00 2.165002e-03 -1.800000e-15 2.000000e-01 2.542714e-03 -2.000000e-16 3.000000e-01 3.063220e-03 -3.000000e-16 4.000000e-01 3.310856e-03 -4.000000e-16 5.000000e-01 3.420396e-03 -5.000000e-16 6.000000e-01 3.491904e-03 -6.000000e-16 7.000000e-01 3.556333e-03 -7.000000e-16 8.000000e-01 3.616445e-03 -8.000000e-16 9.000000e-01 3.673005e-03 -9.000000e-16 1.000000e+00 3.726718e-03 -1.000000e-15 1.100000e+00 3.778185e-03 -1.100000e-15 1.200000e+00 3.827884e-03 -1.200000e-15 1.300000e+00 3.876176e-03 -1.300000e-15 1.400000e+00 3.923336e-03 -1.400000e-15 1.500000e+00 3.969571e-03 -1.500000e-15 1.600000e+00 4.015041e-03 -1.600000e-15 1.700000e+00 4.059867e-03 -1.700000e-15 1.800000e+00 4.104148e-03 -1.800000e-15 2.000000e-01 3.486631e-03 -2.000000e-16 3.000000e-01 4.388014e-03 -3.000000e-16 4.000000e-01 4.924867e-03 -4.000000e-16 5.000000e-01 5.232529e-03 -5.000000e-16 6.000000e-01 5.399700e-03 -6.000000e-16 7.000000e-01 5.495663e-03 -7.000000e-16 8.000000e-01 5.570693e-03 -8.000000e-16 9.000000e-01 5.640525e-03 -9.000000e-16 1.000000e+00 5.706719e-03 -1.000000e-15 1.100000e+00 5.769675e-03 -1.100000e-15 1.200000e+00 5.829825e-03 -1.200000e-15 1.300000e+00 5.887607e-03 -1.300000e-15 1.400000e+00 5.943411e-03 -1.400000e-15 1.500000e+00 5.997567e-03 -1.500000e-15 1.600000e+00 6.050344e-03 -1.600000e-15 1.700000e+00 6.101961e-03 -1.700000e-15 1.800000e+00 6.152594e-03 -1.800000e-15 2.000000e-01 4.523458e-03 -2.000000e-16 3.000000e-01 5.961592e-03 -3.000000e-16 4.000000e-01 6.939779e-03 -4.000000e-16 5.000000e-01 7.596286e-03 -5.000000e-16 6.000000e-01 8.035751e-03 -6.000000e-16 7.000000e-01 8.327590e-03 -7.000000e-16 8.000000e-01 8.519006e-03 -8.000000e-16 9.000000e-01 8.645414e-03 -9.000000e-16 1.000000e+00 8.735120e-03 -1.000000e-15 1.100000e+00 8.810856e-03 -1.100000e-15 1.200000e+00 8.882452e-03 -1.200000e-15 1.300000e+00 8.951286e-03 -1.300000e-15 1.400000e+00 9.017592e-03 -1.400000e-15 1.500000e+00 9.081583e-03 -1.500000e-15 1.600000e+00 9.143495e-03 -1.600000e-15 1.700000e+00 9.203569e-03 -1.700000e-15 1.800000e+00 9.262028e-03 -1.800000e-15 2.000000e-01 5.146662e-03 -2.000000e-16 3.000000e-01 7.031863e-03 -3.000000e-16 4.000000e-01 8.439639e-03 -4.000000e-16 5.000000e-01 9.465363e-03 -5.000000e-16 6.000000e-01 1.020835e-02 -6.000000e-16 7.000000e-01 1.074777e-02 -7.000000e-16 8.000000e-01 1.114061e-02 -8.000000e-16 9.000000e-01 1.142684e-02 -9.000000e-16 1.000000e+00 1.163539e-02 -1.000000e-15 1.100000e+00 1.178842e-02 -1.100000e-15 1.200000e+00 1.190317e-02 -1.200000e-15 1.300000e+00 1.199275e-02 -1.300000e-15 1.400000e+00 1.206906e-02 -1.400000e-15 1.500000e+00 1.214087e-02 -1.500000e-15 1.600000e+00 1.221034e-02 -1.600000e-15 1.700000e+00 1.227777e-02 -1.700000e-15 1.800000e+00 1.234331e-02 -1.800000e-15 2.000000e-01 2.757247e-05 -2.000000e-16 3.000000e-01 3.088943e-05 -3.000000e-16 4.000000e-01 3.432614e-05 -4.000000e-16 5.000000e-01 3.796733e-05 -5.000000e-16 6.000000e-01 4.175784e-05 -6.000000e-16 7.000000e-01 4.565691e-05 -7.000000e-16 8.000000e-01 4.964358e-05 -8.000000e-16 9.000000e-01 5.370790e-05 -9.000000e-16 1.000000e+00 5.784506e-05 -1.000000e-15 1.100000e+00 6.205260e-05 -1.100000e-15 1.200000e+00 6.632908e-05 -1.200000e-15 1.300000e+00 7.067356e-05 -1.300000e-15 1.400000e+00 7.508532e-05 -1.400000e-15 1.500000e+00 7.956378e-05 -1.500000e-15 1.600000e+00 8.410843e-05 -1.600000e-15 1.700000e+00 8.871881e-05 -1.700000e-15 1.800000e+00 9.339451e-05 -1.800000e-15 2.000000e-01 3.233979e-04 -2.000000e-16 3.000000e-01 3.491751e-04 -3.000000e-16 4.000000e-01 3.669805e-04 -4.000000e-16 5.000000e-01 3.832630e-04 -5.000000e-16 6.000000e-01 3.989944e-04 -6.000000e-16 7.000000e-01 4.144367e-04 -7.000000e-16 8.000000e-01 4.297076e-04 -8.000000e-16 9.000000e-01 4.448775e-04 -9.000000e-16 1.000000e+00 4.599945e-04 -1.000000e-15 1.100000e+00 4.750927e-04 -1.100000e-15 1.200000e+00 4.901974e-04 -1.200000e-15 1.300000e+00 5.053275e-04 -1.300000e-15 1.400000e+00 5.204977e-04 -1.400000e-15 1.500000e+00 5.357192e-04 -1.500000e-15 1.600000e+00 5.510012e-04 -1.600000e-15 1.700000e+00 5.663506e-04 -1.700000e-15 1.800000e+00 5.817735e-04 -1.800000e-15 2.000000e-01 1.006788e-03 -2.000000e-16 3.000000e-01 1.176557e-03 -3.000000e-16 4.000000e-01 1.246390e-03 -4.000000e-16 5.000000e-01 1.291247e-03 -5.000000e-16 6.000000e-01 1.330236e-03 -6.000000e-16 7.000000e-01 1.366185e-03 -7.000000e-16 8.000000e-01 1.400047e-03 -8.000000e-16 9.000000e-01 1.432420e-03 -9.000000e-16 1.000000e+00 1.463716e-03 -1.000000e-15 1.100000e+00 1.494215e-03 -1.100000e-15 1.200000e+00 1.524116e-03 -1.200000e-15 1.300000e+00 1.553558e-03 -1.300000e-15 1.400000e+00 1.582644e-03 -1.400000e-15 1.500000e+00 1.611452e-03 -1.500000e-15 1.600000e+00 1.640038e-03 -1.600000e-15 1.700000e+00 1.668448e-03 -1.700000e-15 1.800000e+00 1.696719e-03 -1.800000e-15 2.000000e-01 1.720602e-03 -2.000000e-16 3.000000e-01 2.182212e-03 -3.000000e-16 4.000000e-01 2.443001e-03 -4.000000e-16 5.000000e-01 2.573625e-03 -5.000000e-16 6.000000e-01 2.648907e-03 -6.000000e-16 7.000000e-01 2.710122e-03 -7.000000e-16 8.000000e-01 2.766323e-03 -8.000000e-16 9.000000e-01 2.818908e-03 -9.000000e-16 1.000000e+00 2.868539e-03 -1.000000e-15 1.100000e+00 2.915786e-03 -1.100000e-15 1.200000e+00 2.961129e-03 -1.200000e-15 1.300000e+00 3.004954e-03 -1.300000e-15 1.400000e+00 3.047557e-03 -1.400000e-15 1.500000e+00 3.089169e-03 -1.500000e-15 1.600000e+00 3.129968e-03 -1.600000e-15 1.700000e+00 3.170092e-03 -1.700000e-15 1.800000e+00 3.209650e-03 -1.800000e-15 2.000000e-01 2.344551e-03 -2.000000e-16 3.000000e-01 3.101925e-03 -3.000000e-16 4.000000e-01 3.621184e-03 -4.000000e-16 5.000000e-01 3.954178e-03 -5.000000e-16 6.000000e-01 4.151658e-03 -6.000000e-16 7.000000e-01 4.267092e-03 -7.000000e-16 8.000000e-01 4.348380e-03 -8.000000e-16 9.000000e-01 4.419815e-03 -9.000000e-16 1.000000e+00 4.486875e-03 -1.000000e-15 1.100000e+00 4.550435e-03 -1.100000e-15 1.200000e+00 4.610906e-03 -1.200000e-15 1.300000e+00 4.668696e-03 -1.300000e-15 1.400000e+00 4.724200e-03 -1.400000e-15 1.500000e+00 4.777773e-03 -1.500000e-15 1.600000e+00 4.829716e-03 -1.600000e-15 1.700000e+00 4.880282e-03 -1.700000e-15 1.800000e+00 4.929678e-03 -1.800000e-15 2.000000e-01 3.084402e-03 -2.000000e-16 3.000000e-01 4.235437e-03 -3.000000e-16 4.000000e-01 5.122679e-03 -4.000000e-16 5.000000e-01 5.785658e-03 -5.000000e-16 6.000000e-01 6.267956e-03 -6.000000e-16 7.000000e-01 6.608144e-03 -7.000000e-16 8.000000e-01 6.840111e-03 -8.000000e-16 9.000000e-01 6.995611e-03 -9.000000e-16 1.000000e+00 7.104437e-03 -1.000000e-15 1.100000e+00 7.191523e-03 -1.100000e-15 1.200000e+00 7.270752e-03 -1.200000e-15 1.300000e+00 7.346161e-03 -1.300000e-15 1.400000e+00 7.418531e-03 -1.400000e-15 1.500000e+00 7.488125e-03 -1.500000e-15 1.600000e+00 7.555176e-03 -1.600000e-15 1.700000e+00 7.619929e-03 -1.700000e-15 1.800000e+00 7.682628e-03 -1.800000e-15 2.000000e-01 3.603565e-03 -2.000000e-16 3.000000e-01 5.071371e-03 -3.000000e-16 4.000000e-01 6.281326e-03 -4.000000e-16 5.000000e-01 7.251718e-03 -5.000000e-16 6.000000e-01 8.015715e-03 -6.000000e-16 7.000000e-01 8.608979e-03 -7.000000e-16 8.000000e-01 9.063670e-03 -8.000000e-16 9.000000e-01 9.407070e-03 -9.000000e-16 1.000000e+00 9.662614e-03 -1.000000e-15 1.100000e+00 9.851179e-03 -1.100000e-15 1.200000e+00 9.991500e-03 -1.200000e-15 1.300000e+00 1.010011e-02 -1.300000e-15 1.400000e+00 1.019103e-02 -1.400000e-15 1.500000e+00 1.027396e-02 -1.500000e-15 1.600000e+00 1.035306e-02 -1.600000e-15 1.700000e+00 1.042945e-02 -1.700000e-15 1.800000e+00 1.050344e-02 -1.800000e-15 ngspice-26/tests/hisim/nmos/reference/4_dcSweep_NSUBPFAC.standard0000644000265600020320000002211412264261473024236 0ustar andreasadminV(d) I(d) 2.000000e-01 2.377921e-06 3.000000e-01 2.716730e-06 4.000000e-01 3.093264e-06 5.000000e-01 3.499661e-06 6.000000e-01 3.926471e-06 7.000000e-01 4.367966e-06 8.000000e-01 4.821226e-06 9.000000e-01 5.284808e-06 1.000000e+00 5.757969e-06 1.100000e+00 6.240292e-06 1.200000e+00 6.731513e-06 1.300000e+00 7.231449e-06 1.400000e+00 7.739958e-06 1.500000e+00 8.256922e-06 1.600000e+00 8.782244e-06 1.700000e+00 9.315833e-06 1.800000e+00 9.857613e-06 2.000000e-01 4.944996e-04 3.000000e-01 5.217992e-04 4.000000e-01 5.468345e-04 5.000000e-01 5.712256e-04 6.000000e-01 5.953740e-04 7.000000e-01 6.193756e-04 8.000000e-01 6.432754e-04 9.000000e-01 6.671118e-04 1.000000e+00 6.909190e-04 1.100000e+00 7.147261e-04 1.200000e+00 7.385564e-04 1.300000e+00 7.624283e-04 1.400000e+00 7.863565e-04 1.500000e+00 8.103524e-04 1.600000e+00 8.344248e-04 1.700000e+00 8.585810e-04 1.800000e+00 8.828266e-04 2.000000e-01 2.039435e-03 3.000000e-01 2.201227e-03 4.000000e-01 2.264869e-03 5.000000e-01 2.319638e-03 6.000000e-01 2.370576e-03 7.000000e-01 2.418817e-03 8.000000e-01 2.465121e-03 9.000000e-01 2.509999e-03 1.000000e+00 2.553799e-03 1.100000e+00 2.596766e-03 1.200000e+00 2.639077e-03 1.300000e+00 2.680859e-03 1.400000e+00 2.722210e-03 1.500000e+00 2.763202e-03 1.600000e+00 2.803893e-03 1.700000e+00 2.844329e-03 1.800000e+00 2.884545e-03 2.000000e-01 3.514212e-03 3.000000e-01 4.029672e-03 4.000000e-01 4.257069e-03 5.000000e-01 4.357262e-03 6.000000e-01 4.423703e-03 7.000000e-01 4.485157e-03 8.000000e-01 4.543291e-03 9.000000e-01 4.598647e-03 1.000000e+00 4.651751e-03 1.100000e+00 4.703062e-03 1.200000e+00 4.752949e-03 1.300000e+00 4.801695e-03 1.400000e+00 4.849518e-03 1.500000e+00 4.896582e-03 1.600000e+00 4.943013e-03 1.700000e+00 4.988911e-03 1.800000e+00 5.034352e-03 2.000000e-01 4.721366e-03 3.000000e-01 5.625796e-03 4.000000e-01 6.100237e-03 5.000000e-01 6.359450e-03 6.000000e-01 6.503438e-03 7.000000e-01 6.587943e-03 8.000000e-01 6.653411e-03 9.000000e-01 6.715410e-03 1.000000e+00 6.774919e-03 1.100000e+00 6.832165e-03 1.200000e+00 6.887427e-03 1.300000e+00 6.941005e-03 1.400000e+00 6.993173e-03 1.500000e+00 7.044165e-03 1.600000e+00 7.094173e-03 1.700000e+00 7.143353e-03 1.800000e+00 7.191829e-03 2.000000e-01 5.976283e-03 3.000000e-01 7.516995e-03 4.000000e-01 8.436176e-03 5.000000e-01 8.999216e-03 6.000000e-01 9.357478e-03 7.000000e-01 9.592490e-03 8.000000e-01 9.750440e-03 9.000000e-01 9.860172e-03 1.000000e+00 9.938729e-03 1.100000e+00 1.000296e-02 1.200000e+00 1.006442e-02 1.300000e+00 1.012413e-02 1.400000e+00 1.018217e-02 1.500000e+00 1.023866e-02 1.600000e+00 1.029375e-02 1.700000e+00 1.034761e-02 1.800000e+00 1.040038e-02 2.000000e-01 6.615957e-03 3.000000e-01 8.743019e-03 4.000000e-01 1.017359e-02 5.000000e-01 1.112712e-02 6.000000e-01 1.177301e-02 7.000000e-01 1.222133e-02 8.000000e-01 1.254009e-02 9.000000e-01 1.277142e-02 1.000000e+00 1.294261e-02 1.100000e+00 1.307245e-02 1.200000e+00 1.317403e-02 1.300000e+00 1.325423e-02 1.400000e+00 1.331945e-02 1.500000e+00 1.338101e-02 1.600000e+00 1.344107e-02 1.700000e+00 1.349978e-02 1.800000e+00 1.355720e-02 2.000000e-01 1.131585e-05 3.000000e-01 1.272513e-05 4.000000e-01 1.425028e-05 5.000000e-01 1.588031e-05 6.000000e-01 1.758384e-05 7.000000e-01 1.934080e-05 8.000000e-01 2.114096e-05 9.000000e-01 2.297935e-05 1.000000e+00 2.485351e-05 1.100000e+00 2.676211e-05 1.200000e+00 2.870436e-05 1.300000e+00 3.067972e-05 1.400000e+00 3.268777e-05 1.500000e+00 3.472819e-05 1.600000e+00 3.680068e-05 1.700000e+00 3.890499e-05 1.800000e+00 4.104088e-05 2.000000e-01 4.344395e-04 3.000000e-01 4.610114e-04 4.000000e-01 4.833241e-04 5.000000e-01 5.045319e-04 6.000000e-01 5.252555e-04 7.000000e-01 5.457036e-04 8.000000e-01 5.659784e-04 9.000000e-01 5.861465e-04 1.000000e+00 6.062570e-04 1.100000e+00 6.263467e-04 1.200000e+00 6.464438e-04 1.300000e+00 6.665699e-04 1.400000e+00 6.867416e-04 1.500000e+00 7.069722e-04 1.600000e+00 7.272720e-04 1.700000e+00 7.476493e-04 1.800000e+00 7.681107e-04 2.000000e-01 1.566117e-03 3.000000e-01 1.759854e-03 4.000000e-01 1.832485e-03 5.000000e-01 1.886975e-03 6.000000e-01 1.936517e-03 7.000000e-01 1.982711e-03 8.000000e-01 2.026514e-03 9.000000e-01 2.068589e-03 1.000000e+00 2.109390e-03 1.100000e+00 2.149230e-03 1.200000e+00 2.188329e-03 1.300000e+00 2.226845e-03 1.400000e+00 2.264894e-03 1.500000e+00 2.302563e-03 1.600000e+00 2.339920e-03 1.700000e+00 2.377019e-03 1.800000e+00 2.413900e-03 2.000000e-01 2.679917e-03 3.000000e-01 3.248829e-03 4.000000e-01 3.532630e-03 5.000000e-01 3.662091e-03 6.000000e-01 3.739347e-03 7.000000e-01 3.807108e-03 8.000000e-01 3.870326e-03 9.000000e-01 3.929769e-03 1.000000e+00 3.986117e-03 1.100000e+00 4.039990e-03 1.200000e+00 4.091894e-03 1.300000e+00 4.142225e-03 1.400000e+00 4.191288e-03 1.500000e+00 4.239313e-03 1.600000e+00 4.286478e-03 1.700000e+00 4.332922e-03 1.800000e+00 4.378753e-03 2.000000e-01 3.604487e-03 3.000000e-01 4.552621e-03 4.000000e-01 5.125334e-03 5.000000e-01 5.461575e-03 6.000000e-01 5.650395e-03 7.000000e-01 5.758065e-03 8.000000e-01 5.836628e-03 9.000000e-01 5.908532e-03 1.000000e+00 5.976729e-03 1.100000e+00 6.041626e-03 1.200000e+00 6.103611e-03 1.300000e+00 6.163101e-03 1.400000e+00 6.220489e-03 1.500000e+00 6.276115e-03 1.600000e+00 6.330261e-03 1.700000e+00 6.383158e-03 1.800000e+00 6.434994e-03 2.000000e-01 4.612268e-03 3.000000e-01 6.093634e-03 4.000000e-01 7.107539e-03 5.000000e-01 7.792430e-03 6.000000e-01 8.254886e-03 7.000000e-01 8.565998e-03 8.000000e-01 8.773441e-03 9.000000e-01 8.912176e-03 1.000000e+00 9.009483e-03 1.100000e+00 9.087875e-03 1.200000e+00 9.160742e-03 1.300000e+00 9.230765e-03 1.400000e+00 9.298258e-03 1.500000e+00 9.363410e-03 1.600000e+00 9.426440e-03 1.700000e+00 9.487577e-03 1.800000e+00 9.547042e-03 2.000000e-01 5.210372e-03 3.000000e-01 7.132360e-03 4.000000e-01 8.574363e-03 5.000000e-01 9.629447e-03 6.000000e-01 1.039675e-02 7.000000e-01 1.095631e-02 8.000000e-01 1.136616e-02 9.000000e-01 1.166707e-02 1.000000e+00 1.188828e-02 1.100000e+00 1.205193e-02 1.200000e+00 1.217525e-02 1.300000e+00 1.227128e-02 1.400000e+00 1.235071e-02 1.500000e+00 1.242366e-02 1.600000e+00 1.249398e-02 1.700000e+00 1.256226e-02 1.800000e+00 1.262863e-02 2.000000e-01 4.141890e-05 3.000000e-01 4.611315e-05 4.000000e-01 5.085763e-05 5.000000e-01 5.584109e-05 6.000000e-01 6.100935e-05 7.000000e-01 6.631514e-05 8.000000e-01 7.173378e-05 9.000000e-01 7.725377e-05 1.000000e+00 8.286980e-05 1.100000e+00 8.857935e-05 1.200000e+00 9.438104e-05 1.300000e+00 1.002740e-04 1.400000e+00 1.062577e-04 1.500000e+00 1.123316e-04 1.600000e+00 1.184951e-04 1.700000e+00 1.247479e-04 1.800000e+00 1.310896e-04 2.000000e-01 3.998310e-04 3.000000e-01 4.344185e-04 4.000000e-01 4.567196e-04 5.000000e-01 4.766481e-04 6.000000e-01 4.956828e-04 7.000000e-01 5.142347e-04 8.000000e-01 5.324917e-04 9.000000e-01 5.505646e-04 1.000000e+00 5.685261e-04 1.100000e+00 5.864270e-04 1.200000e+00 6.043040e-04 1.300000e+00 6.221842e-04 1.400000e+00 6.400883e-04 1.500000e+00 6.580324e-04 1.600000e+00 6.760288e-04 1.700000e+00 6.940878e-04 1.800000e+00 7.122173e-04 2.000000e-01 1.107672e-03 3.000000e-01 1.313759e-03 4.000000e-01 1.400708e-03 5.000000e-01 1.452542e-03 6.000000e-01 1.496620e-03 7.000000e-01 1.537060e-03 8.000000e-01 1.574975e-03 9.000000e-01 1.611057e-03 1.000000e+00 1.645795e-03 1.100000e+00 1.679533e-03 1.200000e+00 1.712515e-03 1.300000e+00 1.744916e-03 1.400000e+00 1.776863e-03 1.500000e+00 1.808450e-03 1.600000e+00 1.839750e-03 1.700000e+00 1.870820e-03 1.800000e+00 1.901703e-03 2.000000e-01 1.814700e-03 3.000000e-01 2.318652e-03 4.000000e-01 2.615333e-03 5.000000e-01 2.770341e-03 6.000000e-01 2.856508e-03 7.000000e-01 2.922967e-03 8.000000e-01 2.983474e-03 9.000000e-01 3.040070e-03 1.000000e+00 3.093431e-03 1.100000e+00 3.144130e-03 1.200000e+00 3.192675e-03 1.300000e+00 3.239486e-03 1.400000e+00 3.284893e-03 1.500000e+00 3.329157e-03 1.600000e+00 3.372480e-03 1.700000e+00 3.415022e-03 1.800000e+00 3.456908e-03 2.000000e-01 2.427717e-03 3.000000e-01 3.225134e-03 4.000000e-01 3.780408e-03 5.000000e-01 4.145236e-03 6.000000e-01 4.368698e-03 7.000000e-01 4.500972e-03 8.000000e-01 4.589978e-03 9.000000e-01 4.665425e-03 1.000000e+00 4.735860e-03 1.100000e+00 4.802645e-03 1.200000e+00 4.866194e-03 1.300000e+00 4.926891e-03 1.400000e+00 4.985126e-03 1.500000e+00 5.041263e-03 1.600000e+00 5.095617e-03 1.700000e+00 5.148458e-03 1.800000e+00 5.200008e-03 2.000000e-01 3.150915e-03 3.000000e-01 4.336970e-03 4.000000e-01 5.257213e-03 5.000000e-01 5.950171e-03 6.000000e-01 6.459501e-03 7.000000e-01 6.824024e-03 8.000000e-01 7.077166e-03 9.000000e-01 7.249500e-03 1.000000e+00 7.369561e-03 1.100000e+00 7.462414e-03 1.200000e+00 7.544679e-03 1.300000e+00 7.622484e-03 1.400000e+00 7.697132e-03 1.500000e+00 7.768944e-03 1.600000e+00 7.838140e-03 1.700000e+00 7.904953e-03 1.800000e+00 7.969619e-03 2.000000e-01 3.655219e-03 3.000000e-01 5.152339e-03 4.000000e-01 6.391607e-03 5.000000e-01 7.389833e-03 6.000000e-01 8.179454e-03 7.000000e-01 8.796040e-03 8.000000e-01 9.271983e-03 9.000000e-01 9.634751e-03 1.000000e+00 9.907659e-03 1.100000e+00 1.011119e-02 1.200000e+00 1.026363e-02 1.300000e+00 1.038106e-02 1.400000e+00 1.047733e-02 1.500000e+00 1.056312e-02 1.600000e+00 1.064415e-02 1.700000e+00 1.072225e-02 1.800000e+00 1.079790e-02 ngspice-26/tests/hisim/nmos/reference/5_dcSweep_NSUBPDLT.standard0000644000265600020320000002211412264261473024271 0ustar andreasadminV(d) I(d) 2.000000e-01 1.337063e-06 3.000000e-01 1.535975e-06 4.000000e-01 1.758852e-06 5.000000e-01 2.000059e-06 6.000000e-01 2.253617e-06 7.000000e-01 2.515974e-06 8.000000e-01 2.785327e-06 9.000000e-01 3.060787e-06 1.000000e+00 3.341892e-06 1.100000e+00 3.628379e-06 1.200000e+00 3.920085e-06 1.300000e+00 4.216892e-06 1.400000e+00 4.518709e-06 1.500000e+00 4.825464e-06 1.600000e+00 5.137092e-06 1.700000e+00 5.453538e-06 1.800000e+00 5.774752e-06 2.000000e-01 4.016649e-04 3.000000e-01 4.246362e-04 4.000000e-01 4.460038e-04 5.000000e-01 4.670163e-04 6.000000e-01 4.879395e-04 7.000000e-01 5.088164e-04 8.000000e-01 5.296654e-04 9.000000e-01 5.505083e-04 1.000000e+00 5.713674e-04 1.100000e+00 5.922629e-04 1.200000e+00 6.132115e-04 1.300000e+00 6.342266e-04 1.400000e+00 6.553189e-04 1.500000e+00 6.764967e-04 1.600000e+00 6.977664e-04 1.700000e+00 7.191334e-04 1.800000e+00 7.406014e-04 2.000000e-01 1.907345e-03 3.000000e-01 2.045017e-03 4.000000e-01 2.104176e-03 5.000000e-01 2.156429e-03 6.000000e-01 2.205155e-03 7.000000e-01 2.251443e-03 8.000000e-01 2.295994e-03 9.000000e-01 2.339268e-03 1.000000e+00 2.381578e-03 1.100000e+00 2.423145e-03 1.200000e+00 2.464124e-03 1.300000e+00 2.504631e-03 1.400000e+00 2.544753e-03 1.500000e+00 2.584556e-03 1.600000e+00 2.624091e-03 1.700000e+00 2.663401e-03 1.800000e+00 2.702518e-03 2.000000e-01 3.397269e-03 3.000000e-01 3.884456e-03 4.000000e-01 4.093012e-03 5.000000e-01 4.183701e-03 6.000000e-01 4.248438e-03 7.000000e-01 4.308762e-03 8.000000e-01 4.365795e-03 9.000000e-01 4.420119e-03 1.000000e+00 4.472278e-03 1.100000e+00 4.522730e-03 1.200000e+00 4.571830e-03 1.300000e+00 4.619852e-03 1.400000e+00 4.666999e-03 1.500000e+00 4.713429e-03 1.600000e+00 4.759261e-03 1.700000e+00 4.804586e-03 1.800000e+00 4.849479e-03 2.000000e-01 4.621637e-03 3.000000e-01 5.496112e-03 4.000000e-01 5.951545e-03 5.000000e-01 6.197130e-03 6.000000e-01 6.331009e-03 7.000000e-01 6.409969e-03 8.000000e-01 6.474500e-03 9.000000e-01 6.535903e-03 1.000000e+00 6.594780e-03 1.100000e+00 6.651392e-03 1.200000e+00 6.706049e-03 1.300000e+00 6.759062e-03 1.400000e+00 6.810706e-03 1.500000e+00 6.861213e-03 1.600000e+00 6.910770e-03 1.700000e+00 6.959529e-03 1.800000e+00 7.007610e-03 2.000000e-01 5.903753e-03 3.000000e-01 7.412579e-03 4.000000e-01 8.309179e-03 5.000000e-01 8.856604e-03 6.000000e-01 9.203506e-03 7.000000e-01 9.429650e-03 8.000000e-01 9.580497e-03 9.000000e-01 9.684530e-03 1.000000e+00 9.758878e-03 1.100000e+00 9.822324e-03 1.200000e+00 9.883451e-03 1.300000e+00 9.942791e-03 1.400000e+00 1.000044e-02 1.500000e+00 1.005654e-02 1.600000e+00 1.011126e-02 1.700000e+00 1.016475e-02 1.800000e+00 1.021718e-02 2.000000e-01 6.567229e-03 3.000000e-01 8.665315e-03 4.000000e-01 1.007126e-02 5.000000e-01 1.100581e-02 6.000000e-01 1.163749e-02 7.000000e-01 1.207504e-02 8.000000e-01 1.238530e-02 9.000000e-01 1.260969e-02 1.000000e+00 1.277512e-02 1.100000e+00 1.290023e-02 1.200000e+00 1.299775e-02 1.300000e+00 1.307390e-02 1.400000e+00 1.313778e-02 1.500000e+00 1.319903e-02 1.600000e+00 1.325881e-02 1.700000e+00 1.331723e-02 1.800000e+00 1.337436e-02 2.000000e-01 7.457345e-06 3.000000e-01 8.432428e-06 4.000000e-01 9.499796e-06 5.000000e-01 1.064535e-05 6.000000e-01 1.184464e-05 7.000000e-01 1.308254e-05 8.000000e-01 1.435138e-05 9.000000e-01 1.564742e-05 1.000000e+00 1.696878e-05 1.100000e+00 1.831443e-05 1.200000e+00 1.968375e-05 1.300000e+00 2.107629e-05 1.400000e+00 2.249173e-05 1.500000e+00 2.392980e-05 1.600000e+00 2.539025e-05 1.700000e+00 2.687290e-05 1.800000e+00 2.837754e-05 2.000000e-01 3.620732e-04 3.000000e-01 3.841213e-04 4.000000e-01 4.031417e-04 5.000000e-01 4.214109e-04 6.000000e-01 4.393785e-04 7.000000e-01 4.571820e-04 8.000000e-01 4.748874e-04 9.000000e-01 4.925403e-04 1.000000e+00 5.101755e-04 1.100000e+00 5.278202e-04 1.200000e+00 5.454955e-04 1.300000e+00 5.632176e-04 1.400000e+00 5.809994e-04 1.500000e+00 5.988509e-04 1.600000e+00 6.167800e-04 1.700000e+00 6.347930e-04 1.800000e+00 6.528951e-04 2.000000e-01 1.461821e-03 3.000000e-01 1.627574e-03 4.000000e-01 1.691898e-03 5.000000e-01 1.742644e-03 6.000000e-01 1.788976e-03 7.000000e-01 1.832326e-03 8.000000e-01 1.873577e-03 9.000000e-01 1.913322e-03 1.000000e+00 1.951961e-03 1.100000e+00 1.989768e-03 1.200000e+00 2.026932e-03 1.300000e+00 2.063594e-03 1.400000e+00 2.099853e-03 1.500000e+00 2.135788e-03 1.600000e+00 2.171456e-03 1.700000e+00 2.206906e-03 1.800000e+00 2.242173e-03 2.000000e-01 2.585880e-03 3.000000e-01 3.121587e-03 4.000000e-01 3.380497e-03 5.000000e-01 3.495926e-03 6.000000e-01 3.569097e-03 7.000000e-01 3.634580e-03 8.000000e-01 3.695677e-03 9.000000e-01 3.753147e-03 1.000000e+00 3.807690e-03 1.100000e+00 3.859915e-03 1.200000e+00 3.910309e-03 1.300000e+00 3.959245e-03 1.400000e+00 4.007006e-03 1.500000e+00 4.053807e-03 1.600000e+00 4.099814e-03 1.700000e+00 4.145153e-03 1.800000e+00 4.189927e-03 2.000000e-01 3.523768e-03 3.000000e-01 4.439819e-03 4.000000e-01 4.987939e-03 5.000000e-01 5.304586e-03 6.000000e-01 5.478467e-03 7.000000e-01 5.577856e-03 8.000000e-01 5.653900e-03 9.000000e-01 5.724389e-03 1.000000e+00 5.791222e-03 1.100000e+00 5.854794e-03 1.200000e+00 5.915524e-03 1.300000e+00 5.973845e-03 1.400000e+00 6.030149e-03 1.500000e+00 6.084768e-03 1.600000e+00 6.137977e-03 1.700000e+00 6.189999e-03 1.800000e+00 6.241012e-03 2.000000e-01 4.551500e-03 3.000000e-01 6.003214e-03 4.000000e-01 6.992596e-03 5.000000e-01 7.658000e-03 6.000000e-01 8.104687e-03 7.000000e-01 8.402588e-03 8.000000e-01 8.599026e-03 9.000000e-01 8.729246e-03 1.000000e+00 8.821189e-03 1.100000e+00 8.897664e-03 1.200000e+00 8.969656e-03 1.300000e+00 9.038869e-03 1.400000e+00 9.105553e-03 1.500000e+00 9.169911e-03 1.600000e+00 9.232177e-03 1.700000e+00 9.292587e-03 1.800000e+00 9.351363e-03 2.000000e-01 5.166821e-03 3.000000e-01 7.063602e-03 4.000000e-01 8.482120e-03 5.000000e-01 9.517040e-03 6.000000e-01 1.026764e-02 7.000000e-01 1.081337e-02 8.000000e-01 1.121155e-02 9.000000e-01 1.150239e-02 1.000000e+00 1.171492e-02 1.100000e+00 1.187127e-02 1.200000e+00 1.198868e-02 1.300000e+00 1.208021e-02 1.400000e+00 1.215738e-02 1.500000e+00 1.222953e-02 1.600000e+00 1.229927e-02 1.700000e+00 1.236697e-02 1.800000e+00 1.243277e-02 2.000000e-01 3.135561e-05 3.000000e-01 3.505615e-05 4.000000e-01 3.886232e-05 5.000000e-01 4.288483e-05 6.000000e-01 4.706777e-05 7.000000e-01 5.136814e-05 8.000000e-01 5.576372e-05 9.000000e-01 6.024401e-05 1.000000e+00 6.480401e-05 1.100000e+00 6.944119e-05 1.200000e+00 7.415411e-05 1.300000e+00 7.894182e-05 1.400000e+00 8.380363e-05 1.500000e+00 8.873896e-05 1.600000e+00 9.374731e-05 1.700000e+00 9.882820e-05 1.800000e+00 1.039812e-04 2.000000e-01 3.464297e-04 3.000000e-01 3.747027e-04 4.000000e-01 3.938286e-04 5.000000e-01 4.111956e-04 6.000000e-01 4.279158e-04 7.000000e-01 4.442929e-04 8.000000e-01 4.604645e-04 9.000000e-01 4.765122e-04 1.000000e+00 4.924908e-04 1.100000e+00 5.084392e-04 1.200000e+00 5.243858e-04 1.300000e+00 5.403520e-04 1.400000e+00 5.563541e-04 1.500000e+00 5.724047e-04 1.600000e+00 5.885138e-04 1.700000e+00 6.046894e-04 1.800000e+00 6.209381e-04 2.000000e-01 1.038326e-03 3.000000e-01 1.219146e-03 4.000000e-01 1.293943e-03 5.000000e-01 1.340878e-03 6.000000e-01 1.381425e-03 7.000000e-01 1.418751e-03 8.000000e-01 1.453855e-03 9.000000e-01 1.487367e-03 1.000000e+00 1.519721e-03 1.100000e+00 1.551218e-03 1.200000e+00 1.582070e-03 1.300000e+00 1.612427e-03 1.400000e+00 1.642399e-03 1.500000e+00 1.672069e-03 1.600000e+00 1.701497e-03 1.700000e+00 1.730734e-03 1.800000e+00 1.759817e-03 2.000000e-01 1.750178e-03 3.000000e-01 2.225055e-03 4.000000e-01 2.496999e-03 5.000000e-01 2.634966e-03 6.000000e-01 2.713408e-03 7.000000e-01 2.776216e-03 8.000000e-01 2.833760e-03 9.000000e-01 2.887595e-03 1.000000e+00 2.938385e-03 1.100000e+00 2.986704e-03 1.200000e+00 3.033042e-03 1.300000e+00 3.077794e-03 1.400000e+00 3.121269e-03 1.500000e+00 3.163706e-03 1.600000e+00 3.205292e-03 1.700000e+00 3.246171e-03 1.800000e+00 3.286456e-03 2.000000e-01 2.370733e-03 3.000000e-01 3.140684e-03 4.000000e-01 3.671250e-03 5.000000e-01 4.014218e-03 6.000000e-01 4.219735e-03 7.000000e-01 4.340210e-03 8.000000e-01 4.423741e-03 9.000000e-01 4.496400e-03 1.000000e+00 4.564519e-03 1.100000e+00 4.629093e-03 1.200000e+00 4.690528e-03 1.300000e+00 4.749227e-03 1.400000e+00 4.805585e-03 1.500000e+00 4.859958e-03 1.600000e+00 4.912655e-03 1.700000e+00 4.963931e-03 1.800000e+00 5.014001e-03 2.000000e-01 3.105372e-03 3.000000e-01 4.267422e-03 4.000000e-01 5.165031e-03 5.000000e-01 5.837424e-03 6.000000e-01 6.328217e-03 7.000000e-01 6.676047e-03 8.000000e-01 6.914628e-03 9.000000e-01 7.075317e-03 1.000000e+00 7.187509e-03 1.100000e+00 7.276273e-03 1.200000e+00 7.356416e-03 1.300000e+00 7.432575e-03 1.400000e+00 7.505664e-03 1.500000e+00 7.575957e-03 1.600000e+00 7.643684e-03 1.700000e+00 7.709084e-03 1.800000e+00 7.772400e-03 2.000000e-01 3.619872e-03 3.000000e-01 5.096911e-03 4.000000e-01 6.316083e-03 5.000000e-01 7.295217e-03 6.000000e-01 8.067258e-03 7.000000e-01 8.667846e-03 8.000000e-01 9.129215e-03 9.000000e-01 9.478701e-03 1.000000e+00 9.739687e-03 1.100000e+00 9.932920e-03 1.200000e+00 1.007698e-02 1.300000e+00 1.018826e-02 1.400000e+00 1.028075e-02 1.500000e+00 1.036452e-02 1.600000e+00 1.044421e-02 1.700000e+00 1.052114e-02 1.800000e+00 1.059566e-02 ngspice-26/tests/hisim/nmos/reference/14_dcSweep_COISTI=1_NSUBC.standard0000644000265600020320000002211412264261473025220 0ustar andreasadminV(d) I(d) 2.000000e-01 6.629196e-03 3.000000e-01 8.039993e-03 4.000000e-01 8.147921e-03 5.000000e-01 8.227345e-03 6.000000e-01 8.336507e-03 7.000000e-01 8.460231e-03 8.000000e-01 8.588531e-03 9.000000e-01 8.716750e-03 1.000000e+00 8.842957e-03 1.100000e+00 8.966472e-03 1.200000e+00 9.087162e-03 1.300000e+00 9.205123e-03 1.400000e+00 9.320533e-03 1.500000e+00 9.433600e-03 1.600000e+00 9.544522e-03 1.700000e+00 9.653488e-03 1.800000e+00 9.760666e-03 2.000000e-01 5.462802e-03 3.000000e-01 8.246238e-03 4.000000e-01 1.021803e-02 5.000000e-01 1.091850e-02 6.000000e-01 1.118403e-02 7.000000e-01 1.136607e-02 8.000000e-01 1.152739e-02 9.000000e-01 1.167955e-02 1.000000e+00 1.182537e-02 1.100000e+00 1.196598e-02 1.200000e+00 1.210204e-02 1.300000e+00 1.223408e-02 1.400000e+00 1.236255e-02 1.500000e+00 1.248781e-02 1.600000e+00 1.261018e-02 1.700000e+00 1.272994e-02 1.800000e+00 1.284731e-02 2.000000e-01 5.081816e-03 3.000000e-01 6.799123e-03 4.000000e-01 8.537185e-03 5.000000e-01 1.004210e-02 6.000000e-01 1.098158e-02 7.000000e-01 1.142145e-02 8.000000e-01 1.164117e-02 9.000000e-01 1.178469e-02 1.000000e+00 1.189999e-02 1.100000e+00 1.200266e-02 1.200000e+00 1.209834e-02 1.300000e+00 1.218941e-02 1.400000e+00 1.227703e-02 1.500000e+00 1.236187e-02 1.600000e+00 1.244437e-02 1.700000e+00 1.252484e-02 1.800000e+00 1.260352e-02 2.000000e-01 5.800332e-03 3.000000e-01 7.197314e-03 4.000000e-01 8.360829e-03 5.000000e-01 9.516893e-03 6.000000e-01 1.060805e-02 7.000000e-01 1.148194e-02 8.000000e-01 1.204832e-02 9.000000e-01 1.236894e-02 1.000000e+00 1.255687e-02 1.100000e+00 1.268395e-02 1.200000e+00 1.278322e-02 1.300000e+00 1.286879e-02 1.400000e+00 1.294687e-02 1.500000e+00 1.302035e-02 1.600000e+00 1.309071e-02 1.700000e+00 1.315876e-02 1.800000e+00 1.322500e-02 2.000000e-01 6.592547e-03 3.000000e-01 8.162230e-03 4.000000e-01 9.248512e-03 5.000000e-01 1.014234e-02 6.000000e-01 1.098445e-02 7.000000e-01 1.180994e-02 8.000000e-01 1.254839e-02 9.000000e-01 1.312922e-02 1.000000e+00 1.352983e-02 1.100000e+00 1.378721e-02 1.200000e+00 1.395616e-02 1.300000e+00 1.407688e-02 1.400000e+00 1.417202e-02 1.500000e+00 1.425321e-02 1.600000e+00 1.432635e-02 1.700000e+00 1.439452e-02 1.800000e+00 1.445940e-02 2.000000e-01 7.426507e-03 3.000000e-01 9.507972e-03 4.000000e-01 1.088101e-02 5.000000e-01 1.186035e-02 6.000000e-01 1.263076e-02 7.000000e-01 1.329373e-02 8.000000e-01 1.390509e-02 9.000000e-01 1.449024e-02 1.000000e+00 1.503655e-02 1.100000e+00 1.550845e-02 1.200000e+00 1.588594e-02 1.300000e+00 1.616862e-02 1.400000e+00 1.637394e-02 1.500000e+00 1.652497e-02 1.600000e+00 1.664115e-02 1.700000e+00 1.673572e-02 1.800000e+00 1.681693e-02 2.000000e-01 7.759463e-03 3.000000e-01 1.035587e-02 4.000000e-01 1.218117e-02 5.000000e-01 1.347969e-02 6.000000e-01 1.444418e-02 7.000000e-01 1.520178e-02 8.000000e-01 1.583168e-02 9.000000e-01 1.638253e-02 1.000000e+00 1.688394e-02 1.100000e+00 1.735229e-02 1.200000e+00 1.779172e-02 1.300000e+00 1.819069e-02 1.400000e+00 1.853272e-02 1.500000e+00 1.881439e-02 1.600000e+00 1.903864e-02 1.700000e+00 1.921465e-02 1.800000e+00 1.935400e-02 2.000000e-01 6.288020e-03 3.000000e-01 8.063644e-03 4.000000e-01 8.295393e-03 5.000000e-01 8.413016e-03 6.000000e-01 8.541938e-03 7.000000e-01 8.678112e-03 8.000000e-01 8.815429e-03 9.000000e-01 8.950941e-03 1.000000e+00 9.083530e-03 1.100000e+00 9.212915e-03 1.200000e+00 9.339174e-03 1.300000e+00 9.462515e-03 1.400000e+00 9.583187e-03 1.500000e+00 9.701435e-03 1.600000e+00 9.817484e-03 1.700000e+00 9.931540e-03 1.800000e+00 1.004378e-02 2.000000e-01 5.034351e-03 3.000000e-01 7.660011e-03 4.000000e-01 9.680909e-03 5.000000e-01 1.050149e-02 6.000000e-01 1.081045e-02 7.000000e-01 1.100880e-02 8.000000e-01 1.117910e-02 9.000000e-01 1.133786e-02 1.000000e+00 1.148935e-02 1.100000e+00 1.163519e-02 1.200000e+00 1.177629e-02 1.300000e+00 1.191328e-02 1.400000e+00 1.204666e-02 1.500000e+00 1.217682e-02 1.600000e+00 1.230411e-02 1.700000e+00 1.242881e-02 1.800000e+00 1.255117e-02 2.000000e-01 4.718719e-03 3.000000e-01 6.559025e-03 4.000000e-01 8.402790e-03 5.000000e-01 1.005685e-02 6.000000e-01 1.116136e-02 7.000000e-01 1.171451e-02 8.000000e-01 1.199908e-02 9.000000e-01 1.218525e-02 1.000000e+00 1.233382e-02 1.100000e+00 1.246524e-02 1.200000e+00 1.258708e-02 1.300000e+00 1.270257e-02 1.400000e+00 1.281334e-02 1.500000e+00 1.292032e-02 1.600000e+00 1.302413e-02 1.700000e+00 1.312519e-02 1.800000e+00 1.322384e-02 2.000000e-01 5.133590e-03 3.000000e-01 6.803316e-03 4.000000e-01 8.212757e-03 5.000000e-01 9.557110e-03 6.000000e-01 1.084059e-02 7.000000e-01 1.190146e-02 8.000000e-01 1.261845e-02 9.000000e-01 1.304057e-02 1.000000e+00 1.329435e-02 1.100000e+00 1.346778e-02 1.200000e+00 1.360323e-02 1.300000e+00 1.371936e-02 1.400000e+00 1.382452e-02 1.500000e+00 1.392273e-02 1.600000e+00 1.401608e-02 1.700000e+00 1.410577e-02 1.800000e+00 1.419254e-02 2.000000e-01 5.631761e-03 3.000000e-01 7.448834e-03 4.000000e-01 8.839521e-03 5.000000e-01 9.999407e-03 6.000000e-01 1.105561e-02 7.000000e-01 1.206765e-02 8.000000e-01 1.298818e-02 9.000000e-01 1.372833e-02 1.000000e+00 1.425160e-02 1.100000e+00 1.459524e-02 1.200000e+00 1.482415e-02 1.300000e+00 1.498868e-02 1.400000e+00 1.511814e-02 1.500000e+00 1.522791e-02 1.600000e+00 1.532594e-02 1.700000e+00 1.541648e-02 1.800000e+00 1.550187e-02 2.000000e-01 6.201636e-03 3.000000e-01 8.377541e-03 4.000000e-01 1.001580e-02 5.000000e-01 1.128472e-02 6.000000e-01 1.231889e-02 7.000000e-01 1.320926e-02 8.000000e-01 1.401400e-02 9.000000e-01 1.476525e-02 1.000000e+00 1.546320e-02 1.100000e+00 1.607445e-02 1.200000e+00 1.656865e-02 1.300000e+00 1.694238e-02 1.400000e+00 1.721583e-02 1.500000e+00 1.741767e-02 1.600000e+00 1.757273e-02 1.700000e+00 1.769832e-02 1.800000e+00 1.780532e-02 2.000000e-01 6.485139e-03 3.000000e-01 8.990805e-03 4.000000e-01 1.096085e-02 5.000000e-01 1.249871e-02 6.000000e-01 1.371956e-02 7.000000e-01 1.471843e-02 8.000000e-01 1.556472e-02 9.000000e-01 1.630640e-02 1.000000e+00 1.697539e-02 1.100000e+00 1.759094e-02 1.200000e+00 1.815998e-02 1.300000e+00 1.867620e-02 1.400000e+00 1.912400e-02 1.500000e+00 1.949421e-02 1.600000e+00 1.978953e-02 1.700000e+00 2.002132e-02 1.800000e+00 2.020438e-02 2.000000e-01 5.292659e-03 3.000000e-01 7.392181e-03 4.000000e-01 7.862774e-03 5.000000e-01 8.021507e-03 6.000000e-01 8.160753e-03 7.000000e-01 8.299032e-03 8.000000e-01 8.435366e-03 9.000000e-01 8.568619e-03 1.000000e+00 8.698431e-03 1.100000e+00 8.824872e-03 1.200000e+00 8.948181e-03 1.300000e+00 9.068645e-03 1.400000e+00 9.186550e-03 1.500000e+00 9.302156e-03 1.600000e+00 9.415695e-03 1.700000e+00 9.527374e-03 1.800000e+00 9.637371e-03 2.000000e-01 4.215605e-03 3.000000e-01 6.433282e-03 4.000000e-01 8.359397e-03 5.000000e-01 9.355290e-03 6.000000e-01 9.738307e-03 7.000000e-01 9.951277e-03 8.000000e-01 1.011991e-02 9.000000e-01 1.027238e-02 1.000000e+00 1.041618e-02 1.100000e+00 1.055395e-02 1.200000e+00 1.068698e-02 1.300000e+00 1.081603e-02 1.400000e+00 1.094167e-02 1.500000e+00 1.106433e-02 1.600000e+00 1.118434e-02 1.700000e+00 1.130199e-02 1.800000e+00 1.141751e-02 2.000000e-01 3.947574e-03 3.000000e-01 5.669180e-03 4.000000e-01 7.365459e-03 5.000000e-01 8.961159e-03 6.000000e-01 1.015377e-02 7.000000e-01 1.082163e-02 8.000000e-01 1.117274e-02 9.000000e-01 1.139389e-02 1.000000e+00 1.156380e-02 1.100000e+00 1.171067e-02 1.200000e+00 1.184513e-02 1.300000e+00 1.197174e-02 1.400000e+00 1.209272e-02 1.500000e+00 1.220932e-02 1.600000e+00 1.232234e-02 1.700000e+00 1.243231e-02 1.800000e+00 1.253964e-02 2.000000e-01 4.109417e-03 3.000000e-01 5.760622e-03 4.000000e-01 7.223629e-03 5.000000e-01 8.591869e-03 6.000000e-01 9.902351e-03 7.000000e-01 1.104433e-02 8.000000e-01 1.187672e-02 9.000000e-01 1.239915e-02 1.000000e+00 1.272204e-02 1.100000e+00 1.294247e-02 1.200000e+00 1.311265e-02 1.300000e+00 1.325677e-02 1.400000e+00 1.338600e-02 1.500000e+00 1.350580e-02 1.600000e+00 1.361904e-02 1.700000e+00 1.372735e-02 1.800000e+00 1.383177e-02 2.000000e-01 4.363618e-03 3.000000e-01 6.106149e-03 4.000000e-01 7.590567e-03 5.000000e-01 8.887958e-03 6.000000e-01 1.006425e-02 7.000000e-01 1.116819e-02 8.000000e-01 1.218751e-02 9.000000e-01 1.304337e-02 1.000000e+00 1.367939e-02 1.100000e+00 1.411484e-02 1.200000e+00 1.441215e-02 1.300000e+00 1.462780e-02 1.400000e+00 1.479739e-02 1.500000e+00 1.494046e-02 1.600000e+00 1.506740e-02 1.700000e+00 1.518385e-02 1.800000e+00 1.529299e-02 2.000000e-01 4.711554e-03 3.000000e-01 6.659722e-03 4.000000e-01 8.314744e-03 5.000000e-01 9.722655e-03 6.000000e-01 1.093884e-02 7.000000e-01 1.201204e-02 8.000000e-01 1.298072e-02 9.000000e-01 1.387156e-02 1.000000e+00 1.469195e-02 1.100000e+00 1.542214e-02 1.200000e+00 1.602929e-02 1.300000e+00 1.650143e-02 1.400000e+00 1.685511e-02 1.500000e+00 1.712052e-02 1.600000e+00 1.732632e-02 1.700000e+00 1.749353e-02 1.800000e+00 1.763584e-02 2.000000e-01 4.944948e-03 3.000000e-01 7.080915e-03 4.000000e-01 8.937517e-03 5.000000e-01 1.053094e-02 6.000000e-01 1.189866e-02 7.000000e-01 1.308321e-02 8.000000e-01 1.412329e-02 9.000000e-01 1.505044e-02 1.000000e+00 1.588872e-02 1.100000e+00 1.665460e-02 1.200000e+00 1.735558e-02 1.300000e+00 1.798938e-02 1.400000e+00 1.854585e-02 1.500000e+00 1.901412e-02 1.600000e+00 1.939365e-02 1.700000e+00 1.969549e-02 1.800000e+00 1.993616e-02 ngspice-26/tests/hisim/nmos/reference/65_acFreq_COTHRML=1.standard0000644000265600020320000002533012264261473024224 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/50_acFreq_COGIDL=0.standard0000644000265600020320000002533012264261473024046 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/52_acFreq_COSTI=0.standard0000644000265600020320000002533012264261473023770 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/78_noise_COIGN=0_T27.standard0000644000265600020320000000353212264261473024326 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/nmos/reference/7_dcSweep_COISUB=1.standard0000644000265600020320000003372712264261473024216 0ustar andreasadminV(d) I(d) I(b) 2.000000e-01 2.453631e-06 -1.422291e-06 3.000000e-01 2.895711e-06 -1.708043e-06 4.000000e-01 3.437961e-06 -2.074550e-06 5.000000e-01 4.068699e-06 -2.514889e-06 6.000000e-01 4.774839e-06 -3.020813e-06 7.000000e-01 5.548485e-06 -3.587280e-06 8.000000e-01 6.385959e-06 -4.212054e-06 9.000000e-01 7.285974e-06 -4.894564e-06 1.000000e+00 8.248454e-06 -5.635104e-06 1.100000e+00 9.273911e-06 -6.434395e-06 1.200000e+00 1.036314e-05 -7.293371e-06 1.300000e+00 1.151709e-05 -8.213064e-06 1.400000e+00 1.273676e-05 -9.194557e-06 1.500000e+00 1.402320e-05 -1.023895e-05 1.600000e+00 1.537747e-05 -1.134737e-05 1.700000e+00 1.680063e-05 -1.252091e-05 1.800000e+00 1.829377e-05 -1.376070e-05 2.000000e-01 9.122161e-04 -5.496672e-04 3.000000e-01 9.852911e-04 -6.016477e-04 4.000000e-01 1.067933e-03 -6.645383e-04 5.000000e-01 1.159590e-03 -7.366885e-04 6.000000e-01 1.258353e-03 -8.159772e-04 7.000000e-01 1.362844e-03 -9.010039e-04 8.000000e-01 1.472347e-03 -9.910422e-04 9.000000e-01 1.586546e-03 -1.085762e-03 1.000000e+00 1.705326e-03 -1.185030e-03 1.100000e+00 1.828668e-03 -1.288811e-03 1.200000e+00 1.956592e-03 -1.397110e-03 1.300000e+00 2.089135e-03 -1.509953e-03 1.400000e+00 2.226344e-03 -1.627378e-03 1.500000e+00 2.368266e-03 -1.749425e-03 1.600000e+00 2.514947e-03 -1.876135e-03 1.700000e+00 2.666437e-03 -2.007552e-03 1.800000e+00 2.822778e-03 -2.143717e-03 2.000000e-01 4.777910e-03 -2.931055e-03 3.000000e-01 5.204317e-03 -3.230058e-03 4.000000e-01 5.482936e-03 -3.451336e-03 5.000000e-01 5.795521e-03 -3.712850e-03 6.000000e-01 6.134244e-03 -4.003880e-03 7.000000e-01 6.490001e-03 -4.314263e-03 8.000000e-01 6.857457e-03 -4.637992e-03 9.000000e-01 7.234000e-03 -4.972018e-03 1.000000e+00 7.618523e-03 -5.314936e-03 1.100000e+00 8.010621e-03 -5.666134e-03 1.200000e+00 8.410190e-03 -6.025360e-03 1.300000e+00 8.817248e-03 -6.392520e-03 1.400000e+00 9.231851e-03 -6.767590e-03 1.500000e+00 9.654067e-03 -7.150575e-03 1.600000e+00 1.008396e-02 -7.541491e-03 1.700000e+00 1.052160e-02 -7.940358e-03 1.800000e+00 1.096702e-02 -8.347196e-03 2.000000e-01 8.731829e-03 -5.388253e-03 3.000000e-01 1.023076e-02 -6.412957e-03 4.000000e-01 1.108025e-02 -7.062512e-03 5.000000e-01 1.162000e-02 -7.515466e-03 6.000000e-01 1.214176e-02 -7.973190e-03 7.000000e-01 1.271554e-02 -8.487183e-03 8.000000e-01 1.332318e-02 -9.038315e-03 9.000000e-01 1.395111e-02 -9.612406e-03 1.000000e+00 1.459200e-02 -1.020158e-02 1.100000e+00 1.524251e-02 -1.080204e-02 1.200000e+00 1.590132e-02 -1.141211e-02 1.300000e+00 1.656801e-02 -1.203112e-02 1.400000e+00 1.724250e-02 -1.265878e-02 1.500000e+00 1.792488e-02 -1.329503e-02 1.600000e+00 1.861525e-02 -1.393985e-02 1.700000e+00 1.931371e-02 -1.459326e-02 1.800000e+00 2.002037e-02 -1.525529e-02 2.000000e-01 1.201135e-02 -7.435606e-03 3.000000e-01 1.465957e-02 -9.222980e-03 4.000000e-01 1.636861e-02 -1.048527e-02 5.000000e-01 1.759522e-02 -1.147257e-02 6.000000e-01 1.852764e-02 -1.227571e-02 7.000000e-01 1.927204e-02 -1.294337e-02 8.000000e-01 2.003773e-02 -1.364489e-02 9.000000e-01 2.086733e-02 -1.441338e-02 1.000000e+00 2.173688e-02 -1.522435e-02 1.100000e+00 2.262957e-02 -1.606073e-02 1.200000e+00 2.353657e-02 -1.691335e-02 1.300000e+00 2.445381e-02 -1.777785e-02 1.400000e+00 2.537967e-02 -1.865230e-02 1.500000e+00 2.631355e-02 -1.953589e-02 1.600000e+00 2.725532e-02 -2.042832e-02 1.700000e+00 2.820504e-02 -2.132948e-02 1.800000e+00 2.916281e-02 -2.223935e-02 2.000000e-01 1.549010e-02 -9.619860e-03 3.000000e-01 1.997166e-02 -1.260714e-02 4.000000e-01 2.310429e-02 -1.485342e-02 5.000000e-01 2.546140e-02 -1.667020e-02 6.000000e-01 2.735395e-02 -1.822102e-02 7.000000e-01 2.894545e-02 -1.959044e-02 8.000000e-01 3.032875e-02 -2.082615e-02 9.000000e-01 3.155265e-02 -2.194864e-02 1.000000e+00 3.265049e-02 -2.297384e-02 1.100000e+00 3.379004e-02 -2.405022e-02 1.200000e+00 3.500407e-02 -2.520328e-02 1.300000e+00 3.626276e-02 -2.640280e-02 1.400000e+00 3.754683e-02 -2.762940e-02 1.500000e+00 3.884652e-02 -2.887317e-02 1.600000e+00 4.015732e-02 -3.012943e-02 1.700000e+00 4.147729e-02 -3.139607e-02 1.800000e+00 4.280562e-02 -3.267213e-02 2.000000e-01 1.733542e-02 -1.079080e-02 3.000000e-01 2.349534e-02 -1.486591e-02 4.000000e-01 2.818936e-02 -1.816521e-02 5.000000e-01 3.186126e-02 -2.091117e-02 6.000000e-01 3.484876e-02 -2.327343e-02 7.000000e-01 3.737398e-02 -2.536601e-02 8.000000e-01 3.957785e-02 -2.726348e-02 9.000000e-01 4.155136e-02 -2.901577e-02 1.000000e+00 4.335732e-02 -3.065894e-02 1.100000e+00 4.504172e-02 -3.222039e-02 1.200000e+00 4.663138e-02 -3.371442e-02 1.300000e+00 4.813490e-02 -3.514356e-02 1.400000e+00 4.966284e-02 -3.660806e-02 1.500000e+00 5.126444e-02 -3.814854e-02 1.600000e+00 5.291101e-02 -3.973546e-02 1.700000e+00 5.458317e-02 -4.134935e-02 1.800000e+00 5.627136e-02 -4.298054e-02 2.000000e-01 1.467933e-05 -8.510893e-06 3.000000e-01 1.705259e-05 -1.006007e-05 4.000000e-01 1.992123e-05 -1.202239e-05 5.000000e-01 2.323830e-05 -1.436515e-05 6.000000e-01 2.693708e-05 -1.704325e-05 7.000000e-01 3.097653e-05 -2.002885e-05 8.000000e-01 3.533745e-05 -2.330946e-05 9.000000e-01 4.001312e-05 -2.688161e-05 1.000000e+00 4.500312e-05 -3.074653e-05 1.100000e+00 5.031006e-05 -3.490775e-05 1.200000e+00 5.593805e-05 -3.936992e-05 1.300000e+00 6.189189e-05 -4.413825e-05 1.400000e+00 6.817675e-05 -4.921820e-05 1.500000e+00 7.479799e-05 -5.461535e-05 1.600000e+00 8.176102e-05 -6.033536e-05 1.700000e+00 8.907133e-05 -6.638387e-05 1.800000e+00 9.673440e-05 -7.276653e-05 2.000000e-01 8.321304e-04 -5.006804e-04 3.000000e-01 9.007884e-04 -5.491441e-04 4.000000e-01 9.748415e-04 -6.055807e-04 5.000000e-01 1.056104e-03 -6.698420e-04 6.000000e-01 1.143194e-03 -7.401631e-04 7.000000e-01 1.235005e-03 -8.153279e-04 8.000000e-01 1.330955e-03 -8.947015e-04 9.000000e-01 1.430794e-03 -9.779970e-04 1.000000e+00 1.534441e-03 -1.065103e-03 1.100000e+00 1.641890e-03 -1.155991e-03 1.200000e+00 1.753170e-03 -1.250671e-03 1.300000e+00 1.868323e-03 -1.349171e-03 1.400000e+00 1.987394e-03 -1.451525e-03 1.500000e+00 2.110432e-03 -1.557774e-03 1.600000e+00 2.237485e-03 -1.667957e-03 1.700000e+00 2.368598e-03 -1.782115e-03 1.800000e+00 2.503817e-03 -1.900289e-03 2.000000e-01 3.652371e-03 -2.238112e-03 3.000000e-01 4.130466e-03 -2.562488e-03 4.000000e-01 4.395449e-03 -2.766463e-03 5.000000e-01 4.668258e-03 -2.990212e-03 6.000000e-01 4.959447e-03 -3.236522e-03 7.000000e-01 5.262990e-03 -3.498002e-03 8.000000e-01 5.575240e-03 -3.770160e-03 9.000000e-01 5.894532e-03 -4.050768e-03 1.000000e+00 6.220262e-03 -4.338849e-03 1.100000e+00 6.552301e-03 -4.634016e-03 1.200000e+00 6.890700e-03 -4.936141e-03 1.300000e+00 7.235567e-03 -5.245204e-03 1.400000e+00 7.587022e-03 -5.561228e-03 1.500000e+00 7.945173e-03 -5.884250e-03 1.600000e+00 8.310116e-03 -6.214310e-03 1.700000e+00 8.681934e-03 -6.551447e-03 1.800000e+00 9.060700e-03 -6.895698e-03 2.000000e-01 6.643785e-03 -4.101071e-03 3.000000e-01 8.207974e-03 -5.144754e-03 4.000000e-01 9.127398e-03 -5.816542e-03 5.000000e-01 9.691780e-03 -6.271384e-03 6.000000e-01 1.018351e-02 -6.691608e-03 7.000000e-01 1.070829e-02 -7.151956e-03 8.000000e-01 1.125910e-02 -7.642651e-03 9.000000e-01 1.182524e-02 -8.152236e-03 1.000000e+00 1.240111e-02 -8.674388e-03 1.100000e+00 1.298437e-02 -9.206181e-03 1.200000e+00 1.357431e-02 -9.746421e-03 1.300000e+00 1.417086e-02 -1.029469e-02 1.400000e+00 1.477422e-02 -1.085089e-02 1.500000e+00 1.538461e-02 -1.141504e-02 1.600000e+00 1.600225e-02 -1.198721e-02 1.700000e+00 1.662735e-02 -1.256748e-02 1.800000e+00 1.726006e-02 -1.315591e-02 2.000000e-01 9.172915e-03 -5.686284e-03 3.000000e-01 1.185280e-02 -7.464791e-03 4.000000e-01 1.371895e-02 -8.794085e-03 5.000000e-01 1.504888e-02 -9.816349e-03 6.000000e-01 1.601416e-02 -1.061446e-02 7.000000e-01 1.676754e-02 -1.127188e-02 8.000000e-01 1.750007e-02 -1.192937e-02 9.000000e-01 1.827941e-02 -1.263889e-02 1.000000e+00 1.909114e-02 -1.338442e-02 1.100000e+00 1.992134e-02 -1.415166e-02 1.200000e+00 2.076277e-02 -1.493294e-02 1.300000e+00 2.161230e-02 -1.572470e-02 1.400000e+00 2.246884e-02 -1.652543e-02 1.500000e+00 2.333214e-02 -1.733457e-02 1.600000e+00 2.420231e-02 -1.815197e-02 1.700000e+00 2.507959e-02 -1.897763e-02 1.800000e+00 2.596423e-02 -1.981163e-02 2.000000e-01 1.198522e-02 -7.461766e-03 3.000000e-01 1.622686e-02 -1.026526e-02 4.000000e-01 1.949668e-02 -1.255690e-02 5.000000e-01 2.206377e-02 -1.446749e-02 6.000000e-01 2.412756e-02 -1.609181e-02 7.000000e-01 2.582158e-02 -1.749399e-02 8.000000e-01 2.724092e-02 -1.872191e-02 9.000000e-01 2.846119e-02 -1.981578e-02 1.000000e+00 2.956006e-02 -2.082494e-02 1.100000e+00 3.066626e-02 -2.185540e-02 1.200000e+00 3.182865e-02 -2.294620e-02 1.300000e+00 3.302843e-02 -2.407715e-02 1.400000e+00 3.424957e-02 -2.523197e-02 1.500000e+00 3.548382e-02 -2.640224e-02 1.600000e+00 3.672748e-02 -2.758399e-02 1.700000e+00 3.797899e-02 -2.877543e-02 1.800000e+00 3.923782e-02 -2.997579e-02 2.000000e-01 1.370734e-02 -8.560675e-03 3.000000e-01 1.924364e-02 -1.221178e-02 4.000000e-01 2.384579e-02 -1.540615e-02 5.000000e-01 2.766104e-02 -1.819567e-02 6.000000e-01 3.085604e-02 -2.064769e-02 7.000000e-01 3.357427e-02 -2.282650e-02 8.000000e-01 3.592624e-02 -2.478562e-02 9.000000e-01 3.799474e-02 -2.656790e-02 1.000000e+00 3.984484e-02 -2.820945e-02 1.100000e+00 4.153126e-02 -2.974284e-02 1.200000e+00 4.309973e-02 -3.119656e-02 1.300000e+00 4.459321e-02 -3.260046e-02 1.400000e+00 4.608992e-02 -3.402086e-02 1.500000e+00 4.763791e-02 -3.549704e-02 1.600000e+00 4.922332e-02 -3.701298e-02 1.700000e+00 5.083079e-02 -3.855302e-02 1.800000e+00 5.245234e-02 -4.010902e-02 2.000000e-01 6.551899e-05 -3.794651e-05 3.000000e-01 7.519873e-05 -4.430930e-05 4.000000e-01 8.641130e-05 -5.208516e-05 5.000000e-01 9.924773e-05 -6.128039e-05 6.000000e-01 1.134804e-04 -7.172258e-05 7.000000e-01 1.289545e-04 -8.329757e-05 8.000000e-01 1.455960e-04 -9.595243e-05 9.000000e-01 1.633787e-04 -1.096708e-04 1.000000e+00 1.823003e-04 -1.244552e-04 1.100000e+00 2.023700e-04 -1.403174e-04 1.200000e+00 2.236028e-04 -1.572737e-04 1.300000e+00 2.460160e-04 -1.753424e-04 1.400000e+00 2.696283e-04 -1.945430e-04 1.500000e+00 2.944593e-04 -2.148955e-04 1.600000e+00 3.205285e-04 -2.364201e-04 1.700000e+00 3.478558e-04 -2.591370e-04 1.800000e+00 3.764610e-04 -2.830665e-04 2.000000e-01 8.075969e-04 -4.841990e-04 3.000000e-01 8.892995e-04 -5.401244e-04 4.000000e-01 9.627663e-04 -5.957858e-04 5.000000e-01 1.041193e-03 -6.579298e-04 6.000000e-01 1.124553e-03 -7.255586e-04 7.000000e-01 1.212012e-03 -7.975753e-04 8.000000e-01 1.303083e-03 -8.733759e-04 9.000000e-01 1.397564e-03 -9.526864e-04 1.000000e+00 1.495397e-03 -1.035403e-03 1.100000e+00 1.596592e-03 -1.121499e-03 1.200000e+00 1.701186e-03 -1.210988e-03 1.300000e+00 1.809224e-03 -1.303897e-03 1.400000e+00 1.920758e-03 -1.400260e-03 1.500000e+00 2.035835e-03 -1.500115e-03 1.600000e+00 2.154503e-03 -1.603502e-03 1.700000e+00 2.276810e-03 -1.710459e-03 1.800000e+00 2.402799e-03 -1.821026e-03 2.000000e-01 2.585531e-03 -1.578743e-03 3.000000e-01 3.085894e-03 -1.909337e-03 4.000000e-01 3.352061e-03 -2.105671e-03 5.000000e-01 3.579646e-03 -2.288398e-03 6.000000e-01 3.815105e-03 -2.484869e-03 7.000000e-01 4.058858e-03 -2.692674e-03 8.000000e-01 4.308629e-03 -2.908582e-03 9.000000e-01 4.563352e-03 -3.130931e-03 1.000000e+00 4.822753e-03 -3.359037e-03 1.100000e+00 5.086890e-03 -3.592675e-03 1.200000e+00 5.355926e-03 -3.831810e-03 1.300000e+00 5.630038e-03 -4.076480e-03 1.400000e+00 5.909388e-03 -4.326743e-03 1.500000e+00 6.194115e-03 -4.582663e-03 1.600000e+00 6.484336e-03 -4.844299e-03 1.700000e+00 6.780152e-03 -5.111705e-03 1.800000e+00 7.081648e-03 -5.384930e-03 2.000000e-01 4.481734e-03 -2.761132e-03 3.000000e-01 5.826311e-03 -3.644099e-03 4.000000e-01 6.711104e-03 -4.268102e-03 5.000000e-01 7.277308e-03 -4.703683e-03 6.000000e-01 7.714654e-03 -5.065747e-03 7.000000e-01 8.148877e-03 -5.438755e-03 8.000000e-01 8.599913e-03 -5.833591e-03 9.000000e-01 9.062306e-03 -6.243397e-03 1.000000e+00 9.531795e-03 -6.663256e-03 1.100000e+00 1.000664e-02 -7.090855e-03 1.200000e+00 1.048644e-02 -7.525308e-03 1.300000e+00 1.097132e-02 -7.966369e-03 1.400000e+00 1.146161e-02 -8.414048e-03 1.500000e+00 1.195761e-02 -8.868446e-03 1.600000e+00 1.245965e-02 -9.329683e-03 1.700000e+00 1.296797e-02 -9.797875e-03 1.800000e+00 1.348277e-02 -1.027312e-02 2.000000e-01 6.162936e-03 -3.818385e-03 3.000000e-01 8.367425e-03 -5.265500e-03 4.000000e-01 1.006911e-02 -6.447925e-03 5.000000e-01 1.134870e-02 -7.394517e-03 6.000000e-01 1.229098e-02 -8.139326e-03 7.000000e-01 1.301343e-02 -8.746339e-03 8.000000e-01 1.366212e-02 -9.313738e-03 9.000000e-01 1.432570e-02 -9.905889e-03 1.000000e+00 1.501240e-02 -1.052552e-02 1.100000e+00 1.571359e-02 -1.116315e-02 1.200000e+00 1.642358e-02 -1.181267e-02 1.300000e+00 1.713986e-02 -1.247116e-02 1.400000e+00 1.786162e-02 -1.313741e-02 1.500000e+00 1.858878e-02 -1.381101e-02 1.600000e+00 1.932160e-02 -1.449188e-02 1.700000e+00 2.006039e-02 -1.518011e-02 1.800000e+00 2.080549e-02 -1.587581e-02 2.000000e-01 8.186538e-03 -5.102136e-03 3.000000e-01 1.154337e-02 -7.307932e-03 4.000000e-01 1.440416e-02 -9.281484e-03 5.000000e-01 1.681262e-02 -1.102696e-02 6.000000e-01 1.882223e-02 -1.255428e-02 7.000000e-01 2.048802e-02 -1.387988e-02 8.000000e-01 2.186939e-02 -1.502928e-02 9.000000e-01 2.303618e-02 -1.604057e-02 1.000000e+00 2.407193e-02 -1.696749e-02 1.100000e+00 2.507354e-02 -1.788201e-02 1.200000e+00 2.610003e-02 -1.882928e-02 1.300000e+00 2.715378e-02 -1.980762e-02 1.400000e+00 2.822496e-02 -2.080643e-02 1.500000e+00 2.930721e-02 -2.181909e-02 1.600000e+00 3.039746e-02 -2.284228e-02 1.700000e+00 3.149441e-02 -2.387448e-02 1.800000e+00 3.259764e-02 -2.491501e-02 2.000000e-01 9.633365e-03 -6.029800e-03 3.000000e-01 1.392460e-02 -8.853225e-03 4.000000e-01 1.779925e-02 -1.151792e-02 5.000000e-01 2.124542e-02 -1.399370e-02 6.000000e-01 2.428096e-02 -1.626524e-02 7.000000e-01 2.694293e-02 -1.833395e-02 8.000000e-01 2.927551e-02 -2.021184e-02 9.000000e-01 3.132394e-02 -2.191687e-02 1.000000e+00 3.313465e-02 -2.347203e-02 1.100000e+00 3.475692e-02 -2.490574e-02 1.200000e+00 3.624255e-02 -2.625105e-02 1.300000e+00 3.764621e-02 -2.754610e-02 1.400000e+00 3.902725e-02 -2.883622e-02 1.500000e+00 4.042807e-02 -3.015411e-02 1.600000e+00 4.185425e-02 -3.150119e-02 1.700000e+00 4.329839e-02 -3.286894e-02 1.800000e+00 4.475487e-02 -3.425143e-02 ngspice-26/tests/hisim/nmos/reference/35_acVd_CORSRD=0.standard0000644000265600020320000000715312264261473023563 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.2 5.457212e-03 1.167455e-02 1.32882335978472e-14 1.06351928795249e-14 0.3 7.499722e-03 5.782586e-03 1.39456237758385e-14 9.38533254111974e-15 0.4 8.827840e-03 2.877560e-03 1.46071939549615e-14 7.62078206336e-15 0.5 9.745832e-03 1.325058e-03 1.50387440718056e-14 5.61479652023066e-15 0.6 1.032182e-02 5.428156e-04 1.50989340881023e-14 4.37391318425608e-15 0.7 1.046253e-02 3.640996e-04 1.50647240788398e-14 3.95182606997415e-15 0.8 1.048503e-02 3.278262e-04 1.50619740780952e-14 3.89722405519042e-15 0.9 1.050543e-02 2.992767e-04 1.50616840780167e-14 3.85687604426602e-15 1 1.052668e-02 2.738046e-04 1.50615640779842e-14 3.81261903228324e-15 1.1 1.054715e-02 2.517398e-04 1.50615040779679e-14 3.76123801837161e-15 1.2 1.056575e-02 2.331253e-04 1.50614740779598e-14 3.70144000218103e-15 1.3 1.058213e-02 2.176091e-04 1.50614540779544e-14 3.63066198301757e-15 1.4 1.059633e-02 2.046913e-04 1.50614440779517e-14 3.54422195961356e-15 1.5 1.060857e-02 1.938818e-04 1.5061434077949e-14 3.44452993262151e-15 1.6 1.061912e-02 1.847608e-04 1.50614240779463e-14 3.33891390402551e-15 1.7 1.062822e-02 1.769893e-04 1.50614240779463e-14 3.23305287536317e-15 1.8 1.063610e-02 1.703007e-04 1.50614240779463e-14 3.12224384536115e-15 0.2 4.226394e-03 1.126599e-02 1.31004935470158e-14 1.04629628328928e-14 0.3 6.110437e-03 6.683166e-03 1.37363337191723e-14 9.23110849936291e-15 0.4 7.582344e-03 3.756512e-03 1.43732338916158e-14 7.5360100404076e-15 0.5 8.724916e-03 1.906119e-03 1.48059940087875e-14 5.62471052291492e-15 0.6 9.503908e-03 8.570185e-04 1.48926740322565e-14 4.39721919056628e-15 0.7 9.785703e-03 5.202026e-04 1.4862464024077e-14 3.94358506774287e-15 0.8 9.843432e-03 4.558668e-04 1.48547640219922e-14 3.84703504160152e-15 0.9 9.884593e-03 4.154272e-04 1.48541640218297e-14 3.80003102887498e-15 1 9.925734e-03 3.791888e-04 1.48540840218081e-14 3.75191601584763e-15 1.1 9.965196e-03 3.473858e-04 1.48540540217999e-14 3.69848600138122e-15 1.2 1.000148e-02 3.202834e-04 1.48540340217945e-14 3.63984698550445e-15 1.3 1.003405e-02 2.975138e-04 1.48540240217918e-14 3.57400996767879e-15 1.4 1.006295e-02 2.784454e-04 1.48540140217891e-14 3.49636094665498e-15 1.5 1.008850e-02 2.624232e-04 1.48540140217891e-14 3.40792092270946e-15 1.6 1.011111e-02 2.488678e-04 1.48540040217864e-14 3.31263789691117e-15 1.7 1.013119e-02 2.373007e-04 1.48540040217864e-14 3.21598987074329e-15 1.8 1.014909e-02 2.273386e-04 1.48540040217864e-14 3.12045684487731e-15 0.2 2.866239e-03 8.810054e-03 1.2824923472404e-14 1.02682927801851e-14 0.3 4.294226e-03 6.127745e-03 1.34218136340146e-14 9.09930146367558e-15 0.4 5.583223e-03 3.961572e-03 1.40202037960314e-14 7.54986504415891e-15 0.5 6.699969e-03 2.312510e-03 1.4465753916666e-14 5.78811256715673e-15 0.6 7.554643e-03 1.206650e-03 1.46082939552593e-14 4.51723422306088e-15 0.7 8.017037e-03 6.798478e-04 1.45940039513903e-14 3.97834107715321e-15 0.8 8.170882e-03 5.347061e-04 1.45772539468551e-14 3.80169802932633e-15 0.9 8.245040e-03 4.832887e-04 1.45737439459048e-14 3.73251201059391e-15 1 8.309994e-03 4.444044e-04 1.45732339457667e-14 3.67767599574682e-15 1.1 8.372395e-03 4.096999e-04 1.45731639457477e-14 3.62174798060407e-15 1.2 8.431181e-03 3.791876e-04 1.45731439457423e-14 3.56455496511881e-15 1.3 8.485466e-03 3.529251e-04 1.45731439457423e-14 3.50390194869674e-15 1.4 8.535042e-03 3.305580e-04 1.45731339457396e-14 3.43472592996703e-15 1.5 8.580119e-03 3.115548e-04 1.45731339457396e-14 3.35741890903582e-15 1.6 8.621096e-03 2.953685e-04 1.45731339457396e-14 3.27382888640346e-15 1.7 8.658432e-03 2.815070e-04 1.45731339457396e-14 3.18714886293446e-15 1.8 8.692577e-03 2.695541e-04 1.45731339457396e-14 3.10076583954588e-15 ngspice-26/tests/hisim/nmos/reference/24_dcSweep_CODFM=1.standard0000644000265600020320000002211412264261473024125 0ustar andreasadminV(d) I(d) 2.000000e-01 1.756760e-06 3.000000e-01 2.014409e-06 4.000000e-01 2.302615e-06 5.000000e-01 2.614290e-06 6.000000e-01 2.941772e-06 7.000000e-01 3.280493e-06 8.000000e-01 3.628134e-06 9.000000e-01 3.983549e-06 1.000000e+00 4.346140e-06 1.100000e+00 4.715572e-06 1.200000e+00 5.091628e-06 1.300000e+00 5.474156e-06 1.400000e+00 5.863039e-06 1.500000e+00 6.258178e-06 1.600000e+00 6.659489e-06 1.700000e+00 7.066897e-06 1.800000e+00 7.480335e-06 2.000000e-01 4.714736e-04 3.000000e-01 4.972767e-04 4.000000e-01 5.212918e-04 5.000000e-01 5.449028e-04 6.000000e-01 5.683965e-04 7.000000e-01 5.918157e-04 8.000000e-01 6.151788e-04 9.000000e-01 6.385093e-04 1.000000e+00 6.618324e-04 1.100000e+00 6.851708e-04 1.200000e+00 7.085434e-04 1.300000e+00 7.319655e-04 1.400000e+00 7.554491e-04 1.500000e+00 7.790039e-04 1.600000e+00 8.026371e-04 1.700000e+00 8.263548e-04 1.800000e+00 8.501613e-04 2.000000e-01 2.082037e-03 3.000000e-01 2.221416e-03 4.000000e-01 2.280438e-03 5.000000e-01 2.332674e-03 6.000000e-01 2.381664e-03 7.000000e-01 2.428374e-03 8.000000e-01 2.473438e-03 9.000000e-01 2.517278e-03 1.000000e+00 2.560188e-03 1.100000e+00 2.602374e-03 1.200000e+00 2.643985e-03 1.300000e+00 2.685133e-03 1.400000e+00 2.725899e-03 1.500000e+00 2.766348e-03 1.600000e+00 2.806529e-03 1.700000e+00 2.846483e-03 1.800000e+00 2.886242e-03 2.000000e-01 3.648707e-03 3.000000e-01 4.113294e-03 4.000000e-01 4.311111e-03 5.000000e-01 4.399249e-03 6.000000e-01 4.461267e-03 7.000000e-01 4.519345e-03 8.000000e-01 4.574589e-03 9.000000e-01 4.627465e-03 1.000000e+00 4.678426e-03 1.100000e+00 4.727867e-03 1.200000e+00 4.776099e-03 1.300000e+00 4.823365e-03 1.400000e+00 4.869845e-03 1.500000e+00 4.915681e-03 1.600000e+00 4.960978e-03 1.700000e+00 5.005819e-03 1.800000e+00 5.050271e-03 2.000000e-01 4.943501e-03 3.000000e-01 5.784322e-03 4.000000e-01 6.207847e-03 5.000000e-01 6.435287e-03 6.000000e-01 6.562243e-03 7.000000e-01 6.638377e-03 8.000000e-01 6.699680e-03 9.000000e-01 6.758260e-03 1.000000e+00 6.814720e-03 1.100000e+00 6.869245e-03 1.200000e+00 6.922081e-03 1.300000e+00 6.973486e-03 1.400000e+00 7.023699e-03 1.500000e+00 7.072917e-03 1.600000e+00 7.121304e-03 1.700000e+00 7.168993e-03 1.800000e+00 7.216088e-03 2.000000e-01 6.292402e-03 3.000000e-01 7.787668e-03 4.000000e-01 8.643088e-03 5.000000e-01 9.153474e-03 6.000000e-01 9.473716e-03 7.000000e-01 9.682945e-03 8.000000e-01 9.824531e-03 9.000000e-01 9.924473e-03 1.000000e+00 9.996432e-03 1.100000e+00 1.005689e-02 1.200000e+00 1.011526e-02 1.300000e+00 1.017213e-02 1.400000e+00 1.022756e-02 1.500000e+00 1.028165e-02 1.600000e+00 1.033454e-02 1.700000e+00 1.038637e-02 1.800000e+00 1.043727e-02 2.000000e-01 6.964393e-03 3.000000e-01 9.093352e-03 4.000000e-01 1.047608e-02 5.000000e-01 1.137317e-02 6.000000e-01 1.196946e-02 7.000000e-01 1.237839e-02 8.000000e-01 1.266725e-02 9.000000e-01 1.287657e-02 1.000000e+00 1.303211e-02 1.100000e+00 1.315130e-02 1.200000e+00 1.324571e-02 1.300000e+00 1.332002e-02 1.400000e+00 1.338143e-02 1.500000e+00 1.344020e-02 1.600000e+00 1.349769e-02 1.700000e+00 1.355400e-02 1.800000e+00 1.360918e-02 2.000000e-01 9.548738e-06 3.000000e-01 1.077757e-05 4.000000e-01 1.211947e-05 5.000000e-01 1.355815e-05 6.000000e-01 1.506338e-05 7.000000e-01 1.661638e-05 8.000000e-01 1.820759e-05 9.000000e-01 1.983237e-05 1.000000e+00 2.148837e-05 1.100000e+00 2.317432e-05 1.200000e+00 2.488942e-05 1.300000e+00 2.663312e-05 1.400000e+00 2.840502e-05 1.500000e+00 3.020476e-05 1.600000e+00 3.203205e-05 1.700000e+00 3.388661e-05 1.800000e+00 3.576821e-05 2.000000e-01 4.311838e-04 3.000000e-01 4.567472e-04 4.000000e-01 4.787110e-04 5.000000e-01 4.997799e-04 6.000000e-01 5.204766e-04 7.000000e-01 5.409611e-04 8.000000e-01 5.613108e-04 9.000000e-01 5.815791e-04 1.000000e+00 6.018068e-04 1.100000e+00 6.220258e-04 1.200000e+00 6.422606e-04 1.300000e+00 6.625303e-04 1.400000e+00 6.828499e-04 1.500000e+00 7.032309e-04 1.600000e+00 7.236827e-04 1.700000e+00 7.442126e-04 1.800000e+00 7.648263e-04 2.000000e-01 1.653444e-03 3.000000e-01 1.831406e-03 4.000000e-01 1.899673e-03 5.000000e-01 1.953041e-03 6.000000e-01 2.001848e-03 7.000000e-01 2.047569e-03 8.000000e-01 2.091100e-03 9.000000e-01 2.133049e-03 1.000000e+00 2.173828e-03 1.100000e+00 2.213720e-03 1.200000e+00 2.252925e-03 1.300000e+00 2.291586e-03 1.400000e+00 2.329809e-03 1.500000e+00 2.367675e-03 1.600000e+00 2.405244e-03 1.700000e+00 2.442566e-03 1.800000e+00 2.479680e-03 2.000000e-01 2.878902e-03 3.000000e-01 3.425942e-03 4.000000e-01 3.685303e-03 5.000000e-01 3.801825e-03 6.000000e-01 3.874781e-03 7.000000e-01 3.939900e-03 8.000000e-01 4.000831e-03 9.000000e-01 4.058293e-03 1.000000e+00 4.112943e-03 1.100000e+00 4.165359e-03 1.200000e+00 4.216006e-03 1.300000e+00 4.265241e-03 1.400000e+00 4.313337e-03 1.500000e+00 4.360501e-03 1.600000e+00 4.406892e-03 1.700000e+00 4.452632e-03 1.800000e+00 4.497820e-03 2.000000e-01 3.898018e-03 3.000000e-01 4.832254e-03 4.000000e-01 5.369868e-03 5.000000e-01 5.675329e-03 6.000000e-01 5.844139e-03 7.000000e-01 5.941663e-03 8.000000e-01 6.015340e-03 9.000000e-01 6.083548e-03 1.000000e+00 6.148410e-03 1.100000e+00 6.210288e-03 1.200000e+00 6.269556e-03 1.300000e+00 6.326604e-03 1.400000e+00 6.381793e-03 1.500000e+00 6.435428e-03 1.600000e+00 6.487762e-03 1.700000e+00 6.538999e-03 1.800000e+00 6.589305e-03 2.000000e-01 4.997762e-03 3.000000e-01 6.500547e-03 4.000000e-01 7.484506e-03 5.000000e-01 8.126812e-03 6.000000e-01 8.550207e-03 7.000000e-01 8.830719e-03 8.000000e-01 9.016659e-03 9.000000e-01 9.141762e-03 1.000000e+00 9.230728e-03 1.100000e+00 9.303815e-03 1.200000e+00 9.372464e-03 1.300000e+00 9.438622e-03 1.400000e+00 9.502527e-03 1.500000e+00 9.564355e-03 1.600000e+00 9.624310e-03 1.700000e+00 9.682603e-03 1.800000e+00 9.739434e-03 2.000000e-01 5.626909e-03 3.000000e-01 7.615639e-03 4.000000e-01 9.055956e-03 5.000000e-01 1.007722e-02 6.000000e-01 1.080145e-02 7.000000e-01 1.131968e-02 8.000000e-01 1.169419e-02 9.000000e-01 1.196682e-02 1.000000e+00 1.216664e-02 1.100000e+00 1.231499e-02 1.200000e+00 1.242782e-02 1.300000e+00 1.251637e-02 1.400000e+00 1.259028e-02 1.500000e+00 1.265898e-02 1.600000e+00 1.272547e-02 1.700000e+00 1.279014e-02 1.800000e+00 1.285312e-02 2.000000e-01 3.917877e-05 3.000000e-01 4.373610e-05 4.000000e-01 4.840591e-05 5.000000e-01 5.333390e-05 6.000000e-01 5.845431e-05 7.000000e-01 6.371556e-05 8.000000e-01 6.909092e-05 9.000000e-01 7.456778e-05 1.000000e+00 8.014015e-05 1.100000e+00 8.580502e-05 1.200000e+00 9.156066e-05 1.300000e+00 9.740596e-05 1.400000e+00 1.033401e-04 1.500000e+00 1.093623e-04 1.600000e+00 1.154720e-04 1.700000e+00 1.216685e-04 1.800000e+00 1.279515e-04 2.000000e-01 4.152242e-04 3.000000e-01 4.489277e-04 4.000000e-01 4.714795e-04 5.000000e-01 4.918929e-04 6.000000e-01 5.115122e-04 7.000000e-01 5.307041e-04 8.000000e-01 5.496347e-04 9.000000e-01 5.684024e-04 1.000000e+00 5.870734e-04 1.100000e+00 6.056944e-04 1.200000e+00 6.242993e-04 1.300000e+00 6.429137e-04 1.400000e+00 6.615570e-04 1.500000e+00 6.802442e-04 1.600000e+00 6.989873e-04 1.700000e+00 7.177955e-04 1.800000e+00 7.366767e-04 2.000000e-01 1.208402e-03 3.000000e-01 1.413783e-03 4.000000e-01 1.498445e-03 5.000000e-01 1.550865e-03 6.000000e-01 1.596000e-03 7.000000e-01 1.637526e-03 8.000000e-01 1.676557e-03 9.000000e-01 1.713790e-03 1.000000e+00 1.749710e-03 1.100000e+00 1.784651e-03 1.200000e+00 1.818852e-03 1.300000e+00 1.852480e-03 1.400000e+00 1.885658e-03 1.500000e+00 1.918479e-03 1.600000e+00 1.951012e-03 1.700000e+00 1.983312e-03 1.800000e+00 2.015421e-03 2.000000e-01 2.012597e-03 3.000000e-01 2.535655e-03 4.000000e-01 2.830214e-03 5.000000e-01 2.979381e-03 6.000000e-01 3.063612e-03 7.000000e-01 3.130397e-03 8.000000e-01 3.191486e-03 9.000000e-01 3.248645e-03 1.000000e+00 3.302578e-03 1.100000e+00 3.353888e-03 1.200000e+00 3.403089e-03 1.300000e+00 3.450599e-03 1.400000e+00 3.496745e-03 1.500000e+00 3.541779e-03 1.600000e+00 3.585897e-03 1.700000e+00 3.629252e-03 1.800000e+00 3.671966e-03 2.000000e-01 2.707209e-03 3.000000e-01 3.549621e-03 4.000000e-01 4.114078e-03 5.000000e-01 4.472593e-03 6.000000e-01 4.686407e-03 7.000000e-01 4.812006e-03 8.000000e-01 4.898429e-03 9.000000e-01 4.973031e-03 1.000000e+00 5.042888e-03 1.100000e+00 5.109132e-03 1.200000e+00 5.172189e-03 1.300000e+00 5.232465e-03 1.400000e+00 5.290362e-03 1.500000e+00 5.346242e-03 1.600000e+00 5.400416e-03 1.700000e+00 5.453144e-03 1.800000e+00 5.504643e-03 2.000000e-01 3.513679e-03 3.000000e-01 4.785442e-03 4.000000e-01 5.740254e-03 5.000000e-01 6.437558e-03 6.000000e-01 6.936811e-03 7.000000e-01 7.286496e-03 8.000000e-01 7.525446e-03 9.000000e-01 7.686889e-03 1.000000e+00 7.799967e-03 1.100000e+00 7.888836e-03 1.200000e+00 7.968521e-03 1.300000e+00 8.044139e-03 1.400000e+00 8.116734e-03 1.500000e+00 8.186602e-03 1.600000e+00 8.253972e-03 1.700000e+00 8.319080e-03 1.800000e+00 8.382164e-03 2.000000e-01 4.056691e-03 3.000000e-01 5.674251e-03 4.000000e-01 6.978848e-03 5.000000e-01 8.002120e-03 6.000000e-01 8.791944e-03 7.000000e-01 9.395699e-03 8.000000e-01 9.853507e-03 9.000000e-01 1.019746e-02 1.000000e+00 1.045348e-02 1.100000e+00 1.064331e-02 1.200000e+00 1.078553e-02 1.300000e+00 1.089578e-02 1.400000e+00 1.098702e-02 1.500000e+00 1.106904e-02 1.600000e+00 1.114687e-02 1.700000e+00 1.122200e-02 1.800000e+00 1.129481e-02 ngspice-26/tests/hisim/nmos/reference/36_acVd_CORSRD=-1_GDLD.standard0000644000265600020320000000714612264261473024436 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.2 4.759243e-03 9.564863e-03 1.46386239634713e-14 9.64620561175226e-15 0.3 7.032326e-03 4.919515e-03 1.49704240533076e-14 8.65615734369237e-15 0.4 8.666903e-03 2.281328e-03 1.53346941519354e-14 6.63903079754656e-15 0.5 9.776300e-03 8.638449e-04 1.53477241554633e-14 4.67392826548647e-15 0.6 1.014332e-02 4.568283e-04 1.52397241262218e-14 3.98781207971752e-15 0.7 1.020019e-02 3.929787e-04 1.52273941228834e-14 3.92352106231045e-15 0.8 1.024444e-02 3.490366e-04 1.52233141217787e-14 3.89339905415478e-15 0.9 1.028520e-02 3.130814e-04 1.52193141206957e-14 3.86095404537016e-15 1 1.032091e-02 2.841080e-04 1.521482411948e-14 3.82338903519926e-15 1.1 1.035113e-02 2.609934e-04 1.52094641180288e-14 3.77821702296875e-15 1.2 1.037628e-02 2.425264e-04 1.5202994116277e-14 3.72380100823537e-15 1.3 1.039713e-02 2.276335e-04 1.5195404114222e-14 3.66009699098723e-15 1.4 1.041444e-02 2.154604e-04 1.51860441116877e-14 3.58176396977822e-15 1.5 1.042889e-02 2.053613e-04 1.5174854108658e-14 3.48831094447541e-15 1.6 1.044104e-02 1.968581e-04 1.51624641053033e-14 3.38503691651352e-15 1.7 1.045132e-02 1.895984e-04 1.51498141018783e-14 3.27972988800118e-15 1.8 1.046008e-02 1.833210e-04 1.51369740984018e-14 3.17286285906646e-15 0.2 3.819781e-03 8.365514e-03 1.42326138535423e-14 9.48305656757895e-15 0.3 5.768557e-03 5.031508e-03 1.46503939666581e-14 8.34812226029053e-15 0.4 7.420256e-03 2.641832e-03 1.50258140683047e-14 6.41097673579993e-15 0.5 8.659678e-03 1.134947e-03 1.50708840805076e-14 4.62506225225579e-15 0.6 9.180364e-03 5.868965e-04 1.49841940570359e-14 3.98186107810626e-15 0.7 9.294187e-03 4.911741e-04 1.49647140517616e-14 3.87623204950674e-15 0.8 9.371761e-03 4.381618e-04 1.4960494050619e-14 3.83910103945336e-15 0.9 9.444036e-03 3.935132e-04 1.49568840496416e-14 3.80194102939212e-15 1 9.509179e-03 3.565457e-04 1.49527940485342e-14 3.75990901801177e-15 1.1 9.566234e-03 3.265737e-04 1.49479340472184e-14 3.71137100486989e-15 1.2 9.615620e-03 3.023917e-04 1.49422740456859e-14 3.65619598993102e-15 1.3 9.658315e-03 2.827744e-04 1.49358940439585e-14 3.5953019734437e-15 1.4 9.695393e-03 2.666870e-04 1.49281940418737e-14 3.52331395395263e-15 1.5 9.727825e-03 2.533203e-04 1.49191140394152e-14 3.43970793131593e-15 1.6 9.756427e-03 2.420619e-04 1.49089740366698e-14 3.34727390628902e-15 1.7 9.781865e-03 2.324532e-04 1.48983640337971e-14 3.25124588028901e-15 1.8 9.804670e-03 2.241508e-04 1.48877940309352e-14 3.15594885448692e-15 0.2 2.696926e-03 6.292135e-03 1.36407236932855e-14 9.38186254018022e-15 0.3 4.119650e-03 4.278211e-03 1.41290938255138e-14 8.16061920952326e-15 0.4 5.447375e-03 2.567680e-03 1.45494339393227e-14 6.36475272328457e-15 0.5 6.538848e-03 1.308786e-03 1.46774039739712e-14 4.70505827391506e-15 0.6 7.153775e-03 6.830446e-04 1.46244939596456e-14 4.0096350856262e-15 0.7 7.362557e-03 5.166951e-04 1.45956739518424e-14 3.83282203775329e-15 0.8 7.470502e-03 4.592289e-04 1.45889739500284e-14 3.7750830221202e-15 0.9 7.565068e-03 4.166178e-04 1.45857939491674e-14 3.72990500988806e-15 1 7.652762e-03 3.802713e-04 1.45826239483091e-14 3.68212099695033e-15 1.1 7.732525e-03 3.497925e-04 1.45789839473235e-14 3.6298849828072e-15 1.2 7.804123e-03 3.246339e-04 1.4574933946227e-14 3.5744509677982e-15 1.3 7.868150e-03 3.039429e-04 1.45705639450438e-14 3.51697595223659e-15 1.4 7.925525e-03 2.868535e-04 1.4565323943625e-14 3.45137293447428e-15 1.5 7.977206e-03 2.726183e-04 1.45591639419572e-14 3.37727591441219e-15 1.6 8.024061e-03 2.606359e-04 1.45522339400808e-14 3.29608889243045e-15 1.7 8.066837e-03 2.504370e-04 1.45448039380691e-14 3.21064586929638e-15 1.8 8.106155e-03 2.416601e-04 1.45371939360087e-14 3.12445584596005e-15 ngspice-26/tests/hisim/nmos/reference/45_acFreq_COOVLP=1.standard0000644000265600020320000002533012264261473024114 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/60_acFreq_CORBNET=0.standard0000644000265600020320000002533012264261473024202 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/79_noise_COIGN=0_T-55.standard0000644000265600020320000000353212264261473024405 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/nmos/reference/9_dcSweep_COIIGS=1.standard0000644000265600020320000002221112264261473024173 0ustar andreasadminV(d) I(g) 2.000000e-01 1.294879e-10 3.000000e-01 1.062457e-10 4.000000e-01 9.661922e-11 5.000000e-01 8.477424e-11 6.000000e-01 4.447812e-11 7.000000e-01 -3.588654e-11 8.000000e-01 -1.711020e-10 9.000000e-01 -3.798938e-10 1.000000e+00 -6.858542e-10 1.100000e+00 -1.118549e-09 1.200000e+00 -1.714853e-09 1.300000e+00 -2.520551e-09 1.400000e+00 -3.592273e-09 1.500000e+00 -4.999809e-09 1.600000e+00 -6.828894e-09 1.700000e+00 -9.184537e-09 1.800000e+00 -1.219501e-08 2.000000e-01 1.048413e-09 3.000000e-01 8.902004e-10 4.000000e-01 7.740073e-10 5.000000e-01 6.878050e-10 6.000000e-01 6.277899e-10 7.000000e-01 5.737892e-10 8.000000e-01 4.972432e-10 9.000000e-01 3.851718e-10 1.000000e+00 2.219098e-10 1.100000e+00 -1.189086e-11 1.200000e+00 -3.402899e-10 1.300000e+00 -7.932195e-10 1.400000e+00 -1.407848e-09 1.500000e+00 -2.230204e-09 1.600000e+00 -3.317118e-09 1.700000e+00 -4.738551e-09 1.800000e+00 -6.580382e-09 2.000000e-01 5.424797e-09 3.000000e-01 4.749972e-09 4.000000e-01 4.257447e-09 5.000000e-01 3.857698e-09 6.000000e-01 3.521469e-09 7.000000e-01 3.235692e-09 8.000000e-01 2.995727e-09 9.000000e-01 2.779745e-09 1.000000e+00 2.557175e-09 1.100000e+00 2.313066e-09 1.200000e+00 2.029991e-09 1.300000e+00 1.687082e-09 1.400000e+00 1.258983e-09 1.500000e+00 7.146564e-10 1.600000e+00 1.599328e-11 1.700000e+00 -8.838420e-10 1.800000e+00 -2.042375e-09 2.000000e-01 1.783805e-08 3.000000e-01 1.592959e-08 4.000000e-01 1.440888e-08 5.000000e-01 1.321847e-08 6.000000e-01 1.221723e-08 7.000000e-01 1.132808e-08 8.000000e-01 1.053320e-08 9.000000e-01 9.823775e-09 1.000000e+00 9.194892e-09 1.100000e+00 8.622393e-09 1.200000e+00 8.072742e-09 1.300000e+00 7.528010e-09 1.400000e+00 6.968008e-09 1.500000e+00 6.369389e-09 1.600000e+00 5.704608e-09 1.700000e+00 4.940703e-09 1.800000e+00 4.037876e-09 2.000000e-01 4.421270e-08 3.000000e-01 4.089926e-08 4.000000e-01 3.770064e-08 5.000000e-01 3.481002e-08 6.000000e-01 3.227784e-08 7.000000e-01 3.011882e-08 8.000000e-01 2.820524e-08 9.000000e-01 2.645761e-08 1.000000e+00 2.486374e-08 1.100000e+00 2.341389e-08 1.200000e+00 2.209940e-08 1.300000e+00 2.089157e-08 1.400000e+00 1.975234e-08 1.500000e+00 1.865957e-08 1.600000e+00 1.758922e-08 1.700000e+00 1.651450e-08 1.800000e+00 1.540476e-08 2.000000e-01 1.264813e-07 3.000000e-01 1.207976e-07 4.000000e-01 1.146565e-07 5.000000e-01 1.082692e-07 6.000000e-01 1.019045e-07 7.000000e-01 9.580990e-08 8.000000e-01 9.010313e-08 9.000000e-01 8.482697e-08 1.000000e+00 8.016744e-08 1.100000e+00 7.594916e-08 1.200000e+00 7.204134e-08 1.300000e+00 6.842883e-08 1.400000e+00 6.509389e-08 1.500000e+00 6.201739e-08 1.600000e+00 5.916014e-08 1.700000e+00 5.647436e-08 1.800000e+00 5.392916e-08 2.000000e-01 2.877325e-07 3.000000e-01 2.791106e-07 4.000000e-01 2.693053e-07 5.000000e-01 2.585567e-07 6.000000e-01 2.471882e-07 7.000000e-01 2.355453e-07 8.000000e-01 2.239715e-07 9.000000e-01 2.127479e-07 1.000000e+00 2.020315e-07 1.100000e+00 1.918645e-07 1.200000e+00 1.823129e-07 1.300000e+00 1.736706e-07 1.400000e+00 1.658331e-07 1.500000e+00 1.585247e-07 1.600000e+00 1.517087e-07 1.700000e+00 1.453554e-07 1.800000e+00 1.394320e-07 2.000000e-01 1.539218e-10 3.000000e-01 1.250793e-10 4.000000e-01 1.121186e-10 5.000000e-01 9.809885e-11 6.000000e-01 5.622763e-11 7.000000e-01 -2.537602e-11 8.000000e-01 -1.616190e-10 9.000000e-01 -3.712902e-10 1.000000e+00 -6.780173e-10 1.100000e+00 -1.111389e-09 1.200000e+00 -1.708294e-09 1.300000e+00 -2.514531e-09 1.400000e+00 -3.586737e-09 1.500000e+00 -4.994710e-09 1.600000e+00 -6.824191e-09 1.700000e+00 -9.180193e-09 1.800000e+00 -1.219099e-08 2.000000e-01 1.438804e-09 3.000000e-01 1.225671e-09 4.000000e-01 1.069733e-09 5.000000e-01 9.531075e-10 6.000000e-01 8.684829e-10 7.000000e-01 7.937623e-10 8.000000e-01 6.993198e-10 9.000000e-01 5.715384e-10 1.000000e+00 3.943358e-10 1.100000e+00 1.480668e-10 1.200000e+00 -1.915520e-10 1.300000e+00 -6.546287e-10 1.400000e+00 -1.278474e-09 1.500000e+00 -2.109232e-09 1.600000e+00 -3.203833e-09 1.700000e+00 -4.632319e-09 1.800000e+00 -6.480640e-09 2.000000e-01 6.980681e-09 3.000000e-01 6.122520e-09 4.000000e-01 5.498142e-09 5.000000e-01 4.991555e-09 6.000000e-01 4.564365e-09 7.000000e-01 4.199405e-09 8.000000e-01 3.889614e-09 9.000000e-01 3.611516e-09 1.000000e+00 3.333308e-09 1.100000e+00 3.039080e-09 1.200000e+00 2.710635e-09 1.300000e+00 2.326474e-09 1.400000e+00 1.860719e-09 1.500000e+00 1.281896e-09 1.600000e+00 5.515270e-10 1.700000e+00 -3.775363e-10 1.800000e+00 -1.563088e-09 2.000000e-01 2.195501e-08 3.000000e-01 1.963353e-08 4.000000e-01 1.779300e-08 5.000000e-01 1.633409e-08 6.000000e-01 1.510378e-08 7.000000e-01 1.401539e-08 8.000000e-01 1.304270e-08 9.000000e-01 1.217348e-08 1.000000e+00 1.140030e-08 1.100000e+00 1.069697e-08 1.200000e+00 1.002825e-08 1.300000e+00 9.374764e-09 1.400000e+00 8.715093e-09 1.500000e+00 8.024842e-09 1.600000e+00 7.275563e-09 1.700000e+00 6.433523e-09 1.800000e+00 5.458253e-09 2.000000e-01 5.281593e-08 3.000000e-01 4.876487e-08 4.000000e-01 4.494204e-08 5.000000e-01 4.152781e-08 6.000000e-01 3.855669e-08 7.000000e-01 3.597213e-08 8.000000e-01 3.368784e-08 9.000000e-01 3.161180e-08 1.000000e+00 2.972109e-08 1.100000e+00 2.800151e-08 1.200000e+00 2.644089e-08 1.300000e+00 2.500760e-08 1.400000e+00 2.366115e-08 1.500000e+00 2.237732e-08 1.600000e+00 2.113031e-08 1.700000e+00 1.989182e-08 1.800000e+00 1.862987e-08 2.000000e-01 1.464652e-07 3.000000e-01 1.392890e-07 4.000000e-01 1.318547e-07 5.000000e-01 1.243101e-07 6.000000e-01 1.169164e-07 7.000000e-01 1.099206e-07 8.000000e-01 1.034314e-07 9.000000e-01 9.745124e-08 1.000000e+00 9.206512e-08 1.100000e+00 8.720563e-08 1.200000e+00 8.272828e-08 1.300000e+00 7.859660e-08 1.400000e+00 7.478539e-08 1.500000e+00 7.126999e-08 1.600000e+00 6.800670e-08 1.700000e+00 6.494404e-08 1.800000e+00 6.204800e-08 2.000000e-01 3.258580e-07 3.000000e-01 3.144272e-07 4.000000e-01 3.022583e-07 5.000000e-01 2.894017e-07 6.000000e-01 2.761295e-07 7.000000e-01 2.627696e-07 8.000000e-01 2.496570e-07 9.000000e-01 2.370639e-07 1.000000e+00 2.251332e-07 1.100000e+00 2.138882e-07 1.200000e+00 2.033512e-07 1.300000e+00 1.936806e-07 1.400000e+00 1.848861e-07 1.500000e+00 1.767391e-07 1.600000e+00 1.691561e-07 1.700000e+00 1.620944e-07 1.800000e+00 1.555136e-07 2.000000e-01 2.273831e-10 3.000000e-01 1.822931e-10 4.000000e-01 1.595193e-10 5.000000e-01 1.390317e-10 6.000000e-01 9.244179e-11 7.000000e-01 7.108425e-12 8.000000e-01 -1.322380e-10 9.000000e-01 -3.445713e-10 1.000000e+00 -6.536240e-10 1.100000e+00 -1.089051e-09 1.200000e+00 -1.687788e-09 1.300000e+00 -2.495666e-09 1.400000e+00 -3.569350e-09 1.500000e+00 -4.978660e-09 1.600000e+00 -6.809352e-09 1.700000e+00 -9.166458e-09 1.800000e+00 -1.217827e-08 2.000000e-01 1.991349e-09 3.000000e-01 1.703767e-09 4.000000e-01 1.493171e-09 5.000000e-01 1.334183e-09 6.000000e-01 1.215012e-09 7.000000e-01 1.111059e-09 8.000000e-01 9.912873e-10 9.000000e-01 8.412245e-10 1.000000e+00 6.442187e-10 1.100000e+00 3.802158e-10 1.200000e+00 2.462120e-11 1.300000e+00 -4.529187e-10 1.400000e+00 -1.089913e-09 1.500000e+00 -1.932672e-09 1.600000e+00 -3.038260e-09 1.700000e+00 -4.476837e-09 1.800000e+00 -6.334451e-09 2.000000e-01 8.724467e-09 3.000000e-01 7.648332e-09 4.000000e-01 6.881986e-09 5.000000e-01 6.260759e-09 6.000000e-01 5.735183e-09 7.000000e-01 5.283867e-09 8.000000e-01 4.897437e-09 9.000000e-01 4.550848e-09 1.000000e+00 4.211095e-09 1.100000e+00 3.861295e-09 1.200000e+00 3.482452e-09 1.300000e+00 3.052401e-09 1.400000e+00 2.544705e-09 1.500000e+00 1.927420e-09 1.600000e+00 1.161668e-09 1.700000e+00 1.999581e-10 1.800000e+00 -1.015796e-09 2.000000e-01 2.595206e-08 3.000000e-01 2.322923e-08 4.000000e-01 2.107633e-08 5.000000e-01 1.936809e-08 6.000000e-01 1.791820e-08 7.000000e-01 1.664013e-08 8.000000e-01 1.549844e-08 9.000000e-01 1.447698e-08 1.000000e+00 1.356592e-08 1.100000e+00 1.273724e-08 1.200000e+00 1.195413e-08 1.300000e+00 1.119594e-08 1.400000e+00 1.044012e-08 1.500000e+00 9.661324e-09 1.600000e+00 8.830277e-09 1.700000e+00 7.912528e-09 1.800000e+00 6.866988e-09 2.000000e-01 6.047354e-08 3.000000e-01 5.565539e-08 4.000000e-01 5.128203e-08 5.000000e-01 4.742404e-08 6.000000e-01 4.408651e-08 7.000000e-01 4.115018e-08 8.000000e-01 3.853565e-08 9.000000e-01 3.617275e-08 1.000000e+00 3.402466e-08 1.100000e+00 3.207158e-08 1.200000e+00 3.029788e-08 1.300000e+00 2.866925e-08 1.400000e+00 2.714302e-08 1.500000e+00 2.569319e-08 1.600000e+00 2.429245e-08 1.700000e+00 2.291121e-08 1.800000e+00 2.151642e-08 2.000000e-01 1.629783e-07 3.000000e-01 1.539468e-07 4.000000e-01 1.452223e-07 5.000000e-01 1.366905e-07 6.000000e-01 1.284998e-07 7.000000e-01 1.208398e-07 8.000000e-01 1.137929e-07 9.000000e-01 1.073188e-07 1.000000e+00 1.013964e-07 1.100000e+00 9.601697e-08 1.200000e+00 9.109154e-08 1.300000e+00 8.655806e-08 1.400000e+00 8.238042e-08 1.500000e+00 7.852837e-08 1.600000e+00 7.495415e-08 1.700000e+00 7.160309e-08 1.800000e+00 6.843857e-08 2.000000e-01 3.560584e-07 3.000000e-01 3.407164e-07 4.000000e-01 3.258449e-07 5.000000e-01 3.109562e-07 6.000000e-01 2.960811e-07 7.000000e-01 2.814190e-07 8.000000e-01 2.672265e-07 9.000000e-01 2.537247e-07 1.000000e+00 2.410252e-07 1.100000e+00 2.291253e-07 1.200000e+00 2.179916e-07 1.300000e+00 2.076558e-07 1.400000e+00 1.981598e-07 1.500000e+00 1.894090e-07 1.600000e+00 1.812918e-07 1.700000e+00 1.737428e-07 1.800000e+00 1.667125e-07 ngspice-26/tests/hisim/nmos/reference/58_acFreq_CORG=0.standard0000644000265600020320000002533012264261473023647 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/39_acVd_VFBCL.standard0000644000265600020320000000720012264261473023243 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.2 -3.550473e-04 8.460926e-03 5.64989252973306e-14 5.32825144264733e-14 0.3 -5.086342e-04 8.428771e-03 5.73527755285142e-14 5.22972241597016e-14 0.4 -6.319028e-04 8.311268e-03 5.82507157716355e-14 5.12161338669917e-14 0.5 -7.154253e-04 8.108938e-03 5.91952760273793e-14 5.00271535450701e-14 0.6 -7.519597e-04 7.826939e-03 6.01872062959487e-14 4.87185331907555e-14 0.7 -7.370877e-04 7.474338e-03 6.12258965771787e-14 4.72783828008284e-14 0.8 -6.694710e-04 7.063017e-03 6.23093968705411e-14 4.56945123719886e-14 0.9 -5.507079e-04 6.606440e-03 6.34344071751425e-14 4.3954301900819e-14 1 -3.848571e-04 6.118428e-03 6.45960474896617e-14 4.20447113837891e-14 1.1 -1.777524e-04 5.612095e-03 6.57874878122494e-14 3.99529408174331e-14 1.2 6.374208e-05 5.099095e-03 6.69990781402928e-14 3.76690301990543e-14 1.3 3.323964e-04 4.589231e-03 6.82171384700879e-14 3.51852395265571e-14 1.4 6.210973e-04 4.090429e-03 6.94226287964797e-14 3.24994587993703e-14 1.5 9.230987e-04 3.609011e-03 7.05902091126072e-14 2.96299580224404e-14 1.6 1.232052e-03 3.150139e-03 7.1688499409974e-14 2.66189772072042e-14 1.7 1.541895e-03 2.718273e-03 7.2682429679085e-14 2.35302263709115e-14 1.8 1.846721e-03 2.317458e-03 7.35379999107344e-14 2.04399055341936e-14 0.2 -2.072529e-04 7.313681e-03 5.61919352142117e-14 5.2962784339905e-14 0.3 -2.897088e-04 7.268580e-03 5.70409954440984e-14 5.19674840704231e-14 0.4 -3.496875e-04 7.164594e-03 5.79334456857332e-14 5.08763637749975e-14 0.5 -3.816963e-04 7.001598e-03 5.88717759397902e-14 4.96774334503819e-14 0.6 -3.813964e-04 6.782160e-03 5.98566962064617e-14 4.83590930934355e-14 0.7 -3.459220e-04 6.511148e-03 6.08875364855662e-14 4.69097227010121e-14 0.8 -2.740346e-04 6.195182e-03 6.19622767765568e-14 4.53176022699386e-14 0.9 -1.661009e-04 5.842038e-03 6.3077517078513e-14 4.35708417969955e-14 1 -2.391313e-05 5.460037e-03 6.42283373901026e-14 4.16575912789746e-14 1.1 1.496040e-04 5.057481e-03 6.54078077094494e-14 3.95668907129083e-14 1.2 3.507349e-04 4.642208e-03 6.66062680339377e-14 3.72910800967227e-14 1.3 5.752934e-04 4.221323e-03 6.78101283598881e-14 3.48239894287471e-14 1.4 8.188595e-04 3.801139e-03 6.90006086822159e-14 3.21645987087055e-14 1.5 1.076892e-03 3.387291e-03 7.01528889942008e-14 2.93306279413955e-14 1.6 1.344715e-03 2.984980e-03 7.12364392875768e-14 2.63612171374146e-14 1.7 1.617431e-03 2.599216e-03 7.22173395531598e-14 2.33191863137715e-14 1.8 1.889857e-03 2.234921e-03 7.30628397820827e-14 2.02859454925083e-14 0.2 -5.920285e-05 5.793272e-03 5.57381250913406e-14 5.25060242162352e-14 0.3 -7.188946e-05 5.732906e-03 5.65768953184413e-14 5.15014739442488e-14 0.4 -6.963197e-05 5.638625e-03 5.74580155570084e-14 5.04018336465164e-14 0.5 -5.001920e-05 5.509970e-03 5.83839358077054e-14 4.91953933198674e-14 0.6 -1.109296e-05 5.347765e-03 5.93553060707081e-14 4.7870932961264e-14 0.7 4.853562e-05 5.153918e-03 6.03713863458163e-14 4.64173925677116e-14 0.8 1.296189e-04 4.931193e-03 6.14300966324667e-14 4.48239521362806e-14 0.9 2.322586e-04 4.683001e-03 6.25279369297118e-14 4.30800116641011e-14 1 3.559416e-04 4.413192e-03 6.36598872361923e-14 4.1175591148471e-14 1.1 4.996149e-04 4.125851e-03 6.48190275500346e-14 3.91022805871131e-14 1.2 6.617797e-04 3.825125e-03 6.59957878686476e-14 3.68552699787252e-14 1.3 8.405786e-04 3.515118e-03 6.717697818846e-14 3.4429949322059e-14 1.4 1.033847e-03 3.199865e-03 6.83446385046091e-14 3.18261086170578e-14 1.5 1.239112e-03 2.883398e-03 6.94752888107376e-14 2.90612078684488e-14 1.6 1.453528e-03 2.569856e-03 7.05403190990992e-14 2.61711670859577e-14 1.7 1.673803e-03 2.263591e-03 7.1508029361111e-14 2.32133562851175e-14 1.8 1.896145e-03 1.969158e-03 7.23477695884743e-14 2.02647454867683e-14 ngspice-26/tests/hisim/nmos/reference/25_dcSweep_VFBCL.standard0000644000265600020320000002211412264261473023754 0ustar andreasadminV(d) I(d) 2.000000e-01 1.811016e-03 3.000000e-01 2.727847e-03 4.000000e-01 3.652039e-03 5.000000e-01 4.583361e-03 6.000000e-01 5.521542e-03 7.000000e-01 6.466283e-03 8.000000e-01 7.417270e-03 9.000000e-01 8.374167e-03 1.000000e+00 9.336625e-03 1.100000e+00 1.030428e-02 1.200000e+00 1.127673e-02 1.300000e+00 1.225360e-02 1.400000e+00 1.323447e-02 1.500000e+00 1.421890e-02 1.600000e+00 1.520645e-02 1.700000e+00 1.619668e-02 1.800000e+00 1.718911e-02 2.000000e-01 1.780140e-03 3.000000e-01 2.681188e-03 4.000000e-01 3.589385e-03 5.000000e-01 4.504519e-03 6.000000e-01 5.426339e-03 7.000000e-01 6.354570e-03 8.000000e-01 7.288919e-03 9.000000e-01 8.229076e-03 1.000000e+00 9.174716e-03 1.100000e+00 1.012550e-02 1.200000e+00 1.108107e-02 1.300000e+00 1.204106e-02 1.400000e+00 1.300508e-02 1.500000e+00 1.397273e-02 1.600000e+00 1.494361e-02 1.700000e+00 1.591729e-02 1.800000e+00 1.689334e-02 2.000000e-01 1.750266e-03 3.000000e-01 2.636047e-03 4.000000e-01 3.528772e-03 5.000000e-01 4.428247e-03 6.000000e-01 5.334240e-03 7.000000e-01 6.246496e-03 8.000000e-01 7.164741e-03 9.000000e-01 8.088691e-03 1.000000e+00 9.018043e-03 1.100000e+00 9.952482e-03 1.200000e+00 1.089168e-02 1.300000e+00 1.183528e-02 1.400000e+00 1.278295e-02 1.500000e+00 1.373429e-02 1.600000e+00 1.468894e-02 1.700000e+00 1.564650e-02 1.800000e+00 1.660657e-02 2.000000e-01 1.721348e-03 3.000000e-01 2.592351e-03 4.000000e-01 3.470104e-03 5.000000e-01 4.354425e-03 6.000000e-01 5.245100e-03 7.000000e-01 6.141891e-03 8.000000e-01 7.044546e-03 9.000000e-01 7.952799e-03 1.000000e+00 8.866370e-03 1.100000e+00 9.784965e-03 1.200000e+00 1.070828e-02 1.300000e+00 1.163599e-02 1.400000e+00 1.256776e-02 1.500000e+00 1.350326e-02 1.600000e+00 1.444212e-02 1.700000e+00 1.538398e-02 1.800000e+00 1.632846e-02 2.000000e-01 1.693340e-03 3.000000e-01 2.550036e-03 4.000000e-01 3.413291e-03 5.000000e-01 4.282940e-03 6.000000e-01 5.158782e-03 7.000000e-01 6.040598e-03 8.000000e-01 6.928152e-03 9.000000e-01 7.821197e-03 1.000000e+00 8.719472e-03 1.100000e+00 9.622706e-03 1.200000e+00 1.053061e-02 1.300000e+00 1.144289e-02 1.400000e+00 1.235923e-02 1.500000e+00 1.327932e-02 1.600000e+00 1.420282e-02 1.700000e+00 1.512939e-02 1.800000e+00 1.605868e-02 2.000000e-01 1.652946e-03 3.000000e-01 2.489012e-03 4.000000e-01 3.331367e-03 5.000000e-01 4.179863e-03 6.000000e-01 5.034321e-03 7.000000e-01 5.894542e-03 8.000000e-01 6.760317e-03 9.000000e-01 7.631422e-03 1.000000e+00 8.507624e-03 1.100000e+00 9.388676e-03 1.200000e+00 1.027432e-02 1.300000e+00 1.116429e-02 1.400000e+00 1.205831e-02 1.500000e+00 1.295609e-02 1.600000e+00 1.385733e-02 1.700000e+00 1.476171e-02 1.800000e+00 1.566893e-02 2.000000e-01 1.614380e-03 3.000000e-01 2.430755e-03 4.000000e-01 3.253163e-03 5.000000e-01 4.081473e-03 6.000000e-01 4.915523e-03 7.000000e-01 5.755134e-03 8.000000e-01 6.600117e-03 9.000000e-01 7.450271e-03 1.000000e+00 8.305384e-03 1.100000e+00 9.165237e-03 1.200000e+00 1.002960e-02 1.300000e+00 1.089822e-02 1.400000e+00 1.177086e-02 1.500000e+00 1.264725e-02 1.600000e+00 1.352712e-02 1.700000e+00 1.441019e-02 1.800000e+00 1.529618e-02 2.000000e-01 1.789562e-03 3.000000e-01 2.695237e-03 4.000000e-01 3.607989e-03 5.000000e-01 4.527593e-03 6.000000e-01 5.453783e-03 7.000000e-01 6.386269e-03 8.000000e-01 7.324740e-03 9.000000e-01 8.268872e-03 1.000000e+00 9.218322e-03 1.100000e+00 1.017273e-02 1.200000e+00 1.113173e-02 1.300000e+00 1.209492e-02 1.400000e+00 1.306191e-02 1.500000e+00 1.403227e-02 1.600000e+00 1.500559e-02 1.700000e+00 1.598141e-02 1.800000e+00 1.695930e-02 2.000000e-01 1.759777e-03 3.000000e-01 2.650241e-03 4.000000e-01 3.547588e-03 5.000000e-01 4.451610e-03 6.000000e-01 5.362062e-03 7.000000e-01 6.278673e-03 8.000000e-01 7.201157e-03 9.000000e-01 8.129213e-03 1.000000e+00 9.062521e-03 1.100000e+00 1.000075e-02 1.200000e+00 1.094356e-02 1.300000e+00 1.189057e-02 1.400000e+00 1.284143e-02 1.500000e+00 1.379574e-02 1.600000e+00 1.475310e-02 1.700000e+00 1.571310e-02 1.800000e+00 1.667533e-02 2.000000e-01 1.730925e-03 3.000000e-01 2.606657e-03 4.000000e-01 3.489083e-03 5.000000e-01 4.378014e-03 6.000000e-01 5.273220e-03 7.000000e-01 6.174451e-03 8.000000e-01 7.081442e-03 9.000000e-01 7.993911e-03 1.000000e+00 8.911565e-03 1.100000e+00 9.834093e-03 1.200000e+00 1.076117e-02 1.300000e+00 1.169247e-02 1.400000e+00 1.262764e-02 1.500000e+00 1.356632e-02 1.600000e+00 1.450813e-02 1.700000e+00 1.545270e-02 1.800000e+00 1.639962e-02 2.000000e-01 1.702964e-03 3.000000e-01 2.564421e-03 4.000000e-01 3.432391e-03 5.000000e-01 4.306698e-03 6.000000e-01 5.187131e-03 7.000000e-01 6.073456e-03 8.000000e-01 6.965426e-03 9.000000e-01 7.862781e-03 1.000000e+00 8.765246e-03 1.100000e+00 9.672534e-03 1.200000e+00 1.058435e-02 1.300000e+00 1.150037e-02 1.400000e+00 1.242028e-02 1.500000e+00 1.334373e-02 1.600000e+00 1.427040e-02 1.700000e+00 1.519990e-02 1.800000e+00 1.613189e-02 2.000000e-01 1.675855e-03 3.000000e-01 2.523474e-03 4.000000e-01 3.377431e-03 5.000000e-01 4.237564e-03 6.000000e-01 5.103674e-03 7.000000e-01 5.975546e-03 8.000000e-01 6.852950e-03 9.000000e-01 7.735642e-03 1.000000e+00 8.623368e-03 1.100000e+00 9.515861e-03 1.200000e+00 1.041284e-02 1.300000e+00 1.131401e-02 1.400000e+00 1.221908e-02 1.500000e+00 1.312773e-02 1.600000e+00 1.403963e-02 1.700000e+00 1.495445e-02 1.800000e+00 1.587186e-02 2.000000e-01 1.636707e-03 3.000000e-01 2.464348e-03 4.000000e-01 3.298076e-03 5.000000e-01 4.137745e-03 6.000000e-01 4.983178e-03 7.000000e-01 5.834181e-03 8.000000e-01 6.690545e-03 9.000000e-01 7.552054e-03 1.000000e+00 8.418477e-03 1.100000e+00 9.289572e-03 1.200000e+00 1.016509e-02 1.300000e+00 1.104477e-02 1.400000e+00 1.192833e-02 1.500000e+00 1.281549e-02 1.600000e+00 1.370597e-02 1.700000e+00 1.459945e-02 1.800000e+00 1.549563e-02 2.000000e-01 1.599277e-03 3.000000e-01 2.407821e-03 4.000000e-01 3.222214e-03 5.000000e-01 4.042324e-03 6.000000e-01 4.867992e-03 7.000000e-01 5.699044e-03 8.000000e-01 6.535291e-03 9.000000e-01 7.376536e-03 1.000000e+00 8.222573e-03 1.100000e+00 9.073183e-03 1.200000e+00 9.928140e-03 1.300000e+00 1.078721e-02 1.400000e+00 1.165013e-02 1.500000e+00 1.251667e-02 1.600000e+00 1.338654e-02 1.700000e+00 1.425948e-02 1.800000e+00 1.513521e-02 2.000000e-01 1.746270e-03 3.000000e-01 2.629482e-03 4.000000e-01 3.519227e-03 5.000000e-01 4.415287e-03 6.000000e-01 5.317403e-03 7.000000e-01 6.225292e-03 8.000000e-01 7.138655e-03 9.000000e-01 8.057178e-03 1.000000e+00 8.980531e-03 1.100000e+00 9.908370e-03 1.200000e+00 1.084033e-02 1.300000e+00 1.177605e-02 1.400000e+00 1.271514e-02 1.500000e+00 1.365720e-02 1.600000e+00 1.460182e-02 1.700000e+00 1.554858e-02 1.800000e+00 1.649705e-02 2.000000e-01 1.718557e-03 3.000000e-01 2.587641e-03 4.000000e-01 3.463097e-03 5.000000e-01 4.344721e-03 6.000000e-01 5.232274e-03 7.000000e-01 6.125494e-03 8.000000e-01 7.024101e-03 9.000000e-01 7.927805e-03 1.000000e+00 8.836299e-03 1.100000e+00 9.749261e-03 1.200000e+00 1.066636e-02 1.300000e+00 1.158724e-02 1.400000e+00 1.251156e-02 1.500000e+00 1.343893e-02 1.600000e+00 1.436898e-02 1.700000e+00 1.530131e-02 1.800000e+00 1.623553e-02 2.000000e-01 1.691650e-03 3.000000e-01 2.547019e-03 4.000000e-01 3.408602e-03 5.000000e-01 4.276210e-03 6.000000e-01 5.149621e-03 7.000000e-01 6.028591e-03 8.000000e-01 6.912861e-03 9.000000e-01 7.802160e-03 1.000000e+00 8.696201e-03 1.100000e+00 9.594686e-03 1.200000e+00 1.049730e-02 1.300000e+00 1.140373e-02 1.400000e+00 1.231364e-02 1.500000e+00 1.322667e-02 1.600000e+00 1.414247e-02 1.700000e+00 1.506068e-02 1.800000e+00 1.598092e-02 2.000000e-01 1.665517e-03 3.000000e-01 2.507568e-03 4.000000e-01 3.355678e-03 5.000000e-01 4.209673e-03 6.000000e-01 5.069347e-03 7.000000e-01 5.934472e-03 8.000000e-01 6.804807e-03 9.000000e-01 7.680100e-03 1.000000e+00 8.560083e-03 1.100000e+00 9.444479e-03 1.200000e+00 1.033300e-02 1.300000e+00 1.122534e-02 1.400000e+00 1.212118e-02 1.500000e+00 1.302022e-02 1.600000e+00 1.392210e-02 1.700000e+00 1.482649e-02 1.800000e+00 1.573305e-02 2.000000e-01 1.640128e-03 3.000000e-01 2.469240e-03 4.000000e-01 3.304262e-03 5.000000e-01 4.145032e-03 6.000000e-01 4.991358e-03 7.000000e-01 5.843028e-03 8.000000e-01 6.699817e-03 9.000000e-01 7.561490e-03 1.000000e+00 8.427797e-03 1.100000e+00 9.298479e-03 1.200000e+00 1.017327e-02 1.300000e+00 1.105188e-02 1.400000e+00 1.193402e-02 1.500000e+00 1.281938e-02 1.600000e+00 1.370767e-02 1.700000e+00 1.459855e-02 1.800000e+00 1.549169e-02 2.000000e-01 1.603375e-03 3.000000e-01 2.413760e-03 4.000000e-01 3.229838e-03 5.000000e-01 4.051465e-03 6.000000e-01 4.878468e-03 7.000000e-01 5.710655e-03 8.000000e-01 6.547824e-03 9.000000e-01 7.389761e-03 1.000000e+00 8.236243e-03 1.100000e+00 9.087035e-03 1.200000e+00 9.941893e-03 1.300000e+00 1.080056e-02 1.400000e+00 1.166277e-02 1.500000e+00 1.252826e-02 1.600000e+00 1.339674e-02 1.700000e+00 1.426791e-02 1.800000e+00 1.514148e-02 2.000000e-01 1.568136e-03 3.000000e-01 2.360568e-03 4.000000e-01 3.158487e-03 5.000000e-01 3.961762e-03 6.000000e-01 4.770238e-03 7.000000e-01 5.583742e-03 8.000000e-01 6.402090e-03 9.000000e-01 7.225089e-03 1.000000e+00 8.052536e-03 1.100000e+00 8.884220e-03 1.200000e+00 9.719918e-03 1.300000e+00 1.055940e-02 1.400000e+00 1.140243e-02 1.500000e+00 1.224875e-02 1.600000e+00 1.309811e-02 1.700000e+00 1.395024e-02 1.800000e+00 1.480488e-02 ngspice-26/tests/hisim/nmos/reference/49_acFreq_COIIGS=1.standard0000644000265600020320000002533012264261473024073 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/22_dcSweep_CORBNET=1.standard0000644000265600020320000003372712264261473024403 0ustar andreasadminV(d) I(d) I(b) 2.000000e-01 1.031340e-06 -2.000000e-16 3.000000e-01 1.187668e-06 -3.000000e-16 4.000000e-01 1.363411e-06 -4.000000e-16 5.000000e-01 1.553811e-06 -5.000000e-16 6.000000e-01 1.754026e-06 -6.000000e-16 7.000000e-01 1.961205e-06 -7.000000e-16 8.000000e-01 2.173905e-06 -8.000000e-16 9.000000e-01 2.391410e-06 -9.000000e-16 1.000000e+00 2.613350e-06 -1.000000e-15 1.100000e+00 2.839516e-06 -1.100000e-15 1.200000e+00 3.069773e-06 -1.200000e-15 1.300000e+00 3.304026e-06 -1.300000e-15 1.400000e+00 3.542204e-06 -1.400000e-15 1.500000e+00 3.784246e-06 -1.500000e-15 1.600000e+00 4.030100e-06 -1.600000e-15 1.700000e+00 4.279721e-06 -1.700000e-15 1.800000e+00 4.533070e-06 -1.800000e-15 2.000000e-01 3.625488e-04 -2.000000e-16 3.000000e-01 3.836434e-04 -3.000000e-16 4.000000e-01 4.033947e-04 -4.000000e-16 5.000000e-01 4.229012e-04 -5.000000e-16 6.000000e-01 4.423753e-04 -6.000000e-16 7.000000e-01 4.618402e-04 -7.000000e-16 8.000000e-01 4.813047e-04 -8.000000e-16 9.000000e-01 5.007840e-04 -9.000000e-16 1.000000e+00 5.202960e-04 -1.000000e-15 1.100000e+00 5.398574e-04 -1.100000e-15 1.200000e+00 5.594823e-04 -1.200000e-15 1.300000e+00 5.791821e-04 -1.300000e-15 1.400000e+00 5.989658e-04 -1.400000e-15 1.500000e+00 6.188407e-04 -1.500000e-15 1.600000e+00 6.388122e-04 -1.600000e-15 1.700000e+00 6.588847e-04 -1.700000e-15 1.800000e+00 6.790616e-04 -1.800000e-15 2.000000e-01 1.846855e-03 -2.000000e-16 3.000000e-01 1.974260e-03 -3.000000e-16 4.000000e-01 2.031600e-03 -4.000000e-16 5.000000e-01 2.082672e-03 -5.000000e-16 6.000000e-01 2.130364e-03 -6.000000e-16 7.000000e-01 2.175738e-03 -7.000000e-16 8.000000e-01 2.219464e-03 -8.000000e-16 9.000000e-01 2.261982e-03 -9.000000e-16 1.000000e+00 2.303587e-03 -1.000000e-15 1.100000e+00 2.344487e-03 -1.100000e-15 1.200000e+00 2.384830e-03 -1.200000e-15 1.300000e+00 2.424728e-03 -1.300000e-15 1.400000e+00 2.464261e-03 -1.400000e-15 1.500000e+00 2.503492e-03 -1.500000e-15 1.600000e+00 2.542472e-03 -1.600000e-15 1.700000e+00 2.581239e-03 -1.700000e-15 1.800000e+00 2.619826e-03 -1.800000e-15 2.000000e-01 3.343576e-03 -2.000000e-16 3.000000e-01 3.817799e-03 -3.000000e-16 4.000000e-01 4.017737e-03 -4.000000e-16 5.000000e-01 4.104539e-03 -5.000000e-16 6.000000e-01 4.168574e-03 -6.000000e-16 7.000000e-01 4.228356e-03 -7.000000e-16 8.000000e-01 4.284866e-03 -8.000000e-16 9.000000e-01 4.338706e-03 -9.000000e-16 1.000000e+00 4.390424e-03 -1.000000e-15 1.100000e+00 4.440474e-03 -1.100000e-15 1.200000e+00 4.489207e-03 -1.200000e-15 1.300000e+00 4.536889e-03 -1.300000e-15 1.400000e+00 4.583720e-03 -1.400000e-15 1.500000e+00 4.629852e-03 -1.500000e-15 1.600000e+00 4.675400e-03 -1.600000e-15 1.700000e+00 4.720456e-03 -1.700000e-15 1.800000e+00 4.765089e-03 -1.800000e-15 2.000000e-01 4.575745e-03 -2.000000e-16 3.000000e-01 5.436588e-03 -3.000000e-16 4.000000e-01 5.883336e-03 -4.000000e-16 5.000000e-01 6.122649e-03 -5.000000e-16 6.000000e-01 6.251933e-03 -6.000000e-16 7.000000e-01 6.328676e-03 -7.000000e-16 8.000000e-01 6.392836e-03 -8.000000e-16 9.000000e-01 6.453950e-03 -9.000000e-16 1.000000e+00 6.512526e-03 -1.000000e-15 1.100000e+00 6.568841e-03 -1.100000e-15 1.200000e+00 6.623216e-03 -1.200000e-15 1.300000e+00 6.675967e-03 -1.300000e-15 1.400000e+00 6.727368e-03 -1.400000e-15 1.500000e+00 6.777651e-03 -1.500000e-15 1.600000e+00 6.827000e-03 -1.600000e-15 1.700000e+00 6.875564e-03 -1.700000e-15 1.800000e+00 6.923462e-03 -1.800000e-15 2.000000e-01 5.870243e-03 -2.000000e-16 3.000000e-01 7.364527e-03 -3.000000e-16 4.000000e-01 8.250873e-03 -4.000000e-16 5.000000e-01 8.791206e-03 -5.000000e-16 6.000000e-01 9.132925e-03 -6.000000e-16 7.000000e-01 9.355002e-03 -7.000000e-16 8.000000e-01 9.502595e-03 -8.000000e-16 9.000000e-01 9.604011e-03 -9.000000e-16 1.000000e+00 9.676653e-03 -1.000000e-15 1.100000e+00 9.739827e-03 -1.100000e-15 1.200000e+00 9.800793e-03 -1.200000e-15 1.300000e+00 9.859958e-03 -1.300000e-15 1.400000e+00 9.917427e-03 -1.400000e-15 1.500000e+00 9.973346e-03 -1.500000e-15 1.600000e+00 1.002789e-02 -1.600000e-15 1.700000e+00 1.008122e-02 -1.700000e-15 1.800000e+00 1.013349e-02 -1.800000e-15 2.000000e-01 6.544617e-03 -2.000000e-16 3.000000e-01 8.629425e-03 -3.000000e-16 4.000000e-01 1.002415e-02 -4.000000e-16 5.000000e-01 1.095009e-02 -5.000000e-16 6.000000e-01 1.157533e-02 -6.000000e-16 7.000000e-01 1.200797e-02 -7.000000e-16 8.000000e-01 1.231437e-02 -8.000000e-16 9.000000e-01 1.253558e-02 -9.000000e-16 1.000000e+00 1.269838e-02 -1.000000e-15 1.100000e+00 1.282132e-02 -1.100000e-15 1.200000e+00 1.291696e-02 -1.200000e-15 1.300000e+00 1.299134e-02 -1.300000e-15 1.400000e+00 1.305478e-02 -1.400000e-15 1.500000e+00 1.311590e-02 -1.500000e-15 1.600000e+00 1.317555e-02 -1.600000e-15 1.700000e+00 1.323383e-02 -1.700000e-15 1.800000e+00 1.329082e-02 -1.800000e-15 2.000000e-01 6.168441e-06 -2.000000e-16 3.000000e-01 6.992527e-06 -3.000000e-16 4.000000e-01 7.898833e-06 -4.000000e-16 5.000000e-01 8.873147e-06 -5.000000e-16 6.000000e-01 9.893832e-06 -6.000000e-16 7.000000e-01 1.094768e-05 -7.000000e-16 8.000000e-01 1.202799e-05 -8.000000e-16 9.000000e-01 1.313151e-05 -9.000000e-16 1.000000e+00 1.425659e-05 -1.000000e-15 1.100000e+00 1.540231e-05 -1.100000e-15 1.200000e+00 1.656813e-05 -1.200000e-15 1.300000e+00 1.775364e-05 -1.300000e-15 1.400000e+00 1.895856e-05 -1.400000e-15 1.500000e+00 2.018263e-05 -1.500000e-15 1.600000e+00 2.142567e-05 -1.600000e-15 1.700000e+00 2.268746e-05 -1.700000e-15 1.800000e+00 2.396787e-05 -1.800000e-15 2.000000e-01 3.314500e-04 -2.000000e-16 3.000000e-01 3.516443e-04 -3.000000e-16 4.000000e-01 3.692608e-04 -4.000000e-16 5.000000e-01 3.862621e-04 -5.000000e-16 6.000000e-01 4.030308e-04 -6.000000e-16 7.000000e-01 4.196770e-04 -7.000000e-16 8.000000e-01 4.362533e-04 -8.000000e-16 9.000000e-01 4.527971e-04 -9.000000e-16 1.000000e+00 4.693380e-04 -1.000000e-15 1.100000e+00 4.858992e-04 -1.100000e-15 1.200000e+00 5.024990e-04 -1.200000e-15 1.300000e+00 5.191518e-04 -1.300000e-15 1.400000e+00 5.358687e-04 -1.400000e-15 1.500000e+00 5.526585e-04 -1.500000e-15 1.600000e+00 5.695281e-04 -1.600000e-15 1.700000e+00 5.864832e-04 -1.700000e-15 1.800000e+00 6.035282e-04 -1.800000e-15 2.000000e-01 1.414259e-03 -2.000000e-16 3.000000e-01 1.567979e-03 -3.000000e-16 4.000000e-01 1.628986e-03 -4.000000e-16 5.000000e-01 1.678046e-03 -5.000000e-16 6.000000e-01 1.722925e-03 -6.000000e-16 7.000000e-01 1.764987e-03 -7.000000e-16 8.000000e-01 1.805080e-03 -8.000000e-16 9.000000e-01 1.843763e-03 -9.000000e-16 1.000000e+00 1.881413e-03 -1.000000e-15 1.100000e+00 1.918285e-03 -1.100000e-15 1.200000e+00 1.954559e-03 -1.200000e-15 1.300000e+00 1.990363e-03 -1.300000e-15 1.400000e+00 2.025794e-03 -1.400000e-15 1.500000e+00 2.060923e-03 -1.500000e-15 1.600000e+00 2.095806e-03 -1.600000e-15 1.700000e+00 2.130488e-03 -1.700000e-15 1.800000e+00 2.165002e-03 -1.800000e-15 2.000000e-01 2.542714e-03 -2.000000e-16 3.000000e-01 3.063220e-03 -3.000000e-16 4.000000e-01 3.310856e-03 -4.000000e-16 5.000000e-01 3.420396e-03 -5.000000e-16 6.000000e-01 3.491904e-03 -6.000000e-16 7.000000e-01 3.556333e-03 -7.000000e-16 8.000000e-01 3.616445e-03 -8.000000e-16 9.000000e-01 3.673005e-03 -9.000000e-16 1.000000e+00 3.726718e-03 -1.000000e-15 1.100000e+00 3.778185e-03 -1.100000e-15 1.200000e+00 3.827884e-03 -1.200000e-15 1.300000e+00 3.876176e-03 -1.300000e-15 1.400000e+00 3.923336e-03 -1.400000e-15 1.500000e+00 3.969571e-03 -1.500000e-15 1.600000e+00 4.015041e-03 -1.600000e-15 1.700000e+00 4.059867e-03 -1.700000e-15 1.800000e+00 4.104148e-03 -1.800000e-15 2.000000e-01 3.486631e-03 -2.000000e-16 3.000000e-01 4.388014e-03 -3.000000e-16 4.000000e-01 4.924867e-03 -4.000000e-16 5.000000e-01 5.232529e-03 -5.000000e-16 6.000000e-01 5.399700e-03 -6.000000e-16 7.000000e-01 5.495663e-03 -7.000000e-16 8.000000e-01 5.570693e-03 -8.000000e-16 9.000000e-01 5.640525e-03 -9.000000e-16 1.000000e+00 5.706719e-03 -1.000000e-15 1.100000e+00 5.769675e-03 -1.100000e-15 1.200000e+00 5.829825e-03 -1.200000e-15 1.300000e+00 5.887607e-03 -1.300000e-15 1.400000e+00 5.943411e-03 -1.400000e-15 1.500000e+00 5.997567e-03 -1.500000e-15 1.600000e+00 6.050344e-03 -1.600000e-15 1.700000e+00 6.101961e-03 -1.700000e-15 1.800000e+00 6.152594e-03 -1.800000e-15 2.000000e-01 4.523458e-03 -2.000000e-16 3.000000e-01 5.961592e-03 -3.000000e-16 4.000000e-01 6.939779e-03 -4.000000e-16 5.000000e-01 7.596286e-03 -5.000000e-16 6.000000e-01 8.035751e-03 -6.000000e-16 7.000000e-01 8.327590e-03 -7.000000e-16 8.000000e-01 8.519006e-03 -8.000000e-16 9.000000e-01 8.645414e-03 -9.000000e-16 1.000000e+00 8.735120e-03 -1.000000e-15 1.100000e+00 8.810856e-03 -1.100000e-15 1.200000e+00 8.882452e-03 -1.200000e-15 1.300000e+00 8.951286e-03 -1.300000e-15 1.400000e+00 9.017592e-03 -1.400000e-15 1.500000e+00 9.081583e-03 -1.500000e-15 1.600000e+00 9.143495e-03 -1.600000e-15 1.700000e+00 9.203569e-03 -1.700000e-15 1.800000e+00 9.262028e-03 -1.800000e-15 2.000000e-01 5.146662e-03 -2.000000e-16 3.000000e-01 7.031863e-03 -3.000000e-16 4.000000e-01 8.439639e-03 -4.000000e-16 5.000000e-01 9.465363e-03 -5.000000e-16 6.000000e-01 1.020835e-02 -6.000000e-16 7.000000e-01 1.074777e-02 -7.000000e-16 8.000000e-01 1.114061e-02 -8.000000e-16 9.000000e-01 1.142684e-02 -9.000000e-16 1.000000e+00 1.163539e-02 -1.000000e-15 1.100000e+00 1.178842e-02 -1.100000e-15 1.200000e+00 1.190317e-02 -1.200000e-15 1.300000e+00 1.199275e-02 -1.300000e-15 1.400000e+00 1.206906e-02 -1.400000e-15 1.500000e+00 1.214087e-02 -1.500000e-15 1.600000e+00 1.221034e-02 -1.600000e-15 1.700000e+00 1.227777e-02 -1.700000e-15 1.800000e+00 1.234331e-02 -1.800000e-15 2.000000e-01 2.757247e-05 -2.000000e-16 3.000000e-01 3.088943e-05 -3.000000e-16 4.000000e-01 3.432614e-05 -4.000000e-16 5.000000e-01 3.796733e-05 -5.000000e-16 6.000000e-01 4.175784e-05 -6.000000e-16 7.000000e-01 4.565691e-05 -7.000000e-16 8.000000e-01 4.964358e-05 -8.000000e-16 9.000000e-01 5.370790e-05 -9.000000e-16 1.000000e+00 5.784506e-05 -1.000000e-15 1.100000e+00 6.205260e-05 -1.100000e-15 1.200000e+00 6.632908e-05 -1.200000e-15 1.300000e+00 7.067356e-05 -1.300000e-15 1.400000e+00 7.508532e-05 -1.400000e-15 1.500000e+00 7.956378e-05 -1.500000e-15 1.600000e+00 8.410843e-05 -1.600000e-15 1.700000e+00 8.871881e-05 -1.700000e-15 1.800000e+00 9.339451e-05 -1.800000e-15 2.000000e-01 3.233979e-04 -2.000000e-16 3.000000e-01 3.491751e-04 -3.000000e-16 4.000000e-01 3.669805e-04 -4.000000e-16 5.000000e-01 3.832630e-04 -5.000000e-16 6.000000e-01 3.989944e-04 -6.000000e-16 7.000000e-01 4.144367e-04 -7.000000e-16 8.000000e-01 4.297076e-04 -8.000000e-16 9.000000e-01 4.448775e-04 -9.000000e-16 1.000000e+00 4.599945e-04 -1.000000e-15 1.100000e+00 4.750927e-04 -1.100000e-15 1.200000e+00 4.901974e-04 -1.200000e-15 1.300000e+00 5.053275e-04 -1.300000e-15 1.400000e+00 5.204977e-04 -1.400000e-15 1.500000e+00 5.357192e-04 -1.500000e-15 1.600000e+00 5.510012e-04 -1.600000e-15 1.700000e+00 5.663506e-04 -1.700000e-15 1.800000e+00 5.817735e-04 -1.800000e-15 2.000000e-01 1.006788e-03 -2.000000e-16 3.000000e-01 1.176557e-03 -3.000000e-16 4.000000e-01 1.246390e-03 -4.000000e-16 5.000000e-01 1.291247e-03 -5.000000e-16 6.000000e-01 1.330236e-03 -6.000000e-16 7.000000e-01 1.366185e-03 -7.000000e-16 8.000000e-01 1.400047e-03 -8.000000e-16 9.000000e-01 1.432420e-03 -9.000000e-16 1.000000e+00 1.463716e-03 -1.000000e-15 1.100000e+00 1.494215e-03 -1.100000e-15 1.200000e+00 1.524116e-03 -1.200000e-15 1.300000e+00 1.553558e-03 -1.300000e-15 1.400000e+00 1.582644e-03 -1.400000e-15 1.500000e+00 1.611452e-03 -1.500000e-15 1.600000e+00 1.640038e-03 -1.600000e-15 1.700000e+00 1.668448e-03 -1.700000e-15 1.800000e+00 1.696719e-03 -1.800000e-15 2.000000e-01 1.720602e-03 -2.000000e-16 3.000000e-01 2.182212e-03 -3.000000e-16 4.000000e-01 2.443001e-03 -4.000000e-16 5.000000e-01 2.573625e-03 -5.000000e-16 6.000000e-01 2.648907e-03 -6.000000e-16 7.000000e-01 2.710122e-03 -7.000000e-16 8.000000e-01 2.766323e-03 -8.000000e-16 9.000000e-01 2.818908e-03 -9.000000e-16 1.000000e+00 2.868539e-03 -1.000000e-15 1.100000e+00 2.915786e-03 -1.100000e-15 1.200000e+00 2.961129e-03 -1.200000e-15 1.300000e+00 3.004954e-03 -1.300000e-15 1.400000e+00 3.047557e-03 -1.400000e-15 1.500000e+00 3.089169e-03 -1.500000e-15 1.600000e+00 3.129968e-03 -1.600000e-15 1.700000e+00 3.170092e-03 -1.700000e-15 1.800000e+00 3.209650e-03 -1.800000e-15 2.000000e-01 2.344551e-03 -2.000000e-16 3.000000e-01 3.101925e-03 -3.000000e-16 4.000000e-01 3.621184e-03 -4.000000e-16 5.000000e-01 3.954178e-03 -5.000000e-16 6.000000e-01 4.151658e-03 -6.000000e-16 7.000000e-01 4.267092e-03 -7.000000e-16 8.000000e-01 4.348380e-03 -8.000000e-16 9.000000e-01 4.419815e-03 -9.000000e-16 1.000000e+00 4.486875e-03 -1.000000e-15 1.100000e+00 4.550435e-03 -1.100000e-15 1.200000e+00 4.610906e-03 -1.200000e-15 1.300000e+00 4.668696e-03 -1.300000e-15 1.400000e+00 4.724200e-03 -1.400000e-15 1.500000e+00 4.777773e-03 -1.500000e-15 1.600000e+00 4.829716e-03 -1.600000e-15 1.700000e+00 4.880282e-03 -1.700000e-15 1.800000e+00 4.929678e-03 -1.800000e-15 2.000000e-01 3.084402e-03 -2.000000e-16 3.000000e-01 4.235437e-03 -3.000000e-16 4.000000e-01 5.122679e-03 -4.000000e-16 5.000000e-01 5.785658e-03 -5.000000e-16 6.000000e-01 6.267956e-03 -6.000000e-16 7.000000e-01 6.608144e-03 -7.000000e-16 8.000000e-01 6.840111e-03 -8.000000e-16 9.000000e-01 6.995611e-03 -9.000000e-16 1.000000e+00 7.104437e-03 -1.000000e-15 1.100000e+00 7.191523e-03 -1.100000e-15 1.200000e+00 7.270752e-03 -1.200000e-15 1.300000e+00 7.346161e-03 -1.300000e-15 1.400000e+00 7.418531e-03 -1.400000e-15 1.500000e+00 7.488125e-03 -1.500000e-15 1.600000e+00 7.555176e-03 -1.600000e-15 1.700000e+00 7.619929e-03 -1.700000e-15 1.800000e+00 7.682628e-03 -1.800000e-15 2.000000e-01 3.603565e-03 -2.000000e-16 3.000000e-01 5.071371e-03 -3.000000e-16 4.000000e-01 6.281326e-03 -4.000000e-16 5.000000e-01 7.251718e-03 -5.000000e-16 6.000000e-01 8.015715e-03 -6.000000e-16 7.000000e-01 8.608979e-03 -7.000000e-16 8.000000e-01 9.063670e-03 -8.000000e-16 9.000000e-01 9.407070e-03 -9.000000e-16 1.000000e+00 9.662614e-03 -1.000000e-15 1.100000e+00 9.851179e-03 -1.100000e-15 1.200000e+00 9.991500e-03 -1.200000e-15 1.300000e+00 1.010011e-02 -1.300000e-15 1.400000e+00 1.019103e-02 -1.400000e-15 1.500000e+00 1.027396e-02 -1.500000e-15 1.600000e+00 1.035306e-02 -1.600000e-15 1.700000e+00 1.042945e-02 -1.700000e-15 1.800000e+00 1.050344e-02 -1.800000e-15 ngspice-26/tests/hisim/nmos/reference/46_acFreq_COISUB=0.standard0000644000265600020320000002533012264261473024076 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/13_dcSweep_COISTI=0.standard0000644000265600020320000002211412264261473024264 0ustar andreasadminV(d) I(d) 2.000000e-01 9.763426e-06 3.000000e-01 1.098950e-05 4.000000e-01 1.231711e-05 5.000000e-01 1.373634e-05 6.000000e-01 1.522100e-05 7.000000e-01 1.675391e-05 8.000000e-01 1.832619e-05 9.000000e-01 1.993350e-05 1.000000e+00 2.157366e-05 1.100000e+00 2.324548e-05 1.200000e+00 2.494824e-05 1.300000e+00 2.668147e-05 1.400000e+00 2.844479e-05 1.500000e+00 3.023790e-05 1.600000e+00 3.206053e-05 1.700000e+00 3.391245e-05 1.800000e+00 3.579344e-05 2.000000e-01 7.473464e-04 3.000000e-01 7.858657e-04 4.000000e-01 8.198046e-04 5.000000e-01 8.521719e-04 6.000000e-01 8.837789e-04 7.000000e-01 9.148995e-04 8.000000e-01 9.456691e-04 9.000000e-01 9.761819e-04 1.000000e+00 1.006511e-03 1.100000e+00 1.036712e-03 1.200000e+00 1.066831e-03 1.300000e+00 1.096900e-03 1.400000e+00 1.126948e-03 1.500000e+00 1.156994e-03 1.600000e+00 1.187056e-03 1.700000e+00 1.217146e-03 1.800000e+00 1.247276e-03 2.000000e-01 2.335360e-03 3.000000e-01 2.564311e-03 4.000000e-01 2.644401e-03 5.000000e-01 2.705025e-03 6.000000e-01 2.761030e-03 7.000000e-01 2.813736e-03 8.000000e-01 2.864021e-03 9.000000e-01 2.912503e-03 1.000000e+00 2.959618e-03 1.100000e+00 3.005675e-03 1.200000e+00 3.050899e-03 1.300000e+00 3.095452e-03 1.400000e+00 3.139457e-03 1.500000e+00 3.183005e-03 1.600000e+00 3.226169e-03 1.700000e+00 3.269004e-03 1.800000e+00 3.311557e-03 2.000000e-01 3.759968e-03 3.000000e-01 4.351810e-03 4.000000e-01 4.629215e-03 5.000000e-01 4.758552e-03 6.000000e-01 4.832181e-03 7.000000e-01 4.896696e-03 8.000000e-01 4.957720e-03 9.000000e-01 5.015788e-03 1.000000e+00 5.071383e-03 1.100000e+00 5.124963e-03 1.200000e+00 5.176923e-03 1.300000e+00 5.227577e-03 1.400000e+00 5.277169e-03 1.500000e+00 5.325889e-03 1.600000e+00 5.373882e-03 1.700000e+00 5.421263e-03 1.800000e+00 5.468122e-03 2.000000e-01 4.912544e-03 3.000000e-01 5.900868e-03 4.000000e-01 6.431054e-03 5.000000e-01 6.728834e-03 6.000000e-01 6.900371e-03 7.000000e-01 7.002483e-03 8.000000e-01 7.072838e-03 9.000000e-01 7.136871e-03 1.000000e+00 7.198375e-03 1.100000e+00 7.257581e-03 1.200000e+00 7.314708e-03 1.300000e+00 7.370027e-03 1.400000e+00 7.423809e-03 1.500000e+00 7.476299e-03 1.600000e+00 7.527699e-03 1.700000e+00 7.578181e-03 1.800000e+00 7.627881e-03 2.000000e-01 6.088581e-03 3.000000e-01 7.714236e-03 4.000000e-01 8.701154e-03 5.000000e-01 9.313270e-03 6.000000e-01 9.707082e-03 7.000000e-01 9.968760e-03 8.000000e-01 1.014709e-02 9.000000e-01 1.027230e-02 1.000000e+00 1.036335e-02 1.100000e+00 1.043239e-02 1.200000e+00 1.049541e-02 1.300000e+00 1.055660e-02 1.400000e+00 1.061611e-02 1.500000e+00 1.067404e-02 1.600000e+00 1.073052e-02 1.700000e+00 1.078568e-02 1.800000e+00 1.083969e-02 2.000000e-01 6.667634e-03 3.000000e-01 8.863865e-03 4.000000e-01 1.036406e-02 5.000000e-01 1.137599e-02 6.000000e-01 1.206751e-02 7.000000e-01 1.255092e-02 8.000000e-01 1.289693e-02 9.000000e-01 1.314985e-02 1.000000e+00 1.333828e-02 1.100000e+00 1.348179e-02 1.200000e+00 1.359431e-02 1.300000e+00 1.368483e-02 1.400000e+00 1.375690e-02 1.500000e+00 1.382020e-02 1.600000e+00 1.388155e-02 1.700000e+00 1.394153e-02 1.800000e+00 1.400020e-02 2.000000e-01 2.995037e-05 3.000000e-01 3.321301e-05 4.000000e-01 3.662332e-05 5.000000e-01 4.021767e-05 6.000000e-01 4.394998e-05 7.000000e-01 4.778588e-05 8.000000e-01 5.170748e-05 9.000000e-01 5.570640e-05 1.000000e+00 5.977874e-05 1.100000e+00 6.392263e-05 1.200000e+00 6.813705e-05 1.300000e+00 7.242139e-05 1.400000e+00 7.677518e-05 1.500000e+00 8.119805e-05 1.600000e+00 8.568966e-05 1.700000e+00 9.024971e-05 1.800000e+00 9.487788e-05 2.000000e-01 6.260767e-04 3.000000e-01 6.663137e-04 4.000000e-01 6.970937e-04 5.000000e-01 7.256343e-04 6.000000e-01 7.530890e-04 7.000000e-01 7.798943e-04 8.000000e-01 8.062710e-04 9.000000e-01 8.323560e-04 1.000000e+00 8.582435e-04 1.100000e+00 8.840018e-04 1.200000e+00 9.096810e-04 1.300000e+00 9.353194e-04 1.400000e+00 9.609459e-04 1.500000e+00 9.865833e-04 1.600000e+00 1.012249e-03 1.700000e+00 1.037959e-03 1.800000e+00 1.063723e-03 2.000000e-01 1.789771e-03 3.000000e-01 2.057410e-03 4.000000e-01 2.157350e-03 5.000000e-01 2.220952e-03 6.000000e-01 2.277800e-03 7.000000e-01 2.330467e-03 8.000000e-01 2.380048e-03 9.000000e-01 2.427351e-03 1.000000e+00 2.472956e-03 1.100000e+00 2.517272e-03 1.200000e+00 2.560590e-03 1.300000e+00 2.603121e-03 1.400000e+00 2.645019e-03 1.500000e+00 2.686400e-03 1.600000e+00 2.727351e-03 1.700000e+00 2.767944e-03 1.800000e+00 2.808233e-03 2.000000e-01 2.860789e-03 3.000000e-01 3.509730e-03 4.000000e-01 3.856062e-03 5.000000e-01 4.025617e-03 6.000000e-01 4.116862e-03 7.000000e-01 4.190303e-03 8.000000e-01 4.258495e-03 9.000000e-01 4.322587e-03 1.000000e+00 4.383209e-03 1.100000e+00 4.440983e-03 1.200000e+00 4.496456e-03 1.300000e+00 4.550074e-03 1.400000e+00 4.602186e-03 1.500000e+00 4.653064e-03 1.600000e+00 4.702918e-03 1.700000e+00 4.751914e-03 1.800000e+00 4.800180e-03 2.000000e-01 3.740159e-03 3.000000e-01 4.764634e-03 4.000000e-01 5.400613e-03 5.000000e-01 5.787783e-03 6.000000e-01 6.016011e-03 7.000000e-01 6.148496e-03 8.000000e-01 6.236420e-03 9.000000e-01 6.312356e-03 1.000000e+00 6.384121e-03 1.100000e+00 6.452464e-03 1.200000e+00 6.517713e-03 1.300000e+00 6.580252e-03 1.400000e+00 6.640471e-03 1.500000e+00 6.698725e-03 1.600000e+00 6.755316e-03 1.700000e+00 6.810497e-03 1.800000e+00 6.864478e-03 2.000000e-01 4.688234e-03 3.000000e-01 6.234394e-03 4.000000e-01 7.311067e-03 5.000000e-01 8.049735e-03 6.000000e-01 8.556581e-03 7.000000e-01 8.904359e-03 8.000000e-01 9.141764e-03 9.000000e-01 9.303711e-03 1.000000e+00 9.417038e-03 1.100000e+00 9.503186e-03 1.200000e+00 9.579265e-03 1.300000e+00 9.651875e-03 1.400000e+00 9.721878e-03 1.500000e+00 9.789463e-03 1.600000e+00 9.854823e-03 1.700000e+00 9.918174e-03 1.800000e+00 9.979733e-03 2.000000e-01 5.242223e-03 3.000000e-01 7.211351e-03 4.000000e-01 8.708925e-03 5.000000e-01 9.818161e-03 6.000000e-01 1.063352e-02 7.000000e-01 1.123405e-02 8.000000e-01 1.167850e-02 9.000000e-01 1.200868e-02 1.000000e+00 1.225454e-02 1.100000e+00 1.243852e-02 1.200000e+00 1.257808e-02 1.300000e+00 1.268675e-02 1.400000e+00 1.277456e-02 1.500000e+00 1.285113e-02 1.600000e+00 1.292371e-02 1.700000e+00 1.299405e-02 1.800000e+00 1.306243e-02 2.000000e-01 7.644342e-05 3.000000e-01 8.432861e-05 4.000000e-01 9.189748e-05 5.000000e-01 9.970086e-05 6.000000e-01 1.077236e-04 7.000000e-01 1.159194e-04 8.000000e-01 1.242625e-04 9.000000e-01 1.327420e-04 1.000000e+00 1.413538e-04 1.100000e+00 1.500970e-04 1.200000e+00 1.589712e-04 1.300000e+00 1.679768e-04 1.400000e+00 1.771140e-04 1.500000e+00 1.863827e-04 1.600000e+00 1.957832e-04 1.700000e+00 2.053154e-04 1.800000e+00 2.149792e-04 2.000000e-01 5.313260e-04 3.000000e-01 5.858621e-04 4.000000e-01 6.167036e-04 5.000000e-01 6.430891e-04 6.000000e-01 6.678172e-04 7.000000e-01 6.916242e-04 8.000000e-01 7.148519e-04 9.000000e-01 7.376998e-04 1.000000e+00 7.602967e-04 1.100000e+00 7.827302e-04 1.200000e+00 8.050622e-04 1.300000e+00 8.273379e-04 1.400000e+00 8.495911e-04 1.500000e+00 8.718478e-04 1.600000e+00 8.941281e-04 1.700000e+00 9.164482e-04 1.800000e+00 9.388210e-04 2.000000e-01 1.249075e-03 3.000000e-01 1.516722e-03 4.000000e-01 1.638735e-03 5.000000e-01 1.703954e-03 6.000000e-01 1.756165e-03 7.000000e-01 1.803630e-03 8.000000e-01 1.847881e-03 9.000000e-01 1.889728e-03 1.000000e+00 1.929772e-03 1.100000e+00 1.968457e-03 1.200000e+00 2.006104e-03 1.300000e+00 2.042946e-03 1.400000e+00 2.079156e-03 1.500000e+00 2.114860e-03 1.600000e+00 2.150157e-03 1.700000e+00 2.185123e-03 1.800000e+00 2.219816e-03 2.000000e-01 1.929074e-03 3.000000e-01 2.495574e-03 4.000000e-01 2.849603e-03 5.000000e-01 3.048483e-03 6.000000e-01 3.157405e-03 7.000000e-01 3.233347e-03 8.000000e-01 3.300419e-03 9.000000e-01 3.363028e-03 1.000000e+00 3.422015e-03 1.100000e+00 3.477940e-03 1.200000e+00 3.531328e-03 1.300000e+00 3.582640e-03 1.400000e+00 3.632254e-03 1.500000e+00 3.680476e-03 1.600000e+00 3.727546e-03 1.700000e+00 3.773657e-03 1.800000e+00 3.818960e-03 2.000000e-01 2.513014e-03 3.000000e-01 3.364992e-03 4.000000e-01 3.974446e-03 5.000000e-01 4.389869e-03 6.000000e-01 4.657036e-03 7.000000e-01 4.820782e-03 8.000000e-01 4.926200e-03 9.000000e-01 5.009079e-03 1.000000e+00 5.084797e-03 1.100000e+00 5.156495e-03 1.200000e+00 5.224749e-03 1.300000e+00 5.289912e-03 1.400000e+00 5.352355e-03 1.500000e+00 5.412444e-03 1.600000e+00 5.470510e-03 1.700000e+00 5.526847e-03 1.800000e+00 5.581699e-03 2.000000e-01 3.198303e-03 3.000000e-01 4.424863e-03 4.000000e-01 5.390643e-03 5.000000e-01 6.129485e-03 6.000000e-01 6.682532e-03 7.000000e-01 7.087480e-03 8.000000e-01 7.376564e-03 9.000000e-01 7.578532e-03 1.000000e+00 7.720055e-03 1.100000e+00 7.825402e-03 1.200000e+00 7.913975e-03 1.300000e+00 7.996009e-03 1.400000e+00 8.074452e-03 1.500000e+00 8.149924e-03 1.600000e+00 8.222662e-03 1.700000e+00 8.292880e-03 1.800000e+00 8.360803e-03 2.000000e-01 3.673865e-03 3.000000e-01 5.197470e-03 4.000000e-01 6.471831e-03 5.000000e-01 7.509462e-03 6.000000e-01 8.339273e-03 7.000000e-01 8.994691e-03 8.000000e-01 9.507097e-03 9.000000e-01 9.903497e-03 1.000000e+00 1.020673e-02 1.100000e+00 1.043664e-02 1.200000e+00 1.061086e-02 1.300000e+00 1.074499e-02 1.400000e+00 1.085257e-02 1.500000e+00 1.094493e-02 1.600000e+00 1.103000e-02 1.700000e+00 1.111135e-02 1.800000e+00 1.119003e-02 ngspice-26/tests/hisim/nmos/reference/1_dcSweep_CORSRD=0.standard0000644000265600020320000002211412264261473024203 0ustar andreasadminV(d) I(d) 2.000000e-01 9.408604e-07 3.000000e-01 1.068973e-06 4.000000e-01 1.210646e-06 5.000000e-01 1.362996e-06 6.000000e-01 1.522555e-06 7.000000e-01 1.687251e-06 8.000000e-01 1.856050e-06 9.000000e-01 2.028447e-06 1.000000e+00 2.204191e-06 1.100000e+00 2.383140e-06 1.200000e+00 2.565207e-06 1.300000e+00 2.750330e-06 1.400000e+00 2.938461e-06 1.500000e+00 3.129560e-06 1.600000e+00 3.323593e-06 1.700000e+00 3.520530e-06 1.800000e+00 3.720342e-06 2.000000e-01 3.393750e-04 3.000000e-01 3.533368e-04 4.000000e-01 3.645137e-04 5.000000e-01 3.745042e-04 6.000000e-01 3.838737e-04 7.000000e-01 3.928446e-04 8.000000e-01 4.015291e-04 9.000000e-01 4.099962e-04 1.000000e+00 4.182933e-04 1.100000e+00 4.264546e-04 1.200000e+00 4.345060e-04 1.300000e+00 4.424673e-04 1.400000e+00 4.503542e-04 1.500000e+00 4.581793e-04 1.600000e+00 4.659528e-04 1.700000e+00 4.736831e-04 1.800000e+00 4.813773e-04 2.000000e-01 1.802899e-03 3.000000e-01 1.906688e-03 4.000000e-01 1.944793e-03 5.000000e-01 1.975184e-03 6.000000e-01 2.001128e-03 7.000000e-01 2.024136e-03 8.000000e-01 2.045107e-03 9.000000e-01 2.064588e-03 1.000000e+00 2.082933e-03 1.100000e+00 2.100380e-03 1.200000e+00 2.117098e-03 1.300000e+00 2.133210e-03 1.400000e+00 2.148807e-03 1.500000e+00 2.163961e-03 1.600000e+00 2.178727e-03 1.700000e+00 2.193150e-03 1.800000e+00 2.207268e-03 2.000000e-01 3.304185e-03 3.000000e-01 3.751705e-03 4.000000e-01 3.917309e-03 5.000000e-01 3.972614e-03 6.000000e-01 4.010042e-03 7.000000e-01 4.042764e-03 8.000000e-01 4.071826e-03 9.000000e-01 4.097975e-03 1.000000e+00 4.121830e-03 1.100000e+00 4.143880e-03 1.200000e+00 4.164498e-03 1.300000e+00 4.183960e-03 1.400000e+00 4.202474e-03 1.500000e+00 4.220197e-03 1.600000e+00 4.237249e-03 1.700000e+00 4.253725e-03 1.800000e+00 4.269699e-03 2.000000e-01 4.540777e-03 3.000000e-01 5.378380e-03 4.000000e-01 5.795345e-03 5.000000e-01 5.997784e-03 6.000000e-01 6.085450e-03 7.000000e-01 6.127639e-03 8.000000e-01 6.162085e-03 9.000000e-01 6.193414e-03 1.000000e+00 6.222041e-03 1.100000e+00 6.248289e-03 1.200000e+00 6.272504e-03 1.300000e+00 6.295017e-03 1.400000e+00 6.316113e-03 1.500000e+00 6.336026e-03 1.600000e+00 6.354945e-03 1.700000e+00 6.373023e-03 1.800000e+00 6.390379e-03 2.000000e-01 5.841119e-03 3.000000e-01 7.315103e-03 4.000000e-01 8.176375e-03 5.000000e-01 8.686829e-03 6.000000e-01 8.993831e-03 7.000000e-01 9.176306e-03 8.000000e-01 9.279799e-03 9.000000e-01 9.335679e-03 1.000000e+00 9.371395e-03 1.100000e+00 9.402841e-03 1.200000e+00 9.432240e-03 1.300000e+00 9.459766e-03 1.400000e+00 9.485533e-03 1.500000e+00 9.509697e-03 1.600000e+00 9.532435e-03 1.700000e+00 9.553920e-03 1.800000e+00 9.574310e-03 2.000000e-01 6.520667e-03 3.000000e-01 8.587452e-03 4.000000e-01 9.959776e-03 5.000000e-01 1.085945e-02 6.000000e-01 1.145491e-02 7.000000e-01 1.185439e-02 8.000000e-01 1.212419e-02 9.000000e-01 1.230529e-02 1.000000e+00 1.242450e-02 1.100000e+00 1.250091e-02 1.200000e+00 1.254942e-02 1.300000e+00 1.258381e-02 1.400000e+00 1.261424e-02 1.500000e+00 1.264298e-02 1.600000e+00 1.267023e-02 1.700000e+00 1.269606e-02 1.800000e+00 1.272057e-02 2.000000e-01 5.716772e-06 3.000000e-01 6.399379e-06 4.000000e-01 7.135159e-06 5.000000e-01 7.919051e-06 6.000000e-01 8.736241e-06 7.000000e-01 9.577413e-06 8.000000e-01 1.043791e-05 9.000000e-01 1.131553e-05 1.000000e+00 1.220921e-05 1.100000e+00 1.311838e-05 1.200000e+00 1.404271e-05 1.300000e+00 1.498198e-05 1.400000e+00 1.593601e-05 1.500000e+00 1.690466e-05 1.600000e+00 1.788780e-05 1.700000e+00 1.888533e-05 1.800000e+00 1.989713e-05 2.000000e-01 3.141671e-04 3.000000e-01 3.288369e-04 4.000000e-01 3.399251e-04 5.000000e-01 3.496815e-04 6.000000e-01 3.587490e-04 7.000000e-01 3.673869e-04 8.000000e-01 3.757251e-04 9.000000e-01 3.838413e-04 1.000000e+00 3.917872e-04 1.100000e+00 3.995991e-04 1.200000e+00 4.073042e-04 1.300000e+00 4.149231e-04 1.400000e+00 4.224717e-04 1.500000e+00 4.299629e-04 1.600000e+00 4.374072e-04 1.700000e+00 4.448130e-04 1.800000e+00 4.521874e-04 2.000000e-01 1.383411e-03 3.000000e-01 1.518442e-03 4.000000e-01 1.563720e-03 5.000000e-01 1.596730e-03 6.000000e-01 1.624718e-03 7.000000e-01 1.649354e-03 8.000000e-01 1.671657e-03 9.000000e-01 1.692274e-03 1.000000e+00 1.711622e-03 1.100000e+00 1.729985e-03 1.200000e+00 1.747557e-03 1.300000e+00 1.764479e-03 1.400000e+00 1.780854e-03 1.500000e+00 1.796762e-03 1.600000e+00 1.812264e-03 1.700000e+00 1.827409e-03 1.800000e+00 1.842238e-03 2.000000e-01 2.513511e-03 3.000000e-01 3.012077e-03 4.000000e-01 3.231985e-03 5.000000e-01 3.314213e-03 6.000000e-01 3.362826e-03 7.000000e-01 3.404533e-03 8.000000e-01 3.441545e-03 9.000000e-01 3.474725e-03 1.000000e+00 3.504845e-03 1.100000e+00 3.532544e-03 1.200000e+00 3.558316e-03 1.300000e+00 3.582536e-03 1.400000e+00 3.605487e-03 1.500000e+00 3.627381e-03 1.600000e+00 3.648382e-03 1.700000e+00 3.668618e-03 1.800000e+00 3.688190e-03 2.000000e-01 3.460182e-03 3.000000e-01 4.341547e-03 4.000000e-01 4.852390e-03 5.000000e-01 5.128265e-03 6.000000e-01 5.260032e-03 7.000000e-01 5.324199e-03 8.000000e-01 5.372483e-03 9.000000e-01 5.416003e-03 1.000000e+00 5.455700e-03 1.100000e+00 5.491990e-03 1.200000e+00 5.525335e-03 1.300000e+00 5.556191e-03 1.400000e+00 5.584961e-03 1.500000e+00 5.611982e-03 1.600000e+00 5.637528e-03 1.700000e+00 5.661821e-03 1.800000e+00 5.685041e-03 2.000000e-01 4.500978e-03 3.000000e-01 5.921557e-03 4.000000e-01 6.877164e-03 5.000000e-01 7.506324e-03 6.000000e-01 7.913973e-03 7.000000e-01 8.169822e-03 8.000000e-01 8.321749e-03 9.000000e-01 8.407558e-03 1.000000e+00 8.461806e-03 1.100000e+00 8.507625e-03 1.200000e+00 8.550113e-03 1.300000e+00 8.589784e-03 1.400000e+00 8.626824e-03 1.500000e+00 8.661458e-03 1.600000e+00 8.693932e-03 1.700000e+00 8.724496e-03 1.800000e+00 8.753376e-03 2.000000e-01 5.127736e-03 3.000000e-01 6.997508e-03 4.000000e-01 8.385228e-03 5.000000e-01 9.386749e-03 6.000000e-01 1.010188e-02 7.000000e-01 1.061010e-02 8.000000e-01 1.096852e-02 9.000000e-01 1.121722e-02 1.000000e+00 1.138536e-02 1.100000e+00 1.149572e-02 1.200000e+00 1.156745e-02 1.300000e+00 1.161841e-02 1.400000e+00 1.166240e-02 1.500000e+00 1.170358e-02 1.600000e+00 1.174251e-02 1.700000e+00 1.177934e-02 1.800000e+00 1.181422e-02 2.000000e-01 2.606553e-05 3.000000e-01 2.889988e-05 4.000000e-01 3.176278e-05 5.000000e-01 3.476426e-05 6.000000e-01 3.787138e-05 7.000000e-01 4.105637e-05 8.000000e-01 4.430507e-05 9.000000e-01 4.761106e-05 1.000000e+00 5.097150e-05 1.100000e+00 5.438506e-05 1.200000e+00 5.785108e-05 1.300000e+00 6.136914e-05 1.400000e+00 6.493895e-05 1.500000e+00 6.856026e-05 1.600000e+00 7.223282e-05 1.700000e+00 7.595642e-05 1.800000e+00 7.973083e-05 2.000000e-01 3.108870e-04 3.000000e-01 3.320208e-04 4.000000e-01 3.447882e-04 5.000000e-01 3.555338e-04 6.000000e-01 3.653860e-04 7.000000e-01 3.747140e-04 8.000000e-01 3.836927e-04 9.000000e-01 3.924224e-04 1.000000e+00 4.009674e-04 1.100000e+00 4.093716e-04 1.200000e+00 4.176666e-04 1.300000e+00 4.258759e-04 1.400000e+00 4.340178e-04 1.500000e+00 4.421063e-04 1.600000e+00 4.501530e-04 1.700000e+00 4.581673e-04 1.800000e+00 4.661567e-04 2.000000e-01 9.880042e-04 3.000000e-01 1.144809e-03 4.000000e-01 1.202357e-03 5.000000e-01 1.235686e-03 6.000000e-01 1.262805e-03 7.000000e-01 1.286505e-03 8.000000e-01 1.307834e-03 9.000000e-01 1.327449e-03 1.000000e+00 1.345790e-03 1.100000e+00 1.363158e-03 1.200000e+00 1.379759e-03 1.300000e+00 1.395742e-03 1.400000e+00 1.411215e-03 1.500000e+00 1.426259e-03 1.600000e+00 1.440936e-03 1.700000e+00 1.455297e-03 1.800000e+00 1.469378e-03 2.000000e-01 1.702108e-03 3.000000e-01 2.148654e-03 4.000000e-01 2.390162e-03 5.000000e-01 2.500205e-03 6.000000e-01 2.557298e-03 7.000000e-01 2.601526e-03 8.000000e-01 2.640637e-03 9.000000e-01 2.675888e-03 1.000000e+00 2.707968e-03 1.100000e+00 2.737478e-03 1.200000e+00 2.764917e-03 1.300000e+00 2.790679e-03 1.400000e+00 2.815070e-03 1.500000e+00 2.838324e-03 1.600000e+00 2.860625e-03 1.700000e+00 2.882113e-03 1.800000e+00 2.902902e-03 2.000000e-01 2.327336e-03 3.000000e-01 3.070348e-03 4.000000e-01 3.570389e-03 5.000000e-01 3.879816e-03 6.000000e-01 4.050962e-03 7.000000e-01 4.140736e-03 8.000000e-01 4.199810e-03 9.000000e-01 4.250488e-03 1.000000e+00 4.296832e-03 1.100000e+00 4.339503e-03 1.200000e+00 4.378912e-03 1.300000e+00 4.415483e-03 1.400000e+00 4.449627e-03 1.500000e+00 4.481707e-03 1.600000e+00 4.512032e-03 1.700000e+00 4.540858e-03 1.800000e+00 4.568396e-03 2.000000e-01 3.069264e-03 3.000000e-01 4.207416e-03 4.000000e-01 5.077281e-03 5.000000e-01 5.718597e-03 6.000000e-01 6.175393e-03 7.000000e-01 6.486771e-03 8.000000e-01 6.687395e-03 9.000000e-01 6.810525e-03 1.000000e+00 6.888916e-03 1.100000e+00 6.949551e-03 1.200000e+00 7.004247e-03 1.300000e+00 7.055395e-03 1.400000e+00 7.103419e-03 1.500000e+00 7.148541e-03 1.600000e+00 7.190996e-03 1.700000e+00 7.231041e-03 1.800000e+00 7.268927e-03 2.000000e-01 3.590368e-03 3.000000e-01 5.046723e-03 4.000000e-01 6.241093e-03 5.000000e-01 7.191972e-03 6.000000e-01 7.932933e-03 7.000000e-01 8.500009e-03 8.000000e-01 8.925661e-03 9.000000e-01 9.237463e-03 1.000000e+00 9.459218e-03 1.100000e+00 9.612409e-03 1.200000e+00 9.716965e-03 1.300000e+00 9.791691e-03 1.400000e+00 9.852682e-03 1.500000e+00 9.908369e-03 1.600000e+00 9.960938e-03 1.700000e+00 1.001085e-02 1.800000e+00 1.005828e-02 ngspice-26/tests/hisim/nmos/reference/77_noise_COIGN=1_T150.standard0000644000265600020320000000710012264261473024376 0ustar andreasadminFreq N(g) 1000 6.103109e-39 1258.925 9.672776e-39 1584.893 1.533032e-38 1995.262 2.429692e-38 2511.886 3.850802e-38 3162.278 6.103109e-38 3981.072 9.672776e-38 5011.872 1.533032e-37 6309.573 2.429692e-37 7943.282 3.850802e-37 10000 6.103109e-37 12589.25 9.672776e-37 15848.93 1.533032e-36 19952.62 2.429692e-36 25118.86 3.850802e-36 31622.78 6.103109e-36 39810.72 9.672776e-36 50118.72 1.533032e-35 63095.73 2.429692e-35 79432.82 3.850802e-35 100000 6.103109e-35 125892.5 9.672776e-35 158489.3 1.533032e-34 199526.2 2.429692e-34 251188.6 3.850802e-34 316227.8 6.103109e-34 398107.2 9.672776e-34 501187.2 1.533032e-33 630957.3 2.429692e-33 794328.2 3.850802e-33 1000000 6.103109e-33 1258925 9.672776e-33 1584893 1.533032e-32 1995262 2.429692e-32 2511886 3.850802e-32 3162278 6.103109e-32 3981072 9.672776e-32 5011872 1.533032e-31 6309573 2.429692e-31 7943282 3.850802e-31 10000000 6.103109e-31 12589250 9.672776e-31 15848930 1.533032e-30 19952620 2.429692e-30 25118860 3.850802e-30 31622780 6.103109e-30 39810720 9.672776e-30 50118720 1.533032e-29 63095730 2.429692e-29 79432820 3.850802e-29 100000000 6.103109e-29 125892500 9.672776e-29 158489300 1.533032e-28 199526200 2.429692e-28 251188600 3.850802e-28 316227800 6.103109e-28 398107200 9.672776e-28 501187200 1.533032e-27 630957300 2.429692e-27 794328200 3.850802e-27 1000000000 6.103109e-27 1258925000 9.672776e-27 1584893000 1.533032e-26 1995262000 2.429692e-26 2511886000 3.850802e-26 3162278000 6.103109e-26 3981072000 9.672776e-26 5011872000 1.533032e-25 6309573000 2.429692e-25 7943282000 3.850802e-25 10000000000 6.103109e-25 12589250000 9.672776e-25 15848930000 1.533032e-24 19952620000 2.429692e-24 25118860000 3.850802e-24 31622780000 6.103109e-24 39810720000 9.672776e-24 50118720000 1.533032e-23 63095730000 2.429692e-23 79432820000 3.850802e-23 100000000000 6.103109e-23 1000 2.514259e-39 1258.925 3.984833e-39 1584.893 6.315534e-39 1995.262 1.000945e-38 2511.886 1.58639e-38 3162.278 2.514259e-38 3981.072 3.984833e-38 5011.872 6.315534e-38 6309.573 1.000945e-37 7943.282 1.58639e-37 10000 2.514259e-37 12589.25 3.984833e-37 15848.93 6.315534e-37 19952.62 1.000945e-36 25118.86 1.58639e-36 31622.78 2.514259e-36 39810.72 3.984833e-36 50118.72 6.315534e-36 63095.73 1.000945e-35 79432.82 1.58639e-35 100000 2.514259e-35 125892.5 3.984833e-35 158489.3 6.315534e-35 199526.2 1.000945e-34 251188.6 1.58639e-34 316227.8 2.514259e-34 398107.2 3.984833e-34 501187.2 6.315534e-34 630957.3 1.000945e-33 794328.2 1.58639e-33 1000000 2.514259e-33 1258925 3.984833e-33 1584893 6.315534e-33 1995262 1.000945e-32 2511886 1.58639e-32 3162278 2.514259e-32 3981072 3.984833e-32 5011872 6.315534e-32 6309573 1.000945e-31 7943282 1.58639e-31 10000000 2.514259e-31 12589250 3.984833e-31 15848930 6.315534e-31 19952620 1.000945e-30 25118860 1.58639e-30 31622780 2.514259e-30 39810720 3.984833e-30 50118720 6.315534e-30 63095730 1.000945e-29 79432820 1.58639e-29 100000000 2.514259e-29 125892500 3.984833e-29 158489300 6.315534e-29 199526200 1.000945e-28 251188600 1.58639e-28 316227800 2.514259e-28 398107200 3.984833e-28 501187200 6.315534e-28 630957300 1.000945e-27 794328200 1.58639e-27 1000000000 2.514259e-27 1258925000 3.984833e-27 1584893000 6.315534e-27 1995262000 1.000945e-26 2511886000 1.58639e-26 3162278000 2.514259e-26 3981072000 3.984833e-26 5011872000 6.315534e-26 6309573000 1.000945e-25 7943282000 1.58639e-25 10000000000 2.514259e-25 12589250000 3.984833e-25 15848930000 6.315534e-25 19952620000 1.000945e-24 25118860000 1.58639e-24 31622780000 2.514259e-24 39810720000 3.984833e-24 50118720000 6.315534e-24 63095730000 1.000945e-23 79432820000 1.58639e-23 100000000000 2.514259e-23 ngspice-26/tests/hisim/nmos/reference/12_dcSweep_COGIDL=1.standard0000644000265600020320000002211412264261473024233 0ustar andreasadminV(d) I(d) 2.000000e-01 1.031345e-06 3.000000e-01 1.187715e-06 4.000000e-01 1.363636e-06 5.000000e-01 1.554546e-06 6.000000e-01 1.755893e-06 7.000000e-01 1.965136e-06 8.000000e-01 2.181102e-06 9.000000e-01 2.403274e-06 1.000000e+00 2.631411e-06 1.100000e+00 2.865382e-06 1.200000e+00 3.105104e-06 1.300000e+00 3.350519e-06 1.400000e+00 3.601580e-06 1.500000e+00 3.858253e-06 1.600000e+00 4.120510e-06 1.700000e+00 4.388325e-06 1.800000e+00 4.661678e-06 2.000000e-01 3.625488e-04 3.000000e-01 3.836434e-04 4.000000e-01 4.033948e-04 5.000000e-01 4.229014e-04 6.000000e-01 4.423759e-04 7.000000e-01 4.618417e-04 8.000000e-01 4.813078e-04 9.000000e-01 5.007897e-04 1.000000e+00 5.203055e-04 1.100000e+00 5.398719e-04 1.200000e+00 5.595033e-04 1.300000e+00 5.792110e-04 1.400000e+00 5.990044e-04 1.500000e+00 6.188904e-04 1.600000e+00 6.388747e-04 1.700000e+00 6.589618e-04 1.800000e+00 6.791550e-04 2.000000e-01 1.846855e-03 3.000000e-01 1.974260e-03 4.000000e-01 2.031600e-03 5.000000e-01 2.082672e-03 6.000000e-01 2.130364e-03 7.000000e-01 2.175738e-03 8.000000e-01 2.219465e-03 9.000000e-01 2.261984e-03 1.000000e+00 2.303591e-03 1.100000e+00 2.344494e-03 1.200000e+00 2.384841e-03 1.300000e+00 2.424744e-03 1.400000e+00 2.464283e-03 1.500000e+00 2.503523e-03 1.600000e+00 2.542513e-03 1.700000e+00 2.581291e-03 1.800000e+00 2.619891e-03 2.000000e-01 3.343576e-03 3.000000e-01 3.817799e-03 4.000000e-01 4.017737e-03 5.000000e-01 4.104539e-03 6.000000e-01 4.168574e-03 7.000000e-01 4.228356e-03 8.000000e-01 4.284867e-03 9.000000e-01 4.338706e-03 1.000000e+00 4.390426e-03 1.100000e+00 4.440477e-03 1.200000e+00 4.489212e-03 1.300000e+00 4.536897e-03 1.400000e+00 4.583732e-03 1.500000e+00 4.629869e-03 1.600000e+00 4.675425e-03 1.700000e+00 4.720488e-03 1.800000e+00 4.765131e-03 2.000000e-01 4.575745e-03 3.000000e-01 5.436588e-03 4.000000e-01 5.883336e-03 5.000000e-01 6.122649e-03 6.000000e-01 6.251933e-03 7.000000e-01 6.328676e-03 8.000000e-01 6.392836e-03 9.000000e-01 6.453950e-03 1.000000e+00 6.512526e-03 1.100000e+00 6.568842e-03 1.200000e+00 6.623218e-03 1.300000e+00 6.675970e-03 1.400000e+00 6.727374e-03 1.500000e+00 6.777659e-03 1.600000e+00 6.827013e-03 1.700000e+00 6.875582e-03 1.800000e+00 6.923487e-03 2.000000e-01 5.870243e-03 3.000000e-01 7.364527e-03 4.000000e-01 8.250873e-03 5.000000e-01 8.791206e-03 6.000000e-01 9.132925e-03 7.000000e-01 9.355002e-03 8.000000e-01 9.502595e-03 9.000000e-01 9.604011e-03 1.000000e+00 9.676653e-03 1.100000e+00 9.739827e-03 1.200000e+00 9.800793e-03 1.300000e+00 9.859958e-03 1.400000e+00 9.917427e-03 1.500000e+00 9.973348e-03 1.600000e+00 1.002789e-02 1.700000e+00 1.008122e-02 1.800000e+00 1.013350e-02 2.000000e-01 6.544617e-03 3.000000e-01 8.629425e-03 4.000000e-01 1.002415e-02 5.000000e-01 1.095009e-02 6.000000e-01 1.157533e-02 7.000000e-01 1.200797e-02 8.000000e-01 1.231437e-02 9.000000e-01 1.253558e-02 1.000000e+00 1.269838e-02 1.100000e+00 1.282132e-02 1.200000e+00 1.291696e-02 1.300000e+00 1.299134e-02 1.400000e+00 1.305478e-02 1.500000e+00 1.311590e-02 1.600000e+00 1.317555e-02 1.700000e+00 1.323383e-02 1.800000e+00 1.329082e-02 2.000000e-01 6.168448e-06 3.000000e-01 6.992588e-06 4.000000e-01 7.899114e-06 5.000000e-01 8.874048e-06 6.000000e-01 9.896077e-06 7.000000e-01 1.095233e-05 8.000000e-01 1.203641e-05 9.000000e-01 1.314524e-05 1.000000e+00 1.427730e-05 1.100000e+00 1.543174e-05 1.200000e+00 1.660804e-05 1.300000e+00 1.780584e-05 1.400000e+00 1.902486e-05 1.500000e+00 2.026488e-05 1.600000e+00 2.152569e-05 1.700000e+00 2.280715e-05 1.800000e+00 2.410908e-05 2.000000e-01 3.314500e-04 3.000000e-01 3.516443e-04 4.000000e-01 3.692608e-04 5.000000e-01 3.862624e-04 6.000000e-01 4.030315e-04 7.000000e-01 4.196788e-04 8.000000e-01 4.362570e-04 9.000000e-01 4.528039e-04 1.000000e+00 4.693491e-04 1.100000e+00 4.859160e-04 1.200000e+00 5.025231e-04 1.300000e+00 5.191848e-04 1.400000e+00 5.359122e-04 1.500000e+00 5.527143e-04 1.600000e+00 5.695980e-04 1.700000e+00 5.865689e-04 1.800000e+00 6.036315e-04 2.000000e-01 1.414259e-03 3.000000e-01 1.567979e-03 4.000000e-01 1.628986e-03 5.000000e-01 1.678046e-03 6.000000e-01 1.722925e-03 7.000000e-01 1.764988e-03 8.000000e-01 1.805081e-03 9.000000e-01 1.843766e-03 1.000000e+00 1.881418e-03 1.100000e+00 1.918293e-03 1.200000e+00 1.954571e-03 1.300000e+00 1.990382e-03 1.400000e+00 2.025820e-03 1.500000e+00 2.060958e-03 1.600000e+00 2.095852e-03 1.700000e+00 2.130546e-03 1.800000e+00 2.165074e-03 2.000000e-01 2.542714e-03 3.000000e-01 3.063220e-03 4.000000e-01 3.310856e-03 5.000000e-01 3.420396e-03 6.000000e-01 3.491904e-03 7.000000e-01 3.556333e-03 8.000000e-01 3.616446e-03 9.000000e-01 3.673006e-03 1.000000e+00 3.726719e-03 1.100000e+00 3.778189e-03 1.200000e+00 3.827890e-03 1.300000e+00 3.876186e-03 1.400000e+00 3.923350e-03 1.500000e+00 3.969592e-03 1.600000e+00 4.015068e-03 1.700000e+00 4.059904e-03 1.800000e+00 4.104195e-03 2.000000e-01 3.486631e-03 3.000000e-01 4.388014e-03 4.000000e-01 4.924867e-03 5.000000e-01 5.232529e-03 6.000000e-01 5.399700e-03 7.000000e-01 5.495663e-03 8.000000e-01 5.570693e-03 9.000000e-01 5.640525e-03 1.000000e+00 5.706719e-03 1.100000e+00 5.769675e-03 1.200000e+00 5.829827e-03 1.300000e+00 5.887610e-03 1.400000e+00 5.943417e-03 1.500000e+00 5.997576e-03 1.600000e+00 6.050359e-03 1.700000e+00 6.101982e-03 1.800000e+00 6.152622e-03 2.000000e-01 4.523458e-03 3.000000e-01 5.961592e-03 4.000000e-01 6.939779e-03 5.000000e-01 7.596286e-03 6.000000e-01 8.035751e-03 7.000000e-01 8.327590e-03 8.000000e-01 8.519006e-03 9.000000e-01 8.645414e-03 1.000000e+00 8.735120e-03 1.100000e+00 8.810856e-03 1.200000e+00 8.882452e-03 1.300000e+00 8.951286e-03 1.400000e+00 9.017593e-03 1.500000e+00 9.081585e-03 1.600000e+00 9.143499e-03 1.700000e+00 9.203576e-03 1.800000e+00 9.262039e-03 2.000000e-01 5.146662e-03 3.000000e-01 7.031863e-03 4.000000e-01 8.439639e-03 5.000000e-01 9.465363e-03 6.000000e-01 1.020835e-02 7.000000e-01 1.074777e-02 8.000000e-01 1.114061e-02 9.000000e-01 1.142684e-02 1.000000e+00 1.163539e-02 1.100000e+00 1.178842e-02 1.200000e+00 1.190317e-02 1.300000e+00 1.199275e-02 1.400000e+00 1.206906e-02 1.500000e+00 1.214087e-02 1.600000e+00 1.221034e-02 1.700000e+00 1.227777e-02 1.800000e+00 1.234331e-02 2.000000e-01 2.757248e-05 3.000000e-01 3.088951e-05 4.000000e-01 3.432647e-05 5.000000e-01 3.796838e-05 6.000000e-01 4.176042e-05 7.000000e-01 4.566221e-05 8.000000e-01 4.965307e-05 9.000000e-01 5.372325e-05 1.000000e+00 5.786806e-05 1.100000e+00 6.208508e-05 1.200000e+00 6.637291e-05 1.300000e+00 7.073061e-05 1.400000e+00 7.515748e-05 1.500000e+00 7.965296e-05 1.600000e+00 8.421653e-05 1.700000e+00 8.884777e-05 1.800000e+00 9.354625e-05 2.000000e-01 3.233979e-04 3.000000e-01 3.491751e-04 4.000000e-01 3.669805e-04 5.000000e-01 3.832633e-04 6.000000e-01 3.989953e-04 7.000000e-01 4.144388e-04 8.000000e-01 4.297119e-04 9.000000e-01 4.448853e-04 1.000000e+00 4.600070e-04 1.100000e+00 4.751115e-04 1.200000e+00 4.902241e-04 1.300000e+00 5.053639e-04 1.400000e+00 5.205455e-04 1.500000e+00 5.357802e-04 1.600000e+00 5.510772e-04 1.700000e+00 5.664436e-04 1.800000e+00 5.818852e-04 2.000000e-01 1.006788e-03 3.000000e-01 1.176557e-03 4.000000e-01 1.246390e-03 5.000000e-01 1.291247e-03 6.000000e-01 1.330236e-03 7.000000e-01 1.366185e-03 8.000000e-01 1.400048e-03 9.000000e-01 1.432424e-03 1.000000e+00 1.463722e-03 1.100000e+00 1.494225e-03 1.200000e+00 1.524130e-03 1.300000e+00 1.553579e-03 1.400000e+00 1.582674e-03 1.500000e+00 1.611490e-03 1.600000e+00 1.640088e-03 1.700000e+00 1.668511e-03 1.800000e+00 1.696797e-03 2.000000e-01 1.720602e-03 3.000000e-01 2.182212e-03 4.000000e-01 2.443001e-03 5.000000e-01 2.573625e-03 6.000000e-01 2.648907e-03 7.000000e-01 2.710122e-03 8.000000e-01 2.766323e-03 9.000000e-01 2.818909e-03 1.000000e+00 2.868541e-03 1.100000e+00 2.915790e-03 1.200000e+00 2.961136e-03 1.300000e+00 3.004964e-03 1.400000e+00 3.047573e-03 1.500000e+00 3.089191e-03 1.600000e+00 3.129998e-03 1.700000e+00 3.170132e-03 1.800000e+00 3.209702e-03 2.000000e-01 2.344551e-03 3.000000e-01 3.101925e-03 4.000000e-01 3.621184e-03 5.000000e-01 3.954178e-03 6.000000e-01 4.151658e-03 7.000000e-01 4.267092e-03 8.000000e-01 4.348380e-03 9.000000e-01 4.419815e-03 1.000000e+00 4.486875e-03 1.100000e+00 4.550437e-03 1.200000e+00 4.610909e-03 1.300000e+00 4.668700e-03 1.400000e+00 4.724207e-03 1.500000e+00 4.777784e-03 1.600000e+00 4.829733e-03 1.700000e+00 4.880305e-03 1.800000e+00 4.929709e-03 2.000000e-01 3.084402e-03 3.000000e-01 4.235437e-03 4.000000e-01 5.122679e-03 5.000000e-01 5.785658e-03 6.000000e-01 6.267956e-03 7.000000e-01 6.608144e-03 8.000000e-01 6.840111e-03 9.000000e-01 6.995611e-03 1.000000e+00 7.104437e-03 1.100000e+00 7.191523e-03 1.200000e+00 7.270752e-03 1.300000e+00 7.346162e-03 1.400000e+00 7.418532e-03 1.500000e+00 7.488128e-03 1.600000e+00 7.555181e-03 1.700000e+00 7.619937e-03 1.800000e+00 7.682640e-03 2.000000e-01 3.603565e-03 3.000000e-01 5.071371e-03 4.000000e-01 6.281326e-03 5.000000e-01 7.251718e-03 6.000000e-01 8.015715e-03 7.000000e-01 8.608979e-03 8.000000e-01 9.063670e-03 9.000000e-01 9.407070e-03 1.000000e+00 9.662614e-03 1.100000e+00 9.851179e-03 1.200000e+00 9.991500e-03 1.300000e+00 1.010011e-02 1.400000e+00 1.019103e-02 1.500000e+00 1.027396e-02 1.600000e+00 1.035306e-02 1.700000e+00 1.042945e-02 1.800000e+00 1.050345e-02 ngspice-26/tests/hisim/nmos/reference/64_acFreq_COTHRML=0.standard0000644000265600020320000002533012264261473024222 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/3_dcSweep_CORSRD=-1_PT.standard0000644000265600020320000002211412264261473024666 0ustar andreasadminV(d) I(d) 2.000000e-01 5.818315e-05 3.000000e-01 6.296530e-05 4.000000e-01 6.781327e-05 5.000000e-01 7.283577e-05 6.000000e-01 7.799522e-05 7.000000e-01 8.325347e-05 8.000000e-01 8.858995e-05 9.000000e-01 9.399547e-05 1.000000e+00 9.946639e-05 1.100000e+00 1.050014e-04 1.200000e+00 1.106001e-04 1.300000e+00 1.162626e-04 1.400000e+00 1.219886e-04 1.500000e+00 1.277783e-04 1.600000e+00 1.336316e-04 1.700000e+00 1.395482e-04 1.800000e+00 1.455280e-04 2.000000e-01 1.090945e-03 3.000000e-01 1.136870e-03 4.000000e-01 1.174579e-03 5.000000e-01 1.209976e-03 6.000000e-01 1.244137e-03 7.000000e-01 1.277487e-03 8.000000e-01 1.310238e-03 9.000000e-01 1.342531e-03 1.000000e+00 1.374470e-03 1.100000e+00 1.406135e-03 1.200000e+00 1.437586e-03 1.300000e+00 1.468871e-03 1.400000e+00 1.500026e-03 1.500000e+00 1.531080e-03 1.600000e+00 1.562057e-03 1.700000e+00 1.592975e-03 1.800000e+00 1.623850e-03 2.000000e-01 2.667554e-03 3.000000e-01 2.942130e-03 4.000000e-01 3.030329e-03 5.000000e-01 3.087473e-03 6.000000e-01 3.140510e-03 7.000000e-01 3.190620e-03 8.000000e-01 3.238476e-03 9.000000e-01 3.284611e-03 1.000000e+00 3.329426e-03 1.100000e+00 3.373215e-03 1.200000e+00 3.416194e-03 1.300000e+00 3.458523e-03 1.400000e+00 3.500321e-03 1.500000e+00 3.541678e-03 1.600000e+00 3.582663e-03 1.700000e+00 3.623332e-03 1.800000e+00 3.663729e-03 2.000000e-01 4.031267e-03 3.000000e-01 4.673137e-03 4.000000e-01 4.972441e-03 5.000000e-01 5.109668e-03 6.000000e-01 5.180517e-03 7.000000e-01 5.240022e-03 8.000000e-01 5.296737e-03 9.000000e-01 5.351026e-03 1.000000e+00 5.403198e-03 1.100000e+00 5.453605e-03 1.200000e+00 5.502571e-03 1.300000e+00 5.550368e-03 1.400000e+00 5.597214e-03 1.500000e+00 5.643277e-03 1.600000e+00 5.688689e-03 1.700000e+00 5.733553e-03 1.800000e+00 5.777950e-03 2.000000e-01 5.115145e-03 3.000000e-01 6.162811e-03 4.000000e-01 6.721051e-03 5.000000e-01 7.030913e-03 6.000000e-01 7.206338e-03 7.000000e-01 7.307526e-03 8.000000e-01 7.373532e-03 9.000000e-01 7.432905e-03 1.000000e+00 7.490261e-03 1.100000e+00 7.545728e-03 1.200000e+00 7.599430e-03 1.300000e+00 7.651568e-03 1.400000e+00 7.702365e-03 1.500000e+00 7.752027e-03 1.600000e+00 7.800730e-03 1.700000e+00 7.848623e-03 1.800000e+00 7.895827e-03 2.000000e-01 6.186026e-03 3.000000e-01 7.877862e-03 4.000000e-01 8.906449e-03 5.000000e-01 9.540656e-03 6.000000e-01 9.944746e-03 7.000000e-01 1.020985e-02 8.000000e-01 1.038757e-02 9.000000e-01 1.050988e-02 1.000000e+00 1.059652e-02 1.100000e+00 1.066083e-02 1.200000e+00 1.071991e-02 1.300000e+00 1.077749e-02 1.400000e+00 1.083366e-02 1.500000e+00 1.088846e-02 1.600000e+00 1.094198e-02 1.700000e+00 1.099436e-02 1.800000e+00 1.104572e-02 2.000000e-01 6.677462e-03 3.000000e-01 8.927910e-03 4.000000e-01 1.047683e-02 5.000000e-01 1.152187e-02 6.000000e-01 1.223287e-02 7.000000e-01 1.272637e-02 8.000000e-01 1.307639e-02 9.000000e-01 1.332940e-02 1.000000e+00 1.351542e-02 1.100000e+00 1.365509e-02 1.200000e+00 1.376301e-02 1.300000e+00 1.384807e-02 1.400000e+00 1.391445e-02 1.500000e+00 1.397408e-02 1.600000e+00 1.403222e-02 1.700000e+00 1.408916e-02 1.800000e+00 1.414496e-02 2.000000e-01 9.627360e-05 3.000000e-01 1.032322e-04 4.000000e-01 1.099340e-04 5.000000e-01 1.167258e-04 6.000000e-01 1.236199e-04 7.000000e-01 1.305933e-04 8.000000e-01 1.376329e-04 9.000000e-01 1.447345e-04 1.000000e+00 1.518983e-04 1.100000e+00 1.591262e-04 1.200000e+00 1.664199e-04 1.300000e+00 1.737814e-04 1.400000e+00 1.812122e-04 1.500000e+00 1.887132e-04 1.600000e+00 1.962856e-04 1.700000e+00 2.039299e-04 1.800000e+00 2.116465e-04 2.000000e-01 8.860018e-04 3.000000e-01 9.402540e-04 4.000000e-01 9.752843e-04 5.000000e-01 1.006961e-03 6.000000e-01 1.036949e-03 7.000000e-01 1.065883e-03 8.000000e-01 1.094095e-03 9.000000e-01 1.121789e-03 1.000000e+00 1.149102e-03 1.100000e+00 1.176130e-03 1.200000e+00 1.202944e-03 1.300000e+00 1.229597e-03 1.400000e+00 1.256129e-03 1.500000e+00 1.282572e-03 1.600000e+00 1.308950e-03 1.700000e+00 1.335283e-03 1.800000e+00 1.361588e-03 2.000000e-01 2.052841e-03 3.000000e-01 2.373291e-03 4.000000e-01 2.489061e-03 5.000000e-01 2.551313e-03 6.000000e-01 2.605860e-03 7.000000e-01 2.656462e-03 8.000000e-01 2.704057e-03 9.000000e-01 2.749375e-03 1.000000e+00 2.792973e-03 1.100000e+00 2.835256e-03 1.200000e+00 2.876518e-03 1.300000e+00 2.916971e-03 1.400000e+00 2.956773e-03 1.500000e+00 2.996041e-03 1.600000e+00 3.034866e-03 1.700000e+00 3.073317e-03 1.800000e+00 3.111451e-03 2.000000e-01 3.083554e-03 3.000000e-01 3.786523e-03 4.000000e-01 4.161279e-03 5.000000e-01 4.342682e-03 6.000000e-01 4.432853e-03 7.000000e-01 4.500759e-03 8.000000e-01 4.563776e-03 9.000000e-01 4.623265e-03 1.000000e+00 4.679693e-03 1.100000e+00 4.733567e-03 1.200000e+00 4.785356e-03 1.300000e+00 4.835455e-03 1.400000e+00 4.884179e-03 1.500000e+00 4.931777e-03 1.600000e+00 4.978439e-03 1.700000e+00 5.024318e-03 1.800000e+00 5.069533e-03 2.000000e-01 3.917295e-03 3.000000e-01 4.995416e-03 4.000000e-01 5.661775e-03 5.000000e-01 6.064050e-03 6.000000e-01 6.297811e-03 7.000000e-01 6.429491e-03 8.000000e-01 6.512216e-03 9.000000e-01 6.581943e-03 1.000000e+00 6.647983e-03 1.100000e+00 6.711105e-03 1.200000e+00 6.771552e-03 1.300000e+00 6.829627e-03 1.400000e+00 6.885662e-03 1.500000e+00 6.939962e-03 1.600000e+00 6.992792e-03 1.700000e+00 7.044376e-03 1.800000e+00 7.094898e-03 2.000000e-01 4.797466e-03 3.000000e-01 6.392368e-03 4.000000e-01 7.502976e-03 5.000000e-01 8.261698e-03 6.000000e-01 8.778376e-03 7.000000e-01 9.128979e-03 8.000000e-01 9.364601e-03 9.000000e-01 9.522033e-03 1.000000e+00 9.629351e-03 1.100000e+00 9.708997e-03 1.200000e+00 9.779233e-03 1.300000e+00 9.846503e-03 1.400000e+00 9.911523e-03 1.500000e+00 9.974431e-03 1.600000e+00 1.003539e-02 1.700000e+00 1.009458e-02 1.800000e+00 1.015219e-02 2.000000e-01 5.293205e-03 3.000000e-01 7.299151e-03 4.000000e-01 8.829759e-03 5.000000e-01 9.963145e-03 6.000000e-01 1.079350e-02 7.000000e-01 1.140160e-02 8.000000e-01 1.184808e-02 9.000000e-01 1.217628e-02 1.000000e+00 1.241744e-02 1.100000e+00 1.259513e-02 1.200000e+00 1.272768e-02 1.300000e+00 1.282904e-02 1.400000e+00 1.290971e-02 1.500000e+00 1.298058e-02 1.600000e+00 1.304831e-02 1.700000e+00 1.311412e-02 1.800000e+00 1.317819e-02 2.000000e-01 1.518277e-04 3.000000e-01 1.661344e-04 4.000000e-01 1.759193e-04 5.000000e-01 1.853188e-04 6.000000e-01 1.946994e-04 7.000000e-01 2.040984e-04 8.000000e-01 2.135251e-04 9.000000e-01 2.229887e-04 1.000000e+00 2.324981e-04 1.100000e+00 2.420614e-04 1.200000e+00 2.516855e-04 1.300000e+00 2.613756e-04 1.400000e+00 2.711361e-04 1.500000e+00 2.809704e-04 1.600000e+00 2.908811e-04 1.700000e+00 3.008705e-04 1.800000e+00 3.109401e-04 2.000000e-01 7.005818e-04 3.000000e-01 7.797945e-04 4.000000e-01 8.155337e-04 5.000000e-01 8.439002e-04 6.000000e-01 8.698607e-04 7.000000e-01 8.944710e-04 8.000000e-01 9.181989e-04 9.000000e-01 9.413181e-04 1.000000e+00 9.640040e-04 1.100000e+00 9.863753e-04 1.200000e+00 1.008515e-03 1.300000e+00 1.030484e-03 1.400000e+00 1.052326e-03 1.500000e+00 1.074075e-03 1.600000e+00 1.095759e-03 1.700000e+00 1.117398e-03 1.800000e+00 1.139010e-03 2.000000e-01 1.419718e-03 3.000000e-01 1.737577e-03 4.000000e-01 1.881045e-03 5.000000e-01 1.949518e-03 6.000000e-01 2.000255e-03 7.000000e-01 2.045882e-03 8.000000e-01 2.088299e-03 9.000000e-01 2.128286e-03 1.000000e+00 2.166422e-03 1.100000e+00 2.203143e-03 1.200000e+00 2.238774e-03 1.300000e+00 2.273553e-03 1.400000e+00 2.307655e-03 1.500000e+00 2.341212e-03 1.600000e+00 2.374324e-03 1.700000e+00 2.407069e-03 1.800000e+00 2.439507e-03 2.000000e-01 2.079277e-03 3.000000e-01 2.697195e-03 4.000000e-01 3.081074e-03 5.000000e-01 3.294626e-03 6.000000e-01 3.406365e-03 7.000000e-01 3.478549e-03 8.000000e-01 3.540633e-03 9.000000e-01 3.598479e-03 1.000000e+00 3.653019e-03 1.100000e+00 3.704751e-03 1.200000e+00 3.754141e-03 1.300000e+00 3.801604e-03 1.400000e+00 3.847488e-03 1.500000e+00 3.892073e-03 1.600000e+00 3.935584e-03 1.700000e+00 3.978197e-03 1.800000e+00 4.020055e-03 2.000000e-01 2.639825e-03 3.000000e-01 3.540765e-03 4.000000e-01 4.180466e-03 5.000000e-01 4.612998e-03 6.000000e-01 4.887449e-03 7.000000e-01 5.051491e-03 8.000000e-01 5.152581e-03 9.000000e-01 5.229055e-03 1.000000e+00 5.298230e-03 1.100000e+00 5.363729e-03 1.200000e+00 5.426152e-03 1.300000e+00 5.485815e-03 1.400000e+00 5.543047e-03 1.500000e+00 5.598172e-03 1.600000e+00 5.651489e-03 1.700000e+00 5.703259e-03 1.800000e+00 5.753703e-03 2.000000e-01 3.290082e-03 3.000000e-01 4.559644e-03 4.000000e-01 5.554571e-03 5.000000e-01 6.311943e-03 6.000000e-01 6.874742e-03 7.000000e-01 7.282454e-03 8.000000e-01 7.569099e-03 9.000000e-01 7.765294e-03 1.000000e+00 7.899356e-03 1.100000e+00 7.996750e-03 1.200000e+00 8.077690e-03 1.300000e+00 8.152601e-03 1.400000e+00 8.224309e-03 1.500000e+00 8.293370e-03 1.600000e+00 8.359996e-03 1.700000e+00 8.424382e-03 1.800000e+00 8.486733e-03 2.000000e-01 3.733602e-03 3.000000e-01 5.292365e-03 4.000000e-01 6.592829e-03 5.000000e-01 7.649151e-03 6.000000e-01 8.490635e-03 7.000000e-01 9.151546e-03 8.000000e-01 9.664259e-03 9.000000e-01 1.005679e-02 1.000000e+00 1.035305e-02 1.100000e+00 1.057404e-02 1.200000e+00 1.073851e-02 1.300000e+00 1.086289e-02 1.400000e+00 1.096132e-02 1.500000e+00 1.104558e-02 1.600000e+00 1.112353e-02 1.700000e+00 1.119832e-02 1.800000e+00 1.127075e-02 ngspice-26/tests/hisim/nmos/reference/70_acFreq_CODFM=1.standard0000644000265600020320000002527312264261473023746 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 1258.925 1.97107251363558e-14 1.52567128818195e-14 3.70129853233794e-15 1584.893 1.9710717293797e-14 1.52567090327287e-14 3.70129815727045e-15 1995.262 1.97107256040532e-14 1.52567112724246e-14 3.70129753953003e-15 2511.886 1.97107199642465e-14 1.52567137396058e-14 3.70129780073251e-15 3162.278 1.97107191277139e-14 1.52567051252229e-14 3.70129692994403e-15 3981.072 1.97107173577912e-14 1.52567063052994e-14 3.70129694501774e-15 5011.872 1.97107189690986e-14 1.52567087552263e-14 3.70129798127932e-15 6309.573 1.97107213002513e-14 1.52567096895756e-14 3.70129651794016e-15 7943.282 1.97107190597621e-14 1.52567088051755e-14 3.70129801572589e-15 10000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 12589.25 1.97107251363558e-14 1.52567128818195e-14 3.70129853233794e-15 15848.93 1.9710717293797e-14 1.52567090327287e-14 3.70129815727045e-15 19952.62 1.97107256040532e-14 1.52567112724246e-14 3.70129753953003e-15 25118.86 1.97107199642465e-14 1.52567137396058e-14 3.70129780073251e-15 31622.78 1.97107191277139e-14 1.52567051252229e-14 3.70129692994403e-15 39810.72 1.97107173577912e-14 1.52567063052994e-14 3.70129694501774e-15 50118.72 1.97107189690986e-14 1.52567087552263e-14 3.70129798127932e-15 63095.73 1.97107213002513e-14 1.52567096895756e-14 3.70129651794016e-15 79432.82 1.97107190597621e-14 1.52567088051755e-14 3.70129801572589e-15 100000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 125892.5 1.97107251363558e-14 1.52567128818195e-14 3.70129853233794e-15 158489.3 1.9710717293797e-14 1.52567090327288e-14 3.70129815727045e-15 199526.2 1.97107256040532e-14 1.52567112724246e-14 3.70129753953003e-15 251188.6 1.97107199642465e-14 1.52567137396058e-14 3.70129780073251e-15 316227.8 1.97107191277139e-14 1.52567051252229e-14 3.70129692994402e-15 398107.2 1.97107173577912e-14 1.52567063052994e-14 3.70129694501774e-15 501187.2 1.97107189690986e-14 1.52567087552263e-14 3.70129798127932e-15 630957.3 1.97107213002513e-14 1.52567096895756e-14 3.70129651794016e-15 794328.2 1.97107190597621e-14 1.52567088051755e-14 3.70129801572589e-15 1000000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 1258925 1.97107251363558e-14 1.52567128818195e-14 3.70129853233794e-15 1584893 1.9710717293797e-14 1.52567090327287e-14 3.70129815727045e-15 1995262 1.97107256040532e-14 1.52567112724246e-14 3.70129753953003e-15 2511886 1.97107199642465e-14 1.52567137396058e-14 3.70129780073251e-15 3162278 1.97107191277139e-14 1.52567051252229e-14 3.70129692994403e-15 3981072 1.97107173577912e-14 1.52567063052994e-14 3.70129694501774e-15 5011872 1.97107189690986e-14 1.52567087552263e-14 3.70129798127932e-15 6309573 1.97107213002513e-14 1.52567096895756e-14 3.70129651794016e-15 7943282 1.97107190597621e-14 1.52567088051755e-14 3.70129801572589e-15 10000000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 12589250 1.97107251363558e-14 1.52567128818195e-14 3.70129853233794e-15 15848930 1.9710717293797e-14 1.52567090327287e-14 3.70129815727045e-15 19952620 1.97107256040532e-14 1.52567112724246e-14 3.70129753953003e-15 25118860 1.97107199642465e-14 1.52567137396058e-14 3.70129780073251e-15 31622780 1.97107191277139e-14 1.52567051252229e-14 3.70129692994402e-15 39810720 1.97107173577912e-14 1.52567063052994e-14 3.70129694501774e-15 50118720 1.97107189690986e-14 1.52567087552263e-14 3.70129798127932e-15 63095730 1.97107213002514e-14 1.52567096895757e-14 3.70129651794016e-15 79432820 1.97107190597621e-14 1.52567088051755e-14 3.70129801572589e-15 100000000 1.97107189976532e-14 1.52567074363481e-14 3.70129780724853e-15 1000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 1258.925 1.94987292477438e-14 1.51033259108296e-14 3.63970227924687e-15 1584.893 1.9498730689738e-14 1.51033275362627e-14 3.63970153810238e-15 1995.262 1.94987303411477e-14 1.51033283883365e-14 3.63970189592254e-15 2511.886 1.94987276172225e-14 1.51033300724184e-14 3.63970229584999e-15 3162.278 1.94987224432694e-14 1.51033218348965e-14 3.63970102703718e-15 3981.072 1.949872249002e-14 1.51033230532104e-14 3.63970097826083e-15 5011.872 1.94987250137276e-14 1.51033260889036e-14 3.639701666945e-15 6309.573 1.94987256860122e-14 1.51033253990772e-14 3.6397011523685e-15 7943.282 1.94987257099239e-14 1.51033259943478e-14 3.63970204997104e-15 10000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 12589.25 1.94987292477438e-14 1.51033259108296e-14 3.63970227924687e-15 15848.93 1.9498730689738e-14 1.51033275362627e-14 3.63970153810238e-15 19952.62 1.94987303411477e-14 1.51033283883365e-14 3.63970189592254e-15 25118.86 1.94987276172225e-14 1.51033300724184e-14 3.63970229584999e-15 31622.78 1.94987224432694e-14 1.51033218348965e-14 3.63970102703718e-15 39810.72 1.949872249002e-14 1.51033230532104e-14 3.63970097826083e-15 50118.72 1.94987250137276e-14 1.51033260889036e-14 3.639701666945e-15 63095.73 1.94987256860122e-14 1.51033253990772e-14 3.6397011523685e-15 79432.82 1.94987257099239e-14 1.51033259943478e-14 3.63970204997104e-15 100000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 125892.5 1.94987292477438e-14 1.51033259108296e-14 3.63970227924687e-15 158489.3 1.9498730689738e-14 1.51033275362627e-14 3.63970153810238e-15 199526.2 1.94987303411477e-14 1.51033283883365e-14 3.63970189592254e-15 251188.6 1.94987276172225e-14 1.51033300724183e-14 3.63970229584999e-15 316227.8 1.94987224432694e-14 1.51033218348965e-14 3.63970102703718e-15 398107.2 1.949872249002e-14 1.51033230532104e-14 3.63970097826083e-15 501187.2 1.94987250137276e-14 1.51033260889036e-14 3.639701666945e-15 630957.3 1.94987256860122e-14 1.51033253990772e-14 3.6397011523685e-15 794328.2 1.94987257099239e-14 1.51033259943478e-14 3.63970204997104e-15 1000000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 1258925 1.94987292477438e-14 1.51033259108296e-14 3.63970227924687e-15 1584893 1.9498730689738e-14 1.51033275362627e-14 3.63970153810238e-15 1995262 1.94987303411477e-14 1.51033283883365e-14 3.63970189592254e-15 2511886 1.94987276172225e-14 1.51033300724183e-14 3.63970229584999e-15 3162278 1.94987224432694e-14 1.51033218348965e-14 3.63970102703718e-15 3981072 1.949872249002e-14 1.51033230532104e-14 3.63970097826083e-15 5011872 1.94987250137276e-14 1.51033260889036e-14 3.639701666945e-15 6309573 1.94987256860122e-14 1.51033253990772e-14 3.6397011523685e-15 7943282 1.94987257099239e-14 1.51033259943478e-14 3.63970204997104e-15 10000000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 12589250 1.94987292477438e-14 1.51033259108296e-14 3.63970227924687e-15 15848930 1.9498730689738e-14 1.51033275362627e-14 3.63970153810238e-15 19952620 1.94987303411477e-14 1.51033283883365e-14 3.63970189592254e-15 25118860 1.94987276172225e-14 1.51033300724184e-14 3.63970229584999e-15 31622780 1.94987224432694e-14 1.51033218348965e-14 3.63970102703718e-15 39810720 1.949872249002e-14 1.51033230532104e-14 3.63970097826083e-15 50118720 1.94987250137276e-14 1.51033260889036e-14 3.639701666945e-15 63095730 1.94987256860122e-14 1.51033253990772e-14 3.6397011523685e-15 79432820 1.94987257099239e-14 1.51033259943478e-14 3.63970204997104e-15 100000000 1.94987246134548e-14 1.51033250430422e-14 3.63970166117311e-15 1000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 1258.925 1.92145467932082e-14 1.48911403902581e-14 3.56442344816996e-15 1584.893 1.92145421111083e-14 1.48911400922187e-14 3.56442269496319e-15 1995.262 1.92145384749929e-14 1.48911416859792e-14 3.56442231983531e-15 2511.886 1.92145420487867e-14 1.48911413071159e-14 3.56442277303848e-15 3162.278 1.92145385776611e-14 1.48911389323872e-14 3.56442161941386e-15 3981.072 1.92145355101154e-14 1.48911402892563e-14 3.56442177182073e-15 5011.872 1.92145410798156e-14 1.48911416000037e-14 3.56442186967691e-15 6309.573 1.92145404748488e-14 1.48911406021354e-14 3.56442157129963e-15 7943.282 1.92145391312094e-14 1.4891140294867e-14 3.56442120860284e-15 10000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 12589.25 1.92145467932082e-14 1.48911403902581e-14 3.56442344816996e-15 15848.93 1.92145421111083e-14 1.48911400922187e-14 3.56442269496319e-15 19952.62 1.92145384749929e-14 1.48911416859792e-14 3.5644223198353e-15 25118.86 1.92145420487867e-14 1.48911413071159e-14 3.56442277303848e-15 31622.78 1.92145385776611e-14 1.48911389323872e-14 3.56442161941386e-15 39810.72 1.92145355101154e-14 1.48911402892563e-14 3.56442177182073e-15 50118.72 1.92145410798156e-14 1.48911416000037e-14 3.56442186967691e-15 63095.73 1.92145404748488e-14 1.48911406021354e-14 3.56442157129963e-15 79432.82 1.92145391312094e-14 1.4891140294867e-14 3.56442120860284e-15 100000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 125892.5 1.92145467932082e-14 1.48911403902581e-14 3.56442344816996e-15 158489.3 1.92145421111083e-14 1.48911400922187e-14 3.56442269496319e-15 199526.2 1.92145384749929e-14 1.48911416859792e-14 3.5644223198353e-15 251188.6 1.92145420487867e-14 1.48911413071159e-14 3.56442277303848e-15 316227.8 1.92145385776611e-14 1.48911389323872e-14 3.56442161941386e-15 398107.2 1.92145355101154e-14 1.48911402892563e-14 3.56442177182073e-15 501187.2 1.92145410798156e-14 1.48911416000037e-14 3.56442186967691e-15 630957.3 1.92145404748488e-14 1.48911406021354e-14 3.56442157129963e-15 794328.2 1.92145391312094e-14 1.4891140294867e-14 3.56442120860284e-15 1000000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 1258925 1.92145467932082e-14 1.48911403902581e-14 3.56442344816996e-15 1584893 1.92145421111083e-14 1.48911400922187e-14 3.56442269496319e-15 1995262 1.92145384749929e-14 1.48911416859792e-14 3.56442231983531e-15 2511886 1.92145420487867e-14 1.48911413071159e-14 3.56442277303848e-15 3162278 1.92145385776611e-14 1.48911389323872e-14 3.56442161941386e-15 3981072 1.92145355101154e-14 1.48911402892563e-14 3.56442177182073e-15 5011872 1.92145410798156e-14 1.48911416000037e-14 3.56442186967691e-15 6309573 1.92145404748488e-14 1.48911406021354e-14 3.56442157129963e-15 7943282 1.92145391312094e-14 1.4891140294867e-14 3.56442120860284e-15 10000000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 12589250 1.92145467932082e-14 1.48911403902581e-14 3.56442344816996e-15 15848930 1.92145421111083e-14 1.48911400922187e-14 3.56442269496319e-15 19952620 1.92145384749929e-14 1.48911416859792e-14 3.5644223198353e-15 25118860 1.92145420487867e-14 1.48911413071159e-14 3.56442277303848e-15 31622780 1.92145385776611e-14 1.48911389323872e-14 3.56442161941386e-15 39810720 1.92145355101154e-14 1.48911402892563e-14 3.56442177182073e-15 50118720 1.92145410798156e-14 1.48911416000037e-14 3.56442186967691e-15 63095730 1.92145404748488e-14 1.48911406021354e-14 3.56442157129963e-15 79432820 1.92145391312094e-14 1.4891140294867e-14 3.56442120860284e-15 100000000 1.92145375470699e-14 1.4891139672912e-14 3.56442137309064e-15 ngspice-26/tests/hisim/nmos/reference/20_dcSweep_CORG=1.standard0000644000265600020320000002211412264261473024023 0ustar andreasadminV(d) I(d) 2.000000e-01 1.031340e-06 3.000000e-01 1.187668e-06 4.000000e-01 1.363411e-06 5.000000e-01 1.553811e-06 6.000000e-01 1.754026e-06 7.000000e-01 1.961205e-06 8.000000e-01 2.173905e-06 9.000000e-01 2.391410e-06 1.000000e+00 2.613350e-06 1.100000e+00 2.839516e-06 1.200000e+00 3.069773e-06 1.300000e+00 3.304026e-06 1.400000e+00 3.542204e-06 1.500000e+00 3.784246e-06 1.600000e+00 4.030100e-06 1.700000e+00 4.279721e-06 1.800000e+00 4.533070e-06 2.000000e-01 3.625488e-04 3.000000e-01 3.836434e-04 4.000000e-01 4.033947e-04 5.000000e-01 4.229012e-04 6.000000e-01 4.423753e-04 7.000000e-01 4.618402e-04 8.000000e-01 4.813047e-04 9.000000e-01 5.007840e-04 1.000000e+00 5.202960e-04 1.100000e+00 5.398574e-04 1.200000e+00 5.594823e-04 1.300000e+00 5.791821e-04 1.400000e+00 5.989658e-04 1.500000e+00 6.188407e-04 1.600000e+00 6.388122e-04 1.700000e+00 6.588847e-04 1.800000e+00 6.790616e-04 2.000000e-01 1.846855e-03 3.000000e-01 1.974260e-03 4.000000e-01 2.031600e-03 5.000000e-01 2.082672e-03 6.000000e-01 2.130364e-03 7.000000e-01 2.175738e-03 8.000000e-01 2.219464e-03 9.000000e-01 2.261982e-03 1.000000e+00 2.303587e-03 1.100000e+00 2.344487e-03 1.200000e+00 2.384830e-03 1.300000e+00 2.424728e-03 1.400000e+00 2.464261e-03 1.500000e+00 2.503492e-03 1.600000e+00 2.542472e-03 1.700000e+00 2.581239e-03 1.800000e+00 2.619826e-03 2.000000e-01 3.343576e-03 3.000000e-01 3.817799e-03 4.000000e-01 4.017737e-03 5.000000e-01 4.104539e-03 6.000000e-01 4.168574e-03 7.000000e-01 4.228356e-03 8.000000e-01 4.284866e-03 9.000000e-01 4.338706e-03 1.000000e+00 4.390424e-03 1.100000e+00 4.440474e-03 1.200000e+00 4.489207e-03 1.300000e+00 4.536889e-03 1.400000e+00 4.583720e-03 1.500000e+00 4.629852e-03 1.600000e+00 4.675400e-03 1.700000e+00 4.720456e-03 1.800000e+00 4.765089e-03 2.000000e-01 4.575745e-03 3.000000e-01 5.436588e-03 4.000000e-01 5.883336e-03 5.000000e-01 6.122649e-03 6.000000e-01 6.251933e-03 7.000000e-01 6.328676e-03 8.000000e-01 6.392836e-03 9.000000e-01 6.453950e-03 1.000000e+00 6.512526e-03 1.100000e+00 6.568841e-03 1.200000e+00 6.623216e-03 1.300000e+00 6.675967e-03 1.400000e+00 6.727368e-03 1.500000e+00 6.777651e-03 1.600000e+00 6.827000e-03 1.700000e+00 6.875564e-03 1.800000e+00 6.923462e-03 2.000000e-01 5.870243e-03 3.000000e-01 7.364527e-03 4.000000e-01 8.250873e-03 5.000000e-01 8.791206e-03 6.000000e-01 9.132925e-03 7.000000e-01 9.355002e-03 8.000000e-01 9.502595e-03 9.000000e-01 9.604011e-03 1.000000e+00 9.676653e-03 1.100000e+00 9.739827e-03 1.200000e+00 9.800793e-03 1.300000e+00 9.859958e-03 1.400000e+00 9.917427e-03 1.500000e+00 9.973346e-03 1.600000e+00 1.002789e-02 1.700000e+00 1.008122e-02 1.800000e+00 1.013349e-02 2.000000e-01 6.544617e-03 3.000000e-01 8.629425e-03 4.000000e-01 1.002415e-02 5.000000e-01 1.095009e-02 6.000000e-01 1.157533e-02 7.000000e-01 1.200797e-02 8.000000e-01 1.231437e-02 9.000000e-01 1.253558e-02 1.000000e+00 1.269838e-02 1.100000e+00 1.282132e-02 1.200000e+00 1.291696e-02 1.300000e+00 1.299134e-02 1.400000e+00 1.305478e-02 1.500000e+00 1.311590e-02 1.600000e+00 1.317555e-02 1.700000e+00 1.323383e-02 1.800000e+00 1.329082e-02 2.000000e-01 6.168441e-06 3.000000e-01 6.992527e-06 4.000000e-01 7.898833e-06 5.000000e-01 8.873147e-06 6.000000e-01 9.893832e-06 7.000000e-01 1.094768e-05 8.000000e-01 1.202799e-05 9.000000e-01 1.313151e-05 1.000000e+00 1.425659e-05 1.100000e+00 1.540231e-05 1.200000e+00 1.656813e-05 1.300000e+00 1.775364e-05 1.400000e+00 1.895856e-05 1.500000e+00 2.018263e-05 1.600000e+00 2.142567e-05 1.700000e+00 2.268746e-05 1.800000e+00 2.396787e-05 2.000000e-01 3.314500e-04 3.000000e-01 3.516443e-04 4.000000e-01 3.692608e-04 5.000000e-01 3.862621e-04 6.000000e-01 4.030308e-04 7.000000e-01 4.196770e-04 8.000000e-01 4.362533e-04 9.000000e-01 4.527971e-04 1.000000e+00 4.693380e-04 1.100000e+00 4.858992e-04 1.200000e+00 5.024990e-04 1.300000e+00 5.191518e-04 1.400000e+00 5.358687e-04 1.500000e+00 5.526585e-04 1.600000e+00 5.695281e-04 1.700000e+00 5.864832e-04 1.800000e+00 6.035282e-04 2.000000e-01 1.414259e-03 3.000000e-01 1.567979e-03 4.000000e-01 1.628986e-03 5.000000e-01 1.678046e-03 6.000000e-01 1.722925e-03 7.000000e-01 1.764987e-03 8.000000e-01 1.805080e-03 9.000000e-01 1.843763e-03 1.000000e+00 1.881413e-03 1.100000e+00 1.918285e-03 1.200000e+00 1.954559e-03 1.300000e+00 1.990363e-03 1.400000e+00 2.025794e-03 1.500000e+00 2.060923e-03 1.600000e+00 2.095806e-03 1.700000e+00 2.130488e-03 1.800000e+00 2.165002e-03 2.000000e-01 2.542714e-03 3.000000e-01 3.063220e-03 4.000000e-01 3.310856e-03 5.000000e-01 3.420396e-03 6.000000e-01 3.491904e-03 7.000000e-01 3.556333e-03 8.000000e-01 3.616445e-03 9.000000e-01 3.673005e-03 1.000000e+00 3.726718e-03 1.100000e+00 3.778185e-03 1.200000e+00 3.827884e-03 1.300000e+00 3.876176e-03 1.400000e+00 3.923336e-03 1.500000e+00 3.969571e-03 1.600000e+00 4.015041e-03 1.700000e+00 4.059867e-03 1.800000e+00 4.104148e-03 2.000000e-01 3.486631e-03 3.000000e-01 4.388014e-03 4.000000e-01 4.924867e-03 5.000000e-01 5.232529e-03 6.000000e-01 5.399700e-03 7.000000e-01 5.495663e-03 8.000000e-01 5.570693e-03 9.000000e-01 5.640525e-03 1.000000e+00 5.706719e-03 1.100000e+00 5.769675e-03 1.200000e+00 5.829825e-03 1.300000e+00 5.887607e-03 1.400000e+00 5.943411e-03 1.500000e+00 5.997567e-03 1.600000e+00 6.050344e-03 1.700000e+00 6.101961e-03 1.800000e+00 6.152594e-03 2.000000e-01 4.523458e-03 3.000000e-01 5.961592e-03 4.000000e-01 6.939779e-03 5.000000e-01 7.596286e-03 6.000000e-01 8.035751e-03 7.000000e-01 8.327590e-03 8.000000e-01 8.519006e-03 9.000000e-01 8.645414e-03 1.000000e+00 8.735120e-03 1.100000e+00 8.810856e-03 1.200000e+00 8.882452e-03 1.300000e+00 8.951286e-03 1.400000e+00 9.017592e-03 1.500000e+00 9.081583e-03 1.600000e+00 9.143495e-03 1.700000e+00 9.203569e-03 1.800000e+00 9.262028e-03 2.000000e-01 5.146662e-03 3.000000e-01 7.031863e-03 4.000000e-01 8.439639e-03 5.000000e-01 9.465363e-03 6.000000e-01 1.020835e-02 7.000000e-01 1.074777e-02 8.000000e-01 1.114061e-02 9.000000e-01 1.142684e-02 1.000000e+00 1.163539e-02 1.100000e+00 1.178842e-02 1.200000e+00 1.190317e-02 1.300000e+00 1.199275e-02 1.400000e+00 1.206906e-02 1.500000e+00 1.214087e-02 1.600000e+00 1.221034e-02 1.700000e+00 1.227777e-02 1.800000e+00 1.234331e-02 2.000000e-01 2.757247e-05 3.000000e-01 3.088943e-05 4.000000e-01 3.432614e-05 5.000000e-01 3.796733e-05 6.000000e-01 4.175784e-05 7.000000e-01 4.565691e-05 8.000000e-01 4.964358e-05 9.000000e-01 5.370790e-05 1.000000e+00 5.784506e-05 1.100000e+00 6.205260e-05 1.200000e+00 6.632908e-05 1.300000e+00 7.067356e-05 1.400000e+00 7.508532e-05 1.500000e+00 7.956378e-05 1.600000e+00 8.410843e-05 1.700000e+00 8.871881e-05 1.800000e+00 9.339451e-05 2.000000e-01 3.233979e-04 3.000000e-01 3.491751e-04 4.000000e-01 3.669805e-04 5.000000e-01 3.832630e-04 6.000000e-01 3.989944e-04 7.000000e-01 4.144367e-04 8.000000e-01 4.297076e-04 9.000000e-01 4.448775e-04 1.000000e+00 4.599945e-04 1.100000e+00 4.750927e-04 1.200000e+00 4.901974e-04 1.300000e+00 5.053275e-04 1.400000e+00 5.204977e-04 1.500000e+00 5.357192e-04 1.600000e+00 5.510012e-04 1.700000e+00 5.663506e-04 1.800000e+00 5.817735e-04 2.000000e-01 1.006788e-03 3.000000e-01 1.176557e-03 4.000000e-01 1.246390e-03 5.000000e-01 1.291247e-03 6.000000e-01 1.330236e-03 7.000000e-01 1.366185e-03 8.000000e-01 1.400047e-03 9.000000e-01 1.432420e-03 1.000000e+00 1.463716e-03 1.100000e+00 1.494215e-03 1.200000e+00 1.524116e-03 1.300000e+00 1.553558e-03 1.400000e+00 1.582644e-03 1.500000e+00 1.611452e-03 1.600000e+00 1.640038e-03 1.700000e+00 1.668448e-03 1.800000e+00 1.696719e-03 2.000000e-01 1.720602e-03 3.000000e-01 2.182212e-03 4.000000e-01 2.443001e-03 5.000000e-01 2.573625e-03 6.000000e-01 2.648907e-03 7.000000e-01 2.710122e-03 8.000000e-01 2.766323e-03 9.000000e-01 2.818908e-03 1.000000e+00 2.868539e-03 1.100000e+00 2.915786e-03 1.200000e+00 2.961129e-03 1.300000e+00 3.004954e-03 1.400000e+00 3.047557e-03 1.500000e+00 3.089169e-03 1.600000e+00 3.129968e-03 1.700000e+00 3.170092e-03 1.800000e+00 3.209650e-03 2.000000e-01 2.344551e-03 3.000000e-01 3.101925e-03 4.000000e-01 3.621184e-03 5.000000e-01 3.954178e-03 6.000000e-01 4.151658e-03 7.000000e-01 4.267092e-03 8.000000e-01 4.348380e-03 9.000000e-01 4.419815e-03 1.000000e+00 4.486875e-03 1.100000e+00 4.550435e-03 1.200000e+00 4.610906e-03 1.300000e+00 4.668696e-03 1.400000e+00 4.724200e-03 1.500000e+00 4.777773e-03 1.600000e+00 4.829716e-03 1.700000e+00 4.880282e-03 1.800000e+00 4.929678e-03 2.000000e-01 3.084402e-03 3.000000e-01 4.235437e-03 4.000000e-01 5.122679e-03 5.000000e-01 5.785658e-03 6.000000e-01 6.267956e-03 7.000000e-01 6.608144e-03 8.000000e-01 6.840111e-03 9.000000e-01 6.995611e-03 1.000000e+00 7.104437e-03 1.100000e+00 7.191523e-03 1.200000e+00 7.270752e-03 1.300000e+00 7.346161e-03 1.400000e+00 7.418531e-03 1.500000e+00 7.488125e-03 1.600000e+00 7.555176e-03 1.700000e+00 7.619929e-03 1.800000e+00 7.682628e-03 2.000000e-01 3.603565e-03 3.000000e-01 5.071371e-03 4.000000e-01 6.281326e-03 5.000000e-01 7.251718e-03 6.000000e-01 8.015715e-03 7.000000e-01 8.608979e-03 8.000000e-01 9.063670e-03 9.000000e-01 9.407070e-03 1.000000e+00 9.662614e-03 1.100000e+00 9.851179e-03 1.200000e+00 9.991500e-03 1.300000e+00 1.010011e-02 1.400000e+00 1.019103e-02 1.500000e+00 1.027396e-02 1.600000e+00 1.035306e-02 1.700000e+00 1.042945e-02 1.800000e+00 1.050344e-02 ngspice-26/tests/hisim/nmos/reference/68_acFreq_WPE.standard0000644000265600020320000002526412264261473023402 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97245177312192e-14 1.52598443802765e-14 3.70121027202983e-15 1258.925 1.97245303430088e-14 1.52598481302169e-14 3.70121256584962e-15 1584.893 1.97245250427587e-14 1.52598421364931e-14 3.70121079187702e-15 1995.262 1.97245251978684e-14 1.52598460934474e-14 3.70121139177673e-15 2511.886 1.9724526268394e-14 1.52598437599128e-14 3.70121163013297e-15 3162.278 1.97245193961899e-14 1.52598406348e-14 3.70121036370851e-15 3981.072 1.97245217305455e-14 1.52598445713325e-14 3.70121059272944e-15 5011.872 1.97245231232673e-14 1.52598462073355e-14 3.70121224119131e-15 6309.573 1.97245240702423e-14 1.52598450775688e-14 3.70121075511493e-15 7943.282 1.9724524153902e-14 1.52598445050781e-14 3.70121185911515e-15 10000 1.97245177312192e-14 1.52598443802765e-14 3.70121027202983e-15 12589.25 1.97245303430088e-14 1.52598481302169e-14 3.70121256584962e-15 15848.93 1.97245250427587e-14 1.52598421364931e-14 3.70121079187702e-15 19952.62 1.97245251978684e-14 1.52598460934474e-14 3.70121139177673e-15 25118.86 1.9724526268394e-14 1.52598437599128e-14 3.70121163013297e-15 31622.78 1.97245193961899e-14 1.52598406348e-14 3.70121036370851e-15 39810.72 1.97245217305455e-14 1.52598445713325e-14 3.70121059272944e-15 50118.72 1.97245231232673e-14 1.52598462073355e-14 3.70121224119131e-15 63095.73 1.97245240702423e-14 1.52598450775688e-14 3.70121075511493e-15 79432.82 1.9724524153902e-14 1.52598445050781e-14 3.70121185911515e-15 100000 1.97245177312193e-14 1.52598443802765e-14 3.70121027202983e-15 125892.5 1.97245303430088e-14 1.52598481302168e-14 3.70121256584962e-15 158489.3 1.97245250427587e-14 1.52598421364931e-14 3.70121079187702e-15 199526.2 1.97245251978684e-14 1.52598460934474e-14 3.70121139177673e-15 251188.6 1.9724526268394e-14 1.52598437599128e-14 3.70121163013297e-15 316227.8 1.97245193961899e-14 1.52598406348e-14 3.70121036370851e-15 398107.2 1.97245217305455e-14 1.52598445713325e-14 3.70121059272944e-15 501187.2 1.97245231232673e-14 1.52598462073355e-14 3.70121224119131e-15 630957.3 1.97245240702423e-14 1.52598450775688e-14 3.70121075511493e-15 794328.2 1.9724524153902e-14 1.52598445050781e-14 3.70121185911515e-15 1000000 1.97245177312192e-14 1.52598443802765e-14 3.70121027202983e-15 1258925 1.97245303430088e-14 1.52598481302168e-14 3.70121256584962e-15 1584893 1.97245250427587e-14 1.52598421364931e-14 3.70121079187702e-15 1995262 1.97245251978684e-14 1.52598460934474e-14 3.70121139177673e-15 2511886 1.9724526268394e-14 1.52598437599128e-14 3.70121163013297e-15 3162278 1.97245193961899e-14 1.52598406348e-14 3.70121036370851e-15 3981072 1.97245217305455e-14 1.52598445713325e-14 3.70121059272944e-15 5011872 1.97245231232673e-14 1.52598462073355e-14 3.70121224119131e-15 6309573 1.97245240702423e-14 1.52598450775688e-14 3.70121075511493e-15 7943282 1.9724524153902e-14 1.52598445050781e-14 3.70121185911515e-15 10000000 1.97245177312192e-14 1.52598443802765e-14 3.70121027202983e-15 12589250 1.97245303430088e-14 1.52598481302168e-14 3.70121256584962e-15 15848930 1.97245250427587e-14 1.52598421364931e-14 3.70121079187702e-15 19952620 1.97245251978684e-14 1.52598460934474e-14 3.70121139177673e-15 25118860 1.9724526268394e-14 1.52598437599128e-14 3.70121163013297e-15 31622780 1.97245193961899e-14 1.52598406348e-14 3.70121036370851e-15 39810720 1.97245217305455e-14 1.52598445713325e-14 3.70121059272944e-15 50118720 1.97245231232673e-14 1.52598462073355e-14 3.70121224119131e-15 63095730 1.97245240702423e-14 1.52598450775688e-14 3.70121075511493e-15 79432820 1.9724524153902e-14 1.52598445050781e-14 3.70121185911515e-15 100000000 1.97245177312193e-14 1.52598443802765e-14 3.70121027202983e-15 1000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 1258.925 1.95115104418154e-14 1.51048176822445e-14 3.63962389803694e-15 1584.893 1.95115141547767e-14 1.51048137521509e-14 3.63962220630835e-15 1995.262 1.95115089245534e-14 1.51048120440877e-14 3.63962292714869e-15 2511.886 1.95115138135371e-14 1.51048127136164e-14 3.63962309493129e-15 3162.278 1.95115060617702e-14 1.5104806546494e-14 3.63962201018267e-15 3981.072 1.95115074260375e-14 1.51048102315089e-14 3.63962182199656e-15 5011.872 1.95115098135168e-14 1.5104812250429e-14 3.63962227797463e-15 6309.573 1.95115093918445e-14 1.51048111139026e-14 3.63962295685137e-15 7943.282 1.95115089465876e-14 1.51048106931515e-14 3.63962190428663e-15 10000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 12589.25 1.95115104418154e-14 1.51048176822445e-14 3.63962389803694e-15 15848.93 1.95115141547767e-14 1.51048137521509e-14 3.63962220630835e-15 19952.62 1.95115089245534e-14 1.51048120440877e-14 3.63962292714869e-15 25118.86 1.95115138135371e-14 1.51048127136164e-14 3.63962309493129e-15 31622.78 1.95115060617702e-14 1.5104806546494e-14 3.63962201018267e-15 39810.72 1.95115074260375e-14 1.51048102315089e-14 3.63962182199656e-15 50118.72 1.95115098135168e-14 1.5104812250429e-14 3.63962227797463e-15 63095.73 1.95115093918445e-14 1.51048111139026e-14 3.63962295685137e-15 79432.82 1.95115089465876e-14 1.51048106931515e-14 3.63962190428663e-15 100000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 125892.5 1.95115104418154e-14 1.51048176822445e-14 3.63962389803694e-15 158489.3 1.95115141547767e-14 1.51048137521509e-14 3.63962220630835e-15 199526.2 1.95115089245534e-14 1.51048120440877e-14 3.63962292714869e-15 251188.6 1.95115138135371e-14 1.51048127136164e-14 3.63962309493129e-15 316227.8 1.95115060617702e-14 1.5104806546494e-14 3.63962201018267e-15 398107.2 1.95115074260375e-14 1.51048102315089e-14 3.63962182199656e-15 501187.2 1.95115098135167e-14 1.5104812250429e-14 3.63962227797463e-15 630957.3 1.95115093918445e-14 1.51048111139026e-14 3.63962295685137e-15 794328.2 1.95115089465876e-14 1.51048106931515e-14 3.63962190428663e-15 1000000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 1258925 1.95115104418154e-14 1.51048176822445e-14 3.63962389803694e-15 1584893 1.95115141547767e-14 1.51048137521509e-14 3.63962220630835e-15 1995262 1.95115089245534e-14 1.51048120440877e-14 3.63962292714869e-15 2511886 1.95115138135371e-14 1.51048127136164e-14 3.63962309493129e-15 3162278 1.95115060617702e-14 1.5104806546494e-14 3.63962201018267e-15 3981072 1.95115074260375e-14 1.51048102315089e-14 3.63962182199656e-15 5011872 1.95115098135168e-14 1.5104812250429e-14 3.63962227797463e-15 6309573 1.95115093918445e-14 1.51048111139026e-14 3.63962295685137e-15 7943282 1.95115089465876e-14 1.51048106931515e-14 3.63962190428663e-15 10000000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 12589250 1.95115104418154e-14 1.51048176822445e-14 3.63962389803694e-15 15848930 1.95115141547767e-14 1.51048137521509e-14 3.63962220630835e-15 19952620 1.95115089245534e-14 1.51048120440877e-14 3.63962292714869e-15 25118860 1.95115138135371e-14 1.51048127136164e-14 3.63962309493129e-15 31622780 1.95115060617702e-14 1.5104806546494e-14 3.63962201018267e-15 39810720 1.95115074260375e-14 1.51048102315089e-14 3.63962182199656e-15 50118720 1.95115098135167e-14 1.5104812250429e-14 3.63962227797463e-15 63095730 1.95115093918445e-14 1.51048111139026e-14 3.63962295685137e-15 79432820 1.95115089465876e-14 1.51048106931515e-14 3.63962190428663e-15 100000000 1.95115047553851e-14 1.51048099586612e-14 3.63962208370156e-15 1000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 1258.925 1.92258615001262e-14 1.48903312938975e-14 3.56433748168165e-15 1584.893 1.92258594442573e-14 1.48903266902799e-14 3.5643373379696e-15 1995.262 1.92258573325789e-14 1.48903280683092e-14 3.56433696974639e-15 2511.886 1.92258582760503e-14 1.48903302897085e-14 3.56433723604628e-15 3162.278 1.9225857616247e-14 1.48903235992388e-14 3.56433605976248e-15 3981.072 1.92258572545811e-14 1.48903247398668e-14 3.56433621909066e-15 5011.872 1.92258587714322e-14 1.48903254813883e-14 3.5643361295889e-15 6309.573 1.92258586453439e-14 1.48903258552956e-14 3.56433580847439e-15 7943.282 1.92258597091326e-14 1.48903248125281e-14 3.56433705563421e-15 10000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 12589.25 1.92258615001262e-14 1.48903312938975e-14 3.56433748168165e-15 15848.93 1.92258594442573e-14 1.48903266902799e-14 3.5643373379696e-15 19952.62 1.92258573325789e-14 1.48903280683092e-14 3.56433696974639e-15 25118.86 1.92258582760503e-14 1.48903302897085e-14 3.56433723604628e-15 31622.78 1.9225857616247e-14 1.48903235992388e-14 3.56433605976247e-15 39810.72 1.92258572545811e-14 1.48903247398668e-14 3.56433621909066e-15 50118.72 1.92258587714322e-14 1.48903254813883e-14 3.5643361295889e-15 63095.73 1.92258586453439e-14 1.48903258552956e-14 3.56433580847439e-15 79432.82 1.92258597091326e-14 1.48903248125281e-14 3.56433705563421e-15 100000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 125892.5 1.92258615001262e-14 1.48903312938975e-14 3.56433748168165e-15 158489.3 1.92258594442573e-14 1.48903266902799e-14 3.5643373379696e-15 199526.2 1.92258573325789e-14 1.48903280683092e-14 3.56433696974639e-15 251188.6 1.92258582760503e-14 1.48903302897085e-14 3.56433723604628e-15 316227.8 1.9225857616247e-14 1.48903235992388e-14 3.56433605976247e-15 398107.2 1.92258572545811e-14 1.48903247398668e-14 3.56433621909066e-15 501187.2 1.92258587714322e-14 1.48903254813883e-14 3.5643361295889e-15 630957.3 1.92258586453439e-14 1.48903258552956e-14 3.56433580847439e-15 794328.2 1.92258597091326e-14 1.48903248125281e-14 3.56433705563421e-15 1000000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 1258925 1.92258615001262e-14 1.48903312938975e-14 3.56433748168165e-15 1584893 1.92258594442573e-14 1.48903266902799e-14 3.5643373379696e-15 1995262 1.92258573325789e-14 1.48903280683092e-14 3.56433696974639e-15 2511886 1.92258582760503e-14 1.48903302897085e-14 3.56433723604628e-15 3162278 1.9225857616247e-14 1.48903235992388e-14 3.56433605976247e-15 3981072 1.92258572545811e-14 1.48903247398668e-14 3.56433621909066e-15 5011872 1.92258587714322e-14 1.48903254813883e-14 3.5643361295889e-15 6309573 1.92258586453439e-14 1.48903258552956e-14 3.56433580847439e-15 7943282 1.92258597091326e-14 1.48903248125281e-14 3.56433705563421e-15 10000000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 12589250 1.92258615001262e-14 1.48903312938975e-14 3.56433748168165e-15 15848930 1.92258594442573e-14 1.48903266902799e-14 3.5643373379696e-15 19952620 1.92258573325789e-14 1.48903280683092e-14 3.56433696974639e-15 25118860 1.92258582760503e-14 1.48903302897085e-14 3.56433723604628e-15 31622780 1.9225857616247e-14 1.48903235992387e-14 3.56433605976247e-15 39810720 1.92258572545811e-14 1.48903247398668e-14 3.56433621909066e-15 50118720 1.92258587714322e-14 1.48903254813883e-14 3.5643361295889e-15 63095730 1.92258586453439e-14 1.48903258552956e-14 3.56433580847439e-15 79432820 1.92258597091326e-14 1.48903248125281e-14 3.56433705563421e-15 100000000 1.92258534635237e-14 1.48903247996034e-14 3.5643370209708e-15 ngspice-26/tests/hisim/nmos/reference/55_acFreq_COADOV=1.standard0000644000265600020320000002533012264261473024066 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/61_acFreq_CORBNET=1.standard0000644000265600020320000002533012264261473024204 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/15_dcSweep_COISTI=1_NSUBP.standard0000644000265600020320000002211412264261473025236 0ustar andreasadminV(d) I(d) 2.000000e-01 2.776518e-03 3.000000e-01 3.383362e-03 4.000000e-01 3.441007e-03 5.000000e-01 3.484573e-03 6.000000e-01 3.539688e-03 7.000000e-01 3.600423e-03 8.000000e-01 3.662767e-03 9.000000e-01 3.724859e-03 1.000000e+00 3.785942e-03 1.100000e+00 3.845766e-03 1.200000e+00 3.904302e-03 1.300000e+00 3.961609e-03 1.400000e+00 4.017778e-03 1.500000e+00 4.072907e-03 1.600000e+00 4.127091e-03 1.700000e+00 4.180417e-03 1.800000e+00 4.232961e-03 2.000000e-01 2.619845e-03 3.000000e-01 3.688184e-03 4.000000e-01 4.450605e-03 5.000000e-01 4.734741e-03 6.000000e-01 4.854411e-03 7.000000e-01 4.941763e-03 8.000000e-01 5.020659e-03 9.000000e-01 5.095650e-03 1.000000e+00 5.167939e-03 1.100000e+00 5.238034e-03 1.200000e+00 5.306255e-03 1.300000e+00 5.372846e-03 1.400000e+00 5.438004e-03 1.500000e+00 5.501892e-03 1.600000e+00 5.564650e-03 1.700000e+00 5.626393e-03 1.800000e+00 5.687221e-03 2.000000e-01 3.536210e-03 3.000000e-01 4.301845e-03 4.000000e-01 4.984888e-03 5.000000e-01 5.577260e-03 6.000000e-01 5.958840e-03 7.000000e-01 6.154274e-03 8.000000e-01 6.266841e-03 9.000000e-01 6.349930e-03 1.000000e+00 6.421557e-03 1.100000e+00 6.487725e-03 1.200000e+00 6.550702e-03 1.300000e+00 6.611496e-03 1.400000e+00 6.670637e-03 1.500000e+00 6.728445e-03 1.600000e+00 6.785136e-03 1.700000e+00 6.840867e-03 1.800000e+00 6.895758e-03 2.000000e-01 4.704289e-03 3.000000e-01 5.617019e-03 4.000000e-01 6.221398e-03 5.000000e-01 6.718391e-03 6.000000e-01 7.167402e-03 7.000000e-01 7.532337e-03 8.000000e-01 7.781100e-03 9.000000e-01 7.936800e-03 1.000000e+00 8.041628e-03 1.100000e+00 8.122510e-03 1.200000e+00 8.191964e-03 1.300000e+00 8.255443e-03 1.400000e+00 8.315416e-03 1.500000e+00 8.373091e-03 1.600000e+00 8.429121e-03 1.700000e+00 8.483888e-03 1.800000e+00 8.537638e-03 2.000000e-01 5.708686e-03 3.000000e-01 6.946204e-03 4.000000e-01 7.697147e-03 5.000000e-01 8.219985e-03 6.000000e-01 8.636236e-03 7.000000e-01 9.002000e-03 8.000000e-01 9.321898e-03 9.000000e-01 9.579569e-03 1.000000e+00 9.768201e-03 1.100000e+00 9.901746e-03 1.200000e+00 1.000085e-02 1.300000e+00 1.008073e-02 1.400000e+00 1.015003e-02 1.500000e+00 1.021326e-02 1.600000e+00 1.027277e-02 1.700000e+00 1.032981e-02 1.800000e+00 1.038512e-02 2.000000e-01 6.728198e-03 3.000000e-01 8.563255e-03 4.000000e-01 9.716924e-03 5.000000e-01 1.047894e-02 6.000000e-01 1.102053e-02 7.000000e-01 1.143566e-02 8.000000e-01 1.177631e-02 9.000000e-01 1.207146e-02 1.000000e+00 1.233233e-02 1.100000e+00 1.255385e-02 1.200000e+00 1.273596e-02 1.300000e+00 1.288102e-02 1.400000e+00 1.299576e-02 1.500000e+00 1.308896e-02 1.600000e+00 1.316806e-02 1.700000e+00 1.323815e-02 1.800000e+00 1.330246e-02 2.000000e-01 7.186030e-03 3.000000e-01 9.571871e-03 4.000000e-01 1.122103e-02 5.000000e-01 1.235823e-02 6.000000e-01 1.316385e-02 7.000000e-01 1.375800e-02 8.000000e-01 1.421597e-02 9.000000e-01 1.458446e-02 1.000000e+00 1.489268e-02 1.100000e+00 1.515902e-02 1.200000e+00 1.539416e-02 1.300000e+00 1.560163e-02 1.400000e+00 1.577728e-02 1.500000e+00 1.592392e-02 1.600000e+00 1.604739e-02 1.700000e+00 1.615160e-02 1.800000e+00 1.624102e-02 2.000000e-01 2.630710e-03 3.000000e-01 3.385754e-03 4.000000e-01 3.496266e-03 5.000000e-01 3.557088e-03 6.000000e-01 3.621641e-03 7.000000e-01 3.688703e-03 8.000000e-01 3.755929e-03 9.000000e-01 3.822196e-03 1.000000e+00 3.887096e-03 1.100000e+00 3.950556e-03 1.200000e+00 4.012636e-03 1.300000e+00 4.073444e-03 1.400000e+00 4.133100e-03 1.500000e+00 4.191720e-03 1.600000e+00 4.249408e-03 1.700000e+00 4.306258e-03 1.800000e+00 4.362353e-03 2.000000e-01 2.415312e-03 3.000000e-01 3.458638e-03 4.000000e-01 4.267875e-03 5.000000e-01 4.610501e-03 6.000000e-01 4.752515e-03 7.000000e-01 4.849913e-03 8.000000e-01 4.935305e-03 9.000000e-01 5.015465e-03 1.000000e+00 5.092282e-03 1.100000e+00 5.166534e-03 1.200000e+00 5.238671e-03 1.300000e+00 5.309005e-03 1.400000e+00 5.377778e-03 1.500000e+00 5.445185e-03 1.600000e+00 5.511385e-03 1.700000e+00 5.576509e-03 1.800000e+00 5.640671e-03 2.000000e-01 3.059882e-03 3.000000e-01 3.935937e-03 4.000000e-01 4.692176e-03 5.000000e-01 5.362625e-03 6.000000e-01 5.821785e-03 7.000000e-01 6.068568e-03 8.000000e-01 6.210568e-03 9.000000e-01 6.312978e-03 1.000000e+00 6.399439e-03 1.100000e+00 6.478135e-03 1.200000e+00 6.552241e-03 1.300000e+00 6.623204e-03 1.400000e+00 6.691794e-03 1.500000e+00 6.758480e-03 1.600000e+00 6.823579e-03 1.700000e+00 6.887322e-03 1.800000e+00 6.949883e-03 2.000000e-01 3.883827e-03 3.000000e-01 4.956681e-03 4.000000e-01 5.720055e-03 5.000000e-01 6.330379e-03 6.000000e-01 6.870173e-03 7.000000e-01 7.319246e-03 8.000000e-01 7.635340e-03 9.000000e-01 7.837100e-03 1.000000e+00 7.972665e-03 1.100000e+00 8.075708e-03 1.200000e+00 8.162654e-03 1.300000e+00 8.240881e-03 1.400000e+00 8.313819e-03 1.500000e+00 8.383196e-03 1.600000e+00 8.449968e-03 1.700000e+00 8.514715e-03 1.800000e+00 8.577818e-03 2.000000e-01 4.608158e-03 3.000000e-01 5.976526e-03 4.000000e-01 6.923684e-03 5.000000e-01 7.616770e-03 6.000000e-01 8.161797e-03 7.000000e-01 8.623422e-03 8.000000e-01 9.025976e-03 9.000000e-01 9.354980e-03 1.000000e+00 9.599260e-03 1.100000e+00 9.773196e-03 1.200000e+00 9.901567e-03 1.300000e+00 1.000370e-02 1.400000e+00 1.009097e-02 1.500000e+00 1.016942e-02 1.600000e+00 1.024228e-02 1.700000e+00 1.031132e-02 1.800000e+00 1.037759e-02 2.000000e-01 5.391561e-03 3.000000e-01 7.221980e-03 4.000000e-01 8.542586e-03 5.000000e-01 9.502672e-03 6.000000e-01 1.022283e-02 7.000000e-01 1.078503e-02 8.000000e-01 1.124229e-02 9.000000e-01 1.162849e-02 1.000000e+00 1.196237e-02 1.100000e+00 1.224830e-02 1.200000e+00 1.248433e-02 1.300000e+00 1.267231e-02 1.400000e+00 1.282040e-02 1.500000e+00 1.293964e-02 1.600000e+00 1.303964e-02 1.700000e+00 1.312711e-02 1.800000e+00 1.320635e-02 2.000000e-01 5.820947e-03 3.000000e-01 8.037049e-03 4.000000e-01 9.746967e-03 5.000000e-01 1.104290e-02 6.000000e-01 1.202939e-02 7.000000e-01 1.279361e-02 8.000000e-01 1.339991e-02 9.000000e-01 1.389336e-02 1.000000e+00 1.430499e-02 1.100000e+00 1.465598e-02 1.200000e+00 1.495994e-02 1.300000e+00 1.522394e-02 1.400000e+00 1.544974e-02 1.500000e+00 1.563917e-02 1.600000e+00 1.579737e-02 1.700000e+00 1.592981e-02 1.800000e+00 1.604235e-02 2.000000e-01 2.221746e-03 3.000000e-01 3.099937e-03 4.000000e-01 3.309544e-03 5.000000e-01 3.388891e-03 6.000000e-01 3.459121e-03 7.000000e-01 3.528384e-03 8.000000e-01 3.596523e-03 9.000000e-01 3.663200e-03 1.000000e+00 3.728344e-03 1.100000e+00 3.792031e-03 1.200000e+00 3.854394e-03 1.300000e+00 3.915577e-03 1.400000e+00 3.975714e-03 1.500000e+00 4.034928e-03 1.600000e+00 4.093325e-03 1.700000e+00 4.150998e-03 1.800000e+00 4.208029e-03 2.000000e-01 2.044677e-03 3.000000e-01 2.952223e-03 4.000000e-01 3.739191e-03 5.000000e-01 4.158972e-03 6.000000e-01 4.334390e-03 7.000000e-01 4.440275e-03 8.000000e-01 4.527019e-03 9.000000e-01 4.606302e-03 1.000000e+00 4.681432e-03 1.100000e+00 4.753677e-03 1.200000e+00 4.823684e-03 1.300000e+00 4.891857e-03 1.400000e+00 4.958485e-03 1.500000e+00 5.023787e-03 1.600000e+00 5.087935e-03 1.700000e+00 5.151071e-03 1.800000e+00 5.213311e-03 2.000000e-01 2.405365e-03 3.000000e-01 3.263584e-03 4.000000e-01 4.001027e-03 5.000000e-01 4.664868e-03 6.000000e-01 5.168290e-03 7.000000e-01 5.465379e-03 8.000000e-01 5.636390e-03 9.000000e-01 5.754233e-03 1.000000e+00 5.850055e-03 1.100000e+00 5.935315e-03 1.200000e+00 6.014531e-03 1.300000e+00 6.089749e-03 1.400000e+00 6.162041e-03 1.500000e+00 6.232046e-03 1.600000e+00 6.300185e-03 1.700000e+00 6.366756e-03 1.800000e+00 6.431983e-03 2.000000e-01 2.887011e-03 3.000000e-01 3.913444e-03 4.000000e-01 4.723688e-03 5.000000e-01 5.386595e-03 6.000000e-01 5.961618e-03 7.000000e-01 6.453333e-03 8.000000e-01 6.821711e-03 9.000000e-01 7.067665e-03 1.000000e+00 7.233845e-03 1.100000e+00 7.357988e-03 1.200000e+00 7.460605e-03 1.300000e+00 7.551395e-03 1.400000e+00 7.634978e-03 1.500000e+00 7.713714e-03 1.600000e+00 7.788917e-03 1.700000e+00 7.861390e-03 1.800000e+00 7.931659e-03 2.000000e-01 3.339084e-03 3.000000e-01 4.578616e-03 4.000000e-01 5.559168e-03 5.000000e-01 6.339671e-03 6.000000e-01 6.973688e-03 7.000000e-01 7.506176e-03 8.000000e-01 7.965425e-03 9.000000e-01 8.349404e-03 1.000000e+00 8.645025e-03 1.100000e+00 8.860807e-03 1.200000e+00 9.020968e-03 1.300000e+00 9.147461e-03 1.400000e+00 9.254233e-03 1.500000e+00 9.349059e-03 1.600000e+00 9.436170e-03 1.700000e+00 9.517942e-03 1.800000e+00 9.595781e-03 2.000000e-01 3.883695e-03 3.000000e-01 5.432115e-03 4.000000e-01 6.699412e-03 5.000000e-01 7.724536e-03 6.000000e-01 8.555558e-03 7.000000e-01 9.235807e-03 8.000000e-01 9.800231e-03 9.000000e-01 1.027611e-02 1.000000e+00 1.068272e-02 1.100000e+00 1.103015e-02 1.200000e+00 1.132057e-02 1.300000e+00 1.155531e-02 1.400000e+00 1.174212e-02 1.500000e+00 1.189295e-02 1.600000e+00 1.201899e-02 1.700000e+00 1.212849e-02 1.800000e+00 1.222686e-02 2.000000e-01 4.253904e-03 3.000000e-01 6.054562e-03 4.000000e-01 7.588851e-03 5.000000e-01 8.870270e-03 6.000000e-01 9.931537e-03 7.000000e-01 1.081056e-02 8.000000e-01 1.154258e-02 9.000000e-01 1.215712e-02 1.000000e+00 1.267774e-02 1.100000e+00 1.312277e-02 1.200000e+00 1.350572e-02 1.300000e+00 1.383548e-02 1.400000e+00 1.411760e-02 1.500000e+00 1.435637e-02 1.600000e+00 1.455658e-02 1.700000e+00 1.472448e-02 1.800000e+00 1.486704e-02 ngspice-26/tests/hisim/nmos/reference/23_dcSweep_CODFM=0.standard0000644000265600020320000002211412264261473024123 0ustar andreasadminV(d) I(d) 2.000000e-01 1.031340e-06 3.000000e-01 1.187668e-06 4.000000e-01 1.363411e-06 5.000000e-01 1.553811e-06 6.000000e-01 1.754026e-06 7.000000e-01 1.961205e-06 8.000000e-01 2.173905e-06 9.000000e-01 2.391410e-06 1.000000e+00 2.613350e-06 1.100000e+00 2.839516e-06 1.200000e+00 3.069773e-06 1.300000e+00 3.304026e-06 1.400000e+00 3.542204e-06 1.500000e+00 3.784246e-06 1.600000e+00 4.030100e-06 1.700000e+00 4.279721e-06 1.800000e+00 4.533070e-06 2.000000e-01 3.625488e-04 3.000000e-01 3.836434e-04 4.000000e-01 4.033947e-04 5.000000e-01 4.229012e-04 6.000000e-01 4.423753e-04 7.000000e-01 4.618402e-04 8.000000e-01 4.813047e-04 9.000000e-01 5.007840e-04 1.000000e+00 5.202960e-04 1.100000e+00 5.398574e-04 1.200000e+00 5.594823e-04 1.300000e+00 5.791821e-04 1.400000e+00 5.989658e-04 1.500000e+00 6.188407e-04 1.600000e+00 6.388122e-04 1.700000e+00 6.588847e-04 1.800000e+00 6.790616e-04 2.000000e-01 1.846855e-03 3.000000e-01 1.974260e-03 4.000000e-01 2.031600e-03 5.000000e-01 2.082672e-03 6.000000e-01 2.130364e-03 7.000000e-01 2.175738e-03 8.000000e-01 2.219464e-03 9.000000e-01 2.261982e-03 1.000000e+00 2.303587e-03 1.100000e+00 2.344487e-03 1.200000e+00 2.384830e-03 1.300000e+00 2.424728e-03 1.400000e+00 2.464261e-03 1.500000e+00 2.503492e-03 1.600000e+00 2.542472e-03 1.700000e+00 2.581239e-03 1.800000e+00 2.619826e-03 2.000000e-01 3.343576e-03 3.000000e-01 3.817799e-03 4.000000e-01 4.017737e-03 5.000000e-01 4.104539e-03 6.000000e-01 4.168574e-03 7.000000e-01 4.228356e-03 8.000000e-01 4.284866e-03 9.000000e-01 4.338706e-03 1.000000e+00 4.390424e-03 1.100000e+00 4.440474e-03 1.200000e+00 4.489207e-03 1.300000e+00 4.536889e-03 1.400000e+00 4.583720e-03 1.500000e+00 4.629852e-03 1.600000e+00 4.675400e-03 1.700000e+00 4.720456e-03 1.800000e+00 4.765089e-03 2.000000e-01 4.575745e-03 3.000000e-01 5.436588e-03 4.000000e-01 5.883336e-03 5.000000e-01 6.122649e-03 6.000000e-01 6.251933e-03 7.000000e-01 6.328676e-03 8.000000e-01 6.392836e-03 9.000000e-01 6.453950e-03 1.000000e+00 6.512526e-03 1.100000e+00 6.568841e-03 1.200000e+00 6.623216e-03 1.300000e+00 6.675967e-03 1.400000e+00 6.727368e-03 1.500000e+00 6.777651e-03 1.600000e+00 6.827000e-03 1.700000e+00 6.875564e-03 1.800000e+00 6.923462e-03 2.000000e-01 5.870243e-03 3.000000e-01 7.364527e-03 4.000000e-01 8.250873e-03 5.000000e-01 8.791206e-03 6.000000e-01 9.132925e-03 7.000000e-01 9.355002e-03 8.000000e-01 9.502595e-03 9.000000e-01 9.604011e-03 1.000000e+00 9.676653e-03 1.100000e+00 9.739827e-03 1.200000e+00 9.800793e-03 1.300000e+00 9.859958e-03 1.400000e+00 9.917427e-03 1.500000e+00 9.973346e-03 1.600000e+00 1.002789e-02 1.700000e+00 1.008122e-02 1.800000e+00 1.013349e-02 2.000000e-01 6.544617e-03 3.000000e-01 8.629425e-03 4.000000e-01 1.002415e-02 5.000000e-01 1.095009e-02 6.000000e-01 1.157533e-02 7.000000e-01 1.200797e-02 8.000000e-01 1.231437e-02 9.000000e-01 1.253558e-02 1.000000e+00 1.269838e-02 1.100000e+00 1.282132e-02 1.200000e+00 1.291696e-02 1.300000e+00 1.299134e-02 1.400000e+00 1.305478e-02 1.500000e+00 1.311590e-02 1.600000e+00 1.317555e-02 1.700000e+00 1.323383e-02 1.800000e+00 1.329082e-02 2.000000e-01 6.168441e-06 3.000000e-01 6.992527e-06 4.000000e-01 7.898833e-06 5.000000e-01 8.873147e-06 6.000000e-01 9.893832e-06 7.000000e-01 1.094768e-05 8.000000e-01 1.202799e-05 9.000000e-01 1.313151e-05 1.000000e+00 1.425659e-05 1.100000e+00 1.540231e-05 1.200000e+00 1.656813e-05 1.300000e+00 1.775364e-05 1.400000e+00 1.895856e-05 1.500000e+00 2.018263e-05 1.600000e+00 2.142567e-05 1.700000e+00 2.268746e-05 1.800000e+00 2.396787e-05 2.000000e-01 3.314500e-04 3.000000e-01 3.516443e-04 4.000000e-01 3.692608e-04 5.000000e-01 3.862621e-04 6.000000e-01 4.030308e-04 7.000000e-01 4.196770e-04 8.000000e-01 4.362533e-04 9.000000e-01 4.527971e-04 1.000000e+00 4.693380e-04 1.100000e+00 4.858992e-04 1.200000e+00 5.024990e-04 1.300000e+00 5.191518e-04 1.400000e+00 5.358687e-04 1.500000e+00 5.526585e-04 1.600000e+00 5.695281e-04 1.700000e+00 5.864832e-04 1.800000e+00 6.035282e-04 2.000000e-01 1.414259e-03 3.000000e-01 1.567979e-03 4.000000e-01 1.628986e-03 5.000000e-01 1.678046e-03 6.000000e-01 1.722925e-03 7.000000e-01 1.764987e-03 8.000000e-01 1.805080e-03 9.000000e-01 1.843763e-03 1.000000e+00 1.881413e-03 1.100000e+00 1.918285e-03 1.200000e+00 1.954559e-03 1.300000e+00 1.990363e-03 1.400000e+00 2.025794e-03 1.500000e+00 2.060923e-03 1.600000e+00 2.095806e-03 1.700000e+00 2.130488e-03 1.800000e+00 2.165002e-03 2.000000e-01 2.542714e-03 3.000000e-01 3.063220e-03 4.000000e-01 3.310856e-03 5.000000e-01 3.420396e-03 6.000000e-01 3.491904e-03 7.000000e-01 3.556333e-03 8.000000e-01 3.616445e-03 9.000000e-01 3.673005e-03 1.000000e+00 3.726718e-03 1.100000e+00 3.778185e-03 1.200000e+00 3.827884e-03 1.300000e+00 3.876176e-03 1.400000e+00 3.923336e-03 1.500000e+00 3.969571e-03 1.600000e+00 4.015041e-03 1.700000e+00 4.059867e-03 1.800000e+00 4.104148e-03 2.000000e-01 3.486631e-03 3.000000e-01 4.388014e-03 4.000000e-01 4.924867e-03 5.000000e-01 5.232529e-03 6.000000e-01 5.399700e-03 7.000000e-01 5.495663e-03 8.000000e-01 5.570693e-03 9.000000e-01 5.640525e-03 1.000000e+00 5.706719e-03 1.100000e+00 5.769675e-03 1.200000e+00 5.829825e-03 1.300000e+00 5.887607e-03 1.400000e+00 5.943411e-03 1.500000e+00 5.997567e-03 1.600000e+00 6.050344e-03 1.700000e+00 6.101961e-03 1.800000e+00 6.152594e-03 2.000000e-01 4.523458e-03 3.000000e-01 5.961592e-03 4.000000e-01 6.939779e-03 5.000000e-01 7.596286e-03 6.000000e-01 8.035751e-03 7.000000e-01 8.327590e-03 8.000000e-01 8.519006e-03 9.000000e-01 8.645414e-03 1.000000e+00 8.735120e-03 1.100000e+00 8.810856e-03 1.200000e+00 8.882452e-03 1.300000e+00 8.951286e-03 1.400000e+00 9.017592e-03 1.500000e+00 9.081583e-03 1.600000e+00 9.143495e-03 1.700000e+00 9.203569e-03 1.800000e+00 9.262028e-03 2.000000e-01 5.146662e-03 3.000000e-01 7.031863e-03 4.000000e-01 8.439639e-03 5.000000e-01 9.465363e-03 6.000000e-01 1.020835e-02 7.000000e-01 1.074777e-02 8.000000e-01 1.114061e-02 9.000000e-01 1.142684e-02 1.000000e+00 1.163539e-02 1.100000e+00 1.178842e-02 1.200000e+00 1.190317e-02 1.300000e+00 1.199275e-02 1.400000e+00 1.206906e-02 1.500000e+00 1.214087e-02 1.600000e+00 1.221034e-02 1.700000e+00 1.227777e-02 1.800000e+00 1.234331e-02 2.000000e-01 2.757247e-05 3.000000e-01 3.088943e-05 4.000000e-01 3.432614e-05 5.000000e-01 3.796733e-05 6.000000e-01 4.175784e-05 7.000000e-01 4.565691e-05 8.000000e-01 4.964358e-05 9.000000e-01 5.370790e-05 1.000000e+00 5.784506e-05 1.100000e+00 6.205260e-05 1.200000e+00 6.632908e-05 1.300000e+00 7.067356e-05 1.400000e+00 7.508532e-05 1.500000e+00 7.956378e-05 1.600000e+00 8.410843e-05 1.700000e+00 8.871881e-05 1.800000e+00 9.339451e-05 2.000000e-01 3.233979e-04 3.000000e-01 3.491751e-04 4.000000e-01 3.669805e-04 5.000000e-01 3.832630e-04 6.000000e-01 3.989944e-04 7.000000e-01 4.144367e-04 8.000000e-01 4.297076e-04 9.000000e-01 4.448775e-04 1.000000e+00 4.599945e-04 1.100000e+00 4.750927e-04 1.200000e+00 4.901974e-04 1.300000e+00 5.053275e-04 1.400000e+00 5.204977e-04 1.500000e+00 5.357192e-04 1.600000e+00 5.510012e-04 1.700000e+00 5.663506e-04 1.800000e+00 5.817735e-04 2.000000e-01 1.006788e-03 3.000000e-01 1.176557e-03 4.000000e-01 1.246390e-03 5.000000e-01 1.291247e-03 6.000000e-01 1.330236e-03 7.000000e-01 1.366185e-03 8.000000e-01 1.400047e-03 9.000000e-01 1.432420e-03 1.000000e+00 1.463716e-03 1.100000e+00 1.494215e-03 1.200000e+00 1.524116e-03 1.300000e+00 1.553558e-03 1.400000e+00 1.582644e-03 1.500000e+00 1.611452e-03 1.600000e+00 1.640038e-03 1.700000e+00 1.668448e-03 1.800000e+00 1.696719e-03 2.000000e-01 1.720602e-03 3.000000e-01 2.182212e-03 4.000000e-01 2.443001e-03 5.000000e-01 2.573625e-03 6.000000e-01 2.648907e-03 7.000000e-01 2.710122e-03 8.000000e-01 2.766323e-03 9.000000e-01 2.818908e-03 1.000000e+00 2.868539e-03 1.100000e+00 2.915786e-03 1.200000e+00 2.961129e-03 1.300000e+00 3.004954e-03 1.400000e+00 3.047557e-03 1.500000e+00 3.089169e-03 1.600000e+00 3.129968e-03 1.700000e+00 3.170092e-03 1.800000e+00 3.209650e-03 2.000000e-01 2.344551e-03 3.000000e-01 3.101925e-03 4.000000e-01 3.621184e-03 5.000000e-01 3.954178e-03 6.000000e-01 4.151658e-03 7.000000e-01 4.267092e-03 8.000000e-01 4.348380e-03 9.000000e-01 4.419815e-03 1.000000e+00 4.486875e-03 1.100000e+00 4.550435e-03 1.200000e+00 4.610906e-03 1.300000e+00 4.668696e-03 1.400000e+00 4.724200e-03 1.500000e+00 4.777773e-03 1.600000e+00 4.829716e-03 1.700000e+00 4.880282e-03 1.800000e+00 4.929678e-03 2.000000e-01 3.084402e-03 3.000000e-01 4.235437e-03 4.000000e-01 5.122679e-03 5.000000e-01 5.785658e-03 6.000000e-01 6.267956e-03 7.000000e-01 6.608144e-03 8.000000e-01 6.840111e-03 9.000000e-01 6.995611e-03 1.000000e+00 7.104437e-03 1.100000e+00 7.191523e-03 1.200000e+00 7.270752e-03 1.300000e+00 7.346161e-03 1.400000e+00 7.418531e-03 1.500000e+00 7.488125e-03 1.600000e+00 7.555176e-03 1.700000e+00 7.619929e-03 1.800000e+00 7.682628e-03 2.000000e-01 3.603565e-03 3.000000e-01 5.071371e-03 4.000000e-01 6.281326e-03 5.000000e-01 7.251718e-03 6.000000e-01 8.015715e-03 7.000000e-01 8.608979e-03 8.000000e-01 9.063670e-03 9.000000e-01 9.407070e-03 1.000000e+00 9.662614e-03 1.100000e+00 9.851179e-03 1.200000e+00 9.991500e-03 1.300000e+00 1.010011e-02 1.400000e+00 1.019103e-02 1.500000e+00 1.027396e-02 1.600000e+00 1.035306e-02 1.700000e+00 1.042945e-02 1.800000e+00 1.050344e-02 ngspice-26/tests/hisim/nmos/reference/16_dcSweep_WPE.standard0000644000265600020320000002211412264261473023553 0ustar andreasadminV(d) I(d) 2.000000e-01 1.012973e-06 3.000000e-01 1.166713e-06 4.000000e-01 1.339585e-06 5.000000e-01 1.526887e-06 6.000000e-01 1.723849e-06 7.000000e-01 1.927663e-06 8.000000e-01 2.136907e-06 9.000000e-01 2.350878e-06 1.000000e+00 2.569210e-06 1.100000e+00 2.791696e-06 1.200000e+00 3.018206e-06 1.300000e+00 3.248645e-06 1.400000e+00 3.482942e-06 1.500000e+00 3.721037e-06 1.600000e+00 3.962881e-06 1.700000e+00 4.208429e-06 1.800000e+00 4.457640e-06 2.000000e-01 3.599078e-04 3.000000e-01 3.808744e-04 4.000000e-01 4.005148e-04 5.000000e-01 4.199177e-04 6.000000e-01 4.392918e-04 7.000000e-01 4.586591e-04 8.000000e-01 4.780277e-04 9.000000e-01 4.974125e-04 1.000000e+00 5.168310e-04 1.100000e+00 5.362997e-04 1.200000e+00 5.558325e-04 1.300000e+00 5.754408e-04 1.400000e+00 5.951335e-04 1.500000e+00 6.149176e-04 1.600000e+00 6.347986e-04 1.700000e+00 6.547808e-04 1.800000e+00 6.748676e-04 2.000000e-01 1.842646e-03 3.000000e-01 1.969356e-03 4.000000e-01 2.026573e-03 5.000000e-01 2.077563e-03 6.000000e-01 2.125183e-03 7.000000e-01 2.170492e-03 8.000000e-01 2.214161e-03 9.000000e-01 2.256625e-03 1.000000e+00 2.298181e-03 1.100000e+00 2.339034e-03 1.200000e+00 2.379332e-03 1.300000e+00 2.419187e-03 1.400000e+00 2.458678e-03 1.500000e+00 2.497869e-03 1.600000e+00 2.536810e-03 1.700000e+00 2.575539e-03 1.800000e+00 2.614088e-03 2.000000e-01 3.339836e-03 3.000000e-01 3.813156e-03 4.000000e-01 4.012496e-03 5.000000e-01 4.099038e-03 6.000000e-01 4.163026e-03 7.000000e-01 4.222769e-03 8.000000e-01 4.279243e-03 9.000000e-01 4.333048e-03 1.000000e+00 4.384736e-03 1.100000e+00 4.434757e-03 1.200000e+00 4.483465e-03 1.300000e+00 4.531123e-03 1.400000e+00 4.577932e-03 1.500000e+00 4.624043e-03 1.600000e+00 4.669571e-03 1.700000e+00 4.714607e-03 1.800000e+00 4.759222e-03 2.000000e-01 4.572546e-03 3.000000e-01 5.432443e-03 4.000000e-01 5.878586e-03 5.000000e-01 6.117462e-03 6.000000e-01 6.246427e-03 7.000000e-01 6.323023e-03 8.000000e-01 6.387158e-03 9.000000e-01 6.448252e-03 1.000000e+00 6.506807e-03 1.100000e+00 6.563101e-03 1.200000e+00 6.617457e-03 1.300000e+00 6.670189e-03 1.400000e+00 6.721574e-03 1.500000e+00 6.771841e-03 1.600000e+00 6.821175e-03 1.700000e+00 6.869725e-03 1.800000e+00 6.917610e-03 2.000000e-01 5.867904e-03 3.000000e-01 7.361178e-03 4.000000e-01 8.246812e-03 5.000000e-01 8.786653e-03 6.000000e-01 9.128011e-03 7.000000e-01 9.349804e-03 8.000000e-01 9.497172e-03 9.000000e-01 9.598405e-03 1.000000e+00 9.670935e-03 1.100000e+00 9.734091e-03 1.200000e+00 9.795046e-03 1.300000e+00 9.854198e-03 1.400000e+00 9.911654e-03 1.500000e+00 9.967561e-03 1.600000e+00 1.002209e-02 1.700000e+00 1.007541e-02 1.800000e+00 1.012767e-02 2.000000e-01 6.543037e-03 3.000000e-01 8.626920e-03 4.000000e-01 1.002086e-02 5.000000e-01 1.094621e-02 6.000000e-01 1.157100e-02 7.000000e-01 1.200330e-02 8.000000e-01 1.230943e-02 9.000000e-01 1.253042e-02 1.000000e+00 1.269304e-02 1.100000e+00 1.281583e-02 1.200000e+00 1.291134e-02 1.300000e+00 1.298559e-02 1.400000e+00 1.304901e-02 1.500000e+00 1.311012e-02 1.600000e+00 1.316976e-02 1.700000e+00 1.322803e-02 1.800000e+00 1.328501e-02 2.000000e-01 6.087763e-06 3.000000e-01 6.902271e-06 4.000000e-01 7.798325e-06 5.000000e-01 8.761723e-06 6.000000e-01 9.771016e-06 7.000000e-01 1.081312e-05 8.000000e-01 1.188140e-05 9.000000e-01 1.297263e-05 1.000000e+00 1.408518e-05 1.100000e+00 1.521814e-05 1.200000e+00 1.637097e-05 1.300000e+00 1.754326e-05 1.400000e+00 1.873474e-05 1.500000e+00 1.994516e-05 1.600000e+00 2.117431e-05 1.700000e+00 2.242202e-05 1.800000e+00 2.368811e-05 2.000000e-01 3.293782e-04 3.000000e-01 3.494482e-04 4.000000e-01 3.669694e-04 5.000000e-01 3.838843e-04 6.000000e-01 4.005710e-04 7.000000e-01 4.171380e-04 8.000000e-01 4.336369e-04 9.000000e-01 4.501046e-04 1.000000e+00 4.665703e-04 1.100000e+00 4.830571e-04 1.200000e+00 4.995829e-04 1.300000e+00 5.161621e-04 1.400000e+00 5.328057e-04 1.500000e+00 5.495223e-04 1.600000e+00 5.663190e-04 1.700000e+00 5.832011e-04 1.800000e+00 6.001731e-04 2.000000e-01 1.410954e-03 3.000000e-01 1.563857e-03 4.000000e-01 1.624643e-03 5.000000e-01 1.673586e-03 6.000000e-01 1.718364e-03 7.000000e-01 1.760337e-03 8.000000e-01 1.800350e-03 9.000000e-01 1.838960e-03 1.000000e+00 1.876541e-03 1.100000e+00 1.913347e-03 1.200000e+00 1.949559e-03 1.300000e+00 1.985303e-03 1.400000e+00 2.020676e-03 1.500000e+00 2.055749e-03 1.600000e+00 2.090578e-03 1.700000e+00 2.125205e-03 1.800000e+00 2.159667e-03 2.000000e-01 2.539708e-03 3.000000e-01 3.059156e-03 4.000000e-01 3.306011e-03 5.000000e-01 3.415154e-03 6.000000e-01 3.486550e-03 7.000000e-01 3.550905e-03 8.000000e-01 3.610949e-03 9.000000e-01 3.667446e-03 1.000000e+00 3.721100e-03 1.100000e+00 3.772515e-03 1.200000e+00 3.822165e-03 1.300000e+00 3.870413e-03 1.400000e+00 3.917531e-03 1.500000e+00 3.963726e-03 1.600000e+00 4.009158e-03 1.700000e+00 4.053948e-03 1.800000e+00 4.098194e-03 2.000000e-01 3.484043e-03 3.000000e-01 4.384405e-03 4.000000e-01 4.920474e-03 5.000000e-01 5.227510e-03 6.000000e-01 5.394218e-03 7.000000e-01 5.489952e-03 8.000000e-01 5.564914e-03 9.000000e-01 5.634700e-03 1.000000e+00 5.700849e-03 1.100000e+00 5.763761e-03 1.200000e+00 5.823871e-03 1.300000e+00 5.881615e-03 1.400000e+00 5.937384e-03 1.500000e+00 5.991508e-03 1.600000e+00 6.044255e-03 1.700000e+00 6.095844e-03 1.800000e+00 6.146450e-03 2.000000e-01 4.521501e-03 3.000000e-01 5.958691e-03 4.000000e-01 6.936099e-03 5.000000e-01 7.591987e-03 6.000000e-01 8.030950e-03 7.000000e-01 8.322366e-03 8.000000e-01 8.513434e-03 9.000000e-01 8.639579e-03 1.000000e+00 8.729134e-03 1.100000e+00 8.804822e-03 1.200000e+00 8.876390e-03 1.300000e+00 8.945198e-03 1.400000e+00 9.011477e-03 1.500000e+00 9.075442e-03 1.600000e+00 9.137330e-03 1.700000e+00 9.197381e-03 1.800000e+00 9.255818e-03 2.000000e-01 5.145254e-03 3.000000e-01 7.029649e-03 4.000000e-01 8.436677e-03 5.000000e-01 9.461761e-03 6.000000e-01 1.020422e-02 7.000000e-01 1.074320e-02 8.000000e-01 1.113567e-02 9.000000e-01 1.142158e-02 1.000000e+00 1.162986e-02 1.100000e+00 1.178265e-02 1.200000e+00 1.189721e-02 1.300000e+00 1.198666e-02 1.400000e+00 1.206291e-02 1.500000e+00 1.213471e-02 1.600000e+00 1.220416e-02 1.700000e+00 1.227157e-02 1.800000e+00 1.233709e-02 2.000000e-01 2.732640e-05 3.000000e-01 3.061816e-05 4.000000e-01 3.403045e-05 5.000000e-01 3.764638e-05 6.000000e-01 4.141086e-05 7.000000e-01 4.528329e-05 8.000000e-01 4.924282e-05 9.000000e-01 5.327951e-05 1.000000e+00 5.738858e-05 1.100000e+00 6.156757e-05 1.200000e+00 6.581505e-05 1.300000e+00 7.013007e-05 1.400000e+00 7.451191e-05 1.500000e+00 7.896000e-05 1.600000e+00 8.347383e-05 1.700000e+00 8.805293e-05 1.800000e+00 9.269690e-05 2.000000e-01 3.218291e-04 3.000000e-01 3.474409e-04 4.000000e-01 3.651573e-04 5.000000e-01 3.813664e-04 6.000000e-01 3.970306e-04 7.000000e-01 4.124092e-04 8.000000e-01 4.276187e-04 9.000000e-01 4.427287e-04 1.000000e+00 4.577868e-04 1.100000e+00 4.728268e-04 1.200000e+00 4.878739e-04 1.300000e+00 5.029468e-04 1.400000e+00 5.180600e-04 1.500000e+00 5.332248e-04 1.600000e+00 5.484500e-04 1.700000e+00 5.637429e-04 1.800000e+00 5.791091e-04 2.000000e-01 1.004599e-03 3.000000e-01 1.173612e-03 4.000000e-01 1.243113e-03 5.000000e-01 1.287829e-03 6.000000e-01 1.326710e-03 7.000000e-01 1.362565e-03 8.000000e-01 1.396341e-03 9.000000e-01 1.428637e-03 1.000000e+00 1.459859e-03 1.100000e+00 1.490290e-03 1.200000e+00 1.520125e-03 1.300000e+00 1.549504e-03 1.400000e+00 1.578529e-03 1.500000e+00 1.607276e-03 1.600000e+00 1.635804e-03 1.700000e+00 1.664157e-03 1.800000e+00 1.692372e-03 2.000000e-01 1.718543e-03 3.000000e-01 2.179231e-03 4.000000e-01 2.439248e-03 5.000000e-01 2.569372e-03 6.000000e-01 2.644443e-03 7.000000e-01 2.705548e-03 8.000000e-01 2.761656e-03 9.000000e-01 2.814155e-03 1.000000e+00 2.863706e-03 1.100000e+00 2.910878e-03 1.200000e+00 2.956153e-03 1.300000e+00 2.999913e-03 1.400000e+00 3.042456e-03 1.500000e+00 3.084010e-03 1.600000e+00 3.124755e-03 1.700000e+00 3.164827e-03 1.800000e+00 3.204335e-03 2.000000e-01 2.342727e-03 3.000000e-01 3.099226e-03 4.000000e-01 3.617698e-03 5.000000e-01 3.949999e-03 6.000000e-01 4.146924e-03 7.000000e-01 4.262016e-03 8.000000e-01 4.343154e-03 9.000000e-01 4.414504e-03 1.000000e+00 4.481490e-03 1.100000e+00 4.544981e-03 1.200000e+00 4.605385e-03 1.300000e+00 4.663111e-03 1.400000e+00 4.718556e-03 1.500000e+00 4.772073e-03 1.600000e+00 4.823964e-03 1.700000e+00 4.874481e-03 1.800000e+00 4.923830e-03 2.000000e-01 3.082940e-03 3.000000e-01 4.233208e-03 4.000000e-01 5.119729e-03 5.000000e-01 5.782052e-03 6.000000e-01 6.263759e-03 7.000000e-01 6.603415e-03 8.000000e-01 6.834923e-03 9.000000e-01 6.990065e-03 1.000000e+00 7.098663e-03 1.100000e+00 7.185637e-03 1.200000e+00 7.264803e-03 1.300000e+00 7.340160e-03 1.400000e+00 7.412480e-03 1.500000e+00 7.482026e-03 1.600000e+00 7.549029e-03 1.700000e+00 7.613737e-03 1.800000e+00 7.676394e-03 2.000000e-01 3.602428e-03 3.000000e-01 5.069590e-03 4.000000e-01 6.278903e-03 5.000000e-01 7.248687e-03 6.000000e-01 8.012124e-03 7.000000e-01 8.604879e-03 8.000000e-01 9.059105e-03 9.000000e-01 9.402081e-03 1.000000e+00 9.657247e-03 1.100000e+00 9.845488e-03 1.200000e+00 9.985551e-03 1.300000e+00 1.009398e-02 1.400000e+00 1.018480e-02 1.500000e+00 1.026767e-02 1.600000e+00 1.034673e-02 1.700000e+00 1.042308e-02 1.800000e+00 1.049703e-02 ngspice-26/tests/hisim/nmos/reference/80_noise_COIGN=0_T150.standard0000644000265600020320000000353212264261473024374 0ustar andreasadminFreq N(g) 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 1000 0 1258.925 0 1584.893 0 1995.262 0 2511.886 0 3162.278 0 3981.072 0 5011.872 0 6309.573 0 7943.282 0 10000 0 12589.25 0 15848.93 0 19952.62 0 25118.86 0 31622.78 0 39810.72 0 50118.72 0 63095.73 0 79432.82 0 100000 0 125892.5 0 158489.3 0 199526.2 0 251188.6 0 316227.8 0 398107.2 0 501187.2 0 630957.3 0 794328.2 0 1000000 0 1258925 0 1584893 0 1995262 0 2511886 0 3162278 0 3981072 0 5011872 0 6309573 0 7943282 0 10000000 0 12589250 0 15848930 0 19952620 0 25118860 0 31622780 0 39810720 0 50118720 0 63095730 0 79432820 0 100000000 0 125892500 0 158489300 0 199526200 0 251188600 0 316227800 0 398107200 0 501187200 0 630957300 0 794328200 0 1000000000 0 1258925000 0 1584893000 0 1995262000 0 2511886000 0 3162278000 0 3981072000 0 5011872000 0 6309573000 0 7943282000 0 10000000000 0 12589250000 0 15848930000 0 19952620000 0 25118860000 0 31622780000 0 39810720000 0 50118720000 0 63095730000 0 79432820000 0 100000000000 0 ngspice-26/tests/hisim/nmos/reference/48_acFreq_COIIGS=0.standard0000644000265600020320000002533012264261473024071 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/8_dcSweep_COIIGS=0.standard0000644000265600020320000002211412264261473024173 0ustar andreasadminV(d) I(g) 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 2.000000e-01 0.000000e+00 3.000000e-01 0.000000e+00 4.000000e-01 0.000000e+00 5.000000e-01 0.000000e+00 6.000000e-01 0.000000e+00 7.000000e-01 0.000000e+00 8.000000e-01 0.000000e+00 9.000000e-01 0.000000e+00 1.000000e+00 0.000000e+00 1.100000e+00 0.000000e+00 1.200000e+00 0.000000e+00 1.300000e+00 0.000000e+00 1.400000e+00 0.000000e+00 1.500000e+00 0.000000e+00 1.600000e+00 0.000000e+00 1.700000e+00 0.000000e+00 1.800000e+00 0.000000e+00 ngspice-26/tests/hisim/nmos/reference/37_acVd_CORSRD=-1_PT.standard0000644000265600020320000000715112264261473024244 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.2 2.981183e-04 6.624533e-03 4.50667722020252e-15 1.91789951927966e-14 0.3 7.228280e-04 5.802760e-03 4.87705832048482e-15 1.80057748751421e-14 0.4 1.521539e-03 4.403135e-03 5.46649948007859e-15 1.58876343016463e-14 0.5 2.631484e-03 2.650752e-03 6.16153666826294e-15 1.26209334171728e-14 0.6 3.641972e-03 1.230120e-03 6.67211580650447e-15 8.26135423679771e-15 0.7 4.284295e-03 4.380828e-04 6.72746982149181e-15 4.89639032571905e-15 0.8 4.436893e-03 2.718120e-04 6.68556681014639e-15 4.3112261672833e-15 0.9 4.463202e-03 2.505177e-04 6.67079580614707e-15 4.23409814640055e-15 1 4.485262e-03 2.346918e-04 6.655578802027e-15 4.16623812802715e-15 1.1 4.504190e-03 2.223320e-04 6.6401987978628e-15 4.09812310958471e-15 1.2 4.520184e-03 2.128538e-04 6.62500979375031e-15 4.02666009023579e-15 1.3 4.533800e-03 2.055653e-04 6.6100267896936e-15 3.94969706939772e-15 1.4 4.545603e-03 1.998828e-04 6.59482878557867e-15 3.8603610452096e-15 1.5 4.556053e-03 1.953670e-04 6.57930678137602e-15 3.75822001755447e-15 1.6 4.565494e-03 1.917033e-04 6.56367877714467e-15 3.64867198789386e-15 1.7 4.574179e-03 1.886706e-04 6.54826877297234e-15 3.53879695814472e-15 1.8 4.582287e-03 1.861137e-04 6.53294176882249e-15 3.42723292793827e-15 0.2 3.984419e-04 5.862564e-03 5.1700093998026e-15 1.80146948775572e-14 0.3 8.332407e-04 5.062916e-03 5.52423249571005e-15 1.6783164544115e-14 0.4 1.510161e-03 3.925654e-03 6.00231662515342e-15 1.48565440224741e-14 0.5 2.378976e-03 2.601972e-03 6.52736276731195e-15 1.20501832626397e-14 0.6 3.259114e-03 1.395236e-03 6.93603787796252e-15 8.24708723293486e-15 0.7 3.921029e-03 5.803831e-04 7.00269989601155e-15 5.14546739315775e-15 0.8 4.154284e-03 3.218400e-04 6.95092688199378e-15 4.34316617593119e-15 0.9 4.199923e-03 2.828464e-04 6.92651387538386e-15 4.21807614206252e-15 1 4.231139e-03 2.610418e-04 6.90404086929919e-15 4.13711112014089e-15 1.1 4.258617e-03 2.435140e-04 6.88147086318826e-15 4.05902909899984e-15 1.2 4.282235e-03 2.297868e-04 6.85950085723979e-15 3.98161607803993e-15 1.3 4.302424e-03 2.191625e-04 6.83840485152795e-15 3.90358905691377e-15 1.4 4.319851e-03 2.108893e-04 6.81783984595989e-15 3.81793803372338e-15 1.5 4.335141e-03 2.043486e-04 6.79764984049336e-15 3.72349500815252e-15 1.6 4.348794e-03 1.990805e-04 6.77783083512727e-15 3.6225709808269e-15 1.7 4.361190e-03 1.947557e-04 6.75852082989901e-15 3.51999895305508e-15 1.8 4.372608e-03 1.911409e-04 6.73980882483265e-15 3.41939592581637e-15 0.2 4.823963e-04 5.243518e-03 5.82218457638188e-15 1.62468943989176e-14 0.3 8.762399e-04 4.264966e-03 6.31398870953999e-15 1.52521941295981e-14 0.4 1.405987e-03 3.352197e-03 6.75151982800345e-15 1.36100436849787e-14 0.5 2.044322e-03 2.393637e-03 7.17796794346614e-15 1.12951030581984e-14 0.6 2.719598e-03 1.475311e-03 7.52467003733725e-15 8.25217423431218e-15 0.7 3.298284e-03 7.559779e-04 7.62785706527559e-15 5.53836549953663e-15 0.8 3.608915e-03 4.025429e-04 7.57934605214102e-15 4.4498112048058e-15 0.9 3.702410e-03 3.115645e-04 7.54115704180118e-15 4.18876413412617e-15 1 3.743193e-03 2.821260e-04 7.51230103398829e-15 4.08474410596229e-15 1.1 3.776566e-03 2.615221e-04 7.48427802640093e-15 3.99882408269907e-15 1.2 3.806331e-03 2.447403e-04 7.45678501895708e-15 3.91767106072653e-15 1.3 3.832574e-03 2.312272e-04 7.43033101179454e-15 3.83990503967105e-15 1.4 3.855606e-03 2.204519e-04 7.40482300488814e-15 3.75816301753904e-15 1.5 3.875926e-03 2.118395e-04 7.38023199823002e-15 3.67119599399233e-15 1.6 3.894040e-03 2.048885e-04 7.35650899180691e-15 3.57966296920937e-15 1.7 3.910380e-03 1.992045e-04 7.33364198561557e-15 3.48585594381071e-15 1.8 3.925296e-03 1.944901e-04 7.31165297966195e-15 3.39284291862703e-15 ngspice-26/tests/hisim/nmos/reference/6_dcSweep_COISUB=0.standard0000644000265600020320000002266112264261473024207 0ustar andreasadminV(d) I(b) 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 2.000000e-01 -2.000000e-16 3.000000e-01 -3.000000e-16 4.000000e-01 -4.000000e-16 5.000000e-01 -5.000000e-16 6.000000e-01 -6.000000e-16 7.000000e-01 -7.000000e-16 8.000000e-01 -8.000000e-16 9.000000e-01 -9.000000e-16 1.000000e+00 -1.000000e-15 1.100000e+00 -1.100000e-15 1.200000e+00 -1.200000e-15 1.300000e+00 -1.300000e-15 1.400000e+00 -1.400000e-15 1.500000e+00 -1.500000e-15 1.600000e+00 -1.600000e-15 1.700000e+00 -1.700000e-15 1.800000e+00 -1.800000e-15 ngspice-26/tests/hisim/nmos/reference/51_acFreq_COGIDL=1.standard0000644000265600020320000002533012264261473024050 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/11_dcSweep_COGIDL=1.standard0000644000265600020320000003372712264261473024246 0ustar andreasadminV(d) I(d) I(b) 2.000000e-01 1.031340e-06 -4.442258e-13 3.000000e-01 1.187672e-06 -3.725294e-12 4.000000e-01 1.363429e-06 -1.823582e-11 5.000000e-01 1.553874e-06 -6.339897e-11 6.000000e-01 1.754199e-06 -1.728377e-10 7.000000e-01 1.961598e-06 -3.930127e-10 8.000000e-01 2.174683e-06 -7.784863e-10 9.000000e-01 2.392797e-06 -1.387142e-09 1.000000e+00 2.615628e-06 -2.277373e-09 1.100000e+00 2.843023e-06 -3.507103e-09 1.200000e+00 3.074906e-06 -5.133701e-09 1.300000e+00 3.311240e-06 -7.214083e-09 1.400000e+00 3.552009e-06 -9.804712e-09 1.500000e+00 3.797207e-06 -1.296148e-08 1.600000e+00 4.046839e-06 -1.673951e-08 1.700000e+00 4.300914e-06 -2.119292e-08 1.800000e+00 4.559445e-06 -2.637464e-08 2.000000e-01 3.625488e-04 -3.868350e-14 3.000000e-01 3.836434e-04 -4.978470e-13 4.000000e-01 4.033947e-04 -3.346833e-12 5.000000e-01 4.229012e-04 -1.482378e-11 6.000000e-01 4.423754e-04 -4.886892e-11 7.000000e-01 4.618404e-04 -1.294098e-10 8.000000e-01 4.813050e-04 -2.902720e-10 9.000000e-01 5.007846e-04 -5.733047e-10 1.000000e+00 5.202970e-04 -1.026099e-09 1.100000e+00 5.398591e-04 -1.700145e-09 1.200000e+00 5.594849e-04 -2.649556e-09 1.300000e+00 5.791860e-04 -3.930174e-09 1.400000e+00 5.989714e-04 -5.598889e-09 1.500000e+00 6.188484e-04 -7.713066e-09 1.600000e+00 6.388225e-04 -1.033006e-08 1.700000e+00 6.588982e-04 -1.350678e-08 1.800000e+00 6.790789e-04 -1.729936e-08 2.000000e-01 1.846855e-03 -1.004837e-15 3.000000e-01 1.974260e-03 -2.487981e-14 4.000000e-01 2.031600e-03 -2.968565e-13 5.000000e-01 2.082672e-03 -1.996707e-12 6.000000e-01 2.130364e-03 -8.995734e-12 7.000000e-01 2.175738e-03 -3.029256e-11 8.000000e-01 2.219465e-03 -8.210945e-11 9.000000e-01 2.261982e-03 -1.888105e-10 1.000000e+00 2.303587e-03 -3.826294e-10 1.100000e+00 2.344487e-03 -7.026947e-10 1.200000e+00 2.384832e-03 -1.193813e-09 1.300000e+00 2.424730e-03 -1.905257e-09 1.400000e+00 2.464263e-03 -2.889660e-09 1.500000e+00 2.503496e-03 -4.202031e-09 1.600000e+00 2.542478e-03 -5.898898e-09 1.700000e+00 2.581247e-03 -8.037579e-09 1.800000e+00 2.619837e-03 -1.067556e-08 2.000000e-01 3.343576e-03 -2.005728e-16 3.000000e-01 3.817799e-03 -4.500216e-16 4.000000e-01 4.017737e-03 -6.887612e-15 5.000000e-01 4.104539e-03 -1.006605e-13 6.000000e-01 4.168574e-03 -8.017581e-13 7.000000e-01 4.228356e-03 -4.087836e-12 8.000000e-01 4.284866e-03 -1.512529e-11 9.000000e-01 4.338706e-03 -4.420970e-11 1.000000e+00 4.390424e-03 -1.082475e-10 1.100000e+00 4.440474e-03 -2.314355e-10 1.200000e+00 4.489208e-03 -4.451801e-10 1.300000e+00 4.536890e-03 -7.874795e-10 1.400000e+00 4.583722e-03 -1.302004e-09 1.500000e+00 4.629854e-03 -2.037053e-09 1.600000e+00 4.675403e-03 -3.044505e-09 1.700000e+00 4.720460e-03 -4.378830e-09 1.800000e+00 4.765095e-03 -6.096202e-09 2.000000e-01 4.575745e-03 -2.000000e-16 3.000000e-01 5.436588e-03 -3.000026e-16 4.000000e-01 5.883336e-03 -4.052153e-16 5.000000e-01 6.122649e-03 -1.133621e-15 6.000000e-01 6.251933e-03 -1.832781e-14 7.000000e-01 6.328676e-03 -2.065202e-13 8.000000e-01 6.392836e-03 -1.349589e-12 9.000000e-01 6.453950e-03 -5.968623e-12 1.000000e+00 6.512526e-03 -1.994389e-11 1.100000e+00 6.568841e-03 -5.419458e-11 1.200000e+00 6.623217e-03 -1.259477e-10 1.300000e+00 6.675967e-03 -2.593639e-10 1.400000e+00 6.727369e-03 -4.855290e-10 1.500000e+00 6.777652e-03 -8.419565e-10 1.600000e+00 6.827001e-03 -1.371776e-09 1.700000e+00 6.875566e-03 -2.122763e-09 1.800000e+00 6.923465e-03 -3.146338e-09 2.000000e-01 5.870243e-03 -2.000000e-16 3.000000e-01 7.364527e-03 -3.000000e-16 4.000000e-01 8.250873e-03 -4.000000e-16 5.000000e-01 8.791206e-03 -5.000000e-16 6.000000e-01 9.132925e-03 -6.000195e-16 7.000000e-01 9.355002e-03 -7.199777e-16 8.000000e-01 9.502595e-03 -2.437494e-15 9.000000e-01 9.604011e-03 -3.602264e-14 1.000000e+00 9.676653e-03 -3.392146e-13 1.100000e+00 9.739827e-03 -1.941340e-12 1.200000e+00 9.800793e-03 -7.808035e-12 1.300000e+00 9.859958e-03 -2.437471e-11 1.400000e+00 9.917427e-03 -6.306711e-11 1.500000e+00 9.973346e-03 -1.414399e-10 1.600000e+00 1.002789e-02 -2.837504e-10 1.700000e+00 1.008122e-02 -5.209685e-10 1.800000e+00 1.013349e-02 -8.903336e-10 2.000000e-01 6.544617e-03 -2.000000e-16 3.000000e-01 8.629425e-03 -3.000000e-16 4.000000e-01 1.002415e-02 -4.000000e-16 5.000000e-01 1.095009e-02 -5.000000e-16 6.000000e-01 1.157533e-02 -6.000000e-16 7.000000e-01 1.200797e-02 -7.000000e-16 8.000000e-01 1.231437e-02 -8.000000e-16 9.000000e-01 1.253558e-02 -9.000393e-16 1.000000e+00 1.269838e-02 -1.032997e-15 1.100000e+00 1.282132e-02 -3.459337e-15 1.200000e+00 1.291696e-02 -4.717233e-14 1.300000e+00 1.299134e-02 -4.147384e-13 1.400000e+00 1.305478e-02 -2.259462e-12 1.500000e+00 1.311590e-02 -8.768857e-12 1.600000e+00 1.317555e-02 -2.666694e-11 1.700000e+00 1.323383e-02 -6.767074e-11 1.800000e+00 1.329082e-02 -1.495667e-10 2.000000e-01 6.168441e-06 -7.234759e-13 3.000000e-01 6.992533e-06 -5.812616e-12 4.000000e-01 7.898861e-06 -2.746700e-11 5.000000e-01 8.873240e-06 -9.269982e-11 6.000000e-01 9.894079e-06 -2.463813e-10 7.000000e-01 1.094822e-05 -5.480450e-10 8.000000e-01 1.202905e-05 -1.064846e-09 9.000000e-01 1.313338e-05 -1.865340e-09 1.000000e+00 1.425960e-05 -3.016372e-09 1.100000e+00 1.540689e-05 -4.582454e-09 1.200000e+00 1.657475e-05 -6.626168e-09 1.300000e+00 1.776285e-05 -9.208652e-09 1.400000e+00 1.897095e-05 -1.238985e-08 1.500000e+00 2.019886e-05 -1.622853e-08 1.600000e+00 2.144645e-05 -2.078218e-08 1.700000e+00 2.271357e-05 -2.610684e-08 1.800000e+00 2.400013e-05 -3.225694e-08 2.000000e-01 3.314500e-04 -7.048517e-14 3.000000e-01 3.516443e-04 -8.517268e-13 4.000000e-01 3.692608e-04 -5.440223e-12 5.000000e-01 3.862621e-04 -2.311015e-11 6.000000e-01 4.030308e-04 -7.358122e-11 7.000000e-01 4.196771e-04 -1.891914e-10 8.000000e-01 4.362537e-04 -4.137596e-10 9.000000e-01 4.527979e-04 -7.994364e-10 1.000000e+00 4.693394e-04 -1.403525e-09 1.100000e+00 4.859015e-04 -2.286235e-09 1.200000e+00 5.025025e-04 -3.509321e-09 1.300000e+00 5.191570e-04 -5.135247e-09 1.400000e+00 5.358759e-04 -7.226597e-09 1.500000e+00 5.526683e-04 -9.845601e-09 1.600000e+00 5.695412e-04 -1.305372e-08 1.700000e+00 5.865001e-04 -1.691129e-08 1.800000e+00 6.035496e-04 -2.147725e-08 2.000000e-01 1.414259e-03 -1.974681e-15 3.000000e-01 1.567979e-03 -4.885156e-14 4.000000e-01 1.628986e-03 -5.401197e-13 5.000000e-01 1.678046e-03 -3.412142e-12 6.000000e-01 1.722925e-03 -1.461534e-11 7.000000e-01 1.764987e-03 -4.721651e-11 8.000000e-01 1.805080e-03 -1.236209e-10 9.000000e-01 1.843764e-03 -2.760231e-10 1.000000e+00 1.881414e-03 -5.453996e-10 1.100000e+00 1.918286e-03 -9.798561e-10 1.200000e+00 1.954560e-03 -1.632924e-09 1.300000e+00 1.990366e-03 -2.562053e-09 1.400000e+00 2.025798e-03 -3.827338e-09 1.500000e+00 2.060928e-03 -5.490463e-09 1.600000e+00 2.095814e-03 -7.613831e-09 1.700000e+00 2.130498e-03 -1.025984e-08 1.800000e+00 2.165016e-03 -1.349033e-08 2.000000e-01 2.542714e-03 -2.018256e-16 3.000000e-01 3.063220e-03 -6.818327e-16 4.000000e-01 3.310856e-03 -1.462594e-14 5.000000e-01 3.420396e-03 -1.979311e-13 6.000000e-01 3.491904e-03 -1.458026e-12 7.000000e-01 3.556333e-03 -6.983787e-12 8.000000e-01 3.616445e-03 -2.457124e-11 9.000000e-01 3.673005e-03 -6.890563e-11 1.000000e+00 3.726718e-03 -1.629700e-10 1.100000e+00 3.778186e-03 -3.383338e-10 1.200000e+00 3.827885e-03 -6.345570e-10 1.300000e+00 3.876178e-03 -1.098081e-09 1.400000e+00 3.923338e-03 -1.780911e-09 1.500000e+00 3.969574e-03 -2.739284e-09 1.600000e+00 4.015045e-03 -4.032431e-09 1.700000e+00 4.059873e-03 -5.721476e-09 1.800000e+00 4.104155e-03 -7.868501e-09 2.000000e-01 3.486631e-03 -2.000000e-16 3.000000e-01 4.388014e-03 -3.000118e-16 4.000000e-01 4.924867e-03 -4.164221e-16 5.000000e-01 5.232529e-03 -2.106262e-15 6.000000e-01 5.399700e-03 -3.942036e-14 7.000000e-01 5.495663e-03 -4.062044e-13 8.000000e-01 5.570693e-03 -2.453998e-12 9.000000e-01 5.640525e-03 -1.019632e-11 1.000000e+00 5.706719e-03 -3.239816e-11 1.100000e+00 5.769675e-03 -8.446707e-11 1.200000e+00 5.829825e-03 -1.896172e-10 1.300000e+00 5.887607e-03 -3.791612e-10 1.400000e+00 5.943411e-03 -6.920697e-10 1.500000e+00 5.997568e-03 -1.174045e-09 1.600000e+00 6.050346e-03 -1.876347e-09 1.700000e+00 6.101964e-03 -2.854543e-09 1.800000e+00 6.152598e-03 -4.167312e-09 2.000000e-01 4.523458e-03 -2.000000e-16 3.000000e-01 5.961592e-03 -3.000000e-16 4.000000e-01 6.939779e-03 -4.000000e-16 5.000000e-01 7.596286e-03 -5.000000e-16 6.000000e-01 8.035751e-03 -6.000865e-16 7.000000e-01 8.327590e-03 -7.626923e-16 8.000000e-01 8.519006e-03 -4.946642e-15 9.000000e-01 8.645414e-03 -7.778262e-14 1.000000e+00 8.735120e-03 -6.672520e-13 1.100000e+00 8.810856e-03 -3.529840e-12 1.200000e+00 8.882452e-03 -1.333831e-11 1.300000e+00 8.951286e-03 -3.959547e-11 1.400000e+00 9.017592e-03 -9.829528e-11 1.500000e+00 9.081583e-03 -2.129407e-10 1.600000e+00 9.143496e-03 -4.148117e-10 1.700000e+00 9.203570e-03 -7.425854e-10 1.800000e+00 9.262030e-03 -1.241505e-09 2.000000e-01 5.146662e-03 -2.000000e-16 3.000000e-01 7.031863e-03 -3.000000e-16 4.000000e-01 8.439639e-03 -4.000000e-16 5.000000e-01 9.465363e-03 -5.000000e-16 6.000000e-01 1.020835e-02 -6.000000e-16 7.000000e-01 1.074777e-02 -7.000000e-16 8.000000e-01 1.114061e-02 -8.000000e-16 9.000000e-01 1.142684e-02 -9.001744e-16 1.000000e+00 1.163539e-02 -1.103505e-15 1.100000e+00 1.178842e-02 -7.073728e-15 1.200000e+00 1.190317e-02 -1.018271e-13 1.300000e+00 1.199275e-02 -8.157198e-13 1.400000e+00 1.206906e-02 -4.108138e-12 1.500000e+00 1.214087e-02 -1.497952e-11 1.600000e+00 1.221034e-02 -4.331897e-11 1.700000e+00 1.227777e-02 -1.054704e-10 1.800000e+00 1.234331e-02 -2.251760e-10 2.000000e-01 2.757247e-05 -1.048898e-12 3.000000e-01 3.088944e-05 -8.156892e-12 4.000000e-01 3.432618e-05 -3.752476e-11 5.000000e-01 3.796746e-05 -1.238204e-10 6.000000e-01 4.175816e-05 -3.228065e-10 7.000000e-01 4.565761e-05 -7.061345e-10 8.000000e-01 4.964493e-05 -1.352059e-09 9.000000e-01 5.371024e-05 -2.338004e-09 1.000000e+00 5.784880e-05 -3.737386e-09 1.100000e+00 6.205822e-05 -5.619500e-09 1.200000e+00 6.633713e-05 -8.050478e-09 1.300000e+00 7.068465e-05 -1.109418e-08 1.400000e+00 7.510013e-05 -1.481271e-08 1.500000e+00 7.958304e-05 -1.926652e-08 1.600000e+00 8.413294e-05 -2.451446e-08 1.700000e+00 8.874943e-05 -3.061356e-08 1.800000e+00 9.343213e-05 -3.761896e-08 2.000000e-01 3.233979e-04 -1.113646e-13 3.000000e-01 3.491751e-04 -1.281941e-12 4.000000e-01 3.669805e-04 -7.875437e-12 5.000000e-01 3.832630e-04 -3.240969e-11 6.000000e-01 3.989945e-04 -1.004982e-10 7.000000e-01 4.144369e-04 -2.526778e-10 8.000000e-01 4.297081e-04 -5.420791e-10 9.000000e-01 4.448786e-04 -1.030022e-09 1.000000e+00 4.599963e-04 -1.782073e-09 1.100000e+00 4.750956e-04 -2.865541e-09 1.200000e+00 4.902017e-04 -4.348161e-09 1.300000e+00 5.053338e-04 -6.297392e-09 1.400000e+00 5.205065e-04 -8.779972e-09 1.500000e+00 5.357311e-04 -1.186156e-08 1.600000e+00 5.510168e-04 -1.560641e-08 1.700000e+00 5.663707e-04 -2.007712e-08 1.800000e+00 5.817988e-04 -2.533437e-08 2.000000e-01 1.006788e-03 -3.438856e-15 3.000000e-01 1.176557e-03 -8.180155e-14 4.000000e-01 1.246390e-03 -8.519717e-13 5.000000e-01 1.291247e-03 -5.131012e-12 6.000000e-01 1.330236e-03 -2.114973e-11 7.000000e-01 1.366185e-03 -6.620647e-11 8.000000e-01 1.400047e-03 -1.688325e-10 9.000000e-01 1.432421e-03 -3.686376e-10 1.000000e+00 1.463717e-03 -7.145365e-10 1.100000e+00 1.494216e-03 -1.262475e-09 1.200000e+00 1.524118e-03 -2.073339e-09 1.300000e+00 1.553561e-03 -3.211246e-09 1.400000e+00 1.582649e-03 -4.742194e-09 1.500000e+00 1.611458e-03 -6.732999e-09 1.600000e+00 1.640047e-03 -9.250447e-09 1.700000e+00 1.668460e-03 -1.236063e-08 1.800000e+00 1.696735e-03 -1.612841e-08 2.000000e-01 1.720602e-03 -2.044081e-16 3.000000e-01 2.182212e-03 -1.077114e-15 4.000000e-01 2.443001e-03 -2.625332e-14 5.000000e-01 2.573625e-03 -3.313949e-13 6.000000e-01 2.648907e-03 -2.298770e-12 7.000000e-01 2.710122e-03 -1.049966e-11 8.000000e-01 2.766323e-03 -3.555372e-11 9.000000e-01 2.818908e-03 -9.661517e-11 1.000000e+00 2.868539e-03 -2.225691e-10 1.100000e+00 2.915786e-03 -4.518525e-10 1.200000e+00 2.961130e-03 -8.313406e-10 1.300000e+00 3.004955e-03 -1.414798e-09 1.400000e+00 3.047559e-03 -2.261239e-09 1.500000e+00 3.089172e-03 -3.433386e-09 1.600000e+00 3.129973e-03 -4.996314e-09 1.700000e+00 3.170099e-03 -7.016296e-09 1.800000e+00 3.209660e-03 -9.559864e-09 2.000000e-01 2.344551e-03 -2.000000e-16 3.000000e-01 3.101925e-03 -3.000371e-16 4.000000e-01 3.621184e-03 -4.392890e-16 5.000000e-01 3.954178e-03 -3.759206e-15 6.000000e-01 4.151658e-03 -7.107669e-14 7.000000e-01 4.267092e-03 -6.800748e-13 8.000000e-01 4.348380e-03 -3.868630e-12 9.000000e-01 4.419815e-03 -1.532870e-11 1.000000e+00 4.486875e-03 -4.687793e-11 1.100000e+00 4.550436e-03 -1.184333e-10 1.200000e+00 4.610907e-03 -2.589604e-10 1.300000e+00 4.668697e-03 -5.063777e-10 1.400000e+00 4.724201e-03 -9.066883e-10 1.500000e+00 4.777774e-03 -1.512673e-09 1.600000e+00 4.829718e-03 -2.382416e-09 1.700000e+00 4.880286e-03 -3.577852e-09 1.800000e+00 4.929683e-03 -5.163438e-09 2.000000e-01 3.084402e-03 -2.000000e-16 3.000000e-01 4.235437e-03 -3.000000e-16 4.000000e-01 5.122679e-03 -4.000000e-16 5.000000e-01 5.785658e-03 -5.000000e-16 6.000000e-01 6.267956e-03 -6.002687e-16 7.000000e-01 6.608144e-03 -8.495987e-16 8.000000e-01 6.840111e-03 -9.206872e-15 9.000000e-01 6.995611e-03 -1.404372e-13 1.000000e+00 7.104437e-03 -1.117107e-12 1.100000e+00 7.191523e-03 -5.564445e-12 1.200000e+00 7.270752e-03 -2.005186e-11 1.300000e+00 7.346161e-03 -5.729152e-11 1.400000e+00 7.418531e-03 -1.378218e-10 1.500000e+00 7.488126e-03 -2.908131e-10 1.600000e+00 7.555177e-03 -5.539897e-10 1.700000e+00 7.619930e-03 -9.728703e-10 1.800000e+00 7.682630e-03 -1.599591e-09 2.000000e-01 3.603565e-03 -2.000000e-16 3.000000e-01 5.071371e-03 -3.000000e-16 4.000000e-01 6.281326e-03 -4.000000e-16 5.000000e-01 7.251718e-03 -5.000000e-16 6.000000e-01 8.015715e-03 -6.000000e-16 7.000000e-01 8.608979e-03 -7.000000e-16 8.000000e-01 9.063670e-03 -8.000000e-16 9.000000e-01 9.407070e-03 -9.005412e-16 1.000000e+00 9.662614e-03 -1.246909e-15 1.100000e+00 9.851179e-03 -1.320980e-14 1.200000e+00 9.991500e-03 -1.838246e-13 1.300000e+00 1.010011e-02 -1.365597e-12 1.400000e+00 1.019103e-02 -6.475970e-12 1.500000e+00 1.027396e-02 -2.251903e-11 1.600000e+00 1.035306e-02 -6.267904e-11 1.700000e+00 1.042945e-02 -1.478822e-10 1.800000e+00 1.050344e-02 -3.075230e-10 ngspice-26/tests/hisim/nmos/reference/62_acFreq_COFLICK=0.standard0000644000265600020320000002533012264261473024162 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/59_acFreq_CORG=1.standard0000644000265600020320000002530112264261473023647 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239349262254e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239350831216e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597154647725e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121383006268e-15 158489.3 1.97239325648033e-14 1.5259711590503e-14 3.70121280027687e-15 199526.2 1.97239269495816e-14 1.52597104905024e-14 3.70121218944112e-15 251188.6 1.97239180053384e-14 1.52597043662959e-14 3.70121099652562e-15 316227.8 1.97239003469476e-14 1.525968964718e-14 3.70120734395611e-15 398107.2 1.97238820839655e-14 1.52596766641052e-14 3.70120379648453e-15 501187.2 1.97238530803573e-14 1.52596556738066e-14 3.70119953895605e-15 630957.3 1.97238026535359e-14 1.52596155358895e-14 3.70119057562664e-15 794328.2 1.97237247007e-14 1.52595539769721e-14 3.70117378991505e-15 1000000 1.97235946325493e-14 1.52594576337647e-14 3.70115138470089e-15 1258925 1.97234051933823e-14 1.52593045185996e-14 3.70111522144373e-15 1584893 1.97230890368667e-14 1.52590689025513e-14 3.70105614508865e-15 1995262 1.9722594850063e-14 1.52586815034491e-14 3.70096331815381e-15 2511886 1.97218144289378e-14 1.52580759954074e-14 3.70081625914683e-15 3162278 1.97205685534643e-14 1.52571127917971e-14 3.70058225520894e-15 3981072 1.97186010018895e-14 1.52555909215756e-14 3.70021274406466e-15 5011872 1.9715482307321e-14 1.5253177533824e-14 3.69962763734263e-15 6309573 1.97105422072928e-14 1.52493567885297e-14 3.69870093125876e-15 7943282 1.97027145095314e-14 1.52433004321734e-14 3.69723262588409e-15 10000000 1.96903153339488e-14 1.52337111386208e-14 3.69490614473396e-15 12589250 1.96707254350278e-14 1.52185462894335e-14 3.6912278110744e-15 15848930 1.96397203591359e-14 1.51945590994023e-14 3.68541071026515e-15 19952620 1.95907887875183e-14 1.51567080888055e-14 3.67622934098493e-15 25118860 1.95137441114076e-14 1.50971017121719e-14 3.66177210705072e-15 31622780 1.9392865022826e-14 1.50035794130665e-14 3.63908801729963e-15 39810720 1.92043251515824e-14 1.4857714757661e-14 3.60370886476335e-15 50118720 1.89129074502151e-14 1.46322541676119e-14 3.54902358498303e-15 63095730 1.84687318119808e-14 1.42886113510042e-14 3.46567324534855e-15 79432820 1.78059586912473e-14 1.37758469760843e-14 3.34130363776826e-15 100000000 1.6847728472856e-14 1.30345001772298e-14 3.16149198676375e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962562936069e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109645456606e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109639559336e-14 1.51047545911724e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047526628817e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962516225e-15 158489.3 1.95109618448182e-14 1.51047535001555e-14 3.6396242147082e-15 199526.2 1.95109585361296e-14 1.51047482309371e-14 3.63962372481307e-15 251188.6 1.9510949902996e-14 1.51047430168079e-14 3.63962182771659e-15 316227.8 1.95109323088139e-14 1.51047260197633e-14 3.63961899043027e-15 398107.2 1.95109117551598e-14 1.51047142845219e-14 3.63961542553076e-15 501187.2 1.95108842284302e-14 1.5104691579194e-14 3.63960957573937e-15 630957.3 1.95108359014228e-14 1.51046547228684e-14 3.63960025492704e-15 794328.2 1.95107595844383e-14 1.51045963034457e-14 3.63958784237076e-15 1000000 1.95106453186924e-14 1.5104502789621e-14 3.63956478792205e-15 1258925 1.95104485028421e-14 1.51043625655417e-14 3.63953034627024e-15 1584893 1.95101484428794e-14 1.5104120854203e-14 3.6394725805196e-15 1995262 1.9509674296474e-14 1.51037511504592e-14 3.63938362783397e-15 2511886 1.95089096873303e-14 1.51031653345075e-14 3.63924229691419e-15 3162278 1.95077062066647e-14 1.51022296911112e-14 3.63901705311819e-15 3981072 1.95057985803111e-14 1.51007564713082e-14 3.63866155256836e-15 5011872 1.95027833778932e-14 1.50984198505344e-14 3.63809800974343e-15 6309573 1.94979992244338e-14 1.50947188473212e-14 3.63720646312855e-15 7943282 1.94904226170188e-14 1.5088851683743e-14 3.63579294421385e-15 10000000 1.94784323582106e-14 1.5079564801588e-14 3.6335550972709e-15 12589250 1.9459450147862e-14 1.50648685494391e-14 3.63001587875463e-15 15848930 1.94294408949484e-14 1.50416395349015e-14 3.6244176152517e-15 19952620 1.93820719252244e-14 1.50049683933451e-14 3.61558052499933e-15 25118860 1.93074669026768e-14 1.49472092214807e-14 3.60166367861767e-15 31622780 1.91903855913677e-14 1.48565728332285e-14 3.579823866539e-15 39810720 1.90077177818509e-14 1.47151575239382e-14 3.54574848925544e-15 50118720 1.87252319242494e-14 1.4496467272683e-14 3.49305118531006e-15 63095730 1.82943179722473e-14 1.41628679145921e-14 3.41266929691669e-15 79432820 1.76505622200988e-14 1.36644925621622e-14 3.29258107257209e-15 100000000 1.67181763491792e-14 1.29426725497141e-14 3.11865225073171e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.9225373521855e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.92253768600609e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253768313841e-14 1.48903668890124e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903661798886e-14 3.56433861252023e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434001010777e-15 158489.3 1.92253673862943e-14 1.48903668582769e-14 3.56433834216953e-15 199526.2 1.92253707573056e-14 1.48903599748845e-14 3.56433776741077e-15 251188.6 1.92253640623177e-14 1.48903556340024e-14 3.56433660243893e-15 316227.8 1.92253442583387e-14 1.48903437309214e-14 3.56433354330214e-15 398107.2 1.92253255483615e-14 1.48903287376579e-14 3.56433022240397e-15 501187.2 1.92252998730807e-14 1.48903096035942e-14 3.56432660291246e-15 630957.3 1.92252557831312e-14 1.48902728841389e-14 3.56431815142214e-15 794328.2 1.92251824780994e-14 1.48902166158542e-14 3.56430299371834e-15 1000000 1.92250576888083e-14 1.4890127447474e-14 3.56428131674072e-15 1258925 1.92248880560673e-14 1.48899899563704e-14 3.56424898676721e-15 1584893 1.92245941523524e-14 1.48897643383222e-14 3.56419474158033e-15 1995262 1.92241423541567e-14 1.48894107542695e-14 3.56411043306179e-15 2511886 1.92234125516809e-14 1.48888476485104e-14 3.56397544624967e-15 3162278 1.92222590779682e-14 1.48879530936034e-14 3.56376130022201e-15 3981072 1.92204362498157e-14 1.48865388316715e-14 3.56342352337685e-15 5011872 1.92175483340134e-14 1.48843046218751e-14 3.56288807476927e-15 6309573 1.92129715196342e-14 1.48807607778458e-14 3.56204039168131e-15 7943282 1.92057231059241e-14 1.48751452199005e-14 3.5606964379198e-15 10000000 1.91942452918257e-14 1.48662557975596e-14 3.55856765428372e-15 12589250 1.91760894318177e-14 1.48521899857729e-14 3.55520227808507e-15 15848930 1.91473711781594e-14 1.48299541908198e-14 3.54987786325693e-15 19952620 1.91020358905018e-14 1.47948396650943e-14 3.54147271788981e-15 25118860 1.90306248434228e-14 1.47395254044338e-14 3.52823302205225e-15 31622780 1.89185223155585e-14 1.46527043156654e-14 3.50744996401823e-15 39810720 1.87435477421086e-14 1.4517182909642e-14 3.47500957419589e-15 50118720 1.84727654717814e-14 1.43074580120149e-14 3.42480842637598e-15 63095730 1.80592647701999e-14 1.39871953792764e-14 3.34814538310683e-15 79432820 1.74405344431708e-14 1.35079780587161e-14 3.23343355747602e-15 100000000 1.6542278306074e-14 1.28122673555423e-14 3.06689983788651e-15 ngspice-26/tests/hisim/nmos/reference/19_dcSweep_CORG=0.standard0000644000265600020320000002211412264261473024032 0ustar andreasadminV(d) I(d) 2.000000e-01 1.031340e-06 3.000000e-01 1.187668e-06 4.000000e-01 1.363411e-06 5.000000e-01 1.553811e-06 6.000000e-01 1.754026e-06 7.000000e-01 1.961205e-06 8.000000e-01 2.173905e-06 9.000000e-01 2.391410e-06 1.000000e+00 2.613350e-06 1.100000e+00 2.839516e-06 1.200000e+00 3.069773e-06 1.300000e+00 3.304026e-06 1.400000e+00 3.542204e-06 1.500000e+00 3.784246e-06 1.600000e+00 4.030100e-06 1.700000e+00 4.279721e-06 1.800000e+00 4.533070e-06 2.000000e-01 3.625488e-04 3.000000e-01 3.836434e-04 4.000000e-01 4.033947e-04 5.000000e-01 4.229012e-04 6.000000e-01 4.423753e-04 7.000000e-01 4.618402e-04 8.000000e-01 4.813047e-04 9.000000e-01 5.007840e-04 1.000000e+00 5.202960e-04 1.100000e+00 5.398574e-04 1.200000e+00 5.594823e-04 1.300000e+00 5.791821e-04 1.400000e+00 5.989658e-04 1.500000e+00 6.188407e-04 1.600000e+00 6.388122e-04 1.700000e+00 6.588847e-04 1.800000e+00 6.790616e-04 2.000000e-01 1.846855e-03 3.000000e-01 1.974260e-03 4.000000e-01 2.031600e-03 5.000000e-01 2.082672e-03 6.000000e-01 2.130364e-03 7.000000e-01 2.175738e-03 8.000000e-01 2.219464e-03 9.000000e-01 2.261982e-03 1.000000e+00 2.303587e-03 1.100000e+00 2.344487e-03 1.200000e+00 2.384830e-03 1.300000e+00 2.424728e-03 1.400000e+00 2.464261e-03 1.500000e+00 2.503492e-03 1.600000e+00 2.542472e-03 1.700000e+00 2.581239e-03 1.800000e+00 2.619826e-03 2.000000e-01 3.343576e-03 3.000000e-01 3.817799e-03 4.000000e-01 4.017737e-03 5.000000e-01 4.104539e-03 6.000000e-01 4.168574e-03 7.000000e-01 4.228356e-03 8.000000e-01 4.284866e-03 9.000000e-01 4.338706e-03 1.000000e+00 4.390424e-03 1.100000e+00 4.440474e-03 1.200000e+00 4.489207e-03 1.300000e+00 4.536889e-03 1.400000e+00 4.583720e-03 1.500000e+00 4.629852e-03 1.600000e+00 4.675400e-03 1.700000e+00 4.720456e-03 1.800000e+00 4.765089e-03 2.000000e-01 4.575745e-03 3.000000e-01 5.436588e-03 4.000000e-01 5.883336e-03 5.000000e-01 6.122649e-03 6.000000e-01 6.251933e-03 7.000000e-01 6.328676e-03 8.000000e-01 6.392836e-03 9.000000e-01 6.453950e-03 1.000000e+00 6.512526e-03 1.100000e+00 6.568841e-03 1.200000e+00 6.623216e-03 1.300000e+00 6.675967e-03 1.400000e+00 6.727368e-03 1.500000e+00 6.777651e-03 1.600000e+00 6.827000e-03 1.700000e+00 6.875564e-03 1.800000e+00 6.923462e-03 2.000000e-01 5.870243e-03 3.000000e-01 7.364527e-03 4.000000e-01 8.250873e-03 5.000000e-01 8.791206e-03 6.000000e-01 9.132925e-03 7.000000e-01 9.355002e-03 8.000000e-01 9.502595e-03 9.000000e-01 9.604011e-03 1.000000e+00 9.676653e-03 1.100000e+00 9.739827e-03 1.200000e+00 9.800793e-03 1.300000e+00 9.859958e-03 1.400000e+00 9.917427e-03 1.500000e+00 9.973346e-03 1.600000e+00 1.002789e-02 1.700000e+00 1.008122e-02 1.800000e+00 1.013349e-02 2.000000e-01 6.544617e-03 3.000000e-01 8.629425e-03 4.000000e-01 1.002415e-02 5.000000e-01 1.095009e-02 6.000000e-01 1.157533e-02 7.000000e-01 1.200797e-02 8.000000e-01 1.231437e-02 9.000000e-01 1.253558e-02 1.000000e+00 1.269838e-02 1.100000e+00 1.282132e-02 1.200000e+00 1.291696e-02 1.300000e+00 1.299134e-02 1.400000e+00 1.305478e-02 1.500000e+00 1.311590e-02 1.600000e+00 1.317555e-02 1.700000e+00 1.323383e-02 1.800000e+00 1.329082e-02 2.000000e-01 6.168441e-06 3.000000e-01 6.992527e-06 4.000000e-01 7.898833e-06 5.000000e-01 8.873147e-06 6.000000e-01 9.893832e-06 7.000000e-01 1.094768e-05 8.000000e-01 1.202799e-05 9.000000e-01 1.313151e-05 1.000000e+00 1.425659e-05 1.100000e+00 1.540231e-05 1.200000e+00 1.656813e-05 1.300000e+00 1.775364e-05 1.400000e+00 1.895856e-05 1.500000e+00 2.018263e-05 1.600000e+00 2.142567e-05 1.700000e+00 2.268746e-05 1.800000e+00 2.396787e-05 2.000000e-01 3.314500e-04 3.000000e-01 3.516443e-04 4.000000e-01 3.692608e-04 5.000000e-01 3.862621e-04 6.000000e-01 4.030308e-04 7.000000e-01 4.196770e-04 8.000000e-01 4.362533e-04 9.000000e-01 4.527971e-04 1.000000e+00 4.693380e-04 1.100000e+00 4.858992e-04 1.200000e+00 5.024990e-04 1.300000e+00 5.191518e-04 1.400000e+00 5.358687e-04 1.500000e+00 5.526585e-04 1.600000e+00 5.695281e-04 1.700000e+00 5.864832e-04 1.800000e+00 6.035282e-04 2.000000e-01 1.414259e-03 3.000000e-01 1.567979e-03 4.000000e-01 1.628986e-03 5.000000e-01 1.678046e-03 6.000000e-01 1.722925e-03 7.000000e-01 1.764987e-03 8.000000e-01 1.805080e-03 9.000000e-01 1.843763e-03 1.000000e+00 1.881413e-03 1.100000e+00 1.918285e-03 1.200000e+00 1.954559e-03 1.300000e+00 1.990363e-03 1.400000e+00 2.025794e-03 1.500000e+00 2.060923e-03 1.600000e+00 2.095806e-03 1.700000e+00 2.130488e-03 1.800000e+00 2.165002e-03 2.000000e-01 2.542714e-03 3.000000e-01 3.063220e-03 4.000000e-01 3.310856e-03 5.000000e-01 3.420396e-03 6.000000e-01 3.491904e-03 7.000000e-01 3.556333e-03 8.000000e-01 3.616445e-03 9.000000e-01 3.673005e-03 1.000000e+00 3.726718e-03 1.100000e+00 3.778185e-03 1.200000e+00 3.827884e-03 1.300000e+00 3.876176e-03 1.400000e+00 3.923336e-03 1.500000e+00 3.969571e-03 1.600000e+00 4.015041e-03 1.700000e+00 4.059867e-03 1.800000e+00 4.104148e-03 2.000000e-01 3.486631e-03 3.000000e-01 4.388014e-03 4.000000e-01 4.924867e-03 5.000000e-01 5.232529e-03 6.000000e-01 5.399700e-03 7.000000e-01 5.495663e-03 8.000000e-01 5.570693e-03 9.000000e-01 5.640525e-03 1.000000e+00 5.706719e-03 1.100000e+00 5.769675e-03 1.200000e+00 5.829825e-03 1.300000e+00 5.887607e-03 1.400000e+00 5.943411e-03 1.500000e+00 5.997567e-03 1.600000e+00 6.050344e-03 1.700000e+00 6.101961e-03 1.800000e+00 6.152594e-03 2.000000e-01 4.523458e-03 3.000000e-01 5.961592e-03 4.000000e-01 6.939779e-03 5.000000e-01 7.596286e-03 6.000000e-01 8.035751e-03 7.000000e-01 8.327590e-03 8.000000e-01 8.519006e-03 9.000000e-01 8.645414e-03 1.000000e+00 8.735120e-03 1.100000e+00 8.810856e-03 1.200000e+00 8.882452e-03 1.300000e+00 8.951286e-03 1.400000e+00 9.017592e-03 1.500000e+00 9.081583e-03 1.600000e+00 9.143495e-03 1.700000e+00 9.203569e-03 1.800000e+00 9.262028e-03 2.000000e-01 5.146662e-03 3.000000e-01 7.031863e-03 4.000000e-01 8.439639e-03 5.000000e-01 9.465363e-03 6.000000e-01 1.020835e-02 7.000000e-01 1.074777e-02 8.000000e-01 1.114061e-02 9.000000e-01 1.142684e-02 1.000000e+00 1.163539e-02 1.100000e+00 1.178842e-02 1.200000e+00 1.190317e-02 1.300000e+00 1.199275e-02 1.400000e+00 1.206906e-02 1.500000e+00 1.214087e-02 1.600000e+00 1.221034e-02 1.700000e+00 1.227777e-02 1.800000e+00 1.234331e-02 2.000000e-01 2.757247e-05 3.000000e-01 3.088943e-05 4.000000e-01 3.432614e-05 5.000000e-01 3.796733e-05 6.000000e-01 4.175784e-05 7.000000e-01 4.565691e-05 8.000000e-01 4.964358e-05 9.000000e-01 5.370790e-05 1.000000e+00 5.784506e-05 1.100000e+00 6.205260e-05 1.200000e+00 6.632908e-05 1.300000e+00 7.067356e-05 1.400000e+00 7.508532e-05 1.500000e+00 7.956378e-05 1.600000e+00 8.410843e-05 1.700000e+00 8.871881e-05 1.800000e+00 9.339451e-05 2.000000e-01 3.233979e-04 3.000000e-01 3.491751e-04 4.000000e-01 3.669805e-04 5.000000e-01 3.832630e-04 6.000000e-01 3.989944e-04 7.000000e-01 4.144367e-04 8.000000e-01 4.297076e-04 9.000000e-01 4.448775e-04 1.000000e+00 4.599945e-04 1.100000e+00 4.750927e-04 1.200000e+00 4.901974e-04 1.300000e+00 5.053275e-04 1.400000e+00 5.204977e-04 1.500000e+00 5.357192e-04 1.600000e+00 5.510012e-04 1.700000e+00 5.663506e-04 1.800000e+00 5.817735e-04 2.000000e-01 1.006788e-03 3.000000e-01 1.176557e-03 4.000000e-01 1.246390e-03 5.000000e-01 1.291247e-03 6.000000e-01 1.330236e-03 7.000000e-01 1.366185e-03 8.000000e-01 1.400047e-03 9.000000e-01 1.432420e-03 1.000000e+00 1.463716e-03 1.100000e+00 1.494215e-03 1.200000e+00 1.524116e-03 1.300000e+00 1.553558e-03 1.400000e+00 1.582644e-03 1.500000e+00 1.611452e-03 1.600000e+00 1.640038e-03 1.700000e+00 1.668448e-03 1.800000e+00 1.696719e-03 2.000000e-01 1.720602e-03 3.000000e-01 2.182212e-03 4.000000e-01 2.443001e-03 5.000000e-01 2.573625e-03 6.000000e-01 2.648907e-03 7.000000e-01 2.710122e-03 8.000000e-01 2.766323e-03 9.000000e-01 2.818908e-03 1.000000e+00 2.868539e-03 1.100000e+00 2.915786e-03 1.200000e+00 2.961129e-03 1.300000e+00 3.004954e-03 1.400000e+00 3.047557e-03 1.500000e+00 3.089169e-03 1.600000e+00 3.129968e-03 1.700000e+00 3.170092e-03 1.800000e+00 3.209650e-03 2.000000e-01 2.344551e-03 3.000000e-01 3.101925e-03 4.000000e-01 3.621184e-03 5.000000e-01 3.954178e-03 6.000000e-01 4.151658e-03 7.000000e-01 4.267092e-03 8.000000e-01 4.348380e-03 9.000000e-01 4.419815e-03 1.000000e+00 4.486875e-03 1.100000e+00 4.550435e-03 1.200000e+00 4.610906e-03 1.300000e+00 4.668696e-03 1.400000e+00 4.724200e-03 1.500000e+00 4.777773e-03 1.600000e+00 4.829716e-03 1.700000e+00 4.880282e-03 1.800000e+00 4.929678e-03 2.000000e-01 3.084402e-03 3.000000e-01 4.235437e-03 4.000000e-01 5.122679e-03 5.000000e-01 5.785658e-03 6.000000e-01 6.267956e-03 7.000000e-01 6.608144e-03 8.000000e-01 6.840111e-03 9.000000e-01 6.995611e-03 1.000000e+00 7.104437e-03 1.100000e+00 7.191523e-03 1.200000e+00 7.270752e-03 1.300000e+00 7.346161e-03 1.400000e+00 7.418531e-03 1.500000e+00 7.488125e-03 1.600000e+00 7.555176e-03 1.700000e+00 7.619929e-03 1.800000e+00 7.682628e-03 2.000000e-01 3.603565e-03 3.000000e-01 5.071371e-03 4.000000e-01 6.281326e-03 5.000000e-01 7.251718e-03 6.000000e-01 8.015715e-03 7.000000e-01 8.608979e-03 8.000000e-01 9.063670e-03 9.000000e-01 9.407070e-03 1.000000e+00 9.662614e-03 1.100000e+00 9.851179e-03 1.200000e+00 9.991500e-03 1.300000e+00 1.010011e-02 1.400000e+00 1.019103e-02 1.500000e+00 1.027396e-02 1.600000e+00 1.035306e-02 1.700000e+00 1.042945e-02 1.800000e+00 1.050344e-02 ngspice-26/tests/hisim/nmos/reference/67_acFreq_COIGN=1.standard0000644000265600020320000002533012264261473023755 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/57_acFreq_CONQS=1.standard0000644000265600020320000002533012264261473024000 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/54_acFreq_COADOV=0.standard0000644000265600020320000002530312264261473024064 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 1258.925 1.19966626350217e-14 1.12329982992676e-14 6.61483177107996e-19 1584.893 1.1996664355877e-14 1.12330004393029e-14 6.61483059557916e-19 1995.262 1.19966569416321e-14 1.12329969918717e-14 6.61483050932846e-19 2511.886 1.19966581963021e-14 1.12329966021416e-14 6.61482904929695e-19 3162.278 1.19966559260994e-14 1.12329907412198e-14 6.61482803109009e-19 3981.072 1.19966595590059e-14 1.12329935027452e-14 6.61482914887385e-19 5011.872 1.19966610224071e-14 1.12329962874613e-14 6.61482873620703e-19 6309.573 1.19966603850384e-14 1.12329953974691e-14 6.61482869441969e-19 7943.282 1.19966588659062e-14 1.12329947192706e-14 6.61483007387139e-19 10000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 12589.25 1.19966626350217e-14 1.12329982992676e-14 6.61483177107996e-19 15848.93 1.1996664355877e-14 1.12330004393029e-14 6.61483059557916e-19 19952.62 1.19966569416321e-14 1.12329969918717e-14 6.61483050932846e-19 25118.86 1.19966581963021e-14 1.12329966021416e-14 6.61482904929695e-19 31622.78 1.19966559260994e-14 1.12329907412198e-14 6.61482803109009e-19 39810.72 1.19966595590059e-14 1.12329935027452e-14 6.61482914887384e-19 50118.72 1.19966610224071e-14 1.12329962874613e-14 6.61482873620703e-19 63095.73 1.19966603850384e-14 1.12329953974691e-14 6.61482869441969e-19 79432.82 1.19966588659062e-14 1.12329947192706e-14 6.61483007387139e-19 100000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 125892.5 1.19966626350217e-14 1.12329982992676e-14 6.61483177107996e-19 158489.3 1.1996664355877e-14 1.12330004393029e-14 6.61483059557916e-19 199526.2 1.19966569416321e-14 1.12329969918717e-14 6.61483050932846e-19 251188.6 1.19966581963021e-14 1.12329966021416e-14 6.61482904929695e-19 316227.8 1.19966559260994e-14 1.12329907412198e-14 6.61482803109009e-19 398107.2 1.19966595590059e-14 1.12329935027452e-14 6.61482914887384e-19 501187.2 1.19966610224071e-14 1.12329962874613e-14 6.61482873620703e-19 630957.3 1.19966603850384e-14 1.12329953974691e-14 6.61482869441969e-19 794328.2 1.19966588659062e-14 1.12329947192706e-14 6.61483007387139e-19 1000000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 1258925 1.19966626350217e-14 1.12329982992676e-14 6.61483177107996e-19 1584893 1.1996664355877e-14 1.12330004393029e-14 6.61483059557916e-19 1995262 1.19966569416321e-14 1.12329969918717e-14 6.61483050932846e-19 2511886 1.19966581963021e-14 1.12329966021416e-14 6.61482904929695e-19 3162278 1.19966559260994e-14 1.12329907412198e-14 6.61482803109009e-19 3981072 1.19966595590059e-14 1.12329935027452e-14 6.61482914887385e-19 5011872 1.19966610224071e-14 1.12329962874613e-14 6.61482873620703e-19 6309573 1.19966603850384e-14 1.12329953974691e-14 6.61482869441969e-19 7943282 1.19966588659062e-14 1.12329947192706e-14 6.61483007387139e-19 10000000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 12589250 1.19966626350217e-14 1.12329982992676e-14 6.61483177107996e-19 15848930 1.1996664355877e-14 1.12330004393029e-14 6.61483059557916e-19 19952620 1.19966569416321e-14 1.12329969918717e-14 6.61483050932846e-19 25118860 1.19966581963021e-14 1.12329966021416e-14 6.61482904929695e-19 31622780 1.19966559260994e-14 1.12329907412198e-14 6.61482803109009e-19 39810720 1.19966595590059e-14 1.12329935027452e-14 6.61482914887385e-19 50118720 1.19966610224071e-14 1.12329962874613e-14 6.61482873620703e-19 63095730 1.19966603850384e-14 1.12329953974691e-14 6.61482869441969e-19 79432820 1.19966588659062e-14 1.12329947192706e-14 6.61483007387139e-19 100000000 1.19966587510747e-14 1.1232993545384e-14 6.61482957577397e-19 1000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 1258.925 1.18624841173181e-14 1.10953014766084e-14 5.97369496543663e-19 1584.893 1.18624831619671e-14 1.10953045456573e-14 5.97369413279123e-19 1995.262 1.18624818158717e-14 1.10952961895412e-14 5.97369420169496e-19 2511.886 1.18624791678805e-14 1.10953010529298e-14 5.97369381079182e-19 3162.278 1.18624782610481e-14 1.10952950646205e-14 5.97369433283237e-19 3981.072 1.18624776976897e-14 1.10952975830302e-14 5.97369139280019e-19 5011.872 1.18624809602386e-14 1.10952977061258e-14 5.97369293813748e-19 6309.573 1.18624819225207e-14 1.10952981366807e-14 5.97369355975215e-19 7943.282 1.18624809647058e-14 1.10952984225245e-14 5.97369264956487e-19 10000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 12589.25 1.18624841173181e-14 1.10953014766084e-14 5.97369496543663e-19 15848.93 1.18624831619671e-14 1.10953045456573e-14 5.97369413279123e-19 19952.62 1.18624818158717e-14 1.10952961895412e-14 5.97369420169496e-19 25118.86 1.18624791678805e-14 1.10953010529298e-14 5.97369381079182e-19 31622.78 1.18624782610481e-14 1.10952950646205e-14 5.97369433283237e-19 39810.72 1.18624776976897e-14 1.10952975830302e-14 5.97369139280019e-19 50118.72 1.18624809602386e-14 1.10952977061258e-14 5.97369293813748e-19 63095.73 1.18624819225207e-14 1.10952981366807e-14 5.97369355975215e-19 79432.82 1.18624809647058e-14 1.10952984225245e-14 5.97369264956487e-19 100000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 125892.5 1.18624841173181e-14 1.10953014766084e-14 5.97369496543663e-19 158489.3 1.18624831619671e-14 1.10953045456573e-14 5.97369413279123e-19 199526.2 1.18624818158717e-14 1.10952961895412e-14 5.97369420169496e-19 251188.6 1.18624791678805e-14 1.10953010529298e-14 5.97369381079182e-19 316227.8 1.18624782610481e-14 1.10952950646205e-14 5.97369433283237e-19 398107.2 1.18624776976897e-14 1.10952975830302e-14 5.97369139280019e-19 501187.2 1.18624809602386e-14 1.10952977061258e-14 5.97369293813748e-19 630957.3 1.18624819225207e-14 1.10952981366807e-14 5.97369355975215e-19 794328.2 1.18624809647058e-14 1.10952984225245e-14 5.97369264956487e-19 1000000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 1258925 1.18624841173181e-14 1.10953014766084e-14 5.97369496543663e-19 1584893 1.18624831619671e-14 1.10953045456573e-14 5.97369413279123e-19 1995262 1.18624818158717e-14 1.10952961895412e-14 5.97369420169496e-19 2511886 1.18624791678805e-14 1.10953010529298e-14 5.97369381079182e-19 3162278 1.18624782610481e-14 1.10952950646205e-14 5.97369433283237e-19 3981072 1.18624776976897e-14 1.10952975830302e-14 5.97369139280019e-19 5011872 1.18624809602386e-14 1.10952977061258e-14 5.97369293813748e-19 6309573 1.18624819225207e-14 1.10952981366807e-14 5.97369355975215e-19 7943282 1.18624809647058e-14 1.10952984225245e-14 5.97369264956487e-19 10000000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 12589250 1.18624841173181e-14 1.10953014766084e-14 5.97369496543663e-19 15848930 1.18624831619671e-14 1.10953045456573e-14 5.97369413279123e-19 19952620 1.18624818158717e-14 1.10952961895412e-14 5.97369420169496e-19 25118860 1.18624791678805e-14 1.10953010529298e-14 5.97369381079182e-19 31622780 1.18624782610481e-14 1.10952950646205e-14 5.97369433283237e-19 39810720 1.18624776976897e-14 1.10952975830302e-14 5.97369139280019e-19 50118720 1.18624809602386e-14 1.10952977061258e-14 5.97369293813748e-19 63095730 1.18624819225207e-14 1.10952981366807e-14 5.97369355975215e-19 79432820 1.18624809647058e-14 1.10952984225245e-14 5.97369264956487e-19 100000000 1.18624799932022e-14 1.10952990548186e-14 5.97369298612144e-19 1000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 1258.925 1.16711012227059e-14 1.08998478159318e-14 5.83200322949686e-19 1584.893 1.16711027403585e-14 1.08998470723553e-14 5.8320015234462e-19 1995.262 1.1671098200607e-14 1.08998444859263e-14 5.83200188679503e-19 2511.886 1.16710980679384e-14 1.08998458577299e-14 5.83200210002624e-19 3162.278 1.16710964196663e-14 1.0899841590417e-14 5.8320025172214e-19 3981.072 1.16710954409585e-14 1.08998455749339e-14 5.83200167975147e-19 5011.872 1.1671096381577e-14 1.08998452366221e-14 5.83200267937155e-19 6309.573 1.16710971331346e-14 1.0899844657968e-14 5.83200076028219e-19 7943.282 1.16710970776141e-14 1.08998451383068e-14 5.83200109045077e-19 10000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 12589.25 1.16711012227059e-14 1.08998478159318e-14 5.83200322949686e-19 15848.93 1.16711027403585e-14 1.08998470723553e-14 5.8320015234462e-19 19952.62 1.1671098200607e-14 1.08998444859263e-14 5.83200188679503e-19 25118.86 1.16710980679384e-14 1.08998458577299e-14 5.83200210002624e-19 31622.78 1.16710964196663e-14 1.0899841590417e-14 5.8320025172214e-19 39810.72 1.16710954409585e-14 1.08998455749339e-14 5.83200167975147e-19 50118.72 1.1671096381577e-14 1.08998452366221e-14 5.83200267937155e-19 63095.73 1.16710971331346e-14 1.0899844657968e-14 5.83200076028219e-19 79432.82 1.16710970776141e-14 1.08998451383068e-14 5.83200109045077e-19 100000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 125892.5 1.16711012227059e-14 1.08998478159318e-14 5.83200322949686e-19 158489.3 1.16711027403585e-14 1.08998470723553e-14 5.8320015234462e-19 199526.2 1.1671098200607e-14 1.08998444859263e-14 5.83200188679503e-19 251188.6 1.16710980679384e-14 1.08998458577299e-14 5.83200210002624e-19 316227.8 1.16710964196663e-14 1.0899841590417e-14 5.8320025172214e-19 398107.2 1.16710954409585e-14 1.08998455749339e-14 5.83200167975147e-19 501187.2 1.1671096381577e-14 1.08998452366221e-14 5.83200267937155e-19 630957.3 1.16710971331346e-14 1.0899844657968e-14 5.83200076028219e-19 794328.2 1.16710970776141e-14 1.08998451383068e-14 5.83200109045077e-19 1000000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 1258925 1.16711012227059e-14 1.08998478159318e-14 5.83200322949686e-19 1584893 1.16711027403585e-14 1.08998470723553e-14 5.8320015234462e-19 1995262 1.1671098200607e-14 1.08998444859263e-14 5.83200188679503e-19 2511886 1.16710980679384e-14 1.08998458577299e-14 5.83200210002624e-19 3162278 1.16710964196663e-14 1.0899841590417e-14 5.8320025172214e-19 3981072 1.16710954409585e-14 1.08998455749339e-14 5.83200167975147e-19 5011872 1.1671096381577e-14 1.08998452366221e-14 5.83200267937155e-19 6309573 1.16710971331346e-14 1.0899844657968e-14 5.83200076028219e-19 7943282 1.16710970776141e-14 1.08998451383068e-14 5.83200109045077e-19 10000000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 12589250 1.16711012227059e-14 1.08998478159318e-14 5.83200322949686e-19 15848930 1.16711027403585e-14 1.08998470723553e-14 5.8320015234462e-19 19952620 1.1671098200607e-14 1.08998444859263e-14 5.83200188679503e-19 25118860 1.16710980679384e-14 1.08998458577299e-14 5.83200210002624e-19 31622780 1.16710964196663e-14 1.0899841590417e-14 5.8320025172214e-19 39810720 1.16710954409585e-14 1.08998455749339e-14 5.83200167975147e-19 50118720 1.1671096381577e-14 1.08998452366221e-14 5.83200267937155e-19 63095730 1.16710971331346e-14 1.0899844657968e-14 5.83200076028219e-19 79432820 1.16710970776141e-14 1.08998451383068e-14 5.83200109045077e-19 100000000 1.16710961741342e-14 1.08998440523063e-14 5.83200052338559e-19 ngspice-26/tests/hisim/nmos/reference/2_dcSweep_CORSRD=-1_GDLD.standard0000644000265600020320000002211412264261473025054 0ustar andreasadminV(d) I(d) 2.000000e-01 3.493708e-09 3.000000e-01 4.378964e-09 4.000000e-01 5.428276e-09 5.000000e-01 6.590064e-09 6.000000e-01 7.825570e-09 7.000000e-01 9.112953e-09 8.000000e-01 1.044104e-08 9.000000e-01 1.180413e-08 1.000000e+00 1.319912e-08 1.100000e+00 1.462419e-08 1.200000e+00 1.607813e-08 1.300000e+00 1.756008e-08 1.400000e+00 1.906937e-08 1.500000e+00 2.060547e-08 1.600000e+00 2.216791e-08 1.700000e+00 2.375632e-08 1.800000e+00 2.537035e-08 2.000000e-01 5.036470e-06 3.000000e-01 5.702009e-06 4.000000e-01 6.438144e-06 5.000000e-01 7.231171e-06 6.000000e-01 8.063066e-06 7.000000e-01 8.922693e-06 8.000000e-01 9.804330e-06 9.000000e-01 1.070515e-05 1.000000e+00 1.162370e-05 1.100000e+00 1.255919e-05 1.200000e+00 1.351111e-05 1.300000e+00 1.447914e-05 1.400000e+00 1.546302e-05 1.500000e+00 1.646253e-05 1.600000e+00 1.747750e-05 1.700000e+00 1.850778e-05 1.800000e+00 1.955322e-05 2.000000e-01 6.064632e-04 3.000000e-01 6.318495e-04 4.000000e-01 6.520130e-04 5.000000e-01 6.698391e-04 6.000000e-01 6.864092e-04 7.000000e-01 7.021837e-04 8.000000e-01 7.173964e-04 9.000000e-01 7.321881e-04 1.000000e+00 7.466530e-04 1.100000e+00 7.608581e-04 1.200000e+00 7.748528e-04 1.300000e+00 7.886747e-04 1.400000e+00 8.023530e-04 1.500000e+00 8.159110e-04 1.600000e+00 8.293674e-04 1.700000e+00 8.427376e-04 1.800000e+00 8.560343e-04 2.000000e-01 2.136083e-03 3.000000e-01 2.337787e-03 4.000000e-01 2.397158e-03 5.000000e-01 2.438987e-03 6.000000e-01 2.474871e-03 7.000000e-01 2.506610e-03 8.000000e-01 2.535412e-03 9.000000e-01 2.562078e-03 1.000000e+00 2.587140e-03 1.100000e+00 2.610958e-03 1.200000e+00 2.633786e-03 1.300000e+00 2.655804e-03 1.400000e+00 2.677145e-03 1.500000e+00 2.697912e-03 1.600000e+00 2.718183e-03 1.700000e+00 2.738020e-03 1.800000e+00 2.757474e-03 2.000000e-01 3.518468e-03 3.000000e-01 4.100458e-03 4.000000e-01 4.360846e-03 5.000000e-01 4.463405e-03 6.000000e-01 4.514623e-03 7.000000e-01 4.557633e-03 8.000000e-01 4.596139e-03 9.000000e-01 4.630970e-03 1.000000e+00 4.662831e-03 1.100000e+00 4.692318e-03 1.200000e+00 4.719910e-03 1.300000e+00 4.745973e-03 1.400000e+00 4.770791e-03 1.500000e+00 4.794577e-03 1.600000e+00 4.817496e-03 1.700000e+00 4.839677e-03 1.800000e+00 4.861221e-03 2.000000e-01 5.053748e-03 3.000000e-01 6.250978e-03 4.000000e-01 6.929935e-03 5.000000e-01 7.320157e-03 6.000000e-01 7.543441e-03 7.000000e-01 7.665566e-03 8.000000e-01 7.730453e-03 9.000000e-01 7.775107e-03 1.000000e+00 7.815115e-03 1.100000e+00 7.852195e-03 1.200000e+00 7.886691e-03 1.300000e+00 7.918887e-03 1.400000e+00 7.949077e-03 1.500000e+00 7.977539e-03 1.600000e+00 8.004522e-03 1.700000e+00 8.030238e-03 1.800000e+00 8.054866e-03 2.000000e-01 5.946467e-03 3.000000e-01 7.749894e-03 4.000000e-01 8.917859e-03 5.000000e-01 9.669278e-03 6.000000e-01 1.015886e-02 7.000000e-01 1.048160e-02 8.000000e-01 1.069427e-02 9.000000e-01 1.083221e-02 1.000000e+00 1.091972e-02 1.100000e+00 1.097580e-02 1.200000e+00 1.101791e-02 1.300000e+00 1.105608e-02 1.400000e+00 1.109202e-02 1.500000e+00 1.112598e-02 1.600000e+00 1.115813e-02 1.700000e+00 1.118864e-02 1.800000e+00 1.121767e-02 2.000000e-01 1.276098e-07 3.000000e-01 1.592395e-07 4.000000e-01 1.965927e-07 5.000000e-01 2.379230e-07 6.000000e-01 2.818687e-07 7.000000e-01 3.276599e-07 8.000000e-01 3.749029e-07 9.000000e-01 4.233969e-07 1.000000e+00 4.730330e-07 1.100000e+00 5.237471e-07 1.200000e+00 5.754973e-07 1.300000e+00 6.282536e-07 1.400000e+00 6.819930e-07 1.500000e+00 7.366968e-07 1.600000e+00 7.923494e-07 1.700000e+00 8.489375e-07 1.800000e+00 9.064492e-07 2.000000e-01 1.570626e-05 3.000000e-01 1.752484e-05 4.000000e-01 1.948054e-05 5.000000e-01 2.156541e-05 6.000000e-01 2.374095e-05 7.000000e-01 2.598185e-05 8.000000e-01 2.827506e-05 9.000000e-01 3.061427e-05 1.000000e+00 3.299638e-05 1.100000e+00 3.541976e-05 1.200000e+00 3.788344e-05 1.300000e+00 4.038680e-05 1.400000e+00 4.292936e-05 1.500000e+00 4.551076e-05 1.600000e+00 4.813066e-05 1.700000e+00 5.078879e-05 1.800000e+00 5.348487e-05 2.000000e-01 4.909374e-04 3.000000e-01 5.168516e-04 4.000000e-01 5.352953e-04 5.000000e-01 5.512961e-04 6.000000e-01 5.660062e-04 7.000000e-01 5.799213e-04 8.000000e-01 5.932944e-04 9.000000e-01 6.062738e-04 1.000000e+00 6.189556e-04 1.100000e+00 6.314061e-04 1.200000e+00 6.436733e-04 1.300000e+00 6.557931e-04 1.400000e+00 6.677932e-04 1.500000e+00 6.796954e-04 1.600000e+00 6.915172e-04 1.700000e+00 7.032728e-04 1.800000e+00 7.149739e-04 2.000000e-01 1.609265e-03 3.000000e-01 1.835698e-03 4.000000e-01 1.910442e-03 5.000000e-01 1.955907e-03 6.000000e-01 1.994438e-03 7.000000e-01 2.028346e-03 8.000000e-01 2.058904e-03 9.000000e-01 2.087012e-03 1.000000e+00 2.113289e-03 1.100000e+00 2.138160e-03 1.200000e+00 2.161919e-03 1.300000e+00 2.184780e-03 1.400000e+00 2.206898e-03 1.500000e+00 2.228388e-03 1.600000e+00 2.249340e-03 1.700000e+00 2.269826e-03 1.800000e+00 2.289902e-03 2.000000e-01 2.663007e-03 3.000000e-01 3.272221e-03 4.000000e-01 3.586927e-03 5.000000e-01 3.726197e-03 6.000000e-01 3.793787e-03 7.000000e-01 3.847097e-03 8.000000e-01 3.894742e-03 9.000000e-01 3.937762e-03 1.000000e+00 3.976935e-03 1.100000e+00 4.012980e-03 1.200000e+00 4.046502e-03 1.300000e+00 4.077981e-03 1.400000e+00 4.107789e-03 1.500000e+00 4.136214e-03 1.600000e+00 4.163477e-03 1.700000e+00 4.189753e-03 1.800000e+00 4.215178e-03 2.000000e-01 3.873537e-03 3.000000e-01 5.037191e-03 4.000000e-01 5.795786e-03 5.000000e-01 6.277075e-03 6.000000e-01 6.571591e-03 7.000000e-01 6.740814e-03 8.000000e-01 6.833899e-03 9.000000e-01 6.895711e-03 1.000000e+00 6.949762e-03 1.100000e+00 6.999722e-03 1.200000e+00 7.046098e-03 1.300000e+00 7.089233e-03 1.400000e+00 7.129495e-03 1.500000e+00 7.167254e-03 1.600000e+00 7.202847e-03 1.700000e+00 7.236571e-03 1.800000e+00 7.268681e-03 2.000000e-01 4.649979e-03 3.000000e-01 6.293114e-03 4.000000e-01 7.487667e-03 5.000000e-01 8.333851e-03 6.000000e-01 8.927063e-03 7.000000e-01 9.339501e-03 8.000000e-01 9.621738e-03 9.000000e-01 9.809735e-03 1.000000e+00 9.931250e-03 1.100000e+00 1.001007e-02 1.200000e+00 1.006857e-02 1.300000e+00 1.012083e-02 1.400000e+00 1.016983e-02 1.500000e+00 1.021604e-02 1.600000e+00 1.025967e-02 1.700000e+00 1.030094e-02 1.800000e+00 1.034005e-02 2.000000e-01 2.347260e-06 3.000000e-01 2.919021e-06 4.000000e-01 3.583022e-06 5.000000e-01 4.316027e-06 6.000000e-01 5.094991e-06 7.000000e-01 5.906532e-06 8.000000e-01 6.743777e-06 9.000000e-01 7.603219e-06 1.000000e+00 8.482967e-06 1.100000e+00 9.381908e-06 1.200000e+00 1.029932e-05 1.300000e+00 1.123468e-05 1.400000e+00 1.218760e-05 1.500000e+00 1.315776e-05 1.600000e+00 1.414490e-05 1.700000e+00 1.514879e-05 1.800000e+00 1.616923e-05 2.000000e-01 4.284778e-05 3.000000e-01 4.757104e-05 4.000000e-01 5.232663e-05 5.000000e-01 5.731968e-05 6.000000e-01 6.249683e-05 7.000000e-01 6.780982e-05 8.000000e-01 7.323305e-05 9.000000e-01 7.875447e-05 1.000000e+00 8.436849e-05 1.100000e+00 9.007242e-05 1.200000e+00 9.586484e-05 1.300000e+00 1.017449e-04 1.400000e+00 1.077119e-04 1.500000e+00 1.137655e-04 1.600000e+00 1.199051e-04 1.700000e+00 1.261304e-04 1.800000e+00 1.324409e-04 2.000000e-01 4.095305e-04 3.000000e-01 4.440710e-04 4.000000e-01 4.630333e-04 5.000000e-01 4.785433e-04 6.000000e-01 4.925565e-04 7.000000e-01 5.056974e-04 8.000000e-01 5.182683e-04 9.000000e-01 5.304420e-04 1.000000e+00 5.423268e-04 1.100000e+00 5.539951e-04 1.200000e+00 5.654979e-04 1.300000e+00 5.768722e-04 1.400000e+00 5.881460e-04 1.500000e+00 5.993411e-04 1.600000e+00 6.104746e-04 1.700000e+00 6.215604e-04 1.800000e+00 6.326098e-04 2.000000e-01 1.107585e-03 3.000000e-01 1.327522e-03 4.000000e-01 1.418299e-03 5.000000e-01 1.464808e-03 6.000000e-01 1.501261e-03 7.000000e-01 1.533174e-03 8.000000e-01 1.561870e-03 9.000000e-01 1.588167e-03 1.000000e+00 1.612660e-03 1.100000e+00 1.635773e-03 1.200000e+00 1.657810e-03 1.300000e+00 1.678988e-03 1.400000e+00 1.699468e-03 1.500000e+00 1.719367e-03 1.600000e+00 1.738778e-03 1.700000e+00 1.757770e-03 1.800000e+00 1.776400e-03 2.000000e-01 1.790176e-03 3.000000e-01 2.306697e-03 4.000000e-01 2.618959e-03 5.000000e-01 2.782832e-03 6.000000e-01 2.865636e-03 7.000000e-01 2.922587e-03 8.000000e-01 2.972211e-03 9.000000e-01 3.017295e-03 1.000000e+00 3.058564e-03 1.100000e+00 3.096620e-03 1.200000e+00 3.132018e-03 1.300000e+00 3.165231e-03 1.400000e+00 3.196646e-03 1.500000e+00 3.226567e-03 1.600000e+00 3.255236e-03 1.700000e+00 3.282845e-03 1.800000e+00 3.309544e-03 2.000000e-01 2.627758e-03 3.000000e-01 3.563210e-03 4.000000e-01 4.255819e-03 5.000000e-01 4.746425e-03 6.000000e-01 5.076371e-03 7.000000e-01 5.283887e-03 8.000000e-01 5.407765e-03 9.000000e-01 5.487654e-03 1.000000e+00 5.552490e-03 1.100000e+00 5.611824e-03 1.200000e+00 5.667226e-03 1.300000e+00 5.719066e-03 1.400000e+00 5.767652e-03 1.500000e+00 5.813319e-03 1.600000e+00 5.856406e-03 1.700000e+00 5.897229e-03 1.800000e+00 5.936073e-03 2.000000e-01 3.234534e-03 3.000000e-01 4.516761e-03 4.000000e-01 5.550484e-03 5.000000e-01 6.358814e-03 6.000000e-01 6.976276e-03 7.000000e-01 7.437447e-03 8.000000e-01 7.772677e-03 9.000000e-01 8.008373e-03 1.000000e+00 8.168817e-03 1.100000e+00 8.277350e-03 1.200000e+00 8.356510e-03 1.300000e+00 8.423817e-03 1.400000e+00 8.486297e-03 1.500000e+00 8.545384e-03 1.600000e+00 8.601416e-03 1.700000e+00 8.654591e-03 1.800000e+00 8.705110e-03 ngspice-26/tests/hisim/nmos/reference/66_acFreq_COIGN=0.standard0000644000265600020320000002533012264261473023753 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/69_acFreq_CODFM=0.standard0000644000265600020320000002533012264261473023747 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258.925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584.893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995.262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511.886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162.278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981.072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011.872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309.573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943.282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589.25 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848.93 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952.62 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118.86 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622.78 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810.72 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118.72 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095.73 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432.82 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 125892.5 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 158489.3 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 199526.2 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 251188.6 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 316227.8 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 398107.2 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 501187.2 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 630957.3 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 794328.2 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 1000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1258925 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 1584893 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 1995262 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 2511886 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 3162278 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 3981072 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 5011872 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 6309573 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 7943282 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 10000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 12589250 1.97239361628689e-14 1.52597217089105e-14 3.70121509427575e-15 15848930 1.97239426068025e-14 1.52597216325022e-14 3.70121480867672e-15 19952620 1.97239429028692e-14 1.52597184671462e-14 3.70121458243426e-15 25118860 1.97239370135589e-14 1.52597233745163e-14 3.70121479816972e-15 31622780 1.97239355773923e-14 1.52597148117833e-14 3.70121388675298e-15 39810720 1.97239340552502e-14 1.52597166420165e-14 3.70121379096234e-15 50118720 1.97239356448865e-14 1.52597191849829e-14 3.70121541675013e-15 63095730 1.97239363426458e-14 1.5259718955767e-14 3.70121327755096e-15 79432820 1.97239370867637e-14 1.52597182756252e-14 3.70121386275726e-15 100000000 1.97239288579298e-14 1.52597186478714e-14 3.70121345512869e-15 1000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258.925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584.893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 1995.262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511.886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162.278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981.072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011.872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309.573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943.282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589.25 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848.93 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 19952.62 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118.86 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622.78 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810.72 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118.72 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095.73 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432.82 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 125892.5 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 158489.3 1.95109718868175e-14 1.51047535001555e-14 3.63962622310805e-15 199526.2 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 251188.6 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 316227.8 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 398107.2 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 501187.2 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 630957.3 1.95109670680967e-14 1.51047556203098e-14 3.63962547928741e-15 794328.2 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 1000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1258925 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 1584893 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 1995262 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 2511886 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 3162278 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 3981072 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 5011872 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 6309573 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 7943282 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 10000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 12589250 1.95109668301981e-14 1.51047544715913e-14 3.63962642646307e-15 15848930 1.95109718868175e-14 1.51047535001555e-14 3.63962622310804e-15 19952620 1.95109665127734e-14 1.5104756207581e-14 3.63962611780622e-15 25118860 1.95109689112165e-14 1.51047556889549e-14 3.63962626296804e-15 31622780 1.95109625063379e-14 1.51047511843666e-14 3.63962502993507e-15 39810720 1.95109637264445e-14 1.51047542624331e-14 3.63962502022946e-15 50118720 1.95109667929594e-14 1.51047550903703e-14 3.63962545353344e-15 63095730 1.95109670680966e-14 1.51047556203098e-14 3.63962547928741e-15 79432820 1.95109659595757e-14 1.51047565948145e-14 3.63962591157085e-15 100000000 1.95109636285785e-14 1.51047558459806e-14 3.63962526680042e-15 1000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258.925 1.92253810991621e-14 1.48903692202894e-14 3.56434127432084e-15 1584.893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995.262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511.886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162.278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981.072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011.872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309.573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943.282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 12589.25 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848.93 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952.62 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118.86 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622.78 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810.72 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118.72 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095.73 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432.82 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 125892.5 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 158489.3 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 199526.2 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 251188.6 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 316227.8 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 398107.2 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 501187.2 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 630957.3 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 794328.2 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 1000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 1258925 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 1584893 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 1995262 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 2511886 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 3162278 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 3981072 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 5011872 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 6309573 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 7943282 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 10000000 1.92253759986944e-14 1.4890367771438e-14 3.56434020406966e-15 12589250 1.9225381099162e-14 1.48903692202894e-14 3.56434127432084e-15 15848930 1.92253774282935e-14 1.48903668582769e-14 3.56434035056938e-15 19952620 1.92253787339494e-14 1.48903679515283e-14 3.56434016040392e-15 25118860 1.92253830705381e-14 1.48903683061494e-14 3.56434040408303e-15 31622780 1.92253744558627e-14 1.48903688955248e-14 3.56433958280694e-15 39810720 1.92253775196461e-14 1.48903687155692e-14 3.56433941732356e-15 50118720 1.92253792620511e-14 1.48903699392117e-14 3.56433930514772e-15 63095730 1.9225379382497e-14 1.48903687367082e-14 3.56434085334647e-15 79432820 1.92253788350262e-14 1.48903688926545e-14 3.56433905927632e-15 100000000 1.92253759986944e-14 1.48903677714381e-14 3.56434020406966e-15 ngspice-26/tests/hisim/nmos/reference/38_acVd_WPE.standard0000644000265600020320000000714512264261473023051 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.2 4.879851e-03 1.416144e-02 1.30788235411485e-14 1.08328529330422e-14 0.3 6.985424e-03 7.388579e-03 1.3689053706371e-14 9.78265664869697e-15 0.4 8.361339e-03 4.040217e-03 1.4335683881449e-14 8.34336825900336e-15 0.5 9.285978e-03 2.283486e-03 1.48936340325164e-14 6.52389676637352e-15 0.6 9.933689e-03 1.306736e-03 1.51394940990841e-14 4.95404134132831e-15 0.7 1.037048e-02 7.755157e-04 1.51357540980715e-14 4.16004712635091e-15 0.8 1.052015e-02 6.124483e-04 1.51122340917033e-14 3.91560506016716e-15 0.9 1.054200e-02 5.889516e-04 1.51105540912485e-14 3.86454304634189e-15 1 1.056237e-02 5.697613e-04 1.51101340911347e-14 3.81650103333431e-15 1.1 1.058429e-02 5.512717e-04 1.51099340910806e-14 3.76311101887873e-15 1.2 1.060618e-02 5.344853e-04 1.51098340910535e-14 3.70233400242309e-15 1.3 1.062701e-02 5.198808e-04 1.51097740910373e-14 3.63109698313535e-15 1.4 1.064634e-02 5.074430e-04 1.51097440910291e-14 3.54443995967259e-15 1.5 1.066411e-02 4.969315e-04 1.51097240910237e-14 3.44464393265238e-15 1.6 1.068038e-02 4.880476e-04 1.5109714091021e-14 3.3389759040423e-15 1.7 1.069530e-02 4.805076e-04 1.5109714091021e-14 3.23308687537238e-15 1.8 1.070905e-02 4.740676e-04 1.51097040910183e-14 3.12226384536656e-15 0.2 3.802179e-03 1.353322e-02 1.29089134951447e-14 1.06701728889959e-14 0.3 5.653421e-03 8.425204e-03 1.35017636556614e-14 9.62854760697128e-15 0.4 7.120299e-03 5.133327e-03 1.41256838245905e-14 8.22952522817987e-15 0.5 8.263516e-03 3.045152e-03 1.46691139717266e-14 6.49103975747734e-15 0.6 9.142693e-03 1.729019e-03 1.49303940424693e-14 4.96365234393053e-15 0.7 9.730382e-03 9.956798e-04 1.49472540470343e-14 4.17615813071304e-15 0.8 9.970185e-03 7.355513e-04 1.4921514040065e-14 3.88341205145076e-15 0.9 1.002678e-02 6.832700e-04 1.49169940388412e-14 3.80813003106782e-15 1 1.006579e-02 6.526906e-04 1.49165040387086e-14 3.75546601680881e-15 1.1 1.010527e-02 6.245027e-04 1.49163740386734e-14 3.70016600183609e-15 1.2 1.014417e-02 5.990423e-04 1.49163140386571e-14 3.64064698572106e-15 1.3 1.018118e-02 5.768489e-04 1.4916284038649e-14 3.57439896778412e-15 1.4 1.021570e-02 5.578740e-04 1.49162640386436e-14 3.49655594670778e-15 1.5 1.024762e-02 5.417749e-04 1.49162440386382e-14 3.40802292273708e-15 1.6 1.027705e-02 5.281263e-04 1.49162440386382e-14 3.31269389692633e-15 1.7 1.030420e-02 5.165185e-04 1.49162340386355e-14 3.21602087075168e-15 1.8 1.032934e-02 5.065936e-04 1.49162340386355e-14 3.12047484488218e-15 0.2 2.623289e-03 1.051300e-02 1.2659463427605e-14 1.04773128367782e-14 0.3 3.990953e-03 7.639791e-03 1.32204935795063e-14 9.47513056543295e-15 0.4 5.249032e-03 5.286341e-03 1.38072237383661e-14 8.17120821239028e-15 0.5 6.366432e-03 3.458554e-03 1.43340138809968e-14 6.57902178129885e-15 0.6 7.312467e-03 2.113288e-03 1.46338439621771e-14 5.10068038103147e-15 0.7 8.008252e-03 1.253243e-03 1.4692113977954e-14 4.24013914803618e-15 0.8 8.387748e-03 8.463849e-04 1.46720639725253e-14 3.88369205152657e-15 0.9 8.530158e-03 7.234575e-04 1.46599939692573e-14 3.74999301532697e-15 1 8.602435e-03 6.789282e-04 1.4657543968594e-14 3.68240499702722e-15 1.1 8.665151e-03 6.462217e-04 1.46571439684857e-14 3.62352398108493e-15 1.2 8.725938e-03 6.168982e-04 1.4657063968464e-14 3.56533496533e-15 1.3 8.784369e-03 5.907493e-04 1.46570339684559e-14 3.50426994879638e-15 1.4 8.839689e-03 5.679178e-04 1.46570239684532e-14 3.43490793001631e-15 1.5 8.891586e-03 5.482380e-04 1.46570139684505e-14 3.35751390906154e-15 1.6 8.940083e-03 5.313680e-04 1.46570139684505e-14 3.27387988641726e-15 1.7 8.985378e-03 5.169168e-04 1.46570039684478e-14 3.18717686294204e-15 1.8 9.027750e-03 5.045096e-04 1.46570039684478e-14 3.10078283955048e-15 ngspice-26/tests/hisim/nmos/parameters/0000755000265600020320000000000012264261473017623 5ustar andreasadminngspice-26/tests/hisim/nmos/parameters/nmosParameters0000644000265600020320000000700712264261473022552 0ustar andreasadmin+ CORSRD = ( 0 ) + CORG = ( 0 ) + COADOV = ( 1 ) + COISUB = ( 0 ) + COIIGS = ( 0 ) + COGIDL = ( 0 ) + COOVLP = ( 1 ) + COFLICK = ( 0 ) + COISTI = ( 0 ) + CONQS = ( 0 ) + COTHRML = ( 0 ) + COIGN = ( 0 ) + CODFM = ( 0 ) + CORBNET = ( 0 ) + COQY = ( 0 ) + CORECIP = ( 1 ) + VMAX = ( 3.57E+06 ) + BGTMP1 = ( 9.0E-05 ) + BGTMP2 = ( -1.27E-07 ) + EG0 = ( 1.041 ) + TOX = ( 1.6E-09 ) + XLD = ( 1.0E-08 ) + LOVER = ( 1.9E-08 ) + DDLTMAX = ( 10 ) + DDLTSLP = ( 2.7 ) + DDLTICT = ( 1.28 ) + VFBOVER = ( 0.0 ) + NOVER = ( 4.5E+19 ) + XWD = ( 0 ) + XL = ( 0 ) + XW = ( 2e-9 ) + SAREF = ( 0 ) + SBREF = ( 0 ) + LL = ( 0 ) + LLD = ( 0 ) + LLN = ( 0 ) + WL = ( 0 ) + WL1 = ( -7E-09 ) + WL1P = ( 0 ) + WL2 = ( 0.0006 ) + WL2P = ( 0.8 ) + WLD = ( 0 ) + WLN = ( 0 ) + RSH = ( 0 ) + RSHG = ( 0 ) + XQY = ( 1E-08 ) + XQY1 = ( 0 ) + XQY2 = ( 0 ) + RS = ( 0 ) + RD = ( 0 ) + VFBC = ( -0.9 ) + VBI = ( 1.1 ) + NSUBC = ( 1.85E+17 ) + PARL2 = ( 1.88E-08 ) + LP = ( 9E-08 ) + NSUBP = ( 2.2E+18 ) + NSUBPW = ( 0 ) + NSUBPWP = ( 1 ) + SCP1 = ( 2.35E-05 ) + SCP2 = ( 0 ) + SCP3 = ( 0 ) + SC1 = ( 5.4 ) + SC2 = ( 0 ) + SC3 = ( 4.36E-10 ) + PGD1 = ( 0 ) + PGD2 = ( 1 ) + PGD4 = ( 0.4 ) + BB = ( 2 ) + NDEP = ( 0.5 ) + NDEPL = ( 0.3 ) + NDEPLP = ( 0.52 ) + NINV = ( 0.5 ) + MUECB0 = ( 2130 ) + MUECB1 = ( 11.4 ) + MUEPH0 = ( 0.3 ) + MUEPH1 = ( 3.0E+04 ) + MUEPHW = ( -0.36 ) + MUEPWP = ( 0.1 ) + MUEPHL = ( -0.08 ) + MUEPLP = ( 0.7 ) + MUEPHS = ( 0.08 ) + MUEPSP = ( 0.31 ) + VTMP = ( -0.7 ) + WVTH0 = ( 0 ) + MUESR0 = ( 2 ) + MUESR1 = ( 7.4E+14 ) + MUESRL = ( 0.00065 ) + MUESRW = ( 0 ) + MUESWP = ( 0.1 ) + MUESLP = ( 1.4 ) + MUETMP = ( 1.7 ) + SUB1 = ( 0 ) + SUB2 = ( 0 ) + SVGS = ( 0 ) + SVBS = ( 0 ) + SVBSL = ( 0 ) + SVDS = ( 0 ) + SLG = ( 0 ) + SUB1L = ( 0 ) + SUB2L = ( 0 ) + SVGSL = ( 0 ) + SVGSLP = ( 0 ) + SVGSWP = ( 0 ) + SVGSW = ( 0 ) + SVBSLP = ( 0 ) + SLGL = ( 0 ) + SLGLP = ( 0 ) + SUB1LP = ( 0 ) + NSTI = ( 1E+17 ) + WSTI = ( 0 ) + WSTIL = ( 0 ) + WSTILP = ( 0 ) + WSTIW = ( 0 ) + WSTIWP = ( 0 ) + SCSTI1 = ( 0 ) + SCSTI2 = ( 0 ) + VTHSTI = ( 0 ) + VDSTI = ( 0 ) + MUESTI1 = ( 0 ) + MUESTI2 = ( 0 ) + MUESTI3 = ( 1 ) + NSUBPSTI1 = ( 0 ) + NSUBPSTI2 = ( 0 ) + NSUBPSTI3 = ( 1 ) + LPEXT = ( 1E-05 ) + NPEXT = ( 6.27E+17 ) + SCP21 = ( 0.178 ) + SCP22 = ( 0 ) + BS1 = ( 0.032 ) + BS2 = ( 0.9 ) + TPOLY = ( 0 ) + CGBO = ( 0 ) + CLM1 = ( 1.0 ) + CLM2 = ( 1.4 ) + CLM3 = ( 0.78 ) + CLM5 = ( 1 ) + CLM6 = ( 2.56 ) + VOVER = ( 0.8 ) + VOVERP = ( 0.5 ) + WFC = ( 6E-14 ) + QME1 = ( 1E-12 ) + QME2 = ( 2.0 ) + QME3 = ( 0 ) + VOVERS = ( 0.0005 ) + VOVERSP = ( 1 ) + GIDL1 = ( 1.65 ) + GIDL2 = ( 4.9E+07 ) + GIDL3 = ( 1 ) + GIDL4 = ( 0.85 ) + GIDL5 = ( 0 ) + GLEAK1 = ( 5.3E+06 ) + GLEAK2 = ( 5.2E+07 ) + GLEAK3 = ( 0.05 ) + GLEAK4 = ( 0.3 ) + GLEAK5 = ( 5E+05 ) + GLEAK6 = ( 0.925 ) + GLEAK7 = ( 1.5E-06 ) + GLKSD1 = ( 2.5E-14 ) + GLKSD2 = ( 8.3E+06 ) + GLKSD3 = ( 0.55 ) + GLKB1 = ( 0 ) + GLKB2 = ( 0 ) + GLKB3 = ( 0 ) + EGIG = ( 0 ) + IGTEMP2 = ( 32 ) + IGTEMP3 = ( 0 ) + VZADD0 = ( 0.1 ) + PZADD0 = ( 0.1 ) + NFTRP = ( 0 ) + NFALP = ( 0 ) + CIT = ( 0 ) + KAPPA = ( 3.9 ) + CGSO = ( 0 ) + CGDO = ( 0 ) + TNOM = ( 27 ) + OVSLP = ( 3E-08 ) + OVMAG = ( 5 ) + IBPC1 = ( 0 ) + IBPC2 = ( 0 ) + DLY1 = ( 1E-08 ) + DLY2 = ( 0.1 ) + DLY3 = ( 1E-07 ) + NSUBPL = ( 0.3 ) + NSUBPFAC = ( 1.0 ) + QYRAT = ( 0.5 ) + GDL = ( 0.01067 ) + GDLP = ( 0.2198 ) + PTL = ( 0.3614 ) + PTLP = ( 1 ) + PT4 = ( 10 ) + PT4P = ( 0 ) + GDLD = ( 0 ) + MUEPHL2 = ( -0.014 ) + MUEPLP2 = ( 1.1 ) + NSUBCW = ( -0.11 ) + NSUBCWP = ( 1 ) + NSUBCMAX = ( 5E+18 ) + NSUBCW2 = ( 0 ) + NSUBCWP2 = ( 1 ) + MUEPHW2 = ( 0 ) + MUEPWP2 = ( 1 ) + SC3VBS = ( -2.5 ) ngspice-26/tests/hisim/nmos/qaSpec0000644000265600020320000006311712264261473016627 0ustar andreasadmin // // Test specification for HiSIM (version 2.7.0) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // `ifdef ngspice nTypeSelectionArguments nmos level=61 version=270 pTypeSelectionArguments pmos level=61 version=270 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 scaleParameters m // // Specific tests // test 1_dcSweep_CORSRD=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters CORSRD=0 GDLD=0.001 test 2_dcSweep_CORSRD=-1_GDLD temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=-1.0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.1 NRS=0.01 modelParameters CORSRD=-1 RSH=1 GDLD=0.0001 test 3_dcSweep_CORSRD=-1_PT temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0.5 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.01 NRS=0.1 AD=1e-8 AS=1e-8 PD=1e-3 PS=1e-3 modelParameters CORSRD=-1 RSH=10 PT4P=0.1 test 4_dcSweep_NSUBPFAC temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters NSUBPL=0.1 NSUBPFAC=0.6 test 5_dcSweep_NSUBPDLT temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters NSUBPL=0.1 NSUBPFAC=0.8 NSUBPDLT=0.001 test 6_dcSweep_COISUB=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=0 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 7_dcSweep_COISUB=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=1 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 8_dcSweep_COIIGS=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 test 9_dcSweep_COIIGS=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=1 test 10_dcSweep_COGIDL=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 GIDL7=1.05 test 11_dcSweep_COGIDL=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 test 12_dcSweep_COGIDL=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL7=1.05 test 13_dcSweep_COISTI=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=0 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=5 modelParameters NSUBPSTI1=2e-6 NSUBPSTI2=1e-6 NSUBPSTI3=1.5 test 14_dcSweep_COISTI=1_NSUBC temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=5 modelParameters NSUBCSTI1=2e-6 NSUBCSTI2=1e-6 NSUBCSTI3=1.4 test 15_dcSweep_COISTI=1_NSUBP temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 WSTI=0.1E-4 instanceParameters SA=1e-6 SB=2e-6 SD=1e-6 NF=2 modelParameters NSUBPSTI1=2e-6 NSUBPSTI2=1e-6 NSUBPSTI3=1.5 test 16_dcSweep_WPE temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=1E16 NPEXTWPE=1E16 instanceParameters SCA=4.244122e-01 SCB=2.561023e-09 SCC=3.215142e-18 test 19_dcSweep_CORG=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=0 RSHG=10 test 20_dcSweep_CORG=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=1 RSHG=10 test 21_dcSweep_CORBNET=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=0 test 22_dcSweep_CORBNET=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) I(b) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=1 test 23_dcSweep_CODFM=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=0 test 24_dcSweep_CODFM=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=1 test 25_dcSweep_VFBCL temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 biasList V(g)=0.4,0.6,0.8,1.0,1.2,1.5,1.8 biasSweep V(d)=0.2,1.800000000001,0.1 outputs I(d) instanceParameters W=10e-6 L=100e-9 modelParameters VFBCL=0.8 VFBCLP=1.2 test 35_acVd_CORSRD=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(g)=1.2 biasSweep V(d)=0.2,1.800000000001,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORSRD=0 GDLD=0.001 test 36_acVd_CORSRD=-1_GDLD temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=-1.0 V(g)=1.2 biasSweep V(d)=0.2,1.800000000001,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=1 NRS=0.1 modelParameters CORSRD=-1 RSH=10 GDLD=0.001 test 37_acVd_CORSRD=-1_PT temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0.5 V(g)=1.2 biasSweep V(d)=0.2,1.800000000001,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 instanceParameters NRD=0.1 NRS=1 AD=1e-8 AS=1e-8 PD=1e-3 PS=1e-3 modelParameters CORSRD=-1 RSH=100 PT4P=0.1 test 38_acVd_WPE temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0.5 V(g)=1.2 biasSweep V(d)=0.2,1.800000000001,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=2E16 NPEXTWPE=3E16 instanceParameters SCA=4.25e-01 SCB=2.56e-09 SCC=3.2e-18 test 39_acVd_VFBCL temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0.5 V(g)=1.2 biasSweep V(d)=0.2,1.800000000001,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters W=10e-6 L=500e-9 modelParameters VFBCL=0.8 VFBCLP=1.2 test 45_acFreq_COOVLP=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COOVLP=1 test 46_acFreq_COISUB=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=0 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 47_acFreq_COISUB=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISUB=1 SUB1=1 SVGS=1 SVDS=1 SUB1L=0.1 SUB2L=0.1 SLG=1 SVBS=1 test 48_acFreq_COIIGS=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 test 49_acFreq_COIIGS=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=1 test 50_acFreq_COGIDL=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=0 GIDL6=-1.0 GIDL7=1.05 test 51_acFreq_COGIDL=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COGIDL=1 GIDL6=-1.0 GIDL7=1.05 test 52_acFreq_COSTI=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=0 test 53_acFreq_COSTI=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COISTI=1 test 54_acFreq_COADOV=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COADOV=0 test 55_acFreq_COADOV=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COADOV=1 test 56_acFreq_CONQS=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CONQS=0 test 57_acFreq_CONQS=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CONQS=1 test 58_acFreq_CORG=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=0 RSHG=10 test 59_acFreq_CORG=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NGCON=0.1 modelParameters CORG=1 RSHG=10 test 60_acFreq_CORBNET=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=0 test 61_acFreq_CORBNET=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters CORBNET=1 test 62_acFreq_COFLICK=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COFLICK=0 test 63_acFreq_COFLICK=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COFLICK=1 test 64_acFreq_COTHRML=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COTHRML=0 test 65_acFreq_COTHRML=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COTHRML=1 test 66_acFreq_COIGN=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIGN=0 test 67_acFreq_COIGN=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters COIGN=1 test 68_acFreq_WPE temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 modelParameters WEB=-1200 WEC=-1200 NSUBCWPE=1E-16 NSUBPWPE=1E16 NPEXTWPE=1E16 instanceParameters SCA=4.25e-01 SCB=2.56e-09 SCC=3.2e-18 test 69_acFreq_CODFM=0 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=0 test 70_acFreq_CODFM=1 temperature -55 27 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.5 V(g)=1.5 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters W=10e-6 L=100e-9 NSUBCDFM=1E17 modelParameters CODFM=1 test 75_noise_COIGN=1_T27 temperature 27 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 76_noise_COIGN=1_T-55 temperature -55 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 77_noise_COIGN=1_T150 temperature 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=1 test 78_noise_COIGN=0_T27 temperature 27 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 test 79_noise_COIGN=0_T-55 temperature -55 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 test 80_noise_COIGN=0_T150 temperature 150 modelParameters parameters/nmosParameters biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.5,1.0 freq dec 10 1e3 1e11 outputs N(g) instanceParameters W=10e-6 L=100e-9 modelParameters COIIGS=0 COTHRML=1 COIGN=0 COFLICK=1 FALPH=1.0 ngspice-26/tests/hisim/nmos/run0000644000265600020320000000010612264261473016204 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean ngspice | tee cmcqa_nmos.log ngspice-26/tests/hisim/Makefile.in0000644000265600020320000003365612264261541016562 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/hisim DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/hisim/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/hisim/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: rm -rf nmos/results pmos/results ngspiceCkt # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim4/0000755000265600020320000000000012264261714014407 5ustar andreasadminngspice-26/tests/bsim4/pmos/0000755000265600020320000000000012264261473015367 5ustar andreasadminngspice-26/tests/bsim4/pmos/reference/0000755000265600020320000000000012264261473017325 5ustar andreasadminngspice-26/tests/bsim4/pmos/reference/acFreq_geomod.standard0000644000265600020320000000710512264261473023605 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/noise4.standard0000644000265600020320000000635012264261473022254 0ustar andreasadminFreq N(d) 1000 6.379833e-20 1258.925 4.956217e-20 1584.893 3.851139e-20 1995.262 2.993326e-20 2511.886 2.327451e-20 3162.278 1.810567e-20 3981.072 1.409337e-20 5011.872 1.097884e-20 6309.573 8.561194e-21 7943.282 6.684503e-21 10000 5.227727e-21 12589.25 4.096908e-21 15848.93 3.219114e-21 19952.62 2.537728e-21 25118.86 2.008805e-21 31622.78 1.59823e-21 39810.72 1.279522e-21 50118.72 1.032126e-21 63095.73 8.400851e-22 79432.82 6.910142e-22 100000 5.752983e-22 125892.5 4.854742e-22 158489.3 4.157485e-22 199526.2 3.616242e-22 251188.6 3.196103e-22 316227.8 2.869971e-22 398107.2 2.616813e-22 501187.2 2.420299e-22 630957.3 2.267756e-22 794328.2 2.149345e-22 1000000 2.057428e-22 1258925 1.986078e-22 1584893 1.930693e-22 1995262 1.887701e-22 2511886 1.854328e-22 3162278 1.828422e-22 3981072 1.808313e-22 5011872 1.792704e-22 6309573 1.780587e-22 7943282 1.771181e-22 10000000 1.76388e-22 12589250 1.758212e-22 15848930 1.753813e-22 19952620 1.750398e-22 25118860 1.747747e-22 31622780 1.745689e-22 39810720 1.744092e-22 50118720 1.742852e-22 63095730 1.741889e-22 79432820 1.741142e-22 100000000 1.740562e-22 1000 1.109819e-19 1258.925 8.618765e-20 1584.893 6.694117e-20 1995.262 5.200114e-20 2511.886 4.040398e-20 3162.278 3.140173e-20 3981.072 2.441375e-20 5011.872 1.898935e-20 6309.573 1.477868e-20 7943.282 1.151016e-20 10000 8.972979e-21 12589.25 7.0035e-21 15848.93 5.474698e-21 19952.62 4.287969e-21 25118.86 3.366774e-21 31622.78 2.6517e-21 39810.72 2.096625e-21 50118.72 1.66575e-21 63095.73 1.331284e-21 79432.82 1.071656e-21 100000 8.701209e-22 125892.5 7.136796e-22 158489.3 5.922425e-22 199526.2 4.979773e-22 251188.6 4.248042e-22 316227.8 3.680038e-22 398107.2 3.239126e-22 501187.2 2.89687e-22 630957.3 2.631195e-22 794328.2 2.424965e-22 1000000 2.26488e-22 1258925 2.140614e-22 1584893 2.044153e-22 1995262 1.969275e-22 2511886 1.911152e-22 3162278 1.866034e-22 3981072 1.831011e-22 5011872 1.803825e-22 6309573 1.782721e-22 7943282 1.76634e-22 10000000 1.753624e-22 12589250 1.743753e-22 15848930 1.736091e-22 19952620 1.730143e-22 25118860 1.725526e-22 31622780 1.721942e-22 39810720 1.71916e-22 50118720 1.717001e-22 63095730 1.715325e-22 79432820 1.714023e-22 100000000 1.713013e-22 1000 1.625916e-19 1258.925 1.262485e-19 1584.893 9.803737e-20 1995.262 7.613853e-20 2511.886 5.913962e-20 3162.278 4.594426e-20 3981.072 3.57014e-20 5011.872 2.775041e-20 6309.573 2.157848e-20 7943.282 1.678754e-20 10000 1.306858e-20 12589.25 1.018175e-20 15848.93 7.940859e-21 19952.62 6.201372e-21 25118.86 4.8511e-21 31622.78 3.802956e-21 39810.72 2.989337e-21 50118.72 2.357767e-21 63095.73 1.867513e-21 79432.82 1.486955e-21 100000 1.191548e-21 125892.5 9.622388e-22 158489.3 7.842383e-22 199526.2 6.46066e-22 251188.6 5.388101e-22 316227.8 4.55553e-22 398107.2 3.90925e-22 501187.2 3.407576e-22 630957.3 3.018153e-22 794328.2 2.715865e-22 1000000 2.481215e-22 1258925 2.299068e-22 1584893 2.157678e-22 1995262 2.047923e-22 2511886 1.962727e-22 3162278 1.896594e-22 3981072 1.845258e-22 5011872 1.805408e-22 6309573 1.774475e-22 7943282 1.750464e-22 10000000 1.731825e-22 12589250 1.717356e-22 15848930 1.706125e-22 19952620 1.697407e-22 25118860 1.69064e-22 31622780 1.685387e-22 39810720 1.681309e-22 50118720 1.678144e-22 63095730 1.675687e-22 79432820 1.673779e-22 100000000 1.672299e-22 ngspice-26/tests/bsim4/pmos/reference/dcSweep_sa.standard0000644000265600020320000002751212264261473023133 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060620e-07 -2.000000e-01 -3.951414e-07 -3.000000e-01 -7.284812e-07 -4.000000e-01 -1.318828e-06 -5.000000e-01 -2.352149e-06 -6.000000e-01 -4.136004e-06 -7.000000e-01 -7.171094e-06 -8.000000e-01 -1.225693e-05 -9.000000e-01 -2.063911e-05 -1.000000e+00 -3.419648e-05 -1.100000e+00 -5.565272e-05 -1.200000e+00 -8.879236e-05 -1.000000e-01 -2.347263e-06 -2.000000e-01 -4.298730e-06 -3.000000e-01 -7.531125e-06 -4.000000e-01 -1.290654e-05 -5.000000e-01 -2.169163e-05 -6.000000e-01 -3.569962e-05 -7.000000e-01 -5.733945e-05 -8.000000e-01 -8.952389e-05 -9.000000e-01 -1.354296e-04 -1.000000e+00 -1.982138e-04 -1.100000e+00 -2.808861e-04 -1.200000e+00 -3.865233e-04 -1.000000e-01 -2.087763e-05 -2.000000e-01 -3.608031e-05 -3.000000e-01 -5.844587e-05 -4.000000e-01 -9.107256e-05 -5.000000e-01 -1.367670e-04 -6.000000e-01 -1.979962e-04 -7.000000e-01 -2.766100e-04 -8.000000e-01 -3.737024e-04 -9.000000e-01 -4.896906e-04 -1.000000e+00 -6.246421e-04 -1.100000e+00 -7.788533e-04 -1.200000e+00 -9.536559e-04 -1.000000e-01 -1.173971e-04 -2.000000e-01 -1.876023e-04 -3.000000e-01 -2.657281e-04 -4.000000e-01 -3.594677e-04 -5.000000e-01 -4.698381e-04 -6.000000e-01 -5.967650e-04 -7.000000e-01 -7.397098e-04 -8.000000e-01 -8.979140e-04 -9.000000e-01 -1.070598e-03 -1.000000e+00 -1.257254e-03 -1.100000e+00 -1.458147e-03 -1.200000e+00 -1.675083e-03 -1.000000e-01 -3.223010e-04 -2.000000e-01 -5.203969e-04 -3.000000e-01 -6.746175e-04 -4.000000e-01 -8.307146e-04 -5.000000e-01 -9.967252e-04 -6.000000e-01 -1.173932e-03 -7.000000e-01 -1.362352e-03 -8.000000e-01 -1.561660e-03 -9.000000e-01 -1.771465e-03 -1.000000e+00 -1.991574e-03 -1.100000e+00 -2.222486e-03 -1.200000e+00 -2.466237e-03 -1.000000e-01 -5.499072e-04 -2.000000e-01 -9.317058e-04 -3.000000e-01 -1.193799e-03 -4.000000e-01 -1.411782e-03 -5.000000e-01 -1.623952e-03 -6.000000e-01 -1.839935e-03 -7.000000e-01 -2.062417e-03 -8.000000e-01 -2.292256e-03 -9.000000e-01 -2.529699e-03 -1.000000e+00 -2.774867e-03 -1.100000e+00 -3.028306e-03 -1.200000e+00 -3.291904e-03 -1.000000e-01 -7.549085e-04 -2.000000e-01 -1.322081e-03 -3.000000e-01 -1.730657e-03 -4.000000e-01 -2.033007e-03 -5.000000e-01 -2.295108e-03 -6.000000e-01 -2.547775e-03 -7.000000e-01 -2.800515e-03 -8.000000e-01 -3.056660e-03 -9.000000e-01 -3.317561e-03 -1.000000e+00 -3.583857e-03 -1.100000e+00 -3.856198e-03 -1.200000e+00 -4.136201e-03 -1.000000e-01 -9.321283e-04 -2.000000e-01 -1.667897e-03 -3.000000e-01 -2.231426e-03 -4.000000e-01 -2.650298e-03 -5.000000e-01 -2.979104e-03 -6.000000e-01 -3.273205e-03 -7.000000e-01 -3.556646e-03 -8.000000e-01 -3.837940e-03 -9.000000e-01 -4.120525e-03 -1.000000e+00 -4.405992e-03 -1.100000e+00 -4.695334e-03 -1.200000e+00 -4.989985e-03 -1.000000e-01 -1.084914e-03 -2.000000e-01 -1.970779e-03 -3.000000e-01 -2.679855e-03 -4.000000e-01 -3.230879e-03 -5.000000e-01 -3.652013e-03 -6.000000e-01 -3.999503e-03 -7.000000e-01 -4.317736e-03 -8.000000e-01 -4.625217e-03 -9.000000e-01 -4.929260e-03 -1.000000e+00 -5.233142e-03 -1.100000e+00 -5.538591e-03 -1.200000e+00 -5.847092e-03 -1.000000e-01 -1.217168e-03 -2.000000e-01 -2.236077e-03 -3.000000e-01 -3.077471e-03 -4.000000e-01 -3.757915e-03 -5.000000e-01 -4.291448e-03 -6.000000e-01 -4.711643e-03 -7.000000e-01 -5.073252e-03 -8.000000e-01 -5.410278e-03 -9.000000e-01 -5.736964e-03 -1.000000e+00 -6.059488e-03 -1.100000e+00 -6.380883e-03 -1.200000e+00 -6.703059e-03 -1.000000e-01 -1.332205e-03 -2.000000e-01 -2.469050e-03 -3.000000e-01 -3.429755e-03 -4.000000e-01 -4.229975e-03 -5.000000e-01 -4.880452e-03 -6.000000e-01 -5.394102e-03 -7.000000e-01 -5.813170e-03 -8.000000e-01 -6.186070e-03 -9.000000e-01 -6.538175e-03 -1.000000e+00 -6.880543e-03 -1.100000e+00 -7.218378e-03 -1.200000e+00 -7.554508e-03 -1.000000e-01 -1.432734e-03 -2.000000e-01 -2.674297e-03 -3.000000e-01 -3.742399e-03 -4.000000e-01 -4.651838e-03 -5.000000e-01 -5.413264e-03 -6.000000e-01 -6.031974e-03 -7.000000e-01 -6.526695e-03 -8.000000e-01 -6.945684e-03 -9.000000e-01 -7.328012e-03 -1.000000e+00 -7.692549e-03 -1.100000e+00 -8.047997e-03 -1.200000e+00 -8.398777e-03 -1.000000e-01 -3.879333e-08 -2.000000e-01 -8.828187e-08 -3.000000e-01 -1.926200e-07 -4.000000e-01 -4.098542e-07 -5.000000e-01 -8.505837e-07 -6.000000e-01 -1.717885e-06 -7.000000e-01 -3.370215e-06 -8.000000e-01 -6.421315e-06 -9.000000e-01 -1.190317e-05 -1.000000e+00 -2.152934e-05 -1.100000e+00 -3.808451e-05 -1.200000e+00 -6.591065e-05 -1.000000e-01 -1.051498e-06 -2.000000e-01 -2.181980e-06 -3.000000e-01 -4.274449e-06 -4.000000e-01 -8.077164e-06 -5.000000e-01 -1.481100e-05 -6.000000e-01 -2.642530e-05 -7.000000e-01 -4.585425e-05 -8.000000e-01 -7.711395e-05 -9.000000e-01 -1.250385e-04 -1.000000e+00 -1.946418e-04 -1.100000e+00 -2.904750e-04 -1.200000e+00 -4.165579e-04 -1.000000e-01 -1.718215e-05 -2.000000e-01 -3.176679e-05 -3.000000e-01 -5.528474e-05 -4.000000e-01 -9.222502e-05 -5.000000e-01 -1.472663e-04 -6.000000e-01 -2.244918e-04 -7.000000e-01 -3.265108e-04 -8.000000e-01 -4.540905e-04 -9.000000e-01 -6.064951e-04 -1.000000e+00 -7.823903e-04 -1.100000e+00 -9.810606e-04 -1.200000e+00 -1.203735e-03 -1.000000e-01 -1.549685e-04 -2.000000e-01 -2.491282e-04 -3.000000e-01 -3.621175e-04 -4.000000e-01 -4.984905e-04 -5.000000e-01 -6.574256e-04 -6.000000e-01 -8.368378e-04 -7.000000e-01 -1.034283e-03 -8.000000e-01 -1.247420e-03 -9.000000e-01 -1.474375e-03 -1.000000e+00 -1.714239e-03 -1.100000e+00 -1.967841e-03 -1.200000e+00 -2.238793e-03 -1.000000e-01 -5.686264e-04 -2.000000e-01 -8.429179e-04 -3.000000e-01 -1.065867e-03 -4.000000e-01 -1.290773e-03 -5.000000e-01 -1.523843e-03 -6.000000e-01 -1.765604e-03 -7.000000e-01 -2.015531e-03 -8.000000e-01 -2.272937e-03 -9.000000e-01 -2.537349e-03 -1.000000e+00 -2.809054e-03 -1.100000e+00 -3.090040e-03 -1.200000e+00 -3.385297e-03 -1.000000e-01 -1.086977e-03 -2.000000e-01 -1.656781e-03 -3.000000e-01 -1.995893e-03 -4.000000e-01 -2.285579e-03 -5.000000e-01 -2.565411e-03 -6.000000e-01 -2.844174e-03 -7.000000e-01 -3.124581e-03 -8.000000e-01 -3.407622e-03 -9.000000e-01 -3.693818e-03 -1.000000e+00 -3.984069e-03 -1.100000e+00 -4.280833e-03 -1.200000e+00 -4.589701e-03 -1.000000e-01 -1.574189e-03 -2.000000e-01 -2.504213e-03 -3.000000e-01 -3.012338e-03 -4.000000e-01 -3.370575e-03 -5.000000e-01 -3.690079e-03 -6.000000e-01 -3.997000e-03 -7.000000e-01 -4.299341e-03 -8.000000e-01 -4.600280e-03 -9.000000e-01 -4.901406e-03 -1.000000e+00 -5.204133e-03 -1.100000e+00 -5.511135e-03 -1.200000e+00 -5.828196e-03 -1.000000e-01 -2.011992e-03 -2.000000e-01 -3.305813e-03 -3.000000e-01 -4.046128e-03 -4.000000e-01 -4.495270e-03 -5.000000e-01 -4.857153e-03 -6.000000e-01 -5.190136e-03 -7.000000e-01 -5.511099e-03 -8.000000e-01 -5.826437e-03 -9.000000e-01 -6.139159e-03 -1.000000e+00 -6.451299e-03 -1.100000e+00 -6.765687e-03 -1.200000e+00 -7.088064e-03 -1.000000e-01 -2.406050e-03 -2.000000e-01 -4.044688e-03 -3.000000e-01 -5.056892e-03 -4.000000e-01 -5.631826e-03 -5.000000e-01 -6.044962e-03 -6.000000e-01 -6.405357e-03 -7.000000e-01 -6.744132e-03 -8.000000e-01 -7.072396e-03 -9.000000e-01 -7.395090e-03 -1.000000e+00 -7.715076e-03 -1.100000e+00 -8.035387e-03 -1.200000e+00 -8.361602e-03 -1.000000e-01 -2.764419e-03 -2.000000e-01 -4.725470e-03 -3.000000e-01 -6.021583e-03 -4.000000e-01 -6.761599e-03 -5.000000e-01 -7.240069e-03 -6.000000e-01 -7.631563e-03 -7.000000e-01 -7.988799e-03 -8.000000e-01 -8.329639e-03 -9.000000e-01 -8.661621e-03 -1.000000e+00 -8.988710e-03 -1.100000e+00 -9.314254e-03 -1.200000e+00 -9.643637e-03 -1.000000e-01 -3.094289e-03 -2.000000e-01 -5.357200e-03 -3.000000e-01 -6.932087e-03 -4.000000e-01 -7.870787e-03 -5.000000e-01 -8.433142e-03 -6.000000e-01 -8.861304e-03 -7.000000e-01 -9.238622e-03 -8.000000e-01 -9.592364e-03 -9.000000e-01 -9.933499e-03 -1.000000e+00 -1.026742e-02 -1.100000e+00 -1.059795e-02 -1.200000e+00 -1.093030e-02 -1.000000e-01 -3.401616e-03 -2.000000e-01 -5.948752e-03 -3.000000e-01 -7.790505e-03 -4.000000e-01 -8.949355e-03 -5.000000e-01 -9.617087e-03 -6.000000e-01 -1.008911e-02 -7.000000e-01 -1.048881e-02 -8.000000e-01 -1.085620e-02 -9.000000e-01 -1.120669e-02 -1.000000e+00 -1.154744e-02 -1.100000e+00 -1.188296e-02 -1.200000e+00 -1.221838e-02 -1.000000e-01 -8.631823e-07 -2.000000e-01 -1.438465e-06 -3.000000e-01 -2.301954e-06 -4.000000e-01 -3.640786e-06 -5.000000e-01 -5.713048e-06 -6.000000e-01 -8.903592e-06 -7.000000e-01 -1.378053e-05 -8.000000e-01 -2.116612e-05 -9.000000e-01 -3.222254e-05 -1.000000e+00 -4.855402e-05 -1.100000e+00 -7.233194e-05 -1.200000e+00 -1.064627e-04 -1.000000e-01 -4.738432e-06 -2.000000e-01 -7.771790e-06 -3.000000e-01 -1.215502e-05 -4.000000e-01 -1.871780e-05 -5.000000e-01 -2.844887e-05 -6.000000e-01 -4.263590e-05 -7.000000e-01 -6.288044e-05 -8.000000e-01 -9.105910e-05 -9.000000e-01 -1.292439e-04 -1.000000e+00 -1.796264e-04 -1.100000e+00 -2.445230e-04 -1.200000e+00 -3.265444e-04 -1.000000e-01 -2.268007e-05 -2.000000e-01 -3.671152e-05 -3.000000e-01 -5.476309e-05 -4.000000e-01 -7.941424e-05 -5.000000e-01 -1.123910e-04 -6.000000e-01 -1.553284e-04 -7.000000e-01 -2.097071e-04 -8.000000e-01 -2.767683e-04 -9.000000e-01 -3.574843e-04 -1.000000e+00 -4.526342e-04 -1.100000e+00 -5.630370e-04 -1.200000e+00 -6.899760e-04 -1.000000e-01 -7.795475e-05 -2.000000e-01 -1.282318e-04 -3.000000e-01 -1.771714e-04 -4.000000e-01 -2.351306e-04 -5.000000e-01 -3.039484e-04 -6.000000e-01 -3.843620e-04 -7.000000e-01 -4.767616e-04 -8.000000e-01 -5.813319e-04 -9.000000e-01 -6.981353e-04 -1.000000e+00 -8.272296e-04 -1.100000e+00 -9.688989e-04 -1.200000e+00 -1.124067e-03 -1.000000e-01 -1.673901e-04 -2.000000e-01 -2.919364e-04 -3.000000e-01 -3.883247e-04 -4.000000e-01 -4.824540e-04 -5.000000e-01 -5.840218e-04 -6.000000e-01 -6.949196e-04 -7.000000e-01 -8.156634e-04 -8.000000e-01 -9.464442e-04 -9.000000e-01 -1.087345e-03 -1.000000e+00 -1.238445e-03 -1.100000e+00 -1.399981e-03 -1.200000e+00 -1.572708e-03 -1.000000e-01 -2.588371e-04 -2.000000e-01 -4.692309e-04 -3.000000e-01 -6.339755e-04 -4.000000e-01 -7.697756e-04 -5.000000e-01 -9.000296e-04 -6.000000e-01 -1.034706e-03 -7.000000e-01 -1.176490e-03 -8.000000e-01 -1.326331e-03 -9.000000e-01 -1.484682e-03 -1.000000e+00 -1.651817e-03 -1.100000e+00 -1.828002e-03 -1.200000e+00 -2.013786e-03 -1.000000e-01 -3.361522e-04 -2.000000e-01 -6.223509e-04 -3.000000e-01 -8.590640e-04 -4.000000e-01 -1.051343e-03 -5.000000e-01 -1.216291e-03 -6.000000e-01 -1.374418e-03 -7.000000e-01 -1.535064e-03 -8.000000e-01 -1.701326e-03 -9.000000e-01 -1.874467e-03 -1.000000e+00 -2.055136e-03 -1.100000e+00 -2.243738e-03 -1.200000e+00 -2.440708e-03 -1.000000e-01 -3.982960e-04 -2.000000e-01 -7.475021e-04 -3.000000e-01 -1.047766e-03 -4.000000e-01 -1.300607e-03 -5.000000e-01 -1.512522e-03 -6.000000e-01 -1.700307e-03 -7.000000e-01 -1.881387e-03 -8.000000e-01 -2.063944e-03 -9.000000e-01 -2.251100e-03 -1.000000e+00 -2.444264e-03 -1.100000e+00 -2.644189e-03 -1.200000e+00 -2.851384e-03 -1.000000e-01 -4.480843e-04 -2.000000e-01 -8.492217e-04 -3.000000e-01 -1.203480e-03 -4.000000e-01 -1.511457e-03 -5.000000e-01 -1.775348e-03 -6.000000e-01 -2.002718e-03 -7.000000e-01 -2.209489e-03 -8.000000e-01 -2.410171e-03 -9.000000e-01 -2.611741e-03 -1.000000e+00 -2.817167e-03 -1.100000e+00 -3.027893e-03 -1.200000e+00 -3.244733e-03 -1.000000e-01 -4.882235e-04 -2.000000e-01 -9.322170e-04 -3.000000e-01 -1.331985e-03 -4.000000e-01 -1.687793e-03 -5.000000e-01 -2.000500e-03 -6.000000e-01 -2.272881e-03 -7.000000e-01 -2.513269e-03 -8.000000e-01 -2.736309e-03 -9.000000e-01 -2.953975e-03 -1.000000e+00 -3.172185e-03 -1.100000e+00 -3.393685e-03 -1.200000e+00 -3.619898e-03 -1.000000e-01 -5.207382e-04 -2.000000e-01 -1.000148e-03 -3.000000e-01 -1.438171e-03 -4.000000e-01 -1.834903e-03 -5.000000e-01 -2.190712e-03 -6.000000e-01 -2.506681e-03 -7.000000e-01 -2.786141e-03 -8.000000e-01 -3.037894e-03 -9.000000e-01 -3.275081e-03 -1.000000e+00 -3.507574e-03 -1.100000e+00 -3.740411e-03 -1.200000e+00 -3.976102e-03 -1.000000e-01 -5.471142e-04 -2.000000e-01 -1.055787e-03 -3.000000e-01 -1.525902e-03 -4.000000e-01 -1.957446e-03 -5.000000e-01 -2.350558e-03 -6.000000e-01 -2.705694e-03 -7.000000e-01 -3.024166e-03 -8.000000e-01 -3.309845e-03 -9.000000e-01 -3.571700e-03 -1.000000e+00 -3.821301e-03 -1.100000e+00 -4.066818e-03 -1.200000e+00 -4.312571e-03 ngspice-26/tests/bsim4/pmos/reference/acFreq.standard0000644000265600020320000000710512264261473022253 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw1_vb2.standard0000644000265600020320000002751212264261473024004 0ustar andreasadminV(d) I(d) -1.000000e-01 -6.504608e-07 -2.000000e-01 -1.204893e-06 -3.000000e-01 -2.144027e-06 -4.000000e-01 -3.745793e-06 -5.000000e-01 -6.449776e-06 -6.000000e-01 -1.095571e-05 -7.000000e-01 -1.834946e-05 -8.000000e-01 -3.025027e-05 -9.000000e-01 -4.894713e-05 -1.000000e+00 -7.748064e-05 -1.100000e+00 -1.196542e-04 -1.200000e+00 -1.800360e-04 -1.000000e-01 -6.285030e-06 -2.000000e-01 -1.115544e-05 -3.000000e-01 -1.890285e-05 -4.000000e-01 -3.124528e-05 -5.000000e-01 -5.040224e-05 -6.000000e-01 -7.911186e-05 -7.000000e-01 -1.204166e-04 -8.000000e-01 -1.773095e-04 -9.000000e-01 -2.523861e-04 -1.000000e+00 -3.477018e-04 -1.100000e+00 -4.649952e-04 -1.200000e+00 -6.063232e-04 -1.000000e-01 -4.677418e-05 -2.000000e-01 -7.780661e-05 -3.000000e-01 -1.194277e-04 -4.000000e-01 -1.754794e-04 -5.000000e-01 -2.481853e-04 -6.000000e-01 -3.389287e-04 -7.000000e-01 -4.482956e-04 -8.000000e-01 -5.762012e-04 -9.000000e-01 -7.221436e-04 -1.000000e+00 -8.856155e-04 -1.100000e+00 -1.066720e-03 -1.200000e+00 -1.267002e-03 -1.000000e-01 -1.968468e-04 -2.000000e-01 -3.102625e-04 -3.000000e-01 -4.198095e-04 -4.000000e-01 -5.428732e-04 -5.000000e-01 -6.811746e-04 -6.000000e-01 -8.345211e-04 -7.000000e-01 -1.002249e-03 -8.000000e-01 -1.183559e-03 -9.000000e-01 -1.377701e-03 -1.000000e+00 -1.584254e-03 -1.100000e+00 -1.803655e-03 -1.200000e+00 -2.038038e-03 -1.000000e-01 -4.302212e-04 -2.000000e-01 -7.035451e-04 -3.000000e-01 -8.986121e-04 -4.000000e-01 -1.082392e-03 -5.000000e-01 -1.271595e-03 -6.000000e-01 -1.469501e-03 -7.000000e-01 -1.676815e-03 -8.000000e-01 -1.893542e-03 -9.000000e-01 -2.119481e-03 -1.000000e+00 -2.354564e-03 -1.100000e+00 -2.599407e-03 -1.200000e+00 -2.856249e-03 -1.000000e-01 -6.596603e-04 -2.000000e-01 -1.127826e-03 -3.000000e-01 -1.448273e-03 -4.000000e-01 -1.698904e-03 -5.000000e-01 -1.933434e-03 -6.000000e-01 -2.167680e-03 -7.000000e-01 -2.406173e-03 -8.000000e-01 -2.650481e-03 -9.000000e-01 -2.901186e-03 -1.000000e+00 -3.158587e-03 -1.100000e+00 -3.423342e-03 -1.200000e+00 -3.697471e-03 -1.000000e-01 -8.596131e-04 -2.000000e-01 -1.512815e-03 -3.000000e-01 -1.989050e-03 -4.000000e-01 -2.335082e-03 -5.000000e-01 -2.622819e-03 -6.000000e-01 -2.893690e-03 -7.000000e-01 -3.161280e-03 -8.000000e-01 -3.430340e-03 -9.000000e-01 -3.702821e-03 -1.000000e+00 -3.979654e-03 -1.100000e+00 -4.261648e-03 -1.200000e+00 -4.550535e-03 -1.000000e-01 -1.030756e-03 -2.000000e-01 -1.849513e-03 -3.000000e-01 -2.481855e-03 -4.000000e-01 -2.953123e-03 -5.000000e-01 -3.314284e-03 -6.000000e-01 -3.628511e-03 -7.000000e-01 -3.926796e-03 -8.000000e-01 -4.220289e-03 -9.000000e-01 -4.513457e-03 -1.000000e+00 -4.808364e-03 -1.100000e+00 -5.106244e-03 -1.200000e+00 -5.408666e-03 -1.000000e-01 -1.177673e-03 -2.000000e-01 -2.142871e-03 -3.000000e-01 -2.919248e-03 -4.000000e-01 -3.525596e-03 -5.000000e-01 -3.986326e-03 -6.000000e-01 -4.357848e-03 -7.000000e-01 -4.691989e-03 -8.000000e-01 -5.011608e-03 -9.000000e-01 -5.325727e-03 -1.000000e+00 -5.638359e-03 -1.100000e+00 -5.951588e-03 -1.200000e+00 -6.267089e-03 -1.000000e-01 -1.304522e-03 -2.000000e-01 -2.399066e-03 -3.000000e-01 -3.305539e-03 -4.000000e-01 -4.041125e-03 -5.000000e-01 -4.618519e-03 -6.000000e-01 -5.067917e-03 -7.000000e-01 -5.447641e-03 -8.000000e-01 -5.797367e-03 -9.000000e-01 -6.134026e-03 -1.000000e+00 -6.464916e-03 -1.100000e+00 -6.793592e-03 -1.200000e+00 -7.122228e-03 -1.000000e-01 -1.414653e-03 -2.000000e-01 -2.623589e-03 -3.000000e-01 -3.646982e-03 -4.000000e-01 -4.501152e-03 -5.000000e-01 -5.196703e-03 -6.000000e-01 -5.744043e-03 -7.000000e-01 -6.184489e-03 -8.000000e-01 -6.571311e-03 -9.000000e-01 -6.933661e-03 -1.000000e+00 -7.284269e-03 -1.100000e+00 -7.629083e-03 -1.200000e+00 -7.971301e-03 -1.000000e-01 -1.510747e-03 -2.000000e-01 -2.821080e-03 -3.000000e-01 -3.949494e-03 -4.000000e-01 -4.911391e-03 -5.000000e-01 -5.717641e-03 -6.000000e-01 -6.372483e-03 -7.000000e-01 -6.892217e-03 -8.000000e-01 -7.327033e-03 -9.000000e-01 -7.720263e-03 -1.000000e+00 -8.093144e-03 -1.100000e+00 -8.455434e-03 -1.200000e+00 -8.812057e-03 -1.000000e-01 -1.860338e-07 -2.000000e-01 -4.015024e-07 -3.000000e-01 -8.267465e-07 -4.000000e-01 -1.652860e-06 -5.000000e-01 -3.214666e-06 -6.000000e-01 -6.085980e-06 -7.000000e-01 -1.122693e-05 -8.000000e-01 -2.020265e-05 -9.000000e-01 -3.546687e-05 -1.000000e+00 -6.064302e-05 -1.100000e+00 -1.006761e-04 -1.200000e+00 -1.617738e-04 -1.000000e-01 -3.800043e-06 -2.000000e-01 -7.415283e-06 -3.000000e-01 -1.371848e-05 -4.000000e-01 -2.458248e-05 -5.000000e-01 -4.277168e-05 -6.000000e-01 -7.205865e-05 -7.000000e-01 -1.169589e-04 -8.000000e-01 -1.820364e-04 -9.000000e-01 -2.710513e-04 -1.000000e+00 -3.864827e-04 -1.100000e+00 -5.298437e-04 -1.200000e+00 -7.027916e-04 -1.000000e-01 -4.769044e-05 -2.000000e-01 -8.346255e-05 -3.000000e-01 -1.353244e-04 -4.000000e-01 -2.081038e-04 -5.000000e-01 -3.046932e-04 -6.000000e-01 -4.261599e-04 -7.000000e-01 -5.719124e-04 -8.000000e-01 -7.402333e-04 -9.000000e-01 -9.290099e-04 -1.000000e+00 -1.136582e-03 -1.100000e+00 -1.362720e-03 -1.200000e+00 -1.609722e-03 -1.000000e-01 -2.951141e-04 -2.000000e-01 -4.488619e-04 -3.000000e-01 -6.071785e-04 -4.000000e-01 -7.829845e-04 -5.000000e-01 -9.760055e-04 -6.000000e-01 -1.184475e-03 -7.000000e-01 -1.406481e-03 -8.000000e-01 -1.640323e-03 -9.000000e-01 -1.884764e-03 -1.000000e+00 -2.139497e-03 -1.100000e+00 -2.405979e-03 -1.200000e+00 -2.688578e-03 -1.000000e-01 -7.731792e-04 -2.000000e-01 -1.150013e-03 -3.000000e-01 -1.413895e-03 -4.000000e-01 -1.664381e-03 -5.000000e-01 -1.916751e-03 -6.000000e-01 -2.174029e-03 -7.000000e-01 -2.436810e-03 -8.000000e-01 -2.705048e-03 -9.000000e-01 -2.978681e-03 -1.000000e+00 -3.258283e-03 -1.100000e+00 -3.546108e-03 -1.200000e+00 -3.847514e-03 -1.000000e-01 -1.275854e-03 -2.000000e-01 -1.979238e-03 -3.000000e-01 -2.374282e-03 -4.000000e-01 -2.687719e-03 -5.000000e-01 -2.982114e-03 -6.000000e-01 -3.271519e-03 -7.000000e-01 -3.560340e-03 -8.000000e-01 -3.850312e-03 -9.000000e-01 -4.142331e-03 -1.000000e+00 -4.437495e-03 -1.100000e+00 -4.738379e-03 -1.200000e+00 -5.050734e-03 -1.000000e-01 -1.732442e-03 -2.000000e-01 -2.797507e-03 -3.000000e-01 -3.386085e-03 -4.000000e-01 -3.774639e-03 -5.000000e-01 -4.108876e-03 -6.000000e-01 -4.425139e-03 -7.000000e-01 -4.734281e-03 -8.000000e-01 -5.040546e-03 -9.000000e-01 -5.346002e-03 -1.000000e+00 -5.652277e-03 -1.100000e+00 -5.962108e-03 -1.200000e+00 -6.281310e-03 -1.000000e-01 -2.140553e-03 -2.000000e-01 -3.557268e-03 -3.000000e-01 -4.395593e-03 -4.000000e-01 -4.887683e-03 -5.000000e-01 -5.267349e-03 -6.000000e-01 -5.610118e-03 -7.000000e-01 -5.937571e-03 -8.000000e-01 -6.257689e-03 -9.000000e-01 -6.574142e-03 -1.000000e+00 -6.889244e-03 -1.100000e+00 -7.205885e-03 -1.200000e+00 -7.529756e-03 -1.000000e-01 -2.508028e-03 -2.000000e-01 -4.254145e-03 -3.000000e-01 -5.369807e-03 -4.000000e-01 -6.004049e-03 -5.000000e-01 -6.440574e-03 -6.000000e-01 -6.812397e-03 -7.000000e-01 -7.158115e-03 -8.000000e-01 -7.491197e-03 -9.000000e-01 -7.817503e-03 -1.000000e+00 -8.140281e-03 -1.100000e+00 -8.462656e-03 -1.200000e+00 -8.790112e-03 -1.000000e-01 -2.842834e-03 -2.000000e-01 -4.895899e-03 -3.000000e-01 -6.291831e-03 -4.000000e-01 -7.107234e-03 -5.000000e-01 -7.617378e-03 -6.000000e-01 -8.023034e-03 -7.000000e-01 -8.388231e-03 -8.000000e-01 -8.734300e-03 -9.000000e-01 -9.070059e-03 -1.000000e+00 -9.400003e-03 -1.100000e+00 -9.727635e-03 -1.200000e+00 -1.005824e-02 -1.000000e-01 -3.151688e-03 -2.000000e-01 -5.491916e-03 -3.000000e-01 -7.158472e-03 -4.000000e-01 -8.184565e-03 -5.000000e-01 -8.789544e-03 -6.000000e-01 -9.235792e-03 -7.000000e-01 -9.622592e-03 -8.000000e-01 -9.982252e-03 -9.000000e-01 -1.032752e-02 -1.000000e+00 -1.066449e-02 -1.100000e+00 -1.099725e-02 -1.200000e+00 -1.133093e-02 -1.000000e-01 -3.440059e-03 -2.000000e-01 -6.050726e-03 -3.000000e-01 -7.974523e-03 -4.000000e-01 -9.227110e-03 -5.000000e-01 -9.950513e-03 -6.000000e-01 -1.044592e-02 -7.000000e-01 -1.085715e-02 -8.000000e-01 -1.123139e-02 -9.000000e-01 -1.158649e-02 -1.000000e+00 -1.193060e-02 -1.100000e+00 -1.226855e-02 -1.200000e+00 -1.260545e-02 -1.000000e-01 -1.905942e-06 -2.000000e-01 -3.121983e-06 -3.000000e-01 -4.907343e-06 -4.000000e-01 -7.622389e-06 -5.000000e-01 -1.174332e-05 -6.000000e-01 -1.795529e-05 -7.000000e-01 -2.722516e-05 -8.000000e-01 -4.087422e-05 -9.000000e-01 -6.064440e-05 -1.000000e+00 -8.875799e-05 -1.100000e+00 -1.279914e-04 -1.200000e+00 -1.818105e-04 -1.000000e-01 -9.488380e-06 -2.000000e-01 -1.535598e-05 -3.000000e-01 -2.355275e-05 -4.000000e-01 -3.546012e-05 -5.000000e-01 -5.252561e-05 -6.000000e-01 -7.647319e-05 -7.000000e-01 -1.092535e-04 -8.000000e-01 -1.529319e-04 -9.000000e-01 -2.095622e-04 -1.000000e+00 -2.811211e-04 -1.100000e+00 -3.695940e-04 -1.200000e+00 -4.772881e-04 -1.000000e-01 -4.003316e-05 -2.000000e-01 -6.426861e-05 -3.000000e-01 -9.312513e-05 -4.000000e-01 -1.307199e-04 -5.000000e-01 -1.788725e-04 -6.000000e-01 -2.390500e-04 -7.000000e-01 -3.124214e-04 -8.000000e-01 -3.998383e-04 -9.000000e-01 -5.018657e-04 -1.000000e+00 -6.189168e-04 -1.100000e+00 -7.515481e-04 -1.200000e+00 -9.009610e-04 -1.000000e-01 -1.150663e-04 -2.000000e-01 -1.913694e-04 -3.000000e-01 -2.586736e-04 -4.000000e-01 -3.342465e-04 -5.000000e-01 -4.210548e-04 -6.000000e-01 -5.198397e-04 -7.000000e-01 -6.308583e-04 -8.000000e-01 -7.541590e-04 -9.000000e-01 -8.896903e-04 -1.000000e+00 -1.037424e-03 -1.100000e+00 -1.197601e-03 -1.200000e+00 -1.371193e-03 -1.000000e-01 -2.156999e-04 -2.000000e-01 -3.798430e-04 -3.000000e-01 -5.044183e-04 -4.000000e-01 -6.185661e-04 -5.000000e-01 -7.378355e-04 -6.000000e-01 -8.657059e-04 -7.000000e-01 -1.003086e-03 -8.000000e-01 -1.150297e-03 -9.000000e-01 -1.307475e-03 -1.000000e+00 -1.474711e-03 -1.100000e+00 -1.652243e-03 -1.200000e+00 -1.840856e-03 -1.000000e-01 -3.095907e-04 -2.000000e-01 -5.634153e-04 -3.000000e-01 -7.639308e-04 -4.000000e-01 -9.257794e-04 -5.000000e-01 -1.075163e-03 -6.000000e-01 -1.226439e-03 -7.000000e-01 -1.383837e-03 -8.000000e-01 -1.548806e-03 -9.000000e-01 -1.721998e-03 -1.000000e+00 -1.903776e-03 -1.100000e+00 -2.094438e-03 -1.200000e+00 -2.294557e-03 -1.000000e-01 -3.859968e-04 -2.000000e-01 -7.158238e-04 -3.000000e-01 -9.902254e-04 -4.000000e-01 -1.213636e-03 -5.000000e-01 -1.401872e-03 -6.000000e-01 -1.577894e-03 -7.000000e-01 -1.754155e-03 -8.000000e-01 -1.935014e-03 -9.000000e-01 -2.122212e-03 -1.000000e+00 -2.316602e-03 -1.100000e+00 -2.518687e-03 -1.200000e+00 -2.728949e-03 -1.000000e-01 -4.462926e-04 -2.000000e-01 -8.381970e-04 -3.000000e-01 -1.176122e-03 -4.000000e-01 -1.461629e-03 -5.000000e-01 -1.700534e-03 -6.000000e-01 -1.909043e-03 -7.000000e-01 -2.106719e-03 -8.000000e-01 -2.303937e-03 -9.000000e-01 -2.504797e-03 -1.000000e+00 -2.711116e-03 -1.100000e+00 -2.923842e-03 -1.200000e+00 -3.143578e-03 -1.000000e-01 -4.940040e-04 -2.000000e-01 -9.364929e-04 -3.000000e-01 -1.327724e-03 -4.000000e-01 -1.668423e-03 -5.000000e-01 -1.960704e-03 -6.000000e-01 -2.211532e-03 -7.000000e-01 -2.436799e-03 -8.000000e-01 -2.652817e-03 -9.000000e-01 -2.868120e-03 -1.000000e+00 -3.086416e-03 -1.100000e+00 -3.309489e-03 -1.200000e+00 -3.538323e-03 -1.000000e-01 -5.320450e-04 -2.000000e-01 -1.015879e-03 -3.000000e-01 -1.451637e-03 -4.000000e-01 -1.839697e-03 -5.000000e-01 -2.180973e-03 -6.000000e-01 -2.478100e-03 -7.000000e-01 -2.738990e-03 -8.000000e-01 -2.978637e-03 -9.000000e-01 -3.210474e-03 -1.000000e+00 -3.441537e-03 -1.100000e+00 -3.675131e-03 -1.200000e+00 -3.912959e-03 -1.000000e-01 -5.625153e-04 -2.000000e-01 -1.080202e-03 -3.000000e-01 -1.553093e-03 -4.000000e-01 -1.981366e-03 -5.000000e-01 -2.365458e-03 -6.000000e-01 -2.706464e-03 -7.000000e-01 -3.007572e-03 -8.000000e-01 -3.277379e-03 -9.000000e-01 -3.529579e-03 -1.000000e+00 -3.775192e-03 -1.100000e+00 -4.020066e-03 -1.200000e+00 -4.267137e-03 -1.000000e-01 -5.869329e-04 -2.000000e-01 -1.132326e-03 -3.000000e-01 -1.636125e-03 -4.000000e-01 -2.098375e-03 -5.000000e-01 -2.519272e-03 -6.000000e-01 -2.899311e-03 -7.000000e-01 -3.239799e-03 -8.000000e-01 -3.544502e-03 -9.000000e-01 -3.822389e-03 -1.000000e+00 -4.085655e-03 -1.100000e+00 -4.343352e-03 -1.200000e+00 -4.600393e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw2.standard0000644000265600020320000002751212264261473023234 0ustar andreasadminV(d) I(d) -1.000000e-01 -3.233288e-08 -2.000000e-01 -3.576179e-08 -3.000000e-01 -3.876764e-08 -4.000000e-01 -4.185338e-08 -5.000000e-01 -4.509995e-08 -6.000000e-01 -4.854383e-08 -7.000000e-01 -5.221175e-08 -8.000000e-01 -5.613109e-08 -9.000000e-01 -6.033919e-08 -1.000000e+00 -6.489534e-08 -1.100000e+00 -6.989444e-08 -1.200000e+00 -7.548110e-08 -1.000000e-01 -3.879199e-07 -2.000000e-01 -4.275542e-07 -3.000000e-01 -4.615729e-07 -4.000000e-01 -4.961827e-07 -5.000000e-01 -5.323291e-07 -6.000000e-01 -5.704031e-07 -7.000000e-01 -6.106643e-07 -8.000000e-01 -6.533636e-07 -9.000000e-01 -6.988452e-07 -1.000000e+00 -7.476750e-07 -1.100000e+00 -8.007832e-07 -1.200000e+00 -8.596019e-07 -1.000000e-01 -3.767116e-06 -2.000000e-01 -4.150390e-06 -3.000000e-01 -4.456521e-06 -4.000000e-01 -4.762525e-06 -5.000000e-01 -5.078482e-06 -6.000000e-01 -5.408033e-06 -7.000000e-01 -5.753298e-06 -8.000000e-01 -6.116129e-06 -9.000000e-01 -6.499039e-06 -1.000000e+00 -6.906314e-06 -1.100000e+00 -7.345220e-06 -1.200000e+00 -7.827147e-06 -1.000000e-01 -2.604683e-05 -2.000000e-01 -2.947927e-05 -3.000000e-01 -3.139096e-05 -4.000000e-01 -3.318169e-05 -5.000000e-01 -3.497229e-05 -6.000000e-01 -3.679482e-05 -7.000000e-01 -3.866310e-05 -8.000000e-01 -4.058584e-05 -9.000000e-01 -4.257295e-05 -1.000000e+00 -4.464191e-05 -1.100000e+00 -4.682483e-05 -1.200000e+00 -4.917476e-05 -1.000000e-01 -9.047001e-05 -2.000000e-01 -1.168453e-04 -3.000000e-01 -1.244372e-04 -4.000000e-01 -1.300065e-04 -5.000000e-01 -1.351788e-04 -6.000000e-01 -1.402360e-04 -7.000000e-01 -1.452706e-04 -8.000000e-01 -1.503258e-04 -9.000000e-01 -1.554311e-04 -1.000000e+00 -1.606257e-04 -1.100000e+00 -1.659817e-04 -1.200000e+00 -1.716260e-04 -1.000000e-01 -1.753361e-04 -2.000000e-01 -2.641439e-04 -3.000000e-01 -2.938489e-04 -4.000000e-01 -3.068481e-04 -5.000000e-01 -3.169235e-04 -6.000000e-01 -3.261410e-04 -7.000000e-01 -3.349980e-04 -8.000000e-01 -3.436816e-04 -9.000000e-01 -3.522855e-04 -1.000000e+00 -3.608822e-04 -1.100000e+00 -3.695749e-04 -1.200000e+00 -3.785490e-04 -1.000000e-01 -2.578466e-04 -2.000000e-01 -4.230822e-04 -3.000000e-01 -5.063517e-04 -4.000000e-01 -5.391412e-04 -5.000000e-01 -5.572540e-04 -6.000000e-01 -5.717953e-04 -7.000000e-01 -5.850250e-04 -8.000000e-01 -5.976168e-04 -9.000000e-01 -6.098510e-04 -1.000000e+00 -6.218809e-04 -1.100000e+00 -6.338417e-04 -1.200000e+00 -6.459405e-04 -1.000000e-01 -3.326044e-04 -2.000000e-01 -5.714107e-04 -3.000000e-01 -7.226247e-04 -4.000000e-01 -7.994543e-04 -5.000000e-01 -8.348660e-04 -6.000000e-01 -8.575595e-04 -7.000000e-01 -8.763349e-04 -8.000000e-01 -8.934355e-04 -9.000000e-01 -9.096427e-04 -1.000000e+00 -9.253115e-04 -1.100000e+00 -9.406563e-04 -1.200000e+00 -9.558979e-04 -1.000000e-01 -3.994618e-04 -2.000000e-01 -7.058684e-04 -3.000000e-01 -9.241455e-04 -4.000000e-01 -1.060796e-03 -5.000000e-01 -1.131980e-03 -6.000000e-01 -1.169829e-03 -7.000000e-01 -1.196628e-03 -8.000000e-01 -1.219364e-03 -9.000000e-01 -1.240157e-03 -1.000000e+00 -1.259841e-03 -1.100000e+00 -1.278823e-03 -1.200000e+00 -1.297386e-03 -1.000000e-01 -4.591654e-04 -2.000000e-01 -8.269742e-04 -3.000000e-01 -1.107719e-03 -4.000000e-01 -1.305988e-03 -5.000000e-01 -1.429087e-03 -6.000000e-01 -1.496021e-03 -7.000000e-01 -1.536220e-03 -8.000000e-01 -1.566720e-03 -9.000000e-01 -1.593135e-03 -1.000000e+00 -1.617419e-03 -1.100000e+00 -1.640415e-03 -1.200000e+00 -1.662577e-03 -1.000000e-01 -5.125188e-04 -2.000000e-01 -9.358894e-04 -3.000000e-01 -1.273959e-03 -4.000000e-01 -1.530556e-03 -5.000000e-01 -1.710166e-03 -6.000000e-01 -1.821431e-03 -7.000000e-01 -1.885505e-03 -8.000000e-01 -1.927974e-03 -9.000000e-01 -1.961831e-03 -1.000000e+00 -1.991651e-03 -1.100000e+00 -2.019212e-03 -1.200000e+00 -2.045347e-03 -1.000000e-01 -5.602556e-04 -2.000000e-01 -1.033843e-03 -3.000000e-01 -1.424243e-03 -4.000000e-01 -1.734841e-03 -5.000000e-01 -1.969137e-03 -6.000000e-01 -2.131782e-03 -7.000000e-01 -2.233208e-03 -8.000000e-01 -2.295569e-03 -9.000000e-01 -2.340215e-03 -1.000000e+00 -2.377132e-03 -1.100000e+00 -2.410100e-03 -1.200000e+00 -2.440727e-03 -1.000000e-01 -4.861490e-09 -2.000000e-01 -5.470787e-09 -3.000000e-01 -6.049086e-09 -4.000000e-01 -6.661268e-09 -5.000000e-01 -7.322173e-09 -6.000000e-01 -8.040945e-09 -7.000000e-01 -8.826089e-09 -8.000000e-01 -9.687422e-09 -9.000000e-01 -1.063816e-08 -1.000000e+00 -1.169778e-08 -1.100000e+00 -1.289560e-08 -1.200000e+00 -1.427504e-08 -1.000000e-01 -1.441195e-07 -2.000000e-01 -1.610988e-07 -3.000000e-01 -1.768751e-07 -4.000000e-01 -1.933439e-07 -5.000000e-01 -2.108869e-07 -6.000000e-01 -2.296980e-07 -7.000000e-01 -2.499287e-07 -8.000000e-01 -2.717359e-07 -9.000000e-01 -2.953286e-07 -1.000000e+00 -3.210281e-07 -1.100000e+00 -3.493392e-07 -1.200000e+00 -3.810232e-07 -1.000000e-01 -2.764771e-06 -2.000000e-01 -3.057466e-06 -3.000000e-01 -3.315487e-06 -4.000000e-01 -3.578699e-06 -5.000000e-01 -3.854089e-06 -6.000000e-01 -4.144631e-06 -7.000000e-01 -4.452310e-06 -8.000000e-01 -4.779044e-06 -9.000000e-01 -5.127462e-06 -1.000000e+00 -5.501871e-06 -1.100000e+00 -5.909302e-06 -1.200000e+00 -6.360539e-06 -1.000000e-01 -3.227895e-05 -2.000000e-01 -3.581859e-05 -3.000000e-01 -3.838767e-05 -4.000000e-01 -4.088243e-05 -5.000000e-01 -4.341454e-05 -6.000000e-01 -4.601925e-05 -7.000000e-01 -4.871348e-05 -8.000000e-01 -5.150955e-05 -9.000000e-01 -5.442337e-05 -1.000000e+00 -5.748343e-05 -1.100000e+00 -6.074028e-05 -1.200000e+00 -6.427507e-05 -1.000000e-01 -1.717015e-04 -2.000000e-01 -2.052441e-04 -3.000000e-01 -2.175312e-04 -4.000000e-01 -2.275456e-04 -5.000000e-01 -2.370054e-04 -6.000000e-01 -2.462997e-04 -7.000000e-01 -2.555715e-04 -8.000000e-01 -2.648924e-04 -9.000000e-01 -2.743205e-04 -1.000000e+00 -2.839445e-04 -1.100000e+00 -2.939263e-04 -1.200000e+00 -3.045386e-04 -1.000000e-01 -4.074283e-04 -2.000000e-01 -5.663710e-04 -3.000000e-01 -6.106066e-04 -4.000000e-01 -6.345011e-04 -5.000000e-01 -6.541250e-04 -6.000000e-01 -6.722138e-04 -7.000000e-01 -6.895849e-04 -8.000000e-01 -7.065799e-04 -9.000000e-01 -7.233906e-04 -1.000000e+00 -7.402031e-04 -1.100000e+00 -7.573129e-04 -1.200000e+00 -7.752300e-04 -1.000000e-01 -6.686431e-04 -2.000000e-01 -1.032825e-03 -3.000000e-01 -1.171809e-03 -4.000000e-01 -1.225086e-03 -5.000000e-01 -1.259669e-03 -6.000000e-01 -1.288567e-03 -7.000000e-01 -1.314978e-03 -8.000000e-01 -1.340054e-03 -9.000000e-01 -1.364336e-03 -1.000000e+00 -1.388184e-03 -1.100000e+00 -1.412026e-03 -1.200000e+00 -1.436571e-03 -1.000000e-01 -9.366012e-04 -2.000000e-01 -1.532234e-03 -3.000000e-01 -1.837260e-03 -4.000000e-01 -1.956558e-03 -5.000000e-01 -2.016461e-03 -6.000000e-01 -2.060020e-03 -7.000000e-01 -2.097258e-03 -8.000000e-01 -2.131331e-03 -9.000000e-01 -2.163552e-03 -1.000000e+00 -2.194626e-03 -1.100000e+00 -2.225158e-03 -1.200000e+00 -2.256014e-03 -1.000000e-01 -1.209414e-03 -2.000000e-01 -2.046225e-03 -3.000000e-01 -2.555163e-03 -4.000000e-01 -2.793977e-03 -5.000000e-01 -2.898902e-03 -6.000000e-01 -2.963686e-03 -7.000000e-01 -3.014553e-03 -8.000000e-01 -3.059028e-03 -9.000000e-01 -3.099950e-03 -1.000000e+00 -3.138668e-03 -1.100000e+00 -3.176077e-03 -1.200000e+00 -3.213207e-03 -1.000000e-01 -1.488871e-03 -2.000000e-01 -2.574240e-03 -3.000000e-01 -3.302455e-03 -4.000000e-01 -3.706522e-03 -5.000000e-01 -3.886863e-03 -6.000000e-01 -3.983061e-03 -7.000000e-01 -4.051518e-03 -8.000000e-01 -4.108259e-03 -9.000000e-01 -4.158866e-03 -1.000000e+00 -4.205778e-03 -1.100000e+00 -4.250370e-03 -1.200000e+00 -4.293893e-03 -1.000000e-01 -1.778015e-03 -2.000000e-01 -3.120389e-03 -3.000000e-01 -4.076939e-03 -4.000000e-01 -4.673000e-03 -5.000000e-01 -4.963754e-03 -6.000000e-01 -5.105433e-03 -7.000000e-01 -5.196608e-03 -8.000000e-01 -5.267869e-03 -9.000000e-01 -5.329293e-03 -1.000000e+00 -5.385013e-03 -1.100000e+00 -5.437136e-03 -1.200000e+00 -5.487240e-03 -1.000000e-01 -2.080672e-03 -2.000000e-01 -3.690854e-03 -3.000000e-01 -4.884534e-03 -4.000000e-01 -5.686503e-03 -5.000000e-01 -6.117350e-03 -6.000000e-01 -6.320937e-03 -7.000000e-01 -6.440746e-03 -8.000000e-01 -6.528958e-03 -9.000000e-01 -6.602354e-03 -1.000000e+00 -6.667477e-03 -1.100000e+00 -6.727453e-03 -1.200000e+00 -6.784320e-03 -1.000000e-01 -1.661327e-07 -2.000000e-01 -1.821634e-07 -3.000000e-01 -1.941248e-07 -4.000000e-01 -2.060050e-07 -5.000000e-01 -2.182241e-07 -6.000000e-01 -2.309237e-07 -7.000000e-01 -2.441858e-07 -8.000000e-01 -2.580838e-07 -9.000000e-01 -2.727198e-07 -1.000000e+00 -2.882708e-07 -1.100000e+00 -3.050388e-07 -1.200000e+00 -3.234978e-07 -1.000000e-01 -9.383597e-07 -2.000000e-01 -1.030582e-06 -3.000000e-01 -1.096270e-06 -4.000000e-01 -1.160988e-06 -5.000000e-01 -1.227256e-06 -6.000000e-01 -1.295876e-06 -7.000000e-01 -1.367286e-06 -8.000000e-01 -1.441857e-06 -9.000000e-01 -1.520097e-06 -1.000000e+00 -1.602897e-06 -1.100000e+00 -1.691804e-06 -1.200000e+00 -1.789260e-06 -1.000000e-01 -4.768603e-06 -2.000000e-01 -5.320873e-06 -3.000000e-01 -5.649539e-06 -4.000000e-01 -5.965623e-06 -5.000000e-01 -6.285981e-06 -6.000000e-01 -6.615219e-06 -7.000000e-01 -6.955542e-06 -8.000000e-01 -7.308571e-06 -9.000000e-01 -7.676360e-06 -1.000000e+00 -8.062553e-06 -1.100000e+00 -8.473680e-06 -1.200000e+00 -8.920334e-06 -1.000000e-01 -1.878334e-05 -2.000000e-01 -2.264054e-05 -3.000000e-01 -2.400350e-05 -4.000000e-01 -2.518752e-05 -5.000000e-01 -2.635067e-05 -6.000000e-01 -2.752303e-05 -7.000000e-01 -2.871566e-05 -8.000000e-01 -2.993462e-05 -9.000000e-01 -3.118559e-05 -1.000000e+00 -3.247804e-05 -1.100000e+00 -3.383002e-05 -1.200000e+00 -3.527273e-05 -1.000000e-01 -4.621737e-05 -2.000000e-01 -6.556885e-05 -3.000000e-01 -7.093462e-05 -4.000000e-01 -7.402709e-05 -5.000000e-01 -7.680118e-05 -6.000000e-01 -7.949626e-05 -7.000000e-01 -8.217386e-05 -8.000000e-01 -8.485916e-05 -9.000000e-01 -8.756703e-05 -1.000000e+00 -9.031372e-05 -1.100000e+00 -9.312872e-05 -1.200000e+00 -9.606726e-05 -1.000000e-01 -7.754354e-05 -2.000000e-01 -1.244505e-04 -3.000000e-01 -1.449687e-04 -4.000000e-01 -1.526513e-04 -5.000000e-01 -1.577575e-04 -6.000000e-01 -1.623262e-04 -7.000000e-01 -1.667086e-04 -8.000000e-01 -1.710098e-04 -9.000000e-01 -1.752762e-04 -1.000000e+00 -1.795370e-04 -1.100000e+00 -1.838268e-04 -1.200000e+00 -1.882095e-04 -1.000000e-01 -1.053930e-04 -2.000000e-01 -1.800707e-04 -3.000000e-01 -2.254065e-04 -4.000000e-01 -2.465385e-04 -5.000000e-01 -2.562293e-04 -6.000000e-01 -2.631827e-04 -7.000000e-01 -2.694044e-04 -8.000000e-01 -2.753267e-04 -9.000000e-01 -2.810943e-04 -1.000000e+00 -2.867749e-04 -1.100000e+00 -2.924147e-04 -1.200000e+00 -2.980734e-04 -1.000000e-01 -1.282981e-04 -2.000000e-01 -2.269403e-04 -3.000000e-01 -2.966946e-04 -4.000000e-01 -3.391977e-04 -5.000000e-01 -3.602555e-04 -6.000000e-01 -3.714833e-04 -7.000000e-01 -3.800324e-04 -8.000000e-01 -3.877260e-04 -9.000000e-01 -3.950278e-04 -1.000000e+00 -4.021088e-04 -1.100000e+00 -4.090540e-04 -1.200000e+00 -4.159271e-04 -1.000000e-01 -1.468937e-04 -2.000000e-01 -2.655765e-04 -3.000000e-01 -3.566049e-04 -4.000000e-01 -4.207721e-04 -5.000000e-01 -4.600347e-04 -6.000000e-01 -4.807141e-04 -7.000000e-01 -4.931418e-04 -8.000000e-01 -5.030701e-04 -9.000000e-01 -5.120805e-04 -1.000000e+00 -5.206322e-04 -1.100000e+00 -5.289088e-04 -1.200000e+00 -5.370081e-04 -1.000000e-01 -1.620379e-04 -2.000000e-01 -2.974201e-04 -3.000000e-01 -4.065879e-04 -4.000000e-01 -4.900647e-04 -5.000000e-01 -5.487084e-04 -6.000000e-01 -5.848467e-04 -7.000000e-01 -6.051253e-04 -8.000000e-01 -6.185410e-04 -9.000000e-01 -6.296740e-04 -1.000000e+00 -6.398674e-04 -1.100000e+00 -6.495559e-04 -1.200000e+00 -6.589265e-04 -1.000000e-01 -1.744167e-04 -2.000000e-01 -3.237280e-04 -3.000000e-01 -4.482963e-04 -4.000000e-01 -5.485182e-04 -5.000000e-01 -6.249070e-04 -6.000000e-01 -6.784256e-04 -7.000000e-01 -7.117967e-04 -8.000000e-01 -7.317681e-04 -9.000000e-01 -7.460309e-04 -1.000000e+00 -7.582237e-04 -1.100000e+00 -7.694796e-04 -1.200000e+00 -7.802000e-04 -1.000000e-01 -1.845443e-04 -2.000000e-01 -3.454769e-04 -3.000000e-01 -4.831003e-04 -4.000000e-01 -5.977334e-04 -5.000000e-01 -6.897433e-04 -6.000000e-01 -7.596558e-04 -7.000000e-01 -8.085760e-04 -8.000000e-01 -8.396092e-04 -9.000000e-01 -8.593885e-04 -1.000000e+00 -8.743930e-04 -1.100000e+00 -8.875215e-04 -1.200000e+00 -8.997297e-04 ngspice-26/tests/bsim4/pmos/reference/dcSweep_scc.standard0000644000265600020320000002751212264261473023300 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060620e-07 -2.000000e-01 -3.951414e-07 -3.000000e-01 -7.284812e-07 -4.000000e-01 -1.318828e-06 -5.000000e-01 -2.352149e-06 -6.000000e-01 -4.136004e-06 -7.000000e-01 -7.171094e-06 -8.000000e-01 -1.225693e-05 -9.000000e-01 -2.063911e-05 -1.000000e+00 -3.419648e-05 -1.100000e+00 -5.565272e-05 -1.200000e+00 -8.879236e-05 -1.000000e-01 -2.347263e-06 -2.000000e-01 -4.298730e-06 -3.000000e-01 -7.531125e-06 -4.000000e-01 -1.290654e-05 -5.000000e-01 -2.169163e-05 -6.000000e-01 -3.569962e-05 -7.000000e-01 -5.733945e-05 -8.000000e-01 -8.952389e-05 -9.000000e-01 -1.354296e-04 -1.000000e+00 -1.982138e-04 -1.100000e+00 -2.808861e-04 -1.200000e+00 -3.865233e-04 -1.000000e-01 -2.087763e-05 -2.000000e-01 -3.608031e-05 -3.000000e-01 -5.844587e-05 -4.000000e-01 -9.107256e-05 -5.000000e-01 -1.367670e-04 -6.000000e-01 -1.979962e-04 -7.000000e-01 -2.766100e-04 -8.000000e-01 -3.737024e-04 -9.000000e-01 -4.896906e-04 -1.000000e+00 -6.246421e-04 -1.100000e+00 -7.788533e-04 -1.200000e+00 -9.536559e-04 -1.000000e-01 -1.173971e-04 -2.000000e-01 -1.876023e-04 -3.000000e-01 -2.657281e-04 -4.000000e-01 -3.594677e-04 -5.000000e-01 -4.698381e-04 -6.000000e-01 -5.967650e-04 -7.000000e-01 -7.397098e-04 -8.000000e-01 -8.979140e-04 -9.000000e-01 -1.070598e-03 -1.000000e+00 -1.257254e-03 -1.100000e+00 -1.458147e-03 -1.200000e+00 -1.675083e-03 -1.000000e-01 -3.223010e-04 -2.000000e-01 -5.203969e-04 -3.000000e-01 -6.746175e-04 -4.000000e-01 -8.307146e-04 -5.000000e-01 -9.967252e-04 -6.000000e-01 -1.173932e-03 -7.000000e-01 -1.362352e-03 -8.000000e-01 -1.561660e-03 -9.000000e-01 -1.771465e-03 -1.000000e+00 -1.991574e-03 -1.100000e+00 -2.222486e-03 -1.200000e+00 -2.466237e-03 -1.000000e-01 -5.499072e-04 -2.000000e-01 -9.317058e-04 -3.000000e-01 -1.193799e-03 -4.000000e-01 -1.411782e-03 -5.000000e-01 -1.623952e-03 -6.000000e-01 -1.839935e-03 -7.000000e-01 -2.062417e-03 -8.000000e-01 -2.292256e-03 -9.000000e-01 -2.529699e-03 -1.000000e+00 -2.774867e-03 -1.100000e+00 -3.028306e-03 -1.200000e+00 -3.291904e-03 -1.000000e-01 -7.549085e-04 -2.000000e-01 -1.322081e-03 -3.000000e-01 -1.730657e-03 -4.000000e-01 -2.033007e-03 -5.000000e-01 -2.295108e-03 -6.000000e-01 -2.547775e-03 -7.000000e-01 -2.800515e-03 -8.000000e-01 -3.056660e-03 -9.000000e-01 -3.317561e-03 -1.000000e+00 -3.583857e-03 -1.100000e+00 -3.856198e-03 -1.200000e+00 -4.136201e-03 -1.000000e-01 -9.321283e-04 -2.000000e-01 -1.667897e-03 -3.000000e-01 -2.231426e-03 -4.000000e-01 -2.650298e-03 -5.000000e-01 -2.979104e-03 -6.000000e-01 -3.273205e-03 -7.000000e-01 -3.556646e-03 -8.000000e-01 -3.837940e-03 -9.000000e-01 -4.120525e-03 -1.000000e+00 -4.405992e-03 -1.100000e+00 -4.695334e-03 -1.200000e+00 -4.989985e-03 -1.000000e-01 -1.084914e-03 -2.000000e-01 -1.970779e-03 -3.000000e-01 -2.679855e-03 -4.000000e-01 -3.230879e-03 -5.000000e-01 -3.652013e-03 -6.000000e-01 -3.999503e-03 -7.000000e-01 -4.317736e-03 -8.000000e-01 -4.625217e-03 -9.000000e-01 -4.929260e-03 -1.000000e+00 -5.233142e-03 -1.100000e+00 -5.538591e-03 -1.200000e+00 -5.847092e-03 -1.000000e-01 -1.217168e-03 -2.000000e-01 -2.236077e-03 -3.000000e-01 -3.077471e-03 -4.000000e-01 -3.757915e-03 -5.000000e-01 -4.291448e-03 -6.000000e-01 -4.711643e-03 -7.000000e-01 -5.073252e-03 -8.000000e-01 -5.410278e-03 -9.000000e-01 -5.736964e-03 -1.000000e+00 -6.059488e-03 -1.100000e+00 -6.380883e-03 -1.200000e+00 -6.703059e-03 -1.000000e-01 -1.332205e-03 -2.000000e-01 -2.469050e-03 -3.000000e-01 -3.429755e-03 -4.000000e-01 -4.229975e-03 -5.000000e-01 -4.880452e-03 -6.000000e-01 -5.394102e-03 -7.000000e-01 -5.813170e-03 -8.000000e-01 -6.186070e-03 -9.000000e-01 -6.538175e-03 -1.000000e+00 -6.880543e-03 -1.100000e+00 -7.218378e-03 -1.200000e+00 -7.554508e-03 -1.000000e-01 -1.432734e-03 -2.000000e-01 -2.674297e-03 -3.000000e-01 -3.742399e-03 -4.000000e-01 -4.651838e-03 -5.000000e-01 -5.413264e-03 -6.000000e-01 -6.031974e-03 -7.000000e-01 -6.526695e-03 -8.000000e-01 -6.945684e-03 -9.000000e-01 -7.328012e-03 -1.000000e+00 -7.692549e-03 -1.100000e+00 -8.047997e-03 -1.200000e+00 -8.398777e-03 -1.000000e-01 -3.879333e-08 -2.000000e-01 -8.828187e-08 -3.000000e-01 -1.926200e-07 -4.000000e-01 -4.098542e-07 -5.000000e-01 -8.505837e-07 -6.000000e-01 -1.717885e-06 -7.000000e-01 -3.370215e-06 -8.000000e-01 -6.421315e-06 -9.000000e-01 -1.190317e-05 -1.000000e+00 -2.152934e-05 -1.100000e+00 -3.808451e-05 -1.200000e+00 -6.591065e-05 -1.000000e-01 -1.051498e-06 -2.000000e-01 -2.181980e-06 -3.000000e-01 -4.274449e-06 -4.000000e-01 -8.077164e-06 -5.000000e-01 -1.481100e-05 -6.000000e-01 -2.642530e-05 -7.000000e-01 -4.585425e-05 -8.000000e-01 -7.711395e-05 -9.000000e-01 -1.250385e-04 -1.000000e+00 -1.946418e-04 -1.100000e+00 -2.904750e-04 -1.200000e+00 -4.165579e-04 -1.000000e-01 -1.718215e-05 -2.000000e-01 -3.176679e-05 -3.000000e-01 -5.528474e-05 -4.000000e-01 -9.222502e-05 -5.000000e-01 -1.472663e-04 -6.000000e-01 -2.244918e-04 -7.000000e-01 -3.265108e-04 -8.000000e-01 -4.540905e-04 -9.000000e-01 -6.064951e-04 -1.000000e+00 -7.823903e-04 -1.100000e+00 -9.810606e-04 -1.200000e+00 -1.203735e-03 -1.000000e-01 -1.549685e-04 -2.000000e-01 -2.491282e-04 -3.000000e-01 -3.621175e-04 -4.000000e-01 -4.984905e-04 -5.000000e-01 -6.574256e-04 -6.000000e-01 -8.368378e-04 -7.000000e-01 -1.034283e-03 -8.000000e-01 -1.247420e-03 -9.000000e-01 -1.474375e-03 -1.000000e+00 -1.714239e-03 -1.100000e+00 -1.967841e-03 -1.200000e+00 -2.238793e-03 -1.000000e-01 -5.686264e-04 -2.000000e-01 -8.429179e-04 -3.000000e-01 -1.065867e-03 -4.000000e-01 -1.290773e-03 -5.000000e-01 -1.523843e-03 -6.000000e-01 -1.765604e-03 -7.000000e-01 -2.015531e-03 -8.000000e-01 -2.272937e-03 -9.000000e-01 -2.537349e-03 -1.000000e+00 -2.809054e-03 -1.100000e+00 -3.090040e-03 -1.200000e+00 -3.385297e-03 -1.000000e-01 -1.086977e-03 -2.000000e-01 -1.656781e-03 -3.000000e-01 -1.995893e-03 -4.000000e-01 -2.285579e-03 -5.000000e-01 -2.565411e-03 -6.000000e-01 -2.844174e-03 -7.000000e-01 -3.124581e-03 -8.000000e-01 -3.407622e-03 -9.000000e-01 -3.693818e-03 -1.000000e+00 -3.984069e-03 -1.100000e+00 -4.280833e-03 -1.200000e+00 -4.589701e-03 -1.000000e-01 -1.574189e-03 -2.000000e-01 -2.504213e-03 -3.000000e-01 -3.012338e-03 -4.000000e-01 -3.370575e-03 -5.000000e-01 -3.690079e-03 -6.000000e-01 -3.997000e-03 -7.000000e-01 -4.299341e-03 -8.000000e-01 -4.600280e-03 -9.000000e-01 -4.901406e-03 -1.000000e+00 -5.204133e-03 -1.100000e+00 -5.511135e-03 -1.200000e+00 -5.828196e-03 -1.000000e-01 -2.011992e-03 -2.000000e-01 -3.305813e-03 -3.000000e-01 -4.046128e-03 -4.000000e-01 -4.495270e-03 -5.000000e-01 -4.857153e-03 -6.000000e-01 -5.190136e-03 -7.000000e-01 -5.511099e-03 -8.000000e-01 -5.826437e-03 -9.000000e-01 -6.139159e-03 -1.000000e+00 -6.451299e-03 -1.100000e+00 -6.765687e-03 -1.200000e+00 -7.088064e-03 -1.000000e-01 -2.406050e-03 -2.000000e-01 -4.044688e-03 -3.000000e-01 -5.056892e-03 -4.000000e-01 -5.631826e-03 -5.000000e-01 -6.044962e-03 -6.000000e-01 -6.405357e-03 -7.000000e-01 -6.744132e-03 -8.000000e-01 -7.072396e-03 -9.000000e-01 -7.395090e-03 -1.000000e+00 -7.715076e-03 -1.100000e+00 -8.035387e-03 -1.200000e+00 -8.361602e-03 -1.000000e-01 -2.764419e-03 -2.000000e-01 -4.725470e-03 -3.000000e-01 -6.021583e-03 -4.000000e-01 -6.761599e-03 -5.000000e-01 -7.240069e-03 -6.000000e-01 -7.631563e-03 -7.000000e-01 -7.988799e-03 -8.000000e-01 -8.329639e-03 -9.000000e-01 -8.661621e-03 -1.000000e+00 -8.988710e-03 -1.100000e+00 -9.314254e-03 -1.200000e+00 -9.643637e-03 -1.000000e-01 -3.094289e-03 -2.000000e-01 -5.357200e-03 -3.000000e-01 -6.932087e-03 -4.000000e-01 -7.870787e-03 -5.000000e-01 -8.433142e-03 -6.000000e-01 -8.861304e-03 -7.000000e-01 -9.238622e-03 -8.000000e-01 -9.592364e-03 -9.000000e-01 -9.933499e-03 -1.000000e+00 -1.026742e-02 -1.100000e+00 -1.059795e-02 -1.200000e+00 -1.093030e-02 -1.000000e-01 -3.401616e-03 -2.000000e-01 -5.948752e-03 -3.000000e-01 -7.790505e-03 -4.000000e-01 -8.949355e-03 -5.000000e-01 -9.617087e-03 -6.000000e-01 -1.008911e-02 -7.000000e-01 -1.048881e-02 -8.000000e-01 -1.085620e-02 -9.000000e-01 -1.120669e-02 -1.000000e+00 -1.154744e-02 -1.100000e+00 -1.188296e-02 -1.200000e+00 -1.221838e-02 -1.000000e-01 -8.631823e-07 -2.000000e-01 -1.438465e-06 -3.000000e-01 -2.301954e-06 -4.000000e-01 -3.640786e-06 -5.000000e-01 -5.713048e-06 -6.000000e-01 -8.903592e-06 -7.000000e-01 -1.378053e-05 -8.000000e-01 -2.116612e-05 -9.000000e-01 -3.222254e-05 -1.000000e+00 -4.855402e-05 -1.100000e+00 -7.233194e-05 -1.200000e+00 -1.064627e-04 -1.000000e-01 -4.738432e-06 -2.000000e-01 -7.771790e-06 -3.000000e-01 -1.215502e-05 -4.000000e-01 -1.871780e-05 -5.000000e-01 -2.844887e-05 -6.000000e-01 -4.263590e-05 -7.000000e-01 -6.288044e-05 -8.000000e-01 -9.105910e-05 -9.000000e-01 -1.292439e-04 -1.000000e+00 -1.796264e-04 -1.100000e+00 -2.445230e-04 -1.200000e+00 -3.265444e-04 -1.000000e-01 -2.268007e-05 -2.000000e-01 -3.671152e-05 -3.000000e-01 -5.476309e-05 -4.000000e-01 -7.941424e-05 -5.000000e-01 -1.123910e-04 -6.000000e-01 -1.553284e-04 -7.000000e-01 -2.097071e-04 -8.000000e-01 -2.767683e-04 -9.000000e-01 -3.574843e-04 -1.000000e+00 -4.526342e-04 -1.100000e+00 -5.630370e-04 -1.200000e+00 -6.899760e-04 -1.000000e-01 -7.795475e-05 -2.000000e-01 -1.282318e-04 -3.000000e-01 -1.771714e-04 -4.000000e-01 -2.351306e-04 -5.000000e-01 -3.039484e-04 -6.000000e-01 -3.843620e-04 -7.000000e-01 -4.767616e-04 -8.000000e-01 -5.813319e-04 -9.000000e-01 -6.981353e-04 -1.000000e+00 -8.272296e-04 -1.100000e+00 -9.688989e-04 -1.200000e+00 -1.124067e-03 -1.000000e-01 -1.673901e-04 -2.000000e-01 -2.919364e-04 -3.000000e-01 -3.883247e-04 -4.000000e-01 -4.824540e-04 -5.000000e-01 -5.840218e-04 -6.000000e-01 -6.949196e-04 -7.000000e-01 -8.156634e-04 -8.000000e-01 -9.464442e-04 -9.000000e-01 -1.087345e-03 -1.000000e+00 -1.238445e-03 -1.100000e+00 -1.399981e-03 -1.200000e+00 -1.572708e-03 -1.000000e-01 -2.588371e-04 -2.000000e-01 -4.692309e-04 -3.000000e-01 -6.339755e-04 -4.000000e-01 -7.697756e-04 -5.000000e-01 -9.000296e-04 -6.000000e-01 -1.034706e-03 -7.000000e-01 -1.176490e-03 -8.000000e-01 -1.326331e-03 -9.000000e-01 -1.484682e-03 -1.000000e+00 -1.651817e-03 -1.100000e+00 -1.828002e-03 -1.200000e+00 -2.013786e-03 -1.000000e-01 -3.361522e-04 -2.000000e-01 -6.223509e-04 -3.000000e-01 -8.590640e-04 -4.000000e-01 -1.051343e-03 -5.000000e-01 -1.216291e-03 -6.000000e-01 -1.374418e-03 -7.000000e-01 -1.535064e-03 -8.000000e-01 -1.701326e-03 -9.000000e-01 -1.874467e-03 -1.000000e+00 -2.055136e-03 -1.100000e+00 -2.243738e-03 -1.200000e+00 -2.440708e-03 -1.000000e-01 -3.982960e-04 -2.000000e-01 -7.475021e-04 -3.000000e-01 -1.047766e-03 -4.000000e-01 -1.300607e-03 -5.000000e-01 -1.512522e-03 -6.000000e-01 -1.700307e-03 -7.000000e-01 -1.881387e-03 -8.000000e-01 -2.063944e-03 -9.000000e-01 -2.251100e-03 -1.000000e+00 -2.444264e-03 -1.100000e+00 -2.644189e-03 -1.200000e+00 -2.851384e-03 -1.000000e-01 -4.480843e-04 -2.000000e-01 -8.492217e-04 -3.000000e-01 -1.203480e-03 -4.000000e-01 -1.511457e-03 -5.000000e-01 -1.775348e-03 -6.000000e-01 -2.002718e-03 -7.000000e-01 -2.209489e-03 -8.000000e-01 -2.410171e-03 -9.000000e-01 -2.611741e-03 -1.000000e+00 -2.817167e-03 -1.100000e+00 -3.027893e-03 -1.200000e+00 -3.244733e-03 -1.000000e-01 -4.882235e-04 -2.000000e-01 -9.322170e-04 -3.000000e-01 -1.331985e-03 -4.000000e-01 -1.687793e-03 -5.000000e-01 -2.000500e-03 -6.000000e-01 -2.272881e-03 -7.000000e-01 -2.513269e-03 -8.000000e-01 -2.736309e-03 -9.000000e-01 -2.953975e-03 -1.000000e+00 -3.172185e-03 -1.100000e+00 -3.393685e-03 -1.200000e+00 -3.619898e-03 -1.000000e-01 -5.207382e-04 -2.000000e-01 -1.000148e-03 -3.000000e-01 -1.438171e-03 -4.000000e-01 -1.834903e-03 -5.000000e-01 -2.190712e-03 -6.000000e-01 -2.506681e-03 -7.000000e-01 -2.786141e-03 -8.000000e-01 -3.037894e-03 -9.000000e-01 -3.275081e-03 -1.000000e+00 -3.507574e-03 -1.100000e+00 -3.740411e-03 -1.200000e+00 -3.976102e-03 -1.000000e-01 -5.471142e-04 -2.000000e-01 -1.055787e-03 -3.000000e-01 -1.525902e-03 -4.000000e-01 -1.957446e-03 -5.000000e-01 -2.350558e-03 -6.000000e-01 -2.705694e-03 -7.000000e-01 -3.024166e-03 -8.000000e-01 -3.309845e-03 -9.000000e-01 -3.571700e-03 -1.000000e+00 -3.821301e-03 -1.100000e+00 -4.066818e-03 -1.200000e+00 -4.312571e-03 ngspice-26/tests/bsim4/pmos/reference/acFreq_wpemod.standard0000644000265600020320000000710512264261473023626 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/noise2.standard0000644000265600020320000000635012264261473022252 0ustar andreasadminFreq N(d) 1000 5.663364e-18 1258.925 4.396209e-18 1584.893 3.412583e-18 1995.262 2.649047e-18 2511.886 2.056354e-18 3162.278 1.596278e-18 3981.072 1.239145e-18 5011.872 9.619215e-19 6309.573 7.467277e-19 7943.282 5.796841e-19 10000 4.50017e-19 12589.25 3.493633e-19 15848.93 2.712312e-19 19952.62 2.105813e-19 25118.86 1.63502e-19 31622.78 1.269569e-19 39810.72 9.858882e-20 50118.72 7.656818e-20 63095.73 5.947473e-20 79432.82 4.620599e-20 100000 3.590617e-20 125892.5 2.791096e-20 158489.3 2.17047e-20 199526.2 1.688711e-20 251188.6 1.314747e-20 316227.8 1.024459e-20 398107.2 7.991233e-21 501187.2 6.242072e-21 630957.3 4.884291e-21 794328.2 3.830318e-21 1000000 3.012174e-21 1258925 2.377092e-21 1584893 1.884111e-21 1995262 1.501436e-21 2511886 1.204386e-21 3162278 9.738019e-22 3981072 7.948115e-22 5011872 6.558707e-22 6309573 5.480183e-22 7943282 4.642982e-22 10000000 3.993107e-22 12589250 3.488643e-22 15848930 3.097055e-22 19952620 2.793086e-22 25118860 2.55713e-22 31622780 2.373971e-22 39810720 2.231794e-22 50118720 2.121429e-22 63095730 2.035759e-22 79432820 1.969258e-22 100000000 1.917636e-22 1000 9.363832e-18 1258.925 7.268686e-18 1584.893 5.642335e-18 1995.262 4.379884e-18 2511.886 3.399911e-18 3162.278 2.639209e-18 3981.072 2.048717e-18 5011.872 1.590349e-18 6309.573 1.234542e-18 7943.282 9.583478e-19 10000 7.43953e-19 12589.25 5.775296e-19 15848.93 4.483439e-19 19952.62 3.480639e-19 25118.86 2.702219e-19 31622.78 2.097972e-19 39810.72 1.628927e-19 50118.72 1.264833e-19 63095.73 9.822052e-20 79432.82 7.628165e-20 100000 5.925166e-20 125892.5 4.603218e-20 158489.3 3.57706e-20 199526.2 2.780507e-20 251188.6 2.162186e-20 316227.8 1.682216e-20 398107.2 1.30964e-20 501187.2 1.020429e-20 630957.3 7.959305e-21 794328.2 6.216638e-21 1000000 4.863898e-21 1258925 3.813838e-21 1584893 2.998731e-21 1995262 2.366007e-21 2511886 1.874857e-21 3162278 1.493603e-21 3981072 1.197656e-21 5011872 9.679277e-22 6309573 7.896019e-22 7943282 6.511769e-22 10000000 5.43725e-22 12589250 4.603157e-22 15848930 3.955695e-22 19952620 3.453104e-22 25118860 3.06297e-22 31622780 2.760129e-22 39810720 2.52505e-22 50118720 2.34257e-22 63095730 2.200921e-22 79432820 2.090966e-22 100000000 2.005614e-22 1000 1.250569e-17 1258.925 9.707542e-18 1584.893 7.535489e-18 1995.262 5.849439e-18 2511.886 4.540647e-18 3162.278 3.524702e-18 3981.072 2.736077e-18 5011.872 2.123909e-18 6309.573 1.648716e-18 7943.282 1.279848e-18 10000 9.935157e-19 12589.25 7.71251e-19 15848.93 5.987186e-19 19952.62 4.647909e-19 25118.86 3.608299e-19 31622.78 2.801305e-19 39810.72 2.174878e-19 50118.72 1.688616e-19 63095.73 1.311156e-19 79432.82 1.018154e-19 100000 7.907123e-20 125892.5 6.141612e-20 158489.3 4.771139e-20 199526.2 3.707313e-20 251188.6 2.881521e-20 316227.8 2.240503e-20 398107.2 1.742914e-20 501187.2 1.356662e-20 630957.3 1.056836e-20 794328.2 8.24096e-21 1000000 6.434324e-21 1258925 5.031929e-21 1584893 3.943324e-21 1995262 3.098297e-21 2511886 2.442347e-21 3162278 1.933168e-21 3981072 1.537919e-21 5011872 1.231109e-21 6309573 9.929479e-22 7943282 8.080762e-22 10000000 6.6457e-22 12589250 5.531738e-22 15848930 4.667028e-22 19952620 3.9958e-22 25118860 3.47476e-22 31622780 3.070305e-22 39810720 2.756348e-22 50118720 2.512639e-22 63095730 2.323461e-22 79432820 2.176613e-22 100000000 2.062622e-22 ngspice-26/tests/bsim4/pmos/reference/dcSweep_nrs.standard0000644000265600020320000002751212264261473023332 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060459e-07 -2.000000e-01 -3.950843e-07 -3.000000e-01 -7.282913e-07 -4.000000e-01 -1.318220e-06 -5.000000e-01 -2.350262e-06 -6.000000e-01 -4.130322e-06 -7.000000e-01 -7.154493e-06 -8.000000e-01 -1.220995e-05 -9.000000e-01 -2.051072e-05 -1.000000e+00 -3.385988e-05 -1.100000e+00 -5.481203e-05 -1.200000e+00 -8.680571e-05 -1.000000e-01 -2.345354e-06 -2.000000e-01 -4.292624e-06 -3.000000e-01 -7.512966e-06 -4.000000e-01 -1.285496e-05 -5.000000e-01 -2.155160e-05 -6.000000e-01 -3.533892e-05 -7.000000e-01 -5.646687e-05 -8.000000e-01 -8.756083e-05 -9.000000e-01 -1.313475e-04 -1.000000e+00 -1.903734e-04 -1.100000e+00 -2.669083e-04 -1.200000e+00 -3.631695e-04 -1.000000e-01 -2.074564e-05 -2.000000e-01 -3.571642e-05 -3.000000e-01 -5.755819e-05 -4.000000e-01 -8.909618e-05 -5.000000e-01 -1.327365e-04 -6.000000e-01 -1.904438e-04 -7.000000e-01 -2.635347e-04 -8.000000e-01 -3.526230e-04 -9.000000e-01 -4.577558e-04 -1.000000e+00 -5.787310e-04 -1.100000e+00 -7.155803e-04 -1.200000e+00 -8.691866e-04 -1.000000e-01 -1.143359e-04 -2.000000e-01 -1.810175e-04 -3.000000e-01 -2.540622e-04 -4.000000e-01 -3.406089e-04 -5.000000e-01 -4.413567e-04 -6.000000e-01 -5.560457e-04 -7.000000e-01 -6.840585e-04 -8.000000e-01 -8.246346e-04 -9.000000e-01 -9.770300e-04 -1.000000e+00 -1.140740e-03 -1.100000e+00 -1.315876e-03 -1.200000e+00 -1.503724e-03 -1.000000e-01 -3.062904e-04 -2.000000e-01 -4.895171e-04 -3.000000e-01 -6.291121e-04 -4.000000e-01 -7.690486e-04 -5.000000e-01 -9.168119e-04 -6.000000e-01 -1.073568e-03 -7.000000e-01 -1.239331e-03 -8.000000e-01 -1.413811e-03 -9.000000e-01 -1.596663e-03 -1.000000e+00 -1.787691e-03 -1.100000e+00 -1.987210e-03 -1.200000e+00 -2.196661e-03 -1.000000e-01 -5.128599e-04 -2.000000e-01 -8.628067e-04 -3.000000e-01 -1.097883e-03 -4.000000e-01 -1.290495e-03 -5.000000e-01 -1.476773e-03 -6.000000e-01 -1.665549e-03 -7.000000e-01 -1.859242e-03 -8.000000e-01 -2.058630e-03 -9.000000e-01 -2.263943e-03 -1.000000e+00 -2.475280e-03 -1.100000e+00 -2.693015e-03 -1.200000e+00 -2.918449e-03 -1.000000e-01 -6.933608e-04 -2.000000e-01 -1.209904e-03 -3.000000e-01 -1.577138e-03 -4.000000e-01 -1.844046e-03 -5.000000e-01 -2.072628e-03 -6.000000e-01 -2.291815e-03 -7.000000e-01 -2.510323e-03 -8.000000e-01 -2.731157e-03 -9.000000e-01 -2.955537e-03 -1.000000e+00 -3.184030e-03 -1.100000e+00 -3.417129e-03 -1.200000e+00 -3.655927e-03 -1.000000e-01 -8.449269e-04 -2.000000e-01 -1.510568e-03 -3.000000e-01 -2.017141e-03 -4.000000e-01 -2.389541e-03 -5.000000e-01 -2.677120e-03 -6.000000e-01 -2.931627e-03 -7.000000e-01 -3.175743e-03 -8.000000e-01 -3.417330e-03 -9.000000e-01 -3.659510e-03 -1.000000e+00 -3.903718e-03 -1.100000e+00 -4.150785e-03 -1.200000e+00 -4.401702e-03 -1.000000e-01 -9.721833e-04 -2.000000e-01 -1.768174e-03 -3.000000e-01 -2.404211e-03 -4.000000e-01 -2.896083e-03 -5.000000e-01 -3.268193e-03 -6.000000e-01 -3.570365e-03 -7.000000e-01 -3.844477e-03 -8.000000e-01 -4.108173e-03 -9.000000e-01 -4.368275e-03 -1.000000e+00 -4.627791e-03 -1.100000e+00 -4.888254e-03 -1.200000e+00 -5.150791e-03 -1.000000e-01 -1.079783e-03 -2.000000e-01 -1.989218e-03 -3.000000e-01 -2.741504e-03 -4.000000e-01 -3.349104e-03 -5.000000e-01 -3.824134e-03 -6.000000e-01 -4.193934e-03 -7.000000e-01 -4.507195e-03 -8.000000e-01 -4.796686e-03 -9.000000e-01 -5.076164e-03 -1.000000e+00 -5.351460e-03 -1.100000e+00 -5.625370e-03 -1.200000e+00 -5.899508e-03 -1.000000e-01 -1.171454e-03 -2.000000e-01 -2.179689e-03 -3.000000e-01 -3.035422e-03 -4.000000e-01 -3.749070e-03 -5.000000e-01 -4.329381e-03 -6.000000e-01 -4.786691e-03 -7.000000e-01 -5.154224e-03 -8.000000e-01 -5.476431e-03 -9.000000e-01 -5.778371e-03 -1.000000e+00 -6.070864e-03 -1.100000e+00 -6.358876e-03 -1.200000e+00 -6.644986e-03 -1.000000e-01 -1.250107e-03 -2.000000e-01 -2.344609e-03 -3.000000e-01 -3.292196e-03 -4.000000e-01 -4.101614e-03 -5.000000e-01 -4.780511e-03 -6.000000e-01 -5.333897e-03 -7.000000e-01 -5.774256e-03 -8.000000e-01 -6.140515e-03 -9.000000e-01 -6.470272e-03 -1.000000e+00 -6.782568e-03 -1.100000e+00 -7.086024e-03 -1.200000e+00 -7.384879e-03 -1.000000e-01 -3.879256e-08 -2.000000e-01 -8.827801e-08 -3.000000e-01 -1.926021e-07 -4.000000e-01 -4.097756e-07 -5.000000e-01 -8.502571e-07 -6.000000e-01 -1.716608e-06 -7.000000e-01 -3.365521e-06 -8.000000e-01 -6.405082e-06 -9.000000e-01 -1.185004e-05 -1.000000e+00 -2.136403e-05 -1.100000e+00 -3.759549e-05 -1.200000e+00 -6.454447e-05 -1.000000e-01 -1.051000e-06 -2.000000e-01 -2.179959e-06 -3.000000e-01 -4.267067e-06 -4.000000e-01 -8.052045e-06 -5.000000e-01 -1.473049e-05 -6.000000e-01 -2.618182e-05 -7.000000e-01 -4.516459e-05 -8.000000e-01 -7.531008e-05 -9.000000e-01 -1.207444e-04 -1.000000e+00 -1.854159e-04 -1.100000e+00 -2.725559e-04 -1.200000e+00 -3.847469e-04 -1.000000e-01 -1.707358e-05 -2.000000e-01 -3.142094e-05 -3.000000e-01 -5.430853e-05 -4.000000e-01 -8.973934e-05 -5.000000e-01 -1.415896e-04 -6.000000e-01 -2.128976e-04 -7.000000e-01 -3.052340e-04 -8.000000e-01 -4.186174e-04 -9.000000e-01 -5.519766e-04 -1.000000e+00 -7.039323e-04 -1.100000e+00 -8.736931e-04 -1.200000e+00 -1.061947e-03 -1.000000e-01 -1.487820e-04 -2.000000e-01 -2.357068e-04 -3.000000e-01 -3.374994e-04 -4.000000e-01 -4.583563e-04 -5.000000e-01 -5.972165e-04 -6.000000e-01 -7.522264e-04 -7.000000e-01 -9.213627e-04 -8.000000e-01 -1.102754e-03 -9.000000e-01 -1.294913e-03 -1.000000e+00 -1.497067e-03 -1.100000e+00 -1.709672e-03 -1.200000e+00 -1.935095e-03 -1.000000e-01 -5.194238e-04 -2.000000e-01 -7.600636e-04 -3.000000e-01 -9.512784e-04 -4.000000e-01 -1.142757e-03 -5.000000e-01 -1.340243e-03 -6.000000e-01 -1.544364e-03 -7.000000e-01 -1.754797e-03 -8.000000e-01 -1.971044e-03 -9.000000e-01 -2.192733e-03 -1.000000e+00 -2.419979e-03 -1.100000e+00 -2.654004e-03 -1.200000e+00 -2.897987e-03 -1.000000e-01 -9.562489e-04 -2.000000e-01 -1.455355e-03 -3.000000e-01 -1.744063e-03 -4.000000e-01 -1.987644e-03 -5.000000e-01 -2.222236e-03 -6.000000e-01 -2.455640e-03 -7.000000e-01 -2.690214e-03 -8.000000e-01 -2.926825e-03 -9.000000e-01 -3.165887e-03 -1.000000e+00 -3.407960e-03 -1.100000e+00 -3.654511e-03 -1.200000e+00 -3.908929e-03 -1.000000e-01 -1.341128e-03 -2.000000e-01 -2.154747e-03 -3.000000e-01 -2.599280e-03 -4.000000e-01 -2.902583e-03 -5.000000e-01 -3.170113e-03 -6.000000e-01 -3.426478e-03 -7.000000e-01 -3.678859e-03 -8.000000e-01 -3.930023e-03 -9.000000e-01 -4.181290e-03 -1.000000e+00 -4.433629e-03 -1.100000e+00 -4.688595e-03 -1.200000e+00 -4.949502e-03 -1.000000e-01 -1.664970e-03 -2.000000e-01 -2.785405e-03 -3.000000e-01 -3.451758e-03 -4.000000e-01 -3.844752e-03 -5.000000e-01 -4.150946e-03 -6.000000e-01 -4.429975e-03 -7.000000e-01 -4.698220e-03 -8.000000e-01 -4.961568e-03 -9.000000e-01 -5.222662e-03 -1.000000e+00 -5.483046e-03 -1.100000e+00 -5.744386e-03 -1.200000e+00 -6.009802e-03 -1.000000e-01 -1.938760e-03 -2.000000e-01 -3.337856e-03 -3.000000e-01 -4.256637e-03 -4.000000e-01 -4.786747e-03 -5.000000e-01 -5.146027e-03 -6.000000e-01 -5.451250e-03 -7.000000e-01 -5.735757e-03 -8.000000e-01 -6.010646e-03 -9.000000e-01 -6.280573e-03 -1.000000e+00 -6.547948e-03 -1.100000e+00 -6.814680e-03 -1.200000e+00 -7.083683e-03 -1.000000e-01 -2.173665e-03 -2.000000e-01 -3.822095e-03 -3.000000e-01 -4.990244e-03 -4.000000e-01 -5.705186e-03 -5.000000e-01 -6.141868e-03 -6.000000e-01 -6.480497e-03 -7.000000e-01 -6.783417e-03 -8.000000e-01 -7.070317e-03 -9.000000e-01 -7.348917e-03 -1.000000e+00 -7.622903e-03 -1.100000e+00 -7.894638e-03 -1.200000e+00 -8.166914e-03 -1.000000e-01 -2.378548e-03 -2.000000e-01 -4.250253e-03 -3.000000e-01 -5.650580e-03 -4.000000e-01 -6.578938e-03 -5.000000e-01 -7.126642e-03 -6.000000e-01 -7.510241e-03 -7.000000e-01 -7.835410e-03 -8.000000e-01 -8.135670e-03 -9.000000e-01 -8.423364e-03 -1.000000e+00 -8.704022e-03 -1.100000e+00 -8.980731e-03 -1.200000e+00 -9.256316e-03 -1.000000e-01 -2.560138e-03 -2.000000e-01 -4.632971e-03 -3.000000e-01 -6.246172e-03 -4.000000e-01 -7.393244e-03 -5.000000e-01 -8.088609e-03 -6.000000e-01 -8.533970e-03 -7.000000e-01 -8.887112e-03 -8.000000e-01 -9.202895e-03 -9.000000e-01 -9.500567e-03 -1.000000e+00 -9.788269e-03 -1.100000e+00 -1.007016e-02 -1.200000e+00 -1.034929e-02 -1.000000e-01 -8.629794e-07 -2.000000e-01 -1.437930e-06 -3.000000e-01 -2.300608e-06 -4.000000e-01 -3.637471e-06 -5.000000e-01 -5.705018e-06 -6.000000e-01 -8.884438e-06 -7.000000e-01 -1.373560e-05 -8.000000e-01 -2.106281e-05 -9.000000e-01 -3.199080e-05 -1.000000e+00 -4.804917e-05 -1.100000e+00 -7.126823e-05 -1.200000e+00 -1.043002e-04 -1.000000e-01 -4.732657e-06 -2.000000e-01 -7.757181e-06 -3.000000e-01 -1.212018e-05 -4.000000e-01 -1.863745e-05 -5.000000e-01 -2.826956e-05 -6.000000e-01 -4.225032e-05 -7.000000e-01 -6.208588e-05 -8.000000e-01 -8.949807e-05 -9.000000e-01 -1.263297e-04 -1.000000e+00 -1.744615e-04 -1.100000e+00 -2.358135e-04 -1.200000e+00 -3.125013e-04 -1.000000e-01 -2.255904e-05 -2.000000e-01 -3.642696e-05 -3.000000e-01 -5.416710e-05 -4.000000e-01 -7.824342e-05 -5.000000e-01 -1.102207e-04 -6.000000e-01 -1.515248e-04 -7.000000e-01 -2.033903e-04 -8.000000e-01 -2.667965e-04 -9.000000e-01 -3.424593e-04 -1.000000e+00 -4.309186e-04 -1.100000e+00 -5.327554e-04 -1.200000e+00 -6.489584e-04 -1.000000e-01 -7.678287e-05 -2.000000e-01 -1.256656e-04 -3.000000e-01 -1.727366e-04 -4.000000e-01 -2.280465e-04 -5.000000e-01 -2.932324e-04 -6.000000e-01 -3.688630e-04 -7.000000e-01 -4.551884e-04 -8.000000e-01 -5.522806e-04 -9.000000e-01 -6.601125e-04 -1.000000e+00 -7.786624e-04 -1.100000e+00 -9.081100e-04 -1.200000e+00 -1.049180e-03 -1.000000e-01 -1.631395e-04 -2.000000e-01 -2.827890e-04 -3.000000e-01 -3.741051e-04 -4.000000e-01 -4.625660e-04 -5.000000e-01 -5.574913e-04 -6.000000e-01 -6.606211e-04 -7.000000e-01 -7.723871e-04 -8.000000e-01 -8.929170e-04 -9.000000e-01 -1.022240e-03 -1.000000e+00 -1.160381e-03 -1.100000e+00 -1.307498e-03 -1.200000e+00 -1.464183e-03 -1.000000e-01 -2.502993e-04 -2.000000e-01 -4.514634e-04 -3.000000e-01 -6.071156e-04 -4.000000e-01 -7.340122e-04 -5.000000e-01 -8.549879e-04 -6.000000e-01 -9.795637e-04 -7.000000e-01 -1.110226e-03 -8.000000e-01 -1.247818e-03 -9.000000e-01 -1.392722e-03 -1.000000e+00 -1.545153e-03 -1.100000e+00 -1.705311e-03 -1.200000e+00 -1.873628e-03 -1.000000e-01 -3.231811e-04 -2.000000e-01 -5.961609e-04 -3.000000e-01 -8.200290e-04 -4.000000e-01 -1.000078e-03 -5.000000e-01 -1.153069e-03 -6.000000e-01 -1.298920e-03 -7.000000e-01 -1.446556e-03 -8.000000e-01 -1.598860e-03 -9.000000e-01 -1.756979e-03 -1.000000e+00 -1.921481e-03 -1.100000e+00 -2.092714e-03 -1.200000e+00 -2.271030e-03 -1.000000e-01 -3.811693e-04 -2.000000e-01 -7.135623e-04 -3.000000e-01 -9.976578e-04 -4.000000e-01 -1.235164e-03 -5.000000e-01 -1.432437e-03 -6.000000e-01 -1.605727e-03 -7.000000e-01 -1.771951e-03 -8.000000e-01 -1.938957e-03 -9.000000e-01 -2.109676e-03 -1.000000e+00 -2.285399e-03 -1.100000e+00 -2.466806e-03 -1.200000e+00 -2.654339e-03 -1.000000e-01 -4.272140e-04 -2.000000e-01 -8.082901e-04 -3.000000e-01 -1.143406e-03 -4.000000e-01 -1.433231e-03 -5.000000e-01 -1.679914e-03 -6.000000e-01 -1.890643e-03 -7.000000e-01 -2.080750e-03 -8.000000e-01 -2.264358e-03 -9.000000e-01 -2.448191e-03 -1.000000e+00 -2.635048e-03 -1.100000e+00 -2.826270e-03 -1.200000e+00 -3.022596e-03 -1.000000e-01 -4.640584e-04 -2.000000e-01 -8.850848e-04 -3.000000e-01 -1.263052e-03 -4.000000e-01 -1.598194e-03 -5.000000e-01 -1.891315e-03 -6.000000e-01 -2.144994e-03 -7.000000e-01 -2.367049e-03 -8.000000e-01 -2.571586e-03 -9.000000e-01 -2.770304e-03 -1.000000e+00 -2.968930e-03 -1.100000e+00 -3.170068e-03 -1.200000e+00 -3.375049e-03 -1.000000e-01 -4.937235e-04 -2.000000e-01 -9.476065e-04 -3.000000e-01 -1.361474e-03 -4.000000e-01 -1.735321e-03 -5.000000e-01 -2.069425e-03 -6.000000e-01 -2.364734e-03 -7.000000e-01 -2.624273e-03 -8.000000e-01 -2.856267e-03 -9.000000e-01 -3.073413e-03 -1.000000e+00 -3.285397e-03 -1.100000e+00 -3.497113e-03 -1.200000e+00 -3.710954e-03 -1.000000e-01 -5.176715e-04 -2.000000e-01 -9.985959e-04 -3.000000e-01 -1.442495e-03 -4.000000e-01 -1.849212e-03 -5.000000e-01 -2.218762e-03 -6.000000e-01 -2.551473e-03 -7.000000e-01 -2.848469e-03 -8.000000e-01 -3.113228e-03 -9.000000e-01 -3.354131e-03 -1.000000e+00 -3.582419e-03 -1.100000e+00 -3.806142e-03 -1.200000e+00 -4.029508e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_scb.standard0000644000265600020320000002751212264261473023277 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060620e-07 -2.000000e-01 -3.951414e-07 -3.000000e-01 -7.284812e-07 -4.000000e-01 -1.318828e-06 -5.000000e-01 -2.352149e-06 -6.000000e-01 -4.136004e-06 -7.000000e-01 -7.171094e-06 -8.000000e-01 -1.225693e-05 -9.000000e-01 -2.063911e-05 -1.000000e+00 -3.419648e-05 -1.100000e+00 -5.565272e-05 -1.200000e+00 -8.879236e-05 -1.000000e-01 -2.347263e-06 -2.000000e-01 -4.298730e-06 -3.000000e-01 -7.531125e-06 -4.000000e-01 -1.290654e-05 -5.000000e-01 -2.169163e-05 -6.000000e-01 -3.569962e-05 -7.000000e-01 -5.733945e-05 -8.000000e-01 -8.952389e-05 -9.000000e-01 -1.354296e-04 -1.000000e+00 -1.982138e-04 -1.100000e+00 -2.808861e-04 -1.200000e+00 -3.865233e-04 -1.000000e-01 -2.087763e-05 -2.000000e-01 -3.608031e-05 -3.000000e-01 -5.844587e-05 -4.000000e-01 -9.107256e-05 -5.000000e-01 -1.367670e-04 -6.000000e-01 -1.979962e-04 -7.000000e-01 -2.766100e-04 -8.000000e-01 -3.737024e-04 -9.000000e-01 -4.896906e-04 -1.000000e+00 -6.246421e-04 -1.100000e+00 -7.788533e-04 -1.200000e+00 -9.536559e-04 -1.000000e-01 -1.173971e-04 -2.000000e-01 -1.876023e-04 -3.000000e-01 -2.657281e-04 -4.000000e-01 -3.594677e-04 -5.000000e-01 -4.698381e-04 -6.000000e-01 -5.967650e-04 -7.000000e-01 -7.397098e-04 -8.000000e-01 -8.979140e-04 -9.000000e-01 -1.070598e-03 -1.000000e+00 -1.257254e-03 -1.100000e+00 -1.458147e-03 -1.200000e+00 -1.675083e-03 -1.000000e-01 -3.223010e-04 -2.000000e-01 -5.203969e-04 -3.000000e-01 -6.746175e-04 -4.000000e-01 -8.307146e-04 -5.000000e-01 -9.967252e-04 -6.000000e-01 -1.173932e-03 -7.000000e-01 -1.362352e-03 -8.000000e-01 -1.561660e-03 -9.000000e-01 -1.771465e-03 -1.000000e+00 -1.991574e-03 -1.100000e+00 -2.222486e-03 -1.200000e+00 -2.466237e-03 -1.000000e-01 -5.499072e-04 -2.000000e-01 -9.317058e-04 -3.000000e-01 -1.193799e-03 -4.000000e-01 -1.411782e-03 -5.000000e-01 -1.623952e-03 -6.000000e-01 -1.839935e-03 -7.000000e-01 -2.062417e-03 -8.000000e-01 -2.292256e-03 -9.000000e-01 -2.529699e-03 -1.000000e+00 -2.774867e-03 -1.100000e+00 -3.028306e-03 -1.200000e+00 -3.291904e-03 -1.000000e-01 -7.549085e-04 -2.000000e-01 -1.322081e-03 -3.000000e-01 -1.730657e-03 -4.000000e-01 -2.033007e-03 -5.000000e-01 -2.295108e-03 -6.000000e-01 -2.547775e-03 -7.000000e-01 -2.800515e-03 -8.000000e-01 -3.056660e-03 -9.000000e-01 -3.317561e-03 -1.000000e+00 -3.583857e-03 -1.100000e+00 -3.856198e-03 -1.200000e+00 -4.136201e-03 -1.000000e-01 -9.321283e-04 -2.000000e-01 -1.667897e-03 -3.000000e-01 -2.231426e-03 -4.000000e-01 -2.650298e-03 -5.000000e-01 -2.979104e-03 -6.000000e-01 -3.273205e-03 -7.000000e-01 -3.556646e-03 -8.000000e-01 -3.837940e-03 -9.000000e-01 -4.120525e-03 -1.000000e+00 -4.405992e-03 -1.100000e+00 -4.695334e-03 -1.200000e+00 -4.989985e-03 -1.000000e-01 -1.084914e-03 -2.000000e-01 -1.970779e-03 -3.000000e-01 -2.679855e-03 -4.000000e-01 -3.230879e-03 -5.000000e-01 -3.652013e-03 -6.000000e-01 -3.999503e-03 -7.000000e-01 -4.317736e-03 -8.000000e-01 -4.625217e-03 -9.000000e-01 -4.929260e-03 -1.000000e+00 -5.233142e-03 -1.100000e+00 -5.538591e-03 -1.200000e+00 -5.847092e-03 -1.000000e-01 -1.217168e-03 -2.000000e-01 -2.236077e-03 -3.000000e-01 -3.077471e-03 -4.000000e-01 -3.757915e-03 -5.000000e-01 -4.291448e-03 -6.000000e-01 -4.711643e-03 -7.000000e-01 -5.073252e-03 -8.000000e-01 -5.410278e-03 -9.000000e-01 -5.736964e-03 -1.000000e+00 -6.059488e-03 -1.100000e+00 -6.380883e-03 -1.200000e+00 -6.703059e-03 -1.000000e-01 -1.332205e-03 -2.000000e-01 -2.469050e-03 -3.000000e-01 -3.429755e-03 -4.000000e-01 -4.229975e-03 -5.000000e-01 -4.880452e-03 -6.000000e-01 -5.394102e-03 -7.000000e-01 -5.813170e-03 -8.000000e-01 -6.186070e-03 -9.000000e-01 -6.538175e-03 -1.000000e+00 -6.880543e-03 -1.100000e+00 -7.218378e-03 -1.200000e+00 -7.554508e-03 -1.000000e-01 -1.432734e-03 -2.000000e-01 -2.674297e-03 -3.000000e-01 -3.742399e-03 -4.000000e-01 -4.651838e-03 -5.000000e-01 -5.413264e-03 -6.000000e-01 -6.031974e-03 -7.000000e-01 -6.526695e-03 -8.000000e-01 -6.945684e-03 -9.000000e-01 -7.328012e-03 -1.000000e+00 -7.692549e-03 -1.100000e+00 -8.047997e-03 -1.200000e+00 -8.398777e-03 -1.000000e-01 -3.879333e-08 -2.000000e-01 -8.828187e-08 -3.000000e-01 -1.926200e-07 -4.000000e-01 -4.098542e-07 -5.000000e-01 -8.505837e-07 -6.000000e-01 -1.717885e-06 -7.000000e-01 -3.370215e-06 -8.000000e-01 -6.421315e-06 -9.000000e-01 -1.190317e-05 -1.000000e+00 -2.152934e-05 -1.100000e+00 -3.808451e-05 -1.200000e+00 -6.591065e-05 -1.000000e-01 -1.051498e-06 -2.000000e-01 -2.181980e-06 -3.000000e-01 -4.274449e-06 -4.000000e-01 -8.077164e-06 -5.000000e-01 -1.481100e-05 -6.000000e-01 -2.642530e-05 -7.000000e-01 -4.585425e-05 -8.000000e-01 -7.711395e-05 -9.000000e-01 -1.250385e-04 -1.000000e+00 -1.946418e-04 -1.100000e+00 -2.904750e-04 -1.200000e+00 -4.165579e-04 -1.000000e-01 -1.718215e-05 -2.000000e-01 -3.176679e-05 -3.000000e-01 -5.528474e-05 -4.000000e-01 -9.222502e-05 -5.000000e-01 -1.472663e-04 -6.000000e-01 -2.244918e-04 -7.000000e-01 -3.265108e-04 -8.000000e-01 -4.540905e-04 -9.000000e-01 -6.064951e-04 -1.000000e+00 -7.823903e-04 -1.100000e+00 -9.810606e-04 -1.200000e+00 -1.203735e-03 -1.000000e-01 -1.549685e-04 -2.000000e-01 -2.491282e-04 -3.000000e-01 -3.621175e-04 -4.000000e-01 -4.984905e-04 -5.000000e-01 -6.574256e-04 -6.000000e-01 -8.368378e-04 -7.000000e-01 -1.034283e-03 -8.000000e-01 -1.247420e-03 -9.000000e-01 -1.474375e-03 -1.000000e+00 -1.714239e-03 -1.100000e+00 -1.967841e-03 -1.200000e+00 -2.238793e-03 -1.000000e-01 -5.686264e-04 -2.000000e-01 -8.429179e-04 -3.000000e-01 -1.065867e-03 -4.000000e-01 -1.290773e-03 -5.000000e-01 -1.523843e-03 -6.000000e-01 -1.765604e-03 -7.000000e-01 -2.015531e-03 -8.000000e-01 -2.272937e-03 -9.000000e-01 -2.537349e-03 -1.000000e+00 -2.809054e-03 -1.100000e+00 -3.090040e-03 -1.200000e+00 -3.385297e-03 -1.000000e-01 -1.086977e-03 -2.000000e-01 -1.656781e-03 -3.000000e-01 -1.995893e-03 -4.000000e-01 -2.285579e-03 -5.000000e-01 -2.565411e-03 -6.000000e-01 -2.844174e-03 -7.000000e-01 -3.124581e-03 -8.000000e-01 -3.407622e-03 -9.000000e-01 -3.693818e-03 -1.000000e+00 -3.984069e-03 -1.100000e+00 -4.280833e-03 -1.200000e+00 -4.589701e-03 -1.000000e-01 -1.574189e-03 -2.000000e-01 -2.504213e-03 -3.000000e-01 -3.012338e-03 -4.000000e-01 -3.370575e-03 -5.000000e-01 -3.690079e-03 -6.000000e-01 -3.997000e-03 -7.000000e-01 -4.299341e-03 -8.000000e-01 -4.600280e-03 -9.000000e-01 -4.901406e-03 -1.000000e+00 -5.204133e-03 -1.100000e+00 -5.511135e-03 -1.200000e+00 -5.828196e-03 -1.000000e-01 -2.011992e-03 -2.000000e-01 -3.305813e-03 -3.000000e-01 -4.046128e-03 -4.000000e-01 -4.495270e-03 -5.000000e-01 -4.857153e-03 -6.000000e-01 -5.190136e-03 -7.000000e-01 -5.511099e-03 -8.000000e-01 -5.826437e-03 -9.000000e-01 -6.139159e-03 -1.000000e+00 -6.451299e-03 -1.100000e+00 -6.765687e-03 -1.200000e+00 -7.088064e-03 -1.000000e-01 -2.406050e-03 -2.000000e-01 -4.044688e-03 -3.000000e-01 -5.056892e-03 -4.000000e-01 -5.631826e-03 -5.000000e-01 -6.044962e-03 -6.000000e-01 -6.405357e-03 -7.000000e-01 -6.744132e-03 -8.000000e-01 -7.072396e-03 -9.000000e-01 -7.395090e-03 -1.000000e+00 -7.715076e-03 -1.100000e+00 -8.035387e-03 -1.200000e+00 -8.361602e-03 -1.000000e-01 -2.764419e-03 -2.000000e-01 -4.725470e-03 -3.000000e-01 -6.021583e-03 -4.000000e-01 -6.761599e-03 -5.000000e-01 -7.240069e-03 -6.000000e-01 -7.631563e-03 -7.000000e-01 -7.988799e-03 -8.000000e-01 -8.329639e-03 -9.000000e-01 -8.661621e-03 -1.000000e+00 -8.988710e-03 -1.100000e+00 -9.314254e-03 -1.200000e+00 -9.643637e-03 -1.000000e-01 -3.094289e-03 -2.000000e-01 -5.357200e-03 -3.000000e-01 -6.932087e-03 -4.000000e-01 -7.870787e-03 -5.000000e-01 -8.433142e-03 -6.000000e-01 -8.861304e-03 -7.000000e-01 -9.238622e-03 -8.000000e-01 -9.592364e-03 -9.000000e-01 -9.933499e-03 -1.000000e+00 -1.026742e-02 -1.100000e+00 -1.059795e-02 -1.200000e+00 -1.093030e-02 -1.000000e-01 -3.401616e-03 -2.000000e-01 -5.948752e-03 -3.000000e-01 -7.790505e-03 -4.000000e-01 -8.949355e-03 -5.000000e-01 -9.617087e-03 -6.000000e-01 -1.008911e-02 -7.000000e-01 -1.048881e-02 -8.000000e-01 -1.085620e-02 -9.000000e-01 -1.120669e-02 -1.000000e+00 -1.154744e-02 -1.100000e+00 -1.188296e-02 -1.200000e+00 -1.221838e-02 -1.000000e-01 -8.631823e-07 -2.000000e-01 -1.438465e-06 -3.000000e-01 -2.301954e-06 -4.000000e-01 -3.640786e-06 -5.000000e-01 -5.713048e-06 -6.000000e-01 -8.903592e-06 -7.000000e-01 -1.378053e-05 -8.000000e-01 -2.116612e-05 -9.000000e-01 -3.222254e-05 -1.000000e+00 -4.855402e-05 -1.100000e+00 -7.233194e-05 -1.200000e+00 -1.064627e-04 -1.000000e-01 -4.738432e-06 -2.000000e-01 -7.771790e-06 -3.000000e-01 -1.215502e-05 -4.000000e-01 -1.871780e-05 -5.000000e-01 -2.844887e-05 -6.000000e-01 -4.263590e-05 -7.000000e-01 -6.288044e-05 -8.000000e-01 -9.105910e-05 -9.000000e-01 -1.292439e-04 -1.000000e+00 -1.796264e-04 -1.100000e+00 -2.445230e-04 -1.200000e+00 -3.265444e-04 -1.000000e-01 -2.268007e-05 -2.000000e-01 -3.671152e-05 -3.000000e-01 -5.476309e-05 -4.000000e-01 -7.941424e-05 -5.000000e-01 -1.123910e-04 -6.000000e-01 -1.553284e-04 -7.000000e-01 -2.097071e-04 -8.000000e-01 -2.767683e-04 -9.000000e-01 -3.574843e-04 -1.000000e+00 -4.526342e-04 -1.100000e+00 -5.630370e-04 -1.200000e+00 -6.899760e-04 -1.000000e-01 -7.795475e-05 -2.000000e-01 -1.282318e-04 -3.000000e-01 -1.771714e-04 -4.000000e-01 -2.351306e-04 -5.000000e-01 -3.039484e-04 -6.000000e-01 -3.843620e-04 -7.000000e-01 -4.767616e-04 -8.000000e-01 -5.813319e-04 -9.000000e-01 -6.981353e-04 -1.000000e+00 -8.272296e-04 -1.100000e+00 -9.688989e-04 -1.200000e+00 -1.124067e-03 -1.000000e-01 -1.673901e-04 -2.000000e-01 -2.919364e-04 -3.000000e-01 -3.883247e-04 -4.000000e-01 -4.824540e-04 -5.000000e-01 -5.840218e-04 -6.000000e-01 -6.949196e-04 -7.000000e-01 -8.156634e-04 -8.000000e-01 -9.464442e-04 -9.000000e-01 -1.087345e-03 -1.000000e+00 -1.238445e-03 -1.100000e+00 -1.399981e-03 -1.200000e+00 -1.572708e-03 -1.000000e-01 -2.588371e-04 -2.000000e-01 -4.692309e-04 -3.000000e-01 -6.339755e-04 -4.000000e-01 -7.697756e-04 -5.000000e-01 -9.000296e-04 -6.000000e-01 -1.034706e-03 -7.000000e-01 -1.176490e-03 -8.000000e-01 -1.326331e-03 -9.000000e-01 -1.484682e-03 -1.000000e+00 -1.651817e-03 -1.100000e+00 -1.828002e-03 -1.200000e+00 -2.013786e-03 -1.000000e-01 -3.361522e-04 -2.000000e-01 -6.223509e-04 -3.000000e-01 -8.590640e-04 -4.000000e-01 -1.051343e-03 -5.000000e-01 -1.216291e-03 -6.000000e-01 -1.374418e-03 -7.000000e-01 -1.535064e-03 -8.000000e-01 -1.701326e-03 -9.000000e-01 -1.874467e-03 -1.000000e+00 -2.055136e-03 -1.100000e+00 -2.243738e-03 -1.200000e+00 -2.440708e-03 -1.000000e-01 -3.982960e-04 -2.000000e-01 -7.475021e-04 -3.000000e-01 -1.047766e-03 -4.000000e-01 -1.300607e-03 -5.000000e-01 -1.512522e-03 -6.000000e-01 -1.700307e-03 -7.000000e-01 -1.881387e-03 -8.000000e-01 -2.063944e-03 -9.000000e-01 -2.251100e-03 -1.000000e+00 -2.444264e-03 -1.100000e+00 -2.644189e-03 -1.200000e+00 -2.851384e-03 -1.000000e-01 -4.480843e-04 -2.000000e-01 -8.492217e-04 -3.000000e-01 -1.203480e-03 -4.000000e-01 -1.511457e-03 -5.000000e-01 -1.775348e-03 -6.000000e-01 -2.002718e-03 -7.000000e-01 -2.209489e-03 -8.000000e-01 -2.410171e-03 -9.000000e-01 -2.611741e-03 -1.000000e+00 -2.817167e-03 -1.100000e+00 -3.027893e-03 -1.200000e+00 -3.244733e-03 -1.000000e-01 -4.882235e-04 -2.000000e-01 -9.322170e-04 -3.000000e-01 -1.331985e-03 -4.000000e-01 -1.687793e-03 -5.000000e-01 -2.000500e-03 -6.000000e-01 -2.272881e-03 -7.000000e-01 -2.513269e-03 -8.000000e-01 -2.736309e-03 -9.000000e-01 -2.953975e-03 -1.000000e+00 -3.172185e-03 -1.100000e+00 -3.393685e-03 -1.200000e+00 -3.619898e-03 -1.000000e-01 -5.207382e-04 -2.000000e-01 -1.000148e-03 -3.000000e-01 -1.438171e-03 -4.000000e-01 -1.834903e-03 -5.000000e-01 -2.190712e-03 -6.000000e-01 -2.506681e-03 -7.000000e-01 -2.786141e-03 -8.000000e-01 -3.037894e-03 -9.000000e-01 -3.275081e-03 -1.000000e+00 -3.507574e-03 -1.100000e+00 -3.740411e-03 -1.200000e+00 -3.976102e-03 -1.000000e-01 -5.471142e-04 -2.000000e-01 -1.055787e-03 -3.000000e-01 -1.525902e-03 -4.000000e-01 -1.957446e-03 -5.000000e-01 -2.350558e-03 -6.000000e-01 -2.705694e-03 -7.000000e-01 -3.024166e-03 -8.000000e-01 -3.309845e-03 -9.000000e-01 -3.571700e-03 -1.000000e+00 -3.821301e-03 -1.100000e+00 -4.066818e-03 -1.200000e+00 -4.312571e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_nrd.standard0000644000265600020320000002751212264261473023313 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060590e-07 -2.000000e-01 -3.951316e-07 -3.000000e-01 -7.284492e-07 -4.000000e-01 -1.318726e-06 -5.000000e-01 -2.351833e-06 -6.000000e-01 -4.135051e-06 -7.000000e-01 -7.168302e-06 -8.000000e-01 -1.224900e-05 -9.000000e-01 -2.061727e-05 -1.000000e+00 -3.413855e-05 -1.100000e+00 -5.550543e-05 -1.200000e+00 -8.843438e-05 -1.000000e-01 -2.346897e-06 -2.000000e-01 -4.297668e-06 -3.000000e-01 -7.528014e-06 -4.000000e-01 -1.289774e-05 -5.000000e-01 -2.166771e-05 -6.000000e-01 -3.563773e-05 -7.000000e-01 -5.718867e-05 -8.000000e-01 -8.918101e-05 -9.000000e-01 -1.347059e-04 -1.000000e+00 -1.967958e-04 -1.100000e+00 -2.782898e-04 -1.200000e+00 -3.820241e-04 -1.000000e-01 -2.085014e-05 -2.000000e-01 -3.601479e-05 -3.000000e-01 -5.828858e-05 -4.000000e-01 -9.072184e-05 -5.000000e-01 -1.360461e-04 -6.000000e-01 -1.966295e-04 -7.000000e-01 -2.742109e-04 -8.000000e-01 -3.697766e-04 -9.000000e-01 -4.836448e-04 -1.000000e+00 -6.157816e-04 -1.100000e+00 -7.663336e-04 -1.200000e+00 -9.363438e-04 -1.000000e-01 -1.164883e-04 -2.000000e-01 -1.862745e-04 -3.000000e-01 -2.634782e-04 -4.000000e-01 -3.558483e-04 -5.000000e-01 -4.643437e-04 -6.000000e-01 -5.888399e-04 -7.000000e-01 -7.287671e-04 -8.000000e-01 -8.833454e-04 -9.000000e-01 -1.051774e-03 -1.000000e+00 -1.233477e-03 -1.100000e+00 -1.428531e-03 -1.200000e+00 -1.638299e-03 -1.000000e-01 -3.143640e-04 -2.000000e-01 -5.120308e-04 -3.000000e-01 -6.644926e-04 -4.000000e-01 -8.176154e-04 -5.000000e-01 -9.799676e-04 -6.000000e-01 -1.152925e-03 -7.000000e-01 -1.336530e-03 -8.000000e-01 -1.530467e-03 -9.000000e-01 -1.734339e-03 -1.000000e+00 -1.947883e-03 -1.100000e+00 -2.171358e-03 -1.200000e+00 -2.406214e-03 -1.000000e-01 -5.254638e-04 -2.000000e-01 -9.031904e-04 -3.000000e-01 -1.166777e-03 -4.000000e-01 -1.382391e-03 -5.000000e-01 -1.590078e-03 -6.000000e-01 -1.800607e-03 -7.000000e-01 -2.016965e-03 -8.000000e-01 -2.240113e-03 -9.000000e-01 -2.470331e-03 -1.000000e+00 -2.707704e-03 -1.100000e+00 -2.952543e-03 -1.200000e+00 -3.206079e-03 -1.000000e-01 -7.079570e-04 -2.000000e-01 -1.260033e-03 -3.000000e-01 -1.671698e-03 -4.000000e-01 -1.978063e-03 -5.000000e-01 -2.237852e-03 -6.000000e-01 -2.485184e-03 -7.000000e-01 -2.731235e-03 -8.000000e-01 -2.979875e-03 -9.000000e-01 -3.232655e-03 -1.000000e+00 -3.490268e-03 -1.100000e+00 -3.753206e-03 -1.200000e+00 -4.022466e-03 -1.000000e-01 -8.600478e-04 -2.000000e-01 -1.564721e-03 -3.000000e-01 -2.124958e-03 -4.000000e-01 -2.554615e-03 -5.000000e-01 -2.889458e-03 -6.000000e-01 -3.181466e-03 -7.000000e-01 -3.459115e-03 -8.000000e-01 -3.732910e-03 -9.000000e-01 -4.007013e-03 -1.000000e+00 -4.283298e-03 -1.100000e+00 -4.562767e-03 -1.200000e+00 -4.846378e-03 -1.000000e-01 -9.870780e-04 -2.000000e-01 -1.823059e-03 -3.000000e-01 -2.516984e-03 -4.000000e-01 -3.077020e-03 -5.000000e-01 -3.515577e-03 -6.000000e-01 -3.870187e-03 -7.000000e-01 -4.186494e-03 -8.000000e-01 -4.487945e-03 -9.000000e-01 -4.783974e-03 -1.000000e+00 -5.078702e-03 -1.100000e+00 -5.374162e-03 -1.200000e+00 -5.671635e-03 -1.000000e-01 -1.094071e-03 -2.000000e-01 -2.042970e-03 -3.000000e-01 -2.854372e-03 -4.000000e-01 -3.534946e-03 -5.000000e-01 -4.089750e-03 -6.000000e-01 -4.531624e-03 -7.000000e-01 -4.900574e-03 -8.000000e-01 -5.235727e-03 -9.000000e-01 -5.556251e-03 -1.000000e+00 -5.870441e-03 -1.100000e+00 -6.182210e-03 -1.200000e+00 -6.493666e-03 -1.000000e-01 -1.184956e-03 -2.000000e-01 -2.231285e-03 -3.000000e-01 -3.145536e-03 -4.000000e-01 -3.933549e-03 -5.000000e-01 -4.599401e-03 -6.000000e-01 -5.145152e-03 -7.000000e-01 -5.587326e-03 -8.000000e-01 -5.967207e-03 -9.000000e-01 -6.317380e-03 -1.000000e+00 -6.653500e-03 -1.100000e+00 -6.982795e-03 -1.200000e+00 -7.308909e-03 -1.000000e-01 -1.262757e-03 -2.000000e-01 -2.393539e-03 -3.000000e-01 -3.397949e-03 -4.000000e-01 -4.281122e-03 -5.000000e-01 -5.047053e-03 -6.000000e-01 -5.696694e-03 -7.000000e-01 -6.230746e-03 -8.000000e-01 -6.672102e-03 -9.000000e-01 -7.060729e-03 -1.000000e+00 -7.423188e-03 -1.100000e+00 -7.772319e-03 -1.200000e+00 -8.114402e-03 -1.000000e-01 -3.879320e-08 -2.000000e-01 -8.828125e-08 -3.000000e-01 -1.926172e-07 -4.000000e-01 -4.098417e-07 -5.000000e-01 -8.505319e-07 -6.000000e-01 -1.717682e-06 -7.000000e-01 -3.369466e-06 -8.000000e-01 -6.418716e-06 -9.000000e-01 -1.189461e-05 -1.000000e+00 -2.150243e-05 -1.100000e+00 -3.800360e-05 -1.200000e+00 -6.567854e-05 -1.000000e-01 -1.051411e-06 -2.000000e-01 -2.181649e-06 -3.000000e-01 -4.273257e-06 -4.000000e-01 -8.073117e-06 -5.000000e-01 -1.479802e-05 -6.000000e-01 -2.638589e-05 -7.000000e-01 -4.574189e-05 -8.000000e-01 -7.681680e-05 -9.000000e-01 -1.243196e-04 -1.000000e+00 -1.930633e-04 -1.100000e+00 -2.873177e-04 -1.200000e+00 -4.107317e-04 -1.000000e-01 -1.716214e-05 -2.000000e-01 -3.170871e-05 -3.000000e-01 -5.512260e-05 -4.000000e-01 -9.181041e-05 -5.000000e-01 -1.463096e-04 -6.000000e-01 -2.225100e-04 -7.000000e-01 -3.228176e-04 -8.000000e-01 -4.478362e-04 -9.000000e-01 -5.967288e-04 -1.000000e+00 -7.680722e-04 -1.100000e+00 -9.609659e-04 -1.200000e+00 -1.176189e-03 -1.000000e-01 -1.535391e-04 -2.000000e-01 -2.466250e-04 -3.000000e-01 -3.576746e-04 -4.000000e-01 -4.912500e-04 -5.000000e-01 -6.465057e-04 -6.000000e-01 -8.213878e-04 -7.000000e-01 -1.013520e-03 -8.000000e-01 -1.220632e-03 -9.000000e-01 -1.440871e-03 -1.000000e+00 -1.673199e-03 -1.100000e+00 -1.918014e-03 -1.200000e+00 -2.177989e-03 -1.000000e-01 -5.481566e-04 -2.000000e-01 -8.238938e-04 -3.000000e-01 -1.042758e-03 -4.000000e-01 -1.261976e-03 -5.000000e-01 -1.488592e-03 -6.000000e-01 -1.723339e-03 -7.000000e-01 -1.965789e-03 -8.000000e-01 -2.215300e-03 -9.000000e-01 -2.471356e-03 -1.000000e+00 -2.733975e-03 -1.100000e+00 -3.004420e-03 -1.200000e+00 -3.286220e-03 -1.000000e-01 -1.005168e-03 -2.000000e-01 -1.589641e-03 -3.000000e-01 -1.936616e-03 -4.000000e-01 -2.222609e-03 -5.000000e-01 -2.495846e-03 -6.000000e-01 -2.766945e-03 -7.000000e-01 -3.039112e-03 -8.000000e-01 -3.313511e-03 -9.000000e-01 -3.590654e-03 -1.000000e+00 -3.871123e-03 -1.100000e+00 -4.156427e-03 -1.200000e+00 -4.450216e-03 -1.000000e-01 -1.397794e-03 -2.000000e-01 -2.334843e-03 -3.000000e-01 -2.890699e-03 -4.000000e-01 -3.260480e-03 -5.000000e-01 -3.577921e-03 -6.000000e-01 -3.878770e-03 -7.000000e-01 -4.173458e-03 -8.000000e-01 -4.465936e-03 -9.000000e-01 -4.758027e-03 -1.000000e+00 -5.050911e-03 -1.100000e+00 -5.346218e-03 -1.200000e+00 -5.647400e-03 -1.000000e-01 -1.722724e-03 -2.000000e-01 -2.984381e-03 -3.000000e-01 -3.816156e-03 -4.000000e-01 -4.318980e-03 -5.000000e-01 -4.692805e-03 -6.000000e-01 -5.024972e-03 -7.000000e-01 -5.340668e-03 -8.000000e-01 -5.648781e-03 -9.000000e-01 -5.953187e-03 -1.000000e+00 -6.255978e-03 -1.100000e+00 -6.559019e-03 -1.200000e+00 -6.865483e-03 -1.000000e-01 -1.994664e-03 -2.000000e-01 -3.540576e-03 -3.000000e-01 -4.658145e-03 -4.000000e-01 -5.358128e-03 -5.000000e-01 -5.815052e-03 -6.000000e-01 -6.186191e-03 -7.000000e-01 -6.524767e-03 -8.000000e-01 -6.848418e-03 -9.000000e-01 -7.164325e-03 -1.000000e+00 -7.476010e-03 -1.100000e+00 -7.785833e-03 -1.200000e+00 -8.096776e-03 -1.000000e-01 -2.226586e-03 -2.000000e-01 -4.021010e-03 -3.000000e-01 -5.401930e-03 -4.000000e-01 -6.343063e-03 -5.000000e-01 -6.924642e-03 -6.000000e-01 -7.349059e-03 -7.000000e-01 -7.715281e-03 -8.000000e-01 -8.056025e-03 -9.000000e-01 -8.383767e-03 -1.000000e+00 -8.704214e-03 -1.100000e+00 -9.020600e-03 -1.200000e+00 -9.335927e-03 -1.000000e-01 -2.428199e-03 -2.000000e-01 -4.441863e-03 -3.000000e-01 -6.058273e-03 -4.000000e-01 -7.248613e-03 -5.000000e-01 -8.002602e-03 -6.000000e-01 -8.502638e-03 -7.000000e-01 -8.904391e-03 -8.000000e-01 -9.265229e-03 -9.000000e-01 -9.605998e-03 -1.000000e+00 -9.935666e-03 -1.100000e+00 -1.025884e-02 -1.200000e+00 -1.057883e-02 -1.000000e-01 -2.606621e-03 -2.000000e-01 -4.815947e-03 -3.000000e-01 -6.643301e-03 -4.000000e-01 -8.067514e-03 -5.000000e-01 -9.030315e-03 -6.000000e-01 -9.636580e-03 -7.000000e-01 -1.008548e-02 -8.000000e-01 -1.047089e-02 -9.000000e-01 -1.082661e-02 -1.000000e+00 -1.116641e-02 -1.100000e+00 -1.149687e-02 -1.200000e+00 -1.182202e-02 -1.000000e-01 -8.631383e-07 -2.000000e-01 -1.438366e-06 -3.000000e-01 -2.301709e-06 -4.000000e-01 -3.640184e-06 -5.000000e-01 -5.711589e-06 -6.000000e-01 -8.900103e-06 -7.000000e-01 -1.377231e-05 -8.000000e-01 -2.114710e-05 -9.000000e-01 -3.217948e-05 -1.000000e+00 -4.845894e-05 -1.100000e+00 -7.212736e-05 -1.200000e+00 -1.060340e-04 -1.000000e-01 -4.737109e-06 -2.000000e-01 -7.769023e-06 -3.000000e-01 -1.214855e-05 -4.000000e-01 -1.870292e-05 -5.000000e-01 -2.841559e-05 -6.000000e-01 -4.256391e-05 -7.000000e-01 -6.273073e-05 -8.000000e-01 -9.076158e-05 -9.000000e-01 -1.286798e-04 -1.000000e+00 -1.786064e-04 -1.100000e+00 -2.427563e-04 -1.200000e+00 -3.235907e-04 -1.000000e-01 -2.264715e-05 -2.000000e-01 -3.665516e-05 -3.000000e-01 -5.464813e-05 -4.000000e-01 -7.918854e-05 -5.000000e-01 -1.119696e-04 -6.000000e-01 -1.545812e-04 -7.000000e-01 -2.084480e-04 -8.000000e-01 -2.747473e-04 -9.000000e-01 -3.543813e-04 -1.000000e+00 -4.480516e-04 -1.100000e+00 -5.564743e-04 -1.200000e+00 -6.807697e-04 -1.000000e-01 -7.748470e-05 -2.000000e-01 -1.276434e-04 -3.000000e-01 -1.762398e-04 -4.000000e-01 -2.336562e-04 -5.000000e-01 -3.017051e-04 -6.000000e-01 -3.810797e-04 -7.000000e-01 -4.721262e-04 -8.000000e-01 -5.749879e-04 -9.000000e-01 -6.896855e-04 -1.000000e+00 -8.162278e-04 -1.100000e+00 -9.548108e-04 -1.200000e+00 -1.106185e-03 -1.000000e-01 -1.649832e-04 -2.000000e-01 -2.888676e-04 -3.000000e-01 -3.847763e-04 -4.000000e-01 -4.778144e-04 -5.000000e-01 -5.779060e-04 -6.000000e-01 -6.869890e-04 -7.000000e-01 -8.055666e-04 -8.000000e-01 -9.338043e-04 -9.000000e-01 -1.071758e-03 -1.000000e+00 -1.219468e-03 -1.100000e+00 -1.377097e-03 -1.200000e+00 -1.545230e-03 -1.000000e-01 -2.528861e-04 -2.000000e-01 -4.605974e-04 -3.000000e-01 -6.247999e-04 -4.000000e-01 -7.598710e-04 -5.000000e-01 -8.883462e-04 -6.000000e-01 -1.020659e-03 -7.000000e-01 -1.159647e-03 -8.000000e-01 -1.306281e-03 -9.000000e-01 -1.461004e-03 -1.000000e+00 -1.624066e-03 -1.100000e+00 -1.795681e-03 -1.200000e+00 -1.976261e-03 -1.000000e-01 -3.259797e-04 -2.000000e-01 -6.064203e-04 -3.000000e-01 -8.409978e-04 -4.000000e-01 -1.033147e-03 -5.000000e-01 -1.197206e-03 -6.000000e-01 -1.352986e-03 -7.000000e-01 -1.510484e-03 -8.000000e-01 -1.673053e-03 -9.000000e-01 -1.842023e-03 -1.000000e+00 -2.018048e-03 -1.100000e+00 -2.201516e-03 -1.200000e+00 -2.392780e-03 -1.000000e-01 -3.839099e-04 -2.000000e-01 -7.238735e-04 -3.000000e-01 -1.019374e-03 -4.000000e-01 -1.270966e-03 -5.000000e-01 -1.483126e-03 -6.000000e-01 -1.669770e-03 -7.000000e-01 -1.847957e-03 -8.000000e-01 -2.026639e-03 -9.000000e-01 -2.209270e-03 -1.000000e+00 -2.397361e-03 -1.100000e+00 -2.591695e-03 -1.200000e+00 -2.792758e-03 -1.000000e-01 -4.297909e-04 -2.000000e-01 -8.181662e-04 -3.000000e-01 -1.164623e-03 -4.000000e-01 -1.469061e-03 -5.000000e-01 -1.732569e-03 -6.000000e-01 -1.960345e-03 -7.000000e-01 -2.165598e-03 -8.000000e-01 -2.362838e-03 -9.000000e-01 -2.559856e-03 -1.000000e+00 -2.759986e-03 -1.100000e+00 -2.964809e-03 -1.200000e+00 -3.175183e-03 -1.000000e-01 -4.664338e-04 -2.000000e-01 -8.943124e-04 -3.000000e-01 -1.283157e-03 -4.000000e-01 -1.632680e-03 -5.000000e-01 -1.943031e-03 -6.000000e-01 -2.215712e-03 -7.000000e-01 -2.456426e-03 -8.000000e-01 -2.677486e-03 -9.000000e-01 -2.891165e-03 -1.000000e+00 -3.104188e-03 -1.100000e+00 -3.319685e-03 -1.200000e+00 -3.539237e-03 -1.000000e-01 -4.958883e-04 -2.000000e-01 -9.561013e-04 -3.000000e-01 -1.380178e-03 -4.000000e-01 -1.767763e-03 -5.000000e-01 -2.118708e-03 -6.000000e-01 -2.433348e-03 -7.000000e-01 -2.713545e-03 -8.000000e-01 -2.965351e-03 -9.000000e-01 -3.200046e-03 -1.000000e+00 -3.428017e-03 -1.100000e+00 -3.655075e-03 -1.200000e+00 -3.884114e-03 -1.000000e-01 -5.196299e-04 -2.000000e-01 -1.006341e-03 -3.000000e-01 -1.459686e-03 -4.000000e-01 -1.879286e-03 -5.000000e-01 -2.264875e-03 -6.000000e-01 -2.616396e-03 -7.000000e-01 -2.934366e-03 -8.000000e-01 -3.220975e-03 -9.000000e-01 -3.482461e-03 -1.000000e+00 -3.729035e-03 -1.100000e+00 -3.969510e-03 -1.200000e+00 -4.208930e-03 ngspice-26/tests/bsim4/pmos/reference/acVd.standard0000644000265600020320000000335712264261473021734 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) -0.1 9.404723e-04 1.333966e-02 9.59898959896832e-15 5.86023858668517e-15 -0.2 1.927414e-03 1.152112e-02 1.0286142785018e-14 4.96737934493963e-15 -0.3 2.945912e-03 9.865745e-03 1.05552928578916e-14 4.58337424096858e-15 -0.4 3.987041e-03 8.341388e-03 1.06125628733977e-14 4.49235321632424e-15 -0.5 5.052742e-03 6.893700e-03 1.06290028778489e-14 4.45886620725748e-15 -0.6 6.117196e-03 5.504070e-03 1.06362728798173e-14 4.43352420039602e-15 -0.7 6.964267e-03 4.483033e-03 1.06404628809518e-14 4.40262919203107e-15 -0.8 7.490822e-03 3.961785e-03 1.0643122881672e-14 4.3560671794242e-15 -0.9 7.825469e-03 3.714195e-03 1.06447528821133e-14 4.27845915841149e-15 -1 8.063188e-03 3.590168e-03 1.06455428823272e-14 4.14225712153419e-15 -1.1 8.247715e-03 3.525774e-03 1.06455628823326e-14 3.90600705756845e-15 -1.2 8.399123e-03 3.494179e-03 1.06448428821377e-14 3.54785596059748e-15 -0.1 2.370420e-04 5.279203e-03 9.44137855629444e-15 5.90823359968003e-15 -0.2 5.024911e-04 4.894057e-03 1.01368527445971e-14 5.01633735819523e-15 -0.3 7.958171e-04 4.508217e-03 1.04292828237738e-14 4.60689524733699e-15 -0.4 1.116122e-03 4.122871e-03 1.04935128411644e-14 4.50801222056398e-15 -0.5 1.461725e-03 3.740062e-03 1.05121028461977e-14 4.47259621097494e-15 -0.6 1.828680e-03 3.364585e-03 1.05205028484721e-14 4.44659820393587e-15 -0.7 2.205184e-03 3.010694e-03 1.05255728498448e-14 4.41538719548535e-15 -0.8 2.556675e-03 2.718193e-03 1.05290228507789e-14 4.36862118282325e-15 -0.9 2.830775e-03 2.539631e-03 1.0531412851426e-14 4.29085516176776e-15 -1 3.021053e-03 2.465853e-03 1.05329428518402e-14 4.1545151248531e-15 -1.1 3.157802e-03 2.451348e-03 1.05336928520433e-14 3.91813706085271e-15 -1.2 3.263290e-03 2.467347e-03 1.0533702852046e-14 3.55986496384897e-15 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw7.standard0000644000265600020320000002751212264261473023241 0ustar andreasadminV(d) I(d) -1.000000e-01 -1.216875e-08 -2.000000e-01 -2.333397e-08 -3.000000e-01 -4.301806e-08 -4.000000e-01 -7.787888e-08 -5.000000e-01 -1.388985e-07 -6.000000e-01 -2.442399e-07 -7.000000e-01 -4.234739e-07 -8.000000e-01 -7.238225e-07 -9.000000e-01 -1.218862e-06 -1.000000e+00 -2.019596e-06 -1.100000e+00 -3.286972e-06 -1.200000e+00 -5.244690e-06 -1.000000e-01 -1.386159e-07 -2.000000e-01 -2.538531e-07 -3.000000e-01 -4.447384e-07 -4.000000e-01 -7.621892e-07 -5.000000e-01 -1.281027e-06 -6.000000e-01 -2.108380e-06 -7.000000e-01 -3.386604e-06 -8.000000e-01 -5.287892e-06 -9.000000e-01 -8.000130e-06 -1.000000e+00 -1.171020e-05 -1.100000e+00 -1.659638e-05 -1.200000e+00 -2.284109e-05 -1.000000e-01 -1.233031e-06 -2.000000e-01 -2.130912e-06 -3.000000e-01 -3.451990e-06 -4.000000e-01 -5.379385e-06 -5.000000e-01 -8.079099e-06 -6.000000e-01 -1.169717e-05 -7.000000e-01 -1.634329e-05 -8.000000e-01 -2.208254e-05 -9.000000e-01 -2.894007e-05 -1.000000e+00 -3.692035e-05 -1.100000e+00 -4.604142e-05 -1.200000e+00 -5.638255e-05 -1.000000e-01 -6.935692e-06 -2.000000e-01 -1.108336e-05 -3.000000e-01 -1.570018e-05 -4.000000e-01 -2.124078e-05 -5.000000e-01 -2.776556e-05 -6.000000e-01 -3.527050e-05 -7.000000e-01 -4.372414e-05 -8.000000e-01 -5.308196e-05 -9.000000e-01 -6.329823e-05 -1.000000e+00 -7.434318e-05 -1.100000e+00 -8.623284e-05 -1.200000e+00 -9.907448e-05 -1.000000e-01 -1.905184e-05 -2.000000e-01 -3.075832e-05 -3.000000e-01 -3.987514e-05 -4.000000e-01 -4.910609e-05 -5.000000e-01 -5.892555e-05 -6.000000e-01 -6.940931e-05 -7.000000e-01 -8.055851e-05 -8.000000e-01 -9.235402e-05 -9.000000e-01 -1.047730e-04 -1.000000e+00 -1.178040e-04 -1.100000e+00 -1.314771e-04 -1.200000e+00 -1.459130e-04 -1.000000e-01 -3.252554e-05 -2.000000e-01 -5.509692e-05 -3.000000e-01 -7.059064e-05 -4.000000e-01 -8.348387e-05 -5.000000e-01 -9.603815e-05 -6.000000e-01 -1.088212e-04 -7.000000e-01 -1.219913e-04 -8.000000e-01 -1.355994e-04 -9.000000e-01 -1.496600e-04 -1.000000e+00 -1.641802e-04 -1.100000e+00 -1.791928e-04 -1.200000e+00 -1.948098e-04 -1.000000e-01 -4.467466e-05 -2.000000e-01 -7.822079e-05 -3.000000e-01 -1.023765e-04 -4.000000e-01 -1.202569e-04 -5.000000e-01 -1.357670e-04 -6.000000e-01 -1.507246e-04 -7.000000e-01 -1.656902e-04 -8.000000e-01 -1.808603e-04 -9.000000e-01 -1.963146e-04 -1.000000e+00 -2.120909e-04 -1.100000e+00 -2.282277e-04 -1.200000e+00 -2.448212e-04 -1.000000e-01 -5.518770e-05 -2.000000e-01 -9.872479e-05 -3.000000e-01 -1.320523e-04 -4.000000e-01 -1.568195e-04 -5.000000e-01 -1.762724e-04 -6.000000e-01 -1.936833e-04 -7.000000e-01 -2.104693e-04 -8.000000e-01 -2.271321e-04 -9.000000e-01 -2.438744e-04 -1.000000e+00 -2.607901e-04 -1.100000e+00 -2.779380e-04 -1.200000e+00 -2.954031e-04 -1.000000e-01 -6.425894e-05 -2.000000e-01 -1.166982e-04 -3.000000e-01 -1.586491e-04 -4.000000e-01 -1.912342e-04 -5.000000e-01 -2.161406e-04 -6.000000e-01 -2.367070e-04 -7.000000e-01 -2.555532e-04 -8.000000e-01 -2.737688e-04 -9.000000e-01 -2.917849e-04 -1.000000e+00 -3.097945e-04 -1.100000e+00 -3.278997e-04 -1.200000e+00 -3.461886e-04 -1.000000e-01 -7.211696e-05 -2.000000e-01 -1.324529e-04 -3.000000e-01 -1.822496e-04 -4.000000e-01 -2.224996e-04 -5.000000e-01 -2.540494e-04 -6.000000e-01 -2.789081e-04 -7.000000e-01 -3.003181e-04 -8.000000e-01 -3.202832e-04 -9.000000e-01 -3.396418e-04 -1.000000e+00 -3.587580e-04 -1.100000e+00 -3.778104e-04 -1.200000e+00 -3.969119e-04 -1.000000e-01 -7.895632e-05 -2.000000e-01 -1.462969e-04 -3.000000e-01 -2.031731e-04 -4.000000e-01 -2.505231e-04 -5.000000e-01 -2.889942e-04 -6.000000e-01 -3.193707e-04 -7.000000e-01 -3.441717e-04 -8.000000e-01 -3.662574e-04 -9.000000e-01 -3.871211e-04 -1.000000e+00 -4.074138e-04 -1.100000e+00 -4.274418e-04 -1.200000e+00 -4.473721e-04 -1.000000e-01 -8.493638e-05 -2.000000e-01 -1.585002e-04 -3.000000e-01 -2.217529e-04 -4.000000e-01 -2.755817e-04 -5.000000e-01 -3.206268e-04 -6.000000e-01 -3.572145e-04 -7.000000e-01 -3.864780e-04 -8.000000e-01 -4.112834e-04 -9.000000e-01 -4.339338e-04 -1.000000e+00 -4.555391e-04 -1.100000e+00 -4.766112e-04 -1.200000e+00 -4.974106e-04 -1.000000e-01 -2.290871e-09 -2.000000e-01 -5.213246e-09 -3.000000e-01 -1.137451e-08 -4.000000e-01 -2.420232e-08 -5.000000e-01 -5.022773e-08 -6.000000e-01 -1.014429e-07 -7.000000e-01 -1.990164e-07 -8.000000e-01 -3.791953e-07 -9.000000e-01 -7.029342e-07 -1.000000e+00 -1.271462e-06 -1.100000e+00 -2.249321e-06 -1.200000e+00 -3.893146e-06 -1.000000e-01 -6.209245e-08 -2.000000e-01 -1.288485e-07 -3.000000e-01 -2.524143e-07 -4.000000e-01 -4.769827e-07 -5.000000e-01 -8.746704e-07 -6.000000e-01 -1.560647e-06 -7.000000e-01 -2.708314e-06 -8.000000e-01 -4.555112e-06 -9.000000e-01 -7.387011e-06 -1.000000e+00 -1.150089e-05 -1.100000e+00 -1.716657e-05 -1.200000e+00 -2.462276e-05 -1.000000e-01 -1.014745e-06 -2.000000e-01 -1.876183e-06 -3.000000e-01 -3.265470e-06 -4.000000e-01 -5.448044e-06 -5.000000e-01 -8.700780e-06 -6.000000e-01 -1.326565e-05 -7.000000e-01 -1.929770e-05 -8.000000e-01 -2.684324e-05 -9.000000e-01 -3.585965e-05 -1.000000e+00 -4.626880e-05 -1.100000e+00 -5.802904e-05 -1.200000e+00 -7.121376e-05 -1.000000e-01 -9.157188e-06 -2.000000e-01 -1.472293e-05 -3.000000e-01 -2.140417e-05 -4.000000e-01 -2.947060e-05 -5.000000e-01 -3.887431e-05 -6.000000e-01 -4.949258e-05 -7.000000e-01 -6.118123e-05 -8.000000e-01 -7.380206e-05 -9.000000e-01 -8.724435e-05 -1.000000e+00 -1.014544e-04 -1.100000e+00 -1.164816e-04 -1.200000e+00 -1.325404e-04 -1.000000e-01 -3.363828e-05 -2.000000e-01 -4.986001e-05 -3.000000e-01 -6.305638e-05 -4.000000e-01 -7.637393e-05 -5.000000e-01 -9.017878e-05 -6.000000e-01 -1.045016e-04 -7.000000e-01 -1.193113e-04 -8.000000e-01 -1.345669e-04 -9.000000e-01 -1.502405e-04 -1.000000e+00 -1.663491e-04 -1.100000e+00 -1.830109e-04 -1.200000e+00 -2.005224e-04 -1.000000e-01 -6.438883e-05 -2.000000e-01 -9.809314e-05 -3.000000e-01 -1.181666e-04 -4.000000e-01 -1.353297e-04 -5.000000e-01 -1.519152e-04 -6.000000e-01 -1.684411e-04 -7.000000e-01 -1.850672e-04 -8.000000e-01 -2.018520e-04 -9.000000e-01 -2.188260e-04 -1.000000e+00 -2.360429e-04 -1.100000e+00 -2.536489e-04 -1.200000e+00 -2.719768e-04 -1.000000e-01 -9.336758e-05 -2.000000e-01 -1.484113e-04 -3.000000e-01 -1.784657e-04 -4.000000e-01 -1.996866e-04 -5.000000e-01 -2.186279e-04 -6.000000e-01 -2.368294e-04 -7.000000e-01 -2.547626e-04 -8.000000e-01 -2.726151e-04 -9.000000e-01 -2.904807e-04 -1.000000e+00 -3.084434e-04 -1.100000e+00 -3.266625e-04 -1.200000e+00 -3.454832e-04 -1.000000e-01 -1.194700e-04 -2.000000e-01 -1.961102e-04 -3.000000e-01 -2.398702e-04 -4.000000e-01 -2.664499e-04 -5.000000e-01 -2.878984e-04 -6.000000e-01 -3.076464e-04 -7.000000e-01 -3.266871e-04 -8.000000e-01 -3.453973e-04 -9.000000e-01 -3.639543e-04 -1.000000e+00 -3.824789e-04 -1.100000e+00 -4.011399e-04 -1.200000e+00 -4.202807e-04 -1.000000e-01 -1.430150e-04 -2.000000e-01 -2.401670e-04 -3.000000e-01 -2.999995e-04 -4.000000e-01 -3.339704e-04 -5.000000e-01 -3.584373e-04 -6.000000e-01 -3.798055e-04 -7.000000e-01 -3.999020e-04 -8.000000e-01 -4.193797e-04 -9.000000e-01 -4.385298e-04 -1.000000e+00 -4.575216e-04 -1.100000e+00 -4.765360e-04 -1.200000e+00 -4.959071e-04 -1.000000e-01 -1.644693e-04 -2.000000e-01 -2.808361e-04 -3.000000e-01 -3.574906e-04 -4.000000e-01 -4.011489e-04 -5.000000e-01 -4.294456e-04 -6.000000e-01 -4.526439e-04 -7.000000e-01 -4.738303e-04 -8.000000e-01 -4.940522e-04 -9.000000e-01 -5.137529e-04 -1.000000e+00 -5.331661e-04 -1.100000e+00 -5.524914e-04 -1.200000e+00 -5.720517e-04 -1.000000e-01 -1.842526e-04 -2.000000e-01 -3.186397e-04 -3.000000e-01 -4.118513e-04 -4.000000e-01 -4.671770e-04 -5.000000e-01 -5.003707e-04 -6.000000e-01 -5.257166e-04 -7.000000e-01 -5.480836e-04 -8.000000e-01 -5.690663e-04 -9.000000e-01 -5.893076e-04 -1.000000e+00 -6.091249e-04 -1.100000e+00 -6.287450e-04 -1.200000e+00 -6.484816e-04 -1.000000e-01 -2.027144e-04 -2.000000e-01 -3.540951e-04 -3.000000e-01 -4.631888e-04 -4.000000e-01 -5.314693e-04 -5.000000e-01 -5.707951e-04 -6.000000e-01 -5.986973e-04 -7.000000e-01 -6.223749e-04 -8.000000e-01 -6.441593e-04 -9.000000e-01 -6.649509e-04 -1.000000e+00 -6.851713e-04 -1.100000e+00 -7.050855e-04 -1.200000e+00 -7.250025e-04 -1.000000e-01 -5.097651e-08 -2.000000e-01 -8.494769e-08 -3.000000e-01 -1.359389e-07 -4.000000e-01 -2.150012e-07 -5.000000e-01 -3.373765e-07 -6.000000e-01 -5.257938e-07 -7.000000e-01 -8.138076e-07 -8.000000e-01 -1.249986e-06 -9.000000e-01 -1.902984e-06 -1.000000e+00 -2.867583e-06 -1.100000e+00 -4.272096e-06 -1.200000e+00 -6.288305e-06 -1.000000e-01 -2.798402e-07 -2.000000e-01 -4.589687e-07 -3.000000e-01 -7.178212e-07 -4.000000e-01 -1.105400e-06 -5.000000e-01 -1.680110e-06 -6.000000e-01 -2.518026e-06 -7.000000e-01 -3.713780e-06 -8.000000e-01 -5.378285e-06 -9.000000e-01 -7.634045e-06 -1.000000e+00 -1.061069e-05 -1.100000e+00 -1.444528e-05 -1.200000e+00 -1.929236e-05 -1.000000e-01 -1.339525e-06 -2.000000e-01 -2.168195e-06 -3.000000e-01 -3.234365e-06 -4.000000e-01 -4.690425e-06 -5.000000e-01 -6.638396e-06 -6.000000e-01 -9.174961e-06 -7.000000e-01 -1.238773e-05 -8.000000e-01 -1.635021e-05 -9.000000e-01 -2.112007e-05 -1.000000e+00 -2.674359e-05 -1.100000e+00 -3.326944e-05 -1.200000e+00 -4.077379e-05 -1.000000e-01 -4.604919e-06 -2.000000e-01 -7.574617e-06 -3.000000e-01 -1.046561e-05 -4.000000e-01 -1.388982e-05 -5.000000e-01 -1.795600e-05 -6.000000e-01 -2.270781e-05 -7.000000e-01 -2.816849e-05 -8.000000e-01 -3.434915e-05 -9.000000e-01 -4.125368e-05 -1.000000e+00 -4.888569e-05 -1.100000e+00 -5.726221e-05 -1.200000e+00 -6.643811e-05 -1.000000e-01 -9.890413e-06 -2.000000e-01 -1.724844e-05 -3.000000e-01 -2.294292e-05 -4.000000e-01 -2.850492e-05 -5.000000e-01 -3.450738e-05 -6.000000e-01 -4.106204e-05 -7.000000e-01 -4.819950e-05 -8.000000e-01 -5.593115e-05 -9.000000e-01 -6.426208e-05 -1.000000e+00 -7.319706e-05 -1.100000e+00 -8.275036e-05 -1.200000e+00 -9.296679e-05 -1.000000e-01 -1.529731e-05 -2.000000e-01 -2.772992e-05 -3.000000e-01 -3.746385e-05 -4.000000e-01 -4.548812e-05 -5.000000e-01 -5.318644e-05 -6.000000e-01 -6.114759e-05 -7.000000e-01 -6.953005e-05 -8.000000e-01 -7.838992e-05 -9.000000e-01 -8.775410e-05 -1.000000e+00 -9.763887e-05 -1.100000e+00 -1.080601e-04 -1.200000e+00 -1.190504e-04 -1.000000e-01 -1.987064e-05 -2.000000e-01 -3.678608e-05 -3.000000e-01 -5.077468e-05 -4.000000e-01 -6.213640e-05 -5.000000e-01 -7.188447e-05 -6.000000e-01 -8.123190e-05 -7.000000e-01 -9.073013e-05 -8.000000e-01 -1.005618e-04 -9.000000e-01 -1.108017e-04 -1.000000e+00 -1.214880e-04 -1.100000e+00 -1.326448e-04 -1.200000e+00 -1.442980e-04 -1.000000e-01 -2.354786e-05 -2.000000e-01 -4.419067e-05 -3.000000e-01 -6.193779e-05 -4.000000e-01 -7.687990e-05 -5.000000e-01 -8.940292e-05 -6.000000e-01 -1.005022e-04 -7.000000e-01 -1.112082e-04 -8.000000e-01 -1.220037e-04 -9.000000e-01 -1.330729e-04 -1.000000e+00 -1.444990e-04 -1.100000e+00 -1.563263e-04 -1.200000e+00 -1.685851e-04 -1.000000e-01 -2.649482e-05 -2.000000e-01 -5.021067e-05 -3.000000e-01 -7.115215e-05 -4.000000e-01 -8.935519e-05 -5.000000e-01 -1.049508e-04 -6.000000e-01 -1.183882e-04 -7.000000e-01 -1.306114e-04 -8.000000e-01 -1.424781e-04 -9.000000e-01 -1.543996e-04 -1.000000e+00 -1.665511e-04 -1.100000e+00 -1.790178e-04 -1.200000e+00 -1.918476e-04 -1.000000e-01 -2.887119e-05 -2.000000e-01 -5.512368e-05 -3.000000e-01 -7.875823e-05 -4.000000e-01 -9.979105e-05 -5.000000e-01 -1.182737e-04 -6.000000e-01 -1.343715e-04 -7.000000e-01 -1.485798e-04 -8.000000e-01 -1.617664e-04 -9.000000e-01 -1.746389e-04 -1.000000e+00 -1.875462e-04 -1.100000e+00 -2.006500e-04 -1.200000e+00 -2.140345e-04 -1.000000e-01 -3.079651e-05 -2.000000e-01 -5.914572e-05 -3.000000e-01 -8.504455e-05 -4.000000e-01 -1.084991e-04 -5.000000e-01 -1.295317e-04 -6.000000e-01 -1.482072e-04 -7.000000e-01 -1.647241e-04 -8.000000e-01 -1.796056e-04 -9.000000e-01 -1.936303e-04 -1.000000e+00 -2.073811e-04 -1.100000e+00 -2.211550e-04 -1.200000e+00 -2.350998e-04 -1.000000e-01 -3.235857e-05 -2.000000e-01 -6.244045e-05 -3.000000e-01 -9.023913e-05 -4.000000e-01 -1.157542e-04 -5.000000e-01 -1.389942e-04 -6.000000e-01 -1.599868e-04 -7.000000e-01 -1.788103e-04 -8.000000e-01 -1.956957e-04 -9.000000e-01 -2.111760e-04 -1.000000e+00 -2.259363e-04 -1.100000e+00 -2.404588e-04 -1.200000e+00 -2.549980e-04 ngspice-26/tests/bsim4/pmos/reference/acFreq_trnqsmod.standard0000644000265600020320000000710512264261473024202 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw3.standard0000644000265600020320000002751212264261473023235 0ustar andreasadminV(d) I(d) -1.000000e-01 -8.931362e-09 -2.000000e-01 -9.218438e-09 -3.000000e-01 -9.368672e-09 -4.000000e-01 -9.500345e-09 -5.000000e-01 -9.626945e-09 -6.000000e-01 -9.753004e-09 -7.000000e-01 -9.881614e-09 -8.000000e-01 -1.001622e-08 -9.000000e-01 -1.016170e-08 -1.000000e+00 -1.032546e-08 -1.100000e+00 -1.051864e-08 -1.200000e+00 -1.075752e-08 -1.000000e-01 -1.074684e-07 -2.000000e-01 -1.109346e-07 -3.000000e-01 -1.126949e-07 -4.000000e-01 -1.142160e-07 -5.000000e-01 -1.156552e-07 -6.000000e-01 -1.170552e-07 -7.000000e-01 -1.184344e-07 -8.000000e-01 -1.198051e-07 -9.000000e-01 -1.211824e-07 -1.000000e+00 -1.225903e-07 -1.100000e+00 -1.240667e-07 -1.200000e+00 -1.256668e-07 -1.000000e-01 -1.052324e-06 -2.000000e-01 -1.090235e-06 -3.000000e-01 -1.106861e-06 -4.000000e-01 -1.120791e-06 -5.000000e-01 -1.133814e-06 -6.000000e-01 -1.146390e-06 -7.000000e-01 -1.158699e-06 -8.000000e-01 -1.170850e-06 -9.000000e-01 -1.182964e-06 -1.000000e+00 -1.195231e-06 -1.100000e+00 -1.207956e-06 -1.200000e+00 -1.221583e-06 -1.000000e-01 -7.473495e-06 -2.000000e-01 -7.995755e-06 -3.000000e-01 -8.120323e-06 -4.000000e-01 -8.211224e-06 -5.000000e-01 -8.292647e-06 -6.000000e-01 -8.369661e-06 -7.000000e-01 -8.444055e-06 -8.000000e-01 -8.516739e-06 -9.000000e-01 -8.588500e-06 -1.000000e+00 -8.660483e-06 -1.100000e+00 -8.734548e-06 -1.200000e+00 -8.813491e-06 -1.000000e-01 -2.698356e-05 -2.000000e-01 -3.338864e-05 -3.000000e-01 -3.424529e-05 -4.000000e-01 -3.463108e-05 -5.000000e-01 -3.493422e-05 -6.000000e-01 -3.520680e-05 -7.000000e-01 -3.546310e-05 -8.000000e-01 -3.570894e-05 -9.000000e-01 -3.594774e-05 -1.000000e+00 -3.618317e-05 -1.100000e+00 -3.642089e-05 -1.200000e+00 -3.666986e-05 -1.000000e-01 -5.357182e-05 -2.000000e-01 -7.906431e-05 -3.000000e-01 -8.535276e-05 -4.000000e-01 -8.679842e-05 -5.000000e-01 -8.760217e-05 -6.000000e-01 -8.824886e-05 -7.000000e-01 -8.882895e-05 -8.000000e-01 -8.937097e-05 -9.000000e-01 -8.988759e-05 -1.000000e+00 -9.038721e-05 -1.100000e+00 -9.087972e-05 -1.200000e+00 -9.138077e-05 -1.000000e-01 -7.998952e-05 -2.000000e-01 -1.301609e-04 -3.000000e-01 -1.531224e-04 -4.000000e-01 -1.594133e-04 -5.000000e-01 -1.614814e-04 -6.000000e-01 -1.627833e-04 -7.000000e-01 -1.638527e-04 -8.000000e-01 -1.648131e-04 -9.000000e-01 -1.657080e-04 -1.000000e+00 -1.665583e-04 -1.100000e+00 -1.673791e-04 -1.200000e+00 -1.681904e-04 -1.000000e-01 -1.043482e-04 -2.000000e-01 -1.787340e-04 -3.000000e-01 -2.242024e-04 -4.000000e-01 -2.444272e-04 -5.000000e-01 -2.507182e-04 -6.000000e-01 -2.533831e-04 -7.000000e-01 -2.552158e-04 -8.000000e-01 -2.567517e-04 -9.000000e-01 -2.581367e-04 -1.000000e+00 -2.594270e-04 -1.100000e+00 -2.606517e-04 -1.200000e+00 -2.618349e-04 -1.000000e-01 -1.264657e-04 -2.000000e-01 -2.233885e-04 -3.000000e-01 -2.914338e-04 -4.000000e-01 -3.319274e-04 -5.000000e-01 -3.496797e-04 -6.000000e-01 -3.560221e-04 -7.000000e-01 -3.592562e-04 -8.000000e-01 -3.616309e-04 -9.000000e-01 -3.636571e-04 -1.000000e+00 -3.654936e-04 -1.100000e+00 -3.672065e-04 -1.200000e+00 -3.688333e-04 -1.000000e-01 -1.464831e-04 -2.000000e-01 -2.640979e-04 -3.000000e-01 -3.533675e-04 -4.000000e-01 -4.150129e-04 -5.000000e-01 -4.507566e-04 -6.000000e-01 -4.664828e-04 -7.000000e-01 -4.729477e-04 -8.000000e-01 -4.767288e-04 -9.000000e-01 -4.796452e-04 -1.000000e+00 -4.821727e-04 -1.100000e+00 -4.844756e-04 -1.200000e+00 -4.866276e-04 -1.000000e-01 -1.645852e-04 -2.000000e-01 -3.011011e-04 -3.000000e-01 -4.099931e-04 -4.000000e-01 -4.917795e-04 -5.000000e-01 -5.472827e-04 -6.000000e-01 -5.787357e-04 -7.000000e-01 -5.929005e-04 -8.000000e-01 -5.995516e-04 -9.000000e-01 -6.038603e-04 -1.000000e+00 -6.073113e-04 -1.100000e+00 -6.103419e-04 -1.200000e+00 -6.131170e-04 -1.000000e-01 -1.809541e-04 -2.000000e-01 -3.346948e-04 -3.000000e-01 -4.616146e-04 -4.000000e-01 -5.621371e-04 -5.000000e-01 -6.367956e-04 -6.000000e-01 -6.865682e-04 -7.000000e-01 -7.142889e-04 -8.000000e-01 -7.273045e-04 -9.000000e-01 -7.341906e-04 -1.000000e+00 -7.390082e-04 -1.100000e+00 -7.429820e-04 -1.200000e+00 -7.465107e-04 -1.000000e-01 -1.317741e-09 -2.000000e-01 -1.359593e-09 -3.000000e-01 -1.385896e-09 -4.000000e-01 -1.410531e-09 -5.000000e-01 -1.435906e-09 -6.000000e-01 -1.463600e-09 -7.000000e-01 -1.495504e-09 -8.000000e-01 -1.534308e-09 -9.000000e-01 -1.584018e-09 -1.000000e+00 -1.650618e-09 -1.100000e+00 -1.742976e-09 -1.200000e+00 -1.874080e-09 -1.000000e-01 -3.924192e-08 -2.000000e-01 -4.046351e-08 -3.000000e-01 -4.120304e-08 -4.000000e-01 -4.186426e-08 -5.000000e-01 -4.249883e-08 -6.000000e-01 -4.312216e-08 -7.000000e-01 -4.374161e-08 -8.000000e-01 -4.436299e-08 -9.000000e-01 -4.499382e-08 -1.000000e+00 -4.564601e-08 -1.100000e+00 -4.633806e-08 -1.200000e+00 -4.709669e-08 -1.000000e-01 -7.622851e-07 -2.000000e-01 -7.860249e-07 -3.000000e-01 -7.993662e-07 -4.000000e-01 -8.110538e-07 -5.000000e-01 -8.221518e-07 -6.000000e-01 -8.329612e-07 -7.000000e-01 -8.436086e-07 -8.000000e-01 -8.541762e-07 -9.000000e-01 -8.647601e-07 -1.000000e+00 -8.755147e-07 -1.100000e+00 -8.866836e-07 -1.200000e+00 -8.986166e-07 -1.000000e-01 -9.232309e-06 -2.000000e-01 -9.628461e-06 -3.000000e-01 -9.778764e-06 -4.000000e-01 -9.899354e-06 -5.000000e-01 -1.001015e-05 -6.000000e-01 -1.011613e-05 -7.000000e-01 -1.021923e-05 -8.000000e-01 -1.032054e-05 -9.000000e-01 -1.042114e-05 -1.000000e+00 -1.052263e-05 -1.100000e+00 -1.062758e-05 -1.200000e+00 -1.073977e-05 -1.000000e-01 -5.286088e-05 -2.000000e-01 -6.047164e-05 -3.000000e-01 -6.166384e-05 -4.000000e-01 -6.235135e-05 -5.000000e-01 -6.292018e-05 -6.000000e-01 -6.343894e-05 -7.000000e-01 -6.392956e-05 -8.000000e-01 -6.440190e-05 -9.000000e-01 -6.486261e-05 -1.000000e+00 -6.531957e-05 -1.100000e+00 -6.578501e-05 -1.200000e+00 -6.627761e-05 -1.000000e-01 -1.327233e-04 -2.000000e-01 -1.828049e-04 -3.000000e-01 -1.919207e-04 -4.000000e-01 -1.946504e-04 -5.000000e-01 -1.964154e-04 -6.000000e-01 -1.978788e-04 -7.000000e-01 -1.991989e-04 -8.000000e-01 -2.004334e-04 -9.000000e-01 -2.016108e-04 -1.000000e+00 -2.027528e-04 -1.100000e+00 -2.038872e-04 -1.200000e+00 -2.050571e-04 -1.000000e-01 -2.275789e-04 -2.000000e-01 -3.551034e-04 -3.000000e-01 -4.008378e-04 -4.000000e-01 -4.119197e-04 -5.000000e-01 -4.166340e-04 -6.000000e-01 -4.199210e-04 -7.000000e-01 -4.226696e-04 -8.000000e-01 -4.251393e-04 -9.000000e-01 -4.274353e-04 -1.000000e+00 -4.296143e-04 -1.100000e+00 -4.317257e-04 -1.200000e+00 -4.338365e-04 -1.000000e-01 -3.321346e-04 -2.000000e-01 -5.526540e-04 -3.000000e-01 -6.701963e-04 -4.000000e-01 -7.115369e-04 -5.000000e-01 -7.247187e-04 -6.000000e-01 -7.317133e-04 -7.000000e-01 -7.368858e-04 -8.000000e-01 -7.412668e-04 -9.000000e-01 -7.452073e-04 -1.000000e+00 -7.488634e-04 -1.100000e+00 -7.523300e-04 -1.200000e+00 -7.557011e-04 -1.000000e-01 -4.470062e-04 -2.000000e-01 -7.714984e-04 -3.000000e-01 -9.803735e-04 -4.000000e-01 -1.085477e-03 -5.000000e-01 -1.123364e-03 -6.000000e-01 -1.138817e-03 -7.000000e-01 -1.148334e-03 -8.000000e-01 -1.155710e-03 -9.000000e-01 -1.162045e-03 -1.000000e+00 -1.167763e-03 -1.100000e+00 -1.173074e-03 -1.200000e+00 -1.178123e-03 -1.000000e-01 -5.746721e-04 -2.000000e-01 -1.015052e-03 -3.000000e-01 -1.328179e-03 -4.000000e-01 -1.521601e-03 -5.000000e-01 -1.613238e-03 -6.000000e-01 -1.648973e-03 -7.000000e-01 -1.666888e-03 -8.000000e-01 -1.679146e-03 -9.000000e-01 -1.689016e-03 -1.000000e+00 -1.697611e-03 -1.100000e+00 -1.705410e-03 -1.200000e+00 -1.712677e-03 -1.000000e-01 -7.189739e-04 -2.000000e-01 -1.290008e-03 -3.000000e-01 -1.720896e-03 -4.000000e-01 -2.018698e-03 -5.000000e-01 -2.192421e-03 -6.000000e-01 -2.270943e-03 -7.000000e-01 -2.305783e-03 -8.000000e-01 -2.326355e-03 -9.000000e-01 -2.341565e-03 -1.000000e+00 -2.354203e-03 -1.100000e+00 -2.365354e-03 -1.200000e+00 -2.375539e-03 -1.000000e-01 -8.854473e-04 -2.000000e-01 -1.606385e-03 -3.000000e-01 -2.171780e-03 -4.000000e-01 -2.589381e-03 -5.000000e-01 -2.865814e-03 -6.000000e-01 -3.014979e-03 -7.000000e-01 -3.082286e-03 -8.000000e-01 -3.117276e-03 -9.000000e-01 -3.140698e-03 -1.000000e+00 -3.159068e-03 -1.100000e+00 -3.174740e-03 -1.200000e+00 -3.188745e-03 -1.000000e-01 -4.682463e-08 -2.000000e-01 -4.866198e-08 -3.000000e-01 -4.935635e-08 -4.000000e-01 -4.992828e-08 -5.000000e-01 -5.046282e-08 -6.000000e-01 -5.098095e-08 -7.000000e-01 -5.149192e-08 -8.000000e-01 -5.200269e-08 -9.000000e-01 -5.252190e-08 -1.000000e+00 -5.306310e-08 -1.100000e+00 -5.364751e-08 -1.200000e+00 -5.430631e-08 -1.000000e-01 -2.651075e-07 -2.000000e-01 -2.763290e-07 -3.000000e-01 -2.802411e-07 -4.000000e-01 -2.834063e-07 -5.000000e-01 -2.863407e-07 -6.000000e-01 -2.891636e-07 -7.000000e-01 -2.919207e-07 -8.000000e-01 -2.946388e-07 -9.000000e-01 -2.973474e-07 -1.000000e+00 -3.000937e-07 -1.100000e+00 -3.029543e-07 -1.200000e+00 -3.060426e-07 -1.000000e-01 -1.357460e-06 -2.000000e-01 -1.438167e-06 -3.000000e-01 -1.458990e-06 -4.000000e-01 -1.474787e-06 -5.000000e-01 -1.489170e-06 -6.000000e-01 -1.502888e-06 -7.000000e-01 -1.516206e-06 -8.000000e-01 -1.529265e-06 -9.000000e-01 -1.542199e-06 -1.000000e+00 -1.555215e-06 -1.100000e+00 -1.568657e-06 -1.200000e+00 -1.583041e-06 -1.000000e-01 -5.449859e-06 -2.000000e-01 -6.244743e-06 -3.000000e-01 -6.357279e-06 -4.000000e-01 -6.423933e-06 -5.000000e-01 -6.481067e-06 -6.000000e-01 -6.534312e-06 -7.000000e-01 -6.585346e-06 -8.000000e-01 -6.634913e-06 -9.000000e-01 -6.683551e-06 -1.000000e+00 -6.731977e-06 -1.100000e+00 -6.781384e-06 -1.200000e+00 -6.833645e-06 -1.000000e-01 -1.367666e-05 -2.000000e-01 -1.867402e-05 -3.000000e-01 -1.948519e-05 -4.000000e-01 -1.972504e-05 -5.000000e-01 -1.989322e-05 -6.000000e-01 -2.004069e-05 -7.000000e-01 -2.017828e-05 -8.000000e-01 -2.030975e-05 -9.000000e-01 -2.043701e-05 -1.000000e+00 -2.056173e-05 -1.100000e+00 -2.068643e-05 -1.200000e+00 -2.081529e-05 -1.000000e-01 -2.321377e-05 -2.000000e-01 -3.645916e-05 -3.000000e-01 -4.122951e-05 -4.000000e-01 -4.226992e-05 -5.000000e-01 -4.269286e-05 -6.000000e-01 -4.300622e-05 -7.000000e-01 -4.328245e-05 -8.000000e-01 -4.353954e-05 -9.000000e-01 -4.378423e-05 -1.000000e+00 -4.402023e-05 -1.100000e+00 -4.425123e-05 -1.200000e+00 -4.448302e-05 -1.000000e-01 -3.176436e-05 -2.000000e-01 -5.357367e-05 -3.000000e-01 -6.580405e-05 -4.000000e-01 -7.031564e-05 -5.000000e-01 -7.157010e-05 -6.000000e-01 -7.218576e-05 -7.000000e-01 -7.265949e-05 -8.000000e-01 -7.307945e-05 -9.000000e-01 -7.347003e-05 -1.000000e+00 -7.384097e-05 -1.100000e+00 -7.419805e-05 -1.200000e+00 -7.454761e-05 -1.000000e-01 -3.883513e-05 -2.000000e-01 -6.809589e-05 -3.000000e-01 -8.793985e-05 -4.000000e-01 -9.886961e-05 -5.000000e-01 -1.030200e-04 -6.000000e-01 -1.044239e-04 -7.000000e-01 -1.052164e-04 -8.000000e-01 -1.058479e-04 -9.000000e-01 -1.064121e-04 -1.000000e+00 -1.069377e-04 -1.100000e+00 -1.074367e-04 -1.200000e+00 -1.079169e-04 -1.000000e-01 -4.459749e-05 -2.000000e-01 -8.011092e-05 -3.000000e-01 -1.066361e-04 -4.000000e-01 -1.243615e-04 -5.000000e-01 -1.339385e-04 -6.000000e-01 -1.377040e-04 -7.000000e-01 -1.392099e-04 -8.000000e-01 -1.401587e-04 -9.000000e-01 -1.409387e-04 -1.000000e+00 -1.416420e-04 -1.100000e+00 -1.422988e-04 -1.200000e+00 -1.429230e-04 -1.000000e-01 -4.930364e-05 -2.000000e-01 -9.003755e-05 -3.000000e-01 -1.222709e-04 -4.000000e-01 -1.461055e-04 -5.000000e-01 -1.617735e-04 -6.000000e-01 -1.700909e-04 -7.000000e-01 -1.735120e-04 -8.000000e-01 -1.750952e-04 -9.000000e-01 -1.761824e-04 -1.000000e+00 -1.771005e-04 -1.100000e+00 -1.779354e-04 -1.200000e+00 -1.787176e-04 -1.000000e-01 -5.315869e-05 -2.000000e-01 -9.825293e-05 -3.000000e-01 -1.353368e-04 -4.000000e-01 -1.644785e-04 -5.000000e-01 -1.857914e-04 -6.000000e-01 -1.995639e-04 -7.000000e-01 -2.067806e-04 -8.000000e-01 -2.099216e-04 -9.000000e-01 -2.115706e-04 -1.000000e+00 -2.127817e-04 -1.100000e+00 -2.138272e-04 -1.200000e+00 -2.147856e-04 -1.000000e-01 -5.631771e-05 -2.000000e-01 -1.050534e-04 -3.000000e-01 -1.462511e-04 -4.000000e-01 -1.799619e-04 -5.000000e-01 -2.062558e-04 -6.000000e-01 -2.252633e-04 -7.000000e-01 -2.373410e-04 -8.000000e-01 -2.436318e-04 -9.000000e-01 -2.465567e-04 -1.000000e+00 -2.482658e-04 -1.100000e+00 -2.495886e-04 -1.200000e+00 -2.507516e-04 ngspice-26/tests/bsim4/pmos/reference/noise1.standard0000644000265600020320000000634712264261473022257 0ustar andreasadminFreq N(d) 1000 6.383766e-20 1258.925 4.960089e-20 1584.893 3.854963e-20 1995.262 2.997112e-20 2511.886 2.331208e-20 3162.278 1.814302e-20 3981.072 1.413055e-20 5011.872 1.101589e-20 6309.573 8.598135e-21 7943.282 6.721362e-21 10000 5.264523e-21 12589.25 4.133656e-21 15848.93 3.255823e-21 19952.62 2.574408e-21 25118.86 2.045462e-21 31622.78 1.634869e-21 39810.72 1.316147e-21 50118.72 1.06874e-21 63095.73 8.766915e-22 79432.82 7.276141e-22 100000 6.118933e-22 125892.5 5.220653e-22 158489.3 4.523366e-22 199526.2 3.982099e-22 251188.6 3.561942e-22 316227.8 3.235796e-22 398107.2 2.982626e-22 501187.2 2.786104e-22 630957.3 2.633554e-22 794328.2 2.515138e-22 1000000 2.423218e-22 1258925 2.351865e-22 1584893 2.296477e-22 1995262 2.253483e-22 2511886 2.220109e-22 3162278 2.194202e-22 3981072 2.174092e-22 5011872 2.158482e-22 6309573 2.146364e-22 7943282 2.136958e-22 10000000 2.129656e-22 12589250 2.123989e-22 15848930 2.119589e-22 19952620 2.116174e-22 25118860 2.113523e-22 31622780 2.111465e-22 39810720 2.109868e-22 50118720 2.108628e-22 63095730 2.107665e-22 79432820 2.106918e-22 100000000 2.106338e-22 1000 1.110689e-19 1258.925 8.627341e-20 1584.893 6.702595e-20 1995.262 5.208516e-20 2511.886 4.048742e-20 3162.278 3.14847e-20 3981.072 2.449637e-20 5011.872 1.90717e-20 6309.573 1.486081e-20 7943.282 1.159212e-20 10000 9.054814e-21 12589.25 7.085235e-21 15848.93 5.556354e-21 19952.62 4.369565e-21 25118.86 3.448324e-21 31622.78 2.733213e-21 39810.72 2.17811e-21 50118.72 1.747213e-21 63095.73 1.41273e-21 79432.82 1.153089e-21 100000 9.515437e-22 125892.5 7.950944e-22 158489.3 6.736512e-22 199526.2 5.793812e-22 251188.6 5.062044e-22 316227.8 4.494011e-22 398107.2 4.053077e-22 501187.2 3.710803e-22 630957.3 3.445114e-22 794328.2 3.238874e-22 1000000 3.07878e-22 1258925 2.954508e-22 1584893 2.858043e-22 1995262 2.783161e-22 2511886 2.725035e-22 3162278 2.679914e-22 3981072 2.64489e-22 5011872 2.617702e-22 6309573 2.596598e-22 7943282 2.580215e-22 10000000 2.567499e-22 12589250 2.557627e-22 15848930 2.549965e-22 19952620 2.544017e-22 25118860 2.5394e-22 31622780 2.535816e-22 39810720 2.533033e-22 50118720 2.530874e-22 63095730 2.529198e-22 79432820 2.527896e-22 100000000 2.526886e-22 1000 1.627136e-19 1258.925 1.263686e-19 1584.893 9.815594e-20 1995.262 7.625594e-20 2511.886 5.925613e-20 3162.278 4.606007e-20 3981.072 3.581667e-20 5011.872 2.786526e-20 6309.573 2.1693e-20 7943.282 1.69018e-20 10000 1.318264e-20 12589.25 1.029566e-20 15848.93 8.05465e-21 19952.62 6.315071e-21 25118.86 4.964728e-21 31622.78 3.916528e-21 39810.72 3.102865e-21 50118.72 2.471262e-21 63095.73 1.980982e-21 79432.82 1.600404e-21 100000 1.304981e-21 125892.5 1.07566e-21 158489.3 8.9765e-22 199526.2 7.594703e-22 251188.6 6.522087e-22 316227.8 5.689472e-22 398107.2 5.043157e-22 501187.2 4.541457e-22 630957.3 4.152014e-22 794328.2 3.84971e-22 1000000 3.615047e-22 1258925 3.432891e-22 1584893 3.291493e-22 1995262 3.181732e-22 2511886 3.096532e-22 3162278 3.030395e-22 3981072 2.979056e-22 5011872 2.939205e-22 6309573 2.90827e-22 7943282 2.884257e-22 10000000 2.865617e-22 12589250 2.851148e-22 15848930 2.839916e-22 19952620 2.831198e-22 25118860 2.82443e-22 31622780 2.819177e-22 39810720 2.815099e-22 50118720 2.811933e-22 63095730 2.809476e-22 79432820 2.807568e-22 100000000 2.806088e-22 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw6.standard0000644000265600020320000002751212264261473023240 0ustar andreasadminV(d) I(d) -1.000000e-01 -8.851744e-10 -2.000000e-01 -9.137113e-10 -3.000000e-01 -9.286886e-10 -4.000000e-01 -9.418268e-10 -5.000000e-01 -9.544625e-10 -6.000000e-01 -9.670447e-10 -7.000000e-01 -9.798797e-10 -8.000000e-01 -9.933088e-10 -9.000000e-01 -1.007816e-09 -1.000000e+00 -1.024134e-09 -1.100000e+00 -1.043368e-09 -1.200000e+00 -1.067131e-09 -1.000000e-01 -1.065005e-08 -2.000000e-01 -1.099361e-08 -3.000000e-01 -1.116814e-08 -4.000000e-01 -1.131895e-08 -5.000000e-01 -1.146166e-08 -6.000000e-01 -1.160049e-08 -7.000000e-01 -1.173726e-08 -8.000000e-01 -1.187318e-08 -9.000000e-01 -1.200976e-08 -1.000000e+00 -1.214936e-08 -1.100000e+00 -1.229576e-08 -1.200000e+00 -1.245442e-08 -1.000000e-01 -1.042842e-07 -2.000000e-01 -1.080409e-07 -3.000000e-01 -1.096885e-07 -4.000000e-01 -1.110690e-07 -5.000000e-01 -1.123597e-07 -6.000000e-01 -1.136059e-07 -7.000000e-01 -1.148258e-07 -8.000000e-01 -1.160301e-07 -9.000000e-01 -1.172306e-07 -1.000000e+00 -1.184463e-07 -1.100000e+00 -1.197074e-07 -1.200000e+00 -1.210579e-07 -1.000000e-01 -7.406254e-07 -2.000000e-01 -7.923773e-07 -3.000000e-01 -8.047208e-07 -4.000000e-01 -8.137286e-07 -5.000000e-01 -8.217974e-07 -6.000000e-01 -8.294293e-07 -7.000000e-01 -8.368018e-07 -8.000000e-01 -8.440047e-07 -9.000000e-01 -8.511163e-07 -1.000000e+00 -8.582498e-07 -1.100000e+00 -8.655897e-07 -1.200000e+00 -8.734129e-07 -1.000000e-01 -2.674163e-06 -2.000000e-01 -3.308884e-06 -3.000000e-01 -3.393766e-06 -4.000000e-01 -3.431993e-06 -5.000000e-01 -3.462032e-06 -6.000000e-01 -3.489044e-06 -7.000000e-01 -3.514444e-06 -8.000000e-01 -3.538806e-06 -9.000000e-01 -3.562471e-06 -1.000000e+00 -3.585803e-06 -1.100000e+00 -3.609361e-06 -1.200000e+00 -3.634034e-06 -1.000000e-01 -5.309366e-06 -2.000000e-01 -7.835704e-06 -3.000000e-01 -8.458825e-06 -4.000000e-01 -8.602062e-06 -5.000000e-01 -8.681703e-06 -6.000000e-01 -8.745787e-06 -7.000000e-01 -8.803272e-06 -8.000000e-01 -8.856987e-06 -9.000000e-01 -8.908184e-06 -1.000000e+00 -8.957698e-06 -1.100000e+00 -9.006507e-06 -1.200000e+00 -9.056162e-06 -1.000000e-01 -7.927870e-06 -2.000000e-01 -1.290014e-05 -3.000000e-01 -1.517555e-05 -4.000000e-01 -1.579887e-05 -5.000000e-01 -1.600377e-05 -6.000000e-01 -1.613278e-05 -7.000000e-01 -1.623875e-05 -8.000000e-01 -1.633392e-05 -9.000000e-01 -1.642261e-05 -1.000000e+00 -1.650687e-05 -1.100000e+00 -1.658822e-05 -1.200000e+00 -1.666862e-05 -1.000000e-01 -1.034247e-05 -2.000000e-01 -1.771482e-05 -3.000000e-01 -2.222086e-05 -4.000000e-01 -2.422494e-05 -5.000000e-01 -2.484823e-05 -6.000000e-01 -2.511226e-05 -7.000000e-01 -2.529386e-05 -8.000000e-01 -2.544606e-05 -9.000000e-01 -2.558331e-05 -1.000000e+00 -2.571118e-05 -1.100000e+00 -2.583255e-05 -1.200000e+00 -2.594982e-05 -1.000000e-01 -1.253506e-05 -2.000000e-01 -2.214139e-05 -3.000000e-01 -2.888515e-05 -4.000000e-01 -3.289799e-05 -5.000000e-01 -3.465695e-05 -6.000000e-01 -3.528530e-05 -7.000000e-01 -3.560573e-05 -8.000000e-01 -3.584103e-05 -9.000000e-01 -3.604182e-05 -1.000000e+00 -3.622382e-05 -1.100000e+00 -3.639357e-05 -1.200000e+00 -3.655479e-05 -1.000000e-01 -1.451957e-05 -2.000000e-01 -2.617713e-05 -3.000000e-01 -3.502471e-05 -4.000000e-01 -4.113399e-05 -5.000000e-01 -4.467592e-05 -6.000000e-01 -4.623402e-05 -7.000000e-01 -4.687448e-05 -8.000000e-01 -4.724910e-05 -9.000000e-01 -4.753809e-05 -1.000000e+00 -4.778856e-05 -1.100000e+00 -4.801678e-05 -1.200000e+00 -4.823004e-05 -1.000000e-01 -1.631432e-05 -2.000000e-01 -2.984567e-05 -3.000000e-01 -4.063840e-05 -4.000000e-01 -4.874407e-05 -5.000000e-01 -5.424439e-05 -6.000000e-01 -5.736094e-05 -7.000000e-01 -5.876426e-05 -8.000000e-01 -5.942317e-05 -9.000000e-01 -5.985006e-05 -1.000000e+00 -6.019203e-05 -1.100000e+00 -6.049235e-05 -1.200000e+00 -6.076737e-05 -1.000000e-01 -1.793730e-05 -2.000000e-01 -3.317636e-05 -3.000000e-01 -4.575628e-05 -4.000000e-01 -5.571920e-05 -5.000000e-01 -6.311817e-05 -6.000000e-01 -6.805034e-05 -7.000000e-01 -7.079689e-05 -8.000000e-01 -7.208629e-05 -9.000000e-01 -7.276847e-05 -1.000000e+00 -7.324580e-05 -1.100000e+00 -7.363957e-05 -1.200000e+00 -7.398927e-05 -1.000000e-01 -1.306758e-10 -2.000000e-01 -1.349132e-10 -3.000000e-01 -1.376098e-10 -4.000000e-01 -1.401412e-10 -5.000000e-01 -1.427458e-10 -6.000000e-01 -1.455803e-10 -7.000000e-01 -1.488321e-10 -8.000000e-01 -1.527676e-10 -9.000000e-01 -1.577838e-10 -1.000000e+00 -1.644739e-10 -1.100000e+00 -1.737165e-10 -1.200000e+00 -1.867989e-10 -1.000000e-01 -3.888893e-09 -2.000000e-01 -4.010035e-09 -3.000000e-01 -4.083409e-09 -4.000000e-01 -4.149025e-09 -5.000000e-01 -4.211999e-09 -6.000000e-01 -4.273860e-09 -7.000000e-01 -4.335336e-09 -8.000000e-01 -4.397002e-09 -9.000000e-01 -4.459606e-09 -1.000000e+00 -4.524328e-09 -1.100000e+00 -4.592998e-09 -1.200000e+00 -4.668267e-09 -1.000000e-01 -7.554141e-08 -2.000000e-01 -7.789396e-08 -3.000000e-01 -7.921612e-08 -4.000000e-01 -8.037441e-08 -5.000000e-01 -8.147429e-08 -6.000000e-01 -8.254556e-08 -7.000000e-01 -8.360079e-08 -8.000000e-01 -8.464811e-08 -9.000000e-01 -8.569704e-08 -1.000000e+00 -8.676289e-08 -1.100000e+00 -8.786980e-08 -1.200000e+00 -8.905243e-08 -1.000000e-01 -9.149297e-07 -2.000000e-01 -9.541848e-07 -3.000000e-01 -9.690792e-07 -4.000000e-01 -9.810294e-07 -5.000000e-01 -9.920087e-07 -6.000000e-01 -1.002511e-06 -7.000000e-01 -1.012729e-06 -8.000000e-01 -1.022770e-06 -9.000000e-01 -1.032739e-06 -1.000000e+00 -1.042796e-06 -1.100000e+00 -1.053197e-06 -1.200000e+00 -1.064315e-06 -1.000000e-01 -5.238940e-06 -2.000000e-01 -5.993105e-06 -3.000000e-01 -6.111235e-06 -4.000000e-01 -6.179364e-06 -5.000000e-01 -6.235736e-06 -6.000000e-01 -6.287146e-06 -7.000000e-01 -6.335768e-06 -8.000000e-01 -6.382579e-06 -9.000000e-01 -6.428239e-06 -1.000000e+00 -6.473527e-06 -1.100000e+00 -6.519655e-06 -1.200000e+00 -6.568474e-06 -1.000000e-01 -1.315554e-05 -2.000000e-01 -1.811872e-05 -3.000000e-01 -1.902190e-05 -4.000000e-01 -1.929236e-05 -5.000000e-01 -1.946727e-05 -6.000000e-01 -1.961230e-05 -7.000000e-01 -1.974313e-05 -8.000000e-01 -1.986548e-05 -9.000000e-01 -1.998217e-05 -1.000000e+00 -2.009536e-05 -1.100000e+00 -2.020779e-05 -1.200000e+00 -2.032374e-05 -1.000000e-01 -2.256086e-05 -2.000000e-01 -3.520045e-05 -3.000000e-01 -3.973220e-05 -4.000000e-01 -4.083007e-05 -5.000000e-01 -4.129718e-05 -6.000000e-01 -4.162291e-05 -7.000000e-01 -4.189532e-05 -8.000000e-01 -4.214010e-05 -9.000000e-01 -4.236766e-05 -1.000000e+00 -4.258364e-05 -1.100000e+00 -4.279292e-05 -1.200000e+00 -4.300215e-05 -1.000000e-01 -3.293108e-05 -2.000000e-01 -5.479113e-05 -3.000000e-01 -6.643999e-05 -4.000000e-01 -7.053566e-05 -5.000000e-01 -7.184151e-05 -6.000000e-01 -7.253458e-05 -7.000000e-01 -7.304719e-05 -8.000000e-01 -7.348141e-05 -9.000000e-01 -7.387198e-05 -1.000000e+00 -7.423438e-05 -1.100000e+00 -7.457801e-05 -1.200000e+00 -7.491218e-05 -1.000000e-01 -4.432823e-05 -2.000000e-01 -7.650026e-05 -3.000000e-01 -9.720398e-05 -4.000000e-01 -1.076182e-04 -5.000000e-01 -1.113712e-04 -6.000000e-01 -1.129021e-04 -7.000000e-01 -1.138451e-04 -8.000000e-01 -1.145762e-04 -9.000000e-01 -1.152041e-04 -1.000000e+00 -1.157710e-04 -1.100000e+00 -1.162974e-04 -1.200000e+00 -1.167979e-04 -1.000000e-01 -5.699939e-05 -2.000000e-01 -1.006689e-04 -3.000000e-01 -1.317115e-04 -4.000000e-01 -1.508804e-04 -5.000000e-01 -1.599582e-04 -6.000000e-01 -1.634977e-04 -7.000000e-01 -1.652727e-04 -8.000000e-01 -1.664875e-04 -9.000000e-01 -1.674657e-04 -1.000000e+00 -1.683177e-04 -1.100000e+00 -1.690909e-04 -1.200000e+00 -1.698113e-04 -1.000000e-01 -7.132756e-05 -2.000000e-01 -1.279644e-04 -3.000000e-01 -1.706894e-04 -4.000000e-01 -2.002083e-04 -5.000000e-01 -2.174206e-04 -6.000000e-01 -2.251976e-04 -7.000000e-01 -2.286487e-04 -8.000000e-01 -2.306870e-04 -9.000000e-01 -2.321945e-04 -1.000000e+00 -2.334473e-04 -1.100000e+00 -2.345528e-04 -1.200000e+00 -2.355627e-04 -1.000000e-01 -8.786494e-05 -2.000000e-01 -1.593858e-04 -3.000000e-01 -2.154595e-04 -4.000000e-01 -2.568613e-04 -5.000000e-01 -2.842555e-04 -6.000000e-01 -2.990298e-04 -7.000000e-01 -3.056952e-04 -8.000000e-01 -3.091615e-04 -9.000000e-01 -3.114826e-04 -1.000000e+00 -3.133036e-04 -1.100000e+00 -3.148573e-04 -1.200000e+00 -3.162459e-04 -1.000000e-01 -4.640355e-09 -2.000000e-01 -4.822512e-09 -3.000000e-01 -4.891408e-09 -4.000000e-01 -4.948173e-09 -5.000000e-01 -5.001233e-09 -6.000000e-01 -5.052668e-09 -7.000000e-01 -5.103393e-09 -8.000000e-01 -5.154099e-09 -9.000000e-01 -5.205641e-09 -1.000000e+00 -5.259363e-09 -1.100000e+00 -5.317366e-09 -1.200000e+00 -5.382742e-09 -1.000000e-01 -2.627194e-08 -2.000000e-01 -2.738400e-08 -3.000000e-01 -2.777175e-08 -4.000000e-01 -2.808548e-08 -5.000000e-01 -2.837635e-08 -6.000000e-01 -2.865619e-08 -7.000000e-01 -2.892949e-08 -8.000000e-01 -2.919894e-08 -9.000000e-01 -2.946745e-08 -1.000000e+00 -2.973969e-08 -1.100000e+00 -3.002326e-08 -1.200000e+00 -3.032939e-08 -1.000000e-01 -1.345232e-07 -2.000000e-01 -1.425209e-07 -3.000000e-01 -1.445843e-07 -4.000000e-01 -1.461498e-07 -5.000000e-01 -1.475751e-07 -6.000000e-01 -1.489346e-07 -7.000000e-01 -1.502545e-07 -8.000000e-01 -1.515487e-07 -9.000000e-01 -1.528305e-07 -1.000000e+00 -1.541204e-07 -1.100000e+00 -1.554526e-07 -1.200000e+00 -1.568781e-07 -1.000000e-01 -5.400808e-07 -2.000000e-01 -6.188510e-07 -3.000000e-01 -6.300021e-07 -4.000000e-01 -6.366069e-07 -5.000000e-01 -6.422686e-07 -6.000000e-01 -6.475449e-07 -7.000000e-01 -6.526023e-07 -8.000000e-01 -6.575143e-07 -9.000000e-01 -6.623343e-07 -1.000000e+00 -6.671333e-07 -1.100000e+00 -6.720295e-07 -1.200000e+00 -6.772087e-07 -1.000000e-01 -1.355374e-06 -2.000000e-01 -1.850606e-06 -3.000000e-01 -1.930986e-06 -4.000000e-01 -1.954752e-06 -5.000000e-01 -1.971417e-06 -6.000000e-01 -1.986030e-06 -7.000000e-01 -1.999665e-06 -8.000000e-01 -2.012694e-06 -9.000000e-01 -2.025304e-06 -1.000000e+00 -2.037664e-06 -1.100000e+00 -2.050021e-06 -1.200000e+00 -2.062792e-06 -1.000000e-01 -2.300547e-06 -2.000000e-01 -3.613173e-06 -3.000000e-01 -4.085899e-06 -4.000000e-01 -4.188990e-06 -5.000000e-01 -4.230897e-06 -6.000000e-01 -4.261947e-06 -7.000000e-01 -4.289320e-06 -8.000000e-01 -4.314796e-06 -9.000000e-01 -4.339043e-06 -1.000000e+00 -4.362430e-06 -1.100000e+00 -4.385322e-06 -1.200000e+00 -4.408293e-06 -1.000000e-01 -3.147973e-06 -2.000000e-01 -5.309322e-06 -3.000000e-01 -6.521346e-06 -4.000000e-01 -6.968416e-06 -5.000000e-01 -7.092713e-06 -6.000000e-01 -7.153714e-06 -7.000000e-01 -7.200656e-06 -8.000000e-01 -7.242270e-06 -9.000000e-01 -7.280974e-06 -1.000000e+00 -7.317732e-06 -1.100000e+00 -7.353118e-06 -1.200000e+00 -7.387760e-06 -1.000000e-01 -3.848755e-06 -2.000000e-01 -6.748594e-06 -3.000000e-01 -8.715155e-06 -4.000000e-01 -9.798269e-06 -5.000000e-01 -1.020953e-05 -6.000000e-01 -1.034863e-05 -7.000000e-01 -1.042716e-05 -8.000000e-01 -1.048973e-05 -9.000000e-01 -1.054564e-05 -1.000000e+00 -1.059772e-05 -1.100000e+00 -1.064716e-05 -1.200000e+00 -1.069475e-05 -1.000000e-01 -4.419870e-06 -2.000000e-01 -7.939405e-06 -3.000000e-01 -1.056811e-05 -4.000000e-01 -1.232470e-05 -5.000000e-01 -1.327374e-05 -6.000000e-01 -1.364685e-05 -7.000000e-01 -1.379606e-05 -8.000000e-01 -1.389007e-05 -9.000000e-01 -1.396736e-05 -1.000000e+00 -1.403705e-05 -1.100000e+00 -1.410213e-05 -1.200000e+00 -1.416398e-05 -1.000000e-01 -4.886312e-06 -2.000000e-01 -8.923250e-06 -3.000000e-01 -1.211769e-05 -4.000000e-01 -1.447973e-05 -5.000000e-01 -1.603241e-05 -6.000000e-01 -1.685661e-05 -7.000000e-01 -1.719558e-05 -8.000000e-01 -1.735244e-05 -9.000000e-01 -1.746016e-05 -1.000000e+00 -1.755113e-05 -1.100000e+00 -1.763386e-05 -1.200000e+00 -1.771138e-05 -1.000000e-01 -5.268402e-06 -2.000000e-01 -9.737502e-06 -3.000000e-01 -1.341267e-05 -4.000000e-01 -1.630069e-05 -5.000000e-01 -1.841280e-05 -6.000000e-01 -1.977762e-05 -7.000000e-01 -2.049272e-05 -8.000000e-01 -2.080393e-05 -9.000000e-01 -2.096731e-05 -1.000000e+00 -2.108731e-05 -1.100000e+00 -2.119091e-05 -1.200000e+00 -2.128588e-05 -1.000000e-01 -5.581509e-06 -2.000000e-01 -1.041153e-05 -3.000000e-01 -1.449442e-05 -4.000000e-01 -1.783528e-05 -5.000000e-01 -2.044104e-05 -6.000000e-01 -2.232467e-05 -7.000000e-01 -2.352151e-05 -8.000000e-01 -2.414485e-05 -9.000000e-01 -2.443464e-05 -1.000000e+00 -2.460398e-05 -1.100000e+00 -2.473504e-05 -1.200000e+00 -2.485027e-05 ngspice-26/tests/bsim4/pmos/reference/acFreq_xpart.standard0000644000265600020320000000710512264261473023471 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/acFreq_acnqsmod.standard0000644000265600020320000000710512264261473024140 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/acFreq_capmod.standard0000644000265600020320000000712212264261473023575 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.28436256539797e-14 8.84700948362642e-15 3.82639518406819e-15 1258.925 1.28436335548057e-14 8.84701232241686e-15 3.8263962076067e-15 1584.893 1.28436266561873e-14 8.84701037252411e-15 3.82639535866341e-15 1995.262 1.28436249594884e-14 8.84700733800495e-15 3.82639604228328e-15 2511.886 1.28436264847859e-14 8.84700873366342e-15 3.82639596861982e-15 3162.278 1.2843626013902e-14 8.84700887478394e-15 3.82639470281529e-15 3981.072 1.28436235911451e-14 8.84700781683537e-15 3.82639502533989e-15 5011.872 1.28436270161877e-14 8.84701159179101e-15 3.82639594523694e-15 6309.573 1.28436263002722e-14 8.84701053850413e-15 3.82639673316301e-15 7943.282 1.28436264369197e-14 8.84700960691453e-15 3.82639541088248e-15 10000 1.28436256539797e-14 8.84700948362642e-15 3.82639518406819e-15 12589.25 1.28436335548057e-14 8.84701232241686e-15 3.8263962076067e-15 15848.93 1.28436266561873e-14 8.84701037252411e-15 3.82639535866341e-15 19952.62 1.28436249594884e-14 8.84700733800495e-15 3.82639604228328e-15 25118.86 1.28436264847859e-14 8.84700873366342e-15 3.82639596861982e-15 31622.78 1.2843626013902e-14 8.84700887478394e-15 3.82639470281529e-15 39810.72 1.28436235911451e-14 8.84700781683537e-15 3.82639502533989e-15 50118.72 1.28436270161877e-14 8.84701159179101e-15 3.82639594523694e-15 63095.73 1.28436263002722e-14 8.84701053850413e-15 3.82639673316301e-15 79432.82 1.28436264369197e-14 8.84700960691453e-15 3.82639541088248e-15 100000 1.28436256539797e-14 8.84700948362642e-15 3.82639518406819e-15 125892.5 1.28436335548057e-14 8.84701232241686e-15 3.82639620760669e-15 158489.3 1.28436266561873e-14 8.84701037252411e-15 3.82639535866341e-15 199526.2 1.28436249594884e-14 8.84700733800495e-15 3.82639604228328e-15 251188.6 1.28436264847859e-14 8.84700873366342e-15 3.82639596861982e-15 316227.8 1.2843626013902e-14 8.84700887478394e-15 3.82639470281529e-15 398107.2 1.28436235911451e-14 8.84700781683537e-15 3.82639502533989e-15 501187.2 1.28436270161877e-14 8.847011591791e-15 3.82639594523694e-15 630957.3 1.28436263002722e-14 8.84701053850413e-15 3.82639673316301e-15 794328.2 1.28436264369197e-14 8.84700960691453e-15 3.82639541088248e-15 1000000 1.28436256539797e-14 8.84700948362642e-15 3.82639518406819e-15 1258925 1.28436335548057e-14 8.84701232241686e-15 3.82639620760669e-15 1584893 1.28436266561873e-14 8.84701037252411e-15 3.82639535866341e-15 1995262 1.28436249594884e-14 8.84700733800495e-15 3.82639604228328e-15 2511886 1.28436264847859e-14 8.84700873366342e-15 3.82639596861982e-15 3162278 1.2843626013902e-14 8.84700887478394e-15 3.82639470281529e-15 3981072 1.28436235911451e-14 8.84700781683537e-15 3.8263950253399e-15 5011872 1.28436270161877e-14 8.847011591791e-15 3.82639594523694e-15 6309573 1.28436263002722e-14 8.84701053850413e-15 3.82639673316301e-15 7943282 1.28436264369197e-14 8.84700960691453e-15 3.82639541088248e-15 10000000 1.28436256539797e-14 8.84700948362642e-15 3.82639518406819e-15 12589250 1.28436335548057e-14 8.84701232241686e-15 3.82639620760669e-15 15848930 1.28436266561873e-14 8.84701037252411e-15 3.82639535866341e-15 19952620 1.28436249594884e-14 8.84700733800495e-15 3.82639604228328e-15 25118860 1.28436264847859e-14 8.84700873366342e-15 3.82639596861982e-15 31622780 1.2843626013902e-14 8.84700887478394e-15 3.82639470281529e-15 39810720 1.28436235911451e-14 8.84700781683537e-15 3.82639502533989e-15 50118720 1.28436270161877e-14 8.847011591791e-15 3.82639594523694e-15 63095730 1.28436263002722e-14 8.84701053850413e-15 3.82639421072697e-15 79432820 1.28436244332776e-14 8.84700960691453e-15 3.82639541088248e-15 100000000 1.28436240624303e-14 8.84700789207699e-15 3.82639518406819e-15 ngspice-26/tests/bsim4/pmos/reference/noise3.standard0000644000265600020320000000635212264261473022255 0ustar andreasadminFreq N(d) 1000 5.663663e-18 1258.925 4.396449e-18 1584.893 3.412778e-18 1995.262 2.649206e-18 2511.886 2.056486e-18 3162.278 1.596388e-18 3981.072 1.239239e-18 5011.872 9.620027e-19 6309.573 7.467989e-19 7943.282 5.797476e-19 10000 4.500745e-19 12589.25 3.494161e-19 15848.93 2.712803e-19 19952.62 2.106276e-19 25118.86 1.635462e-19 31622.78 1.269993e-19 39810.72 9.862996e-20 50118.72 7.66083e-20 63095.73 5.951406e-20 79432.82 4.62447e-20 100000 3.59444e-20 125892.5 2.794882e-20 158489.3 2.174228e-20 199526.2 1.692447e-20 251188.6 1.318465e-20 316227.8 1.028163e-20 398107.2 8.028173e-21 501187.2 6.278931e-21 630957.3 4.921087e-21 794328.2 3.867065e-21 1000000 3.048883e-21 1258925 2.413771e-21 1584893 1.920768e-21 1995262 1.538075e-21 2511886 1.241012e-21 3162278 1.010417e-21 3981072 8.314178e-22 5011872 6.924706e-22 6309573 5.846132e-22 7943282 5.008892e-22 10000000 4.358987e-22 12589250 3.8545e-22 15848930 3.462894e-22 19952620 3.15891e-22 25118860 2.922944e-22 31622780 2.739776e-22 39810720 2.597592e-22 50118720 2.487222e-22 63095730 2.401548e-22 79432820 2.335044e-22 100000000 2.28342e-22 1000 9.364437e-18 1258.925 7.269174e-18 1584.893 5.642732e-18 1995.262 4.380211e-18 2511.886 3.400182e-18 3162.278 2.639438e-18 3981.072 2.048913e-18 5011.872 1.590519e-18 6309.573 1.234692e-18 7943.282 9.584828e-19 10000 7.44076e-19 12589.25 5.776433e-19 15848.93 4.484504e-19 19952.62 3.481648e-19 25118.86 2.703184e-19 31622.78 2.098903e-19 39810.72 1.629832e-19 50118.72 1.265717e-19 63095.73 9.830739e-20 79432.82 7.636729e-20 100000 5.933635e-20 125892.5 4.611613e-20 158489.3 3.585398e-20 199526.2 2.788801e-20 251188.6 2.170445e-20 316227.8 1.690448e-20 398107.2 1.317851e-20 501187.2 1.028624e-20 630957.3 8.041128e-21 794328.2 6.298364e-21 1000000 4.945548e-21 1258925 3.895429e-21 1584893 3.080277e-21 1995262 2.447517e-21 2511886 1.95634e-21 3162278 1.575064e-21 3981072 1.279101e-21 5011872 1.04936e-21 6309573 8.710237e-22 7943282 7.32591e-22 10000000 6.251331e-22 12589250 5.417191e-22 15848930 4.769693e-22 19952620 4.267075e-22 25118860 3.876918e-22 31622780 3.574061e-22 39810720 3.338968e-22 50118720 3.156478e-22 63095730 3.014821e-22 79432820 2.90486e-22 100000000 2.819503e-22 1000 1.250656e-17 1258.925 9.708241e-18 1584.893 7.536057e-18 1995.262 5.849905e-18 2511.886 4.541035e-18 3162.278 3.525028e-18 3981.072 2.736355e-18 5011.872 2.124151e-18 6309.573 1.648928e-18 7943.282 1.280039e-18 10000 9.936889e-19 12589.25 7.714108e-19 15848.93 5.988681e-19 19952.62 4.649323e-19 25118.86 3.60965e-19 31622.78 2.802607e-19 39810.72 2.176143e-19 50118.72 1.689851e-19 63095.73 1.312369e-19 79432.82 1.019349e-19 100000 7.918936e-20 125892.5 6.153319e-20 158489.3 4.782763e-20 199526.2 3.718873e-20 251188.6 2.893032e-20 316227.8 2.251975e-20 398107.2 1.754356e-20 501187.2 1.368081e-20 630957.3 1.068236e-20 794328.2 8.354825e-21 1000000 6.548081e-21 1258925 5.145601e-21 1584893 4.05693e-21 1995262 3.211852e-21 2511886 2.555863e-21 3162278 2.046654e-21 3981072 1.651381e-21 5011872 1.344552e-21 6309573 1.106377e-21 7943282 9.214937e-22 10000000 7.779789e-22 12589250 6.66576e-22 15848930 5.800998e-22 19952620 5.129729e-22 25118860 4.608658e-22 31622780 4.204179e-22 39810720 3.890202e-22 50118720 3.646479e-22 63095730 3.45729e-22 79432820 3.310432e-22 100000000 3.196434e-22 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw1_vb1.standard0000644000265600020320000002751212264261473024003 0ustar andreasadminV(d) I(d) -1.000000e-01 -3.629594e-07 -2.000000e-01 -6.847099e-07 -3.000000e-01 -1.241124e-06 -4.000000e-01 -2.208511e-06 -5.000000e-01 -3.871745e-06 -6.000000e-01 -6.693757e-06 -7.000000e-01 -1.141332e-05 -8.000000e-01 -1.917814e-05 -9.000000e-01 -3.170607e-05 -1.000000e+00 -5.144985e-05 -1.100000e+00 -8.173430e-05 -1.200000e+00 -1.268637e-04 -1.000000e-01 -3.819106e-06 -2.000000e-01 -6.886665e-06 -3.000000e-01 -1.187385e-05 -4.000000e-01 -2.001008e-05 -5.000000e-01 -3.300731e-05 -6.000000e-01 -5.316134e-05 -7.000000e-01 -8.328481e-05 -8.000000e-01 -1.264704e-04 -9.000000e-01 -1.857529e-04 -1.000000e+00 -2.638468e-04 -1.100000e+00 -3.631649e-04 -1.200000e+00 -4.862465e-04 -1.000000e-01 -3.126248e-05 -2.000000e-01 -5.306100e-05 -3.000000e-01 -8.380521e-05 -4.000000e-01 -1.269571e-04 -5.000000e-01 -1.851313e-04 -6.000000e-01 -2.603201e-04 -7.000000e-01 -3.537560e-04 -8.000000e-01 -4.659147e-04 -9.000000e-01 -5.967036e-04 -1.000000e+00 -7.458502e-04 -1.100000e+00 -9.135093e-04 -1.200000e+00 -1.101084e-03 -1.000000e-01 -1.531095e-04 -2.000000e-01 -2.425114e-04 -3.000000e-01 -3.354638e-04 -4.000000e-01 -4.433949e-04 -5.000000e-01 -5.674557e-04 -6.000000e-01 -7.074311e-04 -7.000000e-01 -8.626734e-04 -8.000000e-01 -1.032375e-03 -9.000000e-01 -1.215754e-03 -1.000000e+00 -1.412337e-03 -1.100000e+00 -1.622469e-03 -1.200000e+00 -1.848120e-03 -1.000000e-01 -3.735198e-04 -2.000000e-01 -6.067638e-04 -3.000000e-01 -7.799915e-04 -4.000000e-01 -9.494152e-04 -5.000000e-01 -1.126764e-03 -6.000000e-01 -1.314158e-03 -7.000000e-01 -1.511909e-03 -8.000000e-01 -1.719837e-03 -9.000000e-01 -1.937639e-03 -1.000000e+00 -2.165180e-03 -1.100000e+00 -2.403015e-03 -1.200000e+00 -2.653279e-03 -1.000000e-01 -6.026453e-04 -2.000000e-01 -1.025813e-03 -3.000000e-01 -1.315417e-03 -4.000000e-01 -1.548827e-03 -5.000000e-01 -1.771783e-03 -6.000000e-01 -1.996677e-03 -7.000000e-01 -2.227018e-03 -8.000000e-01 -2.463986e-03 -9.000000e-01 -2.707980e-03 -1.000000e+00 -2.959203e-03 -1.100000e+00 -3.218254e-03 -1.200000e+00 -3.487081e-03 -1.000000e-01 -8.053651e-04 -2.000000e-01 -1.413975e-03 -3.000000e-01 -1.855009e-03 -4.000000e-01 -2.178082e-03 -5.000000e-01 -2.452442e-03 -6.000000e-01 -2.713934e-03 -7.000000e-01 -2.973934e-03 -8.000000e-01 -3.236425e-03 -9.000000e-01 -3.503035e-03 -1.000000e+00 -3.774540e-03 -1.100000e+00 -4.051663e-03 -1.200000e+00 -4.336074e-03 -1.000000e-01 -9.797008e-04 -2.000000e-01 -1.755510e-03 -3.000000e-01 -2.352240e-03 -4.000000e-01 -2.796274e-03 -5.000000e-01 -3.140552e-03 -6.000000e-01 -3.444368e-03 -7.000000e-01 -3.735043e-03 -8.000000e-01 -4.022319e-03 -9.000000e-01 -4.310115e-03 -1.000000e+00 -4.600244e-03 -1.100000e+00 -4.893813e-03 -1.200000e+00 -5.192318e-03 -1.000000e-01 -1.129676e-03 -2.000000e-01 -2.053848e-03 -3.000000e-01 -2.795449e-03 -4.000000e-01 -3.373210e-03 -5.000000e-01 -3.813407e-03 -6.000000e-01 -4.172487e-03 -7.000000e-01 -4.498456e-03 -8.000000e-01 -4.811880e-03 -9.000000e-01 -5.120879e-03 -1.000000e+00 -5.429079e-03 -1.100000e+00 -5.738378e-03 -1.200000e+00 -6.050351e-03 -1.000000e-01 -1.259334e-03 -2.000000e-01 -2.314778e-03 -3.000000e-01 -3.187644e-03 -4.000000e-01 -3.894790e-03 -5.000000e-01 -4.449564e-03 -6.000000e-01 -4.883887e-03 -7.000000e-01 -5.254301e-03 -8.000000e-01 -5.597539e-03 -9.000000e-01 -5.929128e-03 -1.000000e+00 -6.255779e-03 -1.100000e+00 -6.580777e-03 -1.200000e+00 -6.906157e-03 -1.000000e-01 -1.372009e-03 -2.000000e-01 -2.543687e-03 -3.000000e-01 -3.534717e-03 -4.000000e-01 -4.361077e-03 -5.000000e-01 -5.033436e-03 -6.000000e-01 -5.563455e-03 -7.000000e-01 -5.992932e-03 -8.000000e-01 -6.372644e-03 -9.000000e-01 -6.729785e-03 -1.000000e+00 -7.076219e-03 -1.100000e+00 -7.417508e-03 -1.200000e+00 -7.756659e-03 -1.000000e-01 -1.470401e-03 -2.000000e-01 -2.745198e-03 -3.000000e-01 -3.842480e-03 -4.000000e-01 -4.777341e-03 -5.000000e-01 -5.560539e-03 -6.000000e-01 -6.196850e-03 -7.000000e-01 -6.703787e-03 -8.000000e-01 -7.130534e-03 -9.000000e-01 -7.518227e-03 -1.000000e+00 -7.886884e-03 -1.100000e+00 -8.245721e-03 -1.200000e+00 -8.599403e-03 -1.000000e-01 -8.405568e-08 -2.000000e-01 -1.867126e-07 -3.000000e-01 -3.966138e-07 -4.000000e-01 -8.194373e-07 -5.000000e-01 -1.647965e-06 -6.000000e-01 -3.222888e-06 -7.000000e-01 -6.128019e-06 -8.000000e-01 -1.134125e-05 -9.000000e-01 -2.046759e-05 -1.000000e+00 -3.606366e-05 -1.100000e+00 -6.200697e-05 -1.200000e+00 -1.037969e-04 -1.000000e-01 -1.992482e-06 -2.000000e-01 -4.007431e-06 -3.000000e-01 -7.623317e-06 -4.000000e-01 -1.402536e-05 -5.000000e-01 -2.508221e-05 -6.000000e-01 -4.360819e-05 -7.000000e-01 -7.346200e-05 -8.000000e-01 -1.192826e-04 -9.000000e-01 -1.858110e-04 -1.000000e+00 -2.771130e-04 -1.100000e+00 -3.962755e-04 -1.200000e+00 -5.459630e-04 -1.000000e-01 -2.858165e-05 -2.000000e-01 -5.156045e-05 -3.000000e-01 -8.694319e-05 -4.000000e-01 -1.396917e-04 -5.000000e-01 -2.139643e-04 -6.000000e-01 -3.125178e-04 -7.000000e-01 -4.362955e-04 -8.000000e-01 -5.846066e-04 -9.000000e-01 -7.557930e-04 -1.000000e+00 -9.481842e-04 -1.100000e+00 -1.161208e-03 -1.200000e+00 -1.396583e-03 -1.000000e-01 -2.165798e-04 -2.000000e-01 -3.378965e-04 -3.000000e-01 -4.731710e-04 -4.000000e-01 -6.295055e-04 -5.000000e-01 -8.059593e-04 -6.000000e-01 -1.000423e-03 -7.000000e-01 -1.210633e-03 -8.000000e-01 -1.434537e-03 -9.000000e-01 -1.670576e-03 -1.000000e+00 -1.918153e-03 -1.100000e+00 -2.178426e-03 -1.200000e+00 -2.455396e-03 -1.000000e-01 -6.673533e-04 -2.000000e-01 -9.891319e-04 -3.000000e-01 -1.231704e-03 -4.000000e-01 -1.469365e-03 -5.000000e-01 -1.712199e-03 -6.000000e-01 -1.961854e-03 -7.000000e-01 -2.218333e-03 -8.000000e-01 -2.481264e-03 -9.000000e-01 -2.750380e-03 -1.000000e+00 -3.026116e-03 -1.100000e+00 -3.310598e-03 -1.200000e+00 -3.609005e-03 -1.000000e-01 -1.179815e-03 -2.000000e-01 -1.813727e-03 -3.000000e-01 -2.178868e-03 -4.000000e-01 -2.479921e-03 -5.000000e-01 -2.766885e-03 -6.000000e-01 -3.050922e-03 -7.000000e-01 -3.335527e-03 -8.000000e-01 -3.622041e-03 -9.000000e-01 -3.911163e-03 -1.000000e+00 -4.203891e-03 -1.100000e+00 -4.502740e-03 -1.200000e+00 -4.813385e-03 -1.000000e-01 -1.652184e-03 -2.000000e-01 -2.648104e-03 -3.000000e-01 -3.194234e-03 -4.000000e-01 -3.566726e-03 -5.000000e-01 -3.893297e-03 -6.000000e-01 -4.204765e-03 -7.000000e-01 -4.510446e-03 -8.000000e-01 -4.814018e-03 -9.000000e-01 -5.117296e-03 -1.000000e+00 -5.421794e-03 -1.100000e+00 -5.730215e-03 -1.200000e+00 -6.048361e-03 -1.000000e-01 -2.075338e-03 -2.000000e-01 -3.429459e-03 -3.000000e-01 -4.216941e-03 -4.000000e-01 -4.686269e-03 -5.000000e-01 -5.056598e-03 -6.000000e-01 -5.394293e-03 -7.000000e-01 -5.718411e-03 -8.000000e-01 -6.036092e-03 -9.000000e-01 -6.350652e-03 -1.000000e+00 -6.664259e-03 -1.100000e+00 -6.979769e-03 -1.200000e+00 -7.302899e-03 -1.000000e-01 -2.456238e-03 -2.000000e-01 -4.147700e-03 -3.000000e-01 -5.210338e-03 -4.000000e-01 -5.813381e-03 -5.000000e-01 -6.237588e-03 -6.000000e-01 -6.603454e-03 -7.000000e-01 -6.945586e-03 -8.000000e-01 -7.276198e-03 -9.000000e-01 -7.600663e-03 -1.000000e+00 -7.922026e-03 -1.100000e+00 -8.243360e-03 -1.200000e+00 -8.570196e-03 -1.000000e-01 -2.802937e-03 -2.000000e-01 -4.809232e-03 -3.000000e-01 -6.154382e-03 -4.000000e-01 -6.930545e-03 -5.000000e-01 -7.424011e-03 -6.000000e-01 -7.822266e-03 -7.000000e-01 -8.183340e-03 -8.000000e-01 -8.526720e-03 -9.000000e-01 -8.860549e-03 -1.000000e+00 -9.189043e-03 -1.100000e+00 -9.515618e-03 -1.200000e+00 -9.845606e-03 -1.000000e-01 -3.122401e-03 -2.000000e-01 -5.423327e-03 -3.000000e-01 -7.043438e-03 -4.000000e-01 -8.024525e-03 -5.000000e-01 -8.607120e-03 -6.000000e-01 -9.043904e-03 -7.000000e-01 -9.425783e-03 -8.000000e-01 -9.782395e-03 -9.000000e-01 -1.012555e-02 -1.000000e+00 -1.046097e-02 -1.100000e+00 -1.079260e-02 -1.200000e+00 -1.112561e-02 -1.000000e-01 -3.420344e-03 -2.000000e-01 -5.998709e-03 -3.000000e-01 -7.881035e-03 -4.000000e-01 -9.085803e-03 -5.000000e-01 -9.780106e-03 -6.000000e-01 -1.026326e-02 -7.000000e-01 -1.066851e-02 -8.000000e-01 -1.103922e-02 -9.000000e-01 -1.139195e-02 -1.000000e+00 -1.173435e-02 -1.100000e+00 -1.207107e-02 -1.200000e+00 -1.240722e-02 -1.000000e-01 -1.273389e-06 -2.000000e-01 -2.104524e-06 -3.000000e-01 -3.339064e-06 -4.000000e-01 -5.235686e-06 -5.000000e-01 -8.144568e-06 -6.000000e-01 -1.257992e-05 -7.000000e-01 -1.928606e-05 -8.000000e-01 -2.931313e-05 -9.000000e-01 -4.409905e-05 -1.000000e+00 -6.555685e-05 -1.100000e+00 -9.617767e-05 -1.200000e+00 -1.391798e-04 -1.000000e-01 -6.672933e-06 -2.000000e-01 -1.087439e-05 -3.000000e-01 -1.685471e-05 -4.000000e-01 -2.568679e-05 -5.000000e-01 -3.857922e-05 -6.000000e-01 -5.704175e-05 -7.000000e-01 -8.286922e-05 -8.000000e-01 -1.180644e-04 -9.000000e-01 -1.647290e-04 -1.000000e+00 -2.249842e-04 -1.100000e+00 -3.010073e-04 -1.200000e+00 -3.952673e-04 -1.000000e-01 -3.012937e-05 -2.000000e-01 -4.855403e-05 -3.000000e-01 -7.142562e-05 -4.000000e-01 -1.019563e-04 -5.000000e-01 -1.419292e-04 -6.000000e-01 -1.929158e-04 -7.000000e-01 -2.562569e-04 -8.000000e-01 -3.330072e-04 -9.000000e-01 -4.239365e-04 -1.000000e+00 -5.296369e-04 -1.100000e+00 -6.507886e-04 -1.200000e+00 -7.886227e-04 -1.000000e-01 -9.491374e-05 -2.000000e-01 -1.569184e-04 -3.000000e-01 -2.143346e-04 -4.000000e-01 -2.806095e-04 -5.000000e-01 -3.580017e-04 -6.000000e-01 -4.472203e-04 -7.000000e-01 -5.485760e-04 -8.000000e-01 -6.621776e-04 -9.000000e-01 -7.880253e-04 -1.000000e+00 -9.261309e-04 -1.100000e+00 -1.076755e-03 -1.200000e+00 -1.240842e-03 -1.000000e-01 -1.901288e-04 -2.000000e-01 -3.332811e-04 -3.000000e-01 -4.427563e-04 -4.000000e-01 -5.462968e-04 -5.000000e-01 -6.563015e-04 -6.000000e-01 -7.753324e-04 -7.000000e-01 -9.040690e-04 -8.000000e-01 -1.042756e-03 -9.000000e-01 -1.191499e-03 -1.000000e+00 -1.350379e-03 -1.100000e+00 -1.519636e-03 -1.200000e+00 -1.700037e-03 -1.000000e-01 -2.829340e-04 -2.000000e-01 -5.139653e-04 -3.000000e-01 -6.956616e-04 -4.000000e-01 -8.436927e-04 -5.000000e-01 -9.829845e-04 -6.000000e-01 -1.125574e-03 -7.000000e-01 -1.274836e-03 -8.000000e-01 -1.431941e-03 -9.000000e-01 -1.597432e-03 -1.000000e+00 -1.771621e-03 -1.100000e+00 -1.954791e-03 -1.200000e+00 -2.147498e-03 -1.000000e-01 -3.598690e-04 -2.000000e-01 -6.668488e-04 -3.000000e-01 -9.215284e-04 -4.000000e-01 -1.128613e-03 -5.000000e-01 -1.304576e-03 -6.000000e-01 -1.471205e-03 -7.000000e-01 -1.639317e-03 -8.000000e-01 -1.812584e-03 -9.000000e-01 -1.992488e-03 -1.000000e+00 -2.179769e-03 -1.100000e+00 -2.374879e-03 -1.200000e+00 -2.578273e-03 -1.000000e-01 -4.211515e-04 -2.000000e-01 -7.907141e-04 -3.000000e-01 -1.108958e-03 -4.000000e-01 -1.377410e-03 -5.000000e-01 -1.602202e-03 -6.000000e-01 -1.799852e-03 -7.000000e-01 -1.988861e-03 -8.000000e-01 -2.178453e-03 -9.000000e-01 -2.372204e-03 -1.000000e+00 -2.571712e-03 -1.100000e+00 -2.777820e-03 -1.200000e+00 -2.991079e-03 -1.000000e-01 -4.699641e-04 -2.000000e-01 -8.908288e-04 -3.000000e-01 -1.262752e-03 -4.000000e-01 -1.586388e-03 -5.000000e-01 -1.863882e-03 -6.000000e-01 -2.102484e-03 -7.000000e-01 -2.318107e-03 -8.000000e-01 -2.526150e-03 -9.000000e-01 -2.734332e-03 -1.000000e+00 -2.945968e-03 -1.100000e+00 -3.162660e-03 -1.200000e+00 -3.385303e-03 -1.000000e-01 -5.091159e-04 -2.000000e-01 -9.721270e-04 -3.000000e-01 -1.389100e-03 -4.000000e-01 -1.760352e-03 -5.000000e-01 -2.086766e-03 -6.000000e-01 -2.371037e-03 -7.000000e-01 -2.621277e-03 -8.000000e-01 -2.852301e-03 -9.000000e-01 -3.076794e-03 -1.000000e+00 -3.301210e-03 -1.100000e+00 -3.528558e-03 -1.200000e+00 -3.760393e-03 -1.000000e-01 -5.406673e-04 -2.000000e-01 -1.038359e-03 -3.000000e-01 -1.493058e-03 -4.000000e-01 -1.904900e-03 -5.000000e-01 -2.274286e-03 -6.000000e-01 -2.602299e-03 -7.000000e-01 -2.892190e-03 -8.000000e-01 -3.152649e-03 -9.000000e-01 -3.397081e-03 -1.000000e+00 -3.635914e-03 -1.100000e+00 -3.874576e-03 -1.200000e+00 -4.115780e-03 -1.000000e-01 -5.661190e-04 -2.000000e-01 -1.092338e-03 -3.000000e-01 -1.578571e-03 -4.000000e-01 -2.024831e-03 -5.000000e-01 -2.431284e-03 -6.000000e-01 -2.798403e-03 -7.000000e-01 -3.127494e-03 -8.000000e-01 -3.422367e-03 -9.000000e-01 -3.691978e-03 -1.000000e+00 -3.948194e-03 -1.100000e+00 -4.199612e-03 -1.200000e+00 -4.450839e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw9.standard0000644000265600020320000002751212264261473023243 0ustar andreasadminV(d) I(d) -1.000000e-01 -5.275661e-10 -2.000000e-01 -5.446124e-10 -3.000000e-01 -5.535783e-10 -4.000000e-01 -5.614483e-10 -5.000000e-01 -5.690189e-10 -6.000000e-01 -5.765577e-10 -7.000000e-01 -5.842471e-10 -8.000000e-01 -5.922906e-10 -9.000000e-01 -6.009764e-10 -1.000000e+00 -6.107417e-10 -1.100000e+00 -6.222447e-10 -1.200000e+00 -6.364469e-10 -1.000000e-01 -6.347013e-09 -2.000000e-01 -6.551789e-09 -3.000000e-01 -6.655834e-09 -4.000000e-01 -6.745753e-09 -5.000000e-01 -6.830841e-09 -6.000000e-01 -6.913618e-09 -7.000000e-01 -6.995162e-09 -8.000000e-01 -7.076207e-09 -9.000000e-01 -7.157640e-09 -1.000000e+00 -7.240880e-09 -1.100000e+00 -7.328169e-09 -1.200000e+00 -7.422760e-09 -1.000000e-01 -6.214910e-08 -2.000000e-01 -6.438787e-08 -3.000000e-01 -6.536976e-08 -4.000000e-01 -6.619246e-08 -5.000000e-01 -6.696168e-08 -6.000000e-01 -6.770443e-08 -7.000000e-01 -6.843145e-08 -8.000000e-01 -6.914919e-08 -9.000000e-01 -6.986471e-08 -1.000000e+00 -7.058925e-08 -1.100000e+00 -7.134084e-08 -1.200000e+00 -7.214573e-08 -1.000000e-01 -4.413867e-07 -2.000000e-01 -4.722271e-07 -3.000000e-01 -4.795829e-07 -4.000000e-01 -4.849510e-07 -5.000000e-01 -4.897596e-07 -6.000000e-01 -4.943079e-07 -7.000000e-01 -4.987016e-07 -8.000000e-01 -5.029943e-07 -9.000000e-01 -5.072325e-07 -1.000000e+00 -5.114839e-07 -1.100000e+00 -5.158582e-07 -1.200000e+00 -5.205205e-07 -1.000000e-01 -1.593744e-06 -2.000000e-01 -1.972005e-06 -3.000000e-01 -2.022586e-06 -4.000000e-01 -2.045367e-06 -5.000000e-01 -2.063268e-06 -6.000000e-01 -2.079366e-06 -7.000000e-01 -2.094503e-06 -8.000000e-01 -2.109022e-06 -9.000000e-01 -2.123126e-06 -1.000000e+00 -2.137030e-06 -1.100000e+00 -2.151070e-06 -1.200000e+00 -2.165775e-06 -1.000000e-01 -3.164364e-06 -2.000000e-01 -4.669985e-06 -3.000000e-01 -5.041313e-06 -4.000000e-01 -5.126666e-06 -5.000000e-01 -5.174124e-06 -6.000000e-01 -5.212314e-06 -7.000000e-01 -5.246573e-06 -8.000000e-01 -5.278585e-06 -9.000000e-01 -5.309097e-06 -1.000000e+00 -5.338605e-06 -1.100000e+00 -5.367695e-06 -1.200000e+00 -5.397288e-06 -1.000000e-01 -4.725123e-06 -2.000000e-01 -7.688542e-06 -3.000000e-01 -9.044574e-06 -4.000000e-01 -9.415999e-06 -5.000000e-01 -9.538095e-06 -6.000000e-01 -9.614968e-06 -7.000000e-01 -9.678119e-06 -8.000000e-01 -9.734841e-06 -9.000000e-01 -9.787696e-06 -1.000000e+00 -9.837912e-06 -1.100000e+00 -9.886396e-06 -1.200000e+00 -9.934313e-06 -1.000000e-01 -6.164423e-06 -2.000000e-01 -1.055839e-05 -3.000000e-01 -1.324388e-05 -4.000000e-01 -1.443816e-05 -5.000000e-01 -1.480955e-05 -6.000000e-01 -1.496688e-05 -7.000000e-01 -1.507509e-05 -8.000000e-01 -1.516579e-05 -9.000000e-01 -1.524759e-05 -1.000000e+00 -1.532380e-05 -1.100000e+00 -1.539613e-05 -1.200000e+00 -1.546602e-05 -1.000000e-01 -7.471456e-06 -2.000000e-01 -1.319704e-05 -3.000000e-01 -1.721630e-05 -4.000000e-01 -1.960776e-05 -5.000000e-01 -2.065591e-05 -6.000000e-01 -2.103031e-05 -7.000000e-01 -2.122124e-05 -8.000000e-01 -2.136145e-05 -9.000000e-01 -2.148111e-05 -1.000000e+00 -2.158958e-05 -1.100000e+00 -2.169075e-05 -1.200000e+00 -2.178683e-05 -1.000000e-01 -8.654504e-06 -2.000000e-01 -1.560284e-05 -3.000000e-01 -2.087610e-05 -4.000000e-01 -2.451710e-05 -5.000000e-01 -2.662785e-05 -6.000000e-01 -2.755625e-05 -7.000000e-01 -2.793786e-05 -8.000000e-01 -2.816108e-05 -9.000000e-01 -2.833329e-05 -1.000000e+00 -2.848256e-05 -1.100000e+00 -2.861857e-05 -1.200000e+00 -2.874567e-05 -1.000000e-01 -9.724471e-06 -2.000000e-01 -1.778983e-05 -3.000000e-01 -2.422258e-05 -4.000000e-01 -2.905355e-05 -5.000000e-01 -3.233151e-05 -6.000000e-01 -3.418867e-05 -7.000000e-01 -3.502481e-05 -8.000000e-01 -3.541740e-05 -9.000000e-01 -3.567177e-05 -1.000000e+00 -3.587556e-05 -1.100000e+00 -3.605454e-05 -1.200000e+00 -3.621844e-05 -1.000000e-01 -1.069207e-05 -2.000000e-01 -1.977548e-05 -3.000000e-01 -2.727361e-05 -4.000000e-01 -3.321165e-05 -5.000000e-01 -3.762131e-05 -6.000000e-01 -4.056058e-05 -7.000000e-01 -4.219716e-05 -8.000000e-01 -4.296540e-05 -9.000000e-01 -4.337186e-05 -1.000000e+00 -4.365629e-05 -1.100000e+00 -4.389095e-05 -1.200000e+00 -4.409935e-05 -1.000000e-01 -7.791733e-11 -2.000000e-01 -8.048299e-11 -3.000000e-01 -8.213042e-11 -4.000000e-01 -8.367939e-11 -5.000000e-01 -8.527202e-11 -6.000000e-01 -8.700169e-11 -7.000000e-01 -8.897997e-11 -8.000000e-01 -9.136578e-11 -9.000000e-01 -9.439564e-11 -1.000000e+00 -9.842303e-11 -1.100000e+00 -1.039717e-10 -1.200000e+00 -1.118086e-10 -1.000000e-01 -2.317647e-09 -2.000000e-01 -2.389881e-09 -3.000000e-01 -2.433648e-09 -4.000000e-01 -2.472792e-09 -5.000000e-01 -2.510362e-09 -6.000000e-01 -2.547269e-09 -7.000000e-01 -2.583946e-09 -8.000000e-01 -2.620737e-09 -9.000000e-01 -2.658086e-09 -1.000000e+00 -2.696698e-09 -1.100000e+00 -2.737662e-09 -1.200000e+00 -2.782560e-09 -1.000000e-01 -4.501947e-08 -2.000000e-01 -4.642148e-08 -3.000000e-01 -4.720945e-08 -4.000000e-01 -4.789977e-08 -5.000000e-01 -4.855529e-08 -6.000000e-01 -4.919376e-08 -7.000000e-01 -4.982267e-08 -8.000000e-01 -5.044686e-08 -9.000000e-01 -5.107202e-08 -1.000000e+00 -5.170726e-08 -1.100000e+00 -5.236697e-08 -1.200000e+00 -5.307181e-08 -1.000000e-01 -5.452682e-07 -2.000000e-01 -5.686614e-07 -3.000000e-01 -5.775375e-07 -4.000000e-01 -5.846593e-07 -5.000000e-01 -5.912026e-07 -6.000000e-01 -5.974618e-07 -7.000000e-01 -6.035513e-07 -8.000000e-01 -6.095350e-07 -9.000000e-01 -6.154762e-07 -1.000000e+00 -6.214703e-07 -1.100000e+00 -6.276691e-07 -1.200000e+00 -6.342948e-07 -1.000000e-01 -3.122406e-06 -2.000000e-01 -3.571834e-06 -3.000000e-01 -3.642228e-06 -4.000000e-01 -3.682829e-06 -5.000000e-01 -3.716424e-06 -6.000000e-01 -3.747063e-06 -7.000000e-01 -3.776041e-06 -8.000000e-01 -3.803940e-06 -9.000000e-01 -3.831153e-06 -1.000000e+00 -3.858144e-06 -1.100000e+00 -3.885636e-06 -1.200000e+00 -3.914732e-06 -1.000000e-01 -7.841399e-06 -2.000000e-01 -1.079931e-05 -3.000000e-01 -1.133749e-05 -4.000000e-01 -1.149865e-05 -5.000000e-01 -1.160289e-05 -6.000000e-01 -1.168932e-05 -7.000000e-01 -1.176730e-05 -8.000000e-01 -1.184022e-05 -9.000000e-01 -1.190977e-05 -1.000000e+00 -1.197723e-05 -1.100000e+00 -1.204424e-05 -1.200000e+00 -1.211335e-05 -1.000000e-01 -1.344889e-05 -2.000000e-01 -2.098248e-05 -3.000000e-01 -2.368300e-05 -4.000000e-01 -2.433714e-05 -5.000000e-01 -2.461548e-05 -6.000000e-01 -2.480960e-05 -7.000000e-01 -2.497195e-05 -8.000000e-01 -2.511785e-05 -9.000000e-01 -2.525348e-05 -1.000000e+00 -2.538222e-05 -1.100000e+00 -2.550696e-05 -1.200000e+00 -2.563167e-05 -1.000000e-01 -1.963304e-05 -2.000000e-01 -3.266373e-05 -3.000000e-01 -3.960621e-05 -4.000000e-01 -4.204656e-05 -5.000000e-01 -4.282460e-05 -6.000000e-01 -4.323760e-05 -7.000000e-01 -4.354310e-05 -8.000000e-01 -4.380190e-05 -9.000000e-01 -4.403470e-05 -1.000000e+00 -4.425072e-05 -1.100000e+00 -4.445554e-05 -1.200000e+00 -4.465474e-05 -1.000000e-01 -2.643123e-05 -2.000000e-01 -4.561116e-05 -3.000000e-01 -5.795167e-05 -4.000000e-01 -6.415751e-05 -5.000000e-01 -6.639344e-05 -6.000000e-01 -6.730556e-05 -7.000000e-01 -6.786754e-05 -8.000000e-01 -6.830323e-05 -9.000000e-01 -6.867751e-05 -1.000000e+00 -6.901541e-05 -1.100000e+00 -6.932924e-05 -1.200000e+00 -6.962758e-05 -1.000000e-01 -3.399140e-05 -2.000000e-01 -6.002916e-05 -3.000000e-01 -7.853458e-05 -4.000000e-01 -8.995883e-05 -5.000000e-01 -9.536738e-05 -6.000000e-01 -9.747602e-05 -7.000000e-01 -9.853363e-05 -8.000000e-01 -9.925762e-05 -9.000000e-01 -9.984071e-05 -1.000000e+00 -1.003486e-04 -1.100000e+00 -1.008095e-04 -1.200000e+00 -1.012390e-04 -1.000000e-01 -4.254279e-05 -2.000000e-01 -7.631723e-05 -3.000000e-01 -1.017904e-04 -4.000000e-01 -1.193855e-04 -5.000000e-01 -1.296419e-04 -6.000000e-01 -1.342746e-04 -7.000000e-01 -1.363306e-04 -8.000000e-01 -1.375453e-04 -9.000000e-01 -1.384438e-04 -1.000000e+00 -1.391905e-04 -1.100000e+00 -1.398496e-04 -1.200000e+00 -1.404516e-04 -1.000000e-01 -5.241613e-05 -2.000000e-01 -9.507353e-05 -3.000000e-01 -1.285104e-04 -4.000000e-01 -1.531921e-04 -5.000000e-01 -1.695179e-04 -6.000000e-01 -1.783194e-04 -7.000000e-01 -1.822897e-04 -8.000000e-01 -1.843549e-04 -9.000000e-01 -1.857382e-04 -1.000000e+00 -1.868236e-04 -1.100000e+00 -1.877499e-04 -1.200000e+00 -1.885778e-04 -1.000000e-01 -2.765498e-09 -2.000000e-01 -2.874091e-09 -3.000000e-01 -2.915188e-09 -4.000000e-01 -2.949057e-09 -5.000000e-01 -2.980718e-09 -6.000000e-01 -3.011411e-09 -7.000000e-01 -3.041681e-09 -8.000000e-01 -3.071939e-09 -9.000000e-01 -3.102697e-09 -1.000000e+00 -3.134753e-09 -1.100000e+00 -3.169360e-09 -1.200000e+00 -3.208362e-09 -1.000000e-01 -1.565703e-08 -2.000000e-01 -1.631978e-08 -3.000000e-01 -1.655089e-08 -4.000000e-01 -1.673789e-08 -5.000000e-01 -1.691128e-08 -6.000000e-01 -1.707808e-08 -7.000000e-01 -1.724100e-08 -8.000000e-01 -1.740162e-08 -9.000000e-01 -1.756167e-08 -1.000000e+00 -1.772396e-08 -1.100000e+00 -1.789299e-08 -1.200000e+00 -1.807547e-08 -1.000000e-01 -8.017046e-08 -2.000000e-01 -8.493660e-08 -3.000000e-01 -8.616626e-08 -4.000000e-01 -8.709923e-08 -5.000000e-01 -8.794867e-08 -6.000000e-01 -8.875889e-08 -7.000000e-01 -8.954553e-08 -8.000000e-01 -9.031686e-08 -9.000000e-01 -9.108077e-08 -1.000000e+00 -9.184956e-08 -1.100000e+00 -9.264349e-08 -1.200000e+00 -9.349307e-08 -1.000000e-01 -3.218684e-07 -2.000000e-01 -3.688113e-07 -3.000000e-01 -3.754564e-07 -4.000000e-01 -3.793924e-07 -5.000000e-01 -3.827664e-07 -6.000000e-01 -3.859109e-07 -7.000000e-01 -3.889248e-07 -8.000000e-01 -3.918522e-07 -9.000000e-01 -3.947247e-07 -1.000000e+00 -3.975847e-07 -1.100000e+00 -4.005027e-07 -1.200000e+00 -4.035892e-07 -1.000000e-01 -8.077612e-07 -2.000000e-01 -1.102899e-06 -3.000000e-01 -1.150799e-06 -4.000000e-01 -1.164962e-06 -5.000000e-01 -1.174892e-06 -6.000000e-01 -1.183601e-06 -7.000000e-01 -1.191726e-06 -8.000000e-01 -1.199491e-06 -9.000000e-01 -1.207006e-06 -1.000000e+00 -1.214372e-06 -1.100000e+00 -1.221736e-06 -1.200000e+00 -1.229347e-06 -1.000000e-01 -1.371070e-06 -2.000000e-01 -2.153351e-06 -3.000000e-01 -2.435071e-06 -4.000000e-01 -2.496504e-06 -5.000000e-01 -2.521475e-06 -6.000000e-01 -2.539979e-06 -7.000000e-01 -2.556291e-06 -8.000000e-01 -2.571473e-06 -9.000000e-01 -2.585924e-06 -1.000000e+00 -2.599861e-06 -1.100000e+00 -2.613504e-06 -1.200000e+00 -2.627193e-06 -1.000000e-01 -1.876133e-06 -2.000000e-01 -3.164239e-06 -3.000000e-01 -3.886558e-06 -4.000000e-01 -4.152983e-06 -5.000000e-01 -4.227050e-06 -6.000000e-01 -4.263400e-06 -7.000000e-01 -4.291373e-06 -8.000000e-01 -4.316172e-06 -9.000000e-01 -4.339237e-06 -1.000000e+00 -4.361143e-06 -1.100000e+00 -4.382232e-06 -1.200000e+00 -4.402876e-06 -1.000000e-01 -2.293803e-06 -2.000000e-01 -4.022045e-06 -3.000000e-01 -5.194054e-06 -4.000000e-01 -5.839540e-06 -5.000000e-01 -6.084621e-06 -6.000000e-01 -6.167508e-06 -7.000000e-01 -6.214300e-06 -8.000000e-01 -6.251585e-06 -9.000000e-01 -6.284905e-06 -1.000000e+00 -6.315941e-06 -1.100000e+00 -6.345407e-06 -1.200000e+00 -6.373768e-06 -1.000000e-01 -2.634197e-06 -2.000000e-01 -4.731779e-06 -3.000000e-01 -6.298423e-06 -4.000000e-01 -7.345286e-06 -5.000000e-01 -7.910860e-06 -6.000000e-01 -8.133198e-06 -7.000000e-01 -8.222106e-06 -8.000000e-01 -8.278124e-06 -9.000000e-01 -8.324183e-06 -1.000000e+00 -8.365711e-06 -1.100000e+00 -8.404499e-06 -1.200000e+00 -8.441357e-06 -1.000000e-01 -2.912206e-06 -2.000000e-01 -5.318166e-06 -3.000000e-01 -7.221984e-06 -4.000000e-01 -8.629693e-06 -5.000000e-01 -9.555021e-06 -6.000000e-01 -1.004619e-05 -7.000000e-01 -1.024818e-05 -8.000000e-01 -1.034165e-05 -9.000000e-01 -1.040584e-05 -1.000000e+00 -1.046004e-05 -1.100000e+00 -1.050935e-05 -1.200000e+00 -1.055554e-05 -1.000000e-01 -3.139942e-06 -2.000000e-01 -5.803478e-06 -3.000000e-01 -7.993816e-06 -4.000000e-01 -9.715003e-06 -5.000000e-01 -1.097375e-05 -6.000000e-01 -1.178711e-05 -7.000000e-01 -1.221326e-05 -8.000000e-01 -1.239870e-05 -9.000000e-01 -1.249605e-05 -1.000000e+00 -1.256755e-05 -1.100000e+00 -1.262929e-05 -1.200000e+00 -1.268588e-05 -1.000000e-01 -3.326563e-06 -2.000000e-01 -6.205216e-06 -3.000000e-01 -8.638564e-06 -4.000000e-01 -1.062964e-05 -5.000000e-01 -1.218260e-05 -6.000000e-01 -1.330517e-05 -7.000000e-01 -1.401841e-05 -8.000000e-01 -1.438987e-05 -9.000000e-01 -1.456254e-05 -1.000000e+00 -1.466344e-05 -1.100000e+00 -1.474154e-05 -1.200000e+00 -1.481021e-05 ngspice-26/tests/bsim4/pmos/reference/dcSweep_sca.standard0000644000265600020320000002751212264261473023276 0ustar andreasadminV(d) I(d) -1.000000e-01 -3.541335e-07 -2.000000e-01 -6.742480e-07 -3.000000e-01 -1.232459e-06 -4.000000e-01 -2.209791e-06 -5.000000e-01 -3.900076e-06 -6.000000e-01 -6.781883e-06 -7.000000e-01 -1.161965e-05 -8.000000e-01 -1.960035e-05 -9.000000e-01 -3.249631e-05 -1.000000e+00 -5.282650e-05 -1.100000e+00 -8.398240e-05 -1.200000e+00 -1.303190e-04 -1.000000e-01 -3.858549e-06 -2.000000e-01 -6.996373e-06 -3.000000e-01 -1.211623e-05 -4.000000e-01 -2.048810e-05 -5.000000e-01 -3.387613e-05 -6.000000e-01 -5.463325e-05 -7.000000e-01 -8.561888e-05 -8.000000e-01 -1.299431e-04 -9.000000e-01 -1.906164e-04 -1.000000e+00 -2.702893e-04 -1.100000e+00 -3.712899e-04 -1.200000e+00 -4.960773e-04 -1.000000e-01 -3.209008e-05 -2.000000e-01 -5.455120e-05 -3.000000e-01 -8.615950e-05 -4.000000e-01 -1.304125e-04 -5.000000e-01 -1.898944e-04 -6.000000e-01 -2.665336e-04 -7.000000e-01 -3.614836e-04 -8.000000e-01 -4.751461e-04 -9.000000e-01 -6.073720e-04 -1.000000e+00 -7.578554e-04 -1.100000e+00 -9.267393e-04 -1.200000e+00 -1.115433e-03 -1.000000e-01 -1.563742e-04 -2.000000e-01 -2.479573e-04 -3.000000e-01 -3.424664e-04 -4.000000e-01 -4.518327e-04 -5.000000e-01 -5.772407e-04 -6.000000e-01 -7.184719e-04 -7.000000e-01 -8.748805e-04 -8.000000e-01 -1.045668e-03 -9.000000e-01 -1.230067e-03 -1.000000e+00 -1.427614e-03 -1.100000e+00 -1.638664e-03 -1.200000e+00 -1.865186e-03 -1.000000e-01 -3.776462e-04 -2.000000e-01 -6.148458e-04 -3.000000e-01 -7.902944e-04 -4.000000e-01 -9.611291e-04 -5.000000e-01 -1.139648e-03 -6.000000e-01 -1.328107e-03 -7.000000e-01 -1.526868e-03 -8.000000e-01 -1.735778e-03 -9.000000e-01 -1.954544e-03 -1.000000e+00 -2.183037e-03 -1.100000e+00 -2.421803e-03 -1.200000e+00 -2.672960e-03 -1.000000e-01 -6.062105e-04 -2.000000e-01 -1.033623e-03 -3.000000e-01 -1.326937e-03 -4.000000e-01 -1.562477e-03 -5.000000e-01 -1.786875e-03 -6.000000e-01 -2.012984e-03 -7.000000e-01 -2.244449e-03 -8.000000e-01 -2.482498e-03 -9.000000e-01 -2.727549e-03 -1.000000e+00 -2.979810e-03 -1.100000e+00 -3.239870e-03 -1.200000e+00 -3.509654e-03 -1.000000e-01 -8.083546e-04 -2.000000e-01 -1.420903e-03 -3.000000e-01 -1.866442e-03 -4.000000e-01 -2.193074e-03 -5.000000e-01 -2.469586e-03 -6.000000e-01 -2.732637e-03 -7.000000e-01 -2.993965e-03 -8.000000e-01 -3.257677e-03 -9.000000e-01 -3.525448e-03 -1.000000e+00 -3.798071e-03 -1.100000e+00 -4.076268e-03 -1.200000e+00 -4.361689e-03 -1.000000e-01 -9.823244e-04 -2.000000e-01 -1.761767e-03 -3.000000e-01 -2.363024e-03 -4.000000e-01 -2.811792e-03 -5.000000e-01 -3.159430e-03 -6.000000e-01 -3.465382e-03 -7.000000e-01 -3.757673e-03 -8.000000e-01 -4.046337e-03 -9.000000e-01 -4.335399e-03 -1.000000e+00 -4.626720e-03 -1.100000e+00 -4.921420e-03 -1.200000e+00 -5.220982e-03 -1.000000e-01 -1.132064e-03 -2.000000e-01 -2.059615e-03 -3.000000e-01 -2.805538e-03 -4.000000e-01 -3.388380e-03 -5.000000e-01 -3.833281e-03 -6.000000e-01 -4.195454e-03 -7.000000e-01 -4.523495e-03 -8.000000e-01 -4.838541e-03 -9.000000e-01 -5.148942e-03 -1.000000e+00 -5.458420e-03 -1.100000e+00 -5.768911e-03 -1.200000e+00 -6.081994e-03 -1.000000e-01 -1.261549e-03 -2.000000e-01 -2.320156e-03 -3.000000e-01 -3.197100e-03 -4.000000e-01 -3.909202e-03 -5.000000e-01 -4.469439e-03 -6.000000e-01 -4.908152e-03 -7.000000e-01 -5.281386e-03 -8.000000e-01 -5.626614e-03 -9.000000e-01 -5.959803e-03 -1.000000e+00 -6.287852e-03 -1.100000e+00 -6.614121e-03 -1.200000e+00 -6.940674e-03 -1.000000e-01 -1.374083e-03 -2.000000e-01 -2.548730e-03 -3.000000e-01 -3.543604e-03 -4.000000e-01 -4.374670e-03 -5.000000e-01 -5.052562e-03 -6.000000e-01 -5.588105e-03 -7.000000e-01 -6.021514e-03 -8.000000e-01 -6.403804e-03 -9.000000e-01 -6.762851e-03 -1.000000e+00 -7.110856e-03 -1.100000e+00 -7.453526e-03 -1.200000e+00 -7.793932e-03 -1.000000e-01 -1.472352e-03 -2.000000e-01 -2.749945e-03 -3.000000e-01 -3.850852e-03 -4.000000e-01 -4.790158e-03 -5.000000e-01 -5.578654e-03 -6.000000e-01 -6.220954e-03 -7.000000e-01 -6.733108e-03 -8.000000e-01 -7.163330e-03 -9.000000e-01 -7.553400e-03 -1.000000e+00 -7.923886e-03 -1.100000e+00 -8.284260e-03 -1.200000e+00 -8.639303e-03 -1.000000e-01 -7.820708e-08 -2.000000e-01 -1.759983e-07 -3.000000e-01 -3.783203e-07 -4.000000e-01 -7.898739e-07 -5.000000e-01 -1.602568e-06 -6.000000e-01 -3.156170e-06 -7.000000e-01 -6.033149e-06 -8.000000e-01 -1.120982e-05 -9.000000e-01 -2.029228e-05 -1.000000e+00 -3.584893e-05 -1.100000e+00 -6.179230e-05 -1.200000e+00 -1.036885e-04 -1.000000e-01 -1.945306e-06 -2.000000e-01 -3.936693e-06 -3.000000e-01 -7.522670e-06 -4.000000e-01 -1.388720e-05 -5.000000e-01 -2.490408e-05 -6.000000e-01 -4.340923e-05 -7.000000e-01 -7.331033e-05 -8.000000e-01 -1.193204e-04 -9.000000e-01 -1.862531e-04 -1.000000e+00 -2.782085e-04 -1.100000e+00 -3.982494e-04 -1.200000e+00 -5.489755e-04 -1.000000e-01 -2.841421e-05 -2.000000e-01 -5.139419e-05 -3.000000e-01 -8.687981e-05 -4.000000e-01 -1.399069e-04 -5.000000e-01 -2.146892e-04 -6.000000e-01 -3.139884e-04 -7.000000e-01 -4.386988e-04 -8.000000e-01 -5.880531e-04 -9.000000e-01 -7.603199e-04 -1.000000e+00 -9.537763e-04 -1.100000e+00 -1.167822e-03 -1.200000e+00 -1.404168e-03 -1.000000e-01 -2.173380e-04 -2.000000e-01 -3.396259e-04 -3.000000e-01 -4.759078e-04 -4.000000e-01 -6.333068e-04 -5.000000e-01 -8.108329e-04 -6.000000e-01 -1.006342e-03 -7.000000e-01 -1.217554e-03 -8.000000e-01 -1.442416e-03 -9.000000e-01 -1.679372e-03 -1.000000e+00 -1.927827e-03 -1.100000e+00 -2.188941e-03 -1.200000e+00 -2.466712e-03 -1.000000e-01 -6.699868e-04 -2.000000e-01 -9.944840e-04 -3.000000e-01 -1.238488e-03 -4.000000e-01 -1.477247e-03 -5.000000e-01 -1.721065e-03 -6.000000e-01 -1.971643e-03 -7.000000e-01 -2.229010e-03 -8.000000e-01 -2.492804e-03 -9.000000e-01 -2.762762e-03 -1.000000e+00 -3.039317e-03 -1.100000e+00 -3.324586e-03 -1.200000e+00 -3.623732e-03 -1.000000e-01 -1.182769e-03 -2.000000e-01 -1.821001e-03 -3.000000e-01 -2.188648e-03 -4.000000e-01 -2.491060e-03 -5.000000e-01 -2.779079e-03 -6.000000e-01 -3.064059e-03 -7.000000e-01 -3.349554e-03 -8.000000e-01 -3.636925e-03 -9.000000e-01 -3.926880e-03 -1.000000e+00 -4.220413e-03 -1.100000e+00 -4.520028e-03 -1.200000e+00 -4.831373e-03 -1.000000e-01 -1.655040e-03 -2.000000e-01 -2.655796e-03 -3.000000e-01 -3.206164e-03 -4.000000e-01 -3.580665e-03 -5.000000e-01 -3.908503e-03 -6.000000e-01 -4.220998e-03 -7.000000e-01 -4.527605e-03 -8.000000e-01 -4.832047e-03 -9.000000e-01 -5.136159e-03 -1.000000e+00 -5.441457e-03 -1.100000e+00 -5.750631e-03 -1.200000e+00 -6.069452e-03 -1.000000e-01 -2.078094e-03 -2.000000e-01 -3.436940e-03 -3.000000e-01 -4.230135e-03 -4.000000e-01 -4.702571e-03 -5.000000e-01 -5.074524e-03 -6.000000e-01 -5.413380e-03 -7.000000e-01 -5.738481e-03 -8.000000e-01 -6.057057e-03 -9.000000e-01 -6.372462e-03 -1.000000e+00 -6.686872e-03 -1.100000e+00 -7.003133e-03 -1.200000e+00 -7.326927e-03 -1.000000e-01 -2.458923e-03 -2.000000e-01 -4.154833e-03 -3.000000e-01 -5.223899e-03 -4.000000e-01 -5.831523e-03 -5.000000e-01 -6.257911e-03 -6.000000e-01 -6.625141e-03 -7.000000e-01 -6.968342e-03 -8.000000e-01 -7.299891e-03 -9.000000e-01 -7.625222e-03 -1.000000e+00 -7.947401e-03 -1.100000e+00 -8.269494e-03 -1.200000e+00 -8.596998e-03 -1.000000e-01 -2.805574e-03 -2.000000e-01 -4.816031e-03 -3.000000e-01 -6.167663e-03 -4.000000e-01 -6.949933e-03 -5.000000e-01 -7.446387e-03 -6.000000e-01 -7.846296e-03 -7.000000e-01 -8.208562e-03 -8.000000e-01 -8.552940e-03 -9.000000e-01 -8.887670e-03 -1.000000e+00 -9.217001e-03 -1.100000e+00 -9.544354e-03 -1.200000e+00 -9.875026e-03 -1.000000e-01 -3.125008e-03 -2.000000e-01 -5.429843e-03 -3.000000e-01 -7.056144e-03 -4.000000e-01 -8.044540e-03 -5.000000e-01 -8.631191e-03 -6.000000e-01 -9.070028e-03 -7.000000e-01 -9.453263e-03 -8.000000e-01 -9.810953e-03 -9.000000e-01 -1.015505e-02 -1.000000e+00 -1.049134e-02 -1.100000e+00 -1.082377e-02 -1.200000e+00 -1.115749e-02 -1.000000e-01 -3.422939e-03 -2.000000e-01 -6.004995e-03 -3.000000e-01 -7.893110e-03 -4.000000e-01 -9.105876e-03 -5.000000e-01 -9.805498e-03 -6.000000e-01 -1.029123e-02 -7.000000e-01 -1.069804e-02 -8.000000e-01 -1.106993e-02 -9.000000e-01 -1.142367e-02 -1.000000e+00 -1.176697e-02 -1.100000e+00 -1.210452e-02 -1.200000e+00 -1.244141e-02 -1.000000e-01 -1.295242e-06 -2.000000e-01 -2.154844e-06 -3.000000e-01 -3.439103e-06 -4.000000e-01 -5.422121e-06 -5.000000e-01 -8.477006e-06 -6.000000e-01 -1.315228e-05 -7.000000e-01 -2.024118e-05 -8.000000e-01 -3.085901e-05 -9.000000e-01 -4.652323e-05 -1.000000e+00 -6.923357e-05 -1.100000e+00 -1.015632e-04 -1.200000e+00 -1.467946e-04 -1.000000e-01 -6.953713e-06 -2.000000e-01 -1.139010e-05 -3.000000e-01 -1.771926e-05 -4.000000e-01 -2.707976e-05 -5.000000e-01 -4.074469e-05 -6.000000e-01 -6.028804e-05 -7.000000e-01 -8.755610e-05 -8.000000e-01 -1.245753e-04 -9.000000e-01 -1.734322e-04 -1.000000e+00 -2.361915e-04 -1.100000e+00 -3.149432e-04 -1.200000e+00 -4.120581e-04 -1.000000e-01 -3.172240e-05 -2.000000e-01 -5.130537e-05 -3.000000e-01 -7.544718e-05 -4.000000e-01 -1.075327e-04 -5.000000e-01 -1.493410e-04 -6.000000e-01 -2.023970e-04 -7.000000e-01 -2.679694e-04 -8.000000e-01 -3.470291e-04 -9.000000e-01 -4.402627e-04 -1.000000e+00 -5.481905e-04 -1.100000e+00 -6.714388e-04 -1.200000e+00 -8.112071e-04 -1.000000e-01 -9.878949e-05 -2.000000e-01 -1.640952e-04 -3.000000e-01 -2.237446e-04 -4.000000e-01 -2.920406e-04 -5.000000e-01 -3.713926e-04 -6.000000e-01 -4.624976e-04 -7.000000e-01 -5.656436e-04 -8.000000e-01 -6.809251e-04 -9.000000e-01 -8.083381e-04 -1.000000e+00 -9.478969e-04 -1.100000e+00 -1.099866e-03 -1.200000e+00 -1.265193e-03 -1.000000e-01 -1.947375e-04 -2.000000e-01 -3.424718e-04 -3.000000e-01 -4.553870e-04 -4.000000e-01 -5.610075e-04 -5.000000e-01 -6.726264e-04 -6.000000e-01 -7.930831e-04 -7.000000e-01 -9.231344e-04 -8.000000e-01 -1.063063e-03 -9.000000e-01 -1.212997e-03 -1.000000e+00 -1.373036e-03 -1.100000e+00 -1.543426e-03 -1.200000e+00 -1.724927e-03 -1.000000e-01 -2.869113e-04 -2.000000e-01 -5.220775e-04 -3.000000e-01 -7.078047e-04 -4.000000e-01 -8.588065e-04 -5.000000e-01 -9.999453e-04 -6.000000e-01 -1.143961e-03 -7.000000e-01 -1.294499e-03 -8.000000e-01 -1.452820e-03 -9.000000e-01 -1.619505e-03 -1.000000e+00 -1.794886e-03 -1.100000e+00 -1.979250e-03 -1.200000e+00 -2.173146e-03 -1.000000e-01 -3.630578e-04 -2.000000e-01 -6.735097e-04 -3.000000e-01 -9.319109e-04 -4.000000e-01 -1.142634e-03 -5.000000e-01 -1.321345e-03 -6.000000e-01 -1.489850e-03 -7.000000e-01 -1.659482e-03 -8.000000e-01 -1.834138e-03 -9.000000e-01 -2.015380e-03 -1.000000e+00 -2.203983e-03 -1.100000e+00 -2.400411e-03 -1.200000e+00 -2.605119e-03 -1.000000e-01 -4.237854e-04 -2.000000e-01 -7.963406e-04 -3.000000e-01 -1.117935e-03 -4.000000e-01 -1.390016e-03 -5.000000e-01 -1.618313e-03 -6.000000e-01 -1.818658e-03 -7.000000e-01 -2.009650e-03 -8.000000e-01 -2.200906e-03 -9.000000e-01 -2.396187e-03 -1.000000e+00 -2.597164e-03 -1.100000e+00 -2.804713e-03 -1.200000e+00 -3.019396e-03 -1.000000e-01 -4.722514e-04 -2.000000e-01 -8.957914e-04 -3.000000e-01 -1.270781e-03 -4.000000e-01 -1.597853e-03 -5.000000e-01 -1.879028e-03 -6.000000e-01 -2.121089e-03 -7.000000e-01 -2.339401e-03 -8.000000e-01 -2.549517e-03 -9.000000e-01 -2.759477e-03 -1.000000e+00 -2.972748e-03 -1.100000e+00 -3.191005e-03 -1.200000e+00 -3.415170e-03 -1.000000e-01 -5.111798e-04 -2.000000e-01 -9.766447e-04 -3.000000e-01 -1.396465e-03 -4.000000e-01 -1.770951e-03 -5.000000e-01 -2.100945e-03 -6.000000e-01 -2.388968e-03 -7.000000e-01 -2.642628e-03 -8.000000e-01 -2.876332e-03 -9.000000e-01 -3.102961e-03 -1.000000e+00 -3.329231e-03 -1.100000e+00 -3.558289e-03 -1.200000e+00 -3.791752e-03 -1.000000e-01 -5.425722e-04 -2.000000e-01 -1.042548e-03 -3.000000e-01 -1.499913e-03 -4.000000e-01 -1.914802e-03 -5.000000e-01 -2.287601e-03 -6.000000e-01 -2.619332e-03 -7.000000e-01 -2.913018e-03 -8.000000e-01 -3.176843e-03 -9.000000e-01 -3.423939e-03 -1.000000e+00 -3.664947e-03 -1.100000e+00 -3.905517e-03 -1.200000e+00 -4.148482e-03 -1.000000e-01 -5.678986e-04 -2.000000e-01 -1.096260e-03 -3.000000e-01 -1.585001e-03 -4.000000e-01 -2.034136e-03 -5.000000e-01 -2.443825e-03 -6.000000e-01 -2.814518e-03 -7.000000e-01 -3.147435e-03 -8.000000e-01 -3.446110e-03 -9.000000e-01 -3.719019e-03 -1.000000e+00 -3.977878e-03 -1.100000e+00 -4.231496e-03 -1.200000e+00 -4.484670e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw8.standard0000644000265600020320000002751212264261473023242 0ustar andreasadminV(d) I(d) -1.000000e-01 -1.909578e-09 -2.000000e-01 -2.112148e-09 -3.000000e-01 -2.289747e-09 -4.000000e-01 -2.472068e-09 -5.000000e-01 -2.663889e-09 -6.000000e-01 -2.867362e-09 -7.000000e-01 -3.084067e-09 -8.000000e-01 -3.315620e-09 -9.000000e-01 -3.564226e-09 -1.000000e+00 -3.833387e-09 -1.100000e+00 -4.128706e-09 -1.200000e+00 -4.458725e-09 -1.000000e-01 -2.290954e-08 -2.000000e-01 -2.525003e-08 -3.000000e-01 -2.725904e-08 -4.000000e-01 -2.930300e-08 -5.000000e-01 -3.143773e-08 -6.000000e-01 -3.368630e-08 -7.000000e-01 -3.606406e-08 -8.000000e-01 -3.858580e-08 -9.000000e-01 -4.127185e-08 -1.000000e+00 -4.415563e-08 -1.100000e+00 -4.729209e-08 -1.200000e+00 -5.076579e-08 -1.000000e-01 -2.224797e-07 -2.000000e-01 -2.451120e-07 -3.000000e-01 -2.631904e-07 -4.000000e-01 -2.812619e-07 -5.000000e-01 -2.999215e-07 -6.000000e-01 -3.193840e-07 -7.000000e-01 -3.397747e-07 -8.000000e-01 -3.612029e-07 -9.000000e-01 -3.838170e-07 -1.000000e+00 -4.078700e-07 -1.100000e+00 -4.337913e-07 -1.200000e+00 -4.622533e-07 -1.000000e-01 -1.538412e-06 -2.000000e-01 -1.741096e-06 -3.000000e-01 -1.853994e-06 -4.000000e-01 -1.959756e-06 -5.000000e-01 -2.065513e-06 -6.000000e-01 -2.173158e-06 -7.000000e-01 -2.283506e-06 -8.000000e-01 -2.397073e-06 -9.000000e-01 -2.514442e-06 -1.000000e+00 -2.636646e-06 -1.100000e+00 -2.765581e-06 -1.200000e+00 -2.904382e-06 -1.000000e-01 -5.344429e-06 -2.000000e-01 -6.902034e-06 -3.000000e-01 -7.350351e-06 -4.000000e-01 -7.679298e-06 -5.000000e-01 -7.984827e-06 -6.000000e-01 -8.283562e-06 -7.000000e-01 -8.580979e-06 -8.000000e-01 -8.879611e-06 -9.000000e-01 -9.181209e-06 -1.000000e+00 -9.488086e-06 -1.100000e+00 -9.804496e-06 -1.200000e+00 -1.013795e-05 -1.000000e-01 -1.036014e-05 -2.000000e-01 -1.560589e-05 -3.000000e-01 -1.735988e-05 -4.000000e-01 -1.812756e-05 -5.000000e-01 -1.872273e-05 -6.000000e-01 -1.926728e-05 -7.000000e-01 -1.979057e-05 -8.000000e-01 -2.030363e-05 -9.000000e-01 -2.081200e-05 -1.000000e+00 -2.131995e-05 -1.100000e+00 -2.183357e-05 -1.200000e+00 -2.236383e-05 -1.000000e-01 -1.523874e-05 -2.000000e-01 -2.500121e-05 -3.000000e-01 -2.991898e-05 -4.000000e-01 -3.185497e-05 -5.000000e-01 -3.292473e-05 -6.000000e-01 -3.378381e-05 -7.000000e-01 -3.456550e-05 -8.000000e-01 -3.530955e-05 -9.000000e-01 -3.603251e-05 -1.000000e+00 -3.674342e-05 -1.100000e+00 -3.745025e-05 -1.200000e+00 -3.816525e-05 -1.000000e-01 -1.966074e-05 -2.000000e-01 -3.377286e-05 -3.000000e-01 -4.270555e-05 -4.000000e-01 -4.724213e-05 -5.000000e-01 -4.933297e-05 -6.000000e-01 -5.067342e-05 -7.000000e-01 -5.178276e-05 -8.000000e-01 -5.279329e-05 -9.000000e-01 -5.375111e-05 -1.000000e+00 -5.467715e-05 -1.100000e+00 -5.558408e-05 -1.200000e+00 -5.648492e-05 -1.000000e-01 -2.361687e-05 -2.000000e-01 -4.172715e-05 -3.000000e-01 -5.462430e-05 -4.000000e-01 -6.269512e-05 -5.000000e-01 -6.689775e-05 -6.000000e-01 -6.913268e-05 -7.000000e-01 -7.071578e-05 -8.000000e-01 -7.205929e-05 -9.000000e-01 -7.328819e-05 -1.000000e+00 -7.445156e-05 -1.100000e+00 -7.557359e-05 -1.200000e+00 -7.667085e-05 -1.000000e-01 -2.715085e-05 -2.000000e-01 -4.889391e-05 -3.000000e-01 -6.548520e-05 -4.000000e-01 -7.719815e-05 -5.000000e-01 -8.446709e-05 -6.000000e-01 -8.841852e-05 -7.000000e-01 -9.079252e-05 -8.000000e-01 -9.259452e-05 -9.000000e-01 -9.415557e-05 -1.000000e+00 -9.559088e-05 -1.100000e+00 -9.695023e-05 -1.200000e+00 -9.826031e-05 -1.000000e-01 -3.030985e-05 -2.000000e-01 -5.534118e-05 -3.000000e-01 -7.532355e-05 -4.000000e-01 -9.048539e-05 -5.000000e-01 -1.010940e-04 -6.000000e-01 -1.076629e-04 -7.000000e-01 -1.114456e-04 -8.000000e-01 -1.139540e-04 -9.000000e-01 -1.159546e-04 -1.000000e+00 -1.177170e-04 -1.100000e+00 -1.193462e-04 -1.200000e+00 -1.208912e-04 -1.000000e-01 -3.313705e-05 -2.000000e-01 -6.114109e-05 -3.000000e-01 -8.422007e-05 -4.000000e-01 -1.025759e-04 -5.000000e-01 -1.164176e-04 -6.000000e-01 -1.260222e-04 -7.000000e-01 -1.320095e-04 -8.000000e-01 -1.356915e-04 -9.000000e-01 -1.383289e-04 -1.000000e+00 -1.405105e-04 -1.100000e+00 -1.424591e-04 -1.200000e+00 -1.442697e-04 -1.000000e-01 -2.871943e-10 -2.000000e-01 -3.232690e-10 -3.000000e-01 -3.575143e-10 -4.000000e-01 -3.937609e-10 -5.000000e-01 -4.328849e-10 -6.000000e-01 -4.754263e-10 -7.000000e-01 -5.218874e-10 -8.000000e-01 -5.728480e-10 -9.000000e-01 -6.290884e-10 -1.000000e+00 -6.917588e-10 -1.100000e+00 -7.625913e-10 -1.200000e+00 -8.441491e-10 -1.000000e-01 -8.511226e-09 -2.000000e-01 -9.513992e-09 -3.000000e-01 -1.044575e-08 -4.000000e-01 -1.141841e-08 -5.000000e-01 -1.245451e-08 -6.000000e-01 -1.356551e-08 -7.000000e-01 -1.476034e-08 -8.000000e-01 -1.604827e-08 -9.000000e-01 -1.744164e-08 -1.000000e+00 -1.895944e-08 -1.100000e+00 -2.063147e-08 -1.200000e+00 -2.250268e-08 -1.000000e-01 -1.632800e-07 -2.000000e-01 -1.805648e-07 -3.000000e-01 -1.958026e-07 -4.000000e-01 -2.113472e-07 -5.000000e-01 -2.276112e-07 -6.000000e-01 -2.447701e-07 -7.000000e-01 -2.629412e-07 -8.000000e-01 -2.822376e-07 -9.000000e-01 -3.028148e-07 -1.000000e+00 -3.249270e-07 -1.100000e+00 -3.489895e-07 -1.200000e+00 -3.756392e-07 -1.000000e-01 -1.906572e-06 -2.000000e-01 -2.115611e-06 -3.000000e-01 -2.267354e-06 -4.000000e-01 -2.414715e-06 -5.000000e-01 -2.564286e-06 -6.000000e-01 -2.718148e-06 -7.000000e-01 -2.877299e-06 -8.000000e-01 -3.042468e-06 -9.000000e-01 -3.214595e-06 -1.000000e+00 -3.395362e-06 -1.100000e+00 -3.587755e-06 -1.200000e+00 -3.796569e-06 -1.000000e-01 -1.014571e-05 -2.000000e-01 -1.212658e-05 -3.000000e-01 -1.285244e-05 -4.000000e-01 -1.344417e-05 -5.000000e-01 -1.400318e-05 -6.000000e-01 -1.455243e-05 -7.000000e-01 -1.510038e-05 -8.000000e-01 -1.565123e-05 -9.000000e-01 -1.620843e-05 -1.000000e+00 -1.677722e-05 -1.100000e+00 -1.736716e-05 -1.200000e+00 -1.799436e-05 -1.000000e-01 -2.408957e-05 -2.000000e-01 -3.347873e-05 -3.000000e-01 -3.609126e-05 -4.000000e-01 -3.750334e-05 -5.000000e-01 -3.866338e-05 -6.000000e-01 -3.973282e-05 -7.000000e-01 -4.075990e-05 -8.000000e-01 -4.176478e-05 -9.000000e-01 -4.275881e-05 -1.000000e+00 -4.375295e-05 -1.100000e+00 -4.476471e-05 -1.200000e+00 -4.582420e-05 -1.000000e-01 -3.956118e-05 -2.000000e-01 -6.108634e-05 -3.000000e-01 -6.929329e-05 -4.000000e-01 -7.244075e-05 -5.000000e-01 -7.448525e-05 -6.000000e-01 -7.619421e-05 -7.000000e-01 -7.775638e-05 -8.000000e-01 -7.923974e-05 -9.000000e-01 -8.067620e-05 -1.000000e+00 -8.208704e-05 -1.100000e+00 -8.349756e-05 -1.200000e+00 -8.494969e-05 -1.000000e-01 -5.545414e-05 -2.000000e-01 -9.068156e-05 -3.000000e-01 -1.086991e-04 -4.000000e-01 -1.157426e-04 -5.000000e-01 -1.192829e-04 -6.000000e-01 -1.218590e-04 -7.000000e-01 -1.240621e-04 -8.000000e-01 -1.260783e-04 -9.000000e-01 -1.279850e-04 -1.000000e+00 -1.298241e-04 -1.100000e+00 -1.316311e-04 -1.200000e+00 -1.334575e-04 -1.000000e-01 -7.165790e-05 -2.000000e-01 -1.211813e-04 -3.000000e-01 -1.512605e-04 -4.000000e-01 -1.653564e-04 -5.000000e-01 -1.715529e-04 -6.000000e-01 -1.753832e-04 -7.000000e-01 -1.783927e-04 -8.000000e-01 -1.810249e-04 -9.000000e-01 -1.834472e-04 -1.000000e+00 -1.857393e-04 -1.100000e+00 -1.879542e-04 -1.200000e+00 -1.901527e-04 -1.000000e-01 -8.828028e-05 -2.000000e-01 -1.525561e-04 -3.000000e-01 -1.956213e-04 -4.000000e-01 -2.194755e-04 -5.000000e-01 -2.301159e-04 -6.000000e-01 -2.357998e-04 -7.000000e-01 -2.398489e-04 -8.000000e-01 -2.432071e-04 -9.000000e-01 -2.462031e-04 -1.000000e+00 -2.489809e-04 -1.100000e+00 -2.516217e-04 -1.200000e+00 -2.541995e-04 -1.000000e-01 -1.055044e-04 -2.000000e-01 -1.850539e-04 -3.000000e-01 -2.416577e-04 -4.000000e-01 -2.768613e-04 -5.000000e-01 -2.940035e-04 -6.000000e-01 -3.023655e-04 -7.000000e-01 -3.077555e-04 -8.000000e-01 -3.119721e-04 -9.000000e-01 -3.156085e-04 -1.000000e+00 -3.189082e-04 -1.100000e+00 -3.219955e-04 -1.200000e+00 -3.249637e-04 -1.000000e-01 -1.235615e-04 -2.000000e-01 -2.190483e-04 -3.000000e-01 -2.897286e-04 -4.000000e-01 -3.371172e-04 -5.000000e-01 -3.625076e-04 -6.000000e-01 -3.745067e-04 -7.000000e-01 -3.815828e-04 -8.000000e-01 -3.868003e-04 -9.000000e-01 -3.911447e-04 -1.000000e+00 -3.950011e-04 -1.100000e+00 -3.985537e-04 -1.200000e+00 -4.019230e-04 -1.000000e-01 -9.811573e-09 -2.000000e-01 -1.075826e-08 -3.000000e-01 -1.146470e-08 -4.000000e-01 -1.216637e-08 -5.000000e-01 -1.288806e-08 -6.000000e-01 -1.363813e-08 -7.000000e-01 -1.442142e-08 -8.000000e-01 -1.524228e-08 -9.000000e-01 -1.610672e-08 -1.000000e+00 -1.702519e-08 -1.100000e+00 -1.801554e-08 -1.200000e+00 -1.910575e-08 -1.000000e-01 -5.541807e-08 -2.000000e-01 -6.086378e-08 -3.000000e-01 -6.474285e-08 -4.000000e-01 -6.856484e-08 -5.000000e-01 -7.247839e-08 -6.000000e-01 -7.653087e-08 -7.000000e-01 -8.074817e-08 -8.000000e-01 -8.515214e-08 -9.000000e-01 -8.977280e-08 -1.000000e+00 -9.466279e-08 -1.100000e+00 -9.991339e-08 -1.200000e+00 -1.056689e-07 -1.000000e-01 -2.816308e-07 -2.000000e-01 -3.142424e-07 -3.000000e-01 -3.336507e-07 -4.000000e-01 -3.523170e-07 -5.000000e-01 -3.712361e-07 -6.000000e-01 -3.906799e-07 -7.000000e-01 -4.107786e-07 -8.000000e-01 -4.316277e-07 -9.000000e-01 -4.533486e-07 -1.000000e+00 -4.761565e-07 -1.100000e+00 -5.004370e-07 -1.200000e+00 -5.268157e-07 -1.000000e-01 -1.109383e-06 -2.000000e-01 -1.337165e-06 -3.000000e-01 -1.417647e-06 -4.000000e-01 -1.487570e-06 -5.000000e-01 -1.556263e-06 -6.000000e-01 -1.625501e-06 -7.000000e-01 -1.695938e-06 -8.000000e-01 -1.767930e-06 -9.000000e-01 -1.841813e-06 -1.000000e+00 -1.918147e-06 -1.100000e+00 -1.997997e-06 -1.200000e+00 -2.083205e-06 -1.000000e-01 -2.729901e-06 -2.000000e-01 -3.872787e-06 -3.000000e-01 -4.189628e-06 -4.000000e-01 -4.372245e-06 -5.000000e-01 -4.536076e-06 -6.000000e-01 -4.695249e-06 -7.000000e-01 -4.853394e-06 -8.000000e-01 -5.011997e-06 -9.000000e-01 -5.171935e-06 -1.000000e+00 -5.334167e-06 -1.100000e+00 -5.500435e-06 -1.200000e+00 -5.674001e-06 -1.000000e-01 -4.580607e-06 -2.000000e-01 -7.351172e-06 -3.000000e-01 -8.562881e-06 -4.000000e-01 -9.016502e-06 -5.000000e-01 -9.318039e-06 -6.000000e-01 -9.587859e-06 -7.000000e-01 -9.846696e-06 -8.000000e-01 -1.010075e-05 -9.000000e-01 -1.035275e-05 -1.000000e+00 -1.060442e-05 -1.100000e+00 -1.085782e-05 -1.200000e+00 -1.111670e-05 -1.000000e-01 -6.226162e-06 -2.000000e-01 -1.063738e-05 -3.000000e-01 -1.331501e-05 -4.000000e-01 -1.456286e-05 -5.000000e-01 -1.513505e-05 -6.000000e-01 -1.554566e-05 -7.000000e-01 -1.591311e-05 -8.000000e-01 -1.626291e-05 -9.000000e-01 -1.660359e-05 -1.000000e+00 -1.693913e-05 -1.100000e+00 -1.727228e-05 -1.200000e+00 -1.760654e-05 -1.000000e-01 -7.579746e-06 -2.000000e-01 -1.340694e-05 -3.000000e-01 -1.752715e-05 -4.000000e-01 -2.003731e-05 -5.000000e-01 -2.128068e-05 -6.000000e-01 -2.194361e-05 -7.000000e-01 -2.244845e-05 -8.000000e-01 -2.290284e-05 -9.000000e-01 -2.333413e-05 -1.000000e+00 -2.375239e-05 -1.100000e+00 -2.416265e-05 -1.200000e+00 -2.456866e-05 -1.000000e-01 -8.678775e-06 -2.000000e-01 -1.569022e-05 -3.000000e-01 -2.106741e-05 -4.000000e-01 -2.485741e-05 -5.000000e-01 -2.717601e-05 -6.000000e-01 -2.839696e-05 -7.000000e-01 -2.913072e-05 -8.000000e-01 -2.971702e-05 -9.000000e-01 -3.024919e-05 -1.000000e+00 -3.075431e-05 -1.100000e+00 -3.124321e-05 -1.200000e+00 -3.172164e-05 -1.000000e-01 -9.573895e-06 -2.000000e-01 -1.757225e-05 -3.000000e-01 -2.402132e-05 -4.000000e-01 -2.895219e-05 -5.000000e-01 -3.241572e-05 -6.000000e-01 -3.454966e-05 -7.000000e-01 -3.574689e-05 -8.000000e-01 -3.653900e-05 -9.000000e-01 -3.719644e-05 -1.000000e+00 -3.779849e-05 -1.100000e+00 -3.837076e-05 -1.200000e+00 -3.892429e-05 -1.000000e-01 -1.030562e-05 -2.000000e-01 -1.912723e-05 -3.000000e-01 -2.648641e-05 -4.000000e-01 -3.240673e-05 -5.000000e-01 -3.691867e-05 -6.000000e-01 -4.007931e-05 -7.000000e-01 -4.204970e-05 -8.000000e-01 -4.322876e-05 -9.000000e-01 -4.407090e-05 -1.000000e+00 -4.479094e-05 -1.100000e+00 -4.545575e-05 -1.200000e+00 -4.608898e-05 -1.000000e-01 -1.090430e-05 -2.000000e-01 -2.041282e-05 -3.000000e-01 -2.854356e-05 -4.000000e-01 -3.531550e-05 -5.000000e-01 -4.075046e-05 -6.000000e-01 -4.487965e-05 -7.000000e-01 -4.776852e-05 -8.000000e-01 -4.960075e-05 -9.000000e-01 -5.076846e-05 -1.000000e+00 -5.165440e-05 -1.100000e+00 -5.242972e-05 -1.200000e+00 -5.315077e-05 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw1.standard0000644000265600020320000002751212264261473023233 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060620e-07 -2.000000e-01 -3.951414e-07 -3.000000e-01 -7.284812e-07 -4.000000e-01 -1.318828e-06 -5.000000e-01 -2.352149e-06 -6.000000e-01 -4.136004e-06 -7.000000e-01 -7.171094e-06 -8.000000e-01 -1.225693e-05 -9.000000e-01 -2.063911e-05 -1.000000e+00 -3.419648e-05 -1.100000e+00 -5.565272e-05 -1.200000e+00 -8.879236e-05 -1.000000e-01 -2.347263e-06 -2.000000e-01 -4.298730e-06 -3.000000e-01 -7.531125e-06 -4.000000e-01 -1.290654e-05 -5.000000e-01 -2.169163e-05 -6.000000e-01 -3.569962e-05 -7.000000e-01 -5.733945e-05 -8.000000e-01 -8.952389e-05 -9.000000e-01 -1.354296e-04 -1.000000e+00 -1.982138e-04 -1.100000e+00 -2.808861e-04 -1.200000e+00 -3.865233e-04 -1.000000e-01 -2.087763e-05 -2.000000e-01 -3.608031e-05 -3.000000e-01 -5.844587e-05 -4.000000e-01 -9.107256e-05 -5.000000e-01 -1.367670e-04 -6.000000e-01 -1.979962e-04 -7.000000e-01 -2.766100e-04 -8.000000e-01 -3.737024e-04 -9.000000e-01 -4.896906e-04 -1.000000e+00 -6.246421e-04 -1.100000e+00 -7.788533e-04 -1.200000e+00 -9.536559e-04 -1.000000e-01 -1.173971e-04 -2.000000e-01 -1.876023e-04 -3.000000e-01 -2.657281e-04 -4.000000e-01 -3.594677e-04 -5.000000e-01 -4.698381e-04 -6.000000e-01 -5.967650e-04 -7.000000e-01 -7.397098e-04 -8.000000e-01 -8.979140e-04 -9.000000e-01 -1.070598e-03 -1.000000e+00 -1.257254e-03 -1.100000e+00 -1.458147e-03 -1.200000e+00 -1.675083e-03 -1.000000e-01 -3.223010e-04 -2.000000e-01 -5.203969e-04 -3.000000e-01 -6.746175e-04 -4.000000e-01 -8.307146e-04 -5.000000e-01 -9.967252e-04 -6.000000e-01 -1.173932e-03 -7.000000e-01 -1.362352e-03 -8.000000e-01 -1.561660e-03 -9.000000e-01 -1.771465e-03 -1.000000e+00 -1.991574e-03 -1.100000e+00 -2.222486e-03 -1.200000e+00 -2.466237e-03 -1.000000e-01 -5.499072e-04 -2.000000e-01 -9.317058e-04 -3.000000e-01 -1.193799e-03 -4.000000e-01 -1.411782e-03 -5.000000e-01 -1.623952e-03 -6.000000e-01 -1.839935e-03 -7.000000e-01 -2.062417e-03 -8.000000e-01 -2.292256e-03 -9.000000e-01 -2.529699e-03 -1.000000e+00 -2.774867e-03 -1.100000e+00 -3.028306e-03 -1.200000e+00 -3.291904e-03 -1.000000e-01 -7.549085e-04 -2.000000e-01 -1.322081e-03 -3.000000e-01 -1.730657e-03 -4.000000e-01 -2.033007e-03 -5.000000e-01 -2.295108e-03 -6.000000e-01 -2.547775e-03 -7.000000e-01 -2.800515e-03 -8.000000e-01 -3.056660e-03 -9.000000e-01 -3.317561e-03 -1.000000e+00 -3.583857e-03 -1.100000e+00 -3.856198e-03 -1.200000e+00 -4.136201e-03 -1.000000e-01 -9.321283e-04 -2.000000e-01 -1.667897e-03 -3.000000e-01 -2.231426e-03 -4.000000e-01 -2.650298e-03 -5.000000e-01 -2.979104e-03 -6.000000e-01 -3.273205e-03 -7.000000e-01 -3.556646e-03 -8.000000e-01 -3.837940e-03 -9.000000e-01 -4.120525e-03 -1.000000e+00 -4.405992e-03 -1.100000e+00 -4.695334e-03 -1.200000e+00 -4.989985e-03 -1.000000e-01 -1.084914e-03 -2.000000e-01 -1.970779e-03 -3.000000e-01 -2.679855e-03 -4.000000e-01 -3.230879e-03 -5.000000e-01 -3.652013e-03 -6.000000e-01 -3.999503e-03 -7.000000e-01 -4.317736e-03 -8.000000e-01 -4.625217e-03 -9.000000e-01 -4.929260e-03 -1.000000e+00 -5.233142e-03 -1.100000e+00 -5.538591e-03 -1.200000e+00 -5.847092e-03 -1.000000e-01 -1.217168e-03 -2.000000e-01 -2.236077e-03 -3.000000e-01 -3.077471e-03 -4.000000e-01 -3.757915e-03 -5.000000e-01 -4.291448e-03 -6.000000e-01 -4.711643e-03 -7.000000e-01 -5.073252e-03 -8.000000e-01 -5.410278e-03 -9.000000e-01 -5.736964e-03 -1.000000e+00 -6.059488e-03 -1.100000e+00 -6.380883e-03 -1.200000e+00 -6.703059e-03 -1.000000e-01 -1.332205e-03 -2.000000e-01 -2.469050e-03 -3.000000e-01 -3.429755e-03 -4.000000e-01 -4.229975e-03 -5.000000e-01 -4.880452e-03 -6.000000e-01 -5.394102e-03 -7.000000e-01 -5.813170e-03 -8.000000e-01 -6.186070e-03 -9.000000e-01 -6.538175e-03 -1.000000e+00 -6.880543e-03 -1.100000e+00 -7.218378e-03 -1.200000e+00 -7.554508e-03 -1.000000e-01 -1.432734e-03 -2.000000e-01 -2.674297e-03 -3.000000e-01 -3.742399e-03 -4.000000e-01 -4.651838e-03 -5.000000e-01 -5.413264e-03 -6.000000e-01 -6.031974e-03 -7.000000e-01 -6.526695e-03 -8.000000e-01 -6.945684e-03 -9.000000e-01 -7.328012e-03 -1.000000e+00 -7.692549e-03 -1.100000e+00 -8.047997e-03 -1.200000e+00 -8.398777e-03 -1.000000e-01 -3.879333e-08 -2.000000e-01 -8.828187e-08 -3.000000e-01 -1.926200e-07 -4.000000e-01 -4.098542e-07 -5.000000e-01 -8.505837e-07 -6.000000e-01 -1.717885e-06 -7.000000e-01 -3.370215e-06 -8.000000e-01 -6.421315e-06 -9.000000e-01 -1.190317e-05 -1.000000e+00 -2.152934e-05 -1.100000e+00 -3.808451e-05 -1.200000e+00 -6.591065e-05 -1.000000e-01 -1.051498e-06 -2.000000e-01 -2.181980e-06 -3.000000e-01 -4.274449e-06 -4.000000e-01 -8.077164e-06 -5.000000e-01 -1.481100e-05 -6.000000e-01 -2.642530e-05 -7.000000e-01 -4.585425e-05 -8.000000e-01 -7.711395e-05 -9.000000e-01 -1.250385e-04 -1.000000e+00 -1.946418e-04 -1.100000e+00 -2.904750e-04 -1.200000e+00 -4.165579e-04 -1.000000e-01 -1.718215e-05 -2.000000e-01 -3.176679e-05 -3.000000e-01 -5.528474e-05 -4.000000e-01 -9.222502e-05 -5.000000e-01 -1.472663e-04 -6.000000e-01 -2.244918e-04 -7.000000e-01 -3.265108e-04 -8.000000e-01 -4.540905e-04 -9.000000e-01 -6.064951e-04 -1.000000e+00 -7.823903e-04 -1.100000e+00 -9.810606e-04 -1.200000e+00 -1.203735e-03 -1.000000e-01 -1.549685e-04 -2.000000e-01 -2.491282e-04 -3.000000e-01 -3.621175e-04 -4.000000e-01 -4.984905e-04 -5.000000e-01 -6.574256e-04 -6.000000e-01 -8.368378e-04 -7.000000e-01 -1.034283e-03 -8.000000e-01 -1.247420e-03 -9.000000e-01 -1.474375e-03 -1.000000e+00 -1.714239e-03 -1.100000e+00 -1.967841e-03 -1.200000e+00 -2.238793e-03 -1.000000e-01 -5.686264e-04 -2.000000e-01 -8.429179e-04 -3.000000e-01 -1.065867e-03 -4.000000e-01 -1.290773e-03 -5.000000e-01 -1.523843e-03 -6.000000e-01 -1.765604e-03 -7.000000e-01 -2.015531e-03 -8.000000e-01 -2.272937e-03 -9.000000e-01 -2.537349e-03 -1.000000e+00 -2.809054e-03 -1.100000e+00 -3.090040e-03 -1.200000e+00 -3.385297e-03 -1.000000e-01 -1.086977e-03 -2.000000e-01 -1.656781e-03 -3.000000e-01 -1.995893e-03 -4.000000e-01 -2.285579e-03 -5.000000e-01 -2.565411e-03 -6.000000e-01 -2.844174e-03 -7.000000e-01 -3.124581e-03 -8.000000e-01 -3.407622e-03 -9.000000e-01 -3.693818e-03 -1.000000e+00 -3.984069e-03 -1.100000e+00 -4.280833e-03 -1.200000e+00 -4.589701e-03 -1.000000e-01 -1.574189e-03 -2.000000e-01 -2.504213e-03 -3.000000e-01 -3.012338e-03 -4.000000e-01 -3.370575e-03 -5.000000e-01 -3.690079e-03 -6.000000e-01 -3.997000e-03 -7.000000e-01 -4.299341e-03 -8.000000e-01 -4.600280e-03 -9.000000e-01 -4.901406e-03 -1.000000e+00 -5.204133e-03 -1.100000e+00 -5.511135e-03 -1.200000e+00 -5.828196e-03 -1.000000e-01 -2.011992e-03 -2.000000e-01 -3.305813e-03 -3.000000e-01 -4.046128e-03 -4.000000e-01 -4.495270e-03 -5.000000e-01 -4.857153e-03 -6.000000e-01 -5.190136e-03 -7.000000e-01 -5.511099e-03 -8.000000e-01 -5.826437e-03 -9.000000e-01 -6.139159e-03 -1.000000e+00 -6.451299e-03 -1.100000e+00 -6.765687e-03 -1.200000e+00 -7.088064e-03 -1.000000e-01 -2.406050e-03 -2.000000e-01 -4.044688e-03 -3.000000e-01 -5.056892e-03 -4.000000e-01 -5.631826e-03 -5.000000e-01 -6.044962e-03 -6.000000e-01 -6.405357e-03 -7.000000e-01 -6.744132e-03 -8.000000e-01 -7.072396e-03 -9.000000e-01 -7.395090e-03 -1.000000e+00 -7.715076e-03 -1.100000e+00 -8.035387e-03 -1.200000e+00 -8.361602e-03 -1.000000e-01 -2.764419e-03 -2.000000e-01 -4.725470e-03 -3.000000e-01 -6.021583e-03 -4.000000e-01 -6.761599e-03 -5.000000e-01 -7.240069e-03 -6.000000e-01 -7.631563e-03 -7.000000e-01 -7.988799e-03 -8.000000e-01 -8.329639e-03 -9.000000e-01 -8.661621e-03 -1.000000e+00 -8.988710e-03 -1.100000e+00 -9.314254e-03 -1.200000e+00 -9.643637e-03 -1.000000e-01 -3.094289e-03 -2.000000e-01 -5.357200e-03 -3.000000e-01 -6.932087e-03 -4.000000e-01 -7.870787e-03 -5.000000e-01 -8.433142e-03 -6.000000e-01 -8.861304e-03 -7.000000e-01 -9.238622e-03 -8.000000e-01 -9.592364e-03 -9.000000e-01 -9.933499e-03 -1.000000e+00 -1.026742e-02 -1.100000e+00 -1.059795e-02 -1.200000e+00 -1.093030e-02 -1.000000e-01 -3.401616e-03 -2.000000e-01 -5.948752e-03 -3.000000e-01 -7.790505e-03 -4.000000e-01 -8.949355e-03 -5.000000e-01 -9.617087e-03 -6.000000e-01 -1.008911e-02 -7.000000e-01 -1.048881e-02 -8.000000e-01 -1.085620e-02 -9.000000e-01 -1.120669e-02 -1.000000e+00 -1.154744e-02 -1.100000e+00 -1.188296e-02 -1.200000e+00 -1.221838e-02 -1.000000e-01 -8.631823e-07 -2.000000e-01 -1.438465e-06 -3.000000e-01 -2.301954e-06 -4.000000e-01 -3.640786e-06 -5.000000e-01 -5.713048e-06 -6.000000e-01 -8.903592e-06 -7.000000e-01 -1.378053e-05 -8.000000e-01 -2.116612e-05 -9.000000e-01 -3.222254e-05 -1.000000e+00 -4.855402e-05 -1.100000e+00 -7.233194e-05 -1.200000e+00 -1.064627e-04 -1.000000e-01 -4.738432e-06 -2.000000e-01 -7.771790e-06 -3.000000e-01 -1.215502e-05 -4.000000e-01 -1.871780e-05 -5.000000e-01 -2.844887e-05 -6.000000e-01 -4.263590e-05 -7.000000e-01 -6.288044e-05 -8.000000e-01 -9.105910e-05 -9.000000e-01 -1.292439e-04 -1.000000e+00 -1.796264e-04 -1.100000e+00 -2.445230e-04 -1.200000e+00 -3.265444e-04 -1.000000e-01 -2.268007e-05 -2.000000e-01 -3.671152e-05 -3.000000e-01 -5.476309e-05 -4.000000e-01 -7.941424e-05 -5.000000e-01 -1.123910e-04 -6.000000e-01 -1.553284e-04 -7.000000e-01 -2.097071e-04 -8.000000e-01 -2.767683e-04 -9.000000e-01 -3.574843e-04 -1.000000e+00 -4.526342e-04 -1.100000e+00 -5.630370e-04 -1.200000e+00 -6.899760e-04 -1.000000e-01 -7.795475e-05 -2.000000e-01 -1.282318e-04 -3.000000e-01 -1.771714e-04 -4.000000e-01 -2.351306e-04 -5.000000e-01 -3.039484e-04 -6.000000e-01 -3.843620e-04 -7.000000e-01 -4.767616e-04 -8.000000e-01 -5.813319e-04 -9.000000e-01 -6.981353e-04 -1.000000e+00 -8.272296e-04 -1.100000e+00 -9.688989e-04 -1.200000e+00 -1.124067e-03 -1.000000e-01 -1.673901e-04 -2.000000e-01 -2.919364e-04 -3.000000e-01 -3.883247e-04 -4.000000e-01 -4.824540e-04 -5.000000e-01 -5.840218e-04 -6.000000e-01 -6.949196e-04 -7.000000e-01 -8.156634e-04 -8.000000e-01 -9.464442e-04 -9.000000e-01 -1.087345e-03 -1.000000e+00 -1.238445e-03 -1.100000e+00 -1.399981e-03 -1.200000e+00 -1.572708e-03 -1.000000e-01 -2.588371e-04 -2.000000e-01 -4.692309e-04 -3.000000e-01 -6.339755e-04 -4.000000e-01 -7.697756e-04 -5.000000e-01 -9.000296e-04 -6.000000e-01 -1.034706e-03 -7.000000e-01 -1.176490e-03 -8.000000e-01 -1.326331e-03 -9.000000e-01 -1.484682e-03 -1.000000e+00 -1.651817e-03 -1.100000e+00 -1.828002e-03 -1.200000e+00 -2.013786e-03 -1.000000e-01 -3.361522e-04 -2.000000e-01 -6.223509e-04 -3.000000e-01 -8.590640e-04 -4.000000e-01 -1.051343e-03 -5.000000e-01 -1.216291e-03 -6.000000e-01 -1.374418e-03 -7.000000e-01 -1.535064e-03 -8.000000e-01 -1.701326e-03 -9.000000e-01 -1.874467e-03 -1.000000e+00 -2.055136e-03 -1.100000e+00 -2.243738e-03 -1.200000e+00 -2.440708e-03 -1.000000e-01 -3.982960e-04 -2.000000e-01 -7.475021e-04 -3.000000e-01 -1.047766e-03 -4.000000e-01 -1.300607e-03 -5.000000e-01 -1.512522e-03 -6.000000e-01 -1.700307e-03 -7.000000e-01 -1.881387e-03 -8.000000e-01 -2.063944e-03 -9.000000e-01 -2.251100e-03 -1.000000e+00 -2.444264e-03 -1.100000e+00 -2.644189e-03 -1.200000e+00 -2.851384e-03 -1.000000e-01 -4.480843e-04 -2.000000e-01 -8.492217e-04 -3.000000e-01 -1.203480e-03 -4.000000e-01 -1.511457e-03 -5.000000e-01 -1.775348e-03 -6.000000e-01 -2.002718e-03 -7.000000e-01 -2.209489e-03 -8.000000e-01 -2.410171e-03 -9.000000e-01 -2.611741e-03 -1.000000e+00 -2.817167e-03 -1.100000e+00 -3.027893e-03 -1.200000e+00 -3.244733e-03 -1.000000e-01 -4.882235e-04 -2.000000e-01 -9.322170e-04 -3.000000e-01 -1.331985e-03 -4.000000e-01 -1.687793e-03 -5.000000e-01 -2.000500e-03 -6.000000e-01 -2.272881e-03 -7.000000e-01 -2.513269e-03 -8.000000e-01 -2.736309e-03 -9.000000e-01 -2.953975e-03 -1.000000e+00 -3.172185e-03 -1.100000e+00 -3.393685e-03 -1.200000e+00 -3.619898e-03 -1.000000e-01 -5.207382e-04 -2.000000e-01 -1.000148e-03 -3.000000e-01 -1.438171e-03 -4.000000e-01 -1.834903e-03 -5.000000e-01 -2.190712e-03 -6.000000e-01 -2.506681e-03 -7.000000e-01 -2.786141e-03 -8.000000e-01 -3.037894e-03 -9.000000e-01 -3.275081e-03 -1.000000e+00 -3.507574e-03 -1.100000e+00 -3.740411e-03 -1.200000e+00 -3.976102e-03 -1.000000e-01 -5.471142e-04 -2.000000e-01 -1.055787e-03 -3.000000e-01 -1.525902e-03 -4.000000e-01 -1.957446e-03 -5.000000e-01 -2.350558e-03 -6.000000e-01 -2.705694e-03 -7.000000e-01 -3.024166e-03 -8.000000e-01 -3.309845e-03 -9.000000e-01 -3.571700e-03 -1.000000e+00 -3.821301e-03 -1.100000e+00 -4.066818e-03 -1.200000e+00 -4.312571e-03 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw4.standard0000644000265600020320000002751212264261473023236 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.041952e-08 -2.000000e-01 -3.915554e-08 -3.000000e-01 -7.218667e-08 -4.000000e-01 -1.306852e-07 -5.000000e-01 -2.330793e-07 -6.000000e-01 -4.098467e-07 -7.000000e-01 -7.106064e-07 -8.000000e-01 -1.214593e-06 -9.000000e-01 -2.045255e-06 -1.000000e+00 -3.388825e-06 -1.100000e+00 -5.515303e-06 -1.200000e+00 -8.799914e-06 -1.000000e-01 -2.326008e-07 -2.000000e-01 -4.259754e-07 -3.000000e-01 -7.462865e-07 -4.000000e-01 -1.278970e-06 -5.000000e-01 -2.149563e-06 -6.000000e-01 -3.537794e-06 -7.000000e-01 -5.682471e-06 -8.000000e-01 -8.872407e-06 -9.000000e-01 -1.342267e-05 -1.000000e+00 -1.964655e-05 -1.100000e+00 -2.784280e-05 -1.200000e+00 -3.831701e-05 -1.000000e-01 -2.068971e-06 -2.000000e-01 -3.575567e-06 -3.000000e-01 -5.792157e-06 -4.000000e-01 -9.025908e-06 -5.000000e-01 -1.355519e-05 -6.000000e-01 -1.962481e-05 -7.000000e-01 -2.741851e-05 -8.000000e-01 -3.704516e-05 -9.000000e-01 -4.854660e-05 -1.000000e+00 -6.192997e-05 -1.100000e+00 -7.722516e-05 -1.200000e+00 -9.456475e-05 -1.000000e-01 -1.163619e-05 -2.000000e-01 -1.859482e-05 -3.000000e-01 -2.633971e-05 -4.000000e-01 -3.563348e-05 -5.000000e-01 -4.657727e-05 -6.000000e-01 -5.916404e-05 -7.000000e-01 -7.334078e-05 -8.000000e-01 -8.903258e-05 -9.000000e-01 -1.061625e-04 -1.000000e+00 -1.246804e-04 -1.100000e+00 -1.446128e-04 -1.200000e+00 -1.661395e-04 -1.000000e-01 -3.195616e-05 -2.000000e-01 -5.159415e-05 -3.000000e-01 -6.688566e-05 -4.000000e-01 -8.236630e-05 -5.000000e-01 -9.883228e-05 -6.000000e-01 -1.164107e-04 -7.000000e-01 -1.351035e-04 -8.000000e-01 -1.548784e-04 -9.000000e-01 -1.756969e-04 -1.000000e+00 -1.975400e-04 -1.100000e+00 -2.204574e-04 -1.200000e+00 -2.446516e-04 -1.000000e-01 -5.454207e-05 -2.000000e-01 -9.239985e-05 -3.000000e-01 -1.183873e-04 -4.000000e-01 -1.400078e-04 -5.000000e-01 -1.610565e-04 -6.000000e-01 -1.824865e-04 -7.000000e-01 -2.045637e-04 -8.000000e-01 -2.273733e-04 -9.000000e-01 -2.509397e-04 -1.000000e+00 -2.752750e-04 -1.100000e+00 -3.004336e-04 -1.200000e+00 -3.266032e-04 -1.000000e-01 -7.489789e-05 -2.000000e-01 -1.311518e-04 -3.000000e-01 -1.716660e-04 -4.000000e-01 -2.016516e-04 -5.000000e-01 -2.276551e-04 -6.000000e-01 -2.527282e-04 -7.000000e-01 -2.778121e-04 -8.000000e-01 -3.032367e-04 -9.000000e-01 -3.291358e-04 -1.000000e+00 -3.555727e-04 -1.100000e+00 -3.826120e-04 -1.200000e+00 -4.104147e-04 -1.000000e-01 -9.250506e-05 -2.000000e-01 -1.654993e-04 -3.000000e-01 -2.213889e-04 -4.000000e-01 -2.629267e-04 -5.000000e-01 -2.955437e-04 -6.000000e-01 -3.247288e-04 -7.000000e-01 -3.528621e-04 -8.000000e-01 -3.807861e-04 -9.000000e-01 -4.088411e-04 -1.000000e+00 -4.371848e-04 -1.100000e+00 -4.659157e-04 -1.200000e+00 -4.951762e-04 -1.000000e-01 -1.076920e-04 -2.000000e-01 -1.955970e-04 -3.000000e-01 -2.659366e-04 -4.000000e-01 -3.205831e-04 -5.000000e-01 -3.623504e-04 -6.000000e-01 -3.968287e-04 -7.000000e-01 -4.284150e-04 -8.000000e-01 -4.589401e-04 -9.000000e-01 -4.891278e-04 -1.000000e+00 -5.193025e-04 -1.100000e+00 -5.496354e-04 -1.200000e+00 -5.802741e-04 -1.000000e-01 -1.208438e-04 -2.000000e-01 -2.219709e-04 -3.000000e-01 -3.054532e-04 -4.000000e-01 -3.729458e-04 -5.000000e-01 -4.258569e-04 -6.000000e-01 -4.675386e-04 -7.000000e-01 -5.034253e-04 -8.000000e-01 -5.368827e-04 -9.000000e-01 -5.693195e-04 -1.000000e+00 -6.013469e-04 -1.100000e+00 -6.332653e-04 -1.200000e+00 -6.652639e-04 -1.000000e-01 -1.322875e-04 -2.000000e-01 -2.451399e-04 -3.000000e-01 -3.404777e-04 -4.000000e-01 -4.198652e-04 -5.000000e-01 -4.843795e-04 -6.000000e-01 -5.353210e-04 -7.000000e-01 -5.768996e-04 -8.000000e-01 -6.139138e-04 -9.000000e-01 -6.488732e-04 -1.000000e+00 -6.828716e-04 -1.100000e+00 -7.164236e-04 -1.200000e+00 -7.498096e-04 -1.000000e-01 -1.422910e-04 -2.000000e-01 -2.655582e-04 -3.000000e-01 -3.715714e-04 -4.000000e-01 -4.618098e-04 -5.000000e-01 -5.373396e-04 -6.000000e-01 -5.986988e-04 -7.000000e-01 -6.477691e-04 -8.000000e-01 -6.893486e-04 -9.000000e-01 -7.273048e-04 -1.000000e+00 -7.635032e-04 -1.100000e+00 -7.988045e-04 -1.200000e+00 -8.336460e-04 -1.000000e-01 -3.844165e-09 -2.000000e-01 -8.748076e-09 -3.000000e-01 -1.908707e-08 -4.000000e-01 -4.061302e-08 -5.000000e-01 -8.428539e-08 -6.000000e-01 -1.702276e-07 -7.000000e-01 -3.339609e-07 -8.000000e-01 -6.363065e-07 -9.000000e-01 -1.179540e-06 -1.000000e+00 -2.133499e-06 -1.100000e+00 -3.774223e-06 -1.200000e+00 -6.532192e-06 -1.000000e-01 -1.041948e-07 -2.000000e-01 -2.162157e-07 -3.000000e-01 -4.235645e-07 -4.000000e-01 -8.003944e-07 -5.000000e-01 -1.467705e-06 -6.000000e-01 -2.618717e-06 -7.000000e-01 -4.544312e-06 -8.000000e-01 -7.642727e-06 -9.000000e-01 -1.239347e-05 -1.000000e+00 -1.929416e-05 -1.100000e+00 -2.879679e-05 -1.200000e+00 -4.130098e-05 -1.000000e-01 -1.702720e-06 -2.000000e-01 -3.148124e-06 -3.000000e-01 -5.479059e-06 -4.000000e-01 -9.140690e-06 -5.000000e-01 -1.459721e-05 -6.000000e-01 -2.225404e-05 -7.000000e-01 -3.237069e-05 -8.000000e-01 -4.502413e-05 -9.000000e-01 -6.014225e-05 -1.000000e+00 -7.759348e-05 -1.100000e+00 -9.730749e-05 -1.200000e+00 -1.194068e-04 -1.000000e-01 -1.536196e-05 -2.000000e-01 -2.469768e-05 -3.000000e-01 -3.590272e-05 -4.000000e-01 -4.942907e-05 -5.000000e-01 -6.519592e-05 -6.000000e-01 -8.299704e-05 -7.000000e-01 -1.025904e-04 -8.000000e-01 -1.237440e-04 -9.000000e-01 -1.462721e-04 -1.000000e+00 -1.700847e-04 -1.100000e+00 -1.952642e-04 -1.200000e+00 -2.221699e-04 -1.000000e-01 -5.640405e-05 -2.000000e-01 -8.360761e-05 -3.000000e-01 -1.057298e-04 -4.000000e-01 -1.280513e-04 -5.000000e-01 -1.511868e-04 -6.000000e-01 -1.751880e-04 -7.000000e-01 -2.000029e-04 -8.000000e-01 -2.255631e-04 -9.000000e-01 -2.518216e-04 -1.000000e+00 -2.788069e-04 -1.100000e+00 -3.067168e-04 -1.200000e+00 -3.360477e-04 -1.000000e-01 -1.079042e-04 -2.000000e-01 -1.644216e-04 -3.000000e-01 -1.980714e-04 -4.000000e-01 -2.268315e-04 -5.000000e-01 -2.546192e-04 -6.000000e-01 -2.823044e-04 -7.000000e-01 -3.101556e-04 -8.000000e-01 -3.382707e-04 -9.000000e-01 -3.667013e-04 -1.000000e+00 -3.955370e-04 -1.100000e+00 -4.250223e-04 -1.200000e+00 -4.557140e-04 -1.000000e-01 -1.563831e-04 -2.000000e-01 -2.486607e-04 -3.000000e-01 -2.990588e-04 -4.000000e-01 -3.346210e-04 -5.000000e-01 -3.663526e-04 -6.000000e-01 -3.968403e-04 -7.000000e-01 -4.268763e-04 -8.000000e-01 -4.567754e-04 -9.000000e-01 -4.866949e-04 -1.000000e+00 -5.167756e-04 -1.100000e+00 -5.472837e-04 -1.200000e+00 -5.787959e-04 -1.000000e-01 -2.000056e-04 -2.000000e-01 -3.284420e-04 -3.000000e-01 -4.018430e-04 -4.000000e-01 -4.464042e-04 -5.000000e-01 -4.823395e-04 -6.000000e-01 -5.154170e-04 -7.000000e-01 -5.473058e-04 -8.000000e-01 -5.786388e-04 -9.000000e-01 -6.097138e-04 -1.000000e+00 -6.407330e-04 -1.100000e+00 -6.719785e-04 -1.200000e+00 -7.040233e-04 -1.000000e-01 -2.393178e-04 -2.000000e-01 -4.020670e-04 -3.000000e-01 -5.024266e-04 -4.000000e-01 -5.594171e-04 -5.000000e-01 -6.004233e-04 -6.000000e-01 -6.362186e-04 -7.000000e-01 -6.698761e-04 -8.000000e-01 -7.024940e-04 -9.000000e-01 -7.345612e-04 -1.000000e+00 -7.663616e-04 -1.100000e+00 -7.981975e-04 -1.200000e+00 -8.306262e-04 -1.000000e-01 -2.751096e-04 -2.000000e-01 -4.699763e-04 -3.000000e-01 -5.985240e-04 -4.000000e-01 -6.718143e-04 -5.000000e-01 -7.192672e-04 -6.000000e-01 -7.581378e-04 -7.000000e-01 -7.936246e-04 -8.000000e-01 -8.274901e-04 -9.000000e-01 -8.604797e-04 -1.000000e+00 -8.929859e-04 -1.100000e+00 -9.253421e-04 -1.200000e+00 -9.580867e-04 -1.000000e-01 -3.080887e-04 -2.000000e-01 -5.330546e-04 -3.000000e-01 -6.893183e-04 -4.000000e-01 -7.822343e-04 -5.000000e-01 -8.379450e-04 -6.000000e-01 -8.804322e-04 -7.000000e-01 -9.179037e-04 -8.000000e-01 -9.530466e-04 -9.000000e-01 -9.869434e-04 -1.000000e+00 -1.020127e-03 -1.100000e+00 -1.052977e-03 -1.200000e+00 -1.086017e-03 -1.000000e-01 -3.388430e-04 -2.000000e-01 -5.921747e-04 -3.000000e-01 -7.750015e-04 -4.000000e-01 -8.896897e-04 -5.000000e-01 -9.557552e-04 -6.000000e-01 -1.002556e-03 -7.000000e-01 -1.042235e-03 -8.000000e-01 -1.078726e-03 -9.000000e-01 -1.113547e-03 -1.000000e+00 -1.147408e-03 -1.100000e+00 -1.180752e-03 -1.200000e+00 -1.214095e-03 -1.000000e-01 -8.553844e-08 -2.000000e-01 -1.425441e-07 -3.000000e-01 -2.281096e-07 -4.000000e-01 -3.607792e-07 -5.000000e-01 -5.661282e-07 -6.000000e-01 -8.822956e-07 -7.000000e-01 -1.365583e-06 -8.000000e-01 -2.097480e-06 -9.000000e-01 -3.193178e-06 -1.000000e+00 -4.811687e-06 -1.100000e+00 -7.168261e-06 -1.200000e+00 -1.055105e-05 -1.000000e-01 -4.695674e-07 -2.000000e-01 -7.701525e-07 -3.000000e-01 -1.204510e-06 -4.000000e-01 -1.854864e-06 -5.000000e-01 -2.819206e-06 -6.000000e-01 -4.225170e-06 -7.000000e-01 -6.231511e-06 -8.000000e-01 -9.024280e-06 -9.000000e-01 -1.280894e-05 -1.000000e+00 -1.780286e-05 -1.100000e+00 -2.423584e-05 -1.200000e+00 -3.236696e-05 -1.000000e-01 -2.247633e-06 -2.000000e-01 -3.638124e-06 -3.000000e-01 -5.427077e-06 -4.000000e-01 -7.870163e-06 -5.000000e-01 -1.113851e-05 -6.000000e-01 -1.539427e-05 -7.000000e-01 -2.078431e-05 -8.000000e-01 -2.743186e-05 -9.000000e-01 -3.543349e-05 -1.000000e+00 -4.486666e-05 -1.100000e+00 -5.581284e-05 -1.200000e+00 -6.839956e-05 -1.000000e-01 -7.726195e-06 -2.000000e-01 -1.270897e-05 -3.000000e-01 -1.755949e-05 -4.000000e-01 -2.330434e-05 -5.000000e-01 -3.012592e-05 -6.000000e-01 -3.809740e-05 -7.000000e-01 -4.725763e-05 -8.000000e-01 -5.762512e-05 -9.000000e-01 -6.920622e-05 -1.000000e+00 -8.200689e-05 -1.100000e+00 -9.605551e-05 -1.200000e+00 -1.114439e-04 -1.000000e-01 -1.659256e-05 -2.000000e-01 -2.893733e-05 -3.000000e-01 -3.849114e-05 -4.000000e-01 -4.782198e-05 -5.000000e-01 -5.789107e-05 -6.000000e-01 -6.888590e-05 -7.000000e-01 -8.085771e-05 -8.000000e-01 -9.382554e-05 -9.000000e-01 -1.077978e-04 -1.000000e+00 -1.227824e-04 -1.100000e+00 -1.388032e-04 -1.200000e+00 -1.559350e-04 -1.000000e-01 -2.566077e-05 -2.000000e-01 -4.651730e-05 -3.000000e-01 -6.284746e-05 -4.000000e-01 -7.630903e-05 -5.000000e-01 -8.922251e-05 -6.000000e-01 -1.025759e-04 -7.000000e-01 -1.166350e-04 -8.000000e-01 -1.314941e-04 -9.000000e-01 -1.471983e-04 -1.000000e+00 -1.637746e-04 -1.100000e+00 -1.812497e-04 -1.200000e+00 -1.996782e-04 -1.000000e-01 -3.332954e-05 -2.000000e-01 -6.170392e-05 -3.000000e-01 -8.517022e-05 -4.000000e-01 -1.042306e-04 -5.000000e-01 -1.205829e-04 -6.000000e-01 -1.362615e-04 -7.000000e-01 -1.521916e-04 -8.000000e-01 -1.686800e-04 -9.000000e-01 -1.858519e-04 -1.000000e+00 -2.037715e-04 -1.100000e+00 -2.224793e-04 -1.200000e+00 -2.420185e-04 -1.000000e-01 -3.949474e-05 -2.000000e-01 -7.411909e-05 -3.000000e-01 -1.038883e-04 -4.000000e-01 -1.289538e-04 -5.000000e-01 -1.499616e-04 -6.000000e-01 -1.685795e-04 -7.000000e-01 -1.865356e-04 -8.000000e-01 -2.046401e-04 -9.000000e-01 -2.232025e-04 -1.000000e+00 -2.423621e-04 -1.100000e+00 -2.621938e-04 -1.200000e+00 -2.827479e-04 -1.000000e-01 -4.443499e-05 -2.000000e-01 -8.421148e-05 -3.000000e-01 -1.193368e-04 -4.000000e-01 -1.498707e-04 -5.000000e-01 -1.760321e-04 -6.000000e-01 -1.985731e-04 -7.000000e-01 -2.190750e-04 -8.000000e-01 -2.389765e-04 -9.000000e-01 -2.589683e-04 -1.000000e+00 -2.793444e-04 -1.100000e+00 -3.002477e-04 -1.200000e+00 -3.217589e-04 -1.000000e-01 -4.841832e-05 -2.000000e-01 -9.244720e-05 -3.000000e-01 -1.320876e-04 -4.000000e-01 -1.673663e-04 -5.000000e-01 -1.983692e-04 -6.000000e-01 -2.253727e-04 -7.000000e-01 -2.492057e-04 -8.000000e-01 -2.713224e-04 -9.000000e-01 -2.929096e-04 -1.000000e+00 -3.145533e-04 -1.100000e+00 -3.365252e-04 -1.200000e+00 -3.589664e-04 -1.000000e-01 -5.164535e-05 -2.000000e-01 -9.918884e-05 -3.000000e-01 -1.426251e-04 -4.000000e-01 -1.819638e-04 -5.000000e-01 -2.172425e-04 -6.000000e-01 -2.485688e-04 -7.000000e-01 -2.762748e-04 -8.000000e-01 -3.012361e-04 -9.000000e-01 -3.247572e-04 -1.000000e+00 -3.478162e-04 -1.100000e+00 -3.709121e-04 -1.200000e+00 -3.942930e-04 -1.000000e-01 -5.426334e-05 -2.000000e-01 -1.047110e-04 -3.000000e-01 -1.513319e-04 -4.000000e-01 -1.941249e-04 -5.000000e-01 -2.331044e-04 -6.000000e-01 -2.683159e-04 -7.000000e-01 -2.998905e-04 -8.000000e-01 -3.282140e-04 -9.000000e-01 -3.541784e-04 -1.000000e+00 -3.789321e-04 -1.100000e+00 -4.032843e-04 -1.200000e+00 -4.276625e-04 ngspice-26/tests/bsim4/pmos/reference/acFreq_mobmod.standard0000644000265600020320000000710512264261473023610 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/dcSweep_lw5.standard0000644000265600020320000002751212264261473023237 0ustar andreasadminV(d) I(d) -1.000000e-01 -3.204186e-09 -2.000000e-01 -3.544047e-09 -3.000000e-01 -3.841997e-09 -4.000000e-01 -4.147868e-09 -5.000000e-01 -4.469678e-09 -6.000000e-01 -4.811041e-09 -7.000000e-01 -5.174606e-09 -8.000000e-01 -5.563086e-09 -9.000000e-01 -5.980181e-09 -1.000000e+00 -6.431766e-09 -1.100000e+00 -6.927246e-09 -1.200000e+00 -7.480951e-09 -1.000000e-01 -3.844189e-08 -2.000000e-01 -4.236935e-08 -3.000000e-01 -4.574047e-08 -4.000000e-01 -4.917021e-08 -5.000000e-01 -5.275225e-08 -6.000000e-01 -5.652530e-08 -7.000000e-01 -6.051512e-08 -8.000000e-01 -6.474654e-08 -9.000000e-01 -6.925368e-08 -1.000000e+00 -7.409262e-08 -1.100000e+00 -7.935553e-08 -1.200000e+00 -8.518433e-08 -1.000000e-01 -3.733153e-07 -2.000000e-01 -4.112940e-07 -3.000000e-01 -4.416300e-07 -4.000000e-01 -4.719539e-07 -5.000000e-01 -5.032644e-07 -6.000000e-01 -5.359222e-07 -7.000000e-01 -5.701373e-07 -8.000000e-01 -6.060933e-07 -9.000000e-01 -6.440391e-07 -1.000000e+00 -6.843995e-07 -1.100000e+00 -7.278946e-07 -1.200000e+00 -7.756529e-07 -1.000000e-01 -2.581324e-06 -2.000000e-01 -2.921444e-06 -3.000000e-01 -3.110886e-06 -4.000000e-01 -3.288349e-06 -5.000000e-01 -3.465802e-06 -6.000000e-01 -3.646421e-06 -7.000000e-01 -3.831575e-06 -8.000000e-01 -4.022128e-06 -9.000000e-01 -4.219060e-06 -1.000000e+00 -4.424105e-06 -1.100000e+00 -4.640443e-06 -1.200000e+00 -4.873335e-06 -1.000000e-01 -8.966803e-06 -2.000000e-01 -1.158048e-05 -3.000000e-01 -1.233278e-05 -4.000000e-01 -1.288472e-05 -5.000000e-01 -1.339735e-05 -6.000000e-01 -1.389857e-05 -7.000000e-01 -1.439757e-05 -8.000000e-01 -1.489861e-05 -9.000000e-01 -1.540462e-05 -1.000000e+00 -1.591949e-05 -1.100000e+00 -1.645034e-05 -1.200000e+00 -1.700979e-05 -1.000000e-01 -1.738042e-05 -2.000000e-01 -2.618201e-05 -3.000000e-01 -2.912541e-05 -4.000000e-01 -3.041357e-05 -5.000000e-01 -3.141216e-05 -6.000000e-01 -3.232577e-05 -7.000000e-01 -3.320369e-05 -8.000000e-01 -3.406444e-05 -9.000000e-01 -3.491730e-05 -1.000000e+00 -3.576945e-05 -1.100000e+00 -3.663112e-05 -1.200000e+00 -3.752069e-05 -1.000000e-01 -2.556255e-05 -2.000000e-01 -4.194092e-05 -3.000000e-01 -5.019281e-05 -4.000000e-01 -5.344170e-05 -5.000000e-01 -5.523671e-05 -6.000000e-01 -5.667801e-05 -7.000000e-01 -5.798940e-05 -8.000000e-01 -5.923761e-05 -9.000000e-01 -6.045042e-05 -1.000000e+00 -6.164299e-05 -1.100000e+00 -6.282871e-05 -1.200000e+00 -6.402813e-05 -1.000000e-01 -3.297760e-05 -2.000000e-01 -5.665123e-05 -3.000000e-01 -7.163846e-05 -4.000000e-01 -7.925133e-05 -5.000000e-01 -8.276007e-05 -6.000000e-01 -8.500917e-05 -7.000000e-01 -8.687026e-05 -8.000000e-01 -8.856548e-05 -9.000000e-01 -9.017220e-05 -1.000000e+00 -9.172561e-05 -1.100000e+00 -9.324691e-05 -1.200000e+00 -9.475800e-05 -1.000000e-01 -3.961042e-05 -2.000000e-01 -6.998872e-05 -3.000000e-01 -9.162548e-05 -4.000000e-01 -1.051678e-04 -5.000000e-01 -1.122207e-04 -6.000000e-01 -1.159711e-04 -7.000000e-01 -1.186272e-04 -8.000000e-01 -1.208810e-04 -9.000000e-01 -1.229425e-04 -1.000000e+00 -1.248939e-04 -1.100000e+00 -1.267760e-04 -1.200000e+00 -1.286165e-04 -1.000000e-01 -4.553464e-05 -2.000000e-01 -8.200403e-05 -3.000000e-01 -1.098360e-04 -4.000000e-01 -1.294875e-04 -5.000000e-01 -1.416854e-04 -6.000000e-01 -1.483169e-04 -7.000000e-01 -1.523005e-04 -8.000000e-01 -1.553237e-04 -9.000000e-01 -1.579423e-04 -1.000000e+00 -1.603499e-04 -1.100000e+00 -1.626300e-04 -1.200000e+00 -1.648274e-04 -1.000000e-01 -5.082962e-05 -2.000000e-01 -9.281172e-05 -3.000000e-01 -1.263298e-04 -4.000000e-01 -1.517655e-04 -5.000000e-01 -1.695657e-04 -6.000000e-01 -1.805898e-04 -7.000000e-01 -1.869381e-04 -8.000000e-01 -1.911469e-04 -9.000000e-01 -1.945031e-04 -1.000000e+00 -1.974594e-04 -1.100000e+00 -2.001921e-04 -1.200000e+00 -2.027835e-04 -1.000000e-01 -5.556791e-05 -2.000000e-01 -1.025331e-04 -3.000000e-01 -1.412430e-04 -4.000000e-01 -1.720347e-04 -5.000000e-01 -1.952574e-04 -6.000000e-01 -2.113745e-04 -7.000000e-01 -2.214230e-04 -8.000000e-01 -2.276018e-04 -9.000000e-01 -2.320269e-04 -1.000000e+00 -2.356866e-04 -1.100000e+00 -2.389552e-04 -1.200000e+00 -2.419920e-04 -1.000000e-01 -4.818451e-10 -2.000000e-01 -5.423122e-10 -3.000000e-01 -5.997088e-10 -4.000000e-01 -6.604632e-10 -5.000000e-01 -7.260459e-10 -6.000000e-01 -7.973631e-10 -7.000000e-01 -8.752575e-10 -8.000000e-01 -9.607020e-10 -9.000000e-01 -1.055006e-09 -1.000000e+00 -1.160100e-09 -1.100000e+00 -1.278889e-09 -1.200000e+00 -1.415676e-09 -1.000000e-01 -1.428179e-08 -2.000000e-01 -1.596441e-08 -3.000000e-01 -1.752784e-08 -4.000000e-01 -1.915991e-08 -5.000000e-01 -2.089844e-08 -6.000000e-01 -2.276263e-08 -7.000000e-01 -2.476750e-08 -8.000000e-01 -2.692859e-08 -9.000000e-01 -2.926661e-08 -1.000000e+00 -3.181342e-08 -1.100000e+00 -3.461902e-08 -1.200000e+00 -3.775886e-08 -1.000000e-01 -2.739817e-07 -2.000000e-01 -3.029861e-07 -3.000000e-01 -3.285551e-07 -4.000000e-01 -3.546387e-07 -5.000000e-01 -3.819294e-07 -6.000000e-01 -4.107216e-07 -7.000000e-01 -4.412122e-07 -8.000000e-01 -4.735910e-07 -9.000000e-01 -5.081189e-07 -1.000000e+00 -5.452224e-07 -1.100000e+00 -5.855985e-07 -1.200000e+00 -6.303158e-07 -1.000000e-01 -3.199015e-06 -2.000000e-01 -3.549781e-06 -3.000000e-01 -3.804390e-06 -4.000000e-01 -4.051641e-06 -5.000000e-01 -4.302597e-06 -6.000000e-01 -4.560750e-06 -7.000000e-01 -4.827777e-06 -8.000000e-01 -5.104900e-06 -9.000000e-01 -5.393695e-06 -1.000000e+00 -5.696985e-06 -1.100000e+00 -6.019781e-06 -1.200000e+00 -6.370125e-06 -1.000000e-01 -1.702046e-05 -2.000000e-01 -2.034438e-05 -3.000000e-01 -2.156220e-05 -4.000000e-01 -2.255491e-05 -5.000000e-01 -2.349268e-05 -6.000000e-01 -2.441406e-05 -7.000000e-01 -2.533323e-05 -8.000000e-01 -2.625728e-05 -9.000000e-01 -2.719197e-05 -1.000000e+00 -2.814609e-05 -1.100000e+00 -2.913569e-05 -1.200000e+00 -3.018779e-05 -1.000000e-01 -4.040202e-05 -2.000000e-01 -5.615518e-05 -3.000000e-01 -6.053890e-05 -4.000000e-01 -6.290769e-05 -5.000000e-01 -6.485343e-05 -6.000000e-01 -6.664710e-05 -7.000000e-01 -6.836968e-05 -8.000000e-01 -7.005500e-05 -9.000000e-01 -7.172208e-05 -1.000000e+00 -7.338936e-05 -1.100000e+00 -7.508614e-05 -1.200000e+00 -7.686299e-05 -1.000000e-01 -6.633104e-05 -2.000000e-01 -1.024375e-04 -3.000000e-01 -1.162094e-04 -4.000000e-01 -1.214900e-04 -5.000000e-01 -1.249191e-04 -6.000000e-01 -1.277851e-04 -7.000000e-01 -1.304046e-04 -8.000000e-01 -1.328920e-04 -9.000000e-01 -1.353006e-04 -1.000000e+00 -1.376663e-04 -1.100000e+00 -1.400313e-04 -1.200000e+00 -1.424661e-04 -1.000000e-01 -9.295052e-05 -2.000000e-01 -1.520253e-04 -3.000000e-01 -1.822560e-04 -4.000000e-01 -1.940763e-04 -5.000000e-01 -2.000150e-04 -6.000000e-01 -2.043350e-04 -7.000000e-01 -2.080290e-04 -8.000000e-01 -2.114094e-04 -9.000000e-01 -2.146061e-04 -1.000000e+00 -2.176892e-04 -1.100000e+00 -2.207186e-04 -1.200000e+00 -2.237803e-04 -1.000000e-01 -1.200743e-04 -2.000000e-01 -2.030999e-04 -3.000000e-01 -2.535561e-04 -4.000000e-01 -2.772145e-04 -5.000000e-01 -2.876123e-04 -6.000000e-01 -2.940363e-04 -7.000000e-01 -2.990824e-04 -8.000000e-01 -3.034951e-04 -9.000000e-01 -3.075557e-04 -1.000000e+00 -3.113979e-04 -1.100000e+00 -3.151104e-04 -1.200000e+00 -3.187954e-04 -1.000000e-01 -1.478816e-04 -2.000000e-01 -2.556092e-04 -3.000000e-01 -3.278300e-04 -4.000000e-01 -3.678635e-04 -5.000000e-01 -3.857251e-04 -6.000000e-01 -3.952607e-04 -7.000000e-01 -4.020506e-04 -8.000000e-01 -4.076805e-04 -9.000000e-01 -4.127025e-04 -1.000000e+00 -4.173584e-04 -1.100000e+00 -4.217843e-04 -1.200000e+00 -4.261046e-04 -1.000000e-01 -1.766773e-04 -2.000000e-01 -3.099655e-04 -3.000000e-01 -4.048656e-04 -4.000000e-01 -4.639356e-04 -5.000000e-01 -4.927207e-04 -6.000000e-01 -5.067557e-04 -7.000000e-01 -5.157961e-04 -8.000000e-01 -5.228657e-04 -9.000000e-01 -5.289612e-04 -1.000000e+00 -5.344916e-04 -1.100000e+00 -5.396655e-04 -1.200000e+00 -5.446396e-04 -1.000000e-01 -2.068457e-04 -2.000000e-01 -3.667895e-04 -3.000000e-01 -4.852581e-04 -4.000000e-01 -5.647569e-04 -5.000000e-01 -6.074006e-04 -6.000000e-01 -6.275522e-04 -7.000000e-01 -6.394254e-04 -8.000000e-01 -6.481746e-04 -9.000000e-01 -6.554574e-04 -1.000000e+00 -6.619210e-04 -1.100000e+00 -6.678746e-04 -1.200000e+00 -6.735205e-04 -1.000000e-01 -1.646353e-08 -2.000000e-01 -1.805210e-08 -3.000000e-01 -1.923747e-08 -4.000000e-01 -2.041482e-08 -5.000000e-01 -2.162576e-08 -6.000000e-01 -2.288432e-08 -7.000000e-01 -2.419863e-08 -8.000000e-01 -2.557595e-08 -9.000000e-01 -2.702642e-08 -1.000000e+00 -2.856755e-08 -1.100000e+00 -3.022929e-08 -1.200000e+00 -3.205860e-08 -1.000000e-01 -9.299005e-08 -2.000000e-01 -1.021284e-07 -3.000000e-01 -1.086376e-07 -4.000000e-01 -1.150509e-07 -5.000000e-01 -1.216178e-07 -6.000000e-01 -1.284179e-07 -7.000000e-01 -1.354945e-07 -8.000000e-01 -1.428843e-07 -9.000000e-01 -1.506376e-07 -1.000000e+00 -1.588430e-07 -1.100000e+00 -1.676534e-07 -1.200000e+00 -1.773110e-07 -1.000000e-01 -4.725658e-07 -2.000000e-01 -5.272905e-07 -3.000000e-01 -5.598586e-07 -4.000000e-01 -5.911810e-07 -5.000000e-01 -6.229273e-07 -6.000000e-01 -6.555539e-07 -7.000000e-01 -6.892791e-07 -8.000000e-01 -7.242635e-07 -9.000000e-01 -7.607107e-07 -1.000000e+00 -7.989819e-07 -1.100000e+00 -8.397239e-07 -1.200000e+00 -8.839866e-07 -1.000000e-01 -1.861466e-06 -2.000000e-01 -2.243691e-06 -3.000000e-01 -2.378747e-06 -4.000000e-01 -2.496079e-06 -5.000000e-01 -2.611345e-06 -6.000000e-01 -2.727524e-06 -7.000000e-01 -2.845714e-06 -8.000000e-01 -2.966513e-06 -9.000000e-01 -3.090485e-06 -1.000000e+00 -3.218568e-06 -1.100000e+00 -3.352551e-06 -1.200000e+00 -3.495526e-06 -1.000000e-01 -4.580434e-06 -2.000000e-01 -6.498154e-06 -3.000000e-01 -7.029842e-06 -4.000000e-01 -7.336282e-06 -5.000000e-01 -7.611189e-06 -6.000000e-01 -7.878273e-06 -7.000000e-01 -8.143629e-06 -8.000000e-01 -8.409751e-06 -9.000000e-01 -8.678111e-06 -1.000000e+00 -8.950321e-06 -1.100000e+00 -9.229301e-06 -1.200000e+00 -9.520525e-06 -1.000000e-01 -7.685418e-06 -2.000000e-01 -1.233413e-05 -3.000000e-01 -1.436739e-05 -4.000000e-01 -1.512863e-05 -5.000000e-01 -1.563462e-05 -6.000000e-01 -1.608737e-05 -7.000000e-01 -1.652168e-05 -8.000000e-01 -1.694795e-05 -9.000000e-01 -1.737078e-05 -1.000000e+00 -1.779305e-05 -1.100000e+00 -1.821821e-05 -1.200000e+00 -1.865257e-05 -1.000000e-01 -1.044604e-05 -2.000000e-01 -1.784732e-05 -3.000000e-01 -2.234020e-05 -4.000000e-01 -2.443419e-05 -5.000000e-01 -2.539439e-05 -6.000000e-01 -2.608342e-05 -7.000000e-01 -2.669999e-05 -8.000000e-01 -2.728692e-05 -9.000000e-01 -2.785853e-05 -1.000000e+00 -2.842153e-05 -1.100000e+00 -2.898049e-05 -1.200000e+00 -2.954132e-05 -1.000000e-01 -1.271671e-05 -2.000000e-01 -2.249349e-05 -3.000000e-01 -2.940665e-05 -4.000000e-01 -3.361863e-05 -5.000000e-01 -3.570517e-05 -6.000000e-01 -3.681766e-05 -7.000000e-01 -3.766482e-05 -8.000000e-01 -3.842725e-05 -9.000000e-01 -3.915091e-05 -1.000000e+00 -3.985269e-05 -1.100000e+00 -4.054103e-05 -1.200000e+00 -4.122224e-05 -1.000000e-01 -1.456028e-05 -2.000000e-01 -2.632371e-05 -3.000000e-01 -3.534564e-05 -4.000000e-01 -4.170489e-05 -5.000000e-01 -4.559557e-05 -6.000000e-01 -4.764454e-05 -7.000000e-01 -4.887591e-05 -8.000000e-01 -4.985974e-05 -9.000000e-01 -5.075270e-05 -1.000000e+00 -5.160022e-05 -1.100000e+00 -5.242051e-05 -1.200000e+00 -5.322324e-05 -1.000000e-01 -1.606175e-05 -2.000000e-01 -2.948072e-05 -3.000000e-01 -4.030080e-05 -4.000000e-01 -4.857406e-05 -5.000000e-01 -5.438568e-05 -6.000000e-01 -5.796661e-05 -7.000000e-01 -5.997581e-05 -8.000000e-01 -6.130510e-05 -9.000000e-01 -6.240831e-05 -1.000000e+00 -6.341850e-05 -1.100000e+00 -6.437869e-05 -1.200000e+00 -6.530741e-05 -1.000000e-01 -1.728909e-05 -2.000000e-01 -3.208902e-05 -3.000000e-01 -4.443583e-05 -4.000000e-01 -5.436899e-05 -5.000000e-01 -6.193953e-05 -6.000000e-01 -6.724305e-05 -7.000000e-01 -7.054965e-05 -8.000000e-01 -7.252838e-05 -9.000000e-01 -7.394161e-05 -1.000000e+00 -7.514985e-05 -1.100000e+00 -7.626534e-05 -1.200000e+00 -7.732781e-05 -1.000000e-01 -1.829328e-05 -2.000000e-01 -3.424539e-05 -3.000000e-01 -4.788648e-05 -4.000000e-01 -5.924826e-05 -5.000000e-01 -6.836727e-05 -6.000000e-01 -7.529575e-05 -7.000000e-01 -8.014340e-05 -8.000000e-01 -8.321822e-05 -9.000000e-01 -8.517791e-05 -1.000000e+00 -8.666464e-05 -1.100000e+00 -8.796563e-05 -1.200000e+00 -8.917550e-05 ngspice-26/tests/bsim4/pmos/reference/dcSweep_sb.standard0000644000265600020320000002751212264261473023134 0ustar andreasadminV(d) I(d) -1.000000e-01 -2.060620e-07 -2.000000e-01 -3.951414e-07 -3.000000e-01 -7.284812e-07 -4.000000e-01 -1.318828e-06 -5.000000e-01 -2.352149e-06 -6.000000e-01 -4.136004e-06 -7.000000e-01 -7.171094e-06 -8.000000e-01 -1.225693e-05 -9.000000e-01 -2.063911e-05 -1.000000e+00 -3.419648e-05 -1.100000e+00 -5.565272e-05 -1.200000e+00 -8.879236e-05 -1.000000e-01 -2.347263e-06 -2.000000e-01 -4.298730e-06 -3.000000e-01 -7.531125e-06 -4.000000e-01 -1.290654e-05 -5.000000e-01 -2.169163e-05 -6.000000e-01 -3.569962e-05 -7.000000e-01 -5.733945e-05 -8.000000e-01 -8.952389e-05 -9.000000e-01 -1.354296e-04 -1.000000e+00 -1.982138e-04 -1.100000e+00 -2.808861e-04 -1.200000e+00 -3.865233e-04 -1.000000e-01 -2.087763e-05 -2.000000e-01 -3.608031e-05 -3.000000e-01 -5.844587e-05 -4.000000e-01 -9.107256e-05 -5.000000e-01 -1.367670e-04 -6.000000e-01 -1.979962e-04 -7.000000e-01 -2.766100e-04 -8.000000e-01 -3.737024e-04 -9.000000e-01 -4.896906e-04 -1.000000e+00 -6.246421e-04 -1.100000e+00 -7.788533e-04 -1.200000e+00 -9.536559e-04 -1.000000e-01 -1.173971e-04 -2.000000e-01 -1.876023e-04 -3.000000e-01 -2.657281e-04 -4.000000e-01 -3.594677e-04 -5.000000e-01 -4.698381e-04 -6.000000e-01 -5.967650e-04 -7.000000e-01 -7.397098e-04 -8.000000e-01 -8.979140e-04 -9.000000e-01 -1.070598e-03 -1.000000e+00 -1.257254e-03 -1.100000e+00 -1.458147e-03 -1.200000e+00 -1.675083e-03 -1.000000e-01 -3.223010e-04 -2.000000e-01 -5.203969e-04 -3.000000e-01 -6.746175e-04 -4.000000e-01 -8.307146e-04 -5.000000e-01 -9.967252e-04 -6.000000e-01 -1.173932e-03 -7.000000e-01 -1.362352e-03 -8.000000e-01 -1.561660e-03 -9.000000e-01 -1.771465e-03 -1.000000e+00 -1.991574e-03 -1.100000e+00 -2.222486e-03 -1.200000e+00 -2.466237e-03 -1.000000e-01 -5.499072e-04 -2.000000e-01 -9.317058e-04 -3.000000e-01 -1.193799e-03 -4.000000e-01 -1.411782e-03 -5.000000e-01 -1.623952e-03 -6.000000e-01 -1.839935e-03 -7.000000e-01 -2.062417e-03 -8.000000e-01 -2.292256e-03 -9.000000e-01 -2.529699e-03 -1.000000e+00 -2.774867e-03 -1.100000e+00 -3.028306e-03 -1.200000e+00 -3.291904e-03 -1.000000e-01 -7.549085e-04 -2.000000e-01 -1.322081e-03 -3.000000e-01 -1.730657e-03 -4.000000e-01 -2.033007e-03 -5.000000e-01 -2.295108e-03 -6.000000e-01 -2.547775e-03 -7.000000e-01 -2.800515e-03 -8.000000e-01 -3.056660e-03 -9.000000e-01 -3.317561e-03 -1.000000e+00 -3.583857e-03 -1.100000e+00 -3.856198e-03 -1.200000e+00 -4.136201e-03 -1.000000e-01 -9.321283e-04 -2.000000e-01 -1.667897e-03 -3.000000e-01 -2.231426e-03 -4.000000e-01 -2.650298e-03 -5.000000e-01 -2.979104e-03 -6.000000e-01 -3.273205e-03 -7.000000e-01 -3.556646e-03 -8.000000e-01 -3.837940e-03 -9.000000e-01 -4.120525e-03 -1.000000e+00 -4.405992e-03 -1.100000e+00 -4.695334e-03 -1.200000e+00 -4.989985e-03 -1.000000e-01 -1.084914e-03 -2.000000e-01 -1.970779e-03 -3.000000e-01 -2.679855e-03 -4.000000e-01 -3.230879e-03 -5.000000e-01 -3.652013e-03 -6.000000e-01 -3.999503e-03 -7.000000e-01 -4.317736e-03 -8.000000e-01 -4.625217e-03 -9.000000e-01 -4.929260e-03 -1.000000e+00 -5.233142e-03 -1.100000e+00 -5.538591e-03 -1.200000e+00 -5.847092e-03 -1.000000e-01 -1.217168e-03 -2.000000e-01 -2.236077e-03 -3.000000e-01 -3.077471e-03 -4.000000e-01 -3.757915e-03 -5.000000e-01 -4.291448e-03 -6.000000e-01 -4.711643e-03 -7.000000e-01 -5.073252e-03 -8.000000e-01 -5.410278e-03 -9.000000e-01 -5.736964e-03 -1.000000e+00 -6.059488e-03 -1.100000e+00 -6.380883e-03 -1.200000e+00 -6.703059e-03 -1.000000e-01 -1.332205e-03 -2.000000e-01 -2.469050e-03 -3.000000e-01 -3.429755e-03 -4.000000e-01 -4.229975e-03 -5.000000e-01 -4.880452e-03 -6.000000e-01 -5.394102e-03 -7.000000e-01 -5.813170e-03 -8.000000e-01 -6.186070e-03 -9.000000e-01 -6.538175e-03 -1.000000e+00 -6.880543e-03 -1.100000e+00 -7.218378e-03 -1.200000e+00 -7.554508e-03 -1.000000e-01 -1.432734e-03 -2.000000e-01 -2.674297e-03 -3.000000e-01 -3.742399e-03 -4.000000e-01 -4.651838e-03 -5.000000e-01 -5.413264e-03 -6.000000e-01 -6.031974e-03 -7.000000e-01 -6.526695e-03 -8.000000e-01 -6.945684e-03 -9.000000e-01 -7.328012e-03 -1.000000e+00 -7.692549e-03 -1.100000e+00 -8.047997e-03 -1.200000e+00 -8.398777e-03 -1.000000e-01 -3.879333e-08 -2.000000e-01 -8.828187e-08 -3.000000e-01 -1.926200e-07 -4.000000e-01 -4.098542e-07 -5.000000e-01 -8.505837e-07 -6.000000e-01 -1.717885e-06 -7.000000e-01 -3.370215e-06 -8.000000e-01 -6.421315e-06 -9.000000e-01 -1.190317e-05 -1.000000e+00 -2.152934e-05 -1.100000e+00 -3.808451e-05 -1.200000e+00 -6.591065e-05 -1.000000e-01 -1.051498e-06 -2.000000e-01 -2.181980e-06 -3.000000e-01 -4.274449e-06 -4.000000e-01 -8.077164e-06 -5.000000e-01 -1.481100e-05 -6.000000e-01 -2.642530e-05 -7.000000e-01 -4.585425e-05 -8.000000e-01 -7.711395e-05 -9.000000e-01 -1.250385e-04 -1.000000e+00 -1.946418e-04 -1.100000e+00 -2.904750e-04 -1.200000e+00 -4.165579e-04 -1.000000e-01 -1.718215e-05 -2.000000e-01 -3.176679e-05 -3.000000e-01 -5.528474e-05 -4.000000e-01 -9.222502e-05 -5.000000e-01 -1.472663e-04 -6.000000e-01 -2.244918e-04 -7.000000e-01 -3.265108e-04 -8.000000e-01 -4.540905e-04 -9.000000e-01 -6.064951e-04 -1.000000e+00 -7.823903e-04 -1.100000e+00 -9.810606e-04 -1.200000e+00 -1.203735e-03 -1.000000e-01 -1.549685e-04 -2.000000e-01 -2.491282e-04 -3.000000e-01 -3.621175e-04 -4.000000e-01 -4.984905e-04 -5.000000e-01 -6.574256e-04 -6.000000e-01 -8.368378e-04 -7.000000e-01 -1.034283e-03 -8.000000e-01 -1.247420e-03 -9.000000e-01 -1.474375e-03 -1.000000e+00 -1.714239e-03 -1.100000e+00 -1.967841e-03 -1.200000e+00 -2.238793e-03 -1.000000e-01 -5.686264e-04 -2.000000e-01 -8.429179e-04 -3.000000e-01 -1.065867e-03 -4.000000e-01 -1.290773e-03 -5.000000e-01 -1.523843e-03 -6.000000e-01 -1.765604e-03 -7.000000e-01 -2.015531e-03 -8.000000e-01 -2.272937e-03 -9.000000e-01 -2.537349e-03 -1.000000e+00 -2.809054e-03 -1.100000e+00 -3.090040e-03 -1.200000e+00 -3.385297e-03 -1.000000e-01 -1.086977e-03 -2.000000e-01 -1.656781e-03 -3.000000e-01 -1.995893e-03 -4.000000e-01 -2.285579e-03 -5.000000e-01 -2.565411e-03 -6.000000e-01 -2.844174e-03 -7.000000e-01 -3.124581e-03 -8.000000e-01 -3.407622e-03 -9.000000e-01 -3.693818e-03 -1.000000e+00 -3.984069e-03 -1.100000e+00 -4.280833e-03 -1.200000e+00 -4.589701e-03 -1.000000e-01 -1.574189e-03 -2.000000e-01 -2.504213e-03 -3.000000e-01 -3.012338e-03 -4.000000e-01 -3.370575e-03 -5.000000e-01 -3.690079e-03 -6.000000e-01 -3.997000e-03 -7.000000e-01 -4.299341e-03 -8.000000e-01 -4.600280e-03 -9.000000e-01 -4.901406e-03 -1.000000e+00 -5.204133e-03 -1.100000e+00 -5.511135e-03 -1.200000e+00 -5.828196e-03 -1.000000e-01 -2.011992e-03 -2.000000e-01 -3.305813e-03 -3.000000e-01 -4.046128e-03 -4.000000e-01 -4.495270e-03 -5.000000e-01 -4.857153e-03 -6.000000e-01 -5.190136e-03 -7.000000e-01 -5.511099e-03 -8.000000e-01 -5.826437e-03 -9.000000e-01 -6.139159e-03 -1.000000e+00 -6.451299e-03 -1.100000e+00 -6.765687e-03 -1.200000e+00 -7.088064e-03 -1.000000e-01 -2.406050e-03 -2.000000e-01 -4.044688e-03 -3.000000e-01 -5.056892e-03 -4.000000e-01 -5.631826e-03 -5.000000e-01 -6.044962e-03 -6.000000e-01 -6.405357e-03 -7.000000e-01 -6.744132e-03 -8.000000e-01 -7.072396e-03 -9.000000e-01 -7.395090e-03 -1.000000e+00 -7.715076e-03 -1.100000e+00 -8.035387e-03 -1.200000e+00 -8.361602e-03 -1.000000e-01 -2.764419e-03 -2.000000e-01 -4.725470e-03 -3.000000e-01 -6.021583e-03 -4.000000e-01 -6.761599e-03 -5.000000e-01 -7.240069e-03 -6.000000e-01 -7.631563e-03 -7.000000e-01 -7.988799e-03 -8.000000e-01 -8.329639e-03 -9.000000e-01 -8.661621e-03 -1.000000e+00 -8.988710e-03 -1.100000e+00 -9.314254e-03 -1.200000e+00 -9.643637e-03 -1.000000e-01 -3.094289e-03 -2.000000e-01 -5.357200e-03 -3.000000e-01 -6.932087e-03 -4.000000e-01 -7.870787e-03 -5.000000e-01 -8.433142e-03 -6.000000e-01 -8.861304e-03 -7.000000e-01 -9.238622e-03 -8.000000e-01 -9.592364e-03 -9.000000e-01 -9.933499e-03 -1.000000e+00 -1.026742e-02 -1.100000e+00 -1.059795e-02 -1.200000e+00 -1.093030e-02 -1.000000e-01 -3.401616e-03 -2.000000e-01 -5.948752e-03 -3.000000e-01 -7.790505e-03 -4.000000e-01 -8.949355e-03 -5.000000e-01 -9.617087e-03 -6.000000e-01 -1.008911e-02 -7.000000e-01 -1.048881e-02 -8.000000e-01 -1.085620e-02 -9.000000e-01 -1.120669e-02 -1.000000e+00 -1.154744e-02 -1.100000e+00 -1.188296e-02 -1.200000e+00 -1.221838e-02 -1.000000e-01 -8.631823e-07 -2.000000e-01 -1.438465e-06 -3.000000e-01 -2.301954e-06 -4.000000e-01 -3.640786e-06 -5.000000e-01 -5.713048e-06 -6.000000e-01 -8.903592e-06 -7.000000e-01 -1.378053e-05 -8.000000e-01 -2.116612e-05 -9.000000e-01 -3.222254e-05 -1.000000e+00 -4.855402e-05 -1.100000e+00 -7.233194e-05 -1.200000e+00 -1.064627e-04 -1.000000e-01 -4.738432e-06 -2.000000e-01 -7.771790e-06 -3.000000e-01 -1.215502e-05 -4.000000e-01 -1.871780e-05 -5.000000e-01 -2.844887e-05 -6.000000e-01 -4.263590e-05 -7.000000e-01 -6.288044e-05 -8.000000e-01 -9.105910e-05 -9.000000e-01 -1.292439e-04 -1.000000e+00 -1.796264e-04 -1.100000e+00 -2.445230e-04 -1.200000e+00 -3.265444e-04 -1.000000e-01 -2.268007e-05 -2.000000e-01 -3.671152e-05 -3.000000e-01 -5.476309e-05 -4.000000e-01 -7.941424e-05 -5.000000e-01 -1.123910e-04 -6.000000e-01 -1.553284e-04 -7.000000e-01 -2.097071e-04 -8.000000e-01 -2.767683e-04 -9.000000e-01 -3.574843e-04 -1.000000e+00 -4.526342e-04 -1.100000e+00 -5.630370e-04 -1.200000e+00 -6.899760e-04 -1.000000e-01 -7.795475e-05 -2.000000e-01 -1.282318e-04 -3.000000e-01 -1.771714e-04 -4.000000e-01 -2.351306e-04 -5.000000e-01 -3.039484e-04 -6.000000e-01 -3.843620e-04 -7.000000e-01 -4.767616e-04 -8.000000e-01 -5.813319e-04 -9.000000e-01 -6.981353e-04 -1.000000e+00 -8.272296e-04 -1.100000e+00 -9.688989e-04 -1.200000e+00 -1.124067e-03 -1.000000e-01 -1.673901e-04 -2.000000e-01 -2.919364e-04 -3.000000e-01 -3.883247e-04 -4.000000e-01 -4.824540e-04 -5.000000e-01 -5.840218e-04 -6.000000e-01 -6.949196e-04 -7.000000e-01 -8.156634e-04 -8.000000e-01 -9.464442e-04 -9.000000e-01 -1.087345e-03 -1.000000e+00 -1.238445e-03 -1.100000e+00 -1.399981e-03 -1.200000e+00 -1.572708e-03 -1.000000e-01 -2.588371e-04 -2.000000e-01 -4.692309e-04 -3.000000e-01 -6.339755e-04 -4.000000e-01 -7.697756e-04 -5.000000e-01 -9.000296e-04 -6.000000e-01 -1.034706e-03 -7.000000e-01 -1.176490e-03 -8.000000e-01 -1.326331e-03 -9.000000e-01 -1.484682e-03 -1.000000e+00 -1.651817e-03 -1.100000e+00 -1.828002e-03 -1.200000e+00 -2.013786e-03 -1.000000e-01 -3.361522e-04 -2.000000e-01 -6.223509e-04 -3.000000e-01 -8.590640e-04 -4.000000e-01 -1.051343e-03 -5.000000e-01 -1.216291e-03 -6.000000e-01 -1.374418e-03 -7.000000e-01 -1.535064e-03 -8.000000e-01 -1.701326e-03 -9.000000e-01 -1.874467e-03 -1.000000e+00 -2.055136e-03 -1.100000e+00 -2.243738e-03 -1.200000e+00 -2.440708e-03 -1.000000e-01 -3.982960e-04 -2.000000e-01 -7.475021e-04 -3.000000e-01 -1.047766e-03 -4.000000e-01 -1.300607e-03 -5.000000e-01 -1.512522e-03 -6.000000e-01 -1.700307e-03 -7.000000e-01 -1.881387e-03 -8.000000e-01 -2.063944e-03 -9.000000e-01 -2.251100e-03 -1.000000e+00 -2.444264e-03 -1.100000e+00 -2.644189e-03 -1.200000e+00 -2.851384e-03 -1.000000e-01 -4.480843e-04 -2.000000e-01 -8.492217e-04 -3.000000e-01 -1.203480e-03 -4.000000e-01 -1.511457e-03 -5.000000e-01 -1.775348e-03 -6.000000e-01 -2.002718e-03 -7.000000e-01 -2.209489e-03 -8.000000e-01 -2.410171e-03 -9.000000e-01 -2.611741e-03 -1.000000e+00 -2.817167e-03 -1.100000e+00 -3.027893e-03 -1.200000e+00 -3.244733e-03 -1.000000e-01 -4.882235e-04 -2.000000e-01 -9.322170e-04 -3.000000e-01 -1.331985e-03 -4.000000e-01 -1.687793e-03 -5.000000e-01 -2.000500e-03 -6.000000e-01 -2.272881e-03 -7.000000e-01 -2.513269e-03 -8.000000e-01 -2.736309e-03 -9.000000e-01 -2.953975e-03 -1.000000e+00 -3.172185e-03 -1.100000e+00 -3.393685e-03 -1.200000e+00 -3.619898e-03 -1.000000e-01 -5.207382e-04 -2.000000e-01 -1.000148e-03 -3.000000e-01 -1.438171e-03 -4.000000e-01 -1.834903e-03 -5.000000e-01 -2.190712e-03 -6.000000e-01 -2.506681e-03 -7.000000e-01 -2.786141e-03 -8.000000e-01 -3.037894e-03 -9.000000e-01 -3.275081e-03 -1.000000e+00 -3.507574e-03 -1.100000e+00 -3.740411e-03 -1.200000e+00 -3.976102e-03 -1.000000e-01 -5.471142e-04 -2.000000e-01 -1.055787e-03 -3.000000e-01 -1.525902e-03 -4.000000e-01 -1.957446e-03 -5.000000e-01 -2.350558e-03 -6.000000e-01 -2.705694e-03 -7.000000e-01 -3.024166e-03 -8.000000e-01 -3.309845e-03 -9.000000e-01 -3.571700e-03 -1.000000e+00 -3.821301e-03 -1.100000e+00 -4.066818e-03 -1.200000e+00 -4.312571e-03 ngspice-26/tests/bsim4/pmos/reference/acFreq_diomod.standard0000644000265600020320000000710512264261473023606 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981.072 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 5011.872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810.72 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 50118.72 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 100000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 398107.2 1.42948457562307e-14 1.06448384724498e-14 3.54785452562003e-15 501187.2 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 1000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448391595228e-14 3.54785483061325e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 3981072 1.42948417584395e-14 1.06448384724498e-14 3.54785452562003e-15 5011872 1.42948446924018e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948463846311e-14 1.06448396032868e-14 3.54785509563488e-15 10000000 1.42948449884757e-14 1.06448396362868e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.06448433989009e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448391595228e-14 3.54785483061324e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948417584395e-14 1.06448384724498e-14 3.54785412584092e-15 50118720 1.42948446924018e-14 1.06448383371022e-14 3.54785497933912e-15 63095730 1.429484429045e-14 1.0644838986873e-14 3.54785421141287e-15 79432820 1.4294844380989e-14 1.06448396032868e-14 3.54785509563488e-15 100000000 1.42948418053768e-14 1.06448380447374e-14 3.54785334351477e-15 ngspice-26/tests/bsim4/pmos/reference/acFreq_igcmod.standard0000644000265600020320000000710412264261473023574 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.42948465800251e-14 1.06448412278362e-14 3.54785493506421e-15 1258.925 1.4294849014615e-14 1.0644844663114e-14 3.54785593597329e-15 1584.893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995.262 1.42948476769301e-14 1.06448471361666e-14 3.54785562827763e-15 2511.886 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 3162.278 1.42948435243749e-14 1.06448385988508e-14 3.54785475444577e-15 3981.072 1.42948457562307e-14 1.0644842470241e-14 3.54785452562003e-15 5011.872 1.42948478679606e-14 1.0644841512661e-14 3.54785497933912e-15 6309.573 1.42948493353221e-14 1.0644841509309e-14 3.54785421141287e-15 7943.282 1.42948483882732e-14 1.06448416069289e-14 3.54785509563488e-15 10000 1.42948465800251e-14 1.06448412278362e-14 3.54785493506421e-15 12589.25 1.4294849014615e-14 1.0644844663114e-14 3.54785593597329e-15 15848.93 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952.62 1.42948476769301e-14 1.06448471361666e-14 3.54785562827763e-15 25118.86 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622.78 1.42948435243749e-14 1.06448385988508e-14 3.54785475444577e-15 39810.72 1.42948457562307e-14 1.0644842470241e-14 3.54785452562003e-15 50118.72 1.42948478679606e-14 1.0644841512661e-14 3.54785497933912e-15 63095.73 1.42948493353221e-14 1.0644841509309e-14 3.54785421141287e-15 79432.82 1.42948483882732e-14 1.06448416069289e-14 3.54785509563488e-15 100000 1.42948465800251e-14 1.06448412278362e-14 3.54785493506421e-15 125892.5 1.4294849014615e-14 1.0644844663114e-14 3.54785593597329e-15 158489.3 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 199526.2 1.42948476769301e-14 1.06448471361666e-14 3.54785562827763e-15 251188.6 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 316227.8 1.42948435243749e-14 1.06448385988508e-14 3.54785475444577e-15 398107.2 1.42948457562307e-14 1.0644842470241e-14 3.54785452562003e-15 501187.2 1.42948478679606e-14 1.0644841512661e-14 3.54785497933912e-15 630957.3 1.42948493353221e-14 1.0644841509309e-14 3.54785421141287e-15 794328.2 1.42948483882732e-14 1.06448416069289e-14 3.54785509563488e-15 1000000 1.42948465800251e-14 1.06448412278362e-14 3.54785493506421e-15 1258925 1.4294849014615e-14 1.0644844663114e-14 3.54785593597329e-15 1584893 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 1995262 1.42948476769301e-14 1.06448471361666e-14 3.54785562827763e-15 2511886 1.42948470943482e-14 1.06448442438161e-14 3.54785520806153e-15 3162278 1.42948435243749e-14 1.06448385988508e-14 3.54785475444577e-15 3981072 1.42948457562307e-14 1.0644842470241e-14 3.54785452562003e-15 5011872 1.42948478679606e-14 1.0644841512661e-14 3.54785497933912e-15 6309573 1.42948493353221e-14 1.0644841509309e-14 3.54785421141287e-15 7943282 1.42948483882732e-14 1.06448416069289e-14 3.54785509563488e-15 10000000 1.42948465800251e-14 1.06448412278362e-14 3.5478549350642e-15 12589250 1.4294849014615e-14 1.0644844663114e-14 3.54785593597329e-15 15848930 1.42948461770587e-14 1.06448405435312e-14 3.54785540460901e-15 19952620 1.42948476769301e-14 1.06448471361666e-14 3.54785562827763e-15 25118860 1.42948470943483e-14 1.06448442438161e-14 3.54785520806154e-15 31622780 1.42948435243749e-14 1.06448385988508e-14 3.5478542511537e-15 39810720 1.42948457562307e-14 1.0644842470241e-14 3.54785452562003e-15 50118720 1.42948478679606e-14 1.0644841512661e-14 3.54785497933912e-15 63095730 1.4294846812886e-14 1.0644841509309e-14 3.54785421141287e-15 79432820 1.42948463846311e-14 1.06448416069289e-14 3.54785509563488e-15 100000000 1.42948449884757e-14 1.06448396362868e-14 3.54785493506421e-15 ngspice-26/tests/bsim4/pmos/parameters/0000755000265600020320000000000012264261473017532 5ustar andreasadminngspice-26/tests/bsim4/pmos/parameters/pmosParameters0000644000265600020320000000762512264261473022471 0ustar andreasadmin+ binunit = (1) + paramchk= (1) + mobmod = (0) + capmod = (2) + igcmod = (1) + igbmod = (1) + geomod = (1) + diomod = (1) + rdsmod = (0) + rbodymod= (1) + rgatemod= (1) + permod = (1) + acnqsmod= (0) + trnqsmod= (0) + tnom = (27) + toxe = (1.95e-009) + toxp = (1.2e-009) + toxm = (1.95e-009) + dtox = (0.75e-9) + epsrox = (3.9) + wint = (5e-009) + lint = (5.25e-009) + ll = (0) + wl = (0) + lln = (1) + wln = (1) + lw = (0) + ww = (0) + lwn = (1) + wwn = (1) + lwl = (0) + wwl = (0) + xpart = (0) + toxref = (1.95e-009) + xl = (-30e-9) + vth0 = (-0.365) + k1 = (0.4) + k2 = (-0.01) + k3 = (0) + k3b = (0) + w0 = (2.5e-006) + dvt0 = (1) + dvt1 = (2) + dvt2 = (-0.032) + dvt0w = (0) + dvt1w = (0) + dvt2w = (0) + dsub = (0.1) + minv = (0.05) + voffl = (0) + dvtp0 = (1e-009) + dvtp1 = (0.05) + lpe0 = (0) + lpeb = (0) + xj = (1.96e-008) + ngate = (2e+020) + ndep = (1.87e+018) + nsd = (2e+020) + phin = (0) + cdsc = (0.000) + cdscb = (0) + cdscd = (0) + cit = (0) + voff = (-0.126) + nfactor = (1.9) + eta0 = (0.0058) + etab = (0) + vfb = (0.55) + u0 = (0.00574) + ua = (2.0e-009) + ub = (0.5e-018) + uc = (0) + vsat = (70000) + a0 = (1.0) + ags = (1e-020) + a1 = (0) + a2 = (1) + b0 = (-1e-020) + b1 = (0) + keta = (-0.047) + dwg = (0) + dwb = (0) + pclm = (0.12) + pdiblc1 = (0.001) + pdiblc2 = (0.001) + pdiblcb = (3.4e-008) + drout = (0.56) + pvag = (1e-020) + delta = (0.01) + pscbe1 = (8.14e+008) + pscbe2 = (9.58e-007) + fprout = (0.2) + pdits = (0.08) + pditsd = (0.23) + pditsl = (2.3e+006) + rsh = (5) + rdsw = (165) + rsw = (85) + rdw = (85) + rdswmin = (0) + rdwmin = (0) + rswmin = (0) + prwg = (3.22e-008) + prwb = (6.8e-011) + wr = (1) + alpha0 = (0.074) + alpha1 = (0.005) + beta0 = (30) + agidl = (0.0002) + bgidl = (2.1e+009) + cgidl = (0.0002) + egidl = (0.8) + aigbacc = (0.012) + bigbacc = (0.0028) + cigbacc = (0.002) + nigbacc = (1) + aigbinv = (0.014) + bigbinv = (0.004) + cigbinv = (0.004) + eigbinv = (1.1) + nigbinv = (3) + aigc = (0.69) + bigc = (0.0012) + cigc = (0.0008) + aigsd = (0.0087) + bigsd = (0.0012) + cigsd = (0.0008) + nigc = (1) + poxedge = (1) + pigcd = (1) + ntox = (1) + xrcrg1 = (12) + xrcrg2 = (5) + cgso = (1.5e-010) + cgdo = (1.5e-010) + cgbo = (2.56e-011) + cgdl = (2.653e-10) + cgsl = (2.653e-10) + ckappas = (0.03) + ckappad = (0.03) + acde = (1) + moin = (15) + noff = (0.9) + voffcv = (0.02) + kt1 = (-0.11) + kt1l = (0) + kt2 = (0.022) + ute = (-1.5) + ua1 = (4.31e-009) + ub1 = (7.61e-018) + uc1 = (-5.6e-011) + prt = (0) + at = (33000) + fnoimod = (1) + tnoimod = (0) + jss = (0.0001) + jsws = (1e-011) + jswgs = (1e-010) + njs = (1) + ijthsfwd= (0.01) + ijthsrev= (0.001) + bvs = (10) + xjbvs = (1) + jsd = (0.0001) + jswd = (1e-011) + jswgd = (1e-010) + njd = (1) + ijthdfwd= (0.01) + ijthdrev= (0.001) + bvd = (10) + xjbvd = (1) + pbs = (1) + cjs = (0.0005) + mjs = (0.5) + pbsws = (1) + cjsws = (5e-010) + mjsws = (0.33) + pbswgs = (1) + cjswgs = (3e-010) + mjswgs = (0.33) + pbd = (1) + cjd = (0.0005) + mjd = (0.5) + pbswd = (1) + cjswd = (5e-010) + mjswd = (0.33) + pbswgd = (1) + cjswgd = (5e-010) + mjswgd = (0.33) + tpb = (0.005) + tcj = (0.001) + tpbsw = (0.005) + tcjsw = (0.001) + tpbswg = (0.005) + tcjswg = (0.001) + xtis = (3) + xtid = (3) + dmcg = (0e-006) + dmci = (0e-006) + dmdg = (0e-006) + dmcgt = (0e-007) + dwj = (0.0e-008) + xgw = (0e-007) + xgl = (0e-008) + rshg = (0.4) + gbmin = (1e-010) + rbpb = (5) + rbpd = (15) + rbps = (15) + rbdb = (15) + rbsb = (15) + ngcon = (1) ngspice-26/tests/bsim4/pmos/qaSpec0000644000265600020320000003274412264261473016540 0ustar andreasadmin // // Test specification for bsim4 (version 4.5.0) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef spice nTypeSelectionArguments pmos level=14 version=4.7.0 pTypeSelectionArguments pmos level=14 version=4.7.0 `endif `ifdef ngspice nTypeSelectionArguments pmos level=14 version=4.7.0 pTypeSelectionArguments pmos level=14 version=4.7.0 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 checkPolarity no symmetricPins d s scaleParameters m // // Specific tests // test dcSweep_lw1 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test dcSweep_lw1_vb1 biases V(s)=0 V(b)=-0.1 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test dcSweep_lw1_vb2 biases V(s)=0 V(b)=-0.2 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test dcSweep_lw2 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.1e-6 modelParameters parameters/pmosParameters test dcSweep_lw3 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.24e-6 modelParameters parameters/pmosParameters test dcSweep_lw4 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test dcSweep_lw5 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.1e-6 modelParameters parameters/pmosParameters test dcSweep_lw6 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.24e-6 modelParameters parameters/pmosParameters test dcSweep_lw7 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.06e-6 modelParameters parameters/pmosParameters test dcSweep_lw8 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.1e-6 modelParameters parameters/pmosParameters test dcSweep_lw9 biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.24e-6 modelParameters parameters/pmosParameters test dcSweep_sa biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sa=0.3e-6 modelParameters parameters/pmosParameters test dcSweep_sb biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sb=0.4e-6 modelParameters parameters/pmosParameters test dcSweep_sca biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sca=5.0 modelParameters parameters/pmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_scb biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 scb=0.01 modelParameters parameters/pmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_scc biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 scc=0.0001 modelParameters parameters/pmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_nrs biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 nrs=2.0 modelParameters parameters/pmosParameters test dcSweep_nrd biases V(s)=0 V(b)=0 biasList V(g)=-0.1,-0.2,-0.3,-0.4,-0.5,-0.6,-0.7,-0.8,-0.9,-1.0,-1.1,-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 nrd=2.0 modelParameters parameters/pmosParameters test acVd temperature 27 150 biases V(s)=0 V(b)=0 V(g)=-1.2 biasSweep V(d)=-0.1,-1.2,-0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test acFreq temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters test acFreq_mobmod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters mobmod=1 test acFreq_capmod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters capmod=1 test acFreq_trnqsmod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters trnqsmod=1 test acFreq_acnqsmod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters acnqsmod=1 test acFreq_xpart temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters xpart=1 test acFreq_geomod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters geomod=0 test acFreq_wpemod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test acFreq_igcmod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters igcmod=0 test acFreq_diomod temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.2 V(g)=-1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters diomod=0 test noise1 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters fnoimod=0 tnoimod=0 kf=1e-30 af=1.2 ef=1.1 test noise2 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters fnoimod=1 tnoimod=1 noia=6.188e40 noib=1.5e25 noic=8.75 em=4.1e7 ef=1.1 test noise3 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters fnoimod=1 tnoimod=0 noia=6.188e40 noib=1.5e25 noic=8.75 em=4.1e7 ef=1.1 test noise4 temperature 27 biases V(s)=0 V(b)=0 V(d)=-1.0 biasList V(g)=-0.6,-0.8,-1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/pmosParameters modelParameters fnoimod=0 tnoimod=1 kf=1e-30 af=1.2 ef=1.1 ngspice-26/tests/bsim4/pmos/run0000644000265600020320000000010612264261473016113 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean ngspice | tee cmcqa_pmos.log ngspice-26/tests/bsim4/Makefile.am0000644000265600020320000000052112264261473016443 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in clean-local: rm -rf nmos/results pmos/results ngspiceCkt bsim4.out ngspice-26/tests/bsim4/nmos/0000755000265600020320000000000012264261473015365 5ustar andreasadminngspice-26/tests/bsim4/nmos/reference/0000755000265600020320000000000012264261473017323 5ustar andreasadminngspice-26/tests/bsim4/nmos/reference/acFreq_geomod.standard0000644000265600020320000000712112264261473023601 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918141354341e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918146339409e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918311187393e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918141354341e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918146339409e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918311187393e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918141354341e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918146339409e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918311187393e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918141354341e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918146339409e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918311187393e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918141354341e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918146339409e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/noise4.standard0000644000265600020320000000635312264261473022255 0ustar andreasadminFreq N(d) 1000 1.351598e-19 1258.925 1.04984e-19 1584.893 8.156012e-20 1995.262 6.337738e-20 2511.886 4.926309e-20 3162.278 3.830691e-20 3981.072 2.98022e-20 5011.872 2.320045e-20 6309.573 1.807586e-20 7943.282 1.409791e-20 10000 1.101004e-20 12589.25 8.613089e-21 15848.93 6.752463e-21 19952.62 5.308157e-21 25118.86 4.187018e-21 31622.78 3.316738e-21 39810.72 2.641185e-21 50118.72 2.11679e-21 63095.73 1.709729e-21 79432.82 1.393749e-21 100000 1.148471e-21 125892.5 9.580741e-22 158489.3 8.102793e-22 199526.2 6.95554e-22 251188.6 6.064988e-22 316227.8 5.3737e-22 398107.2 4.837089e-22 501187.2 4.420547e-22 630957.3 4.097207e-22 794328.2 3.846216e-22 1000000 3.651384e-22 1258925 3.500147e-22 1584893 3.382749e-22 1995262 3.291619e-22 2511886 3.22088e-22 3162278 3.165969e-22 3981072 3.123345e-22 5011872 3.090258e-22 6309573 3.064574e-22 7943282 3.044637e-22 10000000 3.029161e-22 12589250 3.017148e-22 15848930 3.007823e-22 19952620 3.000584e-22 25118860 2.994965e-22 31622780 2.990603e-22 39810720 2.987217e-22 50118720 2.984589e-22 63095730 2.982549e-22 79432820 2.980965e-22 100000000 2.979736e-22 1000 2.308127e-19 1258.925 1.792284e-19 1584.893 1.391862e-19 1995.262 1.081036e-19 2511.886 8.397574e-20 3162.278 6.52466e-20 3981.072 5.070816e-20 5011.872 3.942274e-20 6309.573 3.066246e-20 7943.282 2.386232e-20 10000 1.858373e-20 12589.25 1.448624e-20 15848.93 1.130557e-20 19952.62 8.836593e-21 25118.86 6.920053e-21 31622.78 5.432345e-21 39810.72 4.277515e-21 50118.72 3.381082e-21 63095.73 2.685228e-21 79432.82 2.145074e-21 100000 1.725781e-21 125892.5 1.400306e-21 158489.3 1.147657e-21 199526.2 9.515383e-22 251188.6 7.993022e-22 316227.8 6.811293e-22 398107.2 5.893979e-22 501187.2 5.181917e-22 630957.3 4.629181e-22 794328.2 4.200121e-22 1000000 3.867064e-22 1258925 3.60853e-22 1584893 3.407844e-22 1995262 3.252062e-22 2511886 3.131136e-22 3162278 3.037268e-22 3981072 2.964403e-22 5011872 2.907842e-22 6309573 2.863937e-22 7943282 2.829855e-22 10000000 2.8034e-22 12589250 2.782864e-22 15848930 2.766923e-22 19952620 2.754548e-22 25118860 2.744943e-22 31622780 2.737487e-22 39810720 2.731699e-22 50118720 2.727206e-22 63095730 2.723719e-22 79432820 2.721011e-22 100000000 2.71891e-22 1000 3.303481e-19 1258.925 2.564887e-19 1584.893 1.991556e-19 1995.262 1.546509e-19 2511.886 1.201043e-19 3162.278 9.328754e-20 3981.072 7.247114e-20 5011.872 5.631247e-20 6309.573 4.376934e-20 7943.282 3.403278e-20 10000 2.64748e-20 12589.25 2.060794e-20 15848.93 1.605381e-20 19952.62 1.251868e-20 25118.86 9.77454e-21 31622.78 7.644412e-21 39810.72 5.990906e-21 50118.72 4.707377e-21 63095.73 3.711042e-21 79432.82 2.937639e-21 100000 2.337287e-21 125892.5 1.871266e-21 158489.3 1.509519e-21 199526.2 1.228713e-21 251188.6 1.010738e-21 316227.8 8.415364e-22 398107.2 7.101938e-22 501187.2 6.082395e-22 630957.3 5.290977e-22 794328.2 4.676641e-22 1000000 4.199765e-22 1258925 3.829591e-22 1584893 3.542245e-22 1995262 3.319193e-22 2511886 3.14605e-22 3162278 3.011648e-22 3981072 2.907319e-22 5011872 2.826334e-22 6309573 2.763469e-22 7943282 2.714671e-22 10000000 2.676791e-22 12589250 2.647387e-22 15848930 2.624562e-22 19952620 2.606845e-22 25118860 2.593091e-22 31622780 2.582415e-22 39810720 2.574128e-22 50118720 2.567695e-22 63095730 2.562702e-22 79432820 2.558826e-22 100000000 2.555817e-22 ngspice-26/tests/bsim4/nmos/reference/dcSweep_sa.standard0000644000265600020320000002575212264261473023135 0ustar andreasadminV(d) I(d) 1.000000e-01 5.381036e-07 2.000000e-01 8.979352e-07 3.000000e-01 1.458523e-06 4.000000e-01 2.345919e-06 5.000000e-01 3.743979e-06 6.000000e-01 5.928842e-06 7.000000e-01 9.309998e-06 8.000000e-01 1.448406e-05 9.000000e-01 2.230339e-05 1.000000e+00 3.396036e-05 1.100000e+00 5.108560e-05 1.200000e+00 7.585441e-05 1.000000e-01 6.175374e-06 2.000000e-01 9.996042e-06 3.000000e-01 1.566575e-05 4.000000e-01 2.417709e-05 5.000000e-01 3.680960e-05 6.000000e-01 5.527369e-05 7.000000e-01 8.179037e-05 8.000000e-01 1.191243e-04 9.000000e-01 1.705364e-04 1.000000e+00 2.396239e-04 1.100000e+00 3.300467e-04 1.200000e+00 4.451953e-04 1.000000e-01 5.603719e-05 2.000000e-01 8.564974e-05 3.000000e-01 1.256776e-04 4.000000e-01 1.802895e-04 5.000000e-01 2.531861e-04 6.000000e-01 3.478281e-04 7.000000e-01 4.670448e-04 8.000000e-01 6.126440e-04 9.000000e-01 7.852036e-04 1.000000e+00 9.841360e-04 1.100000e+00 1.208010e-03 1.200000e+00 1.455038e-03 1.000000e-01 3.365708e-04 2.000000e-01 4.731344e-04 3.000000e-01 6.258448e-04 4.000000e-01 8.032825e-04 5.000000e-01 1.005617e-03 6.000000e-01 1.231184e-03 7.000000e-01 1.477470e-03 8.000000e-01 1.741619e-03 9.000000e-01 2.020814e-03 1.000000e+00 2.312608e-03 1.100000e+00 2.615194e-03 1.200000e+00 2.927631e-03 1.000000e-01 1.078590e-03 2.000000e-01 1.427275e-03 3.000000e-01 1.711529e-03 4.000000e-01 1.997733e-03 5.000000e-01 2.291821e-03 6.000000e-01 2.593736e-03 7.000000e-01 2.902373e-03 8.000000e-01 3.216532e-03 9.000000e-01 3.535218e-03 1.000000e+00 3.857820e-03 1.100000e+00 4.184298e-03 1.200000e+00 4.515363e-03 1.000000e-01 1.966489e-03 2.000000e-01 2.694690e-03 3.000000e-01 3.087158e-03 4.000000e-01 3.431488e-03 5.000000e-01 3.765245e-03 6.000000e-01 4.096264e-03 7.000000e-01 4.426871e-03 8.000000e-01 4.757875e-03 9.000000e-01 5.089625e-03 1.000000e+00 5.422472e-03 1.100000e+00 5.757099e-03 1.200000e+00 6.094820e-03 1.000000e-01 2.647620e-03 2.000000e-01 3.934138e-03 3.000000e-01 4.490970e-03 4.000000e-01 4.888747e-03 5.000000e-01 5.250041e-03 6.000000e-01 5.598883e-03 7.000000e-01 5.942449e-03 8.000000e-01 6.283548e-03 9.000000e-01 6.623523e-03 1.000000e+00 6.963260e-03 1.100000e+00 7.303747e-03 1.200000e+00 7.646505e-03 1.000000e-01 3.121627e-03 2.000000e-01 4.977198e-03 3.000000e-01 5.828211e-03 4.000000e-01 6.309533e-03 5.000000e-01 6.705044e-03 6.000000e-01 7.073379e-03 7.000000e-01 7.430342e-03 8.000000e-01 7.781726e-03 9.000000e-01 8.130143e-03 1.000000e+00 8.477066e-03 1.100000e+00 8.823745e-03 1.200000e+00 9.171809e-03 1.000000e-01 3.459366e-03 2.000000e-01 5.786304e-03 3.000000e-01 7.049916e-03 4.000000e-01 7.676678e-03 5.000000e-01 8.123155e-03 6.000000e-01 8.516979e-03 7.000000e-01 8.890143e-03 8.000000e-01 9.253415e-03 9.000000e-01 9.611348e-03 1.000000e+00 9.966270e-03 1.100000e+00 1.031979e-02 1.200000e+00 1.067365e-02 1.000000e-01 3.709371e-03 2.000000e-01 6.404043e-03 3.000000e-01 8.109684e-03 4.000000e-01 8.973978e-03 5.000000e-01 9.500490e-03 6.000000e-01 9.929411e-03 7.000000e-01 1.032288e-02 8.000000e-01 1.070018e-02 9.000000e-01 1.106892e-02 1.000000e+00 1.143272e-02 1.100000e+00 1.179374e-02 1.200000e+00 1.215392e-02 1.000000e-01 3.900511e-03 2.000000e-01 6.883659e-03 3.000000e-01 8.983496e-03 4.000000e-01 1.017591e-02 5.000000e-01 1.082983e-02 6.000000e-01 1.130891e-02 7.000000e-01 1.172853e-02 8.000000e-01 1.212265e-02 9.000000e-01 1.250374e-02 1.000000e+00 1.287741e-02 1.100000e+00 1.324664e-02 1.200000e+00 1.361368e-02 1.000000e-01 4.050406e-03 2.000000e-01 7.264261e-03 3.000000e-01 9.687450e-03 4.000000e-01 1.124967e-02 5.000000e-01 1.209852e-02 6.000000e-01 1.265156e-02 7.000000e-01 1.310595e-02 8.000000e-01 1.352068e-02 9.000000e-01 1.391611e-02 1.000000e+00 1.430081e-02 1.100000e+00 1.467905e-02 1.200000e+00 1.505357e-02 1.000000e-01 7.321028e-08 2.000000e-01 1.375764e-07 3.000000e-01 2.536872e-07 4.000000e-01 4.640314e-07 5.000000e-01 8.424837e-07 6.000000e-01 1.516439e-06 7.000000e-01 2.700786e-06 8.000000e-01 4.748026e-06 9.000000e-01 8.217731e-06 1.000000e+00 1.396616e-05 1.100000e+00 2.325376e-05 1.200000e+00 3.786694e-05 1.000000e-01 2.075842e-06 2.000000e-01 3.741078e-06 3.000000e-01 6.542583e-06 4.000000e-01 1.120680e-05 5.000000e-01 1.879079e-05 6.000000e-01 3.078970e-05 7.000000e-01 4.922683e-05 8.000000e-01 7.671926e-05 9.000000e-01 1.165001e-04 1.000000e+00 1.723658e-04 1.100000e+00 2.485040e-04 1.200000e+00 3.491799e-04 1.000000e-01 3.962783e-05 2.000000e-01 6.367046e-05 3.000000e-01 9.807032e-05 4.000000e-01 1.466088e-04 5.000000e-01 2.131723e-04 6.000000e-01 3.016524e-04 7.000000e-01 4.154759e-04 8.000000e-01 5.570550e-04 9.000000e-01 7.273784e-04 1.000000e+00 9.259365e-04 1.100000e+00 1.151040e-03 1.200000e+00 1.400437e-03 1.000000e-01 3.472832e-04 2.000000e-01 4.836094e-04 3.000000e-01 6.416803e-04 4.000000e-01 8.260673e-04 5.000000e-01 1.036062e-03 6.000000e-01 1.269272e-03 7.000000e-01 1.522506e-03 8.000000e-01 1.792368e-03 9.000000e-01 2.075732e-03 1.000000e+00 2.370096e-03 1.100000e+00 2.673833e-03 1.200000e+00 2.986366e-03 1.000000e-01 1.272216e-03 2.000000e-01 1.594399e-03 3.000000e-01 1.882878e-03 4.000000e-01 2.173914e-03 5.000000e-01 2.470903e-03 6.000000e-01 2.773539e-03 7.000000e-01 3.080925e-03 8.000000e-01 3.392216e-03 9.000000e-01 3.706839e-03 1.000000e+00 4.024657e-03 1.100000e+00 4.346137e-03 1.200000e+00 4.672512e-03 1.000000e-01 2.461389e-03 2.000000e-01 3.044287e-03 3.000000e-01 3.409153e-03 4.000000e-01 3.742685e-03 5.000000e-01 4.068030e-03 6.000000e-01 4.390920e-03 7.000000e-01 4.713334e-03 8.000000e-01 5.036113e-03 9.000000e-01 5.359768e-03 1.000000e+00 5.684901e-03 1.100000e+00 6.012529e-03 1.200000e+00 6.344369e-03 1.000000e-01 3.406496e-03 2.000000e-01 4.485676e-03 3.000000e-01 4.947536e-03 4.000000e-01 5.316437e-03 5.000000e-01 5.661196e-03 6.000000e-01 5.997142e-03 7.000000e-01 6.329412e-03 8.000000e-01 6.660187e-03 9.000000e-01 6.990627e-03 1.000000e+00 7.321669e-03 1.100000e+00 7.654527e-03 1.200000e+00 7.991088e-03 1.000000e-01 4.031881e-03 2.000000e-01 5.795369e-03 3.000000e-01 6.437274e-03 4.000000e-01 6.857711e-03 5.000000e-01 7.226512e-03 6.000000e-01 7.577328e-03 7.000000e-01 7.920407e-03 8.000000e-01 8.259831e-03 9.000000e-01 8.597587e-03 1.000000e+00 8.934983e-03 1.100000e+00 9.273395e-03 1.200000e+00 9.614801e-03 1.000000e-01 4.447752e-03 2.000000e-01 6.897105e-03 3.000000e-01 7.856388e-03 4.000000e-01 8.360232e-03 5.000000e-01 8.762310e-03 6.000000e-01 9.131724e-03 7.000000e-01 9.487499e-03 8.000000e-01 9.836697e-03 9.000000e-01 1.018253e-02 1.000000e+00 1.052683e-02 1.100000e+00 1.087119e-02 1.200000e+00 1.121766e-02 1.000000e-01 4.738214e-03 2.000000e-01 7.757390e-03 3.000000e-01 9.175754e-03 4.000000e-01 9.817568e-03 5.000000e-01 1.026749e-02 6.000000e-01 1.066078e-02 7.000000e-01 1.103168e-02 8.000000e-01 1.139197e-02 9.000000e-01 1.174669e-02 1.000000e+00 1.209847e-02 1.100000e+00 1.244919e-02 1.200000e+00 1.280097e-02 1.000000e-01 4.934493e-03 2.000000e-01 8.388412e-03 3.000000e-01 1.034314e-02 4.000000e-01 1.121284e-02 5.000000e-01 1.173643e-02 6.000000e-01 1.216280e-02 7.000000e-01 1.255290e-02 8.000000e-01 1.292607e-02 9.000000e-01 1.329063e-02 1.000000e+00 1.365051e-02 1.100000e+00 1.400805e-02 1.200000e+00 1.436550e-02 1.000000e-01 5.076453e-03 2.000000e-01 8.854427e-03 3.000000e-01 1.131542e-02 4.000000e-01 1.252094e-02 5.000000e-01 1.315716e-02 6.000000e-01 1.362882e-02 7.000000e-01 1.404363e-02 8.000000e-01 1.443366e-02 9.000000e-01 1.481101e-02 1.000000e+00 1.518117e-02 1.100000e+00 1.554718e-02 1.200000e+00 1.591142e-02 1.000000e-01 3.086192e-06 2.000000e-01 4.621116e-06 3.000000e-01 6.672341e-06 4.000000e-01 9.545743e-06 5.000000e-01 1.357522e-05 6.000000e-01 1.920386e-05 7.000000e-01 2.702344e-05 8.000000e-01 3.781735e-05 9.000000e-01 5.261004e-05 1.000000e+00 7.272259e-05 1.100000e+00 9.983155e-05 1.200000e+00 1.360261e-04 1.000000e-01 1.657772e-05 2.000000e-01 2.439951e-05 3.000000e-01 3.450415e-05 4.000000e-01 4.823817e-05 5.000000e-01 6.687828e-05 6.000000e-01 9.198042e-05 7.000000e-01 1.254321e-04 8.000000e-01 1.694518e-04 9.000000e-01 2.265423e-04 1.000000e+00 2.993961e-04 1.100000e+00 3.907660e-04 1.200000e+00 5.033272e-04 1.000000e-01 7.825845e-05 2.000000e-01 1.128577e-04 3.000000e-01 1.544802e-04 4.000000e-01 2.079002e-04 5.000000e-01 2.759354e-04 6.000000e-01 3.611870e-04 7.000000e-01 4.659963e-04 8.000000e-01 5.922686e-04 9.000000e-01 7.413231e-04 1.000000e+00 9.138362e-04 1.100000e+00 1.109908e-03 1.200000e+00 1.329252e-03 1.000000e-01 2.933428e-04 2.000000e-01 4.158853e-04 3.000000e-01 5.381511e-04 4.000000e-01 6.790645e-04 5.000000e-01 8.412619e-04 6.000000e-01 1.025251e-03 7.000000e-01 1.230599e-03 8.000000e-01 1.456246e-03 9.000000e-01 1.700731e-03 1.000000e+00 1.962420e-03 1.100000e+00 2.239778e-03 1.200000e+00 2.531640e-03 1.000000e-01 7.299964e-04 2.000000e-01 1.066847e-03 3.000000e-01 1.304685e-03 4.000000e-01 1.542987e-03 5.000000e-01 1.793489e-03 6.000000e-01 2.057408e-03 7.000000e-01 2.334023e-03 8.000000e-01 2.622101e-03 9.000000e-01 2.920318e-03 1.000000e+00 3.227483e-03 1.100000e+00 3.542747e-03 1.200000e+00 3.865813e-03 1.000000e-01 1.219490e-03 2.000000e-01 1.922472e-03 3.000000e-01 2.314048e-03 4.000000e-01 2.631167e-03 5.000000e-01 2.938244e-03 6.000000e-01 3.246975e-03 7.000000e-01 3.560041e-03 8.000000e-01 3.877959e-03 9.000000e-01 4.200591e-03 1.000000e+00 4.527666e-03 1.100000e+00 4.859074e-03 1.200000e+00 5.195153e-03 1.000000e-01 1.615186e-03 2.000000e-01 2.706375e-03 3.000000e-01 3.347917e-03 4.000000e-01 3.758968e-03 5.000000e-01 4.111663e-03 6.000000e-01 4.450107e-03 7.000000e-01 4.785232e-03 8.000000e-01 5.120549e-03 9.000000e-01 5.457365e-03 1.000000e+00 5.796222e-03 1.100000e+00 6.137501e-03 1.200000e+00 6.481837e-03 1.000000e-01 1.905921e-03 2.000000e-01 3.315208e-03 3.000000e-01 4.262445e-03 4.000000e-01 4.832844e-03 5.000000e-01 5.246577e-03 6.000000e-01 5.616272e-03 7.000000e-01 5.971894e-03 8.000000e-01 6.322603e-03 9.000000e-01 6.671887e-03 1.000000e+00 7.021296e-03 1.100000e+00 7.371697e-03 1.200000e+00 7.723929e-03 1.000000e-01 2.119122e-03 2.000000e-01 3.776007e-03 3.000000e-01 5.002170e-03 4.000000e-01 5.804055e-03 5.000000e-01 6.320089e-03 6.000000e-01 6.733725e-03 7.000000e-01 7.114284e-03 8.000000e-01 7.482293e-03 9.000000e-01 7.845076e-03 1.000000e+00 8.205761e-03 1.100000e+00 8.565930e-03 1.200000e+00 8.926699e-03 1.000000e-01 2.278844e-03 2.000000e-01 4.129832e-03 3.000000e-01 5.584225e-03 4.000000e-01 6.636839e-03 5.000000e-01 7.315731e-03 6.000000e-01 7.798441e-03 7.000000e-01 8.213004e-03 8.000000e-01 8.602258e-03 9.000000e-01 8.980606e-03 1.000000e+00 9.353841e-03 1.100000e+00 9.724694e-03 1.200000e+00 1.009476e-02 1.000000e-01 2.401058e-03 2.000000e-01 4.406463e-03 3.000000e-01 6.045474e-03 4.000000e-01 7.320852e-03 5.000000e-01 8.210303e-03 6.000000e-01 8.802992e-03 7.000000e-01 9.267156e-03 8.000000e-01 9.683942e-03 9.000000e-01 1.008085e-02 1.000000e+00 1.046829e-02 1.100000e+00 1.085086e-02 1.200000e+00 1.123099e-02 1.000000e-01 2.496042e-03 2.000000e-01 4.625850e-03 3.000000e-01 6.415743e-03 4.000000e-01 7.875165e-03 5.000000e-01 8.980567e-03 6.000000e-01 9.732659e-03 7.000000e-01 1.027217e-02 8.000000e-01 1.072657e-02 9.000000e-01 1.114648e-02 1.000000e+00 1.155035e-02 1.100000e+00 1.194594e-02 1.200000e+00 1.233698e-02 ngspice-26/tests/bsim4/nmos/reference/acFreq.standard0000644000265600020320000000712112264261473022247 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw1_vb2.standard0000644000265600020320000002575212264261473024006 0ustar andreasadminV(d) I(d) 1.000000e-01 1.549169e-07 2.000000e-01 2.641927e-07 3.000000e-01 4.390648e-07 4.000000e-01 7.235566e-07 5.000000e-01 1.184989e-06 6.000000e-01 1.928926e-06 7.000000e-01 3.119289e-06 8.000000e-01 5.007102e-06 9.000000e-01 7.970739e-06 1.000000e+00 1.257088e-05 1.100000e+00 1.962351e-05 1.200000e+00 3.029423e-05 1.000000e-01 2.033788e-06 2.000000e-01 3.391291e-06 3.000000e-01 5.485073e-06 4.000000e-01 8.751749e-06 5.000000e-01 1.379890e-05 6.000000e-01 2.149358e-05 7.000000e-01 3.304710e-05 8.000000e-01 5.010524e-05 9.000000e-01 7.483254e-05 1.000000e+00 1.099685e-04 1.100000e+00 1.588232e-04 1.200000e+00 2.251811e-04 1.000000e-01 2.211723e-05 2.000000e-01 3.504179e-05 3.000000e-01 5.347300e-05 4.000000e-01 7.998321e-05 5.000000e-01 1.174548e-04 6.000000e-01 1.692306e-04 7.000000e-01 2.389273e-04 8.000000e-01 3.300830e-04 9.000000e-01 4.457197e-04 1.000000e+00 5.879544e-04 1.100000e+00 7.578067e-04 1.200000e+00 9.552887e-04 1.000000e-01 1.673044e-04 2.000000e-01 2.453267e-04 3.000000e-01 3.414335e-04 4.000000e-01 4.615502e-04 5.000000e-01 6.078400e-04 6.000000e-01 7.808339e-04 7.000000e-01 9.796953e-04 8.000000e-01 1.202520e-03 9.000000e-01 1.446753e-03 1.000000e+00 1.709657e-03 1.100000e+00 1.988765e-03 1.200000e+00 2.282267e-03 1.000000e-01 7.115628e-04 2.000000e-01 9.585952e-04 3.000000e-01 1.191983e-03 4.000000e-01 1.439996e-03 5.000000e-01 1.703737e-03 6.000000e-01 1.981426e-03 7.000000e-01 2.270821e-03 8.000000e-01 2.569791e-03 9.000000e-01 2.876545e-03 1.000000e+00 3.189793e-03 1.100000e+00 3.508906e-03 1.200000e+00 3.834074e-03 1.000000e-01 1.588603e-03 2.000000e-01 2.132371e-03 3.000000e-01 2.477301e-03 4.000000e-01 2.799195e-03 5.000000e-01 3.118413e-03 6.000000e-01 3.438901e-03 7.000000e-01 3.761500e-03 8.000000e-01 4.086250e-03 9.000000e-01 4.413033e-03 1.000000e+00 4.741885e-03 1.100000e+00 5.073261e-03 1.200000e+00 5.408275e-03 1.000000e-01 2.354932e-03 2.000000e-01 3.395318e-03 3.000000e-01 3.871208e-03 4.000000e-01 4.243974e-03 5.000000e-01 4.592880e-03 6.000000e-01 4.933839e-03 7.000000e-01 5.271719e-03 8.000000e-01 5.608423e-03 9.000000e-01 5.944862e-03 1.000000e+00 6.281688e-03 1.100000e+00 6.619758e-03 1.200000e+00 6.960492e-03 1.000000e-01 2.899057e-03 2.000000e-01 4.515784e-03 3.000000e-01 5.228908e-03 4.000000e-01 5.670111e-03 5.000000e-01 6.049759e-03 6.000000e-01 6.409339e-03 7.000000e-01 6.760466e-03 8.000000e-01 7.107516e-03 9.000000e-01 7.452503e-03 1.000000e+00 7.796616e-03 1.100000e+00 8.140968e-03 1.200000e+00 8.487116e-03 1.000000e-01 3.283872e-03 2.000000e-01 5.408688e-03 3.000000e-01 6.492547e-03 4.000000e-01 7.050713e-03 5.000000e-01 7.473753e-03 6.000000e-01 7.856332e-03 7.000000e-01 8.222647e-03 8.000000e-01 8.581107e-03 9.000000e-01 8.935353e-03 1.000000e+00 9.287307e-03 1.100000e+00 9.638393e-03 1.200000e+00 9.990278e-03 1.000000e-01 3.565848e-03 2.000000e-01 6.092912e-03 3.000000e-01 7.613750e-03 4.000000e-01 8.370193e-03 5.000000e-01 8.860053e-03 6.000000e-01 9.273541e-03 7.000000e-01 9.658487e-03 8.000000e-01 1.003017e-02 9.000000e-01 1.039478e-02 1.000000e+00 1.075534e-02 1.100000e+00 1.111374e-02 1.200000e+00 1.147180e-02 1.000000e-01 3.779585e-03 2.000000e-01 6.621528e-03 3.000000e-01 8.555729e-03 4.000000e-01 9.606393e-03 5.000000e-01 1.020245e-02 6.000000e-01 1.065937e-02 7.000000e-01 1.106795e-02 8.000000e-01 1.145529e-02 9.000000e-01 1.183165e-02 1.000000e+00 1.220170e-02 1.100000e+00 1.256806e-02 1.200000e+00 1.293278e-02 1.000000e-01 3.946062e-03 2.000000e-01 7.038543e-03 3.000000e-01 9.319745e-03 4.000000e-01 1.072809e-02 5.000000e-01 1.149030e-02 6.000000e-01 1.201053e-02 7.000000e-01 1.245008e-02 8.000000e-01 1.285641e-02 9.000000e-01 1.324627e-02 1.000000e+00 1.362688e-02 1.100000e+00 1.400192e-02 1.200000e+00 1.437388e-02 1.000000e-01 1.398883e-08 2.000000e-01 2.688799e-08 3.000000e-01 5.085329e-08 4.000000e-01 9.565674e-08 5.000000e-01 1.791388e-07 6.000000e-01 3.337892e-07 7.000000e-01 6.180054e-07 8.000000e-01 1.134919e-06 9.000000e-01 2.062663e-06 1.000000e+00 3.700704e-06 1.100000e+00 6.536753e-06 1.200000e+00 1.133752e-05 1.000000e-01 4.732332e-07 2.000000e-01 8.872678e-07 3.000000e-01 1.623732e-06 4.000000e-01 2.926781e-06 5.000000e-01 5.191634e-06 6.000000e-01 9.040383e-06 7.000000e-01 1.541127e-05 8.000000e-01 2.565554e-05 9.000000e-01 4.163258e-05 1.000000e+00 6.579607e-05 1.100000e+00 1.012637e-04 1.200000e+00 1.518526e-04 1.000000e-01 1.227846e-05 2.000000e-01 2.101535e-05 3.000000e-01 3.455450e-05 4.000000e-01 5.514848e-05 5.000000e-01 8.555575e-05 6.000000e-01 1.291000e-04 7.000000e-01 1.895785e-04 8.000000e-01 2.710115e-04 9.000000e-01 3.772102e-04 1.000000e+00 5.112358e-04 1.100000e+00 6.749365e-04 1.200000e+00 8.687905e-04 1.000000e-01 1.582206e-04 2.000000e-01 2.332534e-04 3.000000e-01 3.289213e-04 4.000000e-01 4.499556e-04 5.000000e-01 5.986614e-04 6.000000e-01 7.756208e-04 7.000000e-01 9.797485e-04 8.000000e-01 1.208611e-03 9.000000e-01 1.458997e-03 1.000000e+00 1.727573e-03 1.100000e+00 2.011478e-03 1.200000e+00 2.308773e-03 1.000000e-01 8.227345e-04 2.000000e-01 1.065401e-03 3.000000e-01 1.309225e-03 4.000000e-01 1.567751e-03 5.000000e-01 1.840303e-03 6.000000e-01 2.124550e-03 7.000000e-01 2.418121e-03 8.000000e-01 2.719011e-03 9.000000e-01 3.025739e-03 1.000000e+00 3.337462e-03 1.100000e+00 3.654091e-03 1.200000e+00 3.976407e-03 1.000000e-01 1.986456e-03 2.000000e-01 2.435507e-03 3.000000e-01 2.769233e-03 4.000000e-01 3.087580e-03 5.000000e-01 3.403205e-03 6.000000e-01 3.719079e-03 7.000000e-01 4.036061e-03 8.000000e-01 4.354428e-03 9.000000e-01 4.674369e-03 1.000000e+00 4.996293e-03 1.100000e+00 5.321083e-03 1.200000e+00 5.650335e-03 1.000000e-01 3.071984e-03 2.000000e-01 3.898693e-03 3.000000e-01 4.310257e-03 4.000000e-01 4.661837e-03 5.000000e-01 4.997239e-03 6.000000e-01 5.326833e-03 7.000000e-01 5.654209e-03 8.000000e-01 5.980928e-03 9.000000e-01 6.307861e-03 1.000000e+00 6.635808e-03 1.100000e+00 6.965919e-03 1.200000e+00 7.300030e-03 1.000000e-01 3.825472e-03 2.000000e-01 5.271833e-03 3.000000e-01 5.817325e-03 4.000000e-01 6.210966e-03 5.000000e-01 6.567499e-03 6.000000e-01 6.910753e-03 7.000000e-01 7.248319e-03 8.000000e-01 7.583314e-03 9.000000e-01 7.917310e-03 1.000000e+00 8.251433e-03 1.100000e+00 8.586988e-03 1.200000e+00 8.925928e-03 1.000000e-01 4.318175e-03 2.000000e-01 6.471644e-03 3.000000e-01 7.264433e-03 4.000000e-01 7.724080e-03 5.000000e-01 8.108973e-03 6.000000e-01 8.468913e-03 7.000000e-01 8.818260e-03 8.000000e-01 9.162524e-03 9.000000e-01 9.504283e-03 1.000000e+00 9.845105e-03 1.100000e+00 1.018647e-02 1.200000e+00 1.053041e-02 1.000000e-01 4.644752e-03 2.000000e-01 7.432977e-03 3.000000e-01 8.626238e-03 4.000000e-01 9.195691e-03 5.000000e-01 9.620930e-03 6.000000e-01 1.000197e-02 7.000000e-01 1.036522e-02 8.000000e-01 1.071994e-02 9.000000e-01 1.107023e-02 1.000000e+00 1.141829e-02 1.100000e+00 1.176586e-02 1.200000e+00 1.211502e-02 1.000000e-01 4.862884e-03 2.000000e-01 8.142085e-03 3.000000e-01 9.853006e-03 4.000000e-01 1.060666e-02 5.000000e-01 1.109372e-02 6.000000e-01 1.150475e-02 7.000000e-01 1.188662e-02 8.000000e-01 1.225473e-02 9.000000e-01 1.261541e-02 1.000000e+00 1.297171e-02 1.100000e+00 1.332592e-02 1.200000e+00 1.368062e-02 1.000000e-01 5.020845e-03 2.000000e-01 8.665560e-03 3.000000e-01 1.090638e-02 4.000000e-01 1.194616e-02 5.000000e-01 1.252532e-02 6.000000e-01 1.297498e-02 7.000000e-01 1.337853e-02 8.000000e-01 1.376150e-02 9.000000e-01 1.413381e-02 1.000000e+00 1.450012e-02 1.100000e+00 1.486312e-02 1.200000e+00 1.522516e-02 1.000000e-01 1.309182e-06 2.000000e-01 1.990022e-06 3.000000e-01 2.918422e-06 4.000000e-01 4.243177e-06 5.000000e-01 6.136104e-06 6.000000e-01 8.832020e-06 7.000000e-01 1.265365e-05 8.000000e-01 1.804166e-05 9.000000e-01 2.559266e-05 1.000000e+00 3.610728e-05 1.100000e+00 5.064983e-05 1.200000e+00 7.062035e-05 1.000000e-01 7.710403e-06 2.000000e-01 1.153333e-05 3.000000e-01 1.659810e-05 4.000000e-01 2.363321e-05 5.000000e-01 3.339860e-05 6.000000e-01 4.687147e-05 7.000000e-01 6.530867e-05 8.000000e-01 9.029501e-05 9.000000e-01 1.237762e-04 1.000000e+00 1.680660e-04 1.100000e+00 2.258181e-04 1.200000e+00 2.999590e-04 1.000000e-01 4.038163e-05 2.000000e-01 5.913272e-05 3.000000e-01 8.268553e-05 4.000000e-01 1.139533e-04 5.000000e-01 1.552219e-04 6.000000e-01 2.089534e-04 7.000000e-01 2.777424e-04 8.000000e-01 3.641563e-04 9.000000e-01 4.705376e-04 1.000000e+00 5.988248e-04 1.100000e+00 7.504461e-04 1.200000e+00 9.263256e-04 1.000000e-01 1.741545e-04 2.000000e-01 2.494661e-04 3.000000e-01 3.319787e-04 4.000000e-01 4.318070e-04 5.000000e-01 5.516452e-04 6.000000e-01 6.929655e-04 7.000000e-01 8.564339e-04 8.000000e-01 1.041993e-03 9.000000e-01 1.248974e-03 1.000000e+00 1.476273e-03 1.100000e+00 1.722613e-03 1.200000e+00 1.986827e-03 1.000000e-01 5.189929e-04 2.000000e-01 7.490467e-04 3.000000e-01 9.350452e-04 4.000000e-01 1.132398e-03 5.000000e-01 1.346668e-03 6.000000e-01 1.578042e-03 7.000000e-01 1.825514e-03 8.000000e-01 2.087673e-03 9.000000e-01 2.363004e-03 1.000000e+00 2.650089e-03 1.100000e+00 2.947807e-03 1.200000e+00 3.255553e-03 1.000000e-01 9.900130e-04 2.000000e-01 1.528231e-03 3.000000e-01 1.845181e-03 4.000000e-01 2.125125e-03 5.000000e-01 2.405266e-03 6.000000e-01 2.691847e-03 7.000000e-01 2.985941e-03 8.000000e-01 3.287352e-03 9.000000e-01 3.595531e-03 1.000000e+00 3.909914e-03 1.100000e+00 4.230164e-03 1.200000e+00 4.556408e-03 1.000000e-01 1.406799e-03 2.000000e-01 2.324601e-03 3.000000e-01 2.850812e-03 4.000000e-01 3.213269e-03 5.000000e-01 3.540278e-03 6.000000e-01 3.860413e-03 7.000000e-01 4.180745e-03 8.000000e-01 4.503474e-03 9.000000e-01 4.829321e-03 1.000000e+00 5.158513e-03 1.100000e+00 5.491234e-03 1.200000e+00 5.827973e-03 1.000000e-01 1.722457e-03 2.000000e-01 2.971142e-03 3.000000e-01 3.784027e-03 4.000000e-01 4.278334e-03 5.000000e-01 4.659055e-03 6.000000e-01 5.009628e-03 7.000000e-01 5.351311e-03 8.000000e-01 5.690711e-03 9.000000e-01 6.030350e-03 1.000000e+00 6.371333e-03 1.100000e+00 6.714293e-03 1.200000e+00 7.059927e-03 1.000000e-01 1.956168e-03 2.000000e-01 3.466717e-03 3.000000e-01 4.561536e-03 4.000000e-01 5.262180e-03 5.000000e-01 5.728748e-03 6.000000e-01 6.118582e-03 7.000000e-01 6.484092e-03 8.000000e-01 6.840785e-03 9.000000e-01 7.194290e-03 1.000000e+00 7.547035e-03 1.100000e+00 7.900264e-03 1.200000e+00 8.254914e-03 1.000000e-01 2.132016e-03 2.000000e-01 3.849031e-03 3.000000e-01 5.180663e-03 4.000000e-01 6.123871e-03 5.000000e-01 6.731316e-03 6.000000e-01 7.180727e-03 7.000000e-01 7.577222e-03 8.000000e-01 7.954208e-03 9.000000e-01 8.323057e-03 1.000000e+00 8.688414e-03 1.100000e+00 9.052499e-03 1.200000e+00 9.416652e-03 1.000000e-01 2.267090e-03 2.000000e-01 4.148913e-03 3.000000e-01 5.673549e-03 4.000000e-01 6.842683e-03 5.000000e-01 7.644437e-03 6.000000e-01 8.188788e-03 7.000000e-01 8.629235e-03 8.000000e-01 9.031727e-03 9.000000e-01 9.418370e-03 1.000000e+00 9.797652e-03 1.100000e+00 1.017339e-02 1.200000e+00 1.054763e-02 1.000000e-01 2.372565e-03 2.000000e-01 4.387560e-03 3.000000e-01 6.070448e-03 4.000000e-01 7.429536e-03 5.000000e-01 8.442709e-03 6.000000e-01 9.129436e-03 7.000000e-01 9.635870e-03 8.000000e-01 1.007243e-02 9.000000e-01 1.048064e-02 1.000000e+00 1.087574e-02 1.100000e+00 1.126420e-02 1.200000e+00 1.164921e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw2.standard0000644000265600020320000002575212264261473023236 0ustar andreasadminV(d) I(d) 1.000000e-01 1.159898e-07 2.000000e-01 1.258884e-07 3.000000e-01 1.341947e-07 4.000000e-01 1.426531e-07 5.000000e-01 1.515692e-07 6.000000e-01 1.611490e-07 7.000000e-01 1.716567e-07 8.000000e-01 1.835072e-07 9.000000e-01 1.973865e-07 1.000000e+00 2.144406e-07 1.100000e+00 2.365800e-07 1.200000e+00 2.669719e-07 1.000000e-01 1.372604e-06 2.000000e-01 1.486382e-06 3.000000e-01 1.580213e-06 4.000000e-01 1.674553e-06 5.000000e-01 1.772254e-06 6.000000e-01 1.874356e-06 7.000000e-01 1.981521e-06 8.000000e-01 2.094382e-06 9.000000e-01 2.213723e-06 1.000000e+00 2.340666e-06 1.100000e+00 2.476911e-06 1.200000e+00 2.625093e-06 1.000000e-01 1.350673e-05 2.000000e-01 1.458482e-05 3.000000e-01 1.543493e-05 4.000000e-01 1.627772e-05 5.000000e-01 1.714220e-05 6.000000e-01 1.803767e-05 7.000000e-01 1.896888e-05 8.000000e-01 1.993922e-05 9.000000e-01 2.095197e-05 1.000000e+00 2.201105e-05 1.100000e+00 2.312173e-05 1.200000e+00 2.429121e-05 1.000000e-01 9.909726e-05 2.000000e-01 1.075796e-04 3.000000e-01 1.131783e-04 4.000000e-01 1.185054e-04 5.000000e-01 1.238555e-04 6.000000e-01 1.293102e-04 7.000000e-01 1.349035e-04 8.000000e-01 1.406546e-04 9.000000e-01 1.465783e-04 1.000000e+00 1.526915e-04 1.100000e+00 1.590162e-04 1.200000e+00 1.655837e-04 1.000000e-01 4.301279e-04 2.000000e-01 4.892754e-04 3.000000e-01 5.116913e-04 4.000000e-01 5.302290e-04 5.000000e-01 5.478528e-04 6.000000e-01 5.652396e-04 7.000000e-01 5.826287e-04 8.000000e-01 6.001286e-04 9.000000e-01 6.178032e-04 1.000000e+00 6.357080e-04 1.100000e+00 6.539103e-04 1.200000e+00 6.725030e-04 1.000000e-01 9.699114e-04 2.000000e-01 1.249494e-03 3.000000e-01 1.316247e-03 4.000000e-01 1.355778e-03 5.000000e-01 1.389303e-03 6.000000e-01 1.420683e-03 7.000000e-01 1.451101e-03 8.000000e-01 1.481043e-03 9.000000e-01 1.510753e-03 1.000000e+00 1.540396e-03 1.100000e+00 1.570132e-03 1.200000e+00 1.600157e-03 1.000000e-01 1.469080e-03 2.000000e-01 2.149353e-03 3.000000e-01 2.340077e-03 4.000000e-01 2.414540e-03 5.000000e-01 2.466573e-03 6.000000e-01 2.511491e-03 7.000000e-01 2.553289e-03 8.000000e-01 2.593437e-03 9.000000e-01 2.632611e-03 1.000000e+00 2.671195e-03 1.100000e+00 2.709488e-03 1.200000e+00 2.747809e-03 1.000000e-01 1.861557e-03 2.000000e-01 2.959059e-03 3.000000e-01 3.402884e-03 4.000000e-01 3.547944e-03 5.000000e-01 3.626607e-03 6.000000e-01 3.687127e-03 7.000000e-01 3.740452e-03 8.000000e-01 3.790170e-03 9.000000e-01 3.837790e-03 1.000000e+00 3.884085e-03 1.100000e+00 3.929557e-03 1.200000e+00 3.974663e-03 1.000000e-01 2.165623e-03 2.000000e-01 3.618186e-03 3.000000e-01 4.395876e-03 4.000000e-01 4.681721e-03 5.000000e-01 4.804712e-03 6.000000e-01 4.886082e-03 7.000000e-01 4.952794e-03 8.000000e-01 5.012714e-03 9.000000e-01 5.068871e-03 1.000000e+00 5.122690e-03 1.100000e+00 5.174988e-03 1.200000e+00 5.226394e-03 1.000000e-01 2.404557e-03 2.000000e-01 4.147945e-03 3.000000e-01 5.255447e-03 4.000000e-01 5.769832e-03 5.000000e-01 5.971380e-03 6.000000e-01 6.083358e-03 7.000000e-01 6.166958e-03 8.000000e-01 6.238561e-03 9.000000e-01 6.303920e-03 1.000000e+00 6.365542e-03 1.100000e+00 6.424737e-03 1.200000e+00 6.482373e-03 1.000000e-01 2.595367e-03 2.000000e-01 4.577450e-03 3.000000e-01 5.971347e-03 4.000000e-01 6.768185e-03 5.000000e-01 7.104788e-03 6.000000e-01 7.264840e-03 7.000000e-01 7.371176e-03 8.000000e-01 7.456870e-03 9.000000e-01 7.532568e-03 1.000000e+00 7.602571e-03 1.100000e+00 7.668960e-03 1.200000e+00 7.732962e-03 1.000000e-01 2.749840e-03 2.000000e-01 4.929531e-03 3.000000e-01 6.564210e-03 4.000000e-01 7.642194e-03 5.000000e-01 8.180430e-03 6.000000e-01 8.418688e-03 7.000000e-01 8.557465e-03 8.000000e-01 8.660992e-03 9.000000e-01 8.748738e-03 1.000000e+00 8.827999e-03 1.100000e+00 8.902069e-03 1.200000e+00 8.972721e-03 1.000000e-01 1.604107e-08 2.000000e-01 1.758569e-08 3.000000e-01 1.901948e-08 4.000000e-01 2.056286e-08 5.000000e-01 2.231564e-08 6.000000e-01 2.441276e-08 7.000000e-01 2.707861e-08 8.000000e-01 3.069705e-08 9.000000e-01 3.592361e-08 1.000000e+00 4.386904e-08 1.100000e+00 5.639925e-08 1.200000e+00 7.662362e-08 1.000000e-01 4.719615e-07 2.000000e-01 5.157151e-07 3.000000e-01 5.550968e-07 4.000000e-01 5.955919e-07 5.000000e-01 6.382177e-07 6.000000e-01 6.834550e-07 7.000000e-01 7.317004e-07 8.000000e-01 7.834078e-07 9.000000e-01 8.391982e-07 1.000000e+00 8.999994e-07 1.100000e+00 9.672531e-07 1.200000e+00 1.043241e-06 1.000000e-01 1.029136e-05 2.000000e-01 1.114965e-05 3.000000e-01 1.189161e-05 4.000000e-01 1.263943e-05 5.000000e-01 1.341362e-05 6.000000e-01 1.422170e-05 7.000000e-01 1.506796e-05 8.000000e-01 1.595572e-05 9.000000e-01 1.688834e-05 1.000000e+00 1.786983e-05 1.100000e+00 1.890542e-05 1.200000e+00 2.000225e-05 1.000000e-01 1.239978e-04 2.000000e-01 1.334309e-04 3.000000e-01 1.406730e-04 4.000000e-01 1.476780e-04 5.000000e-01 1.547464e-04 6.000000e-01 1.619728e-04 7.000000e-01 1.693995e-04 8.000000e-01 1.770518e-04 9.000000e-01 1.849506e-04 1.000000e+00 1.931200e-04 1.100000e+00 2.015918e-04 1.200000e+00 2.104101e-04 1.000000e-01 7.127256e-04 2.000000e-01 7.740298e-04 3.000000e-01 8.064293e-04 4.000000e-01 8.342755e-04 5.000000e-01 8.607691e-04 6.000000e-01 8.868025e-04 7.000000e-01 9.127226e-04 8.000000e-01 9.386969e-04 9.000000e-01 9.648318e-04 1.000000e+00 9.912265e-04 1.100000e+00 1.018004e-03 1.200000e+00 1.045329e-03 1.000000e-01 1.808846e-03 2.000000e-01 2.063075e-03 3.000000e-01 2.140535e-03 4.000000e-01 2.193798e-03 5.000000e-01 2.239774e-03 6.000000e-01 2.282622e-03 7.000000e-01 2.323847e-03 8.000000e-01 2.364136e-03 9.000000e-01 2.403874e-03 1.000000e+00 2.443356e-03 1.100000e+00 2.482890e-03 1.200000e+00 2.522856e-03 1.000000e-01 2.831711e-03 2.000000e-01 3.534537e-03 3.000000e-01 3.691977e-03 4.000000e-01 3.775291e-03 5.000000e-01 3.839109e-03 6.000000e-01 3.895077e-03 7.000000e-01 3.947064e-03 8.000000e-01 3.996724e-03 9.000000e-01 4.044916e-03 1.000000e+00 4.092217e-03 1.100000e+00 4.139155e-03 1.200000e+00 4.186335e-03 1.000000e-01 3.584886e-03 2.000000e-01 4.938940e-03 3.000000e-01 5.245240e-03 4.000000e-01 5.371570e-03 5.000000e-01 5.456618e-03 6.000000e-01 5.526466e-03 7.000000e-01 5.589005e-03 8.000000e-01 5.647400e-03 9.000000e-01 5.703199e-03 1.000000e+00 5.757340e-03 1.100000e+00 5.810592e-03 1.200000e+00 5.863770e-03 1.000000e-01 4.129173e-03 2.000000e-01 6.182136e-03 3.000000e-01 6.748766e-03 4.000000e-01 6.940280e-03 5.000000e-01 7.052741e-03 6.000000e-01 7.138790e-03 7.000000e-01 7.212896e-03 8.000000e-01 7.280499e-03 9.000000e-01 7.344109e-03 1.000000e+00 7.405140e-03 1.100000e+00 7.464630e-03 1.200000e+00 7.523602e-03 1.000000e-01 4.521195e-03 2.000000e-01 7.202279e-03 3.000000e-01 8.166777e-03 4.000000e-01 8.461160e-03 5.000000e-01 8.611228e-03 6.000000e-01 8.717613e-03 7.000000e-01 8.805533e-03 8.000000e-01 8.883831e-03 9.000000e-01 8.956377e-03 1.000000e+00 9.025210e-03 1.100000e+00 9.091695e-03 1.200000e+00 9.157063e-03 1.000000e-01 4.766047e-03 2.000000e-01 7.941639e-03 3.000000e-01 9.422191e-03 4.000000e-01 9.885377e-03 5.000000e-01 1.008899e-02 6.000000e-01 1.022086e-02 7.000000e-01 1.032473e-02 8.000000e-01 1.041477e-02 9.000000e-01 1.049685e-02 1.000000e+00 1.057388e-02 1.100000e+00 1.064765e-02 1.200000e+00 1.071961e-02 1.000000e-01 4.937484e-03 2.000000e-01 8.486386e-03 3.000000e-01 1.050758e-02 4.000000e-01 1.123534e-02 5.000000e-01 1.151807e-02 6.000000e-01 1.168290e-02 7.000000e-01 1.180540e-02 8.000000e-01 1.190820e-02 9.000000e-01 1.200013e-02 1.000000e+00 1.208533e-02 1.100000e+00 1.216613e-02 1.200000e+00 1.224428e-02 1.000000e-01 7.276311e-07 2.000000e-01 7.866404e-07 3.000000e-01 8.275444e-07 4.000000e-01 8.674589e-07 5.000000e-01 9.082211e-07 6.000000e-01 9.504545e-07 7.000000e-01 9.946073e-07 8.000000e-01 1.041208e-06 9.000000e-01 1.091043e-06 1.000000e+00 1.145370e-06 1.100000e+00 1.206253e-06 1.200000e+00 1.277068e-06 1.000000e-01 4.002973e-06 2.000000e-01 4.327286e-06 3.000000e-01 4.545155e-06 4.000000e-01 4.755996e-06 5.000000e-01 4.969914e-06 6.000000e-01 5.189768e-06 7.000000e-01 5.416936e-06 8.000000e-01 5.652430e-06 9.000000e-01 5.897325e-06 1.000000e+00 6.153075e-06 1.100000e+00 6.421843e-06 1.200000e+00 6.706924e-06 1.000000e-01 1.989720e-05 2.000000e-01 2.162725e-05 3.000000e-01 2.267803e-05 4.000000e-01 2.367704e-05 5.000000e-01 2.468284e-05 6.000000e-01 2.571073e-05 7.000000e-01 2.676717e-05 8.000000e-01 2.785607e-05 9.000000e-01 2.898073e-05 1.000000e+00 3.014499e-05 1.100000e+00 3.135409e-05 1.200000e+00 3.261543e-05 1.000000e-01 8.360182e-05 2.000000e-01 9.373583e-05 3.000000e-01 9.814469e-05 4.000000e-01 1.020877e-04 5.000000e-01 1.059739e-04 6.000000e-01 1.098948e-04 7.000000e-01 1.138838e-04 8.000000e-01 1.179575e-04 9.000000e-01 1.221274e-04 1.000000e+00 1.264051e-04 1.100000e+00 1.308058e-04 1.200000e+00 1.353508e-04 1.000000e-01 2.436161e-04 2.000000e-01 3.039808e-04 3.000000e-01 3.195287e-04 4.000000e-01 3.307033e-04 5.000000e-01 3.410702e-04 6.000000e-01 3.512358e-04 7.000000e-01 3.613845e-04 8.000000e-01 3.715936e-04 9.000000e-01 3.819042e-04 1.000000e+00 3.923479e-04 1.100000e+00 4.029603e-04 1.200000e+00 4.137902e-04 1.000000e-01 4.606492e-04 2.000000e-01 6.686213e-04 3.000000e-01 7.263837e-04 4.000000e-01 7.515324e-04 5.000000e-01 7.713167e-04 6.000000e-01 7.896038e-04 7.000000e-01 8.073247e-04 8.000000e-01 8.248112e-04 9.000000e-01 8.422140e-04 1.000000e+00 8.596211e-04 1.100000e+00 8.771058e-04 1.200000e+00 8.947552e-04 1.000000e-01 6.604315e-04 2.000000e-01 1.059904e-03 3.000000e-01 1.235385e-03 4.000000e-01 1.295608e-03 5.000000e-01 1.329258e-03 6.000000e-01 1.356688e-03 7.000000e-01 1.381933e-03 8.000000e-01 1.406186e-03 9.000000e-01 1.429919e-03 1.000000e+00 1.453365e-03 1.100000e+00 1.476671e-03 1.200000e+00 1.499972e-03 1.000000e-01 8.195210e-04 2.000000e-01 1.388834e-03 3.000000e-01 1.724676e-03 4.000000e-01 1.871078e-03 5.000000e-01 1.932613e-03 6.000000e-01 1.972547e-03 7.000000e-01 2.006056e-03 8.000000e-01 2.036935e-03 9.000000e-01 2.066480e-03 1.000000e+00 2.095256e-03 1.100000e+00 2.123561e-03 1.200000e+00 2.151603e-03 1.000000e-01 9.422133e-04 2.000000e-01 1.649309e-03 3.000000e-01 2.133281e-03 4.000000e-01 2.408907e-03 5.000000e-01 2.531440e-03 6.000000e-01 2.593336e-03 7.000000e-01 2.637869e-03 8.000000e-01 2.676238e-03 9.000000e-01 2.711774e-03 1.000000e+00 2.745754e-03 1.100000e+00 2.778779e-03 1.200000e+00 2.811195e-03 1.000000e-01 1.037228e-03 2.000000e-01 1.854921e-03 3.000000e-01 2.462910e-03 4.000000e-01 2.869553e-03 5.000000e-01 3.092358e-03 6.000000e-01 3.197451e-03 7.000000e-01 3.259522e-03 8.000000e-01 3.307603e-03 9.000000e-01 3.349982e-03 1.000000e+00 3.389486e-03 1.100000e+00 3.427306e-03 1.200000e+00 3.464046e-03 1.000000e-01 1.111571e-03 2.000000e-01 2.018513e-03 3.000000e-01 2.729071e-03 4.000000e-01 3.250100e-03 5.000000e-01 3.587815e-03 6.000000e-01 3.767858e-03 7.000000e-01 3.861229e-03 8.000000e-01 3.923613e-03 9.000000e-01 3.974587e-03 1.000000e+00 4.020366e-03 1.100000e+00 4.063315e-03 1.200000e+00 4.104518e-03 1.000000e-01 1.170186e-03 2.000000e-01 2.149627e-03 3.000000e-01 2.945225e-03 4.000000e-01 3.563050e-03 5.000000e-01 4.007432e-03 6.000000e-01 4.285017e-03 7.000000e-01 4.433077e-03 8.000000e-01 4.518899e-03 9.000000e-01 4.581783e-03 1.000000e+00 4.635212e-03 1.100000e+00 4.683924e-03 1.200000e+00 4.729898e-03 ngspice-26/tests/bsim4/nmos/reference/dcSweep_scc.standard0000644000265600020320000002575212264261473023302 0ustar andreasadminV(d) I(d) 1.000000e-01 5.381036e-07 2.000000e-01 8.979352e-07 3.000000e-01 1.458523e-06 4.000000e-01 2.345919e-06 5.000000e-01 3.743979e-06 6.000000e-01 5.928842e-06 7.000000e-01 9.309998e-06 8.000000e-01 1.448406e-05 9.000000e-01 2.230339e-05 1.000000e+00 3.396036e-05 1.100000e+00 5.108560e-05 1.200000e+00 7.585441e-05 1.000000e-01 6.175374e-06 2.000000e-01 9.996042e-06 3.000000e-01 1.566575e-05 4.000000e-01 2.417709e-05 5.000000e-01 3.680960e-05 6.000000e-01 5.527369e-05 7.000000e-01 8.179037e-05 8.000000e-01 1.191243e-04 9.000000e-01 1.705364e-04 1.000000e+00 2.396239e-04 1.100000e+00 3.300467e-04 1.200000e+00 4.451953e-04 1.000000e-01 5.603719e-05 2.000000e-01 8.564974e-05 3.000000e-01 1.256776e-04 4.000000e-01 1.802895e-04 5.000000e-01 2.531861e-04 6.000000e-01 3.478281e-04 7.000000e-01 4.670448e-04 8.000000e-01 6.126440e-04 9.000000e-01 7.852036e-04 1.000000e+00 9.841360e-04 1.100000e+00 1.208010e-03 1.200000e+00 1.455038e-03 1.000000e-01 3.365708e-04 2.000000e-01 4.731344e-04 3.000000e-01 6.258448e-04 4.000000e-01 8.032825e-04 5.000000e-01 1.005617e-03 6.000000e-01 1.231184e-03 7.000000e-01 1.477470e-03 8.000000e-01 1.741619e-03 9.000000e-01 2.020814e-03 1.000000e+00 2.312608e-03 1.100000e+00 2.615194e-03 1.200000e+00 2.927631e-03 1.000000e-01 1.078590e-03 2.000000e-01 1.427275e-03 3.000000e-01 1.711529e-03 4.000000e-01 1.997733e-03 5.000000e-01 2.291821e-03 6.000000e-01 2.593736e-03 7.000000e-01 2.902373e-03 8.000000e-01 3.216532e-03 9.000000e-01 3.535218e-03 1.000000e+00 3.857820e-03 1.100000e+00 4.184298e-03 1.200000e+00 4.515363e-03 1.000000e-01 1.966489e-03 2.000000e-01 2.694690e-03 3.000000e-01 3.087158e-03 4.000000e-01 3.431488e-03 5.000000e-01 3.765245e-03 6.000000e-01 4.096264e-03 7.000000e-01 4.426871e-03 8.000000e-01 4.757875e-03 9.000000e-01 5.089625e-03 1.000000e+00 5.422472e-03 1.100000e+00 5.757099e-03 1.200000e+00 6.094820e-03 1.000000e-01 2.647620e-03 2.000000e-01 3.934138e-03 3.000000e-01 4.490970e-03 4.000000e-01 4.888747e-03 5.000000e-01 5.250041e-03 6.000000e-01 5.598883e-03 7.000000e-01 5.942449e-03 8.000000e-01 6.283548e-03 9.000000e-01 6.623523e-03 1.000000e+00 6.963260e-03 1.100000e+00 7.303747e-03 1.200000e+00 7.646505e-03 1.000000e-01 3.121627e-03 2.000000e-01 4.977198e-03 3.000000e-01 5.828211e-03 4.000000e-01 6.309533e-03 5.000000e-01 6.705044e-03 6.000000e-01 7.073379e-03 7.000000e-01 7.430342e-03 8.000000e-01 7.781726e-03 9.000000e-01 8.130143e-03 1.000000e+00 8.477066e-03 1.100000e+00 8.823745e-03 1.200000e+00 9.171809e-03 1.000000e-01 3.459366e-03 2.000000e-01 5.786304e-03 3.000000e-01 7.049916e-03 4.000000e-01 7.676678e-03 5.000000e-01 8.123155e-03 6.000000e-01 8.516979e-03 7.000000e-01 8.890143e-03 8.000000e-01 9.253415e-03 9.000000e-01 9.611348e-03 1.000000e+00 9.966270e-03 1.100000e+00 1.031979e-02 1.200000e+00 1.067365e-02 1.000000e-01 3.709371e-03 2.000000e-01 6.404043e-03 3.000000e-01 8.109684e-03 4.000000e-01 8.973978e-03 5.000000e-01 9.500490e-03 6.000000e-01 9.929411e-03 7.000000e-01 1.032288e-02 8.000000e-01 1.070018e-02 9.000000e-01 1.106892e-02 1.000000e+00 1.143272e-02 1.100000e+00 1.179374e-02 1.200000e+00 1.215392e-02 1.000000e-01 3.900511e-03 2.000000e-01 6.883659e-03 3.000000e-01 8.983496e-03 4.000000e-01 1.017591e-02 5.000000e-01 1.082983e-02 6.000000e-01 1.130891e-02 7.000000e-01 1.172853e-02 8.000000e-01 1.212265e-02 9.000000e-01 1.250374e-02 1.000000e+00 1.287741e-02 1.100000e+00 1.324664e-02 1.200000e+00 1.361368e-02 1.000000e-01 4.050406e-03 2.000000e-01 7.264261e-03 3.000000e-01 9.687450e-03 4.000000e-01 1.124967e-02 5.000000e-01 1.209852e-02 6.000000e-01 1.265156e-02 7.000000e-01 1.310595e-02 8.000000e-01 1.352068e-02 9.000000e-01 1.391611e-02 1.000000e+00 1.430081e-02 1.100000e+00 1.467905e-02 1.200000e+00 1.505357e-02 1.000000e-01 7.321028e-08 2.000000e-01 1.375764e-07 3.000000e-01 2.536872e-07 4.000000e-01 4.640314e-07 5.000000e-01 8.424837e-07 6.000000e-01 1.516439e-06 7.000000e-01 2.700786e-06 8.000000e-01 4.748026e-06 9.000000e-01 8.217731e-06 1.000000e+00 1.396616e-05 1.100000e+00 2.325376e-05 1.200000e+00 3.786694e-05 1.000000e-01 2.075842e-06 2.000000e-01 3.741078e-06 3.000000e-01 6.542583e-06 4.000000e-01 1.120680e-05 5.000000e-01 1.879079e-05 6.000000e-01 3.078970e-05 7.000000e-01 4.922683e-05 8.000000e-01 7.671926e-05 9.000000e-01 1.165001e-04 1.000000e+00 1.723658e-04 1.100000e+00 2.485040e-04 1.200000e+00 3.491799e-04 1.000000e-01 3.962783e-05 2.000000e-01 6.367046e-05 3.000000e-01 9.807032e-05 4.000000e-01 1.466088e-04 5.000000e-01 2.131723e-04 6.000000e-01 3.016524e-04 7.000000e-01 4.154759e-04 8.000000e-01 5.570550e-04 9.000000e-01 7.273784e-04 1.000000e+00 9.259365e-04 1.100000e+00 1.151040e-03 1.200000e+00 1.400437e-03 1.000000e-01 3.472832e-04 2.000000e-01 4.836094e-04 3.000000e-01 6.416803e-04 4.000000e-01 8.260673e-04 5.000000e-01 1.036062e-03 6.000000e-01 1.269272e-03 7.000000e-01 1.522506e-03 8.000000e-01 1.792368e-03 9.000000e-01 2.075732e-03 1.000000e+00 2.370096e-03 1.100000e+00 2.673833e-03 1.200000e+00 2.986366e-03 1.000000e-01 1.272216e-03 2.000000e-01 1.594399e-03 3.000000e-01 1.882878e-03 4.000000e-01 2.173914e-03 5.000000e-01 2.470903e-03 6.000000e-01 2.773539e-03 7.000000e-01 3.080925e-03 8.000000e-01 3.392216e-03 9.000000e-01 3.706839e-03 1.000000e+00 4.024657e-03 1.100000e+00 4.346137e-03 1.200000e+00 4.672512e-03 1.000000e-01 2.461389e-03 2.000000e-01 3.044287e-03 3.000000e-01 3.409153e-03 4.000000e-01 3.742685e-03 5.000000e-01 4.068030e-03 6.000000e-01 4.390920e-03 7.000000e-01 4.713334e-03 8.000000e-01 5.036113e-03 9.000000e-01 5.359768e-03 1.000000e+00 5.684901e-03 1.100000e+00 6.012529e-03 1.200000e+00 6.344369e-03 1.000000e-01 3.406496e-03 2.000000e-01 4.485676e-03 3.000000e-01 4.947536e-03 4.000000e-01 5.316437e-03 5.000000e-01 5.661196e-03 6.000000e-01 5.997142e-03 7.000000e-01 6.329412e-03 8.000000e-01 6.660187e-03 9.000000e-01 6.990627e-03 1.000000e+00 7.321669e-03 1.100000e+00 7.654527e-03 1.200000e+00 7.991088e-03 1.000000e-01 4.031881e-03 2.000000e-01 5.795369e-03 3.000000e-01 6.437274e-03 4.000000e-01 6.857711e-03 5.000000e-01 7.226512e-03 6.000000e-01 7.577328e-03 7.000000e-01 7.920407e-03 8.000000e-01 8.259831e-03 9.000000e-01 8.597587e-03 1.000000e+00 8.934983e-03 1.100000e+00 9.273395e-03 1.200000e+00 9.614801e-03 1.000000e-01 4.447752e-03 2.000000e-01 6.897105e-03 3.000000e-01 7.856388e-03 4.000000e-01 8.360232e-03 5.000000e-01 8.762310e-03 6.000000e-01 9.131724e-03 7.000000e-01 9.487499e-03 8.000000e-01 9.836697e-03 9.000000e-01 1.018253e-02 1.000000e+00 1.052683e-02 1.100000e+00 1.087119e-02 1.200000e+00 1.121766e-02 1.000000e-01 4.738214e-03 2.000000e-01 7.757390e-03 3.000000e-01 9.175754e-03 4.000000e-01 9.817568e-03 5.000000e-01 1.026749e-02 6.000000e-01 1.066078e-02 7.000000e-01 1.103168e-02 8.000000e-01 1.139197e-02 9.000000e-01 1.174669e-02 1.000000e+00 1.209847e-02 1.100000e+00 1.244919e-02 1.200000e+00 1.280097e-02 1.000000e-01 4.934493e-03 2.000000e-01 8.388412e-03 3.000000e-01 1.034314e-02 4.000000e-01 1.121284e-02 5.000000e-01 1.173643e-02 6.000000e-01 1.216280e-02 7.000000e-01 1.255290e-02 8.000000e-01 1.292607e-02 9.000000e-01 1.329063e-02 1.000000e+00 1.365051e-02 1.100000e+00 1.400805e-02 1.200000e+00 1.436550e-02 1.000000e-01 5.076453e-03 2.000000e-01 8.854427e-03 3.000000e-01 1.131542e-02 4.000000e-01 1.252094e-02 5.000000e-01 1.315716e-02 6.000000e-01 1.362882e-02 7.000000e-01 1.404363e-02 8.000000e-01 1.443366e-02 9.000000e-01 1.481101e-02 1.000000e+00 1.518117e-02 1.100000e+00 1.554718e-02 1.200000e+00 1.591142e-02 1.000000e-01 3.086192e-06 2.000000e-01 4.621116e-06 3.000000e-01 6.672341e-06 4.000000e-01 9.545743e-06 5.000000e-01 1.357522e-05 6.000000e-01 1.920386e-05 7.000000e-01 2.702344e-05 8.000000e-01 3.781735e-05 9.000000e-01 5.261004e-05 1.000000e+00 7.272259e-05 1.100000e+00 9.983155e-05 1.200000e+00 1.360261e-04 1.000000e-01 1.657772e-05 2.000000e-01 2.439951e-05 3.000000e-01 3.450415e-05 4.000000e-01 4.823817e-05 5.000000e-01 6.687828e-05 6.000000e-01 9.198042e-05 7.000000e-01 1.254321e-04 8.000000e-01 1.694518e-04 9.000000e-01 2.265423e-04 1.000000e+00 2.993961e-04 1.100000e+00 3.907660e-04 1.200000e+00 5.033272e-04 1.000000e-01 7.825845e-05 2.000000e-01 1.128577e-04 3.000000e-01 1.544802e-04 4.000000e-01 2.079002e-04 5.000000e-01 2.759354e-04 6.000000e-01 3.611870e-04 7.000000e-01 4.659963e-04 8.000000e-01 5.922686e-04 9.000000e-01 7.413231e-04 1.000000e+00 9.138362e-04 1.100000e+00 1.109908e-03 1.200000e+00 1.329252e-03 1.000000e-01 2.933428e-04 2.000000e-01 4.158853e-04 3.000000e-01 5.381511e-04 4.000000e-01 6.790645e-04 5.000000e-01 8.412619e-04 6.000000e-01 1.025251e-03 7.000000e-01 1.230599e-03 8.000000e-01 1.456246e-03 9.000000e-01 1.700731e-03 1.000000e+00 1.962420e-03 1.100000e+00 2.239778e-03 1.200000e+00 2.531640e-03 1.000000e-01 7.299964e-04 2.000000e-01 1.066847e-03 3.000000e-01 1.304685e-03 4.000000e-01 1.542987e-03 5.000000e-01 1.793489e-03 6.000000e-01 2.057408e-03 7.000000e-01 2.334023e-03 8.000000e-01 2.622101e-03 9.000000e-01 2.920318e-03 1.000000e+00 3.227483e-03 1.100000e+00 3.542747e-03 1.200000e+00 3.865813e-03 1.000000e-01 1.219490e-03 2.000000e-01 1.922472e-03 3.000000e-01 2.314048e-03 4.000000e-01 2.631167e-03 5.000000e-01 2.938244e-03 6.000000e-01 3.246975e-03 7.000000e-01 3.560041e-03 8.000000e-01 3.877959e-03 9.000000e-01 4.200591e-03 1.000000e+00 4.527666e-03 1.100000e+00 4.859074e-03 1.200000e+00 5.195153e-03 1.000000e-01 1.615186e-03 2.000000e-01 2.706375e-03 3.000000e-01 3.347917e-03 4.000000e-01 3.758968e-03 5.000000e-01 4.111663e-03 6.000000e-01 4.450107e-03 7.000000e-01 4.785232e-03 8.000000e-01 5.120549e-03 9.000000e-01 5.457365e-03 1.000000e+00 5.796222e-03 1.100000e+00 6.137501e-03 1.200000e+00 6.481837e-03 1.000000e-01 1.905921e-03 2.000000e-01 3.315208e-03 3.000000e-01 4.262445e-03 4.000000e-01 4.832844e-03 5.000000e-01 5.246577e-03 6.000000e-01 5.616272e-03 7.000000e-01 5.971894e-03 8.000000e-01 6.322603e-03 9.000000e-01 6.671887e-03 1.000000e+00 7.021296e-03 1.100000e+00 7.371697e-03 1.200000e+00 7.723929e-03 1.000000e-01 2.119122e-03 2.000000e-01 3.776007e-03 3.000000e-01 5.002170e-03 4.000000e-01 5.804055e-03 5.000000e-01 6.320089e-03 6.000000e-01 6.733725e-03 7.000000e-01 7.114284e-03 8.000000e-01 7.482293e-03 9.000000e-01 7.845076e-03 1.000000e+00 8.205761e-03 1.100000e+00 8.565930e-03 1.200000e+00 8.926699e-03 1.000000e-01 2.278844e-03 2.000000e-01 4.129832e-03 3.000000e-01 5.584225e-03 4.000000e-01 6.636839e-03 5.000000e-01 7.315731e-03 6.000000e-01 7.798441e-03 7.000000e-01 8.213004e-03 8.000000e-01 8.602258e-03 9.000000e-01 8.980606e-03 1.000000e+00 9.353841e-03 1.100000e+00 9.724694e-03 1.200000e+00 1.009476e-02 1.000000e-01 2.401058e-03 2.000000e-01 4.406463e-03 3.000000e-01 6.045474e-03 4.000000e-01 7.320852e-03 5.000000e-01 8.210303e-03 6.000000e-01 8.802992e-03 7.000000e-01 9.267156e-03 8.000000e-01 9.683942e-03 9.000000e-01 1.008085e-02 1.000000e+00 1.046829e-02 1.100000e+00 1.085086e-02 1.200000e+00 1.123099e-02 1.000000e-01 2.496042e-03 2.000000e-01 4.625850e-03 3.000000e-01 6.415743e-03 4.000000e-01 7.875165e-03 5.000000e-01 8.980567e-03 6.000000e-01 9.732659e-03 7.000000e-01 1.027217e-02 8.000000e-01 1.072657e-02 9.000000e-01 1.114648e-02 1.000000e+00 1.155035e-02 1.100000e+00 1.194594e-02 1.200000e+00 1.233698e-02 ngspice-26/tests/bsim4/nmos/reference/acFreq_wpemod.standard0000644000265600020320000000712112264261473023622 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/noise2.standard0000644000265600020320000000635212264261473022252 0ustar andreasadminFreq N(d) 1000 6.834301e-16 1258.925 5.305107e-16 1584.893 4.118075e-16 1995.262 3.196645e-16 2511.886 2.481387e-16 3162.278 1.92617e-16 3981.072 1.495185e-16 5011.872 1.160633e-16 6309.573 9.00939e-17 7943.282 6.99352e-17 10000 5.428706e-17 12589.25 4.214024e-17 15848.93 3.271131e-17 19952.62 2.539212e-17 25118.86 1.971063e-17 31622.78 1.530039e-17 39810.72 1.187695e-17 50118.72 9.219513e-18 63095.73 7.156687e-18 79432.82 5.555424e-18 100000 4.312448e-18 125892.5 3.347592e-18 158489.3 2.598625e-18 199526.2 2.017242e-18 251188.6 1.565945e-18 316227.8 1.215627e-18 398107.2 9.436934e-19 501187.2 7.326058e-19 630957.3 5.687497e-19 794328.2 4.415569e-19 1000000 3.428239e-19 1258925 2.661826e-19 1584893 2.066901e-19 1995262 1.605091e-19 2511886 1.246613e-19 3162278 9.683458e-20 3981072 7.523414e-20 5011872 5.846686e-20 6309573 4.545131e-20 7943282 3.534803e-20 10000000 2.750538e-20 12589250 2.141755e-20 15848930 1.669189e-20 19952620 1.302361e-20 25118860 1.017611e-20 31622780 7.965756e-21 39810720 6.249972e-21 50118720 4.9181e-21 63095730 3.884238e-21 79432820 3.081706e-21 100000000 2.458742e-21 1000 1.430849e-15 1258.925 1.110693e-15 1584.893 8.621719e-16 1995.262 6.692585e-16 2511.886 5.195101e-16 3162.278 4.032683e-16 3981.072 3.130359e-16 5011.872 2.429933e-16 6309.573 1.886229e-16 7943.282 1.46418e-16 10000 1.136566e-16 12589.25 8.822569e-17 15848.93 6.8485e-17 19952.62 5.316134e-17 25118.86 4.12664e-17 31622.78 3.203299e-17 39810.72 2.486557e-17 50118.72 1.930189e-17 63095.73 1.49831e-17 79432.82 1.163065e-17 100000 9.028317e-18 125892.5 7.008265e-18 158489.3 5.440207e-18 199526.2 4.223005e-18 251188.6 3.278156e-18 316227.8 2.54472e-18 398107.2 1.975392e-18 501187.2 1.533453e-18 630957.3 1.190399e-18 794328.2 9.241047e-19 1000000 7.173943e-19 1258925 5.569359e-19 1584893 4.323806e-19 1995262 3.356949e-19 2511886 2.606428e-19 3162278 2.023839e-19 3981072 1.571606e-19 5011872 1.220561e-19 6309573 9.48064e-20 7943282 7.365387e-20 10000000 5.723428e-20 12589250 4.448862e-20 15848930 3.459483e-20 19952620 2.691481e-20 25118860 2.095322e-20 31622780 1.632555e-20 39810720 1.273333e-20 50118720 9.944887e-21 63095730 7.780363e-21 79432820 6.100158e-21 100000000 4.795903e-21 1000 2.290817e-15 1258.925 1.77824e-15 1584.893 1.380354e-15 1995.262 1.071496e-15 2511.886 8.317455e-16 3162.278 6.456401e-16 3981.072 5.011763e-16 5011.872 3.890367e-16 6309.573 3.019887e-16 7943.282 2.344179e-16 10000 1.819663e-16 12589.25 1.412509e-16 15848.93 1.096456e-16 19952.62 8.511216e-17 25118.86 6.606813e-17 31622.78 5.128525e-17 39810.72 3.981008e-17 50118.72 3.090252e-17 63095.73 2.398805e-17 79432.82 1.862071e-17 100000 1.445433e-17 125892.5 1.122019e-17 158489.3 8.709696e-18 199526.2 6.760934e-18 251188.6 5.248212e-18 316227.8 4.073966e-18 398107.2 3.162462e-18 501187.2 2.454909e-18 630957.3 1.905673e-18 794328.2 1.47933e-18 1000000 1.148383e-18 1258925 8.914856e-19 1584893 6.920701e-19 1995262 5.372744e-19 2511886 4.171146e-19 3162278 3.23841e-19 3981072 2.514376e-19 5011872 1.952346e-19 6309573 1.516073e-19 7943282 1.177417e-19 10000000 9.145359e-20 12589250 7.104754e-20 15848930 5.52074e-20 19952620 4.291154e-20 25118860 3.336691e-20 31622780 2.595792e-20 39810720 2.020672e-20 50118720 1.574236e-20 63095730 1.227691e-20 79432820 9.586873e-21 100000000 7.498736e-21 ngspice-26/tests/bsim4/nmos/reference/dcSweep_nrs.standard0000644000265600020320000002575212264261473023334 0ustar andreasadminV(d) I(d) 1.000000e-01 5.379965e-07 2.000000e-01 8.976445e-07 3.000000e-01 1.457767e-06 4.000000e-01 2.343991e-06 5.000000e-01 3.739145e-06 6.000000e-01 5.916948e-06 7.000000e-01 9.281309e-06 8.000000e-01 1.441639e-05 9.000000e-01 2.214765e-05 1.000000e+00 3.361163e-05 1.100000e+00 5.032776e-05 1.200000e+00 7.426033e-05 1.000000e-01 6.162301e-06 2.000000e-01 9.963138e-06 3.000000e-01 1.558724e-05 4.000000e-01 2.399592e-05 5.000000e-01 3.640452e-05 6.000000e-01 5.439750e-05 7.000000e-01 7.996238e-05 8.000000e-01 1.154592e-04 9.000000e-01 1.635023e-04 1.000000e+00 2.267502e-04 1.100000e+00 3.076401e-04 1.200000e+00 4.081501e-04 1.000000e-01 5.512512e-05 2.000000e-01 8.366124e-05 3.000000e-01 1.216461e-04 4.000000e-01 1.725410e-04 5.000000e-01 2.390606e-04 6.000000e-01 3.234418e-04 7.000000e-01 4.272062e-04 8.000000e-01 5.510006e-04 9.000000e-01 6.946121e-04 1.000000e+00 8.571526e-04 1.100000e+00 1.037349e-03 1.200000e+00 1.233866e-03 1.000000e-01 3.133128e-04 2.000000e-01 4.329380e-04 3.000000e-01 5.629606e-04 4.000000e-01 7.108426e-04 5.000000e-01 8.765283e-04 6.000000e-01 1.058699e-03 7.000000e-01 1.255591e-03 8.000000e-01 1.465323e-03 9.000000e-01 1.686091e-03 1.000000e+00 1.916338e-03 1.100000e+00 2.154888e-03 1.200000e+00 2.401077e-03 1.000000e-01 9.329030e-04 2.000000e-01 1.221460e-03 3.000000e-01 1.448797e-03 4.000000e-01 1.676354e-03 5.000000e-01 1.909703e-03 6.000000e-01 2.149187e-03 7.000000e-01 2.394182e-03 8.000000e-01 2.643899e-03 9.000000e-01 2.897622e-03 1.000000e+00 3.154837e-03 1.100000e+00 3.415363e-03 1.200000e+00 3.679468e-03 1.000000e-01 1.616213e-03 2.000000e-01 2.242151e-03 3.000000e-01 2.558467e-03 4.000000e-01 2.833233e-03 5.000000e-01 3.099808e-03 6.000000e-01 3.364737e-03 7.000000e-01 3.629820e-03 8.000000e-01 3.895622e-03 9.000000e-01 4.162324e-03 1.000000e+00 4.430061e-03 1.100000e+00 4.699143e-03 1.200000e+00 4.970248e-03 1.000000e-01 2.095921e-03 2.000000e-01 3.225520e-03 3.000000e-01 3.703076e-03 4.000000e-01 4.025923e-03 5.000000e-01 4.316776e-03 6.000000e-01 4.597595e-03 7.000000e-01 4.874390e-03 8.000000e-01 5.149385e-03 9.000000e-01 5.423583e-03 1.000000e+00 5.697566e-03 1.100000e+00 5.971899e-03 1.200000e+00 6.247414e-03 1.000000e-01 2.400964e-03 2.000000e-01 3.999944e-03 3.000000e-01 4.787716e-03 4.000000e-01 5.195721e-03 5.000000e-01 5.517885e-03 6.000000e-01 5.815578e-03 7.000000e-01 6.103645e-03 8.000000e-01 6.387138e-03 9.000000e-01 6.668216e-03 1.000000e+00 6.948001e-03 1.100000e+00 7.227302e-03 1.200000e+00 7.507043e-03 1.000000e-01 2.602137e-03 2.000000e-01 4.549317e-03 3.000000e-01 5.738248e-03 4.000000e-01 6.315430e-03 5.000000e-01 6.689771e-03 6.000000e-01 7.010777e-03 7.000000e-01 7.312716e-03 8.000000e-01 7.606000e-03 9.000000e-01 7.894736e-03 1.000000e+00 8.180882e-03 1.100000e+00 8.465610e-03 1.200000e+00 8.749967e-03 1.000000e-01 2.742160e-03 2.000000e-01 4.939163e-03 3.000000e-01 6.497892e-03 4.000000e-01 7.354720e-03 5.000000e-01 7.823422e-03 6.000000e-01 8.180101e-03 7.000000e-01 8.500650e-03 8.000000e-01 8.806006e-03 9.000000e-01 9.103701e-03 1.000000e+00 9.397062e-03 1.100000e+00 9.687855e-03 1.200000e+00 9.977350e-03 1.000000e-01 2.844140e-03 2.000000e-01 5.224797e-03 3.000000e-01 7.071651e-03 4.000000e-01 8.268984e-03 5.000000e-01 8.904567e-03 6.000000e-01 9.319343e-03 7.000000e-01 9.666244e-03 8.000000e-01 9.987055e-03 9.000000e-01 1.029548e-02 1.000000e+00 1.059712e-02 1.100000e+00 1.089472e-02 1.200000e+00 1.118993e-02 1.000000e-01 2.921053e-03 2.000000e-01 5.440796e-03 3.000000e-01 7.505589e-03 4.000000e-01 9.019955e-03 5.000000e-01 9.908143e-03 6.000000e-01 1.042073e-02 7.000000e-01 1.080692e-02 8.000000e-01 1.114830e-02 9.000000e-01 1.146991e-02 1.000000e+00 1.178121e-02 1.100000e+00 1.208648e-02 1.200000e+00 1.238806e-02 1.000000e-01 7.320763e-08 2.000000e-01 1.375672e-07 3.000000e-01 2.536562e-07 4.000000e-01 4.639291e-07 5.000000e-01 8.421515e-07 6.000000e-01 1.515383e-06 7.000000e-01 2.697513e-06 8.000000e-01 4.738197e-06 9.000000e-01 8.189309e-06 1.000000e+00 1.388749e-05 1.100000e+00 2.304639e-05 1.200000e+00 3.734813e-05 1.000000e-01 2.073869e-06 2.000000e-01 3.734885e-06 3.000000e-01 6.524268e-06 4.000000e-01 1.115517e-05 5.000000e-01 1.865231e-05 6.000000e-01 3.043781e-05 7.000000e-01 4.838219e-05 8.000000e-01 7.480771e-05 9.000000e-01 1.124247e-04 1.000000e+00 1.641836e-04 1.100000e+00 2.330380e-04 1.200000e+00 3.216545e-04 1.000000e-01 3.906029e-05 2.000000e-01 6.231507e-05 3.000000e-01 9.509337e-05 4.000000e-01 1.404919e-04 5.000000e-01 2.013758e-04 6.000000e-01 2.802853e-04 7.000000e-01 3.791093e-04 8.000000e-01 4.988203e-04 9.000000e-01 6.393948e-04 1.000000e+00 7.999581e-04 1.100000e+00 9.790977e-04 1.200000e+00 1.175253e-03 1.000000e-01 3.204831e-04 2.000000e-01 4.379066e-04 3.000000e-01 5.703264e-04 4.000000e-01 7.214180e-04 5.000000e-01 8.905130e-04 6.000000e-01 1.075931e-03 7.000000e-01 1.275616e-03 8.000000e-01 1.487456e-03 9.000000e-01 1.709509e-03 1.000000e+00 1.940178e-03 1.100000e+00 2.178346e-03 1.200000e+00 2.423488e-03 1.000000e-01 1.080832e-03 2.000000e-01 1.339881e-03 3.000000e-01 1.567304e-03 4.000000e-01 1.796404e-03 5.000000e-01 2.030407e-03 6.000000e-01 2.269303e-03 7.000000e-01 2.512484e-03 8.000000e-01 2.759287e-03 9.000000e-01 3.009186e-03 1.000000e+00 3.261908e-03 1.100000e+00 3.517544e-03 1.200000e+00 3.776665e-03 1.000000e-01 1.993869e-03 2.000000e-01 2.500042e-03 3.000000e-01 2.791704e-03 4.000000e-01 3.057104e-03 5.000000e-01 3.316419e-03 6.000000e-01 3.574226e-03 7.000000e-01 3.831971e-03 8.000000e-01 4.090206e-03 9.000000e-01 4.349206e-03 1.000000e+00 4.609265e-03 1.100000e+00 4.870904e-03 1.200000e+00 5.135052e-03 1.000000e-01 2.625921e-03 2.000000e-01 3.654465e-03 3.000000e-01 4.043192e-03 4.000000e-01 4.340508e-03 5.000000e-01 4.616787e-03 6.000000e-01 4.885859e-03 7.000000e-01 5.151994e-03 8.000000e-01 5.416915e-03 9.000000e-01 5.681476e-03 1.000000e+00 5.946269e-03 1.100000e+00 6.211981e-03 1.200000e+00 6.479649e-03 1.000000e-01 2.976211e-03 2.000000e-01 4.647702e-03 3.000000e-01 5.253838e-03 4.000000e-01 5.602811e-03 5.000000e-01 5.900447e-03 6.000000e-01 6.181853e-03 7.000000e-01 6.456582e-03 8.000000e-01 6.728192e-03 9.000000e-01 6.998310e-03 1.000000e+00 7.267878e-03 1.100000e+00 7.537721e-03 1.200000e+00 7.808925e-03 1.000000e-01 3.181040e-03 2.000000e-01 5.377007e-03 3.000000e-01 6.381095e-03 4.000000e-01 6.830052e-03 5.000000e-01 7.160783e-03 6.000000e-01 7.458666e-03 7.000000e-01 7.743889e-03 8.000000e-01 8.023241e-03 9.000000e-01 8.299601e-03 1.000000e+00 8.574448e-03 1.100000e+00 8.848821e-03 1.200000e+00 9.123855e-03 1.000000e-01 3.312704e-03 2.000000e-01 5.863574e-03 3.000000e-01 7.364701e-03 4.000000e-01 8.007609e-03 5.000000e-01 8.393785e-03 6.000000e-01 8.715181e-03 7.000000e-01 9.013849e-03 8.000000e-01 9.302457e-03 9.000000e-01 9.585960e-03 1.000000e+00 9.866698e-03 1.100000e+00 1.014607e-02 1.200000e+00 1.042530e-02 1.000000e-01 3.395457e-03 2.000000e-01 6.185849e-03 3.000000e-01 8.140228e-03 4.000000e-01 9.108512e-03 5.000000e-01 9.592645e-03 6.000000e-01 9.949383e-03 7.000000e-01 1.026594e-02 8.000000e-01 1.056588e-02 9.000000e-01 1.085767e-02 1.000000e+00 1.114502e-02 1.100000e+00 1.142990e-02 1.200000e+00 1.171375e-02 1.000000e-01 3.450885e-03 2.000000e-01 6.401733e-03 3.000000e-01 8.694006e-03 4.000000e-01 1.007813e-02 5.000000e-01 1.073855e-02 6.000000e-01 1.115393e-02 7.000000e-01 1.149707e-02 8.000000e-01 1.181246e-02 9.000000e-01 1.211458e-02 1.000000e+00 1.240945e-02 1.100000e+00 1.270046e-02 1.200000e+00 1.298940e-02 1.000000e-01 3.083677e-06 2.000000e-01 4.615741e-06 3.000000e-01 6.661318e-06 4.000000e-01 9.523514e-06 5.000000e-01 1.353097e-05 6.000000e-01 1.911684e-05 7.000000e-01 2.685444e-05 8.000000e-01 3.749360e-05 9.000000e-01 5.199906e-05 1.000000e+00 7.158858e-05 1.100000e+00 9.776538e-05 1.200000e+00 1.323382e-04 1.000000e-01 1.651002e-05 2.000000e-01 2.426124e-05 3.000000e-01 3.423446e-05 4.000000e-01 4.772411e-05 5.000000e-01 6.591750e-05 6.000000e-01 9.022107e-05 7.000000e-01 1.222822e-04 8.000000e-01 1.639536e-04 9.000000e-01 2.172126e-04 1.000000e+00 2.840472e-04 1.100000e+00 3.663319e-04 1.200000e+00 4.657269e-04 1.000000e-01 7.690764e-05 2.000000e-01 1.102800e-04 3.000000e-01 1.498751e-04 4.000000e-01 1.999814e-04 5.000000e-01 2.627877e-04 6.000000e-01 3.401199e-04 7.000000e-01 4.334449e-04 8.000000e-01 5.437799e-04 9.000000e-01 6.716476e-04 1.000000e+00 8.171105e-04 1.100000e+00 9.798850e-04 1.200000e+00 1.159512e-03 1.000000e-01 2.779883e-04 2.000000e-01 3.895711e-04 3.000000e-01 4.977448e-04 4.000000e-01 6.200823e-04 5.000000e-01 7.585247e-04 6.000000e-01 9.131908e-04 7.000000e-01 1.083544e-03 8.000000e-01 1.268687e-03 9.000000e-01 1.467525e-03 1.000000e+00 1.678921e-03 1.100000e+00 1.901848e-03 1.200000e+00 2.135545e-03 1.000000e-01 6.587778e-04 2.000000e-01 9.524869e-04 3.000000e-01 1.151383e-03 4.000000e-01 1.348011e-03 5.000000e-01 1.553057e-03 6.000000e-01 1.767864e-03 7.000000e-01 1.992106e-03 8.000000e-01 2.225028e-03 9.000000e-01 2.465783e-03 1.000000e+00 2.713580e-03 1.100000e+00 2.967828e-03 1.200000e+00 3.228269e-03 1.000000e-01 1.061203e-03 2.000000e-01 1.667641e-03 3.000000e-01 1.993712e-03 4.000000e-01 2.252433e-03 5.000000e-01 2.502188e-03 6.000000e-01 2.753096e-03 7.000000e-01 3.007487e-03 8.000000e-01 3.265862e-03 9.000000e-01 3.528165e-03 1.000000e+00 3.794191e-03 1.100000e+00 4.063802e-03 1.200000e+00 4.337119e-03 1.000000e-01 1.372063e-03 2.000000e-01 2.309241e-03 3.000000e-01 2.858481e-03 4.000000e-01 3.199054e-03 5.000000e-01 3.487488e-03 6.000000e-01 3.763841e-03 7.000000e-01 4.037542e-03 8.000000e-01 4.311504e-03 9.000000e-01 4.586782e-03 1.000000e+00 4.863784e-03 1.100000e+00 5.142738e-03 1.200000e+00 5.423983e-03 1.000000e-01 1.590846e-03 2.000000e-01 2.793869e-03 3.000000e-01 3.615329e-03 4.000000e-01 4.106804e-03 5.000000e-01 4.450670e-03 6.000000e-01 4.754285e-03 7.000000e-01 5.045658e-03 8.000000e-01 5.332877e-03 9.000000e-01 5.618901e-03 1.000000e+00 5.904999e-03 1.100000e+00 6.191823e-03 1.200000e+00 6.479901e-03 1.000000e-01 1.744988e-03 2.000000e-01 3.148599e-03 3.000000e-01 4.209402e-03 4.000000e-01 4.918764e-03 5.000000e-01 5.363732e-03 6.000000e-01 5.707908e-03 7.000000e-01 6.021053e-03 8.000000e-01 6.322941e-03 9.000000e-01 6.620236e-03 1.000000e+00 6.915670e-03 1.100000e+00 7.210554e-03 1.200000e+00 7.505696e-03 1.000000e-01 1.856576e-03 2.000000e-01 3.411996e-03 3.000000e-01 4.662437e-03 4.000000e-01 5.593280e-03 5.000000e-01 6.202333e-03 6.000000e-01 6.616067e-03 7.000000e-01 6.960757e-03 8.000000e-01 7.281238e-03 9.000000e-01 7.591711e-03 1.000000e+00 7.897580e-03 1.100000e+00 8.201277e-03 1.200000e+00 8.504099e-03 1.000000e-01 1.939597e-03 2.000000e-01 3.611808e-03 3.000000e-01 5.011611e-03 4.000000e-01 6.128574e-03 5.000000e-01 6.936023e-03 6.000000e-01 7.466797e-03 7.000000e-01 7.861630e-03 8.000000e-01 8.207734e-03 9.000000e-01 8.534566e-03 1.000000e+00 8.852565e-03 1.100000e+00 9.166117e-03 1.200000e+00 9.477367e-03 1.000000e-01 2.002664e-03 2.000000e-01 3.766208e-03 3.000000e-01 5.284998e-03 4.000000e-01 6.551554e-03 5.000000e-01 7.544527e-03 6.000000e-01 8.239467e-03 7.000000e-01 8.716582e-03 8.000000e-01 9.100608e-03 9.000000e-01 9.448904e-03 1.000000e+00 9.781519e-03 1.100000e+00 1.010632e-02 1.200000e+00 1.042688e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_scb.standard0000644000265600020320000002575212264261473023301 0ustar andreasadminV(d) I(d) 1.000000e-01 5.381036e-07 2.000000e-01 8.979352e-07 3.000000e-01 1.458523e-06 4.000000e-01 2.345919e-06 5.000000e-01 3.743979e-06 6.000000e-01 5.928842e-06 7.000000e-01 9.309998e-06 8.000000e-01 1.448406e-05 9.000000e-01 2.230339e-05 1.000000e+00 3.396036e-05 1.100000e+00 5.108560e-05 1.200000e+00 7.585441e-05 1.000000e-01 6.175374e-06 2.000000e-01 9.996042e-06 3.000000e-01 1.566575e-05 4.000000e-01 2.417709e-05 5.000000e-01 3.680960e-05 6.000000e-01 5.527369e-05 7.000000e-01 8.179037e-05 8.000000e-01 1.191243e-04 9.000000e-01 1.705364e-04 1.000000e+00 2.396239e-04 1.100000e+00 3.300467e-04 1.200000e+00 4.451953e-04 1.000000e-01 5.603719e-05 2.000000e-01 8.564974e-05 3.000000e-01 1.256776e-04 4.000000e-01 1.802895e-04 5.000000e-01 2.531861e-04 6.000000e-01 3.478281e-04 7.000000e-01 4.670448e-04 8.000000e-01 6.126440e-04 9.000000e-01 7.852036e-04 1.000000e+00 9.841360e-04 1.100000e+00 1.208010e-03 1.200000e+00 1.455038e-03 1.000000e-01 3.365708e-04 2.000000e-01 4.731344e-04 3.000000e-01 6.258448e-04 4.000000e-01 8.032825e-04 5.000000e-01 1.005617e-03 6.000000e-01 1.231184e-03 7.000000e-01 1.477470e-03 8.000000e-01 1.741619e-03 9.000000e-01 2.020814e-03 1.000000e+00 2.312608e-03 1.100000e+00 2.615194e-03 1.200000e+00 2.927631e-03 1.000000e-01 1.078590e-03 2.000000e-01 1.427275e-03 3.000000e-01 1.711529e-03 4.000000e-01 1.997733e-03 5.000000e-01 2.291821e-03 6.000000e-01 2.593736e-03 7.000000e-01 2.902373e-03 8.000000e-01 3.216532e-03 9.000000e-01 3.535218e-03 1.000000e+00 3.857820e-03 1.100000e+00 4.184298e-03 1.200000e+00 4.515363e-03 1.000000e-01 1.966489e-03 2.000000e-01 2.694690e-03 3.000000e-01 3.087158e-03 4.000000e-01 3.431488e-03 5.000000e-01 3.765245e-03 6.000000e-01 4.096264e-03 7.000000e-01 4.426871e-03 8.000000e-01 4.757875e-03 9.000000e-01 5.089625e-03 1.000000e+00 5.422472e-03 1.100000e+00 5.757099e-03 1.200000e+00 6.094820e-03 1.000000e-01 2.647620e-03 2.000000e-01 3.934138e-03 3.000000e-01 4.490970e-03 4.000000e-01 4.888747e-03 5.000000e-01 5.250041e-03 6.000000e-01 5.598883e-03 7.000000e-01 5.942449e-03 8.000000e-01 6.283548e-03 9.000000e-01 6.623523e-03 1.000000e+00 6.963260e-03 1.100000e+00 7.303747e-03 1.200000e+00 7.646505e-03 1.000000e-01 3.121627e-03 2.000000e-01 4.977198e-03 3.000000e-01 5.828211e-03 4.000000e-01 6.309533e-03 5.000000e-01 6.705044e-03 6.000000e-01 7.073379e-03 7.000000e-01 7.430342e-03 8.000000e-01 7.781726e-03 9.000000e-01 8.130143e-03 1.000000e+00 8.477066e-03 1.100000e+00 8.823745e-03 1.200000e+00 9.171809e-03 1.000000e-01 3.459366e-03 2.000000e-01 5.786304e-03 3.000000e-01 7.049916e-03 4.000000e-01 7.676678e-03 5.000000e-01 8.123155e-03 6.000000e-01 8.516979e-03 7.000000e-01 8.890143e-03 8.000000e-01 9.253415e-03 9.000000e-01 9.611348e-03 1.000000e+00 9.966270e-03 1.100000e+00 1.031979e-02 1.200000e+00 1.067365e-02 1.000000e-01 3.709371e-03 2.000000e-01 6.404043e-03 3.000000e-01 8.109684e-03 4.000000e-01 8.973978e-03 5.000000e-01 9.500490e-03 6.000000e-01 9.929411e-03 7.000000e-01 1.032288e-02 8.000000e-01 1.070018e-02 9.000000e-01 1.106892e-02 1.000000e+00 1.143272e-02 1.100000e+00 1.179374e-02 1.200000e+00 1.215392e-02 1.000000e-01 3.900511e-03 2.000000e-01 6.883659e-03 3.000000e-01 8.983496e-03 4.000000e-01 1.017591e-02 5.000000e-01 1.082983e-02 6.000000e-01 1.130891e-02 7.000000e-01 1.172853e-02 8.000000e-01 1.212265e-02 9.000000e-01 1.250374e-02 1.000000e+00 1.287741e-02 1.100000e+00 1.324664e-02 1.200000e+00 1.361368e-02 1.000000e-01 4.050406e-03 2.000000e-01 7.264261e-03 3.000000e-01 9.687450e-03 4.000000e-01 1.124967e-02 5.000000e-01 1.209852e-02 6.000000e-01 1.265156e-02 7.000000e-01 1.310595e-02 8.000000e-01 1.352068e-02 9.000000e-01 1.391611e-02 1.000000e+00 1.430081e-02 1.100000e+00 1.467905e-02 1.200000e+00 1.505357e-02 1.000000e-01 7.321028e-08 2.000000e-01 1.375764e-07 3.000000e-01 2.536872e-07 4.000000e-01 4.640314e-07 5.000000e-01 8.424837e-07 6.000000e-01 1.516439e-06 7.000000e-01 2.700786e-06 8.000000e-01 4.748026e-06 9.000000e-01 8.217731e-06 1.000000e+00 1.396616e-05 1.100000e+00 2.325376e-05 1.200000e+00 3.786694e-05 1.000000e-01 2.075842e-06 2.000000e-01 3.741078e-06 3.000000e-01 6.542583e-06 4.000000e-01 1.120680e-05 5.000000e-01 1.879079e-05 6.000000e-01 3.078970e-05 7.000000e-01 4.922683e-05 8.000000e-01 7.671926e-05 9.000000e-01 1.165001e-04 1.000000e+00 1.723658e-04 1.100000e+00 2.485040e-04 1.200000e+00 3.491799e-04 1.000000e-01 3.962783e-05 2.000000e-01 6.367046e-05 3.000000e-01 9.807032e-05 4.000000e-01 1.466088e-04 5.000000e-01 2.131723e-04 6.000000e-01 3.016524e-04 7.000000e-01 4.154759e-04 8.000000e-01 5.570550e-04 9.000000e-01 7.273784e-04 1.000000e+00 9.259365e-04 1.100000e+00 1.151040e-03 1.200000e+00 1.400437e-03 1.000000e-01 3.472832e-04 2.000000e-01 4.836094e-04 3.000000e-01 6.416803e-04 4.000000e-01 8.260673e-04 5.000000e-01 1.036062e-03 6.000000e-01 1.269272e-03 7.000000e-01 1.522506e-03 8.000000e-01 1.792368e-03 9.000000e-01 2.075732e-03 1.000000e+00 2.370096e-03 1.100000e+00 2.673833e-03 1.200000e+00 2.986366e-03 1.000000e-01 1.272216e-03 2.000000e-01 1.594399e-03 3.000000e-01 1.882878e-03 4.000000e-01 2.173914e-03 5.000000e-01 2.470903e-03 6.000000e-01 2.773539e-03 7.000000e-01 3.080925e-03 8.000000e-01 3.392216e-03 9.000000e-01 3.706839e-03 1.000000e+00 4.024657e-03 1.100000e+00 4.346137e-03 1.200000e+00 4.672512e-03 1.000000e-01 2.461389e-03 2.000000e-01 3.044287e-03 3.000000e-01 3.409153e-03 4.000000e-01 3.742685e-03 5.000000e-01 4.068030e-03 6.000000e-01 4.390920e-03 7.000000e-01 4.713334e-03 8.000000e-01 5.036113e-03 9.000000e-01 5.359768e-03 1.000000e+00 5.684901e-03 1.100000e+00 6.012529e-03 1.200000e+00 6.344369e-03 1.000000e-01 3.406496e-03 2.000000e-01 4.485676e-03 3.000000e-01 4.947536e-03 4.000000e-01 5.316437e-03 5.000000e-01 5.661196e-03 6.000000e-01 5.997142e-03 7.000000e-01 6.329412e-03 8.000000e-01 6.660187e-03 9.000000e-01 6.990627e-03 1.000000e+00 7.321669e-03 1.100000e+00 7.654527e-03 1.200000e+00 7.991088e-03 1.000000e-01 4.031881e-03 2.000000e-01 5.795369e-03 3.000000e-01 6.437274e-03 4.000000e-01 6.857711e-03 5.000000e-01 7.226512e-03 6.000000e-01 7.577328e-03 7.000000e-01 7.920407e-03 8.000000e-01 8.259831e-03 9.000000e-01 8.597587e-03 1.000000e+00 8.934983e-03 1.100000e+00 9.273395e-03 1.200000e+00 9.614801e-03 1.000000e-01 4.447752e-03 2.000000e-01 6.897105e-03 3.000000e-01 7.856388e-03 4.000000e-01 8.360232e-03 5.000000e-01 8.762310e-03 6.000000e-01 9.131724e-03 7.000000e-01 9.487499e-03 8.000000e-01 9.836697e-03 9.000000e-01 1.018253e-02 1.000000e+00 1.052683e-02 1.100000e+00 1.087119e-02 1.200000e+00 1.121766e-02 1.000000e-01 4.738214e-03 2.000000e-01 7.757390e-03 3.000000e-01 9.175754e-03 4.000000e-01 9.817568e-03 5.000000e-01 1.026749e-02 6.000000e-01 1.066078e-02 7.000000e-01 1.103168e-02 8.000000e-01 1.139197e-02 9.000000e-01 1.174669e-02 1.000000e+00 1.209847e-02 1.100000e+00 1.244919e-02 1.200000e+00 1.280097e-02 1.000000e-01 4.934493e-03 2.000000e-01 8.388412e-03 3.000000e-01 1.034314e-02 4.000000e-01 1.121284e-02 5.000000e-01 1.173643e-02 6.000000e-01 1.216280e-02 7.000000e-01 1.255290e-02 8.000000e-01 1.292607e-02 9.000000e-01 1.329063e-02 1.000000e+00 1.365051e-02 1.100000e+00 1.400805e-02 1.200000e+00 1.436550e-02 1.000000e-01 5.076453e-03 2.000000e-01 8.854427e-03 3.000000e-01 1.131542e-02 4.000000e-01 1.252094e-02 5.000000e-01 1.315716e-02 6.000000e-01 1.362882e-02 7.000000e-01 1.404363e-02 8.000000e-01 1.443366e-02 9.000000e-01 1.481101e-02 1.000000e+00 1.518117e-02 1.100000e+00 1.554718e-02 1.200000e+00 1.591142e-02 1.000000e-01 3.086192e-06 2.000000e-01 4.621116e-06 3.000000e-01 6.672341e-06 4.000000e-01 9.545743e-06 5.000000e-01 1.357522e-05 6.000000e-01 1.920386e-05 7.000000e-01 2.702344e-05 8.000000e-01 3.781735e-05 9.000000e-01 5.261004e-05 1.000000e+00 7.272259e-05 1.100000e+00 9.983155e-05 1.200000e+00 1.360261e-04 1.000000e-01 1.657772e-05 2.000000e-01 2.439951e-05 3.000000e-01 3.450415e-05 4.000000e-01 4.823817e-05 5.000000e-01 6.687828e-05 6.000000e-01 9.198042e-05 7.000000e-01 1.254321e-04 8.000000e-01 1.694518e-04 9.000000e-01 2.265423e-04 1.000000e+00 2.993961e-04 1.100000e+00 3.907660e-04 1.200000e+00 5.033272e-04 1.000000e-01 7.825845e-05 2.000000e-01 1.128577e-04 3.000000e-01 1.544802e-04 4.000000e-01 2.079002e-04 5.000000e-01 2.759354e-04 6.000000e-01 3.611870e-04 7.000000e-01 4.659963e-04 8.000000e-01 5.922686e-04 9.000000e-01 7.413231e-04 1.000000e+00 9.138362e-04 1.100000e+00 1.109908e-03 1.200000e+00 1.329252e-03 1.000000e-01 2.933428e-04 2.000000e-01 4.158853e-04 3.000000e-01 5.381511e-04 4.000000e-01 6.790645e-04 5.000000e-01 8.412619e-04 6.000000e-01 1.025251e-03 7.000000e-01 1.230599e-03 8.000000e-01 1.456246e-03 9.000000e-01 1.700731e-03 1.000000e+00 1.962420e-03 1.100000e+00 2.239778e-03 1.200000e+00 2.531640e-03 1.000000e-01 7.299964e-04 2.000000e-01 1.066847e-03 3.000000e-01 1.304685e-03 4.000000e-01 1.542987e-03 5.000000e-01 1.793489e-03 6.000000e-01 2.057408e-03 7.000000e-01 2.334023e-03 8.000000e-01 2.622101e-03 9.000000e-01 2.920318e-03 1.000000e+00 3.227483e-03 1.100000e+00 3.542747e-03 1.200000e+00 3.865813e-03 1.000000e-01 1.219490e-03 2.000000e-01 1.922472e-03 3.000000e-01 2.314048e-03 4.000000e-01 2.631167e-03 5.000000e-01 2.938244e-03 6.000000e-01 3.246975e-03 7.000000e-01 3.560041e-03 8.000000e-01 3.877959e-03 9.000000e-01 4.200591e-03 1.000000e+00 4.527666e-03 1.100000e+00 4.859074e-03 1.200000e+00 5.195153e-03 1.000000e-01 1.615186e-03 2.000000e-01 2.706375e-03 3.000000e-01 3.347917e-03 4.000000e-01 3.758968e-03 5.000000e-01 4.111663e-03 6.000000e-01 4.450107e-03 7.000000e-01 4.785232e-03 8.000000e-01 5.120549e-03 9.000000e-01 5.457365e-03 1.000000e+00 5.796222e-03 1.100000e+00 6.137501e-03 1.200000e+00 6.481837e-03 1.000000e-01 1.905921e-03 2.000000e-01 3.315208e-03 3.000000e-01 4.262445e-03 4.000000e-01 4.832844e-03 5.000000e-01 5.246577e-03 6.000000e-01 5.616272e-03 7.000000e-01 5.971894e-03 8.000000e-01 6.322603e-03 9.000000e-01 6.671887e-03 1.000000e+00 7.021296e-03 1.100000e+00 7.371697e-03 1.200000e+00 7.723929e-03 1.000000e-01 2.119122e-03 2.000000e-01 3.776007e-03 3.000000e-01 5.002170e-03 4.000000e-01 5.804055e-03 5.000000e-01 6.320089e-03 6.000000e-01 6.733725e-03 7.000000e-01 7.114284e-03 8.000000e-01 7.482293e-03 9.000000e-01 7.845076e-03 1.000000e+00 8.205761e-03 1.100000e+00 8.565930e-03 1.200000e+00 8.926699e-03 1.000000e-01 2.278844e-03 2.000000e-01 4.129832e-03 3.000000e-01 5.584225e-03 4.000000e-01 6.636839e-03 5.000000e-01 7.315731e-03 6.000000e-01 7.798441e-03 7.000000e-01 8.213004e-03 8.000000e-01 8.602258e-03 9.000000e-01 8.980606e-03 1.000000e+00 9.353841e-03 1.100000e+00 9.724694e-03 1.200000e+00 1.009476e-02 1.000000e-01 2.401058e-03 2.000000e-01 4.406463e-03 3.000000e-01 6.045474e-03 4.000000e-01 7.320852e-03 5.000000e-01 8.210303e-03 6.000000e-01 8.802992e-03 7.000000e-01 9.267156e-03 8.000000e-01 9.683942e-03 9.000000e-01 1.008085e-02 1.000000e+00 1.046829e-02 1.100000e+00 1.085086e-02 1.200000e+00 1.123099e-02 1.000000e-01 2.496042e-03 2.000000e-01 4.625850e-03 3.000000e-01 6.415743e-03 4.000000e-01 7.875165e-03 5.000000e-01 8.980567e-03 6.000000e-01 9.732659e-03 7.000000e-01 1.027217e-02 8.000000e-01 1.072657e-02 9.000000e-01 1.114648e-02 1.000000e+00 1.155035e-02 1.100000e+00 1.194594e-02 1.200000e+00 1.233698e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_nrd.standard0000644000265600020320000002575212264261473023315 0ustar andreasadminV(d) I(d) 1.000000e-01 5.380875e-07 2.000000e-01 8.978955e-07 3.000000e-01 1.458421e-06 4.000000e-01 2.345660e-06 5.000000e-01 3.743329e-06 6.000000e-01 5.927241e-06 7.000000e-01 9.306128e-06 8.000000e-01 1.447490e-05 9.000000e-01 2.228221e-05 1.000000e+00 3.391265e-05 1.100000e+00 5.098101e-05 1.200000e+00 7.563179e-05 1.000000e-01 6.173361e-06 2.000000e-01 9.991457e-06 3.000000e-01 1.565494e-05 4.000000e-01 2.415217e-05 5.000000e-01 3.675368e-05 6.000000e-01 5.515202e-05 7.000000e-01 8.153454e-05 8.000000e-01 1.186059e-04 9.000000e-01 1.695279e-04 1.000000e+00 2.377478e-04 1.100000e+00 3.267189e-04 1.200000e+00 4.395727e-04 1.000000e-01 5.588748e-05 2.000000e-01 8.535991e-05 3.000000e-01 1.250946e-04 4.000000e-01 1.791609e-04 5.000000e-01 2.511031e-04 6.000000e-01 3.441760e-04 7.000000e-01 4.609778e-04 8.000000e-01 6.030987e-04 9.000000e-01 7.709481e-04 1.000000e+00 9.638486e-04 1.100000e+00 1.180345e-03 1.200000e+00 1.418649e-03 1.000000e-01 3.317756e-04 2.000000e-01 4.665572e-04 3.000000e-01 6.157450e-04 4.000000e-01 7.883764e-04 5.000000e-01 9.846270e-04 6.000000e-01 1.202900e-03 7.000000e-01 1.440815e-03 8.000000e-01 1.695694e-03 9.000000e-01 1.964891e-03 1.000000e+00 2.246077e-03 1.100000e+00 2.537461e-03 1.200000e+00 2.837975e-03 1.000000e-01 1.024423e-03 2.000000e-01 1.386550e-03 3.000000e-01 1.664458e-03 4.000000e-01 1.941587e-03 5.000000e-01 2.225660e-03 6.000000e-01 2.517060e-03 7.000000e-01 2.814887e-03 8.000000e-01 3.118049e-03 9.000000e-01 3.425587e-03 1.000000e+00 3.736828e-03 1.100000e+00 4.051531e-03 1.200000e+00 4.370040e-03 1.000000e-01 1.738184e-03 2.000000e-01 2.567525e-03 3.000000e-01 2.979124e-03 4.000000e-01 3.319113e-03 5.000000e-01 3.644153e-03 6.000000e-01 3.965137e-03 7.000000e-01 4.285181e-03 8.000000e-01 4.605360e-03 9.000000e-01 4.926091e-03 1.000000e+00 5.247639e-03 1.100000e+00 5.570417e-03 1.200000e+00 5.895248e-03 1.000000e-01 2.194322e-03 2.000000e-01 3.602922e-03 3.000000e-01 4.289546e-03 4.000000e-01 4.709042e-03 5.000000e-01 5.069260e-03 6.000000e-01 5.411071e-03 7.000000e-01 5.745484e-03 8.000000e-01 6.076481e-03 9.000000e-01 6.405821e-03 1.000000e+00 6.734450e-03 1.100000e+00 7.063124e-03 1.200000e+00 7.392812e-03 1.000000e-01 2.473712e-03 2.000000e-01 4.323525e-03 3.000000e-01 5.451934e-03 4.000000e-01 6.038055e-03 5.000000e-01 6.454820e-03 6.000000e-01 6.823879e-03 7.000000e-01 7.175027e-03 8.000000e-01 7.517945e-03 9.000000e-01 7.856596e-03 1.000000e+00 8.192911e-03 1.100000e+00 8.528077e-03 1.200000e+00 8.863205e-03 1.000000e-01 2.656560e-03 2.000000e-01 4.804414e-03 3.000000e-01 6.362760e-03 4.000000e-01 7.258324e-03 5.000000e-01 7.783813e-03 6.000000e-01 8.196621e-03 7.000000e-01 8.571197e-03 8.000000e-01 8.929397e-03 9.000000e-01 9.279352e-03 1.000000e+00 9.624712e-03 1.100000e+00 9.967423e-03 1.200000e+00 1.030888e-02 1.000000e-01 2.784036e-03 2.000000e-01 5.140062e-03 3.000000e-01 7.019712e-03 4.000000e-01 8.303579e-03 5.000000e-01 9.033631e-03 6.000000e-01 9.522398e-03 7.000000e-01 9.932167e-03 8.000000e-01 1.031095e-02 9.000000e-01 1.067503e-02 1.000000e+00 1.103117e-02 1.100000e+00 1.138263e-02 1.200000e+00 1.173136e-02 1.000000e-01 2.877248e-03 2.000000e-01 5.385535e-03 3.000000e-01 7.495553e-03 4.000000e-01 9.123763e-03 5.000000e-01 1.016319e-02 6.000000e-01 1.078745e-02 7.000000e-01 1.125328e-02 8.000000e-01 1.166111e-02 9.000000e-01 1.204343e-02 1.000000e+00 1.241263e-02 1.100000e+00 1.277429e-02 1.200000e+00 1.313136e-02 1.000000e-01 2.947857e-03 2.000000e-01 5.571708e-03 3.000000e-01 7.852511e-03 4.000000e-01 9.740056e-03 5.000000e-01 1.111904e-02 6.000000e-01 1.196624e-02 7.000000e-01 1.252533e-02 8.000000e-01 1.297636e-02 9.000000e-01 1.338318e-02 1.000000e+00 1.376867e-02 1.100000e+00 1.414242e-02 1.200000e+00 1.450910e-02 1.000000e-01 7.320992e-08 2.000000e-01 1.375752e-07 3.000000e-01 2.536833e-07 4.000000e-01 4.640185e-07 5.000000e-01 8.424416e-07 6.000000e-01 1.516305e-06 7.000000e-01 2.700370e-06 8.000000e-01 4.746771e-06 9.000000e-01 8.214087e-06 1.000000e+00 1.395601e-05 1.100000e+00 2.322681e-05 1.200000e+00 3.779884e-05 1.000000e-01 2.075575e-06 2.000000e-01 3.740280e-06 3.000000e-01 6.540236e-06 4.000000e-01 1.120018e-05 5.000000e-01 1.877296e-05 6.000000e-01 3.074411e-05 7.000000e-01 4.911654e-05 8.000000e-01 7.646691e-05 9.000000e-01 1.159545e-04 1.000000e+00 1.712506e-04 1.100000e+00 2.463507e-04 1.200000e+00 3.452503e-04 1.000000e-01 3.954727e-05 2.000000e-01 6.348925e-05 3.000000e-01 9.767210e-05 4.000000e-01 1.457811e-04 5.000000e-01 2.115505e-04 6.000000e-01 2.986577e-04 7.000000e-01 4.102715e-04 8.000000e-01 5.485458e-04 9.000000e-01 7.142624e-04 1.000000e+00 9.068051e-04 1.100000e+00 1.124473e-03 1.200000e+00 1.365043e-03 1.000000e-01 3.427185e-04 2.000000e-01 4.767016e-04 3.000000e-01 6.309354e-04 4.000000e-01 8.101518e-04 5.000000e-01 1.013669e-03 6.000000e-01 1.239217e-03 7.000000e-01 1.483799e-03 8.000000e-01 1.744243e-03 9.000000e-01 2.017605e-03 1.000000e+00 2.301475e-03 1.100000e+00 2.594189e-03 1.200000e+00 2.894971e-03 1.000000e-01 1.219889e-03 2.000000e-01 1.548963e-03 3.000000e-01 1.830137e-03 4.000000e-01 2.111971e-03 5.000000e-01 2.399107e-03 6.000000e-01 2.691576e-03 7.000000e-01 2.988616e-03 8.000000e-01 3.289430e-03 9.000000e-01 3.593418e-03 1.000000e+00 3.900304e-03 1.100000e+00 4.210279e-03 1.200000e+00 4.524133e-03 1.000000e-01 2.196479e-03 2.000000e-01 2.919382e-03 3.000000e-01 3.294841e-03 4.000000e-01 3.623331e-03 5.000000e-01 3.940310e-03 6.000000e-01 4.253705e-03 7.000000e-01 4.566108e-03 8.000000e-01 4.878563e-03 9.000000e-01 5.191599e-03 1.000000e+00 5.505663e-03 1.100000e+00 5.821419e-03 1.200000e+00 6.139998e-03 1.000000e-01 2.764937e-03 2.000000e-01 4.190351e-03 3.000000e-01 4.750559e-03 4.000000e-01 5.132056e-03 5.000000e-01 5.474134e-03 6.000000e-01 5.802868e-03 7.000000e-01 6.126140e-03 8.000000e-01 6.447035e-03 9.000000e-01 6.767010e-03 1.000000e+00 7.086954e-03 1.100000e+00 7.407719e-03 1.200000e+00 7.730499e-03 1.000000e-01 3.061769e-03 2.000000e-01 5.134067e-03 3.000000e-01 6.104264e-03 4.000000e-01 6.591181e-03 5.000000e-01 6.972431e-03 6.000000e-01 7.321626e-03 7.000000e-01 7.658161e-03 8.000000e-01 7.988881e-03 9.000000e-01 8.316761e-03 1.000000e+00 8.643354e-03 1.100000e+00 8.969773e-03 1.200000e+00 9.297260e-03 1.000000e-01 3.236713e-03 2.000000e-01 5.731819e-03 3.000000e-01 7.262796e-03 4.000000e-01 7.975924e-03 5.000000e-01 8.427283e-03 6.000000e-01 8.807506e-03 7.000000e-01 9.161923e-03 8.000000e-01 9.504907e-03 9.000000e-01 9.842176e-03 1.000000e+00 1.017644e-02 1.100000e+00 1.050931e-02 1.200000e+00 1.084215e-02 1.000000e-01 3.350023e-03 2.000000e-01 6.113374e-03 3.000000e-01 8.135135e-03 4.000000e-01 9.242220e-03 5.000000e-01 9.826531e-03 6.000000e-01 1.025689e-02 7.000000e-01 1.063660e-02 8.000000e-01 1.099536e-02 9.000000e-01 1.134395e-02 1.000000e+00 1.168711e-02 1.100000e+00 1.202730e-02 1.200000e+00 1.236619e-02 1.000000e-01 3.420661e-03 2.000000e-01 6.359339e-03 3.000000e-01 8.725159e-03 4.000000e-01 1.030768e-02 5.000000e-01 1.114086e-02 6.000000e-01 1.165925e-02 7.000000e-01 1.207822e-02 8.000000e-01 1.245900e-02 9.000000e-01 1.282189e-02 1.000000e+00 1.317551e-02 1.100000e+00 1.352406e-02 1.200000e+00 1.386983e-02 1.000000e-01 3.469479e-03 2.000000e-01 6.529737e-03 3.000000e-01 9.125911e-03 4.000000e-01 1.111396e-02 5.000000e-01 1.232032e-02 6.000000e-01 1.299356e-02 7.000000e-01 1.347425e-02 8.000000e-01 1.388643e-02 9.000000e-01 1.426918e-02 1.000000e+00 1.463717e-02 1.100000e+00 1.499688e-02 1.200000e+00 1.535167e-02 1.000000e-01 3.085739e-06 2.000000e-01 4.620314e-06 3.000000e-01 6.670732e-06 4.000000e-01 9.542510e-06 5.000000e-01 1.356879e-05 6.000000e-01 1.919118e-05 7.000000e-01 2.699872e-05 8.000000e-01 3.776978e-05 9.000000e-01 5.251975e-05 1.000000e+00 7.255372e-05 1.100000e+00 9.952082e-05 1.200000e+00 1.354643e-04 1.000000e-01 1.656499e-05 2.000000e-01 2.437836e-05 3.000000e-01 3.446376e-05 4.000000e-01 4.816139e-05 5.000000e-01 6.673436e-05 6.000000e-01 9.171534e-05 7.000000e-01 1.249538e-04 8.000000e-01 1.686086e-04 9.000000e-01 2.250941e-04 1.000000e+00 2.969792e-04 1.100000e+00 3.868540e-04 1.200000e+00 4.971908e-04 1.000000e-01 7.797402e-05 2.000000e-01 1.124442e-04 3.000000e-01 1.537586e-04 4.000000e-01 2.066576e-04 5.000000e-01 2.738541e-04 6.000000e-01 3.578121e-04 7.000000e-01 4.607085e-04 8.000000e-01 5.842736e-04 9.000000e-01 7.296583e-04 1.000000e+00 8.973907e-04 1.100000e+00 1.087451e-03 1.200000e+00 1.299448e-03 1.000000e-01 2.888343e-04 2.000000e-01 4.111468e-04 3.000000e-01 5.312287e-04 4.000000e-01 6.689862e-04 5.000000e-01 8.270206e-04 6.000000e-01 1.005767e-03 7.000000e-01 1.204758e-03 8.000000e-01 1.422951e-03 9.000000e-01 1.658938e-03 1.000000e+00 1.911152e-03 1.100000e+00 2.178099e-03 1.200000e+00 2.458581e-03 1.000000e-01 6.951611e-04 2.000000e-01 1.040200e-03 3.000000e-01 1.274877e-03 4.000000e-01 1.506393e-03 5.000000e-01 1.748711e-03 6.000000e-01 2.003481e-03 7.000000e-01 2.270173e-03 8.000000e-01 2.547693e-03 9.000000e-01 2.834823e-03 1.000000e+00 3.130426e-03 1.100000e+00 3.433617e-03 1.200000e+00 3.743935e-03 1.000000e-01 1.111404e-03 2.000000e-01 1.826566e-03 3.000000e-01 2.237844e-03 4.000000e-01 2.552126e-03 5.000000e-01 2.850762e-03 6.000000e-01 3.149336e-03 7.000000e-01 3.451445e-03 8.000000e-01 3.757921e-03 9.000000e-01 4.068769e-03 1.000000e+00 4.383752e-03 1.100000e+00 4.702676e-03 1.200000e+00 5.025622e-03 1.000000e-01 1.419423e-03 2.000000e-01 2.481508e-03 3.000000e-01 3.182462e-03 4.000000e-01 3.621693e-03 5.000000e-01 3.974354e-03 6.000000e-01 4.305167e-03 7.000000e-01 4.630173e-03 8.000000e-01 4.954289e-03 9.000000e-01 5.279319e-03 1.000000e+00 5.605986e-03 1.100000e+00 5.934646e-03 1.200000e+00 6.265679e-03 1.000000e-01 1.630621e-03 2.000000e-01 2.948451e-03 3.000000e-01 3.943216e-03 4.000000e-01 4.602814e-03 5.000000e-01 5.047088e-03 6.000000e-01 5.418761e-03 7.000000e-01 5.767757e-03 8.000000e-01 6.108691e-03 9.000000e-01 6.446771e-03 1.000000e+00 6.784188e-03 1.100000e+00 7.122006e-03 1.200000e+00 7.460918e-03 1.000000e-01 1.777694e-03 2.000000e-01 3.280620e-03 3.000000e-01 4.503371e-03 4.000000e-01 5.419234e-03 5.000000e-01 6.030223e-03 6.000000e-01 6.472322e-03 7.000000e-01 6.855535e-03 8.000000e-01 7.217506e-03 9.000000e-01 7.570743e-03 1.000000e+00 7.920198e-03 1.100000e+00 8.268142e-03 1.200000e+00 8.615807e-03 1.000000e-01 1.883649e-03 2.000000e-01 3.523871e-03 3.000000e-01 4.917940e-03 4.000000e-01 6.049642e-03 5.000000e-01 6.882300e-03 6.000000e-01 7.450190e-03 7.000000e-01 7.889418e-03 8.000000e-01 8.281127e-03 9.000000e-01 8.653654e-03 1.000000e+00 9.017445e-03 1.100000e+00 9.376995e-03 1.200000e+00 9.734522e-03 1.000000e-01 1.962289e-03 2.000000e-01 3.707003e-03 3.000000e-01 5.232587e-03 4.000000e-01 6.530381e-03 5.000000e-01 7.572396e-03 6.000000e-01 8.325223e-03 7.000000e-01 8.860091e-03 8.000000e-01 9.297494e-03 9.000000e-01 9.696216e-03 1.000000e+00 1.007781e-02 1.100000e+00 1.045094e-02 1.200000e+00 1.081962e-02 1.000000e-01 2.021922e-03 2.000000e-01 3.847792e-03 3.000000e-01 5.476542e-03 4.000000e-01 6.903376e-03 5.000000e-01 8.112314e-03 6.000000e-01 9.064805e-03 7.000000e-01 9.748193e-03 8.000000e-01 1.025959e-02 9.000000e-01 1.069637e-02 1.000000e+00 1.110123e-02 1.100000e+00 1.149080e-02 1.200000e+00 1.187230e-02 ngspice-26/tests/bsim4/nmos/reference/acVd.standard0000644000265600020320000000332712264261473021727 0ustar andreasadminV(d) g(d,g) g(d,d) c(g,s) c(g,d) 0.1 1.333979e-03 3.616213e-02 9.19499248958434e-15 5.89443559594416e-15 0.2 3.406870e-03 2.820723e-02 9.88390667611086e-15 4.98450134957549e-15 0.3 6.306278e-03 2.009141e-02 1.00680827259773e-14 4.71367427624788e-15 0.4 9.996485e-03 1.133818e-02 1.01034727355593e-14 4.65338025992301e-15 0.5 1.232492e-02 6.470022e-03 1.0114322738497e-14 4.62728925285876e-15 0.6 1.322301e-02 4.878001e-03 1.01195127399022e-14 4.60422124661299e-15 0.7 1.362641e-02 4.294504e-03 1.01227327407741e-14 4.57414623847005e-15 0.8 1.385609e-02 4.030639e-03 1.01249327413697e-14 4.52787122594089e-15 0.9 1.401116e-02 3.891239e-03 1.01264327417759e-14 4.45030620493983e-15 1 1.412822e-02 3.809463e-03 1.01273727420304e-14 4.31401116803735e-15 1.1 1.422267e-02 3.759746e-03 1.01277927421441e-14 4.07757910402234e-15 1.2 1.430079e-02 3.734764e-03 1.01277227421251e-14 3.71918300698503e-15 0.1 8.384251e-04 2.307719e-02 9.0321554454955e-15 5.95008461101137e-15 0.2 1.956853e-03 1.956437e-02 9.74008663717096e-15 5.02796536134356e-15 0.3 3.323944e-03 1.625305e-02 9.94564569282697e-15 4.73224628127633e-15 0.4 4.986992e-03 1.289427e-02 9.98599170375083e-15 4.66636326343822e-15 0.5 7.043919e-03 9.168328e-03 9.9984937071358e-15 4.63890125600276e-15 0.6 8.853895e-03 6.165402e-03 1.00046527088034e-14 4.6153542496273e-15 0.7 9.777520e-03 4.837968e-03 1.0008632709881e-14 4.58503924141938e-15 0.8 1.022243e-02 4.325359e-03 1.00115327106662e-14 4.53860722884771e-15 0.9 1.048149e-02 4.100620e-03 1.00137127112564e-14 4.4609172078128e-15 1 1.066000e-02 3.988943e-03 1.00153027116869e-14 4.32451517088135e-15 1.1 1.079776e-02 3.928684e-03 1.00163727119766e-14 4.08798510683981e-15 1.2 1.091164e-02 3.895692e-03 1.00169527121337e-14 3.72949500977705e-15 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw7.standard0000644000265600020320000002575212264261473023243 0ustar andreasadminV(d) I(d) 1.000000e-01 3.177379e-08 2.000000e-01 5.302250e-08 3.000000e-01 8.612569e-08 4.000000e-01 1.385272e-07 5.000000e-01 2.210844e-07 6.000000e-01 3.501053e-07 7.000000e-01 5.497751e-07 8.000000e-01 8.553350e-07 9.000000e-01 1.317142e-06 1.000000e+00 2.005658e-06 1.100000e+00 3.017278e-06 1.200000e+00 4.480652e-06 1.000000e-01 3.646553e-07 2.000000e-01 5.902927e-07 3.000000e-01 9.251402e-07 4.000000e-01 1.427848e-06 5.000000e-01 2.174045e-06 6.000000e-01 3.264873e-06 7.000000e-01 4.831752e-06 8.000000e-01 7.038400e-06 9.000000e-01 1.007812e-05 1.000000e+00 1.416445e-05 1.100000e+00 1.951500e-05 1.200000e+00 2.633173e-05 1.000000e-01 3.310041e-06 2.000000e-01 5.059972e-06 3.000000e-01 7.426052e-06 4.000000e-01 1.065528e-05 5.000000e-01 1.496737e-05 6.000000e-01 2.056820e-05 7.000000e-01 2.762660e-05 8.000000e-01 3.625109e-05 9.000000e-01 4.647729e-05 1.000000e+00 5.827151e-05 1.100000e+00 7.154968e-05 1.200000e+00 8.620628e-05 1.000000e-01 1.990511e-05 2.000000e-01 2.798868e-05 3.000000e-01 3.703411e-05 4.000000e-01 4.754926e-05 5.000000e-01 5.954499e-05 6.000000e-01 7.292330e-05 7.000000e-01 8.753548e-05 8.000000e-01 1.032121e-04 9.000000e-01 1.197858e-04 1.000000e+00 1.371112e-04 1.100000e+00 1.550806e-04 1.200000e+00 1.736379e-04 1.000000e-01 6.391579e-05 2.000000e-01 8.456601e-05 3.000000e-01 1.014279e-04 4.000000e-01 1.184139e-04 5.000000e-01 1.358728e-04 6.000000e-01 1.538001e-04 7.000000e-01 1.721297e-04 8.000000e-01 1.907898e-04 9.000000e-01 2.097209e-04 1.000000e+00 2.288865e-04 1.100000e+00 2.482841e-04 1.200000e+00 2.679560e-04 1.000000e-01 1.167770e-04 2.000000e-01 1.598476e-04 3.000000e-01 1.831179e-04 4.000000e-01 2.035597e-04 5.000000e-01 2.233817e-04 6.000000e-01 2.430450e-04 7.000000e-01 2.626862e-04 8.000000e-01 2.823527e-04 9.000000e-01 3.020648e-04 1.000000e+00 3.218433e-04 1.100000e+00 3.417289e-04 1.200000e+00 3.617998e-04 1.000000e-01 1.574929e-04 2.000000e-01 2.336135e-04 3.000000e-01 2.665466e-04 4.000000e-01 2.901437e-04 5.000000e-01 3.115981e-04 6.000000e-01 3.323205e-04 7.000000e-01 3.527331e-04 8.000000e-01 3.730011e-04 9.000000e-01 3.932036e-04 1.000000e+00 4.133931e-04 1.100000e+00 4.336285e-04 1.200000e+00 4.540005e-04 1.000000e-01 1.859126e-04 2.000000e-01 2.958846e-04 3.000000e-01 3.460967e-04 4.000000e-01 3.745939e-04 5.000000e-01 3.980642e-04 6.000000e-01 4.199392e-04 7.000000e-01 4.411458e-04 8.000000e-01 4.620244e-04 9.000000e-01 4.827285e-04 1.000000e+00 5.033453e-04 1.100000e+00 5.239490e-04 1.200000e+00 5.446370e-04 1.000000e-01 2.062040e-04 2.000000e-01 3.443439e-04 3.000000e-01 4.189043e-04 4.000000e-01 4.558998e-04 5.000000e-01 4.823580e-04 6.000000e-01 5.057339e-04 7.000000e-01 5.278974e-04 8.000000e-01 5.494798e-04 9.000000e-01 5.707481e-04 1.000000e+00 5.918395e-04 1.100000e+00 6.128493e-04 1.200000e+00 6.338818e-04 1.000000e-01 2.212463e-04 2.000000e-01 3.814234e-04 3.000000e-01 4.822443e-04 4.000000e-01 5.331266e-04 5.000000e-01 5.642560e-04 6.000000e-01 5.896901e-04 7.000000e-01 6.130493e-04 8.000000e-01 6.354599e-04 9.000000e-01 6.573677e-04 1.000000e+00 6.789852e-04 1.100000e+00 7.004401e-04 1.200000e+00 7.218470e-04 1.000000e-01 2.327596e-04 2.000000e-01 4.102534e-04 3.000000e-01 5.346325e-04 4.000000e-01 6.048016e-04 5.000000e-01 6.433448e-04 6.000000e-01 6.717080e-04 7.000000e-01 6.966024e-04 8.000000e-01 7.200034e-04 9.000000e-01 7.426411e-04 1.000000e+00 7.648420e-04 1.100000e+00 7.867833e-04 1.200000e+00 8.085968e-04 1.000000e-01 2.417960e-04 2.000000e-01 4.331557e-04 3.000000e-01 5.769283e-04 4.000000e-01 6.690082e-04 5.000000e-01 7.189005e-04 6.000000e-01 7.515654e-04 7.000000e-01 7.784921e-04 8.000000e-01 8.031039e-04 9.000000e-01 8.265861e-04 1.000000e+00 8.494388e-04 1.100000e+00 8.719128e-04 1.200000e+00 8.941691e-04 1.000000e-01 4.321583e-09 2.000000e-01 8.121870e-09 3.000000e-01 1.497699e-08 4.000000e-01 2.739556e-08 5.000000e-01 4.973925e-08 6.000000e-01 8.952984e-08 7.000000e-01 1.594553e-07 8.000000e-01 2.803305e-07 9.000000e-01 4.852009e-07 1.000000e+00 8.246412e-07 1.100000e+00 1.373121e-06 1.200000e+00 2.236223e-06 1.000000e-01 1.225365e-07 2.000000e-01 2.208589e-07 3.000000e-01 3.862723e-07 4.000000e-01 6.616865e-07 5.000000e-01 1.109556e-06 6.000000e-01 1.818260e-06 7.000000e-01 2.907482e-06 8.000000e-01 4.532181e-06 9.000000e-01 6.884040e-06 1.000000e+00 1.018848e-05 1.100000e+00 1.469457e-05 1.200000e+00 2.065647e-05 1.000000e-01 2.340125e-06 2.000000e-01 3.760925e-06 3.000000e-01 5.794524e-06 4.000000e-01 8.665346e-06 5.000000e-01 1.260453e-05 6.000000e-01 1.784398e-05 7.000000e-01 2.458845e-05 8.000000e-01 3.298258e-05 9.000000e-01 4.308635e-05 1.000000e+00 5.487031e-05 1.100000e+00 6.823449e-05 1.200000e+00 8.304495e-05 1.000000e-01 2.055255e-05 2.000000e-01 2.863374e-05 3.000000e-01 3.801034e-05 4.000000e-01 4.895325e-05 5.000000e-01 6.142054e-05 6.000000e-01 7.527001e-05 7.000000e-01 9.031164e-05 8.000000e-01 1.063433e-04 9.000000e-01 1.231789e-04 1.000000e+00 1.406693e-04 1.100000e+00 1.587176e-04 1.200000e+00 1.772896e-04 1.000000e-01 7.549961e-05 2.000000e-01 9.461194e-05 3.000000e-01 1.117460e-04 4.000000e-01 1.290364e-04 5.000000e-01 1.466822e-04 6.000000e-01 1.646646e-04 7.000000e-01 1.829298e-04 8.000000e-01 2.014274e-04 9.000000e-01 2.201234e-04 1.000000e+00 2.390097e-04 1.100000e+00 2.581141e-04 1.200000e+00 2.775105e-04 1.000000e-01 1.463693e-04 2.000000e-01 1.808234e-04 3.000000e-01 2.024755e-04 4.000000e-01 2.222857e-04 5.000000e-01 2.416145e-04 6.000000e-01 2.607993e-04 7.000000e-01 2.799568e-04 8.000000e-01 2.991365e-04 9.000000e-01 3.183687e-04 1.000000e+00 3.376893e-04 1.100000e+00 3.571592e-04 1.200000e+00 3.768810e-04 1.000000e-01 2.029990e-04 2.000000e-01 2.666127e-04 3.000000e-01 2.939469e-04 4.000000e-01 3.158392e-04 5.000000e-01 3.363141e-04 6.000000e-01 3.562712e-04 7.000000e-01 3.760121e-04 8.000000e-01 3.956656e-04 9.000000e-01 4.153000e-04 1.000000e+00 4.349712e-04 1.100000e+00 4.547517e-04 1.200000e+00 4.747545e-04 1.000000e-01 2.406680e-04 2.000000e-01 3.447483e-04 3.000000e-01 3.825668e-04 4.000000e-01 4.074742e-04 5.000000e-01 4.293625e-04 6.000000e-01 4.501964e-04 7.000000e-01 4.705763e-04 8.000000e-01 4.907416e-04 9.000000e-01 5.108095e-04 1.000000e+00 5.308575e-04 1.100000e+00 5.509676e-04 1.200000e+00 5.712585e-04 1.000000e-01 2.657917e-04 2.000000e-01 4.107750e-04 3.000000e-01 4.670721e-04 4.000000e-01 4.968301e-04 5.000000e-01 5.206655e-04 6.000000e-01 5.425928e-04 7.000000e-01 5.637214e-04 8.000000e-01 5.844645e-04 9.000000e-01 6.050103e-04 1.000000e+00 6.254676e-04 1.100000e+00 6.459305e-04 1.200000e+00 6.665216e-04 1.000000e-01 2.833692e-04 2.000000e-01 4.625960e-04 3.000000e-01 5.458032e-04 4.000000e-01 5.835450e-04 5.000000e-01 6.101651e-04 6.000000e-01 6.334904e-04 7.000000e-01 6.555085e-04 8.000000e-01 6.769060e-04 9.000000e-01 6.979774e-04 1.000000e+00 7.188769e-04 1.100000e+00 7.397166e-04 1.200000e+00 7.606234e-04 1.000000e-01 2.952604e-04 2.000000e-01 5.007422e-04 3.000000e-01 6.157313e-04 4.000000e-01 6.666514e-04 5.000000e-01 6.975387e-04 6.000000e-01 7.227935e-04 7.000000e-01 7.459377e-04 8.000000e-01 7.680931e-04 9.000000e-01 7.897454e-04 1.000000e+00 8.111238e-04 1.100000e+00 8.323672e-04 1.200000e+00 8.536095e-04 1.000000e-01 3.038666e-04 2.000000e-01 5.289597e-04 3.000000e-01 6.742725e-04 4.000000e-01 7.447155e-04 5.000000e-01 7.820955e-04 6.000000e-01 8.099783e-04 7.000000e-01 8.345665e-04 8.000000e-01 8.577123e-04 9.000000e-01 8.801180e-04 1.000000e+00 9.021035e-04 1.100000e+00 9.238472e-04 1.200000e+00 9.454912e-04 1.000000e-01 1.822508e-07 2.000000e-01 2.728966e-07 3.000000e-01 3.940342e-07 4.000000e-01 5.637287e-07 5.000000e-01 8.017030e-07 6.000000e-01 1.134132e-06 7.000000e-01 1.595978e-06 8.000000e-01 2.233535e-06 9.000000e-01 3.107352e-06 1.000000e+00 4.295535e-06 1.100000e+00 5.897243e-06 1.200000e+00 8.036083e-06 1.000000e-01 9.790373e-07 2.000000e-01 1.441014e-06 3.000000e-01 2.037861e-06 4.000000e-01 2.849147e-06 5.000000e-01 3.950350e-06 6.000000e-01 5.433499e-06 7.000000e-01 7.410284e-06 8.000000e-01 1.001207e-05 9.000000e-01 1.338716e-05 1.000000e+00 1.769527e-05 1.100000e+00 2.309987e-05 1.200000e+00 2.976003e-05 1.000000e-01 4.622928e-06 2.000000e-01 6.667277e-06 3.000000e-01 9.127183e-06 4.000000e-01 1.228500e-05 5.000000e-01 1.630771e-05 6.000000e-01 2.134972e-05 7.000000e-01 2.755024e-05 8.000000e-01 3.502285e-05 9.000000e-01 4.384657e-05 1.000000e+00 5.406240e-05 1.100000e+00 6.567721e-05 1.200000e+00 7.867480e-05 1.000000e-01 1.734037e-05 2.000000e-01 2.458569e-05 3.000000e-01 3.181905e-05 4.000000e-01 4.015852e-05 5.000000e-01 4.976070e-05 6.000000e-01 6.065638e-05 7.000000e-01 7.282068e-05 8.000000e-01 8.619153e-05 9.000000e-01 1.006827e-04 1.000000e+00 1.161980e-04 1.100000e+00 1.326465e-04 1.200000e+00 1.499594e-04 1.000000e-01 4.320259e-05 2.000000e-01 6.312432e-05 3.000000e-01 7.720624e-05 4.000000e-01 9.132383e-05 5.000000e-01 1.061692e-04 6.000000e-01 1.218142e-04 7.000000e-01 1.382160e-04 8.000000e-01 1.553014e-04 9.000000e-01 1.729919e-04 1.000000e+00 1.912170e-04 1.100000e+00 2.099262e-04 1.200000e+00 2.291018e-04 1.000000e-01 7.226301e-05 2.000000e-01 1.138568e-04 3.000000e-01 1.370322e-04 4.000000e-01 1.558256e-04 5.000000e-01 1.740340e-04 6.000000e-01 1.923462e-04 7.000000e-01 2.109198e-04 8.000000e-01 2.297848e-04 9.000000e-01 2.489330e-04 1.000000e+00 2.683480e-04 1.100000e+00 2.880231e-04 1.200000e+00 3.079785e-04 1.000000e-01 9.580794e-05 2.000000e-01 1.604296e-04 3.000000e-01 1.983748e-04 4.000000e-01 2.227178e-04 5.000000e-01 2.436312e-04 6.000000e-01 2.637102e-04 7.000000e-01 2.835981e-04 8.000000e-01 3.035015e-04 9.000000e-01 3.234971e-04 1.000000e+00 3.436168e-04 1.100000e+00 3.638829e-04 1.200000e+00 3.843333e-04 1.000000e-01 1.131375e-04 2.000000e-01 1.966690e-04 3.000000e-01 2.527179e-04 4.000000e-01 2.864535e-04 5.000000e-01 3.109689e-04 6.000000e-01 3.328990e-04 7.000000e-01 3.540045e-04 8.000000e-01 3.748242e-04 9.000000e-01 3.955631e-04 1.000000e+00 4.163125e-04 1.100000e+00 4.371234e-04 1.200000e+00 4.580457e-04 1.000000e-01 1.258618e-04 2.000000e-01 2.241354e-04 3.000000e-01 2.967488e-04 4.000000e-01 3.441557e-04 5.000000e-01 3.746903e-04 6.000000e-01 3.992122e-04 7.000000e-01 4.217937e-04 8.000000e-01 4.436399e-04 9.000000e-01 4.651814e-04 1.000000e+00 4.866020e-04 1.100000e+00 5.079948e-04 1.200000e+00 5.294259e-04 1.000000e-01 1.354032e-04 2.000000e-01 2.452476e-04 3.000000e-01 3.314400e-04 4.000000e-01 3.937084e-04 5.000000e-01 4.338303e-04 6.000000e-01 4.624135e-04 7.000000e-01 4.870005e-04 8.000000e-01 5.101038e-04 9.000000e-01 5.325682e-04 1.000000e+00 5.547343e-04 1.100000e+00 5.767623e-04 1.200000e+00 5.987466e-04 1.000000e-01 1.427092e-04 2.000000e-01 2.617670e-04 3.000000e-01 3.589568e-04 4.000000e-01 4.344683e-04 5.000000e-01 4.870287e-04 6.000000e-01 5.220709e-04 7.000000e-01 5.495745e-04 8.000000e-01 5.743020e-04 9.000000e-01 5.978645e-04 1.000000e+00 6.208723e-04 1.100000e+00 6.435963e-04 1.200000e+00 6.661785e-04 1.000000e-01 1.483904e-04 2.000000e-01 2.748764e-04 3.000000e-01 3.810618e-04 4.000000e-01 4.675325e-04 5.000000e-01 5.329044e-04 6.000000e-01 5.773264e-04 7.000000e-01 6.092508e-04 8.000000e-01 6.361910e-04 9.000000e-01 6.611105e-04 1.000000e+00 6.850911e-04 1.100000e+00 7.085860e-04 1.200000e+00 7.318156e-04 ngspice-26/tests/bsim4/nmos/reference/acFreq_trnqsmod.standard0000644000265600020320000000712112264261473024176 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw3.standard0000644000265600020320000002575212264261473023237 0ustar andreasadminV(d) I(d) 1.000000e-01 3.417891e-08 2.000000e-01 3.518229e-08 3.000000e-01 3.570569e-08 4.000000e-01 3.622387e-08 5.000000e-01 3.684861e-08 6.000000e-01 3.771099e-08 7.000000e-01 3.902872e-08 8.000000e-01 4.117783e-08 9.000000e-01 4.480489e-08 1.000000e+00 5.101018e-08 1.100000e+00 6.164706e-08 1.200000e+00 7.980941e-08 1.000000e-01 4.053036e-07 2.000000e-01 4.171118e-07 3.000000e-01 4.228325e-07 4.000000e-01 4.277713e-07 5.000000e-01 4.325188e-07 6.000000e-01 4.372787e-07 7.000000e-01 4.422213e-07 8.000000e-01 4.475843e-07 9.000000e-01 4.537576e-07 1.000000e+00 4.614017e-07 1.100000e+00 4.716339e-07 1.200000e+00 4.863297e-07 1.000000e-01 4.032407e-06 2.000000e-01 4.154196e-06 3.000000e-01 4.209454e-06 4.000000e-01 4.256092e-06 5.000000e-01 4.300058e-06 6.000000e-01 4.342844e-06 7.000000e-01 4.385046e-06 8.000000e-01 4.427035e-06 9.000000e-01 4.469187e-06 1.000000e+00 4.512029e-06 1.100000e+00 4.556386e-06 1.200000e+00 4.603592e-06 1.000000e-01 3.103754e-05 2.000000e-01 3.230004e-05 3.000000e-01 3.272160e-05 4.000000e-01 3.305029e-05 5.000000e-01 3.335140e-05 6.000000e-01 3.364000e-05 7.000000e-01 3.392140e-05 8.000000e-01 3.419809e-05 9.000000e-01 3.447164e-05 1.000000e+00 3.474349e-05 1.100000e+00 3.501542e-05 1.200000e+00 3.528980e-05 1.000000e-01 1.486263e-04 2.000000e-01 1.646949e-04 3.000000e-01 1.673699e-04 4.000000e-01 1.689590e-04 5.000000e-01 1.702866e-04 6.000000e-01 1.715074e-04 7.000000e-01 1.726703e-04 8.000000e-01 1.737956e-04 9.000000e-01 1.748943e-04 1.000000e+00 1.759740e-04 1.100000e+00 1.770422e-04 1.200000e+00 1.781076e-04 1.000000e-01 3.657661e-04 2.000000e-01 4.756979e-04 3.000000e-01 4.923040e-04 4.000000e-01 4.980347e-04 5.000000e-01 5.019132e-04 6.000000e-01 5.051800e-04 7.000000e-01 5.081569e-04 8.000000e-01 5.109625e-04 9.000000e-01 5.136521e-04 1.000000e+00 5.162576e-04 1.100000e+00 5.188032e-04 1.200000e+00 5.213131e-04 1.000000e-01 5.913764e-04 2.000000e-01 8.870825e-04 3.000000e-01 9.695018e-04 4.000000e-01 9.888794e-04 5.000000e-01 9.981876e-04 6.000000e-01 1.004947e-03 7.000000e-01 1.010693e-03 8.000000e-01 1.015909e-03 9.000000e-01 1.020794e-03 1.000000e+00 1.025448e-03 1.100000e+00 1.029935e-03 1.200000e+00 1.034305e-03 1.000000e-01 7.879559e-04 2.000000e-01 1.280731e-03 3.000000e-01 1.506010e-03 4.000000e-01 1.569756e-03 5.000000e-01 1.591428e-03 6.000000e-01 1.604079e-03 7.000000e-01 1.613789e-03 8.000000e-01 1.622160e-03 9.000000e-01 1.629775e-03 1.000000e+00 1.636895e-03 1.100000e+00 1.643663e-03 1.200000e+00 1.650176e-03 1.000000e-01 9.533694e-04 2.000000e-01 1.621886e-03 3.000000e-01 2.018632e-03 4.000000e-01 2.183682e-03 5.000000e-01 2.235821e-03 6.000000e-01 2.259289e-03 7.000000e-01 2.274873e-03 8.000000e-01 2.287377e-03 9.000000e-01 2.298324e-03 1.000000e+00 2.308330e-03 1.100000e+00 2.317699e-03 1.200000e+00 2.326606e-03 1.000000e-01 1.092123e-03 2.000000e-01 1.912405e-03 3.000000e-01 2.470351e-03 4.000000e-01 2.778672e-03 5.000000e-01 2.898816e-03 6.000000e-01 2.944157e-03 7.000000e-01 2.969141e-03 8.000000e-01 2.987282e-03 9.000000e-01 3.002360e-03 1.000000e+00 3.015750e-03 1.100000e+00 3.028063e-03 1.200000e+00 3.039621e-03 1.000000e-01 1.208790e-03 2.000000e-01 2.159380e-03 3.000000e-01 2.859700e-03 4.000000e-01 3.316195e-03 5.000000e-01 3.547801e-03 6.000000e-01 3.638192e-03 7.000000e-01 3.679634e-03 8.000000e-01 3.705979e-03 9.000000e-01 3.726371e-03 1.000000e+00 3.743797e-03 1.100000e+00 3.759465e-03 1.200000e+00 3.773961e-03 1.000000e-01 1.307128e-03 2.000000e-01 2.369572e-03 3.000000e-01 3.194023e-03 4.000000e-01 3.785799e-03 5.000000e-01 4.149559e-03 6.000000e-01 4.320333e-03 7.000000e-01 4.392398e-03 8.000000e-01 4.431642e-03 9.000000e-01 4.459249e-03 1.000000e+00 4.481644e-03 1.100000e+00 4.501202e-03 1.200000e+00 4.518977e-03 1.000000e-01 5.156597e-09 2.000000e-01 5.311340e-09 3.000000e-01 5.431766e-09 4.000000e-01 5.604603e-09 5.000000e-01 5.901825e-09 6.000000e-01 6.444756e-09 7.000000e-01 7.447553e-09 8.000000e-01 9.284572e-09 9.000000e-01 1.260128e-08 1.000000e+00 1.849687e-08 1.100000e+00 2.882342e-08 1.200000e+00 4.667314e-08 1.000000e-01 1.520292e-07 2.000000e-01 1.563532e-07 3.000000e-01 1.588375e-07 4.000000e-01 1.610527e-07 5.000000e-01 1.632318e-07 6.000000e-01 1.654947e-07 7.000000e-01 1.679820e-07 8.000000e-01 1.709175e-07 9.000000e-01 1.746822e-07 1.000000e+00 1.799278e-07 1.100000e+00 1.877609e-07 1.200000e+00 2.000431e-07 1.000000e-01 3.363951e-06 2.000000e-01 3.458531e-06 3.000000e-01 3.510981e-06 4.000000e-01 3.556606e-06 5.000000e-01 3.599958e-06 6.000000e-01 3.642308e-06 7.000000e-01 3.684204e-06 8.000000e-01 3.726002e-06 9.000000e-01 3.768069e-06 1.000000e+00 3.810924e-06 1.100000e+00 3.855381e-06 1.200000e+00 3.902749e-06 1.000000e-01 4.449250e-05 2.000000e-01 4.589608e-05 3.000000e-01 4.654908e-05 4.000000e-01 4.708452e-05 5.000000e-01 4.757995e-05 6.000000e-01 4.805631e-05 7.000000e-01 4.852166e-05 8.000000e-01 4.897997e-05 9.000000e-01 4.943376e-05 1.000000e+00 4.988534e-05 1.100000e+00 5.033733e-05 1.200000e+00 5.079317e-05 1.000000e-01 3.304115e-04 2.000000e-01 3.502898e-04 3.000000e-01 3.558274e-04 4.000000e-01 3.595142e-04 5.000000e-01 3.626197e-04 6.000000e-01 3.654591e-04 7.000000e-01 3.681476e-04 8.000000e-01 3.707381e-04 9.000000e-01 3.732604e-04 1.000000e+00 3.757359e-04 1.100000e+00 3.781843e-04 1.200000e+00 3.806275e-04 1.000000e-01 1.067806e-03 2.000000e-01 1.239056e-03 3.000000e-01 1.269642e-03 4.000000e-01 1.284411e-03 5.000000e-01 1.294990e-03 6.000000e-01 1.303835e-03 7.000000e-01 1.311765e-03 8.000000e-01 1.319133e-03 9.000000e-01 1.326119e-03 1.000000e+00 1.332834e-03 1.100000e+00 1.339366e-03 1.200000e+00 1.345797e-03 1.000000e-01 1.940049e-03 2.000000e-01 2.536987e-03 3.000000e-01 2.646179e-03 4.000000e-01 2.686134e-03 5.000000e-01 2.710522e-03 6.000000e-01 2.729124e-03 7.000000e-01 2.744889e-03 8.000000e-01 2.759000e-03 9.000000e-01 2.772029e-03 1.000000e+00 2.784302e-03 1.100000e+00 2.796046e-03 1.200000e+00 2.807453e-03 1.000000e-01 2.739170e-03 2.000000e-01 3.942837e-03 3.000000e-01 4.223444e-03 4.000000e-01 4.308727e-03 5.000000e-01 4.354118e-03 6.000000e-01 4.386051e-03 7.000000e-01 4.411800e-03 8.000000e-01 4.434113e-03 9.000000e-01 4.454255e-03 1.000000e+00 4.472911e-03 1.100000e+00 4.490518e-03 1.200000e+00 4.507421e-03 1.000000e-01 3.444340e-03 2.000000e-01 5.299298e-03 3.000000e-01 5.863319e-03 4.000000e-01 6.020506e-03 5.000000e-01 6.094921e-03 6.000000e-01 6.143665e-03 7.000000e-01 6.181285e-03 8.000000e-01 6.212975e-03 9.000000e-01 6.241035e-03 1.000000e+00 6.266659e-03 1.100000e+00 6.290572e-03 1.200000e+00 6.313308e-03 1.000000e-01 4.026704e-03 2.000000e-01 6.494312e-03 3.000000e-01 7.445346e-03 4.000000e-01 7.709748e-03 5.000000e-01 7.822514e-03 6.000000e-01 7.891619e-03 7.000000e-01 7.942859e-03 8.000000e-01 7.984956e-03 9.000000e-01 8.021622e-03 1.000000e+00 8.054716e-03 1.100000e+00 8.085324e-03 1.200000e+00 8.114197e-03 1.000000e-01 4.369090e-03 2.000000e-01 7.321643e-03 3.000000e-01 8.755714e-03 4.000000e-01 9.191384e-03 5.000000e-01 9.357304e-03 6.000000e-01 9.450945e-03 7.000000e-01 9.517118e-03 8.000000e-01 9.569939e-03 9.000000e-01 9.615118e-03 1.000000e+00 9.655401e-03 1.100000e+00 9.692316e-03 1.200000e+00 9.726868e-03 1.000000e-01 4.598859e-03 2.000000e-01 7.926540e-03 3.000000e-01 9.861378e-03 4.000000e-01 1.055964e-02 5.000000e-01 1.080411e-02 6.000000e-01 1.092964e-02 7.000000e-01 1.101344e-02 8.000000e-01 1.107811e-02 9.000000e-01 1.113228e-02 1.000000e+00 1.117994e-02 1.100000e+00 1.122318e-02 1.200000e+00 1.126332e-02 1.000000e-01 2.118076e-07 2.000000e-01 2.195201e-07 3.000000e-01 2.222800e-07 4.000000e-01 2.245762e-07 5.000000e-01 2.268475e-07 6.000000e-01 2.292972e-07 7.000000e-01 2.321676e-07 8.000000e-01 2.358458e-07 9.000000e-01 2.409853e-07 1.000000e+00 2.486926e-07 1.100000e+00 2.608286e-07 1.200000e+00 2.804966e-07 1.000000e-01 1.168165e-06 2.000000e-01 1.212154e-06 3.000000e-01 1.227100e-06 4.000000e-01 1.239068e-06 5.000000e-01 1.250234e-06 6.000000e-01 1.261137e-06 7.000000e-01 1.272060e-06 8.000000e-01 1.283291e-06 9.000000e-01 1.295249e-06 1.000000e+00 1.308621e-06 1.100000e+00 1.324555e-06 1.200000e+00 1.344967e-06 1.000000e-01 5.861414e-06 2.000000e-01 6.122565e-06 3.000000e-01 6.198362e-06 4.000000e-01 6.256637e-06 5.000000e-01 6.310087e-06 6.000000e-01 6.361441e-06 7.000000e-01 6.411672e-06 8.000000e-01 6.461303e-06 9.000000e-01 6.510787e-06 1.000000e+00 6.560711e-06 1.100000e+00 6.611963e-06 1.200000e+00 6.665955e-06 1.000000e-01 2.527873e-05 2.000000e-01 2.728931e-05 3.000000e-01 2.766170e-05 4.000000e-01 2.791089e-05 5.000000e-01 2.813044e-05 6.000000e-01 2.833774e-05 7.000000e-01 2.853822e-05 8.000000e-01 2.873425e-05 9.000000e-01 2.892717e-05 1.000000e+00 2.911818e-05 1.100000e+00 2.930871e-05 1.200000e+00 2.950072e-05 1.000000e-01 7.658438e-05 2.000000e-01 9.300748e-05 3.000000e-01 9.505858e-05 4.000000e-01 9.596014e-05 5.000000e-01 9.666420e-05 6.000000e-01 9.730031e-05 7.000000e-01 9.790244e-05 8.000000e-01 9.848330e-05 9.000000e-01 9.904905e-05 1.000000e+00 9.960370e-05 1.100000e+00 1.001510e-04 1.200000e+00 1.006954e-04 1.000000e-01 1.498292e-04 2.000000e-01 2.153914e-04 3.000000e-01 2.292186e-04 4.000000e-01 2.324076e-04 5.000000e-01 2.342187e-04 6.000000e-01 2.356887e-04 7.000000e-01 2.370197e-04 8.000000e-01 2.382743e-04 9.000000e-01 2.394783e-04 1.000000e+00 2.406452e-04 1.100000e+00 2.417848e-04 1.200000e+00 2.429062e-04 1.000000e-01 2.204046e-04 2.000000e-01 3.532240e-04 3.000000e-01 4.083106e-04 4.000000e-01 4.217307e-04 5.000000e-01 4.262581e-04 6.000000e-01 4.291567e-04 7.000000e-01 4.315566e-04 8.000000e-01 4.337302e-04 9.000000e-01 4.357717e-04 1.000000e+00 4.377230e-04 1.100000e+00 4.396071e-04 1.200000e+00 4.414417e-04 1.000000e-01 2.786906e-04 2.000000e-01 4.729554e-04 3.000000e-01 5.861725e-04 4.000000e-01 6.315240e-04 5.000000e-01 6.446022e-04 6.000000e-01 6.502983e-04 7.000000e-01 6.542636e-04 8.000000e-01 6.576099e-04 9.000000e-01 6.606502e-04 1.000000e+00 6.635029e-04 1.100000e+00 6.662238e-04 1.200000e+00 6.688458e-04 1.000000e-01 3.248649e-04 2.000000e-01 5.700565e-04 3.000000e-01 7.374416e-04 4.000000e-01 8.311755e-04 5.000000e-01 8.679623e-04 6.000000e-01 8.805760e-04 7.000000e-01 8.872020e-04 8.000000e-01 8.921289e-04 9.000000e-01 8.963667e-04 1.000000e+00 9.002375e-04 1.100000e+00 9.038728e-04 1.200000e+00 9.073386e-04 1.000000e-01 3.612974e-04 2.000000e-01 6.479781e-04 3.000000e-01 8.612683e-04 4.000000e-01 1.003133e-03 5.000000e-01 1.079095e-03 6.000000e-01 1.109013e-03 7.000000e-01 1.121197e-03 8.000000e-01 1.128566e-03 9.000000e-01 1.134338e-03 1.000000e+00 1.139392e-03 1.100000e+00 1.144035e-03 1.200000e+00 1.148405e-03 1.000000e-01 3.901306e-04 2.000000e-01 7.106275e-04 3.000000e-01 9.622258e-04 4.000000e-01 1.146232e-03 5.000000e-01 1.264843e-03 6.000000e-01 1.325622e-03 7.000000e-01 1.350437e-03 8.000000e-01 1.362310e-03 9.000000e-01 1.370294e-03 1.000000e+00 1.376810e-03 1.100000e+00 1.382602e-03 1.200000e+00 1.387956e-03 1.000000e-01 4.129468e-04 2.000000e-01 7.610863e-04 3.000000e-01 1.044614e-03 4.000000e-01 1.264541e-03 5.000000e-01 1.422123e-03 6.000000e-01 1.520129e-03 7.000000e-01 1.568635e-03 8.000000e-01 1.589843e-03 9.000000e-01 1.601531e-03 1.000000e+00 1.610043e-03 1.100000e+00 1.617214e-03 1.200000e+00 1.623671e-03 ngspice-26/tests/bsim4/nmos/reference/noise1.standard0000644000265600020320000000634612264261473022254 0ustar andreasadminFreq N(d) 1000 1.356683e-19 1258.925 1.0549e-19 1584.893 8.206413e-20 1995.262 6.387989e-20 2511.886 4.976442e-20 3162.278 3.880733e-20 3981.072 3.030192e-20 5011.872 2.369962e-20 6309.573 1.85746e-20 7943.282 1.459632e-20 10000 1.15082e-20 12589.25 9.111045e-21 15848.93 7.250264e-21 19952.62 5.805839e-21 25118.86 4.684607e-21 31622.78 3.814254e-21 39810.72 3.138646e-21 50118.72 2.614206e-21 63095.73 2.207112e-21 79432.82 1.891106e-21 100000 1.645807e-21 125892.5 1.455395e-21 158489.3 1.307588e-21 199526.2 1.192853e-21 251188.6 1.10379e-21 316227.8 1.034656e-21 398107.2 9.809901e-22 501187.2 9.393324e-22 630957.3 9.069957e-22 794328.2 8.818945e-22 1000000 8.624097e-22 1258925 8.472847e-22 1584893 8.35544e-22 1995262 8.264303e-22 2511886 8.193558e-22 3162278 8.138642e-22 3981072 8.096014e-22 5011872 8.062924e-22 6309573 8.037238e-22 7943282 8.0173e-22 10000000 8.001823e-22 12589250 7.989808e-22 15848930 7.980482e-22 19952620 7.973243e-22 25118860 7.967624e-22 31622780 7.963261e-22 39810720 7.959875e-22 50118720 7.957247e-22 63095730 7.955207e-22 79432820 7.953623e-22 100000000 7.952393e-22 1000 2.314194e-19 1258.925 1.798308e-19 1584.893 1.397852e-19 1995.262 1.087e-19 2511.886 8.45702e-20 3162.278 6.58395e-20 3981.072 5.129985e-20 5011.872 4.001348e-20 6309.573 3.125248e-20 7943.282 2.445177e-20 10000 1.917274e-20 12589.25 1.507491e-20 15848.93 1.189398e-20 19952.62 9.424798e-21 25118.86 7.508099e-21 31622.78 6.020266e-21 39810.72 4.865341e-21 50118.72 3.968833e-21 63095.73 3.272922e-21 79432.82 2.732722e-21 100000 2.313394e-21 125892.5 1.987892e-21 158489.3 1.735222e-21 199526.2 1.539087e-21 251188.6 1.386839e-21 316227.8 1.268656e-21 398107.2 1.176917e-21 501187.2 1.105705e-21 630957.3 1.050427e-21 794328.2 1.007517e-21 1000000 9.742086e-22 1258925 9.48353e-22 1584893 9.282827e-22 1995262 9.127032e-22 2511886 9.006097e-22 3162278 8.912221e-22 3981072 8.83935e-22 5011872 8.782784e-22 6309573 8.738875e-22 7943282 8.704791e-22 10000000 8.678333e-22 12589250 8.657795e-22 15848930 8.641853e-22 19952620 8.629477e-22 25118860 8.619871e-22 31622780 8.612414e-22 39810720 8.606626e-22 50118720 8.602133e-22 63095730 8.598645e-22 79432820 8.595938e-22 100000000 8.593836e-22 1000 3.310087e-19 1258.925 2.571433e-19 1584.893 1.998056e-19 1995.262 1.552973e-19 2511.886 1.207479e-19 3162.278 9.392897e-20 3981.072 7.311089e-20 5011.872 5.695091e-20 6309.573 4.440677e-20 7943.282 3.466942e-20 10000 2.711083e-20 12589.25 2.12435e-20 15848.93 1.6689e-20 19952.62 1.315358e-20 25118.86 1.040922e-20 31622.78 8.27892e-21 39810.72 6.625281e-21 50118.72 5.341648e-21 63095.73 4.345232e-21 79432.82 3.571767e-21 100000 2.971367e-21 125892.5 2.505308e-21 158489.3 2.143531e-21 199526.2 1.862703e-21 251188.6 1.644711e-21 316227.8 1.475495e-21 398107.2 1.344142e-21 501187.2 1.242179e-21 630957.3 1.163031e-21 794328.2 1.101592e-21 1000000 1.053901e-21 1258925 1.016881e-21 1584893 9.881436e-22 1995262 9.658366e-22 2511886 9.485209e-22 3162278 9.350796e-22 3981072 9.246458e-22 5011872 9.165467e-22 6309573 9.102597e-22 7943282 9.053795e-22 10000000 9.015912e-22 12589250 8.986506e-22 15848930 8.963679e-22 19952620 8.94596e-22 25118860 8.932206e-22 31622780 8.921529e-22 39810720 8.913241e-22 50118720 8.906808e-22 63095730 8.901814e-22 79432820 8.897937e-22 100000000 8.894928e-22 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw6.standard0000644000265600020320000002575212264261473023242 0ustar andreasadminV(d) I(d) 1.000000e-01 3.387168e-09 2.000000e-01 3.486693e-09 3.000000e-01 3.538651e-09 4.000000e-01 3.590092e-09 5.000000e-01 3.652093e-09 6.000000e-01 3.737644e-09 7.000000e-01 3.868319e-09 8.000000e-01 4.081383e-09 9.000000e-01 4.440910e-09 1.000000e+00 5.055935e-09 1.100000e+00 6.110125e-09 1.200000e+00 7.910081e-09 1.000000e-01 4.016512e-08 2.000000e-01 4.133539e-08 3.000000e-01 4.190240e-08 4.000000e-01 4.239192e-08 5.000000e-01 4.286248e-08 6.000000e-01 4.333428e-08 7.000000e-01 4.382417e-08 8.000000e-01 4.435572e-08 9.000000e-01 4.496757e-08 1.000000e+00 4.572515e-08 1.100000e+00 4.673920e-08 1.200000e+00 4.819557e-08 1.000000e-01 3.996115e-07 2.000000e-01 4.116805e-07 3.000000e-01 4.171567e-07 4.000000e-01 4.217786e-07 5.000000e-01 4.261357e-07 6.000000e-01 4.303758e-07 7.000000e-01 4.345581e-07 8.000000e-01 4.387193e-07 9.000000e-01 4.428966e-07 1.000000e+00 4.471422e-07 1.100000e+00 4.515379e-07 1.200000e+00 4.562158e-07 1.000000e-01 3.076039e-06 2.000000e-01 3.201140e-06 3.000000e-01 3.242915e-06 4.000000e-01 3.275489e-06 5.000000e-01 3.305330e-06 6.000000e-01 3.333931e-06 7.000000e-01 3.361820e-06 8.000000e-01 3.389242e-06 9.000000e-01 3.416353e-06 1.000000e+00 3.443295e-06 1.100000e+00 3.470244e-06 1.200000e+00 3.497436e-06 1.000000e-01 1.473286e-05 2.000000e-01 1.632500e-05 3.000000e-01 1.659003e-05 4.000000e-01 1.674751e-05 5.000000e-01 1.687909e-05 6.000000e-01 1.700008e-05 7.000000e-01 1.711534e-05 8.000000e-01 1.722688e-05 9.000000e-01 1.733579e-05 1.000000e+00 1.744281e-05 1.100000e+00 1.754870e-05 1.200000e+00 1.765430e-05 1.000000e-01 3.626889e-05 2.000000e-01 4.716350e-05 3.000000e-01 4.880842e-05 4.000000e-01 4.937620e-05 5.000000e-01 4.976055e-05 6.000000e-01 5.008436e-05 7.000000e-01 5.037944e-05 8.000000e-01 5.065757e-05 9.000000e-01 5.092421e-05 1.000000e+00 5.118252e-05 1.100000e+00 5.143489e-05 1.200000e+00 5.168373e-05 1.000000e-01 5.865960e-05 2.000000e-01 8.797465e-05 3.000000e-01 9.613954e-05 4.000000e-01 9.805879e-05 5.000000e-01 9.898104e-05 6.000000e-01 9.965097e-05 7.000000e-01 1.002205e-04 8.000000e-01 1.007376e-04 9.000000e-01 1.012220e-04 1.000000e+00 1.016835e-04 1.100000e+00 1.021283e-04 1.200000e+00 1.025616e-04 1.000000e-01 7.818133e-05 2.000000e-01 1.270489e-04 3.000000e-01 1.493737e-04 4.000000e-01 1.556867e-04 5.000000e-01 1.578333e-04 6.000000e-01 1.590869e-04 7.000000e-01 1.600493e-04 8.000000e-01 1.608792e-04 9.000000e-01 1.616342e-04 1.000000e+00 1.623403e-04 1.100000e+00 1.630114e-04 1.200000e+00 1.636573e-04 1.000000e-01 9.461684e-05 2.000000e-01 1.609310e-04 3.000000e-01 2.002623e-04 4.000000e-01 2.166113e-04 5.000000e-01 2.217742e-04 6.000000e-01 2.240989e-04 7.000000e-01 2.256433e-04 8.000000e-01 2.268829e-04 9.000000e-01 2.279682e-04 1.000000e+00 2.289605e-04 1.100000e+00 2.298896e-04 1.200000e+00 2.307730e-04 1.000000e-01 1.084097e-04 2.000000e-01 1.897978e-04 3.000000e-01 2.451268e-04 4.000000e-01 2.756792e-04 5.000000e-01 2.875757e-04 6.000000e-01 2.920656e-04 7.000000e-01 2.945409e-04 8.000000e-01 2.963390e-04 9.000000e-01 2.978339e-04 1.000000e+00 2.991616e-04 1.100000e+00 3.003827e-04 1.200000e+00 3.015290e-04 1.000000e-01 1.200114e-04 2.000000e-01 2.143478e-04 3.000000e-01 2.838134e-04 4.000000e-01 3.290653e-04 5.000000e-01 3.520053e-04 6.000000e-01 3.609541e-04 7.000000e-01 3.650586e-04 8.000000e-01 3.676691e-04 9.000000e-01 3.696906e-04 1.000000e+00 3.714184e-04 1.100000e+00 3.729722e-04 1.200000e+00 3.744099e-04 1.000000e-01 1.297937e-04 2.000000e-01 2.352487e-04 3.000000e-01 3.170449e-04 4.000000e-01 3.757248e-04 5.000000e-01 4.117686e-04 6.000000e-01 4.286767e-04 7.000000e-01 4.358113e-04 8.000000e-01 4.396989e-04 9.000000e-01 4.424349e-04 1.000000e+00 4.446552e-04 1.100000e+00 4.465947e-04 1.200000e+00 4.483576e-04 1.000000e-01 5.110981e-10 2.000000e-01 5.265241e-10 3.000000e-01 5.385486e-10 4.000000e-01 5.557668e-10 5.000000e-01 5.853113e-10 6.000000e-01 6.392053e-10 7.000000e-01 7.386715e-10 8.000000e-01 9.208084e-10 9.000000e-01 1.249581e-09 1.000000e+00 1.833918e-09 1.100000e+00 2.857360e-09 1.200000e+00 4.626343e-09 1.000000e-01 1.506588e-08 2.000000e-01 1.549451e-08 3.000000e-01 1.574080e-08 4.000000e-01 1.596041e-08 5.000000e-01 1.617645e-08 6.000000e-01 1.640079e-08 7.000000e-01 1.664736e-08 8.000000e-01 1.693836e-08 9.000000e-01 1.731152e-08 1.000000e+00 1.783143e-08 1.100000e+00 1.860775e-08 1.200000e+00 1.982496e-08 1.000000e-01 3.333665e-07 2.000000e-01 3.427399e-07 3.000000e-01 3.479381e-07 4.000000e-01 3.524597e-07 5.000000e-01 3.567559e-07 6.000000e-01 3.609530e-07 7.000000e-01 3.651050e-07 8.000000e-01 3.692472e-07 9.000000e-01 3.734161e-07 1.000000e+00 3.776631e-07 1.100000e+00 3.820685e-07 1.200000e+00 3.867624e-07 1.000000e-01 4.409916e-06 2.000000e-01 4.549003e-06 3.000000e-01 4.613720e-06 4.000000e-01 4.666788e-06 5.000000e-01 4.715892e-06 6.000000e-01 4.763107e-06 7.000000e-01 4.809231e-06 8.000000e-01 4.854657e-06 9.000000e-01 4.899635e-06 1.000000e+00 4.944394e-06 1.100000e+00 4.989193e-06 1.200000e+00 5.034373e-06 1.000000e-01 3.276923e-05 2.000000e-01 3.473857e-05 3.000000e-01 3.528737e-05 4.000000e-01 3.565285e-05 5.000000e-01 3.596077e-05 6.000000e-01 3.624233e-05 7.000000e-01 3.650893e-05 8.000000e-01 3.676583e-05 9.000000e-01 3.701597e-05 1.000000e+00 3.726147e-05 1.100000e+00 3.750428e-05 1.200000e+00 3.774659e-05 1.000000e-01 1.060174e-04 2.000000e-01 1.229820e-04 3.000000e-01 1.260125e-04 4.000000e-01 1.274768e-04 5.000000e-01 1.285260e-04 6.000000e-01 1.294035e-04 7.000000e-01 1.301904e-04 8.000000e-01 1.309216e-04 9.000000e-01 1.316148e-04 1.000000e+00 1.322812e-04 1.100000e+00 1.329294e-04 1.200000e+00 1.335678e-04 1.000000e-01 1.928595e-04 2.000000e-01 2.520158e-04 3.000000e-01 2.628258e-04 4.000000e-01 2.667859e-04 5.000000e-01 2.692050e-04 6.000000e-01 2.710510e-04 7.000000e-01 2.726158e-04 8.000000e-01 2.740166e-04 9.000000e-01 2.753102e-04 1.000000e+00 2.765289e-04 1.100000e+00 2.776950e-04 1.200000e+00 2.788278e-04 1.000000e-01 2.726163e-04 2.000000e-01 3.919856e-04 3.000000e-01 4.197299e-04 4.000000e-01 4.281748e-04 5.000000e-01 4.326754e-04 6.000000e-01 4.358440e-04 7.000000e-01 4.384002e-04 8.000000e-01 4.406158e-04 9.000000e-01 4.426162e-04 1.000000e+00 4.444691e-04 1.100000e+00 4.462181e-04 1.200000e+00 4.478973e-04 1.000000e-01 3.431522e-04 2.000000e-01 5.272810e-04 3.000000e-01 5.829881e-04 4.000000e-01 5.985278e-04 5.000000e-01 6.059000e-04 6.000000e-01 6.107348e-04 7.000000e-01 6.144688e-04 8.000000e-01 6.176156e-04 9.000000e-01 6.204026e-04 1.000000e+00 6.229481e-04 1.100000e+00 6.253240e-04 1.200000e+00 6.275831e-04 1.000000e-01 4.015139e-04 2.000000e-01 6.467036e-04 3.000000e-01 7.406066e-04 4.000000e-01 7.666908e-04 5.000000e-01 7.778476e-04 6.000000e-01 7.846971e-04 7.000000e-01 7.897812e-04 8.000000e-01 7.939607e-04 9.000000e-01 7.976023e-04 1.000000e+00 8.008901e-04 1.100000e+00 8.039314e-04 1.200000e+00 8.068008e-04 1.000000e-01 4.358717e-04 2.000000e-01 7.295452e-04 3.000000e-01 8.713007e-04 4.000000e-01 9.141999e-04 5.000000e-01 9.305872e-04 6.000000e-01 9.398592e-04 7.000000e-01 9.464209e-04 8.000000e-01 9.516633e-04 9.000000e-01 9.561495e-04 1.000000e+00 9.601509e-04 1.100000e+00 9.638187e-04 1.200000e+00 9.672524e-04 1.000000e-01 4.589476e-04 2.000000e-01 7.901983e-04 3.000000e-01 9.817880e-04 4.000000e-01 1.050485e-03 5.000000e-01 1.074582e-03 6.000000e-01 1.086995e-03 7.000000e-01 1.095297e-03 8.000000e-01 1.101712e-03 9.000000e-01 1.107090e-03 1.000000e+00 1.111823e-03 1.100000e+00 1.116119e-03 1.200000e+00 1.120108e-03 1.000000e-01 2.098994e-08 2.000000e-01 2.175432e-08 3.000000e-01 2.202791e-08 4.000000e-01 2.225555e-08 5.000000e-01 2.248073e-08 6.000000e-01 2.272358e-08 7.000000e-01 2.300811e-08 8.000000e-01 2.337271e-08 9.000000e-01 2.388211e-08 1.000000e+00 2.464597e-08 1.100000e+00 2.584870e-08 1.200000e+00 2.779783e-08 1.000000e-01 1.157640e-07 2.000000e-01 1.201233e-07 3.000000e-01 1.216045e-07 4.000000e-01 1.227906e-07 5.000000e-01 1.238972e-07 6.000000e-01 1.249778e-07 7.000000e-01 1.260604e-07 8.000000e-01 1.271734e-07 9.000000e-01 1.283585e-07 1.000000e+00 1.296836e-07 1.100000e+00 1.312627e-07 1.200000e+00 1.332854e-07 1.000000e-01 5.808668e-07 2.000000e-01 6.067459e-07 3.000000e-01 6.142572e-07 4.000000e-01 6.200324e-07 5.000000e-01 6.253292e-07 6.000000e-01 6.304186e-07 7.000000e-01 6.353965e-07 8.000000e-01 6.403149e-07 9.000000e-01 6.452189e-07 1.000000e+00 6.501663e-07 1.100000e+00 6.552452e-07 1.200000e+00 6.605956e-07 1.000000e-01 2.505218e-06 2.000000e-01 2.704454e-06 3.000000e-01 2.741355e-06 4.000000e-01 2.766049e-06 5.000000e-01 2.787807e-06 6.000000e-01 2.808350e-06 7.000000e-01 2.828219e-06 8.000000e-01 2.847646e-06 9.000000e-01 2.866765e-06 1.000000e+00 2.885695e-06 1.100000e+00 2.904576e-06 1.200000e+00 2.923604e-06 1.000000e-01 7.590415e-06 2.000000e-01 9.217881e-06 3.000000e-01 9.421109e-06 4.000000e-01 9.510444e-06 5.000000e-01 9.580216e-06 6.000000e-01 9.643256e-06 7.000000e-01 9.702930e-06 8.000000e-01 9.760497e-06 9.000000e-01 9.816568e-06 1.000000e+00 9.871538e-06 1.100000e+00 9.925780e-06 1.200000e+00 9.979733e-06 1.000000e-01 1.485147e-05 2.000000e-01 2.134906e-05 3.000000e-01 2.271908e-05 4.000000e-01 2.303502e-05 5.000000e-01 2.321448e-05 6.000000e-01 2.336016e-05 7.000000e-01 2.349207e-05 8.000000e-01 2.361641e-05 9.000000e-01 2.373574e-05 1.000000e+00 2.385140e-05 1.100000e+00 2.396434e-05 1.200000e+00 2.407548e-05 1.000000e-01 2.184939e-05 2.000000e-01 3.501407e-05 3.000000e-01 4.047284e-05 4.000000e-01 4.180234e-05 5.000000e-01 4.225087e-05 6.000000e-01 4.253808e-05 7.000000e-01 4.277591e-05 8.000000e-01 4.299133e-05 9.000000e-01 4.319367e-05 1.000000e+00 4.338707e-05 1.100000e+00 4.357382e-05 1.200000e+00 4.375565e-05 1.000000e-01 2.762985e-05 2.000000e-01 4.688675e-05 3.000000e-01 5.810748e-05 4.000000e-01 6.260093e-05 5.000000e-01 6.389643e-05 6.000000e-01 6.446073e-05 7.000000e-01 6.485364e-05 8.000000e-01 6.518527e-05 9.000000e-01 6.548659e-05 1.000000e+00 6.576934e-05 1.100000e+00 6.603902e-05 1.200000e+00 6.629891e-05 1.000000e-01 3.220987e-05 2.000000e-01 5.651696e-05 3.000000e-01 7.310798e-05 4.000000e-01 8.239668e-05 5.000000e-01 8.604102e-05 6.000000e-01 8.729045e-05 7.000000e-01 8.794688e-05 8.000000e-01 8.843509e-05 9.000000e-01 8.885508e-05 1.000000e+00 8.923871e-05 1.100000e+00 8.959903e-05 1.200000e+00 8.994256e-05 1.000000e-01 3.582404e-05 2.000000e-01 6.424603e-05 3.000000e-01 8.538893e-05 4.000000e-01 9.944898e-05 5.000000e-01 1.069756e-04 6.000000e-01 1.099391e-04 7.000000e-01 1.111459e-04 8.000000e-01 1.118760e-04 9.000000e-01 1.124480e-04 1.000000e+00 1.129488e-04 1.100000e+00 1.134091e-04 1.200000e+00 1.138423e-04 1.000000e-01 3.868466e-05 2.000000e-01 7.046093e-05 3.000000e-01 9.540292e-05 4.000000e-01 1.136414e-04 5.000000e-01 1.253955e-04 6.000000e-01 1.314169e-04 7.000000e-01 1.338747e-04 8.000000e-01 1.350508e-04 9.000000e-01 1.358419e-04 1.000000e+00 1.364876e-04 1.100000e+00 1.370616e-04 1.200000e+00 1.375923e-04 1.000000e-01 4.094852e-05 2.000000e-01 7.546698e-05 3.000000e-01 1.035758e-04 4.000000e-01 1.253764e-04 5.000000e-01 1.409943e-04 6.000000e-01 1.507054e-04 7.000000e-01 1.555103e-04 8.000000e-01 1.576108e-04 9.000000e-01 1.587687e-04 1.000000e+00 1.596120e-04 1.100000e+00 1.603227e-04 1.200000e+00 1.609627e-04 ngspice-26/tests/bsim4/nmos/reference/acFreq_xpart.standard0000644000265600020320000000712112264261473023465 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/acFreq_acnqsmod.standard0000644000265600020320000000712112264261473024134 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/acFreq_capmod.standard0000644000265600020320000000712012264261473023571 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.27855086349603e-14 8.74639172860373e-15 3.90941676858265e-15 1258.925 1.27855176802783e-14 8.74639360469591e-15 3.90941707948425e-15 1584.893 1.27855136065573e-14 8.74639154849043e-15 3.9094165832204e-15 1995.262 1.27855071325881e-14 8.74638995281137e-15 3.90941695120153e-15 2511.886 1.2785512018682e-14 8.74639188654937e-15 3.90941690602856e-15 3162.278 1.27855058460095e-14 8.7463907247575e-15 3.90941574901257e-15 3981.072 1.27855077015624e-14 8.74639140980387e-15 3.90941595429336e-15 5011.872 1.27855111143146e-14 8.74639083517931e-15 3.90941775489597e-15 6309.573 1.27855093739947e-14 8.74639056501407e-15 3.90941767042744e-15 7943.282 1.27855087938683e-14 8.74639070741948e-15 3.90941632172277e-15 10000 1.27855086349603e-14 8.74639172860373e-15 3.90941676858265e-15 12589.25 1.27855176802783e-14 8.74639360469591e-15 3.90941707948425e-15 15848.93 1.27855136065573e-14 8.74639154849043e-15 3.9094165832204e-15 19952.62 1.27855071325881e-14 8.74638995281137e-15 3.90941695120153e-15 25118.86 1.2785512018682e-14 8.74639188654937e-15 3.90941690602856e-15 31622.78 1.27855058460095e-14 8.7463907247575e-15 3.90941574901257e-15 39810.72 1.27855077015624e-14 8.74639140980387e-15 3.90941595429336e-15 50118.72 1.27855111143146e-14 8.74639083517931e-15 3.90941775489598e-15 63095.73 1.27855093739947e-14 8.74639056501407e-15 3.90941767042744e-15 79432.82 1.27855087938683e-14 8.74639070741947e-15 3.90941632172277e-15 100000 1.27855086349603e-14 8.74639172860373e-15 3.90941676858265e-15 125892.5 1.27855176802783e-14 8.74639360469591e-15 3.90941707948425e-15 158489.3 1.27855136065573e-14 8.74639154849043e-15 3.9094165832204e-15 199526.2 1.27855071325881e-14 8.74638995281137e-15 3.90941695120153e-15 251188.6 1.2785512018682e-14 8.74639188654937e-15 3.90941690602856e-15 316227.8 1.27855058460095e-14 8.7463907247575e-15 3.90941574901257e-15 398107.2 1.27855077015624e-14 8.74639140980387e-15 3.90941595429336e-15 501187.2 1.27855111143146e-14 8.74639083517931e-15 3.90941775489598e-15 630957.3 1.27855093739947e-14 8.74639056501407e-15 3.90941767042744e-15 794328.2 1.27855087938683e-14 8.74639070741948e-15 3.90941632172277e-15 1000000 1.27855086349603e-14 8.74639172860373e-15 3.90941676858265e-15 1258925 1.27855176802783e-14 8.74639360469591e-15 3.90941707948425e-15 1584893 1.27855136065573e-14 8.74639154849043e-15 3.9094165832204e-15 1995262 1.27855071325881e-14 8.74638995281137e-15 3.90941695120153e-15 2511886 1.2785512018682e-14 8.74639188654937e-15 3.90941690602856e-15 3162278 1.27855058460095e-14 8.7463907247575e-15 3.90941574901257e-15 3981072 1.27855077015624e-14 8.74639140980387e-15 3.90941595429336e-15 5011872 1.27855111143146e-14 8.74639083517931e-15 3.90941775489598e-15 6309573 1.27855093739947e-14 8.74639056501407e-15 3.90941767042744e-15 7943282 1.27855087938683e-14 8.74639070741947e-15 3.90941632172277e-15 10000000 1.27855086349603e-14 8.74639172860373e-15 3.90941676858265e-15 12589250 1.27855176802783e-14 8.74639360469591e-15 3.90941707948425e-15 15848930 1.27855136065573e-14 8.74639154849043e-15 3.9094165832204e-15 19952620 1.27855071325881e-14 8.74638995281137e-15 3.90941695120153e-15 25118860 1.2785512018682e-14 8.74639188654937e-15 3.90941690602856e-15 31622780 1.27855058460095e-14 8.7463907247575e-15 3.90941574901257e-15 39810720 1.27855077015624e-14 8.74639140980387e-15 3.90941595429336e-15 50118720 1.27855079387558e-14 8.74639083517931e-15 3.90941775489597e-15 63095730 1.27855093739947e-14 8.74639056501407e-15 3.90941767042744e-15 79432820 1.27855087938683e-14 8.74639070741947e-15 3.90941632172277e-15 100000000 1.27855070434108e-14 8.7463901370543e-15 3.90941517703322e-15 ngspice-26/tests/bsim4/nmos/reference/noise3.standard0000644000265600020320000000636112264261473022253 0ustar andreasadminFreq N(d) 1000 6.834969e-16 1258.925 5.305627e-16 1584.893 4.118479e-16 1995.262 3.19696e-16 2511.886 2.481632e-16 3162.278 1.926362e-16 3981.072 1.495335e-16 5011.872 1.160751e-16 6309.573 9.010313e-17 7943.282 6.994248e-17 10000 5.429282e-17 12589.25 4.214483e-17 15848.93 3.271498e-17 19952.62 2.539508e-17 25118.86 1.971304e-17 31622.78 1.530237e-17 39810.72 1.18786e-17 50118.72 9.220904e-18 63095.73 7.157878e-18 79432.82 5.55646e-18 100000 4.313364e-18 125892.5 3.348414e-18 158489.3 2.599375e-18 199526.2 2.017935e-18 251188.6 1.566594e-18 316227.8 1.216242e-18 398107.2 9.442821e-19 501187.2 7.331741e-19 630957.3 5.693021e-19 794328.2 4.42097e-19 1000000 3.433544e-19 1258925 2.667057e-19 1584893 2.072073e-19 1995262 1.610219e-19 2511886 1.251707e-19 3162278 9.734121e-20 3981072 7.573867e-20 5011872 5.896977e-20 6309573 4.595295e-20 7943282 3.584869e-20 10000000 2.800528e-20 12589250 2.191686e-20 15848930 1.719074e-20 19952620 1.352211e-20 25118860 1.067434e-20 31622780 8.463766e-21 39810720 6.747815e-21 50118720 5.415814e-21 63095730 4.381852e-21 79432820 3.579241e-21 100000000 2.956217e-21 1000 1.430988e-15 1258.925 1.1108e-15 1584.893 8.622558e-16 1995.262 6.693238e-16 2511.886 5.195609e-16 3162.278 4.033078e-16 3981.072 3.130667e-16 5011.872 2.430173e-16 6309.573 1.886417e-16 7943.282 1.464328e-16 10000 1.136682e-16 12589.25 8.823481e-17 15848.93 6.849221e-17 19952.62 5.316707e-17 25118.86 4.127098e-17 31622.78 3.203667e-17 39810.72 2.486856e-17 50118.72 1.930434e-17 63095.73 1.498513e-17 79432.82 1.163236e-17 100000 9.029777e-18 125892.5 7.00953e-18 158489.3 5.44132e-18 199526.2 4.224001e-18 251188.6 3.279061e-18 316227.8 2.545553e-18 398107.2 1.976171e-18 501187.2 1.534189e-18 630957.3 1.191102e-18 794328.2 9.247815e-19 1000000 7.180511e-19 1258925 5.575772e-19 1584893 4.330098e-19 1995262 3.363148e-19 2511886 2.612555e-19 3162278 2.029909e-19 3981072 1.577633e-19 5011872 1.226554e-19 6309573 9.540303e-20 7943282 7.424845e-20 10000000 5.782728e-20 12589250 4.508038e-20 15848930 3.518564e-20 19952620 2.750488e-20 25118860 2.154271e-20 31622780 1.691459e-20 39810720 1.332203e-20 50118720 1.053331e-20 63095730 8.368581e-21 79432820 6.688214e-21 100000000 5.383833e-21 1000 2.291031e-15 1258.925 1.778407e-15 1584.893 1.380483e-15 1995.262 1.071596e-15 2511.886 8.318237e-16 3162.278 6.45701e-16 3981.072 5.012237e-16 5011.872 3.890737e-16 6309.573 3.020175e-16 7943.282 2.344404e-16 10000 1.819839e-16 12589.25 1.412647e-16 15848.93 1.096565e-16 19952.62 8.512074e-17 25118.86 6.607493e-17 31622.78 5.129067e-17 39810.72 3.981443e-17 50118.72 3.090604e-17 63095.73 2.399092e-17 79432.82 1.862308e-17 100000 1.445631e-17 125892.5 1.122187e-17 158489.3 8.711143e-18 199526.2 6.762198e-18 251188.6 5.249336e-18 316227.8 4.074981e-18 398107.2 3.163391e-18 501187.2 2.455772e-18 630957.3 1.906485e-18 794328.2 1.480102e-18 1000000 1.149124e-18 1258925 8.922027e-19 1584893 6.927686e-19 1995262 5.379584e-19 2511886 4.177874e-19 3162278 3.245051e-19 3981072 2.520949e-19 5011872 1.958868e-19 6309573 1.522553e-19 7943282 1.183865e-19 10000000 9.209601e-20 12589250 7.168806e-20 15848930 5.584644e-20 19952620 4.354943e-20 25118860 3.400391e-20 31622780 2.659423e-20 39810720 2.084249e-20 50118720 1.637772e-20 63095730 1.291195e-20 79432820 1.022165e-20 100000000 8.133323e-21 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw1_vb1.standard0000644000265600020320000002575212264261473024005 0ustar andreasadminV(d) I(d) 1.000000e-01 2.865069e-07 2.000000e-01 4.837065e-07 3.000000e-01 7.953930e-07 4.000000e-01 1.296081e-06 5.000000e-01 2.097284e-06 6.000000e-01 3.370397e-06 7.000000e-01 5.375901e-06 8.000000e-01 8.503451e-06 9.000000e-01 1.332571e-05 1.000000e+00 2.066852e-05 1.100000e+00 3.169935e-05 1.200000e+00 4.803433e-05 1.000000e-01 3.533485e-06 2.000000e-01 5.810320e-06 3.000000e-01 9.258704e-06 4.000000e-01 1.454107e-05 5.000000e-01 2.254737e-05 6.000000e-01 3.450993e-05 7.000000e-01 5.209492e-05 8.000000e-01 7.748160e-05 9.000000e-01 1.134066e-04 1.000000e+00 1.631385e-04 1.100000e+00 2.303502e-04 1.200000e+00 3.188834e-04 1.000000e-01 3.525185e-05 2.000000e-01 5.488996e-05 3.000000e-01 8.220786e-05 4.000000e-01 1.205488e-04 5.000000e-01 1.733213e-04 6.000000e-01 2.441420e-04 7.000000e-01 3.365068e-04 8.000000e-01 4.533470e-04 9.000000e-01 5.966283e-04 1.000000e+00 7.671431e-04 1.100000e+00 9.645831e-04 1.200000e+00 1.187877e-03 1.000000e-01 2.390241e-04 2.000000e-01 3.433220e-04 3.000000e-01 4.661172e-04 4.000000e-01 6.141409e-04 5.000000e-01 7.884655e-04 6.000000e-01 9.883743e-04 7.000000e-01 1.211992e-03 8.000000e-01 1.456737e-03 9.000000e-01 1.719756e-03 1.000000e+00 1.998343e-03 1.100000e+00 2.290295e-03 1.200000e+00 2.594208e-03 1.000000e-01 8.843269e-04 2.000000e-01 1.178359e-03 3.000000e-01 1.437563e-03 4.000000e-01 1.705625e-03 5.000000e-01 1.985564e-03 6.000000e-01 2.276317e-03 7.000000e-01 2.576158e-03 8.000000e-01 2.883410e-03 9.000000e-01 3.196688e-03 1.000000e+00 3.515058e-03 1.100000e+00 3.838207e-03 1.200000e+00 4.166604e-03 1.000000e-01 1.776535e-03 2.000000e-01 2.405935e-03 3.000000e-01 2.773458e-03 4.000000e-01 3.106640e-03 5.000000e-01 3.433373e-03 6.000000e-01 3.759373e-03 7.000000e-01 4.086189e-03 8.000000e-01 4.414242e-03 9.000000e-01 4.743650e-03 1.000000e+00 5.074615e-03 1.100000e+00 5.407712e-03 1.200000e+00 5.744162e-03 1.000000e-01 2.502105e-03 2.000000e-01 3.661539e-03 3.000000e-01 4.174635e-03 4.000000e-01 4.559249e-03 5.000000e-01 4.914206e-03 6.000000e-01 5.259089e-03 7.000000e-01 5.599831e-03 8.000000e-01 5.938763e-03 9.000000e-01 6.277003e-03 1.000000e+00 6.615319e-03 1.100000e+00 6.954632e-03 1.200000e+00 7.296415e-03 1.000000e-01 3.010811e-03 2.000000e-01 4.745730e-03 3.000000e-01 5.523609e-03 4.000000e-01 5.983465e-03 5.000000e-01 6.370668e-03 6.000000e-01 6.734498e-03 7.000000e-01 7.088498e-03 8.000000e-01 7.437704e-03 9.000000e-01 7.784410e-03 1.000000e+00 8.129940e-03 1.100000e+00 8.475473e-03 1.200000e+00 8.822603e-03 1.000000e-01 3.371728e-03 2.000000e-01 5.597253e-03 3.000000e-01 6.767933e-03 4.000000e-01 7.358041e-03 5.000000e-01 7.792129e-03 6.000000e-01 8.180108e-03 7.000000e-01 8.549760e-03 8.000000e-01 8.910592e-03 9.000000e-01 9.266671e-03 1.000000e+00 9.620112e-03 1.100000e+00 9.972426e-03 1.200000e+00 1.032532e-02 1.000000e-01 3.637508e-03 2.000000e-01 6.248093e-03 3.000000e-01 7.859918e-03 4.000000e-01 8.667322e-03 5.000000e-01 9.174390e-03 6.000000e-01 9.595238e-03 7.000000e-01 9.984308e-03 8.000000e-01 1.035874e-02 9.000000e-01 1.072540e-02 1.000000e+00 1.108757e-02 1.100000e+00 1.144729e-02 1.200000e+00 1.180642e-02 1.000000e-01 3.839830e-03 2.000000e-01 6.752043e-03 3.000000e-01 8.768517e-03 4.000000e-01 9.887526e-03 5.000000e-01 1.051080e-02 6.000000e-01 1.097823e-02 7.000000e-01 1.139213e-02 8.000000e-01 1.178277e-02 9.000000e-01 1.216146e-02 1.000000e+00 1.253331e-02 1.100000e+00 1.290111e-02 1.200000e+00 1.326699e-02 1.000000e-01 3.997953e-03 2.000000e-01 7.150749e-03 3.000000e-01 9.502602e-03 4.000000e-01 1.098642e-02 5.000000e-01 1.178976e-02 6.000000e-01 1.232552e-02 7.000000e-01 1.277219e-02 8.000000e-01 1.318259e-02 9.000000e-01 1.357518e-02 1.000000e+00 1.395781e-02 1.100000e+00 1.433445e-02 1.200000e+00 1.470769e-02 1.000000e-01 3.162869e-08 2.000000e-01 6.017752e-08 3.000000e-01 1.125124e-07 4.000000e-01 2.089734e-07 5.000000e-01 3.859045e-07 6.000000e-01 7.079164e-07 7.000000e-01 1.287905e-06 8.000000e-01 2.318737e-06 9.000000e-01 4.120941e-06 1.000000e+00 7.210242e-06 1.100000e+00 1.238694e-05 1.200000e+00 2.084686e-05 1.000000e-01 9.874537e-07 2.000000e-01 1.818780e-06 3.000000e-01 3.260546e-06 4.000000e-01 5.740978e-06 5.000000e-01 9.919558e-06 6.000000e-01 1.678210e-05 7.000000e-01 2.773798e-05 8.000000e-01 4.471201e-05 9.000000e-01 7.022037e-05 1.000000e+00 1.074176e-04 1.100000e+00 1.600894e-04 1.200000e+00 2.325495e-04 1.000000e-01 2.220603e-05 2.000000e-01 3.685601e-05 3.000000e-01 5.868537e-05 4.000000e-01 9.068038e-05 5.000000e-01 1.362468e-04 6.000000e-01 1.992049e-04 7.000000e-01 2.835143e-04 8.000000e-01 3.928099e-04 9.000000e-01 5.298466e-04 1.000000e+00 6.960524e-04 1.100000e+00 8.914018e-04 1.200000e+00 1.114705e-03 1.000000e-01 2.367692e-04 2.000000e-01 3.393460e-04 3.000000e-01 4.644221e-04 4.000000e-01 6.164780e-04 5.000000e-01 7.962513e-04 6.000000e-01 1.002606e-03 7.000000e-01 1.233063e-03 8.000000e-01 1.484370e-03 9.000000e-01 1.753100e-03 1.000000e+00 2.036186e-03 1.100000e+00 2.331327e-03 1.200000e+00 2.637273e-03 1.000000e-01 1.033617e-03 2.000000e-01 1.314556e-03 3.000000e-01 1.581880e-03 4.000000e-01 1.858070e-03 5.000000e-01 2.144112e-03 6.000000e-01 2.438596e-03 7.000000e-01 2.739881e-03 8.000000e-01 3.046571e-03 9.000000e-01 3.357683e-03 1.000000e+00 3.672768e-03 1.100000e+00 3.992048e-03 1.200000e+00 4.316560e-03 1.000000e-01 2.223766e-03 2.000000e-01 2.732542e-03 3.000000e-01 3.081176e-03 4.000000e-01 3.407151e-03 5.000000e-01 3.727757e-03 6.000000e-01 4.047250e-03 7.000000e-01 4.367035e-03 8.000000e-01 4.687670e-03 9.000000e-01 5.009514e-03 1.000000e+00 5.333078e-03 1.100000e+00 5.659319e-03 1.200000e+00 5.989896e-03 1.000000e-01 3.243805e-03 2.000000e-01 4.188063e-03 3.000000e-01 4.622450e-03 4.000000e-01 4.982179e-03 5.000000e-01 5.322088e-03 6.000000e-01 5.654787e-03 7.000000e-01 5.984576e-03 8.000000e-01 6.313306e-03 9.000000e-01 6.641987e-03 1.000000e+00 6.971483e-03 1.100000e+00 7.302975e-03 1.200000e+00 7.638327e-03 1.000000e-01 3.931698e-03 2.000000e-01 5.532538e-03 3.000000e-01 6.121803e-03 4.000000e-01 6.527863e-03 5.000000e-01 6.890219e-03 6.000000e-01 7.237125e-03 7.000000e-01 7.577385e-03 8.000000e-01 7.914562e-03 9.000000e-01 8.250423e-03 1.000000e+00 8.586177e-03 1.100000e+00 8.923164e-03 1.200000e+00 9.263349e-03 1.000000e-01 4.384473e-03 2.000000e-01 6.686096e-03 3.000000e-01 7.556199e-03 4.000000e-01 8.036209e-03 5.000000e-01 8.429198e-03 6.000000e-01 8.793683e-03 7.000000e-01 9.146156e-03 8.000000e-01 9.492841e-03 9.000000e-01 9.836614e-03 1.000000e+00 1.017917e-02 1.100000e+00 1.052203e-02 1.200000e+00 1.086724e-02 1.000000e-01 4.692829e-03 2.000000e-01 7.598375e-03 3.000000e-01 8.899351e-03 4.000000e-01 9.501572e-03 5.000000e-01 9.938161e-03 6.000000e-01 1.032504e-02 7.000000e-01 1.069199e-02 8.000000e-01 1.104944e-02 9.000000e-01 1.140191e-02 1.000000e+00 1.175181e-02 1.100000e+00 1.210095e-02 1.200000e+00 1.245143e-02 1.000000e-01 4.899205e-03 2.000000e-01 8.266946e-03 3.000000e-01 1.009776e-02 4.000000e-01 1.090549e-02 5.000000e-01 1.140961e-02 6.000000e-01 1.182796e-02 7.000000e-01 1.221387e-02 8.000000e-01 1.258456e-02 9.000000e-01 1.294692e-02 1.000000e+00 1.330478e-02 1.100000e+00 1.366065e-02 1.200000e+00 1.401672e-02 1.000000e-01 5.048886e-03 2.000000e-01 8.760874e-03 3.000000e-01 1.111182e-02 4.000000e-01 1.223039e-02 5.000000e-01 1.283616e-02 6.000000e-01 1.329621e-02 7.000000e-01 1.370517e-02 8.000000e-01 1.409158e-02 9.000000e-01 1.446638e-02 1.000000e+00 1.483462e-02 1.100000e+00 1.519917e-02 1.200000e+00 1.556238e-02 1.000000e-01 1.999198e-06 2.000000e-01 3.017469e-06 3.000000e-01 4.392889e-06 4.000000e-01 6.338460e-06 5.000000e-01 9.093871e-06 6.000000e-01 1.298222e-05 7.000000e-01 1.844168e-05 8.000000e-01 2.606210e-05 9.000000e-01 3.662954e-05 1.000000e+00 5.118025e-05 1.100000e+00 7.106358e-05 1.200000e+00 9.801233e-05 1.000000e-01 1.127121e-05 2.000000e-01 1.672909e-05 3.000000e-01 2.387478e-05 4.000000e-01 3.369901e-05 5.000000e-01 4.719262e-05 6.000000e-01 6.560019e-05 7.000000e-01 9.048181e-05 8.000000e-01 1.237448e-04 9.000000e-01 1.676442e-04 1.000000e+00 2.247446e-04 1.100000e+00 2.978381e-04 1.200000e+00 3.898314e-04 1.000000e-01 5.617709e-05 2.000000e-01 8.165649e-05 3.000000e-01 1.130421e-04 4.000000e-01 1.540625e-04 5.000000e-01 2.073069e-04 6.000000e-01 2.753830e-04 7.000000e-01 3.608551e-04 8.000000e-01 4.660581e-04 9.000000e-01 5.929047e-04 1.000000e+00 7.427512e-04 1.100000e+00 9.163708e-04 1.200000e+00 1.114054e-03 1.000000e-01 2.268044e-04 2.000000e-01 3.230856e-04 3.000000e-01 4.241157e-04 4.000000e-01 5.435021e-04 5.000000e-01 6.838485e-04 6.000000e-01 8.461343e-04 7.000000e-01 1.030450e-03 8.000000e-01 1.236196e-03 9.000000e-01 1.462248e-03 1.000000e+00 1.707183e-03 1.100000e+00 1.969543e-03 1.200000e+00 2.248119e-03 1.000000e-01 6.184398e-04 2.000000e-01 8.973873e-04 3.000000e-01 1.108265e-03 4.000000e-01 1.325956e-03 5.000000e-01 1.558490e-03 6.000000e-01 1.806420e-03 7.000000e-01 2.068815e-03 8.000000e-01 2.344312e-03 9.000000e-01 2.631465e-03 1.000000e+00 2.928954e-03 1.100000e+00 3.235785e-03 1.200000e+00 3.551502e-03 1.000000e-01 1.101566e-03 2.000000e-01 1.718523e-03 3.000000e-01 2.070432e-03 4.000000e-01 2.368542e-03 5.000000e-01 2.662181e-03 6.000000e-01 2.959986e-03 7.000000e-01 3.263749e-03 8.000000e-01 3.573601e-03 9.000000e-01 3.889189e-03 1.000000e+00 4.210091e-03 1.100000e+00 4.536082e-03 1.200000e+00 4.867395e-03 1.000000e-01 1.508926e-03 2.000000e-01 2.511340e-03 3.000000e-01 3.092487e-03 4.000000e-01 3.477971e-03 5.000000e-01 3.817526e-03 6.000000e-01 4.146771e-03 7.000000e-01 4.474535e-03 8.000000e-01 4.803625e-03 9.000000e-01 5.135035e-03 1.000000e+00 5.469145e-03 1.100000e+00 5.806232e-03 1.200000e+00 6.146857e-03 1.000000e-01 1.812457e-03 2.000000e-01 3.139840e-03 3.000000e-01 4.018057e-03 4.000000e-01 4.548485e-03 5.000000e-01 4.945014e-03 6.000000e-01 5.304947e-03 7.000000e-01 5.653550e-03 8.000000e-01 5.998613e-03 9.000000e-01 6.343110e-03 1.000000e+00 6.688356e-03 1.100000e+00 7.035095e-03 1.200000e+00 7.384092e-03 1.000000e-01 2.036060e-03 2.000000e-01 3.618342e-03 3.000000e-01 4.777492e-03 4.000000e-01 5.527036e-03 5.000000e-01 6.017170e-03 6.000000e-01 6.418515e-03 7.000000e-01 6.791426e-03 8.000000e-01 7.153747e-03 9.000000e-01 7.511901e-03 1.000000e+00 7.868648e-03 1.100000e+00 8.225391e-03 1.200000e+00 8.583153e-03 1.000000e-01 2.203950e-03 2.000000e-01 3.986619e-03 3.000000e-01 5.378450e-03 4.000000e-01 6.375130e-03 5.000000e-01 7.016911e-03 6.000000e-01 7.482316e-03 7.000000e-01 7.887623e-03 8.000000e-01 8.270672e-03 9.000000e-01 8.644259e-03 1.000000e+00 9.013573e-03 1.100000e+00 9.381075e-03 1.200000e+00 9.748228e-03 1.000000e-01 2.332683e-03 2.000000e-01 4.275045e-03 3.000000e-01 5.855764e-03 4.000000e-01 7.077033e-03 5.000000e-01 7.921461e-03 6.000000e-01 8.489052e-03 7.000000e-01 8.940992e-03 8.000000e-01 9.350504e-03 9.000000e-01 9.742243e-03 1.000000e+00 1.012560e-02 1.100000e+00 1.050479e-02 1.200000e+00 1.088201e-02 1.000000e-01 2.432991e-03 2.000000e-01 4.504209e-03 3.000000e-01 6.239551e-03 4.000000e-01 7.647901e-03 5.000000e-01 8.706308e-03 6.000000e-01 9.424716e-03 7.000000e-01 9.947133e-03 8.000000e-01 1.039241e-02 9.000000e-01 1.080639e-02 1.000000e+00 1.120587e-02 1.100000e+00 1.159791e-02 1.200000e+00 1.198596e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw9.standard0000644000265600020320000002575212264261473023245 0ustar andreasadminV(d) I(d) 1.000000e-01 2.018647e-09 2.000000e-01 2.078000e-09 3.000000e-01 2.109005e-09 4.000000e-01 2.139702e-09 5.000000e-01 2.176693e-09 6.000000e-01 2.227718e-09 7.000000e-01 2.305635e-09 8.000000e-01 2.432653e-09 9.000000e-01 2.646957e-09 1.000000e+00 3.013527e-09 1.100000e+00 3.641822e-09 1.200000e+00 4.714564e-09 1.000000e-01 2.393675e-08 2.000000e-01 2.463422e-08 3.000000e-01 2.497218e-08 4.000000e-01 2.526395e-08 5.000000e-01 2.554443e-08 6.000000e-01 2.582564e-08 7.000000e-01 2.611763e-08 8.000000e-01 2.643445e-08 9.000000e-01 2.679913e-08 1.000000e+00 2.725066e-08 1.100000e+00 2.785503e-08 1.200000e+00 2.872301e-08 1.000000e-01 2.381539e-07 2.000000e-01 2.453465e-07 3.000000e-01 2.486101e-07 4.000000e-01 2.513646e-07 5.000000e-01 2.539613e-07 6.000000e-01 2.564883e-07 7.000000e-01 2.589809e-07 8.000000e-01 2.614608e-07 9.000000e-01 2.639504e-07 1.000000e+00 2.664807e-07 1.100000e+00 2.691004e-07 1.200000e+00 2.718882e-07 1.000000e-01 1.833304e-06 2.000000e-01 1.907854e-06 3.000000e-01 1.932750e-06 4.000000e-01 1.952162e-06 5.000000e-01 1.969947e-06 6.000000e-01 1.986993e-06 7.000000e-01 2.003615e-06 8.000000e-01 2.019958e-06 9.000000e-01 2.036116e-06 1.000000e+00 2.052174e-06 1.100000e+00 2.068235e-06 1.200000e+00 2.084442e-06 1.000000e-01 8.782013e-06 2.000000e-01 9.730754e-06 3.000000e-01 9.888672e-06 4.000000e-01 9.982523e-06 5.000000e-01 1.006094e-05 6.000000e-01 1.013306e-05 7.000000e-01 1.020176e-05 8.000000e-01 1.026825e-05 9.000000e-01 1.033316e-05 1.000000e+00 1.039695e-05 1.100000e+00 1.046007e-05 1.200000e+00 1.052301e-05 1.000000e-01 2.162442e-05 2.000000e-01 2.811736e-05 3.000000e-01 2.909735e-05 4.000000e-01 2.943565e-05 5.000000e-01 2.966472e-05 6.000000e-01 2.985772e-05 7.000000e-01 3.003361e-05 8.000000e-01 3.019941e-05 9.000000e-01 3.035836e-05 1.000000e+00 3.051235e-05 1.100000e+00 3.066280e-05 1.200000e+00 3.081115e-05 1.000000e-01 3.498293e-05 2.000000e-01 5.245827e-05 3.000000e-01 5.732297e-05 4.000000e-01 5.846630e-05 5.000000e-01 5.901584e-05 6.000000e-01 5.941512e-05 7.000000e-01 5.975463e-05 8.000000e-01 6.006289e-05 9.000000e-01 6.035164e-05 1.000000e+00 6.062679e-05 1.100000e+00 6.089203e-05 1.200000e+00 6.115037e-05 1.000000e-01 4.663516e-05 2.000000e-01 7.577320e-05 3.000000e-01 8.907778e-05 4.000000e-01 9.283822e-05 5.000000e-01 9.411700e-05 6.000000e-01 9.486406e-05 7.000000e-01 9.543773e-05 8.000000e-01 9.593246e-05 9.000000e-01 9.638257e-05 1.000000e+00 9.680353e-05 1.100000e+00 9.720372e-05 1.200000e+00 9.758883e-05 1.000000e-01 5.644916e-05 2.000000e-01 9.599827e-05 3.000000e-01 1.194442e-04 4.000000e-01 1.291843e-04 5.000000e-01 1.322594e-04 6.000000e-01 1.336444e-04 7.000000e-01 1.345648e-04 8.000000e-01 1.353037e-04 9.000000e-01 1.359508e-04 1.000000e+00 1.365424e-04 1.100000e+00 1.370964e-04 1.200000e+00 1.376232e-04 1.000000e-01 6.468790e-05 2.000000e-01 1.132355e-04 3.000000e-01 1.462257e-04 4.000000e-01 1.644326e-04 5.000000e-01 1.715181e-04 6.000000e-01 1.741924e-04 7.000000e-01 1.756673e-04 8.000000e-01 1.767390e-04 9.000000e-01 1.776302e-04 1.000000e+00 1.784218e-04 1.100000e+00 1.791499e-04 1.200000e+00 1.798335e-04 1.000000e-01 7.161981e-05 2.000000e-01 1.278994e-04 3.000000e-01 1.693265e-04 4.000000e-01 1.963006e-04 5.000000e-01 2.099663e-04 6.000000e-01 2.152955e-04 7.000000e-01 2.177404e-04 8.000000e-01 2.192961e-04 9.000000e-01 2.205011e-04 1.000000e+00 2.215312e-04 1.100000e+00 2.224577e-04 1.200000e+00 2.233151e-04 1.000000e-01 7.746597e-05 2.000000e-01 1.403869e-04 3.000000e-01 1.891752e-04 4.000000e-01 2.241614e-04 5.000000e-01 2.456397e-04 6.000000e-01 2.557091e-04 7.000000e-01 2.599579e-04 8.000000e-01 2.622740e-04 9.000000e-01 2.639047e-04 1.000000e+00 2.652283e-04 1.100000e+00 2.663847e-04 1.200000e+00 2.674359e-04 1.000000e-01 3.046316e-10 2.000000e-01 3.138656e-10 3.000000e-01 3.210723e-10 4.000000e-01 3.313741e-10 5.000000e-01 3.490218e-10 6.000000e-01 3.811809e-10 7.000000e-01 4.404991e-10 8.000000e-01 5.490857e-10 9.000000e-01 7.450611e-10 1.000000e+00 1.093343e-09 1.100000e+00 1.703314e-09 1.200000e+00 2.757596e-09 1.000000e-01 8.978622e-09 2.000000e-01 9.234120e-09 3.000000e-01 9.380943e-09 4.000000e-01 9.511864e-09 5.000000e-01 9.640658e-09 6.000000e-01 9.774396e-09 7.000000e-01 9.921384e-09 8.000000e-01 1.009484e-08 9.000000e-01 1.031727e-08 1.000000e+00 1.062716e-08 1.100000e+00 1.108986e-08 1.200000e+00 1.181530e-08 1.000000e-01 1.986739e-07 2.000000e-01 2.042603e-07 3.000000e-01 2.073583e-07 4.000000e-01 2.100531e-07 5.000000e-01 2.126136e-07 6.000000e-01 2.151150e-07 7.000000e-01 2.175895e-07 8.000000e-01 2.200581e-07 9.000000e-01 2.225427e-07 1.000000e+00 2.250737e-07 1.100000e+00 2.276993e-07 1.200000e+00 2.304967e-07 1.000000e-01 2.628463e-06 2.000000e-01 2.711349e-06 3.000000e-01 2.749920e-06 4.000000e-01 2.781550e-06 5.000000e-01 2.810817e-06 6.000000e-01 2.838959e-06 7.000000e-01 2.866451e-06 8.000000e-01 2.893526e-06 9.000000e-01 2.920335e-06 1.000000e+00 2.947013e-06 1.100000e+00 2.973716e-06 1.200000e+00 3.000645e-06 1.000000e-01 1.954051e-05 2.000000e-01 2.071391e-05 3.000000e-01 2.104097e-05 4.000000e-01 2.125885e-05 5.000000e-01 2.144242e-05 6.000000e-01 2.161030e-05 7.000000e-01 2.176926e-05 8.000000e-01 2.192244e-05 9.000000e-01 2.207160e-05 1.000000e+00 2.221799e-05 1.100000e+00 2.236278e-05 1.200000e+00 2.250726e-05 1.000000e-01 6.327012e-05 2.000000e-01 7.337757e-05 3.000000e-01 7.518337e-05 4.000000e-01 7.605636e-05 5.000000e-01 7.668206e-05 6.000000e-01 7.720543e-05 7.000000e-01 7.767482e-05 8.000000e-01 7.811098e-05 9.000000e-01 7.852454e-05 1.000000e+00 7.892212e-05 1.100000e+00 7.930888e-05 1.200000e+00 7.968973e-05 1.000000e-01 1.152037e-04 2.000000e-01 1.504583e-04 3.000000e-01 1.568959e-04 4.000000e-01 1.592563e-04 5.000000e-01 1.606989e-04 6.000000e-01 1.618001e-04 7.000000e-01 1.627338e-04 8.000000e-01 1.635697e-04 9.000000e-01 1.643417e-04 1.000000e+00 1.650691e-04 1.100000e+00 1.657651e-04 1.200000e+00 1.664412e-04 1.000000e-01 1.629872e-04 2.000000e-01 2.341641e-04 3.000000e-01 2.506702e-04 4.000000e-01 2.557001e-04 5.000000e-01 2.583834e-04 6.000000e-01 2.602736e-04 7.000000e-01 2.617989e-04 8.000000e-01 2.631213e-04 9.000000e-01 2.643153e-04 1.000000e+00 2.654215e-04 1.100000e+00 2.664656e-04 1.200000e+00 2.674682e-04 1.000000e-01 2.053160e-04 2.000000e-01 3.151822e-04 3.000000e-01 3.482980e-04 4.000000e-01 3.575424e-04 5.000000e-01 3.619349e-04 6.000000e-01 3.648182e-04 7.000000e-01 3.670461e-04 8.000000e-01 3.689243e-04 9.000000e-01 3.705880e-04 1.000000e+00 3.721078e-04 1.100000e+00 3.735264e-04 1.200000e+00 3.748754e-04 1.000000e-01 2.403883e-04 2.000000e-01 3.867980e-04 3.000000e-01 4.426058e-04 4.000000e-01 4.580988e-04 5.000000e-01 4.647397e-04 6.000000e-01 4.688223e-04 7.000000e-01 4.718550e-04 8.000000e-01 4.743492e-04 9.000000e-01 4.765231e-04 1.000000e+00 4.784861e-04 1.100000e+00 4.803021e-04 1.200000e+00 4.820158e-04 1.000000e-01 2.610561e-04 2.000000e-01 4.365498e-04 3.000000e-01 5.208658e-04 4.000000e-01 5.463099e-04 5.000000e-01 5.560516e-04 6.000000e-01 5.615739e-04 7.000000e-01 5.654863e-04 8.000000e-01 5.686140e-04 9.000000e-01 5.712916e-04 1.000000e+00 5.736805e-04 1.100000e+00 5.758705e-04 1.200000e+00 5.779211e-04 1.000000e-01 2.749458e-04 2.000000e-01 4.730137e-04 3.000000e-01 5.871188e-04 4.000000e-01 6.278362e-04 5.000000e-01 6.421397e-04 6.000000e-01 6.495253e-04 7.000000e-01 6.544726e-04 8.000000e-01 6.582986e-04 9.000000e-01 6.615077e-04 1.000000e+00 6.643325e-04 1.100000e+00 6.668973e-04 1.200000e+00 6.692794e-04 1.000000e-01 1.250916e-08 2.000000e-01 1.296473e-08 3.000000e-01 1.312782e-08 4.000000e-01 1.326352e-08 5.000000e-01 1.339776e-08 6.000000e-01 1.354253e-08 7.000000e-01 1.371214e-08 8.000000e-01 1.392946e-08 9.000000e-01 1.423309e-08 1.000000e+00 1.468836e-08 1.100000e+00 1.540517e-08 1.200000e+00 1.656682e-08 1.000000e-01 6.899065e-08 2.000000e-01 7.158857e-08 3.000000e-01 7.247135e-08 4.000000e-01 7.317828e-08 5.000000e-01 7.383782e-08 6.000000e-01 7.448184e-08 7.000000e-01 7.512704e-08 8.000000e-01 7.579039e-08 9.000000e-01 7.649669e-08 1.000000e+00 7.728648e-08 1.100000e+00 7.822758e-08 1.200000e+00 7.943308e-08 1.000000e-01 3.461758e-07 2.000000e-01 3.615984e-07 3.000000e-01 3.660748e-07 4.000000e-01 3.695165e-07 5.000000e-01 3.726733e-07 6.000000e-01 3.757064e-07 7.000000e-01 3.786731e-07 8.000000e-01 3.816044e-07 9.000000e-01 3.845270e-07 1.000000e+00 3.874755e-07 1.100000e+00 3.905024e-07 1.200000e+00 3.936911e-07 1.000000e-01 1.493061e-06 2.000000e-01 1.611793e-06 3.000000e-01 1.633784e-06 4.000000e-01 1.648500e-06 5.000000e-01 1.661467e-06 6.000000e-01 1.673710e-06 7.000000e-01 1.685551e-06 8.000000e-01 1.697129e-06 9.000000e-01 1.708524e-06 1.000000e+00 1.719806e-06 1.100000e+00 1.731059e-06 1.200000e+00 1.742399e-06 1.000000e-01 4.524009e-06 2.000000e-01 5.493891e-06 3.000000e-01 5.614991e-06 4.000000e-01 5.668228e-06 5.000000e-01 5.709809e-06 6.000000e-01 5.747380e-06 7.000000e-01 5.782944e-06 8.000000e-01 5.817254e-06 9.000000e-01 5.850672e-06 1.000000e+00 5.883434e-06 1.100000e+00 5.915762e-06 1.200000e+00 5.947919e-06 1.000000e-01 8.852434e-06 2.000000e-01 1.272492e-05 3.000000e-01 1.354128e-05 4.000000e-01 1.372954e-05 5.000000e-01 1.383648e-05 6.000000e-01 1.392330e-05 7.000000e-01 1.400192e-05 8.000000e-01 1.407602e-05 9.000000e-01 1.414715e-05 1.000000e+00 1.421608e-05 1.100000e+00 1.428340e-05 1.200000e+00 1.434964e-05 1.000000e-01 1.302465e-05 2.000000e-01 2.087132e-05 3.000000e-01 2.412441e-05 4.000000e-01 2.491655e-05 5.000000e-01 2.518379e-05 6.000000e-01 2.535494e-05 7.000000e-01 2.549668e-05 8.000000e-01 2.562507e-05 9.000000e-01 2.574567e-05 1.000000e+00 2.586094e-05 1.100000e+00 2.597225e-05 1.200000e+00 2.608063e-05 1.000000e-01 1.647150e-05 2.000000e-01 2.795022e-05 3.000000e-01 3.463775e-05 4.000000e-01 3.731529e-05 5.000000e-01 3.808711e-05 6.000000e-01 3.842333e-05 7.000000e-01 3.865747e-05 8.000000e-01 3.885511e-05 9.000000e-01 3.903470e-05 1.000000e+00 3.920322e-05 1.100000e+00 3.936396e-05 1.200000e+00 3.951887e-05 1.000000e-01 1.920284e-05 2.000000e-01 3.369276e-05 3.000000e-01 4.358178e-05 4.000000e-01 4.911733e-05 5.000000e-01 5.128867e-05 6.000000e-01 5.203301e-05 7.000000e-01 5.242413e-05 8.000000e-01 5.271506e-05 9.000000e-01 5.296536e-05 1.000000e+00 5.319402e-05 1.100000e+00 5.340878e-05 1.200000e+00 5.361354e-05 1.000000e-01 2.135839e-05 2.000000e-01 3.830209e-05 3.000000e-01 5.090502e-05 4.000000e-01 5.928483e-05 5.000000e-01 6.376980e-05 6.000000e-01 6.553532e-05 7.000000e-01 6.625430e-05 8.000000e-01 6.668930e-05 9.000000e-01 6.703020e-05 1.000000e+00 6.732868e-05 1.100000e+00 6.760300e-05 1.200000e+00 6.786118e-05 1.000000e-01 2.306463e-05 2.000000e-01 4.200871e-05 3.000000e-01 5.687696e-05 4.000000e-01 6.774786e-05 5.000000e-01 7.475273e-05 6.000000e-01 7.834039e-05 7.000000e-01 7.980459e-05 8.000000e-01 8.050526e-05 9.000000e-01 8.097662e-05 1.000000e+00 8.136143e-05 1.100000e+00 8.170352e-05 1.200000e+00 8.201982e-05 1.000000e-01 2.441501e-05 2.000000e-01 4.499455e-05 3.000000e-01 6.175127e-05 4.000000e-01 7.474608e-05 5.000000e-01 8.405434e-05 6.000000e-01 8.984112e-05 7.000000e-01 9.270371e-05 8.000000e-01 9.395498e-05 9.000000e-01 9.464480e-05 1.000000e+00 9.514734e-05 1.100000e+00 9.557089e-05 1.200000e+00 9.595230e-05 ngspice-26/tests/bsim4/nmos/reference/dcSweep_sca.standard0000644000265600020320000002575212264261473023300 0ustar andreasadminV(d) I(d) 1.000000e-01 3.194245e-07 2.000000e-01 5.349761e-07 3.000000e-01 8.727947e-07 4.000000e-01 1.411225e-06 5.000000e-01 2.266346e-06 6.000000e-01 3.615319e-06 7.000000e-01 5.725692e-06 8.000000e-01 8.995444e-06 9.000000e-01 1.400661e-05 1.000000e+00 2.159514e-05 1.100000e+00 3.293878e-05 1.200000e+00 4.966367e-05 1.000000e-01 3.775307e-06 2.000000e-01 6.164861e-06 3.000000e-01 9.759303e-06 4.000000e-01 1.523320e-05 5.000000e-01 2.348645e-05 6.000000e-01 3.576078e-05 7.000000e-01 5.373053e-05 8.000000e-01 7.958068e-05 9.000000e-01 1.160494e-04 1.000000e+00 1.664013e-04 1.100000e+00 2.342991e-04 1.200000e+00 3.235693e-04 1.000000e-01 3.643516e-05 2.000000e-01 5.648338e-05 3.000000e-01 8.426550e-05 4.000000e-01 1.231435e-04 5.000000e-01 1.765234e-04 6.000000e-01 2.480111e-04 7.000000e-01 3.410859e-04 8.000000e-01 4.586614e-04 9.000000e-01 6.026894e-04 1.000000e+00 7.739561e-04 1.100000e+00 9.721555e-04 1.200000e+00 1.196227e-03 1.000000e-01 2.425315e-04 2.000000e-01 3.476566e-04 3.000000e-01 4.712089e-04 4.000000e-01 6.199899e-04 5.000000e-01 7.950805e-04 6.000000e-01 9.957697e-04 7.000000e-01 1.220188e-03 8.000000e-01 1.465757e-03 9.000000e-01 1.729625e-03 1.000000e+00 2.009082e-03 1.100000e+00 2.301917e-03 1.200000e+00 2.606721e-03 1.000000e-01 8.908390e-04 2.000000e-01 1.186098e-03 3.000000e-01 1.446278e-03 4.000000e-01 1.715287e-03 5.000000e-01 1.996171e-03 6.000000e-01 2.287860e-03 7.000000e-01 2.588620e-03 8.000000e-01 2.896759e-03 9.000000e-01 3.210877e-03 1.000000e+00 3.530032e-03 1.100000e+00 3.853904e-03 1.200000e+00 4.182961e-03 1.000000e-01 1.786195e-03 2.000000e-01 2.417708e-03 3.000000e-01 2.786398e-03 4.000000e-01 3.120561e-03 5.000000e-01 3.448159e-03 6.000000e-01 3.774926e-03 7.000000e-01 4.102417e-03 8.000000e-01 4.431053e-03 9.000000e-01 4.760957e-03 1.000000e+00 5.092335e-03 1.100000e+00 5.425770e-03 1.200000e+00 5.762492e-03 1.000000e-01 2.513095e-03 2.000000e-01 3.676540e-03 3.000000e-01 4.190746e-03 4.000000e-01 4.576088e-03 5.000000e-01 4.931582e-03 6.000000e-01 5.276873e-03 7.000000e-01 5.617921e-03 8.000000e-01 5.957073e-03 9.000000e-01 6.295457e-03 1.000000e+00 6.633852e-03 1.100000e+00 6.973188e-03 1.200000e+00 7.314951e-03 1.000000e-01 3.021240e-03 2.000000e-01 4.761970e-03 3.000000e-01 5.541005e-03 4.000000e-01 6.001312e-03 5.000000e-01 6.388764e-03 6.000000e-01 6.752718e-03 7.000000e-01 7.106755e-03 8.000000e-01 7.455929e-03 9.000000e-01 7.802548e-03 1.000000e+00 8.147947e-03 1.100000e+00 8.493313e-03 1.200000e+00 8.840252e-03 1.000000e-01 3.380936e-03 2.000000e-01 5.613076e-03 3.000000e-01 6.785321e-03 4.000000e-01 7.375581e-03 5.000000e-01 7.809703e-03 6.000000e-01 8.197624e-03 7.000000e-01 8.567149e-03 8.000000e-01 8.927803e-03 9.000000e-01 9.283665e-03 1.000000e+00 9.636856e-03 1.100000e+00 9.988897e-03 1.200000e+00 1.034150e-02 1.000000e-01 3.645468e-03 2.000000e-01 6.262665e-03 3.000000e-01 7.876778e-03 4.000000e-01 8.683938e-03 5.000000e-01 9.190803e-03 6.000000e-01 9.611455e-03 7.000000e-01 1.000030e-02 8.000000e-01 1.037446e-02 9.000000e-01 1.074082e-02 1.000000e+00 1.110268e-02 1.100000e+00 1.146207e-02 1.200000e+00 1.182086e-02 1.000000e-01 3.846706e-03 2.000000e-01 6.765145e-03 3.000000e-01 8.784649e-03 4.000000e-01 9.903138e-03 5.000000e-01 1.052581e-02 6.000000e-01 1.099289e-02 7.000000e-01 1.140647e-02 8.000000e-01 1.179678e-02 9.000000e-01 1.217513e-02 1.000000e+00 1.254662e-02 1.100000e+00 1.291405e-02 1.200000e+00 1.327956e-02 1.000000e-01 4.003931e-03 2.000000e-01 7.162447e-03 3.000000e-01 9.517807e-03 4.000000e-01 1.100129e-02 5.000000e-01 1.180342e-02 6.000000e-01 1.233855e-02 7.000000e-01 1.278478e-02 8.000000e-01 1.319480e-02 9.000000e-01 1.358700e-02 1.000000e+00 1.396924e-02 1.100000e+00 1.434549e-02 1.200000e+00 1.471834e-02 1.000000e-01 3.774068e-08 2.000000e-01 7.102982e-08 3.000000e-01 1.313685e-07 4.000000e-01 2.413768e-07 5.000000e-01 4.410135e-07 6.000000e-01 8.005822e-07 7.000000e-01 1.441728e-06 8.000000e-01 2.570389e-06 9.000000e-01 4.526057e-06 1.000000e+00 7.851213e-06 1.100000e+00 1.338297e-05 1.200000e+00 2.236659e-05 1.000000e-01 1.109973e-06 2.000000e-01 2.024215e-06 3.000000e-01 3.594553e-06 4.000000e-01 6.273005e-06 5.000000e-01 1.075058e-05 6.000000e-01 1.805480e-05 7.000000e-01 2.964830e-05 8.000000e-01 4.752016e-05 9.000000e-01 7.425673e-05 1.000000e+00 1.130761e-04 1.100000e+00 1.678001e-04 1.200000e+00 2.427255e-04 1.000000e-01 2.378618e-05 2.000000e-01 3.924284e-05 3.000000e-01 6.215629e-05 4.000000e-01 9.558973e-05 5.000000e-01 1.429938e-04 6.000000e-01 2.081860e-04 7.000000e-01 2.950542e-04 8.000000e-01 4.070881e-04 9.000000e-01 5.468497e-04 1.000000e+00 7.155771e-04 1.100000e+00 9.131094e-04 1.200000e+00 1.138205e-03 1.000000e-01 2.465519e-04 2.000000e-01 3.519877e-04 3.000000e-01 4.797797e-04 4.000000e-01 6.343694e-04 5.000000e-01 8.163649e-04 6.000000e-01 1.024552e-03 7.000000e-01 1.256443e-03 8.000000e-01 1.508835e-03 9.000000e-01 1.778373e-03 1.000000e+00 2.062070e-03 1.100000e+00 2.357693e-03 1.200000e+00 2.664044e-03 1.000000e-01 1.053075e-03 2.000000e-01 1.336666e-03 3.000000e-01 1.605239e-03 4.000000e-01 1.882249e-03 5.000000e-01 2.168886e-03 6.000000e-01 2.463828e-03 7.000000e-01 2.765484e-03 8.000000e-01 3.072486e-03 9.000000e-01 3.383864e-03 1.000000e+00 3.699179e-03 1.100000e+00 4.018661e-03 1.200000e+00 4.343353e-03 1.000000e-01 2.242300e-03 2.000000e-01 2.755377e-03 3.000000e-01 3.105115e-03 4.000000e-01 3.431666e-03 5.000000e-01 3.752663e-03 6.000000e-01 4.072450e-03 7.000000e-01 4.392462e-03 8.000000e-01 4.713273e-03 9.000000e-01 5.035248e-03 1.000000e+00 5.358905e-03 1.100000e+00 5.685207e-03 1.200000e+00 6.015823e-03 1.000000e-01 3.257971e-03 2.000000e-01 4.209654e-03 3.000000e-01 4.645664e-03 4.000000e-01 5.006023e-03 5.000000e-01 5.346271e-03 6.000000e-01 5.679173e-03 7.000000e-01 6.009085e-03 8.000000e-01 6.337880e-03 9.000000e-01 6.666582e-03 1.000000e+00 6.996063e-03 1.100000e+00 7.327513e-03 1.200000e+00 7.662804e-03 1.000000e-01 3.941745e-03 2.000000e-01 5.551897e-03 3.000000e-01 6.143620e-03 4.000000e-01 6.550427e-03 5.000000e-01 6.913098e-03 6.000000e-01 7.260146e-03 7.000000e-01 7.600456e-03 8.000000e-01 7.937625e-03 9.000000e-01 8.273435e-03 1.000000e+00 8.609106e-03 1.100000e+00 8.945986e-03 1.200000e+00 9.286048e-03 1.000000e-01 4.391521e-03 2.000000e-01 6.702511e-03 3.000000e-01 7.576126e-03 4.000000e-01 8.057090e-03 5.000000e-01 8.450413e-03 6.000000e-01 8.815013e-03 7.000000e-01 9.167495e-03 8.000000e-01 9.514128e-03 9.000000e-01 9.857806e-03 1.000000e+00 1.020023e-02 1.100000e+00 1.054295e-02 1.200000e+00 1.088799e-02 1.000000e-01 4.698232e-03 2.000000e-01 7.612089e-03 3.000000e-01 8.917198e-03 4.000000e-01 9.520554e-03 5.000000e-01 9.957526e-03 6.000000e-01 1.034452e-02 7.000000e-01 1.071145e-02 8.000000e-01 1.106882e-02 9.000000e-01 1.142116e-02 1.000000e+00 1.177091e-02 1.100000e+00 1.211988e-02 1.200000e+00 1.247016e-02 1.000000e-01 4.903511e-03 2.000000e-01 8.278579e-03 3.000000e-01 1.011388e-02 4.000000e-01 1.092289e-02 5.000000e-01 1.142735e-02 6.000000e-01 1.184573e-02 7.000000e-01 1.223154e-02 8.000000e-01 1.260204e-02 9.000000e-01 1.296419e-02 1.000000e+00 1.332188e-02 1.100000e+00 1.367754e-02 1.200000e+00 1.403341e-02 1.000000e-01 5.052329e-03 2.000000e-01 8.770655e-03 3.000000e-01 1.112619e-02 4.000000e-01 1.224612e-02 5.000000e-01 1.285220e-02 6.000000e-01 1.331227e-02 7.000000e-01 1.372112e-02 8.000000e-01 1.410735e-02 9.000000e-01 1.448194e-02 1.000000e+00 1.484993e-02 1.100000e+00 1.521421e-02 1.200000e+00 1.557714e-02 1.000000e-01 2.100400e-06 2.000000e-01 3.152937e-06 3.000000e-01 4.566057e-06 4.000000e-01 6.554707e-06 5.000000e-01 9.357541e-06 6.000000e-01 1.329469e-05 7.000000e-01 1.879870e-05 8.000000e-01 2.644998e-05 9.000000e-01 3.702001e-05 1.000000e+00 5.152370e-05 1.100000e+00 7.128093e-05 1.200000e+00 9.798599e-05 1.000000e-01 1.151414e-05 2.000000e-01 1.701076e-05 3.000000e-01 2.417235e-05 4.000000e-01 3.398056e-05 5.000000e-01 4.740602e-05 6.000000e-01 6.566487e-05 7.000000e-01 9.028050e-05 8.000000e-01 1.231163e-04 9.000000e-01 1.663799e-04 1.000000e+00 2.225915e-04 1.100000e+00 2.945110e-04 1.200000e+00 3.850348e-04 1.000000e-01 5.613912e-05 2.000000e-01 8.132631e-05 3.000000e-01 1.122726e-04 4.000000e-01 1.526535e-04 5.000000e-01 2.050174e-04 6.000000e-01 2.719455e-04 7.000000e-01 3.559983e-04 8.000000e-01 4.595378e-04 9.000000e-01 5.845364e-04 1.000000e+00 7.324381e-04 1.100000e+00 9.041206e-04 1.200000e+00 1.099981e-03 1.000000e-01 2.240443e-04 2.000000e-01 3.184859e-04 3.000000e-01 4.178594e-04 4.000000e-01 5.354796e-04 5.000000e-01 6.739973e-04 6.000000e-01 8.344823e-04 7.000000e-01 1.017123e-03 8.000000e-01 1.221408e-03 9.000000e-01 1.446282e-03 1.000000e+00 1.690369e-03 1.100000e+00 1.952228e-03 1.200000e+00 2.230644e-03 1.000000e-01 6.123026e-04 2.000000e-01 8.862255e-04 3.000000e-01 1.095067e-03 4.000000e-01 1.311476e-03 5.000000e-01 1.543150e-03 6.000000e-01 1.790583e-03 7.000000e-01 2.052818e-03 8.000000e-01 2.328460e-03 9.000000e-01 2.616025e-03 1.000000e+00 2.914151e-03 1.100000e+00 3.221799e-03 1.200000e+00 3.538474e-03 1.000000e-01 1.097628e-03 2.000000e-01 1.708142e-03 3.000000e-01 2.057339e-03 4.000000e-01 2.355110e-03 5.000000e-01 2.649073e-03 6.000000e-01 2.947505e-03 7.000000e-01 3.252076e-03 8.000000e-01 3.562849e-03 9.000000e-01 3.879425e-03 1.000000e+00 4.201344e-03 1.100000e+00 4.528359e-03 1.200000e+00 4.860682e-03 1.000000e-01 1.509092e-03 2.000000e-01 2.508270e-03 3.000000e-01 3.085464e-03 4.000000e-01 3.470157e-03 5.000000e-01 3.810141e-03 6.000000e-01 4.140124e-03 7.000000e-01 4.468713e-03 8.000000e-01 4.798637e-03 9.000000e-01 5.130857e-03 1.000000e+00 5.465731e-03 1.100000e+00 5.803531e-03 1.200000e+00 6.144814e-03 1.000000e-01 1.815316e-03 2.000000e-01 3.142726e-03 3.000000e-01 4.018102e-03 4.000000e-01 4.546380e-03 5.000000e-01 4.942685e-03 6.000000e-01 5.302960e-03 7.000000e-01 5.652029e-03 8.000000e-01 5.997566e-03 9.000000e-01 6.342505e-03 1.000000e+00 6.688143e-03 1.100000e+00 7.035223e-03 1.200000e+00 7.384511e-03 1.000000e-01 2.040121e-03 2.000000e-01 3.624225e-03 3.000000e-01 4.782518e-03 4.000000e-01 5.529314e-03 5.000000e-01 6.018141e-03 6.000000e-01 6.419250e-03 7.000000e-01 6.792216e-03 8.000000e-01 7.154655e-03 9.000000e-01 7.512924e-03 1.000000e+00 7.869757e-03 1.100000e+00 8.226552e-03 1.200000e+00 8.584333e-03 1.000000e-01 2.208349e-03 2.000000e-01 3.993630e-03 3.000000e-01 5.385945e-03 4.000000e-01 6.380545e-03 5.000000e-01 7.019873e-03 6.000000e-01 7.484288e-03 7.000000e-01 7.889232e-03 8.000000e-01 8.272097e-03 9.000000e-01 8.645548e-03 1.000000e+00 9.014728e-03 1.100000e+00 9.382082e-03 1.200000e+00 9.749071e-03 1.000000e-01 2.337014e-03 2.000000e-01 4.282252e-03 3.000000e-01 5.864151e-03 4.000000e-01 7.084381e-03 5.000000e-01 7.925878e-03 6.000000e-01 8.491463e-03 7.000000e-01 8.942529e-03 8.000000e-01 9.351571e-03 9.000000e-01 9.742971e-03 1.000000e+00 1.012604e-02 1.100000e+00 1.050493e-02 1.200000e+00 1.088187e-02 1.000000e-01 2.437090e-03 2.000000e-01 4.511196e-03 3.000000e-01 6.248041e-03 4.000000e-01 7.656137e-03 5.000000e-01 8.712035e-03 6.000000e-01 9.427409e-03 7.000000e-01 9.948211e-03 8.000000e-01 1.039266e-02 9.000000e-01 1.080611e-02 1.000000e+00 1.120515e-02 1.100000e+00 1.159680e-02 1.200000e+00 1.198448e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw8.standard0000644000265600020320000002575212264261473023244 0ustar andreasadminV(d) I(d) 1.000000e-01 6.850047e-09 2.000000e-01 7.434756e-09 3.000000e-01 7.925406e-09 4.000000e-01 8.425031e-09 5.000000e-01 8.951689e-09 6.000000e-01 9.517537e-09 7.000000e-01 1.013818e-08 8.000000e-01 1.083813e-08 9.000000e-01 1.165788e-08 1.000000e+00 1.266511e-08 1.100000e+00 1.397265e-08 1.200000e+00 1.576752e-08 1.000000e-01 8.106201e-08 2.000000e-01 8.778191e-08 3.000000e-01 9.332360e-08 4.000000e-01 9.889525e-08 5.000000e-01 1.046654e-07 6.000000e-01 1.106955e-07 7.000000e-01 1.170245e-07 8.000000e-01 1.236899e-07 9.000000e-01 1.307380e-07 1.000000e+00 1.382349e-07 1.100000e+00 1.462810e-07 1.200000e+00 1.550318e-07 1.000000e-01 7.977290e-07 2.000000e-01 8.614055e-07 3.000000e-01 9.116182e-07 4.000000e-01 9.613989e-07 5.000000e-01 1.012461e-06 6.000000e-01 1.065354e-06 7.000000e-01 1.120358e-06 8.000000e-01 1.177674e-06 9.000000e-01 1.237494e-06 1.000000e+00 1.300052e-06 1.100000e+00 1.365657e-06 1.200000e+00 1.434734e-06 1.000000e-01 5.855150e-06 2.000000e-01 6.356234e-06 3.000000e-01 6.687078e-06 4.000000e-01 7.001899e-06 5.000000e-01 7.318099e-06 6.000000e-01 7.640492e-06 7.000000e-01 7.971087e-06 8.000000e-01 8.311011e-06 9.000000e-01 8.661152e-06 1.000000e+00 9.022493e-06 1.100000e+00 9.396350e-06 1.200000e+00 9.784555e-06 1.000000e-01 2.543882e-05 2.000000e-01 2.893223e-05 3.000000e-01 3.025755e-05 4.000000e-01 3.135408e-05 5.000000e-01 3.239675e-05 6.000000e-01 3.342549e-05 7.000000e-01 3.445443e-05 8.000000e-01 3.548998e-05 9.000000e-01 3.653592e-05 1.000000e+00 3.759551e-05 1.100000e+00 3.867274e-05 1.200000e+00 3.977311e-05 1.000000e-01 5.744129e-05 2.000000e-01 7.395720e-05 3.000000e-01 7.790161e-05 4.000000e-01 8.024066e-05 5.000000e-01 8.222553e-05 6.000000e-01 8.408384e-05 7.000000e-01 8.588545e-05 8.000000e-01 8.765897e-05 9.000000e-01 8.941893e-05 1.000000e+00 9.117503e-05 1.100000e+00 9.293668e-05 1.200000e+00 9.471548e-05 1.000000e-01 8.711366e-05 2.000000e-01 1.273409e-04 3.000000e-01 1.385968e-04 4.000000e-01 1.429993e-04 5.000000e-01 1.460798e-04 6.000000e-01 1.487407e-04 7.000000e-01 1.512175e-04 8.000000e-01 1.535970e-04 9.000000e-01 1.559189e-04 1.000000e+00 1.582062e-04 1.100000e+00 1.604763e-04 1.200000e+00 1.627481e-04 1.000000e-01 1.104969e-04 2.000000e-01 1.754765e-04 3.000000e-01 2.016701e-04 4.000000e-01 2.102320e-04 5.000000e-01 2.148854e-04 6.000000e-01 2.184698e-04 7.000000e-01 2.216300e-04 8.000000e-01 2.245772e-04 9.000000e-01 2.274007e-04 1.000000e+00 2.301459e-04 1.100000e+00 2.328427e-04 1.200000e+00 2.355179e-04 1.000000e-01 1.286449e-04 2.000000e-01 2.147372e-04 3.000000e-01 2.606848e-04 4.000000e-01 2.775324e-04 5.000000e-01 2.847968e-04 6.000000e-01 2.896127e-04 7.000000e-01 2.935652e-04 8.000000e-01 2.971171e-04 9.000000e-01 3.004470e-04 1.000000e+00 3.036389e-04 1.100000e+00 3.067411e-04 1.200000e+00 3.097907e-04 1.000000e-01 1.429253e-04 2.000000e-01 2.463416e-04 3.000000e-01 3.118604e-04 4.000000e-01 3.421789e-04 5.000000e-01 3.540602e-04 6.000000e-01 3.606793e-04 7.000000e-01 3.656294e-04 8.000000e-01 3.698727e-04 9.000000e-01 3.737480e-04 1.000000e+00 3.774027e-04 1.100000e+00 3.809142e-04 1.200000e+00 3.843337e-04 1.000000e-01 1.543419e-04 2.000000e-01 2.719969e-04 3.000000e-01 3.545498e-04 4.000000e-01 4.015717e-04 5.000000e-01 4.213855e-04 6.000000e-01 4.308296e-04 7.000000e-01 4.371196e-04 8.000000e-01 4.421955e-04 9.000000e-01 4.466827e-04 1.000000e+00 4.508340e-04 1.100000e+00 4.547721e-04 1.200000e+00 4.585695e-04 1.000000e-01 1.635926e-04 2.000000e-01 2.930489e-04 3.000000e-01 3.899457e-04 4.000000e-01 4.536518e-04 5.000000e-01 4.853331e-04 6.000000e-01 4.993636e-04 7.000000e-01 5.075607e-04 8.000000e-01 5.136881e-04 9.000000e-01 5.188873e-04 1.000000e+00 5.235866e-04 1.100000e+00 5.279798e-04 1.200000e+00 5.321714e-04 1.000000e-01 9.473330e-10 2.000000e-01 1.038666e-09 3.000000e-01 1.123439e-09 4.000000e-01 1.214680e-09 5.000000e-01 1.318286e-09 6.000000e-01 1.442226e-09 7.000000e-01 1.599754e-09 8.000000e-01 1.813538e-09 9.000000e-01 2.122295e-09 1.000000e+00 2.591620e-09 1.100000e+00 3.331713e-09 1.200000e+00 4.526207e-09 1.000000e-01 2.786996e-08 2.000000e-01 3.045456e-08 3.000000e-01 3.278055e-08 4.000000e-01 3.517217e-08 5.000000e-01 3.768957e-08 6.000000e-01 4.036116e-08 7.000000e-01 4.321037e-08 8.000000e-01 4.626402e-08 9.000000e-01 4.955875e-08 1.000000e+00 5.314934e-08 1.100000e+00 5.712088e-08 1.200000e+00 6.160807e-08 1.000000e-01 6.077730e-07 2.000000e-01 6.584788e-07 3.000000e-01 7.023067e-07 4.000000e-01 7.464789e-07 5.000000e-01 7.922078e-07 6.000000e-01 8.399387e-07 7.000000e-01 8.899246e-07 8.000000e-01 9.423625e-07 9.000000e-01 9.974499e-07 1.000000e+00 1.055424e-06 1.100000e+00 1.116594e-06 1.200000e+00 1.181379e-06 1.000000e-01 7.328904e-06 2.000000e-01 7.886578e-06 3.000000e-01 8.314845e-06 4.000000e-01 8.729128e-06 5.000000e-01 9.147186e-06 6.000000e-01 9.574605e-06 7.000000e-01 1.001389e-05 8.000000e-01 1.046654e-05 9.000000e-01 1.093379e-05 1.000000e+00 1.141707e-05 1.100000e+00 1.191825e-05 1.200000e+00 1.243994e-05 1.000000e-01 4.221886e-05 2.000000e-01 4.584360e-05 3.000000e-01 4.776282e-05 4.000000e-01 4.941323e-05 5.000000e-01 5.098384e-05 6.000000e-01 5.252736e-05 7.000000e-01 5.406428e-05 8.000000e-01 5.560453e-05 9.000000e-01 5.715437e-05 1.000000e+00 5.871970e-05 1.100000e+00 6.030776e-05 1.200000e+00 6.192838e-05 1.000000e-01 1.074099e-04 2.000000e-01 1.224041e-04 3.000000e-01 1.269891e-04 4.000000e-01 1.301473e-04 5.000000e-01 1.328751e-04 6.000000e-01 1.354181e-04 7.000000e-01 1.378653e-04 8.000000e-01 1.402571e-04 9.000000e-01 1.426163e-04 1.000000e+00 1.449605e-04 1.100000e+00 1.473079e-04 1.200000e+00 1.496811e-04 1.000000e-01 1.685346e-04 2.000000e-01 2.099357e-04 3.000000e-01 2.192247e-04 4.000000e-01 2.241581e-04 5.000000e-01 2.279427e-04 6.000000e-01 2.312640e-04 7.000000e-01 2.343502e-04 8.000000e-01 2.372988e-04 9.000000e-01 2.401606e-04 1.000000e+00 2.429697e-04 1.100000e+00 2.457576e-04 1.200000e+00 2.485601e-04 1.000000e-01 2.137623e-04 2.000000e-01 2.936300e-04 3.000000e-01 3.116218e-04 4.000000e-01 3.190833e-04 5.000000e-01 3.241207e-04 6.000000e-01 3.282632e-04 7.000000e-01 3.319746e-04 8.000000e-01 3.354413e-04 9.000000e-01 3.387545e-04 1.000000e+00 3.419699e-04 1.100000e+00 3.451329e-04 1.200000e+00 3.482921e-04 1.000000e-01 2.465626e-04 2.000000e-01 3.679540e-04 3.000000e-01 4.011188e-04 4.000000e-01 4.123893e-04 5.000000e-01 4.190378e-04 6.000000e-01 4.241360e-04 7.000000e-01 4.285314e-04 8.000000e-01 4.325433e-04 9.000000e-01 4.363196e-04 1.000000e+00 4.399437e-04 1.100000e+00 4.434771e-04 1.200000e+00 4.469805e-04 1.000000e-01 2.702455e-04 2.000000e-01 4.292101e-04 3.000000e-01 4.856244e-04 4.000000e-01 5.028727e-04 5.000000e-01 5.117219e-04 6.000000e-01 5.180164e-04 7.000000e-01 5.232272e-04 8.000000e-01 5.278719e-04 9.000000e-01 5.321776e-04 1.000000e+00 5.362643e-04 1.100000e+00 5.402128e-04 1.200000e+00 5.440963e-04 1.000000e-01 2.850621e-04 2.000000e-01 4.737969e-04 3.000000e-01 5.606187e-04 4.000000e-01 5.876419e-04 5.000000e-01 5.996085e-04 6.000000e-01 6.073970e-04 7.000000e-01 6.135465e-04 8.000000e-01 6.188846e-04 9.000000e-01 6.237544e-04 1.000000e+00 6.283269e-04 1.100000e+00 6.327072e-04 1.200000e+00 6.369819e-04 1.000000e-01 2.954463e-04 2.000000e-01 5.067273e-04 3.000000e-01 6.257193e-04 4.000000e-01 6.680746e-04 5.000000e-01 6.846245e-04 6.000000e-01 6.943362e-04 7.000000e-01 7.015785e-04 8.000000e-01 7.076684e-04 9.000000e-01 7.131198e-04 1.000000e+00 7.181750e-04 1.100000e+00 7.229719e-04 1.200000e+00 7.276133e-04 1.000000e-01 4.297218e-08 2.000000e-01 4.645720e-08 3.000000e-01 4.887300e-08 4.000000e-01 5.123035e-08 5.000000e-01 5.363777e-08 6.000000e-01 5.613206e-08 7.000000e-01 5.873971e-08 8.000000e-01 6.149193e-08 9.000000e-01 6.443505e-08 1.000000e+00 6.764347e-08 1.100000e+00 7.123897e-08 1.200000e+00 7.542080e-08 1.000000e-01 2.364095e-07 2.000000e-01 2.555627e-07 3.000000e-01 2.684300e-07 4.000000e-01 2.808822e-07 5.000000e-01 2.935161e-07 6.000000e-01 3.065007e-07 7.000000e-01 3.199171e-07 8.000000e-01 3.338253e-07 9.000000e-01 3.482886e-07 1.000000e+00 3.633929e-07 1.100000e+00 3.792657e-07 1.200000e+00 3.961013e-07 1.000000e-01 1.175178e-06 2.000000e-01 1.277351e-06 3.000000e-01 1.339414e-06 4.000000e-01 1.398421e-06 5.000000e-01 1.457829e-06 6.000000e-01 1.518542e-06 7.000000e-01 1.580943e-06 8.000000e-01 1.645261e-06 9.000000e-01 1.711690e-06 1.000000e+00 1.780459e-06 1.100000e+00 1.851876e-06 1.200000e+00 1.926378e-06 1.000000e-01 4.938772e-06 2.000000e-01 5.537252e-06 3.000000e-01 5.797693e-06 4.000000e-01 6.030638e-06 5.000000e-01 6.260243e-06 6.000000e-01 6.491899e-06 7.000000e-01 6.727582e-06 8.000000e-01 6.968276e-06 9.000000e-01 7.214655e-06 1.000000e+00 7.467404e-06 1.100000e+00 7.727422e-06 1.200000e+00 7.995970e-06 1.000000e-01 1.439788e-05 2.000000e-01 1.796299e-05 3.000000e-01 1.888141e-05 4.000000e-01 1.954176e-05 5.000000e-01 2.015447e-05 6.000000e-01 2.075532e-05 7.000000e-01 2.135520e-05 8.000000e-01 2.195867e-05 9.000000e-01 2.256815e-05 1.000000e+00 2.318551e-05 1.100000e+00 2.381285e-05 1.200000e+00 2.445306e-05 1.000000e-01 2.724008e-05 2.000000e-01 3.952769e-05 3.000000e-01 4.293844e-05 4.000000e-01 4.442440e-05 5.000000e-01 4.559393e-05 6.000000e-01 4.667517e-05 7.000000e-01 4.772304e-05 8.000000e-01 4.875710e-05 9.000000e-01 4.978627e-05 1.000000e+00 5.081571e-05 1.100000e+00 5.184978e-05 1.200000e+00 5.289361e-05 1.000000e-01 3.907417e-05 2.000000e-01 6.268909e-05 3.000000e-01 7.305261e-05 4.000000e-01 7.660867e-05 5.000000e-01 7.859738e-05 6.000000e-01 8.021932e-05 7.000000e-01 8.171241e-05 8.000000e-01 8.314698e-05 9.000000e-01 8.455092e-05 1.000000e+00 8.593794e-05 1.100000e+00 8.731675e-05 1.200000e+00 8.869533e-05 1.000000e-01 4.850647e-05 2.000000e-01 8.217771e-05 3.000000e-01 1.020222e-04 4.000000e-01 1.106651e-04 5.000000e-01 1.142992e-04 6.000000e-01 1.166598e-04 7.000000e-01 1.186416e-04 8.000000e-01 1.204682e-04 9.000000e-01 1.222163e-04 1.000000e+00 1.239190e-04 1.100000e+00 1.255938e-04 1.200000e+00 1.272533e-04 1.000000e-01 5.578604e-05 2.000000e-01 9.762218e-05 3.000000e-01 1.262337e-04 4.000000e-01 1.425119e-04 5.000000e-01 1.497443e-04 6.000000e-01 1.534006e-04 7.000000e-01 1.560337e-04 8.000000e-01 1.583033e-04 9.000000e-01 1.604058e-04 1.000000e+00 1.624166e-04 1.100000e+00 1.643710e-04 1.200000e+00 1.662895e-04 1.000000e-01 6.142659e-05 2.000000e-01 1.098209e-04 3.000000e-01 1.457784e-04 4.000000e-01 1.698068e-04 5.000000e-01 1.829594e-04 6.000000e-01 1.891628e-04 7.000000e-01 1.928305e-04 8.000000e-01 1.956738e-04 9.000000e-01 1.981810e-04 1.000000e+00 2.005186e-04 1.100000e+00 2.027569e-04 1.200000e+00 2.049315e-04 1.000000e-01 6.584188e-05 2.000000e-01 1.195313e-04 3.000000e-01 1.615682e-04 4.000000e-01 1.923691e-04 5.000000e-01 2.123146e-04 6.000000e-01 2.229397e-04 7.000000e-01 2.284526e-04 8.000000e-01 2.321398e-04 9.000000e-01 2.351547e-04 1.000000e+00 2.378633e-04 1.100000e+00 2.404051e-04 1.200000e+00 2.428439e-04 1.000000e-01 6.932423e-05 2.000000e-01 1.273169e-04 3.000000e-01 1.743968e-04 4.000000e-01 2.109326e-04 5.000000e-01 2.371906e-04 6.000000e-01 2.535772e-04 7.000000e-01 2.623142e-04 8.000000e-01 2.673831e-04 9.000000e-01 2.711008e-04 1.000000e+00 2.742614e-04 1.100000e+00 2.771440e-04 1.200000e+00 2.798650e-04 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw1.standard0000644000265600020320000002575212264261473023235 0ustar andreasadminV(d) I(d) 1.000000e-01 5.381036e-07 2.000000e-01 8.979352e-07 3.000000e-01 1.458523e-06 4.000000e-01 2.345919e-06 5.000000e-01 3.743979e-06 6.000000e-01 5.928842e-06 7.000000e-01 9.309998e-06 8.000000e-01 1.448406e-05 9.000000e-01 2.230339e-05 1.000000e+00 3.396036e-05 1.100000e+00 5.108560e-05 1.200000e+00 7.585441e-05 1.000000e-01 6.175374e-06 2.000000e-01 9.996042e-06 3.000000e-01 1.566575e-05 4.000000e-01 2.417709e-05 5.000000e-01 3.680960e-05 6.000000e-01 5.527369e-05 7.000000e-01 8.179037e-05 8.000000e-01 1.191243e-04 9.000000e-01 1.705364e-04 1.000000e+00 2.396239e-04 1.100000e+00 3.300467e-04 1.200000e+00 4.451953e-04 1.000000e-01 5.603719e-05 2.000000e-01 8.564974e-05 3.000000e-01 1.256776e-04 4.000000e-01 1.802895e-04 5.000000e-01 2.531861e-04 6.000000e-01 3.478281e-04 7.000000e-01 4.670448e-04 8.000000e-01 6.126440e-04 9.000000e-01 7.852036e-04 1.000000e+00 9.841360e-04 1.100000e+00 1.208010e-03 1.200000e+00 1.455038e-03 1.000000e-01 3.365708e-04 2.000000e-01 4.731344e-04 3.000000e-01 6.258448e-04 4.000000e-01 8.032825e-04 5.000000e-01 1.005617e-03 6.000000e-01 1.231184e-03 7.000000e-01 1.477470e-03 8.000000e-01 1.741619e-03 9.000000e-01 2.020814e-03 1.000000e+00 2.312608e-03 1.100000e+00 2.615194e-03 1.200000e+00 2.927631e-03 1.000000e-01 1.078590e-03 2.000000e-01 1.427275e-03 3.000000e-01 1.711529e-03 4.000000e-01 1.997733e-03 5.000000e-01 2.291821e-03 6.000000e-01 2.593736e-03 7.000000e-01 2.902373e-03 8.000000e-01 3.216532e-03 9.000000e-01 3.535218e-03 1.000000e+00 3.857820e-03 1.100000e+00 4.184298e-03 1.200000e+00 4.515363e-03 1.000000e-01 1.966489e-03 2.000000e-01 2.694690e-03 3.000000e-01 3.087158e-03 4.000000e-01 3.431488e-03 5.000000e-01 3.765245e-03 6.000000e-01 4.096264e-03 7.000000e-01 4.426871e-03 8.000000e-01 4.757875e-03 9.000000e-01 5.089625e-03 1.000000e+00 5.422472e-03 1.100000e+00 5.757099e-03 1.200000e+00 6.094820e-03 1.000000e-01 2.647620e-03 2.000000e-01 3.934138e-03 3.000000e-01 4.490970e-03 4.000000e-01 4.888747e-03 5.000000e-01 5.250041e-03 6.000000e-01 5.598883e-03 7.000000e-01 5.942449e-03 8.000000e-01 6.283548e-03 9.000000e-01 6.623523e-03 1.000000e+00 6.963260e-03 1.100000e+00 7.303747e-03 1.200000e+00 7.646505e-03 1.000000e-01 3.121627e-03 2.000000e-01 4.977198e-03 3.000000e-01 5.828211e-03 4.000000e-01 6.309533e-03 5.000000e-01 6.705044e-03 6.000000e-01 7.073379e-03 7.000000e-01 7.430342e-03 8.000000e-01 7.781726e-03 9.000000e-01 8.130143e-03 1.000000e+00 8.477066e-03 1.100000e+00 8.823745e-03 1.200000e+00 9.171809e-03 1.000000e-01 3.459366e-03 2.000000e-01 5.786304e-03 3.000000e-01 7.049916e-03 4.000000e-01 7.676678e-03 5.000000e-01 8.123155e-03 6.000000e-01 8.516979e-03 7.000000e-01 8.890143e-03 8.000000e-01 9.253415e-03 9.000000e-01 9.611348e-03 1.000000e+00 9.966270e-03 1.100000e+00 1.031979e-02 1.200000e+00 1.067365e-02 1.000000e-01 3.709371e-03 2.000000e-01 6.404043e-03 3.000000e-01 8.109684e-03 4.000000e-01 8.973978e-03 5.000000e-01 9.500490e-03 6.000000e-01 9.929411e-03 7.000000e-01 1.032288e-02 8.000000e-01 1.070018e-02 9.000000e-01 1.106892e-02 1.000000e+00 1.143272e-02 1.100000e+00 1.179374e-02 1.200000e+00 1.215392e-02 1.000000e-01 3.900511e-03 2.000000e-01 6.883659e-03 3.000000e-01 8.983496e-03 4.000000e-01 1.017591e-02 5.000000e-01 1.082983e-02 6.000000e-01 1.130891e-02 7.000000e-01 1.172853e-02 8.000000e-01 1.212265e-02 9.000000e-01 1.250374e-02 1.000000e+00 1.287741e-02 1.100000e+00 1.324664e-02 1.200000e+00 1.361368e-02 1.000000e-01 4.050406e-03 2.000000e-01 7.264261e-03 3.000000e-01 9.687450e-03 4.000000e-01 1.124967e-02 5.000000e-01 1.209852e-02 6.000000e-01 1.265156e-02 7.000000e-01 1.310595e-02 8.000000e-01 1.352068e-02 9.000000e-01 1.391611e-02 1.000000e+00 1.430081e-02 1.100000e+00 1.467905e-02 1.200000e+00 1.505357e-02 1.000000e-01 7.321028e-08 2.000000e-01 1.375764e-07 3.000000e-01 2.536872e-07 4.000000e-01 4.640314e-07 5.000000e-01 8.424837e-07 6.000000e-01 1.516439e-06 7.000000e-01 2.700786e-06 8.000000e-01 4.748026e-06 9.000000e-01 8.217731e-06 1.000000e+00 1.396616e-05 1.100000e+00 2.325376e-05 1.200000e+00 3.786694e-05 1.000000e-01 2.075842e-06 2.000000e-01 3.741078e-06 3.000000e-01 6.542583e-06 4.000000e-01 1.120680e-05 5.000000e-01 1.879079e-05 6.000000e-01 3.078970e-05 7.000000e-01 4.922683e-05 8.000000e-01 7.671926e-05 9.000000e-01 1.165001e-04 1.000000e+00 1.723658e-04 1.100000e+00 2.485040e-04 1.200000e+00 3.491799e-04 1.000000e-01 3.962783e-05 2.000000e-01 6.367046e-05 3.000000e-01 9.807032e-05 4.000000e-01 1.466088e-04 5.000000e-01 2.131723e-04 6.000000e-01 3.016524e-04 7.000000e-01 4.154759e-04 8.000000e-01 5.570550e-04 9.000000e-01 7.273784e-04 1.000000e+00 9.259365e-04 1.100000e+00 1.151040e-03 1.200000e+00 1.400437e-03 1.000000e-01 3.472832e-04 2.000000e-01 4.836094e-04 3.000000e-01 6.416803e-04 4.000000e-01 8.260673e-04 5.000000e-01 1.036062e-03 6.000000e-01 1.269272e-03 7.000000e-01 1.522506e-03 8.000000e-01 1.792368e-03 9.000000e-01 2.075732e-03 1.000000e+00 2.370096e-03 1.100000e+00 2.673833e-03 1.200000e+00 2.986366e-03 1.000000e-01 1.272216e-03 2.000000e-01 1.594399e-03 3.000000e-01 1.882878e-03 4.000000e-01 2.173914e-03 5.000000e-01 2.470903e-03 6.000000e-01 2.773539e-03 7.000000e-01 3.080925e-03 8.000000e-01 3.392216e-03 9.000000e-01 3.706839e-03 1.000000e+00 4.024657e-03 1.100000e+00 4.346137e-03 1.200000e+00 4.672512e-03 1.000000e-01 2.461389e-03 2.000000e-01 3.044287e-03 3.000000e-01 3.409153e-03 4.000000e-01 3.742685e-03 5.000000e-01 4.068030e-03 6.000000e-01 4.390920e-03 7.000000e-01 4.713334e-03 8.000000e-01 5.036113e-03 9.000000e-01 5.359768e-03 1.000000e+00 5.684901e-03 1.100000e+00 6.012529e-03 1.200000e+00 6.344369e-03 1.000000e-01 3.406496e-03 2.000000e-01 4.485676e-03 3.000000e-01 4.947536e-03 4.000000e-01 5.316437e-03 5.000000e-01 5.661196e-03 6.000000e-01 5.997142e-03 7.000000e-01 6.329412e-03 8.000000e-01 6.660187e-03 9.000000e-01 6.990627e-03 1.000000e+00 7.321669e-03 1.100000e+00 7.654527e-03 1.200000e+00 7.991088e-03 1.000000e-01 4.031881e-03 2.000000e-01 5.795369e-03 3.000000e-01 6.437274e-03 4.000000e-01 6.857711e-03 5.000000e-01 7.226512e-03 6.000000e-01 7.577328e-03 7.000000e-01 7.920407e-03 8.000000e-01 8.259831e-03 9.000000e-01 8.597587e-03 1.000000e+00 8.934983e-03 1.100000e+00 9.273395e-03 1.200000e+00 9.614801e-03 1.000000e-01 4.447752e-03 2.000000e-01 6.897105e-03 3.000000e-01 7.856388e-03 4.000000e-01 8.360232e-03 5.000000e-01 8.762310e-03 6.000000e-01 9.131724e-03 7.000000e-01 9.487499e-03 8.000000e-01 9.836697e-03 9.000000e-01 1.018253e-02 1.000000e+00 1.052683e-02 1.100000e+00 1.087119e-02 1.200000e+00 1.121766e-02 1.000000e-01 4.738214e-03 2.000000e-01 7.757390e-03 3.000000e-01 9.175754e-03 4.000000e-01 9.817568e-03 5.000000e-01 1.026749e-02 6.000000e-01 1.066078e-02 7.000000e-01 1.103168e-02 8.000000e-01 1.139197e-02 9.000000e-01 1.174669e-02 1.000000e+00 1.209847e-02 1.100000e+00 1.244919e-02 1.200000e+00 1.280097e-02 1.000000e-01 4.934493e-03 2.000000e-01 8.388412e-03 3.000000e-01 1.034314e-02 4.000000e-01 1.121284e-02 5.000000e-01 1.173643e-02 6.000000e-01 1.216280e-02 7.000000e-01 1.255290e-02 8.000000e-01 1.292607e-02 9.000000e-01 1.329063e-02 1.000000e+00 1.365051e-02 1.100000e+00 1.400805e-02 1.200000e+00 1.436550e-02 1.000000e-01 5.076453e-03 2.000000e-01 8.854427e-03 3.000000e-01 1.131542e-02 4.000000e-01 1.252094e-02 5.000000e-01 1.315716e-02 6.000000e-01 1.362882e-02 7.000000e-01 1.404363e-02 8.000000e-01 1.443366e-02 9.000000e-01 1.481101e-02 1.000000e+00 1.518117e-02 1.100000e+00 1.554718e-02 1.200000e+00 1.591142e-02 1.000000e-01 3.086192e-06 2.000000e-01 4.621116e-06 3.000000e-01 6.672341e-06 4.000000e-01 9.545743e-06 5.000000e-01 1.357522e-05 6.000000e-01 1.920386e-05 7.000000e-01 2.702344e-05 8.000000e-01 3.781735e-05 9.000000e-01 5.261004e-05 1.000000e+00 7.272259e-05 1.100000e+00 9.983155e-05 1.200000e+00 1.360261e-04 1.000000e-01 1.657772e-05 2.000000e-01 2.439951e-05 3.000000e-01 3.450415e-05 4.000000e-01 4.823817e-05 5.000000e-01 6.687828e-05 6.000000e-01 9.198042e-05 7.000000e-01 1.254321e-04 8.000000e-01 1.694518e-04 9.000000e-01 2.265423e-04 1.000000e+00 2.993961e-04 1.100000e+00 3.907660e-04 1.200000e+00 5.033272e-04 1.000000e-01 7.825845e-05 2.000000e-01 1.128577e-04 3.000000e-01 1.544802e-04 4.000000e-01 2.079002e-04 5.000000e-01 2.759354e-04 6.000000e-01 3.611870e-04 7.000000e-01 4.659963e-04 8.000000e-01 5.922686e-04 9.000000e-01 7.413231e-04 1.000000e+00 9.138362e-04 1.100000e+00 1.109908e-03 1.200000e+00 1.329252e-03 1.000000e-01 2.933428e-04 2.000000e-01 4.158853e-04 3.000000e-01 5.381511e-04 4.000000e-01 6.790645e-04 5.000000e-01 8.412619e-04 6.000000e-01 1.025251e-03 7.000000e-01 1.230599e-03 8.000000e-01 1.456246e-03 9.000000e-01 1.700731e-03 1.000000e+00 1.962420e-03 1.100000e+00 2.239778e-03 1.200000e+00 2.531640e-03 1.000000e-01 7.299964e-04 2.000000e-01 1.066847e-03 3.000000e-01 1.304685e-03 4.000000e-01 1.542987e-03 5.000000e-01 1.793489e-03 6.000000e-01 2.057408e-03 7.000000e-01 2.334023e-03 8.000000e-01 2.622101e-03 9.000000e-01 2.920318e-03 1.000000e+00 3.227483e-03 1.100000e+00 3.542747e-03 1.200000e+00 3.865813e-03 1.000000e-01 1.219490e-03 2.000000e-01 1.922472e-03 3.000000e-01 2.314048e-03 4.000000e-01 2.631167e-03 5.000000e-01 2.938244e-03 6.000000e-01 3.246975e-03 7.000000e-01 3.560041e-03 8.000000e-01 3.877959e-03 9.000000e-01 4.200591e-03 1.000000e+00 4.527666e-03 1.100000e+00 4.859074e-03 1.200000e+00 5.195153e-03 1.000000e-01 1.615186e-03 2.000000e-01 2.706375e-03 3.000000e-01 3.347917e-03 4.000000e-01 3.758968e-03 5.000000e-01 4.111663e-03 6.000000e-01 4.450107e-03 7.000000e-01 4.785232e-03 8.000000e-01 5.120549e-03 9.000000e-01 5.457365e-03 1.000000e+00 5.796222e-03 1.100000e+00 6.137501e-03 1.200000e+00 6.481837e-03 1.000000e-01 1.905921e-03 2.000000e-01 3.315208e-03 3.000000e-01 4.262445e-03 4.000000e-01 4.832844e-03 5.000000e-01 5.246577e-03 6.000000e-01 5.616272e-03 7.000000e-01 5.971894e-03 8.000000e-01 6.322603e-03 9.000000e-01 6.671887e-03 1.000000e+00 7.021296e-03 1.100000e+00 7.371697e-03 1.200000e+00 7.723929e-03 1.000000e-01 2.119122e-03 2.000000e-01 3.776007e-03 3.000000e-01 5.002170e-03 4.000000e-01 5.804055e-03 5.000000e-01 6.320089e-03 6.000000e-01 6.733725e-03 7.000000e-01 7.114284e-03 8.000000e-01 7.482293e-03 9.000000e-01 7.845076e-03 1.000000e+00 8.205761e-03 1.100000e+00 8.565930e-03 1.200000e+00 8.926699e-03 1.000000e-01 2.278844e-03 2.000000e-01 4.129832e-03 3.000000e-01 5.584225e-03 4.000000e-01 6.636839e-03 5.000000e-01 7.315731e-03 6.000000e-01 7.798441e-03 7.000000e-01 8.213004e-03 8.000000e-01 8.602258e-03 9.000000e-01 8.980606e-03 1.000000e+00 9.353841e-03 1.100000e+00 9.724694e-03 1.200000e+00 1.009476e-02 1.000000e-01 2.401058e-03 2.000000e-01 4.406463e-03 3.000000e-01 6.045474e-03 4.000000e-01 7.320852e-03 5.000000e-01 8.210303e-03 6.000000e-01 8.802992e-03 7.000000e-01 9.267156e-03 8.000000e-01 9.683942e-03 9.000000e-01 1.008085e-02 1.000000e+00 1.046829e-02 1.100000e+00 1.085086e-02 1.200000e+00 1.123099e-02 1.000000e-01 2.496042e-03 2.000000e-01 4.625850e-03 3.000000e-01 6.415743e-03 4.000000e-01 7.875165e-03 5.000000e-01 8.980567e-03 6.000000e-01 9.732659e-03 7.000000e-01 1.027217e-02 8.000000e-01 1.072657e-02 9.000000e-01 1.114648e-02 1.000000e+00 1.155035e-02 1.100000e+00 1.194594e-02 1.200000e+00 1.233698e-02 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw4.standard0000644000265600020320000002575212264261473023240 0ustar andreasadminV(d) I(d) 1.000000e-01 5.331971e-08 2.000000e-01 8.897618e-08 3.000000e-01 1.445255e-07 4.000000e-01 2.324586e-07 5.000000e-01 3.709946e-07 6.000000e-01 5.874979e-07 7.000000e-01 9.225496e-07 8.000000e-01 1.435278e-06 9.000000e-01 2.210167e-06 1.000000e+00 3.365416e-06 1.100000e+00 5.062696e-06 1.200000e+00 7.517724e-06 1.000000e-01 6.119196e-07 2.000000e-01 9.905371e-07 3.000000e-01 1.552400e-06 4.000000e-01 2.395901e-06 5.000000e-01 3.647899e-06 6.000000e-01 5.478017e-06 7.000000e-01 8.106593e-06 8.000000e-01 1.180803e-05 9.000000e-01 1.690615e-05 1.000000e+00 2.375850e-05 1.100000e+00 3.272913e-05 1.200000e+00 4.415566e-05 1.000000e-01 5.553754e-06 2.000000e-01 8.489335e-06 3.000000e-01 1.245806e-05 4.000000e-01 1.787381e-05 5.000000e-01 2.510443e-05 6.000000e-01 3.449430e-05 7.000000e-01 4.632549e-05 8.000000e-01 6.077882e-05 9.000000e-01 7.791298e-05 1.000000e+00 9.767071e-05 1.100000e+00 1.199106e-04 1.200000e+00 1.444555e-04 1.000000e-01 3.338041e-05 2.000000e-01 4.693132e-05 3.000000e-01 6.209029e-05 4.000000e-01 7.970871e-05 5.000000e-01 9.980418e-05 6.000000e-01 1.222121e-04 7.000000e-01 1.466830e-04 8.000000e-01 1.729332e-04 9.000000e-01 2.006827e-04 1.000000e+00 2.296879e-04 1.100000e+00 2.597690e-04 1.200000e+00 2.908320e-04 1.000000e-01 1.070945e-04 2.000000e-01 1.417039e-04 3.000000e-01 1.699445e-04 4.000000e-01 1.983869e-04 5.000000e-01 2.276177e-04 6.000000e-01 2.576299e-04 7.000000e-01 2.883134e-04 8.000000e-01 3.195483e-04 9.000000e-01 3.512353e-04 1.000000e+00 3.833135e-04 1.100000e+00 4.157787e-04 1.200000e+00 4.487018e-04 1.000000e-01 1.954910e-04 2.000000e-01 2.677165e-04 3.000000e-01 3.066976e-04 4.000000e-01 3.409222e-04 5.000000e-01 3.741036e-04 6.000000e-01 4.070165e-04 7.000000e-01 4.398907e-04 8.000000e-01 4.728060e-04 9.000000e-01 5.057967e-04 1.000000e+00 5.388977e-04 1.100000e+00 5.721769e-04 1.200000e+00 6.057653e-04 1.000000e-01 2.634599e-04 2.000000e-01 3.910880e-04 3.000000e-01 4.463149e-04 4.000000e-01 4.858349e-04 5.000000e-01 5.217509e-04 6.000000e-01 5.564363e-04 7.000000e-01 5.906005e-04 8.000000e-01 6.245213e-04 9.000000e-01 6.583316e-04 1.000000e+00 6.921192e-04 1.100000e+00 7.259827e-04 1.200000e+00 7.600737e-04 1.000000e-01 3.108415e-04 2.000000e-01 4.950972e-04 3.000000e-01 5.793861e-04 4.000000e-01 6.271525e-04 5.000000e-01 6.664548e-04 6.000000e-01 7.030731e-04 7.000000e-01 7.385677e-04 8.000000e-01 7.735107e-04 9.000000e-01 8.081606e-04 1.000000e+00 8.426631e-04 1.100000e+00 8.771428e-04 1.200000e+00 9.117621e-04 1.000000e-01 3.446417e-04 2.000000e-01 5.759262e-04 3.000000e-01 7.010859e-04 4.000000e-01 7.631775e-04 5.000000e-01 8.075090e-04 6.000000e-01 8.466490e-04 7.000000e-01 8.837492e-04 8.000000e-01 9.198720e-04 9.000000e-01 9.554670e-04 1.000000e+00 9.907643e-04 1.100000e+00 1.025924e-03 1.200000e+00 1.061120e-03 1.000000e-01 3.696827e-04 2.000000e-01 6.377157e-04 3.000000e-01 8.068301e-04 4.000000e-01 8.923253e-04 5.000000e-01 9.445347e-04 6.000000e-01 9.871388e-04 7.000000e-01 1.026248e-03 8.000000e-01 1.063760e-03 9.000000e-01 1.100427e-03 1.000000e+00 1.136607e-03 1.100000e+00 1.172512e-03 1.200000e+00 1.208335e-03 1.000000e-01 3.888399e-04 2.000000e-01 6.857289e-04 3.000000e-01 8.941749e-04 4.000000e-01 1.012100e-03 5.000000e-01 1.076829e-03 6.000000e-01 1.124372e-03 7.000000e-01 1.166064e-03 8.000000e-01 1.205240e-03 9.000000e-01 1.243132e-03 1.000000e+00 1.280289e-03 1.100000e+00 1.317010e-03 1.200000e+00 1.353514e-03 1.000000e-01 4.038704e-04 2.000000e-01 7.238530e-04 3.000000e-01 9.646281e-04 4.000000e-01 1.119271e-03 5.000000e-01 1.203161e-03 6.000000e-01 1.257969e-03 7.000000e-01 1.303086e-03 8.000000e-01 1.344299e-03 9.000000e-01 1.383610e-03 1.000000e+00 1.421861e-03 1.100000e+00 1.459475e-03 1.200000e+00 1.496722e-03 1.000000e-01 7.253008e-09 2.000000e-01 1.363056e-08 3.000000e-01 2.513485e-08 4.000000e-01 4.597577e-08 5.000000e-01 8.347298e-08 6.000000e-01 1.502492e-07 7.000000e-01 2.675966e-07 8.000000e-01 4.704440e-07 9.000000e-01 8.142412e-07 1.000000e+00 1.383845e-06 1.100000e+00 2.304184e-06 1.200000e+00 3.752350e-06 1.000000e-01 2.056557e-07 2.000000e-01 3.706552e-07 3.000000e-01 6.482426e-07 4.000000e-01 1.110415e-06 5.000000e-01 1.861948e-06 6.000000e-01 3.051087e-06 7.000000e-01 4.878520e-06 8.000000e-01 7.603977e-06 9.000000e-01 1.154857e-05 1.000000e+00 1.708965e-05 1.100000e+00 2.464390e-05 1.200000e+00 3.463612e-05 1.000000e-01 3.926838e-06 2.000000e-01 6.310276e-06 3.000000e-01 9.721176e-06 4.000000e-01 1.453533e-05 5.000000e-01 2.113942e-05 6.000000e-01 2.992111e-05 7.000000e-01 4.122224e-05 8.000000e-01 5.528397e-05 9.000000e-01 7.220577e-05 1.000000e+00 9.193778e-05 1.100000e+00 1.143123e-04 1.200000e+00 1.391053e-04 1.000000e-01 3.445623e-05 2.000000e-01 4.799481e-05 3.000000e-01 6.369901e-05 4.000000e-01 8.202275e-05 5.000000e-01 1.028957e-04 6.000000e-01 1.260800e-04 7.000000e-01 1.512578e-04 8.000000e-01 1.780910e-04 9.000000e-01 2.062686e-04 1.000000e+00 2.355412e-04 1.100000e+00 2.657468e-04 1.200000e+00 2.968280e-04 1.000000e-01 1.264253e-04 2.000000e-01 1.584346e-04 3.000000e-01 1.871156e-04 4.000000e-01 2.160551e-04 5.000000e-01 2.455882e-04 6.000000e-01 2.756839e-04 7.000000e-01 3.062525e-04 8.000000e-01 3.372097e-04 9.000000e-01 3.684987e-04 1.000000e+00 4.001059e-04 1.100000e+00 4.320777e-04 1.200000e+00 4.645373e-04 1.000000e-01 2.448845e-04 2.000000e-01 3.026768e-04 3.000000e-01 3.389341e-04 4.000000e-01 3.720946e-04 5.000000e-01 4.044457e-04 6.000000e-01 4.365546e-04 7.000000e-01 4.686169e-04 8.000000e-01 5.007161e-04 9.000000e-01 5.329029e-04 1.000000e+00 5.652372e-04 1.100000e+00 5.978206e-04 1.200000e+00 6.308243e-04 1.000000e-01 3.393237e-04 2.000000e-01 4.461536e-04 3.000000e-01 4.919784e-04 4.000000e-01 5.286373e-04 5.000000e-01 5.629120e-04 6.000000e-01 5.963158e-04 7.000000e-01 6.293563e-04 8.000000e-01 6.622493e-04 9.000000e-01 6.951100e-04 1.000000e+00 7.280314e-04 1.100000e+00 7.611347e-04 1.200000e+00 7.946085e-04 1.000000e-01 4.020023e-04 2.000000e-01 5.766992e-04 3.000000e-01 6.402229e-04 4.000000e-01 6.819615e-04 5.000000e-01 7.186123e-04 6.000000e-01 7.534885e-04 7.000000e-01 7.876006e-04 8.000000e-01 8.213519e-04 9.000000e-01 8.549388e-04 1.000000e+00 8.884914e-04 1.100000e+00 9.221467e-04 1.200000e+00 9.561025e-04 1.000000e-01 4.437532e-04 2.000000e-01 6.868020e-04 3.000000e-01 7.815231e-04 4.000000e-01 8.314547e-04 5.000000e-01 8.713858e-04 6.000000e-01 9.081001e-04 7.000000e-01 9.434694e-04 8.000000e-01 9.781897e-04 9.000000e-01 1.012578e-03 1.000000e+00 1.046816e-03 1.100000e+00 1.081063e-03 1.200000e+00 1.115521e-03 1.000000e-01 4.729423e-04 2.000000e-01 7.730274e-04 3.000000e-01 9.130515e-04 4.000000e-01 9.764972e-04 5.000000e-01 1.021130e-03 6.000000e-01 1.060199e-03 7.000000e-01 1.097063e-03 8.000000e-01 1.132882e-03 9.000000e-01 1.168152e-03 1.000000e+00 1.203132e-03 1.100000e+00 1.238010e-03 1.200000e+00 1.272997e-03 1.000000e-01 4.926794e-04 2.000000e-01 8.364022e-04 3.000000e-01 1.029685e-03 4.000000e-01 1.115445e-03 5.000000e-01 1.167297e-03 6.000000e-01 1.209621e-03 7.000000e-01 1.248381e-03 8.000000e-01 1.285474e-03 9.000000e-01 1.321718e-03 1.000000e+00 1.357502e-03 1.100000e+00 1.393056e-03 1.200000e+00 1.428606e-03 1.000000e-01 5.069600e-04 2.000000e-01 8.832488e-04 3.000000e-01 1.127113e-03 4.000000e-01 1.245856e-03 5.000000e-01 1.308717e-03 6.000000e-01 1.355484e-03 7.000000e-01 1.396678e-03 8.000000e-01 1.435437e-03 9.000000e-01 1.472947e-03 1.000000e+00 1.509749e-03 1.100000e+00 1.546143e-03 1.200000e+00 1.582366e-03 1.000000e-01 3.058227e-07 2.000000e-01 4.579271e-07 3.000000e-01 6.611960e-07 4.000000e-01 9.459418e-07 5.000000e-01 1.345257e-06 6.000000e-01 1.903056e-06 7.000000e-01 2.677997e-06 8.000000e-01 3.747736e-06 9.000000e-01 5.213841e-06 1.000000e+00 7.207304e-06 1.100000e+00 9.894394e-06 1.200000e+00 1.348234e-05 1.000000e-01 1.642811e-06 2.000000e-01 2.417971e-06 3.000000e-01 3.419406e-06 4.000000e-01 4.780597e-06 5.000000e-01 6.628138e-06 6.000000e-01 9.116354e-06 7.000000e-01 1.243250e-05 8.000000e-01 1.679676e-05 9.000000e-01 2.245762e-05 1.000000e+00 2.968257e-05 1.100000e+00 3.874525e-05 1.200000e+00 4.991178e-05 1.000000e-01 7.756362e-06 2.000000e-01 1.118603e-05 3.000000e-01 1.531244e-05 4.000000e-01 2.060909e-05 5.000000e-01 2.735577e-05 6.000000e-01 3.581099e-05 7.000000e-01 4.620769e-05 8.000000e-01 5.873568e-05 9.000000e-01 7.352677e-05 1.000000e+00 9.064899e-05 1.100000e+00 1.101131e-04 1.200000e+00 1.318915e-04 1.000000e-01 2.908525e-05 2.000000e-01 4.123688e-05 3.000000e-01 5.336531e-05 4.000000e-01 6.734633e-05 5.000000e-01 8.344204e-05 6.000000e-01 1.017036e-04 7.000000e-01 1.220886e-04 8.000000e-01 1.444927e-04 9.000000e-01 1.687711e-04 1.000000e+00 1.947621e-04 1.100000e+00 2.223135e-04 1.200000e+00 2.513096e-04 1.000000e-01 7.242838e-05 2.000000e-01 1.058366e-04 3.000000e-01 1.294402e-04 4.000000e-01 1.530978e-04 5.000000e-01 1.779715e-04 6.000000e-01 2.041815e-04 7.000000e-01 2.316565e-04 8.000000e-01 2.602739e-04 9.000000e-01 2.899020e-04 1.000000e+00 3.204228e-04 1.100000e+00 3.517517e-04 1.200000e+00 3.838592e-04 1.000000e-01 1.210824e-04 2.000000e-01 1.908208e-04 3.000000e-01 2.296732e-04 4.000000e-01 2.611616e-04 5.000000e-01 2.916626e-04 6.000000e-01 3.223333e-04 7.000000e-01 3.534389e-04 8.000000e-01 3.850300e-04 9.000000e-01 4.170929e-04 1.000000e+00 4.496000e-04 1.100000e+00 4.825408e-04 1.200000e+00 5.159487e-04 1.000000e-01 1.604644e-04 2.000000e-01 2.687708e-04 3.000000e-01 3.324013e-04 4.000000e-01 3.732002e-04 5.000000e-01 4.082324e-04 6.000000e-01 4.418592e-04 7.000000e-01 4.751619e-04 8.000000e-01 5.084875e-04 9.000000e-01 5.419653e-04 1.000000e+00 5.756487e-04 1.100000e+00 6.095754e-04 1.200000e+00 6.438085e-04 1.000000e-01 1.894288e-04 2.000000e-01 3.293770e-04 3.000000e-01 4.233496e-04 4.000000e-01 4.799223e-04 5.000000e-01 5.210005e-04 6.000000e-01 5.577295e-04 7.000000e-01 5.930701e-04 8.000000e-01 6.279281e-04 9.000000e-01 6.626481e-04 1.000000e+00 6.973834e-04 1.100000e+00 7.322199e-04 1.200000e+00 7.672409e-04 1.000000e-01 2.106844e-04 2.000000e-01 3.752841e-04 3.000000e-01 4.969861e-04 4.000000e-01 5.764990e-04 5.000000e-01 6.276934e-04 6.000000e-01 6.687737e-04 7.000000e-01 7.065887e-04 8.000000e-01 7.431658e-04 9.000000e-01 7.792286e-04 1.000000e+00 8.150865e-04 1.100000e+00 8.508958e-04 1.200000e+00 8.867673e-04 1.000000e-01 2.266169e-04 2.000000e-01 4.105551e-04 3.000000e-01 5.549708e-04 4.000000e-01 6.593826e-04 5.000000e-01 7.266866e-04 6.000000e-01 7.745947e-04 7.000000e-01 8.157768e-04 8.000000e-01 8.544615e-04 9.000000e-01 8.920705e-04 1.000000e+00 9.291761e-04 1.100000e+00 9.660484e-04 1.200000e+00 1.002845e-03 1.000000e-01 2.388129e-04 2.000000e-01 4.381439e-04 3.000000e-01 6.009455e-04 4.000000e-01 7.275168e-04 5.000000e-01 8.156905e-04 6.000000e-01 8.744627e-04 7.000000e-01 9.205481e-04 8.000000e-01 9.619595e-04 9.000000e-01 1.001410e-03 1.000000e+00 1.039926e-03 1.100000e+00 1.077963e-03 1.200000e+00 1.115761e-03 1.000000e-01 2.482945e-04 2.000000e-01 4.600317e-04 3.000000e-01 6.378671e-04 4.000000e-01 7.827636e-04 5.000000e-01 8.923938e-04 6.000000e-01 9.669302e-04 7.000000e-01 1.020455e-03 8.000000e-01 1.065585e-03 9.000000e-01 1.107313e-03 1.000000e+00 1.147461e-03 1.100000e+00 1.186790e-03 1.200000e+00 1.225672e-03 ngspice-26/tests/bsim4/nmos/reference/acFreq_mobmod.standard0000644000265600020320000000712112264261473023604 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/dcSweep_lw5.standard0000644000265600020320000002575212264261473023241 0ustar andreasadminV(d) I(d) 1.000000e-01 1.149429e-08 2.000000e-01 1.247534e-08 3.000000e-01 1.329857e-08 4.000000e-01 1.413686e-08 5.000000e-01 1.502052e-08 6.000000e-01 1.596994e-08 7.000000e-01 1.701131e-08 8.000000e-01 1.818573e-08 9.000000e-01 1.956119e-08 1.000000e+00 2.125125e-08 1.100000e+00 2.344521e-08 1.200000e+00 2.645689e-08 1.000000e-01 1.360213e-07 2.000000e-01 1.472968e-07 3.000000e-01 1.565955e-07 4.000000e-01 1.659445e-07 5.000000e-01 1.756266e-07 6.000000e-01 1.857448e-07 7.000000e-01 1.963647e-07 8.000000e-01 2.075490e-07 9.000000e-01 2.193755e-07 1.000000e+00 2.319551e-07 1.100000e+00 2.454562e-07 1.200000e+00 2.601396e-07 1.000000e-01 1.338538e-06 2.000000e-01 1.445381e-06 3.000000e-01 1.529632e-06 4.000000e-01 1.613157e-06 5.000000e-01 1.698833e-06 6.000000e-01 1.787581e-06 7.000000e-01 1.879870e-06 8.000000e-01 1.976038e-06 9.000000e-01 2.076408e-06 1.000000e+00 2.181371e-06 1.100000e+00 2.291446e-06 1.200000e+00 2.407346e-06 1.000000e-01 9.822916e-06 2.000000e-01 1.066363e-05 3.000000e-01 1.121864e-05 4.000000e-01 1.174675e-05 5.000000e-01 1.227716e-05 6.000000e-01 1.281795e-05 7.000000e-01 1.337249e-05 8.000000e-01 1.394268e-05 9.000000e-01 1.453000e-05 1.000000e+00 1.513609e-05 1.100000e+00 1.576318e-05 1.200000e+00 1.641433e-05 1.000000e-01 4.265986e-05 2.000000e-01 4.852153e-05 3.000000e-01 5.074433e-05 4.000000e-01 5.258304e-05 5.000000e-01 5.433130e-05 6.000000e-01 5.605614e-05 7.000000e-01 5.778127e-05 8.000000e-01 5.951744e-05 9.000000e-01 6.127100e-05 1.000000e+00 6.304741e-05 1.100000e+00 6.485338e-05 1.200000e+00 6.669810e-05 1.000000e-01 9.627068e-05 2.000000e-01 1.239810e-04 3.000000e-01 1.305981e-04 4.000000e-01 1.345198e-04 5.000000e-01 1.378469e-04 6.000000e-01 1.409615e-04 7.000000e-01 1.439808e-04 8.000000e-01 1.469530e-04 9.000000e-01 1.499023e-04 1.000000e+00 1.528452e-04 1.100000e+00 1.557972e-04 1.200000e+00 1.587780e-04 1.000000e-01 1.459225e-04 2.000000e-01 2.133861e-04 3.000000e-01 2.322790e-04 4.000000e-01 2.396628e-04 5.000000e-01 2.448265e-04 6.000000e-01 2.492856e-04 7.000000e-01 2.534356e-04 8.000000e-01 2.574223e-04 9.000000e-01 2.613125e-04 1.000000e+00 2.651443e-04 1.100000e+00 2.689473e-04 1.200000e+00 2.727532e-04 1.000000e-01 1.850127e-04 2.000000e-01 2.939305e-04 3.000000e-01 3.378957e-04 4.000000e-01 3.522660e-04 5.000000e-01 3.600688e-04 6.000000e-01 3.660761e-04 7.000000e-01 3.713709e-04 8.000000e-01 3.763085e-04 9.000000e-01 3.810383e-04 1.000000e+00 3.856367e-04 1.100000e+00 3.901537e-04 1.200000e+00 3.946346e-04 1.000000e-01 2.153281e-04 2.000000e-01 3.595699e-04 3.000000e-01 4.366559e-04 4.000000e-01 4.649502e-04 5.000000e-01 4.771391e-04 6.000000e-01 4.852127e-04 7.000000e-01 4.918358e-04 8.000000e-01 4.977864e-04 9.000000e-01 5.033644e-04 1.000000e+00 5.087107e-04 1.100000e+00 5.139064e-04 1.200000e+00 5.190138e-04 1.000000e-01 2.391687e-04 2.000000e-01 4.123735e-04 3.000000e-01 5.222333e-04 4.000000e-01 5.731505e-04 5.000000e-01 5.931026e-04 6.000000e-01 6.042051e-04 7.000000e-01 6.125020e-04 8.000000e-01 6.196119e-04 9.000000e-01 6.261035e-04 1.000000e+00 6.322250e-04 1.100000e+00 6.381061e-04 1.200000e+00 6.438328e-04 1.000000e-01 2.582195e-04 2.000000e-01 4.552150e-04 3.000000e-01 5.935717e-04 4.000000e-01 6.725014e-04 5.000000e-01 7.057956e-04 6.000000e-01 7.216486e-04 7.000000e-01 7.321959e-04 8.000000e-01 7.407024e-04 9.000000e-01 7.482199e-04 1.000000e+00 7.551735e-04 1.100000e+00 7.617692e-04 1.200000e+00 7.681286e-04 1.000000e-01 2.736504e-04 2.000000e-01 4.903544e-04 3.000000e-01 6.526914e-04 4.000000e-01 7.595598e-04 5.000000e-01 8.127970e-04 6.000000e-01 8.363690e-04 7.000000e-01 8.501229e-04 8.000000e-01 8.603950e-04 9.000000e-01 8.691069e-04 1.000000e+00 8.769792e-04 1.100000e+00 8.843375e-04 1.200000e+00 8.913572e-04 1.000000e-01 1.589619e-09 2.000000e-01 1.742794e-09 3.000000e-01 1.884972e-09 4.000000e-01 2.038006e-09 5.000000e-01 2.211790e-09 6.000000e-01 2.419695e-09 7.000000e-01 2.683958e-09 8.000000e-01 3.042621e-09 9.000000e-01 3.560643e-09 1.000000e+00 4.348095e-09 1.100000e+00 5.589887e-09 1.200000e+00 7.594149e-09 1.000000e-01 4.676745e-08 2.000000e-01 5.110393e-08 3.000000e-01 5.500675e-08 4.000000e-01 5.901980e-08 5.000000e-01 6.324394e-08 6.000000e-01 6.772684e-08 7.000000e-01 7.250779e-08 8.000000e-01 7.763178e-08 9.000000e-01 8.316033e-08 1.000000e+00 8.918533e-08 1.100000e+00 9.584958e-08 1.200000e+00 1.033791e-07 1.000000e-01 1.019841e-06 2.000000e-01 1.104912e-06 3.000000e-01 1.178447e-06 4.000000e-01 1.252562e-06 5.000000e-01 1.329289e-06 6.000000e-01 1.409376e-06 7.000000e-01 1.493245e-06 8.000000e-01 1.581229e-06 9.000000e-01 1.673658e-06 1.000000e+00 1.770929e-06 1.100000e+00 1.873563e-06 1.200000e+00 1.982263e-06 1.000000e-01 1.229357e-05 2.000000e-01 1.322893e-05 3.000000e-01 1.394715e-05 4.000000e-01 1.464189e-05 5.000000e-01 1.534295e-05 6.000000e-01 1.605969e-05 7.000000e-01 1.679632e-05 8.000000e-01 1.755533e-05 9.000000e-01 1.833883e-05 1.000000e+00 1.914917e-05 1.100000e+00 1.998953e-05 1.200000e+00 2.086427e-05 1.000000e-01 7.075172e-05 2.000000e-01 7.683093e-05 3.000000e-01 8.004721e-05 4.000000e-01 8.281237e-05 5.000000e-01 8.544356e-05 6.000000e-01 8.802922e-05 7.000000e-01 9.060376e-05 8.000000e-01 9.318377e-05 9.000000e-01 9.577982e-05 1.000000e+00 9.840174e-05 1.100000e+00 1.010617e-04 1.200000e+00 1.037761e-04 1.000000e-01 1.798139e-04 2.000000e-01 2.049883e-04 3.000000e-01 2.126744e-04 4.000000e-01 2.179648e-04 5.000000e-01 2.225330e-04 6.000000e-01 2.267911e-04 7.000000e-01 2.308885e-04 8.000000e-01 2.348930e-04 9.000000e-01 2.388428e-04 1.000000e+00 2.427674e-04 1.100000e+00 2.466972e-04 1.200000e+00 2.506701e-04 1.000000e-01 2.818658e-04 2.000000e-01 3.514128e-04 3.000000e-01 3.670060e-04 4.000000e-01 3.752748e-04 5.000000e-01 3.816141e-04 6.000000e-01 3.871758e-04 7.000000e-01 3.923429e-04 8.000000e-01 3.972793e-04 9.000000e-01 4.020700e-04 1.000000e+00 4.067725e-04 1.100000e+00 4.114392e-04 1.200000e+00 4.161301e-04 1.000000e-01 3.572200e-04 2.000000e-01 4.913102e-04 3.000000e-01 5.215700e-04 4.000000e-01 5.340897e-04 5.000000e-01 5.425319e-04 6.000000e-01 5.494705e-04 7.000000e-01 5.556852e-04 8.000000e-01 5.614894e-04 9.000000e-01 5.670361e-04 1.000000e+00 5.724186e-04 1.100000e+00 5.777131e-04 1.200000e+00 5.830008e-04 1.000000e-01 4.117858e-04 2.000000e-01 6.153769e-04 3.000000e-01 6.712412e-04 4.000000e-01 6.901814e-04 5.000000e-01 7.013326e-04 6.000000e-01 7.098756e-04 7.000000e-01 7.172374e-04 8.000000e-01 7.239554e-04 9.000000e-01 7.302779e-04 1.000000e+00 7.363449e-04 1.100000e+00 7.422595e-04 1.200000e+00 7.481234e-04 1.000000e-01 4.511425e-04 2.000000e-01 7.174393e-04 3.000000e-01 8.124952e-04 4.000000e-01 8.415356e-04 5.000000e-01 8.563940e-04 6.000000e-01 8.669477e-04 7.000000e-01 8.756782e-04 8.000000e-01 8.834571e-04 9.000000e-01 8.906667e-04 1.000000e+00 8.975087e-04 1.100000e+00 9.041184e-04 1.200000e+00 9.106183e-04 1.000000e-01 4.757475e-04 2.000000e-01 7.915916e-04 3.000000e-01 9.377246e-04 4.000000e-01 9.833060e-04 5.000000e-01 1.003427e-03 6.000000e-01 1.016496e-03 7.000000e-01 1.026804e-03 8.000000e-01 1.035746e-03 9.000000e-01 1.043902e-03 1.000000e+00 1.051558e-03 1.100000e+00 1.058891e-03 1.200000e+00 1.066046e-03 1.000000e-01 4.929847e-04 2.000000e-01 8.463012e-04 3.000000e-01 1.046246e-03 4.000000e-01 1.117766e-03 5.000000e-01 1.145641e-03 6.000000e-01 1.161954e-03 7.000000e-01 1.174101e-03 8.000000e-01 1.184306e-03 9.000000e-01 1.193438e-03 1.000000e+00 1.201903e-03 1.100000e+00 1.209935e-03 1.200000e+00 1.217704e-03 1.000000e-01 7.210660e-08 2.000000e-01 7.795435e-08 3.000000e-01 8.200794e-08 4.000000e-01 8.596347e-08 5.000000e-01 9.000300e-08 6.000000e-01 9.418832e-08 7.000000e-01 9.856383e-08 8.000000e-01 1.031819e-07 9.000000e-01 1.081204e-07 1.000000e+00 1.135040e-07 1.100000e+00 1.195371e-07 1.200000e+00 1.265540e-07 1.000000e-01 3.966887e-07 2.000000e-01 4.288275e-07 3.000000e-01 4.504183e-07 4.000000e-01 4.713126e-07 5.000000e-01 4.925118e-07 6.000000e-01 5.142993e-07 7.000000e-01 5.368115e-07 8.000000e-01 5.601488e-07 9.000000e-01 5.844176e-07 1.000000e+00 6.097618e-07 1.100000e+00 6.363956e-07 1.200000e+00 6.646449e-07 1.000000e-01 1.971860e-06 2.000000e-01 2.143305e-06 3.000000e-01 2.247441e-06 4.000000e-01 2.346448e-06 5.000000e-01 2.446128e-06 6.000000e-01 2.547998e-06 7.000000e-01 2.652698e-06 8.000000e-01 2.760615e-06 9.000000e-01 2.872075e-06 1.000000e+00 2.987460e-06 1.100000e+00 3.107288e-06 1.200000e+00 3.232291e-06 1.000000e-01 8.286145e-06 2.000000e-01 9.290391e-06 3.000000e-01 9.727362e-06 4.000000e-01 1.011818e-05 5.000000e-01 1.050339e-05 6.000000e-01 1.089203e-05 7.000000e-01 1.128743e-05 8.000000e-01 1.169123e-05 9.000000e-01 1.210457e-05 1.000000e+00 1.252859e-05 1.100000e+00 1.296481e-05 1.200000e+00 1.341533e-05 1.000000e-01 2.415191e-05 2.000000e-01 3.013403e-05 3.000000e-01 3.167499e-05 4.000000e-01 3.278275e-05 5.000000e-01 3.381054e-05 6.000000e-01 3.481840e-05 7.000000e-01 3.582462e-05 8.000000e-01 3.683684e-05 9.000000e-01 3.785914e-05 1.000000e+00 3.889464e-05 1.100000e+00 3.994688e-05 1.200000e+00 4.102069e-05 1.000000e-01 4.568324e-05 2.000000e-01 6.629789e-05 3.000000e-01 7.202148e-05 4.000000e-01 7.451437e-05 5.000000e-01 7.647602e-05 6.000000e-01 7.828944e-05 7.000000e-01 8.004681e-05 8.000000e-01 8.178098e-05 9.000000e-01 8.350691e-05 1.000000e+00 8.523328e-05 1.100000e+00 8.696738e-05 1.200000e+00 8.871783e-05 1.000000e-01 6.551533e-05 2.000000e-01 1.051244e-04 3.000000e-01 1.225142e-04 4.000000e-01 1.284816e-04 5.000000e-01 1.318176e-04 6.000000e-01 1.345378e-04 7.000000e-01 1.370416e-04 8.000000e-01 1.394472e-04 9.000000e-01 1.418013e-04 1.000000e+00 1.441270e-04 1.100000e+00 1.464389e-04 1.200000e+00 1.487504e-04 1.000000e-01 8.131624e-05 2.000000e-01 1.377811e-04 3.000000e-01 1.710723e-04 4.000000e-01 1.855774e-04 5.000000e-01 1.916754e-04 6.000000e-01 1.956348e-04 7.000000e-01 1.989582e-04 8.000000e-01 2.020212e-04 9.000000e-01 2.049521e-04 1.000000e+00 2.078069e-04 1.100000e+00 2.106149e-04 1.200000e+00 2.133971e-04 1.000000e-01 9.350719e-05 2.000000e-01 1.636528e-04 3.000000e-01 2.116416e-04 4.000000e-01 2.389559e-04 5.000000e-01 2.510948e-04 6.000000e-01 2.572294e-04 7.000000e-01 2.616454e-04 8.000000e-01 2.654512e-04 9.000000e-01 2.689764e-04 1.000000e+00 2.723477e-04 1.100000e+00 2.756243e-04 1.200000e+00 2.788406e-04 1.000000e-01 1.029511e-04 2.000000e-01 1.840822e-04 3.000000e-01 2.443819e-04 4.000000e-01 2.846920e-04 5.000000e-01 3.067660e-04 6.000000e-01 3.171775e-04 7.000000e-01 3.233305e-04 8.000000e-01 3.280989e-04 9.000000e-01 3.323028e-04 1.000000e+00 3.362219e-04 1.100000e+00 3.399744e-04 1.200000e+00 3.436199e-04 1.000000e-01 1.103422e-04 2.000000e-01 2.003411e-04 3.000000e-01 2.708262e-04 4.000000e-01 3.224884e-04 5.000000e-01 3.559562e-04 6.000000e-01 3.737906e-04 7.000000e-01 3.830422e-04 8.000000e-01 3.892272e-04 9.000000e-01 3.942830e-04 1.000000e+00 3.988244e-04 1.100000e+00 4.030858e-04 1.200000e+00 4.071741e-04 1.000000e-01 1.161707e-04 2.000000e-01 2.133751e-04 3.000000e-01 2.923075e-04 4.000000e-01 3.535797e-04 5.000000e-01 3.976306e-04 6.000000e-01 4.251323e-04 7.000000e-01 4.397981e-04 8.000000e-01 4.483034e-04 9.000000e-01 4.545389e-04 1.000000e+00 4.598386e-04 1.100000e+00 4.646714e-04 1.200000e+00 4.692330e-04 ngspice-26/tests/bsim4/nmos/reference/dcSweep_sb.standard0000644000265600020320000002575212264261473023136 0ustar andreasadminV(d) I(d) 1.000000e-01 5.381036e-07 2.000000e-01 8.979352e-07 3.000000e-01 1.458523e-06 4.000000e-01 2.345919e-06 5.000000e-01 3.743979e-06 6.000000e-01 5.928842e-06 7.000000e-01 9.309998e-06 8.000000e-01 1.448406e-05 9.000000e-01 2.230339e-05 1.000000e+00 3.396036e-05 1.100000e+00 5.108560e-05 1.200000e+00 7.585441e-05 1.000000e-01 6.175374e-06 2.000000e-01 9.996042e-06 3.000000e-01 1.566575e-05 4.000000e-01 2.417709e-05 5.000000e-01 3.680960e-05 6.000000e-01 5.527369e-05 7.000000e-01 8.179037e-05 8.000000e-01 1.191243e-04 9.000000e-01 1.705364e-04 1.000000e+00 2.396239e-04 1.100000e+00 3.300467e-04 1.200000e+00 4.451953e-04 1.000000e-01 5.603719e-05 2.000000e-01 8.564974e-05 3.000000e-01 1.256776e-04 4.000000e-01 1.802895e-04 5.000000e-01 2.531861e-04 6.000000e-01 3.478281e-04 7.000000e-01 4.670448e-04 8.000000e-01 6.126440e-04 9.000000e-01 7.852036e-04 1.000000e+00 9.841360e-04 1.100000e+00 1.208010e-03 1.200000e+00 1.455038e-03 1.000000e-01 3.365708e-04 2.000000e-01 4.731344e-04 3.000000e-01 6.258448e-04 4.000000e-01 8.032825e-04 5.000000e-01 1.005617e-03 6.000000e-01 1.231184e-03 7.000000e-01 1.477470e-03 8.000000e-01 1.741619e-03 9.000000e-01 2.020814e-03 1.000000e+00 2.312608e-03 1.100000e+00 2.615194e-03 1.200000e+00 2.927631e-03 1.000000e-01 1.078590e-03 2.000000e-01 1.427275e-03 3.000000e-01 1.711529e-03 4.000000e-01 1.997733e-03 5.000000e-01 2.291821e-03 6.000000e-01 2.593736e-03 7.000000e-01 2.902373e-03 8.000000e-01 3.216532e-03 9.000000e-01 3.535218e-03 1.000000e+00 3.857820e-03 1.100000e+00 4.184298e-03 1.200000e+00 4.515363e-03 1.000000e-01 1.966489e-03 2.000000e-01 2.694690e-03 3.000000e-01 3.087158e-03 4.000000e-01 3.431488e-03 5.000000e-01 3.765245e-03 6.000000e-01 4.096264e-03 7.000000e-01 4.426871e-03 8.000000e-01 4.757875e-03 9.000000e-01 5.089625e-03 1.000000e+00 5.422472e-03 1.100000e+00 5.757099e-03 1.200000e+00 6.094820e-03 1.000000e-01 2.647620e-03 2.000000e-01 3.934138e-03 3.000000e-01 4.490970e-03 4.000000e-01 4.888747e-03 5.000000e-01 5.250041e-03 6.000000e-01 5.598883e-03 7.000000e-01 5.942449e-03 8.000000e-01 6.283548e-03 9.000000e-01 6.623523e-03 1.000000e+00 6.963260e-03 1.100000e+00 7.303747e-03 1.200000e+00 7.646505e-03 1.000000e-01 3.121627e-03 2.000000e-01 4.977198e-03 3.000000e-01 5.828211e-03 4.000000e-01 6.309533e-03 5.000000e-01 6.705044e-03 6.000000e-01 7.073379e-03 7.000000e-01 7.430342e-03 8.000000e-01 7.781726e-03 9.000000e-01 8.130143e-03 1.000000e+00 8.477066e-03 1.100000e+00 8.823745e-03 1.200000e+00 9.171809e-03 1.000000e-01 3.459366e-03 2.000000e-01 5.786304e-03 3.000000e-01 7.049916e-03 4.000000e-01 7.676678e-03 5.000000e-01 8.123155e-03 6.000000e-01 8.516979e-03 7.000000e-01 8.890143e-03 8.000000e-01 9.253415e-03 9.000000e-01 9.611348e-03 1.000000e+00 9.966270e-03 1.100000e+00 1.031979e-02 1.200000e+00 1.067365e-02 1.000000e-01 3.709371e-03 2.000000e-01 6.404043e-03 3.000000e-01 8.109684e-03 4.000000e-01 8.973978e-03 5.000000e-01 9.500490e-03 6.000000e-01 9.929411e-03 7.000000e-01 1.032288e-02 8.000000e-01 1.070018e-02 9.000000e-01 1.106892e-02 1.000000e+00 1.143272e-02 1.100000e+00 1.179374e-02 1.200000e+00 1.215392e-02 1.000000e-01 3.900511e-03 2.000000e-01 6.883659e-03 3.000000e-01 8.983496e-03 4.000000e-01 1.017591e-02 5.000000e-01 1.082983e-02 6.000000e-01 1.130891e-02 7.000000e-01 1.172853e-02 8.000000e-01 1.212265e-02 9.000000e-01 1.250374e-02 1.000000e+00 1.287741e-02 1.100000e+00 1.324664e-02 1.200000e+00 1.361368e-02 1.000000e-01 4.050406e-03 2.000000e-01 7.264261e-03 3.000000e-01 9.687450e-03 4.000000e-01 1.124967e-02 5.000000e-01 1.209852e-02 6.000000e-01 1.265156e-02 7.000000e-01 1.310595e-02 8.000000e-01 1.352068e-02 9.000000e-01 1.391611e-02 1.000000e+00 1.430081e-02 1.100000e+00 1.467905e-02 1.200000e+00 1.505357e-02 1.000000e-01 7.321028e-08 2.000000e-01 1.375764e-07 3.000000e-01 2.536872e-07 4.000000e-01 4.640314e-07 5.000000e-01 8.424837e-07 6.000000e-01 1.516439e-06 7.000000e-01 2.700786e-06 8.000000e-01 4.748026e-06 9.000000e-01 8.217731e-06 1.000000e+00 1.396616e-05 1.100000e+00 2.325376e-05 1.200000e+00 3.786694e-05 1.000000e-01 2.075842e-06 2.000000e-01 3.741078e-06 3.000000e-01 6.542583e-06 4.000000e-01 1.120680e-05 5.000000e-01 1.879079e-05 6.000000e-01 3.078970e-05 7.000000e-01 4.922683e-05 8.000000e-01 7.671926e-05 9.000000e-01 1.165001e-04 1.000000e+00 1.723658e-04 1.100000e+00 2.485040e-04 1.200000e+00 3.491799e-04 1.000000e-01 3.962783e-05 2.000000e-01 6.367046e-05 3.000000e-01 9.807032e-05 4.000000e-01 1.466088e-04 5.000000e-01 2.131723e-04 6.000000e-01 3.016524e-04 7.000000e-01 4.154759e-04 8.000000e-01 5.570550e-04 9.000000e-01 7.273784e-04 1.000000e+00 9.259365e-04 1.100000e+00 1.151040e-03 1.200000e+00 1.400437e-03 1.000000e-01 3.472832e-04 2.000000e-01 4.836094e-04 3.000000e-01 6.416803e-04 4.000000e-01 8.260673e-04 5.000000e-01 1.036062e-03 6.000000e-01 1.269272e-03 7.000000e-01 1.522506e-03 8.000000e-01 1.792368e-03 9.000000e-01 2.075732e-03 1.000000e+00 2.370096e-03 1.100000e+00 2.673833e-03 1.200000e+00 2.986366e-03 1.000000e-01 1.272216e-03 2.000000e-01 1.594399e-03 3.000000e-01 1.882878e-03 4.000000e-01 2.173914e-03 5.000000e-01 2.470903e-03 6.000000e-01 2.773539e-03 7.000000e-01 3.080925e-03 8.000000e-01 3.392216e-03 9.000000e-01 3.706839e-03 1.000000e+00 4.024657e-03 1.100000e+00 4.346137e-03 1.200000e+00 4.672512e-03 1.000000e-01 2.461389e-03 2.000000e-01 3.044287e-03 3.000000e-01 3.409153e-03 4.000000e-01 3.742685e-03 5.000000e-01 4.068030e-03 6.000000e-01 4.390920e-03 7.000000e-01 4.713334e-03 8.000000e-01 5.036113e-03 9.000000e-01 5.359768e-03 1.000000e+00 5.684901e-03 1.100000e+00 6.012529e-03 1.200000e+00 6.344369e-03 1.000000e-01 3.406496e-03 2.000000e-01 4.485676e-03 3.000000e-01 4.947536e-03 4.000000e-01 5.316437e-03 5.000000e-01 5.661196e-03 6.000000e-01 5.997142e-03 7.000000e-01 6.329412e-03 8.000000e-01 6.660187e-03 9.000000e-01 6.990627e-03 1.000000e+00 7.321669e-03 1.100000e+00 7.654527e-03 1.200000e+00 7.991088e-03 1.000000e-01 4.031881e-03 2.000000e-01 5.795369e-03 3.000000e-01 6.437274e-03 4.000000e-01 6.857711e-03 5.000000e-01 7.226512e-03 6.000000e-01 7.577328e-03 7.000000e-01 7.920407e-03 8.000000e-01 8.259831e-03 9.000000e-01 8.597587e-03 1.000000e+00 8.934983e-03 1.100000e+00 9.273395e-03 1.200000e+00 9.614801e-03 1.000000e-01 4.447752e-03 2.000000e-01 6.897105e-03 3.000000e-01 7.856388e-03 4.000000e-01 8.360232e-03 5.000000e-01 8.762310e-03 6.000000e-01 9.131724e-03 7.000000e-01 9.487499e-03 8.000000e-01 9.836697e-03 9.000000e-01 1.018253e-02 1.000000e+00 1.052683e-02 1.100000e+00 1.087119e-02 1.200000e+00 1.121766e-02 1.000000e-01 4.738214e-03 2.000000e-01 7.757390e-03 3.000000e-01 9.175754e-03 4.000000e-01 9.817568e-03 5.000000e-01 1.026749e-02 6.000000e-01 1.066078e-02 7.000000e-01 1.103168e-02 8.000000e-01 1.139197e-02 9.000000e-01 1.174669e-02 1.000000e+00 1.209847e-02 1.100000e+00 1.244919e-02 1.200000e+00 1.280097e-02 1.000000e-01 4.934493e-03 2.000000e-01 8.388412e-03 3.000000e-01 1.034314e-02 4.000000e-01 1.121284e-02 5.000000e-01 1.173643e-02 6.000000e-01 1.216280e-02 7.000000e-01 1.255290e-02 8.000000e-01 1.292607e-02 9.000000e-01 1.329063e-02 1.000000e+00 1.365051e-02 1.100000e+00 1.400805e-02 1.200000e+00 1.436550e-02 1.000000e-01 5.076453e-03 2.000000e-01 8.854427e-03 3.000000e-01 1.131542e-02 4.000000e-01 1.252094e-02 5.000000e-01 1.315716e-02 6.000000e-01 1.362882e-02 7.000000e-01 1.404363e-02 8.000000e-01 1.443366e-02 9.000000e-01 1.481101e-02 1.000000e+00 1.518117e-02 1.100000e+00 1.554718e-02 1.200000e+00 1.591142e-02 1.000000e-01 3.086192e-06 2.000000e-01 4.621116e-06 3.000000e-01 6.672341e-06 4.000000e-01 9.545743e-06 5.000000e-01 1.357522e-05 6.000000e-01 1.920386e-05 7.000000e-01 2.702344e-05 8.000000e-01 3.781735e-05 9.000000e-01 5.261004e-05 1.000000e+00 7.272259e-05 1.100000e+00 9.983155e-05 1.200000e+00 1.360261e-04 1.000000e-01 1.657772e-05 2.000000e-01 2.439951e-05 3.000000e-01 3.450415e-05 4.000000e-01 4.823817e-05 5.000000e-01 6.687828e-05 6.000000e-01 9.198042e-05 7.000000e-01 1.254321e-04 8.000000e-01 1.694518e-04 9.000000e-01 2.265423e-04 1.000000e+00 2.993961e-04 1.100000e+00 3.907660e-04 1.200000e+00 5.033272e-04 1.000000e-01 7.825845e-05 2.000000e-01 1.128577e-04 3.000000e-01 1.544802e-04 4.000000e-01 2.079002e-04 5.000000e-01 2.759354e-04 6.000000e-01 3.611870e-04 7.000000e-01 4.659963e-04 8.000000e-01 5.922686e-04 9.000000e-01 7.413231e-04 1.000000e+00 9.138362e-04 1.100000e+00 1.109908e-03 1.200000e+00 1.329252e-03 1.000000e-01 2.933428e-04 2.000000e-01 4.158853e-04 3.000000e-01 5.381511e-04 4.000000e-01 6.790645e-04 5.000000e-01 8.412619e-04 6.000000e-01 1.025251e-03 7.000000e-01 1.230599e-03 8.000000e-01 1.456246e-03 9.000000e-01 1.700731e-03 1.000000e+00 1.962420e-03 1.100000e+00 2.239778e-03 1.200000e+00 2.531640e-03 1.000000e-01 7.299964e-04 2.000000e-01 1.066847e-03 3.000000e-01 1.304685e-03 4.000000e-01 1.542987e-03 5.000000e-01 1.793489e-03 6.000000e-01 2.057408e-03 7.000000e-01 2.334023e-03 8.000000e-01 2.622101e-03 9.000000e-01 2.920318e-03 1.000000e+00 3.227483e-03 1.100000e+00 3.542747e-03 1.200000e+00 3.865813e-03 1.000000e-01 1.219490e-03 2.000000e-01 1.922472e-03 3.000000e-01 2.314048e-03 4.000000e-01 2.631167e-03 5.000000e-01 2.938244e-03 6.000000e-01 3.246975e-03 7.000000e-01 3.560041e-03 8.000000e-01 3.877959e-03 9.000000e-01 4.200591e-03 1.000000e+00 4.527666e-03 1.100000e+00 4.859074e-03 1.200000e+00 5.195153e-03 1.000000e-01 1.615186e-03 2.000000e-01 2.706375e-03 3.000000e-01 3.347917e-03 4.000000e-01 3.758968e-03 5.000000e-01 4.111663e-03 6.000000e-01 4.450107e-03 7.000000e-01 4.785232e-03 8.000000e-01 5.120549e-03 9.000000e-01 5.457365e-03 1.000000e+00 5.796222e-03 1.100000e+00 6.137501e-03 1.200000e+00 6.481837e-03 1.000000e-01 1.905921e-03 2.000000e-01 3.315208e-03 3.000000e-01 4.262445e-03 4.000000e-01 4.832844e-03 5.000000e-01 5.246577e-03 6.000000e-01 5.616272e-03 7.000000e-01 5.971894e-03 8.000000e-01 6.322603e-03 9.000000e-01 6.671887e-03 1.000000e+00 7.021296e-03 1.100000e+00 7.371697e-03 1.200000e+00 7.723929e-03 1.000000e-01 2.119122e-03 2.000000e-01 3.776007e-03 3.000000e-01 5.002170e-03 4.000000e-01 5.804055e-03 5.000000e-01 6.320089e-03 6.000000e-01 6.733725e-03 7.000000e-01 7.114284e-03 8.000000e-01 7.482293e-03 9.000000e-01 7.845076e-03 1.000000e+00 8.205761e-03 1.100000e+00 8.565930e-03 1.200000e+00 8.926699e-03 1.000000e-01 2.278844e-03 2.000000e-01 4.129832e-03 3.000000e-01 5.584225e-03 4.000000e-01 6.636839e-03 5.000000e-01 7.315731e-03 6.000000e-01 7.798441e-03 7.000000e-01 8.213004e-03 8.000000e-01 8.602258e-03 9.000000e-01 8.980606e-03 1.000000e+00 9.353841e-03 1.100000e+00 9.724694e-03 1.200000e+00 1.009476e-02 1.000000e-01 2.401058e-03 2.000000e-01 4.406463e-03 3.000000e-01 6.045474e-03 4.000000e-01 7.320852e-03 5.000000e-01 8.210303e-03 6.000000e-01 8.802992e-03 7.000000e-01 9.267156e-03 8.000000e-01 9.683942e-03 9.000000e-01 1.008085e-02 1.000000e+00 1.046829e-02 1.100000e+00 1.085086e-02 1.200000e+00 1.123099e-02 1.000000e-01 2.496042e-03 2.000000e-01 4.625850e-03 3.000000e-01 6.415743e-03 4.000000e-01 7.875165e-03 5.000000e-01 8.980567e-03 6.000000e-01 9.732659e-03 7.000000e-01 1.027217e-02 8.000000e-01 1.072657e-02 9.000000e-01 1.114648e-02 1.000000e+00 1.155035e-02 1.100000e+00 1.194594e-02 1.200000e+00 1.233698e-02 ngspice-26/tests/bsim4/nmos/reference/acFreq_diomod.standard0000644000265600020320000000712112264261473023602 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258.925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584.893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995.262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511.886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162.278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981.072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011.872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309.573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943.282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589.25 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848.93 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952.62 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118.86 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622.78 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810.72 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 50118.72 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 63095.73 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432.82 1.39210168579019e-14 1.01277256219657e-14 3.71918252520243e-15 100000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 125892.5 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 158489.3 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 199526.2 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 251188.6 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 316227.8 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 398107.2 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 501187.2 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 630957.3 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 794328.2 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 1000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 1258925 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 1584893 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 1995262 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 2511886 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 3162278 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 3981072 1.39210163059323e-14 1.0127724190444e-14 3.71918106361498e-15 5011872 1.39210179087015e-14 1.01277239885519e-14 3.71918272852533e-15 6309573 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 7943282 1.39210168579019e-14 1.01277256219658e-14 3.71918252520243e-15 10000000 1.39210154919437e-14 1.01277245360386e-14 3.71918204820377e-15 12589250 1.39210212117493e-14 1.01277284232093e-14 3.71918335454673e-15 15848930 1.39210126711702e-14 1.0127727792417e-14 3.71918195372563e-15 19952620 1.39210142874832e-14 1.01277292937126e-14 3.7191819726474e-15 25118860 1.39210187580933e-14 1.01277256054525e-14 3.71918200178189e-15 31622780 1.39210132757997e-14 1.01277210988125e-14 3.71918091025135e-15 39810720 1.39210123081412e-14 1.0127724190444e-14 3.71918106361498e-15 50118720 1.39210147331426e-14 1.01277239885519e-14 3.71918272852533e-15 63095730 1.39210167474267e-14 1.01277244648048e-14 3.71918058943789e-15 79432820 1.39210148542597e-14 1.01277236183236e-14 3.71918052156032e-15 100000000 1.39210139003943e-14 1.01277229444892e-14 3.71918045665434e-15 ngspice-26/tests/bsim4/nmos/reference/acFreq_igcmod.standard0000644000265600020320000000712112264261473023571 0ustar andreasadminFreq c(g,g) c(g,s) c(g,d) 1000 1.3922782111812e-14 1.01293001699752e-14 3.71935711864117e-15 1258.925 1.39227911100381e-14 1.01293036326864e-14 3.71935781594949e-15 1584.893 1.39227800630373e-14 1.01293043862984e-14 3.71935668451249e-15 1995.262 1.39227851024121e-14 1.01293006925459e-14 3.71935745881153e-15 2511.886 1.39227865225986e-14 1.0129303287753e-14 3.71935751101773e-15 3162.278 1.39227798309548e-14 1.01293014359027e-14 3.71935655918272e-15 3981.072 1.39227833296095e-14 1.01292993201472e-14 3.71935656664536e-15 5011.872 1.39227835194026e-14 1.0129302241283e-14 3.71935738426015e-15 6309.573 1.39227824526521e-14 1.01293009873275e-14 3.71935715996044e-15 7943.282 1.39227840702431e-14 1.01293004846644e-14 3.71935684206603e-15 10000 1.3922782111812e-14 1.01293001699752e-14 3.71935711864117e-15 12589.25 1.39227911100381e-14 1.01293036326864e-14 3.71935781594949e-15 15848.93 1.39227800630373e-14 1.01293043862984e-14 3.71935668451249e-15 19952.62 1.39227851024121e-14 1.01293006925459e-14 3.71935745881153e-15 25118.86 1.39227865225986e-14 1.0129303287753e-14 3.71935751101773e-15 31622.78 1.39227798309548e-14 1.01293014359027e-14 3.71935655918272e-15 39810.72 1.39227833296095e-14 1.01292993201472e-14 3.71935656664536e-15 50118.72 1.39227835194026e-14 1.0129302241283e-14 3.71935738426015e-15 63095.73 1.39227824526521e-14 1.01293009873275e-14 3.71935715996044e-15 79432.82 1.39227840702431e-14 1.01293004846644e-14 3.71935684206603e-15 100000 1.3922782111812e-14 1.01293001699752e-14 3.71935711864117e-15 125892.5 1.39227911100381e-14 1.01293036326864e-14 3.71935781594949e-15 158489.3 1.39227800630373e-14 1.01293043862984e-14 3.71935668451249e-15 199526.2 1.39227851024121e-14 1.01293006925459e-14 3.71935745881153e-15 251188.6 1.39227865225986e-14 1.0129303287753e-14 3.71935751101773e-15 316227.8 1.39227798309548e-14 1.01293014359027e-14 3.71935655918271e-15 398107.2 1.39227833296095e-14 1.01292993201472e-14 3.71935656664536e-15 501187.2 1.39227835194026e-14 1.0129302241283e-14 3.71935738426015e-15 630957.3 1.39227824526521e-14 1.01293009873275e-14 3.71935715996044e-15 794328.2 1.39227840702431e-14 1.01293004846644e-14 3.71935684206603e-15 1000000 1.3922782111812e-14 1.01293001699752e-14 3.71935711864117e-15 1258925 1.39227911100381e-14 1.01293036326864e-14 3.71935781594949e-15 1584893 1.39227800630373e-14 1.01293043862984e-14 3.71935668451249e-15 1995262 1.39227851024121e-14 1.01293006925459e-14 3.71935745881153e-15 2511886 1.39227865225986e-14 1.0129303287753e-14 3.71935751101773e-15 3162278 1.39227798309548e-14 1.01293014359027e-14 3.71935655918271e-15 3981072 1.39227833296095e-14 1.01292993201472e-14 3.71935656664536e-15 5011872 1.39227835194026e-14 1.0129302241283e-14 3.71935738426015e-15 6309573 1.39227824526521e-14 1.01293009873275e-14 3.71935715996044e-15 7943282 1.39227840702431e-14 1.01293004846644e-14 3.71935684206603e-15 10000000 1.3922782111812e-14 1.01293001699752e-14 3.71935711864117e-15 12589250 1.39227911100381e-14 1.01293036326864e-14 3.71935781594949e-15 15848930 1.39227800630373e-14 1.01293043862984e-14 3.71935668451249e-15 19952620 1.39227851024121e-14 1.01293006925459e-14 3.71935745881153e-15 25118860 1.39227865225986e-14 1.0129303287753e-14 3.71935751101773e-15 31622780 1.39227798309548e-14 1.01293014359027e-14 3.71935605589065e-15 39810720 1.39227793318184e-14 1.01292993201472e-14 3.71935656664536e-15 50118720 1.39227835194026e-14 1.01292990657242e-14 3.71935738426015e-15 63095730 1.39227824526521e-14 1.01293009873275e-14 3.71935715996044e-15 79432820 1.3922782066601e-14 1.01293004846644e-14 3.71935684206603e-15 100000000 1.39227805202626e-14 1.01292985784258e-14 3.71935552709174e-15 ngspice-26/tests/bsim4/nmos/parameters/0000755000265600020320000000000012264261473017530 5ustar andreasadminngspice-26/tests/bsim4/nmos/parameters/nmosParameters0000644000265600020320000000756412264261473022467 0ustar andreasadmin+ binunit = (1) + paramchk= (1) + mobmod = (0) + capmod = (2) + igcmod = (1) + igbmod = (1) + geomod = (1) + diomod = (1) + rdsmod = (0) + rbodymod= (1) + rgatemod= (1) + permod = (1) + acnqsmod= (0) + trnqsmod= (0) + tnom = (27) + toxe = (1.85e-9) + toxp = (1.2e-9) + toxm = (1.85e-9) + dtox = (0.65e-9) + epsrox = (3.9) + wint = (5e-009) + lint = (5.25e-009) + ll = (0) + wl = (0) + lln = (1) + wln = (1) + lw = (0) + ww = (0) + lwn = (1) + wwn = (1) + lwl = (0) + wwl = (0) + xpart = (0) + toxref = (1.85e-9) + xl = (-30e-9) + vth0 = (0.423) + k1 = (0.4) + k2 = (0.01) + k3 = (0) + k3b = (0) + w0 = (2.5e-006) + dvt0 = (1) + dvt1 = (2) + dvt2 = (-0.032) + dvt0w = (0) + dvt1w = (0) + dvt2w = (0) + dsub = (0.1) + minv = (0.05) + voffl = (0) + dvtp0 = (1.0e-009) + dvtp1 = (0.1) + lpe0 = (0) + lpeb = (0) + xj = (1.96e-008) + ngate = (2e+020) + ndep = (2.54e+018) + nsd = (2e+020) + phin = (0) + cdsc = (0.000) + cdscb = (0) + cdscd = (0) + cit = (0) + voff = (-0.13) + nfactor = (1.9) + eta0 = (0.0058) + etab = (0) + vfb = (-0.55) + u0 = (0.0491) + ua = (6e-010) + ub = (1.2e-018) + uc = (0) + vsat = (124340) + a0 = (1.0) + ags = (1e-020) + a1 = (0) + a2 = (1.0) + b0 = (0) + b1 = (0) + keta = (0.04) + dwg = (0) + dwb = (0) + pclm = (0.04) + pdiblc1 = (0.001) + pdiblc2 = (0.001) + pdiblcb = (-0.005) + drout = (0.5) + pvag = (1e-020) + delta = (0.01) + pscbe1 = (8.14e+008) + pscbe2 = (1e-007) + fprout = (0.2) + pdits = (0.08) + pditsd = (0.23) + pditsl = (2.3e+006) + rsh = (5) + rdsw = (165) + rsw = (85) + rdw = (85) + rdswmin = (0) + rdwmin = (0) + rswmin = (0) + prwg = (0) + prwb = (6.8e-011) + wr = (1) + alpha0 = (0.074) + alpha1 = (0.005) + beta0 = (30) + agidl = (0.0002) + bgidl = (2.1e+009) + cgidl = (0.0002) + egidl = (0.8) + aigbacc = (0.012) + bigbacc = (0.0028) + cigbacc = (0.002) + nigbacc = (1) + aigbinv = (0.014) + bigbinv = (0.004) + cigbinv = (0.004) + eigbinv = (1.1) + nigbinv = (3) + aigc = (0.012) + bigc = (0.0028) + cigc = (0.002) + aigsd = (0.012) + bigsd = (0.0028) + cigsd = (0.002) + nigc = (1) + poxedge = (1) + pigcd = (1) + ntox = (1) + xrcrg1 = (12) + xrcrg2 = (5) + cgso = (1.5e-010) + cgdo = (1.5e-010) + cgbo = (2.56e-011) + cgdl = (2.653e-10) + cgsl = (2.653e-10) + ckappas = (0.03) + ckappad = (0.03) + acde = (1) + moin = (15) + noff = (0.9) + voffcv = (0.02) + kt1 = (-0.11) + kt1l = (0) + kt2 = (0.022) + ute = (-1.5) + ua1 = (4.31e-009) + ub1 = (7.61e-018) + uc1 = (-5.6e-011) + prt = (0) + at = (33000) + fnoimod = (1) + tnoimod = (0) + jss = (0.0001) + jsws = (1e-011) + jswgs = (1e-010) + njs = (1) + ijthsfwd= (0.01) + ijthsrev= (0.001) + bvs = (10) + xjbvs = (1) + jsd = (0.0001) + jswd = (1e-011) + jswgd = (1e-010) + njd = (1) + ijthdfwd= (0.01) + ijthdrev= (0.001) + bvd = (10) + xjbvd = (1) + pbs = (1) + cjs = (0.0005) + mjs = (0.5) + pbsws = (1) + cjsws = (5e-010) + mjsws = (0.33) + pbswgs = (1) + cjswgs = (3e-010) + mjswgs = (0.33) + pbd = (1) + cjd = (0.0005) + mjd = (0.5) + pbswd = (1) + cjswd = (5e-010) + mjswd = (0.33) + pbswgd = (1) + cjswgd = (5e-010) + mjswgd = (0.33) + tpb = (0.005) + tcj = (0.001) + tpbsw = (0.005) + tcjsw = (0.001) + tpbswg = (0.005) + tcjswg = (0.001) + xtis = (3) + xtid = (3) + dmcg = (0e-006) + dmci = (0e-006) + dmdg = (0e-006) + dmcgt = (0e-007) + dwj = (0.0e-008) + xgw = (0e-007) + xgl = (0e-008) + rshg = (0.4) + gbmin = (1e-010) + rbpb = (5) + rbpd = (15) + rbps = (15) + rbdb = (15) + rbsb = (15) + ngcon = (1) ngspice-26/tests/bsim4/nmos/qaSpec0000644000265600020320000003226012264261473016527 0ustar andreasadmin // // Test specification for bsim4 (version 4.5.0) // // // Simulator specific information // These arguments are added to the model card // specification to invoke the desired model in // different simulators (which can have different // names or levels for the same model) and to switch // between nType and pType polarities. // It is assumed that there are no polarity specific // parameters. // `ifdef spice nTypeSelectionArguments nmos level=14 version=4.7.0 pTypeSelectionArguments pmos level=14 version=4.7.0 `endif `ifdef ngspice nTypeSelectionArguments nmos level=14 version=4.7.0 pTypeSelectionArguments pmos level=14 version=4.7.0 `endif // // General test-independent information // keyLetter m pins d g s b linearScale w l ps pd areaScale as ad temperature 27 -50 150 checkPolarity no symmetricPins d s scaleParameters m // // Specific tests // test dcSweep_lw1 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test dcSweep_lw1_vb1 biases V(s)=0 V(b)=-0.1 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test dcSweep_lw1_vb2 biases V(s)=0 V(b)=-0.2 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test dcSweep_lw2 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.1e-6 modelParameters parameters/nmosParameters test dcSweep_lw3 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.24e-6 modelParameters parameters/nmosParameters test dcSweep_lw4 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test dcSweep_lw5 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.1e-6 modelParameters parameters/nmosParameters test dcSweep_lw6 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=1.0e-6 l=0.24e-6 modelParameters parameters/nmosParameters test dcSweep_lw7 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.06e-6 modelParameters parameters/nmosParameters test dcSweep_lw8 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.1e-6 modelParameters parameters/nmosParameters test dcSweep_lw9 biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=0.6e-6 l=0.24e-6 modelParameters parameters/nmosParameters test dcSweep_sa biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sa=0.3e-6 modelParameters parameters/nmosParameters test dcSweep_sb biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sb=0.4e-6 modelParameters parameters/nmosParameters test dcSweep_sca biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 sca=5.0 modelParameters parameters/nmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_scb biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 scb=0.01 modelParameters parameters/nmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_scc biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 scc=0.0001 modelParameters parameters/nmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test dcSweep_nrs biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 nrs=2.0 modelParameters parameters/nmosParameters test dcSweep_nrd biases V(s)=0 V(b)=0 biasList V(g)=0.1,0.2,0.3,0.4,0.5,0.6,0.7,0.8,0.9,1.0,1.1,1.2 biasSweep V(d)=0.1,1.2,0.1 outputs I(d) instanceParameters w=10.0e-6 l=0.06e-6 nrd=2.0 modelParameters parameters/nmosParameters test acVd temperature 27 150 biases V(s)=0 V(b)=0 V(g)=1.2 biasSweep V(d)=0.1,1.2,0.1 outputs G(d,g) G(d,d) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test acFreq temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters test acFreq_mobmod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters mobmod=1 test acFreq_capmod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters capmod=1 test acFreq_trnqsmod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters trnqsmod=1 test acFreq_acnqsmod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters acnqsmod=1 test acFreq_xpart temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters xpart=1 test acFreq_geomod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters geomod=0 test acFreq_wpemod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters wpemod=1 kvth0we=4.11e-03 lkvth0we=-2.1e-10 wkvth0we=-1.66e-10 pkvth0we=1.2e-17 k2we=1.77e-03 lk2we=1.89e-11 wk2we=-1.5e-10 test acFreq_igcmod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters igcmod=0 test acFreq_diomod temperature 27 biases V(s)=0 V(b)=0 V(d)=1.2 V(g)=1.2 freq dec 10 1e3 1e8 outputs C(g,g) C(g,s) C(g,d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters diomod=0 test noise1 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters fnoimod=0 tnoimod=0 kf=1e-30 af=1.2 ef=1.1 test noise2 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters fnoimod=1 tnoimod=1 noia=6.25e41 noib=3.125e26 noic=8.75 em=4.1e7 ef=1.1 test noise3 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters fnoimod=1 tnoimod=0 noia=6.25e41 noib=3.125e26 noic=8.75 em=4.1e7 ef=1.1 test noise4 temperature 27 biases V(s)=0 V(b)=0 V(d)=1.0 biasList V(g)=0.6,0.8,1.0 freq dec 10 1e3 1e8 outputs N(d) instanceParameters w=10.0e-6 l=0.06e-6 modelParameters parameters/nmosParameters modelParameters fnoimod=0 tnoimod=1 kf=1e-30 af=1.2 ef=1.1 ngspice-26/tests/bsim4/nmos/run0000644000265600020320000000010612264261473016111 0ustar andreasadmin#!/bin/sh ../../bin/run_cmc_check clean ngspice | tee cmcqa_nmos.log ngspice-26/tests/bsim4/Makefile.in0000644000265600020320000003367012264261541016463 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim4 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = nmos/qaSpec pmos/qaSpec TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check_cmc.sh \ $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ nmos pmos MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim4/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim4/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool clean-local mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool clean-local distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am clean-local: rm -rf nmos/results pmos/results ngspiceCkt bsim4.out # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/Makefile.am0000644000265600020320000000121712264261473015430 0ustar andreasadmin## Process this file with automake to produce Makefile.in SUBDIRS = \ bsim3 \ bsim4 \ bsimsoi \ hisim \ hisimhv1 \ regression if XSPICE_WANTED SUBDIRS += xspice endif DIST_SUBDIRS = \ bsim1 \ bsim2 \ bsim3 \ bsim3soidd \ bsim3soifd \ bsim3soipd \ bsim4 \ bsimsoi \ filters \ general \ hfet \ hisim \ hisimhv1 \ jfet \ mes \ mesa \ mos6 \ polezero \ regression \ resistance \ sensitivity \ transient \ transmission \ vbic \ xspice TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ README bin .gitignore MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/resistance/0000755000265600020320000000000012264261715015532 5ustar andreasadminngspice-26/tests/resistance/res_array.cir0000644000265600020320000000071112264261473020220 0ustar andreasadminA paralled resistor array Vin 1 0 DC 1 SIN (0 1 100MEG 1NS 0.0) AC 1 VR1 1 2 DC 0 R1 2 0 10K VR2 1 3 DC 0 R2 3 0 10K ac=5K VR3 1 4 DC 0 R3 4 0 rmodel1 L=11u W=2u ac=2.5k VR4 1 5 DC 0 R4 5 0 10K ac=5k m=2 .model rmodel1 R RSH = 1000 NARROW = 1u VR5 1 6 DC 0 R5 6 0 10 ac=5 scale=1K .options noacct .OP .TRAN 1ns 10ns .AC DEC 100 1MEG 100MEG .PRINT TRAN I(VR1), I(VR2), I(VR3), I(VR4),I(VR5) .PRINT AC I(VR1), I(VR2), I(VR3), I(VR4),I(VR5) .END ngspice-26/tests/resistance/res_array.out0000644000265600020320000021752112264261473020263 0ustar andreasadmin No. of Data Rows : 201 No. of Data Rows : 1 Circuit: A paralled resistor array Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 0 2 0 3 0 4 0 5 0 6 0 vr5#branch 0 vr4#branch 0 vr3#branch 0 vr2#branch 0 vr1#branch 0 vin#branch 0 No. of Data Rows : 60 Node Voltage ---- ------- ---- ------- V(6) 1.000000e+00 V(5) 1.000000e+00 V(4) 1.000000e+00 V(3) 1.000000e+00 V(2) 1.000000e+00 V(1) 1.000000e+00 Source Current ------ ------- vin#branch -5.90909e-04 vr1#branch 1.000000e-04 vr2#branch 1.000000e-04 vr3#branch 9.090909e-05 vr4#branch 2.000000e-04 vr5#branch 1.000000e-04 Resistor models (Simple linear resistor) model rmodel1 R rsh 1000 0 narrow 1e-06 0 short 0 0 tc1 0 0 tc2 0 0 defw 1e-05 1e-05 kf 0 0 af 0 0 Resistor: Simple linear resistor device r3 r5 r4 model rmodel1 R R resistance 11000 10 5000 ac 2500 5 2500 dtemp 0 0 0 noisy 1 1 1 i -5.3435e-05 -5.87785e-05 -0.000117557 p 3.14083e-05 3.45492e-05 6.90983e-05 Resistor: Simple linear resistor device r2 r1 model R R resistance 10000 10000 ac 5000 10000 dtemp 0 0 noisy 1 1 i -5.87785e-05 -5.87785e-05 p 3.45492e-05 3.45492e-05 Vsource: Independent voltage source device vr5 vr4 vr3 dc 0 0 0 acmag 0 0 0 i -5.87785e-05 -0.000117557 -5.3435e-05 p 0 0 0 Vsource: Independent voltage source device vr2 vr1 vin dc 0 0 1 acmag 0 0 1 i -5.87785e-05 -5.87785e-05 0.000347328 p 0 0 0.000204154 A paralled resistor array -------------------------------------------------------------------------------- Index time vr1#branch vr2#branch vr3#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00 1 5.000000e-13 0.000000e+00 0.000000e+00 0.000000e+00 2 1.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 3 2.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 4 4.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 5 8.000000e-12 0.000000e+00 0.000000e+00 0.000000e+00 6 1.600000e-11 0.000000e+00 0.000000e+00 0.000000e+00 7 3.200000e-11 0.000000e+00 0.000000e+00 0.000000e+00 8 6.400000e-11 0.000000e+00 0.000000e+00 0.000000e+00 9 1.280000e-10 0.000000e+00 0.000000e+00 0.000000e+00 10 2.560000e-10 0.000000e+00 0.000000e+00 0.000000e+00 11 4.560000e-10 0.000000e+00 0.000000e+00 0.000000e+00 12 6.560000e-10 0.000000e+00 0.000000e+00 0.000000e+00 13 8.560000e-10 0.000000e+00 0.000000e+00 0.000000e+00 14 1.056000e-09 3.517858e-06 3.517858e-06 3.198053e-06 15 1.256000e-09 1.601568e-05 1.601568e-05 1.455971e-05 16 1.456000e-09 2.826093e-05 2.826093e-05 2.569176e-05 17 1.656000e-09 4.006049e-05 4.006049e-05 3.641863e-05 18 1.856000e-09 5.122827e-05 5.122827e-05 4.657116e-05 19 2.056000e-09 6.158815e-05 6.158815e-05 5.598923e-05 20 2.256000e-09 7.097675e-05 7.097675e-05 6.452432e-05 21 2.456000e-09 7.924600e-05 7.924600e-05 7.204182e-05 22 2.656000e-09 8.626549e-05 8.626549e-05 7.842318e-05 23 2.856000e-09 9.192453e-05 9.192453e-05 8.356776e-05 24 3.056000e-09 9.613386e-05 9.613386e-05 8.739442e-05 25 3.256000e-09 9.882711e-05 9.882711e-05 8.984282e-05 26 3.456000e-09 9.996179e-05 9.996179e-05 9.087435e-05 27 3.656000e-09 9.952001e-05 9.952001e-05 9.047274e-05 28 3.856000e-09 9.750874e-05 9.750874e-05 8.864431e-05 29 4.056000e-09 9.395971e-05 9.395971e-05 8.541792e-05 30 4.256000e-09 8.892887e-05 8.892887e-05 8.084443e-05 31 4.456000e-09 8.249557e-05 8.249557e-05 7.499597e-05 32 4.656000e-09 7.476127e-05 7.476127e-05 6.796479e-05 33 4.856000e-09 6.584793e-05 6.584793e-05 5.986176e-05 34 5.056000e-09 5.589614e-05 5.589614e-05 5.081467e-05 35 5.256000e-09 4.506283e-05 4.506283e-05 4.096621e-05 36 5.456000e-09 3.351885e-05 3.351885e-05 3.047168e-05 37 5.656000e-09 2.144626e-05 2.144626e-05 1.949660e-05 38 5.856000e-09 9.035447e-06 9.035447e-06 8.214043e-06 39 6.056000e-09 -3.517858e-06 -3.517858e-06 -3.198053e-06 40 6.256000e-09 -1.601568e-05 -1.601568e-05 -1.455971e-05 41 6.456000e-09 -2.826093e-05 -2.826093e-05 -2.569176e-05 42 6.656000e-09 -4.006049e-05 -4.006049e-05 -3.641863e-05 43 6.856000e-09 -5.122827e-05 -5.122827e-05 -4.657116e-05 44 7.056000e-09 -6.158815e-05 -6.158815e-05 -5.598923e-05 45 7.256000e-09 -7.097675e-05 -7.097675e-05 -6.452432e-05 46 7.456000e-09 -7.924600e-05 -7.924600e-05 -7.204182e-05 47 7.656000e-09 -8.626549e-05 -8.626549e-05 -7.842318e-05 48 7.856000e-09 -9.192453e-05 -9.192453e-05 -8.356776e-05 49 8.056000e-09 -9.613386e-05 -9.613386e-05 -8.739442e-05 50 8.256000e-09 -9.882711e-05 -9.882711e-05 -8.984282e-05 51 8.456000e-09 -9.996179e-05 -9.996179e-05 -9.087435e-05 52 8.656000e-09 -9.952001e-05 -9.952001e-05 -9.047274e-05 53 8.856000e-09 -9.750874e-05 -9.750874e-05 -8.864431e-05 54 9.056000e-09 -9.395971e-05 -9.395971e-05 -8.541792e-05 Index time vr1#branch vr2#branch vr3#branch -------------------------------------------------------------------------------- 55 9.256000e-09 -8.892887e-05 -8.892887e-05 -8.084443e-05 56 9.456000e-09 -8.249557e-05 -8.249557e-05 -7.499597e-05 57 9.656000e-09 -7.476127e-05 -7.476127e-05 -6.796479e-05 58 9.856000e-09 -6.584793e-05 -6.584793e-05 -5.986176e-05 59 1.000000e-08 -5.877853e-05 -5.877853e-05 -5.343502e-05 A paralled resistor array -------------------------------------------------------------------------------- Index time vr4#branch vr5#branch -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 5.000000e-13 0.000000e+00 0.000000e+00 2 1.000000e-12 0.000000e+00 0.000000e+00 3 2.000000e-12 0.000000e+00 0.000000e+00 4 4.000000e-12 0.000000e+00 0.000000e+00 5 8.000000e-12 0.000000e+00 0.000000e+00 6 1.600000e-11 0.000000e+00 0.000000e+00 7 3.200000e-11 0.000000e+00 0.000000e+00 8 6.400000e-11 0.000000e+00 0.000000e+00 9 1.280000e-10 0.000000e+00 0.000000e+00 10 2.560000e-10 0.000000e+00 0.000000e+00 11 4.560000e-10 0.000000e+00 0.000000e+00 12 6.560000e-10 0.000000e+00 0.000000e+00 13 8.560000e-10 0.000000e+00 0.000000e+00 14 1.056000e-09 7.035716e-06 3.517858e-06 15 1.256000e-09 3.203137e-05 1.601568e-05 16 1.456000e-09 5.652187e-05 2.826093e-05 17 1.656000e-09 8.012098e-05 4.006049e-05 18 1.856000e-09 1.024565e-04 5.122827e-05 19 2.056000e-09 1.231763e-04 6.158815e-05 20 2.256000e-09 1.419535e-04 7.097675e-05 21 2.456000e-09 1.584920e-04 7.924600e-05 22 2.656000e-09 1.725310e-04 8.626549e-05 23 2.856000e-09 1.838491e-04 9.192453e-05 24 3.056000e-09 1.922677e-04 9.613386e-05 25 3.256000e-09 1.976542e-04 9.882711e-05 26 3.456000e-09 1.999236e-04 9.996179e-05 27 3.656000e-09 1.990400e-04 9.952001e-05 28 3.856000e-09 1.950175e-04 9.750874e-05 29 4.056000e-09 1.879194e-04 9.395971e-05 30 4.256000e-09 1.778577e-04 8.892887e-05 31 4.456000e-09 1.649911e-04 8.249557e-05 32 4.656000e-09 1.495225e-04 7.476127e-05 33 4.856000e-09 1.316959e-04 6.584793e-05 34 5.056000e-09 1.117923e-04 5.589614e-05 35 5.256000e-09 9.012565e-05 4.506283e-05 36 5.456000e-09 6.703770e-05 3.351885e-05 37 5.656000e-09 4.289252e-05 2.144626e-05 38 5.856000e-09 1.807089e-05 9.035447e-06 39 6.056000e-09 -7.035716e-06 -3.517858e-06 40 6.256000e-09 -3.203137e-05 -1.601568e-05 41 6.456000e-09 -5.652187e-05 -2.826093e-05 42 6.656000e-09 -8.012098e-05 -4.006049e-05 43 6.856000e-09 -1.024565e-04 -5.122827e-05 44 7.056000e-09 -1.231763e-04 -6.158815e-05 45 7.256000e-09 -1.419535e-04 -7.097675e-05 46 7.456000e-09 -1.584920e-04 -7.924600e-05 47 7.656000e-09 -1.725310e-04 -8.626549e-05 48 7.856000e-09 -1.838491e-04 -9.192453e-05 49 8.056000e-09 -1.922677e-04 -9.613386e-05 50 8.256000e-09 -1.976542e-04 -9.882711e-05 51 8.456000e-09 -1.999236e-04 -9.996179e-05 52 8.656000e-09 -1.990400e-04 -9.952001e-05 53 8.856000e-09 -1.950175e-04 -9.750874e-05 54 9.056000e-09 -1.879194e-04 -9.395971e-05 Index time vr4#branch vr5#branch -------------------------------------------------------------------------------- 55 9.256000e-09 -1.778577e-04 -8.892887e-05 56 9.456000e-09 -1.649911e-04 -8.249557e-05 57 9.656000e-09 -1.495225e-04 -7.476127e-05 58 9.856000e-09 -1.316959e-04 -6.584793e-05 59 1.000000e-08 -1.175571e-04 -5.877853e-05 A paralled resistor array -------------------------------------------------------------------------------- Index frequency vr1#branch -------------------------------------------------------------------------------- 0 1.000000e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 1 1.023293e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 2 1.047129e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 3 1.071519e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 4 1.096478e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 5 1.122018e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 6 1.148154e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 7 1.174898e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 8 1.202264e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 9 1.230269e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 10 1.258925e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 11 1.288250e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 12 1.318257e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 13 1.348963e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 14 1.380384e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 15 1.412538e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 16 1.445440e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 17 1.479108e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 18 1.513561e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 19 1.548817e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 20 1.584893e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 21 1.621810e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 22 1.659587e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 23 1.698244e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 24 1.737801e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 25 1.778279e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 26 1.819701e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 27 1.862087e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 28 1.905461e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 29 1.949845e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 30 1.995262e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 31 2.041738e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 32 2.089296e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 33 2.137962e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 34 2.187762e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 35 2.238721e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 36 2.290868e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 37 2.344229e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 38 2.398833e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 39 2.454709e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 40 2.511886e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 41 2.570396e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 42 2.630268e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 43 2.691535e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 44 2.754229e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 45 2.818383e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 46 2.884032e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 47 2.951209e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 48 3.019952e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 49 3.090295e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 50 3.162278e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 51 3.235937e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 52 3.311311e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 53 3.388442e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 54 3.467369e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 Index frequency vr1#branch -------------------------------------------------------------------------------- 55 3.548134e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 56 3.630781e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 57 3.715352e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 58 3.801894e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 59 3.890451e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 60 3.981072e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 61 4.073803e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 62 4.168694e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 63 4.265795e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 64 4.365158e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 65 4.466836e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 66 4.570882e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 67 4.677351e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 68 4.786301e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 69 4.897788e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 70 5.011872e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 71 5.128614e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 72 5.248075e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 73 5.370318e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 74 5.495409e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 75 5.623413e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 76 5.754399e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 77 5.888437e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 78 6.025596e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 79 6.165950e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 80 6.309573e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 81 6.456542e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 82 6.606934e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 83 6.760830e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 84 6.918310e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 85 7.079458e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 86 7.244360e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 87 7.413102e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 88 7.585776e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 89 7.762471e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 90 7.943282e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 91 8.128305e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 92 8.317638e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 93 8.511380e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 94 8.709636e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 95 8.912509e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 96 9.120108e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 97 9.332543e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 98 9.549926e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 99 9.772372e+06, 0.000000e+00 1.000000e-04, 0.000000e+00 100 1.000000e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 101 1.023293e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 102 1.047129e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 103 1.071519e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 104 1.096478e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 105 1.122018e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 106 1.148154e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 107 1.174898e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 108 1.202264e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 109 1.230269e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 110 1.258925e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 111 1.288250e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 112 1.318257e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 Index frequency vr1#branch -------------------------------------------------------------------------------- 113 1.348963e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 114 1.380384e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 115 1.412538e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 116 1.445440e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 117 1.479108e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 118 1.513561e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 119 1.548817e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 120 1.584893e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 121 1.621810e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 122 1.659587e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 123 1.698244e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 124 1.737801e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 125 1.778279e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 126 1.819701e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 127 1.862087e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 128 1.905461e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 129 1.949845e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 130 1.995262e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 131 2.041738e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 132 2.089296e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 133 2.137962e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 134 2.187762e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 135 2.238721e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 136 2.290868e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 137 2.344229e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 138 2.398833e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 139 2.454709e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 140 2.511886e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 141 2.570396e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 142 2.630268e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 143 2.691535e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 144 2.754229e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 145 2.818383e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 146 2.884032e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 147 2.951209e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 148 3.019952e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 149 3.090295e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 150 3.162278e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 151 3.235937e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 152 3.311311e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 153 3.388442e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 154 3.467369e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 155 3.548134e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 156 3.630781e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 157 3.715352e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 158 3.801894e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 159 3.890451e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 160 3.981072e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 161 4.073803e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 162 4.168694e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 163 4.265795e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 164 4.365158e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 165 4.466836e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 166 4.570882e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 167 4.677351e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 168 4.786301e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 169 4.897788e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 170 5.011872e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 Index frequency vr1#branch -------------------------------------------------------------------------------- 171 5.128614e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 172 5.248075e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 173 5.370318e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 174 5.495409e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 175 5.623413e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 176 5.754399e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 177 5.888437e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 178 6.025596e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 179 6.165950e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 180 6.309573e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 181 6.456542e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 182 6.606934e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 183 6.760830e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 184 6.918310e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 185 7.079458e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 186 7.244360e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 187 7.413102e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 188 7.585776e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 189 7.762471e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 190 7.943282e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 191 8.128305e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 192 8.317638e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 193 8.511380e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 194 8.709636e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 195 8.912509e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 196 9.120108e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 197 9.332543e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 198 9.549926e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 199 9.772372e+07, 0.000000e+00 1.000000e-04, 0.000000e+00 200 1.000000e+08, 0.000000e+00 1.000000e-04, 0.000000e+00 A paralled resistor array -------------------------------------------------------------------------------- Index frequency vr2#branch -------------------------------------------------------------------------------- 0 1.000000e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 1 1.023293e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 2 1.047129e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 3 1.071519e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 4 1.096478e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 5 1.122018e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 6 1.148154e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 7 1.174898e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 8 1.202264e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 9 1.230269e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 10 1.258925e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 11 1.288250e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 12 1.318257e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 13 1.348963e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 14 1.380384e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 15 1.412538e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 16 1.445440e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 17 1.479108e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 18 1.513561e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 19 1.548817e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 20 1.584893e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 21 1.621810e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 22 1.659587e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 23 1.698244e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 24 1.737801e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 25 1.778279e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 26 1.819701e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 27 1.862087e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 28 1.905461e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 29 1.949845e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 30 1.995262e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 31 2.041738e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 32 2.089296e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 33 2.137962e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 34 2.187762e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 35 2.238721e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 36 2.290868e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 37 2.344229e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 38 2.398833e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 39 2.454709e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 40 2.511886e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 41 2.570396e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 42 2.630268e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 43 2.691535e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 44 2.754229e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 45 2.818383e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 46 2.884032e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 47 2.951209e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 48 3.019952e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 49 3.090295e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 50 3.162278e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 51 3.235937e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 52 3.311311e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 53 3.388442e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 54 3.467369e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr2#branch -------------------------------------------------------------------------------- 55 3.548134e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 56 3.630781e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 57 3.715352e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 58 3.801894e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 59 3.890451e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 60 3.981072e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 61 4.073803e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 62 4.168694e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 63 4.265795e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 64 4.365158e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 65 4.466836e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 66 4.570882e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 67 4.677351e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 68 4.786301e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 69 4.897788e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 70 5.011872e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 71 5.128614e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 72 5.248075e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 73 5.370318e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 74 5.495409e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 75 5.623413e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 76 5.754399e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 77 5.888437e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 78 6.025596e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 79 6.165950e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 80 6.309573e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 81 6.456542e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 82 6.606934e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 83 6.760830e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 84 6.918310e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 85 7.079458e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 86 7.244360e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 87 7.413102e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 88 7.585776e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 89 7.762471e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 90 7.943282e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 91 8.128305e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 92 8.317638e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 93 8.511380e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 94 8.709636e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 95 8.912509e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 96 9.120108e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 97 9.332543e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 98 9.549926e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 99 9.772372e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 100 1.000000e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 101 1.023293e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 102 1.047129e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 103 1.071519e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 104 1.096478e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 105 1.122018e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 106 1.148154e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 107 1.174898e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 108 1.202264e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 109 1.230269e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 110 1.258925e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 111 1.288250e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 112 1.318257e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr2#branch -------------------------------------------------------------------------------- 113 1.348963e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 114 1.380384e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 115 1.412538e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 116 1.445440e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 117 1.479108e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 118 1.513561e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 119 1.548817e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 120 1.584893e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 121 1.621810e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 122 1.659587e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 123 1.698244e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 124 1.737801e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 125 1.778279e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 126 1.819701e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 127 1.862087e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 128 1.905461e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 129 1.949845e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 130 1.995262e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 131 2.041738e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 132 2.089296e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 133 2.137962e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 134 2.187762e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 135 2.238721e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 136 2.290868e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 137 2.344229e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 138 2.398833e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 139 2.454709e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 140 2.511886e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 141 2.570396e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 142 2.630268e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 143 2.691535e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 144 2.754229e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 145 2.818383e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 146 2.884032e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 147 2.951209e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 148 3.019952e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 149 3.090295e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 150 3.162278e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 151 3.235937e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 152 3.311311e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 153 3.388442e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 154 3.467369e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 155 3.548134e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 156 3.630781e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 157 3.715352e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 158 3.801894e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 159 3.890451e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 160 3.981072e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 161 4.073803e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 162 4.168694e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 163 4.265795e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 164 4.365158e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 165 4.466836e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 166 4.570882e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 167 4.677351e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 168 4.786301e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 169 4.897788e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 170 5.011872e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr2#branch -------------------------------------------------------------------------------- 171 5.128614e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 172 5.248075e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 173 5.370318e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 174 5.495409e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 175 5.623413e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 176 5.754399e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 177 5.888437e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 178 6.025596e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 179 6.165950e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 180 6.309573e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 181 6.456542e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 182 6.606934e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 183 6.760830e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 184 6.918310e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 185 7.079458e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 186 7.244360e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 187 7.413102e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 188 7.585776e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 189 7.762471e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 190 7.943282e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 191 8.128305e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 192 8.317638e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 193 8.511380e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 194 8.709636e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 195 8.912509e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 196 9.120108e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 197 9.332543e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 198 9.549926e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 199 9.772372e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 200 1.000000e+08, 0.000000e+00 2.000000e-04, 0.000000e+00 A paralled resistor array -------------------------------------------------------------------------------- Index frequency vr3#branch -------------------------------------------------------------------------------- 0 1.000000e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 1 1.023293e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 2 1.047129e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 3 1.071519e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 4 1.096478e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 5 1.122018e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 6 1.148154e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 7 1.174898e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 8 1.202264e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 9 1.230269e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 10 1.258925e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 11 1.288250e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 12 1.318257e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 13 1.348963e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 14 1.380384e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 15 1.412538e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 16 1.445440e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 17 1.479108e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 18 1.513561e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 19 1.548817e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 20 1.584893e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 21 1.621810e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 22 1.659587e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 23 1.698244e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 24 1.737801e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 25 1.778279e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 26 1.819701e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 27 1.862087e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 28 1.905461e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 29 1.949845e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 30 1.995262e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 31 2.041738e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 32 2.089296e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 33 2.137962e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 34 2.187762e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 35 2.238721e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 36 2.290868e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 37 2.344229e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 38 2.398833e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 39 2.454709e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 40 2.511886e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 41 2.570396e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 42 2.630268e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 43 2.691535e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 44 2.754229e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 45 2.818383e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 46 2.884032e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 47 2.951209e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 48 3.019952e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 49 3.090295e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 50 3.162278e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 51 3.235937e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 52 3.311311e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 53 3.388442e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 54 3.467369e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr3#branch -------------------------------------------------------------------------------- 55 3.548134e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 56 3.630781e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 57 3.715352e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 58 3.801894e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 59 3.890451e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 60 3.981072e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 61 4.073803e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 62 4.168694e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 63 4.265795e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 64 4.365158e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 65 4.466836e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 66 4.570882e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 67 4.677351e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 68 4.786301e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 69 4.897788e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 70 5.011872e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 71 5.128614e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 72 5.248075e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 73 5.370318e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 74 5.495409e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 75 5.623413e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 76 5.754399e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 77 5.888437e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 78 6.025596e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 79 6.165950e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 80 6.309573e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 81 6.456542e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 82 6.606934e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 83 6.760830e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 84 6.918310e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 85 7.079458e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 86 7.244360e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 87 7.413102e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 88 7.585776e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 89 7.762471e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 90 7.943282e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 91 8.128305e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 92 8.317638e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 93 8.511380e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 94 8.709636e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 95 8.912509e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 96 9.120108e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 97 9.332543e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 98 9.549926e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 99 9.772372e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 100 1.000000e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 101 1.023293e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 102 1.047129e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 103 1.071519e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 104 1.096478e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 105 1.122018e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 106 1.148154e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 107 1.174898e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 108 1.202264e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 109 1.230269e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 110 1.258925e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 111 1.288250e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 112 1.318257e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr3#branch -------------------------------------------------------------------------------- 113 1.348963e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 114 1.380384e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 115 1.412538e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 116 1.445440e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 117 1.479108e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 118 1.513561e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 119 1.548817e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 120 1.584893e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 121 1.621810e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 122 1.659587e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 123 1.698244e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 124 1.737801e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 125 1.778279e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 126 1.819701e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 127 1.862087e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 128 1.905461e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 129 1.949845e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 130 1.995262e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 131 2.041738e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 132 2.089296e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 133 2.137962e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 134 2.187762e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 135 2.238721e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 136 2.290868e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 137 2.344229e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 138 2.398833e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 139 2.454709e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 140 2.511886e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 141 2.570396e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 142 2.630268e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 143 2.691535e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 144 2.754229e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 145 2.818383e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 146 2.884032e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 147 2.951209e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 148 3.019952e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 149 3.090295e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 150 3.162278e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 151 3.235937e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 152 3.311311e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 153 3.388442e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 154 3.467369e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 155 3.548134e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 156 3.630781e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 157 3.715352e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 158 3.801894e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 159 3.890451e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 160 3.981072e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 161 4.073803e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 162 4.168694e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 163 4.265795e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 164 4.365158e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 165 4.466836e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 166 4.570882e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 167 4.677351e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 168 4.786301e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 169 4.897788e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 170 5.011872e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr3#branch -------------------------------------------------------------------------------- 171 5.128614e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 172 5.248075e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 173 5.370318e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 174 5.495409e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 175 5.623413e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 176 5.754399e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 177 5.888437e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 178 6.025596e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 179 6.165950e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 180 6.309573e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 181 6.456542e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 182 6.606934e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 183 6.760830e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 184 6.918310e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 185 7.079458e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 186 7.244360e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 187 7.413102e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 188 7.585776e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 189 7.762471e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 190 7.943282e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 191 8.128305e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 192 8.317638e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 193 8.511380e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 194 8.709636e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 195 8.912509e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 196 9.120108e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 197 9.332543e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 198 9.549926e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 199 9.772372e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 200 1.000000e+08, 0.000000e+00 4.000000e-04, 0.000000e+00 A paralled resistor array -------------------------------------------------------------------------------- Index frequency vr4#branch -------------------------------------------------------------------------------- 0 1.000000e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 1 1.023293e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 2 1.047129e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 3 1.071519e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 4 1.096478e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 5 1.122018e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 6 1.148154e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 7 1.174898e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 8 1.202264e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 9 1.230269e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 10 1.258925e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 11 1.288250e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 12 1.318257e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 13 1.348963e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 14 1.380384e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 15 1.412538e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 16 1.445440e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 17 1.479108e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 18 1.513561e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 19 1.548817e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 20 1.584893e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 21 1.621810e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 22 1.659587e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 23 1.698244e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 24 1.737801e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 25 1.778279e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 26 1.819701e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 27 1.862087e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 28 1.905461e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 29 1.949845e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 30 1.995262e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 31 2.041738e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 32 2.089296e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 33 2.137962e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 34 2.187762e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 35 2.238721e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 36 2.290868e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 37 2.344229e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 38 2.398833e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 39 2.454709e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 40 2.511886e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 41 2.570396e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 42 2.630268e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 43 2.691535e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 44 2.754229e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 45 2.818383e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 46 2.884032e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 47 2.951209e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 48 3.019952e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 49 3.090295e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 50 3.162278e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 51 3.235937e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 52 3.311311e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 53 3.388442e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 54 3.467369e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr4#branch -------------------------------------------------------------------------------- 55 3.548134e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 56 3.630781e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 57 3.715352e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 58 3.801894e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 59 3.890451e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 60 3.981072e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 61 4.073803e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 62 4.168694e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 63 4.265795e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 64 4.365158e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 65 4.466836e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 66 4.570882e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 67 4.677351e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 68 4.786301e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 69 4.897788e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 70 5.011872e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 71 5.128614e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 72 5.248075e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 73 5.370318e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 74 5.495409e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 75 5.623413e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 76 5.754399e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 77 5.888437e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 78 6.025596e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 79 6.165950e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 80 6.309573e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 81 6.456542e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 82 6.606934e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 83 6.760830e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 84 6.918310e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 85 7.079458e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 86 7.244360e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 87 7.413102e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 88 7.585776e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 89 7.762471e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 90 7.943282e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 91 8.128305e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 92 8.317638e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 93 8.511380e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 94 8.709636e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 95 8.912509e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 96 9.120108e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 97 9.332543e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 98 9.549926e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 99 9.772372e+06, 0.000000e+00 4.000000e-04, 0.000000e+00 100 1.000000e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 101 1.023293e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 102 1.047129e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 103 1.071519e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 104 1.096478e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 105 1.122018e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 106 1.148154e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 107 1.174898e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 108 1.202264e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 109 1.230269e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 110 1.258925e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 111 1.288250e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 112 1.318257e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr4#branch -------------------------------------------------------------------------------- 113 1.348963e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 114 1.380384e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 115 1.412538e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 116 1.445440e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 117 1.479108e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 118 1.513561e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 119 1.548817e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 120 1.584893e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 121 1.621810e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 122 1.659587e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 123 1.698244e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 124 1.737801e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 125 1.778279e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 126 1.819701e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 127 1.862087e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 128 1.905461e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 129 1.949845e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 130 1.995262e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 131 2.041738e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 132 2.089296e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 133 2.137962e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 134 2.187762e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 135 2.238721e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 136 2.290868e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 137 2.344229e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 138 2.398833e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 139 2.454709e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 140 2.511886e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 141 2.570396e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 142 2.630268e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 143 2.691535e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 144 2.754229e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 145 2.818383e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 146 2.884032e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 147 2.951209e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 148 3.019952e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 149 3.090295e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 150 3.162278e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 151 3.235937e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 152 3.311311e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 153 3.388442e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 154 3.467369e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 155 3.548134e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 156 3.630781e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 157 3.715352e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 158 3.801894e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 159 3.890451e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 160 3.981072e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 161 4.073803e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 162 4.168694e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 163 4.265795e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 164 4.365158e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 165 4.466836e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 166 4.570882e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 167 4.677351e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 168 4.786301e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 169 4.897788e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 170 5.011872e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 Index frequency vr4#branch -------------------------------------------------------------------------------- 171 5.128614e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 172 5.248075e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 173 5.370318e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 174 5.495409e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 175 5.623413e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 176 5.754399e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 177 5.888437e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 178 6.025596e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 179 6.165950e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 180 6.309573e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 181 6.456542e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 182 6.606934e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 183 6.760830e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 184 6.918310e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 185 7.079458e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 186 7.244360e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 187 7.413102e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 188 7.585776e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 189 7.762471e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 190 7.943282e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 191 8.128305e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 192 8.317638e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 193 8.511380e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 194 8.709636e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 195 8.912509e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 196 9.120108e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 197 9.332543e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 198 9.549926e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 199 9.772372e+07, 0.000000e+00 4.000000e-04, 0.000000e+00 200 1.000000e+08, 0.000000e+00 4.000000e-04, 0.000000e+00 A paralled resistor array -------------------------------------------------------------------------------- Index frequency vr5#branch -------------------------------------------------------------------------------- 0 1.000000e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 1 1.023293e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 2 1.047129e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 3 1.071519e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 4 1.096478e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 5 1.122018e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 6 1.148154e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 7 1.174898e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 8 1.202264e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 9 1.230269e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 10 1.258925e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 11 1.288250e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 12 1.318257e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 13 1.348963e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 14 1.380384e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 15 1.412538e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 16 1.445440e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 17 1.479108e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 18 1.513561e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 19 1.548817e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 20 1.584893e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 21 1.621810e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 22 1.659587e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 23 1.698244e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 24 1.737801e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 25 1.778279e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 26 1.819701e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 27 1.862087e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 28 1.905461e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 29 1.949845e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 30 1.995262e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 31 2.041738e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 32 2.089296e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 33 2.137962e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 34 2.187762e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 35 2.238721e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 36 2.290868e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 37 2.344229e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 38 2.398833e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 39 2.454709e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 40 2.511886e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 41 2.570396e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 42 2.630268e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 43 2.691535e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 44 2.754229e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 45 2.818383e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 46 2.884032e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 47 2.951209e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 48 3.019952e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 49 3.090295e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 50 3.162278e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 51 3.235937e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 52 3.311311e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 53 3.388442e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 54 3.467369e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr5#branch -------------------------------------------------------------------------------- 55 3.548134e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 56 3.630781e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 57 3.715352e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 58 3.801894e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 59 3.890451e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 60 3.981072e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 61 4.073803e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 62 4.168694e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 63 4.265795e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 64 4.365158e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 65 4.466836e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 66 4.570882e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 67 4.677351e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 68 4.786301e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 69 4.897788e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 70 5.011872e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 71 5.128614e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 72 5.248075e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 73 5.370318e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 74 5.495409e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 75 5.623413e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 76 5.754399e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 77 5.888437e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 78 6.025596e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 79 6.165950e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 80 6.309573e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 81 6.456542e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 82 6.606934e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 83 6.760830e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 84 6.918310e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 85 7.079458e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 86 7.244360e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 87 7.413102e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 88 7.585776e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 89 7.762471e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 90 7.943282e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 91 8.128305e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 92 8.317638e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 93 8.511380e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 94 8.709636e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 95 8.912509e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 96 9.120108e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 97 9.332543e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 98 9.549926e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 99 9.772372e+06, 0.000000e+00 2.000000e-04, 0.000000e+00 100 1.000000e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 101 1.023293e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 102 1.047129e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 103 1.071519e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 104 1.096478e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 105 1.122018e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 106 1.148154e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 107 1.174898e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 108 1.202264e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 109 1.230269e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 110 1.258925e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 111 1.288250e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 112 1.318257e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr5#branch -------------------------------------------------------------------------------- 113 1.348963e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 114 1.380384e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 115 1.412538e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 116 1.445440e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 117 1.479108e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 118 1.513561e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 119 1.548817e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 120 1.584893e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 121 1.621810e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 122 1.659587e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 123 1.698244e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 124 1.737801e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 125 1.778279e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 126 1.819701e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 127 1.862087e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 128 1.905461e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 129 1.949845e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 130 1.995262e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 131 2.041738e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 132 2.089296e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 133 2.137962e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 134 2.187762e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 135 2.238721e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 136 2.290868e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 137 2.344229e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 138 2.398833e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 139 2.454709e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 140 2.511886e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 141 2.570396e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 142 2.630268e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 143 2.691535e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 144 2.754229e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 145 2.818383e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 146 2.884032e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 147 2.951209e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 148 3.019952e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 149 3.090295e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 150 3.162278e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 151 3.235937e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 152 3.311311e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 153 3.388442e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 154 3.467369e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 155 3.548134e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 156 3.630781e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 157 3.715352e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 158 3.801894e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 159 3.890451e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 160 3.981072e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 161 4.073803e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 162 4.168694e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 163 4.265795e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 164 4.365158e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 165 4.466836e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 166 4.570882e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 167 4.677351e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 168 4.786301e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 169 4.897788e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 170 5.011872e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 Index frequency vr5#branch -------------------------------------------------------------------------------- 171 5.128614e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 172 5.248075e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 173 5.370318e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 174 5.495409e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 175 5.623413e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 176 5.754399e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 177 5.888437e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 178 6.025596e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 179 6.165950e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 180 6.309573e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 181 6.456542e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 182 6.606934e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 183 6.760830e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 184 6.918310e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 185 7.079458e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 186 7.244360e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 187 7.413102e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 188 7.585776e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 189 7.762471e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 190 7.943282e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 191 8.128305e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 192 8.317638e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 193 8.511380e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 194 8.709636e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 195 8.912509e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 196 9.120108e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 197 9.332543e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 198 9.549926e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 199 9.772372e+07, 0.000000e+00 2.000000e-04, 0.000000e+00 200 1.000000e+08, 0.000000e+00 2.000000e-04, 0.000000e+00 ngspice-26/tests/resistance/res_simple.cir0000644000265600020320000000016712264261473020400 0ustar andreasadminA simple resistor with a voltage source R1 1 0 10k V1 1 0 DC 1 .options noacct .TRAN 1ns 6ns .PRINT TRAN I(V1) .END ngspice-26/tests/resistance/res_partition.out0000644000265600020320000001013312264261473021144 0ustar andreasadmin No. of Data Rows : 41 No. of Data Rows : 1 Circuit: * Resistive partition with different ratios for AC/DC (Print V(2)) Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Node Voltage ---- ------- ---- ------- V(2) 5.000000e-01 V(1) 1.000000e+00 Source Current ------ ------- vin#branch -1.00000e-04 Resistor models (Simple linear resistor) model R rsh 0 narrow 0 short 0 tc1 0 tc2 0 defw 1e-05 kf 0 af 0 Resistor: Simple linear resistor device r2 r1 model R R resistance 5000 5000 ac 15000 5000 dtemp 0 0 noisy 1 1 i 0.0001 0.0001 p 5e-05 5e-05 Vsource: Independent voltage source device vin dc 1 acmag 1 i -0.0001 p 0.0001 * Resistive partition with different ratios for AC/DC (Print V(2)) -------------------------------------------------------------------------------- Index frequency v(2) -------------------------------------------------------------------------------- 0 1.000000e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 1 1.258925e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 2 1.584893e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 3 1.995262e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 4 2.511886e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 5 3.162278e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 6 3.981072e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 7 5.011872e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 8 6.309573e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 9 7.943282e+00, 0.000000e+00 7.500000e-01, 0.000000e+00 10 1.000000e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 11 1.258925e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 12 1.584893e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 13 1.995262e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 14 2.511886e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 15 3.162278e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 16 3.981072e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 17 5.011872e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 18 6.309573e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 19 7.943282e+01, 0.000000e+00 7.500000e-01, 0.000000e+00 20 1.000000e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 21 1.258925e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 22 1.584893e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 23 1.995262e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 24 2.511886e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 25 3.162278e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 26 3.981072e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 27 5.011872e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 28 6.309573e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 29 7.943282e+02, 0.000000e+00 7.500000e-01, 0.000000e+00 30 1.000000e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 31 1.258925e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 32 1.584893e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 33 1.995262e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 34 2.511886e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 35 3.162278e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 36 3.981072e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 37 5.011872e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 38 6.309573e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 39 7.943282e+03, 0.000000e+00 7.500000e-01, 0.000000e+00 40 1.000000e+04, 0.000000e+00 7.500000e-01, 0.000000e+00 ngspice-26/tests/resistance/res_partition.cir0000644000265600020320000000025712264261473021120 0ustar andreasadmin* Resistive partition with different ratios for AC/DC (Print V(2)) vin 1 0 DC 1V AC 1V r1 1 2 5K r2 2 0 5K ac=15k .options noacct .OP .AC DEC 10 1 10K .print ac v(2) .END ngspice-26/tests/resistance/res_simple.out0000644000265600020320000000507212264261473020432 0ustar andreasadmin Circuit: A simple resistor with a voltage source Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 1 v1#branch -0.0001 No. of Data Rows : 60 A simple resistor with a voltage source -------------------------------------------------------------------------------- Index time v1#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -1.000000e-04 1 3.000000e-13 -1.000000e-04 2 6.000000e-13 -1.000000e-04 3 1.200000e-12 -1.000000e-04 4 2.400000e-12 -1.000000e-04 5 4.800000e-12 -1.000000e-04 6 9.600000e-12 -1.000000e-04 7 1.920000e-11 -1.000000e-04 8 3.840000e-11 -1.000000e-04 9 7.680000e-11 -1.000000e-04 10 1.536000e-10 -1.000000e-04 11 2.736000e-10 -1.000000e-04 12 3.936000e-10 -1.000000e-04 13 5.136000e-10 -1.000000e-04 14 6.336000e-10 -1.000000e-04 15 7.536000e-10 -1.000000e-04 16 8.736000e-10 -1.000000e-04 17 9.936000e-10 -1.000000e-04 18 1.113600e-09 -1.000000e-04 19 1.233600e-09 -1.000000e-04 20 1.353600e-09 -1.000000e-04 21 1.473600e-09 -1.000000e-04 22 1.593600e-09 -1.000000e-04 23 1.713600e-09 -1.000000e-04 24 1.833600e-09 -1.000000e-04 25 1.953600e-09 -1.000000e-04 26 2.073600e-09 -1.000000e-04 27 2.193600e-09 -1.000000e-04 28 2.313600e-09 -1.000000e-04 29 2.433600e-09 -1.000000e-04 30 2.553600e-09 -1.000000e-04 31 2.673600e-09 -1.000000e-04 32 2.793600e-09 -1.000000e-04 33 2.913600e-09 -1.000000e-04 34 3.033600e-09 -1.000000e-04 35 3.153600e-09 -1.000000e-04 36 3.273600e-09 -1.000000e-04 37 3.393600e-09 -1.000000e-04 38 3.513600e-09 -1.000000e-04 39 3.633600e-09 -1.000000e-04 40 3.753600e-09 -1.000000e-04 41 3.873600e-09 -1.000000e-04 42 3.993600e-09 -1.000000e-04 43 4.113600e-09 -1.000000e-04 44 4.233600e-09 -1.000000e-04 45 4.353600e-09 -1.000000e-04 46 4.473600e-09 -1.000000e-04 47 4.593600e-09 -1.000000e-04 48 4.713600e-09 -1.000000e-04 49 4.833600e-09 -1.000000e-04 50 4.953600e-09 -1.000000e-04 51 5.073600e-09 -1.000000e-04 52 5.193600e-09 -1.000000e-04 53 5.313600e-09 -1.000000e-04 54 5.433600e-09 -1.000000e-04 Index time v1#branch -------------------------------------------------------------------------------- 55 5.553600e-09 -1.000000e-04 56 5.673600e-09 -1.000000e-04 57 5.793600e-09 -1.000000e-04 58 5.913600e-09 -1.000000e-04 59 6.000000e-09 -1.000000e-04 ngspice-26/tests/resistance/Makefile.am0000644000265600020320000000045412264261473017572 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ res_array.cir \ res_simple.cir \ res_partition.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/resistance/Makefile.in0000644000265600020320000003361312264261542017603 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/resistance DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ res_array.cir \ res_simple.cir \ res_partition.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/resistance/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/resistance/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soifd/0000755000265600020320000000000012264261714015433 5ustar andreasadminngspice-26/tests/bsim3soifd/t3.cir0000644000265600020320000000043412264261473016463 0ustar andreasadmin*model = BSIMSOI (FD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 1.5 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vd 0 3 0.01 vg 0.5 3 0.5 .print dc v(g), i(vs) .include nmosfd.mod ngspice-26/tests/bsim3soifd/lib.h0000644000265600020320000001042512264261473016356 0ustar andreasadmin .subckt dum ss mn1 ss ss ss ss ss n1 w=4u l=0.15u debug=1 AS=6p AD=6p PS=7u PD=7u .ends dum * XOR2 .subckt xnor2 dd ss sub A B out mn1 T1 A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out A C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn5 C2 T1 ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 T1 A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 T1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out A C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp5 out T1 dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends xnor2 .subckt nor2 dd ss sub A B out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor2 .subckt nand2 dd ss sub A B out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand2 .subckt nor3 dd ss sub A B C out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor3 .subckt nand3 dd ss sub A B C out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand3 .subckt nor4 dd ss sub A B C D out mn1 out A ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 out B ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 out C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A C1 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 C1 B C2 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 C2 C C3 sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 C3 C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nor4 .subckt nand4 dd ss sub A B C D out mn1 out A C1 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn2 C1 B C2 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn3 C2 C C3 sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mn4 C3 C ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out A dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp2 out B dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp3 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u mp4 out C dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends nand4 .subckt inv1 dd ss sub in out mn1 out in ss sub n1 w=4u l=0.15u AS=6p AD=6p PS=7u PD=7u mp1 out in dd sub p1 w=10u l=0.15u AS=15p AD=15p PS=13u PD=13u .ends inv1 .subckt inv5 dd ss sub in out xinv1 dd ss sub in 1 inv1 xinv2 dd ss sub 1 2 inv1 xinv3 dd ss sub 2 3 inv1 xinv4 dd ss sub 3 4 inv1 xinv5 dd ss sub 4 out inv1 .ends inv5 .subckt inv25 dd ss sub in out xinv1 dd ss sub in 1 inv5 xinv2 dd ss sub 1 2 inv5 xinv3 dd ss sub 2 3 inv5 xinv4 dd ss sub 3 4 inv5 xinv5 dd ss sub 4 out inv5 .ends inv25 .subckt inv125 dd ss sub in out xinv1 dd ss sub in 1 inv25 xinv2 dd ss sub 1 2 inv25 xinv3 dd ss sub 2 3 inv25 xinv4 dd ss sub 3 4 inv25 xinv5 dd ss sub 4 out inv25 .ends inv125 .subckt inv625 dd ss sub in out xinv1 dd ss sub in 1 inv125 xinv2 dd ss sub 1 2 inv125 xinv3 dd ss sub 2 3 inv125 xinv4 dd ss sub 3 4 inv125 xinv5 dd ss sub 4 out inv125 .ends inv625 ngspice-26/tests/bsim3soifd/t5.out0000644000265600020320000013506712264261473016532 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (FD) Error on line 3 : .model n1 nmos level= 55 tnom = 27 tox = 4.5e-09 tsi = 5e-8 tbox = 8e-08 mobmod = 0 capmod = 3 shmod = 0 paramchk=0 wint = 0 lint = -2e-08 vth0 = .52 k1 = .39 k2 = .1 k3 = 0 kb1 = .95 k3b = 2.2 nlx = 7.2e-08 dvt0 = .55 dvt1 = .28 dvt2 = -1.4 dvt0w = 0 dvt1w = 0 dvt2w = 0 nch = 3.3e+17 nsub = 1e+15 ngate = 1e+20 dvbd0 = 60.0 dvbd1 = 1.1 vbsa = 0.0 kb3 = 2.2 delp = 0.02 abp = 0.9 mxc = 0.9 adice0 = 0.93 kbjt1 = 1.0e-08 edl = .0000005 ndiode = 1.13 ntun = 14.0 isbjt = 2e-6 isdif = 1e-6 istun = 0.0 isrec = 1e-5 xbjt = 0.01 xdif = 0.01 xrec = 0.01 xtun = 0.001 u0 = 352 ua = 1.3e-11 ub = 1.7e-18 uc = -4e-10 w0 = 1.16e-06 ags = .25 a1 = 0 a2 = 1 b0 = .01 b1 = 10 rdsw = 700 prwg = 0 prwb = -.2 wr = 1 rbody = 0.0 rbsh = 0.0 a0 = 1.4 keta = -.67 vsat = 135000 dwg = 0 dwb = 0 alpha0 = 0.0 alpha1 = 1.5 beta0 = 20.5 aii = 1.2 bii = 0.1e-7 cii = 0.8 dii = 0.6 voff = -.14 nfactor = .7 cdsc = .00002 cdscb = 0 cdscd = 0 cit = 0 pclm = 2.9 pvag = 12 pdiblc1 = .18 pdiblc2 = .004 pdiblcb = -.234 drout = .2 delta = .01 eta0 = .01 etab = 0 dsub = .3 rth0 94 = .006 clc = .0000001 cle = .6 cf = 1e-20 ckappa = .6 cgdl = 1e-20 cgsl = 1e-20 kt1 = -.3 kt1l = 0 kt2 = .022 ute = -1.5 ua1 = 4.31e-09 ub1 = -7.61e-18 uc1 = -5.6e-11 prt = 760 at = 22400 cgso = 1e-10 cgdo = 1e-10 cjswg = 5e-10 tt=3e-10 asd = 0.3 csdesw = 1e-12 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (FD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 2.494471e-14 1 1.000000e-02 3.379745e-14 2 2.000000e-02 5.069440e-14 3 3.000000e-02 7.223441e-14 4 4.000000e-02 1.028941e-13 5 5.000000e-02 1.465206e-13 6 6.000000e-02 2.085781e-13 7 7.000000e-02 2.968247e-13 8 8.000000e-02 4.222715e-13 9 9.000000e-02 6.005416e-13 10 1.000000e-01 8.537934e-13 11 1.100000e-01 1.213443e-12 12 1.200000e-01 1.724013e-12 13 1.300000e-01 2.448579e-12 14 1.400000e-01 3.476459e-12 15 1.500000e-01 4.934074e-12 16 1.600000e-01 7.000174e-12 17 1.700000e-01 9.926643e-12 18 1.800000e-01 1.406935e-11 19 1.900000e-01 1.993039e-11 20 2.000000e-01 2.821752e-11 21 2.100000e-01 3.992749e-11 22 2.200000e-01 5.646278e-11 23 2.300000e-01 7.979470e-11 24 2.400000e-01 1.126909e-10 25 2.500000e-01 1.590320e-10 26 2.600000e-01 2.242515e-10 27 2.700000e-01 3.159445e-10 28 2.800000e-01 4.447080e-10 29 2.900000e-01 6.252959e-10 30 3.000000e-01 8.782006e-10 31 3.100000e-01 1.231806e-09 32 3.200000e-01 1.725301e-09 33 3.300000e-01 2.412600e-09 34 3.400000e-01 3.367565e-09 35 3.500000e-01 4.690912e-09 36 3.600000e-01 6.519232e-09 37 3.700000e-01 9.036644e-09 38 3.800000e-01 1.248962e-08 39 3.900000e-01 1.720557e-08 40 4.000000e-01 2.361569e-08 41 4.100000e-01 3.228250e-08 42 4.200000e-01 4.393235e-08 43 4.300000e-01 5.949286e-08 44 4.400000e-01 8.013501e-08 45 4.500000e-01 1.073195e-07 46 4.600000e-01 1.428466e-07 47 4.700000e-01 1.889097e-07 48 4.800000e-01 2.481514e-07 49 4.900000e-01 3.237247e-07 50 5.000000e-01 4.193583e-07 51 5.100000e-01 5.394302e-07 52 5.200000e-01 6.890472e-07 53 5.300000e-01 8.741323e-07 54 5.400000e-01 1.101512e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 1.378997e-06 56 5.600000e-01 1.715435e-06 57 5.700000e-01 2.120714e-06 58 5.800000e-01 2.605704e-06 59 5.900000e-01 3.182083e-06 60 6.000000e-01 3.862081e-06 61 6.100000e-01 4.658138e-06 62 6.200000e-01 5.582629e-06 63 6.300000e-01 6.647804e-06 64 6.400000e-01 7.865113e-06 65 6.500000e-01 9.242348e-06 66 6.600000e-01 1.078247e-05 67 6.700000e-01 1.248496e-05 68 6.800000e-01 1.434625e-05 69 6.900000e-01 1.635981e-05 70 7.000000e-01 1.851645e-05 71 7.100000e-01 2.080484e-05 72 7.200000e-01 2.321211e-05 73 7.300000e-01 2.572448e-05 74 7.400000e-01 2.832782e-05 75 7.500000e-01 3.100816e-05 76 7.600000e-01 3.375207e-05 77 7.700000e-01 3.654695e-05 78 7.800000e-01 3.938122e-05 79 7.900000e-01 4.224442e-05 80 8.000000e-01 4.512723e-05 81 8.100000e-01 4.802147e-05 82 8.200000e-01 5.092002e-05 83 8.300000e-01 5.381677e-05 84 8.400000e-01 5.670653e-05 85 8.500000e-01 5.958487e-05 86 8.600000e-01 6.244813e-05 87 8.700000e-01 6.529325e-05 88 8.800000e-01 6.811770e-05 89 8.900000e-01 7.091943e-05 90 9.000000e-01 7.369678e-05 91 9.100000e-01 7.644844e-05 92 9.200000e-01 7.917336e-05 93 9.300000e-01 8.187075e-05 94 9.400000e-01 8.454001e-05 95 9.500000e-01 8.718070e-05 96 9.600000e-01 8.979254e-05 97 9.700000e-01 9.237536e-05 98 9.800000e-01 9.492908e-05 99 9.900000e-01 9.745370e-05 100 1.000000e+00 9.994930e-05 101 1.010000e+00 1.024160e-04 102 1.020000e+00 1.048539e-04 103 1.030000e+00 1.072633e-04 104 1.040000e+00 1.096444e-04 105 1.050000e+00 1.119975e-04 106 1.060000e+00 1.143228e-04 107 1.070000e+00 1.166206e-04 108 1.080000e+00 1.188912e-04 109 1.090000e+00 1.211349e-04 110 1.100000e+00 1.233521e-04 111 1.110000e+00 1.255430e-04 112 1.120000e+00 1.277080e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 1.298474e-04 114 1.140000e+00 1.319616e-04 115 1.150000e+00 1.340507e-04 116 1.160000e+00 1.361153e-04 117 1.170000e+00 1.381556e-04 118 1.180000e+00 1.401718e-04 119 1.190000e+00 1.421644e-04 120 1.200000e+00 1.441337e-04 121 1.210000e+00 1.460799e-04 122 1.220000e+00 1.480034e-04 123 1.230000e+00 1.499044e-04 124 1.240000e+00 1.517833e-04 125 1.250000e+00 1.536404e-04 126 1.260000e+00 1.554759e-04 127 1.270000e+00 1.572902e-04 128 1.280000e+00 1.590835e-04 129 1.290000e+00 1.608561e-04 130 1.300000e+00 1.626083e-04 131 1.310000e+00 1.643403e-04 132 1.320000e+00 1.660525e-04 133 1.330000e+00 1.677451e-04 134 1.340000e+00 1.694183e-04 135 1.350000e+00 1.710724e-04 136 1.360000e+00 1.727076e-04 137 1.370000e+00 1.743243e-04 138 1.380000e+00 1.759226e-04 139 1.390000e+00 1.775028e-04 140 1.400000e+00 1.790651e-04 141 1.410000e+00 1.806098e-04 142 1.420000e+00 1.821371e-04 143 1.430000e+00 1.836472e-04 144 1.440000e+00 1.851404e-04 145 1.450000e+00 1.866168e-04 146 1.460000e+00 1.880767e-04 147 1.470000e+00 1.895202e-04 148 1.480000e+00 1.909477e-04 149 1.490000e+00 1.923593e-04 150 1.500000e+00 1.937552e-04 151 0.000000e+00 8.728369e-14 152 1.000000e-02 1.185890e-13 153 2.000000e-02 1.787169e-13 154 3.000000e-02 2.555988e-13 155 4.000000e-02 3.654283e-13 156 5.000000e-02 5.222700e-13 157 6.000000e-02 7.461674e-13 158 7.000000e-02 1.065674e-12 159 8.000000e-02 1.521448e-12 160 9.000000e-02 2.171364e-12 161 1.000000e-01 3.097759e-12 162 1.100000e-01 4.417728e-12 163 1.200000e-01 6.297701e-12 164 1.300000e-01 8.974120e-12 165 1.400000e-01 1.278269e-11 166 1.500000e-01 1.819974e-11 167 1.600000e-01 2.590033e-11 168 1.700000e-01 3.683771e-11 169 1.800000e-01 5.236104e-11 170 1.900000e-01 7.437674e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 1.055750e-10 172 2.100000e-01 1.497472e-10 173 2.200000e-01 2.122290e-10 174 2.300000e-01 3.005170e-10 175 2.400000e-01 4.251248e-10 176 2.500000e-01 6.007661e-10 177 2.600000e-01 8.479832e-10 178 2.700000e-01 1.195378e-09 179 2.800000e-01 1.682650e-09 180 2.900000e-01 2.364702e-09 181 3.000000e-01 3.317155e-09 182 3.100000e-01 4.643674e-09 183 3.200000e-01 6.485609e-09 184 3.300000e-01 9.034525e-09 185 3.400000e-01 1.254826e-08 186 3.500000e-01 1.737115e-08 187 3.600000e-01 2.395917e-08 188 3.700000e-01 3.291032e-08 189 3.800000e-01 4.500082e-08 190 3.900000e-01 6.122707e-08 191 4.000000e-01 8.285314e-08 192 4.100000e-01 1.114633e-07 193 4.200000e-01 1.490193e-07 194 4.300000e-01 1.979209e-07 195 4.400000e-01 2.610715e-07 196 4.500000e-01 3.419474e-07 197 4.600000e-01 4.446734e-07 198 4.700000e-01 5.741062e-07 199 4.800000e-01 7.359242e-07 200 4.900000e-01 9.367238e-07 201 5.000000e-01 1.184113e-06 202 5.100000e-01 1.486791e-06 203 5.200000e-01 1.854588e-06 204 5.300000e-01 2.298443e-06 205 5.400000e-01 2.830278e-06 206 5.500000e-01 3.462743e-06 207 5.600000e-01 4.208798e-06 208 5.700000e-01 5.081108e-06 209 5.800000e-01 6.091255e-06 210 5.900000e-01 7.248896e-06 211 6.000000e-01 8.561544e-06 212 6.100000e-01 1.003471e-05 213 6.200000e-01 1.167098e-05 214 6.300000e-01 1.346937e-05 215 6.400000e-01 1.542542e-05 216 6.500000e-01 1.753156e-05 217 6.600000e-01 1.977766e-05 218 6.700000e-01 2.215162e-05 219 6.800000e-01 2.464004e-05 220 6.900000e-01 2.722881e-05 221 7.000000e-01 2.990369e-05 222 7.100000e-01 3.265074e-05 223 7.200000e-01 3.545670e-05 224 7.300000e-01 3.830922e-05 225 7.400000e-01 4.119703e-05 226 7.500000e-01 4.410998e-05 227 7.600000e-01 4.703909e-05 228 7.700000e-01 4.997650e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 5.291540e-05 230 7.900000e-01 5.584996e-05 231 8.000000e-01 5.877521e-05 232 8.100000e-01 6.168700e-05 233 8.200000e-01 6.458184e-05 234 8.300000e-01 6.745684e-05 235 8.400000e-01 7.030964e-05 236 8.500000e-01 7.313831e-05 237 8.600000e-01 7.594132e-05 238 8.700000e-01 7.871744e-05 239 8.800000e-01 8.146573e-05 240 8.900000e-01 8.418546e-05 241 9.000000e-01 8.687610e-05 242 9.100000e-01 8.953728e-05 243 9.200000e-01 9.216876e-05 244 9.300000e-01 9.477041e-05 245 9.400000e-01 9.734221e-05 246 9.500000e-01 9.988418e-05 247 9.600000e-01 1.023964e-04 248 9.700000e-01 1.048791e-04 249 9.800000e-01 1.073324e-04 250 9.900000e-01 1.097566e-04 251 1.000000e+00 1.121519e-04 252 1.010000e+00 1.145185e-04 253 1.020000e+00 1.168569e-04 254 1.030000e+00 1.191672e-04 255 1.040000e+00 1.214498e-04 256 1.050000e+00 1.237051e-04 257 1.060000e+00 1.259333e-04 258 1.070000e+00 1.281348e-04 259 1.080000e+00 1.303099e-04 260 1.090000e+00 1.324590e-04 261 1.100000e+00 1.345824e-04 262 1.110000e+00 1.366804e-04 263 1.120000e+00 1.387535e-04 264 1.130000e+00 1.408018e-04 265 1.140000e+00 1.428258e-04 266 1.150000e+00 1.448257e-04 267 1.160000e+00 1.468019e-04 268 1.170000e+00 1.487547e-04 269 1.180000e+00 1.506845e-04 270 1.190000e+00 1.525915e-04 271 1.200000e+00 1.544760e-04 272 1.210000e+00 1.563384e-04 273 1.220000e+00 1.581790e-04 274 1.230000e+00 1.599980e-04 275 1.240000e+00 1.617957e-04 276 1.250000e+00 1.635724e-04 277 1.260000e+00 1.653285e-04 278 1.270000e+00 1.670642e-04 279 1.280000e+00 1.687797e-04 280 1.290000e+00 1.704754e-04 281 1.300000e+00 1.721514e-04 282 1.310000e+00 1.738082e-04 283 1.320000e+00 1.754458e-04 284 1.330000e+00 1.770647e-04 285 1.340000e+00 1.786649e-04 286 1.350000e+00 1.802469e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 1.818107e-04 288 1.370000e+00 1.833567e-04 289 1.380000e+00 1.848851e-04 290 1.390000e+00 1.863962e-04 291 1.400000e+00 1.878901e-04 292 1.410000e+00 1.893670e-04 293 1.420000e+00 1.908273e-04 294 1.430000e+00 1.922711e-04 295 1.440000e+00 1.936986e-04 296 1.450000e+00 1.951100e-04 297 1.460000e+00 1.965056e-04 298 1.470000e+00 1.978856e-04 299 1.480000e+00 1.992501e-04 300 1.490000e+00 2.005993e-04 301 1.500000e+00 2.019335e-04 302 0.000000e+00 2.887436e-13 303 1.000000e-02 3.931018e-13 304 2.000000e-02 5.947625e-13 305 3.000000e-02 8.534623e-13 306 4.000000e-02 1.224537e-12 307 5.000000e-02 1.756691e-12 308 6.000000e-02 2.519400e-12 309 7.000000e-02 3.611844e-12 310 8.000000e-02 5.175864e-12 311 9.000000e-02 7.414014e-12 312 1.000000e-01 1.061536e-11 313 1.100000e-01 1.519217e-11 314 1.200000e-01 2.173201e-11 315 1.300000e-01 3.107171e-11 316 1.400000e-01 4.440208e-11 317 1.500000e-01 6.341614e-11 318 1.600000e-01 9.051711e-11 319 1.700000e-01 1.291030e-10 320 1.800000e-01 1.839867e-10 321 1.900000e-01 2.619706e-10 322 2.000000e-01 3.726502e-10 323 2.100000e-01 5.295336e-10 324 2.200000e-01 7.515928e-10 325 2.300000e-01 1.065404e-09 326 2.400000e-01 1.508086e-09 327 2.500000e-01 2.131297e-09 328 2.600000e-01 3.006656e-09 329 2.700000e-01 4.233000e-09 330 2.800000e-01 5.946025e-09 331 2.900000e-01 8.330945e-09 332 3.000000e-01 1.163887e-08 333 3.100000e-01 1.620772e-08 334 3.200000e-01 2.248837e-08 335 3.300000e-01 3.107690e-08 336 3.400000e-01 4.275325e-08 337 3.500000e-01 5.852676e-08 338 3.600000e-01 7.968840e-08 339 3.700000e-01 1.078692e-07 340 3.800000e-01 1.451046e-07 341 3.900000e-01 1.939032e-07 342 4.000000e-01 2.573212e-07 343 4.100000e-01 3.390415e-07 344 4.200000e-01 4.434590e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 5.757735e-07 346 4.400000e-01 7.420905e-07 347 4.500000e-01 9.495256e-07 348 4.600000e-01 1.206306e-06 349 4.700000e-01 1.521853e-06 350 4.800000e-01 1.906814e-06 351 4.900000e-01 2.373019e-06 352 5.000000e-01 2.933310e-06 353 5.100000e-01 3.601183e-06 354 5.200000e-01 4.390191e-06 355 5.300000e-01 5.312956e-06 356 5.400000e-01 6.379594e-06 357 5.500000e-01 7.596206e-06 358 5.600000e-01 8.967049e-06 359 5.700000e-01 1.049743e-05 360 5.800000e-01 1.219063e-05 361 5.900000e-01 1.404581e-05 362 6.000000e-01 1.605825e-05 363 6.100000e-01 1.822001e-05 364 6.200000e-01 2.052060e-05 365 6.300000e-01 2.294763e-05 366 6.400000e-01 2.548749e-05 367 6.500000e-01 2.812594e-05 368 6.600000e-01 3.084868e-05 369 6.700000e-01 3.364181e-05 370 6.800000e-01 3.649209e-05 371 6.900000e-01 3.938724e-05 372 7.000000e-01 4.231608e-05 373 7.100000e-01 4.526855e-05 374 7.200000e-01 4.823576e-05 375 7.300000e-01 5.120992e-05 376 7.400000e-01 5.418430e-05 377 7.500000e-01 5.715315e-05 378 7.600000e-01 6.011157e-05 379 7.700000e-01 6.305543e-05 380 7.800000e-01 6.598132e-05 381 7.900000e-01 6.888638e-05 382 8.000000e-01 7.176829e-05 383 8.100000e-01 7.462517e-05 384 8.200000e-01 7.745550e-05 385 8.300000e-01 8.025809e-05 386 8.400000e-01 8.303203e-05 387 8.500000e-01 8.577660e-05 388 8.600000e-01 8.849131e-05 389 8.700000e-01 9.117580e-05 390 8.800000e-01 9.382987e-05 391 8.900000e-01 9.645339e-05 392 9.000000e-01 9.904636e-05 393 9.100000e-01 1.016088e-04 394 9.200000e-01 1.041409e-04 395 9.300000e-01 1.066428e-04 396 9.400000e-01 1.091147e-04 397 9.500000e-01 1.115569e-04 398 9.600000e-01 1.139695e-04 399 9.700000e-01 1.163530e-04 400 9.800000e-01 1.187076e-04 401 9.900000e-01 1.210336e-04 402 1.000000e+00 1.233314e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.256014e-04 404 1.020000e+00 1.278437e-04 405 1.030000e+00 1.300589e-04 406 1.040000e+00 1.322473e-04 407 1.050000e+00 1.344091e-04 408 1.060000e+00 1.365448e-04 409 1.070000e+00 1.386547e-04 410 1.080000e+00 1.407391e-04 411 1.090000e+00 1.427984e-04 412 1.100000e+00 1.448330e-04 413 1.110000e+00 1.468431e-04 414 1.120000e+00 1.488292e-04 415 1.130000e+00 1.507914e-04 416 1.140000e+00 1.527302e-04 417 1.150000e+00 1.546459e-04 418 1.160000e+00 1.565388e-04 419 1.170000e+00 1.584092e-04 420 1.180000e+00 1.602575e-04 421 1.190000e+00 1.620838e-04 422 1.200000e+00 1.638886e-04 423 1.210000e+00 1.656721e-04 424 1.220000e+00 1.674346e-04 425 1.230000e+00 1.691765e-04 426 1.240000e+00 1.708978e-04 427 1.250000e+00 1.725991e-04 428 1.260000e+00 1.742805e-04 429 1.270000e+00 1.759423e-04 430 1.280000e+00 1.775847e-04 431 1.290000e+00 1.792081e-04 432 1.300000e+00 1.808127e-04 433 1.310000e+00 1.823987e-04 434 1.320000e+00 1.839664e-04 435 1.330000e+00 1.855160e-04 436 1.340000e+00 1.870478e-04 437 1.350000e+00 1.885621e-04 438 1.360000e+00 1.900589e-04 439 1.370000e+00 1.915386e-04 440 1.380000e+00 1.930015e-04 441 1.390000e+00 1.944476e-04 442 1.400000e+00 1.958773e-04 443 1.410000e+00 1.972908e-04 444 1.420000e+00 1.986882e-04 445 1.430000e+00 2.000698e-04 446 1.440000e+00 2.014358e-04 447 1.450000e+00 2.027863e-04 448 1.460000e+00 2.041217e-04 449 1.470000e+00 2.054420e-04 450 1.480000e+00 2.067475e-04 451 1.490000e+00 2.080383e-04 452 1.500000e+00 2.093147e-04 453 0.000000e+00 9.877774e-13 454 1.000000e-02 1.344554e-12 455 2.000000e-02 2.033609e-12 456 3.000000e-02 2.917279e-12 457 4.000000e-02 4.184280e-12 458 5.000000e-02 6.000547e-12 459 6.000000e-02 8.603646e-12 460 7.000000e-02 1.233357e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 1.767673e-11 462 9.000000e-02 2.532864e-11 463 1.000000e-01 3.628335e-11 464 1.100000e-01 5.196066e-11 465 1.200000e-01 7.438710e-11 466 1.300000e-01 1.064528e-10 467 1.400000e-01 1.522756e-10 468 1.500000e-01 2.177161e-10 469 1.600000e-01 3.110992e-10 470 1.700000e-01 4.442001e-10 471 1.800000e-01 6.336941e-10 472 1.900000e-01 9.031304e-10 473 2.000000e-01 1.285674e-09 474 2.100000e-01 1.827892e-09 475 2.200000e-01 2.594944e-09 476 2.300000e-01 3.677637e-09 477 2.400000e-01 5.201872e-09 478 2.500000e-01 7.340609e-09 479 2.600000e-01 1.033002e-08 480 2.700000e-01 1.449134e-08 481 2.800000e-01 2.025755e-08 482 2.900000e-01 2.820684e-08 483 3.000000e-01 3.910366e-08 484 3.100000e-01 5.394782e-08 485 3.200000e-01 7.403175e-08 486 3.300000e-01 1.010058e-07 487 3.400000e-01 1.369511e-07 488 3.500000e-01 1.844586e-07 489 3.600000e-01 2.467149e-07 490 3.700000e-01 3.275944e-07 491 3.800000e-01 4.317573e-07 492 3.900000e-01 5.647567e-07 493 4.000000e-01 7.331521e-07 494 4.100000e-01 9.446282e-07 495 4.200000e-01 1.208106e-06 496 4.300000e-01 1.533833e-06 497 4.400000e-01 1.933408e-06 498 4.500000e-01 2.419717e-06 499 4.600000e-01 3.006693e-06 500 4.700000e-01 3.708835e-06 501 4.800000e-01 4.540337e-06 502 4.900000e-01 5.513507e-06 503 5.000000e-01 6.636007e-06 504 5.100000e-01 7.908968e-06 505 5.200000e-01 9.333435e-06 506 5.300000e-01 1.091545e-05 507 5.400000e-01 1.265940e-05 508 5.500000e-01 1.456477e-05 509 5.600000e-01 1.662676e-05 510 5.700000e-01 1.883722e-05 511 5.800000e-01 2.118542e-05 512 5.900000e-01 2.365882e-05 513 6.000000e-01 2.624370e-05 514 6.100000e-01 2.892577e-05 515 6.200000e-01 3.169074e-05 516 6.300000e-01 3.452473e-05 517 6.400000e-01 3.741457e-05 518 6.500000e-01 4.034805e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 4.331403e-05 520 6.700000e-01 4.630253e-05 521 6.800000e-01 4.930472e-05 522 6.900000e-01 5.231286e-05 523 7.000000e-01 5.532027e-05 524 7.100000e-01 5.832123e-05 525 7.200000e-01 6.131086e-05 526 7.300000e-01 6.428508e-05 527 7.400000e-01 6.724048e-05 528 7.500000e-01 7.017423e-05 529 7.600000e-01 7.308403e-05 530 7.700000e-01 7.596801e-05 531 7.800000e-01 7.882467e-05 532 7.900000e-01 8.165283e-05 533 8.000000e-01 8.445159e-05 534 8.100000e-01 8.722027e-05 535 8.200000e-01 8.995836e-05 536 8.300000e-01 9.266554e-05 537 8.400000e-01 9.534161e-05 538 8.500000e-01 9.798646e-05 539 8.600000e-01 1.006001e-04 540 8.700000e-01 1.031826e-04 541 8.800000e-01 1.057341e-04 542 8.900000e-01 1.082548e-04 543 9.000000e-01 1.107449e-04 544 9.100000e-01 1.132047e-04 545 9.200000e-01 1.156344e-04 546 9.300000e-01 1.180344e-04 547 9.400000e-01 1.204049e-04 548 9.500000e-01 1.227464e-04 549 9.600000e-01 1.250591e-04 550 9.700000e-01 1.273434e-04 551 9.800000e-01 1.295997e-04 552 9.900000e-01 1.318284e-04 553 1.000000e+00 1.340297e-04 554 1.010000e+00 1.362041e-04 555 1.020000e+00 1.383519e-04 556 1.030000e+00 1.404734e-04 557 1.040000e+00 1.425691e-04 558 1.050000e+00 1.446393e-04 559 1.060000e+00 1.466843e-04 560 1.070000e+00 1.487045e-04 561 1.080000e+00 1.507002e-04 562 1.090000e+00 1.526718e-04 563 1.100000e+00 1.546196e-04 564 1.110000e+00 1.565439e-04 565 1.120000e+00 1.584451e-04 566 1.130000e+00 1.603234e-04 567 1.140000e+00 1.621793e-04 568 1.150000e+00 1.640130e-04 569 1.160000e+00 1.658247e-04 570 1.170000e+00 1.676150e-04 571 1.180000e+00 1.693839e-04 572 1.190000e+00 1.711318e-04 573 1.200000e+00 1.728591e-04 574 1.210000e+00 1.745660e-04 575 1.220000e+00 1.762527e-04 576 1.230000e+00 1.779195e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 1.795668e-04 578 1.250000e+00 1.811948e-04 579 1.260000e+00 1.828037e-04 580 1.270000e+00 1.843938e-04 581 1.280000e+00 1.859654e-04 582 1.290000e+00 1.875187e-04 583 1.300000e+00 1.890540e-04 584 1.310000e+00 1.905715e-04 585 1.320000e+00 1.920714e-04 586 1.330000e+00 1.935539e-04 587 1.340000e+00 1.950194e-04 588 1.350000e+00 1.964680e-04 589 1.360000e+00 1.979000e-04 590 1.370000e+00 1.993156e-04 591 1.380000e+00 2.007149e-04 592 1.390000e+00 2.020983e-04 593 1.400000e+00 2.034658e-04 594 1.410000e+00 2.048178e-04 595 1.420000e+00 2.061544e-04 596 1.430000e+00 2.074759e-04 597 1.440000e+00 2.087824e-04 598 1.450000e+00 2.100740e-04 599 1.460000e+00 2.113511e-04 600 1.470000e+00 2.126138e-04 601 1.480000e+00 2.138623e-04 602 1.490000e+00 2.150967e-04 603 1.500000e+00 2.163172e-04 604 0.000000e+00 3.802857e-12 605 1.000000e-02 5.179405e-12 606 2.000000e-02 7.840940e-12 607 3.000000e-02 1.125575e-11 608 4.000000e-02 1.615433e-11 609 5.000000e-02 2.317943e-11 610 6.000000e-02 3.325101e-11 611 7.000000e-02 4.768511e-11 612 8.000000e-02 6.836303e-11 613 9.000000e-02 9.797210e-11 614 1.000000e-01 1.403476e-10 615 1.100000e-01 2.009572e-10 616 1.200000e-01 2.875868e-10 617 1.300000e-01 4.113064e-10 618 1.400000e-01 5.878303e-10 619 1.500000e-01 8.394210e-10 620 1.600000e-01 1.197526e-09 621 1.700000e-01 1.706327e-09 622 1.800000e-01 2.427883e-09 623 1.900000e-01 3.448995e-09 624 2.000000e-01 4.890513e-09 625 2.100000e-01 6.919840e-09 626 2.200000e-01 9.767530e-09 627 2.300000e-01 1.374902e-08 628 2.400000e-01 1.929264e-08 629 2.500000e-01 2.697515e-08 630 2.600000e-01 3.756591e-08 631 2.700000e-01 5.208067e-08 632 2.800000e-01 7.184554e-08 633 2.900000e-01 9.857148e-08 634 3.000000e-01 1.344389e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 1.821917e-07 636 3.200000e-01 2.452412e-07 637 3.300000e-01 3.277779e-07 638 3.400000e-01 4.348938e-07 639 3.500000e-01 5.727141e-07 640 3.600000e-01 7.485378e-07 641 3.700000e-01 9.709820e-07 642 3.800000e-01 1.250117e-06 643 3.900000e-01 1.597567e-06 644 4.000000e-01 2.026526e-06 645 4.100000e-01 2.551636e-06 646 4.200000e-01 3.188614e-06 647 4.300000e-01 3.953476e-06 648 4.400000e-01 4.861015e-06 649 4.500000e-01 5.921696e-06 650 4.600000e-01 7.136545e-06 651 4.700000e-01 8.498437e-06 652 4.800000e-01 1.000774e-05 653 4.900000e-01 1.167295e-05 654 5.000000e-01 1.349892e-05 655 5.100000e-01 1.548464e-05 656 5.200000e-01 1.762458e-05 657 5.300000e-01 1.990991e-05 658 5.400000e-01 2.232939e-05 659 5.500000e-01 2.487011e-05 660 5.600000e-01 2.751817e-05 661 5.700000e-01 3.025929e-05 662 5.800000e-01 3.307926e-05 663 5.900000e-01 3.596440e-05 664 6.000000e-01 3.890180e-05 665 6.100000e-01 4.187952e-05 666 6.200000e-01 4.488673e-05 667 6.300000e-01 4.791372e-05 668 6.400000e-01 5.095195e-05 669 6.500000e-01 5.399391e-05 670 6.600000e-01 5.703316e-05 671 6.700000e-01 6.006416e-05 672 6.800000e-01 6.308222e-05 673 6.900000e-01 6.608341e-05 674 7.000000e-01 6.906444e-05 675 7.100000e-01 7.202261e-05 676 7.200000e-01 7.495570e-05 677 7.300000e-01 7.786194e-05 678 7.400000e-01 8.073988e-05 679 7.500000e-01 8.358843e-05 680 7.600000e-01 8.640672e-05 681 7.700000e-01 8.919413e-05 682 7.800000e-01 9.195019e-05 683 7.900000e-01 9.467463e-05 684 8.000000e-01 9.736726e-05 685 8.100000e-01 1.000280e-04 686 8.200000e-01 1.026569e-04 687 8.300000e-01 1.052541e-04 688 8.400000e-01 1.078197e-04 689 8.500000e-01 1.103539e-04 690 8.600000e-01 1.128570e-04 691 8.700000e-01 1.153293e-04 692 8.800000e-01 1.177710e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.201824e-04 694 9.000000e-01 1.225640e-04 695 9.100000e-01 1.249160e-04 696 9.200000e-01 1.272388e-04 697 9.300000e-01 1.295329e-04 698 9.400000e-01 1.317985e-04 699 9.500000e-01 1.340360e-04 700 9.600000e-01 1.362458e-04 701 9.700000e-01 1.384283e-04 702 9.800000e-01 1.405838e-04 703 9.900000e-01 1.427128e-04 704 1.000000e+00 1.448155e-04 705 1.010000e+00 1.468924e-04 706 1.020000e+00 1.489438e-04 707 1.030000e+00 1.509700e-04 708 1.040000e+00 1.529715e-04 709 1.050000e+00 1.549486e-04 710 1.060000e+00 1.569015e-04 711 1.070000e+00 1.588307e-04 712 1.080000e+00 1.607365e-04 713 1.090000e+00 1.626192e-04 714 1.100000e+00 1.644792e-04 715 1.110000e+00 1.663167e-04 716 1.120000e+00 1.681320e-04 717 1.130000e+00 1.699256e-04 718 1.140000e+00 1.716977e-04 719 1.150000e+00 1.734485e-04 720 1.160000e+00 1.751784e-04 721 1.170000e+00 1.768877e-04 722 1.180000e+00 1.785767e-04 723 1.190000e+00 1.802456e-04 724 1.200000e+00 1.818947e-04 725 1.210000e+00 1.835244e-04 726 1.220000e+00 1.851347e-04 727 1.230000e+00 1.867262e-04 728 1.240000e+00 1.882988e-04 729 1.250000e+00 1.898531e-04 730 1.260000e+00 1.913891e-04 731 1.270000e+00 1.929072e-04 732 1.280000e+00 1.944075e-04 733 1.290000e+00 1.958904e-04 734 1.300000e+00 1.973560e-04 735 1.310000e+00 1.988046e-04 736 1.320000e+00 2.002365e-04 737 1.330000e+00 2.016517e-04 738 1.340000e+00 2.030506e-04 739 1.350000e+00 2.044334e-04 740 1.360000e+00 2.058003e-04 741 1.370000e+00 2.071515e-04 742 1.380000e+00 2.084872e-04 743 1.390000e+00 2.098076e-04 744 1.400000e+00 2.111129e-04 745 1.410000e+00 2.124033e-04 746 1.420000e+00 2.136790e-04 747 1.430000e+00 2.149402e-04 748 1.440000e+00 2.161871e-04 749 1.450000e+00 2.174198e-04 750 1.460000e+00 2.186386e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 2.198436e-04 752 1.480000e+00 2.210349e-04 753 1.490000e+00 2.222129e-04 754 1.500000e+00 2.233776e-04 755 0.000000e+00 1.825247e-11 756 1.000000e-02 2.627973e-11 757 2.000000e-02 3.782706e-11 758 3.000000e-02 5.443185e-11 759 4.000000e-02 7.829900e-11 760 5.000000e-02 1.125882e-10 761 6.000000e-02 1.618231e-10 762 7.000000e-02 2.324729e-10 763 8.000000e-02 3.337774e-10 764 9.000000e-02 4.789138e-10 765 1.000000e-01 6.866413e-10 766 1.100000e-01 9.836112e-10 767 1.200000e-01 1.407596e-09 768 1.300000e-01 2.011981e-09 769 1.400000e-01 2.871967e-09 770 1.500000e-01 4.093086e-09 771 1.600000e-01 5.822686e-09 772 1.700000e-01 8.264853e-09 773 1.800000e-01 1.170150e-08 774 1.900000e-01 1.651914e-08 775 2.000000e-01 2.324352e-08 776 2.100000e-01 3.258355e-08 777 2.200000e-01 4.548595e-08 778 2.300000e-01 6.320174e-08 779 2.400000e-01 8.736539e-08 780 2.500000e-01 1.200869e-07 781 2.600000e-01 1.640566e-07 782 2.700000e-01 2.226621e-07 783 2.800000e-01 3.001177e-07 784 2.900000e-01 4.016046e-07 785 3.000000e-01 5.334234e-07 786 3.100000e-01 7.031560e-07 787 3.200000e-01 9.198327e-07 788 3.300000e-01 1.194089e-06 789 3.400000e-01 1.538284e-06 790 3.500000e-01 1.966529e-06 791 3.600000e-01 2.494560e-06 792 3.700000e-01 3.139647e-06 793 3.800000e-01 3.919324e-06 794 3.900000e-01 4.849285e-06 795 4.000000e-01 5.939502e-06 796 4.100000e-01 7.187440e-06 797 4.200000e-01 8.579616e-06 798 4.300000e-01 1.011389e-05 799 4.400000e-01 1.180075e-05 800 4.500000e-01 1.364700e-05 801 4.600000e-01 1.565274e-05 802 4.700000e-01 1.781303e-05 803 4.800000e-01 2.011946e-05 804 4.900000e-01 2.256106e-05 805 5.000000e-01 2.512513e-05 806 5.100000e-01 2.779796e-05 807 5.200000e-01 3.056533e-05 808 5.300000e-01 3.341311e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 3.632757e-05 810 5.500000e-01 3.929576e-05 811 5.600000e-01 4.230564e-05 812 5.700000e-01 4.534622e-05 813 5.800000e-01 4.840766e-05 814 5.900000e-01 5.148121e-05 815 6.000000e-01 5.455922e-05 816 6.100000e-01 5.763504e-05 817 6.200000e-01 6.070299e-05 818 6.300000e-01 6.375822e-05 819 6.400000e-01 6.679664e-05 820 6.500000e-01 6.981484e-05 821 6.600000e-01 7.281000e-05 822 6.700000e-01 7.577981e-05 823 6.800000e-01 7.872239e-05 824 6.900000e-01 8.163625e-05 825 7.000000e-01 8.452021e-05 826 7.100000e-01 8.737338e-05 827 7.200000e-01 9.019506e-05 828 7.300000e-01 9.298480e-05 829 7.400000e-01 9.574225e-05 830 7.500000e-01 9.846724e-05 831 7.600000e-01 1.011597e-04 832 7.700000e-01 1.038196e-04 833 7.800000e-01 1.064471e-04 834 7.900000e-01 1.090424e-04 835 8.000000e-01 1.116056e-04 836 8.100000e-01 1.141370e-04 837 8.200000e-01 1.166368e-04 838 8.300000e-01 1.191055e-04 839 8.400000e-01 1.215433e-04 840 8.500000e-01 1.239505e-04 841 8.600000e-01 1.263276e-04 842 8.700000e-01 1.286749e-04 843 8.800000e-01 1.309927e-04 844 8.900000e-01 1.332816e-04 845 9.000000e-01 1.355417e-04 846 9.100000e-01 1.377736e-04 847 9.200000e-01 1.399777e-04 848 9.300000e-01 1.421542e-04 849 9.400000e-01 1.443036e-04 850 9.500000e-01 1.464262e-04 851 9.600000e-01 1.485226e-04 852 9.700000e-01 1.505929e-04 853 9.800000e-01 1.526376e-04 854 9.900000e-01 1.546570e-04 855 1.000000e+00 1.566516e-04 856 1.010000e+00 1.586216e-04 857 1.020000e+00 1.605674e-04 858 1.030000e+00 1.624893e-04 859 1.040000e+00 1.643878e-04 860 1.050000e+00 1.662631e-04 861 1.060000e+00 1.681155e-04 862 1.070000e+00 1.699454e-04 863 1.080000e+00 1.717531e-04 864 1.090000e+00 1.735389e-04 865 1.100000e+00 1.753032e-04 866 1.110000e+00 1.770461e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 1.787681e-04 868 1.130000e+00 1.804694e-04 869 1.140000e+00 1.821503e-04 870 1.150000e+00 1.838111e-04 871 1.160000e+00 1.854521e-04 872 1.170000e+00 1.870735e-04 873 1.180000e+00 1.886756e-04 874 1.190000e+00 1.902588e-04 875 1.200000e+00 1.918231e-04 876 1.210000e+00 1.933690e-04 877 1.220000e+00 1.948966e-04 878 1.230000e+00 1.964062e-04 879 1.240000e+00 1.978981e-04 880 1.250000e+00 1.993725e-04 881 1.260000e+00 2.008296e-04 882 1.270000e+00 2.022697e-04 883 1.280000e+00 2.036929e-04 884 1.290000e+00 2.050996e-04 885 1.300000e+00 2.064899e-04 886 1.310000e+00 2.078640e-04 887 1.320000e+00 2.092223e-04 888 1.330000e+00 2.105648e-04 889 1.340000e+00 2.118918e-04 890 1.350000e+00 2.132035e-04 891 1.360000e+00 2.145001e-04 892 1.370000e+00 2.157818e-04 893 1.380000e+00 2.170488e-04 894 1.390000e+00 2.183013e-04 895 1.400000e+00 2.195394e-04 896 1.410000e+00 2.207634e-04 897 1.420000e+00 2.219734e-04 898 1.430000e+00 2.231696e-04 899 1.440000e+00 2.243523e-04 900 1.450000e+00 2.255215e-04 901 1.460000e+00 2.266774e-04 902 1.470000e+00 2.278203e-04 903 1.480000e+00 2.289502e-04 904 1.490000e+00 2.300674e-04 905 1.500000e+00 2.311719e-04 906 0.000000e+00 1.258752e-10 907 1.000000e-02 1.823407e-10 908 2.000000e-02 2.639900e-10 909 3.000000e-02 3.819525e-10 910 4.000000e-02 5.522071e-10 911 5.000000e-02 7.976497e-10 912 6.000000e-02 1.151011e-09 913 7.000000e-02 1.658958e-09 914 8.000000e-02 2.387814e-09 915 9.000000e-02 3.431510e-09 916 1.000000e-01 4.922511e-09 917 1.100000e-01 7.046734e-09 918 1.200000e-01 1.006368e-08 919 1.300000e-01 1.433325e-08 920 1.400000e-01 2.035107e-08 921 1.500000e-01 2.879411e-08 922 1.600000e-01 4.057812e-08 923 1.700000e-01 5.692562e-08 924 1.800000e-01 7.945695e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 1.102933e-07 926 2.000000e-01 1.521772e-07 927 2.100000e-01 2.086101e-07 928 2.200000e-01 2.840068e-07 929 2.300000e-01 3.838663e-07 930 2.400000e-01 5.149567e-07 931 2.500000e-01 6.855130e-07 932 2.600000e-01 9.054375e-07 933 2.700000e-01 1.186486e-06 934 2.800000e-01 1.542398e-06 935 2.900000e-01 1.988913e-06 936 3.000000e-01 2.543547e-06 937 3.100000e-01 3.224972e-06 938 3.200000e-01 4.051625e-06 939 3.300000e-01 5.038769e-06 940 3.400000e-01 6.192279e-06 941 3.500000e-01 7.500371e-06 942 3.600000e-01 8.944384e-06 943 3.700000e-01 1.052707e-05 944 3.800000e-01 1.226188e-05 945 3.900000e-01 1.415578e-05 946 4.000000e-01 1.620858e-05 947 4.100000e-01 1.841513e-05 948 4.200000e-01 2.076690e-05 949 4.300000e-01 2.325291e-05 950 4.400000e-01 2.586055e-05 951 4.500000e-01 2.857620e-05 952 4.600000e-01 3.138583e-05 953 4.700000e-01 3.427546e-05 954 4.800000e-01 3.723151e-05 955 4.900000e-01 4.024113e-05 956 5.000000e-01 4.329237e-05 957 5.100000e-01 4.637430e-05 958 5.200000e-01 4.947709e-05 959 5.300000e-01 5.259196e-05 960 5.400000e-01 5.571124e-05 961 5.500000e-01 5.882822e-05 962 5.600000e-01 6.193715e-05 963 5.700000e-01 6.503310e-05 964 5.800000e-01 6.811193e-05 965 5.900000e-01 7.117016e-05 966 6.000000e-01 7.420488e-05 967 6.100000e-01 7.721374e-05 968 6.200000e-01 8.019480e-05 969 6.300000e-01 8.314653e-05 970 6.400000e-01 8.606771e-05 971 6.500000e-01 8.895741e-05 972 6.600000e-01 9.181492e-05 973 6.700000e-01 9.463976e-05 974 6.800000e-01 9.743158e-05 975 6.900000e-01 1.001902e-04 976 7.000000e-01 1.029155e-04 977 7.100000e-01 1.056076e-04 978 7.200000e-01 1.082665e-04 979 7.300000e-01 1.108924e-04 980 7.400000e-01 1.134855e-04 981 7.500000e-01 1.160460e-04 982 7.600000e-01 1.185744e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 1.210708e-04 984 7.800000e-01 1.235356e-04 985 7.900000e-01 1.259693e-04 986 8.000000e-01 1.283721e-04 987 8.100000e-01 1.307445e-04 988 8.200000e-01 1.330868e-04 989 8.300000e-01 1.353995e-04 990 8.400000e-01 1.376829e-04 991 8.500000e-01 1.399375e-04 992 8.600000e-01 1.421636e-04 993 8.700000e-01 1.443616e-04 994 8.800000e-01 1.465320e-04 995 8.900000e-01 1.486751e-04 996 9.000000e-01 1.507913e-04 997 9.100000e-01 1.528811e-04 998 9.200000e-01 1.549447e-04 999 9.300000e-01 1.569825e-04 1000 9.400000e-01 1.589950e-04 1001 9.500000e-01 1.609825e-04 1002 9.600000e-01 1.629453e-04 1003 9.700000e-01 1.648838e-04 1004 9.800000e-01 1.667984e-04 1005 9.900000e-01 1.686894e-04 1006 1.000000e+00 1.705572e-04 1007 1.010000e+00 1.724020e-04 1008 1.020000e+00 1.742242e-04 1009 1.030000e+00 1.760242e-04 1010 1.040000e+00 1.778021e-04 1011 1.050000e+00 1.795585e-04 1012 1.060000e+00 1.812935e-04 1013 1.070000e+00 1.830074e-04 1014 1.080000e+00 1.847007e-04 1015 1.090000e+00 1.863735e-04 1016 1.100000e+00 1.880261e-04 1017 1.110000e+00 1.896588e-04 1018 1.120000e+00 1.912720e-04 1019 1.130000e+00 1.928658e-04 1020 1.140000e+00 1.944406e-04 1021 1.150000e+00 1.959966e-04 1022 1.160000e+00 1.975340e-04 1023 1.170000e+00 1.990532e-04 1024 1.180000e+00 2.005544e-04 1025 1.190000e+00 2.020377e-04 1026 1.200000e+00 2.035036e-04 1027 1.210000e+00 2.049521e-04 1028 1.220000e+00 2.063836e-04 1029 1.230000e+00 2.077982e-04 1030 1.240000e+00 2.091962e-04 1031 1.250000e+00 2.105779e-04 1032 1.260000e+00 2.119434e-04 1033 1.270000e+00 2.132929e-04 1034 1.280000e+00 2.146267e-04 1035 1.290000e+00 2.159450e-04 1036 1.300000e+00 2.172480e-04 1037 1.310000e+00 2.185359e-04 1038 1.320000e+00 2.198088e-04 1039 1.330000e+00 2.210670e-04 1040 1.340000e+00 2.223107e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 2.235401e-04 1042 1.360000e+00 2.247553e-04 1043 1.370000e+00 2.259565e-04 1044 1.380000e+00 2.271440e-04 1045 1.390000e+00 2.283178e-04 1046 1.400000e+00 2.294782e-04 1047 1.410000e+00 2.306253e-04 1048 1.420000e+00 2.317594e-04 1049 1.430000e+00 2.328805e-04 1050 1.440000e+00 2.339889e-04 1051 1.450000e+00 2.350846e-04 1052 1.460000e+00 2.361679e-04 1053 1.470000e+00 2.372390e-04 1054 1.480000e+00 2.382979e-04 1055 1.490000e+00 2.393448e-04 1056 1.500000e+00 2.403799e-04 1057 0.000000e+00 1.251192e-09 1058 1.000000e-02 1.813709e-09 1059 2.000000e-02 2.624757e-09 1060 3.000000e-02 3.791412e-09 1061 4.000000e-02 5.465157e-09 1062 5.000000e-02 7.859239e-09 1063 6.000000e-02 1.127214e-08 1064 7.000000e-02 1.611896e-08 1065 8.000000e-02 2.297285e-08 1066 9.000000e-02 3.261873e-08 1067 1.000000e-01 4.612204e-08 1068 1.100000e-01 6.491486e-08 1069 1.200000e-01 9.090182e-08 1070 1.300000e-01 1.265877e-07 1071 1.400000e-01 1.752284e-07 1072 1.500000e-01 2.410054e-07 1073 1.600000e-01 3.292206e-07 1074 1.700000e-01 4.464887e-07 1075 1.800000e-01 6.010065e-07 1076 1.900000e-01 8.027946e-07 1077 2.000000e-01 1.063932e-06 1078 2.100000e-01 1.398741e-06 1079 2.200000e-01 1.823838e-06 1080 2.300000e-01 2.357916e-06 1081 2.400000e-01 3.021002e-06 1082 2.500000e-01 3.832660e-06 1083 2.600000e-01 4.807913e-06 1084 2.700000e-01 5.948551e-06 1085 2.800000e-01 7.234720e-06 1086 2.900000e-01 8.646884e-06 1087 3.000000e-01 1.019402e-05 1088 3.100000e-01 1.189245e-05 1089 3.200000e-01 1.375032e-05 1090 3.300000e-01 1.576849e-05 1091 3.400000e-01 1.794291e-05 1092 3.500000e-01 2.026608e-05 1093 3.600000e-01 2.272796e-05 1094 3.700000e-01 2.531672e-05 1095 3.800000e-01 2.801933e-05 1096 3.900000e-01 3.082218e-05 1097 4.000000e-01 3.371147e-05 1098 4.100000e-01 3.667366e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 3.969573e-05 1100 4.300000e-01 4.276545e-05 1101 4.400000e-01 4.587149e-05 1102 4.500000e-01 4.900351e-05 1103 4.600000e-01 5.215223e-05 1104 4.700000e-01 5.530940e-05 1105 4.800000e-01 5.846777e-05 1106 4.900000e-01 6.162104e-05 1107 5.000000e-01 6.476375e-05 1108 5.100000e-01 6.789129e-05 1109 5.200000e-01 7.099974e-05 1110 5.300000e-01 7.408579e-05 1111 5.400000e-01 7.714674e-05 1112 5.500000e-01 8.018035e-05 1113 5.600000e-01 8.318482e-05 1114 5.700000e-01 8.615870e-05 1115 5.800000e-01 8.910087e-05 1116 5.900000e-01 9.201046e-05 1117 6.000000e-01 9.488686e-05 1118 6.100000e-01 9.772960e-05 1119 6.200000e-01 1.005384e-04 1120 6.300000e-01 1.033132e-04 1121 6.400000e-01 1.060538e-04 1122 6.500000e-01 1.087604e-04 1123 6.600000e-01 1.114332e-04 1124 6.700000e-01 1.140722e-04 1125 6.800000e-01 1.166777e-04 1126 6.900000e-01 1.192501e-04 1127 7.000000e-01 1.217896e-04 1128 7.100000e-01 1.242967e-04 1129 7.200000e-01 1.267716e-04 1130 7.300000e-01 1.292148e-04 1131 7.400000e-01 1.316267e-04 1132 7.500000e-01 1.340076e-04 1133 7.600000e-01 1.363580e-04 1134 7.700000e-01 1.386784e-04 1135 7.800000e-01 1.409690e-04 1136 7.900000e-01 1.432304e-04 1137 8.000000e-01 1.454630e-04 1138 8.100000e-01 1.476671e-04 1139 8.200000e-01 1.498432e-04 1140 8.300000e-01 1.519917e-04 1141 8.400000e-01 1.541130e-04 1142 8.500000e-01 1.562074e-04 1143 8.600000e-01 1.582755e-04 1144 8.700000e-01 1.603175e-04 1145 8.800000e-01 1.623338e-04 1146 8.900000e-01 1.643249e-04 1147 9.000000e-01 1.662910e-04 1148 9.100000e-01 1.682326e-04 1149 9.200000e-01 1.701500e-04 1150 9.300000e-01 1.720436e-04 1151 9.400000e-01 1.739137e-04 1152 9.500000e-01 1.757607e-04 1153 9.600000e-01 1.775848e-04 1154 9.700000e-01 1.793864e-04 1155 9.800000e-01 1.811659e-04 1156 9.900000e-01 1.829236e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 1.846597e-04 1158 1.010000e+00 1.863746e-04 1159 1.020000e+00 1.880686e-04 1160 1.030000e+00 1.897420e-04 1161 1.040000e+00 1.913950e-04 1162 1.050000e+00 1.930280e-04 1163 1.060000e+00 1.946413e-04 1164 1.070000e+00 1.962351e-04 1165 1.080000e+00 1.978096e-04 1166 1.090000e+00 1.993652e-04 1167 1.100000e+00 2.009022e-04 1168 1.110000e+00 2.024207e-04 1169 1.120000e+00 2.039211e-04 1170 1.130000e+00 2.054036e-04 1171 1.140000e+00 2.068684e-04 1172 1.150000e+00 2.083158e-04 1173 1.160000e+00 2.097460e-04 1174 1.170000e+00 2.111592e-04 1175 1.180000e+00 2.125558e-04 1176 1.190000e+00 2.139358e-04 1177 1.200000e+00 2.152996e-04 1178 1.210000e+00 2.166473e-04 1179 1.220000e+00 2.179792e-04 1180 1.230000e+00 2.192954e-04 1181 1.240000e+00 2.205963e-04 1182 1.250000e+00 2.218819e-04 1183 1.260000e+00 2.231525e-04 1184 1.270000e+00 2.244084e-04 1185 1.280000e+00 2.256496e-04 1186 1.290000e+00 2.268763e-04 1187 1.300000e+00 2.280889e-04 1188 1.310000e+00 2.292874e-04 1189 1.320000e+00 2.304720e-04 1190 1.330000e+00 2.316429e-04 1191 1.340000e+00 2.328004e-04 1192 1.350000e+00 2.339445e-04 1193 1.360000e+00 2.350754e-04 1194 1.370000e+00 2.361933e-04 1195 1.380000e+00 2.372985e-04 1196 1.390000e+00 2.383909e-04 1197 1.400000e+00 2.394708e-04 1198 1.410000e+00 2.405384e-04 1199 1.420000e+00 2.415938e-04 1200 1.430000e+00 2.426372e-04 1201 1.440000e+00 2.436687e-04 1202 1.450000e+00 2.446884e-04 1203 1.460000e+00 2.456966e-04 1204 1.470000e+00 2.466933e-04 1205 1.480000e+00 2.476787e-04 1206 1.490000e+00 2.486530e-04 1207 1.500000e+00 2.496162e-04 1208 0.000000e+00 8.743036e-09 1209 1.000000e-02 1.261676e-08 1210 2.000000e-02 1.814181e-08 1211 3.000000e-02 2.598346e-08 1212 4.000000e-02 3.705280e-08 1213 5.000000e-02 5.258576e-08 1214 6.000000e-02 7.424152e-08 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 1.042231e-07 1216 8.000000e-02 1.454217e-07 1217 9.000000e-02 2.015865e-07 1218 1.000000e-01 2.775194e-07 1219 1.100000e-01 3.792947e-07 1220 1.200000e-01 5.144985e-07 1221 1.300000e-01 6.924777e-07 1222 1.400000e-01 9.245763e-07 1223 1.500000e-01 1.224307e-06 1224 1.600000e-01 1.607340e-06 1225 1.700000e-01 2.091021e-06 1226 1.800000e-01 2.693299e-06 1227 1.900000e-01 3.429510e-06 1228 2.000000e-01 4.305019e-06 1229 2.100000e-01 5.307255e-06 1230 2.200000e-01 6.423287e-06 1231 2.300000e-01 7.665067e-06 1232 2.400000e-01 9.051983e-06 1233 2.500000e-01 1.059674e-05 1234 2.600000e-01 1.230554e-05 1235 2.700000e-01 1.417983e-05 1236 2.800000e-01 1.621724e-05 1237 2.900000e-01 1.841222e-05 1238 3.000000e-01 2.075660e-05 1239 3.100000e-01 2.324009e-05 1240 3.200000e-01 2.585087e-05 1241 3.300000e-01 2.857605e-05 1242 3.400000e-01 3.140217e-05 1243 3.500000e-01 3.431565e-05 1244 3.600000e-01 3.730308e-05 1245 3.700000e-01 4.035157e-05 1246 3.800000e-01 4.344893e-05 1247 3.900000e-01 4.658382e-05 1248 4.000000e-01 4.974585e-05 1249 4.100000e-01 5.292563e-05 1250 4.200000e-01 5.611474e-05 1251 4.300000e-01 5.930579e-05 1252 4.400000e-01 6.249225e-05 1253 4.500000e-01 6.566851e-05 1254 4.600000e-01 6.882974e-05 1255 4.700000e-01 7.197184e-05 1256 4.800000e-01 7.509135e-05 1257 4.900000e-01 7.818539e-05 1258 5.000000e-01 8.125160e-05 1259 5.100000e-01 8.428806e-05 1260 5.200000e-01 8.729323e-05 1261 5.300000e-01 9.026591e-05 1262 5.400000e-01 9.320517e-05 1263 5.500000e-01 9.611034e-05 1264 5.600000e-01 9.898095e-05 1265 5.700000e-01 1.018167e-04 1266 5.800000e-01 1.046175e-04 1267 5.900000e-01 1.073832e-04 1268 6.000000e-01 1.101139e-04 1269 6.100000e-01 1.128098e-04 1270 6.200000e-01 1.154711e-04 1271 6.300000e-01 1.180980e-04 1272 6.400000e-01 1.206910e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 1.232503e-04 1274 6.600000e-01 1.257763e-04 1275 6.700000e-01 1.282695e-04 1276 6.800000e-01 1.307302e-04 1277 6.900000e-01 1.331588e-04 1278 7.000000e-01 1.355559e-04 1279 7.100000e-01 1.379218e-04 1280 7.200000e-01 1.402571e-04 1281 7.300000e-01 1.425620e-04 1282 7.400000e-01 1.448372e-04 1283 7.500000e-01 1.470830e-04 1284 7.600000e-01 1.492998e-04 1285 7.700000e-01 1.514882e-04 1286 7.800000e-01 1.536484e-04 1287 7.900000e-01 1.557811e-04 1288 8.000000e-01 1.578864e-04 1289 8.100000e-01 1.599650e-04 1290 8.200000e-01 1.620171e-04 1291 8.300000e-01 1.640433e-04 1292 8.400000e-01 1.660438e-04 1293 8.500000e-01 1.680190e-04 1294 8.600000e-01 1.699694e-04 1295 8.700000e-01 1.718953e-04 1296 8.800000e-01 1.737970e-04 1297 8.900000e-01 1.756750e-04 1298 9.000000e-01 1.775295e-04 1299 9.100000e-01 1.793610e-04 1300 9.200000e-01 1.811697e-04 1301 9.300000e-01 1.829560e-04 1302 9.400000e-01 1.847203e-04 1303 9.500000e-01 1.864627e-04 1304 9.600000e-01 1.881838e-04 1305 9.700000e-01 1.898837e-04 1306 9.800000e-01 1.915627e-04 1307 9.900000e-01 1.932213e-04 1308 1.000000e+00 1.948596e-04 1309 1.010000e+00 1.964779e-04 1310 1.020000e+00 1.980766e-04 1311 1.030000e+00 1.996559e-04 1312 1.040000e+00 2.012161e-04 1313 1.050000e+00 2.027574e-04 1314 1.060000e+00 2.042802e-04 1315 1.070000e+00 2.057846e-04 1316 1.080000e+00 2.072709e-04 1317 1.090000e+00 2.087395e-04 1318 1.100000e+00 2.101904e-04 1319 1.110000e+00 2.116241e-04 1320 1.120000e+00 2.130406e-04 1321 1.130000e+00 2.144403e-04 1322 1.140000e+00 2.158234e-04 1323 1.150000e+00 2.171900e-04 1324 1.160000e+00 2.185405e-04 1325 1.170000e+00 2.198750e-04 1326 1.180000e+00 2.211937e-04 1327 1.190000e+00 2.224970e-04 1328 1.200000e+00 2.237849e-04 1329 1.210000e+00 2.250576e-04 1330 1.220000e+00 2.263155e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 2.275586e-04 1332 1.240000e+00 2.287872e-04 1333 1.250000e+00 2.300014e-04 1334 1.260000e+00 2.312015e-04 1335 1.270000e+00 2.323876e-04 1336 1.280000e+00 2.335600e-04 1337 1.290000e+00 2.347187e-04 1338 1.300000e+00 2.358640e-04 1339 1.310000e+00 2.369961e-04 1340 1.320000e+00 2.381150e-04 1341 1.330000e+00 2.392211e-04 1342 1.340000e+00 2.403144e-04 1343 1.350000e+00 2.413951e-04 1344 1.360000e+00 2.424634e-04 1345 1.370000e+00 2.435194e-04 1346 1.380000e+00 2.445633e-04 1347 1.390000e+00 2.455952e-04 1348 1.400000e+00 2.466153e-04 1349 1.410000e+00 2.476238e-04 1350 1.420000e+00 2.486207e-04 1351 1.430000e+00 2.496062e-04 1352 1.440000e+00 2.505806e-04 1353 1.450000e+00 2.515438e-04 1354 1.460000e+00 2.524961e-04 1355 1.470000e+00 2.534375e-04 1356 1.480000e+00 2.543683e-04 1357 1.490000e+00 2.552885e-04 1358 1.500000e+00 2.561983e-04 ngspice-26/tests/bsim3soifd/pmosfd.mod0000644000265600020320000000403212264261473017425 0ustar andreasadmin*Model Card for BSIMFD2.0, floating body FD SOI PMOS *Released on 2/15/99 .Model P1 PMOS Level= 55 +TNOM = 27 TOX = 4.5E-09 TSI = 5e-8 TBOX = 8E-08 +MOBMOD = 2 CAPMOD = 3 SHMOD = 0 +WINT = 0 LINT = -2E-08 +VTH0 = -.52 K1 = .39 K2 = .1 K3 = 0 +KB1 = .95 K3B = 2.2 NLX = 7.2E-08 +DVT0 = .55 DVT1 = .28 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 3.0E+17 NSUB = 1E+15 NGATE = 1E+20 +DVBD0 = 60.0 DVBD1 = 1.1 VBSA = -0.2 +KB3 = 2.2 DELP = 0.02 +ABP = 0.9 MXC = 0.9 ADICE0 = 0.93 +KBJT1 = 1.0E-08 EDL = .0000005 +NDIODE = 1.13 NTUN = 14.0 +ISBJT = 0.0 ISDIF = 1e-6 ISTUN = 0.0 ISREC = 0.0 +XBJT = 0.01 XDIF = 0.01 XREC = 0.01 XTUN = 0.001 +U0 = 145 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 700 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 0.0 RBSH = 0.0 +A0 = 1.4 KETA = -.67 VSAT = 75000 +DWG = 0 DWB = 0 +ALPHA0 = 0.0 ALPHA1 = 1e-4 BETA0 = 19 +AII = 1.25 BII = 0.1e-7 CII = 0.8 DII = 0.6 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .01 ETAB = 0 +DSUB = .3 RTH0 = .006 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 5e-10 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 ngspice-26/tests/bsim3soifd/t4.out0000644000265600020320000013506712264261473016531 0ustar andreasadmin No. of Data Rows : 1359 Circuit: *model = BSIMSOI (FD) Error on line 3 : .model n1 nmos level= 55 tnom = 27 tox = 4.5e-09 tsi = 5e-8 tbox = 8e-08 mobmod = 0 capmod = 3 shmod = 0 paramchk=0 wint = 0 lint = -2e-08 vth0 = .52 k1 = .39 k2 = .1 k3 = 0 kb1 = .95 k3b = 2.2 nlx = 7.2e-08 dvt0 = .55 dvt1 = .28 dvt2 = -1.4 dvt0w = 0 dvt1w = 0 dvt2w = 0 nch = 3.3e+17 nsub = 1e+15 ngate = 1e+20 dvbd0 = 60.0 dvbd1 = 1.1 vbsa = 0.0 kb3 = 2.2 delp = 0.02 abp = 0.9 mxc = 0.9 adice0 = 0.93 kbjt1 = 1.0e-08 edl = .0000005 ndiode = 1.13 ntun = 14.0 isbjt = 2e-6 isdif = 1e-6 istun = 0.0 isrec = 1e-5 xbjt = 0.01 xdif = 0.01 xrec = 0.01 xtun = 0.001 u0 = 352 ua = 1.3e-11 ub = 1.7e-18 uc = -4e-10 w0 = 1.16e-06 ags = .25 a1 = 0 a2 = 1 b0 = .01 b1 = 10 rdsw = 700 prwg = 0 prwb = -.2 wr = 1 rbody = 0.0 rbsh = 0.0 a0 = 1.4 keta = -.67 vsat = 135000 dwg = 0 dwb = 0 alpha0 = 0.0 alpha1 = 1.5 beta0 = 20.5 aii = 1.2 bii = 0.1e-7 cii = 0.8 dii = 0.6 voff = -.14 nfactor = .7 cdsc = .00002 cdscb = 0 cdscd = 0 cit = 0 pclm = 2.9 pvag = 12 pdiblc1 = .18 pdiblc2 = .004 pdiblcb = -.234 drout = .2 delta = .01 eta0 = .01 etab = 0 dsub = .3 rth0 94 = .006 clc = .0000001 cle = .6 cf = 1e-20 ckappa = .6 cgdl = 1e-20 cgsl = 1e-20 kt1 = -.3 kt1l = 0 kt2 = .022 ute = -1.5 ua1 = 4.31e-09 ub1 = -7.61e-18 uc1 = -5.6e-11 prt = 760 at = 22400 cgso = 1e-10 cgdo = 1e-10 cjswg = 5e-10 tt=3e-10 asd = 0.3 csdesw = 1e-12 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (FD) -------------------------------------------------------------------------------- Index v-sweep vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 3.802857e-12 1 1.000000e-02 5.179405e-12 2 2.000000e-02 7.840940e-12 3 3.000000e-02 1.125575e-11 4 4.000000e-02 1.615433e-11 5 5.000000e-02 2.317943e-11 6 6.000000e-02 3.325101e-11 7 7.000000e-02 4.768511e-11 8 8.000000e-02 6.836303e-11 9 9.000000e-02 9.797210e-11 10 1.000000e-01 1.403476e-10 11 1.100000e-01 2.009572e-10 12 1.200000e-01 2.875868e-10 13 1.300000e-01 4.113064e-10 14 1.400000e-01 5.878303e-10 15 1.500000e-01 8.394210e-10 16 1.600000e-01 1.197526e-09 17 1.700000e-01 1.706327e-09 18 1.800000e-01 2.427883e-09 19 1.900000e-01 3.448995e-09 20 2.000000e-01 4.890513e-09 21 2.100000e-01 6.919840e-09 22 2.200000e-01 9.767530e-09 23 2.300000e-01 1.374902e-08 24 2.400000e-01 1.929264e-08 25 2.500000e-01 2.697515e-08 26 2.600000e-01 3.756591e-08 27 2.700000e-01 5.208067e-08 28 2.800000e-01 7.184554e-08 29 2.900000e-01 9.857148e-08 30 3.000000e-01 1.344389e-07 31 3.100000e-01 1.821917e-07 32 3.200000e-01 2.452412e-07 33 3.300000e-01 3.277779e-07 34 3.400000e-01 4.348938e-07 35 3.500000e-01 5.727141e-07 36 3.600000e-01 7.485378e-07 37 3.700000e-01 9.709820e-07 38 3.800000e-01 1.250117e-06 39 3.900000e-01 1.597567e-06 40 4.000000e-01 2.026526e-06 41 4.100000e-01 2.551636e-06 42 4.200000e-01 3.188614e-06 43 4.300000e-01 3.953476e-06 44 4.400000e-01 4.861015e-06 45 4.500000e-01 5.921696e-06 46 4.600000e-01 7.136545e-06 47 4.700000e-01 8.498437e-06 48 4.800000e-01 1.000774e-05 49 4.900000e-01 1.167295e-05 50 5.000000e-01 1.349892e-05 51 5.100000e-01 1.548464e-05 52 5.200000e-01 1.762458e-05 53 5.300000e-01 1.990991e-05 54 5.400000e-01 2.232939e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 2.487011e-05 56 5.600000e-01 2.751817e-05 57 5.700000e-01 3.025929e-05 58 5.800000e-01 3.307926e-05 59 5.900000e-01 3.596440e-05 60 6.000000e-01 3.890180e-05 61 6.100000e-01 4.187952e-05 62 6.200000e-01 4.488673e-05 63 6.300000e-01 4.791372e-05 64 6.400000e-01 5.095195e-05 65 6.500000e-01 5.399391e-05 66 6.600000e-01 5.703316e-05 67 6.700000e-01 6.006416e-05 68 6.800000e-01 6.308222e-05 69 6.900000e-01 6.608341e-05 70 7.000000e-01 6.906444e-05 71 7.100000e-01 7.202261e-05 72 7.200000e-01 7.495570e-05 73 7.300000e-01 7.786194e-05 74 7.400000e-01 8.073988e-05 75 7.500000e-01 8.358843e-05 76 7.600000e-01 8.640672e-05 77 7.700000e-01 8.919413e-05 78 7.800000e-01 9.195019e-05 79 7.900000e-01 9.467463e-05 80 8.000000e-01 9.736726e-05 81 8.100000e-01 1.000280e-04 82 8.200000e-01 1.026569e-04 83 8.300000e-01 1.052541e-04 84 8.400000e-01 1.078197e-04 85 8.500000e-01 1.103539e-04 86 8.600000e-01 1.128570e-04 87 8.700000e-01 1.153293e-04 88 8.800000e-01 1.177710e-04 89 8.900000e-01 1.201824e-04 90 9.000000e-01 1.225640e-04 91 9.100000e-01 1.249160e-04 92 9.200000e-01 1.272388e-04 93 9.300000e-01 1.295329e-04 94 9.400000e-01 1.317985e-04 95 9.500000e-01 1.340360e-04 96 9.600000e-01 1.362458e-04 97 9.700000e-01 1.384283e-04 98 9.800000e-01 1.405838e-04 99 9.900000e-01 1.427128e-04 100 1.000000e+00 1.448155e-04 101 1.010000e+00 1.468924e-04 102 1.020000e+00 1.489438e-04 103 1.030000e+00 1.509700e-04 104 1.040000e+00 1.529715e-04 105 1.050000e+00 1.549486e-04 106 1.060000e+00 1.569015e-04 107 1.070000e+00 1.588307e-04 108 1.080000e+00 1.607365e-04 109 1.090000e+00 1.626192e-04 110 1.100000e+00 1.644792e-04 111 1.110000e+00 1.663167e-04 112 1.120000e+00 1.681320e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 1.699256e-04 114 1.140000e+00 1.716977e-04 115 1.150000e+00 1.734485e-04 116 1.160000e+00 1.751784e-04 117 1.170000e+00 1.768877e-04 118 1.180000e+00 1.785767e-04 119 1.190000e+00 1.802456e-04 120 1.200000e+00 1.818947e-04 121 1.210000e+00 1.835244e-04 122 1.220000e+00 1.851347e-04 123 1.230000e+00 1.867262e-04 124 1.240000e+00 1.882988e-04 125 1.250000e+00 1.898531e-04 126 1.260000e+00 1.913891e-04 127 1.270000e+00 1.929072e-04 128 1.280000e+00 1.944075e-04 129 1.290000e+00 1.958904e-04 130 1.300000e+00 1.973560e-04 131 1.310000e+00 1.988046e-04 132 1.320000e+00 2.002365e-04 133 1.330000e+00 2.016517e-04 134 1.340000e+00 2.030506e-04 135 1.350000e+00 2.044334e-04 136 1.360000e+00 2.058003e-04 137 1.370000e+00 2.071515e-04 138 1.380000e+00 2.084872e-04 139 1.390000e+00 2.098076e-04 140 1.400000e+00 2.111129e-04 141 1.410000e+00 2.124033e-04 142 1.420000e+00 2.136790e-04 143 1.430000e+00 2.149402e-04 144 1.440000e+00 2.161871e-04 145 1.450000e+00 2.174198e-04 146 1.460000e+00 2.186386e-04 147 1.470000e+00 2.198436e-04 148 1.480000e+00 2.210349e-04 149 1.490000e+00 2.222129e-04 150 1.500000e+00 2.233776e-04 151 0.000000e+00 3.802857e-12 152 1.000000e-02 5.179405e-12 153 2.000000e-02 7.840940e-12 154 3.000000e-02 1.125575e-11 155 4.000000e-02 1.615433e-11 156 5.000000e-02 2.317943e-11 157 6.000000e-02 3.325101e-11 158 7.000000e-02 4.768511e-11 159 8.000000e-02 6.836303e-11 160 9.000000e-02 9.797210e-11 161 1.000000e-01 1.403476e-10 162 1.100000e-01 2.009572e-10 163 1.200000e-01 2.875868e-10 164 1.300000e-01 4.113064e-10 165 1.400000e-01 5.878303e-10 166 1.500000e-01 8.394210e-10 167 1.600000e-01 1.197526e-09 168 1.700000e-01 1.706327e-09 169 1.800000e-01 2.427883e-09 170 1.900000e-01 3.448995e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 171 2.000000e-01 4.890513e-09 172 2.100000e-01 6.919840e-09 173 2.200000e-01 9.767530e-09 174 2.300000e-01 1.374902e-08 175 2.400000e-01 1.929264e-08 176 2.500000e-01 2.697515e-08 177 2.600000e-01 3.756591e-08 178 2.700000e-01 5.208067e-08 179 2.800000e-01 7.184554e-08 180 2.900000e-01 9.857148e-08 181 3.000000e-01 1.344389e-07 182 3.100000e-01 1.821917e-07 183 3.200000e-01 2.452412e-07 184 3.300000e-01 3.277779e-07 185 3.400000e-01 4.348938e-07 186 3.500000e-01 5.727141e-07 187 3.600000e-01 7.485378e-07 188 3.700000e-01 9.709820e-07 189 3.800000e-01 1.250117e-06 190 3.900000e-01 1.597567e-06 191 4.000000e-01 2.026526e-06 192 4.100000e-01 2.551636e-06 193 4.200000e-01 3.188614e-06 194 4.300000e-01 3.953476e-06 195 4.400000e-01 4.861015e-06 196 4.500000e-01 5.921696e-06 197 4.600000e-01 7.136545e-06 198 4.700000e-01 8.498437e-06 199 4.800000e-01 1.000774e-05 200 4.900000e-01 1.167295e-05 201 5.000000e-01 1.349892e-05 202 5.100000e-01 1.548464e-05 203 5.200000e-01 1.762458e-05 204 5.300000e-01 1.990991e-05 205 5.400000e-01 2.232939e-05 206 5.500000e-01 2.487011e-05 207 5.600000e-01 2.751817e-05 208 5.700000e-01 3.025929e-05 209 5.800000e-01 3.307926e-05 210 5.900000e-01 3.596440e-05 211 6.000000e-01 3.890180e-05 212 6.100000e-01 4.187952e-05 213 6.200000e-01 4.488673e-05 214 6.300000e-01 4.791372e-05 215 6.400000e-01 5.095195e-05 216 6.500000e-01 5.399391e-05 217 6.600000e-01 5.703316e-05 218 6.700000e-01 6.006416e-05 219 6.800000e-01 6.308222e-05 220 6.900000e-01 6.608341e-05 221 7.000000e-01 6.906444e-05 222 7.100000e-01 7.202261e-05 223 7.200000e-01 7.495570e-05 224 7.300000e-01 7.786194e-05 225 7.400000e-01 8.073988e-05 226 7.500000e-01 8.358843e-05 227 7.600000e-01 8.640672e-05 228 7.700000e-01 8.919413e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 229 7.800000e-01 9.195019e-05 230 7.900000e-01 9.467463e-05 231 8.000000e-01 9.736726e-05 232 8.100000e-01 1.000280e-04 233 8.200000e-01 1.026569e-04 234 8.300000e-01 1.052541e-04 235 8.400000e-01 1.078197e-04 236 8.500000e-01 1.103539e-04 237 8.600000e-01 1.128570e-04 238 8.700000e-01 1.153293e-04 239 8.800000e-01 1.177710e-04 240 8.900000e-01 1.201824e-04 241 9.000000e-01 1.225640e-04 242 9.100000e-01 1.249160e-04 243 9.200000e-01 1.272388e-04 244 9.300000e-01 1.295329e-04 245 9.400000e-01 1.317985e-04 246 9.500000e-01 1.340360e-04 247 9.600000e-01 1.362458e-04 248 9.700000e-01 1.384283e-04 249 9.800000e-01 1.405838e-04 250 9.900000e-01 1.427128e-04 251 1.000000e+00 1.448155e-04 252 1.010000e+00 1.468924e-04 253 1.020000e+00 1.489438e-04 254 1.030000e+00 1.509700e-04 255 1.040000e+00 1.529715e-04 256 1.050000e+00 1.549486e-04 257 1.060000e+00 1.569015e-04 258 1.070000e+00 1.588307e-04 259 1.080000e+00 1.607365e-04 260 1.090000e+00 1.626192e-04 261 1.100000e+00 1.644792e-04 262 1.110000e+00 1.663167e-04 263 1.120000e+00 1.681320e-04 264 1.130000e+00 1.699256e-04 265 1.140000e+00 1.716977e-04 266 1.150000e+00 1.734485e-04 267 1.160000e+00 1.751784e-04 268 1.170000e+00 1.768877e-04 269 1.180000e+00 1.785767e-04 270 1.190000e+00 1.802456e-04 271 1.200000e+00 1.818947e-04 272 1.210000e+00 1.835244e-04 273 1.220000e+00 1.851347e-04 274 1.230000e+00 1.867262e-04 275 1.240000e+00 1.882988e-04 276 1.250000e+00 1.898531e-04 277 1.260000e+00 1.913891e-04 278 1.270000e+00 1.929072e-04 279 1.280000e+00 1.944075e-04 280 1.290000e+00 1.958904e-04 281 1.300000e+00 1.973560e-04 282 1.310000e+00 1.988046e-04 283 1.320000e+00 2.002365e-04 284 1.330000e+00 2.016517e-04 285 1.340000e+00 2.030506e-04 286 1.350000e+00 2.044334e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 287 1.360000e+00 2.058003e-04 288 1.370000e+00 2.071515e-04 289 1.380000e+00 2.084872e-04 290 1.390000e+00 2.098076e-04 291 1.400000e+00 2.111129e-04 292 1.410000e+00 2.124033e-04 293 1.420000e+00 2.136790e-04 294 1.430000e+00 2.149402e-04 295 1.440000e+00 2.161871e-04 296 1.450000e+00 2.174198e-04 297 1.460000e+00 2.186386e-04 298 1.470000e+00 2.198436e-04 299 1.480000e+00 2.210349e-04 300 1.490000e+00 2.222129e-04 301 1.500000e+00 2.233776e-04 302 0.000000e+00 3.802857e-12 303 1.000000e-02 5.179405e-12 304 2.000000e-02 7.840940e-12 305 3.000000e-02 1.125575e-11 306 4.000000e-02 1.615433e-11 307 5.000000e-02 2.317943e-11 308 6.000000e-02 3.325101e-11 309 7.000000e-02 4.768511e-11 310 8.000000e-02 6.836303e-11 311 9.000000e-02 9.797210e-11 312 1.000000e-01 1.403476e-10 313 1.100000e-01 2.009572e-10 314 1.200000e-01 2.875868e-10 315 1.300000e-01 4.113064e-10 316 1.400000e-01 5.878303e-10 317 1.500000e-01 8.394210e-10 318 1.600000e-01 1.197526e-09 319 1.700000e-01 1.706327e-09 320 1.800000e-01 2.427883e-09 321 1.900000e-01 3.448995e-09 322 2.000000e-01 4.890513e-09 323 2.100000e-01 6.919840e-09 324 2.200000e-01 9.767530e-09 325 2.300000e-01 1.374902e-08 326 2.400000e-01 1.929264e-08 327 2.500000e-01 2.697515e-08 328 2.600000e-01 3.756591e-08 329 2.700000e-01 5.208067e-08 330 2.800000e-01 7.184554e-08 331 2.900000e-01 9.857148e-08 332 3.000000e-01 1.344389e-07 333 3.100000e-01 1.821917e-07 334 3.200000e-01 2.452412e-07 335 3.300000e-01 3.277779e-07 336 3.400000e-01 4.348938e-07 337 3.500000e-01 5.727141e-07 338 3.600000e-01 7.485378e-07 339 3.700000e-01 9.709820e-07 340 3.800000e-01 1.250117e-06 341 3.900000e-01 1.597567e-06 342 4.000000e-01 2.026526e-06 343 4.100000e-01 2.551636e-06 344 4.200000e-01 3.188614e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 345 4.300000e-01 3.953476e-06 346 4.400000e-01 4.861015e-06 347 4.500000e-01 5.921696e-06 348 4.600000e-01 7.136545e-06 349 4.700000e-01 8.498437e-06 350 4.800000e-01 1.000774e-05 351 4.900000e-01 1.167295e-05 352 5.000000e-01 1.349892e-05 353 5.100000e-01 1.548464e-05 354 5.200000e-01 1.762458e-05 355 5.300000e-01 1.990991e-05 356 5.400000e-01 2.232939e-05 357 5.500000e-01 2.487011e-05 358 5.600000e-01 2.751817e-05 359 5.700000e-01 3.025929e-05 360 5.800000e-01 3.307926e-05 361 5.900000e-01 3.596440e-05 362 6.000000e-01 3.890180e-05 363 6.100000e-01 4.187952e-05 364 6.200000e-01 4.488673e-05 365 6.300000e-01 4.791372e-05 366 6.400000e-01 5.095195e-05 367 6.500000e-01 5.399391e-05 368 6.600000e-01 5.703316e-05 369 6.700000e-01 6.006416e-05 370 6.800000e-01 6.308222e-05 371 6.900000e-01 6.608341e-05 372 7.000000e-01 6.906444e-05 373 7.100000e-01 7.202261e-05 374 7.200000e-01 7.495570e-05 375 7.300000e-01 7.786194e-05 376 7.400000e-01 8.073988e-05 377 7.500000e-01 8.358843e-05 378 7.600000e-01 8.640672e-05 379 7.700000e-01 8.919413e-05 380 7.800000e-01 9.195019e-05 381 7.900000e-01 9.467463e-05 382 8.000000e-01 9.736726e-05 383 8.100000e-01 1.000280e-04 384 8.200000e-01 1.026569e-04 385 8.300000e-01 1.052541e-04 386 8.400000e-01 1.078197e-04 387 8.500000e-01 1.103539e-04 388 8.600000e-01 1.128570e-04 389 8.700000e-01 1.153293e-04 390 8.800000e-01 1.177710e-04 391 8.900000e-01 1.201824e-04 392 9.000000e-01 1.225640e-04 393 9.100000e-01 1.249160e-04 394 9.200000e-01 1.272388e-04 395 9.300000e-01 1.295329e-04 396 9.400000e-01 1.317985e-04 397 9.500000e-01 1.340360e-04 398 9.600000e-01 1.362458e-04 399 9.700000e-01 1.384283e-04 400 9.800000e-01 1.405838e-04 401 9.900000e-01 1.427128e-04 402 1.000000e+00 1.448155e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 403 1.010000e+00 1.468924e-04 404 1.020000e+00 1.489438e-04 405 1.030000e+00 1.509700e-04 406 1.040000e+00 1.529715e-04 407 1.050000e+00 1.549486e-04 408 1.060000e+00 1.569015e-04 409 1.070000e+00 1.588307e-04 410 1.080000e+00 1.607365e-04 411 1.090000e+00 1.626192e-04 412 1.100000e+00 1.644792e-04 413 1.110000e+00 1.663167e-04 414 1.120000e+00 1.681320e-04 415 1.130000e+00 1.699256e-04 416 1.140000e+00 1.716977e-04 417 1.150000e+00 1.734485e-04 418 1.160000e+00 1.751784e-04 419 1.170000e+00 1.768877e-04 420 1.180000e+00 1.785767e-04 421 1.190000e+00 1.802456e-04 422 1.200000e+00 1.818947e-04 423 1.210000e+00 1.835244e-04 424 1.220000e+00 1.851347e-04 425 1.230000e+00 1.867262e-04 426 1.240000e+00 1.882988e-04 427 1.250000e+00 1.898531e-04 428 1.260000e+00 1.913891e-04 429 1.270000e+00 1.929072e-04 430 1.280000e+00 1.944075e-04 431 1.290000e+00 1.958904e-04 432 1.300000e+00 1.973560e-04 433 1.310000e+00 1.988046e-04 434 1.320000e+00 2.002365e-04 435 1.330000e+00 2.016517e-04 436 1.340000e+00 2.030506e-04 437 1.350000e+00 2.044334e-04 438 1.360000e+00 2.058003e-04 439 1.370000e+00 2.071515e-04 440 1.380000e+00 2.084872e-04 441 1.390000e+00 2.098076e-04 442 1.400000e+00 2.111129e-04 443 1.410000e+00 2.124033e-04 444 1.420000e+00 2.136790e-04 445 1.430000e+00 2.149402e-04 446 1.440000e+00 2.161871e-04 447 1.450000e+00 2.174198e-04 448 1.460000e+00 2.186386e-04 449 1.470000e+00 2.198436e-04 450 1.480000e+00 2.210349e-04 451 1.490000e+00 2.222129e-04 452 1.500000e+00 2.233776e-04 453 0.000000e+00 3.802857e-12 454 1.000000e-02 5.179405e-12 455 2.000000e-02 7.840940e-12 456 3.000000e-02 1.125575e-11 457 4.000000e-02 1.615433e-11 458 5.000000e-02 2.317943e-11 459 6.000000e-02 3.325101e-11 460 7.000000e-02 4.768511e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 461 8.000000e-02 6.836303e-11 462 9.000000e-02 9.797210e-11 463 1.000000e-01 1.403476e-10 464 1.100000e-01 2.009572e-10 465 1.200000e-01 2.875868e-10 466 1.300000e-01 4.113064e-10 467 1.400000e-01 5.878303e-10 468 1.500000e-01 8.394210e-10 469 1.600000e-01 1.197526e-09 470 1.700000e-01 1.706327e-09 471 1.800000e-01 2.427883e-09 472 1.900000e-01 3.448995e-09 473 2.000000e-01 4.890513e-09 474 2.100000e-01 6.919840e-09 475 2.200000e-01 9.767530e-09 476 2.300000e-01 1.374902e-08 477 2.400000e-01 1.929264e-08 478 2.500000e-01 2.697515e-08 479 2.600000e-01 3.756591e-08 480 2.700000e-01 5.208067e-08 481 2.800000e-01 7.184554e-08 482 2.900000e-01 9.857148e-08 483 3.000000e-01 1.344389e-07 484 3.100000e-01 1.821917e-07 485 3.200000e-01 2.452412e-07 486 3.300000e-01 3.277779e-07 487 3.400000e-01 4.348938e-07 488 3.500000e-01 5.727141e-07 489 3.600000e-01 7.485378e-07 490 3.700000e-01 9.709820e-07 491 3.800000e-01 1.250117e-06 492 3.900000e-01 1.597567e-06 493 4.000000e-01 2.026526e-06 494 4.100000e-01 2.551636e-06 495 4.200000e-01 3.188614e-06 496 4.300000e-01 3.953476e-06 497 4.400000e-01 4.861015e-06 498 4.500000e-01 5.921696e-06 499 4.600000e-01 7.136545e-06 500 4.700000e-01 8.498437e-06 501 4.800000e-01 1.000774e-05 502 4.900000e-01 1.167295e-05 503 5.000000e-01 1.349892e-05 504 5.100000e-01 1.548464e-05 505 5.200000e-01 1.762458e-05 506 5.300000e-01 1.990991e-05 507 5.400000e-01 2.232939e-05 508 5.500000e-01 2.487011e-05 509 5.600000e-01 2.751817e-05 510 5.700000e-01 3.025929e-05 511 5.800000e-01 3.307926e-05 512 5.900000e-01 3.596440e-05 513 6.000000e-01 3.890180e-05 514 6.100000e-01 4.187952e-05 515 6.200000e-01 4.488673e-05 516 6.300000e-01 4.791372e-05 517 6.400000e-01 5.095195e-05 518 6.500000e-01 5.399391e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 519 6.600000e-01 5.703316e-05 520 6.700000e-01 6.006416e-05 521 6.800000e-01 6.308222e-05 522 6.900000e-01 6.608341e-05 523 7.000000e-01 6.906444e-05 524 7.100000e-01 7.202261e-05 525 7.200000e-01 7.495570e-05 526 7.300000e-01 7.786194e-05 527 7.400000e-01 8.073988e-05 528 7.500000e-01 8.358843e-05 529 7.600000e-01 8.640672e-05 530 7.700000e-01 8.919413e-05 531 7.800000e-01 9.195019e-05 532 7.900000e-01 9.467463e-05 533 8.000000e-01 9.736726e-05 534 8.100000e-01 1.000280e-04 535 8.200000e-01 1.026569e-04 536 8.300000e-01 1.052541e-04 537 8.400000e-01 1.078197e-04 538 8.500000e-01 1.103539e-04 539 8.600000e-01 1.128570e-04 540 8.700000e-01 1.153293e-04 541 8.800000e-01 1.177710e-04 542 8.900000e-01 1.201824e-04 543 9.000000e-01 1.225640e-04 544 9.100000e-01 1.249160e-04 545 9.200000e-01 1.272388e-04 546 9.300000e-01 1.295329e-04 547 9.400000e-01 1.317985e-04 548 9.500000e-01 1.340360e-04 549 9.600000e-01 1.362458e-04 550 9.700000e-01 1.384283e-04 551 9.800000e-01 1.405838e-04 552 9.900000e-01 1.427128e-04 553 1.000000e+00 1.448155e-04 554 1.010000e+00 1.468924e-04 555 1.020000e+00 1.489438e-04 556 1.030000e+00 1.509700e-04 557 1.040000e+00 1.529715e-04 558 1.050000e+00 1.549486e-04 559 1.060000e+00 1.569015e-04 560 1.070000e+00 1.588307e-04 561 1.080000e+00 1.607365e-04 562 1.090000e+00 1.626192e-04 563 1.100000e+00 1.644792e-04 564 1.110000e+00 1.663167e-04 565 1.120000e+00 1.681320e-04 566 1.130000e+00 1.699256e-04 567 1.140000e+00 1.716977e-04 568 1.150000e+00 1.734485e-04 569 1.160000e+00 1.751784e-04 570 1.170000e+00 1.768877e-04 571 1.180000e+00 1.785767e-04 572 1.190000e+00 1.802456e-04 573 1.200000e+00 1.818947e-04 574 1.210000e+00 1.835244e-04 575 1.220000e+00 1.851347e-04 576 1.230000e+00 1.867262e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 577 1.240000e+00 1.882988e-04 578 1.250000e+00 1.898531e-04 579 1.260000e+00 1.913891e-04 580 1.270000e+00 1.929072e-04 581 1.280000e+00 1.944075e-04 582 1.290000e+00 1.958904e-04 583 1.300000e+00 1.973560e-04 584 1.310000e+00 1.988046e-04 585 1.320000e+00 2.002365e-04 586 1.330000e+00 2.016517e-04 587 1.340000e+00 2.030506e-04 588 1.350000e+00 2.044334e-04 589 1.360000e+00 2.058003e-04 590 1.370000e+00 2.071515e-04 591 1.380000e+00 2.084872e-04 592 1.390000e+00 2.098076e-04 593 1.400000e+00 2.111129e-04 594 1.410000e+00 2.124033e-04 595 1.420000e+00 2.136790e-04 596 1.430000e+00 2.149402e-04 597 1.440000e+00 2.161871e-04 598 1.450000e+00 2.174198e-04 599 1.460000e+00 2.186386e-04 600 1.470000e+00 2.198436e-04 601 1.480000e+00 2.210349e-04 602 1.490000e+00 2.222129e-04 603 1.500000e+00 2.233776e-04 604 0.000000e+00 3.802857e-12 605 1.000000e-02 5.179405e-12 606 2.000000e-02 7.840940e-12 607 3.000000e-02 1.125575e-11 608 4.000000e-02 1.615433e-11 609 5.000000e-02 2.317943e-11 610 6.000000e-02 3.325101e-11 611 7.000000e-02 4.768511e-11 612 8.000000e-02 6.836303e-11 613 9.000000e-02 9.797210e-11 614 1.000000e-01 1.403476e-10 615 1.100000e-01 2.009572e-10 616 1.200000e-01 2.875868e-10 617 1.300000e-01 4.113064e-10 618 1.400000e-01 5.878303e-10 619 1.500000e-01 8.394210e-10 620 1.600000e-01 1.197526e-09 621 1.700000e-01 1.706327e-09 622 1.800000e-01 2.427883e-09 623 1.900000e-01 3.448995e-09 624 2.000000e-01 4.890513e-09 625 2.100000e-01 6.919840e-09 626 2.200000e-01 9.767530e-09 627 2.300000e-01 1.374902e-08 628 2.400000e-01 1.929264e-08 629 2.500000e-01 2.697515e-08 630 2.600000e-01 3.756591e-08 631 2.700000e-01 5.208067e-08 632 2.800000e-01 7.184554e-08 633 2.900000e-01 9.857148e-08 634 3.000000e-01 1.344389e-07 Index v-sweep vs#branch -------------------------------------------------------------------------------- 635 3.100000e-01 1.821917e-07 636 3.200000e-01 2.452412e-07 637 3.300000e-01 3.277779e-07 638 3.400000e-01 4.348938e-07 639 3.500000e-01 5.727141e-07 640 3.600000e-01 7.485378e-07 641 3.700000e-01 9.709820e-07 642 3.800000e-01 1.250117e-06 643 3.900000e-01 1.597567e-06 644 4.000000e-01 2.026526e-06 645 4.100000e-01 2.551636e-06 646 4.200000e-01 3.188614e-06 647 4.300000e-01 3.953476e-06 648 4.400000e-01 4.861015e-06 649 4.500000e-01 5.921696e-06 650 4.600000e-01 7.136545e-06 651 4.700000e-01 8.498437e-06 652 4.800000e-01 1.000774e-05 653 4.900000e-01 1.167295e-05 654 5.000000e-01 1.349892e-05 655 5.100000e-01 1.548464e-05 656 5.200000e-01 1.762458e-05 657 5.300000e-01 1.990991e-05 658 5.400000e-01 2.232939e-05 659 5.500000e-01 2.487011e-05 660 5.600000e-01 2.751817e-05 661 5.700000e-01 3.025929e-05 662 5.800000e-01 3.307926e-05 663 5.900000e-01 3.596440e-05 664 6.000000e-01 3.890180e-05 665 6.100000e-01 4.187952e-05 666 6.200000e-01 4.488673e-05 667 6.300000e-01 4.791372e-05 668 6.400000e-01 5.095195e-05 669 6.500000e-01 5.399391e-05 670 6.600000e-01 5.703316e-05 671 6.700000e-01 6.006416e-05 672 6.800000e-01 6.308222e-05 673 6.900000e-01 6.608341e-05 674 7.000000e-01 6.906444e-05 675 7.100000e-01 7.202261e-05 676 7.200000e-01 7.495570e-05 677 7.300000e-01 7.786194e-05 678 7.400000e-01 8.073988e-05 679 7.500000e-01 8.358843e-05 680 7.600000e-01 8.640672e-05 681 7.700000e-01 8.919413e-05 682 7.800000e-01 9.195019e-05 683 7.900000e-01 9.467463e-05 684 8.000000e-01 9.736726e-05 685 8.100000e-01 1.000280e-04 686 8.200000e-01 1.026569e-04 687 8.300000e-01 1.052541e-04 688 8.400000e-01 1.078197e-04 689 8.500000e-01 1.103539e-04 690 8.600000e-01 1.128570e-04 691 8.700000e-01 1.153293e-04 692 8.800000e-01 1.177710e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 693 8.900000e-01 1.201824e-04 694 9.000000e-01 1.225640e-04 695 9.100000e-01 1.249160e-04 696 9.200000e-01 1.272388e-04 697 9.300000e-01 1.295329e-04 698 9.400000e-01 1.317985e-04 699 9.500000e-01 1.340360e-04 700 9.600000e-01 1.362458e-04 701 9.700000e-01 1.384283e-04 702 9.800000e-01 1.405838e-04 703 9.900000e-01 1.427128e-04 704 1.000000e+00 1.448155e-04 705 1.010000e+00 1.468924e-04 706 1.020000e+00 1.489438e-04 707 1.030000e+00 1.509700e-04 708 1.040000e+00 1.529715e-04 709 1.050000e+00 1.549486e-04 710 1.060000e+00 1.569015e-04 711 1.070000e+00 1.588307e-04 712 1.080000e+00 1.607365e-04 713 1.090000e+00 1.626192e-04 714 1.100000e+00 1.644792e-04 715 1.110000e+00 1.663167e-04 716 1.120000e+00 1.681320e-04 717 1.130000e+00 1.699256e-04 718 1.140000e+00 1.716977e-04 719 1.150000e+00 1.734485e-04 720 1.160000e+00 1.751784e-04 721 1.170000e+00 1.768877e-04 722 1.180000e+00 1.785767e-04 723 1.190000e+00 1.802456e-04 724 1.200000e+00 1.818947e-04 725 1.210000e+00 1.835244e-04 726 1.220000e+00 1.851347e-04 727 1.230000e+00 1.867262e-04 728 1.240000e+00 1.882988e-04 729 1.250000e+00 1.898531e-04 730 1.260000e+00 1.913891e-04 731 1.270000e+00 1.929072e-04 732 1.280000e+00 1.944075e-04 733 1.290000e+00 1.958904e-04 734 1.300000e+00 1.973560e-04 735 1.310000e+00 1.988046e-04 736 1.320000e+00 2.002365e-04 737 1.330000e+00 2.016517e-04 738 1.340000e+00 2.030506e-04 739 1.350000e+00 2.044334e-04 740 1.360000e+00 2.058003e-04 741 1.370000e+00 2.071515e-04 742 1.380000e+00 2.084872e-04 743 1.390000e+00 2.098076e-04 744 1.400000e+00 2.111129e-04 745 1.410000e+00 2.124033e-04 746 1.420000e+00 2.136790e-04 747 1.430000e+00 2.149402e-04 748 1.440000e+00 2.161871e-04 749 1.450000e+00 2.174198e-04 750 1.460000e+00 2.186386e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 751 1.470000e+00 2.198436e-04 752 1.480000e+00 2.210349e-04 753 1.490000e+00 2.222129e-04 754 1.500000e+00 2.233776e-04 755 0.000000e+00 3.802857e-12 756 1.000000e-02 5.179405e-12 757 2.000000e-02 7.840940e-12 758 3.000000e-02 1.125575e-11 759 4.000000e-02 1.615433e-11 760 5.000000e-02 2.317943e-11 761 6.000000e-02 3.325101e-11 762 7.000000e-02 4.768511e-11 763 8.000000e-02 6.836303e-11 764 9.000000e-02 9.797210e-11 765 1.000000e-01 1.403476e-10 766 1.100000e-01 2.009572e-10 767 1.200000e-01 2.875868e-10 768 1.300000e-01 4.113064e-10 769 1.400000e-01 5.878303e-10 770 1.500000e-01 8.394210e-10 771 1.600000e-01 1.197526e-09 772 1.700000e-01 1.706327e-09 773 1.800000e-01 2.427883e-09 774 1.900000e-01 3.448995e-09 775 2.000000e-01 4.890513e-09 776 2.100000e-01 6.919840e-09 777 2.200000e-01 9.767530e-09 778 2.300000e-01 1.374902e-08 779 2.400000e-01 1.929264e-08 780 2.500000e-01 2.697515e-08 781 2.600000e-01 3.756591e-08 782 2.700000e-01 5.208067e-08 783 2.800000e-01 7.184554e-08 784 2.900000e-01 9.857148e-08 785 3.000000e-01 1.344389e-07 786 3.100000e-01 1.821917e-07 787 3.200000e-01 2.452412e-07 788 3.300000e-01 3.277779e-07 789 3.400000e-01 4.348938e-07 790 3.500000e-01 5.727141e-07 791 3.600000e-01 7.485378e-07 792 3.700000e-01 9.709820e-07 793 3.800000e-01 1.250117e-06 794 3.900000e-01 1.597567e-06 795 4.000000e-01 2.026526e-06 796 4.100000e-01 2.551636e-06 797 4.200000e-01 3.188614e-06 798 4.300000e-01 3.953476e-06 799 4.400000e-01 4.861015e-06 800 4.500000e-01 5.921696e-06 801 4.600000e-01 7.136545e-06 802 4.700000e-01 8.498437e-06 803 4.800000e-01 1.000774e-05 804 4.900000e-01 1.167295e-05 805 5.000000e-01 1.349892e-05 806 5.100000e-01 1.548464e-05 807 5.200000e-01 1.762458e-05 808 5.300000e-01 1.990991e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 809 5.400000e-01 2.232939e-05 810 5.500000e-01 2.487011e-05 811 5.600000e-01 2.751817e-05 812 5.700000e-01 3.025929e-05 813 5.800000e-01 3.307926e-05 814 5.900000e-01 3.596440e-05 815 6.000000e-01 3.890180e-05 816 6.100000e-01 4.187952e-05 817 6.200000e-01 4.488673e-05 818 6.300000e-01 4.791372e-05 819 6.400000e-01 5.095195e-05 820 6.500000e-01 5.399391e-05 821 6.600000e-01 5.703316e-05 822 6.700000e-01 6.006416e-05 823 6.800000e-01 6.308222e-05 824 6.900000e-01 6.608341e-05 825 7.000000e-01 6.906444e-05 826 7.100000e-01 7.202261e-05 827 7.200000e-01 7.495570e-05 828 7.300000e-01 7.786194e-05 829 7.400000e-01 8.073988e-05 830 7.500000e-01 8.358843e-05 831 7.600000e-01 8.640672e-05 832 7.700000e-01 8.919413e-05 833 7.800000e-01 9.195019e-05 834 7.900000e-01 9.467463e-05 835 8.000000e-01 9.736726e-05 836 8.100000e-01 1.000280e-04 837 8.200000e-01 1.026569e-04 838 8.300000e-01 1.052541e-04 839 8.400000e-01 1.078197e-04 840 8.500000e-01 1.103539e-04 841 8.600000e-01 1.128570e-04 842 8.700000e-01 1.153293e-04 843 8.800000e-01 1.177710e-04 844 8.900000e-01 1.201824e-04 845 9.000000e-01 1.225640e-04 846 9.100000e-01 1.249160e-04 847 9.200000e-01 1.272388e-04 848 9.300000e-01 1.295329e-04 849 9.400000e-01 1.317985e-04 850 9.500000e-01 1.340360e-04 851 9.600000e-01 1.362458e-04 852 9.700000e-01 1.384283e-04 853 9.800000e-01 1.405838e-04 854 9.900000e-01 1.427128e-04 855 1.000000e+00 1.448155e-04 856 1.010000e+00 1.468924e-04 857 1.020000e+00 1.489438e-04 858 1.030000e+00 1.509700e-04 859 1.040000e+00 1.529715e-04 860 1.050000e+00 1.549486e-04 861 1.060000e+00 1.569015e-04 862 1.070000e+00 1.588307e-04 863 1.080000e+00 1.607365e-04 864 1.090000e+00 1.626192e-04 865 1.100000e+00 1.644792e-04 866 1.110000e+00 1.663167e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 867 1.120000e+00 1.681320e-04 868 1.130000e+00 1.699256e-04 869 1.140000e+00 1.716977e-04 870 1.150000e+00 1.734485e-04 871 1.160000e+00 1.751784e-04 872 1.170000e+00 1.768877e-04 873 1.180000e+00 1.785767e-04 874 1.190000e+00 1.802456e-04 875 1.200000e+00 1.818947e-04 876 1.210000e+00 1.835244e-04 877 1.220000e+00 1.851347e-04 878 1.230000e+00 1.867262e-04 879 1.240000e+00 1.882988e-04 880 1.250000e+00 1.898531e-04 881 1.260000e+00 1.913891e-04 882 1.270000e+00 1.929072e-04 883 1.280000e+00 1.944075e-04 884 1.290000e+00 1.958904e-04 885 1.300000e+00 1.973560e-04 886 1.310000e+00 1.988046e-04 887 1.320000e+00 2.002365e-04 888 1.330000e+00 2.016517e-04 889 1.340000e+00 2.030506e-04 890 1.350000e+00 2.044334e-04 891 1.360000e+00 2.058003e-04 892 1.370000e+00 2.071515e-04 893 1.380000e+00 2.084872e-04 894 1.390000e+00 2.098076e-04 895 1.400000e+00 2.111129e-04 896 1.410000e+00 2.124033e-04 897 1.420000e+00 2.136790e-04 898 1.430000e+00 2.149402e-04 899 1.440000e+00 2.161871e-04 900 1.450000e+00 2.174198e-04 901 1.460000e+00 2.186386e-04 902 1.470000e+00 2.198436e-04 903 1.480000e+00 2.210349e-04 904 1.490000e+00 2.222129e-04 905 1.500000e+00 2.233776e-04 906 0.000000e+00 3.802857e-12 907 1.000000e-02 5.179405e-12 908 2.000000e-02 7.840940e-12 909 3.000000e-02 1.125575e-11 910 4.000000e-02 1.615433e-11 911 5.000000e-02 2.317943e-11 912 6.000000e-02 3.325101e-11 913 7.000000e-02 4.768511e-11 914 8.000000e-02 6.836303e-11 915 9.000000e-02 9.797210e-11 916 1.000000e-01 1.403476e-10 917 1.100000e-01 2.009572e-10 918 1.200000e-01 2.875868e-10 919 1.300000e-01 4.113064e-10 920 1.400000e-01 5.878303e-10 921 1.500000e-01 8.394210e-10 922 1.600000e-01 1.197526e-09 923 1.700000e-01 1.706327e-09 924 1.800000e-01 2.427883e-09 Index v-sweep vs#branch -------------------------------------------------------------------------------- 925 1.900000e-01 3.448995e-09 926 2.000000e-01 4.890513e-09 927 2.100000e-01 6.919840e-09 928 2.200000e-01 9.767530e-09 929 2.300000e-01 1.374902e-08 930 2.400000e-01 1.929264e-08 931 2.500000e-01 2.697515e-08 932 2.600000e-01 3.756591e-08 933 2.700000e-01 5.208067e-08 934 2.800000e-01 7.184554e-08 935 2.900000e-01 9.857148e-08 936 3.000000e-01 1.344389e-07 937 3.100000e-01 1.821917e-07 938 3.200000e-01 2.452412e-07 939 3.300000e-01 3.277779e-07 940 3.400000e-01 4.348938e-07 941 3.500000e-01 5.727141e-07 942 3.600000e-01 7.485378e-07 943 3.700000e-01 9.709820e-07 944 3.800000e-01 1.250117e-06 945 3.900000e-01 1.597567e-06 946 4.000000e-01 2.026526e-06 947 4.100000e-01 2.551636e-06 948 4.200000e-01 3.188614e-06 949 4.300000e-01 3.953476e-06 950 4.400000e-01 4.861015e-06 951 4.500000e-01 5.921696e-06 952 4.600000e-01 7.136545e-06 953 4.700000e-01 8.498437e-06 954 4.800000e-01 1.000774e-05 955 4.900000e-01 1.167295e-05 956 5.000000e-01 1.349892e-05 957 5.100000e-01 1.548464e-05 958 5.200000e-01 1.762458e-05 959 5.300000e-01 1.990991e-05 960 5.400000e-01 2.232939e-05 961 5.500000e-01 2.487011e-05 962 5.600000e-01 2.751817e-05 963 5.700000e-01 3.025929e-05 964 5.800000e-01 3.307926e-05 965 5.900000e-01 3.596440e-05 966 6.000000e-01 3.890180e-05 967 6.100000e-01 4.187952e-05 968 6.200000e-01 4.488673e-05 969 6.300000e-01 4.791372e-05 970 6.400000e-01 5.095195e-05 971 6.500000e-01 5.399391e-05 972 6.600000e-01 5.703316e-05 973 6.700000e-01 6.006416e-05 974 6.800000e-01 6.308222e-05 975 6.900000e-01 6.608341e-05 976 7.000000e-01 6.906444e-05 977 7.100000e-01 7.202261e-05 978 7.200000e-01 7.495570e-05 979 7.300000e-01 7.786194e-05 980 7.400000e-01 8.073988e-05 981 7.500000e-01 8.358843e-05 982 7.600000e-01 8.640672e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 983 7.700000e-01 8.919413e-05 984 7.800000e-01 9.195019e-05 985 7.900000e-01 9.467463e-05 986 8.000000e-01 9.736726e-05 987 8.100000e-01 1.000280e-04 988 8.200000e-01 1.026569e-04 989 8.300000e-01 1.052541e-04 990 8.400000e-01 1.078197e-04 991 8.500000e-01 1.103539e-04 992 8.600000e-01 1.128570e-04 993 8.700000e-01 1.153293e-04 994 8.800000e-01 1.177710e-04 995 8.900000e-01 1.201824e-04 996 9.000000e-01 1.225640e-04 997 9.100000e-01 1.249160e-04 998 9.200000e-01 1.272388e-04 999 9.300000e-01 1.295329e-04 1000 9.400000e-01 1.317985e-04 1001 9.500000e-01 1.340360e-04 1002 9.600000e-01 1.362458e-04 1003 9.700000e-01 1.384283e-04 1004 9.800000e-01 1.405838e-04 1005 9.900000e-01 1.427128e-04 1006 1.000000e+00 1.448155e-04 1007 1.010000e+00 1.468924e-04 1008 1.020000e+00 1.489438e-04 1009 1.030000e+00 1.509700e-04 1010 1.040000e+00 1.529715e-04 1011 1.050000e+00 1.549486e-04 1012 1.060000e+00 1.569015e-04 1013 1.070000e+00 1.588307e-04 1014 1.080000e+00 1.607365e-04 1015 1.090000e+00 1.626192e-04 1016 1.100000e+00 1.644792e-04 1017 1.110000e+00 1.663167e-04 1018 1.120000e+00 1.681320e-04 1019 1.130000e+00 1.699256e-04 1020 1.140000e+00 1.716977e-04 1021 1.150000e+00 1.734485e-04 1022 1.160000e+00 1.751784e-04 1023 1.170000e+00 1.768877e-04 1024 1.180000e+00 1.785767e-04 1025 1.190000e+00 1.802456e-04 1026 1.200000e+00 1.818947e-04 1027 1.210000e+00 1.835244e-04 1028 1.220000e+00 1.851347e-04 1029 1.230000e+00 1.867262e-04 1030 1.240000e+00 1.882988e-04 1031 1.250000e+00 1.898531e-04 1032 1.260000e+00 1.913891e-04 1033 1.270000e+00 1.929072e-04 1034 1.280000e+00 1.944075e-04 1035 1.290000e+00 1.958904e-04 1036 1.300000e+00 1.973560e-04 1037 1.310000e+00 1.988046e-04 1038 1.320000e+00 2.002365e-04 1039 1.330000e+00 2.016517e-04 1040 1.340000e+00 2.030506e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1041 1.350000e+00 2.044334e-04 1042 1.360000e+00 2.058003e-04 1043 1.370000e+00 2.071515e-04 1044 1.380000e+00 2.084872e-04 1045 1.390000e+00 2.098076e-04 1046 1.400000e+00 2.111129e-04 1047 1.410000e+00 2.124033e-04 1048 1.420000e+00 2.136790e-04 1049 1.430000e+00 2.149402e-04 1050 1.440000e+00 2.161871e-04 1051 1.450000e+00 2.174198e-04 1052 1.460000e+00 2.186386e-04 1053 1.470000e+00 2.198436e-04 1054 1.480000e+00 2.210349e-04 1055 1.490000e+00 2.222129e-04 1056 1.500000e+00 2.233776e-04 1057 0.000000e+00 3.802857e-12 1058 1.000000e-02 5.179405e-12 1059 2.000000e-02 7.840940e-12 1060 3.000000e-02 1.125575e-11 1061 4.000000e-02 1.615433e-11 1062 5.000000e-02 2.317943e-11 1063 6.000000e-02 3.325101e-11 1064 7.000000e-02 4.768511e-11 1065 8.000000e-02 6.836303e-11 1066 9.000000e-02 9.797210e-11 1067 1.000000e-01 1.403476e-10 1068 1.100000e-01 2.009572e-10 1069 1.200000e-01 2.875868e-10 1070 1.300000e-01 4.113064e-10 1071 1.400000e-01 5.878303e-10 1072 1.500000e-01 8.394210e-10 1073 1.600000e-01 1.197526e-09 1074 1.700000e-01 1.706327e-09 1075 1.800000e-01 2.427883e-09 1076 1.900000e-01 3.448995e-09 1077 2.000000e-01 4.890513e-09 1078 2.100000e-01 6.919840e-09 1079 2.200000e-01 9.767530e-09 1080 2.300000e-01 1.374902e-08 1081 2.400000e-01 1.929264e-08 1082 2.500000e-01 2.697515e-08 1083 2.600000e-01 3.756591e-08 1084 2.700000e-01 5.208067e-08 1085 2.800000e-01 7.184554e-08 1086 2.900000e-01 9.857148e-08 1087 3.000000e-01 1.344389e-07 1088 3.100000e-01 1.821917e-07 1089 3.200000e-01 2.452412e-07 1090 3.300000e-01 3.277779e-07 1091 3.400000e-01 4.348938e-07 1092 3.500000e-01 5.727141e-07 1093 3.600000e-01 7.485378e-07 1094 3.700000e-01 9.709820e-07 1095 3.800000e-01 1.250117e-06 1096 3.900000e-01 1.597567e-06 1097 4.000000e-01 2.026526e-06 1098 4.100000e-01 2.551636e-06 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1099 4.200000e-01 3.188614e-06 1100 4.300000e-01 3.953476e-06 1101 4.400000e-01 4.861015e-06 1102 4.500000e-01 5.921696e-06 1103 4.600000e-01 7.136545e-06 1104 4.700000e-01 8.498437e-06 1105 4.800000e-01 1.000774e-05 1106 4.900000e-01 1.167295e-05 1107 5.000000e-01 1.349892e-05 1108 5.100000e-01 1.548464e-05 1109 5.200000e-01 1.762458e-05 1110 5.300000e-01 1.990991e-05 1111 5.400000e-01 2.232939e-05 1112 5.500000e-01 2.487011e-05 1113 5.600000e-01 2.751817e-05 1114 5.700000e-01 3.025929e-05 1115 5.800000e-01 3.307926e-05 1116 5.900000e-01 3.596440e-05 1117 6.000000e-01 3.890180e-05 1118 6.100000e-01 4.187952e-05 1119 6.200000e-01 4.488673e-05 1120 6.300000e-01 4.791372e-05 1121 6.400000e-01 5.095195e-05 1122 6.500000e-01 5.399391e-05 1123 6.600000e-01 5.703316e-05 1124 6.700000e-01 6.006416e-05 1125 6.800000e-01 6.308222e-05 1126 6.900000e-01 6.608341e-05 1127 7.000000e-01 6.906444e-05 1128 7.100000e-01 7.202261e-05 1129 7.200000e-01 7.495570e-05 1130 7.300000e-01 7.786194e-05 1131 7.400000e-01 8.073988e-05 1132 7.500000e-01 8.358843e-05 1133 7.600000e-01 8.640672e-05 1134 7.700000e-01 8.919413e-05 1135 7.800000e-01 9.195019e-05 1136 7.900000e-01 9.467463e-05 1137 8.000000e-01 9.736726e-05 1138 8.100000e-01 1.000280e-04 1139 8.200000e-01 1.026569e-04 1140 8.300000e-01 1.052541e-04 1141 8.400000e-01 1.078197e-04 1142 8.500000e-01 1.103539e-04 1143 8.600000e-01 1.128570e-04 1144 8.700000e-01 1.153293e-04 1145 8.800000e-01 1.177710e-04 1146 8.900000e-01 1.201824e-04 1147 9.000000e-01 1.225640e-04 1148 9.100000e-01 1.249160e-04 1149 9.200000e-01 1.272388e-04 1150 9.300000e-01 1.295329e-04 1151 9.400000e-01 1.317985e-04 1152 9.500000e-01 1.340360e-04 1153 9.600000e-01 1.362458e-04 1154 9.700000e-01 1.384283e-04 1155 9.800000e-01 1.405838e-04 1156 9.900000e-01 1.427128e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1157 1.000000e+00 1.448155e-04 1158 1.010000e+00 1.468924e-04 1159 1.020000e+00 1.489438e-04 1160 1.030000e+00 1.509700e-04 1161 1.040000e+00 1.529715e-04 1162 1.050000e+00 1.549486e-04 1163 1.060000e+00 1.569015e-04 1164 1.070000e+00 1.588307e-04 1165 1.080000e+00 1.607365e-04 1166 1.090000e+00 1.626192e-04 1167 1.100000e+00 1.644792e-04 1168 1.110000e+00 1.663167e-04 1169 1.120000e+00 1.681320e-04 1170 1.130000e+00 1.699256e-04 1171 1.140000e+00 1.716977e-04 1172 1.150000e+00 1.734485e-04 1173 1.160000e+00 1.751784e-04 1174 1.170000e+00 1.768877e-04 1175 1.180000e+00 1.785767e-04 1176 1.190000e+00 1.802456e-04 1177 1.200000e+00 1.818947e-04 1178 1.210000e+00 1.835244e-04 1179 1.220000e+00 1.851347e-04 1180 1.230000e+00 1.867262e-04 1181 1.240000e+00 1.882988e-04 1182 1.250000e+00 1.898531e-04 1183 1.260000e+00 1.913891e-04 1184 1.270000e+00 1.929072e-04 1185 1.280000e+00 1.944075e-04 1186 1.290000e+00 1.958904e-04 1187 1.300000e+00 1.973560e-04 1188 1.310000e+00 1.988046e-04 1189 1.320000e+00 2.002365e-04 1190 1.330000e+00 2.016517e-04 1191 1.340000e+00 2.030506e-04 1192 1.350000e+00 2.044334e-04 1193 1.360000e+00 2.058003e-04 1194 1.370000e+00 2.071515e-04 1195 1.380000e+00 2.084872e-04 1196 1.390000e+00 2.098076e-04 1197 1.400000e+00 2.111129e-04 1198 1.410000e+00 2.124033e-04 1199 1.420000e+00 2.136790e-04 1200 1.430000e+00 2.149402e-04 1201 1.440000e+00 2.161871e-04 1202 1.450000e+00 2.174198e-04 1203 1.460000e+00 2.186386e-04 1204 1.470000e+00 2.198436e-04 1205 1.480000e+00 2.210349e-04 1206 1.490000e+00 2.222129e-04 1207 1.500000e+00 2.233776e-04 1208 0.000000e+00 3.802857e-12 1209 1.000000e-02 5.179405e-12 1210 2.000000e-02 7.840940e-12 1211 3.000000e-02 1.125575e-11 1212 4.000000e-02 1.615433e-11 1213 5.000000e-02 2.317943e-11 1214 6.000000e-02 3.325101e-11 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1215 7.000000e-02 4.768511e-11 1216 8.000000e-02 6.836303e-11 1217 9.000000e-02 9.797210e-11 1218 1.000000e-01 1.403476e-10 1219 1.100000e-01 2.009572e-10 1220 1.200000e-01 2.875868e-10 1221 1.300000e-01 4.113064e-10 1222 1.400000e-01 5.878303e-10 1223 1.500000e-01 8.394210e-10 1224 1.600000e-01 1.197526e-09 1225 1.700000e-01 1.706327e-09 1226 1.800000e-01 2.427883e-09 1227 1.900000e-01 3.448995e-09 1228 2.000000e-01 4.890513e-09 1229 2.100000e-01 6.919840e-09 1230 2.200000e-01 9.767530e-09 1231 2.300000e-01 1.374902e-08 1232 2.400000e-01 1.929264e-08 1233 2.500000e-01 2.697515e-08 1234 2.600000e-01 3.756591e-08 1235 2.700000e-01 5.208067e-08 1236 2.800000e-01 7.184554e-08 1237 2.900000e-01 9.857148e-08 1238 3.000000e-01 1.344389e-07 1239 3.100000e-01 1.821917e-07 1240 3.200000e-01 2.452412e-07 1241 3.300000e-01 3.277779e-07 1242 3.400000e-01 4.348938e-07 1243 3.500000e-01 5.727141e-07 1244 3.600000e-01 7.485378e-07 1245 3.700000e-01 9.709820e-07 1246 3.800000e-01 1.250117e-06 1247 3.900000e-01 1.597567e-06 1248 4.000000e-01 2.026526e-06 1249 4.100000e-01 2.551636e-06 1250 4.200000e-01 3.188614e-06 1251 4.300000e-01 3.953476e-06 1252 4.400000e-01 4.861015e-06 1253 4.500000e-01 5.921696e-06 1254 4.600000e-01 7.136545e-06 1255 4.700000e-01 8.498437e-06 1256 4.800000e-01 1.000774e-05 1257 4.900000e-01 1.167295e-05 1258 5.000000e-01 1.349892e-05 1259 5.100000e-01 1.548464e-05 1260 5.200000e-01 1.762458e-05 1261 5.300000e-01 1.990991e-05 1262 5.400000e-01 2.232939e-05 1263 5.500000e-01 2.487011e-05 1264 5.600000e-01 2.751817e-05 1265 5.700000e-01 3.025929e-05 1266 5.800000e-01 3.307926e-05 1267 5.900000e-01 3.596440e-05 1268 6.000000e-01 3.890180e-05 1269 6.100000e-01 4.187952e-05 1270 6.200000e-01 4.488673e-05 1271 6.300000e-01 4.791372e-05 1272 6.400000e-01 5.095195e-05 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1273 6.500000e-01 5.399391e-05 1274 6.600000e-01 5.703316e-05 1275 6.700000e-01 6.006416e-05 1276 6.800000e-01 6.308222e-05 1277 6.900000e-01 6.608341e-05 1278 7.000000e-01 6.906444e-05 1279 7.100000e-01 7.202261e-05 1280 7.200000e-01 7.495570e-05 1281 7.300000e-01 7.786194e-05 1282 7.400000e-01 8.073988e-05 1283 7.500000e-01 8.358843e-05 1284 7.600000e-01 8.640672e-05 1285 7.700000e-01 8.919413e-05 1286 7.800000e-01 9.195019e-05 1287 7.900000e-01 9.467463e-05 1288 8.000000e-01 9.736726e-05 1289 8.100000e-01 1.000280e-04 1290 8.200000e-01 1.026569e-04 1291 8.300000e-01 1.052541e-04 1292 8.400000e-01 1.078197e-04 1293 8.500000e-01 1.103539e-04 1294 8.600000e-01 1.128570e-04 1295 8.700000e-01 1.153293e-04 1296 8.800000e-01 1.177710e-04 1297 8.900000e-01 1.201824e-04 1298 9.000000e-01 1.225640e-04 1299 9.100000e-01 1.249160e-04 1300 9.200000e-01 1.272388e-04 1301 9.300000e-01 1.295329e-04 1302 9.400000e-01 1.317985e-04 1303 9.500000e-01 1.340360e-04 1304 9.600000e-01 1.362458e-04 1305 9.700000e-01 1.384283e-04 1306 9.800000e-01 1.405838e-04 1307 9.900000e-01 1.427128e-04 1308 1.000000e+00 1.448155e-04 1309 1.010000e+00 1.468924e-04 1310 1.020000e+00 1.489438e-04 1311 1.030000e+00 1.509700e-04 1312 1.040000e+00 1.529715e-04 1313 1.050000e+00 1.549486e-04 1314 1.060000e+00 1.569015e-04 1315 1.070000e+00 1.588307e-04 1316 1.080000e+00 1.607365e-04 1317 1.090000e+00 1.626192e-04 1318 1.100000e+00 1.644792e-04 1319 1.110000e+00 1.663167e-04 1320 1.120000e+00 1.681320e-04 1321 1.130000e+00 1.699256e-04 1322 1.140000e+00 1.716977e-04 1323 1.150000e+00 1.734485e-04 1324 1.160000e+00 1.751784e-04 1325 1.170000e+00 1.768877e-04 1326 1.180000e+00 1.785767e-04 1327 1.190000e+00 1.802456e-04 1328 1.200000e+00 1.818947e-04 1329 1.210000e+00 1.835244e-04 1330 1.220000e+00 1.851347e-04 Index v-sweep vs#branch -------------------------------------------------------------------------------- 1331 1.230000e+00 1.867262e-04 1332 1.240000e+00 1.882988e-04 1333 1.250000e+00 1.898531e-04 1334 1.260000e+00 1.913891e-04 1335 1.270000e+00 1.929072e-04 1336 1.280000e+00 1.944075e-04 1337 1.290000e+00 1.958904e-04 1338 1.300000e+00 1.973560e-04 1339 1.310000e+00 1.988046e-04 1340 1.320000e+00 2.002365e-04 1341 1.330000e+00 2.016517e-04 1342 1.340000e+00 2.030506e-04 1343 1.350000e+00 2.044334e-04 1344 1.360000e+00 2.058003e-04 1345 1.370000e+00 2.071515e-04 1346 1.380000e+00 2.084872e-04 1347 1.390000e+00 2.098076e-04 1348 1.400000e+00 2.111129e-04 1349 1.410000e+00 2.124033e-04 1350 1.420000e+00 2.136790e-04 1351 1.430000e+00 2.149402e-04 1352 1.440000e+00 2.161871e-04 1353 1.450000e+00 2.174198e-04 1354 1.460000e+00 2.186386e-04 1355 1.470000e+00 2.198436e-04 1356 1.480000e+00 2.210349e-04 1357 1.490000e+00 2.222129e-04 1358 1.500000e+00 2.233776e-04 ngspice-26/tests/bsim3soifd/nmosfd.mod0000644000265600020320000000405712264261473017432 0ustar andreasadmin*Model Card for BSIMFD2.0, floating body FD SOI NMOS *Released on 2/15/99 .Model N1 NMOS Level= 55 +TNOM = 27 TOX = 4.5E-09 TSI = 5e-8 TBOX = 8E-08 +MOBMOD = 0 CAPMOD = 3 SHMOD = 0 +PARAMCHK=0 WINT = 0 LINT = -2E-08 +VTH0 = .52 K1 = .39 K2 = .1 K3 = 0 +KB1 = .95 K3B = 2.2 NLX = 7.2E-08 +DVT0 = .55 DVT1 = .28 DVT2 = -1.4 +DVT0W = 0 DVT1W = 0 DVT2W = 0 +NCH = 3.3E+17 NSUB = 1E+15 NGATE = 1E+20 +DVBD0 = 60.0 DVBD1 = 1.1 VBSA = 0.0 +KB3 = 2.2 DELP = 0.02 +ABP = 0.9 MXC = 0.9 ADICE0 = 0.93 +KBJT1 = 1.0E-08 EDL = .0000005 +NDIODE = 1.13 NTUN = 14.0 +ISBJT = 2e-6 ISDIF = 1e-6 ISTUN = 0.0 ISREC = 1e-5 +XBJT = 0.01 XDIF = 0.01 XREC = 0.01 XTUN = 0.001 +U0 = 352 UA = 1.3E-11 UB = 1.7E-18 UC = -4E-10 +W0 = 1.16E-06 AGS = .25 A1 = 0 A2 = 1 +B0 = .01 B1 = 10 +RDSW = 700 PRWG = 0 PRWB = -.2 WR = 1 +RBODY = 0.0 RBSH = 0.0 +A0 = 1.4 KETA = -.67 VSAT = 135000 +DWG = 0 DWB = 0 +ALPHA0 = 0.0 ALPHA1 = 1.5 BETA0 = 20.5 +AII = 1.2 BII = 0.1e-7 CII = 0.8 DII = 0.6 +VOFF = -.14 NFACTOR = .7 CDSC = .00002 CDSCB = 0 +CDSCD = 0 CIT = 0 +PCLM = 2.9 PVAG = 12 PDIBLC1 = .18 PDIBLC2 = .004 +PDIBLCB = -.234 DROUT = .2 +DELTA = .01 ETA0 = .01 ETAB = 0 +DSUB = .3 RTH0 94 = .006 +CLC = .0000001 CLE = .6 CF = 1E-20 CKAPPA = .6 +CGDL = 1E-20 CGSL = 1E-20 KT1 = -.3 KT1L = 0 +KT2 = .022 UTE = -1.5 UA1 = 4.31E-09 UB1 = -7.61E-18 +UC1 = -5.6E-11 PRT = 760 AT = 22400 +CGSO = 1e-10 CGDO = 1e-10 CJSWG = 5e-10 TT=3e-10 +ASD = 0.3 CSDESW = 1e-12 ngspice-26/tests/bsim3soifd/inv2.out0000644000265600020320000003330012264261473017043 0ustar andreasadmin No. of Data Rows : 251 Circuit: * model = BSIMSOI (FD) Error on line 3 : .model n1 nmos level= 55 tnom = 27 tox = 4.5e-09 tsi = 5e-8 tbox = 8e-08 mobmod = 0 capmod = 3 shmod = 0 paramchk=0 wint = 0 lint = -2e-08 vth0 = .52 k1 = .39 k2 = .1 k3 = 0 kb1 = .95 k3b = 2.2 nlx = 7.2e-08 dvt0 = .55 dvt1 = .28 dvt2 = -1.4 dvt0w = 0 dvt1w = 0 dvt2w = 0 nch = 3.3e+17 nsub = 1e+15 ngate = 1e+20 dvbd0 = 60.0 dvbd1 = 1.1 vbsa = 0.0 kb3 = 2.2 delp = 0.02 abp = 0.9 mxc = 0.9 adice0 = 0.93 kbjt1 = 1.0e-08 edl = .0000005 ndiode = 1.13 ntun = 14.0 isbjt = 2e-6 isdif = 1e-6 istun = 0.0 isrec = 1e-5 xbjt = 0.01 xdif = 0.01 xrec = 0.01 xtun = 0.001 u0 = 352 ua = 1.3e-11 ub = 1.7e-18 uc = -4e-10 w0 = 1.16e-06 ags = .25 a1 = 0 a2 = 1 b0 = .01 b1 = 10 rdsw = 700 prwg = 0 prwb = -.2 wr = 1 rbody = 0.0 rbsh = 0.0 a0 = 1.4 keta = -.67 vsat = 135000 dwg = 0 dwb = 0 alpha0 = 0.0 alpha1 = 1.5 beta0 = 20.5 aii = 1.2 bii = 0.1e-7 cii = 0.8 dii = 0.6 voff = -.14 nfactor = .7 cdsc = .00002 cdscb = 0 cdscd = 0 cit = 0 pclm = 2.9 pvag = 12 pdiblc1 = .18 pdiblc2 = .004 pdiblcb = -.234 drout = .2 delta = .01 eta0 = .01 etab = 0 dsub = .3 rth0 94 = .006 clc = .0000001 cle = .6 cf = 1e-20 ckappa = .6 cgdl = 1e-20 cgsl = 1e-20 kt1 = -.3 kt1l = 0 kt2 = .022 ute = -1.5 ua1 = 4.31e-09 ub1 = -7.61e-18 uc1 = -5.6e-11 prt = 760 at = 22400 cgso = 1e-10 cgdo = 1e-10 cjswg = 5e-10 tt=3e-10 asd = 0.3 csdesw = 1e-12 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. * model = BSIMSOI (FD) -------------------------------------------------------------------------------- Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 2.500000e+00 1 1.000000e-02 1.000000e-02 2.500000e+00 2 2.000000e-02 2.000000e-02 2.500000e+00 3 3.000000e-02 3.000000e-02 2.500000e+00 4 4.000000e-02 4.000000e-02 2.500000e+00 5 5.000000e-02 5.000000e-02 2.500000e+00 6 6.000000e-02 6.000000e-02 2.500000e+00 7 7.000000e-02 7.000000e-02 2.500000e+00 8 8.000000e-02 8.000000e-02 2.500000e+00 9 9.000000e-02 9.000000e-02 2.500000e+00 10 1.000000e-01 1.000000e-01 2.499999e+00 11 1.100000e-01 1.100000e-01 2.499999e+00 12 1.200000e-01 1.200000e-01 2.499999e+00 13 1.300000e-01 1.300000e-01 2.499999e+00 14 1.400000e-01 1.400000e-01 2.499998e+00 15 1.500000e-01 1.500000e-01 2.499997e+00 16 1.600000e-01 1.600000e-01 2.499996e+00 17 1.700000e-01 1.700000e-01 2.499994e+00 18 1.800000e-01 1.800000e-01 2.499991e+00 19 1.900000e-01 1.900000e-01 2.499988e+00 20 2.000000e-01 2.000000e-01 2.499983e+00 21 2.100000e-01 2.100000e-01 2.499976e+00 22 2.200000e-01 2.200000e-01 2.499967e+00 23 2.300000e-01 2.300000e-01 2.499955e+00 24 2.400000e-01 2.400000e-01 2.499938e+00 25 2.500000e-01 2.500000e-01 2.499915e+00 26 2.600000e-01 2.600000e-01 2.499885e+00 27 2.700000e-01 2.700000e-01 2.499846e+00 28 2.800000e-01 2.800000e-01 2.499794e+00 29 2.900000e-01 2.900000e-01 2.499726e+00 30 3.000000e-01 3.000000e-01 2.499639e+00 31 3.100000e-01 3.100000e-01 2.499527e+00 32 3.200000e-01 3.200000e-01 2.499386e+00 33 3.300000e-01 3.300000e-01 2.499207e+00 34 3.400000e-01 3.400000e-01 2.498983e+00 35 3.500000e-01 3.500000e-01 2.498704e+00 36 3.600000e-01 3.600000e-01 2.498361e+00 37 3.700000e-01 3.700000e-01 2.497944e+00 38 3.800000e-01 3.800000e-01 2.497443e+00 39 3.900000e-01 3.900000e-01 2.496858e+00 40 4.000000e-01 4.000000e-01 2.496188e+00 41 4.100000e-01 4.100000e-01 2.495427e+00 42 4.200000e-01 4.200000e-01 2.494563e+00 43 4.300000e-01 4.300000e-01 2.493585e+00 44 4.400000e-01 4.400000e-01 2.492485e+00 45 4.500000e-01 4.500000e-01 2.491259e+00 46 4.600000e-01 4.600000e-01 2.489902e+00 47 4.700000e-01 4.700000e-01 2.488412e+00 48 4.800000e-01 4.800000e-01 2.486790e+00 49 4.900000e-01 4.900000e-01 2.485036e+00 50 5.000000e-01 5.000000e-01 2.483154e+00 51 5.100000e-01 5.100000e-01 2.481145e+00 52 5.200000e-01 5.200000e-01 2.479013e+00 53 5.300000e-01 5.300000e-01 2.476763e+00 54 5.400000e-01 5.400000e-01 2.474398e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 55 5.500000e-01 5.500000e-01 2.471922e+00 56 5.600000e-01 5.600000e-01 2.469340e+00 57 5.700000e-01 5.700000e-01 2.466654e+00 58 5.800000e-01 5.800000e-01 2.463868e+00 59 5.900000e-01 5.900000e-01 2.460983e+00 60 6.000000e-01 6.000000e-01 2.458003e+00 61 6.100000e-01 6.100000e-01 2.454929e+00 62 6.200000e-01 6.200000e-01 2.451762e+00 63 6.300000e-01 6.300000e-01 2.448503e+00 64 6.400000e-01 6.400000e-01 2.445152e+00 65 6.500000e-01 6.500000e-01 2.441710e+00 66 6.600000e-01 6.600000e-01 2.438176e+00 67 6.700000e-01 6.700000e-01 2.434550e+00 68 6.800000e-01 6.800000e-01 2.430830e+00 69 6.900000e-01 6.900000e-01 2.427016e+00 70 7.000000e-01 7.000000e-01 2.423106e+00 71 7.100000e-01 7.100000e-01 2.419099e+00 72 7.200000e-01 7.200000e-01 2.414992e+00 73 7.300000e-01 7.300000e-01 2.410783e+00 74 7.400000e-01 7.400000e-01 2.406471e+00 75 7.500000e-01 7.500000e-01 2.402052e+00 76 7.600000e-01 7.600000e-01 2.397523e+00 77 7.700000e-01 7.700000e-01 2.392881e+00 78 7.800000e-01 7.800000e-01 2.388124e+00 79 7.900000e-01 7.900000e-01 2.383246e+00 80 8.000000e-01 8.000000e-01 2.378245e+00 81 8.100000e-01 8.100000e-01 2.373117e+00 82 8.200000e-01 8.200000e-01 2.367855e+00 83 8.300000e-01 8.300000e-01 2.362457e+00 84 8.400000e-01 8.400000e-01 2.356916e+00 85 8.500000e-01 8.500000e-01 2.351227e+00 86 8.600000e-01 8.600000e-01 2.345385e+00 87 8.700000e-01 8.700000e-01 2.339381e+00 88 8.800000e-01 8.800000e-01 2.333211e+00 89 8.900000e-01 8.900000e-01 2.326865e+00 90 9.000000e-01 9.000000e-01 2.320336e+00 91 9.100000e-01 9.100000e-01 2.313615e+00 92 9.200000e-01 9.200000e-01 2.306693e+00 93 9.300000e-01 9.300000e-01 2.299559e+00 94 9.400000e-01 9.400000e-01 2.292201e+00 95 9.500000e-01 9.500000e-01 2.284608e+00 96 9.600000e-01 9.600000e-01 2.276766e+00 97 9.700000e-01 9.700000e-01 2.268660e+00 98 9.800000e-01 9.800000e-01 2.260273e+00 99 9.900000e-01 9.900000e-01 2.251588e+00 100 1.000000e+00 1.000000e+00 2.242584e+00 101 1.010000e+00 1.010000e+00 2.233239e+00 102 1.020000e+00 1.020000e+00 2.223528e+00 103 1.030000e+00 1.030000e+00 2.213423e+00 104 1.040000e+00 1.040000e+00 2.202892e+00 105 1.050000e+00 1.050000e+00 2.191898e+00 106 1.060000e+00 1.060000e+00 2.180401e+00 107 1.070000e+00 1.070000e+00 2.168352e+00 108 1.080000e+00 1.080000e+00 2.155697e+00 109 1.090000e+00 1.090000e+00 2.142372e+00 110 1.100000e+00 1.100000e+00 2.128298e+00 111 1.110000e+00 1.110000e+00 2.113386e+00 112 1.120000e+00 1.120000e+00 2.097524e+00 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 113 1.130000e+00 1.130000e+00 2.080576e+00 114 1.140000e+00 1.140000e+00 2.062370e+00 115 1.150000e+00 1.150000e+00 2.042688e+00 116 1.160000e+00 1.160000e+00 2.021241e+00 117 1.170000e+00 1.170000e+00 1.997637e+00 118 1.180000e+00 1.180000e+00 1.971318e+00 119 1.190000e+00 1.190000e+00 1.941447e+00 120 1.200000e+00 1.200000e+00 1.906669e+00 121 1.210000e+00 1.210000e+00 1.864529e+00 122 1.220000e+00 1.220000e+00 1.809832e+00 123 1.230000e+00 1.230000e+00 1.727450e+00 124 1.240000e+00 1.240000e+00 1.582257e+00 125 1.250000e+00 1.250000e+00 1.353559e+00 126 1.260000e+00 1.260000e+00 1.099299e+00 127 1.270000e+00 1.270000e+00 8.992398e-01 128 1.280000e+00 1.280000e+00 7.838568e-01 129 1.290000e+00 1.290000e+00 7.155737e-01 130 1.300000e+00 1.300000e+00 6.654759e-01 131 1.310000e+00 1.310000e+00 6.260490e-01 132 1.320000e+00 1.320000e+00 5.923392e-01 133 1.330000e+00 1.330000e+00 5.626805e-01 134 1.340000e+00 1.340000e+00 5.361032e-01 135 1.350000e+00 1.350000e+00 5.119443e-01 136 1.360000e+00 1.360000e+00 4.897461e-01 137 1.370000e+00 1.370000e+00 4.691783e-01 138 1.380000e+00 1.380000e+00 4.499932e-01 139 1.390000e+00 1.390000e+00 4.319993e-01 140 1.400000e+00 1.400000e+00 4.150451e-01 141 1.410000e+00 1.410000e+00 3.990082e-01 142 1.420000e+00 1.420000e+00 3.837883e-01 143 1.430000e+00 1.430000e+00 3.693017e-01 144 1.440000e+00 1.440000e+00 3.554781e-01 145 1.450000e+00 1.450000e+00 3.422574e-01 146 1.460000e+00 1.460000e+00 3.295882e-01 147 1.470000e+00 1.470000e+00 3.174258e-01 148 1.480000e+00 1.480000e+00 3.057313e-01 149 1.490000e+00 1.490000e+00 2.944704e-01 150 1.500000e+00 1.500000e+00 2.836131e-01 151 1.510000e+00 1.510000e+00 2.731324e-01 152 1.520000e+00 1.520000e+00 2.630044e-01 153 1.530000e+00 1.530000e+00 2.532078e-01 154 1.540000e+00 1.540000e+00 2.437231e-01 155 1.550000e+00 1.550000e+00 2.345330e-01 156 1.560000e+00 1.560000e+00 2.256218e-01 157 1.570000e+00 1.570000e+00 2.169751e-01 158 1.580000e+00 1.580000e+00 2.085799e-01 159 1.590000e+00 1.590000e+00 2.004242e-01 160 1.600000e+00 1.600000e+00 1.924973e-01 161 1.610000e+00 1.610000e+00 1.847892e-01 162 1.620000e+00 1.620000e+00 1.772907e-01 163 1.630000e+00 1.630000e+00 1.699934e-01 164 1.640000e+00 1.640000e+00 1.628896e-01 165 1.650000e+00 1.650000e+00 1.559723e-01 166 1.660000e+00 1.660000e+00 1.492349e-01 167 1.670000e+00 1.670000e+00 1.426714e-01 168 1.680000e+00 1.680000e+00 1.362764e-01 169 1.690000e+00 1.690000e+00 1.300448e-01 170 1.700000e+00 1.700000e+00 1.239721e-01 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 171 1.710000e+00 1.710000e+00 1.180541e-01 172 1.720000e+00 1.720000e+00 1.122870e-01 173 1.730000e+00 1.730000e+00 1.066675e-01 174 1.740000e+00 1.740000e+00 1.011926e-01 175 1.750000e+00 1.750000e+00 9.585977e-02 176 1.760000e+00 1.760000e+00 9.066679e-02 177 1.770000e+00 1.770000e+00 8.561186e-02 178 1.780000e+00 1.780000e+00 8.069357e-02 179 1.790000e+00 1.790000e+00 7.591092e-02 180 1.800000e+00 1.800000e+00 7.126333e-02 181 1.810000e+00 1.810000e+00 6.675064e-02 182 1.820000e+00 1.820000e+00 6.237315e-02 183 1.830000e+00 1.830000e+00 5.813162e-02 184 1.840000e+00 1.840000e+00 5.402725e-02 185 1.850000e+00 1.850000e+00 5.006175e-02 186 1.860000e+00 1.860000e+00 4.623727e-02 187 1.870000e+00 1.870000e+00 4.255644e-02 188 1.880000e+00 1.880000e+00 3.902231e-02 189 1.890000e+00 1.890000e+00 3.563829e-02 190 1.900000e+00 1.900000e+00 3.240813e-02 191 1.910000e+00 1.910000e+00 2.933575e-02 192 1.920000e+00 1.920000e+00 2.642516e-02 193 1.930000e+00 1.930000e+00 2.368024e-02 194 1.940000e+00 1.940000e+00 2.110457e-02 195 1.950000e+00 1.950000e+00 1.870115e-02 196 1.960000e+00 1.960000e+00 1.647219e-02 197 1.970000e+00 1.970000e+00 1.441876e-02 198 1.980000e+00 1.980000e+00 1.254061e-02 199 1.990000e+00 1.990000e+00 1.083587e-02 200 2.000000e+00 2.000000e+00 9.300895e-03 201 2.010000e+00 2.010000e+00 7.930178e-03 202 2.020000e+00 2.020000e+00 6.716304e-03 203 2.030000e+00 2.030000e+00 5.649975e-03 204 2.040000e+00 2.040000e+00 4.720000e-03 205 2.050000e+00 2.050000e+00 3.913140e-03 206 2.060000e+00 2.060000e+00 3.214637e-03 207 2.070000e+00 2.070000e+00 2.612804e-03 208 2.080000e+00 2.080000e+00 2.102738e-03 209 2.090000e+00 2.090000e+00 1.678846e-03 210 2.100000e+00 2.100000e+00 1.331486e-03 211 2.110000e+00 2.110000e+00 1.049586e-03 212 2.120000e+00 2.120000e+00 8.225159e-04 213 2.130000e+00 2.130000e+00 6.407779e-04 214 2.140000e+00 2.140000e+00 4.961836e-04 215 2.150000e+00 2.150000e+00 3.818138e-04 216 2.160000e+00 2.160000e+00 2.918965e-04 217 2.170000e+00 2.170000e+00 2.216556e-04 218 2.180000e+00 2.180000e+00 1.671596e-04 219 2.190000e+00 2.190000e+00 1.251861e-04 220 2.200000e+00 2.200000e+00 9.310378e-05 221 2.210000e+00 2.210000e+00 6.877416e-05 222 2.220000e+00 2.220000e+00 5.047019e-05 223 2.230000e+00 2.230000e+00 3.680767e-05 224 2.240000e+00 2.240000e+00 2.668746e-05 225 2.250000e+00 2.250000e+00 1.924567e-05 226 2.260000e+00 2.260000e+00 1.381079e-05 227 2.270000e+00 2.270000e+00 9.866643e-06 228 2.280000e+00 2.280000e+00 7.020805e-06 Index v-sweep v(in) v(out) -------------------------------------------------------------------------------- 229 2.290000e+00 2.290000e+00 4.978102e-06 230 2.300000e+00 2.300000e+00 3.518681e-06 231 2.310000e+00 2.310000e+00 2.480280e-06 232 2.320000e+00 2.320000e+00 1.744116e-06 233 2.330000e+00 2.330000e+00 1.223875e-06 234 2.340000e+00 2.340000e+00 8.572430e-07 235 2.350000e+00 2.350000e+00 5.994986e-07 236 2.360000e+00 2.360000e+00 4.187151e-07 237 2.370000e+00 2.370000e+00 2.921310e-07 238 2.380000e+00 2.380000e+00 2.036254e-07 239 2.390000e+00 2.390000e+00 1.418205e-07 240 2.400000e+00 2.400000e+00 9.870679e-08 241 2.410000e+00 2.410000e+00 6.865905e-08 242 2.420000e+00 2.420000e+00 4.773382e-08 243 2.430000e+00 2.430000e+00 3.317125e-08 244 2.440000e+00 2.440000e+00 2.304252e-08 245 2.450000e+00 2.450000e+00 1.600116e-08 246 2.460000e+00 2.460000e+00 1.110821e-08 247 2.470000e+00 2.470000e+00 7.709443e-09 248 2.480000e+00 2.480000e+00 5.349346e-09 249 2.490000e+00 2.490000e+00 3.710973e-09 250 2.500000e+00 2.500000e+00 2.573910e-09 ngspice-26/tests/bsim3soifd/RampVg2.cir0000644000265600020320000000047112264261473017414 0ustar andreasadmin* BSIMSOI (FD) example * * SOI, Ramp Vg Vd d 0 1.5 Vg g 0 0.0 PULSE 0V 2V .02n .1n .1n .2n .6n Ve e 0 0.0 Vs s 0 0.0 Vb b 0 0.0 m1 d g s e n1 w=10u l=0.25u debug=-1 .option gmin=1e-20 itl1=200 itl2=200 abstol=1e-9 noacct .tran 1p 1.0ns .print tran @m1[Vbs], V(g)/10 .include nmosfd.mod .end ngspice-26/tests/bsim3soifd/inv2.cir0000644000265600020320000000046312264261473017015 0ustar andreasadmin* model = BSIMSOI (FD) * * * SOI Inverter - floating body vin in 0 dc 2.5 vdd dd 0 dc 2.5 vss ss 0 dc 0 ve e 0 dc 1.25 m1 out in dd e p1 w=20u l=0.25u m2 out in ss e n1 w=10u l=0.25u .option itl1=500 gmin=1e-25 noacct .dc vin 0 2.5 0.01 .print dc v(in), v(out) .include nmosfd.mod .include pmosfd.mod ngspice-26/tests/bsim3soifd/ring51.cir0000644000265600020320000000064512264261473017246 0ustar andreasadmin* 51 stage Ring-Osc. vin in out 2 pulse 2 0 0.1n 5n 1 1 1 vdd dd 0 dc 0 pulse 0 2 0 1n 1 1 1 vss ss 0 dc 0 ve sub 0 dc 0 xinv1 dd ss sub in out25 inv25 xinv2 dd ss sub out25 out50 inv25 xinv5 dd ss sub out50 out inv1 xinv11 dd ss sub out buf inv1 cout buf ss 1pF xdum ss dum .option itl1=500 gmin=1e-15 itl4=10 noacct *.dc vdd 0 2 0.01 .tran 0.2n 50n .include nmosfd.mod .include pmosfd.mod .include lib.h .end ngspice-26/tests/bsim3soifd/RampVg2.out0000644000265600020320000014273712264261473017462 0ustar andreasadmin Circuit: * BSIMSOI (FD) example Error on line 3 : .model n1 nmos level= 55 tnom = 27 tox = 4.5e-09 tsi = 5e-8 tbox = 8e-08 mobmod = 0 capmod = 3 shmod = 0 paramchk=0 wint = 0 lint = -2e-08 vth0 = .52 k1 = .39 k2 = .1 k3 = 0 kb1 = .95 k3b = 2.2 nlx = 7.2e-08 dvt0 = .55 dvt1 = .28 dvt2 = -1.4 dvt0w = 0 dvt1w = 0 dvt2w = 0 nch = 3.3e+17 nsub = 1e+15 ngate = 1e+20 dvbd0 = 60.0 dvbd1 = 1.1 vbsa = 0.0 kb3 = 2.2 delp = 0.02 abp = 0.9 mxc = 0.9 adice0 = 0.93 kbjt1 = 1.0e-08 edl = .0000005 ndiode = 1.13 ntun = 14.0 isbjt = 2e-6 isdif = 1e-6 istun = 0.0 isrec = 1e-5 xbjt = 0.01 xdif = 0.01 xrec = 0.01 xtun = 0.001 u0 = 352 ua = 1.3e-11 ub = 1.7e-18 uc = -4e-10 w0 = 1.16e-06 ags = .25 a1 = 0 a2 = 1 b0 = .01 b1 = 10 rdsw = 700 prwg = 0 prwb = -.2 wr = 1 rbody = 0.0 rbsh = 0.0 a0 = 1.4 keta = -.67 vsat = 135000 dwg = 0 dwb = 0 alpha0 = 0.0 alpha1 = 1.5 beta0 = 20.5 aii = 1.2 bii = 0.1e-7 cii = 0.8 dii = 0.6 voff = -.14 nfactor = .7 cdsc = .00002 cdscb = 0 cdscd = 0 cit = 0 pclm = 2.9 pvag = 12 pdiblc1 = .18 pdiblc2 = .004 pdiblcb = -.234 drout = .2 delta = .01 eta0 = .01 etab = 0 dsub = .3 rth0 94 = .006 clc = .0000001 cle = .6 cf = 1e-20 ckappa = .6 cgdl = 1e-20 cgsl = 1e-20 kt1 = -.3 kt1l = 0 kt2 = .022 ute = -1.5 ua1 = 4.31e-09 ub1 = -7.61e-18 uc1 = -5.6e-11 prt = 760 at = 22400 cgso = 1e-10 cgdo = 1e-10 cjswg = 5e-10 tt=3e-10 asd = 0.3 csdesw = 1e-12 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. Initial Transient Solution -------------------------- Node Voltage ---- ------- d 1.5 g 0 e 0 s 0 b 0 vb#branch 0 vs#branch 9.60282e-12 ve#branch 0 vg#branch 1.5e-20 vd#branch -9.60282e-12 No. of Data Rows : 1029 * BSIMSOI (FD) example -------------------------------------------------------------------------------- Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 0 0.000000e+00 0.000000e+00 0.000000e+00 1 1.000000e-14 0.000000e+00 0.000000e+00 2 2.000000e-14 0.000000e+00 0.000000e+00 3 4.000000e-14 0.000000e+00 0.000000e+00 4 8.000000e-14 0.000000e+00 0.000000e+00 5 1.600000e-13 0.000000e+00 0.000000e+00 6 3.200000e-13 0.000000e+00 0.000000e+00 7 6.400000e-13 0.000000e+00 0.000000e+00 8 1.280000e-12 0.000000e+00 0.000000e+00 9 2.280000e-12 0.000000e+00 0.000000e+00 10 3.280000e-12 0.000000e+00 0.000000e+00 11 4.280000e-12 0.000000e+00 0.000000e+00 12 5.280000e-12 0.000000e+00 0.000000e+00 13 6.280000e-12 0.000000e+00 0.000000e+00 14 7.280000e-12 0.000000e+00 0.000000e+00 15 8.280000e-12 0.000000e+00 0.000000e+00 16 9.280000e-12 0.000000e+00 0.000000e+00 17 1.028000e-11 0.000000e+00 0.000000e+00 18 1.128000e-11 0.000000e+00 0.000000e+00 19 1.228000e-11 0.000000e+00 0.000000e+00 20 1.328000e-11 0.000000e+00 0.000000e+00 21 1.428000e-11 0.000000e+00 0.000000e+00 22 1.528000e-11 0.000000e+00 0.000000e+00 23 1.628000e-11 0.000000e+00 0.000000e+00 24 1.728000e-11 0.000000e+00 0.000000e+00 25 1.828000e-11 0.000000e+00 0.000000e+00 26 1.928000e-11 0.000000e+00 0.000000e+00 27 2.000000e-11 0.000000e+00 0.000000e+00 28 2.010000e-11 0.000000e+00 2.000000e-04 29 2.030000e-11 0.000000e+00 6.000000e-04 30 2.070000e-11 0.000000e+00 1.400000e-03 31 2.150000e-11 0.000000e+00 3.000000e-03 32 2.250000e-11 0.000000e+00 5.000000e-03 33 2.350000e-11 0.000000e+00 7.000000e-03 34 2.450000e-11 0.000000e+00 9.000000e-03 35 2.550000e-11 0.000000e+00 1.100000e-02 36 2.650000e-11 0.000000e+00 1.300000e-02 37 2.750000e-11 0.000000e+00 1.500000e-02 38 2.850000e-11 0.000000e+00 1.700000e-02 39 2.950000e-11 0.000000e+00 1.900000e-02 40 3.050000e-11 0.000000e+00 2.100000e-02 41 3.150000e-11 0.000000e+00 2.300000e-02 42 3.250000e-11 0.000000e+00 2.500000e-02 43 3.350000e-11 0.000000e+00 2.700000e-02 44 3.450000e-11 0.000000e+00 2.900000e-02 45 3.550000e-11 0.000000e+00 3.100000e-02 46 3.650000e-11 0.000000e+00 3.300000e-02 47 3.750000e-11 0.000000e+00 3.500000e-02 48 3.850000e-11 0.000000e+00 3.700000e-02 49 3.950000e-11 0.000000e+00 3.900000e-02 50 4.050000e-11 0.000000e+00 4.100000e-02 51 4.150000e-11 0.000000e+00 4.300000e-02 52 4.250000e-11 0.000000e+00 4.500000e-02 53 4.350000e-11 0.000000e+00 4.700000e-02 54 4.450000e-11 0.000000e+00 4.900000e-02 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 55 4.550000e-11 0.000000e+00 5.100000e-02 56 4.650000e-11 0.000000e+00 5.300000e-02 57 4.750000e-11 0.000000e+00 5.500000e-02 58 4.850000e-11 0.000000e+00 5.700000e-02 59 4.950000e-11 0.000000e+00 5.900000e-02 60 5.050000e-11 0.000000e+00 6.100000e-02 61 5.150000e-11 0.000000e+00 6.300000e-02 62 5.250000e-11 0.000000e+00 6.500000e-02 63 5.350000e-11 0.000000e+00 6.700000e-02 64 5.450000e-11 0.000000e+00 6.900000e-02 65 5.550000e-11 0.000000e+00 7.100000e-02 66 5.650000e-11 0.000000e+00 7.300000e-02 67 5.750000e-11 0.000000e+00 7.500000e-02 68 5.850000e-11 0.000000e+00 7.700000e-02 69 5.950000e-11 0.000000e+00 7.900000e-02 70 6.050000e-11 0.000000e+00 8.100000e-02 71 6.150000e-11 0.000000e+00 8.300000e-02 72 6.250000e-11 0.000000e+00 8.500000e-02 73 6.350000e-11 0.000000e+00 8.700000e-02 74 6.450000e-11 0.000000e+00 8.900000e-02 75 6.550000e-11 0.000000e+00 9.100000e-02 76 6.650000e-11 0.000000e+00 9.300000e-02 77 6.750000e-11 0.000000e+00 9.500000e-02 78 6.850000e-11 0.000000e+00 9.700000e-02 79 6.950000e-11 0.000000e+00 9.900000e-02 80 7.050000e-11 0.000000e+00 1.010000e-01 81 7.150000e-11 0.000000e+00 1.030000e-01 82 7.250000e-11 0.000000e+00 1.050000e-01 83 7.350000e-11 0.000000e+00 1.070000e-01 84 7.450000e-11 0.000000e+00 1.090000e-01 85 7.550000e-11 0.000000e+00 1.110000e-01 86 7.650000e-11 0.000000e+00 1.130000e-01 87 7.750000e-11 0.000000e+00 1.150000e-01 88 7.850000e-11 0.000000e+00 1.170000e-01 89 7.950000e-11 0.000000e+00 1.190000e-01 90 8.050000e-11 0.000000e+00 1.210000e-01 91 8.150000e-11 0.000000e+00 1.230000e-01 92 8.250000e-11 0.000000e+00 1.250000e-01 93 8.350000e-11 0.000000e+00 1.270000e-01 94 8.450000e-11 0.000000e+00 1.290000e-01 95 8.550000e-11 0.000000e+00 1.310000e-01 96 8.650000e-11 0.000000e+00 1.330000e-01 97 8.750000e-11 0.000000e+00 1.350000e-01 98 8.850000e-11 0.000000e+00 1.370000e-01 99 8.950000e-11 0.000000e+00 1.390000e-01 100 9.050000e-11 0.000000e+00 1.410000e-01 101 9.150000e-11 0.000000e+00 1.430000e-01 102 9.250000e-11 0.000000e+00 1.450000e-01 103 9.350000e-11 0.000000e+00 1.470000e-01 104 9.450000e-11 0.000000e+00 1.490000e-01 105 9.550000e-11 0.000000e+00 1.510000e-01 106 9.650000e-11 0.000000e+00 1.530000e-01 107 9.750000e-11 0.000000e+00 1.550000e-01 108 9.850000e-11 0.000000e+00 1.570000e-01 109 9.950000e-11 0.000000e+00 1.590000e-01 110 1.005000e-10 0.000000e+00 1.610000e-01 111 1.015000e-10 0.000000e+00 1.630000e-01 112 1.025000e-10 0.000000e+00 1.650000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 113 1.035000e-10 0.000000e+00 1.670000e-01 114 1.045000e-10 0.000000e+00 1.690000e-01 115 1.055000e-10 0.000000e+00 1.710000e-01 116 1.065000e-10 0.000000e+00 1.730000e-01 117 1.075000e-10 0.000000e+00 1.750000e-01 118 1.085000e-10 0.000000e+00 1.770000e-01 119 1.095000e-10 0.000000e+00 1.790000e-01 120 1.105000e-10 0.000000e+00 1.810000e-01 121 1.115000e-10 0.000000e+00 1.830000e-01 122 1.125000e-10 0.000000e+00 1.850000e-01 123 1.135000e-10 0.000000e+00 1.870000e-01 124 1.145000e-10 0.000000e+00 1.890000e-01 125 1.155000e-10 0.000000e+00 1.910000e-01 126 1.165000e-10 0.000000e+00 1.930000e-01 127 1.175000e-10 0.000000e+00 1.950000e-01 128 1.185000e-10 0.000000e+00 1.970000e-01 129 1.195000e-10 0.000000e+00 1.990000e-01 130 1.200000e-10 0.000000e+00 2.000000e-01 131 1.201000e-10 0.000000e+00 2.000000e-01 132 1.203000e-10 0.000000e+00 2.000000e-01 133 1.207000e-10 0.000000e+00 2.000000e-01 134 1.215000e-10 0.000000e+00 2.000000e-01 135 1.225000e-10 0.000000e+00 2.000000e-01 136 1.235000e-10 0.000000e+00 2.000000e-01 137 1.245000e-10 0.000000e+00 2.000000e-01 138 1.255000e-10 0.000000e+00 2.000000e-01 139 1.265000e-10 0.000000e+00 2.000000e-01 140 1.275000e-10 0.000000e+00 2.000000e-01 141 1.285000e-10 0.000000e+00 2.000000e-01 142 1.295000e-10 0.000000e+00 2.000000e-01 143 1.305000e-10 0.000000e+00 2.000000e-01 144 1.315000e-10 0.000000e+00 2.000000e-01 145 1.325000e-10 0.000000e+00 2.000000e-01 146 1.335000e-10 0.000000e+00 2.000000e-01 147 1.345000e-10 0.000000e+00 2.000000e-01 148 1.355000e-10 0.000000e+00 2.000000e-01 149 1.365000e-10 0.000000e+00 2.000000e-01 150 1.375000e-10 0.000000e+00 2.000000e-01 151 1.385000e-10 0.000000e+00 2.000000e-01 152 1.395000e-10 0.000000e+00 2.000000e-01 153 1.405000e-10 0.000000e+00 2.000000e-01 154 1.415000e-10 0.000000e+00 2.000000e-01 155 1.425000e-10 0.000000e+00 2.000000e-01 156 1.435000e-10 0.000000e+00 2.000000e-01 157 1.445000e-10 0.000000e+00 2.000000e-01 158 1.455000e-10 0.000000e+00 2.000000e-01 159 1.465000e-10 0.000000e+00 2.000000e-01 160 1.475000e-10 0.000000e+00 2.000000e-01 161 1.485000e-10 0.000000e+00 2.000000e-01 162 1.495000e-10 0.000000e+00 2.000000e-01 163 1.505000e-10 0.000000e+00 2.000000e-01 164 1.515000e-10 0.000000e+00 2.000000e-01 165 1.525000e-10 0.000000e+00 2.000000e-01 166 1.535000e-10 0.000000e+00 2.000000e-01 167 1.545000e-10 0.000000e+00 2.000000e-01 168 1.555000e-10 0.000000e+00 2.000000e-01 169 1.565000e-10 0.000000e+00 2.000000e-01 170 1.575000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 171 1.585000e-10 0.000000e+00 2.000000e-01 172 1.595000e-10 0.000000e+00 2.000000e-01 173 1.605000e-10 0.000000e+00 2.000000e-01 174 1.615000e-10 0.000000e+00 2.000000e-01 175 1.625000e-10 0.000000e+00 2.000000e-01 176 1.635000e-10 0.000000e+00 2.000000e-01 177 1.645000e-10 0.000000e+00 2.000000e-01 178 1.655000e-10 0.000000e+00 2.000000e-01 179 1.665000e-10 0.000000e+00 2.000000e-01 180 1.675000e-10 0.000000e+00 2.000000e-01 181 1.685000e-10 0.000000e+00 2.000000e-01 182 1.695000e-10 0.000000e+00 2.000000e-01 183 1.705000e-10 0.000000e+00 2.000000e-01 184 1.715000e-10 0.000000e+00 2.000000e-01 185 1.725000e-10 0.000000e+00 2.000000e-01 186 1.735000e-10 0.000000e+00 2.000000e-01 187 1.745000e-10 0.000000e+00 2.000000e-01 188 1.755000e-10 0.000000e+00 2.000000e-01 189 1.765000e-10 0.000000e+00 2.000000e-01 190 1.775000e-10 0.000000e+00 2.000000e-01 191 1.785000e-10 0.000000e+00 2.000000e-01 192 1.795000e-10 0.000000e+00 2.000000e-01 193 1.805000e-10 0.000000e+00 2.000000e-01 194 1.815000e-10 0.000000e+00 2.000000e-01 195 1.825000e-10 0.000000e+00 2.000000e-01 196 1.835000e-10 0.000000e+00 2.000000e-01 197 1.845000e-10 0.000000e+00 2.000000e-01 198 1.855000e-10 0.000000e+00 2.000000e-01 199 1.865000e-10 0.000000e+00 2.000000e-01 200 1.875000e-10 0.000000e+00 2.000000e-01 201 1.885000e-10 0.000000e+00 2.000000e-01 202 1.895000e-10 0.000000e+00 2.000000e-01 203 1.905000e-10 0.000000e+00 2.000000e-01 204 1.915000e-10 0.000000e+00 2.000000e-01 205 1.925000e-10 0.000000e+00 2.000000e-01 206 1.935000e-10 0.000000e+00 2.000000e-01 207 1.945000e-10 0.000000e+00 2.000000e-01 208 1.955000e-10 0.000000e+00 2.000000e-01 209 1.965000e-10 0.000000e+00 2.000000e-01 210 1.975000e-10 0.000000e+00 2.000000e-01 211 1.985000e-10 0.000000e+00 2.000000e-01 212 1.995000e-10 0.000000e+00 2.000000e-01 213 2.005000e-10 0.000000e+00 2.000000e-01 214 2.015000e-10 0.000000e+00 2.000000e-01 215 2.025000e-10 0.000000e+00 2.000000e-01 216 2.035000e-10 0.000000e+00 2.000000e-01 217 2.045000e-10 0.000000e+00 2.000000e-01 218 2.055000e-10 0.000000e+00 2.000000e-01 219 2.065000e-10 0.000000e+00 2.000000e-01 220 2.075000e-10 0.000000e+00 2.000000e-01 221 2.085000e-10 0.000000e+00 2.000000e-01 222 2.095000e-10 0.000000e+00 2.000000e-01 223 2.105000e-10 0.000000e+00 2.000000e-01 224 2.115000e-10 0.000000e+00 2.000000e-01 225 2.125000e-10 0.000000e+00 2.000000e-01 226 2.135000e-10 0.000000e+00 2.000000e-01 227 2.145000e-10 0.000000e+00 2.000000e-01 228 2.155000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 229 2.165000e-10 0.000000e+00 2.000000e-01 230 2.175000e-10 0.000000e+00 2.000000e-01 231 2.185000e-10 0.000000e+00 2.000000e-01 232 2.195000e-10 0.000000e+00 2.000000e-01 233 2.205000e-10 0.000000e+00 2.000000e-01 234 2.215000e-10 0.000000e+00 2.000000e-01 235 2.225000e-10 0.000000e+00 2.000000e-01 236 2.235000e-10 0.000000e+00 2.000000e-01 237 2.245000e-10 0.000000e+00 2.000000e-01 238 2.255000e-10 0.000000e+00 2.000000e-01 239 2.265000e-10 0.000000e+00 2.000000e-01 240 2.275000e-10 0.000000e+00 2.000000e-01 241 2.285000e-10 0.000000e+00 2.000000e-01 242 2.295000e-10 0.000000e+00 2.000000e-01 243 2.305000e-10 0.000000e+00 2.000000e-01 244 2.315000e-10 0.000000e+00 2.000000e-01 245 2.325000e-10 0.000000e+00 2.000000e-01 246 2.335000e-10 0.000000e+00 2.000000e-01 247 2.345000e-10 0.000000e+00 2.000000e-01 248 2.355000e-10 0.000000e+00 2.000000e-01 249 2.365000e-10 0.000000e+00 2.000000e-01 250 2.375000e-10 0.000000e+00 2.000000e-01 251 2.385000e-10 0.000000e+00 2.000000e-01 252 2.395000e-10 0.000000e+00 2.000000e-01 253 2.405000e-10 0.000000e+00 2.000000e-01 254 2.415000e-10 0.000000e+00 2.000000e-01 255 2.425000e-10 0.000000e+00 2.000000e-01 256 2.435000e-10 0.000000e+00 2.000000e-01 257 2.445000e-10 0.000000e+00 2.000000e-01 258 2.455000e-10 0.000000e+00 2.000000e-01 259 2.465000e-10 0.000000e+00 2.000000e-01 260 2.475000e-10 0.000000e+00 2.000000e-01 261 2.485000e-10 0.000000e+00 2.000000e-01 262 2.495000e-10 0.000000e+00 2.000000e-01 263 2.505000e-10 0.000000e+00 2.000000e-01 264 2.515000e-10 0.000000e+00 2.000000e-01 265 2.525000e-10 0.000000e+00 2.000000e-01 266 2.535000e-10 0.000000e+00 2.000000e-01 267 2.545000e-10 0.000000e+00 2.000000e-01 268 2.555000e-10 0.000000e+00 2.000000e-01 269 2.565000e-10 0.000000e+00 2.000000e-01 270 2.575000e-10 0.000000e+00 2.000000e-01 271 2.585000e-10 0.000000e+00 2.000000e-01 272 2.595000e-10 0.000000e+00 2.000000e-01 273 2.605000e-10 0.000000e+00 2.000000e-01 274 2.615000e-10 0.000000e+00 2.000000e-01 275 2.625000e-10 0.000000e+00 2.000000e-01 276 2.635000e-10 0.000000e+00 2.000000e-01 277 2.645000e-10 0.000000e+00 2.000000e-01 278 2.655000e-10 0.000000e+00 2.000000e-01 279 2.665000e-10 0.000000e+00 2.000000e-01 280 2.675000e-10 0.000000e+00 2.000000e-01 281 2.685000e-10 0.000000e+00 2.000000e-01 282 2.695000e-10 0.000000e+00 2.000000e-01 283 2.705000e-10 0.000000e+00 2.000000e-01 284 2.715000e-10 0.000000e+00 2.000000e-01 285 2.725000e-10 0.000000e+00 2.000000e-01 286 2.735000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 287 2.745000e-10 0.000000e+00 2.000000e-01 288 2.755000e-10 0.000000e+00 2.000000e-01 289 2.765000e-10 0.000000e+00 2.000000e-01 290 2.775000e-10 0.000000e+00 2.000000e-01 291 2.785000e-10 0.000000e+00 2.000000e-01 292 2.795000e-10 0.000000e+00 2.000000e-01 293 2.805000e-10 0.000000e+00 2.000000e-01 294 2.815000e-10 0.000000e+00 2.000000e-01 295 2.825000e-10 0.000000e+00 2.000000e-01 296 2.835000e-10 0.000000e+00 2.000000e-01 297 2.845000e-10 0.000000e+00 2.000000e-01 298 2.855000e-10 0.000000e+00 2.000000e-01 299 2.865000e-10 0.000000e+00 2.000000e-01 300 2.875000e-10 0.000000e+00 2.000000e-01 301 2.885000e-10 0.000000e+00 2.000000e-01 302 2.895000e-10 0.000000e+00 2.000000e-01 303 2.905000e-10 0.000000e+00 2.000000e-01 304 2.915000e-10 0.000000e+00 2.000000e-01 305 2.925000e-10 0.000000e+00 2.000000e-01 306 2.935000e-10 0.000000e+00 2.000000e-01 307 2.945000e-10 0.000000e+00 2.000000e-01 308 2.955000e-10 0.000000e+00 2.000000e-01 309 2.965000e-10 0.000000e+00 2.000000e-01 310 2.975000e-10 0.000000e+00 2.000000e-01 311 2.985000e-10 0.000000e+00 2.000000e-01 312 2.995000e-10 0.000000e+00 2.000000e-01 313 3.005000e-10 0.000000e+00 2.000000e-01 314 3.015000e-10 0.000000e+00 2.000000e-01 315 3.025000e-10 0.000000e+00 2.000000e-01 316 3.035000e-10 0.000000e+00 2.000000e-01 317 3.045000e-10 0.000000e+00 2.000000e-01 318 3.055000e-10 0.000000e+00 2.000000e-01 319 3.065000e-10 0.000000e+00 2.000000e-01 320 3.075000e-10 0.000000e+00 2.000000e-01 321 3.085000e-10 0.000000e+00 2.000000e-01 322 3.095000e-10 0.000000e+00 2.000000e-01 323 3.105000e-10 0.000000e+00 2.000000e-01 324 3.115000e-10 0.000000e+00 2.000000e-01 325 3.125000e-10 0.000000e+00 2.000000e-01 326 3.135000e-10 0.000000e+00 2.000000e-01 327 3.145000e-10 0.000000e+00 2.000000e-01 328 3.155000e-10 0.000000e+00 2.000000e-01 329 3.165000e-10 0.000000e+00 2.000000e-01 330 3.175000e-10 0.000000e+00 2.000000e-01 331 3.185000e-10 0.000000e+00 2.000000e-01 332 3.195000e-10 0.000000e+00 2.000000e-01 333 3.200000e-10 0.000000e+00 2.000000e-01 334 3.201000e-10 0.000000e+00 1.998000e-01 335 3.203000e-10 0.000000e+00 1.994000e-01 336 3.207000e-10 0.000000e+00 1.986000e-01 337 3.215000e-10 0.000000e+00 1.970000e-01 338 3.225000e-10 0.000000e+00 1.950000e-01 339 3.235000e-10 0.000000e+00 1.930000e-01 340 3.245000e-10 0.000000e+00 1.910000e-01 341 3.255000e-10 0.000000e+00 1.890000e-01 342 3.265000e-10 0.000000e+00 1.870000e-01 343 3.275000e-10 0.000000e+00 1.850000e-01 344 3.285000e-10 0.000000e+00 1.830000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 345 3.295000e-10 0.000000e+00 1.810000e-01 346 3.305000e-10 0.000000e+00 1.790000e-01 347 3.315000e-10 0.000000e+00 1.770000e-01 348 3.325000e-10 0.000000e+00 1.750000e-01 349 3.335000e-10 0.000000e+00 1.730000e-01 350 3.345000e-10 0.000000e+00 1.710000e-01 351 3.355000e-10 0.000000e+00 1.690000e-01 352 3.365000e-10 0.000000e+00 1.670000e-01 353 3.375000e-10 0.000000e+00 1.650000e-01 354 3.385000e-10 0.000000e+00 1.630000e-01 355 3.395000e-10 0.000000e+00 1.610000e-01 356 3.405000e-10 0.000000e+00 1.590000e-01 357 3.415000e-10 0.000000e+00 1.570000e-01 358 3.425000e-10 0.000000e+00 1.550000e-01 359 3.435000e-10 0.000000e+00 1.530000e-01 360 3.445000e-10 0.000000e+00 1.510000e-01 361 3.455000e-10 0.000000e+00 1.490000e-01 362 3.465000e-10 0.000000e+00 1.470000e-01 363 3.475000e-10 0.000000e+00 1.450000e-01 364 3.485000e-10 0.000000e+00 1.430000e-01 365 3.495000e-10 0.000000e+00 1.410000e-01 366 3.505000e-10 0.000000e+00 1.390000e-01 367 3.515000e-10 0.000000e+00 1.370000e-01 368 3.525000e-10 0.000000e+00 1.350000e-01 369 3.535000e-10 0.000000e+00 1.330000e-01 370 3.545000e-10 0.000000e+00 1.310000e-01 371 3.555000e-10 0.000000e+00 1.290000e-01 372 3.565000e-10 0.000000e+00 1.270000e-01 373 3.575000e-10 0.000000e+00 1.250000e-01 374 3.585000e-10 0.000000e+00 1.230000e-01 375 3.595000e-10 0.000000e+00 1.210000e-01 376 3.605000e-10 0.000000e+00 1.190000e-01 377 3.615000e-10 0.000000e+00 1.170000e-01 378 3.625000e-10 0.000000e+00 1.150000e-01 379 3.635000e-10 0.000000e+00 1.130000e-01 380 3.645000e-10 0.000000e+00 1.110000e-01 381 3.655000e-10 0.000000e+00 1.090000e-01 382 3.665000e-10 0.000000e+00 1.070000e-01 383 3.675000e-10 0.000000e+00 1.050000e-01 384 3.685000e-10 0.000000e+00 1.030000e-01 385 3.695000e-10 0.000000e+00 1.010000e-01 386 3.705000e-10 0.000000e+00 9.900000e-02 387 3.715000e-10 0.000000e+00 9.700000e-02 388 3.725000e-10 0.000000e+00 9.500000e-02 389 3.735000e-10 0.000000e+00 9.300000e-02 390 3.745000e-10 0.000000e+00 9.100000e-02 391 3.755000e-10 0.000000e+00 8.900000e-02 392 3.765000e-10 0.000000e+00 8.700000e-02 393 3.775000e-10 0.000000e+00 8.500000e-02 394 3.785000e-10 0.000000e+00 8.300000e-02 395 3.795000e-10 0.000000e+00 8.100000e-02 396 3.805000e-10 0.000000e+00 7.900000e-02 397 3.815000e-10 0.000000e+00 7.700000e-02 398 3.825000e-10 0.000000e+00 7.500000e-02 399 3.835000e-10 0.000000e+00 7.300000e-02 400 3.845000e-10 0.000000e+00 7.100000e-02 401 3.855000e-10 0.000000e+00 6.900000e-02 402 3.865000e-10 0.000000e+00 6.700000e-02 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 403 3.875000e-10 0.000000e+00 6.500000e-02 404 3.885000e-10 0.000000e+00 6.300000e-02 405 3.895000e-10 0.000000e+00 6.100000e-02 406 3.905000e-10 0.000000e+00 5.900000e-02 407 3.915000e-10 0.000000e+00 5.700000e-02 408 3.925000e-10 0.000000e+00 5.500000e-02 409 3.935000e-10 0.000000e+00 5.300000e-02 410 3.945000e-10 0.000000e+00 5.100000e-02 411 3.955000e-10 0.000000e+00 4.900000e-02 412 3.965000e-10 0.000000e+00 4.700000e-02 413 3.975000e-10 0.000000e+00 4.500000e-02 414 3.985000e-10 0.000000e+00 4.300000e-02 415 3.995000e-10 0.000000e+00 4.100000e-02 416 4.005000e-10 0.000000e+00 3.900000e-02 417 4.015000e-10 0.000000e+00 3.700000e-02 418 4.025000e-10 0.000000e+00 3.500000e-02 419 4.035000e-10 0.000000e+00 3.300000e-02 420 4.045000e-10 0.000000e+00 3.100000e-02 421 4.055000e-10 0.000000e+00 2.900000e-02 422 4.065000e-10 0.000000e+00 2.700000e-02 423 4.075000e-10 0.000000e+00 2.500000e-02 424 4.085000e-10 0.000000e+00 2.300000e-02 425 4.095000e-10 0.000000e+00 2.100000e-02 426 4.105000e-10 0.000000e+00 1.900000e-02 427 4.115000e-10 0.000000e+00 1.700000e-02 428 4.125000e-10 0.000000e+00 1.500000e-02 429 4.135000e-10 0.000000e+00 1.300000e-02 430 4.145000e-10 0.000000e+00 1.100000e-02 431 4.155000e-10 0.000000e+00 9.000000e-03 432 4.165000e-10 0.000000e+00 7.000000e-03 433 4.175000e-10 0.000000e+00 5.000000e-03 434 4.185000e-10 0.000000e+00 3.000000e-03 435 4.195000e-10 0.000000e+00 1.000000e-03 436 4.200000e-10 0.000000e+00 3.230922e-17 437 4.201000e-10 0.000000e+00 0.000000e+00 438 4.203000e-10 0.000000e+00 0.000000e+00 439 4.207000e-10 0.000000e+00 0.000000e+00 440 4.215000e-10 0.000000e+00 0.000000e+00 441 4.225000e-10 0.000000e+00 0.000000e+00 442 4.235000e-10 0.000000e+00 0.000000e+00 443 4.245000e-10 0.000000e+00 0.000000e+00 444 4.255000e-10 0.000000e+00 0.000000e+00 445 4.265000e-10 0.000000e+00 0.000000e+00 446 4.275000e-10 0.000000e+00 0.000000e+00 447 4.285000e-10 0.000000e+00 0.000000e+00 448 4.295000e-10 0.000000e+00 0.000000e+00 449 4.305000e-10 0.000000e+00 0.000000e+00 450 4.315000e-10 0.000000e+00 0.000000e+00 451 4.325000e-10 0.000000e+00 0.000000e+00 452 4.335000e-10 0.000000e+00 0.000000e+00 453 4.345000e-10 0.000000e+00 0.000000e+00 454 4.355000e-10 0.000000e+00 0.000000e+00 455 4.365000e-10 0.000000e+00 0.000000e+00 456 4.375000e-10 0.000000e+00 0.000000e+00 457 4.385000e-10 0.000000e+00 0.000000e+00 458 4.395000e-10 0.000000e+00 0.000000e+00 459 4.405000e-10 0.000000e+00 0.000000e+00 460 4.415000e-10 0.000000e+00 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 461 4.425000e-10 0.000000e+00 0.000000e+00 462 4.435000e-10 0.000000e+00 0.000000e+00 463 4.445000e-10 0.000000e+00 0.000000e+00 464 4.455000e-10 0.000000e+00 0.000000e+00 465 4.465000e-10 0.000000e+00 0.000000e+00 466 4.475000e-10 0.000000e+00 0.000000e+00 467 4.485000e-10 0.000000e+00 0.000000e+00 468 4.495000e-10 0.000000e+00 0.000000e+00 469 4.505000e-10 0.000000e+00 0.000000e+00 470 4.515000e-10 0.000000e+00 0.000000e+00 471 4.525000e-10 0.000000e+00 0.000000e+00 472 4.535000e-10 0.000000e+00 0.000000e+00 473 4.545000e-10 0.000000e+00 0.000000e+00 474 4.555000e-10 0.000000e+00 0.000000e+00 475 4.565000e-10 0.000000e+00 0.000000e+00 476 4.575000e-10 0.000000e+00 0.000000e+00 477 4.585000e-10 0.000000e+00 0.000000e+00 478 4.595000e-10 0.000000e+00 0.000000e+00 479 4.605000e-10 0.000000e+00 0.000000e+00 480 4.615000e-10 0.000000e+00 0.000000e+00 481 4.625000e-10 0.000000e+00 0.000000e+00 482 4.635000e-10 0.000000e+00 0.000000e+00 483 4.645000e-10 0.000000e+00 0.000000e+00 484 4.655000e-10 0.000000e+00 0.000000e+00 485 4.665000e-10 0.000000e+00 0.000000e+00 486 4.675000e-10 0.000000e+00 0.000000e+00 487 4.685000e-10 0.000000e+00 0.000000e+00 488 4.695000e-10 0.000000e+00 0.000000e+00 489 4.705000e-10 0.000000e+00 0.000000e+00 490 4.715000e-10 0.000000e+00 0.000000e+00 491 4.725000e-10 0.000000e+00 0.000000e+00 492 4.735000e-10 0.000000e+00 0.000000e+00 493 4.745000e-10 0.000000e+00 0.000000e+00 494 4.755000e-10 0.000000e+00 0.000000e+00 495 4.765000e-10 0.000000e+00 0.000000e+00 496 4.775000e-10 0.000000e+00 0.000000e+00 497 4.785000e-10 0.000000e+00 0.000000e+00 498 4.795000e-10 0.000000e+00 0.000000e+00 499 4.805000e-10 0.000000e+00 0.000000e+00 500 4.815000e-10 0.000000e+00 0.000000e+00 501 4.825000e-10 0.000000e+00 0.000000e+00 502 4.835000e-10 0.000000e+00 0.000000e+00 503 4.845000e-10 0.000000e+00 0.000000e+00 504 4.855000e-10 0.000000e+00 0.000000e+00 505 4.865000e-10 0.000000e+00 0.000000e+00 506 4.875000e-10 0.000000e+00 0.000000e+00 507 4.885000e-10 0.000000e+00 0.000000e+00 508 4.895000e-10 0.000000e+00 0.000000e+00 509 4.905000e-10 0.000000e+00 0.000000e+00 510 4.915000e-10 0.000000e+00 0.000000e+00 511 4.925000e-10 0.000000e+00 0.000000e+00 512 4.935000e-10 0.000000e+00 0.000000e+00 513 4.945000e-10 0.000000e+00 0.000000e+00 514 4.955000e-10 0.000000e+00 0.000000e+00 515 4.965000e-10 0.000000e+00 0.000000e+00 516 4.975000e-10 0.000000e+00 0.000000e+00 517 4.985000e-10 0.000000e+00 0.000000e+00 518 4.995000e-10 0.000000e+00 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 519 5.005000e-10 0.000000e+00 0.000000e+00 520 5.015000e-10 0.000000e+00 0.000000e+00 521 5.025000e-10 0.000000e+00 0.000000e+00 522 5.035000e-10 0.000000e+00 0.000000e+00 523 5.045000e-10 0.000000e+00 0.000000e+00 524 5.055000e-10 0.000000e+00 0.000000e+00 525 5.065000e-10 0.000000e+00 0.000000e+00 526 5.075000e-10 0.000000e+00 0.000000e+00 527 5.085000e-10 0.000000e+00 0.000000e+00 528 5.095000e-10 0.000000e+00 0.000000e+00 529 5.105000e-10 0.000000e+00 0.000000e+00 530 5.115000e-10 0.000000e+00 0.000000e+00 531 5.125000e-10 0.000000e+00 0.000000e+00 532 5.135000e-10 0.000000e+00 0.000000e+00 533 5.145000e-10 0.000000e+00 0.000000e+00 534 5.155000e-10 0.000000e+00 0.000000e+00 535 5.165000e-10 0.000000e+00 0.000000e+00 536 5.175000e-10 0.000000e+00 0.000000e+00 537 5.185000e-10 0.000000e+00 0.000000e+00 538 5.195000e-10 0.000000e+00 0.000000e+00 539 5.205000e-10 0.000000e+00 0.000000e+00 540 5.215000e-10 0.000000e+00 0.000000e+00 541 5.225000e-10 0.000000e+00 0.000000e+00 542 5.235000e-10 0.000000e+00 0.000000e+00 543 5.245000e-10 0.000000e+00 0.000000e+00 544 5.255000e-10 0.000000e+00 0.000000e+00 545 5.265000e-10 0.000000e+00 0.000000e+00 546 5.275000e-10 0.000000e+00 0.000000e+00 547 5.285000e-10 0.000000e+00 0.000000e+00 548 5.295000e-10 0.000000e+00 0.000000e+00 549 5.305000e-10 0.000000e+00 0.000000e+00 550 5.315000e-10 0.000000e+00 0.000000e+00 551 5.325000e-10 0.000000e+00 0.000000e+00 552 5.335000e-10 0.000000e+00 0.000000e+00 553 5.345000e-10 0.000000e+00 0.000000e+00 554 5.355000e-10 0.000000e+00 0.000000e+00 555 5.365000e-10 0.000000e+00 0.000000e+00 556 5.375000e-10 0.000000e+00 0.000000e+00 557 5.385000e-10 0.000000e+00 0.000000e+00 558 5.395000e-10 0.000000e+00 0.000000e+00 559 5.405000e-10 0.000000e+00 0.000000e+00 560 5.415000e-10 0.000000e+00 0.000000e+00 561 5.425000e-10 0.000000e+00 0.000000e+00 562 5.435000e-10 0.000000e+00 0.000000e+00 563 5.445000e-10 0.000000e+00 0.000000e+00 564 5.455000e-10 0.000000e+00 0.000000e+00 565 5.465000e-10 0.000000e+00 0.000000e+00 566 5.475000e-10 0.000000e+00 0.000000e+00 567 5.485000e-10 0.000000e+00 0.000000e+00 568 5.495000e-10 0.000000e+00 0.000000e+00 569 5.505000e-10 0.000000e+00 0.000000e+00 570 5.515000e-10 0.000000e+00 0.000000e+00 571 5.525000e-10 0.000000e+00 0.000000e+00 572 5.535000e-10 0.000000e+00 0.000000e+00 573 5.545000e-10 0.000000e+00 0.000000e+00 574 5.555000e-10 0.000000e+00 0.000000e+00 575 5.565000e-10 0.000000e+00 0.000000e+00 576 5.575000e-10 0.000000e+00 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 577 5.585000e-10 0.000000e+00 0.000000e+00 578 5.595000e-10 0.000000e+00 0.000000e+00 579 5.605000e-10 0.000000e+00 0.000000e+00 580 5.615000e-10 0.000000e+00 0.000000e+00 581 5.625000e-10 0.000000e+00 0.000000e+00 582 5.635000e-10 0.000000e+00 0.000000e+00 583 5.645000e-10 0.000000e+00 0.000000e+00 584 5.655000e-10 0.000000e+00 0.000000e+00 585 5.665000e-10 0.000000e+00 0.000000e+00 586 5.675000e-10 0.000000e+00 0.000000e+00 587 5.685000e-10 0.000000e+00 0.000000e+00 588 5.695000e-10 0.000000e+00 0.000000e+00 589 5.705000e-10 0.000000e+00 0.000000e+00 590 5.715000e-10 0.000000e+00 0.000000e+00 591 5.725000e-10 0.000000e+00 0.000000e+00 592 5.735000e-10 0.000000e+00 0.000000e+00 593 5.745000e-10 0.000000e+00 0.000000e+00 594 5.755000e-10 0.000000e+00 0.000000e+00 595 5.765000e-10 0.000000e+00 0.000000e+00 596 5.775000e-10 0.000000e+00 0.000000e+00 597 5.785000e-10 0.000000e+00 0.000000e+00 598 5.795000e-10 0.000000e+00 0.000000e+00 599 5.805000e-10 0.000000e+00 0.000000e+00 600 5.815000e-10 0.000000e+00 0.000000e+00 601 5.825000e-10 0.000000e+00 0.000000e+00 602 5.835000e-10 0.000000e+00 0.000000e+00 603 5.845000e-10 0.000000e+00 0.000000e+00 604 5.855000e-10 0.000000e+00 0.000000e+00 605 5.865000e-10 0.000000e+00 0.000000e+00 606 5.875000e-10 0.000000e+00 0.000000e+00 607 5.885000e-10 0.000000e+00 0.000000e+00 608 5.895000e-10 0.000000e+00 0.000000e+00 609 5.905000e-10 0.000000e+00 0.000000e+00 610 5.915000e-10 0.000000e+00 0.000000e+00 611 5.925000e-10 0.000000e+00 0.000000e+00 612 5.935000e-10 0.000000e+00 0.000000e+00 613 5.945000e-10 0.000000e+00 0.000000e+00 614 5.955000e-10 0.000000e+00 0.000000e+00 615 5.965000e-10 0.000000e+00 0.000000e+00 616 5.975000e-10 0.000000e+00 0.000000e+00 617 5.985000e-10 0.000000e+00 0.000000e+00 618 5.995000e-10 0.000000e+00 0.000000e+00 619 6.005000e-10 0.000000e+00 0.000000e+00 620 6.015000e-10 0.000000e+00 0.000000e+00 621 6.025000e-10 0.000000e+00 0.000000e+00 622 6.035000e-10 0.000000e+00 0.000000e+00 623 6.045000e-10 0.000000e+00 0.000000e+00 624 6.055000e-10 0.000000e+00 0.000000e+00 625 6.065000e-10 0.000000e+00 0.000000e+00 626 6.075000e-10 0.000000e+00 0.000000e+00 627 6.085000e-10 0.000000e+00 0.000000e+00 628 6.095000e-10 0.000000e+00 0.000000e+00 629 6.105000e-10 0.000000e+00 0.000000e+00 630 6.115000e-10 0.000000e+00 0.000000e+00 631 6.125000e-10 0.000000e+00 0.000000e+00 632 6.135000e-10 0.000000e+00 0.000000e+00 633 6.145000e-10 0.000000e+00 0.000000e+00 634 6.155000e-10 0.000000e+00 0.000000e+00 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 635 6.165000e-10 0.000000e+00 0.000000e+00 636 6.175000e-10 0.000000e+00 0.000000e+00 637 6.185000e-10 0.000000e+00 0.000000e+00 638 6.195000e-10 0.000000e+00 0.000000e+00 639 6.200000e-10 0.000000e+00 7.108583e-17 640 6.201000e-10 0.000000e+00 2.000000e-04 641 6.203000e-10 0.000000e+00 6.000000e-04 642 6.207000e-10 0.000000e+00 1.400000e-03 643 6.215000e-10 0.000000e+00 3.000000e-03 644 6.225000e-10 0.000000e+00 5.000000e-03 645 6.235000e-10 0.000000e+00 7.000000e-03 646 6.245000e-10 0.000000e+00 9.000000e-03 647 6.255000e-10 0.000000e+00 1.100000e-02 648 6.265000e-10 0.000000e+00 1.300000e-02 649 6.275000e-10 0.000000e+00 1.500000e-02 650 6.285000e-10 0.000000e+00 1.700000e-02 651 6.295000e-10 0.000000e+00 1.900000e-02 652 6.305000e-10 0.000000e+00 2.100000e-02 653 6.315000e-10 0.000000e+00 2.300000e-02 654 6.325000e-10 0.000000e+00 2.500000e-02 655 6.335000e-10 0.000000e+00 2.700000e-02 656 6.345000e-10 0.000000e+00 2.900000e-02 657 6.355000e-10 0.000000e+00 3.100000e-02 658 6.365000e-10 0.000000e+00 3.300000e-02 659 6.375000e-10 0.000000e+00 3.500000e-02 660 6.385000e-10 0.000000e+00 3.700000e-02 661 6.395000e-10 0.000000e+00 3.900000e-02 662 6.405000e-10 0.000000e+00 4.100000e-02 663 6.415000e-10 0.000000e+00 4.300000e-02 664 6.425000e-10 0.000000e+00 4.500000e-02 665 6.435000e-10 0.000000e+00 4.700000e-02 666 6.445000e-10 0.000000e+00 4.900000e-02 667 6.455000e-10 0.000000e+00 5.100000e-02 668 6.465000e-10 0.000000e+00 5.300000e-02 669 6.475000e-10 0.000000e+00 5.500000e-02 670 6.485000e-10 0.000000e+00 5.700000e-02 671 6.495000e-10 0.000000e+00 5.900000e-02 672 6.505000e-10 0.000000e+00 6.100000e-02 673 6.515000e-10 0.000000e+00 6.300000e-02 674 6.525000e-10 0.000000e+00 6.500000e-02 675 6.535000e-10 0.000000e+00 6.700000e-02 676 6.545000e-10 0.000000e+00 6.900000e-02 677 6.555000e-10 0.000000e+00 7.100000e-02 678 6.565000e-10 0.000000e+00 7.300000e-02 679 6.575000e-10 0.000000e+00 7.500000e-02 680 6.585000e-10 0.000000e+00 7.700000e-02 681 6.595000e-10 0.000000e+00 7.900000e-02 682 6.605000e-10 0.000000e+00 8.100000e-02 683 6.615000e-10 0.000000e+00 8.300000e-02 684 6.625000e-10 0.000000e+00 8.500000e-02 685 6.635000e-10 0.000000e+00 8.700000e-02 686 6.645000e-10 0.000000e+00 8.900000e-02 687 6.655000e-10 0.000000e+00 9.100000e-02 688 6.665000e-10 0.000000e+00 9.300000e-02 689 6.675000e-10 0.000000e+00 9.500000e-02 690 6.685000e-10 0.000000e+00 9.700000e-02 691 6.695000e-10 0.000000e+00 9.900000e-02 692 6.705000e-10 0.000000e+00 1.010000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 693 6.715000e-10 0.000000e+00 1.030000e-01 694 6.725000e-10 0.000000e+00 1.050000e-01 695 6.735000e-10 0.000000e+00 1.070000e-01 696 6.745000e-10 0.000000e+00 1.090000e-01 697 6.755000e-10 0.000000e+00 1.110000e-01 698 6.765000e-10 0.000000e+00 1.130000e-01 699 6.775000e-10 0.000000e+00 1.150000e-01 700 6.785000e-10 0.000000e+00 1.170000e-01 701 6.795000e-10 0.000000e+00 1.190000e-01 702 6.805000e-10 0.000000e+00 1.210000e-01 703 6.815000e-10 0.000000e+00 1.230000e-01 704 6.825000e-10 0.000000e+00 1.250000e-01 705 6.835000e-10 0.000000e+00 1.270000e-01 706 6.845000e-10 0.000000e+00 1.290000e-01 707 6.855000e-10 0.000000e+00 1.310000e-01 708 6.865000e-10 0.000000e+00 1.330000e-01 709 6.875000e-10 0.000000e+00 1.350000e-01 710 6.885000e-10 0.000000e+00 1.370000e-01 711 6.895000e-10 0.000000e+00 1.390000e-01 712 6.905000e-10 0.000000e+00 1.410000e-01 713 6.915000e-10 0.000000e+00 1.430000e-01 714 6.925000e-10 0.000000e+00 1.450000e-01 715 6.935000e-10 0.000000e+00 1.470000e-01 716 6.945000e-10 0.000000e+00 1.490000e-01 717 6.955000e-10 0.000000e+00 1.510000e-01 718 6.965000e-10 0.000000e+00 1.530000e-01 719 6.975000e-10 0.000000e+00 1.550000e-01 720 6.985000e-10 0.000000e+00 1.570000e-01 721 6.995000e-10 0.000000e+00 1.590000e-01 722 7.005000e-10 0.000000e+00 1.610000e-01 723 7.015000e-10 0.000000e+00 1.630000e-01 724 7.025000e-10 0.000000e+00 1.650000e-01 725 7.035000e-10 0.000000e+00 1.670000e-01 726 7.045000e-10 0.000000e+00 1.690000e-01 727 7.055000e-10 0.000000e+00 1.710000e-01 728 7.065000e-10 0.000000e+00 1.730000e-01 729 7.075000e-10 0.000000e+00 1.750000e-01 730 7.085000e-10 0.000000e+00 1.770000e-01 731 7.095000e-10 0.000000e+00 1.790000e-01 732 7.105000e-10 0.000000e+00 1.810000e-01 733 7.115000e-10 0.000000e+00 1.830000e-01 734 7.125000e-10 0.000000e+00 1.850000e-01 735 7.135000e-10 0.000000e+00 1.870000e-01 736 7.145000e-10 0.000000e+00 1.890000e-01 737 7.155000e-10 0.000000e+00 1.910000e-01 738 7.165000e-10 0.000000e+00 1.930000e-01 739 7.175000e-10 0.000000e+00 1.950000e-01 740 7.185000e-10 0.000000e+00 1.970000e-01 741 7.195000e-10 0.000000e+00 1.990000e-01 742 7.200000e-10 0.000000e+00 2.000000e-01 743 7.201000e-10 0.000000e+00 2.000000e-01 744 7.203000e-10 0.000000e+00 2.000000e-01 745 7.207000e-10 0.000000e+00 2.000000e-01 746 7.215000e-10 0.000000e+00 2.000000e-01 747 7.225000e-10 0.000000e+00 2.000000e-01 748 7.235000e-10 0.000000e+00 2.000000e-01 749 7.245000e-10 0.000000e+00 2.000000e-01 750 7.255000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 751 7.265000e-10 0.000000e+00 2.000000e-01 752 7.275000e-10 0.000000e+00 2.000000e-01 753 7.285000e-10 0.000000e+00 2.000000e-01 754 7.295000e-10 0.000000e+00 2.000000e-01 755 7.305000e-10 0.000000e+00 2.000000e-01 756 7.315000e-10 0.000000e+00 2.000000e-01 757 7.325000e-10 0.000000e+00 2.000000e-01 758 7.335000e-10 0.000000e+00 2.000000e-01 759 7.345000e-10 0.000000e+00 2.000000e-01 760 7.355000e-10 0.000000e+00 2.000000e-01 761 7.365000e-10 0.000000e+00 2.000000e-01 762 7.375000e-10 0.000000e+00 2.000000e-01 763 7.385000e-10 0.000000e+00 2.000000e-01 764 7.395000e-10 0.000000e+00 2.000000e-01 765 7.405000e-10 0.000000e+00 2.000000e-01 766 7.415000e-10 0.000000e+00 2.000000e-01 767 7.425000e-10 0.000000e+00 2.000000e-01 768 7.435000e-10 0.000000e+00 2.000000e-01 769 7.445000e-10 0.000000e+00 2.000000e-01 770 7.455000e-10 0.000000e+00 2.000000e-01 771 7.465000e-10 0.000000e+00 2.000000e-01 772 7.475000e-10 0.000000e+00 2.000000e-01 773 7.485000e-10 0.000000e+00 2.000000e-01 774 7.495000e-10 0.000000e+00 2.000000e-01 775 7.505000e-10 0.000000e+00 2.000000e-01 776 7.515000e-10 0.000000e+00 2.000000e-01 777 7.525000e-10 0.000000e+00 2.000000e-01 778 7.535000e-10 0.000000e+00 2.000000e-01 779 7.545000e-10 0.000000e+00 2.000000e-01 780 7.555000e-10 0.000000e+00 2.000000e-01 781 7.565000e-10 0.000000e+00 2.000000e-01 782 7.575000e-10 0.000000e+00 2.000000e-01 783 7.585000e-10 0.000000e+00 2.000000e-01 784 7.595000e-10 0.000000e+00 2.000000e-01 785 7.605000e-10 0.000000e+00 2.000000e-01 786 7.615000e-10 0.000000e+00 2.000000e-01 787 7.625000e-10 0.000000e+00 2.000000e-01 788 7.635000e-10 0.000000e+00 2.000000e-01 789 7.645000e-10 0.000000e+00 2.000000e-01 790 7.655000e-10 0.000000e+00 2.000000e-01 791 7.665000e-10 0.000000e+00 2.000000e-01 792 7.675000e-10 0.000000e+00 2.000000e-01 793 7.685000e-10 0.000000e+00 2.000000e-01 794 7.695000e-10 0.000000e+00 2.000000e-01 795 7.705000e-10 0.000000e+00 2.000000e-01 796 7.715000e-10 0.000000e+00 2.000000e-01 797 7.725000e-10 0.000000e+00 2.000000e-01 798 7.735000e-10 0.000000e+00 2.000000e-01 799 7.745000e-10 0.000000e+00 2.000000e-01 800 7.755000e-10 0.000000e+00 2.000000e-01 801 7.765000e-10 0.000000e+00 2.000000e-01 802 7.775000e-10 0.000000e+00 2.000000e-01 803 7.785000e-10 0.000000e+00 2.000000e-01 804 7.795000e-10 0.000000e+00 2.000000e-01 805 7.805000e-10 0.000000e+00 2.000000e-01 806 7.815000e-10 0.000000e+00 2.000000e-01 807 7.825000e-10 0.000000e+00 2.000000e-01 808 7.835000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 809 7.845000e-10 0.000000e+00 2.000000e-01 810 7.855000e-10 0.000000e+00 2.000000e-01 811 7.865000e-10 0.000000e+00 2.000000e-01 812 7.875000e-10 0.000000e+00 2.000000e-01 813 7.885000e-10 0.000000e+00 2.000000e-01 814 7.895000e-10 0.000000e+00 2.000000e-01 815 7.905000e-10 0.000000e+00 2.000000e-01 816 7.915000e-10 0.000000e+00 2.000000e-01 817 7.925000e-10 0.000000e+00 2.000000e-01 818 7.935000e-10 0.000000e+00 2.000000e-01 819 7.945000e-10 0.000000e+00 2.000000e-01 820 7.955000e-10 0.000000e+00 2.000000e-01 821 7.965000e-10 0.000000e+00 2.000000e-01 822 7.975000e-10 0.000000e+00 2.000000e-01 823 7.985000e-10 0.000000e+00 2.000000e-01 824 7.995000e-10 0.000000e+00 2.000000e-01 825 8.005000e-10 0.000000e+00 2.000000e-01 826 8.015000e-10 0.000000e+00 2.000000e-01 827 8.025000e-10 0.000000e+00 2.000000e-01 828 8.035000e-10 0.000000e+00 2.000000e-01 829 8.045000e-10 0.000000e+00 2.000000e-01 830 8.055000e-10 0.000000e+00 2.000000e-01 831 8.065000e-10 0.000000e+00 2.000000e-01 832 8.075000e-10 0.000000e+00 2.000000e-01 833 8.085000e-10 0.000000e+00 2.000000e-01 834 8.095000e-10 0.000000e+00 2.000000e-01 835 8.105000e-10 0.000000e+00 2.000000e-01 836 8.115000e-10 0.000000e+00 2.000000e-01 837 8.125000e-10 0.000000e+00 2.000000e-01 838 8.135000e-10 0.000000e+00 2.000000e-01 839 8.145000e-10 0.000000e+00 2.000000e-01 840 8.155000e-10 0.000000e+00 2.000000e-01 841 8.165000e-10 0.000000e+00 2.000000e-01 842 8.175000e-10 0.000000e+00 2.000000e-01 843 8.185000e-10 0.000000e+00 2.000000e-01 844 8.195000e-10 0.000000e+00 2.000000e-01 845 8.205000e-10 0.000000e+00 2.000000e-01 846 8.215000e-10 0.000000e+00 2.000000e-01 847 8.225000e-10 0.000000e+00 2.000000e-01 848 8.235000e-10 0.000000e+00 2.000000e-01 849 8.245000e-10 0.000000e+00 2.000000e-01 850 8.255000e-10 0.000000e+00 2.000000e-01 851 8.265000e-10 0.000000e+00 2.000000e-01 852 8.275000e-10 0.000000e+00 2.000000e-01 853 8.285000e-10 0.000000e+00 2.000000e-01 854 8.295000e-10 0.000000e+00 2.000000e-01 855 8.305000e-10 0.000000e+00 2.000000e-01 856 8.315000e-10 0.000000e+00 2.000000e-01 857 8.325000e-10 0.000000e+00 2.000000e-01 858 8.335000e-10 0.000000e+00 2.000000e-01 859 8.345000e-10 0.000000e+00 2.000000e-01 860 8.355000e-10 0.000000e+00 2.000000e-01 861 8.365000e-10 0.000000e+00 2.000000e-01 862 8.375000e-10 0.000000e+00 2.000000e-01 863 8.385000e-10 0.000000e+00 2.000000e-01 864 8.395000e-10 0.000000e+00 2.000000e-01 865 8.405000e-10 0.000000e+00 2.000000e-01 866 8.415000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 867 8.425000e-10 0.000000e+00 2.000000e-01 868 8.435000e-10 0.000000e+00 2.000000e-01 869 8.445000e-10 0.000000e+00 2.000000e-01 870 8.455000e-10 0.000000e+00 2.000000e-01 871 8.465000e-10 0.000000e+00 2.000000e-01 872 8.475000e-10 0.000000e+00 2.000000e-01 873 8.485000e-10 0.000000e+00 2.000000e-01 874 8.495000e-10 0.000000e+00 2.000000e-01 875 8.505000e-10 0.000000e+00 2.000000e-01 876 8.515000e-10 0.000000e+00 2.000000e-01 877 8.525000e-10 0.000000e+00 2.000000e-01 878 8.535000e-10 0.000000e+00 2.000000e-01 879 8.545000e-10 0.000000e+00 2.000000e-01 880 8.555000e-10 0.000000e+00 2.000000e-01 881 8.565000e-10 0.000000e+00 2.000000e-01 882 8.575000e-10 0.000000e+00 2.000000e-01 883 8.585000e-10 0.000000e+00 2.000000e-01 884 8.595000e-10 0.000000e+00 2.000000e-01 885 8.605000e-10 0.000000e+00 2.000000e-01 886 8.615000e-10 0.000000e+00 2.000000e-01 887 8.625000e-10 0.000000e+00 2.000000e-01 888 8.635000e-10 0.000000e+00 2.000000e-01 889 8.645000e-10 0.000000e+00 2.000000e-01 890 8.655000e-10 0.000000e+00 2.000000e-01 891 8.665000e-10 0.000000e+00 2.000000e-01 892 8.675000e-10 0.000000e+00 2.000000e-01 893 8.685000e-10 0.000000e+00 2.000000e-01 894 8.695000e-10 0.000000e+00 2.000000e-01 895 8.705000e-10 0.000000e+00 2.000000e-01 896 8.715000e-10 0.000000e+00 2.000000e-01 897 8.725000e-10 0.000000e+00 2.000000e-01 898 8.735000e-10 0.000000e+00 2.000000e-01 899 8.745000e-10 0.000000e+00 2.000000e-01 900 8.755000e-10 0.000000e+00 2.000000e-01 901 8.765000e-10 0.000000e+00 2.000000e-01 902 8.775000e-10 0.000000e+00 2.000000e-01 903 8.785000e-10 0.000000e+00 2.000000e-01 904 8.795000e-10 0.000000e+00 2.000000e-01 905 8.805000e-10 0.000000e+00 2.000000e-01 906 8.815000e-10 0.000000e+00 2.000000e-01 907 8.825000e-10 0.000000e+00 2.000000e-01 908 8.835000e-10 0.000000e+00 2.000000e-01 909 8.845000e-10 0.000000e+00 2.000000e-01 910 8.855000e-10 0.000000e+00 2.000000e-01 911 8.865000e-10 0.000000e+00 2.000000e-01 912 8.875000e-10 0.000000e+00 2.000000e-01 913 8.885000e-10 0.000000e+00 2.000000e-01 914 8.895000e-10 0.000000e+00 2.000000e-01 915 8.905000e-10 0.000000e+00 2.000000e-01 916 8.915000e-10 0.000000e+00 2.000000e-01 917 8.925000e-10 0.000000e+00 2.000000e-01 918 8.935000e-10 0.000000e+00 2.000000e-01 919 8.945000e-10 0.000000e+00 2.000000e-01 920 8.955000e-10 0.000000e+00 2.000000e-01 921 8.965000e-10 0.000000e+00 2.000000e-01 922 8.975000e-10 0.000000e+00 2.000000e-01 923 8.985000e-10 0.000000e+00 2.000000e-01 924 8.995000e-10 0.000000e+00 2.000000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 925 9.005000e-10 0.000000e+00 2.000000e-01 926 9.015000e-10 0.000000e+00 2.000000e-01 927 9.025000e-10 0.000000e+00 2.000000e-01 928 9.035000e-10 0.000000e+00 2.000000e-01 929 9.045000e-10 0.000000e+00 2.000000e-01 930 9.055000e-10 0.000000e+00 2.000000e-01 931 9.065000e-10 0.000000e+00 2.000000e-01 932 9.075000e-10 0.000000e+00 2.000000e-01 933 9.085000e-10 0.000000e+00 2.000000e-01 934 9.095000e-10 0.000000e+00 2.000000e-01 935 9.105000e-10 0.000000e+00 2.000000e-01 936 9.115000e-10 0.000000e+00 2.000000e-01 937 9.125000e-10 0.000000e+00 2.000000e-01 938 9.135000e-10 0.000000e+00 2.000000e-01 939 9.145000e-10 0.000000e+00 2.000000e-01 940 9.155000e-10 0.000000e+00 2.000000e-01 941 9.165000e-10 0.000000e+00 2.000000e-01 942 9.175000e-10 0.000000e+00 2.000000e-01 943 9.185000e-10 0.000000e+00 2.000000e-01 944 9.195000e-10 0.000000e+00 2.000000e-01 945 9.200000e-10 0.000000e+00 2.000000e-01 946 9.201000e-10 0.000000e+00 1.998000e-01 947 9.203000e-10 0.000000e+00 1.994000e-01 948 9.207000e-10 0.000000e+00 1.986000e-01 949 9.215000e-10 0.000000e+00 1.970000e-01 950 9.225000e-10 0.000000e+00 1.950000e-01 951 9.235000e-10 0.000000e+00 1.930000e-01 952 9.245000e-10 0.000000e+00 1.910000e-01 953 9.255000e-10 0.000000e+00 1.890000e-01 954 9.265000e-10 0.000000e+00 1.870000e-01 955 9.275000e-10 0.000000e+00 1.850000e-01 956 9.285000e-10 0.000000e+00 1.830000e-01 957 9.295000e-10 0.000000e+00 1.810000e-01 958 9.305000e-10 0.000000e+00 1.790000e-01 959 9.315000e-10 0.000000e+00 1.770000e-01 960 9.325000e-10 0.000000e+00 1.750000e-01 961 9.335000e-10 0.000000e+00 1.730000e-01 962 9.345000e-10 0.000000e+00 1.710000e-01 963 9.355000e-10 0.000000e+00 1.690000e-01 964 9.365000e-10 0.000000e+00 1.670000e-01 965 9.375000e-10 0.000000e+00 1.650000e-01 966 9.385000e-10 0.000000e+00 1.630000e-01 967 9.395000e-10 0.000000e+00 1.610000e-01 968 9.405000e-10 0.000000e+00 1.590000e-01 969 9.415000e-10 0.000000e+00 1.570000e-01 970 9.425000e-10 0.000000e+00 1.550000e-01 971 9.435000e-10 0.000000e+00 1.530000e-01 972 9.445000e-10 0.000000e+00 1.510000e-01 973 9.455000e-10 0.000000e+00 1.490000e-01 974 9.465000e-10 0.000000e+00 1.470000e-01 975 9.475000e-10 0.000000e+00 1.450000e-01 976 9.485000e-10 0.000000e+00 1.430000e-01 977 9.495000e-10 0.000000e+00 1.410000e-01 978 9.505000e-10 0.000000e+00 1.390000e-01 979 9.515000e-10 0.000000e+00 1.370000e-01 980 9.525000e-10 0.000000e+00 1.350000e-01 981 9.535000e-10 0.000000e+00 1.330000e-01 982 9.545000e-10 0.000000e+00 1.310000e-01 Index time @m1[vbs] v(g)/10 -------------------------------------------------------------------------------- 983 9.555000e-10 0.000000e+00 1.290000e-01 984 9.565000e-10 0.000000e+00 1.270000e-01 985 9.575000e-10 0.000000e+00 1.250000e-01 986 9.585000e-10 0.000000e+00 1.230000e-01 987 9.595000e-10 0.000000e+00 1.210000e-01 988 9.605000e-10 0.000000e+00 1.190000e-01 989 9.615000e-10 0.000000e+00 1.170000e-01 990 9.625000e-10 0.000000e+00 1.150000e-01 991 9.635000e-10 0.000000e+00 1.130000e-01 992 9.645000e-10 0.000000e+00 1.110000e-01 993 9.655000e-10 0.000000e+00 1.090000e-01 994 9.665000e-10 0.000000e+00 1.070000e-01 995 9.675000e-10 0.000000e+00 1.050000e-01 996 9.685000e-10 0.000000e+00 1.030000e-01 997 9.695000e-10 0.000000e+00 1.010000e-01 998 9.705000e-10 0.000000e+00 9.900000e-02 999 9.715000e-10 0.000000e+00 9.700000e-02 1000 9.725000e-10 0.000000e+00 9.500000e-02 1001 9.735000e-10 0.000000e+00 9.300000e-02 1002 9.745000e-10 0.000000e+00 9.100000e-02 1003 9.755000e-10 0.000000e+00 8.900000e-02 1004 9.765000e-10 0.000000e+00 8.700000e-02 1005 9.775000e-10 0.000000e+00 8.500000e-02 1006 9.785000e-10 0.000000e+00 8.300000e-02 1007 9.795000e-10 0.000000e+00 8.100000e-02 1008 9.805000e-10 0.000000e+00 7.900000e-02 1009 9.815000e-10 0.000000e+00 7.700000e-02 1010 9.825000e-10 0.000000e+00 7.500000e-02 1011 9.835000e-10 0.000000e+00 7.300000e-02 1012 9.845000e-10 0.000000e+00 7.100000e-02 1013 9.855000e-10 0.000000e+00 6.900000e-02 1014 9.865000e-10 0.000000e+00 6.700000e-02 1015 9.875000e-10 0.000000e+00 6.500000e-02 1016 9.885000e-10 0.000000e+00 6.300000e-02 1017 9.895000e-10 0.000000e+00 6.100000e-02 1018 9.905000e-10 0.000000e+00 5.900000e-02 1019 9.915000e-10 0.000000e+00 5.700000e-02 1020 9.925000e-10 0.000000e+00 5.500000e-02 1021 9.935000e-10 0.000000e+00 5.300000e-02 1022 9.945000e-10 0.000000e+00 5.100000e-02 1023 9.955000e-10 0.000000e+00 4.900000e-02 1024 9.965000e-10 0.000000e+00 4.700000e-02 1025 9.975000e-10 0.000000e+00 4.500000e-02 1026 9.985000e-10 0.000000e+00 4.300000e-02 1027 9.995000e-10 0.000000e+00 4.100000e-02 1028 1.000000e-09 0.000000e+00 4.000000e-02 ngspice-26/tests/bsim3soifd/Makefile.am0000644000265600020320000000060512264261473017472 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ nmosfd.mod \ pmosfd.mod \ $(TESTS) \ $(TESTS:.cir=.out) EXTRA_DIST += ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim3soifd/Makefile.in0000644000265600020320000003371012264261541017502 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim3soifd DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ t3.cir \ t4.cir \ t5.cir \ inv2.cir \ RampVg2.cir TESTS_ENVIRONMENT = ngspice_vpath=$(srcdir) $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = nmosfd.mod pmosfd.mod $(TESTS) $(TESTS:.cir=.out) \ ring51.cir lib.h MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim3soifd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim3soifd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim3soifd/t3.out0000644000265600020320000025166412264261473016532 0ustar andreasadmin No. of Data Rows : 1806 Circuit: *model = BSIMSOI (FD) Error on line 3 : .model n1 nmos level= 55 tnom = 27 tox = 4.5e-09 tsi = 5e-8 tbox = 8e-08 mobmod = 0 capmod = 3 shmod = 0 paramchk=0 wint = 0 lint = -2e-08 vth0 = .52 k1 = .39 k2 = .1 k3 = 0 kb1 = .95 k3b = 2.2 nlx = 7.2e-08 dvt0 = .55 dvt1 = .28 dvt2 = -1.4 dvt0w = 0 dvt1w = 0 dvt2w = 0 nch = 3.3e+17 nsub = 1e+15 ngate = 1e+20 dvbd0 = 60.0 dvbd1 = 1.1 vbsa = 0.0 kb3 = 2.2 delp = 0.02 abp = 0.9 mxc = 0.9 adice0 = 0.93 kbjt1 = 1.0e-08 edl = .0000005 ndiode = 1.13 ntun = 14.0 isbjt = 2e-6 isdif = 1e-6 istun = 0.0 isrec = 1e-5 xbjt = 0.01 xdif = 0.01 xrec = 0.01 xtun = 0.001 u0 = 352 ua = 1.3e-11 ub = 1.7e-18 uc = -4e-10 w0 = 1.16e-06 ags = .25 a1 = 0 a2 = 1 b0 = .01 b1 = 10 rdsw = 700 prwg = 0 prwb = -.2 wr = 1 rbody = 0.0 rbsh = 0.0 a0 = 1.4 keta = -.67 vsat = 135000 dwg = 0 dwb = 0 alpha0 = 0.0 alpha1 = 1.5 beta0 = 20.5 aii = 1.2 bii = 0.1e-7 cii = 0.8 dii = 0.6 voff = -.14 nfactor = .7 cdsc = .00002 cdscb = 0 cdscd = 0 cit = 0 pclm = 2.9 pvag = 12 pdiblc1 = .18 pdiblc2 = .004 pdiblcb = -.234 drout = .2 delta = .01 eta0 = .01 etab = 0 dsub = .3 rth0 94 = .006 clc = .0000001 cle = .6 cf = 1e-20 ckappa = .6 cgdl = 1e-20 cgsl = 1e-20 kt1 = -.3 kt1l = 0 kt2 = .022 ute = -1.5 ua1 = 4.31e-09 ub1 = -7.61e-18 uc1 = -5.6e-11 prt = 760 at = 22400 cgso = 1e-10 cgdo = 1e-10 cjswg = 5e-10 tt=3e-10 asd = 0.3 csdesw = 1e-12 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Warning: Pd = 0 is less than W. Warning: Ps = 0 is less than W. *model = BSIMSOI (FD) -------------------------------------------------------------------------------- Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 0 0.000000e+00 5.000000e-01 -1.250000e-19 1 1.000000e-02 5.000000e-01 3.403448e-06 2 2.000000e-02 5.000000e-01 6.447166e-06 3 3.000000e-02 5.000000e-01 9.138041e-06 4 4.000000e-02 5.000000e-01 1.148481e-05 5 5.000000e-02 5.000000e-01 1.349892e-05 6 6.000000e-02 5.000000e-01 1.519577e-05 7 7.000000e-02 5.000000e-01 1.659602e-05 8 8.000000e-02 5.000000e-01 1.772678e-05 9 9.000000e-02 5.000000e-01 1.862188e-05 10 1.000000e-01 5.000000e-01 1.932024e-05 11 1.100000e-01 5.000000e-01 1.986244e-05 12 1.200000e-01 5.000000e-01 2.028646e-05 13 1.300000e-01 5.000000e-01 2.062437e-05 14 1.400000e-01 5.000000e-01 2.090110e-05 15 1.500000e-01 5.000000e-01 2.113483e-05 16 1.600000e-01 5.000000e-01 2.133835e-05 17 1.700000e-01 5.000000e-01 2.152047e-05 18 1.800000e-01 5.000000e-01 2.168723e-05 19 1.900000e-01 5.000000e-01 2.184281e-05 20 2.000000e-01 5.000000e-01 2.199009e-05 21 2.100000e-01 5.000000e-01 2.213113e-05 22 2.200000e-01 5.000000e-01 2.226740e-05 23 2.300000e-01 5.000000e-01 2.239997e-05 24 2.400000e-01 5.000000e-01 2.252961e-05 25 2.500000e-01 5.000000e-01 2.265694e-05 26 2.600000e-01 5.000000e-01 2.278241e-05 27 2.700000e-01 5.000000e-01 2.290635e-05 28 2.800000e-01 5.000000e-01 2.302905e-05 29 2.900000e-01 5.000000e-01 2.315073e-05 30 3.000000e-01 5.000000e-01 2.327155e-05 31 3.100000e-01 5.000000e-01 2.339166e-05 32 3.200000e-01 5.000000e-01 2.351117e-05 33 3.300000e-01 5.000000e-01 2.363018e-05 34 3.400000e-01 5.000000e-01 2.374876e-05 35 3.500000e-01 5.000000e-01 2.386698e-05 36 3.600000e-01 5.000000e-01 2.398489e-05 37 3.700000e-01 5.000000e-01 2.410254e-05 38 3.800000e-01 5.000000e-01 2.421998e-05 39 3.900000e-01 5.000000e-01 2.433723e-05 40 4.000000e-01 5.000000e-01 2.445432e-05 41 4.100000e-01 5.000000e-01 2.457129e-05 42 4.200000e-01 5.000000e-01 2.468815e-05 43 4.300000e-01 5.000000e-01 2.480492e-05 44 4.400000e-01 5.000000e-01 2.492161e-05 45 4.500000e-01 5.000000e-01 2.503826e-05 46 4.600000e-01 5.000000e-01 2.515486e-05 47 4.700000e-01 5.000000e-01 2.527143e-05 48 4.800000e-01 5.000000e-01 2.538798e-05 49 4.900000e-01 5.000000e-01 2.550453e-05 50 5.000000e-01 5.000000e-01 2.562107e-05 51 5.100000e-01 5.000000e-01 2.573761e-05 52 5.200000e-01 5.000000e-01 2.585417e-05 53 5.300000e-01 5.000000e-01 2.597075e-05 54 5.400000e-01 5.000000e-01 2.608736e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 55 5.500000e-01 5.000000e-01 2.620399e-05 56 5.600000e-01 5.000000e-01 2.632066e-05 57 5.700000e-01 5.000000e-01 2.643737e-05 58 5.800000e-01 5.000000e-01 2.655413e-05 59 5.900000e-01 5.000000e-01 2.667093e-05 60 6.000000e-01 5.000000e-01 2.678778e-05 61 6.100000e-01 5.000000e-01 2.690468e-05 62 6.200000e-01 5.000000e-01 2.702164e-05 63 6.300000e-01 5.000000e-01 2.713866e-05 64 6.400000e-01 5.000000e-01 2.725574e-05 65 6.500000e-01 5.000000e-01 2.737289e-05 66 6.600000e-01 5.000000e-01 2.749010e-05 67 6.700000e-01 5.000000e-01 2.760738e-05 68 6.800000e-01 5.000000e-01 2.772472e-05 69 6.900000e-01 5.000000e-01 2.784214e-05 70 7.000000e-01 5.000000e-01 2.795964e-05 71 7.100000e-01 5.000000e-01 2.807720e-05 72 7.200000e-01 5.000000e-01 2.819484e-05 73 7.300000e-01 5.000000e-01 2.831256e-05 74 7.400000e-01 5.000000e-01 2.843036e-05 75 7.500000e-01 5.000000e-01 2.854823e-05 76 7.600000e-01 5.000000e-01 2.866619e-05 77 7.700000e-01 5.000000e-01 2.878423e-05 78 7.800000e-01 5.000000e-01 2.890235e-05 79 7.900000e-01 5.000000e-01 2.902055e-05 80 8.000000e-01 5.000000e-01 2.913884e-05 81 8.100000e-01 5.000000e-01 2.925721e-05 82 8.200000e-01 5.000000e-01 2.937567e-05 83 8.300000e-01 5.000000e-01 2.949422e-05 84 8.400000e-01 5.000000e-01 2.961285e-05 85 8.500000e-01 5.000000e-01 2.973157e-05 86 8.600000e-01 5.000000e-01 2.985037e-05 87 8.700000e-01 5.000000e-01 2.996927e-05 88 8.800000e-01 5.000000e-01 3.008826e-05 89 8.900000e-01 5.000000e-01 3.020733e-05 90 9.000000e-01 5.000000e-01 3.032650e-05 91 9.100000e-01 5.000000e-01 3.044576e-05 92 9.200000e-01 5.000000e-01 3.056511e-05 93 9.300000e-01 5.000000e-01 3.068455e-05 94 9.400000e-01 5.000000e-01 3.080408e-05 95 9.500000e-01 5.000000e-01 3.092371e-05 96 9.600000e-01 5.000000e-01 3.104343e-05 97 9.700000e-01 5.000000e-01 3.116324e-05 98 9.800000e-01 5.000000e-01 3.128315e-05 99 9.900000e-01 5.000000e-01 3.140315e-05 100 1.000000e+00 5.000000e-01 3.152324e-05 101 1.010000e+00 5.000000e-01 3.164344e-05 102 1.020000e+00 5.000000e-01 3.176372e-05 103 1.030000e+00 5.000000e-01 3.188410e-05 104 1.040000e+00 5.000000e-01 3.200458e-05 105 1.050000e+00 5.000000e-01 3.212515e-05 106 1.060000e+00 5.000000e-01 3.224582e-05 107 1.070000e+00 5.000000e-01 3.236659e-05 108 1.080000e+00 5.000000e-01 3.248745e-05 109 1.090000e+00 5.000000e-01 3.260841e-05 110 1.100000e+00 5.000000e-01 3.272947e-05 111 1.110000e+00 5.000000e-01 3.285062e-05 112 1.120000e+00 5.000000e-01 3.297188e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 113 1.130000e+00 5.000000e-01 3.309323e-05 114 1.140000e+00 5.000000e-01 3.321468e-05 115 1.150000e+00 5.000000e-01 3.333622e-05 116 1.160000e+00 5.000000e-01 3.345787e-05 117 1.170000e+00 5.000000e-01 3.357961e-05 118 1.180000e+00 5.000000e-01 3.370146e-05 119 1.190000e+00 5.000000e-01 3.382340e-05 120 1.200000e+00 5.000000e-01 3.394544e-05 121 1.210000e+00 5.000000e-01 3.406758e-05 122 1.220000e+00 5.000000e-01 3.418982e-05 123 1.230000e+00 5.000000e-01 3.431216e-05 124 1.240000e+00 5.000000e-01 3.443460e-05 125 1.250000e+00 5.000000e-01 3.455714e-05 126 1.260000e+00 5.000000e-01 3.467978e-05 127 1.270000e+00 5.000000e-01 3.480253e-05 128 1.280000e+00 5.000000e-01 3.492537e-05 129 1.290000e+00 5.000000e-01 3.504831e-05 130 1.300000e+00 5.000000e-01 3.517135e-05 131 1.310000e+00 5.000000e-01 3.529449e-05 132 1.320000e+00 5.000000e-01 3.541774e-05 133 1.330000e+00 5.000000e-01 3.554108e-05 134 1.340000e+00 5.000000e-01 3.566453e-05 135 1.350000e+00 5.000000e-01 3.578808e-05 136 1.360000e+00 5.000000e-01 3.591173e-05 137 1.370000e+00 5.000000e-01 3.603548e-05 138 1.380000e+00 5.000000e-01 3.615933e-05 139 1.390000e+00 5.000000e-01 3.628329e-05 140 1.400000e+00 5.000000e-01 3.640735e-05 141 1.410000e+00 5.000000e-01 3.653150e-05 142 1.420000e+00 5.000000e-01 3.665577e-05 143 1.430000e+00 5.000000e-01 3.678013e-05 144 1.440000e+00 5.000000e-01 3.690459e-05 145 1.450000e+00 5.000000e-01 3.702916e-05 146 1.460000e+00 5.000000e-01 3.715383e-05 147 1.470000e+00 5.000000e-01 3.727861e-05 148 1.480000e+00 5.000000e-01 3.740348e-05 149 1.490000e+00 5.000000e-01 3.752846e-05 150 1.500000e+00 5.000000e-01 3.765354e-05 151 1.510000e+00 5.000000e-01 3.777873e-05 152 1.520000e+00 5.000000e-01 3.790402e-05 153 1.530000e+00 5.000000e-01 3.802941e-05 154 1.540000e+00 5.000000e-01 3.815490e-05 155 1.550000e+00 5.000000e-01 3.828050e-05 156 1.560000e+00 5.000000e-01 3.840620e-05 157 1.570000e+00 5.000000e-01 3.853200e-05 158 1.580000e+00 5.000000e-01 3.865791e-05 159 1.590000e+00 5.000000e-01 3.878392e-05 160 1.600000e+00 5.000000e-01 3.891004e-05 161 1.610000e+00 5.000000e-01 3.903626e-05 162 1.620000e+00 5.000000e-01 3.916258e-05 163 1.630000e+00 5.000000e-01 3.928901e-05 164 1.640000e+00 5.000000e-01 3.941554e-05 165 1.650000e+00 5.000000e-01 3.954218e-05 166 1.660000e+00 5.000000e-01 3.966892e-05 167 1.670000e+00 5.000000e-01 3.979576e-05 168 1.680000e+00 5.000000e-01 3.992271e-05 169 1.690000e+00 5.000000e-01 4.004976e-05 170 1.700000e+00 5.000000e-01 4.017692e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 171 1.710000e+00 5.000000e-01 4.030418e-05 172 1.720000e+00 5.000000e-01 4.043155e-05 173 1.730000e+00 5.000000e-01 4.055902e-05 174 1.740000e+00 5.000000e-01 4.068660e-05 175 1.750000e+00 5.000000e-01 4.081428e-05 176 1.760000e+00 5.000000e-01 4.094207e-05 177 1.770000e+00 5.000000e-01 4.106996e-05 178 1.780000e+00 5.000000e-01 4.119795e-05 179 1.790000e+00 5.000000e-01 4.132605e-05 180 1.800000e+00 5.000000e-01 4.145426e-05 181 1.810000e+00 5.000000e-01 4.158257e-05 182 1.820000e+00 5.000000e-01 4.171099e-05 183 1.830000e+00 5.000000e-01 4.183951e-05 184 1.840000e+00 5.000000e-01 4.196814e-05 185 1.850000e+00 5.000000e-01 4.209688e-05 186 1.860000e+00 5.000000e-01 4.222571e-05 187 1.870000e+00 5.000000e-01 4.235466e-05 188 1.880000e+00 5.000000e-01 4.248371e-05 189 1.890000e+00 5.000000e-01 4.261287e-05 190 1.900000e+00 5.000000e-01 4.274213e-05 191 1.910000e+00 5.000000e-01 4.287150e-05 192 1.920000e+00 5.000000e-01 4.300097e-05 193 1.930000e+00 5.000000e-01 4.313055e-05 194 1.940000e+00 5.000000e-01 4.326024e-05 195 1.950000e+00 5.000000e-01 4.339003e-05 196 1.960000e+00 5.000000e-01 4.351993e-05 197 1.970000e+00 5.000000e-01 4.364993e-05 198 1.980000e+00 5.000000e-01 4.378004e-05 199 1.990000e+00 5.000000e-01 4.391026e-05 200 2.000000e+00 5.000000e-01 4.404059e-05 201 2.010000e+00 5.000000e-01 4.417102e-05 202 2.020000e+00 5.000000e-01 4.430155e-05 203 2.030000e+00 5.000000e-01 4.443220e-05 204 2.040000e+00 5.000000e-01 4.456295e-05 205 2.050000e+00 5.000000e-01 4.469380e-05 206 2.060000e+00 5.000000e-01 4.482477e-05 207 2.070000e+00 5.000000e-01 4.495584e-05 208 2.080000e+00 5.000000e-01 4.508702e-05 209 2.090000e+00 5.000000e-01 4.521830e-05 210 2.100000e+00 5.000000e-01 4.534969e-05 211 2.110000e+00 5.000000e-01 4.548119e-05 212 2.120000e+00 5.000000e-01 4.561280e-05 213 2.130000e+00 5.000000e-01 4.574451e-05 214 2.140000e+00 5.000000e-01 4.587633e-05 215 2.150000e+00 5.000000e-01 4.600825e-05 216 2.160000e+00 5.000000e-01 4.614029e-05 217 2.170000e+00 5.000000e-01 4.627243e-05 218 2.180000e+00 5.000000e-01 4.640468e-05 219 2.190000e+00 5.000000e-01 4.653704e-05 220 2.200000e+00 5.000000e-01 4.666950e-05 221 2.210000e+00 5.000000e-01 4.680207e-05 222 2.220000e+00 5.000000e-01 4.693475e-05 223 2.230000e+00 5.000000e-01 4.706754e-05 224 2.240000e+00 5.000000e-01 4.720044e-05 225 2.250000e+00 5.000000e-01 4.733344e-05 226 2.260000e+00 5.000000e-01 4.746655e-05 227 2.270000e+00 5.000000e-01 4.759977e-05 228 2.280000e+00 5.000000e-01 4.773309e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 229 2.290000e+00 5.000000e-01 4.786653e-05 230 2.300000e+00 5.000000e-01 4.800007e-05 231 2.310000e+00 5.000000e-01 4.813372e-05 232 2.320000e+00 5.000000e-01 4.826748e-05 233 2.330000e+00 5.000000e-01 4.840135e-05 234 2.340000e+00 5.000000e-01 4.853532e-05 235 2.350000e+00 5.000000e-01 4.866941e-05 236 2.360000e+00 5.000000e-01 4.880360e-05 237 2.370000e+00 5.000000e-01 4.893790e-05 238 2.380000e+00 5.000000e-01 4.907231e-05 239 2.390000e+00 5.000000e-01 4.920683e-05 240 2.400000e+00 5.000000e-01 4.934145e-05 241 2.410000e+00 5.000000e-01 4.947619e-05 242 2.420000e+00 5.000000e-01 4.961103e-05 243 2.430000e+00 5.000000e-01 4.974598e-05 244 2.440000e+00 5.000000e-01 4.988104e-05 245 2.450000e+00 5.000000e-01 5.001621e-05 246 2.460000e+00 5.000000e-01 5.015149e-05 247 2.470000e+00 5.000000e-01 5.028688e-05 248 2.480000e+00 5.000000e-01 5.042237e-05 249 2.490000e+00 5.000000e-01 5.055798e-05 250 2.500000e+00 5.000000e-01 5.069369e-05 251 2.510000e+00 5.000000e-01 5.082952e-05 252 2.520000e+00 5.000000e-01 5.096545e-05 253 2.530000e+00 5.000000e-01 5.110149e-05 254 2.540000e+00 5.000000e-01 5.123764e-05 255 2.550000e+00 5.000000e-01 5.137390e-05 256 2.560000e+00 5.000000e-01 5.151027e-05 257 2.570000e+00 5.000000e-01 5.164675e-05 258 2.580000e+00 5.000000e-01 5.178334e-05 259 2.590000e+00 5.000000e-01 5.192004e-05 260 2.600000e+00 5.000000e-01 5.205684e-05 261 2.610000e+00 5.000000e-01 5.219376e-05 262 2.620000e+00 5.000000e-01 5.233079e-05 263 2.630000e+00 5.000000e-01 5.246793e-05 264 2.640000e+00 5.000000e-01 5.260517e-05 265 2.650000e+00 5.000000e-01 5.274253e-05 266 2.660000e+00 5.000000e-01 5.287999e-05 267 2.670000e+00 5.000000e-01 5.301757e-05 268 2.680000e+00 5.000000e-01 5.315526e-05 269 2.690000e+00 5.000000e-01 5.329305e-05 270 2.700000e+00 5.000000e-01 5.343096e-05 271 2.710000e+00 5.000000e-01 5.356897e-05 272 2.720000e+00 5.000000e-01 5.370710e-05 273 2.730000e+00 5.000000e-01 5.384533e-05 274 2.740000e+00 5.000000e-01 5.398368e-05 275 2.750000e+00 5.000000e-01 5.412214e-05 276 2.760000e+00 5.000000e-01 5.426070e-05 277 2.770000e+00 5.000000e-01 5.439938e-05 278 2.780000e+00 5.000000e-01 5.453817e-05 279 2.790000e+00 5.000000e-01 5.467707e-05 280 2.800000e+00 5.000000e-01 5.481608e-05 281 2.810000e+00 5.000000e-01 5.495519e-05 282 2.820000e+00 5.000000e-01 5.509442e-05 283 2.830000e+00 5.000000e-01 5.523376e-05 284 2.840000e+00 5.000000e-01 5.537322e-05 285 2.850000e+00 5.000000e-01 5.551278e-05 286 2.860000e+00 5.000000e-01 5.565245e-05 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 287 2.870000e+00 5.000000e-01 5.579223e-05 288 2.880000e+00 5.000000e-01 5.593213e-05 289 2.890000e+00 5.000000e-01 5.607213e-05 290 2.900000e+00 5.000000e-01 5.621225e-05 291 2.910000e+00 5.000000e-01 5.635248e-05 292 2.920000e+00 5.000000e-01 5.649281e-05 293 2.930000e+00 5.000000e-01 5.663326e-05 294 2.940000e+00 5.000000e-01 5.677382e-05 295 2.950000e+00 5.000000e-01 5.691449e-05 296 2.960000e+00 5.000000e-01 5.705528e-05 297 2.970000e+00 5.000000e-01 5.719617e-05 298 2.980000e+00 5.000000e-01 5.733718e-05 299 2.990000e+00 5.000000e-01 5.747829e-05 300 3.000000e+00 5.000000e-01 5.761952e-05 301 0.000000e+00 1.000000e+00 -1.250000e-19 302 1.000000e-02 1.000000e+00 3.008580e-05 303 2.000000e-02 1.000000e+00 5.960829e-05 304 3.000000e-02 1.000000e+00 8.856943e-05 305 4.000000e-02 1.000000e+00 1.169712e-04 306 5.000000e-02 1.000000e+00 1.448155e-04 307 6.000000e-02 1.000000e+00 1.721043e-04 308 7.000000e-02 1.000000e+00 1.988396e-04 309 8.000000e-02 1.000000e+00 2.250233e-04 310 9.000000e-02 1.000000e+00 2.506572e-04 311 1.000000e-01 1.000000e+00 2.757434e-04 312 1.100000e-01 1.000000e+00 3.002837e-04 313 1.200000e-01 1.000000e+00 3.242801e-04 314 1.300000e-01 1.000000e+00 3.477344e-04 315 1.400000e-01 1.000000e+00 3.706486e-04 316 1.500000e-01 1.000000e+00 3.930246e-04 317 1.600000e-01 1.000000e+00 4.148643e-04 318 1.700000e-01 1.000000e+00 4.361695e-04 319 1.800000e-01 1.000000e+00 4.569423e-04 320 1.900000e-01 1.000000e+00 4.771844e-04 321 2.000000e-01 1.000000e+00 4.968978e-04 322 2.100000e-01 1.000000e+00 5.160845e-04 323 2.200000e-01 1.000000e+00 5.347463e-04 324 2.300000e-01 1.000000e+00 5.528852e-04 325 2.400000e-01 1.000000e+00 5.705031e-04 326 2.500000e-01 1.000000e+00 5.876020e-04 327 2.600000e-01 1.000000e+00 6.041839e-04 328 2.700000e-01 1.000000e+00 6.202509e-04 329 2.800000e-01 1.000000e+00 6.358049e-04 330 2.900000e-01 1.000000e+00 6.508481e-04 331 3.000000e-01 1.000000e+00 6.653826e-04 332 3.100000e-01 1.000000e+00 6.794107e-04 333 3.200000e-01 1.000000e+00 6.929346e-04 334 3.300000e-01 1.000000e+00 7.059569e-04 335 3.400000e-01 1.000000e+00 7.184800e-04 336 3.500000e-01 1.000000e+00 7.305067e-04 337 3.600000e-01 1.000000e+00 7.420398e-04 338 3.700000e-01 1.000000e+00 7.530826e-04 339 3.800000e-01 1.000000e+00 7.636386e-04 340 3.900000e-01 1.000000e+00 7.737116e-04 341 4.000000e-01 1.000000e+00 7.833060e-04 342 4.100000e-01 1.000000e+00 7.924269e-04 343 4.200000e-01 1.000000e+00 8.010800e-04 344 4.300000e-01 1.000000e+00 8.092719e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 345 4.400000e-01 1.000000e+00 8.170104e-04 346 4.500000e-01 1.000000e+00 8.243044e-04 347 4.600000e-01 1.000000e+00 8.311646e-04 348 4.700000e-01 1.000000e+00 8.376029e-04 349 4.800000e-01 1.000000e+00 8.436332e-04 350 4.900000e-01 1.000000e+00 8.492713e-04 351 5.000000e-01 1.000000e+00 8.545347e-04 352 5.100000e-01 1.000000e+00 8.594425e-04 353 5.200000e-01 1.000000e+00 8.640154e-04 354 5.300000e-01 1.000000e+00 8.682749e-04 355 5.400000e-01 1.000000e+00 8.722434e-04 356 5.500000e-01 1.000000e+00 8.759433e-04 357 5.600000e-01 1.000000e+00 8.793968e-04 358 5.700000e-01 1.000000e+00 8.826255e-04 359 5.800000e-01 1.000000e+00 8.856499e-04 360 5.900000e-01 1.000000e+00 8.884892e-04 361 6.000000e-01 1.000000e+00 8.911615e-04 362 6.100000e-01 1.000000e+00 8.936831e-04 363 6.200000e-01 1.000000e+00 8.960691e-04 364 6.300000e-01 1.000000e+00 8.983330e-04 365 6.400000e-01 1.000000e+00 9.004869e-04 366 6.500000e-01 1.000000e+00 9.025418e-04 367 6.600000e-01 1.000000e+00 9.045075e-04 368 6.700000e-01 1.000000e+00 9.063926e-04 369 6.800000e-01 1.000000e+00 9.082048e-04 370 6.900000e-01 1.000000e+00 9.099511e-04 371 7.000000e-01 1.000000e+00 9.116375e-04 372 7.100000e-01 1.000000e+00 9.132696e-04 373 7.200000e-01 1.000000e+00 9.148522e-04 374 7.300000e-01 1.000000e+00 9.163896e-04 375 7.400000e-01 1.000000e+00 9.178858e-04 376 7.500000e-01 1.000000e+00 9.193442e-04 377 7.600000e-01 1.000000e+00 9.207679e-04 378 7.700000e-01 1.000000e+00 9.221598e-04 379 7.800000e-01 1.000000e+00 9.235224e-04 380 7.900000e-01 1.000000e+00 9.248579e-04 381 8.000000e-01 1.000000e+00 9.261684e-04 382 8.100000e-01 1.000000e+00 9.274558e-04 383 8.200000e-01 1.000000e+00 9.287217e-04 384 8.300000e-01 1.000000e+00 9.299677e-04 385 8.400000e-01 1.000000e+00 9.311952e-04 386 8.500000e-01 1.000000e+00 9.324054e-04 387 8.600000e-01 1.000000e+00 9.335995e-04 388 8.700000e-01 1.000000e+00 9.347785e-04 389 8.800000e-01 1.000000e+00 9.359435e-04 390 8.900000e-01 1.000000e+00 9.370953e-04 391 9.000000e-01 1.000000e+00 9.382348e-04 392 9.100000e-01 1.000000e+00 9.393626e-04 393 9.200000e-01 1.000000e+00 9.404796e-04 394 9.300000e-01 1.000000e+00 9.415863e-04 395 9.400000e-01 1.000000e+00 9.426833e-04 396 9.500000e-01 1.000000e+00 9.437712e-04 397 9.600000e-01 1.000000e+00 9.448504e-04 398 9.700000e-01 1.000000e+00 9.459216e-04 399 9.800000e-01 1.000000e+00 9.469850e-04 400 9.900000e-01 1.000000e+00 9.480412e-04 401 1.000000e+00 1.000000e+00 9.490904e-04 402 1.010000e+00 1.000000e+00 9.501331e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 403 1.020000e+00 1.000000e+00 9.511695e-04 404 1.030000e+00 1.000000e+00 9.522000e-04 405 1.040000e+00 1.000000e+00 9.532249e-04 406 1.050000e+00 1.000000e+00 9.542445e-04 407 1.060000e+00 1.000000e+00 9.552589e-04 408 1.070000e+00 1.000000e+00 9.562685e-04 409 1.080000e+00 1.000000e+00 9.572735e-04 410 1.090000e+00 1.000000e+00 9.582740e-04 411 1.100000e+00 1.000000e+00 9.592703e-04 412 1.110000e+00 1.000000e+00 9.602625e-04 413 1.120000e+00 1.000000e+00 9.612509e-04 414 1.130000e+00 1.000000e+00 9.622356e-04 415 1.140000e+00 1.000000e+00 9.632167e-04 416 1.150000e+00 1.000000e+00 9.641945e-04 417 1.160000e+00 1.000000e+00 9.651690e-04 418 1.170000e+00 1.000000e+00 9.661404e-04 419 1.180000e+00 1.000000e+00 9.671088e-04 420 1.190000e+00 1.000000e+00 9.680743e-04 421 1.200000e+00 1.000000e+00 9.690370e-04 422 1.210000e+00 1.000000e+00 9.699971e-04 423 1.220000e+00 1.000000e+00 9.709546e-04 424 1.230000e+00 1.000000e+00 9.719097e-04 425 1.240000e+00 1.000000e+00 9.728624e-04 426 1.250000e+00 1.000000e+00 9.738129e-04 427 1.260000e+00 1.000000e+00 9.747611e-04 428 1.270000e+00 1.000000e+00 9.757073e-04 429 1.280000e+00 1.000000e+00 9.766513e-04 430 1.290000e+00 1.000000e+00 9.775935e-04 431 1.300000e+00 1.000000e+00 9.785337e-04 432 1.310000e+00 1.000000e+00 9.794721e-04 433 1.320000e+00 1.000000e+00 9.804087e-04 434 1.330000e+00 1.000000e+00 9.813436e-04 435 1.340000e+00 1.000000e+00 9.822769e-04 436 1.350000e+00 1.000000e+00 9.832086e-04 437 1.360000e+00 1.000000e+00 9.841387e-04 438 1.370000e+00 1.000000e+00 9.850673e-04 439 1.380000e+00 1.000000e+00 9.859945e-04 440 1.390000e+00 1.000000e+00 9.869203e-04 441 1.400000e+00 1.000000e+00 9.878447e-04 442 1.410000e+00 1.000000e+00 9.887678e-04 443 1.420000e+00 1.000000e+00 9.896896e-04 444 1.430000e+00 1.000000e+00 9.906102e-04 445 1.440000e+00 1.000000e+00 9.915296e-04 446 1.450000e+00 1.000000e+00 9.924479e-04 447 1.460000e+00 1.000000e+00 9.933650e-04 448 1.470000e+00 1.000000e+00 9.942810e-04 449 1.480000e+00 1.000000e+00 9.951960e-04 450 1.490000e+00 1.000000e+00 9.961099e-04 451 1.500000e+00 1.000000e+00 9.970229e-04 452 1.510000e+00 1.000000e+00 9.979348e-04 453 1.520000e+00 1.000000e+00 9.988458e-04 454 1.530000e+00 1.000000e+00 9.997559e-04 455 1.540000e+00 1.000000e+00 1.000665e-03 456 1.550000e+00 1.000000e+00 1.001573e-03 457 1.560000e+00 1.000000e+00 1.002481e-03 458 1.570000e+00 1.000000e+00 1.003388e-03 459 1.580000e+00 1.000000e+00 1.004294e-03 460 1.590000e+00 1.000000e+00 1.005199e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 461 1.600000e+00 1.000000e+00 1.006103e-03 462 1.610000e+00 1.000000e+00 1.007007e-03 463 1.620000e+00 1.000000e+00 1.007910e-03 464 1.630000e+00 1.000000e+00 1.008812e-03 465 1.640000e+00 1.000000e+00 1.009713e-03 466 1.650000e+00 1.000000e+00 1.010614e-03 467 1.660000e+00 1.000000e+00 1.011514e-03 468 1.670000e+00 1.000000e+00 1.012414e-03 469 1.680000e+00 1.000000e+00 1.013313e-03 470 1.690000e+00 1.000000e+00 1.014211e-03 471 1.700000e+00 1.000000e+00 1.015109e-03 472 1.710000e+00 1.000000e+00 1.016006e-03 473 1.720000e+00 1.000000e+00 1.016903e-03 474 1.730000e+00 1.000000e+00 1.017799e-03 475 1.740000e+00 1.000000e+00 1.018695e-03 476 1.750000e+00 1.000000e+00 1.019590e-03 477 1.760000e+00 1.000000e+00 1.020484e-03 478 1.770000e+00 1.000000e+00 1.021378e-03 479 1.780000e+00 1.000000e+00 1.022272e-03 480 1.790000e+00 1.000000e+00 1.023165e-03 481 1.800000e+00 1.000000e+00 1.024058e-03 482 1.810000e+00 1.000000e+00 1.024950e-03 483 1.820000e+00 1.000000e+00 1.025842e-03 484 1.830000e+00 1.000000e+00 1.026733e-03 485 1.840000e+00 1.000000e+00 1.027624e-03 486 1.850000e+00 1.000000e+00 1.028514e-03 487 1.860000e+00 1.000000e+00 1.029405e-03 488 1.870000e+00 1.000000e+00 1.030294e-03 489 1.880000e+00 1.000000e+00 1.031184e-03 490 1.890000e+00 1.000000e+00 1.032073e-03 491 1.900000e+00 1.000000e+00 1.032961e-03 492 1.910000e+00 1.000000e+00 1.033850e-03 493 1.920000e+00 1.000000e+00 1.034737e-03 494 1.930000e+00 1.000000e+00 1.035625e-03 495 1.940000e+00 1.000000e+00 1.036512e-03 496 1.950000e+00 1.000000e+00 1.037399e-03 497 1.960000e+00 1.000000e+00 1.038286e-03 498 1.970000e+00 1.000000e+00 1.039172e-03 499 1.980000e+00 1.000000e+00 1.040058e-03 500 1.990000e+00 1.000000e+00 1.040944e-03 501 2.000000e+00 1.000000e+00 1.041829e-03 502 2.010000e+00 1.000000e+00 1.042714e-03 503 2.020000e+00 1.000000e+00 1.043599e-03 504 2.030000e+00 1.000000e+00 1.044483e-03 505 2.040000e+00 1.000000e+00 1.045368e-03 506 2.050000e+00 1.000000e+00 1.046251e-03 507 2.060000e+00 1.000000e+00 1.047135e-03 508 2.070000e+00 1.000000e+00 1.048019e-03 509 2.080000e+00 1.000000e+00 1.048902e-03 510 2.090000e+00 1.000000e+00 1.049785e-03 511 2.100000e+00 1.000000e+00 1.050668e-03 512 2.110000e+00 1.000000e+00 1.051550e-03 513 2.120000e+00 1.000000e+00 1.052432e-03 514 2.130000e+00 1.000000e+00 1.053314e-03 515 2.140000e+00 1.000000e+00 1.054196e-03 516 2.150000e+00 1.000000e+00 1.055078e-03 517 2.160000e+00 1.000000e+00 1.055959e-03 518 2.170000e+00 1.000000e+00 1.056840e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 519 2.180000e+00 1.000000e+00 1.057721e-03 520 2.190000e+00 1.000000e+00 1.058602e-03 521 2.200000e+00 1.000000e+00 1.059482e-03 522 2.210000e+00 1.000000e+00 1.060363e-03 523 2.220000e+00 1.000000e+00 1.061243e-03 524 2.230000e+00 1.000000e+00 1.062123e-03 525 2.240000e+00 1.000000e+00 1.063003e-03 526 2.250000e+00 1.000000e+00 1.063882e-03 527 2.260000e+00 1.000000e+00 1.064762e-03 528 2.270000e+00 1.000000e+00 1.065641e-03 529 2.280000e+00 1.000000e+00 1.066520e-03 530 2.290000e+00 1.000000e+00 1.067399e-03 531 2.300000e+00 1.000000e+00 1.068278e-03 532 2.310000e+00 1.000000e+00 1.069157e-03 533 2.320000e+00 1.000000e+00 1.070035e-03 534 2.330000e+00 1.000000e+00 1.070913e-03 535 2.340000e+00 1.000000e+00 1.071792e-03 536 2.350000e+00 1.000000e+00 1.072670e-03 537 2.360000e+00 1.000000e+00 1.073547e-03 538 2.370000e+00 1.000000e+00 1.074425e-03 539 2.380000e+00 1.000000e+00 1.075303e-03 540 2.390000e+00 1.000000e+00 1.076180e-03 541 2.400000e+00 1.000000e+00 1.077057e-03 542 2.410000e+00 1.000000e+00 1.077935e-03 543 2.420000e+00 1.000000e+00 1.078812e-03 544 2.430000e+00 1.000000e+00 1.079688e-03 545 2.440000e+00 1.000000e+00 1.080565e-03 546 2.450000e+00 1.000000e+00 1.081442e-03 547 2.460000e+00 1.000000e+00 1.082318e-03 548 2.470000e+00 1.000000e+00 1.083195e-03 549 2.480000e+00 1.000000e+00 1.084071e-03 550 2.490000e+00 1.000000e+00 1.084947e-03 551 2.500000e+00 1.000000e+00 1.085823e-03 552 2.510000e+00 1.000000e+00 1.086699e-03 553 2.520000e+00 1.000000e+00 1.087575e-03 554 2.530000e+00 1.000000e+00 1.088451e-03 555 2.540000e+00 1.000000e+00 1.089327e-03 556 2.550000e+00 1.000000e+00 1.090202e-03 557 2.560000e+00 1.000000e+00 1.091077e-03 558 2.570000e+00 1.000000e+00 1.091953e-03 559 2.580000e+00 1.000000e+00 1.092828e-03 560 2.590000e+00 1.000000e+00 1.093703e-03 561 2.600000e+00 1.000000e+00 1.094578e-03 562 2.610000e+00 1.000000e+00 1.095453e-03 563 2.620000e+00 1.000000e+00 1.096328e-03 564 2.630000e+00 1.000000e+00 1.097203e-03 565 2.640000e+00 1.000000e+00 1.098077e-03 566 2.650000e+00 1.000000e+00 1.098952e-03 567 2.660000e+00 1.000000e+00 1.099826e-03 568 2.670000e+00 1.000000e+00 1.100701e-03 569 2.680000e+00 1.000000e+00 1.101575e-03 570 2.690000e+00 1.000000e+00 1.102449e-03 571 2.700000e+00 1.000000e+00 1.103323e-03 572 2.710000e+00 1.000000e+00 1.104198e-03 573 2.720000e+00 1.000000e+00 1.105072e-03 574 2.730000e+00 1.000000e+00 1.105945e-03 575 2.740000e+00 1.000000e+00 1.106819e-03 576 2.750000e+00 1.000000e+00 1.107693e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 577 2.760000e+00 1.000000e+00 1.108567e-03 578 2.770000e+00 1.000000e+00 1.109440e-03 579 2.780000e+00 1.000000e+00 1.110314e-03 580 2.790000e+00 1.000000e+00 1.111187e-03 581 2.800000e+00 1.000000e+00 1.112061e-03 582 2.810000e+00 1.000000e+00 1.112934e-03 583 2.820000e+00 1.000000e+00 1.113808e-03 584 2.830000e+00 1.000000e+00 1.114681e-03 585 2.840000e+00 1.000000e+00 1.115554e-03 586 2.850000e+00 1.000000e+00 1.116427e-03 587 2.860000e+00 1.000000e+00 1.117300e-03 588 2.870000e+00 1.000000e+00 1.118173e-03 589 2.880000e+00 1.000000e+00 1.119046e-03 590 2.890000e+00 1.000000e+00 1.119919e-03 591 2.900000e+00 1.000000e+00 1.120792e-03 592 2.910000e+00 1.000000e+00 1.121664e-03 593 2.920000e+00 1.000000e+00 1.122537e-03 594 2.930000e+00 1.000000e+00 1.123410e-03 595 2.940000e+00 1.000000e+00 1.124282e-03 596 2.950000e+00 1.000000e+00 1.125155e-03 597 2.960000e+00 1.000000e+00 1.126027e-03 598 2.970000e+00 1.000000e+00 1.126900e-03 599 2.980000e+00 1.000000e+00 1.127772e-03 600 2.990000e+00 1.000000e+00 1.128645e-03 601 3.000000e+00 1.000000e+00 1.129517e-03 602 0.000000e+00 1.500000e+00 -1.250000e-19 603 1.000000e-02 1.500000e+00 4.561848e-05 604 2.000000e-02 1.500000e+00 9.076433e-05 605 3.000000e-02 1.500000e+00 1.354387e-04 606 4.000000e-02 1.500000e+00 1.796427e-04 607 5.000000e-02 1.500000e+00 2.233776e-04 608 6.000000e-02 1.500000e+00 2.666444e-04 609 7.000000e-02 1.500000e+00 3.094443e-04 610 8.000000e-02 1.500000e+00 3.517785e-04 611 9.000000e-02 1.500000e+00 3.936480e-04 612 1.000000e-01 1.500000e+00 4.350541e-04 613 1.100000e-01 1.500000e+00 4.759977e-04 614 1.200000e-01 1.500000e+00 5.164801e-04 615 1.300000e-01 1.500000e+00 5.565023e-04 616 1.400000e-01 1.500000e+00 5.960655e-04 617 1.500000e-01 1.500000e+00 6.351707e-04 618 1.600000e-01 1.500000e+00 6.738191e-04 619 1.700000e-01 1.500000e+00 7.120117e-04 620 1.800000e-01 1.500000e+00 7.497497e-04 621 1.900000e-01 1.500000e+00 7.870342e-04 622 2.000000e-01 1.500000e+00 8.238661e-04 623 2.100000e-01 1.500000e+00 8.602466e-04 624 2.200000e-01 1.500000e+00 8.961768e-04 625 2.300000e-01 1.500000e+00 9.316577e-04 626 2.400000e-01 1.500000e+00 9.666905e-04 627 2.500000e-01 1.500000e+00 1.001276e-03 628 2.600000e-01 1.500000e+00 1.035415e-03 629 2.700000e-01 1.500000e+00 1.069110e-03 630 2.800000e-01 1.500000e+00 1.102360e-03 631 2.900000e-01 1.500000e+00 1.135168e-03 632 3.000000e-01 1.500000e+00 1.167533e-03 633 3.100000e-01 1.500000e+00 1.199457e-03 634 3.200000e-01 1.500000e+00 1.230942e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 635 3.300000e-01 1.500000e+00 1.261987e-03 636 3.400000e-01 1.500000e+00 1.292595e-03 637 3.500000e-01 1.500000e+00 1.322766e-03 638 3.600000e-01 1.500000e+00 1.352500e-03 639 3.700000e-01 1.500000e+00 1.381800e-03 640 3.800000e-01 1.500000e+00 1.410665e-03 641 3.900000e-01 1.500000e+00 1.439098e-03 642 4.000000e-01 1.500000e+00 1.467098e-03 643 4.100000e-01 1.500000e+00 1.494667e-03 644 4.200000e-01 1.500000e+00 1.521806e-03 645 4.300000e-01 1.500000e+00 1.548515e-03 646 4.400000e-01 1.500000e+00 1.574796e-03 647 4.500000e-01 1.500000e+00 1.600649e-03 648 4.600000e-01 1.500000e+00 1.626075e-03 649 4.700000e-01 1.500000e+00 1.651076e-03 650 4.800000e-01 1.500000e+00 1.675650e-03 651 4.900000e-01 1.500000e+00 1.699801e-03 652 5.000000e-01 1.500000e+00 1.723528e-03 653 5.100000e-01 1.500000e+00 1.746832e-03 654 5.200000e-01 1.500000e+00 1.769713e-03 655 5.300000e-01 1.500000e+00 1.792173e-03 656 5.400000e-01 1.500000e+00 1.814212e-03 657 5.500000e-01 1.500000e+00 1.835831e-03 658 5.600000e-01 1.500000e+00 1.857029e-03 659 5.700000e-01 1.500000e+00 1.877809e-03 660 5.800000e-01 1.500000e+00 1.898169e-03 661 5.900000e-01 1.500000e+00 1.918111e-03 662 6.000000e-01 1.500000e+00 1.937634e-03 663 6.100000e-01 1.500000e+00 1.956739e-03 664 6.200000e-01 1.500000e+00 1.975427e-03 665 6.300000e-01 1.500000e+00 1.993696e-03 666 6.400000e-01 1.500000e+00 2.011547e-03 667 6.500000e-01 1.500000e+00 2.028980e-03 668 6.600000e-01 1.500000e+00 2.045995e-03 669 6.700000e-01 1.500000e+00 2.062591e-03 670 6.800000e-01 1.500000e+00 2.078768e-03 671 6.900000e-01 1.500000e+00 2.094524e-03 672 7.000000e-01 1.500000e+00 2.109860e-03 673 7.100000e-01 1.500000e+00 2.124774e-03 674 7.200000e-01 1.500000e+00 2.139265e-03 675 7.300000e-01 1.500000e+00 2.153332e-03 676 7.400000e-01 1.500000e+00 2.166974e-03 677 7.500000e-01 1.500000e+00 2.180189e-03 678 7.600000e-01 1.500000e+00 2.192977e-03 679 7.700000e-01 1.500000e+00 2.205335e-03 680 7.800000e-01 1.500000e+00 2.217262e-03 681 7.900000e-01 1.500000e+00 2.228759e-03 682 8.000000e-01 1.500000e+00 2.239823e-03 683 8.100000e-01 1.500000e+00 2.250456e-03 684 8.200000e-01 1.500000e+00 2.260658e-03 685 8.300000e-01 1.500000e+00 2.270431e-03 686 8.400000e-01 1.500000e+00 2.279777e-03 687 8.500000e-01 1.500000e+00 2.288700e-03 688 8.600000e-01 1.500000e+00 2.297206e-03 689 8.700000e-01 1.500000e+00 2.305301e-03 690 8.800000e-01 1.500000e+00 2.312995e-03 691 8.900000e-01 1.500000e+00 2.320298e-03 692 9.000000e-01 1.500000e+00 2.327222e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 693 9.100000e-01 1.500000e+00 2.333779e-03 694 9.200000e-01 1.500000e+00 2.339985e-03 695 9.300000e-01 1.500000e+00 2.345856e-03 696 9.400000e-01 1.500000e+00 2.351408e-03 697 9.500000e-01 1.500000e+00 2.356658e-03 698 9.600000e-01 1.500000e+00 2.361624e-03 699 9.700000e-01 1.500000e+00 2.366323e-03 700 9.800000e-01 1.500000e+00 2.370773e-03 701 9.900000e-01 1.500000e+00 2.374989e-03 702 1.000000e+00 1.500000e+00 2.378989e-03 703 1.010000e+00 1.500000e+00 2.382787e-03 704 1.020000e+00 1.500000e+00 2.386399e-03 705 1.030000e+00 1.500000e+00 2.389838e-03 706 1.040000e+00 1.500000e+00 2.393117e-03 707 1.050000e+00 1.500000e+00 2.396248e-03 708 1.060000e+00 1.500000e+00 2.399242e-03 709 1.070000e+00 1.500000e+00 2.402109e-03 710 1.080000e+00 1.500000e+00 2.404860e-03 711 1.090000e+00 1.500000e+00 2.407503e-03 712 1.100000e+00 1.500000e+00 2.410045e-03 713 1.110000e+00 1.500000e+00 2.412495e-03 714 1.120000e+00 1.500000e+00 2.414860e-03 715 1.130000e+00 1.500000e+00 2.417144e-03 716 1.140000e+00 1.500000e+00 2.419355e-03 717 1.150000e+00 1.500000e+00 2.421498e-03 718 1.160000e+00 1.500000e+00 2.423576e-03 719 1.170000e+00 1.500000e+00 2.425596e-03 720 1.180000e+00 1.500000e+00 2.427560e-03 721 1.190000e+00 1.500000e+00 2.429472e-03 722 1.200000e+00 1.500000e+00 2.431336e-03 723 1.210000e+00 1.500000e+00 2.433156e-03 724 1.220000e+00 1.500000e+00 2.434933e-03 725 1.230000e+00 1.500000e+00 2.436671e-03 726 1.240000e+00 1.500000e+00 2.438372e-03 727 1.250000e+00 1.500000e+00 2.440039e-03 728 1.260000e+00 1.500000e+00 2.441673e-03 729 1.270000e+00 1.500000e+00 2.443276e-03 730 1.280000e+00 1.500000e+00 2.444851e-03 731 1.290000e+00 1.500000e+00 2.446398e-03 732 1.300000e+00 1.500000e+00 2.447920e-03 733 1.310000e+00 1.500000e+00 2.449418e-03 734 1.320000e+00 1.500000e+00 2.450893e-03 735 1.330000e+00 1.500000e+00 2.452346e-03 736 1.340000e+00 1.500000e+00 2.453779e-03 737 1.350000e+00 1.500000e+00 2.455192e-03 738 1.360000e+00 1.500000e+00 2.456588e-03 739 1.370000e+00 1.500000e+00 2.457966e-03 740 1.380000e+00 1.500000e+00 2.459327e-03 741 1.390000e+00 1.500000e+00 2.460673e-03 742 1.400000e+00 1.500000e+00 2.462003e-03 743 1.410000e+00 1.500000e+00 2.463320e-03 744 1.420000e+00 1.500000e+00 2.464623e-03 745 1.430000e+00 1.500000e+00 2.465913e-03 746 1.440000e+00 1.500000e+00 2.467191e-03 747 1.450000e+00 1.500000e+00 2.468457e-03 748 1.460000e+00 1.500000e+00 2.469713e-03 749 1.470000e+00 1.500000e+00 2.470957e-03 750 1.480000e+00 1.500000e+00 2.472191e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 751 1.490000e+00 1.500000e+00 2.473415e-03 752 1.500000e+00 1.500000e+00 2.474630e-03 753 1.510000e+00 1.500000e+00 2.475836e-03 754 1.520000e+00 1.500000e+00 2.477034e-03 755 1.530000e+00 1.500000e+00 2.478223e-03 756 1.540000e+00 1.500000e+00 2.479404e-03 757 1.550000e+00 1.500000e+00 2.480578e-03 758 1.560000e+00 1.500000e+00 2.481744e-03 759 1.570000e+00 1.500000e+00 2.482904e-03 760 1.580000e+00 1.500000e+00 2.484057e-03 761 1.590000e+00 1.500000e+00 2.485203e-03 762 1.600000e+00 1.500000e+00 2.486343e-03 763 1.610000e+00 1.500000e+00 2.487477e-03 764 1.620000e+00 1.500000e+00 2.488605e-03 765 1.630000e+00 1.500000e+00 2.489728e-03 766 1.640000e+00 1.500000e+00 2.490845e-03 767 1.650000e+00 1.500000e+00 2.491957e-03 768 1.660000e+00 1.500000e+00 2.493064e-03 769 1.670000e+00 1.500000e+00 2.494167e-03 770 1.680000e+00 1.500000e+00 2.495264e-03 771 1.690000e+00 1.500000e+00 2.496358e-03 772 1.700000e+00 1.500000e+00 2.497446e-03 773 1.710000e+00 1.500000e+00 2.498531e-03 774 1.720000e+00 1.500000e+00 2.499612e-03 775 1.730000e+00 1.500000e+00 2.500688e-03 776 1.740000e+00 1.500000e+00 2.501761e-03 777 1.750000e+00 1.500000e+00 2.502830e-03 778 1.760000e+00 1.500000e+00 2.503896e-03 779 1.770000e+00 1.500000e+00 2.504958e-03 780 1.780000e+00 1.500000e+00 2.506017e-03 781 1.790000e+00 1.500000e+00 2.507073e-03 782 1.800000e+00 1.500000e+00 2.508125e-03 783 1.810000e+00 1.500000e+00 2.509175e-03 784 1.820000e+00 1.500000e+00 2.510221e-03 785 1.830000e+00 1.500000e+00 2.511265e-03 786 1.840000e+00 1.500000e+00 2.512305e-03 787 1.850000e+00 1.500000e+00 2.513343e-03 788 1.860000e+00 1.500000e+00 2.514379e-03 789 1.870000e+00 1.500000e+00 2.515412e-03 790 1.880000e+00 1.500000e+00 2.516442e-03 791 1.890000e+00 1.500000e+00 2.517470e-03 792 1.900000e+00 1.500000e+00 2.518496e-03 793 1.910000e+00 1.500000e+00 2.519520e-03 794 1.920000e+00 1.500000e+00 2.520541e-03 795 1.930000e+00 1.500000e+00 2.521560e-03 796 1.940000e+00 1.500000e+00 2.522577e-03 797 1.950000e+00 1.500000e+00 2.523592e-03 798 1.960000e+00 1.500000e+00 2.524605e-03 799 1.970000e+00 1.500000e+00 2.525616e-03 800 1.980000e+00 1.500000e+00 2.526625e-03 801 1.990000e+00 1.500000e+00 2.527632e-03 802 2.000000e+00 1.500000e+00 2.528637e-03 803 2.010000e+00 1.500000e+00 2.529641e-03 804 2.020000e+00 1.500000e+00 2.530643e-03 805 2.030000e+00 1.500000e+00 2.531643e-03 806 2.040000e+00 1.500000e+00 2.532642e-03 807 2.050000e+00 1.500000e+00 2.533639e-03 808 2.060000e+00 1.500000e+00 2.534635e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 809 2.070000e+00 1.500000e+00 2.535629e-03 810 2.080000e+00 1.500000e+00 2.536621e-03 811 2.090000e+00 1.500000e+00 2.537613e-03 812 2.100000e+00 1.500000e+00 2.538602e-03 813 2.110000e+00 1.500000e+00 2.539591e-03 814 2.120000e+00 1.500000e+00 2.540578e-03 815 2.130000e+00 1.500000e+00 2.541563e-03 816 2.140000e+00 1.500000e+00 2.542548e-03 817 2.150000e+00 1.500000e+00 2.543531e-03 818 2.160000e+00 1.500000e+00 2.544513e-03 819 2.170000e+00 1.500000e+00 2.545494e-03 820 2.180000e+00 1.500000e+00 2.546474e-03 821 2.190000e+00 1.500000e+00 2.547452e-03 822 2.200000e+00 1.500000e+00 2.548429e-03 823 2.210000e+00 1.500000e+00 2.549406e-03 824 2.220000e+00 1.500000e+00 2.550381e-03 825 2.230000e+00 1.500000e+00 2.551355e-03 826 2.240000e+00 1.500000e+00 2.552328e-03 827 2.250000e+00 1.500000e+00 2.553300e-03 828 2.260000e+00 1.500000e+00 2.554271e-03 829 2.270000e+00 1.500000e+00 2.555241e-03 830 2.280000e+00 1.500000e+00 2.556211e-03 831 2.290000e+00 1.500000e+00 2.557179e-03 832 2.300000e+00 1.500000e+00 2.558146e-03 833 2.310000e+00 1.500000e+00 2.559113e-03 834 2.320000e+00 1.500000e+00 2.560078e-03 835 2.330000e+00 1.500000e+00 2.561043e-03 836 2.340000e+00 1.500000e+00 2.562007e-03 837 2.350000e+00 1.500000e+00 2.562970e-03 838 2.360000e+00 1.500000e+00 2.563933e-03 839 2.370000e+00 1.500000e+00 2.564894e-03 840 2.380000e+00 1.500000e+00 2.565855e-03 841 2.390000e+00 1.500000e+00 2.566815e-03 842 2.400000e+00 1.500000e+00 2.567774e-03 843 2.410000e+00 1.500000e+00 2.568733e-03 844 2.420000e+00 1.500000e+00 2.569690e-03 845 2.430000e+00 1.500000e+00 2.570647e-03 846 2.440000e+00 1.500000e+00 2.571604e-03 847 2.450000e+00 1.500000e+00 2.572560e-03 848 2.460000e+00 1.500000e+00 2.573515e-03 849 2.470000e+00 1.500000e+00 2.574469e-03 850 2.480000e+00 1.500000e+00 2.575423e-03 851 2.490000e+00 1.500000e+00 2.576376e-03 852 2.500000e+00 1.500000e+00 2.577328e-03 853 2.510000e+00 1.500000e+00 2.578280e-03 854 2.520000e+00 1.500000e+00 2.579232e-03 855 2.530000e+00 1.500000e+00 2.580182e-03 856 2.540000e+00 1.500000e+00 2.581132e-03 857 2.550000e+00 1.500000e+00 2.582082e-03 858 2.560000e+00 1.500000e+00 2.583031e-03 859 2.570000e+00 1.500000e+00 2.583979e-03 860 2.580000e+00 1.500000e+00 2.584927e-03 861 2.590000e+00 1.500000e+00 2.585875e-03 862 2.600000e+00 1.500000e+00 2.586822e-03 863 2.610000e+00 1.500000e+00 2.587768e-03 864 2.620000e+00 1.500000e+00 2.588714e-03 865 2.630000e+00 1.500000e+00 2.589659e-03 866 2.640000e+00 1.500000e+00 2.590604e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 867 2.650000e+00 1.500000e+00 2.591549e-03 868 2.660000e+00 1.500000e+00 2.592492e-03 869 2.670000e+00 1.500000e+00 2.593436e-03 870 2.680000e+00 1.500000e+00 2.594379e-03 871 2.690000e+00 1.500000e+00 2.595321e-03 872 2.700000e+00 1.500000e+00 2.596264e-03 873 2.710000e+00 1.500000e+00 2.597205e-03 874 2.720000e+00 1.500000e+00 2.598146e-03 875 2.730000e+00 1.500000e+00 2.599087e-03 876 2.740000e+00 1.500000e+00 2.600028e-03 877 2.750000e+00 1.500000e+00 2.600968e-03 878 2.760000e+00 1.500000e+00 2.601907e-03 879 2.770000e+00 1.500000e+00 2.602846e-03 880 2.780000e+00 1.500000e+00 2.603785e-03 881 2.790000e+00 1.500000e+00 2.604724e-03 882 2.800000e+00 1.500000e+00 2.605662e-03 883 2.810000e+00 1.500000e+00 2.606599e-03 884 2.820000e+00 1.500000e+00 2.607537e-03 885 2.830000e+00 1.500000e+00 2.608474e-03 886 2.840000e+00 1.500000e+00 2.609410e-03 887 2.850000e+00 1.500000e+00 2.610346e-03 888 2.860000e+00 1.500000e+00 2.611282e-03 889 2.870000e+00 1.500000e+00 2.612218e-03 890 2.880000e+00 1.500000e+00 2.613153e-03 891 2.890000e+00 1.500000e+00 2.614088e-03 892 2.900000e+00 1.500000e+00 2.615022e-03 893 2.910000e+00 1.500000e+00 2.615957e-03 894 2.920000e+00 1.500000e+00 2.616891e-03 895 2.930000e+00 1.500000e+00 2.617824e-03 896 2.940000e+00 1.500000e+00 2.618757e-03 897 2.950000e+00 1.500000e+00 2.619690e-03 898 2.960000e+00 1.500000e+00 2.620623e-03 899 2.970000e+00 1.500000e+00 2.621555e-03 900 2.980000e+00 1.500000e+00 2.622488e-03 901 2.990000e+00 1.500000e+00 2.623419e-03 902 3.000000e+00 1.500000e+00 2.624351e-03 903 0.000000e+00 2.000000e+00 -1.250000e-19 904 1.000000e-02 2.000000e+00 5.434813e-05 905 2.000000e-02 2.000000e+00 1.083028e-04 906 3.000000e-02 2.000000e+00 1.618647e-04 907 4.000000e-02 2.000000e+00 2.150347e-04 908 5.000000e-02 2.000000e+00 2.678135e-04 909 6.000000e-02 2.000000e+00 3.202018e-04 910 7.000000e-02 2.000000e+00 3.722004e-04 911 8.000000e-02 2.000000e+00 4.238099e-04 912 9.000000e-02 2.000000e+00 4.750312e-04 913 1.000000e-01 2.000000e+00 5.258649e-04 914 1.100000e-01 2.000000e+00 5.763119e-04 915 1.200000e-01 2.000000e+00 6.263728e-04 916 1.300000e-01 2.000000e+00 6.760483e-04 917 1.400000e-01 2.000000e+00 7.253392e-04 918 1.500000e-01 2.000000e+00 7.742462e-04 919 1.600000e-01 2.000000e+00 8.227700e-04 920 1.700000e-01 2.000000e+00 8.709114e-04 921 1.800000e-01 2.000000e+00 9.186710e-04 922 1.900000e-01 2.000000e+00 9.660496e-04 923 2.000000e-01 2.000000e+00 1.013048e-03 924 2.100000e-01 2.000000e+00 1.059667e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 925 2.200000e-01 2.000000e+00 1.105906e-03 926 2.300000e-01 2.000000e+00 1.151768e-03 927 2.400000e-01 2.000000e+00 1.197252e-03 928 2.500000e-01 2.000000e+00 1.242359e-03 929 2.600000e-01 2.000000e+00 1.287090e-03 930 2.700000e-01 2.000000e+00 1.331446e-03 931 2.800000e-01 2.000000e+00 1.375427e-03 932 2.900000e-01 2.000000e+00 1.419034e-03 933 3.000000e-01 2.000000e+00 1.462267e-03 934 3.100000e-01 2.000000e+00 1.505128e-03 935 3.200000e-01 2.000000e+00 1.547617e-03 936 3.300000e-01 2.000000e+00 1.589735e-03 937 3.400000e-01 2.000000e+00 1.631482e-03 938 3.500000e-01 2.000000e+00 1.672859e-03 939 3.600000e-01 2.000000e+00 1.713867e-03 940 3.700000e-01 2.000000e+00 1.754506e-03 941 3.800000e-01 2.000000e+00 1.794777e-03 942 3.900000e-01 2.000000e+00 1.834681e-03 943 4.000000e-01 2.000000e+00 1.874219e-03 944 4.100000e-01 2.000000e+00 1.913390e-03 945 4.200000e-01 2.000000e+00 1.952196e-03 946 4.300000e-01 2.000000e+00 1.990637e-03 947 4.400000e-01 2.000000e+00 2.028715e-03 948 4.500000e-01 2.000000e+00 2.066428e-03 949 4.600000e-01 2.000000e+00 2.103779e-03 950 4.700000e-01 2.000000e+00 2.140768e-03 951 4.800000e-01 2.000000e+00 2.177396e-03 952 4.900000e-01 2.000000e+00 2.213662e-03 953 5.000000e-01 2.000000e+00 2.249568e-03 954 5.100000e-01 2.000000e+00 2.285115e-03 955 5.200000e-01 2.000000e+00 2.320302e-03 956 5.300000e-01 2.000000e+00 2.355131e-03 957 5.400000e-01 2.000000e+00 2.389602e-03 958 5.500000e-01 2.000000e+00 2.423716e-03 959 5.600000e-01 2.000000e+00 2.457473e-03 960 5.700000e-01 2.000000e+00 2.490874e-03 961 5.800000e-01 2.000000e+00 2.523920e-03 962 5.900000e-01 2.000000e+00 2.556610e-03 963 6.000000e-01 2.000000e+00 2.588946e-03 964 6.100000e-01 2.000000e+00 2.620928e-03 965 6.200000e-01 2.000000e+00 2.652556e-03 966 6.300000e-01 2.000000e+00 2.683832e-03 967 6.400000e-01 2.000000e+00 2.714755e-03 968 6.500000e-01 2.000000e+00 2.745326e-03 969 6.600000e-01 2.000000e+00 2.775546e-03 970 6.700000e-01 2.000000e+00 2.805415e-03 971 6.800000e-01 2.000000e+00 2.834934e-03 972 6.900000e-01 2.000000e+00 2.864103e-03 973 7.000000e-01 2.000000e+00 2.892922e-03 974 7.100000e-01 2.000000e+00 2.921391e-03 975 7.200000e-01 2.000000e+00 2.949512e-03 976 7.300000e-01 2.000000e+00 2.977285e-03 977 7.400000e-01 2.000000e+00 3.004709e-03 978 7.500000e-01 2.000000e+00 3.031786e-03 979 7.600000e-01 2.000000e+00 3.058515e-03 980 7.700000e-01 2.000000e+00 3.084896e-03 981 7.800000e-01 2.000000e+00 3.110931e-03 982 7.900000e-01 2.000000e+00 3.136619e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 983 8.000000e-01 2.000000e+00 3.161960e-03 984 8.100000e-01 2.000000e+00 3.186955e-03 985 8.200000e-01 2.000000e+00 3.211603e-03 986 8.300000e-01 2.000000e+00 3.235905e-03 987 8.400000e-01 2.000000e+00 3.259860e-03 988 8.500000e-01 2.000000e+00 3.283468e-03 989 8.600000e-01 2.000000e+00 3.306730e-03 990 8.700000e-01 2.000000e+00 3.329644e-03 991 8.800000e-01 2.000000e+00 3.352211e-03 992 8.900000e-01 2.000000e+00 3.374431e-03 993 9.000000e-01 2.000000e+00 3.396302e-03 994 9.100000e-01 2.000000e+00 3.417825e-03 995 9.200000e-01 2.000000e+00 3.438998e-03 996 9.300000e-01 2.000000e+00 3.459820e-03 997 9.400000e-01 2.000000e+00 3.480292e-03 998 9.500000e-01 2.000000e+00 3.500411e-03 999 9.600000e-01 2.000000e+00 3.520176e-03 1000 9.700000e-01 2.000000e+00 3.539587e-03 1001 9.800000e-01 2.000000e+00 3.558641e-03 1002 9.900000e-01 2.000000e+00 3.577337e-03 1003 1.000000e+00 2.000000e+00 3.595673e-03 1004 1.010000e+00 2.000000e+00 3.613647e-03 1005 1.020000e+00 2.000000e+00 3.631256e-03 1006 1.030000e+00 2.000000e+00 3.648498e-03 1007 1.040000e+00 2.000000e+00 3.665370e-03 1008 1.050000e+00 2.000000e+00 3.681869e-03 1009 1.060000e+00 2.000000e+00 3.697992e-03 1010 1.070000e+00 2.000000e+00 3.713735e-03 1011 1.080000e+00 2.000000e+00 3.729095e-03 1012 1.090000e+00 2.000000e+00 3.744069e-03 1013 1.100000e+00 2.000000e+00 3.758651e-03 1014 1.110000e+00 2.000000e+00 3.772839e-03 1015 1.120000e+00 2.000000e+00 3.786629e-03 1016 1.130000e+00 2.000000e+00 3.800016e-03 1017 1.140000e+00 2.000000e+00 3.812997e-03 1018 1.150000e+00 2.000000e+00 3.825570e-03 1019 1.160000e+00 2.000000e+00 3.837731e-03 1020 1.170000e+00 2.000000e+00 3.849478e-03 1021 1.180000e+00 2.000000e+00 3.860810e-03 1022 1.190000e+00 2.000000e+00 3.871727e-03 1023 1.200000e+00 2.000000e+00 3.882230e-03 1024 1.210000e+00 2.000000e+00 3.892320e-03 1025 1.220000e+00 2.000000e+00 3.902000e-03 1026 1.230000e+00 2.000000e+00 3.911277e-03 1027 1.240000e+00 2.000000e+00 3.920155e-03 1028 1.250000e+00 2.000000e+00 3.928642e-03 1029 1.260000e+00 2.000000e+00 3.936748e-03 1030 1.270000e+00 2.000000e+00 3.944482e-03 1031 1.280000e+00 2.000000e+00 3.951857e-03 1032 1.290000e+00 2.000000e+00 3.958885e-03 1033 1.300000e+00 2.000000e+00 3.965580e-03 1034 1.310000e+00 2.000000e+00 3.971955e-03 1035 1.320000e+00 2.000000e+00 3.978025e-03 1036 1.330000e+00 2.000000e+00 3.983804e-03 1037 1.340000e+00 2.000000e+00 3.989309e-03 1038 1.350000e+00 2.000000e+00 3.994553e-03 1039 1.360000e+00 2.000000e+00 3.999551e-03 1040 1.370000e+00 2.000000e+00 4.004317e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1041 1.380000e+00 2.000000e+00 4.008866e-03 1042 1.390000e+00 2.000000e+00 4.013210e-03 1043 1.400000e+00 2.000000e+00 4.017362e-03 1044 1.410000e+00 2.000000e+00 4.021334e-03 1045 1.420000e+00 2.000000e+00 4.025138e-03 1046 1.430000e+00 2.000000e+00 4.028784e-03 1047 1.440000e+00 2.000000e+00 4.032283e-03 1048 1.450000e+00 2.000000e+00 4.035643e-03 1049 1.460000e+00 2.000000e+00 4.038875e-03 1050 1.470000e+00 2.000000e+00 4.041986e-03 1051 1.480000e+00 2.000000e+00 4.044984e-03 1052 1.490000e+00 2.000000e+00 4.047877e-03 1053 1.500000e+00 2.000000e+00 4.050670e-03 1054 1.510000e+00 2.000000e+00 4.053371e-03 1055 1.520000e+00 2.000000e+00 4.055985e-03 1056 1.530000e+00 2.000000e+00 4.058518e-03 1057 1.540000e+00 2.000000e+00 4.060975e-03 1058 1.550000e+00 2.000000e+00 4.063359e-03 1059 1.560000e+00 2.000000e+00 4.065677e-03 1060 1.570000e+00 2.000000e+00 4.067931e-03 1061 1.580000e+00 2.000000e+00 4.070125e-03 1062 1.590000e+00 2.000000e+00 4.072263e-03 1063 1.600000e+00 2.000000e+00 4.074349e-03 1064 1.610000e+00 2.000000e+00 4.076385e-03 1065 1.620000e+00 2.000000e+00 4.078373e-03 1066 1.630000e+00 2.000000e+00 4.080318e-03 1067 1.640000e+00 2.000000e+00 4.082220e-03 1068 1.650000e+00 2.000000e+00 4.084083e-03 1069 1.660000e+00 2.000000e+00 4.085908e-03 1070 1.670000e+00 2.000000e+00 4.087697e-03 1071 1.680000e+00 2.000000e+00 4.089453e-03 1072 1.690000e+00 2.000000e+00 4.091177e-03 1073 1.700000e+00 2.000000e+00 4.092871e-03 1074 1.710000e+00 2.000000e+00 4.094535e-03 1075 1.720000e+00 2.000000e+00 4.096173e-03 1076 1.730000e+00 2.000000e+00 4.097784e-03 1077 1.740000e+00 2.000000e+00 4.099371e-03 1078 1.750000e+00 2.000000e+00 4.100934e-03 1079 1.760000e+00 2.000000e+00 4.102474e-03 1080 1.770000e+00 2.000000e+00 4.103993e-03 1081 1.780000e+00 2.000000e+00 4.105491e-03 1082 1.790000e+00 2.000000e+00 4.106970e-03 1083 1.800000e+00 2.000000e+00 4.108431e-03 1084 1.810000e+00 2.000000e+00 4.109873e-03 1085 1.820000e+00 2.000000e+00 4.111298e-03 1086 1.830000e+00 2.000000e+00 4.112707e-03 1087 1.840000e+00 2.000000e+00 4.114101e-03 1088 1.850000e+00 2.000000e+00 4.115479e-03 1089 1.860000e+00 2.000000e+00 4.116843e-03 1090 1.870000e+00 2.000000e+00 4.118193e-03 1091 1.880000e+00 2.000000e+00 4.119530e-03 1092 1.890000e+00 2.000000e+00 4.120855e-03 1093 1.900000e+00 2.000000e+00 4.122167e-03 1094 1.910000e+00 2.000000e+00 4.123467e-03 1095 1.920000e+00 2.000000e+00 4.124756e-03 1096 1.930000e+00 2.000000e+00 4.126035e-03 1097 1.940000e+00 2.000000e+00 4.127303e-03 1098 1.950000e+00 2.000000e+00 4.128561e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1099 1.960000e+00 2.000000e+00 4.129809e-03 1100 1.970000e+00 2.000000e+00 4.131048e-03 1101 1.980000e+00 2.000000e+00 4.132278e-03 1102 1.990000e+00 2.000000e+00 4.133499e-03 1103 2.000000e+00 2.000000e+00 4.134712e-03 1104 2.010000e+00 2.000000e+00 4.135917e-03 1105 2.020000e+00 2.000000e+00 4.137114e-03 1106 2.030000e+00 2.000000e+00 4.138303e-03 1107 2.040000e+00 2.000000e+00 4.139485e-03 1108 2.050000e+00 2.000000e+00 4.140661e-03 1109 2.060000e+00 2.000000e+00 4.141829e-03 1110 2.070000e+00 2.000000e+00 4.142991e-03 1111 2.080000e+00 2.000000e+00 4.144147e-03 1112 2.090000e+00 2.000000e+00 4.145296e-03 1113 2.100000e+00 2.000000e+00 4.146440e-03 1114 2.110000e+00 2.000000e+00 4.147577e-03 1115 2.120000e+00 2.000000e+00 4.148709e-03 1116 2.130000e+00 2.000000e+00 4.149836e-03 1117 2.140000e+00 2.000000e+00 4.150958e-03 1118 2.150000e+00 2.000000e+00 4.152074e-03 1119 2.160000e+00 2.000000e+00 4.153185e-03 1120 2.170000e+00 2.000000e+00 4.154292e-03 1121 2.180000e+00 2.000000e+00 4.155394e-03 1122 2.190000e+00 2.000000e+00 4.156491e-03 1123 2.200000e+00 2.000000e+00 4.157584e-03 1124 2.210000e+00 2.000000e+00 4.158673e-03 1125 2.220000e+00 2.000000e+00 4.159758e-03 1126 2.230000e+00 2.000000e+00 4.160839e-03 1127 2.240000e+00 2.000000e+00 4.161915e-03 1128 2.250000e+00 2.000000e+00 4.162988e-03 1129 2.260000e+00 2.000000e+00 4.164058e-03 1130 2.270000e+00 2.000000e+00 4.165123e-03 1131 2.280000e+00 2.000000e+00 4.166185e-03 1132 2.290000e+00 2.000000e+00 4.167244e-03 1133 2.300000e+00 2.000000e+00 4.168300e-03 1134 2.310000e+00 2.000000e+00 4.169352e-03 1135 2.320000e+00 2.000000e+00 4.170401e-03 1136 2.330000e+00 2.000000e+00 4.171447e-03 1137 2.340000e+00 2.000000e+00 4.172490e-03 1138 2.350000e+00 2.000000e+00 4.173530e-03 1139 2.360000e+00 2.000000e+00 4.174567e-03 1140 2.370000e+00 2.000000e+00 4.175602e-03 1141 2.380000e+00 2.000000e+00 4.176633e-03 1142 2.390000e+00 2.000000e+00 4.177663e-03 1143 2.400000e+00 2.000000e+00 4.178689e-03 1144 2.410000e+00 2.000000e+00 4.179713e-03 1145 2.420000e+00 2.000000e+00 4.180735e-03 1146 2.430000e+00 2.000000e+00 4.181754e-03 1147 2.440000e+00 2.000000e+00 4.182771e-03 1148 2.450000e+00 2.000000e+00 4.183786e-03 1149 2.460000e+00 2.000000e+00 4.184798e-03 1150 2.470000e+00 2.000000e+00 4.185808e-03 1151 2.480000e+00 2.000000e+00 4.186816e-03 1152 2.490000e+00 2.000000e+00 4.187822e-03 1153 2.500000e+00 2.000000e+00 4.188826e-03 1154 2.510000e+00 2.000000e+00 4.189828e-03 1155 2.520000e+00 2.000000e+00 4.190828e-03 1156 2.530000e+00 2.000000e+00 4.191826e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1157 2.540000e+00 2.000000e+00 4.192823e-03 1158 2.550000e+00 2.000000e+00 4.193817e-03 1159 2.560000e+00 2.000000e+00 4.194810e-03 1160 2.570000e+00 2.000000e+00 4.195801e-03 1161 2.580000e+00 2.000000e+00 4.196790e-03 1162 2.590000e+00 2.000000e+00 4.197778e-03 1163 2.600000e+00 2.000000e+00 4.198764e-03 1164 2.610000e+00 2.000000e+00 4.199748e-03 1165 2.620000e+00 2.000000e+00 4.200731e-03 1166 2.630000e+00 2.000000e+00 4.201712e-03 1167 2.640000e+00 2.000000e+00 4.202692e-03 1168 2.650000e+00 2.000000e+00 4.203670e-03 1169 2.660000e+00 2.000000e+00 4.204647e-03 1170 2.670000e+00 2.000000e+00 4.205622e-03 1171 2.680000e+00 2.000000e+00 4.206597e-03 1172 2.690000e+00 2.000000e+00 4.207569e-03 1173 2.700000e+00 2.000000e+00 4.208541e-03 1174 2.710000e+00 2.000000e+00 4.209511e-03 1175 2.720000e+00 2.000000e+00 4.210479e-03 1176 2.730000e+00 2.000000e+00 4.211447e-03 1177 2.740000e+00 2.000000e+00 4.212413e-03 1178 2.750000e+00 2.000000e+00 4.213378e-03 1179 2.760000e+00 2.000000e+00 4.214342e-03 1180 2.770000e+00 2.000000e+00 4.215305e-03 1181 2.780000e+00 2.000000e+00 4.216267e-03 1182 2.790000e+00 2.000000e+00 4.217227e-03 1183 2.800000e+00 2.000000e+00 4.218186e-03 1184 2.810000e+00 2.000000e+00 4.219145e-03 1185 2.820000e+00 2.000000e+00 4.220102e-03 1186 2.830000e+00 2.000000e+00 4.221058e-03 1187 2.840000e+00 2.000000e+00 4.222013e-03 1188 2.850000e+00 2.000000e+00 4.222967e-03 1189 2.860000e+00 2.000000e+00 4.223921e-03 1190 2.870000e+00 2.000000e+00 4.224873e-03 1191 2.880000e+00 2.000000e+00 4.225824e-03 1192 2.890000e+00 2.000000e+00 4.226774e-03 1193 2.900000e+00 2.000000e+00 4.227724e-03 1194 2.910000e+00 2.000000e+00 4.228672e-03 1195 2.920000e+00 2.000000e+00 4.229620e-03 1196 2.930000e+00 2.000000e+00 4.230567e-03 1197 2.940000e+00 2.000000e+00 4.231512e-03 1198 2.950000e+00 2.000000e+00 4.232458e-03 1199 2.960000e+00 2.000000e+00 4.233402e-03 1200 2.970000e+00 2.000000e+00 4.234345e-03 1201 2.980000e+00 2.000000e+00 4.235288e-03 1202 2.990000e+00 2.000000e+00 4.236229e-03 1203 3.000000e+00 2.000000e+00 4.237170e-03 1204 0.000000e+00 2.500000e+00 -1.250000e-19 1205 1.000000e-02 2.500000e+00 5.937829e-05 1206 2.000000e-02 2.500000e+00 1.184251e-04 1207 3.000000e-02 2.500000e+00 1.771408e-04 1208 4.000000e-02 2.500000e+00 2.355261e-04 1209 5.000000e-02 2.500000e+00 2.935814e-04 1210 6.000000e-02 2.500000e+00 3.513072e-04 1211 7.000000e-02 2.500000e+00 4.087041e-04 1212 8.000000e-02 2.500000e+00 4.657725e-04 1213 9.000000e-02 2.500000e+00 5.225130e-04 1214 1.000000e-01 2.500000e+00 5.789260e-04 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1215 1.100000e-01 2.500000e+00 6.350121e-04 1216 1.200000e-01 2.500000e+00 6.907717e-04 1217 1.300000e-01 2.500000e+00 7.462055e-04 1218 1.400000e-01 2.500000e+00 8.013137e-04 1219 1.500000e-01 2.500000e+00 8.560971e-04 1220 1.600000e-01 2.500000e+00 9.105560e-04 1221 1.700000e-01 2.500000e+00 9.646909e-04 1222 1.800000e-01 2.500000e+00 1.018502e-03 1223 1.900000e-01 2.500000e+00 1.071991e-03 1224 2.000000e-01 2.500000e+00 1.125157e-03 1225 2.100000e-01 2.500000e+00 1.178001e-03 1226 2.200000e-01 2.500000e+00 1.230524e-03 1227 2.300000e-01 2.500000e+00 1.282726e-03 1228 2.400000e-01 2.500000e+00 1.334607e-03 1229 2.500000e-01 2.500000e+00 1.386168e-03 1230 2.600000e-01 2.500000e+00 1.437410e-03 1231 2.700000e-01 2.500000e+00 1.488332e-03 1232 2.800000e-01 2.500000e+00 1.538936e-03 1233 2.900000e-01 2.500000e+00 1.589222e-03 1234 3.000000e-01 2.500000e+00 1.639190e-03 1235 3.100000e-01 2.500000e+00 1.688842e-03 1236 3.200000e-01 2.500000e+00 1.738176e-03 1237 3.300000e-01 2.500000e+00 1.787195e-03 1238 3.400000e-01 2.500000e+00 1.835897e-03 1239 3.500000e-01 2.500000e+00 1.884285e-03 1240 3.600000e-01 2.500000e+00 1.932358e-03 1241 3.700000e-01 2.500000e+00 1.980116e-03 1242 3.800000e-01 2.500000e+00 2.027561e-03 1243 3.900000e-01 2.500000e+00 2.074692e-03 1244 4.000000e-01 2.500000e+00 2.121511e-03 1245 4.100000e-01 2.500000e+00 2.168017e-03 1246 4.200000e-01 2.500000e+00 2.214211e-03 1247 4.300000e-01 2.500000e+00 2.260094e-03 1248 4.400000e-01 2.500000e+00 2.305666e-03 1249 4.500000e-01 2.500000e+00 2.350927e-03 1250 4.600000e-01 2.500000e+00 2.395878e-03 1251 4.700000e-01 2.500000e+00 2.440519e-03 1252 4.800000e-01 2.500000e+00 2.484852e-03 1253 4.900000e-01 2.500000e+00 2.528875e-03 1254 5.000000e-01 2.500000e+00 2.572590e-03 1255 5.100000e-01 2.500000e+00 2.615998e-03 1256 5.200000e-01 2.500000e+00 2.659098e-03 1257 5.300000e-01 2.500000e+00 2.701891e-03 1258 5.400000e-01 2.500000e+00 2.744377e-03 1259 5.500000e-01 2.500000e+00 2.786558e-03 1260 5.600000e-01 2.500000e+00 2.828433e-03 1261 5.700000e-01 2.500000e+00 2.870002e-03 1262 5.800000e-01 2.500000e+00 2.911267e-03 1263 5.900000e-01 2.500000e+00 2.952228e-03 1264 6.000000e-01 2.500000e+00 2.992885e-03 1265 6.100000e-01 2.500000e+00 3.033238e-03 1266 6.200000e-01 2.500000e+00 3.073289e-03 1267 6.300000e-01 2.500000e+00 3.113036e-03 1268 6.400000e-01 2.500000e+00 3.152482e-03 1269 6.500000e-01 2.500000e+00 3.191626e-03 1270 6.600000e-01 2.500000e+00 3.230468e-03 1271 6.700000e-01 2.500000e+00 3.269010e-03 1272 6.800000e-01 2.500000e+00 3.307251e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1273 6.900000e-01 2.500000e+00 3.345191e-03 1274 7.000000e-01 2.500000e+00 3.382833e-03 1275 7.100000e-01 2.500000e+00 3.420174e-03 1276 7.200000e-01 2.500000e+00 3.457217e-03 1277 7.300000e-01 2.500000e+00 3.493962e-03 1278 7.400000e-01 2.500000e+00 3.530408e-03 1279 7.500000e-01 2.500000e+00 3.566557e-03 1280 7.600000e-01 2.500000e+00 3.602408e-03 1281 7.700000e-01 2.500000e+00 3.637962e-03 1282 7.800000e-01 2.500000e+00 3.673219e-03 1283 7.900000e-01 2.500000e+00 3.708181e-03 1284 8.000000e-01 2.500000e+00 3.742846e-03 1285 8.100000e-01 2.500000e+00 3.777216e-03 1286 8.200000e-01 2.500000e+00 3.811290e-03 1287 8.300000e-01 2.500000e+00 3.845070e-03 1288 8.400000e-01 2.500000e+00 3.878555e-03 1289 8.500000e-01 2.500000e+00 3.911746e-03 1290 8.600000e-01 2.500000e+00 3.944644e-03 1291 8.700000e-01 2.500000e+00 3.977247e-03 1292 8.800000e-01 2.500000e+00 4.009557e-03 1293 8.900000e-01 2.500000e+00 4.041575e-03 1294 9.000000e-01 2.500000e+00 4.073300e-03 1295 9.100000e-01 2.500000e+00 4.104732e-03 1296 9.200000e-01 2.500000e+00 4.135872e-03 1297 9.300000e-01 2.500000e+00 4.166720e-03 1298 9.400000e-01 2.500000e+00 4.197277e-03 1299 9.500000e-01 2.500000e+00 4.227542e-03 1300 9.600000e-01 2.500000e+00 4.257516e-03 1301 9.700000e-01 2.500000e+00 4.287199e-03 1302 9.800000e-01 2.500000e+00 4.316591e-03 1303 9.900000e-01 2.500000e+00 4.345693e-03 1304 1.000000e+00 2.500000e+00 4.374504e-03 1305 1.010000e+00 2.500000e+00 4.403024e-03 1306 1.020000e+00 2.500000e+00 4.431255e-03 1307 1.030000e+00 2.500000e+00 4.459195e-03 1308 1.040000e+00 2.500000e+00 4.486845e-03 1309 1.050000e+00 2.500000e+00 4.514205e-03 1310 1.060000e+00 2.500000e+00 4.541274e-03 1311 1.070000e+00 2.500000e+00 4.568054e-03 1312 1.080000e+00 2.500000e+00 4.594543e-03 1313 1.090000e+00 2.500000e+00 4.620742e-03 1314 1.100000e+00 2.500000e+00 4.646651e-03 1315 1.110000e+00 2.500000e+00 4.672268e-03 1316 1.120000e+00 2.500000e+00 4.697595e-03 1317 1.130000e+00 2.500000e+00 4.722631e-03 1318 1.140000e+00 2.500000e+00 4.747375e-03 1319 1.150000e+00 2.500000e+00 4.771828e-03 1320 1.160000e+00 2.500000e+00 4.795988e-03 1321 1.170000e+00 2.500000e+00 4.819855e-03 1322 1.180000e+00 2.500000e+00 4.843429e-03 1323 1.190000e+00 2.500000e+00 4.866708e-03 1324 1.200000e+00 2.500000e+00 4.889693e-03 1325 1.210000e+00 2.500000e+00 4.912382e-03 1326 1.220000e+00 2.500000e+00 4.934774e-03 1327 1.230000e+00 2.500000e+00 4.956869e-03 1328 1.240000e+00 2.500000e+00 4.978664e-03 1329 1.250000e+00 2.500000e+00 5.000160e-03 1330 1.260000e+00 2.500000e+00 5.021353e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1331 1.270000e+00 2.500000e+00 5.042244e-03 1332 1.280000e+00 2.500000e+00 5.062829e-03 1333 1.290000e+00 2.500000e+00 5.083108e-03 1334 1.300000e+00 2.500000e+00 5.103078e-03 1335 1.310000e+00 2.500000e+00 5.122736e-03 1336 1.320000e+00 2.500000e+00 5.142081e-03 1337 1.330000e+00 2.500000e+00 5.161110e-03 1338 1.340000e+00 2.500000e+00 5.179819e-03 1339 1.350000e+00 2.500000e+00 5.198207e-03 1340 1.360000e+00 2.500000e+00 5.216269e-03 1341 1.370000e+00 2.500000e+00 5.234003e-03 1342 1.380000e+00 2.500000e+00 5.251403e-03 1343 1.390000e+00 2.500000e+00 5.268467e-03 1344 1.400000e+00 2.500000e+00 5.285191e-03 1345 1.410000e+00 2.500000e+00 5.301569e-03 1346 1.420000e+00 2.500000e+00 5.317599e-03 1347 1.430000e+00 2.500000e+00 5.333274e-03 1348 1.440000e+00 2.500000e+00 5.348590e-03 1349 1.450000e+00 2.500000e+00 5.363543e-03 1350 1.460000e+00 2.500000e+00 5.378128e-03 1351 1.470000e+00 2.500000e+00 5.392340e-03 1352 1.480000e+00 2.500000e+00 5.406176e-03 1353 1.490000e+00 2.500000e+00 5.419631e-03 1354 1.500000e+00 2.500000e+00 5.432701e-03 1355 1.510000e+00 2.500000e+00 5.445383e-03 1356 1.520000e+00 2.500000e+00 5.457675e-03 1357 1.530000e+00 2.500000e+00 5.469576e-03 1358 1.540000e+00 2.500000e+00 5.481083e-03 1359 1.550000e+00 2.500000e+00 5.492199e-03 1360 1.560000e+00 2.500000e+00 5.502923e-03 1361 1.570000e+00 2.500000e+00 5.513258e-03 1362 1.580000e+00 2.500000e+00 5.523208e-03 1363 1.590000e+00 2.500000e+00 5.532778e-03 1364 1.600000e+00 2.500000e+00 5.541972e-03 1365 1.610000e+00 2.500000e+00 5.550800e-03 1366 1.620000e+00 2.500000e+00 5.559268e-03 1367 1.630000e+00 2.500000e+00 5.567385e-03 1368 1.640000e+00 2.500000e+00 5.575163e-03 1369 1.650000e+00 2.500000e+00 5.582612e-03 1370 1.660000e+00 2.500000e+00 5.589743e-03 1371 1.670000e+00 2.500000e+00 5.596568e-03 1372 1.680000e+00 2.500000e+00 5.603099e-03 1373 1.690000e+00 2.500000e+00 5.609350e-03 1374 1.700000e+00 2.500000e+00 5.615333e-03 1375 1.710000e+00 2.500000e+00 5.621060e-03 1376 1.720000e+00 2.500000e+00 5.626544e-03 1377 1.730000e+00 2.500000e+00 5.631797e-03 1378 1.740000e+00 2.500000e+00 5.636832e-03 1379 1.750000e+00 2.500000e+00 5.641659e-03 1380 1.760000e+00 2.500000e+00 5.646290e-03 1381 1.770000e+00 2.500000e+00 5.650735e-03 1382 1.780000e+00 2.500000e+00 5.655006e-03 1383 1.790000e+00 2.500000e+00 5.659112e-03 1384 1.800000e+00 2.500000e+00 5.663062e-03 1385 1.810000e+00 2.500000e+00 5.666866e-03 1386 1.820000e+00 2.500000e+00 5.670530e-03 1387 1.830000e+00 2.500000e+00 5.674065e-03 1388 1.840000e+00 2.500000e+00 5.677476e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1389 1.850000e+00 2.500000e+00 5.680772e-03 1390 1.860000e+00 2.500000e+00 5.683958e-03 1391 1.870000e+00 2.500000e+00 5.687041e-03 1392 1.880000e+00 2.500000e+00 5.690026e-03 1393 1.890000e+00 2.500000e+00 5.692920e-03 1394 1.900000e+00 2.500000e+00 5.695728e-03 1395 1.910000e+00 2.500000e+00 5.698453e-03 1396 1.920000e+00 2.500000e+00 5.701101e-03 1397 1.930000e+00 2.500000e+00 5.703676e-03 1398 1.940000e+00 2.500000e+00 5.706181e-03 1399 1.950000e+00 2.500000e+00 5.708622e-03 1400 1.960000e+00 2.500000e+00 5.711000e-03 1401 1.970000e+00 2.500000e+00 5.713319e-03 1402 1.980000e+00 2.500000e+00 5.715583e-03 1403 1.990000e+00 2.500000e+00 5.717794e-03 1404 2.000000e+00 2.500000e+00 5.719955e-03 1405 2.010000e+00 2.500000e+00 5.722069e-03 1406 2.020000e+00 2.500000e+00 5.724137e-03 1407 2.030000e+00 2.500000e+00 5.726162e-03 1408 2.040000e+00 2.500000e+00 5.728147e-03 1409 2.050000e+00 2.500000e+00 5.730092e-03 1410 2.060000e+00 2.500000e+00 5.732001e-03 1411 2.070000e+00 2.500000e+00 5.733874e-03 1412 2.080000e+00 2.500000e+00 5.735713e-03 1413 2.090000e+00 2.500000e+00 5.737521e-03 1414 2.100000e+00 2.500000e+00 5.739298e-03 1415 2.110000e+00 2.500000e+00 5.741045e-03 1416 2.120000e+00 2.500000e+00 5.742764e-03 1417 2.130000e+00 2.500000e+00 5.744457e-03 1418 2.140000e+00 2.500000e+00 5.746124e-03 1419 2.150000e+00 2.500000e+00 5.747767e-03 1420 2.160000e+00 2.500000e+00 5.749386e-03 1421 2.170000e+00 2.500000e+00 5.750983e-03 1422 2.180000e+00 2.500000e+00 5.752558e-03 1423 2.190000e+00 2.500000e+00 5.754113e-03 1424 2.200000e+00 2.500000e+00 5.755648e-03 1425 2.210000e+00 2.500000e+00 5.757164e-03 1426 2.220000e+00 2.500000e+00 5.758661e-03 1427 2.230000e+00 2.500000e+00 5.760141e-03 1428 2.240000e+00 2.500000e+00 5.761604e-03 1429 2.250000e+00 2.500000e+00 5.763051e-03 1430 2.260000e+00 2.500000e+00 5.764483e-03 1431 2.270000e+00 2.500000e+00 5.765899e-03 1432 2.280000e+00 2.500000e+00 5.767301e-03 1433 2.290000e+00 2.500000e+00 5.768689e-03 1434 2.300000e+00 2.500000e+00 5.770063e-03 1435 2.310000e+00 2.500000e+00 5.771425e-03 1436 2.320000e+00 2.500000e+00 5.772774e-03 1437 2.330000e+00 2.500000e+00 5.774111e-03 1438 2.340000e+00 2.500000e+00 5.775436e-03 1439 2.350000e+00 2.500000e+00 5.776750e-03 1440 2.360000e+00 2.500000e+00 5.778054e-03 1441 2.370000e+00 2.500000e+00 5.779347e-03 1442 2.380000e+00 2.500000e+00 5.780629e-03 1443 2.390000e+00 2.500000e+00 5.781902e-03 1444 2.400000e+00 2.500000e+00 5.783166e-03 1445 2.410000e+00 2.500000e+00 5.784420e-03 1446 2.420000e+00 2.500000e+00 5.785666e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1447 2.430000e+00 2.500000e+00 5.786902e-03 1448 2.440000e+00 2.500000e+00 5.788131e-03 1449 2.450000e+00 2.500000e+00 5.789351e-03 1450 2.460000e+00 2.500000e+00 5.790564e-03 1451 2.470000e+00 2.500000e+00 5.791769e-03 1452 2.480000e+00 2.500000e+00 5.792967e-03 1453 2.490000e+00 2.500000e+00 5.794158e-03 1454 2.500000e+00 2.500000e+00 5.795341e-03 1455 2.510000e+00 2.500000e+00 5.796518e-03 1456 2.520000e+00 2.500000e+00 5.797689e-03 1457 2.530000e+00 2.500000e+00 5.798853e-03 1458 2.540000e+00 2.500000e+00 5.800011e-03 1459 2.550000e+00 2.500000e+00 5.801163e-03 1460 2.560000e+00 2.500000e+00 5.802310e-03 1461 2.570000e+00 2.500000e+00 5.803450e-03 1462 2.580000e+00 2.500000e+00 5.804586e-03 1463 2.590000e+00 2.500000e+00 5.805715e-03 1464 2.600000e+00 2.500000e+00 5.806840e-03 1465 2.610000e+00 2.500000e+00 5.807960e-03 1466 2.620000e+00 2.500000e+00 5.809074e-03 1467 2.630000e+00 2.500000e+00 5.810184e-03 1468 2.640000e+00 2.500000e+00 5.811290e-03 1469 2.650000e+00 2.500000e+00 5.812390e-03 1470 2.660000e+00 2.500000e+00 5.813487e-03 1471 2.670000e+00 2.500000e+00 5.814579e-03 1472 2.680000e+00 2.500000e+00 5.815667e-03 1473 2.690000e+00 2.500000e+00 5.816750e-03 1474 2.700000e+00 2.500000e+00 5.817830e-03 1475 2.710000e+00 2.500000e+00 5.818906e-03 1476 2.720000e+00 2.500000e+00 5.819978e-03 1477 2.730000e+00 2.500000e+00 5.821047e-03 1478 2.740000e+00 2.500000e+00 5.822111e-03 1479 2.750000e+00 2.500000e+00 5.823173e-03 1480 2.760000e+00 2.500000e+00 5.824231e-03 1481 2.770000e+00 2.500000e+00 5.825285e-03 1482 2.780000e+00 2.500000e+00 5.826336e-03 1483 2.790000e+00 2.500000e+00 5.827384e-03 1484 2.800000e+00 2.500000e+00 5.828429e-03 1485 2.810000e+00 2.500000e+00 5.829471e-03 1486 2.820000e+00 2.500000e+00 5.830510e-03 1487 2.830000e+00 2.500000e+00 5.831546e-03 1488 2.840000e+00 2.500000e+00 5.832579e-03 1489 2.850000e+00 2.500000e+00 5.833609e-03 1490 2.860000e+00 2.500000e+00 5.834637e-03 1491 2.870000e+00 2.500000e+00 5.835662e-03 1492 2.880000e+00 2.500000e+00 5.836684e-03 1493 2.890000e+00 2.500000e+00 5.837704e-03 1494 2.900000e+00 2.500000e+00 5.838721e-03 1495 2.910000e+00 2.500000e+00 5.839736e-03 1496 2.920000e+00 2.500000e+00 5.840748e-03 1497 2.930000e+00 2.500000e+00 5.841758e-03 1498 2.940000e+00 2.500000e+00 5.842766e-03 1499 2.950000e+00 2.500000e+00 5.843771e-03 1500 2.960000e+00 2.500000e+00 5.844775e-03 1501 2.970000e+00 2.500000e+00 5.845776e-03 1502 2.980000e+00 2.500000e+00 5.846775e-03 1503 2.990000e+00 2.500000e+00 5.847772e-03 1504 3.000000e+00 2.500000e+00 5.848767e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1505 0.000000e+00 3.000000e+00 -1.250000e-19 1506 1.000000e-02 3.000000e+00 6.224150e-05 1507 2.000000e-02 3.000000e+00 1.241998e-04 1508 3.000000e-02 3.000000e+00 1.858754e-04 1509 4.000000e-02 3.000000e+00 2.472685e-04 1510 5.000000e-02 3.000000e+00 3.083796e-04 1511 6.000000e-02 3.000000e+00 3.692090e-04 1512 7.000000e-02 3.000000e+00 4.297570e-04 1513 8.000000e-02 3.000000e+00 4.900241e-04 1514 9.000000e-02 3.000000e+00 5.500106e-04 1515 1.000000e-01 3.000000e+00 6.097168e-04 1516 1.100000e-01 3.000000e+00 6.691432e-04 1517 1.200000e-01 3.000000e+00 7.282900e-04 1518 1.300000e-01 3.000000e+00 7.871577e-04 1519 1.400000e-01 3.000000e+00 8.457466e-04 1520 1.500000e-01 3.000000e+00 9.040571e-04 1521 1.600000e-01 3.000000e+00 9.620894e-04 1522 1.700000e-01 3.000000e+00 1.019844e-03 1523 1.800000e-01 3.000000e+00 1.077321e-03 1524 1.900000e-01 3.000000e+00 1.134522e-03 1525 2.000000e-01 3.000000e+00 1.191445e-03 1526 2.100000e-01 3.000000e+00 1.248093e-03 1527 2.200000e-01 3.000000e+00 1.304464e-03 1528 2.300000e-01 3.000000e+00 1.360560e-03 1529 2.400000e-01 3.000000e+00 1.416380e-03 1530 2.500000e-01 3.000000e+00 1.471926e-03 1531 2.600000e-01 3.000000e+00 1.527197e-03 1532 2.700000e-01 3.000000e+00 1.582194e-03 1533 2.800000e-01 3.000000e+00 1.636917e-03 1534 2.900000e-01 3.000000e+00 1.691367e-03 1535 3.000000e-01 3.000000e+00 1.745543e-03 1536 3.100000e-01 3.000000e+00 1.799447e-03 1537 3.200000e-01 3.000000e+00 1.853078e-03 1538 3.300000e-01 3.000000e+00 1.906437e-03 1539 3.400000e-01 3.000000e+00 1.959525e-03 1540 3.500000e-01 3.000000e+00 2.012341e-03 1541 3.600000e-01 3.000000e+00 2.064886e-03 1542 3.700000e-01 3.000000e+00 2.117160e-03 1543 3.800000e-01 3.000000e+00 2.169164e-03 1544 3.900000e-01 3.000000e+00 2.220898e-03 1545 4.000000e-01 3.000000e+00 2.272362e-03 1546 4.100000e-01 3.000000e+00 2.323556e-03 1547 4.200000e-01 3.000000e+00 2.374482e-03 1548 4.300000e-01 3.000000e+00 2.425139e-03 1549 4.400000e-01 3.000000e+00 2.475528e-03 1550 4.500000e-01 3.000000e+00 2.525649e-03 1551 4.600000e-01 3.000000e+00 2.575502e-03 1552 4.700000e-01 3.000000e+00 2.625087e-03 1553 4.800000e-01 3.000000e+00 2.674406e-03 1554 4.900000e-01 3.000000e+00 2.723458e-03 1555 5.000000e-01 3.000000e+00 2.772244e-03 1556 5.100000e-01 3.000000e+00 2.820764e-03 1557 5.200000e-01 3.000000e+00 2.869018e-03 1558 5.300000e-01 3.000000e+00 2.917007e-03 1559 5.400000e-01 3.000000e+00 2.964730e-03 1560 5.500000e-01 3.000000e+00 3.012189e-03 1561 5.600000e-01 3.000000e+00 3.059384e-03 1562 5.700000e-01 3.000000e+00 3.106315e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1563 5.800000e-01 3.000000e+00 3.152982e-03 1564 5.900000e-01 3.000000e+00 3.199386e-03 1565 6.000000e-01 3.000000e+00 3.245526e-03 1566 6.100000e-01 3.000000e+00 3.291404e-03 1567 6.200000e-01 3.000000e+00 3.337020e-03 1568 6.300000e-01 3.000000e+00 3.382373e-03 1569 6.400000e-01 3.000000e+00 3.427465e-03 1570 6.500000e-01 3.000000e+00 3.472295e-03 1571 6.600000e-01 3.000000e+00 3.516864e-03 1572 6.700000e-01 3.000000e+00 3.561172e-03 1573 6.800000e-01 3.000000e+00 3.605220e-03 1574 6.900000e-01 3.000000e+00 3.649008e-03 1575 7.000000e-01 3.000000e+00 3.692535e-03 1576 7.100000e-01 3.000000e+00 3.735804e-03 1577 7.200000e-01 3.000000e+00 3.778813e-03 1578 7.300000e-01 3.000000e+00 3.821563e-03 1579 7.400000e-01 3.000000e+00 3.864054e-03 1580 7.500000e-01 3.000000e+00 3.906287e-03 1581 7.600000e-01 3.000000e+00 3.948263e-03 1582 7.700000e-01 3.000000e+00 3.989980e-03 1583 7.800000e-01 3.000000e+00 4.031440e-03 1584 7.900000e-01 3.000000e+00 4.072643e-03 1585 8.000000e-01 3.000000e+00 4.113589e-03 1586 8.100000e-01 3.000000e+00 4.154279e-03 1587 8.200000e-01 3.000000e+00 4.194712e-03 1588 8.300000e-01 3.000000e+00 4.234890e-03 1589 8.400000e-01 3.000000e+00 4.274812e-03 1590 8.500000e-01 3.000000e+00 4.314478e-03 1591 8.600000e-01 3.000000e+00 4.353890e-03 1592 8.700000e-01 3.000000e+00 4.393047e-03 1593 8.800000e-01 3.000000e+00 4.431949e-03 1594 8.900000e-01 3.000000e+00 4.470598e-03 1595 9.000000e-01 3.000000e+00 4.508992e-03 1596 9.100000e-01 3.000000e+00 4.547133e-03 1597 9.200000e-01 3.000000e+00 4.585020e-03 1598 9.300000e-01 3.000000e+00 4.622655e-03 1599 9.400000e-01 3.000000e+00 4.660036e-03 1600 9.500000e-01 3.000000e+00 4.697165e-03 1601 9.600000e-01 3.000000e+00 4.734042e-03 1602 9.700000e-01 3.000000e+00 4.770667e-03 1603 9.800000e-01 3.000000e+00 4.807040e-03 1604 9.900000e-01 3.000000e+00 4.843162e-03 1605 1.000000e+00 3.000000e+00 4.879032e-03 1606 1.010000e+00 3.000000e+00 4.914652e-03 1607 1.020000e+00 3.000000e+00 4.950021e-03 1608 1.030000e+00 3.000000e+00 4.985139e-03 1609 1.040000e+00 3.000000e+00 5.020007e-03 1610 1.050000e+00 3.000000e+00 5.054625e-03 1611 1.060000e+00 3.000000e+00 5.088994e-03 1612 1.070000e+00 3.000000e+00 5.123113e-03 1613 1.080000e+00 3.000000e+00 5.156982e-03 1614 1.090000e+00 3.000000e+00 5.190603e-03 1615 1.100000e+00 3.000000e+00 5.223975e-03 1616 1.110000e+00 3.000000e+00 5.257098e-03 1617 1.120000e+00 3.000000e+00 5.289972e-03 1618 1.130000e+00 3.000000e+00 5.322598e-03 1619 1.140000e+00 3.000000e+00 5.354977e-03 1620 1.150000e+00 3.000000e+00 5.387107e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1621 1.160000e+00 3.000000e+00 5.418989e-03 1622 1.170000e+00 3.000000e+00 5.450624e-03 1623 1.180000e+00 3.000000e+00 5.482012e-03 1624 1.190000e+00 3.000000e+00 5.513152e-03 1625 1.200000e+00 3.000000e+00 5.544045e-03 1626 1.210000e+00 3.000000e+00 5.574691e-03 1627 1.220000e+00 3.000000e+00 5.605091e-03 1628 1.230000e+00 3.000000e+00 5.635243e-03 1629 1.240000e+00 3.000000e+00 5.665149e-03 1630 1.250000e+00 3.000000e+00 5.694808e-03 1631 1.260000e+00 3.000000e+00 5.724221e-03 1632 1.270000e+00 3.000000e+00 5.753387e-03 1633 1.280000e+00 3.000000e+00 5.782307e-03 1634 1.290000e+00 3.000000e+00 5.810980e-03 1635 1.300000e+00 3.000000e+00 5.839407e-03 1636 1.310000e+00 3.000000e+00 5.867588e-03 1637 1.320000e+00 3.000000e+00 5.895522e-03 1638 1.330000e+00 3.000000e+00 5.923209e-03 1639 1.340000e+00 3.000000e+00 5.950650e-03 1640 1.350000e+00 3.000000e+00 5.977845e-03 1641 1.360000e+00 3.000000e+00 6.004792e-03 1642 1.370000e+00 3.000000e+00 6.031492e-03 1643 1.380000e+00 3.000000e+00 6.057945e-03 1644 1.390000e+00 3.000000e+00 6.084151e-03 1645 1.400000e+00 3.000000e+00 6.110109e-03 1646 1.410000e+00 3.000000e+00 6.135819e-03 1647 1.420000e+00 3.000000e+00 6.161280e-03 1648 1.430000e+00 3.000000e+00 6.186493e-03 1649 1.440000e+00 3.000000e+00 6.211457e-03 1650 1.450000e+00 3.000000e+00 6.236171e-03 1651 1.460000e+00 3.000000e+00 6.260635e-03 1652 1.470000e+00 3.000000e+00 6.284848e-03 1653 1.480000e+00 3.000000e+00 6.308810e-03 1654 1.490000e+00 3.000000e+00 6.332519e-03 1655 1.500000e+00 3.000000e+00 6.355976e-03 1656 1.510000e+00 3.000000e+00 6.379179e-03 1657 1.520000e+00 3.000000e+00 6.402127e-03 1658 1.530000e+00 3.000000e+00 6.424819e-03 1659 1.540000e+00 3.000000e+00 6.447254e-03 1660 1.550000e+00 3.000000e+00 6.469431e-03 1661 1.560000e+00 3.000000e+00 6.491349e-03 1662 1.570000e+00 3.000000e+00 6.513006e-03 1663 1.580000e+00 3.000000e+00 6.534400e-03 1664 1.590000e+00 3.000000e+00 6.555530e-03 1665 1.600000e+00 3.000000e+00 6.576393e-03 1666 1.610000e+00 3.000000e+00 6.596989e-03 1667 1.620000e+00 3.000000e+00 6.617314e-03 1668 1.630000e+00 3.000000e+00 6.637367e-03 1669 1.640000e+00 3.000000e+00 6.657144e-03 1670 1.650000e+00 3.000000e+00 6.676644e-03 1671 1.660000e+00 3.000000e+00 6.695864e-03 1672 1.670000e+00 3.000000e+00 6.714799e-03 1673 1.680000e+00 3.000000e+00 6.733448e-03 1674 1.690000e+00 3.000000e+00 6.751806e-03 1675 1.700000e+00 3.000000e+00 6.769871e-03 1676 1.710000e+00 3.000000e+00 6.787638e-03 1677 1.720000e+00 3.000000e+00 6.805103e-03 1678 1.730000e+00 3.000000e+00 6.822262e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1679 1.740000e+00 3.000000e+00 6.839111e-03 1680 1.750000e+00 3.000000e+00 6.855645e-03 1681 1.760000e+00 3.000000e+00 6.871859e-03 1682 1.770000e+00 3.000000e+00 6.887749e-03 1683 1.780000e+00 3.000000e+00 6.903311e-03 1684 1.790000e+00 3.000000e+00 6.918539e-03 1685 1.800000e+00 3.000000e+00 6.933428e-03 1686 1.810000e+00 3.000000e+00 6.947975e-03 1687 1.820000e+00 3.000000e+00 6.962175e-03 1688 1.830000e+00 3.000000e+00 6.976023e-03 1689 1.840000e+00 3.000000e+00 6.989515e-03 1690 1.850000e+00 3.000000e+00 7.002650e-03 1691 1.860000e+00 3.000000e+00 7.015423e-03 1692 1.870000e+00 3.000000e+00 7.027832e-03 1693 1.880000e+00 3.000000e+00 7.039877e-03 1694 1.890000e+00 3.000000e+00 7.051556e-03 1695 1.900000e+00 3.000000e+00 7.062869e-03 1696 1.910000e+00 3.000000e+00 7.073818e-03 1697 1.920000e+00 3.000000e+00 7.084404e-03 1698 1.930000e+00 3.000000e+00 7.094631e-03 1699 1.940000e+00 3.000000e+00 7.104502e-03 1700 1.950000e+00 3.000000e+00 7.114023e-03 1701 1.960000e+00 3.000000e+00 7.123198e-03 1702 1.970000e+00 3.000000e+00 7.132036e-03 1703 1.980000e+00 3.000000e+00 7.140543e-03 1704 1.990000e+00 3.000000e+00 7.148727e-03 1705 2.000000e+00 3.000000e+00 7.156598e-03 1706 2.010000e+00 3.000000e+00 7.164166e-03 1707 2.020000e+00 3.000000e+00 7.171439e-03 1708 2.030000e+00 3.000000e+00 7.178428e-03 1709 2.040000e+00 3.000000e+00 7.185144e-03 1710 2.050000e+00 3.000000e+00 7.191598e-03 1711 2.060000e+00 3.000000e+00 7.197799e-03 1712 2.070000e+00 3.000000e+00 7.203760e-03 1713 2.080000e+00 3.000000e+00 7.209490e-03 1714 2.090000e+00 3.000000e+00 7.215000e-03 1715 2.100000e+00 3.000000e+00 7.220300e-03 1716 2.110000e+00 3.000000e+00 7.225400e-03 1717 2.120000e+00 3.000000e+00 7.230311e-03 1718 2.130000e+00 3.000000e+00 7.235040e-03 1719 2.140000e+00 3.000000e+00 7.239598e-03 1720 2.150000e+00 3.000000e+00 7.243992e-03 1721 2.160000e+00 3.000000e+00 7.248232e-03 1722 2.170000e+00 3.000000e+00 7.252326e-03 1723 2.180000e+00 3.000000e+00 7.256280e-03 1724 2.190000e+00 3.000000e+00 7.260102e-03 1725 2.200000e+00 3.000000e+00 7.263798e-03 1726 2.210000e+00 3.000000e+00 7.267376e-03 1727 2.220000e+00 3.000000e+00 7.270842e-03 1728 2.230000e+00 3.000000e+00 7.274200e-03 1729 2.240000e+00 3.000000e+00 7.277458e-03 1730 2.250000e+00 3.000000e+00 7.280619e-03 1731 2.260000e+00 3.000000e+00 7.283690e-03 1732 2.270000e+00 3.000000e+00 7.286673e-03 1733 2.280000e+00 3.000000e+00 7.289575e-03 1734 2.290000e+00 3.000000e+00 7.292398e-03 1735 2.300000e+00 3.000000e+00 7.295148e-03 1736 2.310000e+00 3.000000e+00 7.297827e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1737 2.320000e+00 3.000000e+00 7.300439e-03 1738 2.330000e+00 3.000000e+00 7.302987e-03 1739 2.340000e+00 3.000000e+00 7.305474e-03 1740 2.350000e+00 3.000000e+00 7.307904e-03 1741 2.360000e+00 3.000000e+00 7.310279e-03 1742 2.370000e+00 3.000000e+00 7.312601e-03 1743 2.380000e+00 3.000000e+00 7.314873e-03 1744 2.390000e+00 3.000000e+00 7.317097e-03 1745 2.400000e+00 3.000000e+00 7.319276e-03 1746 2.410000e+00 3.000000e+00 7.321412e-03 1747 2.420000e+00 3.000000e+00 7.323506e-03 1748 2.430000e+00 3.000000e+00 7.325560e-03 1749 2.440000e+00 3.000000e+00 7.327576e-03 1750 2.450000e+00 3.000000e+00 7.329556e-03 1751 2.460000e+00 3.000000e+00 7.331501e-03 1752 2.470000e+00 3.000000e+00 7.333413e-03 1753 2.480000e+00 3.000000e+00 7.335293e-03 1754 2.490000e+00 3.000000e+00 7.337143e-03 1755 2.500000e+00 3.000000e+00 7.338963e-03 1756 2.510000e+00 3.000000e+00 7.340755e-03 1757 2.520000e+00 3.000000e+00 7.342520e-03 1758 2.530000e+00 3.000000e+00 7.344259e-03 1759 2.540000e+00 3.000000e+00 7.345973e-03 1760 2.550000e+00 3.000000e+00 7.347663e-03 1761 2.560000e+00 3.000000e+00 7.349331e-03 1762 2.570000e+00 3.000000e+00 7.350976e-03 1763 2.580000e+00 3.000000e+00 7.352600e-03 1764 2.590000e+00 3.000000e+00 7.354203e-03 1765 2.600000e+00 3.000000e+00 7.355787e-03 1766 2.610000e+00 3.000000e+00 7.357352e-03 1767 2.620000e+00 3.000000e+00 7.358898e-03 1768 2.630000e+00 3.000000e+00 7.360427e-03 1769 2.640000e+00 3.000000e+00 7.361939e-03 1770 2.650000e+00 3.000000e+00 7.363434e-03 1771 2.660000e+00 3.000000e+00 7.364913e-03 1772 2.670000e+00 3.000000e+00 7.366377e-03 1773 2.680000e+00 3.000000e+00 7.367827e-03 1774 2.690000e+00 3.000000e+00 7.369262e-03 1775 2.700000e+00 3.000000e+00 7.370683e-03 1776 2.710000e+00 3.000000e+00 7.372091e-03 1777 2.720000e+00 3.000000e+00 7.373486e-03 1778 2.730000e+00 3.000000e+00 7.374869e-03 1779 2.740000e+00 3.000000e+00 7.376239e-03 1780 2.750000e+00 3.000000e+00 7.377598e-03 1781 2.760000e+00 3.000000e+00 7.378945e-03 1782 2.770000e+00 3.000000e+00 7.380282e-03 1783 2.780000e+00 3.000000e+00 7.381608e-03 1784 2.790000e+00 3.000000e+00 7.382923e-03 1785 2.800000e+00 3.000000e+00 7.384229e-03 1786 2.810000e+00 3.000000e+00 7.385524e-03 1787 2.820000e+00 3.000000e+00 7.386811e-03 1788 2.830000e+00 3.000000e+00 7.388088e-03 1789 2.840000e+00 3.000000e+00 7.389356e-03 1790 2.850000e+00 3.000000e+00 7.390616e-03 1791 2.860000e+00 3.000000e+00 7.391868e-03 1792 2.870000e+00 3.000000e+00 7.393111e-03 1793 2.880000e+00 3.000000e+00 7.394347e-03 1794 2.890000e+00 3.000000e+00 7.395575e-03 Index v-sweep v(g) vs#branch -------------------------------------------------------------------------------- 1795 2.900000e+00 3.000000e+00 7.396795e-03 1796 2.910000e+00 3.000000e+00 7.398008e-03 1797 2.920000e+00 3.000000e+00 7.399214e-03 1798 2.930000e+00 3.000000e+00 7.400413e-03 1799 2.940000e+00 3.000000e+00 7.401606e-03 1800 2.950000e+00 3.000000e+00 7.402792e-03 1801 2.960000e+00 3.000000e+00 7.403972e-03 1802 2.970000e+00 3.000000e+00 7.405145e-03 1803 2.980000e+00 3.000000e+00 7.406313e-03 1804 2.990000e+00 3.000000e+00 7.407475e-03 1805 3.000000e+00 3.000000e+00 7.408631e-03 ngspice-26/tests/bsim3soifd/t5.cir0000644000265600020320000000042412264261473016464 0ustar andreasadmin*model = BSIMSOI (FD) *Berkeley Spice Compatibility * * SOI NMOSFET, floating body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 m1 d g s e n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 ve -4 4 1 .print dc i(vs) .include nmosfd.mod ngspice-26/tests/bsim3soifd/t4.cir0000644000265600020320000000044412264261473016465 0ustar andreasadmin*model = BSIMSOI (FD) *Berkeley Spice Compatibility * * SOI NMOSFET, tied body simulation vd d 0 dc 0.05 vs s 0 dc 0 ve e 0 dc 0 vg g 0 dc 3 vb b 0 dc 0 m1 d g s e b n1 w=10u l=0.25u .option gmin=1e-25 itl1=500 noacct .dc vg 0 1.5 0.01 vb -0.3 0.5 0.1 .print dc i(vs) .include nmosfd.mod ngspice-26/tests/Makefile.in0000644000265600020320000004453612264261541015450 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ @XSPICE_WANTED_TRUE@am__append_1 = xspice subdir = tests DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ ChangeLog ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = bsim3 bsim4 bsimsoi hisim hisimhv1 regression \ $(am__append_1) DIST_SUBDIRS = \ bsim1 \ bsim2 \ bsim3 \ bsim3soidd \ bsim3soifd \ bsim3soipd \ bsim4 \ bsimsoi \ filters \ general \ hfet \ hisim \ hisimhv1 \ jfet \ mes \ mesa \ mos6 \ polezero \ regression \ resistance \ sensitivity \ transient \ transmission \ vbic \ xspice TESTS_ENVIRONMENT = \ $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ README bin .gitignore MAINTAINERCLEANFILES = Makefile.in all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim1/0000755000265600020320000000000012264261713014403 5ustar andreasadminngspice-26/tests/bsim1/test.cir0000644000265600020320000000660612264261473016074 0ustar andreasadminTest of MOS BSIM1 implementation; DC transfer curve ****************************************************************** MN1 13 2 0 4 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN2 23 2 0 5 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN3 33 2 0 6 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN4 43 2 0 7 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN5 53 2 0 8 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U VDS 3 0 0.05 VGS 2 0 0 V1 3 13 0 V2 3 23 0 V3 3 33 0 V4 3 43 0 V5 3 53 0 VBS1 4 0 0 VBS2 5 0 -1 VBS3 6 0 -2 VBS4 7 0 -3 VBS5 8 0 -4 *************************************************************** *.OPTIONS LIMPTS=5000 ACCT .OPTIONS NOACCT .DC VGS 0 5 0.01 .PRINT DC I(V1) I(V2) I(V3) I(V4) I(V5) *.PLOT DC I(V1) I(V2) I(V3) I(V4) I(V5) *.OPTIONS LIMPTS=501 ACCT *VGS 2 0 PWL(0 0 5 5) *.TRAN 0 5 0.01 *.PRINT TRAN I(V1) I(V2) I(V3) I(V4) I(V5) ***** MODEL PARAMETERS TEMP2 ******************** .MODEL NMOS NMOS + LEVEL = 4.00000E+000 + TOX = 3.00000E-002 + VDD = 5.00000E+000 + TEMP = 2.70000E+001 + DL = 7.97991E-001 + DW = 4.77402E-001 + VFB = -1.0087E+000 + PHI = 7.96434E-001 + K1 = 1.31191E+000 + K2 = 1.46640E-001 + ETA = -1.0027E-003 + MUZ = 5.34334E+002 + U0 = 4.38497E-002 + U1 = -5.7332E-002 + X2E = -7.6911E-004 + X3E = 7.86777E-004 + X2MZ = 8.25434E+000 + MUS = 5.40612E+002 + X2MS = -1.2992E+001 + X3MS = -9.4035E+000 + X2U0 = 1.06821E-003 + X2U1 = -1.9209E-002 + X3U1 = 7.76925E-003 + LVFB = -2.1402E-001 + WVFB = 3.44354E-001 + LK1 = 3.23395E-001 + WK1 = -5.7698E-001 + LK2 = 1.68585E-001 + WK2 = -1.8796E-001 + LETA = -9.4847E-003 + WETA = 1.47316E-002 + LU0 = 6.38105E-002 + WU0 = -6.1053E-002 + LU1 = 1.01174E+000 + WU1 = 1.62706E-002 + LX2E = 9.62411E-003 + WX2E = -3.7951E-003 + LX3E = 7.35448E-004 + WX3E = -1.7796E-003 + LX2MZ = -2.4197E+001 + WX2MZ = 1.95696E+001 + LMUS = 6.21401E+002 + WMUS = -1.9190E+002 + LX2MS = -6.4900E+001 + WX2MS = 4.29043E+001 + LX3MS = 1.18239E+002 + WX3MS = -2.9747E+001 + LX2U0 = -8.0958E-003 + WX2U0 = 4.03379E-003 + LX2U1 = -7.4573E-002 + WX2U1 = 1.47520E-002 + LX3U1 = -1.0940E-001 + WX3U1 = -8.3353E-003 + N0 = 1.55 + NB = 0.09 + ND = 0.0 + LN0 = 0.0 + WN0 = 0.0 + LNB = 0.0 + WNB = 0.0 + LND = 0.0 + WND = 0.0 + CGDO = 2.70000E-010 + CGSO = 2.70000E-010 + CGBO = 1.40000E-010 + XPART = 1.0 + RSH = 35.0 + CJ = 2.75E-4 + CJSW = 1.90E-10 + JS = 1.0E-8 + PB = 0.7 + PBSW = 0.8 + MJ = 0.5 + MJSW = 0.33 + WDF = 0.0 ***** ***** .END ngspice-26/tests/bsim1/Makefile.am0000644000265600020320000000037612264261473016450 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ test.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim1/Makefile.in0000644000265600020320000003351612264261541016457 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim1 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ test.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim1/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim1/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim1/test.out0000644000265600020320000015035612264261473016130 0ustar andreasadmin No. of Data Rows : 501 Circuit: Test of MOS BSIM1 implementation; DC transfer curve Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Test of MOS BSIM1 implementation; DC transfer curve -------------------------------------------------------------------------------- Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.029690e-13 2.140597e-12 4.179260e-12 1 1.000000e-02 1.032273e-13 2.140597e-12 4.179260e-12 2 2.000000e-02 1.036387e-13 2.140597e-12 4.179260e-12 3 3.000000e-02 1.041220e-13 2.140597e-12 4.179260e-12 4 4.000000e-02 1.047426e-13 2.140597e-12 4.179260e-12 5 5.000000e-02 1.055384e-13 2.140597e-12 4.179260e-12 6 6.000000e-02 1.065598e-13 2.140597e-12 4.179260e-12 7 7.000000e-02 1.078704e-13 2.140597e-12 4.179260e-12 8 8.000000e-02 1.095526e-13 2.140597e-12 4.179260e-12 9 9.000000e-02 1.117108e-13 2.140597e-12 4.179260e-12 10 1.000000e-01 1.144812e-13 2.140597e-12 4.179260e-12 11 1.100000e-01 1.180363e-13 2.140597e-12 4.179260e-12 12 1.200000e-01 1.225983e-13 2.140597e-12 4.179260e-12 13 1.300000e-01 1.284530e-13 2.140597e-12 4.179260e-12 14 1.400000e-01 1.359664e-13 2.140597e-12 4.179260e-12 15 1.500000e-01 1.456081e-13 2.140597e-12 4.179260e-12 16 1.600000e-01 1.579815e-13 2.140597e-12 4.179260e-12 17 1.700000e-01 1.738607e-13 2.140597e-12 4.179260e-12 18 1.800000e-01 1.942384e-13 2.140597e-12 4.179260e-12 19 1.900000e-01 2.203893e-13 2.140597e-12 4.179260e-12 20 2.000000e-01 2.539490e-13 2.140597e-12 4.179260e-12 21 2.100000e-01 2.970167e-13 2.140597e-12 4.179260e-12 22 2.200000e-01 3.522858e-13 2.140598e-12 4.179260e-12 23 2.300000e-01 4.232128e-13 2.140598e-12 4.179260e-12 24 2.400000e-01 5.142343e-13 2.140598e-12 4.179260e-12 25 2.500000e-01 6.310428e-13 2.140599e-12 4.179260e-12 26 2.600000e-01 7.809437e-13 2.140599e-12 4.179260e-12 27 2.700000e-01 9.733137e-13 2.140600e-12 4.179260e-12 28 2.800000e-01 1.220183e-12 2.140601e-12 4.179260e-12 29 2.900000e-01 1.536993e-12 2.140602e-12 4.179260e-12 30 3.000000e-01 1.943558e-12 2.140605e-12 4.179260e-12 31 3.100000e-01 2.465306e-12 2.140607e-12 4.179260e-12 32 3.200000e-01 3.134869e-12 2.140610e-12 4.179260e-12 33 3.300000e-01 3.994123e-12 2.140614e-12 4.179260e-12 34 3.400000e-01 5.096810e-12 2.140619e-12 4.179260e-12 35 3.500000e-01 6.511895e-12 2.140625e-12 4.179260e-12 36 3.600000e-01 8.327881e-12 2.140634e-12 4.179260e-12 37 3.700000e-01 1.065834e-11 2.140646e-12 4.179260e-12 38 3.800000e-01 1.364903e-11 2.140660e-12 4.179260e-12 39 3.900000e-01 1.748697e-11 2.140679e-12 4.179260e-12 40 4.000000e-01 2.241220e-11 2.140705e-12 4.179260e-12 41 4.100000e-01 2.873272e-11 2.140737e-12 4.179260e-12 42 4.200000e-01 3.684378e-11 2.140780e-12 4.179260e-12 43 4.300000e-01 4.725259e-11 2.140836e-12 4.179260e-12 44 4.400000e-01 6.060999e-11 2.140908e-12 4.179260e-12 45 4.500000e-01 7.775113e-11 2.141002e-12 4.179260e-12 46 4.600000e-01 9.974764e-11 2.141125e-12 4.179260e-12 47 4.700000e-01 1.279745e-10 2.141286e-12 4.179260e-12 48 4.800000e-01 1.641960e-10 2.141494e-12 4.179260e-12 49 4.900000e-01 2.106755e-10 2.141766e-12 4.179260e-12 50 5.000000e-01 2.703167e-10 2.142121e-12 4.179260e-12 51 5.100000e-01 3.468443e-10 2.142583e-12 4.179260e-12 52 5.200000e-01 4.450357e-10 2.143185e-12 4.179260e-12 53 5.300000e-01 5.710171e-10 2.143970e-12 4.179260e-12 54 5.400000e-01 7.326434e-10 2.144993e-12 4.179260e-12 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 55 5.500000e-01 9.399828e-10 2.146326e-12 4.179260e-12 56 5.600000e-01 1.205937e-09 2.148063e-12 4.179261e-12 57 5.700000e-01 1.547029e-09 2.150327e-12 4.179261e-12 58 5.800000e-01 1.984413e-09 2.153278e-12 4.179262e-12 59 5.900000e-01 2.545148e-09 2.157122e-12 4.179262e-12 60 6.000000e-01 3.263817e-09 2.162133e-12 4.179262e-12 61 6.100000e-01 4.184566e-09 2.168662e-12 4.179263e-12 62 6.200000e-01 5.363670e-09 2.177172e-12 4.179264e-12 63 6.300000e-01 6.872717e-09 2.188261e-12 4.179266e-12 64 6.400000e-01 8.802558e-09 2.202713e-12 4.179267e-12 65 6.500000e-01 1.126812e-08 2.221546e-12 4.179270e-12 66 6.600000e-01 1.441419e-08 2.246090e-12 4.179273e-12 67 6.700000e-01 1.842219e-08 2.278075e-12 4.179277e-12 68 6.800000e-01 2.351792e-08 2.319757e-12 4.179282e-12 69 6.900000e-01 2.997991e-08 2.374078e-12 4.179289e-12 70 7.000000e-01 3.814771e-08 2.444868e-12 4.179299e-12 71 7.100000e-01 4.842908e-08 2.537121e-12 4.179312e-12 72 7.200000e-01 6.130388e-08 2.657346e-12 4.179329e-12 73 7.300000e-01 7.732184e-08 2.814021e-12 4.179352e-12 74 7.400000e-01 9.708992e-08 3.018199e-12 4.179381e-12 75 7.500000e-01 1.212443e-07 3.284283e-12 4.179421e-12 76 7.600000e-01 1.504017e-07 3.631042e-12 4.179473e-12 77 7.700000e-01 1.850865e-07 4.082936e-12 4.179543e-12 78 7.800000e-01 2.256347e-07 4.671840e-12 4.179635e-12 79 7.900000e-01 2.720848e-07 5.439297e-12 4.179758e-12 80 8.000000e-01 3.240742e-07 6.439440e-12 4.179920e-12 81 8.100000e-01 3.807731e-07 7.742818e-12 4.180135e-12 82 8.200000e-01 4.408848e-07 9.441368e-12 4.180420e-12 83 8.300000e-01 5.027355e-07 1.165490e-11 4.180798e-12 84 8.400000e-01 5.674928e-07 1.453955e-11 4.181300e-12 85 8.500000e-01 6.505536e-07 1.829878e-11 4.181964e-12 86 8.600000e-01 7.529665e-07 2.319775e-11 4.182846e-12 87 8.700000e-01 8.734589e-07 2.958198e-11 4.184015e-12 88 8.800000e-01 1.011230e-06 3.790175e-11 4.185566e-12 89 8.900000e-01 1.165941e-06 4.874383e-11 4.187622e-12 90 9.000000e-01 1.337638e-06 6.287281e-11 4.190348e-12 91 9.100000e-01 1.525369e-06 8.128501e-11 4.193964e-12 92 9.200000e-01 1.713052e-06 1.052787e-10 4.198758e-12 93 9.300000e-01 1.896207e-06 1.365453e-10 4.205116e-12 94 9.400000e-01 2.075469e-06 1.772889e-10 4.213547e-12 95 9.500000e-01 2.251436e-06 2.303807e-10 4.224726e-12 96 9.600000e-01 2.424650e-06 2.995612e-10 4.239551e-12 97 9.700000e-01 2.595580e-06 3.897023e-10 4.259209e-12 98 9.800000e-01 2.764623e-06 5.071492e-10 4.285278e-12 99 9.900000e-01 2.932109e-06 6.601637e-10 4.319847e-12 100 1.000000e+00 3.098311e-06 8.595007e-10 4.365687e-12 101 1.010000e+00 3.263446e-06 1.119156e-09 4.426475e-12 102 1.020000e+00 3.427691e-06 1.457333e-09 4.507082e-12 103 1.030000e+00 3.591186e-06 1.897698e-09 4.613973e-12 104 1.040000e+00 3.754043e-06 2.470994e-09 4.755718e-12 105 1.050000e+00 3.916350e-06 3.217117e-09 4.943679e-12 106 1.060000e+00 4.078176e-06 4.187779e-09 5.192929e-12 107 1.070000e+00 4.239577e-06 5.449890e-09 5.523450e-12 108 1.080000e+00 4.400596e-06 7.089848e-09 5.961741e-12 109 1.090000e+00 4.561266e-06 9.218890e-09 6.542943e-12 110 1.100000e+00 4.721615e-06 1.197971e-08 7.313654e-12 111 1.110000e+00 4.881662e-06 1.555446e-08 8.335663e-12 112 1.120000e+00 5.041425e-06 2.017422e-08 9.690910e-12 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 113 1.130000e+00 5.200916e-06 2.612964e-08 1.148805e-11 114 1.140000e+00 5.360145e-06 3.378235e-08 1.387116e-11 115 1.150000e+00 5.519122e-06 4.357571e-08 1.703130e-11 116 1.160000e+00 5.677851e-06 5.604277e-08 2.122182e-11 117 1.170000e+00 5.836339e-06 7.180765e-08 2.677866e-11 118 1.180000e+00 5.994588e-06 9.157492e-08 3.414730e-11 119 1.190000e+00 6.152603e-06 1.160997e-07 4.391841e-11 120 1.200000e+00 6.310387e-06 1.461308e-07 5.687524e-11 121 1.210000e+00 6.467940e-06 1.823195e-07 7.405631e-11 122 1.220000e+00 6.625266e-06 2.250958e-07 9.683860e-11 123 1.230000e+00 6.782365e-06 2.745216e-07 1.270478e-10 124 1.240000e+00 6.939239e-06 3.301523e-07 1.671042e-10 125 1.250000e+00 7.095890e-06 3.909487e-07 2.202167e-10 126 1.260000e+00 7.252317e-06 4.552882e-07 2.906385e-10 127 1.270000e+00 7.408522e-06 5.211018e-07 3.840069e-10 128 1.280000e+00 7.564506e-06 5.943443e-07 5.077924e-10 129 1.290000e+00 7.720269e-06 6.885987e-07 6.718925e-10 130 1.300000e+00 7.875811e-06 8.024296e-07 8.894161e-10 131 1.310000e+00 8.031135e-06 9.345693e-07 1.177720e-09 132 1.320000e+00 8.186239e-06 1.084353e-06 1.559771e-09 133 1.330000e+00 8.341126e-06 1.251658e-06 2.065942e-09 134 1.340000e+00 8.495794e-06 1.436637e-06 2.736363e-09 135 1.350000e+00 8.650245e-06 1.625407e-06 3.623988e-09 136 1.360000e+00 8.804479e-06 1.808956e-06 4.798590e-09 137 1.370000e+00 8.958497e-06 1.988043e-06 6.351899e-09 138 1.380000e+00 9.112299e-06 2.163394e-06 8.404185e-09 139 1.390000e+00 9.265886e-06 2.335659e-06 1.111254e-08 140 1.400000e+00 9.419257e-06 2.505399e-06 1.468114e-08 141 1.410000e+00 9.572415e-06 2.673085e-06 1.937359e-08 142 1.420000e+00 9.725358e-06 2.839103e-06 2.552721e-08 143 1.430000e+00 9.878088e-06 3.003763e-06 3.356857e-08 144 1.440000e+00 1.003060e-05 3.167315e-06 4.402840e-08 145 1.450000e+00 1.018291e-05 3.329955e-06 5.755277e-08 146 1.460000e+00 1.033500e-05 3.491836e-06 7.490465e-08 147 1.470000e+00 1.048688e-05 3.653081e-06 9.694747e-08 148 1.480000e+00 1.063855e-05 3.813782e-06 1.245992e-07 149 1.490000e+00 1.079001e-05 3.974013e-06 1.587447e-07 150 1.500000e+00 1.094125e-05 4.133829e-06 2.000981e-07 151 1.510000e+00 1.109229e-05 4.293275e-06 2.490193e-07 152 1.520000e+00 1.124312e-05 4.452384e-06 3.053127e-07 153 1.530000e+00 1.139374e-05 4.611183e-06 3.680621e-07 154 1.540000e+00 1.154415e-05 4.769691e-06 4.355775e-07 155 1.550000e+00 1.169435e-05 4.927925e-06 5.055123e-07 156 1.560000e+00 1.184435e-05 5.085895e-06 5.798000e-07 157 1.570000e+00 1.199413e-05 5.243613e-06 6.741507e-07 158 1.580000e+00 1.214371e-05 5.401085e-06 7.881829e-07 159 1.590000e+00 1.229309e-05 5.558317e-06 9.203181e-07 160 1.600000e+00 1.244225e-05 5.715313e-06 1.069754e-06 161 1.610000e+00 1.259121e-05 5.872077e-06 1.236378e-06 162 1.620000e+00 1.273997e-05 6.028613e-06 1.420444e-06 163 1.630000e+00 1.288852e-05 6.184921e-06 1.607826e-06 164 1.640000e+00 1.303687e-05 6.341005e-06 1.789563e-06 165 1.650000e+00 1.318501e-05 6.496865e-06 1.966567e-06 166 1.660000e+00 1.333295e-05 6.652503e-06 2.139683e-06 167 1.670000e+00 1.348069e-05 6.807921e-06 2.309651e-06 168 1.680000e+00 1.362822e-05 6.963118e-06 2.477093e-06 169 1.690000e+00 1.377555e-05 7.118096e-06 2.642517e-06 170 1.700000e+00 1.392268e-05 7.272855e-06 2.806329e-06 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 171 1.710000e+00 1.406961e-05 7.427397e-06 2.968852e-06 172 1.720000e+00 1.421634e-05 7.581722e-06 3.130336e-06 173 1.730000e+00 1.436287e-05 7.735830e-06 3.290974e-06 174 1.740000e+00 1.450919e-05 7.889722e-06 3.450916e-06 175 1.750000e+00 1.465532e-05 8.043399e-06 3.610275e-06 176 1.760000e+00 1.480125e-05 8.196861e-06 3.769140e-06 177 1.770000e+00 1.494697e-05 8.350108e-06 3.927576e-06 178 1.780000e+00 1.509250e-05 8.503141e-06 4.085634e-06 179 1.790000e+00 1.523783e-05 8.655961e-06 4.243352e-06 180 1.800000e+00 1.538297e-05 8.808568e-06 4.400759e-06 181 1.810000e+00 1.552790e-05 8.960962e-06 4.557878e-06 182 1.820000e+00 1.567264e-05 9.113144e-06 4.714725e-06 183 1.830000e+00 1.581719e-05 9.265115e-06 4.871314e-06 184 1.840000e+00 1.596153e-05 9.416874e-06 5.027653e-06 185 1.850000e+00 1.610568e-05 9.568422e-06 5.183751e-06 186 1.860000e+00 1.624964e-05 9.719760e-06 5.339613e-06 187 1.870000e+00 1.639340e-05 9.870889e-06 5.495244e-06 188 1.880000e+00 1.653696e-05 1.002181e-05 5.650647e-06 189 1.890000e+00 1.668034e-05 1.017252e-05 5.805825e-06 190 1.900000e+00 1.682351e-05 1.032302e-05 5.960780e-06 191 1.910000e+00 1.696650e-05 1.047331e-05 6.115514e-06 192 1.920000e+00 1.710929e-05 1.062340e-05 6.270029e-06 193 1.930000e+00 1.725189e-05 1.077327e-05 6.424325e-06 194 1.940000e+00 1.739429e-05 1.092295e-05 6.578403e-06 195 1.950000e+00 1.753651e-05 1.107241e-05 6.732265e-06 196 1.960000e+00 1.767853e-05 1.122167e-05 6.885912e-06 197 1.970000e+00 1.782036e-05 1.137072e-05 7.039343e-06 198 1.980000e+00 1.796201e-05 1.151957e-05 7.192559e-06 199 1.990000e+00 1.810346e-05 1.166821e-05 7.345562e-06 200 2.000000e+00 1.824472e-05 1.181665e-05 7.498352e-06 201 2.010000e+00 1.838579e-05 1.196489e-05 7.650928e-06 202 2.020000e+00 1.852667e-05 1.211292e-05 7.803292e-06 203 2.030000e+00 1.866736e-05 1.226075e-05 7.955445e-06 204 2.040000e+00 1.880787e-05 1.240837e-05 8.107386e-06 205 2.050000e+00 1.894819e-05 1.255580e-05 8.259116e-06 206 2.060000e+00 1.908832e-05 1.270302e-05 8.410636e-06 207 2.070000e+00 1.922826e-05 1.285004e-05 8.561945e-06 208 2.080000e+00 1.936801e-05 1.299686e-05 8.713046e-06 209 2.090000e+00 1.950758e-05 1.314348e-05 8.863937e-06 210 2.100000e+00 1.964697e-05 1.328990e-05 9.014619e-06 211 2.110000e+00 1.978616e-05 1.343612e-05 9.165093e-06 212 2.120000e+00 1.992517e-05 1.358214e-05 9.315360e-06 213 2.130000e+00 2.006400e-05 1.372796e-05 9.465419e-06 214 2.140000e+00 2.020264e-05 1.387358e-05 9.615271e-06 215 2.150000e+00 2.034110e-05 1.401901e-05 9.764916e-06 216 2.160000e+00 2.047937e-05 1.416423e-05 9.914356e-06 217 2.170000e+00 2.061746e-05 1.430926e-05 1.006359e-05 218 2.180000e+00 2.075537e-05 1.445409e-05 1.021262e-05 219 2.190000e+00 2.089310e-05 1.459873e-05 1.036144e-05 220 2.200000e+00 2.103064e-05 1.474317e-05 1.051006e-05 221 2.210000e+00 2.116800e-05 1.488741e-05 1.065848e-05 222 2.220000e+00 2.130517e-05 1.503146e-05 1.080669e-05 223 2.230000e+00 2.144217e-05 1.517532e-05 1.095470e-05 224 2.240000e+00 2.157899e-05 1.531898e-05 1.110250e-05 225 2.250000e+00 2.171562e-05 1.546244e-05 1.125011e-05 226 2.260000e+00 2.185208e-05 1.560571e-05 1.139751e-05 227 2.270000e+00 2.198835e-05 1.574879e-05 1.154471e-05 228 2.280000e+00 2.212444e-05 1.589168e-05 1.169171e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 229 2.290000e+00 2.226036e-05 1.603437e-05 1.183851e-05 230 2.300000e+00 2.239610e-05 1.617687e-05 1.198511e-05 231 2.310000e+00 2.253166e-05 1.631918e-05 1.213151e-05 232 2.320000e+00 2.266704e-05 1.646130e-05 1.227771e-05 233 2.330000e+00 2.280224e-05 1.660322e-05 1.242371e-05 234 2.340000e+00 2.293726e-05 1.674496e-05 1.256951e-05 235 2.350000e+00 2.307211e-05 1.688650e-05 1.271511e-05 236 2.360000e+00 2.320678e-05 1.702786e-05 1.286052e-05 237 2.370000e+00 2.334127e-05 1.716903e-05 1.300573e-05 238 2.380000e+00 2.347559e-05 1.731000e-05 1.315074e-05 239 2.390000e+00 2.360973e-05 1.745079e-05 1.329555e-05 240 2.400000e+00 2.374370e-05 1.759139e-05 1.344017e-05 241 2.410000e+00 2.387749e-05 1.773180e-05 1.358460e-05 242 2.420000e+00 2.401111e-05 1.787203e-05 1.372882e-05 243 2.430000e+00 2.414455e-05 1.801207e-05 1.387286e-05 244 2.440000e+00 2.427782e-05 1.815192e-05 1.401669e-05 245 2.450000e+00 2.441092e-05 1.829158e-05 1.416034e-05 246 2.460000e+00 2.454384e-05 1.843106e-05 1.430379e-05 247 2.470000e+00 2.467659e-05 1.857035e-05 1.444704e-05 248 2.480000e+00 2.480917e-05 1.870946e-05 1.459011e-05 249 2.490000e+00 2.494157e-05 1.884838e-05 1.473298e-05 250 2.500000e+00 2.507380e-05 1.898712e-05 1.487566e-05 251 2.510000e+00 2.520586e-05 1.912567e-05 1.501815e-05 252 2.520000e+00 2.533775e-05 1.926404e-05 1.516044e-05 253 2.530000e+00 2.546947e-05 1.940223e-05 1.530255e-05 254 2.540000e+00 2.560101e-05 1.954023e-05 1.544446e-05 255 2.550000e+00 2.573239e-05 1.967805e-05 1.558618e-05 256 2.560000e+00 2.586360e-05 1.981569e-05 1.572772e-05 257 2.570000e+00 2.599463e-05 1.995314e-05 1.586906e-05 258 2.580000e+00 2.612550e-05 2.009042e-05 1.601021e-05 259 2.590000e+00 2.625620e-05 2.022751e-05 1.615118e-05 260 2.600000e+00 2.638673e-05 2.036442e-05 1.629196e-05 261 2.610000e+00 2.651709e-05 2.050115e-05 1.643255e-05 262 2.620000e+00 2.664729e-05 2.063770e-05 1.657295e-05 263 2.630000e+00 2.677731e-05 2.077407e-05 1.671316e-05 264 2.640000e+00 2.690717e-05 2.091026e-05 1.685319e-05 265 2.650000e+00 2.703686e-05 2.104628e-05 1.699303e-05 266 2.660000e+00 2.716639e-05 2.118211e-05 1.713269e-05 267 2.670000e+00 2.729575e-05 2.131776e-05 1.727216e-05 268 2.680000e+00 2.742494e-05 2.145324e-05 1.741144e-05 269 2.690000e+00 2.755396e-05 2.158854e-05 1.755054e-05 270 2.700000e+00 2.768282e-05 2.172366e-05 1.768945e-05 271 2.710000e+00 2.781152e-05 2.185860e-05 1.782818e-05 272 2.720000e+00 2.794005e-05 2.199337e-05 1.796673e-05 273 2.730000e+00 2.806842e-05 2.212796e-05 1.810509e-05 274 2.740000e+00 2.819662e-05 2.226238e-05 1.824327e-05 275 2.750000e+00 2.832466e-05 2.239662e-05 1.838127e-05 276 2.760000e+00 2.845253e-05 2.253068e-05 1.851908e-05 277 2.770000e+00 2.858024e-05 2.266457e-05 1.865671e-05 278 2.780000e+00 2.870779e-05 2.279829e-05 1.879416e-05 279 2.790000e+00 2.883518e-05 2.293183e-05 1.893143e-05 280 2.800000e+00 2.896240e-05 2.306519e-05 1.906852e-05 281 2.810000e+00 2.908946e-05 2.319838e-05 1.920542e-05 282 2.820000e+00 2.921636e-05 2.333140e-05 1.934215e-05 283 2.830000e+00 2.934310e-05 2.346425e-05 1.947870e-05 284 2.840000e+00 2.946968e-05 2.359692e-05 1.961506e-05 285 2.850000e+00 2.959610e-05 2.372942e-05 1.975125e-05 286 2.860000e+00 2.972235e-05 2.386175e-05 1.988726e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 287 2.870000e+00 2.984845e-05 2.399391e-05 2.002309e-05 288 2.880000e+00 2.997438e-05 2.412590e-05 2.015874e-05 289 2.890000e+00 3.010016e-05 2.425771e-05 2.029422e-05 290 2.900000e+00 3.022578e-05 2.438936e-05 2.042951e-05 291 2.910000e+00 3.035124e-05 2.452083e-05 2.056463e-05 292 2.920000e+00 3.047653e-05 2.465214e-05 2.069957e-05 293 2.930000e+00 3.060168e-05 2.478327e-05 2.083434e-05 294 2.940000e+00 3.072666e-05 2.491424e-05 2.096893e-05 295 2.950000e+00 3.085148e-05 2.504503e-05 2.110334e-05 296 2.960000e+00 3.097615e-05 2.517566e-05 2.123758e-05 297 2.970000e+00 3.110066e-05 2.530612e-05 2.137165e-05 298 2.980000e+00 3.122502e-05 2.543641e-05 2.150553e-05 299 2.990000e+00 3.134921e-05 2.556654e-05 2.163925e-05 300 3.000000e+00 3.147326e-05 2.569649e-05 2.177279e-05 301 3.010000e+00 3.159714e-05 2.582628e-05 2.190616e-05 302 3.020000e+00 3.172087e-05 2.595591e-05 2.203935e-05 303 3.030000e+00 3.184444e-05 2.608536e-05 2.217237e-05 304 3.040000e+00 3.196786e-05 2.621465e-05 2.230522e-05 305 3.050000e+00 3.209113e-05 2.634378e-05 2.243789e-05 306 3.060000e+00 3.221424e-05 2.647274e-05 2.257040e-05 307 3.070000e+00 3.233719e-05 2.660153e-05 2.270273e-05 308 3.080000e+00 3.245999e-05 2.673016e-05 2.283489e-05 309 3.090000e+00 3.258264e-05 2.685863e-05 2.296688e-05 310 3.100000e+00 3.270514e-05 2.698693e-05 2.309869e-05 311 3.110000e+00 3.282748e-05 2.711506e-05 2.323034e-05 312 3.120000e+00 3.294967e-05 2.724304e-05 2.336182e-05 313 3.130000e+00 3.307170e-05 2.737085e-05 2.349313e-05 314 3.140000e+00 3.319359e-05 2.749849e-05 2.362427e-05 315 3.150000e+00 3.331532e-05 2.762598e-05 2.375524e-05 316 3.160000e+00 3.343690e-05 2.775330e-05 2.388604e-05 317 3.170000e+00 3.355833e-05 2.788046e-05 2.401667e-05 318 3.180000e+00 3.367960e-05 2.800746e-05 2.414713e-05 319 3.190000e+00 3.380073e-05 2.813430e-05 2.427743e-05 320 3.200000e+00 3.392171e-05 2.826097e-05 2.440756e-05 321 3.210000e+00 3.404253e-05 2.838749e-05 2.453752e-05 322 3.220000e+00 3.416321e-05 2.851384e-05 2.466732e-05 323 3.230000e+00 3.428374e-05 2.864004e-05 2.479695e-05 324 3.240000e+00 3.440411e-05 2.876607e-05 2.492641e-05 325 3.250000e+00 3.452434e-05 2.889195e-05 2.505571e-05 326 3.260000e+00 3.464442e-05 2.901767e-05 2.518484e-05 327 3.270000e+00 3.476435e-05 2.914322e-05 2.531380e-05 328 3.280000e+00 3.488413e-05 2.926862e-05 2.544260e-05 329 3.290000e+00 3.500377e-05 2.939386e-05 2.557124e-05 330 3.300000e+00 3.512326e-05 2.951895e-05 2.569971e-05 331 3.310000e+00 3.524259e-05 2.964387e-05 2.582802e-05 332 3.320000e+00 3.536179e-05 2.976864e-05 2.595617e-05 333 3.330000e+00 3.548083e-05 2.989325e-05 2.608415e-05 334 3.340000e+00 3.559973e-05 3.001770e-05 2.621197e-05 335 3.350000e+00 3.571848e-05 3.014200e-05 2.633962e-05 336 3.360000e+00 3.583709e-05 3.026614e-05 2.646712e-05 337 3.370000e+00 3.595555e-05 3.039012e-05 2.659445e-05 338 3.380000e+00 3.607386e-05 3.051395e-05 2.672162e-05 339 3.390000e+00 3.619203e-05 3.063762e-05 2.684863e-05 340 3.400000e+00 3.631006e-05 3.076114e-05 2.697547e-05 341 3.410000e+00 3.642793e-05 3.088451e-05 2.710216e-05 342 3.420000e+00 3.654567e-05 3.100772e-05 2.722868e-05 343 3.430000e+00 3.666326e-05 3.113077e-05 2.735505e-05 344 3.440000e+00 3.678071e-05 3.125367e-05 2.748126e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 345 3.450000e+00 3.689801e-05 3.137642e-05 2.760730e-05 346 3.460000e+00 3.701517e-05 3.149901e-05 2.773319e-05 347 3.470000e+00 3.713219e-05 3.162146e-05 2.785892e-05 348 3.480000e+00 3.724906e-05 3.174374e-05 2.798449e-05 349 3.490000e+00 3.736579e-05 3.186588e-05 2.810990e-05 350 3.500000e+00 3.748238e-05 3.198786e-05 2.823515e-05 351 3.510000e+00 3.759882e-05 3.210970e-05 2.836024e-05 352 3.520000e+00 3.771513e-05 3.223138e-05 2.848518e-05 353 3.530000e+00 3.783129e-05 3.235290e-05 2.860996e-05 354 3.540000e+00 3.794731e-05 3.247428e-05 2.873458e-05 355 3.550000e+00 3.806319e-05 3.259551e-05 2.885905e-05 356 3.560000e+00 3.817893e-05 3.271659e-05 2.898336e-05 357 3.570000e+00 3.829453e-05 3.283751e-05 2.910751e-05 358 3.580000e+00 3.840999e-05 3.295829e-05 2.923151e-05 359 3.590000e+00 3.852531e-05 3.307892e-05 2.935535e-05 360 3.600000e+00 3.864048e-05 3.319939e-05 2.947904e-05 361 3.610000e+00 3.875552e-05 3.331972e-05 2.960258e-05 362 3.620000e+00 3.887042e-05 3.343990e-05 2.972595e-05 363 3.630000e+00 3.898518e-05 3.355993e-05 2.984918e-05 364 3.640000e+00 3.909980e-05 3.367981e-05 2.997225e-05 365 3.650000e+00 3.921429e-05 3.379955e-05 3.009516e-05 366 3.660000e+00 3.932863e-05 3.391914e-05 3.021793e-05 367 3.670000e+00 3.944284e-05 3.403857e-05 3.034054e-05 368 3.680000e+00 3.955691e-05 3.415787e-05 3.046299e-05 369 3.690000e+00 3.967084e-05 3.427701e-05 3.058530e-05 370 3.700000e+00 3.978463e-05 3.439601e-05 3.070745e-05 371 3.710000e+00 3.989829e-05 3.451486e-05 3.082945e-05 372 3.720000e+00 4.001181e-05 3.463357e-05 3.095130e-05 373 3.730000e+00 4.012519e-05 3.475213e-05 3.107299e-05 374 3.740000e+00 4.023844e-05 3.487054e-05 3.119454e-05 375 3.750000e+00 4.035155e-05 3.498881e-05 3.131594e-05 376 3.760000e+00 4.046453e-05 3.510694e-05 3.143718e-05 377 3.770000e+00 4.057737e-05 3.522492e-05 3.155827e-05 378 3.780000e+00 4.069007e-05 3.534275e-05 3.167922e-05 379 3.790000e+00 4.080264e-05 3.546045e-05 3.180001e-05 380 3.800000e+00 4.091508e-05 3.557799e-05 3.192066e-05 381 3.810000e+00 4.102738e-05 3.569540e-05 3.204115e-05 382 3.820000e+00 4.113954e-05 3.581266e-05 3.216150e-05 383 3.830000e+00 4.125157e-05 3.592977e-05 3.228170e-05 384 3.840000e+00 4.136347e-05 3.604675e-05 3.240175e-05 385 3.850000e+00 4.147523e-05 3.616358e-05 3.252165e-05 386 3.860000e+00 4.158686e-05 3.628027e-05 3.264140e-05 387 3.870000e+00 4.169836e-05 3.639681e-05 3.276101e-05 388 3.880000e+00 4.180972e-05 3.651322e-05 3.288047e-05 389 3.890000e+00 4.192096e-05 3.662948e-05 3.299978e-05 390 3.900000e+00 4.203206e-05 3.674560e-05 3.311895e-05 391 3.910000e+00 4.214302e-05 3.686158e-05 3.323796e-05 392 3.920000e+00 4.225386e-05 3.697742e-05 3.335684e-05 393 3.930000e+00 4.236456e-05 3.709312e-05 3.347556e-05 394 3.940000e+00 4.247513e-05 3.720868e-05 3.359414e-05 395 3.950000e+00 4.258557e-05 3.732410e-05 3.371258e-05 396 3.960000e+00 4.269588e-05 3.743938e-05 3.383087e-05 397 3.970000e+00 4.280606e-05 3.755452e-05 3.394902e-05 398 3.980000e+00 4.291611e-05 3.766952e-05 3.406702e-05 399 3.990000e+00 4.302602e-05 3.778438e-05 3.418488e-05 400 4.000000e+00 4.313581e-05 3.789911e-05 3.430259e-05 401 4.010000e+00 4.324547e-05 3.801369e-05 3.442016e-05 402 4.020000e+00 4.335500e-05 3.812814e-05 3.453758e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 403 4.030000e+00 4.346440e-05 3.824244e-05 3.465486e-05 404 4.040000e+00 4.357366e-05 3.835661e-05 3.477200e-05 405 4.050000e+00 4.368280e-05 3.847065e-05 3.488900e-05 406 4.060000e+00 4.379182e-05 3.858454e-05 3.500585e-05 407 4.070000e+00 4.390070e-05 3.869830e-05 3.512257e-05 408 4.080000e+00 4.400945e-05 3.881192e-05 3.523914e-05 409 4.090000e+00 4.411808e-05 3.892540e-05 3.535556e-05 410 4.100000e+00 4.422658e-05 3.903875e-05 3.547185e-05 411 4.110000e+00 4.433495e-05 3.915196e-05 3.558800e-05 412 4.120000e+00 4.444319e-05 3.926504e-05 3.570400e-05 413 4.130000e+00 4.455131e-05 3.937798e-05 3.581987e-05 414 4.140000e+00 4.465930e-05 3.949079e-05 3.593559e-05 415 4.150000e+00 4.476716e-05 3.960346e-05 3.605117e-05 416 4.160000e+00 4.487490e-05 3.971599e-05 3.616662e-05 417 4.170000e+00 4.498251e-05 3.982839e-05 3.628192e-05 418 4.180000e+00 4.508999e-05 3.994066e-05 3.639708e-05 419 4.190000e+00 4.519735e-05 4.005279e-05 3.651211e-05 420 4.200000e+00 4.530458e-05 4.016479e-05 3.662700e-05 421 4.210000e+00 4.541169e-05 4.027666e-05 3.674174e-05 422 4.220000e+00 4.551867e-05 4.038839e-05 3.685635e-05 423 4.230000e+00 4.562553e-05 4.049999e-05 3.697083e-05 424 4.240000e+00 4.573226e-05 4.061145e-05 3.708516e-05 425 4.250000e+00 4.583887e-05 4.072278e-05 3.719935e-05 426 4.260000e+00 4.594535e-05 4.083398e-05 3.731341e-05 427 4.270000e+00 4.605171e-05 4.094505e-05 3.742733e-05 428 4.280000e+00 4.615795e-05 4.105599e-05 3.754112e-05 429 4.290000e+00 4.626406e-05 4.116679e-05 3.765477e-05 430 4.300000e+00 4.637005e-05 4.127746e-05 3.776828e-05 431 4.310000e+00 4.647591e-05 4.138801e-05 3.788165e-05 432 4.320000e+00 4.658166e-05 4.149842e-05 3.799489e-05 433 4.330000e+00 4.668727e-05 4.160870e-05 3.810800e-05 434 4.340000e+00 4.679277e-05 4.171884e-05 3.822096e-05 435 4.350000e+00 4.689815e-05 4.182886e-05 3.833380e-05 436 4.360000e+00 4.700340e-05 4.193875e-05 3.844649e-05 437 4.370000e+00 4.710853e-05 4.204851e-05 3.855906e-05 438 4.380000e+00 4.721354e-05 4.215814e-05 3.867149e-05 439 4.390000e+00 4.731843e-05 4.226764e-05 3.878378e-05 440 4.400000e+00 4.742319e-05 4.237701e-05 3.889594e-05 441 4.410000e+00 4.752784e-05 4.248625e-05 3.900797e-05 442 4.420000e+00 4.763236e-05 4.259536e-05 3.911986e-05 443 4.430000e+00 4.773676e-05 4.270435e-05 3.923162e-05 444 4.440000e+00 4.784105e-05 4.281320e-05 3.934325e-05 445 4.450000e+00 4.794521e-05 4.292193e-05 3.945474e-05 446 4.460000e+00 4.804925e-05 4.303053e-05 3.956611e-05 447 4.470000e+00 4.815317e-05 4.313900e-05 3.967734e-05 448 4.480000e+00 4.825698e-05 4.324735e-05 3.978843e-05 449 4.490000e+00 4.836066e-05 4.335557e-05 3.989940e-05 450 4.500000e+00 4.846422e-05 4.346366e-05 4.001023e-05 451 4.510000e+00 4.856767e-05 4.357162e-05 4.012094e-05 452 4.520000e+00 4.867100e-05 4.367946e-05 4.023151e-05 453 4.530000e+00 4.877420e-05 4.378717e-05 4.034195e-05 454 4.540000e+00 4.887729e-05 4.389476e-05 4.045226e-05 455 4.550000e+00 4.898027e-05 4.400221e-05 4.056244e-05 456 4.560000e+00 4.908312e-05 4.410955e-05 4.067249e-05 457 4.570000e+00 4.918585e-05 4.421676e-05 4.078241e-05 458 4.580000e+00 4.928847e-05 4.432384e-05 4.089220e-05 459 4.590000e+00 4.939097e-05 4.443080e-05 4.100186e-05 460 4.600000e+00 4.949336e-05 4.453763e-05 4.111139e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 461 4.610000e+00 4.959562e-05 4.464434e-05 4.122079e-05 462 4.620000e+00 4.969777e-05 4.475093e-05 4.133006e-05 463 4.630000e+00 4.979981e-05 4.485739e-05 4.143921e-05 464 4.640000e+00 4.990172e-05 4.496372e-05 4.154822e-05 465 4.650000e+00 5.000352e-05 4.506994e-05 4.165711e-05 466 4.660000e+00 5.010521e-05 4.517603e-05 4.176587e-05 467 4.670000e+00 5.020678e-05 4.528199e-05 4.187450e-05 468 4.680000e+00 5.030823e-05 4.538784e-05 4.198301e-05 469 4.690000e+00 5.040957e-05 4.549356e-05 4.209138e-05 470 4.700000e+00 5.051079e-05 4.559916e-05 4.219963e-05 471 4.710000e+00 5.061190e-05 4.570463e-05 4.230776e-05 472 4.720000e+00 5.071289e-05 4.580999e-05 4.241575e-05 473 4.730000e+00 5.081377e-05 4.591522e-05 4.252362e-05 474 4.740000e+00 5.091453e-05 4.602033e-05 4.263137e-05 475 4.750000e+00 5.101518e-05 4.612532e-05 4.273899e-05 476 4.760000e+00 5.111572e-05 4.623018e-05 4.284648e-05 477 4.770000e+00 5.121614e-05 4.633493e-05 4.295385e-05 478 4.780000e+00 5.131645e-05 4.643955e-05 4.306109e-05 479 4.790000e+00 5.141664e-05 4.654406e-05 4.316821e-05 480 4.800000e+00 5.151672e-05 4.664844e-05 4.327520e-05 481 4.810000e+00 5.161669e-05 4.675271e-05 4.338207e-05 482 4.820000e+00 5.171654e-05 4.685685e-05 4.348881e-05 483 4.830000e+00 5.181629e-05 4.696088e-05 4.359543e-05 484 4.840000e+00 5.191592e-05 4.706478e-05 4.370193e-05 485 4.850000e+00 5.201544e-05 4.716856e-05 4.380830e-05 486 4.860000e+00 5.211484e-05 4.727223e-05 4.391454e-05 487 4.870000e+00 5.221413e-05 4.737578e-05 4.402067e-05 488 4.880000e+00 5.231332e-05 4.747920e-05 4.412667e-05 489 4.890000e+00 5.241239e-05 4.758251e-05 4.423255e-05 490 4.900000e+00 5.251135e-05 4.768570e-05 4.433831e-05 491 4.910000e+00 5.261019e-05 4.778878e-05 4.444394e-05 492 4.920000e+00 5.270893e-05 4.789173e-05 4.454945e-05 493 4.930000e+00 5.280756e-05 4.799457e-05 4.465484e-05 494 4.940000e+00 5.290607e-05 4.809729e-05 4.476011e-05 495 4.950000e+00 5.300448e-05 4.819989e-05 4.486525e-05 496 4.960000e+00 5.310277e-05 4.830237e-05 4.497028e-05 497 4.970000e+00 5.320096e-05 4.840474e-05 4.507518e-05 498 4.980000e+00 5.329903e-05 4.850699e-05 4.517996e-05 499 4.990000e+00 5.339700e-05 4.860913e-05 4.528462e-05 500 5.000000e+00 5.349485e-05 4.871115e-05 4.538917e-05 Test of MOS BSIM1 implementation; DC transfer curve -------------------------------------------------------------------------------- Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 0 0.000000e+00 6.217924e-12 8.256587e-12 1 1.000000e-02 6.217924e-12 8.256587e-12 2 2.000000e-02 6.217924e-12 8.256587e-12 3 3.000000e-02 6.217924e-12 8.256587e-12 4 4.000000e-02 6.217924e-12 8.256587e-12 5 5.000000e-02 6.217924e-12 8.256587e-12 6 6.000000e-02 6.217924e-12 8.256587e-12 7 7.000000e-02 6.217924e-12 8.256587e-12 8 8.000000e-02 6.217924e-12 8.256587e-12 9 9.000000e-02 6.217924e-12 8.256587e-12 10 1.000000e-01 6.217924e-12 8.256587e-12 11 1.100000e-01 6.217924e-12 8.256587e-12 12 1.200000e-01 6.217924e-12 8.256587e-12 13 1.300000e-01 6.217924e-12 8.256587e-12 14 1.400000e-01 6.217924e-12 8.256587e-12 15 1.500000e-01 6.217924e-12 8.256587e-12 16 1.600000e-01 6.217924e-12 8.256587e-12 17 1.700000e-01 6.217924e-12 8.256587e-12 18 1.800000e-01 6.217924e-12 8.256587e-12 19 1.900000e-01 6.217924e-12 8.256587e-12 20 2.000000e-01 6.217924e-12 8.256587e-12 21 2.100000e-01 6.217924e-12 8.256587e-12 22 2.200000e-01 6.217924e-12 8.256587e-12 23 2.300000e-01 6.217924e-12 8.256587e-12 24 2.400000e-01 6.217924e-12 8.256587e-12 25 2.500000e-01 6.217924e-12 8.256587e-12 26 2.600000e-01 6.217924e-12 8.256587e-12 27 2.700000e-01 6.217924e-12 8.256587e-12 28 2.800000e-01 6.217924e-12 8.256587e-12 29 2.900000e-01 6.217924e-12 8.256587e-12 30 3.000000e-01 6.217924e-12 8.256587e-12 31 3.100000e-01 6.217924e-12 8.256587e-12 32 3.200000e-01 6.217924e-12 8.256587e-12 33 3.300000e-01 6.217924e-12 8.256587e-12 34 3.400000e-01 6.217924e-12 8.256587e-12 35 3.500000e-01 6.217924e-12 8.256587e-12 36 3.600000e-01 6.217924e-12 8.256587e-12 37 3.700000e-01 6.217924e-12 8.256587e-12 38 3.800000e-01 6.217924e-12 8.256587e-12 39 3.900000e-01 6.217924e-12 8.256587e-12 40 4.000000e-01 6.217924e-12 8.256587e-12 41 4.100000e-01 6.217924e-12 8.256587e-12 42 4.200000e-01 6.217924e-12 8.256587e-12 43 4.300000e-01 6.217924e-12 8.256587e-12 44 4.400000e-01 6.217924e-12 8.256587e-12 45 4.500000e-01 6.217924e-12 8.256587e-12 46 4.600000e-01 6.217924e-12 8.256587e-12 47 4.700000e-01 6.217924e-12 8.256587e-12 48 4.800000e-01 6.217924e-12 8.256587e-12 49 4.900000e-01 6.217924e-12 8.256587e-12 50 5.000000e-01 6.217924e-12 8.256587e-12 51 5.100000e-01 6.217924e-12 8.256587e-12 52 5.200000e-01 6.217924e-12 8.256587e-12 53 5.300000e-01 6.217924e-12 8.256587e-12 54 5.400000e-01 6.217924e-12 8.256587e-12 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 55 5.500000e-01 6.217924e-12 8.256587e-12 56 5.600000e-01 6.217924e-12 8.256587e-12 57 5.700000e-01 6.217924e-12 8.256587e-12 58 5.800000e-01 6.217924e-12 8.256587e-12 59 5.900000e-01 6.217924e-12 8.256587e-12 60 6.000000e-01 6.217924e-12 8.256587e-12 61 6.100000e-01 6.217924e-12 8.256587e-12 62 6.200000e-01 6.217924e-12 8.256587e-12 63 6.300000e-01 6.217924e-12 8.256587e-12 64 6.400000e-01 6.217924e-12 8.256587e-12 65 6.500000e-01 6.217924e-12 8.256587e-12 66 6.600000e-01 6.217924e-12 8.256587e-12 67 6.700000e-01 6.217924e-12 8.256587e-12 68 6.800000e-01 6.217924e-12 8.256587e-12 69 6.900000e-01 6.217924e-12 8.256587e-12 70 7.000000e-01 6.217924e-12 8.256587e-12 71 7.100000e-01 6.217924e-12 8.256587e-12 72 7.200000e-01 6.217924e-12 8.256587e-12 73 7.300000e-01 6.217924e-12 8.256587e-12 74 7.400000e-01 6.217924e-12 8.256587e-12 75 7.500000e-01 6.217924e-12 8.256587e-12 76 7.600000e-01 6.217924e-12 8.256587e-12 77 7.700000e-01 6.217924e-12 8.256587e-12 78 7.800000e-01 6.217924e-12 8.256587e-12 79 7.900000e-01 6.217924e-12 8.256587e-12 80 8.000000e-01 6.217924e-12 8.256587e-12 81 8.100000e-01 6.217924e-12 8.256587e-12 82 8.200000e-01 6.217924e-12 8.256587e-12 83 8.300000e-01 6.217925e-12 8.256587e-12 84 8.400000e-01 6.217925e-12 8.256587e-12 85 8.500000e-01 6.217925e-12 8.256587e-12 86 8.600000e-01 6.217925e-12 8.256587e-12 87 8.700000e-01 6.217926e-12 8.256587e-12 88 8.800000e-01 6.217927e-12 8.256587e-12 89 8.900000e-01 6.217928e-12 8.256587e-12 90 9.000000e-01 6.217929e-12 8.256587e-12 91 9.100000e-01 6.217931e-12 8.256587e-12 92 9.200000e-01 6.217934e-12 8.256587e-12 93 9.300000e-01 6.217938e-12 8.256587e-12 94 9.400000e-01 6.217943e-12 8.256587e-12 95 9.500000e-01 6.217949e-12 8.256587e-12 96 9.600000e-01 6.217958e-12 8.256587e-12 97 9.700000e-01 6.217971e-12 8.256587e-12 98 9.800000e-01 6.217988e-12 8.256587e-12 99 9.900000e-01 6.218010e-12 8.256587e-12 100 1.000000e+00 6.218041e-12 8.256587e-12 101 1.010000e+00 6.218082e-12 8.256587e-12 102 1.020000e+00 6.218138e-12 8.256587e-12 103 1.030000e+00 6.218214e-12 8.256587e-12 104 1.040000e+00 6.218316e-12 8.256588e-12 105 1.050000e+00 6.218455e-12 8.256588e-12 106 1.060000e+00 6.218642e-12 8.256588e-12 107 1.070000e+00 6.218895e-12 8.256588e-12 108 1.080000e+00 6.219237e-12 8.256589e-12 109 1.090000e+00 6.219701e-12 8.256589e-12 110 1.100000e+00 6.220328e-12 8.256590e-12 111 1.110000e+00 6.221175e-12 8.256591e-12 112 1.120000e+00 6.222321e-12 8.256592e-12 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 113 1.130000e+00 6.223872e-12 8.256594e-12 114 1.140000e+00 6.225970e-12 8.256597e-12 115 1.150000e+00 6.228808e-12 8.256601e-12 116 1.160000e+00 6.232646e-12 8.256607e-12 117 1.170000e+00 6.237838e-12 8.256614e-12 118 1.180000e+00 6.244860e-12 8.256625e-12 119 1.190000e+00 6.254359e-12 8.256639e-12 120 1.200000e+00 6.267208e-12 8.256659e-12 121 1.210000e+00 6.284587e-12 8.256687e-12 122 1.220000e+00 6.308096e-12 8.256725e-12 123 1.230000e+00 6.339894e-12 8.256778e-12 124 1.240000e+00 6.382905e-12 8.256851e-12 125 1.250000e+00 6.441085e-12 8.256952e-12 126 1.260000e+00 6.519781e-12 8.257092e-12 127 1.270000e+00 6.626228e-12 8.257286e-12 128 1.280000e+00 6.770212e-12 8.257554e-12 129 1.290000e+00 6.964971e-12 8.257925e-12 130 1.300000e+00 7.228410e-12 8.258439e-12 131 1.310000e+00 7.584748e-12 8.259150e-12 132 1.320000e+00 8.066744e-12 8.260134e-12 133 1.330000e+00 8.718711e-12 8.261496e-12 134 1.340000e+00 9.600587e-12 8.263380e-12 135 1.350000e+00 1.079345e-11 8.265988e-12 136 1.360000e+00 1.240695e-11 8.269596e-12 137 1.370000e+00 1.458943e-11 8.274591e-12 138 1.380000e+00 1.754153e-11 8.281503e-12 139 1.390000e+00 2.153464e-11 8.291068e-12 140 1.400000e+00 2.693582e-11 8.304304e-12 141 1.410000e+00 3.424158e-11 8.322623e-12 142 1.420000e+00 4.412348e-11 8.347974e-12 143 1.430000e+00 5.748982e-11 8.383057e-12 144 1.440000e+00 7.556910e-11 8.431608e-12 145 1.450000e+00 1.000228e-10 8.498798e-12 146 1.460000e+00 1.330980e-10 8.591782e-12 147 1.470000e+00 1.778334e-10 8.720463e-12 148 1.480000e+00 2.383378e-10 8.898543e-12 149 1.490000e+00 3.201668e-10 9.144988e-12 150 1.500000e+00 4.308307e-10 9.486041e-12 151 1.510000e+00 5.804798e-10 9.958024e-12 152 1.520000e+00 7.828297e-10 1.061120e-11 153 1.530000e+00 1.056405e-09 1.151512e-11 154 1.540000e+00 1.426215e-09 1.276606e-11 155 1.550000e+00 1.925997e-09 1.449722e-11 156 1.560000e+00 2.601223e-09 1.689296e-11 157 1.570000e+00 3.513101e-09 2.020840e-11 158 1.580000e+00 4.743879e-09 2.479659e-11 159 1.590000e+00 6.403825e-09 3.114610e-11 160 1.600000e+00 8.640297e-09 3.993303e-11 161 1.610000e+00 1.164938e-08 5.209299e-11 162 1.620000e+00 1.569050e-08 6.892062e-11 163 1.630000e+00 2.110410e-08 9.220739e-11 164 1.640000e+00 2.833221e-08 1.244321e-10 165 1.650000e+00 3.794020e-08 1.690243e-10 166 1.660000e+00 5.063644e-08 2.307287e-10 167 1.670000e+00 6.728332e-08 3.161086e-10 168 1.680000e+00 8.888851e-08 4.342414e-10 169 1.690000e+00 1.165604e-07 5.976788e-10 170 1.700000e+00 1.514086e-07 8.237706e-10 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 171 1.710000e+00 1.943720e-07 1.136489e-09 172 1.720000e+00 2.459753e-07 1.568934e-09 173 1.730000e+00 3.060479e-07 2.166773e-09 174 1.740000e+00 3.734868e-07 2.992934e-09 175 1.750000e+00 4.461793e-07 4.133990e-09 176 1.760000e+00 5.211812e-07 5.708769e-09 177 1.770000e+00 6.041395e-07 7.879859e-09 178 1.780000e+00 7.077868e-07 1.086875e-08 179 1.790000e+00 8.299072e-07 1.497532e-08 180 1.800000e+00 9.689552e-07 2.060216e-08 181 1.810000e+00 1.124372e-06 2.828337e-08 182 1.820000e+00 1.296396e-06 3.871572e-08 183 1.830000e+00 1.482828e-06 5.278700e-08 184 1.840000e+00 1.665859e-06 7.159068e-08 185 1.850000e+00 1.843285e-06 9.640828e-08 186 1.860000e+00 2.016160e-06 1.286319e-07 187 1.870000e+00 2.185406e-06 1.695951e-07 188 1.880000e+00 2.351792e-06 2.202892e-07 189 1.890000e+00 2.515935e-06 2.809837e-07 190 1.900000e+00 2.678324e-06 3.508379e-07 191 1.910000e+00 2.839336e-06 4.276739e-07 192 1.920000e+00 2.999261e-06 5.080913e-07 193 1.930000e+00 3.158318e-06 5.940911e-07 194 1.940000e+00 3.316671e-06 6.997354e-07 195 1.950000e+00 3.474446e-06 8.230332e-07 196 1.960000e+00 3.631734e-06 9.620904e-07 197 1.970000e+00 3.788604e-06 1.116319e-06 198 1.980000e+00 3.945109e-06 1.286153e-06 199 1.990000e+00 4.101287e-06 1.470205e-06 200 2.000000e+00 4.257165e-06 1.650950e-06 201 2.010000e+00 4.412767e-06 1.825788e-06 202 2.020000e+00 4.568106e-06 1.995959e-06 203 2.030000e+00 4.723196e-06 2.162507e-06 204 2.040000e+00 4.878045e-06 2.326270e-06 205 2.050000e+00 5.032659e-06 2.487903e-06 206 2.060000e+00 5.187045e-06 2.647906e-06 207 2.070000e+00 5.341205e-06 2.806654e-06 208 2.080000e+00 5.495143e-06 2.964426e-06 209 2.090000e+00 5.648861e-06 3.121428e-06 210 2.100000e+00 5.802361e-06 3.277810e-06 211 2.110000e+00 5.955645e-06 3.433685e-06 212 2.120000e+00 6.108713e-06 3.589131e-06 213 2.130000e+00 6.261566e-06 3.744208e-06 214 2.140000e+00 6.414206e-06 3.898959e-06 215 2.150000e+00 6.566633e-06 4.053414e-06 216 2.160000e+00 6.718848e-06 4.207596e-06 217 2.170000e+00 6.870852e-06 4.361521e-06 218 2.180000e+00 7.022644e-06 4.515202e-06 219 2.190000e+00 7.174226e-06 4.668648e-06 220 2.200000e+00 7.325598e-06 4.821865e-06 221 2.210000e+00 7.476760e-06 4.974857e-06 222 2.220000e+00 7.627714e-06 5.127629e-06 223 2.230000e+00 7.778459e-06 5.280183e-06 224 2.240000e+00 7.928996e-06 5.432521e-06 225 2.250000e+00 8.079325e-06 5.584645e-06 226 2.260000e+00 8.229447e-06 5.736557e-06 227 2.270000e+00 8.379362e-06 5.888256e-06 228 2.280000e+00 8.529071e-06 6.039745e-06 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 229 2.290000e+00 8.678574e-06 6.191024e-06 230 2.300000e+00 8.827872e-06 6.342093e-06 231 2.310000e+00 8.976964e-06 6.492953e-06 232 2.320000e+00 9.125852e-06 6.643605e-06 233 2.330000e+00 9.274536e-06 6.794049e-06 234 2.340000e+00 9.423016e-06 6.944286e-06 235 2.350000e+00 9.571292e-06 7.094317e-06 236 2.360000e+00 9.719366e-06 7.244140e-06 237 2.370000e+00 9.867237e-06 7.393758e-06 238 2.380000e+00 1.001491e-05 7.543171e-06 239 2.390000e+00 1.016237e-05 7.692379e-06 240 2.400000e+00 1.030964e-05 7.841381e-06 241 2.410000e+00 1.045670e-05 7.990180e-06 242 2.420000e+00 1.060357e-05 8.138775e-06 243 2.430000e+00 1.075023e-05 8.287167e-06 244 2.440000e+00 1.089670e-05 8.435356e-06 245 2.450000e+00 1.104296e-05 8.583343e-06 246 2.460000e+00 1.118903e-05 8.731127e-06 247 2.470000e+00 1.133490e-05 8.878710e-06 248 2.480000e+00 1.148057e-05 9.026091e-06 249 2.490000e+00 1.162604e-05 9.173272e-06 250 2.500000e+00 1.177132e-05 9.320252e-06 251 2.510000e+00 1.191640e-05 9.467032e-06 252 2.520000e+00 1.206128e-05 9.613613e-06 253 2.530000e+00 1.220597e-05 9.759995e-06 254 2.540000e+00 1.235046e-05 9.906178e-06 255 2.550000e+00 1.249475e-05 1.005216e-05 256 2.560000e+00 1.263885e-05 1.019795e-05 257 2.570000e+00 1.278276e-05 1.034354e-05 258 2.580000e+00 1.292647e-05 1.048893e-05 259 2.590000e+00 1.306999e-05 1.063412e-05 260 2.600000e+00 1.321331e-05 1.077912e-05 261 2.610000e+00 1.335645e-05 1.092393e-05 262 2.620000e+00 1.349939e-05 1.106853e-05 263 2.630000e+00 1.364213e-05 1.121294e-05 264 2.640000e+00 1.378469e-05 1.135716e-05 265 2.650000e+00 1.392705e-05 1.150118e-05 266 2.660000e+00 1.406923e-05 1.164501e-05 267 2.670000e+00 1.421121e-05 1.178865e-05 268 2.680000e+00 1.435301e-05 1.193209e-05 269 2.690000e+00 1.449461e-05 1.207534e-05 270 2.700000e+00 1.463602e-05 1.221840e-05 271 2.710000e+00 1.477725e-05 1.236126e-05 272 2.720000e+00 1.491828e-05 1.250393e-05 273 2.730000e+00 1.505913e-05 1.264642e-05 274 2.740000e+00 1.519979e-05 1.278871e-05 275 2.750000e+00 1.534026e-05 1.293081e-05 276 2.760000e+00 1.548055e-05 1.307272e-05 277 2.770000e+00 1.562065e-05 1.321444e-05 278 2.780000e+00 1.576056e-05 1.335597e-05 279 2.790000e+00 1.590029e-05 1.349731e-05 280 2.800000e+00 1.603983e-05 1.363846e-05 281 2.810000e+00 1.617918e-05 1.377943e-05 282 2.820000e+00 1.631835e-05 1.392021e-05 283 2.830000e+00 1.645734e-05 1.406080e-05 284 2.840000e+00 1.659614e-05 1.420120e-05 285 2.850000e+00 1.673476e-05 1.434142e-05 286 2.860000e+00 1.687319e-05 1.448145e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 287 2.870000e+00 1.701144e-05 1.462129e-05 288 2.880000e+00 1.714951e-05 1.476095e-05 289 2.890000e+00 1.728740e-05 1.490042e-05 290 2.900000e+00 1.742510e-05 1.503971e-05 291 2.910000e+00 1.756263e-05 1.517881e-05 292 2.920000e+00 1.769997e-05 1.531773e-05 293 2.930000e+00 1.783713e-05 1.545647e-05 294 2.940000e+00 1.797411e-05 1.559502e-05 295 2.950000e+00 1.811091e-05 1.573339e-05 296 2.960000e+00 1.824753e-05 1.587158e-05 297 2.970000e+00 1.838397e-05 1.600958e-05 298 2.980000e+00 1.852023e-05 1.614740e-05 299 2.990000e+00 1.865631e-05 1.628505e-05 300 3.000000e+00 1.879222e-05 1.642251e-05 301 3.010000e+00 1.892794e-05 1.655978e-05 302 3.020000e+00 1.906349e-05 1.669688e-05 303 3.030000e+00 1.919886e-05 1.683380e-05 304 3.040000e+00 1.933405e-05 1.697054e-05 305 3.050000e+00 1.946907e-05 1.710710e-05 306 3.060000e+00 1.960391e-05 1.724348e-05 307 3.070000e+00 1.973858e-05 1.737968e-05 308 3.080000e+00 1.987307e-05 1.751570e-05 309 3.090000e+00 2.000738e-05 1.765154e-05 310 3.100000e+00 2.014152e-05 1.778721e-05 311 3.110000e+00 2.027548e-05 1.792270e-05 312 3.120000e+00 2.040927e-05 1.805801e-05 313 3.130000e+00 2.054289e-05 1.819315e-05 314 3.140000e+00 2.067633e-05 1.832811e-05 315 3.150000e+00 2.080960e-05 1.846289e-05 316 3.160000e+00 2.094269e-05 1.859750e-05 317 3.170000e+00 2.107562e-05 1.873193e-05 318 3.180000e+00 2.120837e-05 1.886619e-05 319 3.190000e+00 2.134095e-05 1.900027e-05 320 3.200000e+00 2.147336e-05 1.913418e-05 321 3.210000e+00 2.160559e-05 1.926792e-05 322 3.220000e+00 2.173766e-05 1.940148e-05 323 3.230000e+00 2.186955e-05 1.953486e-05 324 3.240000e+00 2.200128e-05 1.966808e-05 325 3.250000e+00 2.213283e-05 1.980112e-05 326 3.260000e+00 2.226422e-05 1.993399e-05 327 3.270000e+00 2.239543e-05 2.006669e-05 328 3.280000e+00 2.252648e-05 2.019922e-05 329 3.290000e+00 2.265736e-05 2.033157e-05 330 3.300000e+00 2.278807e-05 2.046376e-05 331 3.310000e+00 2.291861e-05 2.059577e-05 332 3.320000e+00 2.304898e-05 2.072762e-05 333 3.330000e+00 2.317919e-05 2.085929e-05 334 3.340000e+00 2.330923e-05 2.099079e-05 335 3.350000e+00 2.343910e-05 2.112213e-05 336 3.360000e+00 2.356881e-05 2.125330e-05 337 3.370000e+00 2.369835e-05 2.138429e-05 338 3.380000e+00 2.382773e-05 2.151512e-05 339 3.390000e+00 2.395694e-05 2.164578e-05 340 3.400000e+00 2.408598e-05 2.177628e-05 341 3.410000e+00 2.421486e-05 2.190660e-05 342 3.420000e+00 2.434358e-05 2.203676e-05 343 3.430000e+00 2.447213e-05 2.216676e-05 344 3.440000e+00 2.460051e-05 2.229658e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 345 3.450000e+00 2.472874e-05 2.242624e-05 346 3.460000e+00 2.485680e-05 2.255574e-05 347 3.470000e+00 2.498470e-05 2.268507e-05 348 3.480000e+00 2.511243e-05 2.281423e-05 349 3.490000e+00 2.524000e-05 2.294323e-05 350 3.500000e+00 2.536741e-05 2.307206e-05 351 3.510000e+00 2.549466e-05 2.320074e-05 352 3.520000e+00 2.562175e-05 2.332924e-05 353 3.530000e+00 2.574868e-05 2.345759e-05 354 3.540000e+00 2.587544e-05 2.358577e-05 355 3.550000e+00 2.600205e-05 2.371378e-05 356 3.560000e+00 2.612850e-05 2.384164e-05 357 3.570000e+00 2.625478e-05 2.396933e-05 358 3.580000e+00 2.638091e-05 2.409686e-05 359 3.590000e+00 2.650687e-05 2.422423e-05 360 3.600000e+00 2.663268e-05 2.435144e-05 361 3.610000e+00 2.675833e-05 2.447848e-05 362 3.620000e+00 2.688382e-05 2.460537e-05 363 3.630000e+00 2.700916e-05 2.473210e-05 364 3.640000e+00 2.713433e-05 2.485866e-05 365 3.650000e+00 2.725935e-05 2.498507e-05 366 3.660000e+00 2.738421e-05 2.511131e-05 367 3.670000e+00 2.750891e-05 2.523740e-05 368 3.680000e+00 2.763346e-05 2.536333e-05 369 3.690000e+00 2.775785e-05 2.548910e-05 370 3.700000e+00 2.788209e-05 2.561471e-05 371 3.710000e+00 2.800617e-05 2.574016e-05 372 3.720000e+00 2.813009e-05 2.586546e-05 373 3.730000e+00 2.825386e-05 2.599059e-05 374 3.740000e+00 2.837747e-05 2.611557e-05 375 3.750000e+00 2.850093e-05 2.624040e-05 376 3.760000e+00 2.862424e-05 2.636507e-05 377 3.770000e+00 2.874739e-05 2.648958e-05 378 3.780000e+00 2.887039e-05 2.661393e-05 379 3.790000e+00 2.899323e-05 2.673813e-05 380 3.800000e+00 2.911593e-05 2.686218e-05 381 3.810000e+00 2.923846e-05 2.698607e-05 382 3.820000e+00 2.936085e-05 2.710980e-05 383 3.830000e+00 2.948308e-05 2.723338e-05 384 3.840000e+00 2.960517e-05 2.735681e-05 385 3.850000e+00 2.972710e-05 2.748008e-05 386 3.860000e+00 2.984888e-05 2.760320e-05 387 3.870000e+00 2.997051e-05 2.772616e-05 388 3.880000e+00 3.009198e-05 2.784897e-05 389 3.890000e+00 3.021331e-05 2.797163e-05 390 3.900000e+00 3.033449e-05 2.809414e-05 391 3.910000e+00 3.045551e-05 2.821649e-05 392 3.920000e+00 3.057639e-05 2.833869e-05 393 3.930000e+00 3.069712e-05 2.846075e-05 394 3.940000e+00 3.081770e-05 2.858265e-05 395 3.950000e+00 3.093813e-05 2.870439e-05 396 3.960000e+00 3.105841e-05 2.882599e-05 397 3.970000e+00 3.117854e-05 2.894744e-05 398 3.980000e+00 3.129853e-05 2.906874e-05 399 3.990000e+00 3.141836e-05 2.918988e-05 400 4.000000e+00 3.153805e-05 2.931088e-05 401 4.010000e+00 3.165759e-05 2.943173e-05 402 4.020000e+00 3.177699e-05 2.955243e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 403 4.030000e+00 3.189624e-05 2.967298e-05 404 4.040000e+00 3.201534e-05 2.979338e-05 405 4.050000e+00 3.213430e-05 2.991363e-05 406 4.060000e+00 3.225311e-05 3.003374e-05 407 4.070000e+00 3.237177e-05 3.015369e-05 408 4.080000e+00 3.249029e-05 3.027350e-05 409 4.090000e+00 3.260867e-05 3.039317e-05 410 4.100000e+00 3.272690e-05 3.051268e-05 411 4.110000e+00 3.284498e-05 3.063205e-05 412 4.120000e+00 3.296292e-05 3.075127e-05 413 4.130000e+00 3.308072e-05 3.087035e-05 414 4.140000e+00 3.319838e-05 3.098928e-05 415 4.150000e+00 3.331589e-05 3.110807e-05 416 4.160000e+00 3.343325e-05 3.122671e-05 417 4.170000e+00 3.355048e-05 3.134520e-05 418 4.180000e+00 3.366756e-05 3.146355e-05 419 4.190000e+00 3.378450e-05 3.158176e-05 420 4.200000e+00 3.390129e-05 3.169982e-05 421 4.210000e+00 3.401795e-05 3.181774e-05 422 4.220000e+00 3.413446e-05 3.193551e-05 423 4.230000e+00 3.425083e-05 3.205314e-05 424 4.240000e+00 3.436706e-05 3.217063e-05 425 4.250000e+00 3.448315e-05 3.228797e-05 426 4.260000e+00 3.459910e-05 3.240517e-05 427 4.270000e+00 3.471491e-05 3.252223e-05 428 4.280000e+00 3.483058e-05 3.263915e-05 429 4.290000e+00 3.494611e-05 3.275592e-05 430 4.300000e+00 3.506150e-05 3.287256e-05 431 4.310000e+00 3.517675e-05 3.298905e-05 432 4.320000e+00 3.529186e-05 3.310540e-05 433 4.330000e+00 3.540683e-05 3.322161e-05 434 4.340000e+00 3.552166e-05 3.333768e-05 435 4.350000e+00 3.563636e-05 3.345361e-05 436 4.360000e+00 3.575091e-05 3.356940e-05 437 4.370000e+00 3.586533e-05 3.368505e-05 438 4.380000e+00 3.597962e-05 3.380056e-05 439 4.390000e+00 3.609376e-05 3.391593e-05 440 4.400000e+00 3.620777e-05 3.403116e-05 441 4.410000e+00 3.632164e-05 3.414625e-05 442 4.420000e+00 3.643537e-05 3.426120e-05 443 4.430000e+00 3.654897e-05 3.437602e-05 444 4.440000e+00 3.666243e-05 3.449070e-05 445 4.450000e+00 3.677576e-05 3.460523e-05 446 4.460000e+00 3.688894e-05 3.471964e-05 447 4.470000e+00 3.700200e-05 3.483390e-05 448 4.480000e+00 3.711492e-05 3.494803e-05 449 4.490000e+00 3.722770e-05 3.506202e-05 450 4.500000e+00 3.734035e-05 3.517587e-05 451 4.510000e+00 3.745287e-05 3.528959e-05 452 4.520000e+00 3.756525e-05 3.540317e-05 453 4.530000e+00 3.767750e-05 3.551662e-05 454 4.540000e+00 3.778961e-05 3.562993e-05 455 4.550000e+00 3.790159e-05 3.574310e-05 456 4.560000e+00 3.801344e-05 3.585614e-05 457 4.570000e+00 3.812515e-05 3.596905e-05 458 4.580000e+00 3.823673e-05 3.608182e-05 459 4.590000e+00 3.834818e-05 3.619445e-05 460 4.600000e+00 3.845950e-05 3.630695e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 461 4.610000e+00 3.857068e-05 3.641932e-05 462 4.620000e+00 3.868173e-05 3.653155e-05 463 4.630000e+00 3.879266e-05 3.664365e-05 464 4.640000e+00 3.890345e-05 3.675562e-05 465 4.650000e+00 3.901410e-05 3.686745e-05 466 4.660000e+00 3.912463e-05 3.697916e-05 467 4.670000e+00 3.923503e-05 3.709072e-05 468 4.680000e+00 3.934530e-05 3.720216e-05 469 4.690000e+00 3.945543e-05 3.731346e-05 470 4.700000e+00 3.956544e-05 3.742464e-05 471 4.710000e+00 3.967532e-05 3.753568e-05 472 4.720000e+00 3.978506e-05 3.764659e-05 473 4.730000e+00 3.989468e-05 3.775737e-05 474 4.740000e+00 4.000417e-05 3.786801e-05 475 4.750000e+00 4.011353e-05 3.797853e-05 476 4.760000e+00 4.022276e-05 3.808892e-05 477 4.770000e+00 4.033187e-05 3.819917e-05 478 4.780000e+00 4.044084e-05 3.830930e-05 479 4.790000e+00 4.054969e-05 3.841930e-05 480 4.800000e+00 4.065841e-05 3.852917e-05 481 4.810000e+00 4.076700e-05 3.863890e-05 482 4.820000e+00 4.087547e-05 3.874851e-05 483 4.830000e+00 4.098381e-05 3.885799e-05 484 4.840000e+00 4.109202e-05 3.896734e-05 485 4.850000e+00 4.120010e-05 3.907657e-05 486 4.860000e+00 4.130806e-05 3.918566e-05 487 4.870000e+00 4.141589e-05 3.929463e-05 488 4.880000e+00 4.152360e-05 3.940347e-05 489 4.890000e+00 4.163118e-05 3.951218e-05 490 4.900000e+00 4.173864e-05 3.962077e-05 491 4.910000e+00 4.184597e-05 3.972922e-05 492 4.920000e+00 4.195317e-05 3.983756e-05 493 4.930000e+00 4.206025e-05 3.994576e-05 494 4.940000e+00 4.216721e-05 4.005384e-05 495 4.950000e+00 4.227404e-05 4.016179e-05 496 4.960000e+00 4.238075e-05 4.026962e-05 497 4.970000e+00 4.248733e-05 4.037732e-05 498 4.980000e+00 4.259379e-05 4.048489e-05 499 4.990000e+00 4.270013e-05 4.059234e-05 500 5.000000e+00 4.280634e-05 4.069967e-05 ngspice-26/tests/bsim2/0000755000265600020320000000000012264261713014404 5ustar andreasadminngspice-26/tests/bsim2/test.cir0000644000265600020320000000664012264261473016073 0ustar andreasadminTest of MOS BSIM2 implementation; DC transfer curve ****************************************************************** MN1 13 2 0 4 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN2 23 2 0 5 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN3 33 2 0 6 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN4 43 2 0 7 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U MN5 53 2 0 8 NMOS L=10U W=50.0U AD=100P AS=100P PD=40U PS=40U VDS 3 0 0.05 VGS 2 0 0 V1 3 13 0 V2 3 23 0 V3 3 33 0 V4 3 43 0 V5 3 53 0 VBS1 4 0 0 VBS2 5 0 -1 VBS3 6 0 -2 VBS4 7 0 -3 VBS5 8 0 -4 *************************************************************** *.OPTIONS LIMPTS=5000 ACCT .OPTIONS NOACCT .DC VGS 0 5 0.01 .PRINT DC I(V1) I(V2) I(V3) I(V4) I(V5) *.PLOT DC I(V1) I(V2) I(V3) I(V4) I(V5) *.OPTIONS LIMPTS=501 ACCT *VGS 2 0 PWL(0 0 5 5) *.TRAN 0 5 0.01 *.PRINT TRAN I(V1) I(V2) I(V3) I(V4) I(V5) ***** MODEL PARAMETERS TEMP2 ******************** * This file contains the BSIM2 process file parameters as they should * be input to the .model card of spice3c1. .model nmos nmos level=5 + vfb = -0.7919 lvfb = -0.0266 wvfb = 0.0000 + phi = 0.8039 lphi = 0.0042 wphi = 0.0000 + k1 = 0.7286 lk1 = 0.0309 wk1 = 0.0000 + k2 = -0.0506 lk2 = 0.0786 wk2 = 0.0000 + mu0 = 453.2926 dl = 0.1553 dw = 0.0000 + mu0b = -5.4925 lmu0b = -1.9192 wmu0b = 0.0000 + mus0 = 781.7117 lmus0 = 25.2769 wmus0 = 0.0000 + musb = 25.5724 lmusb = -10.0060 wmusb = 0.0000 + mu20 = 0.9390 lmu20 = -0.0840 wmu20 = 0.0000 + mu2b = 0.0753 lmu2b = -0.0148 wmu2b = 0.0000 + mu2g = 0.1804 lmu2g = 0.0181 wmu2g = 0.0000 + mu30 = 44.9689 lmu30 = -0.0933 wmu30 = 0.0000 + mu3b = 0.5871 lmu3b = 1.0793 wmu3b = 0.0000 + mu3g = -11.6723 lmu3g = 0.6804 wmu3g = 0.0000 + mu40 = 0.2682 lmu40 = 2.3969 wmu40 = 0.0000 + mu4b = -0.3179 lmu4b = 0.1264 wmu4b = 0.0000 + mu4g = -0.2654 lmu4g = -0.5702 wmu4g = 0.0000 + ua0 = 0.0441 lua0 = 0.2283 wua0 = 0.0000 + uab = -0.0045 luab = -0.0105 wuab = 0.0000 + ub0 = 0.0125 lub0 = -0.0051 wub0 = 0.0000 + ubb = -0.0015 lubb = 0.0010 wubb = 0.0000 + u10 = 0.1262 lu10 = 0.5563 wu10 = 0.0000 + u1d = -0.2967 lu1d = -0.0062 wu1d = 0.0000 + u1b = 0.0960 lu1b = -0.0345 wu1b = 0.0000 + eta0 = -0.0373 leta0 = 0.0271 weta0 = 0.0000 + etab = 0.0004 letab = -0.0041 wetab = 0.0000 + n0 = 0.8032 ln0 = 0.1734 wn0 = 0.0000 + nd = 0.0105 lnd = -0.0091 wnd = 0.0000 + nb = 0.5978 lnb = -0.1638 wnb = 0.0000 + vof0 = 1.4977 lvof0 = -0.1766 wvof0 = 0.0000 + vofd = 0.1795 lvofd = -0.1247 wvofd = 0.0000 + vofb = 0.8368 lvofb = -0.3432 wvofb = 0.0000 + ai0 = 32.0150 lai0 = 8.2816 wai0 = 0.0000 + aib = -19.5396 laib = 4.9347 waib = 0.0000 + bi0 = 37.6044 lbi0 = -1.8713 wbi0 = 0.0000 + bib = -2.5109 lbib = 0.7903 wbib = 0.0000 + vghigh = 0.2342 lvghigh = -0.0007 wvghigh = 0.0000 + vglow = -0.1023 lvglow = 0.0038 wvglow = 0.0000 + tox = 0.0150 temp = 27 vdd = 5.0 vgg = 5.0 vbb = -3.0 + cgdo = 1.0e-10 cgso = 1.0e-10 cgbo = 2.5e-11 + xpart = 0 + rsh = 0 cj = 0.0002 cjsw = 1.0e-10 + js = 5e-5 pb = 0.7 pbsw = 0.8 + mj = 0.5 mjsw = 0.33 wdf = 0 + dell = 0 ***** ***** .END ngspice-26/tests/bsim2/Makefile.am0000644000265600020320000000037612264261473016451 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ test.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/bsim2/Makefile.in0000644000265600020320000003351612264261541016460 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/bsim2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ test.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/bsim2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/bsim2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/bsim2/test.out0000644000265600020320000015035612264261473016131 0ustar andreasadmin No. of Data Rows : 501 Circuit: Test of MOS BSIM2 implementation; DC transfer curve Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Test of MOS BSIM2 implementation; DC transfer curve -------------------------------------------------------------------------------- Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 0 0.000000e+00 1.259693e-13 2.302983e-12 4.496301e-12 1 1.000000e-02 1.302716e-13 2.302983e-12 4.496301e-12 2 2.000000e-02 1.373029e-13 2.302983e-12 4.496301e-12 3 3.000000e-02 1.456488e-13 2.302983e-12 4.496301e-12 4 4.000000e-02 1.565151e-13 2.302983e-12 4.496301e-12 5 5.000000e-02 1.706627e-13 2.302983e-12 4.496301e-12 6 6.000000e-02 1.890826e-13 2.302983e-12 4.496301e-12 7 7.000000e-02 2.130649e-13 2.302983e-12 4.496301e-12 8 8.000000e-02 2.442892e-13 2.302983e-12 4.496301e-12 9 9.000000e-02 2.849426e-13 2.302983e-12 4.496301e-12 10 1.000000e-01 3.378722e-13 2.302983e-12 4.496301e-12 11 1.100000e-01 4.067852e-13 2.302983e-12 4.496301e-12 12 1.200000e-01 4.965080e-13 2.302984e-12 4.496301e-12 13 1.300000e-01 6.133245e-13 2.302984e-12 4.496301e-12 14 1.400000e-01 7.654162e-13 2.302984e-12 4.496301e-12 15 1.500000e-01 9.634350e-13 2.302984e-12 4.496301e-12 16 1.600000e-01 1.221249e-12 2.302984e-12 4.496301e-12 17 1.700000e-01 1.556915e-12 2.302984e-12 4.496301e-12 18 1.800000e-01 1.993941e-12 2.302984e-12 4.496301e-12 19 1.900000e-01 2.562934e-12 2.302985e-12 4.496301e-12 20 2.000000e-01 3.303743e-12 2.302985e-12 4.496301e-12 21 2.100000e-01 4.268249e-12 2.302986e-12 4.496301e-12 22 2.200000e-01 5.524001e-12 2.302986e-12 4.496301e-12 23 2.300000e-01 7.158943e-12 2.302988e-12 4.496301e-12 24 2.400000e-01 9.287574e-12 2.302989e-12 4.496301e-12 25 2.500000e-01 1.205897e-11 2.302991e-12 4.496301e-12 26 2.600000e-01 1.566721e-11 2.302994e-12 4.496301e-12 27 2.700000e-01 2.036499e-11 2.302998e-12 4.496301e-12 28 2.800000e-01 2.648131e-11 2.303003e-12 4.496301e-12 29 2.900000e-01 3.444448e-11 2.303010e-12 4.496301e-12 30 3.000000e-01 4.481219e-11 2.303020e-12 4.496301e-12 31 3.100000e-01 5.831048e-11 2.303033e-12 4.496301e-12 32 3.200000e-01 7.588463e-11 2.303051e-12 4.496301e-12 33 3.300000e-01 9.876535e-11 2.303075e-12 4.496301e-12 34 3.400000e-01 1.285550e-10 2.303109e-12 4.496301e-12 35 3.500000e-01 1.673396e-10 2.303154e-12 4.496301e-12 36 3.600000e-01 2.178352e-10 2.303216e-12 4.496301e-12 37 3.700000e-01 2.835780e-10 2.303300e-12 4.496301e-12 38 3.800000e-01 3.691718e-10 2.303414e-12 4.496301e-12 39 3.900000e-01 4.806104e-10 2.303570e-12 4.496301e-12 40 4.000000e-01 6.256975e-10 2.303783e-12 4.496301e-12 41 4.100000e-01 8.145931e-10 2.304072e-12 4.496301e-12 42 4.200000e-01 1.060525e-09 2.304467e-12 4.496301e-12 43 4.300000e-01 1.380714e-09 2.305004e-12 4.496301e-12 44 4.400000e-01 1.797583e-09 2.305736e-12 4.496301e-12 45 4.500000e-01 2.340321e-09 2.306732e-12 4.496301e-12 46 4.600000e-01 3.046935e-09 2.308090e-12 4.496301e-12 47 4.700000e-01 3.966905e-09 2.309939e-12 4.496301e-12 48 4.800000e-01 5.164650e-09 2.312459e-12 4.496301e-12 49 4.900000e-01 6.724041e-09 2.315890e-12 4.496301e-12 50 5.000000e-01 8.754271e-09 2.320563e-12 4.496301e-12 51 5.100000e-01 1.139750e-08 2.326930e-12 4.496301e-12 52 5.200000e-01 1.483882e-08 2.335601e-12 4.496301e-12 53 5.300000e-01 1.931920e-08 2.347413e-12 4.496301e-12 54 5.400000e-01 2.515234e-08 2.363502e-12 4.496302e-12 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 55 5.500000e-01 3.274663e-08 2.385418e-12 4.496302e-12 56 5.600000e-01 4.263352e-08 2.415269e-12 4.496302e-12 57 5.700000e-01 5.550402e-08 2.455930e-12 4.496303e-12 58 5.800000e-01 7.225504e-08 2.511316e-12 4.496303e-12 59 5.900000e-01 9.404698e-08 2.586757e-12 4.496304e-12 60 6.000000e-01 1.223738e-07 2.689517e-12 4.496306e-12 61 6.100000e-01 1.572873e-07 2.829488e-12 4.496307e-12 62 6.200000e-01 2.002926e-07 3.020145e-12 4.496310e-12 63 6.300000e-01 2.517814e-07 3.279842e-12 4.496314e-12 64 6.400000e-01 3.126978e-07 3.633577e-12 4.496319e-12 65 6.500000e-01 3.839934e-07 4.115405e-12 4.496326e-12 66 6.600000e-01 4.666328e-07 4.771708e-12 4.496335e-12 67 6.700000e-01 5.616018e-07 5.665665e-12 4.496349e-12 68 6.800000e-01 6.699178e-07 6.883333e-12 4.496367e-12 69 6.900000e-01 7.926400e-07 8.541928e-12 4.496394e-12 70 7.000000e-01 9.308780e-07 1.080111e-11 4.496430e-12 71 7.100000e-01 1.085235e-06 1.387836e-11 4.496481e-12 72 7.200000e-01 1.247053e-06 1.806990e-11 4.496552e-12 73 7.300000e-01 1.412965e-06 2.377922e-11 4.496650e-12 74 7.400000e-01 1.582945e-06 3.155591e-11 4.496788e-12 75 7.500000e-01 1.757007e-06 4.214855e-11 4.496979e-12 76 7.600000e-01 1.935187e-06 5.657681e-11 4.497246e-12 77 7.700000e-01 2.117544e-06 7.622956e-11 4.497618e-12 78 7.800000e-01 2.304143e-06 1.029986e-10 4.498136e-12 79 7.900000e-01 2.495056e-06 1.394606e-10 4.498858e-12 80 8.000000e-01 2.690354e-06 1.891255e-10 4.499863e-12 81 8.100000e-01 2.890108e-06 2.567739e-10 4.501264e-12 82 8.200000e-01 3.094386e-06 3.489176e-10 4.503215e-12 83 8.300000e-01 3.303248e-06 4.744261e-10 4.505935e-12 84 8.400000e-01 3.516751e-06 6.453805e-10 4.509723e-12 85 8.500000e-01 3.734945e-06 8.782365e-10 4.515001e-12 86 8.600000e-01 3.957875e-06 1.195408e-09 4.522354e-12 87 8.700000e-01 4.185580e-06 1.627425e-09 4.532599e-12 88 8.800000e-01 4.418092e-06 2.215871e-09 4.546873e-12 89 8.900000e-01 4.655441e-06 3.017387e-09 4.566759e-12 90 9.000000e-01 4.897649e-06 4.109124e-09 4.594465e-12 91 9.100000e-01 5.144734e-06 5.596166e-09 4.633066e-12 92 9.200000e-01 5.396712e-06 7.621648e-09 4.686846e-12 93 9.300000e-01 5.653592e-06 1.038053e-08 4.761774e-12 94 9.400000e-01 5.914953e-06 1.413836e-08 4.866164e-12 95 9.500000e-01 6.176618e-06 1.925684e-08 5.011603e-12 96 9.600000e-01 6.437567e-06 2.622863e-08 5.214232e-12 97 9.700000e-01 6.697839e-06 3.566853e-08 5.496538e-12 98 9.800000e-01 6.957467e-06 4.908019e-08 5.889853e-12 99 9.900000e-01 7.216476e-06 6.804759e-08 6.437826e-12 100 1.000000e+00 7.474892e-06 9.402971e-08 7.201271e-12 101 1.010000e+00 7.732735e-06 1.286499e-07 8.264915e-12 102 1.020000e+00 7.990023e-06 1.736387e-07 9.746800e-12 103 1.030000e+00 8.246771e-06 2.307718e-07 1.181138e-11 104 1.040000e+00 8.502992e-06 3.018185e-07 1.468779e-11 105 1.050000e+00 8.758699e-06 3.885136e-07 1.869523e-11 106 1.060000e+00 9.013901e-06 4.925555e-07 2.427844e-11 107 1.070000e+00 9.268607e-06 6.156224e-07 3.205703e-11 108 1.080000e+00 9.522827e-06 7.593962e-07 4.289423e-11 109 1.090000e+00 9.776566e-06 9.255811e-07 5.799271e-11 110 1.100000e+00 1.002983e-05 1.112764e-06 7.902802e-11 111 1.110000e+00 1.028263e-05 1.306884e-06 1.083346e-10 112 1.120000e+00 1.053496e-05 1.505782e-06 1.491646e-10 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 113 1.130000e+00 1.078683e-05 1.709260e-06 2.060492e-10 114 1.140000e+00 1.103825e-05 1.917180e-06 2.853010e-10 115 1.150000e+00 1.128921e-05 2.129443e-06 3.957149e-10 116 1.160000e+00 1.153973e-05 2.345967e-06 5.495437e-10 117 1.170000e+00 1.178980e-05 2.566671e-06 7.638582e-10 118 1.180000e+00 1.203943e-05 2.791470e-06 1.062441e-09 119 1.190000e+00 1.228861e-05 3.020269e-06 1.478427e-09 120 1.200000e+00 1.253735e-05 3.252962e-06 2.057977e-09 121 1.210000e+00 1.278566e-05 3.489428e-06 2.865405e-09 122 1.220000e+00 1.303353e-05 3.729534e-06 3.990310e-09 123 1.230000e+00 1.328096e-05 3.973134e-06 5.557524e-09 124 1.240000e+00 1.352796e-05 4.220073e-06 7.740957e-09 125 1.250000e+00 1.377453e-05 4.470186e-06 1.078290e-08 126 1.260000e+00 1.402066e-05 4.723297e-06 1.521755e-08 127 1.270000e+00 1.426637e-05 4.979224e-06 2.273792e-08 128 1.280000e+00 1.451164e-05 5.237781e-06 3.475798e-08 129 1.290000e+00 1.475648e-05 5.498772e-06 5.292783e-08 130 1.300000e+00 1.500089e-05 5.762001e-06 7.919551e-08 131 1.310000e+00 1.524488e-05 6.026981e-06 1.157383e-07 132 1.320000e+00 1.548843e-05 6.291599e-06 1.648661e-07 133 1.330000e+00 1.573155e-05 6.555496e-06 2.289142e-07 134 1.340000e+00 1.597425e-05 6.818705e-06 3.101612e-07 135 1.350000e+00 1.621652e-05 7.081256e-06 4.107971e-07 136 1.360000e+00 1.645836e-05 7.343173e-06 5.329379e-07 137 1.370000e+00 1.669978e-05 7.604476e-06 6.786644e-07 138 1.380000e+00 1.694076e-05 7.865185e-06 8.500585e-07 139 1.390000e+00 1.718132e-05 8.125314e-06 1.048173e-06 140 1.400000e+00 1.742145e-05 8.384878e-06 1.257451e-06 141 1.410000e+00 1.766115e-05 8.643888e-06 1.471788e-06 142 1.420000e+00 1.790043e-05 8.902354e-06 1.690904e-06 143 1.430000e+00 1.813927e-05 9.160286e-06 1.914600e-06 144 1.440000e+00 1.837769e-05 9.417691e-06 2.142713e-06 145 1.450000e+00 1.861568e-05 9.674577e-06 2.375090e-06 146 1.460000e+00 1.885325e-05 9.930949e-06 2.611573e-06 147 1.470000e+00 1.909038e-05 1.018681e-05 2.851989e-06 148 1.480000e+00 1.932708e-05 1.044217e-05 3.096147e-06 149 1.490000e+00 1.956336e-05 1.069703e-05 3.343838e-06 150 1.500000e+00 1.979921e-05 1.095140e-05 3.594831e-06 151 1.510000e+00 2.003463e-05 1.120527e-05 3.848881e-06 152 1.520000e+00 2.026961e-05 1.145866e-05 4.105726e-06 153 1.530000e+00 2.050417e-05 1.171156e-05 4.365092e-06 154 1.540000e+00 2.073830e-05 1.196397e-05 4.626693e-06 155 1.550000e+00 2.097200e-05 1.221590e-05 4.890233e-06 156 1.560000e+00 2.120527e-05 1.246735e-05 5.155411e-06 157 1.570000e+00 2.143810e-05 1.271832e-05 5.421918e-06 158 1.580000e+00 2.167051e-05 1.296882e-05 5.689439e-06 159 1.590000e+00 2.190248e-05 1.321884e-05 5.957658e-06 160 1.600000e+00 2.213403e-05 1.346838e-05 6.225785e-06 161 1.610000e+00 2.236514e-05 1.371745e-05 6.493162e-06 162 1.620000e+00 2.259582e-05 1.396604e-05 6.759821e-06 163 1.630000e+00 2.282606e-05 1.421417e-05 7.025791e-06 164 1.640000e+00 2.305588e-05 1.446182e-05 7.291094e-06 165 1.650000e+00 2.328526e-05 1.470899e-05 7.555751e-06 166 1.660000e+00 2.351421e-05 1.495570e-05 7.819779e-06 167 1.670000e+00 2.374272e-05 1.520194e-05 8.083194e-06 168 1.680000e+00 2.397080e-05 1.544771e-05 8.346007e-06 169 1.690000e+00 2.419844e-05 1.569300e-05 8.608231e-06 170 1.700000e+00 2.442566e-05 1.593783e-05 8.869875e-06 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 171 1.710000e+00 2.465243e-05 1.618218e-05 9.130948e-06 172 1.720000e+00 2.487877e-05 1.642607e-05 9.391456e-06 173 1.730000e+00 2.510468e-05 1.666949e-05 9.651407e-06 174 1.740000e+00 2.533015e-05 1.691243e-05 9.910806e-06 175 1.750000e+00 2.555519e-05 1.715491e-05 1.016966e-05 176 1.760000e+00 2.577978e-05 1.739692e-05 1.042797e-05 177 1.770000e+00 2.600395e-05 1.763845e-05 1.068574e-05 178 1.780000e+00 2.622767e-05 1.787952e-05 1.094298e-05 179 1.790000e+00 2.645096e-05 1.812012e-05 1.119968e-05 180 1.800000e+00 2.667381e-05 1.836024e-05 1.145586e-05 181 1.810000e+00 2.689623e-05 1.859990e-05 1.171150e-05 182 1.820000e+00 2.711820e-05 1.883908e-05 1.196663e-05 183 1.830000e+00 2.733974e-05 1.907780e-05 1.222123e-05 184 1.840000e+00 2.756084e-05 1.931604e-05 1.247530e-05 185 1.850000e+00 2.778150e-05 1.955381e-05 1.272886e-05 186 1.860000e+00 2.800172e-05 1.979112e-05 1.298190e-05 187 1.870000e+00 2.822151e-05 2.002794e-05 1.323442e-05 188 1.880000e+00 2.844085e-05 2.026430e-05 1.348643e-05 189 1.890000e+00 2.865976e-05 2.050019e-05 1.373791e-05 190 1.900000e+00 2.887822e-05 2.073560e-05 1.398889e-05 191 1.910000e+00 2.909625e-05 2.097054e-05 1.423934e-05 192 1.920000e+00 2.931384e-05 2.120501e-05 1.448929e-05 193 1.930000e+00 2.953098e-05 2.143900e-05 1.473872e-05 194 1.940000e+00 2.974769e-05 2.167252e-05 1.498763e-05 195 1.950000e+00 2.996395e-05 2.190557e-05 1.523604e-05 196 1.960000e+00 3.017978e-05 2.213814e-05 1.548393e-05 197 1.970000e+00 3.039516e-05 2.237024e-05 1.573130e-05 198 1.980000e+00 3.061010e-05 2.260186e-05 1.597817e-05 199 1.990000e+00 3.082460e-05 2.283301e-05 1.622452e-05 200 2.000000e+00 3.103866e-05 2.306368e-05 1.647036e-05 201 2.010000e+00 3.125227e-05 2.329388e-05 1.671568e-05 202 2.020000e+00 3.146545e-05 2.352361e-05 1.696050e-05 203 2.030000e+00 3.167818e-05 2.375285e-05 1.720480e-05 204 2.040000e+00 3.189047e-05 2.398162e-05 1.744858e-05 205 2.050000e+00 3.210232e-05 2.420992e-05 1.769186e-05 206 2.060000e+00 3.231372e-05 2.443773e-05 1.793462e-05 207 2.070000e+00 3.252469e-05 2.466507e-05 1.817687e-05 208 2.080000e+00 3.273521e-05 2.489194e-05 1.841860e-05 209 2.090000e+00 3.294528e-05 2.511832e-05 1.865983e-05 210 2.100000e+00 3.315492e-05 2.534423e-05 1.890053e-05 211 2.110000e+00 3.336411e-05 2.556966e-05 1.914073e-05 212 2.120000e+00 3.357285e-05 2.579461e-05 1.938041e-05 213 2.130000e+00 3.378116e-05 2.601909e-05 1.961957e-05 214 2.140000e+00 3.398902e-05 2.624308e-05 1.985822e-05 215 2.150000e+00 3.419643e-05 2.646660e-05 2.009636e-05 216 2.160000e+00 3.440340e-05 2.668963e-05 2.033398e-05 217 2.170000e+00 3.460993e-05 2.691219e-05 2.057109e-05 218 2.180000e+00 3.481602e-05 2.713427e-05 2.080768e-05 219 2.190000e+00 3.502166e-05 2.735586e-05 2.104375e-05 220 2.200000e+00 3.522686e-05 2.757698e-05 2.127931e-05 221 2.210000e+00 3.543161e-05 2.779762e-05 2.151435e-05 222 2.220000e+00 3.563592e-05 2.801778e-05 2.174887e-05 223 2.230000e+00 3.583978e-05 2.823745e-05 2.198288e-05 224 2.240000e+00 3.604320e-05 2.845665e-05 2.221637e-05 225 2.250000e+00 3.624617e-05 2.867536e-05 2.244935e-05 226 2.260000e+00 3.644870e-05 2.889360e-05 2.268180e-05 227 2.270000e+00 3.665079e-05 2.911135e-05 2.291374e-05 228 2.280000e+00 3.685243e-05 2.932862e-05 2.314516e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 229 2.290000e+00 3.705363e-05 2.954541e-05 2.337607e-05 230 2.300000e+00 3.725438e-05 2.976172e-05 2.360645e-05 231 2.310000e+00 3.745469e-05 2.997754e-05 2.383632e-05 232 2.320000e+00 3.765455e-05 3.019289e-05 2.406566e-05 233 2.330000e+00 3.785397e-05 3.040775e-05 2.429449e-05 234 2.340000e+00 3.805295e-05 3.062213e-05 2.452280e-05 235 2.350000e+00 3.825148e-05 3.083603e-05 2.475058e-05 236 2.360000e+00 3.844956e-05 3.104944e-05 2.497785e-05 237 2.370000e+00 3.864720e-05 3.126237e-05 2.520460e-05 238 2.380000e+00 3.884440e-05 3.147482e-05 2.543083e-05 239 2.390000e+00 3.904115e-05 3.168679e-05 2.565654e-05 240 2.400000e+00 3.923746e-05 3.189827e-05 2.588172e-05 241 2.410000e+00 3.943332e-05 3.210927e-05 2.610639e-05 242 2.420000e+00 3.962874e-05 3.231979e-05 2.633053e-05 243 2.430000e+00 3.982371e-05 3.252982e-05 2.655416e-05 244 2.440000e+00 4.001824e-05 3.273937e-05 2.677726e-05 245 2.450000e+00 4.021233e-05 3.294844e-05 2.699984e-05 246 2.460000e+00 4.040597e-05 3.315703e-05 2.722190e-05 247 2.470000e+00 4.059916e-05 3.336513e-05 2.744344e-05 248 2.480000e+00 4.079192e-05 3.357274e-05 2.766445e-05 249 2.490000e+00 4.098422e-05 3.377988e-05 2.788495e-05 250 2.500000e+00 4.117609e-05 3.398653e-05 2.810492e-05 251 2.510000e+00 4.136751e-05 3.419270e-05 2.832437e-05 252 2.520000e+00 4.155849e-05 3.439838e-05 2.854330e-05 253 2.530000e+00 4.174902e-05 3.460358e-05 2.876170e-05 254 2.540000e+00 4.193911e-05 3.480830e-05 2.897958e-05 255 2.550000e+00 4.212876e-05 3.501253e-05 2.919694e-05 256 2.560000e+00 4.231796e-05 3.521628e-05 2.941378e-05 257 2.570000e+00 4.250672e-05 3.541955e-05 2.963009e-05 258 2.580000e+00 4.269503e-05 3.562233e-05 2.984588e-05 259 2.590000e+00 4.288291e-05 3.582463e-05 3.006115e-05 260 2.600000e+00 4.307034e-05 3.602645e-05 3.027590e-05 261 2.610000e+00 4.325733e-05 3.622778e-05 3.049012e-05 262 2.620000e+00 4.344387e-05 3.642863e-05 3.070382e-05 263 2.630000e+00 4.362997e-05 3.662899e-05 3.091699e-05 264 2.640000e+00 4.381563e-05 3.682888e-05 3.112964e-05 265 2.650000e+00 4.400085e-05 3.702828e-05 3.134177e-05 266 2.660000e+00 4.418563e-05 3.722719e-05 3.155338e-05 267 2.670000e+00 4.436996e-05 3.742563e-05 3.176446e-05 268 2.680000e+00 4.455385e-05 3.762358e-05 3.197502e-05 269 2.690000e+00 4.473731e-05 3.782105e-05 3.218506e-05 270 2.700000e+00 4.492031e-05 3.801803e-05 3.239457e-05 271 2.710000e+00 4.510288e-05 3.821454e-05 3.260356e-05 272 2.720000e+00 4.528501e-05 3.841056e-05 3.281202e-05 273 2.730000e+00 4.546670e-05 3.860609e-05 3.301997e-05 274 2.740000e+00 4.564794e-05 3.880115e-05 3.322739e-05 275 2.750000e+00 4.582875e-05 3.899572e-05 3.343429e-05 276 2.760000e+00 4.600911e-05 3.918982e-05 3.364066e-05 277 2.770000e+00 4.618904e-05 3.938343e-05 3.384651e-05 278 2.780000e+00 4.636852e-05 3.957655e-05 3.405184e-05 279 2.790000e+00 4.654757e-05 3.976920e-05 3.425665e-05 280 2.800000e+00 4.672618e-05 3.996137e-05 3.446093e-05 281 2.810000e+00 4.690434e-05 4.015305e-05 3.466469e-05 282 2.820000e+00 4.708207e-05 4.034425e-05 3.486793e-05 283 2.830000e+00 4.725936e-05 4.053497e-05 3.507065e-05 284 2.840000e+00 4.743621e-05 4.072521e-05 3.527284e-05 285 2.850000e+00 4.761262e-05 4.091498e-05 3.547451e-05 286 2.860000e+00 4.778860e-05 4.110426e-05 3.567566e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 287 2.870000e+00 4.796413e-05 4.129306e-05 3.587629e-05 288 2.880000e+00 4.813923e-05 4.148137e-05 3.607639e-05 289 2.890000e+00 4.831390e-05 4.166921e-05 3.627598e-05 290 2.900000e+00 4.848812e-05 4.185658e-05 3.647504e-05 291 2.910000e+00 4.866191e-05 4.204346e-05 3.667359e-05 292 2.920000e+00 4.883526e-05 4.222986e-05 3.687161e-05 293 2.930000e+00 4.900818e-05 4.241578e-05 3.706911e-05 294 2.940000e+00 4.918066e-05 4.260123e-05 3.726609e-05 295 2.950000e+00 4.935270e-05 4.278619e-05 3.746255e-05 296 2.960000e+00 4.952431e-05 4.297068e-05 3.765848e-05 297 2.970000e+00 4.969548e-05 4.315469e-05 3.785390e-05 298 2.980000e+00 4.986622e-05 4.333822e-05 3.804880e-05 299 2.990000e+00 5.003653e-05 4.352127e-05 3.824318e-05 300 3.000000e+00 5.020640e-05 4.370385e-05 3.843704e-05 301 3.010000e+00 5.037583e-05 4.388595e-05 3.863038e-05 302 3.020000e+00 5.054483e-05 4.406758e-05 3.882321e-05 303 3.030000e+00 5.071340e-05 4.424872e-05 3.901551e-05 304 3.040000e+00 5.088154e-05 4.442939e-05 3.920729e-05 305 3.050000e+00 5.104924e-05 4.460959e-05 3.939856e-05 306 3.060000e+00 5.121651e-05 4.478931e-05 3.958931e-05 307 3.070000e+00 5.138335e-05 4.496855e-05 3.977954e-05 308 3.080000e+00 5.154976e-05 4.514732e-05 3.996925e-05 309 3.090000e+00 5.171574e-05 4.532562e-05 4.015845e-05 310 3.100000e+00 5.188128e-05 4.550344e-05 4.034713e-05 311 3.110000e+00 5.204640e-05 4.568079e-05 4.053529e-05 312 3.120000e+00 5.221108e-05 4.585766e-05 4.072294e-05 313 3.130000e+00 5.237533e-05 4.603406e-05 4.091007e-05 314 3.140000e+00 5.253916e-05 4.620998e-05 4.109669e-05 315 3.150000e+00 5.270255e-05 4.638544e-05 4.128279e-05 316 3.160000e+00 5.286552e-05 4.656042e-05 4.146837e-05 317 3.170000e+00 5.302806e-05 4.673493e-05 4.165344e-05 318 3.180000e+00 5.319017e-05 4.690897e-05 4.183800e-05 319 3.190000e+00 5.335185e-05 4.708254e-05 4.202204e-05 320 3.200000e+00 5.351310e-05 4.725563e-05 4.220557e-05 321 3.210000e+00 5.367393e-05 4.742826e-05 4.238859e-05 322 3.220000e+00 5.383433e-05 4.760041e-05 4.257109e-05 323 3.230000e+00 5.399430e-05 4.777210e-05 4.275308e-05 324 3.240000e+00 5.415385e-05 4.794331e-05 4.293456e-05 325 3.250000e+00 5.431297e-05 4.811406e-05 4.311553e-05 326 3.260000e+00 5.447167e-05 4.828434e-05 4.329598e-05 327 3.270000e+00 5.462994e-05 4.845415e-05 4.347593e-05 328 3.280000e+00 5.478779e-05 4.862349e-05 4.365536e-05 329 3.290000e+00 5.494522e-05 4.879236e-05 4.383429e-05 330 3.300000e+00 5.510222e-05 4.896077e-05 4.401270e-05 331 3.310000e+00 5.525879e-05 4.912871e-05 4.419061e-05 332 3.320000e+00 5.541495e-05 4.929619e-05 4.436800e-05 333 3.330000e+00 5.557068e-05 4.946320e-05 4.454489e-05 334 3.340000e+00 5.572599e-05 4.962974e-05 4.472127e-05 335 3.350000e+00 5.588088e-05 4.979582e-05 4.489714e-05 336 3.360000e+00 5.603535e-05 4.996143e-05 4.507251e-05 337 3.370000e+00 5.618939e-05 5.012658e-05 4.524736e-05 338 3.380000e+00 5.634302e-05 5.029127e-05 4.542172e-05 339 3.390000e+00 5.649623e-05 5.045549e-05 4.559556e-05 340 3.400000e+00 5.664901e-05 5.061925e-05 4.576890e-05 341 3.410000e+00 5.680138e-05 5.078255e-05 4.594174e-05 342 3.420000e+00 5.695333e-05 5.094538e-05 4.611407e-05 343 3.430000e+00 5.710486e-05 5.110776e-05 4.628590e-05 344 3.440000e+00 5.725598e-05 5.126967e-05 4.645722e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 345 3.450000e+00 5.740667e-05 5.143112e-05 4.662804e-05 346 3.460000e+00 5.755695e-05 5.159211e-05 4.679836e-05 347 3.470000e+00 5.770682e-05 5.175265e-05 4.696818e-05 348 3.480000e+00 5.785626e-05 5.191272e-05 4.713749e-05 349 3.490000e+00 5.800530e-05 5.207234e-05 4.730631e-05 350 3.500000e+00 5.815391e-05 5.223149e-05 4.747462e-05 351 3.510000e+00 5.830212e-05 5.239019e-05 4.764243e-05 352 3.520000e+00 5.844991e-05 5.254843e-05 4.780975e-05 353 3.530000e+00 5.859728e-05 5.270622e-05 4.797657e-05 354 3.540000e+00 5.874424e-05 5.286355e-05 4.814288e-05 355 3.550000e+00 5.889079e-05 5.302042e-05 4.830870e-05 356 3.560000e+00 5.903693e-05 5.317684e-05 4.847402e-05 357 3.570000e+00 5.918266e-05 5.333281e-05 4.863885e-05 358 3.580000e+00 5.932797e-05 5.348832e-05 4.880318e-05 359 3.590000e+00 5.947288e-05 5.364337e-05 4.896701e-05 360 3.600000e+00 5.961737e-05 5.379798e-05 4.913035e-05 361 3.610000e+00 5.976146e-05 5.395213e-05 4.929320e-05 362 3.620000e+00 5.990513e-05 5.410582e-05 4.945555e-05 363 3.630000e+00 6.004840e-05 5.425907e-05 4.961740e-05 364 3.640000e+00 6.019126e-05 5.441187e-05 4.977877e-05 365 3.650000e+00 6.033371e-05 5.456421e-05 4.993964e-05 366 3.660000e+00 6.047575e-05 5.471611e-05 5.010002e-05 367 3.670000e+00 6.061739e-05 5.486755e-05 5.025991e-05 368 3.680000e+00 6.075862e-05 5.501855e-05 5.041931e-05 369 3.690000e+00 6.089944e-05 5.516910e-05 5.057821e-05 370 3.700000e+00 6.103986e-05 5.531920e-05 5.073663e-05 371 3.710000e+00 6.117988e-05 5.546886e-05 5.089456e-05 372 3.720000e+00 6.131949e-05 5.561806e-05 5.105201e-05 373 3.730000e+00 6.145870e-05 5.576683e-05 5.120896e-05 374 3.740000e+00 6.159750e-05 5.591514e-05 5.136543e-05 375 3.750000e+00 6.173590e-05 5.606301e-05 5.152141e-05 376 3.760000e+00 6.187390e-05 5.621044e-05 5.167691e-05 377 3.770000e+00 6.201150e-05 5.635742e-05 5.183192e-05 378 3.780000e+00 6.214869e-05 5.650396e-05 5.198645e-05 379 3.790000e+00 6.228549e-05 5.665006e-05 5.214049e-05 380 3.800000e+00 6.242189e-05 5.679571e-05 5.229405e-05 381 3.810000e+00 6.255788e-05 5.694093e-05 5.244713e-05 382 3.820000e+00 6.269348e-05 5.708570e-05 5.259973e-05 383 3.830000e+00 6.282868e-05 5.723003e-05 5.275184e-05 384 3.840000e+00 6.296348e-05 5.737393e-05 5.290348e-05 385 3.850000e+00 6.309789e-05 5.751738e-05 5.305463e-05 386 3.860000e+00 6.323190e-05 5.766039e-05 5.320531e-05 387 3.870000e+00 6.336551e-05 5.780297e-05 5.335551e-05 388 3.880000e+00 6.349872e-05 5.794511e-05 5.350523e-05 389 3.890000e+00 6.363154e-05 5.808681e-05 5.365447e-05 390 3.900000e+00 6.376397e-05 5.822808e-05 5.380324e-05 391 3.910000e+00 6.389600e-05 5.836891e-05 5.395153e-05 392 3.920000e+00 6.402764e-05 5.850931e-05 5.409934e-05 393 3.930000e+00 6.415889e-05 5.864927e-05 5.424668e-05 394 3.940000e+00 6.428974e-05 5.878880e-05 5.439355e-05 395 3.950000e+00 6.442020e-05 5.892790e-05 5.453994e-05 396 3.960000e+00 6.455027e-05 5.906656e-05 5.468586e-05 397 3.970000e+00 6.467995e-05 5.920479e-05 5.483131e-05 398 3.980000e+00 6.480924e-05 5.934259e-05 5.497629e-05 399 3.990000e+00 6.493815e-05 5.947996e-05 5.512080e-05 400 4.000000e+00 6.506666e-05 5.961690e-05 5.526484e-05 401 4.010000e+00 6.519478e-05 5.975342e-05 5.540841e-05 402 4.020000e+00 6.532252e-05 5.988950e-05 5.555151e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 403 4.030000e+00 6.544986e-05 6.002515e-05 5.569415e-05 404 4.040000e+00 6.557683e-05 6.016038e-05 5.583631e-05 405 4.050000e+00 6.570340e-05 6.029518e-05 5.597802e-05 406 4.060000e+00 6.582959e-05 6.042955e-05 5.611925e-05 407 4.070000e+00 6.595540e-05 6.056350e-05 5.626003e-05 408 4.080000e+00 6.608082e-05 6.069703e-05 5.640033e-05 409 4.090000e+00 6.620585e-05 6.083013e-05 5.654018e-05 410 4.100000e+00 6.633051e-05 6.096281e-05 5.667956e-05 411 4.110000e+00 6.645478e-05 6.109506e-05 5.681848e-05 412 4.120000e+00 6.657867e-05 6.122689e-05 5.695694e-05 413 4.130000e+00 6.670218e-05 6.135830e-05 5.709494e-05 414 4.140000e+00 6.682530e-05 6.148929e-05 5.723248e-05 415 4.150000e+00 6.694805e-05 6.161986e-05 5.736957e-05 416 4.160000e+00 6.707042e-05 6.175001e-05 5.750619e-05 417 4.170000e+00 6.719241e-05 6.187974e-05 5.764236e-05 418 4.180000e+00 6.731402e-05 6.200906e-05 5.777807e-05 419 4.190000e+00 6.743525e-05 6.213795e-05 5.791332e-05 420 4.200000e+00 6.755610e-05 6.226643e-05 5.804812e-05 421 4.210000e+00 6.767658e-05 6.239450e-05 5.818247e-05 422 4.220000e+00 6.779668e-05 6.252214e-05 5.831636e-05 423 4.230000e+00 6.791641e-05 6.264938e-05 5.844980e-05 424 4.240000e+00 6.803576e-05 6.277619e-05 5.858279e-05 425 4.250000e+00 6.815474e-05 6.290260e-05 5.871532e-05 426 4.260000e+00 6.827334e-05 6.302859e-05 5.884741e-05 427 4.270000e+00 6.839157e-05 6.315417e-05 5.897905e-05 428 4.280000e+00 6.850943e-05 6.327934e-05 5.911024e-05 429 4.290000e+00 6.862692e-05 6.340410e-05 5.924098e-05 430 4.300000e+00 6.874404e-05 6.352845e-05 5.937127e-05 431 4.310000e+00 6.886078e-05 6.365239e-05 5.950112e-05 432 4.320000e+00 6.897716e-05 6.377592e-05 5.963052e-05 433 4.330000e+00 6.909316e-05 6.389905e-05 5.975947e-05 434 4.340000e+00 6.920880e-05 6.402176e-05 5.988799e-05 435 4.350000e+00 6.932407e-05 6.414407e-05 6.001605e-05 436 4.360000e+00 6.943897e-05 6.426598e-05 6.014368e-05 437 4.370000e+00 6.955350e-05 6.438747e-05 6.027087e-05 438 4.380000e+00 6.966767e-05 6.450857e-05 6.039761e-05 439 4.390000e+00 6.978147e-05 6.462926e-05 6.052391e-05 440 4.400000e+00 6.989491e-05 6.474955e-05 6.064978e-05 441 4.410000e+00 7.000798e-05 6.486943e-05 6.077520e-05 442 4.420000e+00 7.012069e-05 6.498892e-05 6.090019e-05 443 4.430000e+00 7.023304e-05 6.510800e-05 6.102474e-05 444 4.440000e+00 7.034502e-05 6.522669e-05 6.114886e-05 445 4.450000e+00 7.045665e-05 6.534497e-05 6.127254e-05 446 4.460000e+00 7.056791e-05 6.546285e-05 6.139578e-05 447 4.470000e+00 7.067881e-05 6.558034e-05 6.151860e-05 448 4.480000e+00 7.078935e-05 6.569743e-05 6.164098e-05 449 4.490000e+00 7.089953e-05 6.581413e-05 6.176292e-05 450 4.500000e+00 7.100935e-05 6.593042e-05 6.188444e-05 451 4.510000e+00 7.111881e-05 6.604633e-05 6.200552e-05 452 4.520000e+00 7.122792e-05 6.616183e-05 6.212618e-05 453 4.530000e+00 7.133667e-05 6.627695e-05 6.224641e-05 454 4.540000e+00 7.144506e-05 6.639167e-05 6.236621e-05 455 4.550000e+00 7.155310e-05 6.650600e-05 6.248558e-05 456 4.560000e+00 7.166078e-05 6.661994e-05 6.260452e-05 457 4.570000e+00 7.176811e-05 6.673349e-05 6.272304e-05 458 4.580000e+00 7.187508e-05 6.684664e-05 6.284114e-05 459 4.590000e+00 7.198170e-05 6.695941e-05 6.295881e-05 460 4.600000e+00 7.208797e-05 6.707179e-05 6.307606e-05 Index v-sweep v1#branch v2#branch v3#branch -------------------------------------------------------------------------------- 461 4.610000e+00 7.219389e-05 6.718378e-05 6.319289e-05 462 4.620000e+00 7.229946e-05 6.729539e-05 6.330929e-05 463 4.630000e+00 7.240467e-05 6.740660e-05 6.342528e-05 464 4.640000e+00 7.250954e-05 6.751744e-05 6.354084e-05 465 4.650000e+00 7.261405e-05 6.762788e-05 6.365599e-05 466 4.660000e+00 7.271822e-05 6.773795e-05 6.377072e-05 467 4.670000e+00 7.282204e-05 6.784763e-05 6.388503e-05 468 4.680000e+00 7.292551e-05 6.795692e-05 6.399892e-05 469 4.690000e+00 7.302864e-05 6.806584e-05 6.411240e-05 470 4.700000e+00 7.313142e-05 6.817437e-05 6.422547e-05 471 4.710000e+00 7.323385e-05 6.828253e-05 6.433812e-05 472 4.720000e+00 7.333594e-05 6.839030e-05 6.445036e-05 473 4.730000e+00 7.343769e-05 6.849770e-05 6.456218e-05 474 4.740000e+00 7.353909e-05 6.860471e-05 6.467360e-05 475 4.750000e+00 7.364015e-05 6.871135e-05 6.478460e-05 476 4.760000e+00 7.374087e-05 6.881761e-05 6.489520e-05 477 4.770000e+00 7.384124e-05 6.892350e-05 6.500538e-05 478 4.780000e+00 7.394128e-05 6.902901e-05 6.511516e-05 479 4.790000e+00 7.404097e-05 6.913415e-05 6.522453e-05 480 4.800000e+00 7.414033e-05 6.923891e-05 6.533350e-05 481 4.810000e+00 7.423934e-05 6.934330e-05 6.544206e-05 482 4.820000e+00 7.433802e-05 6.944731e-05 6.555021e-05 483 4.830000e+00 7.443636e-05 6.955096e-05 6.565796e-05 484 4.840000e+00 7.453437e-05 6.965423e-05 6.576531e-05 485 4.850000e+00 7.463203e-05 6.975714e-05 6.587226e-05 486 4.860000e+00 7.472937e-05 6.985967e-05 6.597880e-05 487 4.870000e+00 7.482636e-05 6.996184e-05 6.608495e-05 488 4.880000e+00 7.492302e-05 7.006364e-05 6.619069e-05 489 4.890000e+00 7.501935e-05 7.016507e-05 6.629604e-05 490 4.900000e+00 7.511535e-05 7.026614e-05 6.640099e-05 491 4.910000e+00 7.521101e-05 7.036684e-05 6.650554e-05 492 4.920000e+00 7.530634e-05 7.046717e-05 6.660970e-05 493 4.930000e+00 7.540134e-05 7.056714e-05 6.671346e-05 494 4.940000e+00 7.549601e-05 7.066675e-05 6.681683e-05 495 4.950000e+00 7.559035e-05 7.076599e-05 6.691980e-05 496 4.960000e+00 7.568436e-05 7.086488e-05 6.702239e-05 497 4.970000e+00 7.577805e-05 7.096340e-05 6.712458e-05 498 4.980000e+00 7.587140e-05 7.106156e-05 6.722638e-05 499 4.990000e+00 7.596443e-05 7.115936e-05 6.732778e-05 500 5.000000e+00 7.605713e-05 7.125681e-05 6.742881e-05 Test of MOS BSIM2 implementation; DC transfer curve -------------------------------------------------------------------------------- Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 0 0.000000e+00 6.689618e-12 8.882936e-12 1 1.000000e-02 6.689618e-12 8.882936e-12 2 2.000000e-02 6.689618e-12 8.882936e-12 3 3.000000e-02 6.689618e-12 8.882936e-12 4 4.000000e-02 6.689618e-12 8.882936e-12 5 5.000000e-02 6.689618e-12 8.882936e-12 6 6.000000e-02 6.689618e-12 8.882936e-12 7 7.000000e-02 6.689618e-12 8.882936e-12 8 8.000000e-02 6.689618e-12 8.882936e-12 9 9.000000e-02 6.689618e-12 8.882936e-12 10 1.000000e-01 6.689618e-12 8.882936e-12 11 1.100000e-01 6.689618e-12 8.882936e-12 12 1.200000e-01 6.689618e-12 8.882936e-12 13 1.300000e-01 6.689618e-12 8.882936e-12 14 1.400000e-01 6.689618e-12 8.882936e-12 15 1.500000e-01 6.689618e-12 8.882936e-12 16 1.600000e-01 6.689618e-12 8.882936e-12 17 1.700000e-01 6.689618e-12 8.882936e-12 18 1.800000e-01 6.689618e-12 8.882936e-12 19 1.900000e-01 6.689618e-12 8.882936e-12 20 2.000000e-01 6.689618e-12 8.882936e-12 21 2.100000e-01 6.689618e-12 8.882936e-12 22 2.200000e-01 6.689618e-12 8.882936e-12 23 2.300000e-01 6.689618e-12 8.882936e-12 24 2.400000e-01 6.689618e-12 8.882936e-12 25 2.500000e-01 6.689618e-12 8.882936e-12 26 2.600000e-01 6.689618e-12 8.882936e-12 27 2.700000e-01 6.689618e-12 8.882936e-12 28 2.800000e-01 6.689618e-12 8.882936e-12 29 2.900000e-01 6.689618e-12 8.882936e-12 30 3.000000e-01 6.689618e-12 8.882936e-12 31 3.100000e-01 6.689618e-12 8.882936e-12 32 3.200000e-01 6.689618e-12 8.882936e-12 33 3.300000e-01 6.689618e-12 8.882936e-12 34 3.400000e-01 6.689618e-12 8.882936e-12 35 3.500000e-01 6.689618e-12 8.882936e-12 36 3.600000e-01 6.689618e-12 8.882936e-12 37 3.700000e-01 6.689618e-12 8.882936e-12 38 3.800000e-01 6.689618e-12 8.882936e-12 39 3.900000e-01 6.689618e-12 8.882936e-12 40 4.000000e-01 6.689618e-12 8.882936e-12 41 4.100000e-01 6.689618e-12 8.882936e-12 42 4.200000e-01 6.689618e-12 8.882936e-12 43 4.300000e-01 6.689618e-12 8.882936e-12 44 4.400000e-01 6.689618e-12 8.882936e-12 45 4.500000e-01 6.689618e-12 8.882936e-12 46 4.600000e-01 6.689618e-12 8.882936e-12 47 4.700000e-01 6.689618e-12 8.882936e-12 48 4.800000e-01 6.689618e-12 8.882936e-12 49 4.900000e-01 6.689618e-12 8.882936e-12 50 5.000000e-01 6.689618e-12 8.882936e-12 51 5.100000e-01 6.689618e-12 8.882936e-12 52 5.200000e-01 6.689618e-12 8.882936e-12 53 5.300000e-01 6.689618e-12 8.882936e-12 54 5.400000e-01 6.689618e-12 8.882936e-12 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 55 5.500000e-01 6.689618e-12 8.882936e-12 56 5.600000e-01 6.689618e-12 8.882936e-12 57 5.700000e-01 6.689618e-12 8.882936e-12 58 5.800000e-01 6.689618e-12 8.882936e-12 59 5.900000e-01 6.689618e-12 8.882936e-12 60 6.000000e-01 6.689618e-12 8.882936e-12 61 6.100000e-01 6.689618e-12 8.882936e-12 62 6.200000e-01 6.689618e-12 8.882936e-12 63 6.300000e-01 6.689618e-12 8.882936e-12 64 6.400000e-01 6.689618e-12 8.882936e-12 65 6.500000e-01 6.689618e-12 8.882936e-12 66 6.600000e-01 6.689618e-12 8.882936e-12 67 6.700000e-01 6.689618e-12 8.882936e-12 68 6.800000e-01 6.689618e-12 8.882936e-12 69 6.900000e-01 6.689618e-12 8.882936e-12 70 7.000000e-01 6.689618e-12 8.882936e-12 71 7.100000e-01 6.689618e-12 8.882936e-12 72 7.200000e-01 6.689618e-12 8.882936e-12 73 7.300000e-01 6.689618e-12 8.882936e-12 74 7.400000e-01 6.689618e-12 8.882936e-12 75 7.500000e-01 6.689618e-12 8.882936e-12 76 7.600000e-01 6.689618e-12 8.882936e-12 77 7.700000e-01 6.689618e-12 8.882936e-12 78 7.800000e-01 6.689618e-12 8.882936e-12 79 7.900000e-01 6.689618e-12 8.882936e-12 80 8.000000e-01 6.689619e-12 8.882936e-12 81 8.100000e-01 6.689619e-12 8.882936e-12 82 8.200000e-01 6.689619e-12 8.882936e-12 83 8.300000e-01 6.689619e-12 8.882936e-12 84 8.400000e-01 6.689619e-12 8.882936e-12 85 8.500000e-01 6.689619e-12 8.882936e-12 86 8.600000e-01 6.689620e-12 8.882936e-12 87 8.700000e-01 6.689620e-12 8.882936e-12 88 8.800000e-01 6.689621e-12 8.882936e-12 89 8.900000e-01 6.689622e-12 8.882936e-12 90 9.000000e-01 6.689623e-12 8.882936e-12 91 9.100000e-01 6.689625e-12 8.882936e-12 92 9.200000e-01 6.689628e-12 8.882936e-12 93 9.300000e-01 6.689632e-12 8.882936e-12 94 9.400000e-01 6.689638e-12 8.882936e-12 95 9.500000e-01 6.689645e-12 8.882936e-12 96 9.600000e-01 6.689657e-12 8.882936e-12 97 9.700000e-01 6.689672e-12 8.882936e-12 98 9.800000e-01 6.689695e-12 8.882936e-12 99 9.900000e-01 6.689726e-12 8.882936e-12 100 1.000000e+00 6.689771e-12 8.882936e-12 101 1.010000e+00 6.689834e-12 8.882936e-12 102 1.020000e+00 6.689923e-12 8.882936e-12 103 1.030000e+00 6.690049e-12 8.882936e-12 104 1.040000e+00 6.690228e-12 8.882936e-12 105 1.050000e+00 6.690479e-12 8.882936e-12 106 1.060000e+00 6.690836e-12 8.882936e-12 107 1.070000e+00 6.691339e-12 8.882936e-12 108 1.080000e+00 6.692051e-12 8.882936e-12 109 1.090000e+00 6.693057e-12 8.882936e-12 110 1.100000e+00 6.694479e-12 8.882936e-12 111 1.110000e+00 6.696489e-12 8.882937e-12 112 1.120000e+00 6.699330e-12 8.882937e-12 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 113 1.130000e+00 6.703347e-12 8.882937e-12 114 1.140000e+00 6.709025e-12 8.882938e-12 115 1.150000e+00 6.717052e-12 8.882939e-12 116 1.160000e+00 6.728398e-12 8.882940e-12 117 1.170000e+00 6.744437e-12 8.882942e-12 118 1.180000e+00 6.767109e-12 8.882945e-12 119 1.190000e+00 6.799158e-12 8.882949e-12 120 1.200000e+00 6.844462e-12 8.882954e-12 121 1.210000e+00 6.908502e-12 8.882962e-12 122 1.220000e+00 6.999028e-12 8.882973e-12 123 1.230000e+00 7.126995e-12 8.882989e-12 124 1.240000e+00 7.307885e-12 8.883012e-12 125 1.250000e+00 7.563586e-12 8.883045e-12 126 1.260000e+00 7.925040e-12 8.883091e-12 127 1.270000e+00 8.435983e-12 8.883158e-12 128 1.280000e+00 9.158237e-12 8.883253e-12 129 1.290000e+00 1.017920e-11 8.883389e-12 130 1.300000e+00 1.162240e-11 8.883583e-12 131 1.310000e+00 1.366246e-11 8.883861e-12 132 1.320000e+00 1.654624e-11 8.884257e-12 133 1.330000e+00 2.062265e-11 8.884823e-12 134 1.340000e+00 2.638494e-11 8.885632e-12 135 1.350000e+00 3.453032e-11 8.886787e-12 136 1.360000e+00 4.604436e-11 8.888436e-12 137 1.370000e+00 6.232020e-11 8.890793e-12 138 1.380000e+00 8.532715e-11 8.894159e-12 139 1.390000e+00 1.178489e-10 8.898967e-12 140 1.400000e+00 1.638205e-10 8.905834e-12 141 1.410000e+00 2.288041e-10 8.915644e-12 142 1.420000e+00 3.206624e-10 8.929657e-12 143 1.430000e+00 4.505095e-10 8.949673e-12 144 1.440000e+00 6.340561e-10 8.978263e-12 145 1.450000e+00 8.935097e-10 9.019102e-12 146 1.460000e+00 1.260262e-09 9.077437e-12 147 1.470000e+00 1.778687e-09 9.160762e-12 148 1.480000e+00 2.511509e-09 9.279784e-12 149 1.490000e+00 3.547393e-09 9.449795e-12 150 1.500000e+00 5.018149e-09 9.692639e-12 151 1.510000e+00 7.859680e-09 1.003952e-11 152 1.520000e+00 1.340846e-08 1.053500e-11 153 1.530000e+00 2.310073e-08 1.124274e-11 154 1.540000e+00 3.879507e-08 1.225367e-11 155 1.550000e+00 6.271747e-08 1.369768e-11 156 1.560000e+00 9.738410e-08 1.576030e-11 157 1.570000e+00 1.454822e-07 1.870653e-11 158 1.580000e+00 2.097272e-07 2.291491e-11 159 1.590000e+00 2.927514e-07 2.892611e-11 160 1.600000e+00 3.970654e-07 3.751245e-11 161 1.610000e+00 5.250868e-07 4.977709e-11 162 1.620000e+00 6.791951e-07 6.729574e-11 163 1.630000e+00 8.617770e-07 9.231917e-11 164 1.640000e+00 1.072315e-06 1.280623e-10 165 1.650000e+00 1.292128e-06 1.791172e-10 166 1.660000e+00 1.517161e-06 2.520433e-10 167 1.670000e+00 1.747136e-06 3.562097e-10 168 1.680000e+00 1.981831e-06 5.049991e-10 169 1.690000e+00 2.221045e-06 7.175271e-10 170 1.700000e+00 2.464572e-06 1.021098e-09 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 171 1.710000e+00 2.712188e-06 1.454712e-09 172 1.720000e+00 2.963647e-06 2.088159e-09 173 1.730000e+00 3.218677e-06 3.656526e-09 174 1.740000e+00 3.476985e-06 7.254985e-09 175 1.750000e+00 3.738257e-06 1.428567e-08 176 1.760000e+00 4.002161e-06 2.663718e-08 177 1.770000e+00 4.268348e-06 4.662594e-08 178 1.780000e+00 4.536460e-06 7.692251e-08 179 1.790000e+00 4.806126e-06 1.204321e-07 180 1.800000e+00 5.076967e-06 1.801301e-07 181 1.810000e+00 5.348601e-06 2.589179e-07 182 1.820000e+00 5.620636e-06 3.595650e-07 183 1.830000e+00 5.892680e-06 4.847378e-07 184 1.840000e+00 6.164321e-06 6.370655e-07 185 1.850000e+00 6.435219e-06 8.191936e-07 186 1.860000e+00 6.705372e-06 1.032161e-06 187 1.870000e+00 6.974807e-06 1.257083e-06 188 1.880000e+00 7.243544e-06 1.487569e-06 189 1.890000e+00 7.511603e-06 1.723318e-06 190 1.900000e+00 7.779001e-06 1.964079e-06 191 1.910000e+00 8.045750e-06 2.209610e-06 192 1.920000e+00 8.311864e-06 2.459658e-06 193 1.930000e+00 8.577353e-06 2.713944e-06 194 1.940000e+00 8.842225e-06 2.972165e-06 195 1.950000e+00 9.106489e-06 3.233988e-06 196 1.960000e+00 9.370151e-06 3.499058e-06 197 1.970000e+00 9.633217e-06 3.767000e-06 198 1.980000e+00 9.895692e-06 4.037419e-06 199 1.990000e+00 1.015758e-05 4.309908e-06 200 2.000000e+00 1.041889e-05 4.584046e-06 201 2.010000e+00 1.067962e-05 4.859404e-06 202 2.020000e+00 1.093977e-05 5.135547e-06 203 2.030000e+00 1.119935e-05 5.412034e-06 204 2.040000e+00 1.145836e-05 5.688419e-06 205 2.050000e+00 1.171680e-05 5.964256e-06 206 2.060000e+00 1.197468e-05 6.239176e-06 207 2.070000e+00 1.223199e-05 6.513283e-06 208 2.080000e+00 1.248873e-05 6.786629e-06 209 2.090000e+00 1.274492e-05 7.059239e-06 210 2.100000e+00 1.300054e-05 7.331131e-06 211 2.110000e+00 1.325560e-05 7.602321e-06 212 2.120000e+00 1.351010e-05 7.872823e-06 213 2.130000e+00 1.376404e-05 8.142648e-06 214 2.140000e+00 1.401743e-05 8.411807e-06 215 2.150000e+00 1.427026e-05 8.680308e-06 216 2.160000e+00 1.452252e-05 8.948160e-06 217 2.170000e+00 1.477424e-05 9.215368e-06 218 2.180000e+00 1.502539e-05 9.481939e-06 219 2.190000e+00 1.527599e-05 9.747877e-06 220 2.200000e+00 1.552603e-05 1.001319e-05 221 2.210000e+00 1.577551e-05 1.027787e-05 222 2.220000e+00 1.602444e-05 1.054193e-05 223 2.230000e+00 1.627281e-05 1.080538e-05 224 2.240000e+00 1.652063e-05 1.106821e-05 225 2.250000e+00 1.676789e-05 1.133042e-05 226 2.260000e+00 1.701459e-05 1.159203e-05 227 2.270000e+00 1.726074e-05 1.185302e-05 228 2.280000e+00 1.750632e-05 1.211340e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 229 2.290000e+00 1.775136e-05 1.237318e-05 230 2.300000e+00 1.799583e-05 1.263235e-05 231 2.310000e+00 1.823975e-05 1.289092e-05 232 2.320000e+00 1.848311e-05 1.314888e-05 233 2.330000e+00 1.872591e-05 1.340623e-05 234 2.340000e+00 1.896816e-05 1.366299e-05 235 2.350000e+00 1.920984e-05 1.391914e-05 236 2.360000e+00 1.945097e-05 1.417468e-05 237 2.370000e+00 1.969154e-05 1.442963e-05 238 2.380000e+00 1.993155e-05 1.468397e-05 239 2.390000e+00 2.017100e-05 1.493771e-05 240 2.400000e+00 2.040990e-05 1.519085e-05 241 2.410000e+00 2.064823e-05 1.544339e-05 242 2.420000e+00 2.088601e-05 1.569533e-05 243 2.430000e+00 2.112322e-05 1.594666e-05 244 2.440000e+00 2.135988e-05 1.619740e-05 245 2.450000e+00 2.159597e-05 1.644753e-05 246 2.460000e+00 2.183151e-05 1.669706e-05 247 2.470000e+00 2.206648e-05 1.694599e-05 248 2.480000e+00 2.230090e-05 1.719432e-05 249 2.490000e+00 2.253475e-05 1.744204e-05 250 2.500000e+00 2.276804e-05 1.768917e-05 251 2.510000e+00 2.300077e-05 1.793569e-05 252 2.520000e+00 2.323294e-05 1.818161e-05 253 2.530000e+00 2.346455e-05 1.842692e-05 254 2.540000e+00 2.369559e-05 1.867164e-05 255 2.550000e+00 2.392607e-05 1.891575e-05 256 2.560000e+00 2.415599e-05 1.915926e-05 257 2.570000e+00 2.438535e-05 1.940216e-05 258 2.580000e+00 2.461415e-05 1.964447e-05 259 2.590000e+00 2.484238e-05 1.988616e-05 260 2.600000e+00 2.507005e-05 2.012726e-05 261 2.610000e+00 2.529716e-05 2.036775e-05 262 2.620000e+00 2.552370e-05 2.060764e-05 263 2.630000e+00 2.574968e-05 2.084692e-05 264 2.640000e+00 2.597510e-05 2.108560e-05 265 2.650000e+00 2.619995e-05 2.132367e-05 266 2.660000e+00 2.642424e-05 2.156114e-05 267 2.670000e+00 2.664797e-05 2.179800e-05 268 2.680000e+00 2.687113e-05 2.203426e-05 269 2.690000e+00 2.709373e-05 2.226991e-05 270 2.700000e+00 2.731576e-05 2.250496e-05 271 2.710000e+00 2.753723e-05 2.273940e-05 272 2.720000e+00 2.775814e-05 2.297324e-05 273 2.730000e+00 2.797848e-05 2.320647e-05 274 2.740000e+00 2.819826e-05 2.343909e-05 275 2.750000e+00 2.841748e-05 2.367111e-05 276 2.760000e+00 2.863613e-05 2.390253e-05 277 2.770000e+00 2.885421e-05 2.413333e-05 278 2.780000e+00 2.907173e-05 2.436353e-05 279 2.790000e+00 2.928869e-05 2.459312e-05 280 2.800000e+00 2.950508e-05 2.482211e-05 281 2.810000e+00 2.972091e-05 2.505049e-05 282 2.820000e+00 2.993618e-05 2.527826e-05 283 2.830000e+00 3.015088e-05 2.550543e-05 284 2.840000e+00 3.036501e-05 2.573199e-05 285 2.850000e+00 3.057859e-05 2.595794e-05 286 2.860000e+00 3.079160e-05 2.618328e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 287 2.870000e+00 3.100404e-05 2.640802e-05 288 2.880000e+00 3.121592e-05 2.663215e-05 289 2.890000e+00 3.142724e-05 2.685568e-05 290 2.900000e+00 3.163799e-05 2.707860e-05 291 2.910000e+00 3.184818e-05 2.730091e-05 292 2.920000e+00 3.205781e-05 2.752261e-05 293 2.930000e+00 3.226687e-05 2.774371e-05 294 2.940000e+00 3.247537e-05 2.796420e-05 295 2.950000e+00 3.268331e-05 2.818408e-05 296 2.960000e+00 3.289068e-05 2.840336e-05 297 2.970000e+00 3.309750e-05 2.862203e-05 298 2.980000e+00 3.330374e-05 2.884009e-05 299 2.990000e+00 3.350943e-05 2.905755e-05 300 3.000000e+00 3.371456e-05 2.927440e-05 301 3.010000e+00 3.391912e-05 2.949065e-05 302 3.020000e+00 3.412312e-05 2.970629e-05 303 3.030000e+00 3.432656e-05 2.992132e-05 304 3.040000e+00 3.452943e-05 3.013575e-05 305 3.050000e+00 3.473175e-05 3.034957e-05 306 3.060000e+00 3.493351e-05 3.056279e-05 307 3.070000e+00 3.513470e-05 3.077540e-05 308 3.080000e+00 3.533533e-05 3.098741e-05 309 3.090000e+00 3.553541e-05 3.119881e-05 310 3.100000e+00 3.573492e-05 3.140960e-05 311 3.110000e+00 3.593388e-05 3.161980e-05 312 3.120000e+00 3.613227e-05 3.182938e-05 313 3.130000e+00 3.633011e-05 3.203837e-05 314 3.140000e+00 3.652738e-05 3.224675e-05 315 3.150000e+00 3.672410e-05 3.245453e-05 316 3.160000e+00 3.692026e-05 3.266170e-05 317 3.170000e+00 3.711586e-05 3.286827e-05 318 3.180000e+00 3.731090e-05 3.307424e-05 319 3.190000e+00 3.750539e-05 3.327960e-05 320 3.200000e+00 3.769932e-05 3.348437e-05 321 3.210000e+00 3.789269e-05 3.368853e-05 322 3.220000e+00 3.808551e-05 3.389209e-05 323 3.230000e+00 3.827777e-05 3.409505e-05 324 3.240000e+00 3.846948e-05 3.429740e-05 325 3.250000e+00 3.866062e-05 3.449916e-05 326 3.260000e+00 3.885122e-05 3.470032e-05 327 3.270000e+00 3.904126e-05 3.490088e-05 328 3.280000e+00 3.923075e-05 3.510083e-05 329 3.290000e+00 3.941968e-05 3.530019e-05 330 3.300000e+00 3.960806e-05 3.549895e-05 331 3.310000e+00 3.979588e-05 3.569711e-05 332 3.320000e+00 3.998316e-05 3.589468e-05 333 3.330000e+00 4.016988e-05 3.609164e-05 334 3.340000e+00 4.035605e-05 3.628801e-05 335 3.350000e+00 4.054167e-05 3.648379e-05 336 3.360000e+00 4.072674e-05 3.667896e-05 337 3.370000e+00 4.091126e-05 3.687354e-05 338 3.380000e+00 4.109523e-05 3.706753e-05 339 3.390000e+00 4.127865e-05 3.726092e-05 340 3.400000e+00 4.146152e-05 3.745372e-05 341 3.410000e+00 4.164384e-05 3.764592e-05 342 3.420000e+00 4.182561e-05 3.783753e-05 343 3.430000e+00 4.200684e-05 3.802854e-05 344 3.440000e+00 4.218752e-05 3.821897e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 345 3.450000e+00 4.236765e-05 3.840880e-05 346 3.460000e+00 4.254724e-05 3.859804e-05 347 3.470000e+00 4.272628e-05 3.878669e-05 348 3.480000e+00 4.290478e-05 3.897475e-05 349 3.490000e+00 4.308273e-05 3.916222e-05 350 3.500000e+00 4.326014e-05 3.934910e-05 351 3.510000e+00 4.343701e-05 3.953539e-05 352 3.520000e+00 4.361333e-05 3.972109e-05 353 3.530000e+00 4.378911e-05 3.990621e-05 354 3.540000e+00 4.396435e-05 4.009074e-05 355 3.550000e+00 4.413905e-05 4.027468e-05 356 3.560000e+00 4.431321e-05 4.045804e-05 357 3.570000e+00 4.448683e-05 4.064081e-05 358 3.580000e+00 4.465991e-05 4.082300e-05 359 3.590000e+00 4.483245e-05 4.100460e-05 360 3.600000e+00 4.500445e-05 4.118562e-05 361 3.610000e+00 4.517592e-05 4.136606e-05 362 3.620000e+00 4.534685e-05 4.154591e-05 363 3.630000e+00 4.551724e-05 4.172518e-05 364 3.640000e+00 4.568710e-05 4.190388e-05 365 3.650000e+00 4.585642e-05 4.208199e-05 366 3.660000e+00 4.602520e-05 4.225952e-05 367 3.670000e+00 4.619346e-05 4.243648e-05 368 3.680000e+00 4.636118e-05 4.261285e-05 369 3.690000e+00 4.652837e-05 4.278865e-05 370 3.700000e+00 4.669502e-05 4.296387e-05 371 3.710000e+00 4.686115e-05 4.313852e-05 372 3.720000e+00 4.702674e-05 4.331259e-05 373 3.730000e+00 4.719180e-05 4.348608e-05 374 3.740000e+00 4.735634e-05 4.365900e-05 375 3.750000e+00 4.752035e-05 4.383135e-05 376 3.760000e+00 4.768382e-05 4.400313e-05 377 3.770000e+00 4.784678e-05 4.417433e-05 378 3.780000e+00 4.800920e-05 4.434497e-05 379 3.790000e+00 4.817110e-05 4.451503e-05 380 3.800000e+00 4.833247e-05 4.468452e-05 381 3.810000e+00 4.849332e-05 4.485345e-05 382 3.820000e+00 4.865365e-05 4.502180e-05 383 3.830000e+00 4.881345e-05 4.518959e-05 384 3.840000e+00 4.897274e-05 4.535681e-05 385 3.850000e+00 4.913149e-05 4.552347e-05 386 3.860000e+00 4.928973e-05 4.568956e-05 387 3.870000e+00 4.944745e-05 4.585509e-05 388 3.880000e+00 4.960465e-05 4.602005e-05 389 3.890000e+00 4.976133e-05 4.618446e-05 390 3.900000e+00 4.991749e-05 4.634830e-05 391 3.910000e+00 5.007314e-05 4.651157e-05 392 3.920000e+00 5.022827e-05 4.667429e-05 393 3.930000e+00 5.038288e-05 4.683645e-05 394 3.940000e+00 5.053698e-05 4.699805e-05 395 3.950000e+00 5.069057e-05 4.715910e-05 396 3.960000e+00 5.084364e-05 4.731958e-05 397 3.970000e+00 5.099620e-05 4.747952e-05 398 3.980000e+00 5.114824e-05 4.763889e-05 399 3.990000e+00 5.129978e-05 4.779771e-05 400 4.000000e+00 5.145080e-05 4.795598e-05 401 4.010000e+00 5.160132e-05 4.811370e-05 402 4.020000e+00 5.175133e-05 4.827086e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 403 4.030000e+00 5.190083e-05 4.842747e-05 404 4.040000e+00 5.204982e-05 4.858354e-05 405 4.050000e+00 5.219831e-05 4.873905e-05 406 4.060000e+00 5.234629e-05 4.889402e-05 407 4.070000e+00 5.249376e-05 4.904843e-05 408 4.080000e+00 5.264074e-05 4.920231e-05 409 4.090000e+00 5.278721e-05 4.935563e-05 410 4.100000e+00 5.293317e-05 4.950841e-05 411 4.110000e+00 5.307864e-05 4.966065e-05 412 4.120000e+00 5.322360e-05 4.981235e-05 413 4.130000e+00 5.336807e-05 4.996350e-05 414 4.140000e+00 5.351203e-05 5.011411e-05 415 4.150000e+00 5.365550e-05 5.026419e-05 416 4.160000e+00 5.379847e-05 5.041372e-05 417 4.170000e+00 5.394095e-05 5.056271e-05 418 4.180000e+00 5.408293e-05 5.071117e-05 419 4.190000e+00 5.422441e-05 5.085909e-05 420 4.200000e+00 5.436540e-05 5.100648e-05 421 4.210000e+00 5.450590e-05 5.115333e-05 422 4.220000e+00 5.464590e-05 5.129965e-05 423 4.230000e+00 5.478542e-05 5.144544e-05 424 4.240000e+00 5.492444e-05 5.159069e-05 425 4.250000e+00 5.506297e-05 5.173541e-05 426 4.260000e+00 5.520102e-05 5.187961e-05 427 4.270000e+00 5.533858e-05 5.202327e-05 428 4.280000e+00 5.547565e-05 5.216641e-05 429 4.290000e+00 5.561223e-05 5.230902e-05 430 4.300000e+00 5.574833e-05 5.245110e-05 431 4.310000e+00 5.588394e-05 5.259266e-05 432 4.320000e+00 5.601907e-05 5.273370e-05 433 4.330000e+00 5.615372e-05 5.287421e-05 434 4.340000e+00 5.628789e-05 5.301420e-05 435 4.350000e+00 5.642157e-05 5.315368e-05 436 4.360000e+00 5.655478e-05 5.329263e-05 437 4.370000e+00 5.668751e-05 5.343106e-05 438 4.380000e+00 5.681975e-05 5.356897e-05 439 4.390000e+00 5.695153e-05 5.370637e-05 440 4.400000e+00 5.708282e-05 5.384325e-05 441 4.410000e+00 5.721364e-05 5.397962e-05 442 4.420000e+00 5.734398e-05 5.411547e-05 443 4.430000e+00 5.747385e-05 5.425081e-05 444 4.440000e+00 5.760325e-05 5.438563e-05 445 4.450000e+00 5.773218e-05 5.451995e-05 446 4.460000e+00 5.786064e-05 5.465376e-05 447 4.470000e+00 5.798862e-05 5.478706e-05 448 4.480000e+00 5.811614e-05 5.491985e-05 449 4.490000e+00 5.824318e-05 5.505213e-05 450 4.500000e+00 5.836977e-05 5.518391e-05 451 4.510000e+00 5.849588e-05 5.531518e-05 452 4.520000e+00 5.862153e-05 5.544595e-05 453 4.530000e+00 5.874671e-05 5.557622e-05 454 4.540000e+00 5.887144e-05 5.570599e-05 455 4.550000e+00 5.899569e-05 5.583525e-05 456 4.560000e+00 5.911949e-05 5.596402e-05 457 4.570000e+00 5.924283e-05 5.609228e-05 458 4.580000e+00 5.936570e-05 5.622005e-05 459 4.590000e+00 5.948812e-05 5.634733e-05 460 4.600000e+00 5.961008e-05 5.647411e-05 Index v-sweep v4#branch v5#branch -------------------------------------------------------------------------------- 461 4.610000e+00 5.973158e-05 5.660039e-05 462 4.620000e+00 5.985263e-05 5.672618e-05 463 4.630000e+00 5.997322e-05 5.685148e-05 464 4.640000e+00 6.009335e-05 5.697629e-05 465 4.650000e+00 6.021304e-05 5.710061e-05 466 4.660000e+00 6.033227e-05 5.722443e-05 467 4.670000e+00 6.045105e-05 5.734778e-05 468 4.680000e+00 6.056938e-05 5.747063e-05 469 4.690000e+00 6.068726e-05 5.759300e-05 470 4.700000e+00 6.080469e-05 5.771488e-05 471 4.710000e+00 6.092167e-05 5.783628e-05 472 4.720000e+00 6.103821e-05 5.795720e-05 473 4.730000e+00 6.115430e-05 5.807764e-05 474 4.740000e+00 6.126995e-05 5.819759e-05 475 4.750000e+00 6.138515e-05 5.831707e-05 476 4.760000e+00 6.149991e-05 5.843607e-05 477 4.770000e+00 6.161423e-05 5.855459e-05 478 4.780000e+00 6.172811e-05 5.867263e-05 479 4.790000e+00 6.184154e-05 5.879021e-05 480 4.800000e+00 6.195454e-05 5.890730e-05 481 4.810000e+00 6.206710e-05 5.902393e-05 482 4.820000e+00 6.217923e-05 5.914008e-05 483 4.830000e+00 6.229091e-05 5.925576e-05 484 4.840000e+00 6.240217e-05 5.937097e-05 485 4.850000e+00 6.251298e-05 5.948571e-05 486 4.860000e+00 6.262337e-05 5.959999e-05 487 4.870000e+00 6.273332e-05 5.971380e-05 488 4.880000e+00 6.284284e-05 5.982714e-05 489 4.890000e+00 6.295194e-05 5.994002e-05 490 4.900000e+00 6.306060e-05 6.005244e-05 491 4.910000e+00 6.316883e-05 6.016440e-05 492 4.920000e+00 6.327664e-05 6.027589e-05 493 4.930000e+00 6.338402e-05 6.038693e-05 494 4.940000e+00 6.349097e-05 6.049750e-05 495 4.950000e+00 6.359750e-05 6.060762e-05 496 4.960000e+00 6.370361e-05 6.071728e-05 497 4.970000e+00 6.380929e-05 6.082649e-05 498 4.980000e+00 6.391455e-05 6.093524e-05 499 4.990000e+00 6.401940e-05 6.104354e-05 500 5.000000e+00 6.412382e-05 6.115139e-05 ngspice-26/tests/bin/0000755000265600020320000000000012264261473014143 5ustar andreasadminngspice-26/tests/bin/modelQaTestRoutines.pm0000644000265600020320000006616512264261473020472 0ustar andreasadmin # # perl module with subroutines used as part of compact model QA (runQaTests.pl) # # # Rel Date Who Comments # ==== ========== ============= ======== # 1.2 06/30/06 Colin McAndrew Floating node support added # Noise simulation added # Other general cleanup # 1.0 04/13/06 Colin McAndrew Initial version # package modelQa; #use strict; # hirearchical read cannot be done while "strict refs" is in use # # This subroutine processes the generic (not test specific) setup information. # It sets the information in global variables. # sub processSetup { my(@Setup)=@_; my(@Field,$pin,$temperature); undef(%main::isLinearScale); undef(%main::isAreaScale); undef(%main::DefaultTemperature); $main::doMfactorTest=0; $main::doScaleTest =0; $main::doShrinkTest =0; $main::doPinFlipTest=0; $main::doPNFlipTest =0; @main::Pin=(); foreach (@Setup) { @Field=split(/[\s,]+/,$_); if (s/^keyLetter\s+//i) { if ($_ !~ /^[a-zA-Z]$/) { die("ERROR: bad keyLetter specification, stopped"); } $main::keyLetter=$_; next; } if (s/^verilogaFile\s+//i) { $main::verilogaFile=$_; if (! -f $main::verilogaFile) { die("ERROR: cannot find file $main::verilogaFile, stopped"); } next; } if (s/^(pins|terminals)\s+//i) { push(@main::Pin,@Field[1..$#Field]); foreach $pin (@main::Pin) { $main::isPin{$pin}=1; if ($pin !~ /^[a-zA-Z][a-zA-Z0-9]*$/) { # underscores are not allowed die("ERROR: bad pin name specification $pin, stopped"); } } next; } if (/^symmetric(Pins|Terminals)/i) { if ($#Field != 2) { die("ERROR: bad symmetricPins specification, stopped"); } $main::isSymmetryPin{$Field[1]}=1; $main::isSymmetryPin{$Field[2]}=1; $main::flipPin{$Field[1]}=$Field[2]; $main::flipPin{$Field[2]}=$Field[1]; $main::doPinFlipTest=1; next; } if (s/^pTypeSelectionArguments\s+//i) { s/\s*=\s*/=/g; $main::pTypeSelectionArguments=$_; next; } if (s/^(nType|type|model)SelectionArguments\s+//i) { s/\s*=\s*/=/g; $main::nTypeSelectionArguments=$_; next; } if (/^checkPolarity/i) { if ($#Field<1 || ($Field[1] !~ /^[yn01]/i)) { die("ERROR: bad checkPolarity specification, stopped"); } if ($Field[1] =~ /^[y1]/i) { $main::doPNFlipTest=1; } else { $main::doPNFlipTest=0; } next; } if (/^scaleParameters/i) { foreach (@Field[1..$#Field]) { if (/^m$/i) {$main::doMfactorTest=1} if (/^scale$/i) {$main::doScaleTest =1} if (/^shrink$/i) {$main::doShrinkTest =1} } next; } if (/^linearScale/i) { foreach (@Field[1..$#Field]) { $main::isLinearScale{$_}=1; } next; } if (/^areaScale/i) { foreach (@Field[1..$#Field]) { $main::isAreaScale{$_}=1; } next; } if (/^temperature/i) { push(@main::DefaultTemperature,@Field[1..$#Field]); next; } if (/^float/i) { foreach (@Field[1..$#Field]) { $main::isGeneralFloatingPin{$_}=1; } next; } die("ERROR: unknown setup directive $Field[0], stopped"); } if ($#main::Pin < 1) { die("ERROR: there must be two or more device pins, stopped"); } foreach $pin (keys(%main::isSymmetryPin)) { if (!$main::isPin{$pin}) { die("ERROR: symmetry pin $pin is not a specified device pin, stopped"); } } foreach $pin (keys(%main::isGeneralFloatingPin)) { if (!$main::isPin{$pin}) { die("ERROR: floating pin $pin is not a specified device pin, stopped"); } } if (!defined(@main::DefaultTemperature)) { @main::DefaultTemperature=(27); } foreach $temperature (@main::DefaultTemperature) { if ($temperature!~/^$main::number$/) { die("ERROR: bad temperature value specified, stopped"); } } if ($main::simulatorName =~ /mica|ads/i && defined($main::verilogaFile)) { $main::keyLetter="a"; } if ($main::simulatorName =~ /hspice/i && defined($main::verilogaFile)) { $main::keyLetter="X"; } if ($main::simulatorName =~ /spectre/i && !defined($main::keyLetter)) { $main::keyLetter="x"; } if (!defined($main::keyLetter)) { die("ERROR: no keyLetter specified, stopped"); } if (!defined($main::nTypeSelectionArguments)) { die("ERROR: no model selection arguments specified, stopped"); } @main::Variants=("standard"); if ($main::doPinFlipTest&&$main::doPNFlipTest) { push(@main::Variants,"Flip_N"); push(@main::Variants,"noFlip_P"); push(@main::Variants,"Flip_P"); if (!defined($main::pTypeSelectionArguments)) { die("ERROR: no pType model selection arguments specified, stopped"); } } elsif ($main::doPinFlipTest) { push(@main::Variants,"Flip_N"); } elsif ($main::doPNFlipTest) { push(@main::Variants,"noFlip_P"); if (!defined($main::pTypeSelectionArguments)) { die("ERROR: no pType model selection arguments specified, stopped"); } } if ($main::doShrinkTest ) {push(@main::Variants,"shrink")} if ($main::doScaleTest ) {push(@main::Variants,"scale")} if ($main::doMfactorTest) {push(@main::Variants,"m")} } # # This subroutine processes test specific setup information. # It sets the information in global variables. # sub processTestSpec { my(@Spec)=@_; my($i,$arg,$temperature,$bias,$pin,@Field,$oneOverTwoPi,$name,$value,%isAnalysisPin,%AlreadyHave,%IndexFor); $main::outputDc=0;$main::outputAc=0;$main::outputNoise=0; undef($main::biasSweepPin);undef($main::biasSweepSpec);undef(@main::BiasSweepList); undef($main::biasListPin);undef($main::biasListSpec); undef($main::frequencySpec); undef($main::Temperature); @main::InstanceParameters=(); @main::Outputs=(); @main::ModelParameters=(); undef(%main::BiasFor); %main::isFloatingPin=%main::isGeneralFloatingPin; undef(%isAnalysisPin); undef(@main::Temperature); foreach (@Spec) { if (s/^output[s]?\s+//i) { s/\(/ /g;s/\)//g; @Field=split(/[\s,]+/,$_); for ($i=0;$i<=$#Field;++$i) { if ($Field[$i] =~ /^[IV]$/) { $main::outputDc=1; ++$i; if (!$main::isPin{$Field[$i]}) { die("ERROR: pin $Field[$i] listed for DC output is not a specified pin, stopped"); } push(@main::Outputs,$Field[$i]); } if ($Field[$i] =~ /^[CG]$/) { $main::outputAc=1; push(@main::Outputs,lc($Field[$i])); ++$i; if (!$main::isPin{$Field[$i]}) { die("ERROR: pin $Field[$i] listed for AC output is not a specified pin, stopped"); } $main::Outputs[$#main::Outputs].=" $Field[$i]"; $isAnalysisPin{$Field[$i]}=1; ++$i; if (!$main::isPin{$Field[$i]}) { die("ERROR: pin $Field[$i] listed for AC output is not a specified pin, stopped"); } $main::Outputs[$#main::Outputs].=" $Field[$i]"; $isAnalysisPin{$Field[$i]}=1; } if ($Field[$i] =~ /^N$/) { $main::outputNoise=1; ++$i; if (!$main::isPin{$Field[$i]}) { die("ERROR: pin $Field[$i] listed for noise output is not a specified pin, stopped"); } if ($#main::Outputs==0) { die("ERROR: can only specify one pin for noise output, stopped"); } push(@main::Outputs,$Field[$i]); $isAnalysisPin{$Field[$i]}=1; } } next; } if (/^biases\s+/i) { @Field=split(/[\s,]+/,$_); for ($i=1;$i<=$#Field;++$i) { if ($Field[$i] !~ /=/) { die("ERROR: biases specifications must be V(pin)=number, stopped"); } $Field[$i]=~s/V\s*\(\s*//;$Field[$i]=~s/\s*\)//; ($pin,$bias)=split("=",$Field[$i]); if ($bias !~ /^$main::number$/) { die("ERROR: biases specifications must be V(pin)=number, stopped"); } $main::BiasFor{$pin}=$bias; } next; } if (s/^(biasSweep|sweepBias)\s+//i) { if (defined($main::biasSweepSpec)) { die("ERROR: can only have one biasSweep specification, stopped"); } s/V\s*\(\s*//i;s/\s*\)//; @Field=split(/[=,\s]+/,$_); if ($#Field!=3) { die("ERROR: biasSweep specification must be V(pin)=start,stop,step, stopped"); } $main::biasSweepPin=$Field[0]; if (($Field[1] !~ /^$main::number$/) || ($Field[2] !~ /^$main::number$/) || ($Field[3] !~ /^$main::number$/)) { die("ERROR: biasSweep start,stop,step must be numbers, stopped"); } if ($Field[1] == $Field[2]) { die("ERROR: biasSweep start and stop must be different, stopped"); } if ($Field[3] == 0.0) { die("ERROR: biasStep must be non-zero, stopped"); } @main::BiasSweepList=(); if ($Field[2] > $Field[1]) { $Field[3]=abs($Field[3]); for ($bias=$Field[1];$bias<=$Field[2]+0.1*$Field[3];$bias+=$Field[3]) { push(@main::BiasSweepList,$bias); } } else { $Field[3]=-1.0*abs($Field[3]); for ($bias=$Field[1];$bias>=$Field[2]+0.1*$Field[3];$bias+=$Field[3]) { push(@main::BiasSweepList,$bias); } } $main::biasSweepSpec=join(" ",@Field[1..3]); $main::BiasFor{$main::biasSweepPin}=$Field[1]; next; } if (s/^(biasList|listBias)\s+//i) { if (defined($main::biasListSpec)) { die("ERROR: can only have one biasList specification, stopped"); } s/V\s*\(\s*//i;s/\s*\)//; @Field=split(/[=,\s]+/,$_); if ($#Field < 2) { die("ERROR: biasList specification must be V(pin)=val1,val2,..., stopped"); } $main::biasListPin=$Field[0]; for ($i=1;$i<=$#Field;++$i) { if ($Field[$i] !~ /^$main::number$/) { die("ERROR: biasList values must be numbers, stopped"); } } $main::biasListSpec=join(" ",@Field[1..$#Field]); $main::BiasFor{$main::biasListPin}=$Field[1]; next; } if (s/^instanceParameters\s+//i) { foreach $arg (split(/\s+/,$_)) { if ($arg !~ /.=./) { die("ERROR: instance parameters must be name=value pairs, stopped"); } ($name,$value)=split(/=/,$arg); $value=~s/\(//;$value=~s/\)//; # get rid of possible parens if ($value !~ /^$main::number$/) { die("ERROR: instance parameter value in $arg is not a number, stopped"); } push(@main::InstanceParameters,$arg); } next; } if (s/^modelParameters\s+//i) { foreach $arg (split(/\s+/,$_)) { $arg_file = $main::srcdir . $arg; if ($arg !~ /.=./ && ! -r $arg_file) { die("ERROR: model parameters must be name=value pairs or a file name, stopped"); } if (-r $arg_file) { if (!open(IF,"$arg_file")) { die("ERROR: cannot open file $arg_file, stopped"); } while () { chomp;s/\s*=\s*/=/g; s/^\+\s*//;s/^\s+//;s/\s+$//; ($name,$value)=split(/=/,$_); $value=~s/\(//;$value=~s/\)//; # get rid of possible parens if ($value !~ /^$main::number$/) { die("ERROR: model parameter value in $_ is not a number, stopped"); } if (!defined($AlreadyHave{$name})) { push(@main::ModelParameters,"$name=$value"); $AlreadyHave{$name}=1; $IndexFor{$name}=$#main::ModelParameters; } else { if ($AlreadyHave{$name} == 1 && $main::printWarnings) { printf("WARNING: parameter $name defined more than once, last value specified will be used\n"); } $AlreadyHave{$name}=2; $main::ModelParameters[$IndexFor{$name}]="$name=$value"; } } close(IF); } else { ($name,$value)=split(/=/,$arg); $value=~s/\(//;$value=~s/\)//; # get rid of possible parens if ($value !~ /^$main::number$/) { die("ERROR: model parameter value in $arg is not a number, stopped"); } if (!defined($AlreadyHave{$name})) { push(@main::ModelParameters,"$name=$value"); $AlreadyHave{$name}=1; $IndexFor{$name}=$#main::ModelParameters; } else { if ($AlreadyHave{$name} == 1 && $main::printWarnings) { printf("WARNING: parameter $name defined more than once, last value specified will be used\n"); } $AlreadyHave{$name}=2; $main::ModelParameters[$IndexFor{$name}]="$name=$value"; } } } next; } if (s/^freq[uency]*\s+//i) { if (!/^(lin|oct|dec)\s+(\d+)\s+($main::number)\s+($main::number)$/) { die("ERROR: bad frequency sweep specification, stopped"); } $main::fType=$1;$main::fSteps=$2;$main::fMin=$3;$main::fMax=$4; $main::frequencySpec=$_; next; } if (s/^temperature\s+//i) { push(@main::Temperature,split(/[,\s]+/,$_)); foreach $temperature (@main::Temperature) { if ($temperature !~ /^$main::number$/) { die("ERROR: bad temperature value specified, stopped"); } } next; } if (s/^float[ingpinode]*\s+//i) { @Field=split(/[\s,]+/,$_); if ($#Field < 0) { die("ERROR: bad floating pin specification, stopped"); } foreach (@Field) { if (!$main::isPin{$_}) { die("ERROR: floating pin $_ is not a specified device pin, stopped"); } $main::isFloatingPin{$_}=1; } next; } die("ERROR: unknown test directive\n$_\nstopped"); } if (!defined(@main::Temperature)) { @main::Temperature=@main::DefaultTemperature; } if (abs($main::outputDc+$main::outputAc+$main::outputNoise-1) > 0.001) { die("ERROR: outputs specified must be one of DC, AC or noise, stopped"); } if ($main::outputDc && !defined($main::biasSweepSpec)) { die("ERROR: no bias sweep spec defined for DC testing, stopped"); } if ($main::outputNoise && !defined($main::frequencySpec)) { die("ERROR: no frequency spec defined for noise testing, stopped"); } if ($main::outputAc && !defined($main::frequencySpec)) { # default for AC is omega=1 $oneOverTwoPi=1.0/(8.0*atan2(1.0,1.0)); $main::frequencySpec="lin 1 $oneOverTwoPi $oneOverTwoPi"; $main::fType="lin";$main::fSteps=1;$main::fMin=$oneOverTwoPi;$main::fMax=$oneOverTwoPi; } if ($main::outputAc && ($main::frequencySpec eq "lin") && ($main::simulatorName =~ /hspice|ads/i)) { # AC spec is number of points, not number of steps, for hspice and ads ++$main::fSteps if ($main::fMin != $main::fMax); $main::frequencySpec="$main::fType $main::fSteps $main::fMin $main::fMax"; } foreach $pin (@main::Pin) { if (!defined($main::BiasFor{$pin}) && !defined($main::isFloatingPin{$pin})) { die("ERROR: a bias must be specified for all non-floating pins, stopped"); } if ($main::isSymmetryPin{$pin} && $main::isFloatingPin{$pin}) { die("ERROR: a floating pin cannot be specified as a symmetry pin, stopped"); } if ($isAnalysisPin{$pin} && $main::isFloatingPin{$pin}) { die("ERROR: a floating pin can only have its voltage measured in DC analyses, stopped"); } } if (!defined($main::biasListPin)) { # if not specified make a dummy bias list, to simplify processing later $main::biasListPin="dummyPinNameThatIsNeverUsed"; $main::biasListSpec="0"; } elsif (defined($main::isFloatingPin{$main::biasListPin})) { die("ERROR: a bias list cannot be specified for a floating pin, stopped"); } if (!defined($main::biasSweepPin)) { # if not specified make a dummy bias sweep, to simplify processing later if($main::biasListPin eq $main::Pin[0]) { $main::biasSweepPin=$main::Pin[1]; } else { $main::biasSweepPin=$main::Pin[0]; } $main::biasSweepSpec="$main::BiasFor{$main::biasSweepPin} $main::BiasFor{$main::biasSweepPin} 0"; @main::BiasSweepList=($main::BiasFor{$main::biasSweepPin}); } elsif (defined($main::isFloatingPin{$main::biasSweepPin})) { die("ERROR: a bias sweep cannot be specified for a floating pin, stopped"); } } # # This subroutine reads in a test specification file. # It cleans up the syntax by getting rid of comments # and continutation lines, processing conditionals, # and splitting up the contents of the file into # global specifications and individual test specifications. # # On call: # $main::qaSpecFile must be set to the name of the file that # contains the qaSpec information # On return: # @main::Setup contains general, test-nonspecific information # @main::Test contains a list of the test defined in the qaSpec file # %main::TestSpec contains each test specification, hash keys are @main::Test elements # sub readQaSpecFile { my(@File,@RawFile,@Field); @RawFile=&readHierarchicalFile($main::qaSpecFile); foreach (@RawFile) { s%\s*//.*%%; # eliminate C++ style comments s/^\s+//;s/\s+$//; # eliminate leading and trailing white space next if (/^$/); # ignore blank lines s/\s*=\s*/=/g; # eliminate space around "=" in name=value pairs if (/^\+/) { # process a continuation line s/^\+\s*//; # eliminate continuation "+" and any following whitespace $File[$#File]=~s/\s*\\$//; # get rid of possible additional continuation on previous line $File[$#File].=" $_"; # add to previous line next; } if (($#File >= 0) && ($File[$#File] =~ /\\$/)) { # add to previous line if that had an end-of-line continuation $File[$#File]=~s/\s*\\$//; $File[$#File].=" $_"; } else { push(@File,$_); } } @File=&processIfdefs(\%main::Defined,@File); # process ifdef's to get conditional-free qaSpec @main::Test=();@main::Setup=(); foreach (@File) { # process the qaSpec if (/^test(name)?\s+/i) { @Field=split; if ($#Field < 1) { die("ERROR: no test name specified for a test directive, stopped"); } push(@main::Test,$Field[1]); @{$main::TestSpec{$main::Test[$#main::Test]}}=(); next; } if ($#main::Test >= 0) { push(@{$main::TestSpec{$main::Test[$#main::Test]}},$_); } else { push(@main::Setup,$_); } } } sub readHierarchicalFile { my($fileName,$hierarchyLevel)=@_; my(@File,$FH,$includeFileName); if (!defined($hierarchyLevel)) { $hierarchyLevel=0; } $FH="file".$hierarchyLevel; if (!open($FH,$fileName)) { die("ERROR: cannot open file $fileName, stopped"); } @File=(); while (<$FH>) { chomp; if (/^\s*\`include\s+/) { ($includeFileName=$')=~s/"//g; ++$hierarchyLevel; push(@File,&readHierarchicalFile($includeFileName,$hierarchyLevel)); --$hierarchyLevel; } else { push(@File,$_); } } close($FH); return(@File); } # # This subroutine processes the `ifdef statements (recursively, so nested `ifdef's are handled) # and returns the test specification with the appropriate blocks included and excluded. # Note that the simulator name is defined, so that # simulator specific directives are automatically included. # sub processIfdefs { my($defRef,@Input)=@_; my(%Defined,$i,$block,@Field,$start,$middle,$end,$ifdefLevel,$maxIfdefLevel); my(@Insert); %Defined=%$defRef; for ($i=0;$i<=$#Input;++$i) { if ($Input[$i] =~ /^`(define|undef)/) { @Field=split(/\s+/,$Input[$i]); if ($#Field > 0) { if ($Input[$i] =~ /^`define/) { $Defined{$Field[1]}=1; } else { $Defined{$Field[1]}=0; } } splice(@Input,$i,1); --$i; next; } if ($Input[$i] =~ /^`ifdef\s+/) { $start=$i; $ifdefLevel=1;$maxIfdefLevel=1; undef($middle); for ($end=$start+1;$end<=$#Input;++$end) { if ($Input[$end] =~ /^`ifdef/) { ++$ifdefLevel; if ($ifdefLevel > $maxIfdefLevel) {$maxIfdefLevel=$ifdefLevel} } if ($Input[$end] =~ /^`end/) {--$ifdefLevel} if ($Input[$end] =~ /^`else/) {$middle=$end} last if ($ifdefLevel == 0); } if (($end > $#Input) && ($ifdefLevel > 0)) { die("ERROR: `ifdef not terminated, stopped"); } ($block=$Input[$i])=~s/^`ifdef\s+//; if ($maxIfdefLevel > 1) { if (!defined($middle)) {$middle=$end} @Insert=(); if ($Defined{$block}) { if ($start+1 <= $middle-1) { @Insert=&processIfdefs(\%Defined,@Input[$start+1..$middle-1]); } } else { if ($middle+1 <= $end-1) { @Insert=&processIfdefs(\%Defined,@Input[$middle+1..$end-1]); } } splice(@Input,$start,$end-$start+1,@Insert); } else { if (!defined($middle)) {$middle=$end} @Insert=(); if ($Defined{$block}) { if ($start+1 <= $middle-1) { @Insert=@Input[$start+1..$middle-1] } } else { if ($middle+1 <= $end-1) { @Insert=@Input[$middle+1..$end-1]; } } splice(@Input,$start,$end-$start+1,@Insert); } --$i; next; } if ($Input[$i] =~ /^`/) {die("ERROR: bad directive\n$Input[$i]\nstopped")} } return(@Input); } sub unScale { # # call: $Result=&unScale($Scalar); # # If $Scalar is a SPICE-like scaled number then $Result is the value # of that number, else $Result is just $Scalar. # my($String)=@_; my($Result); $Result=$String; if ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)T/i) { $Result=$1*1e12; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)G/i) { $Result=$1*1e9; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)(M|meg|x)/) { $Result=$1*1e6; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)K/i) { $Result=$1*1e3; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)m/) { $Result=$1*1e-3; } if ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)u/) { $Result=$1*1e-6; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)n/) { $Result=$1*1e-9; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)p/) { $Result=$1*1e-12; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)f/) { $Result=$1*1e-15; } elsif ($String =~ /^([+-]?[0-9]+[.]?[0-9]*|[+-]?[.][0-9]+)a/) { $Result=$1*1e-18; } return($Result); } sub platform { # # This subroutines returns a string that includes the processor # type, OS name, and OS version. This string is used as one level # of the directory hierarchy for storing test results, because # simulation results can vary with processor and OS. # # The UNIX uname command is used to get the appropriate information. # If the system appears to be Windows, then the perl Config module # information is used instead. However this information is generated # as part of the Perl build, and so may not relate to the machine # on which it is being run. # use Config; my($osName,$osVer,$archName)=($modelQa::Config{osname},$modelQa::Config{osvers},$modelQa::Config{archname}); my($platform); if ($osName !~ /win/i) { open(UNAME,"uname -p|") or die("ERROR: cannot determine processore and OS information, stopped"); chomp($archName=);close(UNAME); if ($archName eq "unknown") { open(UNAME,"uname -m|");chomp($archName=);close(UNAME); } open(UNAME,"uname -s|");chomp($osName=);close(UNAME); open(UNAME,"uname -r|");chomp($osVer =);close(UNAME); } $platform = "${archName}_${osName}_${osVer}"; $platform =~ s|[()/]||g; return($platform); } 1; ngspice-26/tests/bin/maketest.sh0000644000265600020320000000043612264261473016317 0ustar andreasadmin#! /bin/sh # # Ngspice test driver. NGSPICE=$(src_dir)ngspice TEST=$1 DIFFPIPE="Analysis|CPU|memory|Date|Note|Mon|Tue|Wed|Thu|Fri|Sat|Sun" testname=$(basename $TEST .cir) testdir=$(dirname $TEST) $NGSPICE < $testdir/$testname.cir 2>&1 | egrep -v $DIFFPIPE > $testname.test exit 0 ngspice-26/tests/bin/ngspice.pm0000644000265600020320000004033112264261473016132 0ustar andreasadmin # # ngspice DC, AC and noise test routines # # # Rel Date Who Comments # ==== ========== ============= ======== # 1.0 05/13/11 Dietmar Warning Initial version # package simulate; $netlistFile="ngspiceCkt"; use strict; sub version { return("26"); # the version only seems to be printed in interactive mode } sub runNoiseTest { my($variant,$outputFile)=@_; my($arg,$name,$value,$type,$pin,$noisePin); my(@BiasList,$i,@Field); my(@X,@Noise,$temperature,$biasVoltage,$sweepVoltage,$inData); # # Make up the netlist, using a subckt to encapsulate the # instance. This simplifies handling of the variants as # the actual instance is driven by voltage-controlled # voltage sources from the subckt pins, and the currents # are fed back to the subckt pins using current-controlled # current sources. Pin swapping, polarity reversal, and # m-factor scaling can all be handled by simple modifications # of this subckt. # @X=();@Noise=(); $noisePin=$main::Outputs[0]; if ($main::fMin == $main::fMax) { $main::frequencySpec="lin 0 $main::fMin ".(10*$main::fMin); # spice3f5 bug workaround } foreach $temperature (@main::Temperature) { foreach $biasVoltage (split(/\s+/,$main::biasListSpec)) { if ($main::fMin == $main::fMax) { push(@X,@main::BiasSweepList); } foreach $sweepVoltage (@main::BiasSweepList) { if (!open(OF,">$simulate::netlistFile")) { die("ERROR: cannot open file $simulate::netlistFile, stopped"); } print OF "* Noise simulation for $main::simulatorName"; &generateCommonNetlistInfo($variant,$temperature); print OF "vin dummy 0 0 ac 1"; print OF "rin dummy 0 1"; foreach $pin (@main::Pin) { if ($main::isFloatingPin{$pin}) { print OF "i_$pin $pin 0 0"; } elsif ($pin eq $main::biasListPin) { print OF "v_$pin $pin 0 $biasVoltage"; } elsif ($pin eq $main::biasSweepPin) { print OF "v_$pin $pin 0 $sweepVoltage"; } else { print OF "v_$pin $pin 0 $main::BiasFor{$pin}"; } } print OF "x1 ".join(" ",@main::Pin)." mysub"; print OF "hn 0 n_$noisePin v_$noisePin 1"; print OF ".noise v(n_$noisePin) vin $main::frequencySpec"; print OF ".print noise all"; print OF ".end"; close(OF); # # Run simulations and get the results # if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) { die("ERROR: cannot run $main::simulatorCommand, stopped"); } $inData=0; while () { chomp;s/^\s+//;s/\s+$//;s/,/ /g; if (/Index\s+frequency\s+inoise_spectrum\s+onoise_spectrum/i) { $inData=1;;next; } @Field=split; if (/\*/ || ($#Field != 3)) {$inData=0} next if (!$inData); if ($main::fMin == $main::fMax) { push(@Noise,1*$Field[3]);$inData=0;next; # spice3f5 bug workaround } push(@X,1*$Field[1]); push(@Noise,1*$Field[3]); } close(SIMULATE); } } } # # Write the results to a file # if (!open(OF,">$outputFile")) { die("ERROR: cannot open file $outputFile, stopped"); } if ($main::fMin == $main::fMax) { printf OF ("V($main::biasSweepPin)"); } else { printf OF ("Freq"); } foreach (@main::Outputs) { printf OF (" N($_)"); } printf OF ("\n"); for ($i=0;$i<=$#X;++$i) { if (defined($Noise[$i])) {printf OF ("$X[$i] $Noise[$i]\n")} } close(OF); # # Clean up, unless the debug flag was specified # if (! $main::debug) { unlink($simulate::netlistFile); if (!opendir(DIRQA,".")) { die("ERROR: cannot open directory ., stopped"); } foreach (grep(/^$simulate::netlistFile\.ic/,readdir(DIRQA))) {unlink($_)} closedir(DIRQA); } } sub runAcTest { my($variant,$outputFile)=@_; my($arg,$name,$value,$type,$pin,$mPin,$fPin,%NextPin); my(@BiasList,$acStim,$i,@Field); my(@X,$omega,$twoPi,%g,%c,$temperature,$biasVoltage,$sweepVoltage,$inData,$outputLine); $twoPi=8.0*atan2(1.0,1.0); # # Make up the netlist, using a subckt to encapsulate the # instance. This simplifies handling of the variants as # the actual instance is driven by voltage-controlled # voltage sources from the subckt pins, and the currents # are fed back to the subckt pins using current-controlled # current sources. Pin swapping, polarity reversal, and # m-factor scaling can all be handled by simple modifications # of this subckt. # foreach $mPin (@main::Pin) { foreach $fPin (@main::Pin) { @{$g{$mPin,$fPin}}=(); @{$c{$mPin,$fPin}}=(); } } @X=(); foreach $temperature (@main::Temperature) { foreach $biasVoltage (split(/\s+/,$main::biasListSpec)) { if ($main::fMin == $main::fMax) { push(@X,@main::BiasSweepList); } foreach $sweepVoltage (@main::BiasSweepList) { if (!open(OF,">$simulate::netlistFile")) { die("ERROR: cannot open file $simulate::netlistFile, stopped"); } print OF "* AC simulation for $main::simulatorName"; &generateCommonNetlistInfo($variant,$temperature); foreach $fPin (@main::Pin) { foreach $mPin (@main::Pin) { if ($mPin eq $fPin) { $acStim=" ac 1"; } else { $acStim=""; } if ($main::isFloatingPin{$mPin}) { print OF "i_${mPin}_$fPin ${mPin}_$fPin 0 0"; } elsif ($mPin eq $main::biasListPin) { print OF "v_${mPin}_$fPin ${mPin}_$fPin 0 $biasVoltage$acStim"; } elsif ($mPin eq $main::biasSweepPin) { print OF "v_${mPin}_$fPin ${mPin}_$fPin 0 $sweepVoltage$acStim"; } else { print OF "v_${mPin}_$fPin ${mPin}_$fPin 0 $main::BiasFor{$mPin}$acStim"; } } print OF "x_$fPin ".join("_$fPin ",@main::Pin)."_$fPin mysub"; } print OF ".ac $main::frequencySpec"; foreach $mPin (@main::Pin) { foreach $fPin (@main::Pin) { print OF ".print ac i(v_${mPin}_$fPin)"; } } print OF ".end"; close(OF); # # Run simulations and get the results # if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) { die("ERROR: cannot run $main::simulatorCommand, stopped"); } $inData=0; while () { chomp;s/^\s+//;s/\s+$//;s/,/ /g; if (/^Index\s+frequency\s+v_([a-zA-Z][a-zA-Z0-9]*)_([a-zA-Z][a-zA-Z0-9]*)#branch/i) { $mPin=$1;$fPin=$2;;$inData=1;next; } @Field=split; if (/^\*/ || ($#Field != 3)) {$inData=0;} next if (!$inData); if (($main::fMin != $main::fMax) && ($mPin eq $fPin) && ($mPin eq $main::Pin[0])) { push(@X,1*$Field[1]); } push(@{$g{$mPin,$fPin}},$Field[2]); $omega=$twoPi*$Field[1]; if ($mPin eq $fPin) { push(@{$c{$mPin,$fPin}},$Field[3]/$omega); } else { push(@{$c{$mPin,$fPin}},-1*$Field[3]/$omega); } } close(SIMULATE); } } } # # Write the results to a file # if (!open(OF,">$outputFile")) { die("ERROR: cannot open file $outputFile, stopped"); } if ($main::fMin == $main::fMax) { printf OF ("V($main::biasSweepPin)"); } else { printf OF ("Freq"); } foreach (@main::Outputs) { ($type,$mPin,$fPin)=split(/\s+/,$_); printf OF (" $type($mPin,$fPin)"); } printf OF ("\n"); for ($i=0;$i<=$#X;++$i) { $outputLine="$X[$i]"; foreach (@main::Outputs) { ($type,$mPin,$fPin)=split(/\s+/,$_); if ($type eq "g") { if (defined(${$g{$mPin,$fPin}}[$i])) { $outputLine.=" ${$g{$mPin,$fPin}}[$i]"; } else { undef($outputLine);last; } } else { if (defined(${$c{$mPin,$fPin}}[$i])) { $outputLine.=" ${$c{$mPin,$fPin}}[$i]"; } else { undef($outputLine);last; } } } if (defined($outputLine)) {printf OF ("$outputLine\n")} } close(OF); # # Clean up, unless the debug flag was specified # if (! $main::debug) { unlink($simulate::netlistFile); if (!opendir(DIRQA,".")) { die("ERROR: cannot open directory ., stopped"); } foreach (grep(/^$simulate::netlistFile\.ic/,readdir(DIRQA))) {unlink($_)} closedir(DIRQA); } } sub runDcTest { my($variant,$outputFile)=@_; my($arg,$name,$value,$i,@Field,$pin); my($start,$stop,$step); my(@V,%DC,$temperature,$biasVoltage); my($inData,$inResults); # # Make up the netlist, using a subckt to encapsulate the # instance. This simplifies handling of the variants as # the actual instance is driven by voltage-controlled # voltage sources from the subckt pins, and the currents # are fed back to the subckt pins using current-controlled # current sources. Pin swapping, polarity reversal, and # m-factor scaling can all be handled by simple modifications # of this subckt. # @V=(); foreach $pin (@main::Outputs) {@{$DC{$pin}}=()} ($start,$stop,$step)=split(/\s+/,$main::biasSweepSpec); $start-=$step; foreach $temperature (@main::Temperature) { foreach $biasVoltage (split(/\s+/,$main::biasListSpec)) { if (!open(OF,">$simulate::netlistFile")) { die("ERROR: cannot open file $simulate::netlistFile, stopped"); } print OF "* DC simulation for $main::simulatorName"; &generateCommonNetlistInfo($variant,$temperature); foreach $pin (@main::Pin) { if ($main::isFloatingPin{$pin}) { print OF "i_$pin $pin 0 0"; } elsif ($pin eq $main::biasListPin) { print OF "v_$pin $pin 0 $biasVoltage"; } elsif ($pin eq $main::biasSweepPin) { print OF "v_$pin $pin 0 $start"; } else { print OF "v_$pin $pin 0 $main::BiasFor{$pin}"; } } print OF "x1 ".join(" ",@main::Pin)." mysub"; print OF ".dc v_$main::biasSweepPin $main::biasSweepSpec"; foreach $pin (@main::Outputs) { if ($main::isFloatingPin{$pin}) { print OF ".print dc v($pin)"; } else { print OF ".print dc i(v_$pin)"; } } print OF ".end"; close(OF); # # Run simulations and get the results # if (!open(SIMULATE,"$main::simulatorCommand < $simulate::netlistFile 2>/dev/null|")) { die("ERROR: cannot run $main::simulatorCommand, stopped"); } $inResults=0; while () { chomp;s/^\s+//;s/\s+$//;s/#branch//;s/\(/_/;s/\)//; if (/^Index\s+v-sweep\s+v_/i) {$inResults=1;($pin=$');;next} @Field=split; if ($#Field != 2) {$inResults=0} next if (!$inResults); if ($pin eq $main::Outputs[0]) { push(@V,$Field[1]); } push(@{$DC{$pin}},$Field[2]); } close(SIMULATE); } } # # Write the results to a file # if (!open(OF,">$outputFile")) { die("ERROR: cannot open file $outputFile, stopped"); } printf OF ("V($main::biasSweepPin)"); foreach $pin (@main::Outputs) { if ($main::isFloatingPin{$pin}) { printf OF (" V($pin)"); } else { printf OF (" I($pin)"); } } printf OF ("\n"); for ($i=0;$i<=$#V;++$i) { next if (abs($V[$i]-$start) < abs(0.1*$step)); # this is dummy first bias point printf OF ("$V[$i]"); foreach $pin (@main::Outputs) {printf OF (" ${$DC{$pin}}[$i]")} printf OF ("\n"); } close(OF); # # Clean up, unless the debug flag was specified # if (! $main::debug) { unlink($simulate::netlistFile); if (!opendir(DIRQA,".")) { die("ERROR: cannot open directory ., stopped"); } foreach (grep(/^$simulate::netlistFile\.ic/,readdir(DIRQA))) {unlink($_)} closedir(DIRQA); } } sub generateCommonNetlistInfo { my($variant,$temperature)=@_; my(@Pin_x,$arg,$name,$value,$eFactor,$fFactor,$pin); foreach $pin (@main::Pin) {push(@Pin_x,"${pin}_x")} print OF ".options temp=$temperature gmin=1e-15 abstol=1e-14 reltol=1e-8"; if ($variant=~/^scale$/) { die("ERROR: there is no scale or shrink option for ngspice, stopped"); } if ($variant=~/^shrink$/) { die("ERROR: there is no scale or shrink option for ngspice, stopped"); } if ($variant=~/_P/) { $eFactor=-1;$fFactor=1; } else { $eFactor=1;$fFactor=-1; } if ($variant=~/^m$/) { if ($main::outputNoise) { $fFactor/=sqrt($main::mFactor); } else { $fFactor/=$main::mFactor; } } if (defined($main::verilogaFile)) { die("ERROR: Verilog-A model support is not implemented for ngspice, stopped"); } print OF ".subckt mysub ".join(" ",@Pin_x); foreach $pin (@main::Pin) { if ($main::isFloatingPin{$pin}) { # assumed "dt" thermal pin, no scaling sign change print OF "v_$pin ${pin} ${pin}_x 0"; } elsif ($variant=~/^Flip/ && defined($main::flipPin{$pin})) { print OF "e_$pin ${pin}_v 0 $main::flipPin{$pin}_x 0 $eFactor"; print OF "v_$pin ${pin}_v ${pin} 0"; print OF "f_$pin $main::flipPin{$pin}_x 0 v_$pin $fFactor"; } else { print OF "e_$pin ${pin}_v 0 ${pin}_x 0 $eFactor"; print OF "v_$pin ${pin}_v ${pin} 0"; print OF "f_$pin ${pin}_x 0 v_$pin $fFactor"; } } print OF "${main::keyLetter}1 ".join(" ",@main::Pin)." mymodel"; foreach $arg (@main::InstanceParameters) { ($name,$value)=split(/=/,$arg); if ($variant=~/^scale$/) { if ($main::isLinearScale{$name}) { $value/=$main::scaleFactor; } elsif ($main::isAreaScale{$name}) { $value/=$main::scaleFactor**2; } } if ($variant=~/^shrink$/) { if ($main::isLinearScale{$name}) { $value/=(1.0-$main::shrinkPercent*0.01); } elsif ($main::isAreaScale{$name}) { $value/=(1.0-$main::shrinkPercent*0.01)**2; } } print OF "+ $name=$value"; } if ($variant eq "m") { print OF "+ m=$main::mFactor"; } if ($variant=~/_P/) { print OF ".model mymodel $main::pTypeSelectionArguments"; } else { print OF ".model mymodel $main::nTypeSelectionArguments"; } foreach $arg (@main::ModelParameters) { print OF "+ $arg"; } print OF ".ends"; } 1; ngspice-26/tests/bin/run_cmc_check0000755000265600020320000000727012264261473016662 0ustar andreasadmin#!/bin/sh # # Example Script to run tests and check results. # # This is an example script for running QA tests on a # model and then checking the simulated results against # reference results. A separate target is defined for each # variant of the model. The program runQaTests.pl runs the # tests, and that program expects a perl module SIMULATOR.pm # to be provided for each simulator that is tested. # Examples of these are provided. # qaSpecFile="qaSpec" qaResultsDirectory="results" testProgramName="$(dirname $0)/runQaTests.pl" if [ -z "$testProgramFlags" ] ; then testProgramFlags="-nwV" fi #testProgramFlags="-d" help() { cat <<-EOF Valid targets are: all run tests and compare results for all simulators ngspice run tests and compare results ngspice clean remove all previously generated simulation results NOTE: if test results exist they are not resimulated NOTE: to force resimulation run "make clean" first EOF } run_test() { simname="$1" localPlatform=`${testProgramName} -platform` localVersion=`${testProgramName} -sv -s ${simname} ${qaSpecFile}` echo "" echo "******" echo "****** ${qaSpecFile} tests for ${simname}" echo "****** (for version ${localVersion} on platform ${localPlatform})" echo "******" for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do echo "" echo "****** Checking test (${simname}): ${test}" for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do ${testProgramName} \ ${testProgramFlags} \ -s ${simname} \ -r -t ${test} \ -var ${variant} \ --results=${qaResultsDirectory} \ ${qaSpecFile} done done for version in `ls -C1 ${qaResultsDirectory}/${simname}` ; do for platform in `ls -C1 ${qaResultsDirectory}/${simname}/${version}` ; do if [ ${version} = ${localVersion} -a ${platform} = ${localPlatform} ] then break fi echo "" echo "******" echo "****** Comparing previously run ${qaSpecFile} tests for ${simname}" echo "****** (for version ${version} on platform ${platform})" echo "******" for test in `${testProgramName} -lt -s ${simname} ${qaSpecFile}` ; do echo "" echo "****** Checking test (${simname}): ${test}" for variant in `${testProgramName} -lv -s ${simname} ${qaSpecFile}` ; do ${testProgramName} \ -c ${version} ${platform} \ -s ${simname} \ -t ${test} \ -var ${variant} \ --results=${qaResultsDirectory} \ ${qaSpecFile} done done done done } ##### ##### ngspice tests ##### ngspice() { run_test ngspice } clean() { rm -rf ${qaResultsDirectory}/ngspice ngspiceCkt* } all() { ngspice } while test $# -gt 0; do case "$1" in --srcdir=* | --executable=*) testProgramFlags="$testProgramFlags $1" shift ;; --results) qaResultsDirectory="$2" shift ; shift ;; -qa) qaSpecFile="$2" shift ; shift ;; *) break ;; esac done for arg in $@ ; do case "$arg" in all | clean | ngspice) "$arg" ;; *) help ;; esac done ngspice-26/tests/bin/spinit0000644000265600020320000000022012264261473015366 0ustar andreasadmin* due to a broken implementation of the ngspice frontend * this environment variable must be lower-case set sourcepath = ( $ngspice_vpath . ) ngspice-26/tests/bin/compareSimulationResults.pl0000755000265600020320000002136512264261473021567 0ustar andreasadmin#!/bin/sh eval 'exec perl -S -x -w $0 ${1+"$@"}' #!perl # # compareSimulationResults.pl: program to do a toleranced comparison of compact model simulation results # # Rel Date Who Comments # ==== ========== ============= ======== # 1.0 04/13/06 Colin McAndrew Initial version # sub usage() { print " $prog: compare simulation results between two files Usage: $prog [options] refFile simFile Files: refFile reference results file simFile simulated results file Options: -c CLIP match numbers n1 and n2 with abs(n1)) { s/\s+$//; push(@Ref,$_); } close(IF); return("ERROR: cannot open file $simFile") if (!open(IF,"$simFile")); while () { s/\s+$//; push(@Sim,$_); } close(IF); return("FAIL (probably from some simulation failure)") if ($#Ref != $#Sim || $#Sim<1); return("FAIL (simulation output quantities differ)") if ($Ref[0] ne $Sim[0]); $maxAbsErr=0;$maxRelErr=0;$matchType=0; for ($j=1;$j<=$#Ref;++$j) { @RefRes=split(/\s+/,$Ref[$j]); @SimRes=split(/\s+/,$Sim[$j]); return("FAIL (number of quantities simulated are different") if ($#RefRes != $#SimRes); for ($i=1;$i<=$#RefRes;++$i) { # ignore first column, this is the sweep variable if ($RefRes[$i] !~ /^$main::number$/ || $SimRes[$i] !~ /^$main::number$/) { return("FAIL (non-numeric results"); } next if ($RefRes[$i] == $SimRes[$i]); $matchType=1 if ($matchType<1); #next if (abs($RefRes[$i]) < $clip && abs($SimRes[$i]) < $clip); next if (abs($RefRes[$i]) < $clip || abs($SimRes[$i]) < $clip); if ($RefRes[$i]*$SimRes[$i] <= 0.0) { $matchType=2 if ($matchType<2); $absErr=abs($RefRes[$i]-$SimRes[$i]); $relErr=$absErr/(0.5*(abs($RefRes[$i])+abs($SimRes[$i])+$absErr)); $maxRelErr=$relErr if ($relErr > $maxRelErr); if ($main::verbose) {print STDERR $RefRes[$i],$SimRes[$i],100*$relErr."\%"} next; } $lo=abs($RefRes[$i]); if (abs($SimRes[$i]) < $lo) { $hi=$lo; $lo=abs($SimRes[$i]); } else { $hi=abs($SimRes[$i]); } $mag=int(log($lo)/log(10))+1; if ($lo < 1) {$mag-=1} $lo=int(0.5+$lo*10**($nDigits+1-$mag)); $hi=int(0.5+$hi*10**($nDigits+1-$mag)); next if (abs($lo-$hi)<=10); $absErr=abs($RefRes[$i]-$SimRes[$i]); $relErr=$absErr/(0.5*(abs($RefRes[$i])+abs($SimRes[$i])+$absErr)); next if ($relErr<$relTol); if ($main::verbose) {print STDERR $RefRes[$i],$SimRes[$i],100*$relErr."\%"} $matchType=2 if ($matchType<2); $maxRelErr=$relErr if ($relErr > $maxRelErr); } } if ($matchType==0) { return("MATCH (exact)"); } elsif ($matchType==1) { return("MATCH (within specified tolerances)"); } elsif ($matchType==2) { $mag=int(log($maxRelErr)/log(10)); $i=$maxRelErr/10**$mag; $maxRelErr=100*10**$mag*int(0.5+1e3*$i)/1e3; return("DIFFER (max rel error is $maxRelErr\%)"); } } ngspice-26/tests/bin/check_cmc.sh0000755000265600020320000000105112264261473016376 0ustar andreasadmin#!/bin/sh # cmc model check specific driver for the automake `check' target # arguments: # ngspice-executable subdirectory/qaSpec-file # (compile "./check_cmc.sh thexec nmos/qaSpec") executable="$1" qaspec="$2" subdir="$(dirname $2)" kind="$(basename $subdir)" echo "qaspec = $qaspec" echo "subdir = $subdir" echo "executable = $executable" echo "kind = $kind" mkdir -p "$kind" exec "$(dirname $0)/run_cmc_check" \ --executable="${executable}" \ --srcdir="${subdir}/" \ --results "$kind/results" \ -qa "${qaspec}" \ ngspice ngspice-26/tests/bin/check.sh0000644000265600020320000000451512264261473015561 0ustar andreasadmin#!/bin/sh # set -x if [ -z "$SPICE_SCRIPTS" ] ; then SPICE_SCRIPTS=`dirname $0` export SPICE_SCRIPTS if [ -z "$ngspice_vpath" ] ; then ngspice_vpath=. export ngspice_vpath fi fi # ls -ld $(realpath $SPICE_SCRIPTS) $SPICE_SCRIPTS/spinit # echo "---ngspice_vpath = $ngspice_vpath" SPICE=$1 TEST=$2 FILTER="CPU|Dynamic|Note|Circuit|Trying|Reference|Date|Doing|---|v-sweep|time|est|Error|Warning|Data|Index|trans|acan|oise|nalysis|ole|Total|memory|urrent|Got|Added|BSIM|bsim|B4SOI|b4soi|codemodel|^binary raw file|^ngspice.*done" testname=`basename $TEST .cir` testdir=`dirname $TEST` HOST_TYPE=`uname -srvm` case $HOST_TYPE in MINGW32*) $SPICE --batch $testdir/$testname.cir -o $testname.test &&\ sed -e 's/e-000/e+000/g' $testname.test | sed 's/e-0/e-/g' | sed 's/e+0/e+/g' | egrep -v "$FILTER" > $testname.test_tmp &&\ sed -e 's/-0$/ 0/g' $testdir/$testname.out | egrep -v "$FILTER" > $testname.out_tmp if diff -B -w -u $testname.out_tmp $testname.test_tmp; then rm $testname.test $testname.test_tmp $testname.out_tmp exit 0 fi rm -f $testname.test_tmp $testname.out_tmp sed -e 's/e-000/e+000/g' $testname.test | sed 's/e-0/e-/g' | sed 's/e+0/e+/g' > $testname.test_tmp mv $testname.test_tmp $testname.test ;; Linux*|Darwin*|CYGWIN*) $SPICE --batch $testdir/$testname.cir >$testname.test &&\ egrep -v "$FILTER" $testname.test > $testname.test_tmp &&\ egrep -v "$FILTER" $testdir/$testname.out > $testname.out_tmp if diff -B -w -u $testname.out_tmp $testname.test_tmp; then rm $testname.test $testname.test_tmp $testname.out_tmp exit 0 fi rm -f $testname.test_tmp $testname.out_tmp ;; SunOS*|OpenBSD*) $SPICE --batch $testdir/$testname.cir >$testname.test &&\ sed -e '/^$/d' $testname.test | egrep -v "$FILTER" > $testname.test_tmp &&\ sed -e '/^$/d' $testdir/$testname.out | egrep -v "$FILTER" > $testname.out_tmp if diff -b -w $testname.out_tmp $testname.test_tmp; then rm $testname.test $testname.test_tmp $testname.out_tmp exit 0 fi rm -f $testname.test_tmp $testname.out_tmp ;; *) echo Unknown system type! echo $HOST_TYPE echo ./tests/bin/checks.sh may need updating for your system ;; esac exit 1 ngspice-26/tests/bin/runQaTests.pl0000755000265600020320000002600612264261473016620 0ustar andreasadmin#!/bin/sh eval 'exec perl -S -x -w $0 ${1+"$@"}' #!perl # # runQaTests.pl: program to run automated QA tests on compact models # # Rel Date Who Comments # ==== ========== ============= ======== # 1.2 06/30/06 Colin McAndrew Floating node support added # 1.0 04/13/06 Colin McAndrew Initial version # sub usage() { print " $prog: run model QA tests Usage: $prog [options] -s simulatorName qaSpecificationFile Files: qaSpecificationFile file with specifications for QA tests simulatorName name of simulator to be tested Options: -c version platform do not try to simulate, only compare results for version and platform -d debug mode (leave intermediate files around) -h print this help message -i print info on file formats and structure -l list tests and variants that are defined -lt list tests that are defined -lv list test variants that are defined -nw do not print warning messages -platform prints the hardware platform and operating system version -p plot results (limited, only standard test variant) -P plot results (complete, for all test variants) -r re-use previously simulated results if they exist (default is to resimulate, even if results exist) -sv prints the simulator version being run -t TEST only run test TEST (can be a comma delimited list) -var VAR only run variant VAR (can be a comma delimited list) -v verbose mode -V really verbose mode, print out each difference detected "; } # End of usage sub info() { print " This program runs automated QA tests on a model. The test specifications are defined in the qaSpecificationFile Each test is run by setting up a netlist, running this is in the simulator in which the implementation of a model is being tested, and then collating the simulation results. Because the netlist formats, simulator commands, and output formats vary between simulators, a specific set of routines that run the tests must be provided for each simulator. Please see the documentation for more details. "; } # End of info # # Set program names and variables # $\="\n"; $,=" "; undef($number); $number='[+-]?\d+[\.]?\d*[eE][+-]?\d+|[+-]?[\.]\d+[eE][+-]?\d+|[+-]?\d+[\.]?\d*|[+-]?[\.]\d+'; undef($qaSpecFile); undef(@Setup); undef(@Test); undef(@Variants); $debug=0; $verbose=0; $reallyVerbose=0; $doPlot=0; $listTests=0; $listVariants=0; $onlyDoSimulatorVersion=0; $onlyDoPlatformVersion=0; $onlyDoComparison=0; $forceSimulation=1; $printWarnings=1; @prog=split("/",$0); $programDirectory=join("/",@prog[0..$#prog-1]); $prog=$prog[$#prog]; $srcdir=""; $resultsDirectory="results"; # # These variables are only defined once in this file, # and so generate unsightly warnings from the -w option # to perl, these undef's stop those warnings. # undef($dcClip);undef($dcNdigit);undef($dcRelTol); undef($acClip);undef($acNdigit);undef($acRelTol); undef($noiseClip);undef($noiseNdigit);undef($noiseRelTol); undef($mFactor);undef($shrinkPercent);undef($scaleFactor);undef(%TestSpec); undef($refrnceDirectory); # # These are the tolerances used to compare results # $dcClip=1.0e-13; $dcNdigit=6; $dcRelTol=1.0e-6; $acClip=1.0e-20; $acNdigit=6; $acRelTol=1.0e-6; $noiseClip=1.0e-30; $noiseNdigit=5; $noiseRelTol=1.0e-5; # # These are the values used to test shrink, scale, and m # (if they are requested to be tested). # $scaleFactor=1.0e-6; $shrinkPercent=50; $sqrt_mFactor=10; $mFactor=$sqrt_mFactor*$sqrt_mFactor; # # Parse the command line arguments # for (;;) { if (!defined($ARGV[0])) { last; } elsif ($ARGV[0] =~ /^-c/) { shift(@ARGV); if ($#ARGV<0) {die("ERROR: no simulator version specified for -c option, stopped")} $version=$ARGV[0]; shift(@ARGV); if ($#ARGV<0) {die("ERROR: no platform specified for -c option, stopped")} $platform=$ARGV[0]; $onlyDoComparison=1; } elsif ($ARGV[0] =~ /^-d/i) { $debug=1;$verbose=1; } elsif ($ARGV[0] =~ /^-h/i) { &usage();exit(0); } elsif ($ARGV[0] =~ /^-i/i) { &usage();&info();exit(0); } elsif ($ARGV[0] =~ /^-lv/i) { $listVariants=1; } elsif ($ARGV[0] =~ /^-lt/i) { $listTests=1; } elsif ($ARGV[0] =~ /^-l/i) { $listTests=1;$listVariants=1; } elsif ($ARGV[0] =~ /^-platform/i) { $onlyDoPlatformVersion=1; } elsif ($ARGV[0] =~ /^-nw/i) { $printWarnings=0; } elsif ($ARGV[0] =~ /^-p/i) { $doPlot=1; } elsif ($ARGV[0] =~ /^-r/i) { $forceSimulation=0; } elsif ($ARGV[0] =~ /^-sv/i) { $onlyDoSimulatorVersion=1; } elsif ($ARGV[0] =~ /^--results=(.*)/i) { $resultsDirectory=$1; } elsif ($ARGV[0] =~ /^--executable=(.*)/i) { $simulatorCommand=$1; } elsif ($ARGV[0] =~ /^-s/) { shift(@ARGV); if ($#ARGV<0) {die("ERROR: no simulator specified for -s option, stopped")} $simulatorName=$ARGV[0]; } elsif ($ARGV[0] =~ /^--srcdir=(.*)/i) { $srcdir=$1; } elsif ($ARGV[0] =~ /^-t/) { shift(@ARGV); if ($#ARGV<0) {die("ERROR: no test(s) specified for -t option, stopped")} foreach (split(/,/,$ARGV[0])) {$doTest{$_}=1} } elsif ($ARGV[0] =~ /^-var/) { shift(@ARGV); if ($#ARGV<0) {die("ERROR: no variant(s) specified for -var option, stopped")} foreach (split(/,/,$ARGV[0])) {$doVariant{$_}=1} } elsif ($ARGV[0] =~ /^-v/) { $verbose=1; } elsif ($ARGV[0] =~ /^-V/) { $verbose=1;$reallyVerbose=1; } elsif ($ARGV[0] =~ /^-/) { &usage(); die("ERROR: unknown flag $ARGV[0], stopped"); } else { last; } shift(@ARGV); } if ($onlyDoSimulatorVersion && !defined($simulatorName) && defined($ARGV[0])) { $simulatorName=$ARGV[0]; # assume -sv simulatorName was specified } if ($#ARGV<0 && !$onlyDoPlatformVersion && !($onlyDoSimulatorVersion && defined($simulatorName))) { &usage();exit(0); } if (!$onlyDoPlatformVersion && !defined($simulatorName)) { &usage();exit(0); } if(!defined($simulatorCommand)) { $simulatorCommand=$simulatorName; } # # Source perl modules with subroutines that are called to do all the work # if (! require "$programDirectory/modelQaTestRoutines.pm") { die("ERROR: problem sourcing modelQaTestRoutines.pm, stopped"); } if (!$onlyDoComparison) { $platform=&modelQa::platform(); if ($onlyDoPlatformVersion) { print $platform;exit(0); } if (! -r "$programDirectory/$simulatorName.pm") { die("ERROR: there is no test routine Perl module for simulator $simulatorName, stopped"); } if (! require "$programDirectory/$simulatorName.pm") { die("ERROR: problem sourcing test routine Perl module for simulator $simulatorName, stopped"); } } # # Initial processing, set up directory names and process the QA specification file # if (!$onlyDoComparison) { $version=&simulate::version(); if ($onlyDoSimulatorVersion) { print $version;exit(0); } } $qaSpecFile=$ARGV[0]; $refrnceDirectory=$main::srcdir . "reference"; undef(%Defined); $Defined{$simulatorName}=1; # any `ifdef's in the QA spec file for $simulatorName are automatically inlcuded &modelQa::readQaSpecFile(); &modelQa::processSetup(@Setup); # # List tests and variants, if that was all that was requested # (note that the Makefile uses output from -lt and -lv # options to loop over the tests and variants individually, # so the output for those needs to be on a single line) # if ($listTests || $listVariants) { if ($listTests && $listVariants) { print "\nTests:"; foreach (@Test) {print " ".$_} print "\nVariants:"; foreach (@Variants) {print " ".$_} } elsif ($listTests) { print @Test; } else { print @Variants; } exit(0); } # # Loop over and run all tests # Note that the "standard" variant test is compared # to the reference results, whereas the other variant # tests are compared to the "standard" variant result. # This is because there may be some slight differences # between implementations, which get flagged when standard # is compared to reference, however for the other variants # this would generate a sequence of identical and in-exact # comparison messages. Each variant should *exactly* match # the standard, hence this is checked, and gives cleaner # looking output when the standard differs from the reference. # if (!$onlyDoComparison) { if (! -d $resultsDirectory) {mkdir($resultsDirectory,0775)} $resultsDirectory.="/$simulatorName"; if (! -d $resultsDirectory) {mkdir($resultsDirectory,0775)} $resultsDirectory.="/$version"; if (! -d $resultsDirectory) {mkdir($resultsDirectory,0775)} $resultsDirectory.="/$platform"; if (! -d $resultsDirectory) {mkdir($resultsDirectory,0775)} } else { $resultsDirectory.="/$simulatorName/$version/$platform"; } if ($reallyVerbose) { $flag="-v"; } else { $flag=""; } foreach $test (@Test) { next if (!$doTest{$test}); if ($verbose) {print "\n****** Running test ($simulatorName): $test"} undef($outputDc); undef($outputAc); undef($outputNoise); &modelQa::processTestSpec(@{$TestSpec{$test}}); foreach $variant (@Variants) { if ($variant eq "standard") { $refFile="$refrnceDirectory/$test.standard"; } else { $refFile="$resultsDirectory/$test.standard"; } next if (!$doVariant{$variant}); $simFile="$resultsDirectory/$test.$variant"; if ($outputDc) { if (($forceSimulation || ! -r $simFile) && !$onlyDoComparison) { &simulate::runDcTest($variant,$simFile); } $clip=$dcClip;$relTol=$dcRelTol;$ndigit=$dcNdigit; } if ($outputAc) { if (($forceSimulation || ! -r $simFile) && !$onlyDoComparison) { &simulate::runAcTest($variant,$simFile); } $clip=$acClip;$relTol=$acRelTol;$ndigit=$acNdigit; } if ($outputNoise) { if (($forceSimulation || ! -r $simFile) && !$onlyDoComparison) { &simulate::runNoiseTest($variant,$simFile); } $clip=$noiseClip;$relTol=$noiseRelTol;$ndigit=$noiseNdigit; } if (-r $refFile && -r $simFile) { $message=sprintf(" variant: %-20s************************ comparison failed\n",$variant); if (open(IF,"$programDirectory/compareSimulationResults.pl $flag -c $clip -r $relTol -n $ndigit $refFile $simFile|")) { while () {chomp;$message=$_;} close(IF); } print $message; } else { printf(" variant: %-20s************************ no results to compare to\n",$variant); } } } ngspice-26/tests/hfet/0000755000265600020320000000000012264261714014317 5ustar andreasadminngspice-26/tests/hfet/inverter.cir0000644000265600020320000000114612264261473016660 0ustar andreasadminDCFL inverter circuit .subckt inv 1 2 3 * *Vdd 1.0 *Vin 2 0 *Vout 3 0 z1 1 3 3 aload l=1u w=10u z2 3 2 0 adrv l=1u w=10u .ends vdd 1 0 dc 2 vin 2 0 dc 0 pwl(0,0V 1ns,0V 1.005ns,1V 2ns,1V) x1 1 2 3 inv x2 1 3 4 inv .options noacct .tran 0.01n 3n .print tran all .model adrv nhfet level=5 rd=60 rs=60 m=2.57 lambda=0.17 + vs=1.5e5 mu=0.385 vt0=0.3 eta=1.32 sigma0=0.04 + vsigma=0.1 vsigmat=0.3 js1s=1e-12 js1d=1e-12 + nmax=6e15 .model aload nhfet level=5 rd=60 rs=60 m=2.57 lambda=0.17 + vs=1.5e5 mu=0.385 vt0=-0.3 eta=1.32 sigma0=0.04 + vsigma=0.1 vsigmat=0.3 js1s=1e-12 js1d=1e-12 + nmax=6e15 .end ngspice-26/tests/hfet/id_vgs.out0000644000265600020320000000706412264261473016334 0ustar andreasadmin No. of Data Rows : 101 Circuit: HFET Id versus Vgs characteristic Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 HFET Id versus Vgs characteristic -------------------------------------------------------------------------------- Index v-sweep vds#branch -------------------------------------------------------------------------------- 0 0.000000e+00 3.772725e-11 1 1.000000e-02 -1.357632e-05 2 2.000000e-02 -2.711234e-05 3 3.000000e-02 -4.036601e-05 4 4.000000e-02 -5.305124e-05 5 5.000000e-02 -6.489829e-05 6 6.000000e-02 -7.570261e-05 7 7.000000e-02 -8.535128e-05 8 8.000000e-02 -9.382381e-05 9 9.000000e-02 -1.011738e-04 10 1.000000e-01 -1.075027e-04 11 1.100000e-01 -1.129351e-04 12 1.200000e-01 -1.176000e-04 13 1.300000e-01 -1.216188e-04 14 1.400000e-01 -1.251000e-04 15 1.500000e-01 -1.281367e-04 16 1.600000e-01 -1.308071e-04 17 1.700000e-01 -1.331758e-04 18 1.800000e-01 -1.352959e-04 19 1.900000e-01 -1.372106e-04 20 2.000000e-01 -1.389551e-04 21 2.100000e-01 -1.405581e-04 22 2.200000e-01 -1.420430e-04 23 2.300000e-01 -1.434290e-04 24 2.400000e-01 -1.447317e-04 25 2.500000e-01 -1.459642e-04 26 2.600000e-01 -1.471370e-04 27 2.700000e-01 -1.482592e-04 28 2.800000e-01 -1.493381e-04 29 2.900000e-01 -1.503799e-04 30 3.000000e-01 -1.513899e-04 31 3.100000e-01 -1.523725e-04 32 3.200000e-01 -1.533314e-04 33 3.300000e-01 -1.542699e-04 34 3.400000e-01 -1.551906e-04 35 3.500000e-01 -1.560960e-04 36 3.600000e-01 -1.569880e-04 37 3.700000e-01 -1.578684e-04 38 3.800000e-01 -1.587386e-04 39 3.900000e-01 -1.596001e-04 40 4.000000e-01 -1.604540e-04 41 4.100000e-01 -1.613013e-04 42 4.200000e-01 -1.621428e-04 43 4.300000e-01 -1.629794e-04 44 4.400000e-01 -1.638117e-04 45 4.500000e-01 -1.646404e-04 46 4.600000e-01 -1.654660e-04 47 4.700000e-01 -1.662889e-04 48 4.800000e-01 -1.671097e-04 49 4.900000e-01 -1.679287e-04 50 5.000000e-01 -1.687463e-04 51 5.100000e-01 -1.695627e-04 52 5.200000e-01 -1.703782e-04 53 5.300000e-01 -1.711932e-04 54 5.400000e-01 -1.720078e-04 Index v-sweep vds#branch -------------------------------------------------------------------------------- 55 5.500000e-01 -1.728222e-04 56 5.600000e-01 -1.736366e-04 57 5.700000e-01 -1.744513e-04 58 5.800000e-01 -1.752663e-04 59 5.900000e-01 -1.760818e-04 60 6.000000e-01 -1.768979e-04 61 6.100000e-01 -1.777147e-04 62 6.200000e-01 -1.785324e-04 63 6.300000e-01 -1.793511e-04 64 6.400000e-01 -1.801708e-04 65 6.500000e-01 -1.809916e-04 66 6.600000e-01 -1.818136e-04 67 6.700000e-01 -1.826370e-04 68 6.800000e-01 -1.834616e-04 69 6.900000e-01 -1.842877e-04 70 7.000000e-01 -1.851153e-04 71 7.100000e-01 -1.859443e-04 72 7.200000e-01 -1.867750e-04 73 7.300000e-01 -1.876072e-04 74 7.400000e-01 -1.884411e-04 75 7.500000e-01 -1.892768e-04 76 7.600000e-01 -1.901141e-04 77 7.700000e-01 -1.909533e-04 78 7.800000e-01 -1.917942e-04 79 7.900000e-01 -1.926370e-04 80 8.000000e-01 -1.934816e-04 81 8.100000e-01 -1.943282e-04 82 8.200000e-01 -1.951766e-04 83 8.300000e-01 -1.960271e-04 84 8.400000e-01 -1.968794e-04 85 8.500000e-01 -1.977338e-04 86 8.600000e-01 -1.985902e-04 87 8.700000e-01 -1.994486e-04 88 8.800000e-01 -2.003091e-04 89 8.900000e-01 -2.011716e-04 90 9.000000e-01 -2.020362e-04 91 9.100000e-01 -2.029030e-04 92 9.200000e-01 -2.037718e-04 93 9.300000e-01 -2.046427e-04 94 9.400000e-01 -2.055158e-04 95 9.500000e-01 -2.063911e-04 96 9.600000e-01 -2.072685e-04 97 9.700000e-01 -2.081481e-04 98 9.800000e-01 -2.090299e-04 99 9.900000e-01 -2.099139e-04 100 1.000000e+00 -2.108001e-04 ngspice-26/tests/hfet/Makefile.am0000644000265600020320000000042212264261473016353 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ id_vgs.cir \ inverter.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/hfet/inverter.out0000644000265600020320000014763612264261473016731 0ustar andreasadmin Circuit: DCFL inverter circuit Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 2 2 0 3 -0.275446 4 -0.275535 vin#branch -3.59703e-11 vdd#branch 1.31971e-09 No. of Data Rows : 338 DCFL inverter circuit -------------------------------------------------------------------------------- Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 0 0.000000e+00 2.000000e+00 0.000000e+00 -2.754464e-01 1 1.000000e-13 2.000000e+00 0.000000e+00 -2.754464e-01 2 2.000000e-13 2.000000e+00 0.000000e+00 -2.754465e-01 3 4.000000e-13 2.000000e+00 0.000000e+00 -2.754465e-01 4 8.000000e-13 2.000000e+00 0.000000e+00 -2.754466e-01 5 1.600000e-12 2.000000e+00 0.000000e+00 -2.754467e-01 6 3.200000e-12 2.000000e+00 0.000000e+00 -2.754471e-01 7 6.400000e-12 2.000000e+00 0.000000e+00 -2.754477e-01 8 1.280000e-11 2.000000e+00 0.000000e+00 -2.754490e-01 9 2.280000e-11 2.000000e+00 0.000000e+00 -2.754509e-01 10 3.280000e-11 2.000000e+00 0.000000e+00 -2.754526e-01 11 4.280000e-11 2.000000e+00 0.000000e+00 -2.754543e-01 12 5.280000e-11 2.000000e+00 0.000000e+00 -2.754558e-01 13 6.280000e-11 2.000000e+00 0.000000e+00 -2.754572e-01 14 7.280000e-11 2.000000e+00 0.000000e+00 -2.754585e-01 15 8.280000e-11 2.000000e+00 0.000000e+00 -2.754598e-01 16 9.280000e-11 2.000000e+00 0.000000e+00 -2.754609e-01 17 1.028000e-10 2.000000e+00 0.000000e+00 -2.754620e-01 18 1.128000e-10 2.000000e+00 0.000000e+00 -2.754630e-01 19 1.228000e-10 2.000000e+00 0.000000e+00 -2.754639e-01 20 1.328000e-10 2.000000e+00 0.000000e+00 -2.754648e-01 21 1.428000e-10 2.000000e+00 0.000000e+00 -2.754656e-01 22 1.528000e-10 2.000000e+00 0.000000e+00 -2.754664e-01 23 1.628000e-10 2.000000e+00 0.000000e+00 -2.754671e-01 24 1.728000e-10 2.000000e+00 0.000000e+00 -2.754678e-01 25 1.828000e-10 2.000000e+00 0.000000e+00 -2.754684e-01 26 1.928000e-10 2.000000e+00 0.000000e+00 -2.754689e-01 27 2.028000e-10 2.000000e+00 0.000000e+00 -2.754695e-01 28 2.128000e-10 2.000000e+00 0.000000e+00 -2.754700e-01 29 2.228000e-10 2.000000e+00 0.000000e+00 -2.754704e-01 30 2.328000e-10 2.000000e+00 0.000000e+00 -2.754709e-01 31 2.428000e-10 2.000000e+00 0.000000e+00 -2.754713e-01 32 2.528000e-10 2.000000e+00 0.000000e+00 -2.754717e-01 33 2.628000e-10 2.000000e+00 0.000000e+00 -2.754720e-01 34 2.728000e-10 2.000000e+00 0.000000e+00 -2.754723e-01 35 2.828000e-10 2.000000e+00 0.000000e+00 -2.754726e-01 36 2.928000e-10 2.000000e+00 0.000000e+00 -2.754729e-01 37 3.028000e-10 2.000000e+00 0.000000e+00 -2.754732e-01 38 3.128000e-10 2.000000e+00 0.000000e+00 -2.754734e-01 39 3.228000e-10 2.000000e+00 0.000000e+00 -2.754737e-01 40 3.328000e-10 2.000000e+00 0.000000e+00 -2.754739e-01 41 3.428000e-10 2.000000e+00 0.000000e+00 -2.754741e-01 42 3.528000e-10 2.000000e+00 0.000000e+00 -2.754743e-01 43 3.628000e-10 2.000000e+00 0.000000e+00 -2.754745e-01 44 3.728000e-10 2.000000e+00 0.000000e+00 -2.754746e-01 45 3.828000e-10 2.000000e+00 0.000000e+00 -2.754748e-01 46 3.928000e-10 2.000000e+00 0.000000e+00 -2.754749e-01 47 4.028000e-10 2.000000e+00 0.000000e+00 -2.754750e-01 48 4.128000e-10 2.000000e+00 0.000000e+00 -2.754752e-01 49 4.228000e-10 2.000000e+00 0.000000e+00 -2.754753e-01 50 4.328000e-10 2.000000e+00 0.000000e+00 -2.754754e-01 51 4.428000e-10 2.000000e+00 0.000000e+00 -2.754755e-01 52 4.528000e-10 2.000000e+00 0.000000e+00 -2.754756e-01 53 4.628000e-10 2.000000e+00 0.000000e+00 -2.754757e-01 54 4.728000e-10 2.000000e+00 0.000000e+00 -2.754758e-01 Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 55 4.828000e-10 2.000000e+00 0.000000e+00 -2.754758e-01 56 4.928000e-10 2.000000e+00 0.000000e+00 -2.754759e-01 57 5.028000e-10 2.000000e+00 0.000000e+00 -2.754760e-01 58 5.128000e-10 2.000000e+00 0.000000e+00 -2.754760e-01 59 5.228000e-10 2.000000e+00 0.000000e+00 -2.754761e-01 60 5.328000e-10 2.000000e+00 0.000000e+00 -2.754761e-01 61 5.428000e-10 2.000000e+00 0.000000e+00 -2.754762e-01 62 5.528000e-10 2.000000e+00 0.000000e+00 -2.754762e-01 63 5.628000e-10 2.000000e+00 0.000000e+00 -2.754763e-01 64 5.728000e-10 2.000000e+00 0.000000e+00 -2.754763e-01 65 5.828000e-10 2.000000e+00 0.000000e+00 -2.754764e-01 66 5.928000e-10 2.000000e+00 0.000000e+00 -2.754764e-01 67 6.028000e-10 2.000000e+00 0.000000e+00 -2.754764e-01 68 6.128000e-10 2.000000e+00 0.000000e+00 -2.754765e-01 69 6.228000e-10 2.000000e+00 0.000000e+00 -2.754765e-01 70 6.328000e-10 2.000000e+00 0.000000e+00 -2.754765e-01 71 6.428000e-10 2.000000e+00 0.000000e+00 -2.754765e-01 72 6.528000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 73 6.628000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 74 6.728000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 75 6.828000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 76 6.928000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 77 7.028000e-10 2.000000e+00 0.000000e+00 -2.754766e-01 78 7.128000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 79 7.228000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 80 7.328000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 81 7.428000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 82 7.528000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 83 7.628000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 84 7.728000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 85 7.828000e-10 2.000000e+00 0.000000e+00 -2.754767e-01 86 7.928000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 87 8.028000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 88 8.128000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 89 8.228000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 90 8.328000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 91 8.428000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 92 8.528000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 93 8.628000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 94 8.728000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 95 8.828000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 96 8.928000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 97 9.028000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 98 9.128000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 99 9.228000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 100 9.328000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 101 9.428000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 102 9.528000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 103 9.628000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 104 9.728000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 105 9.828000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 106 9.928000e-10 2.000000e+00 0.000000e+00 -2.754768e-01 107 1.000000e-09 2.000000e+00 0.000000e+00 -2.754768e-01 108 1.000500e-09 2.000000e+00 1.000000e-01 -2.536058e-01 109 1.000625e-09 2.000000e+00 1.250000e-01 -2.471611e-01 110 1.000875e-09 2.000000e+00 1.750000e-01 -2.298135e-01 111 1.001375e-09 2.000000e+00 2.750000e-01 -1.854793e-01 112 1.001500e-09 2.000000e+00 3.000000e-01 -1.739954e-01 Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 113 1.001531e-09 2.000000e+00 3.062500e-01 -1.711110e-01 114 1.001594e-09 2.000000e+00 3.187500e-01 -1.652804e-01 115 1.001719e-09 2.000000e+00 3.437500e-01 -1.533777e-01 116 1.001750e-09 2.000000e+00 3.500000e-01 -1.503734e-01 117 1.001813e-09 2.000000e+00 3.625000e-01 -1.443194e-01 118 1.001937e-09 2.000000e+00 3.875000e-01 -1.320334e-01 119 1.001969e-09 2.000000e+00 3.937500e-01 -1.289378e-01 120 1.002031e-09 2.000000e+00 4.062500e-01 -1.227208e-01 121 1.002156e-09 2.000000e+00 4.312500e-01 -1.101840e-01 122 1.002406e-09 2.000000e+00 4.812500e-01 -8.488070e-02 123 1.002469e-09 2.000000e+00 4.937500e-01 -7.851234e-02 124 1.002594e-09 2.000000e+00 5.187500e-01 -6.582131e-02 125 1.002844e-09 2.000000e+00 5.687500e-01 -4.067242e-02 126 1.003344e-09 2.000000e+00 6.687500e-01 7.817310e-03 127 1.004344e-09 2.000000e+00 8.687500e-01 9.221666e-02 128 1.005000e-09 2.000000e+00 1.000000e+00 1.415557e-01 129 1.005200e-09 2.000000e+00 1.000000e+00 1.409346e-01 130 1.005600e-09 2.000000e+00 1.000000e+00 1.372951e-01 131 1.006400e-09 2.000000e+00 1.000000e+00 1.267527e-01 132 1.008000e-09 2.000000e+00 1.000000e+00 1.069739e-01 133 1.009887e-09 2.000000e+00 1.000000e+00 9.095597e-02 134 1.012840e-09 2.000000e+00 1.000000e+00 7.439795e-02 135 1.017563e-09 2.000000e+00 1.000000e+00 5.316238e-02 136 1.026126e-09 2.000000e+00 1.000000e+00 2.558201e-02 137 1.036126e-09 2.000000e+00 1.000000e+00 5.137378e-03 138 1.046126e-09 2.000000e+00 1.000000e+00 -6.539894e-03 139 1.056126e-09 2.000000e+00 1.000000e+00 -1.374962e-02 140 1.066126e-09 2.000000e+00 1.000000e+00 -1.764029e-02 141 1.076126e-09 2.000000e+00 1.000000e+00 -2.025724e-02 142 1.086126e-09 2.000000e+00 1.000000e+00 -2.146908e-02 143 1.096126e-09 2.000000e+00 1.000000e+00 -2.249602e-02 144 1.106126e-09 2.000000e+00 1.000000e+00 -2.279177e-02 145 1.116126e-09 2.000000e+00 1.000000e+00 -2.326223e-02 146 1.126126e-09 2.000000e+00 1.000000e+00 -2.324920e-02 147 1.136126e-09 2.000000e+00 1.000000e+00 -2.352163e-02 148 1.146126e-09 2.000000e+00 1.000000e+00 -2.340952e-02 149 1.156126e-09 2.000000e+00 1.000000e+00 -2.360743e-02 150 1.166126e-09 2.000000e+00 1.000000e+00 -2.346721e-02 151 1.176126e-09 2.000000e+00 1.000000e+00 -2.363342e-02 152 1.186126e-09 2.000000e+00 1.000000e+00 -2.348924e-02 153 1.196126e-09 2.000000e+00 1.000000e+00 -2.363901e-02 154 1.206126e-09 2.000000e+00 1.000000e+00 -2.349884e-02 155 1.216126e-09 2.000000e+00 1.000000e+00 -2.363783e-02 156 1.226126e-09 2.000000e+00 1.000000e+00 -2.350402e-02 157 1.236126e-09 2.000000e+00 1.000000e+00 -2.363451e-02 158 1.246126e-09 2.000000e+00 1.000000e+00 -2.350757e-02 159 1.256126e-09 2.000000e+00 1.000000e+00 -2.363075e-02 160 1.266126e-09 2.000000e+00 1.000000e+00 -2.351057e-02 161 1.276126e-09 2.000000e+00 1.000000e+00 -2.362707e-02 162 1.286126e-09 2.000000e+00 1.000000e+00 -2.351321e-02 163 1.296126e-09 2.000000e+00 1.000000e+00 -2.362354e-02 164 1.306126e-09 2.000000e+00 1.000000e+00 -2.351565e-02 165 1.316126e-09 2.000000e+00 1.000000e+00 -2.362025e-02 166 1.326126e-09 2.000000e+00 1.000000e+00 -2.351795e-02 167 1.336126e-09 2.000000e+00 1.000000e+00 -2.361721e-02 168 1.346126e-09 2.000000e+00 1.000000e+00 -2.352013e-02 169 1.356126e-09 2.000000e+00 1.000000e+00 -2.361438e-02 170 1.366126e-09 2.000000e+00 1.000000e+00 -2.352220e-02 Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 171 1.376126e-09 2.000000e+00 1.000000e+00 -2.361177e-02 172 1.386126e-09 2.000000e+00 1.000000e+00 -2.352416e-02 173 1.396126e-09 2.000000e+00 1.000000e+00 -2.360933e-02 174 1.406126e-09 2.000000e+00 1.000000e+00 -2.352602e-02 175 1.416126e-09 2.000000e+00 1.000000e+00 -2.360707e-02 176 1.426126e-09 2.000000e+00 1.000000e+00 -2.352778e-02 177 1.436126e-09 2.000000e+00 1.000000e+00 -2.360497e-02 178 1.446126e-09 2.000000e+00 1.000000e+00 -2.352945e-02 179 1.456126e-09 2.000000e+00 1.000000e+00 -2.360300e-02 180 1.466126e-09 2.000000e+00 1.000000e+00 -2.353104e-02 181 1.476126e-09 2.000000e+00 1.000000e+00 -2.360117e-02 182 1.486126e-09 2.000000e+00 1.000000e+00 -2.353255e-02 183 1.496126e-09 2.000000e+00 1.000000e+00 -2.359945e-02 184 1.506126e-09 2.000000e+00 1.000000e+00 -2.353398e-02 185 1.516126e-09 2.000000e+00 1.000000e+00 -2.359784e-02 186 1.526126e-09 2.000000e+00 1.000000e+00 -2.353533e-02 187 1.536126e-09 2.000000e+00 1.000000e+00 -2.359634e-02 188 1.546126e-09 2.000000e+00 1.000000e+00 -2.353662e-02 189 1.556126e-09 2.000000e+00 1.000000e+00 -2.359492e-02 190 1.566126e-09 2.000000e+00 1.000000e+00 -2.353785e-02 191 1.576126e-09 2.000000e+00 1.000000e+00 -2.359359e-02 192 1.586126e-09 2.000000e+00 1.000000e+00 -2.353906e-02 193 1.596126e-09 2.000000e+00 1.000000e+00 -2.359239e-02 194 1.606126e-09 2.000000e+00 1.000000e+00 -2.354012e-02 195 1.616126e-09 2.000000e+00 1.000000e+00 -2.359115e-02 196 1.626126e-09 2.000000e+00 1.000000e+00 -2.354117e-02 197 1.636126e-09 2.000000e+00 1.000000e+00 -2.359004e-02 198 1.646126e-09 2.000000e+00 1.000000e+00 -2.354217e-02 199 1.656126e-09 2.000000e+00 1.000000e+00 -2.358899e-02 200 1.666126e-09 2.000000e+00 1.000000e+00 -2.354313e-02 201 1.676126e-09 2.000000e+00 1.000000e+00 -2.358799e-02 202 1.686126e-09 2.000000e+00 1.000000e+00 -2.354403e-02 203 1.696126e-09 2.000000e+00 1.000000e+00 -2.358705e-02 204 1.706126e-09 2.000000e+00 1.000000e+00 -2.354490e-02 205 1.716126e-09 2.000000e+00 1.000000e+00 -2.358616e-02 206 1.726126e-09 2.000000e+00 1.000000e+00 -2.354573e-02 207 1.736126e-09 2.000000e+00 1.000000e+00 -2.358531e-02 208 1.746126e-09 2.000000e+00 1.000000e+00 -2.354651e-02 209 1.756126e-09 2.000000e+00 1.000000e+00 -2.358451e-02 210 1.766126e-09 2.000000e+00 1.000000e+00 -2.354726e-02 211 1.776126e-09 2.000000e+00 1.000000e+00 -2.358374e-02 212 1.786126e-09 2.000000e+00 1.000000e+00 -2.354798e-02 213 1.796126e-09 2.000000e+00 1.000000e+00 -2.358302e-02 214 1.806126e-09 2.000000e+00 1.000000e+00 -2.354866e-02 215 1.816126e-09 2.000000e+00 1.000000e+00 -2.358232e-02 216 1.826126e-09 2.000000e+00 1.000000e+00 -2.354932e-02 217 1.836126e-09 2.000000e+00 1.000000e+00 -2.358167e-02 218 1.846126e-09 2.000000e+00 1.000000e+00 -2.354994e-02 219 1.856126e-09 2.000000e+00 1.000000e+00 -2.358104e-02 220 1.866126e-09 2.000000e+00 1.000000e+00 -2.355054e-02 221 1.876126e-09 2.000000e+00 1.000000e+00 -2.358044e-02 222 1.886126e-09 2.000000e+00 1.000000e+00 -2.355111e-02 223 1.896126e-09 2.000000e+00 1.000000e+00 -2.357987e-02 224 1.906126e-09 2.000000e+00 1.000000e+00 -2.355166e-02 225 1.916126e-09 2.000000e+00 1.000000e+00 -2.357932e-02 226 1.926126e-09 2.000000e+00 1.000000e+00 -2.355218e-02 227 1.936126e-09 2.000000e+00 1.000000e+00 -2.357880e-02 228 1.946126e-09 2.000000e+00 1.000000e+00 -2.355268e-02 Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 229 1.956126e-09 2.000000e+00 1.000000e+00 -2.357830e-02 230 1.966126e-09 2.000000e+00 1.000000e+00 -2.355316e-02 231 1.976126e-09 2.000000e+00 1.000000e+00 -2.357782e-02 232 1.986126e-09 2.000000e+00 1.000000e+00 -2.355363e-02 233 1.996126e-09 2.000000e+00 1.000000e+00 -2.357736e-02 234 2.000000e-09 2.000000e+00 1.000000e+00 -2.355441e-02 235 2.001000e-09 2.000000e+00 1.000000e+00 -2.356510e-02 236 2.003000e-09 2.000000e+00 1.000000e+00 -2.356606e-02 237 2.007000e-09 2.000000e+00 1.000000e+00 -2.356518e-02 238 2.015000e-09 2.000000e+00 1.000000e+00 -2.356602e-02 239 2.025000e-09 2.000000e+00 1.000000e+00 -2.356519e-02 240 2.035000e-09 2.000000e+00 1.000000e+00 -2.356600e-02 241 2.045000e-09 2.000000e+00 1.000000e+00 -2.356521e-02 242 2.055000e-09 2.000000e+00 1.000000e+00 -2.356599e-02 243 2.065000e-09 2.000000e+00 1.000000e+00 -2.356522e-02 244 2.075000e-09 2.000000e+00 1.000000e+00 -2.356597e-02 245 2.085000e-09 2.000000e+00 1.000000e+00 -2.356523e-02 246 2.095000e-09 2.000000e+00 1.000000e+00 -2.356595e-02 247 2.105000e-09 2.000000e+00 1.000000e+00 -2.356525e-02 248 2.115000e-09 2.000000e+00 1.000000e+00 -2.356594e-02 249 2.125000e-09 2.000000e+00 1.000000e+00 -2.356526e-02 250 2.135000e-09 2.000000e+00 1.000000e+00 -2.356593e-02 251 2.145000e-09 2.000000e+00 1.000000e+00 -2.356527e-02 252 2.155000e-09 2.000000e+00 1.000000e+00 -2.356591e-02 253 2.165000e-09 2.000000e+00 1.000000e+00 -2.356528e-02 254 2.175000e-09 2.000000e+00 1.000000e+00 -2.356590e-02 255 2.185000e-09 2.000000e+00 1.000000e+00 -2.356529e-02 256 2.195000e-09 2.000000e+00 1.000000e+00 -2.356589e-02 257 2.205000e-09 2.000000e+00 1.000000e+00 -2.356530e-02 258 2.215000e-09 2.000000e+00 1.000000e+00 -2.356588e-02 259 2.225000e-09 2.000000e+00 1.000000e+00 -2.356531e-02 260 2.235000e-09 2.000000e+00 1.000000e+00 -2.356586e-02 261 2.245000e-09 2.000000e+00 1.000000e+00 -2.356532e-02 262 2.255000e-09 2.000000e+00 1.000000e+00 -2.356585e-02 263 2.265000e-09 2.000000e+00 1.000000e+00 -2.356533e-02 264 2.275000e-09 2.000000e+00 1.000000e+00 -2.356584e-02 265 2.285000e-09 2.000000e+00 1.000000e+00 -2.356534e-02 266 2.295000e-09 2.000000e+00 1.000000e+00 -2.356583e-02 267 2.305000e-09 2.000000e+00 1.000000e+00 -2.356535e-02 268 2.315000e-09 2.000000e+00 1.000000e+00 -2.356583e-02 269 2.325000e-09 2.000000e+00 1.000000e+00 -2.356536e-02 270 2.335000e-09 2.000000e+00 1.000000e+00 -2.356582e-02 271 2.345000e-09 2.000000e+00 1.000000e+00 -2.356537e-02 272 2.355000e-09 2.000000e+00 1.000000e+00 -2.356581e-02 273 2.365000e-09 2.000000e+00 1.000000e+00 -2.356537e-02 274 2.375000e-09 2.000000e+00 1.000000e+00 -2.356580e-02 275 2.385000e-09 2.000000e+00 1.000000e+00 -2.356538e-02 276 2.395000e-09 2.000000e+00 1.000000e+00 -2.356579e-02 277 2.405000e-09 2.000000e+00 1.000000e+00 -2.356539e-02 278 2.415000e-09 2.000000e+00 1.000000e+00 -2.356578e-02 279 2.425000e-09 2.000000e+00 1.000000e+00 -2.356540e-02 280 2.435000e-09 2.000000e+00 1.000000e+00 -2.356578e-02 281 2.445000e-09 2.000000e+00 1.000000e+00 -2.356540e-02 282 2.455000e-09 2.000000e+00 1.000000e+00 -2.356577e-02 283 2.465000e-09 2.000000e+00 1.000000e+00 -2.356541e-02 284 2.475000e-09 2.000000e+00 1.000000e+00 -2.356576e-02 285 2.485000e-09 2.000000e+00 1.000000e+00 -2.356542e-02 286 2.495000e-09 2.000000e+00 1.000000e+00 -2.356576e-02 Index time V(1) V(2) V(3) -------------------------------------------------------------------------------- 287 2.505000e-09 2.000000e+00 1.000000e+00 -2.356542e-02 288 2.515000e-09 2.000000e+00 1.000000e+00 -2.356575e-02 289 2.525000e-09 2.000000e+00 1.000000e+00 -2.356543e-02 290 2.535000e-09 2.000000e+00 1.000000e+00 -2.356575e-02 291 2.545000e-09 2.000000e+00 1.000000e+00 -2.356543e-02 292 2.555000e-09 2.000000e+00 1.000000e+00 -2.356574e-02 293 2.565000e-09 2.000000e+00 1.000000e+00 -2.356544e-02 294 2.575000e-09 2.000000e+00 1.000000e+00 -2.356574e-02 295 2.585000e-09 2.000000e+00 1.000000e+00 -2.356544e-02 296 2.595000e-09 2.000000e+00 1.000000e+00 -2.356573e-02 297 2.605000e-09 2.000000e+00 1.000000e+00 -2.356545e-02 298 2.615000e-09 2.000000e+00 1.000000e+00 -2.356572e-02 299 2.625000e-09 2.000000e+00 1.000000e+00 -2.356545e-02 300 2.635000e-09 2.000000e+00 1.000000e+00 -2.356572e-02 301 2.645000e-09 2.000000e+00 1.000000e+00 -2.356546e-02 302 2.655000e-09 2.000000e+00 1.000000e+00 -2.356572e-02 303 2.665000e-09 2.000000e+00 1.000000e+00 -2.356546e-02 304 2.675000e-09 2.000000e+00 1.000000e+00 -2.356571e-02 305 2.685000e-09 2.000000e+00 1.000000e+00 -2.356547e-02 306 2.695000e-09 2.000000e+00 1.000000e+00 -2.356571e-02 307 2.705000e-09 2.000000e+00 1.000000e+00 -2.356547e-02 308 2.715000e-09 2.000000e+00 1.000000e+00 -2.356570e-02 309 2.725000e-09 2.000000e+00 1.000000e+00 -2.356548e-02 310 2.735000e-09 2.000000e+00 1.000000e+00 -2.356570e-02 311 2.745000e-09 2.000000e+00 1.000000e+00 -2.356548e-02 312 2.755000e-09 2.000000e+00 1.000000e+00 -2.356569e-02 313 2.765000e-09 2.000000e+00 1.000000e+00 -2.356548e-02 314 2.775000e-09 2.000000e+00 1.000000e+00 -2.356569e-02 315 2.785000e-09 2.000000e+00 1.000000e+00 -2.356549e-02 316 2.795000e-09 2.000000e+00 1.000000e+00 -2.356569e-02 317 2.805000e-09 2.000000e+00 1.000000e+00 -2.356549e-02 318 2.815000e-09 2.000000e+00 1.000000e+00 -2.356568e-02 319 2.825000e-09 2.000000e+00 1.000000e+00 -2.356549e-02 320 2.835000e-09 2.000000e+00 1.000000e+00 -2.356568e-02 321 2.845000e-09 2.000000e+00 1.000000e+00 -2.356550e-02 322 2.855000e-09 2.000000e+00 1.000000e+00 -2.356568e-02 323 2.865000e-09 2.000000e+00 1.000000e+00 -2.356550e-02 324 2.875000e-09 2.000000e+00 1.000000e+00 -2.356567e-02 325 2.885000e-09 2.000000e+00 1.000000e+00 -2.356550e-02 326 2.895000e-09 2.000000e+00 1.000000e+00 -2.356567e-02 327 2.905000e-09 2.000000e+00 1.000000e+00 -2.356551e-02 328 2.915000e-09 2.000000e+00 1.000000e+00 -2.356567e-02 329 2.925000e-09 2.000000e+00 1.000000e+00 -2.356551e-02 330 2.935000e-09 2.000000e+00 1.000000e+00 -2.356567e-02 331 2.945000e-09 2.000000e+00 1.000000e+00 -2.356551e-02 332 2.955000e-09 2.000000e+00 1.000000e+00 -2.356566e-02 333 2.965000e-09 2.000000e+00 1.000000e+00 -2.356551e-02 334 2.975000e-09 2.000000e+00 1.000000e+00 -2.356566e-02 335 2.985000e-09 2.000000e+00 1.000000e+00 -2.356552e-02 336 2.995000e-09 2.000000e+00 1.000000e+00 -2.356566e-02 337 3.000000e-09 2.000000e+00 1.000000e+00 -2.356552e-02 DCFL inverter circuit -------------------------------------------------------------------------------- Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -2.755353e-01 0.000000e+00 1.319715e-09 1 1.000000e-13 -2.755352e-01 1.000000e-13 1.398994e-09 2 2.000000e-13 -2.755352e-01 2.000000e-13 1.472862e-09 3 4.000000e-13 -2.755351e-01 4.000000e-13 1.583757e-09 4 8.000000e-13 -2.755350e-01 8.000000e-13 1.642401e-09 5 1.600000e-12 -2.755347e-01 1.600000e-12 1.628870e-09 6 3.200000e-12 -2.755340e-01 3.200000e-12 1.632494e-09 7 6.400000e-12 -2.755328e-01 6.400000e-12 1.619913e-09 8 1.280000e-11 -2.755305e-01 1.280000e-11 1.612052e-09 9 2.280000e-11 -2.755270e-01 2.280000e-11 1.587462e-09 10 3.280000e-11 -2.755238e-01 3.280000e-11 1.573886e-09 11 4.280000e-11 -2.755208e-01 4.280000e-11 1.552466e-09 12 5.280000e-11 -2.755181e-01 5.280000e-11 1.541194e-09 13 6.280000e-11 -2.755155e-01 6.280000e-11 1.522078e-09 14 7.280000e-11 -2.755131e-01 7.280000e-11 1.512499e-09 15 8.280000e-11 -2.755109e-01 8.280000e-11 1.495636e-09 16 9.280000e-11 -2.755089e-01 9.280000e-11 1.487528e-09 17 1.028000e-10 -2.755070e-01 1.028000e-10 1.472634e-09 18 1.128000e-10 -2.755052e-01 1.128000e-10 1.465795e-09 19 1.228000e-10 -2.755036e-01 1.228000e-10 1.452626e-09 20 1.328000e-10 -2.755021e-01 1.328000e-10 1.446881e-09 21 1.428000e-10 -2.755007e-01 1.428000e-10 1.435224e-09 22 1.528000e-10 -2.754993e-01 1.528000e-10 1.430420e-09 23 1.628000e-10 -2.754981e-01 1.628000e-10 1.420089e-09 24 1.728000e-10 -2.754970e-01 1.728000e-10 1.416095e-09 25 1.828000e-10 -2.754960e-01 1.828000e-10 1.406927e-09 26 1.928000e-10 -2.754950e-01 1.928000e-10 1.403629e-09 27 2.028000e-10 -2.754941e-01 2.028000e-10 1.395482e-09 28 2.128000e-10 -2.754932e-01 2.128000e-10 1.392780e-09 29 2.228000e-10 -2.754925e-01 2.228000e-10 1.385530e-09 30 2.328000e-10 -2.754917e-01 2.328000e-10 1.383338e-09 31 2.428000e-10 -2.754911e-01 2.428000e-10 1.376878e-09 32 2.528000e-10 -2.754904e-01 2.528000e-10 1.375122e-09 33 2.628000e-10 -2.754899e-01 2.628000e-10 1.369355e-09 34 2.728000e-10 -2.754893e-01 2.728000e-10 1.367972e-09 35 2.828000e-10 -2.754888e-01 2.828000e-10 1.362816e-09 36 2.928000e-10 -2.754884e-01 2.928000e-10 1.361750e-09 37 3.028000e-10 -2.754879e-01 3.028000e-10 1.357133e-09 38 3.128000e-10 -2.754875e-01 3.128000e-10 1.356335e-09 39 3.228000e-10 -2.754872e-01 3.228000e-10 1.352193e-09 40 3.328000e-10 -2.754868e-01 3.328000e-10 1.351622e-09 41 3.428000e-10 -2.754865e-01 3.428000e-10 1.347900e-09 42 3.528000e-10 -2.754862e-01 3.528000e-10 1.347521e-09 43 3.628000e-10 -2.754859e-01 3.628000e-10 1.344169e-09 44 3.728000e-10 -2.754857e-01 3.728000e-10 1.343952e-09 45 3.828000e-10 -2.754855e-01 3.828000e-10 1.340928e-09 46 3.928000e-10 -2.754852e-01 3.928000e-10 1.340845e-09 47 4.028000e-10 -2.754850e-01 4.028000e-10 1.338112e-09 48 4.128000e-10 -2.754848e-01 4.128000e-10 1.338141e-09 49 4.228000e-10 -2.754847e-01 4.228000e-10 1.335666e-09 50 4.328000e-10 -2.754845e-01 4.328000e-10 1.335788e-09 51 4.428000e-10 -2.754844e-01 4.428000e-10 1.333541e-09 52 4.528000e-10 -2.754842e-01 4.528000e-10 1.333739e-09 53 4.628000e-10 -2.754841e-01 4.628000e-10 1.331697e-09 54 4.728000e-10 -2.754840e-01 4.728000e-10 1.331955e-09 Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 55 4.828000e-10 -2.754839e-01 4.828000e-10 1.330095e-09 56 4.928000e-10 -2.754837e-01 4.928000e-10 1.330403e-09 57 5.028000e-10 -2.754837e-01 5.028000e-10 1.328704e-09 58 5.128000e-10 -2.754836e-01 5.128000e-10 1.329051e-09 59 5.228000e-10 -2.754835e-01 5.228000e-10 1.327497e-09 60 5.328000e-10 -2.754834e-01 5.328000e-10 1.327874e-09 61 5.428000e-10 -2.754833e-01 5.428000e-10 1.326449e-09 62 5.528000e-10 -2.754833e-01 5.528000e-10 1.326848e-09 63 5.628000e-10 -2.754832e-01 5.628000e-10 1.325540e-09 64 5.728000e-10 -2.754831e-01 5.728000e-10 1.325956e-09 65 5.828000e-10 -2.754831e-01 5.828000e-10 1.324752e-09 66 5.928000e-10 -2.754830e-01 5.928000e-10 1.325178e-09 67 6.028000e-10 -2.754830e-01 6.028000e-10 1.324068e-09 68 6.128000e-10 -2.754830e-01 6.128000e-10 1.324500e-09 69 6.228000e-10 -2.754829e-01 6.228000e-10 1.323475e-09 70 6.328000e-10 -2.754829e-01 6.328000e-10 1.323909e-09 71 6.428000e-10 -2.754828e-01 6.428000e-10 1.322961e-09 72 6.528000e-10 -2.754828e-01 6.528000e-10 1.323395e-09 73 6.628000e-10 -2.754828e-01 6.628000e-10 1.322516e-09 74 6.728000e-10 -2.754828e-01 6.728000e-10 1.322946e-09 75 6.828000e-10 -2.754827e-01 6.828000e-10 1.322130e-09 76 6.928000e-10 -2.754827e-01 6.928000e-10 1.322555e-09 77 7.028000e-10 -2.754827e-01 7.028000e-10 1.321796e-09 78 7.128000e-10 -2.754827e-01 7.128000e-10 1.322214e-09 79 7.228000e-10 -2.754826e-01 7.228000e-10 1.321507e-09 80 7.328000e-10 -2.754826e-01 7.328000e-10 1.321916e-09 81 7.428000e-10 -2.754826e-01 7.428000e-10 1.321257e-09 82 7.528000e-10 -2.754826e-01 7.528000e-10 1.321656e-09 83 7.628000e-10 -2.754826e-01 7.628000e-10 1.321041e-09 84 7.728000e-10 -2.754826e-01 7.728000e-10 1.321429e-09 85 7.828000e-10 -2.754826e-01 7.828000e-10 1.320854e-09 86 7.928000e-10 -2.754825e-01 7.928000e-10 1.321231e-09 87 8.028000e-10 -2.754825e-01 8.028000e-10 1.320692e-09 88 8.128000e-10 -2.754825e-01 8.128000e-10 1.321058e-09 89 8.228000e-10 -2.754825e-01 8.228000e-10 1.320553e-09 90 8.328000e-10 -2.754825e-01 8.328000e-10 1.320906e-09 91 8.428000e-10 -2.754825e-01 8.428000e-10 1.320433e-09 92 8.528000e-10 -2.754825e-01 8.528000e-10 1.320774e-09 93 8.628000e-10 -2.754825e-01 8.628000e-10 1.320329e-09 94 8.728000e-10 -2.754825e-01 8.728000e-10 1.320658e-09 95 8.828000e-10 -2.754825e-01 8.828000e-10 1.320240e-09 96 8.928000e-10 -2.754825e-01 8.928000e-10 1.320557e-09 97 9.028000e-10 -2.754825e-01 9.028000e-10 1.320163e-09 98 9.128000e-10 -2.754825e-01 9.128000e-10 1.320468e-09 99 9.228000e-10 -2.754825e-01 9.228000e-10 1.319890e-09 100 9.328000e-10 -2.754825e-01 9.328000e-10 1.320568e-09 101 9.428000e-10 -2.754825e-01 9.428000e-10 1.319097e-09 102 9.528000e-10 -2.754825e-01 9.528000e-10 1.320869e-09 103 9.628000e-10 -2.754824e-01 9.628000e-10 1.319607e-09 104 9.728000e-10 -2.754824e-01 9.728000e-10 1.320794e-09 105 9.828000e-10 -2.754824e-01 9.828000e-10 1.319581e-09 106 9.928000e-10 -2.754824e-01 9.928000e-10 1.320591e-09 107 1.000000e-09 -2.754824e-01 1.000000e-09 1.319708e-09 108 1.000500e-09 -2.739095e-01 1.000500e-09 3.095522e-04 109 1.000625e-09 -2.735376e-01 1.000625e-09 3.971348e-04 110 1.000875e-09 -2.723278e-01 1.000875e-09 6.385589e-04 111 1.001375e-09 -2.709220e-01 1.001375e-09 1.164845e-03 112 1.001500e-09 -2.708076e-01 1.001500e-09 1.274812e-03 Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 113 1.001531e-09 -2.707664e-01 1.001531e-09 1.302291e-03 114 1.001594e-09 -2.706515e-01 1.001594e-09 1.357921e-03 115 1.001719e-09 -2.703571e-01 1.001719e-09 1.468891e-03 116 1.001750e-09 -2.702928e-01 1.001750e-09 1.495624e-03 117 1.001813e-09 -2.701469e-01 1.001813e-09 1.549266e-03 118 1.001937e-09 -2.698314e-01 1.001937e-09 1.654781e-03 119 1.001969e-09 -2.697644e-01 1.001969e-09 1.680101e-03 120 1.002031e-09 -2.696145e-01 1.002031e-09 1.730627e-03 121 1.002156e-09 -2.692886e-01 1.002156e-09 1.829045e-03 122 1.002406e-09 -2.685602e-01 1.002406e-09 2.012921e-03 123 1.002469e-09 -2.684261e-01 1.002469e-09 2.054515e-03 124 1.002594e-09 -2.680546e-01 1.002594e-09 2.136091e-03 125 1.002844e-09 -2.670856e-01 1.002844e-09 2.284591e-03 126 1.003344e-09 -2.640150e-01 1.003344e-09 2.522172e-03 127 1.004344e-09 -2.505700e-01 1.004344e-09 2.788187e-03 128 1.005000e-09 -2.398001e-01 1.005000e-09 2.845742e-03 129 1.005200e-09 -2.435709e-01 1.005200e-09 2.517217e-03 130 1.005600e-09 -2.503760e-01 1.005600e-09 1.898151e-03 131 1.006400e-09 -2.575077e-01 1.006400e-09 1.027876e-03 132 1.008000e-09 -2.596029e-01 1.008000e-09 2.176104e-04 133 1.009887e-09 -2.598183e-01 1.009887e-09 -4.852503e-05 134 1.012840e-09 -2.611107e-01 1.012840e-09 -9.904073e-05 135 1.017563e-09 -2.622923e-01 1.017563e-09 -6.632878e-05 136 1.026126e-09 -2.640637e-01 1.026126e-09 -2.069864e-05 137 1.036126e-09 -2.653206e-01 1.036126e-09 1.038803e-05 138 1.046126e-09 -2.664202e-01 1.046126e-09 3.174502e-05 139 1.056126e-09 -2.671545e-01 1.056126e-09 4.089804e-05 140 1.066126e-09 -2.679147e-01 1.066126e-09 4.979284e-05 141 1.076126e-09 -2.684470e-01 1.076126e-09 5.137632e-05 142 1.086126e-09 -2.690414e-01 1.086126e-09 5.600302e-05 143 1.096126e-09 -2.694692e-01 1.096126e-09 5.499002e-05 144 1.106126e-09 -2.699589e-01 1.106126e-09 5.813362e-05 145 1.116126e-09 -2.703190e-01 1.116126e-09 5.623570e-05 146 1.126126e-09 -2.707309e-01 1.126126e-09 5.885612e-05 147 1.136126e-09 -2.710405e-01 1.136126e-09 5.667141e-05 148 1.146126e-09 -2.713897e-01 1.146126e-09 5.909547e-05 149 1.156126e-09 -2.716588e-01 1.156126e-09 5.683003e-05 150 1.166126e-09 -2.719551e-01 1.166126e-09 5.916579e-05 151 1.176126e-09 -2.721903e-01 1.176126e-09 5.689412e-05 152 1.186126e-09 -2.724415e-01 1.186126e-09 5.917677e-05 153 1.196126e-09 -2.726480e-01 1.196126e-09 5.692677e-05 154 1.206126e-09 -2.728603e-01 1.206126e-09 5.916653e-05 155 1.216126e-09 -2.730423e-01 1.216126e-09 5.694958e-05 156 1.226126e-09 -2.732210e-01 1.226126e-09 5.914830e-05 157 1.236126e-09 -2.733821e-01 1.236126e-09 5.696973e-05 158 1.246126e-09 -2.735317e-01 1.246126e-09 5.912698e-05 159 1.256126e-09 -2.736749e-01 1.256126e-09 5.698989e-05 160 1.266126e-09 -2.737994e-01 1.266126e-09 5.910456e-05 161 1.276126e-09 -2.739270e-01 1.276126e-09 5.701050e-05 162 1.286126e-09 -2.740299e-01 1.286126e-09 5.908110e-05 163 1.296126e-09 -2.741443e-01 1.296126e-09 5.703173e-05 164 1.306126e-09 -2.742285e-01 1.306126e-09 5.905728e-05 165 1.316126e-09 -2.743315e-01 1.316126e-09 5.705350e-05 166 1.326126e-09 -2.743995e-01 1.326126e-09 5.903322e-05 167 1.336126e-09 -2.744927e-01 1.336126e-09 5.707572e-05 168 1.346126e-09 -2.745469e-01 1.346126e-09 5.900905e-05 169 1.356126e-09 -2.746317e-01 1.356126e-09 5.709827e-05 170 1.366126e-09 -2.746739e-01 1.366126e-09 5.898485e-05 Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 171 1.376126e-09 -2.747514e-01 1.376126e-09 5.712103e-05 172 1.386126e-09 -2.747833e-01 1.386126e-09 5.896070e-05 173 1.396126e-09 -2.748544e-01 1.396126e-09 5.714390e-05 174 1.406126e-09 -2.748776e-01 1.406126e-09 5.893666e-05 175 1.416126e-09 -2.749432e-01 1.416126e-09 5.716680e-05 176 1.426126e-09 -2.749588e-01 1.426126e-09 5.891279e-05 177 1.436126e-09 -2.750197e-01 1.436126e-09 5.718964e-05 178 1.446126e-09 -2.750289e-01 1.446126e-09 5.888915e-05 179 1.456126e-09 -2.750855e-01 1.456126e-09 5.721237e-05 180 1.466126e-09 -2.750892e-01 1.466126e-09 5.886578e-05 181 1.476126e-09 -2.751422e-01 1.476126e-09 5.723491e-05 182 1.486126e-09 -2.751413e-01 1.486126e-09 5.884271e-05 183 1.496126e-09 -2.751910e-01 1.496126e-09 5.725723e-05 184 1.506126e-09 -2.751861e-01 1.506126e-09 5.881998e-05 185 1.516126e-09 -2.752330e-01 1.516126e-09 5.727928e-05 186 1.526126e-09 -2.752248e-01 1.526126e-09 5.879762e-05 187 1.536126e-09 -2.752692e-01 1.536126e-09 5.730102e-05 188 1.546126e-09 -2.752582e-01 1.546126e-09 5.877564e-05 189 1.556126e-09 -2.753003e-01 1.556126e-09 5.732241e-05 190 1.566126e-09 -2.752870e-01 1.566126e-09 5.875408e-05 191 1.576126e-09 -2.753270e-01 1.576126e-09 5.734344e-05 192 1.586126e-09 -2.753118e-01 1.586126e-09 5.873318e-05 193 1.596126e-09 -2.753500e-01 1.596126e-09 5.736417e-05 194 1.606126e-09 -2.753332e-01 1.606126e-09 5.871214e-05 195 1.616126e-09 -2.753698e-01 1.616126e-09 5.738436e-05 196 1.626126e-09 -2.753517e-01 1.626126e-09 5.869197e-05 197 1.636126e-09 -2.753868e-01 1.636126e-09 5.740415e-05 198 1.646126e-09 -2.753677e-01 1.646126e-09 5.867219e-05 199 1.656126e-09 -2.754014e-01 1.656126e-09 5.742353e-05 200 1.666126e-09 -2.753815e-01 1.666126e-09 5.865286e-05 201 1.676126e-09 -2.754139e-01 1.676126e-09 5.744248e-05 202 1.686126e-09 -2.753935e-01 1.686126e-09 5.863400e-05 203 1.696126e-09 -2.754247e-01 1.696126e-09 5.746098e-05 204 1.706126e-09 -2.754038e-01 1.706126e-09 5.861560e-05 205 1.716126e-09 -2.754339e-01 1.716126e-09 5.747903e-05 206 1.726126e-09 -2.754128e-01 1.726126e-09 5.859766e-05 207 1.736126e-09 -2.754418e-01 1.736126e-09 5.749663e-05 208 1.746126e-09 -2.754205e-01 1.746126e-09 5.858019e-05 209 1.756126e-09 -2.754485e-01 1.756126e-09 5.751379e-05 210 1.766126e-09 -2.754273e-01 1.766126e-09 5.856319e-05 211 1.776126e-09 -2.754543e-01 1.776126e-09 5.753049e-05 212 1.786126e-09 -2.754331e-01 1.786126e-09 5.854664e-05 213 1.796126e-09 -2.754593e-01 1.796126e-09 5.754675e-05 214 1.806126e-09 -2.754382e-01 1.806126e-09 5.853055e-05 215 1.816126e-09 -2.754635e-01 1.816126e-09 5.756256e-05 216 1.826126e-09 -2.754426e-01 1.826126e-09 5.851490e-05 217 1.836126e-09 -2.754671e-01 1.836126e-09 5.757794e-05 218 1.846126e-09 -2.754464e-01 1.846126e-09 5.849970e-05 219 1.856126e-09 -2.754701e-01 1.856126e-09 5.759289e-05 220 1.866126e-09 -2.754497e-01 1.866126e-09 5.848493e-05 221 1.876126e-09 -2.754727e-01 1.876126e-09 5.760740e-05 222 1.886126e-09 -2.754527e-01 1.886126e-09 5.847059e-05 223 1.896126e-09 -2.754749e-01 1.896126e-09 5.762150e-05 224 1.906126e-09 -2.754552e-01 1.906126e-09 5.845667e-05 225 1.916126e-09 -2.754768e-01 1.916126e-09 5.763519e-05 226 1.926126e-09 -2.754574e-01 1.926126e-09 5.844316e-05 227 1.936126e-09 -2.754784e-01 1.936126e-09 5.764847e-05 228 1.946126e-09 -2.754594e-01 1.946126e-09 5.843006e-05 Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 229 1.956126e-09 -2.754797e-01 1.956126e-09 5.766136e-05 230 1.966126e-09 -2.754611e-01 1.966126e-09 5.841735e-05 231 1.976126e-09 -2.754808e-01 1.976126e-09 5.767386e-05 232 1.986126e-09 -2.754627e-01 1.986126e-09 5.840503e-05 233 1.996126e-09 -2.754817e-01 1.996126e-09 5.768598e-05 234 2.000000e-09 -2.754639e-01 2.000000e-09 5.838390e-05 235 2.001000e-09 -2.754725e-01 2.001000e-09 5.805627e-05 236 2.003000e-09 -2.754732e-01 2.003000e-09 5.802976e-05 237 2.007000e-09 -2.754728e-01 2.007000e-09 5.805472e-05 238 2.015000e-09 -2.754737e-01 2.015000e-09 5.803051e-05 239 2.025000e-09 -2.754736e-01 2.025000e-09 5.805427e-05 240 2.035000e-09 -2.754746e-01 2.035000e-09 5.803088e-05 241 2.045000e-09 -2.754744e-01 2.045000e-09 5.805389e-05 242 2.055000e-09 -2.754754e-01 2.055000e-09 5.803125e-05 243 2.065000e-09 -2.754751e-01 2.065000e-09 5.805352e-05 244 2.075000e-09 -2.754760e-01 2.075000e-09 5.803161e-05 245 2.085000e-09 -2.754758e-01 2.085000e-09 5.805316e-05 246 2.095000e-09 -2.754765e-01 2.095000e-09 5.803196e-05 247 2.105000e-09 -2.754763e-01 2.105000e-09 5.805281e-05 248 2.115000e-09 -2.754770e-01 2.115000e-09 5.803230e-05 249 2.125000e-09 -2.754767e-01 2.125000e-09 5.805247e-05 250 2.135000e-09 -2.754774e-01 2.135000e-09 5.803263e-05 251 2.145000e-09 -2.754771e-01 2.145000e-09 5.805214e-05 252 2.155000e-09 -2.754778e-01 2.155000e-09 5.803294e-05 253 2.165000e-09 -2.754775e-01 2.165000e-09 5.805182e-05 254 2.175000e-09 -2.754781e-01 2.175000e-09 5.803325e-05 255 2.185000e-09 -2.754778e-01 2.185000e-09 5.805151e-05 256 2.195000e-09 -2.754783e-01 2.195000e-09 5.803355e-05 257 2.205000e-09 -2.754780e-01 2.205000e-09 5.805121e-05 258 2.215000e-09 -2.754786e-01 2.215000e-09 5.803385e-05 259 2.225000e-09 -2.754782e-01 2.225000e-09 5.805092e-05 260 2.235000e-09 -2.754788e-01 2.235000e-09 5.803413e-05 261 2.245000e-09 -2.754784e-01 2.245000e-09 5.805064e-05 262 2.255000e-09 -2.754789e-01 2.255000e-09 5.803440e-05 263 2.265000e-09 -2.754786e-01 2.265000e-09 5.805037e-05 264 2.275000e-09 -2.754791e-01 2.275000e-09 5.803467e-05 265 2.285000e-09 -2.754787e-01 2.285000e-09 5.805011e-05 266 2.295000e-09 -2.754792e-01 2.295000e-09 5.803493e-05 267 2.305000e-09 -2.754788e-01 2.305000e-09 5.804985e-05 268 2.315000e-09 -2.754793e-01 2.315000e-09 5.803518e-05 269 2.325000e-09 -2.754790e-01 2.325000e-09 5.804961e-05 270 2.335000e-09 -2.754794e-01 2.335000e-09 5.803542e-05 271 2.345000e-09 -2.754790e-01 2.345000e-09 5.804937e-05 272 2.355000e-09 -2.754795e-01 2.355000e-09 5.803565e-05 273 2.365000e-09 -2.754791e-01 2.365000e-09 5.804914e-05 274 2.375000e-09 -2.754795e-01 2.375000e-09 5.803588e-05 275 2.385000e-09 -2.754792e-01 2.385000e-09 5.804891e-05 276 2.395000e-09 -2.754796e-01 2.395000e-09 5.803610e-05 277 2.405000e-09 -2.754793e-01 2.405000e-09 5.804870e-05 278 2.415000e-09 -2.754796e-01 2.415000e-09 5.803631e-05 279 2.425000e-09 -2.754793e-01 2.425000e-09 5.804849e-05 280 2.435000e-09 -2.754797e-01 2.435000e-09 5.803652e-05 281 2.445000e-09 -2.754794e-01 2.445000e-09 5.804828e-05 282 2.455000e-09 -2.754797e-01 2.455000e-09 5.803671e-05 283 2.465000e-09 -2.754794e-01 2.465000e-09 5.804809e-05 284 2.475000e-09 -2.754797e-01 2.475000e-09 5.803691e-05 285 2.485000e-09 -2.754794e-01 2.485000e-09 5.804790e-05 286 2.495000e-09 -2.754797e-01 2.495000e-09 5.803709e-05 Index time V(4) time vdd#branch -------------------------------------------------------------------------------- 287 2.505000e-09 -2.754795e-01 2.505000e-09 5.804772e-05 288 2.515000e-09 -2.754798e-01 2.515000e-09 5.803727e-05 289 2.525000e-09 -2.754795e-01 2.525000e-09 5.804754e-05 290 2.535000e-09 -2.754798e-01 2.535000e-09 5.803745e-05 291 2.545000e-09 -2.754795e-01 2.545000e-09 5.804737e-05 292 2.555000e-09 -2.754798e-01 2.555000e-09 5.803762e-05 293 2.565000e-09 -2.754795e-01 2.565000e-09 5.804720e-05 294 2.575000e-09 -2.754798e-01 2.575000e-09 5.803778e-05 295 2.585000e-09 -2.754796e-01 2.585000e-09 5.804704e-05 296 2.595000e-09 -2.754798e-01 2.595000e-09 5.803794e-05 297 2.605000e-09 -2.754796e-01 2.605000e-09 5.804688e-05 298 2.615000e-09 -2.754798e-01 2.615000e-09 5.803809e-05 299 2.625000e-09 -2.754796e-01 2.625000e-09 5.804673e-05 300 2.635000e-09 -2.754798e-01 2.635000e-09 5.803824e-05 301 2.645000e-09 -2.754796e-01 2.645000e-09 5.804659e-05 302 2.655000e-09 -2.754798e-01 2.655000e-09 5.803838e-05 303 2.665000e-09 -2.754796e-01 2.665000e-09 5.804645e-05 304 2.675000e-09 -2.754798e-01 2.675000e-09 5.803852e-05 305 2.685000e-09 -2.754796e-01 2.685000e-09 5.804631e-05 306 2.695000e-09 -2.754798e-01 2.695000e-09 5.803865e-05 307 2.705000e-09 -2.754796e-01 2.705000e-09 5.804618e-05 308 2.715000e-09 -2.754798e-01 2.715000e-09 5.803878e-05 309 2.725000e-09 -2.754796e-01 2.725000e-09 5.804606e-05 310 2.735000e-09 -2.754798e-01 2.735000e-09 5.803890e-05 311 2.745000e-09 -2.754796e-01 2.745000e-09 5.804593e-05 312 2.755000e-09 -2.754798e-01 2.755000e-09 5.803902e-05 313 2.765000e-09 -2.754797e-01 2.765000e-09 5.804582e-05 314 2.775000e-09 -2.754798e-01 2.775000e-09 5.803914e-05 315 2.785000e-09 -2.754797e-01 2.785000e-09 5.804570e-05 316 2.795000e-09 -2.754798e-01 2.795000e-09 5.803925e-05 317 2.805000e-09 -2.754797e-01 2.805000e-09 5.804559e-05 318 2.815000e-09 -2.754798e-01 2.815000e-09 5.803936e-05 319 2.825000e-09 -2.754797e-01 2.825000e-09 5.804548e-05 320 2.835000e-09 -2.754798e-01 2.835000e-09 5.803946e-05 321 2.845000e-09 -2.754797e-01 2.845000e-09 5.804538e-05 322 2.855000e-09 -2.754798e-01 2.855000e-09 5.803957e-05 323 2.865000e-09 -2.754797e-01 2.865000e-09 5.804528e-05 324 2.875000e-09 -2.754798e-01 2.875000e-09 5.803966e-05 325 2.885000e-09 -2.754797e-01 2.885000e-09 5.804519e-05 326 2.895000e-09 -2.754798e-01 2.895000e-09 5.803976e-05 327 2.905000e-09 -2.754797e-01 2.905000e-09 5.804509e-05 328 2.915000e-09 -2.754798e-01 2.915000e-09 5.803985e-05 329 2.925000e-09 -2.754797e-01 2.925000e-09 5.804500e-05 330 2.935000e-09 -2.754798e-01 2.935000e-09 5.803994e-05 331 2.945000e-09 -2.754797e-01 2.945000e-09 5.804492e-05 332 2.955000e-09 -2.754798e-01 2.955000e-09 5.804002e-05 333 2.965000e-09 -2.754797e-01 2.965000e-09 5.804483e-05 334 2.975000e-09 -2.754798e-01 2.975000e-09 5.804011e-05 335 2.985000e-09 -2.754797e-01 2.985000e-09 5.804475e-05 336 2.995000e-09 -2.754798e-01 2.995000e-09 5.804019e-05 337 3.000000e-09 -2.754797e-01 3.000000e-09 5.804463e-05 DCFL inverter circuit -------------------------------------------------------------------------------- Index time vin#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -3.597027e-11 1 1.000000e-13 -8.325604e-11 2 2.000000e-13 -1.295404e-10 3 4.000000e-13 -2.011381e-10 4 8.000000e-13 -2.417378e-10 5 1.600000e-12 -2.324317e-10 6 3.200000e-12 -2.351270e-10 7 6.400000e-12 -2.268303e-10 8 1.280000e-11 -2.220794e-10 9 2.280000e-11 -2.062019e-10 10 3.280000e-11 -1.977800e-10 11 4.280000e-11 -1.839484e-10 12 5.280000e-11 -1.769647e-10 13 6.280000e-11 -1.646257e-10 14 7.280000e-11 -1.586943e-10 15 8.280000e-11 -1.478124e-10 16 9.280000e-11 -1.427941e-10 17 1.028000e-10 -1.331872e-10 18 1.128000e-10 -1.289553e-10 19 1.228000e-10 -1.204663e-10 20 1.328000e-10 -1.169110e-10 21 1.428000e-10 -1.094023e-10 22 1.528000e-10 -1.064287e-10 23 1.628000e-10 -9.978034e-11 24 1.728000e-10 -9.730590e-11 25 1.828000e-10 -9.141294e-11 26 1.928000e-10 -8.936644e-11 27 2.028000e-10 -8.413712e-11 28 2.128000e-10 -8.245686e-11 29 2.228000e-10 -7.781099e-11 30 2.328000e-10 -7.644362e-11 31 2.428000e-10 -7.231102e-11 32 2.528000e-10 -7.121044e-11 33 2.628000e-10 -6.752974e-11 34 2.728000e-10 -6.665612e-11 35 2.828000e-10 -6.337359e-11 36 2.928000e-10 -6.269257e-11 37 3.028000e-10 -5.976118e-11 38 3.128000e-10 -5.924311e-11 39 3.228000e-10 -5.662166e-11 40 3.328000e-10 -5.624102e-11 41 3.428000e-10 -5.389340e-11 42 3.528000e-10 -5.362822e-11 43 3.628000e-10 -5.152278e-11 44 3.728000e-10 -5.135415e-11 45 3.828000e-10 -4.946314e-11 46 3.928000e-10 -4.937485e-11 47 4.028000e-10 -4.767390e-11 48 4.128000e-10 -4.765203e-11 49 4.228000e-10 -4.611974e-11 50 4.328000e-10 -4.615239e-11 51 4.428000e-10 -4.476995e-11 52 4.528000e-10 -4.484694e-11 53 4.628000e-10 -4.359783e-11 54 4.728000e-10 -4.371046e-11 Index time vin#branch -------------------------------------------------------------------------------- 55 4.828000e-10 -4.258012e-11 56 4.928000e-10 -4.272102e-11 57 5.028000e-10 -4.169664e-11 58 5.128000e-10 -4.185951e-11 59 5.228000e-10 -4.092979e-11 60 5.328000e-10 -4.110932e-11 61 5.428000e-10 -4.026431e-11 62 5.528000e-10 -4.045601e-11 63 5.628000e-10 -3.968690e-11 64 5.728000e-10 -3.988699e-11 65 5.828000e-10 -3.918601e-11 66 5.928000e-10 -3.939134e-11 67 6.028000e-10 -3.875159e-11 68 6.128000e-10 -3.895952e-11 69 6.228000e-10 -3.837491e-11 70 6.328000e-10 -3.858326e-11 71 6.428000e-10 -3.804837e-11 72 6.528000e-10 -3.825535e-11 73 6.628000e-10 -3.776539e-11 74 6.728000e-10 -3.796954e-11 75 6.828000e-10 -3.752022e-11 76 6.928000e-10 -3.772035e-11 77 7.028000e-10 -3.730787e-11 78 7.128000e-10 -3.750305e-11 79 7.228000e-10 -3.712402e-11 80 7.328000e-10 -3.731352e-11 81 7.428000e-10 -3.696490e-11 82 7.528000e-10 -3.714816e-11 83 7.628000e-10 -3.682724e-11 84 7.728000e-10 -3.700385e-11 85 7.828000e-10 -3.670820e-11 86 7.928000e-10 -3.687786e-11 87 8.028000e-10 -3.660531e-11 88 8.128000e-10 -3.676784e-11 89 8.228000e-10 -3.651642e-11 90 8.328000e-10 -3.667173e-11 91 8.428000e-10 -3.643967e-11 92 8.528000e-10 -3.658773e-11 93 8.628000e-10 -3.637344e-11 94 8.728000e-10 -3.651430e-11 95 8.828000e-10 -3.631634e-11 96 8.928000e-10 -3.645006e-11 97 9.028000e-10 -3.626713e-11 98 9.128000e-10 -3.639384e-11 99 9.228000e-10 -3.609357e-11 100 9.328000e-10 -3.645734e-11 101 9.428000e-10 -3.559005e-11 102 9.528000e-10 -3.664623e-11 103 9.628000e-10 -3.591700e-11 104 9.728000e-10 -3.659667e-11 105 9.828000e-10 -3.590208e-11 106 9.928000e-10 -3.646646e-11 107 1.000000e-09 -3.598353e-11 108 1.000500e-09 -4.345505e-04 109 1.000625e-09 -5.327530e-04 110 1.000875e-09 -8.037847e-04 111 1.001375e-09 -1.505213e-03 112 1.001500e-09 -1.646465e-03 Index time vin#branch -------------------------------------------------------------------------------- 113 1.001531e-09 -1.688694e-03 114 1.001594e-09 -1.797399e-03 115 1.001719e-09 -2.056880e-03 116 1.001750e-09 -2.114032e-03 117 1.001813e-09 -2.246406e-03 118 1.001937e-09 -2.540125e-03 119 1.001969e-09 -2.607493e-03 120 1.002031e-09 -2.753548e-03 121 1.002156e-09 -3.061848e-03 122 1.002406e-09 -3.695352e-03 123 1.002469e-09 -3.836624e-03 124 1.002594e-09 -4.130665e-03 125 1.002844e-09 -4.706260e-03 126 1.003344e-09 -5.726739e-03 127 1.004344e-09 -6.916053e-03 128 1.005000e-09 -6.968118e-03 129 1.005200e-09 -6.025083e-03 130 1.005600e-09 -4.361792e-03 131 1.006400e-09 -2.286552e-03 132 1.008000e-09 -6.589523e-04 133 1.009887e-09 -2.385717e-04 134 1.012840e-09 -1.034070e-04 135 1.017563e-09 -8.755799e-05 136 1.026126e-09 -5.144927e-05 137 1.036126e-09 -3.368199e-05 138 1.046126e-09 -1.655647e-05 139 1.056126e-09 -1.290848e-05 140 1.066126e-09 -4.548308e-06 141 1.076126e-09 -5.608596e-06 142 1.086126e-09 -4.492497e-07 143 1.096126e-09 -3.024494e-06 144 1.106126e-09 9.060477e-07 145 1.116126e-09 -2.068893e-06 146 1.126126e-09 1.311870e-06 147 1.136126e-09 -1.681604e-06 148 1.146126e-09 1.392680e-06 149 1.156126e-09 -1.491686e-06 150 1.166126e-09 1.366493e-06 151 1.176126e-09 -1.373713e-06 152 1.186126e-09 1.306788e-06 153 1.196126e-09 -1.284206e-06 154 1.206126e-09 1.238964e-06 155 1.216126e-09 -1.207904e-06 156 1.226126e-09 1.171671e-06 157 1.236126e-09 -1.139284e-06 158 1.246126e-09 1.107450e-06 159 1.256126e-09 -1.076324e-06 160 1.266126e-09 1.047040e-06 161 1.276126e-09 -1.017749e-06 162 1.286126e-09 9.907819e-07 163 1.296126e-09 -9.633922e-07 164 1.306126e-09 9.381953e-07 165 1.316126e-09 -9.126821e-07 166 1.326126e-09 8.890920e-07 167 1.336126e-09 -8.653325e-07 168 1.346126e-09 8.432159e-07 169 1.356126e-09 -8.210781e-07 170 1.366126e-09 8.003221e-07 Index time vin#branch -------------------------------------------------------------------------------- 171 1.376126e-09 -7.796778e-07 172 1.386126e-09 7.601816e-07 173 1.396126e-09 -7.409115e-07 174 1.406126e-09 7.225831e-07 175 1.416126e-09 -7.045777e-07 176 1.426126e-09 6.873329e-07 177 1.436126e-09 -6.704922e-07 178 1.446126e-09 6.542534e-07 179 1.456126e-09 -6.384864e-07 180 1.466126e-09 6.231820e-07 181 1.476126e-09 -6.084056e-07 182 1.486126e-09 5.939697e-07 183 1.496126e-09 -5.801082e-07 184 1.506126e-09 5.664800e-07 185 1.516126e-09 -5.534642e-07 186 1.526126e-09 5.405876e-07 187 1.536126e-09 -5.283544e-07 188 1.546126e-09 5.161778e-07 189 1.556126e-09 -5.046696e-07 190 1.566126e-09 4.931451e-07 191 1.576126e-09 -4.823093e-07 192 1.586126e-09 4.712313e-07 193 1.596126e-09 -4.611051e-07 194 1.606126e-09 4.509666e-07 195 1.616126e-09 -4.412598e-07 196 1.626126e-09 4.314023e-07 197 1.636126e-09 -4.223031e-07 198 1.646126e-09 4.129714e-07 199 1.656126e-09 -4.043781e-07 200 1.666126e-09 3.955148e-07 201 1.676126e-09 -3.873921e-07 202 1.686126e-09 3.789640e-07 203 1.696126e-09 -3.712787e-07 204 1.706126e-09 3.632572e-07 205 1.716126e-09 -3.559801e-07 206 1.726126e-09 3.483393e-07 207 1.736126e-09 -3.414439e-07 208 1.746126e-09 3.341603e-07 209 1.756126e-09 -3.276220e-07 210 1.766126e-09 3.206737e-07 211 1.776126e-09 -3.144701e-07 212 1.786126e-09 3.078370e-07 213 1.796126e-09 -3.019473e-07 214 1.806126e-09 2.956106e-07 215 1.816126e-09 -2.900156e-07 216 1.826126e-09 2.839580e-07 217 1.836126e-09 -2.786399e-07 218 1.846126e-09 2.728452e-07 219 1.856126e-09 -2.677878e-07 220 1.866126e-09 2.622410e-07 221 1.876126e-09 -2.574289e-07 222 1.886126e-09 2.521160e-07 223 1.896126e-09 -2.475352e-07 224 1.906126e-09 2.424433e-07 225 1.916126e-09 -2.380807e-07 226 1.926126e-09 2.331977e-07 227 1.936126e-09 -2.290411e-07 228 1.946126e-09 2.243557e-07 Index time vin#branch -------------------------------------------------------------------------------- 229 1.956126e-09 -2.203939e-07 230 1.966126e-09 2.158955e-07 231 1.976126e-09 -2.121179e-07 232 1.986126e-09 2.077968e-07 233 1.996126e-09 -2.041937e-07 234 2.000000e-09 1.941415e-07 235 2.001000e-09 8.564805e-09 236 2.003000e-09 -8.010890e-09 237 2.007000e-09 7.298733e-09 238 2.015000e-09 -7.436472e-09 239 2.025000e-09 6.975031e-09 240 2.035000e-09 -7.150308e-09 241 2.045000e-09 6.693180e-09 242 2.055000e-09 -6.876277e-09 243 2.065000e-09 6.425193e-09 244 2.075000e-09 -6.614974e-09 245 2.085000e-09 6.169556e-09 246 2.095000e-09 -6.365617e-09 247 2.105000e-09 5.925496e-09 248 2.115000e-09 -6.127448e-09 249 2.125000e-09 5.692337e-09 250 2.135000e-09 -5.899819e-09 251 2.145000e-09 5.469463e-09 252 2.155000e-09 -5.682146e-09 253 2.165000e-09 5.256308e-09 254 2.175000e-09 -5.473888e-09 255 2.185000e-09 5.052347e-09 256 2.195000e-09 -5.274541e-09 257 2.205000e-09 4.857089e-09 258 2.215000e-09 -5.083637e-09 259 2.225000e-09 4.670079e-09 260 2.235000e-09 -4.900739e-09 261 2.245000e-09 4.490889e-09 262 2.255000e-09 -4.725439e-09 263 2.265000e-09 4.319121e-09 264 2.275000e-09 -4.557353e-09 265 2.285000e-09 4.154402e-09 266 2.295000e-09 -4.396123e-09 267 2.305000e-09 3.996383e-09 268 2.315000e-09 -4.241413e-09 269 2.325000e-09 3.844737e-09 270 2.335000e-09 -4.092909e-09 271 2.345000e-09 3.699157e-09 272 2.355000e-09 -3.950314e-09 273 2.365000e-09 3.559354e-09 274 2.375000e-09 -3.813350e-09 275 2.385000e-09 3.425057e-09 276 2.395000e-09 -3.681756e-09 277 2.405000e-09 3.296011e-09 278 2.415000e-09 -3.555284e-09 279 2.425000e-09 3.171977e-09 280 2.435000e-09 -3.433703e-09 281 2.445000e-09 3.052726e-09 282 2.455000e-09 -3.316793e-09 283 2.465000e-09 2.938046e-09 284 2.475000e-09 -3.204347e-09 285 2.485000e-09 2.827736e-09 286 2.495000e-09 -3.096171e-09 Index time vin#branch -------------------------------------------------------------------------------- 287 2.505000e-09 2.721603e-09 288 2.515000e-09 -2.992078e-09 289 2.525000e-09 2.619469e-09 290 2.535000e-09 -2.891894e-09 291 2.545000e-09 2.521161e-09 292 2.555000e-09 -2.795453e-09 293 2.565000e-09 2.426520e-09 294 2.575000e-09 -2.702598e-09 295 2.585000e-09 2.335390e-09 296 2.595000e-09 -2.613180e-09 297 2.605000e-09 2.247627e-09 298 2.615000e-09 -2.527056e-09 299 2.625000e-09 2.163091e-09 300 2.635000e-09 -2.444093e-09 301 2.645000e-09 2.081653e-09 302 2.655000e-09 -2.364162e-09 303 2.665000e-09 2.003186e-09 304 2.675000e-09 -2.287142e-09 305 2.685000e-09 1.927572e-09 306 2.695000e-09 -2.212916e-09 307 2.705000e-09 1.854698e-09 308 2.715000e-09 -2.141375e-09 309 2.725000e-09 1.784455e-09 310 2.735000e-09 -2.072413e-09 311 2.745000e-09 1.716740e-09 312 2.755000e-09 -2.005928e-09 313 2.765000e-09 1.651456e-09 314 2.775000e-09 -1.941827e-09 315 2.785000e-09 1.588508e-09 316 2.795000e-09 -1.880016e-09 317 2.805000e-09 1.527808e-09 318 2.815000e-09 -1.820408e-09 319 2.825000e-09 1.469268e-09 320 2.835000e-09 -1.762920e-09 321 2.845000e-09 1.412808e-09 322 2.855000e-09 -1.707471e-09 323 2.865000e-09 1.358348e-09 324 2.875000e-09 -1.653985e-09 325 2.885000e-09 1.305815e-09 326 2.895000e-09 -1.602388e-09 327 2.905000e-09 1.255135e-09 328 2.915000e-09 -1.552611e-09 329 2.925000e-09 1.206241e-09 330 2.935000e-09 -1.504585e-09 331 2.945000e-09 1.159066e-09 332 2.955000e-09 -1.458246e-09 333 2.965000e-09 1.113547e-09 334 2.975000e-09 -1.413533e-09 335 2.985000e-09 1.069623e-09 336 2.995000e-09 -1.370386e-09 337 3.000000e-09 1.006627e-09 ngspice-26/tests/hfet/Makefile.in0000644000265600020320000003353612264261541016374 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/hfet DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ id_vgs.cir \ inverter.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/hfet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/hfet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/hfet/id_vgs.cir0000644000265600020320000000045712264261473016301 0ustar andreasadminHFET Id versus Vgs characteristic z1 1 2 0 hfet l=1u w=10u vgs 2 0 dc 0.3 vds 1 0 dc 1.0 .options noacct .model hfet nhfet level=5 rdi=0 rsi=0 m=2.57 lambda=0.17 + vs=1.5e5 mu=0.385 vt0=0.13 eta=1.32 sigma0=0.04 + vsigma=0.1 Vsigmat=0.3 js1s=0 js1d=0 nmax=6e15 .dc vds 0 1 0.01 .print DC i(vds) .end ngspice-26/tests/jfet/0000755000265600020320000000000012264261714014321 5ustar andreasadminngspice-26/tests/jfet/jfet_vds-vgs.cir0000644000265600020320000000032112264261473017417 0ustar andreasadmin* I-V Characteristics of JFET 2N4221 * * j1 2 1 0 MODJ VD 2 0 25 VG 1 0 -2 * .model MODJ NJF LEVEL=1 VTO=-3.5 BETA=4.1E-4 LAMBDA=0.002 RD=200 * .options noacct .op .dc VD 0 25 1 VG -3 0 1 .print DC I(VD) .END ngspice-26/tests/jfet/Makefile.am0000644000265600020320000000040412264261473016355 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = jfet_vds-vgs.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/jfet/Makefile.in0000644000265600020320000003351712264261541016375 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/jfet DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = jfet_vds-vgs.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/jfet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/jfet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/jfet/jfet_vds-vgs.out0000644000265600020320000001272712264261473017466 0ustar andreasadmin Circuit: * I-V Characteristics of JFET 2N4221 Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Node Voltage ---- ------- ---- ------- V(1) -2.00000e+00 V(2) 2.500000e+01 Source Current ------ ------- vd#branch -9.68268e-04 vg#branch 2.882635e-11 JFET models (Junction Field effect transistor) model modj type njf vt0 -3.5 beta 0.00041 lambda 0.002 rd 200 rs 0 cgs 0 cgd 0 pb 1 is 1e-14 fc 0.5 b 1 kf 2.51987e-312 af 2.51987e-312 JFET: Junction Field effect transistor device j1 model modj vgs -2 vgd -26.8063 ig -2.88263e-11 id 0.000968268 is -0.000968268 igd -2.68163e-11 gm 0.00129102 gds 1.845e-06 ggs 1e-12 ggd 1e-12 Vsource: Independent voltage source device vg vd dc -2 25 acmag 0 0 i 2.88263e-11 -0.000968268 p 5.76527e-11 0.0242067 * I-V Characteristics of JFET 2N4221 DC transfer characteristic Sat Aug 27 16:23:28 2005 -------------------------------------------------------------------------------- Index v-sweep vd#branch -------------------------------------------------------------------------------- 0 0.000000e+00 -2.781885e-12 1 1.000000e+00 -1.027008e-04 2 2.000000e+00 -1.029058e-04 3 3.000000e+00 -1.031108e-04 4 4.000000e+00 -1.033158e-04 5 5.000000e+00 -1.035208e-04 6 6.000000e+00 -1.037258e-04 7 7.000000e+00 -1.039307e-04 8 8.000000e+00 -1.041357e-04 9 9.000000e+00 -1.043407e-04 10 1.000000e+01 -1.045457e-04 11 1.100000e+01 -1.047507e-04 12 1.200000e+01 -1.049557e-04 13 1.300000e+01 -1.051607e-04 14 1.400000e+01 -1.053657e-04 15 1.500000e+01 -1.055707e-04 16 1.600000e+01 -1.057757e-04 17 1.700000e+01 -1.059807e-04 18 1.800000e+01 -1.061857e-04 19 1.900000e+01 -1.063907e-04 20 2.000000e+01 -1.065957e-04 21 2.100000e+01 -1.068006e-04 22 2.200000e+01 -1.070056e-04 23 2.300000e+01 -1.072106e-04 24 2.400000e+01 -1.074156e-04 25 2.500000e+01 -1.076206e-04 26 0.000000e+00 -1.613162e-12 27 1.000000e+00 -7.504957e-04 28 2.000000e+00 -9.258484e-04 29 3.000000e+00 -9.276927e-04 30 4.000000e+00 -9.295370e-04 31 5.000000e+00 -9.313813e-04 32 6.000000e+00 -9.332256e-04 33 7.000000e+00 -9.350700e-04 34 8.000000e+00 -9.369143e-04 35 9.000000e+00 -9.387586e-04 36 1.000000e+01 -9.406029e-04 37 1.100000e+01 -9.424472e-04 38 1.200000e+01 -9.442916e-04 39 1.300000e+01 -9.461359e-04 40 1.400000e+01 -9.479802e-04 41 1.500000e+01 -9.498245e-04 42 1.600000e+01 -9.516689e-04 43 1.700000e+01 -9.535132e-04 44 1.800000e+01 -9.553575e-04 45 1.900000e+01 -9.572018e-04 46 2.000000e+01 -9.590461e-04 47 2.100000e+01 -9.608905e-04 48 2.200000e+01 -9.627348e-04 49 2.300000e+01 -9.645791e-04 50 2.400000e+01 -9.664234e-04 51 2.500000e+01 -9.682677e-04 52 0.000000e+00 -7.163119e-13 53 1.000000e+00 -1.295970e-03 54 2.000000e+00 -2.206134e-03 Index v-sweep vd#branch -------------------------------------------------------------------------------- 55 3.000000e+00 -2.575143e-03 56 4.000000e+00 -2.580355e-03 57 5.000000e+00 -2.585475e-03 58 6.000000e+00 -2.590595e-03 59 7.000000e+00 -2.595714e-03 60 8.000000e+00 -2.600834e-03 61 9.000000e+00 -2.605954e-03 62 1.000000e+01 -2.611074e-03 63 1.100000e+01 -2.616193e-03 64 1.200000e+01 -2.621313e-03 65 1.300000e+01 -2.626433e-03 66 1.400000e+01 -2.631553e-03 67 1.500000e+01 -2.636672e-03 68 1.600000e+01 -2.641792e-03 69 1.700000e+01 -2.646912e-03 70 1.800000e+01 -2.652032e-03 71 1.900000e+01 -2.657151e-03 72 2.000000e+01 -2.662271e-03 73 2.100000e+01 -2.667391e-03 74 2.200000e+01 -2.672511e-03 75 2.300000e+01 -2.677630e-03 76 2.400000e+01 -2.682750e-03 77 2.500000e+01 -2.687870e-03 78 0.000000e+00 -5.309914e-28 79 1.000000e+00 -1.712315e-03 80 2.000000e+00 -3.166366e-03 81 3.000000e+00 -4.287135e-03 82 4.000000e+00 -4.956515e-03 83 5.000000e+00 -5.062554e-03 84 6.000000e+00 -5.072579e-03 85 7.000000e+00 -5.082604e-03 86 8.000000e+00 -5.092629e-03 87 9.000000e+00 -5.102654e-03 88 1.000000e+01 -5.112679e-03 89 1.100000e+01 -5.122703e-03 90 1.200000e+01 -5.132728e-03 91 1.300000e+01 -5.142753e-03 92 1.400000e+01 -5.152778e-03 93 1.500000e+01 -5.162803e-03 94 1.600000e+01 -5.172828e-03 95 1.700000e+01 -5.182853e-03 96 1.800000e+01 -5.192878e-03 97 1.900000e+01 -5.202902e-03 98 2.000000e+01 -5.212927e-03 99 2.100000e+01 -5.222952e-03 100 2.200000e+01 -5.232977e-03 101 2.300000e+01 -5.243002e-03 102 2.400000e+01 -5.253027e-03 103 2.500000e+01 -5.263052e-03 CPU time since last call: 0.014 seconds. Total CPU time: 0.014 seconds. Current dynamic memory usage = 131072, Dynamic memory limit = -491521. ngspice-26/tests/general/0000755000265600020320000000000012264261714015006 5ustar andreasadminngspice-26/tests/general/rc.out0000644000265600020320000001500012264261473016141 0ustar andreasadminWarning: vin: no DC value, transient time 0 value used Circuit: Basic RC circuit Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 0 2 0 vin#branch 0 No. of Data Rows : 87 -------------------------------------------------------------------------- Basic RC circuit Legend: + = v(2) * = vin#branch -------------------------------------------------------------------------- time v(2) -1.00e+00 0.00e+00 1.00e+00 ----------------------|------------------------|------------------------| 0.000e+00 0.000e+00 . X . 1.000e-01 4.830e-02 .* .+ . 2.000e-01 1.385e-01 . * . + . 3.000e-01 2.204e-01 . * . + . 4.000e-01 2.947e-01 . * . + . 5.000e-01 3.619e-01 . * . + . 6.000e-01 4.226e-01 . * . + . 7.000e-01 4.776e-01 . * . + . 8.000e-01 5.274e-01 . * . + . 9.000e-01 5.724e-01 . * . + . 1.000e+00 6.131e-01 . * . + . 1.100e+00 6.500e-01 . * . + . 1.200e+00 6.833e-01 . * . + . 1.300e+00 7.135e-01 . * . + . 1.400e+00 7.407e-01 . * . + . 1.500e+00 7.654e-01 . * . + . 1.600e+00 7.878e-01 . * . + . 1.700e+00 8.080e-01 . * . + . 1.800e+00 8.263e-01 . * . + . 1.900e+00 8.428e-01 . * . + . 2.000e+00 8.578e-01 . * . + . 2.100e+00 8.713e-01 . * . + . 2.200e+00 8.836e-01 . * . + . 2.300e+00 8.947e-01 . * . + . 2.400e+00 9.047e-01 . * . + . 2.500e+00 9.138e-01 . * . + . 2.600e+00 9.220e-01 . * . + . 2.700e+00 9.294e-01 . * . + . 2.800e+00 9.361e-01 . * . + . 2.900e+00 9.422e-01 . * . + . 3.000e+00 9.477e-01 . * . + . 3.100e+00 9.527e-01 . * . + . 3.200e+00 9.572e-01 . * . + . 3.300e+00 9.613e-01 . *. +. 3.400e+00 9.650e-01 . *. +. 3.500e+00 9.683e-01 . *. +. 3.600e+00 9.713e-01 . *. +. 3.700e+00 9.741e-01 . *. +. 3.800e+00 9.765e-01 . *. +. 3.900e+00 9.788e-01 . *. +. 4.000e+00 9.808e-01 . *. +. 4.100e+00 9.826e-01 . *. +. 4.200e+00 9.843e-01 . *. +. 4.300e+00 9.858e-01 . *. +. 4.400e+00 9.871e-01 . *. +. 4.500e+00 9.884e-01 . *. +. 4.600e+00 9.895e-01 . *. +. 4.700e+00 9.905e-01 . *. +. 4.800e+00 9.914e-01 . *. +. 4.900e+00 9.922e-01 . *. +. 5.000e+00 9.929e-01 . *. +. 5.100e+00 9.936e-01 . *. +. ----------------------|------------------------|------------------------| time v(2) -1.00e+00 0.00e+00 1.00e+00 time v(2) -1.00e+00 0.00e+00 1.00e+00 ----------------------|------------------------|------------------------| 5.200e+00 9.942e-01 . *. +. 5.300e+00 9.948e-01 . *. +. 5.400e+00 9.953e-01 . *. +. 5.500e+00 9.957e-01 . *. +. 5.600e+00 9.961e-01 . *. +. 5.700e+00 9.965e-01 . *. +. 5.800e+00 9.968e-01 . *. +. 5.900e+00 9.971e-01 . *. +. 6.000e+00 9.974e-01 . *. +. 6.100e+00 9.977e-01 . *. +. 6.200e+00 9.979e-01 . *. +. 6.300e+00 9.981e-01 . *. +. 6.400e+00 9.983e-01 . *. +. 6.500e+00 9.984e-01 . *. +. 6.600e+00 9.986e-01 . *. +. 6.700e+00 9.987e-01 . *. +. 6.800e+00 9.988e-01 . *. +. 6.900e+00 9.989e-01 . *. +. 7.000e+00 9.990e-01 . *. +. ----------------------|------------------------|------------------------| time v(2) -1.00e+00 0.00e+00 1.00e+00 ngspice-26/tests/general/diffpair.out0000644000265600020320000000001312264261473017317 0ustar andreasadminTo be done ngspice-26/tests/general/rca3040.out0000644000265600020320000000025112264261473016613 0ustar andreasadmin Circuit: rca3040 ckt - rca 3040 wideband amplifier Warning -- Level not specified on line "bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va 50" Using level 1. ngspice-26/tests/general/fourbitadder.out0000644000265600020320000000001312264261473020205 0ustar andreasadminTo be done ngspice-26/tests/general/rtlinv.out0000644000265600020320000007042212264261473017064 0ustar andreasadminWarning: option lvlcod is obsolete. Warning: vin: no DC value, transient time 0 value used No. of Data Rows : 101 Circuit: rtlinv ckt - cascaded rtl inverters Warning -- Level not specified on line "(bf=50 rb=70 rc=40 ccs=2pf tf=0.1ns tr=10ns cje=0.9pf cjc=1.5pf pc=0.85 va=50)" Using level 1. Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 6 5 1 0 2 4.62228e-08 3 4.62218 4 0.844034 5 0.266506 vin#branch 4.62228e-12 vcc#branch -0.00511131 No. of Data Rows : 126 rtlinv ckt - cascaded rtl inverters * the original line is below *.opt acct list node lvlcod=2 .dc vin 0.0 2.5 0.025 .tran 2ns 200ns vcc 6 0 5 vin 1 0 pulse(0 5 2ns 2ns 2ns 80ns) rb1 1 2 10k rc1 6 3 1k q1 3 2 0 qnd rb2 3 4 10k q2 5 4 0 qnd rc2 6 5 1k .model qnd npn(bf=50 rb=70 rc=40 ccs=2pf tf=0.1ns tr=10ns cje=0.9pf + cjc=1.5pf pc=0.85 va=50) .opt list node lvlcod=2 .end rtlinv ckt - cascaded rtl inverters -------------------------------------------------------------------------------- Index v-sweep v(3) v(5) -------------------------------------------------------------------------------- 0 0.000000e+00 4.622185e+00 2.665056e-01 1 2.500000e-02 4.622185e+00 2.665056e-01 2 5.000000e-02 4.622185e+00 2.665056e-01 3 7.500000e-02 4.622185e+00 2.665056e-01 4 1.000000e-01 4.622185e+00 2.665056e-01 5 1.250000e-01 4.622185e+00 2.665056e-01 6 1.500000e-01 4.622185e+00 2.665056e-01 7 1.750000e-01 4.622185e+00 2.665056e-01 8 2.000000e-01 4.622185e+00 2.665056e-01 9 2.250000e-01 4.622185e+00 2.665056e-01 10 2.500000e-01 4.622185e+00 2.665056e-01 11 2.750000e-01 4.622185e+00 2.665056e-01 12 3.000000e-01 4.622185e+00 2.665056e-01 13 3.250000e-01 4.622185e+00 2.665056e-01 14 3.500000e-01 4.622185e+00 2.665056e-01 15 3.750000e-01 4.622185e+00 2.665056e-01 16 4.000000e-01 4.622184e+00 2.665056e-01 17 4.250000e-01 4.622184e+00 2.665056e-01 18 4.500000e-01 4.622181e+00 2.665057e-01 19 4.750000e-01 4.622176e+00 2.665057e-01 20 5.000000e-01 4.622160e+00 2.665058e-01 21 5.250000e-01 4.622121e+00 2.665061e-01 22 5.500000e-01 4.622016e+00 2.665069e-01 23 5.750000e-01 4.621742e+00 2.665091e-01 24 6.000000e-01 4.621028e+00 2.665147e-01 25 6.250000e-01 4.619189e+00 2.665290e-01 26 6.500000e-01 4.614596e+00 2.665650e-01 27 6.750000e-01 4.603869e+00 2.666492e-01 28 7.000000e-01 4.581809e+00 2.668234e-01 29 7.250000e-01 4.543818e+00 2.671271e-01 30 7.500000e-01 4.489147e+00 2.675721e-01 31 7.750000e-01 4.420497e+00 2.681451e-01 32 8.000000e-01 4.341435e+00 2.688255e-01 33 8.250000e-01 4.255111e+00 2.695948e-01 34 8.500000e-01 4.163237e+00 2.704464e-01 35 8.750000e-01 4.067545e+00 2.713721e-01 36 9.000000e-01 3.969081e+00 2.723692e-01 37 9.250000e-01 3.868550e+00 2.734382e-01 38 9.500000e-01 3.766469e+00 2.745817e-01 39 9.750000e-01 3.663221e+00 2.758039e-01 40 1.000000e+00 3.559095e+00 2.771109e-01 41 1.025000e+00 3.454314e+00 2.785106e-01 42 1.050000e+00 3.349052e+00 2.800130e-01 43 1.075000e+00 3.243447e+00 2.816308e-01 44 1.100000e+00 3.137610e+00 2.833796e-01 45 1.125000e+00 3.031633e+00 2.852791e-01 46 1.150000e+00 2.925589e+00 2.873546e-01 47 1.175000e+00 2.819539e+00 2.896385e-01 48 1.200000e+00 2.713536e+00 2.921738e-01 49 1.225000e+00 2.607624e+00 2.950186e-01 50 1.250000e+00 2.501838e+00 2.982544e-01 51 1.275000e+00 2.396211e+00 3.019999e-01 52 1.300000e+00 2.290769e+00 3.064379e-01 53 1.325000e+00 2.185536e+00 3.118709e-01 54 1.350000e+00 2.080531e+00 3.188521e-01 Index v-sweep v(3) v(5) -------------------------------------------------------------------------------- 55 1.375000e+00 1.975771e+00 3.287169e-01 56 1.400000e+00 1.871269e+00 3.450139e-01 57 1.425000e+00 1.767026e+00 3.947595e-01 58 1.450000e+00 1.662887e+00 7.886695e-01 59 1.475000e+00 1.558984e+00 1.250481e+00 60 1.500000e+00 1.455350e+00 1.718053e+00 61 1.525000e+00 1.351982e+00 2.190635e+00 62 1.550000e+00 1.248869e+00 2.667395e+00 63 1.575000e+00 1.145987e+00 3.146700e+00 64 1.600000e+00 1.043291e+00 3.625495e+00 65 1.625000e+00 9.406769e-01 4.097337e+00 66 1.650000e+00 8.378776e-01 4.545878e+00 67 1.675000e+00 7.336355e-01 4.895323e+00 68 1.700000e+00 6.255228e-01 4.996673e+00 69 1.725000e+00 5.166017e-01 4.999972e+00 70 1.750000e+00 4.251561e-01 4.999999e+00 71 1.775000e+00 3.861180e-01 5.000000e+00 72 1.800000e+00 3.685797e-01 5.000000e+00 73 1.825000e+00 3.578053e-01 5.000000e+00 74 1.850000e+00 3.501463e-01 5.000000e+00 75 1.875000e+00 3.441649e-01 5.000000e+00 76 1.900000e+00 3.393782e-01 5.000000e+00 77 1.925000e+00 3.353469e-01 5.000000e+00 78 1.950000e+00 3.318632e-01 5.000000e+00 79 1.975000e+00 3.288026e-01 5.000000e+00 80 2.000000e+00 3.260757e-01 5.000000e+00 81 2.025000e+00 3.236181e-01 5.000000e+00 82 2.050000e+00 3.213824e-01 5.000000e+00 83 2.075000e+00 3.193325e-01 5.000000e+00 84 2.100000e+00 3.174404e-01 5.000000e+00 85 2.125000e+00 3.156839e-01 5.000000e+00 86 2.150000e+00 3.140453e-01 5.000000e+00 87 2.175000e+00 3.125100e-01 5.000000e+00 88 2.200000e+00 3.110661e-01 5.000000e+00 89 2.225000e+00 3.097034e-01 5.000000e+00 90 2.250000e+00 3.084134e-01 5.000000e+00 91 2.275000e+00 3.071890e-01 5.000000e+00 92 2.300000e+00 3.060240e-01 5.000000e+00 93 2.325000e+00 3.049130e-01 5.000000e+00 94 2.350000e+00 3.038513e-01 5.000000e+00 95 2.375000e+00 3.028348e-01 5.000000e+00 96 2.400000e+00 3.018599e-01 5.000000e+00 97 2.425000e+00 3.009235e-01 5.000000e+00 98 2.450000e+00 3.000227e-01 5.000000e+00 99 2.475000e+00 2.991549e-01 5.000000e+00 100 2.500000e+00 2.983179e-01 5.000000e+00 -------------------------------------------------------------------------- rtlinv ckt - cascaded rtl inverters Legend: + = v(3) -------------------------------------------------------------------------- v-sweep v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 ----------------------|---------|---------|---------|---------|---------| 0.000e+00 4.622e+00 . . . . . + . 2.500e-02 4.622e+00 . . . . . + . 5.000e-02 4.622e+00 . . . . . + . 7.500e-02 4.622e+00 . . . . . + . 1.000e-01 4.622e+00 . . . . . + . 1.250e-01 4.622e+00 . . . . . + . 1.500e-01 4.622e+00 . . . . . + . 1.750e-01 4.622e+00 . . . . . + . 2.000e-01 4.622e+00 . . . . . + . 2.250e-01 4.622e+00 . . . . . + . 2.500e-01 4.622e+00 . . . . . + . 2.750e-01 4.622e+00 . . . . . + . 3.000e-01 4.622e+00 . . . . . + . 3.250e-01 4.622e+00 . . . . . + . 3.500e-01 4.622e+00 . . . . . + . 3.750e-01 4.622e+00 . . . . . + . 4.000e-01 4.622e+00 . . . . . + . 4.250e-01 4.622e+00 . . . . . + . 4.500e-01 4.622e+00 . . . . . + . 4.750e-01 4.622e+00 . . . . . + . 5.000e-01 4.622e+00 . . . . . + . 5.250e-01 4.622e+00 . . . . . + . 5.500e-01 4.622e+00 . . . . . + . 5.750e-01 4.622e+00 . . . . . + . 6.000e-01 4.621e+00 . . . . . + . 6.250e-01 4.619e+00 . . . . . + . 6.500e-01 4.615e+00 . . . . . + . 6.750e-01 4.604e+00 . . . . . + . 7.000e-01 4.582e+00 . . . . . + . 7.250e-01 4.544e+00 . . . . . + . 7.500e-01 4.489e+00 . . . . . + . 7.750e-01 4.420e+00 . . . . . + . 8.000e-01 4.341e+00 . . . . . + . 8.250e-01 4.255e+00 . . . . . + . 8.500e-01 4.163e+00 . . . . .+ . 8.750e-01 4.068e+00 . . . . + . 9.000e-01 3.969e+00 . . . . +. . 9.250e-01 3.869e+00 . . . . + . . 9.500e-01 3.766e+00 . . . . + . . 9.750e-01 3.663e+00 . . . . + . . 1.000e-00 3.559e+00 . . . . + . . 1.025e+00 3.454e+00 . . . . + . . 1.050e+00 3.349e+00 . . . . + . . 1.075e+00 3.243e+00 . . . . + . . 1.100e+00 3.138e+00 . . . .+ . . 1.125e+00 3.032e+00 . . . + . . 1.150e+00 2.926e+00 . . . +. . . 1.175e+00 2.820e+00 . . . + . . . 1.200e+00 2.714e+00 . . . + . . . 1.225e+00 2.608e+00 . . . + . . . 1.250e+00 2.502e+00 . . . + . . . 1.275e+00 2.396e+00 . . . + . . . ----------------------|---------|---------|---------|---------|---------| v-sweep v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 v-sweep v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 ----------------------|---------|---------|---------|---------|---------| 1.300e+00 2.291e+00 . . . + . . . 1.325e+00 2.186e+00 . . .+ . . . 1.350e+00 2.081e+00 . . + . . . 1.375e+00 1.976e+00 . . +. . . . 1.400e+00 1.871e+00 . . + . . . . 1.425e+00 1.767e+00 . . + . . . . 1.450e+00 1.663e+00 . . + . . . . 1.475e+00 1.559e+00 . . + . . . . 1.500e+00 1.455e+00 . . + . . . . 1.525e+00 1.352e+00 . . + . . . . 1.550e+00 1.249e+00 . . + . . . . 1.575e+00 1.146e+00 . .+ . . . . 1.600e+00 1.043e+00 . + . . . . 1.625e+00 9.407e-01 . +. . . . . 1.650e+00 8.379e-01 . + . . . . . 1.675e+00 7.336e-01 . + . . . . . 1.700e+00 6.255e-01 . + . . . . . 1.725e+00 5.166e-01 . + . . . . . 1.750e+00 4.252e-01 . + . . . . . 1.775e+00 3.861e-01 . + . . . . . 1.800e+00 3.686e-01 . + . . . . . 1.825e+00 3.578e-01 . + . . . . . 1.850e+00 3.501e-01 . + . . . . . 1.875e+00 3.442e-01 . + . . . . . 1.900e+00 3.394e-01 . + . . . . . 1.925e+00 3.353e-01 . + . . . . . 1.950e+00 3.319e-01 . + . . . . . 1.975e+00 3.288e-01 . + . . . . . 2.000e+00 3.261e-01 . + . . . . . 2.025e+00 3.236e-01 . + . . . . . 2.050e+00 3.214e-01 . + . . . . . 2.075e+00 3.193e-01 . + . . . . . 2.100e+00 3.174e-01 . + . . . . . 2.125e+00 3.157e-01 . + . . . . . 2.150e+00 3.140e-01 . + . . . . . 2.175e+00 3.125e-01 . + . . . . . 2.200e+00 3.111e-01 . + . . . . . 2.225e+00 3.097e-01 . + . . . . . 2.250e+00 3.084e-01 . + . . . . . 2.275e+00 3.072e-01 . + . . . . . 2.300e+00 3.060e-01 . + . . . . . 2.325e+00 3.049e-01 . + . . . . . 2.350e+00 3.039e-01 . + . . . . . 2.375e+00 3.028e-01 . + . . . . . 2.400e+00 3.019e-01 . + . . . . . 2.425e+00 3.009e-01 . + . . . . . 2.450e+00 3.000e-01 . + . . . . . 2.475e+00 2.992e-01 . + . . . . . 2.500e+00 2.983e-01 . + . . . . . ----------------------|---------|---------|---------|---------|---------| v-sweep v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 rtlinv ckt - cascaded rtl inverters -------------------------------------------------------------------------------- Index time v(3) v(5) -------------------------------------------------------------------------------- 0 0.000000e+00 4.622185e+00 2.665056e-01 1 1.000000e-11 4.622185e+00 2.665056e-01 2 2.000000e-11 4.622185e+00 2.665056e-01 3 4.000000e-11 4.622185e+00 2.665056e-01 4 8.000000e-11 4.622185e+00 2.665056e-01 5 1.600000e-10 4.622185e+00 2.665056e-01 6 3.200000e-10 4.622185e+00 2.665056e-01 7 6.400000e-10 4.622185e+00 2.665056e-01 8 1.280000e-09 4.622185e+00 2.665056e-01 9 2.000000e-09 4.622185e+00 2.665056e-01 10 2.048636e-09 4.622292e+00 2.665056e-01 11 2.145909e-09 4.622716e+00 2.665057e-01 12 2.340455e-09 4.624759e+00 2.665061e-01 13 2.587114e-09 4.629440e+00 2.665071e-01 14 3.080431e-09 4.644545e+00 2.665086e-01 15 4.000000e-09 4.686343e+00 2.664995e-01 16 4.098663e-09 4.691168e+00 2.664971e-01 17 4.295990e-09 4.700084e+00 2.664912e-01 18 4.690644e-09 4.714412e+00 2.664747e-01 19 5.479952e-09 4.732320e+00 2.664283e-01 20 7.058567e-09 4.476721e+00 2.663492e-01 21 9.058567e-09 3.777494e+00 2.667389e-01 22 1.105857e-08 3.097057e+00 2.681161e-01 23 1.305857e-08 2.493183e+00 2.704647e-01 24 1.505857e-08 1.942882e+00 2.737963e-01 25 1.705857e-08 1.455907e+00 2.783114e-01 26 1.905857e-08 1.028846e+00 2.843479e-01 27 2.105857e-08 6.684221e-01 2.927160e-01 28 2.305857e-08 3.865504e-01 3.052167e-01 29 2.505857e-08 3.120637e-01 3.264857e-01 30 2.642150e-08 3.003241e-01 3.539190e-01 31 2.791439e-08 2.912460e-01 4.152030e-01 32 2.985993e-08 2.849294e-01 5.324041e-01 33 3.185993e-08 2.798880e-01 6.658911e-01 34 3.385993e-08 2.768522e-01 8.075699e-01 35 3.585993e-08 2.742785e-01 9.565774e-01 36 3.785993e-08 2.727016e-01 1.110432e+00 37 3.985993e-08 2.712392e-01 1.268236e+00 38 4.185993e-08 2.703101e-01 1.428480e+00 39 4.385993e-08 2.694153e-01 1.590368e+00 40 4.585993e-08 2.688333e-01 1.752914e+00 41 4.785993e-08 2.682648e-01 1.915462e+00 42 4.985993e-08 2.678879e-01 2.077330e+00 43 5.185993e-08 2.675181e-01 2.238002e+00 44 5.385993e-08 2.672684e-01 2.396989e+00 45 5.585993e-08 2.670236e-01 2.553895e+00 46 5.785993e-08 2.668551e-01 2.708365e+00 47 5.985993e-08 2.666905e-01 2.860099e+00 48 6.185993e-08 2.665746e-01 3.008834e+00 49 6.385993e-08 2.664617e-01 3.154345e+00 50 6.585993e-08 2.663800e-01 3.296432e+00 51 6.785993e-08 2.663007e-01 3.434921e+00 52 6.985993e-08 2.662412e-01 3.569653e+00 53 7.185993e-08 2.661832e-01 3.700482e+00 54 7.385993e-08 2.661377e-01 3.827265e+00 Index time v(3) v(5) -------------------------------------------------------------------------------- 55 7.585993e-08 2.660928e-01 3.949856e+00 56 7.785993e-08 2.660554e-01 4.068096e+00 57 7.985993e-08 2.660177e-01 4.181800e+00 58 8.185993e-08 2.659838e-01 4.290736e+00 59 8.385993e-08 2.659483e-01 4.394605e+00 60 8.400000e-08 2.659461e-01 4.401679e+00 61 8.420000e-08 2.658476e-01 4.411705e+00 62 8.460000e-08 2.656650e-01 4.431649e+00 63 8.540000e-08 2.659440e-01 4.470861e+00 64 8.600000e-08 2.669478e-01 4.499650e+00 65 8.616000e-08 2.674482e-01 4.507212e+00 66 8.648000e-08 2.685925e-01 4.522250e+00 67 8.712000e-08 2.711586e-01 4.551782e+00 68 8.840000e-08 2.766641e-01 4.608515e+00 69 9.040000e-08 2.868187e-01 4.690369e+00 70 9.240000e-08 3.002319e-01 4.762941e+00 71 9.440000e-08 3.215014e-01 4.824945e+00 72 9.640000e-08 3.730608e-01 4.875067e+00 73 9.840000e-08 5.003724e-01 4.912320e+00 74 1.004000e-07 6.585253e-01 4.936784e+00 75 1.024000e-07 8.255393e-01 4.948062e+00 76 1.044000e-07 1.004664e+00 4.942422e+00 77 1.064000e-07 1.189052e+00 4.911196e+00 78 1.084000e-07 1.379227e+00 4.845888e+00 79 1.104000e-07 1.571729e+00 4.743773e+00 80 1.124000e-07 1.766218e+00 4.606239e+00 81 1.144000e-07 1.960818e+00 4.436508e+00 82 1.164000e-07 2.154920e+00 4.237980e+00 83 1.184000e-07 2.347408e+00 4.013552e+00 84 1.204000e-07 2.537674e+00 3.766132e+00 85 1.224000e-07 2.724980e+00 3.498795e+00 86 1.244000e-07 2.908794e+00 3.214774e+00 87 1.264000e-07 3.088567e+00 2.917435e+00 88 1.284000e-07 3.263821e+00 2.610287e+00 89 1.304000e-07 3.434065e+00 2.297009e+00 90 1.324000e-07 3.598787e+00 1.981491e+00 91 1.344000e-07 3.757385e+00 1.667916e+00 92 1.364000e-07 3.909087e+00 1.360891e+00 93 1.384000e-07 4.052794e+00 1.065680e+00 94 1.404000e-07 4.186796e+00 7.886125e-01 95 1.424000e-07 4.308264e+00 5.378801e-01 96 1.444000e-07 4.412172e+00 3.525202e-01 97 1.464000e-07 4.492524e+00 3.092198e-01 98 1.478480e-07 4.533853e+00 2.986970e-01 99 1.494971e-07 4.564713e+00 2.902041e-01 100 1.514971e-07 4.585411e+00 2.843710e-01 101 1.534971e-07 4.595409e+00 2.798330e-01 102 1.554971e-07 4.600406e+00 2.769721e-01 103 1.574971e-07 4.603236e+00 2.745779e-01 104 1.594971e-07 4.605141e+00 2.730352e-01 105 1.614971e-07 4.606640e+00 2.716522e-01 106 1.634971e-07 4.607947e+00 2.707299e-01 107 1.654971e-07 4.609152e+00 2.698775e-01 108 1.674971e-07 4.610282e+00 2.692960e-01 109 1.694971e-07 4.611343e+00 2.687520e-01 110 1.714971e-07 4.612334e+00 2.683744e-01 111 1.734971e-07 4.613254e+00 2.680198e-01 112 1.754971e-07 4.614104e+00 2.677698e-01 Index time v(3) v(5) -------------------------------------------------------------------------------- 113 1.774971e-07 4.614886e+00 2.675354e-01 114 1.794971e-07 4.615602e+00 2.673677e-01 115 1.814971e-07 4.616254e+00 2.672111e-01 116 1.834971e-07 4.616848e+00 2.670977e-01 117 1.854971e-07 4.617387e+00 2.669923e-01 118 1.874971e-07 4.617875e+00 2.669149e-01 119 1.894971e-07 4.618316e+00 2.668434e-01 120 1.914971e-07 4.618715e+00 2.667903e-01 121 1.934971e-07 4.619074e+00 2.667416e-01 122 1.954971e-07 4.619397e+00 2.667050e-01 123 1.974971e-07 4.619687e+00 2.666715e-01 124 1.994971e-07 4.619948e+00 2.666461e-01 125 2.000000e-07 4.620010e+00 2.666395e-01 -------------------------------------------------------------------------- rtlinv ckt - cascaded rtl inverters Legend: + = v(3) * = v(5) = = v(1) -------------------------------------------------------------------------- time v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 ----------------------|---------|---------|---------|---------|---------| 0.000e+00 4.622e+00 = * . . . . + . 2.000e-09 4.622e+00 = * . . . . + . 4.000e-09 4.686e+00 . * . . . . + = 6.000e-09 4.648e+00 . * . . . . + = 8.000e-09 4.148e+00 . * . . . .+ = 1.000e-08 3.457e+00 . * . . . + . = 1.200e-08 2.813e+00 . * . . + . . = 1.400e-08 2.234e+00 . * . . + . . = 1.600e-08 1.714e+00 . * . + . . . = 1.800e-08 1.255e+00 . * . + . . . = 2.000e-08 8.592e-01 . * + . . . . = 2.200e-08 5.357e-01 . * + . . . . = 2.400e-08 3.515e-01 . X . . . . = 2.600e-08 3.040e-01 . X . . . . = 2.800e-08 2.910e-01 . + * . . . . = 3.000e-08 2.846e-01 . + * . . . . = 3.200e-08 2.797e-01 . + * . . . . = 3.400e-08 2.767e-01 . + * . . . . = 3.600e-08 2.742e-01 . + *. . . . = 3.800e-08 2.726e-01 . + .* . . . = 4.000e-08 2.712e-01 . + . * . . . = 4.200e-08 2.702e-01 . + . * . . . = 4.400e-08 2.694e-01 . + . * . . . = 4.600e-08 2.688e-01 . + . * . . . = 4.800e-08 2.682e-01 . + . *. . . = 5.000e-08 2.679e-01 . + . * . . = 5.200e-08 2.675e-01 . + . . * . . = 5.400e-08 2.673e-01 . + . . * . . = 5.600e-08 2.670e-01 . + . . * . . = 5.800e-08 2.668e-01 . + . . * . . = 6.000e-08 2.667e-01 . + . . * . . = 6.200e-08 2.666e-01 . + . . * . = 6.400e-08 2.665e-01 . + . . .* . = 6.600e-08 2.664e-01 . + . . . * . = 6.800e-08 2.663e-01 . + . . . * . = 7.000e-08 2.662e-01 . + . . . * . = 7.200e-08 2.662e-01 . + . . . * . = 7.400e-08 2.661e-01 . + . . . * . = 7.600e-08 2.661e-01 . + . . . *. = 7.800e-08 2.661e-01 . + . . . * = 8.000e-08 2.660e-01 . + . . . .* = 8.200e-08 2.660e-01 . + . . . . * = 8.400e-08 2.659e-01 . + . . . . * =. 8.600e-08 2.669e-01 = + . . . . * . 8.800e-08 2.749e-01 = + . . . . * . 9.000e-08 2.848e-01 = + . . . . * . 9.200e-08 2.975e-01 = + . . . . * . 9.400e-08 3.172e-01 = + . . . . * . 9.600e-08 3.627e-01 = + . . . . * . 9.800e-08 4.749e-01 = + . . . . *. 1.000e-07 6.269e-01 = + . . . . *. 1.020e-07 7.921e-01 = + . . . . *. ----------------------|---------|---------|---------|---------|---------| time v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 time v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 ----------------------|---------|---------|---------|---------|---------| 1.040e-07 9.688e-01 = +. . . . *. 1.060e-07 1.152e+00 = .+ . . . *. 1.080e-07 1.341e+00 = . + . . . * . 1.100e-07 1.533e+00 = . + . . . * . 1.120e-07 1.727e+00 = . + . . . * . 1.140e-07 1.922e+00 = . +. . . * . 1.160e-07 2.116e+00 = . .+ . . * . 1.180e-07 2.309e+00 = . . + . * . 1.200e-07 2.500e+00 = . . + . * . . 1.220e-07 2.688e+00 = . . + . * . . 1.240e-07 2.872e+00 = . . + . * . . 1.260e-07 3.053e+00 = . . *+ . . 1.280e-07 3.229e+00 = . . * . + . . 1.300e-07 3.400e+00 = . . * . + . . 1.320e-07 3.566e+00 = . * . + . . 1.340e-07 3.726e+00 = . * . . + . . 1.360e-07 3.879e+00 = . * . . + . . 1.380e-07 4.024e+00 = .* . . + . 1.400e-07 4.160e+00 = * . . . .+ . 1.420e-07 4.284e+00 = * . . . . + . 1.440e-07 4.391e+00 = * . . . . + . 1.460e-07 4.476e+00 = * . . . . + . 1.480e-07 4.537e+00 = * . . . . + . 1.500e-07 4.570e+00 = * . . . . + . 1.520e-07 4.588e+00 = * . . . . + . 1.540e-07 4.597e+00 = * . . . . + . 1.560e-07 4.601e+00 = * . . . . + . 1.580e-07 4.604e+00 = * . . . . + . 1.600e-07 4.606e+00 = * . . . . + . 1.620e-07 4.607e+00 = * . . . . + . 1.640e-07 4.608e+00 = * . . . . + . 1.660e-07 4.609e+00 = * . . . . + . 1.680e-07 4.611e+00 = * . . . . + . 1.700e-07 4.612e+00 = * . . . . + . 1.720e-07 4.613e+00 = * . . . . + . 1.740e-07 4.613e+00 = * . . . . + . 1.760e-07 4.614e+00 = * . . . . + . 1.780e-07 4.615e+00 = * . . . . + . 1.800e-07 4.616e+00 = * . . . . + . 1.820e-07 4.616e+00 = * . . . . + . 1.840e-07 4.617e+00 = * . . . . + . 1.860e-07 4.618e+00 = * . . . . + . 1.880e-07 4.618e+00 = * . . . . + . 1.900e-07 4.618e+00 = * . . . . + . 1.920e-07 4.619e+00 = * . . . . + . 1.940e-07 4.619e+00 = * . . . . + . 1.960e-07 4.619e+00 = * . . . . + . 1.980e-07 4.620e+00 = * . . . . + . 2.000e-07 4.620e+00 = * . . . . + . ----------------------|---------|---------|---------|---------|---------| time v(3) 0.00e+00 1.00e+00 2.00e+00 3.00e+00 4.00e+00 5.00e+00 ngspice-26/tests/general/mosamp.cir0000644000265600020320000000266012264261473017007 0ustar andreasadminmosamp - mos amplifier - transient * The original options line (removed acct) * .options acct abstol=10n vntol=10n .options abstol=10n vntol=10n noacct .tran 0.1us 10us m1 15 15 1 32 m w=88.9u l=25.4u m2 1 1 2 32 m w=12.7u l=266.7u m3 2 2 30 32 m w=88.9u l=25.4u m4 15 5 4 32 m w=12.7u l=106.7u m5 4 4 30 32 m w=88.9u l=12.7u m6 15 15 5 32 m w=44.5u l=25.4u m7 5 20 8 32 m w=482.6u l=12.7u m8 8 2 30 32 m w=88.9u l=25.4u m9 15 15 6 32 m w=44.5u l=25.4u m10 6 21 8 32 m w=482.6u l=12.7u m11 15 6 7 32 m w=12.7u l=106.7u m12 7 4 30 32 m w=88.9u l=12.7u m13 15 10 9 32 m w=139.7u l=12.7u m14 9 11 30 32 m w=139.7u l=12.7u m15 15 15 12 32 m w=12.7u l=207.8u m16 12 12 11 32 m w=54.1u l=12.7u m17 11 11 30 32 m w=54.1u l=12.7u m18 15 15 10 32 m w=12.7u l=45.2u m19 10 12 13 32 m w=270.5u l=12.7u m20 13 7 30 32 m w=270.5u l=12.7u m21 15 10 14 32 m w=254u l=12.7u m22 14 11 30 32 m w=241.3u l=12.7u m23 15 20 16 32 m w=19u l=38.1u m24 16 14 30 32 m w=406.4u l=12.7u m25 15 15 20 32 m w=38.1u l=42.7u m26 20 16 30 32 m w=381u l=25.4u m27 20 15 66 32 m w=22.9u l=7.6u cc 7 9 40pf cl 66 0 70pf vin 21 0 pulse(0 5 1ns 1ns 1ns 5us 10us) vccp 15 0 dc +15 vddn 30 0 dc -15 vb 32 0 dc -20 .model m nmos(nsub=2.2e15 uo=575 ucrit=49k uexp=0.1 tox=0.11u xj=2.95u + level=2 cgso=1.5n cgdo=1.5n cbd=4.5f cbs=4.5f ld=2.4485u nss=3.2e10 + kp=2e-5 phi=0.6 ) .print tran v(20) v(66) .plot tran v(20) v(66) .end ngspice-26/tests/general/diffpair.cir0000644000265600020320000000105112264261473017270 0ustar andreasadminsimple differential pair - CM and DM dc sensitivity * Models: .model qnl npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) .model qnr npn(level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf cjc=2pf va=50) .options noacct * Circuit description: q1 4 2 6 qnr q2 5 3 6 qnl rs1 11 2 1k rs2 3 1 1k rc1 4 8 10k rc2 5 8 10k q3 7 7 9 qnl q4 6 7 9 qnr rbias 7 8 20k * Inputs/Supplies: vcm 1 0 dc 0 sin(0 0.1 5meg) ac 1 vdm 1 11 dc 0 sin(0 0.1 5meg) ac 1 vcc 8 0 12 vee 9 0 -12 * Analysys: .tf v(5) vcm .tf v(5) vdm .sens v(5,4) .end ngspice-26/tests/general/mosamp.out0000644000265600020320000036555312264261473017056 0ustar andreasadminWarning: vin: no DC value, transient time 0 value used Circuit: mosamp - mos amplifier - transient Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 15 15 1 9.64515 32 -20 2 -11.7354 30 -15 5 9.46394 4 -12.0678 20 0.0419716 8 -2.31455 6 9.69774 21 0 7 -11.9005 10 -10.3377 9 -12.9978 11 -12.0814 12 -8.894 13 -12.2724 14 -12.9655 16 -11.047 66 0.0419716 vb#branch 9.13779e-10 vddn#branch 0.00521512 vccp#branch -0.00521512 vin#branch 0 No. of Data Rows : 2463 mosamp - mos amplifier - transient -------------------------------------------------------------------------------- Index time v(20) v(66) -------------------------------------------------------------------------------- 0 0.000000e+00 4.197164e-02 4.197163e-02 1 1.000000e-11 4.197164e-02 4.197163e-02 2 2.000000e-11 4.197164e-02 4.197163e-02 3 4.000000e-11 4.197164e-02 4.197163e-02 4 8.000000e-11 4.197164e-02 4.197163e-02 5 1.600000e-10 4.197164e-02 4.197163e-02 6 3.200000e-10 4.197164e-02 4.197163e-02 7 6.400000e-10 4.197164e-02 4.197163e-02 8 1.000000e-09 4.197164e-02 4.197163e-02 9 1.064000e-09 1.462634e-01 4.218696e-02 10 1.192000e-09 3.375616e-01 4.300842e-02 11 1.334111e-09 4.713290e-01 4.465247e-02 12 1.469145e-09 5.350641e-01 4.662954e-02 13 1.646971e-09 6.075358e-01 4.960064e-02 14 2.000000e-09 7.392640e-01 5.657201e-02 15 2.035565e-09 7.242492e-01 5.732607e-02 16 2.106696e-09 6.948675e-01 5.879989e-02 17 2.248957e-09 6.398998e-01 6.155023e-02 18 2.533479e-09 5.441170e-01 6.634330e-02 19 3.102523e-09 3.995060e-01 7.365950e-02 20 3.738185e-09 2.937903e-01 7.917494e-02 21 4.587196e-09 2.089416e-01 8.381750e-02 22 5.860384e-09 1.434166e-01 8.753408e-02 23 7.163024e-09 1.108006e-01 8.916494e-02 24 8.520975e-09 9.059427e-02 8.966026e-02 25 9.898891e-09 7.791000e-02 8.942443e-02 26 1.174987e-08 7.096481e-02 8.855301e-02 27 1.422782e-08 7.675036e-02 8.742022e-02 28 1.762327e-08 9.956699e-02 8.749673e-02 29 2.120741e-08 1.249708e-01 9.020876e-02 30 2.551202e-08 1.466125e-01 9.613356e-02 31 3.088462e-08 1.692059e-01 1.059889e-01 32 3.889961e-08 2.134248e-01 1.255056e-01 33 4.735642e-08 2.684801e-01 1.531439e-01 34 6.191465e-08 3.670412e-01 2.154171e-01 35 7.815975e-08 4.917323e-01 3.034443e-01 36 1.106500e-07 7.744379e-01 5.268434e-01 37 1.756304e-07 1.418472e+00 1.096332e+00 38 1.881304e-07 1.551448e+00 1.220713e+00 39 2.131304e-07 1.812111e+00 1.471352e+00 40 2.139116e-07 1.820130e+00 1.479243e+00 41 2.154741e-07 1.836157e+00 1.495022e+00 42 2.158647e-07 1.840159e+00 1.498966e+00 43 2.166460e-07 1.848158e+00 1.506854e+00 44 2.182085e-07 1.864130e+00 1.522626e+00 45 2.182573e-07 1.864629e+00 1.523118e+00 46 2.183550e-07 1.865626e+00 1.524104e+00 47 2.185503e-07 1.867619e+00 1.526075e+00 48 2.189409e-07 1.871604e+00 1.530017e+00 49 2.190386e-07 1.872599e+00 1.531002e+00 50 2.192339e-07 1.874590e+00 1.532973e+00 51 2.196245e-07 1.878570e+00 1.536913e+00 52 2.197222e-07 1.879564e+00 1.537899e+00 53 2.199175e-07 1.881552e+00 1.539869e+00 54 2.203081e-07 1.885526e+00 1.543809e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 55 2.204058e-07 1.886519e+00 1.544794e+00 56 2.206011e-07 1.888505e+00 1.546763e+00 57 2.209917e-07 1.892473e+00 1.550703e+00 58 2.210894e-07 1.893465e+00 1.551687e+00 59 2.212847e-07 1.895447e+00 1.553656e+00 60 2.216753e-07 1.899410e+00 1.557594e+00 61 2.217729e-07 1.900399e+00 1.558579e+00 62 2.219683e-07 1.902379e+00 1.560547e+00 63 2.223589e-07 1.906335e+00 1.564484e+00 64 2.224565e-07 1.907323e+00 1.565468e+00 65 2.226519e-07 1.909299e+00 1.567436e+00 66 2.230425e-07 1.913249e+00 1.571372e+00 67 2.231401e-07 1.914236e+00 1.572356e+00 68 2.233354e-07 1.916209e+00 1.574323e+00 69 2.237261e-07 1.920152e+00 1.578257e+00 70 2.238237e-07 1.921137e+00 1.579241e+00 71 2.240190e-07 1.923106e+00 1.581207e+00 72 2.244097e-07 1.927042e+00 1.585140e+00 73 2.245073e-07 1.928026e+00 1.586123e+00 74 2.247026e-07 1.929992e+00 1.588089e+00 75 2.250933e-07 1.933921e+00 1.592020e+00 76 2.251909e-07 1.934902e+00 1.593003e+00 77 2.253862e-07 1.936864e+00 1.594968e+00 78 2.257769e-07 1.940786e+00 1.598897e+00 79 2.258745e-07 1.941766e+00 1.599879e+00 80 2.260698e-07 1.943725e+00 1.601843e+00 81 2.264604e-07 1.947639e+00 1.605771e+00 82 2.265581e-07 1.948617e+00 1.606753e+00 83 2.267534e-07 1.950572e+00 1.608716e+00 84 2.271440e-07 1.954479e+00 1.612642e+00 85 2.272417e-07 1.955455e+00 1.613623e+00 86 2.274370e-07 1.957406e+00 1.615585e+00 87 2.278276e-07 1.961306e+00 1.619509e+00 88 2.279253e-07 1.962280e+00 1.620490e+00 89 2.281206e-07 1.964227e+00 1.622451e+00 90 2.285112e-07 1.968119e+00 1.626372e+00 91 2.286089e-07 1.969091e+00 1.627352e+00 92 2.288042e-07 1.971035e+00 1.629313e+00 93 2.291948e-07 1.974919e+00 1.633232e+00 94 2.292925e-07 1.975889e+00 1.634211e+00 95 2.294878e-07 1.977828e+00 1.636170e+00 96 2.298784e-07 1.981705e+00 1.640087e+00 97 2.299761e-07 1.982673e+00 1.641066e+00 98 2.301714e-07 1.984608e+00 1.643024e+00 99 2.305620e-07 1.988476e+00 1.646939e+00 100 2.306597e-07 1.989442e+00 1.647917e+00 101 2.308550e-07 1.991374e+00 1.649873e+00 102 2.312456e-07 1.995234e+00 1.653785e+00 103 2.313433e-07 1.996198e+00 1.654763e+00 104 2.315386e-07 1.998125e+00 1.656718e+00 105 2.319292e-07 2.001977e+00 1.660628e+00 106 2.320269e-07 2.002939e+00 1.661605e+00 107 2.322222e-07 2.004862e+00 1.663558e+00 108 2.326128e-07 2.008705e+00 1.667465e+00 109 2.327104e-07 2.009665e+00 1.668441e+00 110 2.329058e-07 2.011584e+00 1.670393e+00 111 2.332964e-07 2.015418e+00 1.674297e+00 112 2.333940e-07 2.016376e+00 1.675273e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 113 2.335894e-07 2.018291e+00 1.677224e+00 114 2.339800e-07 2.022116e+00 1.681124e+00 115 2.340776e-07 2.023072e+00 1.682099e+00 116 2.342729e-07 2.024982e+00 1.684048e+00 117 2.346636e-07 2.028799e+00 1.687946e+00 118 2.347612e-07 2.029752e+00 1.688920e+00 119 2.349565e-07 2.031657e+00 1.690867e+00 120 2.353472e-07 2.035464e+00 1.694762e+00 121 2.354448e-07 2.036415e+00 1.695735e+00 122 2.356401e-07 2.038316e+00 1.697681e+00 123 2.360308e-07 2.042114e+00 1.701572e+00 124 2.361284e-07 2.043063e+00 1.702544e+00 125 2.363237e-07 2.044959e+00 1.704488e+00 126 2.367144e-07 2.048748e+00 1.708376e+00 127 2.368120e-07 2.049694e+00 1.709347e+00 128 2.370073e-07 2.051585e+00 1.711290e+00 129 2.373979e-07 2.055364e+00 1.715174e+00 130 2.374956e-07 2.056308e+00 1.716144e+00 131 2.376909e-07 2.058195e+00 1.718085e+00 132 2.380815e-07 2.061964e+00 1.721965e+00 133 2.381792e-07 2.062905e+00 1.722935e+00 134 2.383745e-07 2.064787e+00 1.724874e+00 135 2.387651e-07 2.068546e+00 1.728750e+00 136 2.388628e-07 2.069484e+00 1.729718e+00 137 2.390581e-07 2.071361e+00 1.731655e+00 138 2.394487e-07 2.075110e+00 1.735528e+00 139 2.395464e-07 2.076046e+00 1.736495e+00 140 2.397417e-07 2.077917e+00 1.738430e+00 141 2.401323e-07 2.081656e+00 1.742299e+00 142 2.402300e-07 2.082589e+00 1.743265e+00 143 2.404253e-07 2.084455e+00 1.745198e+00 144 2.408159e-07 2.088183e+00 1.749062e+00 145 2.409136e-07 2.089114e+00 1.750028e+00 146 2.411089e-07 2.090975e+00 1.751958e+00 147 2.414995e-07 2.094692e+00 1.755818e+00 148 2.415972e-07 2.095620e+00 1.756783e+00 149 2.417925e-07 2.097475e+00 1.758711e+00 150 2.421831e-07 2.101181e+00 1.762567e+00 151 2.422808e-07 2.102106e+00 1.763530e+00 152 2.424761e-07 2.103956e+00 1.765456e+00 153 2.428667e-07 2.107651e+00 1.769307e+00 154 2.429644e-07 2.108573e+00 1.770269e+00 155 2.431597e-07 2.110418e+00 1.772193e+00 156 2.435503e-07 2.114101e+00 1.776039e+00 157 2.436479e-07 2.115021e+00 1.777000e+00 158 2.438433e-07 2.116859e+00 1.778922e+00 159 2.442339e-07 2.120531e+00 1.782763e+00 160 2.443315e-07 2.121448e+00 1.783723e+00 161 2.445269e-07 2.123280e+00 1.785642e+00 162 2.449175e-07 2.126940e+00 1.789478e+00 163 2.450151e-07 2.127854e+00 1.790437e+00 164 2.452104e-07 2.129681e+00 1.792353e+00 165 2.456011e-07 2.133329e+00 1.796185e+00 166 2.456987e-07 2.134239e+00 1.797142e+00 167 2.458940e-07 2.136059e+00 1.799056e+00 168 2.462847e-07 2.139694e+00 1.802882e+00 169 2.463823e-07 2.140601e+00 1.803838e+00 170 2.465776e-07 2.142415e+00 1.805749e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 171 2.469683e-07 2.146039e+00 1.809570e+00 172 2.470659e-07 2.146944e+00 1.810525e+00 173 2.472612e-07 2.148753e+00 1.812433e+00 174 2.476519e-07 2.152368e+00 1.816249e+00 175 2.477495e-07 2.153271e+00 1.817202e+00 176 2.479448e-07 2.155076e+00 1.819108e+00 177 2.483354e-07 2.158684e+00 1.822917e+00 178 2.484331e-07 2.159585e+00 1.823869e+00 179 2.486284e-07 2.161388e+00 1.825773e+00 180 2.490190e-07 2.164989e+00 1.829577e+00 181 2.491167e-07 2.165889e+00 1.830527e+00 182 2.493120e-07 2.167688e+00 1.832428e+00 183 2.497026e-07 2.171284e+00 1.836226e+00 184 2.498003e-07 2.172182e+00 1.837176e+00 185 2.499956e-07 2.173979e+00 1.839073e+00 186 2.503862e-07 2.177569e+00 1.842867e+00 187 2.504839e-07 2.178466e+00 1.843814e+00 188 2.506792e-07 2.180259e+00 1.845709e+00 189 2.510698e-07 2.183844e+00 1.849497e+00 190 2.511675e-07 2.184740e+00 1.850443e+00 191 2.513628e-07 2.186531e+00 1.852336e+00 192 2.517534e-07 2.190110e+00 1.856118e+00 193 2.518511e-07 2.191005e+00 1.857063e+00 194 2.520464e-07 2.192793e+00 1.858952e+00 195 2.524370e-07 2.196367e+00 1.862729e+00 196 2.525347e-07 2.197261e+00 1.863673e+00 197 2.527300e-07 2.199046e+00 1.865560e+00 198 2.531206e-07 2.202615e+00 1.869331e+00 199 2.532183e-07 2.203507e+00 1.870273e+00 200 2.534136e-07 2.205290e+00 1.872157e+00 201 2.538042e-07 2.208854e+00 1.875923e+00 202 2.539019e-07 2.209745e+00 1.876864e+00 203 2.540972e-07 2.211525e+00 1.878745e+00 204 2.544878e-07 2.215084e+00 1.882506e+00 205 2.545854e-07 2.215973e+00 1.883445e+00 206 2.547808e-07 2.217751e+00 1.885324e+00 207 2.551714e-07 2.221305e+00 1.889079e+00 208 2.552690e-07 2.222193e+00 1.890017e+00 209 2.554644e-07 2.223968e+00 1.891893e+00 210 2.558550e-07 2.227517e+00 1.895643e+00 211 2.559526e-07 2.228404e+00 1.896579e+00 212 2.561479e-07 2.230177e+00 1.898453e+00 213 2.565386e-07 2.233720e+00 1.902197e+00 214 2.566362e-07 2.234605e+00 1.903132e+00 215 2.568315e-07 2.236376e+00 1.905003e+00 216 2.572222e-07 2.239914e+00 1.908742e+00 217 2.580034e-07 2.246983e+00 1.916210e+00 218 2.581987e-07 2.248748e+00 1.918075e+00 219 2.585894e-07 2.252276e+00 1.921803e+00 220 2.586870e-07 2.253158e+00 1.922734e+00 221 2.588823e-07 2.254921e+00 1.924597e+00 222 2.592729e-07 2.258444e+00 1.928319e+00 223 2.593706e-07 2.259324e+00 1.929249e+00 224 2.595659e-07 2.261085e+00 1.931109e+00 225 2.599565e-07 2.264603e+00 1.934826e+00 226 2.607378e-07 2.271635e+00 1.942252e+00 227 2.609331e-07 2.273393e+00 1.944106e+00 228 2.613237e-07 2.276910e+00 1.947813e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 229 2.614214e-07 2.277789e+00 1.948739e+00 230 2.616167e-07 2.279549e+00 1.950591e+00 231 2.620073e-07 2.283070e+00 1.954292e+00 232 2.621050e-07 2.283951e+00 1.955217e+00 233 2.623003e-07 2.285712e+00 1.957067e+00 234 2.626909e-07 2.289238e+00 1.960764e+00 235 2.627886e-07 2.290120e+00 1.961687e+00 236 2.629839e-07 2.291884e+00 1.963534e+00 237 2.633745e-07 2.295413e+00 1.967226e+00 238 2.634722e-07 2.296296e+00 1.968149e+00 239 2.636675e-07 2.298061e+00 1.969994e+00 240 2.640581e-07 2.301594e+00 1.973681e+00 241 2.641558e-07 2.302478e+00 1.974603e+00 242 2.643511e-07 2.304245e+00 1.976445e+00 243 2.647417e-07 2.307780e+00 1.980129e+00 244 2.648394e-07 2.308664e+00 1.981049e+00 245 2.650347e-07 2.310432e+00 1.982889e+00 246 2.654253e-07 2.313969e+00 1.986568e+00 247 2.655229e-07 2.314854e+00 1.987487e+00 248 2.657183e-07 2.316623e+00 1.989326e+00 249 2.661089e-07 2.320161e+00 1.993001e+00 250 2.662065e-07 2.321045e+00 1.993919e+00 251 2.664019e-07 2.322815e+00 1.995755e+00 252 2.667925e-07 2.326353e+00 1.999426e+00 253 2.675737e-07 2.333440e+00 2.006761e+00 254 2.677690e-07 2.335214e+00 2.008593e+00 255 2.681597e-07 2.338765e+00 2.012256e+00 256 2.682573e-07 2.339654e+00 2.013171e+00 257 2.684526e-07 2.341431e+00 2.015002e+00 258 2.688433e-07 2.344985e+00 2.018661e+00 259 2.689409e-07 2.345874e+00 2.019576e+00 260 2.691362e-07 2.347650e+00 2.021405e+00 261 2.695269e-07 2.351203e+00 2.025061e+00 262 2.696245e-07 2.352090e+00 2.025975e+00 263 2.698198e-07 2.353866e+00 2.027802e+00 264 2.702104e-07 2.357414e+00 2.031454e+00 265 2.703081e-07 2.358301e+00 2.032367e+00 266 2.705034e-07 2.360073e+00 2.034193e+00 267 2.708940e-07 2.363617e+00 2.037842e+00 268 2.709917e-07 2.364502e+00 2.038754e+00 269 2.711870e-07 2.366272e+00 2.040578e+00 270 2.715776e-07 2.369810e+00 2.044223e+00 271 2.716753e-07 2.370693e+00 2.045134e+00 272 2.718706e-07 2.372461e+00 2.046956e+00 273 2.722612e-07 2.375993e+00 2.050598e+00 274 2.723589e-07 2.376875e+00 2.051509e+00 275 2.725542e-07 2.378640e+00 2.053329e+00 276 2.729448e-07 2.382166e+00 2.056967e+00 277 2.730425e-07 2.383047e+00 2.057877e+00 278 2.732378e-07 2.384809e+00 2.059695e+00 279 2.736284e-07 2.388329e+00 2.063330e+00 280 2.737261e-07 2.389208e+00 2.064238e+00 281 2.739214e-07 2.390967e+00 2.066055e+00 282 2.743120e-07 2.394481e+00 2.069686e+00 283 2.744097e-07 2.395359e+00 2.070594e+00 284 2.746050e-07 2.397115e+00 2.072409e+00 285 2.749956e-07 2.400624e+00 2.076036e+00 286 2.750933e-07 2.401500e+00 2.076943e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 287 2.752886e-07 2.403253e+00 2.078756e+00 288 2.756792e-07 2.406755e+00 2.082380e+00 289 2.757769e-07 2.407630e+00 2.083285e+00 290 2.759722e-07 2.409380e+00 2.085096e+00 291 2.763628e-07 2.412877e+00 2.088716e+00 292 2.764604e-07 2.413750e+00 2.089621e+00 293 2.766558e-07 2.415497e+00 2.091430e+00 294 2.770464e-07 2.418988e+00 2.095046e+00 295 2.771440e-07 2.419860e+00 2.095950e+00 296 2.773394e-07 2.421604e+00 2.097757e+00 297 2.777300e-07 2.425089e+00 2.101370e+00 298 2.778276e-07 2.425959e+00 2.102272e+00 299 2.780229e-07 2.427700e+00 2.104078e+00 300 2.784136e-07 2.431179e+00 2.107686e+00 301 2.785112e-07 2.432048e+00 2.108588e+00 302 2.787065e-07 2.433786e+00 2.110391e+00 303 2.790972e-07 2.437260e+00 2.113996e+00 304 2.791948e-07 2.438127e+00 2.114897e+00 305 2.793901e-07 2.439862e+00 2.116698e+00 306 2.797808e-07 2.443329e+00 2.120299e+00 307 2.798784e-07 2.444195e+00 2.121199e+00 308 2.800737e-07 2.445927e+00 2.122998e+00 309 2.804644e-07 2.449388e+00 2.126595e+00 310 2.805620e-07 2.450253e+00 2.127494e+00 311 2.807573e-07 2.451982e+00 2.129291e+00 312 2.811479e-07 2.455437e+00 2.132884e+00 313 2.812456e-07 2.456300e+00 2.133782e+00 314 2.814409e-07 2.458026e+00 2.135577e+00 315 2.818315e-07 2.461476e+00 2.139166e+00 316 2.819292e-07 2.462337e+00 2.140062e+00 317 2.821245e-07 2.464060e+00 2.141856e+00 318 2.825151e-07 2.467504e+00 2.145440e+00 319 2.826128e-07 2.468364e+00 2.146336e+00 320 2.828081e-07 2.470084e+00 2.148127e+00 321 2.831987e-07 2.473522e+00 2.151708e+00 322 2.832964e-07 2.474381e+00 2.152602e+00 323 2.834917e-07 2.476098e+00 2.154391e+00 324 2.838823e-07 2.479530e+00 2.157968e+00 325 2.839800e-07 2.480387e+00 2.158862e+00 326 2.841753e-07 2.482102e+00 2.160649e+00 327 2.845659e-07 2.485528e+00 2.164221e+00 328 2.846636e-07 2.486384e+00 2.165113e+00 329 2.848589e-07 2.488096e+00 2.166898e+00 330 2.852495e-07 2.491517e+00 2.170466e+00 331 2.853472e-07 2.492372e+00 2.171358e+00 332 2.855425e-07 2.494080e+00 2.173141e+00 333 2.859331e-07 2.497496e+00 2.176705e+00 334 2.860308e-07 2.498349e+00 2.177595e+00 335 2.862261e-07 2.500055e+00 2.179376e+00 336 2.866167e-07 2.503466e+00 2.182936e+00 337 2.867144e-07 2.504318e+00 2.183825e+00 338 2.869097e-07 2.506021e+00 2.185604e+00 339 2.873003e-07 2.509426e+00 2.189159e+00 340 2.873979e-07 2.510276e+00 2.190047e+00 341 2.875933e-07 2.511977e+00 2.191824e+00 342 2.879839e-07 2.515377e+00 2.195375e+00 343 2.880815e-07 2.516226e+00 2.196262e+00 344 2.882769e-07 2.517924e+00 2.198037e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 345 2.886675e-07 2.521317e+00 2.201583e+00 346 2.887651e-07 2.522165e+00 2.202470e+00 347 2.889604e-07 2.523861e+00 2.204242e+00 348 2.893511e-07 2.527249e+00 2.207784e+00 349 2.894487e-07 2.528096e+00 2.208670e+00 350 2.896440e-07 2.529789e+00 2.210440e+00 351 2.900347e-07 2.533172e+00 2.213978e+00 352 2.901323e-07 2.534017e+00 2.214862e+00 353 2.903276e-07 2.535708e+00 2.216630e+00 354 2.907183e-07 2.539086e+00 2.220164e+00 355 2.908159e-07 2.539930e+00 2.221047e+00 356 2.910112e-07 2.541618e+00 2.222812e+00 357 2.914019e-07 2.544991e+00 2.226342e+00 358 2.914995e-07 2.545834e+00 2.227224e+00 359 2.916948e-07 2.547519e+00 2.228987e+00 360 2.920854e-07 2.550887e+00 2.232513e+00 361 2.921831e-07 2.551729e+00 2.233393e+00 362 2.923784e-07 2.553412e+00 2.235155e+00 363 2.927690e-07 2.556775e+00 2.238676e+00 364 2.928667e-07 2.557615e+00 2.239555e+00 365 2.930620e-07 2.559296e+00 2.241315e+00 366 2.934526e-07 2.562654e+00 2.244831e+00 367 2.935503e-07 2.563493e+00 2.245710e+00 368 2.937456e-07 2.565171e+00 2.247467e+00 369 2.941362e-07 2.568524e+00 2.250979e+00 370 2.942339e-07 2.569362e+00 2.251856e+00 371 2.944292e-07 2.571038e+00 2.253611e+00 372 2.948198e-07 2.574386e+00 2.257119e+00 373 2.949175e-07 2.575223e+00 2.257995e+00 374 2.951128e-07 2.576896e+00 2.259748e+00 375 2.955034e-07 2.580239e+00 2.263251e+00 376 2.956011e-07 2.581075e+00 2.264127e+00 377 2.957964e-07 2.582745e+00 2.265877e+00 378 2.961870e-07 2.586084e+00 2.269376e+00 379 2.962847e-07 2.586918e+00 2.270250e+00 380 2.964800e-07 2.588586e+00 2.271999e+00 381 2.968706e-07 2.591920e+00 2.275493e+00 382 2.969683e-07 2.592753e+00 2.276366e+00 383 2.971636e-07 2.594419e+00 2.278113e+00 384 2.975542e-07 2.597748e+00 2.281603e+00 385 2.976519e-07 2.598580e+00 2.282475e+00 386 2.978472e-07 2.600244e+00 2.284219e+00 387 2.982378e-07 2.603568e+00 2.287704e+00 388 2.983354e-07 2.604399e+00 2.288575e+00 389 2.985308e-07 2.606060e+00 2.290317e+00 390 2.989214e-07 2.609380e+00 2.293798e+00 391 2.990190e-07 2.610209e+00 2.294668e+00 392 2.992144e-07 2.611868e+00 2.296408e+00 393 2.996050e-07 2.615183e+00 2.299885e+00 394 2.997026e-07 2.616012e+00 2.300754e+00 395 2.998979e-07 2.617668e+00 2.302491e+00 396 3.002886e-07 2.620978e+00 2.305963e+00 397 3.003862e-07 2.621806e+00 2.306831e+00 398 3.005815e-07 2.623460e+00 2.308566e+00 399 3.009722e-07 2.626766e+00 2.312034e+00 400 3.010698e-07 2.627592e+00 2.312901e+00 401 3.012651e-07 2.629243e+00 2.314634e+00 402 3.016558e-07 2.632545e+00 2.318098e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 403 3.017534e-07 2.633370e+00 2.318963e+00 404 3.019487e-07 2.635019e+00 2.320694e+00 405 3.023394e-07 2.638316e+00 2.324153e+00 406 3.024370e-07 2.639140e+00 2.325018e+00 407 3.026323e-07 2.640787e+00 2.326746e+00 408 3.030229e-07 2.644079e+00 2.330201e+00 409 3.031206e-07 2.644902e+00 2.331064e+00 410 3.033159e-07 2.646547e+00 2.332790e+00 411 3.037065e-07 2.649834e+00 2.336241e+00 412 3.038042e-07 2.650656e+00 2.337103e+00 413 3.039995e-07 2.652299e+00 2.338827e+00 414 3.043901e-07 2.655582e+00 2.342274e+00 415 3.044878e-07 2.656402e+00 2.343135e+00 416 3.046831e-07 2.658043e+00 2.344856e+00 417 3.050737e-07 2.661321e+00 2.348298e+00 418 3.051714e-07 2.662141e+00 2.349158e+00 419 3.053667e-07 2.663779e+00 2.350878e+00 420 3.057573e-07 2.667053e+00 2.354315e+00 421 3.058550e-07 2.667871e+00 2.355174e+00 422 3.060503e-07 2.669507e+00 2.356892e+00 423 3.064409e-07 2.672777e+00 2.360325e+00 424 3.065386e-07 2.673594e+00 2.361183e+00 425 3.067339e-07 2.675228e+00 2.362898e+00 426 3.071245e-07 2.678494e+00 2.366327e+00 427 3.072222e-07 2.679310e+00 2.367183e+00 428 3.074175e-07 2.680941e+00 2.368896e+00 429 3.078081e-07 2.684202e+00 2.372321e+00 430 3.079058e-07 2.685017e+00 2.373176e+00 431 3.081011e-07 2.686647e+00 2.374887e+00 432 3.084917e-07 2.689903e+00 2.378307e+00 433 3.085894e-07 2.690717e+00 2.379161e+00 434 3.087847e-07 2.692344e+00 2.380870e+00 435 3.091753e-07 2.695597e+00 2.384286e+00 436 3.092729e-07 2.696409e+00 2.385139e+00 437 3.094683e-07 2.698034e+00 2.386846e+00 438 3.098589e-07 2.701282e+00 2.390257e+00 439 3.099565e-07 2.702094e+00 2.391109e+00 440 3.101519e-07 2.703717e+00 2.392813e+00 441 3.105425e-07 2.706961e+00 2.396220e+00 442 3.106401e-07 2.707771e+00 2.397071e+00 443 3.108354e-07 2.709392e+00 2.398774e+00 444 3.112261e-07 2.712631e+00 2.402176e+00 445 3.113237e-07 2.713441e+00 2.403026e+00 446 3.115190e-07 2.715059e+00 2.404726e+00 447 3.119097e-07 2.718295e+00 2.408124e+00 448 3.120073e-07 2.719103e+00 2.408973e+00 449 3.122026e-07 2.720719e+00 2.410671e+00 450 3.125933e-07 2.723950e+00 2.414065e+00 451 3.126909e-07 2.724758e+00 2.414913e+00 452 3.128862e-07 2.726372e+00 2.416608e+00 453 3.132769e-07 2.729599e+00 2.419998e+00 454 3.133745e-07 2.730405e+00 2.420845e+00 455 3.135698e-07 2.732017e+00 2.422538e+00 456 3.139604e-07 2.735239e+00 2.425923e+00 457 3.140581e-07 2.736045e+00 2.426769e+00 458 3.142534e-07 2.737655e+00 2.428460e+00 459 3.146440e-07 2.740873e+00 2.431841e+00 460 3.147417e-07 2.741677e+00 2.432686e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 461 3.149370e-07 2.743285e+00 2.434375e+00 462 3.153276e-07 2.746499e+00 2.437751e+00 463 3.154253e-07 2.747302e+00 2.438595e+00 464 3.156206e-07 2.748908e+00 2.440282e+00 465 3.160112e-07 2.752117e+00 2.443654e+00 466 3.161089e-07 2.752919e+00 2.444497e+00 467 3.163042e-07 2.754523e+00 2.446181e+00 468 3.166948e-07 2.757729e+00 2.449549e+00 469 3.167925e-07 2.758530e+00 2.450391e+00 470 3.169878e-07 2.760131e+00 2.452073e+00 471 3.173784e-07 2.763333e+00 2.455437e+00 472 3.174761e-07 2.764133e+00 2.456277e+00 473 3.176714e-07 2.765732e+00 2.457958e+00 474 3.180620e-07 2.768929e+00 2.461317e+00 475 3.181597e-07 2.769728e+00 2.462156e+00 476 3.183550e-07 2.771326e+00 2.463834e+00 477 3.187456e-07 2.774519e+00 2.467189e+00 478 3.188433e-07 2.775317e+00 2.468028e+00 479 3.190386e-07 2.776912e+00 2.469704e+00 480 3.194292e-07 2.780101e+00 2.473054e+00 481 3.195269e-07 2.780898e+00 2.473891e+00 482 3.197222e-07 2.782491e+00 2.475566e+00 483 3.201128e-07 2.785676e+00 2.478912e+00 484 3.202104e-07 2.786472e+00 2.479748e+00 485 3.204058e-07 2.788063e+00 2.481420e+00 486 3.207964e-07 2.791243e+00 2.484762e+00 487 3.208940e-07 2.792038e+00 2.485597e+00 488 3.210894e-07 2.793627e+00 2.487267e+00 489 3.214800e-07 2.796804e+00 2.490604e+00 490 3.215776e-07 2.797598e+00 2.491438e+00 491 3.217729e-07 2.799185e+00 2.493106e+00 492 3.221636e-07 2.802357e+00 2.496440e+00 493 3.222612e-07 2.803150e+00 2.497272e+00 494 3.224565e-07 2.804735e+00 2.498938e+00 495 3.228472e-07 2.807903e+00 2.502267e+00 496 3.229448e-07 2.808695e+00 2.503099e+00 497 3.231401e-07 2.810278e+00 2.504762e+00 498 3.235308e-07 2.813442e+00 2.508087e+00 499 3.236284e-07 2.814233e+00 2.508918e+00 500 3.238237e-07 2.815814e+00 2.510579e+00 501 3.242144e-07 2.818974e+00 2.513900e+00 502 3.243120e-07 2.819764e+00 2.514730e+00 503 3.245073e-07 2.821343e+00 2.516389e+00 504 3.248979e-07 2.824499e+00 2.519705e+00 505 3.249956e-07 2.825287e+00 2.520534e+00 506 3.251909e-07 2.826864e+00 2.522191e+00 507 3.255815e-07 2.830016e+00 2.525503e+00 508 3.256792e-07 2.830804e+00 2.526331e+00 509 3.258745e-07 2.832379e+00 2.527986e+00 510 3.262651e-07 2.835527e+00 2.531294e+00 511 3.263628e-07 2.836313e+00 2.532121e+00 512 3.265581e-07 2.837886e+00 2.533773e+00 513 3.269487e-07 2.841030e+00 2.537077e+00 514 3.270464e-07 2.841816e+00 2.537903e+00 515 3.272417e-07 2.843386e+00 2.539553e+00 516 3.276323e-07 2.846526e+00 2.542853e+00 517 3.277300e-07 2.847311e+00 2.543677e+00 518 3.279253e-07 2.848880e+00 2.545326e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 519 3.283159e-07 2.852016e+00 2.548621e+00 520 3.284136e-07 2.852799e+00 2.549445e+00 521 3.286089e-07 2.854366e+00 2.551091e+00 522 3.289995e-07 2.857498e+00 2.554383e+00 523 3.290972e-07 2.858280e+00 2.555205e+00 524 3.292925e-07 2.859845e+00 2.556849e+00 525 3.296831e-07 2.862973e+00 2.560136e+00 526 3.297808e-07 2.863755e+00 2.560958e+00 527 3.299761e-07 2.865317e+00 2.562600e+00 528 3.303667e-07 2.868441e+00 2.565883e+00 529 3.304644e-07 2.869222e+00 2.566703e+00 530 3.306597e-07 2.870783e+00 2.568343e+00 531 3.310503e-07 2.873902e+00 2.571622e+00 532 3.311479e-07 2.874682e+00 2.572441e+00 533 3.313433e-07 2.876241e+00 2.574079e+00 534 3.317339e-07 2.879357e+00 2.577354e+00 535 3.318315e-07 2.880135e+00 2.578172e+00 536 3.320269e-07 2.881692e+00 2.579808e+00 537 3.324175e-07 2.884804e+00 2.583078e+00 538 3.325151e-07 2.885582e+00 2.583896e+00 539 3.327104e-07 2.887137e+00 2.585530e+00 540 3.331011e-07 2.890244e+00 2.588796e+00 541 3.331987e-07 2.891021e+00 2.589612e+00 542 3.333940e-07 2.892574e+00 2.591244e+00 543 3.337847e-07 2.895678e+00 2.594506e+00 544 3.338823e-07 2.896454e+00 2.595321e+00 545 3.340776e-07 2.898004e+00 2.596951e+00 546 3.344683e-07 2.901104e+00 2.600209e+00 547 3.345659e-07 2.901879e+00 2.601023e+00 548 3.347612e-07 2.903428e+00 2.602650e+00 549 3.351519e-07 2.906524e+00 2.605904e+00 550 3.352495e-07 2.907298e+00 2.606717e+00 551 3.354448e-07 2.908845e+00 2.608343e+00 552 3.358354e-07 2.911937e+00 2.611593e+00 553 3.366167e-07 2.918114e+00 2.618085e+00 554 3.368120e-07 2.919657e+00 2.619706e+00 555 3.372026e-07 2.922741e+00 2.622947e+00 556 3.379839e-07 2.928904e+00 2.629423e+00 557 3.381792e-07 2.930443e+00 2.631040e+00 558 3.385698e-07 2.933519e+00 2.634274e+00 559 3.393511e-07 2.939665e+00 2.640733e+00 560 3.395464e-07 2.941200e+00 2.642346e+00 561 3.399370e-07 2.944269e+00 2.645571e+00 562 3.407183e-07 2.950400e+00 2.652014e+00 563 3.409136e-07 2.951931e+00 2.653623e+00 564 3.413042e-07 2.954992e+00 2.656840e+00 565 3.420854e-07 2.961107e+00 2.663267e+00 566 3.422808e-07 2.962634e+00 2.664872e+00 567 3.426714e-07 2.965687e+00 2.668081e+00 568 3.434526e-07 2.971788e+00 2.674492e+00 569 3.436479e-07 2.973311e+00 2.676093e+00 570 3.440386e-07 2.976357e+00 2.679293e+00 571 3.448198e-07 2.982441e+00 2.685688e+00 572 3.450151e-07 2.983960e+00 2.687285e+00 573 3.454058e-07 2.986998e+00 2.690477e+00 574 3.461870e-07 2.993067e+00 2.696856e+00 575 3.463823e-07 2.994583e+00 2.698449e+00 576 3.467729e-07 2.997613e+00 2.701633e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 577 3.475542e-07 3.003666e+00 2.707996e+00 578 3.477495e-07 3.005178e+00 2.709584e+00 579 3.481401e-07 3.008202e+00 2.712761e+00 580 3.489214e-07 3.014245e+00 2.719107e+00 581 3.491167e-07 3.015755e+00 2.720692e+00 582 3.495073e-07 3.018773e+00 2.723861e+00 583 3.502886e-07 3.024804e+00 2.730192e+00 584 3.504839e-07 3.026309e+00 2.731773e+00 585 3.508745e-07 3.029320e+00 2.734934e+00 586 3.516558e-07 3.035335e+00 2.741249e+00 587 3.518511e-07 3.036837e+00 2.742826e+00 588 3.522417e-07 3.039839e+00 2.745979e+00 589 3.530229e-07 3.045838e+00 2.752278e+00 590 3.532183e-07 3.047336e+00 2.753852e+00 591 3.536089e-07 3.050331e+00 2.756997e+00 592 3.543901e-07 3.056314e+00 2.763281e+00 593 3.545854e-07 3.057808e+00 2.764850e+00 594 3.549761e-07 3.060794e+00 2.767987e+00 595 3.557573e-07 3.066761e+00 2.774256e+00 596 3.559526e-07 3.068251e+00 2.775821e+00 597 3.563433e-07 3.071231e+00 2.778951e+00 598 3.571245e-07 3.077183e+00 2.785204e+00 599 3.573198e-07 3.078669e+00 2.786765e+00 600 3.577104e-07 3.081641e+00 2.789887e+00 601 3.584917e-07 3.087577e+00 2.796124e+00 602 3.586870e-07 3.089060e+00 2.797682e+00 603 3.590776e-07 3.092024e+00 2.800796e+00 604 3.598589e-07 3.097946e+00 2.807018e+00 605 3.600542e-07 3.099425e+00 2.808571e+00 606 3.604448e-07 3.102381e+00 2.811678e+00 607 3.612261e-07 3.108287e+00 2.817884e+00 608 3.614214e-07 3.109762e+00 2.819434e+00 609 3.618120e-07 3.112711e+00 2.822533e+00 610 3.625933e-07 3.118603e+00 2.828723e+00 611 3.627886e-07 3.120074e+00 2.830270e+00 612 3.631792e-07 3.123016e+00 2.833361e+00 613 3.639604e-07 3.128893e+00 2.839536e+00 614 3.641558e-07 3.130361e+00 2.841078e+00 615 3.645464e-07 3.133295e+00 2.844162e+00 616 3.653276e-07 3.139157e+00 2.850322e+00 617 3.655229e-07 3.140621e+00 2.851860e+00 618 3.659136e-07 3.143548e+00 2.854936e+00 619 3.666948e-07 3.149396e+00 2.861081e+00 620 3.668901e-07 3.150856e+00 2.862616e+00 621 3.672808e-07 3.153776e+00 2.865684e+00 622 3.680620e-07 3.159609e+00 2.871813e+00 623 3.682573e-07 3.161066e+00 2.873344e+00 624 3.686479e-07 3.163979e+00 2.876405e+00 625 3.694292e-07 3.169797e+00 2.882519e+00 626 3.696245e-07 3.171250e+00 2.884046e+00 627 3.700151e-07 3.174156e+00 2.887099e+00 628 3.707964e-07 3.179960e+00 2.893199e+00 629 3.709917e-07 3.181410e+00 2.894722e+00 630 3.713823e-07 3.184308e+00 2.897767e+00 631 3.721636e-07 3.190098e+00 2.903852e+00 632 3.723589e-07 3.191544e+00 2.905371e+00 633 3.727495e-07 3.194435e+00 2.908409e+00 634 3.735308e-07 3.200211e+00 2.914479e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 635 3.737261e-07 3.201653e+00 2.915994e+00 636 3.741167e-07 3.204537e+00 2.919025e+00 637 3.748979e-07 3.210299e+00 2.925079e+00 638 3.750933e-07 3.211737e+00 2.926591e+00 639 3.754839e-07 3.214614e+00 2.929614e+00 640 3.762651e-07 3.220363e+00 2.935654e+00 641 3.764604e-07 3.221798e+00 2.937162e+00 642 3.768511e-07 3.224667e+00 2.940178e+00 643 3.776323e-07 3.230401e+00 2.946203e+00 644 3.778276e-07 3.231833e+00 2.947707e+00 645 3.782183e-07 3.234696e+00 2.950715e+00 646 3.789995e-07 3.240415e+00 2.956725e+00 647 3.791948e-07 3.241844e+00 2.958226e+00 648 3.795854e-07 3.244699e+00 2.961227e+00 649 3.803667e-07 3.250405e+00 2.967222e+00 650 3.805620e-07 3.251830e+00 2.968719e+00 651 3.809526e-07 3.254678e+00 2.971713e+00 652 3.817339e-07 3.260370e+00 2.977693e+00 653 3.819292e-07 3.261791e+00 2.979187e+00 654 3.823198e-07 3.264633e+00 2.982173e+00 655 3.831011e-07 3.270311e+00 2.988139e+00 656 3.832964e-07 3.271729e+00 2.989629e+00 657 3.836870e-07 3.274563e+00 2.992608e+00 658 3.844683e-07 3.280228e+00 2.998559e+00 659 3.846636e-07 3.281642e+00 3.000045e+00 660 3.850542e-07 3.284470e+00 3.003017e+00 661 3.858354e-07 3.290120e+00 3.008954e+00 662 3.860308e-07 3.291531e+00 3.010436e+00 663 3.864214e-07 3.294352e+00 3.013400e+00 664 3.872026e-07 3.299988e+00 3.019323e+00 665 3.873979e-07 3.301396e+00 3.020802e+00 666 3.877886e-07 3.304210e+00 3.023759e+00 667 3.885698e-07 3.309833e+00 3.029667e+00 668 3.887651e-07 3.311237e+00 3.031142e+00 669 3.891558e-07 3.314044e+00 3.034092e+00 670 3.899370e-07 3.319653e+00 3.039986e+00 671 3.901323e-07 3.321054e+00 3.041457e+00 672 3.905229e-07 3.323854e+00 3.044400e+00 673 3.913042e-07 3.329450e+00 3.050279e+00 674 3.914995e-07 3.330847e+00 3.051747e+00 675 3.918901e-07 3.333641e+00 3.054683e+00 676 3.926714e-07 3.339223e+00 3.060548e+00 677 3.928667e-07 3.340617e+00 3.062013e+00 678 3.932573e-07 3.343404e+00 3.064941e+00 679 3.940386e-07 3.348973e+00 3.070792e+00 680 3.942339e-07 3.350363e+00 3.072253e+00 681 3.946245e-07 3.353143e+00 3.075174e+00 682 3.954058e-07 3.358699e+00 3.081011e+00 683 3.956011e-07 3.360086e+00 3.082468e+00 684 3.959917e-07 3.362859e+00 3.085382e+00 685 3.967729e-07 3.368401e+00 3.091205e+00 686 3.969683e-07 3.369785e+00 3.092659e+00 687 3.973589e-07 3.372552e+00 3.095566e+00 688 3.981401e-07 3.378080e+00 3.101374e+00 689 3.983354e-07 3.379461e+00 3.102825e+00 690 3.987261e-07 3.382221e+00 3.105725e+00 691 3.995073e-07 3.387736e+00 3.111519e+00 692 3.997026e-07 3.389114e+00 3.112966e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 693 4.000933e-07 3.391867e+00 3.115859e+00 694 4.008745e-07 3.397369e+00 3.121640e+00 695 4.010698e-07 3.398743e+00 3.123083e+00 696 4.014604e-07 3.401490e+00 3.125969e+00 697 4.022417e-07 3.406979e+00 3.131736e+00 698 4.024370e-07 3.408349e+00 3.133176e+00 699 4.028276e-07 3.411090e+00 3.136055e+00 700 4.036089e-07 3.416564e+00 3.141807e+00 701 4.038042e-07 3.417932e+00 3.143244e+00 702 4.041948e-07 3.420666e+00 3.146116e+00 703 4.049761e-07 3.426128e+00 3.151855e+00 704 4.051714e-07 3.427493e+00 3.153288e+00 705 4.055620e-07 3.430220e+00 3.156154e+00 706 4.063433e-07 3.435669e+00 3.161878e+00 707 4.065386e-07 3.437029e+00 3.163308e+00 708 4.069292e-07 3.439750e+00 3.166167e+00 709 4.077104e-07 3.445187e+00 3.171878e+00 710 4.079058e-07 3.446545e+00 3.173304e+00 711 4.082964e-07 3.449259e+00 3.176156e+00 712 4.090776e-07 3.454682e+00 3.181853e+00 713 4.092729e-07 3.456036e+00 3.183276e+00 714 4.096636e-07 3.458744e+00 3.186121e+00 715 4.104448e-07 3.464155e+00 3.191804e+00 716 4.106401e-07 3.465506e+00 3.193224e+00 717 4.110308e-07 3.468207e+00 3.196062e+00 718 4.118120e-07 3.473604e+00 3.201732e+00 719 4.120073e-07 3.474952e+00 3.203148e+00 720 4.123979e-07 3.477647e+00 3.205979e+00 721 4.131792e-07 3.483031e+00 3.211636e+00 722 4.133745e-07 3.484376e+00 3.213049e+00 723 4.137651e-07 3.487065e+00 3.215873e+00 724 4.145464e-07 3.492436e+00 3.221516e+00 725 4.147417e-07 3.493778e+00 3.222925e+00 726 4.151323e-07 3.496460e+00 3.225743e+00 727 4.159136e-07 3.501819e+00 3.231373e+00 728 4.161089e-07 3.503157e+00 3.232779e+00 729 4.164995e-07 3.505833e+00 3.235590e+00 730 4.172808e-07 3.511179e+00 3.241206e+00 731 4.174761e-07 3.512514e+00 3.242609e+00 732 4.178667e-07 3.515184e+00 3.245413e+00 733 4.186479e-07 3.520517e+00 3.251016e+00 734 4.188433e-07 3.521849e+00 3.252415e+00 735 4.192339e-07 3.524512e+00 3.255213e+00 736 4.200151e-07 3.529833e+00 3.260802e+00 737 4.202104e-07 3.531162e+00 3.262198e+00 738 4.206011e-07 3.533819e+00 3.264989e+00 739 4.213823e-07 3.539127e+00 3.270565e+00 740 4.215776e-07 3.540453e+00 3.271958e+00 741 4.219683e-07 3.543104e+00 3.274742e+00 742 4.227495e-07 3.548400e+00 3.280305e+00 743 4.229448e-07 3.549722e+00 3.281695e+00 744 4.233354e-07 3.552367e+00 3.284472e+00 745 4.241167e-07 3.557650e+00 3.290022e+00 746 4.243120e-07 3.558970e+00 3.291408e+00 747 4.247026e-07 3.561608e+00 3.294179e+00 748 4.254839e-07 3.566879e+00 3.299716e+00 749 4.256792e-07 3.568196e+00 3.301099e+00 750 4.260698e-07 3.570828e+00 3.303864e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 751 4.268511e-07 3.576086e+00 3.309387e+00 752 4.270464e-07 3.577400e+00 3.310767e+00 753 4.274370e-07 3.580026e+00 3.313525e+00 754 4.282183e-07 3.585272e+00 3.319035e+00 755 4.284136e-07 3.586582e+00 3.320412e+00 756 4.288042e-07 3.589202e+00 3.323163e+00 757 4.295854e-07 3.594436e+00 3.328661e+00 758 4.297808e-07 3.595743e+00 3.330034e+00 759 4.301714e-07 3.598357e+00 3.332779e+00 760 4.309526e-07 3.603578e+00 3.338264e+00 761 4.311479e-07 3.604882e+00 3.339633e+00 762 4.315386e-07 3.607490e+00 3.342372e+00 763 4.323198e-07 3.612699e+00 3.347844e+00 764 4.325151e-07 3.614000e+00 3.349210e+00 765 4.329058e-07 3.616602e+00 3.351942e+00 766 4.336870e-07 3.621799e+00 3.357401e+00 767 4.338823e-07 3.623097e+00 3.358765e+00 768 4.342729e-07 3.625693e+00 3.361490e+00 769 4.350542e-07 3.630878e+00 3.366936e+00 770 4.352495e-07 3.632173e+00 3.368297e+00 771 4.356401e-07 3.634762e+00 3.371016e+00 772 4.364214e-07 3.639935e+00 3.376449e+00 773 4.366167e-07 3.641227e+00 3.377806e+00 774 4.370073e-07 3.643810e+00 3.380519e+00 775 4.377886e-07 3.648971e+00 3.385940e+00 776 4.379839e-07 3.650260e+00 3.387294e+00 777 4.383745e-07 3.652837e+00 3.390000e+00 778 4.391558e-07 3.657986e+00 3.395408e+00 779 4.393511e-07 3.659272e+00 3.396759e+00 780 4.397417e-07 3.661844e+00 3.399459e+00 781 4.405229e-07 3.666980e+00 3.404854e+00 782 4.407183e-07 3.668264e+00 3.406202e+00 783 4.411089e-07 3.670829e+00 3.408896e+00 784 4.418901e-07 3.675954e+00 3.414278e+00 785 4.420854e-07 3.677234e+00 3.415623e+00 786 4.424761e-07 3.679793e+00 3.418310e+00 787 4.432573e-07 3.684906e+00 3.423680e+00 788 4.448198e-07 3.695112e+00 3.434399e+00 789 4.452104e-07 3.697658e+00 3.437073e+00 790 4.459917e-07 3.702748e+00 3.442418e+00 791 4.475542e-07 3.712907e+00 3.453087e+00 792 4.479448e-07 3.715441e+00 3.455749e+00 793 4.487261e-07 3.720508e+00 3.461069e+00 794 4.502886e-07 3.730622e+00 3.471689e+00 795 4.506792e-07 3.733144e+00 3.474338e+00 796 4.514604e-07 3.738186e+00 3.479634e+00 797 4.530229e-07 3.748252e+00 3.490204e+00 798 4.534136e-07 3.750763e+00 3.492841e+00 799 4.541948e-07 3.755783e+00 3.498113e+00 800 4.557573e-07 3.765802e+00 3.508634e+00 801 4.561479e-07 3.768302e+00 3.511259e+00 802 4.569292e-07 3.773298e+00 3.516506e+00 803 4.584917e-07 3.783274e+00 3.526979e+00 804 4.588823e-07 3.785762e+00 3.529592e+00 805 4.596636e-07 3.790735e+00 3.534814e+00 806 4.612261e-07 3.800664e+00 3.545239e+00 807 4.616167e-07 3.803141e+00 3.547840e+00 808 4.623979e-07 3.808091e+00 3.553039e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 809 4.639604e-07 3.817973e+00 3.563416e+00 810 4.643511e-07 3.820439e+00 3.566005e+00 811 4.651323e-07 3.825367e+00 3.571180e+00 812 4.666948e-07 3.835204e+00 3.581509e+00 813 4.670854e-07 3.837659e+00 3.584086e+00 814 4.678667e-07 3.842565e+00 3.589237e+00 815 4.694292e-07 3.852358e+00 3.599519e+00 816 4.698198e-07 3.854801e+00 3.602085e+00 817 4.706011e-07 3.859685e+00 3.607213e+00 818 4.721636e-07 3.869433e+00 3.617448e+00 819 4.725542e-07 3.871866e+00 3.620001e+00 820 4.733354e-07 3.876728e+00 3.625106e+00 821 4.748979e-07 3.886432e+00 3.635294e+00 822 4.752886e-07 3.888853e+00 3.637837e+00 823 4.760698e-07 3.893693e+00 3.642918e+00 824 4.776323e-07 3.903353e+00 3.653060e+00 825 4.780229e-07 3.905764e+00 3.655591e+00 826 4.788042e-07 3.910582e+00 3.660649e+00 827 4.803667e-07 3.920201e+00 3.670745e+00 828 4.807573e-07 3.922600e+00 3.673264e+00 829 4.815386e-07 3.927402e+00 3.678299e+00 830 4.831011e-07 3.937015e+00 3.688351e+00 831 4.834917e-07 3.939416e+00 3.690860e+00 832 4.842729e-07 3.944218e+00 3.695873e+00 833 4.858354e-07 3.953809e+00 3.705883e+00 834 4.862261e-07 3.956201e+00 3.708381e+00 835 4.870073e-07 3.960987e+00 3.713374e+00 836 4.885698e-07 3.970541e+00 3.723343e+00 837 4.889604e-07 3.972923e+00 3.725831e+00 838 4.897417e-07 3.977689e+00 3.730803e+00 839 4.913042e-07 3.987205e+00 3.740731e+00 840 4.916948e-07 3.989577e+00 3.743209e+00 841 4.924761e-07 3.994324e+00 3.748161e+00 842 4.940386e-07 4.003801e+00 3.758048e+00 843 4.944292e-07 4.006164e+00 3.760515e+00 844 4.952104e-07 4.010891e+00 3.765448e+00 845 4.967729e-07 4.020329e+00 3.775294e+00 846 4.971636e-07 4.022682e+00 3.777752e+00 847 4.979448e-07 4.027391e+00 3.782664e+00 848 4.995073e-07 4.036790e+00 3.792470e+00 849 4.998979e-07 4.039134e+00 3.794918e+00 850 5.006792e-07 4.043823e+00 3.799810e+00 851 5.022417e-07 4.053184e+00 3.809576e+00 852 5.026323e-07 4.055518e+00 3.812014e+00 853 5.034136e-07 4.060188e+00 3.816886e+00 854 5.049761e-07 4.069508e+00 3.826613e+00 855 5.053667e-07 4.071834e+00 3.829040e+00 856 5.061479e-07 4.076485e+00 3.833893e+00 857 5.077104e-07 4.085769e+00 3.843580e+00 858 5.081011e-07 4.088085e+00 3.845998e+00 859 5.088823e-07 4.092717e+00 3.850830e+00 860 5.104448e-07 4.101963e+00 3.860479e+00 861 5.108354e-07 4.104270e+00 3.862887e+00 862 5.116167e-07 4.108884e+00 3.867700e+00 863 5.131792e-07 4.118092e+00 3.877309e+00 864 5.163042e-07 4.136443e+00 3.896461e+00 865 5.170854e-07 4.141011e+00 3.901232e+00 866 5.186479e-07 4.150149e+00 3.910764e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 867 5.217729e-07 4.168356e+00 3.929761e+00 868 5.225542e-07 4.172887e+00 3.934494e+00 869 5.241167e-07 4.181952e+00 3.943949e+00 870 5.272417e-07 4.200018e+00 3.962795e+00 871 5.280229e-07 4.204511e+00 3.967490e+00 872 5.295854e-07 4.213502e+00 3.976869e+00 873 5.327104e-07 4.231387e+00 3.995563e+00 874 5.334917e-07 4.235823e+00 4.000220e+00 875 5.350542e-07 4.244685e+00 4.009521e+00 876 5.381792e-07 4.262322e+00 4.028054e+00 877 5.389604e-07 4.266716e+00 4.032669e+00 878 5.405229e-07 4.275492e+00 4.041889e+00 879 5.436479e-07 4.292964e+00 4.060257e+00 880 5.444292e-07 4.297314e+00 4.064832e+00 881 5.459917e-07 4.306009e+00 4.073969e+00 882 5.491167e-07 4.323338e+00 4.092176e+00 883 5.553667e-07 4.357736e+00 4.128314e+00 884 5.569292e-07 4.366254e+00 4.137280e+00 885 5.600542e-07 4.383266e+00 4.155167e+00 886 5.663042e-07 4.417070e+00 4.190674e+00 887 5.678667e-07 4.425432e+00 4.199484e+00 888 5.709917e-07 4.442141e+00 4.217058e+00 889 5.772417e-07 4.475349e+00 4.251946e+00 890 5.788042e-07 4.483579e+00 4.260603e+00 891 5.819292e-07 4.500015e+00 4.277874e+00 892 5.881792e-07 4.532643e+00 4.312160e+00 893 5.897417e-07 4.540717e+00 4.320667e+00 894 5.928667e-07 4.556788e+00 4.337637e+00 895 5.991167e-07 4.588411e+00 4.371291e+00 896 6.006792e-07 4.596159e+00 4.379628e+00 897 6.038042e-07 4.611601e+00 4.396247e+00 898 6.100542e-07 4.641945e+00 4.429141e+00 899 6.116167e-07 4.649358e+00 4.437274e+00 900 6.147417e-07 4.664162e+00 4.453478e+00 901 6.209917e-07 4.693293e+00 4.485502e+00 902 6.225542e-07 4.700416e+00 4.493409e+00 903 6.256792e-07 4.714649e+00 4.509157e+00 904 6.319292e-07 4.742634e+00 4.540251e+00 905 6.334917e-07 4.749526e+00 4.547923e+00 906 6.366167e-07 4.763260e+00 4.563200e+00 907 6.428667e-07 4.790300e+00 4.593352e+00 908 6.444292e-07 4.796946e+00 4.600790e+00 909 6.475542e-07 4.810171e+00 4.615597e+00 910 6.538042e-07 4.836202e+00 4.644805e+00 911 6.663042e-07 4.886912e+00 4.701645e+00 912 6.913042e-07 4.987591e+00 4.810401e+00 913 7.285230e-07 5.150329e+00 4.968960e+00 914 7.751505e-07 5.348776e+00 5.167278e+00 915 8.309494e-07 5.569133e+00 5.395699e+00 916 8.391144e-07 5.599918e+00 5.427755e+00 917 8.554445e-07 5.660759e+00 5.491224e+00 918 8.595270e-07 5.675622e+00 5.506841e+00 919 8.676920e-07 5.705320e+00 5.537911e+00 920 8.697332e-07 5.712674e+00 5.545617e+00 921 8.738157e-07 5.727371e+00 5.560987e+00 922 8.748363e-07 5.731034e+00 5.564815e+00 923 8.768776e-07 5.738351e+00 5.572461e+00 924 8.809601e-07 5.752904e+00 5.587692e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 925 8.819807e-07 5.756525e+00 5.591484e+00 926 8.840220e-07 5.763766e+00 5.599060e+00 927 8.881045e-07 5.778163e+00 5.614150e+00 928 8.891251e-07 5.781751e+00 5.617907e+00 929 8.911664e-07 5.788901e+00 5.625411e+00 930 8.952489e-07 5.803140e+00 5.640358e+00 931 8.962695e-07 5.806697e+00 5.644080e+00 932 8.983107e-07 5.813793e+00 5.651513e+00 933 9.023932e-07 5.827921e+00 5.666320e+00 934 9.034139e-07 5.831445e+00 5.670007e+00 935 9.054551e-07 5.838480e+00 5.677371e+00 936 9.095376e-07 5.852487e+00 5.692042e+00 937 9.105582e-07 5.855982e+00 5.695695e+00 938 9.125995e-07 5.862957e+00 5.702992e+00 939 9.166820e-07 5.876844e+00 5.717530e+00 940 9.177026e-07 5.880308e+00 5.721150e+00 941 9.197439e-07 5.887222e+00 5.728381e+00 942 9.238264e-07 5.900988e+00 5.742788e+00 943 9.248470e-07 5.904422e+00 5.746376e+00 944 9.268883e-07 5.911275e+00 5.753542e+00 945 9.273986e-07 5.912985e+00 5.755330e+00 946 9.284192e-07 5.916402e+00 5.758904e+00 947 9.304604e-07 5.923222e+00 5.766039e+00 948 9.309708e-07 5.924925e+00 5.767819e+00 949 9.319914e-07 5.928327e+00 5.771377e+00 950 9.340326e-07 5.935117e+00 5.778480e+00 951 9.345430e-07 5.936812e+00 5.780252e+00 952 9.355636e-07 5.940200e+00 5.783794e+00 953 9.376048e-07 5.946960e+00 5.790866e+00 954 9.381151e-07 5.948648e+00 5.792630e+00 955 9.391358e-07 5.952021e+00 5.796157e+00 956 9.411770e-07 5.958751e+00 5.803196e+00 957 9.416873e-07 5.960432e+00 5.804953e+00 958 9.427080e-07 5.963791e+00 5.808464e+00 959 9.447492e-07 5.970491e+00 5.815472e+00 960 9.452595e-07 5.972165e+00 5.817221e+00 961 9.462801e-07 5.975509e+00 5.820717e+00 962 9.483214e-07 5.982180e+00 5.827694e+00 963 9.488317e-07 5.983847e+00 5.829436e+00 964 9.498523e-07 5.987176e+00 5.832916e+00 965 9.518936e-07 5.993819e+00 5.839863e+00 966 9.524039e-07 5.995478e+00 5.841596e+00 967 9.534245e-07 5.998793e+00 5.845061e+00 968 9.554658e-07 6.005406e+00 5.851977e+00 969 9.559761e-07 6.007058e+00 5.853703e+00 970 9.569967e-07 6.010359e+00 5.857153e+00 971 9.590380e-07 6.016944e+00 5.864039e+00 972 9.595483e-07 6.018589e+00 5.865758e+00 973 9.605689e-07 6.021876e+00 5.869192e+00 974 9.626102e-07 6.028432e+00 5.876048e+00 975 9.631205e-07 6.030070e+00 5.877759e+00 976 9.641411e-07 6.033342e+00 5.881179e+00 977 9.661824e-07 6.039870e+00 5.888005e+00 978 9.666927e-07 6.041501e+00 5.889708e+00 979 9.677133e-07 6.044760e+00 5.893113e+00 980 9.697545e-07 6.051260e+00 5.899910e+00 981 9.702649e-07 6.052884e+00 5.901606e+00 982 9.712855e-07 6.056128e+00 5.904996e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 983 9.733267e-07 6.062600e+00 5.911763e+00 984 9.738370e-07 6.064217e+00 5.913451e+00 985 9.748577e-07 6.067448e+00 5.916827e+00 986 9.768989e-07 6.073892e+00 5.923565e+00 987 9.774092e-07 6.075502e+00 5.925246e+00 988 9.784299e-07 6.078720e+00 5.928607e+00 989 9.804711e-07 6.085136e+00 5.935315e+00 990 9.809814e-07 6.086740e+00 5.936989e+00 991 9.820021e-07 6.089944e+00 5.940336e+00 992 9.840433e-07 6.096332e+00 5.947016e+00 993 9.845536e-07 6.097930e+00 5.948683e+00 994 9.855742e-07 6.101120e+00 5.952014e+00 995 9.876155e-07 6.107481e+00 5.958666e+00 996 9.881258e-07 6.109072e+00 5.960325e+00 997 9.891464e-07 6.112249e+00 5.963643e+00 998 9.911877e-07 6.118592e+00 5.970266e+00 999 9.916980e-07 6.120171e+00 5.971919e+00 1000 9.927186e-07 6.123331e+00 5.975222e+00 1001 9.947599e-07 6.129642e+00 5.981817e+00 1002 9.952702e-07 6.131217e+00 5.983462e+00 1003 9.962908e-07 6.134365e+00 5.986751e+00 1004 9.983321e-07 6.140647e+00 5.993318e+00 1005 9.988424e-07 6.142216e+00 5.994956e+00 1006 9.998630e-07 6.145352e+00 5.998232e+00 1007 1.001904e-06 6.151606e+00 6.004770e+00 1008 1.002415e-06 6.153171e+00 6.006402e+00 1009 1.003435e-06 6.156294e+00 6.009663e+00 1010 1.005476e-06 6.162532e+00 6.016174e+00 1011 1.005987e-06 6.164084e+00 6.017798e+00 1012 1.007007e-06 6.167191e+00 6.021046e+00 1013 1.009049e-06 6.173397e+00 6.027529e+00 1014 1.009559e-06 6.174946e+00 6.029147e+00 1015 1.010580e-06 6.178041e+00 6.032381e+00 1016 1.012621e-06 6.184218e+00 6.038836e+00 1017 1.013131e-06 6.185762e+00 6.040447e+00 1018 1.014152e-06 6.188846e+00 6.043667e+00 1019 1.014407e-06 6.189617e+00 6.044472e+00 1020 1.014917e-06 6.191156e+00 6.046080e+00 1021 1.015938e-06 6.194232e+00 6.049293e+00 1022 1.017979e-06 6.200370e+00 6.055708e+00 1023 1.018489e-06 6.201905e+00 6.057309e+00 1024 1.019510e-06 6.204970e+00 6.060509e+00 1025 1.019765e-06 6.205736e+00 6.061308e+00 1026 1.020276e-06 6.207266e+00 6.062906e+00 1027 1.021296e-06 6.210323e+00 6.066099e+00 1028 1.023337e-06 6.216423e+00 6.072473e+00 1029 1.023848e-06 6.217948e+00 6.074064e+00 1030 1.024868e-06 6.220995e+00 6.077244e+00 1031 1.025123e-06 6.221755e+00 6.078038e+00 1032 1.025634e-06 6.223276e+00 6.079626e+00 1033 1.026654e-06 6.226315e+00 6.082799e+00 1034 1.026910e-06 6.227074e+00 6.083592e+00 1035 1.027420e-06 6.228591e+00 6.085176e+00 1036 1.028441e-06 6.231623e+00 6.088343e+00 1037 1.030482e-06 6.237672e+00 6.094664e+00 1038 1.030992e-06 6.239185e+00 6.096242e+00 1039 1.032013e-06 6.242207e+00 6.099395e+00 1040 1.032268e-06 6.242961e+00 6.100182e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1041 1.032778e-06 6.244470e+00 6.101757e+00 1042 1.033799e-06 6.247483e+00 6.104904e+00 1043 1.034054e-06 6.248236e+00 6.105690e+00 1044 1.034564e-06 6.249741e+00 6.107261e+00 1045 1.035585e-06 6.252748e+00 6.110401e+00 1046 1.035840e-06 6.253499e+00 6.111186e+00 1047 1.036350e-06 6.255001e+00 6.112754e+00 1048 1.037371e-06 6.258002e+00 6.115887e+00 1049 1.037626e-06 6.258752e+00 6.116670e+00 1050 1.038136e-06 6.260251e+00 6.118235e+00 1051 1.039157e-06 6.263245e+00 6.121362e+00 1052 1.039412e-06 6.263994e+00 6.122143e+00 1053 1.039923e-06 6.265490e+00 6.123705e+00 1054 1.040943e-06 6.268478e+00 6.126826e+00 1055 1.041198e-06 6.269225e+00 6.127605e+00 1056 1.041709e-06 6.270718e+00 6.129163e+00 1057 1.042729e-06 6.273700e+00 6.132278e+00 1058 1.042984e-06 6.274445e+00 6.133055e+00 1059 1.043495e-06 6.275935e+00 6.134611e+00 1060 1.044515e-06 6.278911e+00 6.137718e+00 1061 1.044771e-06 6.279655e+00 6.138495e+00 1062 1.045281e-06 6.281142e+00 6.140047e+00 1063 1.046301e-06 6.284112e+00 6.143148e+00 1064 1.046557e-06 6.284855e+00 6.143923e+00 1065 1.047067e-06 6.286338e+00 6.145471e+00 1066 1.048088e-06 6.289303e+00 6.148566e+00 1067 1.048343e-06 6.290043e+00 6.149339e+00 1068 1.048853e-06 6.291524e+00 6.150885e+00 1069 1.049874e-06 6.294482e+00 6.153973e+00 1070 1.050129e-06 6.295222e+00 6.154745e+00 1071 1.050639e-06 6.296700e+00 6.156287e+00 1072 1.051660e-06 6.299652e+00 6.159369e+00 1073 1.051915e-06 6.300390e+00 6.160139e+00 1074 1.052425e-06 6.301865e+00 6.161679e+00 1075 1.053446e-06 6.304811e+00 6.164754e+00 1076 1.053701e-06 6.305547e+00 6.165523e+00 1077 1.054211e-06 6.307019e+00 6.167059e+00 1078 1.055232e-06 6.309959e+00 6.170128e+00 1079 1.055487e-06 6.310694e+00 6.170895e+00 1080 1.055997e-06 6.312163e+00 6.172428e+00 1081 1.057018e-06 6.315098e+00 6.175491e+00 1082 1.057273e-06 6.315831e+00 6.176256e+00 1083 1.057784e-06 6.317297e+00 6.177786e+00 1084 1.058804e-06 6.320226e+00 6.180843e+00 1085 1.059059e-06 6.320958e+00 6.181607e+00 1086 1.059570e-06 6.322421e+00 6.183134e+00 1087 1.060590e-06 6.325343e+00 6.186184e+00 1088 1.060845e-06 6.326074e+00 6.186946e+00 1089 1.061356e-06 6.327534e+00 6.188470e+00 1090 1.062376e-06 6.330451e+00 6.191514e+00 1091 1.062631e-06 6.331180e+00 6.192275e+00 1092 1.063142e-06 6.332637e+00 6.193795e+00 1093 1.064162e-06 6.335548e+00 6.196834e+00 1094 1.064418e-06 6.336275e+00 6.197593e+00 1095 1.064928e-06 6.337730e+00 6.199110e+00 1096 1.065949e-06 6.340635e+00 6.202142e+00 1097 1.066204e-06 6.341361e+00 6.202899e+00 1098 1.066714e-06 6.342813e+00 6.204414e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1099 1.067735e-06 6.345712e+00 6.207440e+00 1100 1.067990e-06 6.346436e+00 6.208196e+00 1101 1.068500e-06 6.347885e+00 6.209707e+00 1102 1.069521e-06 6.350779e+00 6.212727e+00 1103 1.069776e-06 6.351502e+00 6.213481e+00 1104 1.070286e-06 6.352948e+00 6.214989e+00 1105 1.071307e-06 6.355835e+00 6.218003e+00 1106 1.071562e-06 6.356557e+00 6.218756e+00 1107 1.072072e-06 6.358000e+00 6.220261e+00 1108 1.073093e-06 6.360882e+00 6.223268e+00 1109 1.073348e-06 6.361603e+00 6.224020e+00 1110 1.073858e-06 6.363043e+00 6.225522e+00 1111 1.074879e-06 6.365919e+00 6.228523e+00 1112 1.075134e-06 6.366638e+00 6.229273e+00 1113 1.075644e-06 6.368075e+00 6.230772e+00 1114 1.076665e-06 6.370946e+00 6.233768e+00 1115 1.076920e-06 6.371663e+00 6.234516e+00 1116 1.077431e-06 6.373098e+00 6.236012e+00 1117 1.078451e-06 6.375963e+00 6.239001e+00 1118 1.078706e-06 6.376679e+00 6.239748e+00 1119 1.079217e-06 6.378111e+00 6.241241e+00 1120 1.080237e-06 6.380970e+00 6.244225e+00 1121 1.080492e-06 6.381685e+00 6.244970e+00 1122 1.081003e-06 6.383114e+00 6.246460e+00 1123 1.082023e-06 6.385967e+00 6.249437e+00 1124 1.082279e-06 6.386681e+00 6.250181e+00 1125 1.082789e-06 6.388107e+00 6.251668e+00 1126 1.083809e-06 6.390955e+00 6.254640e+00 1127 1.084065e-06 6.391667e+00 6.255382e+00 1128 1.084575e-06 6.393090e+00 6.256866e+00 1129 1.085596e-06 6.395933e+00 6.259831e+00 1130 1.085851e-06 6.396643e+00 6.260572e+00 1131 1.086361e-06 6.398064e+00 6.262053e+00 1132 1.087382e-06 6.400901e+00 6.265013e+00 1133 1.087637e-06 6.401610e+00 6.265752e+00 1134 1.088147e-06 6.403028e+00 6.267230e+00 1135 1.089168e-06 6.405859e+00 6.270184e+00 1136 1.089423e-06 6.406567e+00 6.270922e+00 1137 1.089933e-06 6.407982e+00 6.272397e+00 1138 1.090954e-06 6.410808e+00 6.275345e+00 1139 1.091209e-06 6.411514e+00 6.276081e+00 1140 1.091719e-06 6.412927e+00 6.277553e+00 1141 1.092740e-06 6.415747e+00 6.280495e+00 1142 1.092995e-06 6.416452e+00 6.281230e+00 1143 1.093505e-06 6.417862e+00 6.282700e+00 1144 1.094526e-06 6.420677e+00 6.285636e+00 1145 1.094781e-06 6.421380e+00 6.286369e+00 1146 1.095292e-06 6.422787e+00 6.287836e+00 1147 1.096312e-06 6.425597e+00 6.290766e+00 1148 1.096567e-06 6.426299e+00 6.291498e+00 1149 1.097078e-06 6.427703e+00 6.292961e+00 1150 1.098098e-06 6.430508e+00 6.295886e+00 1151 1.098353e-06 6.431209e+00 6.296616e+00 1152 1.098864e-06 6.432610e+00 6.298077e+00 1153 1.099884e-06 6.435409e+00 6.300996e+00 1154 1.100139e-06 6.436109e+00 6.301725e+00 1155 1.100650e-06 6.437507e+00 6.303183e+00 1156 1.101670e-06 6.440301e+00 6.306095e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1157 1.101926e-06 6.440999e+00 6.306823e+00 1158 1.102436e-06 6.442395e+00 6.308278e+00 1159 1.103457e-06 6.445183e+00 6.311185e+00 1160 1.103712e-06 6.445880e+00 6.311911e+00 1161 1.104222e-06 6.447274e+00 6.313363e+00 1162 1.105243e-06 6.450057e+00 6.316265e+00 1163 1.105498e-06 6.450752e+00 6.316990e+00 1164 1.106008e-06 6.452143e+00 6.318439e+00 1165 1.107029e-06 6.454921e+00 6.321335e+00 1166 1.107284e-06 6.455615e+00 6.322058e+00 1167 1.107794e-06 6.457003e+00 6.323504e+00 1168 1.108815e-06 6.459775e+00 6.326395e+00 1169 1.109070e-06 6.460469e+00 6.327117e+00 1170 1.109580e-06 6.461854e+00 6.328560e+00 1171 1.110601e-06 6.464624e+00 6.331445e+00 1172 1.110856e-06 6.465315e+00 6.332165e+00 1173 1.111366e-06 6.466697e+00 6.333606e+00 1174 1.112387e-06 6.469460e+00 6.336485e+00 1175 1.112642e-06 6.470150e+00 6.337204e+00 1176 1.113152e-06 6.471529e+00 6.338642e+00 1177 1.114173e-06 6.474288e+00 6.341515e+00 1178 1.114428e-06 6.474976e+00 6.342233e+00 1179 1.114939e-06 6.476353e+00 6.343668e+00 1180 1.115959e-06 6.479106e+00 6.346536e+00 1181 1.116214e-06 6.479793e+00 6.347252e+00 1182 1.116725e-06 6.481167e+00 6.348684e+00 1183 1.117745e-06 6.483915e+00 6.351547e+00 1184 1.118000e-06 6.484601e+00 6.352262e+00 1185 1.118511e-06 6.485973e+00 6.353691e+00 1186 1.119531e-06 6.488716e+00 6.356548e+00 1187 1.119787e-06 6.489400e+00 6.357261e+00 1188 1.120297e-06 6.490769e+00 6.358688e+00 1189 1.121317e-06 6.493507e+00 6.361539e+00 1190 1.121573e-06 6.494191e+00 6.362251e+00 1191 1.122083e-06 6.495557e+00 6.363675e+00 1192 1.123104e-06 6.498290e+00 6.366521e+00 1193 1.123359e-06 6.498972e+00 6.367232e+00 1194 1.123869e-06 6.500336e+00 6.368653e+00 1195 1.124890e-06 6.503064e+00 6.371493e+00 1196 1.125145e-06 6.503745e+00 6.372203e+00 1197 1.125655e-06 6.505106e+00 6.373621e+00 1198 1.126676e-06 6.507829e+00 6.376456e+00 1199 1.126931e-06 6.508509e+00 6.377164e+00 1200 1.127441e-06 6.509868e+00 6.378580e+00 1201 1.128462e-06 6.512586e+00 6.381409e+00 1202 1.128717e-06 6.513264e+00 6.382116e+00 1203 1.129227e-06 6.514621e+00 6.383529e+00 1204 1.130248e-06 6.517334e+00 6.386353e+00 1205 1.130503e-06 6.518011e+00 6.387058e+00 1206 1.131013e-06 6.519365e+00 6.388469e+00 1207 1.132034e-06 6.522073e+00 6.391287e+00 1208 1.132289e-06 6.522749e+00 6.391991e+00 1209 1.132800e-06 6.524101e+00 6.393399e+00 1210 1.133820e-06 6.526804e+00 6.396212e+00 1211 1.134075e-06 6.527479e+00 6.396915e+00 1212 1.134586e-06 6.528828e+00 6.398320e+00 1213 1.135606e-06 6.531527e+00 6.401128e+00 1214 1.135861e-06 6.532200e+00 6.401829e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1215 1.136372e-06 6.533547e+00 6.403232e+00 1216 1.137392e-06 6.536241e+00 6.406034e+00 1217 1.137647e-06 6.536913e+00 6.406734e+00 1218 1.138158e-06 6.538257e+00 6.408134e+00 1219 1.139178e-06 6.540947e+00 6.410931e+00 1220 1.139434e-06 6.541617e+00 6.411630e+00 1221 1.139944e-06 6.542960e+00 6.413027e+00 1222 1.140965e-06 6.545644e+00 6.415819e+00 1223 1.141220e-06 6.546314e+00 6.416517e+00 1224 1.141730e-06 6.547653e+00 6.417911e+00 1225 1.142751e-06 6.550333e+00 6.420698e+00 1226 1.143006e-06 6.551002e+00 6.421394e+00 1227 1.143516e-06 6.552339e+00 6.422786e+00 1228 1.144537e-06 6.555014e+00 6.425568e+00 1229 1.144792e-06 6.555682e+00 6.426262e+00 1230 1.145302e-06 6.557017e+00 6.427652e+00 1231 1.146323e-06 6.559687e+00 6.430428e+00 1232 1.146578e-06 6.560354e+00 6.431122e+00 1233 1.147088e-06 6.561686e+00 6.432508e+00 1234 1.148109e-06 6.564352e+00 6.435280e+00 1235 1.148364e-06 6.565017e+00 6.435972e+00 1236 1.148874e-06 6.566348e+00 6.437356e+00 1237 1.149895e-06 6.569007e+00 6.440122e+00 1238 1.150150e-06 6.569671e+00 6.440813e+00 1239 1.150660e-06 6.570998e+00 6.442195e+00 1240 1.151681e-06 6.573651e+00 6.444956e+00 1241 1.151936e-06 6.574313e+00 6.445645e+00 1242 1.152447e-06 6.575638e+00 6.447024e+00 1243 1.153467e-06 6.578287e+00 6.449780e+00 1244 1.153722e-06 6.578948e+00 6.450469e+00 1245 1.154233e-06 6.580271e+00 6.451845e+00 1246 1.155253e-06 6.582916e+00 6.454596e+00 1247 1.155508e-06 6.583576e+00 6.455283e+00 1248 1.156019e-06 6.584897e+00 6.456657e+00 1249 1.157039e-06 6.587538e+00 6.459402e+00 1250 1.157295e-06 6.588198e+00 6.460088e+00 1251 1.157805e-06 6.589517e+00 6.461459e+00 1252 1.158825e-06 6.592153e+00 6.464200e+00 1253 1.159081e-06 6.592811e+00 6.464884e+00 1254 1.159591e-06 6.594128e+00 6.466253e+00 1255 1.160612e-06 6.596760e+00 6.468989e+00 1256 1.160867e-06 6.597418e+00 6.469672e+00 1257 1.161377e-06 6.598733e+00 6.471038e+00 1258 1.162398e-06 6.601361e+00 6.473769e+00 1259 1.162653e-06 6.602017e+00 6.474451e+00 1260 1.163163e-06 6.603330e+00 6.475815e+00 1261 1.164184e-06 6.605954e+00 6.478540e+00 1262 1.164439e-06 6.606609e+00 6.479221e+00 1263 1.164949e-06 6.607920e+00 6.480583e+00 1264 1.165970e-06 6.610540e+00 6.483303e+00 1265 1.166225e-06 6.611194e+00 6.483983e+00 1266 1.166735e-06 6.612503e+00 6.485342e+00 1267 1.167756e-06 6.615118e+00 6.488058e+00 1268 1.168011e-06 6.615772e+00 6.488736e+00 1269 1.168521e-06 6.617078e+00 6.490093e+00 1270 1.169542e-06 6.619690e+00 6.492804e+00 1271 1.169797e-06 6.620343e+00 6.493481e+00 1272 1.170308e-06 6.621647e+00 6.494835e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1273 1.171328e-06 6.624255e+00 6.497541e+00 1274 1.171583e-06 6.624906e+00 6.498218e+00 1275 1.172094e-06 6.626209e+00 6.499569e+00 1276 1.173114e-06 6.628813e+00 6.502271e+00 1277 1.173369e-06 6.629463e+00 6.502946e+00 1278 1.173880e-06 6.630764e+00 6.504295e+00 1279 1.174900e-06 6.633364e+00 6.506992e+00 1280 1.175155e-06 6.634013e+00 6.507665e+00 1281 1.175666e-06 6.635312e+00 6.509012e+00 1282 1.176686e-06 6.637908e+00 6.511705e+00 1283 1.176942e-06 6.638557e+00 6.512377e+00 1284 1.177452e-06 6.639854e+00 6.513722e+00 1285 1.178473e-06 6.642446e+00 6.516409e+00 1286 1.178728e-06 6.643094e+00 6.517081e+00 1287 1.179238e-06 6.644389e+00 6.518423e+00 1288 1.180259e-06 6.646978e+00 6.521106e+00 1289 1.180514e-06 6.647624e+00 6.521776e+00 1290 1.181024e-06 6.648918e+00 6.523116e+00 1291 1.182045e-06 6.651503e+00 6.525794e+00 1292 1.182300e-06 6.652149e+00 6.526463e+00 1293 1.182810e-06 6.653440e+00 6.527801e+00 1294 1.183831e-06 6.656022e+00 6.530475e+00 1295 1.184086e-06 6.656667e+00 6.531143e+00 1296 1.184596e-06 6.657957e+00 6.532478e+00 1297 1.185617e-06 6.660535e+00 6.535148e+00 1298 1.185872e-06 6.661180e+00 6.535815e+00 1299 1.186382e-06 6.662468e+00 6.537148e+00 1300 1.187403e-06 6.665043e+00 6.539813e+00 1301 1.187658e-06 6.665687e+00 6.540479e+00 1302 1.188168e-06 6.666973e+00 6.541810e+00 1303 1.189189e-06 6.669545e+00 6.544470e+00 1304 1.189444e-06 6.670188e+00 6.545135e+00 1305 1.189955e-06 6.671473e+00 6.546464e+00 1306 1.190975e-06 6.674042e+00 6.549120e+00 1307 1.191230e-06 6.674684e+00 6.549783e+00 1308 1.191741e-06 6.675968e+00 6.551110e+00 1309 1.192761e-06 6.678534e+00 6.553762e+00 1310 1.193016e-06 6.679176e+00 6.554425e+00 1311 1.193527e-06 6.680458e+00 6.555749e+00 1312 1.194547e-06 6.683021e+00 6.558397e+00 1313 1.194803e-06 6.683662e+00 6.559059e+00 1314 1.195313e-06 6.684943e+00 6.560381e+00 1315 1.196333e-06 6.687504e+00 6.563025e+00 1316 1.196589e-06 6.688144e+00 6.563685e+00 1317 1.197099e-06 6.689424e+00 6.565006e+00 1318 1.198120e-06 6.691983e+00 6.567645e+00 1319 1.200161e-06 6.697098e+00 6.572917e+00 1320 1.200671e-06 6.698376e+00 6.574234e+00 1321 1.201692e-06 6.700930e+00 6.576865e+00 1322 1.201947e-06 6.701568e+00 6.577523e+00 1323 1.202457e-06 6.702845e+00 6.578837e+00 1324 1.203478e-06 6.705397e+00 6.581465e+00 1325 1.203733e-06 6.706035e+00 6.582121e+00 1326 1.204243e-06 6.707311e+00 6.583434e+00 1327 1.205264e-06 6.709863e+00 6.586058e+00 1328 1.205519e-06 6.710501e+00 6.586714e+00 1329 1.206029e-06 6.711776e+00 6.588024e+00 1330 1.207050e-06 6.714327e+00 6.590645e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1331 1.207305e-06 6.714965e+00 6.591299e+00 1332 1.207816e-06 6.716240e+00 6.592608e+00 1333 1.208836e-06 6.718790e+00 6.595225e+00 1334 1.209091e-06 6.719427e+00 6.595879e+00 1335 1.209602e-06 6.720702e+00 6.597186e+00 1336 1.210622e-06 6.723252e+00 6.599799e+00 1337 1.210877e-06 6.723889e+00 6.600452e+00 1338 1.211388e-06 6.725164e+00 6.601758e+00 1339 1.212408e-06 6.727714e+00 6.604368e+00 1340 1.212663e-06 6.728352e+00 6.605020e+00 1341 1.213174e-06 6.729627e+00 6.606324e+00 1342 1.214194e-06 6.732177e+00 6.608931e+00 1343 1.214450e-06 6.732815e+00 6.609582e+00 1344 1.214960e-06 6.734091e+00 6.610885e+00 1345 1.215981e-06 6.736642e+00 6.613488e+00 1346 1.216236e-06 6.737280e+00 6.614139e+00 1347 1.216746e-06 6.738557e+00 6.615440e+00 1348 1.217767e-06 6.741110e+00 6.618041e+00 1349 1.218022e-06 6.741749e+00 6.618691e+00 1350 1.218532e-06 6.743027e+00 6.619990e+00 1351 1.219553e-06 6.745583e+00 6.622588e+00 1352 1.219808e-06 6.746223e+00 6.623238e+00 1353 1.220318e-06 6.747502e+00 6.624536e+00 1354 1.221339e-06 6.750062e+00 6.627132e+00 1355 1.221594e-06 6.750703e+00 6.627780e+00 1356 1.222104e-06 6.751985e+00 6.629078e+00 1357 1.223125e-06 6.754552e+00 6.631671e+00 1358 1.223380e-06 6.755192e+00 6.632319e+00 1359 1.223890e-06 6.756472e+00 6.633615e+00 1360 1.224911e-06 6.759023e+00 6.636207e+00 1361 1.225166e-06 6.759661e+00 6.636854e+00 1362 1.225676e-06 6.760935e+00 6.638149e+00 1363 1.226697e-06 6.763470e+00 6.640738e+00 1364 1.226952e-06 6.764104e+00 6.641385e+00 1365 1.227463e-06 6.765371e+00 6.642678e+00 1366 1.227590e-06 6.765687e+00 6.643001e+00 1367 1.227845e-06 6.766319e+00 6.643648e+00 1368 1.228356e-06 6.767579e+00 6.644941e+00 1369 1.228483e-06 6.767894e+00 6.645264e+00 1370 1.228738e-06 6.768523e+00 6.645910e+00 1371 1.229249e-06 6.769777e+00 6.647202e+00 1372 1.229376e-06 6.770091e+00 6.647524e+00 1373 1.229631e-06 6.770717e+00 6.648170e+00 1374 1.230142e-06 6.771965e+00 6.649461e+00 1375 1.230269e-06 6.772276e+00 6.649783e+00 1376 1.230524e-06 6.772899e+00 6.650429e+00 1377 1.231035e-06 6.774140e+00 6.651718e+00 1378 1.231162e-06 6.774450e+00 6.652041e+00 1379 1.231417e-06 6.775069e+00 6.652685e+00 1380 1.231928e-06 6.776302e+00 6.653974e+00 1381 1.232055e-06 6.776609e+00 6.654296e+00 1382 1.232311e-06 6.777221e+00 6.654939e+00 1383 1.232821e-06 6.778438e+00 6.656227e+00 1384 1.232948e-06 6.778741e+00 6.656548e+00 1385 1.233204e-06 6.779345e+00 6.657191e+00 1386 1.233714e-06 6.780545e+00 6.658477e+00 1387 1.233841e-06 6.780843e+00 6.658798e+00 1388 1.234097e-06 6.781438e+00 6.659440e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1389 1.234607e-06 6.782619e+00 6.660724e+00 1390 1.234735e-06 6.782913e+00 6.661044e+00 1391 1.234990e-06 6.783498e+00 6.661685e+00 1392 1.235500e-06 6.784661e+00 6.662966e+00 1393 1.235628e-06 6.784950e+00 6.663286e+00 1394 1.235883e-06 6.785526e+00 6.663926e+00 1395 1.236393e-06 6.786669e+00 6.665205e+00 1396 1.236521e-06 6.786954e+00 6.665524e+00 1397 1.236776e-06 6.787520e+00 6.666163e+00 1398 1.237286e-06 6.788645e+00 6.667439e+00 1399 1.237414e-06 6.788924e+00 6.667757e+00 1400 1.237669e-06 6.789481e+00 6.668394e+00 1401 1.238179e-06 6.790585e+00 6.669667e+00 1402 1.238307e-06 6.790860e+00 6.669985e+00 1403 1.238562e-06 6.791407e+00 6.670620e+00 1404 1.239072e-06 6.792491e+00 6.671889e+00 1405 1.239200e-06 6.792761e+00 6.672206e+00 1406 1.239455e-06 6.793298e+00 6.672839e+00 1407 1.239965e-06 6.794361e+00 6.674105e+00 1408 1.240093e-06 6.794625e+00 6.674421e+00 1409 1.240348e-06 6.795152e+00 6.675052e+00 1410 1.240858e-06 6.796194e+00 6.676313e+00 1411 1.240986e-06 6.796453e+00 6.676628e+00 1412 1.241241e-06 6.796968e+00 6.677258e+00 1413 1.241751e-06 6.797989e+00 6.678514e+00 1414 1.241879e-06 6.798242e+00 6.678828e+00 1415 1.242134e-06 6.798747e+00 6.679455e+00 1416 1.242644e-06 6.799744e+00 6.680707e+00 1417 1.242772e-06 6.799992e+00 6.681020e+00 1418 1.243027e-06 6.800485e+00 6.681645e+00 1419 1.243537e-06 6.801460e+00 6.682892e+00 1420 1.243665e-06 6.801702e+00 6.683203e+00 1421 1.243920e-06 6.802183e+00 6.683825e+00 1422 1.244430e-06 6.803134e+00 6.685067e+00 1423 1.244558e-06 6.803370e+00 6.685376e+00 1424 1.244813e-06 6.803840e+00 6.685996e+00 1425 1.245324e-06 6.804767e+00 6.687232e+00 1426 1.245451e-06 6.804996e+00 6.687540e+00 1427 1.245706e-06 6.805454e+00 6.688156e+00 1428 1.246217e-06 6.806356e+00 6.689386e+00 1429 1.246344e-06 6.806579e+00 6.689693e+00 1430 1.246599e-06 6.807024e+00 6.690306e+00 1431 1.247110e-06 6.807901e+00 6.691530e+00 1432 1.247237e-06 6.808118e+00 6.691835e+00 1433 1.247492e-06 6.808551e+00 6.692445e+00 1434 1.248003e-06 6.809402e+00 6.693662e+00 1435 1.248130e-06 6.809613e+00 6.693965e+00 1436 1.248385e-06 6.810032e+00 6.694572e+00 1437 1.248896e-06 6.810857e+00 6.695781e+00 1438 1.249023e-06 6.811061e+00 6.696083e+00 1439 1.249278e-06 6.811467e+00 6.696686e+00 1440 1.249789e-06 6.812266e+00 6.697888e+00 1441 1.249916e-06 6.812463e+00 6.698188e+00 1442 1.250171e-06 6.812856e+00 6.698787e+00 1443 1.250682e-06 6.813627e+00 6.699982e+00 1444 1.250809e-06 6.813818e+00 6.700279e+00 1445 1.251065e-06 6.814197e+00 6.700875e+00 1446 1.251575e-06 6.814941e+00 6.702061e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1447 1.251702e-06 6.815125e+00 6.702357e+00 1448 1.251958e-06 6.815490e+00 6.702948e+00 1449 1.252468e-06 6.816207e+00 6.704126e+00 1450 1.252595e-06 6.816383e+00 6.704419e+00 1451 1.252851e-06 6.816735e+00 6.705006e+00 1452 1.253361e-06 6.817423e+00 6.706175e+00 1453 1.253489e-06 6.817592e+00 6.706466e+00 1454 1.253744e-06 6.817930e+00 6.707048e+00 1455 1.254254e-06 6.818589e+00 6.708208e+00 1456 1.254382e-06 6.818752e+00 6.708497e+00 1457 1.254637e-06 6.819074e+00 6.709075e+00 1458 1.255147e-06 6.819705e+00 6.710225e+00 1459 1.255275e-06 6.819860e+00 6.710512e+00 1460 1.255530e-06 6.820168e+00 6.711085e+00 1461 1.256040e-06 6.820770e+00 6.712225e+00 1462 1.256168e-06 6.820918e+00 6.712509e+00 1463 1.256423e-06 6.821211e+00 6.713077e+00 1464 1.256933e-06 6.821783e+00 6.714207e+00 1465 1.257061e-06 6.821924e+00 6.714489e+00 1466 1.257316e-06 6.822202e+00 6.715051e+00 1467 1.257826e-06 6.822744e+00 6.716171e+00 1468 1.257954e-06 6.822877e+00 6.716450e+00 1469 1.258209e-06 6.823141e+00 6.717007e+00 1470 1.258719e-06 6.823653e+00 6.718116e+00 1471 1.258847e-06 6.823778e+00 6.718392e+00 1472 1.259102e-06 6.824027e+00 6.718943e+00 1473 1.259612e-06 6.824508e+00 6.720041e+00 1474 1.259740e-06 6.824626e+00 6.720314e+00 1475 1.259995e-06 6.824859e+00 6.720860e+00 1476 1.260505e-06 6.825309e+00 6.721946e+00 1477 1.260633e-06 6.825420e+00 6.722217e+00 1478 1.260888e-06 6.825637e+00 6.722756e+00 1479 1.261398e-06 6.826057e+00 6.723831e+00 1480 1.261526e-06 6.826159e+00 6.724098e+00 1481 1.261781e-06 6.826361e+00 6.724632e+00 1482 1.262291e-06 6.826749e+00 6.725694e+00 1483 1.262419e-06 6.826844e+00 6.725958e+00 1484 1.262674e-06 6.827030e+00 6.726485e+00 1485 1.263184e-06 6.827387e+00 6.727535e+00 1486 1.263312e-06 6.827474e+00 6.727795e+00 1487 1.263567e-06 6.827644e+00 6.728317e+00 1488 1.264078e-06 6.827969e+00 6.729353e+00 1489 1.264205e-06 6.828048e+00 6.729611e+00 1490 1.264460e-06 6.828202e+00 6.730125e+00 1491 1.264971e-06 6.828495e+00 6.731148e+00 1492 1.265098e-06 6.828566e+00 6.731403e+00 1493 1.265353e-06 6.828705e+00 6.731910e+00 1494 1.265864e-06 6.828965e+00 6.732920e+00 1495 1.265991e-06 6.829028e+00 6.733171e+00 1496 1.266246e-06 6.829150e+00 6.733671e+00 1497 1.266757e-06 6.829378e+00 6.734667e+00 1498 1.266884e-06 6.829433e+00 6.734914e+00 1499 1.267139e-06 6.829539e+00 6.735408e+00 1500 1.267650e-06 6.829735e+00 6.736389e+00 1501 1.267777e-06 6.829781e+00 6.736633e+00 1502 1.268032e-06 6.829871e+00 6.737120e+00 1503 1.268543e-06 6.830033e+00 6.738086e+00 1504 1.268670e-06 6.830071e+00 6.738326e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1505 1.268925e-06 6.830145e+00 6.738805e+00 1506 1.269436e-06 6.830275e+00 6.739757e+00 1507 1.269563e-06 6.830305e+00 6.739993e+00 1508 1.269819e-06 6.830361e+00 6.740465e+00 1509 1.270329e-06 6.830458e+00 6.741401e+00 1510 1.270456e-06 6.830480e+00 6.741634e+00 1511 1.270712e-06 6.830520e+00 6.742097e+00 1512 1.271222e-06 6.830583e+00 6.743018e+00 1513 1.271349e-06 6.830596e+00 6.743247e+00 1514 1.271605e-06 6.830620e+00 6.743703e+00 1515 1.272115e-06 6.830650e+00 6.744608e+00 1516 1.272243e-06 6.830655e+00 6.744832e+00 1517 1.272498e-06 6.830662e+00 6.745280e+00 1518 1.273008e-06 6.830658e+00 6.746169e+00 1519 1.273136e-06 6.830655e+00 6.746389e+00 1520 1.273391e-06 6.830645e+00 6.746829e+00 1521 1.273901e-06 6.830607e+00 6.747701e+00 1522 1.274029e-06 6.830595e+00 6.747917e+00 1523 1.274284e-06 6.830569e+00 6.748348e+00 1524 1.274794e-06 6.830497e+00 6.749204e+00 1525 1.274922e-06 6.830477e+00 6.749416e+00 1526 1.275177e-06 6.830433e+00 6.749838e+00 1527 1.275687e-06 6.830328e+00 6.750677e+00 1528 1.275815e-06 6.830299e+00 6.750884e+00 1529 1.276070e-06 6.830238e+00 6.751298e+00 1530 1.276580e-06 6.830099e+00 6.752119e+00 1531 1.276708e-06 6.830062e+00 6.752323e+00 1532 1.276963e-06 6.829984e+00 6.752728e+00 1533 1.277473e-06 6.829811e+00 6.753531e+00 1534 1.277601e-06 6.829765e+00 6.753730e+00 1535 1.277856e-06 6.829670e+00 6.754126e+00 1536 1.278366e-06 6.829462e+00 6.754911e+00 1537 1.278494e-06 6.829408e+00 6.755105e+00 1538 1.278749e-06 6.829296e+00 6.755493e+00 1539 1.279259e-06 6.829055e+00 6.756259e+00 1540 1.279387e-06 6.828993e+00 6.756449e+00 1541 1.279642e-06 6.828865e+00 6.756827e+00 1542 1.280152e-06 6.828592e+00 6.757575e+00 1543 1.280280e-06 6.828521e+00 6.757760e+00 1544 1.280535e-06 6.828377e+00 6.758129e+00 1545 1.281045e-06 6.828069e+00 6.758858e+00 1546 1.281173e-06 6.827990e+00 6.759038e+00 1547 1.281428e-06 6.827827e+00 6.759398e+00 1548 1.281938e-06 6.827484e+00 6.760108e+00 1549 1.282066e-06 6.827395e+00 6.760283e+00 1550 1.282321e-06 6.827215e+00 6.760633e+00 1551 1.282832e-06 6.826834e+00 6.761323e+00 1552 1.282959e-06 6.826736e+00 6.761494e+00 1553 1.283214e-06 6.826538e+00 6.761834e+00 1554 1.283725e-06 6.826121e+00 6.762505e+00 1555 1.283852e-06 6.826013e+00 6.762670e+00 1556 1.284107e-06 6.825796e+00 6.763000e+00 1557 1.284618e-06 6.825342e+00 6.763651e+00 1558 1.284745e-06 6.825225e+00 6.763812e+00 1559 1.285000e-06 6.824990e+00 6.764131e+00 1560 1.285511e-06 6.824499e+00 6.764762e+00 1561 1.285638e-06 6.824373e+00 6.764917e+00 1562 1.285893e-06 6.824118e+00 6.765227e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1563 1.286404e-06 6.823590e+00 6.765837e+00 1564 1.286531e-06 6.823455e+00 6.765987e+00 1565 1.286786e-06 6.823182e+00 6.766286e+00 1566 1.287297e-06 6.822617e+00 6.766875e+00 1567 1.287424e-06 6.822473e+00 6.767020e+00 1568 1.287679e-06 6.822181e+00 6.767308e+00 1569 1.288190e-06 6.821579e+00 6.767876e+00 1570 1.288317e-06 6.821425e+00 6.768016e+00 1571 1.288573e-06 6.821115e+00 6.768293e+00 1572 1.289083e-06 6.820475e+00 6.768839e+00 1573 1.289210e-06 6.820312e+00 6.768974e+00 1574 1.289466e-06 6.819983e+00 6.769241e+00 1575 1.289976e-06 6.819306e+00 6.769765e+00 1576 1.290103e-06 6.819134e+00 6.769894e+00 1577 1.290359e-06 6.818787e+00 6.770150e+00 1578 1.290869e-06 6.818072e+00 6.770652e+00 1579 1.290997e-06 6.817891e+00 6.770775e+00 1580 1.291252e-06 6.817524e+00 6.771020e+00 1581 1.291762e-06 6.816773e+00 6.771500e+00 1582 1.291890e-06 6.816582e+00 6.771617e+00 1583 1.292145e-06 6.816197e+00 6.771851e+00 1584 1.292655e-06 6.815408e+00 6.772308e+00 1585 1.292783e-06 6.815207e+00 6.772420e+00 1586 1.293038e-06 6.814804e+00 6.772642e+00 1587 1.293548e-06 6.813977e+00 6.773076e+00 1588 1.293676e-06 6.813768e+00 6.773183e+00 1589 1.293931e-06 6.813345e+00 6.773393e+00 1590 1.294441e-06 6.812482e+00 6.773804e+00 1591 1.294569e-06 6.812263e+00 6.773905e+00 1592 1.294824e-06 6.811822e+00 6.774104e+00 1593 1.295334e-06 6.810920e+00 6.774491e+00 1594 1.295462e-06 6.810692e+00 6.774586e+00 1595 1.295717e-06 6.810232e+00 6.774773e+00 1596 1.296227e-06 6.809294e+00 6.775137e+00 1597 1.296355e-06 6.809056e+00 6.775225e+00 1598 1.296610e-06 6.808577e+00 6.775401e+00 1599 1.297120e-06 6.807601e+00 6.775741e+00 1600 1.297248e-06 6.807354e+00 6.775823e+00 1601 1.297503e-06 6.806857e+00 6.775986e+00 1602 1.298013e-06 6.805844e+00 6.776302e+00 1603 1.298141e-06 6.805587e+00 6.776379e+00 1604 1.298396e-06 6.805072e+00 6.776530e+00 1605 1.298906e-06 6.804021e+00 6.776821e+00 1606 1.299034e-06 6.803755e+00 6.776892e+00 1607 1.299289e-06 6.803221e+00 6.777031e+00 1608 1.299799e-06 6.802133e+00 6.777297e+00 1609 1.299927e-06 6.801858e+00 6.777362e+00 1610 1.300182e-06 6.801305e+00 6.777488e+00 1611 1.300692e-06 6.800180e+00 6.777730e+00 1612 1.300820e-06 6.799895e+00 6.777788e+00 1613 1.301075e-06 6.799324e+00 6.777902e+00 1614 1.301586e-06 6.798161e+00 6.778119e+00 1615 1.301713e-06 6.797867e+00 6.778170e+00 1616 1.301968e-06 6.797277e+00 6.778271e+00 1617 1.302479e-06 6.796078e+00 6.778463e+00 1618 1.302606e-06 6.795775e+00 6.778508e+00 1619 1.302861e-06 6.795166e+00 6.778597e+00 1620 1.303372e-06 6.793929e+00 6.778763e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1621 1.303499e-06 6.793617e+00 6.778802e+00 1622 1.303754e-06 6.792990e+00 6.778877e+00 1623 1.304265e-06 6.791716e+00 6.779018e+00 1624 1.304392e-06 6.791395e+00 6.779050e+00 1625 1.304647e-06 6.790749e+00 6.779113e+00 1626 1.305158e-06 6.789438e+00 6.779227e+00 1627 1.305285e-06 6.789107e+00 6.779253e+00 1628 1.305540e-06 6.788443e+00 6.779302e+00 1629 1.306051e-06 6.787095e+00 6.779391e+00 1630 1.306178e-06 6.786755e+00 6.779410e+00 1631 1.306433e-06 6.786073e+00 6.779446e+00 1632 1.306944e-06 6.784688e+00 6.779508e+00 1633 1.307071e-06 6.784339e+00 6.779521e+00 1634 1.307327e-06 6.783638e+00 6.779544e+00 1635 1.307837e-06 6.782216e+00 6.779579e+00 1636 1.307964e-06 6.781858e+00 6.779585e+00 1637 1.308220e-06 6.781139e+00 6.779595e+00 1638 1.308730e-06 6.779680e+00 6.779604e+00 1639 1.308857e-06 6.779313e+00 6.779603e+00 1640 1.309113e-06 6.778575e+00 6.779600e+00 1641 1.309623e-06 6.777080e+00 6.779581e+00 1642 1.309751e-06 6.776704e+00 6.779574e+00 1643 1.310006e-06 6.775947e+00 6.779557e+00 1644 1.310516e-06 6.774416e+00 6.779511e+00 1645 1.310644e-06 6.774030e+00 6.779497e+00 1646 1.310899e-06 6.773256e+00 6.779466e+00 1647 1.311409e-06 6.771688e+00 6.779393e+00 1648 1.311537e-06 6.771293e+00 6.779372e+00 1649 1.311792e-06 6.770500e+00 6.779328e+00 1650 1.312302e-06 6.768896e+00 6.779227e+00 1651 1.312430e-06 6.768492e+00 6.779199e+00 1652 1.312685e-06 6.767681e+00 6.779141e+00 1653 1.313195e-06 6.766040e+00 6.779013e+00 1654 1.313323e-06 6.765627e+00 6.778978e+00 1655 1.313578e-06 6.764798e+00 6.778906e+00 1656 1.314088e-06 6.763121e+00 6.778751e+00 1657 1.314216e-06 6.762699e+00 6.778709e+00 1658 1.314471e-06 6.761851e+00 6.778623e+00 1659 1.314981e-06 6.760138e+00 6.778439e+00 1660 1.315109e-06 6.759707e+00 6.778390e+00 1661 1.315364e-06 6.758841e+00 6.778290e+00 1662 1.315874e-06 6.757092e+00 6.778078e+00 1663 1.316002e-06 6.756652e+00 6.778022e+00 1664 1.316257e-06 6.755769e+00 6.777908e+00 1665 1.316767e-06 6.753983e+00 6.777668e+00 1666 1.316895e-06 6.753534e+00 6.777605e+00 1667 1.317150e-06 6.752633e+00 6.777477e+00 1668 1.317660e-06 6.750811e+00 6.777208e+00 1669 1.317788e-06 6.750353e+00 6.777138e+00 1670 1.318043e-06 6.749434e+00 6.776995e+00 1671 1.318553e-06 6.747577e+00 6.776698e+00 1672 1.318681e-06 6.747110e+00 6.776621e+00 1673 1.318936e-06 6.746172e+00 6.776464e+00 1674 1.319446e-06 6.744280e+00 6.776138e+00 1675 1.319574e-06 6.743804e+00 6.776053e+00 1676 1.319829e-06 6.742849e+00 6.775882e+00 1677 1.320340e-06 6.740920e+00 6.775527e+00 1678 1.320467e-06 6.740435e+00 6.775435e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1679 1.320722e-06 6.739462e+00 6.775250e+00 1680 1.321233e-06 6.737499e+00 6.774866e+00 1681 1.321360e-06 6.737005e+00 6.774767e+00 1682 1.321615e-06 6.736014e+00 6.774567e+00 1683 1.322126e-06 6.734015e+00 6.774154e+00 1684 1.322253e-06 6.733512e+00 6.774047e+00 1685 1.322508e-06 6.732504e+00 6.773832e+00 1686 1.323019e-06 6.730469e+00 6.773390e+00 1687 1.323146e-06 6.729958e+00 6.773277e+00 1688 1.323401e-06 6.728932e+00 6.773047e+00 1689 1.323912e-06 6.726862e+00 6.772576e+00 1690 1.324039e-06 6.726342e+00 6.772455e+00 1691 1.324294e-06 6.725298e+00 6.772210e+00 1692 1.324805e-06 6.723194e+00 6.771709e+00 1693 1.324932e-06 6.722664e+00 6.771581e+00 1694 1.325187e-06 6.721603e+00 6.771322e+00 1695 1.325698e-06 6.719464e+00 6.770791e+00 1696 1.325825e-06 6.718926e+00 6.770655e+00 1697 1.326081e-06 6.717847e+00 6.770382e+00 1698 1.326591e-06 6.715673e+00 6.769821e+00 1699 1.326718e-06 6.715126e+00 6.769678e+00 1700 1.326974e-06 6.714030e+00 6.769389e+00 1701 1.327484e-06 6.711821e+00 6.768799e+00 1702 1.327611e-06 6.711266e+00 6.768648e+00 1703 1.327867e-06 6.710153e+00 6.768345e+00 1704 1.328377e-06 6.707909e+00 6.767725e+00 1705 1.328505e-06 6.707345e+00 6.767566e+00 1706 1.328760e-06 6.706214e+00 6.767248e+00 1707 1.329270e-06 6.703936e+00 6.766598e+00 1708 1.329398e-06 6.703363e+00 6.766432e+00 1709 1.329653e-06 6.702216e+00 6.766098e+00 1710 1.330163e-06 6.699903e+00 6.765418e+00 1711 1.330291e-06 6.699322e+00 6.765245e+00 1712 1.330546e-06 6.698157e+00 6.764896e+00 1713 1.331056e-06 6.695810e+00 6.764185e+00 1714 1.331184e-06 6.695220e+00 6.764004e+00 1715 1.331439e-06 6.694038e+00 6.763641e+00 1716 1.331949e-06 6.691657e+00 6.762900e+00 1717 1.332077e-06 6.691059e+00 6.762711e+00 1718 1.332332e-06 6.689860e+00 6.762332e+00 1719 1.332842e-06 6.687445e+00 6.761561e+00 1720 1.332970e-06 6.686838e+00 6.761365e+00 1721 1.333225e-06 6.685622e+00 6.760971e+00 1722 1.333735e-06 6.683173e+00 6.760169e+00 1723 1.333863e-06 6.682558e+00 6.759965e+00 1724 1.334118e-06 6.681325e+00 6.759556e+00 1725 1.334628e-06 6.678842e+00 6.758724e+00 1726 1.334756e-06 6.678218e+00 6.758512e+00 1727 1.335011e-06 6.676969e+00 6.758087e+00 1728 1.335521e-06 6.674452e+00 6.757225e+00 1729 1.335649e-06 6.673820e+00 6.757006e+00 1730 1.335904e-06 6.672554e+00 6.756565e+00 1731 1.336414e-06 6.670004e+00 6.755672e+00 1732 1.336542e-06 6.669363e+00 6.755445e+00 1733 1.336797e-06 6.668080e+00 6.754990e+00 1734 1.337307e-06 6.665497e+00 6.754065e+00 1735 1.337435e-06 6.664848e+00 6.753831e+00 1736 1.337690e-06 6.663548e+00 6.753360e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1737 1.338200e-06 6.660931e+00 6.752405e+00 1738 1.338328e-06 6.660274e+00 6.752163e+00 1739 1.338583e-06 6.658958e+00 6.751676e+00 1740 1.339094e-06 6.656308e+00 6.750690e+00 1741 1.339221e-06 6.655643e+00 6.750440e+00 1742 1.339476e-06 6.654310e+00 6.749938e+00 1743 1.339987e-06 6.651627e+00 6.748921e+00 1744 1.340114e-06 6.650954e+00 6.748664e+00 1745 1.340369e-06 6.649604e+00 6.748146e+00 1746 1.340880e-06 6.646888e+00 6.747098e+00 1747 1.341007e-06 6.646207e+00 6.746833e+00 1748 1.341262e-06 6.644841e+00 6.746300e+00 1749 1.341773e-06 6.642092e+00 6.745221e+00 1750 1.341900e-06 6.641403e+00 6.744948e+00 1751 1.342155e-06 6.640020e+00 6.744399e+00 1752 1.342666e-06 6.637239e+00 6.743289e+00 1753 1.342793e-06 6.636541e+00 6.743008e+00 1754 1.343048e-06 6.635143e+00 6.742444e+00 1755 1.343559e-06 6.632330e+00 6.741302e+00 1756 1.343686e-06 6.631623e+00 6.741014e+00 1757 1.343941e-06 6.630209e+00 6.740434e+00 1758 1.344452e-06 6.627363e+00 6.739261e+00 1759 1.344579e-06 6.626649e+00 6.738965e+00 1760 1.344835e-06 6.625218e+00 6.738370e+00 1761 1.345345e-06 6.622340e+00 6.737166e+00 1762 1.345472e-06 6.621618e+00 6.736861e+00 1763 1.345728e-06 6.620171e+00 6.736250e+00 1764 1.346238e-06 6.617261e+00 6.735015e+00 1765 1.346365e-06 6.616531e+00 6.734703e+00 1766 1.346621e-06 6.615068e+00 6.734076e+00 1767 1.347131e-06 6.612126e+00 6.732810e+00 1768 1.347259e-06 6.611388e+00 6.732490e+00 1769 1.347514e-06 6.609909e+00 6.731847e+00 1770 1.348024e-06 6.606935e+00 6.730549e+00 1771 1.348152e-06 6.606189e+00 6.730221e+00 1772 1.348407e-06 6.604695e+00 6.729563e+00 1773 1.348917e-06 6.601689e+00 6.728234e+00 1774 1.349045e-06 6.600935e+00 6.727898e+00 1775 1.349300e-06 6.599425e+00 6.727225e+00 1776 1.349810e-06 6.596388e+00 6.725864e+00 1777 1.350831e-06 6.590258e+00 6.723088e+00 1778 1.351086e-06 6.588714e+00 6.722380e+00 1779 1.351596e-06 6.585617e+00 6.720956e+00 1780 1.352617e-06 6.579375e+00 6.718055e+00 1781 1.352872e-06 6.577797e+00 6.717316e+00 1782 1.353382e-06 6.574635e+00 6.715829e+00 1783 1.354403e-06 6.568259e+00 6.712801e+00 1784 1.354658e-06 6.566652e+00 6.712030e+00 1785 1.355168e-06 6.563431e+00 6.710480e+00 1786 1.356189e-06 6.556933e+00 6.707326e+00 1787 1.356444e-06 6.555297e+00 6.706524e+00 1788 1.356954e-06 6.552015e+00 6.704911e+00 1789 1.357975e-06 6.545405e+00 6.701630e+00 1790 1.358230e-06 6.543735e+00 6.700797e+00 1791 1.358741e-06 6.540390e+00 6.699120e+00 1792 1.359761e-06 6.533649e+00 6.695713e+00 1793 1.360016e-06 6.531952e+00 6.694848e+00 1794 1.360527e-06 6.528549e+00 6.693108e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1795 1.361547e-06 6.521690e+00 6.689575e+00 1796 1.361802e-06 6.519964e+00 6.688678e+00 1797 1.362313e-06 6.516502e+00 6.686875e+00 1798 1.363333e-06 6.509526e+00 6.683215e+00 1799 1.363589e-06 6.507770e+00 6.682287e+00 1800 1.364099e-06 6.504250e+00 6.680421e+00 1801 1.365119e-06 6.497208e+00 6.676635e+00 1802 1.365375e-06 6.495453e+00 6.675676e+00 1803 1.365885e-06 6.491938e+00 6.673748e+00 1804 1.366906e-06 6.484874e+00 6.669840e+00 1805 1.367161e-06 6.483101e+00 6.668850e+00 1806 1.367671e-06 6.479548e+00 6.666862e+00 1807 1.368692e-06 6.472405e+00 6.662834e+00 1808 1.368947e-06 6.470604e+00 6.661814e+00 1809 1.369457e-06 6.466999e+00 6.659766e+00 1810 1.370478e-06 6.459743e+00 6.655618e+00 1811 1.370733e-06 6.457919e+00 6.654568e+00 1812 1.371243e-06 6.454263e+00 6.652460e+00 1813 1.372264e-06 6.446903e+00 6.648193e+00 1814 1.372519e-06 6.445053e+00 6.647113e+00 1815 1.373029e-06 6.441345e+00 6.644946e+00 1816 1.374050e-06 6.433881e+00 6.640560e+00 1817 1.374305e-06 6.432005e+00 6.639450e+00 1818 1.374815e-06 6.428246e+00 6.637223e+00 1819 1.375836e-06 6.420679e+00 6.632718e+00 1820 1.376091e-06 6.418777e+00 6.631579e+00 1821 1.376602e-06 6.414966e+00 6.629292e+00 1822 1.377622e-06 6.407296e+00 6.624669e+00 1823 1.377877e-06 6.405368e+00 6.623500e+00 1824 1.378388e-06 6.401506e+00 6.621155e+00 1825 1.379408e-06 6.393734e+00 6.616413e+00 1826 1.379663e-06 6.391781e+00 6.615215e+00 1827 1.380174e-06 6.387867e+00 6.612810e+00 1828 1.381194e-06 6.379994e+00 6.607950e+00 1829 1.381449e-06 6.378015e+00 6.606723e+00 1830 1.381960e-06 6.374051e+00 6.604259e+00 1831 1.382980e-06 6.366086e+00 6.599282e+00 1832 1.383236e-06 6.364080e+00 6.598025e+00 1833 1.383746e-06 6.360062e+00 6.595503e+00 1834 1.384767e-06 6.351994e+00 6.590408e+00 1835 1.385022e-06 6.349963e+00 6.589122e+00 1836 1.385532e-06 6.345895e+00 6.586541e+00 1837 1.386553e-06 6.337727e+00 6.581330e+00 1838 1.386808e-06 6.335672e+00 6.580014e+00 1839 1.387318e-06 6.331555e+00 6.577375e+00 1840 1.388339e-06 6.323290e+00 6.572047e+00 1841 1.388594e-06 6.321210e+00 6.570703e+00 1842 1.389104e-06 6.317045e+00 6.568006e+00 1843 1.390125e-06 6.308683e+00 6.562562e+00 1844 1.390380e-06 6.306579e+00 6.561188e+00 1845 1.390890e-06 6.302366e+00 6.558433e+00 1846 1.391911e-06 6.293909e+00 6.552873e+00 1847 1.392166e-06 6.291781e+00 6.551471e+00 1848 1.392676e-06 6.287522e+00 6.548658e+00 1849 1.393697e-06 6.278970e+00 6.542983e+00 1850 1.393952e-06 6.276819e+00 6.541552e+00 1851 1.394462e-06 6.272513e+00 6.538682e+00 1852 1.395483e-06 6.263868e+00 6.532893e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1853 1.395738e-06 6.261694e+00 6.531433e+00 1854 1.396249e-06 6.257342e+00 6.528505e+00 1855 1.397269e-06 6.248595e+00 6.522602e+00 1856 1.397524e-06 6.246401e+00 6.521113e+00 1857 1.398035e-06 6.242006e+00 6.518129e+00 1858 1.399055e-06 6.233180e+00 6.512111e+00 1859 1.399310e-06 6.230961e+00 6.510595e+00 1860 1.399821e-06 6.226518e+00 6.507554e+00 1861 1.400841e-06 6.217590e+00 6.501423e+00 1862 1.401097e-06 6.215351e+00 6.499878e+00 1863 1.401607e-06 6.210866e+00 6.496781e+00 1864 1.402627e-06 6.201859e+00 6.490538e+00 1865 1.402883e-06 6.199595e+00 6.488965e+00 1866 1.403393e-06 6.195063e+00 6.485811e+00 1867 1.404414e-06 6.185957e+00 6.479456e+00 1868 1.404669e-06 6.183673e+00 6.477855e+00 1869 1.405179e-06 6.179099e+00 6.474646e+00 1870 1.406200e-06 6.169907e+00 6.468179e+00 1871 1.406455e-06 6.167602e+00 6.466550e+00 1872 1.406965e-06 6.162985e+00 6.463285e+00 1873 1.407986e-06 6.153706e+00 6.456707e+00 1874 1.408241e-06 6.151379e+00 6.455051e+00 1875 1.408751e-06 6.146719e+00 6.451731e+00 1876 1.409772e-06 6.137355e+00 6.445043e+00 1877 1.410027e-06 6.135007e+00 6.443359e+00 1878 1.410537e-06 6.130304e+00 6.439983e+00 1879 1.411558e-06 6.120854e+00 6.433186e+00 1880 1.411813e-06 6.118485e+00 6.431475e+00 1881 1.412323e-06 6.113740e+00 6.428045e+00 1882 1.413344e-06 6.104206e+00 6.421138e+00 1883 1.415385e-06 6.085009e+00 6.407138e+00 1884 1.415896e-06 6.080168e+00 6.403592e+00 1885 1.416916e-06 6.070470e+00 6.396469e+00 1886 1.418957e-06 6.050950e+00 6.382039e+00 1887 1.419468e-06 6.046026e+00 6.378386e+00 1888 1.420488e-06 6.036165e+00 6.371049e+00 1889 1.422530e-06 6.016325e+00 6.356194e+00 1890 1.423040e-06 6.011322e+00 6.352435e+00 1891 1.424061e-06 6.001302e+00 6.344888e+00 1892 1.426102e-06 5.981136e+00 6.329613e+00 1893 1.426612e-06 5.976062e+00 6.325749e+00 1894 1.427633e-06 5.965893e+00 6.317993e+00 1895 1.429674e-06 5.945423e+00 6.302304e+00 1896 1.430184e-06 5.940274e+00 6.298338e+00 1897 1.431205e-06 5.929955e+00 6.290377e+00 1898 1.433246e-06 5.909187e+00 6.274279e+00 1899 1.433757e-06 5.903963e+00 6.270212e+00 1900 1.434777e-06 5.893495e+00 6.262047e+00 1901 1.436818e-06 5.872444e+00 6.245548e+00 1902 1.440901e-06 5.829826e+00 6.211869e+00 1903 1.441922e-06 5.819057e+00 6.203281e+00 1904 1.443963e-06 5.797434e+00 6.185994e+00 1905 1.448045e-06 5.753720e+00 6.150762e+00 1906 1.456210e-06 5.665056e+00 6.077770e+00 1907 1.472540e-06 5.481621e+00 5.922325e+00 1908 1.505200e-06 5.149691e+00 5.593618e+00 1909 1.552514e-06 4.897577e+00 5.188693e+00 1910 1.604422e-06 4.854093e+00 4.950324e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1911 1.661802e-06 4.892522e+00 4.887660e+00 1912 1.727031e-06 4.963490e+00 4.922961e+00 1913 1.823652e-06 5.039949e+00 5.007159e+00 1914 1.923652e-06 5.053026e+00 5.049806e+00 1915 2.023652e-06 5.035913e+00 5.044020e+00 1916 2.123652e-06 5.024426e+00 5.029004e+00 1917 2.223652e-06 5.023541e+00 5.023559e+00 1918 2.323652e-06 5.026776e+00 5.025294e+00 1919 2.423652e-06 5.028190e+00 5.027667e+00 1920 2.523652e-06 5.028143e+00 5.028208e+00 1921 2.623652e-06 5.027587e+00 5.027836e+00 1922 2.723652e-06 5.027478e+00 5.027507e+00 1923 2.823652e-06 5.027435e+00 5.027452e+00 1924 2.923652e-06 5.027617e+00 5.027532e+00 1925 3.023652e-06 5.027525e+00 5.027574e+00 1926 3.123652e-06 5.027634e+00 5.027580e+00 1927 3.223652e-06 5.027490e+00 5.027561e+00 1928 3.323652e-06 5.027634e+00 5.027562e+00 1929 3.423652e-06 5.027478e+00 5.027555e+00 1930 3.523652e-06 5.027651e+00 5.027565e+00 1931 3.623652e-06 5.027466e+00 5.027558e+00 1932 3.723652e-06 5.027664e+00 5.027566e+00 1933 3.823652e-06 5.027452e+00 5.027558e+00 1934 3.923652e-06 5.027676e+00 5.027565e+00 1935 4.023652e-06 5.027441e+00 5.027558e+00 1936 4.123652e-06 5.027687e+00 5.027564e+00 1937 4.223652e-06 5.027431e+00 5.027559e+00 1938 4.323652e-06 5.027695e+00 5.027564e+00 1939 4.423652e-06 5.027425e+00 5.027560e+00 1940 4.523652e-06 5.027701e+00 5.027563e+00 1941 4.623652e-06 5.027420e+00 5.027561e+00 1942 4.723652e-06 5.027704e+00 5.027562e+00 1943 4.823652e-06 5.027419e+00 5.027562e+00 1944 4.923652e-06 5.027704e+00 5.027562e+00 1945 5.002000e-06 5.027421e+00 5.027562e+00 1946 5.002100e-06 4.865792e+00 5.027178e+00 1947 5.002300e-06 4.607623e+00 5.025788e+00 1948 5.002700e-06 4.338157e+00 5.020463e+00 1949 5.002967e-06 4.220505e+00 5.015671e+00 1950 5.003000e-06 4.208495e+00 5.015017e+00 1951 5.003004e-06 4.212342e+00 5.014934e+00 1952 5.003013e-06 4.220000e+00 5.014770e+00 1953 5.003030e-06 4.235103e+00 5.014446e+00 1954 5.003063e-06 4.264483e+00 5.013818e+00 1955 5.003131e-06 4.320086e+00 5.012635e+00 1956 5.003266e-06 4.419807e+00 5.010534e+00 1957 5.003535e-06 4.580955e+00 5.007219e+00 1958 5.004075e-06 4.794452e+00 5.003105e+00 1959 5.004566e-06 4.904196e+00 5.001319e+00 1960 5.005184e-06 4.982201e+00 5.000472e+00 1961 5.005941e-06 5.029819e+00 5.000571e+00 1962 5.006946e-06 5.058526e+00 5.001597e+00 1963 5.008407e-06 5.078596e+00 5.003873e+00 1964 5.009960e-06 5.093112e+00 5.006829e+00 1965 5.011833e-06 5.104317e+00 5.010809e+00 1966 5.013966e-06 5.103456e+00 5.015384e+00 1967 5.016601e-06 5.081973e+00 5.020054e+00 1968 5.019579e-06 5.043285e+00 5.022952e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 1969 5.023366e-06 5.000955e+00 5.022880e+00 1970 5.027342e-06 4.978992e+00 5.019916e+00 1971 5.031815e-06 4.968441e+00 5.015258e+00 1972 5.038411e-06 4.944511e+00 5.006714e+00 1973 5.046394e-06 4.900886e+00 4.992131e+00 1974 5.054862e-06 4.855516e+00 4.971226e+00 1975 5.071797e-06 4.756512e+00 4.915487e+00 1976 5.091522e-06 4.615728e+00 4.827278e+00 1977 5.124805e-06 4.343113e+00 4.625983e+00 1978 5.191371e-06 3.671380e+00 4.060557e+00 1979 5.203871e-06 3.529165e+00 3.930289e+00 1980 5.228871e-06 3.237572e+00 3.660166e+00 1981 5.235121e-06 3.162126e+00 3.589161e+00 1982 5.236683e-06 3.143223e+00 3.571343e+00 1983 5.239808e-06 3.105343e+00 3.535575e+00 1984 5.246058e-06 3.029139e+00 3.463273e+00 1985 5.246254e-06 3.026745e+00 3.460997e+00 1986 5.246644e-06 3.021962e+00 3.456443e+00 1987 5.246742e-06 3.020766e+00 3.455304e+00 1988 5.246937e-06 3.018373e+00 3.453025e+00 1989 5.247328e-06 3.013585e+00 3.448464e+00 1990 5.247426e-06 3.012388e+00 3.447323e+00 1991 5.247621e-06 3.009993e+00 3.445041e+00 1992 5.248012e-06 3.005201e+00 3.440474e+00 1993 5.248109e-06 3.004002e+00 3.439331e+00 1994 5.248305e-06 3.001605e+00 3.437046e+00 1995 5.248695e-06 2.996808e+00 3.432472e+00 1996 5.248793e-06 2.995608e+00 3.431328e+00 1997 5.248988e-06 2.993209e+00 3.429039e+00 1998 5.249379e-06 2.988407e+00 3.424459e+00 1999 5.249476e-06 2.987207e+00 3.423313e+00 2000 5.249672e-06 2.984805e+00 3.421021e+00 2001 5.250062e-06 2.979999e+00 3.416434e+00 2002 5.250160e-06 2.978797e+00 3.415286e+00 2003 5.250355e-06 2.976393e+00 3.412991e+00 2004 5.250746e-06 2.971583e+00 3.408398e+00 2005 5.250844e-06 2.970380e+00 3.407249e+00 2006 5.251039e-06 2.967974e+00 3.404950e+00 2007 5.251430e-06 2.963158e+00 3.400350e+00 2008 5.251527e-06 2.961954e+00 3.399200e+00 2009 5.251723e-06 2.959546e+00 3.396898e+00 2010 5.252113e-06 2.954726e+00 3.392292e+00 2011 5.252211e-06 2.953521e+00 3.391140e+00 2012 5.252406e-06 2.951111e+00 3.388835e+00 2013 5.252797e-06 2.946287e+00 3.384222e+00 2014 5.252894e-06 2.945080e+00 3.383068e+00 2015 5.253090e-06 2.942668e+00 3.380760e+00 2016 5.253480e-06 2.937839e+00 3.376141e+00 2017 5.253578e-06 2.936632e+00 3.374986e+00 2018 5.253773e-06 2.934217e+00 3.372674e+00 2019 5.254164e-06 2.929384e+00 3.368049e+00 2020 5.254262e-06 2.928176e+00 3.366892e+00 2021 5.254457e-06 2.925759e+00 3.364578e+00 2022 5.254848e-06 2.920922e+00 3.359946e+00 2023 5.254945e-06 2.919713e+00 3.358787e+00 2024 5.255140e-06 2.917293e+00 3.356470e+00 2025 5.255531e-06 2.912452e+00 3.351832e+00 2026 5.255629e-06 2.911242e+00 3.350672e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2027 5.255824e-06 2.908820e+00 3.348351e+00 2028 5.256215e-06 2.903975e+00 3.343707e+00 2029 5.256312e-06 2.902764e+00 3.342545e+00 2030 5.256508e-06 2.900340e+00 3.340221e+00 2031 5.256898e-06 2.895491e+00 3.335571e+00 2032 5.256996e-06 2.894279e+00 3.334408e+00 2033 5.257191e-06 2.891853e+00 3.332081e+00 2034 5.257582e-06 2.887000e+00 3.327425e+00 2035 5.257680e-06 2.885787e+00 3.326260e+00 2036 5.257875e-06 2.883359e+00 3.323930e+00 2037 5.258265e-06 2.878502e+00 3.319267e+00 2038 5.258363e-06 2.877287e+00 3.318101e+00 2039 5.258558e-06 2.874858e+00 3.315768e+00 2040 5.258949e-06 2.869997e+00 3.311099e+00 2041 5.259047e-06 2.868781e+00 3.309931e+00 2042 5.259242e-06 2.866350e+00 3.307595e+00 2043 5.259633e-06 2.861485e+00 3.302921e+00 2044 5.259730e-06 2.860269e+00 3.301751e+00 2045 5.259926e-06 2.857835e+00 3.299412e+00 2046 5.260316e-06 2.852966e+00 3.294731e+00 2047 5.260414e-06 2.851749e+00 3.293560e+00 2048 5.260609e-06 2.849314e+00 3.291218e+00 2049 5.261000e-06 2.844441e+00 3.286532e+00 2050 5.261098e-06 2.843223e+00 3.285359e+00 2051 5.261293e-06 2.840786e+00 3.283014e+00 2052 5.261683e-06 2.835909e+00 3.278321e+00 2053 5.261781e-06 2.834690e+00 3.277148e+00 2054 5.261976e-06 2.832251e+00 3.274799e+00 2055 5.262367e-06 2.827370e+00 3.270101e+00 2056 5.262465e-06 2.826150e+00 3.268926e+00 2057 5.262660e-06 2.823709e+00 3.266574e+00 2058 5.263051e-06 2.818825e+00 3.261870e+00 2059 5.263148e-06 2.817604e+00 3.260693e+00 2060 5.263344e-06 2.815161e+00 3.258339e+00 2061 5.263734e-06 2.810273e+00 3.253629e+00 2062 5.263832e-06 2.809051e+00 3.252451e+00 2063 5.264027e-06 2.806607e+00 3.250094e+00 2064 5.264418e-06 2.801715e+00 3.245377e+00 2065 5.264515e-06 2.800492e+00 3.244198e+00 2066 5.264711e-06 2.798046e+00 3.241838e+00 2067 5.265101e-06 2.793150e+00 3.237116e+00 2068 5.265199e-06 2.791926e+00 3.235935e+00 2069 5.265394e-06 2.789478e+00 3.233572e+00 2070 5.265785e-06 2.784579e+00 3.228844e+00 2071 5.265883e-06 2.783354e+00 3.227662e+00 2072 5.266078e-06 2.780904e+00 3.225296e+00 2073 5.266469e-06 2.776001e+00 3.220562e+00 2074 5.266566e-06 2.774775e+00 3.219378e+00 2075 5.266762e-06 2.772323e+00 3.217010e+00 2076 5.267152e-06 2.767417e+00 3.212271e+00 2077 5.267250e-06 2.766190e+00 3.211085e+00 2078 5.267445e-06 2.763736e+00 3.208714e+00 2079 5.267836e-06 2.758827e+00 3.203969e+00 2080 5.267933e-06 2.757599e+00 3.202782e+00 2081 5.268129e-06 2.755143e+00 3.200408e+00 2082 5.268519e-06 2.750230e+00 3.195658e+00 2083 5.268617e-06 2.749001e+00 3.194470e+00 2084 5.268812e-06 2.746544e+00 3.192093e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2085 5.269203e-06 2.741626e+00 3.187337e+00 2086 5.269301e-06 2.740397e+00 3.186147e+00 2087 5.269496e-06 2.737938e+00 3.183767e+00 2088 5.269887e-06 2.733017e+00 3.179005e+00 2089 5.269984e-06 2.731787e+00 3.177814e+00 2090 5.270180e-06 2.729326e+00 3.175432e+00 2091 5.270570e-06 2.724401e+00 3.170665e+00 2092 5.270668e-06 2.723170e+00 3.169472e+00 2093 5.270863e-06 2.720707e+00 3.167087e+00 2094 5.271254e-06 2.715779e+00 3.162314e+00 2095 5.271351e-06 2.714547e+00 3.161121e+00 2096 5.271547e-06 2.712083e+00 3.158733e+00 2097 5.271937e-06 2.707151e+00 3.153954e+00 2098 5.272035e-06 2.705918e+00 3.152759e+00 2099 5.272230e-06 2.703452e+00 3.150369e+00 2100 5.272621e-06 2.698517e+00 3.145585e+00 2101 5.272719e-06 2.697283e+00 3.144388e+00 2102 5.272914e-06 2.694815e+00 3.141995e+00 2103 5.273305e-06 2.689877e+00 3.137206e+00 2104 5.273402e-06 2.688642e+00 3.136008e+00 2105 5.273598e-06 2.686172e+00 3.133612e+00 2106 5.273988e-06 2.681231e+00 3.128817e+00 2107 5.274086e-06 2.679995e+00 3.127618e+00 2108 5.274281e-06 2.677523e+00 3.125219e+00 2109 5.274672e-06 2.672578e+00 3.120420e+00 2110 5.274769e-06 2.671342e+00 3.119219e+00 2111 5.274965e-06 2.668868e+00 3.116818e+00 2112 5.275355e-06 2.663920e+00 3.112012e+00 2113 5.275453e-06 2.662683e+00 3.110811e+00 2114 5.275648e-06 2.660208e+00 3.108406e+00 2115 5.276039e-06 2.655256e+00 3.103596e+00 2116 5.276137e-06 2.654018e+00 3.102393e+00 2117 5.276332e-06 2.651541e+00 3.099986e+00 2118 5.276723e-06 2.646586e+00 3.095170e+00 2119 5.276820e-06 2.645347e+00 3.093966e+00 2120 5.277015e-06 2.642869e+00 3.091557e+00 2121 5.277406e-06 2.637910e+00 3.086736e+00 2122 5.277504e-06 2.636670e+00 3.085530e+00 2123 5.277699e-06 2.634190e+00 3.083118e+00 2124 5.278090e-06 2.629228e+00 3.078292e+00 2125 5.278187e-06 2.627988e+00 3.077085e+00 2126 5.278383e-06 2.625506e+00 3.074670e+00 2127 5.278773e-06 2.620541e+00 3.069839e+00 2128 5.278871e-06 2.619300e+00 3.068630e+00 2129 5.279066e-06 2.616816e+00 3.066213e+00 2130 5.279457e-06 2.611848e+00 3.061377e+00 2131 5.279555e-06 2.610606e+00 3.060167e+00 2132 5.279750e-06 2.608121e+00 3.057748e+00 2133 5.280140e-06 2.603149e+00 3.052906e+00 2134 5.280238e-06 2.601906e+00 3.051695e+00 2135 5.280433e-06 2.599420e+00 3.049273e+00 2136 5.280824e-06 2.594445e+00 3.044426e+00 2137 5.280922e-06 2.593201e+00 3.043214e+00 2138 5.281117e-06 2.590713e+00 3.040789e+00 2139 5.281508e-06 2.585736e+00 3.035938e+00 2140 5.281605e-06 2.584491e+00 3.034724e+00 2141 5.281801e-06 2.582001e+00 3.032297e+00 2142 5.282191e-06 2.577020e+00 3.027440e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2143 5.282289e-06 2.575774e+00 3.026226e+00 2144 5.282484e-06 2.573283e+00 3.023796e+00 2145 5.282875e-06 2.568299e+00 3.018934e+00 2146 5.282973e-06 2.567052e+00 3.017718e+00 2147 5.283168e-06 2.564559e+00 3.015286e+00 2148 5.283558e-06 2.559572e+00 3.010419e+00 2149 5.283656e-06 2.558325e+00 3.009202e+00 2150 5.283851e-06 2.555831e+00 3.006767e+00 2151 5.284242e-06 2.550840e+00 3.001896e+00 2152 5.284340e-06 2.549592e+00 3.000677e+00 2153 5.284535e-06 2.547096e+00 2.998240e+00 2154 5.284926e-06 2.542103e+00 2.993364e+00 2155 5.285023e-06 2.540854e+00 2.992144e+00 2156 5.285219e-06 2.538357e+00 2.989705e+00 2157 5.285609e-06 2.533360e+00 2.984823e+00 2158 5.285707e-06 2.532111e+00 2.983603e+00 2159 5.285902e-06 2.529612e+00 2.981160e+00 2160 5.286293e-06 2.524612e+00 2.976274e+00 2161 5.286390e-06 2.523362e+00 2.975052e+00 2162 5.286586e-06 2.520862e+00 2.972608e+00 2163 5.286976e-06 2.515859e+00 2.967717e+00 2164 5.287074e-06 2.514608e+00 2.966494e+00 2165 5.287269e-06 2.512106e+00 2.964047e+00 2166 5.287660e-06 2.507100e+00 2.959151e+00 2167 5.287758e-06 2.505849e+00 2.957927e+00 2168 5.287953e-06 2.503345e+00 2.955478e+00 2169 5.288344e-06 2.498337e+00 2.950577e+00 2170 5.288441e-06 2.497084e+00 2.949351e+00 2171 5.288637e-06 2.494579e+00 2.946900e+00 2172 5.289027e-06 2.489568e+00 2.941995e+00 2173 5.289125e-06 2.488315e+00 2.940768e+00 2174 5.289320e-06 2.485808e+00 2.938314e+00 2175 5.289711e-06 2.480794e+00 2.933404e+00 2176 5.289808e-06 2.479540e+00 2.932176e+00 2177 5.290004e-06 2.477032e+00 2.929720e+00 2178 5.290394e-06 2.472014e+00 2.924805e+00 2179 5.290492e-06 2.470760e+00 2.923576e+00 2180 5.290687e-06 2.468251e+00 2.921118e+00 2181 5.291078e-06 2.463230e+00 2.916199e+00 2182 5.291176e-06 2.461975e+00 2.914968e+00 2183 5.291371e-06 2.459464e+00 2.912507e+00 2184 5.291762e-06 2.454441e+00 2.907584e+00 2185 5.291859e-06 2.453185e+00 2.906352e+00 2186 5.292055e-06 2.450673e+00 2.903889e+00 2187 5.292445e-06 2.445647e+00 2.898961e+00 2188 5.292543e-06 2.444390e+00 2.897728e+00 2189 5.292738e-06 2.441876e+00 2.895263e+00 2190 5.293129e-06 2.436848e+00 2.890330e+00 2191 5.293226e-06 2.435590e+00 2.889096e+00 2192 5.293422e-06 2.433075e+00 2.886628e+00 2193 5.293812e-06 2.428043e+00 2.881691e+00 2194 5.293910e-06 2.426785e+00 2.880456e+00 2195 5.294105e-06 2.424269e+00 2.877986e+00 2196 5.294496e-06 2.419234e+00 2.873044e+00 2197 5.294594e-06 2.417976e+00 2.871808e+00 2198 5.294789e-06 2.415458e+00 2.869336e+00 2199 5.295180e-06 2.410420e+00 2.864390e+00 2200 5.295277e-06 2.409161e+00 2.863153e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2201 5.295473e-06 2.406642e+00 2.860678e+00 2202 5.295863e-06 2.401602e+00 2.855728e+00 2203 5.295961e-06 2.400342e+00 2.854490e+00 2204 5.296156e-06 2.397821e+00 2.852013e+00 2205 5.296547e-06 2.392778e+00 2.847058e+00 2206 5.296644e-06 2.391517e+00 2.845819e+00 2207 5.296840e-06 2.388995e+00 2.843340e+00 2208 5.297230e-06 2.383950e+00 2.838380e+00 2209 5.297328e-06 2.382688e+00 2.837140e+00 2210 5.297523e-06 2.380165e+00 2.834659e+00 2211 5.297914e-06 2.375117e+00 2.829695e+00 2212 5.298695e-06 2.365013e+00 2.819760e+00 2213 5.298890e-06 2.362488e+00 2.817274e+00 2214 5.299281e-06 2.357436e+00 2.812302e+00 2215 5.299379e-06 2.356173e+00 2.811058e+00 2216 5.299574e-06 2.353646e+00 2.808571e+00 2217 5.299965e-06 2.348590e+00 2.803594e+00 2218 5.300746e-06 2.338471e+00 2.793633e+00 2219 5.300941e-06 2.335942e+00 2.791141e+00 2220 5.301332e-06 2.330882e+00 2.786156e+00 2221 5.301430e-06 2.329616e+00 2.784910e+00 2222 5.301625e-06 2.327085e+00 2.782416e+00 2223 5.302015e-06 2.322022e+00 2.777426e+00 2224 5.302797e-06 2.311887e+00 2.767441e+00 2225 5.302992e-06 2.309354e+00 2.764942e+00 2226 5.303383e-06 2.304287e+00 2.759945e+00 2227 5.303480e-06 2.303019e+00 2.758695e+00 2228 5.303676e-06 2.300485e+00 2.756195e+00 2229 5.304066e-06 2.295414e+00 2.751193e+00 2230 5.304848e-06 2.285264e+00 2.741183e+00 2231 5.305043e-06 2.282727e+00 2.738679e+00 2232 5.305433e-06 2.277652e+00 2.733669e+00 2233 5.305531e-06 2.276383e+00 2.732416e+00 2234 5.305726e-06 2.273844e+00 2.729910e+00 2235 5.306117e-06 2.268766e+00 2.724896e+00 2236 5.306898e-06 2.258602e+00 2.714862e+00 2237 5.307094e-06 2.256061e+00 2.712351e+00 2238 5.307484e-06 2.250978e+00 2.707330e+00 2239 5.307582e-06 2.249707e+00 2.706074e+00 2240 5.307777e-06 2.247165e+00 2.703562e+00 2241 5.308168e-06 2.242079e+00 2.698536e+00 2242 5.308949e-06 2.231901e+00 2.688478e+00 2243 5.309144e-06 2.229357e+00 2.685962e+00 2244 5.309535e-06 2.224267e+00 2.680928e+00 2245 5.310316e-06 2.214078e+00 2.670855e+00 2246 5.310512e-06 2.211532e+00 2.668335e+00 2247 5.310902e-06 2.206438e+00 2.663293e+00 2248 5.311000e-06 2.205164e+00 2.662033e+00 2249 5.311195e-06 2.202616e+00 2.659511e+00 2250 5.311586e-06 2.197518e+00 2.654466e+00 2251 5.312367e-06 2.187317e+00 2.644370e+00 2252 5.312562e-06 2.184767e+00 2.641844e+00 2253 5.312953e-06 2.179665e+00 2.636791e+00 2254 5.313734e-06 2.169454e+00 2.626680e+00 2255 5.313930e-06 2.166902e+00 2.624151e+00 2256 5.314320e-06 2.161796e+00 2.619091e+00 2257 5.315101e-06 2.151575e+00 2.608964e+00 2258 5.315297e-06 2.149022e+00 2.606431e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2259 5.315687e-06 2.143912e+00 2.601364e+00 2260 5.316469e-06 2.133682e+00 2.591223e+00 2261 5.316664e-06 2.131126e+00 2.588687e+00 2262 5.317055e-06 2.126012e+00 2.583612e+00 2263 5.317836e-06 2.115774e+00 2.573457e+00 2264 5.318031e-06 2.113216e+00 2.570917e+00 2265 5.318422e-06 2.108097e+00 2.565835e+00 2266 5.319203e-06 2.097851e+00 2.555666e+00 2267 5.319398e-06 2.095290e+00 2.553122e+00 2268 5.319789e-06 2.090168e+00 2.548034e+00 2269 5.320570e-06 2.079913e+00 2.537851e+00 2270 5.320765e-06 2.077350e+00 2.535303e+00 2271 5.321156e-06 2.072224e+00 2.530208e+00 2272 5.321937e-06 2.061961e+00 2.520011e+00 2273 5.322133e-06 2.059396e+00 2.517460e+00 2274 5.322523e-06 2.054265e+00 2.512358e+00 2275 5.323305e-06 2.043994e+00 2.502147e+00 2276 5.323500e-06 2.041428e+00 2.499593e+00 2277 5.323890e-06 2.036292e+00 2.494484e+00 2278 5.324672e-06 2.026014e+00 2.484260e+00 2279 5.324867e-06 2.023445e+00 2.481703e+00 2280 5.325258e-06 2.018306e+00 2.476587e+00 2281 5.326039e-06 2.008020e+00 2.466350e+00 2282 5.326234e-06 2.005449e+00 2.463790e+00 2283 5.326625e-06 2.000305e+00 2.458668e+00 2284 5.327406e-06 1.990012e+00 2.448418e+00 2285 5.327601e-06 1.987439e+00 2.445854e+00 2286 5.327992e-06 1.982292e+00 2.440725e+00 2287 5.328773e-06 1.971990e+00 2.430463e+00 2288 5.328969e-06 1.969416e+00 2.427896e+00 2289 5.329359e-06 1.964265e+00 2.422761e+00 2290 5.330140e-06 1.953956e+00 2.412485e+00 2291 5.330336e-06 1.951379e+00 2.409915e+00 2292 5.330726e-06 1.946225e+00 2.404774e+00 2293 5.331508e-06 1.935909e+00 2.394486e+00 2294 5.331703e-06 1.933331e+00 2.391913e+00 2295 5.332094e-06 1.928172e+00 2.386766e+00 2296 5.332875e-06 1.917850e+00 2.376466e+00 2297 5.333070e-06 1.915269e+00 2.373889e+00 2298 5.333461e-06 1.910107e+00 2.368736e+00 2299 5.334242e-06 1.899778e+00 2.358424e+00 2300 5.334437e-06 1.897195e+00 2.355845e+00 2301 5.334828e-06 1.892030e+00 2.350686e+00 2302 5.335609e-06 1.881694e+00 2.340362e+00 2303 5.335805e-06 1.879110e+00 2.337780e+00 2304 5.336195e-06 1.873941e+00 2.332614e+00 2305 5.336976e-06 1.863598e+00 2.322279e+00 2306 5.337172e-06 1.861012e+00 2.319694e+00 2307 5.337562e-06 1.855840e+00 2.314523e+00 2308 5.338344e-06 1.845490e+00 2.304176e+00 2309 5.338539e-06 1.842903e+00 2.301588e+00 2310 5.338930e-06 1.837727e+00 2.296411e+00 2311 5.339711e-06 1.827372e+00 2.286053e+00 2312 5.339906e-06 1.824783e+00 2.283463e+00 2313 5.340297e-06 1.819604e+00 2.278280e+00 2314 5.341078e-06 1.809242e+00 2.267911e+00 2315 5.341273e-06 1.806651e+00 2.265318e+00 2316 5.341664e-06 1.801469e+00 2.260130e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2317 5.342445e-06 1.791101e+00 2.249750e+00 2318 5.342640e-06 1.788508e+00 2.247153e+00 2319 5.343031e-06 1.783323e+00 2.241960e+00 2320 5.343812e-06 1.772949e+00 2.231569e+00 2321 5.344008e-06 1.770355e+00 2.228970e+00 2322 5.344398e-06 1.765167e+00 2.223772e+00 2323 5.345180e-06 1.754787e+00 2.213371e+00 2324 5.345375e-06 1.752192e+00 2.210769e+00 2325 5.345765e-06 1.747000e+00 2.205565e+00 2326 5.346547e-06 1.736614e+00 2.195153e+00 2327 5.346742e-06 1.734018e+00 2.192549e+00 2328 5.347133e-06 1.728824e+00 2.187340e+00 2329 5.347914e-06 1.718432e+00 2.176918e+00 2330 5.348109e-06 1.715834e+00 2.174312e+00 2331 5.348500e-06 1.710637e+00 2.169098e+00 2332 5.349281e-06 1.700239e+00 2.158666e+00 2333 5.349476e-06 1.697640e+00 2.156057e+00 2334 5.349867e-06 1.692440e+00 2.150838e+00 2335 5.350648e-06 1.682037e+00 2.140396e+00 2336 5.350844e-06 1.679436e+00 2.137784e+00 2337 5.351234e-06 1.674234e+00 2.132560e+00 2338 5.352015e-06 1.663826e+00 2.122109e+00 2339 5.352211e-06 1.661223e+00 2.119495e+00 2340 5.352601e-06 1.656018e+00 2.114266e+00 2341 5.353383e-06 1.645605e+00 2.103805e+00 2342 5.353578e-06 1.643001e+00 2.101188e+00 2343 5.353969e-06 1.637794e+00 2.095955e+00 2344 5.354750e-06 1.627375e+00 2.085485e+00 2345 5.354945e-06 1.624770e+00 2.082866e+00 2346 5.355336e-06 1.619560e+00 2.077628e+00 2347 5.356117e-06 1.609136e+00 2.067148e+00 2348 5.356312e-06 1.606530e+00 2.064527e+00 2349 5.356703e-06 1.601317e+00 2.059285e+00 2350 5.357484e-06 1.590889e+00 2.048796e+00 2351 5.357680e-06 1.588282e+00 2.046173e+00 2352 5.358070e-06 1.583066e+00 2.040926e+00 2353 5.358851e-06 1.572633e+00 2.030428e+00 2354 5.359047e-06 1.570025e+00 2.027802e+00 2355 5.359437e-06 1.564807e+00 2.022551e+00 2356 5.360219e-06 1.554369e+00 2.012045e+00 2357 5.360414e-06 1.551759e+00 2.009417e+00 2358 5.360805e-06 1.546539e+00 2.004161e+00 2359 5.361586e-06 1.536097e+00 1.993646e+00 2360 5.363148e-06 1.515201e+00 1.972602e+00 2361 5.363539e-06 1.509978e+00 1.967337e+00 2362 5.364320e-06 1.499529e+00 1.956806e+00 2363 5.364515e-06 1.496916e+00 1.954172e+00 2364 5.364906e-06 1.491689e+00 1.948904e+00 2365 5.365687e-06 1.481234e+00 1.938364e+00 2366 5.367250e-06 1.460312e+00 1.917271e+00 2367 5.367640e-06 1.455083e+00 1.911994e+00 2368 5.368422e-06 1.444621e+00 1.901439e+00 2369 5.368617e-06 1.442005e+00 1.898799e+00 2370 5.369008e-06 1.436772e+00 1.893519e+00 2371 5.369789e-06 1.426304e+00 1.882956e+00 2372 5.371351e-06 1.405360e+00 1.861817e+00 2373 5.371742e-06 1.400124e+00 1.856529e+00 2374 5.372523e-06 1.389650e+00 1.845952e+00 Index time v(20) v(66) -------------------------------------------------------------------------------- 2375 5.374086e-06 1.368689e+00 1.824783e+00 2376 5.374476e-06 1.363451e+00 1.819488e+00 2377 5.375258e-06 1.352970e+00 1.808896e+00 2378 5.376820e-06 1.331995e+00 1.787700e+00 2379 5.377211e-06 1.326753e+00 1.782399e+00 2380 5.377992e-06 1.316266e+00 1.771793e+00 2381 5.379555e-06 1.295277e+00 1.750570e+00 2382 5.382680e-06 1.253287e+00 1.708081e+00 2383 5.383461e-06 1.242788e+00 1.697448e+00 2384 5.385023e-06 1.221779e+00 1.676175e+00 2385 5.385414e-06 1.216526e+00 1.670854e+00 2386 5.386195e-06 1.206019e+00 1.660211e+00 2387 5.387758e-06 1.184997e+00 1.638915e+00 2388 5.388148e-06 1.179742e+00 1.633589e+00 2389 5.388930e-06 1.169229e+00 1.622934e+00 2390 5.390492e-06 1.148197e+00 1.601615e+00 2391 5.390883e-06 1.142939e+00 1.596283e+00 2392 5.391664e-06 1.132422e+00 1.585618e+00 2393 5.393226e-06 1.111381e+00 1.564278e+00 2394 5.396351e-06 1.069283e+00 1.521563e+00 2395 5.397133e-06 1.058759e+00 1.510876e+00 2396 5.398695e-06 1.037703e+00 1.489497e+00 2397 5.399086e-06 1.032439e+00 1.484150e+00 2398 5.399867e-06 1.021908e+00 1.473455e+00 2399 5.401430e-06 1.000844e+00 1.452058e+00 2400 5.404555e-06 9.587020e-01 1.409233e+00 2401 5.405336e-06 9.481667e-01 1.398519e+00 2402 5.406898e-06 9.270908e-01 1.377088e+00 2403 5.410023e-06 8.849251e-01 1.334200e+00 2404 5.416273e-06 8.005723e-01 1.248328e+00 2405 5.417836e-06 7.794783e-01 1.226837e+00 2406 5.420961e-06 7.372845e-01 1.183844e+00 2407 5.427211e-06 6.533200e-01 1.097825e+00 2408 5.439711e-06 4.856913e-01 9.258153e-01 2409 5.464711e-06 1.730899e-01 5.885845e-01 2410 5.510043e-06 -1.651308e-01 9.617715e-02 2411 5.565613e-06 -1.825486e-01 -1.603292e-01 2412 5.617687e-06 -3.367232e-02 -1.124220e-01 2413 5.648941e-06 4.390407e-02 -3.316333e-02 2414 5.680709e-06 8.863201e-02 3.446334e-02 2415 5.712167e-06 9.767176e-02 7.406640e-02 2416 5.762765e-06 7.592355e-02 8.552435e-02 2417 5.802174e-06 5.117343e-02 6.840534e-02 2418 5.845254e-06 3.497134e-02 4.757826e-02 2419 5.896545e-06 3.175880e-02 3.467337e-02 2420 5.954991e-06 3.769734e-02 3.472787e-02 2421 6.020007e-06 4.378044e-02 4.089681e-02 2422 6.097434e-06 4.392141e-02 4.418515e-02 2423 6.189792e-06 4.178732e-02 4.258954e-02 2424 6.289792e-06 4.116458e-02 4.121168e-02 2425 6.389792e-06 4.230278e-02 4.185739e-02 2426 6.489792e-06 4.200495e-02 4.222412e-02 2427 6.589792e-06 4.205075e-02 4.198136e-02 2428 6.689792e-06 4.175786e-02 4.188603e-02 2429 6.789792e-06 4.215918e-02 4.197570e-02 2430 6.889792e-06 4.183139e-02 4.199993e-02 2431 6.989792e-06 4.211023e-02 4.196391e-02 2432 7.089792e-06 4.182133e-02 4.196622e-02 Index time v(20) v(66) -------------------------------------------------------------------------------- 2433 7.189792e-06 4.211691e-02 4.196980e-02 2434 7.289792e-06 4.183660e-02 4.197840e-02 2435 7.389792e-06 4.209942e-02 4.196554e-02 2436 7.489792e-06 4.184869e-02 4.197607e-02 2437 7.589792e-06 4.208784e-02 4.196641e-02 2438 7.689792e-06 4.186288e-02 4.197748e-02 2439 7.789792e-06 4.207282e-02 4.196557e-02 2440 7.889792e-06 4.187751e-02 4.197743e-02 2441 7.989792e-06 4.205845e-02 4.196573e-02 2442 8.089792e-06 4.189191e-02 4.197742e-02 2443 8.189792e-06 4.204422e-02 4.196585e-02 2444 8.289792e-06 4.190571e-02 4.197712e-02 2445 8.389792e-06 4.203094e-02 4.196623e-02 2446 8.489792e-06 4.191844e-02 4.197669e-02 2447 8.589792e-06 4.201885e-02 4.196673e-02 2448 8.689792e-06 4.192984e-02 4.197614e-02 2449 8.789792e-06 4.200821e-02 4.196733e-02 2450 8.889792e-06 4.193971e-02 4.197552e-02 2451 8.989792e-06 4.199917e-02 4.196799e-02 2452 9.089792e-06 4.194796e-02 4.197488e-02 2453 9.189792e-06 4.199176e-02 4.196866e-02 2454 9.289792e-06 4.195458e-02 4.197423e-02 2455 9.389792e-06 4.198596e-02 4.196932e-02 2456 9.489792e-06 4.195963e-02 4.197361e-02 2457 9.589792e-06 4.198167e-02 4.196994e-02 2458 9.689792e-06 4.196323e-02 4.197303e-02 2459 9.789792e-06 4.197877e-02 4.197050e-02 2460 9.889792e-06 4.196552e-02 4.197252e-02 2461 9.989792e-06 4.197707e-02 4.197099e-02 2462 1.000000e-05 4.196484e-02 4.197098e-02 -------------------------------------------------------------------------- mosamp - mos amplifier - transient Legend: + = v(20) * = v(66) -------------------------------------------------------------------------- time v(20) -1.00e+00 1.00e+00 3.00e+00 5.00e+00 7.00e+00 ----------------------|-----------|-----------|-----------|-----------| 0.000e+00 4.197e-02 . X . . . . 1.000e-07 6.818e-01 . * + . . . . 2.000e-07 1.675e+00 . . * + . . . 3.000e-07 2.619e+00 . . * + . . . 4.000e-07 3.391e+00 . . * + . . 5.000e-07 4.040e+00 . . . * + . . 6.000e-07 4.593e+00 . . . *+ . . 7.000e-07 5.026e+00 . . . *+ . 8.000e-07 5.447e+00 . . . .*+ . 9.000e-07 5.820e+00 . . . . *+ . 1.000e-06 6.146e+00 . . . . *+ . 1.100e-06 6.436e+00 . . . . *+ . 1.200e-06 6.697e+00 . . . . *+ . 1.300e-06 6.802e+00 . . . . X . 1.400e-06 6.225e+00 . . . . + * . 1.500e-06 5.203e+00 . . . .+ * . 1.600e-06 4.858e+00 . . . X. . 1.700e-06 4.934e+00 . . . X. . 1.800e-06 5.021e+00 . . . *+ . 1.900e-06 5.050e+00 . . . X . 2.000e-06 5.040e+00 . . . X . 2.100e-06 5.027e+00 . . . X . 2.200e-06 5.024e+00 . . . X . 2.300e-06 5.026e+00 . . . X . 2.400e-06 5.028e+00 . . . X . 2.500e-06 5.028e+00 . . . X . 2.600e-06 5.028e+00 . . . X . 2.700e-06 5.028e+00 . . . X . 2.800e-06 5.027e+00 . . . X . 2.900e-06 5.028e+00 . . . X . 3.000e-06 5.028e+00 . . . X . 3.100e-06 5.028e+00 . . . X . 3.200e-06 5.028e+00 . . . X . 3.300e-06 5.028e+00 . . . X . 3.400e-06 5.028e+00 . . . X . 3.500e-06 5.028e+00 . . . X . 3.600e-06 5.028e+00 . . . X . 3.700e-06 5.028e+00 . . . X . 3.800e-06 5.028e+00 . . . X . 3.900e-06 5.028e+00 . . . X . 4.000e-06 5.027e+00 . . . X . 4.100e-06 5.028e+00 . . . X . 4.200e-06 5.027e+00 . . . X . 4.300e-06 5.028e+00 . . . X . 4.400e-06 5.027e+00 . . . X . 4.500e-06 5.028e+00 . . . X . 4.600e-06 5.027e+00 . . . X . 4.700e-06 5.028e+00 . . . X . 4.800e-06 5.027e+00 . . . X . 4.900e-06 5.028e+00 . . . X . 5.000e-06 5.027e+00 . . . X . 5.100e-06 4.546e+00 . . . +* . . ----------------------|-----------|-----------|-----------|-----------| time v(20) -1.00e+00 1.00e+00 3.00e+00 5.00e+00 7.00e+00 time v(20) -1.00e+00 1.00e+00 3.00e+00 5.00e+00 7.00e+00 ----------------------|-----------|-----------|-----------|-----------| 5.200e-06 3.573e+00 . . . + * . . 5.300e-06 2.348e+00 . . + * . . . 5.400e-06 1.020e+00 . + * . . . 5.500e-06 -9.020e-02 . + * . . . . 5.600e-06 -8.424e-02 . X . . . . 5.700e-06 9.418e-02 . X . . . . 5.800e-06 5.254e-02 . X . . . . 5.900e-06 3.211e-02 . X . . . . 6.000e-06 4.191e-02 . X . . . . 6.100e-06 4.386e-02 . X . . . . 6.200e-06 4.172e-02 . X . . . . 6.300e-06 4.128e-02 . X . . . . 6.400e-06 4.227e-02 . X . . . . 6.500e-06 4.201e-02 . X . . . . 6.600e-06 4.202e-02 . X . . . . 6.700e-06 4.180e-02 . X . . . . 6.800e-06 4.213e-02 . X . . . . 6.900e-06 4.186e-02 . X . . . . 7.000e-06 4.208e-02 . X . . . . 7.100e-06 4.185e-02 . X . . . . 7.200e-06 4.209e-02 . X . . . . 7.300e-06 4.186e-02 . X . . . . 7.400e-06 4.207e-02 . X . . . . 7.500e-06 4.187e-02 . X . . . . 7.600e-06 4.206e-02 . X . . . . 7.700e-06 4.188e-02 . X . . . . 7.800e-06 4.205e-02 . X . . . . 7.900e-06 4.190e-02 . X . . . . 8.000e-06 4.204e-02 . X . . . . 8.100e-06 4.191e-02 . X . . . . 8.200e-06 4.203e-02 . X . . . . 8.300e-06 4.192e-02 . X . . . . 8.400e-06 4.202e-02 . X . . . . 8.500e-06 4.193e-02 . X . . . . 8.600e-06 4.201e-02 . X . . . . 8.700e-06 4.194e-02 . X . . . . 8.800e-06 4.200e-02 . X . . . . 8.900e-06 4.195e-02 . X . . . . 9.000e-06 4.199e-02 . X . . . . 9.100e-06 4.195e-02 . X . . . . 9.200e-06 4.199e-02 . X . . . . 9.300e-06 4.196e-02 . X . . . . 9.400e-06 4.198e-02 . X . . . . 9.500e-06 4.196e-02 . X . . . . 9.600e-06 4.198e-02 . X . . . . 9.700e-06 4.196e-02 . X . . . . 9.800e-06 4.198e-02 . X . . . . 9.900e-06 4.197e-02 . X . . . . 1.000e-05 4.196e-02 . X . . . . ----------------------|-----------|-----------|-----------|-----------| time v(20) -1.00e+00 1.00e+00 3.00e+00 5.00e+00 7.00e+00 ngspice-26/tests/general/fourbitadder.cir0000644000265600020320000000270512264261473020165 0ustar andreasadmin4 bit adder * Models: .MODEL dmod D .MODEL qmod NPN(level=1 BF=75 RB=100 CJE=1PF CJC=3PF) .options noacct .SUBCKT NAND 1 2 3 4 * noeuds: entrees(2) sortie vcc q1 9 5 1 qmod d1clamp 0 1 dmod q2 9 5 2 qmod d2clamp 0 2 dmod rb 4 5 4k r1 4 6 1.6k q3 6 9 8 qmod r2 8 0 1k rc 4 7 130 q4 7 6 10 qmod dvbedrop 10 3 dmod q5 3 8 0 qmod .ends NAND .SUBCKT ONEBIT 1 2 3 4 5 6 * noeuds entrees(2) ,carryin, sortie, carryout, vcc x1 1 2 7 6 NAND x2 1 7 8 6 NAND x3 2 7 9 6 NAND x4 8 9 10 6 NAND x5 3 10 11 6 NAND x6 3 11 12 6 NAND x7 10 11 13 6 NAND x8 12 13 4 6 NAND x9 11 7 5 6 NAND .ends ONEBIT .SUBCKT TWOBIT 1 2 3 4 5 6 7 8 9 * noeuds x1 1 2 7 5 10 9 ONEBIT x2 3 4 10 6 8 9 ONEBIT .ends TWOBIT .SUBCKT FOURBIT 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 x1 1 2 3 4 9 10 13 16 15 TWOBIT x2 5 6 7 8 11 12 16 14 15 TWOBIT .ends FOURBIT * Inputs/Supplies: vcc 99 0 DC 5V VIN1A 1 0 DC 0 pulse(0 3 0 10ns 10ns 10ns 50ns) VIN1B 2 0 DC 0 pulse(0 3 0 10ns 10ns 20ns 100ns) VIN2A 3 0 DC 0 pulse(0 3 0 10ns 10ns 40ns 200ns) VIN2B 4 0 DC 0 pulse(0 3 0 10ns 10ns 80ns 400ns) VIN3A 5 0 DC 0 pulse(0 3 0 10ns 10ns 160ns 800ns) VIN3B 6 0 DC 0 pulse(0 3 0 10ns 10ns 320ns 1600ns) VIN4A 7 0 DC 0 pulse(0 3 0 10ns 10ns 640ns 3200ns) VIN4B 8 0 DC 0 pulse(0 3 0 10ns 10ns 1280ns 6400ns) * Circuit description: x1 1 2 3 4 5 6 7 8 9 10 11 12 0 13 99 FOURBIT rbit0 9 0 1k rbit1 10 0 1k rbit2 11 0 1k rbit3 12 0 1k rcout 13 0 1k * Analysys: .tran 1ns 6ns .print tran v(1) .end ngspice-26/tests/general/rc.cir0000644000265600020320000000026012264261473016111 0ustar andreasadminBasic RC circuit r 1 2 1.0 *l 1 2 1.0 c 2 0 1.0 vin 1 0 pulse (0 1) ac 1 .options noacct .tran 0.1 7.0 *.ac dec 10 .01 10 .plot tran v(2) i(vin) *.plot ac vdb(2) xlog .end ngspice-26/tests/general/Makefile.am0000644000265600020320000000056112264261473017046 0ustar andreasadmin## Process this file with automake to produce Makefile.in TESTS = \ mosamp.cir \ mosmem.cir \ rc.cir \ rca3040.cir \ rtlinv.cir \ schmitt.cir \ diffpair.cir \ fourbitadder.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in ngspice-26/tests/general/Makefile.in0000644000265600020320000003370612264261541017062 0ustar andreasadmin# Makefile.in generated by automake 1.11.6 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__make_dryrun = \ { \ am__dry=no; \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ *) \ for am__flg in $$MAKEFLAGS; do \ case $$am__flg in \ *=*|--*) ;; \ *n*) am__dry=yes; break;; \ esac; \ done;; \ esac; \ test $$am__dry = yes; \ } pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = tests/general DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/include/ngspice/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tty_colors = \ red=; grn=; lgn=; blu=; std= DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ADMSXML = @ADMSXML@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_CPPFLAGS = @AM_CPPFLAGS@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ NOTVLADEVDIR = @NOTVLADEVDIR@ NOTXGRAPH = @NOTXGRAPH@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OPENMP_CFLAGS = @OPENMP_CFLAGS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STATIC = @STATIC@ STRIP = @STRIP@ TCL_LIB_SPEC = @TCL_LIB_SPEC@ TCL_PACKAGE_PATH = @TCL_PACKAGE_PATH@ VERSION = @VERSION@ VLADEV = @VLADEV@ VLADEVDIR = @VLADEVDIR@ XGRAPHDIR = @XGRAPHDIR@ XMKMF = @XMKMF@ XSPICEDLLIBS = @XSPICEDLLIBS@ XSPICEINIT = @XSPICEINIT@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ YACC = @YACC@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ subdirs = @subdirs@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ TESTS = \ mosamp.cir \ mosmem.cir \ rc.cir \ rca3040.cir \ rtlinv.cir \ schmitt.cir \ diffpair.cir \ fourbitadder.cir TESTS_ENVIRONMENT = $(SHELL) $(top_srcdir)/tests/bin/check.sh $(top_builddir)/src/ngspice EXTRA_DIST = \ $(TESTS) \ $(TESTS:.cir=.out) MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/general/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu tests/general/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: check-TESTS: $(TESTS) @failed=0; all=0; xfail=0; xpass=0; skip=0; \ srcdir=$(srcdir); export srcdir; \ list=' $(TESTS) '; \ $(am__tty_colors); \ if test -n "$$list"; then \ for tst in $$list; do \ if test -f ./$$tst; then dir=./; \ elif test -f $$tst; then dir=; \ else dir="$(srcdir)/"; fi; \ if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xpass=`expr $$xpass + 1`; \ failed=`expr $$failed + 1`; \ col=$$red; res=XPASS; \ ;; \ *) \ col=$$grn; res=PASS; \ ;; \ esac; \ elif test $$? -ne 77; then \ all=`expr $$all + 1`; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$tst[\ \ ]*) \ xfail=`expr $$xfail + 1`; \ col=$$lgn; res=XFAIL; \ ;; \ *) \ failed=`expr $$failed + 1`; \ col=$$red; res=FAIL; \ ;; \ esac; \ else \ skip=`expr $$skip + 1`; \ col=$$blu; res=SKIP; \ fi; \ echo "$${col}$$res$${std}: $$tst"; \ done; \ if test "$$all" -eq 1; then \ tests="test"; \ All=""; \ else \ tests="tests"; \ All="All "; \ fi; \ if test "$$failed" -eq 0; then \ if test "$$xfail" -eq 0; then \ banner="$$All$$all $$tests passed"; \ else \ if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ fi; \ else \ if test "$$xpass" -eq 0; then \ banner="$$failed of $$all $$tests failed"; \ else \ if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ fi; \ fi; \ dashes="$$banner"; \ skipped=""; \ if test "$$skip" -ne 0; then \ if test "$$skip" -eq 1; then \ skipped="($$skip test was not run)"; \ else \ skipped="($$skip tests were not run)"; \ fi; \ test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$skipped"; \ fi; \ report=""; \ if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ report="Please report to $(PACKAGE_BUGREPORT)"; \ test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ dashes="$$report"; \ fi; \ dashes=`echo "$$dashes" | sed s/./=/g`; \ if test "$$failed" -eq 0; then \ col="$$grn"; \ else \ col="$$red"; \ fi; \ echo "$${col}$$dashes$${std}"; \ echo "$${col}$$banner$${std}"; \ test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ test -z "$$report" || echo "$${col}$$report$${std}"; \ echo "$${col}$$dashes$${std}"; \ test "$$failed" -eq 0; \ else :; fi distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: check-am install-am install-strip .PHONY: all all-am check check-TESTS check-am clean clean-generic \ clean-libtool distclean distclean-generic distclean-libtool \ distdir dvi dvi-am html html-am info info-am install \ install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ngspice-26/tests/general/schmitt.out0000644000265600020320000005751512264261473017231 0ustar andreasadminWarning: option lvlcod is obsolete. Warning: vin: no DC value, transient time 0 value used Circuit: schmitt ckt - ecl compatible schmitt trigger Warning -- Level not specified on line "(is=1.0e-16 bf=50 br=0.1 rb=50 rc=10 tf=0.12ns tr=5ns cje=0.4pf pe=0.8 me=0.4 cjc=0.5pf pc=0.8 mc=0.333 ccs=1pf va=50)" Using level 1. Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 1 -1.6 8 -5 2 -1.6 3 -0.2597 5 -1.22059 6 -1.11059 4 -2.06799 7 -1.89185 vee#branch 0.041115 vin#branch -1.43429e-10 No. of Data Rows : 146 schmitt ckt - ecl compatible schmitt trigger * the original line is below *.opt acct list node lvlcod=2 .tran 10ns 1000ns vin 1 0 pulse(-1.6 -1.2 10ns 400ns 400ns 100ns 10000ns) vee 8 0 -5 rin 1 2 50 rc1 0 3 50 r1 3 5 185 r2 5 8 760 rc2 0 6 100 re 4 8 260 rth1 7 8 125 rth2 7 0 85 cload 7 0 5pf q1 3 2 4 qstd off q2 6 5 4 qstd q3 0 6 7 qstd q4 0 6 7 qstd .model qstd npn(is=1.0e-16 bf=50 br=0.1 rb=50 rc=10 tf=0.12ns tr=5ns + cje=0.4pf pe=0.8 me=0.4 cjc=0.5pf pc=0.8 mc=0.333 ccs=1pf va=50) s .opt list node lvlcod=2 .end schmitt ckt - ecl compatible schmitt trigger -------------------------------------------------------------------------------- Index time v(1) v(3) v(5) -------------------------------------------------------------------------------- 0 0.000000e+00 -1.600000e+00 -2.596995e-01 -1.220586e+00 1 5.000000e-11 -1.600000e+00 -2.596995e-01 -1.220586e+00 2 1.000000e-10 -1.600000e+00 -2.596995e-01 -1.220586e+00 3 2.000000e-10 -1.600000e+00 -2.596995e-01 -1.220586e+00 4 4.000000e-10 -1.600000e+00 -2.596995e-01 -1.220586e+00 5 8.000000e-10 -1.600000e+00 -2.596995e-01 -1.220586e+00 6 1.600000e-09 -1.600000e+00 -2.596995e-01 -1.220586e+00 7 3.200000e-09 -1.600000e+00 -2.596995e-01 -1.220586e+00 8 6.400000e-09 -1.600000e+00 -2.596995e-01 -1.220586e+00 9 1.000000e-08 -1.600000e+00 -2.596995e-01 -1.220586e+00 10 1.064000e-08 -1.599360e+00 -2.596840e-01 -1.220565e+00 11 1.192000e-08 -1.598080e+00 -2.596789e-01 -1.220566e+00 12 1.448000e-08 -1.595520e+00 -2.596848e-01 -1.220576e+00 13 1.960000e-08 -1.590400e+00 -2.596797e-01 -1.220566e+00 14 2.960000e-08 -1.580400e+00 -2.596847e-01 -1.220576e+00 15 3.960000e-08 -1.570400e+00 -2.596805e-01 -1.220567e+00 16 4.960000e-08 -1.560400e+00 -2.596852e-01 -1.220576e+00 17 5.960000e-08 -1.550400e+00 -2.596819e-01 -1.220568e+00 18 6.960000e-08 -1.540400e+00 -2.596867e-01 -1.220577e+00 19 7.960000e-08 -1.530400e+00 -2.596848e-01 -1.220570e+00 20 8.960000e-08 -1.520400e+00 -2.596904e-01 -1.220579e+00 21 9.960000e-08 -1.510400e+00 -2.596908e-01 -1.220575e+00 22 1.096000e-07 -1.500400e+00 -2.596988e-01 -1.220585e+00 23 1.196000e-07 -1.490400e+00 -2.597036e-01 -1.220584e+00 24 1.296000e-07 -1.480400e+00 -2.597172e-01 -1.220597e+00 25 1.396000e-07 -1.470400e+00 -2.597312e-01 -1.220603e+00 26 1.496000e-07 -1.460400e+00 -2.597574e-01 -1.220626e+00 27 1.596000e-07 -1.450400e+00 -2.597909e-01 -1.220646e+00 28 1.696000e-07 -1.440400e+00 -2.598451e-01 -1.220687e+00 29 1.796000e-07 -1.430400e+00 -2.599206e-01 -1.220737e+00 30 1.896000e-07 -1.420400e+00 -2.600364e-01 -1.220822e+00 31 1.996000e-07 -1.410400e+00 -2.602039e-01 -1.220937e+00 32 2.096000e-07 -1.400400e+00 -2.604565e-01 -1.221118e+00 33 2.196000e-07 -1.390400e+00 -2.608296e-01 -1.221378e+00 34 2.296000e-07 -1.380400e+00 -2.613935e-01 -1.221777e+00 35 2.396000e-07 -1.370400e+00 -2.622454e-01 -1.222374e+00 36 2.496000e-07 -1.360400e+00 -2.635633e-01 -1.223301e+00 37 2.596000e-07 -1.350400e+00 -2.656474e-01 -1.224758e+00 38 2.696000e-07 -1.340400e+00 -2.691142e-01 -1.227174e+00 39 2.796000e-07 -1.330400e+00 -2.754592e-01 -1.231549e+00 40 2.896000e-07 -1.320400e+00 -2.904897e-01 -1.241659e+00 41 2.908500e-07 -1.319150e+00 -2.937909e-01 -1.243775e+00 42 2.933500e-07 -1.316650e+00 -3.022121e-01 -1.249005e+00 43 2.983500e-07 -1.311650e+00 -3.530754e-01 -1.278494e+00 44 2.989377e-07 -1.311062e+00 -3.648930e-01 -1.284810e+00 45 3.001130e-07 -1.309887e+00 -3.946688e-01 -1.300264e+00 46 3.024637e-07 -1.307536e+00 -5.258934e-01 -1.365915e+00 47 3.053655e-07 -1.304634e+00 -7.414480e-01 -1.531865e+00 48 3.069708e-07 -1.303029e+00 -7.703435e-01 -1.613013e+00 49 3.085462e-07 -1.301454e+00 -7.548212e-01 -1.581753e+00 50 3.091916e-07 -1.300808e+00 -7.599894e-01 -1.587944e+00 51 3.100714e-07 -1.299929e+00 -7.615079e-01 -1.591739e+00 52 3.117780e-07 -1.298222e+00 -7.596986e-01 -1.589538e+00 53 3.133687e-07 -1.296631e+00 -7.619813e-01 -1.591363e+00 54 3.165501e-07 -1.293450e+00 -7.606503e-01 -1.590751e+00 Index time v(1) v(3) v(5) -------------------------------------------------------------------------------- 55 3.229128e-07 -1.287087e+00 -7.635697e-01 -1.592486e+00 56 3.329128e-07 -1.277087e+00 -7.635842e-01 -1.593180e+00 57 3.429128e-07 -1.267087e+00 -7.670469e-01 -1.595240e+00 58 3.529128e-07 -1.257087e+00 -7.671447e-01 -1.596085e+00 59 3.629128e-07 -1.247087e+00 -7.705213e-01 -1.598002e+00 60 3.729128e-07 -1.237087e+00 -7.707033e-01 -1.598978e+00 61 3.829128e-07 -1.227087e+00 -7.739950e-01 -1.600773e+00 62 3.929128e-07 -1.217087e+00 -7.742605e-01 -1.601861e+00 63 4.029128e-07 -1.207087e+00 -7.774693e-01 -1.603552e+00 64 4.100000e-07 -1.200000e+00 -7.773126e-01 -1.604332e+00 65 4.110000e-07 -1.200000e+00 -7.780130e-01 -1.604509e+00 66 4.130000e-07 -1.200000e+00 -7.781196e-01 -1.604633e+00 67 4.170000e-07 -1.200000e+00 -7.780251e-01 -1.604549e+00 68 4.250000e-07 -1.200000e+00 -7.781136e-01 -1.604617e+00 69 4.350000e-07 -1.200000e+00 -7.780286e-01 -1.604557e+00 70 4.450000e-07 -1.200000e+00 -7.781105e-01 -1.604611e+00 71 4.550000e-07 -1.200000e+00 -7.780316e-01 -1.604564e+00 72 4.650000e-07 -1.200000e+00 -7.781077e-01 -1.604605e+00 73 4.750000e-07 -1.200000e+00 -7.780343e-01 -1.604569e+00 74 4.850000e-07 -1.200000e+00 -7.781050e-01 -1.604600e+00 75 4.950000e-07 -1.200000e+00 -7.780370e-01 -1.604573e+00 76 5.050000e-07 -1.200000e+00 -7.781024e-01 -1.604596e+00 77 5.100000e-07 -1.200000e+00 -7.780406e-01 -1.604578e+00 78 5.110000e-07 -1.201000e+00 -7.779520e-01 -1.604563e+00 79 5.130000e-07 -1.203000e+00 -7.776242e-01 -1.604343e+00 80 5.170000e-07 -1.207000e+00 -7.769013e-01 -1.603735e+00 81 5.250000e-07 -1.215000e+00 -7.755126e-01 -1.602640e+00 82 5.350000e-07 -1.225000e+00 -7.737380e-01 -1.601196e+00 83 5.450000e-07 -1.235000e+00 -7.719955e-01 -1.599811e+00 84 5.550000e-07 -1.245000e+00 -7.702225e-01 -1.598373e+00 85 5.650000e-07 -1.255000e+00 -7.684778e-01 -1.596982e+00 86 5.750000e-07 -1.265000e+00 -7.667060e-01 -1.595549e+00 87 5.850000e-07 -1.275000e+00 -7.649587e-01 -1.594152e+00 88 5.950000e-07 -1.285000e+00 -7.631869e-01 -1.592723e+00 89 6.050000e-07 -1.295000e+00 -7.614357e-01 -1.591320e+00 90 6.150000e-07 -1.305000e+00 -7.596617e-01 -1.589892e+00 91 6.250000e-07 -1.315000e+00 -7.579034e-01 -1.588482e+00 92 6.350000e-07 -1.325000e+00 -7.561216e-01 -1.587050e+00 93 6.450000e-07 -1.335000e+00 -7.543482e-01 -1.585627e+00 94 6.550000e-07 -1.345000e+00 -7.525461e-01 -1.584183e+00 95 6.650000e-07 -1.355000e+00 -7.507383e-01 -1.582734e+00 96 6.750000e-07 -1.365000e+00 -7.488855e-01 -1.581254e+00 97 6.850000e-07 -1.375000e+00 -7.469963e-01 -1.579747e+00 98 6.950000e-07 -1.385000e+00 -7.450187e-01 -1.578179e+00 99 7.050000e-07 -1.395000e+00 -7.429314e-01 -1.576529e+00 100 7.150000e-07 -1.405000e+00 -7.406415e-01 -1.574739e+00 101 7.250000e-07 -1.415000e+00 -7.380496e-01 -1.572729e+00 102 7.350000e-07 -1.425000e+00 -7.349278e-01 -1.570349e+00 103 7.450000e-07 -1.435000e+00 -7.308991e-01 -1.567324e+00 104 7.550000e-07 -1.445000e+00 -7.250970e-01 -1.563064e+00 105 7.650000e-07 -1.455000e+00 -7.150970e-01 -1.555916e+00 106 7.750000e-07 -1.465000e+00 -6.840296e-01 -1.535033e+00 107 7.762500e-07 -1.466250e+00 -6.755682e-01 -1.529875e+00 108 7.787500e-07 -1.468750e+00 -6.497691e-01 -1.515033e+00 109 7.793750e-07 -1.469375e+00 -6.390606e-01 -1.509117e+00 110 7.806250e-07 -1.470625e+00 -6.119179e-01 -1.494579e+00 111 7.831250e-07 -1.473125e+00 -4.881476e-01 -1.431701e+00 112 7.857900e-07 -1.475790e+00 -2.833213e-01 -1.291740e+00 Index time v(1) v(3) v(5) -------------------------------------------------------------------------------- 113 7.875079e-07 -1.477508e+00 -2.519806e-01 -1.195893e+00 114 7.887109e-07 -1.478711e+00 -2.621152e-01 -1.226533e+00 115 7.894732e-07 -1.479473e+00 -2.594353e-01 -1.221026e+00 116 7.901883e-07 -1.480188e+00 -2.596381e-01 -1.219053e+00 117 7.915860e-07 -1.481586e+00 -2.598946e-01 -1.222134e+00 118 7.932408e-07 -1.483241e+00 -2.595996e-01 -1.219245e+00 119 7.954802e-07 -1.485480e+00 -2.598874e-01 -1.221860e+00 120 7.994272e-07 -1.489427e+00 -2.596034e-01 -1.219456e+00 121 8.061215e-07 -1.496122e+00 -2.598727e-01 -1.221737e+00 122 8.161215e-07 -1.506122e+00 -2.595949e-01 -1.219519e+00 123 8.261215e-07 -1.516122e+00 -2.598600e-01 -1.221674e+00 124 8.361215e-07 -1.526122e+00 -2.595899e-01 -1.219567e+00 125 8.461215e-07 -1.536122e+00 -2.598531e-01 -1.221618e+00 126 8.561215e-07 -1.546122e+00 -2.595885e-01 -1.219616e+00 127 8.661215e-07 -1.556122e+00 -2.598490e-01 -1.221567e+00 128 8.761215e-07 -1.566122e+00 -2.595885e-01 -1.219663e+00 129 8.861215e-07 -1.576122e+00 -2.598464e-01 -1.221519e+00 130 8.961215e-07 -1.586122e+00 -2.595892e-01 -1.219708e+00 131 9.061215e-07 -1.596122e+00 -2.598445e-01 -1.221474e+00 132 9.100000e-07 -1.600000e+00 -2.595910e-01 -1.219782e+00 133 9.110000e-07 -1.600000e+00 -2.596995e-01 -1.220535e+00 134 9.130000e-07 -1.600000e+00 -2.596983e-01 -1.220624e+00 135 9.155976e-07 -1.600000e+00 -2.597008e-01 -1.220555e+00 136 9.186319e-07 -1.600000e+00 -2.596984e-01 -1.220615e+00 137 9.247005e-07 -1.600000e+00 -2.597005e-01 -1.220560e+00 138 9.347005e-07 -1.600000e+00 -2.596987e-01 -1.220612e+00 139 9.447005e-07 -1.600000e+00 -2.597003e-01 -1.220562e+00 140 9.547005e-07 -1.600000e+00 -2.596989e-01 -1.220611e+00 141 9.647005e-07 -1.600000e+00 -2.597001e-01 -1.220563e+00 142 9.747005e-07 -1.600000e+00 -2.596991e-01 -1.220609e+00 143 9.847005e-07 -1.600000e+00 -2.596999e-01 -1.220564e+00 144 9.947005e-07 -1.600000e+00 -2.596993e-01 -1.220608e+00 145 1.000000e-06 -1.600000e+00 -2.596996e-01 -1.220566e+00 schmitt ckt - ecl compatible schmitt trigger -------------------------------------------------------------------------------- Index time v(6) -------------------------------------------------------------------------------- 0 0.000000e+00 -1.110593e+00 1 5.000000e-11 -1.110593e+00 2 1.000000e-10 -1.110593e+00 3 2.000000e-10 -1.110593e+00 4 4.000000e-10 -1.110593e+00 5 8.000000e-10 -1.110593e+00 6 1.600000e-09 -1.110593e+00 7 3.200000e-09 -1.110593e+00 8 6.400000e-09 -1.110593e+00 9 1.000000e-08 -1.110593e+00 10 1.064000e-08 -1.110574e+00 11 1.192000e-08 -1.110548e+00 12 1.448000e-08 -1.110543e+00 13 1.960000e-08 -1.110547e+00 14 2.960000e-08 -1.110542e+00 15 3.960000e-08 -1.110545e+00 16 4.960000e-08 -1.110539e+00 17 5.960000e-08 -1.110540e+00 18 6.960000e-08 -1.110534e+00 19 7.960000e-08 -1.110533e+00 20 8.960000e-08 -1.110525e+00 21 9.960000e-08 -1.110518e+00 22 1.096000e-07 -1.110504e+00 23 1.196000e-07 -1.110488e+00 24 1.296000e-07 -1.110461e+00 25 1.396000e-07 -1.110424e+00 26 1.496000e-07 -1.110368e+00 27 1.596000e-07 -1.110287e+00 28 1.696000e-07 -1.110166e+00 29 1.796000e-07 -1.109990e+00 30 1.896000e-07 -1.109729e+00 31 1.996000e-07 -1.109343e+00 32 2.096000e-07 -1.108769e+00 33 2.196000e-07 -1.107915e+00 34 2.296000e-07 -1.106632e+00 35 2.396000e-07 -1.104688e+00 36 2.496000e-07 -1.101690e+00 37 2.596000e-07 -1.096948e+00 38 2.696000e-07 -1.089084e+00 39 2.796000e-07 -1.074747e+00 40 2.896000e-07 -1.041148e+00 41 2.908500e-07 -1.033889e+00 42 2.933500e-07 -1.015594e+00 43 2.983500e-07 -9.080097e-01 44 2.989377e-07 -8.836122e-01 45 3.001130e-07 -8.228781e-01 46 3.024637e-07 -5.607994e-01 47 3.053655e-07 -1.162075e-01 48 3.069708e-07 -2.777315e-02 49 3.085462e-07 -4.560145e-02 50 3.091916e-07 -4.589713e-02 51 3.100714e-07 -4.390935e-02 52 3.117780e-07 -4.397798e-02 53 3.133687e-07 -4.398656e-02 54 3.165501e-07 -4.396146e-02 Index time v(6) -------------------------------------------------------------------------------- 55 3.229128e-07 -4.397825e-02 56 3.329128e-07 -4.394923e-02 57 3.429128e-07 -4.396739e-02 58 3.529128e-07 -4.394263e-02 59 3.629128e-07 -4.396234e-02 60 3.729128e-07 -4.394021e-02 61 3.829128e-07 -4.395989e-02 62 3.929128e-07 -4.393949e-02 63 4.029128e-07 -4.395860e-02 64 4.100000e-07 -4.393956e-02 65 4.110000e-07 -4.394856e-02 66 4.130000e-07 -4.394420e-02 67 4.170000e-07 -4.394332e-02 68 4.250000e-07 -4.394500e-02 69 4.350000e-07 -4.394311e-02 70 4.450000e-07 -4.394510e-02 71 4.550000e-07 -4.394307e-02 72 4.650000e-07 -4.394509e-02 73 4.750000e-07 -4.394310e-02 74 4.850000e-07 -4.394503e-02 75 4.950000e-07 -4.394318e-02 76 5.050000e-07 -4.394495e-02 77 5.100000e-07 -4.394331e-02 78 5.110000e-07 -4.394412e-02 79 5.130000e-07 -4.393933e-02 80 5.170000e-07 -4.393885e-02 81 5.250000e-07 -4.394047e-02 82 5.350000e-07 -4.393928e-02 83 5.450000e-07 -4.394162e-02 84 5.550000e-07 -4.394088e-02 85 5.650000e-07 -4.394414e-02 86 5.750000e-07 -4.394485e-02 87 5.850000e-07 -4.395010e-02 88 5.950000e-07 -4.395428e-02 89 6.050000e-07 -4.396441e-02 90 6.150000e-07 -4.397667e-02 91 6.250000e-07 -4.399868e-02 92 6.350000e-07 -4.402993e-02 93 6.450000e-07 -4.408066e-02 94 6.550000e-07 -4.415697e-02 95 6.650000e-07 -4.427686e-02 96 6.750000e-07 -4.446106e-02 97 6.850000e-07 -4.474806e-02 98 6.950000e-07 -4.519373e-02 99 7.050000e-07 -4.589066e-02 100 7.150000e-07 -4.698689e-02 101 7.250000e-07 -4.873044e-02 102 7.350000e-07 -5.155536e-02 103 7.450000e-07 -5.627755e-02 104 7.550000e-07 -6.465487e-02 105 7.650000e-07 -8.170330e-02 106 7.750000e-07 -1.417770e-01 107 7.762500e-07 -1.584564e-01 108 7.787500e-07 -2.093066e-01 109 7.793750e-07 -2.304399e-01 110 7.806250e-07 -2.840488e-01 111 7.831250e-07 -5.294524e-01 112 7.857900e-07 -9.812428e-01 Index time v(6) -------------------------------------------------------------------------------- 113 7.875079e-07 -1.132084e+00 114 7.887109e-07 -1.114840e+00 115 7.894732e-07 -1.108192e+00 116 7.901883e-07 -1.111046e+00 117 7.915860e-07 -1.110242e+00 118 7.932408e-07 -1.110831e+00 119 7.954802e-07 -1.110349e+00 120 7.994272e-07 -1.110812e+00 121 8.061215e-07 -1.110381e+00 122 8.161215e-07 -1.110831e+00 123 8.261215e-07 -1.110410e+00 124 8.361215e-07 -1.110842e+00 125 8.461215e-07 -1.110425e+00 126 8.561215e-07 -1.110844e+00 127 8.661215e-07 -1.110434e+00 128 8.761215e-07 -1.110842e+00 129 8.861215e-07 -1.110440e+00 130 8.961215e-07 -1.110838e+00 131 9.061215e-07 -1.110444e+00 132 9.100000e-07 -1.110830e+00 133 9.110000e-07 -1.110621e+00 134 9.130000e-07 -1.110583e+00 135 9.155976e-07 -1.110599e+00 136 9.186319e-07 -1.110587e+00 137 9.247005e-07 -1.110598e+00 138 9.347005e-07 -1.110588e+00 139 9.447005e-07 -1.110598e+00 140 9.547005e-07 -1.110587e+00 141 9.647005e-07 -1.110598e+00 142 9.747005e-07 -1.110587e+00 143 9.847005e-07 -1.110598e+00 144 9.947005e-07 -1.110587e+00 145 1.000000e-06 -1.110598e+00 -------------------------------------------------------------------------- schmitt ckt - ecl compatible schmitt trigger Legend: + = v(3) * = v(5) = = v(6) $ = v(1) -------------------------------------------------------------------------- time v(3) -2.00e+00 -1.00e+00 0.00e+00 ----------------------|------------------------|------------------------| 0.000e+00 -2.597e-01 . $ * = . + . 1.000e-08 -2.597e-01 . $ * = . + . 2.000e-08 -2.597e-01 . $ * = . + . 3.000e-08 -2.597e-01 . $ * = . + . 4.000e-08 -2.597e-01 . $ * = . + . 5.000e-08 -2.597e-01 . $ * = . + . 6.000e-08 -2.597e-01 . $ * = . + . 7.000e-08 -2.597e-01 . $ * = . + . 8.000e-08 -2.597e-01 . $ * = . + . 9.000e-08 -2.597e-01 . $ * = . + . 1.000e-07 -2.597e-01 . $ * = . + . 1.100e-07 -2.597e-01 . $ * = . + . 1.200e-07 -2.597e-01 . $ * = . + . 1.300e-07 -2.597e-01 . $ * = . + . 1.400e-07 -2.597e-01 . $ * = . + . 1.500e-07 -2.598e-01 . $ * = . + . 1.600e-07 -2.598e-01 . $ * = . + . 1.700e-07 -2.598e-01 . $ * = . + . 1.800e-07 -2.599e-01 . $ * = . + . 1.900e-07 -2.600e-01 . $ * = . + . 2.000e-07 -2.602e-01 . $ * = . + . 2.100e-07 -2.605e-01 . $ * = . + . 2.200e-07 -2.609e-01 . $ * = . + . 2.300e-07 -2.614e-01 . $ * = . + . 2.400e-07 -2.623e-01 . $ * = . + . 2.500e-07 -2.636e-01 . $ * = . + . 2.600e-07 -2.658e-01 . $ * = . + . 2.700e-07 -2.694e-01 . $ * = . + . 2.800e-07 -2.761e-01 . $ * = . + . 2.900e-07 -2.915e-01 . $* =. + . 3.000e-07 -3.918e-01 . X . = + . 3.100e-07 -7.614e-01 . * $ . + = . 3.200e-07 -7.622e-01 . * $ . + = . 3.300e-07 -7.636e-01 . * $ . + = . 3.400e-07 -7.660e-01 . * $ . + = . 3.500e-07 -7.671e-01 . * $ . + = . 3.600e-07 -7.695e-01 . * $ . + = . 3.700e-07 -7.707e-01 . * $ . + = . 3.800e-07 -7.730e-01 . * $ . + = . 3.900e-07 -7.742e-01 . * $ . + = . 4.000e-07 -7.765e-01 . * $ . + = . 4.100e-07 -7.773e-01 . * $ . + = . 4.200e-07 -7.781e-01 . * $ . + = . 4.300e-07 -7.781e-01 . * $ . + = . 4.400e-07 -7.781e-01 . * $ . + = . 4.500e-07 -7.781e-01 . * $ . + = . 4.600e-07 -7.781e-01 . * $ . + = . 4.700e-07 -7.781e-01 . * $ . + = . 4.800e-07 -7.781e-01 . * $ . + = . 4.900e-07 -7.781e-01 . * $ . + = . 5.000e-07 -7.781e-01 . * $ . + = . 5.100e-07 -7.780e-01 . * $ . + = . ----------------------|------------------------|------------------------| time v(3) -2.00e+00 -1.00e+00 0.00e+00 time v(3) -2.00e+00 -1.00e+00 0.00e+00 ----------------------|------------------------|------------------------| 5.200e-07 -7.764e-01 . * $ . + = . 5.300e-07 -7.746e-01 . * $ . + = . 5.400e-07 -7.729e-01 . * $ . + = . 5.500e-07 -7.711e-01 . * $ . + = . 5.600e-07 -7.694e-01 . * $ . + = . 5.700e-07 -7.676e-01 . * $ . + = . 5.800e-07 -7.658e-01 . * $ . + = . 5.900e-07 -7.641e-01 . * $ . + = . 6.000e-07 -7.623e-01 . * $ . + = . 6.100e-07 -7.605e-01 . * $ . + = . 6.200e-07 -7.588e-01 . * $ . + = . 6.300e-07 -7.570e-01 . * $ . + = . 6.400e-07 -7.552e-01 . * $ . + = . 6.500e-07 -7.534e-01 . * $ . + = . 6.600e-07 -7.516e-01 . * $ . + = . 6.700e-07 -7.498e-01 . * $ . + = . 6.800e-07 -7.479e-01 . * $ . + = . 6.900e-07 -7.460e-01 . * $ . + = . 7.000e-07 -7.440e-01 . * $ . + = . 7.100e-07 -7.418e-01 . * $ . + = . 7.200e-07 -7.393e-01 . * $ . + = . 7.300e-07 -7.365e-01 . * $ . + = . 7.400e-07 -7.329e-01 . * $ . + = . 7.500e-07 -7.280e-01 . * $ . + = . 7.600e-07 -7.201e-01 . * $ . + = . 7.700e-07 -6.996e-01 . * $ . + = . 7.800e-07 -6.255e-01 . *$ . + = . 7.900e-07 -2.596e-01 . $ * = . + . 8.000e-07 -2.596e-01 . $ * = . + . 8.100e-07 -2.598e-01 . $ * = . + . 8.200e-07 -2.597e-01 . $ * = . + . 8.300e-07 -2.598e-01 . $ * = . + . 8.400e-07 -2.597e-01 . $ * = . + . 8.500e-07 -2.598e-01 . $ * = . + . 8.600e-07 -2.597e-01 . $ * = . + . 8.700e-07 -2.597e-01 . $ * = . + . 8.800e-07 -2.597e-01 . $ * = . + . 8.900e-07 -2.597e-01 . $ * = . + . 9.000e-07 -2.597e-01 . $ * = . + . 9.100e-07 -2.596e-01 . $ * = . + . 9.200e-07 -2.597e-01 . $ * = . + . 9.300e-07 -2.597e-01 . $ * = . + . 9.400e-07 -2.597e-01 . $ * = . + . 9.500e-07 -2.597e-01 . $ * = . + . 9.600e-07 -2.597e-01 . $ * = . + . 9.700e-07 -2.597e-01 . $ * = . + . 9.800e-07 -2.597e-01 . $ * = . + . 9.900e-07 -2.597e-01 . $ * = . + . 1.000e-06 -2.597e-01 . $ * = . + . ----------------------|------------------------|------------------------| time v(3) -2.00e+00 -1.00e+00 0.00e+00 ngspice-26/tests/general/rtlinv.cir0000644000265600020320000000075112264261473017030 0ustar andreasadminrtlinv ckt - cascaded rtl inverters .width in=72 .opt list node lvlcod=2 noacct * The original line is below *.opt acct list node lvlcod=2 .dc vin 0.0 2.5 0.025 .tran 2ns 200ns vcc 6 0 5 vin 1 0 pulse(0 5 2ns 2ns 2ns 80ns) rb1 1 2 10k rc1 6 3 1k q1 3 2 0 qnd rb2 3 4 10k q2 5 4 0 qnd rc2 6 5 1k .model qnd npn(level=1 bf=50 rb=70 rc=40 ccs=2pf tf=0.1ns tr=10ns cje=0.9pf + cjc=1.5pf pc=0.85 va=50) .print dc v(3) v(5) .plot dc v(3) .print tran v(3) v(5) .plot tran v(3) v(5) v(1) .end ngspice-26/tests/general/rca3040.cir0000644000265600020320000000202712264261473016564 0ustar andreasadminrca3040 ckt - rca 3040 wideband amplifier .options noacct .ac dec 10 1 10ghz .dc vin -0.25 0.25 0.005 .tran 2.0ns 200ns vin 1 0 sin(0 0.1 50meg 0.5ns) ac 1 vcc 2 0 15.0 vee 3 0 -15.0 rs1 30 1 1k rs2 31 0 1k r1 5 3 4.8k r2 6 3 4.8k r3 9 3 811 r4 8 3 2.17k r5 8 0 820 r6 2 14 1.32k r7 2 12 4.5k r8 2 15 1.32k r9 16 0 5.25k r10 17 0 5.25k q1 2 30 5 qnl q2 2 31 6 qnl q3 10 5 7 qnl q4 11 6 7 qnl q5 14 12 10 qnl q6 15 12 11 qnl q7 12 12 13 qnl q8 13 13 0 qnl q9 7 8 9 qnl q10 2 15 16 qnl q11 2 14 17 qnl .model qnl npn level=1 bf=80 rb=100 ccs=2pf tf=0.3ns tr=6ns cje=3pf + cjc=2pf va=50 .end ngspice-26/tests/general/mosmem.cir0000644000265600020320000000145312264261473017007 0ustar andreasadminmosmem - mos memory cell .width in=72 .opt abstol=1u .opt list node noacct * The original line is below *.opt acct list node .tran 20ns 2us vdd 9 0 dc 5 vs 7 0 pulse(2 0 520ns 20ns 20ns 500ns 2000ns) vw 1 0 pulse(0 2 20ns 20ns 500ns 200ns 2000ns) vwb 2 0 pulse(2 0 20ns 20ns 20ns 2000ns 2000ns) m1 3 1 0 0 mod w=250u l=5u m2 4 2 0 0 mod w=250u l=5u m3 9 9 3 0 mod w=5u l=5u m4 9 9 4 0 mod w=5u l=5u m5 5 7 3 0 mod w=50u l=5u m6 6 7 4 0 mod w=50u l=5u m7 5 6 0 0 mod w=250u l=5u m8 6 5 0 0 mod w=250u l=5u m9 9 9 5 0 mod w=5u l=5u m10 9 9 6 0 mod w=5u l=5u m11 8 4 0 0 mod w=250u l=5u m12 9 9 8 0 mod w=5u l=5u .model mod nmos(vto=0.5 phi=0.7 kp=1.0e-6 gamma=1.83 lambda=0.115 + level=1 cgso=1u cgdo=1u cbd=50p cbs=50p) .print dc v(5) v(6) .plot dc v(6) .plot tran v(6) v(5) v(7) v(1) v(2) .end ngspice-26/tests/general/schmitt.cir0000644000265600020320000000114612264261473017164 0ustar andreasadminschmitt ckt - ecl compatible schmitt trigger .width in=72 .opt list node lvlcod=2 noacct * The original line is below *.opt acct list node lvlcod=2 .tran 10ns 1000ns vin 1 0 pulse(-1.6 -1.2 10ns 400ns 400ns 100ns 10000ns) vee 8 0 -5 rin 1 2 50 rc1 0 3 50 r1 3 5 185 r2 5 8 760 rc2 0 6 100 re 4 8 260 rth1 7 8 125 rth2 7 0 85 cload 7 0 5pf q1 3 2 4 qstd off q2 6 5 4 qstd q3 0 6 7 qstd q4 0 6 7 qstd .model qstd npn(level=1 is=1.0e-16 bf=50 br=0.1 rb=50 rc=10 tf=0.12ns tr=5ns + cje=0.4pf pe=0.8 me=0.4 cjc=0.5pf pc=0.8 mc=0.333 ccs=1pf va=50) .print tran v(1) v(3) v(5) v(6) .plot tran v(3) v(5) v(6) v(1) .end ngspice-26/tests/general/mosmem.out0000644000265600020320000002405712264261473017046 0ustar andreasadmin Circuit: mosmem - mos memory cell Doing analysis at TEMP = 300.150000 and TNOM = 300.150000 Initial Transient Solution -------------------------- Node Voltage ---- ------- 9 5 7 2 1 0 2 2 3 2.66862 4 0.177782 5 2.66851 6 0.135199 8 2.66891 vwb#branch 0 vw#branch 0 vs#branch 0 vdd#branch -2.72229e-05 mosmem - mos memory cell * the original line is below *.opt acct list node .tran 20ns 2us vdd 9 0 dc 5 vs 7 0 pulse(2 0 520ns 20ns 20ns 500ns 2000ns) vw 1 0 pulse(0 2 20ns 20ns 500ns 200ns 2000ns) vwb 2 0 pulse(2 0 20ns 20ns 20ns 2000ns 2000ns) m1 3 1 0 0 mod w=250u l=5u m2 4 2 0 0 mod w=250u l=5u m3 9 9 3 0 mod w=5u l=5u m4 9 9 4 0 mod w=5u l=5u m5 5 7 3 0 mod w=50u l=5u m6 6 7 4 0 mod w=50u l=5u m7 5 6 0 0 mod w=250u l=5u m8 6 5 0 0 mod w=250u l=5u m9 9 9 5 0 mod w=5u l=5u m10 9 9 6 0 mod w=5u l=5u m11 8 4 0 0 mod w=250u l=5u m12 9 9 8 0 mod w=5u l=5u .model mod nmos(vto=0.5 phi=0.7 kp=1.0e-6 gamma=1.83 lambda=0.115 + level=1 cgso=1u cgdo=1u cbd=50p cbs=50p) .opt list node .opt abstol=1u .end -------------------------------------------------------------------------- mosmem - mos memory cell Transient Analysis Sat Aug 27 16:14:56 2005 Legend: + = v(6) * = v(5) = = v(7) $ = v(1) % = v(2) -------------------------------------------------------------------------- time v(6) -1.00e+00 0.00e+00 1.00e+00 2.00e+00 3.00e+00 ----------------------|-----------|-----------|-----------|-----------| 0.000e+00 1.352e-01 . $+ . X * . 2.000e-08 1.352e-01 . $+ . X * . 4.000e-08 1.350e-01 . %.+ . X * . 6.000e-08 1.346e-01 . %+ . X * . 8.000e-08 1.341e-01 . %+ . X * . 1.000e-07 1.337e-01 . %+ . X * . 1.200e-07 1.333e-01 . %+ . X * . 1.400e-07 1.328e-01 . %+ . X * . 1.600e-07 1.324e-01 . %+ . X * . 1.800e-07 1.320e-01 . %+ . X * . 2.000e-07 1.316e-01 . %+ . X * . 2.200e-07 1.311e-01 . %+ . X * . 2.400e-07 1.307e-01 . %+ . X * . 2.600e-07 1.303e-01 . %+ . $= * . 2.800e-07 1.299e-01 . %+ . $ = * . 3.000e-07 1.295e-01 . %+ . $ = * . 3.200e-07 1.291e-01 . %+ . $ = * . 3.400e-07 1.287e-01 . %+ . $ = * . 3.600e-07 1.283e-01 . %+ . $ = * . 3.800e-07 1.279e-01 . %+ . $ = * . 4.000e-07 1.275e-01 . %+ . $ = * . 4.200e-07 1.271e-01 . %+ . $ = * . 4.400e-07 1.268e-01 . %+ . $ = * . 4.600e-07 1.264e-01 . %+ .$ = * . 4.800e-07 1.260e-01 . %+ $ = * . 5.000e-07 1.256e-01 . %+ $. = * . 5.200e-07 1.252e-01 . %+ $ . = * . 5.400e-07 -1.087e-01 . +=% $ . . * . 5.600e-07 -1.079e-01 . + X $ . . * . 5.800e-07 -1.071e-01 . + X $ . . * . 6.000e-07 -1.063e-01 . + X $ . . * . 6.200e-07 -1.056e-01 . + X $ . . * . 6.400e-07 -1.048e-01 . + X $ . . * . 6.600e-07 -1.040e-01 . + X $ . . * . 6.800e-07 -1.032e-01 . + X $ . . * . 7.000e-07 -1.024e-01 . + X$ . . * . 7.200e-07 -1.016e-01 . + X . . * . 7.400e-07 -1.009e-01 . + X . . * . 7.600e-07 -1.001e-01 . + X . . * . 7.800e-07 -9.933e-02 . + X . . * . 8.000e-07 -9.856e-02 . + X . . * . 8.200e-07 -9.779e-02 . + X . . * . 8.400e-07 -9.703e-02 . + X . . * . 8.600e-07 -9.627e-02 . + X . . * . 8.800e-07 -9.551e-02 . + X . . * . 9.000e-07 -9.475e-02 . + X . . * . 9.200e-07 -9.399e-02 . + X . . * . 9.400e-07 -9.324e-02 . + X . . * . 9.600e-07 -9.249e-02 . + X . . * . 9.800e-07 -9.174e-02 . + X . . * . 1.000e-06 -9.100e-02 . + X . . * . 1.020e-06 -9.025e-02 . + X . . * . ----------------------|-----------|-----------|-----------|-----------| time v(6) -1.00e+00 0.00e+00 1.00e+00 2.00e+00 3.00e+00 time v(6) -1.00e+00 0.00e+00 1.00e+00 2.00e+00 3.00e+00 ----------------------|-----------|-----------|-----------|-----------| 1.040e-06 -8.951e-02 . + X . . * . 1.060e-06 1.455e-01 . X+ . =. * . 1.080e-06 1.451e-01 . X+ . = * . 1.100e-06 1.447e-01 . X+ . = * . 1.120e-06 1.443e-01 . X+ . = * . 1.140e-06 1.439e-01 . X+ . = * . 1.160e-06 1.435e-01 . X+ . = * . 1.180e-06 1.431e-01 . X+ . = * . 1.200e-06 1.427e-01 . X+ . = * . 1.220e-06 1.423e-01 . X+ . = * . 1.240e-06 1.419e-01 . X+ . = * . 1.260e-06 1.415e-01 . X+ . = * . 1.280e-06 1.411e-01 . X+ . = * . 1.300e-06 1.407e-01 . X+ . = * . 1.320e-06 1.404e-01 . X+ . = * . 1.340e-06 1.400e-01 . X+ . = * . 1.360e-06 1.396e-01 . X+ . = * . 1.380e-06 1.392e-01 . X+ . = * . 1.400e-06 1.389e-01 . X+ . = * . 1.420e-06 1.385e-01 . X+ . = * . 1.440e-06 1.381e-01 . X+ . = * . 1.460e-06 1.378e-01 . X+ . = * . 1.480e-06 1.374e-01 . X+ . = * . 1.500e-06 1.370e-01 . X+ . = * . 1.520e-06 1.367e-01 . X+ . = * . 1.540e-06 1.363e-01 . X+ . = * . 1.560e-06 1.360e-01 . X+ . = * . 1.580e-06 1.356e-01 . X+ . = * . 1.600e-06 1.353e-01 . X+ . = * . 1.620e-06 1.349e-01 . X+ . = * . 1.640e-06 1.346e-01 . X+ . = * . 1.660e-06 1.343e-01 . X+ . = * . 1.680e-06 1.339e-01 . X+ . = * . 1.700e-06 1.336e-01 . X+ . = * . 1.720e-06 1.332e-01 . X+ . = * . 1.740e-06 1.329e-01 . X+ . = * . 1.760e-06 1.326e-01 . X+ . = * . 1.780e-06 1.323e-01 . X+ . = * . 1.800e-06 1.319e-01 . X+ . = * . 1.820e-06 1.316e-01 . X+ . = * . 1.840e-06 1.313e-01 . X+ . = * . 1.860e-06 1.310e-01 . X+ . = * . 1.880e-06 1.307e-01 . X+ . = * . 1.900e-06 1.304e-01 . X+ . = * . 1.920e-06 1.300e-01 . X+ . = * . 1.940e-06 1.297e-01 . X+ . = * . 1.960e-06 1.294e-01 . X+ . = * . 1.980e-06 1.291e-01 . X+ . = * . 2.000e-06 1.288e-01 . X+ . = * . ----------------------|-----------|-----------|-----------|-----------| time v(6) -1.00e+00 0.00e+00 1.00e+00 2.00e+00 3.00e+00 CPU time since last call: 0.027 seconds. Total CPU time: 0.027 seconds. Current dynamic memory usage = 135168, Dynamic memory limit = -491521. ngspice-26/COPYING0000644000265600020320000007726012264261473013300 0ustar andreasadmin12345678901234567890123456789012345678901234567890123456789012345678901234567890 Ngspice 26 Copyright (c) 2014, All rights reserved. Foreword: The name 'Spice' (Simulation Program with Integrated Circuit Emphasis) was originally chosen at the University of California, Berkeley. The original Berkeley code is covered under the modified BSD license and thus sets the basis for all other code added. As Spice is the basis of almost all circuit simulators, the major part of the analogue and mixed signals simulation's code is designed to fit with it. The *spices (generic name for its forks) are heterogeneous in many points due to the work of researchers, electronic designers, software editors, etc. The Ngspice team tries to collect work from the different sources and contribute new functionalities. Thus, the material we manipulate is heterogeneous in licenses. Keeping the licenses as is, but also keep it compatible with the new BSD license, is the way to live with that diversity. Copyleft is a fundamental question in FOSS development. The choice of a copylefted contribution, or a non copylefted contribution is an important choice that should be respected. Ngspice branch as a whole will not be covered by a specific license. The Ngspice team wants to encourage contributions to ngspice. We let each new developer choose its position regarding copyleft, as we respect the position of the former developers. In order to keep things clear ngspice team proposes to follow the following guidelines: Each piece of code should be kept under its original contributor's license. As for any project, modifications made in sources covered by a less restrictive license can be covered by a more restrictive license than new BSD. We do not encourage it. If you feel to add code in a file under a different license than the rest of the file, please use comments to mark the boundaries of the modification, and edit the comments at the beginning of the file with correct license and copyright information. We encourage restrictive licenses to be chosen only for new functionalities, written in distinct files, leading to distinct libraries that link depending on a specific configure flag. We encourage non proliferation of licenses (e.g. choosing either LGPL or new BSD). GPL is not suitable for code to be directly linked into ngspice, but may be used in shared object libraries only. This heterogeneous license status requires some effort to keep track on licenses applied. Please take care of knowing which license applies to the code you are editing, or conveying and not to commit license infringements, especially to GPL and LGPL which are quite restrictive. On 2007, July 17th spice 3f5 changed from its original license to the new BSD license. (http://embedded.eecs.berkeley.edu/pubs/downloads/spice/index.htm) On 2008, December 1st, tclspice changes license from GPL to LGPLv2, in accordance with Multigig Ltd, the copyright holder. The following table is just a reminder on license status, please don't rely on it: Author License Notes numparam Georg Post LGPL Applies to the code in frontend/numparam adms Laurent Lemaitre LGPL Applies to scripts in the spicelib/dev/adms tclspice Stefan Jones LGPL TCL integration cider U. of California Old BSD Device level simulator xspice Georgia Tech. Public D Mixed signals spice U. of California New BSD Analog circuit simulation ---------------------------------- Cider ----------------------------------- RESEARCH SOFTWARE AGREEMENT This file specifies the terms under which the software and documentation provided with this distribution are provided. Software is distributed as is, completely without warranty or service support. The University of California and its employ- ees are not liable for the condition or performance of the software. The University does not warrant that it owns the copyright or other proprietary rights to all software and documentation provided under this agreement, notwithstanding any copyright notice, and shall not be liable for any infringement of copyright or proprietary rights brought by third parties against the reci- pient of the software and documentation provided under this agreement. THE UNIVERSITY OF CALIFORNIA HEREBY DISCLAIMS ALL IMPLIED WARRANTIES, INCLUDING THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE UNIVERSITY IS NOT LIABLE FOR ANY DAMAGES INCURRED BY THE RECIPIENT IN USE OF THE SOFTWARE AND DOCUMENTATION, INCLUDING DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES. The University of California grants the recipient the right to modify, copy, and redistribute the software and documentation, both within the recipient's organization and externally, subject to the following restrictions: (a) The recipient agrees not to charge for the University of California code itself. The recipient may, however, charge for additions, extensions, or support. (b) In any product based on the software, the recipient agrees to acknowledge the research group that developed the software. This acknowledgement shall appear in the product documentation. (c) The recipient agrees to obey all U.S. Government restric- tions governing redistribution or export of the software and documentation. ---------------------------------- Spice3f5 -------------------------------- Copyright (c) 1985-1991 The Regents of the University of California. All rights reserved. Permission is hereby granted, without written agreement and without license or royalty fees, to use, copy, modify, and distribute this software and its documentation for any purpose, provided that the above copyright notice and the following two paragraphs appear in all copies of this software. IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. -------------------------------- Tclspice -------------------------------- GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ---------------------------------- Xspice -------------------------------- THE SOFTWARE PROGRAMS BELOW ARE IN THE PUBLIC DOMAIN AND ARE PROVIDED FREE OF ANY CHARGE. THE GEORGIA TECH RESEARCH CORPORATION, THE GEORGIA INSTITUTE OF TECHNOLOGY, AND/OR OTHER PARTIES PROVIDE THIS SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH THE USER. SHOULD THE PROGRAM PROVE DEFECTIVE, THE USER ASSUMES THE ENTIRE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. IN NO EVENT WILL THE GEORGIA TECH RESEARCH CORPORATION, THE GEORGIA INSTITUTE OF TECHNOLOGY, AND/OR OTHER PARTIES PROVIDING THE PROGRAMS BELOW BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS). ngspice-26/configure0000755000265600020320000227427212264261543014156 0ustar andreasadmin#! /bin/sh # From configure.ac Revision. # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for ngspice 26. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: http://ngspice.sourceforge.net/bugrep.html about your $0: system, including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='ngspice' PACKAGE_TARNAME='ngspice' PACKAGE_VERSION='26' PACKAGE_STRING='ngspice 26' PACKAGE_BUGREPORT='http://ngspice.sourceforge.net/bugrep.html' PACKAGE_URL='' ac_unique_file="src/ngspice.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" enable_option_checking=no ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS OPENMP_CFLAGS NDEV_WANTED_FALSE NDEV_WANTED_TRUE NOTVLADEVDIR VLADEV VLADEVDIR ADMSXML SENSE2_WANTED_FALSE SENSE2_WANTED_TRUE PSS_WANTED_FALSE PSS_WANTED_TRUE NUMDEV_WANTED_FALSE NUMDEV_WANTED_TRUE CIDER_WANTED_FALSE CIDER_WANTED_TRUE XSPICE_WANTED_FALSE XSPICE_WANTED_TRUE XSPICEDLLIBS XSPICEINIT LEX YACC NOTXGRAPH XGRAPHDIR subdirs NO_HELP_FALSE NO_HELP_TRUE NO_X_FALSE NO_X_TRUE LIBOBJS ALLOCA X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF WINGUI_FALSE WINGUI_TRUE OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED LIBTOOL OBJDUMP DLLTOOL AS TCL_LIB_SPEC TCL_PACKAGE_PATH TCLCYG_FALSE TCLCYG_TRUE TCLWIN_FALSE TCLWIN_TRUE TCL_MODULE_FALSE TCL_MODULE_TRUE SHCYG_FALSE SHCYG_TRUE SHWIN_FALSE SHWIN_TRUE SHARED_MODULE_FALSE SHARED_MODULE_TRUE STATIC host_os host_vendor host_cpu host build_os build_vendor build_cpu build EGREP GREP CPP MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE AM_CPPFLAGS am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC ac_ct_AR AR AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_ansi enable_debug enable_gprof enable_checker enable_nobypass enable_capbypass enable_nodelimiting enable_predictor enable_newpred enable_newtrunc enable_sense2 enable_ftedebug enable_cpdebug enable_sensdebug enable_asdebug enable_stepdebug enable_pzdebug enable_blktmsdebug enable_smltmsdebug enable_smoketest enable_experimental enable_expdevices enable_xspice enable_cider enable_adms enable_pss enable_ndev enable_cluster enable_help enable_xgraph with_readline with_editline with_tcl with_ngshared enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock with_windows with_wingui with_x enable_rpath enable_openmp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP XMKMF' ac_subdirs_all='xgraph' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures ngspice 26 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ngspice] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of ngspice 26:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: `make V=1') --disable-silent-rules verbose build output (undo: `make V=0') --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --enable-ansi Force --ansi option for compilation --disable-debug Add -g option for compilation (default) --enable-gprof Produce gprof profiling data in 'gmon.out' (GCC only). --enable-checkergcc Option for compilation with checkergcc --enable-gc Use Boehm-Weiser Conservative Garbage Collector. Disabled by default. --enable-nobypass Don't bypass recalculations of slowly changing variables --enable-capbypass Bypass calculation of cbd/cbs in the mosfets if the vbs/vbd voltages are unchanged --enable-nodelimiting Experimental damping scheme. --enable-predictor Enable a predictor method for convergence. --enable-newpred Enable NEWPRED whatever it is(?) --enable-newtrunc Enable, how we want extrapolate capacitances. --enable-sense2 Use spice2 sensitivity analysis. --enable-ftedebug Enable ngspice frontend debug --enable-cpdebug Enable ngspice shell debug --enable-sensdebug Debug sensitivity code *SENSDEBUG* --enable-asdebug Debug sensitivity code *ASDEBUG* --enable-stepdebug Unknown debug option --enable-pzdebug Debug pole/zero code --enable-blktmsdebug Debug distortion code *BLOCKTIMES* --enable-smltmsdebug Debug distortion code *SMALLTIMES* --enable-smoketest Enable smoketest compile --enable-experimental Enable some experimental code --enable-expdevices Enable experimental devices (they do not compile) --enable-xspice Enable XSpice enhancements, (experimental) --enable-cider Enable CIDER enhancements, (experimental) --enable-adms Enable ADMS code models, (experimental) --enable-pss Enable PSS Analysis, (experimental) --enable-ndev Enable NDEV interface, (experimental) --enable-cluster Enable cluster support, (experimental) --enable-help Force building nghelp (deprecated) --enable-xgraph Enable xgraph compilation. --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-rpath Enable hardcoding the X11 runtime library path --enable-openmp Use OpenMP parallel processing --disable-openmp do not use OpenMP Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-readline=yes/no Enable GNU readline support for CLI. Default=no. --with-editline=yes/no Enable BSD editline support for CLI. Default=no. --with-tcl=tcldir Compiles the tcl module instead, experimental, see README.tcl --with-ngshared Compiles ngspice as shared library (dll) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-windows MS WINDOWS GUI executable, deprecated --with-wingui MS WINDOWS GUI executable --with-x use the X Window System Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF ngspice configure 26 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------------------- ## ## Report this to http://ngspice.sourceforge.net/bugrep.html ## ## --------------------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES # ---------------------------------------------------- # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by ngspice $as_me 26, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Unique file in the source directory # Ensure a recent version of Autoconf is in use # Older versions may not work with this script and this will report the # problem to the user. (2.52 is a guess and might need some adjustment) # Revison stamp the generated ./configure script # Create a configuration header ac_config_headers="$ac_config_headers src/include/ngspice/config.h" # Initialise automake stuff am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='ngspice' VERSION='26' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar lib "link -lib" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5 $as_echo_n "checking the archiver ($AR) interface... " >&6; } if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=ar else am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then am_cv_ar_interface=lib else am_cv_ar_interface=unknown fi fi rm -f conftest.lib libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 $as_echo "$am_cv_ar_interface" >&6; } case $am_cv_ar_interface in ar) ;; lib) # Microsoft lib, so override with the ar-lib wrapper script. # FIXME: It is wrong to rewrite AR. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__AR in this case, # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something # similar. AR="$am_aux_dir/ar-lib $AR" ;; unknown) as_fn_error $? "could not determine $AR interface" "$LINENO" 5 ;; esac AM_CPPFLAGS='-I. -I$(srcdir) -I$(top_builddir)/src/include' # Package Options # --------------- # --enable-ansi: try to force --ansi option to the compiler # Check whether --enable-ansi was given. if test "${enable_ansi+set}" = set; then : enableval=$enable_ansi; fi # --disable-debug: remove -g and -Wall option to the compiler # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi # --enable-gprof: add -pg option to the compiler (GCC) # Check whether --enable-gprof was given. if test "${enable_gprof+set}" = set; then : enableval=$enable_gprof; fi # --enable-checker: add --with-checker-debug option to the compiler # Check whether --enable-checker was given. if test "${enable_checker+set}" = set; then : enableval=$enable_checker; fi # --enable-gc: Enable Boehm-Weiser Conservative Garbage Collector # Check whether --enable-checker was given. if test "${enable_checker+set}" = set; then : enableval=$enable_checker; fi # --enable-nobypass: define NOBYPASS for the code # Check whether --enable-nobypass was given. if test "${enable_nobypass+set}" = set; then : enableval=$enable_nobypass; fi # --enable-capbypass: define CAPBYPASS for the code # Check whether --enable-capbypass was given. if test "${enable_capbypass+set}" = set; then : enableval=$enable_capbypass; fi # --enable-nodelimiting: define NODELIMITING for the code # Check whether --enable-nodelimiting was given. if test "${enable_nodelimiting+set}" = set; then : enableval=$enable_nodelimiting; fi # --enable-predictor: define PREDICTOR for the code # Check whether --enable-predictor was given. if test "${enable_predictor+set}" = set; then : enableval=$enable_predictor; fi # --enable-newpred: define NEWPRED for the code # Check whether --enable-newpred was given. if test "${enable_newpred+set}" = set; then : enableval=$enable_newpred; fi # --enable-newtrunc: define NEWTRUNC for the code # Check whether --enable-newtrunc was given. if test "${enable_newtrunc+set}" = set; then : enableval=$enable_newtrunc; fi # --enable-sense2: define WANT_SENSE2 for the code # Check whether --enable-sense2 was given. if test "${enable_sense2+set}" = set; then : enableval=$enable_sense2; fi # --enable-ftedebug: enable frontend debug macros # Check whether --enable-ftedebug was given. if test "${enable_ftedebug+set}" = set; then : enableval=$enable_ftedebug; fi # --enable-cpdebug: enable frontend debug macros # Check whether --enable-cpdebug was given. if test "${enable_cpdebug+set}" = set; then : enableval=$enable_cpdebug; fi # --enable-sensdebug: define SENSDEBUG for the code # Check whether --enable-sensdebug was given. if test "${enable_sensdebug+set}" = set; then : enableval=$enable_sensdebug; fi # --enable-asdebug: define ASDEBUG for the code # Check whether --enable-asdebug was given. if test "${enable_asdebug+set}" = set; then : enableval=$enable_asdebug; fi # --enable-stepdebug: define STEPDEBUG for the code # Check whether --enable-stepdebug was given. if test "${enable_stepdebug+set}" = set; then : enableval=$enable_stepdebug; fi # --enable-pzdebug: define PZDEBUG for the code # Check whether --enable-pzdebug was given. if test "${enable_pzdebug+set}" = set; then : enableval=$enable_pzdebug; fi # --enable-blktmsdebug: define D_DBG_BLOCKTIMES for the code # Check whether --enable-blktmsdebug was given. if test "${enable_blktmsdebug+set}" = set; then : enableval=$enable_blktmsdebug; fi # --enable-smltmsdebug: define D_DBG_SMALLTIMES for the code # Check whether --enable-smltmsdebug was given. if test "${enable_smltmsdebug+set}" = set; then : enableval=$enable_smltmsdebug; fi # --enable-smoketest: a smoketest # Check whether --enable-smoketest was given. if test "${enable_smoketest+set}" = set; then : enableval=$enable_smoketest; fi # --enable-experimental: define EXPERIMENTAL_CODE for the code # Check whether --enable-experimental was given. if test "${enable_experimental+set}" = set; then : enableval=$enable_experimental; fi # --enable-expdevices: Enable the compilation of experimental devices # Check whether --enable-expdevices was given. if test "${enable_expdevices+set}" = set; then : enableval=$enable_expdevices; fi # --enable-xspice: define XSPICE in the code. This is for xspice support # Check whether --enable-xspice was given. if test "${enable_xspice+set}" = set; then : enableval=$enable_xspice; fi # --enable-cider: define CIDER in the code. This is for CIDER support # Check whether --enable-cider was given. if test "${enable_cider+set}" = set; then : enableval=$enable_cider; fi # --enable-adms: define ADMS in the code. This is for the adms Verilog-A compiler support # Check whether --enable-adms was given. if test "${enable_adms+set}" = set; then : enableval=$enable_adms; fi # --enable-pss: enable PSS Analysis # Check whether --enable-pss was given. if test "${enable_pss+set}" = set; then : enableval=$enable_pss; fi # --enable-ndev: define NDEV in the code. An interface for external device i.e. numerical device # Check whether --enable-ndev was given. if test "${enable_ndev+set}" = set; then : enableval=$enable_ndev; fi # --enable-cluster: define CLUSTER in the code. This is for cluster support # Check whether --enable-cluster was given. if test "${enable_cluster+set}" = set; then : enableval=$enable_cluster; fi # --enable-help: try to force --ansi option to the compiler # Check whether --enable-help was given. if test "${enable_help+set}" = set; then : enableval=$enable_help; fi # --enable-xgraph: Compile the xgraph plotting program. Default is "no". # Xgraph is a plotting package for X11 once very popular. # Check whether --enable-xgraph was given. if test "${enable_xgraph+set}" = set; then : enableval=$enable_xgraph; fi # --with-readline: Includes GNU readline support into CLI. Default is "no". # Check whether --with-readline was given. if test "${with_readline+set}" = set; then : withval=$with_readline; fi # --with-editline: Includes BSD Editline support into CLI. Default is "no". # Check whether --with-editline was given. if test "${with_editline+set}" = set; then : withval=$with_editline; fi # --with-tcl: define TCL_MODULE in the code. This is for tcl support # Check whether --with-tcl was given. if test "${with_tcl+set}" = set; then : withval=$with_tcl; fi # --with-ngshared: define SHARED_MODULE in the code. This is for ngspice as shared library (or dll) # Check whether --with-ngshared was given. if test "${with_ngshared+set}" = set; then : withval=$with_ngshared; fi # readline and editline cannot both be enabled if test "x$with_editline" = xyes; then if test "x$with_readline" = xyes; then as_fn_error $? "Readline and editline cannot both be enabled" "$LINENO" 5 fi fi # Enable maintainer commands only if requested { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE # Compiler checks # --------------- ext_CFLAGS="$CFLAGS" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi # Work on compiler options according to system: # Set default CFLAGS - only use -Wall if we have gcc # the above AC_PROG_CC may set CFLAGS to "-O2 -g" if test "x$enable_debug" = xno; then if test "x$GCC" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Removing debugging option!" >&5 $as_echo "$as_me: WARNING: Removing debugging option!" >&2;} CFLAGS="-O2 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion -s $ext_CFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Removing debugging option!" >&5 $as_echo "$as_me: WARNING: Removing debugging option!" >&2;} CFLAGS="-O2 $ext_CFLAGS" fi else $as_echo "#define NGDEBUG 1" >>confdefs.h if test "x$GCC" = xyes; then CFLAGS="-g -O1 -Wall -Wextra -Wmissing-prototypes -Wstrict-prototypes -Wnested-externs -Wold-style-definition -Wredundant-decls -Wconversion $ext_CFLAGS" else CFLAGS="-g $ext_CFLAGS" fi fi # the profiling option if test "x$enable_gprof" = xyes; then # Probably other compilers support -pg or something similar; # feel free to extend this to include them. if test "x$GCC" = xyes; then if test "x$enable_shared" = xyes ; then as_fn_error $? "Can't have --enable-gprof without --disable-shared (we recommend also using --enable-all-static)." "$LINENO" 5 fi if test "x$enable_static" != xyes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: We recommend --enable-static with --enable-gprof." >&5 $as_echo "$as_me: WARNING: We recommend --enable-static with --enable-gprof." >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: Enabling gprof profiling data (to gmon.out)." >&5 $as_echo "$as_me: Enabling gprof profiling data (to gmon.out)." >&6;} CFLAGS="$CFLAGS -pg" LDFLAGS="$LDFLAGS -pg" else as_fn_error $? "We only support --enable-gprof with GCC right now." "$LINENO" 5 fi fi # Not sure that this will work.... if test "x$with_checkergcc" = xyes; then CC="checkergcc" fi # Checks for ANSI-C header files. ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in strings.h do : ac_fn_c_check_header_mongrel "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" if test "x$ac_cv_header_strings_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRINGS_H 1 _ACEOF fi done if test "x$enable_ansi" = xyes; then ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc if test "x$am_cv_prog_cc_stdc" != xyes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Failed to find Ansi flag!" >&5 $as_echo "$as_me: WARNING: Failed to find Ansi flag!" >&2;} fi fi if test "x$enable_smoketest" = xyes; then # CFLAGS="$CFLAGS -Werror" CFLAGS="$CFLAGS -pedantic -W -Wmissing-prototypes" CFLAGS="$CFLAGS -Wstrict-prototypes -Wtraditional" CFLAGS="$CFLAGS -Wconversion -Wshadow -Wpointer-arith" CFLAGS="$CFLAGS -Wcast-qual -Wcast-align -Wwrite-strings" CFLAGS="$CFLAGS -Waggregate-return -fshort-enums -fno-common" CFLAGS="$CFLAGS -Wnested-externs -Dinline= -g -O4" fi # Check system we're on , and tune accordingly # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Expand the prefix variable if test "x$prefix" = xNONE ; then # with the MS WINDOWS executable we suggest C:/Spice/bin as *.exe-path if test "x$with_wingui" = xyes; then dprefix="C:/Spice" prefix=$dprefix else dprefix=$ac_default_prefix fi else dprefix=$prefix fi ########################################################################## # # ngspice as shared library (ngspice.so or ngspice.dll) # ########################################################################## if test "x$with_ngshared" != x && test "x$with_ngshared" != xno ; then has_shared_module=true $as_echo "#define SHARED_MODULE 1" >>confdefs.h case $host_os in *mingw* ) has_shwin=true has_no_help=true $as_echo "#define HAS_SHWIN 1" >>confdefs.h ;; *cygwin* ) has_shcyg=true { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi ;; *) CFLAGS="$CFLAGS -fvisibility=hidden" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi ;; esac with_x=no with_windows=no STATIC=-shared TCL_PACKAGE_PATH="" TCL_LIB_SPEC="" ########################################################################## # # tcl libraries test # ########################################################################## # # The tclSpice options # elif test "x$with_tcl" != x && test "x$with_tcl" != xno ; then has_tcl_module=true $as_echo "#define TCL_MODULE 1" >>confdefs.h case $host_os in *mingw* ) has_tclwin=true has_no_help=true $as_echo "#define HAS_TCLWIN 1" >>confdefs.h ;; *cygwin* ) has_tclcyg=true ;; *) ;; esac with_x=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tclConfig.sh" >&5 $as_echo_n "checking for tclConfig.sh... " >&6; } tcl_config_sh="" if test "x$with_tcl" != xyes ; then for dir in \ $with_tcl do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break elif test -r "$dir/unix/tclConfig.sh" ; then tcl_config_sh="$dir/unix/tclConfig.sh" break fi done else for dir in \ $prefix \ $exec_prefix do if test -r "$dir/tclConfig.sh" ; then tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then tcl_config_sh="$dir/lib/tclConfig.sh" break elif test -r "$dir/unix/tclConfig.sh" ; then tcl_config_sh="$dir/unix/tclConfig.sh" break fi done if test "x$tcl_config_sh" = x ; then for dir in \ `ls -dr /usr/local/tcltk/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/local/tcl/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/local/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/share/tcltk/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/share/tcl/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/share/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/lib/tcl/tcl[7-9].[0-9]* 2>/dev/null` \ `ls -dr /usr/lib/tcl[7-9].[0-9]* 2>/dev/null` \ /usr/local/tcl \ /usr/local \ /usr \ /mingw do if test -r "$dir/tclConfig.sh" ; then echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." tcl_config_sh="$dir/tclConfig.sh" break elif test -r "$dir/lib/tclConfig.sh" ; then echo "Automatic research of tclConfig.sh Found one, accepting it and stopping research." tcl_config_sh="$dir/lib/tclConfig.sh" break fi done fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${tcl_config_sh}" >&5 $as_echo "${tcl_config_sh}" >&6; } if test "x$tcl_config_sh" = x ; then echo "can't find Tcl configuration script \"tclConfig.sh\"" find /usr/ -name 'tclConfig.sh' -exec echo "Should you add --with-tcl={} to ./configure arguments?" \; | sed -re "s/\/tclConfig.sh/ /" exit 1 fi . $tcl_config_sh CFLAGS="$CFLAGS $TCL_INCLUDE_SPEC" CPPFLAGS="$CPPFLAGS $TCL_INCLUDE_SPEC" for ac_header in tcl.h blt.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF else as_fn_error $? "Couldn't find Tcl/BLT headers" "$LINENO" 5 fi done if test ! -x "$TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" ; then as_fn_error $? "Couldn't find $TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TCL module BLT" >&5 $as_echo_n "checking for TCL module BLT... " >&6; } rm -f conftest.tcl cat > conftest.tcl << EOF package require BLT; exit; EOF if ($TCL_EXEC_PREFIX/bin/tclsh$TCL_VERSION conftest.tcl; exit) 2>/dev/null then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Found" >&5 $as_echo "Found" >&6; } else as_fn_error $? "Couldn't find BLT" "$LINENO" 5 fi rm -f conftest.tcl { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 $as_echo_n "checking for pthread_create in -lpthread... " >&6; } if ${ac_cv_lib_pthread_pthread_create+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_create (); int main () { return pthread_create (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_pthread_pthread_create=yes else ac_cv_lib_pthread_pthread_create=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 $as_echo "$ac_cv_lib_pthread_pthread_create" >&6; } if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBPTHREAD 1 _ACEOF LIBS="-lpthread $LIBS" fi if test -n "$libdir" ; then echo "libraries in $libdir" fi if test -z "$libdir" ; then for TCL_PACKAGE_PATH_ELEMENT in $TCL_PACKAGE_PATH ; do if test -a "$TCL_PACKAGE_PATH_ELEMENT" ; then libdir=$TCL_PACKAGE_PATH_ELEMENT echo "library in $libdir" break fi done fi STATIC=-shared else TCL_PACKAGE_PATH="" TCL_LIB_SPEC="" STATIC=-static fi if test "x$has_shared_module" = xtrue; then SHARED_MODULE_TRUE= SHARED_MODULE_FALSE='#' else SHARED_MODULE_TRUE='#' SHARED_MODULE_FALSE= fi if test "x$has_shwin" = xtrue; then SHWIN_TRUE= SHWIN_FALSE='#' else SHWIN_TRUE='#' SHWIN_FALSE= fi if test "x$has_shcyg" = xtrue; then SHCYG_TRUE= SHCYG_FALSE='#' else SHCYG_TRUE='#' SHCYG_FALSE= fi if test "x$has_tcl_module" = xtrue; then TCL_MODULE_TRUE= TCL_MODULE_FALSE='#' else TCL_MODULE_TRUE='#' TCL_MODULE_FALSE= fi if test "x$has_tclwin" = xtrue; then TCLWIN_TRUE= TCLWIN_FALSE='#' else TCLWIN_TRUE='#' TCLWIN_FALSE= fi if test "x$has_tclcyg" = xtrue; then TCLCYG_TRUE= TCLCYG_FALSE='#' else TCLCYG_TRUE='#' TCLCYG_FALSE= fi ################################################################## # # #End of tcl libraries test # ################################################################# # Checks for programs enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump enable_dlopen=yes if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ## AM_PROG_LIBTOOL case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: # --with-windows : the user wants to use generate the MS WINDOWS GUI executable # old command version, deprecated, use --with-wingui # Check whether --with-windows was given. if test "${with_windows+set}" = set; then : withval=$with_windows; if test "x$with_windows" = xyes; then $as_echo "#define HAS_WINGUI 1" >>confdefs.h fi else with_windows=no fi # --with-wingui : the user wants to use generate the MS WINDOWS GUI executable { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether windows code with gui is enabled" >&5 $as_echo_n "checking whether windows code with gui is enabled... " >&6; } # Check whether --with-wingui was given. if test "${with_wingui+set}" = set; then : withval=$with_wingui; if test "x$with_wingui" = xyes; then $as_echo "#define HAS_WINGUI 1" >>confdefs.h fi else if test "x$with_windows" = xyes; then with_wingui=yes else with_wingui=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_wingui" >&5 $as_echo "$with_wingui" >&6; } if test "x$with_wingui" = xyes; then WINGUI_TRUE= WINGUI_FALSE='#' else WINGUI_TRUE='#' WINGUI_FALSE= fi case $with_wingui in yes ) $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: No X display!" >&5 $as_echo "No X display!" >&6; } has_no_x=true if test "x$enable_help" = xyes; then has_no_help=false else has_no_help=true fi CFLAGS="$CFLAGS -mwindows" ;; * ) # Check for /proc (virtual process information file system) for ac_header in /proc/meminfo do : ac_fn_c_check_header_mongrel "$LINENO" "/proc/meminfo" "ac_cv_header__proc_meminfo" "$ac_includes_default" if test "x$ac_cv_header__proc_meminfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__PROC_MEMINFO 1 _ACEOF fi done # Checks for X11 header files and libraries - X11 support can be disabled # by passing the '--without-x' option to configure: # Try to locate the X-Windows include files and libraries # will set no_x="yes" or no_x="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi # will set X_CFLAGS, X_LIBS, and might define X_DISPLAY_MISSING if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbsd $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_closedir_void=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { return closedir (opendir (".")) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_closedir_void=no else ac_cv_func_closedir_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 $as_echo "$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h fi for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* if ${ac_cv_func_setvbuf_reversed+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_func_setvbuf_reversed=no fi for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done # Check if the user wants to use the appropriate rpath commands to compile in # the shared library path for the X libraries. This is off by default since # that is how it has been historically. Using --enable-rpath will turn this on _use_rpath=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hardcoding of the X11 runtime library path is desired" >&5 $as_echo_n "checking if hardcoding of the X11 runtime library path is desired... " >&6; } # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; if test "x$enable_rpath" = xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _use_rpath=no else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } _use_rpath=yes fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _use_rpath=no fi if test "x$_use_rpath" = xyes ; then # Try to figure out if we need -Rpath for finding X11 libs # at runtime. Why autoconf doesn't already do this, I don't # know... xlib_path="" for p in $X_LDFLAGS ; do case $p in -L*) xlib_path="$xlib_path $p" ;; esac done _save_LIBS=$LIBS LIBS="$LIBS $X_LDFLAGS" rpath="" for fl in "-Wl,-rpath " "-Wl,--rpath " "-rpath " "--rpath " "-Wl,-R" "-R" "-R " ; do xlib_rpath=`echo $xlib_path | sed "s/-L/$fl/g"` LIBS="$_save_LIBS $X_LIBS $xlib_rpath" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the compiler accepts ${fl}path for runtime libraries" >&5 $as_echo_n "checking if the compiler accepts ${fl}path for runtime libraries... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } rpath=$fl else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test -n "$rpath" && break done if test -n "$rpath"; then X_LDFLAGS="$X_LDFLAGS $xlib_rpath" fi LIBS=$_save_LIBS fi # Checks for X libraries - if X11 wasn't found then don't make following # tests and compile without X11 support - otherwise, check if the following # libraries are present (error if they are not) # In CYGWIN library ordering has to be changed. Is this compatible to LINUX? # XShmAttach is a struct in CYGWIN, not a function # SJB: 13th march 2005 # Library order is giving linker warnings on MacOSX # It's not clear to me which order is required for Cygwin (see comment above) # and neither can I find any authoritative answer for the correct link order # for MacOSX or Linux, but # -lXaw -lXmu -lXt -lXext -lX11 # seems to be the popular choice. # (The previous order was -lX11 -lXt -lXext -lXmu -lXaw) if test "x$no_x" != xyes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXaw" >&5 $as_echo_n "checking for main in -lXaw... " >&6; } if ${ac_cv_lib_Xaw_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXaw $X_LIBS $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xaw_main=yes else ac_cv_lib_Xaw_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xaw_main" >&5 $as_echo "$ac_cv_lib_Xaw_main" >&6; } if test "x$ac_cv_lib_Xaw_main" = xyes; then : X_LIBS="$X_LIBS -lXaw" else as_fn_error $? "Couldn't find Xaw library" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lXmu" >&5 $as_echo_n "checking for main in -lXmu... " >&6; } if ${ac_cv_lib_Xmu_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXmu $X_LIBS $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xmu_main=yes else ac_cv_lib_Xmu_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xmu_main" >&5 $as_echo "$ac_cv_lib_Xmu_main" >&6; } if test "x$ac_cv_lib_Xmu_main" = xyes; then : X_LIBS="$X_LIBS -lXmu" else as_fn_error $? "Couldn't find Xmu library" "$LINENO" 5 fi X_LIBS="$X_LIBS -lXt" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShmAttach in -lXext" >&5 $as_echo_n "checking for XShmAttach in -lXext... " >&6; } if ${ac_cv_lib_Xext_XShmAttach+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $X_LIBS $X_EXTRA_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char XShmAttach (); int main () { return XShmAttach (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xext_XShmAttach=yes else ac_cv_lib_Xext_XShmAttach=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Xext_XShmAttach" >&5 $as_echo "$ac_cv_lib_Xext_XShmAttach" >&6; } if test "x$ac_cv_lib_Xext_XShmAttach" = xyes; then : X_LIBS="$X_LIBS -lXext" else as_fn_error $? "Couldn't find Xext library" "$LINENO" 5 fi X_LIBS="$X_LIBS -lX11" has_no_x=false else $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: No X display!" >&5 $as_echo "No X display!" >&6; } has_no_x=true fi if test "x$enable_help" = xyes && test "x$no_x" != xyes ; then has_no_help=false else has_no_help=true fi ;; esac # end of case --with-windows if test "x$has_no_x" = xtrue; then NO_X_TRUE= NO_X_FALSE='#' else NO_X_TRUE='#' NO_X_FALSE= fi if test "x$has_no_help" = xtrue; then NO_HELP_TRUE= NO_HELP_FALSE='#' else NO_HELP_TRUE='#' NO_HELP_FALSE= fi # Check for a few typdefs: ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF # sighandler_t is the type of the signal handler on GNU variants, # sig_t is the type of a signal handler on 4.4BSD's, # other systems use __sighandler_t. ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "#include #include " if test "x$ac_cv_type_sighandler_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGHANDLER_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "sig_t" "ac_cv_type_sig_t" "#include #include " if test "x$ac_cv_type_sig_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIG_T 1 _ACEOF fi ac_fn_c_check_type "$LINENO" "__sighandler_t" "ac_cv_type___sighandler_t" "#include #include " if test "x$ac_cv_type___sighandler_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE___SIGHANDLER_T 1 _ACEOF fi # Check for a few libraries and headers: ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in unistd.h ctype.h pwd.h fcntl.h sys/ioctl.h stropts.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; } if ${ac_cv_header_stat_broken+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if defined S_ISBLK && defined S_IFDIR extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; #endif #if defined S_ISBLK && defined S_IFCHR extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; #endif #if defined S_ISLNK && defined S_IFREG extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; #endif #if defined S_ISSOCK && defined S_IFREG extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stat_broken=no else ac_cv_header_stat_broken=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 $as_echo "$ac_cv_header_stat_broken" >&6; } if test $ac_cv_header_stat_broken = yes; then $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h fi for ac_header in arpa/inet.h netdb.h netinet/in.h stddef.h sys/file.h sys/param.h sys/socket.h sys/time.h sys/timeb.h sys/io.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check time and resources headers and functions: { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include #include <$ac_cv_struct_tm> " if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_TZNAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif int main () { return tzname[0][0]; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes else ac_cv_var_tzname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 $as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then $as_echo "#define HAVE_TZNAME 1" >>confdefs.h fi fi for ac_func in localtime do : ac_fn_c_check_func "$LINENO" "localtime" "ac_cv_func_localtime" if test "x$ac_cv_func_localtime" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALTIME 1 _ACEOF fi done for ac_func in ftime gettimeofday do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Do not use time or getrusage function for CPU time measurement under OpenMP if test "x$enable_openmp" != xyes; then for ac_func in time getrusage do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi for ac_func in utimes do : ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes" if test "x$ac_cv_func_utimes" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UTIMES 1 _ACEOF fi done for ac_func in getrlimit ulimit do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in endpwent gethostbyname memset select socket strdup strerror strncasecmp strstr strtol do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Look for termios first (posix) for ac_header in termios.h termio.h sgtty.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in isatty tcgetattr tcsetattr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # Check for a few functions: for ac_header in vfork.h do : ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_func in access bcopy bzero qsort dup2 popen do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in strchr index do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in strrchr rindex do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done for ac_func in getcwd getwd do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF break fi done { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking mathematical features of the system:" >&5 $as_echo "Checking mathematical features of the system:" >&6; } # Look for math library: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5 $as_echo_n "checking for sqrt in -lm... " >&6; } if ${ac_cv_lib_m_sqrt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sqrt (); int main () { return sqrt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_sqrt=yes else ac_cv_lib_m_sqrt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_sqrt" >&5 $as_echo "$ac_cv_lib_m_sqrt" >&6; } if test "x$ac_cv_lib_m_sqrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi for ac_header in float.h limits.h values.h ieeefp.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in fftw3.h do : ac_fn_c_check_header_mongrel "$LINENO" "fftw3.h" "ac_cv_header_fftw3_h" "$ac_includes_default" if test "x$ac_cv_header_fftw3_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_FFTW3_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fftw_plan_dft_1d in -lfftw3" >&5 $as_echo_n "checking for fftw_plan_dft_1d in -lfftw3... " >&6; } if ${ac_cv_lib_fftw3_fftw_plan_dft_1d+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfftw3 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fftw_plan_dft_1d (); int main () { return fftw_plan_dft_1d (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_fftw3_fftw_plan_dft_1d=yes else ac_cv_lib_fftw3_fftw_plan_dft_1d=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fftw3_fftw_plan_dft_1d" >&5 $as_echo "$ac_cv_lib_fftw3_fftw_plan_dft_1d" >&6; } if test "x$ac_cv_lib_fftw3_fftw_plan_dft_1d" = xyes; then : $as_echo "#define HAVE_LIBFFTW3 /**/" >>confdefs.h LIBS="$LIBS -lfftw3" fi # Check for a few mathematical functions: for ac_func in erfc logb scalb scalbn asinh acosh atanh finite do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # According POSIX we should look for macros first ac_fn_c_check_decl "$LINENO" "isinf" "ac_cv_have_decl_isinf" "#include " if test "x$ac_cv_have_decl_isinf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISINF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "isnan" "ac_cv_have_decl_isnan" "#include " if test "x$ac_cv_have_decl_isnan" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_ISNAN $ac_have_decl _ACEOF # But may be we have still functions if test "x$ac_cv_have_decl_isinf" != xyes; then ac_fn_c_check_func "$LINENO" "isinf" "ac_cv_func_isinf" if test "x$ac_cv_func_isinf" = xyes; then : fi fi if test "x$ac_cv_have_decl_isnan" != xyes; then ac_fn_c_check_func "$LINENO" "isnan" "ac_cv_func_isnan" if test "x$ac_cv_func_isnan" = xyes; then : fi fi # If user enables garbage collection, look for garbage collector if test "x$TCL_PACKAGE_PATH" = x; then if test "x$enable_gc" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking for the presence of the Garbage Collector:" >&5 $as_echo "Checking for the presence of the Garbage Collector:" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GC_malloc in -lgc" >&5 $as_echo_n "checking for GC_malloc in -lgc... " >&6; } if ${ac_cv_lib_gc_GC_malloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char GC_malloc (); int main () { return GC_malloc (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gc_GC_malloc=yes else ac_cv_lib_gc_GC_malloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gc_GC_malloc" >&5 $as_echo "$ac_cv_lib_gc_GC_malloc" >&6; } if test "x$ac_cv_lib_gc_GC_malloc" = xyes; then : $as_echo "#define HAVE_LIBGC /**/" >>confdefs.h LIBS="$LIBS -lgc" fi fi fi # check, if we have sigsetjmp and siglongjmp. # A trivial AC_CHECK_FUNCS(sigsetjmp) won't do because sigsetjmp() might be a # macro declared in . (joze) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 $as_echo_n "checking for sigsetjmp... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { jmp_buf env; sigsetjmp(env, 1); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_SIGSETJMP /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # A mingw ngspice dll with linking against libiberty.a seems not to be possible. # Because there is a internal replacement for asprintf, and dirmane is not been used anywhere, # just skip it. case $host_os in *mingw* ) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cannot make dll from libiberty.a, no check for headers" >&5 $as_echo "Cannot make dll from libiberty.a, no check for headers" >&6; } ;; * ) # Check for some headers (asprintf, dirname, etc.) for ac_header in libiberty.h libgen.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Check for the asprintf function: for ac_func in asprintf do : ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" if test "x$ac_cv_func_asprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ASPRINTF 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for asprintf in -liberty" >&5 $as_echo_n "checking for asprintf in -liberty... " >&6; } if ${ac_cv_lib_iberty_asprintf+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-liberty $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char asprintf (); int main () { return asprintf (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_iberty_asprintf=yes else ac_cv_lib_iberty_asprintf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iberty_asprintf" >&5 $as_echo "$ac_cv_lib_iberty_asprintf" >&6; } if test "x$ac_cv_lib_iberty_asprintf" = xyes; then : $as_echo "#define HAVE_ASPRINTF 1" >>confdefs.h LIBS="$LIBS -liberty" fi fi done ;; esac # Check for the snprintf function: if test "x$ac_cv_func_asprintf" = xno ; then for ac_func in snprintf do : ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" if test "x$ac_cv_func_snprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SNPRINTF 1 _ACEOF fi done fi # Check for the dirname function: for ac_func in dirname do : ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname" if test "x$ac_cv_func_dirname" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DIRNAME 1 _ACEOF else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5 $as_echo_n "checking for dirname in -lgen... " >&6; } if ${ac_cv_lib_gen_dirname+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgen $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dirname (); int main () { return dirname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gen_dirname=yes else ac_cv_lib_gen_dirname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5 $as_echo "$ac_cv_lib_gen_dirname" >&6; } if test "x$ac_cv_lib_gen_dirname" = xyes; then : $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h LIBS="$LIBS -lgen" fi fi done for ac_header in getopt.h do : ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" if test "x$ac_cv_header_getopt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETOPT_H 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes; then : getopt_long=true fi if test "x$getopt_long" = xtrue; then $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h fi cat >>confdefs.h <<_ACEOF #define NGSPICEBINDIR "`echo $dprefix/bin`" _ACEOF cat >>confdefs.h <<_ACEOF #define NGSPICEDATADIR "`echo $dprefix/share/ngspice`" _ACEOF cat >>confdefs.h <<_ACEOF #define NGSPICEBUILDDATE "`date`" _ACEOF if test "x$with_wingui" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: WINDOWS GUI code enabled" >&5 $as_echo "WINDOWS GUI code enabled" >&6; } for ac_func in memmove do : ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMMOVE 1 _ACEOF fi done fi # Recapitulate settings: { $as_echo "$as_me:${as_lineno-$LINENO}: result: Settings which were chosen:" >&5 $as_echo "Settings which were chosen:" >&6; } if test "x$enable_sense2" = xyes; then $as_echo "#define WANT_SENSE2 /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: Spice2 sensitivity analysis enabled" >&5 $as_echo "Spice2 sensitivity analysis enabled" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This feature is UNSUPPORTED" >&5 $as_echo "$as_me: WARNING: This feature is UNSUPPORTED" >&2;} fi if test "x$enable_nobypass" = xyes; then $as_echo "#define NOBYPASS /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: NOBYPASS option enabled" >&5 $as_echo "NOBYPASS option enabled" >&6; } fi if test "x$enable_capbypass" = xyes; then $as_echo "#define CAPBYPASS /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: CAPBYPASS option enabled" >&5 $as_echo "CAPBYPASS option enabled" >&6; } fi if test "x$enable_nodelimiting" = xyes; then $as_echo "#define NODELIMITING /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: NODELIMITING option enabled" >&5 $as_echo "NODELIMITING option enabled" >&6; } fi if test "x$enable_predictor" = xyes; then $as_echo "#define PREDICTOR /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: PREDICTOR algorithm enabled" >&5 $as_echo "PREDICTOR algorithm enabled" >&6; } fi if test "x$enable_newpred" = xyes; then $as_echo "#define NEWPRED /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: NEWPRED enabled" >&5 $as_echo "NEWPRED enabled" >&6; } fi if test "x$enable_newtrunc" = xyes; then $as_echo "#define NEWTRUNC /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: New truncation error calculation enabled" >&5 $as_echo "New truncation error calculation enabled" >&6; } fi if test "x$enable_experimental" = xyes; then $as_echo "#define EXPERIMENTAL_CODE /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: EXPERIMENTAL_CODE enabled" >&5 $as_echo "EXPERIMENTAL_CODE enabled" >&6; } fi if test "x$enable_cpdebug" = xyes; then $as_echo "#define CPDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Shell debug is enabled" >&5 $as_echo "WARNING: Shell debug is enabled" >&6; } fi if test "x$enable_ftedebug" = xyes; then $as_echo "#define FTEDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Frontend debug is enabled" >&5 $as_echo "WARNING: Frontend debug is enabled" >&6; } fi if test "x$enable_sensdebug" = xyes; then $as_echo "#define SENSDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Sensitivity code debug *SENSDEBUG* is enabled" >&5 $as_echo "WARNING: Sensitivity code debug *SENSDEBUG* is enabled" >&6; } fi if test "x$enable_asdebug" = xyes; then $as_echo "#define ASDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Sensitivity code debug *ASDEBUG* is enabled" >&5 $as_echo "WARNING: Sensitivity code debug *ASDEBUG* is enabled" >&6; } fi if test "x$enable_stepdebug" = xyes; then $as_echo "#define STEPDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: STEPDEBUG debug is enabled" >&5 $as_echo "WARNING: STEPDEBUG debug is enabled" >&6; } fi if test "x$enable_pzdebug" = xyes; then $as_echo "#define PZDEBUG /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Pole/Zero analysis debug is enabled" >&5 $as_echo "WARNING: Pole/Zero analysis debug is enabled" >&6; } fi if test "x$enable_pss" = xyes; then $as_echo "#define WITH_PSS /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: PSS analysis enabled" >&5 $as_echo "WARNING: PSS analysis enabled" >&6; } fi if test "x$enable_blktmsdebug" = xyes; then $as_echo "#define D_DBG_BLOCKTIMES /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled" >&5 $as_echo "WARNING: Distortion analysis debug *D_DBG_BLOCKTIMES* is enabled" >&6; } fi if test "x$enable_smltmsdebug" = xyes; then $as_echo "#define D_DBG_SMALLTIMES /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Distortion analysis debug *D_DBG_SMALLTIMES* is enabled" >&5 $as_echo "WARNING: Distortion analysis debug *D_DBG_SMALLTIMES* is enabled" >&6; } fi if test "x$enable_xgraph" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Xgraph compilation enabled." >&5 $as_echo "Xgraph compilation enabled." >&6; } subdirs="$subdirs xgraph" XGRAPHDIR="xgraph" NOTXGRAPH="" else XGRAPHDIR="" NOTXGRAPH="xgraph" fi for ac_prog in 'bison -y' byacc yacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done ################# XSPICE ################################################## # Add new code models to the build by pointing to them here. if test "x$enable_xspice" = xyes; then if test -z "${YACC}" ; then as_fn_error $? "XSPICE build requires bison, byacc or yacc parser generator" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: X-Spice features included" >&5 $as_echo "X-Spice features included" >&6; } $as_echo "#define XSPICE 1" >>confdefs.h # Define variables for LEX for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done if test -z "$LEX" ; then as_fn_error $? "Flex is required for building XSPICE" "$LINENO" 5 fi case $host_os in *mingw* ) $as_echo "#define IPC_DEBUG_VIA_STDIO 1" >>confdefs.h XSPICEDLLIBS="" ;; *cygwin* ) $as_echo "#define IPC_UNIX_SOCKETS 1" >>confdefs.h XSPICEDLLIBS="" ;; *freebsd* ) $as_echo "#define IPC_UNIX_SOCKETS 1" >>confdefs.h XSPICEDLLIBS="" ;; *openbsd* ) $as_echo "#define IPC_UNIX_SOCKETS 1" >>confdefs.h XSPICEDLLIBS="" ;; * ) $as_echo "#define IPC_UNIX_SOCKETS 1" >>confdefs.h XSPICEDLLIBS="-ldl" ;; esac XSPICEINIT="" for ac_func in modf do : ac_fn_c_check_func "$LINENO" "modf" "ac_cv_func_modf" if test "x$ac_cv_func_modf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MODF 1 _ACEOF fi done for ac_header in libintl.h malloc.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done else XSPICEINIT="*" if test -z "${YACC}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No bison, byacc, yacc found: Uses prebuilt default parsers" >&5 $as_echo "$as_me: WARNING: No bison, byacc, yacc found: Uses prebuilt default parsers" >&2;} fi fi if test "x$enable_xspice" = xyes; then XSPICE_WANTED_TRUE= XSPICE_WANTED_FALSE='#' else XSPICE_WANTED_TRUE='#' XSPICE_WANTED_FALSE= fi # Add CIDER enhancements to ngspice. if test "x$enable_cider" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: CIDER features enabled" >&5 $as_echo "CIDER features enabled" >&6; } $as_echo "#define CIDER 1" >>confdefs.h fi if test "x$enable_cider" = xyes; then CIDER_WANTED_TRUE= CIDER_WANTED_FALSE='#' else CIDER_WANTED_TRUE='#' CIDER_WANTED_FALSE= fi if test "x$enable_cider" = xyes; then NUMDEV_WANTED_TRUE= NUMDEV_WANTED_FALSE='#' else NUMDEV_WANTED_TRUE='#' NUMDEV_WANTED_FALSE= fi if test "x$enable_pss" = xyes; then PSS_WANTED_TRUE= PSS_WANTED_FALSE='#' else PSS_WANTED_TRUE='#' PSS_WANTED_FALSE= fi if test "x$enable_sense2" = xyes; then SENSE2_WANTED_TRUE= SENSE2_WANTED_FALSE='#' else SENSE2_WANTED_TRUE='#' SENSE2_WANTED_FALSE= fi # adms option if test "x$enable_adms" = xyes ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: ********************************** * ADMS support is experimental * **********************************" >&5 $as_echo "********************************** * ADMS support is experimental * **********************************" >&6; } for ac_prog in admsXml admsXml.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ADMSXML+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ADMSXML"; then ac_cv_prog_ADMSXML="$ADMSXML" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ADMSXML="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ADMSXML=$ac_cv_prog_ADMSXML if test -n "$ADMSXML"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ADMSXML" >&5 $as_echo "$ADMSXML" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ADMSXML" && break done test -n "$ADMSXML" || ADMSXML="no" if test "x$ADMSXML" = xno; then as_fn_error $? "If you want Verilog-A models you should install admsXml" "$LINENO" 5 fi $as_echo "#define ADMS 1" >>confdefs.h VLADEVDIR=" adms/ekv \ adms/hicum0 \ adms/hicum2 \ adms/mextram \ adms/psp102 " # The makefiles for adms (to be added to AC_CONFIG_FILES by ./autogen.sh --adms) #VLAMKF src/spicelib/devices/adms/ekv/Makefile #VLAMKF src/spicelib/devices/adms/hicum0/Makefile #VLAMKF src/spicelib/devices/adms/hicum2/Makefile #VLAMKF src/spicelib/devices/adms/mextram/Makefile #VLAMKF src/spicelib/devices/adms/psp102/Makefile NOTVLADEVDIR="" VLADEV=" spicelib/devices/adms/ekv/libekv.la \ spicelib/devices/adms/hicum0/libhicum0.la \ spicelib/devices/adms/hicum2/libhicum2.la \ spicelib/devices/adms/mextram/libbjt504t.la \ spicelib/devices/adms/psp102/libpsp102.la " else VLADEVDIR="" NOTVLADEVDIR="adms" fi # NDEV option if test "x$enable_ndev" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: NDEV features enabled" >&5 $as_echo "NDEV features enabled" >&6; } $as_echo "#define NDEV /**/" >>confdefs.h fi if test "x$enable_ndev" = xyes; then NDEV_WANTED_TRUE= NDEV_WANTED_FALSE='#' else NDEV_WANTED_TRUE='#' NDEV_WANTED_FALSE= fi # Cluster option if test "x$enable_cluster" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Cluster version is being compiled" >&5 $as_echo "Cluster version is being compiled" >&6; } $as_echo "#define CLUSTER /**/" >>confdefs.h LIBS="$LIBS -lpthread" fi if test "x$enable_expdevices" = xyes; then $as_echo "#define EXP_DEV /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: WARNING: Experimental devices enabled" >&5 $as_echo "WARNING: Experimental devices enabled" >&6; } fi # ---- Option to include GNU readline support in ngspice CLI ---- # ---- Default: disabled. ---- # ---- Hope to see in the future readline replacement. ---- if test "x$with_readline" != xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: GNU readline disabled." >&5 $as_echo "GNU readline disabled." >&6; } else if test "x$with_tcl" = x || test "x$with_tcl" = xno ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking for readline:" >&5 $as_echo "Checking for readline:" >&6; } for ac_header in readline/readline.h readline/history.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF $as_echo "#define HAVE_GNUREADLINE /**/" >>confdefs.h else as_fn_error $? "Couldn't find GNU readline headers." "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tputs (); int main () { return tputs (); ; return 0; } _ACEOF for ac_lib in '' ncurses termcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_tputs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_tputs+:} false; then : break fi done if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 $as_echo "$ac_cv_search_tputs" >&6; } ac_res=$ac_cv_search_tputs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_TERMCAP /**/" >>confdefs.h else as_fn_error $? "Found neither ncurses or termcap" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lreadline $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_readline_readline=yes else ac_cv_lib_readline_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } if test "x$ac_cv_lib_readline_readline" = xyes; then : LIBS="$LIBS -lreadline" else as_fn_error $? "Couldn't find readline libraries." "$LINENO" 5 fi fi fi # ---- Option to include BSD editline support in ngspice CLI ---- # ---- Default: disabled. ---- if test "x$with_editline" != xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: BSD editline disabled." >&5 $as_echo "BSD editline disabled." >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: Checking for editline:" >&5 $as_echo "Checking for editline:" >&6; } for ac_header in editline/readline.h do : ac_fn_c_check_header_mongrel "$LINENO" "editline/readline.h" "ac_cv_header_editline_readline_h" "$ac_includes_default" if test "x$ac_cv_header_editline_readline_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_EDITLINE_READLINE_H 1 _ACEOF $as_echo "#define HAVE_BSDEDITLINE 1" >>confdefs.h else as_fn_error $? "Couldn't find BSD editline headers." "$LINENO" 5 fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tputs" >&5 $as_echo_n "checking for library containing tputs... " >&6; } if ${ac_cv_search_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char tputs (); int main () { return tputs (); ; return 0; } _ACEOF for ac_lib in '' ncurses termcap; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_tputs=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_tputs+:} false; then : break fi done if ${ac_cv_search_tputs+:} false; then : else ac_cv_search_tputs=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tputs" >&5 $as_echo "$ac_cv_search_tputs" >&6; } ac_res=$ac_cv_search_tputs if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "#define HAVE_TERMCAP /**/" >>confdefs.h else as_fn_error $? "Found neither ncurses or termcap" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -ledit" >&5 $as_echo_n "checking for readline in -ledit... " >&6; } if ${ac_cv_lib_edit_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ledit -lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char readline (); int main () { return readline (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_edit_readline=yes else ac_cv_lib_edit_readline=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_readline" >&5 $as_echo "$ac_cv_lib_edit_readline" >&6; } if test "x$ac_cv_lib_edit_readline" = xyes; then : LIBS="$LIBS -ledit" else as_fn_error $? "Couldn't find editline libraries." "$LINENO" 5 fi fi # Use AC_CHECK_HEADERS so the HAVE_*_H symbol gets defined for ac_header in ncurses/termcap.h termcap.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # --enable-openmp: Use OpenMP on multi-core processors # Check whether --enable-openmp was given. if test "${enable_openmp+set}" = set; then : enableval=$enable_openmp; fi # Add OpenMP to ngspice. : ${enable_openmp:=no} OPENMP_CFLAGS= # Check whether --enable-openmp was given. if test "${enable_openmp+set}" = set; then : enableval=$enable_openmp; fi if test "$enable_openmp" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to support OpenMP" >&5 $as_echo_n "checking for $CC option to support OpenMP... " >&6; } if ${ac_cv_prog_c_openmp+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _OPENMP choke me #endif #include int main () { return omp_get_num_threads (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_c_openmp='none needed' else ac_cv_prog_c_openmp='unsupported' for ac_option in -fopenmp -xopenmp -openmp -mp -omp -qsmp=omp -homp \ -Popenmp --openmp; do ac_save_CFLAGS=$CFLAGS CFLAGS="$CFLAGS $ac_option" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _OPENMP choke me #endif #include int main () { return omp_get_num_threads (); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_c_openmp=$ac_option fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$ac_save_CFLAGS if test "$ac_cv_prog_c_openmp" != unsupported; then break fi done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_c_openmp" >&5 $as_echo "$ac_cv_prog_c_openmp" >&6; } case $ac_cv_prog_c_openmp in #( "none needed" | unsupported) ;; #( *) OPENMP_CFLAGS=$ac_cv_prog_c_openmp ;; esac fi if test "x$enable_openmp" = xyes; then $as_echo "#define USE_OMP 1" >>confdefs.h CFLAGS="$CFLAGS $OPENMP_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: OpenMP feature enabled" >&5 $as_echo "OpenMP feature enabled" >&6; } fi # Output Files # ------------ ac_config_files="$ac_config_files Makefile man/Makefile man/man1/Makefile src/Makefile src/spicelib/Makefile src/spicelib/analysis/Makefile src/spicelib/devices/Makefile src/spicelib/devices/asrc/Makefile src/spicelib/devices/bjt/Makefile src/spicelib/devices/bsim1/Makefile src/spicelib/devices/bsim2/Makefile src/spicelib/devices/bsim3/Makefile src/spicelib/devices/bsim3v0/Makefile src/spicelib/devices/bsim3v1/Makefile src/spicelib/devices/bsim3v32/Makefile src/spicelib/devices/bsim4/Makefile src/spicelib/devices/bsim4v4/Makefile src/spicelib/devices/bsim4v5/Makefile src/spicelib/devices/bsim4v6/Makefile src/spicelib/devices/bsim3soi_pd/Makefile src/spicelib/devices/bsim3soi_fd/Makefile src/spicelib/devices/bsim3soi_dd/Makefile src/spicelib/devices/bsimsoi/Makefile src/spicelib/devices/cap/Makefile src/spicelib/devices/cccs/Makefile src/spicelib/devices/ccvs/Makefile src/spicelib/devices/csw/Makefile src/spicelib/devices/cpl/Makefile src/spicelib/devices/dio/Makefile src/spicelib/devices/ind/Makefile src/spicelib/devices/isrc/Makefile src/spicelib/devices/hfet1/Makefile src/spicelib/devices/hfet2/Makefile src/spicelib/devices/hisim2/Makefile src/spicelib/devices/hisimhv1/Makefile src/spicelib/devices/jfet/Makefile src/spicelib/devices/jfet2/Makefile src/spicelib/devices/ltra/Makefile src/spicelib/devices/mes/Makefile src/spicelib/devices/mesa/Makefile src/spicelib/devices/mos1/Makefile src/spicelib/devices/mos2/Makefile src/spicelib/devices/mos3/Makefile src/spicelib/devices/mos6/Makefile src/spicelib/devices/mos9/Makefile src/spicelib/devices/ndev/Makefile src/spicelib/devices/res/Makefile src/spicelib/devices/soi3/Makefile src/spicelib/devices/sw/Makefile src/spicelib/devices/tra/Makefile src/spicelib/devices/txl/Makefile src/spicelib/devices/urc/Makefile src/spicelib/devices/vbic/Makefile src/spicelib/devices/vccs/Makefile src/spicelib/devices/vcvs/Makefile src/spicelib/devices/vsrc/Makefile src/spicelib/devices/nbjt/Makefile src/spicelib/devices/nbjt2/Makefile src/spicelib/devices/numd/Makefile src/spicelib/devices/numd2/Makefile src/spicelib/devices/numos/Makefile src/spicelib/parser/Makefile src/ciderlib/Makefile src/ciderlib/input/Makefile src/ciderlib/support/Makefile src/ciderlib/oned/Makefile src/ciderlib/twod/Makefile src/frontend/Makefile src/frontend/numparam/Makefile src/frontend/help/Makefile src/frontend/parser/Makefile src/frontend/plotting/Makefile src/frontend/trannoise/Makefile src/frontend/wdisp/Makefile src/include/ngspice/Makefile src/maths/Makefile src/maths/cmaths/Makefile src/maths/fft/Makefile src/maths/misc/Makefile src/maths/ni/Makefile src/maths/deriv/Makefile src/maths/poly/Makefile src/maths/sparse/Makefile src/misc/Makefile src/xspice/Makefile src/xspice/cm/Makefile src/xspice/cmpp/Makefile src/xspice/icm/makedefs src/xspice/icm/GNUmakefile src/xspice/mif/Makefile src/xspice/evt/Makefile src/xspice/enh/Makefile src/xspice/ipc/Makefile src/xspice/idn/Makefile src/unsupported/Makefile tests/Makefile tests/bsim1/Makefile tests/bsim2/Makefile tests/bsim3/Makefile tests/bsim3/ac_sim/Makefile tests/bsim3/dc_sim/Makefile tests/bsim3/tran_sim/Makefile tests/bsim3soidd/Makefile tests/bsim3soifd/Makefile tests/bsim3soipd/Makefile tests/bsim4/Makefile tests/bsimsoi/Makefile tests/filters/Makefile tests/general/Makefile tests/hfet/Makefile tests/hisim/Makefile tests/hisimhv1/Makefile tests/jfet/Makefile tests/mes/Makefile tests/mesa/Makefile tests/mos6/Makefile tests/polezero/Makefile tests/regression/Makefile tests/regression/subckt-processing/Makefile tests/regression/lib-processing/Makefile tests/regression/parser/Makefile tests/sensitivity/Makefile tests/transient/Makefile tests/transmission/Makefile tests/xspice/Makefile tests/xspice/digital/Makefile tests/xspice/digital/spinit tests/resistance/Makefile tests/vbic/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SHARED_MODULE_TRUE}" && test -z "${SHARED_MODULE_FALSE}"; then as_fn_error $? "conditional \"SHARED_MODULE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SHWIN_TRUE}" && test -z "${SHWIN_FALSE}"; then as_fn_error $? "conditional \"SHWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SHCYG_TRUE}" && test -z "${SHCYG_FALSE}"; then as_fn_error $? "conditional \"SHCYG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TCL_MODULE_TRUE}" && test -z "${TCL_MODULE_FALSE}"; then as_fn_error $? "conditional \"TCL_MODULE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TCLWIN_TRUE}" && test -z "${TCLWIN_FALSE}"; then as_fn_error $? "conditional \"TCLWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${TCLCYG_TRUE}" && test -z "${TCLCYG_FALSE}"; then as_fn_error $? "conditional \"TCLCYG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WINGUI_TRUE}" && test -z "${WINGUI_FALSE}"; then as_fn_error $? "conditional \"WINGUI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_X_TRUE}" && test -z "${NO_X_FALSE}"; then as_fn_error $? "conditional \"NO_X\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NO_HELP_TRUE}" && test -z "${NO_HELP_FALSE}"; then as_fn_error $? "conditional \"NO_HELP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${XSPICE_WANTED_TRUE}" && test -z "${XSPICE_WANTED_FALSE}"; then as_fn_error $? "conditional \"XSPICE_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CIDER_WANTED_TRUE}" && test -z "${CIDER_WANTED_FALSE}"; then as_fn_error $? "conditional \"CIDER_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NUMDEV_WANTED_TRUE}" && test -z "${NUMDEV_WANTED_FALSE}"; then as_fn_error $? "conditional \"NUMDEV_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PSS_WANTED_TRUE}" && test -z "${PSS_WANTED_FALSE}"; then as_fn_error $? "conditional \"PSS_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SENSE2_WANTED_TRUE}" && test -z "${SENSE2_WANTED_FALSE}"; then as_fn_error $? "conditional \"SENSE2_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${NDEV_WANTED_TRUE}" && test -z "${NDEV_WANTED_FALSE}"; then as_fn_error $? "conditional \"NDEV_WANTED\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by ngspice $as_me 26, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ ngspice config.status 26 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/include/ngspice/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/ngspice/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/man1/Makefile") CONFIG_FILES="$CONFIG_FILES man/man1/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "src/spicelib/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/Makefile" ;; "src/spicelib/analysis/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/analysis/Makefile" ;; "src/spicelib/devices/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/Makefile" ;; "src/spicelib/devices/asrc/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/asrc/Makefile" ;; "src/spicelib/devices/bjt/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bjt/Makefile" ;; "src/spicelib/devices/bsim1/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim1/Makefile" ;; "src/spicelib/devices/bsim2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim2/Makefile" ;; "src/spicelib/devices/bsim3/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3/Makefile" ;; "src/spicelib/devices/bsim3v0/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3v0/Makefile" ;; "src/spicelib/devices/bsim3v1/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3v1/Makefile" ;; "src/spicelib/devices/bsim3v32/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3v32/Makefile" ;; "src/spicelib/devices/bsim4/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim4/Makefile" ;; "src/spicelib/devices/bsim4v4/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim4v4/Makefile" ;; "src/spicelib/devices/bsim4v5/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim4v5/Makefile" ;; "src/spicelib/devices/bsim4v6/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim4v6/Makefile" ;; "src/spicelib/devices/bsim3soi_pd/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3soi_pd/Makefile" ;; "src/spicelib/devices/bsim3soi_fd/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3soi_fd/Makefile" ;; "src/spicelib/devices/bsim3soi_dd/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsim3soi_dd/Makefile" ;; "src/spicelib/devices/bsimsoi/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/bsimsoi/Makefile" ;; "src/spicelib/devices/cap/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/cap/Makefile" ;; "src/spicelib/devices/cccs/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/cccs/Makefile" ;; "src/spicelib/devices/ccvs/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/ccvs/Makefile" ;; "src/spicelib/devices/csw/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/csw/Makefile" ;; "src/spicelib/devices/cpl/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/cpl/Makefile" ;; "src/spicelib/devices/dio/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/dio/Makefile" ;; "src/spicelib/devices/ind/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/ind/Makefile" ;; "src/spicelib/devices/isrc/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/isrc/Makefile" ;; "src/spicelib/devices/hfet1/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/hfet1/Makefile" ;; "src/spicelib/devices/hfet2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/hfet2/Makefile" ;; "src/spicelib/devices/hisim2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/hisim2/Makefile" ;; "src/spicelib/devices/hisimhv1/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/hisimhv1/Makefile" ;; "src/spicelib/devices/jfet/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/jfet/Makefile" ;; "src/spicelib/devices/jfet2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/jfet2/Makefile" ;; "src/spicelib/devices/ltra/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/ltra/Makefile" ;; "src/spicelib/devices/mes/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mes/Makefile" ;; "src/spicelib/devices/mesa/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mesa/Makefile" ;; "src/spicelib/devices/mos1/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mos1/Makefile" ;; "src/spicelib/devices/mos2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mos2/Makefile" ;; "src/spicelib/devices/mos3/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mos3/Makefile" ;; "src/spicelib/devices/mos6/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mos6/Makefile" ;; "src/spicelib/devices/mos9/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/mos9/Makefile" ;; "src/spicelib/devices/ndev/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/ndev/Makefile" ;; "src/spicelib/devices/res/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/res/Makefile" ;; "src/spicelib/devices/soi3/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/soi3/Makefile" ;; "src/spicelib/devices/sw/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/sw/Makefile" ;; "src/spicelib/devices/tra/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/tra/Makefile" ;; "src/spicelib/devices/txl/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/txl/Makefile" ;; "src/spicelib/devices/urc/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/urc/Makefile" ;; "src/spicelib/devices/vbic/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/vbic/Makefile" ;; "src/spicelib/devices/vccs/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/vccs/Makefile" ;; "src/spicelib/devices/vcvs/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/vcvs/Makefile" ;; "src/spicelib/devices/vsrc/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/vsrc/Makefile" ;; "src/spicelib/devices/nbjt/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/nbjt/Makefile" ;; "src/spicelib/devices/nbjt2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/nbjt2/Makefile" ;; "src/spicelib/devices/numd/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/numd/Makefile" ;; "src/spicelib/devices/numd2/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/numd2/Makefile" ;; "src/spicelib/devices/numos/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/devices/numos/Makefile" ;; "src/spicelib/parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/spicelib/parser/Makefile" ;; "src/ciderlib/Makefile") CONFIG_FILES="$CONFIG_FILES src/ciderlib/Makefile" ;; "src/ciderlib/input/Makefile") CONFIG_FILES="$CONFIG_FILES src/ciderlib/input/Makefile" ;; "src/ciderlib/support/Makefile") CONFIG_FILES="$CONFIG_FILES src/ciderlib/support/Makefile" ;; "src/ciderlib/oned/Makefile") CONFIG_FILES="$CONFIG_FILES src/ciderlib/oned/Makefile" ;; "src/ciderlib/twod/Makefile") CONFIG_FILES="$CONFIG_FILES src/ciderlib/twod/Makefile" ;; "src/frontend/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/Makefile" ;; "src/frontend/numparam/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/numparam/Makefile" ;; "src/frontend/help/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/help/Makefile" ;; "src/frontend/parser/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/parser/Makefile" ;; "src/frontend/plotting/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/plotting/Makefile" ;; "src/frontend/trannoise/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/trannoise/Makefile" ;; "src/frontend/wdisp/Makefile") CONFIG_FILES="$CONFIG_FILES src/frontend/wdisp/Makefile" ;; "src/include/ngspice/Makefile") CONFIG_FILES="$CONFIG_FILES src/include/ngspice/Makefile" ;; "src/maths/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/Makefile" ;; "src/maths/cmaths/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/cmaths/Makefile" ;; "src/maths/fft/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/fft/Makefile" ;; "src/maths/misc/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/misc/Makefile" ;; "src/maths/ni/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/ni/Makefile" ;; "src/maths/deriv/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/deriv/Makefile" ;; "src/maths/poly/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/poly/Makefile" ;; "src/maths/sparse/Makefile") CONFIG_FILES="$CONFIG_FILES src/maths/sparse/Makefile" ;; "src/misc/Makefile") CONFIG_FILES="$CONFIG_FILES src/misc/Makefile" ;; "src/xspice/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/Makefile" ;; "src/xspice/cm/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/cm/Makefile" ;; "src/xspice/cmpp/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/cmpp/Makefile" ;; "src/xspice/icm/makedefs") CONFIG_FILES="$CONFIG_FILES src/xspice/icm/makedefs" ;; "src/xspice/icm/GNUmakefile") CONFIG_FILES="$CONFIG_FILES src/xspice/icm/GNUmakefile" ;; "src/xspice/mif/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/mif/Makefile" ;; "src/xspice/evt/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/evt/Makefile" ;; "src/xspice/enh/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/enh/Makefile" ;; "src/xspice/ipc/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/ipc/Makefile" ;; "src/xspice/idn/Makefile") CONFIG_FILES="$CONFIG_FILES src/xspice/idn/Makefile" ;; "src/unsupported/Makefile") CONFIG_FILES="$CONFIG_FILES src/unsupported/Makefile" ;; "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; "tests/bsim1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim1/Makefile" ;; "tests/bsim2/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim2/Makefile" ;; "tests/bsim3/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3/Makefile" ;; "tests/bsim3/ac_sim/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3/ac_sim/Makefile" ;; "tests/bsim3/dc_sim/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3/dc_sim/Makefile" ;; "tests/bsim3/tran_sim/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3/tran_sim/Makefile" ;; "tests/bsim3soidd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3soidd/Makefile" ;; "tests/bsim3soifd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3soifd/Makefile" ;; "tests/bsim3soipd/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim3soipd/Makefile" ;; "tests/bsim4/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsim4/Makefile" ;; "tests/bsimsoi/Makefile") CONFIG_FILES="$CONFIG_FILES tests/bsimsoi/Makefile" ;; "tests/filters/Makefile") CONFIG_FILES="$CONFIG_FILES tests/filters/Makefile" ;; "tests/general/Makefile") CONFIG_FILES="$CONFIG_FILES tests/general/Makefile" ;; "tests/hfet/Makefile") CONFIG_FILES="$CONFIG_FILES tests/hfet/Makefile" ;; "tests/hisim/Makefile") CONFIG_FILES="$CONFIG_FILES tests/hisim/Makefile" ;; "tests/hisimhv1/Makefile") CONFIG_FILES="$CONFIG_FILES tests/hisimhv1/Makefile" ;; "tests/jfet/Makefile") CONFIG_FILES="$CONFIG_FILES tests/jfet/Makefile" ;; "tests/mes/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mes/Makefile" ;; "tests/mesa/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mesa/Makefile" ;; "tests/mos6/Makefile") CONFIG_FILES="$CONFIG_FILES tests/mos6/Makefile" ;; "tests/polezero/Makefile") CONFIG_FILES="$CONFIG_FILES tests/polezero/Makefile" ;; "tests/regression/Makefile") CONFIG_FILES="$CONFIG_FILES tests/regression/Makefile" ;; "tests/regression/subckt-processing/Makefile") CONFIG_FILES="$CONFIG_FILES tests/regression/subckt-processing/Makefile" ;; "tests/regression/lib-processing/Makefile") CONFIG_FILES="$CONFIG_FILES tests/regression/lib-processing/Makefile" ;; "tests/regression/parser/Makefile") CONFIG_FILES="$CONFIG_FILES tests/regression/parser/Makefile" ;; "tests/sensitivity/Makefile") CONFIG_FILES="$CONFIG_FILES tests/sensitivity/Makefile" ;; "tests/transient/Makefile") CONFIG_FILES="$CONFIG_FILES tests/transient/Makefile" ;; "tests/transmission/Makefile") CONFIG_FILES="$CONFIG_FILES tests/transmission/Makefile" ;; "tests/xspice/Makefile") CONFIG_FILES="$CONFIG_FILES tests/xspice/Makefile" ;; "tests/xspice/digital/Makefile") CONFIG_FILES="$CONFIG_FILES tests/xspice/digital/Makefile" ;; "tests/xspice/digital/spinit") CONFIG_FILES="$CONFIG_FILES tests/xspice/digital/spinit" ;; "tests/resistance/Makefile") CONFIG_FILES="$CONFIG_FILES tests/resistance/Makefile" ;; "tests/vbic/Makefile") CONFIG_FILES="$CONFIG_FILES tests/vbic/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi # # CONFIG_SUBDIRS section. # if test "$no_recursion" != yes; then # Remove --cache-file, --srcdir, and --disable-option-checking arguments # so they do not pile up. ac_sub_configure_args= ac_prev= eval "set x $ac_configure_args" shift for ac_arg do if test -n "$ac_prev"; then ac_prev= continue fi case $ac_arg in -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ | --c=*) ;; --config-cache | -C) ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) ;; --disable-option-checking) ;; *) case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_sub_configure_args " '$ac_arg'" ;; esac done # Always prepend --prefix to ensure using the same prefix # in subdir configurations. ac_arg="--prefix=$prefix" case $ac_arg in *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" # Pass --silent if test "$silent" = yes; then ac_sub_configure_args="--silent $ac_sub_configure_args" fi # Always prepend --disable-option-checking to silence warnings, since # different subdirs can have different --enable and --with options. ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" ac_popdir=`pwd` for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue # Do not complain, so a configure script can configure whichever # parts of a large source tree are present. test -d "$srcdir/$ac_dir" || continue ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 $as_echo "$ac_msg" >&6 as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" # Check for guested configure; otherwise get Cygnus style configure. if test -f "$ac_srcdir/configure.gnu"; then ac_sub_configure=$ac_srcdir/configure.gnu elif test -f "$ac_srcdir/configure"; then ac_sub_configure=$ac_srcdir/configure elif test -f "$ac_srcdir/configure.in"; then # This should be Cygnus configure. ac_sub_configure=$ac_aux_dir/configure else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} ac_sub_configure= fi # The recursion is here. if test -n "$ac_sub_configure"; then # Make the cache file name correct relative to the subdirectory. case $cache_file in [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; *) # Relative name. ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} # The eval makes quoting arguments work. eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 fi cd "$ac_popdir" done fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ngspice-26/README.tcl0000644000265600020320000001140312264261473013671 0ustar andreasadmin********************************************************************************* *Copied and written by Stefan Jones (stefan.jones@multigig.com) at Multigig Ltd * *Code based on and copied from ScriptEDA * *(http://embedded.eecs.berkeley.edu/Alumni/pinhong/scriptEDA/) * *Copyright (C) 2001 Author Pinhong Chen * * * *This program is free software; you can redistribute it and/or * *modify it under the terms of the GNU Lesser General Public License * *as published by the Free Software Foundation; either version 2 * *of the License, or (at your option) any later version. * * * *This program is distributed in the hope that it will be useful, * *but WITHOUT ANY WARRANTY; without even the implied warranty of * *MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * *GNU Lesser General Public License for more details. * * * *You should have received a copy of the GNU Lesser General Public License * *along with this program; if not, write to the Free Software * *Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.* ********************************************************************************* WARNING! The text in this document has been prepared in 2006 and is partially outdated. It is provided here only for reference and may provide some (historical) information. Welcome to tclspice README_tcl This file acompanies ngspice sources starting with ngspice-rework-18. It describes what tclspice is, its installation, and points to resources that will help you to start with it. It also contains usefull datas to keep informed, get help, or get involved in the project. Enjoy Lionel (saintel@users.sourceforge.net) What is tclspice: tclspice is a variant of ngspice. It share 95% of its code (approx). The different between plain NGspice and tclspice is the type of binary it produces, and the way to access it. NGspice is a standalone program that you can execute and which can either automatically process a spice directives script. It can also propose you a command line interface. tclspice is a tcl package name. It is based on libspice shared library. This library is specifically designed to be loaded in tcl interpreters such as tclsh or wish. Then all spice directives are available as tcl functions. libspice also feature some new commands that are usefull for the integration into the tcl environment. tclspice differs from ngspice by its printf (bundled to tcl printf), malloc (tcl malloc), data handling and plotting (BLT toolkit extensions to tcl/tk). Installing: Tclspice relies on three packages that are not included in ngspice: tcl : the tcl command interpreter, for interpretion of user scipt tk : the graphical extension of tcl, to represent data graphically and for GUIs blt : BLT toolkit gives number handling and plotting features to tcl/tk The most tested configuration is the latest: tclspice-26 tcl 8.4 tk 8.4 blt 2.4 Tclspice is built and installed the same way as ngspice. Then, after reading this paragraph, the information you lack will probably be in README file in this directory. There is a configuration flag to set in order to compile tclspice library rather than plain ngspice, that is a standalone program. This flag is --with-tcl. It accepts an argument the path to tclConfig.sh If you don't provide any argument, configure script will try to find it automatically. ./configure --enable-xspice --disable-cider --disable-xgraph --enable-numparam --with-readline=no --enable-adms=no --with-tcl If its does not, then it will propose you some possible locations. can't find Tcl configuration script "tclConfig.sh" Should you add --with-tcl=/usr/lib/tcl8.4/tclConfig.sh to ./configure arguments? If it does not, check that tcl8.4 is installed, and manually specify the path. ./configure --enable-xspice --disable-cider --disable-xgraph --enable-numparam --with-readline=no --enable-adms=non --with-tcl=/usr/lib/tcl8.4 Tclspice is not compatible with ngspice graphical code. Then when building tclspice, --no-x is automatically configured. Support and help : First of all (but last recourse), mail me at saintel@users.sourceforge.net For any kind of information on tclspice: http://ngspice.sourceforge.net/tclspice.html It gives plenty of information. There is an index of good resources that you can read to get into tclspice quickly and proficently. ngspice-26/BUGS0000644000265600020320000000317512264261473012722 0ustar andreasadminThis file contains a list of known but not yet fixed bugs in ngspice. =========================================================================== How to submit a bug report: There are two methods to report a bug you have discovered in ngspice: * Bug tracker: This is the preferred method of reporting a bug. Using the tracker on Sourceforge.net site will make your report open by everyone and the chances of finding a fix will increase. * ngspice-devel list: If you are a member of this list, you can write directly to the developers' list. Do not subscribe to the list only for sending bug reports. Before sending a bug report please note: all information you send to the bug tracking system or on the mailing lists is public. If you need to send sensitive information, send them to a developer directly but still write non sensitive data on the bug tracking system to keep track of bug history. * please refer to the sourceforge bug tracker at http://sourceforge.net/p/ngspice/bugs/ ------------------------------------------------------------------------------ OPEN BUGS: ------------------------------------------------------------------------------ * pole-zero analysis The pole-zero (.pz) analysis, which still uses the original spice3f5 algorithms, does not give correct results for all tested input files. The effort to correct that issue seems to be large. * voltage (and current) controlled switches need better timing The controlled switches (SW, CSW), which still stem from the original spice3f5 implementation, sometimes lead to wrong results when on and off ramp times differ considerably. ngspice-26/missing0000755000265600020320000002415212264261533013631 0ustar andreasadmin#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ngspice-26/visualc-shared/0000755000265600020320000000000012264261473015143 5ustar andreasadminngspice-26/visualc-shared/.gitignore0000644000265600020320000000042212264261473017131 0ustar andreasadmin# NOTE! Please use 'git ls-files -i --exclude-standard' # command after changing this file, to see if there are # any tracked files which get ignored after the change. # # (compile "git ls-files -i --exclude-standard") /* !/include !/.gitignore !/*.c !/*.sln !/*.vcproj ngspice-26/visualc-shared/sharedspice.vcproj0000644000265600020320000050320012264261473020662 0ustar andreasadmin ngspice-26/visualc-shared/sharedspice.sln0000644000265600020320000000206512264261473020156 0ustar andreasadmin Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sharedspice", "sharedspice.vcproj", "{83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 Release|Win32 = Release|Win32 ReleaseOMP|Win32 = ReleaseOMP|Win32 EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.ActiveCfg = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Debug|Win32.Build.0 = Debug|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.ActiveCfg = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.Release|Win32.Build.0 = Release|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.ActiveCfg = ReleaseOMP|Win32 {83E315C7-EDD3-4F6B-AF28-87A92A4FA49A}.ReleaseOMP|Win32.Build.0 = ReleaseOMP|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection EndGlobal ngspice-26/visualc-shared/include/0000755000265600020320000000000012264261473016566 5ustar andreasadminngspice-26/visualc-shared/include/stdint.h0000644000265600020320000001706012264261473020250 0ustar andreasadmin// ISO C9x compliant stdint.h for Microsoft Visual Studio // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 // // Copyright (c) 2006-2008 Alexander Chemeris // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] #ifndef _MSC_STDINT_H_ // [ #define _MSC_STDINT_H_ #if _MSC_VER > 1000 #pragma once #endif #include // For Visual Studio 6 in C++ mode and for many Visual Studio versions when // compiling for ARM we should wrap include with 'extern "C++" {}' // or compiler give many errors like this: // error C2733: second C linkage of overloaded function 'wmemchr' not allowed #ifdef __cplusplus extern "C" { #endif # include #ifdef __cplusplus } #endif // Define _W64 macros to mark types changing their size, like intptr_t. #ifndef _W64 # if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300 # define _W64 __w64 # else # define _W64 # endif #endif // 7.18.1 Integer types // 7.18.1.1 Exact-width integer types // Visual Studio 6 and Embedded Visual C++ 4 doesn't // realize that, e.g. char has the same size as __int8 // so we give up on __intX for them. #if (_MSC_VER < 1300) typedef signed char int8_t; typedef signed short int16_t; typedef signed int int32_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; #else typedef signed __int8 int8_t; typedef signed __int16 int16_t; typedef signed __int32 int32_t; typedef unsigned __int8 uint8_t; typedef unsigned __int16 uint16_t; typedef unsigned __int32 uint32_t; #endif typedef signed __int64 int64_t; typedef unsigned __int64 uint64_t; // 7.18.1.2 Minimum-width integer types typedef int8_t int_least8_t; typedef int16_t int_least16_t; typedef int32_t int_least32_t; typedef int64_t int_least64_t; typedef uint8_t uint_least8_t; typedef uint16_t uint_least16_t; typedef uint32_t uint_least32_t; typedef uint64_t uint_least64_t; // 7.18.1.3 Fastest minimum-width integer types typedef int8_t int_fast8_t; typedef int16_t int_fast16_t; typedef int32_t int_fast32_t; typedef int64_t int_fast64_t; typedef uint8_t uint_fast8_t; typedef uint16_t uint_fast16_t; typedef uint32_t uint_fast32_t; typedef uint64_t uint_fast64_t; // 7.18.1.4 Integer types capable of holding object pointers #ifdef _WIN64 // [ typedef signed __int64 intptr_t; typedef unsigned __int64 uintptr_t; #else // _WIN64 ][ typedef _W64 signed int intptr_t; typedef _W64 unsigned int uintptr_t; #endif // _WIN64 ] // 7.18.1.5 Greatest-width integer types typedef int64_t intmax_t; typedef uint64_t uintmax_t; // 7.18.2 Limits of specified-width integer types #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259 // 7.18.2.1 Limits of exact-width integer types #define INT8_MIN ((int8_t)_I8_MIN) #define INT8_MAX _I8_MAX #define INT16_MIN ((int16_t)_I16_MIN) #define INT16_MAX _I16_MAX #define INT32_MIN ((int32_t)_I32_MIN) #define INT32_MAX _I32_MAX #define INT64_MIN ((int64_t)_I64_MIN) #define INT64_MAX _I64_MAX #define UINT8_MAX _UI8_MAX #define UINT16_MAX _UI16_MAX #define UINT32_MAX _UI32_MAX #define UINT64_MAX _UI64_MAX // 7.18.2.2 Limits of minimum-width integer types #define INT_LEAST8_MIN INT8_MIN #define INT_LEAST8_MAX INT8_MAX #define INT_LEAST16_MIN INT16_MIN #define INT_LEAST16_MAX INT16_MAX #define INT_LEAST32_MIN INT32_MIN #define INT_LEAST32_MAX INT32_MAX #define INT_LEAST64_MIN INT64_MIN #define INT_LEAST64_MAX INT64_MAX #define UINT_LEAST8_MAX UINT8_MAX #define UINT_LEAST16_MAX UINT16_MAX #define UINT_LEAST32_MAX UINT32_MAX #define UINT_LEAST64_MAX UINT64_MAX // 7.18.2.3 Limits of fastest minimum-width integer types #define INT_FAST8_MIN INT8_MIN #define INT_FAST8_MAX INT8_MAX #define INT_FAST16_MIN INT16_MIN #define INT_FAST16_MAX INT16_MAX #define INT_FAST32_MIN INT32_MIN #define INT_FAST32_MAX INT32_MAX #define INT_FAST64_MIN INT64_MIN #define INT_FAST64_MAX INT64_MAX #define UINT_FAST8_MAX UINT8_MAX #define UINT_FAST16_MAX UINT16_MAX #define UINT_FAST32_MAX UINT32_MAX #define UINT_FAST64_MAX UINT64_MAX // 7.18.2.4 Limits of integer types capable of holding object pointers #ifdef _WIN64 // [ # define INTPTR_MIN INT64_MIN # define INTPTR_MAX INT64_MAX # define UINTPTR_MAX UINT64_MAX #else // _WIN64 ][ # define INTPTR_MIN INT32_MIN # define INTPTR_MAX INT32_MAX # define UINTPTR_MAX UINT32_MAX #endif // _WIN64 ] // 7.18.2.5 Limits of greatest-width integer types #define INTMAX_MIN INT64_MIN #define INTMAX_MAX INT64_MAX #define UINTMAX_MAX UINT64_MAX // 7.18.3 Limits of other integer types #ifdef _WIN64 // [ # define PTRDIFF_MIN _I64_MIN # define PTRDIFF_MAX _I64_MAX #else // _WIN64 ][ # define PTRDIFF_MIN _I32_MIN # define PTRDIFF_MAX _I32_MAX #endif // _WIN64 ] #define SIG_ATOMIC_MIN INT_MIN #define SIG_ATOMIC_MAX INT_MAX #ifndef SIZE_MAX // [ # ifdef _WIN64 // [ # define SIZE_MAX _UI64_MAX # else // _WIN64 ][ # define SIZE_MAX _UI32_MAX # endif // _WIN64 ] #endif // SIZE_MAX ] // WCHAR_MIN and WCHAR_MAX are also defined in #ifndef WCHAR_MIN // [ # define WCHAR_MIN 0 #endif // WCHAR_MIN ] #ifndef WCHAR_MAX // [ # define WCHAR_MAX _UI16_MAX #endif // WCHAR_MAX ] #define WINT_MIN 0 #define WINT_MAX _UI16_MAX #endif // __STDC_LIMIT_MACROS ] // 7.18.4 Limits of other integer types #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260 // 7.18.4.1 Macros for minimum-width integer constants #define INT8_C(val) val##i8 #define INT16_C(val) val##i16 #define INT32_C(val) val##i32 #define INT64_C(val) val##i64 #define UINT8_C(val) val##ui8 #define UINT16_C(val) val##ui16 #define UINT32_C(val) val##ui32 #define UINT64_C(val) val##ui64 // 7.18.4.2 Macros for greatest-width integer constants #define INTMAX_C INT64_C #define UINTMAX_C UINT64_C #endif // __STDC_CONSTANT_MACROS ] #endif // _MSC_STDINT_H_ ] ngspice-26/visualc-shared/include/ngspice/0000755000265600020320000000000012264261473020216 5ustar andreasadminngspice-26/visualc-shared/include/ngspice/config.h0000644000265600020320000003554212264261473021645 0ustar andreasadmin/* config.h. Generated by configure. */ /* config.h.in. Generated from configure.in by autoheader. */ /* Support for Verilog-A(MS) models */ /* #undef ADMS */ /* Define if we want debug sensitivity analysis */ /* #undef ASDEBUG */ /* Define if we want to bypass cbd/cbs calculation for non varying vbs/vbd */ /* #undef CAPBYPASS */ /* Define if we want to bypass cbd/cbs calculation if Czero is zero */ /* #undef CAPZEROBYPASS */ /* The CIDER enhancements */ #define CIDER 1 /* Define to 1 if the `closedir' function returns void instead of `int'. */ /* #undef CLOSEDIR_VOID */ /* Spice cluster support */ /* #undef CLUSTER */ /* Define if you want to debug ngspice shell */ /* #undef CPDEBUG */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1 if using `alloca.c'. */ /* #undef C_ALLOCA */ /* Define if we want debug distortion analysis (BLOCKTIMES) */ /* #undef D_DBG_BLOCKTIMES */ /* Define if we want debug distortion analysis (SMALLTIMES) */ /* #undef D_DBG_SMALLTIMES */ /* Define if we want some experimental code */ /* #undef EXPERIMENTAL_CODE */ /* Define if we want to enable experimental devices */ /* #undef EXP_DEV */ /* Define if you want to debug frontend */ /* #undef FTEDEBUG */ /* Define to enable the .global keyword */ #define GLOBAL_NODE 1 /* Tcl Windows */ #define HAS_TCLWIN 1 /* define to specify MS Windows executable */ // #define HAS_WINGUI 1 /* Define to 1 if you have the `access' function. */ #define HAVE_ACCESS 1 /* Define to 1 if you have the `acosh' function. */ /* undef HAVE_ACOSH */ /* Define to 1 if you have `alloca', as a function or macro. */ /* #undef HAVE_ALLOCA */ /* Define to 1 if you have and it should be used (not on Ultrix). */ /* #undef HAVE_ALLOCA_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_ARPA_INET_H */ /* Define to 1 if you have the `asinh' function. */ /* #undef HAVE_ASINH */ /* Define to 1 if you have the `asprintf' function. */ /* #undef HAVE_ASPRINTF */ /* Define to 1 if you have the `atanh' function. */ /* #undef HAVE_ATANH */ /* Define to 1 if you have the `bcopy' function. */ /* #undef HAVE_BCOPY */ /* Define to enable BSD editline */ /* #undef HAVE_BSDEDITLINE */ /* Define to 1 if you have the `bzero' function. */ /* #undef HAVE_BZERO */ /* Define to 1 if you have the header file. */ #define HAVE_CTYPE_H 1 /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_DIRENT_H */ /* Define to 1 if you have the `dirname' function. */ /* #undef HAVE_DIRNAME */ /* Define to 1 if you have the header file. */ /* #undef HAVE_DLFCN_H */ /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the `dup2' function. */ #define HAVE_DUP2 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ /* Define to 1 if you have the `endpwent' function. */ /* #undef HAVE_ENDPWENT */ /* Define to 1 if you have the `erfc' function. */ /* #undef HAVE_ERFC */ /* Define to 1 if you have the header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_FLOAT_H 1 /* Define to 1 if you have the `fork' function. */ /* #undef HAVE_FORK */ /* Define to 1 if you have the `ftime' function. */ #define HAVE_FTIME 1 /* Define to 1 if you have the `getcwd' function. */ #define HAVE_GETCWD 1 /* Define to 1 if you have the `gethostbyname' function. */ /* #undef HAVE_GETHOSTBYNAME */ /* Define to 1 if you have the `getrlimit' function. */ /* #undef HAVE_GETRLIMIT */ /* Define to 1 if you have the `getrusage' function. */ /* #undef HAVE_GETRUSAGE */ /* Define to 1 if you have the `gettimeofday' function. */ /* #undef HAVE_GETTIMEOFDAY */ /* Define to 1 if you have the `getwd' function. */ /* #undef HAVE_GETWD */ /* Define if we have GNU readline */ /* #undef HAVE_GNUREADLINE */ /* Define to 1 if you have the `index' function. */ /* #undef HAVE_INDEX */ /* Define to 1 if you have the header file. */ /* #undef HAVE_INTTYPES_H */ /* Define to 1 if you have the `isatty' function. */ #define HAVE_ISATTY 1 /* Define to 1 if you have the `isnan' function. */ #define HAVE_ISNAN 1 /* Define if we want garbage collection enabled */ /* #undef HAVE_LIBGC */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBGEN_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBIBERTY_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_LIBINTL_H */ /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the `localtime' function. */ #define HAVE_LOCALTIME 1 /* Define to 1 if you have the `logb' function. */ #define HAVE_LOGB 1 /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ /* #undef HAVE_MALLOC */ /* Define to 1 if you have the header file. */ #define HAVE_MALLOC_H 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `modf' function. */ #define HAVE_MODF 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_NCURSES_TERMCAP_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_NDIR_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETDB_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_NETINET_IN_H */ /* Define to 1 if you have the `popen' function. */ /* undef HAVE_POPEN */ /* Define to 1 if you have the header file. */ /* #undef HAVE_PWD_H */ /* Define to 1 if you have the `qsort' function. */ #define HAVE_QSORT 1 /* Define to 1 if you have the `random' function. */ /* #undef HAVE_RANDOM */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_HISTORY_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_READLINE_READLINE_H */ /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ /* #undef HAVE_REALLOC */ /* Define to 1 if you have the `rindex' function. */ /* #undef HAVE_RINDEX */ /* Define to 1 if you have the `scalb' function. */ #define HAVE_SCALB 1 #define scalb _scalb /* Define to 1 if you have the `scalbn' function. */ /* #undef HAVE_SCALBN */ /* Define to 1 if you have the `select' function. */ /* #undef HAVE_SELECT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SGTTY_H */ /* Define if we have sigsetjmp(). */ /* #undef HAVE_SIGSETJMP */ /* Define to 1 if you have the `snprintf' function. */ /* #undef HAVE_SNPRINTF */ /* Define to 1 if you have the `socket' function. */ /* #undef HAVE_SOCKET */ /* Define to 1 if stdbool.h conforms to C99. */ /* #undef HAVE_STDBOOL_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the header file. */ /* #define HAVE_STDINT_H */ /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_STRINGS_H */ /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strncasecmp' function. */ /* #undef HAVE_STRNCASECMP */ /* Define to 1 if you have the header file. */ /* #undef HAVE_STROPTS_H */ /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if `tm_zone' is member of `struct tm'. */ /* #undef HAVE_STRUCT_TM_TM_ZONE */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_DIR_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_FILE_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_IOCTL_H */ /* Define to 1 if you have the header file, and it defines `DIR'. */ /* #undef HAVE_SYS_NDIR_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_PARAM_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SELECT_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_SOCKET_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TIMEB_H 1 /* Define to 1 if you have the header file. */ /* #undef HAVE_SYS_TIME_H */ /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have that is POSIX.1 compatible. */ /* #undef HAVE_SYS_WAIT_H */ /* Define to 1 if you have the `tcgetattr' function. */ /* #undef HAVE_TCGETATTR */ /* Define to 1 if you have the `tcsetattr' function. */ /* #undef HAVE_TCSETATTR */ /* Define if we have ncurses or termcap */ /* #undef HAVE_TERMCAP */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMCAP_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIOS_H */ /* Define to 1 if you have the header file. */ /* #undef HAVE_TERMIO_H */ /* Define to 1 if you have the `time' function. */ /* #undef HAVE_TIME */ /* Define to 1 if your `struct tm' has `tm_zone'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE' instead. */ /* #undef HAVE_TM_ZONE */ /* Define to 1 if you don't have `tm_zone' but do have the external array `tzname'. */ /* #undef HAVE_TZNAME */ /* Define to 1 if you have the `ulimit' function. */ /* #undef HAVE_ULIMIT */ /* Define to 1 if you have the header file. */ /* #undef HAVE_UNISTD_H */ /* Define to 1 if you have the `utimes' function. */ /* #undef HAVE_UTIMES */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VALUES_H */ /* Define to 1 if you have the `vfork' function. */ /* #undef HAVE_VFORK */ /* Define to 1 if you have the header file. */ /* #undef HAVE_VFORK_H */ /* Define to 1 if you have the `vprintf' function. */ /* #undef HAVE_VPRINTF */ /* Define to 1 if `fork' works. */ /* #undef HAVE_WORKING_FORK */ /* Define to 1 if `vfork' works. */ /* #undef HAVE_WORKING_VFORK */ /* Define to 1 if the system has the type `_Bool'. */ /* #undef HAVE__BOOL */ /* Client-Server only via stdio. */ #define IPC_DEBUG_VIA_STDIO 1 /* Client-Server via socket. */ /* #undef IPC_UNIX_SOCKETS */ /* The NDEV interface */ /* #undef NDEV */ /* Define if you want to discover :) */ /* #undef NEWPRED */ /* Do not trigger unwanted traps by default */ /* #undef NEWTRUNC */ /* Define the directory for executables */ #define NGSPICEBINDIR "C:/Spice/bin" /* Define the build date */ #define NGSPICEBUILDDATE "Fri Jan 09 23:33:55 GMT 2013" /* Define the directory for architecture independent data files */ #define NGSPICEDATADIR "C:/Spice/share/ngspice" /* Define if we want NOBYPASS */ /* #undef NOBYPASS */ /* Experimental code never implemented to damp Newton iterations */ /* #undef NODELIMITING */ /* Name of package */ #define PACKAGE "ngspice" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "http://ngspice.sourceforge.net/bugrep.html" /* Define to the full name of this package. */ #define PACKAGE_NAME "ngspice" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "ngspice 26" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "ngspice" /* Define to the version of this package. */ #define PACKAGE_VERSION "26" /* Define if we want predictor algorithm */ /* #undef PREDICTOR */ /* Define to 1 if the C compiler supports function prototypes. */ /* #undef PROTOTYPES */ /* Define if you want to debug pole-zero analysis */ /* #undef PZDEBUG */ /* Define as the return type of signal handlers (`int' or `void'). */ #define RETSIGTYPE void /* Define to the type of arg 1 for `select'. */ /* #undef SELECT_TYPE_ARG1 */ /* Define to the type of args 2, 3 and 4 for `select'. */ /* #undef SELECT_TYPE_ARG234 */ /* Define to the type of arg 5 for `select'. */ /* #undef SELECT_TYPE_ARG5 */ /* Define if we want debug sensititvity analysis */ /* #undef SENSDEBUG */ /* Define to 1 if the `setvbuf' function takes the buffering type as its second argument and the buffer pointer as the third, as on System V before release 3. */ /* #undef SETVBUF_REVERSED */ /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at run-time. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ /* #undef STACK_DIRECTION */ /* Define to 1 if the `S_IS*' macros in do not work properly. */ /* #undef STAT_MACROS_BROKEN */ /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define if we want stepdebug */ /* #undef STEPDEBUG */ /* Define to 1 if you can safely include both and . */ /* #undef TIME_WITH_SYS_TIME */ /* Define to 1 if your declares `struct tm'. */ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ #define VERSION "26" /* Define if we want spice2 sensitivity analysis */ /* #undef WANT_SENSE2 */ /* The xspice enhancements */ #define XSPICE 1 /* Define to 1 if the X Window System is missing or not being used. */ #define X_DISPLAY_MISSING 1 /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ /* #undef YYTEXT_POINTER */ /* Define like PROTOTYPES; this can be used by system headers. */ /* #undef __PROTOTYPES */ /* Define to rpl_malloc if the replacement function should be used. */ /* #undef malloc */ /* Define to `int' if does not define. */ /* #undef pid_t */ /* Define to rpl_realloc if the replacement function should be used. */ /* #undef realloc */ /* Define to `unsigned' if does not define. */ /* #undef size_t */ /* Define as `fork' if `vfork' does not work. */ #define vfork fork /* define if shared ngspice is made */ # define SHARED_MODULE ngspice-26/visualc-shared/include/inttypes.h0000644000265600020320000001750412264261473020625 0ustar andreasadmin// ISO C9x compliant inttypes.h for Microsoft Visual Studio // Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124 // // Copyright (c) 2006 Alexander Chemeris // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // 1. Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // // 2. Redistributions in binary form must reproduce the above copyright // notice, this list of conditions and the following disclaimer in the // documentation and/or other materials provided with the distribution. // // 3. The name of the author may be used to endorse or promote products // derived from this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED // WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF // MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO // EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // /////////////////////////////////////////////////////////////////////////////// #ifndef _MSC_VER // [ #error "Use this header only with Microsoft Visual C++ compilers!" #endif // _MSC_VER ] #ifndef _MSC_INTTYPES_H_ // [ #define _MSC_INTTYPES_H_ #if _MSC_VER > 1000 #pragma once #endif #include "stdint.h" // 7.8 Format conversion of integer types typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t; // 7.8.1 Macros for format specifiers #if !defined(__cplusplus) || defined(__STDC_FORMAT_MACROS) // [ See footnote 185 at page 198 // The fprintf macros for signed integers are: #define PRId8 "d" #define PRIi8 "i" #define PRIdLEAST8 "d" #define PRIiLEAST8 "i" #define PRIdFAST8 "d" #define PRIiFAST8 "i" #define PRId16 "hd" #define PRIi16 "hi" #define PRIdLEAST16 "hd" #define PRIiLEAST16 "hi" #define PRIdFAST16 "hd" #define PRIiFAST16 "hi" #define PRId32 "I32d" #define PRIi32 "I32i" #define PRIdLEAST32 "I32d" #define PRIiLEAST32 "I32i" #define PRIdFAST32 "I32d" #define PRIiFAST32 "I32i" #define PRId64 "I64d" #define PRIi64 "I64i" #define PRIdLEAST64 "I64d" #define PRIiLEAST64 "I64i" #define PRIdFAST64 "I64d" #define PRIiFAST64 "I64i" #define PRIdMAX "I64d" #define PRIiMAX "I64i" #define PRIdPTR "Id" #define PRIiPTR "Ii" // The fprintf macros for unsigned integers are: #define PRIo8 "o" #define PRIu8 "u" #define PRIx8 "x" #define PRIX8 "X" #define PRIoLEAST8 "o" #define PRIuLEAST8 "u" #define PRIxLEAST8 "x" #define PRIXLEAST8 "X" #define PRIoFAST8 "o" #define PRIuFAST8 "u" #define PRIxFAST8 "x" #define PRIXFAST8 "X" #define PRIo16 "ho" #define PRIu16 "hu" #define PRIx16 "hx" #define PRIX16 "hX" #define PRIoLEAST16 "ho" #define PRIuLEAST16 "hu" #define PRIxLEAST16 "hx" #define PRIXLEAST16 "hX" #define PRIoFAST16 "ho" #define PRIuFAST16 "hu" #define PRIxFAST16 "hx" #define PRIXFAST16 "hX" #define PRIo32 "I32o" #define PRIu32 "I32u" #define PRIx32 "I32x" #define PRIX32 "I32X" #define PRIoLEAST32 "I32o" #define PRIuLEAST32 "I32u" #define PRIxLEAST32 "I32x" #define PRIXLEAST32 "I32X" #define PRIoFAST32 "I32o" #define PRIuFAST32 "I32u" #define PRIxFAST32 "I32x" #define PRIXFAST32 "I32X" #define PRIo64 "I64o" #define PRIu64 "I64u" #define PRIx64 "I64x" #define PRIX64 "I64X" #define PRIoLEAST64 "I64o" #define PRIuLEAST64 "I64u" #define PRIxLEAST64 "I64x" #define PRIXLEAST64 "I64X" #define PRIoFAST64 "I64o" #define PRIuFAST64 "I64u" #define PRIxFAST64 "I64x" #define PRIXFAST64 "I64X" #define PRIoMAX "I64o" #define PRIuMAX "I64u" #define PRIxMAX "I64x" #define PRIXMAX "I64X" #define PRIoPTR "Io" #define PRIuPTR "Iu" #define PRIxPTR "Ix" #define PRIXPTR "IX" // The fscanf macros for signed integers are: #define SCNd8 "d" #define SCNi8 "i" #define SCNdLEAST8 "d" #define SCNiLEAST8 "i" #define SCNdFAST8 "d" #define SCNiFAST8 "i" #define SCNd16 "hd" #define SCNi16 "hi" #define SCNdLEAST16 "hd" #define SCNiLEAST16 "hi" #define SCNdFAST16 "hd" #define SCNiFAST16 "hi" #define SCNd32 "ld" #define SCNi32 "li" #define SCNdLEAST32 "ld" #define SCNiLEAST32 "li" #define SCNdFAST32 "ld" #define SCNiFAST32 "li" #define SCNd64 "I64d" #define SCNi64 "I64i" #define SCNdLEAST64 "I64d" #define SCNiLEAST64 "I64i" #define SCNdFAST64 "I64d" #define SCNiFAST64 "I64i" #define SCNdMAX "I64d" #define SCNiMAX "I64i" #ifdef _WIN64 // [ # define SCNdPTR "I64d" # define SCNiPTR "I64i" #else // _WIN64 ][ # define SCNdPTR "ld" # define SCNiPTR "li" #endif // _WIN64 ] // The fscanf macros for unsigned integers are: #define SCNo8 "o" #define SCNu8 "u" #define SCNx8 "x" #define SCNX8 "X" #define SCNoLEAST8 "o" #define SCNuLEAST8 "u" #define SCNxLEAST8 "x" #define SCNXLEAST8 "X" #define SCNoFAST8 "o" #define SCNuFAST8 "u" #define SCNxFAST8 "x" #define SCNXFAST8 "X" #define SCNo16 "ho" #define SCNu16 "hu" #define SCNx16 "hx" #define SCNX16 "hX" #define SCNoLEAST16 "ho" #define SCNuLEAST16 "hu" #define SCNxLEAST16 "hx" #define SCNXLEAST16 "hX" #define SCNoFAST16 "ho" #define SCNuFAST16 "hu" #define SCNxFAST16 "hx" #define SCNXFAST16 "hX" #define SCNo32 "lo" #define SCNu32 "lu" #define SCNx32 "lx" #define SCNX32 "lX" #define SCNoLEAST32 "lo" #define SCNuLEAST32 "lu" #define SCNxLEAST32 "lx" #define SCNXLEAST32 "lX" #define SCNoFAST32 "lo" #define SCNuFAST32 "lu" #define SCNxFAST32 "lx" #define SCNXFAST32 "lX" #define SCNo64 "I64o" #define SCNu64 "I64u" #define SCNx64 "I64x" #define SCNX64 "I64X" #define SCNoLEAST64 "I64o" #define SCNuLEAST64 "I64u" #define SCNxLEAST64 "I64x" #define SCNXLEAST64 "I64X" #define SCNoFAST64 "I64o" #define SCNuFAST64 "I64u" #define SCNxFAST64 "I64x" #define SCNXFAST64 "I64X" #define SCNoMAX "I64o" #define SCNuMAX "I64u" #define SCNxMAX "I64x" #define SCNXMAX "I64X" #ifdef _WIN64 // [ # define SCNoPTR "I64o" # define SCNuPTR "I64u" # define SCNxPTR "I64x" # define SCNXPTR "I64X" #else // _WIN64 ][ # define SCNoPTR "lo" # define SCNuPTR "lu" # define SCNxPTR "lx" # define SCNXPTR "lX" #endif // _WIN64 ] #endif // __STDC_FORMAT_MACROS ] // 7.8.2 Functions for greatest-width integer types // 7.8.2.1 The imaxabs function #define imaxabs _abs64 // 7.8.2.2 The imaxdiv function // This is modified version of div() function from Microsoft's div.c found // in %MSVC.NET%\crt\src\div.c #ifdef STATIC_IMAXDIV // [ static #else // STATIC_IMAXDIV ][ _inline #endif // STATIC_IMAXDIV ] imaxdiv_t __cdecl imaxdiv(intmax_t numer, intmax_t denom) { imaxdiv_t result; result.quot = numer / denom; result.rem = numer % denom; if (numer < 0 && result.rem > 0) { // did division wrong; must fix up ++result.quot; result.rem -= denom; } return result; } // 7.8.2.3 The strtoimax and strtoumax functions #define strtoimax _strtoi64 #define strtoumax _strtoui64 // 7.8.2.4 The wcstoimax and wcstoumax functions #define wcstoimax _wcstoi64 #define wcstoumax _wcstoui64 #endif // _MSC_INTTYPES_H_ ] ngspice-26/visualc-shared/include/strings.h0000644000265600020320000000046212264261473020432 0ustar andreasadmin/* File: strings.h Copyright: Public Domain This file is provided because non ANSI fuctions are described in string.h that belong in strings.h. These functions are provided for in the OLDNAME libraries. */ #if !defined(_STRINGS_H_) # define _STRINGS_H_ 1 # include #endif